From 4f4850689498ba669e3f50da5050d1e12ca4bb94 Mon Sep 17 00:00:00 2001 From: Insider Date: Sat, 17 Oct 2009 16:46:39 +0800 Subject: [PATCH 001/405] Added SD2 revision 1476 --- LICENSE.txt | 280 ++ Makefile.am | 523 ++ ScriptMgr.cpp | 444 ++ ScriptMgr.h | 76 + VC80/80ScriptDev2.vcproj | 2592 ++++++++++ VC90/90ScriptDev2.vcproj | 2591 ++++++++++ base/escort_ai.cpp | 487 ++ base/escort_ai.h | 106 + base/follower_ai.cpp | 387 ++ base/follower_ai.h | 67 + base/guard_ai.cpp | 201 + base/guard_ai.h | 46 + base/simple_ai.cpp | 277 ++ base/simple_ai.h | 70 + config.h | 58 + config.h.in | 58 + docs/How to install.txt | 53 + docs/LICENSE.txt | 280 ++ docs/Script Layout.txt | 32 + docs/Text-tables.txt | 86 + docs/ToDo.txt | 14 + include/precompiled.cpp | 5 + include/precompiled.h | 25 + include/sc_creature.cpp | 626 +++ include/sc_creature.h | 197 + include/sc_gossip.h | 187 + include/sc_grid_searchers.cpp | 77 + include/sc_grid_searchers.h | 118 + include/sc_instance.cpp | 59 + include/sc_instance.h | 42 + patches/MaNGOS-8273-ScriptDev2.patch | 75 + .../ScriptDev2_1318_to_MaNGOS_0.12.patch | 409 ++ scriptVC80.sln | 25 + scriptVC90.sln | 25 + scriptdev2.conf.dist.in | 11 + scripts/battlegrounds/battleground.cpp | 112 + .../eastern_kingdoms/alterac_mountains.cpp | 32 + scripts/eastern_kingdoms/arathi_highlands.cpp | 126 + .../blackrock_depths/blackrock_depths.cpp | 703 +++ .../blackrock_depths/blackrock_depths.h | 40 + .../boss_ambassador_flamelash.cpp | 104 + .../blackrock_depths/boss_anubshiah.cpp | 111 + .../boss_emperor_dagran_thaurissan.cpp | 260 + .../boss_general_angerforge.cpp | 163 + .../boss_gorosh_the_dervish.cpp | 77 + .../blackrock_depths/boss_grizzle.cpp | 83 + .../boss_high_interrogator_gerstahn.cpp | 101 + .../blackrock_depths/boss_magmus.cpp | 113 + .../blackrock_depths/boss_tomb_of_seven.cpp | 325 ++ .../instance_blackrock_depths.cpp | 377 ++ .../blackrock_spire/boss_drakkisath.cpp | 97 + .../blackrock_spire/boss_gyth.cpp | 201 + .../blackrock_spire/boss_halycon.cpp | 91 + .../blackrock_spire/boss_highlord_omokk.cpp | 127 + .../boss_mother_smolderweb.cpp | 84 + .../boss_overlord_wyrmthalak.cpp | 125 + .../boss_pyroguard_emberseer.cpp | 89 + .../boss_quartermaster_zigris.cpp | 81 + .../blackrock_spire/boss_rend_blackhand.cpp | 87 + .../boss_shadow_hunter_voshgajin.cpp | 91 + .../blackrock_spire/boss_the_beast.cpp | 89 + .../blackrock_spire/boss_warmaster_voone.cpp | 117 + .../boss_broodlord_lashlayer.cpp | 111 + .../blackwing_lair/boss_chromaggus.cpp | 313 ++ .../blackwing_lair/boss_ebonroc.cpp | 103 + .../blackwing_lair/boss_firemaw.cpp | 94 + .../blackwing_lair/boss_flamegor.cpp | 100 + .../blackwing_lair/boss_nefarian.cpp | 225 + .../blackwing_lair/boss_razorgore.cpp | 128 + .../blackwing_lair/boss_vaelastrasz.cpp | 258 + .../blackwing_lair/boss_victor_nefarius.cpp | 387 ++ .../instance_blackwing_lair.cpp | 24 + scripts/eastern_kingdoms/blasted_lands.cpp | 159 + scripts/eastern_kingdoms/boss_kruul.cpp | 178 + scripts/eastern_kingdoms/burning_steppes.cpp | 149 + .../eastern_kingdoms/deadmines/deadmines.cpp | 69 + .../eastern_kingdoms/deadmines/deadmines.h | 25 + .../deadmines/instance_deadmines.cpp | 151 + scripts/eastern_kingdoms/dun_morogh.cpp | 91 + .../eastern_kingdoms/eastern_plaguelands.cpp | 176 + scripts/eastern_kingdoms/elwynn_forest.cpp | 91 + scripts/eastern_kingdoms/eversong_woods.cpp | 347 ++ scripts/eastern_kingdoms/ghostlands.cpp | 277 ++ scripts/eastern_kingdoms/hinterlands.cpp | 348 ++ scripts/eastern_kingdoms/ironforge.cpp | 93 + .../eastern_kingdoms/isle_of_queldanas.cpp | 157 + .../karazhan/boss_curator.cpp | 213 + .../karazhan/boss_maiden_of_virtue.cpp | 151 + .../karazhan/boss_midnight.cpp | 344 ++ .../eastern_kingdoms/karazhan/boss_moroes.cpp | 843 ++++ .../karazhan/boss_netherspite.cpp | 43 + .../karazhan/boss_nightbane.cpp | 36 + .../karazhan/boss_prince_malchezaar.cpp | 631 +++ .../karazhan/boss_shade_of_aran.cpp | 591 +++ .../karazhan/boss_terestian_illhoof.cpp | 440 ++ .../karazhan/bosses_opera.cpp | 1513 ++++++ .../karazhan/instance_karazhan.cpp | 285 ++ .../eastern_kingdoms/karazhan/karazhan.cpp | 433 ++ scripts/eastern_kingdoms/karazhan/karazhan.h | 51 + scripts/eastern_kingdoms/loch_modan.cpp | 91 + .../boss_felblood_kaelthas.cpp | 651 +++ .../boss_priestess_delrissa.cpp | 1332 ++++++ .../boss_selin_fireheart.cpp | 380 ++ .../magisters_terrace/boss_vexallus.cpp | 228 + .../instance_magisters_terrace.cpp | 207 + .../magisters_terrace/magisters_terrace.cpp | 174 + .../magisters_terrace/magisters_terrace.h | 30 + .../molten_core/boss_baron_geddon.cpp | 104 + .../molten_core/boss_garr.cpp | 134 + .../molten_core/boss_gehennas.cpp | 89 + .../molten_core/boss_golemagg.cpp | 198 + .../molten_core/boss_lucifron.cpp | 86 + .../molten_core/boss_magmadar.cpp | 99 + .../molten_core/boss_majordomo_executus.cpp | 138 + .../molten_core/boss_ragnaros.cpp | 291 ++ .../molten_core/boss_shazzrah.cpp | 118 + .../molten_core/boss_sulfuron_harbinger.cpp | 207 + .../molten_core/instance_molten_core.cpp | 287 ++ .../molten_core/molten_core.cpp | 88 + .../molten_core/molten_core.h | 43 + .../scarlet_enclave/ebon_hold.cpp | 1139 +++++ .../scarlet_monastery/boss_arcanist_doan.cpp | 127 + .../boss_azshir_the_sleepless.cpp | 93 + .../boss_bloodmage_thalnos.cpp | 123 + .../boss_headless_horseman.cpp | 90 + .../scarlet_monastery/boss_herod.cpp | 158 + .../boss_high_inquisitor_fairbanks.cpp | 128 + .../boss_houndmaster_loksey.cpp | 77 + .../boss_interrogator_vishas.cpp | 120 + .../boss_mograine_and_whitemane.cpp | 377 ++ .../scarlet_monastery/boss_scorn.cpp | 96 + .../instance_scarlet_monastery.cpp | 115 + .../scarlet_monastery/scarlet_monastery.h | 20 + .../scholomance/boss_darkmaster_gandling.cpp | 222 + .../boss_death_knight_darkreaver.cpp | 56 + .../boss_doctor_theolen_krastinov.cpp | 114 + .../scholomance/boss_illucia_barov.cpp | 111 + .../scholomance/boss_instructor_malicia.cpp | 147 + .../scholomance/boss_jandice_barov.cpp | 201 + .../scholomance/boss_kormok.cpp | 151 + .../scholomance/boss_lord_alexei_barov.cpp | 93 + .../scholomance/boss_lorekeeper_polkelt.cpp | 108 + .../scholomance/boss_ras_frostwhisper.cpp | 121 + .../scholomance/boss_the_ravenian.cpp | 111 + .../scholomance/boss_vectus.cpp | 103 + .../scholomance/instance_scholomance.cpp | 130 + .../scholomance/scholomance.h | 31 + scripts/eastern_kingdoms/searing_gorge.cpp | 159 + .../instance_shadowfang_keep.cpp | 207 + .../shadowfang_keep/shadowfang_keep.cpp | 141 + .../shadowfang_keep/shadowfang_keep.h | 12 + scripts/eastern_kingdoms/silvermoon_city.cpp | 96 + .../eastern_kingdoms/silverpine_forest.cpp | 232 + scripts/eastern_kingdoms/stormwind_city.cpp | 268 ++ .../eastern_kingdoms/stranglethorn_vale.cpp | 107 + .../stratholme/boss_baron_rivendare.cpp | 185 + .../stratholme/boss_baroness_anastari.cpp | 118 + .../stratholme/boss_cannon_master_willey.cpp | 215 + .../stratholme/boss_dathrohan_balnazzar.cpp | 213 + .../stratholme/boss_magistrate_barthilas.cpp | 128 + .../stratholme/boss_maleki_the_pallid.cpp | 108 + .../stratholme/boss_nerubenkan.cpp | 137 + .../stratholme/boss_order_of_silver_hand.cpp | 154 + .../stratholme/boss_postmaster_malown.cpp | 139 + .../stratholme/boss_ramstein_the_gorger.cpp | 94 + .../stratholme/boss_timmy_the_cruel.cpp | 70 + .../stratholme/instance_stratholme.cpp | 393 ++ .../stratholme/stratholme.cpp | 283 ++ .../eastern_kingdoms/stratholme/stratholme.h | 27 + .../sunwell_plateau/boss_brutallus.cpp | 219 + .../sunwell_plateau/boss_kalecgos.cpp | 608 +++ .../instance_sunwell_plateau.cpp | 377 ++ .../sunwell_plateau/sunwell_plateau.h | 49 + scripts/eastern_kingdoms/tirisfal_glades.cpp | 208 + .../eastern_kingdoms/uldaman/boss_ironaya.cpp | 105 + scripts/eastern_kingdoms/uldaman/uldaman.cpp | 183 + scripts/eastern_kingdoms/undercity.cpp | 255 + .../eastern_kingdoms/western_plaguelands.cpp | 222 + scripts/eastern_kingdoms/westfall.cpp | 263 ++ scripts/eastern_kingdoms/wetlands.cpp | 167 + .../eastern_kingdoms/zulaman/boss_akilzon.cpp | 311 ++ .../eastern_kingdoms/zulaman/boss_halazzi.cpp | 400 ++ .../eastern_kingdoms/zulaman/boss_janalai.cpp | 801 ++++ .../zulaman/boss_malacrass.cpp | 868 ++++ .../zulaman/boss_nalorakk.cpp | 255 + .../eastern_kingdoms/zulaman/boss_zuljin.cpp | 153 + .../zulaman/instance_zulaman.cpp | 364 ++ scripts/eastern_kingdoms/zulaman/zulaman.cpp | 250 + scripts/eastern_kingdoms/zulaman/zulaman.h | 60 + .../eastern_kingdoms/zulgurub/boss_arlokk.cpp | 274 ++ .../zulgurub/boss_gahzranka.cpp | 88 + .../eastern_kingdoms/zulgurub/boss_grilek.cpp | 88 + .../eastern_kingdoms/zulgurub/boss_hakkar.cpp | 251 + .../zulgurub/boss_hazzarah.cpp | 96 + .../eastern_kingdoms/zulgurub/boss_jeklik.cpp | 284 ++ .../eastern_kingdoms/zulgurub/boss_jindo.cpp | 268 ++ .../zulgurub/boss_mandokir.cpp | 402 ++ .../eastern_kingdoms/zulgurub/boss_marli.cpp | 375 ++ .../zulgurub/boss_renataki.cpp | 146 + .../eastern_kingdoms/zulgurub/boss_thekal.cpp | 545 +++ .../zulgurub/boss_venoxis.cpp | 270 ++ .../zulgurub/boss_wushoolay.cpp | 80 + .../zulgurub/instance_zulgurub.cpp | 162 + scripts/eastern_kingdoms/zulgurub/zulgurub.h | 35 + scripts/examples/example_creature.cpp | 272 ++ scripts/examples/example_escort.cpp | 230 + scripts/examples/example_gossip_codebox.cpp | 99 + scripts/examples/example_misc.cpp | 68 + scripts/kalimdor/ashenvale.cpp | 446 ++ scripts/kalimdor/azshara.cpp | 390 ++ scripts/kalimdor/azuremyst_isle.cpp | 538 +++ .../blackfathom_deeps/blackfathom_deeps.h | 25 + .../instance_blackfathom_deeps.cpp | 143 + scripts/kalimdor/bloodmyst_isle.cpp | 137 + scripts/kalimdor/boss_azuregos.cpp | 153 + .../dark_portal/boss_aeonus.cpp | 144 + .../dark_portal/boss_chrono_lord_deja.cpp | 153 + .../dark_portal/boss_temporus.cpp | 150 + .../dark_portal/dark_portal.cpp | 411 ++ .../caverns_of_time/dark_portal/dark_portal.h | 45 + .../dark_portal/instance_dark_portal.cpp | 343 ++ .../caverns_of_time/hyjal/boss_archimonde.cpp | 633 +++ .../kalimdor/caverns_of_time/hyjal/hyjal.cpp | 241 + .../kalimdor/caverns_of_time/hyjal/hyjal.h | 71 + .../caverns_of_time/hyjal/hyjalAI.cpp | 496 ++ .../kalimdor/caverns_of_time/hyjal/hyjalAI.h | 199 + .../caverns_of_time/hyjal/instance_hyjal.cpp | 244 + .../old_hillsbrad/boss_captain_skarloc.cpp | 152 + .../old_hillsbrad/boss_epoch_hunter.cpp | 138 + .../old_hillsbrad/boss_leutenant_drake.cpp | 188 + .../old_hillsbrad/instance_old_hillsbrad.cpp | 234 + .../old_hillsbrad/old_hillsbrad.cpp | 692 +++ .../old_hillsbrad/old_hillsbrad.h | 18 + scripts/kalimdor/darkshore.cpp | 405 ++ scripts/kalimdor/desolace.cpp | 174 + scripts/kalimdor/dustwallow_marsh.cpp | 871 ++++ scripts/kalimdor/felwood.cpp | 232 + scripts/kalimdor/feralas.cpp | 200 + .../maraudon/boss_celebras_the_cursed.cpp | 95 + scripts/kalimdor/maraudon/boss_landslide.cpp | 90 + scripts/kalimdor/maraudon/boss_noxxion.cpp | 145 + .../maraudon/boss_princess_theradras.cpp | 104 + scripts/kalimdor/moonglade.cpp | 362 ++ scripts/kalimdor/mulgore.cpp | 194 + scripts/kalimdor/onyxias_lair/boss_onyxia.cpp | 487 ++ scripts/kalimdor/orgrimmar.cpp | 271 ++ .../boss_amnennar_the_coldbringer.cpp | 129 + .../razorfen_downs/razorfen_downs.cpp | 85 + .../ruins_of_ahnqiraj/boss_ayamiss.cpp | 107 + .../kalimdor/ruins_of_ahnqiraj/boss_buru.cpp | 26 + .../ruins_of_ahnqiraj/boss_kurinnaxx.cpp | 93 + .../kalimdor/ruins_of_ahnqiraj/boss_moam.cpp | 119 + .../ruins_of_ahnqiraj/boss_ossirian.cpp | 38 + .../ruins_of_ahnqiraj/boss_rajaxx.cpp | 44 + .../instance_ruins_of_ahnqiraj.cpp | 24 + scripts/kalimdor/silithus.cpp | 253 + scripts/kalimdor/stonetalon_mountains.cpp | 160 + scripts/kalimdor/tanaris.cpp | 639 +++ scripts/kalimdor/teldrassil.cpp | 113 + .../temple_of_ahnqiraj/boss_bug_trio.cpp | 332 ++ .../temple_of_ahnqiraj/boss_cthun.cpp | 1347 ++++++ .../temple_of_ahnqiraj/boss_fankriss.cpp | 198 + .../temple_of_ahnqiraj/boss_huhuran.cpp | 143 + .../kalimdor/temple_of_ahnqiraj/boss_ouro.cpp | 139 + .../temple_of_ahnqiraj/boss_sartura.cpp | 292 ++ .../temple_of_ahnqiraj/boss_skeram.cpp | 318 ++ .../temple_of_ahnqiraj/boss_twinemperors.cpp | 668 +++ .../temple_of_ahnqiraj/boss_viscidus.cpp | 29 + .../instance_temple_of_ahnqiraj.cpp | 148 + .../mob_anubisath_sentinel.cpp | 318 ++ .../temple_of_ahnqiraj/temple_of_ahnqiraj.h | 27 + scripts/kalimdor/the_barrens.cpp | 691 +++ scripts/kalimdor/thousand_needles.cpp | 398 ++ scripts/kalimdor/thunder_bluff.cpp | 134 + scripts/kalimdor/ungoro_crater.cpp | 345 ++ .../instance_wailing_caverns.cpp | 24 + scripts/kalimdor/winterspring.cpp | 157 + scripts/kalimdor/zulfarrak/zulfarrak.cpp | 224 + .../northrend/azjol-nerub/ahnkahet/ahnkahet.h | 33 + .../azjol-nerub/ahnkahet/boss_jedoga.cpp | 109 + .../azjol-nerub/ahnkahet/boss_nadox.cpp | 100 + .../azjol-nerub/ahnkahet/boss_taldaram.cpp | 126 + .../azjol-nerub/ahnkahet/boss_volazj.cpp | 100 + .../ahnkahet/instance_ahnkahet.cpp | 206 + .../azjol-nerub/azjol-nerub/azjol-nerub.h | 22 + .../azjol-nerub/azjol-nerub/boss_anubarak.cpp | 104 + .../azjol-nerub/azjol-nerub/boss_hadronox.cpp | 79 + .../azjol-nerub/azjol-nerub/boss_krikthir.cpp | 107 + .../azjol-nerub/instance_azjol-nerub.cpp | 166 + scripts/northrend/borean_tundra.cpp | 289 ++ scripts/northrend/dalaran.cpp | 72 + scripts/northrend/dragonblight.cpp | 218 + .../northrend/draktharon_keep/boss_novos.cpp | 95 + .../draktharon_keep/boss_tharonja.cpp | 95 + .../draktharon_keep/boss_trollgore.cpp | 93 + scripts/northrend/grizzly_hills.cpp | 126 + scripts/northrend/gundrak/boss_colossus.cpp | 75 + scripts/northrend/gundrak/boss_galdarah.cpp | 102 + scripts/northrend/gundrak/boss_moorabi.cpp | 102 + scripts/northrend/gundrak/boss_sladran.cpp | 100 + scripts/northrend/gundrak/gundrak.h | 47 + .../northrend/gundrak/instance_gundrak.cpp | 301 ++ scripts/northrend/howling_fjord.cpp | 121 + scripts/northrend/icecrown.cpp | 117 + .../northrend/naxxramas/boss_anubrekhan.cpp | 182 + scripts/northrend/naxxramas/boss_faerlina.cpp | 160 + .../naxxramas/boss_four_horsemen.cpp | 399 ++ scripts/northrend/naxxramas/boss_gluth.cpp | 197 + scripts/northrend/naxxramas/boss_gothik.cpp | 68 + .../northrend/naxxramas/boss_grobbulus.cpp | 31 + scripts/northrend/naxxramas/boss_heigan.cpp | 49 + .../northrend/naxxramas/boss_kelthuzad.cpp | 459 ++ scripts/northrend/naxxramas/boss_loatheb.cpp | 172 + scripts/northrend/naxxramas/boss_maexxna.cpp | 270 ++ scripts/northrend/naxxramas/boss_noth.cpp | 184 + .../northrend/naxxramas/boss_patchwerk.cpp | 191 + .../northrend/naxxramas/boss_razuvious.cpp | 169 + .../northrend/naxxramas/boss_sapphiron.cpp | 205 + scripts/northrend/naxxramas/boss_thaddius.cpp | 74 + .../naxxramas/instance_naxxramas.cpp | 517 ++ scripts/northrend/naxxramas/naxxramas.h | 95 + .../northrend/nexus/nexus/boss_anomalus.cpp | 254 + .../nexus/nexus/boss_keristrasza.cpp | 106 + .../northrend/nexus/nexus/boss_ormorok.cpp | 177 + .../northrend/nexus/nexus/boss_telestra.cpp | 122 + .../northrend/nexus/nexus/instance_nexus.cpp | 244 + scripts/northrend/nexus/nexus/nexus.h | 26 + .../obsidian_sanctum/boss_sartharion.cpp | 1141 +++++ .../instance_obsidian_sanctum.cpp | 118 + .../obsidian_sanctum/obsidian_sanctum.h | 26 + scripts/northrend/sholazar_basin.cpp | 93 + scripts/northrend/storm_peaks.cpp | 216 + .../halls_of_lightning/boss_bjarngrim.cpp | 443 ++ .../ulduar/halls_of_lightning/boss_ionar.cpp | 395 ++ .../ulduar/halls_of_lightning/boss_loken.cpp | 228 + .../halls_of_lightning/boss_volkhan.cpp | 484 ++ .../halls_of_lightning/halls_of_lightning.h | 34 + .../instance_halls_of_lightning.cpp | 194 + .../halls_of_stone/boss_maiden_of_grief.cpp | 100 + .../ulduar/halls_of_stone/boss_sjonnir.cpp | 98 + .../ulduar/halls_of_stone/halls_of_stone.cpp | 183 + .../ulduar/ulduar/instance_ulduar.cpp | 288 ++ scripts/northrend/ulduar/ulduar/ulduar.h | 49 + .../utgarde_keep/utgarde_keep/boss_ingvar.cpp | 236 + .../utgarde_keep/boss_keleseth.cpp | 324 ++ .../boss_skarvald_and_dalronn.cpp | 320 ++ .../utgarde_keep/instance_utgarde_keep.cpp | 203 + .../utgarde_keep/utgarde_keep.cpp | 160 + .../utgarde_keep/utgarde_keep/utgarde_keep.h | 25 + .../utgarde_pinnacle/boss_gortok.cpp | 91 + .../utgarde_pinnacle/boss_skadi.cpp | 104 + .../utgarde_pinnacle/boss_svala.cpp | 272 ++ .../utgarde_pinnacle/boss_ymiron.cpp | 103 + .../instance_utgarde_pinnacle.cpp | 135 + .../utgarde_pinnacle/utgarde_pinnacle.h | 18 + .../auchenai_crypts/boss_exarch_maladaar.cpp | 346 ++ .../mana_tombs/boss_nexusprince_shaffar.cpp | 265 ++ .../mana_tombs/boss_pandemonius.cpp | 134 + .../sethekk_halls/boss_darkweaver_syth.cpp | 404 ++ .../sethekk_halls/boss_tailonking_ikiss.cpp | 213 + .../sethekk_halls/instance_sethekk_halls.cpp | 70 + .../auchindoun/sethekk_halls/sethekk_halls.h | 9 + .../boss_ambassador_hellmaw.cpp | 208 + .../boss_blackheart_the_inciter.cpp | 173 + .../boss_grandmaster_vorpil.cpp | 236 + .../shadow_labyrinth/boss_murmur.cpp | 205 + .../instance_shadow_labyrinth.cpp | 213 + .../shadow_labyrinth/shadow_labyrinth.h | 22 + scripts/outland/black_temple/black_temple.cpp | 68 + scripts/outland/black_temple/black_temple.h | 45 + .../outland/black_temple/boss_bloodboil.cpp | 340 ++ scripts/outland/black_temple/boss_illidan.cpp | 2465 ++++++++++ .../black_temple/boss_mother_shahraz.cpp | 309 ++ .../black_temple/boss_reliquary_of_souls.cpp | 979 ++++ .../black_temple/boss_shade_of_akama.cpp | 895 ++++ .../outland/black_temple/boss_supremus.cpp | 395 ++ .../black_temple/boss_teron_gorefiend.cpp | 513 ++ .../black_temple/boss_warlord_najentus.cpp | 214 + .../outland/black_temple/illidari_council.cpp | 857 ++++ .../black_temple/instance_black_temple.cpp | 332 ++ scripts/outland/blades_edge_mountains.cpp | 391 ++ scripts/outland/boss_doomlord_kazzak.cpp | 181 + scripts/outland/boss_doomwalker.cpp | 184 + .../boss_fathomlord_karathress.cpp | 605 +++ .../boss_hydross_the_unstable.cpp | 322 ++ .../serpent_shrine/boss_lady_vashj.cpp | 806 ++++ .../boss_leotheras_the_blind.cpp | 342 ++ .../boss_morogrim_tidewalker.cpp | 317 ++ .../instance_serpent_shrine.cpp | 211 + .../serpent_shrine/serpent_shrine.h | 31 + .../slave_pens/boss_rokmar.cpp | 66 + .../steam_vault/boss_hydromancer_thespia.cpp | 194 + .../boss_mekgineer_steamrigger.cpp | 279 ++ .../steam_vault/boss_warlord_kalithresh.cpp | 208 + .../steam_vault/instance_steam_vault.cpp | 204 + .../steam_vault/steam_vault.h | 16 + .../underbog/boss_ghazan.cpp | 79 + .../underbog/boss_hungarfen.cpp | 150 + scripts/outland/gruuls_lair/boss_gruul.cpp | 282 ++ .../gruuls_lair/boss_high_king_maulgar.cpp | 665 +++ scripts/outland/gruuls_lair/gruuls_lair.h | 24 + .../gruuls_lair/instance_gruuls_lair.cpp | 188 + .../blood_furnace/blood_furnace.h | 35 + .../blood_furnace/boss_broggok.cpp | 145 + .../boss_kelidan_the_breaker.cpp | 238 + .../blood_furnace/boss_the_maker.cpp | 149 + .../blood_furnace/instance_blood_furnace.cpp | 256 + .../boss_nazan_and_vazruden.cpp | 290 ++ .../boss_omor_the_unscarred.cpp | 214 + .../boss_watchkeeper_gargolmar.cpp | 164 + .../hellfire_ramparts/hellfire_ramparts.h | 17 + .../instance_hellfire_ramparts.cpp | 124 + .../magtheridons_lair/boss_magtheridon.cpp | 698 +++ .../instance_magtheridons_lair.cpp | 288 ++ .../magtheridons_lair/magtheridons_lair.h | 28 + .../shattered_halls/boss_nethekurse.cpp | 421 ++ .../boss_warbringer_omrogg.cpp | 407 ++ .../boss_warchief_kargath_bladefist.cpp | 292 ++ .../instance_shattered_halls.cpp | 120 + .../shattered_halls/shattered_halls.h | 13 + scripts/outland/hellfire_peninsula.cpp | 816 ++++ scripts/outland/nagrand.cpp | 736 +++ scripts/outland/netherstorm.cpp | 724 +++ scripts/outland/shadowmoon_valley.cpp | 1377 ++++++ scripts/outland/shattrath_city.cpp | 898 ++++ .../tempest_keep/arcatraz/arcatraz.cpp | 515 ++ .../outland/tempest_keep/arcatraz/arcatraz.h | 37 + .../arcatraz/boss_harbinger_skyriss.cpp | 291 ++ .../arcatraz/instance_arcatraz.cpp | 205 + .../botanica/boss_high_botanist_freywinn.cpp | 190 + .../tempest_keep/botanica/boss_laj.cpp | 194 + .../botanica/boss_warp_splinter.cpp | 241 + .../tempest_keep/the_eye/boss_astromancer.cpp | 471 ++ .../tempest_keep/the_eye/boss_kaelthas.cpp | 1531 ++++++ .../tempest_keep/the_eye/boss_void_reaver.cpp | 181 + .../tempest_keep/the_eye/instance_the_eye.cpp | 161 + .../outland/tempest_keep/the_eye/the_eye.cpp | 94 + .../outland/tempest_keep/the_eye/the_eye.h | 27 + .../boss_gatewatcher_gyrokill.cpp | 37 + .../boss_gatewatcher_ironhand.cpp | 136 + .../boss_nethermancer_sepethrea.cpp | 247 + .../boss_pathaleon_the_calculator.cpp | 239 + .../the_mechanar/instance_mechanar.cpp | 69 + .../tempest_keep/the_mechanar/mechanar.h | 15 + scripts/outland/terokkar_forest.cpp | 940 ++++ scripts/outland/zangarmarsh.cpp | 415 ++ scripts/world/areatrigger_scripts.cpp | 146 + scripts/world/boss_emeriss.cpp | 142 + scripts/world/boss_lethon.cpp | 24 + scripts/world/boss_taerar.cpp | 262 + scripts/world/boss_ysondre.cpp | 200 + scripts/world/go_scripts.cpp | 484 ++ scripts/world/guards.cpp | 4040 ++++++++++++++++ scripts/world/item_scripts.cpp | 181 + scripts/world/mob_generic_creature.cpp | 172 + scripts/world/npc_innkeeper.cpp | 144 + scripts/world/npc_professions.cpp | 1341 ++++++ scripts/world/npcs_special.cpp | 1411 ++++++ sql/Makefile.am | 32 + sql/Updates/0.0.1/09_BraveWindfeather.sql | 1 + sql/Updates/0.0.1/11_SilvaFilnaveth.sql | 1 + sql/Updates/0.0.1/27_Vaelastraz.sql | 2 + sql/Updates/0.0.1/Makefile.am | 29 + sql/Updates/0.0.2/Makefile.am | 270 ++ sql/Updates/0.0.2/r104.sql | 1 + sql/Updates/0.0.2/r108.sql | 1 + sql/Updates/0.0.2/r110.sql | 1 + sql/Updates/0.0.2/r121.sql | 2 + sql/Updates/0.0.2/r123.sql | 4 + sql/Updates/0.0.2/r124.sql | 13 + sql/Updates/0.0.2/r125.sql | 24 + sql/Updates/0.0.2/r128.sql | 1 + sql/Updates/0.0.2/r131.sql | 1 + sql/Updates/0.0.2/r134.sql | 15 + sql/Updates/0.0.2/r136.sql | 55 + sql/Updates/0.0.2/r139.sql | 35 + sql/Updates/0.0.2/r142.sql | 11 + sql/Updates/0.0.2/r144.sql | 5 + sql/Updates/0.0.2/r145.sql | 4 + sql/Updates/0.0.2/r149.sql | 1 + sql/Updates/0.0.2/r150.sql | 19 + sql/Updates/0.0.2/r152.sql | 12 + sql/Updates/0.0.2/r153.sql | 33 + sql/Updates/0.0.2/r157.sql | 7 + sql/Updates/0.0.2/r161.sql | 12 + sql/Updates/0.0.2/r163.sql | 2 + sql/Updates/0.0.2/r164.sql | 10 + sql/Updates/0.0.2/r165.sql | 8 + sql/Updates/0.0.2/r169.sql | 4 + sql/Updates/0.0.2/r170.sql | 2 + sql/Updates/0.0.2/r171.sql | 2 + sql/Updates/0.0.2/r172.sql | 3 + sql/Updates/0.0.2/r174.sql | 8 + sql/Updates/0.0.2/r176.sql | 5 + sql/Updates/0.0.2/r177.sql | 2 + sql/Updates/0.0.2/r178.sql | 2 + sql/Updates/0.0.2/r181.sql | 2 + sql/Updates/0.0.2/r182.sql | 2 + sql/Updates/0.0.2/r183.sql | 5 + sql/Updates/0.0.2/r184.sql | 2 + sql/Updates/0.0.2/r186.sql | 2 + sql/Updates/0.0.2/r187.sql | 12 + sql/Updates/0.0.2/r189.sql | 3 + sql/Updates/0.0.2/r191.sql | 5 + sql/Updates/0.0.2/r192.sql | 9 + sql/Updates/0.0.2/r197.sql | 5 + sql/Updates/0.0.2/r204.sql | 7 + sql/Updates/0.0.2/r206.sql | 16 + sql/Updates/0.0.2/r211.sql | 6 + sql/Updates/0.0.2/r213.sql | 11 + sql/Updates/0.0.2/r214.sql | 2 + sql/Updates/0.0.2/r215.sql | 1 + sql/Updates/0.0.2/r218.sql | 5 + sql/Updates/0.0.2/r219.sql | 3 + sql/Updates/0.0.2/r221_scriptdev2.sql | 1 + sql/Updates/0.0.2/r227_scriptdev2.sql | 28 + sql/Updates/0.0.2/r230_mangos.sql | 2 + sql/Updates/0.0.2/r234_mangos.sql | 2 + sql/Updates/0.0.2/r237_mangos.sql | 6 + sql/Updates/0.0.2/r238_mangos.sql | 2 + sql/Updates/0.0.2/r239_mangos.sql | 1 + sql/Updates/0.0.2/r240_scriptdev2.sql | 2 + sql/Updates/0.0.2/r241_mangos.sql | 2 + sql/Updates/0.0.2/r242_mangos.sql | 2 + sql/Updates/0.0.2/r243_mangos.sql | 1 + sql/Updates/0.0.2/r249_mangos.sql | 3 + sql/Updates/0.0.2/r250_mangos.sql | 1 + sql/Updates/0.0.2/r253_mangos.sql | 1 + sql/Updates/0.0.2/r255_mangos.sql | 5 + sql/Updates/0.0.2/r256_mangos.sql | 35 + sql/Updates/0.0.2/r257_mangos.sql | 4 + sql/Updates/0.0.2/r258_mangos.sql | 1 + sql/Updates/0.0.2/r260_mangos.sql | 1 + sql/Updates/0.0.2/r261_mangos.sql | 1 + sql/Updates/0.0.2/r262_mangos.sql | 3 + sql/Updates/0.0.2/r263_mangos.sql | 3 + sql/Updates/0.0.2/r264_mangos.sql | 1 + sql/Updates/0.0.2/r265_mangos.sql | 9 + sql/Updates/0.0.2/r269_mangos.sql | 6 + sql/Updates/0.0.2/r270_mangos.sql | 1 + sql/Updates/0.0.2/r271_mangos.sql | 1 + sql/Updates/0.0.2/r272_mangos.sql | 8 + sql/Updates/0.0.2/r273_mangos.sql | 1 + sql/Updates/0.0.2/r274_mangos.sql | 1 + sql/Updates/0.0.2/r275_mangos.sql | 1 + sql/Updates/0.0.2/r281_scriptdev2.sql | 35 + sql/Updates/0.0.2/r282_mangos.sql | 38 + sql/Updates/0.0.2/r286_mangos.sql | 2 + sql/Updates/0.0.2/r289_mangos.sql | 1 + sql/Updates/0.0.2/r291_mangos.sql | 1 + sql/Updates/0.0.2/r295_mangos.sql | 2 + sql/Updates/0.0.2/r297_mangos.sql | 1 + sql/Updates/0.0.2/r298_scriptdev2.sql | 2 + sql/Updates/0.0.2/r299_scriptdev2.sql | 9 + sql/Updates/0.0.2/r304_mangos.sql | 1 + sql/Updates/0.0.2/r306_scriptdev2.sql | 4 + sql/Updates/0.0.2/r307_mangos.sql | 4 + sql/Updates/0.0.2/r308_mangos.sql | 1 + sql/Updates/0.0.2/r309_mangos.sql | 1 + sql/Updates/0.0.2/r311_mangos.sql | 1 + sql/Updates/0.0.2/r312_mangos.sql | 2 + sql/Updates/0.0.2/r318_mangos.sql | 1 + sql/Updates/0.0.2/r324_mangos.sql | 3 + sql/Updates/0.0.2/r327_mangos.sql | 5 + sql/Updates/0.0.2/r332_scriptdev2.sql | 2 + sql/Updates/0.0.2/r333_mangos.sql | 1 + sql/Updates/0.0.2/r334_mangos.sql | 1 + sql/Updates/0.0.2/r336_mangos.sql | 9 + sql/Updates/0.0.2/r352_mangos.sql | 23 + sql/Updates/0.0.2/r355_mangos.sql | 23 + sql/Updates/0.0.2/r358_mangos.sql | 1 + sql/Updates/0.0.2/r364_mangos.sql | 7 + sql/Updates/0.0.2/r367_mangos.sql | 1 + sql/Updates/0.0.2/r368_mangos.sql | 5 + sql/Updates/0.0.2/r369_mangos.sql | 5 + sql/Updates/0.0.2/r374_mangos.sql | 1 + sql/Updates/0.0.2/r386_mangos.sql | 7 + sql/Updates/0.0.2/r417_mangos.sql | 1 + sql/Updates/0.0.2/r428_mangos.sql | 4 + sql/Updates/0.0.2/r431_mangos.sql | 4 + sql/Updates/0.0.2/r444_mangos.sql | 5 + sql/Updates/0.0.2/r445_mangos.sql | 2 + sql/Updates/0.0.2/r446_mangos.sql | 2 + sql/Updates/0.0.2/r448_scriptdev2.sql | 5 + sql/Updates/0.0.2/r462_mangos.sql | 2 + sql/Updates/0.0.2/r465_mangos.sql | 3 + sql/Updates/0.0.2/r467_mangos.sql | 1 + sql/Updates/0.0.2/r473_mangos.sql | 3 + sql/Updates/0.0.2/r476_mangos.sql | 1 + sql/Updates/0.0.2/r477_mangos.sql | 1 + sql/Updates/0.0.2/r479_mangos.sql | 1 + sql/Updates/0.0.2/r482_mangos.sql | 1 + sql/Updates/0.0.2/r484_mangos.sql | 8 + sql/Updates/0.0.2/r486_mangos.sql | 1 + sql/Updates/0.0.2/r487_mangos.sql | 1 + sql/Updates/0.0.2/r494_mangos.sql | 1 + sql/Updates/0.0.2/r501_mangos.sql | 4 + sql/Updates/0.0.2/r513_mangos.sql | 1 + sql/Updates/0.0.2/r514_mangos.sql | 3 + sql/Updates/0.0.2/r515_mangos.sql | 1 + sql/Updates/0.0.2/r516_mangos.sql | 3 + sql/Updates/0.0.2/r517_mangos.sql | 1 + sql/Updates/0.0.2/r518_mangos.sql | 1 + sql/Updates/0.0.2/r519_mangos.sql | 1 + sql/Updates/0.0.2/r520_mangos.sql | 2 + sql/Updates/0.0.2/r521_mangos.sql | 1 + sql/Updates/0.0.2/r522_mangos.sql | 2 + sql/Updates/0.0.2/r526_mangos.sql | 1 + sql/Updates/0.0.2/r528_mangos.sql | 2 + sql/Updates/0.0.2/r533_mangos.sql | 1 + sql/Updates/0.0.2/r538_scriptdev2.sql | 60 + sql/Updates/0.0.2/r547_mangos.sql | 22 + sql/Updates/0.0.2/r554_mangos.sql | 3 + sql/Updates/0.0.2/r555_mangos.sql | 2 + sql/Updates/0.0.2/r56.sql | 2 + sql/Updates/0.0.2/r575_mangos.sql | 1 + sql/Updates/0.0.2/r576_mangos.sql | 1 + sql/Updates/0.0.2/r578_mangos.sql | 1 + sql/Updates/0.0.2/r584_mangos.sql | 1 + sql/Updates/0.0.2/r59.sql | 3 + sql/Updates/0.0.2/r590_mangos.sql | 2 + sql/Updates/0.0.2/r591_mangos.sql | 1 + sql/Updates/0.0.2/r593_mangos.sql | 1 + sql/Updates/0.0.2/r594_mangos.sql | 1 + sql/Updates/0.0.2/r596_mangos.sql | 1 + sql/Updates/0.0.2/r610_mangos.sql | 2 + sql/Updates/0.0.2/r615_scriptdev2.sql | 4 + sql/Updates/0.0.2/r617_mangos.sql | 1 + sql/Updates/0.0.2/r621_mangos.sql | 1 + sql/Updates/0.0.2/r628_mangos.sql | 3 + sql/Updates/0.0.2/r63.sql | 1 + sql/Updates/0.0.2/r632_mangos.sql | 2 + sql/Updates/0.0.2/r633_mangos.sql | 1 + sql/Updates/0.0.2/r634_scriptdev2.sql | 35 + sql/Updates/0.0.2/r636_mangos.sql | 1 + sql/Updates/0.0.2/r637_mangos.sql | 1 + sql/Updates/0.0.2/r638_mangos.sql | 2 + sql/Updates/0.0.2/r639_mangos.sql | 1 + sql/Updates/0.0.2/r642_mangos.sql | 1 + sql/Updates/0.0.2/r643_mangos.sql | 2 + sql/Updates/0.0.2/r646_mangos.sql | 1 + sql/Updates/0.0.2/r647_scriptdev2.sql | 10 + sql/Updates/0.0.2/r65.sql | 2 + sql/Updates/0.0.2/r656_scriptdev2.sql | 5 + sql/Updates/0.0.2/r658_mangos.sql | 1 + sql/Updates/0.0.2/r659_mangos.sql | 4 + sql/Updates/0.0.2/r681_scriptdev2.sql | 43 + sql/Updates/0.0.2/r695_scriptdev2.sql | 62 + .../0.0.2/r699_scriptdev2_script_texts.sql | 1 + .../0.0.2/r700_scriptdev2_script_texts.sql | 81 + .../0.0.2/r701_scriptdev2_script_texts.sql | 33 + .../0.0.2/r702_scriptdev2_script_texts.sql | 46 + .../0.0.2/r703_scriptdev2_script_texts.sql | 58 + .../0.0.2/r704_scriptdev2_script_texts.sql | 26 + .../0.0.2/r705_scriptdev2_script_texts.sql | 100 + sql/Updates/0.0.2/r706_mangos.sql | 3 + .../0.0.2/r707_scriptdev2_script_texts.sql | 128 + .../0.0.2/r709_scriptdev2_script_texts.sql | 93 + .../0.0.2/r710_scriptdev2_script_texts.sql | 32 + .../0.0.2/r713_scriptdev2_script_texts.sql | 38 + .../0.0.2/r715_scriptdev2_script_texts.sql | 3 + sql/Updates/0.0.2/r72.sql | 4 + .../0.0.2/r725_scriptdev2_script_texts.sql | 26 + .../0.0.2/r726_scriptdev2_script_texts.sql | 26 + .../0.0.2/r727_scriptdev2_script_texts.sql | 45 + .../0.0.2/r728_scriptdev2_script_texts.sql | 12 + .../0.0.2/r729_scriptdev2_script_texts.sql | 99 + .../0.0.2/r730_scriptdev2_script_texts.sql | 21 + .../0.0.2/r732_scriptdev2_script_texts.sql | 50 + sql/Updates/0.0.2/r735_mangos.sql | 1 + .../0.0.2/r735_scriptdev2_script_texts.sql | 7 + sql/Updates/0.0.2/r740_mangos.sql | 1 + .../0.0.2/r740_scriptdev2_script_texts.sql | 7 + sql/Updates/0.0.2/r743_mangos.sql | 1 + .../0.0.2/r743_scriptdev2_script_texts.sql | 8 + .../0.0.2/r745_scriptdev2_script_texts.sql | 28 + .../0.0.2/r747_scriptdev2_script_texts.sql | 3 + .../0.0.2/r751_scriptdev2_script_texts.sql | 20 + .../0.0.2/r755_scriptdev2_script_texts.sql | 15 + sql/Updates/0.0.2/r757_mangos.sql | 1 + .../0.0.2/r757_scriptdev2_script_texts.sql | 8 + sql/Updates/0.0.2/r764_mangos.sql | 1 + .../0.0.2/r764_scriptdev2_script_texts.sql | 5 + sql/Updates/0.0.2/r766_mangos.sql | 1 + .../0.0.2/r766_scriptdev2_script_texts.sql | 7 + sql/Updates/0.0.2/r767_mangos.sql | 1 + .../0.0.2/r768_scriptdev2_script_texts.sql | 8 + sql/Updates/0.0.2/r769_mangos.sql | 2 + .../0.0.2/r771_scriptdev2_script_texts.sql | 14 + sql/Updates/0.0.2/r772_mangos.sql | 1 + sql/Updates/0.0.2/r777_mangos.sql | 3 + sql/Updates/0.0.2/r778_mangos.sql | 1 + sql/Updates/0.0.2/r779_mangos.sql | 3 + .../0.0.2/r779_scriptdev2_script_texts.sql | 4 + sql/Updates/0.0.2/r78.sql | 3 + sql/Updates/0.0.2/r782_mangos.sql | 1 + sql/Updates/0.0.2/r783_mangos.sql | 3 + .../0.0.2/r783_scriptdev2_script_texts.sql | 7 + sql/Updates/0.0.2/r790_mangos.sql | 4 + sql/Updates/0.0.2/r794_mangos.sql | 5 + .../0.0.2/r796_scriptdev2_script_texts.sql | 13 + sql/Updates/0.0.2/r802_mangos.sql | 4 + sql/Updates/0.0.2/r804_mangos.sql | 4 + .../0.0.2/r804_scriptdev2_script_texts.sql | 12 + sql/Updates/0.0.2/r809_mangos.sql | 2 + .../0.0.2/r809_scriptdev2_script_texts.sql | 4 + sql/Updates/0.0.2/r81.sql | 17 + sql/Updates/0.0.2/r810_mangos.sql | 2 + sql/Updates/0.0.2/r91.sql | 2 + sql/Updates/0.0.2/r92.sql | 1 + sql/Updates/0.0.2/r97.sql | 1 + sql/Updates/0.0.3/Makefile.am | 304 ++ sql/Updates/0.0.3/r1002_scriptdev2.sql | 1 + sql/Updates/0.0.3/r1006_scriptdev2.sql | 1 + sql/Updates/0.0.3/r1008_mangos.sql | 1 + sql/Updates/0.0.3/r1008_scriptdev2.sql | 36 + sql/Updates/0.0.3/r1009_scriptdev2.sql | 1 + sql/Updates/0.0.3/r1010_mangos.sql | 1 + sql/Updates/0.0.3/r1010_scriptdev2.sql | 1 + sql/Updates/0.0.3/r1012_mangos.sql | 1 + sql/Updates/0.0.3/r1012_scriptdev2.sql | 5 + sql/Updates/0.0.3/r1014_mangos.sql | 1 + sql/Updates/0.0.3/r1014_scriptdev2.sql | 5 + sql/Updates/0.0.3/r1016_scriptdev2.sql | 1 + sql/Updates/0.0.3/r1023_scriptdev2.sql | 1 + sql/Updates/0.0.3/r1025_mangos.sql | 1 + sql/Updates/0.0.3/r1030_scriptdev2.sql | 1 + sql/Updates/0.0.3/r1032_mangos.sql | 2 + sql/Updates/0.0.3/r1032_scriptdev2.sql | 3 + sql/Updates/0.0.3/r1039_mangos.sql | 1 + sql/Updates/0.0.3/r1056_scriptdev2.sql | 15 + sql/Updates/0.0.3/r1058_mangos.sql | 1 + sql/Updates/0.0.3/r1058_scriptdev2.sql | 1 + sql/Updates/0.0.3/r1062_mangos.sql | 1 + sql/Updates/0.0.3/r1067_mangos.sql | 8 + sql/Updates/0.0.3/r1068_mangos.sql | 3 + sql/Updates/0.0.3/r1068_scriptdev2.sql | 85 + sql/Updates/0.0.3/r1069_mangos.sql | 1 + sql/Updates/0.0.3/r1073_mangos.sql | 1 + sql/Updates/0.0.3/r1074_scriptdev2.sql | 1 + sql/Updates/0.0.3/r1075_mangos.sql | 3 + sql/Updates/0.0.3/r1080_scriptdev2.sql | 1 + sql/Updates/0.0.3/r1082_mangos.sql | 1 + sql/Updates/0.0.3/r1098_scriptdev2.sql | 45 + sql/Updates/0.0.3/r1099_mangos.sql | 1 + sql/Updates/0.0.3/r1100_mangos.sql | 8 + sql/Updates/0.0.3/r1103_mangos.sql | 1 + sql/Updates/0.0.3/r1104_scriptdev2.sql | 1 + sql/Updates/0.0.3/r1106_mangos.sql | 1 + sql/Updates/0.0.3/r1112_mangos.sql | 1 + sql/Updates/0.0.3/r1116_mangos.sql | 2 + sql/Updates/0.0.3/r1119_mangos.sql | 4 + sql/Updates/0.0.3/r1119_scriptdev2.sql | 23 + sql/Updates/0.0.3/r1120_scriptdev2.sql | 1 + sql/Updates/0.0.3/r1121_mangos.sql | 4 + sql/Updates/0.0.3/r1121_scriptdev2.sql | 23 + sql/Updates/0.0.3/r1123_scriptdev2.sql | 3 + sql/Updates/0.0.3/r1128_mangos.sql | 14 + sql/Updates/0.0.3/r1129_mangos.sql | 1 + sql/Updates/0.0.3/r1129_scriptdev2.sql | 1 + sql/Updates/0.0.3/r1131_mangos.sql | 2 + sql/Updates/0.0.3/r1136_mangos.sql | 3 + sql/Updates/0.0.3/r1136_scriptdev2.sql | 18 + sql/Updates/0.0.3/r1140_scriptdev2.sql | 1 + sql/Updates/0.0.3/r1141_mangos.sql | 1 + sql/Updates/0.0.3/r1145_scriptdev2.sql | 3 + sql/Updates/0.0.3/r1146_scriptdev2.sql | 1 + sql/Updates/0.0.3/r1149_scriptdev2.sql | 1 + sql/Updates/0.0.3/r1152_scriptdev2.sql | 1 + sql/Updates/0.0.3/r1154_mangos.sql | 1 + sql/Updates/0.0.3/r1155_mangos.sql | 1 + sql/Updates/0.0.3/r1169_mangos.sql | 1 + sql/Updates/0.0.3/r1169_scriptdev2.sql | 8 + sql/Updates/0.0.3/r1171_scriptdev2.sql | 1 + sql/Updates/0.0.3/r1173_scriptdev2.sql | 5 + sql/Updates/0.0.3/r1180_mangos.sql | 1 + sql/Updates/0.0.3/r1184_mangos.sql | 1 + sql/Updates/0.0.3/r1197_mangos.sql | 5 + sql/Updates/0.0.3/r1199_mangos.sql | 2 + sql/Updates/0.0.3/r1202_mangos.sql | 1 + sql/Updates/0.0.3/r1202_scriptdev2.sql | 56 + sql/Updates/0.0.3/r1207_mangos.sql | 9 + sql/Updates/0.0.3/r1207_scriptdev2.sql | 45 + sql/Updates/0.0.3/r1210_mangos.sql | 1 + sql/Updates/0.0.3/r1212_mangos.sql | 1 + sql/Updates/0.0.3/r1212_scriptdev2.sql | 27 + sql/Updates/0.0.3/r1215_mangos.sql | 1 + sql/Updates/0.0.3/r1215_scriptdev2.sql | 26 + sql/Updates/0.0.3/r1218_scriptdev2.sql | 57 + sql/Updates/0.0.3/r1221_mangos.sql | 4 + sql/Updates/0.0.3/r1221_scriptdev2.sql | 1 + sql/Updates/0.0.3/r1222_scriptdev2.sql | 12 + sql/Updates/0.0.3/r1234_mangos.sql | 1 + sql/Updates/0.0.3/r1241_scriptdev2.sql | 4 + sql/Updates/0.0.3/r1242_mangos.sql | 1 + sql/Updates/0.0.3/r1242_scriptdev2.sql | 36 + sql/Updates/0.0.3/r1243_mangos.sql | 1 + sql/Updates/0.0.3/r1243_scriptdev2.sql | 56 + sql/Updates/0.0.3/r1249_mangos.sql | 1 + sql/Updates/0.0.3/r1249_scriptdev2.sql | 70 + sql/Updates/0.0.3/r1250_mangos.sql | 1 + sql/Updates/0.0.3/r1250_scriptdev2.sql | 66 + sql/Updates/0.0.3/r1251_scriptdev2.sql | 11 + sql/Updates/0.0.3/r1257_scriptdev2.sql | 4 + sql/Updates/0.0.3/r1258_mangos.sql | 1 + sql/Updates/0.0.3/r1258_scriptdev2.sql | 10 + sql/Updates/0.0.3/r1260_scriptdev2.sql | 6 + sql/Updates/0.0.3/r1261_mangos.sql | 1 + sql/Updates/0.0.3/r1263_mangos.sql | 1 + sql/Updates/0.0.3/r1265_mangos.sql | 1 + sql/Updates/0.0.3/r1265_scriptdev2.sql | 36 + sql/Updates/0.0.3/r1266_mangos.sql | 1 + sql/Updates/0.0.3/r1266_scriptdev2.sql | 8 + sql/Updates/0.0.3/r1280_mangos.sql | 1 + sql/Updates/0.0.3/r1280_scriptdev2.sql | 7 + sql/Updates/0.0.3/r1281_mangos.sql | 1 + sql/Updates/0.0.3/r1282_mangos.sql | 1 + sql/Updates/0.0.3/r1283_mangos.sql | 1 + sql/Updates/0.0.3/r1299_scriptdev2.sql | 1 + sql/Updates/0.0.3/r1300_mangos.sql | 1 + sql/Updates/0.0.3/r1307_mangos.sql | 1 + sql/Updates/0.0.3/r1317_mangos.sql | 2 + sql/Updates/0.0.3/r1317_scriptdev2.sql | 9 + sql/Updates/0.0.3/r1321_mangos.sql | 1 + sql/Updates/0.0.3/r1321_scriptdev2.sql | 74 + sql/Updates/0.0.3/r1322_scriptdev2.sql | 1 + sql/Updates/0.0.3/r1326_scriptdev2.sql | 27 + sql/Updates/0.0.3/r1333_mangos.sql | 2 + sql/Updates/0.0.3/r1334_mangos.sql | 2 + sql/Updates/0.0.3/r1335_scriptdev2.sql | 3 + sql/Updates/0.0.3/r1336_mangos.sql | 1 + sql/Updates/0.0.3/r1336_scriptdev2.sql | 1 + sql/Updates/0.0.3/r1341_scriptdev2.sql | 11 + sql/Updates/0.0.3/r1351_mangos.sql | 1 + sql/Updates/0.0.3/r1351_scriptdev2.sql | 21 + sql/Updates/0.0.3/r1352_mangos.sql | 1 + sql/Updates/0.0.3/r1352_scriptdev2.sql | 13 + sql/Updates/0.0.3/r1354_scriptdev2.sql | 3 + sql/Updates/0.0.3/r1358_mangos.sql | 1 + sql/Updates/0.0.3/r1359_mangos.sql | 1 + sql/Updates/0.0.3/r1359_scriptdev2.sql | 51 + sql/Updates/0.0.3/r1367_mangos.sql | 1 + sql/Updates/0.0.3/r1368_mangos.sql | 1 + sql/Updates/0.0.3/r1369_mangos.sql | 1 + sql/Updates/0.0.3/r1370_mangos.sql | 1 + sql/Updates/0.0.3/r1371_scriptdev2.sql | 1 + sql/Updates/0.0.3/r1374_mangos.sql | 1 + sql/Updates/0.0.3/r1374_scriptdev2.sql | 48 + sql/Updates/0.0.3/r1378_mangos.sql | 2 + sql/Updates/0.0.3/r1378_scriptdev2.sql | 7 + sql/Updates/0.0.3/r1379_mangos.sql | 1 + sql/Updates/0.0.3/r1379_scriptdev2.sql | 29 + sql/Updates/0.0.3/r1380_mangos.sql | 1 + sql/Updates/0.0.3/r1380_scriptdev2.sql | 32 + sql/Updates/0.0.3/r1382_mangos.sql | 1 + sql/Updates/0.0.3/r1383_scriptdev2.sql | 1 + sql/Updates/0.0.3/r1384_scriptdev2.sql | 88 + sql/Updates/0.0.3/r1385_mangos.sql | 1 + sql/Updates/0.0.3/r1385_scriptdev2.sql | 59 + sql/Updates/0.0.3/r1386_mangos.sql | 1 + sql/Updates/0.0.3/r1386_scriptdev2.sql | 15 + sql/Updates/0.0.3/r1388_mangos.sql | 2 + sql/Updates/0.0.3/r1388_scriptdev2.sql | 45 + sql/Updates/0.0.3/r1391_mangos.sql | 1 + sql/Updates/0.0.3/r1391_scriptdev2.sql | 50 + sql/Updates/0.0.3/r1392_mangos.sql | 2 + sql/Updates/0.0.3/r1392_scriptdev2.sql | 11 + sql/Updates/0.0.3/r1394_mangos.sql | 2 + sql/Updates/0.0.3/r1394_scriptdev2.sql | 4 + sql/Updates/0.0.3/r1405_mangos.sql | 4 + sql/Updates/0.0.3/r1405_scriptdev2.sql | 43 + sql/Updates/0.0.3/r1406_mangos.sql | 1 + sql/Updates/0.0.3/r1408_mangos.sql | 4 + sql/Updates/0.0.3/r1408_scriptdev2.sql | 31 + sql/Updates/0.0.3/r1409_mangos.sql | 3 + sql/Updates/0.0.3/r1409_scriptdev2.sql | 22 + sql/Updates/0.0.3/r1410_mangos.sql | 1 + sql/Updates/0.0.3/r1410_scriptdev2.sql | 3 + sql/Updates/0.0.3/r1411_mangos.sql | 2 + sql/Updates/0.0.3/r1411_scriptdev2.sql | 14 + sql/Updates/0.0.3/r1412_mangos.sql | 1 + sql/Updates/0.0.3/r1412_scriptdev2.sql | 89 + sql/Updates/0.0.3/r1413_mangos.sql | 3 + sql/Updates/0.0.3/r1413_scriptdev2.sql | 28 + sql/Updates/0.0.3/r1414_mangos.sql | 5 + sql/Updates/0.0.3/r1414_scriptdev2.sql | 42 + sql/Updates/0.0.3/r1415_mangos.sql | 1 + sql/Updates/0.0.3/r1417_mangos.sql | 1 + sql/Updates/0.0.3/r1418_scriptdev2.sql | 1 + sql/Updates/0.0.3/r1419_mangos.sql | 2 + sql/Updates/0.0.3/r1421_scriptdev2.sql | 2 + sql/Updates/0.0.3/r1422_mangos.sql | 1 + sql/Updates/0.0.3/r1422_scriptdev2.sql | 1 + sql/Updates/0.0.3/r1428_scriptdev2.sql | 1 + sql/Updates/0.0.3/r1430_mangos.sql | 1 + sql/Updates/0.0.3/r1433_mangos.sql | 2 + sql/Updates/0.0.3/r1435_mangos.sql | 5 + sql/Updates/0.0.3/r1436_mangos.sql | 1 + sql/Updates/0.0.3/r1437_scriptdev2.sql | 10 + sql/Updates/0.0.3/r1439_scriptdev2.sql | 4 + sql/Updates/0.0.3/r1441_mangos.sql | 2 + .../0.0.3/r814_scriptdev2_eventai_scripts.sql | 18 + .../0.0.3/r820_scriptdev2_script_texts.sql | 42 + sql/Updates/0.0.3/r822_mangos.sql | 2 + .../0.0.3/r822_scriptdev2_script_texts.sql | 37 + .../0.0.3/r823_scriptdev2_script_texts.sql | 36 + sql/Updates/0.0.3/r824_mangos.sql | 1 + .../0.0.3/r824_scriptdev2_script_texts.sql | 9 + .../0.0.3/r825_scriptdev2_script_texts.sql | 2 + sql/Updates/0.0.3/r826_scriptdev2.sql | 3 + sql/Updates/0.0.3/r827_mangos.sql | 1 + sql/Updates/0.0.3/r828_mangos.sql | 5 + sql/Updates/0.0.3/r834_mangos.sql | 1 + .../0.0.3/r834_scriptdev2_script_texts.sql | 3 + sql/Updates/0.0.3/r835_mangos.sql | 1 + sql/Updates/0.0.3/r845_mangos.sql | 2 + sql/Updates/0.0.3/r846_scriptdev2.sql | 3 + .../0.0.3/r847_scriptdev2_script_texts.sql | 8 + .../0.0.3/r848_scriptdev2_script_texts.sql | 21 + .../0.0.3/r849_scriptdev2_script_texts.sql | 16 + sql/Updates/0.0.3/r850_mangos.sql | 2 + .../0.0.3/r851_scriptdev2_script_texts.sql | 23 + .../0.0.3/r852_scriptdev2_script_texts.sql | 13 + .../0.0.3/r854_scriptdev2_script_texts.sql | 41 + .../0.0.3/r855_scriptdev2_script_texts.sql | 26 + .../0.0.3/r856_scriptdev2_script_texts.sql | 35 + .../0.0.3/r860_scriptdev2_script_texts.sql | 28 + .../0.0.3/r862_scriptdev2_script_texts.sql | 16 + sql/Updates/0.0.3/r863_mangos.sql | 1 + sql/Updates/0.0.3/r872_mangos.sql | 1 + sql/Updates/0.0.3/r883_mangos.sql | 1 + sql/Updates/0.0.3/r895_mangos.sql | 1 + sql/Updates/0.0.3/r900_mangos.sql | 1 + sql/Updates/0.0.3/r903_mangos.sql | 2 + .../0.0.3/r903_scriptdev2_script_texts.sql | 5 + sql/Updates/0.0.3/r907_mangos.sql | 2 + .../0.0.3/r907_scriptdev2_script_texts.sql | 24 + sql/Updates/0.0.3/r909_mangos.sql | 1 + .../0.0.3/r910_scriptdev2_script_texts.sql | 16 + sql/Updates/0.0.3/r912_mangos.sql | 1 + .../0.0.3/r912_scriptdev2_script_texts.sql | 12 + sql/Updates/0.0.3/r916_mangos.sql | 1 + .../0.0.3/r916_scriptdev2_script_texts.sql | 8 + sql/Updates/0.0.3/r919_mangos.sql | 1 + .../0.0.3/r922_scriptdev2_script_waypoint.sql | 11 + .../0.0.3/r924_scriptdev2_script_waypoint.sql | 37 + .../0.0.3/r936_scriptdev2_script_waypoint.sql | 288 ++ sql/Updates/0.0.3/r937_mangos.sql | 1 + .../0.0.3/r937_scriptdev2_script_texts.sql | 9 + .../0.0.3/r937_scriptdev2_script_waypoint.sql | 52 + .../0.0.3/r939_scriptdev2_script_texts.sql | 57 + sql/Updates/0.0.3/r940_mangos.sql | 1 + sql/Updates/0.0.3/r941_mangos.sql | 1 + sql/Updates/0.0.3/r945_mangos.sql | 2 + .../0.0.3/r945_scriptdev2_script_texts.sql | 5 + .../0.0.3/r945_scriptdev2_script_waypoint.sql | 6 + sql/Updates/0.0.3/r947_mangos.sql | 4 + .../0.0.3/r949_scriptdev2_script_waypoint.sql | 14 + .../0.0.3/r951_scriptdev2_script_waypoint.sql | 19 + .../0.0.3/r953_scriptdev2_script_waypoint.sql | 142 + sql/Updates/0.0.3/r956_scriptdev2.sql | 27 + sql/Updates/0.0.3/r963_mangos.sql | 1 + sql/Updates/0.0.3/r964_mangos.sql | 2 + sql/Updates/0.0.3/r965_mangos.sql | 1 + sql/Updates/0.0.3/r965_scriptdev2.sql | 46 + sql/Updates/0.0.3/r972_mangos.sql | 1 + sql/Updates/0.0.3/r972_scriptdev2.sql | 29 + sql/Updates/0.0.3/r973_mangos.sql | 1 + .../0.0.3/r973_scriptdev2_script_waypoint.sql | 40 + sql/Updates/0.0.3/r975_mangos.sql | 1 + sql/Updates/0.0.3/r975_scriptdev2.sql | 45 + sql/Updates/0.0.3/r976_mangos.sql | 1 + sql/Updates/0.0.3/r976_scriptdev2.sql | 45 + sql/Updates/0.0.3/r978_mangos.sql | 1 + sql/Updates/0.0.3/r979_mangos.sql | 2 + .../0.0.3/r979_scriptdev2_script_texts.sql | 6 + sql/Updates/0.0.3/r980_mangos.sql | 1 + sql/Updates/0.0.3/r982_mangos.sql | 1 + .../0.0.3/r982_scriptdev2_script_texts.sql | 4 + sql/Updates/0.0.3/r989_mangos.sql | 4 + sql/Updates/0.0.3/r990_mangos.sql | 1 + sql/Updates/0.0.3/r991_scriptdev2.sql | 46 + sql/Updates/0.0.3/r992_mangos.sql | 1 + sql/Updates/0.0.3/r993_mangos.sql | 1 + .../0.0.3/r993_scriptdev2_script_texts.sql | 4 + sql/Updates/0.0.3/r995_mangos.sql | 1 + sql/Updates/0.0.3/r995_scriptdev2.sql | 61 + sql/Updates/0.0.3/r997_mangos.sql | 1 + sql/Updates/0.0.3/r998_mangos.sql | 1 + .../0.0.3/r998_scriptdev2_script_texts.sql | 5 + sql/Updates/Makefile.am | 40 + sql/Updates/r1453_scriptdev2.sql | 6 + sql/Updates/r1457_scriptdev2.sql | 5 + sql/Updates/r1459_mangos.sql | 1 + sql/Updates/r1460_mangos.sql | 1 + sql/Updates/r1461_mangos.sql | 1 + sql/Updates/r1461_scriptdev2.sql | 3 + sql/Updates/r1463_mangos.sql | 4 + sql/Updates/r1465_scriptdev2.sql | 1 + sql/Updates/r1466_scriptdev2.sql | 1 + sql/Updates/r1470_scriptdev2.sql | 12 + sql/Updates/r1473_scriptdev2.sql | 1 + sql/Updates/r1474_scriptdev2.sql | 1 + sql/Updates/r1476_mangos.sql | 1 + sql/Updates/r1476_scriptdev2.sql | 15 + sql/mangos_scriptname_full.sql | 1167 +++++ sql/old/mangos_old_spells.sql | 374 ++ .../mangos_optional_generic_creature.sql | 283 ++ sql/scriptdev2_create_database.sql | 4 + sql/scriptdev2_create_structure_mysql.sql | 56 + sql/scriptdev2_create_structure_pgsql.sql | 52 + sql/scriptdev2_script_full.sql | 4198 +++++++++++++++++ system/ScriptLoader.cpp | 776 +++ system/ScriptLoader.h | 10 + system/system.cpp | 242 + system/system.h | 103 + tool/VCProjToLinuxMake.exe | Bin 0 -> 32768 bytes 1017 files changed, 131092 insertions(+) create mode 100644 LICENSE.txt create mode 100644 Makefile.am create mode 100644 ScriptMgr.cpp create mode 100644 ScriptMgr.h create mode 100644 VC80/80ScriptDev2.vcproj create mode 100644 VC90/90ScriptDev2.vcproj create mode 100644 base/escort_ai.cpp create mode 100644 base/escort_ai.h create mode 100644 base/follower_ai.cpp create mode 100644 base/follower_ai.h create mode 100644 base/guard_ai.cpp create mode 100644 base/guard_ai.h create mode 100644 base/simple_ai.cpp create mode 100644 base/simple_ai.h create mode 100644 config.h create mode 100644 config.h.in create mode 100644 docs/How to install.txt create mode 100644 docs/LICENSE.txt create mode 100644 docs/Script Layout.txt create mode 100644 docs/Text-tables.txt create mode 100644 docs/ToDo.txt create mode 100644 include/precompiled.cpp create mode 100644 include/precompiled.h create mode 100644 include/sc_creature.cpp create mode 100644 include/sc_creature.h create mode 100644 include/sc_gossip.h create mode 100644 include/sc_grid_searchers.cpp create mode 100644 include/sc_grid_searchers.h create mode 100644 include/sc_instance.cpp create mode 100644 include/sc_instance.h create mode 100644 patches/MaNGOS-8273-ScriptDev2.patch create mode 100644 patches/custom/ScriptDev2_1318_to_MaNGOS_0.12.patch create mode 100644 scriptVC80.sln create mode 100644 scriptVC90.sln create mode 100644 scriptdev2.conf.dist.in create mode 100644 scripts/battlegrounds/battleground.cpp create mode 100644 scripts/eastern_kingdoms/alterac_mountains.cpp create mode 100644 scripts/eastern_kingdoms/arathi_highlands.cpp create mode 100644 scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp create mode 100644 scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h create mode 100644 scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp create mode 100644 scripts/eastern_kingdoms/blackrock_depths/boss_anubshiah.cpp create mode 100644 scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp create mode 100644 scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp create mode 100644 scripts/eastern_kingdoms/blackrock_depths/boss_gorosh_the_dervish.cpp create mode 100644 scripts/eastern_kingdoms/blackrock_depths/boss_grizzle.cpp create mode 100644 scripts/eastern_kingdoms/blackrock_depths/boss_high_interrogator_gerstahn.cpp create mode 100644 scripts/eastern_kingdoms/blackrock_depths/boss_magmus.cpp create mode 100644 scripts/eastern_kingdoms/blackrock_depths/boss_tomb_of_seven.cpp create mode 100644 scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp create mode 100644 scripts/eastern_kingdoms/blackrock_spire/boss_drakkisath.cpp create mode 100644 scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp create mode 100644 scripts/eastern_kingdoms/blackrock_spire/boss_halycon.cpp create mode 100644 scripts/eastern_kingdoms/blackrock_spire/boss_highlord_omokk.cpp create mode 100644 scripts/eastern_kingdoms/blackrock_spire/boss_mother_smolderweb.cpp create mode 100644 scripts/eastern_kingdoms/blackrock_spire/boss_overlord_wyrmthalak.cpp create mode 100644 scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp create mode 100644 scripts/eastern_kingdoms/blackrock_spire/boss_quartermaster_zigris.cpp create mode 100644 scripts/eastern_kingdoms/blackrock_spire/boss_rend_blackhand.cpp create mode 100644 scripts/eastern_kingdoms/blackrock_spire/boss_shadow_hunter_voshgajin.cpp create mode 100644 scripts/eastern_kingdoms/blackrock_spire/boss_the_beast.cpp create mode 100644 scripts/eastern_kingdoms/blackrock_spire/boss_warmaster_voone.cpp create mode 100644 scripts/eastern_kingdoms/blackwing_lair/boss_broodlord_lashlayer.cpp create mode 100644 scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp create mode 100644 scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp create mode 100644 scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp create mode 100644 scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp create mode 100644 scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp create mode 100644 scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp create mode 100644 scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp create mode 100644 scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp create mode 100644 scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp create mode 100644 scripts/eastern_kingdoms/blasted_lands.cpp create mode 100644 scripts/eastern_kingdoms/boss_kruul.cpp create mode 100644 scripts/eastern_kingdoms/burning_steppes.cpp create mode 100644 scripts/eastern_kingdoms/deadmines/deadmines.cpp create mode 100644 scripts/eastern_kingdoms/deadmines/deadmines.h create mode 100644 scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp create mode 100644 scripts/eastern_kingdoms/dun_morogh.cpp create mode 100644 scripts/eastern_kingdoms/eastern_plaguelands.cpp create mode 100644 scripts/eastern_kingdoms/elwynn_forest.cpp create mode 100644 scripts/eastern_kingdoms/eversong_woods.cpp create mode 100644 scripts/eastern_kingdoms/ghostlands.cpp create mode 100644 scripts/eastern_kingdoms/hinterlands.cpp create mode 100644 scripts/eastern_kingdoms/ironforge.cpp create mode 100644 scripts/eastern_kingdoms/isle_of_queldanas.cpp create mode 100644 scripts/eastern_kingdoms/karazhan/boss_curator.cpp create mode 100644 scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp create mode 100644 scripts/eastern_kingdoms/karazhan/boss_midnight.cpp create mode 100644 scripts/eastern_kingdoms/karazhan/boss_moroes.cpp create mode 100644 scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp create mode 100644 scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp create mode 100644 scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp create mode 100644 scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp create mode 100644 scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp create mode 100644 scripts/eastern_kingdoms/karazhan/bosses_opera.cpp create mode 100644 scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp create mode 100644 scripts/eastern_kingdoms/karazhan/karazhan.cpp create mode 100644 scripts/eastern_kingdoms/karazhan/karazhan.h create mode 100644 scripts/eastern_kingdoms/loch_modan.cpp create mode 100644 scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp create mode 100644 scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp create mode 100644 scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp create mode 100644 scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp create mode 100644 scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp create mode 100644 scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp create mode 100644 scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h create mode 100644 scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp create mode 100644 scripts/eastern_kingdoms/molten_core/boss_garr.cpp create mode 100644 scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp create mode 100644 scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp create mode 100644 scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp create mode 100644 scripts/eastern_kingdoms/molten_core/boss_magmadar.cpp create mode 100644 scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp create mode 100644 scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp create mode 100644 scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp create mode 100644 scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp create mode 100644 scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp create mode 100644 scripts/eastern_kingdoms/molten_core/molten_core.cpp create mode 100644 scripts/eastern_kingdoms/molten_core/molten_core.h create mode 100644 scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp create mode 100644 scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp create mode 100644 scripts/eastern_kingdoms/scarlet_monastery/boss_azshir_the_sleepless.cpp create mode 100644 scripts/eastern_kingdoms/scarlet_monastery/boss_bloodmage_thalnos.cpp create mode 100644 scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp create mode 100644 scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp create mode 100644 scripts/eastern_kingdoms/scarlet_monastery/boss_high_inquisitor_fairbanks.cpp create mode 100644 scripts/eastern_kingdoms/scarlet_monastery/boss_houndmaster_loksey.cpp create mode 100644 scripts/eastern_kingdoms/scarlet_monastery/boss_interrogator_vishas.cpp create mode 100644 scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp create mode 100644 scripts/eastern_kingdoms/scarlet_monastery/boss_scorn.cpp create mode 100644 scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp create mode 100644 scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h create mode 100644 scripts/eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp create mode 100644 scripts/eastern_kingdoms/scholomance/boss_death_knight_darkreaver.cpp create mode 100644 scripts/eastern_kingdoms/scholomance/boss_doctor_theolen_krastinov.cpp create mode 100644 scripts/eastern_kingdoms/scholomance/boss_illucia_barov.cpp create mode 100644 scripts/eastern_kingdoms/scholomance/boss_instructor_malicia.cpp create mode 100644 scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp create mode 100644 scripts/eastern_kingdoms/scholomance/boss_kormok.cpp create mode 100644 scripts/eastern_kingdoms/scholomance/boss_lord_alexei_barov.cpp create mode 100644 scripts/eastern_kingdoms/scholomance/boss_lorekeeper_polkelt.cpp create mode 100644 scripts/eastern_kingdoms/scholomance/boss_ras_frostwhisper.cpp create mode 100644 scripts/eastern_kingdoms/scholomance/boss_the_ravenian.cpp create mode 100644 scripts/eastern_kingdoms/scholomance/boss_vectus.cpp create mode 100644 scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp create mode 100644 scripts/eastern_kingdoms/scholomance/scholomance.h create mode 100644 scripts/eastern_kingdoms/searing_gorge.cpp create mode 100644 scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp create mode 100644 scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp create mode 100644 scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h create mode 100644 scripts/eastern_kingdoms/silvermoon_city.cpp create mode 100644 scripts/eastern_kingdoms/silverpine_forest.cpp create mode 100644 scripts/eastern_kingdoms/stormwind_city.cpp create mode 100644 scripts/eastern_kingdoms/stranglethorn_vale.cpp create mode 100644 scripts/eastern_kingdoms/stratholme/boss_baron_rivendare.cpp create mode 100644 scripts/eastern_kingdoms/stratholme/boss_baroness_anastari.cpp create mode 100644 scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp create mode 100644 scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp create mode 100644 scripts/eastern_kingdoms/stratholme/boss_magistrate_barthilas.cpp create mode 100644 scripts/eastern_kingdoms/stratholme/boss_maleki_the_pallid.cpp create mode 100644 scripts/eastern_kingdoms/stratholme/boss_nerubenkan.cpp create mode 100644 scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp create mode 100644 scripts/eastern_kingdoms/stratholme/boss_postmaster_malown.cpp create mode 100644 scripts/eastern_kingdoms/stratholme/boss_ramstein_the_gorger.cpp create mode 100644 scripts/eastern_kingdoms/stratholme/boss_timmy_the_cruel.cpp create mode 100644 scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp create mode 100644 scripts/eastern_kingdoms/stratholme/stratholme.cpp create mode 100644 scripts/eastern_kingdoms/stratholme/stratholme.h create mode 100644 scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp create mode 100644 scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp create mode 100644 scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp create mode 100644 scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h create mode 100644 scripts/eastern_kingdoms/tirisfal_glades.cpp create mode 100644 scripts/eastern_kingdoms/uldaman/boss_ironaya.cpp create mode 100644 scripts/eastern_kingdoms/uldaman/uldaman.cpp create mode 100644 scripts/eastern_kingdoms/undercity.cpp create mode 100644 scripts/eastern_kingdoms/western_plaguelands.cpp create mode 100644 scripts/eastern_kingdoms/westfall.cpp create mode 100644 scripts/eastern_kingdoms/wetlands.cpp create mode 100644 scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp create mode 100644 scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp create mode 100644 scripts/eastern_kingdoms/zulaman/boss_janalai.cpp create mode 100644 scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp create mode 100644 scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp create mode 100644 scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp create mode 100644 scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp create mode 100644 scripts/eastern_kingdoms/zulaman/zulaman.cpp create mode 100644 scripts/eastern_kingdoms/zulaman/zulaman.h create mode 100644 scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp create mode 100644 scripts/eastern_kingdoms/zulgurub/boss_gahzranka.cpp create mode 100644 scripts/eastern_kingdoms/zulgurub/boss_grilek.cpp create mode 100644 scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp create mode 100644 scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp create mode 100644 scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp create mode 100644 scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp create mode 100644 scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp create mode 100644 scripts/eastern_kingdoms/zulgurub/boss_marli.cpp create mode 100644 scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp create mode 100644 scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp create mode 100644 scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp create mode 100644 scripts/eastern_kingdoms/zulgurub/boss_wushoolay.cpp create mode 100644 scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp create mode 100644 scripts/eastern_kingdoms/zulgurub/zulgurub.h create mode 100644 scripts/examples/example_creature.cpp create mode 100644 scripts/examples/example_escort.cpp create mode 100644 scripts/examples/example_gossip_codebox.cpp create mode 100644 scripts/examples/example_misc.cpp create mode 100644 scripts/kalimdor/ashenvale.cpp create mode 100644 scripts/kalimdor/azshara.cpp create mode 100644 scripts/kalimdor/azuremyst_isle.cpp create mode 100644 scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h create mode 100644 scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp create mode 100644 scripts/kalimdor/bloodmyst_isle.cpp create mode 100644 scripts/kalimdor/boss_azuregos.cpp create mode 100644 scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp create mode 100644 scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp create mode 100644 scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp create mode 100644 scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp create mode 100644 scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h create mode 100644 scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp create mode 100644 scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp create mode 100644 scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp create mode 100644 scripts/kalimdor/caverns_of_time/hyjal/hyjal.h create mode 100644 scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp create mode 100644 scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h create mode 100644 scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp create mode 100644 scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_captain_skarloc.cpp create mode 100644 scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_epoch_hunter.cpp create mode 100644 scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_leutenant_drake.cpp create mode 100644 scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp create mode 100644 scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp create mode 100644 scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h create mode 100644 scripts/kalimdor/darkshore.cpp create mode 100644 scripts/kalimdor/desolace.cpp create mode 100644 scripts/kalimdor/dustwallow_marsh.cpp create mode 100644 scripts/kalimdor/felwood.cpp create mode 100644 scripts/kalimdor/feralas.cpp create mode 100644 scripts/kalimdor/maraudon/boss_celebras_the_cursed.cpp create mode 100644 scripts/kalimdor/maraudon/boss_landslide.cpp create mode 100644 scripts/kalimdor/maraudon/boss_noxxion.cpp create mode 100644 scripts/kalimdor/maraudon/boss_princess_theradras.cpp create mode 100644 scripts/kalimdor/moonglade.cpp create mode 100644 scripts/kalimdor/mulgore.cpp create mode 100644 scripts/kalimdor/onyxias_lair/boss_onyxia.cpp create mode 100644 scripts/kalimdor/orgrimmar.cpp create mode 100644 scripts/kalimdor/razorfen_downs/boss_amnennar_the_coldbringer.cpp create mode 100644 scripts/kalimdor/razorfen_downs/razorfen_downs.cpp create mode 100644 scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp create mode 100644 scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp create mode 100644 scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp create mode 100644 scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp create mode 100644 scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp create mode 100644 scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp create mode 100644 scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp create mode 100644 scripts/kalimdor/silithus.cpp create mode 100644 scripts/kalimdor/stonetalon_mountains.cpp create mode 100644 scripts/kalimdor/tanaris.cpp create mode 100644 scripts/kalimdor/teldrassil.cpp create mode 100644 scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp create mode 100644 scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp create mode 100644 scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp create mode 100644 scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp create mode 100644 scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp create mode 100644 scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp create mode 100644 scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp create mode 100644 scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp create mode 100644 scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp create mode 100644 scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp create mode 100644 scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp create mode 100644 scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h create mode 100644 scripts/kalimdor/the_barrens.cpp create mode 100644 scripts/kalimdor/thousand_needles.cpp create mode 100644 scripts/kalimdor/thunder_bluff.cpp create mode 100644 scripts/kalimdor/ungoro_crater.cpp create mode 100644 scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp create mode 100644 scripts/kalimdor/winterspring.cpp create mode 100644 scripts/kalimdor/zulfarrak/zulfarrak.cpp create mode 100644 scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h create mode 100644 scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp create mode 100644 scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp create mode 100644 scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp create mode 100644 scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp create mode 100644 scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp create mode 100644 scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h create mode 100644 scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp create mode 100644 scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp create mode 100644 scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp create mode 100644 scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp create mode 100644 scripts/northrend/borean_tundra.cpp create mode 100644 scripts/northrend/dalaran.cpp create mode 100644 scripts/northrend/dragonblight.cpp create mode 100644 scripts/northrend/draktharon_keep/boss_novos.cpp create mode 100644 scripts/northrend/draktharon_keep/boss_tharonja.cpp create mode 100644 scripts/northrend/draktharon_keep/boss_trollgore.cpp create mode 100644 scripts/northrend/grizzly_hills.cpp create mode 100644 scripts/northrend/gundrak/boss_colossus.cpp create mode 100644 scripts/northrend/gundrak/boss_galdarah.cpp create mode 100644 scripts/northrend/gundrak/boss_moorabi.cpp create mode 100644 scripts/northrend/gundrak/boss_sladran.cpp create mode 100644 scripts/northrend/gundrak/gundrak.h create mode 100644 scripts/northrend/gundrak/instance_gundrak.cpp create mode 100644 scripts/northrend/howling_fjord.cpp create mode 100644 scripts/northrend/icecrown.cpp create mode 100644 scripts/northrend/naxxramas/boss_anubrekhan.cpp create mode 100644 scripts/northrend/naxxramas/boss_faerlina.cpp create mode 100644 scripts/northrend/naxxramas/boss_four_horsemen.cpp create mode 100644 scripts/northrend/naxxramas/boss_gluth.cpp create mode 100644 scripts/northrend/naxxramas/boss_gothik.cpp create mode 100644 scripts/northrend/naxxramas/boss_grobbulus.cpp create mode 100644 scripts/northrend/naxxramas/boss_heigan.cpp create mode 100644 scripts/northrend/naxxramas/boss_kelthuzad.cpp create mode 100644 scripts/northrend/naxxramas/boss_loatheb.cpp create mode 100644 scripts/northrend/naxxramas/boss_maexxna.cpp create mode 100644 scripts/northrend/naxxramas/boss_noth.cpp create mode 100644 scripts/northrend/naxxramas/boss_patchwerk.cpp create mode 100644 scripts/northrend/naxxramas/boss_razuvious.cpp create mode 100644 scripts/northrend/naxxramas/boss_sapphiron.cpp create mode 100644 scripts/northrend/naxxramas/boss_thaddius.cpp create mode 100644 scripts/northrend/naxxramas/instance_naxxramas.cpp create mode 100644 scripts/northrend/naxxramas/naxxramas.h create mode 100644 scripts/northrend/nexus/nexus/boss_anomalus.cpp create mode 100644 scripts/northrend/nexus/nexus/boss_keristrasza.cpp create mode 100644 scripts/northrend/nexus/nexus/boss_ormorok.cpp create mode 100644 scripts/northrend/nexus/nexus/boss_telestra.cpp create mode 100644 scripts/northrend/nexus/nexus/instance_nexus.cpp create mode 100644 scripts/northrend/nexus/nexus/nexus.h create mode 100644 scripts/northrend/obsidian_sanctum/boss_sartharion.cpp create mode 100644 scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp create mode 100644 scripts/northrend/obsidian_sanctum/obsidian_sanctum.h create mode 100644 scripts/northrend/sholazar_basin.cpp create mode 100644 scripts/northrend/storm_peaks.cpp create mode 100644 scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp create mode 100644 scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp create mode 100644 scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp create mode 100644 scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp create mode 100644 scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h create mode 100644 scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp create mode 100644 scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp create mode 100644 scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp create mode 100644 scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp create mode 100644 scripts/northrend/ulduar/ulduar/instance_ulduar.cpp create mode 100644 scripts/northrend/ulduar/ulduar/ulduar.h create mode 100644 scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp create mode 100644 scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp create mode 100644 scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp create mode 100644 scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp create mode 100644 scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp create mode 100644 scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h create mode 100644 scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp create mode 100644 scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp create mode 100644 scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp create mode 100644 scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp create mode 100644 scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp create mode 100644 scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h create mode 100644 scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp create mode 100644 scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp create mode 100644 scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp create mode 100644 scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp create mode 100644 scripts/outland/auchindoun/sethekk_halls/boss_tailonking_ikiss.cpp create mode 100644 scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp create mode 100644 scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h create mode 100644 scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp create mode 100644 scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp create mode 100644 scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp create mode 100644 scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp create mode 100644 scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp create mode 100644 scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h create mode 100644 scripts/outland/black_temple/black_temple.cpp create mode 100644 scripts/outland/black_temple/black_temple.h create mode 100644 scripts/outland/black_temple/boss_bloodboil.cpp create mode 100644 scripts/outland/black_temple/boss_illidan.cpp create mode 100644 scripts/outland/black_temple/boss_mother_shahraz.cpp create mode 100644 scripts/outland/black_temple/boss_reliquary_of_souls.cpp create mode 100644 scripts/outland/black_temple/boss_shade_of_akama.cpp create mode 100644 scripts/outland/black_temple/boss_supremus.cpp create mode 100644 scripts/outland/black_temple/boss_teron_gorefiend.cpp create mode 100644 scripts/outland/black_temple/boss_warlord_najentus.cpp create mode 100644 scripts/outland/black_temple/illidari_council.cpp create mode 100644 scripts/outland/black_temple/instance_black_temple.cpp create mode 100644 scripts/outland/blades_edge_mountains.cpp create mode 100644 scripts/outland/boss_doomlord_kazzak.cpp create mode 100644 scripts/outland/boss_doomwalker.cpp create mode 100644 scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp create mode 100644 scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp create mode 100644 scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp create mode 100644 scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp create mode 100644 scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp create mode 100644 scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp create mode 100644 scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h create mode 100644 scripts/outland/coilfang_reservoir/slave_pens/boss_rokmar.cpp create mode 100644 scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp create mode 100644 scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp create mode 100644 scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp create mode 100644 scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp create mode 100644 scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h create mode 100644 scripts/outland/coilfang_reservoir/underbog/boss_ghazan.cpp create mode 100644 scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp create mode 100644 scripts/outland/gruuls_lair/boss_gruul.cpp create mode 100644 scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp create mode 100644 scripts/outland/gruuls_lair/gruuls_lair.h create mode 100644 scripts/outland/gruuls_lair/instance_gruuls_lair.cpp create mode 100644 scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h create mode 100644 scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp create mode 100644 scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp create mode 100644 scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp create mode 100644 scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp create mode 100644 scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp create mode 100644 scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp create mode 100644 scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp create mode 100644 scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h create mode 100644 scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp create mode 100644 scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp create mode 100644 scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp create mode 100644 scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h create mode 100644 scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp create mode 100644 scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp create mode 100644 scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp create mode 100644 scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp create mode 100644 scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h create mode 100644 scripts/outland/hellfire_peninsula.cpp create mode 100644 scripts/outland/nagrand.cpp create mode 100644 scripts/outland/netherstorm.cpp create mode 100644 scripts/outland/shadowmoon_valley.cpp create mode 100644 scripts/outland/shattrath_city.cpp create mode 100644 scripts/outland/tempest_keep/arcatraz/arcatraz.cpp create mode 100644 scripts/outland/tempest_keep/arcatraz/arcatraz.h create mode 100644 scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp create mode 100644 scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp create mode 100644 scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp create mode 100644 scripts/outland/tempest_keep/botanica/boss_laj.cpp create mode 100644 scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp create mode 100644 scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp create mode 100644 scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp create mode 100644 scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp create mode 100644 scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp create mode 100644 scripts/outland/tempest_keep/the_eye/the_eye.cpp create mode 100644 scripts/outland/tempest_keep/the_eye/the_eye.h create mode 100644 scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_gyrokill.cpp create mode 100644 scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp create mode 100644 scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp create mode 100644 scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp create mode 100644 scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp create mode 100644 scripts/outland/tempest_keep/the_mechanar/mechanar.h create mode 100644 scripts/outland/terokkar_forest.cpp create mode 100644 scripts/outland/zangarmarsh.cpp create mode 100644 scripts/world/areatrigger_scripts.cpp create mode 100644 scripts/world/boss_emeriss.cpp create mode 100644 scripts/world/boss_lethon.cpp create mode 100644 scripts/world/boss_taerar.cpp create mode 100644 scripts/world/boss_ysondre.cpp create mode 100644 scripts/world/go_scripts.cpp create mode 100644 scripts/world/guards.cpp create mode 100644 scripts/world/item_scripts.cpp create mode 100644 scripts/world/mob_generic_creature.cpp create mode 100644 scripts/world/npc_innkeeper.cpp create mode 100644 scripts/world/npc_professions.cpp create mode 100644 scripts/world/npcs_special.cpp create mode 100644 sql/Makefile.am create mode 100644 sql/Updates/0.0.1/09_BraveWindfeather.sql create mode 100644 sql/Updates/0.0.1/11_SilvaFilnaveth.sql create mode 100644 sql/Updates/0.0.1/27_Vaelastraz.sql create mode 100644 sql/Updates/0.0.1/Makefile.am create mode 100644 sql/Updates/0.0.2/Makefile.am create mode 100644 sql/Updates/0.0.2/r104.sql create mode 100644 sql/Updates/0.0.2/r108.sql create mode 100644 sql/Updates/0.0.2/r110.sql create mode 100644 sql/Updates/0.0.2/r121.sql create mode 100644 sql/Updates/0.0.2/r123.sql create mode 100644 sql/Updates/0.0.2/r124.sql create mode 100644 sql/Updates/0.0.2/r125.sql create mode 100644 sql/Updates/0.0.2/r128.sql create mode 100644 sql/Updates/0.0.2/r131.sql create mode 100644 sql/Updates/0.0.2/r134.sql create mode 100644 sql/Updates/0.0.2/r136.sql create mode 100644 sql/Updates/0.0.2/r139.sql create mode 100644 sql/Updates/0.0.2/r142.sql create mode 100644 sql/Updates/0.0.2/r144.sql create mode 100644 sql/Updates/0.0.2/r145.sql create mode 100644 sql/Updates/0.0.2/r149.sql create mode 100644 sql/Updates/0.0.2/r150.sql create mode 100644 sql/Updates/0.0.2/r152.sql create mode 100644 sql/Updates/0.0.2/r153.sql create mode 100644 sql/Updates/0.0.2/r157.sql create mode 100644 sql/Updates/0.0.2/r161.sql create mode 100644 sql/Updates/0.0.2/r163.sql create mode 100644 sql/Updates/0.0.2/r164.sql create mode 100644 sql/Updates/0.0.2/r165.sql create mode 100644 sql/Updates/0.0.2/r169.sql create mode 100644 sql/Updates/0.0.2/r170.sql create mode 100644 sql/Updates/0.0.2/r171.sql create mode 100644 sql/Updates/0.0.2/r172.sql create mode 100644 sql/Updates/0.0.2/r174.sql create mode 100644 sql/Updates/0.0.2/r176.sql create mode 100644 sql/Updates/0.0.2/r177.sql create mode 100644 sql/Updates/0.0.2/r178.sql create mode 100644 sql/Updates/0.0.2/r181.sql create mode 100644 sql/Updates/0.0.2/r182.sql create mode 100644 sql/Updates/0.0.2/r183.sql create mode 100644 sql/Updates/0.0.2/r184.sql create mode 100644 sql/Updates/0.0.2/r186.sql create mode 100644 sql/Updates/0.0.2/r187.sql create mode 100644 sql/Updates/0.0.2/r189.sql create mode 100644 sql/Updates/0.0.2/r191.sql create mode 100644 sql/Updates/0.0.2/r192.sql create mode 100644 sql/Updates/0.0.2/r197.sql create mode 100644 sql/Updates/0.0.2/r204.sql create mode 100644 sql/Updates/0.0.2/r206.sql create mode 100644 sql/Updates/0.0.2/r211.sql create mode 100644 sql/Updates/0.0.2/r213.sql create mode 100644 sql/Updates/0.0.2/r214.sql create mode 100644 sql/Updates/0.0.2/r215.sql create mode 100644 sql/Updates/0.0.2/r218.sql create mode 100644 sql/Updates/0.0.2/r219.sql create mode 100644 sql/Updates/0.0.2/r221_scriptdev2.sql create mode 100644 sql/Updates/0.0.2/r227_scriptdev2.sql create mode 100644 sql/Updates/0.0.2/r230_mangos.sql create mode 100644 sql/Updates/0.0.2/r234_mangos.sql create mode 100644 sql/Updates/0.0.2/r237_mangos.sql create mode 100644 sql/Updates/0.0.2/r238_mangos.sql create mode 100644 sql/Updates/0.0.2/r239_mangos.sql create mode 100644 sql/Updates/0.0.2/r240_scriptdev2.sql create mode 100644 sql/Updates/0.0.2/r241_mangos.sql create mode 100644 sql/Updates/0.0.2/r242_mangos.sql create mode 100644 sql/Updates/0.0.2/r243_mangos.sql create mode 100644 sql/Updates/0.0.2/r249_mangos.sql create mode 100644 sql/Updates/0.0.2/r250_mangos.sql create mode 100644 sql/Updates/0.0.2/r253_mangos.sql create mode 100644 sql/Updates/0.0.2/r255_mangos.sql create mode 100644 sql/Updates/0.0.2/r256_mangos.sql create mode 100644 sql/Updates/0.0.2/r257_mangos.sql create mode 100644 sql/Updates/0.0.2/r258_mangos.sql create mode 100644 sql/Updates/0.0.2/r260_mangos.sql create mode 100644 sql/Updates/0.0.2/r261_mangos.sql create mode 100644 sql/Updates/0.0.2/r262_mangos.sql create mode 100644 sql/Updates/0.0.2/r263_mangos.sql create mode 100644 sql/Updates/0.0.2/r264_mangos.sql create mode 100644 sql/Updates/0.0.2/r265_mangos.sql create mode 100644 sql/Updates/0.0.2/r269_mangos.sql create mode 100644 sql/Updates/0.0.2/r270_mangos.sql create mode 100644 sql/Updates/0.0.2/r271_mangos.sql create mode 100644 sql/Updates/0.0.2/r272_mangos.sql create mode 100644 sql/Updates/0.0.2/r273_mangos.sql create mode 100644 sql/Updates/0.0.2/r274_mangos.sql create mode 100644 sql/Updates/0.0.2/r275_mangos.sql create mode 100644 sql/Updates/0.0.2/r281_scriptdev2.sql create mode 100644 sql/Updates/0.0.2/r282_mangos.sql create mode 100644 sql/Updates/0.0.2/r286_mangos.sql create mode 100644 sql/Updates/0.0.2/r289_mangos.sql create mode 100644 sql/Updates/0.0.2/r291_mangos.sql create mode 100644 sql/Updates/0.0.2/r295_mangos.sql create mode 100644 sql/Updates/0.0.2/r297_mangos.sql create mode 100644 sql/Updates/0.0.2/r298_scriptdev2.sql create mode 100644 sql/Updates/0.0.2/r299_scriptdev2.sql create mode 100644 sql/Updates/0.0.2/r304_mangos.sql create mode 100644 sql/Updates/0.0.2/r306_scriptdev2.sql create mode 100644 sql/Updates/0.0.2/r307_mangos.sql create mode 100644 sql/Updates/0.0.2/r308_mangos.sql create mode 100644 sql/Updates/0.0.2/r309_mangos.sql create mode 100644 sql/Updates/0.0.2/r311_mangos.sql create mode 100644 sql/Updates/0.0.2/r312_mangos.sql create mode 100644 sql/Updates/0.0.2/r318_mangos.sql create mode 100644 sql/Updates/0.0.2/r324_mangos.sql create mode 100644 sql/Updates/0.0.2/r327_mangos.sql create mode 100644 sql/Updates/0.0.2/r332_scriptdev2.sql create mode 100644 sql/Updates/0.0.2/r333_mangos.sql create mode 100644 sql/Updates/0.0.2/r334_mangos.sql create mode 100644 sql/Updates/0.0.2/r336_mangos.sql create mode 100644 sql/Updates/0.0.2/r352_mangos.sql create mode 100644 sql/Updates/0.0.2/r355_mangos.sql create mode 100644 sql/Updates/0.0.2/r358_mangos.sql create mode 100644 sql/Updates/0.0.2/r364_mangos.sql create mode 100644 sql/Updates/0.0.2/r367_mangos.sql create mode 100644 sql/Updates/0.0.2/r368_mangos.sql create mode 100644 sql/Updates/0.0.2/r369_mangos.sql create mode 100644 sql/Updates/0.0.2/r374_mangos.sql create mode 100644 sql/Updates/0.0.2/r386_mangos.sql create mode 100644 sql/Updates/0.0.2/r417_mangos.sql create mode 100644 sql/Updates/0.0.2/r428_mangos.sql create mode 100644 sql/Updates/0.0.2/r431_mangos.sql create mode 100644 sql/Updates/0.0.2/r444_mangos.sql create mode 100644 sql/Updates/0.0.2/r445_mangos.sql create mode 100644 sql/Updates/0.0.2/r446_mangos.sql create mode 100644 sql/Updates/0.0.2/r448_scriptdev2.sql create mode 100644 sql/Updates/0.0.2/r462_mangos.sql create mode 100644 sql/Updates/0.0.2/r465_mangos.sql create mode 100644 sql/Updates/0.0.2/r467_mangos.sql create mode 100644 sql/Updates/0.0.2/r473_mangos.sql create mode 100644 sql/Updates/0.0.2/r476_mangos.sql create mode 100644 sql/Updates/0.0.2/r477_mangos.sql create mode 100644 sql/Updates/0.0.2/r479_mangos.sql create mode 100644 sql/Updates/0.0.2/r482_mangos.sql create mode 100644 sql/Updates/0.0.2/r484_mangos.sql create mode 100644 sql/Updates/0.0.2/r486_mangos.sql create mode 100644 sql/Updates/0.0.2/r487_mangos.sql create mode 100644 sql/Updates/0.0.2/r494_mangos.sql create mode 100644 sql/Updates/0.0.2/r501_mangos.sql create mode 100644 sql/Updates/0.0.2/r513_mangos.sql create mode 100644 sql/Updates/0.0.2/r514_mangos.sql create mode 100644 sql/Updates/0.0.2/r515_mangos.sql create mode 100644 sql/Updates/0.0.2/r516_mangos.sql create mode 100644 sql/Updates/0.0.2/r517_mangos.sql create mode 100644 sql/Updates/0.0.2/r518_mangos.sql create mode 100644 sql/Updates/0.0.2/r519_mangos.sql create mode 100644 sql/Updates/0.0.2/r520_mangos.sql create mode 100644 sql/Updates/0.0.2/r521_mangos.sql create mode 100644 sql/Updates/0.0.2/r522_mangos.sql create mode 100644 sql/Updates/0.0.2/r526_mangos.sql create mode 100644 sql/Updates/0.0.2/r528_mangos.sql create mode 100644 sql/Updates/0.0.2/r533_mangos.sql create mode 100644 sql/Updates/0.0.2/r538_scriptdev2.sql create mode 100644 sql/Updates/0.0.2/r547_mangos.sql create mode 100644 sql/Updates/0.0.2/r554_mangos.sql create mode 100644 sql/Updates/0.0.2/r555_mangos.sql create mode 100644 sql/Updates/0.0.2/r56.sql create mode 100644 sql/Updates/0.0.2/r575_mangos.sql create mode 100644 sql/Updates/0.0.2/r576_mangos.sql create mode 100644 sql/Updates/0.0.2/r578_mangos.sql create mode 100644 sql/Updates/0.0.2/r584_mangos.sql create mode 100644 sql/Updates/0.0.2/r59.sql create mode 100644 sql/Updates/0.0.2/r590_mangos.sql create mode 100644 sql/Updates/0.0.2/r591_mangos.sql create mode 100644 sql/Updates/0.0.2/r593_mangos.sql create mode 100644 sql/Updates/0.0.2/r594_mangos.sql create mode 100644 sql/Updates/0.0.2/r596_mangos.sql create mode 100644 sql/Updates/0.0.2/r610_mangos.sql create mode 100644 sql/Updates/0.0.2/r615_scriptdev2.sql create mode 100644 sql/Updates/0.0.2/r617_mangos.sql create mode 100644 sql/Updates/0.0.2/r621_mangos.sql create mode 100644 sql/Updates/0.0.2/r628_mangos.sql create mode 100644 sql/Updates/0.0.2/r63.sql create mode 100644 sql/Updates/0.0.2/r632_mangos.sql create mode 100644 sql/Updates/0.0.2/r633_mangos.sql create mode 100644 sql/Updates/0.0.2/r634_scriptdev2.sql create mode 100644 sql/Updates/0.0.2/r636_mangos.sql create mode 100644 sql/Updates/0.0.2/r637_mangos.sql create mode 100644 sql/Updates/0.0.2/r638_mangos.sql create mode 100644 sql/Updates/0.0.2/r639_mangos.sql create mode 100644 sql/Updates/0.0.2/r642_mangos.sql create mode 100644 sql/Updates/0.0.2/r643_mangos.sql create mode 100644 sql/Updates/0.0.2/r646_mangos.sql create mode 100644 sql/Updates/0.0.2/r647_scriptdev2.sql create mode 100644 sql/Updates/0.0.2/r65.sql create mode 100644 sql/Updates/0.0.2/r656_scriptdev2.sql create mode 100644 sql/Updates/0.0.2/r658_mangos.sql create mode 100644 sql/Updates/0.0.2/r659_mangos.sql create mode 100644 sql/Updates/0.0.2/r681_scriptdev2.sql create mode 100644 sql/Updates/0.0.2/r695_scriptdev2.sql create mode 100644 sql/Updates/0.0.2/r699_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.2/r700_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.2/r701_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.2/r702_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.2/r703_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.2/r704_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.2/r705_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.2/r706_mangos.sql create mode 100644 sql/Updates/0.0.2/r707_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.2/r709_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.2/r710_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.2/r713_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.2/r715_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.2/r72.sql create mode 100644 sql/Updates/0.0.2/r725_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.2/r726_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.2/r727_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.2/r728_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.2/r729_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.2/r730_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.2/r732_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.2/r735_mangos.sql create mode 100644 sql/Updates/0.0.2/r735_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.2/r740_mangos.sql create mode 100644 sql/Updates/0.0.2/r740_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.2/r743_mangos.sql create mode 100644 sql/Updates/0.0.2/r743_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.2/r745_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.2/r747_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.2/r751_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.2/r755_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.2/r757_mangos.sql create mode 100644 sql/Updates/0.0.2/r757_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.2/r764_mangos.sql create mode 100644 sql/Updates/0.0.2/r764_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.2/r766_mangos.sql create mode 100644 sql/Updates/0.0.2/r766_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.2/r767_mangos.sql create mode 100644 sql/Updates/0.0.2/r768_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.2/r769_mangos.sql create mode 100644 sql/Updates/0.0.2/r771_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.2/r772_mangos.sql create mode 100644 sql/Updates/0.0.2/r777_mangos.sql create mode 100644 sql/Updates/0.0.2/r778_mangos.sql create mode 100644 sql/Updates/0.0.2/r779_mangos.sql create mode 100644 sql/Updates/0.0.2/r779_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.2/r78.sql create mode 100644 sql/Updates/0.0.2/r782_mangos.sql create mode 100644 sql/Updates/0.0.2/r783_mangos.sql create mode 100644 sql/Updates/0.0.2/r783_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.2/r790_mangos.sql create mode 100644 sql/Updates/0.0.2/r794_mangos.sql create mode 100644 sql/Updates/0.0.2/r796_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.2/r802_mangos.sql create mode 100644 sql/Updates/0.0.2/r804_mangos.sql create mode 100644 sql/Updates/0.0.2/r804_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.2/r809_mangos.sql create mode 100644 sql/Updates/0.0.2/r809_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.2/r81.sql create mode 100644 sql/Updates/0.0.2/r810_mangos.sql create mode 100644 sql/Updates/0.0.2/r91.sql create mode 100644 sql/Updates/0.0.2/r92.sql create mode 100644 sql/Updates/0.0.2/r97.sql create mode 100644 sql/Updates/0.0.3/Makefile.am create mode 100644 sql/Updates/0.0.3/r1002_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1006_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1008_mangos.sql create mode 100644 sql/Updates/0.0.3/r1008_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1009_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1010_mangos.sql create mode 100644 sql/Updates/0.0.3/r1010_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1012_mangos.sql create mode 100644 sql/Updates/0.0.3/r1012_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1014_mangos.sql create mode 100644 sql/Updates/0.0.3/r1014_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1016_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1023_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1025_mangos.sql create mode 100644 sql/Updates/0.0.3/r1030_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1032_mangos.sql create mode 100644 sql/Updates/0.0.3/r1032_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1039_mangos.sql create mode 100644 sql/Updates/0.0.3/r1056_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1058_mangos.sql create mode 100644 sql/Updates/0.0.3/r1058_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1062_mangos.sql create mode 100644 sql/Updates/0.0.3/r1067_mangos.sql create mode 100644 sql/Updates/0.0.3/r1068_mangos.sql create mode 100644 sql/Updates/0.0.3/r1068_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1069_mangos.sql create mode 100644 sql/Updates/0.0.3/r1073_mangos.sql create mode 100644 sql/Updates/0.0.3/r1074_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1075_mangos.sql create mode 100644 sql/Updates/0.0.3/r1080_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1082_mangos.sql create mode 100644 sql/Updates/0.0.3/r1098_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1099_mangos.sql create mode 100644 sql/Updates/0.0.3/r1100_mangos.sql create mode 100644 sql/Updates/0.0.3/r1103_mangos.sql create mode 100644 sql/Updates/0.0.3/r1104_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1106_mangos.sql create mode 100644 sql/Updates/0.0.3/r1112_mangos.sql create mode 100644 sql/Updates/0.0.3/r1116_mangos.sql create mode 100644 sql/Updates/0.0.3/r1119_mangos.sql create mode 100644 sql/Updates/0.0.3/r1119_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1120_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1121_mangos.sql create mode 100644 sql/Updates/0.0.3/r1121_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1123_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1128_mangos.sql create mode 100644 sql/Updates/0.0.3/r1129_mangos.sql create mode 100644 sql/Updates/0.0.3/r1129_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1131_mangos.sql create mode 100644 sql/Updates/0.0.3/r1136_mangos.sql create mode 100644 sql/Updates/0.0.3/r1136_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1140_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1141_mangos.sql create mode 100644 sql/Updates/0.0.3/r1145_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1146_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1149_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1152_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1154_mangos.sql create mode 100644 sql/Updates/0.0.3/r1155_mangos.sql create mode 100644 sql/Updates/0.0.3/r1169_mangos.sql create mode 100644 sql/Updates/0.0.3/r1169_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1171_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1173_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1180_mangos.sql create mode 100644 sql/Updates/0.0.3/r1184_mangos.sql create mode 100644 sql/Updates/0.0.3/r1197_mangos.sql create mode 100644 sql/Updates/0.0.3/r1199_mangos.sql create mode 100644 sql/Updates/0.0.3/r1202_mangos.sql create mode 100644 sql/Updates/0.0.3/r1202_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1207_mangos.sql create mode 100644 sql/Updates/0.0.3/r1207_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1210_mangos.sql create mode 100644 sql/Updates/0.0.3/r1212_mangos.sql create mode 100644 sql/Updates/0.0.3/r1212_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1215_mangos.sql create mode 100644 sql/Updates/0.0.3/r1215_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1218_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1221_mangos.sql create mode 100644 sql/Updates/0.0.3/r1221_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1222_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1234_mangos.sql create mode 100644 sql/Updates/0.0.3/r1241_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1242_mangos.sql create mode 100644 sql/Updates/0.0.3/r1242_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1243_mangos.sql create mode 100644 sql/Updates/0.0.3/r1243_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1249_mangos.sql create mode 100644 sql/Updates/0.0.3/r1249_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1250_mangos.sql create mode 100644 sql/Updates/0.0.3/r1250_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1251_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1257_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1258_mangos.sql create mode 100644 sql/Updates/0.0.3/r1258_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1260_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1261_mangos.sql create mode 100644 sql/Updates/0.0.3/r1263_mangos.sql create mode 100644 sql/Updates/0.0.3/r1265_mangos.sql create mode 100644 sql/Updates/0.0.3/r1265_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1266_mangos.sql create mode 100644 sql/Updates/0.0.3/r1266_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1280_mangos.sql create mode 100644 sql/Updates/0.0.3/r1280_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1281_mangos.sql create mode 100644 sql/Updates/0.0.3/r1282_mangos.sql create mode 100644 sql/Updates/0.0.3/r1283_mangos.sql create mode 100644 sql/Updates/0.0.3/r1299_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1300_mangos.sql create mode 100644 sql/Updates/0.0.3/r1307_mangos.sql create mode 100644 sql/Updates/0.0.3/r1317_mangos.sql create mode 100644 sql/Updates/0.0.3/r1317_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1321_mangos.sql create mode 100644 sql/Updates/0.0.3/r1321_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1322_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1326_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1333_mangos.sql create mode 100644 sql/Updates/0.0.3/r1334_mangos.sql create mode 100644 sql/Updates/0.0.3/r1335_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1336_mangos.sql create mode 100644 sql/Updates/0.0.3/r1336_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1341_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1351_mangos.sql create mode 100644 sql/Updates/0.0.3/r1351_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1352_mangos.sql create mode 100644 sql/Updates/0.0.3/r1352_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1354_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1358_mangos.sql create mode 100644 sql/Updates/0.0.3/r1359_mangos.sql create mode 100644 sql/Updates/0.0.3/r1359_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1367_mangos.sql create mode 100644 sql/Updates/0.0.3/r1368_mangos.sql create mode 100644 sql/Updates/0.0.3/r1369_mangos.sql create mode 100644 sql/Updates/0.0.3/r1370_mangos.sql create mode 100644 sql/Updates/0.0.3/r1371_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1374_mangos.sql create mode 100644 sql/Updates/0.0.3/r1374_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1378_mangos.sql create mode 100644 sql/Updates/0.0.3/r1378_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1379_mangos.sql create mode 100644 sql/Updates/0.0.3/r1379_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1380_mangos.sql create mode 100644 sql/Updates/0.0.3/r1380_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1382_mangos.sql create mode 100644 sql/Updates/0.0.3/r1383_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1384_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1385_mangos.sql create mode 100644 sql/Updates/0.0.3/r1385_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1386_mangos.sql create mode 100644 sql/Updates/0.0.3/r1386_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1388_mangos.sql create mode 100644 sql/Updates/0.0.3/r1388_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1391_mangos.sql create mode 100644 sql/Updates/0.0.3/r1391_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1392_mangos.sql create mode 100644 sql/Updates/0.0.3/r1392_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1394_mangos.sql create mode 100644 sql/Updates/0.0.3/r1394_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1405_mangos.sql create mode 100644 sql/Updates/0.0.3/r1405_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1406_mangos.sql create mode 100644 sql/Updates/0.0.3/r1408_mangos.sql create mode 100644 sql/Updates/0.0.3/r1408_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1409_mangos.sql create mode 100644 sql/Updates/0.0.3/r1409_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1410_mangos.sql create mode 100644 sql/Updates/0.0.3/r1410_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1411_mangos.sql create mode 100644 sql/Updates/0.0.3/r1411_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1412_mangos.sql create mode 100644 sql/Updates/0.0.3/r1412_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1413_mangos.sql create mode 100644 sql/Updates/0.0.3/r1413_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1414_mangos.sql create mode 100644 sql/Updates/0.0.3/r1414_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1415_mangos.sql create mode 100644 sql/Updates/0.0.3/r1417_mangos.sql create mode 100644 sql/Updates/0.0.3/r1418_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1419_mangos.sql create mode 100644 sql/Updates/0.0.3/r1421_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1422_mangos.sql create mode 100644 sql/Updates/0.0.3/r1422_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1428_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1430_mangos.sql create mode 100644 sql/Updates/0.0.3/r1433_mangos.sql create mode 100644 sql/Updates/0.0.3/r1435_mangos.sql create mode 100644 sql/Updates/0.0.3/r1436_mangos.sql create mode 100644 sql/Updates/0.0.3/r1437_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1439_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r1441_mangos.sql create mode 100644 sql/Updates/0.0.3/r814_scriptdev2_eventai_scripts.sql create mode 100644 sql/Updates/0.0.3/r820_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.3/r822_mangos.sql create mode 100644 sql/Updates/0.0.3/r822_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.3/r823_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.3/r824_mangos.sql create mode 100644 sql/Updates/0.0.3/r824_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.3/r825_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.3/r826_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r827_mangos.sql create mode 100644 sql/Updates/0.0.3/r828_mangos.sql create mode 100644 sql/Updates/0.0.3/r834_mangos.sql create mode 100644 sql/Updates/0.0.3/r834_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.3/r835_mangos.sql create mode 100644 sql/Updates/0.0.3/r845_mangos.sql create mode 100644 sql/Updates/0.0.3/r846_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r847_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.3/r848_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.3/r849_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.3/r850_mangos.sql create mode 100644 sql/Updates/0.0.3/r851_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.3/r852_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.3/r854_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.3/r855_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.3/r856_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.3/r860_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.3/r862_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.3/r863_mangos.sql create mode 100644 sql/Updates/0.0.3/r872_mangos.sql create mode 100644 sql/Updates/0.0.3/r883_mangos.sql create mode 100644 sql/Updates/0.0.3/r895_mangos.sql create mode 100644 sql/Updates/0.0.3/r900_mangos.sql create mode 100644 sql/Updates/0.0.3/r903_mangos.sql create mode 100644 sql/Updates/0.0.3/r903_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.3/r907_mangos.sql create mode 100644 sql/Updates/0.0.3/r907_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.3/r909_mangos.sql create mode 100644 sql/Updates/0.0.3/r910_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.3/r912_mangos.sql create mode 100644 sql/Updates/0.0.3/r912_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.3/r916_mangos.sql create mode 100644 sql/Updates/0.0.3/r916_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.3/r919_mangos.sql create mode 100644 sql/Updates/0.0.3/r922_scriptdev2_script_waypoint.sql create mode 100644 sql/Updates/0.0.3/r924_scriptdev2_script_waypoint.sql create mode 100644 sql/Updates/0.0.3/r936_scriptdev2_script_waypoint.sql create mode 100644 sql/Updates/0.0.3/r937_mangos.sql create mode 100644 sql/Updates/0.0.3/r937_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.3/r937_scriptdev2_script_waypoint.sql create mode 100644 sql/Updates/0.0.3/r939_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.3/r940_mangos.sql create mode 100644 sql/Updates/0.0.3/r941_mangos.sql create mode 100644 sql/Updates/0.0.3/r945_mangos.sql create mode 100644 sql/Updates/0.0.3/r945_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.3/r945_scriptdev2_script_waypoint.sql create mode 100644 sql/Updates/0.0.3/r947_mangos.sql create mode 100644 sql/Updates/0.0.3/r949_scriptdev2_script_waypoint.sql create mode 100644 sql/Updates/0.0.3/r951_scriptdev2_script_waypoint.sql create mode 100644 sql/Updates/0.0.3/r953_scriptdev2_script_waypoint.sql create mode 100644 sql/Updates/0.0.3/r956_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r963_mangos.sql create mode 100644 sql/Updates/0.0.3/r964_mangos.sql create mode 100644 sql/Updates/0.0.3/r965_mangos.sql create mode 100644 sql/Updates/0.0.3/r965_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r972_mangos.sql create mode 100644 sql/Updates/0.0.3/r972_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r973_mangos.sql create mode 100644 sql/Updates/0.0.3/r973_scriptdev2_script_waypoint.sql create mode 100644 sql/Updates/0.0.3/r975_mangos.sql create mode 100644 sql/Updates/0.0.3/r975_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r976_mangos.sql create mode 100644 sql/Updates/0.0.3/r976_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r978_mangos.sql create mode 100644 sql/Updates/0.0.3/r979_mangos.sql create mode 100644 sql/Updates/0.0.3/r979_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.3/r980_mangos.sql create mode 100644 sql/Updates/0.0.3/r982_mangos.sql create mode 100644 sql/Updates/0.0.3/r982_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.3/r989_mangos.sql create mode 100644 sql/Updates/0.0.3/r990_mangos.sql create mode 100644 sql/Updates/0.0.3/r991_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r992_mangos.sql create mode 100644 sql/Updates/0.0.3/r993_mangos.sql create mode 100644 sql/Updates/0.0.3/r993_scriptdev2_script_texts.sql create mode 100644 sql/Updates/0.0.3/r995_mangos.sql create mode 100644 sql/Updates/0.0.3/r995_scriptdev2.sql create mode 100644 sql/Updates/0.0.3/r997_mangos.sql create mode 100644 sql/Updates/0.0.3/r998_mangos.sql create mode 100644 sql/Updates/0.0.3/r998_scriptdev2_script_texts.sql create mode 100644 sql/Updates/Makefile.am create mode 100644 sql/Updates/r1453_scriptdev2.sql create mode 100644 sql/Updates/r1457_scriptdev2.sql create mode 100644 sql/Updates/r1459_mangos.sql create mode 100644 sql/Updates/r1460_mangos.sql create mode 100644 sql/Updates/r1461_mangos.sql create mode 100644 sql/Updates/r1461_scriptdev2.sql create mode 100644 sql/Updates/r1463_mangos.sql create mode 100644 sql/Updates/r1465_scriptdev2.sql create mode 100644 sql/Updates/r1466_scriptdev2.sql create mode 100644 sql/Updates/r1470_scriptdev2.sql create mode 100644 sql/Updates/r1473_scriptdev2.sql create mode 100644 sql/Updates/r1474_scriptdev2.sql create mode 100644 sql/Updates/r1476_mangos.sql create mode 100644 sql/Updates/r1476_scriptdev2.sql create mode 100644 sql/mangos_scriptname_full.sql create mode 100644 sql/old/mangos_old_spells.sql create mode 100644 sql/optional/mangos_optional_generic_creature.sql create mode 100644 sql/scriptdev2_create_database.sql create mode 100644 sql/scriptdev2_create_structure_mysql.sql create mode 100644 sql/scriptdev2_create_structure_pgsql.sql create mode 100644 sql/scriptdev2_script_full.sql create mode 100644 system/ScriptLoader.cpp create mode 100644 system/ScriptLoader.h create mode 100644 system/system.cpp create mode 100644 system/system.h create mode 100644 tool/VCProjToLinuxMake.exe diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 000000000..69cd8a1df --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,280 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 000000000..ef2f6b580 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,523 @@ +# Copyright (C) 2005-2009 MaNGOS +# +# 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, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +## Process this file with automake to produce Makefile.in + +## Sub-directories to parse +SUBDIRS = sql + +BUILT_SOURCES = revision.h +CLEANFILES = revision.h +## CPP flags for includes, defines, etc. +AM_CPPFLAGS = $(MANGOS_INCLUDES) -I$(srcdir) -I$(srcdir)/../../../dep/include -I$(srcdir)/../../shared/ -I$(srcdir)/../../framework/ -I$(srcdir)/../../game/ -I$(srcdir)/include/ -I$(srcdir)/base/ -DSYSCONFDIR=\"$(sysconfdir)/\" + +## Build MaNGOS script library as shared library. +# libmangosscript shared library will later be reused by world server daemon. +lib_LTLIBRARIES = libmangosscript.la +libmangosscript_la_SOURCES = \ +ScriptMgr.cpp \ +ScriptMgr.h \ +config.h \ +base/escort_ai.cpp \ +base/escort_ai.h \ +base/follower_ai.cpp \ +base/follower_ai.h \ +base/guard_ai.cpp \ +base/guard_ai.h \ +base/simple_ai.cpp \ +base/simple_ai.h \ +include/precompiled.cpp \ +include/precompiled.h \ +include/sc_creature.cpp \ +include/sc_creature.h \ +include/sc_gossip.h \ +include/sc_grid_searchers.cpp \ +include/sc_grid_searchers.h \ +include/sc_instance.cpp \ +include/sc_instance.h \ +scripts/battlegrounds/battleground.cpp \ +scripts/eastern_kingdoms/alterac_mountains.cpp \ +scripts/eastern_kingdoms/arathi_highlands.cpp \ +scripts/eastern_kingdoms/blasted_lands.cpp \ +scripts/eastern_kingdoms/boss_kruul.cpp \ +scripts/eastern_kingdoms/burning_steppes.cpp \ +scripts/eastern_kingdoms/dun_morogh.cpp \ +scripts/eastern_kingdoms/eastern_plaguelands.cpp \ +scripts/eastern_kingdoms/elwynn_forest.cpp \ +scripts/eastern_kingdoms/eversong_woods.cpp \ +scripts/eastern_kingdoms/ghostlands.cpp \ +scripts/eastern_kingdoms/hinterlands.cpp \ +scripts/eastern_kingdoms/ironforge.cpp \ +scripts/eastern_kingdoms/isle_of_queldanas.cpp \ +scripts/eastern_kingdoms/loch_modan.cpp \ +scripts/eastern_kingdoms/searing_gorge.cpp \ +scripts/eastern_kingdoms/silvermoon_city.cpp \ +scripts/eastern_kingdoms/silverpine_forest.cpp \ +scripts/eastern_kingdoms/stormwind_city.cpp \ +scripts/eastern_kingdoms/stranglethorn_vale.cpp \ +scripts/eastern_kingdoms/tirisfal_glades.cpp \ +scripts/eastern_kingdoms/undercity.cpp \ +scripts/eastern_kingdoms/western_plaguelands.cpp \ +scripts/eastern_kingdoms/westfall.cpp \ +scripts/eastern_kingdoms/wetlands.cpp \ +scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp \ +scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h \ +scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp \ +scripts/eastern_kingdoms/blackrock_depths/boss_anubshiah.cpp \ +scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp \ +scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp \ +scripts/eastern_kingdoms/blackrock_depths/boss_gorosh_the_dervish.cpp \ +scripts/eastern_kingdoms/blackrock_depths/boss_grizzle.cpp \ +scripts/eastern_kingdoms/blackrock_depths/boss_high_interrogator_gerstahn.cpp \ +scripts/eastern_kingdoms/blackrock_depths/boss_magmus.cpp \ +scripts/eastern_kingdoms/blackrock_depths/boss_tomb_of_seven.cpp \ +scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp \ +scripts/eastern_kingdoms/blackrock_spire/boss_drakkisath.cpp \ +scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp \ +scripts/eastern_kingdoms/blackrock_spire/boss_halycon.cpp \ +scripts/eastern_kingdoms/blackrock_spire/boss_highlord_omokk.cpp \ +scripts/eastern_kingdoms/blackrock_spire/boss_mother_smolderweb.cpp \ +scripts/eastern_kingdoms/blackrock_spire/boss_overlord_wyrmthalak.cpp \ +scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp \ +scripts/eastern_kingdoms/blackrock_spire/boss_quartermaster_zigris.cpp \ +scripts/eastern_kingdoms/blackrock_spire/boss_rend_blackhand.cpp \ +scripts/eastern_kingdoms/blackrock_spire/boss_shadow_hunter_voshgajin.cpp \ +scripts/eastern_kingdoms/blackrock_spire/boss_the_beast.cpp \ +scripts/eastern_kingdoms/blackrock_spire/boss_warmaster_voone.cpp \ +scripts/eastern_kingdoms/blackwing_lair/boss_broodlord_lashlayer.cpp \ +scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp \ +scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp \ +scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp \ +scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp \ +scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp \ +scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp \ +scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp \ +scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp \ +scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp \ +scripts/eastern_kingdoms/deadmines/deadmines.cpp \ +scripts/eastern_kingdoms/deadmines/deadmines.h \ +scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp \ +scripts/eastern_kingdoms/karazhan/boss_curator.cpp \ +scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp \ +scripts/eastern_kingdoms/karazhan/boss_midnight.cpp \ +scripts/eastern_kingdoms/karazhan/boss_moroes.cpp \ +scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp \ +scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp \ +scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp \ +scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp \ +scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp \ +scripts/eastern_kingdoms/karazhan/bosses_opera.cpp \ +scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp \ +scripts/eastern_kingdoms/karazhan/karazhan.cpp \ +scripts/eastern_kingdoms/karazhan/karazhan.h \ +scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp \ +scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp \ +scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp \ +scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp \ +scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp \ +scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp \ +scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h \ +scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp \ +scripts/eastern_kingdoms/molten_core/boss_garr.cpp \ +scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp \ +scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp \ +scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp \ +scripts/eastern_kingdoms/molten_core/boss_magmadar.cpp \ +scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp \ +scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp \ +scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp \ +scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp \ +scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp \ +scripts/eastern_kingdoms/molten_core/molten_core.cpp \ +scripts/eastern_kingdoms/molten_core/molten_core.h \ +scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp \ +scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp \ +scripts/eastern_kingdoms/scarlet_monastery/boss_azshir_the_sleepless.cpp \ +scripts/eastern_kingdoms/scarlet_monastery/boss_bloodmage_thalnos.cpp \ +scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp \ +scripts/eastern_kingdoms/scarlet_monastery/boss_high_inquisitor_fairbanks.cpp \ +scripts/eastern_kingdoms/scarlet_monastery/boss_houndmaster_loksey.cpp \ +scripts/eastern_kingdoms/scarlet_monastery/boss_interrogator_vishas.cpp \ +scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp \ +scripts/eastern_kingdoms/scarlet_monastery/boss_scorn.cpp \ +scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp \ +scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp \ +scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h \ +scripts/eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp \ +scripts/eastern_kingdoms/scholomance/boss_death_knight_darkreaver.cpp \ +scripts/eastern_kingdoms/scholomance/boss_doctor_theolen_krastinov.cpp \ +scripts/eastern_kingdoms/scholomance/boss_illucia_barov.cpp \ +scripts/eastern_kingdoms/scholomance/boss_instructor_malicia.cpp \ +scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp \ +scripts/eastern_kingdoms/scholomance/boss_kormok.cpp \ +scripts/eastern_kingdoms/scholomance/boss_lord_alexei_barov.cpp \ +scripts/eastern_kingdoms/scholomance/boss_lorekeeper_polkelt.cpp \ +scripts/eastern_kingdoms/scholomance/boss_ras_frostwhisper.cpp \ +scripts/eastern_kingdoms/scholomance/boss_the_ravenian.cpp \ +scripts/eastern_kingdoms/scholomance/boss_vectus.cpp \ +scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp \ +scripts/eastern_kingdoms/scholomance/scholomance.h \ +scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp \ +scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp \ +scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h \ +scripts/eastern_kingdoms/stratholme/boss_baron_rivendare.cpp \ +scripts/eastern_kingdoms/stratholme/boss_baroness_anastari.cpp \ +scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp \ +scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp \ +scripts/eastern_kingdoms/stratholme/boss_magistrate_barthilas.cpp \ +scripts/eastern_kingdoms/stratholme/boss_maleki_the_pallid.cpp \ +scripts/eastern_kingdoms/stratholme/boss_nerubenkan.cpp \ +scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp \ +scripts/eastern_kingdoms/stratholme/boss_postmaster_malown.cpp \ +scripts/eastern_kingdoms/stratholme/boss_ramstein_the_gorger.cpp \ +scripts/eastern_kingdoms/stratholme/boss_timmy_the_cruel.cpp \ +scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp \ +scripts/eastern_kingdoms/stratholme/stratholme.cpp \ +scripts/eastern_kingdoms/stratholme/stratholme.h \ +scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp \ +scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp \ +scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp \ +scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h \ +scripts/eastern_kingdoms/uldaman/boss_ironaya.cpp \ +scripts/eastern_kingdoms/uldaman/uldaman.cpp \ +scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp \ +scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp \ +scripts/eastern_kingdoms/zulaman/boss_janalai.cpp \ +scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp \ +scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp \ +scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp \ +scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp \ +scripts/eastern_kingdoms/zulaman/zulaman.cpp \ +scripts/eastern_kingdoms/zulaman/zulaman.h \ +scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp \ +scripts/eastern_kingdoms/zulgurub/boss_gahzranka.cpp \ +scripts/eastern_kingdoms/zulgurub/boss_grilek.cpp \ +scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp \ +scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp \ +scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp \ +scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp \ +scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp \ +scripts/eastern_kingdoms/zulgurub/boss_marli.cpp \ +scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp \ +scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp \ +scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp \ +scripts/eastern_kingdoms/zulgurub/boss_wushoolay.cpp \ +scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp \ +scripts/eastern_kingdoms/zulgurub/zulgurub.h \ +scripts/examples/example_creature.cpp \ +scripts/examples/example_escort.cpp \ +scripts/examples/example_gossip_codebox.cpp \ +scripts/examples/example_misc.cpp \ +scripts/kalimdor/ashenvale.cpp \ +scripts/kalimdor/azshara.cpp \ +scripts/kalimdor/azuremyst_isle.cpp \ +scripts/kalimdor/bloodmyst_isle.cpp \ +scripts/kalimdor/boss_azuregos.cpp \ +scripts/kalimdor/darkshore.cpp \ +scripts/kalimdor/desolace.cpp \ +scripts/kalimdor/dustwallow_marsh.cpp \ +scripts/kalimdor/felwood.cpp \ +scripts/kalimdor/feralas.cpp \ +scripts/kalimdor/moonglade.cpp \ +scripts/kalimdor/mulgore.cpp \ +scripts/kalimdor/orgrimmar.cpp \ +scripts/kalimdor/silithus.cpp \ +scripts/kalimdor/stonetalon_mountains.cpp \ +scripts/kalimdor/tanaris.cpp \ +scripts/kalimdor/teldrassil.cpp \ +scripts/kalimdor/the_barrens.cpp \ +scripts/kalimdor/thousand_needles.cpp \ +scripts/kalimdor/thunder_bluff.cpp \ +scripts/kalimdor/ungoro_crater.cpp \ +scripts/kalimdor/winterspring.cpp \ +scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h \ +scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp \ +scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp \ +scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp \ +scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp \ +scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp \ +scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h \ +scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp \ +scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp \ +scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp \ +scripts/kalimdor/caverns_of_time/hyjal/hyjal.h \ +scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp \ +scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h \ +scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp \ +scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_captain_skarloc.cpp \ +scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_epoch_hunter.cpp \ +scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_leutenant_drake.cpp \ +scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp \ +scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp \ +scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h \ +scripts/kalimdor/maraudon/boss_celebras_the_cursed.cpp \ +scripts/kalimdor/maraudon/boss_landslide.cpp \ +scripts/kalimdor/maraudon/boss_noxxion.cpp \ +scripts/kalimdor/maraudon/boss_princess_theradras.cpp \ +scripts/kalimdor/onyxias_lair/boss_onyxia.cpp \ +scripts/kalimdor/razorfen_downs/boss_amnennar_the_coldbringer.cpp \ +scripts/kalimdor/razorfen_downs/razorfen_downs.cpp \ +scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp \ +scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp \ +scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp \ +scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp \ +scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp \ +scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp \ +scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp \ +scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp \ +scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp \ +scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp \ +scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp \ +scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp \ +scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp \ +scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp \ +scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp \ +scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp \ +scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp \ +scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp \ +scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h \ +scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp \ +scripts/kalimdor/zulfarrak/zulfarrak.cpp \ +scripts/northrend/borean_tundra.cpp \ +scripts/northrend/dalaran.cpp \ +scripts/northrend/dragonblight.cpp \ +scripts/northrend/grizzly_hills.cpp \ +scripts/northrend/icecrown.cpp \ +scripts/northrend/sholazar_basin.cpp \ +scripts/northrend/storm_peaks.cpp \ +scripts/northrend/howling_fjord.cpp \ +scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp \ +scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp \ +scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp \ +scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp \ +scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h \ +scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp \ +scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h \ +scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp \ +scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp \ +scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp \ +scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp \ +scripts/northrend/draktharon_keep/boss_novos.cpp \ +scripts/northrend/draktharon_keep/boss_tharonja.cpp \ +scripts/northrend/draktharon_keep/boss_trollgore.cpp \ +scripts/northrend/gundrak/boss_colossus.cpp \ +scripts/northrend/gundrak/boss_galdarah.cpp \ +scripts/northrend/gundrak/boss_moorabi.cpp \ +scripts/northrend/gundrak/boss_sladran.cpp \ +scripts/northrend/gundrak/gundrak.h \ +scripts/northrend/gundrak/instance_gundrak.cpp \ +scripts/northrend/naxxramas/boss_anubrekhan.cpp \ +scripts/northrend/naxxramas/boss_faerlina.cpp \ +scripts/northrend/naxxramas/boss_four_horsemen.cpp \ +scripts/northrend/naxxramas/boss_gluth.cpp \ +scripts/northrend/naxxramas/boss_gothik.cpp \ +scripts/northrend/naxxramas/boss_grobbulus.cpp \ +scripts/northrend/naxxramas/boss_heigan.cpp \ +scripts/northrend/naxxramas/boss_kelthuzad.cpp \ +scripts/northrend/naxxramas/boss_loatheb.cpp \ +scripts/northrend/naxxramas/boss_maexxna.cpp \ +scripts/northrend/naxxramas/boss_noth.cpp \ +scripts/northrend/naxxramas/boss_patchwerk.cpp \ +scripts/northrend/naxxramas/boss_razuvious.cpp \ +scripts/northrend/naxxramas/boss_sapphiron.cpp \ +scripts/northrend/naxxramas/boss_thaddius.cpp \ +scripts/northrend/naxxramas/naxxramas.h \ +scripts/northrend/naxxramas/instance_naxxramas.cpp \ +scripts/northrend/nexus/nexus/boss_anomalus.cpp \ +scripts/northrend/nexus/nexus/boss_keristrasza.cpp \ +scripts/northrend/nexus/nexus/boss_ormorok.cpp \ +scripts/northrend/nexus/nexus/boss_telestra.cpp \ +scripts/northrend/nexus/nexus/nexus.h \ +scripts/northrend/nexus/nexus/instance_nexus.cpp \ +scripts/northrend/obsidian_sanctum/boss_sartharion.cpp \ +scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp \ +scripts/northrend/obsidian_sanctum/obsidian_sanctum.h \ +scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp \ +scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp \ +scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp \ +scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp \ +scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h \ +scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp \ +scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp \ +scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp \ +scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp \ +scripts/northrend/ulduar/ulduar/instance_ulduar.cpp \ +scripts/northrend/ulduar/ulduar/ulduar.h \ +scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp \ +scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp \ +scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp \ +scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp \ +scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp \ +scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h \ +scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp \ +scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp \ +scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp \ +scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp \ +scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp \ +scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h \ +scripts/outland/blades_edge_mountains.cpp \ +scripts/outland/boss_doomlord_kazzak.cpp \ +scripts/outland/boss_doomwalker.cpp \ +scripts/outland/hellfire_peninsula.cpp \ +scripts/outland/nagrand.cpp \ +scripts/outland/netherstorm.cpp \ +scripts/outland/shadowmoon_valley.cpp \ +scripts/outland/shattrath_city.cpp \ +scripts/outland/terokkar_forest.cpp \ +scripts/outland/zangarmarsh.cpp \ +scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp \ +scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp \ +scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp \ +scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp \ +scripts/outland/auchindoun/sethekk_halls/boss_tailonking_ikiss.cpp \ +scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp \ +scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h \ +scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp \ +scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp \ +scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp \ +scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp \ +scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp \ +scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h \ +scripts/outland/black_temple/black_temple.cpp \ +scripts/outland/black_temple/black_temple.h \ +scripts/outland/black_temple/boss_bloodboil.cpp \ +scripts/outland/black_temple/boss_illidan.cpp \ +scripts/outland/black_temple/boss_mother_shahraz.cpp \ +scripts/outland/black_temple/boss_reliquary_of_souls.cpp \ +scripts/outland/black_temple/boss_shade_of_akama.cpp \ +scripts/outland/black_temple/boss_supremus.cpp \ +scripts/outland/black_temple/boss_teron_gorefiend.cpp \ +scripts/outland/black_temple/boss_warlord_najentus.cpp \ +scripts/outland/black_temple/illidari_council.cpp \ +scripts/outland/black_temple/instance_black_temple.cpp \ +scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp \ +scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp \ +scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp \ +scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp \ +scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp \ +scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp \ +scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h \ +scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp \ +scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp \ +scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp \ +scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp \ +scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h \ +scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp \ +scripts/outland/gruuls_lair/boss_gruul.cpp \ +scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp \ +scripts/outland/gruuls_lair/gruuls_lair.h \ +scripts/outland/gruuls_lair/instance_gruuls_lair.cpp \ +scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h \ +scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp \ +scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp \ +scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp \ +scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp \ +scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp \ +scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp \ +scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp \ +scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h \ +scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp \ +scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp \ +scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp \ +scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h \ +scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp \ +scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp \ +scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp \ +scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp \ +scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h \ +scripts/outland/tempest_keep/arcatraz/arcatraz.cpp \ +scripts/outland/tempest_keep/arcatraz/arcatraz.h \ +scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp \ +scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp \ +scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp \ +scripts/outland/tempest_keep/botanica/boss_laj.cpp \ +scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp \ +scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp \ +scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp \ +scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp \ +scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp \ +scripts/outland/tempest_keep/the_eye/the_eye.cpp \ +scripts/outland/tempest_keep/the_eye/the_eye.h \ +scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_gyrokill.cpp \ +scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp \ +scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp \ +scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp \ +scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp \ +scripts/outland/tempest_keep/the_mechanar/mechanar.h \ +scripts/world/areatrigger_scripts.cpp \ +scripts/world/boss_emeriss.cpp \ +scripts/world/boss_lethon.cpp \ +scripts/world/boss_taerar.cpp \ +scripts/world/boss_ysondre.cpp \ +scripts/world/go_scripts.cpp \ +scripts/world/guards.cpp \ +scripts/world/item_scripts.cpp \ +scripts/world/mob_generic_creature.cpp \ +scripts/world/npc_innkeeper.cpp \ +scripts/world/npc_professions.cpp \ +scripts/world/npcs_special.cpp \ +system/ScriptLoader.cpp \ +system/ScriptLoader.h \ +system/system.cpp \ +system/system.h \ +revision.h + + +## magic to include revision data in SD2 version string +revision.h: FORCE + $(top_builddir)/src/tools/genrevision/genrevision $(srcdir) + +FORCE: + +## libtool settings +# API versioning +# Link against dependencies +# How to increase version info: +# - only bug fixes implemented: +# bump the version to LTMANGOS_CURRENT:LTMANGOS_REVISION+1:LTMANGOS_AGE +# - augmented the interface: +# bump the version to LTMANGOS_CURRENT+1:0:LTMANGOS_AGE+1 +# - broken old interface: +# bump the version to LTMANGOS_CURRENT+1:0:0 +LTMANGOS_CURRENT = 0 +LTMANGOS_REVISION = 0 +LTMANGOS_AGE = 0 +libmangosscript_la_LIBFLAGS = -version-info $(LTMANGOS_CURRENT):$(LTMANGOS_REVISION):$(LTMANGOS_AGE) + +## Additional files to include when running 'make dist' +# Scripts defaults. +EXTRA_DIST = \ + Scripts/sc_default.cpp \ + Scripts/sc_defines.cpp \ + Scripts/sc_defines.h \ + scriptdev2.conf.dist + +## Additional files to install +sysconf_DATA = \ + scriptdev2.conf.dist + +install-data-hook: + @list='$(sysconf_DATA)'; for p in $$list; do \ + dest=`echo $$p | sed -e s/.dist//`; \ + if test -f $(DESTDIR)$(sysconfdir)/$$dest; then \ + echo "$@ will not overwrite existing $(DESTDIR)$(sysconfdir)/$$dest"; \ + else \ + echo " $(INSTALL_DATA) $$p $(DESTDIR)$(sysconfdir)/$$dest"; \ + $(INSTALL_DATA) $$p $(DESTDIR)$(sysconfdir)/$$dest; \ + fi; \ + done + +clean-local: + rm -f $(sysconf_DATA) diff --git a/ScriptMgr.cpp b/ScriptMgr.cpp new file mode 100644 index 000000000..eb8c2dfb3 --- /dev/null +++ b/ScriptMgr.cpp @@ -0,0 +1,444 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#include "precompiled.h" +#include "Config/Config.h" +#include "config.h" +#include "Database/DatabaseEnv.h" +#include "DBCStores.h" +#include "ObjectMgr.h" +#include "ProgressBar.h" +#include "../system/ScriptLoader.h" +#include "../system/system.h" + +int num_sc_scripts; +Script *m_scripts[MAX_SCRIPTS]; + +Config SD2Config; + +void FillSpellSummary(); + +void LoadDatabase() +{ + std::string strSD2DBinfo = SD2Config.GetStringDefault("ScriptDev2DatabaseInfo", ""); + + if (strSD2DBinfo.empty()) + { + error_log("SD2: Missing Scriptdev2 database info from configuration file. Load database aborted."); + return; + } + + //Initialize connection to DB + if (SD2Database.Initialize(strSD2DBinfo.c_str())) + { + outstring_log("SD2: ScriptDev2 database at %s initialized.", strSD2DBinfo.c_str()); + outstring_log(""); + + pSystemMgr.LoadVersion(); + pSystemMgr.LoadScriptTexts(); + pSystemMgr.LoadScriptTextsCustom(); + pSystemMgr.LoadScriptWaypoints(); + } + else + { + error_log("SD2: Unable to connect to Database. Load database aborted."); + return; + } + + SD2Database.HaltDelayThread(); + +} + +struct TSpellSummary { + uint8 Targets; // set of enum SelectTarget + uint8 Effects; // set of enum SelectEffect +}extern *SpellSummary; + +MANGOS_DLL_EXPORT +void ScriptsFree() +{ + // Free Spell Summary + delete []SpellSummary; + + // Free resources before library unload + for(int i=0; i> Loaded %i C++ Scripts.", num_sc_scripts); +} + +//********************************* +//*** Functions used globally *** + +void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* pTarget) +{ + if (!pSource) + { + error_log("SD2: DoScriptText entry %i, invalid Source pointer.", iTextEntry); + return; + } + + if (iTextEntry >= 0) + { + error_log("SD2: DoScriptText with source entry %u (TypeId=%u, guid=%u) attempts to process text entry %i, but text entry must be negative.", + pSource->GetEntry(), pSource->GetTypeId(), pSource->GetGUIDLow(), iTextEntry); + + return; + } + + const StringTextData* pData = pSystemMgr.GetTextData(iTextEntry); + + if (!pData) + { + error_log("SD2: DoScriptText with source entry %u (TypeId=%u, guid=%u) could not find text entry %i.", + pSource->GetEntry(), pSource->GetTypeId(), pSource->GetGUIDLow(), iTextEntry); + + return; + } + + debug_log("SD2: DoScriptText: text entry=%i, Sound=%u, Type=%u, Language=%u, Emote=%u", + iTextEntry, pData->uiSoundId, pData->uiType, pData->uiLanguage, pData->uiEmote); + + if (pData->uiSoundId) + { + if (GetSoundEntriesStore()->LookupEntry(pData->uiSoundId)) + pSource->PlayDirectSound(pData->uiSoundId); + else + error_log("SD2: DoScriptText entry %i tried to process invalid sound id %u.", iTextEntry, pData->uiSoundId); + } + + if (pData->uiEmote) + { + if (pSource->GetTypeId() == TYPEID_UNIT || pSource->GetTypeId() == TYPEID_PLAYER) + ((Unit*)pSource)->HandleEmoteCommand(pData->uiEmote); + else + error_log("SD2: DoScriptText entry %i tried to process emote for invalid TypeId (%u).", iTextEntry, pSource->GetTypeId()); + } + + switch(pData->uiType) + { + case CHAT_TYPE_SAY: + pSource->MonsterSay(iTextEntry, pData->uiLanguage, pTarget ? pTarget->GetGUID() : 0); + break; + case CHAT_TYPE_YELL: + pSource->MonsterYell(iTextEntry, pData->uiLanguage, pTarget ? pTarget->GetGUID() : 0); + break; + case CHAT_TYPE_TEXT_EMOTE: + pSource->MonsterTextEmote(iTextEntry, pTarget ? pTarget->GetGUID() : 0); + break; + case CHAT_TYPE_BOSS_EMOTE: + pSource->MonsterTextEmote(iTextEntry, pTarget ? pTarget->GetGUID() : 0, true); + break; + case CHAT_TYPE_WHISPER: + { + if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER) + pSource->MonsterWhisper(iTextEntry, pTarget->GetGUID()); + else + error_log("SD2: DoScriptText entry %i cannot whisper without target unit (TYPEID_PLAYER).", iTextEntry); + + break; + } + case CHAT_TYPE_BOSS_WHISPER: + { + if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER) + pSource->MonsterWhisper(iTextEntry, pTarget->GetGUID(), true); + else + error_log("SD2: DoScriptText entry %i cannot whisper without target unit (TYPEID_PLAYER).", iTextEntry); + + break; + } + case CHAT_TYPE_ZONE_YELL: + pSource->MonsterYellToZone(iTextEntry, pData->uiLanguage, pTarget ? pTarget->GetGUID() : 0); + break; + } +} + +//********************************* +//*** Functions used internally *** + +void Script::RegisterSelf() +{ + int id = GetScriptId(Name.c_str()); + if (id != 0) + { + m_scripts[id] = this; + ++num_sc_scripts; + } + else + { + debug_log("SD2: RegisterSelf, but script named %s does not have ScriptName assigned in database.",(this)->Name.c_str()); + delete this; + } +} + +//******************************** +//*** Functions to be Exported *** + +MANGOS_DLL_EXPORT +char const* ScriptsVersion() +{ + if (!strSD2Version.empty()) + { + strSD2Version.append(_FULLVERSION); + return strSD2Version.c_str(); + } + + return _FULLVERSION; +} + +MANGOS_DLL_EXPORT +bool GossipHello(Player* pPlayer, Creature* pCreature) +{ + Script *tmpscript = m_scripts[pCreature->GetScriptId()]; + if (!tmpscript || !tmpscript->pGossipHello) return false; + + pPlayer->PlayerTalkClass->ClearMenus(); + return tmpscript->pGossipHello(pPlayer, pCreature); +} + +MANGOS_DLL_EXPORT +bool GossipSelect(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + debug_log("SD2: Gossip selection, sender: %u, action: %u", uiSender, uiAction); + + Script *tmpscript = m_scripts[pCreature->GetScriptId()]; + if (!tmpscript || !tmpscript->pGossipSelect) return false; + + pPlayer->PlayerTalkClass->ClearMenus(); + return tmpscript->pGossipSelect(pPlayer, pCreature, uiSender, uiAction); +} + +MANGOS_DLL_EXPORT +bool GossipSelectWithCode(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction, const char* sCode) +{ + debug_log("SD2: Gossip selection with code, sender: %u, action: %u", uiSender, uiAction); + + Script *tmpscript = m_scripts[pCreature->GetScriptId()]; + if (!tmpscript || !tmpscript->pGossipSelectWithCode) return false; + + pPlayer->PlayerTalkClass->ClearMenus(); + return tmpscript->pGossipSelectWithCode(pPlayer, pCreature, uiSender, uiAction, sCode); +} + +MANGOS_DLL_EXPORT +bool QuestAccept(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + Script *tmpscript = m_scripts[pCreature->GetScriptId()]; + if (!tmpscript || !tmpscript->pQuestAccept) return false; + + pPlayer->PlayerTalkClass->ClearMenus(); + return tmpscript->pQuestAccept(pPlayer, pCreature, pQuest); +} + +MANGOS_DLL_EXPORT +bool QuestSelect(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + Script *tmpscript = m_scripts[pCreature->GetScriptId()]; + if (!tmpscript || !tmpscript->pQuestSelect) return false; + + pPlayer->PlayerTalkClass->ClearMenus(); + return tmpscript->pQuestSelect(pPlayer, pCreature, pQuest); +} + +MANGOS_DLL_EXPORT +bool QuestComplete(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + Script *tmpscript = m_scripts[pCreature->GetScriptId()]; + if (!tmpscript || !tmpscript->pQuestComplete) return false; + + pPlayer->PlayerTalkClass->ClearMenus(); + return tmpscript->pQuestComplete(pPlayer, pCreature, pQuest); +} + +MANGOS_DLL_EXPORT +bool ChooseReward(Player* pPlayer, Creature* pCreature, const Quest* pQuest, uint32 opt) +{ + Script *tmpscript = m_scripts[pCreature->GetScriptId()]; + if (!tmpscript || !tmpscript->pChooseReward) return false; + + pPlayer->PlayerTalkClass->ClearMenus(); + return tmpscript->pChooseReward(pPlayer, pCreature, pQuest, opt); +} + +MANGOS_DLL_EXPORT +uint32 NPCDialogStatus(Player* pPlayer, Creature* pCreature) +{ + Script *tmpscript = m_scripts[pCreature->GetScriptId()]; + if (!tmpscript || !tmpscript->pNPCDialogStatus) return 100; + + pPlayer->PlayerTalkClass->ClearMenus(); + return tmpscript->pNPCDialogStatus(pPlayer, pCreature); +} + +MANGOS_DLL_EXPORT +uint32 GODialogStatus(Player* pPlayer, GameObject* pGo) +{ + Script *tmpscript = m_scripts[pGo->GetGOInfo()->ScriptId]; + if (!tmpscript || !tmpscript->pGODialogStatus) return 100; + + pPlayer->PlayerTalkClass->ClearMenus(); + return tmpscript->pGODialogStatus(pPlayer, pGo); +} + +MANGOS_DLL_EXPORT +bool ItemHello(Player* pPlayer, Item *_Item, const Quest* pQuest) +{ + Script *tmpscript = m_scripts[_Item->GetProto()->ScriptId]; + if (!tmpscript || !tmpscript->pItemHello) return false; + + pPlayer->PlayerTalkClass->ClearMenus(); + return tmpscript->pItemHello(pPlayer,_Item, pQuest); +} + +MANGOS_DLL_EXPORT +bool ItemQuestAccept(Player* pPlayer, Item *_Item, const Quest* pQuest) +{ + Script *tmpscript = m_scripts[_Item->GetProto()->ScriptId]; + if (!tmpscript || !tmpscript->pItemQuestAccept) return false; + + pPlayer->PlayerTalkClass->ClearMenus(); + return tmpscript->pItemQuestAccept(pPlayer,_Item, pQuest); +} + +MANGOS_DLL_EXPORT +bool GOHello(Player* pPlayer, GameObject* pGo) +{ + Script *tmpscript = m_scripts[pGo->GetGOInfo()->ScriptId]; + if (!tmpscript || !tmpscript->pGOHello) return false; + + pPlayer->PlayerTalkClass->ClearMenus(); + return tmpscript->pGOHello(pPlayer, pGo); +} + +MANGOS_DLL_EXPORT +bool GOQuestAccept(Player* pPlayer, GameObject* pGo, const Quest* pQuest) +{ + Script *tmpscript = m_scripts[pGo->GetGOInfo()->ScriptId]; + if (!tmpscript || !tmpscript->pGOQuestAccept) return false; + + pPlayer->PlayerTalkClass->ClearMenus(); + return tmpscript->pGOQuestAccept(pPlayer, pGo, pQuest); +} + +MANGOS_DLL_EXPORT +bool GOChooseReward(Player* pPlayer, GameObject* pGo, const Quest* pQuest, uint32 opt) +{ + Script *tmpscript = m_scripts[pGo->GetGOInfo()->ScriptId]; + if (!tmpscript || !tmpscript->pGOChooseReward) return false; + + pPlayer->PlayerTalkClass->ClearMenus(); + return tmpscript->pGOChooseReward(pPlayer, pGo, pQuest,opt); +} + +MANGOS_DLL_EXPORT +bool AreaTrigger(Player* pPlayer, AreaTriggerEntry * atEntry) +{ + Script *tmpscript = m_scripts[GetAreaTriggerScriptId(atEntry->id)]; + if (!tmpscript || !tmpscript->pAreaTrigger) return false; + + return tmpscript->pAreaTrigger(pPlayer, atEntry); +} + +MANGOS_DLL_EXPORT +CreatureAI* GetAI(Creature* pCreature) +{ + Script *tmpscript = m_scripts[pCreature->GetScriptId()]; + if (!tmpscript || !tmpscript->GetAI) return NULL; + + return tmpscript->GetAI(pCreature); +} + +MANGOS_DLL_EXPORT +bool ItemUse(Player* pPlayer, Item* _Item, SpellCastTargets const& targets) +{ + Script *tmpscript = m_scripts[_Item->GetProto()->ScriptId]; + if (!tmpscript || !tmpscript->pItemUse) return false; + + return tmpscript->pItemUse(pPlayer,_Item,targets); +} + +MANGOS_DLL_EXPORT +bool EffectDummyCreature(Unit *pCaster, uint32 spellId, uint32 effIndex, Creature *pCreatureTarget) +{ + Script *tmpscript = m_scripts[pCreatureTarget->GetScriptId()]; + + if (!tmpscript || !tmpscript->pEffectDummyCreature) return false; + + return tmpscript->pEffectDummyCreature(pCaster, spellId, effIndex, pCreatureTarget); +} + +MANGOS_DLL_EXPORT +bool EffectDummyGameObj(Unit *pCaster, uint32 spellId, uint32 effIndex, GameObject *pGameObjTarget) +{ + Script *tmpscript = m_scripts[pGameObjTarget->GetGOInfo()->ScriptId]; + + if (!tmpscript || !tmpscript->pEffectDummyGameObj) return false; + + return tmpscript->pEffectDummyGameObj(pCaster, spellId, effIndex, pGameObjTarget); +} + +MANGOS_DLL_EXPORT +bool EffectDummyItem(Unit *pCaster, uint32 spellId, uint32 effIndex, Item *pItemTarget) +{ + Script *tmpscript = m_scripts[pItemTarget->GetProto()->ScriptId]; + + if (!tmpscript || !tmpscript->pEffectDummyItem) return false; + + return tmpscript->pEffectDummyItem(pCaster, spellId, effIndex, pItemTarget); +} + +MANGOS_DLL_EXPORT +InstanceData* CreateInstanceData(Map *map) +{ + if (!map->IsDungeon()) return NULL; + + Script *tmpscript = m_scripts[((InstanceMap*)map)->GetScriptId()]; + if (!tmpscript || !tmpscript->GetInstanceData) return NULL; + + return tmpscript->GetInstanceData(map); +} diff --git a/ScriptMgr.h b/ScriptMgr.h new file mode 100644 index 000000000..1962add43 --- /dev/null +++ b/ScriptMgr.h @@ -0,0 +1,76 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef SC_SCRIPTMGR_H +#define SC_SCRIPTMGR_H + +#include "Common.h" +#include "DBCStructure.h" + +class Player; +class Creature; +class CreatureAI; +class InstanceData; +class Quest; +class Item; +class GameObject; +class SpellCastTargets; +class Map; +class Unit; +class WorldObject; + +#define MAX_SCRIPTS 5000 //72 bytes each (approx 351kb) +#define VISIBLE_RANGE (166.0f) //MAX visible range (size of grid) +#define DEFAULT_TEXT "" + +struct Script +{ + Script() : + pGossipHello(NULL), pQuestAccept(NULL), pGossipSelect(NULL), pGossipSelectWithCode(NULL), + pQuestSelect(NULL), pQuestComplete(NULL), pNPCDialogStatus(NULL), pGODialogStatus(NULL), + pChooseReward(NULL), pItemHello(NULL), pGOHello(NULL), pAreaTrigger(NULL), pItemQuestAccept(NULL), + pGOQuestAccept(NULL), pGOChooseReward(NULL), pItemUse(NULL), + pEffectDummyCreature(NULL), pEffectDummyGameObj(NULL), pEffectDummyItem(NULL), + GetAI(NULL), GetInstanceData(NULL) + {} + + std::string Name; + + //Methods to be scripted + bool (*pGossipHello )(Player*, Creature*); + bool (*pQuestAccept )(Player*, Creature*, const Quest*); + bool (*pGossipSelect )(Player*, Creature*, uint32, uint32); + bool (*pGossipSelectWithCode)(Player*, Creature*, uint32, uint32, const char*); + bool (*pQuestSelect )(Player*, Creature*, const Quest*); + bool (*pQuestComplete )(Player*, Creature*, const Quest*); + uint32 (*pNPCDialogStatus )(Player*, Creature*); + uint32 (*pGODialogStatus )(Player*, GameObject*); + bool (*pChooseReward )(Player*, Creature*, const Quest*, uint32); + bool (*pItemHello )(Player*, Item*, const Quest*); + bool (*pGOHello )(Player*, GameObject*); + bool (*pAreaTrigger )(Player*, AreaTriggerEntry*); + bool (*pItemQuestAccept )(Player*, Item*, const Quest*); + bool (*pGOQuestAccept )(Player*, GameObject*, const Quest*); + bool (*pGOChooseReward )(Player*, GameObject*, const Quest*, uint32); + bool (*pItemUse )(Player*, Item*, SpellCastTargets const&); + bool (*pEffectDummyCreature )(Unit*, uint32, uint32, Creature*); + bool (*pEffectDummyGameObj )(Unit*, uint32, uint32, GameObject*); + bool (*pEffectDummyItem )(Unit*, uint32, uint32, Item*); + + CreatureAI* (*GetAI)(Creature*); + InstanceData* (*GetInstanceData)(Map*); + + void RegisterSelf(); +}; + +//Generic scripting text function +void DoScriptText(int32 textEntry, WorldObject* pSource, Unit* target = NULL); + +#if COMPILER == COMPILER_GNU +#define FUNC_PTR(name,callconvention,returntype,parameters) typedef returntype(*name)parameters __attribute__ ((callconvention)); +#else +#define FUNC_PTR(name, callconvention, returntype, parameters) typedef returntype(callconvention *name)parameters; +#endif + +#endif diff --git a/VC80/80ScriptDev2.vcproj b/VC80/80ScriptDev2.vcproj new file mode 100644 index 000000000..1290a35b0 --- /dev/null +++ b/VC80/80ScriptDev2.vcproj @@ -0,0 +1,2592 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/VC90/90ScriptDev2.vcproj b/VC90/90ScriptDev2.vcproj new file mode 100644 index 000000000..78a393544 --- /dev/null +++ b/VC90/90ScriptDev2.vcproj @@ -0,0 +1,2591 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/base/escort_ai.cpp b/base/escort_ai.cpp new file mode 100644 index 000000000..548ce62c1 --- /dev/null +++ b/base/escort_ai.cpp @@ -0,0 +1,487 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +/* ScriptData +SDName: EscortAI +SD%Complete: 100 +SDComment: +SDCategory: Npc +EndScriptData */ + +#include "precompiled.h" +#include "escort_ai.h" + +const float MAX_PLAYER_DISTANCE = 66.0f; + +enum +{ + POINT_LAST_POINT = 0xFFFFFF, + POINT_HOME = 0xFFFFFE +}; + +npc_escortAI::npc_escortAI(Creature* pCreature) : ScriptedAI(pCreature), + m_uiPlayerGUID(0), + m_uiPlayerCheckTimer(1000), + m_uiWPWaitTimer(2500), + m_uiEscortState(STATE_ESCORT_NONE), + m_bIsActiveAttacker(true), + m_bIsRunning(false), + m_pQuestForEscort(NULL), + m_bCanInstantRespawn(false), + m_bCanReturnToStart(false) +{} + +bool npc_escortAI::IsVisible(Unit* pWho) const +{ + if (!pWho) + return false; + + return m_creature->IsWithinDist(pWho, VISIBLE_RANGE) && pWho->isVisibleForOrDetect(m_creature, m_creature, true); +} + +void npc_escortAI::AttackStart(Unit* pWho) +{ + if (!pWho) + return; + + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho, 0.0f); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == POINT_MOTION_TYPE) + m_creature->GetMotionMaster()->MovementExpired(); + + if (IsCombatMovement()) + m_creature->GetMotionMaster()->MoveChase(pWho); + } +} + +void npc_escortAI::EnterCombat(Unit* pEnemy) +{ + if (!pEnemy) + return; + + Aggro(pEnemy); +} + +void npc_escortAI::Aggro(Unit* pEnemy) +{ +} + +//see followerAI +bool npc_escortAI::AssistPlayerInCombat(Unit* pWho) +{ + if (!pWho || !pWho->getVictim()) + return false; + + //experimental (unknown) flag not present + if (!(m_creature->GetCreatureInfo()->type_flags & CREATURE_TYPEFLAGS_UNK13)) + return false; + + //not a player + if (!pWho->getVictim()->GetCharmerOrOwnerPlayerOrPlayerItself()) + return false; + + //never attack friendly + if (m_creature->IsFriendlyTo(pWho)) + return false; + + //too far away and no free sight? + if (m_creature->IsWithinDistInMap(pWho, MAX_PLAYER_DISTANCE) && m_creature->IsWithinLOSInMap(pWho)) + { + //already fighting someone? + if (!m_creature->getVictim()) + { + AttackStart(pWho); + return true; + } + else + { + pWho->SetInCombatWith(m_creature); + m_creature->AddThreat(pWho, 0.0f); + return true; + } + } + + return false; +} + +void npc_escortAI::MoveInLineOfSight(Unit* pWho) +{ + if (!m_creature->hasUnitState(UNIT_STAT_STUNNED) && pWho->isTargetableForAttack() && pWho->isInAccessablePlaceFor(m_creature)) + { + if (HasEscortState(STATE_ESCORT_ESCORTING) && AssistPlayerInCombat(pWho)) + return; + + if (!m_creature->canFly() && m_creature->GetDistanceZ(pWho) > CREATURE_Z_ATTACK_RANGE) + return; + + if (m_creature->IsHostileTo(pWho)) + { + float fAttackRadius = m_creature->GetAttackDistance(pWho); + if (m_creature->IsWithinDistInMap(pWho, fAttackRadius) && m_creature->IsWithinLOSInMap(pWho)) + { + if (!m_creature->getVictim()) + { + pWho->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); + AttackStart(pWho); + } + else if (m_creature->GetMap()->IsDungeon()) + { + pWho->SetInCombatWith(m_creature); + m_creature->AddThreat(pWho, 0.0f); + } + } + } + } +} + +void npc_escortAI::JustDied(Unit* pKiller) +{ + if (!HasEscortState(STATE_ESCORT_ESCORTING) || !m_uiPlayerGUID || !m_pQuestForEscort) + return; + + if (Player* pPlayer = GetPlayerForEscort()) + { + if (Group* pGroup = pPlayer->GetGroup()) + { + for(GroupReference* pRef = pGroup->GetFirstMember(); pRef != NULL; pRef = pRef->next()) + { + if (Player* pMember = pRef->getSource()) + { + if (pMember->GetQuestStatus(m_pQuestForEscort->GetQuestId()) == QUEST_STATUS_INCOMPLETE) + pMember->FailQuest(m_pQuestForEscort->GetQuestId()); + } + } + } + else + { + if (pPlayer->GetQuestStatus(m_pQuestForEscort->GetQuestId()) == QUEST_STATUS_INCOMPLETE) + pPlayer->FailQuest(m_pQuestForEscort->GetQuestId()); + } + } +} + +void npc_escortAI::JustRespawned() +{ + m_uiEscortState = STATE_ESCORT_NONE; + + if (!IsCombatMovement()) + SetCombatMovement(true); + + //add a small delay before going to first waypoint, normal in near all cases + m_uiWPWaitTimer = 2500; + + if (m_creature->getFaction() != m_creature->GetCreatureInfo()->faction_A) + m_creature->setFaction(m_creature->GetCreatureInfo()->faction_A); + + Reset(); +} + +void npc_escortAI::EnterEvadeMode() +{ + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->SetLootRecipient(NULL); + + if (HasEscortState(STATE_ESCORT_ESCORTING)) + { + debug_log("SD2: EscortAI has left combat and is now returning to CombatStartPosition."); + + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE) + { + AddEscortState(STATE_ESCORT_RETURNING); + + float fPosX, fPosY, fPosZ; + m_creature->GetCombatStartPosition(fPosX, fPosY, fPosZ); + m_creature->GetMotionMaster()->MovePoint(POINT_LAST_POINT, fPosX, fPosY, fPosZ); + } + } + else + { + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE) + m_creature->GetMotionMaster()->MoveTargetedHome(); + } + + Reset(); +} + +bool npc_escortAI::IsPlayerOrGroupInRange() +{ + if (Player* pPlayer = GetPlayerForEscort()) + { + if (Group* pGroup = pPlayer->GetGroup()) + { + for(GroupReference* pRef = pGroup->GetFirstMember(); pRef != NULL; pRef = pRef->next()) + { + Player* pMember = pRef->getSource(); + + if (pMember && m_creature->IsWithinDistInMap(pMember, MAX_PLAYER_DISTANCE)) + { + return true; + break; + } + } + } + else + { + if (m_creature->IsWithinDistInMap(pPlayer, MAX_PLAYER_DISTANCE)) + return true; + } + } + return false; +} + +void npc_escortAI::UpdateAI(const uint32 uiDiff) +{ + //Waypoint Updating + if (HasEscortState(STATE_ESCORT_ESCORTING) && !m_creature->getVictim() && m_uiWPWaitTimer && !HasEscortState(STATE_ESCORT_RETURNING)) + { + if (m_uiWPWaitTimer <= uiDiff) + { + //End of the line + if (CurrentWP == WaypointList.end()) + { + debug_log("SD2: EscortAI reached end of waypoints"); + + if (m_bCanReturnToStart) + { + float fRetX, fRetY, fRetZ; + m_creature->GetRespawnCoord(fRetX, fRetY, fRetZ); + + m_creature->GetMotionMaster()->MovePoint(POINT_HOME, fRetX, fRetY, fRetZ); + + m_uiWPWaitTimer = 0; + + debug_log("SD2: EscortAI are returning home to spawn location: %u, %f, %f, %f", POINT_HOME, fRetX, fRetY, fRetZ); + return; + } + + if (m_bCanInstantRespawn) + { + m_creature->setDeathState(JUST_DIED); + m_creature->Respawn(); + } + else + m_creature->ForcedDespawn(); + + return; + } + + if (!HasEscortState(STATE_ESCORT_PAUSED)) + { + m_creature->GetMotionMaster()->MovePoint(CurrentWP->id, CurrentWP->x, CurrentWP->y, CurrentWP->z); + debug_log("SD2: EscortAI start waypoint %u (%f, %f, %f).", CurrentWP->id, CurrentWP->x, CurrentWP->y, CurrentWP->z); + + WaypointStart(CurrentWP->id); + + m_uiWPWaitTimer = 0; + } + } + else + m_uiWPWaitTimer -= uiDiff; + } + + //Check if player or any member of his group is within range + if (HasEscortState(STATE_ESCORT_ESCORTING) && m_uiPlayerGUID && !m_creature->getVictim() && !HasEscortState(STATE_ESCORT_RETURNING)) + { + if (m_uiPlayerCheckTimer < uiDiff) + { + if (!IsPlayerOrGroupInRange()) + { + debug_log("SD2: EscortAI failed because player/group was to far away or not found"); + + if (m_bCanInstantRespawn) + { + m_creature->setDeathState(JUST_DIED); + m_creature->Respawn(); + } + else + m_creature->ForcedDespawn(); + + return; + } + + m_uiPlayerCheckTimer = 1000; + } + else + m_uiPlayerCheckTimer -= uiDiff; + } + + UpdateEscortAI(uiDiff); +} + +void npc_escortAI::UpdateEscortAI(const uint32 uiDiff) +{ + //Check if we have a current target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); +} + +void npc_escortAI::MovementInform(uint32 uiMoveType, uint32 uiPointId) +{ + if (uiMoveType != POINT_MOTION_TYPE || !HasEscortState(STATE_ESCORT_ESCORTING)) + return; + + //Combat start position reached, continue waypoint movement + if (uiPointId == POINT_LAST_POINT) + { + debug_log("SD2: EscortAI has returned to original position before combat"); + + if (m_bIsRunning && m_creature->HasMonsterMoveFlag(MONSTER_MOVE_WALK)) + m_creature->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + else if (!m_bIsRunning && !m_creature->HasMonsterMoveFlag(MONSTER_MOVE_WALK)) + m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + + RemoveEscortState(STATE_ESCORT_RETURNING); + + if (!m_uiWPWaitTimer) + m_uiWPWaitTimer = 1; + } + else if (uiPointId == POINT_HOME) + { + debug_log("SD2: EscortAI has returned to original home location and will continue from beginning of waypoint list."); + + CurrentWP = WaypointList.begin(); + m_uiWPWaitTimer = 1; + } + else + { + //Make sure that we are still on the right waypoint + if (CurrentWP->id != uiPointId) + { + error_log("SD2: EscortAI reached waypoint out of order %u, expected %u.", uiPointId, CurrentWP->id); + return; + } + + debug_log("SD2: EscortAI waypoint %u reached.", CurrentWP->id); + + //Call WP function + WaypointReached(CurrentWP->id); + + m_uiWPWaitTimer = CurrentWP->WaitTimeMs + 1; + + ++CurrentWP; + } +} + +/*void npc_escortAI::AddWaypoint(uint32 id, float x, float y, float z, uint32 WaitTimeMs) +{ + Escort_Waypoint t(id, x, y, z, WaitTimeMs); + + WaypointList.push_back(t); +}*/ + +void npc_escortAI::FillPointMovementListForCreature() +{ + std::vector const &pPointsEntries = pSystemMgr.GetPointMoveList(m_creature->GetEntry()); + + if (pPointsEntries.empty()) + return; + + std::vector::const_iterator itr; + + for (itr = pPointsEntries.begin(); itr != pPointsEntries.end(); ++itr) + { + Escort_Waypoint pPoint(itr->uiPointId, itr->fX, itr->fY, itr->fZ, itr->uiWaitTime); + WaypointList.push_back(pPoint); + } +} + +void npc_escortAI::SetRun(bool bRun) +{ + if (bRun) + { + if (!m_bIsRunning) + m_creature->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + else + debug_log("SD2: EscortAI attempt to set run mode, but is already running."); + } + else + { + if (m_bIsRunning) + m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + else + debug_log("SD2: EscortAI attempt to set walk mode, but is already walking."); + } + m_bIsRunning = bRun; +} + +//TODO: get rid of this many variables passed in function. +void npc_escortAI::Start(bool bIsActiveAttacker, bool bRun, uint64 uiPlayerGUID, const Quest* pQuest, bool bInstantRespawn, bool bCanLoopPath) +{ + if (m_creature->getVictim()) + { + error_log("SD2: EscortAI attempt to Start while in combat."); + return; + } + + if (HasEscortState(STATE_ESCORT_ESCORTING)) + { + error_log("SD2: EscortAI attempt to Start while already escorting."); + return; + } + + if (!WaypointList.empty()) + WaypointList.clear(); + + FillPointMovementListForCreature(); + + if (WaypointList.empty()) + { + error_db_log("SD2: EscortAI Start with 0 waypoints (possible missing entry in script_waypoint)."); + return; + } + + //set variables + m_bIsActiveAttacker = bIsActiveAttacker; + m_bIsRunning = bRun; + + m_uiPlayerGUID = uiPlayerGUID; + m_pQuestForEscort = pQuest; + + m_bCanInstantRespawn = bInstantRespawn; + m_bCanReturnToStart = bCanLoopPath; + + if (m_bCanReturnToStart && m_bCanInstantRespawn) + debug_log("SD2: EscortAI is set to return home after waypoint end and instant respawn at waypoint end. Creature will never despawn."); + + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == WAYPOINT_MOTION_TYPE) + { + m_creature->GetMotionMaster()->MovementExpired(); + m_creature->GetMotionMaster()->MoveIdle(); + debug_log("SD2: EscortAI start with WAYPOINT_MOTION_TYPE, changed to MoveIdle."); + } + + //disable npcflags + m_creature->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE); + + debug_log("SD2: EscortAI started with %u waypoints. ActiveAttacker = %d, Run = %d, PlayerGUID = %u", WaypointList.size(), m_bIsActiveAttacker, m_bIsRunning, m_uiPlayerGUID); + + CurrentWP = WaypointList.begin(); + + //Set initial speed + if (m_bIsRunning) + m_creature->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + + AddEscortState(STATE_ESCORT_ESCORTING); + + JustStartedEscort(); +} + +void npc_escortAI::SetEscortPaused(bool bPaused) +{ + if (!HasEscortState(STATE_ESCORT_ESCORTING)) + return; + + if (bPaused) + AddEscortState(STATE_ESCORT_PAUSED); + else + RemoveEscortState(STATE_ESCORT_PAUSED); +} diff --git a/base/escort_ai.h b/base/escort_ai.h new file mode 100644 index 000000000..07df53f74 --- /dev/null +++ b/base/escort_ai.h @@ -0,0 +1,106 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef SC_ESCORTAI_H +#define SC_ESCORTAI_H + +#include "../system/system.h" + +struct Escort_Waypoint +{ + Escort_Waypoint(uint32 _id, float _x, float _y, float _z, uint32 _w) + { + id = _id; + x = _x; + y = _y; + z = _z; + WaitTimeMs = _w; + } + + uint32 id; + float x; + float y; + float z; + uint32 WaitTimeMs; +}; + +enum eEscortState +{ + STATE_ESCORT_NONE = 0x000, //nothing in progress + STATE_ESCORT_ESCORTING = 0x001, //escort are in progress + STATE_ESCORT_RETURNING = 0x002, //escort is returning after being in combat + STATE_ESCORT_PAUSED = 0x004 //will not proceed with waypoints before state is removed +}; + +struct MANGOS_DLL_DECL npc_escortAI : public ScriptedAI +{ + public: + explicit npc_escortAI(Creature* pCreature); + ~npc_escortAI() {} + + virtual void Aggro(Unit*); + + virtual void Reset() = 0; + + // CreatureAI functions + bool IsVisible(Unit*) const; + + void AttackStart(Unit*); + + void EnterCombat(Unit*); + + void MoveInLineOfSight(Unit*); + + void JustDied(Unit*); + + void JustRespawned(); + + void EnterEvadeMode(); + + void UpdateAI(const uint32); //the "internal" update, calls UpdateEscortAI() + virtual void UpdateEscortAI(const uint32); //used when it's needed to add code in update (abilities, scripted events, etc) + + void MovementInform(uint32, uint32); + + // EscortAI functions + //void AddWaypoint(uint32 id, float x, float y, float z, uint32 WaitTimeMs = 0); + + virtual void WaypointReached(uint32 uiPointId) = 0; + virtual void WaypointStart(uint32 uiPointId) {} + + void Start(bool bIsActiveAttacker = true, bool bRun = false, uint64 uiPlayerGUID = 0, const Quest* pQuest = NULL, bool bInstantRespawn = false, bool bCanLoopPath = false); + + void SetRun(bool bRun = true); + void SetEscortPaused(bool uPaused); + + bool HasEscortState(uint32 uiEscortState) { return (m_uiEscortState & uiEscortState); } + + protected: + Player* GetPlayerForEscort() { return (Player*)Unit::GetUnit(*m_creature, m_uiPlayerGUID); } + virtual void JustStartedEscort() {} + + private: + bool AssistPlayerInCombat(Unit* pWho); + bool IsPlayerOrGroupInRange(); + void FillPointMovementListForCreature(); + + void AddEscortState(uint32 uiEscortState) { m_uiEscortState |= uiEscortState; } + void RemoveEscortState(uint32 uiEscortState) { m_uiEscortState &= ~uiEscortState; } + + uint64 m_uiPlayerGUID; + uint32 m_uiWPWaitTimer; + uint32 m_uiPlayerCheckTimer; + uint32 m_uiEscortState; + + const Quest* m_pQuestForEscort; //generally passed in Start() when regular escort script. + + std::list WaypointList; + std::list::iterator CurrentWP; + + bool m_bIsActiveAttacker; //obsolete, determined by faction. + bool m_bIsRunning; //all creatures are walking by default (has flag MONSTER_MOVE_WALK) + bool m_bCanInstantRespawn; //if creature should respawn instantly after escort over (if not, database respawntime are used) + bool m_bCanReturnToStart; //if creature can walk same path (loop) without despawn. Not for regular escort quests. +}; +#endif diff --git a/base/follower_ai.cpp b/base/follower_ai.cpp new file mode 100644 index 000000000..7320b24ea --- /dev/null +++ b/base/follower_ai.cpp @@ -0,0 +1,387 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +/* ScriptData +SDName: FollowerAI +SD%Complete: 50 +SDComment: This AI is under development +SDCategory: Npc +EndScriptData */ + +#include "precompiled.h" +#include "follower_ai.h" + +const float MAX_PLAYER_DISTANCE = 100.0f; + +enum +{ + POINT_COMBAT_START = 0xFFFFFF +}; + +FollowerAI::FollowerAI(Creature* pCreature) : ScriptedAI(pCreature), + m_uiLeaderGUID(0), + m_pQuestForFollow(NULL), + m_uiUpdateFollowTimer(2500), + m_uiFollowState(STATE_FOLLOW_NONE) +{} + +void FollowerAI::AttackStart(Unit* pWho) +{ + if (!pWho) + return; + + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho, 0.0f); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + + if (m_creature->hasUnitState(UNIT_STAT_FOLLOW)) + m_creature->clearUnitState(UNIT_STAT_FOLLOW); + + if (IsCombatMovement()) + m_creature->GetMotionMaster()->MoveChase(pWho); + } +} + +//This part provides assistance to a player that are attacked by pWho, even if out of normal aggro range +//It will cause m_creature to attack pWho that are attacking _any_ player (which has been confirmed may happen also on offi) +//The flag (type_flag) is unconfirmed, but used here for further research and is a good candidate. +bool FollowerAI::AssistPlayerInCombat(Unit* pWho) +{ + if (!pWho || !pWho->getVictim()) + return false; + + //experimental (unknown) flag not present + if (!(m_creature->GetCreatureInfo()->type_flags & CREATURE_TYPEFLAGS_UNK13)) + return false; + + //not a player + if (!pWho->getVictim()->GetCharmerOrOwnerPlayerOrPlayerItself()) + return false; + + //never attack friendly + if (m_creature->IsFriendlyTo(pWho)) + return false; + + //too far away and no free sight? + if (m_creature->IsWithinDistInMap(pWho, MAX_PLAYER_DISTANCE) && m_creature->IsWithinLOSInMap(pWho)) + { + //already fighting someone? + if (!m_creature->getVictim()) + { + AttackStart(pWho); + return true; + } + else + { + pWho->SetInCombatWith(m_creature); + m_creature->AddThreat(pWho, 0.0f); + return true; + } + } + + return false; +} + +void FollowerAI::MoveInLineOfSight(Unit* pWho) +{ + if (!m_creature->hasUnitState(UNIT_STAT_STUNNED) && pWho->isTargetableForAttack() && pWho->isInAccessablePlaceFor(m_creature)) + { + if (HasFollowState(STATE_FOLLOW_INPROGRESS) && AssistPlayerInCombat(pWho)) + return; + + if (!m_creature->canFly() && m_creature->GetDistanceZ(pWho) > CREATURE_Z_ATTACK_RANGE) + return; + + if (m_creature->IsHostileTo(pWho)) + { + float fAttackRadius = m_creature->GetAttackDistance(pWho); + if (m_creature->IsWithinDistInMap(pWho, fAttackRadius) && m_creature->IsWithinLOSInMap(pWho)) + { + if (!m_creature->getVictim()) + { + pWho->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); + AttackStart(pWho); + } + else if (m_creature->GetMap()->IsDungeon()) + { + pWho->SetInCombatWith(m_creature); + m_creature->AddThreat(pWho, 0.0f); + } + } + } + } +} + +void FollowerAI::JustDied(Unit* pKiller) +{ + if (!HasFollowState(STATE_FOLLOW_INPROGRESS) || !m_uiLeaderGUID || !m_pQuestForFollow) + return; + + //TODO: need a better check for quests with time limit. + if (Player* pPlayer = GetLeaderForFollower()) + { + if (Group* pGroup = pPlayer->GetGroup()) + { + for(GroupReference* pRef = pGroup->GetFirstMember(); pRef != NULL; pRef = pRef->next()) + { + if (Player* pMember = pRef->getSource()) + { + if (pPlayer->GetQuestStatus(m_pQuestForFollow->GetQuestId()) == QUEST_STATUS_INCOMPLETE) + pPlayer->FailQuest(m_pQuestForFollow->GetQuestId()); + } + } + } + else + { + if (pPlayer->GetQuestStatus(m_pQuestForFollow->GetQuestId()) == QUEST_STATUS_INCOMPLETE) + pPlayer->FailQuest(m_pQuestForFollow->GetQuestId()); + } + } +} + +void FollowerAI::JustRespawned() +{ + m_uiFollowState = STATE_FOLLOW_NONE; + + if (!IsCombatMovement()) + SetCombatMovement(true); + + if (m_creature->getFaction() != m_creature->GetCreatureInfo()->faction_A) + m_creature->setFaction(m_creature->GetCreatureInfo()->faction_A); + + Reset(); +} + +void FollowerAI::EnterEvadeMode() +{ + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->SetLootRecipient(NULL); + + if (HasFollowState(STATE_FOLLOW_INPROGRESS)) + { + debug_log("SD2: FollowerAI left combat, returning to CombatStartPosition."); + + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE) + { + float fPosX, fPosY, fPosZ; + m_creature->GetCombatStartPosition(fPosX, fPosY, fPosZ); + m_creature->GetMotionMaster()->MovePoint(POINT_COMBAT_START, fPosX, fPosY, fPosZ); + } + } + else + { + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE) + m_creature->GetMotionMaster()->MoveTargetedHome(); + } + + Reset(); +} + +void FollowerAI::UpdateAI(const uint32 uiDiff) +{ + if (HasFollowState(STATE_FOLLOW_INPROGRESS) && !m_creature->getVictim()) + { + if (m_uiUpdateFollowTimer < uiDiff) + { + if (HasFollowState(STATE_FOLLOW_COMPLETE) && !HasFollowState(STATE_FOLLOW_POSTEVENT)) + { + debug_log("SD2: FollowerAI is set completed, despawns."); + m_creature->ForcedDespawn(); + return; + } + + bool bIsMaxRangeExceeded = true; + + if (Player* pPlayer = GetLeaderForFollower()) + { + if (HasFollowState(STATE_FOLLOW_RETURNING)) + { + debug_log("SD2: FollowerAI is returning to leader."); + + RemoveFollowState(STATE_FOLLOW_RETURNING); + m_creature->GetMotionMaster()->MoveFollow(pPlayer, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE); + return; + } + + if (Group* pGroup = pPlayer->GetGroup()) + { + for(GroupReference* pRef = pGroup->GetFirstMember(); pRef != NULL; pRef = pRef->next()) + { + Player* pMember = pRef->getSource(); + + if (pMember && m_creature->IsWithinDistInMap(pMember, MAX_PLAYER_DISTANCE)) + { + bIsMaxRangeExceeded = false; + break; + } + } + } + else + { + if (m_creature->IsWithinDistInMap(pPlayer, MAX_PLAYER_DISTANCE)) + bIsMaxRangeExceeded = false; + } + } + + if (bIsMaxRangeExceeded) + { + debug_log("SD2: FollowerAI failed because player/group was to far away or not found"); + m_creature->ForcedDespawn(); + return; + } + + m_uiUpdateFollowTimer = 1000; + } + else + m_uiUpdateFollowTimer -= uiDiff; + } + + UpdateFollowerAI(uiDiff); +} + +void FollowerAI::UpdateFollowerAI(const uint32 uiDiff) +{ + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); +} + +void FollowerAI::MovementInform(uint32 uiMotionType, uint32 uiPointId) +{ + if (uiMotionType != POINT_MOTION_TYPE || !HasFollowState(STATE_FOLLOW_INPROGRESS)) + return; + + if (uiPointId == POINT_COMBAT_START) + { + if (GetLeaderForFollower()) + { + if (!HasFollowState(STATE_FOLLOW_PAUSED)) + AddFollowState(STATE_FOLLOW_RETURNING); + } + else + m_creature->ForcedDespawn(); + } +} + +void FollowerAI::StartFollow(Player* pLeader, uint32 uiFactionForFollower, const Quest* pQuest) +{ + if (m_creature->getVictim()) + { + debug_log("SD2: FollowerAI attempt to StartFollow while in combat."); + return; + } + + if (HasFollowState(STATE_FOLLOW_INPROGRESS)) + { + error_log("SD2: FollowerAI attempt to StartFollow while already following."); + return; + } + + //set variables + m_uiLeaderGUID = pLeader->GetGUID(); + + if (uiFactionForFollower) + m_creature->setFaction(uiFactionForFollower); + + m_pQuestForFollow = pQuest; + + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == WAYPOINT_MOTION_TYPE) + { + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveIdle(); + debug_log("SD2: FollowerAI start with WAYPOINT_MOTION_TYPE, set to MoveIdle."); + } + + m_creature->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE); + + AddFollowState(STATE_FOLLOW_INPROGRESS); + + m_creature->GetMotionMaster()->MoveFollow(pLeader, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE); + + debug_log("SD2: FollowerAI start follow %s (GUID %u)", pLeader->GetName(), m_uiLeaderGUID); +} + +Player* FollowerAI::GetLeaderForFollower() +{ + if (Player* pLeader = (Player*)Unit::GetUnit(*m_creature, m_uiLeaderGUID)) + { + if (pLeader->isAlive()) + return pLeader; + else + { + if (Group* pGroup = pLeader->GetGroup()) + { + for(GroupReference* pRef = pGroup->GetFirstMember(); pRef != NULL; pRef = pRef->next()) + { + Player* pMember = pRef->getSource(); + + if (pMember && pMember->isAlive() && m_creature->IsWithinDistInMap(pMember, MAX_PLAYER_DISTANCE)) + { + debug_log("SD2: FollowerAI GetLeader changed and returned new leader."); + m_uiLeaderGUID = pMember->GetGUID(); + return pMember; + break; + } + } + } + } + } + + debug_log("SD2: FollowerAI GetLeader can not find suitable leader."); + return NULL; +} + +void FollowerAI::SetFollowComplete(bool bWithEndEvent) +{ + if (m_creature->hasUnitState(UNIT_STAT_FOLLOW)) + { + m_creature->clearUnitState(UNIT_STAT_FOLLOW); + + m_creature->StopMoving(); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveIdle(); + } + + if (bWithEndEvent) + AddFollowState(STATE_FOLLOW_POSTEVENT); + else + { + if (HasFollowState(STATE_FOLLOW_POSTEVENT)) + RemoveFollowState(STATE_FOLLOW_POSTEVENT); + } + + AddFollowState(STATE_FOLLOW_COMPLETE); +} + +void FollowerAI::SetFollowPaused(bool bPaused) +{ + if (!HasFollowState(STATE_FOLLOW_INPROGRESS) || HasFollowState(STATE_FOLLOW_COMPLETE)) + return; + + if (bPaused) + { + AddFollowState(STATE_FOLLOW_PAUSED); + + if (m_creature->hasUnitState(UNIT_STAT_FOLLOW)) + { + m_creature->clearUnitState(UNIT_STAT_FOLLOW); + + m_creature->StopMoving(); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveIdle(); + } + } + else + { + RemoveFollowState(STATE_FOLLOW_PAUSED); + + if (Player* pLeader = GetLeaderForFollower()) + m_creature->GetMotionMaster()->MoveFollow(pLeader, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE); + } +} diff --git a/base/follower_ai.h b/base/follower_ai.h new file mode 100644 index 000000000..66677fa7e --- /dev/null +++ b/base/follower_ai.h @@ -0,0 +1,67 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef SC_FOLLOWERAI_H +#define SC_FOLLOWERAI_H + +#include "../system/system.h" + +enum eFollowState +{ + STATE_FOLLOW_NONE = 0x000, + STATE_FOLLOW_INPROGRESS = 0x001, //must always have this state for any follow + STATE_FOLLOW_RETURNING = 0x002, //when returning to combat start after being in combat + STATE_FOLLOW_PAUSED = 0x004, //disables following + STATE_FOLLOW_COMPLETE = 0x008, //follow is completed and may end + STATE_FOLLOW_PREEVENT = 0x010, //not implemented (allow pre event to run, before follow is initiated) + STATE_FOLLOW_POSTEVENT = 0x020 //can be set at complete and allow post event to run +}; + +class MANGOS_DLL_DECL FollowerAI : public ScriptedAI +{ + public: + explicit FollowerAI(Creature* pCreature); + ~FollowerAI() {} + + //virtual void WaypointReached(uint32 uiPointId) = 0; + + void MovementInform(uint32 uiMotionType, uint32 uiPointId); + + void AttackStart(Unit*); + + void MoveInLineOfSight(Unit*); + + void EnterEvadeMode(); + + void JustDied(Unit*); + + void JustRespawned(); + + void UpdateAI(const uint32); //the "internal" update, calls UpdateFollowerAI() + virtual void UpdateFollowerAI(const uint32); //used when it's needed to add code in update (abilities, scripted events, etc) + + void StartFollow(Player* pPlayer, uint32 uiFactionForFollower = 0, const Quest* pQuest = NULL); + + void SetFollowPaused(bool bPaused); //if special event require follow mode to hold/resume during the follow + void SetFollowComplete(bool bWithEndEvent = false); + + bool HasFollowState(uint32 uiFollowState) { return (m_uiFollowState & uiFollowState); } + + protected: + Player* GetLeaderForFollower(); + + private: + void AddFollowState(uint32 uiFollowState) { m_uiFollowState |= uiFollowState; } + void RemoveFollowState(uint32 uiFollowState) { m_uiFollowState &= ~uiFollowState; } + + bool AssistPlayerInCombat(Unit* pWho); + + uint64 m_uiLeaderGUID; + uint32 m_uiUpdateFollowTimer; + uint32 m_uiFollowState; + + const Quest* m_pQuestForFollow; //normally we have a quest +}; + +#endif diff --git a/base/guard_ai.cpp b/base/guard_ai.cpp new file mode 100644 index 000000000..3938e9183 --- /dev/null +++ b/base/guard_ai.cpp @@ -0,0 +1,201 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Guard_AI +SD%Complete: 90 +SDComment: +SDCategory: Guards +EndScriptData */ + +#include "precompiled.h" +#include "guard_ai.h" + +// **** This script is for use within every single guard to save coding time **** + +#define GENERIC_CREATURE_COOLDOWN 5000 + +#define SAY_GUARD_SIL_AGGRO1 -1000198 +#define SAY_GUARD_SIL_AGGRO2 -1000199 +#define SAY_GUARD_SIL_AGGRO3 -1000200 + +guardAI::guardAI(Creature* pCreature) : ScriptedAI(pCreature), + GlobalCooldown(0), + BuffTimer(0) +{} + +void guardAI::Reset() +{ + GlobalCooldown = 0; + BuffTimer = 0; //Rebuff as soon as we can +} + +void guardAI::Aggro(Unit *who) +{ + if (m_creature->GetEntry() == 15184) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_GUARD_SIL_AGGRO1, m_creature, who); break; + case 1: DoScriptText(SAY_GUARD_SIL_AGGRO1, m_creature, who); break; + case 2: DoScriptText(SAY_GUARD_SIL_AGGRO1, m_creature, who); break; + } + } + + if (SpellEntry const *spell = m_creature->reachWithSpellAttack(who)) + DoCastSpell(who, spell); +} + +void guardAI::JustDied(Unit *Killer) +{ + //Send Zone Under Attack message to the LocalDefense and WorldDefense Channels + if (Player* pKiller = Killer->GetCharmerOrOwnerPlayerOrPlayerItself()) + m_creature->SendZoneUnderAttackMessage(pKiller); +} + +void guardAI::UpdateAI(const uint32 diff) +{ + //Always decrease our global cooldown first + if (GlobalCooldown > diff) + GlobalCooldown -= diff; + else GlobalCooldown = 0; + + //Buff timer (only buff when we are alive and not in combat + if (m_creature->isAlive() && !m_creature->isInCombat()) + if (BuffTimer < diff) + { + //Find a spell that targets friendly and applies an aura (these are generally buffs) + SpellEntry const *info = SelectSpell(m_creature, -1, -1, SELECT_TARGET_ANY_FRIEND, 0, 0, 0, 0, SELECT_EFFECT_AURA); + + if (info && !GlobalCooldown) + { + //Cast the buff spell + DoCastSpell(m_creature, info); + + //Set our global cooldown + GlobalCooldown = GENERIC_CREATURE_COOLDOWN; + + //Set our timer to 10 minutes before rebuff + BuffTimer = 600000; + } //Try agian in 30 seconds + else BuffTimer = 30000; + }else BuffTimer -= diff; + + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // Make sure our attack is ready and we arn't currently casting + if (m_creature->isAttackReady() && !m_creature->IsNonMeleeSpellCasted(false)) + { + //If we are within range melee the target + if (m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE)) + { + bool Healing = false; + SpellEntry const *info = NULL; + + //Select a healing spell if less than 30% hp + if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 30) + info = SelectSpell(m_creature, -1, -1, SELECT_TARGET_ANY_FRIEND, 0, 0, 0, 0, SELECT_EFFECT_HEALING); + + //No healing spell available, select a hostile spell + if (info) Healing = true; + else info = SelectSpell(m_creature->getVictim(), -1, -1, SELECT_TARGET_ANY_ENEMY, 0, 0, 0, 0, SELECT_EFFECT_DONTCARE); + + //20% chance to replace our white hit with a spell + if (info && !urand(0, 4) && !GlobalCooldown) + { + //Cast the spell + if (Healing)DoCastSpell(m_creature, info); + else DoCastSpell(m_creature->getVictim(), info); + + //Set our global cooldown + GlobalCooldown = GENERIC_CREATURE_COOLDOWN; + } + else m_creature->AttackerStateUpdate(m_creature->getVictim()); + + m_creature->resetAttackTimer(); + } + } + else + { + //Only run this code if we arn't already casting + if (!m_creature->IsNonMeleeSpellCasted(false)) + { + bool Healing = false; + SpellEntry const *info = NULL; + + //Select a healing spell if less than 30% hp ONLY 33% of the time + if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 30 && !urand(0, 2)) + info = SelectSpell(m_creature, -1, -1, SELECT_TARGET_ANY_FRIEND, 0, 0, 0, 0, SELECT_EFFECT_HEALING); + + //No healing spell available, See if we can cast a ranged spell (Range must be greater than ATTACK_DISTANCE) + if (info) Healing = true; + else info = SelectSpell(m_creature->getVictim(), -1, -1, SELECT_TARGET_ANY_ENEMY, 0, 0, ATTACK_DISTANCE, 0, SELECT_EFFECT_DONTCARE); + + //Found a spell, check if we arn't on cooldown + if (info && !GlobalCooldown) + { + //If we are currently moving stop us and set the movement generator + if ((*m_creature).GetMotionMaster()->GetCurrentMovementGeneratorType()!=IDLE_MOTION_TYPE) + { + (*m_creature).GetMotionMaster()->Clear(false); + (*m_creature).GetMotionMaster()->MoveIdle(); + } + + //Cast spell + if (Healing) DoCastSpell(m_creature,info); + else DoCastSpell(m_creature->getVictim(),info); + + //Set our global cooldown + GlobalCooldown = GENERIC_CREATURE_COOLDOWN; + + } //If no spells available and we arn't moving run to target + else if ((*m_creature).GetMotionMaster()->GetCurrentMovementGeneratorType()!=TARGETED_MOTION_TYPE) + { + //Cancel our current spell and then mutate new movement generator + m_creature->InterruptNonMeleeSpells(false); + (*m_creature).GetMotionMaster()->Clear(false); + (*m_creature).GetMotionMaster()->MoveChase(m_creature->getVictim()); + } + } + } +} + +void guardAI::DoReplyToTextEmote(uint32 em) +{ + switch(em) + { + case TEXTEMOTE_KISS: m_creature->HandleEmoteCommand(EMOTE_ONESHOT_BOW); break; + case TEXTEMOTE_WAVE: m_creature->HandleEmoteCommand(EMOTE_ONESHOT_WAVE); break; + case TEXTEMOTE_SALUTE: m_creature->HandleEmoteCommand(EMOTE_ONESHOT_SALUTE); break; + case TEXTEMOTE_SHY: m_creature->HandleEmoteCommand(EMOTE_ONESHOT_FLEX); break; + case TEXTEMOTE_RUDE: + case TEXTEMOTE_CHICKEN: m_creature->HandleEmoteCommand(EMOTE_ONESHOT_POINT); break; + } +} + +void guardAI_orgrimmar::ReceiveEmote(Player* pPlayer, uint32 text_emote) +{ + if (pPlayer->GetTeam()==HORDE) + DoReplyToTextEmote(text_emote); +} + +void guardAI_stormwind::ReceiveEmote(Player* pPlayer, uint32 text_emote) +{ + if (pPlayer->GetTeam() == ALLIANCE) + DoReplyToTextEmote(text_emote); +} diff --git a/base/guard_ai.h b/base/guard_ai.h new file mode 100644 index 000000000..cd677cfc0 --- /dev/null +++ b/base/guard_ai.h @@ -0,0 +1,46 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef SC_GUARDAI_H +#define SC_GUARDAI_H + +#define GENERIC_CREATURE_COOLDOWN 5000 + +struct MANGOS_DLL_DECL guardAI : public ScriptedAI +{ + public: + explicit guardAI(Creature* pCreature); + ~guardAI() {} + + uint32 GlobalCooldown; //This variable acts like the global cooldown that players have (1.5 seconds) + uint32 BuffTimer; //This variable keeps track of buffs + + void Reset(); + + void Aggro(Unit *who); + + void JustDied(Unit *Killer); + + void UpdateAI(const uint32 diff); + + //common used for guards in main cities + void DoReplyToTextEmote(uint32 em); + +}; + +struct MANGOS_DLL_DECL guardAI_orgrimmar : public guardAI +{ + guardAI_orgrimmar(Creature* pCreature) : guardAI(pCreature) {} + + void ReceiveEmote(Player* pPlayer, uint32 text_emote); +}; + +struct MANGOS_DLL_DECL guardAI_stormwind : public guardAI +{ + guardAI_stormwind(Creature* pCreature) : guardAI(pCreature) {} + + void ReceiveEmote(Player* pPlayer, uint32 text_emote); +}; + +#endif diff --git a/base/simple_ai.cpp b/base/simple_ai.cpp new file mode 100644 index 000000000..b83a8905a --- /dev/null +++ b/base/simple_ai.cpp @@ -0,0 +1,277 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 +* 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, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +/* ScriptData +SDName: SimpleAI +SD%Complete: 100 +SDComment: Base Class for SimpleAI creatures +SDCategory: Creatures +EndScriptData */ + +#include "precompiled.h" +#include "simple_ai.h" + +SimpleAI::SimpleAI(Creature* pCreature) : ScriptedAI(pCreature) +{ + //Clear all data + Aggro_TextId[0] = 0; + Aggro_TextId[1] = 0; + Aggro_TextId[2] = 0; + Aggro_Sound[0] = 0; + Aggro_Sound[1] = 0; + Aggro_Sound[2] = 0; + + Death_TextId[0] = 0; + Death_TextId[1] = 0; + Death_TextId[2] = 0; + Death_Sound[0] = 0; + Death_Sound[1] = 0; + Death_Sound[2] = 0; + Death_Spell = 0; + Death_Target_Type = 0; + + Kill_TextId[0] = 0; + Kill_TextId[1] = 0; + Kill_TextId[2] = 0; + Kill_Sound[0] = 0; + Kill_Sound[1] = 0; + Kill_Sound[2] = 0; + Kill_Spell = 0; + Kill_Target_Type = 0; + + memset(Spell,0,sizeof(Spell)); + + EnterEvadeMode(); +} + +void SimpleAI::Reset() +{ +} + +void SimpleAI::Aggro(Unit *who) +{ + //Reset cast timers + if (Spell[0].First_Cast >= 0) + Spell_Timer[0] = Spell[0].First_Cast; + else Spell_Timer[0] = 1000; + if (Spell[1].First_Cast >= 0) + Spell_Timer[1] = Spell[1].First_Cast; + else Spell_Timer[1] = 1000; + if (Spell[2].First_Cast >= 0) + Spell_Timer[2] = Spell[2].First_Cast; + else Spell_Timer[2] = 1000; + if (Spell[3].First_Cast >= 0) + Spell_Timer[3] = Spell[3].First_Cast; + else Spell_Timer[3] = 1000; + if (Spell[4].First_Cast >= 0) + Spell_Timer[4] = Spell[4].First_Cast; + else Spell_Timer[4] = 1000; + if (Spell[5].First_Cast >= 0) + Spell_Timer[5] = Spell[5].First_Cast; + else Spell_Timer[5] = 1000; + if (Spell[6].First_Cast >= 0) + Spell_Timer[6] = Spell[6].First_Cast; + else Spell_Timer[6] = 1000; + if (Spell[7].First_Cast >= 0) + Spell_Timer[7] = Spell[7].First_Cast; + else Spell_Timer[7] = 1000; + if (Spell[8].First_Cast >= 0) + Spell_Timer[8] = Spell[8].First_Cast; + else Spell_Timer[8] = 1000; + if (Spell[9].First_Cast >= 0) + Spell_Timer[9] = Spell[9].First_Cast; + else Spell_Timer[9] = 1000; + + uint32 random_text = urand(0, 2); + + //Random text + if (Aggro_TextId[random_text]) + DoScriptText(Aggro_TextId[random_text], m_creature, who); + + //Random sound + if (Aggro_Sound[random_text]) + DoPlaySoundToSet(m_creature, Aggro_Sound[random_text]); +} + +void SimpleAI::KilledUnit(Unit *victim) +{ + uint32 random_text = urand(0, 2); + + //Random yell + if (Kill_TextId[random_text]) + DoScriptText(Kill_TextId[random_text], m_creature, victim); + + //Random sound + if (Kill_Sound[random_text]) + DoPlaySoundToSet(m_creature, Kill_Sound[random_text]); + + if (!Kill_Spell) + return; + + Unit* target = NULL; + + switch (Kill_Target_Type) + { + case CAST_SELF: + target = m_creature; + break; + case CAST_HOSTILE_TARGET: + target = m_creature->getVictim(); + break; + case CAST_HOSTILE_SECOND_AGGRO: + target = SelectUnit(SELECT_TARGET_TOPAGGRO,1); + break; + case CAST_HOSTILE_LAST_AGGRO: + target = SelectUnit(SELECT_TARGET_BOTTOMAGGRO,0); + break; + case CAST_HOSTILE_RANDOM: + target = SelectUnit(SELECT_TARGET_RANDOM,0); + break; + case CAST_KILLEDUNIT_VICTIM: + target = victim; + break; + } + + //Target is ok, cast a spell on it + if (target) + DoCast(target, Kill_Spell); +} + +void SimpleAI::DamageTaken(Unit *killer, uint32 &damage) +{ + //Return if damage taken won't kill us + if (m_creature->GetHealth() > damage) + return; + + uint32 random_text = urand(0, 2); + + //Random yell + if (Death_TextId[random_text]) + DoScriptText(Death_TextId[random_text], m_creature, killer); + + //Random sound + if (Death_Sound[random_text]) + DoPlaySoundToSet(m_creature, Death_Sound[random_text]); + + if (!Death_Spell) + return; + + Unit* target = NULL; + + switch (Death_Target_Type) + { + case CAST_SELF: + target = m_creature; + break; + case CAST_HOSTILE_TARGET: + target = m_creature->getVictim(); + break; + case CAST_HOSTILE_SECOND_AGGRO: + target = SelectUnit(SELECT_TARGET_TOPAGGRO,1); + break; + case CAST_HOSTILE_LAST_AGGRO: + target = SelectUnit(SELECT_TARGET_BOTTOMAGGRO,0); + break; + case CAST_HOSTILE_RANDOM: + target = SelectUnit(SELECT_TARGET_RANDOM,0); + break; + case CAST_JUSTDIED_KILLER: + target = killer; + break; + } + + //Target is ok, cast a spell on it + if (target) + DoCast(target, Death_Spell); +} + +void SimpleAI::UpdateAI(const uint32 diff) +{ + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Spells + for (uint32 i = 0; i < 10; ++i) + { + //Spell not valid + if (!Spell[i].Enabled || !Spell[i].Spell_Id) + continue; + + if (Spell_Timer[i] < diff) + { + //Check if this is a percentage based + if (Spell[i].First_Cast < 0 && Spell[i].First_Cast > -100 && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() > -Spell[i].First_Cast) + continue; + + //Check Current spell + if (!(Spell[i].InterruptPreviousCast && m_creature->IsNonMeleeSpellCasted(false))) + { + Unit* target = NULL; + + switch (Spell[i].Cast_Target_Type) + { + case CAST_SELF: + target = m_creature; + break; + case CAST_HOSTILE_TARGET: + target = m_creature->getVictim(); + break; + case CAST_HOSTILE_SECOND_AGGRO: + target = SelectUnit(SELECT_TARGET_TOPAGGRO,1); + break; + case CAST_HOSTILE_LAST_AGGRO: + target = SelectUnit(SELECT_TARGET_BOTTOMAGGRO,0); + break; + case CAST_HOSTILE_RANDOM: + target = SelectUnit(SELECT_TARGET_RANDOM,0); + break; + } + + //Target is ok, cast a spell on it and then do our random yell + if (target) + { + if (m_creature->IsNonMeleeSpellCasted(false)) + m_creature->InterruptNonMeleeSpells(false); + + DoCast(target, Spell[i].Spell_Id); + + //Yell and sound use the same number so that you can make + //the creature yell with the correct sound effect attached + uint32 random_text = urand(0, 2); + + //Random yell + if (Spell[i].TextId[random_text]) + DoScriptText(Spell[i].TextId[random_text], m_creature, target); + + //Random sound + if (Spell[i].Text_Sound[random_text]) + DoPlaySoundToSet(m_creature, Spell[i].Text_Sound[random_text]); + } + + } + + //Spell will cast agian when the cooldown is up + if (Spell[i].CooldownRandomAddition) + Spell_Timer[i] = Spell[i].Cooldown + (rand() % Spell[i].CooldownRandomAddition); + else Spell_Timer[i] = Spell[i].Cooldown; + + }else Spell_Timer[i] -= diff; + + } + + DoMeleeAttackIfReady(); +} diff --git a/base/simple_ai.h b/base/simple_ai.h new file mode 100644 index 000000000..f9a5765e0 --- /dev/null +++ b/base/simple_ai.h @@ -0,0 +1,70 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 +* This program is free software licensed under GPL version 2 +* Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef SC_SIMPLEAI_H +#define SC_SIMPLEAI_H + +enum CastTarget +{ + CAST_SELF = 0, //Self cast + CAST_HOSTILE_TARGET, //Our current target (ie: highest aggro) + CAST_HOSTILE_SECOND_AGGRO, //Second highest aggro (generaly used for cleaves and some special attacks) + CAST_HOSTILE_LAST_AGGRO, //Dead last on aggro (no idea what this could be used for) + CAST_HOSTILE_RANDOM, //Just any random target on our threat list + CAST_FRIENDLY_RANDOM, //NOT YET IMPLEMENTED + + //Special cases + CAST_KILLEDUNIT_VICTIM, //Only works within KilledUnit function + CAST_JUSTDIED_KILLER, //Only works within JustDied function +}; + +struct MANGOS_DLL_DECL SimpleAI : public ScriptedAI +{ + SimpleAI(Creature* pCreature);// : ScriptedAI(pCreature); + + void Reset(); + + void Aggro(Unit *who); + + void KilledUnit(Unit *victim); + + void DamageTaken(Unit *killer, uint32 &damage); + + void UpdateAI(const uint32 diff); + +public: + + int32 Aggro_TextId[3]; + uint32 Aggro_Sound[3]; + + int32 Death_TextId[3]; + uint32 Death_Sound[3]; + uint32 Death_Spell; + uint32 Death_Target_Type; + + int32 Kill_TextId[3]; + uint32 Kill_Sound[3]; + uint32 Kill_Spell; + uint32 Kill_Target_Type; + + struct SimpleAI_Spell + { + uint32 Spell_Id; //Spell ID to cast + int32 First_Cast; //Delay for first cast + uint32 Cooldown; //Cooldown between casts + uint32 CooldownRandomAddition; //Random addition to cooldown (in range from 0 - CooldownRandomAddition) + uint32 Cast_Target_Type; //Target type (note that certain spells may ignore this) + bool InterruptPreviousCast; //Interrupt a previous cast if this spell needs to be cast + bool Enabled; //Spell enabled or disabled (default: false) + + //3 texts to many? + int32 TextId[3]; + uint32 Text_Sound[3]; + }Spell[10]; + +protected: + uint32 Spell_Timer[10]; +}; + +#endif diff --git a/config.h b/config.h new file mode 100644 index 000000000..bb3caf880 --- /dev/null +++ b/config.h @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2005-2009 MaNGOS + * + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef SC_CONFIG_H +#define SC_CONFIG_H + +#include "Platform/CompilerDefs.h" +#include "revision.h" + +// Format is YYYYMMDDRR where RR is the change in the conf file +// for that day. +#define SD2_CONF_VERSION 2009040501 + +#ifdef WIN32 + #define MANGOS_DLL_EXPORT extern "C" __declspec(dllexport) +#elif defined( __GNUC__ ) + #define MANGOS_DLL_EXPORT extern "C" +#else + #define MANGOS_DLL_EXPORT extern "C" export +#endif + +#ifndef _VERSION + #define _VERSION "Revision [" REVISION_ID "] " REVISION_DATE " " REVISION_TIME +#endif + +// The path to config files +#ifndef SYSCONFDIR + #define SYSCONFDIR "" +#endif + +#if PLATFORM == PLATFORM_WINDOWS + #ifdef _WIN64 + #define _FULLVERSION _VERSION " (Win64)" + #else + #define _FULLVERSION _VERSION " (Win32)" + #endif + #define _SCRIPTDEV2_CONFIG "scriptdev2.conf" +#else + #define _FULLVERSION _VERSION " (Unix)" + #define _SCRIPTDEV2_CONFIG SYSCONFDIR"scriptdev2.conf" +#endif + +#endif diff --git a/config.h.in b/config.h.in new file mode 100644 index 000000000..bb3caf880 --- /dev/null +++ b/config.h.in @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2005-2009 MaNGOS + * + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef SC_CONFIG_H +#define SC_CONFIG_H + +#include "Platform/CompilerDefs.h" +#include "revision.h" + +// Format is YYYYMMDDRR where RR is the change in the conf file +// for that day. +#define SD2_CONF_VERSION 2009040501 + +#ifdef WIN32 + #define MANGOS_DLL_EXPORT extern "C" __declspec(dllexport) +#elif defined( __GNUC__ ) + #define MANGOS_DLL_EXPORT extern "C" +#else + #define MANGOS_DLL_EXPORT extern "C" export +#endif + +#ifndef _VERSION + #define _VERSION "Revision [" REVISION_ID "] " REVISION_DATE " " REVISION_TIME +#endif + +// The path to config files +#ifndef SYSCONFDIR + #define SYSCONFDIR "" +#endif + +#if PLATFORM == PLATFORM_WINDOWS + #ifdef _WIN64 + #define _FULLVERSION _VERSION " (Win64)" + #else + #define _FULLVERSION _VERSION " (Win32)" + #endif + #define _SCRIPTDEV2_CONFIG "scriptdev2.conf" +#else + #define _FULLVERSION _VERSION " (Unix)" + #define _SCRIPTDEV2_CONFIG SYSCONFDIR"scriptdev2.conf" +#endif + +#endif diff --git a/docs/How to install.txt b/docs/How to install.txt new file mode 100644 index 000000000..7bf184749 --- /dev/null +++ b/docs/How to install.txt @@ -0,0 +1,53 @@ + +--- How to install ScriptDev2 --- + +1) Download MaNGOS (using git clone) + +2) Do the source stuff: + +MS Windows: +- Create a new folder under "src\bindings\" within the MaNGOS source called "ScriptDev2" +- Checkout the ScriptDev2 trunk from "https://scriptdev2.svn.sourceforge.net/svnroot/scriptdev2" +- Apply the Git patch to Mangos - "git am src/bindings/ScriptDev2/patches/MaNGOS-XXXX-ScriptDev2.patch" ('XXXX' is revision number for Mangos). (Note this is not required for compile, but needed to avoid deletion of untracked folders/files in GIT-directory when using certain GIT commands (example: git clean -f -d)) +- Compile MaNGOS +- Compile ScriptDev2 using the ScriptVC80 or ScriptVC90 Solution within the ScriptDev2 folder (this will overwrite the Mangoscript dll in the output directory) + +GNU/Linux: +- Checkout the ScriptDev2 to "src/bindings/ScriptDev2" - "svn co https://scriptdev2.svn.sourceforge.net/svnroot/scriptdev2 src/bindings/ScriptDev2" +SVN: +- Apply MaNGOS-XXXX-ScriptDev2.patch to Mangos, where XXXX is the highest version to that of your MaNGOS revision. +GIT: +- Apply the Git patch to Mangos - "git am src/bindings/ScriptDev2/patches/MaNGOS-XXXX-ScriptDev2.patch" + +- Compile MaNGOS (ScriptDev2 will automatically be built when compiling Mangos from here on) + +3) Create the default ScriptDev2 database using +"sql\scriptdev2_create_database.sql", then execute +"sql\scriptdev2_create_structure.sql" on that database. + +4) Execute the following on your ScriptDev2 database. +- sql\scriptdev2_script_full.sql + +5) Execute the following file on your MaNGOS database. +- sql\mangos_scriptname_full.sql + +6) Place the included "scriptdev2.conf" file within the directory containing your "mangosd.conf" and "realmd.conf" files. You may need to change this file to match the database you created and any custom settings you wish to use. Note this file will be different created for Unix based systems. + +7) Run mangosd from your output directory + + +To update ScriptDev2: + +MS Windows: +- All you have to do is open src\bindings\ and right click on the ScriptDev2 folder and click "Update" and then follow steps 4, 6, and 7 again. You must still compile MaNGOS before ScriptDev2 when on the Windows platform. + +GNU/Linux: +- Go to the src/bindings/ScriptDev2 directory - "cd src/bindings/ScriptDev2" +- Update ScriptDev2 - "svn up" + +To update your Database with new Scriptdev2 SQL changes you can either: +a) apply only the changes that were made during that revision by looking in the sql\update folder or (files named rXXX_scriptdev2.sql should be executed on the scriptdev2 db while rXXX_mangos.sql should be executed on your mangos db) +b) reapply "mangos_scriptname_full.sql" to your MaNGOS database. + +You can view the ScriptDev2 Change Log at: +http://scriptdev2.svn.sourceforge.net/viewvc/scriptdev2/?view=log diff --git a/docs/LICENSE.txt b/docs/LICENSE.txt new file mode 100644 index 000000000..69cd8a1df --- /dev/null +++ b/docs/LICENSE.txt @@ -0,0 +1,280 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/docs/Script Layout.txt b/docs/Script Layout.txt new file mode 100644 index 000000000..a66cb3565 --- /dev/null +++ b/docs/Script Layout.txt @@ -0,0 +1,32 @@ +--- Script Layout --- +A quick explanation of the layout I hope everyone will follow for scriptdev2. + +--- Sub Folders --- + +Area - Contains scripts used solely by area triggers + +Boss - Boss scripts for bosses that are not zone specific + +Mob - Generic Creature scripts for creatures that are not zone specific + +Custom - Intentionally empty folder from SVN. If you make a custom script please put it here. + +GO - Contains scripts used solely by Game Objects (GOs) that do not have a specific zone + +Guard - Scripts for Guard NPCs + +Honor - Honor npcs (currently a blank script as these npcs do nothing special) + +Item - Item scripts + +NPC - Scripts for individual NPCs who do not have a specific zone + +Servers - Generic NPC servers script for things such as flightmasters and guildmasters. + +Zone - ALL zone specific scripts should be written within these folders. This includes creature scripts, boss scripts, go scripts, area scripts, and npc scripts. + +--- Naming Conventions --- + +Please keep file names to "type_objectname.cpp" where type is replaced by the type of object and objectname is replaced by the name of the object, creature, item, or area that this script will be used by. + +AddSC functions should follow "void AddSC_creaturename(void);" format. Do not append AI or anything else. diff --git a/docs/Text-tables.txt b/docs/Text-tables.txt new file mode 100644 index 000000000..11c419720 --- /dev/null +++ b/docs/Text-tables.txt @@ -0,0 +1,86 @@ +========================================= +Texts Documentation +========================================= + +Scriptdev2 Revision 695 introduces a new format for using texts in EventAI and SD2 Scripts. +This information relates to the *_texts tables located in the ScriptDev Database. + +Any script can at any time access and use text from any of the three text tables, as long as the entry does in fact exist. +Custom scripters are advised to store their text data in custom_texts. + +The different tables has ranges of entries allowed for that table. +Reserved EventAI in Mangos entry -1 -> -999999 +script_texts: entry -1000000 -> -1999999 +custom_texts: entry -2000000 -> -2999999 +Any entry out of range for that table will display a start-up error. + + +========================================= +Basic Structure of script_texts and custom_texts +========================================= +Below is a the list of current fields within the texts tables. + +Field_Name Description +----------------------------------------------------------- +entry This value is mearly an NEGATIVE identifier of the current text number. Required for sql queries. +content_default This is the actual text presented in the default language (English). + +content_loc1 This is the actual text presented in the Localization #1 Clients (Korean) +content_loc2 This is the actual text presented in the Localization #2 Clients (French) +content_loc3 This is the actual text presented in the Localization #3 Clients (German) +content_loc4 This is the actual text presented in the Localization #4 Clients (Chinese) +content_loc5 This is the actual text presented in the Localization #5 Clients (Taiwanese) +content_loc6 This is the actual text presented in the Localization #6 Clients (Spanish) +content_loc7 This is the actual text presented in the Localization #7 Clients (Spanish Mexico) +content_loc8 This is the actual text presented in the Localization #8 Clients (Russian) + +sound This value is the Sound ID that corresponds to the actual text used (Defined in SoundEntries.dbc). +type Variables used to define type of text (Say/Yell/Textemote/Whisper). +language This value is the Language that the text is native in (Defined in Languages.dbc). +emote Value from enum Emote (defined in Emotes.dbc). Only source of text will play this emote (not target, if target are defined in DoScriptText) +comment This is a comment regarding the text entry (For ACID, accepted format is to use Creature ID of NPC using it). + +Note: Fields `content_loc1` to `content_loc8` are NULL values by default and are handled by separate localization projects. + + +========================================= +Text Types (type) +========================================= +Below is the list of current Text types that texts tables can handle. These were previously separate Actions in ACID. + +# Internal Name Description +----------------------------------------------------------- +0 CHAT_TYPE_SAY This type sets the text to be displayed as a Say (Speech Bubble). +1 CHAT_TYPE_YELL This type sets the text to be displayed as a Yell (Red Speech Bubble) and usually has a matching Sound ID. +2 CHAT_TYPE_TEXT_EMOTE This type sets the text to be displayed as a text emote in orange in the chat log. +3 CHAT_TYPE_BOSS_EMOTE This type sets the text to be displayed as a text emote in orange in the chat log (Used only for specific Bosses). +4 CHAT_TYPE_WHISPER This type sets the text to be displayed as a whisper to the player in the chat log. +5 CHAT_TYPE_BOSS_WHISPER This type sets the text to be displayed as a whisper to the player in the chat log (Used only for specific Bosses). +6 CHAT_TYPE_ZONE_YELL Same as CHAT_TYPE_YELL but will display to all players in current zone. + +========================================= +Language Types (language) +========================================= +Below is the list of current Language types that are allowed. +This is the Race Language that the text is native to (So it will display properly) + +# Internal Name Description +----------------------------------------------------------- +0 UNIVERSAL Text in this language is understood by ALL Races. +1 ORCISH Text in this language is understood ONLY by Horde Races. +2 DARNASSIAN Text in this language is understood ONLY by the Night Elf Race. +3 TAURAHE Text in this language is understood ONLY by the Tauren Race. +6 DWARVISH Text in this language is understood ONLY by the Dwarf Race. +7 COMMON Text in this language is understood ONLY by Alliance Races. +8 DEMONIC Text in this language is understood ONLY by the Demon Race (Not Implemented). +9 TITAN This language was used by Sargeras to speak with other Titians (Not Implemented). +10 THALASSIAN Text in this language is understood ONLY by the Blood Elf Race. +11 DRACONIC Text in this language is understood ONLY by the Dragon Race. +12 KALIMAG Text will display as Kalimag (not readable by players, language of all elementals) +13 GNOMISH Text in this language is understood ONLY by the Gnome Race. +14 TROLL Text in this language is understood ONLY by the Troll Race. +33 GUTTERSPEAK Text in this language is understood ONLY by the Undead Race. +35 DRAENEI Text in this language is understood ONLY by the Draenai Race. +36 ZOMBIE (not currently used?) +37 GNOMISH BINARY Binary language used by Alliance when drinking Binary Brew +38 GOBLIN BINARY Binary language used by Horde when drinking Binary Brew diff --git a/docs/ToDo.txt b/docs/ToDo.txt new file mode 100644 index 000000000..5df315da0 --- /dev/null +++ b/docs/ToDo.txt @@ -0,0 +1,14 @@ +--- TO DO --- +Simple list of things we need to do. + +--- ScriptDev2 Framework --- +Move all text out of C++ code and into SD2 database. + +--- Scripting with Priorities --- +1) Boss AI and Boss Event scripts +2) Specific NPC AI, Gossip, Quest, Event scripts +3) Spell and Item scripts + +--- Core Problems --- + +- Spell scripts are only scriptable within the core. Spell scripts should be done in SD2 since they are very specialized. \ No newline at end of file diff --git a/include/precompiled.cpp b/include/precompiled.cpp new file mode 100644 index 000000000..faeca72cd --- /dev/null +++ b/include/precompiled.cpp @@ -0,0 +1,5 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 +* This program is free software licensed under GPL version 2 +* Please see the included DOCS/LICENSE.TXT for more information */ + +#include "precompiled.h" diff --git a/include/precompiled.h b/include/precompiled.h new file mode 100644 index 000000000..d22cadbdf --- /dev/null +++ b/include/precompiled.h @@ -0,0 +1,25 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 +* This program is free software licensed under GPL version 2 +* Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef SC_PRECOMPILED_H +#define SC_PRECOMPILED_H + +#include "../ScriptMgr.h" +#include "sc_creature.h" +#include "sc_gossip.h" +#include "sc_grid_searchers.h" +#include "sc_instance.h" + +#ifdef WIN32 +#include +BOOL APIENTRY DllMain( HANDLE hModule, +DWORD ul_reason_for_call, +LPVOID lpReserved +) +{ + return true; +} +#endif + +#endif diff --git a/include/sc_creature.cpp b/include/sc_creature.cpp new file mode 100644 index 000000000..db6a28d14 --- /dev/null +++ b/include/sc_creature.cpp @@ -0,0 +1,626 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#include "precompiled.h" +#include "Item.h" +#include "Spell.h" +#include "WorldPacket.h" +#include "ObjectMgr.h" + +// Spell summary for ScriptedAI::SelectSpell +struct TSpellSummary +{ + uint8 Targets; // set of enum SelectTarget + uint8 Effects; // set of enum SelectEffect +} *SpellSummary; + +ScriptedAI::ScriptedAI(Creature* pCreature) : CreatureAI(pCreature), + m_bCombatMovement(true), + m_uiEvadeCheckCooldown(2500) +{} + +bool ScriptedAI::IsVisible(Unit* pWho) const +{ + if (!pWho) + return false; + + return m_creature->IsWithinDist(pWho, VISIBLE_RANGE) && pWho->isVisibleForOrDetect(m_creature, m_creature, true); +} + +void ScriptedAI::MoveInLineOfSight(Unit* pWho) +{ + if (!m_creature->hasUnitState(UNIT_STAT_STUNNED) && pWho->isTargetableForAttack() && + m_creature->IsHostileTo(pWho) && pWho->isInAccessablePlaceFor(m_creature)) + { + if (!m_creature->canFly() && m_creature->GetDistanceZ(pWho) > CREATURE_Z_ATTACK_RANGE) + return; + + if (m_creature->IsWithinDistInMap(pWho, m_creature->GetAttackDistance(pWho)) && m_creature->IsWithinLOSInMap(pWho)) + { + if (!m_creature->getVictim()) + { + pWho->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); + AttackStart(pWho); + } + else if (m_creature->GetMap()->IsDungeon()) + { + pWho->SetInCombatWith(m_creature); + m_creature->AddThreat(pWho, 0.0f); + } + } + } +} + +void ScriptedAI::AttackStart(Unit* pWho) +{ + if (!pWho) + return; + + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho, 0.0f); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + + if (IsCombatMovement()) + m_creature->GetMotionMaster()->MoveChase(pWho); + } +} + +void ScriptedAI::EnterCombat(Unit* pEnemy) +{ + if (!pEnemy) + return; + + Aggro(pEnemy); +} + +void ScriptedAI::Aggro(Unit* pEnemy) +{ +} + +void ScriptedAI::UpdateAI(const uint32 uiDiff) +{ + //Check if we have a current target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_creature->isAttackReady()) + { + //If we are within range melee the target + if (m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE)) + { + m_creature->AttackerStateUpdate(m_creature->getVictim()); + m_creature->resetAttackTimer(); + } + } +} + +void ScriptedAI::EnterEvadeMode() +{ + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->LoadCreaturesAddon(); + + if (m_creature->isAlive()) + m_creature->GetMotionMaster()->MoveTargetedHome(); + + m_creature->SetLootRecipient(NULL); + + Reset(); +} + +void ScriptedAI::JustRespawned() +{ + Reset(); +} + +void ScriptedAI::DoStartMovement(Unit* pVictim, float fDistance, float fAngle) +{ + if (pVictim) + m_creature->GetMotionMaster()->MoveChase(pVictim, fDistance, fAngle); +} + +void ScriptedAI::DoStartNoMovement(Unit* pVictim) +{ + if (!pVictim) + return; + + m_creature->GetMotionMaster()->MoveIdle(); + m_creature->StopMoving(); +} + +void ScriptedAI::DoMeleeAttackIfReady() +{ + //Make sure our attack is ready before checking distance + if (m_creature->isAttackReady()) + { + //If we are within range melee the target + if (m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE)) + { + m_creature->AttackerStateUpdate(m_creature->getVictim()); + m_creature->resetAttackTimer(); + } + } +} + +void ScriptedAI::DoStopAttack() +{ + if (m_creature->getVictim()) + m_creature->AttackStop(); +} + +void ScriptedAI::DoCast(Unit* pTarget, uint32 uiSpellId, bool bTriggered) +{ + if (!pTarget || m_creature->IsNonMeleeSpellCasted(false)) + return; + + m_creature->StopMoving(); + m_creature->CastSpell(pTarget, uiSpellId, bTriggered); +} + +void ScriptedAI::DoCastSpell(Unit* pTarget, SpellEntry const* pSpellInfo, bool bTriggered) +{ + if (!pTarget || m_creature->IsNonMeleeSpellCasted(false)) + return; + + m_creature->StopMoving(); + m_creature->CastSpell(pTarget, pSpellInfo, bTriggered); +} + +void ScriptedAI::DoPlaySoundToSet(WorldObject* pSource, uint32 uiSoundId) +{ + if (!pSource) + return; + + if (!GetSoundEntriesStore()->LookupEntry(uiSoundId)) + { + error_log("SD2: Invalid soundId %u used in DoPlaySoundToSet (Source: TypeId %u, GUID %u)", uiSoundId, pSource->GetTypeId(), pSource->GetGUIDLow()); + return; + } + + pSource->PlayDirectSound(uiSoundId); +} + +Creature* ScriptedAI::DoSpawnCreature(uint32 uiId, float fX, float fY, float fZ, float fAngle, uint32 uiType, uint32 uiDespawntime) +{ + return m_creature->SummonCreature(uiId,m_creature->GetPositionX()+fX, m_creature->GetPositionY()+fY, m_creature->GetPositionZ()+fZ, fAngle, (TempSummonType)uiType, uiDespawntime); +} + +Unit* ScriptedAI::SelectUnit(SelectAggroTarget target, uint32 uiPosition) +{ + //ThreatList m_threatlist; + std::list& threatlist = m_creature->getThreatManager().getThreatList(); + std::list::iterator itr = threatlist.begin(); + std::list::reverse_iterator ritr = threatlist.rbegin(); + + if (uiPosition >= threatlist.size() || !threatlist.size()) + return NULL; + + switch (target) + { + case SELECT_TARGET_RANDOM: + advance(itr, uiPosition + (rand() % (threatlist.size() - uiPosition))); + return Unit::GetUnit((*m_creature),(*itr)->getUnitGuid()); + break; + + case SELECT_TARGET_TOPAGGRO: + advance(itr, uiPosition); + return Unit::GetUnit((*m_creature),(*itr)->getUnitGuid()); + break; + + case SELECT_TARGET_BOTTOMAGGRO: + advance(ritr, uiPosition); + return Unit::GetUnit((*m_creature),(*ritr)->getUnitGuid()); + break; + } + + return NULL; +} + +SpellEntry const* ScriptedAI::SelectSpell(Unit* pTarget, int32 uiSchool, int32 uiMechanic, SelectTarget selectTargets, uint32 uiPowerCostMin, uint32 uiPowerCostMax, float fRangeMin, float fRangeMax, SelectEffect selectEffects) +{ + //No target so we can't cast + if (!pTarget) + return false; + + //Silenced so we can't cast + if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SILENCED)) + return false; + + //Using the extended script system we first create a list of viable spells + SpellEntry const* apSpell[4]; + memset(apSpell, 0, sizeof(SpellEntry*)*4); + + uint32 uiSpellCount = 0; + + SpellEntry const* pTempSpell; + SpellRangeEntry const* pTempRange; + + //Check if each spell is viable(set it to null if not) + for (uint32 i = 0; i < 4; ++i) + { + pTempSpell = GetSpellStore()->LookupEntry(m_creature->m_spells[i]); + + //This spell doesn't exist + if (!pTempSpell) + continue; + + // Targets and Effects checked first as most used restrictions + //Check the spell targets if specified + if (selectTargets && !(SpellSummary[m_creature->m_spells[i]].Targets & (1 << (selectTargets-1)))) + continue; + + //Check the type of spell if we are looking for a specific spell type + if (selectEffects && !(SpellSummary[m_creature->m_spells[i]].Effects & (1 << (selectEffects-1)))) + continue; + + //Check for school if specified + if (uiSchool >= 0 && pTempSpell->SchoolMask & uiSchool) + continue; + + //Check for spell mechanic if specified + if (uiMechanic >= 0 && pTempSpell->Mechanic != uiMechanic) + continue; + + //Make sure that the spell uses the requested amount of power + if (uiPowerCostMin && pTempSpell->manaCost < uiPowerCostMin) + continue; + + if (uiPowerCostMax && pTempSpell->manaCost > uiPowerCostMax) + continue; + + //Continue if we don't have the mana to actually cast this spell + if (pTempSpell->manaCost > m_creature->GetPower((Powers)pTempSpell->powerType)) + continue; + + //Get the Range + pTempRange = GetSpellRangeStore()->LookupEntry(pTempSpell->rangeIndex); + + //Spell has invalid range store so we can't use it + if (!pTempRange) + continue; + + //Check if the spell meets our range requirements + if (fRangeMin && pTempRange->maxRange < fRangeMin) + continue; + + if (fRangeMax && pTempRange->maxRange > fRangeMax) + continue; + + //Check if our target is in range + if (m_creature->IsWithinDistInMap(pTarget, pTempRange->minRange) || !m_creature->IsWithinDistInMap(pTarget, pTempRange->maxRange)) + continue; + + //All good so lets add it to the spell list + apSpell[uiSpellCount] = pTempSpell; + ++uiSpellCount; + } + + //We got our usable spells so now lets randomly pick one + if (!uiSpellCount) + return NULL; + + return apSpell[rand()%uiSpellCount]; +} + +bool ScriptedAI::CanCast(Unit* pTarget, SpellEntry const* pSpellEntry, bool bTriggered) +{ + //No target so we can't cast + if (!pTarget || !pSpellEntry) + return false; + + //Silenced so we can't cast + if (!bTriggered && m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SILENCED)) + return false; + + //Check for power + if (!bTriggered && m_creature->GetPower((Powers)pSpellEntry->powerType) < pSpellEntry->manaCost) + return false; + + SpellRangeEntry const* pTempRange = GetSpellRangeStore()->LookupEntry(pSpellEntry->rangeIndex); + + //Spell has invalid range store so we can't use it + if (!pTempRange) + return false; + + //Unit is out of range of this spell + if (!m_creature->IsInRange(pTarget, pTempRange->minRange, pTempRange->maxRange)) + return false; + + return true; +} + +void FillSpellSummary() +{ + SpellSummary = new TSpellSummary[GetSpellStore()->GetNumRows()]; + + SpellEntry const* pTempSpell; + + for (int i=0; i < GetSpellStore()->GetNumRows(); ++i) + { + SpellSummary[i].Effects = 0; + SpellSummary[i].Targets = 0; + + pTempSpell = GetSpellStore()->LookupEntry(i); + //This spell doesn't exist + if (!pTempSpell) + continue; + + for (int j=0; j<3; ++j) + { + //Spell targets self + if (pTempSpell->EffectImplicitTargetA[j] == TARGET_SELF) + SpellSummary[i].Targets |= 1 << (SELECT_TARGET_SELF-1); + + //Spell targets a single enemy + if (pTempSpell->EffectImplicitTargetA[j] == TARGET_CHAIN_DAMAGE || + pTempSpell->EffectImplicitTargetA[j] == TARGET_CURRENT_ENEMY_COORDINATES) + SpellSummary[i].Targets |= 1 << (SELECT_TARGET_SINGLE_ENEMY-1); + + //Spell targets AoE at enemy + if (pTempSpell->EffectImplicitTargetA[j] == TARGET_ALL_ENEMY_IN_AREA || + pTempSpell->EffectImplicitTargetA[j] == TARGET_ALL_ENEMY_IN_AREA_INSTANT || + pTempSpell->EffectImplicitTargetA[j] == TARGET_CASTER_COORDINATES || + pTempSpell->EffectImplicitTargetA[j] == TARGET_ALL_ENEMY_IN_AREA_CHANNELED) + SpellSummary[i].Targets |= 1 << (SELECT_TARGET_AOE_ENEMY-1); + + //Spell targets an enemy + if (pTempSpell->EffectImplicitTargetA[j] == TARGET_CHAIN_DAMAGE || + pTempSpell->EffectImplicitTargetA[j] == TARGET_CURRENT_ENEMY_COORDINATES || + pTempSpell->EffectImplicitTargetA[j] == TARGET_ALL_ENEMY_IN_AREA || + pTempSpell->EffectImplicitTargetA[j] == TARGET_ALL_ENEMY_IN_AREA_INSTANT || + pTempSpell->EffectImplicitTargetA[j] == TARGET_CASTER_COORDINATES || + pTempSpell->EffectImplicitTargetA[j] == TARGET_ALL_ENEMY_IN_AREA_CHANNELED) + SpellSummary[i].Targets |= 1 << (SELECT_TARGET_ANY_ENEMY-1); + + //Spell targets a single friend(or self) + if (pTempSpell->EffectImplicitTargetA[j] == TARGET_SELF || + pTempSpell->EffectImplicitTargetA[j] == TARGET_SINGLE_FRIEND || + pTempSpell->EffectImplicitTargetA[j] == TARGET_SINGLE_PARTY) + SpellSummary[i].Targets |= 1 << (SELECT_TARGET_SINGLE_FRIEND-1); + + //Spell targets aoe friends + if (pTempSpell->EffectImplicitTargetA[j] == TARGET_ALL_PARTY_AROUND_CASTER || + pTempSpell->EffectImplicitTargetA[j] == TARGET_AREAEFFECT_PARTY || + pTempSpell->EffectImplicitTargetA[j] == TARGET_CASTER_COORDINATES) + SpellSummary[i].Targets |= 1 << (SELECT_TARGET_AOE_FRIEND-1); + + //Spell targets any friend(or self) + if (pTempSpell->EffectImplicitTargetA[j] == TARGET_SELF || + pTempSpell->EffectImplicitTargetA[j] == TARGET_SINGLE_FRIEND || + pTempSpell->EffectImplicitTargetA[j] == TARGET_SINGLE_PARTY || + pTempSpell->EffectImplicitTargetA[j] == TARGET_ALL_PARTY_AROUND_CASTER || + pTempSpell->EffectImplicitTargetA[j] == TARGET_AREAEFFECT_PARTY || + pTempSpell->EffectImplicitTargetA[j] == TARGET_CASTER_COORDINATES) + SpellSummary[i].Targets |= 1 << (SELECT_TARGET_ANY_FRIEND-1); + + //Make sure that this spell includes a damage effect + if (pTempSpell->Effect[j] == SPELL_EFFECT_SCHOOL_DAMAGE || + pTempSpell->Effect[j] == SPELL_EFFECT_INSTAKILL || + pTempSpell->Effect[j] == SPELL_EFFECT_ENVIRONMENTAL_DAMAGE || + pTempSpell->Effect[j] == SPELL_EFFECT_HEALTH_LEECH) + SpellSummary[i].Effects |= 1 << (SELECT_EFFECT_DAMAGE-1); + + //Make sure that this spell includes a healing effect (or an apply aura with a periodic heal) + if (pTempSpell->Effect[j] == SPELL_EFFECT_HEAL || + pTempSpell->Effect[j] == SPELL_EFFECT_HEAL_MAX_HEALTH || + pTempSpell->Effect[j] == SPELL_EFFECT_HEAL_MECHANICAL || + (pTempSpell->Effect[j] == SPELL_EFFECT_APPLY_AURA && pTempSpell->EffectApplyAuraName[j]== 8)) + SpellSummary[i].Effects |= 1 << (SELECT_EFFECT_HEALING-1); + + //Make sure that this spell applies an aura + if (pTempSpell->Effect[j] == SPELL_EFFECT_APPLY_AURA) + SpellSummary[i].Effects |= 1 << (SELECT_EFFECT_AURA-1); + } + } +} + +void ScriptedAI::DoResetThreat() +{ + if (!m_creature->CanHaveThreatList() || m_creature->getThreatManager().isThreatListEmpty()) + { + error_log("SD2: DoResetThreat called for creature that either cannot have threat list or has empty threat list (m_creature entry = %d)", m_creature->GetEntry()); + return; + } + + std::list& threatlist = m_creature->getThreatManager().getThreatList(); + + for(std::list::iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr) + { + Unit* pUnit = Unit::GetUnit((*m_creature), (*itr)->getUnitGuid()); + + if (pUnit && m_creature->getThreatManager().getThreat(pUnit)) + m_creature->getThreatManager().modifyThreatPercent(pUnit, -100); + } +} + +void ScriptedAI::DoTeleportPlayer(Unit* pUnit, float fX, float fY, float fZ, float fO) +{ + if (!pUnit || pUnit->GetTypeId() != TYPEID_PLAYER) + { + if (pUnit) + error_log("SD2: Creature %u (Entry: %u) Tried to teleport non-player unit (Type: %u GUID: %u) to x: %f y:%f z: %f o: %f. Aborted.", m_creature->GetGUID(), m_creature->GetEntry(), pUnit->GetTypeId(), pUnit->GetGUID(), fX, fY, fZ, fO); + + return; + } + + ((Player*)pUnit)->TeleportTo(pUnit->GetMapId(), fX, fY, fZ, fO, TELE_TO_NOT_LEAVE_COMBAT); +} + +Unit* ScriptedAI::DoSelectLowestHpFriendly(float fRange, uint32 uiMinHPDiff) +{ + CellPair p(MaNGOS::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY())); + Cell cell(p); + cell.data.Part.reserved = ALL_DISTRICT; + cell.SetNoCreate(); + + Unit* pUnit = NULL; + + MaNGOS::MostHPMissingInRange u_check(m_creature, fRange, uiMinHPDiff); + MaNGOS::UnitLastSearcher searcher(m_creature, pUnit, u_check); + + /* + typedef TYPELIST_4(GameObject, Creature*except pets*, DynamicObject, Corpse*Bones*) AllGridObjectTypes; + This means that if we only search grid then we cannot possibly return pets or players so this is safe + */ + TypeContainerVisitor, GridTypeMapContainer > grid_unit_searcher(searcher); + + CellLock cell_lock(cell, p); + cell_lock->Visit(cell_lock, grid_unit_searcher, *(m_creature->GetMap())); + + return pUnit; +} + +std::list ScriptedAI::DoFindFriendlyCC(float fRange) +{ + CellPair p(MaNGOS::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY())); + Cell cell(p); + cell.data.Part.reserved = ALL_DISTRICT; + cell.SetNoCreate(); + + std::list pList; + + MaNGOS::FriendlyCCedInRange u_check(m_creature, fRange); + MaNGOS::CreatureListSearcher searcher(m_creature, pList, u_check); + + TypeContainerVisitor, GridTypeMapContainer > grid_creature_searcher(searcher); + + CellLock cell_lock(cell, p); + cell_lock->Visit(cell_lock, grid_creature_searcher, *(m_creature->GetMap())); + + return pList; +} + +std::list ScriptedAI::DoFindFriendlyMissingBuff(float fRange, uint32 uiSpellId) +{ + CellPair p(MaNGOS::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY())); + Cell cell(p); + cell.data.Part.reserved = ALL_DISTRICT; + cell.SetNoCreate(); + + std::list pList; + + MaNGOS::FriendlyMissingBuffInRange u_check(m_creature, fRange, uiSpellId); + MaNGOS::CreatureListSearcher searcher(m_creature, pList, u_check); + + TypeContainerVisitor, GridTypeMapContainer > grid_creature_searcher(searcher); + + CellLock cell_lock(cell, p); + cell_lock->Visit(cell_lock, grid_creature_searcher, *(m_creature->GetMap())); + + return pList; +} + +Player* ScriptedAI::GetPlayerAtMinimumRange(float fMinimumRange) +{ + Player* pPlayer = NULL; + + CellPair pair(MaNGOS::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY())); + Cell cell(pair); + cell.data.Part.reserved = ALL_DISTRICT; + cell.SetNoCreate(); + + PlayerAtMinimumRangeAway check(m_creature, fMinimumRange); + MaNGOS::PlayerSearcher searcher(m_creature, pPlayer, check); + TypeContainerVisitor, GridTypeMapContainer> visitor(searcher); + + CellLock cell_lock(cell, pair); + cell_lock->Visit(cell_lock, visitor, *(m_creature->GetMap())); + + return pPlayer; +} + +void ScriptedAI::SetEquipmentSlots(bool bLoadDefault, int32 uiMainHand, int32 uiOffHand, int32 uiRanged) +{ + if (bLoadDefault) + { + m_creature->LoadEquipment(m_creature->GetCreatureInfo()->equipmentId,true); + return; + } + + if (uiMainHand >= 0) + m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 0, uint32(uiMainHand)); + + if (uiOffHand >= 0) + m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 1, uint32(uiOffHand)); + + if (uiRanged >= 0) + m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 2, uint32(uiRanged)); +} + +void ScriptedAI::SetCombatMovement(bool bCombatMove) +{ + m_bCombatMovement = bCombatMove; +} + +// Hacklike storage used for misc creatures that are expected to evade of outside of a certain area. +// It is assumed the information is found elswehere and can be handled by mangos. So far no luck finding such information/way to extract it. +enum +{ + NPC_BROODLORD = 12017, + NPC_VOID_REAVER = 19516, + NPC_JAN_ALAI = 23578, + NPC_SARTHARION = 28860 +}; + +bool ScriptedAI::EnterEvadeIfOutOfCombatArea(const uint32 uiDiff) +{ + if (m_uiEvadeCheckCooldown < uiDiff) + m_uiEvadeCheckCooldown = 2500; + else + { + m_uiEvadeCheckCooldown -= uiDiff; + return false; + } + + if (m_creature->IsInEvadeMode() || !m_creature->getVictim()) + return false; + + float fX = m_creature->GetPositionX(); + float fY = m_creature->GetPositionY(); + float fZ = m_creature->GetPositionZ(); + + switch(m_creature->GetEntry()) + { + case NPC_BROODLORD: // broodlord (not move down stairs) + if (fZ > 448.60f) + return false; + break; + case NPC_VOID_REAVER: // void reaver (calculate from center of room) + if (m_creature->GetDistance2d(432.59f, 371.93f) < 105.0f) + return false; + break; + case NPC_JAN_ALAI: // jan'alai (calculate by Z) + if (fZ > 12.0f) + return false; + break; + case NPC_SARTHARION: // sartharion (calculate box) + if (fX > 3218.86f && fX < 3275.69f && fY < 572.40f && fY > 484.68f) + return false; + break; + default: + error_log("SD2: EnterEvadeIfOutOfCombatArea used for creature entry %u, but does not have any definition.", m_creature->GetEntry()); + return false; + } + + EnterEvadeMode(); + return true; +} + +void Scripted_NoMovementAI::AttackStart(Unit* pWho) +{ + if (!pWho) + return; + + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho, 0.0f); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + + DoStartNoMovement(pWho); + } +} diff --git a/include/sc_creature.h b/include/sc_creature.h new file mode 100644 index 000000000..444e12a59 --- /dev/null +++ b/include/sc_creature.h @@ -0,0 +1,197 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef SC_CREATURE_H +#define SC_CREATURE_H + +#include "CreatureAI.h" +#include "Creature.h" + +//Spell targets used by SelectSpell +enum SelectTarget +{ + SELECT_TARGET_DONTCARE = 0, //All target types allowed + + SELECT_TARGET_SELF, //Only Self casting + + SELECT_TARGET_SINGLE_ENEMY, //Only Single Enemy + SELECT_TARGET_AOE_ENEMY, //Only AoE Enemy + SELECT_TARGET_ANY_ENEMY, //AoE or Single Enemy + + SELECT_TARGET_SINGLE_FRIEND, //Only Single Friend + SELECT_TARGET_AOE_FRIEND, //Only AoE Friend + SELECT_TARGET_ANY_FRIEND, //AoE or Single Friend +}; + +//Spell Effects used by SelectSpell +enum SelectEffect +{ + SELECT_EFFECT_DONTCARE = 0, //All spell effects allowed + SELECT_EFFECT_DAMAGE, //Spell does damage + SELECT_EFFECT_HEALING, //Spell does healing + SELECT_EFFECT_AURA, //Spell applies an aura +}; + +//Selection method used by SelectTarget +enum SelectAggroTarget +{ + SELECT_TARGET_RANDOM = 0, //Just selects a random target + SELECT_TARGET_TOPAGGRO, //Selects targes from top aggro to bottom + SELECT_TARGET_BOTTOMAGGRO, //Selects targets from bottom aggro to top +}; + +enum SCEquip +{ + EQUIP_NO_CHANGE = -1, + EQUIP_UNEQUIP = 0 +}; + +struct MANGOS_DLL_DECL ScriptedAI : public CreatureAI +{ + explicit ScriptedAI(Creature* pCreature); + ~ScriptedAI() {} + + //************* + //CreatureAI Functions + //************* + + //Called if IsVisible(Unit *who) is true at each *who move + void MoveInLineOfSight(Unit*); + + //Called at each attack of m_creature by any victim + void AttackStart(Unit*); + + // Called for reaction at enter to combat if not in combat yet (enemy can be NULL) + void EnterCombat(Unit*); + + //Called at stoping attack by any attacker + void EnterEvadeMode(); + + //Called at any heal cast/item used (call non implemented in mangos) + void HealBy(Unit* pHealer, uint32 uiAmountHealed) {} + + // Called at any Damage to any victim (before damage apply) + void DamageDeal(Unit* pDoneTo, uint32& uiDamage) {} + + // Called at any Damage from any attacker (before damage apply) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) {} + + //Is unit visible for MoveInLineOfSight + bool IsVisible(Unit *who) const; + + //Called at World update tick + void UpdateAI(const uint32); + + //Called at creature death + void JustDied(Unit*) {} + + //Called at creature killing another unit + void KilledUnit(Unit*) {} + + // Called when the creature summon successfully other creature + void JustSummoned(Creature*) {} + + // Called when a summoned creature is despawned + void SummonedCreatureDespawn(Creature*) {} + + // Called when hit by a spell + void SpellHit(Unit*, const SpellEntry*) {} + + // Called when creature is spawned or respawned (for reseting variables) + void JustRespawned(); + + //Called at waypoint reached or PointMovement end + void MovementInform(uint32, uint32) {} + + //************* + // Variables + //************* + + //************* + //Pure virtual functions + //************* + + //Called at creature reset either by death or evade + virtual void Reset() = 0; + + //Called at creature EnterCombat + virtual void Aggro(Unit*); + + //************* + //AI Helper Functions + //************* + + //Start movement toward victim + void DoStartMovement(Unit* pVictim, float fDistance = 0, float fAngle = 0); + + //Start no movement on victim + void DoStartNoMovement(Unit* pVictim); + + //Do melee swing of current victim if in rnage and ready and not casting + void DoMeleeAttackIfReady(); + + //Stop attack of current victim + void DoStopAttack(); + + //Cast spell by Id + void DoCast(Unit* pVictim, uint32 uiSpellId, bool bTriggered = false); + + //Cast spell by spell info + void DoCastSpell(Unit* pwho, SpellEntry const* pSpellInfo, bool bTriggered = false); + + //Plays a sound to all nearby players + void DoPlaySoundToSet(WorldObject* pSource, uint32 uiSoundId); + + //Drops all threat to 0%. Does not remove players from the threat list + void DoResetThreat(); + + //Teleports a player without dropping threat (only teleports to same map) + void DoTeleportPlayer(Unit* pUnit, float fX, float fY, float fZ, float fO); + + //Returns friendly unit with the most amount of hp missing from max hp + Unit* DoSelectLowestHpFriendly(float fRange, uint32 uiMinHPDiff = 1); + + //Returns a list of friendly CC'd units within range + std::list DoFindFriendlyCC(float fRange); + + //Returns a list of all friendly units missing a specific buff within range + std::list DoFindFriendlyMissingBuff(float fRange, uint32 uiSpellId); + + //Return a player with at least minimumRange from m_creature + Player* GetPlayerAtMinimumRange(float fMinimumRange); + + //Spawns a creature relative to m_creature + Creature* DoSpawnCreature(uint32 uiId, float fX, float fY, float fZ, float fAngle, uint32 uiType, uint32 uiDespawntime); + + //Selects a unit from the creature's current aggro list + Unit* SelectUnit(SelectAggroTarget target, uint32 uiPosition); + + //Returns spells that meet the specified criteria from the creatures spell list + SpellEntry const* SelectSpell(Unit* pTarget, int32 uiSchool, int32 uiMechanic, SelectTarget selectTargets, uint32 uiPowerCostMin, uint32 uiPowerCostMax, float fRangeMin, float fRangeMax, SelectEffect selectEffect); + + //Checks if you can cast the specified spell + bool CanCast(Unit* pTarget, SpellEntry const* pSpell, bool bTriggered = false); + + void SetEquipmentSlots(bool bLoadDefault, int32 uiMainHand = EQUIP_NO_CHANGE, int32 uiOffHand = EQUIP_NO_CHANGE, int32 uiRanged = EQUIP_NO_CHANGE); + + //Generally used to control if MoveChase() is to be used or not in AttackStart(). Some creatures does not chase victims + void SetCombatMovement(bool bCombatMove); + bool IsCombatMovement() { return m_bCombatMovement; } + + bool EnterEvadeIfOutOfCombatArea(const uint32 uiDiff); + + private: + bool m_bCombatMovement; + uint32 m_uiEvadeCheckCooldown; +}; + +struct MANGOS_DLL_DECL Scripted_NoMovementAI : public ScriptedAI +{ + Scripted_NoMovementAI(Creature* pCreature) : ScriptedAI(pCreature) {} + + //Called at each attack of m_creature by any victim + void AttackStart(Unit*); +}; + +#endif diff --git a/include/sc_gossip.h b/include/sc_gossip.h new file mode 100644 index 000000000..349d6130f --- /dev/null +++ b/include/sc_gossip.h @@ -0,0 +1,187 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef SC_GOSSIP_H +#define SC_GOSSIP_H + +#include "Player.h" +#include "GossipDef.h" +#include "QuestDef.h" + +// Gossip Item Text +#define GOSSIP_TEXT_BROWSE_GOODS "I'd like to browse your goods." +#define GOSSIP_TEXT_TRAIN "Train me!" + +#define GOSSIP_TEXT_BANK "The bank" +#define GOSSIP_TEXT_IRONFORGE_BANK "The bank of Ironforge" +#define GOSSIP_TEXT_STORMWIND_BANK "The bank of Stormwind" +#define GOSSIP_TEXT_WINDRIDER "The wind rider master" +#define GOSSIP_TEXT_GRYPHON "The gryphon master" +#define GOSSIP_TEXT_BATHANDLER "The bat handler" +#define GOSSIP_TEXT_HIPPOGRYPH "The hippogryph master" +#define GOSSIP_TEXT_ZEPPLINMASTER "The zeppelin master" +#define GOSSIP_TEXT_DEEPRUNTRAM "The Deeprun Tram" +#define GOSSIP_TEXT_FERRY "The Rut'theran Ferry" +#define GOSSIP_TEXT_FLIGHTMASTER "The flight master" +#define GOSSIP_TEXT_AUCTIONHOUSE "The auction house" +#define GOSSIP_TEXT_GUILDMASTER "The guild master" +#define GOSSIP_TEXT_INN "The inn" +#define GOSSIP_TEXT_MAILBOX "The mailbox" +#define GOSSIP_TEXT_STABLEMASTER "The stable master" +#define GOSSIP_TEXT_WEAPONMASTER "The weapon master" +#define GOSSIP_TEXT_OFFICERS "The officers' lounge" +#define GOSSIP_TEXT_BATTLEMASTER "The battlemaster" +#define GOSSIP_TEXT_BARBER "Barber" +#define GOSSIP_TEXT_CLASSTRAINER "A class trainer" +#define GOSSIP_TEXT_PROFTRAINER "A profession trainer" +#define GOSSIP_TEXT_LEXICON "Lexicon of Power" + +#define GOSSIP_TEXT_ALTERACVALLEY "Alterac Valley" +#define GOSSIP_TEXT_ARATHIBASIN "Arathi Basin" +#define GOSSIP_TEXT_WARSONGULCH "Warsong Gulch" +#define GOSSIP_TEXT_ARENA "Arena" +#define GOSSIP_TEXT_EYEOFTHESTORM "Eye of The Storm" +#define GOSSIP_TEXT_STRANDOFANCIENT "Strand of the Ancients" + +#define GOSSIP_TEXT_DEATH_KNIGHT "Death Knight" +#define GOSSIP_TEXT_DRUID "Druid" +#define GOSSIP_TEXT_HUNTER "Hunter" +#define GOSSIP_TEXT_PRIEST "Priest" +#define GOSSIP_TEXT_ROGUE "Rogue" +#define GOSSIP_TEXT_WARRIOR "Warrior" +#define GOSSIP_TEXT_PALADIN "Paladin" +#define GOSSIP_TEXT_SHAMAN "Shaman" +#define GOSSIP_TEXT_MAGE "Mage" +#define GOSSIP_TEXT_WARLOCK "Warlock" + +#define GOSSIP_TEXT_ALCHEMY "Alchemy" +#define GOSSIP_TEXT_BLACKSMITHING "Blacksmithing" +#define GOSSIP_TEXT_COOKING "Cooking" +#define GOSSIP_TEXT_ENCHANTING "Enchanting" +#define GOSSIP_TEXT_ENGINEERING "Engineering" +#define GOSSIP_TEXT_FIRSTAID "First Aid" +#define GOSSIP_TEXT_HERBALISM "Herbalism" +#define GOSSIP_TEXT_LEATHERWORKING "Leatherworking" +#define GOSSIP_TEXT_TAILORING "Tailoring" +#define GOSSIP_TEXT_MINING "Mining" +#define GOSSIP_TEXT_FISHING "Fishing" +#define GOSSIP_TEXT_SKINNING "Skinning" +#define GOSSIP_TEXT_JEWELCRAFTING "Jewelcrafting" +#define GOSSIP_TEXT_INSCRIPTION "Inscription" + +enum +{ + // Skill defines + TRADESKILL_ALCHEMY = 1, + TRADESKILL_BLACKSMITHING = 2, + TRADESKILL_COOKING = 3, + TRADESKILL_ENCHANTING = 4, + TRADESKILL_ENGINEERING = 5, + TRADESKILL_FIRSTAID = 6, + TRADESKILL_HERBALISM = 7, + TRADESKILL_LEATHERWORKING = 8, + TRADESKILL_POISONS = 9, + TRADESKILL_TAILORING = 10, + TRADESKILL_MINING = 11, + TRADESKILL_FISHING = 12, + TRADESKILL_SKINNING = 13, + TRADESKILL_JEWLCRAFTING = 14, + TRADESKILL_INSCRIPTION = 15, + + TRADESKILL_LEVEL_NONE = 0, + TRADESKILL_LEVEL_APPRENTICE = 1, + TRADESKILL_LEVEL_JOURNEYMAN = 2, + TRADESKILL_LEVEL_EXPERT = 3, + TRADESKILL_LEVEL_ARTISAN = 4, + TRADESKILL_LEVEL_MASTER = 5, + TRADESKILL_LEVEL_GRAND_MASTER = 6, + + // Gossip defines + GOSSIP_ACTION_TRADE = 1, + GOSSIP_ACTION_TRAIN = 2, + GOSSIP_ACTION_TAXI = 3, + GOSSIP_ACTION_GUILD = 4, + GOSSIP_ACTION_BATTLE = 5, + GOSSIP_ACTION_BANK = 6, + GOSSIP_ACTION_INN = 7, + GOSSIP_ACTION_HEAL = 8, + GOSSIP_ACTION_TABARD = 9, + GOSSIP_ACTION_AUCTION = 10, + GOSSIP_ACTION_INN_INFO = 11, + GOSSIP_ACTION_UNLEARN = 12, + GOSSIP_ACTION_INFO_DEF = 1000, + + GOSSIP_SENDER_MAIN = 1, + GOSSIP_SENDER_INN_INFO = 2, + GOSSIP_SENDER_INFO = 3, + GOSSIP_SENDER_SEC_PROFTRAIN = 4, + GOSSIP_SENDER_SEC_CLASSTRAIN = 5, + GOSSIP_SENDER_SEC_BATTLEINFO = 6, + GOSSIP_SENDER_SEC_BANK = 7, + GOSSIP_SENDER_SEC_INN = 8, + GOSSIP_SENDER_SEC_MAILBOX = 9, + GOSSIP_SENDER_SEC_STABLEMASTER = 10 +}; + +extern uint32 GetSkillLevel(Player* pPlayer,uint32 skill); + +// Defined fuctions to use with player. + +// This fuction add's a menu item, +// a - Icon Id +// b - Text +// c - Sender(this is to identify the current Menu with this item) +// d - Action (identifys this Menu Item) +// e - Text to be displayed in pop up box +// f - Money value in pop up box +#define ADD_GOSSIP_ITEM(a,b,c,d) PlayerTalkClass->GetGossipMenu().AddMenuItem(a,b,c,d,"",0) +#define ADD_GOSSIP_ITEM_EXTENDED(a,b,c,d,e,f,g) PlayerTalkClass->GetGossipMenu().AddMenuItem(a,b,c,d,e,f,g) + +// This fuction Sends the current menu to show to client, a - NPCTEXTID(uint32) , b - npc guid(uint64) +#define SEND_GOSSIP_MENU(a,b) PlayerTalkClass->SendGossipMenu(a,b) + +// This fuction shows POI(point of interest) to client. +// a - position X +// b - position Y +// c - Icon Id +// d - Flags +// e - Data +// f - Location Name +#define SEND_POI(a,b,c,d,e,f) PlayerTalkClass->SendPointOfInterest(a,b,c,d,e,f) + +// Closes the Menu +#define CLOSE_GOSSIP_MENU() PlayerTalkClass->CloseGossip() + +// Fuction to tell to client the details +// a - quest object +// b - npc guid(uint64) +// c - Activate accept(bool) +#define SEND_QUEST_DETAILS(a,b,c) PlayerTalkClass->SendQuestDetails(a,b,c) + +// Fuction to tell to client the requested items to complete quest +// a - quest object +// b - npc guid(uint64) +// c - Iscompletable(bool) +// d - close at cancel(bool) - in case single incomplite ques +#define SEND_REQUESTEDITEMS(a,b,c,d) PlayerTalkClass->SendRequestedItems(a,b,c,d) + +// Fuctions to send NPC lists, a - is always the npc guid(uint64) +#define SEND_VENDORLIST(a) GetSession()->SendListInventory(a) +#define SEND_TRAINERLIST(a) GetSession()->SendTrainerList(a) +#define SEND_BANKERLIST(a) GetSession()->SendShowBank(a) +#define SEND_TABARDLIST(a) GetSession()->SendTabardVendorActivate(a) +#define SEND_AUCTIONLIST(a) GetSession()->SendAuctionHello(a) +#define SEND_TAXILIST(a) GetSession()->SendTaxiStatus(a) + +// Ressurect's the player if is dead. +#define SEND_SPRESURRECT() GetSession()->SendSpiritResurrect() + +// Get the player's honor rank. +#define GET_HONORRANK() GetHonorRank() +// ----------------------------------- + +// defined fuctions to use with Creature + +#define QUEST_DIALOG_STATUS(a,b,c) GetSession()->getDialogStatus(a,b,c) +#endif diff --git a/include/sc_grid_searchers.cpp b/include/sc_grid_searchers.cpp new file mode 100644 index 000000000..75aab9cab --- /dev/null +++ b/include/sc_grid_searchers.cpp @@ -0,0 +1,77 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#include "precompiled.h" + +//return closest GO in grid, with range from pSource +GameObject* GetClosestGameObjectWithEntry(WorldObject* pSource, uint32 uiEntry, float fMaxSearchRange) +{ + GameObject* pGo = NULL; + + CellPair pair(MaNGOS::ComputeCellPair(pSource->GetPositionX(), pSource->GetPositionY())); + Cell cell(pair); + cell.data.Part.reserved = ALL_DISTRICT; + cell.SetNoCreate(); + + MaNGOS::NearestGameObjectEntryInObjectRangeCheck go_check(*pSource, uiEntry, fMaxSearchRange); + MaNGOS::GameObjectLastSearcher searcher(pSource, pGo, go_check); + + TypeContainerVisitor, GridTypeMapContainer> go_searcher(searcher); + + CellLock cell_lock(cell, pair); + cell_lock->Visit(cell_lock, go_searcher,*(pSource->GetMap())); + + return pGo; +} + +//return closest creature alive in grid, with range from pSource +Creature* GetClosestCreatureWithEntry(WorldObject* pSource, uint32 uiEntry, float fMaxSearchRange) +{ + Creature* pCreature = NULL; + + CellPair pair(MaNGOS::ComputeCellPair(pSource->GetPositionX(), pSource->GetPositionY())); + Cell cell(pair); + cell.data.Part.reserved = ALL_DISTRICT; + cell.SetNoCreate(); + + MaNGOS::NearestCreatureEntryWithLiveStateInObjectRangeCheck creature_check(*pSource, uiEntry, true, fMaxSearchRange); + MaNGOS::CreatureLastSearcher searcher(pSource, pCreature, creature_check); + + TypeContainerVisitor, GridTypeMapContainer> creature_searcher(searcher); + + CellLock cell_lock(cell, pair); + cell_lock->Visit(cell_lock, creature_searcher,*(pSource->GetMap())); + + return pCreature; +} + +void GetGameObjectListWithEntryInGrid(std::list& lList , WorldObject* pSource, uint32 uiEntry, float fMaxSearchRange) +{ + CellPair pair(MaNGOS::ComputeCellPair(pSource->GetPositionX(), pSource->GetPositionY())); + Cell cell(pair); + cell.data.Part.reserved = ALL_DISTRICT; + cell.SetNoCreate(); + + AllGameObjectsWithEntryInRange check(pSource, uiEntry, fMaxSearchRange); + MaNGOS::GameObjectListSearcher searcher(pSource, lList, check); + TypeContainerVisitor, GridTypeMapContainer> visitor(searcher); + + CellLock cell_lock(cell, pair); + cell_lock->Visit(cell_lock, visitor, *(pSource->GetMap())); +} + +void GetCreatureListWithEntryInGrid(std::list& lList, WorldObject* pSource, uint32 uiEntry, float fMaxSearchRange) +{ + CellPair pair(MaNGOS::ComputeCellPair(pSource->GetPositionX(), pSource->GetPositionY())); + Cell cell(pair); + cell.data.Part.reserved = ALL_DISTRICT; + cell.SetNoCreate(); + + AllCreaturesOfEntryInRange check(pSource, uiEntry, fMaxSearchRange); + MaNGOS::CreatureListSearcher searcher(pSource, lList, check); + TypeContainerVisitor, GridTypeMapContainer> visitor(searcher); + + CellLock cell_lock(cell, pair); + cell_lock->Visit(cell_lock, visitor, *(pSource->GetMap())); +} diff --git a/include/sc_grid_searchers.h b/include/sc_grid_searchers.h new file mode 100644 index 000000000..f46be7288 --- /dev/null +++ b/include/sc_grid_searchers.h @@ -0,0 +1,118 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef SC_GRIDSEARCH_H +#define SC_GRIDSEARCH_H + +#include "Unit.h" +#include "GameObject.h" + +#include "Cell.h" +#include "CellImpl.h" +#include "GridNotifiers.h" +#include "GridNotifiersImpl.h" + +struct ObjectDistanceOrder : public std::binary_function +{ + const Unit* m_pSource; + + ObjectDistanceOrder(const Unit* pSource) : m_pSource(pSource) {}; + + bool operator()(const WorldObject* pLeft, const WorldObject* pRight) const + { + return m_pSource->GetDistanceOrder(pLeft, pRight); + } +}; + +struct ObjectDistanceOrderReversed : public std::binary_function +{ + const Unit* m_pSource; + + ObjectDistanceOrderReversed(const Unit* pSource) : m_pSource(pSource) {}; + + bool operator()(const WorldObject* pLeft, const WorldObject* pRight) const + { + return !m_pSource->GetDistanceOrder(pLeft, pRight); + } +}; + +GameObject* GetClosestGameObjectWithEntry(WorldObject* pSource, uint32 uiEntry, float fMaxSearchRange); +Creature* GetClosestCreatureWithEntry(WorldObject* pSource, uint32 uiEntry, float fMaxSearchRange); + +void GetGameObjectListWithEntryInGrid(std::list& lList , WorldObject* pSource, uint32 uiEntry, float fMaxSearchRange); +void GetCreatureListWithEntryInGrid(std::list& lList, WorldObject* pSource, uint32 uiEntry, float fMaxSearchRange); + +//Used in: +//hyjalAI.cpp +class AllFriendlyCreaturesInGrid +{ + public: + AllFriendlyCreaturesInGrid(Unit const* obj) : pUnit(obj) {} + bool operator() (Unit* u) + { + if (u->isAlive() && u->GetVisibility() == VISIBILITY_ON && u->IsFriendlyTo(pUnit)) + return true; + + return false; + } + + private: + Unit const* pUnit; +}; + +class AllGameObjectsWithEntryInRange +{ + public: + AllGameObjectsWithEntryInRange(const WorldObject* pObject, uint32 uiEntry, float fMaxRange) : m_pObject(pObject), m_uiEntry(uiEntry), m_fRange(fMaxRange) {} + bool operator() (GameObject* pGo) + { + if (pGo->GetEntry() == m_uiEntry && m_pObject->IsWithinDist(pGo,m_fRange,false)) + return true; + + return false; + } + + private: + const WorldObject* m_pObject; + uint32 m_uiEntry; + float m_fRange; +}; + +class AllCreaturesOfEntryInRange +{ + public: + AllCreaturesOfEntryInRange(const WorldObject* pObject, uint32 uiEntry, float fMaxRange) : m_pObject(pObject), m_uiEntry(uiEntry), m_fRange(fMaxRange) {} + bool operator() (Unit* pUnit) + { + if (pUnit->GetEntry() == m_uiEntry && m_pObject->IsWithinDist(pUnit,m_fRange,false)) + return true; + + return false; + } + + private: + const WorldObject* m_pObject; + uint32 m_uiEntry; + float m_fRange; +}; + +class PlayerAtMinimumRangeAway +{ + public: + PlayerAtMinimumRangeAway(Unit const* unit, float fMinRange) : pUnit(unit), fRange(fMinRange) {} + bool operator() (Player* pPlayer) + { + //No threat list check, must be done explicit if expected to be in combat with creature + if (!pPlayer->isGameMaster() && pPlayer->isAlive() && !pUnit->IsWithinDist(pPlayer,fRange,false)) + return true; + + return false; + } + + private: + Unit const* pUnit; + float fRange; +}; + +#endif diff --git a/include/sc_instance.cpp b/include/sc_instance.cpp new file mode 100644 index 000000000..872d6fa4a --- /dev/null +++ b/include/sc_instance.cpp @@ -0,0 +1,59 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#include "precompiled.h" + +//Optional uiWithRestoreTime. If not defined, autoCloseTime will be used (if not 0 by default in *_template) +void ScriptedInstance::DoUseDoorOrButton(uint64 uiGuid, uint32 uiWithRestoreTime, bool bUseAlternativeState) +{ + if (!uiGuid) + return; + + GameObject* pGo = instance->GetGameObject(uiGuid); + + if (pGo) + { + if (pGo->GetGoType() == GAMEOBJECT_TYPE_DOOR || pGo->GetGoType() == GAMEOBJECT_TYPE_BUTTON) + { + if (pGo->getLootState() == GO_READY) + pGo->UseDoorOrButton(uiWithRestoreTime,bUseAlternativeState); + else if (pGo->getLootState() == GO_ACTIVATED) + pGo->ResetDoorOrButton(); + } + else + error_log("SD2: Script call DoUseDoorOrButton, but gameobject entry %u is type %u.",pGo->GetEntry(),pGo->GetGoType()); + } +} + +void ScriptedInstance::DoRespawnGameObject(uint64 uiGuid, uint32 uiTimeToDespawn) +{ + if (GameObject* pGo = instance->GetGameObject(uiGuid)) + { + //not expect any of these should ever be handled + if (pGo->GetGoType()==GAMEOBJECT_TYPE_FISHINGNODE || pGo->GetGoType()==GAMEOBJECT_TYPE_DOOR || + pGo->GetGoType()==GAMEOBJECT_TYPE_BUTTON || pGo->GetGoType()==GAMEOBJECT_TYPE_TRAP) + return; + + if (pGo->isSpawned()) + return; + + pGo->SetRespawnTime(uiTimeToDespawn); + } +} + +void ScriptedInstance::DoUpdateWorldState(uint32 uiStateId, uint32 uiStateData) +{ + Map::PlayerList const& lPlayers = instance->GetPlayers(); + + if (!lPlayers.isEmpty()) + { + for(Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr) + { + if (Player* pPlayer = itr->getSource()) + pPlayer->SendUpdateWorldState(uiStateId, uiStateData); + } + } + else + debug_log("SD2: DoUpdateWorldState attempt send data but no players in map."); +} diff --git a/include/sc_instance.h b/include/sc_instance.h new file mode 100644 index 000000000..5fd66ba8f --- /dev/null +++ b/include/sc_instance.h @@ -0,0 +1,42 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 +* This program is free software licensed under GPL version 2 +* Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef SC_INSTANCE_H +#define SC_INSTANCE_H + +#include "InstanceData.h" +#include "Map.h" + +enum EncounterState +{ + NOT_STARTED = 0, + IN_PROGRESS = 1, + FAIL = 2, + DONE = 3, + SPECIAL = 4 +}; + +#define OUT_SAVE_INST_DATA debug_log("SD2: Saving Instance Data for Instance %s (Map %d, Instance Id %d)", instance->GetMapName(), instance->GetId(), instance->GetInstanceId()) +#define OUT_SAVE_INST_DATA_COMPLETE debug_log("SD2: Saving Instance Data for Instance %s (Map %d, Instance Id %d) completed.", instance->GetMapName(), instance->GetId(), instance->GetInstanceId()) +#define OUT_LOAD_INST_DATA(a) debug_log("SD2: Loading Instance Data for Instance %s (Map %d, Instance Id %d). Input is '%s'", instance->GetMapName(), instance->GetId(), instance->GetInstanceId(), a) +#define OUT_LOAD_INST_DATA_COMPLETE debug_log("SD2: Instance Data Load for Instance %s (Map %d, Instance Id: %d) is complete.",instance->GetMapName(), instance->GetId(), instance->GetInstanceId()) +#define OUT_LOAD_INST_DATA_FAIL error_log("SD2: Unable to load Instance Data for Instance %s (Map %d, Instance Id: %d).",instance->GetMapName(), instance->GetId(), instance->GetInstanceId()) + +class MANGOS_DLL_DECL ScriptedInstance : public InstanceData +{ + public: + + ScriptedInstance(Map* pMap) : InstanceData(pMap) {} + ~ScriptedInstance() {} + + //change active state of doors or buttons + void DoUseDoorOrButton(uint64 uiGuid, uint32 uiWithRestoreTime = 0, bool bUseAlternativeState = false); + + //Respawns a GO having negative spawntimesecs in gameobject-table + void DoRespawnGameObject(uint64 uiGuid, uint32 uiTimeToDespawn = MINUTE); + + //sends world state update to all players in instance + void DoUpdateWorldState(uint32 uiStateId, uint32 uiStateData); +}; +#endif diff --git a/patches/MaNGOS-8273-ScriptDev2.patch b/patches/MaNGOS-8273-ScriptDev2.patch new file mode 100644 index 000000000..a983cdecd --- /dev/null +++ b/patches/MaNGOS-8273-ScriptDev2.patch @@ -0,0 +1,75 @@ +From 52a2f249eb5f94ea070c169e5c0f15e212fa9b5e Mon Sep 17 00:00:00 2001 +From: NoFantasy +Date: Wed, 29 Jul 2009 15:22:04 +0200 +Subject: [PATCH] ScriptDev2 patch + +Signed-off-by: NoFantasy +--- + configure.ac | 6 +++++- + src/bindings/.gitignore | 2 +- + src/bindings/Makefile.am | 2 +- + src/mangosd/Makefile.am | 4 ++-- + 4 files changed, 9 insertions(+), 5 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 7a1b219..8cc9bfe 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -276,7 +276,11 @@ AC_CONFIG_FILES([ + src/mangosd/Makefile + src/mangosd/mangosd.conf.dist + src/bindings/Makefile +- src/bindings/universal/Makefile ++ src/bindings/ScriptDev2/Makefile ++ src/bindings/ScriptDev2/scriptdev2.conf.dist ++ src/bindings/ScriptDev2/config.h ++ src/bindings/ScriptDev2/sql/Makefile ++ src/bindings/ScriptDev2/sql/Updates/Makefile + ]) + + ## Configure ACE, if needed +diff --git a/src/bindings/.gitignore b/src/bindings/.gitignore +index eeddf0d..95eebf7 100644 +--- a/src/bindings/.gitignore ++++ b/src/bindings/.gitignore +@@ -11,4 +11,4 @@ + # + # Scripting projects + # +-#universal ++ScriptDev2 +diff --git a/src/bindings/Makefile.am b/src/bindings/Makefile.am +index 2cc0efd..f2dbbc7 100644 +--- a/src/bindings/Makefile.am ++++ b/src/bindings/Makefile.am +@@ -14,4 +14,4 @@ + # along with this program; if not, write to the Free Software + # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +-SUBDIRS = universal ++SUBDIRS = ScriptDev2 +diff --git a/src/mangosd/Makefile.am b/src/mangosd/Makefile.am +index 3fd4068..076d8d8 100644 +--- a/src/mangosd/Makefile.am ++++ b/src/mangosd/Makefile.am +@@ -34,7 +34,7 @@ mangos_worldd_SOURCES = \ + + ## Link world daemon against the shared library + mangos_worldd_LDADD = \ +- ../bindings/universal/libmangosscript.la \ ++ ../bindings/ScriptDev2/libmangosscript.la \ + ../game/libmangosgame.a \ + ../shared/Database/libmangosdatabase.a \ + ../shared/Config/libmangosconfig.a \ +@@ -45,7 +45,7 @@ mangos_worldd_LDADD = \ + ../../dep/src/sockets/libmangossockets.a \ + ../../dep/src/g3dlite/libg3dlite.a + +-mangos_worldd_LDFLAGS = -L../../dep/src/sockets -L../../dep/src/g3dlite -L../bindings/universal/ -L$(libdir) $(MANGOS_LIBS) -export-dynamic ++mangos_worldd_LDFLAGS = -L../../dep/src/sockets -L../../dep/src/g3dlite -L../bindings/ScriptDev2/ -L$(libdir) $(MANGOS_LIBS) -export-dynamic + + ## Additional files to include when running 'make dist' + # Include world daemon configuration +-- +1.6.3.2.1299.gee46c + diff --git a/patches/custom/ScriptDev2_1318_to_MaNGOS_0.12.patch b/patches/custom/ScriptDev2_1318_to_MaNGOS_0.12.patch new file mode 100644 index 000000000..738731032 --- /dev/null +++ b/patches/custom/ScriptDev2_1318_to_MaNGOS_0.12.patch @@ -0,0 +1,409 @@ +Index: include/precompiled.h +=================================================================== +--- include/precompiled.h (revision 1318) ++++ include/precompiled.h (working copy) +@@ -11,6 +11,11 @@ + #include "sc_grid_searchers.h" + #include "sc_instance.h" + ++enum backports ++{ ++ UNIT_VIRTUAL_ITEM_SLOT_ID = UNIT_VIRTUAL_ITEM_SLOT_DISPLAY ++}; ++ + #ifdef WIN32 + #include + BOOL APIENTRY DllMain( HANDLE hModule, +Index: include/sc_creature.cpp +=================================================================== +--- include/sc_creature.cpp (revision 1318) ++++ include/sc_creature.cpp (working copy) +@@ -460,7 +460,7 @@ + Unit* pUnit = NULL; + + MaNGOS::MostHPMissingInRange u_check(m_creature, fRange, uiMinHPDiff); +- MaNGOS::UnitLastSearcher searcher(m_creature, pUnit, u_check); ++ MaNGOS::UnitLastSearcher searcher(pUnit, u_check); + + /* + typedef TYPELIST_4(GameObject, Creature*except pets*, DynamicObject, Corpse*Bones*) AllGridObjectTypes; +@@ -484,7 +484,7 @@ + std::list pList; + + MaNGOS::FriendlyCCedInRange u_check(m_creature, fRange); +- MaNGOS::CreatureListSearcher searcher(m_creature, pList, u_check); ++ MaNGOS::CreatureListSearcher searcher(pList, u_check); + + TypeContainerVisitor, GridTypeMapContainer > grid_creature_searcher(searcher); + +@@ -504,7 +504,7 @@ + std::list pList; + + MaNGOS::FriendlyMissingBuffInRange u_check(m_creature, fRange, uiSpellId); +- MaNGOS::CreatureListSearcher searcher(m_creature, pList, u_check); ++ MaNGOS::CreatureListSearcher searcher(pList, u_check); + + TypeContainerVisitor, GridTypeMapContainer > grid_creature_searcher(searcher); + +@@ -524,7 +524,7 @@ + cell.SetNoCreate(); + + PlayerAtMinimumRangeAway check(m_creature, fMinimumRange); +- MaNGOS::PlayerSearcher searcher(m_creature, pPlayer, check); ++ MaNGOS::PlayerSearcher searcher(pPlayer, check); + TypeContainerVisitor, GridTypeMapContainer> visitor(searcher); + + CellLock cell_lock(cell, pair); +Index: include/sc_gossip.h +=================================================================== +--- include/sc_gossip.h (revision 1318) ++++ include/sc_gossip.h (working copy) +@@ -42,9 +42,7 @@ + #define GOSSIP_TEXT_WARSONGULCH "Warsong Gulch" + #define GOSSIP_TEXT_ARENA "Arena" + #define GOSSIP_TEXT_EYEOFTHESTORM "Eye of The Storm" +-#define GOSSIP_TEXT_STRANDOFANCIENT "Strand of the Ancients" + +-#define GOSSIP_TEXT_DEATH_KNIGHT "Death Knight" + #define GOSSIP_TEXT_DRUID "Druid" + #define GOSSIP_TEXT_HUNTER "Hunter" + #define GOSSIP_TEXT_PRIEST "Priest" +@@ -63,12 +61,12 @@ + #define GOSSIP_TEXT_FIRSTAID "First Aid" + #define GOSSIP_TEXT_HERBALISM "Herbalism" + #define GOSSIP_TEXT_LEATHERWORKING "Leatherworking" ++#define GOSSIP_TEXT_POISONS "Poisons" + #define GOSSIP_TEXT_TAILORING "Tailoring" + #define GOSSIP_TEXT_MINING "Mining" + #define GOSSIP_TEXT_FISHING "Fishing" + #define GOSSIP_TEXT_SKINNING "Skinning" + #define GOSSIP_TEXT_JEWELCRAFTING "Jewelcrafting" +-#define GOSSIP_TEXT_INSCRIPTION "Inscription" + + enum + { +@@ -87,7 +85,6 @@ + TRADESKILL_FISHING = 12, + TRADESKILL_SKINNING = 13, + TRADESKILL_JEWLCRAFTING = 14, +- TRADESKILL_INSCRIPTION = 15, + + TRADESKILL_LEVEL_NONE = 0, + TRADESKILL_LEVEL_APPRENTICE = 1, +@@ -95,7 +92,6 @@ + TRADESKILL_LEVEL_EXPERT = 3, + TRADESKILL_LEVEL_ARTISAN = 4, + TRADESKILL_LEVEL_MASTER = 5, +- TRADESKILL_LEVEL_GRAND_MASTER = 6, + + // Gossip defines + GOSSIP_ACTION_TRADE = 1, +Index: include/sc_grid_searchers.cpp +=================================================================== +--- include/sc_grid_searchers.cpp (revision 1318) ++++ include/sc_grid_searchers.cpp (working copy) +@@ -15,7 +15,7 @@ + cell.SetNoCreate(); + + MaNGOS::NearestGameObjectEntryInObjectRangeCheck go_check(*pSource, uiEntry, fMaxSearchRange); +- MaNGOS::GameObjectLastSearcher searcher(pSource, pGo, go_check); ++ MaNGOS::GameObjectLastSearcher searcher(pGo, go_check); + + TypeContainerVisitor, GridTypeMapContainer> go_searcher(searcher); + +@@ -36,7 +36,7 @@ + cell.SetNoCreate(); + + MaNGOS::NearestCreatureEntryWithLiveStateInObjectRangeCheck creature_check(*pSource, uiEntry, true, fMaxSearchRange); +- MaNGOS::CreatureLastSearcher searcher(pSource, pCreature, creature_check); ++ MaNGOS::CreatureLastSearcher searcher(pCreature, creature_check); + + TypeContainerVisitor, GridTypeMapContainer> creature_searcher(searcher); + +@@ -54,7 +54,7 @@ + cell.SetNoCreate(); + + AllGameObjectsWithEntryInRange check(pSource, uiEntry, fMaxSearchRange); +- MaNGOS::GameObjectListSearcher searcher(pSource, lList, check); ++ MaNGOS::GameObjectListSearcher searcher(lList, check); + TypeContainerVisitor, GridTypeMapContainer> visitor(searcher); + + CellLock cell_lock(cell, pair); +@@ -69,7 +69,7 @@ + cell.SetNoCreate(); + + AllCreaturesOfEntryInRange check(pSource, uiEntry, fMaxSearchRange); +- MaNGOS::CreatureListSearcher searcher(pSource, lList, check); ++ MaNGOS::CreatureListSearcher searcher(lList, check); + TypeContainerVisitor, GridTypeMapContainer> visitor(searcher); + + CellLock cell_lock(cell, pair); +Index: scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp +=================================================================== +--- scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp (revision 1318) ++++ scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp (working copy) +@@ -90,7 +90,8 @@ + #define INFERNAL_MODEL_INVISIBLE 11686 //Infernal Effects + #define SPELL_INFERNAL_RELAY 30834 + +-#define EQUIP_ID_AXE 33542 //Axes info ++#define AXE_EQUIP_MODEL 40066 //Axes info ++#define AXE_EQUIP_INFO 33448898 + + //---------Infernal code first + struct MANGOS_DLL_DECL netherspite_infernalAI : public ScriptedAI +@@ -269,7 +270,10 @@ + + void ClearWeapons() + { +- SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_UNEQUIP, EQUIP_NO_CHANGE); ++ m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY, 0); ++ m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_INFO, 0); ++ m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY+1, 0); ++ m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_INFO+2, 0); + + //damage + const CreatureInfo *cinfo = m_creature->GetCreatureInfo(); +@@ -411,7 +415,10 @@ + m_creature->CastSpell(m_creature, SPELL_THRASH_AURA, true); + + //models +- SetEquipmentSlots(false, EQUIP_ID_AXE, EQUIP_ID_AXE, EQUIP_NO_CHANGE); ++ m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY, AXE_EQUIP_MODEL); ++ m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_INFO, AXE_EQUIP_INFO); ++ m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY+1, AXE_EQUIP_MODEL); ++ m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_INFO+2, AXE_EQUIP_INFO); + + //damage + const CreatureInfo *cinfo = m_creature->GetCreatureInfo(); +@@ -449,6 +456,8 @@ + Creature *axe = m_creature->SummonCreature(MALCHEZARS_AXE, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000); + if (axe) + { ++ axe->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY, AXE_EQUIP_MODEL); ++ axe->SetUInt32Value(UNIT_VIRTUAL_ITEM_INFO, AXE_EQUIP_INFO); + axe->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + axe->setFaction(m_creature->getFaction()); + +Index: scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp +=================================================================== +--- scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp (revision 1318) ++++ scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp (working copy) +@@ -27,8 +27,6 @@ + #define SPELL_AMBUSH 24337 + #define SPELL_THOUSANDBLADES 24649 + +-#define EQUIP_ID_MAIN_HAND 0 //was item display id 31818, but this id does not exist +- + struct MANGOS_DLL_DECL boss_renatakiAI : public ScriptedAI + { + boss_renatakiAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} +@@ -64,10 +62,13 @@ + { + m_creature->InterruptSpell(CURRENT_GENERIC_SPELL); + +- SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE); + m_creature->SetDisplayId(11686); + ++ m_creature->SetUInt32Value( UNIT_VIRTUAL_ITEM_SLOT_DISPLAY, 0); ++ m_creature->SetUInt32Value( UNIT_VIRTUAL_ITEM_INFO , 218171138); ++ m_creature->SetUInt32Value( UNIT_VIRTUAL_ITEM_INFO + 1, 3); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); ++ m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID,11686); + Invisible = true; + + Invisible_Timer = 15000 + rand()%15000; +@@ -96,9 +97,12 @@ + m_creature->InterruptSpell(CURRENT_GENERIC_SPELL); + + m_creature->SetDisplayId(15268); +- SetEquipmentSlots(false, EQUIP_ID_MAIN_HAND, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE); + + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); ++ m_creature->SetUInt32Value( UNIT_VIRTUAL_ITEM_SLOT_DISPLAY, 31818); ++ m_creature->SetUInt32Value( UNIT_VIRTUAL_ITEM_INFO , 218171138); ++ m_creature->SetUInt32Value( UNIT_VIRTUAL_ITEM_INFO + 1, 3); ++ m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + Invisible = false; + + Visible_Timer = 4000; +Index: scripts/kalimdor/azuremyst_isle.cpp +=================================================================== +--- scripts/kalimdor/azuremyst_isle.cpp (revision 1318) ++++ scripts/kalimdor/azuremyst_isle.cpp (working copy) +@@ -76,7 +76,6 @@ + + m_creature->CastSpell(m_creature, SPELL_IRRIDATION, true); + +- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT); + m_creature->SetHealth(int(m_creature->GetMaxHealth()*.1)); + m_creature->SetStandState(UNIT_STAND_STATE_SLEEP); +@@ -103,9 +102,8 @@ + + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + { +- if (pSpell->SpellFamilyFlags2 & 0x080000000) ++ if (pSpell->Id == 28880) + { +- m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + + m_creature->CastSpell(m_creature, SPELL_STUNNED, true); +Index: scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp +=================================================================== +--- scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp (revision 1318) ++++ scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp (working copy) +@@ -161,8 +161,10 @@ + #define SPEED_RUN (1.0f) + #define SPEED_MOUNT (1.6f) + +-#define EQUIP_ID_WEAPON 927 +-#define EQUIP_ID_SHIELD 20913 ++#define THRALL_WEAPON_MODEL 22106 ++#define THRALL_WEAPON_INFO 218169346 ++#define THRALL_SHIELD_MODEL 18662 ++#define THRALL_SHIELD_INFO 234948100 + #define THRALL_MODEL_UNEQUIPPED 17292 + #define THRALL_MODEL_EQUIPPED 18165 + +@@ -235,7 +237,12 @@ + break; + case 9: + DoScriptText(SAY_TH_ARMORY, m_creature); +- SetEquipmentSlots(false, EQUIP_ID_WEAPON, EQUIP_ID_SHIELD, EQUIP_NO_CHANGE); ++ m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY, THRALL_WEAPON_MODEL); ++ m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_INFO, THRALL_WEAPON_INFO); ++ m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_INFO+1, 781); ++ m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY+1, THRALL_SHIELD_MODEL); ++ m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_INFO+2, THRALL_SHIELD_INFO); ++ m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_INFO+3, 1038); + break; + case 10: + m_creature->SetDisplayId(THRALL_MODEL_EQUIPPED); +@@ -392,7 +399,12 @@ + { + DoUnmount(); + HadMount = false; +- SetEquipmentSlots(true); ++ m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY, 0); ++ m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_INFO, 0); ++ m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_INFO+1, 0); ++ m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY+1, 0); ++ m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_INFO+2, 0); ++ m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_INFO+3, 0); + m_creature->SetDisplayId(THRALL_MODEL_UNEQUIPPED); + } + +Index: scripts/northrend/dragonblight.cpp +=================================================================== +--- scripts/northrend/dragonblight.cpp (revision 1318) ++++ scripts/northrend/dragonblight.cpp (working copy) +@@ -100,7 +100,6 @@ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + pPlayer->CLOSE_GOSSIP_MENU(); +- pPlayer->SendMovieStart(MOVIE_ID_GATES); + } + + return true; +Index: scripts/outland/black_temple/boss_illidan.cpp +=================================================================== +--- scripts/outland/black_temple/boss_illidan.cpp (revision 1318) ++++ scripts/outland/black_temple/boss_illidan.cpp (working copy) +@@ -206,9 +206,6 @@ + #define CENTER_Y 305.297 + #define CENTER_Z 353.192 + +-#define EQUIP_ID_MAIN_HAND 32837 +-#define EQUIP_ID_OFF_HAND 32838 +- + /*** Phase Names ***/ + enum Phase + { +@@ -976,10 +973,9 @@ + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + // Unequip warglaives if needed +- SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_UNEQUIP, EQUIP_NO_CHANGE); + + m_creature->RemoveMonsterMoveFlag(MONSTER_MOVE_LEVITATING); +- ++ m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY, 0); + IsTalking = false; + + TalkCount = 0; +@@ -1230,12 +1226,14 @@ + if (DemonTransformation[count].equip) + { + // Requip warglaives if needed +- SetEquipmentSlots(false, EQUIP_ID_MAIN_HAND, EQUIP_ID_OFF_HAND, EQUIP_NO_CHANGE); ++ m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY, 45479); ++ m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY+1, 45481); + } + else + { + // Unequip warglaives if needed +- SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_UNEQUIP, EQUIP_NO_CHANGE); ++ m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY, 0); ++ m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY+1, 0); + } + + if (DemonTransformation[count].phase != 8) +@@ -1308,7 +1306,8 @@ + + // We no longer wear the glaives! + // since they are now channeling the flames (or will be) +- SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_UNEQUIP, EQUIP_NO_CHANGE); ++ m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY, 0); ++ m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY+1, 0); + + for(uint8 i = 0; i < 2; ++i) + { +@@ -1442,7 +1441,8 @@ + break; + case 8: + // Equip our warglaives! +- SetEquipmentSlots(false, EQUIP_ID_MAIN_HAND, EQUIP_ID_OFF_HAND, EQUIP_NO_CHANGE); ++ m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY, 45479); ++ m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY+1, 45481); + // Hostile if we weren't before + m_creature->setFaction(14); + break; +@@ -1708,7 +1708,8 @@ + } + + // Re-equip our warblades! +- SetEquipmentSlots(false, EQUIP_ID_MAIN_HAND, EQUIP_ID_OFF_HAND, EQUIP_NO_CHANGE); ++ m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY, 45479); ++ m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY+1, 45481); + + // Prepare for landin'! + LandTimer = 5000; +Index: scripts/world/item_scripts.cpp +=================================================================== +--- scripts/world/item_scripts.cpp (revision 1318) ++++ scripts/world/item_scripts.cpp (working copy) +@@ -49,7 +49,7 @@ + pPlayer->SendEquipError(EQUIP_ERR_NONE, pItem, NULL); + + if (const SpellEntry* pSpellInfo = GetSpellStore()->LookupEntry(SPELL_ARCANE_CHARGES)) +- Spell::SendCastResult(pPlayer, pSpellInfo, 1, SPELL_FAILED_NOT_ON_GROUND); ++ Spell::SendCastResult(pPlayer, pSpellInfo, 1, SPELL_FAILED_ERROR); + + return true; + } +Index: scripts/world/npcs_special.cpp +=================================================================== +--- scripts/world/npcs_special.cpp (revision 1318) ++++ scripts/world/npcs_special.cpp (working copy) +@@ -708,9 +708,6 @@ + + if (Patient) + { +- //303, this flag appear to be required for client side item->spell to work (TARGET_SINGLE_FRIEND) +- Patient->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE); +- + Patients.push_back(Patient->GetGUID()); + ((npc_injured_patientAI*)Patient->AI())->Doctorguid = m_creature->GetGUID(); + diff --git a/scriptVC80.sln b/scriptVC80.sln new file mode 100644 index 000000000..420b4d657 --- /dev/null +++ b/scriptVC80.sln @@ -0,0 +1,25 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ScriptDev2", "VC80\80ScriptDev2.vcproj", "{4295C8A9-79B7-4354-8064-F05FB9CA0C96}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Debug|Win32.ActiveCfg = Debug|Win32 + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Debug|Win32.Build.0 = Debug|Win32 + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Debug|x64.ActiveCfg = Debug|x64 + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Debug|x64.Build.0 = Debug|x64 + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Release|Win32.ActiveCfg = Release|Win32 + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Release|Win32.Build.0 = Release|Win32 + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Release|x64.ActiveCfg = Release|x64 + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/scriptVC90.sln b/scriptVC90.sln new file mode 100644 index 000000000..9507f49df --- /dev/null +++ b/scriptVC90.sln @@ -0,0 +1,25 @@ +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ScriptDev2", "VC90\90ScriptDev2.vcproj", "{4295C8A9-79B7-4354-8064-F05FB9CA0C96}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Debug|Win32.ActiveCfg = Debug|Win32 + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Debug|Win32.Build.0 = Debug|Win32 + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Debug|x64.ActiveCfg = Debug|x64 + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Debug|x64.Build.0 = Debug|x64 + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Release|Win32.ActiveCfg = Release|Win32 + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Release|Win32.Build.0 = Release|Win32 + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Release|x64.ActiveCfg = Release|x64 + {4295C8A9-79B7-4354-8064-F05FB9CA0C96}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/scriptdev2.conf.dist.in b/scriptdev2.conf.dist.in new file mode 100644 index 000000000..173fb0758 --- /dev/null +++ b/scriptdev2.conf.dist.in @@ -0,0 +1,11 @@ +# ScriptDev2 Configuration file +# This file must be placed within the directory which holds mangosd.conf and realmd.conf +ConfVersion=2009040501 + +# Database connection settings for the world server. +# Default: hostname;port;username;password;database +# .;somenumber;username;password;database - use named pipes at Windows +# Named pipes: mySQL required adding "enable-named-pipe" to [mysqld] section my.ini +# .;/path/to/unix_socket;username;password;database - use Unix sockets at Unix/Linux +# Unix sockets: experimental, not tested +ScriptDev2DatabaseInfo = "127.0.0.1;3306;mangos;mangos;scriptdev2" diff --git a/scripts/battlegrounds/battleground.cpp b/scripts/battlegrounds/battleground.cpp new file mode 100644 index 000000000..507b9832e --- /dev/null +++ b/scripts/battlegrounds/battleground.cpp @@ -0,0 +1,112 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Battleground +SD%Complete: 100 +SDComment: Spirit guides in battlegrounds will revive all players every 30 sec +SDCategory: Battlegrounds +EndScriptData */ + +#include "precompiled.h" + +// **** Script Info **** +// Spiritguides in battlegrounds resurrecting many players at once +// every 30 seconds - through a channeled spell, which gets autocasted +// the whole time +// if spiritguide despawns all players around him will get teleported +// to the next spiritguide +// here i'm not sure, if a dummyspell exist for it + +// **** Quick Info **** +// battleground spiritguides - this script handles gossipHello +// and JustDied also it let autocast the channel-spell + +enum +{ + SPELL_SPIRIT_HEAL_CHANNEL = 22011, // Spirit Heal Channel + + SPELL_SPIRIT_HEAL = 22012, // Spirit Heal + SPELL_SPIRIT_HEAL_MANA = 44535, // in battlegrounds player get this no-mana-cost-buff + + SPELL_WAITING_TO_RESURRECT = 2584 // players who cancel this aura don't want a resurrection +}; + +struct MANGOS_DLL_DECL npc_spirit_guideAI : public ScriptedAI +{ + npc_spirit_guideAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + void Reset() + { + } + + void UpdateAI(const uint32 uiDiff) + { + // auto cast the whole time this spell + if (!m_creature->GetCurrentSpell(CURRENT_CHANNELED_SPELL)) + m_creature->CastSpell(m_creature, SPELL_SPIRIT_HEAL_CHANNEL, false); + } + + void CorpseRemoved(uint32 &) + { + // TODO: would be better to cast a dummy spell + Map* pMap = m_creature->GetMap(); + + if (!pMap || !pMap->IsBattleGround()) + return; + + Map::PlayerList const &PlayerList = pMap->GetPlayers(); + + for(Map::PlayerList::const_iterator itr = PlayerList.begin(); itr != PlayerList.end(); ++itr) + { + Player* pPlayer = itr->getSource(); + if (!pPlayer || !pPlayer->IsWithinDistInMap(m_creature, 20.0f) || !pPlayer->HasAura(SPELL_WAITING_TO_RESURRECT)) + continue; + + // repop player again - now this node won't be counted and another node is searched + pPlayer->RepopAtGraveyard(); + } + } + + void SpellHitTarget (Unit* pUnit, const SpellEntry* pSpellEntry) + { + if (pSpellEntry->Id == SPELL_SPIRIT_HEAL && pUnit->GetTypeId() == TYPEID_PLAYER + && pUnit->HasAura(SPELL_WAITING_TO_RESURRECT)) + pUnit->CastSpell(pUnit, SPELL_SPIRIT_HEAL_MANA, true); + } +}; + +bool GossipHello_npc_spirit_guide(Player* pPlayer, Creature* pCreature) +{ + pPlayer->CastSpell(pPlayer, SPELL_WAITING_TO_RESURRECT, true); + return true; +} + +CreatureAI* GetAI_npc_spirit_guide(Creature* pCreature) +{ + return new npc_spirit_guideAI(pCreature); +} + +void AddSC_battleground() +{ + Script* newscript; + + newscript = new Script; + newscript->Name = "npc_spirit_guide"; + newscript->GetAI = &GetAI_npc_spirit_guide; + newscript->pGossipHello = &GossipHello_npc_spirit_guide; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/alterac_mountains.cpp b/scripts/eastern_kingdoms/alterac_mountains.cpp new file mode 100644 index 000000000..802d2dbdf --- /dev/null +++ b/scripts/eastern_kingdoms/alterac_mountains.cpp @@ -0,0 +1,32 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Alterac_Mountains +SD%Complete: 0 +SDComment: Placeholder +SDCategory: Alterac Mountains +EndScriptData */ + +/* ContentData +EndContentData */ + +#include "precompiled.h" + +/*void AddSC_alterac_mountains() +{ + Script *newscript; +}*/ diff --git a/scripts/eastern_kingdoms/arathi_highlands.cpp b/scripts/eastern_kingdoms/arathi_highlands.cpp new file mode 100644 index 000000000..1158849ea --- /dev/null +++ b/scripts/eastern_kingdoms/arathi_highlands.cpp @@ -0,0 +1,126 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Arathi Highlands +SD%Complete: 100 +SDComment: Quest support: 665 +SDCategory: Arathi Highlands +EndScriptData */ + +/* ContentData +npc_professor_phizzlethorpe +EndContentData */ + +#include "precompiled.h" +#include "escort_ai.h" + +/*###### +## npc_professor_phizzlethorpe +######*/ + +enum +{ + SAY_PROGRESS_1 = -1000264, + SAY_PROGRESS_2 = -1000265, + SAY_PROGRESS_3 = -1000266, + EMOTE_PROGRESS_4 = -1000267, + SAY_AGGRO = -1000268, + SAY_PROGRESS_5 = -1000269, + SAY_PROGRESS_6 = -1000270, + SAY_PROGRESS_7 = -1000271, + EMOTE_PROGRESS_8 = -1000272, + SAY_PROGRESS_9 = -1000273, + + QUEST_SUNKEN_TREASURE = 665, + ENTRY_VENGEFUL_SURGE = 2776 +}; + +struct MANGOS_DLL_DECL npc_professor_phizzlethorpeAI : public npc_escortAI +{ + npc_professor_phizzlethorpeAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } + + void Reset() { } + + void WaypointReached(uint32 uiPointId) + { + Player* pPlayer = GetPlayerForEscort(); + + if (!pPlayer) + return; + + switch(uiPointId) + { + case 4: DoScriptText(SAY_PROGRESS_2, m_creature, pPlayer); break; + case 5: DoScriptText(SAY_PROGRESS_3, m_creature, pPlayer); break; + case 8: DoScriptText(EMOTE_PROGRESS_4, m_creature); break; + case 9: + m_creature->SummonCreature(ENTRY_VENGEFUL_SURGE, -2056.41, -2144.01, 20.59, 5.70, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 600000); + m_creature->SummonCreature(ENTRY_VENGEFUL_SURGE, -2050.17, -2140.02, 19.54, 5.17, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 600000); + break; + case 10: DoScriptText(SAY_PROGRESS_5, m_creature, pPlayer); break; + case 11: + DoScriptText(SAY_PROGRESS_6, m_creature, pPlayer); + SetRun(); + break; + case 19: DoScriptText(SAY_PROGRESS_7, m_creature, pPlayer); break; + case 20: + DoScriptText(EMOTE_PROGRESS_8, m_creature); + DoScriptText(SAY_PROGRESS_9, m_creature, pPlayer); + pPlayer->GroupEventHappens(QUEST_SUNKEN_TREASURE, m_creature); + break; + } + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void JustSummoned(Creature* pSummoned) + { + pSummoned->AI()->AttackStart(m_creature); + } +}; + +bool QuestAccept_npc_professor_phizzlethorpe(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_SUNKEN_TREASURE) + { + pCreature->setFaction(FACTION_ESCORT_N_NEUTRAL_PASSIVE); + DoScriptText(SAY_PROGRESS_1, pCreature, pPlayer); + + if (npc_professor_phizzlethorpeAI* pEscortAI = dynamic_cast(pCreature->AI())) + pEscortAI->Start(false, false, pPlayer->GetGUID(), pQuest, true); + } + return true; +} + +CreatureAI* GetAI_npc_professor_phizzlethorpe(Creature* pCreature) +{ + return new npc_professor_phizzlethorpeAI(pCreature); +} + +void AddSC_arathi_highlands() +{ + Script * newscript; + + newscript = new Script; + newscript->Name = "npc_professor_phizzlethorpe"; + newscript->GetAI = &GetAI_npc_professor_phizzlethorpe; + newscript->pQuestAccept = &QuestAccept_npc_professor_phizzlethorpe; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp new file mode 100644 index 000000000..e653704b6 --- /dev/null +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp @@ -0,0 +1,703 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Blackrock_Depths +SD%Complete: 50 +SDComment: Quest support: 4001, 4342, 7604. Vendor Lokhtos Darkbargainer. +SDCategory: Blackrock Depths +EndScriptData */ + +/* ContentData +go_shadowforge_brazier +at_ring_of_law +npc_grimstone +mob_phalanx +npc_kharan_mighthammer +npc_lokhtos_darkbargainer +EndContentData */ + +#include "precompiled.h" +#include "blackrock_depths.h" +#include "escort_ai.h" + +/*###### +## go_shadowforge_brazier +######*/ + +bool GOHello_go_shadowforge_brazier(Player* pPlayer, GameObject* pGo) +{ + if (ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData()) + { + if (pInstance->GetData(TYPE_LYCEUM) == IN_PROGRESS) + pInstance->SetData(TYPE_LYCEUM, DONE); + else + pInstance->SetData(TYPE_LYCEUM, IN_PROGRESS); + } + return false; +} + +/*###### +## npc_grimstone +######*/ + +enum +{ + NPC_GRIMSTONE = 10096, + NPC_THELDREN = 16059, + + //4 or 6 in total? 1+2+1 / 2+2+2 / 3+3. Depending on this, code should be changed. + MAX_MOB_AMOUNT = 4 +}; + +uint32 RingMob[]= +{ + 8925, // Dredge Worm + 8926, // Deep Stinger + 8927, // Dark Screecher + 8928, // Burrowing Thundersnout + 8933, // Cave Creeper + 8932, // Borer Beetle +}; + +uint32 RingBoss[]= +{ + 9027, // Gorosh + 9028, // Grizzle + 9029, // Eviscerator + 9030, // Ok'thor + 9031, // Anub'shiah + 9032, // Hedrum +}; + +bool AreaTrigger_at_ring_of_law(Player* pPlayer, AreaTriggerEntry *at) +{ + if (ScriptedInstance* pInstance = (ScriptedInstance*)pPlayer->GetInstanceData()) + { + if (pInstance->GetData(TYPE_RING_OF_LAW) == IN_PROGRESS || pInstance->GetData(TYPE_RING_OF_LAW) == DONE) + return false; + + pInstance->SetData(TYPE_RING_OF_LAW,IN_PROGRESS); + pPlayer->SummonCreature(NPC_GRIMSTONE,625.559,-205.618,-52.735,2.609,TEMPSUMMON_DEAD_DESPAWN,0); + + return false; + } + return false; +} + +/*###### +## npc_grimstone +######*/ + +//TODO: implement quest part of event (different end boss) +struct MANGOS_DLL_DECL npc_grimstoneAI : public npc_escortAI +{ + npc_grimstoneAI(Creature* pCreature) : npc_escortAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + MobSpawnId = urand(0, 5); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint8 EventPhase; + uint32 Event_Timer; + + uint8 MobSpawnId; + uint8 MobCount; + uint32 MobDeath_Timer; + + uint64 RingMobGUID[4]; + uint64 RingBossGUID; + + bool CanWalk; + + void Reset() + { + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + + EventPhase = 0; + Event_Timer = 1000; + + MobCount = 0; + MobDeath_Timer = 0; + + for(uint8 i = 0; i < MAX_MOB_AMOUNT; ++i) + RingMobGUID[i] = 0; + + RingBossGUID = 0; + + CanWalk = false; + } + + void DoGate(uint32 id, uint32 state) + { + if (GameObject* pGo = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(id))) + pGo->SetGoState(GOState(state)); + + debug_log("SD2: npc_grimstone, arena gate update state."); + } + + //TODO: move them to center + void SummonRingMob() + { + if (Creature* tmp = m_creature->SummonCreature(RingMob[MobSpawnId],608.960,-235.322,-53.907,1.857,TEMPSUMMON_DEAD_DESPAWN,0)) + RingMobGUID[MobCount] = tmp->GetGUID(); + + ++MobCount; + + if (MobCount == MAX_MOB_AMOUNT) + MobDeath_Timer = 2500; + } + + //TODO: move them to center + void SummonRingBoss() + { + if (Creature* tmp = m_creature->SummonCreature(RingBoss[rand()%6],644.300,-175.989,-53.739,3.418,TEMPSUMMON_DEAD_DESPAWN,0)) + RingBossGUID = tmp->GetGUID(); + + MobDeath_Timer = 2500; + } + + void WaypointReached(uint32 i) + { + switch(i) + { + case 0: + DoScriptText(-1000000, m_creature);//2 + CanWalk = false; + Event_Timer = 5000; + break; + case 1: + DoScriptText(-1000000, m_creature);//4 + CanWalk = false; + Event_Timer = 5000; + break; + case 2: + CanWalk = false; + break; + case 3: + DoScriptText(-1000000, m_creature);//5 + break; + case 4: + DoScriptText(-1000000, m_creature);//6 + CanWalk = false; + Event_Timer = 5000; + break; + case 5: + if (m_pInstance) + { + m_pInstance->SetData(TYPE_RING_OF_LAW,DONE); + debug_log("SD2: npc_grimstone: event reached end and set complete."); + } + break; + } + } + + void UpdateAI(const uint32 diff) + { + if (!m_pInstance) + return; + + if (MobDeath_Timer) + { + if (MobDeath_Timer <= diff) + { + MobDeath_Timer = 2500; + + if (RingBossGUID) + { + Creature *boss = (Creature*)Unit::GetUnit(*m_creature,RingBossGUID); + if (boss && !boss->isAlive() && boss->isDead()) + { + RingBossGUID = 0; + Event_Timer = 5000; + MobDeath_Timer = 0; + return; + } + return; + } + + for(uint8 i = 0; i < MAX_MOB_AMOUNT; ++i) + { + Creature *mob = (Creature*)Unit::GetUnit(*m_creature,RingMobGUID[i]); + if (mob && !mob->isAlive() && mob->isDead()) + { + RingMobGUID[i] = 0; + --MobCount; + + //seems all are gone, so set timer to continue and discontinue this + if (!MobCount) + { + Event_Timer = 5000; + MobDeath_Timer = 0; + } + } + } + }else MobDeath_Timer -= diff; + } + + if (Event_Timer) + { + if (Event_Timer <= diff) + { + switch(EventPhase) + { + case 0: + DoScriptText(-1000000, m_creature);//1 + DoGate(DATA_ARENA4,1); + Start(false, false); + CanWalk = true; + Event_Timer = 0; + break; + case 1: + CanWalk = true; + Event_Timer = 0; + break; + case 2: + Event_Timer = 2000; + break; + case 3: + DoGate(DATA_ARENA1,GO_STATE_ACTIVE); + Event_Timer = 3000; + break; + case 4: + CanWalk = true; + m_creature->SetVisibility(VISIBILITY_OFF); + SummonRingMob(); + Event_Timer = 8000; + break; + case 5: + SummonRingMob(); + SummonRingMob(); + Event_Timer = 8000; + break; + case 6: + SummonRingMob(); + Event_Timer = 0; + break; + case 7: + m_creature->SetVisibility(VISIBILITY_ON); + DoGate(DATA_ARENA1,GO_STATE_READY); + DoScriptText(-1000000, m_creature);//4 + CanWalk = true; + Event_Timer = 0; + break; + case 8: + DoGate(DATA_ARENA2,GO_STATE_ACTIVE); + Event_Timer = 5000; + break; + case 9: + m_creature->SetVisibility(VISIBILITY_OFF); + SummonRingBoss(); + Event_Timer = 0; + break; + case 10: + //if quest, complete + DoGate(DATA_ARENA2,GO_STATE_READY); + DoGate(DATA_ARENA3,GO_STATE_ACTIVE); + DoGate(DATA_ARENA4,GO_STATE_ACTIVE); + CanWalk = true; + Event_Timer = 0; + break; + } + ++EventPhase; + }else Event_Timer -= diff; + } + + if (CanWalk) + npc_escortAI::UpdateAI(diff); + } +}; + +CreatureAI* GetAI_npc_grimstone(Creature* pCreature) +{ + return new npc_grimstoneAI(pCreature); +} + +/*###### +## mob_phalanx +######*/ + +#define SPELL_THUNDERCLAP 15588 +#define SPELL_FIREBALLVOLLEY 15285 +#define SPELL_MIGHTYBLOW 14099 + +struct MANGOS_DLL_DECL mob_phalanxAI : public ScriptedAI +{ + mob_phalanxAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 ThunderClap_Timer; + uint32 FireballVolley_Timer; + uint32 MightyBlow_Timer; + + void Reset() + { + ThunderClap_Timer = 12000; + FireballVolley_Timer = 0; + MightyBlow_Timer = 15000; + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //ThunderClap_Timer + if (ThunderClap_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_THUNDERCLAP); + ThunderClap_Timer = 10000; + }else ThunderClap_Timer -= diff; + + //FireballVolley_Timer + if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 51) + { + if (FireballVolley_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_FIREBALLVOLLEY); + FireballVolley_Timer = 15000; + }else FireballVolley_Timer -= diff; + } + + //MightyBlow_Timer + if (MightyBlow_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_MIGHTYBLOW); + MightyBlow_Timer = 10000; + }else MightyBlow_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_phalanx(Creature* pCreature) +{ + return new mob_phalanxAI(pCreature); +} + +/*###### +## npc_kharan_mighthammer +######*/ + +#define QUEST_4001 4001 +#define QUEST_4342 4342 + +#define GOSSIP_ITEM_KHARAN_1 "I need to know where the princess are, Kharan!" +#define GOSSIP_ITEM_KHARAN_2 "All is not lost, Kharan!" + +#define GOSSIP_ITEM_KHARAN_3 "Gor'shak is my friend, you can trust me." +#define GOSSIP_ITEM_KHARAN_4 "Not enough, you need to tell me more." +#define GOSSIP_ITEM_KHARAN_5 "So what happened?" +#define GOSSIP_ITEM_KHARAN_6 "Continue..." +#define GOSSIP_ITEM_KHARAN_7 "So you suspect that someone on the inside was involved? That they were tipped off?" +#define GOSSIP_ITEM_KHARAN_8 "Continue with your story please." +#define GOSSIP_ITEM_KHARAN_9 "Indeed." +#define GOSSIP_ITEM_KHARAN_10 "The door is open, Kharan. You are a free man." + +bool GossipHello_npc_kharan_mighthammer(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestStatus(QUEST_4001) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + if (pPlayer->GetQuestStatus(4342) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); + + if (pPlayer->GetTeam() == HORDE) + pPlayer->SEND_GOSSIP_MENU(2473, pCreature->GetGUID()); + else + pPlayer->SEND_GOSSIP_MENU(2474, pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_kharan_mighthammer(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->SEND_GOSSIP_MENU(2475, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); + pPlayer->SEND_GOSSIP_MENU(2476, pCreature->GetGUID()); + break; + + case GOSSIP_ACTION_INFO_DEF+3: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); + pPlayer->SEND_GOSSIP_MENU(2477, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+4: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); + pPlayer->SEND_GOSSIP_MENU(2478, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+5: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_7, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6); + pPlayer->SEND_GOSSIP_MENU(2479, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+6: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_8, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+7); + pPlayer->SEND_GOSSIP_MENU(2480, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+7: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_9, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+8); + pPlayer->SEND_GOSSIP_MENU(2481, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+8: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_10, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+9); + pPlayer->SEND_GOSSIP_MENU(2482, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+9: + pPlayer->CLOSE_GOSSIP_MENU(); + if (pPlayer->GetTeam() == HORDE) + pPlayer->AreaExploredOrEventHappens(QUEST_4001); + else + pPlayer->AreaExploredOrEventHappens(QUEST_4342); + break; + } + return true; +} + +/*###### +## npc_lokhtos_darkbargainer +######*/ + +#define ITEM_THRORIUM_BROTHERHOOD_CONTRACT 18628 +#define ITEM_SULFURON_INGOT 17203 +#define QUEST_A_BINDING_CONTRACT 7604 +#define SPELL_CREATE_THORIUM_BROTHERHOOD_CONTRACT_DND 23059 + +#define GOSSIP_ITEM_SHOW_ACCESS "Show me what I have access to, Lothos." +#define GOSSIP_ITEM_GET_CONTRACT "Get Thorium Brotherhood Contract" + +bool GossipHello_npc_lokhtos_darkbargainer(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pCreature->isVendor() && pPlayer->GetReputationRank(59) >= REP_FRIENDLY) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_ITEM_SHOW_ACCESS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); + + if (pPlayer->GetQuestRewardStatus(QUEST_A_BINDING_CONTRACT) != 1 && + !pPlayer->HasItemCount(ITEM_THRORIUM_BROTHERHOOD_CONTRACT, 1, true) && + pPlayer->HasItemCount(ITEM_SULFURON_INGOT, 1)) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_GET_CONTRACT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + } + + if (pPlayer->GetReputationRank(59) < REP_FRIENDLY) + pPlayer->SEND_GOSSIP_MENU(3673, pCreature->GetGUID()); + else + pPlayer->SEND_GOSSIP_MENU(3677, pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_lokhtos_darkbargainer(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) + { + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->CastSpell(pPlayer, SPELL_CREATE_THORIUM_BROTHERHOOD_CONTRACT_DND, false); + } + + if (uiAction == GOSSIP_ACTION_TRADE) + pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + + return true; +} + +/*###### +## npc_rocknot +######*/ + +#define SAY_GOT_BEER -1230000 +#define SPELL_DRUNKEN_RAGE 14872 +#define QUEST_ALE 4295 + +struct MANGOS_DLL_DECL npc_rocknotAI : public npc_escortAI +{ + npc_rocknotAI(Creature* pCreature) : npc_escortAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 BreakKeg_Timer; + uint32 BreakDoor_Timer; + + void Reset() + { + if (HasEscortState(STATE_ESCORT_ESCORTING)) + return; + + BreakKeg_Timer = 0; + BreakDoor_Timer = 0; + } + + void DoGo(uint32 id, uint32 state) + { + if (GameObject* pGo = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(id))) + pGo->SetGoState(GOState(state)); + } + + void WaypointReached(uint32 i) + { + if (!m_pInstance) + return; + + switch(i) + { + case 1: + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_KICK); + break; + case 2: + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_ATTACKUNARMED); + break; + case 3: + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_ATTACKUNARMED); + break; + case 4: + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_KICK); + break; + case 5: + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_KICK); + BreakKeg_Timer = 2000; + break; + } + } + + void UpdateEscortAI(const uint32 diff) + { + if (!m_pInstance) + return; + + if (BreakKeg_Timer) + { + if (BreakKeg_Timer <= diff) + { + DoGo(DATA_GO_BAR_KEG,0); + BreakKeg_Timer = 0; + BreakDoor_Timer = 1000; + }else BreakKeg_Timer -= diff; + } + + if (BreakDoor_Timer) + { + if (BreakDoor_Timer <= diff) + { + DoGo(DATA_GO_BAR_DOOR,2); + DoGo(DATA_GO_BAR_KEG_TRAP,0); //doesn't work very well, leaving code here for future + //spell by trap has effect61, this indicate the bar go hostile + + if (Unit *tmp = Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_PHALANX))) + tmp->setFaction(14); + + //for later, this event(s) has alot more to it. + //optionally, DONE can trigger bar to go hostile. + m_pInstance->SetData(TYPE_BAR,DONE); + + BreakDoor_Timer = 0; + }else BreakDoor_Timer -= diff; + } + } +}; + +CreatureAI* GetAI_npc_rocknot(Creature* pCreature) +{ + return new npc_rocknotAI(pCreature); +} + +bool ChooseReward_npc_rocknot(Player* pPlayer, Creature* pCreature, const Quest* pQuest, uint32 item) +{ + ScriptedInstance* pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + + if (!pInstance) + return true; + + if (pInstance->GetData(TYPE_BAR) == DONE || pInstance->GetData(TYPE_BAR) == SPECIAL) + return true; + + if (pQuest->GetQuestId() == QUEST_ALE) + { + if (pInstance->GetData(TYPE_BAR) != IN_PROGRESS) + pInstance->SetData(TYPE_BAR,IN_PROGRESS); + + pInstance->SetData(TYPE_BAR,SPECIAL); + + //keep track of amount in instance script, returns SPECIAL if amount ok and event in progress + if (pInstance->GetData(TYPE_BAR) == SPECIAL) + { + DoScriptText(SAY_GOT_BEER, pCreature); + pCreature->CastSpell(pCreature,SPELL_DRUNKEN_RAGE,false); + + if (npc_rocknotAI* pEscortAI = dynamic_cast(pCreature->AI())) + pEscortAI->Start(false, false, 0, NULL, true); + } + } + + return true; +} + +void AddSC_blackrock_depths() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "go_shadowforge_brazier"; + newscript->pGOHello = &GOHello_go_shadowforge_brazier; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "at_ring_of_law"; + newscript->pAreaTrigger = &AreaTrigger_at_ring_of_law; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_grimstone"; + newscript->GetAI = &GetAI_npc_grimstone; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_phalanx"; + newscript->GetAI = &GetAI_mob_phalanx; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_kharan_mighthammer"; + newscript->pGossipHello = &GossipHello_npc_kharan_mighthammer; + newscript->pGossipSelect = &GossipSelect_npc_kharan_mighthammer; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_lokhtos_darkbargainer"; + newscript->pGossipHello = &GossipHello_npc_lokhtos_darkbargainer; + newscript->pGossipSelect = &GossipSelect_npc_lokhtos_darkbargainer; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_rocknot"; + newscript->GetAI = &GetAI_npc_rocknot; + newscript->pChooseReward = &ChooseReward_npc_rocknot; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h new file mode 100644 index 000000000..90add2fb2 --- /dev/null +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h @@ -0,0 +1,40 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_BRD_H +#define DEF_BRD_H + +enum +{ + TYPE_RING_OF_LAW = 1, + TYPE_VAULT = 2, + TYPE_BAR = 3, + TYPE_TOMB_OF_SEVEN = 4, + TYPE_LYCEUM = 5, + TYPE_IRON_HALL = 6, + + DATA_EMPEROR = 10, + DATA_PRINCESS = 11, + DATA_PHALANX = 12, + DATA_HATEREL = 13, + DATA_ANGERREL = 14, + DATA_VILEREL = 15, + DATA_GLOOMREL = 16, + DATA_SEETHREL = 17, + DATA_DOOMREL = 18, + DATA_DOPEREL = 19, + + DATA_ARENA1 = 20, + DATA_ARENA2 = 21, + DATA_ARENA3 = 22, + DATA_ARENA4 = 23, + + DATA_GO_BAR_KEG = 24, + DATA_GO_BAR_KEG_TRAP = 25, + DATA_GO_BAR_DOOR = 26, + DATA_GO_CHALICE = 27, + DATA_GO_TOMB_EXIT = 28 +}; + +#endif diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp new file mode 100644 index 000000000..2d6b930dc --- /dev/null +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp @@ -0,0 +1,104 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Ambassador_Flamelash +SD%Complete: 100 +SDComment: +SDCategory: Blackrock Depths +EndScriptData */ + +#include "precompiled.h" + +#define SPELL_FIREBLAST 15573 + +struct MANGOS_DLL_DECL boss_ambassador_flamelashAI : public ScriptedAI +{ + boss_ambassador_flamelashAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 FireBlast_Timer; + uint32 Spirit_Timer; + int Rand; + int RandX; + int RandY; + Creature* Summoned; + + void Reset() + { + FireBlast_Timer = 2000; + Spirit_Timer = 24000; + } + + void SummonSpirits(Unit* victim) + { + Rand = rand()%10; + switch(urand(0, 1)) + { + case 0: RandX -= Rand; break; + case 1: RandX += Rand; break; + } + Rand = 0; + Rand = rand()%10; + switch(urand(0, 1)) + { + case 0: RandY -= Rand; break; + case 1: RandY += Rand; break; + } + Summoned = DoSpawnCreature(9178, RandX, RandY, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000); + if (Summoned) + ((CreatureAI*)Summoned->AI())->AttackStart(victim); + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //FireBlast_Timer + if (FireBlast_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_FIREBLAST); + FireBlast_Timer = 7000; + }else FireBlast_Timer -= diff; + + //Spirit_Timer + if (Spirit_Timer < diff) + { + SummonSpirits(m_creature->getVictim()); + SummonSpirits(m_creature->getVictim()); + SummonSpirits(m_creature->getVictim()); + SummonSpirits(m_creature->getVictim()); + + Spirit_Timer = 30000; + }else Spirit_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_ambassador_flamelash(Creature* pCreature) +{ + return new boss_ambassador_flamelashAI(pCreature); +} + +void AddSC_boss_ambassador_flamelash() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_ambassador_flamelash"; + newscript->GetAI = &GetAI_boss_ambassador_flamelash; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_anubshiah.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_anubshiah.cpp new file mode 100644 index 000000000..1cbb57ac5 --- /dev/null +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_anubshiah.cpp @@ -0,0 +1,111 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Anubshiah +SD%Complete: 100 +SDComment: +SDCategory: Blackrock Depths +EndScriptData */ + +#include "precompiled.h" + +#define SPELL_SHADOWBOLT 17228 +#define SPELL_CURSEOFTONGUES 15470 +#define SPELL_CURSEOFWEAKNESS 17227 +#define SPELL_DEMONARMOR 11735 +#define SPELL_ENVELOPINGWEB 15471 + +struct MANGOS_DLL_DECL boss_anubshiahAI : public ScriptedAI +{ + boss_anubshiahAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 ShadowBolt_Timer; + uint32 CurseOfTongues_Timer; + uint32 CurseOfWeakness_Timer; + uint32 DemonArmor_Timer; + uint32 EnvelopingWeb_Timer; + + void Reset() + { + ShadowBolt_Timer = 7000; + CurseOfTongues_Timer = 24000; + CurseOfWeakness_Timer = 12000; + DemonArmor_Timer = 3000; + EnvelopingWeb_Timer = 16000; + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //ShadowBolt_Timer + if (ShadowBolt_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_SHADOWBOLT); + ShadowBolt_Timer = 7000; + }else ShadowBolt_Timer -= diff; + + //CurseOfTongues_Timer + if (CurseOfTongues_Timer < diff) + { + Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM,0); + if (target) DoCast(target,SPELL_CURSEOFTONGUES); + CurseOfTongues_Timer = 18000; + }else CurseOfTongues_Timer -= diff; + + //CurseOfWeakness_Timer + if (CurseOfWeakness_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_CURSEOFWEAKNESS); + CurseOfWeakness_Timer = 45000; + }else CurseOfWeakness_Timer -= diff; + + //DemonArmor_Timer + if (DemonArmor_Timer < diff) + { + DoCast(m_creature,SPELL_DEMONARMOR); + DemonArmor_Timer = 300000; + }else DemonArmor_Timer -= diff; + + //EnvelopingWeb_Timer + if (EnvelopingWeb_Timer < diff) + { + Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM,0); + if (target) DoCast(target,SPELL_ENVELOPINGWEB); + EnvelopingWeb_Timer = 12000; + }else EnvelopingWeb_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_anubshiah(Creature* pCreature) +{ + return new boss_anubshiahAI(pCreature); +} + +void AddSC_boss_anubshiah() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_anubshiah"; + newscript->GetAI = &GetAI_boss_anubshiah; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp new file mode 100644 index 000000000..218d39a56 --- /dev/null +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp @@ -0,0 +1,260 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Emperor_Dagran_Thaurissan +SD%Complete: 90 +SDComment: With script for Moria +SDCategory: Blackrock Depths +EndScriptData */ + +#include "precompiled.h" +#include "blackrock_depths.h" + +enum eEmperor +{ + FACTION_NEUTRAL = 734, + SAY_AGGRO = -1230001, + SAY_SLAY = -1230002, + + SPELL_HANDOFTHAURISSAN = 17492, + SPELL_AVATAROFFLAME = 15636 +}; + +struct MANGOS_DLL_DECL boss_emperor_dagran_thaurissanAI : public ScriptedAI +{ + boss_emperor_dagran_thaurissanAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 m_uiHandOfThaurissan_Timer; + uint32 m_uiAvatarOfFlame_Timer; + //uint32 m_uiCounter; + + void Reset() + { + m_uiHandOfThaurissan_Timer = 4000; + m_uiAvatarOfFlame_Timer = 25000; + //m_uiCounter = 0; + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + m_creature->CallForHelp(VISIBLE_RANGE); + } + + void JustDied(Unit* pVictim) + { + if (!m_pInstance) + return; + + if (Creature* pPrincess = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_PRINCESS))) + { + if (pPrincess->isAlive()) + { + pPrincess->setFaction(FACTION_NEUTRAL); + pPrincess->AI()->EnterEvadeMode(); + } + } + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(SAY_SLAY, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiHandOfThaurissan_Timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(pTarget,SPELL_HANDOFTHAURISSAN); + + //3 Hands of Thaurissan will be casted + //if (m_uiCounter < 3) + //{ + // m_uiHandOfThaurissan_Timer = 1000; + // ++m_uiCounter; + //} + //else + //{ + m_uiHandOfThaurissan_Timer = 5000; + //m_uiCounter = 0; + //} + } + else + m_uiHandOfThaurissan_Timer -= uiDiff; + + //AvatarOfFlame_Timer + if (m_uiAvatarOfFlame_Timer < uiDiff) + { + DoCast(m_creature->getVictim(),SPELL_AVATAROFFLAME); + m_uiAvatarOfFlame_Timer = 18000; + } + else + m_uiAvatarOfFlame_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_emperor_dagran_thaurissan(Creature* pCreature) +{ + return new boss_emperor_dagran_thaurissanAI(pCreature); +} + +/*###### +## boss_moira_bronzebeard +######*/ + +enum ePrincess +{ + SPELL_HEAL = 15586, + SPELL_RENEW = 10929, + SPELL_SHIELD = 10901, + SPELL_MINDBLAST = 15587, + SPELL_SHADOWWORDPAIN = 15654, + SPELL_SMITE = 10934, + SPELL_SHADOW_BOLT = 15537, + SPELL_OPEN_PORTAL = 13912 +}; + +struct MANGOS_DLL_DECL boss_moira_bronzebeardAI : public ScriptedAI +{ + boss_moira_bronzebeardAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 m_uiHeal_Timer; + uint32 m_uiMindBlast_Timer; + uint32 m_uiShadowWordPain_Timer; + uint32 m_uiSmite_Timer; + + void Reset() + { + m_uiHeal_Timer = 12000; //These times are probably wrong + m_uiMindBlast_Timer = 16000; + m_uiShadowWordPain_Timer = 2000; + m_uiSmite_Timer = 8000; + } + + void AttackStart(Unit* pWho) + { + if (m_creature->Attack(pWho, false)) + { + m_creature->AddThreat(pWho, 0.0f); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + + m_creature->GetMotionMaster()->MoveChase(pWho, 25.0f); + } + } + + void JustReachedHome() + { + if (m_pInstance) + { + if (Creature* pEmperor = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_EMPEROR))) + { + // if evade, then check if he is alive. If not, start make portal + if (!pEmperor->isAlive()) + m_creature->CastSpell(m_creature, SPELL_OPEN_PORTAL, false); + } + } + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //MindBlast_Timer + if (m_uiMindBlast_Timer < uiDiff) + { + DoCast(m_creature->getVictim(),SPELL_MINDBLAST); + m_uiMindBlast_Timer = 14000; + } + else + m_uiMindBlast_Timer -= uiDiff; + + //ShadowWordPain_Timer + if (m_uiShadowWordPain_Timer < uiDiff) + { + DoCast(m_creature->getVictim(),SPELL_SHADOWWORDPAIN); + m_uiShadowWordPain_Timer = 18000; + } + else + m_uiShadowWordPain_Timer -= uiDiff; + + //Smite_Timer + if (m_uiSmite_Timer < uiDiff) + { + DoCast(m_creature->getVictim(),SPELL_SMITE); + m_uiSmite_Timer = 10000; + } + else + m_uiSmite_Timer -= uiDiff; + + //Heal_Timer + if (m_uiHeal_Timer < uiDiff) + { + if (Creature* pEmperor = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_EMPEROR))) + { + if (pEmperor->isAlive() && pEmperor->GetHealth() < pEmperor->GetMaxHealth()) + DoCast(pEmperor, SPELL_HEAL); + } + + m_uiHeal_Timer = 10000; + } + else + m_uiHeal_Timer -= uiDiff; + + //No meele? + } +}; + +CreatureAI* GetAI_boss_moira_bronzebeard(Creature* pCreature) +{ + return new boss_moira_bronzebeardAI(pCreature); +} + +void AddSC_boss_draganthaurissan() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_emperor_dagran_thaurissan"; + newscript->GetAI = &GetAI_boss_emperor_dagran_thaurissan; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_moira_bronzebeard"; + newscript->GetAI = &GetAI_boss_moira_bronzebeard; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp new file mode 100644 index 000000000..ffc4f53dc --- /dev/null +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp @@ -0,0 +1,163 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_General_Angerforge +SD%Complete: 100 +SDComment: +SDCategory: Blackrock Depths +EndScriptData */ + +#include "precompiled.h" + +#define SPELL_MIGHTYBLOW 14099 +#define SPELL_HAMSTRING 9080 +#define SPELL_CLEAVE 20691 + +struct MANGOS_DLL_DECL boss_general_angerforgeAI : public ScriptedAI +{ + boss_general_angerforgeAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 MightyBlow_Timer; + uint32 HamString_Timer; + uint32 Cleave_Timer; + uint32 Adds_Timer; + bool Medics; + int Rand1; + int Rand1X; + int Rand1Y; + int Rand2; + int Rand2X; + int Rand2Y; + Creature* SummonedAdds; + Creature* SummonedMedics; + + void Reset() + { + MightyBlow_Timer = 8000; + HamString_Timer = 12000; + Cleave_Timer = 16000; + Adds_Timer = 0; + Medics = false; + } + + void SummonAdds(Unit* victim) + { + Rand1 = rand()%15; + switch(urand(0, 1)) + { + case 0: Rand1X = 0 - Rand1; break; + case 1: Rand1X = 0 + Rand1; break; + } + Rand1 = 0; + Rand1 = rand()%15; + switch(urand(0, 1)) + { + case 0: Rand1Y = 0 - Rand1; break; + case 1: Rand1Y = 0 + Rand1; break; + } + Rand1 = 0; + SummonedAdds = DoSpawnCreature(8901, Rand1X, Rand1Y, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000); + if (SummonedAdds) + ((CreatureAI*)SummonedAdds->AI())->AttackStart(victim); + } + + void SummonMedics(Unit* victim) + { + Rand2 = rand()%10; + switch(urand(0, 1)) + { + case 0: Rand2X = 0 - Rand2; break; + case 1: Rand2X = 0 + Rand2; break; + } + Rand2 = 0; + Rand2 = rand()%10; + switch(urand(0, 1)) + { + case 0: Rand2Y = 0 - Rand2; break; + case 1: Rand2Y = 0 + Rand2; break; + } + Rand2 = 0; + SummonedMedics = DoSpawnCreature(8894, Rand2X, Rand2Y, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000); + if (SummonedMedics) + ((CreatureAI*)SummonedMedics->AI())->AttackStart(victim); + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //MightyBlow_Timer + if (MightyBlow_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_MIGHTYBLOW); + MightyBlow_Timer = 18000; + }else MightyBlow_Timer -= diff; + + //HamString_Timer + if (HamString_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_HAMSTRING); + HamString_Timer = 15000; + }else HamString_Timer -= diff; + + //Cleave_Timer + if (Cleave_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_CLEAVE); + Cleave_Timer = 9000; + }else Cleave_Timer -= diff; + + //Adds_Timer + if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 21) + { + if (Adds_Timer < diff) + { + // summon 3 Adds every 25s + SummonAdds(m_creature->getVictim()); + SummonAdds(m_creature->getVictim()); + SummonAdds(m_creature->getVictim()); + + Adds_Timer = 25000; + } else Adds_Timer -= diff; + } + + //Summon Medics + if (!Medics && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 21) + { + SummonMedics(m_creature->getVictim()); + SummonMedics(m_creature->getVictim()); + Medics = true; + } + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_general_angerforge(Creature* pCreature) +{ + return new boss_general_angerforgeAI(pCreature); +} + +void AddSC_boss_general_angerforge() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_general_angerforge"; + newscript->GetAI = &GetAI_boss_general_angerforge; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_gorosh_the_dervish.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_gorosh_the_dervish.cpp new file mode 100644 index 000000000..d17f4e00a --- /dev/null +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_gorosh_the_dervish.cpp @@ -0,0 +1,77 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Gorosh_the_Dervish +SD%Complete: 100 +SDComment: +SDCategory: Blackrock Depths +EndScriptData */ + +#include "precompiled.h" + +#define SPELL_WHIRLWIND 15589 +#define SPELL_MORTALSTRIKE 24573 + +struct MANGOS_DLL_DECL boss_gorosh_the_dervishAI : public ScriptedAI +{ + boss_gorosh_the_dervishAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 WhirlWind_Timer; + uint32 MortalStrike_Timer; + + void Reset() + { + WhirlWind_Timer = 12000; + MortalStrike_Timer = 22000; + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //WhirlWind_Timer + if (WhirlWind_Timer < diff) + { + DoCast(m_creature,SPELL_WHIRLWIND); + WhirlWind_Timer = 15000; + }else WhirlWind_Timer -= diff; + + //MortalStrike_Timer + if (MortalStrike_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_MORTALSTRIKE); + MortalStrike_Timer = 15000; + }else MortalStrike_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_gorosh_the_dervish(Creature* pCreature) +{ + return new boss_gorosh_the_dervishAI(pCreature); +} + +void AddSC_boss_gorosh_the_dervish() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_gorosh_the_dervish"; + newscript->GetAI = &GetAI_boss_gorosh_the_dervish; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_grizzle.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_grizzle.cpp new file mode 100644 index 000000000..b712608a1 --- /dev/null +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_grizzle.cpp @@ -0,0 +1,83 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Grizzle +SD%Complete: 100 +SDComment: +SDCategory: Blackrock Depths +EndScriptData */ + +#include "precompiled.h" + +#define EMOTE_GENERIC_FRENZY_KILL -1000001 + +#define SPELL_GROUNDTREMOR 6524 +#define SPELL_FRENZY 28371 + +struct MANGOS_DLL_DECL boss_grizzleAI : public ScriptedAI +{ + boss_grizzleAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 GroundTremor_Timer; + uint32 Frenzy_Timer; + + void Reset() + { + GroundTremor_Timer = 12000; + Frenzy_Timer =0; + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //GroundTremor_Timer + if (GroundTremor_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_GROUNDTREMOR); + GroundTremor_Timer = 8000; + }else GroundTremor_Timer -= diff; + + //Frenzy_Timer + if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 51) + { + if (Frenzy_Timer < diff) + { + DoCast(m_creature,SPELL_FRENZY); + DoScriptText(EMOTE_GENERIC_FRENZY_KILL, m_creature); + Frenzy_Timer = 15000; + }else Frenzy_Timer -= diff; + } + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_grizzle(Creature* pCreature) +{ + return new boss_grizzleAI(pCreature); +} + +void AddSC_boss_grizzle() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_grizzle"; + newscript->GetAI = &GetAI_boss_grizzle; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_high_interrogator_gerstahn.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_high_interrogator_gerstahn.cpp new file mode 100644 index 000000000..ba42298e9 --- /dev/null +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_high_interrogator_gerstahn.cpp @@ -0,0 +1,101 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_High_Interrogator_Gerstahn +SD%Complete: 100 +SDComment: +SDCategory: Blackrock Depths +EndScriptData */ + +#include "precompiled.h" + +#define SPELL_SHADOWWORDPAIN 10894 +#define SPELL_MANABURN 10876 +#define SPELL_PSYCHICSCREAM 8122 +#define SPELL_SHADOWSHIELD 22417 + +struct MANGOS_DLL_DECL boss_high_interrogator_gerstahnAI : public ScriptedAI +{ + boss_high_interrogator_gerstahnAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 ShadowWordPain_Timer; + uint32 ManaBurn_Timer; + uint32 PsychicScream_Timer; + uint32 ShadowShield_Timer; + + void Reset() + { + ShadowWordPain_Timer = 4000; + ManaBurn_Timer = 14000; + PsychicScream_Timer = 32000; + ShadowShield_Timer = 8000; + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //ShadowWordPain_Timer + if (ShadowWordPain_Timer < diff) + { + Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM,0); + if (target)DoCast(target,SPELL_SHADOWWORDPAIN); + ShadowWordPain_Timer = 7000; + }else ShadowWordPain_Timer -= diff; + + //ManaBurn_Timer + if (ManaBurn_Timer < diff) + { + Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM,0); + if (target)DoCast(target,SPELL_MANABURN); + ManaBurn_Timer = 10000; + }else ManaBurn_Timer -= diff; + + //PsychicScream_Timer + if (PsychicScream_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_PSYCHICSCREAM); + PsychicScream_Timer = 30000; + }else PsychicScream_Timer -= diff; + + //ShadowShield_Timer + if (ShadowShield_Timer < diff) + { + DoCast(m_creature,SPELL_SHADOWSHIELD); + ShadowShield_Timer = 25000; + }else ShadowShield_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_high_interrogator_gerstahn(Creature* pCreature) +{ + return new boss_high_interrogator_gerstahnAI(pCreature); +} + +void AddSC_boss_high_interrogator_gerstahn() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_high_interrogator_gerstahn"; + newscript->GetAI = &GetAI_boss_high_interrogator_gerstahn; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_magmus.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_magmus.cpp new file mode 100644 index 000000000..2230d6b47 --- /dev/null +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_magmus.cpp @@ -0,0 +1,113 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Magmus +SD%Complete: 80 +SDComment: Missing pre-event to open doors +SDCategory: Blackrock Depths +EndScriptData */ + +#include "precompiled.h" +#include "blackrock_depths.h" + +enum +{ + SPELL_FIERYBURST = 13900, + SPELL_WARSTOMP = 24375 +}; + +struct MANGOS_DLL_DECL boss_magmusAI : public ScriptedAI +{ + boss_magmusAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 m_uiFieryBurst_Timer; + uint32 m_uiWarStomp_Timer; + + void Reset() + { + m_uiFieryBurst_Timer = 5000; + m_uiWarStomp_Timer = 0; + } + + void Aggro(Unit* pWho) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_IRON_HALL, IN_PROGRESS); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_IRON_HALL, FAIL); + } + + void JustDied(Unit* pVictim) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_IRON_HALL, DONE); + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //FieryBurst_Timer + if (m_uiFieryBurst_Timer < uiDiff) + { + DoCast(m_creature->getVictim(),SPELL_FIERYBURST); + m_uiFieryBurst_Timer = 6000; + } + else + m_uiFieryBurst_Timer -= uiDiff; + + //WarStomp_Timer + if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 51) + { + if (m_uiWarStomp_Timer < uiDiff) + { + DoCast(m_creature->getVictim(),SPELL_WARSTOMP); + m_uiWarStomp_Timer = 8000; + } + else + m_uiWarStomp_Timer -= uiDiff; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_magmus(Creature* pCreature) +{ + return new boss_magmusAI(pCreature); +} + +void AddSC_boss_magmus() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_magmus"; + newscript->GetAI = &GetAI_boss_magmus; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_tomb_of_seven.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_tomb_of_seven.cpp new file mode 100644 index 000000000..6980c52f3 --- /dev/null +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_tomb_of_seven.cpp @@ -0,0 +1,325 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Tomb_Of_Seven +SD%Complete: 90 +SDComment: Learning Smelt Dark Iron if tribute quest rewarded. Basic event implemented. Correct order and timing of event is unknown. +SDCategory: Blackrock Depths +EndScriptData */ + +#include "precompiled.h" +#include "blackrock_depths.h" + +enum +{ + FACTION_NEUTRAL = 734, + FACTION_HOSTILE = 754, + + SPELL_SMELT_DARK_IRON = 14891, + SPELL_LEARN_SMELT = 14894, + QUEST_SPECTRAL_CHALICE = 4083, + SKILLPOINT_MIN = 230 +}; + +#define GOSSIP_ITEM_TEACH_1 "Teach me the art of smelting dark iron" +#define GOSSIP_ITEM_TEACH_2 "Continue..." +#define GOSSIP_ITEM_TRIBUTE "I want to pay tribute" + +bool GossipHello_boss_gloomrel(Player* pPlayer, Creature* pCreature) +{ + if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) + { + if (pInstance->GetData(TYPE_TOMB_OF_SEVEN) == NOT_STARTED) + { + if (pPlayer->GetQuestRewardStatus(QUEST_SPECTRAL_CHALICE) && + pPlayer->GetSkillValue(SKILL_MINING) >= SKILLPOINT_MIN && + !pPlayer->HasSpell(SPELL_SMELT_DARK_IRON)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TEACH_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + + if (!pPlayer->GetQuestRewardStatus(QUEST_SPECTRAL_CHALICE) && + pPlayer->GetSkillValue(SKILL_MINING) >= SKILLPOINT_MIN) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TRIBUTE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + } + } + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_boss_gloomrel(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TEACH_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11); + pPlayer->SEND_GOSSIP_MENU(2606, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+11: + pPlayer->CLOSE_GOSSIP_MENU(); + pCreature->CastSpell(pPlayer, SPELL_LEARN_SMELT, false); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] Continue...", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 22); + pPlayer->SEND_GOSSIP_MENU(2604, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+22: + pPlayer->CLOSE_GOSSIP_MENU(); + if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) + { + //are 5 minutes expected? go template may have data to despawn when used at quest + pInstance->DoRespawnGameObject(pInstance->GetData64(DATA_GO_CHALICE),MINUTE*5); + } + break; + } + return true; +} + +enum +{ + SPELL_SHADOWBOLTVOLLEY = 15245, + SPELL_IMMOLATE = 12742, + SPELL_CURSEOFWEAKNESS = 12493, + SPELL_DEMONARMOR = 13787, + SPELL_SUMMON_VOIDWALKERS = 15092, + + SAY_DOOMREL_START_EVENT = -1230003, + + MAX_DWARF = 7 +}; + +#define GOSSIP_ITEM_CHALLENGE "Your bondage is at an end, Doom'rel. I challenge you!" + +struct MANGOS_DLL_DECL boss_doomrelAI : public ScriptedAI +{ + boss_doomrelAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 m_uiShadowVolley_Timer; + uint32 m_uiImmolate_Timer; + uint32 m_uiCurseOfWeakness_Timer; + uint32 m_uiDemonArmor_Timer; + uint32 m_uiCallToFight_Timer; + uint8 m_uiDwarfRound; + bool m_bHasSummoned; + + void Reset() + { + m_uiShadowVolley_Timer = 10000; + m_uiImmolate_Timer = 18000; + m_uiCurseOfWeakness_Timer = 5000; + m_uiDemonArmor_Timer = 16000; + m_uiCallToFight_Timer = 0; + m_uiDwarfRound = 0; + m_bHasSummoned = false; + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_TOMB_OF_SEVEN, FAIL); + } + + void JustDied(Unit *victim) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_TOMB_OF_SEVEN, DONE); + } + + void JustSummoned(Creature* pSummoned) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + pSummoned->AI()->AttackStart(pTarget); + } + + Creature* GetDwarfForPhase(uint8 uiPhase) + { + switch(uiPhase) + { + case 0: + return m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_ANGERREL)); + case 1: + return m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_SEETHREL)); + case 2: + return m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_DOPEREL)); + case 3: + return m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_GLOOMREL)); + case 4: + return m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_VILEREL)); + case 5: + return m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_HATEREL)); + case 6: + return m_creature; + } + return NULL; + } + + void CallToFight(bool bStartFight) + { + if (Creature* pDwarf = GetDwarfForPhase(m_uiDwarfRound)) + { + if (bStartFight && pDwarf->isAlive()) + { + pDwarf->setFaction(FACTION_HOSTILE); + pDwarf->SetInCombatWithZone(); // attackstart + } + else + { + if (!pDwarf->isAlive() || pDwarf->isDead()) + pDwarf->Respawn(); + + pDwarf->setFaction(FACTION_NEUTRAL); + } + } + } + + void UpdateAI(const uint32 diff) + { + if (m_pInstance) + { + if (m_pInstance->GetData(TYPE_TOMB_OF_SEVEN) == IN_PROGRESS) + { + if (m_uiDwarfRound < MAX_DWARF) + { + if (m_uiCallToFight_Timer < diff) + { + CallToFight(true); + ++m_uiDwarfRound; + m_uiCallToFight_Timer = 30000; + } + else + m_uiCallToFight_Timer -= diff; + } + } + else if (m_pInstance->GetData(TYPE_TOMB_OF_SEVEN) == FAIL) + { + for (m_uiDwarfRound = 0; m_uiDwarfRound < MAX_DWARF; ++m_uiDwarfRound) + CallToFight(false); + + m_uiDwarfRound = 0; + m_uiCallToFight_Timer = 0; + + if (m_pInstance) + m_pInstance->SetData(TYPE_TOMB_OF_SEVEN, NOT_STARTED); + } + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //ShadowVolley_Timer + if (m_uiShadowVolley_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_SHADOWBOLTVOLLEY); + m_uiShadowVolley_Timer = 12000; + } + else + m_uiShadowVolley_Timer -= diff; + + //Immolate_Timer + if (m_uiImmolate_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_IMMOLATE); + + m_uiImmolate_Timer = 25000; + } + else + m_uiImmolate_Timer -= diff; + + //CurseOfWeakness_Timer + if (m_uiCurseOfWeakness_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_CURSEOFWEAKNESS); + m_uiCurseOfWeakness_Timer = 45000; + } + else + m_uiCurseOfWeakness_Timer -= diff; + + //DemonArmor_Timer + if (m_uiDemonArmor_Timer < diff) + { + DoCast(m_creature,SPELL_DEMONARMOR); + m_uiDemonArmor_Timer = 300000; + } + else + m_uiDemonArmor_Timer -= diff; + + //Summon Voidwalkers + if (!m_bHasSummoned && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 50) + { + m_creature->CastSpell(m_creature, SPELL_SUMMON_VOIDWALKERS, true); + m_bHasSummoned = true; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_doomrel(Creature* pCreature) +{ + return new boss_doomrelAI(pCreature); +} + +bool GossipHello_boss_doomrel(Player* pPlayer, Creature* pCreature) +{ + if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) + { + if (pInstance->GetData(TYPE_TOMB_OF_SEVEN) == NOT_STARTED) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_CHALLENGE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + } + + pPlayer->SEND_GOSSIP_MENU(2601, pCreature->GetGUID()); + return true; +} + +bool GossipSelect_boss_doomrel(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->CLOSE_GOSSIP_MENU(); + DoScriptText(SAY_DOOMREL_START_EVENT, pCreature, pPlayer); + // start event + if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) + pInstance->SetData(TYPE_TOMB_OF_SEVEN, IN_PROGRESS); + + break; + } + return true; +} + +void AddSC_boss_tomb_of_seven() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_gloomrel"; + newscript->pGossipHello = &GossipHello_boss_gloomrel; + newscript->pGossipSelect = &GossipSelect_boss_gloomrel; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_doomrel"; + newscript->GetAI = &GetAI_boss_doomrel; + newscript->pGossipHello = &GossipHello_boss_doomrel; + newscript->pGossipSelect = &GossipSelect_boss_doomrel; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp new file mode 100644 index 000000000..b1b048306 --- /dev/null +++ b/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp @@ -0,0 +1,377 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance_Blackrock_Depths +SD%Complete: 20 +SDComment: events: ring of law +SDCategory: Blackrock Depths +EndScriptData */ + +#include "precompiled.h" +#include "blackrock_depths.h" + +enum +{ + MAX_ENCOUNTER = 6, + + NPC_EMPEROR = 9019, + NPC_PRINCESS = 8929, + NPC_PHALANX = 9502, + NPC_HATEREL = 9034, + NPC_ANGERREL = 9035, + NPC_VILEREL = 9036, + NPC_GLOOMREL = 9037, + NPC_SEETHREL = 9038, + NPC_DOOMREL = 9039, + NPC_DOPEREL = 9040, + + GO_ARENA1 = 161525, + GO_ARENA2 = 161522, + GO_ARENA3 = 161524, + GO_ARENA4 = 161523, + GO_SHADOW_LOCK = 161460, + GO_SHADOW_MECHANISM = 161461, + GO_SHADOW_GIANT_DOOR = 157923, + GO_SHADOW_DUMMY = 161516, + GO_BAR_KEG_SHOT = 170607, + GO_BAR_KEG_TRAP = 171941, + GO_BAR_DOOR = 170571, + GO_TOMB_ENTER = 170576, + GO_TOMB_EXIT = 170577, + GO_LYCEUM = 170558, + GO_GOLEM_ROOM_N = 170573, + GO_GOLEM_ROOM_S = 170574, + GO_THRONE_ROOM = 170575, + + GO_SPECTRAL_CHALICE = 164869, + GO_CHEST_SEVEN = 169243 +}; + +struct MANGOS_DLL_DECL instance_blackrock_depths : public ScriptedInstance +{ + instance_blackrock_depths(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string strInstData; + + uint64 m_uiEmperorGUID; + uint64 m_uiPrincessGUID; + uint64 m_uiPhalanxGUID; + uint64 m_uiHaterelGUID; + uint64 m_uiAngerrelGUID; + uint64 m_uiVilerelGUID; + uint64 m_uiGloomrelGUID; + uint64 m_uiSeethrelGUID; + uint64 m_uiDoomrelGUID; + uint64 m_uiDoperelGUID; + + uint64 m_uiGoArena1GUID; + uint64 m_uiGoArena2GUID; + uint64 m_uiGoArena3GUID; + uint64 m_uiGoArena4GUID; + uint64 m_uiGoShadowLockGUID; + uint64 m_uiGoShadowMechGUID; + uint64 m_uiGoShadowGiantGUID; + uint64 m_uiGoShadowDummyGUID; + uint64 m_uiGoBarKegGUID; + uint64 m_uiGoBarKegTrapGUID; + uint64 m_uiGoBarDoorGUID; + uint64 m_uiGoTombEnterGUID; + uint64 m_uiGoTombExitGUID; + uint64 m_uiGoLyceumGUID; + uint64 m_uiGoGolemNGUID; + uint64 m_uiGoGolemSGUID; + uint64 m_uiGoThroneGUID; + + uint64 m_uiSpectralChaliceGUID; + uint64 m_uiSevensChestGUID; + + uint32 m_uiBarAleCount; + + void Initialize() + { + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + + m_uiEmperorGUID = 0; + m_uiPrincessGUID = 0; + m_uiPhalanxGUID = 0; + m_uiHaterelGUID = 0; + m_uiAngerrelGUID = 0; + m_uiVilerelGUID = 0; + m_uiGloomrelGUID = 0; + m_uiSeethrelGUID = 0; + m_uiDoomrelGUID = 0; + m_uiDoperelGUID = 0; + + m_uiGoArena1GUID = 0; + m_uiGoArena2GUID = 0; + m_uiGoArena3GUID = 0; + m_uiGoArena4GUID = 0; + m_uiGoShadowLockGUID = 0; + m_uiGoShadowMechGUID = 0; + m_uiGoShadowGiantGUID = 0; + m_uiGoShadowDummyGUID = 0; + m_uiGoBarKegGUID = 0; + m_uiGoBarKegTrapGUID = 0; + m_uiGoBarDoorGUID = 0; + m_uiGoTombEnterGUID = 0; + m_uiGoTombExitGUID = 0; + m_uiGoLyceumGUID = 0; + m_uiGoGolemNGUID = 0; + m_uiGoGolemSGUID = 0; + m_uiGoThroneGUID = 0; + + m_uiSpectralChaliceGUID = 0; + m_uiSevensChestGUID = 0; + + m_uiBarAleCount = 0; + } + + void OnCreatureCreate(Creature* pCreature) + { + switch(pCreature->GetEntry()) + { + case NPC_EMPEROR: m_uiEmperorGUID = pCreature->GetGUID(); break; + case NPC_PRINCESS: m_uiPrincessGUID = pCreature->GetGUID(); break; + case NPC_PHALANX: m_uiPhalanxGUID = pCreature->GetGUID(); break; + case NPC_HATEREL: m_uiHaterelGUID = pCreature->GetGUID(); break; + case NPC_ANGERREL: m_uiAngerrelGUID = pCreature->GetGUID(); break; + case NPC_VILEREL: m_uiVilerelGUID = pCreature->GetGUID(); break; + case NPC_GLOOMREL: m_uiGloomrelGUID = pCreature->GetGUID(); break; + case NPC_SEETHREL: m_uiSeethrelGUID = pCreature->GetGUID(); break; + case NPC_DOOMREL: m_uiDoomrelGUID = pCreature->GetGUID(); break; + case NPC_DOPEREL: m_uiDoperelGUID = pCreature->GetGUID(); break; + } + } + + void OnObjectCreate(GameObject* pGo) + { + switch(pGo->GetEntry()) + { + case GO_ARENA1: m_uiGoArena1GUID = pGo->GetGUID(); break; + case GO_ARENA2: m_uiGoArena2GUID = pGo->GetGUID(); break; + case GO_ARENA3: m_uiGoArena3GUID = pGo->GetGUID(); break; + case GO_ARENA4: m_uiGoArena4GUID = pGo->GetGUID(); break; + case GO_SHADOW_LOCK: m_uiGoShadowLockGUID = pGo->GetGUID(); break; + case GO_SHADOW_MECHANISM: m_uiGoShadowMechGUID = pGo->GetGUID(); break; + case GO_SHADOW_GIANT_DOOR: m_uiGoShadowGiantGUID = pGo->GetGUID(); break; + case GO_SHADOW_DUMMY: m_uiGoShadowDummyGUID = pGo->GetGUID(); break; + case GO_BAR_KEG_SHOT: m_uiGoBarKegGUID = pGo->GetGUID(); break; + case GO_BAR_KEG_TRAP: m_uiGoBarKegTrapGUID = pGo->GetGUID(); break; + case GO_BAR_DOOR: m_uiGoBarDoorGUID = pGo->GetGUID(); break; + case GO_TOMB_ENTER: m_uiGoTombEnterGUID = pGo->GetGUID(); break; + case GO_TOMB_EXIT: m_uiGoTombExitGUID = pGo->GetGUID(); break; + case GO_LYCEUM: m_uiGoLyceumGUID = pGo->GetGUID(); break; + case GO_GOLEM_ROOM_N: m_uiGoGolemNGUID = pGo->GetGUID(); break; + case GO_GOLEM_ROOM_S: m_uiGoGolemSGUID = pGo->GetGUID(); break; + case GO_THRONE_ROOM: m_uiGoThroneGUID = pGo->GetGUID(); break; + case GO_SPECTRAL_CHALICE: m_uiSpectralChaliceGUID = pGo->GetGUID(); break; + case GO_CHEST_SEVEN: m_uiSevensChestGUID = pGo->GetGUID(); break; + } + } + + void SetData(uint32 uiType, uint32 uiData) + { + debug_log("SD2: Instance Blackrock Depths: SetData update (Type: %u Data %u)", uiType, uiData); + + switch(uiType) + { + case TYPE_RING_OF_LAW: + m_auiEncounter[0] = uiData; + break; + case TYPE_VAULT: + m_auiEncounter[1] = uiData; + break; + case TYPE_BAR: + if (uiData == SPECIAL) + ++m_uiBarAleCount; + else + m_auiEncounter[2] = uiData; + break; + case TYPE_TOMB_OF_SEVEN: + switch(uiData) + { + case IN_PROGRESS: + DoUseDoorOrButton(m_uiGoTombEnterGUID); + break; + case FAIL: + if (m_auiEncounter[3] == IN_PROGRESS)//prevent use more than one time + DoUseDoorOrButton(m_uiGoTombEnterGUID); + break; + case DONE: + DoRespawnGameObject(m_uiSevensChestGUID, HOUR*IN_MILISECONDS); + DoUseDoorOrButton(m_uiGoTombExitGUID); + DoUseDoorOrButton(m_uiGoTombEnterGUID); + break; + } + m_auiEncounter[3] = uiData; + break; + case TYPE_LYCEUM: + if (uiData == DONE) + { + DoUseDoorOrButton(m_uiGoGolemNGUID); + DoUseDoorOrButton(m_uiGoGolemSGUID); + } + m_auiEncounter[4] = uiData; + break; + case TYPE_IRON_HALL: + switch(uiData) + { + case IN_PROGRESS: + DoUseDoorOrButton(m_uiGoGolemNGUID); + DoUseDoorOrButton(m_uiGoGolemSGUID); + break; + case FAIL: + DoUseDoorOrButton(m_uiGoGolemNGUID); + DoUseDoorOrButton(m_uiGoGolemSGUID); + break; + case DONE: + DoUseDoorOrButton(m_uiGoGolemNGUID); + DoUseDoorOrButton(m_uiGoGolemSGUID); + DoUseDoorOrButton(m_uiGoThroneGUID); + break; + } + m_auiEncounter[5] = uiData; + break; + } + + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " + << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5]; + + strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } + } + + uint32 GetData(uint32 uiType) + { + switch(uiType) + { + case TYPE_RING_OF_LAW: + return m_auiEncounter[0]; + case TYPE_VAULT: + return m_auiEncounter[1]; + case TYPE_BAR: + if (m_auiEncounter[2] == IN_PROGRESS && m_uiBarAleCount == 3) + return SPECIAL; + else + return m_auiEncounter[2]; + case TYPE_TOMB_OF_SEVEN: + return m_auiEncounter[3]; + case TYPE_LYCEUM: + return m_auiEncounter[4]; + case TYPE_IRON_HALL: + return m_auiEncounter[5]; + } + return 0; + } + + uint64 GetData64(uint32 uiData) + { + switch(uiData) + { + case DATA_EMPEROR: + return m_uiEmperorGUID; + case DATA_PRINCESS: + return m_uiPrincessGUID; + case DATA_PHALANX: + return m_uiPhalanxGUID; + case DATA_HATEREL: + return m_uiHaterelGUID; + case DATA_ANGERREL: + return m_uiAngerrelGUID; + case DATA_VILEREL: + return m_uiVilerelGUID; + case DATA_GLOOMREL: + return m_uiGloomrelGUID; + case DATA_SEETHREL: + return m_uiSeethrelGUID; + case DATA_DOOMREL: + return m_uiDoomrelGUID; + case DATA_DOPEREL: + return m_uiDoperelGUID; + + case DATA_ARENA1: + return m_uiGoArena1GUID; + case DATA_ARENA2: + return m_uiGoArena2GUID; + case DATA_ARENA3: + return m_uiGoArena3GUID; + case DATA_ARENA4: + return m_uiGoArena4GUID; + + case DATA_GO_BAR_KEG: + return m_uiGoBarKegGUID; + case DATA_GO_BAR_KEG_TRAP: + return m_uiGoBarKegTrapGUID; + case DATA_GO_BAR_DOOR: + return m_uiGoBarDoorGUID; + case DATA_GO_CHALICE: + return m_uiSpectralChaliceGUID; + case DATA_GO_TOMB_EXIT: + return m_uiGoTombExitGUID; + } + return 0; + } + + const char* Save() + { + return strInstData.c_str(); + } + + void Load(const char* in) + { + if (!in) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(in); + + std::istringstream loadStream(in); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] + >> m_auiEncounter[4] >> m_auiEncounter[5]; + + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; + + OUT_LOAD_INST_DATA_COMPLETE; + } +}; + +InstanceData* GetInstanceData_instance_blackrock_depths(Map* pMap) +{ + return new instance_blackrock_depths(pMap); +} + +void AddSC_instance_blackrock_depths() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "instance_blackrock_depths"; + newscript->GetInstanceData = &GetInstanceData_instance_blackrock_depths; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_drakkisath.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_drakkisath.cpp new file mode 100644 index 000000000..7d819338c --- /dev/null +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_drakkisath.cpp @@ -0,0 +1,97 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Drakkisath +SD%Complete: 100 +SDComment: +SDCategory: Blackrock Spire +EndScriptData */ + +#include "precompiled.h" + +#define SPELL_FIRENOVA 23462 +#define SPELL_CLEAVE 20691 +#define SPELL_CONFLIGURATION 16805 +#define SPELL_THUNDERCLAP 15548 //Not sure if right ID. 23931 would be a harder possibility. + +struct MANGOS_DLL_DECL boss_drakkisathAI : public ScriptedAI +{ + boss_drakkisathAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 FireNova_Timer; + uint32 Cleave_Timer; + uint32 Confliguration_Timer; + uint32 Thunderclap_Timer; + + void Reset() + { + FireNova_Timer = 6000; + Cleave_Timer = 8000; + Confliguration_Timer = 15000; + Thunderclap_Timer = 17000; + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //FireNova_Timer + if (FireNova_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_FIRENOVA); + FireNova_Timer = 10000; + }else FireNova_Timer -= diff; + + //Cleave_Timer + if (Cleave_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_CLEAVE); + Cleave_Timer = 8000; + }else Cleave_Timer -= diff; + + //Confliguration_Timer + if (Confliguration_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_CONFLIGURATION); + Confliguration_Timer = 18000; + }else Confliguration_Timer -= diff; + + //Thunderclap_Timer + if (Thunderclap_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_THUNDERCLAP); + Thunderclap_Timer = 20000; + }else Thunderclap_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_drakkisath(Creature* pCreature) +{ + return new boss_drakkisathAI(pCreature); +} + +void AddSC_boss_drakkisath() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_drakkisath"; + newscript->GetAI = &GetAI_boss_drakkisath; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp new file mode 100644 index 000000000..86a14694c --- /dev/null +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp @@ -0,0 +1,201 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Gyth +SD%Complete: 100 +SDComment: +SDCategory: Blackrock Spire +EndScriptData */ + +#include "precompiled.h" + +#define SPELL_CORROSIVEACID 20667 +#define SPELL_FREEZE 18763 +#define SPELL_FLAMEBREATH 20712 + +struct MANGOS_DLL_DECL boss_gythAI : public ScriptedAI +{ + boss_gythAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 Aggro_Timer; + uint32 Dragons_Timer; + uint32 Orc_Timer; + uint32 CorrosiveAcid_Timer; + uint32 Freeze_Timer; + uint32 Flamebreath_Timer; + uint32 Line1Count; + uint32 Line2Count; + + bool Event; + bool SummonedDragons; + bool SummonedOrcs; + bool SummonedRend; + bool bAggro; + bool RootSelf; + Creature *SummonedCreature; + + void Reset() + { + Dragons_Timer = 3000; + Orc_Timer = 60000; + Aggro_Timer = 60000; + CorrosiveAcid_Timer = 8000; + Freeze_Timer = 11000; + Flamebreath_Timer = 4000; + Event = false; + SummonedDragons = false; + SummonedOrcs= false; + SummonedRend = false; + bAggro = false; + RootSelf = false; + + // how many times should the two lines of summoned creatures be spawned + // min 2 x 2, max 7 lines of attack in total + Line1Count = rand() % 4 + 2; + if (Line1Count < 5) + Line2Count = rand() % (5 - Line1Count) + 2; + else + Line2Count = 2; + + //Invisible for event start + m_creature->SetDisplayId(11686); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } + + void SummonCreatureWithRandomTarget(uint32 creatureId) + { + Unit* Summoned = m_creature->SummonCreature(creatureId, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 240000); + if (Summoned) + { + Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0); + if (target) + Summoned->AddThreat(target, 1.0f); + } + } + + void UpdateAI(const uint32 diff) + { + //char buf[200]; + + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (!RootSelf) + { + //m_creature->m_canMove = true; + DoCast(m_creature, 33356); + RootSelf = true; + } + + if (!bAggro && Line1Count == 0 && Line2Count == 0) + { + if (Aggro_Timer < diff) + { + bAggro = true; + // Visible now! + m_creature->SetDisplayId(9723); + m_creature->setFaction(14); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } else Aggro_Timer -= diff; + } + + // Summon Dragon pack. 2 Dragons and 3 Whelps + if (!bAggro && !SummonedRend && Line1Count > 0) + { + if (Dragons_Timer < diff) + { + SummonCreatureWithRandomTarget(10372); + SummonCreatureWithRandomTarget(10372); + SummonCreatureWithRandomTarget(10442); + SummonCreatureWithRandomTarget(10442); + SummonCreatureWithRandomTarget(10442); + Line1Count = Line1Count - 1; + Dragons_Timer = 60000; + } else Dragons_Timer -= diff; + } + + //Summon Orc pack. 1 Orc Handler 1 Elite Dragonkin and 3 Whelps + if (!bAggro && !SummonedRend && Line1Count == 0 && Line2Count > 0) + { + if (Orc_Timer < diff) + { + SummonCreatureWithRandomTarget(10447); + SummonCreatureWithRandomTarget(10317); + SummonCreatureWithRandomTarget(10442); + SummonCreatureWithRandomTarget(10442); + SummonCreatureWithRandomTarget(10442); + Line2Count = Line2Count - 1; + Orc_Timer = 60000; + } else Orc_Timer -= diff; + } + + // we take part in the fight + if (bAggro) + { + // CorrosiveAcid_Timer + if (CorrosiveAcid_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_CORROSIVEACID); + CorrosiveAcid_Timer = 7000; + } else CorrosiveAcid_Timer -= diff; + + // Freeze_Timer + if (Freeze_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_FREEZE); + Freeze_Timer = 16000; + } else Freeze_Timer -= diff; + + // Flamebreath_Timer + if (Flamebreath_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_FLAMEBREATH); + Flamebreath_Timer = 10500; + } else Flamebreath_Timer -= diff; + + //Summon Rend + if (!SummonedRend && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 11 + && m_creature->GetHealth() > 0) + { + //summon Rend and Change model to normal Gyth + //Inturrupt any spell casting + m_creature->InterruptNonMeleeSpells(false); + //Gyth model + m_creature->SetDisplayId(9806); + m_creature->SummonCreature(10429, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 900000); + SummonedRend = true; + } + + DoMeleeAttackIfReady(); + } // end if Aggro + } +}; + +CreatureAI* GetAI_boss_gyth(Creature* pCreature) +{ + return new boss_gythAI(pCreature); +} + +void AddSC_boss_gyth() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_gyth"; + newscript->GetAI = &GetAI_boss_gyth; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_halycon.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_halycon.cpp new file mode 100644 index 000000000..9fd21866a --- /dev/null +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_halycon.cpp @@ -0,0 +1,91 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Halycon +SD%Complete: 100 +SDComment: +SDCategory: Blackrock Spire +EndScriptData */ + +#include "precompiled.h" + +#define SPELL_CROWDPUMMEL 10887 +#define SPELL_MIGHTYBLOW 14099 + +#define ADD_1X -169.839203 +#define ADD_1Y -324.961395 +#define ADD_1Z 64.401443 +#define ADD_1O 3.124724 + +struct MANGOS_DLL_DECL boss_halyconAI : public ScriptedAI +{ + boss_halyconAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 CrowdPummel_Timer; + uint32 MightyBlow_Timer; + bool Summoned; + + void Reset() + { + CrowdPummel_Timer = 8000; + MightyBlow_Timer = 14000; + Summoned = false; + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //CrowdPummel_Timer + if (CrowdPummel_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_CROWDPUMMEL); + CrowdPummel_Timer = 14000; + }else CrowdPummel_Timer -= diff; + + //MightyBlow_Timer + if (MightyBlow_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_MIGHTYBLOW); + MightyBlow_Timer = 10000; + }else MightyBlow_Timer -= diff; + + //Summon Gizrul + if (!Summoned && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 25) + { + m_creature->SummonCreature(10268,ADD_1X,ADD_1Y,ADD_1Z,ADD_1O,TEMPSUMMON_TIMED_DESPAWN,300000); + Summoned = true; + } + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_halycon(Creature* pCreature) +{ + return new boss_halyconAI(pCreature); +} + +void AddSC_boss_halycon() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_halycon"; + newscript->GetAI = &GetAI_boss_halycon; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_highlord_omokk.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_highlord_omokk.cpp new file mode 100644 index 000000000..5a9a23d51 --- /dev/null +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_highlord_omokk.cpp @@ -0,0 +1,127 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Highlord_Omokk +SD%Complete: 100 +SDComment: +SDCategory: Blackrock Spire +EndScriptData */ + +#include "precompiled.h" + +#define SPELL_WARSTOMP 24375 +#define SPELL_CLEAVE 15579 +#define SPELL_STRIKE 18368 +#define SPELL_REND 18106 +#define SPELL_SUNDERARMOR 24317 +#define SPELL_KNOCKAWAY 20686 +#define SPELL_SLOW 22356 + +struct MANGOS_DLL_DECL boss_highlordomokkAI : public ScriptedAI +{ + boss_highlordomokkAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 WarStomp_Timer; + uint32 Cleave_Timer; + uint32 Strike_Timer; + uint32 Rend_Timer; + uint32 SunderArmor_Timer; + uint32 KnockAway_Timer; + uint32 Slow_Timer; + + void Reset() + { + WarStomp_Timer = 15000; + Cleave_Timer = 6000; + Strike_Timer = 10000; + Rend_Timer = 14000; + SunderArmor_Timer = 2000; + KnockAway_Timer = 18000; + Slow_Timer = 24000; + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //WarStomp_Timer + if (WarStomp_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_WARSTOMP); + WarStomp_Timer = 14000; + }else WarStomp_Timer -= diff; + + //Cleave_Timer + if (Cleave_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_CLEAVE); + Cleave_Timer = 8000; + }else Cleave_Timer -= diff; + + //Strike_Timer + if (Strike_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_STRIKE); + Strike_Timer = 10000; + }else Strike_Timer -= diff; + + //Rend_Timer + if (Rend_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_REND); + Rend_Timer = 18000; + }else Rend_Timer -= diff; + + //SunderArmor_Timer + if (SunderArmor_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_SUNDERARMOR); + SunderArmor_Timer = 25000; + }else SunderArmor_Timer -= diff; + + //KnockAway_Timer + if (KnockAway_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_KNOCKAWAY); + KnockAway_Timer = 12000; + }else KnockAway_Timer -= diff; + + //Slow_Timer + if (Slow_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_SLOW); + Slow_Timer = 18000; + }else Slow_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_highlordomokk(Creature* pCreature) +{ + return new boss_highlordomokkAI(pCreature); +} + +void AddSC_boss_highlordomokk() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_highlord_omokk"; + newscript->GetAI = &GetAI_boss_highlordomokk; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_mother_smolderweb.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_mother_smolderweb.cpp new file mode 100644 index 000000000..5e17448d8 --- /dev/null +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_mother_smolderweb.cpp @@ -0,0 +1,84 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Mother_Smolderweb +SD%Complete: 100 +SDComment: Uncertain how often mother's milk is casted +SDCategory: Blackrock Spire +EndScriptData */ + +#include "precompiled.h" + +#define SPELL_CRYSTALIZE 16104 +#define SPELL_MOTHERSMILK 16468 +#define SPELL_SUMMON_SPIRE_SPIDERLING 16103 + +struct MANGOS_DLL_DECL boss_mothersmolderwebAI : public ScriptedAI +{ + boss_mothersmolderwebAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 Crystalize_Timer; + uint32 MothersMilk_Timer; + + void Reset() + { + Crystalize_Timer = 20000; + MothersMilk_Timer = 10000; + } + + void DamageTaken(Unit *done_by, uint32 &damage) + { + if (m_creature->GetHealth() <= damage) + m_creature->CastSpell(m_creature,SPELL_SUMMON_SPIRE_SPIDERLING,true); + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Crystalize_Timer + if (Crystalize_Timer < diff) + { + DoCast(m_creature,SPELL_CRYSTALIZE); + Crystalize_Timer = 15000; + }else Crystalize_Timer -= diff; + + //MothersMilk_Timer + if (MothersMilk_Timer < diff) + { + DoCast(m_creature,SPELL_MOTHERSMILK); + MothersMilk_Timer = urand(5000, 12500); + }else MothersMilk_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_mothersmolderweb(Creature* pCreature) +{ + return new boss_mothersmolderwebAI(pCreature); +} + +void AddSC_boss_mothersmolderweb() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_mother_smolderweb"; + newscript->GetAI = &GetAI_boss_mothersmolderweb; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_overlord_wyrmthalak.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_overlord_wyrmthalak.cpp new file mode 100644 index 000000000..c2d25a09a --- /dev/null +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_overlord_wyrmthalak.cpp @@ -0,0 +1,125 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Overlord_Wyrmthalak +SD%Complete: 100 +SDComment: +SDCategory: Blackrock Spire +EndScriptData */ + +#include "precompiled.h" + +#define SPELL_BLASTWAVE 11130 +#define SPELL_SHOUT 23511 +#define SPELL_CLEAVE 20691 +#define SPELL_KNOCKAWAY 20686 + +#define ADD_1X -39.355381 +#define ADD_1Y -513.456482 +#define ADD_1Z 88.472046 +#define ADD_1O 4.679872 + +#define ADD_2X -49.875881 +#define ADD_2Y -511.896942 +#define ADD_2Z 88.195160 +#define ADD_2O 4.613114 + +struct MANGOS_DLL_DECL boss_overlordwyrmthalakAI : public ScriptedAI +{ + boss_overlordwyrmthalakAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 BlastWave_Timer; + uint32 Shout_Timer; + uint32 Cleave_Timer; + uint32 Knockaway_Timer; + bool Summoned; + Creature *SummonedCreature; + + void Reset() + { + BlastWave_Timer = 20000; + Shout_Timer = 2000; + Cleave_Timer = 6000; + Knockaway_Timer = 12000; + Summoned = false; + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //BlastWave_Timer + if (BlastWave_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_BLASTWAVE); + BlastWave_Timer = 20000; + }else BlastWave_Timer -= diff; + + //Shout_Timer + if (Shout_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_SHOUT); + Shout_Timer = 10000; + }else Shout_Timer -= diff; + + //Cleave_Timer + if (Cleave_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_CLEAVE); + Cleave_Timer = 7000; + }else Cleave_Timer -= diff; + + //Knockaway_Timer + if (Knockaway_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_KNOCKAWAY); + Knockaway_Timer = 14000; + }else Knockaway_Timer -= diff; + + //Summon two Beserks + if (!Summoned && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 51) + { + Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM,0); + + SummonedCreature = m_creature->SummonCreature(9216,ADD_1X,ADD_1Y,ADD_1Z,ADD_1O,TEMPSUMMON_TIMED_DESPAWN,300000); + if (SummonedCreature) + ((CreatureAI*)SummonedCreature->AI())->AttackStart(target); + SummonedCreature = m_creature->SummonCreature(9268,ADD_2X,ADD_2Y,ADD_2Z,ADD_2O,TEMPSUMMON_TIMED_DESPAWN,300000); + if (SummonedCreature) + ((CreatureAI*)SummonedCreature->AI())->AttackStart(target); + Summoned = true; + } + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_overlordwyrmthalak(Creature* pCreature) +{ + return new boss_overlordwyrmthalakAI(pCreature); +} + +void AddSC_boss_overlordwyrmthalak() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_overlord_wyrmthalak"; + newscript->GetAI = &GetAI_boss_overlordwyrmthalak; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp new file mode 100644 index 000000000..b6e20ceae --- /dev/null +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp @@ -0,0 +1,89 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Pyroguard_Emberseer +SD%Complete: 100 +SDComment: Event to activate Emberseer NYI +SDCategory: Blackrock Spire +EndScriptData */ + +#include "precompiled.h" + +#define SPELL_FIRENOVA 23462 +#define SPELL_FLAMEBUFFET 23341 +#define SPELL_PYROBLAST 17274 + +struct MANGOS_DLL_DECL boss_pyroguard_emberseerAI : public ScriptedAI +{ + boss_pyroguard_emberseerAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 FireNova_Timer; + uint32 FlameBuffet_Timer; + uint32 PyroBlast_Timer; + + void Reset() + { + FireNova_Timer = 6000; + FlameBuffet_Timer = 3000; + PyroBlast_Timer = 14000; + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //FireNova_Timer + if (FireNova_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_FIRENOVA); + FireNova_Timer = 6000; + }else FireNova_Timer -= diff; + + //FlameBuffet_Timer + if (FlameBuffet_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_FLAMEBUFFET); + FlameBuffet_Timer = 14000; + }else FlameBuffet_Timer -= diff; + + //PyroBlast_Timer + if (PyroBlast_Timer < diff) + { + Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM,0); + if (target) DoCast(target,SPELL_PYROBLAST); + PyroBlast_Timer = 15000; + }else PyroBlast_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_pyroguard_emberseer(Creature* pCreature) +{ + return new boss_pyroguard_emberseerAI(pCreature); +} + +void AddSC_boss_pyroguard_emberseer() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_pyroguard_emberseer"; + newscript->GetAI = &GetAI_boss_pyroguard_emberseer; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_quartermaster_zigris.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_quartermaster_zigris.cpp new file mode 100644 index 000000000..3b6748c28 --- /dev/null +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_quartermaster_zigris.cpp @@ -0,0 +1,81 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Quartmaster_Zigris +SD%Complete: 100 +SDComment: Needs revision +SDCategory: Blackrock Spire +EndScriptData */ + +#include "precompiled.h" + +#define SPELL_SHOOT 16496 +#define SPELL_STUNBOMB 16497 +#define SPELL_HEALING_POTION 15504 +#define SPELL_HOOKEDNET 15609 + +struct MANGOS_DLL_DECL boss_quatermasterzigrisAI : public ScriptedAI +{ + boss_quatermasterzigrisAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 Shoot_Timer; + uint32 StunBomb_Timer; + //uint32 HelingPotion_Timer; + + void Reset() + { + Shoot_Timer = 1000; + StunBomb_Timer = 16000; + //HelingPotion_Timer = 25000; + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Shoot_Timer + if (Shoot_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_SHOOT); + Shoot_Timer = 500; + }else Shoot_Timer -= diff; + + //StunBomb_Timer + if (StunBomb_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_STUNBOMB); + StunBomb_Timer = 14000; + }else StunBomb_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_quatermasterzigris(Creature* pCreature) +{ + return new boss_quatermasterzigrisAI(pCreature); +} + +void AddSC_boss_quatermasterzigris() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "quartermaster_zigris"; + newscript->GetAI = &GetAI_boss_quatermasterzigris; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_rend_blackhand.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_rend_blackhand.cpp new file mode 100644 index 000000000..ca400ceab --- /dev/null +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_rend_blackhand.cpp @@ -0,0 +1,87 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Rend_Blackhand +SD%Complete: 100 +SDComment: Intro event NYI +SDCategory: Blackrock Spire +EndScriptData */ + +#include "precompiled.h" + +#define SPELL_WHIRLWIND 26038 +#define SPELL_CLEAVE 20691 +#define SPELL_THUNDERCLAP 23931 //Not sure if he cast this spell + +struct MANGOS_DLL_DECL boss_rend_blackhandAI : public ScriptedAI +{ + boss_rend_blackhandAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 WhirlWind_Timer; + uint32 Cleave_Timer; + uint32 Thunderclap_Timer; + + void Reset() + { + WhirlWind_Timer = 20000; + Cleave_Timer = 5000; + Thunderclap_Timer = 9000; + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //WhirlWind_Timer + if (WhirlWind_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_WHIRLWIND); + WhirlWind_Timer = 18000; + }else WhirlWind_Timer -= diff; + + //Cleave_Timer + if (Cleave_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_CLEAVE); + Cleave_Timer = 10000; + }else Cleave_Timer -= diff; + + //Thunderclap_Timer + if (Thunderclap_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_THUNDERCLAP); + Thunderclap_Timer = 16000; + }else Thunderclap_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_rend_blackhand(Creature* pCreature) +{ + return new boss_rend_blackhandAI(pCreature); +} + +void AddSC_boss_rend_blackhand() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_rend_blackhand"; + newscript->GetAI = &GetAI_boss_rend_blackhand; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_shadow_hunter_voshgajin.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_shadow_hunter_voshgajin.cpp new file mode 100644 index 000000000..61934f499 --- /dev/null +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_shadow_hunter_voshgajin.cpp @@ -0,0 +1,91 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Shadow_Hunter_Voshgajin +SD%Complete: 100 +SDComment: +SDCategory: Blackrock Spire +EndScriptData */ + +#include "precompiled.h" + +#define SPELL_CURSEOFBLOOD 24673 +#define SPELL_HEX 16708 +#define SPELL_CLEAVE 20691 + +struct MANGOS_DLL_DECL boss_shadowvoshAI : public ScriptedAI +{ + boss_shadowvoshAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 CurseOfBlood_Timer; + uint32 Hex_Timer; + uint32 Cleave_Timer; + + void Reset() + { + CurseOfBlood_Timer = 2000; + Hex_Timer = 8000; + Cleave_Timer = 14000; + + //m_creature->CastSpell(m_creature,SPELL_ICEARMOR,true); + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //CurseOfBlood_Timer + if (CurseOfBlood_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_CURSEOFBLOOD); + CurseOfBlood_Timer = 45000; + }else CurseOfBlood_Timer -= diff; + + //Hex_Timer + if (Hex_Timer < diff) + { + Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM,0); + if (target) DoCast(target,SPELL_HEX); + Hex_Timer = 15000; + }else Hex_Timer -= diff; + + //Cleave_Timer + if (Cleave_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_CLEAVE); + Cleave_Timer = 7000; + }else Cleave_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_shadowvosh(Creature* pCreature) +{ + return new boss_shadowvoshAI(pCreature); +} + +void AddSC_boss_shadowvosh() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_shadow_hunter_voshgajin"; + newscript->GetAI = &GetAI_boss_shadowvosh; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_the_beast.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_the_beast.cpp new file mode 100644 index 000000000..687d22764 --- /dev/null +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_the_beast.cpp @@ -0,0 +1,89 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_The_Best +SD%Complete: 100 +SDComment: +SDCategory: Blackrock Spire +EndScriptData */ + +#include "precompiled.h" + +#define SPELL_FLAMEBREAK 16785 +#define SPELL_IMMOLATE 20294 +#define SPELL_TERRIFYINGROAR 14100 + +struct MANGOS_DLL_DECL boss_thebeastAI : public ScriptedAI +{ + boss_thebeastAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 Flamebreak_Timer; + uint32 Immolate_Timer; + uint32 TerrifyingRoar_Timer; + + void Reset() + { + Flamebreak_Timer = 12000; + Immolate_Timer = 3000; + TerrifyingRoar_Timer = 23000; + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Flamebreak_Timer + if (Flamebreak_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_FLAMEBREAK); + Flamebreak_Timer = 10000; + }else Flamebreak_Timer -= diff; + + //Immolate_Timer + if (Immolate_Timer < diff) + { + Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM,0); + if (target) DoCast(target,SPELL_IMMOLATE); + Immolate_Timer = 8000; + }else Immolate_Timer -= diff; + + //TerrifyingRoar_Timer + if (TerrifyingRoar_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_TERRIFYINGROAR); + TerrifyingRoar_Timer = 20000; + }else TerrifyingRoar_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_thebeast(Creature* pCreature) +{ + return new boss_thebeastAI(pCreature); +} + +void AddSC_boss_thebeast() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_the_beast"; + newscript->GetAI = &GetAI_boss_thebeast; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_warmaster_voone.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_warmaster_voone.cpp new file mode 100644 index 000000000..3c6755f0a --- /dev/null +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_warmaster_voone.cpp @@ -0,0 +1,117 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Warmaster_Voone +SD%Complete: 100 +SDComment: +SDCategory: Blackrock Spire +EndScriptData */ + +#include "precompiled.h" + +#define SPELL_SNAPKICK 15618 +#define SPELL_CLEAVE 15579 +#define SPELL_UPPERCUT 10966 +#define SPELL_MORTALSTRIKE 16856 +#define SPELL_PUMMEL 15615 +#define SPELL_THROWAXE 16075 + +struct MANGOS_DLL_DECL boss_warmastervooneAI : public ScriptedAI +{ + boss_warmastervooneAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 Snapkick_Timer; + uint32 Cleave_Timer; + uint32 Uppercut_Timer; + uint32 MortalStrike_Timer; + uint32 Pummel_Timer; + uint32 ThrowAxe_Timer; + + void Reset() + { + Snapkick_Timer = 8000; + Cleave_Timer = 14000; + Uppercut_Timer = 20000; + MortalStrike_Timer = 12000; + Pummel_Timer = 32000; + ThrowAxe_Timer = 1000; + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Snapkick_Timer + if (Snapkick_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_SNAPKICK); + Snapkick_Timer = 6000; + }else Snapkick_Timer -= diff; + + //Cleave_Timer + if (Cleave_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_CLEAVE); + Cleave_Timer = 12000; + }else Cleave_Timer -= diff; + + //Uppercut_Timer + if (Uppercut_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_UPPERCUT); + Uppercut_Timer = 14000; + }else Uppercut_Timer -= diff; + + //MortalStrike_Timer + if (MortalStrike_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_MORTALSTRIKE); + MortalStrike_Timer = 10000; + }else MortalStrike_Timer -= diff; + + //Pummel_Timer + if (Pummel_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_PUMMEL); + Pummel_Timer = 16000; + }else Pummel_Timer -= diff; + + //ThrowAxe_Timer + if (ThrowAxe_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_THROWAXE); + ThrowAxe_Timer = 8000; + }else ThrowAxe_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_warmastervoone(Creature* pCreature) +{ + return new boss_warmastervooneAI(pCreature); +} + +void AddSC_boss_warmastervoone() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_warmaster_voone"; + newscript->GetAI = &GetAI_boss_warmastervoone; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_broodlord_lashlayer.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_broodlord_lashlayer.cpp new file mode 100644 index 000000000..d97ca71ba --- /dev/null +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_broodlord_lashlayer.cpp @@ -0,0 +1,111 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Broodlord_Lashlayer +SD%Complete: 100 +SDComment: +SDCategory: Blackwing Lair +EndScriptData */ + +#include "precompiled.h" + +#define SAY_AGGRO -1469000 +#define SAY_LEASH -1469001 + +#define SPELL_CLEAVE 26350 +#define SPELL_BLASTWAVE 23331 +#define SPELL_MORTALSTRIKE 24573 +#define SPELL_KNOCKBACK 25778 + +struct MANGOS_DLL_DECL boss_broodlordAI : public ScriptedAI +{ + boss_broodlordAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 Cleave_Timer; + uint32 BlastWave_Timer; + uint32 MortalStrike_Timer; + uint32 KnockBack_Timer; + + void Reset() + { + Cleave_Timer = 8000; //These times are probably wrong + BlastWave_Timer = 12000; + MortalStrike_Timer = 20000; + KnockBack_Timer = 30000; + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + m_creature->SetInCombatWithZone(); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Cleave_Timer + if (Cleave_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_CLEAVE); + Cleave_Timer = 7000; + }else Cleave_Timer -= diff; + + // BlastWave + if (BlastWave_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_BLASTWAVE); + BlastWave_Timer = urand(8000, 16000); + }else BlastWave_Timer -= diff; + + //MortalStrike_Timer + if (MortalStrike_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_MORTALSTRIKE); + MortalStrike_Timer = urand(25000, 35000); + }else MortalStrike_Timer -= diff; + + if (KnockBack_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_KNOCKBACK); + //Drop 50% aggro + if (m_creature->getThreatManager().getThreat(m_creature->getVictim())) + m_creature->getThreatManager().modifyThreatPercent(m_creature->getVictim(),-50); + + KnockBack_Timer = urand(15000, 30000); + }else KnockBack_Timer -= diff; + + DoMeleeAttackIfReady(); + + if (EnterEvadeIfOutOfCombatArea(diff)) + DoScriptText(SAY_LEASH, m_creature); + } +}; +CreatureAI* GetAI_boss_broodlord(Creature* pCreature) +{ + return new boss_broodlordAI(pCreature); +} + +void AddSC_boss_broodlord() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_broodlord"; + newscript->GetAI = &GetAI_boss_broodlord; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp new file mode 100644 index 000000000..b67398a19 --- /dev/null +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp @@ -0,0 +1,313 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Chromaggus +SD%Complete: 95 +SDComment: Chromatic Mutation disabled due to lack of core support +SDCategory: Blackwing Lair +EndScriptData */ + +#include "precompiled.h" + +enum +{ + EMOTE_GENERIC_FRENZY_KILL = -1000001, + EMOTE_SHIMMER = -1469003, + + //These spells are actually called elemental shield + //What they do is decrease all damage by 75% then they increase + //One school of damage by 1100% + SPELL_FIRE_VURNALBILTY = 22277, + SPELL_FROST_VURNALBILTY = 22278, + SPELL_SHADOW_VURNALBILTY = 22279, + SPELL_NATURE_VURNALBILTY = 22280, + SPELL_ARCANE_VURNALBILTY = 22281, + + SPELL_INCINERATE = 23308, //Incinerate 23308,23309 + SPELL_TIMELAPSE = 23310, //Time lapse 23310, 23311(old threat mod that was removed in 2.01) + SPELL_CORROSIVEACID = 23313, //Corrosive Acid 23313, 23314 + SPELL_IGNITEFLESH = 23315, //Ignite Flesh 23315,23316 + SPELL_FROSTBURN = 23187, //Frost burn 23187, 23189 + + //Brood Affliction 23173 - Scripted Spell that cycles through all targets within 100 yards and has a chance to cast one of the afflictions on them + //Since Scripted spells arn't coded I'll just write a function that does the same thing + SPELL_BROODAF_BLUE = 23153, //Blue affliction 23153 + SPELL_BROODAF_BLACK = 23154, //Black affliction 23154 + SPELL_BROODAF_RED = 23155, //Red affliction 23155 (23168 on death) + SPELL_BROODAF_BRONZE = 23170, //Bronze Affliction 23170 + SPELL_BROODAF_GREEN = 23169, //Brood Affliction Green 23169 + + SPELL_CHROMATIC_MUT_1 = 23174, //Spell cast on player if they get all 5 debuffs + + SPELL_FRENZY = 28371, //The frenzy spell may be wrong + SPELL_ENRAGE = 28747 +}; + +struct MANGOS_DLL_DECL boss_chromaggusAI : public ScriptedAI +{ + boss_chromaggusAI(Creature* pCreature) : ScriptedAI(pCreature) + { + //Select the 2 breaths that we are going to use until despawned + //5 possiblities for the first breath, 4 for the second, 20 total possiblites + //This way we don't end up casting 2 of the same breath + //TL TL would be stupid + srand(time(NULL)); + switch(urand(0, 19)) + { + //B1 - Incin + case 0: + Breath1_Spell = SPELL_INCINERATE; + Breath2_Spell = SPELL_TIMELAPSE; + break; + case 1: + Breath1_Spell = SPELL_INCINERATE; + Breath2_Spell = SPELL_CORROSIVEACID; + break; + case 2: + Breath1_Spell = SPELL_INCINERATE; + Breath2_Spell = SPELL_IGNITEFLESH; + break; + case 3: + Breath1_Spell = SPELL_INCINERATE; + Breath2_Spell = SPELL_FROSTBURN; + break; + + //B1 - TL + case 4: + Breath1_Spell = SPELL_TIMELAPSE; + Breath2_Spell = SPELL_INCINERATE; + break; + case 5: + Breath1_Spell = SPELL_TIMELAPSE; + Breath2_Spell = SPELL_CORROSIVEACID; + break; + case 6: + Breath1_Spell = SPELL_TIMELAPSE; + Breath2_Spell = SPELL_IGNITEFLESH; + break; + case 7: + Breath1_Spell = SPELL_TIMELAPSE; + Breath2_Spell = SPELL_FROSTBURN; + break; + + //B1 - Acid + case 8: + Breath1_Spell = SPELL_CORROSIVEACID; + Breath2_Spell = SPELL_INCINERATE; + break; + case 9: + Breath1_Spell = SPELL_CORROSIVEACID; + Breath2_Spell = SPELL_TIMELAPSE; + break; + case 10: + Breath1_Spell = SPELL_CORROSIVEACID; + Breath2_Spell = SPELL_IGNITEFLESH; + break; + case 11: + Breath1_Spell = SPELL_CORROSIVEACID; + Breath2_Spell = SPELL_FROSTBURN; + break; + + //B1 - Ignite + case 12: + Breath1_Spell = SPELL_IGNITEFLESH; + Breath2_Spell = SPELL_INCINERATE; + break; + case 13: + Breath1_Spell = SPELL_IGNITEFLESH; + Breath2_Spell = SPELL_CORROSIVEACID; + break; + case 14: + Breath1_Spell = SPELL_IGNITEFLESH; + Breath2_Spell = SPELL_TIMELAPSE; + break; + case 15: + Breath1_Spell = SPELL_IGNITEFLESH; + Breath2_Spell = SPELL_FROSTBURN; + break; + + //B1 - Frost + case 16: + Breath1_Spell = SPELL_FROSTBURN; + Breath2_Spell = SPELL_INCINERATE; + break; + case 17: + Breath1_Spell = SPELL_FROSTBURN; + Breath2_Spell = SPELL_TIMELAPSE; + break; + case 18: + Breath1_Spell = SPELL_FROSTBURN; + Breath2_Spell = SPELL_CORROSIVEACID; + break; + case 19: + Breath1_Spell = SPELL_FROSTBURN; + Breath2_Spell = SPELL_IGNITEFLESH; + break; + }; + + EnterEvadeMode(); + } + + uint32 Breath1_Spell; + uint32 Breath2_Spell; + uint32 CurrentVurln_Spell; + + uint32 Shimmer_Timer; + uint32 Breath1_Timer; + uint32 Breath2_Timer; + uint32 Affliction_Timer; + uint32 Frenzy_Timer; + bool Enraged; + + void Reset() + { + CurrentVurln_Spell = 0; //We use this to store our last vurlnability spell so we can remove it later + + Shimmer_Timer = 0; //Time till we change vurlnerabilites + Breath1_Timer = 30000; //First breath is 30 seconds + Breath2_Timer = 60000; //Second is 1 minute so that we can alternate + Affliction_Timer = 10000; //This is special - 5 seconds means that we cast this on 1 pPlayer every 5 sconds + Frenzy_Timer = 15000; + + Enraged = false; + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Shimmer_Timer Timer + if (Shimmer_Timer < diff) + { + //Remove old vurlnability spell + if (CurrentVurln_Spell) + m_creature->RemoveAurasDueToSpell(CurrentVurln_Spell); + + //Cast new random vurlnabilty on self + uint32 spell; + switch(urand(0, 4)) + { + case 0: spell = SPELL_FIRE_VURNALBILTY; break; + case 1: spell = SPELL_FROST_VURNALBILTY; break; + case 2: spell = SPELL_SHADOW_VURNALBILTY; break; + case 3: spell = SPELL_NATURE_VURNALBILTY; break; + case 4: spell = SPELL_ARCANE_VURNALBILTY; break; + } + + DoCast(m_creature,spell); + CurrentVurln_Spell = spell; + + DoScriptText(EMOTE_SHIMMER, m_creature); + Shimmer_Timer = 45000; + }else Shimmer_Timer -= diff; + + //Breath1_Timer + if (Breath1_Timer < diff) + { + DoCast(m_creature->getVictim(),Breath1_Spell); + Breath1_Timer = 60000; + }else Breath1_Timer -= diff; + + //Breath2_Timer + if (Breath2_Timer < diff) + { + DoCast(m_creature->getVictim(),Breath2_Spell); + Breath2_Timer = 60000; + }else Breath2_Timer -= diff; + + //Affliction_Timer + if (Affliction_Timer < diff) + { + uint32 SpellAfflict = 0; + + switch(urand(0, 4)) + { + case 0: SpellAfflict = SPELL_BROODAF_BLUE; break; + case 1: SpellAfflict = SPELL_BROODAF_BLACK; break; + case 2: SpellAfflict = SPELL_BROODAF_RED; break; + case 3: SpellAfflict = SPELL_BROODAF_BRONZE; break; + case 4: SpellAfflict = SPELL_BROODAF_GREEN; break; + } + + std::list::iterator i; + + for (i = m_creature->getThreatManager().getThreatList().begin();i != m_creature->getThreatManager().getThreatList().end(); ++i) + { + Unit* pUnit = NULL; + pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid()); + + if (pUnit) + { + //Cast affliction + DoCast(pUnit, SpellAfflict, true); + + //Chromatic mutation if target is effected by all afflictions + if (pUnit->HasAura(SPELL_BROODAF_BLUE,0) + && pUnit->HasAura(SPELL_BROODAF_BLACK,0) + && pUnit->HasAura(SPELL_BROODAF_RED,0) + && pUnit->HasAura(SPELL_BROODAF_BRONZE,0) + && pUnit->HasAura(SPELL_BROODAF_GREEN,0)) + { + //target->RemoveAllAuras(); + //DoCast(target,SPELL_CHROMATIC_MUT_1); + + //Chromatic mutation is causing issues + //Assuming it is caused by a lack of core support for Charm + //So instead we instant kill our target + + //WORKAROUND + if (pUnit->GetTypeId() == TYPEID_PLAYER) + pUnit->CastSpell(pUnit, 5, false); + } + } + } + + Affliction_Timer = 10000; + }else Affliction_Timer -= diff; + + //Frenzy_Timer + if (Frenzy_Timer < diff) + { + DoCast(m_creature,SPELL_FRENZY); + DoScriptText(EMOTE_GENERIC_FRENZY_KILL, m_creature); + Frenzy_Timer = urand(10000, 15000); + }else Frenzy_Timer -= diff; + + //Enrage if not already enraged and below 20% + if (!Enraged && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 20) + { + DoCast(m_creature,SPELL_ENRAGE); + Enraged = true; + } + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_chromaggus(Creature* pCreature) +{ + return new boss_chromaggusAI(pCreature); +} + +void AddSC_boss_chromaggus() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_chromaggus"; + newscript->GetAI = &GetAI_boss_chromaggus; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp new file mode 100644 index 000000000..56152218f --- /dev/null +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp @@ -0,0 +1,103 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Ebonroc +SD%Complete: 50 +SDComment: Shadow of Ebonroc needs core support +SDCategory: Blackwing Lair +EndScriptData */ + +#include "precompiled.h" + +#define SPELL_SHADOWFLAME 22539 +#define SPELL_WINGBUFFET 18500 +#define SPELL_SHADOWOFEBONROC 23340 +#define SPELL_HEAL 41386 //Thea Heal spell of his Shadow + +struct MANGOS_DLL_DECL boss_ebonrocAI : public ScriptedAI +{ + boss_ebonrocAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 ShadowFlame_Timer; + uint32 WingBuffet_Timer; + uint32 ShadowOfEbonroc_Timer; + uint32 Heal_Timer; + + void Reset() + { + ShadowFlame_Timer = 15000; //These times are probably wrong + WingBuffet_Timer = 30000; + ShadowOfEbonroc_Timer = 45000; + Heal_Timer = 1000; + } + + void Aggro(Unit* pWho) + { + m_creature->SetInCombatWithZone(); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Shadowflame Timer + if (ShadowFlame_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_SHADOWFLAME); + ShadowFlame_Timer = urand(12000, 15000); + }else ShadowFlame_Timer -= diff; + + //Wing Buffet Timer + if (WingBuffet_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_WINGBUFFET); + WingBuffet_Timer = 25000; + }else WingBuffet_Timer -= diff; + + //Shadow of Ebonroc Timer + if (ShadowOfEbonroc_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_SHADOWOFEBONROC); + ShadowOfEbonroc_Timer = urand(25000, 35000); + }else ShadowOfEbonroc_Timer -= diff; + + if (m_creature->getVictim()->HasAura(SPELL_SHADOWOFEBONROC,0)) + { + if (Heal_Timer < diff) + { + DoCast(m_creature, SPELL_HEAL); + Heal_Timer = urand(1000, 3000); + }else Heal_Timer -= diff; + } + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_ebonroc(Creature* pCreature) +{ + return new boss_ebonrocAI(pCreature); +} + +void AddSC_boss_ebonroc() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_ebonroc"; + newscript->GetAI = &GetAI_boss_ebonroc; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp new file mode 100644 index 000000000..213f8b069 --- /dev/null +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp @@ -0,0 +1,94 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Firemaw +SD%Complete: 100 +SDComment: +SDCategory: Blackwing Lair +EndScriptData */ + +#include "precompiled.h" + +#define SPELL_SHADOWFLAME 22539 +#define SPELL_WINGBUFFET 23339 +#define SPELL_FLAMEBUFFET 23341 + +struct MANGOS_DLL_DECL boss_firemawAI : public ScriptedAI +{ + boss_firemawAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 ShadowFlame_Timer; + uint32 WingBuffet_Timer; + uint32 FlameBuffet_Timer; + + void Reset() + { + ShadowFlame_Timer = 30000; //These times are probably wrong + WingBuffet_Timer = 24000; + FlameBuffet_Timer = 5000; + } + + void Aggro(Unit* pWho) + { + m_creature->SetInCombatWithZone(); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //ShadowFlame_Timer + if (ShadowFlame_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_SHADOWFLAME); + ShadowFlame_Timer = urand(15000, 18000); + }else ShadowFlame_Timer -= diff; + + //WingBuffet_Timer + if (WingBuffet_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_WINGBUFFET); + if (m_creature->getThreatManager().getThreat(m_creature->getVictim())) + m_creature->getThreatManager().modifyThreatPercent(m_creature->getVictim(),-75); + + WingBuffet_Timer = 25000; + }else WingBuffet_Timer -= diff; + + //FlameBuffet_Timer + if (FlameBuffet_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_FLAMEBUFFET); + FlameBuffet_Timer = 5000; + }else FlameBuffet_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_firemaw(Creature* pCreature) +{ + return new boss_firemawAI(pCreature); +} + +void AddSC_boss_firemaw() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_firemaw"; + newscript->GetAI = &GetAI_boss_firemaw; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp new file mode 100644 index 000000000..9792e5fba --- /dev/null +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp @@ -0,0 +1,100 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Flamegor +SD%Complete: 100 +SDComment: +SDCategory: Blackwing Lair +EndScriptData */ + +#include "precompiled.h" + +enum +{ + EMOTE_GENERIC_FRENZY = -1000002, + + SPELL_SHADOWFLAME = 22539, + SPELL_WINGBUFFET = 23339, + SPELL_FRENZY = 23342 //This spell periodically triggers fire nova +}; + +struct MANGOS_DLL_DECL boss_flamegorAI : public ScriptedAI +{ + boss_flamegorAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 ShadowFlame_Timer; + uint32 WingBuffet_Timer; + uint32 Frenzy_Timer; + + void Reset() + { + ShadowFlame_Timer = 21000; //These times are probably wrong + WingBuffet_Timer = 35000; + Frenzy_Timer = 10000; + } + + void Aggro(Unit* pWho) + { + m_creature->SetInCombatWithZone(); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //ShadowFlame_Timer + if (ShadowFlame_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_SHADOWFLAME); + ShadowFlame_Timer = urand(15000, 22000); + }else ShadowFlame_Timer -= diff; + + //WingBuffet_Timer + if (WingBuffet_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_WINGBUFFET); + if (m_creature->getThreatManager().getThreat(m_creature->getVictim())) + m_creature->getThreatManager().modifyThreatPercent(m_creature->getVictim(),-75); + + WingBuffet_Timer = 25000; + }else WingBuffet_Timer -= diff; + + //Frenzy_Timer + if (Frenzy_Timer < diff) + { + DoScriptText(EMOTE_GENERIC_FRENZY, m_creature); + DoCast(m_creature,SPELL_FRENZY); + Frenzy_Timer = urand(8000, 1000); + }else Frenzy_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_flamegor(Creature* pCreature) +{ + return new boss_flamegorAI(pCreature); +} + +void AddSC_boss_flamegor() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_flamegor"; + newscript->GetAI = &GetAI_boss_flamegor; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp new file mode 100644 index 000000000..0d544ff4a --- /dev/null +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp @@ -0,0 +1,225 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Nefarian +SD%Complete: 80 +SDComment: Some issues with class calls effecting more than one class +SDCategory: Blackwing Lair +EndScriptData */ + +#include "precompiled.h" + +#define SAY_AGGRO -1469007 +#define SAY_XHEALTH -1469008 +#define SAY_SHADOWFLAME -1469009 +#define SAY_RAISE_SKELETONS -1469010 +#define SAY_SLAY -1469011 +#define SAY_DEATH -1469012 + +#define SAY_MAGE -1469013 +#define SAY_WARRIOR -1469014 +#define SAY_DRUID -1469015 +#define SAY_PRIEST -1469016 +#define SAY_PALADIN -1469017 +#define SAY_SHAMAN -1469018 +#define SAY_WARLOCK -1469019 +#define SAY_HUNTER -1469020 +#define SAY_ROGUE -1469021 + +#define SPELL_SHADOWFLAME_INITIAL 22972 +#define SPELL_SHADOWFLAME 22539 +#define SPELL_BELLOWINGROAR 22686 +#define SPELL_VEILOFSHADOW 7068 +#define SPELL_CLEAVE 20691 +#define SPELL_TAILLASH 23364 +#define SPELL_BONECONTRUST 23363 //23362, 23361 + +#define SPELL_MAGE 23410 //wild magic +#define SPELL_WARRIOR 23397 //beserk +#define SPELL_DRUID 23398 // cat form +#define SPELL_PRIEST 23401 // corrupted healing +#define SPELL_PALADIN 23418 //syphon blessing +#define SPELL_SHAMAN 23425 //totems +#define SPELL_WARLOCK 23427 //infernals +#define SPELL_HUNTER 23436 //bow broke +#define SPELL_ROGUE 23414 //Paralise + +struct MANGOS_DLL_DECL boss_nefarianAI : public ScriptedAI +{ + boss_nefarianAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 ShadowFlame_Timer; + uint32 BellowingRoar_Timer; + uint32 VeilOfShadow_Timer; + uint32 Cleave_Timer; + uint32 TailLash_Timer; + uint32 ClassCall_Timer; + bool Phase3; + + void Reset() + { + ShadowFlame_Timer = 12000; //These times are probably wrong + BellowingRoar_Timer = 30000; + VeilOfShadow_Timer = 15000; + Cleave_Timer = 7000; + TailLash_Timer = 10000; + ClassCall_Timer = 35000; //35-40 seconds + Phase3 = false; + } + + void KilledUnit(Unit* Victim) + { + if (urand(0, 4)) + return; + + DoScriptText(SAY_SLAY, m_creature, Victim); + } + + void JustDied(Unit* Killer) + { + DoScriptText(SAY_DEATH, m_creature); + } + + void Aggro(Unit* pWho) + { + switch(urand(0, 3)) + { + case 0: DoScriptText(SAY_XHEALTH, m_creature); break; + case 1: DoScriptText(SAY_AGGRO, m_creature); break; + case 2: DoScriptText(SAY_SHADOWFLAME, m_creature); break; + } + + DoCast(pWho,SPELL_SHADOWFLAME_INITIAL); + + m_creature->SetInCombatWithZone(); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //ShadowFlame_Timer + if (ShadowFlame_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_SHADOWFLAME); + ShadowFlame_Timer = 12000; + }else ShadowFlame_Timer -= diff; + + //BellowingRoar_Timer + if (BellowingRoar_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_BELLOWINGROAR); + BellowingRoar_Timer = 30000; + }else BellowingRoar_Timer -= diff; + + //VeilOfShadow_Timer + if (VeilOfShadow_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_VEILOFSHADOW); + VeilOfShadow_Timer = 15000; + }else VeilOfShadow_Timer -= diff; + + //Cleave_Timer + if (Cleave_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_CLEAVE); + Cleave_Timer = 7000; + }else Cleave_Timer -= diff; + + //TailLash_Timer + if (TailLash_Timer < diff) + { + //Cast NYI since we need a better check for behind target + //DoCast(m_creature->getVictim(),SPELL_TAILLASH); + + TailLash_Timer = 10000; + }else TailLash_Timer -= diff; + + //ClassCall_Timer + if (ClassCall_Timer < diff) + { + //Cast a random class call + //On official it is based on what classes are currently on the hostil list + //but we can't do that yet so just randomly call one + + switch(urand(0, 8)) + { + case 0: + DoScriptText(SAY_MAGE, m_creature); + DoCast(m_creature,SPELL_MAGE); + break; + case 1: + DoScriptText(SAY_WARRIOR, m_creature); + DoCast(m_creature,SPELL_WARRIOR); + break; + case 2: + DoScriptText(SAY_DRUID, m_creature); + DoCast(m_creature,SPELL_DRUID); + break; + case 3: + DoScriptText(SAY_PRIEST, m_creature); + DoCast(m_creature,SPELL_PRIEST); + break; + case 4: + DoScriptText(SAY_PALADIN, m_creature); + DoCast(m_creature,SPELL_PALADIN); + break; + case 5: + DoScriptText(SAY_SHAMAN, m_creature); + DoCast(m_creature,SPELL_SHAMAN); + break; + case 6: + DoScriptText(SAY_WARLOCK, m_creature); + DoCast(m_creature,SPELL_WARLOCK); + break; + case 7: + DoScriptText(SAY_HUNTER, m_creature); + DoCast(m_creature,SPELL_HUNTER); + break; + case 8: + DoScriptText(SAY_ROGUE, m_creature); + DoCast(m_creature,SPELL_ROGUE); + break; + } + + ClassCall_Timer = urand(35000, 40000); + }else ClassCall_Timer -= diff; + + //Phase3 begins when we are below X health + if (!Phase3 && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 20) + { + Phase3 = true; + DoScriptText(SAY_RAISE_SKELETONS, m_creature); + } + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_nefarian(Creature* pCreature) +{ + return new boss_nefarianAI(pCreature); +} + +void AddSC_boss_nefarian() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_nefarian"; + newscript->GetAI = &GetAI_boss_nefarian; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp new file mode 100644 index 000000000..f850ab561 --- /dev/null +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp @@ -0,0 +1,128 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Razorgore +SD%Complete: 50 +SDComment: Needs additional review. Phase 1 NYI (Grethok the Controller) +SDCategory: Blackwing Lair +EndScriptData */ + +#include "precompiled.h" + +//Razorgore Phase 2 Script + +#define SAY_EGGS_BROKEN1 -1469022 +#define SAY_EGGS_BROKEN2 -1469023 +#define SAY_EGGS_BROKEN3 -1469024 +#define SAY_DEATH -1469025 + +#define SPELL_CLEAVE 22540 +#define SPELL_WARSTOMP 24375 +#define SPELL_FIREBALLVOLLEY 22425 +#define SPELL_CONFLAGRATION 23023 + +struct MANGOS_DLL_DECL boss_razorgoreAI : public ScriptedAI +{ + boss_razorgoreAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 Cleave_Timer; + uint32 WarStomp_Timer; + uint32 FireballVolley_Timer; + uint32 Conflagration_Timer; + + void Reset() + { + Cleave_Timer = 15000; //These times are probably wrong + WarStomp_Timer = 35000; + FireballVolley_Timer = 7000; + Conflagration_Timer = 12000; + } + + void Aggro(Unit* pWho) + { + m_creature->SetInCombatWithZone(); + } + + void JustDied(Unit* Killer) + { + DoScriptText(SAY_DEATH, m_creature); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Cleave_Timer + if (Cleave_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_CLEAVE); + Cleave_Timer = urand(7000, 10000); + }else Cleave_Timer -= diff; + + //WarStomp_Timer + if (WarStomp_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_WARSTOMP); + WarStomp_Timer = urand(15000, 25000); + }else WarStomp_Timer -= diff; + + //FireballVolley_Timer + if (FireballVolley_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_FIREBALLVOLLEY); + FireballVolley_Timer = urand(12000, 15000); + }else FireballVolley_Timer -= diff; + + //Conflagration_Timer + if (Conflagration_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_CONFLAGRATION); + //We will remove this threat reduction and add an aura check. + + //if (m_creature->getThreatManager().getThreat(m_creature->getVictim())) + //m_creature->getThreatManager().modifyThreatPercent(m_creature->getVictim(),-50); + + Conflagration_Timer = 12000; + }else Conflagration_Timer -= diff; + + // Aura Check. If the gamer is affected by confliguration we attack a random gamer. + if (m_creature->getVictim()->HasAura(SPELL_CONFLAGRATION,0)) + { + Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM,1); + if (target) + m_creature->TauntApply(target); + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_razorgore(Creature* pCreature) +{ + return new boss_razorgoreAI(pCreature); +} + +void AddSC_boss_razorgore() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_razorgore"; + newscript->GetAI = &GetAI_boss_razorgore; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp new file mode 100644 index 000000000..1833fc65f --- /dev/null +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp @@ -0,0 +1,258 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Vaelastrasz +SD%Complete: 75 +SDComment: Burning Adrenaline not correctly implemented in core +SDCategory: Blackwing Lair +EndScriptData */ + +#include "precompiled.h" + +#define SAY_LINE1 -1469026 +#define SAY_LINE2 -1469027 +#define SAY_LINE3 -1469028 +#define SAY_HALFLIFE -1469029 +#define SAY_KILLTARGET -1469030 + +#define GOSSIP_ITEM "Start Event " + +#define SPELL_ESSENCEOFTHERED 23513 +#define SPELL_FLAMEBREATH 23461 +#define SPELL_FIRENOVA 23462 +#define SPELL_TAILSWIPE 15847 +#define SPELL_BURNINGADRENALINE 23620 +#define SPELL_CLEAVE 20684 //Chain cleave is most likely named something different and contains a dummy effect + +struct MANGOS_DLL_DECL boss_vaelAI : public ScriptedAI +{ + boss_vaelAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pCreature->SetUInt32Value(UNIT_NPC_FLAGS,1); + pCreature->setFaction(35); + pCreature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + Reset(); + } + + uint64 PlayerGUID; + uint32 SpeachTimer; + uint32 SpeachNum; + uint32 Cleave_Timer; + uint32 FlameBreath_Timer; + uint32 FireNova_Timer; + uint32 BurningAdrenalineCaster_Timer; + uint32 BurningAdrenalineTank_Timer; + uint32 TailSwipe_Timer; + bool HasYelled; + bool DoingSpeach; + + void Reset() + { + PlayerGUID = 0; + SpeachTimer = 0; + SpeachNum = 0; + Cleave_Timer = 8000; //These times are probably wrong + FlameBreath_Timer = 11000; + BurningAdrenalineCaster_Timer = 15000; + BurningAdrenalineTank_Timer = 45000; + FireNova_Timer = 5000; + TailSwipe_Timer = 20000; + HasYelled = false; + DoingSpeach = false; + } + + void BeginSpeach(Unit* target) + { + //Stand up and begin speach + PlayerGUID = target->GetGUID(); + + //10 seconds + DoScriptText(SAY_LINE1, m_creature); + + SpeachTimer = 10000; + SpeachNum = 0; + DoingSpeach = true; + } + + void KilledUnit(Unit *victim) + { + if (urand(0, 4)) + return; + + DoScriptText(SAY_KILLTARGET, m_creature, victim); + } + + void Aggro(Unit* pWho) + { + DoCast(m_creature,SPELL_ESSENCEOFTHERED); + m_creature->SetInCombatWithZone(); + } + + void UpdateAI(const uint32 diff) + { + //Speach + if (DoingSpeach) + { + if (SpeachTimer < diff) + { + switch (SpeachNum) + { + case 0: + //16 seconds till next line + DoScriptText(SAY_LINE2, m_creature); + SpeachTimer = 16000; + ++SpeachNum; + break; + case 1: + //This one is actually 16 seconds but we only go to 10 seconds because he starts attacking after he says "I must fight this!" + DoScriptText(SAY_LINE3, m_creature); + SpeachTimer = 10000; + ++SpeachNum; + break; + case 2: + m_creature->setFaction(103); + m_creature->SetHealth(int(m_creature->GetMaxHealth()*.3)); + if (PlayerGUID && Unit::GetUnit((*m_creature),PlayerGUID)) + { + AttackStart(Unit::GetUnit((*m_creature),PlayerGUID)); + DoCast(m_creature,SPELL_ESSENCEOFTHERED); + } + SpeachTimer = 0; + DoingSpeach = false; + break; + } + }else SpeachTimer -= diff; + } + + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // Yell if hp lower than 15% + if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 15 && !HasYelled) + { + DoScriptText(SAY_HALFLIFE, m_creature); + HasYelled = true; + } + + //Cleave_Timer + if (Cleave_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_CLEAVE); + Cleave_Timer = 15000; + }else Cleave_Timer -= diff; + + //FlameBreath_Timer + if (FlameBreath_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_FLAMEBREATH); + FlameBreath_Timer = urand(4000, 8000); + }else FlameBreath_Timer -= diff; + + //BurningAdrenalineCaster_Timer + if (BurningAdrenalineCaster_Timer < diff) + { + Unit* target = NULL; + + int i = 0 ; + while (i < 3) // max 3 tries to get a random target with power_mana + { + ++i; + target = SelectUnit(SELECT_TARGET_RANDOM,1);//not aggro leader + if (target) + if (target->getPowerType() == POWER_MANA) + i=3; + } + if (target) // cast on self (see below) + target->CastSpell(target,SPELL_BURNINGADRENALINE,1); + + BurningAdrenalineCaster_Timer = 15000; + }else BurningAdrenalineCaster_Timer -= diff; + + //BurningAdrenalineTank_Timer + if (BurningAdrenalineTank_Timer < diff) + { + // have the victim cast the spell on himself otherwise the third effect aura will be applied + // to Vael instead of the player + m_creature->getVictim()->CastSpell(m_creature->getVictim(),SPELL_BURNINGADRENALINE,1); + + BurningAdrenalineTank_Timer = 45000; + }else BurningAdrenalineTank_Timer -= diff; + + //FireNova_Timer + if (FireNova_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_FIRENOVA); + FireNova_Timer = 5000; + }else FireNova_Timer -= diff; + + //TailSwipe_Timer + if (TailSwipe_Timer < diff) + { + //Only cast if we are behind + /*if (!m_creature->HasInArc(M_PI, m_creature->getVictim())) + { + DoCast(m_creature->getVictim(),SPELL_TAILSWIPE); + }*/ + + TailSwipe_Timer = 20000; + }else TailSwipe_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +void SendDefaultMenu_boss_vael(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) //Fight time + { + pPlayer->CLOSE_GOSSIP_MENU(); + ((boss_vaelAI*)pCreature->AI())->BeginSpeach((Unit*)pPlayer); + } +} + +bool GossipSelect_boss_vael(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiSender == GOSSIP_SENDER_MAIN) + SendDefaultMenu_boss_vael(pPlayer, pCreature, uiAction); + + return true; +} + +bool GossipHello_boss_vael(Player* pPlayer, Creature* pCreature) +{ + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->SEND_GOSSIP_MENU(907, pCreature->GetGUID()); + + return true; +} + +CreatureAI* GetAI_boss_vael(Creature* pCreature) +{ + return new boss_vaelAI(pCreature); +} + +void AddSC_boss_vael() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_vaelastrasz"; + newscript->GetAI = &GetAI_boss_vael; + newscript->pGossipHello = &GossipHello_boss_vael; + newscript->pGossipSelect = &GossipSelect_boss_vael; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp new file mode 100644 index 000000000..d61125954 --- /dev/null +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp @@ -0,0 +1,387 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Victor_Nefarius +SD%Complete: 75 +SDComment: Missing some text, Vael beginning event, and spawns Nef in wrong place +SDCategory: Blackwing Lair +EndScriptData */ + +#include "precompiled.h" + +#define SAY_GAMESBEGIN_1 -1469004 +#define SAY_GAMESBEGIN_2 -1469005 +#define SAY_VAEL_INTRO -1469006 //when he corrupts Vaelastrasz + +#define GOSSIP_ITEM_1 "I've made no mistakes." +#define GOSSIP_ITEM_2 "You have lost your mind, Nefarius. You speak in riddles." +#define GOSSIP_ITEM_3 "Please do." + +#define CREATURE_BRONZE_DRAKANOID 14263 +#define CREATURE_BLUE_DRAKANOID 14261 +#define CREATURE_RED_DRAKANOID 14264 +#define CREATURE_GREEN_DRAKANOID 14262 +#define CREATURE_BLACK_DRAKANOID 14265 + +#define CREATURE_CHROMATIC_DRAKANOID 14302 +#define CREATURE_NEFARIAN 11583 + +#define ADD_X1 -7591.151855 +#define ADD_X2 -7514.598633 +#define ADD_Y1 -1204.051880 +#define ADD_Y2 -1150.448853 +#define ADD_Z1 476.800476 +#define ADD_Z2 476.796570 + +#define NEF_X -7445 +#define NEF_Y -1332 +#define NEF_Z 536 + +#define HIDE_X -7592 +#define HIDE_Y -1264 +#define HIDE_Z 481 + +#define SPELL_SHADOWBOLT 21077 +#define SPELL_FEAR 26070 + +//This script is complicated +//Instead of morphing Victor Nefarius we will have him control phase 1 +//And then have him spawn "Nefarian" for phase 2 +//When phase 2 starts Victor Nefarius will go into hiding and stop attacking +//If Nefarian despawns because he killed the players then this guy will EnterEvadeMode +//and allow players to start the event over +//If nefarian dies then he will kill himself then he will kill himself in his hiding place +//To prevent players from doing the event twice + +struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI +{ + boss_victor_nefariusAI(Creature* pCreature) : ScriptedAI(pCreature) + { + NefarianGUID = 0; + Reset(); + srand(time(NULL)); + switch(urand(0, 19)) + { + case 0: + DrakType1 = CREATURE_BRONZE_DRAKANOID; + DrakType2 = CREATURE_BLUE_DRAKANOID; + break; + case 1: + DrakType1 = CREATURE_BRONZE_DRAKANOID; + DrakType2 = CREATURE_RED_DRAKANOID; + break; + case 2: + DrakType1 = CREATURE_BRONZE_DRAKANOID; + DrakType2 = CREATURE_GREEN_DRAKANOID; + break; + case 3: + DrakType1 = CREATURE_BRONZE_DRAKANOID; + DrakType2 = CREATURE_BLACK_DRAKANOID; + break; + case 4: + DrakType1 = CREATURE_BLUE_DRAKANOID; + DrakType2 = CREATURE_BRONZE_DRAKANOID; + break; + case 5: + DrakType1 = CREATURE_BLUE_DRAKANOID; + DrakType2 = CREATURE_RED_DRAKANOID; + break; + case 6: + DrakType1 = CREATURE_BLUE_DRAKANOID; + DrakType2 = CREATURE_GREEN_DRAKANOID; + break; + case 7: + DrakType1 = CREATURE_BLUE_DRAKANOID; + DrakType2 = CREATURE_BLACK_DRAKANOID; + break; + case 8: + DrakType1 = CREATURE_RED_DRAKANOID; + DrakType2 = CREATURE_BRONZE_DRAKANOID; + break; + case 9: + DrakType1 = CREATURE_RED_DRAKANOID; + DrakType2 = CREATURE_BLUE_DRAKANOID; + break; + case 10: + DrakType1 = CREATURE_RED_DRAKANOID; + DrakType2 = CREATURE_GREEN_DRAKANOID; + break; + case 11: + DrakType1 = CREATURE_RED_DRAKANOID; + DrakType2 = CREATURE_BLACK_DRAKANOID; + break; + case 12: + DrakType1 = CREATURE_GREEN_DRAKANOID; + DrakType2 = CREATURE_BRONZE_DRAKANOID; + break; + case 13: + DrakType1 = CREATURE_GREEN_DRAKANOID; + DrakType2 = CREATURE_BLUE_DRAKANOID; + break; + case 14: + DrakType1 = CREATURE_GREEN_DRAKANOID; + DrakType2 = CREATURE_RED_DRAKANOID; + break; + case 15: + DrakType1 = CREATURE_GREEN_DRAKANOID; + DrakType2 = CREATURE_BLACK_DRAKANOID; + break; + case 16: + DrakType1 = CREATURE_BLACK_DRAKANOID; + DrakType2 = CREATURE_BRONZE_DRAKANOID; + break; + case 17: + DrakType1 = CREATURE_BLACK_DRAKANOID; + DrakType2 = CREATURE_BLUE_DRAKANOID; + break; + case 18: + DrakType1 = CREATURE_BLACK_DRAKANOID; + DrakType2 = CREATURE_GREEN_DRAKANOID; + break; + case 19: + DrakType1 = CREATURE_BLACK_DRAKANOID; + DrakType2 = CREATURE_RED_DRAKANOID; + break; + } + } + + uint32 SpawnedAdds; + uint32 AddSpawnTimer; + uint32 ShadowBoltTimer; + uint32 FearTimer; + uint32 MindControlTimer; + uint32 ResetTimer; + uint32 DrakType1; + uint32 DrakType2; + uint64 NefarianGUID; + uint32 NefCheckTime; + + void Reset() + { + SpawnedAdds = 0; + AddSpawnTimer = 10000; + ShadowBoltTimer = 5000; + FearTimer = 8000; + ResetTimer = 900000; //On official it takes him 15 minutes(900 seconds) to reset. We are only doing 1 minute to make testing easier + NefarianGUID = 0; + NefCheckTime = 2000; + + m_creature->SetUInt32Value(UNIT_NPC_FLAGS,1); + m_creature->setFaction(35); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } + + void BeginEvent(Player* target) + { + DoScriptText(SAY_GAMESBEGIN_2, m_creature); + + //MaNGOS::Singleton::Instance().GetMap(m_creature->GetMapId(), m_creature)->GetPlayers().begin(); + /* + list ::iterator i = MapManager::Instance().GetMap(m_creature->GetMapId(), m_creature)->GetPlayers().begin(); + + for (i = MapManager::Instance().GetMap(m_creature->GetMapId(), m_creature)->GetPlayers().begin(); i != MapManager::Instance().GetMap(m_creature->GetMapId(), m_creature)->GetPlayers().end(); ++i) + { + AttackStart((*i)); + } + */ + m_creature->SetUInt32Value(UNIT_NPC_FLAGS,0); + m_creature->setFaction(103); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + AttackStart(target); + } + + void MoveInLineOfSight(Unit *who) + { + //We simply use this function to find players until we can use Map->GetPlayers() + + if (who && who->GetTypeId() == TYPEID_PLAYER && m_creature->IsHostileTo(who)) + { + //Add them to our threat list + m_creature->AddThreat(who,0.0f); + } + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Only do this if we haven't spawned nef yet + if (SpawnedAdds < 42) + { + //ShadowBoltTimer + if (ShadowBoltTimer < diff) + { + Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM,0); + if (target) + DoCast(target,SPELL_SHADOWBOLT); + + ShadowBoltTimer = urand(3000, 10000); + }else ShadowBoltTimer -= diff; + + //FearTimer + if (FearTimer < diff) + { + Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM,0); + if (target) + DoCast(target,SPELL_FEAR); + + FearTimer = urand(10000, 20000); + }else FearTimer -= diff; + + //Add spawning mechanism + if (AddSpawnTimer < diff) + { + //Spawn 2 random types of creatures at the 2 locations + uint32 CreatureID; + Creature* Spawned = NULL; + Unit* target = NULL; + + //1 in 3 chance it will be a chromatic + if (!urand(0, 2)) + CreatureID = CREATURE_CHROMATIC_DRAKANOID; + else CreatureID = DrakType1; + + ++SpawnedAdds; + + //Spawn creature and force it to start attacking a random target + Spawned = m_creature->SummonCreature(CreatureID,ADD_X1,ADD_Y1,ADD_Z1,5.000,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,5000); + target = SelectUnit(SELECT_TARGET_RANDOM,0); + if (target && Spawned) + { + Spawned->AI()->AttackStart(target); + Spawned->setFaction(103); + } + + //1 in 3 chance it will be a chromatic + if (!urand(0, 2)) + CreatureID = CREATURE_CHROMATIC_DRAKANOID; + else CreatureID = DrakType2; + + ++SpawnedAdds; + + target = NULL; + Spawned = NULL; + Spawned = m_creature->SummonCreature(CreatureID,ADD_X2,ADD_Y2,ADD_Z2,5.000,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,5000); + target = SelectUnit(SELECT_TARGET_RANDOM,0); + if (target && Spawned) + { + Spawned->AI()->AttackStart(target); + Spawned->setFaction(103); + } + + //Begin phase 2 by spawning Nefarian and what not + if (SpawnedAdds >= 42) + { + //Teleport Victor Nefarius way out of the map + //MapManager::Instance().GetMap(m_creature->GetMapId(), m_creature)->CreatureRelocation(m_creature,0,0,-5000,0); + + //Inturrupt any spell casting + m_creature->InterruptNonMeleeSpells(false); + + //Root self + DoCast(m_creature,33356); + + //Make super invis + DoCast(m_creature,8149); + + //Teleport self to a hiding spot (this causes errors in the mangos log but no real issues) + m_creature->GetMap()->CreatureRelocation(m_creature, HIDE_X, HIDE_Y, HIDE_Z, 0.0f); + m_creature->SendMonsterMove(HIDE_X, HIDE_Y, HIDE_Z, 0, MONSTER_MOVE_NONE, 0); + + //Spawn nef and have him attack a random target + Creature* Nefarian = m_creature->SummonCreature(CREATURE_NEFARIAN,NEF_X,NEF_Y,NEF_Z,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,120000); + target = SelectUnit(SELECT_TARGET_RANDOM,0); + + if (target && Nefarian) + { + Nefarian->AI()->AttackStart(target); + Nefarian->setFaction(103); + NefarianGUID = Nefarian->GetGUID(); + } + else error_log("SD2: Blackwing Lair: Unable to spawn nefarian properly."); + } + + AddSpawnTimer = 4000; + }else AddSpawnTimer -= diff; + } + else if (NefarianGUID) + { + if (NefCheckTime < diff) + { + Creature* pNefarian = (Creature*)Unit::GetUnit((*m_creature),NefarianGUID); + + //If nef is dead then we die to so the players get out of combat + //and cannot repeat the event + if (!pNefarian || !pNefarian->isAlive()) + { + NefarianGUID = 0; + m_creature->ForcedDespawn(); + } + + NefCheckTime = 2000; + }else NefCheckTime -= diff; + } + } +}; + +CreatureAI* GetAI_boss_victor_nefarius(Creature* pCreature) +{ + return new boss_victor_nefariusAI(pCreature); +} + +bool GossipHello_boss_victor_nefarius(Player* pPlayer, Creature* pCreature) +{ + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_1 , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(7134, pCreature->GetGUID()); + return true; +} + +bool GossipSelect_boss_victor_nefarius(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->SEND_GOSSIP_MENU(7198, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); + pPlayer->SEND_GOSSIP_MENU(7199, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+3: + pPlayer->CLOSE_GOSSIP_MENU(); + DoScriptText(SAY_GAMESBEGIN_1, pCreature); + ((boss_victor_nefariusAI*)pCreature->AI())->BeginEvent(pPlayer); + break; + } + return true; +} + +void AddSC_boss_victor_nefarius() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_victor_nefarius"; + newscript->GetAI = &GetAI_boss_victor_nefarius; + newscript->pGossipHello = &GossipHello_boss_victor_nefarius; + newscript->pGossipSelect = &GossipSelect_boss_victor_nefarius; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp b/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp new file mode 100644 index 000000000..619319c51 --- /dev/null +++ b/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp @@ -0,0 +1,24 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance_Blackwing_Lair +SD%Complete: 0 +SDComment: +SDCategory: Blackwing Lair +EndScriptData */ + +#include "precompiled.h" diff --git a/scripts/eastern_kingdoms/blasted_lands.cpp b/scripts/eastern_kingdoms/blasted_lands.cpp new file mode 100644 index 000000000..619f63a09 --- /dev/null +++ b/scripts/eastern_kingdoms/blasted_lands.cpp @@ -0,0 +1,159 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Blasted_Lands +SD%Complete: 90 +SDComment: Quest support: 2784, 2801, 3628. Missing some texts for Fallen Hero. Teleporter to Rise of the Defiler missing group support. +SDCategory: Blasted Lands +EndScriptData */ + +/* ContentData +npc_deathly_usher +npc_fallen_hero_of_horde +EndContentData */ + +#include "precompiled.h" + +/*###### +## npc_deathly_usher +######*/ + +#define GOSSIP_ITEM_USHER "I wish to to visit the Rise of the Defiler." + +#define SPELL_TELEPORT_SINGLE 12885 +#define SPELL_TELEPORT_SINGLE_IN_GROUP 13142 +#define SPELL_TELEPORT_GROUP 27686 + +bool GossipHello_npc_deathly_usher(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->GetQuestStatus(3628) == QUEST_STATUS_INCOMPLETE && pPlayer->HasItemCount(10757, 1)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_USHER, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_deathly_usher(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF) + { + pPlayer->CLOSE_GOSSIP_MENU(); + pCreature->CastSpell(pPlayer, SPELL_TELEPORT_SINGLE, true); + } + + return true; +} + +/*###### +## npc_fallen_hero_of_horde +######*/ + +#define GOSSIP_ITEM_FALLEN "Continue..." + +#define GOSSIP_ITEM_FALLEN1 "What could be worse than death?" +#define GOSSIP_ITEM_FALLEN2 "Subordinates?" +#define GOSSIP_ITEM_FALLEN3 "What are the stones of binding?" +#define GOSSIP_ITEM_FALLEN4 "You can count on me, Hero" +#define GOSSIP_ITEM_FALLEN5 "I shall" + +bool GossipHello_npc_fallen_hero_of_horde(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestStatus(2784) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Why are you here?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + if (pPlayer->GetQuestStatus(2801) == QUEST_STATUS_INCOMPLETE && pPlayer->GetTeam() == HORDE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Continue story...", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + + if (pPlayer->GetQuestStatus(2801) == QUEST_STATUS_INCOMPLETE && pPlayer->GetTeam() == ALLIANCE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Why are you here?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_fallen_hero_of_horde(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11); + pPlayer->SEND_GOSSIP_MENU(1392, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+11: + pPlayer->SEND_GOSSIP_MENU(1411, pCreature->GetGUID()); + if (pPlayer->GetQuestStatus(2784) == QUEST_STATUS_INCOMPLETE) + pPlayer->AreaExploredOrEventHappens(2784); + if (pPlayer->GetTeam() == ALLIANCE) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->SEND_GOSSIP_MENU(1411, pCreature->GetGUID()); + } + break; + + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 21); + pPlayer->SEND_GOSSIP_MENU(1451, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+21: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 22); + pPlayer->SEND_GOSSIP_MENU(1452, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+22: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 23); + pPlayer->SEND_GOSSIP_MENU(1453, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+23: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 24); + pPlayer->SEND_GOSSIP_MENU(1454, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+24: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 25); + pPlayer->SEND_GOSSIP_MENU(1455, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+25: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 26); + pPlayer->SEND_GOSSIP_MENU(1456, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+26: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->AreaExploredOrEventHappens(2801); + break; + } + return true; +} + +void AddSC_blasted_lands() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_deathly_usher"; + newscript->pGossipHello = &GossipHello_npc_deathly_usher; + newscript->pGossipSelect = &GossipSelect_npc_deathly_usher; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_fallen_hero_of_horde"; + newscript->pGossipHello = &GossipHello_npc_fallen_hero_of_horde; + newscript->pGossipSelect = &GossipSelect_npc_fallen_hero_of_horde; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/boss_kruul.cpp b/scripts/eastern_kingdoms/boss_kruul.cpp new file mode 100644 index 000000000..01ab563ad --- /dev/null +++ b/scripts/eastern_kingdoms/boss_kruul.cpp @@ -0,0 +1,178 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Kruul +SD%Complete: 100 +SDComment: Highlord Kruul are presumably no longer in-game on regular bases, however future events could bring him back. +SDCategory: Bosses +EndScriptData */ + +#include "precompiled.h" + +#define SPELL_SHADOWVOLLEY 21341 +#define SPELL_CLEAVE 20677 +#define SPELL_THUNDERCLAP 23931 +#define SPELL_TWISTEDREFLECTION 21063 +#define SPELL_VOIDBOLT 21066 +#define SPELL_RAGE 21340 +#define SPELL_CAPTURESOUL 21054 + +struct MANGOS_DLL_DECL boss_kruulAI : public ScriptedAI +{ + boss_kruulAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 ShadowVolley_Timer; + uint32 Cleave_Timer; + uint32 ThunderClap_Timer; + uint32 TwistedReflection_Timer; + uint32 VoidBolt_Timer; + uint32 Rage_Timer; + uint32 Hound_Timer; + int Rand; + int RandX; + int RandY; + Creature* Summoned; + + void Reset() + { + ShadowVolley_Timer = 10000; + Cleave_Timer = 14000; + ThunderClap_Timer = 20000; + TwistedReflection_Timer = 25000; + VoidBolt_Timer = 30000; + Rage_Timer = 60000; //Cast rage after 1 minute + Hound_Timer = 8000; + } + + void KilledUnit() + { + // When a player, pet or totem gets killed, Lord Kazzak casts this spell to instantly regenerate 70,000 health. + DoCast(m_creature,SPELL_CAPTURESOUL); + + } + + void SummonHounds(Unit* victim) + { + Rand = rand()%10; + switch(urand(0, 1)) + { + case 0: RandX = 0 - Rand; break; + case 1: RandX = 0 + Rand; break; + } + Rand = 0; + Rand = rand()%10; + switch(urand(0, 1)) + { + case 0: RandY = 0 - Rand; break; + case 1: RandY = 0 + Rand; break; + } + Rand = 0; + Summoned = DoSpawnCreature(19207, RandX, RandY, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000); + if (Summoned) + ((CreatureAI*)Summoned->AI())->AttackStart(victim); + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //ShadowVolley_Timer + if (ShadowVolley_Timer < diff) + { + if (rand()%100 < 46) + { + DoCast(m_creature->getVictim(),SPELL_SHADOWVOLLEY); + } + + ShadowVolley_Timer = 5000; + }else ShadowVolley_Timer -= diff; + + //Cleave_Timer + if (Cleave_Timer < diff) + { + if (rand()%100 < 50) + { + DoCast(m_creature->getVictim(),SPELL_CLEAVE); + } + + Cleave_Timer = 10000; + }else Cleave_Timer -= diff; + + //ThunderClap_Timer + if (ThunderClap_Timer < diff) + { + if (rand()%100 < 20) + { + DoCast(m_creature->getVictim(),SPELL_THUNDERCLAP); + } + + ThunderClap_Timer = 12000; + }else ThunderClap_Timer -= diff; + + //TwistedReflection_Timer + if (TwistedReflection_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_TWISTEDREFLECTION); + TwistedReflection_Timer = 30000; + }else TwistedReflection_Timer -= diff; + + //VoidBolt_Timer + if (VoidBolt_Timer < diff) + { + if (rand()%100 < 40) + { + DoCast(m_creature->getVictim(),SPELL_VOIDBOLT); + } + + VoidBolt_Timer = 18000; + }else VoidBolt_Timer -= diff; + + //Rage_Timer + if (Rage_Timer < diff) + { + DoCast(m_creature,SPELL_RAGE); + Rage_Timer = 70000; + }else Rage_Timer -= diff; + + //Hound_Timer + if (Hound_Timer < diff) + { + SummonHounds(m_creature->getVictim()); + SummonHounds(m_creature->getVictim()); + SummonHounds(m_creature->getVictim()); + + Hound_Timer = 45000; + }else Hound_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_kruul(Creature* pCreature) +{ + return new boss_kruulAI(pCreature); +} + +void AddSC_boss_kruul() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_kruul"; + newscript->GetAI = &GetAI_boss_kruul; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/burning_steppes.cpp b/scripts/eastern_kingdoms/burning_steppes.cpp new file mode 100644 index 000000000..24e6b5209 --- /dev/null +++ b/scripts/eastern_kingdoms/burning_steppes.cpp @@ -0,0 +1,149 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Burning_Steppes +SD%Complete: 100 +SDComment: Quest support: 4224, 4866 +SDCategory: Burning Steppes +EndScriptData */ + +/* ContentData +npc_ragged_john +EndContentData */ + +#include "precompiled.h" + +/*###### +## npc_ragged_john +######*/ + +struct MANGOS_DLL_DECL npc_ragged_johnAI : public ScriptedAI +{ + npc_ragged_johnAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + void Reset() {} + + void MoveInLineOfSight(Unit *who) + { + if (who->HasAura(16468,0)) + { + if (who->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(who, 15) && who->isInAccessablePlaceFor(m_creature)) + { + DoCast(who,16472); + ((Player*)who)->AreaExploredOrEventHappens(4866); + } + } + + if (!m_creature->getVictim() && who->isTargetableForAttack() && (m_creature->IsHostileTo(who)) && who->isInAccessablePlaceFor(m_creature)) + { + if (!m_creature->canFly() && m_creature->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE) + return; + + float attackRadius = m_creature->GetAttackDistance(who); + if (m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->IsWithinLOSInMap(who)) + { + who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); + AttackStart(who); + } + } + } +}; + +CreatureAI* GetAI_npc_ragged_john(Creature* pCreature) +{ + return new npc_ragged_johnAI(pCreature); +} + +bool GossipHello_npc_ragged_john(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestStatus(4224) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Official buisness, John. I need some information about Marsha Windsor. Tell me about the last time you saw him.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + + pPlayer->SEND_GOSSIP_MENU(2713, pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_ragged_john(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "So what did you do?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->SEND_GOSSIP_MENU(2714, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Start making sense, dwarf. I don't want to have anything to do with your cracker, your pappy, or any sort of 'discreditin'.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->SEND_GOSSIP_MENU(2715, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Ironfoe?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->SEND_GOSSIP_MENU(2716, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+3: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Interesting... continue John.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->SEND_GOSSIP_MENU(2717, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+4: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "So that's how Windsor died...", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->SEND_GOSSIP_MENU(2718, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+5: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "So how did he die?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->SEND_GOSSIP_MENU(2719, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+6: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Ok so where the hell is he? Wait a minute! Are you drunk?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->SEND_GOSSIP_MENU(2720, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+7: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "WHY is he in Blackrock Depths?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 8); + pPlayer->SEND_GOSSIP_MENU(2721, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+8: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "300? So the Dark Irons killed him and dragged him into the Depths?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 9); + pPlayer->SEND_GOSSIP_MENU(2722, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+9: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Ahh... Ironfoe", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10); + pPlayer->SEND_GOSSIP_MENU(2723, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+10: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Thanks, Ragged John. Your story was very uplifting and informative", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11); + pPlayer->SEND_GOSSIP_MENU(2725, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+11: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->AreaExploredOrEventHappens(4224); + break; + } + return true; +} + +void AddSC_burning_steppes() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_ragged_john"; + newscript->GetAI = &GetAI_npc_ragged_john; + newscript->pGossipHello = &GossipHello_npc_ragged_john; + newscript->pGossipSelect = &GossipSelect_npc_ragged_john; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/deadmines/deadmines.cpp b/scripts/eastern_kingdoms/deadmines/deadmines.cpp new file mode 100644 index 000000000..902e86959 --- /dev/null +++ b/scripts/eastern_kingdoms/deadmines/deadmines.cpp @@ -0,0 +1,69 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Deadmines +SD%Complete: 90 +SDComment: Contains GO for event at end door +SDCategory: Deadmines +EndScriptData */ + +#include "precompiled.h" +#include "deadmines.h" + +bool GOHello_go_door_lever_dm(Player* pPlayer, GameObject* pGo) +{ + ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData(); + + if (!pInstance) + return false; + + GameObject* pGoDoor = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_DEFIAS_DOOR)); + + if (pGoDoor && pGoDoor->GetGoState() == 1) + return false; + + return true; +} + +bool GOHello_go_defias_cannon(Player* pPlayer, GameObject* pGo) +{ + ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData(); + + if (!pInstance) + return false; + + if (pInstance->GetData(TYPE_DEFIAS_ENDDOOR) == DONE || pInstance->GetData(TYPE_DEFIAS_ENDDOOR) == IN_PROGRESS) + return false; + + pInstance->SetData(TYPE_DEFIAS_ENDDOOR, IN_PROGRESS); + return false; +} + +void AddSC_deadmines() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "go_door_lever_dm"; + newscript->pGOHello = &GOHello_go_door_lever_dm; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "go_defias_cannon"; + newscript->pGOHello = &GOHello_go_defias_cannon; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/deadmines/deadmines.h b/scripts/eastern_kingdoms/deadmines/deadmines.h new file mode 100644 index 000000000..f5838291d --- /dev/null +++ b/scripts/eastern_kingdoms/deadmines/deadmines.h @@ -0,0 +1,25 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_DEADMINES_H +#define DEF_DEADMINES_H + +enum +{ + MAX_ENCOUNTER = 1, + + TYPE_DEFIAS_ENDDOOR = 1, + DATA_DEFIAS_DOOR = 2, + + INST_SAY_ALARM1 = -1036000, + INST_SAY_ALARM2 = -1036001, + + GO_DOOR_LEVER = 101833, + GO_IRON_CLAD = 16397, + GO_DEFIAS_CANNON = 16398, + NPC_MR_SMITE = 646, + NPC_PIRATE = 657 +}; + +#endif diff --git a/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp b/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp new file mode 100644 index 000000000..623c1fdcf --- /dev/null +++ b/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp @@ -0,0 +1,151 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance_Deadmines +SD%Complete: 0 +SDComment: Placeholder +SDCategory: Deadmines +EndScriptData */ + +#include "precompiled.h" +#include "deadmines.h" + +struct MANGOS_DLL_DECL instance_deadmines : public ScriptedInstance +{ + instance_deadmines(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + + uint64 m_uiIronCladGUID; + uint64 m_uiCannonGUID; + uint64 m_uiSmiteGUID; + + uint32 m_uiIronDoor_Timer; + uint32 m_uiDoor_Step; + + void Initialize() + { + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + + m_uiIronCladGUID = 0; + m_uiCannonGUID = 0; + m_uiSmiteGUID = 0; + + m_uiIronDoor_Timer = 0; + m_uiDoor_Step = 0; + } + + void OnCreatureCreate(Creature* pCreature) + { + if (pCreature->GetEntry() == NPC_MR_SMITE) + m_uiSmiteGUID = pCreature->GetGUID(); + } + + void OnObjectCreate(GameObject* pGo) + { + if (pGo->GetEntry() == GO_IRON_CLAD) + m_uiIronCladGUID = pGo->GetGUID(); + + if (pGo->GetEntry() == GO_DEFIAS_CANNON) + m_uiCannonGUID = pGo->GetGUID(); + } + + void SetData(uint32 uiType, uint32 uiData) + { + if (uiType == TYPE_DEFIAS_ENDDOOR) + { + if (uiData == IN_PROGRESS) + { + if (GameObject* pGo = instance->GetGameObject(m_uiIronCladGUID)) + { + pGo->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE); + m_uiIronDoor_Timer = 3000; + } + } + m_auiEncounter[0] = uiData; + } + } + + uint32 GetData(uint32 uiType) + { + if (uiType == TYPE_DEFIAS_ENDDOOR) + return m_auiEncounter[0]; + + return 0; + } + + uint64 GetData64(uint32 uiData) + { + if (uiData == DATA_DEFIAS_DOOR) + return m_uiIronCladGUID; + + return 0; + } + + void Update(uint32 uiDiff) + { + if (m_uiIronDoor_Timer) + { + if (m_uiIronDoor_Timer <= uiDiff) + { + if (Creature* pMrSmite = instance->GetCreature(m_uiSmiteGUID)) + { + switch(m_uiDoor_Step) + { + case 0: + DoScriptText(INST_SAY_ALARM1,pMrSmite); + m_uiIronDoor_Timer = 2000; + ++m_uiDoor_Step; + break; + case 1: + if (Creature* pi1 = pMrSmite->SummonCreature(NPC_PIRATE, 93.68,-678.63,7.71,2.09, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 1800000)) + pi1->GetMotionMaster()->MovePoint(0,100.11,-670.65,7.42); + if (Creature* pi2 = pMrSmite->SummonCreature(NPC_PIRATE,102.63,-685.07,7.42,1.28, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 1800000)) + pi2->GetMotionMaster()->MovePoint(0,100.11,-670.65,7.42); + ++m_uiDoor_Step; + m_uiIronDoor_Timer = 10000; + break; + case 2: + DoScriptText(INST_SAY_ALARM2,pMrSmite); + m_uiDoor_Step = 0; + m_uiIronDoor_Timer = 0; + debug_log("SD2: Instance Deadmines: Iron door event reached end."); + break; + } + } + else + m_uiIronDoor_Timer = 0; + } + else + m_uiIronDoor_Timer -= uiDiff; + } + } +}; + +InstanceData* GetInstanceData_instance_deadmines(Map* pMap) +{ + return new instance_deadmines(pMap); +} + +void AddSC_instance_deadmines() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "instance_deadmines"; + newscript->GetInstanceData = &GetInstanceData_instance_deadmines; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/dun_morogh.cpp b/scripts/eastern_kingdoms/dun_morogh.cpp new file mode 100644 index 000000000..9318c7ac0 --- /dev/null +++ b/scripts/eastern_kingdoms/dun_morogh.cpp @@ -0,0 +1,91 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Dun_Morogh +SD%Complete: 50 +SDComment: Quest support: 1783 +SDCategory: Dun Morogh +EndScriptData */ + +/* ContentData +npc_narm_faulk +EndContentData */ + +#include "precompiled.h" + +/*###### +## npc_narm_faulk +######*/ + +#define SAY_HEAL -1000187 + +struct MANGOS_DLL_DECL npc_narm_faulkAI : public ScriptedAI +{ + uint32 lifeTimer; + bool spellHit; + + npc_narm_faulkAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + void Reset() + { + lifeTimer = 120000; + m_creature->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD); + m_creature->SetStandState(UNIT_STAND_STATE_DEAD); + spellHit = false; + } + + void MoveInLineOfSight(Unit *who) { } + + void UpdateAI(const uint32 diff) + { + if (m_creature->IsStandState()) + { + if (lifeTimer < diff) + m_creature->AI()->EnterEvadeMode(); + else + lifeTimer -= diff; + } + } + + void SpellHit(Unit *Hitter, const SpellEntry *Spellkind) + { + if (Spellkind->Id == 8593 && !spellHit) + { + DoCast(m_creature,32343); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_creature->SetUInt32Value(UNIT_DYNAMIC_FLAGS, 0); + //m_creature->RemoveAllAuras(); + DoScriptText(SAY_HEAL, m_creature, Hitter); + spellHit = true; + } + } + +}; +CreatureAI* GetAI_npc_narm_faulk(Creature* pCreature) +{ + return new npc_narm_faulkAI(pCreature); +} + +void AddSC_dun_morogh() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_narm_faulk"; + newscript->GetAI = &GetAI_npc_narm_faulk; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/eastern_plaguelands.cpp b/scripts/eastern_kingdoms/eastern_plaguelands.cpp new file mode 100644 index 000000000..69cf1099e --- /dev/null +++ b/scripts/eastern_kingdoms/eastern_plaguelands.cpp @@ -0,0 +1,176 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Eastern_Plaguelands +SD%Complete: 100 +SDComment: Quest support: 5211, 5742. Special vendor Augustus the Touched +SDCategory: Eastern Plaguelands +EndScriptData */ + +/* ContentData +mobs_ghoul_flayer +npc_augustus_the_touched +npc_darrowshire_spirit +npc_tirion_fordring +EndContentData */ + +#include "precompiled.h" + +//id8530 - cannibal ghoul +//id8531 - gibbering ghoul +//id8532 - diseased flayer + +struct MANGOS_DLL_DECL mobs_ghoul_flayerAI : public ScriptedAI +{ + mobs_ghoul_flayerAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + void Reset() { } + + void JustDied(Unit* Killer) + { + if (Killer->GetTypeId() == TYPEID_PLAYER) + m_creature->SummonCreature(11064, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 60000); + } + +}; + +CreatureAI* GetAI_mobs_ghoul_flayer(Creature* pCreature) +{ + return new mobs_ghoul_flayerAI(pCreature); +} + +/*###### +## npc_augustus_the_touched +######*/ + +bool GossipHello_npc_augustus_the_touched(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pCreature->isVendor() && pPlayer->GetQuestRewardStatus(6164)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_augustus_the_touched(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_TRADE) + pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + return true; +} + +/*###### +## npc_darrowshire_spirit +######*/ + +#define SPELL_SPIRIT_SPAWNIN 17321 + +struct MANGOS_DLL_DECL npc_darrowshire_spiritAI : public ScriptedAI +{ + npc_darrowshire_spiritAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + void Reset() + { + DoCast(m_creature,SPELL_SPIRIT_SPAWNIN); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } +}; + +CreatureAI* GetAI_npc_darrowshire_spirit(Creature* pCreature) +{ + return new npc_darrowshire_spiritAI(pCreature); +} + +bool GossipHello_npc_darrowshire_spirit(Player* pPlayer, Creature* pCreature) +{ + pPlayer->SEND_GOSSIP_MENU(3873, pCreature->GetGUID()); + pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetGUID()); + pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + return true; +} + +/*###### +## npc_tirion_fordring +######*/ + +bool GossipHello_npc_tirion_fordring(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestStatus(5742) == QUEST_STATUS_INCOMPLETE && pPlayer->getStandState() == UNIT_STAND_STATE_SIT) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I am ready to hear your tale, Tirion.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_tirion_fordring(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Thank you, Tirion. What of your identity?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->SEND_GOSSIP_MENU(4493, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "That is terrible.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->SEND_GOSSIP_MENU(4494, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+3: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I will, Tirion.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->SEND_GOSSIP_MENU(4495, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+4: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->AreaExploredOrEventHappens(5742); + break; + } + return true; +} + +void AddSC_eastern_plaguelands() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "mobs_ghoul_flayer"; + newscript->GetAI = &GetAI_mobs_ghoul_flayer; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_augustus_the_touched"; + newscript->pGossipHello = &GossipHello_npc_augustus_the_touched; + newscript->pGossipSelect = &GossipSelect_npc_augustus_the_touched; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_darrowshire_spirit"; + newscript->GetAI = &GetAI_npc_darrowshire_spirit; + newscript->pGossipHello = &GossipHello_npc_darrowshire_spirit; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_tirion_fordring"; + newscript->pGossipHello = &GossipHello_npc_tirion_fordring; + newscript->pGossipSelect = &GossipSelect_npc_tirion_fordring; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/elwynn_forest.cpp b/scripts/eastern_kingdoms/elwynn_forest.cpp new file mode 100644 index 000000000..842003838 --- /dev/null +++ b/scripts/eastern_kingdoms/elwynn_forest.cpp @@ -0,0 +1,91 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Elwynn_Forest +SD%Complete: 50 +SDComment: Quest support: 1786 +SDCategory: Elwynn Forest +EndScriptData */ + +/* ContentData +npc_henze_faulk +EndContentData */ + +#include "precompiled.h" + +/*###### +## npc_henze_faulk +######*/ + +#define SAY_HEAL -1000187 + +struct MANGOS_DLL_DECL npc_henze_faulkAI : public ScriptedAI +{ + uint32 lifeTimer; + bool spellHit; + + npc_henze_faulkAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + void Reset() + { + lifeTimer = 120000; + m_creature->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD); + m_creature->SetStandState(UNIT_STAND_STATE_DEAD); // lay down + spellHit = false; + } + + void MoveInLineOfSight(Unit *who) { } + + void UpdateAI(const uint32 diff) + { + if (m_creature->IsStandState()) + { + if (lifeTimer < diff) + m_creature->AI()->EnterEvadeMode(); + else + lifeTimer -= diff; + } + } + + void SpellHit(Unit *Hitter, const SpellEntry *Spellkind) + { + if (Spellkind->Id == 8593 && !spellHit) + { + DoCast(m_creature,32343); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_creature->SetUInt32Value(UNIT_DYNAMIC_FLAGS, 0); + //m_creature->RemoveAllAuras(); + DoScriptText(SAY_HEAL, m_creature, Hitter); + spellHit = true; + } + } + +}; +CreatureAI* GetAI_npc_henze_faulk(Creature* pCreature) +{ + return new npc_henze_faulkAI(pCreature); +} + +void AddSC_elwynn_forest() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_henze_faulk"; + newscript->GetAI = &GetAI_npc_henze_faulk; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/eversong_woods.cpp b/scripts/eastern_kingdoms/eversong_woods.cpp new file mode 100644 index 000000000..2e5c06eff --- /dev/null +++ b/scripts/eastern_kingdoms/eversong_woods.cpp @@ -0,0 +1,347 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Eversong_Woods +SD%Complete: 100 +SDComment: Quest support: 8483, 9686 +SDCategory: Eversong Woods +EndScriptData */ + +/* ContentData +npc_kelerun_bloodmourn +go_harbinger_second_trial +npc_prospector_anvilward +EndContentData */ + +#include "precompiled.h" +#include "escort_ai.h" + +/*###### +## npc_kelerun_bloodmourn +######*/ + +enum +{ + NPC_KELERUN = 17807, + GO_SECOND_TRIAL = 182052, + QUEST_SECOND_TRIAL = 9686, + MAX_CHALLENGER = 4 +}; + +const uint32 uiChallengerId[4] = +{ + 17809, //Bloodwrath + 17810, //Lightrend + 17811, //Swiftblade + 17812 //Sunstriker +}; + +const int32 uiSayId[4] = +{ + -1000319, + -1000320, + -1000321, + -1000322 +}; + +float fChallengerLoc[4][4]= +{ + {10110.667, -6628.059, 4.100, 2.708}, + {10093.919, -6634.340, 4.098, 1.106}, + {10087.565, -6617.282, 4.098, 5.887}, + {10104.807, -6611.145, 4.101, 4.265} +}; + +struct MANGOS_DLL_DECL npc_kelerun_bloodmournAI : public ScriptedAI +{ + npc_kelerun_bloodmournAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_uiNpcFlags = pCreature->GetUInt32Value(UNIT_NPC_FLAGS); + Reset(); + } + + uint32 m_uiNpcFlags; + uint64 m_uiPlayerGUID; + uint64 uiChallengerGUID[MAX_CHALLENGER]; + + uint8 m_uiChallengerCount; + + uint32 m_uiTimeOutTimer; + uint32 m_uiCheckAliveStateTimer; + uint32 m_uiEngageTimer; + + bool m_bIsEventInProgress; + + void Reset() + { + m_creature->SetUInt32Value(UNIT_NPC_FLAGS, m_uiNpcFlags); + + m_uiPlayerGUID = 0; + + for(uint8 i = 0; i < MAX_CHALLENGER; ++i) + uiChallengerGUID[i] = 0; + + m_uiChallengerCount = 0; + + m_uiTimeOutTimer = 60000; + m_uiCheckAliveStateTimer = 2500; + m_uiEngageTimer = 0; + + m_bIsEventInProgress = false; + } + + void StartEvent() + { + m_creature->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE); + m_bIsEventInProgress = true; + } + + bool CanProgressEvent(uint64 uiPlayer) + { + if (m_bIsEventInProgress) + { + m_uiPlayerGUID = uiPlayer; + DoSpawnChallengers(); + m_uiEngageTimer = 15000; + + return true; + } + + return false; + } + + void DoSpawnChallengers() + { + for(uint8 i = 0; i < MAX_CHALLENGER; ++i) + { + if (Creature* pCreature = m_creature->SummonCreature(uiChallengerId[i], + fChallengerLoc[i][0], fChallengerLoc[i][1], + fChallengerLoc[i][2], fChallengerLoc[i][3], + TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000)) + { + uiChallengerGUID[i] = pCreature->GetGUID(); + pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + } + } + } + + void UpdateAI(const uint32 diff) + { + if (m_bIsEventInProgress) + { + if (m_uiTimeOutTimer && m_uiTimeOutTimer < diff) + { + if (!m_uiPlayerGUID) + { + //player are expected to use GO within a minute, if not, event will fail. + Reset(); + return; + } + + m_uiTimeOutTimer = 0; + } + else + m_uiTimeOutTimer -= diff; + + if (m_uiCheckAliveStateTimer < diff) + { + if (Unit* pChallenger = Unit::GetUnit(*m_creature,uiChallengerGUID[m_uiChallengerCount])) + { + if (!pChallenger->isAlive()) + { + Player* pPlayer = (Player*)Unit::GetUnit(*m_creature,m_uiPlayerGUID); + + if (pPlayer && !pPlayer->isAlive()) + { + Reset(); + return; + } + + ++m_uiChallengerCount; + + //count starts at 0 + if (m_uiChallengerCount == MAX_CHALLENGER) + { + if (pPlayer && pPlayer->isAlive()) + pPlayer->GroupEventHappens(QUEST_SECOND_TRIAL,m_creature); + + Reset(); + return; + } + else + m_uiEngageTimer = 15000; + } + } + m_uiCheckAliveStateTimer = 2500; + } + else + m_uiCheckAliveStateTimer -= diff; + + if (m_uiEngageTimer && m_uiEngageTimer < diff) + { + Unit* pPlayer = Unit::GetUnit(*m_creature,m_uiPlayerGUID); + + if (pPlayer && pPlayer->isAlive()) + { + if (Creature* pCreature = (Creature*)Unit::GetUnit(*m_creature,uiChallengerGUID[m_uiChallengerCount])) + { + DoScriptText(uiSayId[m_uiChallengerCount], m_creature, pPlayer); + pCreature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + pCreature->AI()->AttackStart(pPlayer); + } + } + + m_uiEngageTimer = 0; + } + else + m_uiEngageTimer -= diff; + } + } +}; + +CreatureAI* GetAI_npc_kelerun_bloodmourn(Creature* pCreature) +{ + return new npc_kelerun_bloodmournAI(pCreature); +} + +//easiest way is to expect database to respawn GO at quest accept (quest_start_script) +bool QuestAccept_npc_kelerun_bloodmourn(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_SECOND_TRIAL) + ((npc_kelerun_bloodmournAI*)(pCreature->AI()))->StartEvent(); + + return true; +} + +bool GOHello_go_harbinger_second_trial(Player* pPlayer, GameObject* pGO) +{ + if (pGO->GetGoType() == GAMEOBJECT_TYPE_GOOBER) + { + if (Creature* pCreature = GetClosestCreatureWithEntry(pGO, NPC_KELERUN, 30.0f)) + { + if (((npc_kelerun_bloodmournAI*)(pCreature->AI()))->CanProgressEvent(pPlayer->GetGUID())) + return false; + } + } + + return false; +} + +/*###### +## npc_prospector_anvilward +######*/ + +#define SAY_ANVIL1 -1000209 +#define SAY_ANVIL2 -1000210 + +#define QUEST_THE_DWARVEN_SPY 8483 + +struct MANGOS_DLL_DECL npc_prospector_anvilwardAI : public npc_escortAI +{ + // CreatureAI functions + npc_prospector_anvilwardAI(Creature* pCreature) : npc_escortAI(pCreature) {Reset();} + + // Pure Virtual Functions + void WaypointReached(uint32 i) + { + Player* pPlayer = GetPlayerForEscort(); + + if (!pPlayer) + return; + + switch (i) + { + case 0: + DoScriptText(SAY_ANVIL1, m_creature, pPlayer); + break; + case 5: + DoScriptText(SAY_ANVIL1, m_creature, pPlayer); + break; + case 6: + m_creature->setFaction(24); + break; + } + } + + void Reset() + { + //Default npc faction + m_creature->setFaction(35); + } + + void JustDied(Unit* killer) + { + //Default npc faction + m_creature->setFaction(35); + } +}; + +CreatureAI* GetAI_npc_prospector_anvilward(Creature* pCreature) +{ + return new npc_prospector_anvilwardAI(pCreature); +} + +bool GossipHello_npc_prospector_anvilward(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->GetQuestStatus(QUEST_THE_DWARVEN_SPY) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I need a moment of your time, sir.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + pPlayer->SEND_GOSSIP_MENU(8239, pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_prospector_anvilward(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Why... yes, of course. I've something to show you right inside this building, Mr. Anvilward.",GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+2); + pPlayer->SEND_GOSSIP_MENU(8240, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->CLOSE_GOSSIP_MENU(); + + if (npc_prospector_anvilwardAI* pEscortAI = dynamic_cast(pCreature->AI())) + pEscortAI->Start(false, false, pPlayer->GetGUID()); + + break; + } + return true; +} + +void AddSC_eversong_woods() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_kelerun_bloodmourn"; + newscript->GetAI = &GetAI_npc_kelerun_bloodmourn; + newscript->pQuestAccept = &QuestAccept_npc_kelerun_bloodmourn; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "go_harbinger_second_trial"; + newscript->pGOHello = &GOHello_go_harbinger_second_trial; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_prospector_anvilward"; + newscript->GetAI = &GetAI_npc_prospector_anvilward; + newscript->pGossipHello = &GossipHello_npc_prospector_anvilward; + newscript->pGossipSelect = &GossipSelect_npc_prospector_anvilward; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/ghostlands.cpp b/scripts/eastern_kingdoms/ghostlands.cpp new file mode 100644 index 000000000..a400bf9b0 --- /dev/null +++ b/scripts/eastern_kingdoms/ghostlands.cpp @@ -0,0 +1,277 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Ghostlands +SD%Complete: 100 +SDComment: Quest support: 9212, 9692. Obtain Budd's Guise of Zul'aman. Vendor Rathis Tomber +SDCategory: Ghostlands +EndScriptData */ + +/* ContentData +npc_blood_knight_dawnstar +npc_budd_nedreck +npc_ranger_lilatha +npc_rathis_tomber +EndContentData */ + +#include "precompiled.h" +#include "escort_ai.h" + +/*###### +## npc_blood_knight_dawnstar +######*/ + +#define GOSSIP_ITEM_INSIGNIA "Take Blood Knight Insignia" + +bool GossipHello_npc_blood_knight_dawnstar(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->GetQuestStatus(9692) == QUEST_STATUS_INCOMPLETE && !pPlayer->HasItemCount(24226,1,true)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,GOSSIP_ITEM_INSIGNIA,GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+1); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_blood_knight_dawnstar(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + ItemPosCountVec dest; + uint8 msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, 24226, 1, false); + if (msg == EQUIP_ERR_OK) + { + pPlayer->StoreNewItem(dest, 24226, 1, true); + pPlayer->PlayerTalkClass->ClearMenus(); + } + } + return true; +} + +/*###### +## npc_budd_nedreck +######*/ + +#define GOSSIP_ITEM_DISGUISE "You gave the crew disguises?" + +bool GossipHello_npc_budd_nedreck(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestStatus(11166) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,GOSSIP_ITEM_DISGUISE,GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_budd_nedreck(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction==GOSSIP_ACTION_INFO_DEF) + { + pPlayer->CLOSE_GOSSIP_MENU(); + pCreature->CastSpell(pPlayer, 42540, false); + } + return true; +} + +/*###### +## npc_ranger_lilatha +######*/ + +enum +{ + SAY_START = -1000140, + SAY_PROGRESS1 = -1000141, + SAY_PROGRESS2 = -1000142, + SAY_PROGRESS3 = -1000143, + SAY_END1 = -1000144, + SAY_END2 = -1000145, + CAPTAIN_ANSWER = -1000146, + + QUEST_CATACOMBS = 9212, + GO_CAGE = 181152, + NPC_CAPTAIN_HELIOS = 16220, + FACTION_SMOON_E = 1603, +}; + +struct MANGOS_DLL_DECL npc_ranger_lilathaAI : public npc_escortAI +{ + npc_ranger_lilathaAI(Creature* pCreature) : npc_escortAI(pCreature) + { + m_uiGoCageGUID = 0; + m_uiHeliosGUID = 0; + Reset(); + } + + uint64 m_uiGoCageGUID; + uint64 m_uiHeliosGUID; + + void MoveInLineOfSight(Unit* pUnit) + { + if (HasEscortState(STATE_ESCORT_ESCORTING)) + { + if (!m_uiHeliosGUID && pUnit->GetEntry() == NPC_CAPTAIN_HELIOS) + { + if (m_creature->IsWithinDistInMap(pUnit, 30.0f)) + m_uiHeliosGUID = pUnit->GetGUID(); + } + } + + npc_escortAI::MoveInLineOfSight(pUnit); + } + + void WaypointReached(uint32 i) + { + Player* pPlayer = GetPlayerForEscort(); + + if (!pPlayer) + return; + + switch(i) + { + case 0: + if (GameObject* pGoTemp = GetClosestGameObjectWithEntry(m_creature, GO_CAGE, 10.0f)) + { + m_uiGoCageGUID = pGoTemp->GetGUID(); + pGoTemp->SetGoState(GO_STATE_ACTIVE); + } + + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + + DoScriptText(SAY_START, m_creature, pPlayer); + break; + case 1: + if (GameObject* pGo = m_creature->GetMap()->GetGameObject(m_uiGoCageGUID)) + pGo->SetGoState(GO_STATE_READY); + break; + case 5: + DoScriptText(SAY_PROGRESS1, m_creature, pPlayer); + break; + case 11: + DoScriptText(SAY_PROGRESS2, m_creature, pPlayer); + break; + case 18: + DoScriptText(SAY_PROGRESS3, m_creature, pPlayer); + if (Creature* pSum1 = m_creature->SummonCreature(16342, 7627.083984, -7532.538086, 152.128616, 1.082733, TEMPSUMMON_DEAD_DESPAWN, 0)) + pSum1->AI()->AttackStart(m_creature); + if (Creature* pSum2 = m_creature->SummonCreature(16343, 7620.432129, -7532.550293, 152.454865, 0.827478, TEMPSUMMON_DEAD_DESPAWN, 0)) + pSum2->AI()->AttackStart(pPlayer); + break; + case 19: + SetRun(); + break; + case 25: + SetRun(false); + break; + case 30: + pPlayer->GroupEventHappens(QUEST_CATACOMBS, m_creature); + break; + case 32: + DoScriptText(SAY_END1, m_creature, pPlayer); + break; + case 33: + DoScriptText(SAY_END2, m_creature, pPlayer); + if (Unit* pHelios = Unit::GetUnit(*m_creature, m_uiHeliosGUID)) + DoScriptText(CAPTAIN_ANSWER, pHelios, m_creature); + break; + } + } + + void Reset() + { + if (!HasEscortState(STATE_ESCORT_ESCORTING)) + { + m_uiGoCageGUID = 0; + m_uiHeliosGUID = 0; + } + } +}; + +CreatureAI* GetAI_npc_ranger_lilathaAI(Creature* pCreature) +{ + return new npc_ranger_lilathaAI(pCreature); +} + +bool QuestAccept_npc_ranger_lilatha(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_CATACOMBS) + { + pCreature->setFaction(FACTION_SMOON_E); + + if (npc_ranger_lilathaAI* pEscortAI = dynamic_cast(pCreature->AI())) + pEscortAI->Start(true, false, pPlayer->GetGUID(), pQuest); + } + return true; +} + +/*###### +## npc_rathis_tomber +######*/ + +bool GossipHello_npc_rathis_tomber(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pCreature->isVendor() && pPlayer->GetQuestRewardStatus(9152)) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); + pPlayer->SEND_GOSSIP_MENU(8432, pCreature->GetGUID()); + }else + pPlayer->SEND_GOSSIP_MENU(8431, pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_rathis_tomber(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_TRADE) + pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + + return true; +} + +void AddSC_ghostlands() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_blood_knight_dawnstar"; + newscript->pGossipHello = &GossipHello_npc_blood_knight_dawnstar; + newscript->pGossipSelect = &GossipSelect_npc_blood_knight_dawnstar; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_budd_nedreck"; + newscript->pGossipHello = &GossipHello_npc_budd_nedreck; + newscript->pGossipSelect = &GossipSelect_npc_budd_nedreck; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_ranger_lilatha"; + newscript->GetAI = &GetAI_npc_ranger_lilathaAI; + newscript->pQuestAccept = &QuestAccept_npc_ranger_lilatha; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_rathis_tomber"; + newscript->pGossipHello = &GossipHello_npc_rathis_tomber; + newscript->pGossipSelect = &GossipSelect_npc_rathis_tomber; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/hinterlands.cpp b/scripts/eastern_kingdoms/hinterlands.cpp new file mode 100644 index 000000000..27bcc91e9 --- /dev/null +++ b/scripts/eastern_kingdoms/hinterlands.cpp @@ -0,0 +1,348 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Hinterlands +SD%Complete: 100 +SDComment: Quest support: 863, 2742 +SDCategory: The Hinterlands +EndScriptData */ + +/* ContentData +npc_00x09hl +npc_rinji +EndContentData */ + +#include "precompiled.h" +#include "escort_ai.h" + + /*###### +## npc_00x09hl +######*/ + +enum +{ + SAY_OOX_START = -1000287, + SAY_OOX_AGGRO1 = -1000288, + SAY_OOX_AGGRO2 = -1000289, + SAY_OOX_AMBUSH = -1000290, + SAY_OOX_END = -1000292, + + QUEST_RESQUE_OOX_09 = 836, + + NPC_MARAUDING_OWL = 7808, + NPC_VILE_AMBUSHER = 7809 +}; + +struct MANGOS_DLL_DECL npc_00x09hlAI : public npc_escortAI +{ + npc_00x09hlAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } + + void Reset() { } + + void WaypointReached(uint32 uiPointId) + { + switch(uiPointId) + { + case 26: + DoScriptText(SAY_OOX_AMBUSH, m_creature); + break; + case 43: + DoScriptText(SAY_OOX_AMBUSH, m_creature); + break; + case 64: + DoScriptText(SAY_OOX_END, m_creature); + if (Player* pPlayer = GetPlayerForEscort()) + pPlayer->GroupEventHappens(QUEST_RESQUE_OOX_09, m_creature); + break; + } + } + + void WaypointStart(uint32 uiPointId) + { + switch(uiPointId) + { + case 27: + for(uint8 i = 0; i < 3; ++i) + { + float fX, fY, fZ; + m_creature->GetRandomPoint(147.927444f, -3851.513428f, 130.893f, 7.0f, fX, fY, fZ); + + m_creature->SummonCreature(NPC_MARAUDING_OWL, fX, fY, fZ, 0.0f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 25000); + } + break; + case 44: + for(uint8 i = 0; i < 3; ++i) + { + float fX, fY, fZ; + m_creature->GetRandomPoint(-141.151581f, -4291.213867f, 120.130f, 7.0f, fX, fY, fZ); + + m_creature->SummonCreature(NPC_VILE_AMBUSHER, fX, fY, fZ, 0.0f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 25000); + } + break; + } + } + + void Aggro(Unit* pWho) + { + if (pWho->GetEntry() == NPC_MARAUDING_OWL || pWho->GetEntry() == NPC_VILE_AMBUSHER) + return; + + if (urand(0, 1)) + DoScriptText(SAY_OOX_AGGRO1, m_creature); + else + DoScriptText(SAY_OOX_AGGRO2, m_creature); + } + + void JustSummoned(Creature* pSummoned) + { + pSummoned->GetMotionMaster()->MovePoint(0, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); + } +}; + +bool QuestAccept_npc_00x09hl(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_RESQUE_OOX_09) + { + pCreature->SetStandState(UNIT_STAND_STATE_STAND); + + if (pPlayer->GetTeam() == ALLIANCE) + pCreature->setFaction(FACTION_ESCORT_A_PASSIVE); + else if (pPlayer->GetTeam() == HORDE) + pCreature->setFaction(FACTION_ESCORT_H_PASSIVE); + + DoScriptText(SAY_OOX_START, pCreature, pPlayer); + + if (npc_00x09hlAI* pEscortAI = dynamic_cast(pCreature->AI())) + pEscortAI->Start(false, false, pPlayer->GetGUID(), pQuest); + } + return true; +} + +CreatureAI* GetAI_npc_00x09hl(Creature* pCreature) +{ + return new npc_00x09hlAI(pCreature); +} + +/*###### +## npc_rinji +######*/ + +enum +{ + SAY_RIN_FREE = -1000403, + SAY_RIN_BY_OUTRUNNER = -1000404, + SAY_RIN_HELP_1 = -1000405, + SAY_RIN_HELP_2 = -1000406, + SAY_RIN_COMPLETE = -1000407, + SAY_RIN_PROGRESS_1 = -1000408, + SAY_RIN_PROGRESS_2 = -1000409, + + QUEST_RINJI_TRAPPED = 2742, + NPC_RANGER = 2694, + NPC_OUTRUNNER = 2691, + GO_RINJI_CAGE = 142036 +}; + +struct Location +{ + float m_fX, m_fY, m_fZ; +}; + +Location m_afAmbushSpawn[] = +{ + {191.296204, -2839.329346, 107.388}, + {70.972466, -2848.674805, 109.459} +}; + +Location m_afAmbushMoveTo[] = +{ + {166.630386, -2824.780273, 108.153}, + {70.886589, -2874.335449, 116.675} +}; + +struct MANGOS_DLL_DECL npc_rinjiAI : public npc_escortAI +{ + npc_rinjiAI(Creature* pCreature) : npc_escortAI(pCreature) + { + m_bIsByOutrunner = false; + m_iSpawnId = 0; + Reset(); + } + + bool m_bIsByOutrunner; + uint32 m_uiPostEventCount; + uint32 m_uiPostEventTimer; + int m_iSpawnId; + + void Reset() + { + m_uiPostEventCount = 0; + m_uiPostEventTimer = 3000; + } + + void JustRespawned() + { + m_bIsByOutrunner = false; + m_iSpawnId = 0; + + npc_escortAI::JustRespawned(); + } + + void Aggro(Unit* pWho) + { + if (HasEscortState(STATE_ESCORT_ESCORTING)) + { + if (pWho->GetEntry() == NPC_OUTRUNNER && !m_bIsByOutrunner) + { + DoScriptText(SAY_RIN_BY_OUTRUNNER, pWho); + m_bIsByOutrunner = true; + } + + if (urand(0, 3)) + return; + + //only if attacked and escorter is not in combat? + DoScriptText(urand(0, 1) ? SAY_RIN_HELP_1 : SAY_RIN_HELP_2, m_creature); + } + } + + void DoSpawnAmbush(bool bFirst) + { + if (!bFirst) + m_iSpawnId = 1; + + m_creature->SummonCreature(NPC_RANGER, + m_afAmbushSpawn[m_iSpawnId].m_fX, m_afAmbushSpawn[m_iSpawnId].m_fY, m_afAmbushSpawn[m_iSpawnId].m_fZ, 0.0f, + TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000); + + for(int i = 0; i < 2; ++i) + { + m_creature->SummonCreature(NPC_OUTRUNNER, + m_afAmbushSpawn[m_iSpawnId].m_fX, m_afAmbushSpawn[m_iSpawnId].m_fY, m_afAmbushSpawn[m_iSpawnId].m_fZ, 0.0f, + TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000); + } + } + + void JustSummoned(Creature* pSummoned) + { + pSummoned->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + pSummoned->GetMotionMaster()->MovePoint(0, m_afAmbushMoveTo[m_iSpawnId].m_fX, m_afAmbushMoveTo[m_iSpawnId].m_fY, m_afAmbushMoveTo[m_iSpawnId].m_fZ); + } + + void WaypointReached(uint32 uiPointId) + { + Player* pPlayer = GetPlayerForEscort(); + + if (!pPlayer) + return; + + switch(uiPointId) + { + case 1: + DoScriptText(SAY_RIN_FREE, m_creature, pPlayer); + break; + case 7: + DoSpawnAmbush(true); + break; + case 13: + DoSpawnAmbush(false); + break; + case 17: + DoScriptText(SAY_RIN_COMPLETE, m_creature, pPlayer); + pPlayer->GroupEventHappens(QUEST_RINJI_TRAPPED, m_creature); + SetRun(); + m_uiPostEventCount = 1; + break; + } + } + + void UpdateEscortAI(const uint32 uiDiff) + { + //Check if we have a current target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + { + if (HasEscortState(STATE_ESCORT_ESCORTING) && m_uiPostEventCount) + { + if (m_uiPostEventTimer < uiDiff) + { + m_uiPostEventTimer = 3000; + + if (Player* pPlayer = GetPlayerForEscort()) + { + switch(m_uiPostEventCount) + { + case 1: + DoScriptText(SAY_RIN_PROGRESS_1, m_creature, pPlayer); + ++m_uiPostEventCount; + break; + case 2: + DoScriptText(SAY_RIN_PROGRESS_2, m_creature, pPlayer); + m_uiPostEventCount = 0; + break; + } + } + else + { + m_creature->ForcedDespawn(); + return; + } + } + else + m_uiPostEventTimer -= uiDiff; + } + + return; + } + + DoMeleeAttackIfReady(); + } +}; + +bool QuestAccept_npc_rinji(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_RINJI_TRAPPED) + { + if (GameObject* pGo = GetClosestGameObjectWithEntry(pCreature, GO_RINJI_CAGE, INTERACTION_DISTANCE)) + pGo->UseDoorOrButton(); + + if (npc_rinjiAI* pEscortAI = dynamic_cast(pCreature->AI())) + pEscortAI->Start(false, false, pPlayer->GetGUID(), pQuest); + } + return true; +} + +CreatureAI* GetAI_npc_rinji(Creature* pCreature) +{ + return new npc_rinjiAI(pCreature); +} + +void AddSC_hinterlands() +{ + Script* newscript; + + newscript = new Script; + newscript->Name = "npc_00x09hl"; + newscript->GetAI = &GetAI_npc_00x09hl; + newscript->pQuestAccept = &QuestAccept_npc_00x09hl; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_rinji"; + newscript->GetAI = &GetAI_npc_rinji; + newscript->pQuestAccept = &QuestAccept_npc_rinji; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/ironforge.cpp b/scripts/eastern_kingdoms/ironforge.cpp new file mode 100644 index 000000000..e4653b0a4 --- /dev/null +++ b/scripts/eastern_kingdoms/ironforge.cpp @@ -0,0 +1,93 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Ironforge +SD%Complete: 100 +SDComment: Quest support: 3702 +SDCategory: Ironforge +EndScriptData */ + +/* ContentData +npc_royal_historian_archesonus +EndContentData */ + +#include "precompiled.h" + +/*###### +## npc_royal_historian_archesonus +######*/ + +#define GOSSIP_ITEM_ROYAL "I am ready to listen" +#define GOSSIP_ITEM_ROYAL_1 "That is tragic. How did this happen?" +#define GOSSIP_ITEM_ROYAL_2 "Interesting, continue please." +#define GOSSIP_ITEM_ROYAL_3 "Unbelievable! How dare they??" +#define GOSSIP_ITEM_ROYAL_4 "Of course I will help!" + +bool GossipHello_npc_royal_historian_archesonus(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestStatus(3702) == QUEST_STATUS_INCOMPLETE) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ROYAL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + pPlayer->SEND_GOSSIP_MENU(2235, pCreature->GetGUID()); + } + else + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_royal_historian_archesonus(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ROYAL_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->SEND_GOSSIP_MENU(2236, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ROYAL_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->SEND_GOSSIP_MENU(2237, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ROYAL_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->SEND_GOSSIP_MENU(2238, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+3: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ROYAL_4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->SEND_GOSSIP_MENU(2239, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+4: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->AreaExploredOrEventHappens(3702); + break; + } + return true; +} + +void AddSC_ironforge() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_royal_historian_archesonus"; + newscript->pGossipHello = &GossipHello_npc_royal_historian_archesonus; + newscript->pGossipSelect = &GossipSelect_npc_royal_historian_archesonus; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/isle_of_queldanas.cpp b/scripts/eastern_kingdoms/isle_of_queldanas.cpp new file mode 100644 index 000000000..25f1ac66e --- /dev/null +++ b/scripts/eastern_kingdoms/isle_of_queldanas.cpp @@ -0,0 +1,157 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Isle_of_Queldanas +SD%Complete: 100 +SDComment: Quest support: 11524, 11525, 11532, 11533, 11542, 11543 +SDCategory: Isle Of Quel'Danas +EndScriptData */ + +/* ContentData +npc_ayren_cloudbreaker +npc_converted_sentry +npc_unrestrained_dragonhawk +EndContentData */ + +#include "precompiled.h" + +/*###### +## npc_ayren_cloudbreaker +######*/ + +bool GossipHello_npc_ayren_cloudbreaker(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->GetQuestStatus(11532) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(11533) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,"Speaking of action, I've been ordered to undertake an air strike.",GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+1); + + if (pPlayer->GetQuestStatus(11542) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(11543) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,"I need to intercept the Dawnblade reinforcements.",GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+2); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_ayren_cloudbreaker(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->CastSpell(pPlayer,45071,true); //TaxiPath 779 + } + if (uiAction == GOSSIP_ACTION_INFO_DEF+2) + { + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->CastSpell(pPlayer,45113,true); //TaxiPath 784 + } + return true; +} + +/*###### +## npc_converted_sentry +######*/ + +#define SAY_CONVERTED_1 -1000188 +#define SAY_CONVERTED_2 -1000189 + +#define SPELL_CONVERT_CREDIT 45009 + +struct MANGOS_DLL_DECL npc_converted_sentryAI : public ScriptedAI +{ + npc_converted_sentryAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + bool Credit; + uint32 Timer; + + void Reset() + { + Credit = false; + Timer = 2500; + } + + void MoveInLineOfSight(Unit *who) + { + return; + } + + void UpdateAI(const uint32 diff) + { + if (!Credit) + { + if (Timer <= diff) + { + uint32 i = urand(1,2); + if (i==1) + DoScriptText(SAY_CONVERTED_1, m_creature); + else + DoScriptText(SAY_CONVERTED_2, m_creature); + + DoCast(m_creature,SPELL_CONVERT_CREDIT); + ((Pet*)m_creature)->SetDuration(7500); + Credit = true; + }else Timer -= diff; + } + } +}; +CreatureAI* GetAI_npc_converted_sentry(Creature* pCreature) +{ + return new npc_converted_sentryAI(pCreature); +} + +/*###### +## npc_unrestrained_dragonhawk +######*/ + +bool GossipHello_npc_unrestrained_dragonhawk(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->GetQuestStatus(11542) == QUEST_STATUS_COMPLETE || pPlayer->GetQuestStatus(11543) == QUEST_STATUS_COMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,"",GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+1); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_unrestrained_dragonhawk(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->CastSpell(pPlayer,45353,true); //TaxiPath 788 + } + return true; +} + +void AddSC_isle_of_queldanas() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_ayren_cloudbreaker"; + newscript->pGossipHello = &GossipHello_npc_ayren_cloudbreaker; + newscript->pGossipSelect = &GossipSelect_npc_ayren_cloudbreaker; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_converted_sentry"; + newscript->GetAI = &GetAI_npc_converted_sentry; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_unrestrained_dragonhawk"; + newscript->pGossipHello = &GossipHello_npc_unrestrained_dragonhawk; + newscript->pGossipSelect = &GossipSelect_npc_unrestrained_dragonhawk; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/karazhan/boss_curator.cpp b/scripts/eastern_kingdoms/karazhan/boss_curator.cpp new file mode 100644 index 000000000..4ba952309 --- /dev/null +++ b/scripts/eastern_kingdoms/karazhan/boss_curator.cpp @@ -0,0 +1,213 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Curator +SD%Complete: 80% +SDComment: +SDCategory: Karazhan +EndScriptData */ + +#include "precompiled.h" + +enum +{ + SAY_AGGRO = -1532057, + SAY_SUMMON1 = -1532058, + SAY_SUMMON2 = -1532059, + SAY_EVOCATE = -1532060, + SAY_ENRAGE = -1532061, + SAY_KILL1 = -1532062, + SAY_KILL2 = -1532063, + SAY_DEATH = -1532064, + + // Flare + NPC_ASTRAL_FLARE = 17096, + SPELL_ASTRAL_FLARE_PASSIVE = 30234, + + // The Curator + SPELL_HATEFUL_BOLT = 30383, + SPELL_EVOCATION = 30254, + SPELL_ENRAGE = 30403, + SPELL_BERSERK = 26662 +}; + +struct MANGOS_DLL_DECL boss_curatorAI : public ScriptedAI +{ + boss_curatorAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 m_uiFlareTimer; + uint32 m_uiHatefulBoltTimer; + uint32 m_uiBerserkTimer; + + bool m_bIsBerserk; + bool m_bIsEnraged; + + void Reset() + { + m_uiFlareTimer = 10000; + m_uiHatefulBoltTimer = 15000; // This time may be wrong + m_uiBerserkTimer = 12*MINUTE*IN_MILISECONDS; + m_bIsBerserk = false; + m_bIsEnraged = false; + + m_creature->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_ARCANE, true); + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(urand(0, 1) ? SAY_KILL1 : SAY_KILL2, m_creature); + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_ASTRAL_FLARE) + { + // Flare start with agro on it's target, should be immune to arcane + pSummoned->CastSpell(pSummoned, SPELL_ASTRAL_FLARE_PASSIVE, false); + pSummoned->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_ARCANE, true); + + if (m_creature->getVictim()) + { + Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1); + + pSummoned->AddThreat(pTarget ? pTarget : m_creature->getVictim(), 1000.0f); + } + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // always decrease BerserkTimer + if (!m_bIsBerserk) + { + if (m_uiBerserkTimer < uiDiff) + { + // break evocation if we are under it's effect + if (m_creature->HasAura(SPELL_EVOCATION)) + m_creature->RemoveAurasDueToSpell(SPELL_EVOCATION); + + // ScriptText needs confirmation + DoScriptText(SAY_ENRAGE, m_creature); + + if (m_creature->IsNonMeleeSpellCasted(false)) + m_creature->InterruptNonMeleeSpells(false); + + DoCast(m_creature, SPELL_BERSERK); + + // don't know if he's supposed to do summon/evocate after hard enrage (probably not) + m_bIsBerserk = true; + } + else + m_uiBerserkTimer -= uiDiff; + } + + // not supposed to do anything while evocate + if (m_creature->HasAura(SPELL_EVOCATION)) + return; + + if (!m_bIsEnraged && !m_bIsBerserk) + { + if (m_uiFlareTimer < uiDiff) + { + m_uiFlareTimer = 10000; + + // summon Astral Flare + DoSpawnCreature(NPC_ASTRAL_FLARE, rand()%37, rand()%37, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + + // reduce mana by 10% of maximum + if (int32 iMana = m_creature->GetMaxPower(POWER_MANA)) + { + m_creature->ModifyPower(POWER_MANA, -(iMana/10)); + + //if this get's us below 10%, then we evocate (the 10th should be summoned now + if (m_creature->GetPower(POWER_MANA)*10 < m_creature->GetMaxPower(POWER_MANA)) + { + DoScriptText(SAY_EVOCATE, m_creature); + + if (m_creature->IsNonMeleeSpellCasted(false)) + m_creature->InterruptNonMeleeSpells(false); + + m_creature->CastSpell(m_creature, SPELL_EVOCATION, false); + + //this small delay should make first flare appear fast after evocate, and also prevent possible spawn flood + m_uiFlareTimer = 1000; + return; + } + else + { + switch(urand(0, 3)) + { + case 0: DoScriptText(SAY_SUMMON1, m_creature); break; + case 1: DoScriptText(SAY_SUMMON2, m_creature); break; + } + } + } + } + else + m_uiFlareTimer -= uiDiff; + + if (m_creature->GetHealth()*100 < m_creature->GetMaxHealth()*15) + { + if (!m_creature->IsNonMeleeSpellCasted(false)) + { + m_bIsEnraged = true; + DoScriptText(SAY_ENRAGE, m_creature); + DoCast(m_creature, SPELL_ENRAGE); + } + } + } + + if (m_uiHatefulBoltTimer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_TOPAGGRO, 1)) + m_creature->CastSpell(pTarget, SPELL_HATEFUL_BOLT, false); + + m_uiHatefulBoltTimer = m_bIsEnraged ? 7000 : 15000; + } + else + m_uiHatefulBoltTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_curator(Creature* pCreature) +{ + return new boss_curatorAI(pCreature); +} + +void AddSC_boss_curator() +{ + Script* newscript; + newscript = new Script; + newscript->Name = "boss_curator"; + newscript->GetAI = &GetAI_boss_curator; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp b/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp new file mode 100644 index 000000000..fcec464b9 --- /dev/null +++ b/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp @@ -0,0 +1,151 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Maiden_of_Virtue +SD%Complete: 100 +SDComment: +SDCategory: Karazhan +EndScriptData */ + +#include "precompiled.h" + +enum +{ + SAY_AGGRO = -1532018, + SAY_SLAY1 = -1532019, + SAY_SLAY2 = -1532020, + SAY_SLAY3 = -1532021, + SAY_REPENTANCE1 = -1532022, + SAY_REPENTANCE2 = -1532023, + SAY_DEATH = -1532024, + + SPELL_REPENTANCE = 29511, + SPELL_HOLYFIRE = 29522, + SPELL_HOLYWRATH = 32445, + SPELL_HOLYGROUND = 29512 +}; + +struct MANGOS_DLL_DECL boss_maiden_of_virtueAI : public ScriptedAI +{ + boss_maiden_of_virtueAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 m_uiRepentance_Timer; + uint32 m_uiHolyfire_Timer; + uint32 m_uiHolywrath_Timer; + uint32 m_uiHolyground_Timer; + + void Reset() + { + m_uiRepentance_Timer = urand(25000, 40000); + m_uiHolyfire_Timer = urand(8000, 25000); + m_uiHolywrath_Timer = urand(15000, 25000); + m_uiHolyground_Timer = 3000; + } + + void KilledUnit(Unit* pVictim) + { + switch(urand(0, 5)) // 50% chance to say something out of 3 texts + { + case 0: DoScriptText(SAY_SLAY1, m_creature); break; + case 1: DoScriptText(SAY_SLAY2, m_creature); break; + case 2: DoScriptText(SAY_SLAY3, m_creature); break; + } + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + } + + void Aggro(Unit *pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiHolyground_Timer < uiDiff) + { + DoCast(m_creature, SPELL_HOLYGROUND, true); //Triggered so it doesn't interrupt her at all + m_uiHolyground_Timer = 3000; + } + else + m_uiHolyground_Timer -= uiDiff; + + if (m_uiRepentance_Timer < uiDiff) + { + DoCast(m_creature->getVictim(),SPELL_REPENTANCE); + DoScriptText(urand(0, 1) ? SAY_REPENTANCE1 : SAY_REPENTANCE2, m_creature); + + m_uiRepentance_Timer = urand(25000, 35000); //A little randomness on that spell + } + else + m_uiRepentance_Timer -= uiDiff; + + if (m_uiHolyfire_Timer < uiDiff) + { + //Time for an omgwtfpwn code to make maiden cast holy fire only on units outside the holy ground's 18 yard range + Unit* pTarget = NULL; + std::list t_list = m_creature->getThreatManager().getThreatList(); + std::vector target_list; + for(std::list::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) + { + pTarget = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()); + if (pTarget && !pTarget->IsWithinDist(m_creature, 12.0f, false)) + target_list.push_back(pTarget); + pTarget = NULL; + } + if (target_list.size()) + pTarget = *(target_list.begin()+rand()%target_list.size()); + + DoCast(pTarget,SPELL_HOLYFIRE); + + m_uiHolyfire_Timer = urand(8000, 23000); //Anywhere from 8 to 23 seconds, good luck having several of those in a row! + } + else + m_uiHolyfire_Timer -= uiDiff; + + if (m_uiHolywrath_Timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(pTarget, SPELL_HOLYWRATH); + + m_uiHolywrath_Timer = urand(20000, 25000); //20-25 secs sounds nice + } + else + m_uiHolywrath_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_maiden_of_virtue(Creature* pCreature) +{ + return new boss_maiden_of_virtueAI(pCreature); +} + +void AddSC_boss_maiden_of_virtue() +{ + Script* newscript; + newscript = new Script; + newscript->Name = "boss_maiden_of_virtue"; + newscript->GetAI = &GetAI_boss_maiden_of_virtue; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp b/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp new file mode 100644 index 000000000..f23c2b796 --- /dev/null +++ b/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp @@ -0,0 +1,344 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Midnight +SD%Complete: 90 +SDComment: Use SPELL_SUMMON_ATTUMEN and SPELL_SUMMON_ATTUMEN_MOUNTED instead of SummonCreature. +SDCategory: Karazhan +EndScriptData */ + +#include "precompiled.h" + +enum +{ + SAY_MIDNIGHT_KILL = -1532000, + SAY_APPEAR1 = -1532001, + SAY_APPEAR2 = -1532002, + SAY_APPEAR3 = -1532003, + SAY_MOUNT = -1532004, + SAY_KILL1 = -1532005, + SAY_KILL2 = -1532006, + SAY_DISARMED = -1532007, + SAY_DEATH = -1532008, + SAY_RANDOM1 = -1532009, + SAY_RANDOM2 = -1532010, + + SPELL_SHADOWCLEAVE = 29832, + SPELL_INTANGIBLE_PRESENCE = 29833, + SPELL_BERSERKER_CHARGE = 26561, //Only when mounted + SPELL_SUMMON_ATTUMEN = 29714, + SPELL_SUMMON_ATTUMEN_MOUNTED= 29799, + + MOUNTED_DISPLAYID = 16040, // should use creature 16152 instead of changing displayid + + //Attumen (TODO: Use the summoning spell instead of creature id. It works , but is not convenient for us) + SUMMON_ATTUMEN = 15550 +}; + +struct MANGOS_DLL_DECL boss_midnightAI : public ScriptedAI +{ + boss_midnightAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint64 m_uiAttumenGUID; + uint8 m_uiPhase; + uint32 m_uiMount_Timer; + + void Reset() + { + m_uiPhase = 1; + m_uiAttumenGUID = 0; + m_uiMount_Timer = 0; + + m_creature->SetVisibility(VISIBILITY_ON); + } + + void KilledUnit(Unit* pVictim) + { + if (m_uiPhase == 2) + { + if (Unit* pUnit = Unit::GetUnit(*m_creature, m_uiAttumenGUID)) + DoScriptText(SAY_MIDNIGHT_KILL, pUnit); + } + } + + void Mount(Unit* pAttumen) + { + DoScriptText(SAY_MOUNT, pAttumen); + m_uiPhase = 3; + + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + pAttumen->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + + float fAngle = m_creature->GetAngle(pAttumen); + float fDistance = m_creature->GetDistance2d(pAttumen); + + float fNewX = m_creature->GetPositionX() + cos(fAngle)*(fDistance/2) ; + float fNewY = m_creature->GetPositionY() + sin(fAngle)*(fDistance/2) ; + float fNewZ = 50.0f; + + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MovePoint(0, fNewX, fNewY, fNewZ); + + fDistance += 10.0f; + fNewX = m_creature->GetPositionX() + cos(fAngle)*(fDistance/2); + fNewY = m_creature->GetPositionY() + sin(fAngle)*(fDistance/2); + + pAttumen->GetMotionMaster()->Clear(); + pAttumen->GetMotionMaster()->MovePoint(0, fNewX, fNewY, fNewZ); + + m_uiMount_Timer = 1000; + } + + void SetMidnight(Creature *, uint64); //Below .. + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + switch(m_uiPhase) + { + case 1: + if ((m_creature->GetHealth()*100)/m_creature->GetMaxHealth() < 95) + { + m_uiPhase = 2; + + if (Creature* pAttumen = m_creature->SummonCreature(SUMMON_ATTUMEN, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000)) + { + m_uiAttumenGUID = pAttumen->GetGUID(); + pAttumen->AI()->AttackStart(m_creature->getVictim()); + SetMidnight(pAttumen, m_creature->GetGUID()); + + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_APPEAR1, pAttumen); break; + case 1: DoScriptText(SAY_APPEAR2, pAttumen); break; + case 2: DoScriptText(SAY_APPEAR3, pAttumen); break; + } + } + } + break; + case 2: + if ((m_creature->GetHealth()*100)/m_creature->GetMaxHealth() < 25) + { + if (Unit *pAttumen = Unit::GetUnit(*m_creature, m_uiAttumenGUID)) + Mount(pAttumen); + } + break; + case 3: + if (m_uiMount_Timer) + { + if (m_uiMount_Timer <= uiDiff) + { + m_uiMount_Timer = 0; + m_creature->SetVisibility(VISIBILITY_OFF); + m_creature->GetMotionMaster()->MoveIdle(); + + if (Unit *pAttumen = Unit::GetUnit(*m_creature, m_uiAttumenGUID)) + { + pAttumen->SetDisplayId(MOUNTED_DISPLAYID); + pAttumen->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + + if (pAttumen->getVictim()) + { + pAttumen->GetMotionMaster()->MoveChase(pAttumen->getVictim()); + pAttumen->SetUInt64Value(UNIT_FIELD_TARGET, pAttumen->getVictim()->GetGUID()); + } + pAttumen->SetFloatValue(OBJECT_FIELD_SCALE_X,1); + } + } + else + m_uiMount_Timer -= uiDiff; + } + break; + } + + if (m_uiPhase != 3) + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_midnight(Creature* pCreature) +{ + return new boss_midnightAI(pCreature); +} + +struct MANGOS_DLL_DECL boss_attumenAI : public ScriptedAI +{ + boss_attumenAI(Creature* pCreature) : ScriptedAI(pCreature) + { + Reset(); + m_uiPhase = 1; + + m_uiCleaveTimer = urand(10000, 16000); + m_uiCurseTimer = 30000; + m_uiRandomYellTimer = urand(30000, 60000); //Occasionally yell + m_uiChargeTimer = 20000; + m_uiResetTimer = 0; + } + + uint64 m_uiMidnightGUID; + uint8 m_uiPhase; + uint32 m_uiCleaveTimer; + uint32 m_uiCurseTimer; + uint32 m_uiRandomYellTimer; + uint32 m_uiChargeTimer; //only when mounted + uint32 m_uiResetTimer; + + void Reset() + { + m_uiResetTimer = 2000; + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(urand(0, 1) ? SAY_KILL1 : SAY_KILL2, m_creature); + } + + void SpellHit(Unit* pSource, const SpellEntry* pSpell) + { + if (pSpell->Mechanic == MECHANIC_DISARM) + DoScriptText(SAY_DISARMED, m_creature); + } + + void JustDied(Unit* pVictim) + { + DoScriptText(SAY_DEATH, m_creature); + + if (Unit* pMidnight = Unit::GetUnit(*m_creature, m_uiMidnightGUID)) + pMidnight->DealDamage(pMidnight, pMidnight->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_uiResetTimer) + { + if (m_uiResetTimer <= uiDiff) + { + m_uiResetTimer = 0; + + if (Unit *pMidnight = Unit::GetUnit(*m_creature, m_uiMidnightGUID)) + { + pMidnight->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + pMidnight->SetVisibility(VISIBILITY_ON); + } + m_uiMidnightGUID = 0; + + m_creature->SetVisibility(VISIBILITY_OFF); + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + else + m_uiResetTimer -= uiDiff; + } + + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE)) + return; + + if (m_uiCleaveTimer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_SHADOWCLEAVE); + m_uiCleaveTimer = urand(10000, 16000); + } + else + m_uiCleaveTimer -= uiDiff; + + if (m_uiCurseTimer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_INTANGIBLE_PRESENCE); + m_uiCurseTimer = 30000; + } + else + m_uiCurseTimer -= uiDiff; + + if (m_uiRandomYellTimer < uiDiff) + { + DoScriptText(urand(0, 1) ? SAY_RANDOM1 : SAY_RANDOM2, m_creature); + m_uiRandomYellTimer = urand(30000, 60000); + } + else + m_uiRandomYellTimer -= uiDiff; + + if (m_creature->GetDisplayId() == MOUNTED_DISPLAYID) + { + if (m_uiChargeTimer < uiDiff) + { + Unit *target; + std::list t_list = m_creature->getThreatManager().getThreatList(); + std::vector target_list; + for(std::list::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) + { + target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()); + if (target && !target->IsWithinDist(m_creature, ATTACK_DISTANCE, false)) + target_list.push_back(target); + target = NULL; + } + if (target_list.size()) + target = *(target_list.begin()+rand()%target_list.size()); + + DoCast(target, SPELL_BERSERKER_CHARGE); + m_uiChargeTimer = 20000; + } + else + m_uiChargeTimer -= uiDiff; + } + else + { + if ((m_creature->GetHealth()*100)/m_creature->GetMaxHealth() < 25) + { + Creature *pMidnight = (Creature*)Unit::GetUnit(*m_creature, m_uiMidnightGUID); + + if (pMidnight && pMidnight->GetTypeId() == TYPEID_UNIT) + { + ((boss_midnightAI*)(pMidnight->AI()))->Mount(m_creature); + m_creature->SetHealth(pMidnight->GetHealth()); + DoResetThreat(); + } + } + } + + DoMeleeAttackIfReady(); + } +}; + +void boss_midnightAI::SetMidnight(Creature* pAttumen, uint64 uiValue) +{ + ((boss_attumenAI*)pAttumen->AI())->m_uiMidnightGUID = uiValue; +} + +CreatureAI* GetAI_boss_attumen(Creature* pCreature) +{ + return new boss_attumenAI(pCreature); +} + +void AddSC_boss_attumen() +{ + Script* newscript; + + newscript = new Script; + newscript->Name = "boss_attumen"; + newscript->GetAI = &GetAI_boss_attumen; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_midnight"; + newscript->GetAI = &GetAI_boss_midnight; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp b/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp new file mode 100644 index 000000000..b2b77fac0 --- /dev/null +++ b/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp @@ -0,0 +1,843 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Moroes +SD%Complete: 95 +SDComment: +SDCategory: Karazhan +EndScriptData */ + +#include "precompiled.h" +#include "karazhan.h" + +#define SAY_AGGRO -1532011 +#define SAY_SPECIAL_1 -1532012 +#define SAY_SPECIAL_2 -1532013 +#define SAY_KILL_1 -1532014 +#define SAY_KILL_2 -1532015 +#define SAY_KILL_3 -1532016 +#define SAY_DEATH -1532017 + +#define SPELL_VANISH 29448 +#define SPELL_GARROTE 37066 +#define SPELL_BLIND 34694 +#define SPELL_GOUGE 29425 +#define SPELL_FRENZY 37023 + +#define POS_Z 81.73 + +float Locations[4][3]= +{ + {-10991.0, -1884.33, 0.614315}, + {-10989.4, -1885.88, 0.904913}, + {-10978.1, -1887.07, 2.035550}, + {-10975.9, -1885.81, 2.253890}, +}; + +const uint32 Adds[6]= +{ + 17007, + 19872, + 19873, + 19874, + 19875, + 19876, +}; + +struct MANGOS_DLL_DECL boss_moroesAI : public ScriptedAI +{ + boss_moroesAI(Creature* pCreature) : ScriptedAI(pCreature) + { + FirstTime = true; + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint64 AddGUID[4]; + + uint32 Vanish_Timer; + uint32 Blind_Timer; + uint32 Gouge_Timer; + uint32 Wait_Timer; + uint32 CheckAdds_Timer; + uint32 AddId[4]; + + bool FirstTime; + bool InVanish; + bool Enrage; + + void Reset() + { + Vanish_Timer = 30000; + Blind_Timer = 35000; + Gouge_Timer = 23000; + Wait_Timer = 0; + CheckAdds_Timer = 5000; + + Enrage = false; + InVanish = false; + + SpawnAdds(); + + m_creature->setFaction(16); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + + if (m_pInstance) + m_pInstance->SetData(TYPE_MOROES, NOT_STARTED); + } + + void StartEvent() + { + if (!m_pInstance) + return; + + if (m_pInstance) + m_pInstance->SetData(TYPE_MOROES, IN_PROGRESS); + } + + void Aggro(Unit* who) + { + StartEvent(); + DoScriptText(SAY_AGGRO, m_creature); + AddsAttack(); + } + + void KilledUnit(Unit* victim) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_KILL_1, m_creature); break; + case 1: DoScriptText(SAY_KILL_2, m_creature); break; + case 2: DoScriptText(SAY_KILL_3, m_creature); break; + } + } + + void JustDied(Unit* victim) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_MOROES, DONE); + + DeSpawnAdds(); + + //remove aura from spell Garrote when Moroes dies + Map *map = m_creature->GetMap(); + if (map->IsDungeon()) + { + Map::PlayerList const &PlayerList = map->GetPlayers(); + + if (PlayerList.isEmpty()) + return; + + for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) + { + if (i->getSource()->isAlive() && i->getSource()->HasAura(SPELL_GARROTE,0)) + i->getSource()->RemoveAurasDueToSpell(SPELL_GARROTE); + } + } + } + + uint8 CheckAdd(uint64 guid) + { + Unit* pUnit = Unit::GetUnit((*m_creature), guid); + if (pUnit) + { + if (!pUnit->isAlive()) + return 1; // Exists but is dead + else + return 2; // Exists and is alive + } + return 0; // Does not exist + } + + void SpawnAdds() + { + Creature *pCreature = NULL; + + if (FirstTime) + { + std::vector AddList; + + for(uint8 i = 0; i < 6; ++i) + AddList.push_back(Adds[i]); + + while(AddList.size() > 4) + AddList.erase((AddList.begin())+(rand()%AddList.size())); + + uint8 i = 0; + for(std::vector::iterator itr = AddList.begin(); itr != AddList.end(); ++itr) + { + uint32 entry = *itr; + + pCreature = m_creature->SummonCreature(entry, Locations[i][0], Locations[i][1], POS_Z, Locations[i][2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); + if (pCreature) + { + AddGUID[i] = pCreature->GetGUID(); + AddId[i] = entry; + } + ++i; + } + + FirstTime = false; + } + else + { + for(uint8 i = 0; i < 4; ++i) + { + switch(CheckAdd(AddGUID[i])) + { + case 0: + pCreature = m_creature->SummonCreature(AddId[i], Locations[i][0], Locations[i][1], POS_Z, Locations[i][2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); + if (pCreature) + AddGUID[i] = pCreature->GetGUID(); + break; + case 1: + pCreature = ((Creature*)Unit::GetUnit((*m_creature), AddGUID[i])); + if (pCreature) + { + pCreature->Respawn(); + pCreature->AI()->EnterEvadeMode(); + } + break; + case 2: + pCreature = ((Creature*)Unit::GetUnit((*m_creature), AddGUID[i])); + if (!pCreature->IsInEvadeMode()) + pCreature->AI()->EnterEvadeMode(); + break; + } + } + } + } + + void DeSpawnAdds() + { + for(uint8 i = 0; i < 4 ; ++i) + { + Unit* Temp = NULL; + if (AddGUID[i]) + { + Temp = Unit::GetUnit((*m_creature),AddGUID[i]); + if (Temp && Temp->isAlive()) + Temp->DealDamage(Temp, Temp->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + } + } + + void AddsAttack() + { + for(uint8 i = 0; i < 4; ++i) + { + Unit* Temp = NULL; + if (AddGUID[i]) + { + Temp = Unit::GetUnit((*m_creature),AddGUID[i]); + if (Temp && Temp->isAlive()) + ((Creature*)Temp)->AI()->AttackStart(m_creature->getVictim()); + else + EnterEvadeMode(); + } + } + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_pInstance && !m_pInstance->GetData(TYPE_MOROES)) + EnterEvadeMode(); + + if (!Enrage && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 30) + { + DoCast(m_creature, SPELL_FRENZY); + Enrage = true; + } + + if (CheckAdds_Timer < diff) + { + for (uint8 i = 0; i < 4; ++i) + { + Unit* Temp = NULL; + if (AddGUID[i]) + { + Temp = Unit::GetUnit((*m_creature),AddGUID[i]); + if (Temp && Temp->isAlive()) + if (!Temp->SelectHostileTarget() || !Temp->getVictim()) + ((Creature*)Temp)->AI()->AttackStart(m_creature->getVictim()); + } + } + CheckAdds_Timer = 5000; + }else CheckAdds_Timer -= diff; + + if (!Enrage) + { + //Cast Vanish, then Garrote random victim + if (Vanish_Timer < diff) + { + m_creature->setFaction(35); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + DoCast(m_creature, SPELL_VANISH); + InVanish = true; + Vanish_Timer = 30000; + Wait_Timer = 5000; + }else Vanish_Timer -= diff; + + if (InVanish) + { + if (Wait_Timer < diff) + { + DoScriptText(urand(0, 1) ? SAY_SPECIAL_1 : SAY_SPECIAL_2, m_creature); + + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0)) + target->CastSpell(target, SPELL_GARROTE, true); + + m_creature->setFaction(16); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->AI()->AttackStart(m_creature->getVictim()); + InVanish = false; + }else Wait_Timer -= diff; + } + + //Gouge highest aggro, and attack second highest + if (Gouge_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_GOUGE); + Gouge_Timer = 40000; + }else Gouge_Timer -= diff; + + if (Blind_Timer < diff) + { + Unit* target = NULL; + std::list t_list = m_creature->getThreatManager().getThreatList(); + + if (t_list.empty()) + return; + + std::vector target_list; + for (std::list::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) + { + target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()); + if (target && target->IsWithinDist(m_creature, ATTACK_DISTANCE, false)) + target_list.push_back(target); + } + if (target_list.size()) + target = *(target_list.begin()+rand()%target_list.size()); + + if (target) + DoCast(target, SPELL_BLIND); + + Blind_Timer = 40000; + }else Blind_Timer -= diff; + } + + if (!InVanish) + DoMeleeAttackIfReady(); + } +}; + +struct MANGOS_DLL_DECL boss_moroes_guestAI : public ScriptedAI +{ + ScriptedInstance* m_pInstance; + + uint64 GuestGUID[4]; + + boss_moroes_guestAI(Creature* pCreature) : ScriptedAI(pCreature) + { + for(uint8 i = 0; i < 4; ++i) + GuestGUID[i] = 0; + + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + void Reset() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_MOROES, NOT_STARTED); + } + + void AcquireGUID() + { + if (!m_pInstance) + return; + + GuestGUID[0] = m_pInstance->GetData64(DATA_MOROES); + Creature* Moroes = ((Creature*)Unit::GetUnit((*m_creature), GuestGUID[0])); + if (Moroes) + { + for(uint8 i = 0; i < 3; ++i) + { + uint64 GUID = ((boss_moroesAI*)Moroes->AI())->AddGUID[i]; + if (GUID && GUID != m_creature->GetGUID()) + GuestGUID[i+1] = GUID; + } + } + } + + Unit* SelectTarget() + { + uint64 TempGUID = GuestGUID[rand()%5]; + if (TempGUID) + { + Unit* pUnit = Unit::GetUnit((*m_creature), TempGUID); + if (pUnit && pUnit->isAlive()) + return pUnit; + } + + return m_creature; + } + + void UpdateAI(const uint32 diff) + { + if (m_pInstance && !m_pInstance->GetData(TYPE_MOROES)) + EnterEvadeMode(); + + DoMeleeAttackIfReady(); + } +}; + +#define SPELL_MANABURN 29405 +#define SPELL_MINDFLY 29570 +#define SPELL_SWPAIN 34441 +#define SPELL_SHADOWFORM 29406 + +struct MANGOS_DLL_DECL boss_baroness_dorothea_millstipeAI : public boss_moroes_guestAI +{ + //Shadow Priest + boss_baroness_dorothea_millstipeAI(Creature* pCreature) : boss_moroes_guestAI(pCreature) {} + + uint32 ManaBurn_Timer; + uint32 MindFlay_Timer; + uint32 ShadowWordPain_Timer; + + void Reset() + { + ManaBurn_Timer = 7000; + MindFlay_Timer = 1000; + ShadowWordPain_Timer = 6000; + + DoCast(m_creature,SPELL_SHADOWFORM, true); + + boss_moroes_guestAI::Reset(); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + boss_moroes_guestAI::UpdateAI(diff); + + if (MindFlay_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_MINDFLY); + MindFlay_Timer = 12000; //3sec channeled + }else MindFlay_Timer -= diff; + + if (ManaBurn_Timer < diff) + { + Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0); + if (target && (target->getPowerType() == POWER_MANA)) + DoCast(target,SPELL_MANABURN); + ManaBurn_Timer = 5000; //3 sec cast + }else ManaBurn_Timer -= diff; + + if (ShadowWordPain_Timer < diff) + { + Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0); + if (target) + { + DoCast(target,SPELL_SWPAIN); + ShadowWordPain_Timer = 7000; + } + }else ShadowWordPain_Timer -= diff; + } +}; + +#define SPELL_HAMMEROFJUSTICE 13005 +#define SPELL_JUDGEMENTOFCOMMAND 29386 +#define SPELL_SEALOFCOMMAND 29385 + +struct MANGOS_DLL_DECL boss_baron_rafe_dreugerAI : public boss_moroes_guestAI +{ + //Retr Pally + boss_baron_rafe_dreugerAI(Creature* pCreature) : boss_moroes_guestAI(pCreature) {} + + uint32 HammerOfJustice_Timer; + uint32 SealOfCommand_Timer; + uint32 JudgementOfCommand_Timer; + + void Reset() + { + HammerOfJustice_Timer = 1000; + SealOfCommand_Timer = 7000; + JudgementOfCommand_Timer = SealOfCommand_Timer + 29000; + + boss_moroes_guestAI::Reset(); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + boss_moroes_guestAI::UpdateAI(diff); + + if (SealOfCommand_Timer < diff) + { + DoCast(m_creature,SPELL_SEALOFCOMMAND); + SealOfCommand_Timer = 32000; + JudgementOfCommand_Timer = 29000; + }else SealOfCommand_Timer -= diff; + + if (JudgementOfCommand_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_JUDGEMENTOFCOMMAND); + JudgementOfCommand_Timer = SealOfCommand_Timer + 29000; + }else JudgementOfCommand_Timer -= diff; + + if (HammerOfJustice_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_HAMMEROFJUSTICE); + HammerOfJustice_Timer = 12000; + }else HammerOfJustice_Timer -= diff; + } +}; + +#define SPELL_DISPELMAGIC 15090 //Self or other guest+Moroes +#define SPELL_GREATERHEAL 29564 //Self or other guest+Moroes +#define SPELL_HOLYFIRE 29563 +#define SPELL_PWSHIELD 29408 + +struct MANGOS_DLL_DECL boss_lady_catriona_von_indiAI : public boss_moroes_guestAI +{ + //Holy Priest + boss_lady_catriona_von_indiAI(Creature* pCreature) : boss_moroes_guestAI(pCreature) {Reset();} + + uint32 DispelMagic_Timer; + uint32 GreaterHeal_Timer; + uint32 HolyFire_Timer; + uint32 PowerWordShield_Timer; + + void Reset() + { + DispelMagic_Timer = 11000; + GreaterHeal_Timer = 1500; + HolyFire_Timer = 5000; + PowerWordShield_Timer = 1000; + + AcquireGUID(); + + boss_moroes_guestAI::Reset(); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + boss_moroes_guestAI::UpdateAI(diff); + + if (PowerWordShield_Timer < diff) + { + DoCast(m_creature,SPELL_PWSHIELD); + PowerWordShield_Timer = 15000; + }else PowerWordShield_Timer -= diff; + + if (GreaterHeal_Timer < diff) + { + Unit* target = SelectTarget(); + + DoCast(target, SPELL_GREATERHEAL); + GreaterHeal_Timer = 17000; + }else GreaterHeal_Timer -= diff; + + if (HolyFire_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_HOLYFIRE); + HolyFire_Timer = 22000; + }else HolyFire_Timer -= diff; + + if (DispelMagic_Timer < diff) + { + if (urand(0, 1)) + { + Unit* target = SelectTarget(); + DoCast(target, SPELL_DISPELMAGIC); + } + else + DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_DISPELMAGIC); + + DispelMagic_Timer = 25000; + }else DispelMagic_Timer -= diff; + } +}; + +#define SPELL_CLEANSE 29380 //Self or other guest+Moroes +#define SPELL_GREATERBLESSOFMIGHT 29381 //Self or other guest+Moroes +#define SPELL_HOLYLIGHT 29562 //Self or other guest+Moroes +#define SPELL_DIVINESHIELD 41367 + +struct MANGOS_DLL_DECL boss_lady_keira_berrybuckAI : public boss_moroes_guestAI +{ + //Holy Pally + boss_lady_keira_berrybuckAI(Creature* pCreature) : boss_moroes_guestAI(pCreature) {Reset();} + + uint32 Cleanse_Timer; + uint32 GreaterBless_Timer; + uint32 HolyLight_Timer; + uint32 DivineShield_Timer; + + void Reset() + { + Cleanse_Timer = 13000; + GreaterBless_Timer = 1000; + HolyLight_Timer = 7000; + DivineShield_Timer = 31000; + + AcquireGUID(); + + boss_moroes_guestAI::Reset(); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + boss_moroes_guestAI::UpdateAI(diff); + + if (DivineShield_Timer < diff) + { + DoCast(m_creature,SPELL_DIVINESHIELD); + DivineShield_Timer = 31000; + }else DivineShield_Timer -= diff; + + if (HolyLight_Timer < diff) + { + Unit* target = SelectTarget(); + + DoCast(target, SPELL_HOLYLIGHT); + HolyLight_Timer = 10000; + }else HolyLight_Timer -= diff; + + if (GreaterBless_Timer < diff) + { + Unit* target = SelectTarget(); + + DoCast(target, SPELL_GREATERBLESSOFMIGHT); + + GreaterBless_Timer = 50000; + }else GreaterBless_Timer -= diff; + + if (Cleanse_Timer < diff) + { + Unit* target = SelectTarget(); + DoCast(target, SPELL_CLEANSE); + + Cleanse_Timer = 10000; + }else Cleanse_Timer -= diff; + } +}; + +#define SPELL_HAMSTRING 9080 +#define SPELL_MORTALSTRIKE 29572 +#define SPELL_WHIRLWIND 29573 + +struct MANGOS_DLL_DECL boss_lord_robin_darisAI : public boss_moroes_guestAI +{ + //Arms Warr + boss_lord_robin_darisAI(Creature* pCreature) : boss_moroes_guestAI(pCreature) {} + + uint32 Hamstring_Timer; + uint32 MortalStrike_Timer; + uint32 WhirlWind_Timer; + + void Reset() + { + Hamstring_Timer = 7000; + MortalStrike_Timer = 10000; + WhirlWind_Timer = 21000; + + boss_moroes_guestAI::Reset(); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + boss_moroes_guestAI::UpdateAI(diff); + + if (Hamstring_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_HAMSTRING); + Hamstring_Timer = 12000; + }else Hamstring_Timer -= diff; + + if (MortalStrike_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_MORTALSTRIKE); + MortalStrike_Timer = 18000; + }else MortalStrike_Timer -= diff; + + if (WhirlWind_Timer < diff) + { + DoCast(m_creature,SPELL_WHIRLWIND); + WhirlWind_Timer = 21000; + }else WhirlWind_Timer -= diff; + } +}; + +#define SPELL_DISARM 8379 +#define SPELL_HEROICSTRIKE 29567 +#define SPELL_SHIELDBASH 11972 +#define SPELL_SHIELDWALL 29390 + +struct MANGOS_DLL_DECL boss_lord_crispin_ferenceAI : public boss_moroes_guestAI +{ + //Arms Warr + boss_lord_crispin_ferenceAI(Creature* pCreature) : boss_moroes_guestAI(pCreature) {Reset();} + + uint32 Disarm_Timer; + uint32 HeroicStrike_Timer; + uint32 ShieldBash_Timer; + uint32 ShieldWall_Timer; + + void Reset() + { + Disarm_Timer = 6000; + HeroicStrike_Timer = 10000; + ShieldBash_Timer = 8000; + ShieldWall_Timer = 4000; + + boss_moroes_guestAI::Reset(); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + boss_moroes_guestAI::UpdateAI(diff); + + if (Disarm_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_DISARM); + Disarm_Timer = 12000; + }else Disarm_Timer -= diff; + + if (HeroicStrike_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_HEROICSTRIKE); + HeroicStrike_Timer = 10000; + }else HeroicStrike_Timer -= diff; + + if (ShieldBash_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_SHIELDBASH); + ShieldBash_Timer = 13000; + }else ShieldBash_Timer -= diff; + + if (ShieldWall_Timer < diff) + { + DoCast(m_creature,SPELL_SHIELDWALL); + ShieldWall_Timer = 21000; + }else ShieldWall_Timer -= diff; + } +}; + +CreatureAI* GetAI_boss_moroes(Creature* pCreature) +{ + return new boss_moroesAI(pCreature); +} + +CreatureAI* GetAI_baroness_dorothea_millstipe(Creature* pCreature) +{ + return new boss_baroness_dorothea_millstipeAI(pCreature); +} + +CreatureAI* GetAI_baron_rafe_dreuger(Creature* pCreature) +{ + return new boss_baron_rafe_dreugerAI(pCreature); +} + +CreatureAI* GetAI_lady_catriona_von_indi(Creature* pCreature) +{ + return new boss_lady_catriona_von_indiAI(pCreature); +} + +CreatureAI* GetAI_lady_keira_berrybuck(Creature* pCreature) +{ + return new boss_lady_keira_berrybuckAI(pCreature); +} + +CreatureAI* GetAI_lord_robin_daris(Creature* pCreature) +{ + return new boss_lord_robin_darisAI(pCreature); +} + +CreatureAI* GetAI_lord_crispin_ference(Creature* pCreature) +{ + return new boss_lord_crispin_ferenceAI(pCreature); +} + +void AddSC_boss_moroes() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_moroes"; + newscript->GetAI = &GetAI_boss_moroes; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_baroness_dorothea_millstipe"; + newscript->GetAI = &GetAI_baroness_dorothea_millstipe; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_baron_rafe_dreuger"; + newscript->GetAI = &GetAI_baron_rafe_dreuger; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_lady_catriona_von_indi"; + newscript->GetAI = &GetAI_lady_catriona_von_indi; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_lady_keira_berrybuck"; + newscript->GetAI = &GetAI_lady_keira_berrybuck; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_lord_robin_daris"; + newscript->GetAI = &GetAI_lord_robin_daris; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_lord_crispin_ference"; + newscript->GetAI = &GetAI_lord_crispin_ference; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp b/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp new file mode 100644 index 000000000..9edce38bf --- /dev/null +++ b/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp @@ -0,0 +1,43 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Netherspite +SD%Complete: 0 +SDComment: Place Holder +SDCategory: Karazhan +EndScriptData */ + +#include "precompiled.h" + +enum +{ + EMOTE_PHASE_PORTAL = -1532089, + EMOTE_PHASE_BANISH = -1532090, + + SPELL_NETHERBURN_AURA = 30522, + SPELL_VOIDZONE = 37014, //Probably won't work + SPELL_BERSERK = 26662, + SPELL_NETHERBREATH = 36631, + + //Beams (no idea how these are going to work in Mangos) + SPELL_DOMINANCE_ENEMY = 30423, + SPELL_DOMINANCE_SELF = 30468, + SPELL_PERSEVERANCE_ENEMY = 30421, + SPELL_PERSEVERANCE_SELF = 30466, + SPELL_SERENITY_ENEMY = 30422, + SPELL_SERENITY_SELF = 30467 +}; diff --git a/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp b/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp new file mode 100644 index 000000000..5ecef3848 --- /dev/null +++ b/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp @@ -0,0 +1,36 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Nightbane +SD%Complete: 0 +SDComment: Place holder +SDCategory: Karazhan +EndScriptData */ + +#include "precompiled.h" + +enum +{ + SPELL_BELLOWING_ROAR = 39427, + SPELL_CHARRED_EARTH = 30129, //Also 30209 (Target Charred Earth) triggers this + SPELL_DISTRACTING_ASH = 30130, + SPELL_SMOLDERING_BREATH = 30210, + SPELL_TAIL_SWEEP = 25653, + SPELL_RAIN_OF_BONES = 37098, + SPELL_SMOKING_BLAST = 37057, + SPELL_FIREBALL_BARRAGE = 30282 +}; diff --git a/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp b/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp new file mode 100644 index 000000000..57618ee61 --- /dev/null +++ b/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp @@ -0,0 +1,631 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Prince_Malchezzar +SD%Complete: 100 +SDComment: +SDCategory: Karazhan +EndScriptData */ + +#include "precompiled.h" + +#define SAY_AGGRO -1532091 +#define SAY_AXE_TOSS1 -1532092 +#define SAY_AXE_TOSS2 -1532093 +#define SAY_SPECIAL1 -1532094 +#define SAY_SPECIAL2 -1532095 +#define SAY_SPECIAL3 -1532096 +#define SAY_SLAY1 -1532097 +#define SAY_SLAY2 -1532098 +#define SAY_SLAY3 -1532099 +#define SAY_SUMMON1 -1532100 +#define SAY_SUMMON2 -1532101 +#define SAY_DEATH -1532102 + +// 18 Coordinates for Infernal spawns +struct InfernalPoint +{ + float x,y; +}; + +#define INFERNAL_Z 275.5 + +static InfernalPoint InfernalPoints[] = +{ + {-10922.8, -1985.2}, + {-10916.2, -1996.2}, + {-10932.2, -2008.1}, + {-10948.8, -2022.1}, + {-10958.7, -1997.7}, + {-10971.5, -1997.5}, + {-10990.8, -1995.1}, + {-10989.8, -1976.5}, + {-10971.6, -1973.0}, + {-10955.5, -1974.0}, + {-10939.6, -1969.8}, + {-10958.0, -1952.2}, + {-10941.7, -1954.8}, + {-10943.1, -1988.5}, + {-10948.8, -2005.1}, + {-10984.0, -2019.3}, + {-10932.8, -1979.6}, + {-10935.7, -1996.0} +}; + +#define TOTAL_INFERNAL_POINTS 18 + +//Enfeeble is supposed to reduce hp to 1 and then heal player back to full when it ends +//Along with reducing healing and regen while enfeebled to 0% +//This spell effect will only reduce healing + +#define SPELL_ENFEEBLE 30843 //Enfeeble during phase 1 and 2 +#define SPELL_ENFEEBLE_EFFECT 41624 + +#define SPELL_SHADOWNOVA 30852 //Shadownova used during all phases +#define SPELL_SW_PAIN 30854 //Shadow word pain during phase 1 and 3 (different targeting rules though) +#define SPELL_THRASH_PASSIVE 12787 //Extra attack chance during phase 2 +#define SPELL_SUNDER_ARMOR 30901 //Sunder armor during phase 2 +#define SPELL_THRASH_AURA 12787 //Passive proc chance for thrash +#define SPELL_EQUIP_AXES 30857 //Visual for axe equiping +#define SPELL_AMPLIFY_DAMAGE 39095 //Amplifiy during phase 3 +#define SPELL_CLEAVE 30131 //Same as Nightbane. +#define SPELL_HELLFIRE 30859 //Infenals' hellfire aura +#define NETHERSPITE_INFERNAL 17646 //The netherspite infernal creature +#define MALCHEZARS_AXE 17650 //Malchezar's axes (creatures), summoned during phase 3 + +#define INFERNAL_MODEL_INVISIBLE 11686 //Infernal Effects +#define SPELL_INFERNAL_RELAY 30834 + +#define EQUIP_ID_AXE 33542 //Axes info + +//---------Infernal code first +struct MANGOS_DLL_DECL netherspite_infernalAI : public ScriptedAI +{ + netherspite_infernalAI(Creature* pCreature) : ScriptedAI(pCreature) , + malchezaar(0), HellfireTimer(0), CleanupTimer(0), point(NULL) {Reset();} + + uint32 HellfireTimer; + uint32 CleanupTimer; + uint32 malchezaar; + InfernalPoint *point; + + void Reset() {} + void MoveInLineOfSight(Unit *who) {} + + void UpdateAI(const uint32 diff) + { + if (HellfireTimer) + { + if (HellfireTimer <= diff) + { + DoCast(m_creature, SPELL_HELLFIRE); + HellfireTimer = 0; + } else HellfireTimer -= diff; + } + + if (CleanupTimer) + { + if (CleanupTimer <= diff) + { + Cleanup(); + CleanupTimer = 0; + } else CleanupTimer -= diff; + } + } + + void KilledUnit(Unit *who) + { + Unit *pMalchezaar = Unit::GetUnit(*m_creature, malchezaar); + if (pMalchezaar) + ((Creature*)pMalchezaar)->AI()->KilledUnit(who); + } + + void SpellHit(Unit *who, const SpellEntry *spell) + { + if (spell->Id == SPELL_INFERNAL_RELAY) + { + m_creature->SetDisplayId(m_creature->GetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID)); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + HellfireTimer = 4000; + CleanupTimer = 170000; + } + } + + void DamageTaken(Unit *done_by, uint32 &damage) + { + if (done_by->GetGUID() != malchezaar) + damage = 0; + } + + void Cleanup(); //below ... +}; + +struct MANGOS_DLL_DECL boss_malchezaarAI : public ScriptedAI +{ + boss_malchezaarAI(Creature* pCreature) : ScriptedAI(pCreature) + { + for(uint8 i =0; i < 2; ++i) + axes[i] = 0; + + Reset(); + } + + uint32 EnfeebleTimer; + uint32 EnfeebleResetTimer; + uint32 ShadowNovaTimer; + uint32 SWPainTimer; + uint32 SunderArmorTimer; + uint32 AmplifyDamageTimer; + uint32 Cleave_Timer; + uint32 InfernalTimer; + uint32 AxesTargetSwitchTimer; + uint32 InfernalCleanupTimer; + + std::vector infernals; + std::vector positions; + + uint64 axes[2]; + uint64 enfeeble_targets[5]; + uint64 enfeeble_health[5]; + + uint32 phase; + + void Reset() + { + AxesCleanup(); + ClearWeapons(); + InfernalCleanup(); + positions.clear(); + + for(int i =0; i < 5; ++i) + { + enfeeble_targets[i] = 0; + enfeeble_health[i] = 0; + } + + for(int i = 0; i < TOTAL_INFERNAL_POINTS; ++i) + positions.push_back(&InfernalPoints[i]); + + EnfeebleTimer = 30000; + EnfeebleResetTimer = 38000; + ShadowNovaTimer = 35500; + SWPainTimer = 20000; + AmplifyDamageTimer = 5000; + Cleave_Timer = 8000; + InfernalTimer = 45000; + InfernalCleanupTimer = 47000; + AxesTargetSwitchTimer = urand(7500, 20000); + SunderArmorTimer = urand(5000, 10000); + phase = 1; + } + + void KilledUnit(Unit *victim) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_SLAY1, m_creature); break; + case 1: DoScriptText(SAY_SLAY2, m_creature); break; + case 2: DoScriptText(SAY_SLAY3, m_creature); break; + } + } + + void JustDied(Unit *victim) + { + DoScriptText(SAY_DEATH, m_creature); + + AxesCleanup(); + ClearWeapons(); + InfernalCleanup(); + positions.clear(); + + for(int i = 0; i < TOTAL_INFERNAL_POINTS; ++i) + positions.push_back(&InfernalPoints[i]); + } + + void Aggro(Unit *who) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void InfernalCleanup() + { + //Infernal Cleanup + for(std::vector::iterator itr = infernals.begin(); itr!= infernals.end(); ++itr) + { + Unit *pInfernal = Unit::GetUnit(*m_creature, *itr); + if (pInfernal && pInfernal->isAlive()) + { + pInfernal->SetVisibility(VISIBILITY_OFF); + pInfernal->setDeathState(JUST_DIED); + } + } + infernals.clear(); + } + + void AxesCleanup() + { + for(int i=0; i<2;++i) + { + Unit *axe = Unit::GetUnit(*m_creature, axes[i]); + if (axe && axe->isAlive()) + axe->DealDamage(axe, axe->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + axes[i] = 0; + } + } + + void ClearWeapons() + { + SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_UNEQUIP, EQUIP_NO_CHANGE); + + //damage + const CreatureInfo *cinfo = m_creature->GetCreatureInfo(); + m_creature->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, cinfo->mindmg); + m_creature->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, cinfo->maxdmg); + m_creature->UpdateDamagePhysical(BASE_ATTACK); + } + + void EnfeebleHealthEffect() + { + const SpellEntry *info = GetSpellStore()->LookupEntry(SPELL_ENFEEBLE_EFFECT); + if (!info) + return; + + std::list t_list = m_creature->getThreatManager().getThreatList(); + std::vector targets; + + if (!t_list.size()) + return; + + //begin + 1 , so we don't target the one with the highest threat + std::list::iterator itr = t_list.begin(); + std::advance(itr, 1); + for(; itr!= t_list.end(); ++itr) //store the threat list in a different container + { + Unit *target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()); + //only on alive players + if (target && target->isAlive() && target->GetTypeId() == TYPEID_PLAYER) + targets.push_back(target); + } + + //cut down to size if we have more than 5 targets + while(targets.size() > 5) + targets.erase(targets.begin()+rand()%targets.size()); + + int i = 0; + for(std::vector::iterator iter = targets.begin(); iter!= targets.end(); ++iter, ++i) + { + Unit *target = *iter; + if (target) + { + enfeeble_targets[i] = target->GetGUID(); + enfeeble_health[i] = target->GetHealth(); + + target->CastSpell(target, SPELL_ENFEEBLE, true, 0, 0, m_creature->GetGUID()); + target->SetHealth(1); + } + } + + } + + void EnfeebleResetHealth() + { + for(int i = 0; i < 5; ++i) + { + Unit *target = Unit::GetUnit(*m_creature, enfeeble_targets[i]); + if (target && target->isAlive()) + target->SetHealth(enfeeble_health[i]); + enfeeble_targets[i] = 0; + enfeeble_health[i] = 0; + } + } + + void SummonInfernal(const uint32 diff) + { + InfernalPoint *point = NULL; + float posX,posY,posZ; + if ((m_creature->GetMapId() != 532) || positions.empty()) + { + m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 60, posX, posY, posZ); + } + else + { + std::vector::iterator itr = positions.begin()+rand()%positions.size(); + point = *itr; + positions.erase(itr); + + posX = point->x; + posY = point->y; + posZ = INFERNAL_Z; + } + + Creature *Infernal = m_creature->SummonCreature(NETHERSPITE_INFERNAL, posX, posY, posZ, 0, TEMPSUMMON_TIMED_DESPAWN, 180000); + + if (Infernal) + { + Infernal->SetDisplayId(INFERNAL_MODEL_INVISIBLE); + Infernal->setFaction(m_creature->getFaction()); + if (point) + ((netherspite_infernalAI*)Infernal->AI())->point=point; + ((netherspite_infernalAI*)Infernal->AI())->malchezaar=m_creature->GetGUID(); + + infernals.push_back(Infernal->GetGUID()); + DoCast(Infernal, SPELL_INFERNAL_RELAY); + } + + DoScriptText(urand(0, 1) ? SAY_SUMMON1 : SAY_SUMMON2, m_creature); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (EnfeebleResetTimer) + { + if (EnfeebleResetTimer <= diff) //Let's not forget to reset that + { + EnfeebleResetHealth(); + EnfeebleResetTimer=0; + } else EnfeebleResetTimer -= diff; + } + + if (m_creature->hasUnitState(UNIT_STAT_STUNNED)) //While shifting to phase 2 malchezaar stuns himself + return; + + if (m_creature->GetUInt64Value(UNIT_FIELD_TARGET)!=m_creature->getVictim()->GetGUID()) + m_creature->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->getVictim()->GetGUID()); + + if (phase == 1) + { + if ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() < 60) + { + m_creature->InterruptNonMeleeSpells(false); + + phase = 2; + + //animation + DoCast(m_creature, SPELL_EQUIP_AXES); + + //text + DoScriptText(SAY_AXE_TOSS1, m_creature); + + //passive thrash aura + m_creature->CastSpell(m_creature, SPELL_THRASH_AURA, true); + + //models + SetEquipmentSlots(false, EQUIP_ID_AXE, EQUIP_ID_AXE, EQUIP_NO_CHANGE); + + //damage + const CreatureInfo *cinfo = m_creature->GetCreatureInfo(); + m_creature->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, 2*cinfo->mindmg); + m_creature->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, 2*cinfo->maxdmg); + m_creature->UpdateDamagePhysical(BASE_ATTACK); + + m_creature->SetBaseWeaponDamage(OFF_ATTACK, MINDAMAGE, cinfo->mindmg); + m_creature->SetBaseWeaponDamage(OFF_ATTACK, MAXDAMAGE, cinfo->maxdmg); + //Sigh, updating only works on main attack , do it manually .... + m_creature->SetFloatValue(UNIT_FIELD_MINOFFHANDDAMAGE, cinfo->mindmg); + m_creature->SetFloatValue(UNIT_FIELD_MAXOFFHANDDAMAGE, cinfo->maxdmg); + + m_creature->SetAttackTime(OFF_ATTACK, (m_creature->GetAttackTime(BASE_ATTACK)*150)/100); + } + } + else if (phase == 2) + { + if ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() < 30) + { + InfernalTimer = 15000; + + phase = 3; + + ClearWeapons(); + + //remove thrash + m_creature->RemoveAurasDueToSpell(SPELL_THRASH_AURA); + + DoScriptText(SAY_AXE_TOSS2, m_creature); + + Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + for(uint32 i=0; i<2; ++i) + { + Creature *axe = m_creature->SummonCreature(MALCHEZARS_AXE, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000); + if (axe) + { + axe->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + axe->setFaction(m_creature->getFaction()); + + axes[i] = axe->GetGUID(); + if (target) + { + axe->AI()->AttackStart(target); + // axe->getThreatManager().tauntApply(target); //Taunt Apply and fade out does not work properly + // So we'll use a hack to add a lot of threat to our target + axe->AddThreat(target, 10000000.0f); + } + } + } + + if (ShadowNovaTimer > 35000) + ShadowNovaTimer = EnfeebleTimer + 5000; + + return; + } + + if (SunderArmorTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_SUNDER_ARMOR); + SunderArmorTimer = urand(10000, 18000); + + }else SunderArmorTimer -= diff; + + if (Cleave_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_CLEAVE); + Cleave_Timer = urand(6000, 12000); + + }else Cleave_Timer -= diff; + } + else + { + if (AxesTargetSwitchTimer < diff) + { + AxesTargetSwitchTimer = urand(7500, 20000); + + Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + if (target) + { + for(int i = 0; i < 2; ++i) + { + Unit *axe = Unit::GetUnit(*m_creature, axes[i]); + if (axe) + { + float threat = 1000000.0f; + if (axe->getVictim() && m_creature->getThreatManager().getThreat(axe->getVictim())) + { + threat = axe->getThreatManager().getThreat(axe->getVictim()); + axe->getThreatManager().modifyThreatPercent(axe->getVictim(), -100); + } + if (target) + axe->AddThreat(target, threat); + //axe->getThreatManager().tauntFadeOut(axe->getVictim()); + //axe->getThreatManager().tauntApply(target); + } + } + } + } else AxesTargetSwitchTimer -= diff; + + if (AmplifyDamageTimer < diff) + { + DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_AMPLIFY_DAMAGE); + AmplifyDamageTimer = urand(20000, 30000); + }else AmplifyDamageTimer -= diff; + } + + //Time for global and double timers + if (InfernalTimer < diff) + { + SummonInfernal(diff); + InfernalTimer = phase == 3 ? 14500 : 44500; //15 secs in phase 3, 45 otherwise + }else InfernalTimer -= diff; + + if (ShadowNovaTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_SHADOWNOVA); + ShadowNovaTimer = phase == 3 ? 31000 : -1; + } else ShadowNovaTimer -= diff; + + if (phase != 2) + { + if (SWPainTimer < diff) + { + Unit* target = NULL; + if (phase == 1) + target = m_creature->getVictim(); // the tank + else //anyone but the tank + target = SelectUnit(SELECT_TARGET_RANDOM, 1); + + if (target) + DoCast(target, SPELL_SW_PAIN); + + SWPainTimer = 20000; + }else SWPainTimer -= diff; + } + + if (phase != 3) + { + if (EnfeebleTimer < diff) + { + EnfeebleHealthEffect(); + EnfeebleTimer = 30000; + ShadowNovaTimer = 5000; + EnfeebleResetTimer = 9000; + }else EnfeebleTimer -= diff; + } + + if (phase==2) + DoMeleeAttacksIfReady(); + else + DoMeleeAttackIfReady(); + } + + void DoMeleeAttacksIfReady() + { + if (m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE) && !m_creature->IsNonMeleeSpellCasted(false)) + { + //Check for base attack + if (m_creature->isAttackReady() && m_creature->getVictim()) + { + m_creature->AttackerStateUpdate(m_creature->getVictim()); + m_creature->resetAttackTimer(); + } + //Check for offhand attack + if (m_creature->isAttackReady(OFF_ATTACK) && m_creature->getVictim()) + { + m_creature->AttackerStateUpdate(m_creature->getVictim(), OFF_ATTACK); + m_creature->resetAttackTimer(OFF_ATTACK); + } + } + } + + void Cleanup(Creature *infernal, InfernalPoint *point) + { + for(std::vector::iterator itr = infernals.begin(); itr!= infernals.end(); ++itr) + if (*itr == infernal->GetGUID()) + { + infernals.erase(itr); + break; + } + + positions.push_back(point); + } +}; + +void netherspite_infernalAI::Cleanup() +{ + Unit *pMalchezaar = Unit::GetUnit(*m_creature, malchezaar); + + if (pMalchezaar && pMalchezaar->isAlive()) + ((boss_malchezaarAI*)((Creature*)pMalchezaar)->AI())->Cleanup(m_creature, point); +} + +CreatureAI* GetAI_netherspite_infernal(Creature* pCreature) +{ + return new netherspite_infernalAI(pCreature); +} + +CreatureAI* GetAI_boss_malchezaar(Creature* pCreature) +{ + return new boss_malchezaarAI(pCreature); +} + +void AddSC_netherspite_infernal() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "netherspite_infernal"; + newscript->GetAI = &GetAI_netherspite_infernal; + newscript->RegisterSelf(); +} + +void AddSC_boss_malchezaar() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_malchezaar"; + newscript->GetAI = &GetAI_boss_malchezaar; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp b/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp new file mode 100644 index 000000000..bf1ef3629 --- /dev/null +++ b/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp @@ -0,0 +1,591 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Shade_of_Aran +SD%Complete: 95 +SDComment: Flame wreath missing cast animation, mods won't triggere. +SDCategory: Karazhan +EndScriptData */ + +#include "precompiled.h" +#include "simple_ai.h" +#include "karazhan.h" +#include "GameObject.h" + +enum +{ + SAY_AGGRO1 = -1532073, + SAY_AGGRO2 = -1532074, + SAY_AGGRO3 = -1532075, + SAY_FLAMEWREATH1 = -1532076, + SAY_FLAMEWREATH2 = -1532077, + SAY_BLIZZARD1 = -1532078, + SAY_BLIZZARD2 = -1532079, + SAY_EXPLOSION1 = -1532080, + SAY_EXPLOSION2 = -1532081, + SAY_DRINK = -1532082, //Low Mana / AoE Pyroblast + SAY_ELEMENTALS = -1532083, + SAY_KILL1 = -1532084, + SAY_KILL2 = -1532085, + SAY_TIMEOVER = -1532086, + SAY_DEATH = -1532087, + SAY_ATIESH = -1532088, //Atiesh is equipped by a raid member + + //Spells + SPELL_FROSTBOLT = 29954, + SPELL_FIREBALL = 29953, + SPELL_ARCMISSLE = 29955, + SPELL_CHAINSOFICE = 29991, + SPELL_DRAGONSBREATH = 29964, + SPELL_MASSSLOW = 30035, + SPELL_FLAME_WREATH = 29946, + SPELL_AOE_CS = 29961, + SPELL_PLAYERPULL = 32265, + SPELL_AEXPLOSION = 29973, + SPELL_MASS_POLY = 29963, + SPELL_BLINK_CENTER = 29967, + SPELL_ELEMENTALS = 29962, + SPELL_CONJURE = 29975, + SPELL_DRINK = 30024, + SPELL_POTION = 32453, + SPELL_AOE_PYROBLAST = 29978, + + SPELL_EXPLOSION = 20476, + SPELL_KNOCKBACK_500 = 11027, + + //Creature Spells + SPELL_CIRCULAR_BLIZZARD = 29951, //29952 is the REAL circular blizzard that leaves persistant blizzards that last for 10 seconds + SPELL_WATERBOLT = 31012, + SPELL_SHADOW_PYRO = 29978, + + //Creatures + NPC_WATER_ELEMENTAL = 17167, + NPC_SHADOW_OF_ARAN = 18254, + NPC_ARAN_BLIZZARD = 17161 +}; + +enum SuperSpell +{ + SUPER_FLAME = 0, + SUPER_BLIZZARD, + SUPER_AE, +}; + +struct MANGOS_DLL_DECL boss_aranAI : public ScriptedAI +{ + boss_aranAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 m_uiSecondarySpell_Timer; + uint32 m_uiNormalCast_Timer; + uint32 m_uiSuperCast_Timer; + uint32 m_uiBerserk_Timer; + uint32 m_uiCloseDoor_Timer; // Don't close the door right on aggro in case some people are still entering. + + uint8 m_uiLastSuperSpell; + + uint32 m_uiFlameWreath_Timer; + uint32 m_uiFlameWreathCheck_Timer; + uint64 m_uiFlameWreathTarget[3]; + float m_fFWTargPosX[3]; + float m_fFWTargPosY[3]; + + uint32 m_uiCurrentNormalSpell; + uint32 m_uiArcaneCooldown; + uint32 m_uiFireCooldown; + uint32 m_uiFrostCooldown; + + uint32 m_uiDrinkInturrupt_Timer; + + bool m_bElementalsSpawned; + bool m_bDrinking; + bool m_bDrinkInturrupted; + + void Reset() + { + m_uiSecondarySpell_Timer = 5000; + m_uiNormalCast_Timer = 0; + m_uiSuperCast_Timer = 35000; + m_uiBerserk_Timer = 720000; + m_uiCloseDoor_Timer = 15000; + + m_uiLastSuperSpell = urand(0, 2); + + m_uiFlameWreath_Timer = 0; + m_uiFlameWreathCheck_Timer = 0; + + m_uiCurrentNormalSpell = 0; + m_uiArcaneCooldown = 0; + m_uiFireCooldown = 0; + m_uiFrostCooldown = 0; + + m_uiDrinkInturrupt_Timer = 10000; + + m_bElementalsSpawned = false; + m_bDrinking = false; + m_bDrinkInturrupted = false; + + if (m_pInstance) + { + // Not in progress + m_pInstance->SetData(TYPE_ARAN, NOT_STARTED); + + if (GameObject* pDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GO_LIBRARY_DOOR))) + pDoor->SetGoState(GO_STATE_ACTIVE); + } + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(urand(0, 1) ? SAY_KILL1 : SAY_KILL2, m_creature); + } + + void JustDied(Unit* pVictim) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + { + m_pInstance->SetData(TYPE_ARAN, DONE); + + if (GameObject* pDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GO_LIBRARY_DOOR))) + pDoor->SetGoState(GO_STATE_ACTIVE); + } + } + + void Aggro(Unit* pWho) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_AGGRO1, m_creature); break; + case 1: DoScriptText(SAY_AGGRO2, m_creature); break; + case 2: DoScriptText(SAY_AGGRO3, m_creature); break; + } + + if (m_pInstance) + m_pInstance->SetData(TYPE_ARAN, IN_PROGRESS); + } + + void FlameWreathEffect() + { + std::vector targets; + std::list t_list = m_creature->getThreatManager().getThreatList(); + + if (!t_list.size()) + return; + + //store the threat list in a different container + for(std::list::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) + { + Unit* pTarget = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()); + //only on alive players + if (pTarget && pTarget->isAlive() && pTarget->GetTypeId() == TYPEID_PLAYER) + targets.push_back(pTarget); + } + + //cut down to size if we have more than 3 targets + while(targets.size() > 3) + targets.erase(targets.begin()+rand()%targets.size()); + + uint32 i = 0; + for(std::vector::iterator itr = targets.begin(); itr!= targets.end(); ++itr) + { + if (*itr) + { + m_uiFlameWreathTarget[i] = (*itr)->GetGUID(); + m_fFWTargPosX[i] = (*itr)->GetPositionX(); + m_fFWTargPosY[i] = (*itr)->GetPositionY(); + m_creature->CastSpell((*itr), SPELL_FLAME_WREATH, true); + ++i; + } + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiCloseDoor_Timer) + { + if (m_uiCloseDoor_Timer <= uiDiff) + { + if (m_pInstance) + { + if (GameObject* pDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GO_LIBRARY_DOOR))) + pDoor->SetGoState(GO_STATE_READY); + + m_uiCloseDoor_Timer = 0; + } + } + else + m_uiCloseDoor_Timer -= uiDiff; + } + + //Cooldowns for casts + if (m_uiArcaneCooldown) + { + if (m_uiArcaneCooldown >= uiDiff) + m_uiArcaneCooldown -= uiDiff; + else + m_uiArcaneCooldown = 0; + } + + if (m_uiFireCooldown) + { + if (m_uiFireCooldown >= uiDiff) + m_uiFireCooldown -= uiDiff; + else + m_uiFireCooldown = 0; + } + + if (m_uiFrostCooldown) + { + if (m_uiFrostCooldown >= uiDiff) + m_uiFrostCooldown -= uiDiff; + else + m_uiFrostCooldown = 0; + } + + if (!m_bDrinking && m_creature->GetMaxPower(POWER_MANA) && (m_creature->GetPower(POWER_MANA)*100 / m_creature->GetMaxPower(POWER_MANA)) < 20) + { + m_bDrinking = true; + m_creature->InterruptNonMeleeSpells(false); + + DoScriptText(SAY_DRINK, m_creature); + + if (!m_bDrinkInturrupted) + { + m_creature->CastSpell(m_creature, SPELL_MASS_POLY, true); + m_creature->CastSpell(m_creature, SPELL_CONJURE, false); + m_creature->CastSpell(m_creature, SPELL_DRINK, false); + m_creature->SetStandState(UNIT_STAND_STATE_SIT); + m_uiDrinkInturrupt_Timer = 10000; + } + } + + //Drink Inturrupt + if (m_bDrinking && m_bDrinkInturrupted) + { + m_bDrinking = false; + m_creature->RemoveAurasDueToSpell(SPELL_DRINK); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_creature->SetPower(POWER_MANA, m_creature->GetMaxPower(POWER_MANA)-32000); + m_creature->CastSpell(m_creature, SPELL_POTION, false); + } + + //Drink Inturrupt Timer + if (m_bDrinking && !m_bDrinkInturrupted) + { + if (m_uiDrinkInturrupt_Timer >= uiDiff) + m_uiDrinkInturrupt_Timer -= uiDiff; + else + { + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_creature->CastSpell(m_creature, SPELL_POTION, true); + m_creature->CastSpell(m_creature, SPELL_AOE_PYROBLAST, false); + m_bDrinkInturrupted = true; + m_bDrinking = false; + } + } + + //Don't execute any more code if we are drinking + if (m_bDrinking) + return; + + //Normal casts + if (m_uiNormalCast_Timer < uiDiff) + { + if (!m_creature->IsNonMeleeSpellCasted(false)) + { + Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); + if (!pTarget) + return; + + uint32 auiSpells[3]; + uint8 uiAvailableSpells = 0; + + //Check for what spells are not on cooldown + if (!m_uiArcaneCooldown) + auiSpells[uiAvailableSpells++] = SPELL_ARCMISSLE; + if (!m_uiFireCooldown) + auiSpells[uiAvailableSpells++] = SPELL_FIREBALL; + if (!m_uiFrostCooldown) + auiSpells[uiAvailableSpells++] = SPELL_FROSTBOLT; + + //If no available spells wait 1 second and try again + if (uiAvailableSpells) + { + m_uiCurrentNormalSpell = auiSpells[rand() % uiAvailableSpells]; + DoCast(pTarget, m_uiCurrentNormalSpell); + } + } + m_uiNormalCast_Timer = 1000; + } + else + m_uiNormalCast_Timer -= uiDiff; + + if (m_uiSecondarySpell_Timer < uiDiff) + { + switch(urand(0, 1)) + { + case 0: + DoCast(m_creature, SPELL_AOE_CS); + break; + case 1: + if (Unit* pUnit = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pUnit, SPELL_CHAINSOFICE); + break; + } + m_uiSecondarySpell_Timer = urand(5000, 20000); + } + else + m_uiSecondarySpell_Timer -= uiDiff; + + if (m_uiSuperCast_Timer < uiDiff) + { + uint8 auiAvailable[2]; + + switch (m_uiLastSuperSpell) + { + case SUPER_AE: + auiAvailable[0] = SUPER_FLAME; + auiAvailable[1] = SUPER_BLIZZARD; + break; + case SUPER_FLAME: + auiAvailable[0] = SUPER_AE; + auiAvailable[1] = SUPER_BLIZZARD; + break; + case SUPER_BLIZZARD: + auiAvailable[0] = SUPER_FLAME; + auiAvailable[1] = SUPER_AE; + break; + } + + m_uiLastSuperSpell = auiAvailable[urand(0, 2)]; + + switch (m_uiLastSuperSpell) + { + case SUPER_AE: + DoScriptText(urand(0, 1) ? SAY_EXPLOSION1 : SAY_EXPLOSION2, m_creature); + + m_creature->CastSpell(m_creature, SPELL_BLINK_CENTER, true); + m_creature->CastSpell(m_creature, SPELL_PLAYERPULL, true); + m_creature->CastSpell(m_creature, SPELL_MASSSLOW, true); + m_creature->CastSpell(m_creature, SPELL_AEXPLOSION, false); + break; + + case SUPER_FLAME: + DoScriptText(urand(0, 1) ? SAY_FLAMEWREATH1 : SAY_FLAMEWREATH2, m_creature); + + m_uiFlameWreath_Timer = 20000; + m_uiFlameWreathCheck_Timer = 500; + + memset(&m_uiFlameWreathTarget, 0, sizeof(m_uiFlameWreathTarget)); + + FlameWreathEffect(); + break; + + case SUPER_BLIZZARD: + DoScriptText(urand(0, 1) ? SAY_BLIZZARD1 : SAY_BLIZZARD2, m_creature); + + if (Creature* pSpawn = m_creature->SummonCreature(NPC_ARAN_BLIZZARD, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 25000)) + { + pSpawn->setFaction(m_creature->getFaction()); + pSpawn->CastSpell(pSpawn, SPELL_CIRCULAR_BLIZZARD, false); + } + break; + } + + m_uiSuperCast_Timer = urand(35000, 40000); + } + else + m_uiSuperCast_Timer -= uiDiff; + + if (!m_bElementalsSpawned && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 40) + { + m_bElementalsSpawned = true; + + for (uint32 i = 0; i < 4; ++i) + { + if (Creature* pUnit = m_creature->SummonCreature(NPC_WATER_ELEMENTAL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 90000)) + { + pUnit->Attack(m_creature->getVictim(), true); + pUnit->setFaction(m_creature->getFaction()); + } + } + + DoScriptText(SAY_ELEMENTALS, m_creature); + } + + if (m_uiBerserk_Timer < uiDiff) + { + for (uint32 i = 0; i < 5; ++i) + { + if (Creature* pUnit = m_creature->SummonCreature(NPC_SHADOW_OF_ARAN, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) + { + pUnit->Attack(m_creature->getVictim(), true); + pUnit->setFaction(m_creature->getFaction()); + } + } + + DoScriptText(SAY_TIMEOVER, m_creature); + + m_uiBerserk_Timer = 60000; + } + else + m_uiBerserk_Timer -= uiDiff; + + //Flame Wreath check + if (m_uiFlameWreath_Timer) + { + if (m_uiFlameWreath_Timer >= uiDiff) + m_uiFlameWreath_Timer -= uiDiff; + else + m_uiFlameWreath_Timer = 0; + + if (m_uiFlameWreathCheck_Timer < uiDiff) + { + for (uint32 i = 0; i < 3; ++i) + { + if (!m_uiFlameWreathTarget[i]) + continue; + + Unit* pUnit = Unit::GetUnit(*m_creature, m_uiFlameWreathTarget[i]); + if (pUnit && !pUnit->IsWithinDist2d(m_fFWTargPosX[i], m_fFWTargPosY[i], 3.0f)) + { + pUnit->CastSpell(pUnit, SPELL_EXPLOSION, true, 0, 0, m_creature->GetGUID()); + pUnit->CastSpell(pUnit, SPELL_KNOCKBACK_500, true); + m_uiFlameWreathTarget[i] = 0; + } + } + m_uiFlameWreathCheck_Timer = 500; + } + else + m_uiFlameWreathCheck_Timer -= uiDiff; + } + + if (m_uiArcaneCooldown && m_uiFireCooldown && m_uiFrostCooldown) + DoMeleeAttackIfReady(); + } + + void DamageTaken(Unit* pAttacker, uint32 &damage) + { + if (!m_bDrinkInturrupted && m_bDrinking && damage) + m_bDrinkInturrupted = true; + } + + void SpellHit(Unit* pAttacker, const SpellEntry* Spell) + { + //We only care about inturrupt effects and only if they are durring a spell currently being casted + if ((Spell->Effect[0]!=SPELL_EFFECT_INTERRUPT_CAST && + Spell->Effect[1]!=SPELL_EFFECT_INTERRUPT_CAST && + Spell->Effect[2]!=SPELL_EFFECT_INTERRUPT_CAST) || !m_creature->IsNonMeleeSpellCasted(false)) + return; + + //Inturrupt effect + m_creature->InterruptNonMeleeSpells(false); + + //Normally we would set the cooldown equal to the spell duration + //but we do not have access to the DurationStore + + switch (m_uiCurrentNormalSpell) + { + case SPELL_ARCMISSLE: m_uiArcaneCooldown = 5000; break; + case SPELL_FIREBALL: m_uiFireCooldown = 5000; break; + case SPELL_FROSTBOLT: m_uiFrostCooldown = 5000; break; + } + } +}; + +struct MANGOS_DLL_DECL water_elementalAI : public ScriptedAI +{ + water_elementalAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 m_uiCast_Timer; + + void Reset() + { + m_uiCast_Timer = urand(2000, 5000); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiCast_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_WATERBOLT); + m_uiCast_Timer = urand(2000, 5000); + } + else + m_uiCast_Timer -= uiDiff; + } +}; + +CreatureAI* GetAI_boss_aran(Creature* pCreature) +{ + return new boss_aranAI(pCreature); +} + +CreatureAI* GetAI_water_elemental(Creature* pCreature) +{ + return new water_elementalAI(pCreature); +} + +// CONVERT TO ACID +CreatureAI* GetAI_shadow_of_aran(Creature* pCreature) +{ + outstring_log("SD2: Convert simpleAI script for Creature Entry %u to ACID", pCreature->GetEntry()); + SimpleAI* pAI = new SimpleAI(pCreature); + + pAI->Spell[0].Enabled = true; + pAI->Spell[0].Spell_Id = SPELL_SHADOW_PYRO; + pAI->Spell[0].Cooldown = 5000; + pAI->Spell[0].First_Cast = 1000; + pAI->Spell[0].Cast_Target_Type = CAST_HOSTILE_TARGET; + + pAI->EnterEvadeMode(); + + return pAI; +} + +void AddSC_boss_shade_of_aran() +{ + Script* newscript; + + newscript = new Script; + newscript->Name = "boss_shade_of_aran"; + newscript->GetAI = &GetAI_boss_aran; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_shadow_of_aran"; + newscript->GetAI = &GetAI_shadow_of_aran; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_aran_elemental"; + newscript->GetAI = &GetAI_water_elemental; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp b/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp new file mode 100644 index 000000000..059b7131b --- /dev/null +++ b/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp @@ -0,0 +1,440 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Terestian_Illhoof +SD%Complete: 95 +SDComment: Complete! Needs adjustments to use spell though. +SDCategory: Karazhan +EndScriptData */ + +#include "precompiled.h" +#include "karazhan.h" + +enum +{ + SAY_SLAY1 = -1532065, + SAY_SLAY2 = -1532066, + SAY_DEATH = -1532067, + SAY_AGGRO = -1532068, + SAY_SACRIFICE1 = -1532069, + SAY_SACRIFICE2 = -1532070, + SAY_SUMMON1 = -1532071, + SAY_SUMMON2 = -1532072, + + SPELL_SUMMON_DEMONCHAINS = 30120, // Summons demonic chains that maintain the ritual of sacrifice. + SPELL_DEMON_CHAINS = 30206, // Instant - Visual Effect + SPELL_ENRAGE = 23537, // Increases the caster's attack speed by 50% and the Physical damage it deals by 219 to 281 for 10 min. + SPELL_SHADOW_BOLT = 30055, // Hurls a bolt of dark magic at an enemy, inflicting Shadow damage. + SPELL_SACRIFICE = 30115, // Teleports and adds the debuff + SPELL_BERSERK = 32965, // Increases attack speed by 75%. Periodically casts Shadow Bolt Volley. + + SPELL_SUMMON_IMP = 30066, // Summons Kil'rek + + SPELL_FIENDISH_PORTAL = 30171, // Opens portal and summons Fiendish Portal, 2 sec cast + SPELL_FIENDISH_PORTAL_1 = 30179, // Opens portal and summons Fiendish Portal, instant cast + + SPELL_FIREBOLT = 30050, // Blasts a target for 150 Fire damage. + + SPELL_BROKEN_PACT = 30065, // All damage taken increased by 25%. + SPELL_AMPLIFY_FLAMES = 30053, // Increases the Fire damage taken by an enemy by 500 for 25 sec. + + NPC_DEMONCHAINS = 17248, + NPC_FIENDISHIMP = 17267, + NPC_PORTAL = 17265 +}; + +const float PORTAL_Z = 179.434f; + +float afPortalLocations[2][2]= +{ + {-11249.6933f, -1704.61023f}, + {-11242.1160f, -1713.33325f} +}; + +struct MANGOS_DLL_DECL mob_kilrekAI : public ScriptedAI +{ + mob_kilrekAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint64 m_uiTerestianGUID; + uint32 m_uiAmplify_Timer; + + void Reset() + { + m_uiTerestianGUID = 0; + m_uiAmplify_Timer = 2000; + } + + void Aggro(Unit* pWho) + { + if (!m_pInstance) + { + ERROR_INST_DATA(m_creature); + return; + } + + Creature* pTerestian = ((Creature*)Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_TERESTIAN))); + if (pTerestian && (!pTerestian->SelectHostileTarget() && !pTerestian->getVictim())) + pTerestian->AddThreat(pWho, 1.0f); + } + + void JustDied(Unit* pKiller) + { + if (m_pInstance) + { + uint64 m_uiTerestianGUID = m_pInstance->GetData64(DATA_TERESTIAN); + if (m_uiTerestianGUID) + { + Unit* pTerestian = Unit::GetUnit((*m_creature), m_uiTerestianGUID); + if (pTerestian && pTerestian->isAlive()) + DoCast(pTerestian, SPELL_BROKEN_PACT, true); + } + } + else + ERROR_INST_DATA(m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiAmplify_Timer < uiDiff) + { + m_creature->InterruptNonMeleeSpells(false); + DoCast(m_creature->getVictim(), SPELL_AMPLIFY_FLAMES); + + m_uiAmplify_Timer = urand(10000, 20000); + } + else + m_uiAmplify_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +struct MANGOS_DLL_DECL mob_demon_chainAI : public ScriptedAI +{ + mob_demon_chainAI(Creature* pCreature) : ScriptedAI(pCreature) + { + Reset(); + } + + uint64 m_uiSacrificeGUID; + + void Reset() + { + m_uiSacrificeGUID = 0; + } + + void AttackStart(Unit* pWho) {} + void MoveInLineOfSight(Unit* pWho) {} + + void JustDied(Unit* pKiller) + { + if (m_uiSacrificeGUID) + if (Unit* pSacrifice = Unit::GetUnit((*m_creature), m_uiSacrificeGUID)) + pSacrifice->RemoveAurasDueToSpell(SPELL_SACRIFICE); + } +}; + +struct MANGOS_DLL_DECL boss_terestianAI : public ScriptedAI +{ + boss_terestianAI(Creature* pCreature) : ScriptedAI(pCreature) + { + memset(&m_uiPortalGUID, 0, sizeof(m_uiPortalGUID)); + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint64 m_uiKilrekGUID; + uint64 m_uiPortalGUID[2]; + + uint32 m_uiCheckKilrek_Timer; + uint32 m_uiSacrifice_Timer; + uint32 m_uiShadowbolt_Timer; + uint32 m_uiSummon_Timer; + uint32 m_uiBerserk_Timer; + + bool m_bReSummon; + bool m_bSummonKilrek; + bool m_bSummonedPortals; + bool m_bBerserk; + + void Reset() + { + for(uint8 i = 0; i < 2; ++i) + { + if (m_uiPortalGUID[i]) + { + if (Creature* pPortal = (Creature*)Unit::GetUnit(*m_creature, m_uiPortalGUID[i])) + pPortal->ForcedDespawn(); + + m_uiPortalGUID[i] = 0; + } + } + + m_uiCheckKilrek_Timer = 5000; + m_uiSacrifice_Timer = 30000; + m_uiShadowbolt_Timer = 5000; + m_uiSummon_Timer = 10000; + m_uiBerserk_Timer = 600000; + + m_bSummonedPortals = false; + m_bBerserk = false; + m_bReSummon = false; + + if (m_pInstance) + m_pInstance->SetData(TYPE_TERESTIAN, NOT_STARTED); + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + { + Creature* pKilrek = ((Creature*)Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_KILREK))); + + // Respawn Kil'rek on aggro if Kil'rek is dead. + if (pKilrek && !pKilrek->isAlive()) + pKilrek->Respawn(); + + // Put Kil'rek in combat against our target so players don't skip him + if (pKilrek && !pKilrek->getVictim()) + pKilrek->AddThreat(pWho, 0.0f); + + m_pInstance->SetData(TYPE_TERESTIAN, IN_PROGRESS); + } + else + ERROR_INST_DATA(m_creature); + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); + } + + void JustDied(Unit* pKiller) + { + for(uint8 i = 0; i < 2; ++i) + { + if (m_uiPortalGUID[i]) + { + if (Creature* pPortal = (Creature*)Unit::GetUnit(*m_creature, m_uiPortalGUID[i])) + pPortal->ForcedDespawn(); + + m_uiPortalGUID[i] = 0; + } + } + + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_TERESTIAN, DONE); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiCheckKilrek_Timer < uiDiff) + { + + m_uiCheckKilrek_Timer = 5000; + + if (m_pInstance) + uint64 m_uiKilrekGUID = m_pInstance->GetData64(DATA_KILREK); + else + ERROR_INST_DATA(m_creature); + + Creature* pKilrek = ((Creature*)Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_KILREK))); + if (m_bSummonKilrek && pKilrek) + { + pKilrek->Respawn(); + pKilrek->AI()->AttackStart(m_creature->getVictim()); + m_creature->RemoveAurasDueToSpell(SPELL_BROKEN_PACT); + + m_bSummonKilrek = false; + } + + if (!pKilrek || !pKilrek->isAlive()) + { + m_bSummonKilrek = true; + m_uiCheckKilrek_Timer = 45000; + } + } + else + m_uiCheckKilrek_Timer -= uiDiff; + + if (m_uiSacrifice_Timer < uiDiff) + { + Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1); + if (pTarget && pTarget->isAlive() && pTarget->GetTypeId() == TYPEID_PLAYER) + { + DoCast(pTarget, SPELL_SACRIFICE, true); + + Creature* pChains = m_creature->SummonCreature(NPC_DEMONCHAINS, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 21000); + if (pChains) + { + ((mob_demon_chainAI*)pChains->AI())->m_uiSacrificeGUID = pTarget->GetGUID(); + pChains->CastSpell(pChains, SPELL_DEMON_CHAINS, true); + + DoScriptText(urand(0, 1) ? SAY_SACRIFICE1 : SAY_SACRIFICE2, m_creature); + + m_uiSacrifice_Timer = 30000; + } + } + } + else + m_uiSacrifice_Timer -= uiDiff; + + if (m_uiShadowbolt_Timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_TOPAGGRO, 0)) + DoCast(pTarget, SPELL_SHADOW_BOLT); + + m_uiShadowbolt_Timer = 10000; + } + else + m_uiShadowbolt_Timer -= uiDiff; + + if (m_uiSummon_Timer < uiDiff) + { + if (!m_bSummonedPortals) + { + for(uint8 i = 0; i < 2; ++i) + { + if (Creature* pPortal = m_creature->SummonCreature(NPC_PORTAL, afPortalLocations[i][0], afPortalLocations[i][1], PORTAL_Z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0)) + m_uiPortalGUID[i] = pPortal->GetGUID(); + } + m_bSummonedPortals = true; + + DoScriptText(urand(0, 1) ? SAY_SUMMON1 : SAY_SUMMON2, m_creature); + } + uint32 uiRnd = urand(0, 1); + Creature* pImp = m_creature->SummonCreature(NPC_FIENDISHIMP, afPortalLocations[uiRnd][0], afPortalLocations[uiRnd][1], PORTAL_Z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 15000); + if (pImp) + { + pImp->AddThreat(m_creature->getVictim(), 1.0f); + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1)) + pImp->AI()->AttackStart(pTarget); + } + m_uiSummon_Timer = 5000; + } + else + m_uiSummon_Timer -= uiDiff; + + if (!m_bBerserk) + { + if (m_uiBerserk_Timer < uiDiff) + { + DoCast(m_creature, SPELL_BERSERK); + m_bBerserk = true; + } + else + m_uiBerserk_Timer -= uiDiff; + } + + DoMeleeAttackIfReady(); + } +}; + +struct MANGOS_DLL_DECL mob_karazhan_impAI : public ScriptedAI +{ + mob_karazhan_impAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 m_uiFirebolt_Timer; + + void Reset() + { + m_uiFirebolt_Timer = 2000; + + m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, true); + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiFirebolt_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_FIREBOLT); + m_uiFirebolt_Timer = 2200; + } + else + m_uiFirebolt_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_kilrek(Creature* pCreature) +{ + return new mob_kilrekAI(pCreature); +} + +CreatureAI* GetAI_mob_karazhan_imp(Creature* pCreature) +{ + return new mob_karazhan_impAI(pCreature); +} + +CreatureAI* GetAI_mob_demon_chain(Creature* pCreature) +{ + return new mob_demon_chainAI(pCreature); +} + +CreatureAI* GetAI_boss_terestian_illhoof(Creature* pCreature) +{ + return new boss_terestianAI(pCreature); +} + +void AddSC_boss_terestian_illhoof() +{ + Script* newscript; + + newscript = new Script; + newscript->Name = "boss_terestian_illhoof"; + newscript->GetAI = &GetAI_boss_terestian_illhoof; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_karazhan_imp"; + newscript->GetAI = &GetAI_mob_karazhan_imp; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_kilrek"; + newscript->GetAI = &GetAI_mob_kilrek; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_demon_chain"; + newscript->GetAI = &GetAI_mob_demon_chain; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp b/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp new file mode 100644 index 000000000..31390f76c --- /dev/null +++ b/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp @@ -0,0 +1,1513 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Bosses_Opera +SD%Complete: 90 +SDComment: Oz, Hood, and RAJ event implemented. RAJ event requires more testing. +SDCategory: Karazhan +EndScriptData */ + +#include "precompiled.h" +#include "karazhan.h" + +/***********************************/ +/*** OPERA WIZARD OF OZ EVENT *****/ +/*********************************/ + +#define SAY_DOROTHEE_DEATH -1532025 +#define SAY_DOROTHEE_SUMMON -1532026 +#define SAY_DOROTHEE_TITO_DEATH -1532027 +#define SAY_DOROTHEE_AGGRO -1532028 + +#define SAY_ROAR_AGGRO -1532029 +#define SAY_ROAR_DEATH -1532030 +#define SAY_ROAR_SLAY -1532031 + +#define SAY_STRAWMAN_AGGRO -1532032 +#define SAY_STRAWMAN_DEATH -1532033 +#define SAY_STRAWMAN_SLAY -1532034 + +#define SAY_TINHEAD_AGGRO -1532035 +#define SAY_TINHEAD_DEATH -1532036 +#define SAY_TINHEAD_SLAY -1532037 +#define EMOTE_RUST -1532038 + +#define SAY_CRONE_AGGRO -1532039 +#define SAY_CRONE_AGGRO2 -1532040 +#define SAY_CRONE_DEATH -1532041 +#define SAY_CRONE_SLAY -1532042 + +/**** Spells ****/ +// Dorothee +#define SPELL_WATERBOLT 31012 +#define SPELL_SCREAM 31013 +#define SPELL_SUMMONTITO 31014 + +// Tito +#define SPELL_YIPPING 31015 + +// Strawman +#define SPELL_BRAIN_BASH 31046 +#define SPELL_BRAIN_WIPE 31069 +#define SPELL_BURNING_STRAW 31075 + +// Tinhead +#define SPELL_CLEAVE 31043 +#define SPELL_RUST 31086 + +// Roar +#define SPELL_MANGLE 31041 +#define SPELL_SHRED 31042 +#define SPELL_FRIGHTENED_SCREAM 31013 + +// Crone +#define SPELL_CHAIN_LIGHTNING 32337 + +// Cyclone +#define SPELL_KNOCKBACK 32334 +#define SPELL_CYCLONE_VISUAL 32332 + +/** Creature Entries **/ +#define CREATURE_TITO 17548 +#define CREATURE_CYCLONE 18412 +#define CREATURE_CRONE 18168 + +void SummonCroneIfReady(ScriptedInstance* pInstance, Creature* pCreature) +{ + pInstance->SetData(DATA_OPERA_OZ_DEATHCOUNT, SPECIAL); // Increment DeathCount + + if (pInstance->GetData(DATA_OPERA_OZ_DEATHCOUNT) == 4) + { + if (Creature* pCrone = pCreature->SummonCreature(CREATURE_CRONE, -10891.96, -1755.95, pCreature->GetPositionZ(), 4.64, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILISECONDS)) + { + if (pCreature->getVictim()) + pCrone->AI()->AttackStart(pCreature->getVictim()); + } + } +}; + +struct MANGOS_DLL_DECL boss_dorotheeAI : public ScriptedAI +{ + boss_dorotheeAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 AggroTimer; + + uint32 WaterBoltTimer; + uint32 FearTimer; + uint32 SummonTitoTimer; + + bool SummonedTito; + bool TitoDied; + + void Reset() + { + AggroTimer = 500; + + WaterBoltTimer = 5000; + FearTimer = 15000; + SummonTitoTimer = 47500; + + SummonedTito = false; + TitoDied = false; + } + + void Aggro(Unit* who) + { + DoScriptText(SAY_DOROTHEE_AGGRO, m_creature); + } + + void JustReachedHome() + { + m_creature->ForcedDespawn(); + } + + void SummonTito(); // See below + + void JustDied(Unit* killer) + { + DoScriptText(SAY_DOROTHEE_DEATH, m_creature); + + if (m_pInstance) + SummonCroneIfReady(m_pInstance, m_creature); + } + + void AttackStart(Unit* who) + { + if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + return; + + ScriptedAI::AttackStart(who); + } + + void MoveInLineOfSight(Unit* who) + { + if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + return; + + ScriptedAI::MoveInLineOfSight(who); + } + + void UpdateAI(const uint32 diff) + { + if (AggroTimer) + { + if (AggroTimer <= diff) + { + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + AggroTimer = 0; + }else AggroTimer -= diff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (WaterBoltTimer < diff) + { + DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_WATERBOLT); + WaterBoltTimer = TitoDied ? 1500 : 5000; + }else WaterBoltTimer -= diff; + + if (FearTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_SCREAM); + FearTimer = 30000; + }else FearTimer -= diff; + + if (!SummonedTito) + { + if (SummonTitoTimer < diff) + SummonTito(); + else SummonTitoTimer -= diff; + } + + DoMeleeAttackIfReady(); + } +}; + +struct MANGOS_DLL_DECL mob_titoAI : public ScriptedAI +{ + mob_titoAI(Creature* pCreature) : ScriptedAI(pCreature) + { + Reset(); + } + + uint64 DorotheeGUID; + uint32 YipTimer; + + void Reset() + { + DorotheeGUID = 0; + YipTimer = 10000; + } + + void JustDied(Unit* killer) + { + if (DorotheeGUID) + { + Creature* Dorothee = ((Creature*)Unit::GetUnit((*m_creature), DorotheeGUID)); + if (Dorothee && Dorothee->isAlive()) + { + ((boss_dorotheeAI*)Dorothee->AI())->TitoDied = true; + DoScriptText(SAY_DOROTHEE_TITO_DEATH, Dorothee); + } + } + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (YipTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_YIPPING); + YipTimer = 10000; + }else YipTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +void boss_dorotheeAI::SummonTito() +{ + if (Creature* pTito = m_creature->SummonCreature(CREATURE_TITO, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000)) + { + DoScriptText(SAY_DOROTHEE_SUMMON, m_creature); + + ((mob_titoAI*)pTito->AI())->DorotheeGUID = m_creature->GetGUID(); + pTito->AI()->AttackStart(m_creature->getVictim()); + + SummonedTito = true; + TitoDied = false; + } +} + +struct MANGOS_DLL_DECL boss_strawmanAI : public ScriptedAI +{ + boss_strawmanAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 AggroTimer; + uint32 BrainBashTimer; + uint32 BrainWipeTimer; + + void Reset() + { + AggroTimer = 13000; + BrainBashTimer = 5000; + BrainWipeTimer = 7000; + } + + void AttackStart(Unit* who) + { + if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + return; + + ScriptedAI::AttackStart(who); + } + + void MoveInLineOfSight(Unit* who) + { + if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + return; + + ScriptedAI::MoveInLineOfSight(who); + } + + void Aggro(Unit* who) + { + DoScriptText(SAY_STRAWMAN_AGGRO, m_creature); + } + + void JustReachedHome() + { + m_creature->ForcedDespawn(); + } + + void SpellHit(Unit* caster, const SpellEntry *Spell) + { + if ((Spell->SchoolMask == SPELL_SCHOOL_MASK_FIRE) && !urand(0, 1)) + { + /* + if (not direct damage(aoe,dot)) + return; + */ + + DoCast(m_creature, SPELL_BURNING_STRAW, true); + } + } + + void JustDied(Unit* killer) + { + DoScriptText(SAY_STRAWMAN_DEATH, m_creature); + + if (m_pInstance) + SummonCroneIfReady(m_pInstance, m_creature); + } + + void KilledUnit(Unit* victim) + { + DoScriptText(SAY_STRAWMAN_SLAY, m_creature); + } + + void UpdateAI(const uint32 diff) + { + if (AggroTimer) + { + if (AggroTimer <= diff) + { + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + AggroTimer = 0; + }else AggroTimer -= diff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (BrainBashTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_BRAIN_BASH); + BrainBashTimer = 15000; + }else BrainBashTimer -= diff; + + if (BrainWipeTimer < diff) + { + DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_BRAIN_WIPE); + BrainWipeTimer = 20000; + }else BrainWipeTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +struct MANGOS_DLL_DECL boss_tinheadAI : public ScriptedAI +{ + boss_tinheadAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 AggroTimer; + uint32 CleaveTimer; + uint32 RustTimer; + + uint8 RustCount; + + void Reset() + { + AggroTimer = 15000; + CleaveTimer = 5000; + RustTimer = 30000; + + RustCount = 0; + } + + void Aggro(Unit* who) + { + DoScriptText(SAY_TINHEAD_AGGRO, m_creature); + } + + void JustReachedHome() + { + m_creature->ForcedDespawn(); + } + + void AttackStart(Unit* who) + { + if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + return; + + ScriptedAI::AttackStart(who); + } + + void MoveInLineOfSight(Unit* who) + { + if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + return; + + ScriptedAI::MoveInLineOfSight(who); + } + + void JustDied(Unit* killer) + { + DoScriptText(SAY_TINHEAD_DEATH, m_creature); + + if (m_pInstance) + SummonCroneIfReady(m_pInstance, m_creature); + } + + void KilledUnit(Unit* victim) + { + DoScriptText(SAY_TINHEAD_SLAY, m_creature); + } + + void UpdateAI(const uint32 diff) + { + if (AggroTimer) + { + if (AggroTimer <= diff) + { + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + AggroTimer = 0; + }else AggroTimer -= diff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (CleaveTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_CLEAVE); + CleaveTimer = 5000; + }else CleaveTimer -= diff; + + if (RustCount < 8) + { + if (RustTimer < diff) + { + ++RustCount; + DoScriptText(EMOTE_RUST, m_creature); + DoCast(m_creature, SPELL_RUST); + RustTimer = 6000; + }else RustTimer -= diff; + } + + DoMeleeAttackIfReady(); + } +}; + +struct MANGOS_DLL_DECL boss_roarAI : public ScriptedAI +{ + boss_roarAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 AggroTimer; + uint32 MangleTimer; + uint32 ShredTimer; + uint32 ScreamTimer; + + void Reset() + { + AggroTimer = 20000; + MangleTimer = 5000; + ShredTimer = 10000; + ScreamTimer = 15000; + } + + void MoveInLineOfSight(Unit* who) + { + if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + return; + + ScriptedAI::MoveInLineOfSight(who); + } + + void AttackStart(Unit* who) + { + if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + return; + + ScriptedAI::AttackStart(who); + } + + void Aggro(Unit* who) + { + DoScriptText(SAY_ROAR_AGGRO, m_creature); + } + + void JustReachedHome() + { + m_creature->ForcedDespawn(); + } + + void JustDied(Unit* killer) + { + DoScriptText(SAY_ROAR_DEATH, m_creature); + + if (m_pInstance) + SummonCroneIfReady(m_pInstance, m_creature); + } + + void KilledUnit(Unit* victim) + { + DoScriptText(SAY_ROAR_SLAY, m_creature); + } + + void UpdateAI(const uint32 diff) + { + if (AggroTimer) + { + if (AggroTimer <= diff) + { + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + AggroTimer = 0; + }else AggroTimer -= diff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (MangleTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_MANGLE); + MangleTimer = urand(5000, 8000); + }else MangleTimer -= diff; + + if (ShredTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_SHRED); + ShredTimer = urand(10000, 15000); + }else ShredTimer -= diff; + + if (ScreamTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_FRIGHTENED_SCREAM); + ScreamTimer = urand(20000, 30000); + }else ScreamTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +struct MANGOS_DLL_DECL boss_croneAI : public ScriptedAI +{ + boss_croneAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 CycloneTimer; + uint32 ChainLightningTimer; + + void Reset() + { + CycloneTimer = 30000; + ChainLightningTimer = 10000; + } + + void JustReachedHome() + { + m_creature->ForcedDespawn(); + } + + void Aggro(Unit* who) + { + DoScriptText(urand(0, 1) ? SAY_CRONE_AGGRO : SAY_CRONE_AGGRO2, m_creature); + + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + } + + void JustDied(Unit* killer) + { + DoScriptText(SAY_CRONE_DEATH, m_creature); + + if (m_pInstance) + { + m_pInstance->SetData(TYPE_OPERA, DONE); + + if (GameObject* pLDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GO_STAGEDOORLEFT))) + pLDoor->SetGoState(GO_STATE_ACTIVE); + if (GameObject* pRDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GO_STAGEDOORRIGHT))) + pRDoor->SetGoState(GO_STATE_ACTIVE); + if (GameObject* pSideEntrance = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GO_SIDE_ENTRANCE_DOOR))) + pSideEntrance->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED); + } + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + + if (CycloneTimer < diff) + { + Creature* Cyclone = DoSpawnCreature(CREATURE_CYCLONE, rand()%10, rand()%10, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 15000); + if (Cyclone) + Cyclone->CastSpell(Cyclone, SPELL_CYCLONE_VISUAL, true); + CycloneTimer = 30000; + }else CycloneTimer -= diff; + + if (ChainLightningTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_CHAIN_LIGHTNING); + ChainLightningTimer = 15000; + }else ChainLightningTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +struct MANGOS_DLL_DECL mob_cycloneAI : public ScriptedAI +{ + mob_cycloneAI(Creature* pCreature) : ScriptedAI(pCreature) + { + Reset(); + } + + uint32 MoveTimer; + + void Reset() + { + MoveTimer = 1000; + } + + void MoveInLineOfSight(Unit* who) { } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->HasAura(SPELL_KNOCKBACK, 0)) + DoCast(m_creature, SPELL_KNOCKBACK, true); + + if (MoveTimer < diff) + { + float x,y,z; + m_creature->GetPosition(x,y,z); + float PosX, PosY, PosZ; + m_creature->GetRandomPoint(x,y,z,10, PosX, PosY, PosZ); + m_creature->GetMotionMaster()->MovePoint(0, PosX, PosY, PosZ); + MoveTimer = urand(5000, 8000); + }else MoveTimer -= diff; + } +}; + +CreatureAI* GetAI_boss_dorothee(Creature* pCreature) +{ + return new boss_dorotheeAI(pCreature); +} + +CreatureAI* GetAI_boss_strawman(Creature* pCreature) +{ + return new boss_strawmanAI(pCreature); +} + +CreatureAI* GetAI_boss_tinhead(Creature* pCreature) +{ + return new boss_tinheadAI(pCreature); +} + +CreatureAI* GetAI_boss_roar(Creature* pCreature) +{ + return new boss_roarAI(pCreature); +} + +CreatureAI* GetAI_boss_crone(Creature* pCreature) +{ + return new boss_croneAI(pCreature); +} + +CreatureAI* GetAI_mob_tito(Creature* pCreature) +{ + return new mob_titoAI(pCreature); +} + +CreatureAI* GetAI_mob_cyclone(Creature* pCreature) +{ + return new mob_cycloneAI(pCreature); +} + +/**************************************/ +/**** Opera Red Riding Hood Event ****/ +/************************************/ + +/**** Yells for the Wolf ****/ +#define SAY_WOLF_AGGRO -1532043 +#define SAY_WOLF_SLAY -1532044 +#define SAY_WOLF_HOOD -1532045 +#define SOUND_WOLF_DEATH 9275 //Only sound on death, no text. + +/**** Spells For The Wolf ****/ +#define SPELL_LITTLE_RED_RIDING_HOOD 30768 +#define SPELL_TERRIFYING_HOWL 30752 +#define SPELL_WIDE_SWIPE 30761 + +#define GOSSIP_GRANDMA "What phat lewtz you have grandmother?" + +/**** The Wolf's Entry ****/ +#define CREATURE_BIG_BAD_WOLF 17521 + +bool GossipHello_npc_grandmother(Player* pPlayer, Creature* pCreature) +{ + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_GRANDMA, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + pPlayer->SEND_GOSSIP_MENU(8990, pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_grandmother(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF) + { + if (Creature* pBigBadWolf = pCreature->SummonCreature(CREATURE_BIG_BAD_WOLF, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILISECONDS)) + pBigBadWolf->AI()->AttackStart(pPlayer); + + pCreature->ForcedDespawn(); + } + + return true; +} + +struct MANGOS_DLL_DECL boss_bigbadwolfAI : public ScriptedAI +{ + boss_bigbadwolfAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 ChaseTimer; + uint32 FearTimer; + uint32 SwipeTimer; + + uint64 HoodGUID; + float TempThreat; + + bool IsChasing; + + void Reset() + { + ChaseTimer = 30000; + FearTimer = urand(25000, 35000); + SwipeTimer = 5000; + + HoodGUID = 0; + TempThreat = 0; + + IsChasing = false; + } + + void Aggro(Unit* who) + { + DoScriptText(SAY_WOLF_AGGRO, m_creature); + } + + void JustReachedHome() + { + m_creature->ForcedDespawn(); + } + + void JustDied(Unit* killer) + { + DoPlaySoundToSet(m_creature, SOUND_WOLF_DEATH); + + if (m_pInstance) + { + m_pInstance->SetData(TYPE_OPERA, DONE); + + if (GameObject* pLDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GO_STAGEDOORLEFT))) + pLDoor->SetGoState(GO_STATE_ACTIVE); + if (GameObject* pRDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GO_STAGEDOORRIGHT))) + pRDoor->SetGoState(GO_STATE_ACTIVE); + if (GameObject* pSideEntrance = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GO_SIDE_ENTRANCE_DOOR))) + pSideEntrance->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED); + } + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + + if (ChaseTimer < diff) + { + if (!IsChasing) + { + Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0); + if (target && target->GetTypeId() == TYPEID_PLAYER) + { + DoScriptText(SAY_WOLF_HOOD, m_creature); + DoCast(target, SPELL_LITTLE_RED_RIDING_HOOD, true); + + TempThreat = m_creature->getThreatManager().getThreat(target); + if (TempThreat) + m_creature->getThreatManager().modifyThreatPercent(target, -100); + + HoodGUID = target->GetGUID(); + m_creature->AddThreat(target, 1000000.0f); + ChaseTimer = 20000; + IsChasing = true; + } + } + else + { + IsChasing = false; + + if (Unit* target = Unit::GetUnit((*m_creature), HoodGUID)) + { + HoodGUID = 0; + if (m_creature->getThreatManager().getThreat(target)) + m_creature->getThreatManager().modifyThreatPercent(target, -100); + + m_creature->AddThreat(target, TempThreat); + TempThreat = 0; + } + + ChaseTimer = 40000; + } + }else ChaseTimer -= diff; + + if (IsChasing) + return; + + if (FearTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_TERRIFYING_HOWL); + FearTimer = urand(25000, 35000); + }else FearTimer -= diff; + + if (SwipeTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_WIDE_SWIPE); + SwipeTimer = urand(25000, 30000); + }else SwipeTimer -= diff; + } +}; + +CreatureAI* GetAI_boss_bigbadwolf(Creature* pCreature) +{ + return new boss_bigbadwolfAI(pCreature); +} + +/**********************************************/ +/******** Opera Romeo and Juliet Event *******/ +/********************************************/ + +/**** Speech *****/ +#define SAY_JULIANNE_AGGRO -1532046 +#define SAY_JULIANNE_ENTER -1532047 +#define SAY_JULIANNE_DEATH01 -1532048 +#define SAY_JULIANNE_DEATH02 -1532049 +#define SAY_JULIANNE_RESURRECT -1532050 +#define SAY_JULIANNE_SLAY -1532051 + +#define SAY_ROMULO_AGGRO -1532052 +#define SAY_ROMULO_DEATH -1532053 +#define SAY_ROMULO_ENTER -1532054 +#define SAY_ROMULO_RESURRECT -1532055 +#define SAY_ROMULO_SLAY -1532056 + +/***** Spells For Julianne *****/ +#define SPELL_BLINDING_PASSION 30890 +#define SPELL_DEVOTION 30887 +#define SPELL_ETERNAL_AFFECTION 30878 +#define SPELL_POWERFUL_ATTRACTION 30889 +#define SPELL_DRINK_POISON 30907 + +/***** Spells For Romulo ****/ +#define SPELL_BACKWARD_LUNGE 30815 +#define SPELL_DARING 30841 +#define SPELL_DEADLY_SWATHE 30817 +#define SPELL_POISON_THRUST 30822 + +/**** Other Misc. Spells ****/ +#define SPELL_UNDYING_LOVE 30951 +#define SPELL_RES_VISUAL 24171 + +/*** Misc. Information ****/ +#define CREATURE_ROMULO 17533 +#define ROMULO_X -10900 +#define ROMULO_Y -1758 + +enum RAJPhase +{ + PHASE_JULIANNE = 0, + PHASE_ROMULO = 1, + PHASE_BOTH = 2, +}; + +void PretendToDie(Creature* pCreature) +{ + pCreature->InterruptNonMeleeSpells(true); + pCreature->RemoveAllAuras(); + pCreature->SetHealth(0); + pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + pCreature->GetMotionMaster()->MovementExpired(false); + pCreature->GetMotionMaster()->MoveIdle(); + pCreature->SetStandState(UNIT_STAND_STATE_DEAD); +}; + +void Resurrect(Creature* target) +{ + target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + target->SetHealth(target->GetMaxHealth()); + target->SetStandState(UNIT_STAND_STATE_STAND); + target->CastSpell(target, SPELL_RES_VISUAL, true); + if (target->getVictim()) + { + target->GetMotionMaster()->MoveChase(target->getVictim()); + target->AI()->AttackStart(target->getVictim()); + } + else + target->GetMotionMaster()->Initialize(); +}; + +struct MANGOS_DLL_DECL boss_julianneAI : public ScriptedAI +{ + boss_julianneAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + EntryYellTimer = 1000; + AggroYellTimer = 10000; + IsFakingDeath = false; + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 EntryYellTimer; + uint32 AggroYellTimer; + + uint64 RomuloGUID; + uint32 Phase; + + uint32 BlindingPassionTimer; + uint32 DevotionTimer; + uint32 EternalAffectionTimer; + uint32 PowerfulAttractionTimer; + uint32 SummonRomuloTimer; + uint32 ResurrectTimer; + uint32 DrinkPoisonTimer; + uint32 ResurrectSelfTimer; + + bool IsFakingDeath; + bool SummonedRomulo; + bool RomuloDead; + + void Reset() + { + RomuloGUID = 0; + Phase = PHASE_JULIANNE; + + BlindingPassionTimer = 30000; + DevotionTimer = 15000; + EternalAffectionTimer = 25000; + PowerfulAttractionTimer = 5000; + SummonRomuloTimer = 10000; + ResurrectTimer = 10000; + DrinkPoisonTimer = 0; + ResurrectSelfTimer = 0; + + if (IsFakingDeath) + { + Resurrect(m_creature); + IsFakingDeath = false; + } + + SummonedRomulo = false; + RomuloDead = false; + } + + void AttackStart(Unit* who) + { + if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + return; + + ScriptedAI::AttackStart(who); + } + + void MoveInLineOfSight(Unit* who) + { + if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + return; + + ScriptedAI::MoveInLineOfSight(who); + } + + void JustReachedHome() + { + m_creature->ForcedDespawn(); + } + + void SpellHit(Unit* caster, const SpellEntry *Spell) + { + if (Spell->Id == SPELL_DRINK_POISON) + { + DoScriptText(SAY_JULIANNE_DEATH01, m_creature); + DrinkPoisonTimer = 2500; + } + } + + void DamageTaken(Unit* done_by, uint32 &damage); + + void JustDied(Unit* killer) + { + DoScriptText(SAY_JULIANNE_DEATH02, m_creature); + + if (m_pInstance) + { + m_pInstance->SetData(TYPE_OPERA, DONE); + + if (GameObject* pLDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GO_STAGEDOORLEFT))) + pLDoor->SetGoState(GO_STATE_ACTIVE); + if (GameObject* pRDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GO_STAGEDOORRIGHT))) + pRDoor->SetGoState(GO_STATE_ACTIVE); + if (GameObject* pSideEntrance = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GO_SIDE_ENTRANCE_DOOR))) + pSideEntrance->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED); + } + } + + void KilledUnit(Unit* victim) + { + DoScriptText(SAY_JULIANNE_SLAY, m_creature); + } + + void UpdateAI(const uint32 diff); +}; + +struct MANGOS_DLL_DECL boss_romuloAI : public ScriptedAI +{ + boss_romuloAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + EntryYellTimer = 8000; + AggroYellTimer = 15000; + } + + ScriptedInstance* m_pInstance; + + uint64 JulianneGUID; + uint32 Phase; + + uint32 EntryYellTimer; + uint32 AggroYellTimer; + uint32 BackwardLungeTimer; + uint32 DaringTimer; + uint32 DeadlySwatheTimer; + uint32 PoisonThrustTimer; + uint32 ResurrectTimer; + + bool IsFakingDeath; + bool JulianneDead; + + void Reset() + { + JulianneGUID = 0; + Phase = PHASE_ROMULO; + + BackwardLungeTimer = 15000; + DaringTimer = 20000; + DeadlySwatheTimer = 25000; + PoisonThrustTimer = 10000; + ResurrectTimer = 10000; + + IsFakingDeath = false; + JulianneDead = false; + } + + void JustReachedHome() + { + m_creature->ForcedDespawn(); + } + + void DamageTaken(Unit* done_by, uint32 &damage); + + void Aggro(Unit* who) + { + DoScriptText(SAY_ROMULO_AGGRO, m_creature); + + if (JulianneGUID) + { + Creature* Julianne = ((Creature*)Unit::GetUnit((*m_creature), JulianneGUID)); + if (Julianne && Julianne->getVictim()) + { + m_creature->AddThreat(Julianne->getVictim(), 1.0f); + } + } + } + + void MoveInLineOfSight(Unit* who) + { + if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + return; + + ScriptedAI::MoveInLineOfSight(who); + } + + void JustDied(Unit* killer) + { + DoScriptText(SAY_ROMULO_DEATH, m_creature); + + if (m_pInstance) + { + m_pInstance->SetData(TYPE_OPERA, DONE); + + if (GameObject* pLDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GO_STAGEDOORLEFT))) + pLDoor->SetGoState(GO_STATE_ACTIVE); + if (GameObject* pRDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GO_STAGEDOORRIGHT))) + pRDoor->SetGoState(GO_STATE_ACTIVE); + if (GameObject* pSideEntrance = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GO_SIDE_ENTRANCE_DOOR))) + pSideEntrance->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED); + } + } + + void KilledUnit(Unit* victim) + { + DoScriptText(SAY_ROMULO_SLAY, m_creature); + } + + void UpdateAI(const uint32 diff); +}; + +void boss_julianneAI::DamageTaken(Unit* done_by, uint32 &damage) +{ + if (damage < m_creature->GetHealth()) + return; + + //anything below only used if incoming damage will kill + + if (Phase == PHASE_JULIANNE) + { + damage = 0; + + //this means already drinking, so return + if (IsFakingDeath) + return; + + m_creature->InterruptNonMeleeSpells(true); + DoCast(m_creature, SPELL_DRINK_POISON); + + IsFakingDeath = true; + return; + } + + if (Phase == PHASE_ROMULO) + { + error_log("SD2: boss_julianneAI: cannot take damage in PHASE_ROMULO, why was i here?"); + damage = 0; + return; + } + + if (Phase == PHASE_BOTH) + { + //if this is true then we have to kill romulo too + if (RomuloDead) + { + if (Creature* Romulo = ((Creature*)Unit::GetUnit((*m_creature), RomuloGUID))) + { + Romulo->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + Romulo->GetMotionMaster()->Clear(); + Romulo->setDeathState(JUST_DIED); + Romulo->CombatStop(true); + Romulo->DeleteThreatList(); + Romulo->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + } + return; + } + + //if not already returned, then romulo is alive and we can pretend die + if (Creature* Romulo = ((Creature*)Unit::GetUnit((*m_creature), RomuloGUID))) + { + PretendToDie(m_creature); + IsFakingDeath = true; + ((boss_romuloAI*)Romulo->AI())->ResurrectTimer = 10000; + ((boss_romuloAI*)Romulo->AI())->JulianneDead = true; + damage = 0; + return; + } + } + + error_log("SD2: boss_julianneAI: DamageTaken reach end of code, that should not happen."); +} + +void boss_romuloAI::DamageTaken(Unit* done_by, uint32 &damage) +{ + if (damage < m_creature->GetHealth()) + return; + + //anything below only used if incoming damage will kill + + if (Phase == PHASE_ROMULO) + { + DoScriptText(SAY_ROMULO_DEATH, m_creature); + PretendToDie(m_creature); + IsFakingDeath = true; + Phase = PHASE_BOTH; + + if (Creature* Julianne = ((Creature*)Unit::GetUnit((*m_creature), JulianneGUID))) + { + ((boss_julianneAI*)Julianne->AI())->RomuloDead = true; + ((boss_julianneAI*)Julianne->AI())->ResurrectSelfTimer = 10000; + } + + damage = 0; + return; + } + + if (Phase == PHASE_BOTH) + { + if (JulianneDead) + { + if (Creature* Julianne = ((Creature*)Unit::GetUnit((*m_creature), JulianneGUID))) + { + Julianne->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + Julianne->GetMotionMaster()->Clear(); + Julianne->setDeathState(JUST_DIED); + Julianne->CombatStop(true); + Julianne->DeleteThreatList(); + Julianne->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + } + return; + } + + if (Creature* Julianne = ((Creature*)Unit::GetUnit((*m_creature), JulianneGUID))) + { + PretendToDie(m_creature); + IsFakingDeath = true; + ((boss_julianneAI*)Julianne->AI())->ResurrectTimer = 10000; + ((boss_julianneAI*)Julianne->AI())->RomuloDead = true; + damage = 0; + return; + } + } + + error_log("SD2: boss_romuloAI: DamageTaken reach end of code, that should not happen."); +} + +void boss_julianneAI::UpdateAI(const uint32 diff) +{ + if (EntryYellTimer) + { + if (EntryYellTimer <= diff) + { + DoScriptText(SAY_JULIANNE_ENTER, m_creature); + EntryYellTimer = 0; + }else EntryYellTimer -= diff; + } + + if (AggroYellTimer) + { + if (AggroYellTimer <= diff) + { + DoScriptText(SAY_JULIANNE_AGGRO, m_creature); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->setFaction(16); + AggroYellTimer = 0; + }else AggroYellTimer -= diff; + } + + if (DrinkPoisonTimer) + { + //will do this 2secs after spell hit. this is time to display visual as expected + if (DrinkPoisonTimer <= diff) + { + PretendToDie(m_creature); + Phase = PHASE_ROMULO; + SummonRomuloTimer = 10000; + DrinkPoisonTimer = 0; + }else DrinkPoisonTimer -= diff; + } + + if (Phase == PHASE_ROMULO && !SummonedRomulo) + { + if (SummonRomuloTimer < diff) + { + if (Creature* pRomulo = m_creature->SummonCreature(CREATURE_ROMULO, ROMULO_X, ROMULO_Y, m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILISECONDS)) + { + RomuloGUID = pRomulo->GetGUID(); + ((boss_romuloAI*)pRomulo->AI())->JulianneGUID = m_creature->GetGUID(); + ((boss_romuloAI*)pRomulo->AI())->Phase = PHASE_ROMULO; + pRomulo->SetInCombatWithZone(); + + //why? + pRomulo->setFaction(16); + } + SummonedRomulo = true; + }else SummonRomuloTimer -= diff; + } + + if (ResurrectSelfTimer) + { + if (ResurrectSelfTimer <= diff) + { + Resurrect(m_creature); + Phase = PHASE_BOTH; + IsFakingDeath = false; + + if (m_creature->getVictim()) + AttackStart(m_creature->getVictim()); + + ResurrectSelfTimer = 0; + ResurrectTimer = 1000; + }else ResurrectSelfTimer -= diff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim() || IsFakingDeath) + return; + + if (RomuloDead) + { + if (ResurrectTimer < diff) + { + Creature* Romulo = ((Creature*)Unit::GetUnit((*m_creature), RomuloGUID)); + if (Romulo && ((boss_romuloAI*)Romulo->AI())->IsFakingDeath) + { + DoScriptText(SAY_JULIANNE_RESURRECT, m_creature); + Resurrect(Romulo); + ((boss_romuloAI*)Romulo->AI())->IsFakingDeath = false; + RomuloDead = false; + ResurrectTimer = 10000; + } + }else ResurrectTimer -= diff; + } + + if (BlindingPassionTimer < diff) + { + DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_BLINDING_PASSION); + BlindingPassionTimer = urand(30000, 45000); + } else BlindingPassionTimer -= diff; + + if (DevotionTimer < diff) + { + DoCast(m_creature, SPELL_DEVOTION); + DevotionTimer = urand(15000, 45000); + } else DevotionTimer -= diff; + + if (PowerfulAttractionTimer < diff) + { + DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_POWERFUL_ATTRACTION); + PowerfulAttractionTimer = urand(5000, 30000); + } else PowerfulAttractionTimer -= diff; + + if (EternalAffectionTimer < diff) + { + if (urand(0, 1) && SummonedRomulo) + { + Creature* Romulo = ((Creature*)Unit::GetUnit((*m_creature), RomuloGUID)); + if (Romulo && Romulo->isAlive() && !RomuloDead) + DoCast(Romulo, SPELL_ETERNAL_AFFECTION); + } else DoCast(m_creature, SPELL_ETERNAL_AFFECTION); + + EternalAffectionTimer = urand(45000, 60000); + } else EternalAffectionTimer -= diff; + + DoMeleeAttackIfReady(); +} + +void boss_romuloAI::UpdateAI(const uint32 diff) +{ + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim() || IsFakingDeath) + return; + + if (JulianneDead) + { + if (ResurrectTimer < diff) + { + Creature* Julianne = ((Creature*)Unit::GetUnit((*m_creature), JulianneGUID)); + if (Julianne && ((boss_julianneAI*)Julianne->AI())->IsFakingDeath) + { + DoScriptText(SAY_ROMULO_RESURRECT, m_creature); + Resurrect(Julianne); + ((boss_julianneAI*)Julianne->AI())->IsFakingDeath = false; + JulianneDead = false; + ResurrectTimer = 10000; + } + } else ResurrectTimer -= diff; + } + + if (BackwardLungeTimer < diff) + { + Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 1); + if (target && !m_creature->HasInArc(M_PI, target)) + { + DoCast(target, SPELL_BACKWARD_LUNGE); + BackwardLungeTimer = urand(15000, 30000); + } + }else BackwardLungeTimer -= diff; + + if (DaringTimer < diff) + { + DoCast(m_creature, SPELL_DARING); + DaringTimer = urand(20000, 40000); + }else DaringTimer -= diff; + + if (DeadlySwatheTimer < diff) + { + DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_DEADLY_SWATHE); + DeadlySwatheTimer = urand(15000, 25000); + }else DeadlySwatheTimer -= diff; + + if (PoisonThrustTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_POISON_THRUST); + PoisonThrustTimer = urand(10000, 20000); + }else PoisonThrustTimer -= diff; + + DoMeleeAttackIfReady(); +} + +CreatureAI* GetAI_boss_julianne(Creature* pCreature) +{ + return new boss_julianneAI(pCreature); +} + +CreatureAI* GetAI_boss_romulo(Creature* pCreature) +{ + return new boss_romuloAI(pCreature); +} + +void AddSC_bosses_opera() +{ + Script* newscript; + + // Oz + newscript = new Script; + newscript->GetAI = &GetAI_boss_dorothee; + newscript->Name = "boss_dorothee"; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->GetAI = &GetAI_boss_strawman; + newscript->Name = "boss_strawman"; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->GetAI = &GetAI_boss_tinhead; + newscript->Name = "boss_tinhead"; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->GetAI = &GetAI_boss_roar; + newscript->Name = "boss_roar"; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->GetAI = &GetAI_boss_crone; + newscript->Name = "boss_crone"; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->GetAI = &GetAI_mob_tito; + newscript->Name = "mob_tito"; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->GetAI = &GetAI_mob_cyclone; + newscript->Name = "mob_cyclone"; + newscript->RegisterSelf(); + + // Hood + newscript = new Script; + newscript->pGossipHello = &GossipHello_npc_grandmother; + newscript->pGossipSelect = &GossipSelect_npc_grandmother; + newscript->Name = "npc_grandmother"; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->GetAI = &GetAI_boss_bigbadwolf; + newscript->Name = "boss_bigbadwolf"; + newscript->RegisterSelf(); + + // Romeo And Juliet + newscript = new Script; + newscript->GetAI = &GetAI_boss_julianne; + newscript->Name = "boss_julianne"; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->GetAI = &GetAI_boss_romulo; + newscript->Name = "boss_romulo"; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp new file mode 100644 index 000000000..05b7452f7 --- /dev/null +++ b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp @@ -0,0 +1,285 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance_Karazhan +SD%Complete: 70 +SDComment: Instance Script for Karazhan to help in various encounters. TODO: GameObject visibility for Opera event. +SDCategory: Karazhan +EndScriptData */ + +#include "precompiled.h" +#include "karazhan.h" + +/* +0 - Attumen + Midnight (optional) +1 - Moroes +2 - Maiden of Virtue (optional) +3 - Hyakiss the Lurker / Rokad the Ravager / Shadikith the Glider +4 - Opera Event +5 - Curator +6 - Shade of Aran (optional) +7 - Terestian Illhoof (optional) +8 - Netherspite (optional) +9 - Chess Event +10 - Prince Malchezzar +11 - Nightbane +*/ + +struct MANGOS_DLL_DECL instance_karazhan : public ScriptedInstance +{ + instance_karazhan(Map* pMap) : ScriptedInstance(pMap) {Initialize();} + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string strInstData; + + uint32 m_uiOperaEvent; + uint32 m_uiOzDeathCount; + + uint64 m_uiCurtainGUID; + uint64 m_uiStageDoorLeftGUID; + uint64 m_uiStageDoorRightGUID; + uint64 m_uiKilrekGUID; + uint64 m_uiTerestianGUID; + uint64 m_uiMoroesGUID; + uint64 m_uiLibraryDoor; // Door at Shade of Aran + uint64 m_uiMassiveDoor; // Door at Netherspite + uint64 m_uiSideEntranceDoor; // Side Entrance + uint64 m_uiGamesmansDoor; // Door before Chess + uint64 m_uiGamesmansExitDoor; // Door after Chess + uint64 m_uiNetherspaceDoor; // Door at Malchezaar + uint64 m_uiDustCoveredChest; // Chest respawn at event complete + + void Initialize() + { + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + + // 1 - OZ, 2 - HOOD, 3 - RAJ, this never gets altered. + m_uiOperaEvent = urand(EVENT_OZ,EVENT_RAJ); + m_uiOzDeathCount = 0; + + m_uiCurtainGUID = 0; + m_uiStageDoorLeftGUID = 0; + m_uiStageDoorRightGUID = 0; + + m_uiKilrekGUID = 0; + m_uiTerestianGUID = 0; + m_uiMoroesGUID = 0; + + m_uiLibraryDoor = 0; + m_uiMassiveDoor = 0; + m_uiSideEntranceDoor = 0; + m_uiGamesmansDoor = 0; + m_uiGamesmansExitDoor = 0; + m_uiNetherspaceDoor = 0; + m_uiDustCoveredChest = 0; + } + + bool IsEncounterInProgress() const + { + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) + if (m_auiEncounter[i] == IN_PROGRESS) + return true; + + return false; + } + + void OnCreatureCreate(Creature* pCreature) + { + switch (pCreature->GetEntry()) + { + case 17229: m_uiKilrekGUID = pCreature->GetGUID(); break; + case 15688: m_uiTerestianGUID = pCreature->GetGUID(); break; + case 15687: m_uiMoroesGUID = pCreature->GetGUID(); break; + } + } + + void OnObjectCreate(GameObject* pGo) + { + switch(pGo->GetEntry()) + { + case 183932: m_uiCurtainGUID = pGo->GetGUID(); break; + case 184278: + m_uiStageDoorLeftGUID = pGo->GetGUID(); + if (m_auiEncounter[4] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case 184279: + m_uiStageDoorRightGUID = pGo->GetGUID(); + if (m_auiEncounter[4] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case 184517: m_uiLibraryDoor = pGo->GetGUID(); break; + case 185521: m_uiMassiveDoor = pGo->GetGUID(); break; + case 184276: m_uiGamesmansDoor = pGo->GetGUID(); break; + case 184277: m_uiGamesmansExitDoor = pGo->GetGUID(); break; + case 185134: m_uiNetherspaceDoor = pGo->GetGUID(); break; + case 184275: + m_uiSideEntranceDoor = pGo->GetGUID(); + if (m_auiEncounter[4] != DONE) + pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED); + else + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED); + break; + case 185119: m_uiDustCoveredChest = pGo->GetGUID(); break; + } + + switch(m_uiOperaEvent) + { + //TODO: Set DoRespawnGameObject for Opera based on performance + case EVENT_OZ: + break; + case EVENT_HOOD: + break; + case EVENT_RAJ: + break; + } + } + + void SetData(uint32 uiType, uint32 uiData) + { + switch(uiType) + { + case TYPE_ATTUMEN: m_auiEncounter[0] = uiData; break; + case TYPE_MOROES: + if (m_auiEncounter[1] != DONE) + m_auiEncounter[1] = uiData; + break; + case TYPE_MAIDEN: m_auiEncounter[2] = uiData; break; + case TYPE_OPTIONAL_BOSS: m_auiEncounter[3] = uiData; break; + case TYPE_OPERA: m_auiEncounter[4] = uiData; break; + case TYPE_CURATOR: m_auiEncounter[5] = uiData; break; + case TYPE_ARAN: m_auiEncounter[6] = uiData; break; + case TYPE_TERESTIAN: m_auiEncounter[7] = uiData; break; + case TYPE_NETHERSPITE: m_auiEncounter[8] = uiData; break; + case TYPE_CHESS: + if (uiData == DONE) + DoRespawnGameObject(m_uiDustCoveredChest,DAY); + m_auiEncounter[9] = uiData; + break; + case TYPE_MALCHEZZAR: m_auiEncounter[10] = uiData; break; + case TYPE_NIGHTBANE: m_auiEncounter[11] = uiData; break; + case DATA_OPERA_OZ_DEATHCOUNT: + if (uiData == SPECIAL) + ++m_uiOzDeathCount; + else if (uiData == IN_PROGRESS) + m_uiOzDeathCount = 0; + break; + } + + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " + << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " + << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8] << " " + << m_auiEncounter[9] << " " << m_auiEncounter[10] << " " << m_auiEncounter[11]; + + strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } + } + + const char* Save() + { + return strInstData.c_str(); + } + + uint32 GetData(uint32 uiType) + { + switch (uiType) + { + case TYPE_ATTUMEN: return m_auiEncounter[0]; + case TYPE_MOROES: return m_auiEncounter[1]; + case TYPE_MAIDEN: return m_auiEncounter[2]; + case TYPE_OPTIONAL_BOSS: return m_auiEncounter[3]; + case TYPE_OPERA: return m_auiEncounter[4]; + case TYPE_CURATOR: return m_auiEncounter[5]; + case TYPE_ARAN: return m_auiEncounter[6]; + case TYPE_TERESTIAN: return m_auiEncounter[7]; + case TYPE_NETHERSPITE: return m_auiEncounter[8]; + case TYPE_CHESS: return m_auiEncounter[9]; + case TYPE_MALCHEZZAR: return m_auiEncounter[10]; + case TYPE_NIGHTBANE: return m_auiEncounter[11]; + case DATA_OPERA_PERFORMANCE: return m_uiOperaEvent; + case DATA_OPERA_OZ_DEATHCOUNT: return m_uiOzDeathCount; + } + + return 0; + } + + uint64 GetData64(uint32 uiData) + { + switch (uiData) + { + case DATA_KILREK: return m_uiKilrekGUID; + case DATA_TERESTIAN: return m_uiTerestianGUID; + case DATA_MOROES: return m_uiMoroesGUID; + case DATA_GO_STAGEDOORLEFT: return m_uiStageDoorLeftGUID; + case DATA_GO_STAGEDOORRIGHT: return m_uiStageDoorRightGUID; + case DATA_GO_CURTAINS: return m_uiCurtainGUID; + case DATA_GO_LIBRARY_DOOR: return m_uiLibraryDoor; + case DATA_GO_MASSIVE_DOOR: return m_uiMassiveDoor; + case DATA_GO_SIDE_ENTRANCE_DOOR: return m_uiSideEntranceDoor; + case DATA_GO_GAME_DOOR: return m_uiGamesmansDoor; + case DATA_GO_GAME_EXIT_DOOR: return m_uiGamesmansExitDoor; + case DATA_GO_NETHER_DOOR: return m_uiNetherspaceDoor; + } + + return 0; + } + + void Load(const char* chrIn) + { + if (!chrIn) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(chrIn); + + std::istringstream loadStream(chrIn); + + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] + >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] + >> m_auiEncounter[8] >> m_auiEncounter[9] >> m_auiEncounter[10] >> m_auiEncounter[11]; + + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + if (m_auiEncounter[i] == IN_PROGRESS) // Do not load an encounter as "In Progress" - reset it instead. + m_auiEncounter[i] = NOT_STARTED; + + OUT_LOAD_INST_DATA_COMPLETE; + } +}; + +InstanceData* GetInstanceData_instance_karazhan(Map* pMap) +{ + return new instance_karazhan(pMap); +} + +void AddSC_instance_karazhan() +{ + Script* newscript; + newscript = new Script; + newscript->Name = "instance_karazhan"; + newscript->GetInstanceData = &GetInstanceData_instance_karazhan; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.cpp b/scripts/eastern_kingdoms/karazhan/karazhan.cpp new file mode 100644 index 000000000..8de4e4c83 --- /dev/null +++ b/scripts/eastern_kingdoms/karazhan/karazhan.cpp @@ -0,0 +1,433 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Karazhan +SD%Complete: 100 +SDComment: Support for Barnes (Opera controller) and Berthold (Doorman). +SDCategory: Karazhan +EndScriptData */ + +/* ContentData +npc_barnes +npc_berthold +EndContentData */ + +#include "precompiled.h" +#include "karazhan.h" +#include "escort_ai.h" + +/*###### +# npc_barnesAI +######*/ + +#define GOSSIP_READY "I'm not an actor." + +#define SAY_READY "Splendid, I'm going to get the audience ready. Break a leg!" +#define SAY_OZ_INTRO1 "Finally, everything is in place. Are you ready for your big stage debut?" +#define OZ_GOSSIP1 "I'm not an actor." +#define SAY_OZ_INTRO2 "Don't worry, you'll be fine. You look like a natural!" +#define OZ_GOSSIP2 "Ok, I'll give it a try, then." + +#define SAY_RAJ_INTRO1 "The romantic plays are really tough, but you'll do better this time. You have TALENT. Ready?" +#define RAJ_GOSSIP1 "I've never been more ready." + +#define OZ_GM_GOSSIP1 "[GM] Change event to EVENT_OZ" +#define OZ_GM_GOSSIP2 "[GM] Change event to EVENT_HOOD" +#define OZ_GM_GOSSIP3 "[GM] Change event to EVENT_RAJ" + +struct Dialogue +{ + int32 iTextId; + uint32 uiTimer; +}; + +static Dialogue aOzDialogue[4]= +{ + {-1532103, 6000}, + {-1532104, 18000}, + {-1532105, 9000}, + {-1532106, 15000} +}; + +static Dialogue aHoodDialogue[4]= +{ + {-1532107, 6000}, + {-1532108, 10000}, + {-1532109, 14000}, + {-1532110, 15000} +}; + +static Dialogue aRAJDialogue[4]= +{ + {-1532111, 5000}, + {-1532112, 7000}, + {-1532113, 14000}, + {-1532114, 14000} +}; + +struct Spawn +{ + uint32 uiEntry; + float fPosX; +}; + +// Entries and spawn locations for creatures in Oz event +Spawn aSpawns_OZ[4]= +{ + {17535, -10896.0f}, // Dorothee + {17546, -10891.0f}, // Roar + {17547, -10884.0f}, // Tinhead + {17543, -10902.0f}, // Strawman +}; +Spawn Spawn_HOOD = {17603, -10892.0f}; // Grandmother +Spawn Spawn_RAJ = {17534, -10900.0f}; // Julianne + +enum +{ + NPC_SPOTLIGHT = 19525, + + SPELL_SPOTLIGHT = 25824, + SPELL_TUXEDO = 32616 +}; + +const float SPAWN_Z = 90.5f; +const float SPAWN_Y = -1758.0f; +const float SPAWN_O = 4.738f; + +struct MANGOS_DLL_DECL npc_barnesAI : public npc_escortAI +{ + npc_barnesAI(Creature* pCreature) : npc_escortAI(pCreature) + { + m_bRaidWiped = false; + m_uiEventId = 0; + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint64 m_uiSpotlightGUID; + + uint32 m_uiTalkCount; + uint32 m_uiTalkTimer; + uint32 m_uiWipeTimer; + uint32 m_uiEventId; + + bool m_bPerformanceReady; + bool m_bRaidWiped; + + void Reset() + { + m_uiSpotlightGUID = 0; + + m_uiTalkCount = 0; + m_uiTalkTimer = 2000; + m_uiWipeTimer = 5000; + + m_bPerformanceReady = false; + + if (m_pInstance) + m_uiEventId = m_pInstance->GetData(DATA_OPERA_PERFORMANCE); + } + + void StartEvent() + { + if (!m_pInstance) + return; + + m_pInstance->SetData(TYPE_OPERA, IN_PROGRESS); + + //resets count for this event, in case earlier failed + if (m_uiEventId == EVENT_OZ) + m_pInstance->SetData(DATA_OPERA_OZ_DEATHCOUNT, IN_PROGRESS); + + Start(false, false, 0, NULL, true); + } + + void WaypointReached(uint32 uiPointId) + { + if (!m_pInstance) + return; + + switch(uiPointId) + { + case 0: + m_creature->CastSpell(m_creature, SPELL_TUXEDO, false); + m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(DATA_GO_STAGEDOORLEFT)); + break; + case 4: + m_uiTalkCount = 0; + SetEscortPaused(true); + + if (Creature* pSpotlight = m_creature->SummonCreature(NPC_SPOTLIGHT, + m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 0.0f, + TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000)) + { + pSpotlight->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + pSpotlight->CastSpell(pSpotlight, SPELL_SPOTLIGHT, false); + m_uiSpotlightGUID = pSpotlight->GetGUID(); + } + break; + case 8: + m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(DATA_GO_STAGEDOORLEFT)); + m_bPerformanceReady = true; + break; + case 9: + PrepareEncounter(); + m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(DATA_GO_CURTAINS)); + break; + } + } + + void Talk(uint32 uiCount) + { + int32 iTextId = 0; + + switch(m_uiEventId) + { + case EVENT_OZ: + if (aOzDialogue[uiCount].iTextId) + iTextId = aOzDialogue[uiCount].iTextId; + if (aOzDialogue[uiCount].uiTimer) + m_uiTalkTimer = aOzDialogue[uiCount].uiTimer; + break; + + case EVENT_HOOD: + if (aHoodDialogue[uiCount].iTextId) + iTextId = aHoodDialogue[uiCount].iTextId; + if (aHoodDialogue[uiCount].uiTimer) + m_uiTalkTimer = aHoodDialogue[uiCount].uiTimer; + break; + + case EVENT_RAJ: + if (aRAJDialogue[uiCount].iTextId) + iTextId = aRAJDialogue[uiCount].iTextId; + if (aRAJDialogue[uiCount].uiTimer) + m_uiTalkTimer = aRAJDialogue[uiCount].uiTimer; + break; + } + + if (iTextId) + DoScriptText(iTextId, m_creature); + } + + void PrepareEncounter() + { + debug_log("SD2: Barnes Opera Event - Introduction complete - preparing encounter %d", m_uiEventId); + + switch(m_uiEventId) + { + case EVENT_OZ: + for(int i=0; i < 4; ++i) + m_creature->SummonCreature(aSpawns_OZ[i].uiEntry, aSpawns_OZ[i].fPosX, SPAWN_Y, SPAWN_Z, SPAWN_O, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILISECONDS); + break; + case EVENT_HOOD: + m_creature->SummonCreature(Spawn_HOOD.uiEntry, Spawn_HOOD.fPosX, SPAWN_Y, SPAWN_Z, SPAWN_O, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILISECONDS); + break; + case EVENT_RAJ: + m_creature->SummonCreature(Spawn_RAJ.uiEntry, Spawn_RAJ.fPosX, SPAWN_Y, SPAWN_Z, SPAWN_O, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILISECONDS); + break; + default: + error_log("SD2: Barnes Opera Event - Wrong EventId set: %d", m_uiEventId); + break; + } + + m_bRaidWiped = false; + } + + void UpdateEscortAI(const uint32 uiDiff) + { + if (HasEscortState(STATE_ESCORT_PAUSED)) + { + if (m_uiTalkTimer < uiDiff) + { + if (m_uiTalkCount > 3) + { + if (Creature* pSpotlight = (Creature*)Unit::GetUnit(*m_creature, m_uiSpotlightGUID)) + pSpotlight->ForcedDespawn(); + + SetEscortPaused(false); + return; + } + + Talk(m_uiTalkCount++); + } + else + m_uiTalkTimer -= uiDiff; + } + + if (m_bPerformanceReady) + { + if (!m_bRaidWiped) + { + if (m_uiWipeTimer < uiDiff) + { + Map *pMap = m_creature->GetMap(); + if (!pMap->IsDungeon()) + return; + + Map::PlayerList const &PlayerList = pMap->GetPlayers(); + if (PlayerList.isEmpty()) + return; + + m_bRaidWiped = true; + for(Map::PlayerList::const_iterator i = PlayerList.begin();i != PlayerList.end(); ++i) + { + if (i->getSource()->isAlive() && !i->getSource()->isGameMaster()) + { + m_bRaidWiped = false; + break; + } + } + + if (m_bRaidWiped) + EnterEvadeMode(); + + m_uiWipeTimer = 15000; + } + else + m_uiWipeTimer -= uiDiff; + } + } + } +}; + +CreatureAI* GetAI_npc_barnesAI(Creature* pCreature) +{ + return new npc_barnesAI(pCreature); +} + +bool GossipHello_npc_barnes(Player* pPlayer, Creature* pCreature) +{ + if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) + { + // Check for death of Moroes and if opera event is not done already + if (pInstance->GetData(TYPE_MOROES) == DONE && pInstance->GetData(TYPE_OPERA) != DONE) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, OZ_GOSSIP1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + + if (pPlayer->isGameMaster()) // for GMs we add the possibility to change the event + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_DOT, OZ_GM_GOSSIP1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_DOT, OZ_GM_GOSSIP2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_DOT, OZ_GM_GOSSIP3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); + } + + if (npc_barnesAI* pBarnesAI = dynamic_cast(pCreature->AI())) + { + if (!pBarnesAI->m_bRaidWiped) + pPlayer->SEND_GOSSIP_MENU(8970, pCreature->GetGUID()); + else + pPlayer->SEND_GOSSIP_MENU(8975, pCreature->GetGUID()); + + return true; + } + } + } + + pPlayer->SEND_GOSSIP_MENU(8978, pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_barnes(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + npc_barnesAI* pBarnesAI = dynamic_cast(pCreature->AI()); + + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, OZ_GOSSIP2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->SEND_GOSSIP_MENU(8971, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->CLOSE_GOSSIP_MENU(); + if (pBarnesAI) + pBarnesAI->StartEvent(); + break; + case GOSSIP_ACTION_INFO_DEF+3: + pPlayer->CLOSE_GOSSIP_MENU(); + if (pBarnesAI) + pBarnesAI->m_uiEventId = EVENT_OZ; + outstring_log("SD2: pPlayer (GUID %i) manually set Opera event to EVENT_OZ",pPlayer->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+4: + pPlayer->CLOSE_GOSSIP_MENU(); + if (pBarnesAI) + pBarnesAI->m_uiEventId = EVENT_HOOD; + outstring_log("SD2: pPlayer (GUID %i) manually set Opera event to EVENT_HOOD",pPlayer->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+5: + pPlayer->CLOSE_GOSSIP_MENU(); + if (pBarnesAI) + pBarnesAI->m_uiEventId = EVENT_RAJ; + outstring_log("SD2: pPlayer (GUID %i) manually set Opera event to EVENT_RAJ",pPlayer->GetGUID()); + break; + } + + return true; +} + +/*### +# npc_berthold +####*/ + +enum +{ + SPELL_TELEPORT = 39567 +}; + +#define GOSSIP_ITEM_TELEPORT "Teleport me to the Guardian's Library" + +bool GossipHello_npc_berthold(Player* pPlayer, Creature* pCreature) +{ + if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) + { + // Check if Shade of Aran event is done + if (pInstance->GetData(TYPE_ARAN) == DONE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TELEPORT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + } + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_berthold(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) + pPlayer->CastSpell(pPlayer, SPELL_TELEPORT, true); + + pPlayer->CLOSE_GOSSIP_MENU(); + return true; +} + +void AddSC_karazhan() +{ + Script* newscript; + + newscript = new Script; + newscript->Name = "npc_barnes"; + newscript->GetAI = &GetAI_npc_barnesAI; + newscript->pGossipHello = &GossipHello_npc_barnes; + newscript->pGossipSelect = &GossipSelect_npc_barnes; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_berthold"; + newscript->pGossipHello = &GossipHello_npc_berthold; + newscript->pGossipSelect = &GossipSelect_npc_berthold; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.h b/scripts/eastern_kingdoms/karazhan/karazhan.h new file mode 100644 index 000000000..d4cd108cf --- /dev/null +++ b/scripts/eastern_kingdoms/karazhan/karazhan.h @@ -0,0 +1,51 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_KARAZHAN_H +#define DEF_KARAZHAN_H + +enum +{ + MAX_ENCOUNTER = 12, + + TYPE_ATTUMEN = 1, + TYPE_MOROES = 2, + TYPE_MAIDEN = 3, + TYPE_OPTIONAL_BOSS = 4, + TYPE_OPERA = 5, + TYPE_CURATOR = 6, + TYPE_ARAN = 7, + TYPE_TERESTIAN = 8, + TYPE_NETHERSPITE = 9, + TYPE_CHESS = 10, + TYPE_MALCHEZZAR = 11, + TYPE_NIGHTBANE = 12, + + DATA_OPERA_PERFORMANCE = 13, + DATA_OPERA_OZ_DEATHCOUNT = 14, + + DATA_KILREK = 15, + DATA_TERESTIAN = 16, + DATA_MOROES = 17, + + DATA_GO_CURTAINS = 18, + DATA_GO_STAGEDOORLEFT = 19, + DATA_GO_STAGEDOORRIGHT = 20, + DATA_GO_LIBRARY_DOOR = 21, + DATA_GO_MASSIVE_DOOR = 22, + DATA_GO_NETHER_DOOR = 23, + DATA_GO_GAME_DOOR = 24, + DATA_GO_GAME_EXIT_DOOR = 25, + DATA_GO_SIDE_ENTRANCE_DOOR = 26 +}; + +enum OperaEvents +{ + EVENT_OZ = 1, + EVENT_HOOD = 2, + EVENT_RAJ = 3 +}; + +#define ERROR_INST_DATA(a) error_log("SD2: Instance Data for Karazhan not set properly. Encounter for Creature Entry %u may not work properly.", a->GetEntry()); +#endif diff --git a/scripts/eastern_kingdoms/loch_modan.cpp b/scripts/eastern_kingdoms/loch_modan.cpp new file mode 100644 index 000000000..c0375382d --- /dev/null +++ b/scripts/eastern_kingdoms/loch_modan.cpp @@ -0,0 +1,91 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Loch_Modan +SD%Complete: 100 +SDComment: Quest support: 3181 (only to argue with pebblebitty to get to searing gorge, before quest rewarded) +SDCategory: Loch Modan +EndScriptData */ + +/* ContentData +npc_mountaineer_pebblebitty +EndContentData */ + +#include "precompiled.h" + +/*###### +## npc_mountaineer_pebblebitty +######*/ + +bool GossipHello_npc_mountaineer_pebblebitty(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (!pPlayer->GetQuestRewardStatus(3181) == 1) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Open the gate please, i need to get to Searing Gorge", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_mountaineer_pebblebitty(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "But i need to get there, now open the gate!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->SEND_GOSSIP_MENU(1833, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Ok, so what is this other way?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->SEND_GOSSIP_MENU(1834, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+3: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Doesn't matter, i'm invulnerable.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->SEND_GOSSIP_MENU(1835, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+4: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Yes...", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->SEND_GOSSIP_MENU(1836, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+5: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Ok, i'll try to remember that.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->SEND_GOSSIP_MENU(1837, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+6: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "A key? Ok!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->SEND_GOSSIP_MENU(1838, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+7: + pPlayer->CLOSE_GOSSIP_MENU(); + break; + } + return true; +} + +void AddSC_loch_modan() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_mountaineer_pebblebitty"; + newscript->pGossipHello = &GossipHello_npc_mountaineer_pebblebitty; + newscript->pGossipSelect = &GossipSelect_npc_mountaineer_pebblebitty; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp new file mode 100644 index 000000000..b68b4f829 --- /dev/null +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp @@ -0,0 +1,651 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Felblood_Kaelthas +SD%Complete: 80 +SDComment: Normal and Heroic Support. Issues: Arcane Spheres do not initially follow targets. +SDCategory: Magisters' Terrace +EndScriptData */ + +#include "precompiled.h" +#include "magisters_terrace.h" +#include "WorldPacket.h" + +#define SAY_AGGRO -1585023 //This yell should be done when the room is cleared. For now, set it as a movelineofsight yell. +#define SAY_PHOENIX -1585024 +#define SAY_FLAMESTRIKE -1585025 +#define SAY_GRAVITY_LAPSE -1585026 +#define SAY_TIRED -1585027 +#define SAY_RECAST_GRAVITY -1585028 +#define SAY_DEATH -1585029 + +/*** Spells ***/ + +// Phase 1 spells +#define SPELL_FIREBALL_NORMAL 44189 // Deals 2700-3300 damage at current target +#define SPELL_FIREBALL_HEROIC 46164 // 4950-6050 + +#define SPELL_PHOENIX 44194 // Summons a phoenix (Doesn't work?) +#define SPELL_PHOENIX_BURN 44197 // A spell Phoenix uses to damage everything around +#define SPELL_REBIRTH_DMG 44196 // DMG if a Phoenix rebirth happen + +#define SPELL_FLAME_STRIKE_DUMMY 44191 // Flamestrike indicator before the damage +#define SPELL_FLAME_STRIKE 44192 // Summons the trigger + animation (projectile) + +#define SPELL_SHOCK_BARRIER 46165 // Heroic only; 10k damage shield, followed by Pyroblast +#define SPELL_PYROBLAST 36819 // Heroic only; 45-55k fire damage + +// Phase 2 spells +#define SPELL_GRAVITY_LAPSE_INITIAL 44224 // Cast at the beginning of every Gravity Lapse +#define SPELL_GRAVITY_LAPSE_CHANNEL 44251 // Channeled; blue beam animation to every enemy in range +#define SPELL_TELEPORT_CENTER 44218 // Should teleport people to the center. Requires DB entry in spell_target_position. +#define SPELL_GRAVITY_LAPSE_FLY 44227 // Hastens flyspeed and allows flying for 1 minute. For some reason removes 44226. +#define SPELL_GRAVITY_LAPSE_DOT 44226 // Knocks up in the air and applies a 300 DPS DoT. +#define SPELL_ARCANE_SPHERE_PASSIVE 44263 // Passive auras on Arcane Spheres +#define SPELL_POWER_FEEDBACK 44233 // Stuns him, making him take 50% more damage for 10 seconds. Cast after Gravity Lapse + +/*** Creatures ***/ +#define NPC_FLAME_STRIKE_TRIGGER 24666 +#define CREATURE_PHOENIX 24674 +#define CREATURE_PHOENIX_EGG 24675 +#define CREATURE_ARCANE_SPHERE 24708 + +/** Locations **/ +float KaelLocations[3][2]= +{ + {148.744659, 181.377426}, + {140.823883, 195.403046}, + {156.574188, 195.650482}, +}; + +#define LOCATION_Z -16.727455 + +struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI +{ + boss_felblood_kaelthasAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + uint32 FireballTimer; + uint32 PhoenixTimer; + uint32 FlameStrikeTimer; + uint32 CombatPulseTimer; + + //Heroic only + uint32 PyroblastTimer; + + uint32 GravityLapseTimer; + uint32 GravityLapsePhase; + // 0 = No Gravity Lapse + // 1 = Casting Gravity Lapse visual + // 2 = Teleported people to self + // 3 = Knocked people up in the air + // 4 = Applied an aura that allows them to fly, channeling visual, relased Arcane Orbs. + + bool FirstGravityLapse; + bool HasTaunted; + + uint8 Phase; + // 0 = Not started + // 1 = Fireball; Summon Phoenix; Flamestrike + // 2 = Gravity Lapses + + void Reset() + { + // TODO: Timers + FireballTimer = 0; + PhoenixTimer = 10000; + FlameStrikeTimer = 25000; + CombatPulseTimer = 0; + + PyroblastTimer = 60000; + + GravityLapseTimer = 0; + GravityLapsePhase = 0; + + FirstGravityLapse = true; + HasTaunted = false; + + Phase = 0; + + if (m_pInstance) + { + m_pInstance->SetData(DATA_KAELTHAS_EVENT, NOT_STARTED); + + if (GameObject* pDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_KAEL_DOOR))) + pDoor->SetGoState(GO_STATE_ACTIVE); // Open the big encounter door. Close it in Aggro and open it only in JustDied(and here) + // Small door opened after event are expected to be closed by default + } + } + + void JustDied(Unit *killer) + { + DoScriptText(SAY_DEATH, m_creature); + + if (!m_pInstance) + return; + + if (GameObject* pEncounterDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_KAEL_DOOR))) + pEncounterDoor->SetGoState(GO_STATE_ACTIVE); // Open the encounter door + } + + void DamageTaken(Unit* done_by, uint32 &damage) + { + if (damage > m_creature->GetHealth()) + RemoveGravityLapse(); // Remove Gravity Lapse so that players fall to ground if they kill him when in air. + } + + void Aggro(Unit *who) + { + if (!m_pInstance) + return; + + if (GameObject* pEncounterDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_KAEL_DOOR))) + pEncounterDoor->SetGoState(GO_STATE_READY); //Close the encounter door, open it in JustDied/Reset + } + + void MoveInLineOfSight(Unit *who) + { + if (!HasTaunted && m_creature->IsWithinDistInMap(who, 40.0)) + { + DoScriptText(SAY_AGGRO, m_creature); + HasTaunted = true; + } + + ScriptedAI::MoveInLineOfSight(who); + } + + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_FLAME_STRIKE_TRIGGER) + pSummoned->CastSpell(pSummoned, SPELL_FLAME_STRIKE_DUMMY, false, NULL, NULL, m_creature->GetGUID()); + } + + void SetThreatList(Creature* SummonedUnit) + { + if (!SummonedUnit) + return; + + std::list& m_threatlist = m_creature->getThreatManager().getThreatList(); + std::list::iterator i = m_threatlist.begin(); + for(i = m_threatlist.begin(); i != m_threatlist.end(); ++i) + { + Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid()); + if (pUnit && pUnit->isAlive()) + { + float threat = m_creature->getThreatManager().getThreat(pUnit); + SummonedUnit->AddThreat(pUnit, threat); + } + } + } + + void TeleportPlayersToSelf() + { + float x = KaelLocations[0][0]; + float y = KaelLocations[0][1]; + m_creature->GetMap()->CreatureRelocation(m_creature, x, y, LOCATION_Z, 0.0f); + //m_creature->SendMonsterMove(x, y, LOCATION_Z, 0, 0, 0); // causes some issues... + std::list::iterator i = m_creature->getThreatManager().getThreatList().begin(); + for (i = m_creature->getThreatManager().getThreatList().begin(); i!= m_creature->getThreatManager().getThreatList().end();++i) + { + Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid()); + if (pUnit && (pUnit->GetTypeId() == TYPEID_PLAYER)) + pUnit->CastSpell(pUnit, SPELL_TELEPORT_CENTER, true); + } + DoCast(m_creature, SPELL_TELEPORT_CENTER, true); + } + + void CastGravityLapseKnockUp() + { + std::list::iterator i = m_creature->getThreatManager().getThreatList().begin(); + for (i = m_creature->getThreatManager().getThreatList().begin(); i!= m_creature->getThreatManager().getThreatList().end();++i) + { + Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid()); + if (pUnit && (pUnit->GetTypeId() == TYPEID_PLAYER)) + // Knockback into the air + pUnit->CastSpell(pUnit, SPELL_GRAVITY_LAPSE_DOT, true, 0, 0, m_creature->GetGUID()); + } + } + + void CastGravityLapseFly() // Use Fly Packet hack for now as players can't cast "fly" spells unless in map 530. Has to be done a while after they get knocked into the air... + { + std::list::iterator i = m_creature->getThreatManager().getThreatList().begin(); + for (i = m_creature->getThreatManager().getThreatList().begin(); i!= m_creature->getThreatManager().getThreatList().end();++i) + { + Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid()); + if (pUnit && (pUnit->GetTypeId() == TYPEID_PLAYER)) + { + // Also needs an exception in spell system. + pUnit->CastSpell(pUnit, SPELL_GRAVITY_LAPSE_FLY, true, 0, 0, m_creature->GetGUID()); + // Use packet hack + WorldPacket data(12); + data.SetOpcode(SMSG_MOVE_SET_CAN_FLY); + data.append(pUnit->GetPackGUID()); + data << uint32(0); + pUnit->SendMessageToSet(&data, true); + } + } + } + + void RemoveGravityLapse() + { + std::list::iterator i = m_creature->getThreatManager().getThreatList().begin(); + for (i = m_creature->getThreatManager().getThreatList().begin(); i!= m_creature->getThreatManager().getThreatList().end();++i) + { + Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid()); + if (pUnit && (pUnit->GetTypeId() == TYPEID_PLAYER)) + { + pUnit->RemoveAurasDueToSpell(SPELL_GRAVITY_LAPSE_FLY); + pUnit->RemoveAurasDueToSpell(SPELL_GRAVITY_LAPSE_DOT); + + WorldPacket data(12); + data.SetOpcode(SMSG_MOVE_UNSET_CAN_FLY); + data.append(pUnit->GetPackGUID()); + data << uint32(0); + pUnit->SendMessageToSet(&data, true); + } + } + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + switch(Phase) + { + case 0: + { + // *Heroic mode only: + if (m_bIsHeroicMode) + { + if (PyroblastTimer < diff) + { + m_creature->InterruptSpell(CURRENT_CHANNELED_SPELL); + m_creature->InterruptSpell(CURRENT_GENERIC_SPELL); + DoCast(m_creature, SPELL_SHOCK_BARRIER, true); + DoCast(m_creature->getVictim(), SPELL_PYROBLAST); + PyroblastTimer = 60000; + }else PyroblastTimer -= diff; + } + + if (FireballTimer < diff) + { + DoCast(m_creature->getVictim(), m_bIsHeroicMode ? SPELL_FIREBALL_HEROIC : SPELL_FIREBALL_NORMAL); + FireballTimer = urand(2000, 6000); + }else FireballTimer -= diff; + + if (PhoenixTimer < diff) + { + + Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM,1); + + uint32 random = urand(1, 2); + float x = KaelLocations[random][0]; + float y = KaelLocations[random][1]; + + Creature* Phoenix = m_creature->SummonCreature(CREATURE_PHOENIX, x, y, LOCATION_Z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000); + if (Phoenix) + { + Phoenix->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE + UNIT_FLAG_NON_ATTACKABLE); + SetThreatList(Phoenix); + Phoenix->AI()->AttackStart(target); + } + + DoScriptText(SAY_PHOENIX, m_creature); + + PhoenixTimer = 60000; + }else PhoenixTimer -= diff; + + if (FlameStrikeTimer < diff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + { + if (m_creature->IsNonMeleeSpellCasted(false)) + m_creature->InterruptNonMeleeSpells(false); + + DoCast(pTarget, SPELL_FLAME_STRIKE); + DoScriptText(SAY_FLAMESTRIKE, m_creature); + } + FlameStrikeTimer = urand(15000, 25000); + }else FlameStrikeTimer -= diff; + + // Below 50% + if (m_creature->GetMaxHealth() * 0.5 > m_creature->GetHealth()) + { + m_creature->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_INTERRUPT_CAST, true); + m_creature->StopMoving(); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveIdle(); + GravityLapseTimer = 0; + GravityLapsePhase = 0; + Phase = 1; + } + + DoMeleeAttackIfReady(); + } + break; + + case 1: + { + if (GravityLapseTimer < diff) + { + switch(GravityLapsePhase) + { + case 0: + if (FirstGravityLapse) // Different yells at 50%, and at every following Gravity Lapse + { + DoScriptText(SAY_GRAVITY_LAPSE, m_creature); + FirstGravityLapse = false; + + if (m_pInstance) + { + if (GameObject* pKaelLeft = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_KAEL_STATUE_LEFT))) + pKaelLeft->SetGoState(GO_STATE_ACTIVE); + + if (GameObject* pKaelRight = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_KAEL_STATUE_RIGHT))) + pKaelRight->SetGoState(GO_STATE_ACTIVE); + } + } + else + { + DoScriptText(SAY_RECAST_GRAVITY, m_creature); + } + + DoCast(m_creature, SPELL_GRAVITY_LAPSE_INITIAL); + GravityLapseTimer = 2000 + diff;// Don't interrupt the visual spell + GravityLapsePhase = 1; + break; + + case 1: + TeleportPlayersToSelf(); + GravityLapseTimer = 1000; + GravityLapsePhase = 2; + break; + + case 2: + CastGravityLapseKnockUp(); + GravityLapseTimer = 1000; + GravityLapsePhase = 3; + break; + + case 3: + CastGravityLapseFly(); + GravityLapseTimer = 30000; + GravityLapsePhase = 4; + + + for(uint8 i = 0; i < 3; ++i) + { + Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM,0); + + Creature* Orb = DoSpawnCreature(CREATURE_ARCANE_SPHERE, 5, 5, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000); + if (Orb && target) + { + //SetThreatList(Orb); + Orb->AddThreat(target, 1.0f); + Orb->AI()->AttackStart(target); + } + + } + + DoCast(m_creature, SPELL_GRAVITY_LAPSE_CHANNEL); + break; + + case 4: + m_creature->InterruptNonMeleeSpells(false); + DoScriptText(SAY_TIRED, m_creature); + DoCast(m_creature, SPELL_POWER_FEEDBACK); + RemoveGravityLapse(); + GravityLapseTimer = 10000; + GravityLapsePhase = 0; + break; + } + }else GravityLapseTimer -= diff; + } + break; + } + } +}; + +struct MANGOS_DLL_DECL mob_felkael_phoenixAI : public ScriptedAI +{ + mob_felkael_phoenixAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + uint32 BurnTimer; + uint32 Death_Timer; + bool Rebirth; + bool FakeDeath; + + void Reset() + { + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE + UNIT_FLAG_NON_ATTACKABLE); + m_creature->CastSpell(m_creature,SPELL_PHOENIX_BURN,true); + + BurnTimer = 2000; + Death_Timer = 3000; + Rebirth = false; + FakeDeath = false; + } + + void DamageTaken(Unit* pKiller, uint32 &damage) + { + if (damage < m_creature->GetHealth()) + return; + + //Prevent glitch if in fake death + if (FakeDeath) + { + damage = 0; + return; + + } + //Don't really die in all phases of Kael'Thas + if (m_pInstance && m_pInstance->GetData(DATA_KAELTHAS_EVENT) == 0) + { + //prevent death + damage = 0; + FakeDeath = true; + + m_creature->InterruptNonMeleeSpells(false); + m_creature->SetHealth(0); + m_creature->StopMoving(); + m_creature->ClearComboPointHolders(); + m_creature->RemoveAllAurasOnDeath(); + m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, false); + m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->ClearAllReactives(); + m_creature->SetUInt64Value(UNIT_FIELD_TARGET,0); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveIdle(); + m_creature->SetStandState(UNIT_STAND_STATE_DEAD); + + } + + } + + void JustDied(Unit* slayer) + { + m_creature->SummonCreature(CREATURE_PHOENIX_EGG, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45000); + } + + void UpdateAI(const uint32 diff) + { + + //If we are fake death, we cast revbirth and after that we kill the phoenix to spawn the egg. + if (FakeDeath) + { + if (!Rebirth) + { + DoCast(m_creature, SPELL_REBIRTH_DMG); + Rebirth = true; + } + + if (Rebirth) + { + + if (Death_Timer < diff) + { + m_creature->SummonCreature(CREATURE_PHOENIX_EGG, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45000); + m_creature->setDeathState(JUST_DIED); + m_creature->RemoveCorpse(); + Rebirth = false; + }else Death_Timer -= diff; + } + + + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (BurnTimer < diff) + { + //spell Burn should possible do this, but it doesn't, so do this for now. + uint32 dmg = urand(1650,2050); + m_creature->DealDamage(m_creature, dmg, 0, DOT, SPELL_SCHOOL_MASK_FIRE, NULL, false); + BurnTimer += 2000; + } BurnTimer -= diff; + + + DoMeleeAttackIfReady(); + } +}; + +struct MANGOS_DLL_DECL mob_felkael_phoenix_eggAI : public ScriptedAI +{ + mob_felkael_phoenix_eggAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 HatchTimer; + + void Reset() + { + HatchTimer = 10000; + + } + + void MoveInLineOfSight(Unit* who) {} + + void UpdateAI(const uint32 diff) + { + if (HatchTimer < diff) + { + m_creature->SummonCreature(CREATURE_PHOENIX, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000); + m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + }else HatchTimer -= diff; + + } +}; + +struct MANGOS_DLL_DECL mob_arcane_sphereAI : public ScriptedAI +{ + mob_arcane_sphereAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 DespawnTimer; + uint32 ChangeTargetTimer; + + void Reset() + { + DespawnTimer = 30000; + ChangeTargetTimer = urand(6000, 12000); + + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + DoCast(m_creature, SPELL_ARCANE_SPHERE_PASSIVE, true); + } + + void UpdateAI(const uint32 diff) + { + if (DespawnTimer < diff) + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + else DespawnTimer -= diff; + + if (!m_creature->getVictim() || !m_creature->SelectHostileTarget()) + return; + + if (ChangeTargetTimer < diff) + { + + Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM,0); + if (target) + m_creature->AddThreat(target, 1.0f); + m_creature->TauntApply(target); + AttackStart(target); + + ChangeTargetTimer = urand(5000, 15000); + }else ChangeTargetTimer -= diff; + } +}; + +CreatureAI* GetAI_boss_felblood_kaelthas(Creature* pCreature) +{ + return new boss_felblood_kaelthasAI(pCreature); +} + +CreatureAI* GetAI_mob_arcane_sphere(Creature* pCreature) +{ + return new mob_arcane_sphereAI(pCreature); +} + +CreatureAI* GetAI_mob_felkael_phoenix(Creature* pCreature) +{ + return new mob_felkael_phoenixAI(pCreature); +} + +CreatureAI* GetAI_mob_felkael_phoenix_egg(Creature* pCreature) +{ + return new mob_felkael_phoenix_eggAI(pCreature); +} + +void AddSC_boss_felblood_kaelthas() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_felblood_kaelthas"; + newscript->GetAI = &GetAI_boss_felblood_kaelthas; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_arcane_sphere"; + newscript->GetAI = &GetAI_mob_arcane_sphere; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_felkael_phoenix"; + newscript->GetAI = &GetAI_mob_felkael_phoenix; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_felkael_phoenix_egg"; + newscript->GetAI = &GetAI_mob_felkael_phoenix_egg; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp new file mode 100644 index 000000000..7a2976203 --- /dev/null +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp @@ -0,0 +1,1332 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Priestess_Delrissa +SD%Complete: 65 +SDComment: No Heroic support yet. Needs further testing. Several scripts for pets disabled, not seem to require any special script. +SDCategory: Magister's Terrace +EndScriptData */ + +#include "precompiled.h" +#include "magisters_terrace.h" + +struct Speech +{ + int32 id; +}; + +static Speech LackeyDeath[]= +{ + {-1585013}, + {-1585014}, + {-1585015}, + {-1585016}, +}; + +static Speech PlayerDeath[]= +{ + {-1585017}, + {-1585018}, + {-1585019}, + {-1585020}, + {-1585021}, +}; + +enum +{ + SAY_AGGRO = -1585012, + SAY_DEATH = -1585022, + + SPELL_DISPEL_MAGIC = 27609, + SPELL_FLASH_HEAL = 17843, + SPELL_SW_PAIN_NORMAL = 14032, + SPELL_SW_PAIN_HEROIC = 15654, + SPELL_SHIELD = 44291, + SPELL_RENEW_NORMAL = 44174, + SPELL_RENEW_HEROIC = 46192, + + MAX_ACTIVE_LACKEY = 4 +}; + +const float fOrientation = 4.98; +const float fZLocation = -19.921; + +float LackeyLocations[4][2]= +{ + {123.77, 17.6007}, + {131.731, 15.0827}, + {121.563, 15.6213}, + {129.988, 17.2355}, +}; + +const uint32 m_auiAddEntries[] = +{ + 24557, //Kagani Nightstrike + 24558, //Elris Duskhallow + 24554, //Eramas Brightblaze + 24561, //Yazzaj + 24559, //Warlord Salaris + 24555, //Garaxxas + 24553, //Apoko + 24556, //Zelfan +}; + +struct MANGOS_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI +{ + boss_priestess_delrissaAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + memset(&m_auiLackeyGUID, 0, sizeof(m_auiLackeyGUID)); + LackeyEntryList.clear(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + std::vector LackeyEntryList; + uint64 m_auiLackeyGUID[MAX_ACTIVE_LACKEY]; + + uint8 PlayersKilled; + + uint32 HealTimer; + uint32 RenewTimer; + uint32 ShieldTimer; + uint32 SWPainTimer; + uint32 DispelTimer; + + void Reset() + { + PlayersKilled = 0; + + HealTimer = 15000; + RenewTimer = 10000; + ShieldTimer = 2000; + SWPainTimer = 5000; + DispelTimer = 7500; + + InitializeLackeys(); + } + + //this mean she at some point evaded + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(DATA_DELRISSA_EVENT, FAIL); + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + + for(uint8 i = 0; i < MAX_ACTIVE_LACKEY; ++i) + { + if (Unit* pAdd = Unit::GetUnit(*m_creature, m_auiLackeyGUID[i])) + { + if (!pAdd->getVictim()) + { + pWho->SetInCombatWith(pAdd); + pAdd->AddThreat(pWho, 0.0f); + } + } + } + + if (m_pInstance) + m_pInstance->SetData(DATA_DELRISSA_EVENT, IN_PROGRESS); + } + + void InitializeLackeys() + { + //can be called if creature are dead, so avoid + if (!m_creature->isAlive()) + return; + + uint8 j = 0; + + //it's empty, so first time + if (LackeyEntryList.empty()) + { + //pre-allocate size for speed + LackeyEntryList.resize((sizeof(m_auiAddEntries) / sizeof(uint32))); + + //fill vector array with entries from creature array + for(uint8 i = 0; i < LackeyEntryList.size(); ++i) + LackeyEntryList[i] = m_auiAddEntries[i]; + + //remove random entries + while(LackeyEntryList.size() > MAX_ACTIVE_LACKEY) + LackeyEntryList.erase(LackeyEntryList.begin() + rand()%LackeyEntryList.size()); + + //summon all the remaining in vector + for(std::vector::iterator itr = LackeyEntryList.begin(); itr != LackeyEntryList.end(); ++itr) + { + if (Creature* pAdd = m_creature->SummonCreature((*itr), LackeyLocations[j][0], LackeyLocations[j][1], fZLocation, fOrientation, TEMPSUMMON_CORPSE_DESPAWN, 0)) + m_auiLackeyGUID[j] = pAdd->GetGUID(); + + ++j; + } + } + else + { + for(std::vector::iterator itr = LackeyEntryList.begin(); itr != LackeyEntryList.end(); ++itr) + { + Unit* pAdd = Unit::GetUnit(*m_creature, m_auiLackeyGUID[j]); + + //object already removed, not exist + if (!pAdd) + { + if (Creature* pAdd = m_creature->SummonCreature((*itr), LackeyLocations[j][0], LackeyLocations[j][1], fZLocation, fOrientation, TEMPSUMMON_CORPSE_DESPAWN, 0)) + m_auiLackeyGUID[j] = pAdd->GetGUID(); + } + ++j; + } + } + } + + void KilledUnit(Unit* victim) + { + if (victim->GetTypeId() != TYPEID_PLAYER) + return; + + DoScriptText(PlayerDeath[PlayersKilled].id, m_creature); + + if (PlayersKilled < 4) + ++PlayersKilled; + } + + void JustDied(Unit* killer) + { + DoScriptText(SAY_DEATH, m_creature); + + if (!m_pInstance) + return; + + if (m_pInstance->GetData(DATA_DELRISSA_DEATH_COUNT) == MAX_ACTIVE_LACKEY) + m_pInstance->SetData(DATA_DELRISSA_EVENT, DONE); + else + { + if (m_creature->HasFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE)) + m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + } + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (HealTimer < diff) + { + uint32 health = m_creature->GetHealth(); + Unit* target = m_creature; + + for(uint8 i = 0; i < MAX_ACTIVE_LACKEY; ++i) + { + if (Unit* pAdd = Unit::GetUnit(*m_creature, m_auiLackeyGUID[i])) + { + if (pAdd->isAlive() && pAdd->GetHealth() < health) + target = pAdd; + } + } + + DoCast(target, SPELL_FLASH_HEAL); + HealTimer = 15000; + }else HealTimer -= diff; + + if (RenewTimer < diff) + { + Unit* target = m_creature; + + if (urand(0, 1)) + { + if (Unit* pAdd = Unit::GetUnit(*m_creature, m_auiLackeyGUID[rand()%MAX_ACTIVE_LACKEY])) + { + if (pAdd->isAlive()) + target = pAdd; + } + } + + DoCast(target, m_bIsHeroicMode ? SPELL_RENEW_HEROIC : SPELL_RENEW_NORMAL); + RenewTimer = 5000; + }else RenewTimer -= diff; + + if (ShieldTimer < diff) + { + Unit* target = m_creature; + + if (urand(0, 1)) + { + if (Unit* pAdd = Unit::GetUnit(*m_creature, m_auiLackeyGUID[rand()%MAX_ACTIVE_LACKEY])) + { + if (pAdd->isAlive() && !pAdd->HasAura(SPELL_SHIELD)) + target = pAdd; + } + } + + DoCast(target, SPELL_SHIELD); + ShieldTimer = 7500; + }else ShieldTimer -= diff; + + if (DispelTimer < diff) + { + Unit* target = NULL; + bool friendly = false; + + if (urand(0, 1)) + target = SelectUnit(SELECT_TARGET_RANDOM, 0); + else + { + friendly = true; + + if (urand(0, 1)) + target = m_creature; + else + { + if (Unit* pAdd = Unit::GetUnit(*m_creature, m_auiLackeyGUID[rand()%MAX_ACTIVE_LACKEY])) + { + if (pAdd->isAlive()) + target = pAdd; + } + } + } + + if (target) + DoCast(target, SPELL_DISPEL_MAGIC); + + DispelTimer = 12000; + }else DispelTimer -= diff; + + if (SWPainTimer < diff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, m_bIsHeroicMode ? SPELL_SW_PAIN_HEROIC : SPELL_SW_PAIN_NORMAL); + + SWPainTimer = 10000; + }else SWPainTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_priestess_delrissa(Creature* pCreature) +{ + return new boss_priestess_delrissaAI(pCreature); +} + +enum +{ + SPELL_HEALING_POTION = 15503 +}; + +//all 8 possible lackey use this common +struct MANGOS_DLL_DECL boss_priestess_lackey_commonAI : public ScriptedAI +{ + boss_priestess_lackey_commonAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + memset(&m_auiLackeyGUIDs, 0, sizeof(m_auiLackeyGUIDs)); + Reset(); + AcquireGUIDs(); + } + + ScriptedInstance* m_pInstance; + + uint64 m_auiLackeyGUIDs[MAX_ACTIVE_LACKEY]; + uint32 m_uiResetThreatTimer; + bool m_bUsedPotion; + + void Reset() + { + m_bUsedPotion = false; + + // These guys does not follow normal threat system rules + // For later development, some alternative threat system should be made + // We do not know what this system is based upon, but one theory is class (healers=high threat, dps=medium, etc) + // We reset their threat frequently as an alternative until such a system exist + m_uiResetThreatTimer = urand(5000, 15000); + + // in case she is not alive and Reset was for some reason called, respawn her (most likely party wipe after killing her) + if (Creature* pDelrissa = (Creature*)Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_DELRISSA))) + { + if (!pDelrissa->isAlive()) + pDelrissa->Respawn(); + } + } + + void EnterCombat(Unit* pWho) + { + if (!pWho) + return; + + if (m_pInstance) + { + for(uint8 i = 0; i < MAX_ACTIVE_LACKEY; ++i) + { + if (Unit* pAdd = Unit::GetUnit(*m_creature, m_auiLackeyGUIDs[i])) + { + if (!pAdd->getVictim() && pAdd != m_creature) + { + pWho->SetInCombatWith(pAdd); + pAdd->AddThreat(pWho, 0.0f); + } + } + } + + if (Creature* pDelrissa = (Creature*)Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_DELRISSA))) + { + if (pDelrissa->isAlive() && !pDelrissa->getVictim()) + { + pWho->SetInCombatWith(pDelrissa); + pDelrissa->AddThreat(pWho, 0.0f); + } + } + } + + Aggro(pWho); + } + + void JustDied(Unit* pKiller) + { + if (!m_pInstance) + return; + + Creature* pDelrissa = (Creature*)Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_DELRISSA)); + uint32 uiLackeyDeathCount = m_pInstance->GetData(DATA_DELRISSA_DEATH_COUNT); + + if (!pDelrissa) + return; + + //should delrissa really yell if dead? + DoScriptText(LackeyDeath[uiLackeyDeathCount].id, pDelrissa); + + m_pInstance->SetData(DATA_DELRISSA_DEATH_COUNT, SPECIAL); + + //increase local var, since we now may have four dead + ++uiLackeyDeathCount; + + if (uiLackeyDeathCount == MAX_ACTIVE_LACKEY) + { + //time to make her lootable and complete event if she died before lackeys + if (!pDelrissa->isAlive()) + { + if (!pDelrissa->HasFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE)) + pDelrissa->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + + m_pInstance->SetData(DATA_DELRISSA_EVENT, DONE); + } + } + } + + void KilledUnit(Unit* pVictim) + { + if (!m_pInstance) + return; + + if (Creature* pDelrissa = (Creature*)Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_DELRISSA))) + pDelrissa->AI()->KilledUnit(pVictim); + } + + void AcquireGUIDs() + { + if (!m_pInstance) + return; + + if (Creature* pDelrissa = (Creature*)Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_DELRISSA))) + { + for(uint8 i = 0; i < MAX_ACTIVE_LACKEY; ++i) + m_auiLackeyGUIDs[i] = ((boss_priestess_delrissaAI*)pDelrissa->AI())->m_auiLackeyGUID[i]; + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_bUsedPotion && ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 25)) + { + DoCast(m_creature, SPELL_HEALING_POTION); + m_bUsedPotion = true; + } + + if (m_uiResetThreatTimer < uiDiff) + { + DoResetThreat(); + m_uiResetThreatTimer = urand(5000, 15000); + }else m_uiResetThreatTimer -= uiDiff; + } +}; + +enum +{ + SPELL_KIDNEY_SHOT = 27615, + SPELL_GOUGE = 12540, + SPELL_KICK = 27613, + SPELL_VANISH = 44290, + SPELL_BACKSTAB = 15657, + SPELL_EVISCERATE = 27611 +}; + +struct MANGOS_DLL_DECL boss_kagani_nightstrikeAI : public boss_priestess_lackey_commonAI +{ + //Rogue + boss_kagani_nightstrikeAI(Creature* pCreature) : boss_priestess_lackey_commonAI(pCreature) { Reset(); } + + uint32 Gouge_Timer; + uint32 Kick_Timer; + uint32 Vanish_Timer; + uint32 Eviscerate_Timer; + uint32 Wait_Timer; + bool InVanish; + + void Reset() + { + Gouge_Timer = 5500; + Kick_Timer = 7000; + Vanish_Timer = 2000; + Eviscerate_Timer = 6000; + Wait_Timer = 5000; + InVanish = false; + m_creature->SetVisibility(VISIBILITY_ON); + + boss_priestess_lackey_commonAI::Reset(); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + boss_priestess_lackey_commonAI::UpdateAI(diff); + + if (Vanish_Timer < diff) + { + DoCast(m_creature, SPELL_VANISH); + + Unit* pUnit = SelectUnit(SELECT_TARGET_RANDOM, 0); + + DoResetThreat(); + + if (pUnit) + m_creature->AddThreat(pUnit, 1000.0f); + + InVanish = true; + Vanish_Timer = 30000; + Wait_Timer = 10000; + }else Vanish_Timer -= diff; + + if (InVanish) + { + if (Wait_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_BACKSTAB, true); + DoCast(m_creature->getVictim(), SPELL_KIDNEY_SHOT, true); + m_creature->SetVisibility(VISIBILITY_ON); // ...? Hacklike + InVanish = false; + }else Wait_Timer -= diff; + } + + if (Gouge_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_GOUGE); + Gouge_Timer = 5500; + }else Gouge_Timer -= diff; + + if (Kick_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_KICK); + Kick_Timer = 7000; + }else Kick_Timer -= diff; + + if (Eviscerate_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_EVISCERATE); + Eviscerate_Timer = 4000; + }else Eviscerate_Timer -= diff; + + if (!InVanish) + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_kagani_nightstrike(Creature* pCreature) +{ + return new boss_kagani_nightstrikeAI(pCreature); +} + +enum +{ + SPELL_IMMOLATE = 44267, + SPELL_SHADOW_BOLT = 12471, + SPELL_SEED_OF_CORRUPTION = 44141, + SPELL_CURSE_OF_AGONY = 14875, + SPELL_FEAR = 38595, + SPELL_IMP_FIREBALL = 44164, + SPELL_SUMMON_IMP = 44163 +}; + +struct MANGOS_DLL_DECL boss_ellris_duskhallowAI : public boss_priestess_lackey_commonAI +{ + //Warlock + boss_ellris_duskhallowAI(Creature* pCreature) : boss_priestess_lackey_commonAI(pCreature) { Reset(); } + + uint32 Immolate_Timer; + uint32 Shadow_Bolt_Timer; + uint32 Seed_of_Corruption_Timer; + uint32 Curse_of_Agony_Timer; + uint32 Fear_Timer; + + void Reset() + { + Immolate_Timer = 6000; + Shadow_Bolt_Timer = 3000; + Seed_of_Corruption_Timer = 2000; + Curse_of_Agony_Timer = 1000; + Fear_Timer = 10000; + + boss_priestess_lackey_commonAI::Reset(); + } + + void Aggro(Unit* pWho) + { + DoCast(m_creature,SPELL_SUMMON_IMP); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + boss_priestess_lackey_commonAI::UpdateAI(diff); + + if (Immolate_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_IMMOLATE); + Immolate_Timer = 6000; + }else Immolate_Timer -= diff; + + if (Shadow_Bolt_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_SHADOW_BOLT); + Shadow_Bolt_Timer = 5000; + }else Shadow_Bolt_Timer -= diff; + + if (Seed_of_Corruption_Timer < diff) + { + if (Unit* pUnit = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pUnit, SPELL_SEED_OF_CORRUPTION); + + Seed_of_Corruption_Timer = 10000; + }else Seed_of_Corruption_Timer -= diff; + + if (Curse_of_Agony_Timer < diff) + { + if (Unit* pUnit = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pUnit, SPELL_CURSE_OF_AGONY); + + Curse_of_Agony_Timer = 13000; + }else Curse_of_Agony_Timer -= diff; + + if (Fear_Timer < diff) + { + if (Unit* pUnit = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pUnit, SPELL_FEAR); + + Fear_Timer = 10000; + }else Fear_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_ellris_duskhallow(Creature* pCreature) +{ + return new boss_ellris_duskhallowAI(pCreature); +} + +enum +{ + SPELL_KNOCKDOWN = 11428, + SPELL_SNAP_KICK = 46182 +}; + +struct MANGOS_DLL_DECL boss_eramas_brightblazeAI : public boss_priestess_lackey_commonAI +{ + //Monk + boss_eramas_brightblazeAI(Creature* pCreature) : boss_priestess_lackey_commonAI(pCreature) { Reset(); } + + uint32 Knockdown_Timer; + uint32 Snap_Kick_Timer; + + void Reset() + { + Knockdown_Timer = 6000; + Snap_Kick_Timer = 4500; + + boss_priestess_lackey_commonAI::Reset(); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + boss_priestess_lackey_commonAI::UpdateAI(diff); + + if (Knockdown_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_KNOCKDOWN); + Knockdown_Timer = 6000; + }else Knockdown_Timer -= diff; + + if (Snap_Kick_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_SNAP_KICK); + Snap_Kick_Timer = 4500; + }else Snap_Kick_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_eramas_brightblaze(Creature* pCreature) +{ + return new boss_eramas_brightblazeAI(pCreature); +} + +enum +{ + SPELL_POLYMORPH = 13323, + SPELL_ICE_BLOCK = 27619, + SPELL_BLIZZARD = 44178, + SPELL_ICE_LANCE = 46194, + SPELL_CONE_OF_COLD = 38384, + SPELL_FROSTBOLT = 15043, + SPELL_BLINK = 14514 +}; + +struct MANGOS_DLL_DECL boss_yazzaiAI : public boss_priestess_lackey_commonAI +{ + //Mage + boss_yazzaiAI(Creature* pCreature) : boss_priestess_lackey_commonAI(pCreature) { Reset(); } + + bool HasIceBlocked; + + uint32 Polymorph_Timer; + uint32 Ice_Block_Timer; + uint32 Wait_Timer; + uint32 Blizzard_Timer; + uint32 Ice_Lance_Timer; + uint32 Cone_of_Cold_Timer; + uint32 Frostbolt_Timer; + uint32 Blink_Timer; + + void Reset() + { + HasIceBlocked = false; + + Polymorph_Timer = 1000; + Ice_Block_Timer = 20000; + Wait_Timer = 10000; + Blizzard_Timer = 8000; + Ice_Lance_Timer = 12000; + Cone_of_Cold_Timer = 10000; + Frostbolt_Timer = 3000; + Blink_Timer = 8000; + + boss_priestess_lackey_commonAI::Reset(); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + boss_priestess_lackey_commonAI::UpdateAI(diff); + + if (Polymorph_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0)) + { + DoCast(target, SPELL_POLYMORPH); + Polymorph_Timer = 20000; + } + }else Polymorph_Timer -= diff; + + if (((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 35) && !HasIceBlocked) + { + DoCast(m_creature, SPELL_ICE_BLOCK); + HasIceBlocked = true; + } + + if (Blizzard_Timer < diff) + { + if (Unit* pUnit = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pUnit, SPELL_BLIZZARD); + + Blizzard_Timer = 8000; + }else Blizzard_Timer -= diff; + + if (Ice_Lance_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_ICE_LANCE); + Ice_Lance_Timer = 12000; + }else Ice_Lance_Timer -= diff; + + if (Cone_of_Cold_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_CONE_OF_COLD); + Cone_of_Cold_Timer = 10000; + }else Cone_of_Cold_Timer -= diff; + + if (Frostbolt_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_FROSTBOLT); + Frostbolt_Timer = 8000; + }else Frostbolt_Timer -= diff; + + if (Blink_Timer < diff) + { + bool InMeleeRange = false; + std::list& t_list = m_creature->getThreatManager().getThreatList(); + for(std::list::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) + { + if (Unit* target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid())) + { + //if in melee range + if (target->IsWithinDistInMap(m_creature, 5)) + { + InMeleeRange = true; + break; + } + } + } + + //if anybody is in melee range than escape by blink + if (InMeleeRange) + DoCast(m_creature, SPELL_BLINK); + + Blink_Timer = 8000; + }else Blink_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_yazzai(Creature* pCreature) +{ + return new boss_yazzaiAI(pCreature); +} + +enum +{ + SPELL_INTERCEPT_STUN = 27577, + SPELL_DISARM = 27581, + SPELL_PIERCING_HOWL = 23600, + SPELL_FRIGHTENING_SHOUT = 19134, + SPELL_HAMSTRING = 27584, + SPELL_BATTLE_SHOUT = 27578, + SPELL_MORTAL_STRIKE = 44268 +}; + +struct MANGOS_DLL_DECL boss_warlord_salarisAI : public boss_priestess_lackey_commonAI +{ + //Warrior + boss_warlord_salarisAI(Creature* pCreature) : boss_priestess_lackey_commonAI(pCreature) { Reset(); } + + uint32 Intercept_Stun_Timer; + uint32 Disarm_Timer; + uint32 Piercing_Howl_Timer; + uint32 Frightening_Shout_Timer; + uint32 Hamstring_Timer; + uint32 Mortal_Strike_Timer; + + void Reset() + { + Intercept_Stun_Timer = 500; + Disarm_Timer = 6000; + Piercing_Howl_Timer = 10000; + Frightening_Shout_Timer = 18000; + Hamstring_Timer = 4500; + Mortal_Strike_Timer = 8000; + + boss_priestess_lackey_commonAI::Reset(); + } + + void Aggro(Unit* who) + { + DoCast(m_creature, SPELL_BATTLE_SHOUT); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + boss_priestess_lackey_commonAI::UpdateAI(diff); + + if (Intercept_Stun_Timer < diff) + { + bool InMeleeRange = false; + std::list& t_list = m_creature->getThreatManager().getThreatList(); + for(std::list::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) + { + if (Unit* target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid())) + { + //if in melee range + if (target->IsWithinDistInMap(m_creature, ATTACK_DISTANCE)) + { + InMeleeRange = true; + break; + } + } + } + + //if nobody is in melee range than try to use Intercept + if (!InMeleeRange) + { + if (Unit* pUnit = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pUnit, SPELL_INTERCEPT_STUN); + } + + Intercept_Stun_Timer = 10000; + }else Intercept_Stun_Timer -= diff; + + if (Disarm_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_DISARM); + Disarm_Timer = 6000; + }else Disarm_Timer -= diff; + + if (Hamstring_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_HAMSTRING); + Hamstring_Timer = 4500; + }else Hamstring_Timer -= diff; + + if (Mortal_Strike_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_MORTAL_STRIKE); + Mortal_Strike_Timer = 4500; + }else Mortal_Strike_Timer -= diff; + + if (Piercing_Howl_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_PIERCING_HOWL); + Piercing_Howl_Timer = 10000; + }else Piercing_Howl_Timer -= diff; + + if (Frightening_Shout_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_FRIGHTENING_SHOUT); + Frightening_Shout_Timer = 18000; + }else Frightening_Shout_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_warlord_salaris(Creature* pCreature) +{ + return new boss_warlord_salarisAI(pCreature); +} + +enum +{ + SPELL_AIMED_SHOT = 44271, + SPELL_SHOOT = 15620, + SPELL_CONCUSSIVE_SHOT = 27634, + SPELL_MULTI_SHOT = 31942, + SPELL_WING_CLIP = 44286, + SPELL_FREEZING_TRAP = 44136, + + NPC_SLIVER = 24552 +}; + +struct MANGOS_DLL_DECL boss_garaxxasAI : public boss_priestess_lackey_commonAI +{ + //Hunter + boss_garaxxasAI(Creature* pCreature) : boss_priestess_lackey_commonAI(pCreature) + { + SetCombatMovement(false); + m_uiPetGUID = 0; + Reset(); + } + + uint64 m_uiPetGUID; + + uint32 Aimed_Shot_Timer; + uint32 Shoot_Timer; + uint32 Concussive_Shot_Timer; + uint32 Multi_Shot_Timer; + uint32 Wing_Clip_Timer; + uint32 Freezing_Trap_Timer; + + void Reset() + { + Aimed_Shot_Timer = 6000; + Shoot_Timer = 2500; + Concussive_Shot_Timer = 8000; + Multi_Shot_Timer = 10000; + Wing_Clip_Timer = 4000; + Freezing_Trap_Timer = 15000; + + Unit* pPet = Unit::GetUnit(*m_creature,m_uiPetGUID); + if (!pPet) + m_creature->SummonCreature(NPC_SLIVER, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0); + + boss_priestess_lackey_commonAI::Reset(); + } + + void JustSummoned(Creature* pSummoned) + { + m_uiPetGUID = pSummoned->GetGUID(); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + boss_priestess_lackey_commonAI::UpdateAI(diff); + + if (m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE)) + { + if (Wing_Clip_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_WING_CLIP); + Wing_Clip_Timer = 4000; + }else Wing_Clip_Timer -= diff; + + if (Freezing_Trap_Timer < diff) + { + //attempt find go summoned from spell (casted by m_creature) + GameObject* pGo = m_creature->GetGameObject(SPELL_FREEZING_TRAP); + + //if we have a pGo, we need to wait (only one trap at a time) + if (pGo) + Freezing_Trap_Timer = 2500; + else + { + //if pGo does not exist, then we can cast + DoCast(m_creature->getVictim(), SPELL_FREEZING_TRAP); + Freezing_Trap_Timer = 15000; + } + }else Freezing_Trap_Timer -= diff; + + DoMeleeAttackIfReady(); + } + else + { + if (Concussive_Shot_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_CONCUSSIVE_SHOT); + Concussive_Shot_Timer = 8000; + }else Concussive_Shot_Timer -= diff; + + if (Multi_Shot_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_MULTI_SHOT); + Multi_Shot_Timer = 10000; + }else Multi_Shot_Timer -= diff; + + if (Aimed_Shot_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_AIMED_SHOT); + Aimed_Shot_Timer = 6000; + }else Aimed_Shot_Timer -= diff; + + if (Shoot_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_SHOOT); + Shoot_Timer = 2500; + }else Shoot_Timer -= diff; + } + } +}; + +CreatureAI* GetAI_garaxxas(Creature* pCreature) +{ + return new boss_garaxxasAI(pCreature); +} + +enum +{ + SPELL_WINDFURY_TOTEM = 27621, + SPELL_WAR_STOMP = 46026, + SPELL_PURGE = 27626, + SPELL_LESSER_HEALING_WAVE = 44256, + SPELL_FROST_SHOCK = 21401, + SPELL_FIRE_NOVA_TOTEM = 44257, + SPELL_EARTHBIND_TOTEM = 15786 +}; + +struct MANGOS_DLL_DECL boss_apokoAI : public boss_priestess_lackey_commonAI +{ + //Shaman + boss_apokoAI(Creature* pCreature) : boss_priestess_lackey_commonAI(pCreature) { Reset(); } + + uint32 Totem_Timer; + uint8 Totem_Amount; + uint32 War_Stomp_Timer; + uint32 Purge_Timer; + uint32 Healing_Wave_Timer; + uint32 Frost_Shock_Timer; + + void Reset() + { + Totem_Timer = 2000; + Totem_Amount = 1; + War_Stomp_Timer = 10000; + Purge_Timer = 8000; + Healing_Wave_Timer = 5000; + Frost_Shock_Timer = 7000; + + boss_priestess_lackey_commonAI::Reset(); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + boss_priestess_lackey_commonAI::UpdateAI(diff); + + if (Totem_Timer < diff) + { + switch(urand(0, 2)) + { + case 0: DoCast(m_creature, SPELL_WINDFURY_TOTEM); break; + case 1: DoCast(m_creature, SPELL_FIRE_NOVA_TOTEM); break; + case 2: DoCast(m_creature, SPELL_EARTHBIND_TOTEM); break; + } + ++Totem_Amount; + Totem_Timer = Totem_Amount*2000; + }else Totem_Timer -= diff; + + if (War_Stomp_Timer < diff) + { + DoCast(m_creature, SPELL_WAR_STOMP); + War_Stomp_Timer = 10000; + }else War_Stomp_Timer -= diff; + + if (Purge_Timer < diff) + { + if (Unit* pUnit = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pUnit, SPELL_PURGE); + + Purge_Timer = 15000; + }else Purge_Timer -= diff; + + if (Frost_Shock_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_FROST_SHOCK); + Frost_Shock_Timer = 7000; + }else Frost_Shock_Timer -= diff; + + if (Healing_Wave_Timer < diff) + { + // std::vector::iterator itr = Group.begin() + rand()%Group.size(); + // uint64 guid = (*itr)->guid; + // if (guid) + // { + // Unit* pAdd = Unit::GetUnit(*m_creature, (*itr)->guid); + // if (pAdd && pAdd->isAlive()) + // { + DoCast(m_creature, SPELL_LESSER_HEALING_WAVE); + Healing_Wave_Timer = 5000; + // } + // } + }else Healing_Wave_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_apoko(Creature* pCreature) +{ + return new boss_apokoAI(pCreature); +} + +enum +{ + SPELL_GOBLIN_DRAGON_GUN = 44272, + SPELL_ROCKET_LAUNCH = 44137, + SPELL_RECOMBOBULATE = 44274, + SPELL_HIGH_EXPLOSIVE_SHEEP = 44276, + SPELL_FEL_IRON_BOMB = 46024, + SPELL_SHEEP_EXPLOSION = 44279 +}; + +struct MANGOS_DLL_DECL boss_zelfanAI : public boss_priestess_lackey_commonAI +{ + //Engineer + boss_zelfanAI(Creature* pCreature) : boss_priestess_lackey_commonAI(pCreature) { Reset(); } + + uint32 Goblin_Dragon_Gun_Timer; + uint32 Rocket_Launch_Timer; + uint32 Recombobulate_Timer; + uint32 High_Explosive_Sheep_Timer; + uint32 Fel_Iron_Bomb_Timer; + + void Reset() + { + Goblin_Dragon_Gun_Timer = 20000; + Rocket_Launch_Timer = 7000; + Recombobulate_Timer = 4000; + High_Explosive_Sheep_Timer = 10000; + Fel_Iron_Bomb_Timer = 15000; + + boss_priestess_lackey_commonAI::Reset(); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + boss_priestess_lackey_commonAI::UpdateAI(diff); + + if (Goblin_Dragon_Gun_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_GOBLIN_DRAGON_GUN); + Goblin_Dragon_Gun_Timer = 10000; + }else Goblin_Dragon_Gun_Timer -= diff; + + if (Rocket_Launch_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_ROCKET_LAUNCH); + Rocket_Launch_Timer = 9000; + }else Rocket_Launch_Timer -= diff; + + if (Fel_Iron_Bomb_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_FEL_IRON_BOMB); + Fel_Iron_Bomb_Timer = 15000; + }else Fel_Iron_Bomb_Timer -= diff; + + if (Recombobulate_Timer < diff) + { + for(uint8 i = 0; i < MAX_ACTIVE_LACKEY; ++i) + { + if (Unit* pAdd = Unit::GetUnit(*m_creature, m_auiLackeyGUIDs[i])) + { + if (pAdd->IsPolymorphed()) + { + DoCast(pAdd, SPELL_RECOMBOBULATE); + break; + } + } + } + Recombobulate_Timer = 2000; + }else Recombobulate_Timer -= diff; + + if (High_Explosive_Sheep_Timer < diff) + { + DoCast(m_creature, SPELL_HIGH_EXPLOSIVE_SHEEP); + High_Explosive_Sheep_Timer = 65000; + }else High_Explosive_Sheep_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_zelfan(Creature* pCreature) +{ + return new boss_zelfanAI(pCreature); +} + +//struct MANGOS_DLL_DECL mob_high_explosive_sheepAI : public ScriptedAI +//{ +// mob_high_explosive_sheepAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} +// +// uint32 Explosion_Timer; +// +// void Reset() +// { +// Explosion_Timer = 60000; +// } +// +// void JustDied(Unit *Killer){} +// +// void UpdateAI(const uint32 diff) +// { +// if (Explosion_Timer < diff) +// { +// DoCast(m_creature->getVictim(), SPELL_SHEEP_EXPLOSION); +// }else +// Explosion_Timer -= diff; +// } +//}; + +//CreatureAI* GetAI_mob_high_explosive_sheep(Creature* pCreature) +//{ +// return new mob_high_explosive_sheepAI(pCreature); +//}; + +void AddSC_boss_priestess_delrissa() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_priestess_delrissa"; + newscript->GetAI = &GetAI_boss_priestess_delrissa; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_kagani_nightstrike"; + newscript->GetAI = &GetAI_boss_kagani_nightstrike; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_ellris_duskhallow"; + newscript->GetAI = &GetAI_ellris_duskhallow; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_eramas_brightblaze"; + newscript->GetAI = &GetAI_eramas_brightblaze; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_yazzai"; + newscript->GetAI = &GetAI_yazzai; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_warlord_salaris"; + newscript->GetAI = &GetAI_warlord_salaris; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_garaxxas"; + newscript->GetAI = &GetAI_garaxxas; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_apoko"; + newscript->GetAI = &GetAI_apoko; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_zelfan"; + newscript->GetAI = &GetAI_zelfan; + newscript->RegisterSelf(); + + /*newscript = new Script; + newscript->Name = "mob_high_explosive_sheep"; + newscript->GetAI = &GetAI_mob_high_explosive_sheep; + newscript->RegisterSelf();*/ +} diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp new file mode 100644 index 000000000..ed08df2d5 --- /dev/null +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp @@ -0,0 +1,380 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Selin_Fireheart +SD%Complete: 90 +SDComment: Heroic and Normal Support. Needs further testing. +SDCategory: Magister's Terrace +EndScriptData */ + +#include "precompiled.h" +#include "magisters_terrace.h" + +#define SAY_AGGRO -1585000 +#define SAY_ENERGY -1585001 +#define SAY_EMPOWERED -1585002 +#define SAY_KILL_1 -1585003 +#define SAY_KILL_2 -1585004 +#define SAY_DEATH -1585005 +#define EMOTE_CRYSTAL -1585006 + +//Crystal effect spells +#define SPELL_FEL_CRYSTAL_COSMETIC 44374 +#define SPELL_FEL_CRYSTAL_DUMMY 44329 +#define SPELL_FEL_CRYSTAL_VISUAL 44355 +#define SPELL_MANA_RAGE 44320 // This spell triggers 44321, which changes scale and regens mana Requires an entry in spell_script_target + +//Selin's spells +#define SPELL_DRAIN_LIFE 44294 +#define SPELL_FEL_EXPLOSION 44314 + +#define SPELL_DRAIN_MANA 46153 // Heroic only + +#define CRYSTALS_NUMBER 5 +#define DATA_CRYSTALS 6 + +#define CREATURE_FEL_CRYSTAL 24722 + +struct MANGOS_DLL_DECL boss_selin_fireheartAI : public ScriptedAI +{ + boss_selin_fireheartAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + + Crystals.clear(); + //GUIDs per instance is static, so we only need to load them once. + if (m_pInstance) + { + uint32 size = m_pInstance->GetData(DATA_FEL_CRYSTAL_SIZE); + for(uint8 i = 0; i < size; ++i) + { + uint64 guid = m_pInstance->GetData64(DATA_FEL_CRYSTAL); + debug_log("SD2: Selin: Adding Fel Crystal %u to list", guid); + Crystals.push_back(guid); + } + } + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + std::list Crystals; + + uint32 DrainLifeTimer; + uint32 DrainManaTimer; + uint32 FelExplosionTimer; + uint32 DrainCrystalTimer; + uint32 EmpowerTimer; + + bool IsDraining; + bool DrainingCrystal; + + uint64 CrystalGUID; // This will help us create a pointer to the crystal we are draining. We store GUIDs, never units in case unit is deleted/offline (offline if player of course). + + void Reset() + { + if (m_pInstance) + { + //for(uint8 i = 0; i < CRYSTALS_NUMBER; ++i) + for(std::list::iterator itr = Crystals.begin(); itr != Crystals.end(); ++itr) + { + //Unit* pUnit = Unit::GetUnit(*m_creature, FelCrystals[i]); + Unit* pUnit = Unit::GetUnit(*m_creature, *itr); + if (pUnit) + { + if (!pUnit->isAlive()) + ((Creature*)pUnit)->Respawn(); // Let MaNGOS handle setting death state, etc. + + // Only need to set unselectable flag. You can't attack unselectable units so non_attackable flag is not necessary here. + pUnit->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } + } + + if (GameObject* pDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_SELIN_ENCOUNTER_DOOR))) + pDoor->SetGoState(GO_STATE_ACTIVE); // Open the big encounter door. Close it in Aggro and open it only in JustDied(and here) + // Small door opened after event are expected to be closed by default + // Set Inst data for encounter + m_pInstance->SetData(DATA_SELIN_EVENT, NOT_STARTED); + }else error_log(ERROR_INST_DATA); + + DrainLifeTimer = urand(3000, 7000); + DrainManaTimer = DrainLifeTimer + 5000; + FelExplosionTimer = 2100; + DrainCrystalTimer = urand(10000, 15000); + DrainCrystalTimer = urand(20000, 25000); + EmpowerTimer = 10000; + + IsDraining = false; + DrainingCrystal = false; + CrystalGUID = 0; + } + + void SelectNearestCrystal() + { + if (Crystals.empty()) + return; + + float ShortestDistance = 0; + CrystalGUID = 0; + Unit* pCrystal = NULL; + Unit* CrystalChosen = NULL; + //for(uint8 i = 0; i < CRYSTALS_NUMBER; ++i) + for(std::list::iterator itr = Crystals.begin(); itr != Crystals.end(); ++itr) + { + pCrystal = NULL; + //pCrystal = Unit::GetUnit(*m_creature, FelCrystals[i]); + pCrystal = Unit::GetUnit(*m_creature, *itr); + if (pCrystal && pCrystal->isAlive()) + { + // select nearest + if(!CrystalChosen || m_creature->GetDistanceOrder(pCrystal, CrystalChosen, false)) + { + CrystalGUID = pCrystal->GetGUID(); + CrystalChosen = pCrystal; // Store a copy of pCrystal so we don't need to recreate a pointer to closest crystal for the movement and yell. + } + } + } + if (CrystalChosen) + { + DoScriptText(SAY_ENERGY, m_creature); + DoScriptText(EMOTE_CRYSTAL, m_creature); + + CrystalChosen->CastSpell(CrystalChosen, SPELL_FEL_CRYSTAL_COSMETIC, true); + + float x, y, z; // coords that we move to, close to the crystal. + CrystalChosen->GetClosePoint(x, y, z, m_creature->GetObjectSize(), CONTACT_DISTANCE); + + m_creature->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + m_creature->GetMotionMaster()->MovePoint(1, x, y, z); + DrainingCrystal = true; + } + } + + void ShatterRemainingCrystals() + { + if (Crystals.empty()) + return; + + //for(uint8 i = 0; i < CRYSTALS_NUMBER; ++i) + for(std::list::iterator itr = Crystals.begin(); itr != Crystals.end(); ++itr) + { + //Creature* pCrystal = ((Creature*)Unit::GetUnit(*m_creature, FelCrystals[i])); + Creature* pCrystal = ((Creature*)Unit::GetUnit(*m_creature, *itr)); + if (pCrystal && pCrystal->isAlive()) + pCrystal->DealDamage(pCrystal, pCrystal->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + } + + void Aggro(Unit* who) + { + DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + { + //Close the encounter door, open it in JustDied/Reset + if (GameObject* pEncounterDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_SELIN_ENCOUNTER_DOOR))) + pEncounterDoor->SetGoState(GO_STATE_READY); + } + } + + void KilledUnit(Unit* victim) + { + DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); + } + + void MovementInform(uint32 type, uint32 id) + { + if (type == POINT_MOTION_TYPE && id == 1) + { + Unit* CrystalChosen = Unit::GetUnit(*m_creature, CrystalGUID); + if (CrystalChosen && CrystalChosen->isAlive()) + { + // Make the crystal attackable + // We also remove NON_ATTACKABLE in case the database has it set. + CrystalChosen->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE + UNIT_FLAG_NOT_SELECTABLE); + CrystalChosen->CastSpell(m_creature, SPELL_MANA_RAGE, true); + IsDraining = true; + } + else + { + // Make an error message in case something weird happened here + error_log("SD2: Selin Fireheart unable to drain crystal as the crystal is either dead or despawned"); + DrainingCrystal = false; + } + } + } + + void JustDied(Unit* killer) + { + DoScriptText(SAY_DEATH, m_creature); + + if (!m_pInstance) + { + error_log(ERROR_INST_DATA); + return; + } + + m_pInstance->SetData(DATA_SELIN_EVENT, DONE); // Encounter complete! + + if (GameObject* pEncounterDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_SELIN_ENCOUNTER_DOOR))) + pEncounterDoor->SetGoState(GO_STATE_ACTIVE); // Open the encounter door + + if (GameObject* pContinueDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_SELIN_DOOR))) + pContinueDoor->SetGoState(GO_STATE_ACTIVE); // Open the door leading further in + + ShatterRemainingCrystals(); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (!DrainingCrystal) + { + uint32 maxPowerMana = m_creature->GetMaxPower(POWER_MANA); + if (maxPowerMana && ((m_creature->GetPower(POWER_MANA)*100 / maxPowerMana) < 10)) + { + if (DrainLifeTimer < diff) + { + DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_DRAIN_LIFE); + DrainLifeTimer = 10000; + }else DrainLifeTimer -= diff; + + // Heroic only + if (m_bIsHeroicMode) + { + if (DrainManaTimer < diff) + { + DoCast(SelectUnit(SELECT_TARGET_RANDOM, 1), SPELL_DRAIN_MANA); + DrainManaTimer = 10000; + }else DrainManaTimer -= diff; + } + } + + if (FelExplosionTimer < diff) + { + if (!m_creature->IsNonMeleeSpellCasted(false)) + { + DoCast(m_creature, SPELL_FEL_EXPLOSION); + FelExplosionTimer = 2000; + } + }else FelExplosionTimer -= diff; + + // If below 10% mana, start recharging + maxPowerMana = m_creature->GetMaxPower(POWER_MANA); + if (maxPowerMana && ((m_creature->GetPower(POWER_MANA)*100 / maxPowerMana) < 10)) + { + if (DrainCrystalTimer < diff) + { + SelectNearestCrystal(); + + if (m_bIsHeroicMode) + DrainCrystalTimer = urand(10000, 15000); + else + DrainCrystalTimer = urand(20000, 25000); + + }else DrainCrystalTimer -= diff; + } + + }else + { + if (IsDraining) + { + if (EmpowerTimer < diff) + { + IsDraining = false; + DrainingCrystal = false; + + DoScriptText(SAY_EMPOWERED, m_creature); + + Unit* CrystalChosen = Unit::GetUnit(*m_creature, CrystalGUID); + if (CrystalChosen && CrystalChosen->isAlive()) + // Use Deal Damage to kill it, not setDeathState. + CrystalChosen->DealDamage(CrystalChosen, CrystalChosen->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + + CrystalGUID = 0; + + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + }else EmpowerTimer -= diff; + } + } + + DoMeleeAttackIfReady(); // No need to check if we are draining crystal here, as the spell has a stun. + } +}; + +CreatureAI* GetAI_boss_selin_fireheart(Creature* pCreature) +{ + return new boss_selin_fireheartAI(pCreature); +}; + +struct MANGOS_DLL_DECL mob_fel_crystalAI : public ScriptedAI +{ + mob_fel_crystalAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + void Reset() {} + void AttackStart(Unit* who) {} + void MoveInLineOfSight(Unit* who) {} + void UpdateAI(const uint32 diff) {} + + void JustDied(Unit* killer) + { + if (ScriptedInstance* pInstance = ((ScriptedInstance*)m_creature->GetInstanceData())) + { + Creature* Selin = ((Creature*)Unit::GetUnit(*m_creature, pInstance->GetData64(DATA_SELIN))); + if (Selin && Selin->isAlive()) + { + if (((boss_selin_fireheartAI*)Selin->AI())->CrystalGUID == m_creature->GetGUID()) + { + // Set this to false if we are the creature that Selin is draining so his AI flows properly + ((boss_selin_fireheartAI*)Selin->AI())->DrainingCrystal = false; + ((boss_selin_fireheartAI*)Selin->AI())->IsDraining = false; + ((boss_selin_fireheartAI*)Selin->AI())->EmpowerTimer = 10000; + if (Selin->getVictim()) + { + Selin->AI()->AttackStart(Selin->getVictim()); + Selin->GetMotionMaster()->MoveChase(Selin->getVictim()); + } + } + } + }else error_log(ERROR_INST_DATA); + } +}; + +CreatureAI* GetAI_mob_fel_crystal(Creature* pCreature) +{ + return new mob_fel_crystalAI(pCreature); +}; + +void AddSC_boss_selin_fireheart() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_selin_fireheart"; + newscript->GetAI = &GetAI_boss_selin_fireheart; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_fel_crystal"; + newscript->GetAI = &GetAI_mob_fel_crystal; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp new file mode 100644 index 000000000..7a118fab0 --- /dev/null +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp @@ -0,0 +1,228 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Vexallus +SD%Complete: 90 +SDComment: Heroic and Normal support. Needs further testing. +SDCategory: Magister's Terrace +EndScriptData */ + +#include "precompiled.h" +#include "magisters_terrace.h" + +enum +{ + SAY_AGGRO = -1585007, + SAY_ENERGY = -1585008, + SAY_OVERLOAD = -1585009, + SAY_KILL = -1585010, + EMOTE_DISCHARGE_ENERGY = -1585011, + + //is this text for real? + //#define SAY_DEATH "What...happen...ed." + + //Pure energy spell info + SPELL_ENERGY_BOLT = 46156, + SPELL_ENERGY_FEEDBACK = 44335, + + //Vexallus spell info + SPELL_CHAIN_LIGHTNING = 44318, + SPELL_H_CHAIN_LIGHTNING = 46380, //heroic spell + SPELL_OVERLOAD = 44353, + SPELL_ARCANE_SHOCK = 44319, + SPELL_H_ARCANE_SHOCK = 46381, //heroic spell + + SPELL_SUMMON_PURE_ENERGY = 44322, //mod scale -10 + H_SPELL_SUMMON_PURE_ENERGY1 = 46154, //mod scale -5 + H_SPELL_SUMMON_PURE_ENERGY2 = 46159, //mod scale -5 + + //Creatures + NPC_PURE_ENERGY = 24745, + + INTERVAL_MODIFIER = 15, + INTERVAL_SWITCH = 6 +}; + +struct MANGOS_DLL_DECL boss_vexallusAI : public ScriptedAI +{ + boss_vexallusAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + uint32 ChainLightningTimer; + uint32 ArcaneShockTimer; + uint32 OverloadTimer; + uint32 IntervalHealthAmount; + bool Enraged; + + void Reset() + { + ChainLightningTimer = 8000; + ArcaneShockTimer = 5000; + OverloadTimer = 1200; + IntervalHealthAmount = 1; + Enraged = false; + + if (m_pInstance) + m_pInstance->SetData(DATA_VEXALLUS_EVENT, NOT_STARTED); + } + + void KilledUnit(Unit *victim) + { + DoScriptText(SAY_KILL, m_creature); + } + + void JustDied(Unit *victim) + { + if (m_pInstance) + m_pInstance->SetData(DATA_VEXALLUS_EVENT, DONE); + } + + void Aggro(Unit *who) + { + DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(DATA_VEXALLUS_EVENT, IN_PROGRESS); + } + + void JustSummoned(Creature *summoned) + { + if (Unit *temp = SelectUnit(SELECT_TARGET_RANDOM, 0)) + summoned->GetMotionMaster()->MoveFollow(temp,0,0); + + //spells are SUMMON_TYPE_GUARDIAN, so using setOwner should be ok + summoned->SetOwnerGUID(m_creature->GetGUID()); + summoned->CastSpell(summoned,SPELL_ENERGY_BOLT,false,0,0,m_creature->GetGUID()); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (!Enraged) + { + //used for check, when Vexallus cast adds 85%, 70%, 55%, 40%, 25% + if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) <= (100-(INTERVAL_MODIFIER*IntervalHealthAmount))) + { + //increase amount, unless we're at 10%, then we switch and return + if (IntervalHealthAmount == INTERVAL_SWITCH) + { + Enraged = true; + return; + } + else + ++IntervalHealthAmount; + + DoScriptText(SAY_ENERGY, m_creature); + DoScriptText(EMOTE_DISCHARGE_ENERGY, m_creature); + + if (m_bIsHeroicMode) + { + m_creature->CastSpell(m_creature,H_SPELL_SUMMON_PURE_ENERGY1,false); + m_creature->CastSpell(m_creature,H_SPELL_SUMMON_PURE_ENERGY2,false); + } + else + m_creature->CastSpell(m_creature,SPELL_SUMMON_PURE_ENERGY,false); + + //below are workaround summons, remove when summoning spells w/implicitTarget 73 implemented in Mangos + m_creature->SummonCreature(NPC_PURE_ENERGY, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0); + + if (m_bIsHeroicMode) + m_creature->SummonCreature(NPC_PURE_ENERGY, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0); + } + + if (ChainLightningTimer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(target, m_bIsHeroicMode ? SPELL_H_CHAIN_LIGHTNING : SPELL_CHAIN_LIGHTNING); + + ChainLightningTimer = 8000; + }else ChainLightningTimer -= diff; + + if (ArcaneShockTimer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(target, m_bIsHeroicMode ? SPELL_H_ARCANE_SHOCK : SPELL_ARCANE_SHOCK); + + ArcaneShockTimer = 8000; + }else ArcaneShockTimer -= diff; + } + else + { + if (OverloadTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_OVERLOAD); + + OverloadTimer = 2000; + }else OverloadTimer -= diff; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_vexallus(Creature* pCreature) +{ + return new boss_vexallusAI(pCreature); +}; + +struct MANGOS_DLL_DECL mob_pure_energyAI : public ScriptedAI +{ + mob_pure_energyAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + void Reset() { } + + void JustDied(Unit* slayer) + { + if (Unit *temp = m_creature->GetOwner()) + { + if (temp && temp->isAlive()) + slayer->CastSpell(slayer, SPELL_ENERGY_FEEDBACK, true, 0, 0, temp->GetGUID()); + } + } + + void MoveInLineOfSight(Unit *who) { } + void AttackStart(Unit *who) { } +}; + +CreatureAI* GetAI_mob_pure_energy(Creature* pCreature) +{ + return new mob_pure_energyAI(pCreature); +}; + +void AddSC_boss_vexallus() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_vexallus"; + newscript->GetAI = &GetAI_boss_vexallus; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_pure_energy"; + newscript->GetAI = &GetAI_mob_pure_energy; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp b/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp new file mode 100644 index 000000000..bb965cbcb --- /dev/null +++ b/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp @@ -0,0 +1,207 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance_Magisters_Terrace +SD%Complete: 60 +SDComment: Designed only for Selin Fireheart +SDCategory: Magister's Terrace +EndScriptData */ + +#include "precompiled.h" +#include "magisters_terrace.h" + +#define MAX_ENCOUNTER 4 + +/* +0 - Selin Fireheart +1 - Vexallus +2 - Priestess Delrissa +3 - Kael'thas Sunstrider +*/ + +struct MANGOS_DLL_DECL instance_magisters_terrace : public ScriptedInstance +{ + instance_magisters_terrace(Map* pMap) : ScriptedInstance(pMap) {Initialize();} + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + + uint32 m_uiDelrissaDeathCount; + + std::list FelCrystals; + std::list::iterator CrystalItr; + + uint64 m_uiSelinGUID; + uint64 m_uiDelrissaGUID; + uint64 m_uiVexallusDoorGUID; + uint64 m_uiSelinDoorGUID; + uint64 m_uiSelinEncounterDoorGUID; + uint64 m_uiDelrissaDoorGUID; + uint64 m_uiKaelDoorGUID; + uint64 m_auiKaelStatue[2]; + + bool m_bInitializedItr; + + void Initialize() + { + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + memset(&m_auiKaelStatue, 0, sizeof(m_auiKaelStatue)); + + FelCrystals.clear(); + + m_uiDelrissaDeathCount = 0; + + m_uiSelinGUID = 0; + m_uiDelrissaGUID = 0; + m_uiVexallusDoorGUID = 0; + m_uiSelinDoorGUID = 0; + m_uiSelinEncounterDoorGUID = 0; + m_uiDelrissaDoorGUID = 0; + m_uiKaelDoorGUID = 0; + + m_bInitializedItr = false; + } + + bool IsEncounterInProgress() const + { + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + if (m_auiEncounter[i] == IN_PROGRESS) + return true; + return false; + } + + uint32 GetData(uint32 identifier) + { + switch(identifier) + { + case DATA_SELIN_EVENT: return m_auiEncounter[0]; + case DATA_VEXALLUS_EVENT: return m_auiEncounter[1]; + case DATA_DELRISSA_EVENT: return m_auiEncounter[2]; + case DATA_KAELTHAS_EVENT: return m_auiEncounter[3]; + case DATA_DELRISSA_DEATH_COUNT: return m_uiDelrissaDeathCount; + case DATA_FEL_CRYSTAL_SIZE: return FelCrystals.size(); + } + return 0; + } + + void SetData(uint32 identifier, uint32 data) + { + switch(identifier) + { + case DATA_SELIN_EVENT: + m_auiEncounter[0] = data; + break; + case DATA_VEXALLUS_EVENT: + if (data == DONE) + DoUseDoorOrButton(m_uiVexallusDoorGUID); + m_auiEncounter[1] = data; + break; + case DATA_DELRISSA_EVENT: + if (data == DONE) + DoUseDoorOrButton(m_uiDelrissaDoorGUID); + if (data == IN_PROGRESS) + m_uiDelrissaDeathCount = 0; + m_auiEncounter[2] = data; + break; + case DATA_KAELTHAS_EVENT: + m_auiEncounter[3] = data; + break; + case DATA_DELRISSA_DEATH_COUNT: + if (data == SPECIAL) + ++m_uiDelrissaDeathCount; + else + m_uiDelrissaDeathCount = 0; + break; + } + } + + void OnCreatureCreate(Creature* pCreature) + { + switch(pCreature->GetEntry()) + { + case 24723: m_uiSelinGUID = pCreature->GetGUID(); break; + case 24560: m_uiDelrissaGUID = pCreature->GetGUID(); break; + case 24722: FelCrystals.push_back(pCreature->GetGUID()); break; + } + } + + void OnObjectCreate(GameObject* go) + { + switch(go->GetEntry()) + { + case 187896: m_uiVexallusDoorGUID = go->GetGUID(); break; + //SunwellRaid Gate 02 + case 187979: m_uiSelinDoorGUID = go->GetGUID(); break; + //Assembly Chamber Door + case 188065: m_uiSelinEncounterDoorGUID = go->GetGUID(); break; + case 187770: m_uiDelrissaDoorGUID = go->GetGUID(); break; + case 188064: m_uiKaelDoorGUID = go->GetGUID(); break; + case 188165: m_auiKaelStatue[0] = go->GetGUID(); break; + case 188166: m_auiKaelStatue[1] = go->GetGUID(); break; + } + } + + uint64 GetData64(uint32 identifier) + { + switch(identifier) + { + case DATA_SELIN: return m_uiSelinGUID; + case DATA_DELRISSA: return m_uiDelrissaGUID; + case DATA_VEXALLUS_DOOR: return m_uiVexallusDoorGUID; + case DATA_SELIN_DOOR: return m_uiSelinDoorGUID; + case DATA_SELIN_ENCOUNTER_DOOR: return m_uiSelinEncounterDoorGUID; + case DATA_DELRISSA_DOOR: return m_uiDelrissaDoorGUID; + case DATA_KAEL_DOOR: return m_uiKaelDoorGUID; + case DATA_KAEL_STATUE_LEFT: return m_auiKaelStatue[0]; + case DATA_KAEL_STATUE_RIGHT: return m_auiKaelStatue[1]; + + case DATA_FEL_CRYSTAL: + { + if (FelCrystals.empty()) + { + error_log("SD2: Magisters Terrace: No Fel Crystals loaded in Inst Data"); + return 0; + } + + if (!m_bInitializedItr) + { + CrystalItr = FelCrystals.begin(); + m_bInitializedItr = true; + } + + uint64 guid = *CrystalItr; + ++CrystalItr; + return guid; + } + } + return 0; + } +}; + +InstanceData* GetInstanceData_instance_magisters_terrace(Map* pMap) +{ + return new instance_magisters_terrace(pMap); +} + +void AddSC_instance_magisters_terrace() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "instance_magisters_terrace"; + newscript->GetInstanceData = &GetInstanceData_instance_magisters_terrace; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp new file mode 100644 index 000000000..3b87f41ce --- /dev/null +++ b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp @@ -0,0 +1,174 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Magisters_Terrace +SD%Complete: 100 +SDComment: Quest support: 11490(post-event) +SDCategory: Magisters Terrace +EndScriptData */ + +/* ContentData +npc_kalecgos +EndContentData */ + +#include "precompiled.h" + +/*###### +## npc_kalecgos +######*/ + +enum +{ + SPELL_TRANSFORM_TO_KAEL = 44670, + SPELL_ORB_KILL_CREDIT = 46307, + NPC_KAEL = 24848, //human form entry + POINT_ID_LAND = 1 +}; + +const float afKaelLandPoint[] = {225.045, -276.236, -5.434}; + +#define GOSSIP_ITEM_KAEL_1 "Who are you?" +#define GOSSIP_ITEM_KAEL_2 "What can we do to assist you?" +#define GOSSIP_ITEM_KAEL_3 "What brings you to the Sunwell?" +#define GOSSIP_ITEM_KAEL_4 "You're not alone here?" +#define GOSSIP_ITEM_KAEL_5 "What would Kil'jaeden want with a mortal woman?" + +// This is friendly keal that appear after used Orb. +// If we assume DB handle summon, summon appear somewhere outside the platform where Orb is +struct MANGOS_DLL_DECL npc_kalecgosAI : public ScriptedAI +{ + npc_kalecgosAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + uint32 m_uiTransformTimer; + + void Reset() + { + m_uiTransformTimer = 0; + + // we must assume he appear as dragon somewhere outside the platform of orb, and then move directly to here + if (m_creature->GetEntry() != NPC_KAEL) + m_creature->GetMotionMaster()->MovePoint(POINT_ID_LAND, afKaelLandPoint[0], afKaelLandPoint[1], afKaelLandPoint[2]); + } + + void MovementInform(uint32 uiType, uint32 uiPointId) + { + if (uiType != POINT_MOTION_TYPE) + return; + + if (uiPointId == POINT_ID_LAND) + m_uiTransformTimer = MINUTE*IN_MILISECONDS; + } + + // some targeting issues with the spell, so use this workaround as temporary solution + void DoWorkaroundForQuestCredit() + { + Map* pMap = m_creature->GetMap(); + + if (!pMap || pMap->IsHeroic()) + return; + + Map::PlayerList const &lList = pMap->GetPlayers(); + + if (lList.isEmpty()) + return; + + SpellEntry const* pSpell = GetSpellStore()->LookupEntry(SPELL_ORB_KILL_CREDIT); + + for(Map::PlayerList::const_iterator i = lList.begin(); i != lList.end(); ++i) + { + if (Player* pPlayer = i->getSource()) + { + if (pSpell && pSpell->EffectMiscValue[0]) + pPlayer->KilledMonsterCredit(pSpell->EffectMiscValue[0], 0); + } + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_uiTransformTimer) + { + if (m_uiTransformTimer < uiDiff) + { + m_creature->CastSpell(m_creature,SPELL_ORB_KILL_CREDIT,false); + DoWorkaroundForQuestCredit(); + + // Transform and update entry, now ready for quest/read gossip + m_creature->CastSpell(m_creature,SPELL_TRANSFORM_TO_KAEL,false); + m_creature->UpdateEntry(NPC_KAEL); + + m_uiTransformTimer = 0; + }else m_uiTransformTimer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_npc_kalecgos(Creature* pCreature) +{ + return new npc_kalecgosAI(pCreature); +} + +bool GossipHello_npc_kalecgos(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KAEL_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + pPlayer->SEND_GOSSIP_MENU(12498, pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_kalecgos(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KAEL_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->SEND_GOSSIP_MENU(12500, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KAEL_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->SEND_GOSSIP_MENU(12502, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KAEL_4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->SEND_GOSSIP_MENU(12606, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+3: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KAEL_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->SEND_GOSSIP_MENU(12607, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+4: + pPlayer->SEND_GOSSIP_MENU(12608, pCreature->GetGUID()); + break; + } + + return true; +} + +void AddSC_magisters_terrace() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_kalecgos"; + newscript->GetAI = &GetAI_npc_kalecgos; + newscript->pGossipHello = &GossipHello_npc_kalecgos; + newscript->pGossipSelect = &GossipSelect_npc_kalecgos; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h new file mode 100644 index 000000000..bf28e6369 --- /dev/null +++ b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h @@ -0,0 +1,30 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_MAGISTERS_TERRACE_H +#define DEF_MAGISTERS_TERRACE_H + +#define DATA_SELIN_EVENT 1 +#define DATA_VEXALLUS_EVENT 2 +#define DATA_DELRISSA_EVENT 3 +#define DATA_KAELTHAS_EVENT 4 + +#define DATA_SELIN 5 +#define DATA_FEL_CRYSTAL 6 +#define DATA_FEL_CRYSTAL_SIZE 7 + +#define DATA_VEXALLUS_DOOR 8 +#define DATA_SELIN_DOOR 9 +#define DATA_DELRISSA 10 +#define DATA_DELRISSA_DOOR 11 +#define DATA_SELIN_ENCOUNTER_DOOR 12 + +#define DATA_KAEL_DOOR 13 +#define DATA_KAEL_STATUE_LEFT 14 +#define DATA_KAEL_STATUE_RIGHT 15 + +#define DATA_DELRISSA_DEATH_COUNT 16 + +#define ERROR_INST_DATA "SD2 Error: Instance Data not set properly for Magister's Terrace instance (map 585). Encounters will be buggy." +#endif diff --git a/scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp b/scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp new file mode 100644 index 000000000..61e986567 --- /dev/null +++ b/scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp @@ -0,0 +1,104 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Baron_Geddon +SD%Complete: 100 +SDComment: +SDCategory: Molten Core +EndScriptData */ + +#include "precompiled.h" + +#define EMOTE_SERVICE -1409000 + +#define SPELL_INFERNO 19695 +#define SPELL_IGNITEMANA 19659 +#define SPELL_LIVINGBOMB 20475 +#define SPELL_ARMAGEDDOM 20479 + +struct MANGOS_DLL_DECL boss_baron_geddonAI : public ScriptedAI +{ + boss_baron_geddonAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 Inferno_Timer; + uint32 IgniteMana_Timer; + uint32 LivingBomb_Timer; + + void Reset() + { + Inferno_Timer = 45000; //These times are probably wrong + IgniteMana_Timer = 30000; + LivingBomb_Timer = 35000; + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //If we are <2% hp cast Armageddom + if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 2) + { + m_creature->InterruptNonMeleeSpells(true); + + DoCast(m_creature,SPELL_ARMAGEDDOM); + DoScriptText(EMOTE_SERVICE, m_creature); + return; + } + + //Inferno_Timer + if (Inferno_Timer < diff) + { + DoCast(m_creature,SPELL_INFERNO); + Inferno_Timer = 45000; + }else Inferno_Timer -= diff; + + //IgniteMana_Timer + if (IgniteMana_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_IGNITEMANA); + + IgniteMana_Timer = 30000; + }else IgniteMana_Timer -= diff; + + //LivingBomb_Timer + if (LivingBomb_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_LIVINGBOMB); + + LivingBomb_Timer = 35000; + }else LivingBomb_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_baron_geddon(Creature* pCreature) +{ + return new boss_baron_geddonAI(pCreature); +} + +void AddSC_boss_baron_geddon() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_baron_geddon"; + newscript->GetAI = &GetAI_boss_baron_geddon; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/molten_core/boss_garr.cpp b/scripts/eastern_kingdoms/molten_core/boss_garr.cpp new file mode 100644 index 000000000..3b16edca8 --- /dev/null +++ b/scripts/eastern_kingdoms/molten_core/boss_garr.cpp @@ -0,0 +1,134 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Garr +SD%Complete: 50 +SDComment: Adds NYI +SDCategory: Molten Core +EndScriptData */ + +#include "precompiled.h" + +// Garr spells +#define SPELL_ANTIMAGICPULSE 19492 +#define SPELL_MAGMASHACKLES 19496 +#define SPELL_ENRAGE 19516 //Stacking enrage (stacks to 10 times) + +//Add spells +#define SPELL_ERUPTION 19497 +#define SPELL_IMMOLATE 20294 + +struct MANGOS_DLL_DECL boss_garrAI : public ScriptedAI +{ + boss_garrAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 AntiMagicPulse_Timer; + uint32 MagmaShackles_Timer; + uint32 CheckAdds_Timer; + uint64 Add[8]; + bool Enraged[8]; + + void Reset() + { + AntiMagicPulse_Timer = 25000; //These times are probably wrong + MagmaShackles_Timer = 15000; + CheckAdds_Timer = 2000; + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //AntiMagicPulse_Timer + if (AntiMagicPulse_Timer < diff) + { + DoCast(m_creature,SPELL_ANTIMAGICPULSE); + AntiMagicPulse_Timer = urand(10000, 15000); + }else AntiMagicPulse_Timer -= diff; + + //MagmaShackles_Timer + if (MagmaShackles_Timer < diff) + { + DoCast(m_creature,SPELL_MAGMASHACKLES); + MagmaShackles_Timer = urand(8000, 12000); + }else MagmaShackles_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +struct MANGOS_DLL_DECL mob_fireswornAI : public ScriptedAI +{ + mob_fireswornAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 Immolate_Timer; + + void Reset() + { + Immolate_Timer = 4000; //These times are probably wrong + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Immolate_Timer + if (Immolate_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_IMMOLATE); + + Immolate_Timer = urand(5000, 10000); + }else Immolate_Timer -= diff; + + //Cast Erruption and let them die + if (m_creature->GetHealth() <= m_creature->GetMaxHealth() * 0.10) + { + DoCast(m_creature->getVictim(),SPELL_ERUPTION); + m_creature->setDeathState(JUST_DIED); + m_creature->RemoveCorpse(); + } + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_garr(Creature* pCreature) +{ + return new boss_garrAI(pCreature); +} + +CreatureAI* GetAI_mob_firesworn(Creature* pCreature) +{ + return new mob_fireswornAI(pCreature); +} + +void AddSC_boss_garr() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_garr"; + newscript->GetAI = &GetAI_boss_garr; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_firesworn"; + newscript->GetAI = &GetAI_mob_firesworn; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp b/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp new file mode 100644 index 000000000..7316a7575 --- /dev/null +++ b/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp @@ -0,0 +1,89 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Gehennas +SD%Complete: 90 +SDComment: Adds MC NYI +SDCategory: Molten Core +EndScriptData */ + +#include "precompiled.h" + +#define SPELL_SHADOWBOLT 19728 +#define SPELL_RAINOFFIRE 19717 +#define SPELL_GEHENNASCURSE 19716 + +struct MANGOS_DLL_DECL boss_gehennasAI : public ScriptedAI +{ + boss_gehennasAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 ShadowBolt_Timer; + uint32 RainOfFire_Timer; + uint32 GehennasCurse_Timer; + + void Reset() + { + ShadowBolt_Timer = 6000; + RainOfFire_Timer = 10000; + GehennasCurse_Timer = 12000; + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //ShadowBolt_Timer + if (ShadowBolt_Timer < diff) + { + if (Unit* bTarget = SelectUnit(SELECT_TARGET_RANDOM,1)) + DoCast(bTarget,SPELL_SHADOWBOLT); + ShadowBolt_Timer = 7000; + }else ShadowBolt_Timer -= diff; + + //RainOfFire_Timer + if (RainOfFire_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_RAINOFFIRE); + + RainOfFire_Timer = urand(4000, 12000); + }else RainOfFire_Timer -= diff; + + //GehennasCurse_Timer + if (GehennasCurse_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_GEHENNASCURSE); + GehennasCurse_Timer = urand(22000, 30000); + }else GehennasCurse_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_gehennas(Creature* pCreature) +{ + return new boss_gehennasAI(pCreature); +} + +void AddSC_boss_gehennas() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_gehennas"; + newscript->GetAI = &GetAI_boss_gehennas; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp b/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp new file mode 100644 index 000000000..aead1e08c --- /dev/null +++ b/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp @@ -0,0 +1,198 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Golemagg +SD%Complete: 75 +SDComment: Timers need to be confirmed, Golemagg's Trust need to be checked +SDCategory: Molten Core +EndScriptData */ + +#include "precompiled.h" +#include "molten_core.h" + +enum +{ + SPELL_MAGMASPLASH = 13879, + SPELL_PYROBLAST = 20228, + SPELL_EARTHQUAKE = 19798, + SPELL_ENRAGE = 19953, + SPELL_GOLEMAGG_TRUST = 20553, + + // Core Rager + EMOTE_LOWHP = -1409002, + SPELL_MANGLE = 19820 +}; + +struct MANGOS_DLL_DECL boss_golemaggAI : public ScriptedAI +{ + boss_golemaggAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 m_uiPyroblastTimer; + uint32 m_uiEarthquakeTimer; + uint32 m_uiBuffTimer; + bool m_bEnraged; + + void Reset() + { + m_uiPyroblastTimer = 7*IN_MILISECONDS; // These timers are probably wrong + m_uiEarthquakeTimer = 3*IN_MILISECONDS; + m_uiBuffTimer = 2.5*IN_MILISECONDS; + m_bEnraged = false; + + m_creature->CastSpell(m_creature, SPELL_MAGMASPLASH, true); + } + + void JustDied(Unit* pKiller) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_GOLEMAGG, DONE); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // Pyroblast + if (m_uiPyroblastTimer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, SPELL_PYROBLAST); + + m_uiPyroblastTimer = 7*IN_MILISECONDS; + } + else + m_uiPyroblastTimer -= uiDiff; + + // Enrage + if (!m_bEnraged && m_creature->GetHealth()*100 < m_creature->GetMaxHealth()*10) + { + DoCast(m_creature, SPELL_ENRAGE); + m_bEnraged = true; + } + + // Earthquake + if (m_bEnraged) + { + if (m_uiEarthquakeTimer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_EARTHQUAKE); + m_uiEarthquakeTimer = 3*IN_MILISECONDS; + } + else + m_uiEarthquakeTimer -= uiDiff; + } + + /* + // Golemagg's Trust + if (m_uiBuffTimer < uiDiff) + { + DoCast(m_creature, SPELL_GOLEMAGG_TRUST); + m_uiBuffTimer = 2.5*IN_MILISECONDS; + } + else + m_uiBuffTimer -= uiDiff; + */ + + DoMeleeAttackIfReady(); + } +}; + +struct MANGOS_DLL_DECL mob_core_ragerAI : public ScriptedAI +{ + mob_core_ragerAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + uint32 m_uiMangleTimer; + + void Reset() + { + m_uiMangleTimer = 7*IN_MILISECONDS; // These times are probably wrong + } + + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) + { + if (m_creature->GetHealth()*100 < m_creature->GetMaxHealth()*50) + { + if (m_pInstance) + { + if (Creature* pGolemagg = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_GOLEMAGG))) + { + if (pGolemagg->isAlive()) + { + DoScriptText(EMOTE_LOWHP, m_creature); + m_creature->SetHealth(m_creature->GetMaxHealth()); + } + else + uiDamage = m_creature->GetHealth(); + } + } + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // Mangle + if (m_uiMangleTimer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_MANGLE); + m_uiMangleTimer = 10*IN_MILISECONDS; + } + else + m_uiMangleTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_golemagg(Creature* pCreature) +{ + return new boss_golemaggAI(pCreature); +} + +CreatureAI* GetAI_mob_core_rager(Creature* pCreature) +{ + return new mob_core_ragerAI(pCreature); +} + +void AddSC_boss_golemagg() +{ + Script* newscript; + + newscript = new Script; + newscript->Name = "boss_golemagg"; + newscript->GetAI = &GetAI_boss_golemagg; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_core_rager"; + newscript->GetAI = &GetAI_mob_core_rager; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp b/scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp new file mode 100644 index 000000000..ba470f2fa --- /dev/null +++ b/scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp @@ -0,0 +1,86 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Lucifron +SD%Complete: 100 +SDComment: +SDCategory: Molten Core +EndScriptData */ + +#include "precompiled.h" + +#define SPELL_IMPENDINGDOOM 19702 +#define SPELL_LUCIFRONCURSE 19703 +#define SPELL_SHADOWSHOCK 20603 + +struct MANGOS_DLL_DECL boss_lucifronAI : public ScriptedAI +{ + boss_lucifronAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 ImpendingDoom_Timer; + uint32 LucifronCurse_Timer; + uint32 ShadowShock_Timer; + + void Reset() + { + ImpendingDoom_Timer = 10000; //Initial cast after 10 seconds so the debuffs alternate + LucifronCurse_Timer = 20000; //Initial cast after 20 seconds + ShadowShock_Timer = 6000; //6 seconds + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Impending doom timer + if (ImpendingDoom_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_IMPENDINGDOOM); + ImpendingDoom_Timer = 20000; + }else ImpendingDoom_Timer -= diff; + + //Lucifron's curse timer + if (LucifronCurse_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_LUCIFRONCURSE); + LucifronCurse_Timer = 15000; + }else LucifronCurse_Timer -= diff; + + //Shadowshock + if (ShadowShock_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_SHADOWSHOCK); + ShadowShock_Timer = 6000; + }else ShadowShock_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_lucifron(Creature* pCreature) +{ + return new boss_lucifronAI(pCreature); +} + +void AddSC_boss_lucifron() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_lucifron"; + newscript->GetAI = &GetAI_boss_lucifron; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/molten_core/boss_magmadar.cpp b/scripts/eastern_kingdoms/molten_core/boss_magmadar.cpp new file mode 100644 index 000000000..dac6350d2 --- /dev/null +++ b/scripts/eastern_kingdoms/molten_core/boss_magmadar.cpp @@ -0,0 +1,99 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Magmadar +SD%Complete: 75 +SDComment: Conflag on ground nyi, fear causes issues without VMAPs +SDCategory: Molten Core +EndScriptData */ + +#include "precompiled.h" + +enum +{ + EMOTE_GENERIC_FRENZY_KILL = -1000001, + + SPELL_FRENZY = 19451, + SPELL_MAGMASPIT = 19449, //This is actually a buff he gives himself + SPELL_PANIC = 19408, + SPELL_LAVABOMB = 19411, //This calls a dummy server side effect that isn't implemented yet + SPELL_LAVABOMB_ALT = 19428 //This is the spell that the lava bomb casts +}; + +struct MANGOS_DLL_DECL boss_magmadarAI : public ScriptedAI +{ + boss_magmadarAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 Frenzy_Timer; + uint32 Panic_Timer; + uint32 Lavabomb_Timer; + + void Reset() + { + Frenzy_Timer = 30000; + Panic_Timer = 20000; + Lavabomb_Timer = 12000; + + m_creature->CastSpell(m_creature,SPELL_MAGMASPIT,true); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Frenzy_Timer + if (Frenzy_Timer < diff) + { + DoScriptText(EMOTE_GENERIC_FRENZY_KILL, m_creature); + DoCast(m_creature,SPELL_FRENZY); + Frenzy_Timer = 15000; + }else Frenzy_Timer -= diff; + + //Panic_Timer + if (Panic_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_PANIC); + Panic_Timer = 35000; + }else Panic_Timer -= diff; + + //Lavabomb_Timer + if (Lavabomb_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_LAVABOMB_ALT); + + Lavabomb_Timer = 12000; + }else Lavabomb_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_magmadar(Creature* pCreature) +{ + return new boss_magmadarAI(pCreature); +} + +void AddSC_boss_magmadar() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_magmadar"; + newscript->GetAI = &GetAI_boss_magmadar; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp b/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp new file mode 100644 index 000000000..0bddfd9c3 --- /dev/null +++ b/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp @@ -0,0 +1,138 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Majordomo_Executus +SD%Complete: 30 +SDComment: Correct spawning and Event NYI +SDCategory: Molten Core +EndScriptData */ + +#include "precompiled.h" + +#define SAY_AGGRO -1409003 +#define SAY_SPAWN -1409004 +#define SAY_SLAY -1409005 +#define SAY_SPECIAL -1409006 +#define SAY_DEFEAT -1409007 + +#define SAY_SUMMON_MAJ -1409008 +#define SAY_ARRIVAL1_RAG -1409009 +#define SAY_ARRIVAL2_MAJ -1409010 +#define SAY_ARRIVAL3_RAG -1409011 +#define SAY_ARRIVAL5_RAG -1409012 + +#define SPAWN_RAG_X 838.51 +#define SPAWN_RAG_Y -829.84 +#define SPAWN_RAG_Z -232.00 +#define SPAWN_RAG_O 1.70 + +#define SPELL_MAGIC_REFLECTION 20619 +#define SPELL_DAMAGE_REFLECTION 21075 +#define SPELL_BLASTWAVE 20229 +#define SPELL_AEGIS 20620 //This is self casted whenever we are below 50% +#define SPELL_TELEPORT 20618 +#define SPELL_SUMMON_RAGNAROS 19774 + +#define ENTRY_FLAMEWALKER_HEALER 11663 +#define ENTRY_FLAMEWALKER_ELITE 11664 + +struct MANGOS_DLL_DECL boss_majordomoAI : public ScriptedAI +{ + boss_majordomoAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 MagicReflection_Timer; + uint32 DamageReflection_Timer; + uint32 Blastwave_Timer; + + void Reset() + { + MagicReflection_Timer = 30000; //Damage reflection first so we alternate + DamageReflection_Timer = 15000; + Blastwave_Timer = 10000; + } + + void KilledUnit(Unit* victim) + { + if (urand(0, 4)) + return; + + DoScriptText(SAY_SLAY, m_creature); + } + + void Aggro(Unit *who) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Cast Ageis if less than 50% hp + if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 50) + { + DoCast(m_creature,SPELL_AEGIS); + } + + //MagicReflection_Timer + // if (MagicReflection_Timer < diff) + // { + // DoCast(m_creature, SPELL_MAGICREFLECTION); + + //60 seconds until we should cast this agian + // MagicReflection_Timer = 30000; + // }else MagicReflection_Timer -= diff; + + //DamageReflection_Timer + // if (DamageReflection_Timer < diff) + // { + // DoCast(m_creature, SPELL_DAMAGEREFLECTION); + + //60 seconds until we should cast this agian + // DamageReflection_Timer = 30000; + // }else DamageReflection_Timer -= diff; + + //Blastwave_Timer + if (Blastwave_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_BLASTWAVE); + Blastwave_Timer = 10000; + }else Blastwave_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_majordomo(Creature* pCreature) +{ + return new boss_majordomoAI(pCreature); +} + +void AddSC_boss_majordomo() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_majordomo"; + newscript->GetAI = &GetAI_boss_majordomo; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp b/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp new file mode 100644 index 000000000..ef61d860e --- /dev/null +++ b/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp @@ -0,0 +1,291 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Ragnaros +SD%Complete: 75 +SDComment: Intro Dialog and event NYI +SDCategory: Molten Core +EndScriptData */ + +#include "precompiled.h" + +#define SAY_REINFORCEMENTS1 -1409013 +#define SAY_REINFORCEMENTS2 -1409014 +#define SAY_HAND -1409015 +#define SAY_WRATH -1409016 +#define SAY_KILL -1409017 +#define SAY_MAGMABURST -1409018 + +#define SPELL_HANDOFRAGNAROS 19780 +#define SPELL_WRATHOFRAGNAROS 20566 +#define SPELL_LAVABURST 21158 + +#define SPELL_MAGMABURST 20565 //Ranged attack + +#define SPELL_SONSOFFLAME_DUMMY 21108 //Server side effect +#define SPELL_RAGSUBMERGE 21107 //Stealth aura +#define SPELL_RAGEMERGE 20568 +#define SPELL_MELTWEAPON 21388 +#define SPELL_ELEMENTALFIRE 20564 +#define SPELL_ERRUPTION 17731 + +#define ADD_1X 848.740356 +#define ADD_1Y -816.103455 +#define ADD_1Z -229.74327 +#define ADD_1O 2.615287 + +#define ADD_2X 852.560791 +#define ADD_2Y -849.861511 +#define ADD_2Z -228.560974 +#define ADD_2O 2.836073 + +#define ADD_3X 808.710632 +#define ADD_3Y -852.845764 +#define ADD_3Z -227.914963 +#define ADD_3O 0.964207 + +#define ADD_4X 786.597107 +#define ADD_4Y -821.132874 +#define ADD_4Z -226.350128 +#define ADD_4O 0.949377 + +#define ADD_5X 796.219116 +#define ADD_5Y -800.948059 +#define ADD_5Z -226.010361 +#define ADD_5O 0.560603 + +#define ADD_6X 821.602539 +#define ADD_6Y -782.744109 +#define ADD_6Z -226.023575 +#define ADD_6O 6.157440 + +#define ADD_7X 844.924744 +#define ADD_7Y -769.453735 +#define ADD_7Z -225.521698 +#define ADD_7O 4.4539958 + +#define ADD_8X 839.823364 +#define ADD_8Y -810.869385 +#define ADD_8Z -229.683182 +#define ADD_8O 4.693108 + +struct MANGOS_DLL_DECL boss_ragnarosAI : public ScriptedAI +{ + boss_ragnarosAI(Creature* pCreature) : ScriptedAI(pCreature) + { + SetCombatMovement(false); + Reset(); + } + + uint32 WrathOfRagnaros_Timer; + uint32 HandOfRagnaros_Timer; + uint32 LavaBurst_Timer; + uint32 MagmaBurst_Timer; + uint32 ElementalFire_Timer; + uint32 Erruption_Timer; + uint32 Submerge_Timer; + uint32 Attack_Timer; + Creature *Summoned; + bool HasYelledMagmaBurst; + bool HasSubmergedOnce; + bool WasBanished; + bool HasAura; + + void Reset() + { + WrathOfRagnaros_Timer = 30000; + HandOfRagnaros_Timer = 25000; + LavaBurst_Timer = 10000; + MagmaBurst_Timer = 2000; + Erruption_Timer = 15000; + ElementalFire_Timer = 3000; + Submerge_Timer = 180000; + Attack_Timer = 90000; + HasYelledMagmaBurst = false; + HasSubmergedOnce = false; + WasBanished = false; + + m_creature->CastSpell(m_creature,SPELL_MELTWEAPON,true); + HasAura = true; + } + + void KilledUnit(Unit* victim) + { + if (urand(0, 4)) + return; + + DoScriptText(SAY_KILL, m_creature); + } + + void UpdateAI(const uint32 diff) + { + if (WasBanished && Attack_Timer < diff) + { + //Become unbanished again + m_creature->setFaction(14); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + DoCast(m_creature,SPELL_RAGEMERGE); + WasBanished = false; + } else if (WasBanished) + { + Attack_Timer -= diff; + //Do nothing while banished + return; + } + + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //WrathOfRagnaros_Timer + if (WrathOfRagnaros_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_WRATHOFRAGNAROS); + + if (urand(0, 1)) + DoScriptText(SAY_WRATH, m_creature); + + WrathOfRagnaros_Timer = 30000; + }else WrathOfRagnaros_Timer -= diff; + + //HandOfRagnaros_Timer + if (HandOfRagnaros_Timer < diff) + { + DoCast(m_creature,SPELL_HANDOFRAGNAROS); + + if (urand(0, 1)) + DoScriptText(SAY_HAND, m_creature); + + HandOfRagnaros_Timer = 25000; + }else HandOfRagnaros_Timer -= diff; + + //LavaBurst_Timer + if (LavaBurst_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_LAVABURST); + LavaBurst_Timer = 10000; + }else LavaBurst_Timer -= diff; + + //Erruption_Timer + if (LavaBurst_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_ERRUPTION); + Erruption_Timer = urand(20000, 45000); + }else Erruption_Timer -= diff; + + //ElementalFire_Timer + if (ElementalFire_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_ELEMENTALFIRE); + ElementalFire_Timer = urand(10000, 14000); + }else ElementalFire_Timer -= diff; + + //Submerge_Timer + if (!WasBanished && Submerge_Timer < diff) + { + //Creature spawning and ragnaros becomming unattackable + //is not very well supported in the core + //so added normaly spawning and banish workaround and attack again after 90 secs. + + m_creature->InterruptNonMeleeSpells(false); + //Root self + DoCast(m_creature,23973); + m_creature->setFaction(35); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_SUBMERGE); + + if (!HasSubmergedOnce) + { + DoScriptText(SAY_REINFORCEMENTS1, m_creature); + + // summon 10 elementals + for(int i = 0; i < 9; ++i) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + { + if (Creature* pSummoned = m_creature->SummonCreature(12143,pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(),0.0f,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN,900000)) + pSummoned->AI()->AttackStart(pTarget); + } + } + + HasSubmergedOnce = true; + WasBanished = true; + DoCast(m_creature,SPELL_RAGSUBMERGE); + Attack_Timer = 90000; + } + else + { + DoScriptText(SAY_REINFORCEMENTS2, m_creature); + + for(int i = 0; i < 9; ++i) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + { + if (Creature* pSummoned = m_creature->SummonCreature(12143,pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(),0.0f,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN,900000)) + pSummoned->AI()->AttackStart(pTarget); + } + } + + WasBanished = true; + DoCast(m_creature,SPELL_RAGSUBMERGE); + Attack_Timer = 90000; + } + + Submerge_Timer = 180000; + }else Submerge_Timer -= diff; + + //If we are within range melee the target + if (m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE)) + { + //Make sure our attack is ready and we arn't currently casting + if (m_creature->isAttackReady() && !m_creature->IsNonMeleeSpellCasted(false)) + { + m_creature->AttackerStateUpdate(m_creature->getVictim()); + m_creature->resetAttackTimer(); + } + } + else + { + //MagmaBurst_Timer + if (MagmaBurst_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_MAGMABURST); + + if (!HasYelledMagmaBurst) + { + DoScriptText(SAY_MAGMABURST, m_creature); + HasYelledMagmaBurst = true; + } + + MagmaBurst_Timer = 2500; + }else MagmaBurst_Timer -= diff; + } + } +}; +CreatureAI* GetAI_boss_ragnaros(Creature* pCreature) +{ + return new boss_ragnarosAI(pCreature); +} + +void AddSC_boss_ragnaros() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_ragnaros"; + newscript->GetAI = &GetAI_boss_ragnaros; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp b/scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp new file mode 100644 index 000000000..99b5ae51b --- /dev/null +++ b/scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp @@ -0,0 +1,118 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Shazzrah +SD%Complete: 75 +SDComment: Teleport NYI +SDCategory: Molten Core +EndScriptData */ + +#include "precompiled.h" + +#define SPELL_ARCANEEXPLOSION 19712 +#define SPELL_SHAZZRAHCURSE 19713 +#define SPELL_DEADENMAGIC 19714 +#define SPELL_COUNTERSPELL 19715 + +struct MANGOS_DLL_DECL boss_shazzrahAI : public ScriptedAI +{ + boss_shazzrahAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 ArcaneExplosion_Timer; + uint32 ShazzrahCurse_Timer; + uint32 DeadenMagic_Timer; + uint32 Countspell_Timer; + uint32 Blink_Timer; + + void Reset() + { + ArcaneExplosion_Timer = 6000; //These times are probably wrong + ShazzrahCurse_Timer = 10000; + DeadenMagic_Timer = 24000; + Countspell_Timer = 15000; + Blink_Timer = 30000; + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //ArcaneExplosion_Timer + if (ArcaneExplosion_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_ARCANEEXPLOSION); + ArcaneExplosion_Timer = urand(5000, 9000); + }else ArcaneExplosion_Timer -= diff; + + //ShazzrahCurse_Timer + if (ShazzrahCurse_Timer < diff) + { + Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM,0); + if (target) DoCast(target,SPELL_SHAZZRAHCURSE); + + ShazzrahCurse_Timer = urand(25000, 30000); + }else ShazzrahCurse_Timer -= diff; + + //DeadenMagic_Timer + if (DeadenMagic_Timer < diff) + { + DoCast(m_creature,SPELL_DEADENMAGIC); + DeadenMagic_Timer = 35000; + }else DeadenMagic_Timer -= diff; + + //Countspell_Timer + if (Countspell_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_COUNTERSPELL); + Countspell_Timer = urand(16000, 20000); + }else Countspell_Timer -= diff; + + //Blink_Timer + if (Blink_Timer < diff) + { + // Teleporting him to a random gamer and casting Arcane Explosion after that. + // Blink is not working cause of LoS System we need to do this hardcoded. + Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM,0); + + m_creature->GetMap()->CreatureRelocation(m_creature, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0.0f); + m_creature->SendMonsterMove(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, MONSTER_MOVE_WALK, 1); + + DoCast(target,SPELL_ARCANEEXPLOSION); + DoResetThreat(); + + Blink_Timer = 45000; + }else Blink_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_shazzrah(Creature* pCreature) +{ + return new boss_shazzrahAI(pCreature); +} + +void AddSC_boss_shazzrah() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_shazzrah"; + newscript->GetAI = &GetAI_boss_shazzrah; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp b/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp new file mode 100644 index 000000000..da46ea14c --- /dev/null +++ b/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp @@ -0,0 +1,207 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Sulfuron_Harbringer +SD%Complete: 80 +SDComment: Adds NYI +SDCategory: Molten Core +EndScriptData */ + +#include "precompiled.h" +#include "molten_core.h" + +#define SPELL_DARKSTRIKE 19777 +#define SPELL_DEMORALIZINGSHOUT 19778 +#define SPELL_INSPIRE 19779 +#define SPELL_KNOCKDOWN 19780 +#define SPELL_FLAMESPEAR 19781 + +//Adds Spells +#define SPELL_HEAL 19775 +#define SPELL_SHADOWWORDPAIN 19776 +#define SPELL_IMMOLATE 20294 + +struct MANGOS_DLL_DECL boss_sulfuronAI : public ScriptedAI +{ + boss_sulfuronAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + uint32 Darkstrike_Timer; + uint32 DemoralizingShout_Timer; + uint32 Inspire_Timer; + uint32 Knockdown_Timer; + uint32 Flamespear_Timer; + ScriptedInstance* m_pInstance; + + void Reset() + { + Darkstrike_Timer=10000; //These times are probably wrong + DemoralizingShout_Timer = 15000; + Inspire_Timer = 13000; + Knockdown_Timer = 6000; + Flamespear_Timer = 2000; + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //DemoralizingShout_Timer + if (DemoralizingShout_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_DEMORALIZINGSHOUT); + DemoralizingShout_Timer = urand(15000, 20000); + }else DemoralizingShout_Timer -= diff; + + //Inspire_Timer + if (Inspire_Timer < diff) + { + Creature* target = NULL; + std::list pList = DoFindFriendlyMissingBuff(45.0f,SPELL_INSPIRE); + if (!pList.empty()) + { + std::list::iterator i = pList.begin(); + advance(i, (rand()%pList.size())); + target = (*i); + } + + if (target) + DoCast(target,SPELL_INSPIRE); + + DoCast(m_creature,SPELL_INSPIRE); + + Inspire_Timer = urand(20000, 26000); + }else Inspire_Timer -= diff; + + //Knockdown_Timer + if (Knockdown_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_KNOCKDOWN); + Knockdown_Timer = urand(12000, 15000); + }else Knockdown_Timer -= diff; + + //Flamespear_Timer + if (Flamespear_Timer < diff) + { + Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM,0); + if (target) DoCast(target,SPELL_FLAMESPEAR); + + Flamespear_Timer = urand(12000, 16000); + }else Flamespear_Timer -= diff; + + //DarkStrike_Timer + if (Darkstrike_Timer < diff) + { + DoCast(m_creature, SPELL_DARKSTRIKE); + Darkstrike_Timer = urand(15000, 18000); + }else Darkstrike_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +struct MANGOS_DLL_DECL mob_flamewaker_priestAI : public ScriptedAI +{ + mob_flamewaker_priestAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + uint32 Heal_Timer; + uint32 ShadowWordPain_Timer; + uint32 Immolate_Timer; + + ScriptedInstance* m_pInstance; + + void Reset() + { + Heal_Timer = urand(15000, 30000); + ShadowWordPain_Timer = 2000; + Immolate_Timer = 8000; + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Casting Heal to Sulfuron or other Guards. + if (Heal_Timer < diff) + { + Unit* pUnit = DoSelectLowestHpFriendly(60.0f, 1); + if (!pUnit) + return; + + DoCast(pUnit, SPELL_HEAL); + + Heal_Timer = urand(15000, 20000); + }else Heal_Timer -= diff; + + //ShadowWordPain_Timer + if (ShadowWordPain_Timer < diff) + { + Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM,0); + if (target) DoCast(target,SPELL_SHADOWWORDPAIN); + + ShadowWordPain_Timer = urand(18000, 26000); + }else ShadowWordPain_Timer -= diff; + + //Immolate_Timer + if (Immolate_Timer < diff) + { + Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM,0); + if (target) DoCast(target,SPELL_IMMOLATE); + + Immolate_Timer = urand(15000, 25000); + }else Immolate_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_sulfuron(Creature* pCreature) +{ + return new boss_sulfuronAI(pCreature); +} + +CreatureAI* GetAI_mob_flamewaker_priest(Creature* pCreature) +{ + return new mob_flamewaker_priestAI(pCreature); +} + +void AddSC_boss_sulfuron() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_sulfuron"; + newscript->GetAI = &GetAI_boss_sulfuron; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_flamewaker_priest"; + newscript->GetAI = &GetAI_mob_flamewaker_priest; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp b/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp new file mode 100644 index 000000000..313b0a11b --- /dev/null +++ b/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp @@ -0,0 +1,287 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance_Molten_Core +SD%Complete: 0 +SDComment: Place Holder +SDCategory: Molten Core +EndScriptData */ + +#include "precompiled.h" +#include "molten_core.h" + +struct MANGOS_DLL_DECL instance_molten_core : public ScriptedInstance +{ + instance_molten_core(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string strInstData; + + uint64 m_uiLucifronGUID, m_uiMagmadarGUID, m_uiGehennasGUID, m_uiGarrGUID, m_uiGeddonGUID, m_uiShazzrahGUID, m_uiSulfuronGUID, m_uiGolemaggGUID, m_uiMajorDomoGUID, m_uiRagnarosGUID, m_uiFlamewakerPriestGUID; + uint64 m_uiRuneKoroGUID, m_uiRuneZethGUID, m_uiRuneMazjGUID, m_uiRuneTheriGUID, m_uiRuneBlazGUID, m_uiRuneKressGUID, m_uiRuneMohnGUID, m_uiFirelordCacheGUID; + + void Initialize() + { + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + + m_uiLucifronGUID = 0; + m_uiMagmadarGUID = 0; + m_uiGehennasGUID = 0; + m_uiGarrGUID = 0; + m_uiGeddonGUID = 0; + m_uiShazzrahGUID = 0; + m_uiSulfuronGUID = 0; + m_uiGolemaggGUID = 0; + m_uiMajorDomoGUID = 0; + m_uiRagnarosGUID = 0; + m_uiFlamewakerPriestGUID = 0; + + m_uiRuneKoroGUID = 0; + m_uiRuneZethGUID = 0; + m_uiRuneMazjGUID = 0; + m_uiRuneTheriGUID = 0; + m_uiRuneBlazGUID = 0; + m_uiRuneKressGUID = 0; + m_uiRuneMohnGUID = 0; + + m_uiFirelordCacheGUID = 0; + } + + bool IsEncounterInProgress() const + { + return false; + } + + void OnObjectCreate(GameObject* pGo) + { + switch(pGo->GetEntry()) + { + case 176951: //Sulfuron + m_uiRuneKoroGUID = pGo->GetGUID(); + break; + case 176952: //Geddon + m_uiRuneZethGUID = pGo->GetGUID(); + break; + case 176953: //Shazzrah + m_uiRuneMazjGUID = pGo->GetGUID(); + break; + case 176954: //Golemagg + m_uiRuneTheriGUID = pGo->GetGUID(); + break; + case 176955: //Garr + m_uiRuneBlazGUID = pGo->GetGUID(); + break; + case 176956: //Magmadar + m_uiRuneKressGUID = pGo->GetGUID(); + break; + case 176957: //Gehennas + m_uiRuneMohnGUID = pGo->GetGUID(); + break; + case 179703: + m_uiFirelordCacheGUID = pGo->GetGUID(); //majordomo event chest + break; + } + } + + void OnCreatureCreate(Creature* pCreature) + { + switch(pCreature->GetEntry()) + { + case NPC_LUCIFRON: + m_uiLucifronGUID = pCreature->GetGUID(); + break; + case NPC_MAGMADAR: + m_uiMagmadarGUID = pCreature->GetGUID(); + break; + case NPC_GEHENNAS: + m_uiGehennasGUID = pCreature->GetGUID(); + break; + case NPC_GARR: + m_uiGarrGUID = pCreature->GetGUID(); + break; + case NPC_GEDDON: + m_uiGeddonGUID = pCreature->GetGUID(); + break; + case NPC_SHAZZRAH: + m_uiShazzrahGUID = pCreature->GetGUID(); + break; + case NPC_SULFURON: + m_uiSulfuronGUID = pCreature->GetGUID(); + break; + case NPC_GOLEMAGG: + m_uiGolemaggGUID = pCreature->GetGUID(); + break; + case NPC_DOMO: + m_uiMajorDomoGUID = pCreature->GetGUID(); + break; + case NPC_RAGNAROS: + m_uiRagnarosGUID = pCreature->GetGUID(); + break; + case NPC_FLAMEWAKERPRIEST: + m_uiFlamewakerPriestGUID = pCreature->GetGUID(); + break; + } + } + + void SetData(uint32 uiType, uint32 uiData) + { + switch(uiType) + { + case TYPE_SULFURON: + m_auiEncounter[0] = uiData; + break; + case TYPE_GEDDON: + m_auiEncounter[1] = uiData; + break; + case TYPE_SHAZZRAH: + m_auiEncounter[2] = uiData; + break; + case TYPE_GOLEMAGG: + m_auiEncounter[3] = uiData; + break; + case TYPE_GARR: + m_auiEncounter[4] = uiData; + break; + case TYPE_MAGMADAR: + m_auiEncounter[5] = uiData; + break; + case TYPE_GEHENNAS: + m_auiEncounter[6] = uiData; + break; + case TYPE_LUCIFRON: + m_auiEncounter[7] = uiData; + break; + case TYPE_MAJORDOMO: + if (uiData == DONE) + DoRespawnGameObject(m_uiFirelordCacheGUID); + m_auiEncounter[8] = uiData; + break; + case TYPE_RAGNAROS: + m_auiEncounter[9] = uiData; + break; + } + + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " + << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " + << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8] << " " + << m_auiEncounter[9]; + + strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } + } + + const char* Save() + { + return strInstData.c_str(); + } + + bool CanSpawnMajorDomo() + { + return m_auiEncounter[0] && m_auiEncounter[1] && m_auiEncounter[2] && m_auiEncounter[3] && + m_auiEncounter[4] && m_auiEncounter[5] && m_auiEncounter[6]; + } + + uint32 GetData(uint32 uiType) + { + switch(uiType) + { + case TYPE_SULFURON: + return m_auiEncounter[0]; + case TYPE_GEDDON: + return m_auiEncounter[1]; + case TYPE_SHAZZRAH: + return m_auiEncounter[2]; + case TYPE_GOLEMAGG: + return m_auiEncounter[3]; + case TYPE_GARR: + return m_auiEncounter[4]; + case TYPE_MAGMADAR: + return m_auiEncounter[5]; + case TYPE_GEHENNAS: + return m_auiEncounter[6]; + case TYPE_LUCIFRON: + return m_auiEncounter[7]; + case TYPE_MAJORDOMO: + return m_auiEncounter[8]; + case TYPE_RAGNAROS: + return m_auiEncounter[9]; + } + return 0; + } + + uint64 GetData64(uint32 uiData) + { + switch(uiData) + { + case DATA_SULFURON: + return m_uiSulfuronGUID; + case DATA_GOLEMAGG: + return m_uiGolemaggGUID; + case DATA_GARR: + return m_uiGarrGUID; + case DATA_MAJORDOMO: + return m_uiMajorDomoGUID; + } + + return 0; + } + + void Load(const char* chrIn) + { + if (!chrIn) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(chrIn); + + std::istringstream loadStream(chrIn); + + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] + >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] + >> m_auiEncounter[8] >> m_auiEncounter[9]; + + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + if (m_auiEncounter[i] == IN_PROGRESS) // Do not load an encounter as "In Progress" - reset it instead. + m_auiEncounter[i] = NOT_STARTED; + + OUT_LOAD_INST_DATA_COMPLETE; + } +}; + +InstanceData* GetInstance_instance_molten_core(Map* pMap) +{ + return new instance_molten_core(pMap); +} + +void AddSC_instance_molten_core() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "instance_molten_core"; + newscript->GetInstanceData = &GetInstance_instance_molten_core; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/molten_core/molten_core.cpp b/scripts/eastern_kingdoms/molten_core/molten_core.cpp new file mode 100644 index 000000000..1d8fb1381 --- /dev/null +++ b/scripts/eastern_kingdoms/molten_core/molten_core.cpp @@ -0,0 +1,88 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Molten_Core +SD%Complete: 100 +SDComment: +SDCategory: Molten Core +EndScriptData */ + +/* ContentData +mob_ancient_core_hound +EndContentData */ + +#include "precompiled.h" +#include "simple_ai.h" + +#define SPELL_CONE_OF_FIRE 19630 +#define SPELL_BITE 19771 + +//Random Debuff (each hound has only one of these) +#define SPELL_GROUND_STOMP 19364 +#define SPELL_ANCIENT_DREAD 19365 +#define SPELL_CAUTERIZING_FLAMES 19366 +#define SPELL_WITHERING_HEAT 19367 +#define SPELL_ANCIENT_DESPAIR 19369 +#define SPELL_ANCIENT_HYSTERIA 19372 + +CreatureAI* GetAI_mob_ancient_core_hound(Creature* pCreature) +{ + SimpleAI *ai = new SimpleAI(pCreature); + + ai->Spell[0].Enabled = true; + ai->Spell[0].Spell_Id = SPELL_CONE_OF_FIRE; + ai->Spell[0].Cooldown = 7000; + ai->Spell[0].First_Cast = 10000; + ai->Spell[0].Cast_Target_Type = CAST_HOSTILE_TARGET; + + uint32 RandDebuff = 0; + switch(urand(0, 5)) + { + case 0 : RandDebuff = SPELL_GROUND_STOMP; break; + case 1 : RandDebuff = SPELL_ANCIENT_DREAD; break; + case 2 : RandDebuff = SPELL_CAUTERIZING_FLAMES; break; + case 3 : RandDebuff = SPELL_WITHERING_HEAT; break; + case 4 : RandDebuff = SPELL_ANCIENT_DESPAIR; break; + case 5 : RandDebuff = SPELL_ANCIENT_HYSTERIA; break; + } + + ai->Spell[1].Enabled = true; + ai->Spell[1].Spell_Id = RandDebuff; + ai->Spell[1].Cooldown = 24000; + ai->Spell[1].First_Cast = 15000; + ai->Spell[1].Cast_Target_Type = CAST_HOSTILE_TARGET; + + ai->Spell[2].Enabled = true; + ai->Spell[2].Spell_Id = SPELL_BITE; + ai->Spell[2].Cooldown = 6000; + ai->Spell[2].First_Cast = 4000; + ai->Spell[2].Cast_Target_Type = CAST_HOSTILE_TARGET; + + ai->EnterEvadeMode(); + + return ai; +} + +void AddSC_molten_core() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "mob_ancient_core_hound"; + newscript->GetAI = &GetAI_mob_ancient_core_hound; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/molten_core/molten_core.h b/scripts/eastern_kingdoms/molten_core/molten_core.h new file mode 100644 index 000000000..af1172b15 --- /dev/null +++ b/scripts/eastern_kingdoms/molten_core/molten_core.h @@ -0,0 +1,43 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_MOLTEN_CORE_H +#define DEF_MOLTEN_CORE_H + +enum +{ + MAX_ENCOUNTER = 10, + + NPC_LUCIFRON = 12118, + NPC_MAGMADAR = 11982, + NPC_GEHENNAS = 12259, + NPC_GARR = 12057, + NPC_GEDDON = 12056, + NPC_SHAZZRAH = 12264, + NPC_GOLEMAGG = 11988, + NPC_SULFURON = 12098, + NPC_DOMO = 12018, + NPC_RAGNAROS = 11502, + NPC_FLAMEWAKERPRIEST = 11662, + + TYPE_SULFURON = 1, + TYPE_GEDDON = 2, + TYPE_SHAZZRAH = 3, + TYPE_GOLEMAGG = 4, + TYPE_GARR = 5, + TYPE_MAGMADAR = 6, + TYPE_GEHENNAS = 7, + TYPE_LUCIFRON = 8, + TYPE_MAJORDOMO = 9, + TYPE_RAGNAROS = 10, + + DATA_SULFURON = 11, + DATA_GOLEMAGG = 12, + DATA_GARR = 13, + DATA_MAJORDOMO = 14, + + DATA_BOSSES_DEAD_CHECK = 15 +}; + +#endif diff --git a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp new file mode 100644 index 000000000..6dc2e0749 --- /dev/null +++ b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp @@ -0,0 +1,1139 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Ebon_Hold +SD%Complete: 80 +SDComment: Quest support: 12848, 12733, 12739(and 12742 to 12750), 12727 +SDCategory: Ebon Hold +EndScriptData */ + +/* ContentData +npc_a_special_surprise +npc_death_knight_initiate +npc_unworthy_initiate_anchor +npc_unworthy_initiate +go_acherus_soul_prison +EndContentData */ + +#include "precompiled.h" +#include "escort_ai.h" + +/*###### +## npc_a_special_surprise +######*/ + +enum SpecialSurprise +{ + SAY_EXEC_START_1 = -1609025, // speech for all + SAY_EXEC_START_2 = -1609026, + SAY_EXEC_START_3 = -1609027, + SAY_EXEC_PROG_1 = -1609028, + SAY_EXEC_PROG_2 = -1609029, + SAY_EXEC_PROG_3 = -1609030, + SAY_EXEC_PROG_4 = -1609031, + SAY_EXEC_PROG_5 = -1609032, + SAY_EXEC_PROG_6 = -1609033, + SAY_EXEC_PROG_7 = -1609034, + SAY_EXEC_NAME_1 = -1609035, + SAY_EXEC_NAME_2 = -1609036, + SAY_EXEC_RECOG_1 = -1609037, + SAY_EXEC_RECOG_2 = -1609038, + SAY_EXEC_RECOG_3 = -1609039, + SAY_EXEC_RECOG_4 = -1609040, + SAY_EXEC_RECOG_5 = -1609041, + SAY_EXEC_RECOG_6 = -1609042, + SAY_EXEC_NOREM_1 = -1609043, + SAY_EXEC_NOREM_2 = -1609044, + SAY_EXEC_NOREM_3 = -1609045, + SAY_EXEC_NOREM_4 = -1609046, + SAY_EXEC_NOREM_5 = -1609047, + SAY_EXEC_NOREM_6 = -1609048, + SAY_EXEC_NOREM_7 = -1609049, + SAY_EXEC_NOREM_8 = -1609050, + SAY_EXEC_NOREM_9 = -1609051, + SAY_EXEC_THINK_1 = -1609052, + SAY_EXEC_THINK_2 = -1609053, + SAY_EXEC_THINK_3 = -1609054, + SAY_EXEC_THINK_4 = -1609055, + SAY_EXEC_THINK_5 = -1609056, + SAY_EXEC_THINK_6 = -1609057, + SAY_EXEC_THINK_7 = -1609058, + SAY_EXEC_THINK_8 = -1609059, + SAY_EXEC_THINK_9 = -1609060, + SAY_EXEC_THINK_10 = -1609061, + SAY_EXEC_LISTEN_1 = -1609062, + SAY_EXEC_LISTEN_2 = -1609063, + SAY_EXEC_LISTEN_3 = -1609064, + SAY_EXEC_LISTEN_4 = -1609065, + SAY_PLAGUEFIST = -1609066, + SAY_EXEC_TIME_1 = -1609067, + SAY_EXEC_TIME_2 = -1609068, + SAY_EXEC_TIME_3 = -1609069, + SAY_EXEC_TIME_4 = -1609070, + SAY_EXEC_TIME_5 = -1609071, + SAY_EXEC_TIME_6 = -1609072, + SAY_EXEC_TIME_7 = -1609073, + SAY_EXEC_TIME_8 = -1609074, + SAY_EXEC_TIME_9 = -1609075, + SAY_EXEC_TIME_10 = -1609076, + SAY_EXEC_WAITING = -1609077, + EMOTE_DIES = -1609078, + + NPC_PLAGUEFIST = 29053 +}; + +struct MANGOS_DLL_DECL npc_a_special_surpriseAI : public ScriptedAI +{ + npc_a_special_surpriseAI(Creature *pCreature) : ScriptedAI(pCreature) { Reset(); } + + uint32 m_uiExecuteSpeech_Timer; + uint32 m_uiExecuteSpeech_Counter; + uint64 m_uiPlayerGUID; + + void Reset() + { + m_uiExecuteSpeech_Timer = 0; + m_uiExecuteSpeech_Counter = 0; + m_uiPlayerGUID = 0; + } + + bool MeetQuestCondition(Unit* pPlayer) + { + switch(m_creature->GetEntry()) + { + case 29061: // Ellen Stanbridge + if (((Player*)pPlayer)->GetQuestStatus(12742) == QUEST_STATUS_INCOMPLETE) + return true; + break; + case 29072: // Kug Ironjaw + if (((Player*)pPlayer)->GetQuestStatus(12748) == QUEST_STATUS_INCOMPLETE) + return true; + break; + case 29067: // Donovan Pulfrost + if (((Player*)pPlayer)->GetQuestStatus(12744) == QUEST_STATUS_INCOMPLETE) + return true; + break; + case 29065: // Yazmina Oakenthorn + if (((Player*)pPlayer)->GetQuestStatus(12743) == QUEST_STATUS_INCOMPLETE) + return true; + break; + case 29071: // Antoine Brack + if (((Player*)pPlayer)->GetQuestStatus(12750) == QUEST_STATUS_INCOMPLETE) + return true; + break; + case 29032: // Malar Bravehorn + if (((Player*)pPlayer)->GetQuestStatus(12739) == QUEST_STATUS_INCOMPLETE) + return true; + break; + case 29068: // Goby Blastenheimer + if (((Player*)pPlayer)->GetQuestStatus(12745) == QUEST_STATUS_INCOMPLETE) + return true; + break; + case 29073: // Iggy Darktusk + if (((Player*)pPlayer)->GetQuestStatus(12749) == QUEST_STATUS_INCOMPLETE) + return true; + break; + case 29074: // Lady Eonys + if (((Player*)pPlayer)->GetQuestStatus(12747) == QUEST_STATUS_INCOMPLETE) + return true; + break; + case 29070: // Valok the Righteous + if (((Player*)pPlayer)->GetQuestStatus(12746) == QUEST_STATUS_INCOMPLETE) + return true; + break; + } + + return false; + } + + void MoveInLineOfSight(Unit* pWho) + { + if (m_uiPlayerGUID || pWho->GetTypeId() != TYPEID_PLAYER || !pWho->IsWithinDist(m_creature, INTERACTION_DISTANCE)) + return; + + if (MeetQuestCondition(pWho)) + m_uiPlayerGUID = pWho->GetGUID(); + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_uiPlayerGUID && !m_creature->getVictim() && m_creature->isAlive()) + { + if (m_uiExecuteSpeech_Timer < uiDiff) + { + Player* pPlayer = (Player*)Unit::GetUnit(*m_creature, m_uiPlayerGUID); + + if (!pPlayer) + { + Reset(); + return; + } + + //TODO: simplify text's selection + + switch(pPlayer->getRace()) + { + case RACE_HUMAN: + switch(m_uiExecuteSpeech_Counter) + { + case 0: DoScriptText(SAY_EXEC_START_1, m_creature, pPlayer); break; + case 1: m_creature->SetStandState(UNIT_STAND_STATE_STAND); break; + case 2: DoScriptText(SAY_EXEC_PROG_5, m_creature, pPlayer); break; + case 3: DoScriptText(SAY_EXEC_NAME_1, m_creature, pPlayer); break; + case 4: DoScriptText(SAY_EXEC_RECOG_1, m_creature, pPlayer); break; + case 5: DoScriptText(SAY_EXEC_NOREM_5, m_creature, pPlayer); break; + case 6: DoScriptText(SAY_EXEC_THINK_7, m_creature, pPlayer); break; + case 7: DoScriptText(SAY_EXEC_LISTEN_1, m_creature, pPlayer); break; + case 8: + if (Creature* pPlaguefist = GetClosestCreatureWithEntry(m_creature, NPC_PLAGUEFIST, 85.0f)) + DoScriptText(SAY_PLAGUEFIST, pPlaguefist, pPlayer); + break; + case 9: + DoScriptText(SAY_EXEC_TIME_6, m_creature, pPlayer); + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + break; + case 10: DoScriptText(SAY_EXEC_WAITING, m_creature, pPlayer); break; + case 11: + DoScriptText(EMOTE_DIES, m_creature); + m_creature->setDeathState(JUST_DIED); + m_creature->SetHealth(0); + return; + } + break; + case RACE_ORC: + switch(m_uiExecuteSpeech_Counter) + { + case 0: DoScriptText(SAY_EXEC_START_1, m_creature, pPlayer); break; + case 1: m_creature->SetStandState(UNIT_STAND_STATE_STAND); break; + case 2: DoScriptText(SAY_EXEC_PROG_6, m_creature, pPlayer); break; + case 3: DoScriptText(SAY_EXEC_NAME_1, m_creature, pPlayer); break; + case 4: DoScriptText(SAY_EXEC_RECOG_1, m_creature, pPlayer); break; + case 5: DoScriptText(SAY_EXEC_NOREM_7, m_creature, pPlayer); break; + case 6: DoScriptText(SAY_EXEC_THINK_8, m_creature, pPlayer); break; + case 7: DoScriptText(SAY_EXEC_LISTEN_1, m_creature, pPlayer); break; + case 8: + if (Creature* pPlaguefist = GetClosestCreatureWithEntry(m_creature, NPC_PLAGUEFIST, 85.0f)) + DoScriptText(SAY_PLAGUEFIST, pPlaguefist, pPlayer); + break; + case 9: + DoScriptText(SAY_EXEC_TIME_8, m_creature, pPlayer); + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + break; + case 10: DoScriptText(SAY_EXEC_WAITING, m_creature, pPlayer); break; + case 11: + DoScriptText(EMOTE_DIES, m_creature); + m_creature->setDeathState(JUST_DIED); + m_creature->SetHealth(0); + return; + } + break; + case RACE_DWARF: + switch(m_uiExecuteSpeech_Counter) + { + case 0: DoScriptText(SAY_EXEC_START_2, m_creature, pPlayer); break; + case 1: m_creature->SetStandState(UNIT_STAND_STATE_STAND); break; + case 2: DoScriptText(SAY_EXEC_PROG_2, m_creature, pPlayer); break; + case 3: DoScriptText(SAY_EXEC_NAME_1, m_creature, pPlayer); break; + case 4: DoScriptText(SAY_EXEC_RECOG_3, m_creature, pPlayer); break; + case 5: DoScriptText(SAY_EXEC_NOREM_2, m_creature, pPlayer); break; + case 6: DoScriptText(SAY_EXEC_THINK_5, m_creature, pPlayer); break; + case 7: DoScriptText(SAY_EXEC_LISTEN_2, m_creature, pPlayer); break; + case 8: + if (Creature* pPlaguefist = GetClosestCreatureWithEntry(m_creature, NPC_PLAGUEFIST, 85.0f)) + DoScriptText(SAY_PLAGUEFIST, pPlaguefist, pPlayer); + break; + case 9: + DoScriptText(SAY_EXEC_TIME_3, m_creature, pPlayer); + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + break; + case 10: DoScriptText(SAY_EXEC_WAITING, m_creature, pPlayer); break; + case 11: + DoScriptText(EMOTE_DIES, m_creature); + m_creature->setDeathState(JUST_DIED); + m_creature->SetHealth(0); + return; + } + break; + case RACE_NIGHTELF: + switch(m_uiExecuteSpeech_Counter) + { + case 0: DoScriptText(SAY_EXEC_START_1, m_creature, pPlayer); break; + case 1: m_creature->SetStandState(UNIT_STAND_STATE_STAND); break; + case 2: DoScriptText(SAY_EXEC_PROG_5, m_creature, pPlayer); break; + case 3: DoScriptText(SAY_EXEC_NAME_1, m_creature, pPlayer); break; + case 4: DoScriptText(SAY_EXEC_RECOG_1, m_creature, pPlayer); break; + case 5: DoScriptText(SAY_EXEC_NOREM_6, m_creature, pPlayer); break; + case 6: DoScriptText(SAY_EXEC_THINK_2, m_creature, pPlayer); break; + case 7: DoScriptText(SAY_EXEC_LISTEN_1, m_creature, pPlayer); break; + case 8: + if (Creature* pPlaguefist = GetClosestCreatureWithEntry(m_creature, NPC_PLAGUEFIST, 85.0f)) + DoScriptText(SAY_PLAGUEFIST, pPlaguefist, pPlayer); + break; + case 9: + DoScriptText(SAY_EXEC_TIME_7, m_creature, pPlayer); + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + break; + case 10: DoScriptText(SAY_EXEC_WAITING, m_creature, pPlayer); break; + case 11: + DoScriptText(EMOTE_DIES, m_creature); + m_creature->setDeathState(JUST_DIED); + m_creature->SetHealth(0); + return; + } + break; + case RACE_UNDEAD_PLAYER: + switch(m_uiExecuteSpeech_Counter) + { + case 0: DoScriptText(SAY_EXEC_START_1, m_creature, pPlayer); break; + case 1: m_creature->SetStandState(UNIT_STAND_STATE_STAND); break; + case 2: DoScriptText(SAY_EXEC_PROG_3, m_creature, pPlayer); break; + case 3: DoScriptText(SAY_EXEC_NAME_1, m_creature, pPlayer); break; + case 4: DoScriptText(SAY_EXEC_RECOG_4, m_creature, pPlayer); break; + case 5: DoScriptText(SAY_EXEC_NOREM_3, m_creature, pPlayer); break; + case 6: DoScriptText(SAY_EXEC_THINK_1, m_creature, pPlayer); break; + case 7: DoScriptText(SAY_EXEC_LISTEN_3, m_creature, pPlayer); break; + case 8: + if (Creature* pPlaguefist = GetClosestCreatureWithEntry(m_creature, NPC_PLAGUEFIST, 85.0f)) + DoScriptText(SAY_PLAGUEFIST, pPlaguefist, pPlayer); + break; + case 9: + DoScriptText(SAY_EXEC_TIME_4, m_creature, pPlayer); + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + break; + case 10: DoScriptText(SAY_EXEC_WAITING, m_creature, pPlayer); break; + case 11: + DoScriptText(EMOTE_DIES, m_creature); + m_creature->setDeathState(JUST_DIED); + m_creature->SetHealth(0); + return; + } + break; + case RACE_TAUREN: + switch(m_uiExecuteSpeech_Counter) + { + case 0: DoScriptText(SAY_EXEC_START_1, m_creature, pPlayer); break; + case 1: m_creature->SetStandState(UNIT_STAND_STATE_STAND); break; + case 2: DoScriptText(SAY_EXEC_PROG_1, m_creature, pPlayer); break; + case 3: DoScriptText(SAY_EXEC_NAME_1, m_creature, pPlayer); break; + case 4: DoScriptText(SAY_EXEC_RECOG_5, m_creature, pPlayer); break; + case 5: DoScriptText(SAY_EXEC_NOREM_8, m_creature, pPlayer); break; + case 6: DoScriptText(SAY_EXEC_THINK_9, m_creature, pPlayer); break; + case 7: DoScriptText(SAY_EXEC_LISTEN_1, m_creature, pPlayer); break; + case 8: + if (Creature* pPlaguefist = GetClosestCreatureWithEntry(m_creature, NPC_PLAGUEFIST, 85.0f)) + DoScriptText(SAY_PLAGUEFIST, pPlaguefist, pPlayer); + break; + case 9: + DoScriptText(SAY_EXEC_TIME_9, m_creature, pPlayer); + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + break; + case 10: DoScriptText(SAY_EXEC_WAITING, m_creature, pPlayer); break; + case 11: + DoScriptText(EMOTE_DIES, m_creature); + m_creature->setDeathState(JUST_DIED); + m_creature->SetHealth(0); + return; + } + break; + case RACE_GNOME: + switch(m_uiExecuteSpeech_Counter) + { + case 0: DoScriptText(SAY_EXEC_START_1, m_creature, pPlayer); break; + case 1: m_creature->SetStandState(UNIT_STAND_STATE_STAND); break; + case 2: DoScriptText(SAY_EXEC_PROG_4, m_creature, pPlayer); break; + case 3: DoScriptText(SAY_EXEC_NAME_1, m_creature, pPlayer); break; + case 4: DoScriptText(SAY_EXEC_RECOG_1, m_creature, pPlayer); break; + case 5: DoScriptText(SAY_EXEC_NOREM_4, m_creature, pPlayer); break; + case 6: DoScriptText(SAY_EXEC_THINK_6, m_creature, pPlayer); break; + case 7: DoScriptText(SAY_EXEC_LISTEN_1, m_creature, pPlayer); break; + case 8: + if (Creature* pPlaguefist = GetClosestCreatureWithEntry(m_creature, NPC_PLAGUEFIST, 85.0f)) + DoScriptText(SAY_PLAGUEFIST, pPlaguefist, pPlayer); + break; + case 9: + DoScriptText(SAY_EXEC_TIME_5, m_creature, pPlayer); + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + break; + case 10: DoScriptText(SAY_EXEC_WAITING, m_creature, pPlayer); break; + case 11: + DoScriptText(EMOTE_DIES, m_creature); + m_creature->setDeathState(JUST_DIED); + m_creature->SetHealth(0); + return; + } + break; + case RACE_TROLL: + switch(m_uiExecuteSpeech_Counter) + { + case 0: DoScriptText(SAY_EXEC_START_3, m_creature, pPlayer); break; + case 1: m_creature->SetStandState(UNIT_STAND_STATE_STAND); break; + case 2: DoScriptText(SAY_EXEC_PROG_7, m_creature, pPlayer); break; + case 3: DoScriptText(SAY_EXEC_NAME_2, m_creature, pPlayer); break; + case 4: DoScriptText(SAY_EXEC_RECOG_6, m_creature, pPlayer); break; + case 5: DoScriptText(SAY_EXEC_NOREM_9, m_creature, pPlayer); break; + case 6: DoScriptText(SAY_EXEC_THINK_10, m_creature, pPlayer); break; + case 7: DoScriptText(SAY_EXEC_LISTEN_4, m_creature, pPlayer); break; + case 8: + if (Creature* pPlaguefist = GetClosestCreatureWithEntry(m_creature, NPC_PLAGUEFIST, 85.0f)) + DoScriptText(SAY_PLAGUEFIST, pPlaguefist, pPlayer); + break; + case 9: + DoScriptText(SAY_EXEC_TIME_10, m_creature, pPlayer); + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + break; + case 10: DoScriptText(SAY_EXEC_WAITING, m_creature, pPlayer); break; + case 11: + DoScriptText(EMOTE_DIES, m_creature); + m_creature->setDeathState(JUST_DIED); + m_creature->SetHealth(0); + return; + } + break; + case RACE_BLOODELF: + switch(m_uiExecuteSpeech_Counter) + { + case 0: DoScriptText(SAY_EXEC_START_1, m_creature, pPlayer); break; + case 1: m_creature->SetStandState(UNIT_STAND_STATE_STAND); break; + case 2: DoScriptText(SAY_EXEC_PROG_1, m_creature, pPlayer); break; + case 3: DoScriptText(SAY_EXEC_NAME_1, m_creature, pPlayer); break; + case 4: DoScriptText(SAY_EXEC_RECOG_1, m_creature, pPlayer); break; + //case 5: //unknown + case 6: DoScriptText(SAY_EXEC_THINK_3, m_creature, pPlayer); break; + case 7: DoScriptText(SAY_EXEC_LISTEN_1, m_creature, pPlayer); break; + case 8: + if (Creature* pPlaguefist = GetClosestCreatureWithEntry(m_creature, NPC_PLAGUEFIST, 85.0f)) + DoScriptText(SAY_PLAGUEFIST, pPlaguefist, pPlayer); + break; + case 9: + DoScriptText(SAY_EXEC_TIME_1, m_creature, pPlayer); + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + break; + case 10: DoScriptText(SAY_EXEC_WAITING, m_creature, pPlayer); break; + case 11: + DoScriptText(EMOTE_DIES, m_creature); + m_creature->setDeathState(JUST_DIED); + m_creature->SetHealth(0); + return; + } + break; + case RACE_DRAENEI: + switch(m_uiExecuteSpeech_Counter) + { + case 0: DoScriptText(SAY_EXEC_START_1, m_creature, pPlayer); break; + case 1: m_creature->SetStandState(UNIT_STAND_STATE_STAND); break; + case 2: DoScriptText(SAY_EXEC_PROG_1, m_creature, pPlayer); break; + case 3: DoScriptText(SAY_EXEC_NAME_1, m_creature, pPlayer); break; + case 4: DoScriptText(SAY_EXEC_RECOG_2, m_creature, pPlayer); break; + case 5: DoScriptText(SAY_EXEC_NOREM_1, m_creature, pPlayer); break; + case 6: DoScriptText(SAY_EXEC_THINK_4, m_creature, pPlayer); break; + case 7: DoScriptText(SAY_EXEC_LISTEN_1, m_creature, pPlayer); break; + case 8: + if (Creature* pPlaguefist = GetClosestCreatureWithEntry(m_creature, NPC_PLAGUEFIST, 85.0f)) + DoScriptText(SAY_PLAGUEFIST, pPlaguefist, pPlayer); + break; + case 9: + DoScriptText(SAY_EXEC_TIME_2, m_creature, pPlayer); + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + break; + case 10: DoScriptText(SAY_EXEC_WAITING, m_creature, pPlayer); break; + case 11: + DoScriptText(EMOTE_DIES, m_creature); + m_creature->setDeathState(JUST_DIED); + m_creature->SetHealth(0); + return; + } + break; + } + + if (m_uiExecuteSpeech_Counter >= 9) + m_uiExecuteSpeech_Timer = 15000; + else + m_uiExecuteSpeech_Timer = 7000; + + ++m_uiExecuteSpeech_Counter; + } + else + m_uiExecuteSpeech_Timer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_npc_a_special_surprise(Creature* pCreature) +{ + return new npc_a_special_surpriseAI(pCreature); +} + +/*###### +## npc_death_knight_initiate +######*/ + +enum +{ + SAY_DUEL_A = -1609016, + SAY_DUEL_B = -1609017, + SAY_DUEL_C = -1609018, + SAY_DUEL_D = -1609019, + SAY_DUEL_E = -1609020, + SAY_DUEL_F = -1609021, + SAY_DUEL_G = -1609022, + SAY_DUEL_H = -1609023, + SAY_DUEL_I = -1609024, + + SPELL_DUEL = 52996, + SPELL_DUEL_TRIGGERED = 52990, + SPELL_DUEL_VICTORY = 52994, + SPELL_DUEL_FLAG = 52991, + + QUEST_DEATH_CHALLENGE = 12733, + 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 +}; + +#define GOSSIP_ACCEPT_DUEL "I challenge you, death knight!" + +struct MANGOS_DLL_DECL npc_death_knight_initiateAI : public ScriptedAI +{ + npc_death_knight_initiateAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + uint64 m_uiDuelerGUID; + uint32 m_uiDuelTimer; + bool m_bIsDuelInProgress; + + void Reset() + { + if (m_creature->getFaction() != m_creature->GetCreatureInfo()->faction_A) + m_creature->setFaction(m_creature->GetCreatureInfo()->faction_A); + + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_15); + + m_uiDuelerGUID = 0; + m_uiDuelTimer = 5000; + m_bIsDuelInProgress = false; + } + + void AttackedBy(Unit* pAttacker) + { + if (m_creature->getVictim()) + return; + + if (m_creature->IsFriendlyTo(pAttacker)) + return; + + AttackStart(pAttacker); + } + + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + { + if (!m_bIsDuelInProgress && pSpell->Id == SPELL_DUEL_TRIGGERED) + { + m_uiDuelerGUID = pCaster->GetGUID(); + m_bIsDuelInProgress = true; + } + } + + void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + { + if (m_bIsDuelInProgress && uiDamage > m_creature->GetHealth()) + { + uiDamage = 0; + + if (Unit* pUnit = Unit::GetUnit(*m_creature, m_uiDuelerGUID)) + m_creature->CastSpell(pUnit, SPELL_DUEL_VICTORY, true); + + //possibly not evade, but instead have end sequenze + EnterEvadeMode(); + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + { + if (m_bIsDuelInProgress) + { + if (m_uiDuelTimer < uiDiff) + { + m_creature->setFaction(FACTION_HOSTILE); + + if (Unit* pUnit = Unit::GetUnit(*m_creature, m_uiDuelerGUID)) + AttackStart(pUnit); + } + else + m_uiDuelTimer -= uiDiff; + } + return; + } + + // TODO: spells + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_death_knight_initiate(Creature* pCreature) +{ + return new npc_death_knight_initiateAI(pCreature); +} + +bool GossipHello_npc_death_knight_initiate(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->GetQuestStatus(QUEST_DEATH_CHALLENGE) == QUEST_STATUS_INCOMPLETE) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ACCEPT_DUEL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->SEND_GOSSIP_MENU(13433, pCreature->GetGUID()); + return true; + } + return false; +} + +bool GossipSelect_npc_death_knight_initiate(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + pPlayer->CLOSE_GOSSIP_MENU(); + + if (npc_death_knight_initiateAI* pInitiateAI = dynamic_cast(pCreature->AI())) + { + if (pInitiateAI->m_bIsDuelInProgress) + return true; + } + + pCreature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_15); + + int32 uiSayId = rand()% (sizeof(m_auiRandomSay)/sizeof(int32)); + DoScriptText(m_auiRandomSay[uiSayId], pCreature, pPlayer); + + pCreature->CastSpell(pPlayer, SPELL_DUEL, false); + pCreature->CastSpell(pPlayer, SPELL_DUEL_FLAG, true); + } + return true; +} + +/*###### +## npc_koltira_deathweaver +######*/ + +enum eKoltira +{ + SAY_BREAKOUT1 = -1609079, + SAY_BREAKOUT2 = -1609080, + SAY_BREAKOUT3 = -1609081, + SAY_BREAKOUT4 = -1609082, + SAY_BREAKOUT5 = -1609083, + SAY_BREAKOUT6 = -1609084, + SAY_BREAKOUT7 = -1609085, + SAY_BREAKOUT8 = -1609086, + SAY_BREAKOUT9 = -1609087, + SAY_BREAKOUT10 = -1609088, + + SPELL_KOLTIRA_TRANSFORM = 52899, + SPELL_ANTI_MAGIC_ZONE = 52894, + + QUEST_BREAKOUT = 12727, + + NPC_CRIMSON_ACOLYTE = 29007, + NPC_HIGH_INQUISITOR_VALROTH = 29001, + NPC_KOLTIRA_ALT = 28447, + + //not sure about this id + //NPC_DEATH_KNIGHT_MOUNT = 29201, + MODEL_DEATH_KNIGHT_MOUNT = 25278 +}; + +struct MANGOS_DLL_DECL npc_koltira_deathweaverAI : public npc_escortAI +{ + npc_koltira_deathweaverAI(Creature *pCreature) : npc_escortAI(pCreature) { Reset(); } + + uint32 m_uiWave; + uint32 m_uiWave_Timer; + uint64 m_uiValrothGUID; + + void Reset() + { + if (!HasEscortState(STATE_ESCORT_ESCORTING)) + { + m_uiWave = 0; + m_uiWave_Timer = 3000; + m_uiValrothGUID = 0; + } + } + + void WaypointReached(uint32 uiPointId) + { + switch(uiPointId) + { + case 0: + DoScriptText(SAY_BREAKOUT1, m_creature); + break; + case 1: + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + break; + case 2: + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + //m_creature->UpdateEntry(NPC_KOLTIRA_ALT); //unclear if we must update or not + DoCast(m_creature, SPELL_KOLTIRA_TRANSFORM); + break; + case 3: + SetEscortPaused(true); + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + DoScriptText(SAY_BREAKOUT2, m_creature); + DoCast(m_creature, SPELL_ANTI_MAGIC_ZONE); // cast again that makes bubble up + break; + case 4: + SetRun(true); + break; + case 9: + m_creature->Mount(MODEL_DEATH_KNIGHT_MOUNT); + break; + case 10: + m_creature->Unmount(); + break; + } + } + + void JustSummoned(Creature* pSummoned) + { + if (Player* pPlayer = GetPlayerForEscort()) + { + pSummoned->AI()->AttackStart(pPlayer); + pSummoned->AddThreat(m_creature, 0.0f); + } + + if (pSummoned->GetEntry() == NPC_HIGH_INQUISITOR_VALROTH) + m_uiValrothGUID = pSummoned->GetGUID(); + } + + void SummonAcolyte(uint32 uiAmount) + { + for(uint32 i = 0; i < uiAmount; ++i) + m_creature->SummonCreature(NPC_CRIMSON_ACOLYTE, 1642.329, -6045.818, 127.583, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + } + + void UpdateEscortAI(const uint32 uiDiff) + { + if (HasEscortState(STATE_ESCORT_PAUSED)) + { + if (m_uiWave_Timer < uiDiff) + { + switch(m_uiWave) + { + case 0: + DoScriptText(SAY_BREAKOUT3, m_creature); + SummonAcolyte(3); + m_uiWave_Timer = 20000; + break; + case 1: + DoScriptText(SAY_BREAKOUT4, m_creature); + SummonAcolyte(3); + m_uiWave_Timer = 20000; + break; + case 2: + DoScriptText(SAY_BREAKOUT5, m_creature); + SummonAcolyte(4); + m_uiWave_Timer = 20000; + break; + case 3: + DoScriptText(SAY_BREAKOUT6, m_creature); + m_creature->SummonCreature(NPC_HIGH_INQUISITOR_VALROTH, 1642.329, -6045.818, 127.583, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000); + m_uiWave_Timer = 1000; + break; + case 4: + { + Unit* pTemp = Unit::GetUnit(*m_creature, m_uiValrothGUID); + + if (!pTemp || !pTemp->isAlive()) + { + DoScriptText(SAY_BREAKOUT8, m_creature); + m_uiWave_Timer = 5000; + } + else + { + m_uiWave_Timer = 2500; + return; //return, we don't want m_uiWave to increment now + } + break; + } + case 5: + DoScriptText(SAY_BREAKOUT9, m_creature); + m_creature->RemoveAurasDueToSpell(SPELL_ANTI_MAGIC_ZONE); + m_uiWave_Timer = 2500; + break; + case 6: + DoScriptText(SAY_BREAKOUT10, m_creature); + SetEscortPaused(false); + break; + } + + ++m_uiWave; + } + else + m_uiWave_Timer -= uiDiff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_koltira_deathweaver(Creature* pCreature) +{ + return new npc_koltira_deathweaverAI(pCreature); +} + +bool QuestAccept_npc_koltira_deathweaver(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_BREAKOUT) + { + pCreature->SetStandState(UNIT_STAND_STATE_STAND); + + if (npc_koltira_deathweaverAI* pEscortAI = dynamic_cast(pCreature->AI())) + pEscortAI->Start(false, false, pPlayer->GetGUID(), pQuest); + } + return true; +} + +/*###### +## +######*/ + +enum +{ + SAY_START = -1609000, // 8 texts in total, GetTextId() generates random with this as base + SAY_AGGRO = -1609008, // 8 texts in total, GetTextId() generates random with this as base + + //SPELL_CHAINED_PESANT_LH = 54602, // not used. possible it determine side, where to go get "weapon" + //SPELL_CHAINED_PESANT_RH = 54610, + SPELL_CHAINED_PESANT_CHEST = 54612, + SPELL_CHAINED_PESANT_BREATH = 54613, + SPELL_INITIATE_VISUAL = 51519, + + SPELL_BLOOD_STRIKE = 52374, + SPELL_DEATH_COIL = 52375, + SPELL_ICY_TOUCH = 52372, + SPELL_PLAGUE_STRIKE = 52373, + + NPC_ANCHOR = 29521, + FACTION_MONSTER = 16, + + PHASE_INACTIVE_OR_COMBAT = 0, + PHASE_DRESSUP = 1, + PHASE_ACTIVATE = 2 +}; + +struct DisplayToSpell +{ + uint32 m_uiDisplayId; + uint32 m_uiSpellToNewDisplay; +}; + +DisplayToSpell m_aDisplayToSpell[] = +{ + {25354, 51520}, // human M + {25355, 51534}, // human F + {25356, 51538}, // dwarf M + {25357, 51541}, // draenei M + {25358, 51535}, // nelf M + {25359, 51539}, // gnome M + {25360, 51536}, // nelf F + {25361, 51537}, // dwarf F + {25362, 51540}, // gnome F + {25363, 51542}, // draenei F + {25364, 51543}, // orc M + {25365, 51546}, // troll M + {25366, 51547}, // tauren M + {25367, 51549}, // forsaken M + {25368, 51544}, // orc F + {25369, 51552}, // belf F + {25370, 51545}, // troll F + {25371, 51548}, // tauren F + {25372, 51550}, // forsaken F + {25373, 51551} // belf M +}; + +/*###### +## npc_unworthy_initiate_anchor +######*/ + +struct MANGOS_DLL_DECL npc_unworthy_initiate_anchorAI : public ScriptedAI +{ + npc_unworthy_initiate_anchorAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_uiMyInitiate = 0; + Reset(); + } + + uint64 m_uiMyInitiate; + + void Reset() { } + + void NotifyMe(Unit* pSource) + { + Creature* pInitiate = (Creature*)Unit::GetUnit(*m_creature, m_uiMyInitiate); + + if (pInitiate && pSource) + { + pInitiate->SetLootRecipient(pSource); + m_creature->CastSpell(pInitiate,SPELL_CHAINED_PESANT_BREATH,true); + } + } + + void RegisterCloseInitiate(uint64 uiGuid) + { + m_uiMyInitiate = uiGuid; + } +}; + +CreatureAI* GetAI_npc_unworthy_initiate_anchor(Creature* pCreature) +{ + return new npc_unworthy_initiate_anchorAI(pCreature); +} + +/*###### +## npc_unworthy_initiate +######*/ + +struct MANGOS_DLL_DECL npc_unworthy_initiateAI : public ScriptedAI +{ + npc_unworthy_initiateAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pToTransform = NULL; + + uint32 uiDisplayCount = sizeof(m_aDisplayToSpell)/sizeof(DisplayToSpell); + + for (uint8 i=0; iGetDisplayId()) + { + m_pToTransform = &m_aDisplayToSpell[i]; + break; + } + } + + m_uiNormFaction = pCreature->getFaction(); + Reset(); + } + + DisplayToSpell* m_pToTransform; + + uint32 m_uiNormFaction; + uint32 m_uiAnchorCheckTimer; + uint32 m_uiPhase; + uint32 m_uiPhaseTimer; + uint32 m_uiBloodStrike_Timer; + uint32 m_uiDeathCoil_Timer; + uint32 m_uiIcyTouch_Timer; + uint32 m_uiPlagueStrike_Timer; + + void Reset() + { + if (m_creature->getFaction() != m_uiNormFaction) + m_creature->setFaction(m_uiNormFaction); + + m_uiAnchorCheckTimer = 5000; + m_uiPhase = PHASE_INACTIVE_OR_COMBAT; + m_uiPhaseTimer = 7500; + m_uiBloodStrike_Timer = 4000; + m_uiDeathCoil_Timer = 6000; + m_uiIcyTouch_Timer = 2000; + m_uiPlagueStrike_Timer = 5000; + } + + void JustReachedHome() + { + SetAnchor(); + } + + int32 GetTextId() + { + return m_uiPhase == PHASE_DRESSUP ? SAY_START-rand()%8 : SAY_AGGRO-rand()%8; + } + + void SetAnchor() + { + if (Creature* pAnchor = GetClosestCreatureWithEntry(m_creature, NPC_ANCHOR, INTERACTION_DISTANCE*2)) + { + ((npc_unworthy_initiate_anchorAI*)pAnchor->AI())->RegisterCloseInitiate(m_creature->GetGUID()); + + pAnchor->CastSpell(m_creature, SPELL_CHAINED_PESANT_CHEST, false); + + m_uiAnchorCheckTimer = 0; + return; + } + + m_uiAnchorCheckTimer = 5000; + } + + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + { + if (pSpell->Id == SPELL_CHAINED_PESANT_BREATH) + { + pCaster->InterruptNonMeleeSpells(true); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + + m_uiPhase = PHASE_DRESSUP; + + if (Player* pSource = m_creature->GetLootRecipient()) + DoScriptText(GetTextId(), m_creature, pSource); + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_uiAnchorCheckTimer && m_uiAnchorCheckTimer < uiDiff) + SetAnchor(); + else + m_uiAnchorCheckTimer -= uiDiff; + + if (m_uiPhase == PHASE_INACTIVE_OR_COMBAT) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiBloodStrike_Timer < uiDiff) + { + DoCast(m_creature->getVictim(),SPELL_BLOOD_STRIKE); + m_uiBloodStrike_Timer = 9000; + }else m_uiBloodStrike_Timer -= uiDiff; + + if (m_uiDeathCoil_Timer < uiDiff) + { + DoCast(m_creature->getVictim(),SPELL_DEATH_COIL); + m_uiDeathCoil_Timer = 8000; + }else m_uiDeathCoil_Timer -= uiDiff; + + if (m_uiIcyTouch_Timer < uiDiff) + { + DoCast(m_creature->getVictim(),SPELL_ICY_TOUCH); + m_uiIcyTouch_Timer = 8000; + }else m_uiIcyTouch_Timer -= uiDiff; + + if (m_uiPlagueStrike_Timer < uiDiff) + { + DoCast(m_creature->getVictim(),SPELL_PLAGUE_STRIKE); + m_uiPlagueStrike_Timer = 8000; + }else m_uiPlagueStrike_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } + else + { + if (m_uiPhaseTimer < uiDiff) + { + if (m_uiPhase == PHASE_DRESSUP) + { + if (m_pToTransform) + { + m_creature->CastSpell(m_creature, m_pToTransform->m_uiSpellToNewDisplay, true); + m_creature->CastSpell(m_creature, SPELL_INITIATE_VISUAL, false); + } + else + error_log("SD2: npc_unworthy_initiate does not have any spell associated with model"); + + m_uiPhase = PHASE_ACTIVATE; + } + else + { + m_creature->setFaction(FACTION_MONSTER); + + m_uiPhase = PHASE_INACTIVE_OR_COMBAT; + + if (Player* pTarget = m_creature->GetLootRecipient()) + { + DoScriptText(GetTextId(), m_creature, pTarget); + AttackStart(pTarget); + } + } + + m_uiPhaseTimer = 5000; + } + else + m_uiPhaseTimer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_npc_unworthy_initiate(Creature* pCreature) +{ + return new npc_unworthy_initiateAI(pCreature); +} + +/*###### +## go_acherus_soul_prison +######*/ + +bool GOHello_go_acherus_soul_prison(Player* pPlayer, GameObject* pGo) +{ + if (Creature* pAnchor = GetClosestCreatureWithEntry(pGo, NPC_ANCHOR, INTERACTION_DISTANCE)) + ((npc_unworthy_initiate_anchorAI*)pAnchor->AI())->NotifyMe(pPlayer); + + return false; +} + +void AddSC_ebon_hold() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_a_special_surprise"; + newscript->GetAI = &GetAI_npc_a_special_surprise; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_death_knight_initiate"; + newscript->GetAI = &GetAI_npc_death_knight_initiate; + newscript->pGossipHello = &GossipHello_npc_death_knight_initiate; + newscript->pGossipSelect = &GossipSelect_npc_death_knight_initiate; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_koltira_deathweaver"; + newscript->GetAI = &GetAI_npc_koltira_deathweaver; + newscript->pQuestAccept = &QuestAccept_npc_koltira_deathweaver; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_unworthy_initiate"; + newscript->GetAI = &GetAI_npc_unworthy_initiate; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_unworthy_initiate_anchor"; + newscript->GetAI = &GetAI_npc_unworthy_initiate_anchor; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "go_acherus_soul_prison"; + newscript->pGOHello = &GOHello_go_acherus_soul_prison; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp new file mode 100644 index 000000000..763bd6dc5 --- /dev/null +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp @@ -0,0 +1,127 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Arcanist_Doan +SD%Complete: 100 +SDComment: +SDCategory: Scarlet Monastery +EndScriptData */ + +#include "precompiled.h" + +enum +{ + SAY_AGGRO = -1189019, + SAY_SPECIALAE = -1189020, + + SPELL_POLYMORPH = 13323, + SPELL_AOESILENCE = 8988, + SPELL_ARCANEEXPLOSION = 9433, + SPELL_FIREAOE = 9435, + SPELL_ARCANEBUBBLE = 9438, +}; + +struct MANGOS_DLL_DECL boss_arcanist_doanAI : public ScriptedAI +{ + boss_arcanist_doanAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 Polymorph_Timer; + uint32 AoESilence_Timer; + uint32 ArcaneExplosion_Timer; + bool bCanDetonate; + bool bShielded; + + void Reset() + { + Polymorph_Timer = 20000; + AoESilence_Timer = 15000; + ArcaneExplosion_Timer = 3000; + bCanDetonate = false; + bShielded = false; + } + + void Aggro(Unit *who) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (bShielded && bCanDetonate) + { + DoCast(m_creature,SPELL_FIREAOE); + bCanDetonate = false; + } + + if (m_creature->HasAura(SPELL_ARCANEBUBBLE)) + return; + + //If we are <50% hp cast Arcane Bubble + if (!bShielded && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 50) + { + //wait if we already casting + if (m_creature->IsNonMeleeSpellCasted(false)) + return; + + DoScriptText(SAY_SPECIALAE, m_creature); + DoCast(m_creature,SPELL_ARCANEBUBBLE); + + bCanDetonate = true; + bShielded = true; + } + + if (Polymorph_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1)) + DoCast(target,SPELL_POLYMORPH); + + Polymorph_Timer = 20000; + }else Polymorph_Timer -= diff; + + //AoESilence_Timer + if (AoESilence_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_AOESILENCE); + AoESilence_Timer = urand(15000, 20000); + }else AoESilence_Timer -= diff; + + //ArcaneExplosion_Timer + if (ArcaneExplosion_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_ARCANEEXPLOSION); + ArcaneExplosion_Timer = 8000; + }else ArcaneExplosion_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_arcanist_doan(Creature* pCreature) +{ + return new boss_arcanist_doanAI(pCreature); +} + +void AddSC_boss_arcanist_doan() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_arcanist_doan"; + newscript->GetAI = &GetAI_boss_arcanist_doan; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_azshir_the_sleepless.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_azshir_the_sleepless.cpp new file mode 100644 index 000000000..dc3d7ed17 --- /dev/null +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_azshir_the_sleepless.cpp @@ -0,0 +1,93 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Azshir_the_Sleepless +SD%Complete: 80 +SDComment: +SDCategory: Scarlet Monastery +EndScriptData */ + +#include "precompiled.h" + +#define SPELL_CALLOFTHEGRAVE 17831 +#define SPELL_TERRIFY 7399 +#define SPELL_SOULSIPHON 7290 + +struct MANGOS_DLL_DECL boss_azshir_the_sleeplessAI : public ScriptedAI +{ + boss_azshir_the_sleeplessAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 SoulSiphon_Timer; + uint32 CallOftheGrave_Timer; + uint32 Terrify_Timer; + + void Reset() + { + SoulSiphon_Timer = 1; + CallOftheGrave_Timer = 30000; + Terrify_Timer = 20000; + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //If we are <50% hp cast Soul Siphon rank 1 + if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 50 && !m_creature->IsNonMeleeSpellCasted(false)) + { + //SoulSiphon_Timer + if (SoulSiphon_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_SOULSIPHON); + return; + + SoulSiphon_Timer = 20000; + }else SoulSiphon_Timer -= diff; + } + + //CallOfTheGrave_Timer + if (CallOftheGrave_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_CALLOFTHEGRAVE); + CallOftheGrave_Timer = 30000; + }else CallOftheGrave_Timer -= diff; + + //Terrify_Timer + if (Terrify_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_TERRIFY); + Terrify_Timer = 20000; + }else Terrify_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_azshir_the_sleepless(Creature* pCreature) +{ + return new boss_azshir_the_sleeplessAI(pCreature); +} + +void AddSC_boss_azshir_the_sleepless() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_azshir_the_sleepless"; + newscript->GetAI = &GetAI_boss_azshir_the_sleepless; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_bloodmage_thalnos.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_bloodmage_thalnos.cpp new file mode 100644 index 000000000..1d1112a20 --- /dev/null +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_bloodmage_thalnos.cpp @@ -0,0 +1,123 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Bloodmage_Thalnos +SD%Complete: 100 +SDComment: +SDCategory: Scarlet Monastery +EndScriptData */ + +#include "precompiled.h" + +enum +{ + SAY_AGGRO = -1189016, + SAY_HEALTH = -1189017, + SAY_KILL = -1189018, + + SPELL_FLAMESHOCK = 8053, + SPELL_SHADOWBOLT = 1106, + SPELL_FLAMESPIKE = 8814, + SPELL_FIRENOVA = 16079, +}; + +struct MANGOS_DLL_DECL boss_bloodmage_thalnosAI : public ScriptedAI +{ + boss_bloodmage_thalnosAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + bool HpYell; + uint32 FlameShock_Timer; + uint32 ShadowBolt_Timer; + uint32 FlameSpike_Timer; + uint32 FireNova_Timer; + + void Reset() + { + HpYell = false; + FlameShock_Timer = 10000; + ShadowBolt_Timer = 2000; + FlameSpike_Timer = 8000; + FireNova_Timer = 40000; + } + + void Aggro(Unit *who) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void KilledUnit(Unit* Victim) + { + DoScriptText(SAY_KILL, m_creature); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //If we are <35% hp + if (!HpYell && ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() <= 35)) + { + DoScriptText(SAY_HEALTH, m_creature); + HpYell = true; + } + + //FlameShock_Timer + if (FlameShock_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_FLAMESHOCK); + FlameShock_Timer = urand(10000, 15000); + }else FlameShock_Timer -= diff; + + //FlameSpike_Timer + if (FlameSpike_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_FLAMESPIKE); + FlameSpike_Timer = 30000; + }else FlameSpike_Timer -= diff; + + //FireNova_Timer + if (FireNova_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_FIRENOVA); + FireNova_Timer = 40000; + }else FireNova_Timer -= diff; + + //ShadowBolt_Timer + if (ShadowBolt_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_SHADOWBOLT); + ShadowBolt_Timer = 2000; + }else ShadowBolt_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_bloodmage_thalnos(Creature* pCreature) +{ + return new boss_bloodmage_thalnosAI(pCreature); +} + +void AddSC_boss_bloodmage_thalnos() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_bloodmage_thalnos"; + newscript->GetAI = &GetAI_boss_bloodmage_thalnos; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp new file mode 100644 index 000000000..c0b5988c4 --- /dev/null +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp @@ -0,0 +1,90 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 +* 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_headless_horseman +SD%Complete: 0 +SDComment: Place Holder +SDCategory: Scarlet Monastery +EndScriptData */ + +#include "precompiled.h" + +enum +{ + SAY_ENTRANCE = -1189022, + SAY_REJOINED = -1189023, + SAY_BODY_DEFEAT = -1189024, + SAY_LOST_HEAD = -1189025, + SAY_CONFLAGRATION = -1189026, + SAY_SPROUTING_PUMPKINS = -1189027, + SAY_SLAY = -1189028, + SAY_DEATH = -1189029, + + EMOTE_LAUGH = -1189030, + + SAY_PLAYER1 = -1189031, + SAY_PLAYER2 = -1189032, + SAY_PLAYER3 = -1189033, + SAY_PLAYER4 = -1189034 +}; + +struct MANGOS_DLL_DECL boss_headless_horsemanAI : public ScriptedAI +{ + boss_headless_horsemanAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + void Reset() + { + } + + void Aggro(Unit* pWho) + { + m_creature->SetInCombatWithZone(); + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(SAY_SLAY, m_creature); + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_headless_horseman(Creature* pCreature) +{ + return new boss_headless_horsemanAI(pCreature); +} + +void AddSC_boss_headless_horseman() +{ + Script* NewScript; + + NewScript = new Script; + NewScript->Name = "boss_headless_horseman"; + NewScript->GetAI = GetAI_boss_headless_horseman; + NewScript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp new file mode 100644 index 000000000..3926b8a2e --- /dev/null +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp @@ -0,0 +1,158 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Herod +SD%Complete: 95 +SDComment: Should in addition spawn Myrmidons in the hallway outside +SDCategory: Scarlet Monastery +EndScriptData */ + +#include "precompiled.h" +#include "escort_ai.h" + +#define SAY_AGGRO -1189000 +#define SAY_WHIRLWIND -1189001 +#define SAY_ENRAGE -1189002 +#define SAY_KILL -1189003 +#define EMOTE_ENRAGE -1189004 + +#define SPELL_RUSHINGCHARGE 8260 +#define SPELL_CLEAVE 15496 +#define SPELL_WHIRLWIND 8989 +#define SPELL_FRENZY 8269 + +#define ENTRY_SCARLET_TRAINEE 6575 +#define ENTRY_SCARLET_MYRMIDON 4295 + +struct MANGOS_DLL_DECL boss_herodAI : public ScriptedAI +{ + boss_herodAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + bool Enrage; + uint32 Cleave_Timer; + uint32 Whirlwind_Timer; + + void Reset() + { + Enrage = false; + Cleave_Timer = 12000; + Whirlwind_Timer = 45000; + } + + void Aggro(Unit *who) + { + DoScriptText(SAY_AGGRO, m_creature); + DoCast(m_creature,SPELL_RUSHINGCHARGE); + } + + void KilledUnit(Unit *victim) + { + DoScriptText(SAY_KILL, m_creature); + } + + void JustDied(Unit* killer) + { + for(uint8 i = 0; i < 20; ++i) + m_creature->SummonCreature(ENTRY_SCARLET_TRAINEE, 1939.18, -431.58, 17.09, 6.22, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //If we are <30% hp goes Enraged + if (!Enrage && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 30 && !m_creature->IsNonMeleeSpellCasted(false)) + { + DoScriptText(EMOTE_ENRAGE, m_creature); + DoScriptText(SAY_ENRAGE, m_creature); + DoCast(m_creature,SPELL_FRENZY); + Enrage = true; + } + + //Cleave_Timer + if (Cleave_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_CLEAVE); + Cleave_Timer = 12000; + }else Cleave_Timer -= diff; + + if (Whirlwind_Timer < diff) + { + DoScriptText(SAY_WHIRLWIND, m_creature); + DoCast(m_creature->getVictim(),SPELL_WHIRLWIND); + Whirlwind_Timer = 30000; + }else Whirlwind_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_herod(Creature* pCreature) +{ + return new boss_herodAI(pCreature); +} + +struct MANGOS_DLL_DECL mob_scarlet_traineeAI : public npc_escortAI +{ + mob_scarlet_traineeAI(Creature* pCreature) : npc_escortAI(pCreature) + { + Start_Timer = urand(1000,6000); + Reset(); + } + + uint32 Start_Timer; + + void Reset() { } + void WaypointReached(uint32 uiPoint) { } + + void UpdateEscortAI(const uint32 diff) + { + if (Start_Timer) + { + if (Start_Timer <= diff) + { + Start(true,true); + Start_Timer = 0; + }else Start_Timer -= diff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_scarlet_trainee(Creature* pCreature) +{ + return new mob_scarlet_traineeAI(pCreature); +} + +void AddSC_boss_herod() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_herod"; + newscript->GetAI = &GetAI_boss_herod; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_scarlet_trainee"; + newscript->GetAI = &GetAI_mob_scarlet_trainee; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_high_inquisitor_fairbanks.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_high_inquisitor_fairbanks.cpp new file mode 100644 index 000000000..89608ae79 --- /dev/null +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_high_inquisitor_fairbanks.cpp @@ -0,0 +1,128 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_High_Inquisitor_Fairbanks +SD%Complete: 100 +SDComment: TODO: if this guy not involved in some special event, remove (and let ACID script) +SDCategory: Scarlet Monastery +EndScriptData */ + +#include "precompiled.h" + +enum +{ + SPELL_CURSEOFBLOOD = 8282, + SPELL_DISPELMAGIC = 15090, + SPELL_FEAR = 12096, + SPELL_HEAL = 12039, + SPELL_POWERWORDSHIELD = 11647, + SPELL_SLEEP = 8399 +}; + +struct MANGOS_DLL_DECL boss_high_inquisitor_fairbanksAI : public ScriptedAI +{ + boss_high_inquisitor_fairbanksAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 CurseOfBlood_Timer; + uint32 DispelMagic_Timer; + uint32 Fear_Timer; + uint32 Heal_Timer; + uint32 Sleep_Timer; + uint32 Dispel_Timer; + bool PowerWordShield; + + void Reset() + { + CurseOfBlood_Timer = 10000; + DispelMagic_Timer = 30000; + Fear_Timer = 40000; + Heal_Timer = 30000; + Sleep_Timer = 30000; + Dispel_Timer = 20000; + PowerWordShield = false; + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //If we are <25% hp cast Heal + if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 25 && !m_creature->IsNonMeleeSpellCasted(false) && Heal_Timer < diff) + { + DoCast(m_creature,SPELL_HEAL); + Heal_Timer = 30000; + }else Heal_Timer -= diff; + + //Fear_Timer + if (Fear_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1)) + DoCast(target,SPELL_FEAR); + + Fear_Timer = 40000; + }else Fear_Timer -= diff; + + //Sleep_Timer + if (Sleep_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_TOPAGGRO,0)) + DoCast(target,SPELL_SLEEP); + + Sleep_Timer = 30000; + }else Sleep_Timer -= diff; + + //PowerWordShield_Timer + if (!PowerWordShield && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 25) + { + DoCast(m_creature,SPELL_POWERWORDSHIELD); + PowerWordShield = true; + } + + //Dispel_Timer + if (Dispel_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, SPELL_DISPELMAGIC); + + DispelMagic_Timer = 30000; + }else DispelMagic_Timer -= diff; + + //CurseOfBlood_Timer + if (CurseOfBlood_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_CURSEOFBLOOD); + CurseOfBlood_Timer = 25000; + }else CurseOfBlood_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_high_inquisitor_fairbanks(Creature* pCreature) +{ + return new boss_high_inquisitor_fairbanksAI(pCreature); +} + +void AddSC_boss_high_inquisitor_fairbanks() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_high_inquisitor_fairbanks"; + newscript->GetAI = &GetAI_boss_high_inquisitor_fairbanks; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_houndmaster_loksey.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_houndmaster_loksey.cpp new file mode 100644 index 000000000..dd9772834 --- /dev/null +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_houndmaster_loksey.cpp @@ -0,0 +1,77 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Houndmaster_Loksey +SD%Complete: 100 +SDComment: TODO: if this guy not involved in some special event, remove (and let ACID script) +SDCategory: Scarlet Monastery +EndScriptData */ + +#include "precompiled.h" + +enum +{ + SAY_AGGRO = -1189021, + SPELL_SUMMONSCARLETHOUND = 17164, + SPELL_BLOODLUST = 6742 +}; + +struct MANGOS_DLL_DECL boss_houndmaster_lokseyAI : public ScriptedAI +{ + boss_houndmaster_lokseyAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 BloodLust_Timer; + + void Reset() + { + BloodLust_Timer = 20000; + } + + void Aggro(Unit *who) + { + DoScriptText(SAY_AGGRO, m_creature); + DoCast(m_creature,SPELL_SUMMONSCARLETHOUND); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (BloodLust_Timer < diff) + { + DoCast(m_creature,SPELL_BLOODLUST); + BloodLust_Timer = 20000; + }else BloodLust_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_houndmaster_loksey(Creature* pCreature) +{ + return new boss_houndmaster_lokseyAI(pCreature); +} + +void AddSC_boss_houndmaster_loksey() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_houndmaster_loksey"; + newscript->GetAI = &GetAI_boss_houndmaster_loksey; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_interrogator_vishas.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_interrogator_vishas.cpp new file mode 100644 index 000000000..a4dd3fa69 --- /dev/null +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_interrogator_vishas.cpp @@ -0,0 +1,120 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Interrogator_Vishas +SD%Complete: 100 +SDComment: +SDCategory: Scarlet Monastery +EndScriptData */ + +#include "precompiled.h" +#include "scarlet_monastery.h" + +enum +{ + SAY_AGGRO = -1189011, + SAY_HEALTH1 = -1189012, + SAY_HEALTH2 = -1189013, + SAY_KILL = -1189014, + SAY_TRIGGER_VORREL = -1189015, + + SPELL_SHADOWWORDPAIN = 2767, +}; + +struct MANGOS_DLL_DECL boss_interrogator_vishasAI : public ScriptedAI +{ + boss_interrogator_vishasAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + bool Yell30; + bool Yell60; + uint32 ShadowWordPain_Timer; + + void Reset() + { + Yell30 = false; + Yell60 = false; + ShadowWordPain_Timer = 5000; + } + + void Aggro(Unit *who) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void KilledUnit(Unit* Victim) + { + DoScriptText(SAY_KILL, m_creature); + } + + void JustDied(Unit* Killer) + { + if (!m_pInstance) + return; + + //Any other actions to do with vorrel? setStandState? + if (Unit *vorrel = Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_VORREL))) + DoScriptText(SAY_TRIGGER_VORREL, vorrel); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //If we are low on hp Do sayings + if (!Yell60 && ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() <= 60)) + { + DoScriptText(SAY_HEALTH1, m_creature); + Yell60 = true; + } + + if (!Yell30 && ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() <= 30)) + { + DoScriptText(SAY_HEALTH2, m_creature); + Yell30 = true; + } + + //ShadowWordPain_Timer + if (ShadowWordPain_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_SHADOWWORDPAIN); + ShadowWordPain_Timer = urand(5000, 15000); + }else ShadowWordPain_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_interrogator_vishas(Creature* pCreature) +{ + return new boss_interrogator_vishasAI(pCreature); +} + +void AddSC_boss_interrogator_vishas() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_interrogator_vishas"; + newscript->GetAI = &GetAI_boss_interrogator_vishas; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp new file mode 100644 index 000000000..a1ec49c9f --- /dev/null +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp @@ -0,0 +1,377 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Mograine_And_Whitemane +SD%Complete: 90 +SDComment: +SDCategory: Scarlet Monastery +EndScriptData */ + +#include "precompiled.h" +#include "scarlet_monastery.h" + +enum +{ + //Mograine says + SAY_MO_AGGRO = -1189005, + SAY_MO_KILL = -1189006, + SAY_MO_RESSURECTED = -1189007, + + //Whitemane says + SAY_WH_INTRO = -1189008, + SAY_WH_KILL = -1189009, + SAY_WH_RESSURECT = -1189010, + + //Mograine Spells + SPELL_CRUSADERSTRIKE = 14518, + SPELL_HAMMEROFJUSTICE = 5589, + SPELL_LAYONHANDS = 9257, + SPELL_RETRIBUTIONAURA = 8990, + + //Whitemanes Spells + SPELL_DEEPSLEEP = 9256, + SPELL_SCARLETRESURRECTION = 9232, + SPELL_DOMINATEMIND = 14515, + SPELL_HOLYSMITE = 9481, + SPELL_HEAL = 12039, + SPELL_POWERWORDSHIELD = 22187 +}; + +struct MANGOS_DLL_DECL boss_scarlet_commander_mograineAI : public ScriptedAI +{ + boss_scarlet_commander_mograineAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 m_uiCrusaderStrike_Timer; + uint32 m_uiHammerOfJustice_Timer; + + bool m_bHasDied; + bool m_bHeal; + bool m_bFakeDeath; + + void Reset() + { + Unit* Whitemane = Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_WHITEMANE)); + if(Whitemane && !Whitemane->isAlive()) + ((Creature*)Whitemane)->Respawn(); + m_uiCrusaderStrike_Timer = 10000; + m_uiHammerOfJustice_Timer = 10000; + + //Incase wipe during phase that mograine fake death + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + + m_bHasDied = false; + m_bHeal = false; + m_bFakeDeath = false; + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_MO_AGGRO, m_creature); + DoCast(m_creature,SPELL_RETRIBUTIONAURA); + + m_creature->CallForHelp(VISIBLE_RANGE); + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(SAY_MO_KILL, m_creature); + } + + void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + { + if (uiDamage < m_creature->GetHealth() || m_bHasDied) + return; + + if (!m_pInstance) + return; + + //On first death, fake death and open door, as well as initiate whitemane if exist + if (Unit* Whitemane = Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_WHITEMANE))) + { + m_pInstance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, IN_PROGRESS); + + Whitemane->GetMotionMaster()->MovePoint(1,1163.113370,1398.856812,32.527786); + ((Creature*)Whitemane)->AI()->AttackStart(pDoneBy); + + m_creature->GetMotionMaster()->MovementExpired(); + m_creature->GetMotionMaster()->MoveIdle(); + + m_creature->SetHealth(0); + + if (m_creature->IsNonMeleeSpellCasted(false)) + m_creature->InterruptNonMeleeSpells(false); + + m_creature->ClearComboPointHolders(); + m_creature->RemoveAllAuras(); + m_creature->ClearAllReactives(); + + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetStandState(UNIT_STAND_STATE_DEAD); + + m_bHasDied = true; + m_bFakeDeath = true; + + uiDamage = 0; + } + } + + void SpellHit(Unit* pWho, const SpellEntry* pSpell) + { + //When hit with ressurection say text + if (pSpell->Id == SPELL_SCARLETRESURRECTION) + { + DoScriptText(SAY_MO_RESSURECTED, m_creature); + m_bFakeDeath = false; + + if (m_pInstance) + m_pInstance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, SPECIAL); + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_bHasDied && !m_bHeal && m_pInstance && m_pInstance->GetData(TYPE_MOGRAINE_AND_WHITE_EVENT) == SPECIAL) + { + //On ressurection, stop fake death and heal whitemane and resume fight + if (Unit* Whitemane = Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_WHITEMANE))) + { + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + DoCast(Whitemane, SPELL_LAYONHANDS); + + m_uiCrusaderStrike_Timer = 10000; + m_uiHammerOfJustice_Timer = 10000; + + if (m_creature->getVictim()) + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + + m_bHeal = true; + } + } + + //This if-check to make sure mograine does not attack while fake death + if (m_bFakeDeath) + return; + + //m_uiCrusaderStrike_Timer + if (m_uiCrusaderStrike_Timer < uiDiff) + { + DoCast(m_creature->getVictim(),SPELL_CRUSADERSTRIKE); + m_uiCrusaderStrike_Timer = 10000; + }else m_uiCrusaderStrike_Timer -= uiDiff; + + //m_uiHammerOfJustice_Timer + if (m_uiHammerOfJustice_Timer < uiDiff) + { + DoCast(m_creature->getVictim(),SPELL_HAMMEROFJUSTICE); + m_uiHammerOfJustice_Timer = 60000; + }else m_uiHammerOfJustice_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +struct MANGOS_DLL_DECL boss_high_inquisitor_whitemaneAI : public ScriptedAI +{ + boss_high_inquisitor_whitemaneAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 m_uiHeal_Timer; + uint32 m_uiPowerWordShield_Timer; + uint32 m_uiHolySmite_Timer; + uint32 m_uiWait_Timer; + + bool m_bCanResurrectCheck; + bool m_bCanResurrect; + + void Reset() + { + Unit* Mograine = Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_MOGRAINE)); + if(Mograine && !Mograine->isAlive()) + ((Creature*)Mograine)->Respawn(); + m_uiWait_Timer = 7000; + m_uiHeal_Timer = 10000; + m_uiPowerWordShield_Timer = 15000; + m_uiHolySmite_Timer = 6000; + + m_bCanResurrectCheck = false; + m_bCanResurrect = false; + } + + + void JustReachedHome() + { + + if (m_pInstance) + { + if (!(m_pInstance->GetData(TYPE_MOGRAINE_AND_WHITE_EVENT) == NOT_STARTED) || !(m_pInstance->GetData(TYPE_MOGRAINE_AND_WHITE_EVENT) == FAIL)) + m_pInstance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, FAIL); + } + } + + void MoveInLineOfSight() + { + //This needs to be empty because Whitemane should NOT aggro while fighting Mograine. Mograine will give us a target. + } + + void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + { + if (uiDamage < m_creature->GetHealth()) + return; + + if(!m_bCanResurrectCheck || m_bCanResurrect) + { + // prevent killing blow before rezzing commander + m_creature->SetHealth(uiDamage+1); + } + } + + void AttackStart(Unit* pWho) + { + if (m_pInstance && (m_pInstance->GetData(TYPE_MOGRAINE_AND_WHITE_EVENT) == NOT_STARTED || m_pInstance->GetData(TYPE_MOGRAINE_AND_WHITE_EVENT) == FAIL)) + return; + + ScriptedAI::AttackStart(pWho); + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_WH_INTRO, m_creature); + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(SAY_WH_KILL, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_bCanResurrect) + { + //When casting resuruction make sure to delay so on rez when reinstate battle deepsleep runs out + if (m_pInstance && m_uiWait_Timer < uiDiff) + { + if (Unit* Mograine = Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_MOGRAINE))) + { + DoCast(Mograine, SPELL_SCARLETRESURRECTION); + DoScriptText(SAY_WH_RESSURECT, m_creature); + m_bCanResurrect = false; + } + } + else m_uiWait_Timer -= uiDiff; + } + + //Cast Deep sleep when health is less than 50% + if (!m_bCanResurrectCheck && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 50) + { + if (m_creature->IsNonMeleeSpellCasted(false)) + m_creature->InterruptNonMeleeSpells(false); + + DoCast(m_creature->getVictim(), SPELL_DEEPSLEEP); + m_bCanResurrectCheck = true; + m_bCanResurrect = true; + return; + } + + //while in "resurrect-mode", don't do anything + if (m_bCanResurrect) + return; + + //If we are <75% hp cast healing spells at self or Mograine + if (m_uiHeal_Timer < uiDiff) + { + Creature* pTarget = NULL; + + if (m_creature->GetHealth() <= m_creature->GetMaxHealth()*0.75f) + pTarget = m_creature; + + if (m_pInstance) + { + if (Creature* pMograine = (Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_MOGRAINE))) + { + if (pMograine->isAlive() && pMograine->GetHealth() <= pMograine->GetMaxHealth()*0.75f) + pTarget = pMograine; + } + } + + if (pTarget) + DoCast(pTarget, SPELL_HEAL); + + m_uiHeal_Timer = 13000; + }else m_uiHeal_Timer -= uiDiff; + + //m_uiPowerWordShield_Timer + if (m_uiPowerWordShield_Timer < uiDiff) + { + DoCast(m_creature,SPELL_POWERWORDSHIELD); + m_uiPowerWordShield_Timer = 15000; + }else m_uiPowerWordShield_Timer -= uiDiff; + + //m_uiHolySmite_Timer + if (m_uiHolySmite_Timer < uiDiff) + { + DoCast(m_creature->getVictim(),SPELL_HOLYSMITE); + m_uiHolySmite_Timer = 6000; + }else m_uiHolySmite_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_scarlet_commander_mograine(Creature* pCreature) +{ + return new boss_scarlet_commander_mograineAI(pCreature); +} + +CreatureAI* GetAI_boss_high_inquisitor_whitemane(Creature* pCreature) +{ + return new boss_high_inquisitor_whitemaneAI(pCreature); +} + +void AddSC_boss_mograine_and_whitemane() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_scarlet_commander_mograine"; + newscript->GetAI = &GetAI_boss_scarlet_commander_mograine; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_high_inquisitor_whitemane"; + newscript->GetAI = &GetAI_boss_high_inquisitor_whitemane; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_scorn.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_scorn.cpp new file mode 100644 index 000000000..1c194b91d --- /dev/null +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_scorn.cpp @@ -0,0 +1,96 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Scorn +SD%Complete: 100 +SDComment: +SDCategory: Scarlet Monastery +EndScriptData */ + +#include "precompiled.h" + +#define SPELL_LICHSLAP 28873 +#define SPELL_FROSTBOLTVOLLEY 8398 +#define SPELL_MINDFLAY 17313 +#define SPELL_FROSTNOVA 15531 + +struct MANGOS_DLL_DECL boss_scornAI : public ScriptedAI +{ + boss_scornAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 LichSlap_Timer; + uint32 FrostboltVolley_Timer; + uint32 MindFlay_Timer; + uint32 FrostNova_Timer; + + void Reset() + { + LichSlap_Timer = 45000; + FrostboltVolley_Timer = 30000; + MindFlay_Timer = 30000; + FrostNova_Timer = 30000; + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //LichSlap_Timer + if (LichSlap_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_LICHSLAP); + LichSlap_Timer = 45000; + }else LichSlap_Timer -= diff; + + //FrostboltVolley_Timer + if (FrostboltVolley_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_FROSTBOLTVOLLEY); + FrostboltVolley_Timer = 20000; + }else FrostboltVolley_Timer -= diff; + + //MindFlay_Timer + if (MindFlay_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_MINDFLAY); + MindFlay_Timer = 20000; + }else MindFlay_Timer -= diff; + + //FrostNova_Timer + if (FrostNova_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_FROSTNOVA); + FrostNova_Timer = 15000; + }else FrostNova_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_scorn(Creature* pCreature) +{ + return new boss_scornAI(pCreature); +} + +void AddSC_boss_scorn() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_scorn"; + newscript->GetAI = &GetAI_boss_scorn; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp b/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp new file mode 100644 index 000000000..411d7d7d4 --- /dev/null +++ b/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp @@ -0,0 +1,115 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance_Scarlet_Monastery +SD%Complete: 50 +SDComment: +SDCategory: Scarlet Monastery +EndScriptData */ + +#include "precompiled.h" +#include "scarlet_monastery.h" + +struct MANGOS_DLL_DECL instance_scarlet_monastery : public ScriptedInstance +{ + instance_scarlet_monastery(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + + uint64 m_uiMograineGUID; + uint64 m_uiWhitemaneGUID; + uint64 m_uiVorrelGUID; + uint64 m_uiDoorHighInquisitorGUID; + + void Initialize() + { + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + + m_uiMograineGUID = 0; + m_uiWhitemaneGUID = 0; + m_uiVorrelGUID = 0; + m_uiDoorHighInquisitorGUID = 0; + } + + void OnCreatureCreate(Creature* pCreature) + { + switch(pCreature->GetEntry()) + { + case 3976: m_uiMograineGUID = pCreature->GetGUID(); break; + case 3977: m_uiWhitemaneGUID = pCreature->GetGUID(); break; + case 3981: m_uiVorrelGUID = pCreature->GetGUID(); break; + } + } + + void OnObjectCreate(GameObject* pGo) + { + if (pGo->GetEntry() == 104600) + m_uiDoorHighInquisitorGUID = pGo->GetGUID(); + } + + uint64 GetData64(uint32 data) + { + switch(data) + { + case DATA_MOGRAINE: + return m_uiMograineGUID; + case DATA_WHITEMANE: + return m_uiWhitemaneGUID; + case DATA_VORREL: + return m_uiVorrelGUID; + case DATA_DOOR_WHITEMANE: + return m_uiDoorHighInquisitorGUID; + } + + return 0; + } + + void SetData(uint32 uiType, uint32 uiData) + { + if (uiType == TYPE_MOGRAINE_AND_WHITE_EVENT) + { + if (uiData == IN_PROGRESS) + DoUseDoorOrButton(m_uiDoorHighInquisitorGUID); + if (uiData == FAIL) + DoUseDoorOrButton(m_uiDoorHighInquisitorGUID); + + m_auiEncounter[0] = uiData; + } + } + + uint32 GetData(uint32 uiData) + { + if (uiData == TYPE_MOGRAINE_AND_WHITE_EVENT) + return m_auiEncounter[0]; + + return 0; + } +}; + +InstanceData* GetInstanceData_instance_scarlet_monastery(Map* pMap) +{ + return new instance_scarlet_monastery(pMap); +} + +void AddSC_instance_scarlet_monastery() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "instance_scarlet_monastery"; + newscript->GetInstanceData = &GetInstanceData_instance_scarlet_monastery; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h b/scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h new file mode 100644 index 000000000..c3c1cebb5 --- /dev/null +++ b/scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h @@ -0,0 +1,20 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_SCARLETM_H +#define DEF_SCARLETM_H + +enum +{ + MAX_ENCOUNTER = 1, + + TYPE_MOGRAINE_AND_WHITE_EVENT = 1, + + DATA_MOGRAINE = 2, + DATA_WHITEMANE = 3, + DATA_DOOR_WHITEMANE = 4, + DATA_VORREL = 5 +}; + +#endif diff --git a/scripts/eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp b/scripts/eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp new file mode 100644 index 000000000..fd6d1a29b --- /dev/null +++ b/scripts/eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp @@ -0,0 +1,222 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Darkmaster_Gandling +SD%Complete: 75 +SDComment: Doors missing +SDCategory: Scholomance +EndScriptData */ + +#include "precompiled.h" +#include "scholomance.h" + +#define SPELL_ARCANEMISSILES 22272 +#define SPELL_SHADOWSHIELD 22417 //Not right ID. But 12040 is wrong either. +#define SPELL_CURSE 18702 + +#define ADD_1X 170.205 +#define ADD_1Y 99.413 +#define ADD_1Z 104.733 +#define ADD_1O 3.16 + +#define ADD_2X 170.813 +#define ADD_2Y 97.857 +#define ADD_2Z 104.713 +#define ADD_2O 3.16 + +#define ADD_3X 170.720 +#define ADD_3Y 100.900 +#define ADD_3Z 104.739 +#define ADD_3O 3.16 + +#define ADD_4X 171.866 +#define ADD_4Y 99.373 +#define ADD_4Z 104.732 +#define ADD_4O 3.16 + +struct MANGOS_DLL_DECL boss_darkmaster_gandlingAI : public ScriptedAI +{ + boss_darkmaster_gandlingAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 ArcaneMissiles_Timer; + uint32 ShadowShield_Timer; + uint32 Curse_Timer; + uint32 Teleport_Timer; + + Creature *Summoned; + + void Reset() + { + ArcaneMissiles_Timer = 4500; + ShadowShield_Timer = 12000; + Curse_Timer = 2000; + Teleport_Timer = 16000; + } + + void JustDied(Unit *killer) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_GANDLING, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //ArcaneMissiles_Timer + if (ArcaneMissiles_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_ARCANEMISSILES); + ArcaneMissiles_Timer = 8000; + }else ArcaneMissiles_Timer -= diff; + + //ShadowShield_Timer + if (ShadowShield_Timer < diff) + { + DoCast(m_creature,SPELL_SHADOWSHIELD); + ShadowShield_Timer = urand(14000, 28000); + }else ShadowShield_Timer -= diff; + + //Curse_Timer + if (Curse_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_CURSE); + Curse_Timer = urand(15000, 27000); + }else Curse_Timer -= diff; + + //Teleporting Random Target to one of the six pre boss rooms and spawn 3-4 skeletons near the gamer. + //We will only telport if gandling has more than 3% of hp so teleported gamers can always loot. + if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() > 3) + { + if (Teleport_Timer < diff) + { + Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM,0); + if (target && target->GetTypeId() == TYPEID_PLAYER) + { + if (m_creature->getThreatManager().getThreat(target)) + m_creature->getThreatManager().modifyThreatPercent(target, -100); + + switch(urand(0, 5)) + { + case 0: + DoTeleportPlayer(target, 250.0696,0.3921,84.8408,3.149); + Summoned = m_creature->SummonCreature(16119,254.2325,0.3417,84.8407,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); + if (Summoned) + ((CreatureAI*)Summoned->AI())->AttackStart(target); + Summoned = m_creature->SummonCreature(16119,257.7133,4.0226,84.8407,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); + if (Summoned) + ((CreatureAI*)Summoned->AI())->AttackStart(target); + Summoned = m_creature->SummonCreature(16119,258.6702,-2.60656,84.8407,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); + if (Summoned) + ((CreatureAI*)Summoned->AI())->AttackStart(target); + break; + case 1: + DoTeleportPlayer(target, 181.4220,-91.9481,84.8410,1.608); + Summoned = m_creature->SummonCreature(16119,184.0519,-73.5649,84.8407,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); + if (Summoned) + ((CreatureAI*)Summoned->AI())->AttackStart(target); + Summoned = m_creature->SummonCreature(16119,179.5951,-73.7045,84.8407,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); + if (Summoned) + ((CreatureAI*)Summoned->AI())->AttackStart(target); + Summoned = m_creature->SummonCreature(16119,180.6452,-78.2143,84.8407,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); + if (Summoned) + ((CreatureAI*)Summoned->AI())->AttackStart(target); + Summoned = m_creature->SummonCreature(16119,283.2274,-78.1518,84.8407,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); + if (Summoned) + ((CreatureAI*)Summoned->AI())->AttackStart(target); + break; + case 2: + DoTeleportPlayer(target, 95.1547,-1.8173,85.2289,0.043); + Summoned = m_creature->SummonCreature(16119,100.9404,-1.8016,85.2289,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); + if (Summoned) + ((CreatureAI*)Summoned->AI())->AttackStart(target); + Summoned = m_creature->SummonCreature(16119,101.3729,0.4882,85.2289,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); + if (Summoned) + ((CreatureAI*)Summoned->AI())->AttackStart(target); + Summoned = m_creature->SummonCreature(16119,101.4596,-4.4740,85.2289,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); + if (Summoned) + ((CreatureAI*)Summoned->AI())->AttackStart(target); + break; + case 3: + DoTeleportPlayer(target, 250.0696,0.3921,72.6722,3.149); + Summoned = m_creature->SummonCreature(16119,240.34481,0.7368,72.6722,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); + if (Summoned) + ((CreatureAI*)Summoned->AI())->AttackStart(target); + Summoned = m_creature->SummonCreature(16119,240.3633,-2.9520,72.6722,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); + if (Summoned) + ((CreatureAI*)Summoned->AI())->AttackStart(target); + Summoned = m_creature->SummonCreature(16119,240.6702,3.34949,72.6722,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); + if (Summoned) + ((CreatureAI*)Summoned->AI())->AttackStart(target); + break; + case 4: + DoTeleportPlayer(target, 181.4220,-91.9481,70.7734,1.608); + Summoned = m_creature->SummonCreature(16119,184.0519,-73.5649,70.7734,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); + if (Summoned) + ((CreatureAI*)Summoned->AI())->AttackStart(target); + Summoned = m_creature->SummonCreature(16119,179.5951,-73.7045,70.7734,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); + if (Summoned) + ((CreatureAI*)Summoned->AI())->AttackStart(target); + Summoned = m_creature->SummonCreature(16119,180.6452,-78.2143,70.7734,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); + if (Summoned) + ((CreatureAI*)Summoned->AI())->AttackStart(target); + Summoned = m_creature->SummonCreature(16119,283.2274,-78.1518,70.7734,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); + if (Summoned) + ((CreatureAI*)Summoned->AI())->AttackStart(target); + break; + case 5: + DoTeleportPlayer(target, 106.1541,-1.8994,75.3663,0.043); + Summoned = m_creature->SummonCreature(16119,115.3945,-1.5555,75.3663,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); + if (Summoned) + ((CreatureAI*)Summoned->AI())->AttackStart(target); + Summoned = m_creature->SummonCreature(16119,257.7133,1.8066,75.3663,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); + if (Summoned) + ((CreatureAI*)Summoned->AI())->AttackStart(target); + Summoned = m_creature->SummonCreature(16119,258.6702,-5.1001,75.3663,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); + if (Summoned) + ((CreatureAI*)Summoned->AI())->AttackStart(target); + break; + } + } + Teleport_Timer = urand(20000, 35000); + }else Teleport_Timer -= diff; + } + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_darkmaster_gandling(Creature* pCreature) +{ + return new boss_darkmaster_gandlingAI(pCreature); +} + +void AddSC_boss_darkmaster_gandling() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_darkmaster_gandling"; + newscript->GetAI = &GetAI_boss_darkmaster_gandling; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/scholomance/boss_death_knight_darkreaver.cpp b/scripts/eastern_kingdoms/scholomance/boss_death_knight_darkreaver.cpp new file mode 100644 index 000000000..e2b30131b --- /dev/null +++ b/scripts/eastern_kingdoms/scholomance/boss_death_knight_darkreaver.cpp @@ -0,0 +1,56 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Death_knight_darkreaver +SD%Complete: 100 +SDComment: +SDCategory: Scholomance +EndScriptData */ + +#include "precompiled.h" + +struct MANGOS_DLL_DECL boss_death_knight_darkreaverAI : public ScriptedAI +{ + boss_death_knight_darkreaverAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + void Reset() + { + } + + void DamageTaken(Unit *done_by, uint32 &damage) + { + if (m_creature->GetHealth() <= damage) + { + m_creature->CastSpell(m_creature,23261,true); //Summon Darkreaver's Fallen Charger + } + } +}; + +CreatureAI* GetAI_boss_death_knight_darkreaver(Creature* pCreature) +{ + return new boss_death_knight_darkreaverAI(pCreature); +} + +void AddSC_boss_death_knight_darkreaver() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_death_knight_darkreaver"; + newscript->GetAI = &GetAI_boss_death_knight_darkreaver; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/scholomance/boss_doctor_theolen_krastinov.cpp b/scripts/eastern_kingdoms/scholomance/boss_doctor_theolen_krastinov.cpp new file mode 100644 index 000000000..e81b9118d --- /dev/null +++ b/scripts/eastern_kingdoms/scholomance/boss_doctor_theolen_krastinov.cpp @@ -0,0 +1,114 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Doctor_Theolen_Krastinov +SD%Complete: 100 +SDComment: +SDCategory: Scholomance +EndScriptData */ + +#include "precompiled.h" +#include "scholomance.h" + +enum +{ + EMOTE_GENERIC_FRENZY_KILL = -1000001, + + SPELL_REND = 16509, + SPELL_BACKHAND = 18103, + SPELL_FRENZY = 8269 +}; + +struct MANGOS_DLL_DECL boss_theolenkrastinovAI : public ScriptedAI +{ + boss_theolenkrastinovAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 m_uiRend_Timer; + uint32 m_uiBackhand_Timer; + uint32 m_uiFrenzy_Timer; + + void Reset() + { + m_uiRend_Timer = 8000; + m_uiBackhand_Timer = 9000; + m_uiFrenzy_Timer = 1000; + } + + void JustDied(Unit *killer) + { + if (ScriptedInstance* pInstance = (ScriptedInstance*)m_creature->GetInstanceData()) + { + pInstance->SetData(TYPE_THEOLEN, DONE); + + if (pInstance->GetData(TYPE_GANDLING) == SPECIAL) + m_creature->SummonCreature(1853, 180.73, -9.43856, 75.507, 1.61399, TEMPSUMMON_DEAD_DESPAWN, 0); + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Rend_Timer + if (m_uiRend_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_REND); + m_uiRend_Timer = 10000; + } + else + m_uiRend_Timer -= uiDiff; + + //m_uiBackhand_Timer + if (m_uiBackhand_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_BACKHAND); + m_uiBackhand_Timer = 10000; + } + else + m_uiBackhand_Timer -= uiDiff; + + //Frenzy_Timer + if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 26) + { + if (m_uiFrenzy_Timer < uiDiff) + { + DoCast(m_creature, SPELL_FRENZY); + DoScriptText(EMOTE_GENERIC_FRENZY_KILL, m_creature); + m_uiFrenzy_Timer = 120000; + } + else + m_uiFrenzy_Timer -= uiDiff; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_theolenkrastinov(Creature* pCreature) +{ + return new boss_theolenkrastinovAI(pCreature); +} + +void AddSC_boss_theolenkrastinov() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_doctor_theolen_krastinov"; + newscript->GetAI = &GetAI_boss_theolenkrastinov; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/scholomance/boss_illucia_barov.cpp b/scripts/eastern_kingdoms/scholomance/boss_illucia_barov.cpp new file mode 100644 index 000000000..219af9ba9 --- /dev/null +++ b/scripts/eastern_kingdoms/scholomance/boss_illucia_barov.cpp @@ -0,0 +1,111 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Illucia_Barov +SD%Complete: 100 +SDComment: +SDCategory: Scholomance +EndScriptData */ + +#include "precompiled.h" +#include "scholomance.h" + +#define SPELL_CURSEOFAGONY 18671 +#define SPELL_SHADOWSHOCK 20603 +#define SPELL_SILENCE 15487 +#define SPELL_FEAR 6215 + +struct MANGOS_DLL_DECL boss_illuciabarovAI : public ScriptedAI +{ + boss_illuciabarovAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 CurseOfAgony_Timer; + uint32 ShadowShock_Timer; + uint32 Silence_Timer; + uint32 Fear_Timer; + + void Reset() + { + CurseOfAgony_Timer = 18000; + ShadowShock_Timer = 9000; + Silence_Timer = 5000; + Fear_Timer = 30000; + } + + void JustDied(Unit *killer) + { + if (ScriptedInstance* pInstance = (ScriptedInstance*)m_creature->GetInstanceData()) + { + pInstance->SetData(TYPE_ILLUCIABAROV, DONE); + + if (pInstance->GetData(TYPE_GANDLING) == SPECIAL) + m_creature->SummonCreature(1853, 180.73, -9.43856, 75.507, 1.61399, TEMPSUMMON_DEAD_DESPAWN, 0); + } + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //CurseOfAgony_Timer + if (CurseOfAgony_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_CURSEOFAGONY); + CurseOfAgony_Timer = 30000; + }else CurseOfAgony_Timer -= diff; + + //ShadowShock_Timer + if (ShadowShock_Timer < diff) + { + Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM,0); + if (target) DoCast(target,SPELL_SHADOWSHOCK); + + ShadowShock_Timer = 12000; + }else ShadowShock_Timer -= diff; + + //Silence_Timer + if (Silence_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_SILENCE); + Silence_Timer = 14000; + }else Silence_Timer -= diff; + + //Fear_Timer + if (Fear_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_FEAR); + Fear_Timer = 30000; + }else Fear_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_illuciabarov(Creature* pCreature) +{ + return new boss_illuciabarovAI(pCreature); +} + +void AddSC_boss_illuciabarov() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_illucia_barov"; + newscript->GetAI = &GetAI_boss_illuciabarov; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/scholomance/boss_instructor_malicia.cpp b/scripts/eastern_kingdoms/scholomance/boss_instructor_malicia.cpp new file mode 100644 index 000000000..6e72c97d3 --- /dev/null +++ b/scripts/eastern_kingdoms/scholomance/boss_instructor_malicia.cpp @@ -0,0 +1,147 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_instructormalicia +SD%Complete: 100 +SDComment: +SDCategory: Scholomance +EndScriptData */ + +#include "precompiled.h" +#include "scholomance.h" + +#define SPELL_CALLOFGRAVES 17831 +#define SPELL_CORRUPTION 11672 +#define SPELL_FLASHHEAL 10917 +#define SPELL_RENEW 10929 +#define SPELL_HEALINGTOUCH 9889 + +struct MANGOS_DLL_DECL boss_instructormaliciaAI : public ScriptedAI +{ + boss_instructormaliciaAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 CallOfGraves_Timer; + uint32 Corruption_Timer; + uint32 FlashHeal_Timer; + uint32 Renew_Timer; + uint32 HealingTouch_Timer; + uint32 FlashCounter; + uint32 TouchCounter; + + void Reset() + { + CallOfGraves_Timer = 4000; + Corruption_Timer = 8000; + FlashHeal_Timer = 38000; + Renew_Timer = 32000; + HealingTouch_Timer = 45000; + FlashCounter = 0; + TouchCounter = 0; + } + + void JustDied(Unit *killer) + { + if (ScriptedInstance* pInstance = (ScriptedInstance*)m_creature->GetInstanceData()) + { + pInstance->SetData(TYPE_MALICIA, DONE); + + if (pInstance->GetData(TYPE_GANDLING) == SPECIAL) + m_creature->SummonCreature(1853, 180.73, -9.43856, 75.507, 1.61399, TEMPSUMMON_DEAD_DESPAWN, 0); + } + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //CallOfGraves_Timer + if (CallOfGraves_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_CALLOFGRAVES); + CallOfGraves_Timer = 65000; + }else CallOfGraves_Timer -= diff; + + //Corruption_Timer + if (Corruption_Timer < diff) + { + Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM,0); + if (target) DoCast(target,SPELL_CORRUPTION); + + Corruption_Timer = 24000; + }else Corruption_Timer -= diff; + + //Renew_Timer + if (Renew_Timer < diff) + { + DoCast(m_creature, SPELL_RENEW); + Renew_Timer = 10000; + }else Renew_Timer -= diff; + + //FlashHeal_Timer + if (FlashHeal_Timer < diff) + { + DoCast(m_creature,SPELL_FLASHHEAL); + + //5 Flashheals will be casted + if (FlashCounter < 2) + { + FlashHeal_Timer = 5000; + ++FlashCounter; + } + else + { + FlashCounter=0; + FlashHeal_Timer = 30000; + } + }else FlashHeal_Timer -= diff; + + //HealingTouch_Timer + if (HealingTouch_Timer < diff) + { + DoCast(m_creature,SPELL_HEALINGTOUCH); + + //3 Healingtouchs will be casted + if (HealingTouch_Timer < 2) + { + HealingTouch_Timer = 5500; + ++TouchCounter; + } + else + { + TouchCounter=0; + HealingTouch_Timer = 30000; + } + }else HealingTouch_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_instructormalicia(Creature* pCreature) +{ + return new boss_instructormaliciaAI(pCreature); +} + +void AddSC_boss_instructormalicia() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_instructor_malicia"; + newscript->GetAI = &GetAI_boss_instructormalicia; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp b/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp new file mode 100644 index 000000000..f88792978 --- /dev/null +++ b/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp @@ -0,0 +1,201 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 +* 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, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +/* ScriptData +SDName: Boss_jandicebarov +SD%Complete: 100 +SDComment: +SDCategory: Scholomance +EndScriptData */ + +#include "precompiled.h" + +#define SPELL_CURSEOFBLOOD 24673 +//#define SPELL_ILLUSION 17773 + +//Spells of Illusion of Jandice Barov +#define SPELL_CLEAVE 15584 + +struct MANGOS_DLL_DECL boss_jandicebarovAI : public ScriptedAI +{ + boss_jandicebarovAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 CurseOfBlood_Timer; + uint32 Illusion_Timer; + //uint32 Illusioncounter; + uint32 Invisible_Timer; + bool Invisible; + int Rand; + int RandX; + int RandY; + Creature* Summoned; + + void Reset() + { + CurseOfBlood_Timer = 15000; + Illusion_Timer = 30000; + Invisible_Timer = 3000; //Too much too low? + Invisible = false; + } + + void SummonIllusions(Unit* victim) + { + Rand = rand()%10; + switch(urand(0, 1)) + { + case 0: RandX = 0 - Rand; break; + case 1: RandX = 0 + Rand; break; + } + Rand = 0; + Rand = rand()%10; + switch(urand(0, 1)) + { + case 0: RandY = 0 - Rand; break; + case 1: RandY = 0 + Rand; break; + } + Rand = 0; + Summoned = DoSpawnCreature(11439, RandX, RandY, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000); + if (Summoned) + ((CreatureAI*)Summoned->AI())->AttackStart(victim); + } + + void UpdateAI(const uint32 diff) + { + if (Invisible && Invisible_Timer < diff) + { + //Become visible again + m_creature->setFaction(14); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetDisplayId(11073); //Jandice Model + Invisible = false; + } else if (Invisible) + { + Invisible_Timer -= diff; + //Do nothing while invisible + return; + } + + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //CurseOfBlood_Timer + if (CurseOfBlood_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_CURSEOFBLOOD); + CurseOfBlood_Timer = 30000; + }else CurseOfBlood_Timer -= diff; + + //Illusion_Timer + if (!Invisible && Illusion_Timer < diff) + { + //Inturrupt any spell casting + m_creature->InterruptNonMeleeSpells(false); + m_creature->setFaction(35); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetDisplayId(11686); // Invisible Model + m_creature->getThreatManager().modifyThreatPercent(m_creature->getVictim(),-99); + + //Summon 10 Illusions attacking random gamers + Unit* target = NULL; + for(int i = 0; i < 10; ++i) + { + target = SelectUnit(SELECT_TARGET_RANDOM,0); + SummonIllusions(target); + } + Invisible = true; + Invisible_Timer = 3000; + + //25 seconds until we should cast this agian + Illusion_Timer = 25000; + }else Illusion_Timer -= diff; + + // //Illusion_Timer + // if (Illusion_Timer < diff) + // { + // //Cast + // DoCast(m_creature->getVictim(),SPELL_ILLUSION); + // //3 Illusion will be summoned + // if (Illusioncounter < 3) + // { + // Illusion_Timer = 500; + // ++Illusioncounter; + // } + // else { + // //15 seconds until we should cast this again + // Illusion_Timer = 15000; + // Illusioncounter=0; + // } + // }else Illusion_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +// Illusion of Jandice Barov Script + +struct MANGOS_DLL_DECL mob_illusionofjandicebarovAI : public ScriptedAI +{ + mob_illusionofjandicebarovAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 Cleave_Timer; + + void Reset() + { + Cleave_Timer = urand(2000, 8000); + m_creature->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_MAGIC, true); + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Cleave_Timer + if (Cleave_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_CLEAVE); + Cleave_Timer = urand(5000, 8000); + }else Cleave_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_jandicebarov(Creature* pCreature) +{ + return new boss_jandicebarovAI(pCreature); +} + +CreatureAI* GetAI_mob_illusionofjandicebarov(Creature* pCreature) +{ + return new mob_illusionofjandicebarovAI(pCreature); +} + +void AddSC_boss_jandicebarov() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_jandice_barov"; + newscript->GetAI = &GetAI_boss_jandicebarov; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_illusionofjandicebarov"; + newscript->GetAI = &GetAI_mob_illusionofjandicebarov; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/scholomance/boss_kormok.cpp b/scripts/eastern_kingdoms/scholomance/boss_kormok.cpp new file mode 100644 index 000000000..fb9f56eb8 --- /dev/null +++ b/scripts/eastern_kingdoms/scholomance/boss_kormok.cpp @@ -0,0 +1,151 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Kormok +SD%Complete: 100 +SDComment: +SDCategory: Scholomance +EndScriptData */ + +#include "precompiled.h" + +#define SPELL_SHADOWBOLTVOLLEY 20741 +#define SPELL_BONESHIELD 27688 + +struct MANGOS_DLL_DECL boss_kormokAI : public ScriptedAI +{ + boss_kormokAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 ShadowVolley_Timer; + uint32 BoneShield_Timer; + uint32 Minion_Timer; + uint32 Mage_Timer; + bool Mages; + int Rand1; + int Rand1X; + int Rand1Y; + int Rand2; + int Rand2X; + int Rand2Y; + Creature* SummonedMinions; + Creature* SummonedMages; + + void Reset() + { + ShadowVolley_Timer = 10000; + BoneShield_Timer = 2000; + Minion_Timer = 15000; + Mage_Timer = 0; + Mages = false; + } + + void SummonMinion(Unit* victim) + { + Rand1 = rand()%8; + switch(urand(0, 1)) + { + case 0: Rand1X = 0 - Rand1; break; + case 1: Rand1X = 0 + Rand1; break; + } + Rand1 = 0; + Rand1 = rand()%8; + switch(urand(0, 1)) + { + case 0: Rand1Y = 0 - Rand1; break; + case 1: Rand1Y = 0 + Rand1; break; + } + Rand1 = 0; + SummonedMinions = DoSpawnCreature(16119, Rand1X, Rand1Y, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000); + ((CreatureAI*)SummonedMinions->AI())->AttackStart(victim); + } + + void SummonMages(Unit* victim) + { + Rand2 = rand()%10; + switch(urand(0, 1)) + { + case 0: Rand2X = 0 - Rand2; break; + case 1: Rand2X = 0 + Rand2; break; + } + Rand2 = 0; + Rand2 = rand()%10; + switch(urand(0, 1)) + { + case 0: Rand2Y = 0 - Rand2; break; + case 1: Rand2Y = 0 + Rand2; break; + } + Rand2 = 0; + SummonedMages = DoSpawnCreature(16120, Rand2X, Rand2Y, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000); + ((CreatureAI*)SummonedMages->AI())->AttackStart(victim); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //ShadowVolley_Timer + if (ShadowVolley_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_SHADOWBOLTVOLLEY); + ShadowVolley_Timer = 15000; + }else ShadowVolley_Timer -= diff; + + //BoneShield_Timer + if (BoneShield_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_BONESHIELD); + BoneShield_Timer = 45000; + }else BoneShield_Timer -= diff; + + //Minion_Timer + if (Minion_Timer < diff) + { + //Cast + SummonMinion(m_creature->getVictim()); + SummonMinion(m_creature->getVictim()); + SummonMinion(m_creature->getVictim()); + SummonMinion(m_creature->getVictim()); + + Minion_Timer = 12000; + }else Minion_Timer -= diff; + + //Summon 2 Bone Mages + if (!Mages && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 26) + { + //Cast + SummonMages(m_creature->getVictim()); + SummonMages(m_creature->getVictim()); + Mages = true; + } + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_kormok(Creature* pCreature) +{ + return new boss_kormokAI(pCreature); +} + +void AddSC_boss_kormok() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_kormok"; + newscript->GetAI = &GetAI_boss_kormok; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/scholomance/boss_lord_alexei_barov.cpp b/scripts/eastern_kingdoms/scholomance/boss_lord_alexei_barov.cpp new file mode 100644 index 000000000..4efb5d60a --- /dev/null +++ b/scripts/eastern_kingdoms/scholomance/boss_lord_alexei_barov.cpp @@ -0,0 +1,93 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Lord_Alexei_Barov +SD%Complete: 100 +SDComment: aura applied/defined in database +SDCategory: Scholomance +EndScriptData */ + +#include "precompiled.h" +#include "scholomance.h" + +#define SPELL_IMMOLATE 20294 // Old ID was 15570 +#define SPELL_VEILOFSHADOW 17820 + +struct MANGOS_DLL_DECL boss_lordalexeibarovAI : public ScriptedAI +{ + boss_lordalexeibarovAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 Immolate_Timer; + uint32 VeilofShadow_Timer; + + void Reset() + { + Immolate_Timer = 7000; + VeilofShadow_Timer = 15000; + + m_creature->LoadCreaturesAddon(); + } + + void JustDied(Unit *killer) + { + if (ScriptedInstance* pInstance = (ScriptedInstance*)m_creature->GetInstanceData()) + { + pInstance->SetData(TYPE_ALEXEIBAROV, DONE); + + if (pInstance->GetData(TYPE_GANDLING) == SPECIAL) + m_creature->SummonCreature(1853, 180.73, -9.43856, 75.507, 1.61399, TEMPSUMMON_DEAD_DESPAWN, 0); + } + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Immolate_Timer + if (Immolate_Timer < diff) + { + Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM,0); + if (target) DoCast(target,SPELL_IMMOLATE); + + Immolate_Timer = 12000; + }else Immolate_Timer -= diff; + + //VeilofShadow_Timer + if (VeilofShadow_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_VEILOFSHADOW); + VeilofShadow_Timer = 20000; + }else VeilofShadow_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_lordalexeibarov(Creature* pCreature) +{ + return new boss_lordalexeibarovAI(pCreature); +} + +void AddSC_boss_lordalexeibarov() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_lord_alexei_barov"; + newscript->GetAI = &GetAI_boss_lordalexeibarov; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/scholomance/boss_lorekeeper_polkelt.cpp b/scripts/eastern_kingdoms/scholomance/boss_lorekeeper_polkelt.cpp new file mode 100644 index 000000000..855e7f921 --- /dev/null +++ b/scripts/eastern_kingdoms/scholomance/boss_lorekeeper_polkelt.cpp @@ -0,0 +1,108 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Lorekeeper_Polkelt +SD%Complete: 100 +SDComment: +SDCategory: Scholomance +EndScriptData */ + +#include "precompiled.h" +#include "scholomance.h" + +#define SPELL_VOLATILEINFECTION 24928 +#define SPELL_DARKPLAGUE 18270 +#define SPELL_CORROSIVEACID 23313 +#define SPELL_NOXIOUSCATALYST 18151 + +struct MANGOS_DLL_DECL boss_lorekeeperpolkeltAI : public ScriptedAI +{ + boss_lorekeeperpolkeltAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 VolatileInfection_Timer; + uint32 Darkplague_Timer; + uint32 CorrosiveAcid_Timer; + uint32 NoxiousCatalyst_Timer; + + void Reset() + { + VolatileInfection_Timer = 38000; + Darkplague_Timer = 8000; + CorrosiveAcid_Timer = 45000; + NoxiousCatalyst_Timer = 35000; + } + + void JustDied(Unit *killer) + { + if (ScriptedInstance* pInstance = (ScriptedInstance*)m_creature->GetInstanceData()) + { + pInstance->SetData(TYPE_POLKELT, DONE); + + if (pInstance->GetData(TYPE_GANDLING) == SPECIAL) + m_creature->SummonCreature(1853, 180.73, -9.43856, 75.507, 1.61399, TEMPSUMMON_DEAD_DESPAWN, 0); + } + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //VolatileInfection_Timer + if (VolatileInfection_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_VOLATILEINFECTION); + VolatileInfection_Timer = 32000; + }else VolatileInfection_Timer -= diff; + + //Darkplague_Timer + if (Darkplague_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_DARKPLAGUE); + Darkplague_Timer = 8000; + }else Darkplague_Timer -= diff; + + //CorrosiveAcid_Timer + if (CorrosiveAcid_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_CORROSIVEACID); + CorrosiveAcid_Timer = 25000; + }else CorrosiveAcid_Timer -= diff; + + //NoxiousCatalyst_Timer + if (NoxiousCatalyst_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_NOXIOUSCATALYST); + NoxiousCatalyst_Timer = 38000; + }else NoxiousCatalyst_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_lorekeeperpolkelt(Creature* pCreature) +{ + return new boss_lorekeeperpolkeltAI(pCreature); +} + +void AddSC_boss_lorekeeperpolkelt() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_lorekeeper_polkelt"; + newscript->GetAI = &GetAI_boss_lorekeeperpolkelt; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/scholomance/boss_ras_frostwhisper.cpp b/scripts/eastern_kingdoms/scholomance/boss_ras_frostwhisper.cpp new file mode 100644 index 000000000..dd9305300 --- /dev/null +++ b/scripts/eastern_kingdoms/scholomance/boss_ras_frostwhisper.cpp @@ -0,0 +1,121 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Ras_Frostwhisper +SD%Complete: 100 +SDComment: +SDCategory: Scholomance +EndScriptData */ + +#include "precompiled.h" + +#define SPELL_FROSTBOLT 21369 +#define SPELL_ICEARMOR 18100 //This is actually a buff he gives himself +#define SPELL_FREEZE 18763 +#define SPELL_FEAR 26070 +#define SPELL_CHILLNOVA 18099 +#define SPELL_FROSTVOLLEY 8398 + +struct MANGOS_DLL_DECL boss_rasfrostAI : public ScriptedAI +{ + boss_rasfrostAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 IceArmor_Timer; + uint32 Frostbolt_Timer; + uint32 Freeze_Timer; + uint32 Fear_Timer; + uint32 ChillNova_Timer; + uint32 FrostVolley_Timer; + + void Reset() + { + IceArmor_Timer = 2000; + Frostbolt_Timer = 8000; + ChillNova_Timer = 12000; + Freeze_Timer = 18000; + FrostVolley_Timer = 24000; + Fear_Timer = 45000; + + m_creature->CastSpell(m_creature,SPELL_ICEARMOR,true); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //IceArmor_Timer + if (IceArmor_Timer < diff) + { + DoCast(m_creature, SPELL_ICEARMOR); + IceArmor_Timer = 180000; + }else IceArmor_Timer -= diff; + + //Frostbolt_Timer + if (Frostbolt_Timer < diff) + { + Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM,0); + if (target) DoCast(target,SPELL_FROSTBOLT); + + Frostbolt_Timer = 8000; + }else Frostbolt_Timer -= diff; + + //Freeze_Timer + if (Freeze_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_FREEZE); + Freeze_Timer = 24000; + }else Freeze_Timer -= diff; + + //Fear_Timer + if (Fear_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_FEAR); + Fear_Timer = 30000; + }else Fear_Timer -= diff; + + //ChillNova_Timer + if (ChillNova_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_CHILLNOVA); + ChillNova_Timer = 14000; + }else ChillNova_Timer -= diff; + + //FrostVolley_Timer + if (FrostVolley_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_FROSTVOLLEY); + FrostVolley_Timer = 15000; + }else FrostVolley_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_rasfrost(Creature* pCreature) +{ + return new boss_rasfrostAI(pCreature); +} + +void AddSC_boss_rasfrost() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_boss_ras_frostwhisper"; + newscript->GetAI = &GetAI_boss_rasfrost; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/scholomance/boss_the_ravenian.cpp b/scripts/eastern_kingdoms/scholomance/boss_the_ravenian.cpp new file mode 100644 index 000000000..37e1cdf57 --- /dev/null +++ b/scripts/eastern_kingdoms/scholomance/boss_the_ravenian.cpp @@ -0,0 +1,111 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_the_ravenian +SD%Complete: 100 +SDComment: +SDCategory: Scholomance +EndScriptData */ + +#include "precompiled.h" +#include "scholomance.h" + +#define SPELL_TRAMPLE 15550 +#define SPELL_CLEAVE 20691 +#define SPELL_SUNDERINCLEAVE 25174 +#define SPELL_KNOCKAWAY 10101 + +struct MANGOS_DLL_DECL boss_theravenianAI : public ScriptedAI +{ + boss_theravenianAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 Trample_Timer; + uint32 Cleave_Timer; + uint32 SunderingCleave_Timer; + uint32 KnockAway_Timer; + bool HasYelled; + + void Reset() + { + Trample_Timer = 24000; + Cleave_Timer = 15000; + SunderingCleave_Timer = 40000; + KnockAway_Timer = 32000; + HasYelled = false; + } + + void JustDied(Unit *killer) + { + if (ScriptedInstance* pInstance = (ScriptedInstance*)m_creature->GetInstanceData()) + { + pInstance->SetData(TYPE_RAVENIAN, DONE); + + if (pInstance->GetData(TYPE_GANDLING) == SPECIAL) + m_creature->SummonCreature(1853, 180.73, -9.43856, 75.507, 1.61399, TEMPSUMMON_DEAD_DESPAWN, 0); + } + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Trample_Timer + if (Trample_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_TRAMPLE); + Trample_Timer = 10000; + }else Trample_Timer -= diff; + + //Cleave_Timer + if (Cleave_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_CLEAVE); + Cleave_Timer = 7000; + }else Cleave_Timer -= diff; + + //SunderingCleave_Timer + if (SunderingCleave_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_SUNDERINCLEAVE); + SunderingCleave_Timer = 20000; + }else SunderingCleave_Timer -= diff; + + //KnockAway_Timer + if (KnockAway_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_KNOCKAWAY); + KnockAway_Timer = 12000; + }else KnockAway_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_theravenian(Creature* pCreature) +{ + return new boss_theravenianAI(pCreature); +} + +void AddSC_boss_theravenian() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_the_ravenian"; + newscript->GetAI = &GetAI_boss_theravenian; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/scholomance/boss_vectus.cpp b/scripts/eastern_kingdoms/scholomance/boss_vectus.cpp new file mode 100644 index 000000000..30f9c5b26 --- /dev/null +++ b/scripts/eastern_kingdoms/scholomance/boss_vectus.cpp @@ -0,0 +1,103 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Vectus +SD%Complete: 60 +SDComment: event not implemented +SDCategory: Scholomance +EndScriptData */ + +#include "precompiled.h" + +enum +{ + //EMOTE_GENERIC_FRENZY_KILL = -1000001, + + SPELL_FLAMESTRIKE = 18399, + SPELL_BLAST_WAVE = 16046 + //SPELL_FRENZY = 28371 //spell is used by Gluth, confirm this is for this boss too + //SPELL_FIRE_SHIELD = 0 //should supposedly have some aura, but proper spell not found +}; + +struct MANGOS_DLL_DECL boss_vectusAI : public ScriptedAI +{ + boss_vectusAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 m_uiFlameStrike_Timer; + uint32 m_uiBlastWave_Timer; + uint32 m_uiFrenzy_Timer; + + void Reset() + { + m_uiFlameStrike_Timer = 2000; + m_uiBlastWave_Timer = 14000; + m_uiFrenzy_Timer = 0; + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //m_uiFlameStrike_Timer + if (m_uiFlameStrike_Timer < uiDiff) + { + DoCast(m_creature, SPELL_FLAMESTRIKE); + m_uiFlameStrike_Timer = 30000; + } + else + m_uiFlameStrike_Timer -= uiDiff; + + //BlastWave_Timer + if (m_uiBlastWave_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_BLAST_WAVE); + m_uiBlastWave_Timer = 12000; + } + else + m_uiBlastWave_Timer -= uiDiff; + + //Frenzy_Timer + /*if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 25) + { + if (m_uiFrenzy_Timer < uiDiff) + { + DoCast(m_creature, SPELL_FRENZY); + DoScriptText(EMOTE_GENERIC_FRENZY_KILL, m_creature); + m_uiFrenzy_Timer = 24000; + } + else + m_uiFrenzy_Timer -= uiDiff; + }*/ + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_vectus(Creature* pCreature) +{ + return new boss_vectusAI(pCreature); +} + +void AddSC_boss_vectus() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_vectus"; + newscript->GetAI = &GetAI_boss_vectus; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp b/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp new file mode 100644 index 000000000..de0fe55fe --- /dev/null +++ b/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp @@ -0,0 +1,130 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance_Scholomance +SD%Complete: 100 +SDComment: +SDCategory: Scholomance +EndScriptData */ + +#include "precompiled.h" +#include "scholomance.h" + +struct MANGOS_DLL_DECL instance_scholomance : public ScriptedInstance +{ + instance_scholomance(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + + uint64 m_uiGateKirtonosGUID; + uint64 m_uiGateGandlingGUID; + uint64 m_uiGateMiliciaGUID; + uint64 m_uiGateTheolenGUID; + uint64 m_uiGatePolkeltGUID; + uint64 m_uiGateRavenianGUID; + uint64 m_uiGateBarovGUID; + uint64 m_uiGateIlluciaGUID; + + void Initialize() + { + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + + m_uiGateKirtonosGUID = 0; + m_uiGateGandlingGUID = 0; + m_uiGateMiliciaGUID = 0; + m_uiGateTheolenGUID = 0; + m_uiGatePolkeltGUID = 0; + m_uiGateRavenianGUID = 0; + m_uiGateBarovGUID = 0; + m_uiGateIlluciaGUID = 0; + } + + void OnObjectCreate(GameObject* pGo) + { + switch(pGo->GetEntry()) + { + case GO_GATE_KIRTONOS: m_uiGateKirtonosGUID = pGo->GetGUID(); break; + case GO_GATE_GANDLING: m_uiGateGandlingGUID = pGo->GetGUID(); break; + case GO_GATE_MALICIA: m_uiGateMiliciaGUID = pGo->GetGUID(); break; + case GO_GATE_THEOLEN: m_uiGateTheolenGUID = pGo->GetGUID(); break; + case GO_GATE_POLKELT: m_uiGatePolkeltGUID = pGo->GetGUID(); break; + case GO_GATE_RAVENIAN: m_uiGateRavenianGUID = pGo->GetGUID(); break; + case GO_GATE_BAROV: m_uiGateBarovGUID = pGo->GetGUID(); break; + case GO_GATE_ILLUCIA: m_uiGateIlluciaGUID = pGo->GetGUID(); break; + } + } + + void SetData(uint32 uiType, uint32 uiData) + { + switch(uiType) + { + case TYPE_GANDLING: + m_auiEncounter[0] = uiData; + break; + case TYPE_KIRTONOS: + m_auiEncounter[1] = uiData; + break; + case TYPE_ALEXEIBAROV: + m_auiEncounter[2] = uiData; + break; + case TYPE_THEOLEN: + m_auiEncounter[3] = uiData; + break; + case TYPE_RAVENIAN: + m_auiEncounter[4] = uiData; + break; + case TYPE_POLKELT: + m_auiEncounter[5] = uiData; + break; + case TYPE_MALICIA: + m_auiEncounter[6] = uiData; + break; + case TYPE_ILLUCIABAROV: + m_auiEncounter[7] = uiData; + break; + } + } + + uint32 GetData(uint32 uiType) + { + if (uiType == TYPE_GANDLING) + { + if (m_auiEncounter[2] == DONE && m_auiEncounter[3] == DONE && m_auiEncounter[4] == DONE && + m_auiEncounter[5] == DONE && m_auiEncounter[6] == DONE && m_auiEncounter[7] == DONE) + { + m_auiEncounter[0] = SPECIAL; + return SPECIAL; + } + } + + return 0; + } +}; + +InstanceData* GetInstanceData_instance_scholomance(Map* pMap) +{ + return new instance_scholomance(pMap); +} + +void AddSC_instance_scholomance() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "instance_scholomance"; + newscript->GetInstanceData = &GetInstanceData_instance_scholomance; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/scholomance/scholomance.h b/scripts/eastern_kingdoms/scholomance/scholomance.h new file mode 100644 index 000000000..b3674a064 --- /dev/null +++ b/scripts/eastern_kingdoms/scholomance/scholomance.h @@ -0,0 +1,31 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_SCHOLOMANCE_H +#define DEF_SCHOLOMANCE_H + +enum +{ + MAX_ENCOUNTER = 8, + + GO_GATE_KIRTONOS = 175570, + GO_GATE_GANDLING = 177374, + GO_GATE_MALICIA = 177375, + GO_GATE_THEOLEN = 177377, + GO_GATE_POLKELT = 177376, + GO_GATE_RAVENIAN = 177372, + GO_GATE_BAROV = 177373, + GO_GATE_ILLUCIA = 177371, + + TYPE_GANDLING = 1, + TYPE_THEOLEN = 2, + TYPE_MALICIA = 3, + TYPE_ILLUCIABAROV = 4, + TYPE_ALEXEIBAROV = 5, + TYPE_POLKELT = 6, + TYPE_RAVENIAN = 7, + TYPE_KIRTONOS = 8 +}; + +#endif diff --git a/scripts/eastern_kingdoms/searing_gorge.cpp b/scripts/eastern_kingdoms/searing_gorge.cpp new file mode 100644 index 000000000..df8732ad2 --- /dev/null +++ b/scripts/eastern_kingdoms/searing_gorge.cpp @@ -0,0 +1,159 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Searing_Gorge +SD%Complete: 80 +SDComment: Quest support: 3377, 3441 (More accurate info on Kalaran needed). Lothos Riftwaker teleport to Molten Core. +SDCategory: Searing Gorge +EndScriptData */ + +/* ContentData +npc_kalaran_windblade +npc_lothos_riftwaker +npc_zamael_lunthistle +EndContentData */ + +#include "precompiled.h" + +/*###### +## npc_kalaran_windblade +######*/ + +bool GossipHello_npc_kalaran_windblade(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestStatus(3441) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Tell me what drives this vengance?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_kalaran_windblade(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Continue please", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->SEND_GOSSIP_MENU(1954, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Let me confer with my colleagues", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->SEND_GOSSIP_MENU(1955, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->AreaExploredOrEventHappens(3441); + break; + } + return true; +} + +/*###### +## npc_lothos_riftwaker +######*/ + +bool GossipHello_npc_lothos_riftwaker(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestRewardStatus(7487) || pPlayer->GetQuestRewardStatus(7848)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport me to the Molten Core", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_lothos_riftwaker(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) + { + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->TeleportTo(409, 1096, -467, -104.6, 3.64); + } + + return true; +} + +/*###### +## npc_zamael_lunthistle +######*/ + +bool GossipHello_npc_zamael_lunthistle(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestStatus(3377) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Tell me your story", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + + pPlayer->SEND_GOSSIP_MENU(1920, pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_zamael_lunthistle(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Please continue...", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->SEND_GOSSIP_MENU(1921, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Goodbye", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->SEND_GOSSIP_MENU(1922, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->AreaExploredOrEventHappens(3377); + break; + } + return true; +} + +/*###### +## +######*/ + +void AddSC_searing_gorge() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_kalaran_windblade"; + newscript->pGossipHello = &GossipHello_npc_kalaran_windblade; + newscript->pGossipSelect = &GossipSelect_npc_kalaran_windblade; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_lothos_riftwaker"; + newscript->pGossipHello = &GossipHello_npc_lothos_riftwaker; + newscript->pGossipSelect = &GossipSelect_npc_lothos_riftwaker; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_zamael_lunthistle"; + newscript->pGossipHello = &GossipHello_npc_zamael_lunthistle; + newscript->pGossipSelect = &GossipSelect_npc_zamael_lunthistle; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp b/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp new file mode 100644 index 000000000..e451f43f5 --- /dev/null +++ b/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp @@ -0,0 +1,207 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance_Shadowfang_Keep +SD%Complete: 90 +SDComment: +SDCategory: Shadowfang Keep +EndScriptData */ + +#include "precompiled.h" +#include "shadowfang_keep.h" + +enum +{ + MAX_ENCOUNTER = 4, + + SAY_BOSS_DIE_AD = -1033007, + SAY_BOSS_DIE_AS = -1033008, + + NPC_ASH = 3850, + NPC_ADA = 3849, + + GO_COURTYARD_DOOR = 18895, //door to open when talking to NPC's + GO_SORCERER_DOOR = 18972, //door to open when Fenrus the Devourer + GO_ARUGAL_DOOR = 18971 //door to open when Wolf Master Nandos +}; + +struct MANGOS_DLL_DECL instance_shadowfang_keep : public ScriptedInstance +{ + instance_shadowfang_keep(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string strInstData; + + uint64 m_uiAshGUID; + uint64 m_uiAdaGUID; + + uint64 m_uiDoorCourtyardGUID; + uint64 m_uiDoorSorcererGUID; + uint64 m_uiDoorArugalGUID; + + void Initialize() + { + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + + m_uiAshGUID = 0; + m_uiAdaGUID = 0; + + m_uiDoorCourtyardGUID = 0; + m_uiDoorSorcererGUID = 0; + m_uiDoorArugalGUID = 0; + } + + void OnCreatureCreate(Creature* pCreature) + { + switch(pCreature->GetEntry()) + { + case NPC_ASH: m_uiAshGUID = pCreature->GetGUID(); break; + case NPC_ADA: m_uiAdaGUID = pCreature->GetGUID(); break; + } + } + + void OnObjectCreate(GameObject* pGo) + { + switch(pGo->GetEntry()) + { + case GO_COURTYARD_DOOR: + m_uiDoorCourtyardGUID = pGo->GetGUID(); + if (m_auiEncounter[0] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_SORCERER_DOOR: + m_uiDoorSorcererGUID = pGo->GetGUID(); + if (m_auiEncounter[2] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_ARUGAL_DOOR: + m_uiDoorArugalGUID = pGo->GetGUID(); + if (m_auiEncounter[3] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + } + } + + void DoSpeech() + { + Creature* pAda = instance->GetCreature(m_uiAdaGUID); + Creature* pAsh = instance->GetCreature(m_uiAshGUID); + + if (pAda && pAda->isAlive() && pAsh && pAsh->isAlive()) + { + DoScriptText(SAY_BOSS_DIE_AD,pAda); + DoScriptText(SAY_BOSS_DIE_AS,pAsh); + } + } + + void SetData(uint32 uiType, uint32 uiData) + { + switch(uiType) + { + case TYPE_FREE_NPC: + if (uiData == DONE) + DoUseDoorOrButton(m_uiDoorCourtyardGUID); + m_auiEncounter[0] = uiData; + break; + case TYPE_RETHILGORE: + if (uiData == DONE) + DoSpeech(); + m_auiEncounter[1] = uiData; + break; + case TYPE_FENRUS: + if (uiData == DONE) + DoUseDoorOrButton(m_uiDoorSorcererGUID); + m_auiEncounter[2] = uiData; + break; + case TYPE_NANDOS: + if (uiData == DONE) + DoUseDoorOrButton(m_uiDoorArugalGUID); + m_auiEncounter[3] = uiData; + break; + } + + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3]; + + strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } + } + + uint32 GetData(uint32 uiType) + { + switch(uiType) + { + case TYPE_FREE_NPC: + return m_auiEncounter[0]; + case TYPE_RETHILGORE: + return m_auiEncounter[1]; + case TYPE_FENRUS: + return m_auiEncounter[2]; + case TYPE_NANDOS: + return m_auiEncounter[3]; + } + return 0; + } + + const char* Save() + { + return strInstData.c_str(); + } + + void Load(const char* chrIn) + { + if (!chrIn) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(chrIn); + + std::istringstream loadStream(chrIn); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3]; + + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; + } + + OUT_LOAD_INST_DATA_COMPLETE; + } +}; + +InstanceData* GetInstanceData_instance_shadowfang_keep(Map* pMap) +{ + return new instance_shadowfang_keep(pMap); +} + +void AddSC_instance_shadowfang_keep() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "instance_shadowfang_keep"; + newscript->GetInstanceData = &GetInstanceData_instance_shadowfang_keep; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp new file mode 100644 index 000000000..13817cf44 --- /dev/null +++ b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp @@ -0,0 +1,141 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Shadowfang_Keep +SD%Complete: 75 +SDComment: npc_shadowfang_prisoner using escortAI for movement to door. Might need additional code in case being attacked. Add proper texts/say(). +SDCategory: Shadowfang Keep +EndScriptData */ + +/* ContentData +npc_shadowfang_prisoner +EndContentData */ + +#include "precompiled.h" +#include "escort_ai.h" +#include "shadowfang_keep.h" + +/*###### +## npc_shadowfang_prisoner +######*/ + +enum +{ + SAY_FREE_AS = -1033000, + SAY_OPEN_DOOR_AS = -1033001, + SAY_POST_DOOR_AS = -1033002, + SAY_FREE_AD = -1033003, + SAY_OPEN_DOOR_AD = -1033004, + SAY_POST1_DOOR_AD = -1033005, + SAY_POST2_DOOR_AD = -1033006, + + SPELL_UNLOCK = 6421, + NPC_ASH = 3850 +}; + +#define GOSSIP_ITEM_DOOR "Thanks, I'll follow you to the door." + +struct MANGOS_DLL_DECL npc_shadowfang_prisonerAI : public npc_escortAI +{ + npc_shadowfang_prisonerAI(Creature* pCreature) : npc_escortAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_uiNpcEntry = pCreature->GetEntry(); + Reset(); + } + + ScriptedInstance* m_pInstance; + uint32 m_uiNpcEntry; + + void WaypointReached(uint32 uiPoint) + { + switch(uiPoint) + { + case 0: + if (m_uiNpcEntry == NPC_ASH) + DoScriptText(SAY_FREE_AS, m_creature); + else + DoScriptText(SAY_FREE_AD, m_creature); + break; + case 10: + if (m_uiNpcEntry == NPC_ASH) + DoScriptText(SAY_OPEN_DOOR_AS, m_creature); + else + DoScriptText(SAY_OPEN_DOOR_AD, m_creature); + break; + case 11: + if (m_uiNpcEntry == NPC_ASH) + DoCast(m_creature, SPELL_UNLOCK); + break; + case 12: + if (m_uiNpcEntry == NPC_ASH) + DoScriptText(SAY_POST_DOOR_AS, m_creature); + else + DoScriptText(SAY_POST1_DOOR_AD, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_FREE_NPC, DONE); + break; + case 13: + if (m_uiNpcEntry != NPC_ASH) + DoScriptText(SAY_POST2_DOOR_AD, m_creature); + break; + } + } + + void Reset() {} +}; + +CreatureAI* GetAI_npc_shadowfang_prisoner(Creature* pCreature) +{ + return new npc_shadowfang_prisonerAI(pCreature); +} + +bool GossipHello_npc_shadowfang_prisoner(Player* pPlayer, Creature* pCreature) +{ + ScriptedInstance* pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + + if (pInstance && pInstance->GetData(TYPE_FREE_NPC) != DONE && pInstance->GetData(TYPE_RETHILGORE) == DONE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DOOR, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_shadowfang_prisoner(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + pPlayer->CLOSE_GOSSIP_MENU(); + + if (npc_shadowfang_prisonerAI* pEscortAI = dynamic_cast(pCreature->AI())) + pEscortAI->Start(); + } + return true; +} + +void AddSC_shadowfang_keep() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_shadowfang_prisoner"; + newscript->pGossipHello = &GossipHello_npc_shadowfang_prisoner; + newscript->pGossipSelect = &GossipSelect_npc_shadowfang_prisoner; + newscript->GetAI = &GetAI_npc_shadowfang_prisoner; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h new file mode 100644 index 000000000..16b096b7d --- /dev/null +++ b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h @@ -0,0 +1,12 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_SHADOWFANG_H +#define DEF_SHADOWFANG_H + +#define TYPE_FREE_NPC 1 +#define TYPE_RETHILGORE 2 +#define TYPE_FENRUS 3 +#define TYPE_NANDOS 4 +#endif diff --git a/scripts/eastern_kingdoms/silvermoon_city.cpp b/scripts/eastern_kingdoms/silvermoon_city.cpp new file mode 100644 index 000000000..3d871d080 --- /dev/null +++ b/scripts/eastern_kingdoms/silvermoon_city.cpp @@ -0,0 +1,96 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Silvermoon_City +SD%Complete: 100 +SDComment: Quest support: 9685 +SDCategory: Silvermoon City +EndScriptData */ + +/* ContentData +npc_blood_knight_stillblade +EndContentData */ + +#include "precompiled.h" + +/*####### +# npc_blood_knight_stillblade +#######*/ + +#define SAY_HEAL -1000193 + +#define QUEST_REDEEMING_THE_DEAD 9685 +#define SPELL_SHIMMERING_VESSEL 31225 +#define SPELL_REVIVE_SELF 32343 + +struct MANGOS_DLL_DECL npc_blood_knight_stillbladeAI : public ScriptedAI +{ + npc_blood_knight_stillbladeAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 lifeTimer; + bool spellHit; + + void Reset() + { + lifeTimer = 120000; + m_creature->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD); + m_creature->SetStandState(UNIT_STAND_STATE_DEAD); + spellHit = false; + } + + void MoveInLineOfSight(Unit *who) { } + + void UpdateAI(const uint32 diff) + { + if (m_creature->IsStandState()) + { + if (lifeTimer < diff) + m_creature->AI()->EnterEvadeMode(); + else + lifeTimer -= diff; + } + } + + void SpellHit(Unit *Hitter, const SpellEntry *Spellkind) + { + if ((Spellkind->Id == SPELL_SHIMMERING_VESSEL) && !spellHit && + (Hitter->GetTypeId() == TYPEID_PLAYER) && (((Player*)Hitter)->IsActiveQuest(QUEST_REDEEMING_THE_DEAD))) + { + ((Player*)Hitter)->AreaExploredOrEventHappens(QUEST_REDEEMING_THE_DEAD); + DoCast(m_creature,SPELL_REVIVE_SELF); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_creature->SetUInt32Value(UNIT_DYNAMIC_FLAGS, 0); + //m_creature->RemoveAllAuras(); + DoScriptText(SAY_HEAL, m_creature, Hitter); + spellHit = true; + } + } +}; + +CreatureAI* GetAI_npc_blood_knight_stillblade(Creature* pCreature) +{ + return new npc_blood_knight_stillbladeAI(pCreature); +} + +void AddSC_silvermoon_city() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "npc_blood_knight_stillblade"; + newscript->GetAI = &GetAI_npc_blood_knight_stillblade; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/silverpine_forest.cpp b/scripts/eastern_kingdoms/silverpine_forest.cpp new file mode 100644 index 000000000..30f7857f8 --- /dev/null +++ b/scripts/eastern_kingdoms/silverpine_forest.cpp @@ -0,0 +1,232 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Silverpine_Forest +SD%Complete: 100 +SDComment: Quest support: 435, 1886 +SDCategory: Silverpine Forest +EndScriptData */ + +/* ContentData +npc_astor_hadren +npc_deathstalker_erland +EndContentData */ + +#include "precompiled.h" +#include "escort_ai.h" + +/*###### +## npc_astor_hadren +######*/ + +struct MANGOS_DLL_DECL npc_astor_hadrenAI : public ScriptedAI +{ + npc_astor_hadrenAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + void Reset() + { + m_creature->setFaction(68); + } + + void JustDied(Unit *who) + { + m_creature->setFaction(68); + } +}; + +CreatureAI* GetAI_npc_astor_hadren(Creature *_creature) +{ + return new npc_astor_hadrenAI(_creature); +} + +bool GossipHello_npc_astor_hadren(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->GetQuestStatus(1886) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "You're Astor Hadren, right?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + + pPlayer->SEND_GOSSIP_MENU(623, pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_astor_hadren(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "You've got something I need, Astor. And I'll be taking it now.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->SEND_GOSSIP_MENU(624, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: + pPlayer->CLOSE_GOSSIP_MENU(); + pCreature->setFaction(21); + if (pPlayer) + ((npc_astor_hadrenAI*)pCreature->AI())->AttackStart(pPlayer); + break; + } + return true; +} + +/*##### +## npc_deathstalker_erland +#####*/ + +enum +{ + SAY_START_1 = -1000306, + SAY_START_2 = -1000307, + SAY_AGGRO_1 = -1000308, + SAY_AGGRO_2 = -1000309, + SAY_AGGRO_3 = -1000310, + SAY_PROGRESS = -1000311, + SAY_END = -1000312, + SAY_RANE = -1000313, + SAY_RANE_REPLY = -1000314, + SAY_CHECK_NEXT = -1000315, + SAY_QUINN = -1000316, + SAY_QUINN_REPLY = -1000317, + SAY_BYE = -1000318, + + QUEST_ERLAND = 435, + NPC_RANE = 1950, + NPC_QUINN = 1951 +}; + +struct MANGOS_DLL_DECL npc_deathstalker_erlandAI : public npc_escortAI +{ + npc_deathstalker_erlandAI(Creature* pCreature) : npc_escortAI(pCreature) + { + uiRaneGUID = 0; + uiQuinnGUID = 0; + Reset(); + } + + uint64 uiRaneGUID; + uint64 uiQuinnGUID; + + void MoveInLineOfSight(Unit* pUnit) + { + if (HasEscortState(STATE_ESCORT_ESCORTING)) + { + if (!uiRaneGUID && pUnit->GetEntry() == NPC_RANE) + { + if (m_creature->IsWithinDistInMap(pUnit, 30.0f)) + uiRaneGUID = pUnit->GetGUID(); + } + if (!uiQuinnGUID && pUnit->GetEntry() == NPC_QUINN) + { + if (m_creature->IsWithinDistInMap(pUnit, 30.0f)) + uiQuinnGUID = pUnit->GetGUID(); + } + } + + npc_escortAI::MoveInLineOfSight(pUnit); + } + + void WaypointReached(uint32 i) + { + Player* pPlayer = GetPlayerForEscort(); + + if (!pPlayer) + return; + + switch(i) + { + case 0: + DoScriptText(SAY_START_2, m_creature, pPlayer); + break; + case 13: + DoScriptText(SAY_END, m_creature, pPlayer); + pPlayer->GroupEventHappens(QUEST_ERLAND, m_creature); + break; + case 14: + if (Unit* pRane = Unit::GetUnit(*m_creature, uiRaneGUID)) + DoScriptText(SAY_RANE, pRane, m_creature); + break; + case 15: + DoScriptText(SAY_RANE_REPLY, m_creature); + break; + case 16: + DoScriptText(SAY_CHECK_NEXT, m_creature); + break; + case 24: + DoScriptText(SAY_QUINN, m_creature); + break; + case 25: + if (Unit* pQuinn = Unit::GetUnit(*m_creature, uiQuinnGUID)) + DoScriptText(SAY_QUINN_REPLY, pQuinn, m_creature); + break; + case 26: + DoScriptText(SAY_BYE, m_creature); + break; + } + } + + void Reset() + { + if (!HasEscortState(STATE_ESCORT_ESCORTING)) + { + uiRaneGUID = 0; + uiQuinnGUID = 0; + } + } + + void Aggro(Unit* who) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_AGGRO_1, m_creature, who); break; + case 1: DoScriptText(SAY_AGGRO_2, m_creature, who); break; + case 2: DoScriptText(SAY_AGGRO_3, m_creature, who); break; + } + } +}; + +bool QuestAccept_npc_deathstalker_erland(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_ERLAND) + { + DoScriptText(SAY_START_1, pCreature); + + if (npc_deathstalker_erlandAI* pEscortAI = dynamic_cast(pCreature->AI())) + pEscortAI->Start(true, false, pPlayer->GetGUID(), pQuest); + } + return true; +} + +CreatureAI* GetAI_npc_deathstalker_erland(Creature* pCreature) +{ + return new npc_deathstalker_erlandAI(pCreature); +} + +void AddSC_silverpine_forest() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_astor_hadren"; + newscript->pGossipHello = &GossipHello_npc_astor_hadren; + newscript->pGossipSelect = &GossipSelect_npc_astor_hadren; + newscript->GetAI = &GetAI_npc_astor_hadren; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_deathstalker_erland"; + newscript->GetAI = &GetAI_npc_deathstalker_erland; + newscript->pQuestAccept = &QuestAccept_npc_deathstalker_erland; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/stormwind_city.cpp b/scripts/eastern_kingdoms/stormwind_city.cpp new file mode 100644 index 000000000..4d2b52ce5 --- /dev/null +++ b/scripts/eastern_kingdoms/stormwind_city.cpp @@ -0,0 +1,268 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Stormwind_City +SD%Complete: 100 +SDComment: Quest support: 1640, 1447, 4185, 11223 (DB support required for spell 42711) +SDCategory: Stormwind City +EndScriptData */ + +/* ContentData +npc_archmage_malin +npc_bartleby +npc_dashel_stonefist +npc_lady_katrana_prestor +EndContentData */ + +#include "precompiled.h" + +/*###### +## npc_archmage_malin +######*/ + +#define GOSSIP_ITEM_MALIN "Can you send me to Theramore? I have an urgent message for Lady Jaina from Highlord Bolvar." + +bool GossipHello_npc_archmage_malin(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestStatus(11223) == QUEST_STATUS_COMPLETE && !pPlayer->GetQuestRewardStatus(11223)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_MALIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_archmage_malin(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF) + { + pPlayer->CLOSE_GOSSIP_MENU(); + pCreature->CastSpell(pPlayer, 42711, true); + } + + return true; +} + +/*###### +## npc_bartleby +######*/ + +enum +{ + FACTION_ENEMY = 168, + QUEST_BEAT = 1640 +}; + +struct MANGOS_DLL_DECL npc_bartlebyAI : public ScriptedAI +{ + npc_bartlebyAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_uiNormalFaction = pCreature->getFaction(); + Reset(); + } + + uint32 m_uiNormalFaction; + + void Reset() + { + if (m_creature->getFaction() != m_uiNormalFaction) + m_creature->setFaction(m_uiNormalFaction); + } + + void AttackedBy(Unit* pAttacker) + { + if (m_creature->getVictim()) + return; + + if (m_creature->IsFriendlyTo(pAttacker)) + return; + + AttackStart(pAttacker); + } + + void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + { + if (uiDamage > m_creature->GetHealth() || ((m_creature->GetHealth() - uiDamage)*100 / m_creature->GetMaxHealth() < 15)) + { + uiDamage = 0; + + if (pDoneBy->GetTypeId() == TYPEID_PLAYER) + ((Player*)pDoneBy)->AreaExploredOrEventHappens(QUEST_BEAT); + + EnterEvadeMode(); + } + } +}; + +bool QuestAccept_npc_bartleby(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_BEAT) + { + pCreature->setFaction(FACTION_ENEMY); + ((npc_bartlebyAI*)pCreature->AI())->AttackStart(pPlayer); + } + return true; +} + +CreatureAI* GetAI_npc_bartleby(Creature* pCreature) +{ + return new npc_bartlebyAI(pCreature); +} + +/*###### +## npc_dashel_stonefist +######*/ + +enum +{ + QUEST_MISSING_DIPLO_PT8 = 1447, + FACTION_HOSTILE = 168 +}; + +struct MANGOS_DLL_DECL npc_dashel_stonefistAI : public ScriptedAI +{ + npc_dashel_stonefistAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_uiNormalFaction = pCreature->getFaction(); + Reset(); + } + + uint32 m_uiNormalFaction; + + void Reset() + { + if (m_creature->getFaction() != m_uiNormalFaction) + m_creature->setFaction(m_uiNormalFaction); + } + + void AttackedBy(Unit* pAttacker) + { + if (m_creature->getVictim()) + return; + + if (m_creature->IsFriendlyTo(pAttacker)) + return; + + AttackStart(pAttacker); + } + + void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + { + if (uiDamage > m_creature->GetHealth() || ((m_creature->GetHealth() - uiDamage)*100 / m_creature->GetMaxHealth() < 15)) + { + uiDamage = 0; + + if (pDoneBy->GetTypeId() == TYPEID_PLAYER) + ((Player*)pDoneBy)->AreaExploredOrEventHappens(QUEST_MISSING_DIPLO_PT8); + + EnterEvadeMode(); + } + } +}; + +bool QuestAccept_npc_dashel_stonefist(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_MISSING_DIPLO_PT8) + { + pCreature->setFaction(FACTION_HOSTILE); + ((npc_dashel_stonefistAI*)pCreature->AI())->AttackStart(pPlayer); + } + return true; +} + +CreatureAI* GetAI_npc_dashel_stonefist(Creature* pCreature) +{ + return new npc_dashel_stonefistAI(pCreature); +} + +/*###### +## npc_lady_katrana_prestor +######*/ + +#define GOSSIP_ITEM_KAT_1 "Pardon the intrusion, Lady Prestor, but Highlord Bolvar suggested that I seek your advice." +#define GOSSIP_ITEM_KAT_2 "My apologies, Lady Prestor." +#define GOSSIP_ITEM_KAT_3 "Begging your pardon, Lady Prestor. That was not my intent." +#define GOSSIP_ITEM_KAT_4 "Thank you for your time, Lady Prestor." + +bool GossipHello_npc_lady_katrana_prestor(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestStatus(4185) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KAT_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + + pPlayer->SEND_GOSSIP_MENU(2693, pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_lady_katrana_prestor(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KAT_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->SEND_GOSSIP_MENU(2694, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KAT_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->SEND_GOSSIP_MENU(2695, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KAT_4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->SEND_GOSSIP_MENU(2696, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+3: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->AreaExploredOrEventHappens(4185); + break; + } + return true; +} + +void AddSC_stormwind_city() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_archmage_malin"; + newscript->pGossipHello = &GossipHello_npc_archmage_malin; + newscript->pGossipSelect = &GossipSelect_npc_archmage_malin; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_bartleby"; + newscript->GetAI = &GetAI_npc_bartleby; + newscript->pQuestAccept = &QuestAccept_npc_bartleby; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_dashel_stonefist"; + newscript->GetAI = &GetAI_npc_dashel_stonefist; + newscript->pQuestAccept = &QuestAccept_npc_dashel_stonefist; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_lady_katrana_prestor"; + newscript->pGossipHello = &GossipHello_npc_lady_katrana_prestor; + newscript->pGossipSelect = &GossipSelect_npc_lady_katrana_prestor; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/stranglethorn_vale.cpp b/scripts/eastern_kingdoms/stranglethorn_vale.cpp new file mode 100644 index 000000000..ee2a8bc84 --- /dev/null +++ b/scripts/eastern_kingdoms/stranglethorn_vale.cpp @@ -0,0 +1,107 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Stranglethorn_Vale +SD%Complete: 100 +SDComment: Quest support: 592 +SDCategory: Stranglethorn Vale +EndScriptData */ + +/* ContentData +mob_yenniku +EndContentData */ + +#include "precompiled.h" + +/*###### +## mob_yenniku +######*/ + +struct MANGOS_DLL_DECL mob_yennikuAI : public ScriptedAI +{ + mob_yennikuAI(Creature *c) : ScriptedAI(c) + { + bReset = false; + Reset(); + } + + uint32 Reset_Timer; + bool bReset; + + void Reset() + { + Reset_Timer = 0; + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE); + } + + void SpellHit(Unit *caster, const SpellEntry *spell) + { + if (caster->GetTypeId() == TYPEID_PLAYER) + { + //Yenniku's Release + if(!bReset && ((Player*)caster)->GetQuestStatus(592) == QUEST_STATUS_INCOMPLETE && spell->Id == 3607) + { + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_STUN); + m_creature->CombatStop(); //stop combat + m_creature->DeleteThreatList(); //unsure of this + m_creature->setFaction(83); //horde generic + + bReset = true; + Reset_Timer = 60000; + } + } + return; + } + + void Aggro(Unit *who) {} + + void UpdateAI(const uint32 diff) + { + if (bReset) + if(Reset_Timer < diff) + { + EnterEvadeMode(); + bReset = false; + m_creature->setFaction(28); //troll, bloodscalp + } + else Reset_Timer -= diff; + + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim() ) + return; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_mob_yenniku(Creature *_Creature) +{ + return new mob_yennikuAI (_Creature); +} + +/*###### +## +######*/ + +void AddSC_stranglethorn_vale() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "mob_yenniku"; + newscript->GetAI = &GetAI_mob_yenniku; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/stratholme/boss_baron_rivendare.cpp b/scripts/eastern_kingdoms/stratholme/boss_baron_rivendare.cpp new file mode 100644 index 000000000..6fa792610 --- /dev/null +++ b/scripts/eastern_kingdoms/stratholme/boss_baron_rivendare.cpp @@ -0,0 +1,185 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Baron_Rivendare +SD%Complete: 70 +SDComment: aura applied/defined in database +SDCategory: Stratholme +EndScriptData */ + +#include "precompiled.h" +#include "stratholme.h" + +#define SAY_0 "Intruders! More pawns of the Argent Dawn, no doubt. I already count one of their number among my prisoners. Withdraw from my domain before she is executed!" +#define SAY_1 "You're still here? Your foolishness is amusing! The Argent Dawn wench needn't suffer in vain. Leave at once and she shall be spared!" +#define SAY_2 "I shall take great pleasure in taking this poor wretch's life! It's not too late, she needn't suffer in vain. Turn back and her death shall be merciful!" +#define SAY_3 "May this prisoner's death serve as a warning. None shall defy the Scourge and live!" +#define SAY_4 "So you see fit to toy with the Lich King's creations? Ramstein, be sure to give the intruders a proper greeting." +#define SAY_5 "Time to take matters into my own hands. Come. Enter my domain and challenge the might of the Scourge!" + +#define ADD_1X 4017.403809 +#define ADD_1Y -3339.703369 +#define ADD_1Z 115.057655 +#define ADD_1O 5.487860 + +#define ADD_2X 4013.189209 +#define ADD_2Y -3351.808350 +#define ADD_2Z 115.052254 +#define ADD_2O 0.134280 + +#define ADD_3X 4017.738037 +#define ADD_3Y -3363.478016 +#define ADD_3Z 115.057274 +#define ADD_3O 0.723313 + +#define ADD_4X 4048.877197 +#define ADD_4Y -3363.223633 +#define ADD_4Z 115.054253 +#define ADD_4O 3.627735 + +#define ADD_5X 4051.777588 +#define ADD_5Y -3350.893311 +#define ADD_5Z 115.055351 +#define ADD_5O 3.066176 + +#define ADD_6X 4048.375977 +#define ADD_6Y -3339.966309 +#define ADD_6Z 115.055222 +#define ADD_6O 2.457497 + +#define SPELL_SHADOWBOLT 17393 +#define SPELL_CLEAVE 15284 +#define SPELL_MORTALSTRIKE 15708 + +#define SPELL_UNHOLY_AURA 17467 +#define SPELL_RAISEDEAD 17473 //triggers death pact (17471) + +#define SPELL_RAISE_DEAD1 17475 +#define SPELL_RAISE_DEAD2 17476 +#define SPELL_RAISE_DEAD3 17477 +#define SPELL_RAISE_DEAD4 17478 +#define SPELL_RAISE_DEAD5 17479 +#define SPELL_RAISE_DEAD6 17480 + +struct MANGOS_DLL_DECL boss_baron_rivendareAI : public ScriptedAI +{ + boss_baron_rivendareAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 ShadowBolt_Timer; + uint32 Cleave_Timer; + uint32 MortalStrike_Timer; + //uint32 RaiseDead_Timer; + uint32 SummonSkeletons_Timer; + Creature *Summoned; + + void Reset() + { + ShadowBolt_Timer = 5000; + Cleave_Timer = 8000; + MortalStrike_Timer = 12000; + //RaiseDead_Timer = 30000; + SummonSkeletons_Timer = 34000; + } + + void Aggro(Unit *who) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_BARON,IN_PROGRESS); + } + + void JustSummoned(Creature* summoned) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + summoned->AI()->AttackStart(target); + } + + void JustDied(Unit* Killer) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_BARON,DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //ShadowBolt + if (ShadowBolt_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(m_creature->getVictim(),SPELL_SHADOWBOLT); + ShadowBolt_Timer = 10000; + }else ShadowBolt_Timer -= diff; + + //Cleave + if (Cleave_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_CLEAVE); + Cleave_Timer = urand(7000, 17000); + }else Cleave_Timer -= diff; + + //MortalStrike + if (MortalStrike_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_MORTALSTRIKE); + MortalStrike_Timer = urand(10000, 25000); + }else MortalStrike_Timer -= diff; + + //RaiseDead + //if (RaiseDead_Timer < diff) + //{ + // DoCast(m_creature,SPELL_RAISEDEAD); + // RaiseDead_Timer = 45000; + //}else RaiseDead_Timer -= diff; + + //SummonSkeletons + if (SummonSkeletons_Timer < diff) + { + m_creature->SummonCreature(11197,ADD_1X,ADD_1Y,ADD_1Z,ADD_1O,TEMPSUMMON_TIMED_DESPAWN,29000); + m_creature->SummonCreature(11197,ADD_2X,ADD_2Y,ADD_2Z,ADD_2O,TEMPSUMMON_TIMED_DESPAWN,29000); + m_creature->SummonCreature(11197,ADD_3X,ADD_3Y,ADD_3Z,ADD_3O,TEMPSUMMON_TIMED_DESPAWN,29000); + m_creature->SummonCreature(11197,ADD_4X,ADD_4Y,ADD_4Z,ADD_4O,TEMPSUMMON_TIMED_DESPAWN,29000); + m_creature->SummonCreature(11197,ADD_5X,ADD_5Y,ADD_5Z,ADD_5O,TEMPSUMMON_TIMED_DESPAWN,29000); + m_creature->SummonCreature(11197,ADD_6X,ADD_6Y,ADD_6Z,ADD_6O,TEMPSUMMON_TIMED_DESPAWN,29000); + + SummonSkeletons_Timer = 40000; + }else SummonSkeletons_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_baron_rivendare(Creature* pCreature) +{ + return new boss_baron_rivendareAI(pCreature); +} + +void AddSC_boss_baron_rivendare() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_baron_rivendare"; + newscript->GetAI = &GetAI_boss_baron_rivendare; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/stratholme/boss_baroness_anastari.cpp b/scripts/eastern_kingdoms/stratholme/boss_baroness_anastari.cpp new file mode 100644 index 000000000..dbf4ae70f --- /dev/null +++ b/scripts/eastern_kingdoms/stratholme/boss_baroness_anastari.cpp @@ -0,0 +1,118 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Baroness_Anastari +SD%Complete: 90 +SDComment: MC disabled +SDCategory: Stratholme +EndScriptData */ + +#include "precompiled.h" +#include "stratholme.h" + +#define SPELL_BANSHEEWAIL 16565 +#define SPELL_BANSHEECURSE 16867 +#define SPELL_SILENCE 18327 +//#define SPELL_POSSESS 17244 + +struct MANGOS_DLL_DECL boss_baroness_anastariAI : public ScriptedAI +{ + boss_baroness_anastariAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 BansheeWail_Timer; + uint32 BansheeCurse_Timer; + uint32 Silence_Timer; + //uint32 Possess_Timer; + + void Reset() + { + BansheeWail_Timer = 1000; + BansheeCurse_Timer = 11000; + Silence_Timer = 13000; + //Possess_Timer = 35000; + } + + void JustDied(Unit* Killer) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_BARONESS,IN_PROGRESS); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //BansheeWail + if (BansheeWail_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_BANSHEEWAIL); + BansheeWail_Timer = 4000; + }else BansheeWail_Timer -= diff; + + //BansheeCurse + if (BansheeCurse_Timer < diff) + { + if (!urand(0, 3)) + DoCast(m_creature->getVictim(),SPELL_BANSHEECURSE); + + BansheeCurse_Timer = 18000; + }else BansheeCurse_Timer -= diff; + + //Silence + if (Silence_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_SILENCE); + Silence_Timer = 13000; + }else Silence_Timer -= diff; + + //Possess + /* if (Possess_Timer < diff) + { + //Cast + if (rand()%100 < 65) + { + Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM,0); + if (target)DoCast(target,SPELL_POSSESS); + } + Possess_Timer = 50000; + }else Possess_Timer -= diff; + */ + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_baroness_anastari(Creature* pCreature) +{ + return new boss_baroness_anastariAI(pCreature); +} + +void AddSC_boss_baroness_anastari() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_baroness_anastari"; + newscript->GetAI = &GetAI_boss_baroness_anastari; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp b/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp new file mode 100644 index 000000000..6398e2d87 --- /dev/null +++ b/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp @@ -0,0 +1,215 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_cannon_master_willey +SD%Complete: 100 +SDComment: +SDCategory: Stratholme +EndScriptData */ + +#include "precompiled.h" + +//front, left +#define ADD_1X 3553.851807 +#define ADD_1Y -2945.885986 +#define ADD_1Z 125.001015 +#define ADD_1O 0.592007 +//front, right +#define ADD_2X 3559.206299 +#define ADD_2Y -2952.929932 +#define ADD_2Z 125.001015 +#define ADD_2O 0.592007 +//mid, left +#define ADD_3X 3552.417480 +#define ADD_3Y -2948.667236 +#define ADD_3Z 125.001015 +#define ADD_3O 0.592007 +//mid, right +#define ADD_4X 3555.651855 +#define ADD_4Y -2953.519043 +#define ADD_4Z 125.001015 +#define ADD_4O 0.592007 +//back, left +#define ADD_5X 3547.927246 +#define ADD_5Y -2950.977295 +#define ADD_5Z 125.001015 +#define ADD_5O 0.592007 +//back, mid +#define ADD_6X 3553.094697 +#define ADD_6Y -2952.123291 +#define ADD_6Z 125.001015 +#define ADD_6O 0.592007 +//back, right +#define ADD_7X 3552.727539 +#define ADD_7Y -2957.776123 +#define ADD_7Z 125.001015 +#define ADD_7O 0.592007 +//behind, left +#define ADD_8X 3547.156250 +#define ADD_8Y -2953.162354 +#define ADD_8Z 125.001015 +#define ADD_8O 0.592007 +//behind, right +#define ADD_9X 3550.202148 +#define ADD_9Y -2957.437744 +#define ADD_9Z 125.001015 +#define ADD_9O 0.592007 + +#define SPELL_KNOCKAWAY 10101 +#define SPELL_PUMMEL 15615 +#define SPELL_SHOOT 20463 +//#define SPELL_SUMMONCRIMSONRIFLEMAN 17279 + +struct MANGOS_DLL_DECL boss_cannon_master_willeyAI : public ScriptedAI +{ + boss_cannon_master_willeyAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 KnockAway_Timer; + uint32 Pummel_Timer; + uint32 Shoot_Timer; + uint32 SummonRifleman_Timer; + + void Reset() + { + Shoot_Timer = 1000; + Pummel_Timer = 7000; + KnockAway_Timer = 11000; + SummonRifleman_Timer = 15000; + } + + void JustDied(Unit* Victim) + { + m_creature->SummonCreature(11054,ADD_1X,ADD_1Y,ADD_1Z,ADD_1O,TEMPSUMMON_TIMED_DESPAWN,240000); + m_creature->SummonCreature(11054,ADD_2X,ADD_2Y,ADD_2Z,ADD_2O,TEMPSUMMON_TIMED_DESPAWN,240000); + m_creature->SummonCreature(11054,ADD_3X,ADD_3Y,ADD_3Z,ADD_3O,TEMPSUMMON_TIMED_DESPAWN,240000); + m_creature->SummonCreature(11054,ADD_4X,ADD_4Y,ADD_4Z,ADD_4O,TEMPSUMMON_TIMED_DESPAWN,240000); + m_creature->SummonCreature(11054,ADD_5X,ADD_5Y,ADD_5Z,ADD_5O,TEMPSUMMON_TIMED_DESPAWN,240000); + m_creature->SummonCreature(11054,ADD_7X,ADD_7Y,ADD_7Z,ADD_7O,TEMPSUMMON_TIMED_DESPAWN,240000); + m_creature->SummonCreature(11054,ADD_9X,ADD_9Y,ADD_9Z,ADD_9O,TEMPSUMMON_TIMED_DESPAWN,240000); + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Pummel + if (Pummel_Timer < diff) + { + //Cast + if (rand()%100 < 90) //90% chance to cast + { + DoCast(m_creature->getVictim(),SPELL_PUMMEL); + } + //12 seconds until we should cast this again + Pummel_Timer = 12000; + }else Pummel_Timer -= diff; + + //KnockAway + if (KnockAway_Timer < diff) + { + //Cast + if (rand()%100 < 80) //80% chance to cast + { + DoCast(m_creature->getVictim(),SPELL_KNOCKAWAY); + } + //14 seconds until we should cast this again + KnockAway_Timer = 14000; + }else KnockAway_Timer -= diff; + + //Shoot + if (Shoot_Timer < diff) + { + //Cast + DoCast(m_creature->getVictim(),SPELL_SHOOT); + //1 seconds until we should cast this again + Shoot_Timer = 1000; + }else Shoot_Timer -= diff; + + //SummonRifleman + if (SummonRifleman_Timer < diff) + { + //Cast + switch(urand(0, 8)) + { + case 0: + m_creature->SummonCreature(11054,ADD_1X,ADD_1Y,ADD_1Z,ADD_1O,TEMPSUMMON_TIMED_DESPAWN,240000); + m_creature->SummonCreature(11054,ADD_2X,ADD_2Y,ADD_2Z,ADD_2O,TEMPSUMMON_TIMED_DESPAWN,240000); + m_creature->SummonCreature(11054,ADD_4X,ADD_4Y,ADD_4Z,ADD_4O,TEMPSUMMON_TIMED_DESPAWN,240000); + break; + case 1: + m_creature->SummonCreature(11054,ADD_2X,ADD_2Y,ADD_2Z,ADD_2O,TEMPSUMMON_TIMED_DESPAWN,240000); + m_creature->SummonCreature(11054,ADD_3X,ADD_3Y,ADD_3Z,ADD_3O,TEMPSUMMON_TIMED_DESPAWN,240000); + m_creature->SummonCreature(11054,ADD_5X,ADD_5Y,ADD_5Z,ADD_5O,TEMPSUMMON_TIMED_DESPAWN,240000); + break; + case 2: + m_creature->SummonCreature(11054,ADD_3X,ADD_3Y,ADD_3Z,ADD_3O,TEMPSUMMON_TIMED_DESPAWN,240000); + m_creature->SummonCreature(11054,ADD_4X,ADD_4Y,ADD_4Z,ADD_4O,TEMPSUMMON_TIMED_DESPAWN,240000); + m_creature->SummonCreature(11054,ADD_6X,ADD_6Y,ADD_6Z,ADD_6O,TEMPSUMMON_TIMED_DESPAWN,240000); + break; + case 3: + m_creature->SummonCreature(11054,ADD_4X,ADD_4Y,ADD_4Z,ADD_4O,TEMPSUMMON_TIMED_DESPAWN,240000); + m_creature->SummonCreature(11054,ADD_5X,ADD_5Y,ADD_5Z,ADD_5O,TEMPSUMMON_TIMED_DESPAWN,240000); + m_creature->SummonCreature(11054,ADD_7X,ADD_7Y,ADD_7Z,ADD_7O,TEMPSUMMON_TIMED_DESPAWN,240000); + break; + case 4: + m_creature->SummonCreature(11054,ADD_5X,ADD_5Y,ADD_5Z,ADD_5O,TEMPSUMMON_TIMED_DESPAWN,240000); + m_creature->SummonCreature(11054,ADD_6X,ADD_6Y,ADD_6Z,ADD_6O,TEMPSUMMON_TIMED_DESPAWN,240000); + m_creature->SummonCreature(11054,ADD_8X,ADD_8Y,ADD_8Z,ADD_8O,TEMPSUMMON_TIMED_DESPAWN,240000); + break; + case 5: + m_creature->SummonCreature(11054,ADD_6X,ADD_6Y,ADD_6Z,ADD_6O,TEMPSUMMON_TIMED_DESPAWN,240000); + m_creature->SummonCreature(11054,ADD_7X,ADD_7Y,ADD_7Z,ADD_7O,TEMPSUMMON_TIMED_DESPAWN,240000); + m_creature->SummonCreature(11054,ADD_9X,ADD_9Y,ADD_9Z,ADD_9O,TEMPSUMMON_TIMED_DESPAWN,240000); + break; + case 6: + m_creature->SummonCreature(11054,ADD_7X,ADD_7Y,ADD_7Z,ADD_7O,TEMPSUMMON_TIMED_DESPAWN,240000); + m_creature->SummonCreature(11054,ADD_8X,ADD_8Y,ADD_8Z,ADD_8O,TEMPSUMMON_TIMED_DESPAWN,240000); + m_creature->SummonCreature(11054,ADD_1X,ADD_1Y,ADD_1Z,ADD_1O,TEMPSUMMON_TIMED_DESPAWN,240000); + break; + case 7: + m_creature->SummonCreature(11054,ADD_8X,ADD_8Y,ADD_8Z,ADD_8O,TEMPSUMMON_TIMED_DESPAWN,240000); + m_creature->SummonCreature(11054,ADD_9X,ADD_9Y,ADD_9Z,ADD_9O,TEMPSUMMON_TIMED_DESPAWN,240000); + m_creature->SummonCreature(11054,ADD_2X,ADD_2Y,ADD_2Z,ADD_2O,TEMPSUMMON_TIMED_DESPAWN,240000); + break; + case 8: + m_creature->SummonCreature(11054,ADD_9X,ADD_9Y,ADD_9Z,ADD_9O,TEMPSUMMON_TIMED_DESPAWN,240000); + m_creature->SummonCreature(11054,ADD_1X,ADD_1Y,ADD_1Z,ADD_1O,TEMPSUMMON_TIMED_DESPAWN,240000); + m_creature->SummonCreature(11054,ADD_3X,ADD_3Y,ADD_3Z,ADD_3O,TEMPSUMMON_TIMED_DESPAWN,240000); + break; + } + //30 seconds until we should cast this again + SummonRifleman_Timer = 30000; + }else SummonRifleman_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_cannon_master_willey(Creature* pCreature) +{ + return new boss_cannon_master_willeyAI(pCreature); +} + +void AddSC_boss_cannon_master_willey() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_cannon_master_willey"; + newscript->GetAI = &GetAI_boss_cannon_master_willey; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp b/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp new file mode 100644 index 000000000..7c1e965d9 --- /dev/null +++ b/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp @@ -0,0 +1,213 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Dathrohan_Balnazzar +SD%Complete: 95 +SDComment: Possibly need to fix/improve summons after death +SDCategory: Stratholme +EndScriptData */ + +#include "precompiled.h" + +enum +{ + //Dathrohan spells + SPELL_CRUSADERSHAMMER = 17286, //AOE stun + SPELL_CRUSADERSTRIKE = 17281, + SPELL_HOLYSTRIKE = 17284, //weapon dmg +3 + + //Transform + SPELL_BALNAZZARTRANSFORM = 17288, //restore full HP/mana, trigger spell Balnazzar Transform Stun + + //Balnazzar spells + SPELL_SHADOWSHOCK = 17399, + SPELL_MINDBLAST = 17287, + SPELL_PSYCHICSCREAM = 13704, + SPELL_SLEEP = 12098, + SPELL_MINDCONTROL = 15690, + + NPC_DATHROHAN = 10812, + NPC_BALNAZZAR = 10813, + NPC_ZOMBIE = 10698 //probably incorrect +}; + +struct SummonDef +{ + float m_fX, m_fY, m_fZ, m_fOrient; +}; + +SummonDef m_aSummonPoint[]= +{ + {3444.156, -3090.626, 135.002, 2.240}, //G1 front, left + {3449.123, -3087.009, 135.002, 2.240}, //G1 front, right + {3446.246, -3093.466, 135.002, 2.240}, //G1 back left + {3451.160, -3089.904, 135.002, 2.240}, //G1 back, right + + {3457.995, -3080.916, 135.002, 3.784}, //G2 front, left + {3454.302, -3076.330, 135.002, 3.784}, //G2 front, right + {3460.975, -3078.901, 135.002, 3.784}, //G2 back left + {3457.338, -3073.979, 135.002, 3.784} //G2 back, right +}; + +struct MANGOS_DLL_DECL boss_dathrohan_balnazzarAI : public ScriptedAI +{ + boss_dathrohan_balnazzarAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 m_uiCrusadersHammer_Timer; + uint32 m_uiCrusaderStrike_Timer; + uint32 m_uiMindBlast_Timer; + uint32 m_uiHolyStrike_Timer; + uint32 m_uiShadowShock_Timer; + uint32 m_uiPsychicScream_Timer; + uint32 m_uiDeepSleep_Timer; + uint32 m_uiMindControl_Timer; + bool m_bTransformed; + + void Reset() + { + m_uiCrusadersHammer_Timer = 8000; + m_uiCrusaderStrike_Timer = 12000; + m_uiMindBlast_Timer = 6000; + m_uiHolyStrike_Timer = 18000; + m_uiShadowShock_Timer = 4000; + m_uiPsychicScream_Timer = 16000; + m_uiDeepSleep_Timer = 20000; + m_uiMindControl_Timer = 10000; + m_bTransformed = false; + + if (m_creature->GetEntry() == NPC_BALNAZZAR) + m_creature->UpdateEntry(NPC_DATHROHAN); + + } + + void JustDied(Unit* Victim) + { + static uint32 uiCount = sizeof(m_aSummonPoint)/sizeof(SummonDef); + + for (uint8 i=0; iSummonCreature(NPC_ZOMBIE, + m_aSummonPoint[i].m_fX, m_aSummonPoint[i].m_fY, m_aSummonPoint[i].m_fZ, m_aSummonPoint[i].m_fOrient, + TEMPSUMMON_TIMED_DESPAWN, HOUR*IN_MILISECONDS); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //START NOT TRANSFORMED + if (!m_bTransformed) + { + //MindBlast + if (m_uiMindBlast_Timer < uiDiff) + { + DoCast(m_creature->getVictim(),SPELL_MINDBLAST); + m_uiMindBlast_Timer = urand(15000, 20000); + }else m_uiMindBlast_Timer -= uiDiff; + + //CrusadersHammer + if (m_uiCrusadersHammer_Timer < uiDiff) + { + DoCast(m_creature->getVictim(),SPELL_CRUSADERSHAMMER); + m_uiCrusadersHammer_Timer = 12000; + }else m_uiCrusadersHammer_Timer -= uiDiff; + + //CrusaderStrike + if (m_uiCrusaderStrike_Timer < uiDiff) + { + DoCast(m_creature->getVictim(),SPELL_CRUSADERSTRIKE); + m_uiCrusaderStrike_Timer = 15000; + }else m_uiCrusaderStrike_Timer -= uiDiff; + + //HolyStrike + if (m_uiHolyStrike_Timer < uiDiff) + { + DoCast(m_creature->getVictim(),SPELL_HOLYSTRIKE); + m_uiHolyStrike_Timer = 15000; + }else m_uiHolyStrike_Timer -= uiDiff; + + //BalnazzarTransform + if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 40) + { + if (m_creature->IsNonMeleeSpellCasted(false)) + m_creature->InterruptNonMeleeSpells(false); + + //restore hp, mana and stun + DoCast(m_creature,SPELL_BALNAZZARTRANSFORM); + m_creature->UpdateEntry(NPC_BALNAZZAR); + m_bTransformed = true; + } + } + else + { + //MindBlast + if (m_uiMindBlast_Timer < uiDiff) + { + DoCast(m_creature->getVictim(),SPELL_MINDBLAST); + m_uiMindBlast_Timer = urand(15000, 20000); + }else m_uiMindBlast_Timer -= uiDiff; + + //ShadowShock + if (m_uiShadowShock_Timer < uiDiff) + { + DoCast(m_creature->getVictim(),SPELL_SHADOWSHOCK); + m_uiShadowShock_Timer = 11000; + }else m_uiShadowShock_Timer -= uiDiff; + + //PsychicScream + if (m_uiPsychicScream_Timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(pTarget,SPELL_PSYCHICSCREAM); + + m_uiPsychicScream_Timer = 20000; + }else m_uiPsychicScream_Timer -= uiDiff; + + //DeepSleep + if (m_uiDeepSleep_Timer < uiDiff) + { + if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(pTarget,SPELL_SLEEP); + + m_uiDeepSleep_Timer = 15000; + }else m_uiDeepSleep_Timer -= uiDiff; + + //MindControl + if (m_uiMindControl_Timer < uiDiff) + { + DoCast(m_creature->getVictim(),SPELL_MINDCONTROL); + m_uiMindControl_Timer = 15000; + }else m_uiMindControl_Timer -= uiDiff; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_dathrohan_balnazzar(Creature* pCreature) +{ + return new boss_dathrohan_balnazzarAI(pCreature); +} + +void AddSC_boss_dathrohan_balnazzar() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_dathrohan_balnazzar"; + newscript->GetAI = &GetAI_boss_dathrohan_balnazzar; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/stratholme/boss_magistrate_barthilas.cpp b/scripts/eastern_kingdoms/stratholme/boss_magistrate_barthilas.cpp new file mode 100644 index 000000000..a47d3d46b --- /dev/null +++ b/scripts/eastern_kingdoms/stratholme/boss_magistrate_barthilas.cpp @@ -0,0 +1,128 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Magistrate_Barthilas +SD%Complete: 70 +SDComment: +SDCategory: Stratholme +EndScriptData */ + +#include "precompiled.h" +#include "stratholme.h" + +#define SPELL_DRAININGBLOW 16793 +#define SPELL_CROWDPUMMEL 10887 +#define SPELL_MIGHTYBLOW 14099 +#define SPELL_FURIOUS_ANGER 16791 + +#define MODEL_NORMAL 10433 +#define MODEL_HUMAN 3637 + +struct MANGOS_DLL_DECL boss_magistrate_barthilasAI : public ScriptedAI +{ + boss_magistrate_barthilasAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 DrainingBlow_Timer; + uint32 CrowdPummel_Timer; + uint32 MightyBlow_Timer; + uint32 FuriousAnger_Timer; + uint32 AngerCount; + + void Reset() + { + DrainingBlow_Timer = 20000; + CrowdPummel_Timer = 15000; + MightyBlow_Timer = 10000; + FuriousAnger_Timer = 5000; + AngerCount = 0; + + if (m_creature->isAlive()) + m_creature->SetDisplayId(MODEL_NORMAL); + else + m_creature->SetDisplayId(MODEL_HUMAN); + } + + void MoveInLineOfSight(Unit *who) + { + //nothing to see here yet + + ScriptedAI::MoveInLineOfSight(who); + } + + void JustDied(Unit* Killer) + { + m_creature->SetDisplayId(MODEL_HUMAN); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (FuriousAnger_Timer < diff) + { + FuriousAnger_Timer = 4000; + if (AngerCount > 25) + return; + + ++AngerCount; + m_creature->CastSpell(m_creature,SPELL_FURIOUS_ANGER,false); + }else FuriousAnger_Timer -= diff; + + //DrainingBlow + if (DrainingBlow_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_DRAININGBLOW); + DrainingBlow_Timer = 15000; + }else DrainingBlow_Timer -= diff; + + //CrowdPummel + if (CrowdPummel_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_CROWDPUMMEL); + CrowdPummel_Timer = 15000; + }else CrowdPummel_Timer -= diff; + + //MightyBlow + if (MightyBlow_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_MIGHTYBLOW); + MightyBlow_Timer = 20000; + }else MightyBlow_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_magistrate_barthilas(Creature* pCreature) +{ + return new boss_magistrate_barthilasAI(pCreature); +} + +void AddSC_boss_magistrate_barthilas() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_magistrate_barthilas"; + newscript->GetAI = &GetAI_boss_magistrate_barthilas; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/stratholme/boss_maleki_the_pallid.cpp b/scripts/eastern_kingdoms/stratholme/boss_maleki_the_pallid.cpp new file mode 100644 index 000000000..a84fd04be --- /dev/null +++ b/scripts/eastern_kingdoms/stratholme/boss_maleki_the_pallid.cpp @@ -0,0 +1,108 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Maleki_the_Pallid +SD%Complete: 70 +SDComment: +SDCategory: Stratholme +EndScriptData */ + +#include "precompiled.h" +#include "stratholme.h" + +#define SPELL_FROSTBOLT 17503 +#define SPELL_DRAIN_LIFE 17238 +#define SPELL_DRAIN_MANA 17243 +#define SPELL_ICETOMB 16869 + +struct MANGOS_DLL_DECL boss_maleki_the_pallidAI : public ScriptedAI +{ + boss_maleki_the_pallidAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 FrostNova_Timer; + uint32 Frostbolt_Timer; + uint32 IceTomb_Timer; + uint32 DrainLife_Timer; + + void Reset() + { + FrostNova_Timer = 11000; + Frostbolt_Timer = 1000; + IceTomb_Timer = 16000; + DrainLife_Timer = 31000; + } + + void JustDied(Unit* Killer) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_PALLID,IN_PROGRESS); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Frostbolt + if (Frostbolt_Timer < diff) + { + if (rand()%100 < 90) + DoCast(m_creature->getVictim(),SPELL_FROSTBOLT); + + Frostbolt_Timer = 3500; + }else Frostbolt_Timer -= diff; + + //IceTomb + if (IceTomb_Timer < diff) + { + if (rand()%100 < 65) + DoCast(m_creature->getVictim(),SPELL_ICETOMB); + + IceTomb_Timer = 28000; + }else IceTomb_Timer -= diff; + + //DrainLife + if (DrainLife_Timer < diff) + { + if (rand()%100 < 55) + DoCast(m_creature->getVictim(),SPELL_DRAIN_LIFE); + + DrainLife_Timer = 31000; + }else DrainLife_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_maleki_the_pallid(Creature* pCreature) +{ + return new boss_maleki_the_pallidAI(pCreature); +} + +void AddSC_boss_maleki_the_pallid() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_maleki_the_pallid"; + newscript->GetAI = &GetAI_boss_maleki_the_pallid; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/stratholme/boss_nerubenkan.cpp b/scripts/eastern_kingdoms/stratholme/boss_nerubenkan.cpp new file mode 100644 index 000000000..293441f47 --- /dev/null +++ b/scripts/eastern_kingdoms/stratholme/boss_nerubenkan.cpp @@ -0,0 +1,137 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Nerubenkan +SD%Complete: 70 +SDComment: +SDCategory: Stratholme +EndScriptData */ + +#include "precompiled.h" +#include "stratholme.h" + +#define SPELL_ENCASINGWEBS 4962 +#define SPELL_PIERCEARMOR 6016 +#define SPELL_CRYPT_SCARABS 31602 +#define SPELL_RAISEUNDEADSCARAB 17235 + +struct MANGOS_DLL_DECL boss_nerubenkanAI : public ScriptedAI +{ + boss_nerubenkanAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 EncasingWebs_Timer; + uint32 PierceArmor_Timer; + uint32 CryptScarabs_Timer; + uint32 RaiseUndeadScarab_Timer; + + int Rand; + int RandX; + int RandY; + Creature* Summoned; + + void Reset() + { + CryptScarabs_Timer = 3000; + EncasingWebs_Timer = 7000; + PierceArmor_Timer = 19000; + RaiseUndeadScarab_Timer = 3000; + } + + void RaiseUndeadScarab(Unit* victim) + { + Rand = rand()%10; + switch(urand(0, 1)) + { + case 0: RandX = 0 - Rand; break; + case 1: RandX = 0 + Rand; break; + } + Rand = 0; + Rand = rand()%10; + switch(urand(0, 1)) + { + case 0: RandY = 0 - Rand; break; + case 1: RandY = 0 + Rand; break; + } + Rand = 0; + Summoned = DoSpawnCreature(10876, RandX, RandY, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 180000); + if (Summoned) + ((CreatureAI*)Summoned->AI())->AttackStart(victim); + } + + void JustDied(Unit* Killer) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_NERUB,IN_PROGRESS); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //EncasingWebs + if (EncasingWebs_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_ENCASINGWEBS); + EncasingWebs_Timer = 30000; + }else EncasingWebs_Timer -= diff; + + //PierceArmor + if (PierceArmor_Timer < diff) + { + if (rand()%100 < 75) + DoCast(m_creature->getVictim(),SPELL_PIERCEARMOR); + + PierceArmor_Timer = 35000; + }else PierceArmor_Timer -= diff; + + //CryptScarabs + if (CryptScarabs_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_CRYPT_SCARABS); + CryptScarabs_Timer = 16000; + }else CryptScarabs_Timer -= diff; + + //RaiseUndeadScarab + if (RaiseUndeadScarab_Timer < diff) + { + RaiseUndeadScarab(m_creature->getVictim()); + RaiseUndeadScarab_Timer = 18000; + }else RaiseUndeadScarab_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_nerubenkan(Creature* pCreature) +{ + return new boss_nerubenkanAI(pCreature); +} + +void AddSC_boss_nerubenkan() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_nerubenkan"; + newscript->GetAI = &GetAI_boss_nerubenkan; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp b/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp new file mode 100644 index 000000000..56ebe6c26 --- /dev/null +++ b/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp @@ -0,0 +1,154 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Silver_Hand_Bosses +SD%Complete: 40 +SDComment: Basic script to have support for Horde paladin epic mount (quest 9737). All 5 members of Order of the Silver Hand running this script (least for now) +SDCategory: Stratholme +EndScriptData */ + +#include "precompiled.h" +#include "stratholme.h" + +/*##### +# Additional: +# Although this is a working solution, the correct would be in addition to check if Aurius is dead. +# Once player extinguish the eternal flame (cast spell 31497->start event 11206) Aurius should become hostile. +# Once Aurius is defeated, he should be the one summoning the ghosts. +#####*/ + +#define SH_GREGOR 17910 +#define SH_CATHELA 17911 +#define SH_NEMAS 17912 +#define SH_AELMAR 17913 +#define SH_VICAR 17914 +#define SH_QUEST_CREDIT 17915 + +#define SPELL_HOLY_LIGHT 25263 +#define SPELL_DIVINE_SHIELD 13874 + +struct MANGOS_DLL_DECL boss_silver_hand_bossesAI : public ScriptedAI +{ + boss_silver_hand_bossesAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 HolyLight_Timer; + uint32 DivineShield_Timer; + + void Reset() + { + HolyLight_Timer = 20000; + DivineShield_Timer = 20000; + + if (m_pInstance) + { + switch(m_creature->GetEntry()) + { + case SH_AELMAR: + m_pInstance->SetData(TYPE_SH_AELMAR, 0); + break; + case SH_CATHELA: + m_pInstance->SetData(TYPE_SH_CATHELA, 0); + break; + case SH_GREGOR: + m_pInstance->SetData(TYPE_SH_GREGOR, 0); + break; + case SH_NEMAS: + m_pInstance->SetData(TYPE_SH_NEMAS, 0); + break; + case SH_VICAR: + m_pInstance->SetData(TYPE_SH_VICAR, 0); + break; + } + } + } + + void JustDied(Unit* Killer) + { + if (m_pInstance) + { + switch(m_creature->GetEntry()) + { + case SH_AELMAR: + m_pInstance->SetData(TYPE_SH_AELMAR, 2); + break; + case SH_CATHELA: + m_pInstance->SetData(TYPE_SH_CATHELA, 2); + break; + case SH_GREGOR: + m_pInstance->SetData(TYPE_SH_GREGOR, 2); + break; + case SH_NEMAS: + m_pInstance->SetData(TYPE_SH_NEMAS, 2); + break; + case SH_VICAR: + m_pInstance->SetData(TYPE_SH_VICAR, 2); + break; + } + if (m_pInstance->GetData(TYPE_SH_QUEST) && Killer->GetTypeId() == TYPEID_PLAYER) + ((Player*)Killer)->KilledMonsterCredit(SH_QUEST_CREDIT,m_creature->GetGUID()); + } + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (HolyLight_Timer < diff) + { + if (m_creature->GetHealth()*5 < m_creature->GetMaxHealth()) + { + DoCast(m_creature, SPELL_HOLY_LIGHT); + HolyLight_Timer = 20000; + } + }else HolyLight_Timer -= diff; + + if (DivineShield_Timer < diff) + { + if (m_creature->GetHealth()*20 < m_creature->GetMaxHealth()) + { + DoCast(m_creature, SPELL_DIVINE_SHIELD); + DivineShield_Timer = 40000; + } + }else DivineShield_Timer -= diff; + + DoMeleeAttackIfReady(); + } + +}; +CreatureAI* GetAI_boss_silver_hand_bossesAI(Creature* pCreature) +{ + return new boss_silver_hand_bossesAI(pCreature); +} + + +void AddSC_boss_order_of_silver_hand() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_silver_hand_bosses"; + newscript->GetAI = &GetAI_boss_silver_hand_bossesAI; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/stratholme/boss_postmaster_malown.cpp b/scripts/eastern_kingdoms/stratholme/boss_postmaster_malown.cpp new file mode 100644 index 000000000..c57a5374a --- /dev/null +++ b/scripts/eastern_kingdoms/stratholme/boss_postmaster_malown.cpp @@ -0,0 +1,139 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_postmaster_malown +SD%Complete: 50 +SDComment: +SDCategory: Stratholme +EndScriptData */ + +#include "precompiled.h" + +//Spell ID to summon this guy is 24627 "Summon Postmaster Malown" +//He should be spawned along with three other elites once the third postbox has been opened + +#define SAY_MALOWNED "You just got MALOWNED!" + +#define SPELL_WAILINGDEAD 7713 +#define SPELL_BACKHAND 6253 +#define SPELL_CURSEOFWEAKNESS 8552 +#define SPELL_CURSEOFTONGUES 12889 +#define SPELL_CALLOFTHEGRAVE 17831 + +struct MANGOS_DLL_DECL boss_postmaster_malownAI : public ScriptedAI +{ + boss_postmaster_malownAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 WailingDead_Timer; + uint32 Backhand_Timer; + uint32 CurseOfWeakness_Timer; + uint32 CurseOfTongues_Timer; + uint32 CallOfTheGrave_Timer; + bool HasYelled; + + void Reset() + { + WailingDead_Timer = 19000; //lasts 6 sec + Backhand_Timer = 8000; //2 sec stun + CurseOfWeakness_Timer = 20000; //lasts 2 mins + CurseOfTongues_Timer = 22000; + CallOfTheGrave_Timer = 25000; + HasYelled = false; + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //WailingDead + if (WailingDead_Timer < diff) + { + //Cast + if (rand()%100 < 65) //65% chance to cast + { + DoCast(m_creature->getVictim(),SPELL_WAILINGDEAD); + } + //19 seconds until we should cast this again + WailingDead_Timer = 19000; + }else WailingDead_Timer -= diff; + + //Backhand + if (Backhand_Timer < diff) + { + //Cast + if (rand()%100 < 45) //45% chance to cast + { + DoCast(m_creature->getVictim(),SPELL_BACKHAND); + } + //8 seconds until we should cast this again + Backhand_Timer = 8000; + }else Backhand_Timer -= diff; + + //CurseOfWeakness + if (CurseOfWeakness_Timer < diff) + { + //Cast + if (rand()%100 < 3) //3% chance to cast + { + DoCast(m_creature->getVictim(),SPELL_CURSEOFWEAKNESS); + } + //20 seconds until we should cast this again + CurseOfWeakness_Timer = 20000; + }else CurseOfWeakness_Timer -= diff; + + //CurseOfTongues + if (CurseOfTongues_Timer < diff) + { + //Cast + if (rand()%100 < 3) //3% chance to cast + { + DoCast(m_creature->getVictim(),SPELL_CURSEOFTONGUES); + } + //22 seconds until we should cast this again + CurseOfTongues_Timer = 22000; + }else CurseOfTongues_Timer -= diff; + + //CallOfTheGrave + if (CallOfTheGrave_Timer < diff) + { + //Cast + if (rand()%100 < 5) //5% chance to cast + { + DoCast(m_creature->getVictim(),SPELL_CALLOFTHEGRAVE); + } + //25 seconds until we should cast this again + CallOfTheGrave_Timer = 25000; + }else CallOfTheGrave_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_postmaster_malown(Creature* pCreature) +{ + return new boss_postmaster_malownAI(pCreature); +} + +void AddSC_boss_postmaster_malown() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_postmaster_malown"; + newscript->GetAI = &GetAI_boss_postmaster_malown; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/stratholme/boss_ramstein_the_gorger.cpp b/scripts/eastern_kingdoms/stratholme/boss_ramstein_the_gorger.cpp new file mode 100644 index 000000000..7b2cc6165 --- /dev/null +++ b/scripts/eastern_kingdoms/stratholme/boss_ramstein_the_gorger.cpp @@ -0,0 +1,94 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Ramstein_the_Gorger +SD%Complete: 70 +SDComment: +SDCategory: Stratholme +EndScriptData */ + +#include "precompiled.h" +#include "stratholme.h" + +#define SPELL_TRAMPLE 5568 +#define SPELL_KNOCKOUT 17307 + +#define C_MINDLESS_UNDEAD 11030 + +struct MANGOS_DLL_DECL boss_ramstein_the_gorgerAI : public ScriptedAI +{ + boss_ramstein_the_gorgerAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 Trample_Timer; + uint32 Knockout_Timer; + + void Reset() + { + Trample_Timer = 3000; + Knockout_Timer = 12000; + } + + void JustDied(Unit* Killer) + { + for(uint8 i = 0; i < 30; ++i) + m_creature->SummonCreature(C_MINDLESS_UNDEAD,3969.35,-3391.87,119.11,5.91,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,1800000); + + if (m_pInstance) + m_pInstance->SetData(TYPE_RAMSTEIN,DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Trample + if (Trample_Timer < diff) + { + DoCast(m_creature,SPELL_TRAMPLE); + Trample_Timer = 7000; + }else Trample_Timer -= diff; + + //Knockout + if (Knockout_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_KNOCKOUT); + Knockout_Timer = 10000; + }else Knockout_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_ramstein_the_gorger(Creature* pCreature) +{ + return new boss_ramstein_the_gorgerAI(pCreature); +} + +void AddSC_boss_ramstein_the_gorger() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_ramstein_the_gorger"; + newscript->GetAI = &GetAI_boss_ramstein_the_gorger; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/stratholme/boss_timmy_the_cruel.cpp b/scripts/eastern_kingdoms/stratholme/boss_timmy_the_cruel.cpp new file mode 100644 index 000000000..2585d95e1 --- /dev/null +++ b/scripts/eastern_kingdoms/stratholme/boss_timmy_the_cruel.cpp @@ -0,0 +1,70 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_timmy_the_cruel +SD%Complete: 100 +SDComment: +SDCategory: Stratholme +EndScriptData */ + +#include "precompiled.h" + +#define SAY_SPAWN "TIMMY!" + +#define SPELL_RAVENOUSCLAW 17470 + +struct MANGOS_DLL_DECL boss_timmy_the_cruelAI : public ScriptedAI +{ + boss_timmy_the_cruelAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 RavenousClaw_Timer; + + void Reset() + { + RavenousClaw_Timer = 10000; + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //RavenousClaw + if (RavenousClaw_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_RAVENOUSCLAW); + RavenousClaw_Timer = 15000; + }else RavenousClaw_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_timmy_the_cruel(Creature* pCreature) +{ + return new boss_timmy_the_cruelAI(pCreature); +} + +void AddSC_boss_timmy_the_cruel() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_timmy_the_cruel"; + newscript->GetAI = &GetAI_boss_timmy_the_cruel; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp b/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp new file mode 100644 index 000000000..36e2dde00 --- /dev/null +++ b/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp @@ -0,0 +1,393 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance_Stratholme +SD%Complete: 50 +SDComment: In progress. Undead side 75% implemented. Save/load not implemented. +SDCategory: Stratholme +EndScriptData */ + +#include "precompiled.h" +#include "stratholme.h" + +enum +{ + MAX_ENCOUNTER = 6, + + GO_SERVICE_ENTRANCE = 175368, + GO_GAUNTLET_GATE1 = 175357, + GO_ZIGGURAT1 = 175380, //baroness + GO_ZIGGURAT2 = 175379, //nerub'enkan + GO_ZIGGURAT3 = 175381, //maleki + GO_ZIGGURAT4 = 175405, //rammstein + GO_ZIGGURAT5 = 175796, //baron + GO_PORT_GAUNTLET = 175374, //port from gauntlet to slaugther + GO_PORT_SLAUGTHER = 175373, //port at slaugther + GO_PORT_ELDERS = 175377, //port at elders square + + NPC_CRYSTAL = 10415, //three ziggurat crystals + NPC_BARON = 10440, + NPC_YSIDA_TRIGGER = 16100, + + NPC_RAMSTEIN = 10439, + NPC_ABOM_BILE = 10416, + NPC_ABOM_VENOM = 10417, + NPC_BLACK_GUARD = 10394, + NPC_YSIDA = 16031 +}; + +struct MANGOS_DLL_DECL instance_stratholme : public ScriptedInstance +{ + instance_stratholme(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + bool IsSilverHandDead[5]; + + uint32 m_uiBaronRun_Timer; + uint32 m_uiSlaugtherSquare_Timer; + + uint64 m_uiServiceEntranceGUID; + uint64 m_uiGauntletGate1GUID; + uint64 m_uiZiggurat1GUID; + uint64 m_uiZiggurat2GUID; + uint64 m_uiZiggurat3GUID; + uint64 m_uiZiggurat4GUID; + uint64 m_uiZiggurat5GUID; + uint64 m_uiPortGauntletGUID; + uint64 m_uiPortSlaugtherGUID; + uint64 m_uiPortElderGUID; + + uint64 m_uiBaronGUID; + uint64 m_uiYsidaTriggerGUID; + std::set crystalsGUID; + std::set abomnationGUID; + + void Initialize() + { + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + + for(uint8 i = 0; i < 5; ++i) + IsSilverHandDead[i] = false; + + m_uiBaronRun_Timer = 0; + m_uiSlaugtherSquare_Timer = 0; + + m_uiServiceEntranceGUID = 0; + m_uiGauntletGate1GUID = 0; + m_uiZiggurat1GUID = 0; + m_uiZiggurat2GUID = 0; + m_uiZiggurat3GUID = 0; + m_uiZiggurat4GUID = 0; + m_uiZiggurat5GUID = 0; + m_uiPortGauntletGUID = 0; + m_uiPortSlaugtherGUID = 0; + m_uiPortElderGUID = 0; + + m_uiBaronGUID = 0; + m_uiYsidaTriggerGUID = 0; + + crystalsGUID.clear(); + abomnationGUID.clear(); + } + + bool IsEncounterInProgress() const + { + for(uint8 i = 0; i < MAX_ENCOUNTER; i++) + if (m_auiEncounter[i] == IN_PROGRESS) + return true; + return false; + } + + bool StartSlaugtherSquare() + { + //change to DONE when crystals implemented + if (m_auiEncounter[1] == IN_PROGRESS && m_auiEncounter[2] == IN_PROGRESS && m_auiEncounter[3] == IN_PROGRESS) + { + UpdateGoState(m_uiPortGauntletGUID,0,false); + UpdateGoState(m_uiPortSlaugtherGUID,0,false); + return true; + } + + debug_log("SD2: Instance Stratholme: Cannot open slaugther square yet."); + return false; + } + + //if withRestoreTime true, then newState will be ignored and GO should be restored to original state after 10 seconds + void UpdateGoState(uint64 goGuid, uint32 newState, bool withRestoreTime) + { + if (!goGuid) + return; + + if (GameObject* pGo = instance->GetGameObject(goGuid)) + { + if (withRestoreTime) + pGo->UseDoorOrButton(10); + else + pGo->SetGoState(GOState(newState)); + } + } + + void OnCreatureCreate(Creature* pCreature) + { + switch(pCreature->GetEntry()) + { + case NPC_BARON: m_uiBaronGUID = pCreature->GetGUID(); break; + case NPC_YSIDA_TRIGGER: m_uiYsidaTriggerGUID = pCreature->GetGUID(); break; + case NPC_CRYSTAL: crystalsGUID.insert(pCreature->GetGUID()); break; + case NPC_ABOM_BILE: + case NPC_ABOM_VENOM: abomnationGUID.insert(pCreature->GetGUID()); break; + } + } + + void OnObjectCreate(GameObject* pGo) + { + switch(pGo->GetEntry()) + { + case GO_SERVICE_ENTRANCE: m_uiServiceEntranceGUID = pGo->GetGUID(); break; + case GO_GAUNTLET_GATE1: + //weird, but unless flag is set, client will not respond as expected. DB bug? + pGo->SetFlag(GAMEOBJECT_FLAGS,GO_FLAG_LOCKED); + m_uiGauntletGate1GUID = pGo->GetGUID(); + break; + case GO_ZIGGURAT1: m_uiZiggurat1GUID = pGo->GetGUID(); break; + case GO_ZIGGURAT2: m_uiZiggurat2GUID = pGo->GetGUID(); break; + case GO_ZIGGURAT3: m_uiZiggurat3GUID = pGo->GetGUID(); break; + case GO_ZIGGURAT4: m_uiZiggurat4GUID = pGo->GetGUID(); break; + case GO_ZIGGURAT5: m_uiZiggurat5GUID = pGo->GetGUID(); break; + case GO_PORT_GAUNTLET: m_uiPortGauntletGUID = pGo->GetGUID(); break; + case GO_PORT_SLAUGTHER: m_uiPortSlaugtherGUID = pGo->GetGUID(); break; + case GO_PORT_ELDERS: m_uiPortElderGUID = pGo->GetGUID(); break; + } + } + + void SetData(uint32 uiType, uint32 uiData) + { + switch(uiType) + { + case TYPE_BARON_RUN: + switch(uiData) + { + case IN_PROGRESS: + if (m_auiEncounter[0] == IN_PROGRESS || m_auiEncounter[0] == FAIL) + break; + m_uiBaronRun_Timer = 2700000; + debug_log("SD2: Instance Stratholme: Baron run in progress."); + break; + case FAIL: + //may add code to remove aura from players, but in theory the time should be up already and removed. + break; + case DONE: + if (Creature* pYsidaT = instance->GetCreature(m_uiYsidaTriggerGUID)) + pYsidaT->SummonCreature(NPC_YSIDA, + pYsidaT->GetPositionX(),pYsidaT->GetPositionY(),pYsidaT->GetPositionZ(),pYsidaT->GetOrientation(), + TEMPSUMMON_TIMED_DESPAWN,1800000); + + m_uiBaronRun_Timer = 0; + break; + } + m_auiEncounter[0] = uiData; + break; + case TYPE_BARONESS: + m_auiEncounter[1] = uiData; + if (uiData == IN_PROGRESS) + UpdateGoState(m_uiZiggurat1GUID,GO_STATE_ACTIVE,false); + if (uiData == IN_PROGRESS) //change to DONE when crystals implemented + StartSlaugtherSquare(); + break; + case TYPE_NERUB: + m_auiEncounter[2] = uiData; + if (uiData == IN_PROGRESS) + UpdateGoState(m_uiZiggurat2GUID,GO_STATE_ACTIVE,false); + if (uiData == IN_PROGRESS) //change to DONE when crystals implemented + StartSlaugtherSquare(); + break; + case TYPE_PALLID: + m_auiEncounter[3] = uiData; + if (uiData == IN_PROGRESS) + UpdateGoState(m_uiZiggurat3GUID,GO_STATE_ACTIVE,false); + if (uiData == IN_PROGRESS) //change to DONE when crystals implemented + StartSlaugtherSquare(); + break; + case TYPE_RAMSTEIN: + if (uiData == IN_PROGRESS) + { + if (m_auiEncounter[4] != IN_PROGRESS) + UpdateGoState(m_uiPortGauntletGUID,GO_STATE_READY,false); + + uint32 uiCount = abomnationGUID.size(); + for(std::set::iterator i = abomnationGUID.begin(); i != abomnationGUID.end(); ++i) + { + if (Creature* pAbom = instance->GetCreature(*i)) + { + if (!pAbom->isAlive()) + --uiCount; + } + } + + if (!uiCount) + { + //a bit itchy, it should close the door after 10 secs, but it doesn't. skipping it for now. + //UpdateGoState(ziggurat4GUID,0,true); + + if (Creature* pBaron = instance->GetCreature(m_uiBaronGUID)) + pBaron->SummonCreature(NPC_RAMSTEIN,4032.84,-3390.24,119.73,4.71,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,1800000); + + debug_log("SD2: Instance Stratholme: Ramstein spawned."); + } + else + debug_log("SD2: Instance Stratholme: %u Abomnation left to kill.", uiCount); + } + if (uiData == DONE) + { + m_uiSlaugtherSquare_Timer = 300000; + debug_log("SD2: Instance Stratholme: Slaugther event will continue in 5 minutes."); + } + m_auiEncounter[4] = uiData; + break; + case TYPE_BARON: + if (uiData == IN_PROGRESS) + { + if (GetData(TYPE_BARON_RUN) == IN_PROGRESS) + { + Map::PlayerList const& players = instance->GetPlayers(); + + if (!players.isEmpty()) + { + for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) + { + if (Player* pPlayer = itr->getSource()) + { + if (pPlayer->HasAura(SPELL_BARON_ULTIMATUM)) + pPlayer->RemoveAurasDueToSpell(SPELL_BARON_ULTIMATUM); + + if (pPlayer->GetQuestStatus(QUEST_DEAD_MAN_PLEA) == QUEST_STATUS_INCOMPLETE) + pPlayer->AreaExploredOrEventHappens(QUEST_DEAD_MAN_PLEA); + } + } + } + + SetData(TYPE_BARON_RUN,DONE); + } + } + m_auiEncounter[5] = uiData; + break; + + case TYPE_SH_AELMAR: + IsSilverHandDead[0] = (uiData) ? true : false; + break; + case TYPE_SH_CATHELA: + IsSilverHandDead[1] = (uiData) ? true : false; + break; + case TYPE_SH_GREGOR: + IsSilverHandDead[2] = (uiData) ? true : false; + break; + case TYPE_SH_NEMAS: + IsSilverHandDead[3] = (uiData) ? true : false; + break; + case TYPE_SH_VICAR: + IsSilverHandDead[4] = (uiData) ? true : false; + break; + } + } + + uint32 GetData(uint32 uiType) + { + switch(uiType) + { + case TYPE_SH_QUEST: + if (IsSilverHandDead[0] && IsSilverHandDead[1] && IsSilverHandDead[2] && IsSilverHandDead[3] && IsSilverHandDead[4]) + return 1; + return 0; + case TYPE_BARON_RUN: + return m_auiEncounter[0]; + case TYPE_BARONESS: + return m_auiEncounter[1]; + case TYPE_NERUB: + return m_auiEncounter[2]; + case TYPE_PALLID: + return m_auiEncounter[3]; + case TYPE_RAMSTEIN: + return m_auiEncounter[4]; + case TYPE_BARON: + return m_auiEncounter[5]; + } + return 0; + } + + uint64 GetData64(uint32 uiData) + { + switch(uiData) + { + case DATA_BARON: + return m_uiBaronGUID; + case DATA_YSIDA_TRIGGER: + return m_uiYsidaTriggerGUID; + } + return 0; + } + + void Update(uint32 uiDiff) + { + if (m_uiBaronRun_Timer) + { + if (m_uiBaronRun_Timer <= uiDiff) + { + if (GetData(TYPE_BARON_RUN) != DONE) + SetData(TYPE_BARON_RUN, FAIL); + + m_uiBaronRun_Timer = 0; + debug_log("SD2: Instance Stratholme: Baron run event reached end. Event has state %u.",GetData(TYPE_BARON_RUN)); + } + else + m_uiBaronRun_Timer -= uiDiff; + } + + if (m_uiSlaugtherSquare_Timer) + { + if (m_uiSlaugtherSquare_Timer <= uiDiff) + { + if (Creature* pBaron = instance->GetCreature(m_uiBaronGUID)) + { + for(uint8 i = 0; i < 4; ++i) + pBaron->SummonCreature(NPC_BLACK_GUARD,4032.84,-3390.24,119.73,4.71,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,1800000); + + UpdateGoState(m_uiZiggurat4GUID,GO_STATE_ACTIVE,false); + UpdateGoState(m_uiZiggurat5GUID,GO_STATE_ACTIVE,false); + + debug_log("SD2: Instance Stratholme: Black guard sentries spawned. Opening gates to baron."); + } + m_uiSlaugtherSquare_Timer = 0; + } + else + m_uiSlaugtherSquare_Timer -= uiDiff; + } + } +}; + +InstanceData* GetInstanceData_instance_stratholme(Map* pMap) +{ + return new instance_stratholme(pMap); +} + +void AddSC_instance_stratholme() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "instance_stratholme"; + newscript->GetInstanceData = &GetInstanceData_instance_stratholme; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/stratholme/stratholme.cpp b/scripts/eastern_kingdoms/stratholme/stratholme.cpp new file mode 100644 index 000000000..8c07cd436 --- /dev/null +++ b/scripts/eastern_kingdoms/stratholme/stratholme.cpp @@ -0,0 +1,283 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Stratholme +SD%Complete: 100 +SDComment: Misc mobs for instance. GO-script to apply aura and start event for quest 8945 +SDCategory: Stratholme +EndScriptData */ + +/* ContentData +go_gauntlet_gate +mob_freed_soul +mob_restless_soul +mobs_spectral_ghostly_citizen +EndContentData */ + +#include "precompiled.h" +#include "stratholme.h" + +/*###### +## go_gauntlet_gate (this is the _first_ of the gauntlet gates, two exist) +######*/ + +bool GOHello_go_gauntlet_gate(Player* pPlayer, GameObject* pGo) +{ + ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData(); + + if (!pInstance) + return false; + + if (pInstance->GetData(TYPE_BARON_RUN) != NOT_STARTED) + return false; + + if (Group *pGroup = pPlayer->GetGroup()) + { + for(GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) + { + Player* pGroupie = itr->getSource(); + if (!pGroupie) + continue; + + if (pGroupie->GetQuestStatus(QUEST_DEAD_MAN_PLEA) == QUEST_STATUS_INCOMPLETE && + !pGroupie->HasAura(SPELL_BARON_ULTIMATUM,0) && + pGroupie->GetMap() == pGo->GetMap()) + pGroupie->CastSpell(pGroupie,SPELL_BARON_ULTIMATUM,true); + } + } else if (pPlayer->GetQuestStatus(QUEST_DEAD_MAN_PLEA) == QUEST_STATUS_INCOMPLETE && + !pPlayer->HasAura(SPELL_BARON_ULTIMATUM,0) && + pPlayer->GetMap() == pGo->GetMap()) + pPlayer->CastSpell(pPlayer,SPELL_BARON_ULTIMATUM,true); + + pInstance->SetData(TYPE_BARON_RUN,IN_PROGRESS); + return false; +} + +/*###### +## 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 + +struct MANGOS_DLL_DECL mob_freed_soulAI : public ScriptedAI +{ + mob_freed_soulAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + void Reset() + { + switch(urand(0, 3)) + { + case 0: DoScriptText(SAY_ZAPPED0, m_creature); break; + case 1: DoScriptText(SAY_ZAPPED1, m_creature); break; + case 2: DoScriptText(SAY_ZAPPED2, m_creature); break; + case 3: DoScriptText(SAY_ZAPPED3, m_creature); break; + } + } +}; + +CreatureAI* GetAI_mob_freed_soul(Creature* pCreature) +{ + return new mob_freed_soulAI(pCreature); +} + +/*###### +## mob_restless_soul +######*/ + +#define SPELL_EGAN_BLASTER 17368 +#define SPELL_SOUL_FREED 17370 +#define QUEST_RESTLESS_SOUL 5282 +#define ENTRY_RESTLESS 11122 +#define ENTRY_FREED 11136 + +struct MANGOS_DLL_DECL mob_restless_soulAI : public ScriptedAI +{ + mob_restless_soulAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint64 Tagger; + uint32 Die_Timer; + bool Tagged; + + void Reset() + { + Tagger = 0; + Die_Timer = 5000; + Tagged = false; + } + + void SpellHit(Unit *caster, const SpellEntry *spell) + { + if (caster->GetTypeId() == TYPEID_PLAYER) + { + if (!Tagged && spell->Id == SPELL_EGAN_BLASTER && ((Player*)caster)->GetQuestStatus(QUEST_RESTLESS_SOUL) == QUEST_STATUS_INCOMPLETE) + { + Tagged = true; + Tagger = caster->GetGUID(); + } + } + } + + void JustSummoned(Creature *summoned) + { + summoned->CastSpell(summoned,SPELL_SOUL_FREED,false); + } + + void JustDied(Unit* Killer) + { + if (Tagged) + m_creature->SummonCreature(ENTRY_FREED, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 300000); + } + + void UpdateAI(const uint32 diff) + { + if (Tagged) + { + if (Die_Timer < diff) + { + if (Unit* temp = Unit::GetUnit(*m_creature,Tagger)) + temp->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + }else Die_Timer -= diff; + } + } +}; + +CreatureAI* GetAI_mob_restless_soul(Creature* pCreature) +{ + return new mob_restless_soulAI(pCreature); +} + +/*###### +## mobs_spectral_ghostly_citizen +######*/ + +enum +{ + SPELL_HAUNTING_PHANTOM = 16336, + SPELL_SLAP = 6754 +}; + +struct MANGOS_DLL_DECL mobs_spectral_ghostly_citizenAI : public ScriptedAI +{ + mobs_spectral_ghostly_citizenAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 Die_Timer; + bool Tagged; + + void Reset() + { + Die_Timer = 5000; + Tagged = false; + } + + void SpellHit(Unit *caster, const SpellEntry *spell) + { + if (!Tagged && spell->Id == SPELL_EGAN_BLASTER) + Tagged = true; + } + + void JustDied(Unit* Killer) + { + if (Tagged) + { + for(uint32 i = 1; i <= 4; ++i) + { + float x,y,z; + m_creature->GetRandomPoint(m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ(),20.0f,x,y,z); + + //100%, 50%, 33%, 25% chance to spawn + uint32 j = urand(1,i); + if (j==1) + m_creature->SummonCreature(ENTRY_RESTLESS,x,y,z,0,TEMPSUMMON_CORPSE_DESPAWN,600000); + } + } + } + + void UpdateAI(const uint32 diff) + { + if (Tagged) + { + if (Die_Timer < diff) + { + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + }else Die_Timer -= diff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } + + void ReceiveEmote(Player* pPlayer, uint32 emote) + { + switch(emote) + { + case TEXTEMOTE_DANCE: + EnterEvadeMode(); + break; + case TEXTEMOTE_RUDE: + if (m_creature->IsWithinDistInMap(pPlayer, ATTACK_DISTANCE)) + m_creature->CastSpell(pPlayer,SPELL_SLAP,false); + else + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_RUDE); + break; + case TEXTEMOTE_WAVE: + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_WAVE); + break; + case TEXTEMOTE_BOW: + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_BOW); + break; + case TEXTEMOTE_KISS: + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_FLEX); + break; + } + } +}; + +CreatureAI* GetAI_mobs_spectral_ghostly_citizen(Creature* pCreature) +{ + return new mobs_spectral_ghostly_citizenAI(pCreature); +} + +void AddSC_stratholme() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "go_gauntlet_gate"; + newscript->pGOHello = &GOHello_go_gauntlet_gate; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_freed_soul"; + newscript->GetAI = &GetAI_mob_freed_soul; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_restless_soul"; + newscript->GetAI = &GetAI_mob_restless_soul; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mobs_spectral_ghostly_citizen"; + newscript->GetAI = &GetAI_mobs_spectral_ghostly_citizen; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/stratholme/stratholme.h b/scripts/eastern_kingdoms/stratholme/stratholme.h new file mode 100644 index 000000000..3684ab9c9 --- /dev/null +++ b/scripts/eastern_kingdoms/stratholme/stratholme.h @@ -0,0 +1,27 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 +* This program is free software licensed under GPL version 2 +* Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_STRATHOLME_H +#define DEF_STRATHOLME_H + +#define TYPE_BARON_RUN 1 +#define TYPE_BARONESS 2 +#define TYPE_NERUB 3 +#define TYPE_PALLID 4 +#define TYPE_RAMSTEIN 5 +#define TYPE_BARON 6 + +#define DATA_BARON 10 +#define DATA_YSIDA_TRIGGER 11 + +#define TYPE_SH_QUEST 20 +#define TYPE_SH_CATHELA 21 +#define TYPE_SH_GREGOR 22 +#define TYPE_SH_NEMAS 23 +#define TYPE_SH_VICAR 24 +#define TYPE_SH_AELMAR 25 + +#define QUEST_DEAD_MAN_PLEA 8945 +#define SPELL_BARON_ULTIMATUM 27861 +#endif diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp new file mode 100644 index 000000000..e6e6ee644 --- /dev/null +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp @@ -0,0 +1,219 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Brutallus +SD%Complete: 50 +SDComment: Intro not made. Script for Madrigosa to be added here. +SDCategory: Sunwell Plateau +EndScriptData */ + +#include "precompiled.h" +#include "sunwell_plateau.h" + +enum Brutallus +{ + YELL_INTRO = -1580017, + YELL_INTRO_BREAK_ICE = -1580018, + YELL_INTRO_CHARGE = -1580019, + YELL_INTRO_KILL_MADRIGOSA = -1580020, + YELL_INTRO_TAUNT = -1580021, + + YELL_MADR_ICE_BARRIER = -1580031, + YELL_MADR_INTRO = -1580032, + YELL_MADR_ICE_BLOCK = -1580033, + YELL_MADR_TRAP = -1580034, + YELL_MADR_DEATH = -1580035, + + YELL_AGGRO = -1580022, + YELL_KILL1 = -1580023, + YELL_KILL2 = -1580024, + YELL_KILL3 = -1580025, + YELL_LOVE1 = -1580026, + YELL_LOVE2 = -1580027, + YELL_LOVE3 = -1580028, + YELL_BERSERK = -1580029, + YELL_DEATH = -1580030, + + SPELL_METEOR_SLASH = 45150, + SPELL_BURN = 45141, + SPELL_BURN_AURA_EFFECT = 46394, + SPELL_STOMP = 45185, + SPELL_BERSERK = 26662 +}; + +struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI +{ + boss_brutallusAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 m_uiSlashTimer; + uint32 m_uiBurnTimer; + uint32 m_uiStompTimer; + uint32 m_uiBerserkTimer; + uint32 m_uiLoveTimer; + + void Reset() + { + m_uiSlashTimer = 11000; + m_uiStompTimer = 30000; + m_uiBurnTimer = 60000; + m_uiBerserkTimer = 360000; + m_uiLoveTimer = urand(10000, 17000); + + //TODO: correct me when pre-event implemented + if (m_pInstance) + m_pInstance->SetData(TYPE_BRUTALLUS, NOT_STARTED); + } + + void Aggro(Unit* pWho) + { + DoScriptText(YELL_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_BRUTALLUS, IN_PROGRESS); + } + + void KilledUnit(Unit* pVictim) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(YELL_KILL1, m_creature); break; + case 1: DoScriptText(YELL_KILL2, m_creature); break; + case 2: DoScriptText(YELL_KILL3, m_creature); break; + } + } + + void JustDied(Unit* pKiller) + { + DoScriptText(YELL_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_BRUTALLUS, DONE); + } + + void SpellHitTarget(Unit* pCaster, const SpellEntry* pSpell) + { + if (pSpell->Id == SPELL_BURN) + pCaster->CastSpell(pCaster, SPELL_BURN_AURA_EFFECT, true, NULL, NULL, m_creature->GetGUID()); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiLoveTimer < uiDiff) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(YELL_LOVE1, m_creature); break; + case 1: DoScriptText(YELL_LOVE2, m_creature); break; + case 2: DoScriptText(YELL_LOVE3, m_creature); break; + } + m_uiLoveTimer = urand(15000, 23000); + } + else + m_uiLoveTimer -= uiDiff; + + if (m_uiSlashTimer < uiDiff) + { + DoCast(m_creature->getVictim(),SPELL_METEOR_SLASH); + m_uiSlashTimer = 11000; + } + else + m_uiSlashTimer -= uiDiff; + + if (m_uiStompTimer < uiDiff) + { + if (Unit* pTarget = m_creature->getVictim()) + { + DoCast(pTarget,SPELL_STOMP); + + if (pTarget->HasAura(SPELL_BURN_AURA_EFFECT,0)) + pTarget->RemoveAurasDueToSpell(SPELL_BURN_AURA_EFFECT); + } + + m_uiStompTimer = 30000; + } + else + m_uiStompTimer -= uiDiff; + + if (m_uiBurnTimer < uiDiff) + { + //returns any unit + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + { + //so we get owner, in case unit was pet/totem/etc + if (Player* pPlayer = pTarget->GetCharmerOrOwnerPlayerOrPlayerItself()) + DoCast(pPlayer, SPELL_BURN); + } + + m_uiBurnTimer = 60000; + } + else + m_uiBurnTimer -= uiDiff; + + if (m_uiBerserkTimer < uiDiff) + { + DoScriptText(YELL_BERSERK, m_creature); + DoCast(m_creature,SPELL_BERSERK); + m_uiBerserkTimer = 20000; + } + else + m_uiBerserkTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_brutallus(Creature* pCreature) +{ + return new boss_brutallusAI(pCreature); +} + +bool AreaTrigger_at_madrigosa(Player* pPlayer, AreaTriggerEntry* pAt) +{ + if (ScriptedInstance* pInstance = (ScriptedInstance*)pPlayer->GetInstanceData()) + { + //this simply set encounter state, and trigger ice barrier become active + //bosses can start pre-event based on this new state + if (pInstance->GetData(TYPE_BRUTALLUS) == NOT_STARTED) + pInstance->SetData(TYPE_BRUTALLUS, SPECIAL); + } + + return false; +} + +void AddSC_boss_brutallus() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_brutallus"; + newscript->GetAI = &GetAI_boss_brutallus; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "at_madrigosa"; + newscript->pAreaTrigger = &AreaTrigger_at_madrigosa; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp new file mode 100644 index 000000000..6dd078266 --- /dev/null +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp @@ -0,0 +1,608 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Kalecgos +SD%Complete: 40 +SDComment: Script must be considered not complete. +SDCategory: Sunwell Plateau +EndScriptData */ + +#include "precompiled.h" +#include "sunwell_plateau.h" + +enum KalecgosEncounter +{ + //kalecgos dragon form + SAY_EVIL_AGGRO = -1580000, + SAY_EVIL_SPELL1 = -1580001, + SAY_EVIL_SPELL2 = -1580002, + SAY_EVIL_SLAY1 = -1580003, + SAY_EVIL_SLAY2 = -1580004, + SAY_EVIL_ENRAGE = -1580005, + + //kalecgos humanoid form + SAY_GOOD_AGGRO = -1580006, + SAY_GOOD_NEAR_DEATH = -1580007, + SAY_GOOD_NEAR_DEATH2 = -1580008, + SAY_GOOD_PLRWIN = -1580009, + + SAY_SATH_AGGRO = -1580010, + SAY_SATH_DEATH = -1580011, + SAY_SATH_SPELL1 = -1580012, + SAY_SATH_SPELL2 = -1580013, + SAY_SATH_SLAY1 = -1580014, + SAY_SATH_SLAY2 = -1580015, + SAY_SATH_ENRAGE = -1580016, + + //Kalecgos + SPELL_SPECTRAL_BLAST_DUMMY = 44869, + SPELL_SPECTRAL_BLAST = 44866, + + SPELL_ARCANE_BUFFET = 45018, + SPELL_FROST_BREATH = 44799, + SPELL_HEROIC_STRIKE = 45026, + SPELL_REVITALIZE = 45027, + SPELL_TAIL_LASH = 45122, + SPELL_TRANSFORM_KALEC = 45027, + SPELL_CRAZED_RAGE = 44806, + + //Sathrovarr + SPELL_SPECTRAL_INVIS = 44801, + SPELL_CORRUPTING_STRIKE = 45029, + SPELL_CURSE_OF_BOUNDLESS_AGONY = 45032, + SPELL_SHADOW_BOLT_VOLLEY = 45031, + + //Misc + SPELL_BANISH = 44836 +}; + +uint32 WildMagic[]= { 44978, 45001, 45002, 45004, 45006, 45010 }; + +const float KALECGOS_ARENA[3] = { 1704.34f, 928.17f, 53.08f }; + +//#define NOTIFY_SPECTRALLY_EXHAUSTED "Your body is too exhausted to travel to the Spectral Realm." + +struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI +{ + boss_kalecgosAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + + /*if (pCreature->getFaction() != 14) + { + error_db_log("SD2: creature entry %u has faction %u but spellId %u requires different.", pCreature->GetEntry(), pCreature->getFaction(), SPELL_SPECTRAL_REALM_FORCE_FACTION); + pCreature->setFaction(14); + }*/ + + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 m_uiArcaneBuffetTimer; + uint32 m_uiFrostBreathTimer; + uint32 m_uiWildMagicTimer; + uint32 m_uiSpectralBlastTimer; + uint32 m_uiExitTimer; + + bool m_bUncorrupted; + bool m_bBanished; + bool m_bChecked; + bool m_bEnraged; + bool m_bHasSpectralTarget; + + void Reset() + { + m_uiArcaneBuffetTimer = 8000; + m_uiFrostBreathTimer = 24000; + m_uiWildMagicTimer = 18000; + m_uiSpectralBlastTimer = 30000; + + m_uiExitTimer = 0; + + m_bUncorrupted = false; + m_bBanished = false; + m_bChecked = false; + m_bEnraged = false; + m_bHasSpectralTarget = false; + } + + void JustReachedHome() + { + if (m_pInstance) + { + // Reset Sathrovarr too + if (Creature* pSath = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_SATHROVARR))) + { + if (pSath->isAlive() && pSath->getVictim()) + pSath->AI()->EnterEvadeMode(); + } + + m_pInstance->SetData(TYPE_KALECGOS, NOT_STARTED); + } + } + + void Aggro(Unit* who) + { + DoScriptText(SAY_EVIL_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_KALECGOS, IN_PROGRESS); + } + + void DamageTaken(Unit* done_by, uint32 &damage) + { + if (damage >= m_creature->GetHealth() && done_by != m_creature) + { + if (!m_bUncorrupted) + { + damage = 0; + m_bBanished = true; + DoCast(m_creature, SPELL_BANISH, true); + m_creature->GetMotionMaster()->MoveIdle(); + } + else + { + damage = 0; + BeginOutro(); + } + } + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(urand(0, 1) ? SAY_EVIL_SLAY1 : SAY_EVIL_SLAY2, m_creature); + } + + void SendToInnerVeil(Unit* pTarget) + { + if (m_pInstance) + { + //just a hack for not implemented spell effect 144 + ((Player*)pTarget)->TeleportTo(pTarget->GetMapId(), pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ()-125.0f, pTarget->GetOrientation()); + + pTarget->CastSpell(pTarget, SPELL_SPECTRAL_REALM_FORCE_FACTION, true); + pTarget->CastSpell(pTarget, SPELL_SPECTRAL_REALM, true); + + m_pInstance->SetData64(DATA_PLAYER_SPECTRAL_REALM, pTarget->GetGUID()); + } + } + + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) + { + if (pSpell->Id == SPELL_SPECTRAL_BLAST_DUMMY && !m_bHasSpectralTarget) + { + if (pTarget->GetTypeId() != TYPEID_PLAYER) + return; + + if (pTarget->HasAura(SPELL_SPECTRAL_EXHAUSTION,0) || pTarget->HasAura(SPELL_SPECTRAL_REALM)) + return; + + if (pTarget == m_creature->getVictim()) + return; + + m_bHasSpectralTarget = true; + pTarget->CastSpell(pTarget, SPELL_SPECTRAL_BLAST, true); + + SendToInnerVeil(pTarget); + } + } + + void BeginOutro() + { + debug_log("SD2: KALEC: Beginning Outro"); + + if (!m_pInstance) + return; + + if (Creature* pSathrovarr = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_SATHROVARR))) + { + pSathrovarr->DealDamage(pSathrovarr, pSathrovarr->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + + pSathrovarr->GetMap()->CreatureRelocation(pSathrovarr, KALECGOS_ARENA[0], KALECGOS_ARENA[1], KALECGOS_ARENA[2], 0.0f); + pSathrovarr->SendMonsterMove(KALECGOS_ARENA[0], KALECGOS_ARENA[1], KALECGOS_ARENA[2], 0, MONSTER_MOVE_NONE, 0); + } + + if (Creature* pKalec = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_KALECGOS_HUMAN))) + { + pKalec->DeleteThreatList(); + pKalec->SetVisibility(VISIBILITY_OFF); + } + + m_creature->GetMotionMaster()->MoveIdle(); + m_creature->setFaction(35); + DoScriptText(SAY_GOOD_PLRWIN, m_creature); + m_uiExitTimer = 1000; + } + + void MovementInform(uint32 type, uint32 id) + { + if (type != POINT_MOTION_TYPE) + return; + + if (id) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_KALECGOS, DONE); + + m_creature->SetVisibility(VISIBILITY_OFF); + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->getVictim() || !m_creature->SelectHostileTarget() || m_bBanished) + return; + + if (!m_bEnraged && ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 10)) + { + if (Unit* pSathrovarr = Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_SATHROVARR))) + pSathrovarr->CastSpell(pSathrovarr, SPELL_CRAZED_RAGE, true); + + DoCast(m_creature, SPELL_CRAZED_RAGE, true); + m_bEnraged = true; + } + + if (!m_bChecked && ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 1)) + { + m_bChecked = true; + + if (!m_bUncorrupted) + { + m_bBanished = true; + DoCast(m_creature, SPELL_BANISH, true); + m_creature->GetMotionMaster()->MoveIdle(); + } + else + BeginOutro(); + } + + if (m_uiExitTimer) + { + if (m_uiExitTimer <= diff) + { + debug_log("SD2: KALEC: Exiting the arena"); + + float x, y, z; + m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 30, x, y, z); + + z = 70.0f; + + m_creature->GetMotionMaster()->MovePoint(1, x, y, z); + m_uiExitTimer = 0; + }else m_uiExitTimer -= diff; + } + + if (m_uiArcaneBuffetTimer < diff) + { + if (!urand(0, 2)) + DoScriptText(SAY_EVIL_SPELL1, m_creature); + + DoCast(m_creature->getVictim(), SPELL_ARCANE_BUFFET); + m_uiArcaneBuffetTimer = 20000; + } + else + m_uiArcaneBuffetTimer -= diff; + + if (m_uiFrostBreathTimer < diff) + { + if (!urand(0, 1)) + DoScriptText(SAY_EVIL_SPELL2, m_creature); + + DoCast(m_creature->getVictim(), SPELL_FROST_BREATH); + m_uiFrostBreathTimer = 25000; + } + else + m_uiFrostBreathTimer -= diff; + + if (m_uiWildMagicTimer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(target, WildMagic[rand()%6]); + + m_uiWildMagicTimer = 19000; + } + else + m_uiWildMagicTimer -= diff; + + if (m_uiSpectralBlastTimer < diff) + { + m_bHasSpectralTarget = false; + m_creature->CastSpell(m_creature, SPELL_SPECTRAL_BLAST_DUMMY, false); + m_uiSpectralBlastTimer = 30000; + } + else + m_uiSpectralBlastTimer -= diff; + + if (!m_bBanished) + DoMeleeAttackIfReady(); + } +}; + +struct MANGOS_DLL_DECL boss_sathrovarrAI : public ScriptedAI +{ + boss_sathrovarrAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 CorruptingStrikeTimer; + uint32 CurseOfBoundlessAgonyTimer; + uint32 ShadowBoltVolleyTimer; + bool m_bBanished; + bool m_bEnraged; + + void Reset() + { + // FIXME: Timers + CorruptingStrikeTimer = 5000; + CurseOfBoundlessAgonyTimer = 15000; + ShadowBoltVolleyTimer = 10000; + + m_bBanished = false; + m_bEnraged = false; + + m_creature->CastSpell(m_creature, SPELL_SPECTRAL_INVIS, true); + } + + void Aggro(Unit* who) + { + DoScriptText(SAY_SATH_AGGRO, m_creature); + + if (!m_pInstance) + return; + + if (Unit* pKalec = Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_KALECGOS_HUMAN))) + { + m_creature->AddThreat(pKalec, 10000000.0f); + pKalec->AddThreat(m_creature, 10000000.0f); + } + } + + void DamageTaken(Unit* done_by, uint32 &damage) + { + if (damage > m_creature->GetHealth()) + { + damage = 0; + DoCast(m_creature, SPELL_BANISH, true); + m_bBanished = true; + + DoScriptText(SAY_SATH_DEATH, m_creature); + + if (!m_pInstance) + return; + + m_pInstance->SetData(DATA_SET_SPECTRAL_CHECK, 5000); + + if (Creature* pKalecgos = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_KALECGOS_DRAGON))) + { + ((boss_kalecgosAI*)pKalecgos->AI())->m_bChecked = false; + ((boss_kalecgosAI*)pKalecgos->AI())->m_bUncorrupted = true; + } + } + } + + void KilledUnit(Unit* victim) + { + DoScriptText(urand(0, 1) ? SAY_SATH_SLAY1 : SAY_SATH_SLAY2, m_creature); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->getVictim() || !m_creature->SelectHostileTarget() || m_bBanished) + return; + + if (!m_bEnraged && ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) <= 10)) + { + if (Unit* pKalecgos = Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_KALECGOS_DRAGON))) + pKalecgos->CastSpell(pKalecgos, SPELL_CRAZED_RAGE, true); + + DoCast(m_creature, SPELL_CRAZED_RAGE, true); + m_bEnraged = true; + } + + if (CorruptingStrikeTimer < diff) + { + if (!urand(0, 1)) + DoScriptText(SAY_SATH_SPELL2, m_creature); + + DoCast(m_creature->getVictim(), SPELL_CORRUPTING_STRIKE); + CorruptingStrikeTimer = 13000; + }else CorruptingStrikeTimer -= diff; + + if (CurseOfBoundlessAgonyTimer < diff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, SPELL_CURSE_OF_BOUNDLESS_AGONY); + + CurseOfBoundlessAgonyTimer = 35000; + }else CurseOfBoundlessAgonyTimer -= diff; + + if (ShadowBoltVolleyTimer < diff) + { + if (!urand(0, 1)) + DoScriptText(SAY_SATH_SPELL1, m_creature); + + DoCast(m_creature->getVictim(), SPELL_SHADOW_BOLT_VOLLEY); + ShadowBoltVolleyTimer = 15000; + }else ShadowBoltVolleyTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +struct MANGOS_DLL_DECL boss_kalecgos_humanoidAI : public ScriptedAI +{ + boss_kalecgos_humanoidAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 RevitalizeTimer; + uint32 HeroicStrikeTimer; + + bool HasYelled10Percent; + bool HasYelled20Percent; + + void Reset() + { + //TODO: Times! + RevitalizeTimer = 30000; + HeroicStrikeTimer = 8000; + + HasYelled10Percent = false; + HasYelled20Percent = false; + + m_creature->CastSpell(m_creature, SPELL_SPECTRAL_INVIS, true); + } + + void Aggro(Unit* who) + { + DoScriptText(SAY_GOOD_AGGRO, m_creature); + } + + void JustDied(Unit* killer) + { + // Whatever happens when Kalec (Half-elf) dies + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->getVictim() || !m_creature->SelectHostileTarget()) + return; + + if (RevitalizeTimer < diff) + { + if (m_pInstance) + { + /*Unit* pUnit = Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_RANDOM_SPECTRAL_PLAYER)); + if (pUnit) + DoCast(pUnit, SPELL_REVITALIZE);*/ + RevitalizeTimer = 30000; + } + }else RevitalizeTimer -= diff; + + if (HeroicStrikeTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_HEROIC_STRIKE); + HeroicStrikeTimer = 30000; + }else HeroicStrikeTimer -= diff; + + if (((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 20) && !HasYelled20Percent) + { + DoScriptText(SAY_GOOD_NEAR_DEATH, m_creature); + HasYelled20Percent = true; + } + + if (((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 10) && !HasYelled10Percent) + { + DoScriptText(SAY_GOOD_NEAR_DEATH2, m_creature); + HasYelled10Percent = true; + } + } +}; + +bool GOHello_go_spectral_rift(Player* pPlayer, GameObject* pGo) +{ + if (pGo->GetGoType() != GAMEOBJECT_TYPE_GOOBER) + return true; + + if (ScriptedInstance* pInstance = (ScriptedInstance*)pPlayer->GetInstanceData()) + { + if (pPlayer->HasAura(SPELL_SPECTRAL_EXHAUSTION, 0)) + return true; + + // Make them able to see Sathrovarr (he's invisible for some reason). Also, when this buff wears off, they get teleported back to Normal Realm (this is handled by Instance Script) + pPlayer->CastSpell(pPlayer, SPELL_TELEPORT_TO_SPECTRAL_REALM, true); + pPlayer->CastSpell(pPlayer, SPELL_SPECTRAL_REALM_FORCE_FACTION, true); + pPlayer->CastSpell(pPlayer, SPELL_SPECTRAL_REALM, true); + + // Add player to pSath's threat list + /*if (Creature* pSath = pInstance->instance->GetCreature(pInstance->GetData64(DATA_KALECGOS_DRAGON))) + { + if (pSath->isAlive()) + { + debug_log("SD2: Adding %s in pSath' threatlist", pPlayer->GetName()); + pSath->AddThreat(pPlayer, 0.0f); + } + } + + // Remove player from Sathrovarr's threat list + if (Creature* pKalecgos = pInstance->instance->GetCreature(pInstance->GetData64(DATA_SATHROVARR))) + { + if (pKalecgos->isAlive()) + { + if (HostileReference* pRef = pKalecgos->getThreatManager().getOnlineContainer().getReferenceByTarget(pPlayer)) + { + pRef->removeReference(); + debug_log("SD2: Deleting %s from pKalecgos's threatlist", pPlayer->GetName()); + } + } + }*/ + + pInstance->SetData64(DATA_PLAYER_SPECTRAL_REALM, pPlayer->GetGUID()); + } + + return true; +} + +CreatureAI* GetAI_boss_kalecgos(Creature* pCreature) +{ + return new boss_kalecgosAI(pCreature); +} + +CreatureAI* GetAI_boss_sathrovarr(Creature* pCreature) +{ + return new boss_sathrovarrAI(pCreature); +} + +CreatureAI* GetAI_boss_kalecgos_humanoid(Creature* pCreature) +{ + return new boss_kalecgos_humanoidAI(pCreature); +} + +void AddSC_boss_kalecgos() +{ + Script* newscript; + + newscript = new Script; + newscript->GetAI = &GetAI_boss_kalecgos; + newscript->Name = "boss_kalecgos"; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->GetAI = &GetAI_boss_sathrovarr; + newscript->Name = "boss_sathrovarr"; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->GetAI = &GetAI_boss_kalecgos_humanoid; + newscript->Name = "boss_kalecgos_humanoid"; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->pGOHello = &GOHello_go_spectral_rift; + newscript->Name = "go_spectral_rift"; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp new file mode 100644 index 000000000..ee33ac1b1 --- /dev/null +++ b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp @@ -0,0 +1,377 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +/* ScriptData +SDName: Instance_Sunwell_Plateau +SD%Complete: 70% +SDComment: +SDCategory: Sunwell_Plateau +EndScriptData */ + +#include "precompiled.h" +#include "sunwell_plateau.h" + +/* Sunwell Plateau: +0 - Kalecgos and Sathrovarr +1 - Brutallus +2 - Felmyst +3 - Eredar Twins (Alythess and Sacrolash) +4 - M'uru +5 - Kil'Jaeden +*/ + +struct MANGOS_DLL_DECL instance_sunwell_plateau : public ScriptedInstance +{ + instance_sunwell_plateau(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string strInstData; + + // Creatures + uint64 m_uiKalecgos_DragonGUID; + uint64 m_uiKalecgos_HumanGUID; + uint64 m_uiSathrovarrGUID; + uint64 m_uiBrutallusGUID; + uint64 m_uiFelmystGUID; + uint64 m_uiAlythessGUID; + uint64 m_uiSacrolashGUID; + uint64 m_uiMuruGUID; + uint64 m_uiKilJaedenGUID; + uint64 m_uiKilJaedenControllerGUID; + uint64 m_uiAnveenaGUID; + uint64 m_uiKalecgosGUID; + + // GameObjects + uint64 m_uiForceFieldGUID; // Kalecgos Encounter + uint64 m_uiBossCollision1GUID; + uint64 m_uiBossCollision2GUID; + uint64 m_uiIceBarrierGUID; // Brutallus Encounter + uint64 m_uiDoorFireBarrierGUID; + uint64 m_uiDoorTheFirstGateGUID; // Felmyst Encounter + uint64 m_uiDoorTheSecondGateGUID; // Alythess Encounter + uint64 m_uiDoorRaid_Gate_07GUID; // Sacrolash Encounter + uint64 m_uiDoorRaid_Gate_08GUID; // Muru Encounter + uint64 m_uiDoorTheThirdGateGUID; // Entropius Encounter + + // Misc + uint32 m_uiSpectralRealmTimer; + std::list SpectralRealmList; + + void Initialize() + { + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + + // Creatures + m_uiKalecgos_DragonGUID = 0; + m_uiKalecgos_HumanGUID = 0; + m_uiSathrovarrGUID = 0; + m_uiBrutallusGUID = 0; + m_uiFelmystGUID = 0; + m_uiAlythessGUID = 0; + m_uiSacrolashGUID = 0; + m_uiMuruGUID = 0; + m_uiKilJaedenGUID = 0; + m_uiKilJaedenControllerGUID = 0; + m_uiAnveenaGUID = 0; + m_uiKalecgosGUID = 0; + + // GameObjects + m_uiForceFieldGUID = 0; + m_uiBossCollision1GUID = 0; + m_uiBossCollision2GUID = 0; + m_uiIceBarrierGUID = 0; + m_uiDoorFireBarrierGUID = 0; + m_uiDoorTheFirstGateGUID = 0; + m_uiDoorTheSecondGateGUID = 0; + m_uiDoorRaid_Gate_07GUID = 0; + m_uiDoorRaid_Gate_08GUID = 0; + m_uiDoorTheThirdGateGUID = 0; + + // Misc + m_uiSpectralRealmTimer = 5000; + } + + bool IsEncounterInProgress() const + { + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + if (m_auiEncounter[i] == IN_PROGRESS) + return true; + + return false; + } + + void OnCreatureCreate(Creature* pCreature) + { + switch(pCreature->GetEntry()) + { + case 24850: m_uiKalecgos_DragonGUID = pCreature->GetGUID(); break; + case 24891: m_uiKalecgos_HumanGUID = pCreature->GetGUID(); break; + case 24892: m_uiSathrovarrGUID = pCreature->GetGUID(); break; + case 24882: m_uiBrutallusGUID = pCreature->GetGUID(); break; + case 25038: m_uiFelmystGUID = pCreature->GetGUID(); break; + case 25166: m_uiAlythessGUID = pCreature->GetGUID(); break; + case 25165: m_uiSacrolashGUID = pCreature->GetGUID(); break; + case 25741: m_uiMuruGUID = pCreature->GetGUID(); break; + case 25315: m_uiKilJaedenGUID = pCreature->GetGUID(); break; + case 25608: m_uiKilJaedenControllerGUID = pCreature->GetGUID(); break; + case 26046: m_uiAnveenaGUID = pCreature->GetGUID(); break; + case 25319: m_uiKalecgosGUID = pCreature->GetGUID(); break; + } + } + + void OnObjectCreate(GameObject* pGo) + { + switch(pGo->GetEntry()) + { + case 188421: + m_uiForceFieldGUID = pGo->GetGUID(); + break; + case 188523: + m_uiBossCollision1GUID = pGo->GetGUID(); + break; + case 188524: + m_uiBossCollision2GUID = pGo->GetGUID(); + break; + case 188119: + m_uiIceBarrierGUID = pGo->GetGUID(); + break; + case 188075: + m_uiDoorFireBarrierGUID = pGo->GetGUID(); + if (m_auiEncounter[0] == DONE && m_auiEncounter[1] == DONE && m_auiEncounter[2] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case 187766: + m_uiDoorTheFirstGateGUID = pGo->GetGUID(); + break; + case 187764: + m_uiDoorTheSecondGateGUID = pGo->GetGUID(); + if (m_auiEncounter[3] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case 187990: + m_uiDoorRaid_Gate_07GUID = pGo->GetGUID(); + if (m_auiEncounter[3] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case 188118: + m_uiDoorRaid_Gate_08GUID = pGo->GetGUID(); + if (m_auiEncounter[4] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case 187765: + m_uiDoorTheThirdGateGUID = pGo->GetGUID(); + if (m_auiEncounter[4] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + } + } + + uint32 GetData(uint32 uiType) + { + switch(uiType) + { + case TYPE_KALECGOS: return m_auiEncounter[0]; + case TYPE_BRUTALLUS: return m_auiEncounter[1]; + case TYPE_FELMYST: return m_auiEncounter[2]; + case TYPE_EREDAR_TWINS: return m_auiEncounter[3]; + case TYPE_MURU: return m_auiEncounter[4]; + case TYPE_KILJAEDEN: return m_auiEncounter[5]; + } + + return 0; + } + + uint64 GetData64(uint32 id) + { + switch(id) + { + case DATA_KALECGOS_DRAGON: return m_uiKalecgos_DragonGUID; + case DATA_KALECGOS_HUMAN: return m_uiKalecgos_HumanGUID; + case DATA_SATHROVARR: return m_uiSathrovarrGUID; + case DATA_BRUTALLUS: return m_uiBrutallusGUID; + case DATA_FELMYST: return m_uiFelmystGUID; + case DATA_ALYTHESS: return m_uiAlythessGUID; + case DATA_SACROLASH: return m_uiSacrolashGUID; + case DATA_MURU: return m_uiMuruGUID; + case DATA_KILJAEDEN: return m_uiKilJaedenGUID; + case DATA_KILJAEDEN_CONTROLLER: return m_uiKilJaedenControllerGUID; + case DATA_ANVEENA: return m_uiAnveenaGUID; + case DATA_KALECGOS: return m_uiKalecgosGUID; + case DATA_GO_FORCEFIELD: return m_uiForceFieldGUID; + } + return 0; + } + + void SetData(uint32 uiType, uint32 uiData) + { + switch(uiType) + { + case TYPE_KALECGOS: + if (uiData == IN_PROGRESS) + SpectralRealmList.clear(); + + DoUseDoorOrButton(m_uiForceFieldGUID); + DoUseDoorOrButton(m_uiBossCollision1GUID); + DoUseDoorOrButton(m_uiBossCollision2GUID); + + m_auiEncounter[0] = uiData; + break; + case TYPE_BRUTALLUS: + if (uiData == SPECIAL) + DoUseDoorOrButton(m_uiIceBarrierGUID,MINUTE); + + m_auiEncounter[1] = uiData; + break; + case TYPE_FELMYST: + m_auiEncounter[2] = uiData; + if (uiData == DONE) + DoUseDoorOrButton(m_uiDoorFireBarrierGUID); + break; + case TYPE_EREDAR_TWINS: + m_auiEncounter[3] = uiData; + if (uiData == DONE) + { + DoUseDoorOrButton(m_uiDoorTheSecondGateGUID); + DoUseDoorOrButton(m_uiDoorRaid_Gate_07GUID); + } + break; + case TYPE_MURU: + m_auiEncounter[4] = uiData; + if (uiData == DONE) + DoUseDoorOrButton(m_uiDoorRaid_Gate_08GUID); + break; + case TYPE_KILJAEDEN: m_auiEncounter[5] = uiData; break; + case DATA_SET_SPECTRAL_CHECK: m_uiSpectralRealmTimer = uiData; break; + } + + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " + << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5]; + + strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } + } + + const char* Save() + { + return strInstData.c_str(); + } + + void SetData64(uint32 uiData, uint64 uiGuid) + { + if (uiData == DATA_PLAYER_SPECTRAL_REALM) + SpectralRealmList.push_back(uiGuid); + } + + void EjectPlayer(Player* pPlayer) + { + debug_log("SD2: Ejecting Player %s from Spectral Realm", pPlayer->GetName()); + + // Put player back in Kalecgos(Dragon)'s threat list + /*if (Creature* pKalecgos = instance->GetCreature(m_uiKalecgos_DragonGUID)) + { + if (pKalecgos->isAlive()) + { + debug_log("SD2: Adding %s in Kalecgos' threatlist", pPlayer->GetName()); + pKalecgos->AddThreat(pPlayer, 0.0f); + } + } + + // Remove player from Sathrovarr's threat list + if (Creature* pSath = instance->GetCreature(m_uiSathrovarrGUID)) + { + if (pSath->isAlive()) + { + if (HostileReference* pRef = pSath->getThreatManager().getOnlineContainer().getReferenceByTarget(pPlayer)) + { + pRef->removeReference(); + debug_log("SD2: Deleting %s from Sathrovarr's threatlist", pPlayer->GetName()); + } + } + }*/ + + pPlayer->CastSpell(pPlayer, SPELL_TELEPORT_NORMAL_REALM, true); + pPlayer->CastSpell(pPlayer, SPELL_SPECTRAL_EXHAUSTION, true); + } + + void EjectPlayers() + { + if (SpectralRealmList.empty()) + return; + + Map::PlayerList const& players = instance->GetPlayers(); + + for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) + { + Player* plr = itr->getSource(); + + if (plr && !plr->HasAura(SPELL_SPECTRAL_REALM)) + { + SpectralRealmList.remove(plr->GetGUID()); + EjectPlayer(plr); + } + } + + //SpectralRealmList.clear(); + } + + void Update(uint32 uiDiff) + { + // Only check for Spectral Realm if Kalecgos Encounter is running + if (m_auiEncounter[0] == IN_PROGRESS) + { + if (m_uiSpectralRealmTimer <= uiDiff) + { + EjectPlayers(); + m_uiSpectralRealmTimer = 1000; + } + else + m_uiSpectralRealmTimer -= uiDiff; + } + } + + void Load(const char* in) + { + if (!in) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(in); + + std::istringstream loadStream(in); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> + m_auiEncounter[3] >> m_auiEncounter[4] >> m_auiEncounter[5]; + + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; + } + + OUT_LOAD_INST_DATA_COMPLETE; + } +}; + +InstanceData* GetInstanceData_instance_sunwell_plateau(Map* pMap) +{ + return new instance_sunwell_plateau(pMap); +} + +void AddSC_instance_sunwell_plateau() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "instance_sunwell_plateau"; + newscript->GetInstanceData = &GetInstanceData_instance_sunwell_plateau; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h new file mode 100644 index 000000000..dc59ec839 --- /dev/null +++ b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h @@ -0,0 +1,49 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_SUNWELLPLATEAU_H +#define DEF_SUNWELLPLATEAU_H + +enum InstanceSWP +{ + MAX_ENCOUNTER = 6, + + TYPE_KALECGOS = 0, + TYPE_BRUTALLUS = 1, + TYPE_FELMYST = 2, + TYPE_EREDAR_TWINS = 3, + TYPE_MURU = 4, + TYPE_KILJAEDEN = 5, + + DATA_KALECGOS_DRAGON = 6, + DATA_KALECGOS_HUMAN = 7, + DATA_SATHROVARR = 8, + DATA_BRUTALLUS = 9, + DATA_FELMYST = 10, + DATA_ALYTHESS = 11, + DATA_SACROLASH = 12, + DATA_MURU = 13, + DATA_KILJAEDEN = 14, + DATA_KILJAEDEN_CONTROLLER = 15, + DATA_ANVEENA = 16, + DATA_KALECGOS = 17, + + DATA_GO_FORCEFIELD = 18, + DATA_GO_FIRE_BARRIER = 19, + DATA_GO_FIRST_GATE = 20, + DATA_GO_SECOND_GATE = 21, + DATA_GO_RAID_GATE_07 = 22, + DATA_GO_RAID_GATE_08 = 23, + DATA_GO_THIRD_GATE = 24, + + DATA_PLAYER_SPECTRAL_REALM = 25, + DATA_SET_SPECTRAL_CHECK = 26, + + SPELL_SPECTRAL_REALM = 46021, + SPELL_TELEPORT_NORMAL_REALM = 46020, + SPELL_TELEPORT_TO_SPECTRAL_REALM = 46019, + SPELL_SPECTRAL_EXHAUSTION = 44867, + SPELL_SPECTRAL_REALM_FORCE_FACTION = 44852 +}; +#endif diff --git a/scripts/eastern_kingdoms/tirisfal_glades.cpp b/scripts/eastern_kingdoms/tirisfal_glades.cpp new file mode 100644 index 000000000..cbf3039d2 --- /dev/null +++ b/scripts/eastern_kingdoms/tirisfal_glades.cpp @@ -0,0 +1,208 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Tirisfal_Glades +SD%Complete: 100 +SDComment: Quest support: 590, 1819 +SDCategory: Tirisfal Glades +EndScriptData */ + +/* ContentData +go_mausoleum_door +go_mausoleum_trigger +npc_calvin_montague +EndContentData */ + +#include "precompiled.h" + +/*###### +## go_mausoleum_door +## go_mausoleum_trigger +######*/ + +enum +{ + QUEST_ULAG = 1819, + NPC_ULAG = 6390, + GO_TRIGGER = 104593, + GO_DOOR = 176594 +}; + +bool GOHello_go_mausoleum_door(Player* pPlayer, GameObject* pGo) +{ + if (pPlayer->GetQuestStatus(QUEST_ULAG) != QUEST_STATUS_INCOMPLETE) + return false; + + if (GameObject* pTrigger = GetClosestGameObjectWithEntry(pPlayer, GO_TRIGGER, 30.0f)) + { + pTrigger->SetGoState(GO_STATE_READY); + pPlayer->SummonCreature(NPC_ULAG, 2390.26, 336.47, 40.01, 2.26, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 300000); + return false; + } + + return false; +} + +bool GOHello_go_mausoleum_trigger(Player* pPlayer, GameObject* pGo) +{ + if (pPlayer->GetQuestStatus(QUEST_ULAG) != QUEST_STATUS_INCOMPLETE) + return false; + + if (GameObject* pDoor = GetClosestGameObjectWithEntry(pPlayer, GO_DOOR, 30.0f)) + { + pGo->SetGoState(GO_STATE_ACTIVE); + pDoor->RemoveFlag(GAMEOBJECT_FLAGS,GO_FLAG_INTERACT_COND); + return true; + } + + return false; +} + +/*###### +## npc_calvin_montague +######*/ + +enum +{ + SAY_COMPLETE = -1000356, + SPELL_DRINK = 2639, // possibly not correct spell (but iconId is correct) + QUEST_590 = 590, + FACTION_HOSTILE = 168 +}; + +struct MANGOS_DLL_DECL npc_calvin_montagueAI : public ScriptedAI +{ + npc_calvin_montagueAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_uiNormFaction = pCreature->getFaction(); + Reset(); + } + + uint32 m_uiNormFaction; + uint32 m_uiPhase; + uint32 m_uiPhaseTimer; + uint64 m_uiPlayerGUID; + + void Reset() + { + m_uiPhase = 0; + m_uiPhaseTimer = 5000; + m_uiPlayerGUID = 0; + + if (m_creature->getFaction() != m_uiNormFaction) + m_creature->setFaction(m_uiNormFaction); + } + + void AttackedBy(Unit* pAttacker) + { + if (m_creature->getVictim() || m_creature->IsFriendlyTo(pAttacker)) + return; + + AttackStart(pAttacker); + } + + void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + { + if (uiDamage > m_creature->GetHealth() || ((m_creature->GetHealth() - uiDamage)*100 / m_creature->GetMaxHealth() < 15)) + { + uiDamage = 0; + + m_creature->setFaction(m_uiNormFaction); + m_creature->CombatStop(true); + + m_uiPhase = 1; + + if (pDoneBy->GetTypeId() == TYPEID_PLAYER) + m_uiPlayerGUID = pDoneBy->GetGUID(); + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_uiPhase) + { + if (m_uiPhaseTimer < uiDiff) + m_uiPhaseTimer = 7500; + else + { + m_uiPhaseTimer -= uiDiff; + return; + } + + switch(m_uiPhase) + { + case 1: + DoScriptText(SAY_COMPLETE, m_creature); + ++m_uiPhase; + break; + case 2: + if (Unit* pUnit = Unit::GetUnit(*m_creature, m_uiPlayerGUID)) + ((Player*)pUnit)->AreaExploredOrEventHappens(QUEST_590); + + m_creature->CastSpell(m_creature,SPELL_DRINK,true); + ++m_uiPhase; + break; + case 3: + EnterEvadeMode(); + break; + } + + return; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_calvin_montague(Creature* pCreature) +{ + return new npc_calvin_montagueAI(pCreature); +} + +bool QuestAccept_npc_calvin_montague(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_590) + { + pCreature->setFaction(FACTION_HOSTILE); + pCreature->AI()->AttackStart(pPlayer); + } + return true; +} + +void AddSC_tirisfal_glades() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "go_mausoleum_door"; + newscript->pGOHello = &GOHello_go_mausoleum_door; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "go_mausoleum_trigger"; + newscript->pGOHello = &GOHello_go_mausoleum_trigger; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_calvin_montague"; + newscript->GetAI = &GetAI_npc_calvin_montague; + newscript->pQuestAccept = &QuestAccept_npc_calvin_montague; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/uldaman/boss_ironaya.cpp b/scripts/eastern_kingdoms/uldaman/boss_ironaya.cpp new file mode 100644 index 000000000..2425fe244 --- /dev/null +++ b/scripts/eastern_kingdoms/uldaman/boss_ironaya.cpp @@ -0,0 +1,105 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Ironaya +SD%Complete: 100 +SDComment: +SDCategory: Uldaman +EndScriptData */ + +#include "precompiled.h" + +#define SAY_AGGRO -1070000 + +#define SPELL_ARCINGSMASH 8374 +#define SPELL_KNOCKAWAY 10101 +#define SPELL_WSTOMP 11876 + +struct MANGOS_DLL_DECL boss_ironayaAI : public ScriptedAI +{ + boss_ironayaAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 Arcing_Timer; + bool hasCastedWstomp; + bool hasCastedKnockaway; + + void Reset() + { + Arcing_Timer = 3000; + hasCastedKnockaway = false; + hasCastedWstomp = false; + } + + void Aggro(Unit *who) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //If we are <50% hp do knockaway ONCE + if (!hasCastedKnockaway && m_creature->GetHealth()*2 < m_creature->GetMaxHealth()) + { + m_creature->CastSpell(m_creature->getVictim(),SPELL_KNOCKAWAY, true); + + // current aggro target is knocked away pick new target + Unit* Target = SelectUnit(SELECT_TARGET_TOPAGGRO, 0); + + if (!Target || Target == m_creature->getVictim()) + Target = SelectUnit(SELECT_TARGET_TOPAGGRO, 1); + + if (Target) + m_creature->TauntApply(Target); + + //Shouldn't cast this agian + hasCastedKnockaway = true; + } + + //Arcing_Timer + if (Arcing_Timer < diff) + { + DoCast(m_creature,SPELL_ARCINGSMASH); + Arcing_Timer = 13000; + }else Arcing_Timer -= diff; + + if (!hasCastedWstomp && m_creature->GetHealth()*4 < m_creature->GetMaxHealth()) + { + DoCast(m_creature,SPELL_WSTOMP); + hasCastedWstomp = true; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_ironaya(Creature* pCreature) +{ + return new boss_ironayaAI(pCreature); +} + +void AddSC_boss_ironaya() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_ironaya"; + newscript->GetAI = &GetAI_boss_ironaya; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/uldaman/uldaman.cpp b/scripts/eastern_kingdoms/uldaman/uldaman.cpp new file mode 100644 index 000000000..33b43f3f1 --- /dev/null +++ b/scripts/eastern_kingdoms/uldaman/uldaman.cpp @@ -0,0 +1,183 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Uldaman +SD%Complete: 100 +SDComment: Quest support: 2278 + 1 trash mob. +SDCategory: Uldaman +EndScriptData */ + +/* ContentData +mob_jadespine_basilisk +npc_lore_keeper_of_norgannon +EndContentData */ + +#include "precompiled.h" + +/*###### +## mob_jadespine_basilisk +######*/ + +#define SPELL_CSLUMBER 3636 + +struct MANGOS_DLL_DECL mob_jadespine_basiliskAI : public ScriptedAI +{ + mob_jadespine_basiliskAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 Cslumber_Timer; + + void Reset() + { + Cslumber_Timer = 2000; + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Cslumber_Timer + if (Cslumber_Timer < diff) + { + //Cast + // DoCast(m_creature->getVictim(),SPELL_CSLUMBER); + m_creature->CastSpell(m_creature->getVictim(),SPELL_CSLUMBER, true); + + //Stop attacking target thast asleep and pick new target + Cslumber_Timer = 28000; + + Unit* Target = SelectUnit(SELECT_TARGET_TOPAGGRO, 0); + + if (!Target || Target == m_creature->getVictim()) + Target = SelectUnit(SELECT_TARGET_RANDOM, 0); + + if (Target) + m_creature->TauntApply(Target); + + }else Cslumber_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_jadespine_basilisk(Creature* pCreature) +{ + return new mob_jadespine_basiliskAI(pCreature); +} + +/*###### +## npc_lore_keeper_of_norgannon +######*/ + +bool GossipHello_npc_lore_keeper_of_norgannon(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->GetQuestStatus(2278) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Who are the Earthen?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + pPlayer->SEND_GOSSIP_MENU(1079, pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_lore_keeper_of_norgannon(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What is a \"subterranean being matrix\"?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->SEND_GOSSIP_MENU(1080, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What are the anomalies you speak of?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); + pPlayer->SEND_GOSSIP_MENU(1081, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+3: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What is a resilient foundation of construction?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); + pPlayer->SEND_GOSSIP_MENU(1082, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+4: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "So... the Earthen were made out of stone?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); + pPlayer->SEND_GOSSIP_MENU(1083, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+5: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Anything else I should know about the Earthen?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6); + pPlayer->SEND_GOSSIP_MENU(1084, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+6: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I think I understand the Creators' design intent for the Earthen now. What are the Earthen's anomalies that you spoke of earlier?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+7); + pPlayer->SEND_GOSSIP_MENU(1085, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+7: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What high-stress environments would cause the Earthen to destabilize?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+8); + pPlayer->SEND_GOSSIP_MENU(1086, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+8: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What happens when the Earthen destabilize?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+9); + pPlayer->SEND_GOSSIP_MENU(1087, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+9: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Troggs?! Are the troggs you mention the same as the ones in the world today?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+10); + pPlayer->SEND_GOSSIP_MENU(1088, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+10: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "You mentioned two results when the Earthen destabilize. What is the second?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+11); + pPlayer->SEND_GOSSIP_MENU(1089, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+11: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Dwarves!!! Now you're telling me that dwarves originally came from the Earthen?!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+12); + pPlayer->SEND_GOSSIP_MENU(1090, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+12: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "These dwarves are the same ones today, yes? Do the dwarves maintain any other links to the Earthen?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+13); + pPlayer->SEND_GOSSIP_MENU(1091, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+13: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Who are the Creators?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+14); + pPlayer->SEND_GOSSIP_MENU(1092, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+14: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "This is a lot to think about.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+15); + pPlayer->SEND_GOSSIP_MENU(1093, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+15: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I will access the discs now.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+16); + pPlayer->SEND_GOSSIP_MENU(1094, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+16: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->AreaExploredOrEventHappens(2278); + break; + } + return true; +} + +void AddSC_uldaman() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "mob_jadespine_basilisk"; + newscript->GetAI = &GetAI_mob_jadespine_basilisk; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_lore_keeper_of_norgannon"; + newscript->pGossipHello = &GossipHello_npc_lore_keeper_of_norgannon; + newscript->pGossipSelect = &GossipSelect_npc_lore_keeper_of_norgannon; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/undercity.cpp b/scripts/eastern_kingdoms/undercity.cpp new file mode 100644 index 000000000..1b3f2b42a --- /dev/null +++ b/scripts/eastern_kingdoms/undercity.cpp @@ -0,0 +1,255 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Undercity +SD%Complete: 95 +SDComment: Quest support: 6628(Parqual Fintallas questions/'answers' might have more to it, need more info), 9180(post-event). +SDCategory: Undercity +EndScriptData */ + +/* ContentData +npc_lady_sylvanas_windrunner +npc_highborne_lamenter +npc_parqual_fintallas +EndContentData */ + +#include "precompiled.h" + +/*###### +## npc_lady_sylvanas_windrunner +######*/ + +#define SAY_LAMENT_END -1000196 +#define EMOTE_LAMENT_END -1000197 + +#define SOUND_CREDIT 10896 +#define ENTRY_HIGHBORNE_LAMENTER 21628 +#define ENTRY_HIGHBORNE_BUNNY 21641 + +#define SPELL_HIGHBORNE_AURA 37090 +#define SPELL_SYLVANAS_CAST 36568 +#define SPELL_RIBBON_OF_SOULS 34432 //the real one to use might be 37099 + +float HighborneLoc[4][3]= +{ + {1285.41, 312.47, 0.51}, + {1286.96, 310.40, 1.00}, + {1289.66, 309.66, 1.52}, + {1292.51, 310.50, 1.99}, +}; +#define HIGHBORNE_LOC_Y -61.00 +#define HIGHBORNE_LOC_Y_NEW -55.50 + +struct MANGOS_DLL_DECL npc_lady_sylvanas_windrunnerAI : public ScriptedAI +{ + npc_lady_sylvanas_windrunnerAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + uint32 LamentEvent_Timer; + bool LamentEvent; + uint64 targetGUID; + + float myX; + float myY; + float myZ; + + void Reset() + { + myX = m_creature->GetPositionX(); + myY = m_creature->GetPositionY(); + myZ = m_creature->GetPositionZ(); + + LamentEvent_Timer = 5000; + LamentEvent = false; + targetGUID = 0; + } + + void JustSummoned(Creature *summoned) + { + if (summoned->GetEntry() == ENTRY_HIGHBORNE_BUNNY) + { + if (Creature* pBunny = (Creature*)Unit::GetUnit(*summoned,targetGUID)) + { + pBunny->SendMonsterMove(pBunny->GetPositionX(), pBunny->GetPositionY(), myZ+15.0f, 0, MONSTER_MOVE_NONE, 0); + pBunny->GetMap()->CreatureRelocation(pBunny, pBunny->GetPositionX(), pBunny->GetPositionY(), myZ+15.0f, 0); + summoned->CastSpell(pBunny,SPELL_RIBBON_OF_SOULS,false); + } + + targetGUID = summoned->GetGUID(); + } + } + + void UpdateAI(const uint32 diff) + { + if (LamentEvent) + { + if (LamentEvent_Timer < diff) + { + float raX = myX; + float raY = myY; + float raZ = myZ; + + m_creature->GetRandomPoint(myX,myY,myZ,20.0,raX,raY,raZ); + m_creature->SummonCreature(ENTRY_HIGHBORNE_BUNNY,raX,raY,myZ,0,TEMPSUMMON_TIMED_DESPAWN,3000); + + LamentEvent_Timer = 2000; + if (!m_creature->HasAura(SPELL_SYLVANAS_CAST,0)) + { + DoScriptText(SAY_LAMENT_END, m_creature); + DoScriptText(EMOTE_LAMENT_END, m_creature); + LamentEvent = false; + } + }else LamentEvent_Timer -= diff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_npc_lady_sylvanas_windrunner(Creature* pCreature) +{ + return new npc_lady_sylvanas_windrunnerAI(pCreature); +} + +bool ChooseReward_npc_lady_sylvanas_windrunner(Player* pPlayer, Creature* pCreature, const Quest* pQuest, uint32 slot) +{ + if (pQuest->GetQuestId() == 9180) + { + ((npc_lady_sylvanas_windrunnerAI*)pCreature->AI())->LamentEvent = true; + ((npc_lady_sylvanas_windrunnerAI*)pCreature->AI())->DoPlaySoundToSet(pCreature,SOUND_CREDIT); + pCreature->CastSpell(pCreature,SPELL_SYLVANAS_CAST,false); + + for(uint8 i = 0; i < 4; ++i) + pCreature->SummonCreature(ENTRY_HIGHBORNE_LAMENTER, HighborneLoc[i][0], HighborneLoc[i][1], HIGHBORNE_LOC_Y, HighborneLoc[i][2], TEMPSUMMON_TIMED_DESPAWN, 160000); + } + + return true; +} + +/*###### +## npc_highborne_lamenter +######*/ + +struct MANGOS_DLL_DECL npc_highborne_lamenterAI : public ScriptedAI +{ + npc_highborne_lamenterAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + uint32 EventMove_Timer; + uint32 EventCast_Timer; + bool EventMove; + bool EventCast; + + void Reset() + { + EventMove_Timer = 10000; + EventCast_Timer = 17500; + EventMove = true; + EventCast = true; + } + + void UpdateAI(const uint32 diff) + { + if (EventMove) + { + if (EventMove_Timer < diff) + { + m_creature->AddMonsterMoveFlag(MONSTER_MOVE_LEVITATING); + m_creature->SendMonsterMoveWithSpeed(m_creature->GetPositionX(),m_creature->GetPositionY(),HIGHBORNE_LOC_Y_NEW,5000); + m_creature->GetMap()->CreatureRelocation(m_creature,m_creature->GetPositionX(),m_creature->GetPositionY(),HIGHBORNE_LOC_Y_NEW,m_creature->GetOrientation()); + EventMove = false; + }else EventMove_Timer -= diff; + } + if (EventCast) + { + if (EventCast_Timer < diff) + { + DoCast(m_creature,SPELL_HIGHBORNE_AURA); + EventCast = false; + }else EventCast_Timer -= diff; + } + } +}; +CreatureAI* GetAI_npc_highborne_lamenter(Creature* pCreature) +{ + return new npc_highborne_lamenterAI(pCreature); +} + +/*###### +## npc_parqual_fintallas +######*/ + +#define SPELL_MARK_OF_SHAME 6767 + +bool GossipHello_npc_parqual_fintallas(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestStatus(6628) == QUEST_STATUS_INCOMPLETE && !pPlayer->HasAura(SPELL_MARK_OF_SHAME,0)) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Gul'dan", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Kel'Thuzad", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Ner'zhul", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->SEND_GOSSIP_MENU(5822, pCreature->GetGUID()); + } + else + pPlayer->SEND_GOSSIP_MENU(5821, pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_parqual_fintallas(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + pPlayer->CLOSE_GOSSIP_MENU(); + pCreature->CastSpell(pPlayer,SPELL_MARK_OF_SHAME,false); + } + if (uiAction == GOSSIP_ACTION_INFO_DEF+2) + { + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->AreaExploredOrEventHappens(6628); + } + return true; +} + +/*###### +## AddSC +######*/ + +void AddSC_undercity() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_lady_sylvanas_windrunner"; + newscript->GetAI = &GetAI_npc_lady_sylvanas_windrunner; + newscript->pChooseReward = &ChooseReward_npc_lady_sylvanas_windrunner; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_highborne_lamenter"; + newscript->GetAI = &GetAI_npc_highborne_lamenter; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_parqual_fintallas"; + newscript->pGossipHello = &GossipHello_npc_parqual_fintallas; + newscript->pGossipSelect = &GossipSelect_npc_parqual_fintallas; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/western_plaguelands.cpp b/scripts/eastern_kingdoms/western_plaguelands.cpp new file mode 100644 index 000000000..87e696b8a --- /dev/null +++ b/scripts/eastern_kingdoms/western_plaguelands.cpp @@ -0,0 +1,222 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Western_Plaguelands +SD%Complete: 90 +SDComment: Quest support: 5216,5219,5222,5225,5229,5231,5233,5235. To obtain Vitreous Focuser (could use more spesifics about gossip items) +SDCategory: Western Plaguelands +EndScriptData */ + +/* ContentData +npcs_dithers_and_arbington +npc_myranda_hag +npc_the_scourge_cauldron +EndContentData */ + +#include "precompiled.h" + +/*###### +## npcs_dithers_and_arbington +######*/ + +bool GossipHello_npcs_dithers_and_arbington(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + if (pCreature->isVendor()) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); + + if (pPlayer->GetQuestRewardStatus(5237) || pPlayer->GetQuestRewardStatus(5238)) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What does the Felstone Field Cauldron need?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What does the Dalson's Tears Cauldron need?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What does the Writhing Haunt Cauldron need?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What does the Gahrron's Withering Cauldron need?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); + pPlayer->SEND_GOSSIP_MENU(3985, pCreature->GetGUID()); + }else + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npcs_dithers_and_arbington(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_TRADE: + pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Thanks, i need a Vitreous Focuser", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); + pPlayer->SEND_GOSSIP_MENU(3980, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Thanks, i need a Vitreous Focuser", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); + pPlayer->SEND_GOSSIP_MENU(3981, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+3: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Thanks, i need a Vitreous Focuser", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); + pPlayer->SEND_GOSSIP_MENU(3982, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+4: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Thanks, i need a Vitreous Focuser", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); + pPlayer->SEND_GOSSIP_MENU(3983, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+5: + pPlayer->CLOSE_GOSSIP_MENU(); + pCreature->CastSpell(pPlayer, 17529, false); + break; + } + return true; +} + +/*###### +## npc_myranda_the_hag +######*/ + +enum +{ + QUEST_SUBTERFUGE = 5862, + QUEST_IN_DREAMS = 5944, + SPELL_SCARLET_ILLUSION = 17961 +}; + +#define GOSSIP_ITEM_ILLUSION "I am ready for the illusion, Myranda." + +bool GossipHello_npc_myranda_the_hag(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestStatus(QUEST_SUBTERFUGE) == QUEST_STATUS_COMPLETE && + !pPlayer->GetQuestRewardStatus(QUEST_IN_DREAMS) && !pPlayer->HasAura(SPELL_SCARLET_ILLUSION)) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ILLUSION, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(4773, pCreature->GetGUID()); + return true; + } + else + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_myranda_the_hag(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + pPlayer->CLOSE_GOSSIP_MENU(); + pCreature->CastSpell(pPlayer, SPELL_SCARLET_ILLUSION, false); + } + return true; +} + +/*###### +## npc_the_scourge_cauldron +######*/ + +struct MANGOS_DLL_DECL npc_the_scourge_cauldronAI : public ScriptedAI +{ + npc_the_scourge_cauldronAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + void Reset() {} + + void DoDie() + { + //summoner dies here + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + //override any database `spawntimesecs` to prevent duplicated summons + uint32 rTime = m_creature->GetRespawnDelay(); + if (rTime<600) + m_creature->SetRespawnDelay(600); + } + + void MoveInLineOfSight(Unit *who) + { + if (!who || who->GetTypeId() != TYPEID_PLAYER) + return; + + if (who->GetTypeId() == TYPEID_PLAYER) + { + switch(m_creature->GetAreaId()) + { + case 199: //felstone + if (((Player*)who)->GetQuestStatus(5216) == QUEST_STATUS_INCOMPLETE || + ((Player*)who)->GetQuestStatus(5229) == QUEST_STATUS_INCOMPLETE) + { + m_creature->SummonCreature(11075, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000); + DoDie(); + } + break; + case 200: //dalson + if (((Player*)who)->GetQuestStatus(5219) == QUEST_STATUS_INCOMPLETE || + ((Player*)who)->GetQuestStatus(5231) == QUEST_STATUS_INCOMPLETE) + { + m_creature->SummonCreature(11077, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000); + DoDie(); + } + break; + case 201: //gahrron + if (((Player*)who)->GetQuestStatus(5225) == QUEST_STATUS_INCOMPLETE || + ((Player*)who)->GetQuestStatus(5235) == QUEST_STATUS_INCOMPLETE) + { + m_creature->SummonCreature(11078, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); + DoDie(); + } + break; + case 202: //writhing + if (((Player*)who)->GetQuestStatus(5222) == QUEST_STATUS_INCOMPLETE || + ((Player*)who)->GetQuestStatus(5233) == QUEST_STATUS_INCOMPLETE) + { + m_creature->SummonCreature(11076, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); + DoDie(); + } + break; + } + } + } +}; +CreatureAI* GetAI_npc_the_scourge_cauldron(Creature* pCreature) +{ + return new npc_the_scourge_cauldronAI(pCreature); +} + +/*###### +## +######*/ + +void AddSC_western_plaguelands() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npcs_dithers_and_arbington"; + newscript->pGossipHello = &GossipHello_npcs_dithers_and_arbington; + newscript->pGossipSelect = &GossipSelect_npcs_dithers_and_arbington; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_myranda_the_hag"; + newscript->pGossipHello = &GossipHello_npc_myranda_the_hag; + newscript->pGossipSelect = &GossipSelect_npc_myranda_the_hag; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_the_scourge_cauldron"; + newscript->GetAI = &GetAI_npc_the_scourge_cauldron; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/westfall.cpp b/scripts/eastern_kingdoms/westfall.cpp new file mode 100644 index 000000000..7515420f7 --- /dev/null +++ b/scripts/eastern_kingdoms/westfall.cpp @@ -0,0 +1,263 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Westfall +SD%Complete: 90 +SDComment: Quest support: 155, 1651 +SDCategory: Westfall +EndScriptData */ + +/* ContentData +npc_daphne_stilwell +npc_defias_traitor +EndContentData */ + +#include "precompiled.h" +#include "escort_ai.h" + +/*###### +## npc_daphne_stilwell +######*/ + +enum +{ + SAY_DS_START = -1000293, + SAY_DS_DOWN_1 = -1000294, + SAY_DS_DOWN_2 = -1000295, + SAY_DS_DOWN_3 = -1000296, + SAY_DS_PROLOGUE = -1000297, + + SPELL_SHOOT = 6660, + QUEST_TOME_VALOR = 1651, + NPC_DEFIAS_RAIDER = 6180, + EQUIP_ID_RIFLE = 2511 +}; + +struct MANGOS_DLL_DECL npc_daphne_stilwellAI : public npc_escortAI +{ + npc_daphne_stilwellAI(Creature* pCreature) : npc_escortAI(pCreature) + { + m_uiWPHolder = 0; + Reset(); + } + + uint32 m_uiWPHolder; + uint32 m_uiShootTimer; + + void Reset() + { + if (HasEscortState(STATE_ESCORT_ESCORTING)) + { + switch(m_uiWPHolder) + { + case 7: DoScriptText(SAY_DS_DOWN_1, m_creature); break; + case 8: DoScriptText(SAY_DS_DOWN_2, m_creature); break; + case 9: DoScriptText(SAY_DS_DOWN_3, m_creature); break; + } + } + else + m_uiWPHolder = 0; + + m_uiShootTimer = 0; + } + + void WaypointReached(uint32 uiPoint) + { + m_uiWPHolder = uiPoint; + + switch(uiPoint) + { + case 4: + SetEquipmentSlots(false, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE, EQUIP_ID_RIFLE); + m_creature->SetSheath(SHEATH_STATE_RANGED); + m_creature->HandleEmoteCommand(EMOTE_STATE_USESTANDING_NOSHEATHE); + break; + case 7: + m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11450.836, 1569.755, 54.267, 4.230, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11449.697, 1569.124, 54.421, 4.206, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11448.237, 1568.307, 54.620, 4.206, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + break; + case 8: + m_creature->SetSheath(SHEATH_STATE_RANGED); + m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11450.836, 1569.755, 54.267, 4.230, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11449.697, 1569.124, 54.421, 4.206, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11448.237, 1568.307, 54.620, 4.206, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11448.037, 1570.213, 54.961, 4.283, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + break; + case 9: + m_creature->SetSheath(SHEATH_STATE_RANGED); + m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11450.836, 1569.755, 54.267, 4.230, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11449.697, 1569.124, 54.421, 4.206, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11448.237, 1568.307, 54.620, 4.206, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11448.037, 1570.213, 54.961, 4.283, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + m_creature->SummonCreature(NPC_DEFIAS_RAIDER, -11449.018, 1570.738, 54.828, 4.220, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + break; + case 10: + SetRun(false); + break; + case 11: + DoScriptText(SAY_DS_PROLOGUE, m_creature); + break; + case 13: + SetEquipmentSlots(true); + m_creature->SetSheath(SHEATH_STATE_UNARMED); + m_creature->HandleEmoteCommand(EMOTE_STATE_USESTANDING_NOSHEATHE); + break; + case 17: + if (Player* pPlayer = GetPlayerForEscort()) + pPlayer->GroupEventHappens(QUEST_TOME_VALOR, m_creature); + break; + } + } + + void AttackStart(Unit* pWho) + { + if (!pWho) + return; + + if (m_creature->Attack(pWho, false)) + { + m_creature->AddThreat(pWho, 0.0f); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + + m_creature->GetMotionMaster()->MoveChase(pWho, 30.0f); + } + } + + void JustSummoned(Creature* pSummoned) + { + pSummoned->AI()->AttackStart(m_creature); + } + + void UpdateEscortAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiShootTimer < uiDiff) + { + m_uiShootTimer = 1000; + + if (!m_creature->IsWithinDist(m_creature->getVictim(), ATTACK_DISTANCE)) + DoCast(m_creature->getVictim(), SPELL_SHOOT); + + } + else + m_uiShootTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +bool QuestAccept_npc_daphne_stilwell(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_TOME_VALOR) + { + DoScriptText(SAY_DS_START, pCreature); + + if (npc_daphne_stilwellAI* pEscortAI = dynamic_cast(pCreature->AI())) + pEscortAI->Start(true, true, pPlayer->GetGUID(), pQuest); + } + + return true; +} + +CreatureAI* GetAI_npc_daphne_stilwell(Creature* pCreature) +{ + return new npc_daphne_stilwellAI(pCreature); +} + +/*###### +## npc_defias_traitor +######*/ + +#define SAY_START -1000101 +#define SAY_PROGRESS -1000102 +#define SAY_END -1000103 +#define SAY_AGGRO_1 -1000104 +#define SAY_AGGRO_2 -1000105 + +#define QUEST_DEFIAS_BROTHERHOOD 155 + +struct MANGOS_DLL_DECL npc_defias_traitorAI : public npc_escortAI +{ + npc_defias_traitorAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } + + void WaypointReached(uint32 i) + { + switch (i) + { + case 35: + SetRun(false); + break; + case 36: + if (Player* pPlayer = GetPlayerForEscort()) + DoScriptText(SAY_PROGRESS, m_creature, pPlayer); + break; + case 44: + if (Player* pPlayer = GetPlayerForEscort()) + { + DoScriptText(SAY_END, m_creature, pPlayer); + pPlayer->GroupEventHappens(QUEST_DEFIAS_BROTHERHOOD, m_creature); + } + break; + } + } + + void Aggro(Unit* who) + { + DoScriptText(urand(0, 1) ? SAY_AGGRO_1 : SAY_AGGRO_2, m_creature); + } + + void Reset() { } +}; + +bool QuestAccept_npc_defias_traitor(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_DEFIAS_BROTHERHOOD) + { + DoScriptText(SAY_START, pCreature, pPlayer); + + if (npc_defias_traitorAI* pEscortAI = dynamic_cast(pCreature->AI())) + pEscortAI->Start(true, true, pPlayer->GetGUID(), pQuest); + } + + return true; +} + +CreatureAI* GetAI_npc_defias_traitor(Creature* pCreature) +{ + return new npc_defias_traitorAI(pCreature); +} + +void AddSC_westfall() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_daphne_stilwell"; + newscript->GetAI = &GetAI_npc_daphne_stilwell; + newscript->pQuestAccept = &QuestAccept_npc_daphne_stilwell; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_defias_traitor"; + newscript->GetAI = &GetAI_npc_defias_traitor; + newscript->pQuestAccept = &QuestAccept_npc_defias_traitor; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/wetlands.cpp b/scripts/eastern_kingdoms/wetlands.cpp new file mode 100644 index 000000000..54b39e262 --- /dev/null +++ b/scripts/eastern_kingdoms/wetlands.cpp @@ -0,0 +1,167 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Wetlands +SD%Complete: 80 +SDComment: Quest support: 1249 +SDCategory: Wetlands +EndScriptData */ + +/* ContentData +npc_mikhail +npc_tapoke_slim_jahn +EndContentData */ + +#include "precompiled.h" +#include "escort_ai.h" + +/*###### +## npc_tapoke_slim_jahn +######*/ + +enum +{ + QUEST_MISSING_DIPLO_PT11 = 1249, + FACTION_ENEMY = 168, + SPELL_STEALTH = 1785, + SPELL_CALL_FRIENDS = 16457, //summons 1x friend + NPC_SLIMS_FRIEND = 4971, + NPC_TAPOKE_SLIM_JAHN = 4962 +}; + +struct MANGOS_DLL_DECL npc_tapoke_slim_jahnAI : public npc_escortAI +{ + npc_tapoke_slim_jahnAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } + + bool m_bFriendSummoned; + + void Reset() + { + if (!HasEscortState(STATE_ESCORT_ESCORTING)) + m_bFriendSummoned = false; + } + + void WaypointReached(uint32 uiPointId) + { + switch(uiPointId) + { + case 2: + if (m_creature->HasStealthAura()) + m_creature->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); + + SetRun(); + m_creature->setFaction(FACTION_ENEMY); + break; + } + } + + void Aggro(Unit* pWho) + { + Player* pPlayer = GetPlayerForEscort(); + + if (HasEscortState(STATE_ESCORT_ESCORTING) && !m_bFriendSummoned && pPlayer) + { + for(uint8 i = 0; i < 3; ++i) + m_creature->CastSpell(m_creature, SPELL_CALL_FRIENDS, true); + + m_bFriendSummoned = true; + } + } + + void JustSummoned(Creature* pSummoned) + { + if (Player* pPlayer = GetPlayerForEscort()) + pSummoned->AI()->AttackStart(pPlayer); + } + + void AttackedBy(Unit* pAttacker) + { + if (m_creature->getVictim()) + return; + + if (m_creature->IsFriendlyTo(pAttacker)) + return; + + AttackStart(pAttacker); + } + + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) + { + if (m_creature->GetHealth()*100 < m_creature->GetMaxHealth()*20) + { + if (Player* pPlayer = GetPlayerForEscort()) + { + pPlayer->GroupEventHappens(QUEST_MISSING_DIPLO_PT11, m_creature); + + uiDamage = 0; + + m_creature->setFaction(m_creature->GetCreatureInfo()->faction_A); + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + + SetRun(false); + } + } + } +}; + +CreatureAI* GetAI_npc_tapoke_slim_jahn(Creature* pCreature) +{ + return new npc_tapoke_slim_jahnAI(pCreature); +} + +/*###### +## npc_mikhail +######*/ + +bool QuestAccept_npc_mikhail(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_MISSING_DIPLO_PT11) + { + Creature* pSlim = GetClosestCreatureWithEntry(pCreature, NPC_TAPOKE_SLIM_JAHN, 25.0f); + + if (!pSlim) + return false; + + if (!pSlim->HasStealthAura()) + pSlim->CastSpell(pSlim, SPELL_STEALTH, true); + + if (npc_tapoke_slim_jahnAI* pEscortAI = dynamic_cast(pSlim->AI())) + pEscortAI->Start(false, false, pPlayer->GetGUID(), pQuest); + } + return false; +} + +/*###### +## AddSC +######*/ + +void AddSC_wetlands() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_tapoke_slim_jahn"; + newscript->GetAI = &GetAI_npc_tapoke_slim_jahn; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_mikhail"; + newscript->pQuestAccept = &QuestAccept_npc_mikhail; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp b/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp new file mode 100644 index 000000000..40abe4118 --- /dev/null +++ b/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp @@ -0,0 +1,311 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Akilzon +SD%Complete: 50 +SDComment: TODO: Correct timers, correct details, remove hack for eagles +SDCategory: Zul'Aman +EndScriptData */ + +#include "precompiled.h" +#include "zulaman.h" + +enum +{ + SAY_EVENT1 = -1568024, + SAY_EVENT2 = -1568025, + SAY_AGGRO = -1568026, + SAY_SUMMON = -1568027, + SAY_SUMMON_ALT = -1568028, + SAY_ENRAGE = -1568029, + SAY_SLAY1 = -1568030, + SAY_SLAY2 = -1568031, + SAY_DEATH = -1568032, + EMOTE_STORM = -1568033, + + SPELL_STATIC_DISRUPTION = 43622, + SPELL_STATIC_VISUAL = 45265, + + SPELL_CALL_LIGHTNING = 43661, + SPELL_GUST_OF_WIND = 43621, + + SPELL_ELECTRICAL_STORM = 43648, + SPELL_STORMCLOUD_VISUAL = 45213, + + SPELL_BERSERK = 45078, + + NPC_SOARING_EAGLE = 24858, + MAX_EAGLE_COUNT = 6, + + //SE_LOC_X_MAX = 400, + //SE_LOC_X_MIN = 335, + //SE_LOC_Y_MAX = 1435, + //SE_LOC_Y_MIN = 1370 +}; + +struct MANGOS_DLL_DECL boss_akilzonAI : public ScriptedAI +{ + boss_akilzonAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 m_uiStaticDisruptTimer; + uint32 m_uiCallLightTimer; + uint32 m_uiGustOfWindTimer; + uint32 m_uiStormTimer; + uint32 m_uiSummonEagleTimer; + uint32 m_uiBerserkTimer; + bool m_bIsBerserk; + + void Reset() + { + m_uiStaticDisruptTimer = urand(7000, 14000); + m_uiCallLightTimer = urand(15000, 25000); + m_uiGustOfWindTimer = urand(20000, 30000); + m_uiStormTimer = 50000; + m_uiSummonEagleTimer = 65000; + m_uiBerserkTimer = MINUTE*8*IN_MILISECONDS; + m_bIsBerserk = false; + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + m_creature->SetInCombatWithZone(); + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + + if (!m_pInstance) + return; + + m_pInstance->SetData(TYPE_AKILZON, DONE); + } + + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_SOARING_EAGLE) + pSummoned->SetInCombatWithZone(); + } + + void DoSummonEagles() + { + for(uint32 i = 0; i < MAX_EAGLE_COUNT; ++i) + { + float fX, fY, fZ; + m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()+15.0f, 30.0f, fX, fY, fZ); + + m_creature->SummonCreature(NPC_SOARING_EAGLE, fX, fY, fZ, m_creature->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000); + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiCallLightTimer < uiDiff) + { + m_creature->CastSpell(m_creature->getVictim(), SPELL_CALL_LIGHTNING, false); + m_uiCallLightTimer = urand(15000, 25000); + }else m_uiCallLightTimer -= uiDiff; + + if (m_uiStaticDisruptTimer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1)) + m_creature->CastSpell(pTarget, SPELL_STATIC_DISRUPTION, false); + + m_uiStaticDisruptTimer = urand(7000, 14000); + }else m_uiStaticDisruptTimer -= uiDiff; + + if (m_uiStormTimer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + { + if (m_creature->IsNonMeleeSpellCasted(false)) + m_creature->InterruptNonMeleeSpells(false); + + DoScriptText(EMOTE_STORM, m_creature); + m_creature->CastSpell(pTarget, SPELL_ELECTRICAL_STORM, false); + } + + m_uiStormTimer = 60000; + }else m_uiStormTimer -= uiDiff; + + if (m_uiGustOfWindTimer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1)) + m_creature->CastSpell(pTarget, SPELL_GUST_OF_WIND, false); + + m_uiGustOfWindTimer = urand(20000, 30000); + }else m_uiGustOfWindTimer -= uiDiff; + + if (m_uiSummonEagleTimer < uiDiff) + { + DoScriptText(urand(0,1) ? SAY_SUMMON : SAY_SUMMON_ALT, m_creature); + DoSummonEagles(); + m_uiSummonEagleTimer = 60000; + }else m_uiSummonEagleTimer -= uiDiff; + + if (!m_bIsBerserk && m_uiBerserkTimer < uiDiff) + { + DoScriptText(SAY_ENRAGE, m_creature); + m_creature->CastSpell(m_creature, SPELL_BERSERK, true); + m_bIsBerserk = true; + }else m_uiBerserkTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_akilzon(Creature* pCreature) +{ + return new boss_akilzonAI(pCreature); +} + +enum +{ + SPELL_EAGLE_SWOOP = 44732, + POINT_ID_RANDOM = 1 +}; + +struct MANGOS_DLL_DECL mob_soaring_eagleAI : public ScriptedAI +{ + mob_soaring_eagleAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 m_uiEagleSwoopTimer; + uint32 m_uiReturnTimer; + bool m_bCanMoveToRandom; + bool m_bCanCast; + + void Reset() + { + m_uiEagleSwoopTimer = urand(2000, 6000); + m_uiReturnTimer = 800; + m_bCanMoveToRandom = false; + m_bCanCast = true; + + } + + void AttackStart(Unit* pWho) + { + if (!pWho) + return; + + if (m_creature->Attack(pWho, false)) + { + m_creature->AddThreat(pWho, 0.0f); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + } + } + + void MovementInform(uint32 uiType, uint32 uiPointId) + { + if (uiType != POINT_MOTION_TYPE) + return; + + m_bCanCast = true; + } + + void DoMoveToRandom() + { + if (!m_pInstance) + return; + + if (Creature* pAzkil = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_AKILZON))) + { + float fX, fY, fZ; + pAzkil->GetRandomPoint(pAzkil->GetPositionX(), pAzkil->GetPositionY(), pAzkil->GetPositionZ()+15.0f, 30.0f, fX, fY, fZ); + + if (m_creature->HasMonsterMoveFlag(MONSTER_MOVE_WALK)) + m_creature->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + + m_creature->GetMotionMaster()->MovePoint(POINT_ID_RANDOM, fX, fY, fZ); + + m_bCanMoveToRandom = false; + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_bCanMoveToRandom) + { + if (m_uiReturnTimer < uiDiff) + { + DoMoveToRandom(); + m_uiReturnTimer = 800; + }else m_uiReturnTimer -= uiDiff; + } + + if (!m_bCanCast) + return; + + if (m_uiEagleSwoopTimer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + { + DoCast(pTarget,SPELL_EAGLE_SWOOP); + + m_bCanMoveToRandom = true; + m_bCanCast = false; + } + + m_uiEagleSwoopTimer = urand(4000, 6000); + }else m_uiEagleSwoopTimer -= uiDiff; + } +}; + +CreatureAI* GetAI_mob_soaring_eagle(Creature* pCreature) +{ + return new mob_soaring_eagleAI(pCreature); +} + +void AddSC_boss_akilzon() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_akilzon"; + newscript->GetAI = &GetAI_boss_akilzon; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_soaring_eagle"; + newscript->GetAI = &GetAI_mob_soaring_eagle; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp b/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp new file mode 100644 index 000000000..513569bd6 --- /dev/null +++ b/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp @@ -0,0 +1,400 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Halazzi +SD%Complete: 70 +SDComment: Details and timers need check. +SDCategory: Zul'Aman +EndScriptData */ + +#include "precompiled.h" +#include "zulaman.h" +#include "ObjectMgr.h" + +enum +{ + SAY_AGGRO = -1568034, + SAY_SPLIT = -1568035, + SAY_MERGE = -1568036, + SAY_SABERLASH1 = -1568037, + SAY_SABERLASH2 = -1568038, + SAY_BERSERK = -1568039, + SAY_KILL1 = -1568040, + SAY_KILL2 = -1568041, + SAY_DEATH = -1568042, + SAY_EVENT1 = -1568043, + SAY_EVENT2 = -1568044, + + SPELL_DUAL_WIELD = 42459, + SPELL_SABER_LASH = 43267, + SPELL_FRENZY = 43139, + SPELL_FLAMESHOCK = 43303, + SPELL_EARTHSHOCK = 43305, + SPELL_BERSERK = 45078, + + //SPELL_TRANSFORM_TO_ORIGINAL = 43311, + + //SPELL_TRANSFIGURE = 44054, + + SPELL_TRANSFIGURE_TO_TROLL = 43142, + //SPELL_TRANSFIGURE_TO_TROLL_TRIGGERED = 43573, + + SPELL_TRANSFORM_TO_LYNX_75 = 43145, + SPELL_TRANSFORM_TO_LYNX_50 = 43271, + SPELL_TRANSFORM_TO_LYNX_25 = 43272, + + SPELL_SUMMON_LYNX = 43143, + SPELL_SUMMON_TOTEM = 43302, + + NPC_TOTEM = 24224 +}; + +enum HalazziPhase +{ + PHASE_SINGLE = 0, + PHASE_TOTEM = 1, + PHASE_FINAL = 2 +}; + +struct MANGOS_DLL_DECL boss_halazziAI : public ScriptedAI +{ + boss_halazziAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 m_uiPhase; + uint32 m_uiPhaseCounter; + uint32 m_uiFrenzyTimer; + uint32 m_uiSaberLashTimer; + uint32 m_uiShockTimer; + uint32 m_uiTotemTimer; + uint32 m_uiCheckTimer; + uint32 m_uiBerserkTimer; + bool m_bIsBerserk; + + void Reset() + { + m_uiPhase = PHASE_SINGLE; // reset phase + m_uiPhaseCounter = 3; + + m_uiCheckTimer = IN_MILISECONDS; + m_uiFrenzyTimer = 16*IN_MILISECONDS; + m_uiSaberLashTimer = 20*IN_MILISECONDS; + m_uiShockTimer = 10*IN_MILISECONDS; + m_uiTotemTimer = 12*IN_MILISECONDS; + m_uiBerserkTimer = 10*MINUTE*IN_MILISECONDS; + m_bIsBerserk = false; + + m_creature->SetMaxHealth(m_creature->GetCreatureInfo()->maxhealth); + + if (m_pInstance) + { + if (Creature* pSpiritLynx = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_SPIRIT_LYNX))) + pSpiritLynx->ForcedDespawn(); + } + } + + void JustReachedHome() + { + m_pInstance->SetData(TYPE_HALAZZI, NOT_STARTED); + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + m_creature->SetInCombatWithZone(); + + if (m_pInstance) + m_pInstance->SetData(TYPE_HALAZZI, IN_PROGRESS); + } + + void KilledUnit(Unit* pVictim) + { + if (pVictim->GetTypeId() != TYPEID_PLAYER) + return; + + DoScriptText(urand(0, 1) ? SAY_KILL1 : SAY_KILL2, m_creature); + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_HALAZZI, DONE); + } + + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_SPIRIT_LYNX) + pSummoned->SetInCombatWithZone(); + } + + void DoUpdateStats(const CreatureInfo* pInfo) + { + m_creature->SetMaxHealth(pInfo->maxhealth); + + if (m_uiPhase == PHASE_SINGLE) + { + m_creature->SetHealth(m_creature->GetMaxHealth()/4*m_uiPhaseCounter); + --m_uiPhaseCounter; + } + } + + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + { + if (pSpell->EffectApplyAuraName[0] != SPELL_AURA_TRANSFORM) + return; + + // possibly hack and health should be set by Aura::HandleAuraTransform() + if (const CreatureInfo* pInfo = GetCreatureTemplateStore(pSpell->EffectMiscValue[0])) + DoUpdateStats(pInfo); + + if (m_uiPhase == PHASE_TOTEM) + DoCast(m_creature, SPELL_SUMMON_LYNX); + } + + void PhaseChange() + { + if (m_uiPhase == PHASE_SINGLE) + { + if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) <= 25*m_uiPhaseCounter) + { + if (!m_uiPhaseCounter) + { + // final phase + m_uiPhase = PHASE_FINAL; + m_uiFrenzyTimer = 16*IN_MILISECONDS; + m_uiSaberLashTimer = 20*IN_MILISECONDS; + } + else + { + m_uiPhase = PHASE_TOTEM; + m_uiShockTimer = 10*IN_MILISECONDS; + m_uiTotemTimer = 12*IN_MILISECONDS; + + DoScriptText(SAY_SPLIT, m_creature); + m_creature->CastSpell(m_creature, SPELL_TRANSFIGURE_TO_TROLL, false); + } + } + } + else + { + Creature* pSpiritLynx = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_SPIRIT_LYNX)); + + if (m_creature->GetHealth()*10 < m_creature->GetMaxHealth() || + (pSpiritLynx && pSpiritLynx->GetHealth()*10 < pSpiritLynx->GetMaxHealth())) + { + m_uiPhase = PHASE_SINGLE; + + DoScriptText(SAY_MERGE, m_creature); + + uint32 uiSpellId; + + switch(m_uiPhaseCounter) + { + case 3: uiSpellId = SPELL_TRANSFORM_TO_LYNX_75; break; + case 2: uiSpellId = SPELL_TRANSFORM_TO_LYNX_50; break; + case 1: uiSpellId = SPELL_TRANSFORM_TO_LYNX_25; break; + } + + m_creature->CastSpell(m_creature, uiSpellId, false); + + if (pSpiritLynx) + pSpiritLynx->ForcedDespawn(); + + m_uiFrenzyTimer = 16*IN_MILISECONDS; + m_uiSaberLashTimer = 20*IN_MILISECONDS; + } + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (!m_bIsBerserk) + { + if (m_uiBerserkTimer < uiDiff) + { + DoScriptText(SAY_BERSERK, m_creature); + DoCast(m_creature, SPELL_BERSERK,true); + m_bIsBerserk = true; + } + else + m_uiBerserkTimer -= uiDiff; + } + + if (m_uiPhase != PHASE_FINAL) + { + if (m_uiCheckTimer < uiDiff) + { + if (m_pInstance) + PhaseChange(); + else + m_uiPhase = PHASE_FINAL; + + m_uiCheckTimer = IN_MILISECONDS; + } + else + m_uiCheckTimer -= uiDiff; + } + + if (m_uiPhase == PHASE_FINAL || m_uiPhase == PHASE_SINGLE) + { + if (m_uiFrenzyTimer < uiDiff) + { + DoCast(m_creature, SPELL_FRENZY); + m_uiFrenzyTimer = 16*IN_MILISECONDS; + } + else + m_uiFrenzyTimer -= uiDiff; + + if (m_uiSaberLashTimer < uiDiff) + { + DoScriptText(urand(0, 1) ? SAY_SABERLASH1 : SAY_SABERLASH2, m_creature); + + DoCast(m_creature->getVictim(), SPELL_SABER_LASH); + m_uiSaberLashTimer = 20*IN_MILISECONDS; + } + else + m_uiSaberLashTimer -= uiDiff; + } + + if (m_uiPhase == PHASE_FINAL || m_uiPhase == PHASE_TOTEM) + { + if (m_uiTotemTimer < uiDiff) + { + DoCast(m_creature, SPELL_SUMMON_TOTEM); + m_uiTotemTimer = 20*IN_MILISECONDS; + } + else + m_uiTotemTimer -= uiDiff; + + if (m_uiShockTimer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + { + if (pTarget->IsNonMeleeSpellCasted(false)) + DoCast(pTarget, SPELL_EARTHSHOCK); + else + DoCast(pTarget, SPELL_FLAMESHOCK); + + m_uiShockTimer = urand(10000, 14000); + } + } + else + m_uiShockTimer -= uiDiff; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_halazzi(Creature* pCreature) +{ + return new boss_halazziAI(pCreature); +} + +enum +{ + SPELL_LYNX_FRENZY = 43290, + SPELL_SHRED_ARMOR = 43243 +}; + +struct MANGOS_DLL_DECL boss_spirit_lynxAI : public ScriptedAI +{ + boss_spirit_lynxAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 m_uiFrenzyTimer; + uint32 m_uiShredArmorTimer; + + void Reset() + { + m_uiFrenzyTimer = urand(10000, 20000); //first frenzy after 10-20 seconds + m_uiShredArmorTimer = 4000; + } + + void Aggro(Unit* pWho) + { + m_creature->SetInCombatWithZone(); + } + + void KilledUnit(Unit* pVictim) + { + if (!m_pInstance) + return; + + if (Creature* pHalazzi = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_HALAZZI))) + pHalazzi->AI()->KilledUnit(pVictim); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiFrenzyTimer < uiDiff) + { + DoCast(m_creature, SPELL_LYNX_FRENZY); + m_uiFrenzyTimer = urand(20000, 30000); //subsequent frenzys casted every 20-30 seconds + } + else + m_uiFrenzyTimer -= uiDiff; + + if (m_uiShredArmorTimer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_SHRED_ARMOR); + m_uiShredArmorTimer = 4000; + } + else + m_uiShredArmorTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_spirit_lynx(Creature* pCreature) +{ + return new boss_spirit_lynxAI(pCreature); +} + +void AddSC_boss_halazzi() +{ + Script* newscript; + + newscript = new Script; + newscript->Name = "boss_halazzi"; + newscript->GetAI = &GetAI_boss_halazzi; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_spirit_lynx"; + newscript->GetAI = &GetAI_boss_spirit_lynx; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp new file mode 100644 index 000000000..cc0cfd0a7 --- /dev/null +++ b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp @@ -0,0 +1,801 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Janalai +SD%Complete: 75 +SDComment: +SDCategory: Zul'Aman +EndScriptData */ + +#include "precompiled.h" +#include "zulaman.h" + +enum +{ + SAY_AGGRO = -1568000, + SAY_FIRE_BOMBS = -1568001, + SAY_SUMMON_HATCHER = -1568002, + SAY_ALL_EGGS = -1568003, + SAY_BERSERK = -1568004, + SAY_SLAY_1 = -1568005, + SAY_SLAY_2 = -1568006, + SAY_DEATH = -1568007, + SAY_EVENT_STRANGERS = -1568008, + SAY_EVENT_FRIENDS = -1568009, + + //Jan'alai + SPELL_FLAME_BREATH = 43140, + SPELL_FIRE_WALL = 43113, + SPELL_ENRAGE = 44779, + SPELL_TELETOCENTER = 43098, + SPELL_SUMMONALL = 43097, + SPELL_BERSERK = 47008, + SPELL_SUMMON_HATCHER_1 = 43962, + SPELL_SUMMON_HATCHER_2 = 45340, + + //Fire Bob Spells + SPELL_FIRE_BOMB_CHANNEL = 42621, + SPELL_FIRE_BOMB_THROW = 42628, + SPELL_FIRE_BOMB_DUMMY = 42629, + SPELL_FIRE_BOMB_DAMAGE = 42630, + + //NPC's + NPC_FIRE_BOMB = 23920, + NPC_AMANI_HATCHER_1 = 23818, + NPC_AMANI_HATCHER_2 = 24504, + NPC_HATCHLING = 23598, + + //Hatcher Spells + SPELL_HATCH_EGG = 43734, //spell 42471 also exist + SPELL_HATCH_ALL_EGGS = 43144, + + //Eggs spells + SPELL_SUMMON_DRAGONHAWK = 42493, + + //Hatchling Spells + SPELL_FLAMEBUFFED = 43299 +}; + +//spells should summon Fire Bomb, used in Throw5Bombs() +uint32 m_auiSpellFireBombSummon[]= +{ + 42622, 42623, 42624, 42625, 42626 +}; + +const int area_dx = 44; +const int area_dy = 51; + +float JanalainPos[1][3] = +{ + {-33.93, 1149.27, 19} +}; + +float FireWallCoords[4][4] = +{ + {-10.13, 1149.27, 19, M_PI}, + {-33.93, 1123.90, 19, 0.5*M_PI}, + {-54.80, 1150.08, 19, 0}, + {-33.93, 1175.68, 19, 1.5*M_PI} +}; + +struct WaypointDef +{ + float m_fX, m_fY, m_fZ; +}; + +WaypointDef m_aHatcherRight[]= +{ + {-86.203, 1136.834, 5.594}, //this is summon point, not regular waypoint + {-74.783, 1145.827, 5.420}, + {-56.957, 1146.713, 18.725}, + {-45.428, 1141.697, 18.709}, + {-34.002, 1124.427, 18.711}, + {-34.085, 1106.158, 18.711} +}; + +WaypointDef m_aHatcherLeft[]= +{ + {-85.420, 1167.321, 5.594}, //this is summon point, not regular waypoint + {-73.569, 1154.960, 5.510}, + {-56.985, 1153.373, 18.608}, + {-45.515, 1158.356, 18.709}, + {-33.314, 1174.816, 18.709}, + {-33.097, 1195.359, 18.709} +}; + +float hatcherway_l[5][3] = +{ + {-87.46,1170.09,6}, + {-74.41,1154.75,6}, + {-52.74,1153.32,19}, + {-33.37,1172.46,19}, + {-33.09,1203.87,19} +}; + +float hatcherway_r[5][3] = +{ + {-86.57,1132.85,6}, + {-73.94,1146.00,6}, + {-52.29,1146.51,19}, + {-33.57,1125.72,19}, + {-34.29,1095.22,19} +}; + +struct MANGOS_DLL_DECL boss_janalaiAI : public ScriptedAI +{ + boss_janalaiAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_uiHatcher1GUID = 0; + m_uiHatcher2GUID = 0; + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 fire_breath_timer; + + std::list m_lBombsGUIDList; + std::list m_lEggsRemainingList; + + uint32 m_uiBombTimer; + uint32 m_uiBombSequenzeTimer; + uint32 m_uiBombPhase; + uint32 m_uiBombCounter; + + uint32 enrage_timer; + uint32 hatchertime; + uint32 eggs; + uint32 wipetimer; + + bool m_bIsBombing; + bool m_bCanBlowUpBombs; + bool m_bIsEggRemaining; + bool enraged; + bool enragetime; + + uint64 m_uiHatcher1GUID; + uint64 m_uiHatcher2GUID; + + void Reset() + { + m_lBombsGUIDList.clear(); + m_lEggsRemainingList.clear(); + + if (Creature* pUnit = (Creature*)Unit::GetUnit(*m_creature, m_uiHatcher1GUID)) + { + pUnit->AI()->EnterEvadeMode(); + pUnit->setDeathState(JUST_DIED); + m_uiHatcher1GUID = 0; + } + + if (Creature* pUnit = (Creature*)Unit::GetUnit(*m_creature, m_uiHatcher2GUID)) + { + pUnit->AI()->EnterEvadeMode(); + pUnit->setDeathState(JUST_DIED); + m_uiHatcher2GUID = 0; + } + + fire_breath_timer = 8000; + + m_uiBombTimer = 30000; + m_bIsBombing = false; + m_uiBombSequenzeTimer = 1500; + m_uiBombPhase = 0; + m_uiBombCounter = 0; + m_bCanBlowUpBombs = false; + m_bIsEggRemaining = true; + + enrage_timer = MINUTE*5*IN_MILISECONDS; + hatchertime = 10000; + wipetimer = MINUTE*10*IN_MILISECONDS; + enraged = false; + enragetime = false; + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_JANALAI, NOT_STARTED); + } + + void JustDied(Unit* Killer) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_JANALAI, DONE); + } + + void KilledUnit(Unit* victim) + { + DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); + } + + void Aggro(Unit *who) + { + DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_JANALAI, IN_PROGRESS); + } + + void JustSummoned(Creature* pSummoned) + { + switch(pSummoned->GetEntry()) + { + case NPC_AMANI_HATCHER_1: + m_uiHatcher1GUID = pSummoned->GetGUID(); + break; + case NPC_AMANI_HATCHER_2: + m_uiHatcher2GUID = pSummoned->GetGUID(); + break; + case NPC_FIRE_BOMB: + if (m_bIsBombing) + { + //store bombs in list to be used in BlowUpBombs() + m_lBombsGUIDList.push_back(pSummoned->GetGUID()); + + if (pSummoned->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)) + pSummoned->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + //visual spell, spell hit pSummoned after a short time + m_creature->CastSpell(pSummoned,SPELL_FIRE_BOMB_THROW,true); + } + break; + } + } + + void SpellHitTarget(Unit* pUnit, const SpellEntry* pSpell) + { + //when spell actually hit the fire bombs, make then cast spell(making them "visible") + if (pUnit->GetEntry() == NPC_FIRE_BOMB && pSpell->Id == SPELL_FIRE_BOMB_THROW) + pUnit->CastSpell(pUnit,SPELL_FIRE_BOMB_DUMMY,false); + } + + void CreateFireWall() // Create Firewall + { + Creature* wall = NULL; + wall = m_creature->SummonCreature(NPC_FIRE_BOMB,FireWallCoords[0][0],FireWallCoords[0][1],FireWallCoords[0][2],FireWallCoords[0][3],TEMPSUMMON_TIMED_DESPAWN,11500); + if (wall) + wall->CastSpell(wall,SPELL_FIRE_WALL,false); + + wall = m_creature->SummonCreature(NPC_FIRE_BOMB,FireWallCoords[0][0],FireWallCoords[0][1]+5,FireWallCoords[0][2],FireWallCoords[0][3],TEMPSUMMON_TIMED_DESPAWN,11500); + if (wall) + wall->CastSpell(wall,SPELL_FIRE_WALL,false); + + wall = m_creature->SummonCreature(NPC_FIRE_BOMB,FireWallCoords[0][0],FireWallCoords[0][1]-5,FireWallCoords[0][2],FireWallCoords[0][3],TEMPSUMMON_TIMED_DESPAWN,11500); + if (wall) + wall->CastSpell(wall,SPELL_FIRE_WALL,false); + + wall = m_creature->SummonCreature(NPC_FIRE_BOMB,FireWallCoords[1][0]-2,FireWallCoords[1][1]-2,FireWallCoords[1][2],FireWallCoords[1][3],TEMPSUMMON_TIMED_DESPAWN,11500); + if (wall) + wall->CastSpell(wall,SPELL_FIRE_WALL,false); + + wall = m_creature->SummonCreature(NPC_FIRE_BOMB,FireWallCoords[1][0]+2,FireWallCoords[1][1]+2,FireWallCoords[1][2],FireWallCoords[1][3],TEMPSUMMON_TIMED_DESPAWN,11500); + if (wall) + wall->CastSpell(wall,SPELL_FIRE_WALL,false); + + wall = m_creature->SummonCreature(NPC_FIRE_BOMB,FireWallCoords[2][0],FireWallCoords[2][1],FireWallCoords[2][2],FireWallCoords[2][3],TEMPSUMMON_TIMED_DESPAWN,11500); + if (wall) + wall->CastSpell(wall,SPELL_FIRE_WALL,false); + + wall = m_creature->SummonCreature(NPC_FIRE_BOMB,FireWallCoords[2][0],FireWallCoords[2][1]-5,FireWallCoords[2][2],FireWallCoords[2][3],TEMPSUMMON_TIMED_DESPAWN,11500); + if (wall) + wall->CastSpell(wall,SPELL_FIRE_WALL,false); + + wall = m_creature->SummonCreature(NPC_FIRE_BOMB,FireWallCoords[2][0],FireWallCoords[2][1]+5,FireWallCoords[2][2],FireWallCoords[2][3],TEMPSUMMON_TIMED_DESPAWN,11500); + if (wall) + wall->CastSpell(wall,SPELL_FIRE_WALL,false); + + wall = m_creature->SummonCreature(NPC_FIRE_BOMB,FireWallCoords[3][0]-2,FireWallCoords[3][1],FireWallCoords[3][2],FireWallCoords[3][3],TEMPSUMMON_TIMED_DESPAWN,11500); + if (wall) + wall->CastSpell(wall,SPELL_FIRE_WALL,false); + + wall = m_creature->SummonCreature(NPC_FIRE_BOMB,FireWallCoords[3][0]+2,FireWallCoords[3][1],FireWallCoords[3][2],FireWallCoords[3][3],TEMPSUMMON_TIMED_DESPAWN,11500); + if (wall) + wall->CastSpell(wall,SPELL_FIRE_WALL,false); + } + + //workaround for summon to emulate effect. EffectImplicitTarget 73 not implemented + void Throw5Bombs() + { + //all available spells (each spell has different radius for summon location) + uint8 uiMaxBombs = sizeof(m_auiSpellFireBombSummon)/sizeof(uint32); + + float fX, fY, fZ; + float fRadius = 5.0f; + + for(uint8 i = 0; i < uiMaxBombs; ++i) + { + m_creature->CastSpell(m_creature, m_auiSpellFireBombSummon[i], true); + + //workaround part + m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), fRadius+(fRadius*i), fX, fY, fZ); + m_creature->SummonCreature(NPC_FIRE_BOMB, fX, fY, fZ, 0.0f, TEMPSUMMON_TIMED_DESPAWN, MINUTE*IN_MILISECONDS); + } + + ++m_uiBombCounter; + } + + //Teleport every player into the middle if more than 20 yards away (possibly what spell 43096 should do) + void TeleportPlayersOutOfRange() + { + std::list::iterator i = m_creature->getThreatManager().getThreatList().begin(); + + for (; i != m_creature->getThreatManager().getThreatList().end(); ++i) + { + Unit* pTemp = Unit::GetUnit((*m_creature),(*i)->getUnitGuid()); + + if (pTemp && pTemp->GetTypeId() == TYPEID_PLAYER && !m_creature->IsWithinDist(pTemp, 20.0f)) + m_creature->CastSpell(pTemp, SPELL_SUMMONALL, true); + } + } + + void BlowUpBombs() + { + if (m_lBombsGUIDList.empty()) + return; + + for(std::list::iterator itr = m_lBombsGUIDList.begin(); itr != m_lBombsGUIDList.end(); ++itr) + { + if (Unit* pUnit = Unit::GetUnit(*m_creature,*itr)) + { + //do damage and then remove aura (making them "disappear") + pUnit->CastSpell(pUnit,SPELL_FIRE_BOMB_DAMAGE,false,NULL,NULL,m_creature->GetGUID()); + pUnit->RemoveAurasDueToSpell(SPELL_FIRE_BOMB_DUMMY); + } + } + + m_lBombsGUIDList.clear(); + } + + void DoHatchRemainingEggs() + { + GetCreatureListWithEntryInGrid(m_lEggsRemainingList, m_creature, NPC_EGG, 125.0f); + + if (!m_lEggsRemainingList.empty()) + { + for(std::list::iterator itr = m_lEggsRemainingList.begin(); itr != m_lEggsRemainingList.end(); ++itr) + { + if ((*itr)->isAlive()) + (*itr)->CastSpell((*itr), SPELL_SUMMON_DRAGONHAWK, true); + } + + m_bIsEggRemaining = false; + + if (!m_pInstance) + return; + + if (uint32 uiEggsRemaining_Right = m_pInstance->GetData(DATA_J_EGGS_RIGHT)) + { + for(uint32 i = 0; i < uiEggsRemaining_Right; ++i) + m_pInstance->SetData(DATA_J_EGGS_RIGHT, SPECIAL); + } + + if (uint32 uiEggsRemaining_Left = m_pInstance->GetData(DATA_J_EGGS_LEFT)) + { + for(uint32 i = 0; i < uiEggsRemaining_Left; ++i) + m_pInstance->SetData(DATA_J_EGGS_LEFT, SPECIAL); + } + } + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //blow up bombs happen after bombing is over, so handle this here + if (m_bCanBlowUpBombs) + { + if (m_uiBombSequenzeTimer < diff) + { + BlowUpBombs(); + m_bCanBlowUpBombs = false; + }else m_uiBombSequenzeTimer -= diff; + } + + if (!m_bIsBombing) // every Spell if NOT Bombing + { + if (m_uiBombTimer < diff) + { + if (m_creature->IsNonMeleeSpellCasted(false)) + m_creature->InterruptNonMeleeSpells(false); + + DoScriptText(SAY_FIRE_BOMBS, m_creature); + + //first clear movement + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE) + m_creature->GetMotionMaster()->MovementExpired(); + + //then teleport self + DoCast(m_creature,SPELL_TELETOCENTER,true); + + //then players and create the firewall + TeleportPlayersOutOfRange(); + CreateFireWall(); + + //prepare variables for bombing sequenze + m_lBombsGUIDList.clear(); + + m_uiBombPhase = 0; + m_uiBombSequenzeTimer = 500; + m_uiBombCounter = 0; + + m_uiBombTimer = urand(20000, 40000); + m_bIsBombing = true; + + //we don't want anything else to happen this Update() + return; + }else m_uiBombTimer -=diff; + + //FIRE BREATH several videos says every 8Secounds + if (fire_breath_timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_FLAME_BREATH); + fire_breath_timer = 8000; + }else fire_breath_timer -=diff; + + //enrage if under 25% hp before 5 min. + if (((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 25) && !enraged) + { + enragetime = true; + enrage_timer = 600000; + } + + //Enrage but only if not bombing + if (enragetime && !enraged) + { + DoScriptText(SAY_BERSERK, m_creature); + + m_creature->InterruptNonMeleeSpells(false); + DoCast(m_creature,SPELL_ENRAGE); + enraged = true; + } + + //Hatch All + if (m_bIsEggRemaining && (m_creature->GetHealth()*100) / m_creature->GetMaxHealth() < 35) + { + DoScriptText(SAY_ALL_EGGS, m_creature); + + if (m_creature->IsNonMeleeSpellCasted(false)) + m_creature->InterruptNonMeleeSpells(false); + + DoCast(m_creature, SPELL_HATCH_ALL_EGGS); + + DoHatchRemainingEggs(); + } + + DoMeleeAttackIfReady(); + } + else // every Spell if Bombing + { + if (m_uiBombSequenzeTimer < diff) + { + switch(m_uiBombPhase) + { + case 0: + m_creature->CastSpell(m_creature,SPELL_FIRE_BOMB_CHANNEL,true); + m_uiBombSequenzeTimer = 500; + ++m_uiBombPhase; + break; + case 1: + if (m_uiBombCounter < 8) + { + Throw5Bombs(); + m_uiBombSequenzeTimer = 500; + } + else + { + m_uiBombSequenzeTimer = 1000; + ++m_uiBombPhase; + } + break; + case 2: + m_bCanBlowUpBombs = true; + m_uiBombSequenzeTimer = 2000; + m_creature->RemoveAurasDueToSpell(SPELL_FIRE_BOMB_CHANNEL); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + m_bIsBombing = false; + break; + } + + }else m_uiBombSequenzeTimer -= diff; + } + + //Enrage after 5 minutes + if (enrage_timer < diff) + { + enragetime = true; + enrage_timer = 600000; + }else enrage_timer -=diff; + + //Call Hatcher + if (m_bIsEggRemaining) + { + if (hatchertime < diff) + { + if (m_pInstance->GetData(DATA_J_EGGS_LEFT) > 0 || m_pInstance->GetData(DATA_J_EGGS_RIGHT) > 0) + { + DoScriptText(SAY_SUMMON_HATCHER, m_creature); + + Unit* pHatcer1 = Unit::GetUnit(*m_creature, m_uiHatcher1GUID); + Unit* pHatcer2 = Unit::GetUnit(*m_creature, m_uiHatcher2GUID); + + if (!pHatcer1 || (pHatcer1 && !pHatcer1->isAlive())) + { + if (Creature* pHatcher = m_creature->SummonCreature(NPC_AMANI_HATCHER_1, m_aHatcherRight[0].m_fX, m_aHatcherRight[0].m_fY, m_aHatcherRight[0].m_fZ, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0)) + pHatcher->GetMotionMaster()->MovePoint(1, m_aHatcherRight[1].m_fX, m_aHatcherRight[1].m_fY, m_aHatcherRight[1].m_fZ); + } + + if (!pHatcer2 || (pHatcer2 && !pHatcer2->isAlive())) + { + if (Creature* pHatcher = m_creature->SummonCreature(NPC_AMANI_HATCHER_2, m_aHatcherLeft[0].m_fX, m_aHatcherLeft[0].m_fY, m_aHatcherLeft[0].m_fZ, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0)) + pHatcher->GetMotionMaster()->MovePoint(1, m_aHatcherLeft[1].m_fX, m_aHatcherLeft[1].m_fY, m_aHatcherLeft[1].m_fZ); + } + + hatchertime = 90000; + } + else + m_bIsEggRemaining = false; + + }else hatchertime -=diff; + } + + //WIPE after 10 minutes + if (wipetimer < diff) + { + DoScriptText(SAY_BERSERK, m_creature); + DoCast(m_creature,SPELL_ENRAGE); + wipetimer = 30000; + }else wipetimer -=diff; + + //check for reset ... exploit preventing ... pulled from his podest + EnterEvadeIfOutOfCombatArea(diff); + } +}; + +CreatureAI* GetAI_boss_janalaiAI(Creature* pCreature) +{ + return new boss_janalaiAI(pCreature); +} + +struct MANGOS_DLL_DECL mob_jandalai_firebombAI : public ScriptedAI +{ + mob_jandalai_firebombAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + void Reset() {} + + void AttackStart(Unit* who) {} + + void MoveInLineOfSight(Unit* who) {} + + void UpdateAI(const uint32 diff) {} +}; + +CreatureAI* GetAI_mob_jandalai_firebombAI(Creature* pCreature) +{ + return new mob_jandalai_firebombAI(pCreature); +} + +struct MANGOS_DLL_DECL mob_amanishi_hatcherAI : public ScriptedAI +{ + mob_amanishi_hatcherAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 m_uiWaypoint; + uint32 m_uiHatchlingTimer; + uint32 m_uiHatchlingCount; + bool m_bCanMoveNext; + bool m_bWaypointEnd; + + void Reset() + { + m_uiWaypoint = 0; + m_uiHatchlingTimer = 1000; + m_uiHatchlingCount = 1; + m_bCanMoveNext = false; + m_bWaypointEnd = false; + + if (m_creature->HasMonsterMoveFlag(MONSTER_MOVE_WALK)) + m_creature->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + } + + void MoveInLineOfSight(Unit* pWho) {} + + void AttackStart(Unit* pWho) + { + if (!pWho) + return; + + if (m_creature->Attack(pWho, false)) + { + m_creature->AddThreat(pWho, 0.0f); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + } + } + + void MovementInform(uint32 uiType, uint32 uiPointId) + { + if (uiType != POINT_MOTION_TYPE || m_bWaypointEnd) + return; + + uint32 uiCount = (m_creature->GetEntry() == NPC_AMANI_HATCHER_1) ? + (sizeof(m_aHatcherRight)/sizeof(WaypointDef)) : (sizeof(m_aHatcherLeft)/sizeof(WaypointDef)); + + m_uiWaypoint = uiPointId+1; + + if (uiCount == m_uiWaypoint) + m_bWaypointEnd = true; + + m_bCanMoveNext = true; + } + + void DoHatchEggs(uint32 uiCount) + { + uint32 uiSaveRightOrLeft = m_creature->GetEntry() == NPC_AMANI_HATCHER_1 ? DATA_J_EGGS_RIGHT : DATA_J_EGGS_LEFT; + + for(uint32 i = 0; i < uiCount; ++i) + { + if (Creature* pEgg = GetClosestCreatureWithEntry(m_creature, NPC_EGG, 40.0f)) + pEgg->CastSpell(pEgg, SPELL_SUMMON_DRAGONHAWK, true); + + m_pInstance->SetData(uiSaveRightOrLeft, SPECIAL); + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_bCanMoveNext) + { + m_bCanMoveNext = false; + + if (m_bWaypointEnd) + m_creature->GetMotionMaster()->Clear(); + else + { + if (m_creature->GetEntry() == NPC_AMANI_HATCHER_1) + m_creature->GetMotionMaster()->MovePoint(m_uiWaypoint, m_aHatcherRight[m_uiWaypoint].m_fX, m_aHatcherRight[m_uiWaypoint].m_fY, m_aHatcherRight[m_uiWaypoint].m_fZ); + else + m_creature->GetMotionMaster()->MovePoint(m_uiWaypoint, m_aHatcherLeft[m_uiWaypoint].m_fX, m_aHatcherLeft[m_uiWaypoint].m_fY, m_aHatcherLeft[m_uiWaypoint].m_fZ); + } + } + + if (m_bWaypointEnd) + { + if (m_uiHatchlingTimer < uiDiff) + { + m_uiHatchlingTimer = 10000; + + if (!m_pInstance) + return; + + uint32 uiEggsRemaining = m_creature->GetEntry() == NPC_AMANI_HATCHER_1 ? m_pInstance->GetData(DATA_J_EGGS_RIGHT) : m_pInstance->GetData(DATA_J_EGGS_LEFT); + + if (!uiEggsRemaining) + { + //instead, should run to other side and start hatch if eggs remain + m_creature->ForcedDespawn(); + return; + } + else if (m_uiHatchlingCount == uiEggsRemaining/2) + m_uiHatchlingCount = uiEggsRemaining; + + DoCast(m_creature,SPELL_HATCH_EGG); + + DoHatchEggs(m_uiHatchlingCount); + + ++m_uiHatchlingCount; + + }else m_uiHatchlingTimer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_mob_amanishi_hatcherAI(Creature* pCreature) +{ + return new mob_amanishi_hatcherAI(pCreature); +} + +struct MANGOS_DLL_DECL mob_hatchlingAI : public ScriptedAI +{ + mob_hatchlingAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 buffer_timer; + bool start; + + void Reset() + { + buffer_timer = 7000; + start = false; + } + + void UpdateAI(const uint32 diff) + { + if (!start) + { + if (m_creature->GetPositionY() > 1150) + m_creature->GetMotionMaster()->MovePoint(0, hatcherway_l[3][0]+rand()%4-2,hatcherway_l[3][1]+rand()%4-2,hatcherway_l[3][2]); + else + m_creature->GetMotionMaster()->MovePoint(0,hatcherway_r[3][0]+rand()%4-2,hatcherway_r[3][1]+rand()%4-2,hatcherway_r[3][2]); + start = true; + } + + if (m_pInstance && m_pInstance->GetData(TYPE_JANALAI) == NOT_STARTED) + { + m_creature->ForcedDespawn(); + return; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (buffer_timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_FLAMEBUFFED); + + buffer_timer = 7000; + }else buffer_timer -=diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_hatchlingAI(Creature* pCreature) +{ + return new mob_hatchlingAI(pCreature); +} + +void AddSC_boss_janalai() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_janalai"; + newscript->GetAI = &GetAI_boss_janalaiAI; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_jandalai_firebomb"; + newscript->GetAI = &GetAI_mob_jandalai_firebombAI; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_amanishi_hatcher"; + newscript->GetAI = &GetAI_mob_amanishi_hatcherAI; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_hatchling"; + newscript->GetAI = &GetAI_mob_hatchlingAI; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp b/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp new file mode 100644 index 000000000..c545d5692 --- /dev/null +++ b/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp @@ -0,0 +1,868 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Malacrass +SD%Complete: 10 +SDComment: Contain adds and adds selection +SDCategory: Zul'Aman +EndScriptData */ + +#include "precompiled.h" +#include "zulaman.h" + +enum +{ + SAY_AGGRO = -1568045, + SAY_ENRAGE = -1568046, + SAY_KILL1 = -1568047, + SAY_KILL2 = -1568048, + SAY_SOUL_SIPHON = -1568049, + SAY_DRAIN_POWER = -1568050, + SAY_SPIRIT_BOLTS = -1568051, + SAY_ADD_DIED1 = -1568052, + SAY_ADD_DIED2 = -1568053, + SAY_ADD_DIED3 = -1568054, + SAY_DEATH = -1568055, + + SPELL_SPIRIT_BOLTS = 43383, + SPELL_SIPHON_SOUL = 43501, + SPELL_DRAIN_POWER = 44131, + + //for various powers he uses after using soul drain + //Death Knight + SPELL_DK_DEATH_AND_DECAY = 61603, + SPELL_DK_PLAGUE_STRIKE = 61606, + SPELL_DK_MARK_OF_BLOOD = 61600, + + //Druid + SPELL_DR_THORNS = 43420, + SPELL_DR_LIFEBLOOM = 43421, + SPELL_DR_MOONFIRE = 43545, + + //Hunter + SPELL_HU_EXPLOSIVE_TRAP = 43444, + SPELL_HU_FREEZING_TRAP = 43447, + SPELL_HU_SNAKE_TRAP = 43449, + + //Mage + SPELL_MG_FIREBALL = 41383, + SPELL_MG_FROST_NOVA = 43426, + SPELL_MG_ICE_LANCE = 43427, + SPELL_MG_FROSTBOLT = 43428, + + //Paladin + SPELL_PA_CONSECRATION = 43429, + SPELL_PA_AVENGING_WRATH = 43430, + SPELL_PA_HOLY_LIGHT = 43451, + + //Priest + SPELL_PR_HEAL = 41372, + SPELL_PR_MIND_BLAST = 41374, + SPELL_PR_SW_DEATH = 41375, + SPELL_PR_PSYCHIC_SCREAM = 43432, + SPELL_PR_MIND_CONTROL = 43550, + SPELL_PR_PAIN_SUPP = 44416, + + //Rogue + SPELL_RO_WOUND_POISON = 39665, + SPELL_RO_BLIND = 43433, + SPELL_RO_SLICE_DICE = 43457, + + //Shaman + SPELL_SH_CHAIN_LIGHT = 43435, + SPELL_SH_FIRE_NOVA = 43436, + SPELL_SH_HEALING_WAVE = 43548, + + //Warlock + SPELL_WL_CURSE_OF_DOOM = 43439, + SPELL_WL_RAIN_OF_FIRE = 43440, + SPELL_WL_UNSTABLE_AFFL = 35183, + + //Warrior + SPELL_WR_MORTAL_STRIKE = 43441, + SPELL_WR_WHIRLWIND = 43442, + SPELL_WR_SPELL_REFLECT = 43443, + + //misc + //WEAPON_ID = 33494, //weapon equip id, must be set by database. + MAX_ACTIVE_ADDS = 4 +}; + +//Adds X positions +static float m_afAddPosX[4] = {128.279, 123.261, 112.084, 106.473}; + +const float ADD_POS_Y = 921.279; +const float ADD_POS_Z = 33.889; +const float ADD_ORIENT = 1.527; + +struct SpawnGroup +{ + uint32 m_uiCreatureEntry; + uint32 m_uiCreatureEntryAlt; +}; + +SpawnGroup m_auiSpawnEntry[] = +{ + {24240, 24241}, //Alyson Antille / Thurg + {24242, 24243}, //Slither / Lord Raadan + {24244, 24245}, //Gazakroth / Fenstalker + {24246, 24247}, //Darkheart / Koragg +}; + +struct MANGOS_DLL_DECL boss_malacrassAI : public ScriptedAI +{ + boss_malacrassAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + memset(&m_auiAddGUIDs, 0, sizeof(m_auiAddGUIDs)); + m_lAddsEntryList.clear(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + std::list m_lAddsEntryList; + uint64 m_auiAddGUIDs[MAX_ACTIVE_ADDS]; + + void Reset() + { + InitializeAdds(); + + if (!m_pInstance) + return; + + m_pInstance->SetData(TYPE_MALACRASS, NOT_STARTED); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_MALACRASS, FAIL); + + for(uint8 i = 0; i < MAX_ACTIVE_ADDS; ++i) + { + if (Creature* pAdd = (Creature*)Unit::GetUnit(*m_creature, m_auiAddGUIDs[i])) + pAdd->AI()->EnterEvadeMode(); + } + } + + void InitializeAdds() + { + //not if m_creature are dead, so avoid + if (!m_creature->isAlive()) + return; + + uint8 j = 0; + + //it's empty, so first time + if (m_lAddsEntryList.empty()) + { + //fill list with entries from creature array + for(uint8 i = 0; i < MAX_ACTIVE_ADDS; ++i) + m_lAddsEntryList.push_back(rand()%2 ? m_auiSpawnEntry[i].m_uiCreatureEntry : m_auiSpawnEntry[i].m_uiCreatureEntryAlt); + + //summon mobs from the list + for(std::list::iterator itr = m_lAddsEntryList.begin(); itr != m_lAddsEntryList.end(); ++itr) + { + if (Creature* pAdd = m_creature->SummonCreature((*itr), m_afAddPosX[j], ADD_POS_Y, ADD_POS_Z, ADD_ORIENT, TEMPSUMMON_CORPSE_DESPAWN, 0)) + m_auiAddGUIDs[j] = pAdd->GetGUID(); + + ++j; + } + } + else + { + for(std::list::iterator itr = m_lAddsEntryList.begin(); itr != m_lAddsEntryList.end(); ++itr) + { + Unit* pAdd = Unit::GetUnit(*m_creature, m_auiAddGUIDs[j]); + + //object already removed, not exist + if (!pAdd) + { + if (Creature* pAdd = m_creature->SummonCreature((*itr), m_afAddPosX[j], ADD_POS_Y, ADD_POS_Z, ADD_ORIENT, TEMPSUMMON_CORPSE_DESPAWN, 0)) + m_auiAddGUIDs[j] = pAdd->GetGUID(); + } + ++j; + } + } + } + + void Aggro(Unit* pWho) + { + m_creature->SetInCombatWithZone(); + + DoScriptText(SAY_AGGRO, m_creature); + AddsAttack(pWho); + + if (!m_pInstance) + return; + + m_pInstance->SetData(TYPE_MALACRASS, IN_PROGRESS); + } + + void AddsAttack(Unit* pWho) + { + for(uint8 i = 0; i < MAX_ACTIVE_ADDS; ++i) + { + if (Creature* pAdd = (Creature*)Unit::GetUnit(*m_creature, m_auiAddGUIDs[i])) + { + if (!pAdd->getVictim()) + pAdd->AI()->AttackStart(pWho); + } + } + } + + void KilledUnit(Unit* pVictim) + { + if (pVictim->GetTypeId() != TYPEID_PLAYER) + return; + + DoScriptText(urand(0, 1) ? SAY_KILL1 : SAY_KILL2, m_creature); + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + CleanAdds(); + + if (!m_pInstance) + return; + + m_pInstance->SetData(TYPE_MALACRASS, DONE); + } + + void CleanAdds() + { + for(uint8 i = 0; i < MAX_ACTIVE_ADDS; ++i) + { + if (Creature* pAdd = (Creature*)Unit::GetUnit(*m_creature, m_auiAddGUIDs[i])) + { + pAdd->AI()->EnterEvadeMode(); + pAdd->setDeathState(JUST_DIED); + } + } + + memset(&m_auiAddGUIDs, 0, sizeof(m_auiAddGUIDs)); + m_lAddsEntryList.clear(); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_malacrass(Creature* pCreature) +{ + return new boss_malacrassAI(pCreature); +} + +//common AI for adds +struct MANGOS_DLL_DECL boss_malacrass_addAI : public ScriptedAI +{ + boss_malacrass_addAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + void Reset() { } + + void Aggro(Unit* pWho) + { + m_creature->SetInCombatWithZone(); + } + + void MoveInLineOfSight(Unit* pWho) + { + } + + void KilledUnit(Unit* pVictim) + { + if (!m_pInstance) + return; + + if (Creature* pMalacrass = (Creature*)Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_MALACRASS))) + ((boss_malacrassAI*)pMalacrass->AI())->KilledUnit(pVictim); + } + + void JustDied(Unit* pKiller) + { + if (!m_pInstance) + return; + + if (Unit* pMalacrass = Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_MALACRASS))) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_ADD_DIED1, pMalacrass); break; + case 1: DoScriptText(SAY_ADD_DIED2, pMalacrass); break; + case 2: DoScriptText(SAY_ADD_DIED3, pMalacrass); break; + } + } + } + + bool IsEnemyPlayerInRangeForSpell(uint32 uiSpellId) + { + SpellEntry const* pSpell = GetSpellStore()->LookupEntry(uiSpellId); + + //if spell not valid + if (!pSpell) + return false; + + //spell known, so lookup using rangeIndex + SpellRangeEntry const* pSpellRange = GetSpellRangeStore()->LookupEntry(pSpell->rangeIndex); + + //not valid, so return + if (!pSpellRange) + return false; + + std::list& lThreatList = m_creature->getThreatManager().getThreatList(); + + for(std::list::iterator iter = lThreatList.begin(); iter != lThreatList.end(); ++iter) + { + Unit* pTarget = Unit::GetUnit((*m_creature), (*iter)->getUnitGuid()); + + if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER) + { + //if target further away than maxrange or closer than minrange, statement is false + if (m_creature->IsInRange(pTarget, pSpellRange->minRange, pSpellRange->maxRange)) + return true; + } + } + + return false; + } +}; + +enum +{ + SPELL_BLOODLUST = 43578, + SPELL_CLEAVE = 15496 +}; + +struct MANGOS_DLL_DECL mob_thurgAI : public boss_malacrass_addAI +{ + mob_thurgAI(Creature* pCreature) : boss_malacrass_addAI(pCreature) { Reset(); } + + uint32 m_uiBloodlustTimer; + uint32 m_uiCleaveTimer; + + void Reset() + { + m_uiBloodlustTimer = 15000; + m_uiCleaveTimer = 10000; + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiBloodlustTimer < uiDiff) + { + std::list lTempList = DoFindFriendlyMissingBuff(50.0f, SPELL_BLOODLUST); + + if (!lTempList.empty()) + { + Unit* pTarget = *(lTempList.begin()); + DoCast(pTarget, SPELL_BLOODLUST); + } + + m_uiBloodlustTimer = 12000; + } + else + m_uiBloodlustTimer -= uiDiff; + + if (m_uiCleaveTimer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_CLEAVE); + m_uiCleaveTimer = 12000; + } + else + m_uiCleaveTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_thurg(Creature* pCreature) +{ + return new mob_thurgAI(pCreature); +} + +enum +{ + SPELL_ARCANE_TORRENT = 33390, + SPELL_FLASH_HEAL = 43575, + SPELL_DISPEL_MAGIC = 43577 +}; + +const float RANGE_FRIENDLY_TARGET = 40.0; + +struct MANGOS_DLL_DECL mob_alyson_antilleAI : public boss_malacrass_addAI +{ + mob_alyson_antilleAI(Creature* pCreature) : boss_malacrass_addAI(pCreature) { Reset(); } + + uint32 m_uiArcaneTorrentTimer; + uint32 m_uiFlashHealTimer; + uint32 m_uiDispelMagicTimer; + + void Reset() + { + m_uiArcaneTorrentTimer = 0; + m_uiFlashHealTimer = 2500; + m_uiDispelMagicTimer = 10000; + } + + void AttackStart(Unit* pWho) + { + if (!pWho) + return; + + if (m_creature->Attack(pWho, false)) + { + m_creature->AddThreat(pWho, 0.0f); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + + m_creature->GetMotionMaster()->MoveChase(pWho, 20.0f); + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiArcaneTorrentTimer < uiDiff) + { + if (IsEnemyPlayerInRangeForSpell(SPELL_ARCANE_TORRENT)) + { + DoCast(m_creature, SPELL_ARCANE_TORRENT); + m_uiArcaneTorrentTimer = 60000; + } + else + m_uiArcaneTorrentTimer = 1000; + } + else + m_uiArcaneTorrentTimer -= uiDiff; + + if (m_uiFlashHealTimer < uiDiff) + { + //this will fail if we previously was following target and pTarget is now different than before + if (Unit* pTarget = DoSelectLowestHpFriendly(RANGE_FRIENDLY_TARGET*2, 30000)) + { + if (pTarget->IsWithinDistInMap(m_creature, RANGE_FRIENDLY_TARGET)) + { + DoCast(pTarget, SPELL_FLASH_HEAL); + + //if not already chasing, start chase + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != TARGETED_MOTION_TYPE) + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim(), 20.0f); + } + else + { + //if chasing, start follow target instead + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE) + { + m_creature->GetMotionMaster()->MovementExpired(); + m_creature->GetMotionMaster()->MoveFollow(pTarget, 20.0f, 0.0f); + } + } + } + + m_uiFlashHealTimer = 2500; + } + else + m_uiFlashHealTimer -= uiDiff; + + if (m_uiDispelMagicTimer < uiDiff) + { + Unit* pTarget = NULL; + std::list lTempList = DoFindFriendlyCC(RANGE_FRIENDLY_TARGET); + + if (!lTempList.empty()) + pTarget = *(lTempList.begin()); + else + pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); + + if (pTarget) + DoCast(pTarget, SPELL_DISPEL_MAGIC, false); + + m_uiDispelMagicTimer = 12000; + } + else + m_uiDispelMagicTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_alyson_antille(Creature* pCreature) +{ + return new mob_alyson_antilleAI(pCreature); +} + +enum +{ + SPELL_FIREBOLT = 43584 +}; + +struct MANGOS_DLL_DECL mob_gazakrothAI : public boss_malacrass_addAI +{ + mob_gazakrothAI(Creature* pCreature) : boss_malacrass_addAI(pCreature){ Reset(); } + + uint32 m_uiFireboltTimer; + + void Reset() + { + m_uiFireboltTimer = 1000; + } + + void AttackStart(Unit* pWho) + { + if (!pWho) + return; + + if (m_creature->Attack(pWho, false)) + { + m_creature->AddThreat(pWho, 0.0f); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + + m_creature->GetMotionMaster()->MoveChase(pWho, 20.0f); + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiFireboltTimer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_FIREBOLT); + m_uiFireboltTimer = 1000; + } + else + m_uiFireboltTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_gazakroth(Creature* pCreature) +{ + return new mob_gazakrothAI(pCreature); +} + +enum +{ + SPELL_FLAME_BREATH = 43582, + SPELL_THUNDERCLAP = 43583 +}; + +struct MANGOS_DLL_DECL mob_lord_raadanAI : public boss_malacrass_addAI +{ + mob_lord_raadanAI(Creature* pCreature) : boss_malacrass_addAI(pCreature) { Reset(); } + + uint32 m_uiFlameBreathTimer; + uint32 m_uiThunderclapTimer; + + void Reset() + { + m_uiFlameBreathTimer = 8000; + m_uiThunderclapTimer = 13000; + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiThunderclapTimer < uiDiff) + { + if (IsEnemyPlayerInRangeForSpell(SPELL_THUNDERCLAP)) + { + DoCast(m_creature->getVictim(), SPELL_THUNDERCLAP); + m_uiThunderclapTimer = 12000; + } + else + m_uiThunderclapTimer = 1000; + } + else + m_uiThunderclapTimer -= uiDiff; + + if (m_uiFlameBreathTimer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_FLAME_BREATH); + m_uiFlameBreathTimer = 12000; + } + else + m_uiFlameBreathTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_lord_raadan(Creature* pCreature) +{ + return new mob_lord_raadanAI(pCreature); +} + +enum +{ + SPELL_PSYCHIC_WAIL = 43590 +}; + +struct MANGOS_DLL_DECL mob_darkheartAI : public boss_malacrass_addAI +{ + mob_darkheartAI(Creature* pCreature) : boss_malacrass_addAI(pCreature) { Reset(); } + + uint32 m_uiPsychicWailTimer; + + void Reset() + { + m_uiPsychicWailTimer = 8000; + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiPsychicWailTimer < uiDiff) + { + if (IsEnemyPlayerInRangeForSpell(SPELL_PSYCHIC_WAIL)) + { + DoCast(m_creature->getVictim(), SPELL_PSYCHIC_WAIL); + m_uiPsychicWailTimer = 12000; + } + else + m_uiPsychicWailTimer = 1000; + } + else + m_uiPsychicWailTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_darkheart(Creature* pCreature) +{ + return new mob_darkheartAI(pCreature); +} + +enum +{ + SPELL_VENOM_SPIT = 43579 +}; + +struct MANGOS_DLL_DECL mob_slitherAI : public boss_malacrass_addAI +{ + mob_slitherAI(Creature* pCreature) : boss_malacrass_addAI(pCreature) { Reset(); } + + uint32 m_uiVenomSpitTimer; + + void Reset() + { + m_uiVenomSpitTimer = 4000; + } + + void AttackStart(Unit* pWho) + { + if (!pWho) + return; + + if (m_creature->Attack(pWho, false)) + { + m_creature->AddThreat(pWho, 0.0f); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + + m_creature->GetMotionMaster()->MoveChase(pWho, 20.0f); + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiVenomSpitTimer < uiDiff) + { + if (Unit* pVictim = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pVictim, SPELL_VENOM_SPIT); + + m_uiVenomSpitTimer = 2500; + } + else + m_uiVenomSpitTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_slither(Creature* pCreature) +{ + return new mob_slitherAI(pCreature); +} + +enum +{ + SPELL_VOLATILE_INFECTION = 43586 +}; + +struct MANGOS_DLL_DECL mob_fenstalkerAI : public boss_malacrass_addAI +{ + mob_fenstalkerAI(Creature* pCreature) : boss_malacrass_addAI(pCreature) { Reset(); } + + uint32 m_uiVolatileInfectionTimer; + + void Reset() + { + m_uiVolatileInfectionTimer = 15000; + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiVolatileInfectionTimer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_VOLATILE_INFECTION); + m_uiVolatileInfectionTimer = 12000; + } + else + m_uiVolatileInfectionTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_fenstalker(Creature* pCreature) +{ + return new mob_fenstalkerAI(pCreature); +} + +enum +{ + SPELL_COLD_STARE = 43593, + SPELL_MIGHTY_BLOW = 43592, +}; + +struct MANGOS_DLL_DECL mob_koraggAI : public boss_malacrass_addAI +{ + mob_koraggAI(Creature* pCreature) : boss_malacrass_addAI(pCreature) { Reset(); } + + uint32 m_uiColdStareTimer; + uint32 m_uiMightyBlowTimer; + + void Reset() + { + m_uiColdStareTimer = 15000; + m_uiMightyBlowTimer = 10000; + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiMightyBlowTimer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_MIGHTY_BLOW); + m_uiMightyBlowTimer = 12000; + } + else + m_uiMightyBlowTimer -= uiDiff; + + if (m_uiColdStareTimer < uiDiff) + { + if (Unit* pVictim = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pVictim, SPELL_COLD_STARE); + + m_uiColdStareTimer = 12000; + } + else + m_uiColdStareTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_koragg(Creature* pCreature) +{ + return new mob_koraggAI(pCreature); +} + +void AddSC_boss_malacrass() +{ + Script* newscript; + + newscript = new Script; + newscript->Name = "boss_malacrass"; + newscript->GetAI = &GetAI_boss_malacrass; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_thurg"; + newscript->GetAI = &GetAI_mob_thurg; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_gazakroth"; + newscript->GetAI = &GetAI_mob_gazakroth; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_lord_raadan"; + newscript->GetAI = &GetAI_mob_lord_raadan; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_darkheart"; + newscript->GetAI = &GetAI_mob_darkheart; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_slither"; + newscript->GetAI = &GetAI_mob_slither; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_fenstalker"; + newscript->GetAI = &GetAI_mob_fenstalker; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_koragg"; + newscript->GetAI = &GetAI_mob_koragg; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_alyson_antille"; + newscript->GetAI = &GetAI_mob_alyson_antille; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp b/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp new file mode 100644 index 000000000..77548f44c --- /dev/null +++ b/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp @@ -0,0 +1,255 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Nalorakk +SD%Complete: 80 +SDComment: Todo: Trash Waves +SDCategory: Zul'Aman +EndScriptData */ + +#include "precompiled.h" +#include "zulaman.h" + +enum +{ + SAY_WAVE1_AGGRO = -1568010, + SAY_WAVE2_STAIR1 = -1568011, + SAY_WAVE3_STAIR2 = -1568012, + SAY_WAVE4_PLATFORM = -1568013, + + SAY_EVENT1_SACRIFICE = -1568014, + SAY_EVENT2_SACRIFICE = -1568015, + + SAY_AGGRO = -1568016, + SAY_SURGE = -1568017, + SAY_TOBEAR = -1568018, + SAY_TOTROLL = -1568019, + SAY_BERSERK = -1568020, + SAY_SLAY1 = -1568021, + SAY_SLAY2 = -1568022, + SAY_DEATH = -1568023, + + SPELL_BERSERK = 45078, //unsure, this increases damage, size and speed + + //Defines for Troll form + SPELL_BRUTALSWIPE = 42384, + SPELL_MANGLE = 42389, + SPELL_SURGE = 42402, + SPELL_BEARFORM = 42377, + + //Defines for Bear form + SPELL_LACERATINGSLASH = 42395, + SPELL_RENDFLESH = 42397, + SPELL_DEAFENINGROAR = 42398 +}; + +struct MANGOS_DLL_DECL boss_nalorakkAI : public ScriptedAI +{ + boss_nalorakkAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 ChangeForm_Timer; + uint32 BrutalSwipe_Timer; + uint32 Mangle_Timer; + uint32 Surge_Timer; + uint32 LaceratingSlash_Timer; + uint32 RendFlesh_Timer; + uint32 DeafeningRoar_Timer; + uint32 ShapeShiftCheck_Timer; + uint32 Berserk_Timer; + bool inBearForm; + bool Berserking; + bool ChangedToBear; + bool ChangedToTroll; + + void Reset() + { + ChangeForm_Timer = 45000; + BrutalSwipe_Timer = 12000; + Mangle_Timer = 15000; + Surge_Timer = 20000; + LaceratingSlash_Timer = 6000; + RendFlesh_Timer = 6000; + DeafeningRoar_Timer = 20000; + ShapeShiftCheck_Timer = 40000; + Berserk_Timer = 600000; + inBearForm = false; + Berserking = false; + ChangedToBear = false; + ChangedToTroll = true; + } + + void Aggro(Unit *who) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void KilledUnit(Unit* victim) + { + DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); + } + + void JustDied(Unit* Killer) + { + DoScriptText(SAY_DEATH, m_creature); + + if (!m_pInstance) + return; + + m_pInstance->SetData(TYPE_NALORAKK, DONE); + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Berserking + if ((Berserk_Timer < diff) && (!Berserking)) + { + DoScriptText(SAY_BERSERK, m_creature); + DoCast(m_creature, SPELL_BERSERK); + Berserking = true; + }else Berserk_Timer -= diff; + + //Don't check if we're shapeshifted every UpdateAI + if (ShapeShiftCheck_Timer < diff) + { + //This will return true if we have bearform aura + inBearForm = m_creature->HasAura(SPELL_BEARFORM, 0); + ShapeShiftCheck_Timer = 1000; + }else ShapeShiftCheck_Timer -= diff; + + //Spells for Troll Form (only to be casted if we NOT have bear phase aura) + if (!inBearForm) + { + //We just changed to troll form! + if (!ChangedToTroll) + { + DoScriptText(SAY_TOTROLL, m_creature); + + ChangedToTroll = true; + ChangedToBear = false; + //Reset spell timers + LaceratingSlash_Timer = urand(6000, 25000); + RendFlesh_Timer = urand(6000, 25000); + DeafeningRoar_Timer = urand(15000, 25000); + ShapeShiftCheck_Timer = 40000; + } + + //Brutal Swipe (some sources may say otherwise, but I've never seen this in Bear form) + if (BrutalSwipe_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_BRUTALSWIPE); + BrutalSwipe_Timer = urand(7000, 15000); + }else BrutalSwipe_Timer -= diff; + + //Mangle + if (Mangle_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_MANGLE); + Mangle_Timer = urand(3000, 15000); + }else Mangle_Timer -= diff; + + //Surge + if (Surge_Timer < diff) + { + //select a random unit other than the main tank + Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 1); + + //if there aren't other units, cast on the tank + if (!target) + target = m_creature->getVictim(); + + DoCast(target, SPELL_SURGE); + DoScriptText(SAY_SURGE, m_creature); + + Surge_Timer = urand(15000, 32500); + }else Surge_Timer -= diff; + + //Change to Bear Form if we're in Troll Form for 45sec + if (ChangeForm_Timer < diff) + { + m_creature->InterruptSpell(CURRENT_CHANNELED_SPELL); + m_creature->InterruptSpell(CURRENT_GENERIC_SPELL); + DoCast(m_creature, SPELL_BEARFORM); + //And 30sec (bear form) + 45sec (troll form) before we should cast this again + ChangeForm_Timer = 75000; + }else ChangeForm_Timer -= diff; + } + //Spells for Bear Form (only to be casted if we have bear phase aura) + else + { + //We just changed to bear form! + if (!ChangedToBear) + { + DoScriptText(SAY_TOBEAR, m_creature); + + ChangedToBear = true; + ChangedToTroll = false; + //Reset spell timers + Surge_Timer = urand(15000, 32000); + BrutalSwipe_Timer = urand(7000, 20000); + Mangle_Timer = urand(3000, 20000); + ShapeShiftCheck_Timer = 25000; + } + + //Lacerating Slash + if (LaceratingSlash_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_LACERATINGSLASH); + LaceratingSlash_Timer = urand(6000, 20000); + }else LaceratingSlash_Timer -= diff; + + //Rend Flesh + if (RendFlesh_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_RENDFLESH); + RendFlesh_Timer = urand(6000, 20000); + }else RendFlesh_Timer -= diff; + + //Deafening Roar + if (DeafeningRoar_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_DEAFENINGROAR); + DeafeningRoar_Timer = urand(15000, 25000); + }else DeafeningRoar_Timer -= diff; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_nalorakk(Creature* pCreature) +{ + return new boss_nalorakkAI(pCreature); +} + +void AddSC_boss_nalorakk() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_nalorakk"; + newscript->GetAI = &GetAI_boss_nalorakk; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp b/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp new file mode 100644 index 000000000..16cb0cd69 --- /dev/null +++ b/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp @@ -0,0 +1,153 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Zuljin +SD%Complete: 0 +SDComment: +SDCategory: Zul'Aman +EndScriptData */ + +#include "precompiled.h" +#include "zulaman.h" + +enum +{ + SAY_INTRO = -1568056, + SAY_AGGRO = -1568057, + SAY_BEAR_TRANSFORM = -1568058, + SAY_EAGLE_TRANSFORM = -1568058, + SAY_LYNX_TRANSFORM = -1568060, + SAY_DRAGONHAWK_TRANSFORM = -1568061, + SAY_FIRE_BREATH = -1568062, + SAY_BERSERK = -1568053, + SAY_KILL1 = -1568064, + SAY_KILL2 = -1568065, + SAY_DEATH = -1568066, + + // Troll Form + SPELL_WHIRLWIND = 17207, + SPELL_GRIEVOUS_THROW = 43093, //removes debuff after full healed + + // Bear Form + SPELL_CREEPING_PARALYSIS = 43095, //should cast on the whole raid + SPELL_OVERPOWER = 43456, //use after melee attack dodged + + // Eagle Form + SPELL_ENERGY_STORM = 43983, //enemy area aura, trigger 42577 + SPELL_ZAP_INFORM = 42577, + SPELL_ZAP_DAMAGE = 43137, //1250 damage + SPELL_SUMMON_CYCLONE = 43112, //summon four feather vortex + CREATURE_FEATHER_VORTEX = 24136, + SPELL_CYCLONE_VISUAL = 43119, //trigger 43147 visual + SPELL_CYCLONE_PASSIVE = 43120, //trigger 43121 (4y aoe) every second + + // Lynx Form + SPELL_CLAW_RAGE_HASTE = 42583, + SPELL_CLAW_RAGE_TRIGGER = 43149, + SPELL_CLAW_RAGE_DAMAGE = 43150, + SPELL_LYNX_RUSH_HASTE = 43152, + SPELL_LYNX_RUSH_DAMAGE = 43153, + + // Dragonhawk Form + SPELL_FLAME_WHIRL = 43213, //trigger two spells + SPELL_FLAME_BREATH = 43215, + SPELL_SUMMON_PILLAR = 43216, //summon 24187 + CREATURE_COLUMN_OF_FIRE = 24187, + SPELL_PILLAR_TRIGGER = 43218, //trigger 43217 + + // Cosmetic + SPELL_SPIRIT_AURA = 42466, + SPELL_SIPHON_SOUL = 43501, + + // Transforms + SPELL_SHAPE_OF_THE_BEAR = 42594, + SPELL_SHAPE_OF_THE_EAGLE = 42606, + SPELL_SHAPE_OF_THE_LYNX = 42607, + SPELL_SHAPE_OF_THE_DRAGONHAWK = 42608, + + SPELL_BERSERK = 45078, + + WEAPON_ID = 33975, + + PHASE_BEAR = 0, + PHASE_EAGLE = 1, + PHASE_LYNX = 2, + PHASE_DRAGONHAWK = 3, + PHASE_TROLL = 4 +}; + +//coords for going for changing form +const float CENTER_X = 120.148811; +const float CENTER_Y = 703.713684; +const float CENTER_Z = 45.111477; + +struct MANGOS_DLL_DECL boss_zuljinAI : public ScriptedAI +{ + boss_zuljinAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + void Reset() + { + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(urand(0, 1) ? SAY_KILL1 : SAY_KILL2, m_creature); + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + + if (!m_pInstance) + return; + + m_pInstance->SetData(TYPE_ZULJIN, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_zuljin(Creature* pCreature) +{ + return new boss_zuljinAI(pCreature); +} + +void AddSC_boss_zuljin() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_zuljin"; + newscript->GetAI = &GetAI_boss_zuljin; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp new file mode 100644 index 000000000..38508678d --- /dev/null +++ b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp @@ -0,0 +1,364 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance_Zulaman +SD%Complete: 25 +SDComment: +SDCategory: Zul'Aman +EndScriptData */ + +#include "precompiled.h" +#include "zulaman.h" + +struct MANGOS_DLL_DECL instance_zulaman : public ScriptedInstance +{ + instance_zulaman(Map* pMap) : ScriptedInstance(pMap) {Initialize();} + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + uint32 m_auiRandVendor[MAX_VENDOR]; + std::string strInstData; + + uint32 m_uiEventTimer; + uint32 m_uiEventMinuteStep; + + uint32 m_uiGongCount; + + uint64 m_uiAkilzonGUID; + uint64 m_uiNalorakkGUID; + uint64 m_uiJanalaiGUID; + uint64 m_uiHalazziGUID; + uint64 m_uiSpiritLynxGUID; + uint64 m_uiZuljinGUID; + uint64 m_uiMalacrassGUID; + uint64 m_uiHarrisonGUID; + + uint64 m_uiStrangeGongGUID; + uint64 m_uiMassiveGateGUID; + uint64 m_uiMalacrassEntranceGUID; + + std::list m_lEggsGUIDList; + uint32 m_uiEggsRemainingCount_Left; + uint32 m_uiEggsRemainingCount_Right; + + void Initialize() + { + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + memset(&m_auiRandVendor, 0, sizeof(m_auiRandVendor)); + + m_uiEventTimer = MINUTE*IN_MILISECONDS; + m_uiEventMinuteStep = MINUTE/3; + + m_uiGongCount = 0; + + m_uiAkilzonGUID = 0; + m_uiNalorakkGUID = 0; + m_uiJanalaiGUID = 0; + m_uiHalazziGUID = 0; + m_uiSpiritLynxGUID = 0; + m_uiZuljinGUID = 0; + m_uiMalacrassGUID = 0; + m_uiHarrisonGUID = 0; + + m_uiStrangeGongGUID = 0; + m_uiMassiveGateGUID = 0; + m_uiMalacrassEntranceGUID = 0; + + m_lEggsGUIDList.clear(); + m_uiEggsRemainingCount_Left = 20; + m_uiEggsRemainingCount_Right = 20; + } + + void OnCreatureCreate(Creature* pCreature) + { + switch(pCreature->GetEntry()) + { + case 23574: m_uiAkilzonGUID = pCreature->GetGUID(); break; + case 23576: m_uiNalorakkGUID = pCreature->GetGUID(); break; + case 23578: m_uiJanalaiGUID = pCreature->GetGUID(); break; + case 23577: m_uiHalazziGUID = pCreature->GetGUID(); break; + case 23863: m_uiZuljinGUID = pCreature->GetGUID(); break; + case 24239: m_uiMalacrassGUID = pCreature->GetGUID(); break; + case 24358: m_uiHarrisonGUID = pCreature->GetGUID(); break; + case NPC_SPIRIT_LYNX: m_uiSpiritLynxGUID = pCreature->GetGUID(); break; + case NPC_EGG: + if (m_auiEncounter[3] != DONE) + m_lEggsGUIDList.push_back(pCreature->GetGUID()); + break; + } + } + + void OnObjectCreate(GameObject* pGo) + { + switch(pGo->GetEntry()) + { + case 187359: + m_uiStrangeGongGUID = pGo->GetGUID(); + break; + case 186728: + m_uiMassiveGateGUID = pGo->GetGUID(); + if (m_auiEncounter[0] == IN_PROGRESS || m_auiEncounter[0] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case 186305: + m_uiMalacrassEntranceGUID = pGo->GetGUID(); + break; + } + } + + void SetData(uint32 uiType, uint32 uiData) + { + debug_log("SD2: Instance Zulaman: SetData received for type %u with data %u",uiType,uiData); + + switch(uiType) + { + case TYPE_EVENT_RUN: + if (uiData == SPECIAL) + { + ++m_uiGongCount; + if (m_uiGongCount == 5) + m_auiEncounter[0] = uiData; + } + if (uiData == IN_PROGRESS) + { + DoUseDoorOrButton(m_uiMassiveGateGUID); + DoUpdateWorldState(WORLD_STATE_COUNTER,m_uiEventMinuteStep); + DoUpdateWorldState(WORLD_STATE_ID,1); + m_auiEncounter[0] = uiData; + } + break; + case TYPE_AKILZON: + if (uiData == DONE) + { + if (m_auiEncounter[0] == IN_PROGRESS) + { + m_uiEventMinuteStep += MINUTE/6; //add 10 minutes + DoUpdateWorldState(WORLD_STATE_COUNTER,m_uiEventMinuteStep); + } + } + m_auiEncounter[1] = uiData; + break; + case TYPE_NALORAKK: + if (uiData == DONE) + { + if (m_auiEncounter[0] == IN_PROGRESS) + { + m_uiEventMinuteStep += MINUTE/4; //add 15 minutes + DoUpdateWorldState(WORLD_STATE_COUNTER,m_uiEventMinuteStep); + } + } + m_auiEncounter[2] = uiData; + break; + case TYPE_JANALAI: + if (uiData == NOT_STARTED) + { + m_uiEggsRemainingCount_Left = 20; + m_uiEggsRemainingCount_Right = 20; + + if (!m_lEggsGUIDList.empty()) + { + for(std::list::iterator itr = m_lEggsGUIDList.begin(); itr != m_lEggsGUIDList.end(); ++itr) + { + if (Creature* pEgg = instance->GetCreature(*itr)) + { + if (!pEgg->isAlive()) + pEgg->Respawn(); + } + } + } + } + if (uiData == DONE) + m_lEggsGUIDList.clear(); + + m_auiEncounter[3] = uiData; + break; + case TYPE_HALAZZI: + m_auiEncounter[4] = uiData; + break; + case TYPE_ZULJIN: + m_auiEncounter[5] = uiData; + break; + case TYPE_MALACRASS: + m_auiEncounter[6] = uiData; + break; + + case DATA_J_EGGS_RIGHT: + --m_uiEggsRemainingCount_Right; + break; + case DATA_J_EGGS_LEFT: + --m_uiEggsRemainingCount_Left; + break; + + case TYPE_RAND_VENDOR_1: + m_auiRandVendor[0] = uiData; + break; + case TYPE_RAND_VENDOR_2: + m_auiRandVendor[1] = uiData; + break; + default: + error_log("SD2: Instance Zulaman: ERROR SetData = %u for type %u does not exist/not implemented.",uiType,uiData); + break; + } + + if (m_auiEncounter[1] == DONE && m_auiEncounter[2] == DONE && m_auiEncounter[3] == DONE && + m_auiEncounter[4] == DONE && m_auiEncounter[5] != IN_PROGRESS) + DoUseDoorOrButton(m_uiMalacrassEntranceGUID); + + if (uiData == DONE || (uiType == TYPE_EVENT_RUN && uiData == IN_PROGRESS)) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " + << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " + << m_auiEncounter[6]; + + strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } + } + + const char* Save() + { + return strInstData.c_str(); + } + + void Load(const char* chrIn) + { + if (!chrIn) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(chrIn); + + std::istringstream loadStream(chrIn); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] + >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6]; + + //not changing m_uiEncounter[0], TYPE_EVENT_RUN must not reset to NOT_STARTED + for(uint8 i = 1; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; + } + + OUT_LOAD_INST_DATA_COMPLETE; + } + + uint32 GetData(uint32 uiType) + { + switch(uiType) + { + case TYPE_EVENT_RUN: + return m_auiEncounter[0]; + case TYPE_AKILZON: + return m_auiEncounter[1]; + case TYPE_NALORAKK: + return m_auiEncounter[2]; + case TYPE_JANALAI: + return m_auiEncounter[3]; + case TYPE_HALAZZI: + return m_auiEncounter[4]; + case TYPE_ZULJIN: + return m_auiEncounter[5]; + case TYPE_MALACRASS: + return m_auiEncounter[6]; + + case DATA_J_EGGS_LEFT: + return m_uiEggsRemainingCount_Left; + case DATA_J_EGGS_RIGHT: + return m_uiEggsRemainingCount_Right; + + case TYPE_RAND_VENDOR_1: + return m_auiRandVendor[0]; + case TYPE_RAND_VENDOR_2: + return m_auiRandVendor[1]; + } + return 0; + } + + uint64 GetData64(uint32 uiData) + { + switch(uiData) + { + case DATA_AKILZON: + return m_uiAkilzonGUID; + case DATA_NALORAKK: + return m_uiNalorakkGUID; + case DATA_JANALAI: + return m_uiJanalaiGUID; + case DATA_HALAZZI: + return m_uiHalazziGUID; + case DATA_SPIRIT_LYNX: + return m_uiSpiritLynxGUID; + case DATA_ZULJIN: + return m_uiZuljinGUID; + case DATA_MALACRASS: + return m_uiMalacrassGUID; + case DATA_HARRISON: + return m_uiHarrisonGUID; + case DATA_GO_GONG: + return m_uiStrangeGongGUID; + case DATA_GO_ENTRANCE: + return m_uiMassiveGateGUID; + case DATA_GO_MALACRASS_GATE: + return m_uiMalacrassEntranceGUID; + } + return 0; + } + + void Update(uint32 uiDiff) + { + if (GetData(TYPE_EVENT_RUN) == IN_PROGRESS) + { + if (m_uiEventTimer <= uiDiff) + { + if (m_uiEventMinuteStep == 0) + { + debug_log("SD2: Instance Zulaman: event time reach end, event failed."); + m_auiEncounter[0] = FAIL; + return; + } + + --m_uiEventMinuteStep; + DoUpdateWorldState(WORLD_STATE_COUNTER, m_uiEventMinuteStep); + debug_log("SD2: Instance Zulaman: minute decrease to %u.",m_uiEventMinuteStep); + + m_uiEventTimer = MINUTE*IN_MILISECONDS; + } + else + m_uiEventTimer -= uiDiff; + } + } +}; + +InstanceData* GetInstanceData_instance_zulaman(Map* pMap) +{ + return new instance_zulaman(pMap); +} + +void AddSC_instance_zulaman() +{ + Script* pNewScript; + pNewScript = new Script; + pNewScript->Name = "instance_zulaman"; + pNewScript->GetInstanceData = &GetInstanceData_instance_zulaman; + pNewScript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/zulaman/zulaman.cpp b/scripts/eastern_kingdoms/zulaman/zulaman.cpp new file mode 100644 index 000000000..31fb14e21 --- /dev/null +++ b/scripts/eastern_kingdoms/zulaman/zulaman.cpp @@ -0,0 +1,250 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Zulaman +SD%Complete: 90 +SDComment: Forest Frog will turn into different NPC's. Workaround to prevent new entry from running this script +SDCategory: Zul'Aman +EndScriptData */ + +/* ContentData +npc_forest_frog +EndContentData */ + +#include "precompiled.h" +#include "zulaman.h" +#include "escort_ai.h" + +/*###### +## npc_forest_frog +######*/ + +#define SPELL_REMOVE_AMANI_CURSE 43732 +#define SPELL_PUSH_MOJO 43923 +#define ENTRY_FOREST_FROG 24396 + +struct MANGOS_DLL_DECL npc_forest_frogAI : public ScriptedAI +{ + npc_forest_frogAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + void Reset() { } + + void DoSpawnRandom() + { + if (m_pInstance) + { + uint32 cEntry = 0; + switch(urand(0, 10)) + { + case 0: cEntry = 24024; break; //Kraz + case 1: cEntry = 24397; break; //Mannuth + case 2: cEntry = 24403; break; //Deez + case 3: cEntry = 24404; break; //Galathryn + case 4: cEntry = 24405; break; //Adarrah + case 5: cEntry = 24406; break; //Fudgerick + case 6: cEntry = 24407; break; //Darwen + case 7: cEntry = 24445; break; //Mitzi + case 8: cEntry = 24448; break; //Christian + case 9: cEntry = 24453; break; //Brennan + case 10: cEntry = 24455; break; //Hollee + } + + if (!m_pInstance->GetData(TYPE_RAND_VENDOR_1)) + if (!urand(0, 9)) + cEntry = 24408; //Gunter + + if (!m_pInstance->GetData(TYPE_RAND_VENDOR_2)) + if (!urand(0, 9)) + cEntry = 24409; //Kyren + + if (cEntry) m_creature->UpdateEntry(cEntry); + + if (cEntry == 24408) m_pInstance->SetData(TYPE_RAND_VENDOR_1,DONE); + if (cEntry == 24409) m_pInstance->SetData(TYPE_RAND_VENDOR_2,DONE); + } + } + + void SpellHit(Unit *caster, const SpellEntry *spell) + { + if (spell->Id == SPELL_REMOVE_AMANI_CURSE && caster->GetTypeId() == TYPEID_PLAYER && m_creature->GetEntry() == ENTRY_FOREST_FROG) + { + //increase or decrease chance of mojo? + if (!urand(0, 49)) + DoCast(caster,SPELL_PUSH_MOJO,true); + else + DoSpawnRandom(); + } + } +}; +CreatureAI* GetAI_npc_forest_frog(Creature* pCreature) +{ + return new npc_forest_frogAI(pCreature); +} + +/*###### +## npc_harrison_jones_za +######*/ + +enum +{ + SAY_START = -1568079, + SAY_AT_GONG = -1568080, + SAY_OPEN_ENTRANCE = -1568081, + + SPELL_BANGING_THE_GONG = 45225 +}; + +#define GOSSIP_ITEM_BEGIN "Thanks for the concern, but we intend to explore Zul'Aman." + +struct MANGOS_DLL_DECL npc_harrison_jones_zaAI : public npc_escortAI +{ + npc_harrison_jones_zaAI(Creature* pCreature) : npc_escortAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + void WaypointReached(uint32 i) + { + if (!m_pInstance) + return; + + switch(i) + { + case 1: + DoScriptText(SAY_AT_GONG, m_creature); + + if (GameObject* pEntranceDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GO_GONG))) + pEntranceDoor->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + + //Start bang gong for 2min + m_creature->CastSpell(m_creature, SPELL_BANGING_THE_GONG, false); + SetEscortPaused(true); + break; + case 3: + DoScriptText(SAY_OPEN_ENTRANCE, m_creature); + break; + case 4: + m_pInstance->SetData(TYPE_EVENT_RUN,IN_PROGRESS); + //TODO: Spawn group of Amani'shi Savage and make them run to entrance + break; + } + } + + void Reset() { } + + void StartEvent() + { + DoScriptText(SAY_START, m_creature); + Start(false,false); + } + + void SetHoldState(bool bOnHold) + { + SetEscortPaused(bOnHold); + + //Stop banging gong if still + if (m_pInstance && m_pInstance->GetData(TYPE_EVENT_RUN) == SPECIAL && m_creature->HasAura(SPELL_BANGING_THE_GONG)) + m_creature->RemoveAurasDueToSpell(SPELL_BANGING_THE_GONG); + } +}; + +bool GossipHello_npc_harrison_jones_za(Player* pPlayer, Creature* pCreature) +{ + ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pInstance && pInstance->GetData(TYPE_EVENT_RUN) == NOT_STARTED) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BEGIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_harrison_jones_za(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + ((npc_harrison_jones_zaAI*)pCreature->AI())->StartEvent(); + pPlayer->CLOSE_GOSSIP_MENU(); + } + return true; +} + +CreatureAI* GetAI_npc_harrison_jones_za(Creature* pCreature) +{ + return new npc_harrison_jones_zaAI(pCreature); +} + +/*###### +## go_strange_gong +######*/ + +//Unsure how this Gong must work. Here we always return false to allow Mangos always process further. +bool GOHello_go_strange_gong(Player* pPlayer, GameObject* pGo) +{ + ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData(); + + if (!pInstance) + return false; + + if (pInstance->GetData(TYPE_EVENT_RUN) == SPECIAL) + { + if (Creature* pCreature = (Creature*)Unit::GetUnit(*pPlayer,pInstance->GetData64(DATA_HARRISON))) + ((npc_harrison_jones_zaAI*)pCreature->AI())->SetHoldState(false); + else + error_log("SD2: Instance Zulaman: go_strange_gong failed"); + + pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + return false; + } + + pInstance->SetData(TYPE_EVENT_RUN, SPECIAL); + return false; +} + +void AddSC_zulaman() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_forest_frog"; + newscript->GetAI = &GetAI_npc_forest_frog; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_harrison_jones_za"; + newscript->GetAI = &GetAI_npc_harrison_jones_za; + newscript->pGossipHello = &GossipHello_npc_harrison_jones_za; + newscript->pGossipSelect = &GossipSelect_npc_harrison_jones_za; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "go_strange_gong"; + newscript->pGOHello = &GOHello_go_strange_gong; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/zulaman/zulaman.h b/scripts/eastern_kingdoms/zulaman/zulaman.h new file mode 100644 index 000000000..32f44b7b4 --- /dev/null +++ b/scripts/eastern_kingdoms/zulaman/zulaman.h @@ -0,0 +1,60 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_ZULAMAN_H +#define DEF_ZULAMAN_H + +enum InstanceZA +{ + MAX_ENCOUNTER = 7, + MAX_VENDOR = 2, + + SAY_INST_RELEASE = -1568067, + SAY_INST_BEGIN = -1568068, + SAY_INST_PROGRESS_1 = -1568069, + SAY_INST_PROGRESS_2 = -1568070, + SAY_INST_PROGRESS_3 = -1568071, + SAY_INST_WARN_1 = -1568072, + SAY_INST_WARN_2 = -1568073, + SAY_INST_WARN_3 = -1568074, + SAY_INST_WARN_4 = -1568075, + SAY_INST_SACRIF1 = -1568076, + SAY_INST_SACRIF2 = -1568077, + SAY_INST_COMPLETE = -1568078, + + WORLD_STATE_ID = 3104, + WORLD_STATE_COUNTER = 3106, + + TYPE_EVENT_RUN = 1, + TYPE_AKILZON = 2, + TYPE_NALORAKK = 3, + TYPE_JANALAI = 4, + TYPE_HALAZZI = 5, + TYPE_MALACRASS = 6, + TYPE_ZULJIN = 7, + + TYPE_RAND_VENDOR_1 = 8, + TYPE_RAND_VENDOR_2 = 9, + + DATA_AKILZON = 10, + DATA_NALORAKK = 11, + DATA_JANALAI = 12, + DATA_HALAZZI = 13, + DATA_MALACRASS = 14, + DATA_ZULJIN = 15, + DATA_HARRISON = 16, + DATA_SPIRIT_LYNX = 17, + + DATA_J_EGGS_RIGHT = 19, + DATA_J_EGGS_LEFT = 20, + + DATA_GO_GONG = 21, + DATA_GO_MALACRASS_GATE = 22, + DATA_GO_ENTRANCE = 23, + + NPC_EGG = 23817, + NPC_SPIRIT_LYNX = 24143 +}; + +#endif diff --git a/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp b/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp new file mode 100644 index 000000000..61bd2b02c --- /dev/null +++ b/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp @@ -0,0 +1,274 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Arlokk +SD%Complete: 95 +SDComment: Wrong cleave and red aura is missing. +SDCategory: Zul'Gurub +EndScriptData */ + +#include "precompiled.h" +#include "zulgurub.h" + +bool GOHello_go_gong_of_bethekk(Player* pPlayer, GameObject* pGo) +{ + if (ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData()) + { + if (pInstance->GetData(TYPE_ARLOKK) == DONE || pInstance->GetData(TYPE_ARLOKK) == IN_PROGRESS) + return true; + + pInstance->SetData(TYPE_ARLOKK, IN_PROGRESS); + } + + return false; +} + +enum +{ + SAY_AGGRO = -1309011, + SAY_FEAST_PANTHER = -1309012, + SAY_DEATH = -1309013, + + SPELL_SHADOWWORDPAIN = 23952, + SPELL_GOUGE = 24698, + SPELL_MARK = 24210, + SPELL_CLEAVE = 26350, //Perhaps not right. Not a red aura... + SPELL_PANTHER_TRANSFORM = 24190, + + MODEL_ID_NORMAL = 15218, + MODEL_ID_PANTHER = 15215, + MODEL_ID_BLANK = 11686, + + NPC_ZULIAN_PROWLER = 15101 +}; + +struct MANGOS_DLL_DECL boss_arlokkAI : public ScriptedAI +{ + boss_arlokkAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 m_uiShadowWordPain_Timer; + uint32 m_uiGouge_Timer; + uint32 m_uiMark_Timer; + uint32 m_uiCleave_Timer; + uint32 m_uiVanish_Timer; + uint32 m_uiVisible_Timer; + + uint32 m_uiSummon_Timer; + uint32 m_uiSummonCount; + + Unit* m_pMarkedTarget; + + bool m_bIsPhaseTwo; + bool m_bIsVanished; + + void Reset() + { + m_uiShadowWordPain_Timer = 8000; + m_uiGouge_Timer = 14000; + m_uiMark_Timer = 35000; + m_uiCleave_Timer = 4000; + m_uiVanish_Timer = 60000; + m_uiVisible_Timer = 6000; + + m_uiSummon_Timer = 5000; + m_uiSummonCount = 0; + + m_bIsPhaseTwo = false; + m_bIsVanished = false; + + m_pMarkedTarget = NULL; + + m_creature->SetDisplayId(MODEL_ID_NORMAL); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_ARLOKK, NOT_STARTED); + + //we should be summoned, so despawn + m_creature->ForcedDespawn(); + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + + m_creature->SetDisplayId(MODEL_ID_NORMAL); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + if (m_pInstance) + m_pInstance->SetData(TYPE_ARLOKK, DONE); + } + + void DoSummonPhanters() + { + if (m_pMarkedTarget) + DoScriptText(SAY_FEAST_PANTHER, m_creature, m_pMarkedTarget); + + m_creature->SummonCreature(NPC_ZULIAN_PROWLER, -11532.7998, -1649.6734, 41.4800, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + m_creature->SummonCreature(NPC_ZULIAN_PROWLER, -11532.9970, -1606.4840, 41.2979, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + } + + void JustSummoned(Creature* pSummoned) + { + if (m_pMarkedTarget) + pSummoned->AI()->AttackStart(m_pMarkedTarget); + + ++m_uiSummonCount; + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (!m_bIsPhaseTwo) + { + if (m_uiShadowWordPain_Timer < uiDiff) + { + DoCast(m_creature->getVictim(),SPELL_SHADOWWORDPAIN); + m_uiShadowWordPain_Timer = 15000; + } + else + m_uiShadowWordPain_Timer -= uiDiff; + + if (m_uiMark_Timer < uiDiff) + { + m_pMarkedTarget = SelectUnit(SELECT_TARGET_RANDOM,0); + + if (m_pMarkedTarget) + DoCast(m_pMarkedTarget, SPELL_MARK); + else + error_log("SD2: boss_arlokk could not accuire m_pMarkedTarget."); + + m_uiMark_Timer = 15000; + } + else + m_uiMark_Timer -= uiDiff; + } + else + { + //Cleave_Timer + if (m_uiCleave_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_CLEAVE); + m_uiCleave_Timer = 16000; + } + else + m_uiCleave_Timer -= uiDiff; + + //Gouge_Timer + if (m_uiGouge_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_GOUGE); + + if (m_creature->getThreatManager().getThreat(m_creature->getVictim())) + m_creature->getThreatManager().modifyThreatPercent(m_creature->getVictim(),-80); + + m_uiGouge_Timer = urand(17000, 27000); + } + else + m_uiGouge_Timer -= uiDiff; + } + + if (m_uiSummonCount <= 30) + { + if (m_uiSummon_Timer < uiDiff) + { + DoSummonPhanters(); + m_uiSummon_Timer = 5000; + } + else + m_uiSummon_Timer -= uiDiff; + } + + if (m_uiVanish_Timer < uiDiff) + { + //Invisble Model + m_creature->SetDisplayId(MODEL_ID_BLANK); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + m_creature->AttackStop(); + DoResetThreat(); + + m_bIsVanished = true; + + m_uiVanish_Timer = 45000; + m_uiVisible_Timer = 6000; + } + else + m_uiVanish_Timer -= uiDiff; + + if (m_bIsVanished) + { + if (m_uiVisible_Timer < uiDiff) + { + //The Panther Model + m_creature->SetDisplayId(MODEL_ID_PANTHER); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + const CreatureInfo *cinfo = m_creature->GetCreatureInfo(); + m_creature->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, (cinfo->mindmg +((cinfo->mindmg/100) * 35))); + m_creature->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, (cinfo->maxdmg +((cinfo->maxdmg/100) * 35))); + m_creature->UpdateDamagePhysical(BASE_ATTACK); + + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + AttackStart(pTarget); + + m_bIsPhaseTwo = true; + m_bIsVanished = false; + } + else + m_uiVisible_Timer -= uiDiff; + } + else + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_arlokk(Creature* pCreature) +{ + return new boss_arlokkAI(pCreature); +} + +void AddSC_boss_arlokk() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "go_gong_of_bethekk"; + newscript->pGOHello = &GOHello_go_gong_of_bethekk; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_arlokk"; + newscript->GetAI = &GetAI_boss_arlokk; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/zulgurub/boss_gahzranka.cpp b/scripts/eastern_kingdoms/zulgurub/boss_gahzranka.cpp new file mode 100644 index 000000000..719cc1ff1 --- /dev/null +++ b/scripts/eastern_kingdoms/zulgurub/boss_gahzranka.cpp @@ -0,0 +1,88 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Gahz'ranka +SD%Complete: 85 +SDComment: Massive Geyser with knockback not working. Spell buggy. +SDCategory: Zul'Gurub +EndScriptData */ + +#include "precompiled.h" + +#define SPELL_FROSTBREATH 16099 +#define SPELL_MASSIVEGEYSER 22421 //Not working. Cause its a summon... +#define SPELL_SLAM 24326 + +struct MANGOS_DLL_DECL boss_gahzrankaAI : public ScriptedAI +{ + boss_gahzrankaAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + uint32 Frostbreath_Timer; + uint32 MassiveGeyser_Timer; + uint32 Slam_Timer; + + void Reset() + { + Frostbreath_Timer = 8000; + MassiveGeyser_Timer = 25000; + Slam_Timer = 17000; + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Frostbreath_Timer + if (Frostbreath_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_FROSTBREATH); + Frostbreath_Timer = urand(7000, 11000); + }else Frostbreath_Timer -= diff; + + //MassiveGeyser_Timer + if (MassiveGeyser_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_MASSIVEGEYSER); + DoResetThreat(); + + MassiveGeyser_Timer = urand(22000, 32000); + }else MassiveGeyser_Timer -= diff; + + //Slam_Timer + if (Slam_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_SLAM); + Slam_Timer = urand(12000, 20000); + }else Slam_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_gahzranka(Creature* pCreature) +{ + return new boss_gahzrankaAI(pCreature); +} + +void AddSC_boss_gahzranka() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_gahzranka"; + newscript->GetAI = &GetAI_boss_gahzranka; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/zulgurub/boss_grilek.cpp b/scripts/eastern_kingdoms/zulgurub/boss_grilek.cpp new file mode 100644 index 000000000..57d38bfe3 --- /dev/null +++ b/scripts/eastern_kingdoms/zulgurub/boss_grilek.cpp @@ -0,0 +1,88 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Grilek +SD%Complete: 100 +SDComment: +SDCategory: Zul'Gurub +EndScriptData */ + +#include "precompiled.h" +#include "zulgurub.h" + +#define SPELL_AVARTAR 24646 //The Enrage Spell +#define SPELL_GROUNDTREMOR 6524 + +struct MANGOS_DLL_DECL boss_grilekAI : public ScriptedAI +{ + boss_grilekAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 Avartar_Timer; + uint32 GroundTremor_Timer; + + void Reset() + { + Avartar_Timer = urand(15000, 25000); + GroundTremor_Timer = urand(8000, 16000); + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Avartar_Timer + if (Avartar_Timer < diff) + { + + DoCast(m_creature, SPELL_AVARTAR); + Unit* target = NULL; + + target = SelectUnit(SELECT_TARGET_RANDOM,1); + + if (m_creature->getThreatManager().getThreat(m_creature->getVictim())) + m_creature->getThreatManager().modifyThreatPercent(m_creature->getVictim(),-50); + if (target) + AttackStart(target); + + Avartar_Timer = urand(25000, 35000); + }else Avartar_Timer -= diff; + + //GroundTremor_Timer + if (GroundTremor_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_GROUNDTREMOR); + GroundTremor_Timer = urand(12000, 16000); + }else GroundTremor_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_grilek(Creature* pCreature) +{ + return new boss_grilekAI(pCreature); +} + +void AddSC_boss_grilek() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_grilek"; + newscript->GetAI = &GetAI_boss_grilek; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp b/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp new file mode 100644 index 000000000..ab86cc2d1 --- /dev/null +++ b/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp @@ -0,0 +1,251 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Hakkar +SD%Complete: 95 +SDComment: Blood siphon spell buggy cause of Core Issue. +SDCategory: Zul'Gurub +EndScriptData */ + +#include "precompiled.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? + +#define SPELL_BLOODSIPHON 24322 +#define SPELL_CORRUPTEDBLOOD 24328 +#define SPELL_CAUSEINSANITY 24327 //Not working disabled. +#define SPELL_WILLOFHAKKAR 24178 +#define 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 + +struct MANGOS_DLL_DECL boss_hakkarAI : public ScriptedAI +{ + boss_hakkarAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 BloodSiphon_Timer; + uint32 CorruptedBlood_Timer; + uint32 CauseInsanity_Timer; + uint32 WillOfHakkar_Timer; + uint32 Enrage_Timer; + + uint32 CheckJeklik_Timer; + uint32 CheckVenoxis_Timer; + uint32 CheckMarli_Timer; + uint32 CheckThekal_Timer; + uint32 CheckArlokk_Timer; + + uint32 AspectOfJeklik_Timer; + uint32 AspectOfVenoxis_Timer; + uint32 AspectOfMarli_Timer; + uint32 AspectOfThekal_Timer; + uint32 AspectOfArlokk_Timer; + + bool Enraged; + + void Reset() + { + BloodSiphon_Timer = 90000; + CorruptedBlood_Timer = 25000; + CauseInsanity_Timer = 17000; + WillOfHakkar_Timer = 17000; + Enrage_Timer = 600000; + + CheckJeklik_Timer = 1000; + CheckVenoxis_Timer = 2000; + CheckMarli_Timer = 3000; + CheckThekal_Timer = 4000; + CheckArlokk_Timer = 5000; + + AspectOfJeklik_Timer = 4000; + AspectOfVenoxis_Timer = 7000; + AspectOfMarli_Timer = 12000; + AspectOfThekal_Timer = 8000; + AspectOfArlokk_Timer = 18000; + + Enraged = false; + } + + void Aggro(Unit *who) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //BloodSiphon_Timer + if (BloodSiphon_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_BLOODSIPHON); + BloodSiphon_Timer = 90000; + }else BloodSiphon_Timer -= diff; + + //CorruptedBlood_Timer + if (CorruptedBlood_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_CORRUPTEDBLOOD); + CorruptedBlood_Timer = urand(30000, 45000); + }else CorruptedBlood_Timer -= diff; + + //CauseInsanity_Timer + /*if (CauseInsanity_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_CAUSEINSANITY); + + CauseInsanity_Timer = urand(35000, 43000); + }else CauseInsanity_Timer -= diff;*/ + + //WillOfHakkar_Timer + if (WillOfHakkar_Timer < diff) + { + + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_WILLOFHAKKAR); + + WillOfHakkar_Timer = urand(25000, 35000); + }else WillOfHakkar_Timer -= diff; + + if (!Enraged && Enrage_Timer < diff) + { + DoCast(m_creature, SPELL_ENRAGE); + Enraged = true; + }else Enrage_Timer -= diff; + + //Checking if Jeklik is dead. If not we cast her Aspect + if (CheckJeklik_Timer < diff) + { + if (m_pInstance) + { + if (m_pInstance->GetData(TYPE_JEKLIK) != DONE) + { + if (AspectOfJeklik_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_ASPECT_OF_JEKLIK); + AspectOfJeklik_Timer = urand(10000, 14000); + }else AspectOfJeklik_Timer -= diff; + } + } + CheckJeklik_Timer = 1000; + }else CheckJeklik_Timer -= diff; + + //Checking if Venoxis is dead. If not we cast his Aspect + if (CheckVenoxis_Timer < diff) + { + if (m_pInstance) + { + if (m_pInstance->GetData(TYPE_VENOXIS) != DONE) + { + if (AspectOfVenoxis_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_ASPECT_OF_VENOXIS); + AspectOfVenoxis_Timer = 8000; + }else AspectOfVenoxis_Timer -= diff; + } + } + CheckVenoxis_Timer = 1000; + }else CheckVenoxis_Timer -= diff; + + //Checking if Marli is dead. If not we cast her Aspect + if (CheckMarli_Timer < diff) + { + if (m_pInstance) + { + if (m_pInstance->GetData(TYPE_MARLI) != DONE) + { + if (AspectOfMarli_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_ASPECT_OF_MARLI); + AspectOfMarli_Timer = 10000; + }else AspectOfMarli_Timer -= diff; + + } + } + CheckMarli_Timer = 1000; + }else CheckMarli_Timer -= diff; + + //Checking if Thekal is dead. If not we cast his Aspect + if (CheckThekal_Timer < diff) + { + if (m_pInstance) + { + if (m_pInstance->GetData(TYPE_THEKAL) != DONE) + { + if (AspectOfThekal_Timer < diff) + { + DoCast(m_creature,SPELL_ASPECT_OF_THEKAL); + AspectOfThekal_Timer = 15000; + }else AspectOfThekal_Timer -= diff; + } + } + CheckThekal_Timer = 1000; + }else CheckThekal_Timer -= diff; + + //Checking if Arlokk is dead. If yes we cast her Aspect + if (CheckArlokk_Timer < diff) + { + if (m_pInstance) + { + if (m_pInstance->GetData(TYPE_ARLOKK) != DONE) + { + if (AspectOfArlokk_Timer < diff) + { + DoCast(m_creature,SPELL_ASPECT_OF_ARLOKK); + DoResetThreat(); + + AspectOfArlokk_Timer = urand(10000, 15000); + }else AspectOfArlokk_Timer -= diff; + } + } + CheckArlokk_Timer = 1000; + }else CheckArlokk_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_hakkar(Creature* pCreature) +{ + return new boss_hakkarAI(pCreature); +} + +void AddSC_boss_hakkar() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_hakkar"; + newscript->GetAI = &GetAI_boss_hakkar; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp b/scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp new file mode 100644 index 000000000..5ae86c7a3 --- /dev/null +++ b/scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp @@ -0,0 +1,96 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Hazzarah +SD%Complete: 100 +SDComment: +SDCategory: Zul'Gurub +EndScriptData */ + +#include "precompiled.h" +#include "zulgurub.h" + +#define SPELL_MANABURN 26046 +#define SPELL_SLEEP 24664 + +struct MANGOS_DLL_DECL boss_hazzarahAI : public ScriptedAI +{ + boss_hazzarahAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 ManaBurn_Timer; + uint32 Sleep_Timer; + uint32 Illusions_Timer; + Creature* Illusion; + + void Reset() + { + ManaBurn_Timer = urand(4000, 10000); + Sleep_Timer = urand(10000, 18000); + Illusions_Timer = urand(10000, 18000); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //ManaBurn_Timer + if (ManaBurn_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_MANABURN); + ManaBurn_Timer = urand(8000, 16000); + }else ManaBurn_Timer -= diff; + + //Sleep_Timer + if (Sleep_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_SLEEP); + Sleep_Timer = urand(12000, 20000); + }else Sleep_Timer -= diff; + + //Illusions_Timer + if (Illusions_Timer < diff) + { + //We will summon 3 illusions that will spawn on a random gamer and attack this gamer + //We will just use one model for the beginning + Unit* target = NULL; + for(int i = 0; i < 3; ++i) + { + target = SelectUnit(SELECT_TARGET_RANDOM,0); + Illusion = m_creature->SummonCreature(15163,target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(),0,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN,30000); + ((CreatureAI*)Illusion->AI())->AttackStart(target); + } + + Illusions_Timer = urand(15000, 25000); + }else Illusions_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_hazzarah(Creature* pCreature) +{ + return new boss_hazzarahAI(pCreature); +} + +void AddSC_boss_hazzarah() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_hazzarah"; + newscript->GetAI = &GetAI_boss_hazzarah; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp b/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp new file mode 100644 index 000000000..b6c848771 --- /dev/null +++ b/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp @@ -0,0 +1,284 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Jeklik +SD%Complete: 85 +SDComment: Problem in finding the right flying batriders for spawning and making them fly. +SDCategory: Zul'Gurub +EndScriptData */ + +#include "precompiled.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... + +struct MANGOS_DLL_DECL boss_jeklikAI : public ScriptedAI +{ + boss_jeklikAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 Charge_Timer; + uint32 SonicBurst_Timer; + uint32 Screech_Timer; + uint32 SpawnBats_Timer; + uint32 ShadowWordPain_Timer; + uint32 MindFlay_Timer; + uint32 ChainMindFlay_Timer; + uint32 GreaterHeal_Timer; + uint32 SpawnFlyingBats_Timer; + + bool PhaseTwo; + + void Reset() + { + Charge_Timer = 20000; + SonicBurst_Timer = 8000; + Screech_Timer = 13000; + SpawnBats_Timer = 60000; + ShadowWordPain_Timer = 6000; + MindFlay_Timer = 11000; + ChainMindFlay_Timer = 26000; + GreaterHeal_Timer = 50000; + SpawnFlyingBats_Timer = 10000; + + PhaseTwo = false; + } + + void Aggro(Unit *who) + { + DoScriptText(SAY_AGGRO, m_creature); + DoCast(m_creature,SPELL_BAT_FORM); + } + + void JustDied(Unit* Killer) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_JEKLIK, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth() > 50)) + { + if (Charge_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_CHARGE); + + Charge_Timer = urand(15000, 30000); + }else Charge_Timer -= diff; + + if (SonicBurst_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_SONICBURST); + SonicBurst_Timer = urand(8000, 13000); + }else SonicBurst_Timer -= diff; + + if (Screech_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_SCREECH); + Screech_Timer = urand(18000, 26000); + }else Screech_Timer -= diff; + + if (SpawnBats_Timer < diff) + { + Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0); + + Creature* Bat = NULL; + Bat = m_creature->SummonCreature(11368,-12291.6220,-1380.2640,144.8304,5.483, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (target && Bat) Bat ->AI()->AttackStart(target); + + Bat = m_creature->SummonCreature(11368,-12289.6220,-1380.2640,144.8304,5.483, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (target && Bat) Bat ->AI()->AttackStart(target); + + Bat = m_creature->SummonCreature(11368,-12293.6220,-1380.2640,144.8304,5.483, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (target && Bat) Bat ->AI()->AttackStart(target); + + Bat = m_creature->SummonCreature(11368,-12291.6220,-1380.2640,144.8304,5.483, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (target && Bat) Bat ->AI()->AttackStart(target); + + Bat = m_creature->SummonCreature(11368,-12289.6220,-1380.2640,144.8304,5.483, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (target && Bat) Bat ->AI()->AttackStart(target); + + Bat = m_creature->SummonCreature(11368,-12293.6220,-1380.2640,144.8304,5.483, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (target && Bat) Bat ->AI()->AttackStart(target); + + SpawnBats_Timer = 60000; + }else SpawnBats_Timer -= diff; + } + else + { + if (PhaseTwo) + { + if (PhaseTwo && ShadowWordPain_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + { + DoCast(target, SPELL_SHADOW_WORD_PAIN); + ShadowWordPain_Timer = urand(12000, 18000); + } + }ShadowWordPain_Timer -=diff; + + if (MindFlay_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_MIND_FLAY); + MindFlay_Timer = 16000; + }MindFlay_Timer -=diff; + + if (ChainMindFlay_Timer < diff) + { + m_creature->InterruptNonMeleeSpells(false); + DoCast(m_creature->getVictim(), SPELL_CHAIN_MIND_FLAY); + ChainMindFlay_Timer = urand(15000, 30000); + }ChainMindFlay_Timer -=diff; + + if (GreaterHeal_Timer < diff) + { + m_creature->InterruptNonMeleeSpells(false); + DoCast(m_creature,SPELL_GREATERHEAL); + GreaterHeal_Timer = urand(25000, 35000); + }GreaterHeal_Timer -=diff; + + if (SpawnFlyingBats_Timer < diff) + { + Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + + Creature* FlyingBat = m_creature->SummonCreature(14965, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ()+15, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (FlyingBat) + { + if (target) + FlyingBat->AI()->AttackStart(target); + } + + SpawnFlyingBats_Timer = urand(10000, 15000); + } else SpawnFlyingBats_Timer -=diff; + } + else + { + m_creature->SetDisplayId(15219); + DoResetThreat(); + PhaseTwo = true; + } + } + + DoMeleeAttackIfReady(); + } +}; + +//Flying Bat +struct MANGOS_DLL_DECL mob_batriderAI : public ScriptedAI +{ + mob_batriderAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 Bomb_Timer; + uint32 Check_Timer; + + void Reset() + { + Bomb_Timer = 2000; + Check_Timer = 1000; + + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } + + void UpdateAI (const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Bomb_Timer + if (Bomb_Timer < diff) + { + if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0)) + { + DoCast(target, SPELL_BOMB); + Bomb_Timer = 5000; + } + }else Bomb_Timer -= diff; + + //Check_Timer + if (Check_Timer < diff) + { + if (m_pInstance) + { + if (m_pInstance->GetData(TYPE_JEKLIK) == DONE) + { + m_creature->setDeathState(JUST_DIED); + m_creature->RemoveCorpse(); + return; + } + } + Check_Timer = 1000; + }else Check_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_jeklik(Creature* pCreature) +{ + return new boss_jeklikAI(pCreature); +} + +CreatureAI* GetAI_mob_batrider(Creature* pCreature) +{ + return new mob_batriderAI(pCreature); +} + +void AddSC_boss_jeklik() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_jeklik"; + newscript->GetAI = &GetAI_boss_jeklik; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_batrider"; + newscript->GetAI = &GetAI_mob_batrider; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp b/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp new file mode 100644 index 000000000..c1f399c68 --- /dev/null +++ b/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp @@ -0,0 +1,268 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Jin'do the Hexxer +SD%Complete: 85 +SDComment: Mind Control not working because of core bug. Shades visible for all. +SDCategory: Zul'Gurub +EndScriptData */ + +#include "precompiled.h" +#include "zulgurub.h" + +#define SAY_AGGRO -1309014 + +#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. + +//Healing Ward Spell +#define 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 + +struct MANGOS_DLL_DECL boss_jindoAI : public ScriptedAI +{ + boss_jindoAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 BrainWashTotem_Timer; + uint32 HealingWard_Timer; + uint32 Hex_Timer; + uint32 Delusions_Timer; + uint32 Teleport_Timer; + + void Reset() + { + BrainWashTotem_Timer = 20000; + HealingWard_Timer = 16000; + Hex_Timer = 8000; + Delusions_Timer = 10000; + Teleport_Timer = 5000; + } + + void Aggro(Unit *who) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //BrainWashTotem_Timer + if (BrainWashTotem_Timer < diff) + { + DoCast(m_creature, SPELL_BRAINWASHTOTEM); + BrainWashTotem_Timer = urand(18000, 26000); + }else BrainWashTotem_Timer -= diff; + + //HealingWard_Timer + if (HealingWard_Timer < diff) + { + //DoCast(m_creature, SPELL_POWERFULLHEALINGWARD); + m_creature->SummonCreature(14987, m_creature->GetPositionX()+3, m_creature->GetPositionY()-2, m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,30000); + HealingWard_Timer = urand(14000, 20000); + }else HealingWard_Timer -= diff; + + //Hex_Timer + if (Hex_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_HEX); + + if (m_creature->getThreatManager().getThreat(m_creature->getVictim())) + m_creature->getThreatManager().modifyThreatPercent(m_creature->getVictim(),-80); + + Hex_Timer = urand(12000, 20000); + }else Hex_Timer -= diff; + + //Casting the delusion curse with a shade. So shade will attack the same target with the curse. + if (Delusions_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + { + DoCast(target, SPELL_DELUSIONSOFJINDO); + + Creature *Shade = m_creature->SummonCreature(14986, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (Shade) + Shade->AI()->AttackStart(target); + } + + Delusions_Timer = urand(4000, 12000); + }else Delusions_Timer -= diff; + + //Teleporting a random gamer and spawning 9 skeletons that will attack this gamer + if (Teleport_Timer < diff) + { + Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM,0); + if (target && target->GetTypeId() == TYPEID_PLAYER) + { + DoTeleportPlayer(target, -11583.7783,-1249.4278,77.5471,4.745); + + if (m_creature->getThreatManager().getThreat(m_creature->getVictim())) + m_creature->getThreatManager().modifyThreatPercent(target,-100); + + Creature *Skeletons; + Skeletons = m_creature->SummonCreature(14826, target->GetPositionX()+2, target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (Skeletons) + Skeletons->AI()->AttackStart(target); + Skeletons = m_creature->SummonCreature(14826, target->GetPositionX()-2, target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (Skeletons) + Skeletons->AI()->AttackStart(target); + Skeletons = m_creature->SummonCreature(14826, target->GetPositionX()+4, target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (Skeletons) + Skeletons->AI()->AttackStart(target); + Skeletons = m_creature->SummonCreature(14826, target->GetPositionX()-4, target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (Skeletons) + Skeletons->AI()->AttackStart(target); + Skeletons = m_creature->SummonCreature(14826, target->GetPositionX(), target->GetPositionY()+2, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (Skeletons) + Skeletons->AI()->AttackStart(target); + Skeletons = m_creature->SummonCreature(14826, target->GetPositionX(), target->GetPositionY()-2, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (Skeletons) + Skeletons->AI()->AttackStart(target); + Skeletons = m_creature->SummonCreature(14826, target->GetPositionX(), target->GetPositionY()+4, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (Skeletons) + Skeletons->AI()->AttackStart(target); + Skeletons = m_creature->SummonCreature(14826, target->GetPositionX(), target->GetPositionY()-4, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (Skeletons) + Skeletons->AI()->AttackStart(target); + Skeletons = m_creature->SummonCreature(14826, target->GetPositionX()+3, target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (Skeletons) + Skeletons->AI()->AttackStart(target); + } + + Teleport_Timer = urand(15000, 23000); + }else Teleport_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +//Healing Ward +struct MANGOS_DLL_DECL mob_healing_wardAI : public ScriptedAI +{ + mob_healing_wardAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 Heal_Timer; + + void Reset() + { + Heal_Timer = 2000; + } + + void UpdateAI (const uint32 diff) + { + //Heal_Timer + if (Heal_Timer < diff) + { + if (m_pInstance) + { + Unit *pJindo = Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_JINDO)); + DoCast(pJindo, SPELL_HEAL); + } + Heal_Timer = 3000; + }else Heal_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +//Shade of Jindo +struct MANGOS_DLL_DECL mob_shade_of_jindoAI : public ScriptedAI +{ + mob_shade_of_jindoAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 ShadowShock_Timer; + + void Reset() + { + ShadowShock_Timer = 1000; + m_creature->CastSpell(m_creature, SPELL_INVISIBLE,true); + } + + void UpdateAI (const uint32 diff) + { + + //ShadowShock_Timer + if (ShadowShock_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_SHADOWSHOCK); + ShadowShock_Timer = 2000; + }else ShadowShock_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_jindo(Creature* pCreature) +{ + return new boss_jindoAI(pCreature); +} + +CreatureAI* GetAI_mob_healing_ward(Creature* pCreature) +{ + return new mob_healing_wardAI(pCreature); +} + +CreatureAI* GetAI_mob_shade_of_jindo(Creature* pCreature) +{ + return new mob_shade_of_jindoAI(pCreature); +} + +void AddSC_boss_jindo() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_jindo"; + newscript->GetAI = &GetAI_boss_jindo; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_healing_ward"; + newscript->GetAI = &GetAI_mob_healing_ward; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_shade_of_jindo"; + newscript->GetAI = &GetAI_mob_shade_of_jindo; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp b/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp new file mode 100644 index 000000000..b43178a2b --- /dev/null +++ b/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp @@ -0,0 +1,402 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Mandokir +SD%Complete: 99 +SDComment: test Threating Gaze +SDCategory: Zul'Gurub +EndScriptData */ + +#include "precompiled.h" +#include "zulgurub.h" + +enum +{ + NPC_OHGAN = 14988, + NPC_CHAINED_SPIRIT = 15117, //resing spirits + + SAY_AGGRO = -1309015, + SAY_DING_KILL = -1309016, + SAY_GRATS_JINDO = -1309017, + SAY_WATCH = -1309018, + SAY_WATCH_WHISPER = -1309019, + + EMOTE_RAGE = -1309024, + + SPELL_CHARGE = 24315, + SPELL_CLEAVE = 20691, + SPELL_FEAR = 29321, + SPELL_WHIRLWIND = 24236, + SPELL_MORTAL_STRIKE = 24573, + SPELL_ENRAGE = 23537, + SPELL_WATCH = 24314, + SPELL_SUMMON_PLAYER = 25104, + SPELL_LEVEL_UP = 24312, + + SPELL_MOUNT = 23243, //this spell may not be correct, it's the spell used by item + + //Ohgans Spells + SPELL_SUNDERARMOR = 24317, + + //Chained Spirit Spells + SPELL_REVIVE = 24341 +}; + +struct SpawnLocations +{ + float fX, fY, fZ, fAng; +}; + +static SpawnLocations aSpirits[]= +{ + {-12150.9, -1956.24, 133.407, 2.57835}, + {-12157.1, -1972.78, 133.947, 2.64903}, + {-12172.3, -1982.63, 134.061, 1.48664}, + {-12194, -1979.54, 132.194, 1.45916}, + {-12211.3, -1978.49, 133.58, 1.35705}, + {-12228.4, -1977.1, 132.728, 1.25495}, + {-12250, -1964.78, 135.066, 0.92901}, + {-12264, -1953.08, 134.072, 0.626632}, + {-12289, -1924, 132.62, 5.37829}, + {-12267.3, -1902.26, 131.328, 5.32724}, + {-12255.3, -1893.53, 134.026, 5.06413}, + {-12229.9, -1891.39, 134.704, 4.40047}, + {-12215.9, -1889.09, 137.273, 4.70285}, + {-12200.5, -1890.69, 135.777, 4.84422}, + {-12186, -1890.12, 134.261, 4.36513}, + {-12246.3, -1890.09, 135.475, 4.73427}, + {-12170.7, -1894.85, 133.852, 3.5169}, + {-12279, -1931.92, 136.13, 0.0415108}, + {-12266.1, -1940.72, 132.606, 0.7091} +}; + + +struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI +{ + boss_mandokirAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 m_uiWatch_Timer; + uint32 m_uiCleave_Timer; + uint32 m_uiWhirlwind_Timer; + uint32 m_uiFear_Timer; + uint32 m_uiMortalStrike_Timer; + uint32 m_uiCheck_Timer; + + uint8 m_uiKillCount; + + bool m_bRaptorDead; + + float m_fTargetThreat; + uint64 m_uiWatchTarget; + + void Reset() + { + m_uiWatch_Timer = 33000; + m_uiCleave_Timer = 7000; + m_uiWhirlwind_Timer = 20000; + m_uiFear_Timer = 1000; + m_uiMortalStrike_Timer = 1000; + m_uiCheck_Timer = 1000; + + m_uiKillCount = 0; + + m_bRaptorDead = false; + + m_fTargetThreat = 0.0f; + m_uiWatchTarget = 0; + + DoCast(m_creature, SPELL_MOUNT); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_OHGAN, NOT_STARTED); + + std::list lSpirits; //despawn spirits + GetCreatureListWithEntryInGrid(lSpirits, m_creature, NPC_CHAINED_SPIRIT, DEFAULT_VISIBILITY_INSTANCE); + + if (!lSpirits.empty()) + { + for(std::list::iterator iter = lSpirits.begin(); iter != lSpirits.end(); ++iter) + { + if ((*iter) && (*iter)->isAlive()) + (*iter)->ForcedDespawn(); + } + } + } + + void KilledUnit(Unit* pVictim) + { + if (pVictim->GetTypeId() == TYPEID_PLAYER) + { + ++m_uiKillCount; + + if (m_uiKillCount == 3) + { + DoScriptText(SAY_DING_KILL, m_creature); + + if (m_pInstance) + if (Unit* jTemp = Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_JINDO))) + if (jTemp->isAlive()) + DoScriptText(SAY_GRATS_JINDO, jTemp); + + DoCast(m_creature, SPELL_LEVEL_UP, true); + m_creature->SetLevel(m_creature->getLevel() + 1); + m_uiKillCount = 0; + } + + if (m_creature->isInCombat()) + { + if (Creature *pSpirit = GetClosestCreatureWithEntry(pVictim, NPC_CHAINED_SPIRIT, 50.0f)) + pSpirit->CastSpell(pVictim, SPELL_REVIVE, false); + } + } + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + + m_creature->SetInCombatWithZone(); + + uint32 uiCount = sizeof(aSpirits)/sizeof(SpawnLocations); + + for(uint8 i = 0; i < uiCount; ++i) + m_creature->SummonCreature(NPC_CHAINED_SPIRIT, aSpirits[i].fX, aSpirits[i].fY, aSpirits[i].fZ, aSpirits[i].fAng, TEMPSUMMON_CORPSE_DESPAWN, 0); + + //At combat start Mandokir is mounted so we must unmount it first, and set his flags for attackable + m_creature->RemoveAurasDueToSpell(SPELL_MOUNT); + + //And summon his raptor + m_creature->SummonCreature(NPC_OHGAN, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 35000); + } + + void JustSummoned(Creature* pSummoned) + { + if (!m_creature->getVictim()) + return; + + if (pSummoned->GetEntry() == NPC_OHGAN) + pSummoned->AI()->AttackStart(m_creature->getVictim()); + } + + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) + { + if (pSpell->Id == SPELL_WATCH) + { + DoScriptText(SAY_WATCH, m_creature, pTarget); + DoScriptText(SAY_WATCH_WHISPER, m_creature, pTarget); + + m_uiWatchTarget = pTarget->GetGUID(); + m_fTargetThreat = m_creature->getThreatManager().getThreat(pTarget); + m_uiWatch_Timer = 6000; + + //Could use this instead of hard coded timer for the above (but no script access), + //but would still a hack since we should better use the dummy, at aura removal + //SpellDurationEntry* const pDuration = sSpellDurationStore.LookupEntry(pSpell->DurationIndex); + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiWatch_Timer < uiDiff) + { + //If someone is watched + if (m_uiWatchTarget) + { + Unit* pWatchTarget = Unit::GetUnit(*m_creature, m_uiWatchTarget); + + //If threat is higher that previously saved, mandokir will act + if (pWatchTarget && pWatchTarget->isAlive() && m_creature->getThreatManager().getThreat(pWatchTarget) > m_fTargetThreat) + { + if (!m_creature->IsWithinLOSInMap(pWatchTarget)) + m_creature->CastSpell(pWatchTarget, SPELL_SUMMON_PLAYER, true); + + DoCast(pWatchTarget, SPELL_CHARGE); + } + + m_uiWatchTarget = 0; + } + else + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + { + if (Player* pPlayer = pTarget->GetCharmerOrOwnerPlayerOrPlayerItself()) + m_creature->CastSpell(pPlayer, SPELL_WATCH, false); + } + } + + m_uiWatch_Timer = 20000; + } + else + m_uiWatch_Timer -= uiDiff; + + if (!m_uiWatchTarget) + { + //Cleave + if (m_uiCleave_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_CLEAVE); + m_uiCleave_Timer = 7000; + } + else + m_uiCleave_Timer -= uiDiff; + + //Whirlwind + if (m_uiWhirlwind_Timer < uiDiff) + { + DoCast(m_creature, SPELL_WHIRLWIND); + m_uiWhirlwind_Timer = 18000; + } + else + m_uiWhirlwind_Timer -= uiDiff; + + //If more then 3 targets in melee range mandokir will cast fear + if (m_uiFear_Timer < uiDiff) + { + uint8 uiTargetInRangeCount = 0; + + std::list::iterator i = m_creature->getThreatManager().getThreatList().begin(); + for(; i != m_creature->getThreatManager().getThreatList().end(); ++i) + { + Unit* pTarget = Unit::GetUnit(*m_creature, (*i)->getUnitGuid()); + + if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(pTarget, ATTACK_DISTANCE)) + ++uiTargetInRangeCount; + } + + if (uiTargetInRangeCount > 3) + DoCast(m_creature->getVictim(), SPELL_FEAR); + + m_uiFear_Timer = 4000; + } + else + m_uiFear_Timer -= uiDiff; + + //Mortal Strike if target below 50% hp + if (m_creature->getVictim()->GetHealth() < m_creature->getVictim()->GetMaxHealth()*0.5) + { + if (m_uiMortalStrike_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_MORTAL_STRIKE); + m_uiMortalStrike_Timer = 15000; + } + else + m_uiMortalStrike_Timer -= uiDiff; + } + } + + //Checking if Ohgan is dead. If yes Mandokir will enrage. + if (!m_bRaptorDead && m_pInstance && m_pInstance->GetData(TYPE_OHGAN) == DONE) + { + DoCast(m_creature, SPELL_ENRAGE); + DoScriptText(EMOTE_RAGE, m_creature); + m_bRaptorDead = true; + } + + DoMeleeAttackIfReady(); + } +}; + +//Ohgan +struct MANGOS_DLL_DECL mob_ohganAI : public ScriptedAI +{ + mob_ohganAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 m_uiSunderArmor_Timer; + + void Reset() + { + m_uiSunderArmor_Timer = 5000; + } + + void JustDied(Unit* pKiller) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_OHGAN, DONE); + } + + void KilledUnit(Unit* pVictim) + { + if (pVictim->GetTypeId() == TYPEID_PLAYER) + { + if (m_creature->isInCombat()) + { + if (Creature* pSpirit = GetClosestCreatureWithEntry(pVictim, NPC_CHAINED_SPIRIT, 50.0f)) + pSpirit->CastSpell(pVictim, SPELL_REVIVE, false); + } + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // SunderArmor + if (m_uiSunderArmor_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_SUNDERARMOR); + m_uiSunderArmor_Timer = urand(10000, 15000); + } + else + m_uiSunderArmor_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_mandokir(Creature* pCreature) +{ + return new boss_mandokirAI(pCreature); +} + +CreatureAI* GetAI_mob_ohgan(Creature* pCreature) +{ + return new mob_ohganAI(pCreature); +} + +void AddSC_boss_mandokir() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_mandokir"; + newscript->GetAI = &GetAI_boss_mandokir; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_ohgan"; + newscript->GetAI = &GetAI_mob_ohgan; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp b/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp new file mode 100644 index 000000000..c77cef50a --- /dev/null +++ b/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp @@ -0,0 +1,375 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Marli +SD%Complete: 100 +SDComment: Vilebranch Speaker respawned when wipe? +SDCategory: Zul'Gurub +EndScriptData */ + +#include "precompiled.h" +#include "zulgurub.h" + +enum +{ + GO_EGG = 179985, + + // the spider + NPC_SPAWN_OF_MARLI = 15041, + + SAY_AGGRO = -1309005, + SAY_TRANSFORM = -1309006, + SAY_TRANSFORMBACK = -1309024, + SAY_SPIDER_SPAWN = -1309007, + SAY_DEATH = -1309008, + + SPELL_CHARGE = 22911, + SPELL_ENVELOPINGWEBS = 24110, + SPELL_POISONVOLLEY = 24099, + SPELL_SPIDER_FORM = 24084, + SPELL_DRAIN_LIFE = 24300, + SPELL_CORROSIVE_POISON = 24111, + SPELL_TRANSFORM_BACK = 24085, + SPELL_TRASH = 3391, + SPELL_HATCH = 24083, //visual + + //The Spider Spells + SPELL_LEVELUP = 24312 //visual +}; + +struct MANGOS_DLL_DECL boss_marliAI : public ScriptedAI +{ + boss_marliAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_uiDefaultModel = m_creature->GetDisplayId(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 m_uiPoisonVolley_Timer; + uint32 m_uiSpawnSpider_Timer; + uint32 m_uiCharge_Timer; + uint32 m_uiAspect_Timer; + uint32 m_uiTransform_Timer; + uint32 m_uiTransformBack_Timer; + uint32 m_uiDrainLife_Timer; + uint32 m_uiCorrosivePoison_Timer; + uint32 m_uiWebs_Timer; + uint32 m_uiTrash_Timer; + + bool m_bFirstSpidersAreSpawned; + bool m_bIsInPhaseTwo; + bool m_bHasWebbed; + + uint32 m_uiDefaultModel; + + void Reset() + { + m_uiPoisonVolley_Timer = 15000; + m_uiSpawnSpider_Timer = 20000; + m_uiAspect_Timer = 12000; + m_uiTransform_Timer = 60000; + m_uiTransformBack_Timer = 60000; + m_uiDrainLife_Timer = 30000; + m_uiCorrosivePoison_Timer = 1000; + m_uiWebs_Timer = 5000; + m_uiTrash_Timer = 5000; + + m_bFirstSpidersAreSpawned = false; + m_bIsInPhaseTwo = false; + m_bHasWebbed = false; + + std::list lSpiderEggs; + GetGameObjectListWithEntryInGrid(lSpiderEggs, m_creature, GO_EGG, DEFAULT_VISIBILITY_INSTANCE); + if (lSpiderEggs.empty()) + debug_log("SD2: boss_marli, no Eggs with the entry %u were found", GO_EGG); + else + { + for(std::list::iterator iter = lSpiderEggs.begin(); iter != lSpiderEggs.end(); ++iter) + { + if ((*iter)->GetGoState() == GO_STATE_ACTIVE) + (*iter)->SetGoState(GO_STATE_READY); + } + } + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + + if (!m_bFirstSpidersAreSpawned) + { + DoScriptText(SAY_SPIDER_SPAWN, m_creature); + DoCast(m_creature, SPELL_HATCH); + + for(uint8 i = 0; i < 4 ; ++i) + { + if (GameObject *pEgg = SelectNextEgg()) + { + pEgg->SetGoState(GO_STATE_ACTIVE); + m_creature->SummonCreature(NPC_SPAWN_OF_MARLI, pEgg->GetPositionX(), pEgg->GetPositionY(), pEgg->GetPositionZ(),0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + } + } + + m_bFirstSpidersAreSpawned = true; + } + } + + GameObject* SelectNextEgg() + { + std::list lEggs; + GetGameObjectListWithEntryInGrid(lEggs, m_creature, GO_EGG, DEFAULT_VISIBILITY_INSTANCE); + if (lEggs.empty()) + debug_log("SD2: boss_marli, no Eggs with the entry %i were found", GO_EGG); + else + { + lEggs.sort(ObjectDistanceOrder(m_creature)); + for(std::list::iterator iter = lEggs.begin(); iter != lEggs.end(); ++iter) + { + if ((*iter)->GetGoState() == (GO_STATE_READY)) + return (*iter); + } + } + return NULL; + } + + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_SPAWN_OF_MARLI) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + pSummoned->AI()->AttackStart(pTarget); + } + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + { + m_pInstance->SetData(TYPE_MARLI, DONE); + + if (Creature* pHakkar = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_HAKKAR))) + { + if (pHakkar->isAlive()) + pHakkar->SetMaxHealth(pHakkar->GetMaxHealth() - 60000); + } + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (!m_bIsInPhaseTwo) + { + if (m_uiPoisonVolley_Timer < uiDiff) + { + DoCast(m_creature->getVictim(),SPELL_POISONVOLLEY); + m_uiPoisonVolley_Timer = urand(10000, 20000); + } + else + m_uiPoisonVolley_Timer -= uiDiff; + + if (m_uiDrainLife_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_DRAIN_LIFE); + m_uiDrainLife_Timer = urand(20000, 50000); + } + else + m_uiDrainLife_Timer -= uiDiff; + + if (m_uiSpawnSpider_Timer < uiDiff) + { + if (GameObject *pEgg = SelectNextEgg()) + { + pEgg->SetGoState(GO_STATE_ACTIVE); + m_creature->SummonCreature(NPC_SPAWN_OF_MARLI, pEgg->GetPositionX(), pEgg->GetPositionY(), pEgg->GetPositionZ(),0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + } + m_uiSpawnSpider_Timer = urand(20000, 30000); + } + else + m_uiSpawnSpider_Timer -= uiDiff; + } + else + { + if (!m_bHasWebbed && m_uiWebs_Timer < uiDiff) + { + DoCast(m_creature->getVictim(),SPELL_ENVELOPINGWEBS); + m_uiWebs_Timer = urand(10000, 15000); + m_uiCharge_Timer = 1000; + m_bHasWebbed = true; + } + else + m_uiWebs_Timer -= uiDiff; + + if (m_bHasWebbed && m_uiCharge_Timer < uiDiff) + { + //Shouldn't be random target but highestaggro not Webbed player + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + { + DoCast(pTarget, SPELL_CHARGE); + DoResetThreat(); + AttackStart(pTarget); + m_bHasWebbed = false; + /* + DoResetThreat(); + Unit* pTarget = NULL; + uint8 i = 0 ; + while (i < 5) // max 3 tries to get a random target with power_mana + { + ++i; //not aggro leader + pTarget = SelectUnit(SELECT_TARGET_RANDOM,0); + if (pTarget && pTarget->getPowerType() == POWER_MANA) + i=5; + } + */ + } + m_uiWebs_Timer = urand(10000, 20000); + } + else + m_uiCharge_Timer -= uiDiff; + + if (m_uiCorrosivePoison_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_CORROSIVE_POISON); + m_uiCorrosivePoison_Timer = urand(25000, 35000); + } + else + m_uiCorrosivePoison_Timer -= uiDiff; + } + + if (m_uiTransformBack_Timer < uiDiff) + { + if (!m_bIsInPhaseTwo) + { + if (m_creature->IsNonMeleeSpellCasted(false)) + m_creature->InterruptNonMeleeSpells(false); + + DoScriptText(SAY_TRANSFORM, m_creature); + DoCast(m_creature,SPELL_SPIDER_FORM); + + const CreatureInfo *cinfo = m_creature->GetCreatureInfo(); + m_creature->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, (cinfo->mindmg +((cinfo->mindmg/100) * 35))); + m_creature->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, (cinfo->maxdmg +((cinfo->maxdmg/100) * 35))); + m_creature->UpdateDamagePhysical(BASE_ATTACK); + + DoResetThreat(); + + m_bIsInPhaseTwo = true; + } + else + { + if (m_creature->IsNonMeleeSpellCasted(false)) + m_creature->InterruptNonMeleeSpells(false); + + DoScriptText(SAY_TRANSFORMBACK, m_creature); + DoCast(m_creature,SPELL_TRANSFORM_BACK); + + m_creature->SetDisplayId(m_uiDefaultModel); + + const CreatureInfo *cinfo = m_creature->GetCreatureInfo(); + m_creature->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, (cinfo->mindmg +((cinfo->mindmg/100) * 1))); + m_creature->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, (cinfo->maxdmg +((cinfo->maxdmg/100) * 1))); + m_creature->UpdateDamagePhysical(BASE_ATTACK); + + m_bIsInPhaseTwo = false; + } + + m_uiTransformBack_Timer = urand(55000, 70000); + } + else + m_uiTransformBack_Timer -= uiDiff; + + if (m_uiTrash_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_TRASH); + m_uiTrash_Timer = urand(10000, 20000); + } + else + m_uiTrash_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +//Spawn of Marli +struct MANGOS_DLL_DECL mob_spawn_of_marliAI : public ScriptedAI +{ + mob_spawn_of_marliAI(Creature* pCreature) : ScriptedAI(pCreature) + { + Reset(); + m_pInstance = (ScriptedInstance*)m_creature->GetInstanceData(); + } + + ScriptedInstance* m_pInstance; + uint32 m_uiLevelUp_Timer; + + void Reset() + { + m_uiLevelUp_Timer = 3000; + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiLevelUp_Timer < uiDiff) + { + if (m_pInstance && m_pInstance->GetData(TYPE_MARLI) != DONE) + { + DoCast(m_creature,SPELL_LEVELUP); + m_creature->SetLevel(m_creature->getLevel() + 1); + } + m_uiLevelUp_Timer = 3000; + } + else + m_uiLevelUp_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_marli(Creature* pCreature) +{ + return new boss_marliAI(pCreature); +} + +CreatureAI* GetAI_mob_spawn_of_marli(Creature* pCreature) +{ + return new mob_spawn_of_marliAI(pCreature); +} + +void AddSC_boss_marli() +{ + Script* newscript; + + newscript = new Script; + newscript->Name = "boss_marli"; + newscript->GetAI = &GetAI_boss_marli; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_spawn_of_marli"; + newscript->GetAI = &GetAI_mob_spawn_of_marli; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp b/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp new file mode 100644 index 000000000..1d5ca979f --- /dev/null +++ b/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp @@ -0,0 +1,146 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Renataki +SD%Complete: 100 +SDComment: +SDCategory: Zul'Gurub +EndScriptData */ + +#include "precompiled.h" +#include "zulgurub.h" + +#define SPELL_AMBUSH 24337 +#define SPELL_THOUSANDBLADES 24649 + +#define EQUIP_ID_MAIN_HAND 0 //was item display id 31818, but this id does not exist + +struct MANGOS_DLL_DECL boss_renatakiAI : public ScriptedAI +{ + boss_renatakiAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 Invisible_Timer; + uint32 Ambush_Timer; + uint32 Visible_Timer; + uint32 Aggro_Timer; + uint32 ThousandBlades_Timer; + + bool Invisible; + bool Ambushed; + + void Reset() + { + Invisible_Timer = urand(8000, 18000); + Ambush_Timer = 3000; + Visible_Timer = 4000; + Aggro_Timer = urand(15000, 25000); + ThousandBlades_Timer = urand(4000, 8000); + + Invisible = false; + Ambushed = false; + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Invisible_Timer + if (Invisible_Timer < diff) + { + m_creature->InterruptSpell(CURRENT_GENERIC_SPELL); + + SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE); + m_creature->SetDisplayId(11686); + + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + Invisible = true; + + Invisible_Timer = urand(15000, 30000); + }else Invisible_Timer -= diff; + + if (Invisible) + { + if (Ambush_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + { + m_creature->GetMap()->CreatureRelocation(m_creature, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0.0f); + m_creature->SendMonsterMove(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, MONSTER_MOVE_WALK, 1); + DoCast(target,SPELL_AMBUSH); + } + + Ambushed = true; + Ambush_Timer = 3000; + }else Ambush_Timer -= diff; + } + + if (Ambushed) + { + if (Visible_Timer < diff) + { + m_creature->InterruptSpell(CURRENT_GENERIC_SPELL); + + m_creature->SetDisplayId(15268); + SetEquipmentSlots(false, EQUIP_ID_MAIN_HAND, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE); + + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + Invisible = false; + + Visible_Timer = 4000; + }else Visible_Timer -= diff; + } + + //Resetting some aggro so he attacks other gamers + if (!Invisible) + if (Aggro_Timer < diff) + { + Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM,1); + + if (m_creature->getThreatManager().getThreat(m_creature->getVictim())) + m_creature->getThreatManager().modifyThreatPercent(m_creature->getVictim(),-50); + + if (target) + AttackStart(target); + + Aggro_Timer = urand(7000, 20000); + }else Aggro_Timer -= diff; + + if (!Invisible) + if (ThousandBlades_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_THOUSANDBLADES); + ThousandBlades_Timer = urand(7000, 12000); + }else ThousandBlades_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_renataki(Creature* pCreature) +{ + return new boss_renatakiAI(pCreature); +} + +void AddSC_boss_renataki() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_renataki"; + newscript->GetAI = &GetAI_boss_renataki; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp b/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp new file mode 100644 index 000000000..396a7f4bd --- /dev/null +++ b/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp @@ -0,0 +1,545 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Thekal +SD%Complete: 95 +SDComment: Almost finished. +SDCategory: Zul'Gurub +EndScriptData */ + +#include "precompiled.h" +#include "zulgurub.h" + +#define SAY_AGGRO -1309009 +#define SAY_DEATH -1309010 + +#define SPELL_MORTALCLEAVE 22859 +#define SPELL_SILENCE 23207 +#define SPELL_FRENZY 23342 +#define SPELL_FORCEPUNCH 24189 +#define SPELL_CHARGE 24408 +#define SPELL_ENRAGE 23537 +#define SPELL_SUMMONTIGERS 24183 +#define SPELL_TIGER_FORM 24169 +#define SPELL_RESURRECT 24173 //We will not use this spell. + +//Zealot Lor'Khan Spells +#define SPELL_SHIELD 25020 +#define SPELL_BLOODLUST 24185 +#define SPELL_GREATERHEAL 24208 +#define SPELL_DISARM 22691 + +//Zealot Lor'Khan Spells +#define SPELL_SWEEPINGSTRIKES 18765 +#define SPELL_SINISTERSTRIKE 15667 +#define SPELL_GOUGE 24698 +#define SPELL_KICK 15614 +#define SPELL_BLIND 21060 + +struct MANGOS_DLL_DECL boss_thekalAI : public ScriptedAI +{ + boss_thekalAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 MortalCleave_Timer; + uint32 Silence_Timer; + uint32 Frenzy_Timer; + uint32 ForcePunch_Timer; + uint32 Charge_Timer; + uint32 Enrage_Timer; + uint32 SummonTigers_Timer; + uint32 Check_Timer; + uint32 Resurrect_Timer; + + bool Enraged; + bool PhaseTwo; + bool WasDead; + + void Reset() + { + MortalCleave_Timer = 4000; + Silence_Timer = 9000; + Frenzy_Timer = 30000; + ForcePunch_Timer = 4000; + Charge_Timer = 12000; + Enrage_Timer = 32000; + SummonTigers_Timer = 25000; + Check_Timer = 10000; + Resurrect_Timer = 10000; + + Enraged = false; + PhaseTwo = false; + WasDead = false; + } + + void Aggro(Unit *who) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void JustDied(Unit* Killer) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_THEKAL, DONE); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_THEKAL, NOT_STARTED); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Check_Timer for the death of LorKhan and Zath. + if (!WasDead && Check_Timer < diff) + { + if (m_pInstance) + { + if (m_pInstance->GetData(TYPE_LORKHAN) == SPECIAL) + { + //Resurrect LorKhan + if (Unit *pLorKhan = Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_LORKHAN))) + { + pLorKhan->SetStandState(UNIT_STAND_STATE_STAND); + pLorKhan->setFaction(14); + pLorKhan->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + pLorKhan->SetHealth(int(pLorKhan->GetMaxHealth()*1.0)); + + m_pInstance->SetData(TYPE_LORKHAN, DONE); + } + } + + if (m_pInstance->GetData(TYPE_ZATH) == SPECIAL) + { + //Resurrect Zath + if (Unit *pZath = Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_ZATH))) + { + pZath->SetStandState(UNIT_STAND_STATE_STAND); + pZath->setFaction(14); + pZath->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + pZath->SetHealth(int(pZath->GetMaxHealth()*1.0)); + + m_pInstance->SetData(TYPE_ZATH, DONE); + } + } + } + Check_Timer = 5000; + }else Check_Timer -= diff; + + if (!PhaseTwo && MortalCleave_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_MORTALCLEAVE); + MortalCleave_Timer = urand(15000, 20000); + }else MortalCleave_Timer -= diff; + + if (!PhaseTwo && Silence_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_SILENCE); + Silence_Timer = urand(20000, 25000); + }else Silence_Timer -= diff; + + if (!PhaseTwo && !WasDead && m_creature->GetHealth() <= m_creature->GetMaxHealth() * 0.05) + { + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetStandState(UNIT_STAND_STATE_SLEEP); + m_creature->AttackStop(); + + if (m_pInstance) + m_pInstance->SetData(TYPE_THEKAL, SPECIAL); + + WasDead = true; + } + + //Thekal will transform to Tiger if he died and was not resurrected after 10 seconds. + if (!PhaseTwo && WasDead) + { + if (Resurrect_Timer < diff) + { + DoCast(m_creature,SPELL_TIGER_FORM); + m_creature->SetFloatValue(OBJECT_FIELD_SCALE_X, 2.00f); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetHealth(int(m_creature->GetMaxHealth()*1.0)); + const CreatureInfo *cinfo = m_creature->GetCreatureInfo(); + m_creature->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, (cinfo->mindmg +((cinfo->mindmg/100) * 40))); + m_creature->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, (cinfo->maxdmg +((cinfo->maxdmg/100) * 40))); + m_creature->UpdateDamagePhysical(BASE_ATTACK); + DoResetThreat(); + PhaseTwo = true; + }else Resurrect_Timer -= diff; + } + + if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth() == 100) && WasDead) + { + WasDead = false; + } + + if (PhaseTwo) + { + if (Charge_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + { + DoCast(target,SPELL_CHARGE); + DoResetThreat(); + AttackStart(target); + } + Charge_Timer = urand(15000, 22000); + }else Charge_Timer -= diff; + + if (Frenzy_Timer < diff) + { + DoCast(m_creature,SPELL_FRENZY); + Frenzy_Timer = 30000; + }else Frenzy_Timer -= diff; + + if (ForcePunch_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_SILENCE); + ForcePunch_Timer = urand(16000, 21000); + }else ForcePunch_Timer -= diff; + + if (SummonTigers_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_SUMMONTIGERS); + SummonTigers_Timer = urand(10000, 14000); + }else SummonTigers_Timer -= diff; + + if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 11) && !Enraged) + { + DoCast(m_creature, SPELL_ENRAGE); + Enraged = true; + } + } + + DoMeleeAttackIfReady(); + } +}; + +//Zealot Lor'Khan +struct MANGOS_DLL_DECL mob_zealot_lorkhanAI : public ScriptedAI +{ + mob_zealot_lorkhanAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + uint32 Shield_Timer; + uint32 BloodLust_Timer; + uint32 GreaterHeal_Timer; + uint32 Disarm_Timer; + uint32 Check_Timer; + + bool FakeDeath; + + ScriptedInstance* m_pInstance; + + void Reset() + { + Shield_Timer = 1000; + BloodLust_Timer = 16000; + GreaterHeal_Timer = 32000; + Disarm_Timer = 6000; + Check_Timer = 10000; + + FakeDeath = false; + + if (m_pInstance) + m_pInstance->SetData(TYPE_LORKHAN, NOT_STARTED); + + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } + + void UpdateAI (const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Shield_Timer + if (Shield_Timer < diff) + { + DoCast(m_creature,SPELL_SHIELD); + Shield_Timer = 61000; + }else Shield_Timer -= diff; + + //BloodLust_Timer + if (BloodLust_Timer < diff) + { + DoCast(m_creature,SPELL_BLOODLUST); + BloodLust_Timer = urand(20000, 28000); + }else BloodLust_Timer -= diff; + + //Casting Greaterheal to Thekal or Zath if they are in meele range. + if (GreaterHeal_Timer < diff) + { + if (m_pInstance) + { + Unit *pThekal = Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_THEKAL)); + Unit *pZath = Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_ZATH)); + + switch(urand(0, 1)) + { + case 0: + if (pThekal && m_creature->IsWithinDistInMap(pThekal, ATTACK_DISTANCE)) + DoCast(pThekal, SPELL_GREATERHEAL); + break; + case 1: + if (pZath && m_creature->IsWithinDistInMap(pZath, ATTACK_DISTANCE)) + DoCast(pZath, SPELL_GREATERHEAL); + break; + } + } + + GreaterHeal_Timer = urand(15000, 20000); + }else GreaterHeal_Timer -= diff; + + //Disarm_Timer + if (Disarm_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_DISARM); + Disarm_Timer = urand(15000, 25000); + }else Disarm_Timer -= diff; + + //Check_Timer for the death of LorKhan and Zath. + if (!FakeDeath && Check_Timer < diff) + { + if (m_pInstance) + { + if (m_pInstance->GetData(TYPE_THEKAL) == SPECIAL) + { + //Resurrect Thekal + if (Unit *pThekal = Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_THEKAL))) + { + pThekal->SetStandState(UNIT_STAND_STATE_STAND); + pThekal->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + pThekal->setFaction(14); + pThekal->SetHealth(int(pThekal->GetMaxHealth()*1.0)); + } + } + + if (m_pInstance->GetData(TYPE_ZATH) == SPECIAL) + { + //Resurrect Zath + if (Unit *pZath = Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_ZATH))) + { + pZath->SetStandState(UNIT_STAND_STATE_STAND); + pZath->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + pZath->setFaction(14); + pZath->SetHealth(int(pZath->GetMaxHealth()*1.0)); + } + } + } + + Check_Timer = 5000; + }else Check_Timer -= diff; + + if (m_creature->GetHealth() <= m_creature->GetMaxHealth() * 0.05) + { + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetStandState(UNIT_STAND_STATE_SLEEP); + m_creature->setFaction(35); + m_creature->AttackStop(); + + if (m_pInstance) + m_pInstance->SetData(TYPE_LORKHAN, SPECIAL); + + FakeDeath = true; + } + + DoMeleeAttackIfReady(); + } +}; + +//Zealot Zath +struct MANGOS_DLL_DECL mob_zealot_zathAI : public ScriptedAI +{ + mob_zealot_zathAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + uint32 SweepingStrikes_Timer; + uint32 SinisterStrike_Timer; + uint32 Gouge_Timer; + uint32 Kick_Timer; + uint32 Blind_Timer; + uint32 Check_Timer; + + bool FakeDeath; + + ScriptedInstance* m_pInstance; + + void Reset() + { + SweepingStrikes_Timer = 13000; + SinisterStrike_Timer = 8000; + Gouge_Timer = 25000; + Kick_Timer = 18000; + Blind_Timer = 5000; + Check_Timer = 10000; + + FakeDeath = false; + + if (m_pInstance) + m_pInstance->SetData(TYPE_ZATH, NOT_STARTED); + + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } + + void UpdateAI (const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //SweepingStrikes_Timer + if (SweepingStrikes_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_SWEEPINGSTRIKES); + SweepingStrikes_Timer = urand(22000, 26000); + }else SweepingStrikes_Timer -= diff; + + //SinisterStrike_Timer + if (SinisterStrike_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_SINISTERSTRIKE); + SinisterStrike_Timer = urand(8000, 16000); + }else SinisterStrike_Timer -= diff; + + //Gouge_Timer + if (Gouge_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_GOUGE); + + if (m_creature->getThreatManager().getThreat(m_creature->getVictim())) + m_creature->getThreatManager().modifyThreatPercent(m_creature->getVictim(),-100); + + Gouge_Timer = urand(17000, 27000); + }else Gouge_Timer -= diff; + + //Kick_Timer + if (Kick_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_KICK); + Kick_Timer = urand(15000, 25000); + }else Kick_Timer -= diff; + + //Blind_Timer + if (Blind_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_BLIND); + Blind_Timer = urand(10000, 20000); + }else Blind_Timer -= diff; + + //Check_Timer for the death of LorKhan and Zath. + if (!FakeDeath && Check_Timer < diff) + { + if (m_pInstance) + { + if (m_pInstance->GetData(TYPE_LORKHAN) == SPECIAL) + { + //Resurrect LorKhan + if (Unit *pLorKhan = Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_LORKHAN))) + { + pLorKhan->SetStandState(UNIT_STAND_STATE_STAND); + pLorKhan->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + pLorKhan->setFaction(14); + pLorKhan->SetHealth(int(pLorKhan->GetMaxHealth()*1.0)); + } + } + + if (m_pInstance->GetData(TYPE_THEKAL) == SPECIAL) + { + //Resurrect Thekal + if (Unit *pThekal = Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_THEKAL))) + { + pThekal->SetStandState(UNIT_STAND_STATE_STAND); + pThekal->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + pThekal->setFaction(14); + pThekal->SetHealth(int(pThekal->GetMaxHealth()*1.0)); + } + } + } + + Check_Timer = 5000; + }else Check_Timer -= diff; + + if (m_creature->GetHealth() <= m_creature->GetMaxHealth() * 0.05) + { + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetStandState(UNIT_STAND_STATE_SLEEP); + m_creature->setFaction(35); + m_creature->AttackStop(); + + if (m_pInstance) + m_pInstance->SetData(TYPE_ZATH, SPECIAL); + + FakeDeath = true; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_thekal(Creature* pCreature) +{ + return new boss_thekalAI(pCreature); +} + +CreatureAI* GetAI_mob_zealot_lorkhan(Creature* pCreature) +{ + return new mob_zealot_lorkhanAI(pCreature); +} + +CreatureAI* GetAI_mob_zealot_zath(Creature* pCreature) +{ + return new mob_zealot_zathAI(pCreature); +} + +void AddSC_boss_thekal() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_thekal"; + newscript->GetAI = &GetAI_boss_thekal; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_zealot_lorkhan"; + newscript->GetAI = &GetAI_mob_zealot_lorkhan; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_zealot_zath"; + newscript->GetAI = &GetAI_mob_zealot_zath; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp b/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp new file mode 100644 index 000000000..656e3ecf4 --- /dev/null +++ b/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp @@ -0,0 +1,270 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Venoxis +SD%Complete: 100 +SDComment: +SDCategory: Zul'Gurub +EndScriptData */ + +#include "precompiled.h" +#include "zulgurub.h" + +enum +{ + NPC_RAZZASHI_COBRA = 11373, + + SAY_TRANSFORM = -1309000, + SAY_DEATH = -1309001, + + SPELL_HOLY_FIRE = 23860, + SPELL_HOLY_WRATH = 23979, + SPELL_VENOMSPIT = 23862, + SPELL_HOLY_NOVA = 23858, + SPELL_POISON_CLOUD = 23861, + SPELL_SNAKE_FORM = 23849, + SPELL_RENEW = 23895, + SPELL_BERSERK = 23537, + SPELL_DISPELL = 23859, + SPELL_PARASITIC = 23865, + SPELL_TRASH = 3391 +}; + +struct MANGOS_DLL_DECL boss_venoxisAI : public ScriptedAI +{ + boss_venoxisAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_fDefaultSize = m_creature->GetFloatValue(OBJECT_FIELD_SCALE_X); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 m_uiHolyFire_Timer; + uint32 m_uiHolyWrath_Timer; + uint32 m_uiVenomSpit_Timer; + uint32 m_uiRenew_Timer; + uint32 m_uiPoisonCloud_Timer; + uint32 m_uiHolyNova_Timer; + uint32 m_uiDispell_Timer; + uint32 m_uiParasitic_Timer; + uint32 m_uiTrash_Timer; + + uint8 m_uiTargetsInRangeCount; + + bool m_bPhaseTwo; + bool m_bInBerserk; + + float m_fDefaultSize; + + void Reset() + { + m_uiHolyFire_Timer = 10000; + m_uiHolyWrath_Timer = 60500; + m_uiVenomSpit_Timer = 5500; + m_uiRenew_Timer = 30500; + m_uiPoisonCloud_Timer = 2000; + m_uiHolyNova_Timer = 5000; + m_uiDispell_Timer = 35000; + m_uiParasitic_Timer = 10000; + m_uiTrash_Timer = 5000; + + m_uiTargetsInRangeCount = 0; + + m_creature->SetFloatValue(OBJECT_FIELD_SCALE_X, m_fDefaultSize); + + m_bPhaseTwo = false; + m_bInBerserk = false; + } + + void JustReachedHome() + { + std::list m_lCobras; + GetCreatureListWithEntryInGrid(m_lCobras, m_creature, NPC_RAZZASHI_COBRA, DEFAULT_VISIBILITY_INSTANCE); + + if (m_lCobras.empty()) + debug_log("SD2: boss_venoxis, no Cobras with the entry %u were found", NPC_RAZZASHI_COBRA); + else + { + for(std::list::iterator iter = m_lCobras.begin(); iter != m_lCobras.end(); ++iter) + { + if ((*iter) && !(*iter)->isAlive()) + (*iter)->Respawn(); + } + } + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + { + m_pInstance->SetData(TYPE_VENOXIS, DONE); + + if (Unit* pHakkar = Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_HAKKAR))) + pHakkar->SetMaxHealth(pHakkar->GetMaxHealth() - 60000); + } + } + + void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + { + if (!m_bPhaseTwo && (m_creature->GetHealth()+uiDamage)*100 / m_creature->GetMaxHealth() < 50) + { + DoScriptText(SAY_TRANSFORM, m_creature); + + m_creature->InterruptNonMeleeSpells(false); + DoCast(m_creature,SPELL_SNAKE_FORM); + + m_creature->SetFloatValue(OBJECT_FIELD_SCALE_X, m_fDefaultSize*2); + const CreatureInfo *cinfo = m_creature->GetCreatureInfo(); + m_creature->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, (cinfo->mindmg +((cinfo->mindmg/100) * 25))); + m_creature->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, (cinfo->maxdmg +((cinfo->maxdmg/100) * 25))); + m_creature->UpdateDamagePhysical(BASE_ATTACK); + DoResetThreat(); + m_bPhaseTwo = true; + } + + if (m_bPhaseTwo && !m_bInBerserk && (m_creature->GetHealth()+uiDamage)*100 / m_creature->GetMaxHealth() < 11) + { + m_creature->InterruptNonMeleeSpells(false); + DoCast(m_creature, SPELL_BERSERK); + m_bInBerserk = true; + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (!m_bPhaseTwo) + { + if (m_uiDispell_Timer < uiDiff) + { + DoCast(m_creature, SPELL_DISPELL); + m_uiDispell_Timer = urand(15000, 30000); + } + else + m_uiDispell_Timer -= uiDiff; + + if (m_uiRenew_Timer < uiDiff) + { + DoCast(m_creature, SPELL_RENEW); + m_uiRenew_Timer = urand(20000, 30000); + } + else + m_uiRenew_Timer -= uiDiff; + + if (m_uiHolyWrath_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_HOLY_WRATH); + m_uiHolyWrath_Timer = urand(15000, 25000); + } + else + m_uiHolyWrath_Timer -= uiDiff; + + if (m_uiHolyNova_Timer < uiDiff) + { + m_uiTargetsInRangeCount = 0; + for(uint8 i = 0; i < 10; ++i) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_TOPAGGRO,i)) + if (m_creature->IsWithinDistInMap(pTarget, ATTACK_DISTANCE)) + ++m_uiTargetsInRangeCount; + } + + if (m_uiTargetsInRangeCount > 1) + { + DoCast(m_creature->getVictim(),SPELL_HOLY_NOVA); + m_uiHolyNova_Timer = 1000; + } + else + { + m_uiHolyNova_Timer = 2000; + } + } + else + m_uiHolyNova_Timer -= uiDiff; + + if (m_uiHolyFire_Timer < uiDiff && m_uiTargetsInRangeCount < 3) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(pTarget, SPELL_HOLY_FIRE); + + m_uiHolyFire_Timer = 8000; + } + else + m_uiHolyFire_Timer -= uiDiff; + } + else + { + if (m_uiPoisonCloud_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_POISON_CLOUD); + m_uiPoisonCloud_Timer = 15000; + } + else + m_uiPoisonCloud_Timer -= uiDiff; + + if (m_uiVenomSpit_Timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(pTarget, SPELL_VENOMSPIT); + + m_uiVenomSpit_Timer = urand(15000, 20000); + } + else + m_uiVenomSpit_Timer -= uiDiff; + + if (m_uiParasitic_Timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(pTarget, SPELL_PARASITIC); + + m_uiParasitic_Timer = 10000; + } + else + m_uiParasitic_Timer -= uiDiff; + } + + if (m_uiTrash_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_TRASH); + m_uiTrash_Timer = urand(10000, 20000); + } + else + m_uiTrash_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_venoxis(Creature* pCreature) +{ + return new boss_venoxisAI(pCreature); +} + +void AddSC_boss_venoxis() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_venoxis"; + newscript->GetAI = &GetAI_boss_venoxis; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/zulgurub/boss_wushoolay.cpp b/scripts/eastern_kingdoms/zulgurub/boss_wushoolay.cpp new file mode 100644 index 000000000..5fedded62 --- /dev/null +++ b/scripts/eastern_kingdoms/zulgurub/boss_wushoolay.cpp @@ -0,0 +1,80 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Wushoolay +SD%Complete: 100 +SDComment: +SDCategory: Zul'Gurub +EndScriptData */ + +#include "precompiled.h" +#include "zulgurub.h" + +#define SPELL_LIGHTNINGCLOUD 25033 +#define SPELL_LIGHTNINGWAVE 24819 + +struct MANGOS_DLL_DECL boss_wushoolayAI : public ScriptedAI +{ + boss_wushoolayAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 LightningCloud_Timer; + uint32 LightningWave_Timer; + + void Reset() + { + LightningCloud_Timer = urand(5000, 10000); + LightningWave_Timer = urand(8000, 16000); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //LightningCloud_Timer + if (LightningCloud_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_LIGHTNINGCLOUD); + LightningCloud_Timer = urand(15000, 20000); + }else LightningCloud_Timer -= diff; + + //LightningWave_Timer + if (LightningWave_Timer < diff) + { + Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM,0); + if (target) DoCast(target,SPELL_LIGHTNINGWAVE); + + LightningWave_Timer = urand(12000, 16000); + }else LightningWave_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_wushoolay(Creature* pCreature) +{ + return new boss_wushoolayAI(pCreature); +} + +void AddSC_boss_wushoolay() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_wushoolay"; + newscript->GetAI = &GetAI_boss_wushoolay; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp b/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp new file mode 100644 index 000000000..41ed7542a --- /dev/null +++ b/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp @@ -0,0 +1,162 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance_ZulGurub +SD%Complete: 80 +SDComment: Missing reset function after killing a boss for Ohgan, Thekal. +SDCategory: Zul'Gurub +EndScriptData */ + +#include "precompiled.h" +#include "zulgurub.h" + +struct MANGOS_DLL_DECL instance_zulgurub : public ScriptedInstance +{ + instance_zulgurub(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + + //If all High Priest bosses were killed. Lorkhan, Zath and Ohgan are added too. + uint32 m_auiEncounter[MAX_ENCOUNTER]; + + //Storing Lorkhan, Zath and Thekal because we need to cast on them later. Jindo is needed for healfunction too. + uint64 m_uiLorKhanGUID; + uint64 m_uiZathGUID; + uint64 m_uiThekalGUID; + uint64 m_uiJindoGUID; + uint64 m_uiHakkarGUID; + + void Initialize() + { + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + + m_uiLorKhanGUID = 0; + m_uiZathGUID = 0; + m_uiThekalGUID = 0; + m_uiJindoGUID = 0; + m_uiHakkarGUID = 0; + } + + bool IsEncounterInProgress() const + { + //not active in Zul'Gurub + return false; + } + + void OnCreatureCreate(Creature* pCreature) + { + switch(pCreature->GetEntry()) + { + case NPC_LORKHAN: m_uiLorKhanGUID = pCreature->GetGUID(); break; + case NPC_ZATH: m_uiZathGUID = pCreature->GetGUID(); break; + case NPC_THEKAL: m_uiThekalGUID = pCreature->GetGUID(); break; + case NPC_JINDO: m_uiJindoGUID = pCreature->GetGUID(); break; + case NPC_HAKKAR: m_uiHakkarGUID = pCreature->GetGUID(); break; + } + } + + void SetData(uint32 uiType, uint32 uiData) + { + switch(uiType) + { + case TYPE_ARLOKK: + m_auiEncounter[0] = uiData; + break; + case TYPE_JEKLIK: + m_auiEncounter[1] = uiData; + break; + case TYPE_VENOXIS: + m_auiEncounter[2] = uiData; + break; + case TYPE_MARLI: + m_auiEncounter[3] = uiData; + break; + case TYPE_THEKAL: + m_auiEncounter[4] = uiData; + break; + case TYPE_LORKHAN: + m_auiEncounter[5] = uiData; + break; + case TYPE_ZATH: + m_auiEncounter[6] = uiData; + break; + case TYPE_OHGAN: + m_auiEncounter[7] = uiData; + break; + case TYPE_HAKKAR: + m_auiEncounter[8] = uiData; + break; + } + } + + uint32 GetData(uint32 uiType) + { + switch(uiType) + { + case TYPE_ARLOKK: + return m_auiEncounter[0]; + case TYPE_JEKLIK: + return m_auiEncounter[1]; + case TYPE_VENOXIS: + return m_auiEncounter[2]; + case TYPE_MARLI: + return m_auiEncounter[3]; + case TYPE_THEKAL: + return m_auiEncounter[4]; + case TYPE_LORKHAN: + return m_auiEncounter[5]; + case TYPE_ZATH: + return m_auiEncounter[6]; + case TYPE_OHGAN: + return m_auiEncounter[7]; + case TYPE_HAKKAR: + return m_auiEncounter[8]; + } + + return 0; + } + + uint64 GetData64(uint32 uiData) + { + switch(uiData) + { + case DATA_LORKHAN: + return m_uiLorKhanGUID; + case DATA_ZATH: + return m_uiZathGUID; + case DATA_THEKAL: + return m_uiThekalGUID; + case DATA_JINDO: + return m_uiJindoGUID; + case DATA_HAKKAR: + return m_uiHakkarGUID; + } + return 0; + } +}; + +InstanceData* GetInstanceData_instance_zulgurub(Map* pMap) +{ + return new instance_zulgurub(pMap); +} + +void AddSC_instance_zulgurub() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "instance_zulgurub"; + newscript->GetInstanceData = &GetInstanceData_instance_zulgurub; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/zulgurub/zulgurub.h b/scripts/eastern_kingdoms/zulgurub/zulgurub.h new file mode 100644 index 000000000..e5290db57 --- /dev/null +++ b/scripts/eastern_kingdoms/zulgurub/zulgurub.h @@ -0,0 +1,35 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_ZULGURUB_H +#define DEF_ZULGURUB_H + +enum +{ + MAX_ENCOUNTER = 9, + + NPC_LORKHAN = 11347, + NPC_ZATH = 11348, + NPC_THEKAL = 14509, + NPC_JINDO = 11380, + NPC_HAKKAR = 14834, + + TYPE_ARLOKK = 1, + TYPE_JEKLIK = 2, + TYPE_VENOXIS = 3, + TYPE_MARLI = 4, + TYPE_OHGAN = 5, + TYPE_THEKAL = 6, + TYPE_ZATH = 7, + TYPE_LORKHAN = 8, + TYPE_HAKKAR = 9, + + DATA_JINDO = 10, + DATA_LORKHAN = 11, + DATA_THEKAL = 12, + DATA_ZATH = 13, + DATA_HAKKAR = 14 +}; + +#endif diff --git a/scripts/examples/example_creature.cpp b/scripts/examples/example_creature.cpp new file mode 100644 index 000000000..98a9f6b72 --- /dev/null +++ b/scripts/examples/example_creature.cpp @@ -0,0 +1,272 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Example_Creature +SD%Complete: 100 +SDComment: Short custom scripting example +SDCategory: Script Examples +EndScriptData */ + +#include "precompiled.h" + +// **** This script is designed as an example for others to build on **** +// **** Please modify whatever you'd like to as this script is only for developement **** + +// **** Script Info **** +// This script is written in a way that it can be used for both friendly and hostile monsters +// Its primary purpose is to show just how much you can really do with scripts +// I recommend trying it out on both an agressive NPC and on friendly npc + +// **** Quick Info **** +// Functions with Handled Function marked above them are functions that are called automatically by the core +// Functions that are marked Custom Function are functions I've created to simplify code + +enum +{ + //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_BESERK = -1999906, + SAY_PHASE = -1999907, + SAY_DANCE = -1999908, + SAY_SALUTE = -1999909, + + //List of spells. Not required to define them in this way, but will make it easier to maintain in case spellId change + SPELL_BUFF = 25661, + SPELL_ONE = 12555, + SPELL_ONE_ALT = 24099, + SPELL_TWO = 10017, + SPELL_THREE = 26027, + SPELL_ENRAGE = 23537, + SPELL_BESERK = 32309, + + FACTION_WORGEN = 24 +}; + +//List of gossip item texts. Items will appear in the gossip window. +#define GOSSIP_ITEM "I'm looking for a fight" + +struct MANGOS_DLL_DECL example_creatureAI : public ScriptedAI +{ + //*** HANDLED FUNCTION *** + //This is the constructor, called only once when the creature is first created + example_creatureAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + //*** CUSTOM VARIABLES **** + //These variables are for use only by this individual script. + //Nothing else will ever call them but us. + + uint32 m_uiSay_Timer; //Timer for random chat + uint32 m_uiRebuff_Timer; //Timer for rebuffing + uint32 m_uiSpell_1_Timer; //Timer for spell 1 when in combat + uint32 m_uiSpell_2_Timer; //Timer for spell 1 when in combat + uint32 m_uiSpell_3_Timer; //Timer for spell 1 when in combat + uint32 m_uiBeserk_Timer; //Timer until we go into Beserk (enraged) mode + uint32 m_uiPhase; //The current battle phase we are in + uint32 m_uiPhase_Timer; //Timer until phase transition + + //*** HANDLED FUNCTION *** + //This is called whenever the core decides we need to evade + void Reset() + { + m_uiPhase = 1; //Start in phase 1 + m_uiPhase_Timer = 60000; //60 seconds + m_uiSpell_1_Timer = 5000; //5 seconds + m_uiSpell_2_Timer = 37000; //37 seconds + m_uiSpell_3_Timer = 19000; //19 seconds + m_uiBeserk_Timer = 120000; //2 minutes + } + + //*** HANDLED FUNCTION *** + //Attack Start is called whenever someone hits us. + void Aggro(Unit* pWho) + { + //Say some stuff + DoScriptText(SAY_AGGRO, m_creature, pWho); + } + + //Our Recive emote function + void ReceiveEmote(Player* pPlayer, uint32 uiTextEmote) + { + m_creature->HandleEmoteCommand(uiTextEmote); + + switch(uiTextEmote) + { + case TEXTEMOTE_DANCE: + DoScriptText(SAY_DANCE, m_creature); + break; + case TEXTEMOTE_SALUTE: + DoScriptText(SAY_SALUTE, m_creature); + break; + } + } + + //*** HANDLED FUNCTION *** + //Update AI is called Every single map update (roughly once every 100ms if a player is within the grid) + void UpdateAI(const uint32 uiDiff) + { + //Out of combat timers + if (!m_creature->getVictim()) + { + //Random Say timer + if (m_uiSay_Timer < uiDiff) + { + //Random switch between 5 outcomes + switch(urand(0, 4)) + { + case 0: DoScriptText(SAY_RANDOM_0, m_creature); break; + case 1: DoScriptText(SAY_RANDOM_1, m_creature); break; + case 2: DoScriptText(SAY_RANDOM_2, m_creature); break; + case 3: DoScriptText(SAY_RANDOM_3, m_creature); break; + case 4: DoScriptText(SAY_RANDOM_4, m_creature); break; + } + + m_uiSay_Timer = 45000; //Say something agian in 45 seconds + } + else + m_uiSay_Timer -= uiDiff; + + //Rebuff timer + if (m_uiRebuff_Timer < uiDiff) + { + DoCast(m_creature, SPELL_BUFF); + m_uiRebuff_Timer = 900000; //Rebuff agian in 15 minutes + } + else + m_uiRebuff_Timer -= uiDiff; + } + + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Spell 1 timer + if (m_uiSpell_1_Timer < uiDiff) + { + //Cast spell one on our current target. + if (rand()%50 > 10) + DoCast(m_creature->getVictim(), SPELL_ONE_ALT); + else if (m_creature->IsWithinDist(m_creature->getVictim(), 25.0f)) + DoCast(m_creature->getVictim(), SPELL_ONE); + + m_uiSpell_1_Timer = 5000; + } + else + m_uiSpell_1_Timer -= uiDiff; + + //Spell 2 timer + if (m_uiSpell_2_Timer < uiDiff) + { + //Cast spell one on our current target. + DoCast(m_creature->getVictim(), SPELL_TWO); + m_uiSpell_2_Timer = 37000; + } + else + m_uiSpell_2_Timer -= uiDiff; + + //Beserk timer + if (m_uiPhase > 1) + { + //Spell 3 timer + if (m_uiSpell_3_Timer < uiDiff) + { + //Cast spell one on our current target. + DoCast(m_creature->getVictim(), SPELL_THREE); + + m_uiSpell_3_Timer = 19000; + } + else + m_uiSpell_3_Timer -= uiDiff; + + if (m_uiBeserk_Timer < uiDiff) + { + //Say our line then cast uber death spell + DoScriptText(SAY_BESERK, m_creature, m_creature->getVictim()); + DoCast(m_creature->getVictim(), SPELL_BESERK); + + //Cast our beserk spell agian in 12 seconds if we didn't kill everyone + m_uiBeserk_Timer = 12000; + } + else + m_uiBeserk_Timer -= uiDiff; + } + else if (m_uiPhase == 1) //Phase timer + { + if (m_uiPhase_Timer < uiDiff) + { + //Go to next phase + ++m_uiPhase; + DoScriptText(SAY_PHASE, m_creature); + DoCast(m_creature, SPELL_ENRAGE); + } + else + m_uiPhase_Timer -= uiDiff; + } + + DoMeleeAttackIfReady(); + } +}; + +//This is the GetAI method used by all scripts that involve AI +//It is called every time a new creature using this script is created +CreatureAI* GetAI_example_creature(Creature* pCreature) +{ + return new example_creatureAI(pCreature); +} + +//This function is called when the player clicks an option on the gossip menu +bool GossipSelect_example_creature(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + pPlayer->CLOSE_GOSSIP_MENU(); + //Set our faction to hostile twoards all + pCreature->setFaction(FACTION_WORGEN); + pCreature->AI()->AttackStart(pPlayer); + } + + return true; +} + +//This function is called when the player opens the gossip menu +bool GossipHello_example_creature(Player* pPlayer, Creature* pCreature) +{ + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->SEND_GOSSIP_MENU(907, pCreature->GetGUID()); + + return true; +} + +//This is the actual function called only once durring InitScripts() +//It must define all handled functions that are to be run in this script +void AddSC_example_creature() +{ + Script* newscript; + + newscript = new Script; + newscript->Name = "example_creature"; + newscript->GetAI = &GetAI_example_creature; + newscript->pGossipHello = &GossipHello_example_creature; + newscript->pGossipSelect = &GossipSelect_example_creature; + newscript->RegisterSelf(); +} diff --git a/scripts/examples/example_escort.cpp b/scripts/examples/example_escort.cpp new file mode 100644 index 000000000..4698d9d54 --- /dev/null +++ b/scripts/examples/example_escort.cpp @@ -0,0 +1,230 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Example_Escort +SD%Complete: 100 +SDComment: Script used for testing escortAI +SDCategory: Script Examples +EndScriptData */ + +#include "precompiled.h" +#include "escort_ai.h" + +enum +{ + NPC_FELBOAR = 21878, + + SPELL_DEATH_COIL = 33130, + 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 +}; + +#define GOSSIP_ITEM_1 "Click to Test Escort(Attack, Run)" +#define GOSSIP_ITEM_2 "Click to Test Escort(NoAttack, Walk)" +#define GOSSIP_ITEM_3 "Click to Test Escort(NoAttack, Run)" + +struct MANGOS_DLL_DECL example_escortAI : public npc_escortAI +{ + // CreatureAI functions + example_escortAI(Creature* pCreature) : npc_escortAI(pCreature) {Reset();} + + uint32 m_uiDeathCoilTimer; + uint32 m_uiChatTimer; + + void JustSummoned(Creature* pSummoned) + { + pSummoned->AI()->AttackStart(m_creature); + } + + // Pure Virtual Functions (Have to be implemented) + void WaypointReached(uint32 uiWP) + { + switch (uiWP) + { + case 1: + DoScriptText(SAY_WP_1, m_creature); + break; + case 3: + DoScriptText(SAY_WP_2, m_creature); + m_creature->SummonCreature(NPC_FELBOAR, m_creature->GetPositionX()+5.0f, m_creature->GetPositionY()+7.0f, m_creature->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 3000); + break; + case 4: + if (Player* pTmpPlayer = GetPlayerForEscort()) + { + //pTmpPlayer is the target of the text + DoScriptText(SAY_WP_3, m_creature, pTmpPlayer); + //pTmpPlayer is the source of the text + DoScriptText(SAY_WP_4, pTmpPlayer); + } + break; + } + } + + void Aggro(Unit* pWho) + { + if (HasEscortState(STATE_ESCORT_ESCORTING)) + { + if (Player* pTemp = GetPlayerForEscort()) + DoScriptText(SAY_AGGRO1, m_creature, pTemp); + } + else + DoScriptText(SAY_AGGRO2, m_creature); + } + + void Reset() + { + m_uiDeathCoilTimer = 4000; + m_uiChatTimer = 4000; + } + + void JustDied(Unit* pKiller) + { + if (HasEscortState(STATE_ESCORT_ESCORTING)) + { + if (Player* pTemp = GetPlayerForEscort()) + { + // not a likely case, code here for the sake of example + if (pKiller == m_creature) + { + //This is actually a whisper. You control the text type in database + DoScriptText(SAY_DEATH_1, m_creature, pTemp); + } + else + DoScriptText(SAY_DEATH_2, m_creature, pTemp); + } + } + else + DoScriptText(SAY_DEATH_3, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + //Must update npc_escortAI + npc_escortAI::UpdateAI(uiDiff); + + //Combat check + if (m_creature->getVictim()) + { + if (m_uiDeathCoilTimer < uiDiff) + { + DoScriptText(SAY_SPELL, m_creature); + m_creature->CastSpell(m_creature->getVictim(), SPELL_DEATH_COIL, false); + m_uiDeathCoilTimer = 4000; + } + else + m_uiDeathCoilTimer -= uiDiff; + } + else + { + //Out of combat but being escorted + if (HasEscortState(STATE_ESCORT_ESCORTING)) + { + if (m_uiChatTimer < uiDiff) + { + if (m_creature->HasAura(SPELL_ELIXIR_OF_FORTITUDE, 0)) + { + DoScriptText(SAY_RAND_1, m_creature); + m_creature->CastSpell(m_creature, SPELL_BLUE_FIREWORK, false); + } + else + { + DoScriptText(SAY_RAND_2, m_creature); + m_creature->CastSpell(m_creature, SPELL_ELIXIR_OF_FORTITUDE, false); + } + + m_uiChatTimer = 12000; + } + else + m_uiChatTimer -= uiDiff; + } + } + } +}; + +CreatureAI* GetAI_example_escort(Creature* pCreature) +{ + return new example_escortAI(pCreature); +} + +bool GossipHello_example_escort(Player* pPlayer, Creature* pCreature) +{ + pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetGUID()); + pCreature->prepareGossipMenu(pPlayer, 0); + + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); + + pCreature->sendPreparedGossip(pPlayer); + + return true; +} + +bool GossipSelect_example_escort(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + example_escortAI* pEscortAI = dynamic_cast(pCreature->AI()); + + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->CLOSE_GOSSIP_MENU(); + + if (pEscortAI) + pEscortAI->Start(true, true, pPlayer->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->CLOSE_GOSSIP_MENU(); + + if (pEscortAI) + pEscortAI->Start(false, false, pPlayer->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+3: + pPlayer->CLOSE_GOSSIP_MENU(); + + if (pEscortAI) + pEscortAI->Start(false, true, pPlayer->GetGUID()); + break; + default: + return false; // nothing defined -> mangos core handling + } + + return true; // no default handling -> prevent mangos core handling +} + +void AddSC_example_escort() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "example_escort"; + newscript->GetAI = &GetAI_example_escort; + newscript->pGossipHello = &GossipHello_example_escort; + newscript->pGossipSelect = &GossipSelect_example_escort; + newscript->RegisterSelf(); +} diff --git a/scripts/examples/example_gossip_codebox.cpp b/scripts/examples/example_gossip_codebox.cpp new file mode 100644 index 000000000..50ddf9d32 --- /dev/null +++ b/scripts/examples/example_gossip_codebox.cpp @@ -0,0 +1,99 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Example_Gossip_Codebox +SD%Complete: 100 +SDComment: Show a codebox in gossip option +SDCategory: Script Examples +EndScriptData */ + +#include "precompiled.h" +#include + +enum +{ + SPELL_POLYMORPH = 12826, + SPELL_MARK_OF_THE_WILD = 26990, + + SAY_NOT_INTERESTED = -1999922, + SAY_WRONG = -1999923, + SAY_CORRECT = -1999924 +}; + +#define GOSSIP_ITEM_1 "A quiz: what's your name?" +#define GOSSIP_ITEM_2 "I'm not interested" + +//This function is called when the player opens the gossip menubool +bool GossipHello_example_gossip_codebox(Player* pPlayer, Creature* pCreature) +{ + pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1, "", 0, true); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + + pPlayer->PlayerTalkClass->SendGossipMenu(907, pCreature->GetGUID()); + + return true; +} + +//This function is called when the player clicks an option on the gossip menubool +bool GossipSelect_example_gossip_codebox(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+2) + { + DoScriptText(SAY_NOT_INTERESTED, pCreature); + pPlayer->CLOSE_GOSSIP_MENU(); + } + + return true; +} + +bool GossipSelectWithCode_example_gossip_codebox(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction, const char* sCode) +{ + if (uiSender == GOSSIP_SENDER_MAIN) + { + switch (uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + if (std::strcmp(sCode, pPlayer->GetName())!=0) + { + DoScriptText(SAY_WRONG, pCreature); + pCreature->CastSpell(pPlayer, SPELL_POLYMORPH, true); + } + else + { + DoScriptText(SAY_CORRECT, pCreature); + pCreature->CastSpell(pPlayer, SPELL_MARK_OF_THE_WILD, true); + } + pPlayer->CLOSE_GOSSIP_MENU(); + + return true; + } + } + + return false; +} + +void AddSC_example_gossip_codebox() +{ + Script* newscript; + + newscript = new Script; + newscript->Name = "example_gossip_codebox"; + newscript->pGossipHello = &GossipHello_example_gossip_codebox; + newscript->pGossipSelect = &GossipSelect_example_gossip_codebox; + newscript->pGossipSelectWithCode = &GossipSelectWithCode_example_gossip_codebox; + newscript->RegisterSelf(); +} diff --git a/scripts/examples/example_misc.cpp b/scripts/examples/example_misc.cpp new file mode 100644 index 000000000..1bb1a7a0b --- /dev/null +++ b/scripts/examples/example_misc.cpp @@ -0,0 +1,68 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Example_Misc +SD%Complete: 100 +SDComment: Item, Areatrigger and other small code examples +SDCategory: Script Examples +EndScriptData */ + +#include "precompiled.h" + +enum +{ + SAY_HI = -1999925 +}; + +bool AT_example_areatrigger(Player* pPlayer, AreaTriggerEntry *pAt) +{ + DoScriptText(SAY_HI, pPlayer); + return true; +} + +extern void LoadDatabase(); +bool ItemUse_example_item(Player* pPlayer, Item* pItem, SpellCastTargets const& scTargets) +{ + LoadDatabase(); + return true; +} + +bool GOHello_example_go_teleporter(Player* pPlayer, GameObject* pGo) +{ + pPlayer->TeleportTo(0, 1807.07f, 336.105f, 70.3975f, 0.0f); + return false; +} + +void AddSC_example_misc() +{ + Script* newscript; + + newscript = new Script; + newscript->Name = "example_areatrigger"; + newscript->pAreaTrigger = &AT_example_areatrigger; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "example_item"; + newscript->pItemUse = &ItemUse_example_item; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "example_go_teleporter"; + newscript->pGOHello = &GOHello_example_go_teleporter; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/ashenvale.cpp b/scripts/kalimdor/ashenvale.cpp new file mode 100644 index 000000000..9cbf78c49 --- /dev/null +++ b/scripts/kalimdor/ashenvale.cpp @@ -0,0 +1,446 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Ashenvale +SD%Complete: 70 +SDComment: Quest support: 6482, 6544, 6641 +SDCategory: Ashenvale Forest +EndScriptData */ + +/* ContentData +npc_muglash +npc_ruul_snowhoof +npc_torek +EndContentData */ + +#include "precompiled.h" +#include "escort_ai.h" + +/*#### +# npc_muglash +####*/ + +enum +{ + SAY_MUG_START1 = -1000501, + SAY_MUG_START2 = -1000502, + SAY_MUG_BRAZIER = -1000503, + SAY_MUG_BRAZIER_WAIT = -1000504, + SAY_MUG_ON_GUARD = -1000505, + SAY_MUG_REST = -1000506, + SAY_MUG_DONE = -1000507, + SAY_MUG_GRATITUDE = -1000508, + SAY_MUG_PATROL = -1000509, + SAY_MUG_RETURN = -1000510, + + QUEST_VORSHA = 6641, + + GO_NAGA_BRAZIER = 178247, + NPC_MUGLASH = 12717, + + NPC_WRATH_RIDER = 3713, + NPC_WRATH_SORCERESS = 3717, + NPC_WRATH_RAZORTAIL = 3712, + + NPC_WRATH_PRIESTESS = 3944, + NPC_WRATH_MYRMIDON = 3711, + NPC_WRATH_SEAWITCH = 3715, + + NPC_VORSHA = 12940 +}; + +static float m_afFirstNagaCoord[3][3]= +{ + {3603.504150, 1122.631104, 1.635}, // rider + {3589.293945, 1148.664063, 5.565}, // sorceress + {3609.925537, 1168.759521, -1.168} // razortail +}; + +static float m_afSecondNagaCoord[3][3]= +{ + {3609.925537, 1168.759521, -1.168}, // witch + {3645.652100, 1139.425415, 1.322}, // priest + {3583.602051, 1128.405762, 2.347} // myrmidon +}; + +static float m_fVorshaCoord[]={3633.056885, 1172.924072, -5.388}; + +struct MANGOS_DLL_DECL npc_muglashAI : public npc_escortAI +{ + npc_muglashAI(Creature* pCreature) : npc_escortAI(pCreature) + { + m_uiWaveId = 0; + m_bIsBrazierExtinguished = false; + Reset(); + } + + bool m_bIsBrazierExtinguished; + + uint32 m_uiWaveId; + uint32 m_uiEventTimer; + + void Reset() + { + m_uiEventTimer = 10000; + + if (!HasEscortState(STATE_ESCORT_ESCORTING)) + { + m_uiWaveId = 0; + m_bIsBrazierExtinguished = false; + } + } + + void Aggro(Unit* pWho) + { + if (HasEscortState(STATE_ESCORT_PAUSED)) + { + if (urand(0, 1)) + return; + + DoScriptText(SAY_MUG_ON_GUARD, m_creature); + } + } + + void WaypointReached(uint32 uiPointId) + { + switch(uiPointId) + { + case 0: + if (Player* pPlayer = GetPlayerForEscort()) + DoScriptText(SAY_MUG_START2, m_creature, pPlayer); + break; + case 24: + if (Player* pPlayer = GetPlayerForEscort()) + DoScriptText(SAY_MUG_BRAZIER, m_creature, pPlayer); + + if (GameObject* pGo = GetClosestGameObjectWithEntry(m_creature, GO_NAGA_BRAZIER, INTERACTION_DISTANCE*2)) + { + //some kind of event flag? Update to player/group only? + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + SetEscortPaused(true); + } + break; + case 25: + DoScriptText(SAY_MUG_GRATITUDE, m_creature); + + if (Player* pPlayer = GetPlayerForEscort()) + pPlayer->GroupEventHappens(QUEST_VORSHA, m_creature); + break; + case 26: + DoScriptText(SAY_MUG_PATROL, m_creature); + break; + case 27: + DoScriptText(SAY_MUG_RETURN, m_creature); + break; + } + } + + void DoWaveSummon() + { + switch(m_uiWaveId) + { + case 1: + m_creature->SummonCreature(NPC_WRATH_RIDER, m_afFirstNagaCoord[0][0], m_afFirstNagaCoord[0][1], m_afFirstNagaCoord[0][2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); + m_creature->SummonCreature(NPC_WRATH_SORCERESS, m_afFirstNagaCoord[1][0], m_afFirstNagaCoord[1][1], m_afFirstNagaCoord[1][2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); + m_creature->SummonCreature(NPC_WRATH_RAZORTAIL, m_afFirstNagaCoord[2][0], m_afFirstNagaCoord[2][1], m_afFirstNagaCoord[2][2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); + break; + case 2: + m_creature->SummonCreature(NPC_WRATH_PRIESTESS, m_afSecondNagaCoord[0][0], m_afSecondNagaCoord[0][1], m_afSecondNagaCoord[0][2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); + m_creature->SummonCreature(NPC_WRATH_MYRMIDON, m_afSecondNagaCoord[1][0], m_afSecondNagaCoord[1][1], m_afSecondNagaCoord[1][2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); + m_creature->SummonCreature(NPC_WRATH_SEAWITCH, m_afSecondNagaCoord[2][0], m_afSecondNagaCoord[2][1], m_afSecondNagaCoord[2][2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); + break; + case 3: + m_creature->SummonCreature(NPC_VORSHA, m_fVorshaCoord[0], m_fVorshaCoord[1], m_fVorshaCoord[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); + break; + case 4: + SetEscortPaused(false); + DoScriptText(SAY_MUG_DONE, m_creature); + break; + } + } + + void JustSummoned(Creature* pSummoned) + { + pSummoned->AI()->AttackStart(m_creature); + } + + void UpdateEscortAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + { + if (HasEscortState(STATE_ESCORT_PAUSED) && m_bIsBrazierExtinguished) + { + if (m_uiEventTimer < uiDiff) + { + ++m_uiWaveId; + DoWaveSummon(); + m_uiEventTimer = 10000; + } + else + m_uiEventTimer -= uiDiff; + } + + return; + } + + DoMeleeAttackIfReady(); + } +}; + +bool QuestAccept_npc_muglash(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_VORSHA) + { + if (npc_muglashAI* pEscortAI = dynamic_cast(pCreature->AI())) + { + DoScriptText(SAY_MUG_START1, pCreature); + pCreature->setFaction(FACTION_ESCORT_H_PASSIVE); + + pEscortAI->Start(false, false, pPlayer->GetGUID(), pQuest); + } + } + + return true; +} + +CreatureAI* GetAI_npc_muglash(Creature* pCreature) +{ + return new npc_muglashAI(pCreature); +} + +bool GOHello_go_naga_brazier(Player* pPlayer, GameObject* pGo) +{ + if (Creature* pCreature = GetClosestCreatureWithEntry(pGo, NPC_MUGLASH, INTERACTION_DISTANCE*2)) + { + if (npc_muglashAI* pEscortAI = dynamic_cast(pCreature->AI())) + { + DoScriptText(SAY_MUG_BRAZIER_WAIT, pCreature); + + pEscortAI->m_bIsBrazierExtinguished = true; + return false; + } + } + + return true; +} + +/*#### +# npc_ruul_snowhoof +####*/ + +enum +{ + QUEST_FREEDOM_TO_RUUL = 6482, + NPC_T_URSA = 3921, + NPC_T_TOTEMIC = 3922, + NPC_T_PATHFINDER = 3926 +}; + +struct MANGOS_DLL_DECL npc_ruul_snowhoofAI : public npc_escortAI +{ + npc_ruul_snowhoofAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } + + void Reset() {} + + void WaypointReached(uint32 uiPointId) + { + switch(uiPointId) + { + case 13: + m_creature->SummonCreature(NPC_T_TOTEMIC, 3449.218018, -587.825073, 174.978867, 4.714445, TEMPSUMMON_DEAD_DESPAWN, 60000); + m_creature->SummonCreature(NPC_T_URSA, 3446.384521, -587.830872, 175.186279, 4.714445, TEMPSUMMON_DEAD_DESPAWN, 60000); + m_creature->SummonCreature(NPC_T_PATHFINDER, 3444.218994, -587.835327, 175.380600, 4.714445, TEMPSUMMON_DEAD_DESPAWN, 60000); + break; + case 19: + m_creature->SummonCreature(NPC_T_TOTEMIC, 3508.344482, -492.024261, 186.929031, 4.145029, TEMPSUMMON_DEAD_DESPAWN, 60000); + m_creature->SummonCreature(NPC_T_URSA, 3506.265625, -490.531006, 186.740128, 4.239277, TEMPSUMMON_DEAD_DESPAWN, 60000); + m_creature->SummonCreature(NPC_T_PATHFINDER, 3503.682373, -489.393799, 186.629684, 4.349232, TEMPSUMMON_DEAD_DESPAWN, 60000); + break; + case 21: + if (Player* pPlayer = GetPlayerForEscort()) + pPlayer->GroupEventHappens(QUEST_FREEDOM_TO_RUUL, m_creature); + break; + } + } + + void JustSummoned(Creature* summoned) + { + summoned->AI()->AttackStart(m_creature); + } +}; + +bool QuestAccept_npc_ruul_snowhoof(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_FREEDOM_TO_RUUL) + { + pCreature->setFaction(FACTION_ESCORT_N_NEUTRAL_PASSIVE); + pCreature->SetStandState(UNIT_STAND_STATE_STAND); + + if (npc_ruul_snowhoofAI* pEscortAI = dynamic_cast(pCreature->AI())) + pEscortAI->Start(true, false, pPlayer->GetGUID(), pQuest); + } + return true; +} + +CreatureAI* GetAI_npc_ruul_snowhoofAI(Creature* pCreature) +{ + return new npc_ruul_snowhoofAI(pCreature); +} + +/*#### +# npc_torek +####*/ + +enum +{ + SAY_READY = -1000106, + SAY_MOVE = -1000107, + SAY_PREPARE = -1000108, + SAY_WIN = -1000109, + SAY_END = -1000110, + + SPELL_REND = 11977, + SPELL_THUNDERCLAP = 8078, + + QUEST_TOREK_ASSULT = 6544, + + NPC_SPLINTERTREE_RAIDER = 12859, + NPC_DURIEL = 12860, + NPC_SILVERWING_SENTINEL = 12896, + NPC_SILVERWING_WARRIOR = 12897 +}; + +struct MANGOS_DLL_DECL npc_torekAI : public npc_escortAI +{ + npc_torekAI(Creature* pCreature) : npc_escortAI(pCreature) {Reset();} + + uint32 m_uiRend_Timer; + uint32 m_uiThunderclap_Timer; + + void Reset() + { + m_uiRend_Timer = 5000; + m_uiThunderclap_Timer = 8000; + } + + void WaypointReached(uint32 uiPointId) + { + Player* pPlayer = GetPlayerForEscort(); + + if (!pPlayer) + return; + + switch(uiPointId) + { + case 1: + DoScriptText(SAY_MOVE, m_creature, pPlayer); + break; + case 8: + DoScriptText(SAY_PREPARE, m_creature, pPlayer); + break; + case 19: + //TODO: verify location and creatures amount. + m_creature->SummonCreature(NPC_DURIEL,1776.73,-2049.06,109.83,1.54,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,25000); + m_creature->SummonCreature(NPC_SILVERWING_SENTINEL,1774.64,-2049.41,109.83,1.40,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,25000); + m_creature->SummonCreature(NPC_SILVERWING_WARRIOR,1778.73,-2049.50,109.83,1.67,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,25000); + break; + case 20: + DoScriptText(SAY_WIN, m_creature, pPlayer); + pPlayer->GroupEventHappens(QUEST_TOREK_ASSULT, m_creature); + break; + case 21: + DoScriptText(SAY_END, m_creature, pPlayer); + break; + } + } + + void JustSummoned(Creature* pSummoned) + { + pSummoned->AI()->AttackStart(m_creature); + } + + void UpdateEscortAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiRend_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_REND); + m_uiRend_Timer = 20000; + } + else + m_uiRend_Timer -= uiDiff; + + if (m_uiThunderclap_Timer < uiDiff) + { + DoCast(m_creature, SPELL_THUNDERCLAP); + m_uiThunderclap_Timer = 30000; + } + else + m_uiThunderclap_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +bool QuestAccept_npc_torek(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_TOREK_ASSULT) + { + //TODO: find companions, make them follow Torek, at any time (possibly done by mangos/database in future?) + DoScriptText(SAY_READY, pCreature, pPlayer); + + if (npc_torekAI* pEscortAI = dynamic_cast(pCreature->AI())) + pEscortAI->Start(true, true, pPlayer->GetGUID(), pQuest); + } + + return true; +} + +CreatureAI* GetAI_npc_torek(Creature* pCreature) +{ + return new npc_torekAI(pCreature); +} + +void AddSC_ashenvale() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_muglash"; + newscript->GetAI = &GetAI_npc_muglash; + newscript->pQuestAccept = &QuestAccept_npc_muglash; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "go_naga_brazier"; + newscript->pGOHello = &GOHello_go_naga_brazier; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_ruul_snowhoof"; + newscript->GetAI = &GetAI_npc_ruul_snowhoofAI; + newscript->pQuestAccept = &QuestAccept_npc_ruul_snowhoof; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_torek"; + newscript->GetAI = &GetAI_npc_torek; + newscript->pQuestAccept = &QuestAccept_npc_torek; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/azshara.cpp b/scripts/kalimdor/azshara.cpp new file mode 100644 index 000000000..354f5a801 --- /dev/null +++ b/scripts/kalimdor/azshara.cpp @@ -0,0 +1,390 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Azshara +SD%Complete: 90 +SDComment: Quest support: 2744, 3141, 9364, 10994 +SDCategory: Azshara +EndScriptData */ + +/* ContentData +npc_rizzle_sprysprocket +npc_depth_charge +go_southfury_moonstone +mobs_spitelashes +npc_loramus_thalipedes +EndContentData */ + +#include "precompiled.h" +#include "escort_ai.h" + +/*##### +## npc_rizzle_sprysprocket +#####*/ + +enum +{ + SAY_START = -1000351, + EMOTE_START = -1000352, + SAY_WHISPER_CHILL = -1000353, + SAY_GRENADE_FAIL = -1000354, + SAY_END = -1000355, + + QUEST_MOONSTONE = 10994, + NPC_RIZZLE = 23002, + NPC_DEPTH_CHARGE = 23025, + + SPELL_SUMMON_RIZZLE = 39866, + SPELL_BLACKJACK = 39865, //stuns player + SPELL_ESCAPE = 39871, //teleports to water + SPELL_SWIM_SPEED = 40596, + + SPELL_FROST_TRAP = 39902, //not used? + + SPELL_PERIODIC_GRENADE = 40553, //cannot tell who are supposed to have this aura + SPELL_FROST_GRENADE = 40525, //triggered by periodic grenade + + SPELL_SUMMON_DEPTH_CHARGE = 39907, //summons the bomb creature + SPELL_TRAP = 39899, //knockback + + SPELL_PERIODIC_CHECK = 39888, + SPELL_SURRENDER = 39889, //should be triggered by periodic check, if player comes in certain distance with quest incomplete + + SPELL_GIVE_MOONSTONE = 39886 +}; + +#define GOSSIP_ITEM_MOONSTONE "Hand over the Southfury moonstone and I'll let you go." + +struct MANGOS_DLL_DECL npc_rizzle_sprysprocketAI : public npc_escortAI +{ + npc_rizzle_sprysprocketAI(Creature* pCreature) : npc_escortAI(pCreature) + { + pCreature->SetActiveObjectState(true); + m_bIsIntro = true; + m_uiIntroPhase = 0; + m_uiIntroTimer = 0; + m_uiDepthChargeTimer = 10000; + Reset(); + } + + bool m_bIsIntro; + uint8 m_uiIntroPhase; + uint32 m_uiIntroTimer; + uint32 m_uiDepthChargeTimer; + + void MoveInLineOfSight(Unit* pUnit) + { + if (HasEscortState(STATE_ESCORT_ESCORTING) && pUnit->GetTypeId() == TYPEID_PLAYER) + { + if (!HasEscortState(STATE_ESCORT_PAUSED) && m_creature->IsWithinDistInMap(pUnit, INTERACTION_DISTANCE) && m_creature->IsWithinLOSInMap(pUnit)) + { + if (((Player*)pUnit)->GetQuestStatus(QUEST_MOONSTONE) == QUEST_STATUS_INCOMPLETE) + m_creature->CastSpell(m_creature,SPELL_SURRENDER,true); + } + } + + npc_escortAI::MoveInLineOfSight(pUnit); + } + + void WaypointReached(uint32 uiPointId) + { + switch(uiPointId) + { + case 0: + m_creature->CastSpell(m_creature,SPELL_PERIODIC_CHECK,true); + break; + } + } + + void Reset() { } + + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + { + if (pSpell->Id == SPELL_SURRENDER) + { + SetEscortPaused(true); + DoScriptText(SAY_END, m_creature); + m_creature->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + } + } + + //this may be wrong (and doesn't work) + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) + { + if (pTarget->GetTypeId() == TYPEID_PLAYER && pSpell->Id == SPELL_FROST_GRENADE) + DoScriptText(SAY_WHISPER_CHILL, m_creature, pTarget); + } + + //this may be wrong + void JustSummoned(Creature* pSummoned) + { + //pSummoned->CastSpell(pSummoned,SPELL_PERIODIC_GRENADE,false,0,0,m_creature->GetGUID()); + } + + void UpdateEscortAI(const uint32 uiDiff) + { + if (m_bIsIntro) + { + if (m_uiIntroTimer < uiDiff) + m_uiIntroTimer = 1500; + else + { + m_uiIntroTimer -= uiDiff; + return; + } + + switch(m_uiIntroPhase) + { + case 0: + DoScriptText(SAY_START, m_creature); + DoScriptText(EMOTE_START, m_creature); + break; + case 1: + //teleports to water _before_ we Start() + m_creature->CastSpell(m_creature,SPELL_ESCAPE,false); + break; + case 2: + m_creature->CastSpell(m_creature,SPELL_SWIM_SPEED,false); + m_bIsIntro = false; + Start(false,true); + break; + } + + ++m_uiIntroPhase; + return; + } + + if (m_uiDepthChargeTimer < uiDiff) + { + if (!HasEscortState(STATE_ESCORT_PAUSED)) + m_creature->CastSpell(m_creature,SPELL_SUMMON_DEPTH_CHARGE,false); + + m_uiDepthChargeTimer = urand(10000, 15000); + }else m_uiDepthChargeTimer -= uiDiff; + } +}; + +CreatureAI* GetAI_npc_rizzle_sprysprocket(Creature* pCreature) +{ + return new npc_rizzle_sprysprocketAI(pCreature); +} + +bool GossipHello_npc_rizzle_sprysprocket(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->GetQuestStatus(QUEST_MOONSTONE) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_MOONSTONE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_rizzle_sprysprocket(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->CastSpell(pPlayer,SPELL_GIVE_MOONSTONE,false); + } + + return true; +} + +struct MANGOS_DLL_DECL npc_depth_chargeAI : public ScriptedAI +{ + npc_depth_chargeAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + void MoveInLineOfSight(Unit* pUnit) + { + if (pUnit->GetTypeId() != TYPEID_PLAYER) + return; + + if (m_creature->IsWithinDistInMap(pUnit, INTERACTION_DISTANCE) && m_creature->IsWithinLOSInMap(pUnit)) + m_creature->CastSpell(pUnit,SPELL_TRAP,false); + } + + void Reset() { } +}; + +CreatureAI* GetAI_npc_depth_charge(Creature* pCreature) +{ + return new npc_depth_chargeAI(pCreature); +} + +/*###### +## go_southfury_moonstone +######*/ + +bool GOHello_go_southfury_moonstone(Player* pPlayer, GameObject* pGo) +{ + //implicitTarget=48 not implemented as of writing this code, and manual summon may be just ok for our purpose + //pPlayer->CastSpell(pPlayer,SPELL_SUMMON_RIZZLE,false); + + if (Creature* pCreature = pPlayer->SummonCreature(NPC_RIZZLE, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0)) + pCreature->CastSpell(pPlayer,SPELL_BLACKJACK,false); + + return false; +} + +/*###### +## mobs_spitelashes +######*/ + +struct MANGOS_DLL_DECL mobs_spitelashesAI : public ScriptedAI +{ + mobs_spitelashesAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 morphtimer; + bool spellhit; + + void Reset() + { + morphtimer = 0; + spellhit = false; + } + + void SpellHit(Unit *Hitter, const SpellEntry *Spellkind) + { + if (!spellhit && + Hitter->GetTypeId() == TYPEID_PLAYER && + ((Player*)Hitter)->GetQuestStatus(9364) == QUEST_STATUS_INCOMPLETE && + (Spellkind->Id==118 || Spellkind->Id== 12824 || Spellkind->Id== 12825 || Spellkind->Id== 12826)) + { + spellhit=true; + DoCast(m_creature,29124); //become a sheep + } + } + + void UpdateAI(const uint32 diff) + { + // we mustn't remove the creature in the same round in which we cast the summon spell, otherwise there will be no summons + if (spellhit && morphtimer>=5000) + { + m_creature->ForcedDespawn(); + return; + } + + // walk 5 seconds before summoning + if (spellhit && morphtimer<5000) + { + morphtimer+=diff; + if (morphtimer>=5000) + { + DoCast(m_creature,28406); //summon copies + DoCast(m_creature,6924); //visual explosion + } + } + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //TODO: add abilities for the different creatures + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_mobs_spitelashes(Creature* pCreature) +{ + return new mobs_spitelashesAI(pCreature); +} + +/*###### +## npc_loramus_thalipedes +######*/ + +bool GossipHello_npc_loramus_thalipedes(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestStatus(2744) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Can you help me?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + if (pPlayer->GetQuestStatus(3141) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Tell me your story", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_loramus_thalipedes(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->AreaExploredOrEventHappens(2744); + break; + + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Please continue", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 21); + pPlayer->SEND_GOSSIP_MENU(1813, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+21: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I do not understand", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 22); + pPlayer->SEND_GOSSIP_MENU(1814, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+22: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Indeed", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 23); + pPlayer->SEND_GOSSIP_MENU(1815, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+23: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I will do this with or your help, Loramus", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 24); + pPlayer->SEND_GOSSIP_MENU(1816, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+24: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Yes", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 25); + pPlayer->SEND_GOSSIP_MENU(1817, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+25: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->AreaExploredOrEventHappens(3141); + break; + } + return true; +} + +void AddSC_azshara() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_rizzle_sprysprocket"; + newscript->GetAI = &GetAI_npc_rizzle_sprysprocket; + newscript->pGossipHello = &GossipHello_npc_rizzle_sprysprocket; + newscript->pGossipSelect = &GossipSelect_npc_rizzle_sprysprocket; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_depth_charge"; + newscript->GetAI = &GetAI_npc_depth_charge; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "go_southfury_moonstone"; + newscript->pGOHello = &GOHello_go_southfury_moonstone; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mobs_spitelashes"; + newscript->GetAI = &GetAI_mobs_spitelashes; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_loramus_thalipedes"; + newscript->pGossipHello = &GossipHello_npc_loramus_thalipedes; + newscript->pGossipSelect = &GossipSelect_npc_loramus_thalipedes; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/azuremyst_isle.cpp b/scripts/kalimdor/azuremyst_isle.cpp new file mode 100644 index 000000000..f83239d2b --- /dev/null +++ b/scripts/kalimdor/azuremyst_isle.cpp @@ -0,0 +1,538 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Azuremyst_Isle +SD%Complete: 75 +SDComment: Quest support: 9283, 9537, 9582, 9554(special flight path, proper model for mount missing). Injured Draenei cosmetic only +SDCategory: Azuremyst Isle +EndScriptData */ + +/* ContentData +npc_draenei_survivor +npc_engineer_spark_overgrind +npc_injured_draenei +npc_magwin +npc_susurrus +EndContentData */ + +#include "precompiled.h" +#include "escort_ai.h" +#include + +/*###### +## npc_draenei_survivor +######*/ + +enum +{ + SAY_HEAL1 = -1000176, + SAY_HEAL2 = -1000177, + SAY_HEAL3 = -1000178, + SAY_HEAL4 = -1000179, + SAY_HELP1 = -1000180, + SAY_HELP2 = -1000181, + SAY_HELP3 = -1000182, + SAY_HELP4 = -1000183, + + SPELL_IRRIDATION = 35046, + SPELL_STUNNED = 28630 +}; + +struct MANGOS_DLL_DECL npc_draenei_survivorAI : public ScriptedAI +{ + npc_draenei_survivorAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint64 m_uiCaster; + + uint32 m_uiSayThanksTimer; + uint32 m_uiRunAwayTimer; + uint32 m_uiSayHelpTimer; + + bool m_bCanSayHelp; + + void Reset() + { + m_uiCaster = 0; + + m_uiSayThanksTimer = 0; + m_uiRunAwayTimer = 0; + m_uiSayHelpTimer = 10000; + + m_bCanSayHelp = true; + + m_creature->CastSpell(m_creature, SPELL_IRRIDATION, true); + + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT); + m_creature->SetHealth(int(m_creature->GetMaxHealth()*.1)); + m_creature->SetStandState(UNIT_STAND_STATE_SLEEP); + } + + void MoveInLineOfSight(Unit* pWho) + { + if (m_bCanSayHelp && pWho->GetTypeId() == TYPEID_PLAYER && m_creature->IsFriendlyTo(pWho) && + m_creature->IsWithinDistInMap(pWho, 25.0f)) + { + //Random switch between 4 texts + switch(urand(0, 3)) + { + case 0: DoScriptText(SAY_HELP1, m_creature, pWho); break; + case 1: DoScriptText(SAY_HELP2, m_creature, pWho); break; + case 2: DoScriptText(SAY_HELP3, m_creature, pWho); break; + case 3: DoScriptText(SAY_HELP4, m_creature, pWho); break; + } + + m_uiSayHelpTimer = 20000; + m_bCanSayHelp = false; + } + } + + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + { + if (pSpell->SpellFamilyFlags2 & 0x080000000) + { + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + + m_creature->CastSpell(m_creature, SPELL_STUNNED, true); + + m_uiCaster = pCaster->GetGUID(); + + m_uiSayThanksTimer = 5000; + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_uiSayThanksTimer) + { + if (m_uiSayThanksTimer <= uiDiff) + { + m_creature->RemoveAurasDueToSpell(SPELL_IRRIDATION); + + if (Player* pPlayer = (Player*)Unit::GetUnit(*m_creature,m_uiCaster)) + { + if (pPlayer->GetTypeId() != TYPEID_PLAYER) + return; + + switch(urand(0, 3)) + { + case 0: DoScriptText(SAY_HEAL1, m_creature, pPlayer); break; + case 1: DoScriptText(SAY_HEAL2, m_creature, pPlayer); break; + case 2: DoScriptText(SAY_HEAL3, m_creature, pPlayer); break; + case 3: DoScriptText(SAY_HEAL4, m_creature, pPlayer); break; + } + + pPlayer->TalkedToCreature(m_creature->GetEntry(),m_creature->GetGUID()); + } + + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MovePoint(0, -4115.053711f, -13754.831055f, 73.508949f); + + m_uiRunAwayTimer = 10000; + m_uiSayThanksTimer = 0; + }else m_uiSayThanksTimer -= uiDiff; + + return; + } + + if (m_uiRunAwayTimer) + { + if (m_uiRunAwayTimer <= uiDiff) + m_creature->ForcedDespawn(); + else + m_uiRunAwayTimer -= uiDiff; + + return; + } + + if (m_uiSayHelpTimer < uiDiff) + { + m_bCanSayHelp = true; + m_uiSayHelpTimer = 20000; + }else m_uiSayHelpTimer -= uiDiff; + } +}; + +CreatureAI* GetAI_npc_draenei_survivor(Creature* pCreature) +{ + return new npc_draenei_survivorAI(pCreature); +} + +/*###### +## npc_engineer_spark_overgrind +######*/ + +enum +{ + SAY_TEXT = -1000184, + EMOTE_SHELL = -1000185, + SAY_ATTACK = -1000186, + + AREA_COVE = 3579, + AREA_ISLE = 3639, + QUEST_GNOMERCY = 9537, + FACTION_HOSTILE = 14, + SPELL_DYNAMITE = 7978 +}; + +#define GOSSIP_FIGHT "Traitor! You will be brought to justice!" + +struct MANGOS_DLL_DECL npc_engineer_spark_overgrindAI : public ScriptedAI +{ + npc_engineer_spark_overgrindAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_uiNormFaction = pCreature->getFaction(); + m_uiNpcFlags = pCreature->GetUInt32Value(UNIT_NPC_FLAGS); + Reset(); + + if (pCreature->GetAreaId() == AREA_COVE || pCreature->GetAreaId() == AREA_ISLE) + m_bIsTreeEvent = true; + } + + uint32 m_uiNpcFlags; + uint32 m_uiNormFaction; + + uint32 m_uiDynamiteTimer; + uint32 m_uiEmoteTimer; + + bool m_bIsTreeEvent; + + void Reset() + { + m_creature->setFaction(m_uiNormFaction); + m_creature->SetUInt32Value(UNIT_NPC_FLAGS, m_uiNpcFlags); + + m_uiDynamiteTimer = 8000; + m_uiEmoteTimer = urand(120000, 150000); + + m_bIsTreeEvent = false; + } + + void Aggro(Unit *who) + { + DoScriptText(SAY_ATTACK, m_creature, who); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->isInCombat() && !m_bIsTreeEvent) + { + if (m_uiEmoteTimer < diff) + { + DoScriptText(SAY_TEXT, m_creature); + DoScriptText(EMOTE_SHELL, m_creature); + m_uiEmoteTimer = urand(120000, 150000); + } + else m_uiEmoteTimer -= diff; + } + else if (m_bIsTreeEvent) + { + //nothing here yet + return; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiDynamiteTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_DYNAMITE); + m_uiDynamiteTimer = 8000; + } + else m_uiDynamiteTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_engineer_spark_overgrind(Creature* pCreature) +{ + return new npc_engineer_spark_overgrindAI(pCreature); +} + +bool GossipHello_npc_engineer_spark_overgrind(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->GetQuestStatus(QUEST_GNOMERCY) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_FIGHT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_engineer_spark_overgrind(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF) + { + pPlayer->CLOSE_GOSSIP_MENU(); + pCreature->setFaction(FACTION_HOSTILE); + ((npc_engineer_spark_overgrindAI*)pCreature->AI())->AttackStart(pPlayer); + } + return true; +} + +/*###### +## npc_injured_draenei +######*/ + +struct MANGOS_DLL_DECL npc_injured_draeneiAI : public ScriptedAI +{ + npc_injured_draeneiAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + void Reset() + { + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT); + m_creature->SetHealth(int(m_creature->GetMaxHealth()*.15)); + switch(urand(0, 1)) + { + case 0: m_creature->SetStandState(UNIT_STAND_STATE_SIT); break; + case 1: m_creature->SetStandState(UNIT_STAND_STATE_SLEEP); break; + } + } + + void MoveInLineOfSight(Unit *who) + { + return; //ignore everyone around them (won't aggro anything) + } + + void UpdateAI(const uint32 diff) + { + return; + } + +}; +CreatureAI* GetAI_npc_injured_draenei(Creature* pCreature) +{ + return new npc_injured_draeneiAI(pCreature); +} + +/*###### +## npc_magwin +######*/ + +#define SAY_START -1000111 +#define SAY_AGGRO -1000112 +#define SAY_PROGRESS -1000113 +#define SAY_END1 -1000114 +#define SAY_END2 -1000115 +#define EMOTE_HUG -1000116 + +#define QUEST_A_CRY_FOR_HELP 9528 + +struct MANGOS_DLL_DECL npc_magwinAI : public npc_escortAI +{ + npc_magwinAI(Creature* pCreature) : npc_escortAI(pCreature) {Reset();} + + void WaypointReached(uint32 i) + { + Player* pPlayer = GetPlayerForEscort(); + + if (!pPlayer) + return; + + switch(i) + { + case 0: + DoScriptText(SAY_START, m_creature, pPlayer); + break; + case 17: + DoScriptText(SAY_PROGRESS, m_creature, pPlayer); + break; + case 28: + DoScriptText(SAY_END1, m_creature, pPlayer); + break; + case 29: + DoScriptText(EMOTE_HUG, m_creature, pPlayer); + DoScriptText(SAY_END2, m_creature, pPlayer); + pPlayer->GroupEventHappens(QUEST_A_CRY_FOR_HELP, m_creature); + break; + } + } + + void Aggro(Unit* who) + { + DoScriptText(SAY_AGGRO, m_creature, who); + } + + void Reset() { } +}; + +bool QuestAccept_npc_magwin(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_A_CRY_FOR_HELP) + { + pCreature->setFaction(10); + + if (npc_magwinAI* pEscortAI = dynamic_cast(pCreature->AI())) + pEscortAI->Start(true, false, pPlayer->GetGUID(), pQuest); + } + return true; +} + +CreatureAI* GetAI_npc_magwinAI(Creature* pCreature) +{ + return new npc_magwinAI(pCreature); +} + +/*###### +## npc_nestlewood_owlkin +######*/ + +enum +{ + SPELL_INOCULATE_OWLKIN = 29528, + ENTRY_OWLKIN = 16518, + ENTRY_OWLKIN_INOC = 16534, +}; + +struct MANGOS_DLL_DECL npc_nestlewood_owlkinAI : public ScriptedAI +{ + npc_nestlewood_owlkinAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 m_uiDespawnTimer; + + void Reset() + { + m_uiDespawnTimer = 0; + } + + void UpdateAI(const uint32 uiDiff) + { + //timer gets adjusted by the triggered aura effect + if (m_uiDespawnTimer) + { + if (m_uiDespawnTimer <= uiDiff) + { + //once we are able to, despawn us + m_creature->ForcedDespawn(); + return; + } + else + m_uiDespawnTimer -= uiDiff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_nestlewood_owlkin(Creature* pCreature) +{ + return new npc_nestlewood_owlkinAI(pCreature); +} + +bool EffectDummyCreature_npc_nestlewood_owlkin(Unit* pCaster, uint32 uiSpellId, uint32 uiEffIndex, Creature* pCreatureTarget) +{ + //always check spellid and effectindex + if (uiSpellId == SPELL_INOCULATE_OWLKIN && uiEffIndex == 0) + { + if (pCreatureTarget->GetEntry() != ENTRY_OWLKIN) + return true; + + pCreatureTarget->UpdateEntry(ENTRY_OWLKIN_INOC); + + //set despawn timer, since we want to remove creature after a short time + ((npc_nestlewood_owlkinAI*)pCreatureTarget->AI())->m_uiDespawnTimer = 15000; + + //always return true when we are handling this spell and effect + return true; + } + return false; +} + +/*###### +## npc_susurrus +######*/ + +enum +{ + ITEM_WHORL_OF_AIR = 23843, + SPELL_BUFFETING_WINDS = 32474, + TAXI_PATH_ID = 506 +}; + +#define GOSSIP_ITEM_READY "I am ready." + +bool GossipHello_npc_susurrus(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->HasItemCount(ITEM_WHORL_OF_AIR,1,true)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_READY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_susurrus(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF) + { + //spellId is correct, however it gives flight a somewhat funny effect + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->CastSpell(pPlayer,SPELL_BUFFETING_WINDS,true); + } + return true; +} + +/*###### +## +######*/ + +void AddSC_azuremyst_isle() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_draenei_survivor"; + newscript->GetAI = &GetAI_npc_draenei_survivor; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_engineer_spark_overgrind"; + newscript->GetAI = &GetAI_npc_engineer_spark_overgrind; + newscript->pGossipHello = &GossipHello_npc_engineer_spark_overgrind; + newscript->pGossipSelect = &GossipSelect_npc_engineer_spark_overgrind; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_injured_draenei"; + newscript->GetAI = &GetAI_npc_injured_draenei; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_magwin"; + newscript->GetAI = &GetAI_npc_magwinAI; + newscript->pQuestAccept = &QuestAccept_npc_magwin; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_nestlewood_owlkin"; + newscript->GetAI = &GetAI_npc_nestlewood_owlkin; + newscript->pEffectDummyCreature = &EffectDummyCreature_npc_nestlewood_owlkin; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_susurrus"; + newscript->pGossipHello = &GossipHello_npc_susurrus; + newscript->pGossipSelect = &GossipSelect_npc_susurrus; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h b/scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h new file mode 100644 index 000000000..24d0e7455 --- /dev/null +++ b/scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h @@ -0,0 +1,25 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_BFD_H +#define DEF_BFD_H + +enum +{ + MAX_ENCOUNTER = 2, + + DATA_SHRINE1 = 1, + DATA_SHRINE2 = 2, + DATA_SHRINE3 = 3, + DATA_SHRINE4 = 4, + DATA_TWILIGHT_LORD_KELRIS = 5, + DATA_SHRINE_OF_GELIHAST = 6, + DATA_ALTAR_OF_THE_DEEPS = 7, + DATA_MAINDOOR = 8, + + TYPE_KELRIS = 10, + TYPE_SHRINE = 11 +}; + +#endif diff --git a/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp b/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp new file mode 100644 index 000000000..a4efe36b6 --- /dev/null +++ b/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp @@ -0,0 +1,143 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance_Blackfathom_Deeps +SD%Complete: 50 +SDComment: +SDCategory: Blackfathom Deeps +EndScriptData */ + +#include "precompiled.h" +#include "blackfathom_deeps.h" + +/* Encounter 0 = Twilight Lord Kelris + Encounter 1 = Shrine event + Must kill twilight lord for shrine event to be possible + */ + +struct MANGOS_DLL_DECL instance_blackfathom_deeps : public ScriptedInstance +{ + instance_blackfathom_deeps(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + + uint64 m_uiTwilightLordKelrisGUID; + uint64 m_uiShrine1GUID; + uint64 m_uiShrine2GUID; + uint64 m_uiShrine3GUID; + uint64 m_uiShrine4GUID; + uint64 m_uiShrineOfGelihastGUID; + uint64 m_uiAltarOfTheDeepsGUID; + uint64 m_uiMainDoorGUID; + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + + void Initialize() + { + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + + m_uiTwilightLordKelrisGUID = 0; + m_uiShrine1GUID = 0; + m_uiShrine2GUID = 0; + m_uiShrine3GUID = 0; + m_uiShrine4GUID = 0; + m_uiShrineOfGelihastGUID = 0; + m_uiAltarOfTheDeepsGUID = 0; + m_uiMainDoorGUID = 0; + } + + void OnCreatureCreate(Creature* pCreature) + { + if (pCreature->GetEntry() == 4832) + m_uiTwilightLordKelrisGUID = pCreature->GetGUID(); + } + + void OnObjectCreate(GameObject* pGo) + { + switch(pGo->GetEntry()) + { + case 21118: m_uiShrine1GUID = pGo->GetGUID(); break; + case 21119: m_uiShrine2GUID = pGo->GetGUID(); break; + case 21120: m_uiShrine3GUID = pGo->GetGUID(); break; + case 21121: m_uiShrine4GUID = pGo->GetGUID(); break; + case 103015: m_uiShrineOfGelihastGUID = pGo->GetGUID(); break; + case 103016: m_uiAltarOfTheDeepsGUID = pGo->GetGUID(); break; + case 21117: m_uiMainDoorGUID = pGo->GetGUID(); break; + } + } + + void SetData(uint32 uiType, uint32 uiData) + { + switch(uiType) + { + case TYPE_KELRIS: + m_auiEncounter[0] = uiData; + break; + case TYPE_SHRINE: + m_auiEncounter[1] = uiData; + break; + } + } + + uint32 GetData(uint32 uiType) + { + switch(uiType) + { + case TYPE_KELRIS: + return m_auiEncounter[0]; + case TYPE_SHRINE: + return m_auiEncounter[1]; + } + + return 0; + } + + uint64 GetData64(uint32 uiData) + { + switch(uiData) + { + case DATA_TWILIGHT_LORD_KELRIS: + return m_uiTwilightLordKelrisGUID; + case DATA_SHRINE1: + return m_uiShrine1GUID; + case DATA_SHRINE2: + return m_uiShrine2GUID; + case DATA_SHRINE3: + return m_uiShrine3GUID; + case DATA_SHRINE4: + return m_uiShrine4GUID; + case DATA_SHRINE_OF_GELIHAST: + return m_uiShrineOfGelihastGUID; + case DATA_MAINDOOR: + return m_uiMainDoorGUID; + } + + return 0; + } +}; + +InstanceData* GetInstanceData_instance_blackfathom_deeps(Map* pMap) +{ + return new instance_blackfathom_deeps(pMap); +} + +void AddSC_instance_blackfathom_deeps() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "instance_blackfathom_deeps"; + newscript->GetInstanceData = &GetInstanceData_instance_blackfathom_deeps; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/bloodmyst_isle.cpp b/scripts/kalimdor/bloodmyst_isle.cpp new file mode 100644 index 000000000..cc2580841 --- /dev/null +++ b/scripts/kalimdor/bloodmyst_isle.cpp @@ -0,0 +1,137 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Bloodmyst_Isle +SD%Complete: 80 +SDComment: Quest support: 9670, 9756(gossip items text needed). +SDCategory: Bloodmyst Isle +EndScriptData */ + +/* ContentData +mob_webbed_creature +npc_captured_sunhawk_agent +EndContentData */ + +#include "precompiled.h" + +/*###### +## mob_webbed_creature +######*/ + +//possible creatures to be spawned +const uint32 possibleSpawns[32] = {17322, 17661, 17496, 17522, 17340, 17352, 17333, 17524, 17654, 17348, 17339, 17345, 17359, 17353, 17336, 17550, 17330, 17701, 17321, 17680, 17325, 17320, 17683, 17342, 17715, 17334, 17341, 17338, 17337, 17346, 17344, 17327}; + +struct MANGOS_DLL_DECL mob_webbed_creatureAI : public ScriptedAI +{ + mob_webbed_creatureAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + void Reset() + { + } + + void JustDied(Unit* Killer) + { + uint32 spawnCreatureID = 0; + + switch(urand(0, 2)) + { + case 0: + spawnCreatureID = 17681; + if (Killer->GetTypeId() == TYPEID_PLAYER) + ((Player*)Killer)->KilledMonsterCredit(spawnCreatureID, m_creature->GetGUID()); + break; + case 1: + case 2: + spawnCreatureID = possibleSpawns[urand(0, 31)]; + break; + } + + if (spawnCreatureID) + m_creature->SummonCreature(spawnCreatureID, 0.0f, 0.0f, 0.0f, m_creature->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); + } +}; +CreatureAI* GetAI_mob_webbed_creature(Creature* pCreature) +{ + return new mob_webbed_creatureAI(pCreature); +} + +/*###### +## npc_captured_sunhawk_agent +######*/ + +#define C_SUNHAWK_TRIGGER 17974 + +bool GossipHello_npc_captured_sunhawk_agent(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->HasAura(31609,1) && pPlayer->GetQuestStatus(9756) == QUEST_STATUS_INCOMPLETE) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] ", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(9136, pCreature->GetGUID()); + } + else + pPlayer->SEND_GOSSIP_MENU(9134, pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_captured_sunhawk_agent(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] ", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->SEND_GOSSIP_MENU(9137, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] ", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); + pPlayer->SEND_GOSSIP_MENU(9138, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+3: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] ", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); + pPlayer->SEND_GOSSIP_MENU(9139, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+4: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] ", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); + pPlayer->SEND_GOSSIP_MENU(9140, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+5: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] ", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6); + pPlayer->SEND_GOSSIP_MENU(9141, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+6: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->TalkedToCreature(C_SUNHAWK_TRIGGER, pCreature->GetGUID()); + break; + } + return true; +} + +void AddSC_bloodmyst_isle() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "mob_webbed_creature"; + newscript->GetAI = &GetAI_mob_webbed_creature; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_captured_sunhawk_agent"; + newscript->pGossipHello = &GossipHello_npc_captured_sunhawk_agent; + newscript->pGossipSelect = &GossipSelect_npc_captured_sunhawk_agent; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/boss_azuregos.cpp b/scripts/kalimdor/boss_azuregos.cpp new file mode 100644 index 000000000..fdbf964b0 --- /dev/null +++ b/scripts/kalimdor/boss_azuregos.cpp @@ -0,0 +1,153 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Azuregos +SD%Complete: 90 +SDComment: Teleport not included, spell reflect not effecting dots (Core problem) +SDCategory: Azshara +EndScriptData */ + +#include "precompiled.h" + +#define SAY_TELEPORT -1000100 + +#define SPELL_MARKOFFROST 23182 +#define SPELL_MANASTORM 21097 +#define SPELL_CHILL 21098 +#define SPELL_FROSTBREATH 21099 +#define SPELL_REFLECT 22067 +#define SPELL_CLEAVE 8255 //Perhaps not right ID +#define SPELL_ENRAGE 23537 + +struct MANGOS_DLL_DECL boss_azuregosAI : public ScriptedAI +{ + boss_azuregosAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 MarkOfFrost_Timer; + uint32 ManaStorm_Timer; + uint32 Chill_Timer; + uint32 Breath_Timer; + uint32 Teleport_Timer; + uint32 Reflect_Timer; + uint32 Cleave_Timer; + uint32 Enrage_Timer; + bool Enraged; + + void Reset() + { + MarkOfFrost_Timer = 35000; + ManaStorm_Timer = urand(5000, 17000); + Chill_Timer = urand(10000, 30000); + Breath_Timer = urand(2000, 8000); + Teleport_Timer = 30000; + Reflect_Timer = urand(15000, 30000); + Cleave_Timer = 7000; + Enrage_Timer = 0; + Enraged = false; + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (Teleport_Timer < diff) + { + DoScriptText(SAY_TELEPORT, m_creature); + + std::list& m_threatlist = m_creature->getThreatManager().getThreatList(); + std::list::iterator i = m_threatlist.begin(); + for (i = m_threatlist.begin(); i!= m_threatlist.end();++i) + { + Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid()); + if (pUnit && (pUnit->GetTypeId() == TYPEID_PLAYER)) + { + DoTeleportPlayer(pUnit, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()+3, pUnit->GetOrientation()); + } + } + + DoResetThreat(); + Teleport_Timer = 30000; + }else Teleport_Timer -= diff; + + // //MarkOfFrost_Timer + // if (MarkOfFrost_Timer < diff) + // { + // DoCast(m_creature->getVictim(),SPELL_MARKOFFROST); + // MarkOfFrost_Timer = 25000; + // }else MarkOfFrost_Timer -= diff; + + //Chill_Timer + if (Chill_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_CHILL); + Chill_Timer = urand(13000, 25000); + }else Chill_Timer -= diff; + + //Breath_Timer + if (Breath_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_FROSTBREATH); + Breath_Timer = urand(10000, 15000); + }else Breath_Timer -= diff; + + //ManaStorm_Timer + if (ManaStorm_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_MANASTORM); + ManaStorm_Timer = urand(7500, 12500); + }else ManaStorm_Timer -= diff; + + //Reflect_Timer + if (Reflect_Timer < diff) + { + DoCast(m_creature,SPELL_REFLECT); + Reflect_Timer = urand(20000, 35000); + }else Reflect_Timer -= diff; + + //Cleave_Timer + if (Cleave_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_CLEAVE); + Cleave_Timer = 7000; + }else Cleave_Timer -= diff; + + //Enrage_Timer + if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 26 && !Enraged) + { + DoCast(m_creature, SPELL_ENRAGE); + Enraged = true; + } + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_azuregos(Creature* pCreature) +{ + return new boss_azuregosAI(pCreature); +} + +void AddSC_boss_azuregos() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_azuregos"; + newscript->GetAI = &GetAI_boss_azuregos; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp new file mode 100644 index 000000000..02ca1f2e6 --- /dev/null +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp @@ -0,0 +1,144 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Aeonus +SD%Complete: 80 +SDComment: Some spells not implemented +SDCategory: Caverns of Time, The Dark Portal +EndScriptData */ + +#include "precompiled.h" +#include "dark_portal.h" + +enum +{ + SAY_ENTER = -1269012, + SAY_AGGRO = -1269013, + SAY_BANISH = -1269014, + SAY_SLAY1 = -1269015, + SAY_SLAY2 = -1269016, + SAY_DEATH = -1269017, + EMOTE_GENERIC_FRENZY = -1000002, + + SPELL_CLEAVE = 40504, + SPELL_TIME_STOP = 31422, + SPELL_ENRAGE = 37605, + SPELL_SAND_BREATH = 31473, + H_SPELL_SAND_BREATH = 39049 +}; + +struct MANGOS_DLL_DECL boss_aeonusAI : public ScriptedAI +{ + boss_aeonusAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + uint32 SandBreath_Timer; + uint32 TimeStop_Timer; + uint32 Frenzy_Timer; + + void Reset() + { + SandBreath_Timer = urand(15000, 30000); + TimeStop_Timer = urand(10000, 15000); + Frenzy_Timer = urand(30000, 45000); + } + + void Aggro(Unit *who) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void MoveInLineOfSight(Unit *who) + { + //Despawn Time Keeper + if (who->GetTypeId() == TYPEID_UNIT && who->GetEntry() == NPC_TIME_KEEPER) + { + if (m_creature->IsWithinDistInMap(who,20.0f)) + { + DoScriptText(SAY_BANISH, m_creature); + m_creature->DealDamage(who, who->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + } + + ScriptedAI::MoveInLineOfSight(who); + } + + void JustDied(Unit *victim) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_RIFT,DONE); + } + + void KilledUnit(Unit *victim) + { + DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Sand Breath + if (SandBreath_Timer < diff) + { + DoCast(m_creature->getVictim(), m_bIsHeroicMode ? H_SPELL_SAND_BREATH : SPELL_SAND_BREATH); + SandBreath_Timer = urand(15000, 25000); + }else SandBreath_Timer -= diff; + + //Time Stop + if (TimeStop_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_TIME_STOP); + TimeStop_Timer = urand(20000, 35000); + }else TimeStop_Timer -= diff; + + //Frenzy + if (Frenzy_Timer < diff) + { + DoScriptText(EMOTE_GENERIC_FRENZY, m_creature); + DoCast(m_creature, SPELL_ENRAGE); + Frenzy_Timer = urand(20000, 35000); + }else Frenzy_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_aeonus(Creature* pCreature) +{ + return new boss_aeonusAI(pCreature); +} + +void AddSC_boss_aeonus() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_aeonus"; + newscript->GetAI = &GetAI_boss_aeonus; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp new file mode 100644 index 000000000..f142dfe2a --- /dev/null +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp @@ -0,0 +1,153 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Chrono_Lord_Deja +SD%Complete: 65 +SDComment: All abilities not implemented +SDCategory: Caverns of Time, The Dark Portal +EndScriptData */ + +#include "precompiled.h" +#include "dark_portal.h" + +#define SAY_ENTER -1269006 +#define SAY_AGGRO -1269007 +#define SAY_BANISH -1269008 +#define SAY_SLAY1 -1269009 +#define SAY_SLAY2 -1269010 +#define SAY_DEATH -1269011 + +#define SPELL_ARCANE_BLAST 31457 +#define H_SPELL_ARCANE_BLAST 38538 +#define SPELL_ARCANE_DISCHARGE 31472 +#define H_SPELL_ARCANE_DISCHARGE 38539 +#define SPELL_TIME_LAPSE 31467 +#define SPELL_ATTRACTION 38540 //Not Implemented (Heroic mode) + +struct MANGOS_DLL_DECL boss_chrono_lord_dejaAI : public ScriptedAI +{ + boss_chrono_lord_dejaAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + uint32 ArcaneBlast_Timer; + uint32 TimeLapse_Timer; + uint32 Attraction_Timer; + uint32 ArcaneDischarge_Timer; + + void Reset() + { + ArcaneBlast_Timer = urand(18000, 23000); + TimeLapse_Timer = urand(10000, 15000); + ArcaneDischarge_Timer = urand(20000, 30000); + Attraction_Timer = urand(25000, 35000); + } + + void Aggro(Unit *who) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void MoveInLineOfSight(Unit *who) + { + //Despawn Time Keeper + if (who->GetTypeId() == TYPEID_UNIT && who->GetEntry() == NPC_TIME_KEEPER) + { + if (m_creature->IsWithinDistInMap(who,20.0f)) + { + DoScriptText(SAY_BANISH, m_creature); + m_creature->DealDamage(who, who->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + } + + ScriptedAI::MoveInLineOfSight(who); + } + + void KilledUnit(Unit *victim) + { + DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); + } + + void JustDied(Unit *victim) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_RIFT,SPECIAL); + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Arcane Blast + if (ArcaneBlast_Timer < diff) + { + DoCast(m_creature->getVictim(), m_bIsHeroicMode ? H_SPELL_ARCANE_BLAST : SPELL_ARCANE_BLAST); + ArcaneBlast_Timer = urand(15000, 25000); + }else ArcaneBlast_Timer -= diff; + + //Arcane Discharge + if (ArcaneDischarge_Timer < diff) + { + Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0); + DoCast(target, m_bIsHeroicMode ? H_SPELL_ARCANE_DISCHARGE : SPELL_ARCANE_DISCHARGE); + ArcaneDischarge_Timer = urand(20000, 30000); + }else ArcaneDischarge_Timer -= diff; + + //Time Lapse + if (TimeLapse_Timer < diff) + { + DoScriptText(SAY_BANISH, m_creature); + DoCast(m_creature, SPELL_TIME_LAPSE); + TimeLapse_Timer = urand(15000, 25000); + }else TimeLapse_Timer -= diff; + + if (m_bIsHeroicMode) + { + if (Attraction_Timer < diff) + { + DoCast(m_creature,SPELL_ATTRACTION); + Attraction_Timer = urand(25000, 35000); + }else Attraction_Timer -= diff; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_chrono_lord_deja(Creature* pCreature) +{ + return new boss_chrono_lord_dejaAI(pCreature); +} + +void AddSC_boss_chrono_lord_deja() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_chrono_lord_deja"; + newscript->GetAI = &GetAI_boss_chrono_lord_deja; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp new file mode 100644 index 000000000..7d91b9614 --- /dev/null +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp @@ -0,0 +1,150 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Temporus +SD%Complete: 75 +SDComment: More abilities need to be implemented +SDCategory: Caverns of Time, The Dark Portal +EndScriptData */ + +#include "precompiled.h" +#include "dark_portal.h" + +#define SAY_ENTER -1269000 +#define SAY_AGGRO -1269001 +#define SAY_BANISH -1269002 +#define SAY_SLAY1 -1269003 +#define SAY_SLAY2 -1269004 +#define SAY_DEATH -1269005 + +#define SPELL_HASTE 31458 +#define SPELL_MORTAL_WOUND 31464 +#define SPELL_WING_BUFFET 31475 +#define H_SPELL_WING_BUFFET 38593 +#define SPELL_REFLECT 38592 //Not Implemented (Heroic mod) + +struct MANGOS_DLL_DECL boss_temporusAI : public ScriptedAI +{ + boss_temporusAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + uint32 Haste_Timer; + uint32 SpellReflection_Timer; + uint32 MortalWound_Timer; + uint32 WingBuffet_Timer; + + void Reset() + { + Haste_Timer = urand(15000, 23000); + SpellReflection_Timer = 30000; + MortalWound_Timer = 8000; + WingBuffet_Timer = urand(25000, 35000); + } + + void Aggro(Unit *who) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void KilledUnit(Unit *victim) + { + DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); + } + + void JustDied(Unit *victim) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_RIFT,SPECIAL); + } + + void MoveInLineOfSight(Unit *who) + { + //Despawn Time Keeper + if (who->GetTypeId() == TYPEID_UNIT && who->GetEntry() == NPC_TIME_KEEPER) + { + if (m_creature->IsWithinDistInMap(who,20.0f)) + { + DoScriptText(SAY_BANISH, m_creature); + m_creature->DealDamage(who, who->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + } + + ScriptedAI::MoveInLineOfSight(who); + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Attack Haste + if (Haste_Timer < diff) + { + DoCast(m_creature, SPELL_HASTE); + Haste_Timer = urand(20000, 25000); + }else Haste_Timer -= diff; + + //MortalWound_Timer + if (MortalWound_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_MORTAL_WOUND); + MortalWound_Timer = urand(10000, 20000); + }else MortalWound_Timer -= diff; + + //Wing ruffet + if (WingBuffet_Timer < diff) + { + DoCast(m_creature, m_bIsHeroicMode ? H_SPELL_WING_BUFFET : SPELL_WING_BUFFET); + WingBuffet_Timer = urand(20000, 30000); + }else WingBuffet_Timer -= diff; + + if (m_bIsHeroicMode) + { + if (SpellReflection_Timer < diff) + { + DoCast(m_creature, SPELL_REFLECT); + SpellReflection_Timer = urand(25000, 35000); + }else SpellReflection_Timer -= diff; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_temporus(Creature* pCreature) +{ + return new boss_temporusAI(pCreature); +} + +void AddSC_boss_temporus() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_temporus"; + newscript->GetAI = &GetAI_boss_temporus; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp new file mode 100644 index 000000000..0ffd791ee --- /dev/null +++ b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp @@ -0,0 +1,411 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Dark_Portal +SD%Complete: 30 +SDComment: Misc NPC's and mobs for instance. Most here far from complete. +SDCategory: Caverns of Time, The Dark Portal +EndScriptData */ + +/* ContentData +npc_medivh_bm +npc_time_rift +npc_saat +EndContentData */ + +#include "precompiled.h" +#include "dark_portal.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 + +#define SPELL_CHANNEL 31556 +#define SPELL_PORTAL_RUNE 32570 //aura(portal on ground effect) + +#define SPELL_BLACK_CRYSTAL 32563 //aura +#define SPELL_PORTAL_CRYSTAL 32564 //summon + +#define SPELL_BANISH_PURPLE 32566 //aura +#define SPELL_BANISH_GREEN 32567 //aura + +#define SPELL_CORRUPT 31326 +#define SPELL_CORRUPT_AEONUS 37853 + +#define C_COUNCIL_ENFORCER 17023 + +struct MANGOS_DLL_DECL npc_medivh_bmAI : public ScriptedAI +{ + npc_medivh_bmAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 SpellCorrupt_Timer; + uint32 Check_Timer; + + bool Life75; + bool Life50; + bool Life25; + + void Reset() + { + SpellCorrupt_Timer = 0; + Check_Timer = 0; + + Life75 = true; + Life50 = true; + Life25 = true; + + if (!m_pInstance) + return; + + if (m_pInstance->GetData(TYPE_MEDIVH) == IN_PROGRESS) + m_creature->CastSpell(m_creature,SPELL_CHANNEL,true); + else if (m_creature->HasAura(SPELL_CHANNEL,0)) + m_creature->RemoveAura(SPELL_CHANNEL,0); + + m_creature->CastSpell(m_creature,SPELL_PORTAL_RUNE,true); + } + + void MoveInLineOfSight(Unit *who) + { + if (!m_pInstance) + return; + + if (who->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(who, 10.0f)) + { + if (m_pInstance->GetData(TYPE_MEDIVH) == IN_PROGRESS || m_pInstance->GetData(TYPE_MEDIVH) == DONE) + return; + + DoScriptText(SAY_INTRO, m_creature); + m_pInstance->SetData(TYPE_MEDIVH,IN_PROGRESS); + m_creature->CastSpell(m_creature,SPELL_CHANNEL,false); + Check_Timer = 5000; + } + else if (who->GetTypeId() == TYPEID_UNIT && m_creature->IsWithinDistInMap(who, 15.0f)) + { + if (m_pInstance->GetData(TYPE_MEDIVH) != IN_PROGRESS) + return; + + uint32 entry = who->GetEntry(); + if (entry == NPC_ASSAS || entry == NPC_WHELP || entry == NPC_CHRON || entry == NPC_EXECU || entry == NPC_VANQU) + { + who->StopMoving(); + who->CastSpell(m_creature,SPELL_CORRUPT,false); + } + else if (entry == NPC_AEONUS) + { + who->StopMoving(); + who->CastSpell(m_creature,SPELL_CORRUPT_AEONUS,false); + } + } + } + + void AttackStart(Unit *who) + { + //if (m_pInstance && m_pInstance->GetData(TYPE_MEDIVH) == IN_PROGRESS) + //return; + + //ScriptedAI::AttackStart(who); + } + + void SpellHit(Unit* caster, const SpellEntry* spell) + { + if (SpellCorrupt_Timer) + return; + + if (spell->Id == SPELL_CORRUPT_AEONUS) + SpellCorrupt_Timer = 1000; + + if (spell->Id == SPELL_CORRUPT) + SpellCorrupt_Timer = 3000; + } + + void JustDied(Unit* Killer) + { + if (Killer->GetEntry() == m_creature->GetEntry()) + return; + + DoScriptText(SAY_DEATH, m_creature); + } + + void UpdateAI(const uint32 diff) + { + if (!m_pInstance) + return; + + if (SpellCorrupt_Timer) + { + if (SpellCorrupt_Timer <= diff) + { + m_pInstance->SetData(TYPE_MEDIVH,SPECIAL); + + if (m_creature->HasAura(SPELL_CORRUPT_AEONUS,0)) + SpellCorrupt_Timer = 1000; + else if (m_creature->HasAura(SPELL_CORRUPT,0)) + SpellCorrupt_Timer = 3000; + else + SpellCorrupt_Timer = 0; + }else SpellCorrupt_Timer -= diff; + } + + if (Check_Timer) + { + if (Check_Timer <= diff) + { + uint32 pct = m_pInstance->GetData(DATA_SHIELD); + + Check_Timer = 5000; + + if (Life25 && pct <= 25) + { + DoScriptText(SAY_WEAK25, m_creature); + Life25 = false; + } + else if (Life50 && pct <= 50) + { + DoScriptText(SAY_WEAK50, m_creature); + Life50 = false; + } + else if (Life75 && pct <= 75) + { + DoScriptText(SAY_WEAK75, m_creature); + Life75 = false; + } + + //if we reach this it means event was running but at some point reset. + if (m_pInstance->GetData(TYPE_MEDIVH) == NOT_STARTED) + { + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + m_creature->RemoveCorpse(); + m_creature->Respawn(); + return; + } + + if (m_pInstance->GetData(TYPE_RIFT) == DONE) + { + DoScriptText(SAY_WIN, m_creature); + Check_Timer = 0; + + if (m_creature->HasAura(SPELL_CHANNEL,0)) + m_creature->RemoveAura(SPELL_CHANNEL,0); + + //TODO: start the post-event here + m_pInstance->SetData(TYPE_MEDIVH,DONE); + } + }else Check_Timer -= diff; + } + + //if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + //return; + + //DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_medivh_bm(Creature* pCreature) +{ + return new npc_medivh_bmAI(pCreature); +} + +struct Wave +{ + uint32 PortalMob[4]; //spawns for portal waves (in order) +}; + +static Wave PortalWaves[]= +{ + {NPC_ASSAS, NPC_WHELP, NPC_CHRON, 0}, + {NPC_EXECU, NPC_CHRON, NPC_WHELP, NPC_ASSAS}, + {NPC_EXECU, NPC_VANQU, NPC_CHRON, NPC_ASSAS} +}; + +struct MANGOS_DLL_DECL npc_time_riftAI : public ScriptedAI +{ + npc_time_riftAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 TimeRiftWave_Timer; + uint8 mRiftWaveCount; + uint8 mPortalCount; + uint8 mWaveId; + + void Reset() + { + TimeRiftWave_Timer = 15000; + mRiftWaveCount = 0; + + if (!m_pInstance) + return; + + mPortalCount = m_pInstance->GetData(DATA_PORTAL_COUNT); + + if (mPortalCount < 6) + mWaveId = 0; + else if (mPortalCount > 12) + mWaveId = 2; + else mWaveId = 1; + + } + + void DoSummonAtRift(uint32 creature_entry) + { + if (!creature_entry) + return; + + if (m_pInstance->GetData(TYPE_MEDIVH) != IN_PROGRESS) + { + m_creature->InterruptNonMeleeSpells(true); + m_creature->RemoveAllAuras(); + return; + } + + float x,y,z; + m_creature->GetRandomPoint(m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ(),10.0f,x,y,z); + + //normalize Z-level if we can, if rift is not at ground level. + z = std::max(m_creature->GetMap()->GetHeight(x, y, MAX_HEIGHT), m_creature->GetMap()->GetWaterLevel(x, y)); + + Unit *Summon = m_creature->SummonCreature(creature_entry,x,y,z,m_creature->GetOrientation(), + TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,30000); + + if (Summon) + { + if (Unit *temp = Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_MEDIVH))) + Summon->AddThreat(temp,0.0f); + } + } + + void DoSelectSummon() + { + uint32 entry = 0; + + if ((mRiftWaveCount > 2 && mWaveId < 1) || mRiftWaveCount > 3) + mRiftWaveCount = 0; + + entry = PortalWaves[mWaveId].PortalMob[mRiftWaveCount]; + debug_log("SD2: npc_time_rift: summoning wave creature (Wave %u, Entry %u).",mRiftWaveCount,entry); + + ++mRiftWaveCount; + + if (entry == NPC_WHELP) + { + for(uint8 i = 0; i < 3; ++i) + DoSummonAtRift(entry); + }else DoSummonAtRift(entry); + } + + void UpdateAI(const uint32 diff) + { + if (!m_pInstance) + return; + + if (TimeRiftWave_Timer < diff) + { + DoSelectSummon(); + TimeRiftWave_Timer = 15000; + }else TimeRiftWave_Timer -= diff; + + if (m_creature->IsNonMeleeSpellCasted(false)) + return; + + debug_log("SD2: npc_time_rift: not casting anylonger, i need to die."); + m_creature->setDeathState(JUST_DIED); + + if (m_pInstance->GetData(TYPE_RIFT) == IN_PROGRESS) + m_pInstance->SetData(TYPE_RIFT,SPECIAL); + } +}; + +CreatureAI* GetAI_npc_time_rift(Creature* pCreature) +{ + return new npc_time_riftAI(pCreature); +} + +#define SAY_SAAT_WELCOME -1269019 + +#define GOSSIP_ITEM_OBTAIN "[PH] Obtain Chrono-Beacon" +#define SPELL_CHRONO_BEACON 34975 +#define ITEM_CHRONO_BEACON 24289 + +bool GossipHello_npc_saat(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestStatus(QUEST_OPENING_PORTAL) == QUEST_STATUS_INCOMPLETE && !pPlayer->HasItemCount(ITEM_CHRONO_BEACON,1)) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,GOSSIP_ITEM_OBTAIN,GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(10000, pCreature->GetGUID()); + return true; + } + else if (pPlayer->GetQuestRewardStatus(QUEST_OPENING_PORTAL) && !pPlayer->HasItemCount(ITEM_CHRONO_BEACON,1)) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,GOSSIP_ITEM_OBTAIN,GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(10001, pCreature->GetGUID()); + return true; + } + + pPlayer->SEND_GOSSIP_MENU(10002, pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_saat(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + pPlayer->CLOSE_GOSSIP_MENU(); + pCreature->CastSpell(pPlayer,SPELL_CHRONO_BEACON,false); + } + return true; +} + +void AddSC_dark_portal() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_medivh_bm"; + newscript->GetAI = &GetAI_npc_medivh_bm; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_time_rift"; + newscript->GetAI = &GetAI_npc_time_rift; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_saat"; + newscript->pGossipHello = &GossipHello_npc_saat; + newscript->pGossipSelect = &GossipSelect_npc_saat; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h new file mode 100644 index 000000000..2fb20dd45 --- /dev/null +++ b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h @@ -0,0 +1,45 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_DARKPORTAL_H +#define DEF_DARKPORTAL_H + +enum +{ + MAX_ENCOUNTER = 2, + + TYPE_MEDIVH = 1, + TYPE_RIFT = 2, + + DATA_MEDIVH = 10, + DATA_PORTAL_COUNT = 11, + DATA_SHIELD = 12, + + WORLD_STATE_BM = 2541, + WORLD_STATE_BM_SHIELD = 2540, + WORLD_STATE_BM_RIFT = 2784, + + QUEST_OPENING_PORTAL = 10297, + QUEST_MASTER_TOUCH = 9836, + + NPC_TIME_KEEPER = 17918, + NPC_RKEEP = 21104, + NPC_RLORD = 17839, + NPC_DEJA = 17879, + NPC_TEMPO = 17880, + NPC_AEONUS = 17881, + NPC_ASSAS = 17835, + NPC_WHELP = 21818, + NPC_CHRON = 17892, + NPC_EXECU = 18994, + NPC_VANQU = 18995, + NPC_MEDIVH = 15608, + NPC_TIME_RIFT = 17838, + + SPELL_RIFT_CHANNEL = 31387, + + RIFT_BOSS = 1 +}; + +#endif diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp new file mode 100644 index 000000000..38572be26 --- /dev/null +++ b/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp @@ -0,0 +1,343 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance_Dark_Portal +SD%Complete: 50 +SDComment: Quest support: 9836, 10297. Currently in progress. +SDCategory: Caverns of Time, The Dark Portal +EndScriptData */ + +#include "precompiled.h" +#include "dark_portal.h" + +inline uint32 RandRiftBoss() { return (urand(0, 1) ? NPC_RKEEP : NPC_RLORD); } + +float PortalLocation[4][4]= +{ + {-2041.06, 7042.08, 29.99, 1.30}, + {-1968.18, 7042.11, 21.93, 2.12}, + {-1885.82, 7107.36, 22.32, 3.07}, + {-1928.11, 7175.95, 22.11, 3.44} +}; + +struct Wave +{ + uint32 PortalBoss; //protector of current portal + uint32 NextPortalTime; //time to next portal, or 0 if portal boss need to be killed +}; + +static Wave RiftWaves[]= +{ + {RIFT_BOSS, 0}, + {NPC_DEJA, 0}, + {RIFT_BOSS, 120000}, + {NPC_TEMPO, 140000}, + {RIFT_BOSS, 120000}, + {NPC_AEONUS, 0} +}; + +struct MANGOS_DLL_DECL instance_dark_portal : public ScriptedInstance +{ + instance_dark_portal(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + + uint32 m_uiRiftPortalCount; + uint32 m_uiShieldPercent; + uint8 m_uiRiftWaveCount; + uint8 m_uiRiftWaveId; + + uint32 m_uiNextPortal_Timer; + + uint64 m_uiMedivhGUID; + uint8 m_uiCurrentRiftId; + + void Initialize() + { + m_uiMedivhGUID = 0; + Clear(); + } + + void Clear() + { + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + + m_uiRiftPortalCount = 0; + m_uiShieldPercent = 100; + m_uiRiftWaveCount = 0; + m_uiRiftWaveId = 0; + + m_uiCurrentRiftId = 0; + + m_uiNextPortal_Timer = 0; + } + + void InitWorldState(bool Enable = true) + { + DoUpdateWorldState(WORLD_STATE_BM,Enable ? 1 : 0); + DoUpdateWorldState(WORLD_STATE_BM_SHIELD,100); + DoUpdateWorldState(WORLD_STATE_BM_RIFT,0); + } + + bool IsEncounterInProgress() + { + if (GetData(TYPE_MEDIVH) == IN_PROGRESS) + return true; + + return false; + } + + void OnPlayerEnter(Player* pPlayer) + { + if (GetData(TYPE_MEDIVH) == IN_PROGRESS) + return; + + pPlayer->SendUpdateWorldState(WORLD_STATE_BM,0); + } + + void OnCreatureCreate(Creature* pCreature) + { + if (pCreature->GetEntry() == NPC_MEDIVH) + m_uiMedivhGUID = pCreature->GetGUID(); + } + + //what other conditions to check? + bool CanProgressEvent() + { + if (instance->GetPlayers().isEmpty()) + return false; + + return true; + } + + uint8 GetRiftWaveId() + { + switch(m_uiRiftPortalCount) + { + case 6: + m_uiRiftWaveId = 2; + return 1; + case 12: + m_uiRiftWaveId = 4; + return 3; + case 18: + return 5; + default: + return m_uiRiftWaveId; + } + } + + void SetData(uint32 type, uint32 data) + { + switch(type) + { + case TYPE_MEDIVH: + if (data == SPECIAL && m_auiEncounter[0] == IN_PROGRESS) + { + --m_uiShieldPercent; + + DoUpdateWorldState(WORLD_STATE_BM_SHIELD, m_uiShieldPercent); + + if (!m_uiShieldPercent) + { + if (Creature* pMedivh = instance->GetCreature(m_uiMedivhGUID)) + { + if (pMedivh->isAlive()) + { + pMedivh->DealDamage(pMedivh, pMedivh->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + m_auiEncounter[0] = FAIL; + m_auiEncounter[1] = NOT_STARTED; + } + } + } + } + else + { + if (data == IN_PROGRESS) + { + debug_log("SD2: Instance Dark Portal: Starting event."); + InitWorldState(); + m_auiEncounter[1] = IN_PROGRESS; + m_uiNextPortal_Timer = 15000; + } + + if (data == DONE) + { + //this may be completed further out in the post-event + debug_log("SD2: Instance Dark Portal: Event completed."); + + Map::PlayerList const& players = instance->GetPlayers(); + + if (!players.isEmpty()) + { + for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) + { + if (Player* pPlayer = itr->getSource()) + { + if (pPlayer->GetQuestStatus(QUEST_OPENING_PORTAL) == QUEST_STATUS_INCOMPLETE) + pPlayer->AreaExploredOrEventHappens(QUEST_OPENING_PORTAL); + + if (pPlayer->GetQuestStatus(QUEST_MASTER_TOUCH) == QUEST_STATUS_INCOMPLETE) + pPlayer->AreaExploredOrEventHappens(QUEST_MASTER_TOUCH); + } + } + } + } + + m_auiEncounter[0] = data; + } + break; + case TYPE_RIFT: + if (data == SPECIAL) + { + if (m_uiRiftPortalCount < 7) + m_uiNextPortal_Timer = 5000; + } + else + m_auiEncounter[1] = data; + break; + } + } + + uint32 GetData(uint32 type) + { + switch(type) + { + case TYPE_MEDIVH: + return m_auiEncounter[0]; + case TYPE_RIFT: + return m_auiEncounter[1]; + case DATA_PORTAL_COUNT: + return m_uiRiftPortalCount; + case DATA_SHIELD: + return m_uiShieldPercent; + } + return 0; + } + + uint64 GetData64(uint32 data) + { + if (data == DATA_MEDIVH) + return m_uiMedivhGUID; + + return 0; + } + + Creature* SummonedPortalBoss(Creature* pSource) + { + uint32 entry = RiftWaves[GetRiftWaveId()].PortalBoss; + + if (entry == RIFT_BOSS) + entry = RandRiftBoss(); + + float x,y,z; + pSource->GetRandomPoint(pSource->GetPositionX(),pSource->GetPositionY(),pSource->GetPositionZ(),10.0f,x,y,z); + //normalize Z-level if we can, if rift is not at ground level. + z = std::max(instance->GetHeight(x, y, MAX_HEIGHT), instance->GetWaterLevel(x, y)); + + debug_log("SD2: Instance Dark Portal: Summoning rift boss entry %u.",entry); + + Creature* pSummoned = pSource->SummonCreature(entry,x,y,z,pSource->GetOrientation(), + TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); + + if (pSummoned) + return pSummoned; + + debug_log("SD2: Instance Dark Portal: what just happened there? No boss, no loot, no fun..."); + return NULL; + } + + void DoSpawnPortal() + { + if (Creature* pMedivh = instance->GetCreature(m_uiMedivhGUID)) + { + int tmp = rand()%(4-1); + + if (tmp >= m_uiCurrentRiftId) + ++tmp; + + debug_log("SD2: Instance Dark Portal: Creating Time Rift at locationId %i (old locationId was %u).", tmp, m_uiCurrentRiftId); + + m_uiCurrentRiftId = tmp; + + Creature* pTemp = pMedivh->SummonCreature(NPC_TIME_RIFT, + PortalLocation[tmp][0],PortalLocation[tmp][1],PortalLocation[tmp][2],PortalLocation[tmp][3], + TEMPSUMMON_CORPSE_DESPAWN,0); + + if (pTemp) + { + pTemp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + pTemp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + if (Creature* pBoss = SummonedPortalBoss(pTemp)) + { + if (pBoss->GetEntry() == NPC_AEONUS) + { + pBoss->AddThreat(pMedivh,0.0f); + } + else + { + pBoss->AddThreat(pTemp,0.0f); + pTemp->CastSpell(pBoss,SPELL_RIFT_CHANNEL,false); + } + } + } + } + } + + void Update(uint32 uiDiff) + { + if (m_auiEncounter[1] != IN_PROGRESS) + return; + + //add delay timer? + if (!CanProgressEvent()) + { + Clear(); + return; + } + + if (m_uiNextPortal_Timer) + { + if (m_uiNextPortal_Timer <= uiDiff) + { + ++m_uiRiftPortalCount; + + DoUpdateWorldState(WORLD_STATE_BM_RIFT, m_uiRiftPortalCount); + + DoSpawnPortal(); + m_uiNextPortal_Timer = RiftWaves[GetRiftWaveId()].NextPortalTime; + } + else + m_uiNextPortal_Timer -= uiDiff; + } + } +}; + +InstanceData* GetInstanceData_instance_dark_portal(Map* pMap) +{ + return new instance_dark_portal(pMap); +} + +void AddSC_instance_dark_portal() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "instance_dark_portal"; + newscript->GetInstanceData = &GetInstanceData_instance_dark_portal; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp b/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp new file mode 100644 index 000000000..46a557dd2 --- /dev/null +++ b/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp @@ -0,0 +1,633 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Archimonde +SD%Complete: 85 +SDComment: Doomfires not completely offlike due to core limitations for random moving. Tyrande and second phase not fully implemented. +SDCategory: Caverns of Time, Mount Hyjal +EndScriptData */ + +#include "precompiled.h" +#include "hyjal.h" +#include "SpellAuras.h" + +//text id -1534018 are the text used when previous events complete. Not part of this script. +#define SAY_AGGRO -1534019 +#define SAY_DOOMFIRE1 -1534020 +#define SAY_DOOMFIRE2 -1534021 +#define SAY_AIR_BURST1 -1534022 +#define SAY_AIR_BURST2 -1534023 +#define SAY_SLAY1 -1534024 +#define SAY_SLAY2 -1534025 +#define SAY_SLAY3 -1534026 +#define SAY_ENRAGE -1534027 +#define SAY_DEATH -1534028 +#define SAY_SOUL_CHARGE1 -1534029 +#define SAY_SOUL_CHARGE2 -1534030 + +#define SPELL_DENOUEMENT_WISP 32124 +#define SPELL_ANCIENT_SPARK 39349 +#define SPELL_PROTECTION_OF_ELUNE 38528 + +#define SPELL_DRAIN_WORLD_TREE 39140 +#define SPELL_DRAIN_WORLD_TREE_2 39141 + +#define SPELL_FINGER_OF_DEATH 31984 +#define SPELL_HAND_OF_DEATH 35354 +#define SPELL_AIR_BURST 32014 +#define SPELL_GRIP_OF_THE_LEGION 31972 +#define SPELL_DOOMFIRE_STRIKE 31903 //summons two creatures +#define SPELL_DOOMFIRE_SPAWN 32074 +#define SPELL_DOOMFIRE 31945 +#define SPELL_SOUL_CHARGE_YELLOW 32045 +#define SPELL_SOUL_CHARGE_GREEN 32051 +#define SPELL_SOUL_CHARGE_RED 32052 +#define SPELL_UNLEASH_SOUL_YELLOW 32054 +#define SPELL_UNLEASH_SOUL_GREEN 32057 +#define SPELL_UNLEASH_SOUL_RED 32053 +#define SPELL_FEAR 31970 + +#define CREATURE_ARCHIMONDE 17968 +#define CREATURE_DOOMFIRE 18095 +#define CREATURE_DOOMFIRE_SPIRIT 18104 +#define CREATURE_ANCIENT_WISP 17946 +#define CREATURE_CHANNEL_TARGET 22418 + +#define NORDRASSIL_X 5503.713 +#define NORDRASSIL_Y -3523.436 +#define NORDRASSIL_Z 1608.781 + +struct mob_ancient_wispAI : public ScriptedAI +{ + mob_ancient_wispAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + ArchimondeGUID = 0; + Reset(); + } + + ScriptedInstance* m_pInstance; + uint64 ArchimondeGUID; + uint32 CheckTimer; + + void Reset() + { + CheckTimer = 1000; + + if (m_pInstance) + ArchimondeGUID = m_pInstance->GetData64(DATA_ARCHIMONDE); + + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + } + + void DamageTaken(Unit* done_by, uint32 &damage) { damage = 0; } + + void UpdateAI(const uint32 diff) + { + if (CheckTimer < diff) + { + if (Unit* Archimonde = Unit::GetUnit((*m_creature), ArchimondeGUID)) + { + if ((((Archimonde->GetHealth()*100) / Archimonde->GetMaxHealth()) < 2) || !Archimonde->isAlive()) + DoCast(m_creature, SPELL_DENOUEMENT_WISP); + else + DoCast(Archimonde, SPELL_ANCIENT_SPARK); + } + CheckTimer = 1000; + }else CheckTimer -= diff; + } +}; + +/* This script is merely a placeholder for the Doomfire that triggers Doomfire spell. It will + MoveChase the Doomfire Spirit always, until despawn (AttackStart is called upon it's spawn) */ +struct MANGOS_DLL_DECL mob_doomfireAI : public ScriptedAI +{ + mob_doomfireAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + void Reset() { } + + void MoveInLineOfSight(Unit* who) { } + void DamageTaken(Unit *done_by, uint32 &damage) { damage = 0; } +}; + +/* This is the script for the Doomfire Spirit Mob. This mob simply follow players or + travels in random directions if target cannot be found. */ +struct MANGOS_DLL_DECL mob_doomfire_targettingAI : public ScriptedAI +{ + mob_doomfire_targettingAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + uint64 TargetGUID; + uint32 ChangeTargetTimer; + + void Reset() + { + TargetGUID = 0; + ChangeTargetTimer = 5000; + } + + void MoveInLineOfSight(Unit* who) + { + //will update once TargetGUID is 0. In case noone actually moves(not likely) and this is 0 + //when UpdateAI needs it, it will be forced to select randomPoint + if (!TargetGUID && who->GetTypeId() == TYPEID_PLAYER) + TargetGUID = who->GetGUID(); + } + + void DamageTaken(Unit *done_by, uint32 &damage) { damage = 0; } + + void UpdateAI(const uint32 diff) + { + if (ChangeTargetTimer < diff) + { + if (Unit *temp = Unit::GetUnit(*m_creature,TargetGUID)) + { + m_creature->GetMotionMaster()->MoveFollow(temp,0.0f,0.0f); + TargetGUID = 0; + } + else + { + float x,y,z = 0.0; + m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 40, x, y, z); + m_creature->GetMotionMaster()->MovePoint(0, x, y, z); + } + + ChangeTargetTimer = 5000; + }else ChangeTargetTimer -= diff; + } +}; + +/* Finally, Archimonde's script. His script isn't extremely complex, most are simply spells on timers. + The only complicated aspect of the battle is Finger of Death and Doomfire, with Doomfire being the + hardest bit to code. Finger of Death is simply a distance check - if no one is in melee range, then + select a random target and cast the spell on them. However, if someone IS in melee range, and this + is NOT the main tank (creature's victim), then we aggro that player and they become the new victim. + For Doomfire, we summon a mob (Doomfire Spirit) for the Doomfire mob to follow. It's spirit will + randomly select it's target to follow and then we create the random movement making it unpredictable. */ + +struct MANGOS_DLL_DECL boss_archimondeAI : public ScriptedAI +{ + boss_archimondeAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint64 DoomfireSpiritGUID; + uint64 WorldTreeGUID; + + uint32 DrainNordrassilTimer; + uint32 FearTimer; + uint32 AirBurstTimer; + uint32 GripOfTheLegionTimer; + uint32 DoomfireTimer; + uint32 SoulChargeTimer; + uint32 SoulChargeCount; + uint32 MeleeRangeCheckTimer; + uint32 HandOfDeathTimer; + uint32 SummonWispTimer; + uint32 WispCount; + uint32 EnrageTimer; + uint32 CheckDistanceTimer; + + bool Enraged; + bool BelowTenPercent; + bool HasProtected; + bool IsChanneling; + + void Reset() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_ARCHIMONDE, NOT_STARTED); + + DoomfireSpiritGUID = 0; + WorldTreeGUID = 0; + + DrainNordrassilTimer = 0; + FearTimer = 42000; + AirBurstTimer = 30000; + GripOfTheLegionTimer = urand(5000, 25000); + DoomfireTimer = 20000; + SoulChargeTimer = urand(2000, 29000); + SoulChargeCount = 0; + MeleeRangeCheckTimer = 15000; + HandOfDeathTimer = 2000; + WispCount = 0; // When ~30 wisps are summoned, Archimonde dies + EnrageTimer = 600000; // 10 minutes + CheckDistanceTimer = 30000; // This checks if he's too close to the World Tree (75 yards from a point on the tree), if true then he will enrage + + Enraged = false; + BelowTenPercent = false; + HasProtected = false; + IsChanneling = false; + } + + void Aggro(Unit* pWho) + { + m_creature->InterruptSpell(CURRENT_CHANNELED_SPELL); + DoScriptText(SAY_AGGRO, m_creature); + + m_creature->SetInCombatWithZone(); + + if (m_pInstance) + m_pInstance->SetData(TYPE_ARCHIMONDE, IN_PROGRESS); + } + + void KilledUnit(Unit *victim) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_SLAY1, m_creature); break; + case 1: DoScriptText(SAY_SLAY2, m_creature); break; + case 2: DoScriptText(SAY_SLAY3, m_creature); break; + } + + if (victim && (victim->GetTypeId() == TYPEID_PLAYER)) + GainSoulCharge(((Player*)victim)); + } + + void GainSoulCharge(Player* victim) + { + switch(victim->getClass()) + { + case CLASS_PRIEST: + case CLASS_PALADIN: + case CLASS_WARLOCK: + victim->CastSpell(m_creature, SPELL_SOUL_CHARGE_RED, true); + break; + case CLASS_MAGE: + case CLASS_ROGUE: + case CLASS_WARRIOR: + victim->CastSpell(m_creature, SPELL_SOUL_CHARGE_YELLOW, true); + break; + case CLASS_DRUID: + case CLASS_SHAMAN: + case CLASS_HUNTER: + victim->CastSpell(m_creature, SPELL_SOUL_CHARGE_GREEN, true); + break; + } + + SoulChargeTimer = urand(2000, 30000); + ++SoulChargeCount; + } + + void JustDied(Unit *victim) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_ARCHIMONDE, DONE); + } + + bool CanUseFingerOfDeath() + { + // First we check if our current victim is in melee range or not. + Unit* victim = m_creature->getVictim(); + if (victim && m_creature->IsWithinDistInMap(victim, m_creature->GetAttackDistance(victim))) + return false; + + std::list& m_threatlist = m_creature->getThreatManager().getThreatList(); + if (m_threatlist.empty()) + return false; + + std::list targets; + std::list::iterator itr = m_threatlist.begin(); + for(; itr != m_threatlist.end(); ++itr) + { + Unit* pUnit = Unit::GetUnit((*m_creature), (*itr)->getUnitGuid()); + if (pUnit && pUnit->isAlive()) + targets.push_back(pUnit); + } + + if (targets.empty()) + return false; + + targets.sort(ObjectDistanceOrder(m_creature)); + Unit* target = targets.front(); + if (target) + { + if (!m_creature->IsWithinDistInMap(target, m_creature->GetAttackDistance(target))) + return true; // Cast Finger of Death + else // This target is closest, he is our new tank + m_creature->AddThreat(target, m_creature->getThreatManager().getThreat(m_creature->getVictim())); + } + + return false; + } + + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == CREATURE_ANCIENT_WISP) + pSummoned->AI()->AttackStart(m_creature); + else + { + pSummoned->setFaction(m_creature->getFaction()); + pSummoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + pSummoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } + + if (pSummoned->GetEntry() == CREATURE_DOOMFIRE_SPIRIT) + { + DoomfireSpiritGUID = pSummoned->GetGUID(); + } + + if (pSummoned->GetEntry() == CREATURE_DOOMFIRE) + { + pSummoned->CastSpell(pSummoned,SPELL_DOOMFIRE_SPAWN,false); + pSummoned->CastSpell(pSummoned,SPELL_DOOMFIRE,true,0,0,m_creature->GetGUID()); + + if (Unit* pDoomfireSpirit = Unit::GetUnit(*m_creature, DoomfireSpiritGUID)) + { + pSummoned->GetMotionMaster()->MoveFollow(pDoomfireSpirit,0.0f,0.0f); + DoomfireSpiritGUID = 0; + } + } + } + + //this is code doing close to what the summoning spell would do (spell 31903) + void SummonDoomfire(Unit* target) + { + m_creature->SummonCreature(CREATURE_DOOMFIRE_SPIRIT, + target->GetPositionX()+15.0,target->GetPositionY()+15.0,target->GetPositionZ(),0, + TEMPSUMMON_TIMED_DESPAWN, 27000); + + m_creature->SummonCreature(CREATURE_DOOMFIRE, + target->GetPositionX()-15.0,target->GetPositionY()-15.0,target->GetPositionZ(),0, + TEMPSUMMON_TIMED_DESPAWN, 27000); + } + + void UnleashSoulCharge() + { + m_creature->InterruptNonMeleeSpells(false); + + bool HasCast = false; + uint32 chargeSpell = 0; + uint32 unleashSpell = 0; + + switch(urand(0, 2)) + { + case 0: + chargeSpell = SPELL_SOUL_CHARGE_RED; + unleashSpell = SPELL_UNLEASH_SOUL_RED; + break; + case 1: + chargeSpell = SPELL_SOUL_CHARGE_YELLOW; + unleashSpell = SPELL_UNLEASH_SOUL_YELLOW; + break; + case 2: + chargeSpell = SPELL_SOUL_CHARGE_GREEN; + unleashSpell = SPELL_UNLEASH_SOUL_GREEN; + break; + } + + if (m_creature->HasAura(chargeSpell, 0)) + { + m_creature->RemoveSingleAuraFromStack(chargeSpell, 0); + DoCast(m_creature->getVictim(), unleashSpell); + HasCast = true; + --SoulChargeCount; + } + + if (HasCast) + SoulChargeTimer = urand(2000, 30000); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->isInCombat()) + { + if (m_pInstance) + { + // Do not let the raid skip straight to Archimonde. Visible and hostile ONLY if Azagalor is finished. + if ((m_pInstance->GetData(TYPE_AZGALOR) < DONE) && ((m_creature->GetVisibility() != VISIBILITY_OFF) || (m_creature->getFaction() != 35))) + { + m_creature->SetVisibility(VISIBILITY_OFF); + m_creature->setFaction(35); + } + else if ((m_pInstance->GetData(TYPE_AZGALOR) >= DONE) && ((m_creature->GetVisibility() != VISIBILITY_ON) || (m_creature->getFaction() == 35))) + { + m_creature->setFaction(1720); + m_creature->SetVisibility(VISIBILITY_ON); + } + } + + if (DrainNordrassilTimer < diff) + { + if (!IsChanneling) + { + Creature *temp = m_creature->SummonCreature(CREATURE_CHANNEL_TARGET, NORDRASSIL_X, NORDRASSIL_Y, NORDRASSIL_Z, 0, TEMPSUMMON_TIMED_DESPAWN, 1200000); + + if (temp) + WorldTreeGUID = temp->GetGUID(); + + if (Unit *Nordrassil = Unit::GetUnit(*m_creature, WorldTreeGUID)) + { + Nordrassil->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + Nordrassil->SetDisplayId(11686); + DoCast(Nordrassil, SPELL_DRAIN_WORLD_TREE); + IsChanneling = true; + } + } + + if (Unit *Nordrassil = Unit::GetUnit(*m_creature, WorldTreeGUID)) + { + Nordrassil->CastSpell(m_creature, SPELL_DRAIN_WORLD_TREE_2, true); + DrainNordrassilTimer = 1000; + } + }else DrainNordrassilTimer -= diff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 10) && !BelowTenPercent && !Enraged) + BelowTenPercent = true; + + if (!Enraged) + { + if (EnrageTimer < diff) + { + if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) > 10) + { + m_creature->GetMotionMaster()->Clear(false); + m_creature->GetMotionMaster()->MoveIdle(); + Enraged = true; + DoScriptText(SAY_ENRAGE, m_creature); + } + }else EnrageTimer -= diff; + + if (CheckDistanceTimer < diff) + { + // To simplify the check, we simply summon a creature in the location and then check how far we are from the creature + Creature* Check = m_creature->SummonCreature(CREATURE_CHANNEL_TARGET, NORDRASSIL_X, NORDRASSIL_Y, NORDRASSIL_Z, 0, TEMPSUMMON_TIMED_DESPAWN, 2000); + if (Check) + { + Check->SetVisibility(VISIBILITY_OFF); + + if (m_creature->IsWithinDistInMap(Check, 75)) + { + m_creature->GetMotionMaster()->Clear(false); + m_creature->GetMotionMaster()->MoveIdle(); + Enraged = true; + DoScriptText(SAY_ENRAGE, m_creature); + } + } + CheckDistanceTimer = 5000; + }else CheckDistanceTimer -= diff; + } + + if (BelowTenPercent) + { + if (!HasProtected) + { + m_creature->GetMotionMaster()->Clear(false); + m_creature->GetMotionMaster()->MoveIdle(); + + //all members of raid must get this buff + DoCast(m_creature->getVictim(), SPELL_PROTECTION_OF_ELUNE); + HasProtected = true; + Enraged = true; + } + + if (SummonWispTimer < diff) + { + DoSpawnCreature(CREATURE_ANCIENT_WISP, rand()%40, rand()%40, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + SummonWispTimer = 1500; + ++WispCount; + }else SummonWispTimer -= diff; + + if (WispCount >= 30) + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + + if (Enraged) + { + if (HandOfDeathTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_HAND_OF_DEATH); + HandOfDeathTimer = 2000; + }else HandOfDeathTimer -= diff; + return; // Don't do anything after this point. + } + + if (SoulChargeCount) + { + if (SoulChargeTimer < diff) + UnleashSoulCharge(); + else SoulChargeTimer -= diff; + } + + if (GripOfTheLegionTimer < diff) + { + DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_GRIP_OF_THE_LEGION); + GripOfTheLegionTimer = urand(5000, 25000); + }else GripOfTheLegionTimer -= diff; + + if (AirBurstTimer < diff) + { + if (!urand(0, 1)) + DoScriptText(SAY_AIR_BURST1, m_creature); + else + DoScriptText(SAY_AIR_BURST2, m_creature); + + DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_AIR_BURST); + AirBurstTimer = urand(25000, 40000); + }else AirBurstTimer -= diff; + + if (FearTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_FEAR); + FearTimer = 42000; + }else FearTimer -= diff; + + if (DoomfireTimer < diff) + { + if (!urand(0, 1)) + DoScriptText(SAY_DOOMFIRE1, m_creature); + else + DoScriptText(SAY_DOOMFIRE2, m_creature); + + Unit *temp = SelectUnit(SELECT_TARGET_RANDOM, 1); + if (!temp) + temp = m_creature->getVictim(); + + //replace with spell cast 31903 once implicitTarget 73 implemented + SummonDoomfire(temp); + + //supposedly three doomfire can be up at the same time + DoomfireTimer = 20000; + }else DoomfireTimer -= diff; + + if (MeleeRangeCheckTimer < diff) + { + if (CanUseFingerOfDeath()) + { + DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_FINGER_OF_DEATH); + MeleeRangeCheckTimer = 1000; + } + + MeleeRangeCheckTimer = 5000; + }else MeleeRangeCheckTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_archimonde(Creature* pCreature) +{ + return new boss_archimondeAI(pCreature); +} + +CreatureAI* GetAI_mob_doomfire(Creature* pCreature) +{ + return new mob_doomfireAI(pCreature); +} + +CreatureAI* GetAI_mob_doomfire_targetting(Creature* pCreature) +{ + return new mob_doomfire_targettingAI(pCreature); +} + +CreatureAI* GetAI_mob_ancient_wisp(Creature* pCreature) +{ + return new mob_ancient_wispAI(pCreature); +} + +void AddSC_boss_archimonde() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_archimonde"; + newscript->GetAI = &GetAI_boss_archimonde; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_doomfire"; + newscript->GetAI = &GetAI_mob_doomfire; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_doomfire_targetting"; + newscript->GetAI = &GetAI_mob_doomfire_targetting; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_ancient_wisp"; + newscript->GetAI = &GetAI_mob_ancient_wisp; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp new file mode 100644 index 000000000..672fe36f9 --- /dev/null +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp @@ -0,0 +1,241 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Hyjal +SD%Complete: 80 +SDComment: gossip text id's unknown +SDCategory: Caverns of Time, Mount Hyjal +EndScriptData */ + +/* ContentData +npc_jaina_proudmoore +npc_thrall +npc_tyrande_whisperwind +EndContentData */ + +#include "precompiled.h" +#include "hyjalAI.h" + +#define GOSSIP_ITEM_BEGIN_ALLY "My companions and I are with you, Lady Proudmoore." +#define GOSSIP_ITEM_ANETHERON "We are ready for whatever Archimonde might send our way, Lady Proudmoore." +#define GOSSIP_ITEM_BEGIN_HORDE "I am with you, Thrall." +#define GOSSIP_ITEM_AZGALOR "We have nothing to fear." + +#define GOSSIP_ITEM_RETREAT "We can't keep this up. Let's retreat!" + +#define GOSSIP_ITEM_TYRANDE "Aid us in defending Nordrassil" + +CreatureAI* GetAI_npc_jaina_proudmoore(Creature* pCreature) +{ + hyjalAI* pTempAI = new hyjalAI(pCreature); + + pTempAI->m_aSpells[0].m_uiSpellId = SPELL_BLIZZARD; + pTempAI->m_aSpells[0].m_uiCooldown = urand(15000, 35000); + pTempAI->m_aSpells[0].m_pType = TARGETTYPE_RANDOM; + + pTempAI->m_aSpells[1].m_uiSpellId = SPELL_PYROBLAST; + pTempAI->m_aSpells[1].m_uiCooldown = urand(2000, 9000); + pTempAI->m_aSpells[1].m_pType = TARGETTYPE_RANDOM; + + pTempAI->m_aSpells[2].m_uiSpellId = SPELL_SUMMON_ELEMENTALS; + pTempAI->m_aSpells[2].m_uiCooldown = urand(15000, 45000); + pTempAI->m_aSpells[2].m_pType = TARGETTYPE_SELF; + + return pTempAI; +} + +bool GossipHello_npc_jaina_proudmoore(Player* pPlayer, Creature* pCreature) +{ + if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) + { + if (hyjalAI* pJainaAI = dynamic_cast(pCreature->AI())) + { + if (!pJainaAI->m_bIsEventInProgress) + { + // Should not happen that jaina is here now, but for safe we check + if (pInstance->GetData(TYPE_KAZROGAL) != DONE) + { + if (pInstance->GetData(TYPE_WINTERCHILL) == NOT_STARTED) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BEGIN_ALLY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + else if (pInstance->GetData(TYPE_WINTERCHILL) == DONE && pInstance->GetData(TYPE_ANETHERON) == NOT_STARTED) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ANETHERON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + else if (pInstance->GetData(TYPE_ANETHERON) == DONE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_RETREAT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + + if (pPlayer->isGameMaster()) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_DOT, "[GM] Toggle Debug Timers", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + } + } + } + } + + pPlayer->SEND_GOSSIP_MENU(907, pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_jaina_proudmoore(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (hyjalAI* pJainaAI = dynamic_cast(pCreature->AI())) + { + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: + pJainaAI->StartEvent(); + break; + case GOSSIP_ACTION_INFO_DEF + 2: + pJainaAI->m_bIsFirstBossDead = true; + pJainaAI->m_uiWaveCount = 9; + pJainaAI->StartEvent(); + break; + case GOSSIP_ACTION_INFO_DEF + 3: + pJainaAI->Retreat(); + break; + case GOSSIP_ACTION_INFO_DEF: + pJainaAI->m_bDebugMode = !pJainaAI->m_bDebugMode; + debug_log("SD2: HyjalAI - Debug mode has been toggled"); + break; + } + } + + pPlayer->CLOSE_GOSSIP_MENU(); + return true; +} + +CreatureAI* GetAI_npc_thrall(Creature* pCreature) +{ + hyjalAI* pTempAI = new hyjalAI(pCreature); + + pTempAI->m_aSpells[0].m_uiSpellId = SPELL_CHAIN_LIGHTNING; + pTempAI->m_aSpells[0].m_uiCooldown = urand(2000, 7000); + pTempAI->m_aSpells[0].m_pType = TARGETTYPE_VICTIM; + + pTempAI->m_aSpells[1].m_uiSpellId = SPELL_FERAL_SPIRIT; + pTempAI->m_aSpells[1].m_uiCooldown = urand(6000, 41000); + pTempAI->m_aSpells[1].m_pType = TARGETTYPE_RANDOM; + + return pTempAI; +} + +bool GossipHello_npc_thrall(Player* pPlayer, Creature* pCreature) +{ + if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) + { + if (hyjalAI* pThrallAI = dynamic_cast(pCreature->AI())) + { + if (!pThrallAI->m_bIsEventInProgress) + { + // Only let them start the Horde phases if Anetheron is dead. + if (pInstance->GetData(TYPE_ANETHERON) == DONE) + { + if (pInstance->GetData(TYPE_KAZROGAL) == NOT_STARTED) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BEGIN_HORDE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + else if (pInstance->GetData(TYPE_KAZROGAL) == DONE && pInstance->GetData(TYPE_AZGALOR) == NOT_STARTED) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_AZGALOR, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + else if (pInstance->GetData(TYPE_AZGALOR) == DONE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_RETREAT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + + if (pPlayer->isGameMaster()) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_DOT, "[GM] Toggle Debug Timers", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + } + } + } + } + + pPlayer->SEND_GOSSIP_MENU(907, pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_thrall(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (hyjalAI* pThrallAI = dynamic_cast(pCreature->AI())) + { + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: + pThrallAI->StartEvent(); + break; + case GOSSIP_ACTION_INFO_DEF + 2: + pThrallAI->m_bIsFirstBossDead = true; + pThrallAI->m_uiWaveCount = 9; + pThrallAI->StartEvent(); + break; + case GOSSIP_ACTION_INFO_DEF + 3: + pThrallAI->Retreat(); + break; + case GOSSIP_ACTION_INFO_DEF: + pThrallAI->m_bDebugMode = !pThrallAI->m_bDebugMode; + debug_log("SD2: HyjalAI - Debug mode has been toggled"); + break; + } + } + + pPlayer->CLOSE_GOSSIP_MENU(); + return true; +} + +bool GossipHello_npc_tyrande_whisperwind(Player* pPlayer, Creature* pCreature) +{ + if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) + { + // Only let them get item if Azgalor is dead. + if (pInstance->GetData(TYPE_AZGALOR) == DONE && !pPlayer->HasItemCount(ITEM_TEAR_OF_GODDESS,1)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TYRANDE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + } + + pPlayer->SEND_GOSSIP_MENU(907, pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_tyrande_whisperwind(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF) + { + ItemPosCountVec vDest; + uint8 uiMsg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, vDest, ITEM_TEAR_OF_GODDESS, 1); + + if (uiMsg == EQUIP_ERR_OK) + pPlayer->StoreNewItem(vDest, ITEM_TEAR_OF_GODDESS, true); + } + + pPlayer->CLOSE_GOSSIP_MENU(); + return true; +} + +void AddSC_hyjal() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_jaina_proudmoore"; + newscript->GetAI = &GetAI_npc_jaina_proudmoore; + newscript->pGossipHello = &GossipHello_npc_jaina_proudmoore; + newscript->pGossipSelect = &GossipSelect_npc_jaina_proudmoore; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_thrall"; + newscript->GetAI = &GetAI_npc_thrall; + newscript->pGossipHello = &GossipHello_npc_thrall; + newscript->pGossipSelect = &GossipSelect_npc_thrall; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_tyrande_whisperwind"; + newscript->pGossipHello = &GossipHello_npc_tyrande_whisperwind; + newscript->pGossipSelect = &GossipSelect_npc_tyrande_whisperwind; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h new file mode 100644 index 000000000..be0e004c7 --- /dev/null +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h @@ -0,0 +1,71 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_HYJAL_H +#define DEF_HYJAL_H + +#define ERROR_INST_DATA "SD2: Instance data not set properly for Mount Hyjal. Encounters will be buggy" + +enum eNPC +{ + NPC_JAINA = 17772, + NPC_THRALL = 17852, + NPC_TYRANDE = 17948, + + // Bosses summoned after every 8 waves + NPC_WINTERCHILL = 17767, + NPC_ANETHERON = 17808, + NPC_KAZROGAL = 17888, + NPC_AZGALOR = 17842, + NPC_ARCHIMONDE = 17968, + + // Trash Mobs summoned in waves + NPC_NECRO = 17899, + NPC_ABOMI = 17898, + NPC_GHOUL = 17895, + NPC_BANSH = 17905, + NPC_CRYPT = 17897, + NPC_GARGO = 17906, + NPC_FROST = 17907, + NPC_GIANT = 17908, + NPC_STALK = 17916, + + NPC_WATER_ELEMENTAL = 18001, + NPC_DIRE_WOLF = 17854, + + GO_ANCIENT_GEM = 185557 +}; + +enum +{ + MAX_ENCOUNTER = 5, + + WORLD_STATE_WAVES = 2842, + WORLD_STATE_ENEMY = 2453, + WORLD_STATE_ENEMYCOUNT = 2454, + + // ACID scripted, don't touch id's (or provide update for ACID) + TYPE_WINTERCHILL = 11, + TYPE_ANETHERON = 2, + TYPE_KAZROGAL = 9, + TYPE_AZGALOR = 6, + + TYPE_ARCHIMONDE = 4, + + DATA_ANETHERON = 1, + DATA_RAGEWINTERCHILL = 10, + DATA_AZGALOR = 5, + DATA_KAZROGAL = 8, + + DATA_ARCHIMONDE = 3, + DATA_JAINAPROUDMOORE = 7, + DATA_THRALL = 12, + DATA_TYRANDEWHISPERWIND = 13, + + DATA_TRASH = 14, + DATA_RESET_TRASH_COUNT = 15, + TYPE_RETREAT = 16 +}; + +#endif diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp new file mode 100644 index 000000000..50ece378b --- /dev/null +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp @@ -0,0 +1,496 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: HyjalAI +SD%Complete: 90 +SDComment: +SDCategory: Caverns of Time, Mount Hyjal +EndScriptData */ + +#include "precompiled.h" +#include "hyjalAI.h" + +struct sHyjalLocation +{ + eBaseArea m_pBaseArea; + float m_fX, m_fY, m_fZ; +}; + +// Locations for summoning waves +sHyjalLocation m_aHyjalSpawnLoc[]= +{ + {BASE_ALLY, 4979.010, -1709.134, 1339.674}, + {BASE_ALLY, 4969.123, -1705.904, 1341.363}, + {BASE_ALLY, 4970.260, -1698.546, 1341.200}, + {BASE_ALLY, 4975.262, -1698.239, 1341.427}, + {BASE_HORDE, 5557.582, -2587.159, 1481.644}, + {BASE_HORDE, 5545.901, -2582.246, 1479.256}, + {BASE_HORDE, 5565.642, -2565.666, 1481.635}, + {BASE_HORDE, 5547.218, -2574.589, 1479.194} +}; + +// used to inform the wave where to move +sHyjalLocation m_aHyjalWaveMoveTo[]= +{ + {BASE_ALLY, 5018.654, -1752.074, 1322.203}, + {BASE_HORDE, 5504.569, -2688.489, 1479.991} +}; + +struct sHyjalYells +{ + uint32 uiCreatureEntry; + YellType m_pYellType; // Used to determine the type of yell (attack, rally, etc) + int32 m_iTextId; // The text id to be yelled +}; + +sHyjalYells m_aHyjalYell[]= +{ + {NPC_JAINA, ATTACKED, -1534000}, + {NPC_JAINA, ATTACKED, -1534001}, + {NPC_JAINA, INCOMING, -1534002}, + {NPC_JAINA, BEGIN, -1534003}, + {NPC_JAINA, RALLY, -1534004}, + {NPC_JAINA, RALLY, -1534005}, + {NPC_JAINA, FAILURE, -1534006}, + {NPC_JAINA, SUCCESS, -1534007}, + {NPC_JAINA, DEATH, -1534008}, + + {NPC_THRALL, ATTACKED, -1534009}, + {NPC_THRALL, ATTACKED, -1534010}, + {NPC_THRALL, INCOMING, -1534011}, + {NPC_THRALL, BEGIN, -1534012}, + {NPC_THRALL, RALLY, -1534013}, + {NPC_THRALL, RALLY, -1534014}, + {NPC_THRALL, FAILURE, -1534015}, + {NPC_THRALL, SUCCESS, -1534016}, + {NPC_THRALL, DEATH, -1534017} +}; + +void hyjalAI::Reset() +{ + // GUIDs + m_uiBossGUID[0] = 0; + m_uiBossGUID[1] = 0; + + // Timers + m_uiNextWaveTimer = 10000; + m_uiWaveMoveTimer = 15000; + m_uiCheckTimer = 0; + m_uiRetreatTimer = 25000; + + // Misc + m_uiWaveCount = 0; + m_uiEnemyCount = 0; + + // Set base area based on creature entry + switch(m_creature->GetEntry()) + { + case NPC_JAINA: + m_uiBase = BASE_ALLY; + DoCast(m_creature, SPELL_BRILLIANCE_AURA, true); + break; + case NPC_THRALL: + m_uiBase = BASE_HORDE; + break; + } + + // Bools + m_bIsEventInProgress = false; + m_bIsSummoningWaves = false; + + m_bIsRetreating = false; + m_bDebugMode = false; + + // Flags + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + + // Reset World States + m_pInstance->DoUpdateWorldState(WORLD_STATE_WAVES, 0); + m_pInstance->DoUpdateWorldState(WORLD_STATE_ENEMY, 0); + m_pInstance->DoUpdateWorldState(WORLD_STATE_ENEMYCOUNT, 0); + + if (!m_pInstance) + return; + + m_bIsFirstBossDead = m_uiBase ? m_pInstance->GetData(TYPE_KAZROGAL) : m_pInstance->GetData(TYPE_WINTERCHILL); + m_bIsSecondBossDead = m_uiBase ? m_pInstance->GetData(TYPE_AZGALOR) : m_pInstance->GetData(TYPE_ANETHERON); + + // Reset Instance Data for trash count + m_pInstance->SetData(DATA_RESET_TRASH_COUNT, 0); +} + +void hyjalAI::EnterEvadeMode() +{ + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->LoadCreaturesAddon(); + + if (m_creature->isAlive()) + m_creature->GetMotionMaster()->MoveTargetedHome(); + + m_creature->SetLootRecipient(NULL); +} + +void hyjalAI::JustReachedHome() +{ + if (m_uiBase == BASE_ALLY) + DoCast(m_creature, SPELL_BRILLIANCE_AURA, true); + + m_bIsFirstBossDead = m_uiBase ? m_pInstance->GetData(TYPE_KAZROGAL) : m_pInstance->GetData(TYPE_WINTERCHILL); + m_bIsSecondBossDead = m_uiBase ? m_pInstance->GetData(TYPE_AZGALOR) : m_pInstance->GetData(TYPE_ANETHERON); +} + +void hyjalAI::Aggro(Unit *who) +{ + for(uint8 i = 0; i < MAX_SPELL; ++i) + if (m_aSpells[i].m_uiCooldown) + m_uiSpellTimer[i] = m_aSpells[i].m_uiCooldown; + + DoTalk(ATTACKED); +} + +void hyjalAI::SpawnCreatureForWave(uint32 uiMobEntry) +{ + sHyjalLocation* pSpawn = NULL; + + uint32 uiMaxCount = sizeof(m_aHyjalSpawnLoc)/sizeof(sHyjalLocation); + uint32 uiRandId = urand(1, uiMaxCount/2); //unsafe, if array becomes uneven. + + uint32 uiJ = 0; + + for (uint32 i = 0; i < uiMaxCount; ++i) + { + if (m_aHyjalSpawnLoc[i].m_pBaseArea != m_uiBase) + continue; + + ++uiJ; + + if (uiJ == uiRandId) + { + pSpawn = &m_aHyjalSpawnLoc[i]; + break; + } + } + + if (pSpawn) + m_creature->SummonCreature(uiMobEntry, pSpawn->m_fX, pSpawn->m_fY, pSpawn->m_fZ, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 120000); +} + +void hyjalAI::JustSummoned(Creature* pSummoned) +{ + // not interesting for us + if (pSummoned->GetEntry() == NPC_WATER_ELEMENTAL || pSummoned->GetEntry() == NPC_DIRE_WOLF) + return; + + // Increment Enemy Count to be used in World States and instance script + ++m_uiEnemyCount; + + sHyjalLocation* pMove = NULL; + + uint32 uiMaxCount = sizeof(m_aHyjalWaveMoveTo)/sizeof(sHyjalLocation); + + for (uint32 i = 0; i < uiMaxCount; ++i) + { + if (m_aHyjalWaveMoveTo[i].m_pBaseArea != m_uiBase) + continue; + + pMove = &m_aHyjalWaveMoveTo[i]; + break; + } + + if (pMove) + { + float fX, fY, fZ; + pSummoned->GetRandomPoint(pMove->m_fX, pMove->m_fY, pMove->m_fZ, 10.0f, fX, fY, fZ); + + pSummoned->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + pSummoned->GetMotionMaster()->MovePoint(0, fX, fY, fZ); + } + + // Check if creature is a boss. + if (pSummoned->isWorldBoss()) + { + if (!m_bIsFirstBossDead) + m_uiBossGUID[0] = pSummoned->GetGUID(); + else + m_uiBossGUID[1] = pSummoned->GetGUID(); + + m_uiCheckTimer = 5000; + } + else + lWaveMobGUIDList.push_back(pSummoned->GetGUID()); +} + +void hyjalAI::SummonNextWave() +{ + // 1 in 4 chance we give a rally yell. Not sure if the chance is offilike. + if (!urand(0, 3)) + DoTalk(RALLY); + + if (!m_pInstance) + { + error_log(ERROR_INST_DATA); + return; + } + + sHyjalWave* pWaveData = m_uiBase ? &m_aHyjalWavesHorde[m_uiWaveCount] : &m_aHyjalWavesAlliance[m_uiWaveCount]; + + if (!pWaveData) + { + error_log("SD2: hyjalAI not able to obtain wavedata for SummonNextWave."); + return; + } + + m_uiEnemyCount = m_pInstance->GetData(DATA_TRASH); + + for(uint8 i = 0; i < MAX_WAVE_MOB; ++i) + { + if (pWaveData->m_auiMobEntry[i]) + SpawnCreatureForWave(pWaveData->m_auiMobEntry[i]); + } + + if (!pWaveData->m_bIsBoss) + { + uint32 stateValue = m_uiWaveCount+1; + + if (m_bIsFirstBossDead) + stateValue -= MAX_WAVES; // Subtract 9 from it to give the proper wave number if we are greater than 8 + + // Set world state to our current wave number + m_pInstance->DoUpdateWorldState(WORLD_STATE_WAVES, stateValue); + // Enable world state + m_pInstance->DoUpdateWorldState(WORLD_STATE_ENEMY, 1); + + m_pInstance->SetData(DATA_TRASH, m_uiEnemyCount); // Send data for instance script to update count + + if (!m_bDebugMode) + m_uiNextWaveTimer = pWaveData->m_uiWaveTimer; + else + { + m_uiNextWaveTimer = 15000; + debug_log("SD2: HyjalAI: debug mode is enabled. Next Wave in 15 seconds"); + } + } + else + { + // Set world state for waves to 0 to disable it. + m_pInstance->DoUpdateWorldState(WORLD_STATE_WAVES, 0); + m_pInstance->DoUpdateWorldState(WORLD_STATE_ENEMY, 1); + + // Set World State for enemies invading to 1. + m_pInstance->DoUpdateWorldState(WORLD_STATE_ENEMYCOUNT, 1); + + m_bIsSummoningWaves = false; + } + + m_uiWaveMoveTimer = 15000; + m_uiCheckTimer = 5000; + ++m_uiWaveCount; +} + +void hyjalAI::StartEvent() +{ + if (!m_pInstance) + return; + + DoTalk(BEGIN); + + m_bIsEventInProgress = true; + m_bIsSummoningWaves = true; + + m_uiNextWaveTimer = 10000; + m_uiCheckTimer = 5000; + + m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + + m_pInstance->DoUpdateWorldState(WORLD_STATE_WAVES, 0); + m_pInstance->DoUpdateWorldState(WORLD_STATE_ENEMY, 0); + m_pInstance->DoUpdateWorldState(WORLD_STATE_ENEMYCOUNT, 0); +} + +void hyjalAI::DoTalk(YellType pYellType) +{ + sHyjalYells* pYell = NULL; + + uint32 uiMaxCount = sizeof(m_aHyjalYell)/sizeof(sHyjalYells); + bool bGetNext = false; + + for (uint32 i = 0; i < uiMaxCount; ++i) + { + if (m_aHyjalYell[i].uiCreatureEntry == m_creature->GetEntry() && m_aHyjalYell[i].m_pYellType == pYellType) + { + //this would not be safe unless we knew these had two entries in m_aYell + if (pYellType == ATTACKED || pYellType== RALLY) + { + if (!bGetNext && urand(0, 1)) + { + bGetNext = true; + continue; + } + } + + pYell = &m_aHyjalYell[i]; + break; + } + } + + if (pYell) + DoScriptText(pYell->m_iTextId, m_creature); +} + +void hyjalAI::SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) +{ + //TODO: this spell should cause misc mobs to despawn + //if (pSpell->Id == SPELL_MASS_TELEPORT && pTarget->GetTypeId() != TYPEID_PLAYER) + //{ + //despawn; + //} +} + +void hyjalAI::Retreat() +{ + //this will trigger ancient gem respawn + if (m_pInstance) + m_pInstance->SetData(TYPE_RETREAT, SPECIAL); + + DoCast(m_creature, SPELL_MASS_TELEPORT); + + m_bIsRetreating = true; +} + +void hyjalAI::JustDied(Unit* pKiller) +{ + DoTalk(DEATH); + + //TODO: in case they die during boss encounter, then what? despawn boss? +} + +void hyjalAI::UpdateAI(const uint32 uiDiff) +{ + if (!m_bIsEventInProgress) + return; + + if (m_bIsSummoningWaves && m_pInstance) + { + if (m_uiWaveMoveTimer < uiDiff) + { + // Skip the master timer, and start next wave in 5. Clear the list, it should not be any here now. + if (!m_pInstance->GetData(DATA_TRASH)) + { + lWaveMobGUIDList.clear(); + m_uiNextWaveTimer = 5000; + } + + if (!lWaveMobGUIDList.empty()) + { + for(std::list::iterator itr = lWaveMobGUIDList.begin(); itr != lWaveMobGUIDList.end(); ++itr) + { + if (Creature* pTemp = m_pInstance->instance->GetCreature(*itr)) + { + if (!pTemp->isAlive() || pTemp->getVictim()) + continue; + + pTemp->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->GetMotionMaster()->MovePoint(1, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); + } + } + } + m_uiWaveMoveTimer = 10000; + } + else + m_uiWaveMoveTimer -= uiDiff; + + if (m_uiNextWaveTimer < uiDiff) + SummonNextWave(); + else + m_uiNextWaveTimer -= uiDiff; + } + + if (m_uiCheckTimer < uiDiff) + { + for(uint8 i = 0; i < 2; ++i) + { + if (m_uiBossGUID[i]) + { + Unit* pUnit = Unit::GetUnit(*m_creature, m_uiBossGUID[i]); + + if (pUnit && !pUnit->isAlive()) + { + if (m_uiBossGUID[i] == m_uiBossGUID[0]) + { + DoTalk(INCOMING); + m_bIsFirstBossDead = true; + } + else if (m_uiBossGUID[i] == m_uiBossGUID[1]) + { + DoTalk(SUCCESS); + m_bIsSecondBossDead = true; + } + + m_bIsEventInProgress = false; + m_uiCheckTimer = 0; + + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + + m_uiBossGUID[i] = 0; + + // Reset world state for enemies to disable it + m_pInstance->DoUpdateWorldState(WORLD_STATE_ENEMY, 0); + } + } + } + + m_uiCheckTimer = 5000; + } + else + m_uiCheckTimer -= uiDiff; + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + for(uint8 i = 0; i < MAX_SPELL; ++i) + { + if (m_aSpells[i].m_uiSpellId) + { + if (m_uiSpellTimer[i] < uiDiff) + { + if (m_creature->IsNonMeleeSpellCasted(false)) + m_creature->InterruptNonMeleeSpells(false); + + Unit* pTarget = NULL; + + switch(m_aSpells[i].m_pType) + { + case TARGETTYPE_SELF: pTarget = m_creature; break; + case TARGETTYPE_RANDOM: pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); break; + case TARGETTYPE_VICTIM: pTarget = m_creature->getVictim(); break; + } + + if (pTarget) + { + DoCast(pTarget, m_aSpells[i].m_uiSpellId); + m_uiSpellTimer[i] = m_aSpells[i].m_uiCooldown; + } + } + else + m_uiSpellTimer[i] -= uiDiff; + } + } + + DoMeleeAttackIfReady(); +} diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h new file mode 100644 index 000000000..5bfba4876 --- /dev/null +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h @@ -0,0 +1,199 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef SC_HYJALAI_H +#define SC_HYJALAI_H + +#include "hyjal.h" + +enum eBaseArea +{ + BASE_ALLY = 0, + BASE_HORDE = 1 +}; + +enum eMisc +{ + MAX_SPELL = 3, + MAX_WAVES = 9, + MAX_WAVE_MOB = 18, + + ITEM_TEAR_OF_GODDESS = 24494 +}; + +enum eSpell +{ + SPELL_MASS_TELEPORT = 16807, + + // Spells for Jaina + SPELL_BRILLIANCE_AURA = 31260, + SPELL_BLIZZARD = 31266, + SPELL_PYROBLAST = 31263, + SPELL_SUMMON_ELEMENTALS = 31264, + + // Thrall spells + SPELL_CHAIN_LIGHTNING = 31330, + SPELL_FERAL_SPIRIT = 31331 +}; + +struct sHyjalWave +{ + uint32 m_auiMobEntry[MAX_WAVE_MOB]; // Stores Creature Entries to be summoned in Waves + uint32 m_uiWaveTimer; // The timer before the next wave is summoned + bool m_bIsBoss; // Simply used to inform the wave summoner that the next wave contains a boss to halt all waves after that +}; + +// Waves that will be summoned in the Alliance Base +static sHyjalWave m_aHyjalWavesAlliance[]= +{ + // Rage Winterchill Wave 1-8 + {NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, 0, 0, 0, 0, 0, 0, 0, 0, 120000, false}, + {NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, 0, 0, 0, 0, 0, 0, 120000, false}, + {NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, 0, 0, 0, 0, 0, 0, 120000, false}, + {NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0, 0, 0, 120000, false}, + {NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0, 0, 0, 120000, false}, + {NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, 0, 0, 0, 0, 0, 120000, false}, + {NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, 0, 0, 0, 0, 0, 0, 120000, false}, + {NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_ABOMI, NPC_ABOMI, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0, 180000, false}, + // All 8 Waves are summoned, summon Rage Winterchill, next few waves are for Anetheron + {NPC_WINTERCHILL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, true}, + // Anetheron Wave 1-8 + {NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, 0, 0, 0, 0, 0, 0, 0, 0, 120000, false}, + {NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, 0, 0, 0, 0, 0, 0, 120000, false}, + {NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0, 0, 0, 120000, false}, + {NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_BANSH, NPC_BANSH, NPC_BANSH, NPC_BANSH, 0, 0, 0, 0, 0, 0, 120000, false}, + {NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_NECRO, NPC_NECRO, NPC_BANSH, NPC_BANSH, NPC_BANSH, NPC_BANSH, 0, 0, 0, 0, 0, 0, 120000, false}, + {NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_ABOMI, NPC_ABOMI, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0, 0, 0, 120000, false}, + {NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_BANSH, NPC_BANSH, NPC_BANSH, NPC_BANSH, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, 0, 0, 0, 0, 0, 0, 120000, false}, + {NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_BANSH, NPC_BANSH, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0, 180000, false}, + // All 8 Waves are summoned, summon Anatheron + {NPC_ANETHERON, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, true} +}; + +// Waves that are summoned in the Horde base +static sHyjalWave m_aHyjalWavesHorde[]= +{ + // Kaz'Rogal Wave 1-8 + {NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_BANSH, NPC_BANSH, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0, 0, 0, 120000, false}, + {NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, 0, 0, 0, 0, 120000, false}, + {NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0, 120000, false}, + {NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0, 120000, false}, + {NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0, 0, 0, 120000, false}, + {NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_FROST, 0, 0, 120000, false}, + {NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_FROST, 0, 0, 120000, false}, + {NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_NECRO, NPC_NECRO, NPC_BANSH, NPC_BANSH, 180000, false}, + // All 8 Waves are summoned, summon Kaz'Rogal, next few waves are for Azgalor + {NPC_KAZROGAL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, true}, + // Azgalor Wave 1-8 + {NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0, 0, 0, 120000, false}, + {NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_FROST, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, NPC_GARGO, 0, 0, 0, 0, 120000, false}, + {NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GHOUL, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, 0, 0, 0, 0, 120000, false}, + {NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_STALK, NPC_STALK, NPC_STALK, NPC_STALK, NPC_STALK, NPC_STALK, 0, 0, 0, 0, 120000, false}, + {NPC_STALK, NPC_STALK, NPC_STALK, NPC_STALK, NPC_STALK, NPC_STALK, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, 0, 0, 0, 0, 120000, false}, + {NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_NECRO, NPC_BANSH, NPC_BANSH, NPC_BANSH, NPC_BANSH, NPC_BANSH, NPC_BANSH, 0, 0, 0, 0, 120000, false}, + {NPC_GHOUL, NPC_GHOUL, NPC_CRYPT, NPC_CRYPT, NPC_STALK, NPC_STALK, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, NPC_GIANT, 0, 0, 0, 0, 0, 0, 120000, false}, + {NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_CRYPT, NPC_STALK, NPC_STALK, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_ABOMI, NPC_BANSH, NPC_BANSH, NPC_BANSH, NPC_BANSH, NPC_NECRO, NPC_NECRO, 0, 0, 180000, false}, + // All 8 Waves are summoned, summon Azgalor + {NPC_AZGALOR, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, true} +}; + +enum TargetType // Used in the spell cast system for the AI +{ + TARGETTYPE_SELF = 0, + TARGETTYPE_RANDOM = 1, + TARGETTYPE_VICTIM = 2, +}; + +enum YellType +{ + ATTACKED = 0, // Used when attacked and set in combat + BEGIN = 1, // Used when the event is begun + INCOMING = 2, // Used to warn the raid that another wave phase is coming + RALLY = 3, // Used to rally the raid and warn that the next wave has been summoned + FAILURE = 4, // Used when raid has failed (unsure where to place) + SUCCESS = 5, // Used when the raid has sucessfully defeated a wave phase + DEATH = 6, // Used on death +}; + +struct MANGOS_DLL_DECL hyjalAI : public ScriptedAI +{ + hyjalAI(Creature* pCreature) : ScriptedAI(pCreature) + { + memset(m_aSpells, 0, sizeof(m_aSpells)); + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + // Generically used to reset our variables. Do *not* call in EnterEvadeMode as this may make problems if the raid is still in combat + void Reset(); + + // Send creature back to spawn location and evade. + void EnterEvadeMode(); + + // Called when creature reached home location after evade. + void JustReachedHome(); + + // Used to reset cooldowns for our spells and to inform the raid that we're under attack + void Aggro(Unit* pWho); + + // Called to summon waves, check for boss deaths and to cast our spells. + void UpdateAI(const uint32 uiDiff); + + // Called on death, informs the raid that they have failed. + void JustDied(Unit* pKiller); + + // "Teleport" all friendly creatures away from the base. + void Retreat(); + + // Summons a creature for that wave in that base + void SpawnCreatureForWave(uint32 uiMobEntry); + + void JustSummoned(Creature*); + + // Summons the next wave, calls SummonCreature + void SummonNextWave(); + + // Begins the event by gossip click + void StartEvent(); + + // Searches for the appropriate yell and sound and uses it to inform the raid of various things + void DoTalk(YellType pYellType); + + // Used to filter who to despawn after mass teleport + void SpellHitTarget(Unit*, const SpellEntry*); + + public: + + ScriptedInstance* m_pInstance; + + uint64 m_uiBossGUID[2]; + + uint32 m_uiNextWaveTimer; + uint32 m_uiWaveCount; + uint32 m_uiWaveMoveTimer; + uint32 m_uiCheckTimer; + uint32 m_uiEnemyCount; + uint32 m_uiRetreatTimer; + uint32 m_uiBase; + + bool m_bIsEventInProgress; + bool m_bIsFirstBossDead; + bool m_bIsSecondBossDead; + bool m_bIsSummoningWaves; + bool m_bIsRetreating; + bool m_bDebugMode; + + struct sSpells + { + uint32 m_uiSpellId; + uint32 m_uiCooldown; + TargetType m_pType; + } m_aSpells[MAX_SPELL]; + + private: + uint32 m_uiSpellTimer[MAX_SPELL]; + std::list lWaveMobGUIDList; +}; + +#endif diff --git a/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp b/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp new file mode 100644 index 000000000..63cdb7ad1 --- /dev/null +++ b/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp @@ -0,0 +1,244 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance_Mount_Hyjal +SD%Complete: 100 +SDComment: Instance Data Scripts and functions to acquire mobs and set encounter status for use in various Hyjal Scripts +SDCategory: Caverns of Time, Mount Hyjal +EndScriptData */ + +#include "precompiled.h" +#include "hyjal.h" + +/* Battle of Mount Hyjal encounters: +0 - Rage Winterchill event +1 - Anetheron event +2 - Kaz'rogal event +3 - Azgalor event +4 - Archimonde event +*/ + +struct MANGOS_DLL_DECL instance_mount_hyjal : public ScriptedInstance +{ + instance_mount_hyjal(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string strSaveData; + + std::list lAncientGemGUIDList; + + uint64 m_uiRageWinterchill; + uint64 m_uiAnetheron; + uint64 m_uiKazrogal; + uint64 m_uiAzgalor; + uint64 m_uiArchimonde; + uint64 m_uiJainaProudmoore; + uint64 m_uiThrall; + uint64 m_uiTyrandeWhisperwind; + + uint32 m_uiTrashCount; + + void Initialize() + { + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + + lAncientGemGUIDList.clear(); + + m_uiRageWinterchill = 0; + m_uiAnetheron = 0; + m_uiKazrogal = 0; + m_uiAzgalor = 0; + m_uiArchimonde = 0; + m_uiJainaProudmoore = 0; + m_uiThrall = 0; + m_uiTyrandeWhisperwind = 0; + + m_uiTrashCount = 0; + } + + bool IsEncounterInProgress() const + { + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + if (m_auiEncounter[i] == IN_PROGRESS) return true; + + return false; + } + + void OnCreatureCreate(Creature* pCreature) + { + switch(pCreature->GetEntry()) + { + case NPC_WINTERCHILL: m_uiRageWinterchill = pCreature->GetGUID(); break; + case NPC_ANETHERON: m_uiAnetheron = pCreature->GetGUID(); break; + case NPC_KAZROGAL: m_uiKazrogal = pCreature->GetGUID(); break; + case NPC_AZGALOR: m_uiAzgalor = pCreature->GetGUID(); break; + case NPC_ARCHIMONDE: m_uiArchimonde = pCreature->GetGUID(); break; + case NPC_JAINA: m_uiJainaProudmoore = pCreature->GetGUID(); break; + case NPC_THRALL: m_uiThrall = pCreature->GetGUID(); break; + case NPC_TYRANDE: m_uiTyrandeWhisperwind = pCreature->GetGUID(); break; + } + } + + void OnObjectCreate(GameObject* pGo) + { + if (pGo->GetEntry() == GO_ANCIENT_GEM) + lAncientGemGUIDList.push_back(pGo->GetGUID()); + } + + uint64 GetData64(uint32 uiData) + { + switch(uiData) + { + case DATA_RAGEWINTERCHILL: return m_uiRageWinterchill; + case DATA_ANETHERON: return m_uiAnetheron; + case DATA_KAZROGAL: return m_uiKazrogal; + case DATA_AZGALOR: return m_uiAzgalor; + case DATA_ARCHIMONDE: return m_uiArchimonde; + case DATA_JAINAPROUDMOORE: return m_uiJainaProudmoore; + case DATA_THRALL: return m_uiThrall; + case DATA_TYRANDEWHISPERWIND: return m_uiTyrandeWhisperwind; + } + + return 0; + } + + void SetData(uint32 uiType, uint32 uiData) + { + switch(uiType) + { + case TYPE_WINTERCHILL: + if (m_auiEncounter[0] == DONE) + return; + m_auiEncounter[0] = uiData; + break; + case TYPE_ANETHERON: + if (m_auiEncounter[1] == DONE) + return; + m_auiEncounter[1] = uiData; + break; + case TYPE_KAZROGAL: + if (m_auiEncounter[2] == DONE) + return; + m_auiEncounter[2] = uiData; + break; + case TYPE_AZGALOR: + if (m_auiEncounter[3] == DONE) + return; + m_auiEncounter[3] = uiData; + break; + case TYPE_ARCHIMONDE: + m_auiEncounter[4] = uiData; + break; + + case DATA_RESET_TRASH_COUNT: + m_uiTrashCount = 0; + break; + + case DATA_TRASH: + if (uiData) + m_uiTrashCount = uiData; + else + --m_uiTrashCount; + + DoUpdateWorldState(WORLD_STATE_ENEMYCOUNT, m_uiTrashCount); + break; + + case TYPE_RETREAT: + if (uiData == SPECIAL) + { + if (!lAncientGemGUIDList.empty()) + { + for(std::list::iterator itr = lAncientGemGUIDList.begin(); itr != lAncientGemGUIDList.end(); ++itr) + { + //don't know how long it expected + DoRespawnGameObject(*itr,DAY); + } + } + } + break; + } + + debug_log("SD2: Instance Hyjal: Instance data updated for event %u (Data=%u)", uiType, uiData); + + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " + << m_auiEncounter[3] << " " << m_auiEncounter[4]; + + strSaveData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } + } + + uint32 GetData(uint32 uiType) + { + switch(uiType) + { + case TYPE_WINTERCHILL: return m_auiEncounter[0]; + case TYPE_ANETHERON: return m_auiEncounter[1]; + case TYPE_KAZROGAL: return m_auiEncounter[2]; + case TYPE_AZGALOR: return m_auiEncounter[3]; + case TYPE_ARCHIMONDE: return m_auiEncounter[4]; + case DATA_TRASH: return m_uiTrashCount; + } + return 0; + } + + const char* Save() + { + return strSaveData.c_str(); + } + + void Load(const char* in) + { + if (!in) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(in); + + std::istringstream loadStream(in); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] >> m_auiEncounter[4]; + + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + if (m_auiEncounter[i] == IN_PROGRESS) // Do not load an encounter as IN_PROGRESS - reset it instead. + m_auiEncounter[i] = NOT_STARTED; + + OUT_LOAD_INST_DATA_COMPLETE; + } +}; + +InstanceData* GetInstanceData_instance_mount_hyjal(Map* pMap) +{ + return new instance_mount_hyjal(pMap); +} + +void AddSC_instance_mount_hyjal() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "instance_hyjal"; + newscript->GetInstanceData = &GetInstanceData_instance_mount_hyjal; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_captain_skarloc.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_captain_skarloc.cpp new file mode 100644 index 000000000..2897390d8 --- /dev/null +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_captain_skarloc.cpp @@ -0,0 +1,152 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Captain_Skarloc +SD%Complete: 75 +SDComment: Missing adds, missing waypoints to move up to Thrall once spawned + speech before enter combat. +SDCategory: Caverns of Time, Old Hillsbrad Foothills +EndScriptData */ + +#include "precompiled.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 + +struct MANGOS_DLL_DECL boss_captain_skarlocAI : public ScriptedAI +{ + boss_captain_skarlocAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 Holy_Light_Timer; + uint32 Cleanse_Timer; + uint32 HammerOfJustice_Timer; + uint32 HolyShield_Timer; + uint32 DevotionAura_Timer; + uint32 Consecration_Timer; + + void Reset() + { + Holy_Light_Timer = 30000; + Cleanse_Timer = 10000; + HammerOfJustice_Timer = 60000; + HolyShield_Timer = 240000; + DevotionAura_Timer = 3000; + Consecration_Timer = 8000; + } + + void Aggro(Unit *who) + { + //This is not correct. Should taunt Thrall before engage in combat + DoScriptText(SAY_TAUNT1, m_creature); + DoScriptText(SAY_TAUNT2, m_creature); + } + + void KilledUnit(Unit *victim) + { + DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); + } + + void JustDied(Unit *victim) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance && m_pInstance->GetData(TYPE_THRALL_EVENT) == IN_PROGRESS) + m_pInstance->SetData(TYPE_THRALL_PART1, DONE); + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Holy_Light + if (Holy_Light_Timer < diff) + { + DoCast(m_creature, SPELL_HOLY_LIGHT); + Holy_Light_Timer = urand(20000, 30000); + }else Holy_Light_Timer -= diff; + + //Cleanse + if (Cleanse_Timer < diff) + { + DoCast(m_creature, SPELL_CLEANSE); + Cleanse_Timer = 10000; + } else Cleanse_Timer -= diff; + + //Hammer of Justice + if (HammerOfJustice_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_HAMMER_OF_JUSTICE); + HammerOfJustice_Timer = urand(20000, 35000); + }else HammerOfJustice_Timer -= diff; + + //Holy Shield + if (HolyShield_Timer < diff) + { + DoCast(m_creature, SPELL_HOLY_SHIELD); + HolyShield_Timer = 240000; + }else HolyShield_Timer -= diff; + + //Devotion_Aura + if (DevotionAura_Timer < diff) + { + DoCast(m_creature, SPELL_DEVOTION_AURA); + DevotionAura_Timer = urand(45000, 55000); + }else DevotionAura_Timer -= diff; + + //Consecration + if (Consecration_Timer < diff) + { + //DoCast(m_creature->getVictim(), SPELL_CONSECRATION); + Consecration_Timer = urand(5000, 10000); + }else Consecration_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_captain_skarloc(Creature* pCreature) +{ + return new boss_captain_skarlocAI(pCreature); +} + +void AddSC_boss_captain_skarloc() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_captain_skarloc"; + newscript->GetAI = &GetAI_boss_captain_skarloc; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_epoch_hunter.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_epoch_hunter.cpp new file mode 100644 index 000000000..560ea32c3 --- /dev/null +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_epoch_hunter.cpp @@ -0,0 +1,138 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Epoch_Hunter +SD%Complete: 60 +SDComment: Missing spawns pre-event, missing speech to be coordinated with rest of escort event. +SDCategory: Caverns of Time, Old Hillsbrad Foothills +EndScriptData */ + +#include "precompiled.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 + +struct MANGOS_DLL_DECL boss_epoch_hunterAI : public ScriptedAI +{ + boss_epoch_hunterAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 SandBreath_Timer; + uint32 ImpendingDeath_Timer; + uint32 WingBuffet_Timer; + uint32 Mda_Timer; + + void Reset() + { + SandBreath_Timer = urand(8000, 16000); + ImpendingDeath_Timer = urand(25000, 30000); + WingBuffet_Timer = 35000; + Mda_Timer = 40000; + } + + void Aggro(Unit *who) + { + DoScriptText(urand(0, 1) ? SAY_AGGRO1 : SAY_AGGRO2, m_creature); + } + + void KilledUnit(Unit *victim) + { + DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); + } + + void JustDied(Unit *victim) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance && m_pInstance->GetData(TYPE_THRALL_EVENT) == IN_PROGRESS) + m_pInstance->SetData(TYPE_THRALL_PART4, DONE); + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Sand Breath + if (SandBreath_Timer < diff) + { + if (m_creature->IsNonMeleeSpellCasted(false)) + m_creature->InterruptNonMeleeSpells(false); + + DoCast(m_creature->getVictim(),SPELL_SAND_BREATH); + + DoScriptText(urand(0, 1) ? SAY_BREATH1 : SAY_BREATH2, m_creature); + + SandBreath_Timer = urand(10000, 20000); + }else SandBreath_Timer -= diff; + + if (ImpendingDeath_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_IMPENDING_DEATH); + ImpendingDeath_Timer = urand(25000, 30000); + }else ImpendingDeath_Timer -= diff; + + if (WingBuffet_Timer < diff) + { + if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_WING_BUFFET); + WingBuffet_Timer = urand(25000, 35000); + }else WingBuffet_Timer -= diff; + + if (Mda_Timer < diff) + { + DoCast(m_creature,SPELL_MAGIC_DISRUPTION_AURA); + Mda_Timer = 15000; + }else Mda_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_epoch_hunter(Creature* pCreature) +{ + return new boss_epoch_hunterAI(pCreature); +} + +void AddSC_boss_epoch_hunter() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_epoch_hunter"; + newscript->GetAI = &GetAI_boss_epoch_hunter; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_leutenant_drake.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_leutenant_drake.cpp new file mode 100644 index 000000000..de123c708 --- /dev/null +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_leutenant_drake.cpp @@ -0,0 +1,188 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Luetenant_Drake +SD%Complete: 70 +SDComment: Missing proper code for patrolling area after being spawned. Script for GO (barrels) quest 10283 +SDCategory: Caverns of Time, Old Hillsbrad Foothills +EndScriptData */ + +#include "precompiled.h" +#include "old_hillsbrad.h" +#include "escort_ai.h" + +/*###### +## go_barrel_old_hillsbrad +######*/ + +bool GOHello_go_barrel_old_hillsbrad(Player* pPlayer, GameObject* pGo) +{ + if (ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData()) + { + if (pInstance->GetData(TYPE_BARREL_DIVERSION) == DONE) + return false; + + pInstance->SetData(TYPE_BARREL_DIVERSION, IN_PROGRESS); + } + return false; +} + +/*###### +## 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 + +struct Location +{ + uint32 wpId; + float x; + float y; + float z; +}; + +static Location DrakeWP[]= +{ + {0, 2125.84, 88.2535, 54.8830}, + {1, 2111.01, 93.8022, 52.6356}, + {2, 2106.70, 114.753, 53.1965}, + {3, 2107.76, 138.746, 52.5109}, + {4, 2114.83, 160.142, 52.4738}, + {5, 2125.24, 178.909, 52.7283}, + {6, 2151.02, 208.901, 53.1551}, + {7, 2177.00, 233.069, 52.4409}, + {8, 2190.71, 227.831, 53.2742}, + {9, 2178.14, 214.219, 53.0779}, + {10, 2154.99, 202.795, 52.6446}, + {11, 2132.00, 191.834, 52.5709}, + {12, 2117.59, 166.708, 52.7686}, + {13, 2093.61, 139.441, 52.7616}, + {14, 2086.29, 104.950, 52.9246}, + {15, 2094.23, 81.2788, 52.6946}, + {16, 2108.70, 85.3075, 53.3294}, + {17, 2125.50, 88.9481, 54.7953}, + {18, 2128.20, 70.9763, 64.4221} +}; + +struct MANGOS_DLL_DECL boss_lieutenant_drakeAI : public ScriptedAI +{ + boss_lieutenant_drakeAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + bool CanPatrol; + uint32 wpId; + + uint32 Whirlwind_Timer; + uint32 Fear_Timer; + uint32 MortalStrike_Timer; + uint32 ExplodingShout_Timer; + + void Reset() + { + CanPatrol = true; + wpId = 0; + + Whirlwind_Timer = 20000; + Fear_Timer = 30000; + MortalStrike_Timer = 45000; + ExplodingShout_Timer = 25000; + } + + void Aggro(Unit *who) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void KilledUnit(Unit *victim) + { + DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); + } + + void JustDied(Unit *victim) + { + DoScriptText(SAY_DEATH, m_creature); + } + + void UpdateAI(const uint32 diff) + { + //TODO: make this work + if (CanPatrol && wpId == 0) + { + m_creature->GetMotionMaster()->MovePoint(DrakeWP[0].wpId, DrakeWP[0].x, DrakeWP[0].y, DrakeWP[0].z); + ++wpId; + } + + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Whirlwind + if (Whirlwind_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_WHIRLWIND); + Whirlwind_Timer = urand(20000, 25000); + }else Whirlwind_Timer -= diff; + + //Fear + if (Fear_Timer < diff) + { + DoScriptText(SAY_SHOUT, m_creature); + DoCast(m_creature->getVictim(), SPELL_FRIGHTENING_SHOUT); + Fear_Timer = urand(25000, 35000); + }else Fear_Timer -= diff; + + //Mortal Strike + if (MortalStrike_Timer < diff) + { + DoScriptText(SAY_MORTAL, m_creature); + DoCast(m_creature->getVictim(), SPELL_MORTAL_STRIKE); + MortalStrike_Timer = urand(20000, 30000); + }else MortalStrike_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_lieutenant_drake(Creature* pCreature) +{ + return new boss_lieutenant_drakeAI(pCreature); +} + +void AddSC_boss_lieutenant_drake() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "go_barrel_old_hillsbrad"; + newscript->pGOHello = &GOHello_go_barrel_old_hillsbrad; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_lieutenant_drake"; + newscript->GetAI = &GetAI_boss_lieutenant_drake; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp new file mode 100644 index 000000000..f49a5d30e --- /dev/null +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp @@ -0,0 +1,234 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance_Old_Hillsbrad +SD%Complete: 75 +SDComment: If thrall escort fail, all parts will reset. In future, save sub-parts and continue from last known. +SDCategory: Caverns of Time, Old Hillsbrad Foothills +EndScriptData */ + +#include "precompiled.h" +#include "old_hillsbrad.h" + +enum +{ + MAX_ENCOUNTER = 6, + + NPC_THRALL = 17876, + NPC_TARETHA = 18887, + NPC_DRAKE = 17848, + NPC_LODGE_QUEST_TRIGGER = 20155, + QUEST_ENTRY_DIVERSION = 10283 +}; + +struct MANGOS_DLL_DECL instance_old_hillsbrad : public ScriptedInstance +{ + instance_old_hillsbrad(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + uint32 m_uiBarrelCount; + uint32 m_uiThrallEventCount; + + uint64 m_uiThrallGUID; + uint64 m_uiTarethaGUID; + + void Initialize() + { + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + + m_uiBarrelCount = 0; + m_uiThrallEventCount = 0; + m_uiThrallGUID = 0; + m_uiTarethaGUID = 0; + } + + Player* GetPlayerInMap() + { + Map::PlayerList const& players = instance->GetPlayers(); + + if (!players.isEmpty()) + { + for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) + { + if (Player* plr = itr->getSource()) + return plr; + } + } + + debug_log("SD2: Instance Old Hillsbrad: GetPlayerInMap, but PlayerList is empty!"); + return NULL; + } + + void UpdateQuestCredit() + { + Map::PlayerList const& players = instance->GetPlayers(); + + if (!players.isEmpty()) + { + for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) + { + if (Player* pPlayer = itr->getSource()) + pPlayer->KilledMonsterCredit(NPC_LODGE_QUEST_TRIGGER, 0); + } + } + } + + void OnCreatureCreate(Creature* pCreature) + { + switch(pCreature->GetEntry()) + { + case NPC_THRALL: + m_uiThrallGUID = pCreature->GetGUID(); + break; + case NPC_TARETHA: + m_uiTarethaGUID = pCreature->GetGUID(); + break; + } + } + + void SetData(uint32 uiType, uint32 uiData) + { + Player* pPlayer = GetPlayerInMap(); + + if (!pPlayer) + { + debug_log("SD2: Instance Old Hillsbrad: SetData (Type: %u Data %u) cannot find any pPlayer.", uiType, uiData); + return; + } + + switch(uiType) + { + case TYPE_BARREL_DIVERSION: + { + if (uiData == IN_PROGRESS) + { + if (m_uiBarrelCount >= 5) + return; + + ++m_uiBarrelCount; + DoUpdateWorldState(WORLD_STATE_OH, m_uiBarrelCount); + + debug_log("SD2: Instance Old Hillsbrad: go_barrel_old_hillsbrad count %u", m_uiBarrelCount); + + m_auiEncounter[0] = IN_PROGRESS; + + if (m_uiBarrelCount == 5) + { + UpdateQuestCredit(); + pPlayer->SummonCreature(NPC_DRAKE,2128.43,71.01,64.42,1.74,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,1800000); + m_auiEncounter[0] = DONE; + } + } + break; + } + case TYPE_THRALL_EVENT: + { + if (uiData == FAIL) + { + if (m_uiThrallEventCount <= 20) + { + ++m_uiThrallEventCount; + m_auiEncounter[1] = NOT_STARTED; + + debug_log("SD2: Instance Old Hillsbrad: Thrall event failed %u times. Resetting all sub-events.", m_uiThrallEventCount); + + m_auiEncounter[2] = NOT_STARTED; + m_auiEncounter[3] = NOT_STARTED; + m_auiEncounter[4] = NOT_STARTED; + m_auiEncounter[5] = NOT_STARTED; + } + else if (m_uiThrallEventCount > 20) + { + m_auiEncounter[1] = uiData; + m_auiEncounter[2] = uiData; + m_auiEncounter[3] = uiData; + m_auiEncounter[4] = uiData; + m_auiEncounter[5] = uiData; + debug_log("SD2: Instance Old Hillsbrad: Thrall event failed %u times. Reset instance required.", m_uiThrallEventCount); + } + } + else + m_auiEncounter[1] = uiData; + + debug_log("SD2: Instance Old Hillsbrad: Thrall escort event adjusted to data %u.",uiData); + break; + } + case TYPE_THRALL_PART1: + m_auiEncounter[2] = uiData; + debug_log("SD2: Instance Old Hillsbrad: Thrall event part I adjusted to data %u.",uiData); + break; + case TYPE_THRALL_PART2: + m_auiEncounter[3] = uiData; + debug_log("SD2: Instance Old Hillsbrad: Thrall event part II adjusted to data %u.",uiData); + break; + case TYPE_THRALL_PART3: + m_auiEncounter[4] = uiData; + debug_log("SD2: Instance Old Hillsbrad: Thrall event part III adjusted to data %u.",uiData); + break; + case TYPE_THRALL_PART4: + m_auiEncounter[5] = uiData; + debug_log("SD2: Instance Old Hillsbrad: Thrall event part IV adjusted to data %u.",uiData); + break; + } + } + + uint32 GetData(uint32 uiData) + { + switch(uiData) + { + case TYPE_BARREL_DIVERSION: + return m_auiEncounter[0]; + case TYPE_THRALL_EVENT: + return m_auiEncounter[1]; + case TYPE_THRALL_PART1: + return m_auiEncounter[2]; + case TYPE_THRALL_PART2: + return m_auiEncounter[3]; + case TYPE_THRALL_PART3: + return m_auiEncounter[4]; + case TYPE_THRALL_PART4: + return m_auiEncounter[5]; + } + return 0; + } + + uint64 GetData64(uint32 uiData) + { + switch(uiData) + { + case DATA_THRALL: + return m_uiThrallGUID; + case DATA_TARETHA: + return m_uiTarethaGUID; + } + return 0; + } +}; + +InstanceData* GetInstanceData_instance_old_hillsbrad(Map* pMap) +{ + return new instance_old_hillsbrad(pMap); +} + +void AddSC_instance_old_hillsbrad() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "instance_old_hillsbrad"; + newscript->GetInstanceData = &GetInstanceData_instance_old_hillsbrad; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp new file mode 100644 index 000000000..b8b8d1c1b --- /dev/null +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp @@ -0,0 +1,692 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Old_Hillsbrad +SD%Complete: 40 +SDComment: Quest support: 10283, 10284. All friendly NPC's. Thrall waypoints fairly complete, missing many details, but possible to complete escort. +SDCategory: Caverns of Time, Old Hillsbrad Foothills +EndScriptData */ + +/* ContentData +npc_brazen +npc_erozion +npc_thrall_old_hillsbrad +npc_taretha +EndContentData */ + +#include "precompiled.h" +#include "old_hillsbrad.h" +#include "escort_ai.h" + +enum +{ + QUEST_ENTRY_HILLSBRAD = 10282, + QUEST_ENTRY_DIVERSION = 10283, + QUEST_ENTRY_ESCAPE = 10284, + QUEST_ENTRY_RETURN = 10285, + ITEM_ENTRY_BOMBS = 25853, + + TAXI_PATH_ID = 534 +}; + +/*###### +## npc_brazen +######*/ + +#define GOSSIP_ITEM_READY "I am ready to go to Durnholde Keep." + +bool GossipHello_npc_brazen(Player* pPlayer, Creature* pCreature) +{ + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_READY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_brazen(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + if (!pPlayer->HasItemCount(ITEM_ENTRY_BOMBS,1)) + pPlayer->SEND_GOSSIP_MENU(9780, pCreature->GetGUID()); + else + { + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->ActivateTaxiPathTo(TAXI_PATH_ID); + } + } + return true; +} + +/*###### +## npc_erozion +######*/ + +bool GossipHello_npc_erozion(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + ScriptedInstance* pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + + if (pInstance && pInstance->GetData(TYPE_BARREL_DIVERSION) != DONE && !pPlayer->HasItemCount(ITEM_ENTRY_BOMBS,1)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I need a pack of Incendiary Bombs.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + if (!pPlayer->GetQuestRewardStatus(QUEST_ENTRY_RETURN) && pPlayer->GetQuestStatus(QUEST_ENTRY_RETURN) == QUEST_STATUS_COMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] Teleport please, i'm tired.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + + pPlayer->SEND_GOSSIP_MENU(9778, pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_erozion(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + ItemPosCountVec dest; + uint8 msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_ENTRY_BOMBS, 1); + if (msg == EQUIP_ERR_OK) + { + pPlayer->StoreNewItem(dest, ITEM_ENTRY_BOMBS, true); + } + pPlayer->SEND_GOSSIP_MENU(9515, pCreature->GetGUID()); + } + if (uiAction == GOSSIP_ACTION_INFO_DEF+2) + { + pPlayer->CLOSE_GOSSIP_MENU(); + } + return true; +} + +/*###### +## npc_thrall_old_hillsbrad +######*/ + +//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? + +#define SPEED_WALK (0.5f) +#define SPEED_RUN (1.0f) +#define SPEED_MOUNT (1.6f) + +#define EQUIP_ID_WEAPON 927 +#define EQUIP_ID_SHIELD 20913 +#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 +#define NPC_THRALL_QUEST_TRIGGER 20156 + +//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 + +struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI +{ + npc_thrall_old_hillsbradAI(Creature* pCreature) : npc_escortAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + HadMount = false; + Reset(); + } + + ScriptedInstance* m_pInstance; + uint64 TarethaGUID; + + bool LowHp; + bool HadMount; + + void WaypointReached(uint32 i) + { + if (!m_pInstance) + return; + + switch(i) + { + case 8: + SetRun(false); + m_creature->SummonCreature(ENTRY_ARMORER,2181.87,112.46,89.45,0.26,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,5000); + break; + case 9: + DoScriptText(SAY_TH_ARMORY, m_creature); + SetEquipmentSlots(false, EQUIP_ID_WEAPON, EQUIP_ID_SHIELD, EQUIP_NO_CHANGE); + break; + case 10: + m_creature->SetDisplayId(THRALL_MODEL_EQUIPPED); + break; + case 11: + SetRun(); + break; + case 15: + m_creature->SummonCreature(MOB_ENTRY_RIFLE,2200.28,137.37,87.93,5.07,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,5000); + m_creature->SummonCreature(MOB_ENTRY_WARDEN,2197.44,131.83,87.93,0.78,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,5000); + m_creature->SummonCreature(MOB_ENTRY_VETERAN,2203.62,135.40,87.93,3.70,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,5000); + m_creature->SummonCreature(MOB_ENTRY_VETERAN,2200.75,130.13,87.93,1.48,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,5000); + break; + case 21: + m_creature->SummonCreature(MOB_ENTRY_RIFLE,2135.80,154.01,67.45,4.98,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,5000); + m_creature->SummonCreature(MOB_ENTRY_WARDEN,2144.36,151.87,67.74,4.46,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,5000); + m_creature->SummonCreature(MOB_ENTRY_VETERAN,2142.12,154.41,67.12,4.56,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,5000); + m_creature->SummonCreature(MOB_ENTRY_VETERAN,2138.08,155.38,67.24,4.60,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,5000); + break; + case 25: + m_creature->SummonCreature(MOB_ENTRY_RIFLE,2102.98,192.17,65.24,6.02,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,5000); + m_creature->SummonCreature(MOB_ENTRY_WARDEN,2108.48,198.75,65.18,5.15,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,5000); + m_creature->SummonCreature(MOB_ENTRY_VETERAN,2106.11,197.29,65.18,5.63,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,5000); + m_creature->SummonCreature(MOB_ENTRY_VETERAN,2104.18,194.82,65.18,5.75,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,5000); + break; + case 29: + DoScriptText(SAY_TH_SKARLOC_MEET, m_creature); + m_creature->SummonCreature(ENTRY_SCARLOC,2036.48,271.22,63.43,5.27,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,30000); + break; + case 30: + SetEscortPaused(true); + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + SetRun(false); + break; + case 31: + DoScriptText(SAY_TH_MOUNTS_UP, m_creature); + DoMount(); + SetRun(); + break; + case 37: + //possibly regular patrollers? If so, remove this and let database handle them + m_creature->SummonCreature(MOB_ENTRY_WATCHMAN,2124.26,522.16,56.87,3.99,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,5000); + m_creature->SummonCreature(MOB_ENTRY_WATCHMAN,2121.69,525.37,57.11,4.01,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,5000); + m_creature->SummonCreature(MOB_ENTRY_SENTRY,2124.65,524.55,56.63,3.98,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,5000); + break; + case 59: + m_creature->SummonCreature(SKARLOC_MOUNT,2488.64,625.77,58.26,4.71,TEMPSUMMON_TIMED_DESPAWN,10000); + DoUnmount(); + HadMount = false; + SetRun(false); + break; + case 60: + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION); + //make horsie run off + SetEscortPaused(true); + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + m_pInstance->SetData(TYPE_THRALL_PART2, DONE); + SetRun(); + break; + case 64: + SetRun(false); + break; + case 68: + m_creature->SummonCreature(MOB_ENTRY_BARN_PROTECTOR,2500.22,692.60,55.50,2.84,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,5000); + m_creature->SummonCreature(MOB_ENTRY_BARN_LOOKOUT,2500.13,696.55,55.51,3.38,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,5000); + m_creature->SummonCreature(MOB_ENTRY_BARN_GUARDSMAN,2500.55,693.64,55.50,3.14,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,5000); + m_creature->SummonCreature(MOB_ENTRY_BARN_GUARDSMAN,2500.94,695.81,55.50,3.14,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,5000); + break; + case 71: + SetRun(); + break; + case 81: + SetRun(false); + break; + case 83: + m_creature->SummonCreature(MOB_ENTRY_CHURCH_PROTECTOR,2627.33,646.82,56.03,4.28,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,5000); + m_creature->SummonCreature(MOB_ENTRY_CHURCH_LOOKOUT,2624.14,648.03,56.03,4.50,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,5000); + m_creature->SummonCreature(MOB_ENTRY_CHURCH_GUARDSMAN,2625.32,649.60,56.03,4.38,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,5000); + m_creature->SummonCreature(MOB_ENTRY_CHURCH_GUARDSMAN,2627.22,649.00,56.03,4.34,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,5000); + break; + case 84: + DoScriptText(SAY_TH_CHURCH_END, m_creature); + SetRun(); + break; + case 91: + SetRun(false); + break; + case 93: + m_creature->SummonCreature(MOB_ENTRY_INN_PROTECTOR,2652.71,660.31,61.93,1.67,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,5000); + m_creature->SummonCreature(MOB_ENTRY_INN_LOOKOUT,2648.96,662.59,61.93,0.79,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,5000); + m_creature->SummonCreature(MOB_ENTRY_INN_GUARDSMAN,2657.36,662.34,61.93,2.68,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,5000); + m_creature->SummonCreature(MOB_ENTRY_INN_GUARDSMAN,2656.39,659.77,61.93,2.61,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,5000); + break; + case 94: + if (uint64 TarethaGUID = m_pInstance->GetData64(DATA_TARETHA)) + { + if (Unit* Taretha = Unit::GetUnit((*m_creature), TarethaGUID)) + DoScriptText(SAY_TA_ESCAPED, Taretha, m_creature); + } + break; + case 95: + DoScriptText(SAY_TH_MEET_TARETHA, m_creature); + m_pInstance->SetData(TYPE_THRALL_PART3,DONE); + SetEscortPaused(true); + break; + case 96: + DoScriptText(SAY_TH_EPOCH_WONDER, m_creature); + break; + case 97: + DoScriptText(SAY_TH_EPOCH_KILL_TARETHA, m_creature); + SetRun(); + break; + case 98: + //trigger epoch Yell("Thrall! Come outside and face your fate! ....") + //from here, thrall should not never be allowed to move to point 106 which he currently does. + break; + case 106: + //trigger taretha to run down outside + if (Creature* pTaretha = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_TARETHA))) + { + if (Player* pPlayer = GetPlayerForEscort()) + ((npc_escortAI*)(pTaretha->AI()))->Start(false, true, pPlayer->GetGUID()); + } + + //kill credit creature for quest + Map *map = m_creature->GetMap(); + Map::PlayerList const& players = map->GetPlayers(); + if (!players.isEmpty() && map->IsDungeon()) + { + for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) + { + if (Player* pPlayer = itr->getSource()) + pPlayer->KilledMonsterCredit(NPC_THRALL_QUEST_TRIGGER, m_creature->GetGUID()); + } + } + + //alot will happen here, thrall and taretha talk, erozion appear at spot to explain + m_creature->SummonCreature(EROZION_ENTRY,2646.47,680.416,55.38,4.16,TEMPSUMMON_TIMED_DESPAWN,120000); + break; + } + } + + void Reset() + { + LowHp = false; + + if (HadMount) + DoMount(); + + if (!HasEscortState(STATE_ESCORT_ESCORTING)) + { + DoUnmount(); + HadMount = false; + SetEquipmentSlots(true); + m_creature->SetDisplayId(THRALL_MODEL_UNEQUIPPED); + } + + if (HasEscortState(STATE_ESCORT_ESCORTING)) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_TH_LEAVE_COMBAT1, m_creature); break; + case 1: DoScriptText(SAY_TH_LEAVE_COMBAT2, m_creature); break; + case 2: DoScriptText(SAY_TH_LEAVE_COMBAT3, m_creature); break; + } + } + } + + void StartWP() + { + m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + SetEscortPaused(false); + } + + void DoMount() + { + m_creature->Mount(SKARLOC_MOUNT_MODEL); + m_creature->SetSpeed(MOVE_RUN,SPEED_MOUNT); + } + + void DoUnmount() + { + m_creature->Unmount(); + m_creature->SetSpeed(MOVE_RUN,SPEED_RUN); + } + + void Aggro(Unit* who) + { + switch(urand(0, 3)) + { + case 0: DoScriptText(SAY_TH_RANDOM_AGGRO1, m_creature); break; + case 1: DoScriptText(SAY_TH_RANDOM_AGGRO2, m_creature); break; + case 2: DoScriptText(SAY_TH_RANDOM_AGGRO3, m_creature); break; + case 3: DoScriptText(SAY_TH_RANDOM_AGGRO4, m_creature); break; + } + + if (m_creature->IsMounted()) + { + DoUnmount(); + HadMount = true; + } + } + + void JustSummoned(Creature* summoned) + { + switch(summoned->GetEntry()) + { + //TODO: make Scarloc start into event instead, and not start attack directly + case MOB_ENTRY_BARN_GUARDSMAN: + case MOB_ENTRY_BARN_PROTECTOR: + case MOB_ENTRY_BARN_LOOKOUT: + case SKARLOC_MOUNT: + case EROZION_ENTRY: + break; + default: + summoned->AI()->AttackStart(m_creature); + break; + } + } + + void KilledUnit(Unit *victim) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_TH_RANDOM_KILL1, m_creature); break; + case 1: DoScriptText(SAY_TH_RANDOM_KILL2, m_creature); break; + case 2: DoScriptText(SAY_TH_RANDOM_KILL3, m_creature); break; + } + } + + void JustDied(Unit *slayer) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_THRALL_EVENT,FAIL); + + // Don't do a yell if he kills self (if player goes too far or at the end). + if (slayer == m_creature) + return; + + DoScriptText(urand(0, 1) ? SAY_TH_RANDOM_DIE1 : SAY_TH_RANDOM_DIE2, m_creature); + } + + void UpdateEscortAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //TODO: add his abilities'n-crap here + + if (!LowHp && ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 20)) + { + DoScriptText(urand(0, 1) ? SAY_TH_RANDOM_LOW_HP1 : SAY_TH_RANDOM_LOW_HP2, m_creature); + LowHp = true; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_thrall_old_hillsbrad(Creature* pCreature) +{ + return new npc_thrall_old_hillsbradAI(pCreature); +} + +bool GossipHello_npc_thrall_old_hillsbrad(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + { + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->SendPreparedQuest(pCreature->GetGUID()); + } + + ScriptedInstance* pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + + if (pInstance) + { + if (pInstance->GetData(TYPE_BARREL_DIVERSION) == DONE && !pInstance->GetData(TYPE_THRALL_EVENT)) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] Start walking.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_ID_START, pCreature->GetGUID()); + } + + if (pInstance->GetData(TYPE_THRALL_PART1) == DONE && !pInstance->GetData(TYPE_THRALL_PART2)) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SKARLOC1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_ID_SKARLOC1, pCreature->GetGUID()); + } + + if (pInstance->GetData(TYPE_THRALL_PART2) == DONE && !pInstance->GetData(TYPE_THRALL_PART3)) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TARREN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_ID_TARREN, pCreature->GetGUID()); + } + } + return true; +} + +bool GossipSelect_npc_thrall_old_hillsbrad(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + ScriptedInstance* pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->CLOSE_GOSSIP_MENU(); + pInstance->SetData(TYPE_THRALL_EVENT,IN_PROGRESS); + pInstance->SetData(TYPE_THRALL_PART1,IN_PROGRESS); + + DoScriptText(SAY_TH_START_EVENT_PART1, pCreature); + + if (npc_thrall_old_hillsbradAI* pEscortAI = dynamic_cast(pCreature->AI())) + pEscortAI->Start(true, true, pPlayer->GetGUID()); + + break; + + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SKARLOC2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+20); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_ID_SKARLOC2, pCreature->GetGUID()); + break; + + case GOSSIP_ACTION_INFO_DEF+20: + pPlayer->SEND_GOSSIP_MENU(GOSSIP_ID_SKARLOC3, pCreature->GetGUID()); + pCreature->SummonCreature(SKARLOC_MOUNT,2038.81,270.26,63.20,5.41,TEMPSUMMON_TIMED_DESPAWN,12000); + pInstance->SetData(TYPE_THRALL_PART2,IN_PROGRESS); + + DoScriptText(SAY_TH_START_EVENT_PART2, pCreature); + + ((npc_thrall_old_hillsbradAI*)pCreature->AI())->StartWP(); + break; + + case GOSSIP_ACTION_INFO_DEF+3: + pPlayer->CLOSE_GOSSIP_MENU(); + pInstance->SetData(TYPE_THRALL_PART3,IN_PROGRESS); + ((npc_thrall_old_hillsbradAI*)pCreature->AI())->StartWP(); + break; + } + return true; +} + +/*###### +## npc_taretha +######*/ + +#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." + +struct MANGOS_DLL_DECL npc_tarethaAI : public npc_escortAI +{ + npc_tarethaAI(Creature* pCreature) : npc_escortAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + void WaypointReached(uint32 i) + { + switch(i) + { + case 6: + DoScriptText(SAY_TA_FREE, m_creature); + break; + case 7: + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_CHEER); + break; + } + } + + void Reset() {} +}; + +CreatureAI* GetAI_npc_taretha(Creature* pCreature) +{ + return new npc_tarethaAI(pCreature); +} + +bool GossipHello_npc_taretha(Player* pPlayer, Creature* pCreature) +{ + ScriptedInstance* pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + + if (pInstance && pInstance->GetData(TYPE_THRALL_PART3) == DONE && pInstance->GetData(TYPE_THRALL_PART4) == NOT_STARTED) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_EPOCH1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_ID_EPOCH1, pCreature->GetGUID()); + } + return true; +} + +bool GossipSelect_npc_taretha(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + ScriptedInstance* pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_EPOCH2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_ID_EPOCH2, pCreature->GetGUID()); + } + if (uiAction == GOSSIP_ACTION_INFO_DEF+2) + { + pPlayer->CLOSE_GOSSIP_MENU(); + + if (pInstance->GetData(TYPE_THRALL_EVENT) == IN_PROGRESS) + { + pInstance->SetData(TYPE_THRALL_PART4,IN_PROGRESS); + pCreature->SummonCreature(ENTRY_EPOCH,2639.13,698.55,65.43,4.59,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,120000); + + if (uint64 ThrallGUID = pInstance->GetData64(DATA_THRALL)) + { + Creature* Thrall = ((Creature*)Unit::GetUnit((*pCreature), ThrallGUID)); + if (Thrall) + ((npc_thrall_old_hillsbradAI*)Thrall->AI())->StartWP(); + } + } + } + return true; +} + +/*###### +## AddSC +######*/ + +void AddSC_old_hillsbrad() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_brazen"; + newscript->pGossipHello = &GossipHello_npc_brazen; + newscript->pGossipSelect = &GossipSelect_npc_brazen; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_erozion"; + newscript->pGossipHello = &GossipHello_npc_erozion; + newscript->pGossipSelect = &GossipSelect_npc_erozion; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_thrall_old_hillsbrad"; + newscript->pGossipHello = &GossipHello_npc_thrall_old_hillsbrad; + newscript->pGossipSelect = &GossipSelect_npc_thrall_old_hillsbrad; + newscript->GetAI = &GetAI_npc_thrall_old_hillsbrad; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_taretha"; + newscript->pGossipHello = &GossipHello_npc_taretha; + newscript->pGossipSelect = &GossipSelect_npc_taretha; + newscript->GetAI = &GetAI_npc_taretha; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h new file mode 100644 index 000000000..650ad23f3 --- /dev/null +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h @@ -0,0 +1,18 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_OLD_HILLSBRAD_H +#define DEF_OLD_HILLSBRAD_H + +#define TYPE_BARREL_DIVERSION 1 +#define TYPE_THRALL_EVENT 2 +#define TYPE_THRALL_PART1 3 +#define TYPE_THRALL_PART2 4 +#define TYPE_THRALL_PART3 5 +#define TYPE_THRALL_PART4 6 +#define DATA_THRALL 7 +#define DATA_TARETHA 8 + +#define WORLD_STATE_OH 2436 +#endif diff --git a/scripts/kalimdor/darkshore.cpp b/scripts/kalimdor/darkshore.cpp new file mode 100644 index 000000000..0ed182682 --- /dev/null +++ b/scripts/kalimdor/darkshore.cpp @@ -0,0 +1,405 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Darkshore +SD%Complete: 100 +SDComment: Quest support: 731, 2078, 5321 +SDCategory: Darkshore +EndScriptData */ + +/* ContentData +npc_kerlonian +npc_prospector_remtravel +npc_threshwackonator +EndContentData */ + +#include "precompiled.h" +#include "escort_ai.h" +#include "follower_ai.h" + +/*#### +# npc_kerlonian +####*/ + +enum +{ + 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, + + SPELL_SLEEP_VISUAL = 25148, + SPELL_AWAKEN = 17536, + QUEST_SLEEPER_AWAKENED = 5321, + NPC_LILADRIS = 11219 //attackers entries unknown +}; + +//TODO: make concept similar as "ringo" -escort. Find a way to run the scripted attacks, _if_ player are choosing road. +struct MANGOS_DLL_DECL npc_kerlonianAI : public FollowerAI +{ + npc_kerlonianAI(Creature* pCreature) : FollowerAI(pCreature) { Reset(); } + + uint32 m_uiFallAsleepTimer; + + void Reset() + { + m_uiFallAsleepTimer = urand(10000, 45000); + } + + void MoveInLineOfSight(Unit *pWho) + { + FollowerAI::MoveInLineOfSight(pWho); + + if (!m_creature->getVictim() && !HasFollowState(STATE_FOLLOW_COMPLETE) && pWho->GetEntry() == NPC_LILADRIS) + { + if (m_creature->IsWithinDistInMap(pWho, INTERACTION_DISTANCE*5)) + { + if (Player* pPlayer = GetLeaderForFollower()) + { + if (pPlayer->GetQuestStatus(QUEST_SLEEPER_AWAKENED) == QUEST_STATUS_INCOMPLETE) + pPlayer->GroupEventHappens(QUEST_SLEEPER_AWAKENED, m_creature); + + DoScriptText(SAY_KER_END, m_creature); + } + + SetFollowComplete(); + } + } + } + + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + { + if (HasFollowState(STATE_FOLLOW_INPROGRESS | STATE_FOLLOW_PAUSED) && pSpell->Id == SPELL_AWAKEN) + ClearSleeping(); + } + + void SetSleeping() + { + SetFollowPaused(true); + + switch(urand(0, 2)) + { + case 0: DoScriptText(EMOTE_KER_SLEEP_1, m_creature); break; + case 1: DoScriptText(EMOTE_KER_SLEEP_2, m_creature); break; + case 2: DoScriptText(EMOTE_KER_SLEEP_3, m_creature); break; + } + + switch(urand(0, 3)) + { + case 0: DoScriptText(SAY_KER_SLEEP_1, m_creature); break; + case 1: DoScriptText(SAY_KER_SLEEP_2, m_creature); break; + case 2: DoScriptText(SAY_KER_SLEEP_3, m_creature); break; + case 3: DoScriptText(SAY_KER_SLEEP_4, m_creature); break; + } + + m_creature->SetStandState(UNIT_STAND_STATE_SLEEP); + m_creature->CastSpell(m_creature, SPELL_SLEEP_VISUAL, false); + } + + void ClearSleeping() + { + m_creature->RemoveAurasDueToSpell(SPELL_SLEEP_VISUAL); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + + DoScriptText(EMOTE_KER_AWAKEN, m_creature); + + SetFollowPaused(false); + } + + void UpdateFollowerAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + { + if (!HasFollowState(STATE_FOLLOW_INPROGRESS)) + return; + + if (!HasFollowState(STATE_FOLLOW_PAUSED)) + { + if (m_uiFallAsleepTimer < uiDiff) + { + SetSleeping(); + m_uiFallAsleepTimer = urand(25000, 90000); + } + else + m_uiFallAsleepTimer -= uiDiff; + } + + return; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_kerlonian(Creature* pCreature) +{ + return new npc_kerlonianAI(pCreature); +} + +bool QuestAccept_npc_kerlonian(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_SLEEPER_AWAKENED) + { + if (npc_kerlonianAI* pKerlonianAI = dynamic_cast(pCreature->AI())) + { + pCreature->SetStandState(UNIT_STAND_STATE_STAND); + DoScriptText(SAY_KER_START, pCreature, pPlayer); + pKerlonianAI->StartFollow(pPlayer, FACTION_ESCORT_N_FRIEND_PASSIVE, pQuest); + } + } + + return true; +} + +/*#### +# npc_prospector_remtravel +####*/ + +enum +{ + SAY_REM_START = -1000327, + SAY_REM_AGGRO = -1000339, + SAY_REM_RAMP1_1 = -1000328, + SAY_REM_RAMP1_2 = -1000329, + SAY_REM_BOOK = -1000330, + SAY_REM_TENT1_1 = -1000331, + SAY_REM_TENT1_2 = -1000332, + SAY_REM_MOSS = -1000333, + EMOTE_REM_MOSS = -1000334, + SAY_REM_MOSS_PROGRESS = -1000335, + SAY_REM_PROGRESS = -1000336, + SAY_REM_REMEMBER = -1000337, + EMOTE_REM_END = -1000338, + + QUEST_ABSENT_MINDED_PT2 = 731, + NPC_GRAVEL_SCOUT = 2158, + NPC_GRAVEL_BONE = 2159, + NPC_GRAVEL_GEO = 2160 +}; + +struct MANGOS_DLL_DECL npc_prospector_remtravelAI : public npc_escortAI +{ + npc_prospector_remtravelAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } + + void WaypointReached(uint32 i) + { + Player* pPlayer = GetPlayerForEscort(); + + if (!pPlayer) + return; + + switch(i) + { + case 0: + DoScriptText(SAY_REM_START, m_creature, pPlayer); + break; + case 5: + DoScriptText(SAY_REM_RAMP1_1, m_creature, pPlayer); + 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, m_creature, pPlayer); + break; + case 14: + //depend quest rewarded? + DoScriptText(SAY_REM_BOOK, m_creature, pPlayer); + break; + case 15: + DoScriptText(SAY_REM_TENT1_1, m_creature, pPlayer); + 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, m_creature, pPlayer); + break; + case 26: + DoScriptText(SAY_REM_MOSS, m_creature, pPlayer); + break; + case 27: + DoScriptText(EMOTE_REM_MOSS, m_creature, pPlayer); + break; + case 28: + DoScriptText(SAY_REM_MOSS_PROGRESS, m_creature, pPlayer); + break; + case 29: + DoSpawnCreature(NPC_GRAVEL_SCOUT, -15.0f, 3.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + DoSpawnCreature(NPC_GRAVEL_BONE, -15.0f, 5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + 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, m_creature, pPlayer); + break; + case 41: + DoScriptText(SAY_REM_REMEMBER, m_creature, pPlayer); + break; + case 42: + DoScriptText(EMOTE_REM_END, m_creature, pPlayer); + pPlayer->GroupEventHappens(QUEST_ABSENT_MINDED_PT2, m_creature); + break; + } + } + + void Reset() { } + + void Aggro(Unit* who) + { + if (urand(0, 1)) + DoScriptText(SAY_REM_AGGRO, m_creature, who); + } + + void JustSummoned(Creature* pSummoned) + { + //unsure if it should be any + //pSummoned->AI()->AttackStart(m_creature); + } +}; + +CreatureAI* GetAI_npc_prospector_remtravel(Creature* pCreature) +{ + return new npc_prospector_remtravelAI(pCreature); +} + +bool QuestAccept_npc_prospector_remtravel(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_ABSENT_MINDED_PT2) + { + pCreature->setFaction(FACTION_ESCORT_A_NEUTRAL_PASSIVE); + + if (npc_prospector_remtravelAI* pEscortAI = dynamic_cast(pCreature->AI())) + pEscortAI->Start(false, false, pPlayer->GetGUID(), pQuest, true); + } + + return true; +} + +/*#### +# npc_threshwackonator +####*/ + +enum +{ + EMOTE_START = -1000325, + SAY_AT_CLOSE = -1000326, + QUEST_GYROMAST_REV = 2078, + NPC_GELKAK = 6667, + FACTION_HOSTILE = 14 +}; + +#define GOSSIP_ITEM_INSERT_KEY "[PH] Insert key" + +struct MANGOS_DLL_DECL npc_threshwackonatorAI : public FollowerAI +{ + npc_threshwackonatorAI(Creature* pCreature) : FollowerAI(pCreature) { Reset(); } + + void Reset() {} + + void MoveInLineOfSight(Unit* pWho) + { + FollowerAI::MoveInLineOfSight(pWho); + + if (!m_creature->getVictim() && !HasFollowState(STATE_FOLLOW_COMPLETE) && pWho->GetEntry() == NPC_GELKAK) + { + if (m_creature->IsWithinDistInMap(pWho, 10.0f)) + { + DoScriptText(SAY_AT_CLOSE, pWho); + DoAtEnd(); + } + } + } + + void DoAtEnd() + { + m_creature->setFaction(FACTION_HOSTILE); + + if (Player* pHolder = GetLeaderForFollower()) + m_creature->AI()->AttackStart(pHolder); + + SetFollowComplete(); + } +}; + +CreatureAI* GetAI_npc_threshwackonator(Creature* pCreature) +{ + return new npc_threshwackonatorAI(pCreature); +} + +bool GossipHello_npc_threshwackonator(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->GetQuestStatus(QUEST_GYROMAST_REV) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_INSERT_KEY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_threshwackonator(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + pPlayer->CLOSE_GOSSIP_MENU(); + + if (npc_threshwackonatorAI* pThreshAI = dynamic_cast(pCreature->AI())) + { + DoScriptText(EMOTE_START, pCreature); + pThreshAI->StartFollow(pPlayer); + } + } + + return true; +} + +void AddSC_darkshore() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_kerlonian"; + newscript->GetAI = &GetAI_npc_kerlonian; + newscript->pQuestAccept = &QuestAccept_npc_kerlonian; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_prospector_remtravel"; + newscript->GetAI = &GetAI_npc_prospector_remtravel; + newscript->pQuestAccept = &QuestAccept_npc_prospector_remtravel; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_threshwackonator"; + newscript->GetAI = &GetAI_npc_threshwackonator; + newscript->pGossipHello = &GossipHello_npc_threshwackonator; + newscript->pGossipSelect = &GossipSelect_npc_threshwackonator; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/desolace.cpp b/scripts/kalimdor/desolace.cpp new file mode 100644 index 000000000..9b322b4ce --- /dev/null +++ b/scripts/kalimdor/desolace.cpp @@ -0,0 +1,174 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Desolace +SD%Complete: 100 +SDComment: Quest support: 5561 +SDCategory: Desolace +EndScriptData */ + +/* ContentData +npc_aged_dying_ancient_kodo +EndContentData */ + +#include "precompiled.h" + +enum +{ + SAY_SMEED_HOME_1 = -1000348, + SAY_SMEED_HOME_2 = -1000349, + SAY_SMEED_HOME_3 = -1000350, + + QUEST_KODO = 5561, + + NPC_SMEED = 11596, + NPC_AGED_KODO = 4700, + NPC_DYING_KODO = 4701, + NPC_ANCIENT_KODO = 4702, + NPC_TAMED_KODO = 11627, + + SPELL_KODO_KOMBO_ITEM = 18153, + SPELL_KODO_KOMBO_PLAYER_BUFF = 18172, //spells here have unclear function, but using them at least for visual parts and checks + SPELL_KODO_KOMBO_DESPAWN_BUFF = 18377, + SPELL_KODO_KOMBO_GOSSIP = 18362 + +}; + +struct MANGOS_DLL_DECL npc_aged_dying_ancient_kodoAI : public ScriptedAI +{ + npc_aged_dying_ancient_kodoAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + uint32 m_uiDespawnTimer; + + void Reset() + { + m_uiDespawnTimer = 0; + } + + void MoveInLineOfSight(Unit* pWho) + { + if (pWho->GetEntry() == NPC_SMEED) + { + if (m_creature->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP)) + return; + + if (m_creature->IsWithinDistInMap(pWho, 10.0f)) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_SMEED_HOME_1, pWho); break; + case 1: DoScriptText(SAY_SMEED_HOME_2, pWho); break; + case 2: DoScriptText(SAY_SMEED_HOME_3, pWho); break; + } + + //spell have no implemented effect (dummy), so useful to notify spellHit + m_creature->CastSpell(m_creature,SPELL_KODO_KOMBO_GOSSIP,true); + } + } + } + + void SpellHit(Unit* pCaster, SpellEntry const* pSpell) + { + if (pSpell->Id == SPELL_KODO_KOMBO_GOSSIP) + { + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + m_uiDespawnTimer = 60000; + } + } + + void UpdateAI(const uint32 diff) + { + //timer should always be == 0 unless we already updated entry of creature. Then not expect this updated to ever be in combat. + if (m_uiDespawnTimer && m_uiDespawnTimer <= diff) + { + if (!m_creature->getVictim() && m_creature->isAlive()) + { + Reset(); + m_creature->setDeathState(JUST_DIED); + m_creature->Respawn(); + return; + } + } else m_uiDespawnTimer -= diff; + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_aged_dying_ancient_kodo(Creature* pCreature) +{ + return new npc_aged_dying_ancient_kodoAI(pCreature); +} + +bool EffectDummyCreature_npc_aged_dying_ancient_kodo(Unit *pCaster, uint32 spellId, uint32 effIndex, Creature *pCreatureTarget) +{ + //always check spellid and effectindex + if (spellId == SPELL_KODO_KOMBO_ITEM && effIndex == 0) + { + //no effect if player/creature already have aura from spells + if (pCaster->HasAura(SPELL_KODO_KOMBO_PLAYER_BUFF) || pCreatureTarget->HasAura(SPELL_KODO_KOMBO_DESPAWN_BUFF)) + return true; + + if (pCreatureTarget->GetEntry() == NPC_AGED_KODO || + pCreatureTarget->GetEntry() == NPC_DYING_KODO || + pCreatureTarget->GetEntry() == NPC_ANCIENT_KODO) + { + pCaster->CastSpell(pCaster,SPELL_KODO_KOMBO_PLAYER_BUFF,true); + + pCreatureTarget->UpdateEntry(NPC_TAMED_KODO); + pCreatureTarget->CastSpell(pCreatureTarget,SPELL_KODO_KOMBO_DESPAWN_BUFF,false); + + if (pCreatureTarget->GetMotionMaster()->GetCurrentMovementGeneratorType() == WAYPOINT_MOTION_TYPE) + pCreatureTarget->GetMotionMaster()->MoveIdle(); + + pCreatureTarget->GetMotionMaster()->MoveFollow(pCaster, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE); + } + + //always return true when we are handling this spell and effect + return true; + } + return false; +} + +bool GossipHello_npc_aged_dying_ancient_kodo(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->HasAura(SPELL_KODO_KOMBO_PLAYER_BUFF) && pCreature->HasAura(SPELL_KODO_KOMBO_DESPAWN_BUFF)) + { + //the expected quest objective + pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetGUID()); + + pPlayer->RemoveAurasDueToSpell(SPELL_KODO_KOMBO_PLAYER_BUFF); + pCreature->GetMotionMaster()->MoveIdle(); + } + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +void AddSC_desolace() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_aged_dying_ancient_kodo"; + newscript->GetAI = &GetAI_npc_aged_dying_ancient_kodo; + newscript->pEffectDummyCreature = &EffectDummyCreature_npc_aged_dying_ancient_kodo; + newscript->pGossipHello = &GossipHello_npc_aged_dying_ancient_kodo; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/dustwallow_marsh.cpp b/scripts/kalimdor/dustwallow_marsh.cpp new file mode 100644 index 000000000..e2dd7767a --- /dev/null +++ b/scripts/kalimdor/dustwallow_marsh.cpp @@ -0,0 +1,871 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Dustwallow_Marsh +SD%Complete: 95 +SDComment: Quest support: 558, 1173, 1273, 1324, 11126, 11142, 11180. Vendor Nat Pagle +SDCategory: Dustwallow Marsh +EndScriptData */ + +/* ContentData +mobs_risen_husk_spirit +npc_restless_apparition +npc_deserter_agitator +npc_lady_jaina_proudmoore +npc_morokk +npc_nat_pagle +npc_ogron +npc_private_hendel +npc_cassa_crimsonwing +EndContentData */ + +#include "precompiled.h" +#include "escort_ai.h" + +/*###### +## mobs_risen_husk_spirit +######*/ + +enum +{ + QUEST_WHATS_HAUNTING_WITCH_HILL = 11180, + SPELL_SUMMON_RESTLESS_APPARITION = 42511, + SPELL_CONSUME_FLESH = 37933, //Risen Husk + SPELL_INTANGIBLE_PRESENCE = 43127, //Risen Spirit + NPC_RISEN_HUSK = 23555, + NPC_RISEN_SPIRIT = 23554 +}; + + +struct MANGOS_DLL_DECL mobs_risen_husk_spiritAI : public ScriptedAI +{ + mobs_risen_husk_spiritAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 m_uiConsumeFlesh_Timer; + uint32 m_uiIntangiblePresence_Timer; + + Player* m_pCreditPlayer; + + void Reset() + { + m_uiConsumeFlesh_Timer = 10000; + m_uiIntangiblePresence_Timer = 5000; + + m_pCreditPlayer = NULL; + } + + void JustSummoned(Creature* pSummoned) + { + if (m_pCreditPlayer) + m_pCreditPlayer->KilledMonsterCredit(pSummoned->GetEntry(), pSummoned->GetGUID()); + } + + void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + { + if (uiDamage < m_creature->GetHealth()) + return; + + if (Player* pPlayer = pDoneBy->GetCharmerOrOwnerPlayerOrPlayerItself()) + { + if (pPlayer->GetQuestStatus(QUEST_WHATS_HAUNTING_WITCH_HILL) == QUEST_STATUS_INCOMPLETE) + { + m_pCreditPlayer = pPlayer; + m_creature->CastSpell(pDoneBy, SPELL_SUMMON_RESTLESS_APPARITION, true); + } + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiConsumeFlesh_Timer < uiDiff) + { + if (m_creature->GetEntry() == NPC_RISEN_HUSK) + DoCast(m_creature->getVictim(),SPELL_CONSUME_FLESH); + + m_uiConsumeFlesh_Timer = 15000; + } + else + m_uiConsumeFlesh_Timer -= uiDiff; + + if (m_uiIntangiblePresence_Timer < uiDiff) + { + if (m_creature->GetEntry() == NPC_RISEN_SPIRIT) + DoCast(m_creature->getVictim(),SPELL_INTANGIBLE_PRESENCE); + + m_uiIntangiblePresence_Timer = 20000; + } + else + m_uiIntangiblePresence_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mobs_risen_husk_spirit(Creature* pCreature) +{ + return new mobs_risen_husk_spiritAI(pCreature); +} + +/*###### +## npc_restless_apparition +######*/ + +enum +{ + SAY_RAND_1 = -1000543, + SAY_RAND_2 = -1000544, + SAY_RAND_3 = -1000545, + SAY_RAND_4 = -1000546, + SAY_RAND_5 = -1000547, + SAY_RAND_6 = -1000548, + SAY_RAND_7 = -1000549, + SAY_RAND_8 = -1000550 +}; + +struct MANGOS_DLL_DECL npc_restless_apparitionAI : public ScriptedAI +{ + npc_restless_apparitionAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 m_uiTalk_Timer; + + void Reset() + { + m_uiTalk_Timer = 1000; + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_uiTalk_Timer) + return; + + if (m_uiTalk_Timer <= uiDiff) + { + switch(urand(0, 7)) + { + case 0: DoScriptText(SAY_RAND_1, m_creature); break; + case 1: DoScriptText(SAY_RAND_2, m_creature); break; + case 2: DoScriptText(SAY_RAND_3, m_creature); break; + case 3: DoScriptText(SAY_RAND_4, m_creature); break; + case 4: DoScriptText(SAY_RAND_5, m_creature); break; + case 5: DoScriptText(SAY_RAND_6, m_creature); break; + case 6: DoScriptText(SAY_RAND_7, m_creature); break; + case 7: DoScriptText(SAY_RAND_8, m_creature); break; + } + + m_uiTalk_Timer = 0; + } + else + m_uiTalk_Timer -= uiDiff; + } +}; + +CreatureAI* GetAI_npc_restless_apparition(Creature* pCreature) +{ + return new npc_restless_apparitionAI(pCreature); +} + +/*###### +## npc_deserter_agitator +######*/ + +enum +{ + QUEST_TRAITORS_AMONG_US = 11126, + FACTION_THER_DESERTER = 1883 +}; + +struct MANGOS_DLL_DECL npc_deserter_agitatorAI : public ScriptedAI +{ + npc_deserter_agitatorAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + void Reset() + { + m_creature->setFaction(m_creature->GetCreatureInfo()->faction_A); + } +}; + +CreatureAI* GetAI_npc_deserter_agitator(Creature* pCreature) +{ + return new npc_deserter_agitatorAI(pCreature); +} + +bool GossipHello_npc_deserter_agitator(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->GetQuestStatus(QUEST_TRAITORS_AMONG_US) == QUEST_STATUS_INCOMPLETE) + { + pCreature->setFaction(FACTION_THER_DESERTER); + pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetGUID()); + } + else + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + + return true; +} + +/*###### +## npc_lady_jaina_proudmoore +######*/ + +enum +{ + QUEST_JAINAS_AUTOGRAPH = 558, + SPELL_JAINAS_AUTOGRAPH = 23122 +}; + +#define GOSSIP_ITEM_JAINA "I know this is rather silly but i have a young ward who is a bit shy and would like your autograph." + +bool GossipHello_npc_lady_jaina_proudmoore(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestStatus(QUEST_JAINAS_AUTOGRAPH) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_JAINA, GOSSIP_SENDER_MAIN, GOSSIP_SENDER_INFO); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_lady_jaina_proudmoore(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_SENDER_INFO) + { + pPlayer->SEND_GOSSIP_MENU(7012, pCreature->GetGUID()); + pPlayer->CastSpell(pPlayer, SPELL_JAINAS_AUTOGRAPH, false); + } + return true; +} + +/*###### +## npc_morokk +######*/ + +enum +{ + SAY_MOR_CHALLENGE = -1000499, + SAY_MOR_SCARED = -1000500, + + QUEST_CHALLENGE_MOROKK = 1173, + + FACTION_MOR_HOSTILE = 168, + FACTION_MOR_RUNNING = 35 +}; + +struct MANGOS_DLL_DECL npc_morokkAI : public npc_escortAI +{ + npc_morokkAI(Creature* pCreature) : npc_escortAI(pCreature) + { + m_bIsSuccess = false; + Reset(); + } + + bool m_bIsSuccess; + + void Reset() {} + + void WaypointReached(uint32 uiPointId) + { + switch(uiPointId) + { + case 0: + SetEscortPaused(true); + break; + case 1: + if (m_bIsSuccess) + DoScriptText(SAY_MOR_SCARED, m_creature); + else + { + m_creature->setDeathState(JUST_DIED); + m_creature->Respawn(); + } + break; + } + } + + void AttackedBy(Unit* pAttacker) + { + if (m_creature->getVictim()) + return; + + if (m_creature->IsFriendlyTo(pAttacker)) + return; + + AttackStart(pAttacker); + } + + void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + { + if (HasEscortState(STATE_ESCORT_ESCORTING)) + { + if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 30) + { + if (Player* pPlayer = GetPlayerForEscort()) + pPlayer->GroupEventHappens(QUEST_CHALLENGE_MOROKK, m_creature); + + m_creature->setFaction(FACTION_MOR_RUNNING); + + m_bIsSuccess = true; + EnterEvadeMode(); + + uiDamage = 0; + } + } + } + + void UpdateEscortAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + { + if (HasEscortState(STATE_ESCORT_PAUSED)) + { + if (Player* pPlayer = GetPlayerForEscort()) + { + m_bIsSuccess = false; + DoScriptText(SAY_MOR_CHALLENGE, m_creature, pPlayer); + m_creature->setFaction(FACTION_MOR_HOSTILE); + AttackStart(pPlayer); + } + + SetEscortPaused(false); + } + + return; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_morokk(Creature* pCreature) +{ + return new npc_morokkAI(pCreature); +} + +bool QuestAccept_npc_morokk(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_CHALLENGE_MOROKK) + { + if (npc_morokkAI* pEscortAI = dynamic_cast(pCreature->AI())) + pEscortAI->Start(true, true, pPlayer->GetGUID(), pQuest); + + return true; + } + + return false; +} +/*###### +## npc_nat_pagle +######*/ + +enum +{ + QUEST_NATS_MEASURING_TAPE = 8227 +}; + +bool GossipHello_npc_nat_pagle(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pCreature->isVendor() && pPlayer->GetQuestRewardStatus(QUEST_NATS_MEASURING_TAPE)) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); + pPlayer->SEND_GOSSIP_MENU(7640, pCreature->GetGUID()); + } + else + pPlayer->SEND_GOSSIP_MENU(7638, pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_nat_pagle(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_TRADE) + pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + + return true; +} + +/*###### +## npc_ogron +######*/ + +enum +{ + SAY_OGR_START = -1000452, + SAY_OGR_SPOT = -1000453, + SAY_OGR_RET_WHAT = -1000454, + SAY_OGR_RET_SWEAR = -1000455, + SAY_OGR_REPLY_RET = -1000456, + SAY_OGR_RET_TAKEN = -1000457, + SAY_OGR_TELL_FIRE = -1000458, + SAY_OGR_RET_NOCLOSER = -1000459, + SAY_OGR_RET_NOFIRE = -1000460, + SAY_OGR_RET_HEAR = -1000461, + SAY_OGR_CAL_FOUND = -1000462, + SAY_OGR_CAL_MERCY = -1000463, + SAY_OGR_HALL_GLAD = -1000464, + EMOTE_OGR_RET_ARROW = -1000465, + SAY_OGR_RET_ARROW = -1000466, + SAY_OGR_CAL_CLEANUP = -1000467, + SAY_OGR_NODIE = -1000468, + SAY_OGR_SURVIVE = -1000469, + SAY_OGR_RET_LUCKY = -1000470, + SAY_OGR_THANKS = -1000471, + + QUEST_QUESTIONING = 1273, + + FACTION_GENERIC_FRIENDLY = 35, + FACTION_THER_HOSTILE = 151, + + NPC_REETHE = 4980, + NPC_CALDWELL = 5046, + NPC_HALLAN = 5045, + NPC_SKIRMISHER = 5044, + + SPELL_FAKE_SHOT = 7105, + + PHASE_INTRO = 0, + PHASE_GUESTS = 1, + PHASE_FIGHT = 2, + PHASE_COMPLETE = 3 +}; + +static float m_afSpawn[]= {-3383.501953, -3203.383301, 36.149}; +static float m_afMoveTo[]= {-3371.414795, -3212.179932, 34.210}; + +struct MANGOS_DLL_DECL npc_ogronAI : public npc_escortAI +{ + npc_ogronAI(Creature* pCreature) : npc_escortAI(pCreature) + { + lCreatureList.clear(); + m_uiPhase = 0; + m_uiPhaseCounter = 0; + Reset(); + } + + std::list lCreatureList; + + uint32 m_uiPhase; + uint32 m_uiPhaseCounter; + uint32 m_uiGlobalTimer; + + void Reset() + { + m_uiGlobalTimer = 5000; + + if (HasEscortState(STATE_ESCORT_PAUSED) && m_uiPhase == PHASE_FIGHT) + m_uiPhase = PHASE_COMPLETE; + + if (!HasEscortState(STATE_ESCORT_ESCORTING)) + { + lCreatureList.clear(); + m_uiPhase = 0; + m_uiPhaseCounter = 0; + } + } + + void MoveInLineOfSight(Unit* pWho) + { + if (HasEscortState(STATE_ESCORT_ESCORTING) && pWho->GetEntry() == NPC_REETHE && lCreatureList.empty()) + lCreatureList.push_back((Creature*)pWho); + + npc_escortAI::MoveInLineOfSight(pWho); + } + + Creature* GetCreature(uint32 uiCreatureEntry) + { + if (!lCreatureList.empty()) + { + for(std::list::iterator itr = lCreatureList.begin(); itr != lCreatureList.end(); ++itr) + { + if ((*itr)->GetEntry() == uiCreatureEntry && (*itr)->isAlive()) + return (*itr); + } + } + + return NULL; + } + + void WaypointReached(uint32 uiPointId) + { + switch(uiPointId) + { + case 9: + DoScriptText(SAY_OGR_SPOT, m_creature); + break; + case 10: + if (Creature* pReethe = GetCreature(NPC_REETHE)) + DoScriptText(SAY_OGR_RET_WHAT, pReethe); + break; + case 11: + SetEscortPaused(true); + break; + } + } + + void JustSummoned(Creature* pSummoned) + { + lCreatureList.push_back(pSummoned); + + pSummoned->setFaction(FACTION_GENERIC_FRIENDLY); + + if (pSummoned->GetEntry() == NPC_CALDWELL) + pSummoned->GetMotionMaster()->MovePoint(0, m_afMoveTo[0], m_afMoveTo[1], m_afMoveTo[2]); + else + { + if (Creature* pCaldwell = GetCreature(NPC_CALDWELL)) + { + //will this conversion work without compile warning/error? + size_t iSize = lCreatureList.size(); + pSummoned->GetMotionMaster()->MoveFollow(pCaldwell, 0.5f, (M_PI/2)*(int)iSize); + } + } + } + + void DoStartAttackMe() + { + if (!lCreatureList.empty()) + { + for(std::list::iterator itr = lCreatureList.begin(); itr != lCreatureList.end(); ++itr) + { + if ((*itr)->GetEntry() == NPC_REETHE) + continue; + + if ((*itr)->isAlive()) + { + (*itr)->setFaction(FACTION_THER_HOSTILE); + (*itr)->AI()->AttackStart(m_creature); + } + } + } + } + + void UpdateEscortAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + { + if (HasEscortState(STATE_ESCORT_PAUSED)) + { + if (m_uiGlobalTimer < uiDiff) + { + m_uiGlobalTimer = 5000; + + switch(m_uiPhase) + { + case PHASE_INTRO: + { + switch(m_uiPhaseCounter) + { + case 0: + if (Creature* pReethe = GetCreature(NPC_REETHE)) + DoScriptText(SAY_OGR_RET_SWEAR, pReethe); + break; + case 1: + DoScriptText(SAY_OGR_REPLY_RET, m_creature); + break; + case 2: + if (Creature* pReethe = GetCreature(NPC_REETHE)) + DoScriptText(SAY_OGR_RET_TAKEN, pReethe); + break; + case 3: + DoScriptText(SAY_OGR_TELL_FIRE, m_creature); + if (Creature* pReethe = GetCreature(NPC_REETHE)) + DoScriptText(SAY_OGR_RET_NOCLOSER, pReethe); + break; + case 4: + if (Creature* pReethe = GetCreature(NPC_REETHE)) + DoScriptText(SAY_OGR_RET_NOFIRE, pReethe); + break; + case 5: + if (Creature* pReethe = GetCreature(NPC_REETHE)) + DoScriptText(SAY_OGR_RET_HEAR, pReethe); + + m_creature->SummonCreature(NPC_CALDWELL, m_afSpawn[0], m_afSpawn[1], m_afSpawn[2], 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 300000); + m_creature->SummonCreature(NPC_HALLAN, m_afSpawn[0], m_afSpawn[1], m_afSpawn[2], 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 300000); + m_creature->SummonCreature(NPC_SKIRMISHER, m_afSpawn[0], m_afSpawn[1], m_afSpawn[2], 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 300000); + m_creature->SummonCreature(NPC_SKIRMISHER, m_afSpawn[0], m_afSpawn[1], m_afSpawn[2], 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 300000); + + m_uiPhase = PHASE_GUESTS; + break; + } + break; + } + case PHASE_GUESTS: + { + switch(m_uiPhaseCounter) + { + case 6: + if (Creature* pCaldwell = GetCreature(NPC_CALDWELL)) + DoScriptText(SAY_OGR_CAL_FOUND, pCaldwell); + break; + case 7: + if (Creature* pCaldwell = GetCreature(NPC_CALDWELL)) + DoScriptText(SAY_OGR_CAL_MERCY, pCaldwell); + break; + case 8: + if (Creature* pHallan = GetCreature(NPC_HALLAN)) + { + DoScriptText(SAY_OGR_HALL_GLAD, pHallan); + + if (Creature* pReethe = GetCreature(NPC_REETHE)) + pHallan->CastSpell(pReethe, SPELL_FAKE_SHOT, false); + } + break; + case 9: + if (Creature* pReethe = GetCreature(NPC_REETHE)) + { + DoScriptText(EMOTE_OGR_RET_ARROW, pReethe); + DoScriptText(SAY_OGR_RET_ARROW, pReethe); + } + break; + case 10: + if (Creature* pCaldwell = GetCreature(NPC_CALDWELL)) + DoScriptText(SAY_OGR_CAL_CLEANUP, pCaldwell); + + DoScriptText(SAY_OGR_NODIE, m_creature); + break; + case 11: + DoStartAttackMe(); + m_uiPhase = PHASE_FIGHT; + break; + } + break; + } + case PHASE_COMPLETE: + { + switch(m_uiPhaseCounter) + { + case 12: + if (Player* pPlayer = GetPlayerForEscort()) + pPlayer->GroupEventHappens(QUEST_QUESTIONING, m_creature); + + DoScriptText(SAY_OGR_SURVIVE, m_creature); + break; + case 13: + if (Creature* pReethe = GetCreature(NPC_REETHE)) + DoScriptText(SAY_OGR_RET_LUCKY, pReethe); + break; + case 14: + DoScriptText(SAY_OGR_THANKS, m_creature); + SetRun(); + SetEscortPaused(false); + break; + } + break; + } + } + + if (m_uiPhase != PHASE_FIGHT) + ++m_uiPhaseCounter; + } + else + m_uiGlobalTimer -= uiDiff; + } + + return; + } + + DoMeleeAttackIfReady(); + } +}; + +bool QuestAccept_npc_ogron(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_QUESTIONING) + { + if (npc_ogronAI* pEscortAI = dynamic_cast(pCreature->AI())) + { + pEscortAI->Start(false, false, pPlayer->GetGUID(), pQuest, true); + pCreature->setFaction(FACTION_ESCORT_N_FRIEND_PASSIVE); + DoScriptText(SAY_OGR_START, pCreature, pPlayer); + } + } + + return true; +} + +CreatureAI* GetAI_npc_ogron(Creature* pCreature) +{ + return new npc_ogronAI(pCreature); +} + +/*###### +## npc_private_hendel +######*/ + +enum +{ + SAY_PROGRESS_1_TER = -1000411, + SAY_PROGRESS_2_HEN = -1000412, + SAY_PROGRESS_3_TER = -1000413, + SAY_PROGRESS_4_TER = -1000414, + EMOTE_SURRENDER = -1000415, + + QUEST_MISSING_DIPLO_PT16 = 1324, + FACTION_HOSTILE = 168, //guessed, may be different + + NPC_SENTRY = 5184, //helps hendel + NPC_JAINA = 4968, //appears once hendel gives up + NPC_TERVOSH = 4967 +}; + +//TODO: develop this further, end event not created +struct MANGOS_DLL_DECL npc_private_hendelAI : public ScriptedAI +{ + npc_private_hendelAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + void Reset() + { + if (m_creature->getFaction() != m_creature->GetCreatureInfo()->faction_A) + m_creature->setFaction(m_creature->GetCreatureInfo()->faction_A); + } + + void AttackedBy(Unit* pAttacker) + { + if (m_creature->getVictim()) + return; + + if (m_creature->IsFriendlyTo(pAttacker)) + return; + + AttackStart(pAttacker); + } + + void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + { + if (uiDamage > m_creature->GetHealth() || ((m_creature->GetHealth() - uiDamage)*100 / m_creature->GetMaxHealth() < 20)) + { + uiDamage = 0; + + if (Player* pPlayer = pDoneBy->GetCharmerOrOwnerPlayerOrPlayerItself()) + pPlayer->GroupEventHappens(QUEST_MISSING_DIPLO_PT16, m_creature); + + DoScriptText(EMOTE_SURRENDER, m_creature); + EnterEvadeMode(); + } + } +}; + +bool QuestAccept_npc_private_hendel(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_MISSING_DIPLO_PT16) + pCreature->setFaction(FACTION_HOSTILE); + + return true; +} + +CreatureAI* GetAI_npc_private_hendel(Creature* pCreature) +{ + return new npc_private_hendelAI(pCreature); +} + +/*###### +## npc_cassa_crimsonwing +######*/ + +enum +{ + QUEST_SURVEY_ALCAZ = 11142, + SPELL_ALCAZ_SURVEY = 42295 +}; + +#define GOSSIP_RIDE "" + +bool GossipHello_npc_cassa_crimsonwing(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->GetQuestStatus(QUEST_SURVEY_ALCAZ) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_RIDE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_cassa_crimsonwing(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->CastSpell(pPlayer, SPELL_ALCAZ_SURVEY, false); + } + return true; +} + +/*###### +## +######*/ + +void AddSC_dustwallow_marsh() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "mobs_risen_husk_spirit"; + newscript->GetAI = &GetAI_mobs_risen_husk_spirit; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_restless_apparition"; + newscript->GetAI = &GetAI_npc_restless_apparition; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_deserter_agitator"; + newscript->GetAI = &GetAI_npc_deserter_agitator; + newscript->pGossipHello = &GossipHello_npc_deserter_agitator; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_lady_jaina_proudmoore"; + newscript->pGossipHello = &GossipHello_npc_lady_jaina_proudmoore; + newscript->pGossipSelect = &GossipSelect_npc_lady_jaina_proudmoore; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_morokk"; + newscript->GetAI = &GetAI_npc_morokk; + newscript->pQuestAccept = &QuestAccept_npc_morokk; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_nat_pagle"; + newscript->pGossipHello = &GossipHello_npc_nat_pagle; + newscript->pGossipSelect = &GossipSelect_npc_nat_pagle; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_ogron"; + newscript->GetAI = &GetAI_npc_ogron; + newscript->pQuestAccept = &QuestAccept_npc_ogron; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_private_hendel"; + newscript->GetAI = &GetAI_npc_private_hendel; + newscript->pQuestAccept = &QuestAccept_npc_private_hendel; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_cassa_crimsonwing"; + newscript->pGossipHello = &GossipHello_npc_cassa_crimsonwing; + newscript->pGossipSelect = &GossipSelect_npc_cassa_crimsonwing; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/felwood.cpp b/scripts/kalimdor/felwood.cpp new file mode 100644 index 000000000..1c7a8e949 --- /dev/null +++ b/scripts/kalimdor/felwood.cpp @@ -0,0 +1,232 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Felwood +SD%Complete: 95 +SDComment: Quest support: related to 4101/4102 (To obtain Cenarion Beacon), 4506 +SDCategory: Felwood +EndScriptData */ + +/* ContentData +npc_kitten +npcs_riverbreeze_and_silversky +EndContentData */ + +#include "precompiled.h" +#include "follower_ai.h" +#include "ObjectMgr.h" + +/*#### +# npc_kitten +####*/ + +enum +{ + EMOTE_SAB_JUMP = -1000541, + EMOTE_SAB_FOLLOW = -1000542, + + SPELL_CORRUPT_SABER_VISUAL = 16510, + + QUEST_CORRUPT_SABER = 4506, + NPC_WINNA = 9996, + NPC_CORRUPT_SABER = 10042 +}; + +#define GOSSIP_ITEM_RELEASE "I want to release the corrupted saber to Winna." + +struct MANGOS_DLL_DECL npc_kittenAI : public FollowerAI +{ + npc_kittenAI(Creature* pCreature) : FollowerAI(pCreature) + { + if (pCreature->GetOwner() && pCreature->GetOwner()->GetTypeId() == TYPEID_PLAYER) + { + StartFollow((Player*)pCreature->GetOwner()); + SetFollowPaused(true); + DoScriptText(EMOTE_SAB_JUMP, m_creature); + + pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + + //find a decent way to move to center of moonwell + } + + m_uiMoonwellCooldown = 7500; + Reset(); + } + + uint32 m_uiMoonwellCooldown; + + void Reset() { } + + void MoveInLineOfSight(Unit *pWho) + { + //should not have npcflag by default, so set when expected + if (!m_creature->getVictim() && !m_creature->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP) && HasFollowState(STATE_FOLLOW_INPROGRESS) && pWho->GetEntry() == NPC_WINNA) + { + if (m_creature->IsWithinDistInMap(pWho, INTERACTION_DISTANCE)) + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + } + } + + void UpdateFollowerAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + { + if (HasFollowState(STATE_FOLLOW_PAUSED)) + { + if (m_uiMoonwellCooldown < uiDiff) + { + m_creature->CastSpell(m_creature, SPELL_CORRUPT_SABER_VISUAL, false); + SetFollowPaused(false); + } + else + m_uiMoonwellCooldown -= uiDiff; + } + + return; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_kitten(Creature* pCreature) +{ + return new npc_kittenAI(pCreature); +} + +bool EffectDummyCreature_npc_kitten(Unit* pCaster, uint32 uiSpellId, uint32 uiEffIndex, Creature* pCreatureTarget) +{ + //always check spellid and effectindex + if (uiSpellId == SPELL_CORRUPT_SABER_VISUAL && uiEffIndex == 0) + { + // Not nice way, however using UpdateEntry will not be correct. + if (const CreatureInfo* pTemp = GetCreatureTemplateStore(NPC_CORRUPT_SABER)) + { + pCreatureTarget->SetEntry(pTemp->Entry); + pCreatureTarget->SetDisplayId(pTemp->DisplayID_A[0]); + pCreatureTarget->SetName(pTemp->Name); + pCreatureTarget->SetFloatValue(OBJECT_FIELD_SCALE_X, pTemp->scale); + } + + if (Unit* pOwner = pCreatureTarget->GetOwner()) + DoScriptText(EMOTE_SAB_FOLLOW, pCreatureTarget, pOwner); + + //always return true when we are handling this spell and effect + return true; + } + return false; +} + +bool GossipHello_npc_corrupt_saber(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->GetQuestStatus(QUEST_CORRUPT_SABER) == QUEST_STATUS_INCOMPLETE) + { + if (GetClosestCreatureWithEntry(pCreature, NPC_WINNA, INTERACTION_DISTANCE)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_RELEASE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + } + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_corrupt_saber(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + pPlayer->CLOSE_GOSSIP_MENU(); + + if (npc_kittenAI* pKittenAI = dynamic_cast(pCreature->AI())) + pKittenAI->SetFollowComplete(); + + pPlayer->AreaExploredOrEventHappens(QUEST_CORRUPT_SABER); + } + + return true; +} + +/*###### +## npcs_riverbreeze_and_silversky +######*/ + +#define GOSSIP_ITEM_BEACON "Please make me a Cenarion Beacon" + +bool GossipHello_npcs_riverbreeze_and_silversky(Player* pPlayer, Creature* pCreature) +{ + uint32 eCreature = pCreature->GetEntry(); + + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (eCreature==9528) + { + if (pPlayer->GetQuestRewardStatus(4101)) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BEACON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(2848, pCreature->GetGUID()); + }else if (pPlayer->GetTeam()==HORDE) + pPlayer->SEND_GOSSIP_MENU(2845, pCreature->GetGUID()); + else + pPlayer->SEND_GOSSIP_MENU(2844, pCreature->GetGUID()); + } + + if (eCreature==9529) + { + if (pPlayer->GetQuestRewardStatus(4102)) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BEACON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(2849, pCreature->GetGUID()); + }else if (pPlayer->GetTeam()==ALLIANCE) + pPlayer->SEND_GOSSIP_MENU(2843, pCreature->GetGUID()); + else + pPlayer->SEND_GOSSIP_MENU(2842, pCreature->GetGUID()); + } + + return true; +} + +bool GossipSelect_npcs_riverbreeze_and_silversky(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction==GOSSIP_ACTION_INFO_DEF+1) + { + pPlayer->CLOSE_GOSSIP_MENU(); + pCreature->CastSpell(pPlayer, 15120, false); + } + return true; +} + +void AddSC_felwood() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_kitten"; + newscript->GetAI = &GetAI_npc_kitten; + newscript->pEffectDummyCreature = &EffectDummyCreature_npc_kitten; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_corrupt_saber"; + newscript->pGossipHello = &GossipHello_npc_corrupt_saber; + newscript->pGossipSelect = &GossipSelect_npc_corrupt_saber; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npcs_riverbreeze_and_silversky"; + newscript->pGossipHello = &GossipHello_npcs_riverbreeze_and_silversky; + newscript->pGossipSelect = &GossipSelect_npcs_riverbreeze_and_silversky; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/feralas.cpp b/scripts/kalimdor/feralas.cpp new file mode 100644 index 000000000..6ec5f20e7 --- /dev/null +++ b/scripts/kalimdor/feralas.cpp @@ -0,0 +1,200 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Feralas +SD%Complete: 100 +SDComment: Quest support: 3520, 2767. Special vendor Gregan Brewspewer +SDCategory: Feralas +EndScriptData */ + +#include "precompiled.h" +#include "escort_ai.h" + +/*###### +## npc_gregan_brewspewer +######*/ + +bool GossipHello_npc_gregan_brewspewer(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pCreature->isVendor() && pPlayer->GetQuestStatus(3909) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Buy somethin', will ya?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + pPlayer->SEND_GOSSIP_MENU(2433, pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_gregan_brewspewer(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); + pPlayer->SEND_GOSSIP_MENU(2434, pCreature->GetGUID()); + } + if (uiAction == GOSSIP_ACTION_TRADE) + pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + return true; +} + +/*###### +## npc_oox22fe +######*/ + +enum +{ + SAY_OOX_START = -1000287, + SAY_OOX_AGGRO1 = -1000288, + SAY_OOX_AGGRO2 = -1000289, + SAY_OOX_AMBUSH = -1000290, + SAY_OOX_END = -1000292, + + NPC_YETI = 7848, + NPC_GORILLA = 5260, + NPC_WOODPAW_REAVER = 5255, + NPC_WOODPAW_BRUTE = 5253, + NPC_WOODPAW_ALPHA = 5258, + NPC_WOODPAW_MYSTIC = 5254, + + QUEST_RESCUE_OOX22FE = 2767 +}; + +struct MANGOS_DLL_DECL npc_oox22feAI : public npc_escortAI +{ + npc_oox22feAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } + + void WaypointReached(uint32 i) + { + switch (i) + { + // First Ambush(3 Yetis) + case 11: + DoScriptText(SAY_OOX_AMBUSH,m_creature); + m_creature->SummonCreature(NPC_YETI, -4841.01, 1593.91, 73.42, 3.98, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); + m_creature->SummonCreature(NPC_YETI, -4837.61, 1568.58, 78.21, 3.13, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); + m_creature->SummonCreature(NPC_YETI, -4841.89, 1569.95, 76.53, 0.68, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); + break; + //Second Ambush(3 Gorillas) + case 21: + DoScriptText(SAY_OOX_AMBUSH,m_creature); + m_creature->SummonCreature(NPC_GORILLA, -4595.81, 2005.99, 53.08, 3.74, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); + m_creature->SummonCreature(NPC_GORILLA, -4597.53, 2008.31, 52.70, 3.78, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); + m_creature->SummonCreature(NPC_GORILLA, -4599.37, 2010.59, 52.77, 3.84, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); + break; + //Third Ambush(4 Gnolls) + case 30: + DoScriptText(SAY_OOX_AMBUSH,m_creature); + m_creature->SummonCreature(NPC_WOODPAW_REAVER, -4425.14, 2075.87, 47.77, 3.77, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); + m_creature->SummonCreature(NPC_WOODPAW_BRUTE , -4426.68, 2077.98, 47.57, 3.77, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); + m_creature->SummonCreature(NPC_WOODPAW_MYSTIC, -4428.33, 2080.24, 47.43, 3.87, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); + m_creature->SummonCreature(NPC_WOODPAW_ALPHA , -4430.04, 2075.54, 46.83, 3.81, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); + break; + case 37: + DoScriptText(SAY_OOX_END,m_creature); + // Award quest credit + if (Player* pPlayer = GetPlayerForEscort()) + pPlayer->GroupEventHappens(QUEST_RESCUE_OOX22FE, m_creature); + break; + } + } + + void Reset() + { + if (!HasEscortState(STATE_ESCORT_ESCORTING)) + m_creature->SetStandState(UNIT_STAND_STATE_DEAD); + } + + void Aggro(Unit* who) + { + //For an small probability the npc says something when he get aggro + switch(urand(0, 9)) + { + case 0: DoScriptText(SAY_OOX_AGGRO1, m_creature); break; + case 1: DoScriptText(SAY_OOX_AGGRO2, m_creature); break; + } + } + + void JustSummoned(Creature* summoned) + { + summoned->AI()->AttackStart(m_creature); + } +}; + +CreatureAI* GetAI_npc_oox22fe(Creature* pCreature) +{ + return new npc_oox22feAI(pCreature); +} + +bool QuestAccept_npc_oox22fe(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_RESCUE_OOX22FE) + { + DoScriptText(SAY_OOX_START, pCreature); + //change that the npc is not lying dead on the ground + pCreature->SetStandState(UNIT_STAND_STATE_STAND); + + if (pPlayer->GetTeam() == ALLIANCE) + pCreature->setFaction(FACTION_ESCORT_A_PASSIVE); + + if (pPlayer->GetTeam() == HORDE) + pCreature->setFaction(FACTION_ESCORT_H_PASSIVE); + + if (npc_oox22feAI* pEscortAI = dynamic_cast(pCreature->AI())) + pEscortAI->Start(true, false, pPlayer->GetGUID(), pQuest); + } + return true; +} + +/*###### +## npc_screecher_spirit +######*/ + +bool GossipHello_npc_screecher_spirit(Player* pPlayer, Creature* pCreature) +{ + pPlayer->SEND_GOSSIP_MENU(2039, pCreature->GetGUID()); + pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetGUID()); + pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + return true; +} + +/*###### +## AddSC +######*/ + +void AddSC_feralas() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_gregan_brewspewer"; + newscript->pGossipHello = &GossipHello_npc_gregan_brewspewer; + newscript->pGossipSelect = &GossipSelect_npc_gregan_brewspewer; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_oox22fe"; + newscript->GetAI = &GetAI_npc_oox22fe; + newscript->pQuestAccept = &QuestAccept_npc_oox22fe; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_screecher_spirit"; + newscript->pGossipHello = &GossipHello_npc_screecher_spirit; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/maraudon/boss_celebras_the_cursed.cpp b/scripts/kalimdor/maraudon/boss_celebras_the_cursed.cpp new file mode 100644 index 000000000..6af4f6a96 --- /dev/null +++ b/scripts/kalimdor/maraudon/boss_celebras_the_cursed.cpp @@ -0,0 +1,95 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Celebras_the_Cursed +SD%Complete: 100 +SDComment: +SDCategory: Maraudon +EndScriptData */ + +#include "precompiled.h" + +#define SPELL_WRATH 21807 +#define SPELL_ENTANGLINGROOTS 12747 +#define SPELL_CORRUPT_FORCES 21968 + +struct MANGOS_DLL_DECL celebras_the_cursedAI : public ScriptedAI +{ + celebras_the_cursedAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 Wrath_Timer; + uint32 EntanglingRoots_Timer; + uint32 CorruptForces_Timer; + + void Reset() + { + Wrath_Timer = 8000; + EntanglingRoots_Timer = 2000; + CorruptForces_Timer = 30000; + } + + void JustDied(Unit* Killer) + { + m_creature->SummonCreature(13716, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 600000); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Wrath + if (Wrath_Timer < diff) + { + Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM,0); + if (target) + DoCast(target,SPELL_WRATH); + Wrath_Timer = 8000; + }else Wrath_Timer -= diff; + + //EntanglingRoots + if (EntanglingRoots_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_ENTANGLINGROOTS); + EntanglingRoots_Timer = 20000; + }else EntanglingRoots_Timer -= diff; + + //CorruptForces + if (CorruptForces_Timer < diff) + { + m_creature->InterruptNonMeleeSpells(false); + DoCast(m_creature,SPELL_CORRUPT_FORCES); + CorruptForces_Timer = 20000; + }else CorruptForces_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_celebras_the_cursed(Creature* pCreature) +{ + return new celebras_the_cursedAI(pCreature); +} + +void AddSC_boss_celebras_the_cursed() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "celebras_the_cursed"; + newscript->GetAI = &GetAI_celebras_the_cursed; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/maraudon/boss_landslide.cpp b/scripts/kalimdor/maraudon/boss_landslide.cpp new file mode 100644 index 000000000..16648b028 --- /dev/null +++ b/scripts/kalimdor/maraudon/boss_landslide.cpp @@ -0,0 +1,90 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Landslide +SD%Complete: 100 +SDComment: +SDCategory: Maraudon +EndScriptData */ + +#include "precompiled.h" + +#define SPELL_KNOCKAWAY 18670 +#define SPELL_TRAMPLE 5568 +#define SPELL_LANDSLIDE 21808 + +struct MANGOS_DLL_DECL boss_landslideAI : public ScriptedAI +{ + boss_landslideAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 KnockAway_Timer; + uint32 Trample_Timer; + uint32 Landslide_Timer; + + void Reset() + { + KnockAway_Timer = 8000; + Trample_Timer = 2000; + Landslide_Timer = 0; + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //KnockAway_Timer + if (KnockAway_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_KNOCKAWAY); + KnockAway_Timer = 15000; + }else KnockAway_Timer -= diff; + + //Trample_Timer + if (Trample_Timer < diff) + { + DoCast(m_creature,SPELL_TRAMPLE); + Trample_Timer = 8000; + }else Trample_Timer -= diff; + + //Landslide + if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 50) + { + if (Landslide_Timer < diff) + { + m_creature->InterruptNonMeleeSpells(false); + DoCast(m_creature,SPELL_LANDSLIDE); + Landslide_Timer = 60000; + } else Landslide_Timer -= diff; + } + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_landslide(Creature* pCreature) +{ + return new boss_landslideAI(pCreature); +} + +void AddSC_boss_landslide() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_landslide"; + newscript->GetAI = &GetAI_boss_landslide; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/maraudon/boss_noxxion.cpp b/scripts/kalimdor/maraudon/boss_noxxion.cpp new file mode 100644 index 000000000..e238683a1 --- /dev/null +++ b/scripts/kalimdor/maraudon/boss_noxxion.cpp @@ -0,0 +1,145 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Noxxion +SD%Complete: 100 +SDComment: +SDCategory: Maraudon +EndScriptData */ + +#include "precompiled.h" + +#define SPELL_TOXICVOLLEY 21687 +#define SPELL_UPPERCUT 22916 + +struct MANGOS_DLL_DECL boss_noxxionAI : public ScriptedAI +{ + boss_noxxionAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 ToxicVolley_Timer; + uint32 Uppercut_Timer; + uint32 Adds_Timer; + uint32 Invisible_Timer; + bool Invisible; + int Rand; + int RandX; + int RandY; + Creature* Summoned; + + void Reset() + { + ToxicVolley_Timer = 7000; + Uppercut_Timer = 16000; + Adds_Timer = 19000; + Invisible_Timer = 15000; //Too much too low? + Invisible = false; + } + + void SummonAdds(Unit* victim) + { + Rand = rand()%8; + switch(urand(0, 1)) + { + case 0: RandX = 0 - Rand; break; + case 1: RandX = 0 + Rand; break; + } + Rand = 0; + Rand = rand()%8; + switch(urand(0, 1)) + { + case 0: RandY = 0 - Rand; break; + case 1: RandY = 0 + Rand; break; + } + Rand = 0; + Summoned = DoSpawnCreature(13456, RandX, RandY, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 90000); + if (Summoned) + ((CreatureAI*)Summoned->AI())->AttackStart(victim); + } + + void UpdateAI(const uint32 diff) + { + if (Invisible && Invisible_Timer < diff) + { + //Become visible again + m_creature->setFaction(14); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + //Noxxion model + m_creature->SetDisplayId(11172); + Invisible = false; + //m_creature->m_canMove = true; + } else if (Invisible) + { + Invisible_Timer -= diff; + //Do nothing while invisible + return; + } + + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //ToxicVolley_Timer + if (ToxicVolley_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_TOXICVOLLEY); + ToxicVolley_Timer = 9000; + }else ToxicVolley_Timer -= diff; + + //Uppercut_Timer + if (Uppercut_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_UPPERCUT); + Uppercut_Timer = 12000; + }else Uppercut_Timer -= diff; + + //Adds_Timer + if (!Invisible && Adds_Timer < diff) + { + //Inturrupt any spell casting + //m_creature->m_canMove = true; + m_creature->InterruptNonMeleeSpells(false); + m_creature->setFaction(35); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + // Invisible Model + m_creature->SetDisplayId(11686); + SummonAdds(m_creature->getVictim()); + SummonAdds(m_creature->getVictim()); + SummonAdds(m_creature->getVictim()); + SummonAdds(m_creature->getVictim()); + SummonAdds(m_creature->getVictim()); + Invisible = true; + Invisible_Timer = 15000; + + Adds_Timer = 40000; + }else Adds_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_noxxion(Creature* pCreature) +{ + return new boss_noxxionAI(pCreature); +} + +void AddSC_boss_noxxion() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_noxxion"; + newscript->GetAI = &GetAI_boss_noxxion; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/maraudon/boss_princess_theradras.cpp b/scripts/kalimdor/maraudon/boss_princess_theradras.cpp new file mode 100644 index 000000000..b277d1fee --- /dev/null +++ b/scripts/kalimdor/maraudon/boss_princess_theradras.cpp @@ -0,0 +1,104 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Princess_Theradras +SD%Complete: 100 +SDComment: +SDCategory: Maraudon +EndScriptData */ + +#include "precompiled.h" + +#define SPELL_DUSTFIELD 21909 +#define SPELL_BOULDER 21832 +#define SPELL_THRASH 3391 +#define SPELL_REPULSIVEGAZE 21869 + +struct MANGOS_DLL_DECL boss_ptheradrasAI : public ScriptedAI +{ + boss_ptheradrasAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 Dustfield_Timer; + uint32 Boulder_Timer; + uint32 Thrash_Timer; + uint32 RepulsiveGaze_Timer; + + void Reset() + { + Dustfield_Timer = 8000; + Boulder_Timer = 2000; + Thrash_Timer = 5000; + RepulsiveGaze_Timer = 23000; + } + + void JustDied(Unit* Killer) + { + m_creature->SummonCreature(12238,28.067,61.875,-123.405,4.67,TEMPSUMMON_TIMED_DESPAWN,600000); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Dustfield_Timer + if (Dustfield_Timer < diff) + { + DoCast(m_creature,SPELL_DUSTFIELD); + Dustfield_Timer = 14000; + }else Dustfield_Timer -= diff; + + //Boulder_Timer + if (Boulder_Timer < diff) + { + Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM,0); + if (target) + DoCast(target,SPELL_BOULDER); + Boulder_Timer = 10000; + }else Boulder_Timer -= diff; + + //RepulsiveGaze_Timer + if (RepulsiveGaze_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_REPULSIVEGAZE); + RepulsiveGaze_Timer = 20000; + }else RepulsiveGaze_Timer -= diff; + + //Thrash_Timer + if (Thrash_Timer < diff) + { + DoCast(m_creature,SPELL_THRASH); + Thrash_Timer = 18000; + }else Thrash_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_ptheradras(Creature* pCreature) +{ + return new boss_ptheradrasAI(pCreature); +} + +void AddSC_boss_ptheradras() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_princess_theradras"; + newscript->GetAI = &GetAI_boss_ptheradras; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/moonglade.cpp b/scripts/kalimdor/moonglade.cpp new file mode 100644 index 000000000..a8c636343 --- /dev/null +++ b/scripts/kalimdor/moonglade.cpp @@ -0,0 +1,362 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Moonglade +SD%Complete: 100 +SDComment: Quest support: 30, 272, 5929, 5930, 10965. Special Flight Paths for Druid class. +SDCategory: Moonglade +EndScriptData */ + +/* ContentData +npc_bunthen_plainswind +npc_clintar_dw_spirit +npc_great_bear_spirit +npc_silva_filnaveth +EndContentData */ + +#include "precompiled.h" +#include "escort_ai.h" +#include "ObjectMgr.h" + +/*###### +## npc_bunthen_plainswind +######*/ + +enum +{ + QUEST_SEA_LION_HORDE = 30, + QUEST_SEA_LION_ALLY = 272, + TAXI_PATH_ID_ALLY = 315, + TAXI_PATH_ID_HORDE = 316 +}; + +#define GOSSIP_ITEM_THUNDER "I'd like to fly to Thunder Bluff." +#define GOSSIP_ITEM_AQ_END "Do you know where I can find Half Pendant of Aquatic Endurance?" + +bool GossipHello_npc_bunthen_plainswind(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->getClass() != CLASS_DRUID) + pPlayer->SEND_GOSSIP_MENU(4916, pCreature->GetGUID()); + else if (pPlayer->GetTeam() != HORDE) + { + if (pPlayer->GetQuestStatus(QUEST_SEA_LION_ALLY) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_AQ_END, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + + pPlayer->SEND_GOSSIP_MENU(4917, pCreature->GetGUID()); + } + else if (pPlayer->getClass() == CLASS_DRUID && pPlayer->GetTeam() == HORDE) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_THUNDER, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + + if (pPlayer->GetQuestStatus(QUEST_SEA_LION_HORDE) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_AQ_END, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + + pPlayer->SEND_GOSSIP_MENU(4918, pCreature->GetGUID()); + } + return true; +} + +bool GossipSelect_npc_bunthen_plainswind(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: + pPlayer->CLOSE_GOSSIP_MENU(); + + if (pPlayer->getClass() == CLASS_DRUID && pPlayer->GetTeam() == HORDE) + pPlayer->ActivateTaxiPathTo(TAXI_PATH_ID_HORDE); + + break; + case GOSSIP_ACTION_INFO_DEF + 2: + pPlayer->SEND_GOSSIP_MENU(5373, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: + pPlayer->SEND_GOSSIP_MENU(5376, pCreature->GetGUID()); + break; + } + return true; +} + +/*#### +# npc_clintar_dw_spirit +####*/ + +enum +{ + SAY_START = -1000280, + SAY_AGGRO_1 = -1000281, + SAY_AGGRO_2 = -1000282, + SAY_RELIC1 = -1000283, + SAY_RELIC2 = -1000284, + SAY_RELIC3 = -1000285, + SAY_END = -1000286, + + QUEST_MERE_DREAM = 10965, + SPELL_EMERALD_DREAM = 39601, + NPC_CLINTAR_DW_SPIRIT = 22916, + NPC_CLINTAR_SPIRIT = 22901, + NPC_ASPECT_OF_RAVEN = 22915, +}; + +struct MANGOS_DLL_DECL npc_clintar_dw_spiritAI : public npc_escortAI +{ + npc_clintar_dw_spiritAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } + + void WaypointReached(uint32 i) + { + Player* pPlayer = GetPlayerForEscort(); + + if (!pPlayer) + return; + + //visual details here probably need refinement + switch(i) + { + case 0: + DoScriptText(SAY_START, m_creature, pPlayer); + break; + case 13: + m_creature->HandleEmoteCommand(EMOTE_STATE_USESTANDING_NOSHEATHE); + break; + case 14: + DoScriptText(SAY_RELIC1, m_creature, pPlayer); + break; + case 26: + m_creature->HandleEmoteCommand(EMOTE_STATE_USESTANDING_NOSHEATHE); + break; + case 27: + DoScriptText(SAY_RELIC2, m_creature, pPlayer); + break; + case 31: + m_creature->SummonCreature(NPC_ASPECT_OF_RAVEN, 7465.321, -3088.515, 429.006, 5.550, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); + break; + case 35: + m_creature->HandleEmoteCommand(EMOTE_STATE_USESTANDING_NOSHEATHE); + break; + case 36: + DoScriptText(SAY_RELIC3, m_creature, pPlayer); + break; + case 49: + DoScriptText(SAY_END, m_creature, pPlayer); + pPlayer->TalkedToCreature(m_creature->GetEntry(), m_creature->GetGUID()); + break; + } + } + + void Aggro(Unit* who) + { + DoScriptText(urand(0, 1) ? SAY_AGGRO_1 : SAY_AGGRO_2, m_creature); + } + + void Reset() + { + if (HasEscortState(STATE_ESCORT_ESCORTING)) + return; + + //m_creature are expected to always be spawned, but not visible for player + //spell casted from quest_template.SrcSpell require this to be this way + //we handle the triggered spell to get a "hook" to our guy so he can be escorted on quest accept + + if (CreatureInfo const* pTemp = GetCreatureTemplateStore(m_creature->GetEntry())) + m_creature->SetDisplayId(pTemp->DisplayID_H[0]); + + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetVisibility(VISIBILITY_OFF); + } + + //called only from EffectDummy + void DoStart(uint64 uiPlayerGuid) + { + //not the best way, maybe check in DummyEffect if this creature are "free" and not in escort. + if (HasEscortState(STATE_ESCORT_ESCORTING)) + return; + + m_creature->SetVisibility(VISIBILITY_ON); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + Start(true, false, uiPlayerGuid); + } + + void JustSummoned(Creature* summoned) + { + summoned->AI()->AttackStart(m_creature); + } +}; + +CreatureAI* GetAI_npc_clintar_dw_spirit(Creature* pCreature) +{ + return new npc_clintar_dw_spiritAI(pCreature); +} + +//we expect this spell to be triggered from spell casted at questAccept +bool EffectDummyCreature_npc_clintar_dw_spirit(Unit *pCaster, uint32 spellId, uint32 effIndex, Creature *pCreatureTarget) +{ + //always check spellid and effectindex + if (spellId == SPELL_EMERALD_DREAM && effIndex == 0) + { + if (pCaster->GetTypeId() != TYPEID_PLAYER || pCaster->HasAura(SPELL_EMERALD_DREAM)) + return true; + + if (pCreatureTarget->GetEntry() != NPC_CLINTAR_DW_SPIRIT) + return true; + + if (CreatureInfo const* pTemp = GetCreatureTemplateStore(NPC_CLINTAR_SPIRIT)) + pCreatureTarget->SetDisplayId(pTemp->DisplayID_H[0]); + else + return true; + + //done here, escort can start + ((npc_clintar_dw_spiritAI*)pCreatureTarget->AI())->DoStart(pCaster->GetGUID()); + + //always return true when we are handling this spell and effect + return true; + } + return true; +} + +/*###### +## npc_great_bear_spirit +######*/ + +#define GOSSIP_BEAR1 "What do you represent, spirit?" +#define GOSSIP_BEAR2 "I seek to understand the importance of strength of the body." +#define GOSSIP_BEAR3 "I seek to understand the importance of strength of the heart." +#define GOSSIP_BEAR4 "I have heard your words, Great Bear Spirit, and I understand. I now seek your blessings to fully learn the way of the Claw." + +bool GossipHello_npc_great_bear_spirit(Player* pPlayer, Creature* pCreature) +{ + //ally or horde quest + if (pPlayer->GetQuestStatus(5929) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(5930) == QUEST_STATUS_INCOMPLETE) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BEAR1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + pPlayer->SEND_GOSSIP_MENU(4719, pCreature->GetGUID()); + } + else + pPlayer->SEND_GOSSIP_MENU(4718, pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_great_bear_spirit(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BEAR2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->SEND_GOSSIP_MENU(4721, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 1: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BEAR3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->SEND_GOSSIP_MENU(4733, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BEAR4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->SEND_GOSSIP_MENU(4734, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: + pPlayer->SEND_GOSSIP_MENU(4735, pCreature->GetGUID()); + if (pPlayer->GetQuestStatus(5929)==QUEST_STATUS_INCOMPLETE) + pPlayer->AreaExploredOrEventHappens(5929); + if (pPlayer->GetQuestStatus(5930)==QUEST_STATUS_INCOMPLETE) + pPlayer->AreaExploredOrEventHappens(5930); + break; + } + return true; +} + +/*###### +## npc_silva_filnaveth +######*/ + +#define GOSSIP_ITEM_RUTHERAN "I'd like to fly to Rut'theran Village." +#define GOSSIP_ITEM_AQ_AGI "Do you know where I can find Half Pendant of Aquatic Agility?" + +bool GossipHello_npc_silva_filnaveth(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->getClass() != CLASS_DRUID) + pPlayer->SEND_GOSSIP_MENU(4913, pCreature->GetGUID()); + else if (pPlayer->GetTeam() != ALLIANCE) + { + if (pPlayer->GetQuestStatus(QUEST_SEA_LION_HORDE) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_AQ_AGI, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + + pPlayer->SEND_GOSSIP_MENU(4915, pCreature->GetGUID()); + } + else if (pPlayer->getClass() == CLASS_DRUID && pPlayer->GetTeam() == ALLIANCE) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_RUTHERAN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + + if (pPlayer->GetQuestStatus(QUEST_SEA_LION_ALLY) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_AQ_AGI, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + + pPlayer->SEND_GOSSIP_MENU(4914, pCreature->GetGUID()); + } + return true; +} + +bool GossipSelect_npc_silva_filnaveth(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: + pPlayer->CLOSE_GOSSIP_MENU(); + + if (pPlayer->getClass() == CLASS_DRUID && pPlayer->GetTeam() == ALLIANCE) + pPlayer->ActivateTaxiPathTo(TAXI_PATH_ID_ALLY); + + break; + case GOSSIP_ACTION_INFO_DEF + 2: + pPlayer->SEND_GOSSIP_MENU(5374, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: + pPlayer->SEND_GOSSIP_MENU(5375, pCreature->GetGUID()); + break; + } + return true; +} + +/*###### +## +######*/ + +void AddSC_moonglade() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_bunthen_plainswind"; + newscript->pGossipHello = &GossipHello_npc_bunthen_plainswind; + newscript->pGossipSelect = &GossipSelect_npc_bunthen_plainswind; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_clintar_dw_spirit"; + newscript->GetAI = &GetAI_npc_clintar_dw_spirit; + newscript->pEffectDummyCreature = &EffectDummyCreature_npc_clintar_dw_spirit; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_great_bear_spirit"; + newscript->pGossipHello = &GossipHello_npc_great_bear_spirit; + newscript->pGossipSelect = &GossipSelect_npc_great_bear_spirit; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_silva_filnaveth"; + newscript->pGossipHello = &GossipHello_npc_silva_filnaveth; + newscript->pGossipSelect = &GossipSelect_npc_silva_filnaveth; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/mulgore.cpp b/scripts/kalimdor/mulgore.cpp new file mode 100644 index 000000000..8639fab2b --- /dev/null +++ b/scripts/kalimdor/mulgore.cpp @@ -0,0 +1,194 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Mulgore +SD%Complete: 100 +SDComment: Quest support: 11129. Skorn Whitecloud: Just a story if not rewarded for quest +SDCategory: Mulgore +EndScriptData */ + +/* ContentData +npc_kyle_the_frenzied +npc_skorn_whitecloud +EndContentData */ + +#include "precompiled.h" + +/*###### +# npc_kyle_the_frenzied +######*/ + +enum +{ + EMOTE_SEE_LUNCH = -1000340, + EMOTE_EAT_LUNCH = -1000341, + EMOTE_DANCE = -1000342, + + SPELL_LUNCH = 42222, + NPC_KYLE_FRENZIED = 23616, + NPC_KYLE_FRIENDLY = 23622, + POINT_ID = 1 +}; + +struct MANGOS_DLL_DECL npc_kyle_the_frenziedAI : public ScriptedAI +{ + npc_kyle_the_frenziedAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + bool m_bEvent; + bool m_bIsMovingToLunch; + uint64 m_uiPlayerGUID; + uint32 m_uiEventTimer; + uint8 m_uiEventPhase; + + void Reset() + { + m_bEvent = false; + m_bIsMovingToLunch = false; + m_uiPlayerGUID = 0; + m_uiEventTimer = 5000; + m_uiEventPhase = 0; + + if (m_creature->GetEntry() == NPC_KYLE_FRIENDLY) + m_creature->UpdateEntry(NPC_KYLE_FRENZIED); + } + + void SpellHit(Unit* pCaster, SpellEntry const* pSpell) + { + if (!m_creature->getVictim() && !m_bEvent && pSpell->Id == SPELL_LUNCH) + { + if (pCaster->GetTypeId() == TYPEID_PLAYER) + m_uiPlayerGUID = pCaster->GetGUID(); + + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == WAYPOINT_MOTION_TYPE) + { + m_creature->GetMotionMaster()->MovementExpired(); + m_creature->GetMotionMaster()->MoveIdle(); + m_creature->StopMoving(); + } + + m_bEvent = true; + DoScriptText(EMOTE_SEE_LUNCH, m_creature); + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_CREATURE_SPECIAL); + } + } + + void MovementInform(uint32 uiType, uint32 uiPointId) + { + if (uiType != POINT_MOTION_TYPE || !m_bEvent) + return; + + if (uiPointId == POINT_ID) + m_bIsMovingToLunch = false; + } + + void UpdateAI(const uint32 diff) + { + if (m_bEvent) + { + if (m_bIsMovingToLunch) + return; + + if (m_uiEventTimer < diff) + { + m_uiEventTimer = 5000; + ++m_uiEventPhase; + + switch(m_uiEventPhase) + { + case 1: + if (Unit* pUnit = Unit::GetUnit(*m_creature,m_uiPlayerGUID)) + { + if (GameObject* pGo = pUnit->GetGameObject(SPELL_LUNCH)) + { + m_bIsMovingToLunch = true; + m_creature->GetMotionMaster()->MovePoint(POINT_ID, pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ()); + } + } + break; + case 2: + DoScriptText(EMOTE_EAT_LUNCH, m_creature); + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_USESTANDING); + break; + case 3: + if (Unit* pUnit = Unit::GetUnit(*m_creature,m_uiPlayerGUID)) + ((Player*)pUnit)->TalkedToCreature(m_creature->GetEntry(), m_creature->GetGUID()); + + m_creature->UpdateEntry(NPC_KYLE_FRIENDLY); + break; + case 4: + m_uiEventTimer = 30000; + DoScriptText(EMOTE_DANCE, m_creature); + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_DANCESPECIAL); + break; + case 5: + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE); + Reset(); + m_creature->GetMotionMaster()->Clear(); + break; + } + } + else + m_uiEventTimer -= diff; + } + } +}; + +CreatureAI* GetAI_npc_kyle_the_frenzied(Creature* pCreature) +{ + return new npc_kyle_the_frenziedAI(pCreature); +} + +/*###### +# npc_skorn_whitecloud +######*/ + +bool GossipHello_npc_skorn_whitecloud(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (!pPlayer->GetQuestRewardStatus(770)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Tell me a story, Skorn.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + + pPlayer->SEND_GOSSIP_MENU(522, pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_skorn_whitecloud(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF) + pPlayer->SEND_GOSSIP_MENU(523, pCreature->GetGUID()); + + return true; +} + +void AddSC_mulgore() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_kyle_the_frenzied"; + newscript->GetAI = &GetAI_npc_kyle_the_frenzied; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_skorn_whitecloud"; + newscript->pGossipHello = &GossipHello_npc_skorn_whitecloud; + newscript->pGossipSelect = &GossipSelect_npc_skorn_whitecloud; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp new file mode 100644 index 000000000..f8ec8e5fb --- /dev/null +++ b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp @@ -0,0 +1,487 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Onyxia +SD%Complete: 65 +SDComment: Phase 3 need additianal code. Phase 2 requires entries in spell_target_position with specific locations. See bottom of file. +SDCategory: Onyxia's Lair +EndScriptData */ + +#include "precompiled.h" + +enum +{ + SAY_AGGRO = -1249000, + SAY_KILL = -1249001, + SAY_PHASE_2_TRANS = -1249002, + SAY_PHASE_3_TRANS = -1249003, + EMOTE_BREATH = -1249004, + + SPELL_WINGBUFFET = 18500, + SPELL_FLAMEBREATH = 18435, + SPELL_CLEAVE = 19983, + SPELL_TAILSWEEP = 15847, + SPELL_KNOCK_AWAY = 19633, + + SPELL_ENGULFINGFLAMES = 20019, + SPELL_DEEPBREATH = 23461, + SPELL_FIREBALL = 18392, + + //Not much choise about these. We have to make own defintion on the direction/start-end point + //SPELL_BREATH_NORTH_TO_SOUTH = 17086, // 20x in "array" + //SPELL_BREATH_SOUTH_TO_NORTH = 18351, // 11x in "array" + + SPELL_BREATH_EAST_TO_WEST = 18576, // 7x in "array" + SPELL_BREATH_WEST_TO_EAST = 18609, // 7x in "array" + + SPELL_BREATH_SE_TO_NW = 18564, // 12x in "array" + SPELL_BREATH_NW_TO_SE = 18584, // 12x in "array" + SPELL_BREATH_SW_TO_NE = 18596, // 12x in "array" + SPELL_BREATH_NE_TO_SW = 18617, // 12x in "array" + + //SPELL_BREATH = 21131, // 8x in "array", different initial cast than the other arrays + + SPELL_BELLOWINGROAR = 18431, + SPELL_HEATED_GROUND = 22191, + + SPELL_SUMMONWHELP = 17646, + NPC_WHELP = 11262, + MAX_WHELP = 16, + + PHASE_START = 1, + PHASE_BREATH = 2, + PHASE_END = 3 +}; + +struct sOnyxMove +{ + uint32 uiLocId; + uint32 uiLocIdEnd; + uint32 uiSpellId; + float fX, fY, fZ; +}; + +static sOnyxMove aMoveData[]= +{ + {0, 1, SPELL_BREATH_WEST_TO_EAST, -33.5561f, -182.682f, -60.9457f},//west + {1, 0, SPELL_BREATH_EAST_TO_WEST, -31.4963f, -250.123f, -60.1278f},//east + {2, 4, SPELL_BREATH_NW_TO_SE, 6.8951f, -180.246f, -60.896f},//north-west + {3, 5, SPELL_BREATH_NE_TO_SW, 10.2191f, -247.912f, -60.896f},//north-east + {4, 2, SPELL_BREATH_SE_TO_NW, -63.5156f, -240.096f, -60.477f},//south-east + {5, 3, SPELL_BREATH_SW_TO_NE, -58.2509f, -189.020f, -60.790f},//south-west + //{6, 7, SPELL_BREATH_SOUTH_TO_NORTH, -65.8444f, -213.809f, -60.2985f},//south + //{7, 6, SPELL_BREATH_NORTH_TO_SOUTH, 22.8763f, -217.152f, -60.0548f},//north +}; + +static float afSpawnLocations[2][3]= +{ + {-30.127, -254.463, -89.440}, + {-30.817, -177.106, -89.258} +}; + +struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI +{ + boss_onyxiaAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 m_uiPhase; + + uint32 m_uiFlameBreathTimer; + uint32 m_uiCleaveTimer; + uint32 m_uiTailSweepTimer; + uint32 m_uiWingBuffetTimer; + + uint32 m_uiMovePoint; + uint32 m_uiMovementTimer; + sOnyxMove* m_pPointData; + + uint32 m_uiEngulfingFlamesTimer; + uint32 m_uiSummonWhelpsTimer; + uint32 m_uiBellowingRoarTimer; + uint32 m_uiWhelpTimer; + + uint8 m_uiSummonCount; + bool m_bIsSummoningWhelps; + + void Reset() + { + if (!IsCombatMovement()) + SetCombatMovement(true); + + m_uiPhase = PHASE_START; + + m_uiFlameBreathTimer = urand(10000, 20000); + m_uiTailSweepTimer = urand(15000, 20000); + m_uiCleaveTimer = urand(2000, 5000); + m_uiWingBuffetTimer = urand(10000, 20000); + + m_uiMovePoint = urand(0, 5); + m_uiMovementTimer = 20000; + m_pPointData = GetMoveData(); + + m_uiEngulfingFlamesTimer = 15000; + m_uiSummonWhelpsTimer = 45000; + m_uiBellowingRoarTimer = 30000; + m_uiWhelpTimer = 1000; + + m_uiSummonCount = 0; + m_bIsSummoningWhelps = false; + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + m_creature->SetInCombatWithZone(); + } + + void JustSummoned(Creature *pSummoned) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + pSummoned->AI()->AttackStart(pTarget); + + ++m_uiSummonCount; + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(SAY_KILL, m_creature); + } + + void SpellHit(Unit *pCaster, const SpellEntry* pSpell) + { + if (pSpell->Id == SPELL_BREATH_EAST_TO_WEST || + pSpell->Id == SPELL_BREATH_WEST_TO_EAST || + pSpell->Id == SPELL_BREATH_SE_TO_NW || + pSpell->Id == SPELL_BREATH_NW_TO_SE || + pSpell->Id == SPELL_BREATH_SW_TO_NE || + pSpell->Id == SPELL_BREATH_NE_TO_SW) + { + if (m_pPointData) + { + m_creature->GetMap()->CreatureRelocation(m_creature, m_pPointData->fX, m_pPointData->fY, m_pPointData->fZ, 0.0f); + m_creature->SendMonsterMove(m_pPointData->fX, m_pPointData->fY, m_pPointData->fZ, 0, m_creature->GetMonsterMoveFlags(), 1); + } + } + } + + sOnyxMove* GetMoveData() + { + uint32 uiMaxCount = sizeof(aMoveData)/sizeof(sOnyxMove); + + for (uint32 i = 0; i < uiMaxCount; ++i) + { + if (aMoveData[i].uiLocId == m_uiMovePoint) + return &aMoveData[i]; + } + + return NULL; + } + + void SetNextRandomPoint() + { + uint32 uiMaxCount = sizeof(aMoveData)/sizeof(sOnyxMove); + + int iTemp = rand()%(uiMaxCount-1); + + if (iTemp >= m_uiMovePoint) + ++iTemp; + + m_uiMovePoint = iTemp; + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiPhase == PHASE_START || m_uiPhase == PHASE_END) + { + if (m_uiFlameBreathTimer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_FLAMEBREATH); + m_uiFlameBreathTimer = urand(10000, 20000); + } + else + m_uiFlameBreathTimer -= uiDiff; + + if (m_uiTailSweepTimer < uiDiff) + { + DoCast(m_creature, SPELL_TAILSWEEP); + m_uiTailSweepTimer = urand(15000, 20000); + } + else + m_uiTailSweepTimer -= uiDiff; + + if (m_uiCleaveTimer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_CLEAVE); + m_uiCleaveTimer = urand(2000, 5000); + } + else + m_uiCleaveTimer -= uiDiff; + + if (m_uiWingBuffetTimer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_WINGBUFFET); + m_uiWingBuffetTimer = urand(15000, 30000); + } + else + m_uiWingBuffetTimer -= uiDiff; + + if (m_uiPhase == PHASE_END) + { + if (m_uiBellowingRoarTimer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_BELLOWINGROAR); + m_uiBellowingRoarTimer = 30000; + } + else + m_uiBellowingRoarTimer -= uiDiff; + } + else + { + if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 60) + { + m_uiPhase = PHASE_BREATH; + + SetCombatMovement(false); + + m_creature->GetMotionMaster()->Clear(false); + m_creature->GetMotionMaster()->MoveIdle(); + + DoScriptText(SAY_PHASE_2_TRANS, m_creature); + + if (m_pPointData) + m_creature->GetMotionMaster()->MovePoint(m_pPointData->uiLocId, m_pPointData->fX, m_pPointData->fY, m_pPointData->fZ); + + SetNextRandomPoint(); + return; + } + } + + DoMeleeAttackIfReady(); + } + else + { + if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 40) + { + m_uiPhase = PHASE_END; + DoScriptText(SAY_PHASE_3_TRANS, m_creature); + + SetCombatMovement(true); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + + return; + } + + if (m_uiMovementTimer < uiDiff) + { + m_pPointData = GetMoveData(); + + SetNextRandomPoint(); + + m_uiMovementTimer = 25000; + + if (!m_pPointData) + return; + + if (m_uiMovePoint == m_pPointData->uiLocIdEnd) + { + if (m_creature->IsNonMeleeSpellCasted(false)) + m_creature->InterruptNonMeleeSpells(false); + + DoScriptText(EMOTE_BREATH, m_creature); + DoCast(m_creature, m_pPointData->uiSpellId); + } + else + { + m_creature->GetMotionMaster()->MovePoint(m_pPointData->uiLocId, m_pPointData->fX, m_pPointData->fY, m_pPointData->fZ); + } + } + else + m_uiMovementTimer -= uiDiff; + + if (m_uiEngulfingFlamesTimer < uiDiff) + { + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != POINT_MOTION_TYPE) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, SPELL_FIREBALL); + + m_uiEngulfingFlamesTimer = 8000; + } + } + else + m_uiEngulfingFlamesTimer -= uiDiff; //engulfingflames is supposed to be activated by a fireball but haven't come by + + if (m_bIsSummoningWhelps) + { + if (m_uiSummonCount < MAX_WHELP) + { + if (m_uiWhelpTimer < uiDiff) + { + m_creature->SummonCreature(NPC_WHELP, afSpawnLocations[0][0], afSpawnLocations[0][1], afSpawnLocations[0][2], 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000); + m_creature->SummonCreature(NPC_WHELP, afSpawnLocations[1][0], afSpawnLocations[1][1], afSpawnLocations[1][2], 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000); + m_uiWhelpTimer = 1000; + } + else + m_uiWhelpTimer -= uiDiff; + } + else + { + m_bIsSummoningWhelps = false; + m_uiSummonCount = 0; + m_uiSummonWhelpsTimer = 30000; + } + } + else + { + if (m_uiSummonWhelpsTimer < uiDiff) + m_bIsSummoningWhelps = true; + else + m_uiSummonWhelpsTimer -= uiDiff; + } + } + } +}; + +CreatureAI* GetAI_boss_onyxiaAI(Creature* pCreature) +{ + return new boss_onyxiaAI(pCreature); +} + +void AddSC_boss_onyxia() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_onyxia"; + newscript->GetAI = &GetAI_boss_onyxiaAI; + newscript->RegisterSelf(); +} + +/* +-- SPELL_BREATH_EAST_TO_WEST +DELETE FROM spell_target_position WHERE id IN (18576, 18578, 18579, 18580, 18581, 18582, 18583); +INSERT INTO spell_target_position VALUES (18576, 249, -37.743851, -243.667923, -88.217651, 1.416); +INSERT INTO spell_target_position VALUES (18578, 249, -35.805332, -232.028900, -87.749153, 1.416); +INSERT INTO spell_target_position VALUES (18579, 249, -34.045738, -224.714661, -85.529465, 1.416); +INSERT INTO spell_target_position VALUES (18580, 249, -32.081570, -214.916962, -88.327438, 1.416); +INSERT INTO spell_target_position VALUES (18581, 249, -36.611721, -202.684677, -85.653786, 1.416); +INSERT INTO spell_target_position VALUES (18582, 249, -37.067261, -195.758652, -87.745834, 1.416); +INSERT INTO spell_target_position VALUES (18583, 249, -37.728523, -188.616806, -88.074898, 1.416); +-- SPELL_BREATH_WEST_TO_EAST +DELETE FROM spell_target_position WHERE id IN (18609, 18611, 18612, 18613, 18614, 18615, 18616); +INSERT INTO spell_target_position VALUES (18609, 249, -37.728523, -188.616806, -88.074898, 4.526); +INSERT INTO spell_target_position VALUES (18611, 249, -37.067261, -195.758652, -87.745834, 4.526); +INSERT INTO spell_target_position VALUES (18612, 249, -36.611721, -202.684677, -85.653786, 4.526); +INSERT INTO spell_target_position VALUES (18613, 249, -32.081570, -214.916962, -88.327438, 4.526); +INSERT INTO spell_target_position VALUES (18614, 249, -34.045738, -224.714661, -85.529465, 4.526); +INSERT INTO spell_target_position VALUES (18615, 249, -35.805332, -232.028900, -87.749153, 4.526); +INSERT INTO spell_target_position VALUES (18616, 249, -37.743851, -243.667923, -88.217651, 4.526); +-- SPELL_BREATH_NW_TO_SE +DELETE FROM spell_target_position WHERE id IN (18584, 18585, 18586, 18587, 18588, 18589, 18590, 18591, 18592, 18593, 18594, 18595); +INSERT INTO spell_target_position VALUES (18584, 249, 6.016711, -181.305771, -85.654648, 3.776); +INSERT INTO spell_target_position VALUES (18585, 249, 3.860220, -183.227249, -86.375381, 3.776); +INSERT INTO spell_target_position VALUES (18586, 249, -2.529650, -188.690491, -87.172859, 3.776); +INSERT INTO spell_target_position VALUES (18587, 249, -8.449303, -193.957962, -87.564957, 3.776); +INSERT INTO spell_target_position VALUES (18588, 249, -14.321238, -199.462219, -87.922478, 3.776); +INSERT INTO spell_target_position VALUES (18589, 249, -15.602085, -216.893936, -88.403183, 3.776); +INSERT INTO spell_target_position VALUES (18590, 249, -23.650263, -221.969086, -89.172699, 3.776); +INSERT INTO spell_target_position VALUES (18591, 249, -29.495876, -213.014359, -88.910423, 3.776); +INSERT INTO spell_target_position VALUES (18592, 249, -35.439922, -217.260284, -87.336311, 3.776); +INSERT INTO spell_target_position VALUES (18593, 249, -41.762104, -221.896545, -86.114113, 3.776); +INSERT INTO spell_target_position VALUES (18594, 249, -51.067528, -228.909988, -85.765556, 3.776); +INSERT INTO spell_target_position VALUES (18595, 249, -56.559654, -241.223923, -85.423607, 3.776); +-- SPELL_BREATH_SE_TO_NW +DELETE FROM spell_target_position WHERE id IN (18564, 18565, 18566, 18567, 18568, 18569, 18570, 18571, 18572, 18573, 18574, 18575); +INSERT INTO spell_target_position VALUES (18564, 249, -56.559654, -241.223923, -85.423607, 0.666); +INSERT INTO spell_target_position VALUES (18565, 249, -51.067528, -228.909988, -85.765556, 0.666); +INSERT INTO spell_target_position VALUES (18566, 249, -41.762104, -221.896545, -86.114113, 0.666); +INSERT INTO spell_target_position VALUES (18567, 249, -35.439922, -217.260284, -87.336311, 0.666); +INSERT INTO spell_target_position VALUES (18568, 249, -29.495876, -213.014359, -88.910423, 0.666); +INSERT INTO spell_target_position VALUES (18569, 249, -23.650263, -221.969086, -89.172699, 0.666); +INSERT INTO spell_target_position VALUES (18570, 249, -15.602085, -216.893936, -88.403183, 0.666); +INSERT INTO spell_target_position VALUES (18571, 249, -14.321238, -199.462219, -87.922478, 0.666); +INSERT INTO spell_target_position VALUES (18572, 249, -8.449303, -193.957962, -87.564957, 0.666); +INSERT INTO spell_target_position VALUES (18573, 249, -2.529650, -188.690491, -87.172859, 0.666); +INSERT INTO spell_target_position VALUES (18574, 249, 3.860220, -183.227249, -86.375381, 0.666); +INSERT INTO spell_target_position VALUES (18575, 249, 6.016711, -181.305771, -85.654648, 0.666); +-- SPELL_BREATH_SW_TO_NE +DELETE FROM spell_target_position WHERE id IN (18596, 18597, 18598, 18599, 18600, 18601, 18602, 18603, 18604, 18605, 18606, 18607); +INSERT INTO spell_target_position VALUES (18596, 249, -58.250900, -189.020004, -85.292267, 5.587); +INSERT INTO spell_target_position VALUES (18597, 249, -52.006271, -193.796570, -85.808769, 5.587); +INSERT INTO spell_target_position VALUES (18598, 249, -46.135464, -198.548553, -85.901764, 5.587); +INSERT INTO spell_target_position VALUES (18599, 249, -40.500187, -203.001053, -85.555107, 5.587); +INSERT INTO spell_target_position VALUES (18600, 249, -30.907579, -211.058197, -88.592125, 5.587); +INSERT INTO spell_target_position VALUES (18601, 249, -20.098139, -218.681427, -88.937088, 5.587); +INSERT INTO spell_target_position VALUES (18602, 249, -12.223192, -224.666168, -87.856300, 5.587); +INSERT INTO spell_target_position VALUES (18603, 249, -6.475297, -229.098724, -87.076401, 5.587); +INSERT INTO spell_target_position VALUES (18604, 249, -2.010256, -232.541992, -86.995140, 5.587); +INSERT INTO spell_target_position VALUES (18605, 249, 2.736300, -236.202347, -86.790367, 5.587); +INSERT INTO spell_target_position VALUES (18606, 249, 7.197779, -239.642868, -86.307297, 5.587); +INSERT INTO spell_target_position VALUES (18607, 249, 12.120926, -243.439407, -85.874260, 5.587); +-- SPELL_BREATH_NE_TO_SW +DELETE FROM spell_target_position WHERE id IN (18617, 18619, 18620, 18621, 18622, 18623, 18624, 18625, 18626, 18627, 18628, 18618); +INSERT INTO spell_target_position VALUES (18617, 249, 12.120926, -243.439407, -85.874260, 2.428); +INSERT INTO spell_target_position VALUES (18619, 249, 7.197779, -239.642868, -86.307297, 2.428); +INSERT INTO spell_target_position VALUES (18620, 249, 2.736300, -236.202347, -86.790367, 2.428); +INSERT INTO spell_target_position VALUES (18621, 249, -2.010256, -232.541992, -86.995140, 2.428); +INSERT INTO spell_target_position VALUES (18622, 249, -6.475297, -229.098724, -87.076401, 2.428); +INSERT INTO spell_target_position VALUES (18623, 249, -12.223192, -224.666168, -87.856300, 2.428); +INSERT INTO spell_target_position VALUES (18624, 249, -20.098139, -218.681427, -88.937088, 2.428); +INSERT INTO spell_target_position VALUES (18625, 249, -30.907579, -211.058197, -88.592125, 2.428); +INSERT INTO spell_target_position VALUES (18626, 249, -40.500187, -203.001053, -85.555107, 2.428); +INSERT INTO spell_target_position VALUES (18627, 249, -46.135464, -198.548553, -85.901764, 2.428); +INSERT INTO spell_target_position VALUES (18628, 249, -52.006271, -193.796570, -85.808769, 2.428); +INSERT INTO spell_target_position VALUES (18618, 249, -58.250900, -189.020004, -85.292267, 2.428); + +-- Below is not needed for current script +-- SPELL_BREATH_SOUTH_TO_NORTH +DELETE FROM spell_target_position WHERE id IN (18351, 18352, 18353, 18354, 18355, 18356, 18357, 18358, 18359, 18360, 18361); +INSERT INTO spell_target_position VALUES (18351, 249, -68.834236, -215.036163, -84.018875, 6.280); +INSERT INTO spell_target_position VALUES (18352, 249, -61.834255, -215.051910, -84.673416, 6.280); +INSERT INTO spell_target_position VALUES (18353, 249, -53.343277, -215.071014, -85.597191, 6.280); +INSERT INTO spell_target_position VALUES (18354, 249, -42.619305, -215.095139, -86.663605, 6.280); +INSERT INTO spell_target_position VALUES (18355, 249, -35.899323, -215.110245, -87.196548, 6.280); +INSERT INTO spell_target_position VALUES (18356, 249, -28.248341, -215.127457, -89.191750, 6.280); +INSERT INTO spell_target_position VALUES (18357, 249, -20.324360, -215.145279, -88.963997, 6.280); +INSERT INTO spell_target_position VALUES (18358, 249, -11.189384, -215.165833, -87.817093, 6.280); +INSERT INTO spell_target_position VALUES (18359, 249, -2.047405, -215.186386, -86.279655, 6.280); +INSERT INTO spell_target_position VALUES (18360, 249, 7.479571, -215.207809, -86.075531, 6.280); +INSERT INTO spell_target_position VALUES (18361, 249, 20.730539, -215.237610, -85.254387, 6.280); +-- SPELL_BREATH_NORTH_TO_SOUTH +DELETE FROM spell_target_position WHERE id IN (17086, 17087, 17088, 17089, 17090, 17091, 17092, 17093, 17094, 17095, 17097, 22267, 22268, 21132, 21133, 21135, 21136, 21137, 21138, 21139); +INSERT INTO spell_target_position VALUES (17086, 249, 20.730539, -215.237610, -85.254387, 3.142); +INSERT INTO spell_target_position VALUES (17087, 249, 7.479571, -215.207809, -86.075531, 3.142); +INSERT INTO spell_target_position VALUES (17088, 249, -2.047405, -215.186386, -86.279655, 3.142); +INSERT INTO spell_target_position VALUES (17089, 249, -11.189384, -215.165833, -87.817093, 3.142); +INSERT INTO spell_target_position VALUES (17090, 249, -20.324360, -215.145279, -88.963997, 3.142); +INSERT INTO spell_target_position VALUES (17091, 249, -28.248341, -215.127457, -89.191750, 3.142); +INSERT INTO spell_target_position VALUES (17092, 249, -35.899323, -215.110245, -87.196548, 3.142); +INSERT INTO spell_target_position VALUES (17093, 249, -42.619305, -215.095139, -86.663605, 3.142); +INSERT INTO spell_target_position VALUES (17094, 249, -53.343277, -215.071014, -85.597191, 3.142); +INSERT INTO spell_target_position VALUES (17095, 249, -61.834255, -215.051910, -84.673416, 3.142); +INSERT INTO spell_target_position VALUES (17097, 249, -68.834236, -215.036163, -84.018875, 3.142); +INSERT INTO spell_target_position VALUES (22267, 249, -75.736046, -214.984970, -83.394188, 3.142); +INSERT INTO spell_target_position VALUES (22268, 249, -84.087578, -214.857834, -82.640053, 3.142); +INSERT INTO spell_target_position VALUES (21132, 249, -90.424416, -214.601974, -82.482697, 3.142); +INSERT INTO spell_target_position VALUES (21133, 249, -96.572411, -214.353745, -82.239967, 3.142); +INSERT INTO spell_target_position VALUES (21135, 249, -102.069931, -214.131775, -80.571190, 3.142); +INSERT INTO spell_target_position VALUES (21136, 249, -107.385597, -213.917145, -77.447037, 3.142); +INSERT INTO spell_target_position VALUES (21137, 249, -114.281258, -213.866486, -73.851128, 3.142); +INSERT INTO spell_target_position VALUES (21138, 249, -123.328560, -213.607910, -71.559921, 3.142); +INSERT INTO spell_target_position VALUES (21139, 249, -130.788300, -213.424026, -70.751007, 3.142); +*/ diff --git a/scripts/kalimdor/orgrimmar.cpp b/scripts/kalimdor/orgrimmar.cpp new file mode 100644 index 000000000..2b2c412c1 --- /dev/null +++ b/scripts/kalimdor/orgrimmar.cpp @@ -0,0 +1,271 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Orgrimmar +SD%Complete: 100 +SDComment: Quest support: 2460, 5727, 6566 +SDCategory: Orgrimmar +EndScriptData */ + +/* ContentData +npc_neeru_fireblade npc_text + gossip options text missing +npc_shenthul +npc_thrall_warchief +EndContentData */ + +#include "precompiled.h" + +/*###### +## npc_neeru_fireblade +######*/ + +#define QUEST_5727 5727 + +bool GossipHello_npc_neeru_fireblade(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestStatus(QUEST_5727) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "You may speak frankly, Neeru...", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + pPlayer->SEND_GOSSIP_MENU(4513, pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_neeru_fireblade(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] ...", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->SEND_GOSSIP_MENU(4513, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->AreaExploredOrEventHappens(QUEST_5727); + break; + } + return true; +} + +/*###### +## npc_shenthul +######*/ + +enum +{ + QUEST_SHATTERED_SALUTE = 2460 +}; + +struct MANGOS_DLL_DECL npc_shenthulAI : public ScriptedAI +{ + npc_shenthulAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + bool CanTalk; + bool CanEmote; + uint32 Salute_Timer; + uint32 Reset_Timer; + uint64 playerGUID; + + void Reset() + { + CanTalk = false; + CanEmote = false; + Salute_Timer = 6000; + Reset_Timer = 0; + playerGUID = 0; + } + + void ReceiveEmote(Player* pPlayer, uint32 emote) + { + if (emote == TEXTEMOTE_SALUTE && pPlayer->GetQuestStatus(QUEST_SHATTERED_SALUTE) == QUEST_STATUS_INCOMPLETE) + { + if (CanEmote) + { + pPlayer->AreaExploredOrEventHappens(QUEST_SHATTERED_SALUTE); + Reset(); + } + } + } + + void UpdateAI(const uint32 diff) + { + if (CanEmote) + { + if (Reset_Timer < diff) + { + if (Player* pPlayer = (Player*)Unit::GetUnit((*m_creature),playerGUID)) + { + if (pPlayer->GetTypeId() == TYPEID_PLAYER && pPlayer->GetQuestStatus(QUEST_SHATTERED_SALUTE) == QUEST_STATUS_INCOMPLETE) + pPlayer->FailQuest(QUEST_SHATTERED_SALUTE); + } + Reset(); + } else Reset_Timer -= diff; + } + + if (CanTalk && !CanEmote) + { + if (Salute_Timer < diff) + { + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_SALUTE); + CanEmote = true; + Reset_Timer = 60000; + } else Salute_Timer -= diff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_shenthul(Creature* pCreature) +{ + return new npc_shenthulAI(pCreature); +} + +bool QuestAccept_npc_shenthul(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_SHATTERED_SALUTE) + { + ((npc_shenthulAI*)pCreature->AI())->CanTalk = true; + ((npc_shenthulAI*)pCreature->AI())->playerGUID = pPlayer->GetGUID(); + } + return true; +} + +/*###### +## npc_thrall_warchief +######*/ + +#define QUEST_6566 6566 + +#define SPELL_CHAIN_LIGHTNING 16033 +#define SPELL_SHOCK 16034 + +//TODO: verify abilities/timers +struct MANGOS_DLL_DECL npc_thrall_warchiefAI : public ScriptedAI +{ + npc_thrall_warchiefAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + uint32 ChainLightning_Timer; + uint32 Shock_Timer; + + void Reset() + { + ChainLightning_Timer = 2000; + Shock_Timer = 8000; + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (ChainLightning_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_CHAIN_LIGHTNING); + ChainLightning_Timer = 9000; + }else ChainLightning_Timer -= diff; + + if (Shock_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_SHOCK); + Shock_Timer = 15000; + }else Shock_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_npc_thrall_warchief(Creature* pCreature) +{ + return new npc_thrall_warchiefAI(pCreature); +} + +bool GossipHello_npc_thrall_warchief(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestStatus(QUEST_6566) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Please share your wisdom with me, Warchief.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_thrall_warchief(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What discoveries?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->SEND_GOSSIP_MENU(5733, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Usurper?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); + pPlayer->SEND_GOSSIP_MENU(5734, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+3: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "With all due respect, Warchief - why not allow them to be destroyed? Does this not strengthen our position?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); + pPlayer->SEND_GOSSIP_MENU(5735, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+4: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I... I did not think of it that way, Warchief.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); + pPlayer->SEND_GOSSIP_MENU(5736, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+5: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I live only to serve, Warchief! My life is empty and meaningless without your guidance.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6); + pPlayer->SEND_GOSSIP_MENU(5737, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+6: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Of course, Warchief!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+7); + pPlayer->SEND_GOSSIP_MENU(5738, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+7: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->AreaExploredOrEventHappens(QUEST_6566); + break; + } + return true; +} + +void AddSC_orgrimmar() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_neeru_fireblade"; + newscript->pGossipHello = &GossipHello_npc_neeru_fireblade; + newscript->pGossipSelect = &GossipSelect_npc_neeru_fireblade; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_shenthul"; + newscript->GetAI = &GetAI_npc_shenthul; + newscript->pQuestAccept = &QuestAccept_npc_shenthul; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_thrall_warchief"; + newscript->GetAI = &GetAI_npc_thrall_warchief; + newscript->pGossipHello = &GossipHello_npc_thrall_warchief; + newscript->pGossipSelect = &GossipSelect_npc_thrall_warchief; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/razorfen_downs/boss_amnennar_the_coldbringer.cpp b/scripts/kalimdor/razorfen_downs/boss_amnennar_the_coldbringer.cpp new file mode 100644 index 000000000..14d694184 --- /dev/null +++ b/scripts/kalimdor/razorfen_downs/boss_amnennar_the_coldbringer.cpp @@ -0,0 +1,129 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Amnennar_the_coldbringer +SD%Complete: 100 +SDComment: +SDCategory: Razorfen Downs +EndScriptData */ + +#include "precompiled.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 + +struct MANGOS_DLL_DECL boss_amnennar_the_coldbringerAI : public ScriptedAI +{ + boss_amnennar_the_coldbringerAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 AmnenarsWrath_Timer; + uint32 FrostBolt_Timer; + uint32 FrostNova_Timer; + bool Spectrals60; + bool Spectrals30; + bool Hp; + + void Reset() + { + AmnenarsWrath_Timer = 8000; + FrostBolt_Timer = 1000; + FrostNova_Timer = urand(10000, 15000); + Spectrals30 = false; + Spectrals60 = false; + Hp = false; + } + + void Aggro(Unit *who) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void KilledUnit() + { + DoScriptText(SAY_KILL, m_creature); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //AmnenarsWrath_Timer + if (AmnenarsWrath_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_AMNENNARSWRATH); + AmnenarsWrath_Timer = 12000; + } else AmnenarsWrath_Timer -= diff; + + //FrostBolt_Timer + if (FrostBolt_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_FROSTBOLT); + FrostBolt_Timer = 8000; + } else FrostBolt_Timer -= diff; + + if (FrostNova_Timer < diff) + { + DoCast(m_creature,SPELL_FROST_NOVA); + FrostNova_Timer = 15000; + } else FrostNova_Timer -= diff; + + if (!Spectrals60 && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 60) + { + DoScriptText(SAY_SUMMON60, m_creature); + DoCast(m_creature->getVictim(),SPELL_FROST_SPECTRES); + Spectrals60 = true; + } + + if (!Hp && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 50) + { + DoScriptText(SAY_HP, m_creature); + Hp = true; + } + + if (!Spectrals30 && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 30) + { + DoScriptText(SAY_SUMMON30, m_creature); + DoCast(m_creature->getVictim(),SPELL_FROST_SPECTRES); + Spectrals30 = true; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_amnennar_the_coldbringer(Creature* pCreature) +{ + return new boss_amnennar_the_coldbringerAI(pCreature); +} + +void AddSC_boss_amnennar_the_coldbringer() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_amnennar_the_coldbringer"; + newscript->GetAI = &GetAI_boss_amnennar_the_coldbringer; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp b/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp new file mode 100644 index 000000000..8abb2d61e --- /dev/null +++ b/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp @@ -0,0 +1,85 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Razorfen_Downs +SD%Complete: 100 +SDComment: Support for Henry Stern(2 recipes) +SDCategory: Razorfen Downs +EndScriptData */ + +/* ContentData +npc_henry_stern +EndContentData */ + +#include "precompiled.h" + +/*### +# npc_henry_stern +####*/ + +enum +{ + SPELL_GOLDTHORN_TEA = 13028, + SPELL_TEACHING_GOLDTHORN_TEA = 13029, + SPELL_MIGHT_TROLLS_BLOOD_POTION = 3451, + SPELL_TEACHING_MIGHTY_TROLLS_BLOOD_POTION = 13030, + GOSSIP_TEXT_TEA_ANSWER = 2114, + GOSSIP_TEXT_POTION_ANSWER = 2115, +}; + +#define GOSSIP_ITEM_TEA "Teach me the cooking recipe" +#define GOSSIP_ITEM_POTION "Teach me the alchemy recipe" + +bool GossipHello_npc_henry_stern (Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->GetBaseSkillValue(SKILL_COOKING) >= 175 && !pPlayer->HasSpell(SPELL_GOLDTHORN_TEA)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TEA, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + + if (pPlayer->GetBaseSkillValue(SKILL_ALCHEMY) >= 180 && !pPlayer->HasSpell(SPELL_MIGHT_TROLLS_BLOOD_POTION)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_POTION, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_henry_stern (Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) + { + pCreature->CastSpell(pPlayer, SPELL_TEACHING_GOLDTHORN_TEA, true); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_TEA_ANSWER, pCreature->GetGUID()); + } + + if (uiAction == GOSSIP_ACTION_INFO_DEF + 2) + { + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_POTION_ANSWER, pCreature->GetGUID()); + pCreature->CastSpell(pPlayer, SPELL_TEACHING_MIGHTY_TROLLS_BLOOD_POTION, true); + } + + return true; +} + +void AddSC_razorfen_downs() +{ + Script* newscript; + + newscript = new Script; + newscript->Name = "npc_henry_stern"; + newscript->pGossipHello = &GossipHello_npc_henry_stern; + newscript->pGossipSelect = &GossipSelect_npc_henry_stern; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp new file mode 100644 index 000000000..ff72c2262 --- /dev/null +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp @@ -0,0 +1,107 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Ayamiss +SD%Complete: 50 +SDComment: VERIFY SCRIPT +SDCategory: Ruins of Ahn'Qiraj +EndScriptData */ + +#include "precompiled.h" + +/* +To do: +make him fly from 70-100% +*/ + +#define SPELL_STINGERSPRAY 25749 +#define SPELL_POISONSTINGER 25748 //only used in phase1 +#define SPELL_SUMMONSWARMER 25844 //might be 25708 +// #define SPELL_PARALYZE 23414 doesnt work correct (core) + +struct MANGOS_DLL_DECL boss_ayamissAI : public ScriptedAI +{ + boss_ayamissAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + Unit *pTarget; + uint32 STINGERSPRAY_Timer; + uint32 POISONSTINGER_Timer; + uint32 SUMMONSWARMER_Timer; + uint32 phase; + + void Reset() + { + pTarget = NULL; + STINGERSPRAY_Timer = 30000; + POISONSTINGER_Timer = 30000; + SUMMONSWARMER_Timer = 60000; + phase=1; + } + + void Aggro(Unit *who) + { + pTarget = who; + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //If he is 70% start phase 2 + if (phase==1 && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 70 && !m_creature->IsNonMeleeSpellCasted(false)) + { + phase=2; + } + + //STINGERSPRAY_Timer (only in phase2) + if (phase==2 && STINGERSPRAY_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_STINGERSPRAY); + STINGERSPRAY_Timer = 30000; + }else STINGERSPRAY_Timer -= diff; + + //POISONSTINGER_Timer (only in phase1) + if (phase==1 && POISONSTINGER_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_POISONSTINGER); + POISONSTINGER_Timer = 30000; + }else POISONSTINGER_Timer -= diff; + + //SUMMONSWARMER_Timer (only in phase1) + if (SUMMONSWARMER_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_SUMMONSWARMER); + SUMMONSWARMER_Timer = 60000; + }else SUMMONSWARMER_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_ayamiss(Creature* pCreature) +{ + return new boss_ayamissAI(pCreature); +} + +void AddSC_boss_ayamiss() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_ayamiss"; + newscript->GetAI = &GetAI_boss_ayamiss; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp new file mode 100644 index 000000000..51dde4d6f --- /dev/null +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp @@ -0,0 +1,26 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Buru +SD%Complete: 0 +SDComment: Place Holder +SDCategory: Ruins of Ahn'Qiraj +EndScriptData */ + +#include "precompiled.h" + +#define EMOTE_TARGET -1509002 diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp new file mode 100644 index 000000000..8757e13ba --- /dev/null +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp @@ -0,0 +1,93 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Kurinnaxx +SD%Complete: 100 +SDComment: VERIFY SCRIPT AND SQL +SDCategory: Ruins of Ahn'Qiraj +EndScriptData */ + +#include "precompiled.h" + +#define SPELL_MORTALWOUND 25646 +#define SPELL_SANDTRAP 25656 +#define SPELL_ENRAGE 28798 + +struct MANGOS_DLL_DECL boss_kurinnaxxAI : public ScriptedAI +{ + boss_kurinnaxxAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + Unit *pTarget; + uint32 MORTALWOUND_Timer; + uint32 SANDTRAP_Timer; + uint32 i; + + void Reset() + { + i=0; + pTarget = NULL; + MORTALWOUND_Timer = 30000; + SANDTRAP_Timer = 30000; + } + + void Aggro(Unit *who) + { + pTarget = who; + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //If we are <30% cast enrage + if (i==0 && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 30 && !m_creature->IsNonMeleeSpellCasted(false)) + { + i=1; + DoCast(m_creature->getVictim(),SPELL_ENRAGE); + } + + //MORTALWOUND_Timer + if (MORTALWOUND_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_MORTALWOUND); + MORTALWOUND_Timer = 30000; + }else MORTALWOUND_Timer -= diff; + + //SANDTRAP_Timer + if (SANDTRAP_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_SANDTRAP); + SANDTRAP_Timer = 30000; + }else SANDTRAP_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_kurinnaxx(Creature* pCreature) +{ + return new boss_kurinnaxxAI(pCreature); +} + +void AddSC_boss_kurinnaxx() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_kurinnaxx"; + newscript->GetAI = &GetAI_boss_kurinnaxx; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp new file mode 100644 index 000000000..26cbf261d --- /dev/null +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp @@ -0,0 +1,119 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Moam +SD%Complete: 100 +SDComment: VERIFY SCRIPT AND SQL +SDCategory: Ruins of Ahn'Qiraj +EndScriptData */ + +#include "precompiled.h" + +#define EMOTE_AGGRO -1509000 +#define EMOTE_MANA_FULL -1509001 + +#define SPELL_TRAMPLE 15550 +#define SPELL_DRAINMANA 27256 +#define SPELL_ARCANEERUPTION 25672 +#define SPELL_SUMMONMANA 25681 +#define SPELL_GRDRSLEEP 24360 //Greater Dreamless Sleep + +struct MANGOS_DLL_DECL boss_moamAI : public ScriptedAI +{ + boss_moamAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + Unit *pTarget; + uint32 TRAMPLE_Timer; + uint32 DRAINMANA_Timer; + uint32 SUMMONMANA_Timer; + uint32 i; + uint32 j; + + void Reset() + { + i=0; + j=0; + pTarget = NULL; + TRAMPLE_Timer = 30000; + DRAINMANA_Timer = 30000; + } + + void Aggro(Unit *who) + { + DoScriptText(EMOTE_AGGRO, m_creature); + pTarget = who; + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //If we are 100%MANA cast Arcane Erruption + //if (j==1 && m_creature->GetMana()*100 / m_creature->GetMaxMana() == 100 && !m_creature->IsNonMeleeSpellCasted(false)) + { + DoCast(m_creature->getVictim(),SPELL_ARCANEERUPTION); + DoScriptText(EMOTE_MANA_FULL, m_creature); + } + + //If we are <50%HP cast MANA FIEND (Summon Mana) and Sleep + //if (i==0 && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 50 && !m_creature->IsNonMeleeSpellCasted(false)) + { + i=1; + DoCast(m_creature->getVictim(),SPELL_SUMMONMANA); + DoCast(m_creature->getVictim(),SPELL_GRDRSLEEP); + } + + //SUMMONMANA_Timer + if (i==1 && SUMMONMANA_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_SUMMONMANA); + SUMMONMANA_Timer = 90000; + }else SUMMONMANA_Timer -= diff; + + //TRAMPLE_Timer + if (TRAMPLE_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_TRAMPLE); + j=1; + + TRAMPLE_Timer = 30000; + }else TRAMPLE_Timer -= diff; + + //DRAINMANA_Timer + if (DRAINMANA_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_DRAINMANA); + DRAINMANA_Timer = 30000; + }else DRAINMANA_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_moam(Creature* pCreature) +{ + return new boss_moamAI(pCreature); +} + +void AddSC_boss_moam() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_moam"; + newscript->GetAI = &GetAI_boss_moam; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp new file mode 100644 index 000000000..5948fca01 --- /dev/null +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp @@ -0,0 +1,38 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Ossirian +SD%Complete: 0 +SDComment: Place holder +SDCategory: Ruins of Ahn'Qiraj +EndScriptData */ + +#include "precompiled.h" + +#define SAY_SURPREME1 -1509018 +#define SAY_SURPREME2 -1509019 +#define SAY_SURPREME3 -1509020 + +#define SAY_RAND_INTRO1 -1509021 +#define SAY_RAND_INTRO2 -1509022 +#define SAY_RAND_INTRO3 -1509023 +#define SAY_RAND_INTRO4 -1509024 //possibly old? + +#define SAY_AGGRO -1509025 + +#define SAY_SLAY -1509026 +#define SAY_DEATH -1509027 diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp new file mode 100644 index 000000000..8b755e333 --- /dev/null +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp @@ -0,0 +1,44 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Rajaxx +SD%Complete: 0 +SDComment: Place Holder +SDCategory: Ruins of Ahn'Qiraj +EndScriptData */ + +#include "precompiled.h" + +#define SAY_ANDOROV_INTRO -1509003 +#define SAY_ANDOROV_ATTACK -1509004 + +#define SAY_WAVE3 -1509005 +#define SAY_WAVE4 -1509006 +#define SAY_WAVE5 -1509007 +#define SAY_WAVE6 -1509008 +#define SAY_WAVE7 -1509009 +#define SAY_INTRO -1509010 + +#define SAY_UNK1 -1509011 +#define SAY_UNK2 -1509012 +#define SAY_UNK3 -1509013 +#define SAY_UNK4 -1509014 + +#define SAY_DEAGGRO -1509015 +#define SAY_KILLS_ANDOROV -1509016 + +#define SAY_COMPLETE_QUEST -1509017 //Yell when realm complete quest 8743 for world event diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp new file mode 100644 index 000000000..b1f6febfa --- /dev/null +++ b/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp @@ -0,0 +1,24 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance_Ruins_of_Ahnqiraj +SD%Complete: 0 +SDComment: Place holder +SDCategory: Ruins of Ahn'Qiraj +EndScriptData */ + +#include "precompiled.h" diff --git a/scripts/kalimdor/silithus.cpp b/scripts/kalimdor/silithus.cpp new file mode 100644 index 000000000..4e6e274ce --- /dev/null +++ b/scripts/kalimdor/silithus.cpp @@ -0,0 +1,253 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Silithus +SD%Complete: 100 +SDComment: Quest support: 7785, 8304. +SDCategory: Silithus +EndScriptData */ + +/* ContentData +npc_highlord_demitrian +npcs_rutgar_and_frankal +EndContentData */ + +#include "precompiled.h" + +/*### +## npc_highlord_demitrian +###*/ + +#define GOSSIP_ITEM_DEMITRIAN1 "What do you know of it?" +#define GOSSIP_ITEM_DEMITRIAN2 "I am listening , Demitrian." +#define GOSSIP_ITEM_DEMITRIAN3 "Continue, please." +#define GOSSIP_ITEM_DEMITRIAN4 "A battle?" +#define GOSSIP_ITEM_DEMITRIAN5 "" +#define GOSSIP_ITEM_DEMITRIAN6 "Caught unaware? How?" +#define GOSSIP_ITEM_DEMITRIAN7 "So what did Ragnaros do next?" + +enum +{ + QUEST_EXAMINE_THE_VESSEL = 7785, + ITEM_BINDINGS_WINDSEEKER_LEFT = 18563, + ITEM_BINDINGS_WINDSEEKER_RIGHT = 18564, + ITEM_VESSEL_OF_REBIRTH = 19016, + GOSSIP_TEXTID_DEMITRIAN1 = 6842, + GOSSIP_TEXTID_DEMITRIAN2 = 6843, + GOSSIP_TEXTID_DEMITRIAN3 = 6844, + GOSSIP_TEXTID_DEMITRIAN4 = 6867, + GOSSIP_TEXTID_DEMITRIAN5 = 6868, + GOSSIP_TEXTID_DEMITRIAN6 = 6869, + GOSSIP_TEXTID_DEMITRIAN7 = 6870 +}; + +bool GossipHello_npc_highlord_demitrian(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestStatus(QUEST_EXAMINE_THE_VESSEL) == QUEST_STATUS_NONE && + (pPlayer->HasItemCount(ITEM_BINDINGS_WINDSEEKER_LEFT,1,false) || pPlayer->HasItemCount(ITEM_BINDINGS_WINDSEEKER_RIGHT,1,false))) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DEMITRIAN1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_highlord_demitrian(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DEMITRIAN2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DEMITRIAN1, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DEMITRIAN3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DEMITRIAN2, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DEMITRIAN4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DEMITRIAN3, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+3: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DEMITRIAN5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DEMITRIAN4, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+4: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DEMITRIAN6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DEMITRIAN5, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+5: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DEMITRIAN7, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DEMITRIAN6, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+6: + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DEMITRIAN7, pCreature->GetGUID()); + + ItemPosCountVec dest; + uint8 msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, ITEM_VESSEL_OF_REBIRTH, 1); + if (msg == EQUIP_ERR_OK) + pPlayer->StoreNewItem(dest, ITEM_VESSEL_OF_REBIRTH, true); + break; + } + return true; +} + +/*### +## npcs_rutgar_and_frankal +###*/ + +//gossip item text best guess +#define GOSSIP_ITEM_SEEK1 "I seek information about Natalia" + +#define GOSSIP_ITEM_RUTGAR2 "That sounds dangerous!" +#define GOSSIP_ITEM_RUTGAR3 "What did you do?" +#define GOSSIP_ITEM_RUTGAR4 "Who?" +#define GOSSIP_ITEM_RUTGAR5 "Women do that. What did she demand?" +#define GOSSIP_ITEM_RUTGAR6 "What do you mean?" +#define GOSSIP_ITEM_RUTGAR7 "What happened next?" + +#define GOSSIP_ITEM_FRANKAL11 "Yes, please continue" +#define GOSSIP_ITEM_FRANKAL12 "What language?" +#define GOSSIP_ITEM_FRANKAL13 "The Priestess attacked you?!" +#define GOSSIP_ITEM_FRANKAL14 "I should ask the monkey about this" +#define GOSSIP_ITEM_FRANKAL15 "Then what..." + +enum +{ + QUEST_DEAREST_NATALIA = 8304, + NPC_RUTGAR = 15170, + NPC_FRANKAL = 15171, + TRIGGER_RUTGAR = 15222, + TRIGGER_FRANKAL = 15221, + GOSSIP_TEXTID_RF = 7754, + GOSSIP_TEXTID_RUTGAR1 = 7755, + GOSSIP_TEXTID_RUTGAR2 = 7756, + GOSSIP_TEXTID_RUTGAR3 = 7757, + GOSSIP_TEXTID_RUTGAR4 = 7758, + GOSSIP_TEXTID_RUTGAR5 = 7759, + GOSSIP_TEXTID_RUTGAR6 = 7760, + GOSSIP_TEXTID_RUTGAR7 = 7761, + GOSSIP_TEXTID_FRANKAL1 = 7762, + GOSSIP_TEXTID_FRANKAL2 = 7763, + GOSSIP_TEXTID_FRANKAL3 = 7764, + GOSSIP_TEXTID_FRANKAL4 = 7765, + GOSSIP_TEXTID_FRANKAL5 = 7766, + GOSSIP_TEXTID_FRANKAL6 = 7767 +}; + +bool GossipHello_npcs_rutgar_and_frankal(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestStatus(QUEST_DEAREST_NATALIA) == QUEST_STATUS_INCOMPLETE && + pCreature->GetEntry() == NPC_RUTGAR && + !pPlayer->GetReqKillOrCastCurrentCount(QUEST_DEAREST_NATALIA, TRIGGER_RUTGAR)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SEEK1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + + if (pPlayer->GetQuestStatus(QUEST_DEAREST_NATALIA) == QUEST_STATUS_INCOMPLETE && + pCreature->GetEntry() == NPC_FRANKAL && + pPlayer->GetReqKillOrCastCurrentCount(QUEST_DEAREST_NATALIA, TRIGGER_RUTGAR)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SEEK1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+9); + + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_RF, pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npcs_rutgar_and_frankal(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_RUTGAR2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_RUTGAR1, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 1: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_RUTGAR3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_RUTGAR2, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_RUTGAR4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_RUTGAR3, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_RUTGAR5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_RUTGAR4, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_RUTGAR6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_RUTGAR5, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_RUTGAR7, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_RUTGAR6, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_RUTGAR7, pCreature->GetGUID()); + //'kill' our trigger to update quest status + pPlayer->KilledMonsterCredit(TRIGGER_RUTGAR, pCreature->GetGUID()); + break; + + case GOSSIP_ACTION_INFO_DEF + 9: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FRANKAL11, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FRANKAL1, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 10: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FRANKAL12, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FRANKAL2, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 11: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FRANKAL13, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 12); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FRANKAL3, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 12: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FRANKAL14, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 13); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FRANKAL4, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 13: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FRANKAL15, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 14); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FRANKAL5, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 14: + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FRANKAL6, pCreature->GetGUID()); + //'kill' our trigger to update quest status + pPlayer->KilledMonsterCredit(TRIGGER_FRANKAL, pCreature->GetGUID()); + break; + } + return true; +} + +void AddSC_silithus() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_highlord_demitrian"; + newscript->pGossipHello = &GossipHello_npc_highlord_demitrian; + newscript->pGossipSelect = &GossipSelect_npc_highlord_demitrian; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npcs_rutgar_and_frankal"; + newscript->pGossipHello = &GossipHello_npcs_rutgar_and_frankal; + newscript->pGossipSelect = &GossipSelect_npcs_rutgar_and_frankal; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/stonetalon_mountains.cpp b/scripts/kalimdor/stonetalon_mountains.cpp new file mode 100644 index 000000000..b9bb35e4d --- /dev/null +++ b/scripts/kalimdor/stonetalon_mountains.cpp @@ -0,0 +1,160 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Stonetalon_Mountains +SD%Complete: 95 +SDComment: Quest support: 6627 (Braug Dimspirits questions/'answers' might have more to it, need more info),6523 +SDCategory: Stonetalon Mountains +EndScriptData */ + +#include "precompiled.h" +#include "escort_ai.h" + +/*###### +## npc_braug_dimspirit +######*/ + +bool GossipHello_npc_braug_dimspirit(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestStatus(6627) == QUEST_STATUS_INCOMPLETE) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Ysera", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Neltharion", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Nozdormu", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Alexstrasza", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Malygos", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + pPlayer->SEND_GOSSIP_MENU(5820, pCreature->GetGUID()); + } + else + pPlayer->SEND_GOSSIP_MENU(5819, pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_braug_dimspirit(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + pPlayer->CLOSE_GOSSIP_MENU(); + pCreature->CastSpell(pPlayer,6766,false); + + } + if (uiAction == GOSSIP_ACTION_INFO_DEF+2) + { + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->AreaExploredOrEventHappens(6627); + } + return true; +} + +/*###### +## npc_kaya +######*/ + +enum +{ + NPC_GRIMTOTEM_RUFFIAN = 11910, + NPC_GRIMTOTEM_BRUTE = 11912, + NPC_GRIMTOTEM_SORCERER = 11913, + + SAY_START = -1000357, + SAY_AMBUSH = -1000358, + SAY_END = -1000359, + + QUEST_PROTECT_KAYA = 6523 +}; + +struct MANGOS_DLL_DECL npc_kayaAI : public npc_escortAI +{ + npc_kayaAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } + + void Reset() { } + + void JustSummoned(Creature* pSummoned) + { + pSummoned->AI()->AttackStart(m_creature); + } + + void WaypointReached(uint32 uiPointId) + { + switch(uiPointId) + { + //Ambush + case 16: + //note about event here: + //apparently NPC say _after_ the ambush is over, and is most likely a bug at you-know-where. + //we simplify this, and make say when the ambush actually start. + DoScriptText(SAY_AMBUSH, m_creature); + m_creature->SummonCreature(NPC_GRIMTOTEM_RUFFIAN, -50.75, -500.77, -46.13, 0.4, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000); + m_creature->SummonCreature(NPC_GRIMTOTEM_BRUTE, -40.05, -510.89,- 46.05, 1.7, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000); + m_creature->SummonCreature(NPC_GRIMTOTEM_SORCERER, -32.21, -499.20, -45.35, 2.8, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000); + break; + // Award quest credit + case 18: + DoScriptText(SAY_END, m_creature); + + if (Player* pPlayer = GetPlayerForEscort()) + pPlayer->GroupEventHappens(QUEST_PROTECT_KAYA, m_creature); + break; + } + } +}; + +CreatureAI* GetAI_npc_kaya(Creature* pCreature) +{ + return new npc_kayaAI(pCreature); +} + +bool QuestAccept_npc_kaya(Player* pPlayer, Creature* pCreature, Quest const* pQuest) +{ + //Casting Spell and Starting the Escort quest is buggy, so this is a hack. Use the spell when it is possible. + + if (pQuest->GetQuestId() == QUEST_PROTECT_KAYA) + { + pCreature->setFaction(FACTION_ESCORT_H_PASSIVE); + DoScriptText(SAY_START,pCreature); + + if (npc_kayaAI* pEscortAI = dynamic_cast(pCreature->AI())) + pEscortAI->Start(true, false, pPlayer->GetGUID(), pQuest); + } + return true; +} + +/*###### +## AddSC +######*/ + +void AddSC_stonetalon_mountains() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_braug_dimspirit"; + newscript->pGossipHello = &GossipHello_npc_braug_dimspirit; + newscript->pGossipSelect = &GossipSelect_npc_braug_dimspirit; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_kaya"; + newscript->GetAI = &GetAI_npc_kaya; + newscript->pQuestAccept = &QuestAccept_npc_kaya; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/tanaris.cpp b/scripts/kalimdor/tanaris.cpp new file mode 100644 index 000000000..fc55cfc09 --- /dev/null +++ b/scripts/kalimdor/tanaris.cpp @@ -0,0 +1,639 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Tanaris +SD%Complete: 80 +SDComment: Quest support: 648, 1560, 2954, 4005, 10277, 10279(Special flight path). Noggenfogger vendor +SDCategory: Tanaris +EndScriptData */ + +/* ContentData +mob_aquementas +npc_custodian_of_time +npc_marin_noggenfogger +npc_oox17tn +npc_steward_of_time +npc_stone_watcher_of_norgannon +npc_tooga +EndContentData */ + +#include "precompiled.h" +#include "escort_ai.h" +#include "follower_ai.h" + +/*###### +## mob_aquementas +######*/ + +#define AGGRO_YELL_AQUE -1000168 + +#define SPELL_AQUA_JET 13586 +#define SPELL_FROST_SHOCK 15089 + +struct MANGOS_DLL_DECL mob_aquementasAI : public ScriptedAI +{ + mob_aquementasAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 SendItem_Timer; + uint32 SwitchFaction_Timer; + bool isFriendly; + + uint32 FrostShock_Timer; + uint32 AquaJet_Timer; + + void Reset() + { + SendItem_Timer = 0; + SwitchFaction_Timer = 10000; + m_creature->setFaction(35); + isFriendly = true; + + AquaJet_Timer = 5000; + FrostShock_Timer = 1000; + } + + void SendItem(Unit* receiver) + { + if (((Player*)receiver)->HasItemCount(11169,1,false) && + ((Player*)receiver)->HasItemCount(11172,11,false) && + ((Player*)receiver)->HasItemCount(11173,1,false) && + !((Player*)receiver)->HasItemCount(11522,1,true)) + { + ItemPosCountVec dest; + uint8 msg = ((Player*)receiver)->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, 11522, 1, false); + if (msg == EQUIP_ERR_OK) + ((Player*)receiver)->StoreNewItem(dest, 11522, 1, true); + } + } + + void Aggro(Unit* who) + { + DoScriptText(AGGRO_YELL_AQUE, m_creature, who); + } + + void UpdateAI(const uint32 diff) + { + if (isFriendly) + { + if (SwitchFaction_Timer < diff) + { + m_creature->setFaction(91); + isFriendly = false; + }else SwitchFaction_Timer -= diff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (!isFriendly) + { + if (SendItem_Timer < diff) + { + if (m_creature->getVictim()->GetTypeId() == TYPEID_PLAYER) + SendItem(m_creature->getVictim()); + SendItem_Timer = 5000; + }else SendItem_Timer -= diff; + } + + if (FrostShock_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_FROST_SHOCK); + FrostShock_Timer = 15000; + }else FrostShock_Timer -= diff; + + if (AquaJet_Timer < diff) + { + DoCast(m_creature,SPELL_AQUA_JET); + AquaJet_Timer = 15000; + }else AquaJet_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_mob_aquementas(Creature* pCreature) +{ + return new mob_aquementasAI(pCreature); +} + +/*###### +## npc_custodian_of_time +######*/ + +#define WHISPER_CUSTODIAN_1 -1000217 +#define WHISPER_CUSTODIAN_2 -1000218 +#define WHISPER_CUSTODIAN_3 -1000219 +#define WHISPER_CUSTODIAN_4 -1000220 +#define WHISPER_CUSTODIAN_5 -1000221 +#define WHISPER_CUSTODIAN_6 -1000222 +#define WHISPER_CUSTODIAN_7 -1000223 +#define WHISPER_CUSTODIAN_8 -1000224 +#define WHISPER_CUSTODIAN_9 -1000225 +#define WHISPER_CUSTODIAN_10 -1000226 +#define WHISPER_CUSTODIAN_11 -1000227 +#define WHISPER_CUSTODIAN_12 -1000228 +#define WHISPER_CUSTODIAN_13 -1000229 +#define WHISPER_CUSTODIAN_14 -1000230 + +struct MANGOS_DLL_DECL npc_custodian_of_timeAI : public npc_escortAI +{ + npc_custodian_of_timeAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } + + void WaypointReached(uint32 i) + { + Player* pPlayer = GetPlayerForEscort(); + + if (!pPlayer) + return; + + switch(i) + { + case 0: DoScriptText(WHISPER_CUSTODIAN_1, m_creature, pPlayer); break; + case 1: DoScriptText(WHISPER_CUSTODIAN_2, m_creature, pPlayer); break; + case 2: DoScriptText(WHISPER_CUSTODIAN_3, m_creature, pPlayer); break; + case 3: DoScriptText(WHISPER_CUSTODIAN_4, m_creature, pPlayer); break; + case 5: DoScriptText(WHISPER_CUSTODIAN_5, m_creature, pPlayer); break; + case 6: DoScriptText(WHISPER_CUSTODIAN_6, m_creature, pPlayer); break; + case 7: DoScriptText(WHISPER_CUSTODIAN_7, m_creature, pPlayer); break; + case 8: DoScriptText(WHISPER_CUSTODIAN_8, m_creature, pPlayer); break; + case 9: DoScriptText(WHISPER_CUSTODIAN_9, m_creature, pPlayer); break; + case 10: DoScriptText(WHISPER_CUSTODIAN_4, m_creature, pPlayer); break; + case 13: DoScriptText(WHISPER_CUSTODIAN_10, m_creature, pPlayer); break; + case 14: DoScriptText(WHISPER_CUSTODIAN_4, m_creature, pPlayer); break; + case 16: DoScriptText(WHISPER_CUSTODIAN_11, m_creature, pPlayer); break; + case 17: DoScriptText(WHISPER_CUSTODIAN_12, m_creature, pPlayer); break; + case 18: DoScriptText(WHISPER_CUSTODIAN_4, m_creature, pPlayer); break; + case 22: DoScriptText(WHISPER_CUSTODIAN_13, m_creature, pPlayer); break; + case 23: DoScriptText(WHISPER_CUSTODIAN_4, m_creature, pPlayer); break; + case 24: + DoScriptText(WHISPER_CUSTODIAN_14, m_creature, pPlayer); + DoCast(pPlayer, 34883); + //below here is temporary workaround, to be removed when spell works properly + pPlayer->AreaExploredOrEventHappens(10277); + break; + } + } + + void MoveInLineOfSight(Unit *who) + { + if (HasEscortState(STATE_ESCORT_ESCORTING)) + return; + + if (who->GetTypeId() == TYPEID_PLAYER) + { + if (((Player*)who)->HasAura(34877,1) && ((Player*)who)->GetQuestStatus(10277) == QUEST_STATUS_INCOMPLETE) + { + float Radius = 10.0; + + if (m_creature->IsWithinDistInMap(who, Radius)) + Start(false, false, who->GetGUID()); + } + } + } + + void Reset() { } +}; + +CreatureAI* GetAI_npc_custodian_of_time(Creature* pCreature) +{ + return new npc_custodian_of_timeAI(pCreature); +} + +/*###### +## npc_marin_noggenfogger +######*/ + +bool GossipHello_npc_marin_noggenfogger(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pCreature->isVendor() && pPlayer->GetQuestRewardStatus(2662)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_marin_noggenfogger(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_TRADE) + pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + + return true; +} + +/*###### +## npc_oox17tn +######*/ + +enum +{ + 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, + + QUEST_RESCUE_OOX_17TN = 648, + + NPC_SCORPION = 7803, + NPC_SCOFFLAW = 7805, + NPC_SHADOW_MAGE = 5617 +}; + +struct MANGOS_DLL_DECL npc_oox17tnAI : public npc_escortAI +{ + npc_oox17tnAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } + + void WaypointReached(uint32 i) + { + Player* pPlayer = GetPlayerForEscort(); + + if (!pPlayer) + return; + + switch (i) + { + //1. Ambush: 3 scorpions + case 22: + DoScriptText(SAY_OOX_AMBUSH, m_creature); + m_creature->SummonCreature(NPC_SCORPION, -8340.70, -4448.17, 9.17, 3.10, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000); + m_creature->SummonCreature(NPC_SCORPION, -8343.18, -4444.35, 9.44, 2.35, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000); + m_creature->SummonCreature(NPC_SCORPION, -8348.70, -4457.80, 9.58, 2.02, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000); + break; + //2. Ambush: 2 Rogues & 1 Shadow Mage + case 28: + DoScriptText(SAY_OOX_AMBUSH, m_creature); + + m_creature->SummonCreature(NPC_SCOFFLAW, -7488.02, -4786.56 ,10.67, 3.74, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); + m_creature->SummonCreature(NPC_SHADOW_MAGE, -7486.41, -4791.55 ,10.54, 3.26, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000); + + if (Creature* pCreature = m_creature->SummonCreature(NPC_SCOFFLAW, -7488.47, -4800.77, 9.77, 2.50,TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000)) + DoScriptText(SAY_OOX17_AMBUSH_REPLY,pCreature); + + break; + case 34: + DoScriptText(SAY_OOX_END, m_creature); + // Award quest credit + pPlayer->GroupEventHappens(QUEST_RESCUE_OOX_17TN, m_creature); + break; + } + } + + void Reset() { } + + void Aggro(Unit* who) + { + //For an small probability he say something when it aggros + switch(urand(0, 9)) + { + case 0: DoScriptText(SAY_OOX_AGGRO1, m_creature); break; + case 1: DoScriptText(SAY_OOX_AGGRO2, m_creature); break; + } + } + + void JustSummoned(Creature* summoned) + { + summoned->AI()->AttackStart(m_creature); + } +}; + +CreatureAI* GetAI_npc_oox17tn(Creature* pCreature) +{ + return new npc_oox17tnAI(pCreature); +} + +bool QuestAccept_npc_oox17tn(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_RESCUE_OOX_17TN) + { + DoScriptText(SAY_OOX_START, pCreature); + + pCreature->SetStandState(UNIT_STAND_STATE_STAND); + + if (pPlayer->GetTeam() == ALLIANCE) + pCreature->setFaction(FACTION_ESCORT_A_PASSIVE); + + if (pPlayer->GetTeam() == HORDE) + pCreature->setFaction(FACTION_ESCORT_H_PASSIVE); + + if (npc_oox17tnAI* pEscortAI = dynamic_cast(pCreature->AI())) + pEscortAI->Start(true, false, pPlayer->GetGUID(), pQuest); + } + return true; +} + +/*###### +## npc_steward_of_time +######*/ + +#define GOSSIP_ITEM_FLIGHT "Please take me to the master's lair." + +bool GossipHello_npc_steward_of_time(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestStatus(10279) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestRewardStatus(10279)) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FLIGHT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->SEND_GOSSIP_MENU(9978, pCreature->GetGUID()); + } + else + pPlayer->SEND_GOSSIP_MENU(9977, pCreature->GetGUID()); + + return true; +} + +bool QuestAccept_npc_steward_of_time(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == 10279) //Quest: To The Master's Lair + pPlayer->CastSpell(pPlayer,34891,true); //(Flight through Caverns) + + return false; +} + +bool GossipSelect_npc_steward_of_time(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) + pPlayer->CastSpell(pPlayer,34891,true); //(Flight through Caverns) + + return true; +} + +/*###### +## npc_stone_watcher_of_norgannon +######*/ + +#define GOSSIP_ITEM_NORGANNON_1 "What function do you serve?" +#define GOSSIP_ITEM_NORGANNON_2 "What are the Plates of Uldum?" +#define GOSSIP_ITEM_NORGANNON_3 "Where are the Plates of Uldum?" +#define GOSSIP_ITEM_NORGANNON_4 "Excuse me? We've been \"reschedueled for visitations\"? What does that mean?!" +#define GOSSIP_ITEM_NORGANNON_5 "So, what's inside Uldum?" +#define GOSSIP_ITEM_NORGANNON_6 "I will return when i have the Plates of Uldum." + +bool GossipHello_npc_stone_watcher_of_norgannon(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestStatus(2954) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NORGANNON_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + + pPlayer->SEND_GOSSIP_MENU(1674, pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_stone_watcher_of_norgannon(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NORGANNON_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(1675, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NORGANNON_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->SEND_GOSSIP_MENU(1676, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NORGANNON_4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); + pPlayer->SEND_GOSSIP_MENU(1677, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+3: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NORGANNON_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); + pPlayer->SEND_GOSSIP_MENU(1678, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+4: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NORGANNON_6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); + pPlayer->SEND_GOSSIP_MENU(1679, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+5: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->AreaExploredOrEventHappens(2954); + break; + } + return true; +} + +/*#### +# npc_tooga +####*/ + +enum +{ + 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, + + QUEST_TOOGA = 1560, + NPC_TORTA = 6015, + + POINT_ID_TO_WATER = 1 +}; + +const float m_afToWaterLoc[] = {-7032.664551, -4906.199219, -1.606446}; + +struct MANGOS_DLL_DECL npc_toogaAI : public FollowerAI +{ + npc_toogaAI(Creature* pCreature) : FollowerAI(pCreature) { Reset(); } + + uint32 m_uiCheckSpeechTimer; + uint32 m_uiPostEventTimer; + uint32 m_uiPhasePostEvent; + + Unit* pTorta; + + void Reset() + { + m_uiCheckSpeechTimer = 2500; + m_uiPostEventTimer = 1000; + m_uiPhasePostEvent = 0; + + pTorta = NULL; + } + + void MoveInLineOfSight(Unit* pWho) + { + FollowerAI::MoveInLineOfSight(pWho); + + if (!m_creature->getVictim() && !HasFollowState(STATE_FOLLOW_COMPLETE | STATE_FOLLOW_POSTEVENT) && pWho->GetEntry() == NPC_TORTA) + { + if (m_creature->IsWithinDistInMap(pWho, INTERACTION_DISTANCE)) + { + if (Player* pPlayer = GetLeaderForFollower()) + { + if (pPlayer->GetQuestStatus(QUEST_TOOGA) == QUEST_STATUS_INCOMPLETE) + pPlayer->GroupEventHappens(QUEST_TOOGA, m_creature); + } + + pTorta = pWho; + SetFollowComplete(true); + } + } + } + + void MovementInform(uint32 uiMotionType, uint32 uiPointId) + { + FollowerAI::MovementInform(uiMotionType, uiPointId); + + if (uiMotionType != POINT_MOTION_TYPE) + return; + + if (uiPointId == POINT_ID_TO_WATER) + SetFollowComplete(); + } + + void UpdateFollowerAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + { + //we are doing the post-event, or... + if (HasFollowState(STATE_FOLLOW_POSTEVENT)) + { + if (m_uiPostEventTimer < uiDiff) + { + m_uiPostEventTimer = 5000; + + if (!pTorta || !pTorta->isAlive()) + { + //something happened, so just complete + SetFollowComplete(); + return; + } + + switch(m_uiPhasePostEvent) + { + case 1: + DoScriptText(SAY_TOOG_POST_1, m_creature); + break; + case 2: + DoScriptText(SAY_TORT_POST_2, pTorta); + break; + case 3: + DoScriptText(SAY_TOOG_POST_3, m_creature); + break; + case 4: + DoScriptText(SAY_TORT_POST_4, pTorta); + break; + case 5: + DoScriptText(SAY_TOOG_POST_5, m_creature); + break; + case 6: + DoScriptText(SAY_TORT_POST_6, pTorta); + m_creature->GetMotionMaster()->MovePoint(POINT_ID_TO_WATER, m_afToWaterLoc[0], m_afToWaterLoc[1], m_afToWaterLoc[2]); + break; + } + + ++m_uiPhasePostEvent; + } + else + m_uiPostEventTimer -= uiDiff; + } + //...we are doing regular speech check + else if (HasFollowState(STATE_FOLLOW_INPROGRESS)) + { + if (m_uiCheckSpeechTimer < uiDiff) + { + m_uiCheckSpeechTimer = 5000; + + switch(urand(0, 50)) + { + case 10: DoScriptText(SAY_TOOG_THIRST, m_creature); break; + case 25: DoScriptText(SAY_TOOG_WORRIED, m_creature); break; + } + } + else + m_uiCheckSpeechTimer -= uiDiff; + } + + return; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_tooga(Creature* pCreature) +{ + return new npc_toogaAI(pCreature); +} + +bool QuestAccept_npc_tooga(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_TOOGA) + { + if (npc_toogaAI* pToogaAI = dynamic_cast(pCreature->AI())) + pToogaAI->StartFollow(pPlayer, FACTION_ESCORT_N_FRIEND_PASSIVE, pQuest); + } + + return true; +} + +void AddSC_tanaris() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "mob_aquementas"; + newscript->GetAI = &GetAI_mob_aquementas; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_custodian_of_time"; + newscript->GetAI = &GetAI_npc_custodian_of_time; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_marin_noggenfogger"; + newscript->pGossipHello = &GossipHello_npc_marin_noggenfogger; + newscript->pGossipSelect = &GossipSelect_npc_marin_noggenfogger; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_oox17tn"; + newscript->GetAI = &GetAI_npc_oox17tn; + newscript->pQuestAccept = &QuestAccept_npc_oox17tn; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_steward_of_time"; + newscript->pGossipHello = &GossipHello_npc_steward_of_time; + newscript->pGossipSelect = &GossipSelect_npc_steward_of_time; + newscript->pQuestAccept = &QuestAccept_npc_steward_of_time; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_stone_watcher_of_norgannon"; + newscript->pGossipHello = &GossipHello_npc_stone_watcher_of_norgannon; + newscript->pGossipSelect = &GossipSelect_npc_stone_watcher_of_norgannon; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_tooga"; + newscript->GetAI = &GetAI_npc_tooga; + newscript->pQuestAccept = &QuestAccept_npc_tooga; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/teldrassil.cpp b/scripts/kalimdor/teldrassil.cpp new file mode 100644 index 000000000..c124ed0b8 --- /dev/null +++ b/scripts/kalimdor/teldrassil.cpp @@ -0,0 +1,113 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Teldrassil +SD%Complete: 100 +SDComment: Quest support: 938 +SDCategory: Teldrassil +EndScriptData */ + +/* ContentData +npc_mist +EndContentData */ + +#include "precompiled.h" +#include "follower_ai.h" + +/*#### +# npc_mist +####*/ + +enum +{ + SAY_AT_HOME = -1000323, + EMOTE_AT_HOME = -1000324, + QUEST_MIST = 938, + NPC_ARYNIA = 3519, + FACTION_DARNASSUS = 79 +}; + +struct MANGOS_DLL_DECL npc_mistAI : public FollowerAI +{ + npc_mistAI(Creature* pCreature) : FollowerAI(pCreature) { Reset(); } + + void Reset() { } + + void MoveInLineOfSight(Unit *pWho) + { + FollowerAI::MoveInLineOfSight(pWho); + + if (!m_creature->getVictim() && !HasFollowState(STATE_FOLLOW_COMPLETE) && pWho->GetEntry() == NPC_ARYNIA) + { + if (m_creature->IsWithinDistInMap(pWho, 10.0f)) + { + DoScriptText(SAY_AT_HOME, pWho); + DoComplete(); + } + } + } + + void DoComplete() + { + DoScriptText(EMOTE_AT_HOME, m_creature); + + if (Player* pPlayer = GetLeaderForFollower()) + { + if (pPlayer->GetQuestStatus(QUEST_MIST) == QUEST_STATUS_INCOMPLETE) + pPlayer->GroupEventHappens(QUEST_MIST, m_creature); + } + + //The follow is over (and for later development, run off to the woods before really end) + SetFollowComplete(); + } + + //call not needed here, no known abilities + /*void UpdateFollowerAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + }*/ +}; + +CreatureAI* GetAI_npc_mist(Creature* pCreature) +{ + return new npc_mistAI(pCreature); +} + +bool QuestAccept_npc_mist(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_MIST) + { + if (npc_mistAI* pMistAI = dynamic_cast(pCreature->AI())) + pMistAI->StartFollow(pPlayer, FACTION_DARNASSUS, pQuest); + } + + return true; +} + +void AddSC_teldrassil() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_mist"; + newscript->GetAI = &GetAI_npc_mist; + newscript->pQuestAccept = &QuestAccept_npc_mist; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp new file mode 100644 index 000000000..daeb7ebfd --- /dev/null +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp @@ -0,0 +1,332 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_kri, boss_yauj, boss_vem : The Bug Trio +SD%Complete: 100 +SDComment: +SDCategory: Temple of Ahn'Qiraj +EndScriptData */ + +#include "precompiled.h" +#include "temple_of_ahnqiraj.h" + +#define SPELL_CLEAVE 26350 +#define SPELL_TOXIC_VOLLEY 25812 +#define SPELL_POISON_CLOUD 38718 //Only Spell with right dmg. +#define SPELL_ENRAGE 34624 //Changed cause 25790 is casted on gamers too. Same prob with old explosion of twin emperors. + +#define SPELL_CHARGE 26561 +#define SPELL_KNOCKBACK 26027 + +#define SPELL_HEAL 25807 +#define SPELL_FEAR 19408 + +struct MANGOS_DLL_DECL boss_kriAI : public ScriptedAI +{ + boss_kriAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 Cleave_Timer; + uint32 ToxicVolley_Timer; + uint32 Check_Timer; + + bool VemDead; + bool Death; + + void Reset() + { + Cleave_Timer = urand(4000, 8000); + ToxicVolley_Timer = urand(6000, 12000); + Check_Timer = 2000; + + VemDead = false; + Death = false; + } + + void JustDied(Unit* killer) + { + if (m_pInstance) + { + if (m_pInstance->GetData(DATA_BUG_TRIO_DEATH) < 2) + // Unlootable if death + m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + + m_pInstance->SetData(DATA_BUG_TRIO_DEATH, 1); + } + } + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Cleave_Timer + if (Cleave_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_CLEAVE); + Cleave_Timer = urand(5000, 12000); + }else Cleave_Timer -= diff; + + //ToxicVolley_Timer + if (ToxicVolley_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_TOXIC_VOLLEY); + ToxicVolley_Timer = urand(10000, 15000); + }else ToxicVolley_Timer -= diff; + + if (m_creature->GetHealth() <= m_creature->GetMaxHealth() * 0.05 && !Death) + { + DoCast(m_creature->getVictim(),SPELL_POISON_CLOUD); + Death = true; + } + + if (!VemDead) + { + //Checking if Vem is dead. If yes we will enrage. + if (Check_Timer < diff) + { + if (m_pInstance && m_pInstance->GetData(TYPE_VEM) == DONE) + { + DoCast(m_creature, SPELL_ENRAGE); + VemDead = true; + } + Check_Timer = 2000; + }else Check_Timer -=diff; + } + + DoMeleeAttackIfReady(); + } +}; + +struct MANGOS_DLL_DECL boss_vemAI : public ScriptedAI +{ + boss_vemAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 Charge_Timer; + uint32 KnockBack_Timer; + uint32 Enrage_Timer; + + bool Enraged; + + void Reset() + { + Charge_Timer = urand(15000, 27000); + KnockBack_Timer = urand(8000, 20000); + Enrage_Timer = 120000; + + Enraged = false; + } + + void JustDied(Unit* Killer) + { + if (m_pInstance) + { + m_pInstance->SetData(TYPE_VEM, DONE); + + // Unlootable if death + if (m_pInstance->GetData(DATA_BUG_TRIO_DEATH) < 2) + m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + + m_pInstance->SetData(DATA_BUG_TRIO_DEATH, 1); + } + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Charge_Timer + if (Charge_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, SPELL_CHARGE); + + Charge_Timer = urand(8000, 16000); + }else Charge_Timer -= diff; + + //KnockBack_Timer + if (KnockBack_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_KNOCKBACK); + if (m_creature->getThreatManager().getThreat(m_creature->getVictim())) + m_creature->getThreatManager().modifyThreatPercent(m_creature->getVictim(),-80); + KnockBack_Timer = urand(15000, 25000); + }else KnockBack_Timer -= diff; + + //Enrage_Timer + if (!Enraged && Enrage_Timer < diff) + { + DoCast(m_creature,SPELL_ENRAGE); + Enraged = true; + }else Charge_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +struct MANGOS_DLL_DECL boss_yaujAI : public ScriptedAI +{ + boss_yaujAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 Heal_Timer; + uint32 Fear_Timer; + uint32 Check_Timer; + + bool VemDead; + + void Reset() + { + Heal_Timer = urand(25000, 40000); + Fear_Timer = urand(12000, 24000); + Check_Timer = 2000; + + VemDead = false; + } + + void JustDied(Unit* Killer) + { + if (m_pInstance) + { + if (m_pInstance->GetData(DATA_BUG_TRIO_DEATH) < 2) + // Unlootable if death + m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + m_pInstance->SetData(DATA_BUG_TRIO_DEATH, 1); + } + + for(int i = 0; i < 10; ++i) + { + Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0); + Creature* Summoned = m_creature->SummonCreature(15621,m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(),0,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN,90000); + if (Summoned) + ((CreatureAI*)Summoned->AI())->AttackStart(target); + } + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Fear_Timer + if (Fear_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_FEAR); + DoResetThreat(); + Fear_Timer = 20000; + }else Fear_Timer -= diff; + + //Casting Heal to other twins or herself. + if (Heal_Timer < diff) + { + if (m_pInstance) + { + Unit *pKri = Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_KRI)); + Unit *pVem = Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_VEM)); + + switch(urand(0, 2)) + { + case 0: + if (pKri) + DoCast(pKri, SPELL_HEAL); + break; + case 1: + if (pVem) + DoCast(pVem, SPELL_HEAL); + break; + case 2: + DoCast(m_creature, SPELL_HEAL); + break; + } + } + + Heal_Timer = urand(15000, 30000); + }else Heal_Timer -= diff; + + //Checking if Vem is dead. If yes we will enrage. + if (Check_Timer < diff) + { + if (!VemDead) + { + if (m_pInstance) + { + if (m_pInstance->GetData(TYPE_VEM) == DONE) + { + DoCast(m_creature, SPELL_ENRAGE); + VemDead = true; + } + } + } + Check_Timer = 2000; + }else Check_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_yauj(Creature* pCreature) +{ + return new boss_yaujAI(pCreature); +} + +CreatureAI* GetAI_boss_vem(Creature* pCreature) +{ + return new boss_vemAI(pCreature); +} + +CreatureAI* GetAI_boss_kri(Creature* pCreature) +{ + return new boss_kriAI(pCreature); +} + +void AddSC_bug_trio() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_kri"; + newscript->GetAI = &GetAI_boss_kri; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_vem"; + newscript->GetAI = &GetAI_boss_vem; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_yauj"; + newscript->GetAI = &GetAI_boss_yauj; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp new file mode 100644 index 000000000..3e64f5001 --- /dev/null +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp @@ -0,0 +1,1347 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Cthun +SD%Complete: 95 +SDComment: Darkglare tracking issue +SDCategory: Temple of Ahn'Qiraj +EndScriptData */ + +#include "precompiled.h" +#include "temple_of_ahnqiraj.h" + +//Text emote +#define EMOTE_WEAKENED -1531011 + +#define PI 3.14 + +//****** Out of Combat ****** +//Random Wispers - No txt only sound +#define RANDOM_SOUND_WHISPER 8663 + +//***** Phase 1 ******** + +//Mobs +#define BOSS_EYE_OF_CTHUN 15589 +#define MOB_CLAW_TENTACLE 15725 +#define MOB_EYE_TENTACLE 15726 +#define MOB_SMALL_PORTAL 15904 + +//Eye Spells +#define SPELL_GREEN_BEAM 26134 +#define SPELL_DARK_GLARE 26029 +#define SPELL_RED_COLORATION 22518 //Probably not the right spell but looks similar + +//Eye Tentacles Spells +#define SPELL_MIND_FLAY 26143 + +//Claw Tentacles Spells +#define SPELL_GROUND_RUPTURE 26139 +#define SPELL_HAMSTRING 26141 + +#define MOB_ + +//*****Phase 2****** +//Body spells +//#define SPELL_CARAPACE_CTHUN 26156 //Was removed from client dbcs +#define SPELL_TRANSFORM 26232 + +//Eye Tentacles Spells +//SAME AS PHASE1 + +//Giant Claw Tentacles +#define SPELL_MASSIVE_GROUND_RUPTURE 26100 + +//Also casts Hamstring +#define SPELL_THRASH 3391 + +//Giant Eye Tentacles +//CHAIN CASTS "SPELL_GREEN_BEAM" + +//Stomach Spells +#define SPELL_MOUTH_TENTACLE 26332 +#define SPELL_EXIT_STOMACH_KNOCKBACK 25383 +#define SPELL_DIGESTIVE_ACID 26476 + +//Mobs +#define MOB_BODY_OF_CTHUN 15809 +#define MOB_GIANT_CLAW_TENTACLE 15728 +#define MOB_GIANT_EYE_TENTACLE 15334 +#define MOB_FLESH_TENTACLE 15802 +#define MOB_GIANT_PORTAL 15910 + +//Stomach Teleport positions +#define STOMACH_X -8562.0f +#define STOMACH_Y 2037.0f +#define STOMACH_Z -70.0f +#define STOMACH_O 5.05f + +//Flesh tentacle positions +#define TENTACLE_POS1_X -8571.0f +#define TENTACLE_POS1_Y 1990.0f +#define TENTACLE_POS1_Z -98.0f +#define TENTACLE_POS1_O 1.22f + +#define TENTACLE_POS2_X -8525.0f +#define TENTACLE_POS2_Y 1994.0f +#define TENTACLE_POS2_Z -98.0f +#define TENTACLE_POS2_O 2.12f + +//Kick out position +#define KICK_X -8545.0f +#define KICK_Y 1984.0f +#define KICK_Z -96.0f + +struct MANGOS_DLL_DECL flesh_tentacleAI : public ScriptedAI +{ + flesh_tentacleAI(Creature* pCreature) : ScriptedAI(pCreature), Parent(0) + { + SetCombatMovement(false); + Reset(); + } + + uint64 Parent; + uint32 CheckTimer; + + void SpawnedByCthun(uint64 p) + { + Parent = p; + } + + void Reset() + { + CheckTimer = 1000; + } + + void UpdateAI(const uint32 diff); + + void JustDied(Unit* killer); +}; + +struct MANGOS_DLL_DECL eye_of_cthunAI : public ScriptedAI +{ + eye_of_cthunAI(Creature* pCreature) : ScriptedAI(pCreature) + { + SetCombatMovement(false); + + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + if (!m_pInstance) + error_log("SD2: No Instance eye_of_cthunAI"); + + Reset(); + } + + ScriptedInstance* m_pInstance; + + //Global variables + uint32 PhaseTimer; + + //Eye beam phase + uint32 BeamTimer; + uint32 EyeTentacleTimer; + uint32 ClawTentacleTimer; + + //Dark Glare phase + uint32 DarkGlareTick; + uint32 DarkGlareTickTimer; + float DarkGlareAngle; + bool ClockWise; + + void Reset() + { + //Phase information + PhaseTimer = 50000; //First dark glare in 50 seconds + + //Eye beam phase 50 seconds + BeamTimer = 3000; + EyeTentacleTimer = 45000; //Always spawns 5 seconds before Dark Beam + ClawTentacleTimer = 12500; //4 per Eye beam phase (unsure if they spawn durring Dark beam) + + //Dark Beam phase 35 seconds (each tick = 1 second, 35 ticks) + DarkGlareTick = 0; + DarkGlareTickTimer = 1000; + DarkGlareAngle = 0; + ClockWise = false; + + //Reset flags + m_creature->RemoveAurasDueToSpell(SPELL_RED_COLORATION); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE); + + //Reset Phase + if (m_pInstance) + m_pInstance->SetData(TYPE_CTHUN_PHASE, 0); + } + + void Aggro(Unit* pWho) + { + m_creature->SetInCombatWithZone(); + } + + void SpawnEyeTentacle(float x, float y) + { + Creature* Spawned; + Spawned = (Creature*)m_creature->SummonCreature(MOB_EYE_TENTACLE,m_creature->GetPositionX()+x,m_creature->GetPositionY()+y,m_creature->GetPositionZ(),0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,500); + if (Spawned) + { + Unit* target; + target = SelectUnit(SELECT_TARGET_RANDOM,0); + + if (target) + Spawned->AI()->AttackStart(target); + } + } + + void UpdateAI(const uint32 diff) + { + //Check if we have a target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //No instance + if (!m_pInstance) + return; + + switch (m_pInstance->GetData(TYPE_CTHUN_PHASE)) + { + case 0: + { + //BeamTimer + if (BeamTimer < diff) + { + //SPELL_GREEN_BEAM + Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM,0); + if (target) + { + m_creature->InterruptNonMeleeSpells(false); + DoCast(target,SPELL_GREEN_BEAM); + + //Correctly update our target + m_creature->SetUInt64Value(UNIT_FIELD_TARGET, target->GetGUID()); + } + + //Beam every 3 seconds + BeamTimer = 3000; + }else BeamTimer -= diff; + + //ClawTentacleTimer + if (ClawTentacleTimer < diff) + { + Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM,0); + if (target) + { + Creature* Spawned = NULL; + + //Spawn claw tentacle on the random target + Spawned = (Creature*)m_creature->SummonCreature(MOB_CLAW_TENTACLE,target->GetPositionX(),target->GetPositionY(),target->GetPositionZ(),0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,500); + + if (Spawned) + Spawned->AI()->AttackStart(target); + } + + //One claw tentacle every 12.5 seconds + ClawTentacleTimer = 12500; + }else ClawTentacleTimer -= diff; + + //EyeTentacleTimer + if (EyeTentacleTimer < diff) + { + //Spawn the 8 Eye Tentacles in the corret spots + SpawnEyeTentacle(0, 20); //south + SpawnEyeTentacle(10, 10); //south west + SpawnEyeTentacle(20, 0); //west + SpawnEyeTentacle(10, -10); //north west + + SpawnEyeTentacle(0, -20); //north + SpawnEyeTentacle(-10, -10); //north east + SpawnEyeTentacle(-20, 0); // east + SpawnEyeTentacle(-10, 10); // south east + + //No point actually putting a timer here since + //These shouldn't trigger agian until after phase shifts + EyeTentacleTimer = 45000; + }else EyeTentacleTimer -= diff; + + //PhaseTimer + if (PhaseTimer < diff) + { + //Switch to Dark Beam + m_pInstance->SetData(TYPE_CTHUN_PHASE, 1); + + m_creature->InterruptNonMeleeSpells(false); + + //Select random target for dark beam to start on + Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM,0); + + if (target) + { + //Correctly update our target + m_creature->SetUInt64Value(UNIT_FIELD_TARGET, target->GetGUID()); + + //Face our target + DarkGlareAngle = m_creature->GetAngle(target); + DarkGlareTickTimer = 1000; + DarkGlareTick = 0; + ClockWise = urand(0, 1); + } + + //Add red coloration to C'thun + DoCast(m_creature,SPELL_RED_COLORATION); + + //Freeze animation + + //Darkbeam for 35 seconds + PhaseTimer = 35000; + }else PhaseTimer -= diff; + + } + break; + case 1: + { + //EyeTentacleTimer + if (DarkGlareTick < 35) + if (DarkGlareTickTimer < diff) + { + //Remove any target + m_creature->SetUInt64Value(UNIT_FIELD_TARGET, 0); + + //Set angle and cast + if (ClockWise) + m_creature->SetOrientation(DarkGlareAngle + ((float)DarkGlareTick*PI/35)); + else m_creature->SetOrientation(DarkGlareAngle - ((float)DarkGlareTick*PI/35)); + + m_creature->StopMoving(); + + //Actual dark glare cast, maybe something missing here? + m_creature->CastSpell(NULL, SPELL_DARK_GLARE, false); + + //Increase tick + ++DarkGlareTick; + + //1 second per tick + DarkGlareTickTimer = 1000; + }else DarkGlareTickTimer -= diff; + + //PhaseTimer + if (PhaseTimer < diff) + { + //Switch to Eye Beam + m_pInstance->SetData(TYPE_CTHUN_PHASE, 0); + + BeamTimer = 3000; + EyeTentacleTimer = 45000; //Always spawns 5 seconds before Dark Beam + ClawTentacleTimer = 12500; //4 per Eye beam phase (unsure if they spawn durring Dark beam) + + m_creature->InterruptNonMeleeSpells(false); + + //Remove Red coloration from c'thun + m_creature->RemoveAurasDueToSpell(SPELL_RED_COLORATION); + + //Freeze animation + m_creature->SetUInt32Value(UNIT_FIELD_FLAGS, 0); + + //Eye Beam for 50 seconds + PhaseTimer = 50000; + }else PhaseTimer -= diff; + }break; + + //Transition phase + case 2: + { + //Remove any target + m_creature->SetUInt64Value(UNIT_FIELD_TARGET, 0); + m_creature->SetHealth(0); + } + + //Dead phase + case 5: + { + m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); + } + } + } + + void DamageTaken(Unit *done_by, uint32 &damage) + { + //No instance + if (!m_pInstance) + return; + + switch (m_pInstance->GetData(TYPE_CTHUN_PHASE)) + { + case 0: + case 1: + { + //Only if it will kill + if (damage < m_creature->GetHealth()) + return; + + //Fake death in phase 0 or 1 (green beam or dark glare phase) + m_creature->InterruptNonMeleeSpells(false); + + //Remove Red coloration from c'thun + m_creature->RemoveAurasDueToSpell(SPELL_RED_COLORATION); + + //Reset to normal emote state and prevent select and attack + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE); + + //Remove Target field + m_creature->SetUInt64Value(UNIT_FIELD_TARGET, 0); + + //Death animation/respawning; + m_pInstance->SetData(TYPE_CTHUN_PHASE, 2); + + m_creature->SetHealth(0); + damage = 0; + + m_creature->InterruptNonMeleeSpells(true); + m_creature->RemoveAllAuras(); + } + break; + + case 5: + { + //Allow death here + return; + } + + default: + { + //Prevent death in this phase + damage = 0; + return; + } + break; + } + } +}; + +struct MANGOS_DLL_DECL cthunAI : public ScriptedAI +{ + cthunAI(Creature* pCreature) : ScriptedAI(pCreature) + { + SetCombatMovement(false); + + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + if (!m_pInstance) + error_log("SD2: No Instance eye_of_cthunAI"); + + Reset(); + } + + ScriptedInstance* m_pInstance; + + //Out of combat whisper timer + uint32 WisperTimer; + + //Global variables + uint32 PhaseTimer; + + //------------------- + + //Phase transition + uint64 HoldPlayer; + + //Body Phase + uint32 EyeTentacleTimer; + uint8 FleshTentaclesKilled; + uint32 GiantClawTentacleTimer; + uint32 GiantEyeTentacleTimer; + uint32 StomachAcidTimer; + uint32 StomachEnterTimer; + uint32 StomachEnterVisTimer; + uint64 StomachEnterTarget; + + //Stomach map, bool = true then in stomach + UNORDERED_MAP Stomach_Map; + + void Reset() + { + //One random wisper every 90 - 300 seconds + WisperTimer = 90000; + + //Phase information + PhaseTimer = 10000; //Emerge in 10 seconds + + //No hold player for transition + HoldPlayer = 0; + + //Body Phase + EyeTentacleTimer = 30000; + FleshTentaclesKilled = 0; + GiantClawTentacleTimer = 15000; //15 seconds into body phase (1 min repeat) + GiantEyeTentacleTimer = 45000; //15 seconds into body phase (1 min repeat) + StomachAcidTimer = 4000; //Every 4 seconds + StomachEnterTimer = 10000; //Every 10 seconds + StomachEnterVisTimer = 0; //Always 3.5 seconds after Stomach Enter Timer + StomachEnterTarget = 0; //Target to be teleported to stomach + + //Clear players in stomach and outside + Stomach_Map.clear(); + + //Reset flags + m_creature->RemoveAurasDueToSpell(SPELL_TRANSFORM); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE); + + if (m_pInstance) + m_pInstance->SetData(TYPE_CTHUN_PHASE, 0); + } + + void Aggro(Unit* pWho) + { + m_creature->SetInCombatWithZone(); + } + + void SpawnEyeTentacle(float x, float y) + { + Creature* Spawned; + Spawned = (Creature*)m_creature->SummonCreature(MOB_EYE_TENTACLE,m_creature->GetPositionX()+x,m_creature->GetPositionY()+y,m_creature->GetPositionZ(),0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,500); + if (Spawned) + { + Unit* target; + + target = SelectRandomNotStomach(); + + if (target) + Spawned->AI()->AttackStart(target); + } + } + + Unit* SelectRandomNotStomach() + { + if (Stomach_Map.empty()) + return NULL; + + UNORDERED_MAP::iterator i = Stomach_Map.begin(); + + std::list temp; + std::list::iterator j; + + //Get all players in map + while (i != Stomach_Map.end()) + { + //Check for valid player + Unit* pUnit = Unit::GetUnit(*m_creature, i->first); + + //Only units out of stomach + if (pUnit && i->second == false) + { + temp.push_back(pUnit); + } + ++i; + } + + if (temp.empty()) + return NULL; + + j = temp.begin(); + + //Get random but only if we have more than one unit on threat list + if (temp.size() > 1) + advance (j , rand() % (temp.size() - 1)); + + return (*j); + } + + void UpdateAI(const uint32 diff) + { + //Check if we have a target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + { + //No target so we'll use this section to do our random wispers instance wide + //WisperTimer + if (WisperTimer < diff) + { + Map *map = m_creature->GetMap(); + if (!map->IsDungeon()) + return; + + //Play random sound to the zone + Map::PlayerList const &PlayerList = map->GetPlayers(); + + if (!PlayerList.isEmpty()) + { + for(Map::PlayerList::const_iterator itr = PlayerList.begin(); itr != PlayerList.end(); ++itr) + { + if (Player* pPlr = itr->getSource()) + pPlr->PlayDirectSound(RANDOM_SOUND_WHISPER,pPlr); + } + } + + //One random wisper every 90 - 300 seconds + WisperTimer = urand(90000, 300000); + }else WisperTimer -= diff; + + return; + } + + m_creature->SetUInt64Value(UNIT_FIELD_TARGET, 0); + + //No instance + if (!m_pInstance) + return; + + switch (m_pInstance->GetData(TYPE_CTHUN_PHASE)) + { + //Transition phase + case 2: + { + //PhaseTimer + if (PhaseTimer < diff) + { + //Switch + m_pInstance->SetData(TYPE_CTHUN_PHASE, 3); + + //Switch to c'thun model + m_creature->InterruptNonMeleeSpells(false); + DoCast(m_creature, SPELL_TRANSFORM, false); + m_creature->SetHealth(m_creature->GetMaxHealth()); + + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE); + + //Emerging phase + //AttackStart(Unit::GetUnit(*m_creature, HoldPlayer)); + m_creature->SetInCombatWithZone(); + + //Place all units in threat list on outside of stomach + Stomach_Map.clear(); + + std::list::iterator i = m_creature->getThreatManager().getThreatList().begin(); + for (; i != m_creature->getThreatManager().getThreatList().end(); ++i) + { + //Outside stomach + Stomach_Map[(*i)->getUnitGuid()] = false; + } + + //Spawn 2 flesh tentacles + FleshTentaclesKilled = 0; + + Creature* Spawned; + + //Spawn flesh tentacle + Spawned = (Creature*)m_creature->SummonCreature(MOB_FLESH_TENTACLE, TENTACLE_POS1_X, TENTACLE_POS1_Y, TENTACLE_POS1_Z, TENTACLE_POS1_O, TEMPSUMMON_CORPSE_DESPAWN, 0); + + if (!Spawned) + ++FleshTentaclesKilled; + else + ((flesh_tentacleAI*)(Spawned->AI()))->SpawnedByCthun(m_creature->GetGUID()); + + //Spawn flesh tentacle + Spawned = (Creature*)m_creature->SummonCreature(MOB_FLESH_TENTACLE, TENTACLE_POS2_X, TENTACLE_POS2_Y, TENTACLE_POS2_Z, TENTACLE_POS2_O, TEMPSUMMON_CORPSE_DESPAWN, 0); + + if (!Spawned) + ++FleshTentaclesKilled; + else + ((flesh_tentacleAI*)(Spawned->AI()))->SpawnedByCthun(m_creature->GetGUID()); + + PhaseTimer = 0; + }else PhaseTimer -= diff; + + }break; + + //Body Phase + case 3: + { + //Remove Target field + m_creature->SetUInt64Value(UNIT_FIELD_TARGET, 0); + + //Weaken + if (FleshTentaclesKilled > 1) + { + m_pInstance->SetData(TYPE_CTHUN_PHASE, 4); + + DoScriptText(EMOTE_WEAKENED, m_creature); + PhaseTimer = 45000; + + DoCast(m_creature, SPELL_RED_COLORATION, true); + + UNORDERED_MAP::iterator i = Stomach_Map.begin(); + + //Kick all players out of stomach + while (i != Stomach_Map.end()) + { + //Check for valid player + Unit* pUnit = Unit::GetUnit(*m_creature, i->first); + + //Only move units in stomach + if (pUnit && i->second == true) + { + //Teleport each player out + DoTeleportPlayer(pUnit, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()+10, rand()%6); + + //Cast knockback on them + DoCast(pUnit, SPELL_EXIT_STOMACH_KNOCKBACK, true); + + //Remove the acid debuff + pUnit->RemoveAurasDueToSpell(SPELL_DIGESTIVE_ACID); + + i->second = false; + } + ++i; + } + + return; + } + + //Stomach acid + if (StomachAcidTimer < diff) + { + //Apply aura to all players in stomach + UNORDERED_MAP::iterator i = Stomach_Map.begin(); + + while (i != Stomach_Map.end()) + { + //Check for valid player + Unit* pUnit = Unit::GetUnit(*m_creature, i->first); + + //Only apply to units in stomach + if (pUnit && i->second == true) + { + //Cast digestive acid on them + DoCast(pUnit, SPELL_DIGESTIVE_ACID, true); + + //Check if player should be kicked from stomach + if (pUnit->IsWithinDist3d(KICK_X, KICK_Y, KICK_Z, 15.0f)) + { + //Teleport each player out + DoTeleportPlayer(pUnit, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()+10, rand()%6); + + //Cast knockback on them + DoCast(pUnit, SPELL_EXIT_STOMACH_KNOCKBACK, true); + + //Remove the acid debuff + pUnit->RemoveAurasDueToSpell(SPELL_DIGESTIVE_ACID); + + i->second = false; + } + } + ++i; + } + + StomachAcidTimer = 4000; + }else StomachAcidTimer -= diff; + + //Stomach Enter Timer + if (StomachEnterTimer < diff) + { + Unit* target = NULL; + target = SelectRandomNotStomach(); + + if (target) + { + //Set target in stomach + Stomach_Map[target->GetGUID()] = true; + target->InterruptNonMeleeSpells(false); + target->CastSpell(target, SPELL_MOUTH_TENTACLE, true, NULL, NULL, m_creature->GetGUID()); + StomachEnterTarget = target->GetGUID(); + StomachEnterVisTimer = 3800; + } + + StomachEnterTimer = 13800; + }else StomachEnterTimer -= diff; + + if (StomachEnterVisTimer && StomachEnterTarget) + if (StomachEnterVisTimer <= diff) + { + //Check for valid player + Unit* pUnit = Unit::GetUnit(*m_creature, StomachEnterTarget); + + if (pUnit) + { + DoTeleportPlayer(pUnit, STOMACH_X, STOMACH_Y, STOMACH_Z, STOMACH_O); + } + + StomachEnterTarget = 0; + StomachEnterVisTimer = 0; + }else StomachEnterVisTimer -= diff; + + //GientClawTentacleTimer + if (GiantClawTentacleTimer < diff) + { + Unit* target = NULL; + target = SelectRandomNotStomach(); + if (target) + { + Creature* Spawned = NULL; + + //Spawn claw tentacle on the random target + Spawned = (Creature*)m_creature->SummonCreature(MOB_GIANT_CLAW_TENTACLE,target->GetPositionX(),target->GetPositionY(),target->GetPositionZ(),0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,500); + + if (Spawned) + Spawned->AI()->AttackStart(target); + } + + //One giant claw tentacle every minute + GiantClawTentacleTimer = 60000; + }else GiantClawTentacleTimer -= diff; + + //GiantEyeTentacleTimer + if (GiantEyeTentacleTimer < diff) + { + Unit* target = NULL; + target = SelectRandomNotStomach(); + if (target) + { + + Creature* Spawned = NULL; + + //Spawn claw tentacle on the random target + Spawned = (Creature*)m_creature->SummonCreature(MOB_GIANT_EYE_TENTACLE,target->GetPositionX(),target->GetPositionY(),target->GetPositionZ(),0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,500); + + if (Spawned) + Spawned->AI()->AttackStart(target); + } + + //One giant eye tentacle every minute + GiantEyeTentacleTimer = 60000; + }else GiantEyeTentacleTimer -= diff; + + //EyeTentacleTimer + if (EyeTentacleTimer < diff) + { + //Spawn the 8 Eye Tentacles in the corret spots + SpawnEyeTentacle(0, 25); //south + SpawnEyeTentacle(12, 12); //south west + SpawnEyeTentacle(25, 0); //west + SpawnEyeTentacle(12, -12); //north west + + SpawnEyeTentacle(0, -25); //north + SpawnEyeTentacle(-12, -12); //north east + SpawnEyeTentacle(-25, 0); // east + SpawnEyeTentacle(-12, 12); // south east + + //These spawn at every 30 seconds + EyeTentacleTimer = 30000; + }else EyeTentacleTimer -= diff; + + }break; + + //Weakened state + case 4: + { + //PhaseTimer + if (PhaseTimer < diff) + { + //Switch + m_pInstance->SetData(TYPE_CTHUN_PHASE, 3); + + //Remove red coloration + m_creature->RemoveAurasDueToSpell(SPELL_RED_COLORATION); + + //Spawn 2 flesh tentacles + FleshTentaclesKilled = 0; + + Creature* Spawned; + + //Spawn flesh tentacle + Spawned = (Creature*)m_creature->SummonCreature(MOB_FLESH_TENTACLE, TENTACLE_POS1_X, TENTACLE_POS1_Y, TENTACLE_POS1_Z, TENTACLE_POS1_O, TEMPSUMMON_CORPSE_DESPAWN, 0); + + if (!Spawned) + ++FleshTentaclesKilled; + else + ((flesh_tentacleAI*)(Spawned->AI()))->SpawnedByCthun(m_creature->GetGUID()); + + //Spawn flesh tentacle + Spawned = (Creature*)m_creature->SummonCreature(MOB_FLESH_TENTACLE, TENTACLE_POS2_X, TENTACLE_POS2_Y, TENTACLE_POS2_Z, TENTACLE_POS2_O, TEMPSUMMON_CORPSE_DESPAWN, 0); + + if (!Spawned) + ++FleshTentaclesKilled; + else + ((flesh_tentacleAI*)(Spawned->AI()))->SpawnedByCthun(m_creature->GetGUID()); + + PhaseTimer = 0; + }else PhaseTimer -= diff; + } + } + } + + void JustDied(Unit* pKiller) + { + //Switch + if (m_pInstance) + m_pInstance->SetData(TYPE_CTHUN_PHASE, 5); + } + + void DamageTaken(Unit *done_by, uint32 &damage) + { + //No instance + if (!m_pInstance) + return; + + switch (m_pInstance->GetData(TYPE_CTHUN_PHASE)) + { + case 3: + { + //Not weakened so reduce damage by 99% + if (damage / 99 > 0) damage/= 99; + else damage = 1; + + //Prevent death in non-weakened state + if (damage >= m_creature->GetHealth()) + damage = 0; + + return; + } + break; + + case 4: + { + //Weakened - takes normal damage + return; + } + + default: + damage = 0; + break; + } + } + + void FleshTentcleKilled() + { + ++FleshTentaclesKilled; + } +}; + +struct MANGOS_DLL_DECL eye_tentacleAI : public ScriptedAI +{ + eye_tentacleAI(Creature* pCreature) : ScriptedAI(pCreature) + { + SetCombatMovement(false); + Reset(); + + if (Unit* pPortal = m_creature->SummonCreature(MOB_SMALL_PORTAL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0)) + Portal = pPortal->GetGUID(); + } + + uint32 MindflayTimer; + uint32 KillSelfTimer; + uint64 Portal; + + void JustDied(Unit*) + { + Unit* p = Unit::GetUnit(*m_creature, Portal); + if (p) + p->DealDamage(p, p->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); + } + + void Reset() + { + //Mind flay half a second after we spawn + MindflayTimer = 500; + + //This prevents eyes from overlapping + KillSelfTimer = 35000; + } + + void Aggro(Unit* pWho) + { + m_creature->SetInCombatWithZone(); + } + + void UpdateAI(const uint32 diff) + { + //Check if we have a target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //KillSelfTimer + if (KillSelfTimer < diff) + { + m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); + + return; + }else KillSelfTimer -= diff; + + //MindflayTimer + if (MindflayTimer < diff) + { + Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM,0); + if (target && !target->HasAura(SPELL_DIGESTIVE_ACID, 0)) + DoCast(target,SPELL_MIND_FLAY); + + //Mindflay every 10 seconds + MindflayTimer = 10100; + }else MindflayTimer -= diff; + } +}; + +struct MANGOS_DLL_DECL claw_tentacleAI : public ScriptedAI +{ + claw_tentacleAI(Creature* pCreature) : ScriptedAI(pCreature) + { + SetCombatMovement(false); + Reset(); + + if (Unit* pPortal = m_creature->SummonCreature(MOB_SMALL_PORTAL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0)) + Portal = pPortal->GetGUID(); + } + + uint32 GroundRuptureTimer; + uint32 HamstringTimer; + uint32 EvadeTimer; + uint64 Portal; + + void JustDied(Unit*) + { + if (Unit* p = Unit::GetUnit(*m_creature, Portal)) + p->DealDamage(p, p->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); + } + + void Reset() + { + //First rupture should happen half a second after we spawn + GroundRuptureTimer = 500; + HamstringTimer = 2000; + EvadeTimer = 5000; + } + + void Aggro(Unit* pWho) + { + m_creature->SetInCombatWithZone(); + } + + void UpdateAI(const uint32 diff) + { + //Check if we have a target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //EvadeTimer + if (!m_creature->IsWithinDist(m_creature->getVictim(), ATTACK_DISTANCE)) + if (EvadeTimer < diff) + { + if (Unit* p = Unit::GetUnit(*m_creature, Portal)) + p->DealDamage(p, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); + + //Dissapear and reappear at new position + m_creature->SetVisibility(VISIBILITY_OFF); + + Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0); + if (!target) + { + m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); + return; + } + + if (!target->HasAura(SPELL_DIGESTIVE_ACID, 0)) + { + m_creature->GetMap()->CreatureRelocation(m_creature, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0); + + if (Unit* pPortal = m_creature->SummonCreature(MOB_SMALL_PORTAL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0)) + Portal = pPortal->GetGUID(); + + GroundRuptureTimer = 500; + HamstringTimer = 2000; + EvadeTimer = 5000; + AttackStart(target); + } + + m_creature->SetVisibility(VISIBILITY_ON); + + }else EvadeTimer -= diff; + + //GroundRuptureTimer + if (GroundRuptureTimer < diff) + { + DoCast(m_creature->getVictim(),SPELL_GROUND_RUPTURE); + GroundRuptureTimer = 30000; + }else GroundRuptureTimer -= diff; + + //HamstringTimer + if (HamstringTimer < diff) + { + DoCast(m_creature->getVictim(),SPELL_HAMSTRING); + HamstringTimer = 5000; + }else HamstringTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +struct MANGOS_DLL_DECL giant_claw_tentacleAI : public ScriptedAI +{ + giant_claw_tentacleAI(Creature* pCreature) : ScriptedAI(pCreature) + { + SetCombatMovement(false); + Reset(); + + if (Unit* pPortal = m_creature->SummonCreature(MOB_GIANT_PORTAL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0)) + Portal = pPortal->GetGUID(); + } + + uint32 GroundRuptureTimer; + uint32 ThrashTimer; + uint32 HamstringTimer; + uint32 EvadeTimer; + uint64 Portal; + + void JustDied(Unit*) + { + if (Unit* p = Unit::GetUnit(*m_creature, Portal)) + p->DealDamage(p, p->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); + } + + void Reset() + { + //First rupture should happen half a second after we spawn + GroundRuptureTimer = 500; + HamstringTimer = 2000; + ThrashTimer = 5000; + EvadeTimer = 5000; + } + + void Aggro(Unit* pWho) + { + m_creature->SetInCombatWithZone(); + } + + void UpdateAI(const uint32 diff) + { + //Check if we have a target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //EvadeTimer + if (m_creature->IsWithinDist(m_creature->getVictim(), ATTACK_DISTANCE)) + if (EvadeTimer < diff) + { + if (Unit* p = Unit::GetUnit(*m_creature, Portal)) + p->DealDamage(p, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); + + //Dissapear and reappear at new position + m_creature->SetVisibility(VISIBILITY_OFF); + + Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0); + + if (!target) + { + m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); + return; + } + + if (!target->HasAura(SPELL_DIGESTIVE_ACID, 0)) + { + m_creature->GetMap()->CreatureRelocation(m_creature, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0); + + if (Unit* pPortal = m_creature->SummonCreature(MOB_GIANT_PORTAL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0)) + Portal = pPortal->GetGUID(); + + GroundRuptureTimer = 500; + HamstringTimer = 2000; + ThrashTimer = 5000; + EvadeTimer = 5000; + AttackStart(target); + } + + m_creature->SetVisibility(VISIBILITY_ON); + + }else EvadeTimer -= diff; + + //GroundRuptureTimer + if (GroundRuptureTimer < diff) + { + DoCast(m_creature->getVictim(),SPELL_GROUND_RUPTURE); + GroundRuptureTimer = 30000; + }else GroundRuptureTimer -= diff; + + //ThrashTimer + if (ThrashTimer < diff) + { + DoCast(m_creature->getVictim(),SPELL_THRASH); + ThrashTimer = 10000; + }else ThrashTimer -= diff; + + //HamstringTimer + if (HamstringTimer < diff) + { + DoCast(m_creature->getVictim(),SPELL_HAMSTRING); + HamstringTimer = 10000; + }else HamstringTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +struct MANGOS_DLL_DECL giant_eye_tentacleAI : public ScriptedAI +{ + giant_eye_tentacleAI(Creature* pCreature) : ScriptedAI(pCreature) + { + SetCombatMovement(false); + Reset(); + + if (Unit* pPortal = m_creature->SummonCreature(MOB_GIANT_PORTAL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0)) + Portal = pPortal->GetGUID(); + } + + uint32 BeamTimer; + uint64 Portal; + + void JustDied(Unit*) + { + if (Unit* p = Unit::GetUnit(*m_creature, Portal)) + p->DealDamage(p, p->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); + } + + void Reset() + { + //Green Beam half a second after we spawn + BeamTimer = 500; + } + + void Aggro(Unit* pWho) + { + m_creature->SetInCombatWithZone(); + } + + void UpdateAI(const uint32 diff) + { + //Check if we have a target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //BeamTimer + if (BeamTimer < diff) + { + Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0); + if (target && !target->HasAura(SPELL_DIGESTIVE_ACID, 0)) + DoCast(target,SPELL_GREEN_BEAM); + + //Beam every 2 seconds + BeamTimer = 2100; + }else BeamTimer -= diff; + } +}; + +//Flesh tentacle functions +void flesh_tentacleAI::UpdateAI(const uint32 diff) +{ + //Check if we have a target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (Parent) + if (CheckTimer < diff) + { + Unit* pUnit = Unit::GetUnit(*m_creature, Parent); + + if (!pUnit || !pUnit->isAlive() || !pUnit->isInCombat()) + { + Parent = 0; + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, NULL, false); + return; + } + + CheckTimer = 1000; + }else CheckTimer -= diff; + + DoMeleeAttackIfReady(); +} + +void flesh_tentacleAI::JustDied(Unit* killer) +{ + if (!Parent) + { + error_log("SD2: flesh_tentacle: No Parent variable"); + return; + } + + Creature* Cthun = (Creature*)Unit::GetUnit(*m_creature, Parent); + + if (Cthun) + ((cthunAI*)(Cthun->AI()))->FleshTentcleKilled(); + else error_log("SD2: flesh_tentacle: No Cthun"); +} + +//GetAIs +CreatureAI* GetAI_eye_of_cthun(Creature* pCreature) +{ + return new eye_of_cthunAI(pCreature); +} + +CreatureAI* GetAI_cthun(Creature* pCreature) +{ + return new cthunAI(pCreature); +} + +CreatureAI* GetAI_eye_tentacle(Creature* pCreature) +{ + return new eye_tentacleAI(pCreature); +} + +CreatureAI* GetAI_claw_tentacle(Creature* pCreature) +{ + return new claw_tentacleAI(pCreature); +} + +CreatureAI* GetAI_giant_claw_tentacle(Creature* pCreature) +{ + return new giant_claw_tentacleAI(pCreature); +} + +CreatureAI* GetAI_giant_eye_tentacle(Creature* pCreature) +{ + return new giant_eye_tentacleAI(pCreature); +} + +CreatureAI* GetAI_flesh_tentacle(Creature* pCreature) +{ + return new flesh_tentacleAI(pCreature); +} + +void AddSC_boss_cthun() +{ + Script *newscript; + + //Eye + newscript = new Script; + newscript->Name = "boss_eye_of_cthun"; + newscript->GetAI = &GetAI_eye_of_cthun; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_cthun"; + newscript->GetAI = &GetAI_cthun; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_eye_tentacle"; + newscript->GetAI = &GetAI_eye_tentacle; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_claw_tentacle"; + newscript->GetAI = &GetAI_claw_tentacle; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_giant_claw_tentacle"; + newscript->GetAI = &GetAI_giant_claw_tentacle; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_giant_eye_tentacle"; + newscript->GetAI = &GetAI_giant_eye_tentacle; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_giant_flesh_tentacle"; + newscript->GetAI = &GetAI_flesh_tentacle; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp new file mode 100644 index 000000000..1494657b1 --- /dev/null +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp @@ -0,0 +1,198 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Fankriss +SD%Complete: 100 +SDComment: sound not implemented +SDCategory: Temple of Ahn'Qiraj +EndScriptData */ + +#include "precompiled.h" + +#define SOUND_SENTENCE_YOU 8588 +#define SOUND_SERVE_TO 8589 +#define SOUND_LAWS 8590 +#define SOUND_TRESPASS 8591 +#define SOUND_WILL_BE 8592 + +#define SPELL_MORTAL_WOUND 28467 +#define SPELL_ROOT 28858 + +// Enrage for his spawns +#define SPELL_ENRAGE 28798 + +struct MANGOS_DLL_DECL boss_fankrissAI : public ScriptedAI +{ + boss_fankrissAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 MortalWound_Timer; + uint32 SpawnHatchlings_Timer; + uint32 SpawnSpawns_Timer; + int Rand; + int RandX; + int RandY; + + Creature* Hatchling; + Creature* Spawn; + + void Reset() + { + MortalWound_Timer = urand(10000, 15000); + SpawnHatchlings_Timer = urand(6000, 12000); + SpawnSpawns_Timer = urand(15000, 45000); + } + + void SummonSpawn(Unit* victim) + { + Rand = 10 + (rand()%10); + switch(urand(0, 1)) + { + case 0: RandX = 0 - Rand; break; + case 1: RandX = 0 + Rand; break; + } + Rand = 0; + Rand = 10 + (rand()%10); + switch(urand(0, 1)) + { + case 0: RandY = 0 - Rand; break; + case 1: RandY = 0 + Rand; break; + } + Rand = 0; + Spawn = DoSpawnCreature(15630, RandX, RandY, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + if (Spawn) + ((CreatureAI*)Spawn->AI())->AttackStart(victim); + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //MortalWound_Timer + if (MortalWound_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_MORTAL_WOUND); + MortalWound_Timer = urand(10000, 20000); + }else MortalWound_Timer -= diff; + + //Summon 1-3 Spawns of Fankriss at random time. + if (SpawnSpawns_Timer < diff) + { + switch(urand(0, 2)) + { + case 0: + SummonSpawn(SelectUnit(SELECT_TARGET_RANDOM,0)); + break; + case 1: + SummonSpawn(SelectUnit(SELECT_TARGET_RANDOM,0)); + SummonSpawn(SelectUnit(SELECT_TARGET_RANDOM,0)); + break; + case 2: + SummonSpawn(SelectUnit(SELECT_TARGET_RANDOM,0)); + SummonSpawn(SelectUnit(SELECT_TARGET_RANDOM,0)); + SummonSpawn(SelectUnit(SELECT_TARGET_RANDOM,0)); + break; + } + SpawnSpawns_Timer = urand(30000, 60000); + }else SpawnSpawns_Timer -= diff; + + // Teleporting Random Target to one of the three tunnels and spawn 4 hatchlings near the gamer. + //We will only telport if fankriss has more than 3% of hp so teleported gamers can always loot. + if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() > 3) + { + if (SpawnHatchlings_Timer< diff) + { + Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM,0); + if (target && target->GetTypeId() == TYPEID_PLAYER) + { + DoCast(target, SPELL_ROOT); + + if (m_creature->getThreatManager().getThreat(target)) + m_creature->getThreatManager().modifyThreatPercent(target, -100); + + switch(urand(0, 2)) + { + case 0: + DoTeleportPlayer(target, -8106.0142,1289.2900,-74.419533,5.112); + Hatchling = m_creature->SummonCreature(15962, target->GetPositionX()-3, target->GetPositionY()-3, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (Hatchling) + ((CreatureAI*)Hatchling->AI())->AttackStart(target); + Hatchling = m_creature->SummonCreature(15962, target->GetPositionX()-3, target->GetPositionY()+3, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (Hatchling) + ((CreatureAI*)Hatchling->AI())->AttackStart(target); + Hatchling = m_creature->SummonCreature(15962, target->GetPositionX()-5, target->GetPositionY()-5, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (Hatchling) + ((CreatureAI*)Hatchling->AI())->AttackStart(target); + Hatchling = m_creature->SummonCreature(15962, target->GetPositionX()-5, target->GetPositionY()+5, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (Hatchling) + ((CreatureAI*)Hatchling->AI())->AttackStart(target); + break; + case 1: + DoTeleportPlayer(target, -7990.135354,1155.1907,-78.849319,2.608); + Hatchling = m_creature->SummonCreature(15962, target->GetPositionX()-3, target->GetPositionY()-3, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (Hatchling) + ((CreatureAI*)Hatchling->AI())->AttackStart(target); + Hatchling = m_creature->SummonCreature(15962, target->GetPositionX()-3, target->GetPositionY()+3, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (Hatchling) + ((CreatureAI*)Hatchling->AI())->AttackStart(target); + Hatchling = m_creature->SummonCreature(15962, target->GetPositionX()-5, target->GetPositionY()-5, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (Hatchling) + ((CreatureAI*)Hatchling->AI())->AttackStart(target); + Hatchling = m_creature->SummonCreature(15962, target->GetPositionX()-5, target->GetPositionY()+5, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (Hatchling) + ((CreatureAI*)Hatchling->AI())->AttackStart(target); + break; + case 2: + DoTeleportPlayer(target,-8159.7753,1127.9064,-76.868660,0.675); + Hatchling = m_creature->SummonCreature(15962, target->GetPositionX()-3, target->GetPositionY()-3, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (Hatchling) + ((CreatureAI*)Hatchling->AI())->AttackStart(target); + Hatchling = m_creature->SummonCreature(15962, target->GetPositionX()-3, target->GetPositionY()+3, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (Hatchling) + ((CreatureAI*)Hatchling->AI())->AttackStart(target); + Hatchling = m_creature->SummonCreature(15962, target->GetPositionX()-5, target->GetPositionY()-5, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (Hatchling) + ((CreatureAI*)Hatchling->AI())->AttackStart(target); + Hatchling = m_creature->SummonCreature(15962, target->GetPositionX()-5, target->GetPositionY()+5, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + if (Hatchling) + ((CreatureAI*)Hatchling->AI())->AttackStart(target); + break; + } + } + SpawnHatchlings_Timer = urand(45000, 60000); + }else SpawnHatchlings_Timer -= diff; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_fankriss(Creature* pCreature) +{ + return new boss_fankrissAI(pCreature); +} + +void AddSC_boss_fankriss() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_fankriss"; + newscript->GetAI = &GetAI_boss_fankriss; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp new file mode 100644 index 000000000..eac462596 --- /dev/null +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp @@ -0,0 +1,143 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Huhuran +SD%Complete: 100 +SDComment: +SDCategory: Temple of Ahn'Qiraj +EndScriptData */ + +#include "precompiled.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 + +struct MANGOS_DLL_DECL boss_huhuranAI : public ScriptedAI +{ + boss_huhuranAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 Frenzy_Timer; + uint32 Wyvern_Timer; + uint32 Spit_Timer; + uint32 PoisonBolt_Timer; + uint32 NoxiousPoison_Timer; + uint32 FrenzyBack_Timer; + + bool Frenzy; + bool Berserk; + + void Reset() + { + Frenzy_Timer = urand(25000, 35000); + Wyvern_Timer = urand(18000, 28000); + Spit_Timer = 8000; + PoisonBolt_Timer = 4000; + NoxiousPoison_Timer = urand(10000, 20000); + FrenzyBack_Timer = 15000; + + Frenzy = false; + Berserk = false; + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Frenzy_Timer + if (!Frenzy && Frenzy_Timer < diff) + { + DoCast(m_creature, SPELL_FRENZY); + DoScriptText(EMOTE_GENERIC_FRENZY_KILL, m_creature); + Frenzy = true; + PoisonBolt_Timer = 3000; + Frenzy_Timer = urand(25000, 35000); + }else Frenzy_Timer -= diff; + + // Wyvern Timer + if (Wyvern_Timer < diff) + { + if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_WYVERNSTING); + Wyvern_Timer = urand(15000, 32000); + }else Wyvern_Timer -= diff; + + //Spit Timer + if (Spit_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_ACIDSPIT); + Spit_Timer = urand(5000, 10000); + }else Spit_Timer -= diff; + + //NoxiousPoison_Timer + if (NoxiousPoison_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_NOXIOUSPOISON); + NoxiousPoison_Timer = urand(12000, 24000); + }else NoxiousPoison_Timer -= diff; + + //PoisonBolt only if frenzy or berserk + if (Frenzy || Berserk) + { + if (PoisonBolt_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_POISONBOLT); + PoisonBolt_Timer = 3000; + }else PoisonBolt_Timer -= diff; + } + + //FrenzyBack_Timer + if (Frenzy && FrenzyBack_Timer < diff) + { + m_creature->InterruptNonMeleeSpells(false); + Frenzy = false; + FrenzyBack_Timer = 15000; + }else FrenzyBack_Timer -= diff; + + if (!Berserk && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 31) + { + m_creature->InterruptNonMeleeSpells(false); + DoScriptText(EMOTE_GENERIC_BERSERK, m_creature); + DoCast(m_creature, SPELL_BERSERK); + Berserk = true; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_huhuran(Creature* pCreature) +{ + return new boss_huhuranAI(pCreature); +} + +void AddSC_boss_huhuran() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_huhuran"; + newscript->GetAI = &GetAI_boss_huhuran; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp new file mode 100644 index 000000000..e74e44f59 --- /dev/null +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp @@ -0,0 +1,139 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Ouro +SD%Complete: 85 +SDComment: No model for submerging. Currently just invisible. +SDCategory: Temple of Ahn'Qiraj +EndScriptData */ + +#include "precompiled.h" +#include "temple_of_ahnqiraj.h" + +#define SPELL_SWEEP 26103 +#define SPELL_SANDBLAST 26102 +#define SPELL_GROUND_RUPTURE 26100 +#define SPELL_BIRTH 26262 //The Birth Animation + +#define SPELL_DIRTMOUND_PASSIVE 26092 + +struct MANGOS_DLL_DECL boss_ouroAI : public ScriptedAI +{ + boss_ouroAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 Sweep_Timer; + uint32 SandBlast_Timer; + uint32 Submerge_Timer; + uint32 Back_Timer; + uint32 ChangeTarget_Timer; + uint32 Spawn_Timer; + + bool Enrage; + bool Submerged; + + void Reset() + { + Sweep_Timer = urand(5000, 10000); + SandBlast_Timer = urand(20000, 35000); + Submerge_Timer = urand(90000, 150000); + Back_Timer = urand(30000, 45000); + ChangeTarget_Timer = urand(5000, 8000); + Spawn_Timer = urand(10000, 20000); + + Enrage = false; + Submerged = false; + } + + void Aggro(Unit *who) + { + DoCast(m_creature->getVictim(), SPELL_BIRTH); + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Sweep_Timer + if (!Submerged && Sweep_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_SWEEP); + Sweep_Timer = urand(15000, 30000); + }else Sweep_Timer -= diff; + + //SandBlast_Timer + if (!Submerged && SandBlast_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_SANDBLAST); + SandBlast_Timer = urand(20000, 35000); + }else SandBlast_Timer -= diff; + + //Submerge_Timer + if (!Submerged && Submerge_Timer < diff) + { + //Cast + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_SUBMERGE); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->setFaction(35); + DoCast(m_creature, SPELL_DIRTMOUND_PASSIVE); + + Submerged = true; + Back_Timer = urand(30000, 45000); + }else Submerge_Timer -= diff; + + //ChangeTarget_Timer + if (Submerged && ChangeTarget_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + { + m_creature->GetMap()->CreatureRelocation(m_creature, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0.0f); + m_creature->SendMonsterMove(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, MONSTER_MOVE_WALK, 1); + } + + ChangeTarget_Timer = urand(10000, 20000); + }else ChangeTarget_Timer -= diff; + + //Back_Timer + if (Submerged && Back_Timer < diff) + { + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->setFaction(14); + + DoCast(m_creature->getVictim(), SPELL_GROUND_RUPTURE); + + Submerged = false; + Submerge_Timer = urand(60000, 120000); + }else Back_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_ouro(Creature* pCreature) +{ + return new boss_ouroAI(pCreature); +} + +void AddSC_boss_ouro() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_ouro"; + newscript->GetAI = &GetAI_boss_ouro; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp new file mode 100644 index 000000000..78ffb7f24 --- /dev/null +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp @@ -0,0 +1,292 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Sartura +SD%Complete: 95 +SDComment: +SDCategory: Temple of Ahn'Qiraj +EndScriptData */ + +#include "precompiled.h" + +#define SAY_AGGRO -1531008 +#define SAY_SLAY -1531009 +#define SAY_DEATH -1531010 + +#define SPELL_WHIRLWIND 26083 +#define SPELL_ENRAGE 28747 //Not sure if right ID. +#define SPELL_ENRAGEHARD 28798 + +//Guard Spell +#define SPELL_WHIRLWINDADD 26038 +#define SPELL_KNOCKBACK 26027 + +struct MANGOS_DLL_DECL boss_sarturaAI : public ScriptedAI +{ + boss_sarturaAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 WhirlWind_Timer; + uint32 WhirlWindRandom_Timer; + uint32 WhirlWindEnd_Timer; + uint32 AggroReset_Timer; + uint32 AggroResetEnd_Timer; + uint32 EnrageHard_Timer; + + bool Enraged; + bool EnragedHard; + bool WhirlWind; + bool AggroReset; + + void Reset() + { + WhirlWind_Timer = 30000; + WhirlWindRandom_Timer = urand(3000, 7000); + WhirlWindEnd_Timer = 15000; + AggroReset_Timer = urand(45000, 55000); + AggroResetEnd_Timer = 5000; + EnrageHard_Timer = 10*60000; + + WhirlWind = false; + AggroReset = false; + Enraged = false; + EnragedHard = false; + + } + + void Aggro(Unit *who) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void KilledUnit(Unit* victim) + { + DoScriptText(SAY_SLAY, m_creature); + } + + void JustDied(Unit* Killer) + { + DoScriptText(SAY_DEATH, m_creature); + } + + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (WhirlWind) + { + if (WhirlWindRandom_Timer < diff) + { + //Attack random Gamers + Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM,1); + if (target) + m_creature->AddThreat(target, 1.0f); + m_creature->TauntApply(target); + AttackStart(target); + + WhirlWindRandom_Timer = urand(3000, 7000); + }else WhirlWindRandom_Timer -= diff; + + if (WhirlWindEnd_Timer < diff) + { + WhirlWind = false; + WhirlWind_Timer = urand(25000, 40000); + }else WhirlWindEnd_Timer -= diff; + } + + if (!WhirlWind) + { + if (WhirlWind_Timer < diff) + { + DoCast(m_creature, SPELL_WHIRLWIND); + WhirlWind = true; + WhirlWindEnd_Timer = 15000; + }else WhirlWind_Timer -= diff; + + if (AggroReset_Timer < diff) + { + //Attack random Gamers + Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM,1); + if (target) + m_creature->AddThreat(target, 1.0f); + m_creature->TauntApply(target); + AttackStart(target); + + AggroReset = true; + AggroReset_Timer = urand(2000, 5000); + }else AggroReset_Timer -= diff; + + if (AggroReset) + { + if (AggroResetEnd_Timer GetHealth()*100 / m_creature->GetMaxHealth() <= 20 && !m_creature->IsNonMeleeSpellCasted(false)) + { + DoCast(m_creature, SPELL_ENRAGE); + Enraged = true; + } + } + + //After 10 minutes hard enrage + if (!EnragedHard) + { + if (EnrageHard_Timer < diff) + { + DoCast(m_creature, SPELL_ENRAGEHARD); + EnragedHard = true; + } else EnrageHard_Timer -= diff; + } + + DoMeleeAttackIfReady(); + } + } +}; + +struct MANGOS_DLL_DECL mob_sartura_royal_guardAI : public ScriptedAI +{ + mob_sartura_royal_guardAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 WhirlWind_Timer; + uint32 WhirlWindRandom_Timer; + uint32 WhirlWindEnd_Timer; + uint32 AggroReset_Timer; + uint32 AggroResetEnd_Timer; + uint32 KnockBack_Timer; + + bool WhirlWind; + bool AggroReset; + + void Reset() + { + WhirlWind_Timer = 30000; + WhirlWindRandom_Timer = urand(3000, 7000); + WhirlWindEnd_Timer = 15000; + AggroReset_Timer = urand(45000, 55000); + AggroResetEnd_Timer = 5000; + KnockBack_Timer = 10000; + + WhirlWind = false; + AggroReset = false; + + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (!WhirlWind && WhirlWind_Timer < diff) + { + DoCast(m_creature, SPELL_WHIRLWINDADD); + WhirlWind = true; + WhirlWind_Timer = urand(25000, 40000); + WhirlWindEnd_Timer = 15000; + }else WhirlWind_Timer -= diff; + + if (WhirlWind) + { + if (WhirlWindRandom_Timer < diff) + { + //Attack random Gamers + Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM,1); + if (target) + m_creature->AddThreat(target, 1.0f); + m_creature->TauntApply(target); + AttackStart(target); + + WhirlWindRandom_Timer = urand(3000, 7000); + }else WhirlWindRandom_Timer -= diff; + + if (WhirlWindEnd_Timer < diff) + { + WhirlWind = false; + }else WhirlWindEnd_Timer -= diff; + } + + if (!WhirlWind) + { + if (AggroReset_Timer < diff) + { + //Attack random Gamers + Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM,1); + if (target) + m_creature->AddThreat(target, 1.0f); + m_creature->TauntApply(target); + AttackStart(target); + + AggroReset = true; + AggroReset_Timer = urand(2000, 5000); + }else AggroReset_Timer -= diff; + + if (KnockBack_Timer < diff) + { + DoCast(m_creature, SPELL_WHIRLWINDADD); + KnockBack_Timer = urand(10000, 20000); + }else KnockBack_Timer -= diff; + } + + if (AggroReset) + { + if (AggroResetEnd_Timer Name = "boss_sartura"; + newscript->GetAI = &GetAI_boss_sartura; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_sartura_royal_guard"; + newscript->GetAI = &GetAI_mob_sartura_royal_guard; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp new file mode 100644 index 000000000..9b4cd7409 --- /dev/null +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp @@ -0,0 +1,318 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Skeram +SD%Complete: 75 +SDComment: Mind Control buggy. +SDCategory: Temple of Ahn'Qiraj +EndScriptData */ + +#include "precompiled.h" +#include "temple_of_ahnqiraj.h" +#include "Group.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_FULFILLMENT4 26526 +#define SPELL_BLINK 28391 + +class ov_mycoordinates +{ + public: + float x,y,z,r; + ov_mycoordinates(float cx, float cy, float cz, float cr) + { + x = cx; y = cy; z = cz; r = cr; + } +}; + +struct MANGOS_DLL_DECL boss_skeramAI : public ScriptedAI +{ + boss_skeramAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + IsImage = false; + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 ArcaneExplosion_Timer; + uint32 EarthShock_Timer; + uint32 FullFillment_Timer; + uint32 Blink_Timer; + uint32 Invisible_Timer; + + Creature *Image1, *Image2; + + bool Images75; + bool Images50; + bool Images25; + bool IsImage; + bool Invisible; + + void Reset() + { + ArcaneExplosion_Timer = urand(6000, 12000); + EarthShock_Timer = 2000; + FullFillment_Timer = 15000; + Blink_Timer = urand(8000, 20000); + Invisible_Timer = 500; + + Images75 = false; + Images50 = false; + Images25 = false; + Invisible = false; + + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetVisibility(VISIBILITY_ON); + + if (IsImage) + m_creature->setDeathState(JUST_DIED); + } + + void KilledUnit(Unit* victim) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_SLAY1, m_creature); break; + case 1: DoScriptText(SAY_SLAY2, m_creature); break; + case 2: DoScriptText(SAY_SLAY3, m_creature); break; + } + } + + void JustDied(Unit* Killer) + { + if (!IsImage) + DoScriptText(SAY_DEATH, m_creature); + } + + void Aggro(Unit *who) + { + if (IsImage || Images75) + return; + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_AGGRO1, m_creature); break; + case 1: DoScriptText(SAY_AGGRO2, m_creature); break; + case 2: DoScriptText(SAY_AGGRO3, m_creature); break; + } + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //ArcaneExplosion_Timer + if (ArcaneExplosion_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_ARCANE_EXPLOSION); + ArcaneExplosion_Timer = urand(8000, 18000); + }else ArcaneExplosion_Timer -= diff; + + //If we are within range melee the target + if (m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE)) + { + //Make sure our attack is ready and we arn't currently casting + if (m_creature->isAttackReady() && !m_creature->IsNonMeleeSpellCasted(false)) + { + m_creature->AttackerStateUpdate(m_creature->getVictim()); + m_creature->resetAttackTimer(); + } + }else + { + //EarthShock_Timer + if (EarthShock_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_EARTH_SHOCK); + EarthShock_Timer = 1000; + }else EarthShock_Timer -= diff; + } + + //Blink_Timer + if (Blink_Timer < diff) + { + //DoCast(m_creature, SPELL_BLINK); + switch(urand(0, 2)) + { + case 0: + m_creature->GetMap()->CreatureRelocation(m_creature, -8340.782227, 2083.814453, 125.648788, 0.0f); + DoResetThreat(); + break; + case 1: + m_creature->GetMap()->CreatureRelocation(m_creature, -8341.546875, 2118.504639, 133.058151, 0.0f); + DoResetThreat(); + break; + case 2: + m_creature->GetMap()->CreatureRelocation(m_creature, -8318.822266, 2058.231201, 133.058151, 0.0f); + DoResetThreat(); + break; + } + DoStopAttack(); + + Blink_Timer = urand(20000, 40000); + }else Blink_Timer -= diff; + + int procent = (int) (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() +0.5); + + //Summoning 2 Images and teleporting to a random position on 75% health + if ((!Images75 && !IsImage) && (procent <= 75 && procent > 70)) + DoSplit(75); + + //Summoning 2 Images and teleporting to a random position on 50% health + if ((!Images50 && !IsImage) && (procent <= 50 && procent > 45)) + DoSplit(50); + + //Summoning 2 Images and teleporting to a random position on 25% health + if ((!Images25 && !IsImage) && (procent <= 25 && procent > 20)) + DoSplit(25); + + //Invisible_Timer + if (Invisible) + { + if (Invisible_Timer < diff) + { + //Making Skeram visible after telporting + m_creature->SetVisibility(VISIBILITY_ON); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + Invisible_Timer = 2500; + Invisible = false; + }else Invisible_Timer -= diff; + } + + DoMeleeAttackIfReady(); + } + + void DoSplit(int atPercent /* 75 50 25 */) + { + DoScriptText(SAY_SPLIT, m_creature); + + ov_mycoordinates *place1 = new ov_mycoordinates(-8340.782227,2083.814453,125.648788,0); + ov_mycoordinates *place2 = new ov_mycoordinates(-8341.546875,2118.504639,133.058151,0); + ov_mycoordinates *place3 = new ov_mycoordinates(-8318.822266,2058.231201,133.058151,0); + + ov_mycoordinates *bossc=place1, *i1=place2, *i2=place3; + + switch(urand(0, 2)) + { + case 0: + bossc = place1; + i1 = place2; + i2 = place3; + break; + case 1: + bossc = place2; + i1 = place1; + i2 = place3; + break; + case 2: + bossc = place3; + i1 = place1; + i2 = place2; + break; + } + + for (int tryi = 0; tryi < 41; ++tryi) + { + Unit *targetpl = SelectUnit(SELECT_TARGET_RANDOM, 0); + if (targetpl->GetTypeId() == TYPEID_PLAYER) + { + Group *grp = ((Player *)targetpl)->GetGroup(); + if (grp) + { + for (int ici = 0; ici < TARGETICONCOUNT; ++ici) + { + //if (grp ->m_targetIcons[ici] == m_creature->GetGUID()) -- private member:( + grp->SetTargetIcon(ici, 0); + } + } + break; + } + } + + m_creature->RemoveAllAuras(); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetVisibility(VISIBILITY_OFF); + + m_creature->GetMap()->CreatureRelocation(m_creature, bossc->x, bossc->y, bossc->z, bossc->r); + + Invisible = true; + DoResetThreat(); + DoStopAttack(); + + switch (atPercent) + { + case 75: Images75 = true; break; + case 50: Images50 = true; break; + case 25: Images25 = true; break; + } + + Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0); + + Image1 = m_creature->SummonCreature(15263, i1->x, i1->y, i1->z, i1->r, TEMPSUMMON_CORPSE_DESPAWN, 30000); + if (Image1) + { + Image1->SetMaxHealth(m_creature->GetMaxHealth() / 5); + Image1->SetHealth(m_creature->GetHealth() / 5); + if (target) + Image1->AI()->AttackStart(target); + ((boss_skeramAI*)Image1->AI())->IsImage = true; + } + + Image2 = m_creature->SummonCreature(15263,i2->x, i2->y, i2->z, i2->r, TEMPSUMMON_CORPSE_DESPAWN, 30000); + if (Image2) + { + Image2->SetMaxHealth(m_creature->GetMaxHealth() / 5); + Image2->SetHealth(m_creature->GetHealth() / 5); + if (target) + Image2->AI()->AttackStart(target); + ((boss_skeramAI*)Image2->AI())->IsImage = true; + } + + + Invisible = true; + delete place1; + delete place2; + delete place3; + } +}; + +CreatureAI* GetAI_boss_skeram(Creature* pCreature) +{ + return new boss_skeramAI(pCreature); +} + +void AddSC_boss_skeram() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_skeram"; + newscript->GetAI = &GetAI_boss_skeram; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp new file mode 100644 index 000000000..8b92b8f72 --- /dev/null +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp @@ -0,0 +1,668 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Twinemperors +SD%Complete: 95 +SDComment: +SDCategory: Temple of Ahn'Qiraj +EndScriptData */ + +#include "precompiled.h" +#include "temple_of_ahnqiraj.h" +#include "WorldPacket.h" + +#include "Item.h" +#include "Spell.h" + +#define SPELL_HEAL_BROTHER 7393 +#define SPELL_TWIN_TELEPORT 800 // CTRA watches for this spell to start its teleport timer +#define SPELL_TWIN_TELEPORT_VISUAL 26638 // visual + +#define SPELL_EXPLODEBUG 804 +#define SPELL_MUTATE_BUG 802 + +#define SOUND_VN_DEATH 8660 //8660 - Death - Feel +#define SOUND_VN_AGGRO 8661 //8661 - Aggro - Let none +#define SOUND_VN_KILL 8662 //8661 - Kill - your fate + +#define SOUND_VL_AGGRO 8657 //8657 - Aggro - To Late +#define SOUND_VL_KILL 8658 //8658 - Kill - You will not +#define SOUND_VL_DEATH 8659 //8659 - Death + +#define PULL_RANGE 50 +#define ABUSE_BUG_RANGE 20 +#define SPELL_BERSERK 26662 +#define TELEPORTTIME 30000 + +#define SPELL_UPPERCUT 26007 +#define SPELL_UNBALANCING_STRIKE 26613 + +#define VEKLOR_DIST 20 // VL will not come to melee when attacking + +#define SPELL_SHADOWBOLT 26006 +#define SPELL_BLIZZARD 26607 +#define SPELL_ARCANEBURST 568 + +struct MANGOS_DLL_DECL boss_twinemperorsAI : public ScriptedAI +{ + ScriptedInstance* m_pInstance; + uint32 Heal_Timer; + uint32 Teleport_Timer; + bool AfterTeleport; + uint32 AfterTeleportTimer; + bool DontYellWhenDead; + uint32 Abuse_Bug_Timer, BugsTimer; + bool tspellcasted; + uint32 EnrageTimer; + + virtual bool IAmVeklor() = 0; + virtual void Reset() = 0; + virtual void CastSpellOnBug(Creature *target) = 0; + + boss_twinemperorsAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + } + + void TwinReset() + { + Heal_Timer = 0; // first heal immediately when they get close together + Teleport_Timer = TELEPORTTIME; + AfterTeleport = false; + tspellcasted = false; + AfterTeleportTimer = 0; + Abuse_Bug_Timer = urand(10000, 17000); + BugsTimer = 2000; + m_creature->clearUnitState(UNIT_STAT_STUNNED); + DontYellWhenDead = false; + EnrageTimer = 15*60000; + } + + Creature *GetOtherBoss() + { + if (m_pInstance) + { + return (Creature *)Unit::GetUnit((*m_creature), m_pInstance->GetData64(IAmVeklor() ? DATA_VEKNILASH : DATA_VEKLOR)); + } + else + { + return (Creature *)0; + } + } + + void DamageTaken(Unit *done_by, uint32 &damage) + { + Unit *pOtherBoss = GetOtherBoss(); + if (pOtherBoss) + { + float dPercent = ((float)damage) / ((float)m_creature->GetMaxHealth()); + int odmg = (int)(dPercent * ((float)pOtherBoss->GetMaxHealth())); + int ohealth = pOtherBoss->GetHealth()-odmg; + pOtherBoss->SetHealth(ohealth > 0 ? ohealth : 0); + if (ohealth <= 0) + { + pOtherBoss->setDeathState(JUST_DIED); + pOtherBoss->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + } + } + } + + void JustDied(Unit* Killer) + { + Creature *pOtherBoss = GetOtherBoss(); + if (pOtherBoss) + { + pOtherBoss->SetHealth(0); + pOtherBoss->setDeathState(JUST_DIED); + pOtherBoss->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + ((boss_twinemperorsAI *)pOtherBoss->AI())->DontYellWhenDead = true; + } + if (!DontYellWhenDead) // I hope AI is not threaded + DoPlaySoundToSet(m_creature, IAmVeklor() ? SOUND_VL_DEATH : SOUND_VN_DEATH); + } + + void KilledUnit(Unit* victim) + { + DoPlaySoundToSet(m_creature, IAmVeklor() ? SOUND_VL_KILL : SOUND_VN_KILL); + } + + void Aggro(Unit* pWho) + { + m_creature->SetInCombatWithZone(); + + Creature *pOtherBoss = GetOtherBoss(); + if (pOtherBoss) + { + // TODO: we should activate the other boss location so he can start attackning even if nobody + // is near I dont know how to do that + if (!pOtherBoss->isInCombat()) + { + DoPlaySoundToSet(m_creature, IAmVeklor() ? SOUND_VL_AGGRO : SOUND_VN_AGGRO); + pOtherBoss->AI()->AttackStart(pWho); + } + } + } + + void SpellHit(Unit *caster, const SpellEntry *entry) + { + if (caster == m_creature) + return; + + Creature *pOtherBoss = GetOtherBoss(); + if (entry->Id != SPELL_HEAL_BROTHER || !pOtherBoss) + return; + + // add health so we keep same percentage for both brothers + uint32 mytotal = m_creature->GetMaxHealth(), histotal = pOtherBoss->GetMaxHealth(); + float mult = ((float)mytotal) / ((float)histotal); + if (mult < 1) + mult = 1.0f/mult; + #define HEAL_BROTHER_AMOUNT 30000.0f + uint32 largerAmount = (uint32)((HEAL_BROTHER_AMOUNT * mult) - HEAL_BROTHER_AMOUNT); + + uint32 myh = m_creature->GetHealth(); + uint32 hish = pOtherBoss->GetHealth(); + if (mytotal > histotal) + { + uint32 h = m_creature->GetHealth()+largerAmount; + m_creature->SetHealth(std::min(mytotal, h)); + } + else + { + uint32 h = pOtherBoss->GetHealth()+largerAmount; + pOtherBoss->SetHealth(std::min(histotal, h)); + } + } + + void TryHealBrother(uint32 diff) + { + if (IAmVeklor()) // this spell heals caster and the other brother so let VN cast it + return; + + if (Heal_Timer < diff) + { + Unit *pOtherBoss = GetOtherBoss(); + if (pOtherBoss && pOtherBoss->IsWithinDist(m_creature, 60.0f)) + { + DoCast(pOtherBoss, SPELL_HEAL_BROTHER); + Heal_Timer = 1000; + } + } else Heal_Timer -= diff; + } + + Unit *GetAnyoneCloseEnough(float dist, bool totallyRandom) + { + int cnt = 0; + std::list::iterator i; + std::list candidates; + + for (i = m_creature->getThreatManager().getThreatList().begin();i != m_creature->getThreatManager().getThreatList().end(); ++i) + { + Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid()); + if (m_creature->IsWithinDistInMap(pUnit, dist)) + { + if (!totallyRandom) + return pUnit; + candidates.push_back((*i)); + ++cnt; + } + } + if (!cnt) + return NULL; + for (int randomi = rand() % cnt; randomi > 0; randomi --) + candidates.pop_front(); + + i = candidates.begin(); + Unit *ret = Unit::GetUnit((*m_creature), (*i)->getUnitGuid()); + candidates.clear(); + return ret; + } + + Unit *PickNearestPlayer() + { + Unit *nearp = NULL; + float neardist = 0.0f; + std::list::iterator i; + for (i = m_creature->getThreatManager().getThreatList().begin();i != m_creature->getThreatManager().getThreatList().end(); ++i) + { + Unit* pUnit = NULL; + pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid()); + if (!pUnit) + continue; + float pudist = pUnit->GetDistance((const Creature *)m_creature); + if (!nearp || (neardist > pudist)) + { + nearp = pUnit; + neardist = pudist; + } + } + return nearp; + } + + void TeleportToMyBrother() + { + if (!m_pInstance) + return; + + Teleport_Timer = TELEPORTTIME; + + if (IAmVeklor()) + return; // mechanics handled by veknilash so they teleport exactly at the same time and to correct coordinates + + Creature *pOtherBoss = GetOtherBoss(); + if (pOtherBoss) + { + //m_creature->MonsterYell("Teleporting ...", LANG_UNIVERSAL, 0); + float other_x = pOtherBoss->GetPositionX(); + float other_y = pOtherBoss->GetPositionY(); + float other_z = pOtherBoss->GetPositionZ(); + float other_o = pOtherBoss->GetOrientation(); + + Map *thismap = m_creature->GetMap(); + thismap->CreatureRelocation(pOtherBoss, m_creature->GetPositionX(), + m_creature->GetPositionY(), m_creature->GetPositionZ(), m_creature->GetOrientation()); + thismap->CreatureRelocation(m_creature, other_x, other_y, other_z, other_o); + + SetAfterTeleport(); + ((boss_twinemperorsAI*) pOtherBoss->AI())->SetAfterTeleport(); + } + } + + void SetAfterTeleport() + { + m_creature->InterruptNonMeleeSpells(false); + DoStopAttack(); + DoResetThreat(); + DoCast(m_creature, SPELL_TWIN_TELEPORT_VISUAL); + m_creature->addUnitState(UNIT_STAT_STUNNED); + AfterTeleport = true; + AfterTeleportTimer = 2000; + tspellcasted = false; + } + + bool TryActivateAfterTTelep(uint32 diff) + { + if (AfterTeleport) + { + if (!tspellcasted) + { + m_creature->clearUnitState(UNIT_STAT_STUNNED); + DoCast(m_creature, SPELL_TWIN_TELEPORT); + m_creature->addUnitState(UNIT_STAT_STUNNED); + } + + tspellcasted = true; + + if (AfterTeleportTimer < diff) + { + AfterTeleport = false; + m_creature->clearUnitState(UNIT_STAT_STUNNED); + Unit *nearu = PickNearestPlayer(); + //DoYell(nearu->GetName(), LANG_UNIVERSAL, 0); + AttackStart(nearu); + m_creature->getThreatManager().addThreat(nearu, 10000); + return true; + } + else + { + AfterTeleportTimer -= diff; + // update important timers which would otherwise get skipped + if (EnrageTimer > diff) + EnrageTimer -= diff; + else + EnrageTimer = 0; + if (Teleport_Timer > diff) + Teleport_Timer -= diff; + else + Teleport_Timer = 0; + return false; + } + } + else + { + return true; + } + } + + void MoveInLineOfSight(Unit *who) + { + if (!who || m_creature->getVictim()) + return; + + if (who->isTargetableForAttack() && who->isInAccessablePlaceFor(m_creature) && m_creature->IsHostileTo(who)) + { + float attackRadius = m_creature->GetAttackDistance(who); + if (attackRadius < PULL_RANGE) + attackRadius = PULL_RANGE; + if (m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->GetDistanceZ(who) <= /*CREATURE_Z_ATTACK_RANGE*/7 /*there are stairs*/) + { + if (who->HasStealthAura()) + who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); + AttackStart(who); + } + } + } + + Creature *RespawnNearbyBugsAndGetOne() + { + std::list lUnitList; + GetCreatureListWithEntryInGrid(lUnitList,m_creature,15316,150.0f); + GetCreatureListWithEntryInGrid(lUnitList,m_creature,15317,150.0f); + + if (lUnitList.empty()) + return NULL; + + Creature *nearb = NULL; + + for(std::list::iterator iter = lUnitList.begin(); iter != lUnitList.end(); ++iter) + { + Creature *c = (Creature *)(*iter); + if (c->isDead()) + { + c->Respawn(); + c->setFaction(7); + c->RemoveAllAuras(); + } + if (c->IsWithinDistInMap(m_creature, ABUSE_BUG_RANGE)) + { + if (!nearb || !urand(0, 3)) + nearb = c; + } + } + return nearb; + } + + void HandleBugs(uint32 diff) + { + if (BugsTimer < diff || Abuse_Bug_Timer < diff) + { + Creature *c = RespawnNearbyBugsAndGetOne(); + if (Abuse_Bug_Timer < diff) + { + if (c) + { + CastSpellOnBug(c); + Abuse_Bug_Timer = urand(10000, 17000); + } + else + { + Abuse_Bug_Timer = 1000; + } + } + else + { + Abuse_Bug_Timer -= diff; + } + BugsTimer = 2000; + } + else + { + BugsTimer -= diff; + Abuse_Bug_Timer -= diff; + } + } + + void CheckEnrage(uint32 diff) + { + if (EnrageTimer < diff) + { + if (!m_creature->IsNonMeleeSpellCasted(true)) + { + DoCast(m_creature, SPELL_BERSERK); + EnrageTimer = 60*60000; + } else EnrageTimer = 0; + } else EnrageTimer-=diff; + } +}; + +class MANGOS_DLL_DECL BugAura : public Aura +{ + public: + BugAura(SpellEntry *spell, uint32 eff, int32 *bp, Unit *target, Unit *caster) : Aura(spell, eff, bp, target, caster, NULL) + {} +}; + +struct MANGOS_DLL_DECL boss_veknilashAI : public boss_twinemperorsAI +{ + bool IAmVeklor() {return false;} + boss_veknilashAI(Creature* pCreature) : boss_twinemperorsAI(pCreature) + { + Reset(); + } + + uint32 UpperCut_Timer; + uint32 UnbalancingStrike_Timer; + uint32 Scarabs_Timer; + int Rand; + int RandX; + int RandY; + + Creature* Summoned; + + void Reset() + { + TwinReset(); + UpperCut_Timer = urand(14000, 29000); + UnbalancingStrike_Timer = urand(8000, 18000); + Scarabs_Timer = urand(7000, 14000); + + //Added. Can be removed if its included in DB. + m_creature->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_MAGIC, true); + } + + void CastSpellOnBug(Creature *target) + { + target->setFaction(14); + ((CreatureAI*)target->AI())->AttackStart(m_creature->getThreatManager().getHostileTarget()); + SpellEntry *spell = (SpellEntry *)GetSpellStore()->LookupEntry(SPELL_MUTATE_BUG); + for (int i=0; i<3; ++i) + { + if (!spell->Effect[i]) + continue; + target->AddAura(new BugAura(spell, i, NULL, target, target)); + } + target->SetHealth(target->GetMaxHealth()); + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (!TryActivateAfterTTelep(diff)) + return; + + //UnbalancingStrike_Timer + if (UnbalancingStrike_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_UNBALANCING_STRIKE); + UnbalancingStrike_Timer = urand(8000, 20000); + }else UnbalancingStrike_Timer -= diff; + + if (UpperCut_Timer < diff) + { + Unit* randomMelee = GetAnyoneCloseEnough(ATTACK_DISTANCE, true); + if (randomMelee) + DoCast(randomMelee,SPELL_UPPERCUT); + UpperCut_Timer = urand(15000, 30000); + }else UpperCut_Timer -= diff; + + HandleBugs(diff); + + //Heal brother when 60yrds close + TryHealBrother(diff); + + //Teleporting to brother + if (Teleport_Timer < diff) + { + TeleportToMyBrother(); + }else Teleport_Timer -= diff; + + CheckEnrage(diff); + + DoMeleeAttackIfReady(); + } +}; + +struct MANGOS_DLL_DECL boss_veklorAI : public boss_twinemperorsAI +{ + bool IAmVeklor() {return true;} + boss_veklorAI(Creature* pCreature) : boss_twinemperorsAI(pCreature) + { + Reset(); + } + + uint32 ShadowBolt_Timer; + uint32 Blizzard_Timer; + uint32 ArcaneBurst_Timer; + uint32 Scorpions_Timer; + int Rand; + int RandX; + int RandY; + + Creature* Summoned; + + void Reset() + { + TwinReset(); + ShadowBolt_Timer = 0; + Blizzard_Timer = urand(15000, 20000); + ArcaneBurst_Timer = 1000; + Scorpions_Timer = urand(7000, 14000); + + //Added. Can be removed if its included in DB. + m_creature->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, true); + m_creature->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, 0); + m_creature->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, 0); + } + + void CastSpellOnBug(Creature *target) + { + target->setFaction(14); + SpellEntry *spell = (SpellEntry *)GetSpellStore()->LookupEntry(SPELL_EXPLODEBUG); + for (int i=0; i<3; ++i) + { + if (!spell->Effect[i]) + continue; + target->AddAura(new BugAura(spell, i, NULL, target, target)); + } + target->SetHealth(target->GetMaxHealth()); + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // reset arcane burst after teleport - we need to do this because + // when VL jumps to VN's location there will be a warrior who will get only 2s to run away + // which is almost impossible + if (AfterTeleport) + ArcaneBurst_Timer = 5000; + if (!TryActivateAfterTTelep(diff)) + return; + + //ShadowBolt_Timer + if (ShadowBolt_Timer < diff) + { + if (!m_creature->IsWithinDist(m_creature->getVictim(), 45.0f)) + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim(), VEKLOR_DIST, 0); + else + DoCast(m_creature->getVictim(),SPELL_SHADOWBOLT); + ShadowBolt_Timer = 2000; + }else ShadowBolt_Timer -= diff; + + //Blizzard_Timer + if (Blizzard_Timer < diff) + { + Unit* target = NULL; + target = GetAnyoneCloseEnough(45, true); + if (target) + DoCast(target,SPELL_BLIZZARD); + Blizzard_Timer = urand(15000, 30000); + }else Blizzard_Timer -= diff; + + if (ArcaneBurst_Timer < diff) + { + Unit *mvic; + if ((mvic=GetAnyoneCloseEnough(ATTACK_DISTANCE, false))!=NULL) + { + DoCast(mvic,SPELL_ARCANEBURST); + ArcaneBurst_Timer = 5000; + } + }else ArcaneBurst_Timer -= diff; + + HandleBugs(diff); + + //Heal brother when 60yrds close + TryHealBrother(diff); + + //Teleporting to brother + if (Teleport_Timer < diff) + { + TeleportToMyBrother(); + }else Teleport_Timer -= diff; + + CheckEnrage(diff); + + //VL doesn't melee + //DoMeleeAttackIfReady(); + } + + void AttackStart(Unit* who) + { + if (!who) + return; + + // VL doesn't melee + if (m_creature->Attack(who, false)) + { + m_creature->AddThreat(who, 0.0f); + m_creature->SetInCombatWith(who); + who->SetInCombatWith(m_creature); + + m_creature->GetMotionMaster()->MoveChase(who, VEKLOR_DIST, 0); + } + } +}; + +CreatureAI* GetAI_boss_veknilash(Creature* pCreature) +{ + return new boss_veknilashAI(pCreature); +} + +CreatureAI* GetAI_boss_veklor(Creature* pCreature) +{ + return new boss_veklorAI(pCreature); +} + +void AddSC_boss_twinemperors() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_veknilash"; + newscript->GetAI = &GetAI_boss_veknilash; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_veklor"; + newscript->GetAI = &GetAI_boss_veklor; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp new file mode 100644 index 000000000..395283fec --- /dev/null +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp @@ -0,0 +1,29 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Viscidus +SD%Complete: 0 +SDComment: place holder +SDCategory: Temple of Ahn'Qiraj +EndScriptData */ + +#include "precompiled.h" + +#define SPELL_POISON_SHOCK 25993 +#define SPELL_POISONBOLT_VOLLEY 25991 + +#define SPELL_TOXIN_CLOUD 25989 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp b/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp new file mode 100644 index 000000000..4e31dac82 --- /dev/null +++ b/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp @@ -0,0 +1,148 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance_Temple_of_Ahnqiraj +SD%Complete: 80 +SDComment: +SDCategory: Temple of Ahn'Qiraj +EndScriptData */ + +#include "precompiled.h" +#include "temple_of_ahnqiraj.h" + +struct MANGOS_DLL_DECL instance_temple_of_ahnqiraj : public ScriptedInstance +{ + instance_temple_of_ahnqiraj(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + + //Storing Skeram, Vem and Kri. + uint64 m_uiSkeramGUID; + uint64 m_uiVemGUID; + uint64 m_uiKriGUID; + uint64 m_uiVeklorGUID; + uint64 m_uiVeknilashGUID; + + uint32 m_uiBugTrioDeathCount; + + uint32 m_uiCthunPhase; + + void Initialize() + { + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + + m_uiSkeramGUID = 0; + m_uiVemGUID = 0; + m_uiKriGUID = 0; + m_uiVeklorGUID = 0; + m_uiVeknilashGUID = 0; + + m_uiBugTrioDeathCount = 0; + + m_uiCthunPhase = 0; + } + + void OnCreatureCreate (Creature* pCreature) + { + switch (pCreature->GetEntry()) + { + case 15263: m_uiSkeramGUID = pCreature->GetGUID(); break; + case 15544: m_uiVemGUID = pCreature->GetGUID(); break; + case 15511: m_uiKriGUID = pCreature->GetGUID(); break; + case 15276: m_uiVeklorGUID = pCreature->GetGUID(); break; + case 15275: m_uiVeknilashGUID = pCreature->GetGUID(); break; + } + } + + bool IsEncounterInProgress() const + { + //not active in AQ40 + return false; + } + + void SetData(uint32 uiType, uint32 uiData) + { + switch(uiType) + { + case TYPE_VEM: + m_auiEncounter[0] = uiData; + break; + case TYPE_VEKLOR: + m_auiEncounter[1] = uiData; + break; + case TYPE_VEKNILASH: + m_auiEncounter[2] = uiData; + break; + + case DATA_BUG_TRIO_DEATH: + ++m_uiBugTrioDeathCount; + break; + + case TYPE_CTHUN_PHASE: + m_uiCthunPhase = uiData; + break; + } + } + + uint32 GetData(uint32 uiType) + { + switch(uiType) + { + case TYPE_VEM: + return m_auiEncounter[0]; + + case DATA_BUG_TRIO_DEATH: + return m_uiBugTrioDeathCount; + + case TYPE_CTHUN_PHASE: + return m_uiCthunPhase; + } + return 0; + } + + uint64 GetData64(uint32 uiData) + { + switch(uiData) + { + case DATA_SKERAM: + return m_uiSkeramGUID; + case DATA_VEM: + return m_uiVemGUID; + case DATA_KRI: + return m_uiKriGUID; + case DATA_VEKLOR: + return m_uiVeklorGUID; + case DATA_VEKNILASH: + return m_uiVeknilashGUID; + } + return 0; + } +}; + +InstanceData* GetInstanceData_instance_temple_of_ahnqiraj(Map* pMap) +{ + return new instance_temple_of_ahnqiraj(pMap); +} + +void AddSC_instance_temple_of_ahnqiraj() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "instance_temple_of_ahnqiraj"; + newscript->GetInstanceData = &GetInstanceData_instance_temple_of_ahnqiraj; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp b/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp new file mode 100644 index 000000000..e7a634dc0 --- /dev/null +++ b/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp @@ -0,0 +1,318 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: mob_anubisath_sentinel +SD%Complete: 95 +SDComment: Shadow storm is not properly implemented in core it should only target ppl outside of melee range. +SDCategory: Temple of Ahn'Qiraj +EndScriptData */ + +#include "precompiled.h" +#include "WorldPacket.h" + +#include "Item.h" +#include "Player.h" +#include "Spell.h" + +#include "Cell.h" +#include "CellImpl.h" +#include "GridNotifiers.h" +#include "GridNotifiersImpl.h" + +#define SPELL_MENDING_BUFF 2147 + +#define SPELL_KNOCK_BUFF 21737 +#define SPELL_KNOCK 25778 +#define SPELL_MANAB_BUFF 812 +#define SPELL_MANAB 25779 + +#define SPELL_REFLECTAF_BUFF 13022 +#define SPELL_REFLECTSFr_BUFF 19595 +#define SPELL_THORNS_BUFF 25777 + +#define SPELL_THUNDER_BUFF 2834 +#define SPELL_THUNDER 8732 + +#define SPELL_MSTRIKE_BUFF 9347 +#define SPELL_MSTRIKE 24573 + +#define SPELL_STORM_BUFF 2148 +#define SPELL_STORM 26546 + +struct MANGOS_DLL_DECL aqsentinelAI; +class MANGOS_DLL_DECL SentinelAbilityAura : public Aura +{ + public: + ~SentinelAbilityAura(); + Unit* GetTriggerTarget() const; + SentinelAbilityAura(aqsentinelAI *abilityOwner, SpellEntry *spell, uint32 ability, uint32 eff); + protected: + aqsentinelAI *aOwner; + int32 currentBasePoints; + uint32 abilityId; +}; + +struct MANGOS_DLL_DECL aqsentinelAI : public ScriptedAI +{ + uint32 ability; + int abselected; + + void selectAbility(int asel) + { + switch (asel) + { + case 0: ability = SPELL_MENDING_BUFF;break; + case 1: ability = SPELL_KNOCK_BUFF;break; + case 2: ability = SPELL_MANAB_BUFF;break; + case 3: ability = SPELL_REFLECTAF_BUFF;break; + case 4: ability = SPELL_REFLECTSFr_BUFF;break; + case 5: ability = SPELL_THORNS_BUFF;break; + case 6: ability = SPELL_THUNDER_BUFF;break; + case 7: ability = SPELL_MSTRIKE_BUFF;break; + case 8: ability = SPELL_STORM_BUFF;break; + } + } + + aqsentinelAI(Creature* pCreature) : ScriptedAI(pCreature) + { + ClearBudyList(); + abselected = 0; // just initialization of variable + Reset(); + } + + Creature *nearby[3]; + + void ClearBudyList() + { + nearby[0] = nearby[1] = nearby[2] = NULL; + } + + void AddBuddyToList(Creature *c) + { + if (c==m_creature) + return; + for (int i=0; i<3; ++i) + { + if (nearby[i] == c) + return; + if (!nearby[i]) + { + nearby[i] = c; + return; + } + } + } + + void GiveBuddyMyList(Creature *c) + { + aqsentinelAI *cai = (aqsentinelAI *)(c->AI()); + for (int i=0; i<3; ++i) + if (nearby[i] && nearby[i]!=c) + cai->AddBuddyToList(nearby[i]); + cai->AddBuddyToList(m_creature); + } + + void SendMyListToBuddies() + { + for (int i=0; i<3; ++i) + if (nearby[i]) + GiveBuddyMyList(nearby[i]); + } + + void CallBuddiesToAttack(Unit *who) + { + for (int i=0; i<3; ++i) + { + Creature *c = nearby[i]; + if (c) + { + if (!c->isInCombat()) + { + c->SetNoCallAssistance(true); + if (c->AI()) + c->AI()->AttackStart(who); + } + } + } + } + + void AddSentinelsNear(Unit *nears) + { + std::list assistList; + GetCreatureListWithEntryInGrid(assistList,m_creature,15264,70.0f); + + if (assistList.empty()) + return; + + for(std::list::iterator iter = assistList.begin(); iter != assistList.end(); ++iter) + AddBuddyToList((*iter)); + } + + int pickAbilityRandom(bool *chosenAbilities) + { + for (int t = 0; t < 2; ++t) + { + for (int i = !t ? (rand()%9) : 0; i < 9; ++i) + { + if (!chosenAbilities[i]) + { + chosenAbilities[i] = true; + return i; + } + } + } + return 0; // should never happen + } + + void GetOtherSentinels(Unit *who) + { + bool *chosenAbilities = new bool[9]; + memset(chosenAbilities, 0, 9*sizeof(bool)); + selectAbility(pickAbilityRandom(chosenAbilities)); + + ClearBudyList(); + AddSentinelsNear(m_creature); + int bli; + for (bli = 0; bli < 3; ++bli) + { + if (!nearby[bli]) + break; + AddSentinelsNear(nearby[bli]); + ((aqsentinelAI *)nearby[bli]->AI())->gatherOthersWhenAggro = false; + ((aqsentinelAI *)nearby[bli]->AI())->selectAbility(pickAbilityRandom(chosenAbilities)); + } + /*if (bli < 3) + DoYell("I dont have enough buddies.", LANG_NEUTRAL, 0);*/ + SendMyListToBuddies(); + CallBuddiesToAttack(who); + + delete[] chosenAbilities; + } + + bool gatherOthersWhenAggro; + + void Reset() + { + if (!m_creature->isDead()) + { + for (int i=0; i<3; ++i) + { + if (!nearby[i]) + continue; + if (nearby[i]->isDead()) + nearby[i]->Respawn(); + } + } + ClearBudyList(); + gatherOthersWhenAggro = true; + } + + void GainSentinelAbility(uint32 id) + { + const SpellEntry *spell = GetSpellStore()->LookupEntry(id); + for (int i=0; i<3; ++i) + { + if (!spell->Effect[i]) + continue; + SentinelAbilityAura *a = new SentinelAbilityAura(this, (SpellEntry *)spell, id, i); + m_creature->AddAura(a); + } + } + + void Aggro(Unit* pWho) + { + if (gatherOthersWhenAggro) + GetOtherSentinels(pWho); + + GainSentinelAbility(ability); + + m_creature->SetInCombatWithZone(); + } + + void JustDied(Unit*) + { + for (int ni=0; ni<3; ++ni) + { + Creature *sent = nearby[ni]; + if (!sent) + continue; + if (sent->isDead()) + continue; + int h = sent->GetHealth() + (sent->GetMaxHealth() / 2); + if (h > sent->GetMaxHealth()) + h = sent->GetMaxHealth(); + sent->SetHealth(h); + ((aqsentinelAI *)sent->AI())->GainSentinelAbility(ability); + } + } + + Unit *GetHatedManaUser() + { + std::list::iterator i; + for (i = m_creature->getThreatManager().getThreatList().begin();i != m_creature->getThreatManager().getThreatList().end(); ++i) + { + Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid()); + if (pUnit->getPowerType()==POWER_MANA) + return pUnit; + } + return NULL; + } +}; +CreatureAI* GetAI_mob_anubisath_sentinelAI(Creature* pCreature) +{ + return new aqsentinelAI(pCreature); +} + +void AddSC_mob_anubisath_sentinel() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "mob_anubisath_sentinel"; + newscript->GetAI = &GetAI_mob_anubisath_sentinelAI; + newscript->RegisterSelf(); +} + +SentinelAbilityAura::~SentinelAbilityAura() {} +Unit* SentinelAbilityAura::GetTriggerTarget() const +{ + switch (abilityId) + { + case SPELL_KNOCK_BUFF: + case SPELL_THUNDER_BUFF: + case SPELL_MSTRIKE_BUFF: + case SPELL_STORM_BUFF: + return aOwner->m_creature->getVictim(); + + case SPELL_MANAB_BUFF: + return aOwner->GetHatedManaUser(); + + case SPELL_MENDING_BUFF: + case SPELL_REFLECTAF_BUFF: + case SPELL_REFLECTSFr_BUFF: + case SPELL_THORNS_BUFF: + default: + return aOwner->m_creature; + } +} + +SentinelAbilityAura::SentinelAbilityAura(aqsentinelAI *abilityOwner, SpellEntry *spell, uint32 ability, uint32 eff) +: Aura(spell, eff, NULL, abilityOwner->m_creature, abilityOwner->m_creature, NULL) +{ + aOwner = abilityOwner; + abilityId = ability; + currentBasePoints = 0; +} diff --git a/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h b/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h new file mode 100644 index 000000000..29b630166 --- /dev/null +++ b/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h @@ -0,0 +1,27 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_TEMPLE_OF_AHNQIRAJ_H +#define DEF_TEMPLE_OF_AHNQIRAJ_H + +enum +{ + MAX_ENCOUNTER = 3, + + TYPE_VEM = 1, + TYPE_VEKLOR = 2, + TYPE_VEKNILASH = 3, + + DATA_SKERAM = 5, + DATA_KRI = 6, + DATA_VEM = 7, + DATA_VEKLOR = 8, + DATA_VEKNILASH = 9, + + DATA_BUG_TRIO_DEATH = 10, + + TYPE_CTHUN_PHASE = 20 +}; + +#endif diff --git a/scripts/kalimdor/the_barrens.cpp b/scripts/kalimdor/the_barrens.cpp new file mode 100644 index 000000000..77b06243f --- /dev/null +++ b/scripts/kalimdor/the_barrens.cpp @@ -0,0 +1,691 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: The_Barrens +SD%Complete: 90 +SDComment: Quest support: 863, 898, 1719, 2458, 4921, 6981 +SDCategory: Barrens +EndScriptData */ + +/* ContentData +npc_beaten_corpse +npc_gilthares +npc_sputtervalve +npc_taskmaster_fizzule +npc_twiggy_flathead +at_twiggy_flathead +npc_wizzlecrank_shredder +EndContentData */ + +#include "precompiled.h" +#include "escort_ai.h" + +/*###### +## npc_beaten_corpse +######*/ + +enum +{ + QUEST_LOST_IN_BATTLE = 4921 +}; + +bool GossipHello_npc_beaten_corpse(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->GetQuestStatus(QUEST_LOST_IN_BATTLE) == QUEST_STATUS_INCOMPLETE || + pPlayer->GetQuestStatus(QUEST_LOST_IN_BATTLE) == QUEST_STATUS_COMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,"Examine corpse in detail...",GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+1); + + pPlayer->SEND_GOSSIP_MENU(3557, pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_beaten_corpse(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF +1) + { + pPlayer->SEND_GOSSIP_MENU(3558, pCreature->GetGUID()); + pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetGUID()); + } + return true; +} + +/*###### +# npc_gilthares +######*/ + +enum +{ + 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, + + QUEST_FREE_FROM_HOLD = 898, + AREA_MERCHANT_COAST = 391 +}; + +struct MANGOS_DLL_DECL npc_giltharesAI : public npc_escortAI +{ + npc_giltharesAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } + + void Reset() { } + + void WaypointReached(uint32 uiPointId) + { + Player* pPlayer = GetPlayerForEscort(); + + if (!pPlayer) + return; + + switch(uiPointId) + { + case 16: + DoScriptText(SAY_GIL_AT_LAST, m_creature, pPlayer); + break; + case 17: + DoScriptText(SAY_GIL_PROCEED, m_creature, pPlayer); + break; + case 18: + DoScriptText(SAY_GIL_FREEBOOTERS, m_creature, pPlayer); + break; + case 37: + DoScriptText(SAY_GIL_ALMOST, m_creature, pPlayer); + break; + case 47: + DoScriptText(SAY_GIL_SWEET, m_creature, pPlayer); + break; + case 53: + DoScriptText(SAY_GIL_FREED, m_creature, pPlayer); + pPlayer->GroupEventHappens(QUEST_FREE_FROM_HOLD, m_creature); + break; + } + } + + void Aggro(Unit* pWho) + { + //not always use + if (urand(0, 3)) + return; + + //only aggro text if not player and only in this area + if (pWho->GetTypeId() != TYPEID_PLAYER && m_creature->GetAreaId() == AREA_MERCHANT_COAST) + { + //appears to be pretty much random (possible only if escorter not in combat with pWho yet?) + switch(urand(0, 3)) + { + case 0: DoScriptText(SAY_GIL_AGGRO_1, m_creature, pWho); break; + case 1: DoScriptText(SAY_GIL_AGGRO_2, m_creature, pWho); break; + case 2: DoScriptText(SAY_GIL_AGGRO_3, m_creature, pWho); break; + case 3: DoScriptText(SAY_GIL_AGGRO_4, m_creature, pWho); break; + } + } + } +}; + +CreatureAI* GetAI_npc_gilthares(Creature* pCreature) +{ + return new npc_giltharesAI(pCreature); +} + +bool QuestAccept_npc_gilthares(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_FREE_FROM_HOLD) + { + pCreature->setFaction(FACTION_ESCORT_H_NEUTRAL_ACTIVE); + pCreature->SetStandState(UNIT_STAND_STATE_STAND); + + DoScriptText(SAY_GIL_START, pCreature, pPlayer); + + if (npc_giltharesAI* pEscortAI = dynamic_cast(pCreature->AI())) + pEscortAI->Start(false, false, pPlayer->GetGUID(), pQuest); + } + return true; +} + +/*###### +## npc_sputtervalve +######*/ + +bool GossipHello_npc_sputtervalve(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestStatus(6981) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,"Can you tell me about this shard?",GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_sputtervalve(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF) + { + pPlayer->SEND_GOSSIP_MENU(2013, pCreature->GetGUID()); + pPlayer->AreaExploredOrEventHappens(6981); + } + return true; +} + +/*###### +## npc_taskmaster_fizzule +######*/ + +enum +{ + FACTION_FRIENDLY_F = 35, + SPELL_FLARE = 10113, + SPELL_FOLLY = 10137, +}; + +struct MANGOS_DLL_DECL npc_taskmaster_fizzuleAI : public ScriptedAI +{ + npc_taskmaster_fizzuleAI(Creature* pCreature) : ScriptedAI(pCreature) + { + factionNorm = pCreature->getFaction(); + Reset(); + } + + uint32 factionNorm; + bool IsFriend; + uint32 Reset_Timer; + uint8 FlareCount; + + void Reset() + { + IsFriend = false; + Reset_Timer = 120000; + FlareCount = 0; + m_creature->setFaction(factionNorm); + } + + void DoFriend() + { + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + + m_creature->StopMoving(); + m_creature->GetMotionMaster()->MoveIdle(); + + m_creature->setFaction(FACTION_FRIENDLY_F); + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_SALUTE); + } + + void SpellHit(Unit *caster, const SpellEntry *spell) + { + if (spell->Id == SPELL_FLARE || spell->Id == SPELL_FOLLY) + { + ++FlareCount; + + if (FlareCount >= 2) + IsFriend = true; + } + } + + void UpdateAI(const uint32 diff) + { + if (IsFriend) + { + if (Reset_Timer < diff) + { + EnterEvadeMode(); + } else Reset_Timer -= diff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } + + void ReceiveEmote(Player* pPlayer, uint32 emote) + { + if (emote == TEXTEMOTE_SALUTE) + { + if (FlareCount >= 2) + { + if (m_creature->getFaction() == FACTION_FRIENDLY_F) + return; + + DoFriend(); + } + } + } +}; + +CreatureAI* GetAI_npc_taskmaster_fizzule(Creature* pCreature) +{ + return new npc_taskmaster_fizzuleAI(pCreature); +} + +/*##### +## npc_twiggy_flathead +#####*/ + +#define SAY_BIG_WILL_READY -1000123 +#define SAY_TWIGGY_BEGIN -1000124 +#define SAY_TWIGGY_FRAY -1000125 +#define SAY_TWIGGY_DOWN -1000126 +#define SAY_TWIGGY_OVER -1000127 + +#define NPC_TWIGGY 6248 +#define NPC_BIG_WILL 6238 +#define NPC_AFFRAY_CHALLENGER 6240 +#define QUEST_AFFRAY 1719 + +float AffrayChallengerLoc[6][4]= +{ + {-1683, -4326, 2.79, 0}, + {-1682, -4329, 2.79, 0}, + {-1683, -4330, 2.79, 0}, + {-1680, -4334, 2.79, 1.49}, + {-1674, -4326, 2.79, 3.49}, + {-1677, -4334, 2.79, 1.66} +}; + +struct MANGOS_DLL_DECL npc_twiggy_flatheadAI : public ScriptedAI +{ + npc_twiggy_flatheadAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + bool EventInProgress; + + uint32 Event_Timer; + uint32 Step; + uint32 Challenger_Count; + uint32 ChallengerDeath_Timer; + + uint64 PlayerGUID; + uint64 BigWillGUID; + uint64 AffrayChallenger[6]; + + void Reset() + { + EventInProgress = false; + + Event_Timer = 2000; + Step = 0; + Challenger_Count = 0; + ChallengerDeath_Timer = 0; + + PlayerGUID = 0; + BigWillGUID = 0; + + for(uint8 i = 0; i < 6; ++i) + AffrayChallenger[i] = 0; + } + + bool CanStartEvent(Player* pPlayer) + { + if (!EventInProgress) + { + EventInProgress = true; + PlayerGUID = pPlayer->GetGUID(); + DoScriptText(SAY_TWIGGY_BEGIN, m_creature, pPlayer); + return true; + } + + debug_log("SD2: npc_twiggy_flathead event already in progress, need to wait."); + return false; + } + + void SetChallengers() + { + for(uint8 i = 0; i < 6; ++i) + { + Creature* pCreature = m_creature->SummonCreature(NPC_AFFRAY_CHALLENGER, AffrayChallengerLoc[i][0], AffrayChallengerLoc[i][1], AffrayChallengerLoc[i][2], AffrayChallengerLoc[i][3], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000); + if (!pCreature) + { + debug_log("SD2: npc_twiggy_flathead event cannot summon challenger as expected."); + continue; + } + + pCreature->setFaction(35); + pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + pCreature->HandleEmoteCommand(EMOTE_ONESHOT_ROAR); + AffrayChallenger[i] = pCreature->GetGUID(); + } + } + + void SetChallengerReady(Unit *pUnit) + { + pUnit->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + pUnit->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + pUnit->HandleEmoteCommand(EMOTE_ONESHOT_ROAR); + pUnit->setFaction(14); + } + + void UpdateAI(const uint32 diff) + { + if (!EventInProgress) + return; + + if (ChallengerDeath_Timer) + { + if (ChallengerDeath_Timer <= diff) + { + for(uint8 i = 0; i < 6; ++i) + { + Creature *challenger = (Creature*)Unit::GetUnit(*m_creature,AffrayChallenger[i]); + if (challenger && !challenger->isAlive() && challenger->isDead()) + { + DoScriptText(SAY_TWIGGY_DOWN, m_creature); + challenger->RemoveCorpse(); + AffrayChallenger[i] = 0; + continue; + } + } + ChallengerDeath_Timer = 2500; + } else ChallengerDeath_Timer -= diff; + } + + if (Event_Timer < diff) + { + Player* pPlayer = (Player*)Unit::GetUnit(*m_creature,PlayerGUID); + + if (!pPlayer || pPlayer->isDead()) + Reset(); + + switch(Step) + { + case 0: + SetChallengers(); + ChallengerDeath_Timer = 2500; + Event_Timer = 5000; + ++Step; + break; + case 1: + DoScriptText(SAY_TWIGGY_FRAY, m_creature); + if (Unit *challenger = Unit::GetUnit(*m_creature,AffrayChallenger[Challenger_Count])) + SetChallengerReady(challenger); + else Reset(); + ++Challenger_Count; + Event_Timer = 25000; + if (Challenger_Count == 6) + ++Step; + break; + case 2: + if (Unit *temp = m_creature->SummonCreature(NPC_BIG_WILL,-1713.79,-4342.09,6.05,6.15,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,300000)) + { + BigWillGUID = temp->GetGUID(); + temp->setFaction(35); + temp->GetMotionMaster()->MovePoint(0,-1682.31,-4329.68,2.78); + } + Event_Timer = 15000; + ++Step; + break; + case 3: + if (Unit *will = Unit::GetUnit(*m_creature,BigWillGUID)) + { + will->setFaction(32); + DoScriptText(SAY_BIG_WILL_READY, will, pPlayer); + } + Event_Timer = 5000; + ++Step; + break; + case 4: + Unit *will = Unit::GetUnit(*m_creature,BigWillGUID); + if (will && will->isDead()) + { + DoScriptText(SAY_TWIGGY_OVER, m_creature); + Reset(); + } else if (!will) + Reset(); + Event_Timer = 5000; + break; + } + } else Event_Timer -= diff; + } +}; + +CreatureAI* GetAI_npc_twiggy_flathead(Creature* pCreature) +{ + return new npc_twiggy_flatheadAI(pCreature); +} + +bool AreaTrigger_at_twiggy_flathead(Player* pPlayer, AreaTriggerEntry* pAt) +{ + if (!pPlayer->isDead() && pPlayer->GetQuestStatus(QUEST_AFFRAY) == QUEST_STATUS_INCOMPLETE) + { + if (uint16 slot = pPlayer->FindQuestSlot(QUEST_AFFRAY)) + { + //we don't want player to start event if failed already. + if (pPlayer->GetQuestSlotState(slot) == QUEST_STATE_FAIL) + return true; + } + + Creature* pCreature = GetClosestCreatureWithEntry(pPlayer, NPC_TWIGGY, 30.0f); + + if (!pCreature) + return true; + + if (((npc_twiggy_flatheadAI*)pCreature->AI())->CanStartEvent(pPlayer)) + return false; //ok to let mangos process further + else + return true; + } + return true; +} + +/*##### +## npc_wizzlecranks_shredder +#####*/ + +enum +{ + 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, + + QUEST_ESCAPE = 863, + FACTION_RATCHET = 637, + NPC_PILOT_WIZZ = 3451, + NPC_MERCENARY = 3282 +}; + +struct MANGOS_DLL_DECL npc_wizzlecranks_shredderAI : public npc_escortAI +{ + npc_wizzlecranks_shredderAI(Creature* pCreature) : npc_escortAI(pCreature) + { + m_bIsPostEvent = false; + m_uiPostEventTimer = 1000; + m_uiPostEventCount = 0; + Reset(); + } + + bool m_bIsPostEvent; + uint32 m_uiPostEventTimer; + uint32 m_uiPostEventCount; + + void Reset() + { + if (!HasEscortState(STATE_ESCORT_ESCORTING)) + { + if (m_creature->getStandState() == UNIT_STAND_STATE_DEAD) + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + + m_bIsPostEvent = false; + m_uiPostEventTimer = 1000; + m_uiPostEventCount = 0; + } + } + + void WaypointReached(uint32 uiPointId) + { + switch(uiPointId) + { + case 0: + if (Player* pPlayer = GetPlayerForEscort()) + DoScriptText(SAY_STARTUP1, m_creature, pPlayer); + break; + case 9: + SetRun(false); + break; + case 17: + if (Creature* pTemp = m_creature->SummonCreature(NPC_MERCENARY, 1128.489f, -3037.611f, 92.701f, 1.472f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000)) + { + DoScriptText(SAY_MERCENARY, pTemp); + m_creature->SummonCreature(NPC_MERCENARY, 1160.172f, -2980.168f, 97.313f, 3.690f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000); + } + break; + case 24: + m_bIsPostEvent = true; + break; + } + } + + void WaypointStart(uint32 uiPointId) + { + switch(uiPointId) + { + case 9: + if (Player* pPlayer = GetPlayerForEscort()) + DoScriptText(SAY_STARTUP2, m_creature, pPlayer); + break; + case 18: + if (Player* pPlayer = GetPlayerForEscort()) + DoScriptText(SAY_PROGRESS_1, m_creature, pPlayer); + SetRun(); + break; + } + } + + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_PILOT_WIZZ) + m_creature->SetStandState(UNIT_STAND_STATE_DEAD); + + if (pSummoned->GetEntry() == NPC_MERCENARY) + pSummoned->AI()->AttackStart(m_creature); + } + + void UpdateEscortAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + { + if (m_bIsPostEvent) + { + if (m_uiPostEventTimer < uiDiff) + { + switch(m_uiPostEventCount) + { + case 0: + DoScriptText(SAY_PROGRESS_2, m_creature); + break; + case 1: + DoScriptText(SAY_PROGRESS_3, m_creature); + break; + case 2: + DoScriptText(SAY_END, m_creature); + break; + case 3: + if (Player* pPlayer = GetPlayerForEscort()) + { + pPlayer->GroupEventHappens(QUEST_ESCAPE, m_creature); + m_creature->SummonCreature(NPC_PILOT_WIZZ, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 180000); + } + break; + } + + ++m_uiPostEventCount; + m_uiPostEventTimer = 5000; + } + else + m_uiPostEventTimer -= uiDiff; + } + + return; + } + + DoMeleeAttackIfReady(); + } +}; + +bool QuestAccept_npc_wizzlecranks_shredder(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_ESCAPE) + { + DoScriptText(SAY_START, pCreature); + pCreature->setFaction(FACTION_RATCHET); + + if (npc_wizzlecranks_shredderAI* pEscortAI = dynamic_cast(pCreature->AI())) + pEscortAI->Start(false, true, pPlayer->GetGUID(), pQuest); + } + return true; +} + +CreatureAI* GetAI_npc_wizzlecranks_shredder(Creature* pCreature) +{ + return new npc_wizzlecranks_shredderAI(pCreature); +} + +void AddSC_the_barrens() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_beaten_corpse"; + newscript->pGossipHello = &GossipHello_npc_beaten_corpse; + newscript->pGossipSelect = &GossipSelect_npc_beaten_corpse; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_gilthares"; + newscript->GetAI = &GetAI_npc_gilthares; + newscript->pQuestAccept = &QuestAccept_npc_gilthares; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_sputtervalve"; + newscript->pGossipHello = &GossipHello_npc_sputtervalve; + newscript->pGossipSelect = &GossipSelect_npc_sputtervalve; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_taskmaster_fizzule"; + newscript->GetAI = &GetAI_npc_taskmaster_fizzule; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_twiggy_flathead"; + newscript->GetAI = &GetAI_npc_twiggy_flathead; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "at_twiggy_flathead"; + newscript->pAreaTrigger = &AreaTrigger_at_twiggy_flathead; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_wizzlecranks_shredder"; + newscript->GetAI = &GetAI_npc_wizzlecranks_shredder; + newscript->pQuestAccept = &QuestAccept_npc_wizzlecranks_shredder; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/thousand_needles.cpp b/scripts/kalimdor/thousand_needles.cpp new file mode 100644 index 000000000..a10c3a5e6 --- /dev/null +++ b/scripts/kalimdor/thousand_needles.cpp @@ -0,0 +1,398 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Thousand_Needles +SD%Complete: 90 +SDComment: Quest support: 1950, 4770, 4904, 4966 +SDCategory: Thousand Needles +EndScriptData +*/ + +/* ContentData +npc_kanati +npc_lakota_windsong +npc_paoka_swiftmountain +npc_plucky_johnson +EndContentData */ + +#include "precompiled.h" +#include "escort_ai.h" + +/*###### +# npc_kanati +######*/ + +enum +{ + SAY_KAN_START = -1000410, + + QUEST_PROTECT_KANATI = 4966, + NPC_GALAK_ASS = 10720 +}; + +const float m_afGalakLoc[]= {-4867.387695, -1357.353760, -48.226 }; + +struct MANGOS_DLL_DECL npc_kanatiAI : public npc_escortAI +{ + npc_kanatiAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } + + void Reset() { } + + void WaypointReached(uint32 uiPointId) + { + switch(uiPointId) + { + case 0: + DoScriptText(SAY_KAN_START, m_creature); + DoSpawnGalak(); + break; + case 1: + if (Player* pPlayer = GetPlayerForEscort()) + pPlayer->GroupEventHappens(QUEST_PROTECT_KANATI, m_creature); + break; + } + } + + void DoSpawnGalak() + { + for(int i = 0; i < 3; ++i) + m_creature->SummonCreature(NPC_GALAK_ASS, + m_afGalakLoc[0], m_afGalakLoc[1], m_afGalakLoc[2], 0.0f, + TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + } + + void JustSummoned(Creature* pSummoned) + { + pSummoned->AI()->AttackStart(m_creature); + } +}; + +CreatureAI* GetAI_npc_kanati(Creature* pCreature) +{ + return new npc_kanatiAI(pCreature); +} + +bool QuestAccept_npc_kanati(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_PROTECT_KANATI) + { + if (npc_kanatiAI* pEscortAI = dynamic_cast(pCreature->AI())) + pEscortAI->Start(false, false, pPlayer->GetGUID(), pQuest, true); + } + return true; +} + +/*###### +# npc_lakota_windsong +######*/ + +enum +{ + SAY_LAKO_START = -1000365, + SAY_LAKO_LOOK_OUT = -1000366, + SAY_LAKO_HERE_COME = -1000367, + SAY_LAKO_MORE = -1000368, + SAY_LAKO_END = -1000369, + + QUEST_FREE_AT_LAST = 4904, + NPC_GRIM_BANDIT = 10758, + + ID_AMBUSH_1 = 0, + ID_AMBUSH_2 = 2, + ID_AMBUSH_3 = 4 +}; + +float m_afBanditLoc[6][6]= +{ + {-4905.479492, -2062.732666, 84.352}, + {-4915.201172, -2073.528320, 84.733}, + {-4878.883301, -1986.947876, 91.966}, + {-4877.503906, -1966.113403, 91.859}, + {-4767.985352, -1873.169189, 90.192}, + {-4788.861328, -1888.007813, 89.888} +}; + +struct MANGOS_DLL_DECL npc_lakota_windsongAI : public npc_escortAI +{ + npc_lakota_windsongAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } + + void Reset() { } + + void WaypointReached(uint32 uiPointId) + { + switch(uiPointId) + { + case 8: + DoScriptText(SAY_LAKO_LOOK_OUT, m_creature); + DoSpawnBandits(ID_AMBUSH_1); + break; + case 14: + DoScriptText(SAY_LAKO_HERE_COME, m_creature); + DoSpawnBandits(ID_AMBUSH_2); + break; + case 21: + DoScriptText(SAY_LAKO_MORE, m_creature); + DoSpawnBandits(ID_AMBUSH_3); + break; + case 45: + if (Player* pPlayer = GetPlayerForEscort()) + pPlayer->GroupEventHappens(QUEST_FREE_AT_LAST, m_creature); + break; + } + } + + void DoSpawnBandits(int uiAmbushId) + { + for(int i = 0; i < 2; ++i) + m_creature->SummonCreature(NPC_GRIM_BANDIT, + m_afBanditLoc[i+uiAmbushId][0], m_afBanditLoc[i+uiAmbushId][1], m_afBanditLoc[i+uiAmbushId][2], 0.0f, + TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000); + } +}; + +CreatureAI* GetAI_npc_lakota_windsong(Creature* pCreature) +{ + return new npc_lakota_windsongAI(pCreature); +} + +bool QuestAccept_npc_lakota_windsong(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_FREE_AT_LAST) + { + DoScriptText(SAY_LAKO_START, pCreature, pPlayer); + pCreature->setFaction(FACTION_ESCORT_H_NEUTRAL_ACTIVE); + + if (npc_lakota_windsongAI* pEscortAI = dynamic_cast(pCreature->AI())) + pEscortAI->Start(false, false, pPlayer->GetGUID(), pQuest); + } + return true; +} + +/*###### +# npc_paoka_swiftmountain +######*/ + +enum +{ + SAY_START = -1000362, + SAY_WYVERN = -1000363, + SAY_COMPLETE = -1000364, + + QUEST_HOMEWARD = 4770, + NPC_WYVERN = 4107 +}; + +float m_afWyvernLoc[3][3]= +{ + {-4990.606, -906.057, -5.343}, + {-4970.241, -927.378, -4.951}, + {-4985.364, -952.528, -5.199} +}; + +struct MANGOS_DLL_DECL npc_paoka_swiftmountainAI : public npc_escortAI +{ + npc_paoka_swiftmountainAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } + + void Reset() { } + + void WaypointReached(uint32 uiPointId) + { + switch(uiPointId) + { + case 15: + DoScriptText(SAY_WYVERN, m_creature); + DoSpawnWyvern(); + break; + case 26: + DoScriptText(SAY_COMPLETE, m_creature); + break; + case 27: + if (Player* pPlayer = GetPlayerForEscort()) + pPlayer->GroupEventHappens(QUEST_HOMEWARD, m_creature); + break; + } + } + + void DoSpawnWyvern() + { + for(int i = 0; i < 3; ++i) + m_creature->SummonCreature(NPC_WYVERN, + m_afWyvernLoc[i][0], m_afWyvernLoc[i][1], m_afWyvernLoc[i][2], 0.0f, + TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000); + } +}; + +CreatureAI* GetAI_npc_paoka_swiftmountain(Creature* pCreature) +{ + return new npc_paoka_swiftmountainAI(pCreature); +} + +bool QuestAccept_npc_paoka_swiftmountain(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_HOMEWARD) + { + DoScriptText(SAY_START, pCreature, pPlayer); + pCreature->setFaction(FACTION_ESCORT_H_NEUTRAL_ACTIVE); + + if (npc_paoka_swiftmountainAI* pEscortAI = dynamic_cast(pCreature->AI())) + pEscortAI->Start(false, false, pPlayer->GetGUID(), pQuest); + } + return true; +} + +/*###### +# "Plucky" Johnson +######*/ + +enum +{ + FACTION_FRIENDLY = 35, + QUEST_SCOOP = 1950, + SPELL_PLUCKY_HUMAN = 9192, + SPELL_PLUCKY_CHICKEN = 9220 +}; + +#define GOSSIP_ITEM_QUEST "Please tell me the Phrase.." + +struct MANGOS_DLL_DECL npc_plucky_johnsonAI : public ScriptedAI +{ + npc_plucky_johnsonAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_uiNormFaction = pCreature->getFaction(); + Reset(); + } + + uint32 m_uiNormFaction; + uint32 m_uiResetTimer; + + void Reset() + { + m_uiResetTimer = 120000; + + if (m_creature->getFaction() != m_uiNormFaction) + m_creature->setFaction(m_uiNormFaction); + + if (m_creature->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP)) + m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + + m_creature->CastSpell(m_creature, SPELL_PLUCKY_CHICKEN, false); + } + + void ReceiveEmote(Player* pPlayer, uint32 uiTextEmote) + { + if (pPlayer->GetQuestStatus(QUEST_SCOOP) == QUEST_STATUS_INCOMPLETE) + { + if (uiTextEmote == TEXTEMOTE_BECKON) + { + m_creature->setFaction(FACTION_FRIENDLY); + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + m_creature->CastSpell(m_creature, SPELL_PLUCKY_HUMAN, false); + } + } + + if (uiTextEmote == TEXTEMOTE_CHICKEN) + { + if (m_creature->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP)) + return; + else + { + m_creature->setFaction(FACTION_FRIENDLY); + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + m_creature->CastSpell(m_creature, SPELL_PLUCKY_HUMAN, false); + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_WAVE); + } + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_creature->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP)) + { + if (m_uiResetTimer < uiDiff) + { + if (!m_creature->getVictim()) + EnterEvadeMode(); + else + m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + + return; + } + else + m_uiResetTimer -= uiDiff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_plucky_johnson(Creature* pCreature) +{ + return new npc_plucky_johnsonAI(pCreature); +} + +bool GossipHello_npc_plucky_johnson(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->GetQuestStatus(QUEST_SCOOP) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_QUEST, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + + pPlayer->SEND_GOSSIP_MENU(720, pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_plucky_johnson(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF) + { + pPlayer->SEND_GOSSIP_MENU(738, pCreature->GetGUID()); + pPlayer->AreaExploredOrEventHappens(QUEST_SCOOP); + } + + return true; +} + +void AddSC_thousand_needles() +{ + Script* newscript; + + newscript = new Script; + newscript->Name = "npc_kanati"; + newscript->GetAI = &GetAI_npc_kanati; + newscript->pQuestAccept = &QuestAccept_npc_kanati; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_lakota_windsong"; + newscript->GetAI = &GetAI_npc_lakota_windsong; + newscript->pQuestAccept = &QuestAccept_npc_lakota_windsong; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_paoka_swiftmountain"; + newscript->GetAI = &GetAI_npc_paoka_swiftmountain; + newscript->pQuestAccept = &QuestAccept_npc_paoka_swiftmountain; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_plucky_johnson"; + newscript->GetAI = &GetAI_npc_plucky_johnson; + newscript->pGossipHello = &GossipHello_npc_plucky_johnson; + newscript->pGossipSelect = &GossipSelect_npc_plucky_johnson; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/thunder_bluff.cpp b/scripts/kalimdor/thunder_bluff.cpp new file mode 100644 index 000000000..738cba213 --- /dev/null +++ b/scripts/kalimdor/thunder_bluff.cpp @@ -0,0 +1,134 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Thunder_Bluff +SD%Complete: 100 +SDComment: Quest support: 925 +SDCategory: Thunder Bluff +EndScriptData */ + +#include "precompiled.h" + +/*##### +# npc_cairne_bloodhoof +######*/ + +#define SPELL_BERSERKER_CHARGE 16636 +#define SPELL_CLEAVE 16044 +#define SPELL_MORTAL_STRIKE 16856 +#define SPELL_THUNDERCLAP 23931 +#define SPELL_UPPERCUT 22916 + +//TODO: verify abilities/timers +struct MANGOS_DLL_DECL npc_cairne_bloodhoofAI : public ScriptedAI +{ + npc_cairne_bloodhoofAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + uint32 BerserkerCharge_Timer; + uint32 Cleave_Timer; + uint32 MortalStrike_Timer; + uint32 Thunderclap_Timer; + uint32 Uppercut_Timer; + + void Reset() + { + BerserkerCharge_Timer = 30000; + Cleave_Timer = 5000; + MortalStrike_Timer = 10000; + Thunderclap_Timer = 15000; + Uppercut_Timer = 10000; + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (BerserkerCharge_Timer < diff) + { + Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0); + if (target) + DoCast(target,SPELL_BERSERKER_CHARGE); + BerserkerCharge_Timer = 25000; + }else BerserkerCharge_Timer -= diff; + + if (Uppercut_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_UPPERCUT); + Uppercut_Timer = 20000; + }else Uppercut_Timer -= diff; + + if (Thunderclap_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_THUNDERCLAP); + Thunderclap_Timer = 15000; + }else Thunderclap_Timer -= diff; + + if (MortalStrike_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_MORTAL_STRIKE); + MortalStrike_Timer = 15000; + }else MortalStrike_Timer -= diff; + + if (Cleave_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_CLEAVE); + Cleave_Timer = 7000; + }else Cleave_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_npc_cairne_bloodhoof(Creature* pCreature) +{ + return new npc_cairne_bloodhoofAI(pCreature); +} + +bool GossipHello_npc_cairne_bloodhoof(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestStatus(925) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I know this is rather silly but a young ward who is a bit shy would like your hoofprint.", GOSSIP_SENDER_MAIN, GOSSIP_SENDER_INFO); + + pPlayer->SEND_GOSSIP_MENU(7013, pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_cairne_bloodhoof(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_SENDER_INFO) + { + pPlayer->CastSpell(pPlayer, 23123, false); + pPlayer->SEND_GOSSIP_MENU(7014, pCreature->GetGUID()); + } + return true; +} + +void AddSC_thunder_bluff() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_cairne_bloodhoof"; + newscript->GetAI = &GetAI_npc_cairne_bloodhoof; + newscript->pGossipHello = &GossipHello_npc_cairne_bloodhoof; + newscript->pGossipSelect = &GossipSelect_npc_cairne_bloodhoof; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/ungoro_crater.cpp b/scripts/kalimdor/ungoro_crater.cpp new file mode 100644 index 000000000..cfee0c79e --- /dev/null +++ b/scripts/kalimdor/ungoro_crater.cpp @@ -0,0 +1,345 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Ungoro_Crater +SD%Complete: 100 +SDComment: Quest support: 4245, 4491 +SDCategory: Un'Goro Crater +EndScriptData */ + +/* ContentData +npc_ringo +EndContentData */ + +#include "precompiled.h" +#include "escort_ai.h" +#include "follower_ai.h" + +/*###### +## npc_ame01 +######*/ + +enum +{ + SAY_AME_START = -1000446, + SAY_AME_PROGRESS = -1000447, + SAY_AME_END = -1000448, + SAY_AME_AGGRO1 = -1000449, + SAY_AME_AGGRO2 = -1000450, + SAY_AME_AGGRO3 = -1000451, + + QUEST_CHASING_AME = 4245 +}; + +struct MANGOS_DLL_DECL npc_ame01AI : public npc_escortAI +{ + npc_ame01AI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } + + void Reset() { } + + void WaypointReached(uint32 uiPointId) + { + switch(uiPointId) + { + case 0: + DoScriptText(SAY_AME_START, m_creature); + break; + case 19: + DoScriptText(SAY_AME_PROGRESS, m_creature); + break; + case 37: + DoScriptText(SAY_AME_END, m_creature); + if (Player* pPlayer = GetPlayerForEscort()) + pPlayer->GroupEventHappens(QUEST_CHASING_AME, m_creature); + break; + } + } + + void Aggro(Unit* pWho) + { + if (pWho->GetTypeId() == TYPEID_PLAYER) + return; + + if (Player* pPlayer = GetPlayerForEscort()) + { + if (pPlayer->getVictim() && pPlayer->getVictim() == pWho) + return; + + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_AME_AGGRO1, m_creature); break; + case 1: DoScriptText(SAY_AME_AGGRO2, m_creature); break; + case 2: DoScriptText(SAY_AME_AGGRO3, m_creature); break; + } + } + } +}; + +bool QuestAccept_npc_ame01(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_CHASING_AME) + { + if (npc_ame01AI* pAmeAI = dynamic_cast(pCreature->AI())) + { + pCreature->SetStandState(UNIT_STAND_STATE_STAND); + + if (pPlayer->GetTeam() == ALLIANCE) + pCreature->setFaction(FACTION_ESCORT_A_PASSIVE); + else if (pPlayer->GetTeam() == HORDE) + pCreature->setFaction(FACTION_ESCORT_H_PASSIVE); + + pAmeAI->Start(false, false, pPlayer->GetGUID(), pQuest); + } + } + return true; +} + +CreatureAI* GetAI_npc_ame01(Creature* pCreature) +{ + return new npc_ame01AI(pCreature); +} + +/*#### +# npc_ringo +####*/ + +enum +{ + 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, + SAY_SPR_END_7 = -1000432, + EMOTE_RIN_END_8 = -1000433, + + SPELL_REVIVE_RINGO = 15591, + QUEST_A_LITTLE_HELP = 4491, + NPC_SPRAGGLE = 9997 +}; + +struct MANGOS_DLL_DECL npc_ringoAI : public FollowerAI +{ + npc_ringoAI(Creature* pCreature) : FollowerAI(pCreature) { Reset(); } + + uint32 m_uiFaintTimer; + uint32 m_uiEndEventProgress; + uint32 m_uiEndEventTimer; + + Unit* pSpraggle; + + void Reset() + { + m_uiFaintTimer = urand(30000, 60000); + m_uiEndEventProgress = 0; + m_uiEndEventTimer = 1000; + pSpraggle = NULL; + } + + void MoveInLineOfSight(Unit *pWho) + { + FollowerAI::MoveInLineOfSight(pWho); + + if (!m_creature->getVictim() && !HasFollowState(STATE_FOLLOW_COMPLETE) && pWho->GetEntry() == NPC_SPRAGGLE) + { + if (m_creature->IsWithinDistInMap(pWho, INTERACTION_DISTANCE)) + { + if (Player* pPlayer = GetLeaderForFollower()) + { + if (pPlayer->GetQuestStatus(QUEST_A_LITTLE_HELP) == QUEST_STATUS_INCOMPLETE) + pPlayer->GroupEventHappens(QUEST_A_LITTLE_HELP, m_creature); + } + + pSpraggle = pWho; + SetFollowComplete(true); + } + } + } + + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + { + if (HasFollowState(STATE_FOLLOW_INPROGRESS | STATE_FOLLOW_PAUSED) && pSpell->Id == SPELL_REVIVE_RINGO) + ClearFaint(); + } + + void SetFaint() + { + if (!HasFollowState(STATE_FOLLOW_POSTEVENT)) + { + SetFollowPaused(true); + + switch(urand(0, 3)) + { + case 0: DoScriptText(SAY_FAINT_1, m_creature); break; + case 1: DoScriptText(SAY_FAINT_2, m_creature); break; + case 2: DoScriptText(SAY_FAINT_3, m_creature); break; + case 3: DoScriptText(SAY_FAINT_4, m_creature); break; + } + } + + //what does actually happen here? Emote? Aura? + m_creature->SetStandState(UNIT_STAND_STATE_SLEEP); + } + + void ClearFaint() + { + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + + if (HasFollowState(STATE_FOLLOW_POSTEVENT)) + return; + + switch(urand(0, 3)) + { + case 0: DoScriptText(SAY_WAKE_1, m_creature); break; + case 1: DoScriptText(SAY_WAKE_2, m_creature); break; + case 2: DoScriptText(SAY_WAKE_3, m_creature); break; + case 3: DoScriptText(SAY_WAKE_4, m_creature); break; + } + + SetFollowPaused(false); + } + + void UpdateFollowerAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + { + if (HasFollowState(STATE_FOLLOW_POSTEVENT)) + { + if (m_uiEndEventTimer < uiDiff) + { + if (!pSpraggle || !pSpraggle->isAlive()) + { + SetFollowComplete(); + return; + } + + switch(m_uiEndEventProgress) + { + case 1: + DoScriptText(SAY_RIN_END_1, m_creature); + m_uiEndEventTimer = 3000; + break; + case 2: + DoScriptText(SAY_SPR_END_2, pSpraggle); + m_uiEndEventTimer = 5000; + break; + case 3: + DoScriptText(SAY_RIN_END_3, m_creature); + m_uiEndEventTimer = 1000; + break; + case 4: + DoScriptText(EMOTE_RIN_END_4, m_creature); + SetFaint(); + m_uiEndEventTimer = 9000; + break; + case 5: + DoScriptText(EMOTE_RIN_END_5, m_creature); + ClearFaint(); + m_uiEndEventTimer = 1000; + break; + case 6: + DoScriptText(SAY_RIN_END_6, m_creature); + m_uiEndEventTimer = 3000; + break; + case 7: + DoScriptText(SAY_SPR_END_7, pSpraggle); + m_uiEndEventTimer = 10000; + break; + case 8: + DoScriptText(EMOTE_RIN_END_8, m_creature); + m_uiEndEventTimer = 5000; + break; + case 9: + SetFollowComplete(); + break; + } + + ++m_uiEndEventProgress; + } + else + m_uiEndEventTimer -= uiDiff; + } + else if (HasFollowState(STATE_FOLLOW_INPROGRESS)) + { + if (!HasFollowState(STATE_FOLLOW_PAUSED)) + { + if (m_uiFaintTimer < uiDiff) + { + SetFaint(); + m_uiFaintTimer = urand(60000, 120000); + } + else + m_uiFaintTimer -= uiDiff; + } + } + + return; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_ringo(Creature* pCreature) +{ + return new npc_ringoAI(pCreature); +} + +bool QuestAccept_npc_ringo(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_A_LITTLE_HELP) + { + if (npc_ringoAI* pRingoAI = dynamic_cast(pCreature->AI())) + { + pCreature->SetStandState(UNIT_STAND_STATE_STAND); + pRingoAI->StartFollow(pPlayer, FACTION_ESCORT_N_FRIEND_PASSIVE, pQuest); + } + } + + return true; +} + +void AddSC_ungoro_crater() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_ame01"; + newscript->GetAI = &GetAI_npc_ame01; + newscript->pQuestAccept = &QuestAccept_npc_ame01; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_ringo"; + newscript->GetAI = &GetAI_npc_ringo; + newscript->pQuestAccept = &QuestAccept_npc_ringo; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp b/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp new file mode 100644 index 000000000..fc3aa646e --- /dev/null +++ b/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp @@ -0,0 +1,24 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance_Wailing_Caverns +SD%Complete: 0 +SDComment: Placeholder +SDCategory: Wailing Caverns +EndScriptData */ + +#include "precompiled.h" diff --git a/scripts/kalimdor/winterspring.cpp b/scripts/kalimdor/winterspring.cpp new file mode 100644 index 000000000..ccae94e9a --- /dev/null +++ b/scripts/kalimdor/winterspring.cpp @@ -0,0 +1,157 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Winterspring +SD%Complete: 90 +SDComment: Quest support: 5126 (Loraxs' tale missing proper gossip items text). Vendor Rivern Frostwind. Obtain Cache of Mau'ari +SDCategory: Winterspring +EndScriptData */ + +/* ContentData +npc_lorax +npc_rivern_frostwind +npc_witch_doctor_mauari +EndContentData */ + +#include "precompiled.h" + +/*###### +## npc_lorax +######*/ + +bool GossipHello_npc_lorax(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestStatus(5126) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Talk to me", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_lorax(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What do you do here?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->SEND_GOSSIP_MENU(3759, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I can help you", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->SEND_GOSSIP_MENU(3760, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What deal?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->SEND_GOSSIP_MENU(3761, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+3: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Then what happened?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->SEND_GOSSIP_MENU(3762, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+4: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "He is not safe, i'll make sure of that.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->SEND_GOSSIP_MENU(3763, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+5: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->AreaExploredOrEventHappens(5126); + break; + } + return true; +} + +/*###### +## npc_rivern_frostwind +######*/ + +bool GossipHello_npc_rivern_frostwind(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pCreature->isVendor() && pPlayer->GetReputationRank(589) == REP_EXALTED) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_rivern_frostwind(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_TRADE) + pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + + return true; +} + +/*###### +## npc_witch_doctor_mauari +######*/ + +bool GossipHello_npc_witch_doctor_mauari(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestRewardStatus(975)) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I'd like you to make me a new Cache of Mau'ari please.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(3377, pCreature->GetGUID()); + }else + pPlayer->SEND_GOSSIP_MENU(3375, pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_witch_doctor_mauari(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction==GOSSIP_ACTION_INFO_DEF+1) + { + pPlayer->CLOSE_GOSSIP_MENU(); + pCreature->CastSpell(pPlayer, 16351, false); + } + + return true; +} + +void AddSC_winterspring() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_lorax"; + newscript->pGossipHello = &GossipHello_npc_lorax; + newscript->pGossipSelect = &GossipSelect_npc_lorax; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_rivern_frostwind"; + newscript->pGossipHello = &GossipHello_npc_rivern_frostwind; + newscript->pGossipSelect = &GossipSelect_npc_rivern_frostwind; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_witch_doctor_mauari"; + newscript->pGossipHello = &GossipHello_npc_witch_doctor_mauari; + newscript->pGossipSelect = &GossipSelect_npc_witch_doctor_mauari; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/zulfarrak/zulfarrak.cpp b/scripts/kalimdor/zulfarrak/zulfarrak.cpp new file mode 100644 index 000000000..e9fd49a38 --- /dev/null +++ b/scripts/kalimdor/zulfarrak/zulfarrak.cpp @@ -0,0 +1,224 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Zulfarrak +SD%Complete: 50 +SDComment: Consider it temporary, no instance script made for this instance yet. +SDCategory: Zul'Farrak +EndScriptData */ + +/* ContentData +npc_sergeant_bly +npc_weegli_blastfuse +EndContentData */ + +#include "precompiled.h" + +/*###### +## npc_sergeant_bly +######*/ + +#define FACTION_HOSTILE 14 +#define FACTION_FRIENDLY 35 + +#define SPELL_SHIELD_BASH 11972 +#define SPELL_REVENGE 12170 + +#define GOSSIP_BLY "[PH] In that case, i will take my reward!" + +struct MANGOS_DLL_DECL npc_sergeant_blyAI : public ScriptedAI +{ + npc_sergeant_blyAI(Creature* pCreature) : ScriptedAI(pCreature) + { + //m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + //ScriptedInstance* m_pInstance; + + uint32 ShieldBash_Timer; + uint32 Revenge_Timer; //this is wrong, spell should never be used unless m_creature->getVictim() dodge, parry or block attack. Mangos support required. + + void Reset() + { + ShieldBash_Timer = 5000; + Revenge_Timer = 8000; + + m_creature->setFaction(FACTION_FRIENDLY); + + /*if (m_pInstance) + m_pInstance->SetData(0, NOT_STARTED);*/ + } + + void Aggro(Unit *who) + { + /*if (m_pInstance) + m_pInstance->SetData(0, IN_PROGRESS);*/ + } + + void JustDied(Unit *victim) + { + /*if (m_pInstance) + m_pInstance->SetData(0, DONE);*/ + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (ShieldBash_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_SHIELD_BASH); + ShieldBash_Timer = 15000; + }else ShieldBash_Timer -= diff; + + if (Revenge_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_REVENGE); + Revenge_Timer = 10000; + }else Revenge_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_npc_sergeant_bly(Creature* pCreature) +{ + return new npc_sergeant_blyAI(pCreature); +} + +bool GossipHello_npc_sergeant_bly(Player* pPlayer, Creature* pCreature) +{ + /*if (m_pInstance->GetData(0) == DONE) + {*/ + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_BLY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(1517, pCreature->GetGUID()); + /*} + else if (m_pInstance->GetData(0) == IN_PROGRESS) + pPlayer->SEND_GOSSIP_MENU(1516, pCreature->GetGUID()); + else + pPlayer->SEND_GOSSIP_MENU(1515, pCreature->GetGUID());*/ + + return true; +} + +bool GossipSelect_npc_sergeant_bly(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + pPlayer->CLOSE_GOSSIP_MENU(); + pCreature->setFaction(FACTION_HOSTILE); + ((npc_sergeant_blyAI*)pCreature->AI())->AttackStart(pPlayer); + } + return true; +} + +/*###### +## npc_weegli_blastfuse +######*/ + +#define SPELL_BOMB 8858 +#define SPELL_GOBLIN_LAND_MINE 21688 +#define SPELL_SHOOT 6660 +#define SPELL_WEEGLIS_BARREL 10772 + +#define GOSSIP_WEEGLI "[PH] Please blow up the door." + +struct MANGOS_DLL_DECL npc_weegli_blastfuseAI : public ScriptedAI +{ + npc_weegli_blastfuseAI(Creature* pCreature) : ScriptedAI(pCreature) + { + //m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + //ScriptedInstance* m_pInstance; + + void Reset() + { + /*if (m_pInstance) + m_pInstance->SetData(0, NOT_STARTED);*/ + } + + void Aggro(Unit *who) + { + /*if (m_pInstance) + m_pInstance->SetData(0, IN_PROGRESS);*/ + } + + void JustDied(Unit *victim) + { + /*if (m_pInstance) + m_pInstance->SetData(0, DONE);*/ + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_npc_weegli_blastfuse(Creature* pCreature) +{ + return new npc_weegli_blastfuseAI(pCreature); +} + +bool GossipHello_npc_weegli_blastfuse(Player* pPlayer, Creature* pCreature) +{ + //event not implemented yet, this is only placeholder for future developement + /*if (m_pInstance->GetData(0) == DONE) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_WEEGLI, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(1514, pCreature->GetGUID());//if event can proceed to end + } + else if (m_pInstance->GetData(0) == IN_PROGRESS) + pPlayer->SEND_GOSSIP_MENU(1513, pCreature->GetGUID());//if event are in progress + else*/ + pPlayer->SEND_GOSSIP_MENU(1511, pCreature->GetGUID()); //if event not started + return true; +} + +bool GossipSelect_npc_weegli_blastfuse(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + pPlayer->CLOSE_GOSSIP_MENU(); + //here we make him run to door, set the charge and run away off to nowhere + } + return true; +} + +void AddSC_zulfarrak() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_sergeant_bly"; + newscript->GetAI = &GetAI_npc_sergeant_bly; + newscript->pGossipHello = &GossipHello_npc_sergeant_bly; + newscript->pGossipSelect = &GossipSelect_npc_sergeant_bly; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_weegli_blastfuse"; + newscript->GetAI = &GetAI_npc_weegli_blastfuse; + newscript->pGossipHello = &GossipHello_npc_weegli_blastfuse; + newscript->pGossipSelect = &GossipSelect_npc_weegli_blastfuse; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h b/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h new file mode 100644 index 000000000..66c52b1cb --- /dev/null +++ b/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h @@ -0,0 +1,33 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_AHNKAHET_H +#define DEF_AHNKAHET_H +/* Encounters + * Elder Nadox = 1 + * Prince Taldram = 2 + * Jedoga Shadowseeker = 3 + * Herald Volazj = 4 + * Amanitar = 5 +*/ +enum +{ + MAX_ENCOUNTER = 5, + + TYPE_NADOX = 0, + TYPE_TALDARAM = 1, + TYPE_JEDOGA = 2, + TYPE_VOLAZJ = 3, + TYPE_AMANITAR = 4, + + GO_DOOR_TALDARAM = 192236, + GO_ANCIENT_DEVICE_L = 193093, + GO_ANCIENT_DEVICE_R = 193094, + GO_VORTEX = 193564, + + NPC_ELDER_NADOX = 29309, + NPC_JEDOGA_SHADOWSEEKER = 29310 +}; + +#endif diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp new file mode 100644 index 000000000..6f1ea7b54 --- /dev/null +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp @@ -0,0 +1,109 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Jedoga +SD%Complete: 20% +SDComment: +SDCategory: Ahn'kahet +EndScriptData */ + +#include "precompiled.h" + +enum +{ + SAY_AGGRO = -1619017, + SAY_CALL_SACRIFICE_1 = -1619018, + SAY_CALL_SACRIFICE_2 = -1619019, + SAY_SACRIFICE_1 = -1619020, + SAY_SACRIFICE_2 = -1619021, + SAY_SLAY_1 = -1619022, + SAY_SLAY_2 = -1619023, + SAY_SLAY_3 = -1619024, + SAY_DEATH = -1619025, + SAY_PREACHING_1 = -1619026, + SAY_PREACHING_2 = -1619027, + SAY_PREACHING_3 = -1619028, + SAY_PREACHING_4 = -1619029, + SAY_PREACHING_5 = -1619030, + + SAY_VOLUNTEER_1 = -1619031, //said by the volunteer image + SAY_VOLUNTEER_2 = -1619032 +}; + +/*###### +## boss_jedoga +######*/ + +struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI +{ + boss_jedogaAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + void Reset() + { + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void KilledUnit(Unit* pVictim) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_SLAY_1, m_creature); break; + case 1: DoScriptText(SAY_SLAY_2, m_creature); break; + case 2: DoScriptText(SAY_SLAY_3, m_creature); break; + } + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_jedoga(Creature* pCreature) +{ + return new boss_jedogaAI(pCreature); +} + +void AddSC_boss_jedoga() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_jedoga"; + newscript->GetAI = &GetAI_boss_jedoga; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp new file mode 100644 index 000000000..8f6654e08 --- /dev/null +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp @@ -0,0 +1,100 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Nadox +SD%Complete: 20% +SDComment: +SDCategory: Ahn'kahet +EndScriptData */ + +#include "precompiled.h" + +enum +{ + SAY_AGGRO = -1619000, + SAY_SUMMON_EGG_1 = -1619001, + SAY_SUMMON_EGG_2 = -1619002, + SAY_SLAY_1 = -1619003, + SAY_SLAY_2 = -1619004, + SAY_SLAY_3 = -1619005, + SAY_DEATH = -1619006, + EMOTE_HATCH = -1619007 +}; + +/*###### +## boss_nadox +######*/ + +struct MANGOS_DLL_DECL boss_nadoxAI : public ScriptedAI +{ + boss_nadoxAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + void Reset() + { + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void KilledUnit(Unit* pVictim) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_SLAY_1, m_creature); break; + case 1: DoScriptText(SAY_SLAY_2, m_creature); break; + case 2: DoScriptText(SAY_SLAY_3, m_creature); break; + } + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_nadox(Creature* pCreature) +{ + return new boss_nadoxAI(pCreature); +} + +void AddSC_boss_nadox() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_nadox"; + newscript->GetAI = &GetAI_boss_nadox; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp new file mode 100644 index 000000000..a30150aa3 --- /dev/null +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp @@ -0,0 +1,126 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Taldaram +SD%Complete: 20% +SDComment: +SDCategory: Ahn'kahet +EndScriptData */ + +#include "precompiled.h" +#include "ahnkahet.h" + +enum +{ + SAY_AGGRO = -1619008, + SAY_VANISH_1 = -1619009, + SAY_VANISH_2 = -1619010, + SAY_FEED_1 = -1619011, + SAY_FEED_2 = -1619012, + SAY_SLAY_1 = -1619013, + SAY_SLAY_2 = -1619014, + SAY_SLAY_3 = -1619015, + SAY_DEATH = -1619016 +}; + +/*###### +## boss_taldaram +######*/ + +struct MANGOS_DLL_DECL boss_taldaramAI : public ScriptedAI +{ + boss_taldaramAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + void Reset() + { + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void KilledUnit(Unit* pVictim) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_SLAY_1, m_creature); break; + case 1: DoScriptText(SAY_SLAY_2, m_creature); break; + case 2: DoScriptText(SAY_SLAY_3, m_creature); break; + } + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_TALDARAM, DONE); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_taldaram(Creature* pCreature) +{ + return new boss_taldaramAI(pCreature); +} + +/*###### +## go_nerubian_device +######*/ + +bool GOHello_go_nerubian_device(Player* pPlayer, GameObject* pGo) +{ + ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData(); + + if (!pInstance) + return false; + + pInstance->SetData(TYPE_TALDARAM, SPECIAL); + pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + return false; +} + +void AddSC_boss_taldaram() +{ + Script* newscript; + + newscript = new Script; + newscript->Name = "boss_taldaram"; + newscript->GetAI = &GetAI_boss_taldaram; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "go_nerubian_device"; + newscript->pGOHello = &GOHello_go_nerubian_device; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp new file mode 100644 index 000000000..74bd9f55e --- /dev/null +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp @@ -0,0 +1,100 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Volazj +SD%Complete: 20% +SDComment: +SDCategory: Ahn'kahet +EndScriptData */ + +#include "precompiled.h" + +//TODO: fill in texts in database. Also need to add text for whisper. +enum +{ + SAY_AGGRO = -1619033, + SAY_INSANITY = -1619034, + SAY_SLAY_1 = -1619035, + SAY_SLAY_2 = -1619036, + SAY_SLAY_3 = -1619037, + SAY_DEATH_1 = -1619038, + SAY_DEATH_2 = -1619039 +}; + +/*###### +## boss_volazj +######*/ + +struct MANGOS_DLL_DECL boss_volazjAI : public ScriptedAI +{ + boss_volazjAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + void Reset() + { + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void KilledUnit(Unit* pVictim) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_SLAY_1, m_creature); break; + case 1: DoScriptText(SAY_SLAY_2, m_creature); break; + case 2: DoScriptText(SAY_SLAY_3, m_creature); break; + } + } + + void JustDied(Unit* pKiller) + { + DoScriptText(urand(0, 1) ? SAY_DEATH_1 : SAY_DEATH_2, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_volazj(Creature* pCreature) +{ + return new boss_volazjAI(pCreature); +} + +void AddSC_boss_volazj() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_volazj"; + newscript->GetAI = &GetAI_boss_volazj; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp new file mode 100644 index 000000000..1988bd028 --- /dev/null +++ b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp @@ -0,0 +1,206 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: instance_ahnkahet +SD%Complete: 0 +SDComment: +SDCategory: Ahn'kahet +EndScriptData */ + +#include "precompiled.h" +#include "ahnkahet.h" + +struct MANGOS_DLL_DECL instance_ahnkahet : public ScriptedInstance +{ + instance_ahnkahet(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string strInstData; + + uint64 m_uiElderNadoxGUID; + uint64 m_uiJedogaShadowseekerGUID; + uint64 m_uiTaldaramDoorGUID; + uint64 m_uiTaldaramVortexGUID; + uint8 m_uiDevicesActivated; + + void Initialize() + { + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + + m_uiElderNadoxGUID = 0; + m_uiJedogaShadowseekerGUID = 0; + m_uiTaldaramDoorGUID = 0; + m_uiTaldaramVortexGUID = 0; + m_uiDevicesActivated = 0; + } + + void OnCreatureCreate(Creature* pCreature) + { + switch(pCreature->GetEntry()) + { + case NPC_ELDER_NADOX: m_uiElderNadoxGUID = pCreature->GetGUID(); break; + case NPC_JEDOGA_SHADOWSEEKER: m_uiJedogaShadowseekerGUID = pCreature->GetGUID(); break; + } + } + + void OnObjectCreate(GameObject* pGo) + { + switch(pGo->GetEntry()) + { + case GO_DOOR_TALDARAM: + m_uiTaldaramDoorGUID = pGo->GetGUID(); + if (m_auiEncounter[1] == DONE) + DoUseDoorOrButton(m_uiTaldaramDoorGUID); + break; + case GO_ANCIENT_DEVICE_L: + if (m_auiEncounter[1] == NOT_STARTED) + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + break; + case GO_ANCIENT_DEVICE_R: + if (m_auiEncounter[1] == NOT_STARTED) + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + break; + case GO_VORTEX: + m_uiTaldaramVortexGUID = pGo->GetGUID(); + if (m_auiEncounter[1] != NOT_STARTED) + DoUseDoorOrButton(m_uiTaldaramVortexGUID); + break; + } + } + + void SetData(uint32 uiType, uint32 uiData) + { + debug_log("SD2: Instance Ahn'Kahet: SetData received for type %u with data %u",uiType,uiData); + + switch(uiType) + { + case TYPE_NADOX: + m_auiEncounter[0] = uiData; + break; + case TYPE_TALDARAM: + if (uiData == SPECIAL) + { + if (m_uiDevicesActivated < 2) + ++m_uiDevicesActivated; + + if (m_uiDevicesActivated == 2) + { + m_auiEncounter[1] = uiData; + DoUseDoorOrButton(m_uiTaldaramVortexGUID); + } + } + if (uiData == DONE) + { + m_auiEncounter[1] = uiData; + DoUseDoorOrButton(m_uiTaldaramDoorGUID); + } + break; + case TYPE_JEDOGA: + m_auiEncounter[2] = uiData; + break; + case TYPE_VOLAZJ: + m_auiEncounter[3] = uiData; + break; + case TYPE_AMANITAR: + m_auiEncounter[4] = uiData; + break; + default: + error_log("SD2: Instance Ahn'Kahet: ERROR SetData = %u for type %u does not exist/not implemented.",uiType,uiData); + break; + } + + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3] + << " " << m_auiEncounter[4]; + + strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } + } + + const char* Save() + { + return strInstData.c_str(); + } + + void Load(const char* chrIn) + { + if (!chrIn) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(chrIn); + + std::istringstream loadStream(chrIn); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] >> m_auiEncounter[4]; + + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; + } + + OUT_LOAD_INST_DATA_COMPLETE; + } + + uint32 GetData(uint32 uiType) + { + switch(uiType) + { + case TYPE_TALDARAM: + return m_auiEncounter[0]; + case TYPE_JEDOGA: + return m_auiEncounter[1]; + } + return 0; + } + + uint64 GetData64(uint32 uiData) + { + switch(uiData) + { + case NPC_ELDER_NADOX: + return m_uiElderNadoxGUID; + case NPC_JEDOGA_SHADOWSEEKER: + return m_uiJedogaShadowseekerGUID; + } + return 0; + } +}; + +InstanceData* GetInstanceData_instance_ahnkahet(Map* pMap) +{ + return new instance_ahnkahet(pMap); +} + +void AddSC_instance_ahnkahet() +{ + Script* newscript; + + newscript = new Script; + newscript->Name = "instance_ahnkahet"; + newscript->GetInstanceData = &GetInstanceData_instance_ahnkahet; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h b/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h new file mode 100644 index 000000000..56d4eec81 --- /dev/null +++ b/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h @@ -0,0 +1,22 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_AZJOL_NERUB_H +#define DEF_AZJOL_NERUB_H + +enum +{ + MAX_ENCOUNTER = 3, + + TYPE_KRIKTHIR = 1, + TYPE_HADRONOX = 2, + TYPE_ANUBARAK = 3, + + GO_DOOR_KRIKTHIR = 192395, + GO_DOOR_ANUBARAK_1 = 192396, + GO_DOOR_ANUBARAK_2 = 192397, + GO_DOOR_ANUBARAK_3 = 192398 +}; + +#endif diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp new file mode 100644 index 000000000..cf32257c9 --- /dev/null +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp @@ -0,0 +1,104 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Anubarak +SD%Complete: 20% +SDComment: +SDCategory: Azjol'Nerub +EndScriptData */ + +#include "precompiled.h" +#include "azjol-nerub.h" + +enum +{ + SAY_INTRO = -1601014, + SAY_AGGRO = -1601015, + SAY_KILL_1 = -1601016, + SAY_KILL_2 = -1601017, + SAY_KILL_3 = -1601018, + SAY_SUBMERGE_1 = -1601019, + SAY_SUBMERGE_2 = -1601020, + SAY_LOCUST_1 = -1601021, + SAY_LOCUST_2 = -1601022, + SAY_LOCUST_3 = -1601023, + SAY_DEATH = -1601024 +}; + +/*###### +## boss_anubarak +######*/ + +struct MANGOS_DLL_DECL boss_anubarakAI : public ScriptedAI +{ + boss_anubarakAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + void Reset() + { + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void KilledUnit(Unit* pVictim) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_KILL_1, m_creature); break; + case 1: DoScriptText(SAY_KILL_2, m_creature); break; + case 2: DoScriptText(SAY_KILL_3, m_creature); break; + } + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_anubarak(Creature* pCreature) +{ + return new boss_anubarakAI(pCreature); +} + +void AddSC_boss_anubarak() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_anubarak"; + newscript->GetAI = &GetAI_boss_anubarak; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp new file mode 100644 index 000000000..beac1a499 --- /dev/null +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp @@ -0,0 +1,79 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Hadronox +SD%Complete: 20% +SDComment: +SDCategory: Azjol'Nerub +EndScriptData */ + +#include "precompiled.h" +#include "azjol-nerub.h" + +enum +{ + +}; + +/*###### +## boss_hadronox +######*/ + +struct MANGOS_DLL_DECL boss_hadronoxAI : public ScriptedAI +{ + boss_hadronoxAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + void Reset() + { + } + + void KilledUnit(Unit* pVictim) + { + m_creature->SetHealth(m_creature->GetHealth() + (m_creature->GetMaxHealth() * 0.1)); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_hadronox(Creature* pCreature) +{ + return new boss_hadronoxAI(pCreature); +} + +void AddSC_boss_hadronox() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_hadronox"; + newscript->GetAI = &GetAI_boss_hadronox; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp new file mode 100644 index 000000000..d30c91b2f --- /dev/null +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp @@ -0,0 +1,107 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Krikthir +SD%Complete: 20% +SDComment: +SDCategory: Azjol'Nerub +EndScriptData */ + +#include "precompiled.h" +#include "azjol-nerub.h" + +enum +{ + SAY_AGGRO = -1601000, + SAY_KILL_1 = -1601001, + SAY_KILL_2 = -1601002, + SAY_KILL_3 = -1601003, + SAY_SEND_GROUP_1 = -1601004, + SAY_SEND_GROUP_2 = -1601005, + SAY_SEND_GROUP_3 = -1601006, + SAY_PREFIGHT_1 = -1601007, + SAY_PREFIGHT_2 = -1601008, + SAY_PREFIGHT_3 = -1601009, + SAY_SWARM_1 = -1601010, + SAY_SWARM_2 = -1601011, + SAY_DEATH = -1601012, + EMOTE_BOSS_GENERIC_FRENZY = -1000005 +}; + +/*###### +## boss_krikthir +######*/ + +struct MANGOS_DLL_DECL boss_krikthirAI : public ScriptedAI +{ + boss_krikthirAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + void Reset() + { + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void KilledUnit(Unit* pVictim) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_KILL_1, m_creature); break; + case 1: DoScriptText(SAY_KILL_2, m_creature); break; + case 2: DoScriptText(SAY_KILL_3, m_creature); break; + } + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_krikthir(Creature* pCreature) +{ + return new boss_krikthirAI(pCreature); +} + +void AddSC_boss_krikthir() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_krikthir"; + newscript->GetAI = &GetAI_boss_krikthir; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp new file mode 100644 index 000000000..c8c3b9a77 --- /dev/null +++ b/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp @@ -0,0 +1,166 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance_Azjol-Nerub +SD%Complete: 50 +SDComment: +SDCategory: Azjol-Nerub +EndScriptData */ + +#include "precompiled.h" +#include "azjol-nerub.h" + +struct MANGOS_DLL_DECL instance_azjol_nerub : public ScriptedInstance +{ + instance_azjol_nerub(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string strInstData; + + uint64 m_uiDoor_KrikthirGUID; + uint64 m_uiDoor_Anubarak_1GUID; + uint64 m_uiDoor_Anubarak_2GUID; + uint64 m_uiDoor_Anubarak_3GUID; + + void Initialize() + { + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + + m_uiDoor_KrikthirGUID = 0; + m_uiDoor_Anubarak_1GUID = 0; + m_uiDoor_Anubarak_2GUID = 0; + m_uiDoor_Anubarak_3GUID = 0; + } + + void OnObjectCreate(GameObject* pGo) + { + switch(pGo->GetEntry()) + { + case GO_DOOR_KRIKTHIR: + m_uiDoor_KrikthirGUID = pGo->GetGUID(); + if (m_auiEncounter[0] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_DOOR_ANUBARAK_1: + m_uiDoor_Anubarak_1GUID = pGo->GetGUID(); + if (m_auiEncounter[2] == DONE || m_auiEncounter[2] == NOT_STARTED) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_DOOR_ANUBARAK_2: + m_uiDoor_Anubarak_2GUID = pGo->GetGUID(); + if (m_auiEncounter[2] == DONE || m_auiEncounter[2] == NOT_STARTED) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_DOOR_ANUBARAK_3: + m_uiDoor_Anubarak_3GUID = pGo->GetGUID(); + if (m_auiEncounter[2] == DONE || m_auiEncounter[2] == NOT_STARTED) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + } + } + + void SetData(uint32 uiType, uint32 uiData) + { + switch(uiType) + { + case TYPE_KRIKTHIR: + m_auiEncounter[0] = uiData; + if (uiData == DONE) + if (GameObject* pGo = instance->GetGameObject(m_uiDoor_KrikthirGUID)) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case TYPE_HADRONOX: + m_auiEncounter[1] = uiData; + break; + case TYPE_ANUBARAK: + m_auiEncounter[2] = uiData; + if (uiData == DONE || uiData == NOT_STARTED) + { + if (GameObject* pGo = instance->GetGameObject(m_uiDoor_Anubarak_1GUID)) + pGo->SetGoState(GO_STATE_ACTIVE); + if (GameObject* pGo = instance->GetGameObject(m_uiDoor_Anubarak_2GUID)) + pGo->SetGoState(GO_STATE_ACTIVE); + if (GameObject* pGo = instance->GetGameObject(m_uiDoor_Anubarak_3GUID)) + pGo->SetGoState(GO_STATE_ACTIVE); + } + if (uiData == IN_PROGRESS) + { + if (GameObject* pGo = instance->GetGameObject(m_uiDoor_Anubarak_1GUID)) + pGo->SetGoState(GO_STATE_READY); + if (GameObject* pGo = instance->GetGameObject(m_uiDoor_Anubarak_2GUID)) + pGo->SetGoState(GO_STATE_READY); + if (GameObject* pGo = instance->GetGameObject(m_uiDoor_Anubarak_3GUID)) + pGo->SetGoState(GO_STATE_READY); + } + break; + } + + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2]; + + strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } + } + + const char* Save() + { + return strInstData.c_str(); + } + + void Load(const char* in) + { + if (!in) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(in); + + std::istringstream loadStream(in); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2]; + + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; + } + + OUT_LOAD_INST_DATA_COMPLETE; + } +}; + +InstanceData* GetInstanceData_instance_azjol_nerub(Map* pMap) +{ + return new instance_azjol_nerub(pMap); +} + +void AddSC_instance_azjol_nerub() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "instance_azjol-nerub"; + newscript->GetInstanceData = &GetInstanceData_instance_azjol_nerub; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/borean_tundra.cpp b/scripts/northrend/borean_tundra.cpp new file mode 100644 index 000000000..702fb5049 --- /dev/null +++ b/scripts/northrend/borean_tundra.cpp @@ -0,0 +1,289 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Borean_Tundra +SD%Complete: 100 +SDComment: Quest support: 11708, 11692, 11961. Taxi vendors. +SDCategory: Borean Tundra +EndScriptData */ + +/* ContentData +npc_fizzcrank_fullthrottle +npc_iruk +npc_kara_thricestar +npc_surristrasz +npc_tiare +EndContentData */ + +#include "precompiled.h" + +/*###### +## npc_fizzcrank_fullthrottle +######*/ + +#define GOSSIP_ITEM_GO_ON "Go on." +#define GOSSIP_ITEM_TELL_ME "Tell me what's going on out here, Fizzcrank." + +enum +{ + GOSSIP_TEXTID_FIZZCRANK1 = 12456, + GOSSIP_TEXTID_FIZZCRANK2 = 12457, + GOSSIP_TEXTID_FIZZCRANK3 = 12458, + GOSSIP_TEXTID_FIZZCRANK4 = 12459, + GOSSIP_TEXTID_FIZZCRANK5 = 12460, + GOSSIP_TEXTID_FIZZCRANK6 = 12461, + GOSSIP_TEXTID_FIZZCRANK7 = 12462, + GOSSIP_TEXTID_FIZZCRANK8 = 12463, + GOSSIP_TEXTID_FIZZCRANK9 = 12464, + + QUEST_THE_MECHAGNOMES = 11708 +}; + +bool GossipHello_npc_fizzcrank_fullthrottle(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestStatus(QUEST_THE_MECHAGNOMES) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TELL_ME, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_fizzcrank_fullthrottle(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_GO_ON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FIZZCRANK1, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_GO_ON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FIZZCRANK2, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+3: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_GO_ON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FIZZCRANK3, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+4: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_GO_ON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FIZZCRANK4, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+5: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_GO_ON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FIZZCRANK5, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+6: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_GO_ON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FIZZCRANK6, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+7: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_GO_ON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 8); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FIZZCRANK7, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+8: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_GO_ON, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 9); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FIZZCRANK8, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+9: + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FIZZCRANK9, pCreature->GetGUID()); + pPlayer->AreaExploredOrEventHappens(QUEST_THE_MECHAGNOMES); + break; + } + return true; +} + +/*###### +## npc_iruk +######*/ + +#define GOSSIP_ITEM_IRUK "" + +enum +{ + QUEST_SPIRITS_WATCH_OVER_US = 11961, + SPELL_CREATE_TOTEM = 46816 +}; + +bool GossipHello_npc_iruk(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->GetQuestStatus(QUEST_SPIRITS_WATCH_OVER_US) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_IRUK, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_iruk(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) + { + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->CastSpell(pPlayer,SPELL_CREATE_TOTEM,true); + } + + return true; +} + +/*###### +## npc_kara_thricestar +######*/ + +#define GOSSIP_ITEM_THRICESTAR1 "Do you think I could take a ride on one of those flying machines?" +#define GOSSIP_ITEM_THRICESTAR2 "Kara, I need to be flown out the Dens of Dying to find Bixie." + +enum +{ + QUEST_CHECK_IN_WITH_BIXIE = 11692, + SPELL_FIZZCRANK_AIRSTRIP = 51446 +}; + +bool GossipHello_npc_kara_thricestar(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isTaxi()) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, GOSSIP_ITEM_THRICESTAR1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + + if (pPlayer->GetQuestStatus(QUEST_CHECK_IN_WITH_BIXIE) == QUEST_STATUS_COMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_THRICESTAR2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_kara_thricestar(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: + pPlayer->GetSession()->SendTaxiMenu(pCreature); + break; + case GOSSIP_ACTION_INFO_DEF + 2: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->CastSpell(pPlayer, SPELL_FIZZCRANK_AIRSTRIP, false); + break; + } + + return true; +} + +/*###### +## npc_surristrasz +######*/ + +#define GOSSIP_ITEM_FREE_FLIGHT "I'd like passage to the Transitus Shield." +#define GOSSIP_ITEM_FLIGHT "May I use a drake to fly elsewhere?" + +enum +{ + SPELL_ABMER_TO_COLDARRA = 46064 +}; + +bool GossipHello_npc_surristrasz(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pCreature->isTaxi()) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FREE_FLIGHT, GOSSIP_SENDER_MAIN, GOSSIP_OPTION_GOSSIP); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, GOSSIP_ITEM_FLIGHT, GOSSIP_SENDER_MAIN, GOSSIP_OPTION_TAXIVENDOR); + } + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_surristrasz(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_OPTION_GOSSIP) + { + pPlayer->CLOSE_GOSSIP_MENU(); + + //TaxiPath 795 (amber to coldarra) + pPlayer->CastSpell(pPlayer, SPELL_ABMER_TO_COLDARRA, true); + } + + if (uiAction == GOSSIP_OPTION_TAXIVENDOR) + pPlayer->GetSession()->SendTaxiMenu(pCreature); + + return true; +} + +/*###### +## npc_tiare +######*/ + +#define GOSSIP_ITEM_TELEPORT "Teleport me to Amber Ledge, please." + +enum +{ + SPELL_TELEPORT_COLDARRA = 50135 +}; + +bool GossipHello_npc_tiare(Player* pPlayer, Creature* pCreature) +{ + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TELEPORT, GOSSIP_SENDER_MAIN, GOSSIP_OPTION_GOSSIP); + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_tiare(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_OPTION_GOSSIP) + { + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->CastSpell(pPlayer, SPELL_TELEPORT_COLDARRA, true); + } + return true; +} + +void AddSC_borean_tundra() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_fizzcrank_fullthrottle"; + newscript->pGossipHello = &GossipHello_npc_fizzcrank_fullthrottle; + newscript->pGossipSelect = &GossipSelect_npc_fizzcrank_fullthrottle; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_iruk"; + newscript->pGossipHello = &GossipHello_npc_iruk; + newscript->pGossipSelect = &GossipSelect_npc_iruk; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_kara_thricestar"; + newscript->pGossipHello = &GossipHello_npc_kara_thricestar; + newscript->pGossipSelect = &GossipSelect_npc_kara_thricestar; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_surristrasz"; + newscript->pGossipHello = &GossipHello_npc_surristrasz; + newscript->pGossipSelect = &GossipSelect_npc_surristrasz; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_tiare"; + newscript->pGossipHello = &GossipHello_npc_tiare; + newscript->pGossipSelect = &GossipSelect_npc_tiare; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/dalaran.cpp b/scripts/northrend/dalaran.cpp new file mode 100644 index 000000000..7e912db24 --- /dev/null +++ b/scripts/northrend/dalaran.cpp @@ -0,0 +1,72 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Dalaran +SD%Complete: 100 +SDComment: +SDCategory: Dalaran +EndScriptData */ + +/* ContentData +npc_zirdomi +EndContentData */ + +#include "precompiled.h" + +/*###### +## npc_zidormi +######*/ + +#define GOSSIP_ITEM_ZIDORMI1 "Take me to the Caverns of Time." + +enum +{ + SPELL_TELEPORT_COT = 46343, + GOSSIP_TEXTID_ZIDORMI1 = 14066 +}; + +bool GossipHello_npc_zidormi(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->getLevel() >= 65) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ZIDORMI1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + } + else + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ZIDORMI1, pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_zidormi(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + pPlayer->CastSpell(pPlayer,SPELL_TELEPORT_COT,false); + + return true; +} + +void AddSC_dalaran() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_zidormi"; + newscript->pGossipHello = &GossipHello_npc_zidormi; + newscript->pGossipSelect = &GossipSelect_npc_zidormi; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/dragonblight.cpp b/scripts/northrend/dragonblight.cpp new file mode 100644 index 000000000..8f627a8ba --- /dev/null +++ b/scripts/northrend/dragonblight.cpp @@ -0,0 +1,218 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Dragonblight +SD%Complete: 100 +SDComment: Quest support: 12499/12500(end sequenze). Taxi paths Wyrmrest temple. +SDCategory: Dragonblight +EndScriptData */ + +/* ContentData +npc_afrasastrasz +npc_alexstrasza_wr_gate +npc_tariolstrasz +npc_torastrasza +EndContentData */ + +#include "precompiled.h" + +/*###### +## npc_afrasastrasz +######*/ + +enum +{ + TAXI_PATH_ID_MIDDLE_DOWN = 882, + TAXI_PATH_ID_MIDDLE_TOP = 881 +}; + +#define GOSSIP_ITEM_TAXI_MIDDLE_DOWN "I would like to take a flight to the ground, Lord Of Afrasastrasz." +#define GOSSIP_ITEM_TAXI_MIDDLE_TOP "My Lord, I must go to the upper floor of the temple." + +bool GossipHello_npc_afrasastrasz(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TAXI_MIDDLE_DOWN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TAXI_MIDDLE_TOP, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_afrasastrasz(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->ActivateTaxiPathTo(TAXI_PATH_ID_MIDDLE_DOWN); + } + if (uiAction == GOSSIP_ACTION_INFO_DEF+2) + { + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->ActivateTaxiPathTo(TAXI_PATH_ID_MIDDLE_TOP); + } + return true; +} + +/*###### +## npc_alexstrasza_wr_gate +######*/ + +enum +{ + QUEST_RETURN_TO_AG_A = 12499, + QUEST_RETURN_TO_AG_H = 12500, + MOVIE_ID_GATES = 14 +}; + +#define GOSSIP_ITEM_WHAT_HAPPENED "Alexstrasza, can you show me what happened here?" + +bool GossipHello_npc_alexstrasza_wr_gate(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestRewardStatus(QUEST_RETURN_TO_AG_A) || pPlayer->GetQuestRewardStatus(QUEST_RETURN_TO_AG_H)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_WHAT_HAPPENED, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_alexstrasza_wr_gate(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->SendMovieStart(MOVIE_ID_GATES); + } + + return true; +} + +/*###### +## npc_tariolstrasz +######*/ + +enum +{ + QUEST_INFORM_QUEEN_A = 12123, //need to check if quests are required before gossip available + QUEST_INFORM_QUEEN_H = 12124, + TAXI_PATH_ID_BOTTOM_TOP = 878, + TAXI_PATH_ID_BOTTOM_MIDDLE = 883 +}; + +#define GOSSIP_ITEM_TAXI_BOTTOM_TOP "My Lord, I must go to the upper floor of the temple." +#define GOSSIP_ITEM_TAXI_BOTTOM_MIDDLE "Can you spare a drake to travel to Lord Of Afrasastrasz, in the middle of the temple?" + +bool GossipHello_npc_tariolstrasz(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TAXI_BOTTOM_TOP, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TAXI_BOTTOM_MIDDLE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_tariolstrasz(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->ActivateTaxiPathTo(TAXI_PATH_ID_BOTTOM_TOP); + } + if (uiAction == GOSSIP_ACTION_INFO_DEF+2) + { + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->ActivateTaxiPathTo(TAXI_PATH_ID_BOTTOM_MIDDLE); + } + return true; +} + +/*###### +## npc_torastrasza +######*/ + +enum +{ + TAXI_PATH_ID_TOP_MIDDLE = 880, + TAXI_PATH_ID_TOP_BOTTOM = 879 +}; + +#define GOSSIP_ITEM_TAXI_TOP_MIDDLE "I would like to see Lord Of Afrasastrasz, in the middle of the temple." +#define GOSSIP_ITEM_TAXI_TOP_BOTTOM "Yes, Please. I would like to return to the ground floor of the temple." + +bool GossipHello_npc_torastrasza(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TAXI_TOP_MIDDLE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TAXI_TOP_BOTTOM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_torastrasza(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->ActivateTaxiPathTo(TAXI_PATH_ID_TOP_MIDDLE); + } + if (uiAction == GOSSIP_ACTION_INFO_DEF+2) + { + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->ActivateTaxiPathTo(TAXI_PATH_ID_TOP_BOTTOM); + } + return true; +} + +void AddSC_dragonblight() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_afrasastrasz"; + newscript->pGossipHello = &GossipHello_npc_afrasastrasz; + newscript->pGossipSelect = &GossipSelect_npc_afrasastrasz; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_alexstrasza_wr_gate"; + newscript->pGossipHello = &GossipHello_npc_alexstrasza_wr_gate; + newscript->pGossipSelect = &GossipSelect_npc_alexstrasza_wr_gate; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_tariolstrasz"; + newscript->pGossipHello = &GossipHello_npc_tariolstrasz; + newscript->pGossipSelect = &GossipSelect_npc_tariolstrasz; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_torastrasza"; + newscript->pGossipHello = &GossipHello_npc_torastrasza; + newscript->pGossipSelect = &GossipSelect_npc_torastrasza; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/draktharon_keep/boss_novos.cpp b/scripts/northrend/draktharon_keep/boss_novos.cpp new file mode 100644 index 000000000..d49bd15d9 --- /dev/null +++ b/scripts/northrend/draktharon_keep/boss_novos.cpp @@ -0,0 +1,95 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Novos +SD%Complete: 20% +SDComment: +SDCategory: Drak'Tharon Keep +EndScriptData */ + +#include "precompiled.h" + +enum +{ + SAY_AGGRO = -1600005, + SAY_DEATH = -1600006, + SAY_KILL = -1600007, + SAY_ADDS = -1600008, + SAY_BUBBLE_1 = -1600009, + SAY_BUBBLE_2 = -1600010, + + EMOTE_ASSISTANCE = -1600011 +}; + +/*###### +## boss_novos +######*/ + +struct MANGOS_DLL_DECL boss_novosAI : public ScriptedAI +{ + boss_novosAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + void Reset() + { + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(SAY_KILL, m_creature); + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_novos(Creature* pCreature) +{ + return new boss_novosAI(pCreature); +} + +void AddSC_boss_novos() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_novos"; + newscript->GetAI = &GetAI_boss_novos; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/draktharon_keep/boss_tharonja.cpp b/scripts/northrend/draktharon_keep/boss_tharonja.cpp new file mode 100644 index 000000000..411d5042a --- /dev/null +++ b/scripts/northrend/draktharon_keep/boss_tharonja.cpp @@ -0,0 +1,95 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Tharonja +SD%Complete: 20% +SDComment: +SDCategory: Drak'Tharon Keep +EndScriptData */ + +#include "precompiled.h" + +enum +{ + SAY_AGGRO = -1600012, + SAY_KILL_1 = -1600013, + SAY_KILL_2 = -1600014, + SAY_FLESH_1 = -1600015, + SAY_FLESH_2 = -1600016, + SAY_SKELETON_1 = -1600017, + SAY_SKELETON_2 = -1600018, + SAY_DEATH = -1600019 +}; + +/*###### +## boss_tharonja +######*/ + +struct MANGOS_DLL_DECL boss_tharonjaAI : public ScriptedAI +{ + boss_tharonjaAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + void Reset() + { + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_tharonja(Creature* pCreature) +{ + return new boss_tharonjaAI(pCreature); +} + +void AddSC_boss_tharonja() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_tharonja"; + newscript->GetAI = &GetAI_boss_tharonja; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/draktharon_keep/boss_trollgore.cpp b/scripts/northrend/draktharon_keep/boss_trollgore.cpp new file mode 100644 index 000000000..156f1982e --- /dev/null +++ b/scripts/northrend/draktharon_keep/boss_trollgore.cpp @@ -0,0 +1,93 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Trollgore +SD%Complete: 20% +SDComment: +SDCategory: Drak'Tharon Keep +EndScriptData */ + +#include "precompiled.h" + +enum +{ + SAY_AGGRO = -1600000, + SAY_CONSUME = -1600001, + SAY_DEATH = -1600002, + SAY_EXPLODE = -1600003, + SAY_KILL = -1600004 +}; + +/*###### +## boss_trollgore +######*/ + +struct MANGOS_DLL_DECL boss_trollgoreAI : public ScriptedAI +{ + boss_trollgoreAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + void Reset() + { + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void KilledUnit(Unit* pVictim) + { + if (pVictim->GetCharmerOrOwnerPlayerOrPlayerItself()) + DoScriptText(SAY_KILL, m_creature); + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_trollgore(Creature* pCreature) +{ + return new boss_trollgoreAI(pCreature); +} + +void AddSC_boss_trollgore() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_trollgore"; + newscript->GetAI = &GetAI_boss_trollgore; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/grizzly_hills.cpp b/scripts/northrend/grizzly_hills.cpp new file mode 100644 index 000000000..5ffc450f7 --- /dev/null +++ b/scripts/northrend/grizzly_hills.cpp @@ -0,0 +1,126 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Grizzly_Hills +SD%Complete: 80 +SDComment: Quest support: 12247 +SDCategory: Grizzly Hills +EndScriptData */ + +/* ContentData +npc_orsonn_and_kodian +EndContentData */ + +#include "precompiled.h" + +#define GOSSIP_ITEM1 "You're free to go Orsonn, but first tell me what's wrong with the furbolg." +#define GOSSIP_ITEM2 "What happened then?" +#define GOSSIP_ITEM3 "Thank you, Son of Ursoc. I'll see what can be done." +#define GOSSIP_ITEM4 "Who was this stranger?" +#define GOSSIP_ITEM5 "Thank you, Kodian. I'll do what I can." + +enum +{ + GOSSIP_TEXTID_ORSONN1 = 12793, + GOSSIP_TEXTID_ORSONN2 = 12794, + GOSSIP_TEXTID_ORSONN3 = 12796, + + GOSSIP_TEXTID_KODIAN1 = 12797, + GOSSIP_TEXTID_KODIAN2 = 12798, + + NPC_ORSONN = 27274, + NPC_KODIAN = 27275, + + //trigger creatures + NPC_ORSONN_CREDIT = 27322, + NPC_KODIAN_CREDIT = 27321, + + QUEST_CHILDREN_OF_URSOC = 12247 +}; + +bool GossipHello_npc_orsonn_and_kodian(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestStatus(QUEST_CHILDREN_OF_URSOC) == QUEST_STATUS_INCOMPLETE) + { + switch(pCreature->GetEntry()) + { + case NPC_ORSONN: + if (!pPlayer->GetReqKillOrCastCurrentCount(QUEST_CHILDREN_OF_URSOC, NPC_ORSONN_CREDIT)) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ORSONN1, pCreature->GetGUID()); + return true; + } + break; + case NPC_KODIAN: + if (!pPlayer->GetReqKillOrCastCurrentCount(QUEST_CHILDREN_OF_URSOC, NPC_KODIAN_CREDIT)) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_KODIAN1, pCreature->GetGUID()); + return true; + } + break; + } + } + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_orsonn_and_kodian(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ORSONN2, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ORSONN3, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+3: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->TalkedToCreature(NPC_ORSONN_CREDIT, pCreature->GetGUID()); + break; + + case GOSSIP_ACTION_INFO_DEF+4: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_KODIAN2, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+5: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->TalkedToCreature(NPC_KODIAN_CREDIT, pCreature->GetGUID()); + break; + } + + return true; +} + +void AddSC_grizzly_hills() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_orsonn_and_kodian"; + newscript->pGossipHello = &GossipHello_npc_orsonn_and_kodian; + newscript->pGossipSelect = &GossipSelect_npc_orsonn_and_kodian; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/gundrak/boss_colossus.cpp b/scripts/northrend/gundrak/boss_colossus.cpp new file mode 100644 index 000000000..df4137a11 --- /dev/null +++ b/scripts/northrend/gundrak/boss_colossus.cpp @@ -0,0 +1,75 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Colossus +SD%Complete: 20% +SDComment: +SDCategory: Gundrak +EndScriptData */ + +#include "precompiled.h" + +enum +{ + EMOTE_SURGE = -1604008, + EMOTE_SEEP = -1604009, + EMOTE_GLOW = -1604010 +}; + +/*###### +## boss_colossus +######*/ + +struct MANGOS_DLL_DECL boss_colossusAI : public ScriptedAI +{ + boss_colossusAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + void Reset() + { + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_colossus(Creature* pCreature) +{ + return new boss_colossusAI(pCreature); +} + +void AddSC_boss_colossus() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_colossus"; + newscript->GetAI = &GetAI_boss_colossus; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/gundrak/boss_galdarah.cpp b/scripts/northrend/gundrak/boss_galdarah.cpp new file mode 100644 index 000000000..d8be7e5d8 --- /dev/null +++ b/scripts/northrend/gundrak/boss_galdarah.cpp @@ -0,0 +1,102 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Galdarah +SD%Complete: 20% +SDComment: +SDCategory: Gundrak +EndScriptData */ + +#include "precompiled.h" + +enum +{ + SAY_AGGRO = -1604019, + SAY_TRANSFORM_1 = -1604020, + SAY_TRANSFORM_2 = -1604021, + SAY_SUMMON_1 = -1604022, + SAY_SUMMON_2 = -1604023, + SAY_SUMMON_3 = -1604024, + SAY_SLAY_1 = -1604025, + SAY_SLAY_2 = -1604026, + SAY_SLAY_3 = -1604027, + SAY_DEATH = -1604028 +}; + +/*###### +## boss_galdarah +######*/ + +struct MANGOS_DLL_DECL boss_galdarahAI : public ScriptedAI +{ + boss_galdarahAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + void Reset() + { + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void KilledUnit(Unit* pVictim) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_SLAY_1, m_creature); break; + case 1: DoScriptText(SAY_SLAY_2, m_creature); break; + case 2: DoScriptText(SAY_SLAY_3, m_creature); break; + } + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_galdarah(Creature* pCreature) +{ + return new boss_galdarahAI(pCreature); +} + +void AddSC_boss_galdarah() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_galdarah"; + newscript->GetAI = &GetAI_boss_galdarah; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/gundrak/boss_moorabi.cpp b/scripts/northrend/gundrak/boss_moorabi.cpp new file mode 100644 index 000000000..cce6aa8a8 --- /dev/null +++ b/scripts/northrend/gundrak/boss_moorabi.cpp @@ -0,0 +1,102 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Moorabi +SD%Complete: 20% +SDComment: +SDCategory: Gundrak +EndScriptData */ + +#include "precompiled.h" + +enum +{ + SAY_AGGRO = -1604011, + SAY_QUAKE = -1604012, + SAY_TRANSFORM = -1604013, + SAY_SLAY_1 = -1604014, + SAY_SLAY_2 = -1604015, + SAY_SLAY_3 = -1604016, + SAY_DEATH = -1604017, + EMOTE_TRANSFORM = -1604018, + + SOUND_ID_TRANSFORMED = 14724 +}; + +/*###### +## boss_moorabi +######*/ + +struct MANGOS_DLL_DECL boss_moorabiAI : public ScriptedAI +{ + boss_moorabiAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + void Reset() + { + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void KilledUnit(Unit* pVictim) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_SLAY_1, m_creature); break; + case 1: DoScriptText(SAY_SLAY_2, m_creature); break; + case 2: DoScriptText(SAY_SLAY_3, m_creature); break; + } + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_moorabi(Creature* pCreature) +{ + return new boss_moorabiAI(pCreature); +} + +void AddSC_boss_moorabi() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_moorabi"; + newscript->GetAI = &GetAI_boss_moorabi; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/gundrak/boss_sladran.cpp b/scripts/northrend/gundrak/boss_sladran.cpp new file mode 100644 index 000000000..354e246fe --- /dev/null +++ b/scripts/northrend/gundrak/boss_sladran.cpp @@ -0,0 +1,100 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Sladran +SD%Complete: 20% +SDComment: +SDCategory: Gundrak +EndScriptData */ + +#include "precompiled.h" + +enum +{ + SAY_AGGRO = -1604000, + SAY_SUMMON_SNAKE = -1604001, + SAY_SUMMON_CONSTRICT = -1604002, + SAY_SLAY_1 = -1604003, + SAY_SLAY_2 = -1604004, + SAY_SLAY_3 = -1604005, + SAY_DEATH = -1604006, + EMOTE_NOVA = -1604007 +}; + +/*###### +## boss_sladran +######*/ + +struct MANGOS_DLL_DECL boss_sladranAI : public ScriptedAI +{ + boss_sladranAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + void Reset() + { + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void KilledUnit(Unit* pVictim) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_SLAY_1, m_creature); break; + case 1: DoScriptText(SAY_SLAY_2, m_creature); break; + case 2: DoScriptText(SAY_SLAY_3, m_creature); break; + } + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_sladran(Creature* pCreature) +{ + return new boss_sladranAI(pCreature); +} + +void AddSC_boss_sladran() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_sladran"; + newscript->GetAI = &GetAI_boss_sladran; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/gundrak/gundrak.h b/scripts/northrend/gundrak/gundrak.h new file mode 100644 index 000000000..5b6792098 --- /dev/null +++ b/scripts/northrend/gundrak/gundrak.h @@ -0,0 +1,47 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_GUNDRAK_H +#define DEF_GUNDRAK_H +/* Encounters + * Slad'ran = 1 + * Drakkari Colossus = 2 + * Moorabi = 3 + * Gal'darah = 4 + * Eck the Ferocious = 5 +*/ +enum +{ + MAX_ENCOUNTER = 5, + + TYPE_SLADRAN = 1, + TYPE_COLOSSUS = 2, + TYPE_MOORABI = 3, + TYPE_GALDARAH = 4, + TYPE_ECK = 5, + + NPC_SLADRAN = 29304, + NPC_MOORABI = 29307, + NPC_COLOSSUS = 29305, + NPC_GALDARAH = 29306, + NPC_ECK = 29932, + + GO_ECK_DOOR = 192632, + GO_ECK_UNDERWATER_DOOR = 192569, + GO_GALDARAH_DOOR = 192568, + GO_EXIT_DOOR_L = 193208, + GO_EXIT_DOOR_R = 193207, + + GO_ALTAR_OF_SLADRAN = 192518, + GO_ALTAR_OF_MOORABI = 192519, + GO_ALTAR_OF_COLOSSUS = 192520, + + GO_SNAKE_KEY = 192564, + GO_TROLL_KEY = 192567, + GO_MAMMOTH_KEY = 192565, + + GO_BRIDGE = 193188 +}; + +#endif diff --git a/scripts/northrend/gundrak/instance_gundrak.cpp b/scripts/northrend/gundrak/instance_gundrak.cpp new file mode 100644 index 000000000..9bd369f84 --- /dev/null +++ b/scripts/northrend/gundrak/instance_gundrak.cpp @@ -0,0 +1,301 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: instance_gundrak +SD%Complete: 0 +SDComment: +SDCategory: Gundrak +EndScriptData */ + +#include "precompiled.h" +#include "gundrak.h" + +bool GOHello_go_gundrak_altar(Player* pPlayer, GameObject* pGo) +{ + ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData(); + + if (!pInstance) + return false; + + switch(pGo->GetEntry()) + { + case GO_ALTAR_OF_SLADRAN: pInstance->SetData(TYPE_SLADRAN, SPECIAL); break; + case GO_ALTAR_OF_MOORABI: pInstance->SetData(TYPE_MOORABI, SPECIAL); break; + case GO_ALTAR_OF_COLOSSUS: pInstance->SetData(TYPE_COLOSSUS, SPECIAL); break; + } + + pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + return true; +} + +struct MANGOS_DLL_DECL instance_gundrak : public ScriptedInstance +{ + instance_gundrak(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string strInstData; + + uint64 m_uiEckDoorGUID; + uint64 m_uiEckUnderwaterDoorGUID; + uint64 m_uiGaldarahDoorGUID; + uint64 m_uiExitDoorLeftGUID; + uint64 m_uiExitDoorRightGUID; + uint64 m_uiSnakeKeyGUID; + uint64 m_uiMammothKeyGUID; + uint64 m_uiTrollKeyGUID; + uint64 m_uiAltarOfSladranGUID; + uint64 m_uiAltarOfMoorabiGUID; + uint64 m_uiAltarOfColossusGUID; + uint64 m_uiBridgeGUID; + + uint64 m_uiSladranGUID; + + void Initialize() + { + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + + m_uiEckDoorGUID = 0; + m_uiEckUnderwaterDoorGUID = 0; + m_uiGaldarahDoorGUID = 0; + m_uiExitDoorLeftGUID = 0; + m_uiExitDoorRightGUID = 0; + m_uiAltarOfSladranGUID = 0; + m_uiAltarOfMoorabiGUID = 0; + m_uiAltarOfColossusGUID = 0; + m_uiSnakeKeyGUID = 0; + m_uiTrollKeyGUID = 0; + m_uiMammothKeyGUID = 0; + m_uiBridgeGUID = 0; + + m_uiSladranGUID = 0; + } + + void OnCreatureCreate(Creature* pCreature) + { + switch(pCreature->GetEntry()) + { + case NPC_SLADRAN: m_uiSladranGUID = pCreature->GetGUID(); break; + } + } + + void OnObjectCreate(GameObject* pGo) + { + switch(pGo->GetEntry()) + { + case GO_ECK_DOOR: + m_uiEckDoorGUID = pGo->GetGUID(); + if ((m_auiEncounter[1] == DONE) && instance->IsHeroic()) + DoUseDoorOrButton(m_uiEckDoorGUID); + break; + case GO_ECK_UNDERWATER_DOOR: + m_uiEckUnderwaterDoorGUID = pGo->GetGUID(); + if (m_auiEncounter[4] == DONE) + DoUseDoorOrButton(m_uiEckUnderwaterDoorGUID); + break; + case GO_GALDARAH_DOOR: + m_uiGaldarahDoorGUID = pGo->GetGUID(); + DoUseDoorOrButton(m_uiGaldarahDoorGUID); + break; + case GO_EXIT_DOOR_L: + m_uiExitDoorLeftGUID = pGo->GetGUID(); + if (m_auiEncounter[3] == DONE) + DoUseDoorOrButton(m_uiExitDoorLeftGUID); + break; + case GO_EXIT_DOOR_R: + m_uiExitDoorRightGUID = pGo->GetGUID(); + if (m_auiEncounter[3] == DONE) + DoUseDoorOrButton(m_uiExitDoorRightGUID); + break; + case GO_ALTAR_OF_SLADRAN: + m_uiAltarOfSladranGUID = pGo->GetGUID(); + if (m_auiEncounter[0] == DONE) + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + break; + case GO_ALTAR_OF_MOORABI: + m_uiAltarOfMoorabiGUID = pGo->GetGUID(); + if (m_auiEncounter[1] == DONE) + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + break; + case GO_ALTAR_OF_COLOSSUS: + m_uiAltarOfColossusGUID = pGo->GetGUID(); + if (m_auiEncounter[2] == DONE) + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + break; + case GO_SNAKE_KEY: + m_uiSnakeKeyGUID = pGo->GetGUID(); + if (m_auiEncounter[0] == SPECIAL) + DoUseDoorOrButton(m_uiSnakeKeyGUID); + break; + case GO_TROLL_KEY: + m_uiTrollKeyGUID = pGo->GetGUID(); + if (m_auiEncounter[1] == SPECIAL) + DoUseDoorOrButton(m_uiTrollKeyGUID); + break; + case GO_MAMMOTH_KEY: + m_uiMammothKeyGUID = pGo->GetGUID(); + if (m_auiEncounter[2] == SPECIAL) + DoUseDoorOrButton(m_uiMammothKeyGUID); + break; + case GO_BRIDGE: + m_uiBridgeGUID = pGo->GetGUID(); + break; + } + } + + void SetData(uint32 uiType, uint32 uiData) + { + debug_log("SD2: Instance Gundrak: SetData received for type %u with data %u",uiType,uiData); + + switch(uiType) + { + case TYPE_SLADRAN: + m_auiEncounter[0] = uiData; + if (uiData == DONE) + if (GameObject* pGo = instance->GetGameObject(m_uiAltarOfSladranGUID)) + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + if (uiData == SPECIAL) + DoUseDoorOrButton(m_uiSnakeKeyGUID); + break; + case TYPE_MOORABI: + m_auiEncounter[1] = uiData; + if (uiData == DONE) + { + if (instance->IsHeroic()) + DoUseDoorOrButton(m_uiEckDoorGUID); + if (GameObject* pGo = instance->GetGameObject(m_uiAltarOfMoorabiGUID)) + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + } + if (uiData == SPECIAL) + DoUseDoorOrButton(m_uiMammothKeyGUID); + break; + case TYPE_COLOSSUS: + m_auiEncounter[2] = uiData; + if (uiData == DONE) + if (GameObject* pGo = instance->GetGameObject(m_uiAltarOfColossusGUID)) + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + if (uiData == SPECIAL) + DoUseDoorOrButton(m_uiTrollKeyGUID); + break; + case TYPE_GALDARAH: + m_auiEncounter[3] = uiData; + DoUseDoorOrButton(m_uiGaldarahDoorGUID); + if (uiData == DONE) + { + DoUseDoorOrButton(m_uiExitDoorLeftGUID); + DoUseDoorOrButton(m_uiExitDoorRightGUID); + } + break; + case TYPE_ECK: + m_auiEncounter[4] = uiData; + if (uiData == DONE) + DoUseDoorOrButton(m_uiEckUnderwaterDoorGUID); + break; + default: + error_log("SD2: Instance Gundrak: ERROR SetData = %u for type %u does not exist/not implemented.",uiType,uiData); + break; + } + + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3] << " " + << m_auiEncounter[4]; + + strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } + } + + const char* Save() + { + return strInstData.c_str(); + } + + void Load(const char* chrIn) + { + if (!chrIn) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(chrIn); + + std::istringstream loadStream(chrIn); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] >> m_auiEncounter[4]; + + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; + } + + OUT_LOAD_INST_DATA_COMPLETE; + } + + uint32 GetData(uint32 uiType) + { + switch(uiType) + { + case TYPE_SLADRAN: + return m_auiEncounter[0]; + case TYPE_MOORABI: + return m_auiEncounter[1]; + case TYPE_COLOSSUS: + return m_auiEncounter[2]; + case TYPE_GALDARAH: + return m_auiEncounter[3]; + case TYPE_ECK: + return m_auiEncounter[4]; + } + return 0; + } + + uint64 GetData64(uint32 uiType) + { + switch(uiType) + { + case NPC_SLADRAN: + return m_uiSladranGUID; + } + return 0; + } +}; + +InstanceData* GetInstanceData_instance_gundrak(Map* pMap) +{ + return new instance_gundrak(pMap); +} + +void AddSC_instance_gundrak() +{ + Script* newscript; + + newscript = new Script; + newscript->Name = "go_gundrak_altar"; + newscript->pGOHello = &GOHello_go_gundrak_altar; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "instance_gundrak"; + newscript->GetInstanceData = &GetInstanceData_instance_gundrak; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/howling_fjord.cpp b/scripts/northrend/howling_fjord.cpp new file mode 100644 index 000000000..7c27c313b --- /dev/null +++ b/scripts/northrend/howling_fjord.cpp @@ -0,0 +1,121 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Howling_Fjord +SD%Complete: ? +SDComment: Quest support: 11221 +SDCategory: Howling Fjord +EndScriptData */ + +#include "precompiled.h" + +/*####################### +## Deathstalker Razael ## +#######################*/ + +#define GOSSIP_ITEM_DEATHSTALKER_RAZAEL "High Executor Anselm requests your report." +enum +{ + QUEST_REPORTS_FROM_THE_FIELD = 11221, + SPELL_RAZAEL_KILL_CREDIT = 42756, + GOSSIP_TEXTID_DEATHSTALKER_RAZAEL1 = 11562, + GOSSIP_TEXTID_DEATHSTALKER_RAZAEL2 = 11564 +}; +bool GossipHello_npc_deathstalker_razael(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestStatus(QUEST_REPORTS_FROM_THE_FIELD) == QUEST_STATUS_INCOMPLETE) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DEATHSTALKER_RAZAEL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DEATHSTALKER_RAZAEL1, pCreature->GetGUID()); + } + else + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_deathstalker_razael(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DEATHSTALKER_RAZAEL2, pCreature->GetGUID()); + pCreature->CastSpell(pPlayer, SPELL_RAZAEL_KILL_CREDIT, true); + break; + } + return true; +} + +/*##################### +## Dark Ranger Lyana ## +#####################*/ + +#define GOSSIP_ITEM_DARK_RANGER_LYANA "High Executor Anselm requests your report." + +enum +{ + GOSSIP_TEXTID_DARK_RANGER_LYANA1 = 11586, + GOSSIP_TEXTID_DARK_RANGER_LYANA2 = 11588, + SPELL_DARK_RANGER_LYANA_KILL_CREDIT = 42799 +}; + +bool GossipHello_npc_dark_ranger_lyana(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestStatus(QUEST_REPORTS_FROM_THE_FIELD) == QUEST_STATUS_INCOMPLETE) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DARK_RANGER_LYANA, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DARK_RANGER_LYANA1, pCreature->GetGUID()); + } + else + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_dark_ranger_lyana(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DARK_RANGER_LYANA2, pCreature->GetGUID()); + pCreature->CastSpell(pPlayer, SPELL_DARK_RANGER_LYANA_KILL_CREDIT, true); + break; + } + return true; +} + +void AddSC_howling_fjord() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_deathstalker_razael"; + newscript->pGossipHello = &GossipHello_npc_deathstalker_razael; + newscript->pGossipSelect = &GossipSelect_npc_deathstalker_razael; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_dark_ranger_lyana"; + newscript->pGossipHello = &GossipHello_npc_dark_ranger_lyana; + newscript->pGossipSelect = &GossipSelect_npc_dark_ranger_lyana; + newscript->RegisterSelf(); + +} diff --git a/scripts/northrend/icecrown.cpp b/scripts/northrend/icecrown.cpp new file mode 100644 index 000000000..971cb4540 --- /dev/null +++ b/scripts/northrend/icecrown.cpp @@ -0,0 +1,117 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Icecrown +SD%Complete: 100 +SDComment: Quest support: 12807 +SDCategory: Icecrown +EndScriptData */ + +/* ContentData +npc_arete +EndContentData */ + +#include "precompiled.h" + +/*###### +## npc_arete +######*/ + +#define GOSSIP_ARETE_ITEM1 "Lord-Commander, I would hear your tale." +#define GOSSIP_ARETE_ITEM2 "" +#define GOSSIP_ARETE_ITEM3 "I thought that they now called themselves the Scarlet Onslaught?" +#define GOSSIP_ARETE_ITEM4 "Where did the grand admiral go?" +#define GOSSIP_ARETE_ITEM5 "That's fine. When do I start?" +#define GOSSIP_ARETE_ITEM6 "Let's finish this!" +#define GOSSIP_ARETE_ITEM7 "That's quite a tale, Lord-Commander." + +enum +{ + GOSSIP_TEXTID_ARETE1 = 13525, + GOSSIP_TEXTID_ARETE2 = 13526, + GOSSIP_TEXTID_ARETE3 = 13527, + GOSSIP_TEXTID_ARETE4 = 13528, + GOSSIP_TEXTID_ARETE5 = 13529, + GOSSIP_TEXTID_ARETE6 = 13530, + GOSSIP_TEXTID_ARETE7 = 13531, + + QUEST_THE_STORY_THUS_FAR = 12807 +}; + +bool GossipHello_npc_arete(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestStatus(QUEST_THE_STORY_THUS_FAR) == QUEST_STATUS_INCOMPLETE) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ARETE_ITEM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ARETE1, pCreature->GetGUID()); + return true; + } + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_arete(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ARETE_ITEM2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ARETE2, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ARETE_ITEM3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ARETE3, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+3: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ARETE_ITEM4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ARETE4, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+4: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ARETE_ITEM5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ARETE5, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+5: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ARETE_ITEM6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ARETE6, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+6: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ARETE_ITEM7, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ARETE7, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+7: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->AreaExploredOrEventHappens(QUEST_THE_STORY_THUS_FAR); + break; + } + + return true; +} + +void AddSC_icecrown() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_arete"; + newscript->pGossipHello = &GossipHello_npc_arete; + newscript->pGossipSelect = &GossipSelect_npc_arete; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/naxxramas/boss_anubrekhan.cpp b/scripts/northrend/naxxramas/boss_anubrekhan.cpp new file mode 100644 index 000000000..2aaf57c6f --- /dev/null +++ b/scripts/northrend/naxxramas/boss_anubrekhan.cpp @@ -0,0 +1,182 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Anubrekhan +SD%Complete: 70 +SDComment: +SDCategory: Naxxramas +EndScriptData */ + +#include "precompiled.h" +#include "naxxramas.h" + +enum +{ + SAY_GREET = -1533000, + SAY_AGGRO1 = -1533001, + SAY_AGGRO2 = -1533002, + SAY_AGGRO3 = -1533003, + SAY_TAUNT1 = -1533004, + SAY_TAUNT2 = -1533005, + SAY_TAUNT3 = -1533006, + SAY_TAUNT4 = -1533007, + SAY_SLAY = -1533008, + + SPELL_IMPALE = 28783, //May be wrong spell id. Causes more dmg than I expect + SPELL_IMPALE_H = 56090, + SPELL_LOCUSTSWARM = 28785, //This is a self buff that triggers the dmg debuff + SPELL_LOCUSTSWARM_H = 54021, + + //spellId invalid + SPELL_SUMMONGUARD = 29508, //Summons 1 crypt guard at targeted location + + SPELL_SELF_SPAWN_5 = 29105, //This spawns 5 corpse scarabs ontop of us (most likely the pPlayer casts this on death) + SPELL_SELF_SPAWN_10 = 28864, //This is used by the crypt guards when they die + + NPC_CRYPT_GUARD = 16573 +}; + +struct MANGOS_DLL_DECL boss_anubrekhanAI : public ScriptedAI +{ + boss_anubrekhanAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bHasTaunted = false; + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + uint32 m_uiImpaleTimer; + uint32 m_uiLocustSwarmTimer; + uint32 m_uiSummonTimer; + bool m_bHasTaunted; + + void Reset() + { + m_uiImpaleTimer = 15000; // 15 seconds + m_uiLocustSwarmTimer = urand(80000, 120000); // Random time between 80 seconds and 2 minutes for initial cast + m_uiSummonTimer = m_uiLocustSwarmTimer + 45000; // 45 seconds after initial locust swarm + } + + void KilledUnit(Unit* pVictim) + { + //Force the player to spawn corpse scarabs via spell + if (pVictim->GetTypeId() == TYPEID_PLAYER) + pVictim->CastSpell(pVictim, SPELL_SELF_SPAWN_5, true); + + if (urand(0, 4)) + return; + + DoScriptText(SAY_SLAY, m_creature); + } + + void Aggro(Unit* pWho) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_AGGRO1, m_creature); break; + case 1: DoScriptText(SAY_AGGRO2, m_creature); break; + case 2: DoScriptText(SAY_AGGRO3, m_creature); break; + } + + if (m_pInstance) + m_pInstance->SetData(TYPE_ANUB_REKHAN, IN_PROGRESS); + } + + void JustDied(Unit* pKiller) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_ANUB_REKHAN, DONE); + } + + void MoveInLineOfSight(Unit* pWho) + { + if (!m_bHasTaunted && m_creature->IsWithinDistInMap(pWho, 60.0f)) + { + switch(urand(0, 4)) + { + case 0: DoScriptText(SAY_GREET, m_creature); break; + case 1: DoScriptText(SAY_TAUNT1, m_creature); break; + case 2: DoScriptText(SAY_TAUNT2, m_creature); break; + case 3: DoScriptText(SAY_TAUNT3, m_creature); break; + case 4: DoScriptText(SAY_TAUNT4, m_creature); break; + } + m_bHasTaunted = true; + } + + ScriptedAI::MoveInLineOfSight(pWho); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // Impale + if (m_uiImpaleTimer < uiDiff) + { + //Cast Impale on a random target + //Do NOT cast it when we are afflicted by locust swarm + if (!m_creature->HasAura(SPELL_LOCUSTSWARM) || !m_creature->HasAura(SPELL_LOCUSTSWARM_H)) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, m_bIsHeroicMode ? SPELL_IMPALE_H : SPELL_IMPALE); + } + + m_uiImpaleTimer = 15000; + } + else + m_uiImpaleTimer -= uiDiff; + + // Locust Swarm + if (m_uiLocustSwarmTimer < uiDiff) + { + DoCast(m_creature, m_bIsHeroicMode?SPELL_LOCUSTSWARM_H:SPELL_LOCUSTSWARM); + m_uiLocustSwarmTimer = 90000; + } + else + m_uiLocustSwarmTimer -= uiDiff; + + // Summon + /*if (m_uiSummonTimer < uiDiff) + { + DoCast(m_creature, SPELL_SUMMONGUARD); + Summon_Timer = 45000; + } + else + m_uiSummonTimer -= uiDiff;*/ + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_anubrekhan(Creature* pCreature) +{ + return new boss_anubrekhanAI(pCreature); +} + +void AddSC_boss_anubrekhan() +{ + Script* NewScript; + NewScript = new Script; + NewScript->Name = "boss_anubrekhan"; + NewScript->GetAI = &GetAI_boss_anubrekhan; + NewScript->RegisterSelf(); +} diff --git a/scripts/northrend/naxxramas/boss_faerlina.cpp b/scripts/northrend/naxxramas/boss_faerlina.cpp new file mode 100644 index 000000000..5a871fe8a --- /dev/null +++ b/scripts/northrend/naxxramas/boss_faerlina.cpp @@ -0,0 +1,160 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Faerlina +SD%Complete: 50 +SDComment: +SDCategory: Naxxramas +EndScriptData */ + +#include "precompiled.h" +#include "naxxramas.h" + +enum +{ + SAY_GREET = -1533009, + SAY_AGGRO1 = -1533010, + SAY_AGGRO2 = -1533011, + SAY_AGGRO3 = -1533012, + SAY_AGGRO4 = -1533013, + SAY_SLAY1 = -1533014, + SAY_SLAY2 = -1533015, + SAY_DEATH = -1533016, + + //SOUND_RANDOM_AGGRO = 8955, //soundId containing the 4 aggro sounds, we not using this + + SPELL_POSIONBOLT_VOLLEY = 28796, + H_SPELL_POSIONBOLT_VOLLEY = 54098, + SPELL_ENRAGE = 28798, + H_SPELL_ENRAGE = 54100, + + SPELL_RAINOFFIRE = 28794 //Not sure if targeted AoEs work if casted directly upon a pPlayer +}; +struct MANGOS_DLL_DECL boss_faerlinaAI : public ScriptedAI +{ + boss_faerlinaAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bHasTaunted = false; + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + uint32 m_uiPoisonBoltVolleyTimer; + uint32 m_uiRainOfFireTimer; + uint32 m_uiEnrageTimer; + bool m_bHasTaunted; + + void Reset() + { + m_uiPoisonBoltVolleyTimer = 8000; + m_uiRainOfFireTimer = 16000; + m_uiEnrageTimer = 60000; + } + + void Aggro(Unit* pWho) + { + switch(urand(0, 3)) + { + case 0: DoScriptText(SAY_AGGRO1, m_creature); break; + case 1: DoScriptText(SAY_AGGRO2, m_creature); break; + case 2: DoScriptText(SAY_AGGRO3, m_creature); break; + case 3: DoScriptText(SAY_AGGRO4, m_creature); break; + } + + if (m_pInstance) + m_pInstance->SetData(TYPE_FAERLINA, IN_PROGRESS); + } + + void MoveInLineOfSight(Unit* pWho) + { + if (!m_bHasTaunted && m_creature->IsWithinDistInMap(pWho, 60.0f)) + { + DoScriptText(SAY_GREET, m_creature); + m_bHasTaunted = true; + } + + ScriptedAI::MoveInLineOfSight(pWho); + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(urand(0, 1)?SAY_SLAY1:SAY_SLAY2, m_creature); + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_FAERLINA, DONE); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // Poison Bolt Volley + if (m_uiPoisonBoltVolleyTimer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_POSIONBOLT_VOLLEY); + m_uiPoisonBoltVolleyTimer = 11000; + } + else + m_uiPoisonBoltVolleyTimer -= uiDiff; + + // Rain Of Fire + if (m_uiRainOfFireTimer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, SPELL_RAINOFFIRE); + + m_uiRainOfFireTimer = 16000; + } + else + m_uiRainOfFireTimer -= uiDiff; + + //Enrage_Timer + if (m_uiEnrageTimer < uiDiff) + { + DoCast(m_creature, SPELL_ENRAGE); + m_uiEnrageTimer = 61000; + } + else + m_uiEnrageTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_faerlina(Creature* pCreature) +{ + return new boss_faerlinaAI(pCreature); +} + +void AddSC_boss_faerlina() +{ + Script* NewScript; + NewScript = new Script; + NewScript->Name = "boss_faerlina"; + NewScript->GetAI = &GetAI_boss_faerlina; + NewScript->RegisterSelf(); +} diff --git a/scripts/northrend/naxxramas/boss_four_horsemen.cpp b/scripts/northrend/naxxramas/boss_four_horsemen.cpp new file mode 100644 index 000000000..6404ad960 --- /dev/null +++ b/scripts/northrend/naxxramas/boss_four_horsemen.cpp @@ -0,0 +1,399 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Four_Horsemen +SD%Complete: 75 +SDComment: Lady Blaumeux, Thane Korthazz, Sir Zeliek, Baron Rivendare +SDCategory: Naxxramas +EndScriptData */ + +#include "precompiled.h" +#include "naxxramas.h" + +enum +{ + //all horsemen + SPELL_SHIELDWALL = 29061, + SPELL_BESERK = 26662, + + //lady blaumeux + SAY_BLAU_AGGRO = -1533044, + SAY_BLAU_TAUNT1 = -1533045, + SAY_BLAU_TAUNT2 = -1533046, + SAY_BLAU_TAUNT3 = -1533047, + SAY_BLAU_SPECIAL = -1533048, + SAY_BLAU_SLAY = -1533049, + SAY_BLAU_DEATH = -1533050, + + SPELL_MARK_OF_BLAUMEUX = 28833, + SPELL_UNYILDING_PAIN = 57381, + SPELL_VOIDZONE = 28863, + H_SPELL_VOIDZONE = 57463, + SPELL_SHADOW_BOLT = 57374, + H_SPELL_SHADOW_BOLT = 57464, + + //baron rivendare + SAY_RIVE_AGGRO1 = -1533065, + SAY_RIVE_AGGRO2 = -1533066, + SAY_RIVE_AGGRO3 = -1533067, + SAY_RIVE_SLAY1 = -1533068, + SAY_RIVE_SLAY2 = -1533069, + SAY_RIVE_SPECIAL = -1533070, + SAY_RIVE_TAUNT1 = -1533071, + SAY_RIVE_TAUNT2 = -1533072, + SAY_RIVE_TAUNT3 = -1533073, + SAY_RIVE_DEATH = -1533074, + + SPELL_MARK_OF_RIVENDARE = 28834, + SPELL_UNHOLY_SHADOW = 28882, + H_SPELL_UNHOLY_SHADOW = 57369, + + //thane korthazz + SAY_KORT_AGGRO = -1533051, + SAY_KORT_TAUNT1 = -1533052, + SAY_KORT_TAUNT2 = -1533053, + SAY_KORT_TAUNT3 = -1533054, + SAY_KORT_SPECIAL = -1533055, + SAY_KORT_SLAY = -1533056, + SAY_KORT_DEATH = -1533057, + + SPELL_MARK_OF_KORTHAZZ = 28832, + SPELL_METEOR = 26558, // m_creature->getVictim() auto-area spell but with a core problem + + //sir zeliek + SAY_ZELI_AGGRO = -1533058, + SAY_ZELI_TAUNT1 = -1533059, + SAY_ZELI_TAUNT2 = -1533060, + SAY_ZELI_TAUNT3 = -1533061, + SAY_ZELI_SPECIAL = -1533062, + SAY_ZELI_SLAY = -1533063, + SAY_ZELI_DEATH = -1533064, + + SPELL_MARK_OF_ZELIEK = 28835, + SPELL_HOLY_WRATH = 28883, + H_SPELL_HOLY_WRATH = 57466, + SPELL_HOLY_BOLT = 57376, + H_SPELL_HOLY_BOLT = 57465, + + // horseman spirits + NPC_SPIRIT_OF_BLAUMEUX = 16776, + NPC_SPIRIT_OF_RIVENDARE = 0, //creature entry not known yet + NPC_SPIRIT_OF_KORTHAZZ = 16778, + NPC_SPIRIT_OF_ZELIREK = 16777 +}; + +struct MANGOS_DLL_DECL boss_lady_blaumeuxAI : public ScriptedAI +{ + boss_lady_blaumeuxAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 Mark_Timer; + uint32 VoidZone_Timer; + bool ShieldWall1; + bool ShieldWall2; + + void Reset() + { + Mark_Timer = 20000; // First Horsemen Mark is applied at 20 sec. + VoidZone_Timer = 12000; // right + ShieldWall1 = true; + ShieldWall2 = true; + } + + void Aggro(Unit *who) + { + DoScriptText(SAY_BLAU_AGGRO, m_creature); + } + + void KilledUnit(Unit* Victim) + { + DoScriptText(SAY_BLAU_SLAY, m_creature); + } + + void JustDied(Unit* Killer) + { + DoScriptText(SAY_BLAU_DEATH, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // Mark of Blaumeux + if (Mark_Timer < uiDiff) + { + DoCast(m_creature->getVictim(),SPELL_MARK_OF_BLAUMEUX); + Mark_Timer = 12000; + }else Mark_Timer -= uiDiff; + + // Shield Wall - All 4 horsemen will shield wall at 50% hp and 20% hp for 20 seconds + if (ShieldWall1 && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 50) + { + if (ShieldWall1) + { + DoCast(m_creature,SPELL_SHIELDWALL); + ShieldWall1 = false; + } + } + if (ShieldWall2 && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 20) + { + if (ShieldWall2) + { + DoCast(m_creature,SPELL_SHIELDWALL); + ShieldWall2 = false; + } + } + + // Void Zone + if (VoidZone_Timer < uiDiff) + { + DoCast(m_creature->getVictim(),SPELL_VOIDZONE); + VoidZone_Timer = 12000; + }else VoidZone_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_lady_blaumeux(Creature* pCreature) +{ + return new boss_lady_blaumeuxAI(pCreature); +} + +struct MANGOS_DLL_DECL boss_rivendare_naxxAI : public ScriptedAI +{ + boss_rivendare_naxxAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + void Reset() + { + } + + void Aggro(Unit *who) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_RIVE_AGGRO1, m_creature); break; + case 1: DoScriptText(SAY_RIVE_AGGRO2, m_creature); break; + case 2: DoScriptText(SAY_RIVE_AGGRO3, m_creature); break; + } + } + + void KilledUnit(Unit* Victim) + { + DoScriptText(urand(0, 1) ? SAY_RIVE_SLAY1 : SAY_RIVE_SLAY2, m_creature); + } + + void JustDied(Unit* Killer) + { + DoScriptText(SAY_RIVE_DEATH, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_rivendare_naxx(Creature* pCreature) +{ + return new boss_rivendare_naxxAI(pCreature); +} + +struct MANGOS_DLL_DECL boss_thane_korthazzAI : public ScriptedAI +{ + boss_thane_korthazzAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 Mark_Timer; + uint32 Meteor_Timer; + bool ShieldWall1; + bool ShieldWall2; + + void Reset() + { + Mark_Timer = 20000; // First Horsemen Mark is applied at 20 sec. + Meteor_Timer = 30000; // wrong + ShieldWall1 = true; + ShieldWall2 = true; + } + + void Aggro(Unit *who) + { + DoScriptText(SAY_KORT_AGGRO, m_creature); + } + + void KilledUnit(Unit* Victim) + { + DoScriptText(SAY_KORT_SLAY, m_creature); + } + + void JustDied(Unit* Killer) + { + DoScriptText(SAY_KORT_DEATH, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // Mark of Korthazz + if (Mark_Timer < uiDiff) + { + DoCast(m_creature->getVictim(),SPELL_MARK_OF_KORTHAZZ); + Mark_Timer = 12000; + }else Mark_Timer -= uiDiff; + + // Shield Wall - All 4 horsemen will shield wall at 50% hp and 20% hp for 20 seconds + if (ShieldWall1 && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 50) + { + if (ShieldWall1) + { + DoCast(m_creature,SPELL_SHIELDWALL); + ShieldWall1 = false; + } + } + if (ShieldWall2 && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 20) + { + if (ShieldWall2) + { + DoCast(m_creature,SPELL_SHIELDWALL); + ShieldWall2 = false; + } + } + + // Meteor + if (Meteor_Timer < uiDiff) + { + DoCast(m_creature->getVictim(),SPELL_METEOR); + Meteor_Timer = 20000; // wrong + }else Meteor_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_thane_korthazz(Creature* pCreature) +{ + return new boss_thane_korthazzAI(pCreature); +} + +struct MANGOS_DLL_DECL boss_sir_zeliekAI : public ScriptedAI +{ + boss_sir_zeliekAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 Mark_Timer; + uint32 HolyWrath_Timer; + bool ShieldWall1; + bool ShieldWall2; + + void Reset() + { + Mark_Timer = 20000; // First Horsemen Mark is applied at 20 sec. + HolyWrath_Timer = 12000; // right + ShieldWall1 = true; + ShieldWall2 = true; + } + + void Aggro(Unit *who) + { + DoScriptText(SAY_ZELI_AGGRO, m_creature); + } + + void KilledUnit(Unit* Victim) + { + DoScriptText(SAY_ZELI_SLAY, m_creature); + } + + void JustDied(Unit* Killer) + { + DoScriptText(SAY_ZELI_DEATH, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // Mark of Zeliek + if (Mark_Timer < uiDiff) + { + DoCast(m_creature->getVictim(),SPELL_MARK_OF_ZELIEK); + Mark_Timer = 12000; + }else Mark_Timer -= uiDiff; + + // Shield Wall - All 4 horsemen will shield wall at 50% hp and 20% hp for 20 seconds + if (ShieldWall1 && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 50) + { + if (ShieldWall1) + { + DoCast(m_creature,SPELL_SHIELDWALL); + ShieldWall1 = false; + } + } + if (ShieldWall2 && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 20) + { + if (ShieldWall2) + { + DoCast(m_creature,SPELL_SHIELDWALL); + ShieldWall2 = false; + } + } + + // Holy Wrath + if (HolyWrath_Timer < uiDiff) + { + DoCast(m_creature->getVictim(),SPELL_HOLY_WRATH); + HolyWrath_Timer = 12000; + }else HolyWrath_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_sir_zeliek(Creature* pCreature) +{ + return new boss_sir_zeliekAI(pCreature); +} + +void AddSC_boss_four_horsemen() +{ + Script* NewScript; + + NewScript = new Script; + NewScript->Name = "boss_lady_blaumeux"; + NewScript->GetAI = &GetAI_boss_lady_blaumeux; + NewScript->RegisterSelf(); + + NewScript = new Script; + NewScript->Name = "boss_rivendare_naxx"; + NewScript->GetAI = &GetAI_boss_rivendare_naxx; + NewScript->RegisterSelf(); + + NewScript = new Script; + NewScript->Name = "boss_thane_korthazz"; + NewScript->GetAI = &GetAI_boss_thane_korthazz; + NewScript->RegisterSelf(); + + NewScript = new Script; + NewScript->Name = "boss_sir_zeliek"; + NewScript->GetAI = &GetAI_boss_sir_zeliek; + NewScript->RegisterSelf(); +} diff --git a/scripts/northrend/naxxramas/boss_gluth.cpp b/scripts/northrend/naxxramas/boss_gluth.cpp new file mode 100644 index 000000000..2d0d136e7 --- /dev/null +++ b/scripts/northrend/naxxramas/boss_gluth.cpp @@ -0,0 +1,197 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Gluth +SD%Complete: 70 +SDComment: +SDCategory: Naxxramas +EndScriptData */ + +#include "precompiled.h" +#include "naxxramas.h" + +enum +{ + EMOTE_ZOMBIE = -1533119, + + SPELL_MORTALWOUND = 25646, + SPELL_DECIMATE = 28374, + SPELL_ENRAGE = 28371, + SPELL_ENRAGE_H = 54427, + SPELL_BERSERK = 26662, + + NPC_ZOMBIE_CHOW = 16360 +}; + +#define ADD_1X 3269.590 +#define ADD_1Y -3161.287 +#define ADD_1Z 297.423 + +#define ADD_2X 3277.797 +#define ADD_2Y -3170.352 +#define ADD_2Z 297.423 + +#define ADD_3X 3267.049 +#define ADD_3Y -3172.820 +#define ADD_3Z 297.423 + +#define ADD_4X 3252.157 +#define ADD_4Y -3132.135 +#define ADD_4Z 297.423 + +#define ADD_5X 3259.990 +#define ADD_5Y -3126.590 +#define ADD_5Z 297.423 + +#define ADD_6X 3259.815 +#define ADD_6Y -3137.576 +#define ADD_6Z 297.423 + +#define ADD_7X 3308.030 +#define ADD_7Y -3132.135 +#define ADD_7Z 297.423 + +#define ADD_8X 3303.046 +#define ADD_8Y -3180.682 +#define ADD_8Z 297.423 + +#define ADD_9X 3313.283 +#define ADD_9Y -3180.766 +#define ADD_9Z 297.423 + +struct MANGOS_DLL_DECL boss_gluthAI : public ScriptedAI +{ + boss_gluthAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + uint32 m_uiMortalWoundTimer; + uint32 m_uiDecimateTimer; + uint32 m_uiEnrageTimer; + uint32 m_uiSummonTimer; + + uint32 m_uiBerserkTimer; + + void Reset() + { + m_uiMortalWoundTimer = 8000; + m_uiDecimateTimer = 100000; + m_uiEnrageTimer = 60000; + m_uiSummonTimer = 10000; + + m_uiBerserkTimer = MINUTE*8*IN_MILISECONDS; + } + + void JustDied(Unit* pKiller) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_GLUTH, DONE); + } + + void Aggro(Unit* pWho) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_GLUTH, IN_PROGRESS); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // Mortal Wound + if (m_uiMortalWoundTimer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_MORTALWOUND); + m_uiMortalWoundTimer = 10000; + } + else + m_uiMortalWoundTimer -= uiDiff; + + // Decimate + if (m_uiDecimateTimer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_DECIMATE); + m_uiDecimateTimer = 100000; + } + else + m_uiDecimateTimer -= uiDiff; + + // Enrage + if (m_uiEnrageTimer < uiDiff) + { + DoCast(m_creature, m_bIsHeroicMode?SPELL_ENRAGE_H:SPELL_ENRAGE); + m_uiEnrageTimer = 60000; + } + else + m_uiEnrageTimer -= uiDiff; + + // Summon + if (m_uiSummonTimer < uiDiff) + { + if (Creature* pZombie = m_creature->SummonCreature(NPC_ZOMBIE_CHOW, ADD_1X, ADD_1Y, ADD_1Z, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 80000)) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + pZombie->AddThreat(pTarget, 0.0f); + } + + if (m_bIsHeroicMode) + { + if (Creature* pZombie = m_creature->SummonCreature(NPC_ZOMBIE_CHOW, ADD_1X, ADD_1Y, ADD_1Z, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 80000)) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + pZombie->AddThreat(pTarget, 0.0f); + } + } + + m_uiSummonTimer = 10000; + } + else + m_uiSummonTimer -= uiDiff; + + // Berserk + if (m_uiBerserkTimer < uiDiff) + { + DoCast(m_creature, SPELL_BERSERK, true); + m_uiBerserkTimer = MINUTE*5*IN_MILISECONDS; + } + else + m_uiBerserkTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_gluth(Creature* pCreature) +{ + return new boss_gluthAI(pCreature); +} + +void AddSC_boss_gluth() +{ + Script* NewScript; + NewScript = new Script; + NewScript->Name = "boss_gluth"; + NewScript->GetAI = &GetAI_boss_gluth; + NewScript->RegisterSelf(); +} diff --git a/scripts/northrend/naxxramas/boss_gothik.cpp b/scripts/northrend/naxxramas/boss_gothik.cpp new file mode 100644 index 000000000..7f175b838 --- /dev/null +++ b/scripts/northrend/naxxramas/boss_gothik.cpp @@ -0,0 +1,68 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Gothik +SD%Complete: 0 +SDComment: Placeholder +SDCategory: Naxxramas +EndScriptData */ + +#include "precompiled.h" +#include "naxxramas.h" + +enum +{ + SAY_SPEECH = -1533040, + SAY_KILL = -1533041, + SAY_DEATH = -1533042, + SAY_TELEPORT = -1533043, + + //Gothik + SPELL_HARVESTSOUL = 28679, + SPELL_SHADOWBOLT = 29317, + H_SPELL_SHADOWBOLT = 56405, + + //Unrelenting Trainee + SPELL_EAGLECLAW = 30285, + SPELL_KNOCKDOWN_PASSIVE = 6961, + + //Unrelenting Deathknight + SPELL_CHARGE = 22120, + SPELL_SHADOW_MARK = 27825, + + //Unrelenting Rider + SPELL_UNHOLY_AURA = 55606, + H_SPELL_UNHOLY_AURA = 55608, + SPELL_SHADOWBOLT_VOLLEY = 27831, //Search thru targets and find those who have the SHADOW_MARK to cast this on + H_SPELL_SHADOWBOLT_VOLLEY = 55638, + + //Spectral Trainee + SPELL_ARCANE_EXPLOSION = 27989, + + //Spectral Deathknight + SPELL_WHIRLWIND = 28334, + SPELL_SUNDER_ARMOR = 25051, //cannot find sunder that reduces armor by 2950 + SPELL_CLEAVE = 20677, + SPELL_MANA_BURN = 17631, + + //Spectral Rider + SPELL_LIFEDRAIN = 24300, + //USES SAME UNHOLY AURA AS UNRELENTING RIDER + + //Spectral Horse + SPELL_STOMP = 27993 +}; diff --git a/scripts/northrend/naxxramas/boss_grobbulus.cpp b/scripts/northrend/naxxramas/boss_grobbulus.cpp new file mode 100644 index 000000000..22054a272 --- /dev/null +++ b/scripts/northrend/naxxramas/boss_grobbulus.cpp @@ -0,0 +1,31 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Grobbulus +SD%Complete: 0 +SDComment: Place holder +SDCategory: Naxxramas +EndScriptData */ + +/*Poison Cloud 26590 +Slime Spray 28157 +Fallout slime 28218 +Mutating Injection 28169 +Enrages 26527*/ + +#include "precompiled.h" +#include "precompiled.h" diff --git a/scripts/northrend/naxxramas/boss_heigan.cpp b/scripts/northrend/naxxramas/boss_heigan.cpp new file mode 100644 index 000000000..43020f1e7 --- /dev/null +++ b/scripts/northrend/naxxramas/boss_heigan.cpp @@ -0,0 +1,49 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Heigan +SD%Complete: 0 +SDComment: Place Holder +SDCategory: Naxxramas +EndScriptData */ + +#include "precompiled.h" +#include "naxxramas.h" + +enum +{ + SAY_AGGRO1 = -1533109, + SAY_AGGRO2 = -1533110, + SAY_AGGRO3 = -1533111, + SAY_SLAY = -1533112, + SAY_TAUNT1 = -1533113, + SAY_TAUNT2 = -1533114, + SAY_TAUNT3 = -1533115, + SAY_TAUNT4 = -1533116, + SAY_TAUNT5 = -1533117, + SAY_DEATH = -1533118, + + //Spell used by floor peices to cause damage to players + SPELL_ERUPTION = 29371, + + //Spells by boss + SPELL_WILT = 23772, + SPELL_FEAVER = 29998, + + //Spell by eye stalks + SPELL_MIND_FLAY = 26143 +}; diff --git a/scripts/northrend/naxxramas/boss_kelthuzad.cpp b/scripts/northrend/naxxramas/boss_kelthuzad.cpp new file mode 100644 index 000000000..589d6f691 --- /dev/null +++ b/scripts/northrend/naxxramas/boss_kelthuzad.cpp @@ -0,0 +1,459 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_KelThuzud +SD%Complete: 0 +SDComment: VERIFY SCRIPT +SDCategory: Naxxramas +EndScriptData */ + +#include "precompiled.h" +#include "naxxramas.h" + +//***THIS SCRIPTS IS UNDER DEVELOPMENT*** +/* +DATA. +This script has been made with info taken from wowwikki... so there are things wrong... +like spell timers and Says. Also there's another major problem as there is no aggroed list +I cannot make Kel'thuzad to target specific party members, that is needed for spells like +Mana Detonation... so what I'm doing untill now is just to cast everything on my main aggroed +target. Sorry for him. +Another bug is that there are spells that are actually NOT working... I have to implement +them first. +Need DISPELL efect +I also don't know the emotes +*/ + +enum +{ + //when shappiron dies. dialog between kel and lich king (in this order) + SAY_SAPP_DIALOG1 = -1533084, + SAY_SAPP_DIALOG2_LICH = -1533085, + SAY_SAPP_DIALOG3 = -1533086, + SAY_SAPP_DIALOG4_LICH = -1533087, + SAY_SAPP_DIALOG5 = -1533088, + + //when cat dies + SAY_CAT_DIED = -1533089, + + //when each of the 4 wing bosses dies + SAY_TAUNT1 = -1533090, + SAY_TAUNT2 = -1533091, + SAY_TAUNT3 = -1533092, + SAY_TAUNT4 = -1533093, + + SAY_SUMMON_MINIONS = -1533105, //start of phase 1 + + SAY_AGGRO1 = -1533094, //start of phase 2 + SAY_AGGRO2 = -1533095, + SAY_AGGRO3 = -1533096, + + SAY_SLAY1 = -1533097, + SAY_SLAY2 = -1533098, + + SAY_DEATH = -1533099, + + SAY_CHAIN1 = -1533100, + SAY_CHAIN2 = -1533101, + SAY_FROST_BLAST = -1533102, + + SAY_REQUEST_AID = -1533103, //start of phase 3 + SAY_ANSWER_REQUEST = -1533104, //lich king answer + + SAY_SPECIAL1_MANA_DET = -1533106, + SAY_SPECIAL3_MANA_DET = -1533107, + SAY_SPECIAL2_DISPELL = -1533108, + + //spells to be casted + SPELL_FROST_BOLT = 28478, + H_SPELL_FROST_BOLT = 55802, + SPELL_FROST_BOLT_NOVA = 28479, + H_SPELL_FROST_BOLT_NOVA = 55807, + + SPELL_CHAINS_OF_KELTHUZAD = 28410, //casted spell should be 28408. Also as of 303, heroic only + SPELL_MANA_DETONATION = 27819, + SPELL_SHADOW_FISURE = 27810, + SPELL_FROST_BLAST = 27808 +}; + +//Positional defines +#define ADDX_LEFT_FAR 3783.272705 +#define ADDY_LEFT_FAR -5062.697266 +#define ADDZ_LEFT_FAR 143.711203 +#define ADDO_LEFT_FAR 3.617599 + +#define ADDX_LEFT_MIDDLE 3730.291260 +#define ADDY_LEFT_MIDDLE -5027.239258 +#define ADDZ_LEFT_MIDDLE 143.956909 +#define ADDO_LEFT_MIDDLE 4.461900 + +#define ADDX_LEFT_NEAR 3683.868652 +#define ADDY_LEFT_NEAR -5057.281250 +#define ADDZ_LEFT_NEAR 143.183884 +#define ADDO_LEFT_NEAR 5.237086 + +#define ADDX_RIGHT_FAR 3759.355225 +#define ADDY_RIGHT_FAR -5174.128418 +#define ADDZ_RIGHT_FAR 143.802383 +#define ADDO_RIGHT_FAR 2.170104 + +#define ADDX_RIGHT_MIDDLE 370.724365 +#define ADDY_RIGHT_MIDDLE -5185.123047 +#define ADDZ_RIGHT_MIDDLE 143.928024 +#define ADDO_RIGHT_MIDDLE 1.309310 + +#define ADDX_RIGHT_NEAR 3665.121094 +#define ADDY_RIGHT_NEAR -5138.679199 +#define ADDZ_RIGHT_NEAR 143.183212 +#define ADDO_RIGHT_NEAR 0.604023 + +#define WALKX_LEFT_FAR 3754.431396 +#define WALKY_LEFT_FAR -5080.727734 +#define WALKZ_LEFT_FAR 142.036316 +#define WALKO_LEFT_FAR 3.736189 + +#define WALKX_LEFT_MIDDLE 3724.396484 +#define WALKY_LEFT_MIDDLE -5061.330566 +#define WALKZ_LEFT_MIDDLE 142.032700 +#define WALKO_LEFT_MIDDLE 4.564785 + +#define WALKX_LEFT_NEAR 3687.158424 +#define WALKY_LEFT_NEAR -5076.834473 +#define WALKZ_LEFT_NEAR 142.017319 +#define WALKO_LEFT_NEAR 5.237086 + +#define WALKX_RIGHT_FAR 3687.571777 +#define WALKY_RIGHT_FAR -5126.831055 +#define WALKZ_RIGHT_FAR 142.017807 +#define WALKO_RIGHT_FAR 0.604023 + +#define WALKX_RIGHT_MIDDLE 3707.990733 +#define WALKY_RIGHT_MIDDLE -5151.450195 +#define WALKZ_RIGHT_MIDDLE 142.032562 +#define WALKO_RIGHT_MIDDLE 1.376855 + +#define WALKX_RIGHT_NEAR 3739.500000 +#define WALKY_RIGHT_NEAR -5141.883989 +#define WALKZ_RIGHT_NEAR 142.0141130 +#define WALKO_RIGHT_NEAR 2.121412 + +struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI +{ + boss_kelthuzadAI(Creature* pCreature) : ScriptedAI(pCreature) + { + memset(&GuardiansOfIcecrown, 0, sizeof(GuardiansOfIcecrown)); + GuardiansOfIcecrown_Count = 0; + + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + uint64 GuardiansOfIcecrown[5]; + uint32 GuardiansOfIcecrown_Count; + uint32 GuardiansOfIcecrown_Timer; + uint32 FrostBolt_Timer; + uint32 FrostBoltNova_Timer; + uint32 ChainsOfKelthuzad_Timer; + uint32 ManaDetonation_Timer; + uint32 ShadowFisure_Timer; + uint32 FrostBlast_Timer; + uint32 ChainsOfKelthuzad_Targets; + uint32 Phase1_Timer; + bool Phase2; + bool Phase3; + + void Reset() + { + FrostBolt_Timer = urand(1000, 600000); //It won't be more than a minute without cast it + FrostBoltNova_Timer = 15000; //Cast every 15 seconds + ChainsOfKelthuzad_Timer = urand(30000, 60000); //Cast no sooner than once every 30 seconds + ManaDetonation_Timer = 20000; //Seems to cast about every 20 seconds + ShadowFisure_Timer = 25000; //25 seconds + FrostBlast_Timer = urand(30000, 60000); //Random time between 30-60 seconds + GuardiansOfIcecrown_Timer = 5000; //5 seconds for summoning each Guardian of Icecrown in phase 3 + + for(int i=0; i<5; ++i) + { + if (GuardiansOfIcecrown[i]) + { + //delete creature + if (Creature* pGuardian = (Creature*)Unit::GetUnit(*m_creature, GuardiansOfIcecrown[i])) + { + if (pGuardian->isAlive()) + pGuardian->ForcedDespawn(); + } + + GuardiansOfIcecrown[i] = 0; + } + } + + Phase1_Timer = 310000; //Phase 1 lasts 5 minutes and 10 seconds + Phase2 = false; + Phase3 = false; + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(urand(0, 1)?SAY_SLAY1:SAY_SLAY2, m_creature); + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + + for(int i=0; i<5; ++i) + { + if (GuardiansOfIcecrown[i]) + { + Creature* pGuardian = (Creature*)Unit::GetUnit(*m_creature, GuardiansOfIcecrown[i]); + + if (!pGuardian || !pGuardian->isAlive()) + continue; + + pGuardian->CombatStop(); + + float Walk_Pos_X = 0.0f; + float Walk_Pos_Y = 0.0f; + float Walk_Pos_Z = 0.0f; + + switch(urand(0, 5)) + { + case 0: + Walk_Pos_X = ADDX_LEFT_FAR; + Walk_Pos_Y = ADDY_LEFT_FAR; + Walk_Pos_Z = ADDZ_LEFT_FAR; + break; + case 1: + Walk_Pos_X = ADDX_LEFT_MIDDLE; + Walk_Pos_Y = ADDY_LEFT_MIDDLE; + Walk_Pos_Z = ADDZ_LEFT_MIDDLE; + break; + case 2: + Walk_Pos_X = ADDX_LEFT_NEAR; + Walk_Pos_Y = ADDY_LEFT_NEAR; + Walk_Pos_Z = ADDZ_LEFT_NEAR; + break; + case 3: + Walk_Pos_X = ADDX_RIGHT_FAR; + Walk_Pos_Y = ADDY_RIGHT_FAR; + Walk_Pos_Z = ADDZ_RIGHT_FAR; + break; + case 4: + Walk_Pos_X = ADDX_RIGHT_MIDDLE; + Walk_Pos_Y = ADDY_RIGHT_MIDDLE; + Walk_Pos_Z = ADDZ_RIGHT_MIDDLE; + break; + case 5: + Walk_Pos_X = ADDX_RIGHT_NEAR; + Walk_Pos_Y = ADDY_RIGHT_NEAR; + Walk_Pos_Z = ADDZ_RIGHT_NEAR; + break; + } + + pGuardian->SendMonsterMoveWithSpeed(Walk_Pos_X, Walk_Pos_Y, Walk_Pos_Z); + } + } + + if (m_pInstance) + m_pInstance->SetData(TYPE_KELTHUZAD, DONE); + } + + void Aggro(Unit* pWho) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_AGGRO1, m_creature); break; + case 1: DoScriptText(SAY_AGGRO2, m_creature); break; + case 2: DoScriptText(SAY_AGGRO3, m_creature); break; + } + + if (m_pInstance) + m_pInstance->SetData(TYPE_KELTHUZAD, IN_PROGRESS); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Check for Frost Bolt + if (FrostBolt_Timer < uiDiff) + { + DoCast(m_creature->getVictim(),SPELL_FROST_BOLT); + FrostBolt_Timer = urand(1000, 60000); + }else FrostBolt_Timer -= uiDiff; + + //Check for Frost Bolt Nova + if (FrostBoltNova_Timer < uiDiff) + { + DoCast(m_creature->getVictim(),SPELL_FROST_BOLT_NOVA); + FrostBoltNova_Timer = 15000; + }else FrostBoltNova_Timer -= uiDiff; + + //Check for Chains Of Kelthuzad + if (ChainsOfKelthuzad_Timer < uiDiff) + { + //DoCast(m_creature->getVictim(),SPELL_CHAINS_OF_KELTHUZAD); + + //if (urand(0, 1)) + //DoScriptText(SAY_CHAIN1, m_creature); + //else + //DoScriptText(SAY_CHAIN2, m_creature); + + ChainsOfKelthuzad_Timer = urand(30000, 60000); + }else ChainsOfKelthuzad_Timer -= uiDiff; + + //Check for Mana Detonation + if (ManaDetonation_Timer < uiDiff) + { + DoCast(m_creature->getVictim(),SPELL_MANA_DETONATION); + + if (urand(0, 1)) + DoScriptText(SAY_SPECIAL1_MANA_DET, m_creature); + + ManaDetonation_Timer = 20000; + }else ManaDetonation_Timer -= uiDiff; + + //Check for Shadow Fissure + if (ShadowFisure_Timer < uiDiff) + { + DoCast(m_creature->getVictim(),SPELL_SHADOW_FISURE); + + if (urand(0, 1)) + DoScriptText(SAY_SPECIAL3_MANA_DET, m_creature); + + ShadowFisure_Timer = 25000; + }else ShadowFisure_Timer -= uiDiff; + + //Check for Frost Blast + if (FrostBlast_Timer < uiDiff) + { + DoCast(m_creature->getVictim(),SPELL_FROST_BLAST); + + if (urand(0, 1)) + DoScriptText(SAY_FROST_BLAST, m_creature); + + FrostBlast_Timer = urand(30000, 60000); + }else FrostBlast_Timer -= uiDiff; + + //start phase 3 when we are 40% health + if (!Phase3 && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 40) + { + Phase3 = true; + DoScriptText(SAY_REQUEST_AID, m_creature); + //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, m_creature); + } + + if (Phase3 && (GuardiansOfIcecrown_Count < 5)) + { + if (GuardiansOfIcecrown_Timer < uiDiff) + { + //Summon a Guardian of Icecrown in a random alcove (Creature # 16441) + //uint32 TimeToWalk; + Creature* pGuardian = NULL; + + float Walk_Pos_X; + float Walk_Pos_Y; + float Walk_Pos_Z; + + switch(urand(0, 5)) + { + case 0: + pGuardian = m_creature->SummonCreature(16441,ADDX_LEFT_FAR,ADDY_LEFT_FAR,ADDZ_LEFT_FAR,ADDO_LEFT_FAR,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,1000); + //Setting walk position + Walk_Pos_X = WALKX_LEFT_FAR; + Walk_Pos_Y = WALKY_LEFT_FAR; + Walk_Pos_Z = WALKZ_LEFT_FAR; + break; + case 1: + pGuardian = m_creature->SummonCreature(16441,ADDX_LEFT_MIDDLE,ADDY_LEFT_MIDDLE,ADDZ_LEFT_MIDDLE,ADDO_LEFT_MIDDLE,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,1000); + //Start moving guardian towards the center of the room + Walk_Pos_X = WALKX_LEFT_MIDDLE; + Walk_Pos_Y = WALKY_LEFT_MIDDLE; + Walk_Pos_Z = WALKZ_LEFT_MIDDLE; + break; + case 2: + pGuardian = m_creature->SummonCreature(16441,ADDX_LEFT_NEAR,ADDY_LEFT_NEAR,ADDZ_LEFT_NEAR,ADDO_LEFT_NEAR,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,1000); + //Start moving guardian towards the center of the room + Walk_Pos_X = WALKX_LEFT_NEAR; + Walk_Pos_Y = WALKY_LEFT_NEAR; + Walk_Pos_Z = WALKZ_LEFT_NEAR; + break; + case 3: + pGuardian = m_creature->SummonCreature(16441,ADDX_RIGHT_FAR,ADDY_RIGHT_FAR,ADDZ_RIGHT_FAR,ADDO_RIGHT_FAR,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,1000); + //Start moving guardian towards the center of the room + Walk_Pos_X = WALKX_RIGHT_FAR; + Walk_Pos_Y = WALKY_RIGHT_FAR; + Walk_Pos_Z = WALKZ_RIGHT_FAR; + break; + case 4: + pGuardian = m_creature->SummonCreature(16441,ADDX_RIGHT_MIDDLE,ADDY_RIGHT_MIDDLE,ADDZ_RIGHT_MIDDLE,ADDO_RIGHT_MIDDLE,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,1000); + //Start moving guardian towards the center of the room + Walk_Pos_X = WALKX_RIGHT_MIDDLE; + Walk_Pos_Y = WALKY_RIGHT_MIDDLE; + Walk_Pos_Z = WALKZ_RIGHT_MIDDLE; + break; + case 5: + pGuardian = m_creature->SummonCreature(16441,ADDX_RIGHT_NEAR,ADDY_RIGHT_NEAR,ADDZ_RIGHT_NEAR,ADDO_RIGHT_NEAR,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,1000); + //Start moving guardian towards the center of the room + Walk_Pos_X = WALKX_RIGHT_NEAR; + Walk_Pos_Y = WALKY_RIGHT_NEAR; + Walk_Pos_Z = WALKZ_RIGHT_NEAR; + break; + } + + if (pGuardian) + { + //if we find no one to figth walk to the center + if (!pGuardian->getVictim()) + pGuardian->SendMonsterMoveWithSpeed(Walk_Pos_X,Walk_Pos_Y,Walk_Pos_Z); + + //Safe storing of creatures + GuardiansOfIcecrown[GuardiansOfIcecrown_Count] = pGuardian->GetGUID(); + + //Update guardian count + ++GuardiansOfIcecrown_Count; + } + + //5 seconds until summoning next guardian + GuardiansOfIcecrown_Timer = 5000; + }else GuardiansOfIcecrown_Timer -= uiDiff; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_kelthuzadAI(Creature* pCreature) +{ + return new boss_kelthuzadAI(pCreature); +} + +void AddSC_boss_kelthuzad() +{ + Script* NewScript; + NewScript = new Script; + NewScript->Name = "boss_kelthuzad"; + NewScript->GetAI = &GetAI_boss_kelthuzadAI; + NewScript->RegisterSelf(); +} diff --git a/scripts/northrend/naxxramas/boss_loatheb.cpp b/scripts/northrend/naxxramas/boss_loatheb.cpp new file mode 100644 index 000000000..9f8ccb944 --- /dev/null +++ b/scripts/northrend/naxxramas/boss_loatheb.cpp @@ -0,0 +1,172 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Loatheb +SD%Complete: 100 +SDComment: +SDCategory: Naxxramas +EndScriptData */ + +#include "precompiled.h" +#include "naxxramas.h" + +enum +{ + SPELL_CORRUPTED_MIND = 29198, + SPELL_POISON_AURA = 29865, + SPELL_INEVITABLE_DOOM = 29204, + SPELL_REMOVE_CURSE = 30281 +}; + +#define ADD_1X 2957.040 +#define ADD_1Y -3997.590 +#define ADD_1Z 274.280 + +#define ADD_2X 2909.130 +#define ADD_2Y -4042.970 +#define ADD_2Z 274.280 + +#define ADD_3X 2861.102 +#define ADD_3Y -3997.901 +#define ADD_3Z 274.280 + +struct MANGOS_DLL_DECL boss_loathebAI : public ScriptedAI +{ + boss_loathebAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + uint32 m_uiCorruptedMindTimer; + uint32 m_uiPoisonAuraTimer; + uint32 m_uiInevitableDoomTimer; + uint32 m_uiInevitableDoom5minsTimer; + uint32 m_uiRemoveCurseTimer; + uint32 m_uiSummonTimer; + + void Reset() + { + m_uiCorruptedMindTimer = 4000; + m_uiPoisonAuraTimer = 2500; + m_uiInevitableDoomTimer = 120000; + m_uiInevitableDoom5minsTimer = 300000; + m_uiRemoveCurseTimer = 30000; + m_uiSummonTimer = 8000; + } + + void Aggro(Unit* pWho) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_LOATHEB, IN_PROGRESS); + } + + void JustDied(Unit* pKiller) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_LOATHEB, DONE); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // Corrupted Mind + if (m_uiCorruptedMindTimer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_CORRUPTED_MIND); + m_uiCorruptedMindTimer = 62000; + } + else + m_uiCorruptedMindTimer -= uiDiff; + + // Poison Aura + if (m_uiPoisonAuraTimer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_POISON_AURA); + m_uiPoisonAuraTimer = 60000; + } + else + m_uiPoisonAuraTimer -= uiDiff; + + // Inevitable Doom + if (m_uiInevitableDoomTimer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_INEVITABLE_DOOM); + m_uiInevitableDoomTimer = 120000; + } + else + m_uiInevitableDoomTimer -= uiDiff; + + // Inevitable Doom 5mins + if (m_uiInevitableDoom5minsTimer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_INEVITABLE_DOOM); + m_uiInevitableDoom5minsTimer = 15000; + } + else + m_uiInevitableDoom5minsTimer -= uiDiff; + + // Remove Curse + if (m_uiRemoveCurseTimer < uiDiff) + { + DoCast(m_creature, SPELL_REMOVE_CURSE); + m_uiRemoveCurseTimer = 30000; + } + else + m_uiRemoveCurseTimer -= uiDiff; + + // Summon + if (m_uiSummonTimer < uiDiff) + { + Unit* pSummonedSpores = NULL; + + pSummonedSpores = m_creature->SummonCreature(16286,ADD_1X,ADD_1Y,ADD_1Z,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000); + pSummonedSpores = m_creature->SummonCreature(16286,ADD_2X,ADD_2Y,ADD_2Z,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000); + pSummonedSpores = m_creature->SummonCreature(16286,ADD_3X,ADD_3Y,ADD_3Z,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000); + if (pSummonedSpores) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + pSummonedSpores->AddThreat(pTarget,1.0f); + } + + m_uiSummonTimer = 28000; + } + else + m_uiSummonTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_loatheb(Creature* pCreature) +{ + return new boss_loathebAI(pCreature); +} + +void AddSC_boss_loatheb() +{ + Script* NewScript; + NewScript = new Script; + NewScript->Name = "boss_loatheb"; + NewScript->GetAI = &GetAI_boss_loatheb; + NewScript->RegisterSelf(); +} diff --git a/scripts/northrend/naxxramas/boss_maexxna.cpp b/scripts/northrend/naxxramas/boss_maexxna.cpp new file mode 100644 index 000000000..8e5f4f1f2 --- /dev/null +++ b/scripts/northrend/naxxramas/boss_maexxna.cpp @@ -0,0 +1,270 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Maexxna +SD%Complete: 60 +SDComment: this needs review, and rewrite of the webwrap ability +SDCategory: Naxxramas +EndScriptData */ + +#include "precompiled.h" +#include "naxxramas.h" + +enum +{ + SPELL_WEBWRAP = 28622, //Spell is normally used by the webtrap on the wall NOT by Maexxna + + SPELL_WEBSPRAY = 29484, + H_SPELL_WEBSPRAY = 54125, + SPELL_POISONSHOCK = 28741, + H_SPELL_POISONSHOCK = 54122, + SPELL_NECROTICPOISON = 28776, + H_SPELL_NECROTICPOISON = 54121, + SPELL_FRENZY = 54123, + H_SPELL_FRENZY = 54124, + + //spellId invalid + SPELL_SUMMON_SPIDERLING = 29434, +}; + +#define LOC_X1 3546.796 +#define LOC_Y1 -3869.082 +#define LOC_Z1 296.450 + +#define LOC_X2 3531.271 +#define LOC_Y2 -3847.424 +#define LOC_Z2 299.450 + +#define LOC_X3 3497.067 +#define LOC_Y3 -3843.384 +#define LOC_Z3 302.384 + +struct MANGOS_DLL_DECL mob_webwrapAI : public ScriptedAI +{ + mob_webwrapAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint64 m_uiVictimGUID; + + void Reset() + { + m_uiVictimGUID = 0; + } + + void SetVictim(Unit* pVictim) + { + if (pVictim) + { + m_uiVictimGUID = pVictim->GetGUID(); + pVictim->CastSpell(pVictim, SPELL_WEBWRAP, true); + } + } + + void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + { + if (uiDamage > m_creature->GetHealth()) + { + if (m_uiVictimGUID) + { + if (Unit* pVictim = Unit::GetUnit((*m_creature), m_uiVictimGUID)) + pVictim->RemoveAurasDueToSpell(SPELL_WEBWRAP); + } + } + } + + void MoveInLineOfSight(Unit* pWho) { } + void UpdateAI(const uint32 uiDiff) { } +}; + +struct MANGOS_DLL_DECL boss_maexxnaAI : public ScriptedAI +{ + boss_maexxnaAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + uint32 m_uiWebWrapTimer; + uint32 m_uiWebSprayTimer; + uint32 m_uiPoisonShockTimer; + uint32 m_uiNecroticPoisonTimer; + uint32 m_uiSummonSpiderlingTimer; + bool m_bEnraged; + + void Reset() + { + m_uiWebWrapTimer = 20000; //20 sec init, 40 sec normal + m_uiWebSprayTimer = 40000; //40 seconds + m_uiPoisonShockTimer = 20000; //20 seconds + m_uiNecroticPoisonTimer = 30000; //30 seconds + m_uiSummonSpiderlingTimer = 30000; //30 sec init, 40 sec normal + m_bEnraged = false; + } + + void Aggro(Unit* pWho) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_MAEXXNA, IN_PROGRESS); + } + + void JustDied(Unit* pKiller) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_MAEXXNA, DONE); + } + + void DoCastWebWrap() + { + std::list t_list = m_creature->getThreatManager().getThreatList(); + std::vector targets; + + //This spell doesn't work if we only have 1 player on threat list + if (t_list.size() < 2) + return; + + //begin + 1 , so we don't target the one with the highest threat + std::list::iterator itr = t_list.begin(); + std::advance(itr, 1); + + //store the threat list in a different container + for(; itr!= t_list.end(); ++itr) + { + Unit* target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()); + + //only on alive players + if (target && target->isAlive() && target->GetTypeId() == TYPEID_PLAYER) + targets.push_back(target); + } + + //cut down to size if we have more than 3 targets + while(targets.size() > 3) + targets.erase(targets.begin()+rand()%targets.size()); + + int i = 0; + + for(std::vector::iterator iter = targets.begin(); iter!= targets.end(); ++iter, ++i) + { + // Teleport the 3 targets to a location on the wall and summon a Web Wrap on them + switch(i) + { + case 0: + DoTeleportPlayer((*iter), LOC_X1, LOC_Y1, LOC_Z1, (*iter)->GetOrientation()); + if (Creature* pWrap = m_creature->SummonCreature(16486, LOC_X1, LOC_Y1, LOC_Z1, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 120000)) + ((mob_webwrapAI*)pWrap->AI())->SetVictim((*iter)); + break; + case 1: + DoTeleportPlayer((*iter), LOC_X2, LOC_Y2, LOC_Z2, (*iter)->GetOrientation()); + if (Creature* pWrap = m_creature->SummonCreature(16486, LOC_X2, LOC_Y2, LOC_Z2, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 120000)) + ((mob_webwrapAI*)pWrap->AI())->SetVictim((*iter)); + break; + case 2: + DoTeleportPlayer((*iter), LOC_X3, LOC_Y3, LOC_Z3, (*iter)->GetOrientation()); + if (Creature* pWrap = m_creature->SummonCreature(16486, LOC_X3, LOC_Y3, LOC_Z3, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 120000)) + ((mob_webwrapAI*)pWrap->AI())->SetVictim((*iter)); + break; + } + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // Web Wrap + if (m_uiWebWrapTimer < uiDiff) + { + DoCastWebWrap(); + m_uiWebWrapTimer = 40000; + } + else + m_uiWebWrapTimer -= uiDiff; + + // Web Spray + if (m_uiWebSprayTimer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_WEBSPRAY); + m_uiWebSprayTimer = 40000; + } + else + m_uiWebSprayTimer -= uiDiff; + + // Poison Shock + if (m_uiPoisonShockTimer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_POISONSHOCK); + m_uiPoisonShockTimer = 20000; + } + else + m_uiPoisonShockTimer -= uiDiff; + + // Necrotic Poison + if (m_uiNecroticPoisonTimer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_NECROTICPOISON); + m_uiNecroticPoisonTimer = 30000; + } + else + m_uiNecroticPoisonTimer -= uiDiff; + + // Summon Spiderling + if (m_uiSummonSpiderlingTimer < uiDiff) + { + DoCast(m_creature, SPELL_SUMMON_SPIDERLING); + m_uiSummonSpiderlingTimer = 40000; + } + else + m_uiSummonSpiderlingTimer -= uiDiff; + + //Enrage if not already enraged and below 30% + if (!m_bEnraged && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 30) + { + DoCast(m_creature, SPELL_FRENZY); + m_bEnraged = true; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_webwrap(Creature* pCreature) +{ + return new mob_webwrapAI(pCreature); +} + +CreatureAI* GetAI_boss_maexxna(Creature* pCreature) +{ + return new boss_maexxnaAI(pCreature); +} + +void AddSC_boss_maexxna() +{ + Script* NewScript; + + NewScript = new Script; + NewScript->Name = "boss_maexxna"; + NewScript->GetAI = &GetAI_boss_maexxna; + NewScript->RegisterSelf(); + + NewScript = new Script; + NewScript->Name = "mob_webwrap"; + NewScript->GetAI = &GetAI_mob_webwrap; + NewScript->RegisterSelf(); +} diff --git a/scripts/northrend/naxxramas/boss_noth.cpp b/scripts/northrend/naxxramas/boss_noth.cpp new file mode 100644 index 000000000..33bb921d4 --- /dev/null +++ b/scripts/northrend/naxxramas/boss_noth.cpp @@ -0,0 +1,184 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Noth +SD%Complete: 40 +SDComment: Missing Balcony stage +SDCategory: Naxxramas +EndScriptData */ + +#include "precompiled.h" +#include "naxxramas.h" + +enum +{ + SAY_AGGRO1 = -1533075, + SAY_AGGRO2 = -1533076, + SAY_AGGRO3 = -1533077, + SAY_SUMMON = -1533078, + SAY_SLAY1 = -1533079, + SAY_SLAY2 = -1533080, + SAY_DEATH = -1533081, + + SPELL_BLINK = 29211, //29208, 29209 and 29210 too + SPELL_CRIPPLE = 29212, + SPELL_CRIPPLE_H = 54814, + SPELL_CURSE_PLAGUEBRINGER = 29213, + SPELL_CURSE_PLAGUEBRINGER_H = 54835, + + SPELL_SUMMON_CHAMPION_AND_CONSTRUCT = 29240, + SPELL_SUMMON_GUARDIAN_AND_CONSTRUCT = 29269, + + NPC_PLAGUED_WARRIOR = 16984, + +}; + +uint32 m_auiSpellSummonPlaguedWarrior[]= +{ + 29247, 29248, 29249 +}; + +uint32 m_auiSpellSummonPlaguedChampion[]= +{ + 29217, 29224, 29225, 29227, 29238, 29255, 29257, 29258, 29262, 29267 +}; + +uint32 m_auiSpellSummonPlaguedGuardian[]= +{ + 29226, 29239, 29256, 29268 +}; + +// Teleport position of Noth on his balcony +#define TELE_X 2631.370 +#define TELE_Y -3529.680 +#define TELE_Z 274.040 +#define TELE_O 6.277 + +// IMPORTANT: BALCONY TELEPORT NOT ADDED YET! WILL BE ADDED SOON! +// Dev note 26.12.2008: When is soon? :) +// Dev note 12.10.2009: http://www.wowwiki.com/Soon + +struct MANGOS_DLL_DECL boss_nothAI : public ScriptedAI +{ + boss_nothAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + uint32 m_uiBlinkTimer; + uint32 m_uiCurseTimer; + uint32 m_uiSummonTimer; + + void Reset() + { + m_uiBlinkTimer = 25000; + m_uiCurseTimer = 4000; + m_uiSummonTimer = 12000; + } + + void Aggro(Unit* pWho) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_AGGRO1, m_creature); break; + case 1: DoScriptText(SAY_AGGRO2, m_creature); break; + case 2: DoScriptText(SAY_AGGRO3, m_creature); break; + } + + if (m_pInstance) + m_pInstance->SetData(TYPE_NOTH, IN_PROGRESS); + } + + void JustSummoned(Creature* pSummoned) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + pSummoned->AddThreat(pTarget, 0.0f); + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(urand(0, 1)?SAY_SLAY1:SAY_SLAY2, m_creature); + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_NOTH, DONE); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // Blink + if (m_uiBlinkTimer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_CRIPPLE); + DoCast(m_creature, SPELL_BLINK); + + m_uiBlinkTimer = 25000; + } + else + m_uiBlinkTimer -= uiDiff; + + // Curse + if (m_uiCurseTimer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_CURSE_PLAGUEBRINGER); + m_uiCurseTimer = 28000; + } + else + m_uiCurseTimer -= uiDiff; + + // Summon + if (m_uiSummonTimer < uiDiff) + { + DoScriptText(SAY_SUMMON, m_creature); + + for(uint8 i = 0; i < 6; ++i) + m_creature->SummonCreature(NPC_PLAGUED_WARRIOR, 2684.804, -3502.517, 261.313, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 80000); + + m_uiSummonTimer = 30500; + } + else + m_uiSummonTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_noth(Creature* pCreature) +{ + return new boss_nothAI(pCreature); +} + +void AddSC_boss_noth() +{ + Script* NewScript; + NewScript = new Script; + NewScript->Name = "boss_noth"; + NewScript->GetAI = &GetAI_boss_noth; + NewScript->RegisterSelf(); +} diff --git a/scripts/northrend/naxxramas/boss_patchwerk.cpp b/scripts/northrend/naxxramas/boss_patchwerk.cpp new file mode 100644 index 000000000..5018b47f4 --- /dev/null +++ b/scripts/northrend/naxxramas/boss_patchwerk.cpp @@ -0,0 +1,191 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Patchwerk +SD%Complete: 80 +SDComment: TODO: confirm how hateful strike work +SDCategory: Naxxramas +EndScriptData */ + +#include "precompiled.h" +#include "naxxramas.h" + +enum +{ + SAY_AGGRO1 = -1533017, + SAY_AGGRO2 = -1533018, + SAY_SLAY = -1533019, + SAY_DEATH = -1533020, + + EMOTE_BERSERK = -1533021, + EMOTE_ENRAGE = -1533022, + + SPELL_HATEFULSTRIKE = 28308, + SPELL_HATEFULSTRIKE_H = 59192, + SPELL_ENRAGE = 28131, + SPELL_BERSERK = 26662, + SPELL_SLIMEBOLT = 32309 +}; + +const float MELEE_DISTANCE = 5.0; + +struct MANGOS_DLL_DECL boss_patchwerkAI : public ScriptedAI +{ + boss_patchwerkAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + uint32 m_uiHatefulStrikeTimer; + uint32 m_uiBerserkTimer; + uint32 m_uiSlimeboltTimer; + bool m_bEnraged; + bool m_bBerserk; + + void Reset() + { + m_uiHatefulStrikeTimer = 1000; //1 second + m_uiBerserkTimer = MINUTE*6*IN_MILISECONDS; //6 minutes + m_uiSlimeboltTimer = 10000; + m_bEnraged = false; + m_bBerserk = false; + } + + void KilledUnit(Unit* pVictim) + { + if (urand(0, 4)) + return; + + DoScriptText(SAY_SLAY, m_creature); + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_PATCHWERK, DONE); + } + + void Aggro(Unit* pWho) + { + DoScriptText(urand(0, 1)?SAY_AGGRO1:SAY_AGGRO2, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_PATCHWERK, IN_PROGRESS); + } + + void DoHatefulStrike() + { + // The ability is used on highest HP target choosen of the top 2 (3 heroic) targets on threat list being in melee range + Unit* pTarget = NULL; + uint32 uiHighestHP = 0; + uint32 uiTargets = m_bIsHeroicMode?3:2; + + std::list::iterator iter = m_creature->getThreatManager().getThreatList().begin(); + for (iter = m_creature->getThreatManager().getThreatList().begin(); iter != m_creature->getThreatManager().getThreatList().end(); ++iter) + { + if (!uiTargets) + return; + + if (Unit* pTempTarget = Unit::GetUnit((*m_creature), (*iter)->getUnitGuid())) + { + if (pTempTarget->GetHealth() > uiHighestHP && m_creature->IsWithinDistInMap(pTempTarget, MELEE_DISTANCE)) + { + uiHighestHP = pTempTarget->GetHealth(); + pTarget = pTempTarget; + } + } + + --uiTargets; + } + + if (pTarget) + DoCast(pTarget, m_bIsHeroicMode?SPELL_HATEFULSTRIKE_H:SPELL_HATEFULSTRIKE); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // Hateful Strike + if (m_uiHatefulStrikeTimer < uiDiff) + { + DoHatefulStrike(); + m_uiHatefulStrikeTimer = 1000; + } + else + m_uiHatefulStrikeTimer -= uiDiff; + + // Soft Enrage at 5% + if (!m_bEnraged) + { + if (m_creature->GetHealth()*20 < m_creature->GetMaxHealth()) + { + DoCast(m_creature, SPELL_ENRAGE); + DoScriptText(EMOTE_ENRAGE, m_creature); + m_bEnraged = true; + } + } + + // Berserk after 6 minutes + if (!m_bBerserk) + { + if (m_uiBerserkTimer < uiDiff) + { + DoCast(m_creature, SPELL_BERSERK); + DoScriptText(EMOTE_BERSERK, m_creature); + m_bBerserk = true; + } + else + m_uiBerserkTimer -= uiDiff; + } + else + { + // Slimebolt - casted only while Berserking to prevent kiting + if (m_uiSlimeboltTimer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_SLIMEBOLT); + m_uiSlimeboltTimer = 5000; + } + else + m_uiSlimeboltTimer -= uiDiff; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_patchwerk(Creature* pCreature) +{ + return new boss_patchwerkAI(pCreature); +} + +void AddSC_boss_patchwerk() +{ + Script* NewScript; + NewScript = new Script; + NewScript->Name = "boss_patchwerk"; + NewScript->GetAI = &GetAI_boss_patchwerk; + NewScript->RegisterSelf(); +} diff --git a/scripts/northrend/naxxramas/boss_razuvious.cpp b/scripts/northrend/naxxramas/boss_razuvious.cpp new file mode 100644 index 000000000..90287f27e --- /dev/null +++ b/scripts/northrend/naxxramas/boss_razuvious.cpp @@ -0,0 +1,169 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Razuvious +SD%Complete: 75% +SDComment: TODO: Timers and sounds need confirmation, implement spell Hopeless +SDCategory: Naxxramas +EndScriptData */ + +#include "precompiled.h" +#include "naxxramas.h" + +enum +{ + SAY_AGGRO1 = -1533120, + SAY_AGGRO2 = -1533121, + SAY_AGGRO3 = -1533122, + SAY_SLAY1 = -1533123, + SAY_SLAY2 = -1533124, + SAY_COMMAND1 = -1533125, + SAY_COMMAND2 = -1533126, + SAY_COMMAND3 = -1533127, + SAY_COMMAND4 = -1533128, + SAY_DEATH = -1533129, + + SPELL_UNBALANCING_STRIKE = 26613, + SPELL_DISRUPTING_SHOUT = 55543, + SPELL_DISRUPTING_SHOUT_H = 29107, + SPELL_JAGGED_KNIFE = 55550, + SPELL_HOPELESS = 29125 +}; + +struct MANGOS_DLL_DECL boss_razuviousAI : public ScriptedAI +{ + boss_razuviousAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + uint32 m_uiUnbalancingStrikeTimer; + uint32 m_uiDisruptingShoutTimer; + uint32 m_uiJaggedKnifeTimer; + uint32 m_uiCommandSoundTimer; + + void Reset() + { + m_uiUnbalancingStrikeTimer = 30000; // 30 seconds + m_uiDisruptingShoutTimer = 15000; // 15 seconds + m_uiJaggedKnifeTimer = urand(10000, 15000); + m_uiCommandSoundTimer = 40000; // 40 seconds + } + + void KilledUnit(Unit* Victim) + { + if (urand(0, 3)) + return; + + switch(urand(0, 1)) + { + case 0: DoScriptText(SAY_SLAY1, m_creature); break; + case 1: DoScriptText(SAY_SLAY2, m_creature); break; + } + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_RAZUVIOUS, DONE); + } + + void Aggro(Unit* pWho) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_AGGRO1, m_creature); break; + case 1: DoScriptText(SAY_AGGRO2, m_creature); break; + case 2: DoScriptText(SAY_AGGRO3, m_creature); break; + } + + if (m_pInstance) + m_pInstance->SetData(TYPE_RAZUVIOUS, IN_PROGRESS); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // Unbalancing Strike + if (m_uiUnbalancingStrikeTimer < uiDiff) + { + DoCast(m_creature->getVictim(),SPELL_UNBALANCING_STRIKE); + m_uiUnbalancingStrikeTimer = 30000; + } + else + m_uiUnbalancingStrikeTimer -= uiDiff; + + // Disrupting Shout + if (m_uiDisruptingShoutTimer < uiDiff) + { + DoCast(m_creature->getVictim(), m_bIsHeroicMode?SPELL_DISRUPTING_SHOUT_H:SPELL_DISRUPTING_SHOUT); + m_uiDisruptingShoutTimer = 25000; + } + else + m_uiDisruptingShoutTimer -= uiDiff; + + // Jagged Knife + if (m_uiJaggedKnifeTimer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, SPELL_JAGGED_KNIFE); + m_uiJaggedKnifeTimer = 10000; + } + else + m_uiJaggedKnifeTimer -= uiDiff; + + // Random say + if (m_uiCommandSoundTimer < uiDiff) + { + switch(urand(0, 3)) + { + case 0: DoScriptText(SAY_COMMAND1, m_creature); break; + case 1: DoScriptText(SAY_COMMAND2, m_creature); break; + case 2: DoScriptText(SAY_COMMAND3, m_creature); break; + case 3: DoScriptText(SAY_COMMAND4, m_creature); break; + } + + m_uiCommandSoundTimer = 40000; + } + else + m_uiCommandSoundTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_razuvious(Creature* pCreature) +{ + return new boss_razuviousAI(pCreature); +} + +void AddSC_boss_razuvious() +{ + Script* NewScript; + NewScript = new Script; + NewScript->Name = "boss_razuvious"; + NewScript->GetAI = &GetAI_boss_razuvious; + NewScript->RegisterSelf(); +} diff --git a/scripts/northrend/naxxramas/boss_sapphiron.cpp b/scripts/northrend/naxxramas/boss_sapphiron.cpp new file mode 100644 index 000000000..918d2bc6b --- /dev/null +++ b/scripts/northrend/naxxramas/boss_sapphiron.cpp @@ -0,0 +1,205 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Sapphiron +SD%Complete: 0 +SDComment: Place Holder +SDCategory: Naxxramas +EndScriptData */ + +#include "precompiled.h" +#include "naxxramas.h" + +enum +{ + EMOTE_BREATH = -1533082, + EMOTE_ENRAGE = -1533083, + + SPELL_ICEBOLT = 28522, + SPELL_FROST_BREATH = 29318, + SPELL_FROST_AURA = 28531, + SPELL_LIFE_DRAIN = 28542, + SPELL_BLIZZARD = 28547, + SPELL_BESERK = 26662 +}; + +struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI +{ + boss_sapphironAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + uint32 Icebolt_Count; + uint32 Icebolt_Timer; + uint32 FrostBreath_Timer; + uint32 FrostAura_Timer; + uint32 LifeDrain_Timer; + uint32 Blizzard_Timer; + uint32 Fly_Timer; + uint32 Beserk_Timer; + uint32 phase; + bool landoff; + uint32 land_Timer; + + void Reset() + { + FrostAura_Timer = 2000; + FrostBreath_Timer = 2500; + LifeDrain_Timer = 24000; + Blizzard_Timer = 20000; + Fly_Timer = 45000; + Icebolt_Timer = 4000; + land_Timer = 2000; + Beserk_Timer = 0; + phase = 1; + Icebolt_Count = 0; + landoff = false; + + //m_creature->ApplySpellMod(SPELL_FROST_AURA, SPELLMOD_DURATION, -1); + } + + void Aggro(Unit* pWho) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_SAPPHIRON, IN_PROGRESS); + } + + void JustDied(Unit* pKiller) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_SAPPHIRON, DONE); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (phase == 1) + { + if (FrostAura_Timer < uiDiff) + { + DoCast(m_creature->getVictim(),SPELL_FROST_AURA); + FrostAura_Timer = 5000; + }else FrostAura_Timer -= uiDiff; + + if (LifeDrain_Timer < uiDiff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_LIFE_DRAIN); + + LifeDrain_Timer = 24000; + }else LifeDrain_Timer -= uiDiff; + + if (Blizzard_Timer < uiDiff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_BLIZZARD); + + Blizzard_Timer = 20000; + }else Blizzard_Timer -= uiDiff; + + if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() > 10) + { + if (Fly_Timer < uiDiff) + { + phase = 2; + m_creature->InterruptNonMeleeSpells(false); + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF); + m_creature->GetMotionMaster()->Clear(false); + m_creature->GetMotionMaster()->MoveIdle(); + DoCast(m_creature,11010); + m_creature->SetHover(true); + DoCast(m_creature,18430); + Icebolt_Timer = 4000; + Icebolt_Count = 0; + landoff = false; + }else Fly_Timer -= uiDiff; + } + } + + if (phase == 2) + { + if (Icebolt_Timer < uiDiff && Icebolt_Count < 5) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_ICEBOLT); + + ++Icebolt_Count; + Icebolt_Timer = 4000; + }else Icebolt_Timer -= uiDiff; + + if (Icebolt_Count == 5 && !landoff) + { + if (FrostBreath_Timer < uiDiff) + { + DoScriptText(EMOTE_BREATH, m_creature); + DoCast(m_creature->getVictim(),SPELL_FROST_BREATH); + land_Timer = 2000; + landoff = true; + FrostBreath_Timer = 6000; + }else FrostBreath_Timer -= uiDiff; + } + + if (landoff) + { + if (land_Timer < uiDiff) + { + phase = 1; + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LAND); + m_creature->SetHover(false); + m_creature->GetMotionMaster()->Clear(false); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + Fly_Timer = 67000; + }else land_Timer -= uiDiff; + } + } + + if ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() <= 10) + { + if (Beserk_Timer < uiDiff) + { + DoScriptText(EMOTE_ENRAGE, m_creature); + DoCast(m_creature,SPELL_BESERK); + Beserk_Timer = 300000; + }else Beserk_Timer -= uiDiff; + } + + if (phase!=2) + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_sapphiron(Creature* pCreature) +{ + return new boss_sapphironAI(pCreature); +} + +void AddSC_boss_sapphiron() +{ + Script* NewScript; + NewScript = new Script; + NewScript->Name = "boss_sapphiron"; + NewScript->GetAI = &GetAI_boss_sapphiron; + NewScript->RegisterSelf(); +} diff --git a/scripts/northrend/naxxramas/boss_thaddius.cpp b/scripts/northrend/naxxramas/boss_thaddius.cpp new file mode 100644 index 000000000..fd8b55834 --- /dev/null +++ b/scripts/northrend/naxxramas/boss_thaddius.cpp @@ -0,0 +1,74 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Thaddius +SD%Complete: 0 +SDComment: Placeholder. Includes Feugen & Stalagg. +SDCategory: Naxxramas +EndScriptData */ + +#include "precompiled.h" +#include "naxxramas.h" + +enum +{ + // Stalagg + SAY_STAL_AGGRO = -1533023, + SAY_STAL_SLAY = -1533024, + SAY_STAL_DEATH = -1533025, + + SPELL_POWERSURGE = 28134, + + //Feugen + SAY_FEUG_AGGRO = -1533026, + SAY_FEUG_SLAY = -1533027, + SAY_FEUG_DEATH = -1533028, + + SPELL_MANABURN = 28135, + + //both + SPELL_WARSTOMP = 28125, + + //Thaddus + SAY_GREET = -1533029, + SAY_AGGRO1 = -1533030, + SAY_AGGRO2 = -1533031, + SAY_AGGRO3 = -1533032, + SAY_SLAY = -1533033, + SAY_ELECT = -1533034, + SAY_DEATH = -1533035, + SAY_SCREAM1 = -1533036, + SAY_SCREAM2 = -1533037, + SAY_SCREAM3 = -1533038, + SAY_SCREAM4 = -1533039, + + SPELL_BALL_LIGHTNING = 28299, + + SPELL_CHARGE_POSITIVE_DMGBUFF = 29659, + SPELL_CHARGE_POSITIVE_NEARDMG = 28059, + + SPELL_CHARGE_NEGATIVE_DMGBUFF = 29660, + SPELL_CHARGE_NEGATIVE_NEARDMG = 28084, + + SPELL_CHAIN_LIGHTNING = 28167, + H_SPELL_CHAIN_LIGHTNING = 54531, + + SPELL_BESERK = 26662, + + //generic + C_TESLA_COIL = 16218 //the coils (emotes "Tesla Coil overloads!") +}; diff --git a/scripts/northrend/naxxramas/instance_naxxramas.cpp b/scripts/northrend/naxxramas/instance_naxxramas.cpp new file mode 100644 index 000000000..97cce7a14 --- /dev/null +++ b/scripts/northrend/naxxramas/instance_naxxramas.cpp @@ -0,0 +1,517 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance_Naxxramas +SD%Complete: 90% +SDComment: +SDCategory: Naxxramas +EndScriptData */ + +#include "precompiled.h" +#include "naxxramas.h" + +struct MANGOS_DLL_DECL instance_naxxramas : public ScriptedInstance +{ + instance_naxxramas(Map* pMap) : ScriptedInstance(pMap) {Initialize();} + + std::string strInstData; + uint32 m_auiEncounter[MAX_ENCOUNTER]; + + uint64 m_uiAracEyeRampGUID; + uint64 m_uiPlagEyeRampGUID; + uint64 m_uiMiliEyeRampGUID; + uint64 m_uiConsEyeRampGUID; + + uint64 m_uiAracPortalGUID; + uint64 m_uiPlagPortalGUID; + uint64 m_uiMiliPortalGUID; + uint64 m_uiConsPortalGUID; + + uint64 m_uiAnubRekhanGUID; + uint64 m_uiFaerlinanGUID; + + uint64 m_uiZeliekGUID; + uint64 m_uiThaneGUID; + uint64 m_uiBlaumeuxGUID; + uint64 m_uiRivendareGUID; + + uint64 m_uiThaddiusGUID; + uint64 m_uiStalaggGUID; + uint64 m_uiFeugenGUID; + + uint64 m_uiPathExitDoorGUID; + uint64 m_uiGlutExitDoorGUID; + uint64 m_uiThadDoorGUID; + + uint64 m_uiAnubDoorGUID; + uint64 m_uiAnubGateGUID; + uint64 m_uiFaerDoorGUID; + uint64 m_uiFaerWebGUID; + uint64 m_uiMaexOuterGUID; + uint64 m_uiMaexInnerGUID; + + uint64 m_uiGothCombatGateGUID; + uint64 m_uiGothikEntryDoorGUID; + uint64 m_uiGothikExitDoorGUID; + uint64 m_uiHorsemenDoorGUID; + uint64 m_uiHorsemenChestGUID; + + uint64 m_uiNothEntryDoorGUID; + uint64 m_uiNothExitDoorGUID; + uint64 m_uiHeigEntryDoorGUID; + uint64 m_uiHeigExitDoorGUID; + uint64 m_uiLoathebDoorGUID; + + uint64 m_uiKelthuzadDoorGUID; + + void Initialize() + { + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + + m_uiAracEyeRampGUID = 0; + m_uiPlagEyeRampGUID = 0; + m_uiMiliEyeRampGUID = 0; + m_uiConsEyeRampGUID = 0; + + m_uiAracPortalGUID = 0; + m_uiPlagPortalGUID = 0; + m_uiMiliPortalGUID = 0; + m_uiConsPortalGUID = 0; + + m_uiAnubRekhanGUID = 0; + m_uiFaerlinanGUID = 0; + + m_uiZeliekGUID = 0; + m_uiThaneGUID = 0; + m_uiBlaumeuxGUID = 0; + m_uiRivendareGUID = 0; + + m_uiThaddiusGUID = 0; + m_uiStalaggGUID = 0; + m_uiFeugenGUID = 0; + + m_uiPathExitDoorGUID = 0; + m_uiGlutExitDoorGUID = 0; + m_uiThadDoorGUID = 0; + + m_uiAnubDoorGUID = 0; + m_uiAnubGateGUID = 0; + m_uiFaerDoorGUID = 0; + m_uiFaerWebGUID = 0; + m_uiMaexOuterGUID = 0; + m_uiMaexInnerGUID = 0; + + m_uiGothCombatGateGUID = 0; + m_uiGothikEntryDoorGUID = 0; + m_uiGothikExitDoorGUID = 0; + m_uiHorsemenDoorGUID = 0; + m_uiHorsemenChestGUID = 0; + + m_uiNothEntryDoorGUID = 0; + m_uiNothExitDoorGUID = 0; + m_uiHeigEntryDoorGUID = 0; + m_uiHeigExitDoorGUID = 0; + m_uiLoathebDoorGUID = 0; + + m_uiKelthuzadDoorGUID = 0; + } + + void OnCreatureCreate(Creature* pCreature) + { + switch(pCreature->GetEntry()) + { + case NPC_ANUB_REKHAN: m_uiAnubRekhanGUID = pCreature->GetGUID(); break; + case NPC_FAERLINA: m_uiFaerlinanGUID = pCreature->GetGUID(); break; + case NPC_THADDIUS: m_uiThaddiusGUID = pCreature->GetGUID(); break; + case NPC_STALAGG: m_uiStalaggGUID = pCreature->GetGUID(); break; + case NPC_FEUGEN: m_uiFeugenGUID = pCreature->GetGUID(); break; + case NPC_ZELIEK: m_uiZeliekGUID = pCreature->GetGUID(); break; + case NPC_THANE: m_uiThaneGUID = pCreature->GetGUID(); break; + case NPC_BLAUMEUX: m_uiBlaumeuxGUID = pCreature->GetGUID(); break; + case NPC_RIVENDARE: m_uiRivendareGUID = pCreature->GetGUID(); break; + } + } + + void OnObjectCreate(GameObject* pGo) + { + switch(pGo->GetEntry()) + { + case GO_ARAC_ANUB_DOOR: + m_uiAnubDoorGUID = pGo->GetGUID(); + break; + case GO_ARAC_ANUB_GATE: + m_uiAnubGateGUID = pGo->GetGUID(); + if (m_auiEncounter[0] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_ARAC_FAER_WEB: + m_uiFaerWebGUID = pGo->GetGUID(); + break; + case GO_ARAC_FAER_DOOR: + m_uiFaerDoorGUID = pGo->GetGUID(); + if (m_auiEncounter[1] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_ARAC_MAEX_INNER_DOOR: + m_uiMaexInnerGUID = pGo->GetGUID(); + break; + case GO_ARAC_MAEX_OUTER_DOOR: + m_uiMaexOuterGUID = pGo->GetGUID(); + if (m_auiEncounter[2] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + + case GO_PLAG_NOTH_ENTRY_DOOR: + m_uiNothEntryDoorGUID = pGo->GetGUID(); + break; + case GO_PLAG_NOTH_EXIT_DOOR: + m_uiNothExitDoorGUID = pGo->GetGUID(); + if (m_auiEncounter[3] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_PLAG_HEIG_ENTRY_DOOR: + m_uiHeigEntryDoorGUID = pGo->GetGUID(); + if (m_auiEncounter[3] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_PLAG_HEIG_EXIT_DOOR: + m_uiHeigExitDoorGUID = pGo->GetGUID(); + if (m_auiEncounter[4] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_PLAG_LOAT_DOOR: + m_uiLoathebDoorGUID = pGo->GetGUID(); + break; + + case GO_MILI_GOTH_ENTRY_GATE: + m_uiGothikEntryDoorGUID = pGo->GetGUID(); + break; + case GO_MILI_GOTH_EXIT_GATE: + m_uiGothikExitDoorGUID = pGo->GetGUID(); + if (m_auiEncounter[7] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_MILI_GOTH_COMBAT_GATE: + m_uiGothCombatGateGUID = pGo->GetGUID(); + break; + case GO_MILI_HORSEMEN_DOOR: + m_uiHorsemenDoorGUID = pGo->GetGUID(); + if (m_auiEncounter[7] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + + case GO_CHEST_HORSEMEN_NORM: + m_uiHorsemenChestGUID = pGo->GetGUID(); + break; + + case GO_CONS_PATH_EXIT_DOOR: + m_uiPathExitDoorGUID = pGo->GetGUID(); + if (m_auiEncounter[9] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_CONS_GLUT_EXIT_DOOR: + m_uiGlutExitDoorGUID = pGo->GetGUID(); + if (m_auiEncounter[11] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_CONS_THAD_DOOR: + m_uiThadDoorGUID = pGo->GetGUID(); + if (m_auiEncounter[11] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + + case GO_KELTHUZAD_WATERFALL_DOOR: + m_uiKelthuzadDoorGUID = pGo->GetGUID(); + if (m_auiEncounter[13] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + + case GO_ARAC_EYE_RAMP: + m_uiAracEyeRampGUID = pGo->GetGUID(); + if (m_auiEncounter[2] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_PLAG_EYE_RAMP: + m_uiPlagEyeRampGUID = pGo->GetGUID(); + if (m_auiEncounter[5] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_MILI_EYE_RAMP: + m_uiMiliEyeRampGUID = pGo->GetGUID(); + if (m_auiEncounter[8] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_CONS_EYE_RAMP: + m_uiConsEyeRampGUID = pGo->GetGUID(); + if (m_auiEncounter[12] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + + case GO_ARAC_PORTAL: + m_uiAracPortalGUID = pGo->GetGUID(); + break; + case GO_PLAG_PORTAL: + m_uiPlagPortalGUID = pGo->GetGUID(); + break; + case GO_MILI_PORTAL: + m_uiMiliPortalGUID = pGo->GetGUID(); + break; + case GO_CONS_PORTAL: + m_uiConsPortalGUID = pGo->GetGUID(); + break; + } + } + + void SetData(uint32 uiType, uint32 uiData) + { + switch(uiType) + { + case TYPE_ANUB_REKHAN: + m_auiEncounter[0] = uiData; + DoUseDoorOrButton(m_uiAnubDoorGUID); + if (uiData == DONE) + DoUseDoorOrButton(m_uiAnubGateGUID); + break; + case TYPE_FAERLINA: + m_auiEncounter[1] = uiData; + DoUseDoorOrButton(m_uiFaerWebGUID); + if (uiData == DONE) + { + DoUseDoorOrButton(m_uiFaerDoorGUID); + DoUseDoorOrButton(m_uiMaexOuterGUID); + } + break; + case TYPE_MAEXXNA: + m_auiEncounter[2] = uiData; + DoUseDoorOrButton(m_uiMaexInnerGUID, uiData); + if (uiData == DONE) + { + DoUseDoorOrButton(m_uiAracEyeRampGUID); + DoRespawnGameObject(m_uiAracPortalGUID, 30*MINUTE); + } + break; + case TYPE_NOTH: + m_auiEncounter[3] = uiData; + DoUseDoorOrButton(m_uiNothEntryDoorGUID); + if (uiData == DONE) + { + DoUseDoorOrButton(m_uiNothExitDoorGUID); + DoUseDoorOrButton(m_uiHeigEntryDoorGUID); + } + break; + case TYPE_HEIGAN: + m_auiEncounter[4] = uiData; + DoUseDoorOrButton(m_uiHeigEntryDoorGUID); + if (uiData == DONE) + DoUseDoorOrButton(m_uiHeigExitDoorGUID); + break; + case TYPE_LOATHEB: + m_auiEncounter[5] = uiData; + DoUseDoorOrButton(m_uiLoathebDoorGUID); + if (uiData == DONE) + { + DoUseDoorOrButton(m_uiPlagEyeRampGUID); + DoRespawnGameObject(m_uiPlagPortalGUID, 30*MINUTE); + } + break; + case TYPE_RAZUVIOUS: + m_auiEncounter[6] = uiData; + if (uiData == DONE) + DoUseDoorOrButton(m_uiGothikEntryDoorGUID); + break; + case TYPE_GOTHIK: + m_auiEncounter[7] = uiData; + DoUseDoorOrButton(m_uiGothikEntryDoorGUID); + if (uiData == DONE) + { + DoUseDoorOrButton(m_uiGothikExitDoorGUID); + DoUseDoorOrButton(m_uiHorsemenDoorGUID); + } + break; + case TYPE_FOUR_HORSEMEN: + m_auiEncounter[8] = uiData; + DoUseDoorOrButton(m_uiHorsemenDoorGUID); + if (uiData == DONE) + { + DoUseDoorOrButton(m_uiMiliEyeRampGUID); + DoRespawnGameObject(m_uiMiliPortalGUID, 30*MINUTE); + DoRespawnGameObject(m_uiHorsemenChestGUID, 30*MINUTE); + } + break; + case TYPE_PATCHWERK: + m_auiEncounter[9] = uiData; + if (uiData == DONE) + DoUseDoorOrButton(m_uiPathExitDoorGUID); + break; + case TYPE_GROBBULUS: + m_auiEncounter[10] = uiData; + break; + case TYPE_GLUTH: + m_auiEncounter[11] = uiData; + if (uiData == DONE) + { + DoUseDoorOrButton(m_uiGlutExitDoorGUID); + DoUseDoorOrButton(m_uiThadDoorGUID); + } + break; + case TYPE_THADDIUS: + m_auiEncounter[12] = uiData; + DoUseDoorOrButton(m_uiThadDoorGUID, uiData); + if (uiData == DONE) + { + DoUseDoorOrButton(m_uiConsEyeRampGUID); + DoRespawnGameObject(m_uiConsPortalGUID, 30*MINUTE); + } + break; + case TYPE_SAPPHIRON: + m_auiEncounter[13] = uiData; + if (uiData == DONE) + DoUseDoorOrButton(m_uiKelthuzadDoorGUID); + break; + case TYPE_KELTHUZAD: + m_auiEncounter[14] = uiData; + break; + } + + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " + << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " + << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8] << " " + << m_auiEncounter[9] << " " << m_auiEncounter[10] << " " << m_auiEncounter[11] << " " + << m_auiEncounter[12] << " " << m_auiEncounter[13] << " " << m_auiEncounter[14]; + + strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } + } + + const char* Save() + { + return strInstData.c_str(); + } + + void Load(const char* chrIn) + { + if (!chrIn) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(chrIn); + + std::istringstream loadStream(chrIn); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] + >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] + >> m_auiEncounter[8] >> m_auiEncounter[9] >> m_auiEncounter[10] >> m_auiEncounter[11] + >> m_auiEncounter[12] >> m_auiEncounter[13] >> m_auiEncounter[14]; + + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; + } + + OUT_LOAD_INST_DATA_COMPLETE; + } + + uint32 GetData(uint32 uiType) + { + switch(uiType) + { + case TYPE_ANUB_REKHAN: + return m_auiEncounter[0]; + case TYPE_FAERLINA: + return m_auiEncounter[1]; + case TYPE_MAEXXNA: + return m_auiEncounter[2]; + case TYPE_NOTH: + return m_auiEncounter[3]; + case TYPE_HEIGAN: + return m_auiEncounter[4]; + case TYPE_LOATHEB: + return m_auiEncounter[5]; + case TYPE_RAZUVIOUS: + return m_auiEncounter[6]; + case TYPE_GOTHIK: + return m_auiEncounter[7]; + case TYPE_FOUR_HORSEMEN: + return m_auiEncounter[8]; + case TYPE_PATCHWERK: + return m_auiEncounter[9]; + case TYPE_GROBBULUS: + return m_auiEncounter[10]; + case TYPE_GLUTH: + return m_auiEncounter[11]; + case TYPE_THADDIUS: + return m_auiEncounter[12]; + case TYPE_SAPPHIRON: + return m_auiEncounter[13]; + case TYPE_KELTHUZAD: + return m_auiEncounter[14]; + } + return 0; + } + + uint64 GetData64(uint32 uiData) + { + switch(uiData) + { + case NPC_ANUB_REKHAN: + return m_uiAnubRekhanGUID; + case NPC_FAERLINA: + return m_uiFaerlinanGUID; + case GO_MILI_GOTH_COMBAT_GATE: + return m_uiGothCombatGateGUID; + case NPC_ZELIEK: + return m_uiZeliekGUID; + case NPC_THANE: + return m_uiThaneGUID; + case NPC_BLAUMEUX: + return m_uiBlaumeuxGUID; + case NPC_RIVENDARE: + return m_uiRivendareGUID; + case NPC_THADDIUS: + return m_uiThaddiusGUID; + case NPC_STALAGG: + return m_uiStalaggGUID; + case NPC_FEUGEN: + return m_uiFeugenGUID; + } + return 0; + } +}; + +InstanceData* GetInstanceData_instance_naxxramas(Map* pMap) +{ + return new instance_naxxramas(pMap); +} + +void AddSC_instance_naxxramas() +{ + Script* pNewScript; + pNewScript = new Script; + pNewScript->Name = "instance_naxxramas"; + pNewScript->GetInstanceData = &GetInstanceData_instance_naxxramas; + pNewScript->RegisterSelf(); +} diff --git a/scripts/northrend/naxxramas/naxxramas.h b/scripts/northrend/naxxramas/naxxramas.h new file mode 100644 index 000000000..fc148de98 --- /dev/null +++ b/scripts/northrend/naxxramas/naxxramas.h @@ -0,0 +1,95 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_NAXXRAMAS_H +#define DEF_NAXXRAMAS_H + +enum +{ + MAX_ENCOUNTER = 15, + + TYPE_ANUB_REKHAN = 1, + TYPE_FAERLINA = 2, + TYPE_MAEXXNA = 3, + + TYPE_NOTH = 4, + TYPE_HEIGAN = 5, + TYPE_LOATHEB = 6, + + TYPE_RAZUVIOUS = 7, + TYPE_GOTHIK = 8, + TYPE_FOUR_HORSEMEN = 9, + + TYPE_PATCHWERK = 10, + TYPE_GROBBULUS = 11, + TYPE_GLUTH = 12, + TYPE_THADDIUS = 13, + TYPE_STALAGG = 14, + TYPE_FEUGEN = 15, + + TYPE_SAPPHIRON = 16, + TYPE_KELTHUZAD = 17, + + NPC_ANUB_REKHAN = 15956, + NPC_FAERLINA = 15953, + + NPC_THADDIUS = 15928, + NPC_STALAGG = 15929, + NPC_FEUGEN = 15930, + + NPC_ZELIEK = 16063, + NPC_THANE = 16064, + NPC_BLAUMEUX = 16065, + NPC_RIVENDARE = 30549, + + // Arachnid Quarter + GO_ARAC_ANUB_DOOR = 181126, //encounter door + GO_ARAC_ANUB_GATE = 181195, //open after boss is dead + GO_ARAC_FAER_WEB = 181235, //encounter door + GO_ARAC_FAER_DOOR = 194022, //after faerlina, to outer ring + GO_ARAC_MAEX_INNER_DOOR = 181197, //encounter door + GO_ARAC_MAEX_OUTER_DOOR = 181209, //right before maex + + // Plague Quarter + GO_PLAG_SLIME01_DOOR = 181198, //not used + GO_PLAG_SLIME02_DOOR = 181199, //not used + GO_PLAG_NOTH_ENTRY_DOOR = 181200, //encounter door + GO_PLAG_NOTH_EXIT_DOOR = 181201, //exit, open when boss dead + GO_PLAG_HEIG_ENTRY_DOOR = 181202, + GO_PLAG_HEIG_EXIT_DOOR = 181203, //exit, open when boss dead + GO_PLAG_LOAT_DOOR = 181241, //encounter door + + // Military Quarter + GO_MILI_GOTH_ENTRY_GATE = 181124, //open after razuvious died + GO_MILI_GOTH_EXIT_GATE = 181125, //exit, open at boss dead + GO_MILI_GOTH_COMBAT_GATE = 181170, //used while encounter is in progress + GO_MILI_HORSEMEN_DOOR = 181119, //encounter door + + GO_CHEST_HORSEMEN_NORM = 181366, //four horsemen event, DoRespawnGameObject() when event == DONE + GO_CHEST_HORSEMEN_HERO = 193426, + + // Construct Quarter + GO_CONS_PATH_EXIT_DOOR = 181123, + GO_CONS_GLUT_EXIT_DOOR = 181120, + GO_CONS_THAD_DOOR = 181121, // Thaddius enc door + + // Frostwyrm Lair + GO_KELTHUZAD_WATERFALL_DOOR = 181225, // exit, open after sapphiron is dead + + // Eyes + GO_ARAC_EYE_RAMP = 181212, + GO_PLAG_EYE_RAMP = 181211, + GO_MILI_EYE_RAMP = 181210, + GO_CONS_EYE_RAMP = 181213, + + // Portals + GO_ARAC_PORTAL = 181575, + GO_PLAG_PORTAL = 181577, + GO_MILI_PORTAL = 181578, + GO_CONS_PORTAL = 181576, + + AREATRIGGER_FROSTWYRM = 4120 //not needed here, but AT to be scripted +}; + +#endif diff --git a/scripts/northrend/nexus/nexus/boss_anomalus.cpp b/scripts/northrend/nexus/nexus/boss_anomalus.cpp new file mode 100644 index 000000000..a6c51a79a --- /dev/null +++ b/scripts/northrend/nexus/nexus/boss_anomalus.cpp @@ -0,0 +1,254 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Anomalus +SD%Complete: 50% +SDComment: TODO: remove hacks, add support for rift charging +SDCategory: Nexus +EndScriptData */ + +#include "precompiled.h" +#include "nexus.h" + +enum +{ + SAY_AGGRO = -1576006, + SAY_RIFT = -1576007, + SAY_SHIELD = -1576008, + SAY_KILL = -1576009, + SAY_DEATH = -1576010, + EMOTE_OPEN_RIFT = -1576021, + EMOTE_SHIELD = -1576022, + + // Anomalus + SPELL_CREATE_RIFT = 47743, + SPELL_CHARGE_RIFT = 47747, + SPELL_RIFT_SHIELD = 47748, + + SPELL_SPARK = 47751, + SPELL_SPARK_H = 57062, + + SPELL_ARCANE_FORM = 48019, + // Chaotic Rift + SPELL_RIFT_AURA = 47687, + SPELL_RIFT_SUMMON_AURA = 47732, + + // Charged Chaotic Rift + SPELL_CHARGED_RIFT_AURA = 47733, + SPELL_CHARGED_RIFT_SUMMON_AURA = 47742, + + SPELL_SUMMON_CRAZED_MANA_WRAITH = 47692, + NPC_CHAOTIC_RIFT = 26918, + NPC_CRAZED_MANA_WRAITH = 26746 +}; + +/*###### +## boss_anomalus +######*/ + +struct MANGOS_DLL_DECL boss_anomalusAI : public ScriptedAI +{ + boss_anomalusAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + uint32 m_uiSparkTimer; + uint32 m_uiCreateRiftTimer; + uint64 m_uiChaoticRiftGUID; + uint8 m_uiShieldCount; + + void Reset() + { + m_uiSparkTimer = 5000; + m_uiCreateRiftTimer = 25000; + m_uiChaoticRiftGUID = 0; + m_uiShieldCount = 3; + + if (m_pInstance) + m_pInstance->SetData(TYPE_ANOMALUS, NOT_STARTED); + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_ANOMALUS, IN_PROGRESS); + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_ANOMALUS, DONE); + } + + void KilledUnit(Unit* pVictim) + { + if (urand(0, 1)) + DoScriptText(SAY_KILL, m_creature); + } + + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_CHAOTIC_RIFT) + { + DoScriptText(SAY_RIFT, m_creature); + + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); + } + } + + void SummonedCreatureDespawn(Creature* pSummoned) + { + if (pSummoned->GetGUID() == m_uiChaoticRiftGUID) + { + if (m_creature->HasAura(SPELL_RIFT_SHIELD)) + m_creature->RemoveAurasDueToSpell(SPELL_RIFT_SHIELD); + + m_uiChaoticRiftGUID = 0; + } + } + + uint64 CreateRiftAtRandomPoint() + { + float fPosX, fPosY, fPosZ; + m_creature->GetPosition(fPosX, fPosY, fPosZ); + m_creature->GetRandomPoint(fPosX, fPosY, fPosZ, urand(15, 25), fPosX, fPosY, fPosZ); + + Creature* pRift = m_creature->SummonCreature(NPC_CHAOTIC_RIFT, fPosX, fPosY, fPosZ, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 1000); + DoScriptText(EMOTE_OPEN_RIFT, m_creature); + + return pRift?pRift->GetGUID():0; + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim() || m_creature->HasAura(SPELL_RIFT_SHIELD)) + return; + + // Create additional Chaotic Rift at 75%, 50% and 25% HP + if (m_creature->GetHealth()*4 < m_creature->GetMaxHealth()*m_uiShieldCount) + { + DoScriptText(EMOTE_SHIELD, m_creature); + m_uiChaoticRiftGUID = CreateRiftAtRandomPoint(); + + DoScriptText(SAY_SHIELD, m_creature); + DoCast(m_creature, SPELL_RIFT_SHIELD); + --m_uiShieldCount; + return; + } + + if (m_uiCreateRiftTimer < uiDiff) + { + CreateRiftAtRandomPoint(); + m_uiCreateRiftTimer = 25000; + } + else + m_uiCreateRiftTimer -= uiDiff; + + if (m_uiSparkTimer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, m_bIsHeroicMode?SPELL_SPARK_H:SPELL_SPARK); + + m_uiSparkTimer = 5000; + } + else + m_uiSparkTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_anomalus(Creature* pCreature) +{ + return new boss_anomalusAI(pCreature); +} + +struct MANGOS_DLL_DECL mob_chaotic_riftAI : public Scripted_NoMovementAI +{ + mob_chaotic_riftAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + uint32 m_uiSummonTimer; + + void Reset() + { + m_uiSummonTimer = 16000; + DoCast(m_creature, SPELL_RIFT_AURA); + //DoCast(m_creature, SPELL_RIFT_SUMMON_AURA); + } + + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_CRAZED_MANA_WRAITH) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (!m_creature->HasAura(SPELL_ARCANE_FORM)) + DoCast(m_creature, SPELL_ARCANE_FORM); + + if (m_uiSummonTimer < uiDiff) + { + DoCast(m_creature, SPELL_SUMMON_CRAZED_MANA_WRAITH); + m_uiSummonTimer = 16000; + } + else + m_uiSummonTimer -= uiDiff; + } +}; + +CreatureAI* GetAI_mob_chaotic_rift(Creature* pCreature) +{ + return new mob_chaotic_riftAI(pCreature); +} + +void AddSC_boss_anomalus() +{ + Script* newscript; + + newscript = new Script; + newscript->Name = "boss_anomalus"; + newscript->GetAI = &GetAI_boss_anomalus; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_chaotic_rift"; + newscript->GetAI = &GetAI_mob_chaotic_rift; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/nexus/nexus/boss_keristrasza.cpp b/scripts/northrend/nexus/nexus/boss_keristrasza.cpp new file mode 100644 index 000000000..f647ee431 --- /dev/null +++ b/scripts/northrend/nexus/nexus/boss_keristrasza.cpp @@ -0,0 +1,106 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Keristrasza +SD%Complete: 10% +SDComment: +SDCategory: Nexus +EndScriptData */ + +#include "precompiled.h" + +enum +{ + SAY_AGGRO = -1576016, + SAY_CRYSTAL_NOVA = -1576017, + SAY_ENRAGE = -1576018, + SAY_KILL = -1576019, + SAY_DEATH = -1576020, + + SPELL_CRYSTALFIRE_BREATH = 48096, + SPELL_CRYSTALFIRE_BREATH_H = 57091, + + SPELL_CRYSTALLIZE = 48179, + + SPELL_CRYSTAL_CHAINS = 50997, + SPELL_CRYSTAL_CHAINS_H = 57050, + + SPELL_TAIL_SWEEP = 50155, + SPELL_INTENSE_COLD = 48094, + + SPELL_ENRAGE = 8599 +}; + +/*###### +## boss_keristrasza +######*/ + +struct MANGOS_DLL_DECL boss_keristraszaAI : public ScriptedAI +{ + boss_keristraszaAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + void Reset() + { + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + } + + void KilledUnit(Unit* pVictim) + { + if (urand(0, 1)) + DoScriptText(SAY_KILL, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_keristrasza(Creature* pCreature) +{ + return new boss_keristraszaAI(pCreature); +} + +void AddSC_boss_keristrasza() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_keristrasza"; + newscript->GetAI = &GetAI_boss_keristrasza; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/nexus/nexus/boss_ormorok.cpp b/scripts/northrend/nexus/nexus/boss_ormorok.cpp new file mode 100644 index 000000000..b1c6c3897 --- /dev/null +++ b/scripts/northrend/nexus/nexus/boss_ormorok.cpp @@ -0,0 +1,177 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Ormorok +SD%Complete: 50% +SDComment: TODO: Correct timers. Research how spikes work, and attempt code it properly from mangos side. +SDCategory: Nexus +EndScriptData */ + +#include "precompiled.h" +#include "nexus.h" + +enum +{ + SAY_AGGRO = -1576011, + SAY_KILL = -1576012, + SAY_REFLECT = -1576013, + SAY_ICESPIKE = -1576014, + SAY_DEATH = -1576015, + EMOTE_BOSS_GENERIC_FRENZY = -1000005, + + SPELL_REFLECTION = 47981, + + SPELL_CRYSTAL_SPIKES = 47958, + SPELL_CRYSTAL_SPIKES_H1 = 57082, + SPELL_CRYSTAL_SPIKES_H2 = 57083, + + SPELL_FRENZY = 48017, + SPELL_FRENZY_H = 57086, + + SPELL_TRAMPLE = 48016, + SPELL_TRAMPLE_H = 57066, + + SPELL_SUMMON_TANGLER_H = 61564 +}; + +/*###### +## boss_ormorok +######*/ + +struct MANGOS_DLL_DECL boss_ormorokAI : public ScriptedAI +{ + boss_ormorokAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + bool m_bIsEnraged; + + uint32 m_uiTrampleTimer; + uint32 m_uiSpellReflectTimer; + uint32 m_uiCrystalSpikeTimer; + uint32 m_uiTanglerTimer; + + void Reset() + { + m_bIsEnraged = false; + + m_uiTrampleTimer = urand(10000, 35000); + m_uiSpellReflectTimer = urand(5000, 10000); + m_uiCrystalSpikeTimer = urand(15000, 30000); + m_uiTanglerTimer = 20000; + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_ORMOROK, DONE); + } + + void KilledUnit(Unit* pVictim) + { + if (urand(0, 1)) + DoScriptText(SAY_KILL, m_creature); + } + + void JustSummoned(Creature* pSummoned) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1)) + pSummoned->AI()->AttackStart(pTarget); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (!m_bIsEnraged && m_creature->GetHealth()*100 < m_creature->GetMaxHealth()*25) + { + if (!m_creature->IsNonMeleeSpellCasted(false)) + { + m_bIsEnraged = true; + DoScriptText(EMOTE_BOSS_GENERIC_FRENZY, m_creature); + DoCast(m_creature, m_bIsHeroicMode ? SPELL_FRENZY_H : SPELL_FRENZY); + } + } + + if (m_uiTrampleTimer < uiDiff) + { + DoCast(m_creature, m_bIsHeroicMode ? SPELL_TRAMPLE_H : SPELL_TRAMPLE); + m_uiTrampleTimer = urand(10000, 35000); + } + else + m_uiTrampleTimer -= uiDiff; + + if (m_uiSpellReflectTimer < uiDiff) + { + DoCast(m_creature, SPELL_REFLECTION); + m_uiSpellReflectTimer = urand(25000, 40000); + } + else + m_uiSpellReflectTimer -= uiDiff; + + if (m_uiCrystalSpikeTimer < uiDiff) + { + DoScriptText(SAY_ICESPIKE, m_creature); + DoCast(m_creature, SPELL_CRYSTAL_SPIKES); + m_uiCrystalSpikeTimer = urand(15000, 30000); + } + else + m_uiCrystalSpikeTimer -= uiDiff; + + if (m_bIsHeroicMode) + { + if (m_uiTanglerTimer < uiDiff) + { + DoCast(m_creature, SPELL_SUMMON_TANGLER_H); + m_uiTanglerTimer = urand(15000, 25000); + } + else + m_uiTanglerTimer -= uiDiff; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_ormorok(Creature* pCreature) +{ + return new boss_ormorokAI(pCreature); +} + +void AddSC_boss_ormorok() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_ormorok"; + newscript->GetAI = &GetAI_boss_ormorok; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/nexus/nexus/boss_telestra.cpp b/scripts/northrend/nexus/nexus/boss_telestra.cpp new file mode 100644 index 000000000..5bed1e86b --- /dev/null +++ b/scripts/northrend/nexus/nexus/boss_telestra.cpp @@ -0,0 +1,122 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Telestra +SD%Complete: 10% +SDComment: +SDCategory: Nexus +EndScriptData */ + +#include "precompiled.h" + +enum +{ + SAY_AGGRO = -1576000, + SAY_SPLIT_1 = -1576001, + SAY_SPLIT_2 = -1576002, + SAY_MERGE = -1576003, + SAY_KILL = -1576004, + SAY_DEATH = -1576005, + + SPELL_FIREBOMB = 47773, + SPELL_FIREBOMB_H = 56934, + + SPELL_ICE_NOVA = 47772, + SPELL_ICE_NOVA_H = 56935, + + SPELL_GRAVITY_WELL = 47756, + + SPELL_SUMMON_CLONES = 47710, + + SPELL_ARCANE_VISUAL = 47704, + SPELL_FIRE_VISUAL = 47705, + SPELL_FROST_VISUAL = 47706, + + SPELL_SUMMON_FIRE = 47707, + SPELL_SUMMON_ARCANE = 47708, + SPELL_SUMMON_FROST = 47709, + + SPELL_FIRE_DIES = 47711, + SPELL_ARCANE_DIES = 47713, + SPELL_FROST_DIES = 47712, + + SPELL_SPAWN_BACK_IN = 47714, + + NPC_TELEST_FIRE = 26928, + NPC_TELEST_ARCANE = 26929, + NPC_TELEST_FROST = 26930 +}; + +/*###### +## boss_telestra +######*/ + +struct MANGOS_DLL_DECL boss_telestraAI : public ScriptedAI +{ + boss_telestraAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + void Reset() + { + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + } + + void KilledUnit(Unit* pVictim) + { + if (urand(0, 1)) + DoScriptText(SAY_KILL, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_telestra(Creature* pCreature) +{ + return new boss_telestraAI(pCreature); +} + +void AddSC_boss_telestra() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_telestra"; + newscript->GetAI = &GetAI_boss_telestra; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/nexus/nexus/instance_nexus.cpp b/scripts/northrend/nexus/nexus/instance_nexus.cpp new file mode 100644 index 000000000..d5bb5021c --- /dev/null +++ b/scripts/northrend/nexus/nexus/instance_nexus.cpp @@ -0,0 +1,244 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: instance_nexus +SD%Complete: 75% +SDComment: +SDCategory: The Nexus +EndScriptData */ + +#include "precompiled.h" +#include "nexus.h" + +bool GOHello_go_containment_sphere(Player* pPlayer, GameObject* pGo) +{ + ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData(); + + if (!pInstance) + return false; + + switch(pGo->GetEntry()) + { + case GO_CONTAINMENT_SPHERE_TELESTRA: pInstance->SetData(TYPE_TELESTRA, SPECIAL); break; + case GO_CONTAINMENT_SPHERE_ANOMALUS: pInstance->SetData(TYPE_ANOMALUS, SPECIAL); break; + case GO_CONTAINMENT_SPHERE_ORMOROK: pInstance->SetData(TYPE_ORMOROK, SPECIAL); break; + } + + pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + pGo->SetGoState(GO_STATE_ACTIVE); + return true; +} + +struct MANGOS_DLL_DECL instance_nexus : public ScriptedInstance +{ + instance_nexus(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string strInstData; + + uint64 m_uiAnomalusGUID; + + uint64 m_uiTelestrasContainmentSphereGUID; + uint64 m_uiAnomalusContainmentSphereGUID; + uint64 m_uiOrmoroksContainmentSphereGUID; + + void Initialize() + { + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + + m_uiAnomalusGUID = 0; + + m_uiTelestrasContainmentSphereGUID = 0; + m_uiAnomalusContainmentSphereGUID = 0; + m_uiOrmoroksContainmentSphereGUID = 0; + } + + bool IsEncounterInProgress() const + { + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + return true; + } + + return false; + } + + void OnObjectCreate(GameObject* pGo) + { + switch(pGo->GetEntry()) + { + case GO_CONTAINMENT_SPHERE_TELESTRA: + m_uiTelestrasContainmentSphereGUID = pGo->GetGUID(); + if (m_auiEncounter[0] == DONE) + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + break; + case GO_CONTAINMENT_SPHERE_ANOMALUS: + m_uiAnomalusContainmentSphereGUID = pGo->GetGUID(); + if (m_auiEncounter[1] == DONE) + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + break; + case GO_CONTAINMENT_SPHERE_ORMOROK: + m_uiOrmoroksContainmentSphereGUID = pGo->GetGUID(); + if (m_auiEncounter[2] == DONE) + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + break; + } + } + + void OnCreatureCreate(Creature* pCreature) + { + switch(pCreature->GetEntry()) + { + case NPC_ANOMALUS: + m_uiAnomalusGUID = pCreature->GetGUID(); + break; + } + } + + uint64 GetData64(uint32 uiType) + { + switch(uiType) + { + case NPC_ANOMALUS: + return m_uiAnomalusGUID; + } + + return 0; + } + + uint32 GetData(uint32 uiType) + { + switch(uiType) + { + case TYPE_TELESTRA: + return m_auiEncounter[0]; + case TYPE_ANOMALUS: + return m_auiEncounter[1]; + case TYPE_ORMOROK: + return m_auiEncounter[2]; + case TYPE_KERISTRASZA: + return m_auiEncounter[3]; + } + + return 0; + } + + void SetData(uint32 uiType, uint32 uiData) + { + debug_log("SD2: Instance Nexus: SetData received for type %u with data %u", uiType, uiData); + + switch(uiType) + { + case TYPE_TELESTRA: + m_auiEncounter[0] = uiData; + if (uiData == DONE) + { + if (GameObject* pGo = instance->GetGameObject(m_uiTelestrasContainmentSphereGUID)) + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + } + break; + case TYPE_ANOMALUS: + m_auiEncounter[1] = uiData; + if (uiData == DONE) + { + if (GameObject* pGo = instance->GetGameObject(m_uiAnomalusContainmentSphereGUID)) + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + } + break; + case TYPE_ORMOROK: + m_auiEncounter[2] = uiData; + if (uiData == DONE) + { + if (GameObject* pGo = instance->GetGameObject(m_uiOrmoroksContainmentSphereGUID)) + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + } + break; + case TYPE_KERISTRASZA: + m_auiEncounter[3] = uiData; + break; + default: + error_log("SD2: Instance Nexus: ERROR SetData = %u for type %u does not exist/not implemented.", uiType, uiData); + break; + } + + if (m_auiEncounter[0] == SPECIAL && m_auiEncounter[1] == SPECIAL && m_auiEncounter[2] == SPECIAL) + { + // release Keristrasza from her prison here + } + + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3]; + + strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } + } + + const char* Save() + { + return strInstData.c_str(); + } + + void Load(const char* chrIn) + { + if (!chrIn) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(chrIn); + + std::istringstream loadStream(chrIn); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3]; + + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; + } + + OUT_LOAD_INST_DATA_COMPLETE; + } +}; + +InstanceData* GetInstanceData_instance_nexus(Map* pMap) +{ + return new instance_nexus(pMap); +} + +void AddSC_instance_nexus() +{ + Script* newscript; + + newscript = new Script; + newscript->Name = "instance_nexus"; + newscript->GetInstanceData = &GetInstanceData_instance_nexus; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "go_containment_sphere"; + newscript->pGOHello = &GOHello_go_containment_sphere; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/nexus/nexus/nexus.h b/scripts/northrend/nexus/nexus/nexus.h new file mode 100644 index 000000000..ac475a6c8 --- /dev/null +++ b/scripts/northrend/nexus/nexus/nexus.h @@ -0,0 +1,26 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_NEXUS_H +#define DEF_NEXUS_H + +enum +{ + MAX_ENCOUNTER = 4, + + TYPE_TELESTRA = 0, + TYPE_ANOMALUS = 1, + TYPE_ORMOROK = 2, + TYPE_KERISTRASZA = 3, + + NPC_TELESTRA = 26731, + NPC_ANOMALUS = 26763, + NPC_ORMOROK = 26794, + NPC_KERISTRASZA = 26723, + + GO_CONTAINMENT_SPHERE_TELESTRA = 188526, + GO_CONTAINMENT_SPHERE_ANOMALUS = 188527, + GO_CONTAINMENT_SPHERE_ORMOROK = 188528 +}; +#endif diff --git a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp new file mode 100644 index 000000000..f39a5b020 --- /dev/null +++ b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp @@ -0,0 +1,1141 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss Sartharion +SD%Complete: 70% +SDComment: Flame wave, achievement and portal events need to be implemented +SDCategory: Obsidian Sanctum +EndScriptData */ + +#include "precompiled.h" +#include "obsidian_sanctum.h" + +enum +{ + //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 + + //Sartharion Spells + SPELL_BERSERK = 61632, // Increases the caster's attack speed by 150% and all damage it deals by 500% for 5 min. + SPELL_CLEAVE = 56909, // Inflicts 35% weapon damage to an enemy and its nearest allies, affecting up to 10 targets. + SPELL_FLAME_BREATH = 56908, // Inflicts 8750 to 11250 Fire damage to enemies in a cone in front of the caster. + SPELL_FLAME_BREATH_H = 58956, // Inflicts 10938 to 14062 Fire damage to enemies in a cone in front of the caster. + SPELL_TAIL_LASH = 56910, // A sweeping tail strike hits all enemies behind the caster, inflicting 3063 to 3937 damage and stunning them for 2 sec. + SPELL_TAIL_LASH_H = 58957, // A sweeping tail strike hits all enemies behind the caster, inflicting 4375 to 5625 damage and stunning them for 2 sec. + SPELL_WILL_OF_SARTHARION = 61254, // Sartharion's presence bolsters the resolve of the Twilight Drakes, increasing their total health by 25%. This effect also increases Sartharion's health by 25%. + SPELL_LAVA_STRIKE = 57571, // (Real spell casted should be 57578) 57571 then trigger visual missile, then summon Lava Blaze on impact(spell 57572) + SPELL_TWILIGHT_REVENGE = 60639, + + SPELL_PYROBUFFET = 56916, // currently used for hard enrage after 15 minutes + SPELL_PYROBUFFET_RANGE = 58907, // possibly used when player get too far away from dummy creatures (2x creature entry 30494) + + SPELL_TWILIGHT_SHIFT_ENTER = 57620, // enter phase. Player get this when click GO + SPELL_TWILIGHT_SHIFT_REMOVAL = 61187, // leave phase + SPELL_TWILIGHT_SHIFT_REMOVAL_ALL = 61190, // leave phase (probably version to make all leave) + + //Mini bosses common spells + SPELL_TWILIGHT_RESIDUE = 61885, // makes immune to shadow damage, applied when leave phase + + //Miniboses (Vesperon, Shadron, Tenebron) + SPELL_SHADOW_BREATH_H = 59126, // Inflicts 8788 to 10212 Fire damage to enemies in a cone in front of the caster. + SPELL_SHADOW_BREATH = 57570, // Inflicts 6938 to 8062 Fire damage to enemies in a cone in front of the caster. + + SPELL_SHADOW_FISSURE_H = 59127, // Deals 9488 to 13512 Shadow damage to any enemy within the Shadow fissure after 5 sec. + SPELL_SHADOW_FISSURE = 57579, // Deals 6188 to 8812 Shadow damage to any enemy within the Shadow fissure after 5 sec. + + //Vesperon + //In portal is a disciple, when disciple killed remove Power_of_vesperon, portal open multiple times + NPC_ACOLYTE_OF_VESPERON = 31219, // Acolyte of Vesperon + SPELL_POWER_OF_VESPERON = 61251, // Vesperon's presence decreases the maximum health of all enemies by 25%. + SPELL_TWILIGHT_TORMENT_VESP = 57948, // (Shadow only) trigger 57935 then 57988 + SPELL_TWILIGHT_TORMENT_VESP_ACO = 58853, // (Fire and Shadow) trigger 58835 then 57988 + + //Shadron + //In portal is a disciple, when disciple killed remove Power_of_vesperon, portal open multiple times + NPC_ACOLYTE_OF_SHADRON = 31218, // Acolyte of Shadron + SPELL_POWER_OF_SHADRON = 58105, // Shadron's presence increases Fire damage taken by all enemies by 100%. + SPELL_GIFT_OF_TWILIGTH_SHA = 57835, // TARGET_SCRIPT shadron + SPELL_GIFT_OF_TWILIGTH_SAR = 58766, // TARGET_SCRIPT sartharion + + //Tenebron + //in the portal spawns 6 eggs, if not killed in time (approx. 20s) they will hatch, whelps can cast 60708 + SPELL_POWER_OF_TENEBRON = 61248, // Tenebron's presence increases Shadow damage taken by all enemies by 100%. + //Tenebron, dummy spell + SPELL_SUMMON_TWILIGHT_WHELP = 58035, // doesn't work, will spawn NPC_TWILIGHT_WHELP + SPELL_SUMMON_SARTHARION_TWILIGHT_WHELP = 58826, // doesn't work, will spawn NPC_SHARTHARION_TWILIGHT_WHELP + + SPELL_HATCH_EGGS_H = 59189, + SPELL_HATCH_EGGS = 58542, + SPELL_HATCH_EGGS_EFFECT_H = 59190, + SPELL_HATCH_EGGS_EFFECT = 58685, + + //Whelps + NPC_TWILIGHT_WHELP = 30890, + NPC_SHARTHARION_TWILIGHT_WHELP = 31214, + SPELL_FADE_ARMOR = 60708, // Reduces the armor of an enemy by 1500 for 15s + + //flame tsunami + SPELL_FLAME_TSUNAMI = 57494, // the visual dummy + SPELL_FLAME_TSUNAMI_LEAP = 60241, // SPELL_EFFECT_138 some leap effect, causing caster to move in direction + SPELL_FLAME_TSUNAMI_DMG_AURA = 57492, // periodic damage, npc has this aura + + NPC_FLAME_TSUNAMI = 30616, // for the flame waves + NPC_LAVA_BLAZE = 30643, // adds spawning from flame strike + + //using these custom points for dragons start and end + POINT_ID_INIT = 100, + POINT_ID_LAND = 200 +}; + +struct Waypoint +{ + float m_fX, m_fY, m_fZ; +}; + +//each dragons special points. First where fly to before connect to connon, second where land point is. +Waypoint m_aTene[]= +{ + {3212.854, 575.597, 109.856}, //init + {3246.425, 565.367, 61.249} //end +}; + +Waypoint m_aShad[]= +{ + {3293.238, 472.223, 106.968}, + {3271.669, 526.907, 61.931} +}; + +Waypoint m_aVesp[]= +{ + {3193.310, 472.861, 102.697}, + {3227.268, 533.238, 59.995} +}; + +//points around raid "isle", counter clockwise. should probably be adjusted to be more alike +Waypoint m_aDragonCommon[]= +{ + {3214.012, 468.932, 98.652}, + {3244.950, 468.427, 98.652}, + {3283.520, 496.869, 98.652}, + {3287.316, 555.875, 98.652}, + {3250.479, 585.827, 98.652}, + {3209.969, 566.523, 98.652} +}; + +/*###### +## Boss Sartharion +######*/ + +struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI +{ + boss_sartharionAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + m_bIsHeroic = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroic; + + bool m_bIsBerserk; + bool m_bIsSoftEnraged; + + uint32 m_uiEnrageTimer; + bool m_bIsHardEnraged; + + uint32 m_uiTenebronTimer; + uint32 m_uiShadronTimer; + uint32 m_uiVesperonTimer; + + uint32 m_uiFlameTsunamiTimer; + uint32 m_uiFlameBreathTimer; + uint32 m_uiTailSweepTimer; + uint32 m_uiCleaveTimer; + uint32 m_uiLavaStrikeTimer; + + bool m_bHasCalledTenebron; + bool m_bHasCalledShadron; + bool m_bHasCalledVesperon; + + void Reset() + { + m_bIsBerserk = false; + m_bIsSoftEnraged = false; + + m_uiEnrageTimer = MINUTE*15*IN_MILISECONDS; + m_bIsHardEnraged = false; + + m_uiTenebronTimer = 30000; + m_uiShadronTimer = 75000; + m_uiVesperonTimer = 120000; + + m_uiFlameTsunamiTimer = 30000; + m_uiFlameBreathTimer = 20000; + m_uiTailSweepTimer = 20000; + m_uiCleaveTimer = 7000; + m_uiLavaStrikeTimer = 5000; + + m_bHasCalledTenebron = false; + m_bHasCalledShadron = false; + m_bHasCalledVesperon = false; + + if (m_creature->HasAura(SPELL_TWILIGHT_REVENGE)) + m_creature->RemoveAurasDueToSpell(SPELL_TWILIGHT_REVENGE); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_SARTHARION_EVENT, NOT_STARTED); + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_SARTHARION_AGGRO,m_creature); + + m_creature->SetInCombatWithZone(); + + if (m_pInstance) + { + m_pInstance->SetData(TYPE_SARTHARION_EVENT, IN_PROGRESS); + FetchDragons(); + } + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_SARTHARION_DEATH,m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_SARTHARION_EVENT, DONE); + } + + void KilledUnit(Unit* pVictim) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_SARTHARION_SLAY_1, m_creature); break; + case 1: DoScriptText(SAY_SARTHARION_SLAY_2, m_creature); break; + case 2: DoScriptText(SAY_SARTHARION_SLAY_3, m_creature); break; + } + } + + void FetchDragons() + { + Unit* pTene = Unit::GetUnit(*m_creature,m_pInstance->GetData64(DATA_TENEBRON)); + Unit* pShad = Unit::GetUnit(*m_creature,m_pInstance->GetData64(DATA_SHADRON)); + Unit* pVesp = Unit::GetUnit(*m_creature,m_pInstance->GetData64(DATA_VESPERON)); + + //if at least one of the dragons are alive and are being called + bool bCanUseWill = false; + + if (pTene && pTene->isAlive() && !pTene->getVictim()) + { + bCanUseWill = true; + pTene->GetMotionMaster()->MovePoint(POINT_ID_INIT, m_aTene[0].m_fX, m_aTene[0].m_fY, m_aTene[0].m_fZ); + + if (!pTene->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + pTene->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + } + + if (pShad && pShad->isAlive() && !pShad->getVictim()) + { + bCanUseWill = true; + pShad->GetMotionMaster()->MovePoint(POINT_ID_INIT, m_aShad[0].m_fX, m_aShad[0].m_fY, m_aShad[0].m_fZ); + + if (!pShad->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + pShad->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + } + + if (pVesp && pVesp->isAlive() && !pVesp->getVictim()) + { + bCanUseWill = true; + pVesp->GetMotionMaster()->MovePoint(POINT_ID_INIT, m_aVesp[0].m_fX, m_aVesp[0].m_fY, m_aVesp[0].m_fZ); + + if (!pVesp->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + pVesp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + } + + if (bCanUseWill) + DoCast(m_creature, SPELL_WILL_OF_SARTHARION); + } + + void CallDragon(uint32 uiDataId) + { + if (m_pInstance) + { + Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(uiDataId)); + + if (pTemp && pTemp->isAlive() && !pTemp->getVictim()) + { + if (pTemp->HasMonsterMoveFlag(MONSTER_MOVE_WALK)) + pTemp->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + + if (pTemp->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + pTemp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + + int32 iTextId = 0; + + switch(pTemp->GetEntry()) + { + case NPC_TENEBRON: + iTextId = SAY_SARTHARION_CALL_TENEBRON; + pTemp->GetMotionMaster()->MovePoint(POINT_ID_LAND, m_aTene[1].m_fX, m_aTene[1].m_fY, m_aTene[1].m_fZ); + break; + case NPC_SHADRON: + iTextId = SAY_SARTHARION_CALL_SHADRON; + pTemp->GetMotionMaster()->MovePoint(POINT_ID_LAND, m_aShad[1].m_fX, m_aShad[1].m_fY, m_aShad[1].m_fZ); + break; + case NPC_VESPERON: + iTextId = SAY_SARTHARION_CALL_VESPERON; + pTemp->GetMotionMaster()->MovePoint(POINT_ID_LAND, m_aVesp[1].m_fX, m_aVesp[1].m_fY, m_aVesp[1].m_fZ); + break; + } + + DoScriptText(iTextId, m_creature); + } + } + } + + void SendFlameTsunami() + { + Map* pMap = m_creature->GetMap(); + + if (pMap && pMap->IsDungeon()) + { + Map::PlayerList const &PlayerList = pMap->GetPlayers(); + + if (!PlayerList.isEmpty()) + { + for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) + { + if (i->getSource()->isAlive()) + DoScriptText(WHISPER_LAVA_CHURN,m_creature,i->getSource()); + } + } + } + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //spell will target dragons, if they are still alive at 35% + if (!m_bIsBerserk && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) <= 35) + { + DoScriptText(SAY_SARTHARION_BERSERK,m_creature); + DoCast(m_creature,SPELL_BERSERK); + m_bIsBerserk = true; + } + + //soft enrage + if (!m_bIsSoftEnraged && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) <= 10) + { + // TODO + m_bIsSoftEnraged = true; + } + + // hard enrage + if (!m_bIsHardEnraged) + { + if (m_uiEnrageTimer < uiDiff) + { + DoCast(m_creature, SPELL_PYROBUFFET, true); + m_bIsHardEnraged = true; + } + else + m_uiEnrageTimer -= uiDiff; + } + + // flame tsunami + if (m_uiFlameTsunamiTimer < uiDiff) + { + SendFlameTsunami(); + m_uiFlameTsunamiTimer = 30000; + } + else + m_uiFlameTsunamiTimer -= uiDiff; + + // flame breath + if (m_uiFlameBreathTimer < uiDiff) + { + DoScriptText(SAY_SARTHARION_BREATH, m_creature); + DoCast(m_creature->getVictim(), m_bIsHeroic ? SPELL_FLAME_BREATH_H : SPELL_FLAME_BREATH); + m_uiFlameBreathTimer = urand(25000, 35000); + } + else + m_uiFlameBreathTimer -= uiDiff; + + // Tail Sweep + if (m_uiTailSweepTimer < uiDiff) + { + DoCast(m_creature->getVictim(), m_bIsHeroic ? SPELL_TAIL_LASH_H : SPELL_TAIL_LASH); + m_uiTailSweepTimer = urand(15000, 20000); + } + else + m_uiTailSweepTimer -= uiDiff; + + // Cleave + if (m_uiCleaveTimer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_CLEAVE); + m_uiCleaveTimer = urand(7000, 10000); + } + else + m_uiCleaveTimer -= uiDiff; + + // Lavas Strike + if (m_uiLavaStrikeTimer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + { + DoCast(pTarget, SPELL_LAVA_STRIKE); + + switch(urand(0, 15)) + { + case 0: DoScriptText(SAY_SARTHARION_SPECIAL_1, m_creature); break; + case 1: DoScriptText(SAY_SARTHARION_SPECIAL_2, m_creature); break; + case 2: DoScriptText(SAY_SARTHARION_SPECIAL_3, m_creature); break; + } + } + m_uiLavaStrikeTimer = urand(5000, 20000); + } + else + m_uiLavaStrikeTimer -= uiDiff; + + // call tenebron + if (!m_bHasCalledTenebron && m_uiTenebronTimer < uiDiff) + { + CallDragon(DATA_TENEBRON); + m_bHasCalledTenebron = true; + } + else + m_uiTenebronTimer -= uiDiff; + + // call shadron + if (!m_bHasCalledShadron && m_uiShadronTimer < uiDiff) + { + CallDragon(DATA_SHADRON); + m_bHasCalledShadron = true; + } + else + m_uiShadronTimer -= uiDiff; + + // call vesperon + if (!m_bHasCalledVesperon && m_uiVesperonTimer < uiDiff) + { + CallDragon(DATA_VESPERON); + m_bHasCalledVesperon = true; + } + else + m_uiVesperonTimer -= uiDiff; + + DoMeleeAttackIfReady(); + + EnterEvadeIfOutOfCombatArea(uiDiff); + } +}; + +CreatureAI* GetAI_boss_sartharion(Creature* pCreature) +{ + return new boss_sartharionAI(pCreature); +} + +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 +}; + +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 +}; + +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 +}; + +//to control each dragons common abilities +struct MANGOS_DLL_DECL dummy_dragonAI : public ScriptedAI +{ + dummy_dragonAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + m_bIsHeroic = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroic; + + uint32 m_uiWaypointId; + uint32 m_uiMoveNextTimer; + int32 m_iPortalRespawnTime; + bool m_bCanMoveFree; + + void Reset() + { + if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + + m_uiWaypointId = 0; + m_uiMoveNextTimer = 500; + m_iPortalRespawnTime = 30000; + m_bCanMoveFree = false; + } + + void MovementInform(uint32 uiType, uint32 uiPointId) + { + if (!m_pInstance || uiType != POINT_MOTION_TYPE) + return; + + debug_log("dummy_dragonAI: %s reached point %u", m_creature->GetName(), uiPointId); + + //if healers messed up the raid and we was already initialized + if (m_pInstance->GetData(TYPE_SARTHARION_EVENT) != IN_PROGRESS) + { + EnterEvadeMode(); + return; + } + + //this is the end (!) + if (uiPointId == POINT_ID_LAND) + { + m_creature->GetMotionMaster()->Clear(); + m_bCanMoveFree = false; + m_creature->SetInCombatWithZone(); + return; + } + + //get amount of common points + uint32 uiCommonWPCount = sizeof(m_aDragonCommon)/sizeof(Waypoint); + + //increase + m_uiWaypointId = uiPointId+1; + + //if we have reached a point bigger or equal to count, it mean we must reset to point 0 + if (m_uiWaypointId >= uiCommonWPCount) + { + if (!m_bCanMoveFree) + m_bCanMoveFree = true; + + m_uiWaypointId = 0; + } + + m_uiMoveNextTimer = 500; + } + + //used when open portal and spawn mobs in phase + void DoRaidWhisper(int32 iTextId) + { + Map* pMap = m_creature->GetMap(); + + if (pMap && pMap->IsDungeon()) + { + Map::PlayerList const &PlayerList = pMap->GetPlayers(); + + if (!PlayerList.isEmpty()) + { + for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) + DoScriptText(iTextId, m_creature, i->getSource()); + } + } + } + + //"opens" the portal and does the "opening" whisper + void OpenPortal() + { + int32 iTextId = 0; + + //there are 4 portal spawn locations, each are expected to be spawned with negative spawntimesecs in database + + //using a grid search here seem to be more efficient than caching all four guids + //in instance script and calculate range to each. + GameObject* pPortal = GetClosestGameObjectWithEntry(m_creature,GO_TWILIGHT_PORTAL,50.0f); + + switch(m_creature->GetEntry()) + { + case NPC_TENEBRON: + iTextId = WHISPER_HATCH_EGGS; + break; + case NPC_SHADRON: + case NPC_VESPERON: + iTextId = WHISPER_OPEN_PORTAL; + break; + } + + DoRaidWhisper(iTextId); + + //By using SetRespawnTime() we will actually "spawn" the object with our defined time. + //Once time is up, portal will disappear again. + if (pPortal && !pPortal->isSpawned()) + pPortal->SetRespawnTime(m_iPortalRespawnTime); + + //Unclear what are expected to happen if one drake has a portal open already + //Refresh respawnTime so time again are set to 30secs? + } + + //Removes each drakes unique debuff from players + void RemoveDebuff(uint32 uiSpellId) + { + Map* pMap = m_creature->GetMap(); + + if (pMap && pMap->IsDungeon()) + { + Map::PlayerList const &PlayerList = pMap->GetPlayers(); + + if (PlayerList.isEmpty()) + return; + + for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) + { + if (i->getSource()->isAlive() && i->getSource()->HasAura(uiSpellId)) + i->getSource()->RemoveAurasDueToSpell(uiSpellId); + } + } + } + + void JustDied(Unit* pKiller) + { + int32 iTextId = 0; + uint32 uiSpellId = 0; + + switch(m_creature->GetEntry()) + { + case NPC_TENEBRON: + iTextId = SAY_TENEBRON_DEATH; + uiSpellId = SPELL_POWER_OF_TENEBRON; + break; + case NPC_SHADRON: + iTextId = SAY_SHADRON_DEATH; + uiSpellId = SPELL_POWER_OF_SHADRON; + break; + case NPC_VESPERON: + iTextId = SAY_VESPERON_DEATH; + uiSpellId = SPELL_POWER_OF_VESPERON; + break; + } + + DoScriptText(iTextId, m_creature); + + RemoveDebuff(uiSpellId); + + if (m_pInstance) + { + // not if solo mini-boss fight + if (m_pInstance->GetData(TYPE_SARTHARION_EVENT) != IN_PROGRESS) + return; + + // Twilight Revenge to main boss + if (Unit* pSartharion = Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_SARTHARION))) + { + if (pSartharion->isAlive()) + m_creature->CastSpell(pSartharion,SPELL_TWILIGHT_REVENGE,true); + } + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_bCanMoveFree && m_uiMoveNextTimer) + { + if (m_uiMoveNextTimer <= uiDiff) + { + m_creature->GetMotionMaster()->MovePoint(m_uiWaypointId, + m_aDragonCommon[m_uiWaypointId].m_fX, m_aDragonCommon[m_uiWaypointId].m_fY, m_aDragonCommon[m_uiWaypointId].m_fZ); + + debug_log("dummy_dragonAI: %s moving to point %u", m_creature->GetName(), m_uiWaypointId); + m_uiMoveNextTimer = 0; + } + else + m_uiMoveNextTimer -= uiDiff; + } + } +}; + +/*###### +## Mob Tenebron +######*/ + +struct MANGOS_DLL_DECL mob_tenebronAI : public dummy_dragonAI +{ + mob_tenebronAI(Creature* pCreature) : dummy_dragonAI(pCreature) { Reset(); } + + uint32 m_uiShadowBreathTimer; + uint32 m_uiShadowFissureTimer; + uint32 m_uiHatchEggTimer; + + void Reset() + { + m_uiShadowBreathTimer = 20000; + m_uiShadowFissureTimer = 5000; + m_uiHatchEggTimer = 30000; + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_TENEBRON_AGGRO, m_creature); + DoCast(m_creature, SPELL_POWER_OF_TENEBRON); + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(urand(0, 1) ? SAY_TENEBRON_SLAY_1 : SAY_TENEBRON_SLAY_2, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + //if no target, update dummy and return + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + { + dummy_dragonAI::UpdateAI(uiDiff); + return; + } + + // shadow fissure + if (m_uiShadowFissureTimer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, m_bIsHeroic ? SPELL_SHADOW_FISSURE_H : SPELL_SHADOW_FISSURE); + + m_uiShadowFissureTimer = urand(15000, 20000); + } + else + m_uiShadowFissureTimer -= uiDiff; + + // shadow breath + if (m_uiShadowBreathTimer < uiDiff) + { + DoScriptText(SAY_TENEBRON_BREATH, m_creature); + DoCast(m_creature->getVictim(), m_bIsHeroic ? SPELL_SHADOW_BREATH_H : SPELL_SHADOW_BREATH); + m_uiShadowBreathTimer = urand(20000, 25000); + } + else + m_uiShadowBreathTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_tenebron(Creature* pCreature) +{ + return new mob_tenebronAI(pCreature); +} + +/*###### +## Mob Shadron +######*/ + +struct MANGOS_DLL_DECL mob_shadronAI : public dummy_dragonAI +{ + mob_shadronAI(Creature* pCreature) : dummy_dragonAI(pCreature) { Reset(); } + + uint32 m_uiShadowBreathTimer; + uint32 m_uiShadowFissureTimer; + uint32 m_uiAcolyteShadronTimer; + + void Reset() + { + m_uiShadowBreathTimer = 20000; + m_uiShadowFissureTimer = 5000; + m_uiAcolyteShadronTimer = 60000; + + if (m_creature->HasAura(SPELL_TWILIGHT_TORMENT_VESP)) + m_creature->RemoveAurasDueToSpell(SPELL_TWILIGHT_TORMENT_VESP); + + if (m_creature->HasAura(SPELL_GIFT_OF_TWILIGTH_SHA)) + m_creature->RemoveAurasDueToSpell(SPELL_GIFT_OF_TWILIGTH_SHA); + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_SHADRON_AGGRO,m_creature); + DoCast(m_creature, SPELL_POWER_OF_SHADRON); + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(urand(0, 1) ? SAY_SHADRON_SLAY_1 : SAY_SHADRON_SLAY_2, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + //if no target, update dummy and return + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + { + dummy_dragonAI::UpdateAI(uiDiff); + return; + } + + // shadow fissure + if (m_uiShadowFissureTimer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, m_bIsHeroic ? SPELL_SHADOW_FISSURE_H : SPELL_SHADOW_FISSURE); + + m_uiShadowFissureTimer = urand(15000, 20000); + } + else + m_uiShadowFissureTimer -= uiDiff; + + // shadow breath + if (m_uiShadowBreathTimer < uiDiff) + { + DoScriptText(SAY_SHADRON_BREATH, m_creature); + DoCast(m_creature->getVictim(), m_bIsHeroic ? SPELL_SHADOW_BREATH_H : SPELL_SHADOW_BREATH); + m_uiShadowBreathTimer = urand(20000, 25000); + } + else + m_uiShadowBreathTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_shadron(Creature* pCreature) +{ + return new mob_shadronAI(pCreature); +} + +/*###### +## Mob Vesperon +######*/ + +struct MANGOS_DLL_DECL mob_vesperonAI : public dummy_dragonAI +{ + mob_vesperonAI(Creature* pCreature) : dummy_dragonAI(pCreature) { Reset(); } + + uint32 m_uiShadowBreathTimer; + uint32 m_uiShadowFissureTimer; + uint32 m_uiAcolyteVesperonTimer; + + void Reset() + { + m_uiShadowBreathTimer = 20000; + m_uiShadowFissureTimer = 5000; + m_uiAcolyteVesperonTimer = 60000; + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_VESPERON_AGGRO,m_creature); + DoCast(m_creature, SPELL_POWER_OF_VESPERON); + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(urand(0, 1) ? SAY_VESPERON_SLAY_1 : SAY_VESPERON_SLAY_2, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + //if no target, update dummy and return + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + { + dummy_dragonAI::UpdateAI(uiDiff); + return; + } + + // shadow fissure + if (m_uiShadowFissureTimer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, m_bIsHeroic ? SPELL_SHADOW_FISSURE_H : SPELL_SHADOW_FISSURE); + + m_uiShadowFissureTimer = urand(15000, 20000); + } + else + m_uiShadowFissureTimer -= uiDiff; + + // shadow breath + if (m_uiShadowBreathTimer < uiDiff) + { + DoScriptText(SAY_VESPERON_BREATH, m_creature); + DoCast(m_creature->getVictim(), m_bIsHeroic ? SPELL_SHADOW_BREATH_H : SPELL_SHADOW_BREATH); + m_uiShadowBreathTimer = urand(20000, 25000); + } + else + m_uiShadowBreathTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_vesperon(Creature* pCreature) +{ + return new mob_vesperonAI(pCreature); +} + +/*###### +## Mob Acolyte of Shadron +######*/ + +struct MANGOS_DLL_DECL mob_acolyte_of_shadronAI : public ScriptedAI +{ + mob_acolyte_of_shadronAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + Reset(); + } + + ScriptedInstance* m_pInstance; + + void Reset() + { + if (m_pInstance) + { + //if not solo figth, buff main boss, else place debuff on mini-boss. both spells TARGET_SCRIPT + if (m_pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) + DoCast(m_creature, SPELL_GIFT_OF_TWILIGTH_SAR); + else + DoCast(m_creature, SPELL_GIFT_OF_TWILIGTH_SHA); + } + } + + void JustDied(Unit* killer) + { + if (m_pInstance) + { + Creature* pDebuffTarget = NULL; + + if (m_pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) + { + //not solo fight, so main boss has deduff + pDebuffTarget = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_SARTHARION)); + + if (pDebuffTarget && pDebuffTarget->isAlive() && pDebuffTarget->HasAura(SPELL_GIFT_OF_TWILIGTH_SAR)) + pDebuffTarget->RemoveAurasDueToSpell(SPELL_GIFT_OF_TWILIGTH_SAR); + } + else + { + //event not in progress, then solo fight and must remove debuff mini-boss + pDebuffTarget = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_SHADRON)); + + if (pDebuffTarget && pDebuffTarget->isAlive() && pDebuffTarget->HasAura(SPELL_GIFT_OF_TWILIGTH_SHA)) + pDebuffTarget->RemoveAurasDueToSpell(SPELL_GIFT_OF_TWILIGTH_SHA); + } + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_acolyte_of_shadron(Creature* pCreature) +{ + return new mob_acolyte_of_shadronAI(pCreature); +} + +/*###### +## Mob Acolyte of Vesperon +######*/ + +struct MANGOS_DLL_DECL mob_acolyte_of_vesperonAI : public ScriptedAI +{ + mob_acolyte_of_vesperonAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + Reset(); + } + + ScriptedInstance* m_pInstance; + + void Reset() + { + DoCast(m_creature, SPELL_TWILIGHT_TORMENT_VESP_ACO); + } + + void JustDied(Unit* pKiller) + { + // remove twilight torment on Vesperon + if (m_pInstance) + { + Creature* pVesperon = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_VESPERON)); + + if (pVesperon && pVesperon->isAlive() && pVesperon->HasAura(SPELL_TWILIGHT_TORMENT_VESP)) + pVesperon->RemoveAurasDueToSpell(SPELL_TWILIGHT_TORMENT_VESP); + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_acolyte_of_vesperon(Creature* pCreature) +{ + return new mob_acolyte_of_vesperonAI(pCreature); +} + +/*###### +## Mob Twilight Eggs +######*/ + +struct MANGOS_DLL_DECL mob_twilight_eggsAI : public ScriptedAI +{ + mob_twilight_eggsAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + void Reset() + { + } + + void AttackStart(Unit* pWho) { } + void MoveInLineOfSight(Unit* pWho) { } +}; + +CreatureAI* GetAI_mob_twilight_eggs(Creature* pCreature) +{ + return new mob_twilight_eggsAI(pCreature); +} + +/*###### +## Mob Twilight Whelps +######*/ + +struct MANGOS_DLL_DECL mob_twilight_whelpAI : public ScriptedAI +{ + mob_twilight_whelpAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + uint32 m_uiFadeArmorTimer; + + void Reset() + { + m_uiFadeArmorTimer = 1000; + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // twilight torment + if (m_uiFadeArmorTimer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_FADE_ARMOR); + m_uiFadeArmorTimer = urand(5000, 10000); + } + else + m_uiFadeArmorTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_twilight_whelp(Creature* pCreature) +{ + return new mob_twilight_whelpAI(pCreature); +} + +void AddSC_boss_sartharion() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_sartharion"; + newscript->GetAI = &GetAI_boss_sartharion; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_vesperon"; + newscript->GetAI = &GetAI_mob_vesperon; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_shadron"; + newscript->GetAI = &GetAI_mob_shadron; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_tenebron"; + newscript->GetAI = &GetAI_mob_tenebron; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_acolyte_of_shadron"; + newscript->GetAI = &GetAI_mob_acolyte_of_shadron; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_acolyte_of_vesperon"; + newscript->GetAI = &GetAI_mob_acolyte_of_vesperon; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_twilight_eggs"; + newscript->GetAI = &GetAI_mob_twilight_eggs; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_twilight_whelp"; + newscript->GetAI = &GetAI_mob_twilight_whelp; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp b/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp new file mode 100644 index 000000000..3f2ff18d3 --- /dev/null +++ b/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp @@ -0,0 +1,118 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance_Obsidian_Sanctum +SD%Complete: 80% +SDComment: +SDCategory: Obsidian Sanctum +EndScriptData */ + +#include "precompiled.h" +#include "obsidian_sanctum.h" + +/* Obsidian Sanctum encounters: +0 - Sartharion +*/ + +struct MANGOS_DLL_DECL instance_obsidian_sanctum : public ScriptedInstance +{ + instance_obsidian_sanctum(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + uint64 m_uiSartharionGUID; + uint64 m_uiTenebronGUID; + uint64 m_uiShadronGUID; + uint64 m_uiVesperonGUID; + + void Initialize() + { + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + + m_uiSartharionGUID = 0; + m_uiTenebronGUID = 0; + m_uiShadronGUID = 0; + m_uiVesperonGUID = 0; + } + + void OnCreatureCreate(Creature* pCreature) + { + switch(pCreature->GetEntry()) + { + case NPC_SARTHARION: + m_uiSartharionGUID = pCreature->GetGUID(); + break; + //three dragons below set to active state once created. + //we must expect bigger raid to encounter main boss, and then three dragons must be active due to grid differences + case NPC_TENEBRON: + m_uiTenebronGUID = pCreature->GetGUID(); + pCreature->SetActiveObjectState(true); + break; + case NPC_SHADRON: + m_uiShadronGUID = pCreature->GetGUID(); + pCreature->SetActiveObjectState(true); + break; + case NPC_VESPERON: + m_uiVesperonGUID = pCreature->GetGUID(); + pCreature->SetActiveObjectState(true); + break; + } + } + + void SetData(uint32 uiType, uint32 uiData) + { + if (uiType == TYPE_SARTHARION_EVENT) + m_auiEncounter[0] = uiData; + } + + uint32 GetData(uint32 uiType) + { + if (uiType == TYPE_SARTHARION_EVENT) + return m_auiEncounter[0]; + + return 0; + } + + uint64 GetData64(uint32 uiData) + { + switch(uiData) + { + case DATA_SARTHARION: + return m_uiSartharionGUID; + case DATA_TENEBRON: + return m_uiTenebronGUID; + case DATA_SHADRON: + return m_uiShadronGUID; + case DATA_VESPERON: + return m_uiVesperonGUID; + } + return 0; + } +}; + +InstanceData* GetInstanceData_instance_obsidian_sanctum(Map* pMap) +{ + return new instance_obsidian_sanctum(pMap); +} + +void AddSC_instance_obsidian_sanctum() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "instance_obsidian_sanctum"; + newscript->GetInstanceData = GetInstanceData_instance_obsidian_sanctum; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h b/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h new file mode 100644 index 000000000..518d5a41a --- /dev/null +++ b/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h @@ -0,0 +1,26 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_OBSIDIAN_SANCTUM_H +#define DEF_OBSIDIAN_SANCTUM_H + +enum +{ + MAX_ENCOUNTER = 1, + + TYPE_SARTHARION_EVENT = 1, + + DATA_SARTHARION = 10, + DATA_TENEBRON = 11, + DATA_SHADRON = 12, + DATA_VESPERON = 13, + + NPC_SARTHARION = 28860, + NPC_TENEBRON = 30452, + NPC_SHADRON = 30451, + NPC_VESPERON = 30449, + GO_TWILIGHT_PORTAL = 193988 +}; + +#endif diff --git a/scripts/northrend/sholazar_basin.cpp b/scripts/northrend/sholazar_basin.cpp new file mode 100644 index 000000000..c8ad5d63d --- /dev/null +++ b/scripts/northrend/sholazar_basin.cpp @@ -0,0 +1,93 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Sholazar_Basin +SD%Complete: 100 +SDComment: Quest support: 12573 +SDCategory: Sholazar Basin +EndScriptData */ + +/* ContentData +npc_vekjik +EndContentData */ + +#include "precompiled.h" + +/*###### +## npc_vekjik +######*/ + +#define GOSSIP_VEKJIK_ITEM1 "Shaman Vekjik, I have spoken with the big-tongues and they desire peace. I have brought this offering on their behalf." +#define GOSSIP_VEKJIK_ITEM2 "No no... I had no intentions of betraying your people. I was only defending myself. it was all a misunderstanding." + +enum +{ + GOSSIP_TEXTID_VEKJIK1 = 13137, + GOSSIP_TEXTID_VEKJIK2 = 13138, + + SAY_TEXTID_VEKJIK1 = -1000208, + + SPELL_FREANZYHEARTS_FURY = 51469, + + QUEST_MAKING_PEACE = 12573 +}; + +bool GossipHello_npc_vekjik(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestStatus(QUEST_MAKING_PEACE) == QUEST_STATUS_INCOMPLETE) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_VEKJIK_ITEM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_VEKJIK1, pCreature->GetGUID()); + return true; + } + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_vekjik(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_VEKJIK_ITEM2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_VEKJIK2, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->CLOSE_GOSSIP_MENU(); + DoScriptText(SAY_TEXTID_VEKJIK1, pCreature, pPlayer); + pPlayer->AreaExploredOrEventHappens(QUEST_MAKING_PEACE); + pCreature->CastSpell(pPlayer, SPELL_FREANZYHEARTS_FURY, false); + break; + } + + return true; +} + +void AddSC_sholazar_basin() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_vekjik"; + newscript->pGossipHello = &GossipHello_npc_vekjik; + newscript->pGossipSelect = &GossipSelect_npc_vekjik; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/storm_peaks.cpp b/scripts/northrend/storm_peaks.cpp new file mode 100644 index 000000000..90545ac98 --- /dev/null +++ b/scripts/northrend/storm_peaks.cpp @@ -0,0 +1,216 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Storm_Peaks +SD%Complete: 100 +SDComment: Vendor Support (31247). Quest support: 12970 +SDCategory: Storm Peaks +EndScriptData */ + +/* ContentData +npc_loklira_the_crone +npc_roxi_ramrocket +EndContentData */ + +#include "precompiled.h" + +/*###### +## npc_loklira_the_crone +######*/ + +#define GOSSIP_ITEM_TELL_ME "Tell me about this proposal." +#define GOSSIP_ITEM_WHAT_HAPPENED "What happened then?" +#define GOSSIP_ITEM_YOU_WANT_ME "You want me to take part in the Hyldsmeet to end the war?" +#define GOSSIP_ITEM_VERY_WELL "Very well. I'll take part in this competition." + +enum +{ + GOSSIP_TEXTID_LOKLIRA1 = 13777, + GOSSIP_TEXTID_LOKLIRA2 = 13778, + GOSSIP_TEXTID_LOKLIRA3 = 13779, + GOSSIP_TEXTID_LOKLIRA4 = 13780, + + QUEST_THE_HYLDSMEET = 12970, + + CREDIT_LOKLIRA = 30467 +}; + +bool GossipHello_npc_loklira_the_crone(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestStatus(QUEST_THE_HYLDSMEET) == QUEST_STATUS_INCOMPLETE) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TELL_ME, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_LOKLIRA1, pCreature->GetGUID()); + return true; + } + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_loklira_the_crone(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_WHAT_HAPPENED, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_LOKLIRA2, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_YOU_WANT_ME, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_LOKLIRA3, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+3: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_VERY_WELL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_LOKLIRA4, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+4: + pPlayer->TalkedToCreature(CREDIT_LOKLIRA, pCreature->GetGUID()); + pPlayer->CLOSE_GOSSIP_MENU(); + break; + } + return true; +} + +/*###### +## npc_thorim +######*/ + +#define GOSSIP_ITEM_THORIM1 "Can you tell me what became of Sif?" +#define GOSSIP_ITEM_THORIM2 "He did more than that, Thorim. He controls Ulduar now." +#define GOSSIP_ITEM_THORIM3 "It needn't end this way." + +enum +{ + QUEST_SIBLING_RIVALRY = 13064, + + SPELL_THORIM_STORY_KILL_CREDIT = 56940, + + GOSSIP_TEXTID_THORIM1 = 13799, + GOSSIP_TEXTID_THORIM2 = 13801, + GOSSIP_TEXTID_THORIM3 = 13802, + GOSSIP_TEXTID_THORIM4 = 13803 +}; + +bool GossipHello_npc_thorim(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestStatus(QUEST_SIBLING_RIVALRY) == QUEST_STATUS_INCOMPLETE) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_THORIM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_THORIM1, pCreature->GetGUID()); + } + else + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_thorim(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_THORIM2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_THORIM2, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_THORIM3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_THORIM3, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+3: + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_THORIM4, pCreature->GetGUID()); + pCreature->CastSpell(pPlayer, SPELL_THORIM_STORY_KILL_CREDIT, true); + break; + } + + return true; +} + +/*###### +## npc_roxi_ramrocket +######*/ + +#define GOSSIP_TEXT_RAMROCKET1 "How do you fly in this cold climate?" +#define GOSSIP_TEXT_RAMROCKET2 "I hear you sell motorcycle parts." + +enum +{ + SPELL_MECHANO_HOG = 60866, + SPELL_MEKGINEER_CHOPPER = 60867 +}; + +bool GossipHello_npc_roxi_ramrocket(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isTrainer()) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_TEXT_RAMROCKET1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRAIN); + + if (pCreature->isVendor()) + { + if (pPlayer->HasSpell(SPELL_MECHANO_HOG) || pPlayer->HasSpell(SPELL_MEKGINEER_CHOPPER)) + { + if (pPlayer->HasSkill(SKILL_ENGINERING) && pPlayer->GetBaseSkillValue(SKILL_ENGINERING) >= 450) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_RAMROCKET2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); + } + } + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_roxi_ramrocket(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_TRAIN: + pPlayer->SEND_TRAINERLIST(pCreature->GetGUID()); + break; + case GOSSIP_ACTION_TRADE: + pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + break; + } + + return true; +} + +void AddSC_storm_peaks() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_loklira_the_crone"; + newscript->pGossipHello = &GossipHello_npc_loklira_the_crone; + newscript->pGossipSelect = &GossipSelect_npc_loklira_the_crone; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_thorim"; + newscript->pGossipHello = &GossipHello_npc_thorim; + newscript->pGossipSelect = &GossipSelect_npc_thorim; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_roxi_ramrocket"; + newscript->pGossipHello = &GossipHello_npc_roxi_ramrocket; + newscript->pGossipSelect = &GossipSelect_npc_roxi_ramrocket; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp new file mode 100644 index 000000000..b44535368 --- /dev/null +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp @@ -0,0 +1,443 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss General Bjarngrim +SD%Complete: 70% +SDComment: Waypoint needed, we expect boss to always have 2x Stormforged Lieutenant following +SDCategory: Halls of Lightning +EndScriptData */ + +#include "precompiled.h" +#include "halls_of_lightning.h" + +enum +{ + //Yell + SAY_AGGRO = -1602000, + SAY_SLAY_1 = -1602001, + SAY_SLAY_2 = -1602002, + SAY_SLAY_3 = -1602003, + SAY_DEATH = -1602004, + SAY_BATTLE_STANCE = -1602005, + EMOTE_BATTLE_STANCE = -1602006, + SAY_BERSEKER_STANCE = -1602007, + EMOTE_BERSEKER_STANCE = -1602008, + SAY_DEFENSIVE_STANCE = -1602009, + EMOTE_DEFENSIVE_STANCE = -1602010, + + SPELL_DEFENSIVE_STANCE = 53790, + //SPELL_DEFENSIVE_AURA = 41105, + SPELL_SPELL_REFLECTION = 36096, + SPELL_PUMMEL = 12555, + SPELL_KNOCK_AWAY = 52029, + SPELL_IRONFORM = 52022, + + SPELL_BERSEKER_STANCE = 53791, + //SPELL_BERSEKER_AURA = 41107, + SPELL_INTERCEPT = 58769, + SPELL_WHIRLWIND = 52027, + SPELL_CLEAVE = 15284, + + SPELL_BATTLE_STANCE = 53792, + //SPELL_BATTLE_AURA = 41106, + SPELL_MORTAL_STRIKE = 16856, + SPELL_SLAM = 52026, + + //OTHER SPELLS + //SPELL_CHARGE_UP = 52098, // only used when starting walk from one platform to the other + //SPELL_TEMPORARY_ELECTRICAL_CHARGE = 52092, // triggered part of above + + NPC_STORMFORGED_LIEUTENANT = 29240, + SPELL_ARC_WELD = 59085, + SPELL_RENEW_STEEL_N = 52774, + SPELL_RENEW_STEEL_H = 59160, + + EQUIP_SWORD = 37871, + EQUIP_SHIELD = 35642, + EQUIP_MACE = 43623, + + STANCE_DEFENSIVE = 0, + STANCE_BERSERKER = 1, + STANCE_BATTLE = 2 +}; + +/*###### +## boss_bjarngrim +######*/ + +struct MANGOS_DLL_DECL boss_bjarngrimAI : public ScriptedAI +{ + boss_bjarngrimAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroic = pCreature->GetMap()->IsHeroic(); + m_uiStance = STANCE_DEFENSIVE; + memset(&m_auiStormforgedLieutenantGUID, 0, sizeof(m_auiStormforgedLieutenantGUID)); + Reset(); + } + + ScriptedInstance* m_pInstance; + + bool m_bIsHeroic; + bool m_bIsChangingStance; + + uint8 m_uiChargingStatus; + uint8 m_uiStance; + + uint32 m_uiCharge_Timer; + uint32 m_uiChangeStance_Timer; + + uint32 m_uiReflection_Timer; + uint32 m_uiKnockAway_Timer; + uint32 m_uiPummel_Timer; + uint32 m_uiIronform_Timer; + + uint32 m_uiIntercept_Timer; + uint32 m_uiWhirlwind_Timer; + uint32 m_uiCleave_Timer; + + uint32 m_uiMortalStrike_Timer; + uint32 m_uiSlam_Timer; + + uint64 m_auiStormforgedLieutenantGUID[2]; + + void Reset() + { + m_bIsChangingStance = false; + + m_uiChargingStatus = 0; + m_uiCharge_Timer = 1000; + + m_uiChangeStance_Timer = urand(20000, 25000); + + m_uiReflection_Timer = 8000; + m_uiKnockAway_Timer = 20000; + m_uiPummel_Timer = 10000; + m_uiIronform_Timer = 25000; + + m_uiIntercept_Timer = 5000; + m_uiWhirlwind_Timer = 10000; + m_uiCleave_Timer = 8000; + + m_uiMortalStrike_Timer = 8000; + m_uiSlam_Timer = 10000; + + for(uint8 i = 0; i < 2; ++i) + { + if (Creature* pStormforgedLieutenant = ((Creature*)Unit::GetUnit((*m_creature), m_auiStormforgedLieutenantGUID[i]))) + { + if (!pStormforgedLieutenant->isAlive()) + pStormforgedLieutenant->Respawn(); + } + } + + if (m_uiStance != STANCE_DEFENSIVE) + { + DoRemoveStanceAura(m_uiStance); + DoCast(m_creature, SPELL_DEFENSIVE_STANCE); + m_uiStance = STANCE_DEFENSIVE; + } + + SetEquipmentSlots(false, EQUIP_SWORD, EQUIP_SHIELD, EQUIP_NO_CHANGE); + + if (m_pInstance) + m_pInstance->SetData(TYPE_BJARNGRIM, NOT_STARTED); + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + + //must get both lieutenants here and make sure they are with him + m_creature->CallForHelp(30.0f); + + if (m_pInstance) + m_pInstance->SetData(TYPE_BJARNGRIM, IN_PROGRESS); + } + + void KilledUnit(Unit* pVictim) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_SLAY_1, m_creature); break; + case 1: DoScriptText(SAY_SLAY_2, m_creature); break; + case 2: DoScriptText(SAY_SLAY_3, m_creature); break; + } + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_BJARNGRIM, DONE); + } + + //TODO: remove when removal is done by mangos + void DoRemoveStanceAura(uint8 uiStance) + { + switch(uiStance) + { + case STANCE_DEFENSIVE: + m_creature->RemoveAurasDueToSpell(SPELL_DEFENSIVE_STANCE); + break; + case STANCE_BERSERKER: + m_creature->RemoveAurasDueToSpell(SPELL_BERSEKER_STANCE); + break; + case STANCE_BATTLE: + m_creature->RemoveAurasDueToSpell(SPELL_BATTLE_STANCE); + break; + } + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // Change stance + if (m_uiChangeStance_Timer < uiDiff) + { + //wait for current spell to finish before change stance + if (m_creature->IsNonMeleeSpellCasted(false)) + return; + + DoRemoveStanceAura(m_uiStance); + + int uiTempStance = rand()%(3-1); + + if (uiTempStance >= m_uiStance) + ++uiTempStance; + + m_uiStance = uiTempStance; + + switch(m_uiStance) + { + case STANCE_DEFENSIVE: + DoScriptText(SAY_DEFENSIVE_STANCE, m_creature); + DoScriptText(EMOTE_DEFENSIVE_STANCE, m_creature); + DoCast(m_creature, SPELL_DEFENSIVE_STANCE); + SetEquipmentSlots(false, EQUIP_SWORD, EQUIP_SHIELD, EQUIP_NO_CHANGE); + break; + case STANCE_BERSERKER: + DoScriptText(SAY_BERSEKER_STANCE, m_creature); + DoScriptText(EMOTE_BERSEKER_STANCE, m_creature); + DoCast(m_creature, SPELL_BERSEKER_STANCE); + SetEquipmentSlots(false, EQUIP_SWORD, EQUIP_SWORD, EQUIP_NO_CHANGE); + break; + case STANCE_BATTLE: + DoScriptText(SAY_BATTLE_STANCE, m_creature); + DoScriptText(EMOTE_BATTLE_STANCE, m_creature); + DoCast(m_creature, SPELL_BATTLE_STANCE); + SetEquipmentSlots(false, EQUIP_MACE, EQUIP_UNEQUIP, EQUIP_NO_CHANGE); + break; + } + + m_uiChangeStance_Timer = urand(20000, 25000); + return; + } + else + m_uiChangeStance_Timer -= uiDiff; + + switch(m_uiStance) + { + case STANCE_DEFENSIVE: + { + if (m_uiReflection_Timer < uiDiff) + { + DoCast(m_creature, SPELL_SPELL_REFLECTION); + m_uiReflection_Timer = urand(8000, 9000); + } + else + m_uiReflection_Timer -= uiDiff; + + if (m_uiKnockAway_Timer < uiDiff) + { + DoCast(m_creature, SPELL_KNOCK_AWAY); + m_uiKnockAway_Timer = urand(20000, 21000); + } + else + m_uiKnockAway_Timer -= uiDiff; + + if (m_uiPummel_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_PUMMEL); + m_uiPummel_Timer = urand(10000, 11000); + } + else + m_uiPummel_Timer -= uiDiff; + + if (m_uiIronform_Timer < uiDiff) + { + DoCast(m_creature, SPELL_IRONFORM); + m_uiIronform_Timer = urand(25000, 26000); + } + else + m_uiIronform_Timer -= uiDiff; + + break; + } + case STANCE_BERSERKER: + { + if (m_uiIntercept_Timer < uiDiff) + { + //not much point is this, better random target and more often? + DoCast(m_creature->getVictim(), SPELL_INTERCEPT); + m_uiIntercept_Timer = urand(45000, 46000); + } + else + m_uiIntercept_Timer -= uiDiff; + + if (m_uiWhirlwind_Timer < uiDiff) + { + DoCast(m_creature, SPELL_WHIRLWIND); + m_uiWhirlwind_Timer = urand(10000, 11000); + } + else + m_uiWhirlwind_Timer -= uiDiff; + + if (m_uiCleave_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_CLEAVE); + m_uiCleave_Timer = urand(8000, 9000); + } + else + m_uiCleave_Timer -= uiDiff; + + break; + } + case STANCE_BATTLE: + { + if (m_uiMortalStrike_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_MORTAL_STRIKE); + m_uiMortalStrike_Timer = urand(20000, 21000); + } + else + m_uiMortalStrike_Timer -= uiDiff; + + if (m_uiSlam_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_SLAM); + m_uiSlam_Timer = urand(15000, 16000); + } + else + m_uiSlam_Timer -= uiDiff; + + break; + } + } + + DoMeleeAttackIfReady(); + } +}; + +/*###### +## mob_stormforged_lieutenant +######*/ + +struct MANGOS_DLL_DECL mob_stormforged_lieutenantAI : public ScriptedAI +{ + mob_stormforged_lieutenantAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + m_bIsHeroic = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroic; + + uint32 m_uiArcWeld_Timer; + uint32 m_uiRenewSteel_Timer; + + void Reset() + { + m_uiArcWeld_Timer = urand(20000, 21000); + m_uiRenewSteel_Timer = urand(10000, 11000); + } + + void Aggro(Unit* pWho) + { + if (m_pInstance) + { + if (Creature* pBjarngrim = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_BJARNGRIM))) + { + if (pBjarngrim->isAlive() && !pBjarngrim->getVictim()) + pBjarngrim->AI()->AttackStart(pWho); + } + } + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiArcWeld_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_ARC_WELD); + m_uiArcWeld_Timer = urand(20000, 21000); + } + else + m_uiArcWeld_Timer -= uiDiff; + + if (m_uiRenewSteel_Timer < uiDiff) + { + if (m_pInstance) + { + if (Creature* pBjarngrim = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_BJARNGRIM))) + { + if (pBjarngrim->isAlive()) + DoCast(pBjarngrim, m_bIsHeroic ? SPELL_RENEW_STEEL_H : SPELL_RENEW_STEEL_N); + } + } + m_uiRenewSteel_Timer = urand(10000, 14000); + } + else + m_uiRenewSteel_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_bjarngrim(Creature* pCreature) +{ + return new boss_bjarngrimAI(pCreature); +} + +CreatureAI* GetAI_mob_stormforged_lieutenant(Creature* pCreature) +{ + return new mob_stormforged_lieutenantAI(pCreature); +} + +void AddSC_boss_bjarngrim() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_bjarngrim"; + newscript->GetAI = &GetAI_boss_bjarngrim; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_stormforged_lieutenant"; + newscript->GetAI = &GetAI_mob_stormforged_lieutenant; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp new file mode 100644 index 000000000..606254d4a --- /dev/null +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp @@ -0,0 +1,395 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss Ionar +SD%Complete: 80% +SDComment: Timer check +SDCategory: Halls of Lightning +EndScriptData */ + +#include "precompiled.h" +#include "halls_of_lightning.h" + +enum +{ + SAY_AGGRO = -1602011, + SAY_SLAY_1 = -1602012, + SAY_SLAY_2 = -1602013, + SAY_SLAY_3 = -1602014, + SAY_DEATH = -1602015, + SAY_SPLIT_1 = -1602016, + SAY_SPLIT_2 = -1602017, + + SPELL_BALL_LIGHTNING_N = 52780, + SPELL_BALL_LIGHTNING_H = 59800, + SPELL_STATIC_OVERLOAD_N = 52658, + SPELL_STATIC_OVERLOAD_H = 59795, + + SPELL_DISPERSE = 52770, + SPELL_SUMMON_SPARK = 52746, + SPELL_SPARK_DESPAWN = 52776, + + //Spark of Ionar + SPELL_SPARK_VISUAL_TRIGGER_N = 52667, + SPELL_SPARK_VISUAL_TRIGGER_H = 59833, + + NPC_SPARK_OF_IONAR = 28926, + + MAX_SPARKS = 5, + POINT_CALLBACK = 0 +}; + +/*###### +## Boss Ionar +######*/ + +struct MANGOS_DLL_DECL boss_ionarAI : public ScriptedAI +{ + boss_ionarAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroic = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + std::list m_lSparkGUIDList; + + bool m_bIsHeroic; + + bool m_bIsSplitPhase; + uint32 m_uiSplit_Timer; + uint32 m_uiSparkAtHomeCount; + + uint32 m_uiStaticOverload_Timer; + uint32 m_uiBallLightning_Timer; + + uint32 m_uiHealthAmountModifier; + + void Reset() + { + m_lSparkGUIDList.clear(); + + m_bIsSplitPhase = true; + m_uiSplit_Timer = 25000; + m_uiSparkAtHomeCount = 0; + + m_uiStaticOverload_Timer = urand(5000, 6000); + m_uiBallLightning_Timer = urand(10000, 11000); + + m_uiHealthAmountModifier = 1; + + if (m_creature->GetVisibility() == VISIBILITY_OFF) + m_creature->SetVisibility(VISIBILITY_ON); + } + + void AttackedBy(Unit* pAttacker) + { + if (m_creature->getVictim()) + return; + + if (m_creature->GetVisibility() == VISIBILITY_OFF) + return; + + AttackStart(pAttacker); + } + + void Aggro(Unit* who) + { + DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_IONAR, IN_PROGRESS); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_IONAR, NOT_STARTED); + } + + void AttackStart(Unit* pWho) + { + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho, 0.0f); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + + if (m_creature->GetVisibility() != VISIBILITY_OFF) + m_creature->GetMotionMaster()->MoveChase(pWho); + } + } + + void JustDied(Unit* killer) + { + DoScriptText(SAY_DEATH, m_creature); + DespawnSpark(); + + if (m_pInstance) + m_pInstance->SetData(TYPE_IONAR, DONE); + } + + void KilledUnit(Unit *victim) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_SLAY_1, m_creature); break; + case 1: DoScriptText(SAY_SLAY_2, m_creature); break; + case 2: DoScriptText(SAY_SLAY_3, m_creature); break; + } + } + + void DespawnSpark() + { + if (m_lSparkGUIDList.empty()) + return; + + for(std::list::iterator itr = m_lSparkGUIDList.begin(); itr != m_lSparkGUIDList.end(); ++itr) + { + if (Creature* pTemp = (Creature*)Unit::GetUnit(*m_creature, *itr)) + { + if (pTemp->isAlive()) + pTemp->ForcedDespawn(); + } + } + + m_lSparkGUIDList.clear(); + } + + //make sparks come back + void CallBackSparks() + { + //should never be empty here, but check + if (m_lSparkGUIDList.empty()) + return; + + for(std::list::iterator itr = m_lSparkGUIDList.begin(); itr != m_lSparkGUIDList.end(); ++itr) + { + if (Creature* pSpark = (Creature*)Unit::GetUnit(*m_creature, *itr)) + { + if (pSpark->isAlive()) + { + if (pSpark->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE) + pSpark->GetMotionMaster()->MovementExpired(); + + pSpark->SetSpeed(MOVE_RUN, pSpark->GetCreatureInfo()->speed * 2); + pSpark->GetMotionMaster()->MovePoint(POINT_CALLBACK, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); + } + } + } + } + + void RegisterSparkAtHome() + { + ++m_uiSparkAtHomeCount; + } + + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_SPARK_OF_IONAR) + { + pSummoned->CastSpell(pSummoned, m_bIsHeroic ? SPELL_SPARK_VISUAL_TRIGGER_H : SPELL_SPARK_VISUAL_TRIGGER_N, true); + + Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); + + if (m_creature->getVictim()) + pSummoned->AI()->AttackStart(pTarget ? pTarget : m_creature->getVictim()); + + m_lSparkGUIDList.push_back(pSummoned->GetGUID()); + } + } + + void UpdateAI(const uint32 uiDiff) + { + // Splitted + if (m_creature->GetVisibility() == VISIBILITY_OFF) + { + if (!m_creature->getVictim()) + { + Reset(); + return; + } + + if (m_uiSplit_Timer < uiDiff) + { + m_uiSplit_Timer = 2500; + + // Return sparks to where Ionar splitted + if (m_bIsSplitPhase) + { + CallBackSparks(); + m_bIsSplitPhase = false; + } + // Lightning effect and restore Ionar + else if (m_uiSparkAtHomeCount == MAX_SPARKS) + { + m_creature->SetVisibility(VISIBILITY_ON); + m_creature->CastSpell(m_creature, SPELL_SPARK_DESPAWN, false); + + DespawnSpark(); + + m_uiSparkAtHomeCount = 0; + m_uiSplit_Timer = 25000; + m_bIsSplitPhase = true; + + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != TARGETED_MOTION_TYPE) + { + if (m_creature->getVictim()) + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + } + } + } + else + m_uiSplit_Timer -= uiDiff; + + return; + } + + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiStaticOverload_Timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, m_bIsHeroic ? SPELL_STATIC_OVERLOAD_H : SPELL_STATIC_OVERLOAD_N); + + m_uiStaticOverload_Timer = urand(5000, 6000); + } + else + m_uiStaticOverload_Timer -= uiDiff; + + if (m_uiBallLightning_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), m_bIsHeroic ? SPELL_BALL_LIGHTNING_H : SPELL_BALL_LIGHTNING_N); + m_uiBallLightning_Timer = urand(10000, 11000); + } + else + m_uiBallLightning_Timer -= uiDiff; + + // Health check + if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < (100-(20*m_uiHealthAmountModifier))) + { + ++m_uiHealthAmountModifier; + + DoScriptText(urand(0, 1) ? SAY_SPLIT_1 : SAY_SPLIT_2, m_creature); + + if (m_creature->IsNonMeleeSpellCasted(false)) + m_creature->InterruptNonMeleeSpells(false); + + DoCast(m_creature, SPELL_DISPERSE); + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_ionar(Creature* pCreature) +{ + return new boss_ionarAI(pCreature); +} + +bool EffectDummyCreature_boss_ionar(Unit* pCaster, uint32 uiSpellId, uint32 uiEffIndex, Creature* pCreatureTarget) +{ + //always check spellid and effectindex + if (uiSpellId == SPELL_DISPERSE && uiEffIndex == 0) + { + if (pCreatureTarget->GetEntry() != NPC_IONAR) + return true; + + for(uint8 i = 0; i < MAX_SPARKS; ++i) + { + pCreatureTarget->CastSpell(pCreatureTarget, SPELL_SUMMON_SPARK, true); + + //TODO: remove this line of hack when summon implemented + pCreatureTarget->SummonCreature(NPC_SPARK_OF_IONAR, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + } + + pCreatureTarget->AttackStop(); + pCreatureTarget->SetVisibility(VISIBILITY_OFF); + + if (pCreatureTarget->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE) + pCreatureTarget->GetMotionMaster()->MovementExpired(); + + //always return true when we are handling this spell and effect + return true; + } + return false; +} + +/*###### +## mob_spark_of_ionar +######*/ + +struct MANGOS_DLL_DECL mob_spark_of_ionarAI : public ScriptedAI +{ + mob_spark_of_ionarAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + void Reset() { } + + void MovementInform(uint32 uiType, uint32 uiPointId) + { + if (uiType != POINT_MOTION_TYPE || !m_pInstance) + return; + + if (uiPointId == POINT_CALLBACK) + { + if (Creature* pIonar = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_IONAR))) + { + if (!pIonar->isAlive()) + { + m_creature->ForcedDespawn(); + return; + } + + if (boss_ionarAI* pIonarAI = dynamic_cast(pIonar->AI())) + pIonarAI->RegisterSparkAtHome(); + } + else + m_creature->ForcedDespawn(); + } + } +}; + +CreatureAI* GetAI_mob_spark_of_ionar(Creature* pCreature) +{ + return new mob_spark_of_ionarAI(pCreature); +} + +void AddSC_boss_ionar() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_ionar"; + newscript->GetAI = &GetAI_boss_ionar; + newscript->pEffectDummyCreature = &EffectDummyCreature_boss_ionar; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_spark_of_ionar"; + newscript->GetAI = &GetAI_mob_spark_of_ionar; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp new file mode 100644 index 000000000..32732cc33 --- /dev/null +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp @@ -0,0 +1,228 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss Loken +SD%Complete: 60% +SDComment: Missing intro. Remove hack of Pulsing Shockwave when core supports. Aura is not working (59414) +SDCategory: Halls of Lightning +EndScriptData */ + +#include "precompiled.h" +#include "halls_of_lightning.h" + +enum +{ + SAY_AGGRO = -1602018, + SAY_INTRO_1 = -1602019, + SAY_INTRO_2 = -1602020, + SAY_SLAY_1 = -1602021, + SAY_SLAY_2 = -1602022, + SAY_SLAY_3 = -1602023, + SAY_DEATH = -1602024, + SAY_NOVA_1 = -1602025, + SAY_NOVA_2 = -1602026, + SAY_NOVA_3 = -1602027, + SAY_75HEALTH = -1602028, + SAY_50HEALTH = -1602029, + SAY_25HEALTH = -1602030, + EMOTE_NOVA = -1602031, + + SPELL_ARC_LIGHTNING = 52921, + SPELL_LIGHTNING_NOVA_N = 52960, + SPELL_LIGHTNING_NOVA_H = 59835, + + SPELL_PULSING_SHOCKWAVE_N = 52961, + SPELL_PULSING_SHOCKWAVE_H = 59836, + SPELL_PULSING_SHOCKWAVE_AURA = 59414 +}; + +/*###### +## Boss Loken +######*/ + +struct MANGOS_DLL_DECL boss_lokenAI : public ScriptedAI +{ + boss_lokenAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroic = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + bool m_bIsHeroic; + bool m_bIsAura; + + uint32 m_uiArcLightning_Timer; + uint32 m_uiLightningNova_Timer; + uint32 m_uiPulsingShockwave_Timer; + uint32 m_uiResumePulsingShockwave_Timer; + + uint32 m_uiHealthAmountModifier; + + void Reset() + { + m_bIsAura = false; + + m_uiArcLightning_Timer = 15000; + m_uiLightningNova_Timer = 20000; + m_uiPulsingShockwave_Timer = 2000; + m_uiResumePulsingShockwave_Timer = 15000; + + m_uiHealthAmountModifier = 1; + + if (m_pInstance) + m_pInstance->SetData(TYPE_LOKEN, NOT_STARTED); + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_LOKEN, IN_PROGRESS); + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_LOKEN, DONE); + } + + void KilledUnit(Unit* pVictim) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_SLAY_1, m_creature);break; + case 1: DoScriptText(SAY_SLAY_2, m_creature);break; + case 2: DoScriptText(SAY_SLAY_3, m_creature);break; + } + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_bIsAura) + { + // workaround for PULSING_SHOCKWAVE + /*if (m_uiPulsingShockwave_Timer < uiDiff) + { + Map *map = m_creature->GetMap(); + if (map->IsDungeon()) + { + Map::PlayerList const &PlayerList = map->GetPlayers(); + + if (PlayerList.isEmpty()) + return; + + for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) + if (i->getSource()->isAlive() && i->getSource()->isTargetableForAttack()) + { + int32 dmg; + float m_fDist = m_creature->GetDistance(i->getSource()); + + if (m_fDist <= 1.0f) // Less than 1 yard + dmg = (m_bIsHeroic ? 850 : 800); // need to correct damage + else // Further from 1 yard + dmg = round((m_bIsHeroic ? 250 : 200) * m_fDist) + (m_bIsHeroic ? 850 : 800); // need to correct damage + + m_creature->CastCustomSpell(i->getSource(), (m_bIsHeroic ? 59837 : 52942), &dmg, 0, 0, false); + } + } + m_uiPulsingShockwave_Timer = 2000; + }else m_uiPulsingShockwave_Timer -= uiDiff;*/ + } + else + { + if (m_uiResumePulsingShockwave_Timer < uiDiff) + { + //breaks at movement, can we assume when it's time, this spell is casted and also must stop movement? + //m_creature->CastSpell(m_creature, SPELL_PULSING_SHOCKWAVE_AURA, true); + + //DoCast(m_creature, m_bIsHeroic ? SPELL_PULSING_SHOCKWAVE_H : SPELL_PULSING_SHOCKWAVE_N); // need core support + m_bIsAura = true; + m_uiResumePulsingShockwave_Timer = 0; + } + else + m_uiResumePulsingShockwave_Timer -= uiDiff; + } + + if (m_uiArcLightning_Timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, SPELL_ARC_LIGHTNING); + + m_uiArcLightning_Timer = urand(15000, 16000); + } + else + m_uiArcLightning_Timer -= uiDiff; + + if (m_uiLightningNova_Timer < uiDiff) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_NOVA_1, m_creature);break; + case 1: DoScriptText(SAY_NOVA_2, m_creature);break; + case 2: DoScriptText(SAY_NOVA_3, m_creature);break; + } + + DoCast(m_creature, m_bIsHeroic ? SPELL_LIGHTNING_NOVA_H : SPELL_LIGHTNING_NOVA_N); + + m_bIsAura = false; + m_uiResumePulsingShockwave_Timer = (m_bIsHeroic ? 4000 : 5000); // Pause Pulsing Shockwave aura + m_uiLightningNova_Timer = urand(20000, 21000); + } + else + m_uiLightningNova_Timer -= uiDiff; + + // Health check + if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < (100-(25*m_uiHealthAmountModifier))) + { + switch(m_uiHealthAmountModifier) + { + case 1: DoScriptText(SAY_75HEALTH, m_creature); break; + case 2: DoScriptText(SAY_50HEALTH, m_creature); break; + case 3: DoScriptText(SAY_25HEALTH, m_creature); break; + } + + ++m_uiHealthAmountModifier; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_loken(Creature* pCreature) +{ + return new boss_lokenAI(pCreature); +} + +void AddSC_boss_loken() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_loken"; + newscript->GetAI = &GetAI_boss_loken; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp new file mode 100644 index 000000000..3ca16d0b7 --- /dev/null +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp @@ -0,0 +1,484 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss Volkhan +SD%Complete: 60% +SDComment: Not considered complete. Some events may fail and need further development +SDCategory: Halls of Lightning +EndScriptData */ + +#include "precompiled.h" +#include "halls_of_lightning.h" + +enum +{ + SAY_AGGRO = -1602032, + SAY_SLAY_1 = -1602033, + SAY_SLAY_2 = -1602034, + SAY_SLAY_3 = -1602035, + SAY_DEATH = -1602036, + SAY_STOMP_1 = -1602037, + SAY_STOMP_2 = -1602038, + SAY_FORGE_1 = -1602039, + SAY_FORGE_2 = -1602040, + EMOTE_TO_ANVIL = -1602041, + EMOTE_SHATTER = -1602042, + + SPELL_HEAT_N = 52387, + SPELL_HEAT_H = 59528, + SPELL_SHATTERING_STOMP_N = 52237, + SPELL_SHATTERING_STOMP_H = 59529, + + //unclear how "directions" of spells must be. Last, summoning GO, what is it for? Script depend on: + SPELL_TEMPER = 52238, //TARGET_SCRIPT boss->anvil + SPELL_TEMPER_DUMMY = 52654, //TARGET_SCRIPT anvil->boss + + //SPELL_TEMPER_VISUAL = 52661, //summons GO + + SPELL_SUMMON_MOLTEN_GOLEM = 52405, + + //Molten Golem + SPELL_BLAST_WAVE = 23113, + SPELL_IMMOLATION_STRIKE_N = 52433, + SPELL_IMMOLATION_STRIKE_H = 59530, + SPELL_SHATTER_N = 52429, + SPELL_SHATTER_H = 59527, + + NPC_VOLKHAN_ANVIL = 28823, + NPC_MOLTEN_GOLEM = 28695, + NPC_BRITTLE_GOLEM = 28681, + + POINT_ID_ANVIL = 0, + MAX_GOLEM = 2 +}; + +/*###### +## Boss Volkhan +######*/ + +struct MANGOS_DLL_DECL boss_volkhanAI : public ScriptedAI +{ + boss_volkhanAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroic = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + std::list m_lGolemGUIDList; + + bool m_bIsHeroic; + bool m_bHasTemper; + bool m_bIsStriking; + bool m_bCanShatterGolem; + + uint32 m_uiPause_Timer; + uint32 m_uiShatteringStomp_Timer; + uint32 m_uiShatter_Timer; + + uint32 m_uiHealthAmountModifier; + + void Reset() + { + m_bIsStriking = false; + m_bHasTemper = false; + m_bCanShatterGolem = false; + + m_uiPause_Timer = 3500; + m_uiShatteringStomp_Timer = 0; + m_uiShatter_Timer = 5000; + + m_uiHealthAmountModifier = 1; + + DespawnGolem(); + m_lGolemGUIDList.clear(); + + if (m_pInstance) + m_pInstance->SetData(TYPE_VOLKHAN, NOT_STARTED); + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_VOLKHAN, IN_PROGRESS); + } + + void AttackStart(Unit* pWho) + { + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho, 0.0f); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + + if (!m_bHasTemper) + m_creature->GetMotionMaster()->MoveChase(pWho); + } + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + DespawnGolem(); + + if (m_pInstance) + m_pInstance->SetData(TYPE_VOLKHAN, DONE); + } + + void KilledUnit(Unit* pVictim) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_SLAY_1, m_creature); break; + case 1: DoScriptText(SAY_SLAY_2, m_creature); break; + case 2: DoScriptText(SAY_SLAY_3, m_creature); break; + } + } + + void DespawnGolem() + { + if (m_lGolemGUIDList.empty()) + return; + + for(std::list::iterator itr = m_lGolemGUIDList.begin(); itr != m_lGolemGUIDList.end(); ++itr) + { + if (Creature* pTemp = (Creature*)Unit::GetUnit(*m_creature, *itr)) + { + if (pTemp->isAlive()) + pTemp->ForcedDespawn(); + } + } + + m_lGolemGUIDList.clear(); + } + + void ShatterGolem() + { + if (m_lGolemGUIDList.empty()) + return; + + for(std::list::iterator itr = m_lGolemGUIDList.begin(); itr != m_lGolemGUIDList.end(); ++itr) + { + if (Creature* pTemp = (Creature*)Unit::GetUnit(*m_creature, *itr)) + { + // only shatter brittle golems + if (pTemp->isAlive() && pTemp->GetEntry() == NPC_BRITTLE_GOLEM) + pTemp->CastSpell(pTemp, m_bIsHeroic ? SPELL_SHATTER_H : SPELL_SHATTER_N, false); + } + } + } + + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + { + if (pSpell->Id == SPELL_TEMPER_DUMMY) + m_bIsStriking = true; + } + + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_MOLTEN_GOLEM) + { + m_lGolemGUIDList.push_back(pSummoned->GetGUID()); + + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); + + //why healing when just summoned? + pSummoned->CastSpell(pSummoned, m_bIsHeroic ? SPELL_HEAT_H : SPELL_HEAT_N, false, NULL, NULL, m_creature->GetGUID()); + } + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_bIsStriking) + { + if (m_uiPause_Timer < uiDiff) + { + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != TARGETED_MOTION_TYPE) + { + if (m_creature->getVictim()) + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + } + + m_bHasTemper = false; + m_bIsStriking = false; + m_uiPause_Timer = 3500; + } + else + m_uiPause_Timer -= uiDiff; + + return; + } + + // When to start shatter? After 60, 40 or 20% hp? + if (!m_bHasTemper && m_uiHealthAmountModifier >= 3) + { + if (m_uiShatteringStomp_Timer < uiDiff) + { + //should he stomp even if he has no brittle golem to shatter? + + DoScriptText(urand(0, 1) ? SAY_STOMP_1 : SAY_STOMP_2, m_creature); + + DoCast(m_creature, m_bIsHeroic ? SPELL_SHATTERING_STOMP_H : SPELL_SHATTERING_STOMP_N); + + DoScriptText(EMOTE_SHATTER, m_creature); + + m_uiShatteringStomp_Timer = 30000; + m_bCanShatterGolem = true; + } + else + m_uiShatteringStomp_Timer -= uiDiff; + } + + // Shatter Golems 3 seconds after Shattering Stomp + if (m_bCanShatterGolem) + { + if (m_uiShatter_Timer < uiDiff) + { + ShatterGolem(); + m_uiShatter_Timer = 3000; + m_bCanShatterGolem = false; + } + else + m_uiShatter_Timer -= uiDiff; + } + + // Health check + if (!m_bCanShatterGolem && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < (100-(20*m_uiHealthAmountModifier))) + { + ++m_uiHealthAmountModifier; + + if (m_creature->IsNonMeleeSpellCasted(false)) + m_creature->InterruptNonMeleeSpells(false); + + DoScriptText(urand(0, 1) ? SAY_FORGE_1 : SAY_FORGE_2, m_creature); + + m_bHasTemper = true; + + m_creature->CastSpell(m_creature, SPELL_TEMPER, false); + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_volkhan(Creature* pCreature) +{ + return new boss_volkhanAI(pCreature); +} + +bool EffectDummyCreature_boss_volkhan(Unit* pCaster, uint32 uiSpellId, uint32 uiEffIndex, Creature* pCreatureTarget) +{ + //always check spellid and effectindex + if (uiSpellId == SPELL_TEMPER_DUMMY && uiEffIndex == 0) + { + if (pCaster->GetEntry() != NPC_VOLKHAN_ANVIL || pCreatureTarget->GetEntry() != NPC_VOLKHAN) + return true; + + for(uint8 i = 0; i < MAX_GOLEM; ++i) + { + pCreatureTarget->CastSpell(pCaster, SPELL_SUMMON_MOLTEN_GOLEM, true); + + //TODO: remove this line of hack when summon effect implemented + pCreatureTarget->SummonCreature(NPC_MOLTEN_GOLEM, + pCaster->GetPositionX(), pCaster->GetPositionY(), pCaster->GetPositionZ(), 0.0f, + TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); + } + + //always return true when we are handling this spell and effect + return true; + } + + return false; +} + +/*###### +## npc_volkhan_anvil +######*/ + +bool EffectDummyCreature_npc_volkhan_anvil(Unit* pCaster, uint32 uiSpellId, uint32 uiEffIndex, Creature* pCreatureTarget) +{ + //always check spellid and effectindex + if (uiSpellId == SPELL_TEMPER && uiEffIndex == 0) + { + if (pCaster->GetEntry() != NPC_VOLKHAN || pCreatureTarget->GetEntry() != NPC_VOLKHAN_ANVIL) + return true; + + DoScriptText(EMOTE_TO_ANVIL, pCaster); + + float fX, fY, fZ; + pCreatureTarget->GetContactPoint(pCaster, fX, fY, fZ, INTERACTION_DISTANCE); + + pCaster->AttackStop(); + + if (pCaster->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE) + pCaster->GetMotionMaster()->MovementExpired(); + + ((Creature*)pCaster)->GetMap()->CreatureRelocation((Creature*)pCaster, fX, fY, fZ, pCreatureTarget->GetOrientation()); + ((Creature*)pCaster)->SendMonsterMove(fX, fY, fZ, 0, ((Creature*)pCaster)->GetMonsterMoveFlags(), 1); + + pCreatureTarget->CastSpell(pCaster, SPELL_TEMPER_DUMMY, false); + + //always return true when we are handling this spell and effect + return true; + } + + return false; +} + +/*###### +## mob_molten_golem +######*/ + +struct MANGOS_DLL_DECL mob_molten_golemAI : public ScriptedAI +{ + mob_molten_golemAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroic = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + bool m_bIsHeroic; + bool m_bIsFrozen; + + uint32 m_uiBlast_Timer; + uint32 m_uiDeathDelay_Timer; + uint32 m_uiImmolation_Timer; + + void Reset() + { + m_bIsFrozen = false; + + m_uiBlast_Timer = 20000; + m_uiDeathDelay_Timer = 0; + m_uiImmolation_Timer = 5000; + } + + void AttackStart(Unit* pWho) + { + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho, 0.0f); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + + if (!m_bIsFrozen) + m_creature->GetMotionMaster()->MoveChase(pWho); + } + } + + void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + { + if (m_bIsFrozen) + { + //workaround for now, brittled should be immune to any kind of attacks + uiDamage = 0; + return; + } + + if (uiDamage > m_creature->GetHealth()) + { + m_bIsFrozen = true; + + if (m_creature->IsNonMeleeSpellCasted(false)) + m_creature->InterruptNonMeleeSpells(false); + + m_creature->RemoveAllAuras(); + m_creature->AttackStop(); + + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE) + m_creature->GetMotionMaster()->MovementExpired(); + + uiDamage = m_creature->GetHealth()-1; + + m_creature->UpdateEntry(NPC_BRITTLE_GOLEM); + m_creature->SetHealth(1); + } + } + + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + { + //this is the dummy effect of the spells + if (pSpell->Id == SPELL_SHATTER_N || pSpell->Id == SPELL_SHATTER_H) + { + if (m_creature->GetEntry() == NPC_BRITTLE_GOLEM) + m_creature->ForcedDespawn(); + } + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target or if we are frozen + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim() || m_bIsFrozen) + return; + + if (m_uiBlast_Timer < uiDiff) + { + DoCast(m_creature, SPELL_BLAST_WAVE); + m_uiBlast_Timer = 20000; + } + else + m_uiBlast_Timer -= uiDiff; + + if (m_uiImmolation_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), m_bIsHeroic ? SPELL_IMMOLATION_STRIKE_H : SPELL_IMMOLATION_STRIKE_N); + m_uiImmolation_Timer = 5000; + } + else + m_uiImmolation_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_molten_golem(Creature* pCreature) +{ + return new mob_molten_golemAI(pCreature); +} + +void AddSC_boss_volkhan() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_volkhan"; + newscript->GetAI = &GetAI_boss_volkhan; + newscript->pEffectDummyCreature = &EffectDummyCreature_boss_volkhan; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_volkhan_anvil"; + newscript->pEffectDummyCreature = &EffectDummyCreature_npc_volkhan_anvil; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_molten_golem"; + newscript->GetAI = &GetAI_mob_molten_golem; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h b/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h new file mode 100644 index 000000000..8790274e5 --- /dev/null +++ b/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h @@ -0,0 +1,34 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_HALLS_OF_LIGHTNING_H +#define DEF_HALLS_OF_LIGHTNING_H + +enum +{ + MAX_ENCOUNTER = 4, + + DATA_BJARNGRIM = 1, + DATA_IONAR = 2, + DATA_LOKEN = 3, + DATA_VOLKHAN = 4, + + TYPE_BJARNGRIM = 10, + TYPE_IONAR = 11, + TYPE_LOKEN = 12, + TYPE_VOLKHAN = 13, + + NPC_BJARNGRIM = 28586, + NPC_VOLKHAN = 28587, + NPC_IONAR = 28546, + NPC_LOKEN = 28923, + + GO_BJARNGRIM_DOOR = 191416, //_doors10 + GO_VOLKHAN_DOOR = 191325, //_doors07 + GO_IONAR_DOOR = 191326, //_doors05 + GO_LOKEN_DOOR = 191324, //_doors02 + GO_LOKEN_THRONE = 192654 +}; + +#endif diff --git a/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp b/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp new file mode 100644 index 000000000..abaf25231 --- /dev/null +++ b/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp @@ -0,0 +1,194 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance_Halls_of_Lightning +SD%Complete: 90% +SDComment: All ready. +SDCategory: Halls of Lightning +EndScriptData */ + +#include "precompiled.h" +#include "halls_of_lightning.h" + +/* Halls of Lightning encounters: +0 - General Bjarngrim +1 - Volkhan +2 - Ionar +3 - Loken +*/ + +struct MANGOS_DLL_DECL instance_halls_of_lightning : public ScriptedInstance +{ + instance_halls_of_lightning(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + + uint64 m_uiGeneralBjarngrimGUID; + uint64 m_uiIonarGUID; + uint64 m_uiLokenGUID; + uint64 m_uiVolkhanGUID; + + uint64 m_uiBjarngrimDoorGUID; + uint64 m_uiVolkhanDoorGUID; + uint64 m_uiIonarDoorGUID; + uint64 m_uiLokenDoorGUID; + uint64 m_uiLokenGlobeGUID; + + void Initialize() + { + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + + m_uiGeneralBjarngrimGUID = 0; + m_uiVolkhanGUID = 0; + m_uiIonarGUID = 0; + m_uiLokenGUID = 0; + + m_uiBjarngrimDoorGUID = 0; + m_uiVolkhanDoorGUID = 0; + m_uiIonarDoorGUID = 0; + m_uiLokenDoorGUID = 0; + m_uiLokenGlobeGUID = 0; + } + + void OnCreatureCreate(Creature* pCreature) + { + switch(pCreature->GetEntry()) + { + case NPC_BJARNGRIM: + m_uiGeneralBjarngrimGUID = pCreature->GetGUID(); + break; + case NPC_VOLKHAN: + m_uiVolkhanGUID = pCreature->GetGUID(); + break; + case NPC_IONAR: + m_uiIonarGUID = pCreature->GetGUID(); + break; + case NPC_LOKEN: + m_uiLokenGUID = pCreature->GetGUID(); + break; + } + } + + void OnObjectCreate(GameObject* pGo) + { + switch(pGo->GetEntry()) + { + case GO_BJARNGRIM_DOOR: + m_uiBjarngrimDoorGUID = pGo->GetGUID(); + if (m_auiEncounter[0] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_VOLKHAN_DOOR: + m_uiVolkhanDoorGUID = pGo->GetGUID(); + if (m_auiEncounter[1] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_IONAR_DOOR: + m_uiIonarDoorGUID = pGo->GetGUID(); + if (m_auiEncounter[2] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_LOKEN_DOOR: + m_uiLokenDoorGUID = pGo->GetGUID(); + if (m_auiEncounter[3] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_LOKEN_THRONE: + m_uiLokenGlobeGUID = pGo->GetGUID(); + break; + } + } + + void SetData(uint32 uiType, uint32 uiData) + { + switch(uiType) + { + case TYPE_BJARNGRIM: + if (uiData == DONE) + DoUseDoorOrButton(m_uiBjarngrimDoorGUID); + m_auiEncounter[0] = uiData; + break; + case TYPE_VOLKHAN: + if (uiData == DONE) + DoUseDoorOrButton(m_uiVolkhanDoorGUID); + m_auiEncounter[1] = uiData; + break; + case TYPE_IONAR: + if (uiData == DONE) + DoUseDoorOrButton(m_uiIonarDoorGUID); + m_auiEncounter[2] = uiData; + break; + case TYPE_LOKEN: + if (uiData == DONE) + { + DoUseDoorOrButton(m_uiLokenDoorGUID); + + //Appears to be type 5 GO with animation. Need to figure out how this work, code below only placeholder + if (GameObject* pGlobe = instance->GetGameObject(m_uiLokenGlobeGUID)) + pGlobe->SetGoState(GO_STATE_ACTIVE); + } + m_auiEncounter[3] = uiData; + break; + } + } + + uint32 GetData(uint32 uiType) + { + switch(uiType) + { + case TYPE_BJARNGRIM: + return m_auiEncounter[0]; + case TYPE_VOLKHAN: + return m_auiEncounter[1]; + case TYPE_IONAR: + return m_auiEncounter[2]; + case TYPE_LOKEN: + return m_auiEncounter[3]; + } + return 0; + } + + uint64 GetData64(uint32 uiData) + { + switch(uiData) + { + case DATA_BJARNGRIM: + return m_uiGeneralBjarngrimGUID; + case DATA_VOLKHAN: + return m_uiVolkhanGUID; + case DATA_IONAR: + return m_uiIonarGUID; + case DATA_LOKEN: + return m_uiLokenGUID; + } + return 0; + } +}; + +InstanceData* GetInstanceData_instance_halls_of_lightning(Map* pMap) +{ + return new instance_halls_of_lightning(pMap); +} + +void AddSC_instance_halls_of_lightning() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "instance_halls_of_lightning"; + newscript->GetInstanceData = &GetInstanceData_instance_halls_of_lightning; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp new file mode 100644 index 000000000..70c5ab2f4 --- /dev/null +++ b/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp @@ -0,0 +1,100 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Maiden_of_Grief +SD%Complete: 20% +SDComment: +SDCategory: Halls of Stone +EndScriptData */ + +#include "precompiled.h" + +enum +{ + SAY_AGGRO = -1599005, + SAY_SLAY_1 = -1599006, + SAY_SLAY_2 = -1599007, + SAY_SLAY_3 = -1599008, + SAY_SLAY_4 = -1599009, + SAY_STUN = -1599010, + SAY_DEATH = -1599011 +}; + +/*###### +## boss_maiden_of_grief +######*/ + +struct MANGOS_DLL_DECL boss_maiden_of_griefAI : public ScriptedAI +{ + boss_maiden_of_griefAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + void Reset() + { + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void KilledUnit(Unit* pVictim) + { + switch(urand(0, 3)) + { + case 0: DoScriptText(SAY_SLAY_1, m_creature); break; + case 1: DoScriptText(SAY_SLAY_2, m_creature); break; + case 2: DoScriptText(SAY_SLAY_3, m_creature); break; + case 3: DoScriptText(SAY_SLAY_4, m_creature); break; + } + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_maiden_of_grief(Creature* pCreature) +{ + return new boss_maiden_of_griefAI(pCreature); +} + +void AddSC_boss_maiden_of_grief() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_maiden_of_grief"; + newscript->GetAI = &GetAI_boss_maiden_of_grief; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp new file mode 100644 index 000000000..b49f6f944 --- /dev/null +++ b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp @@ -0,0 +1,98 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Sjonnir +SD%Complete: 20% +SDComment: +SDCategory: Halls of Stone +EndScriptData */ + +#include "precompiled.h" + +enum +{ + SAY_AGGRO = -1599000, + SAY_SLAY_1 = -1599001, + SAY_SLAY_2 = -1599002, + SAY_SLAY_3 = -1599003, + SAY_DEATH = -1599004, + EMOTE_GENERIC_FRENZY = -1000002 +}; + +/*###### +## boss_sjonnir +######*/ + +struct MANGOS_DLL_DECL boss_sjonnirAI : public ScriptedAI +{ + boss_sjonnirAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + void Reset() + { + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void KilledUnit(Unit* pVictim) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_SLAY_1, m_creature); break; + case 1: DoScriptText(SAY_SLAY_2, m_creature); break; + case 2: DoScriptText(SAY_SLAY_3, m_creature); break; + } + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_sjonnir(Creature* pCreature) +{ + return new boss_sjonnirAI(pCreature); +} + +void AddSC_boss_sjonnir() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_sjonnir"; + newscript->GetAI = &GetAI_boss_sjonnir; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp new file mode 100644 index 000000000..3f4342185 --- /dev/null +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp @@ -0,0 +1,183 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Halls_of_Stone +SD%Complete: 20% +SDComment: +SDCategory: Halls of Stone +EndScriptData */ + +#include "precompiled.h" +#include "escort_ai.h" + +enum +{ + SAY_KILL_1 = -1599012, + SAY_KILL_2 = -1599013, + SAY_KILL_3 = -1599014, + SAY_LOW_HEALTH = -1599015, + SAY_DEATH = -1599016, + SAY_PLAYER_DEATH_1 = -1599017, + SAY_PLAYER_DEATH_2 = -1599018, + SAY_PLAYER_DEATH_3 = -1599019, + SAY_ESCORT_START = -1599020, + + SAY_SPAWN_DWARF = -1599021, + SAY_SPAWN_TROGG = -1599022, + SAY_SPAWN_OOZE = -1599023, + SAY_SPAWN_EARTHEN = -1599024, + + SAY_EVENT_INTRO_1 = -1599025, + SAY_EVENT_INTRO_2 = -1599026, + SAY_EVENT_INTRO_3_ABED = -1599027, + + SAY_EVENT_A_1 = -1599028, + SAY_EVENT_A_2_KADD = -1599029, + SAY_EVENT_A_3 = -1599030, + + SAY_EVENT_B_1 = -1599031, + SAY_EVENT_B_2_MARN = -1599032, + SAY_EVENT_B_3 = -1599033, + + SAY_EVENT_C_1 = -1599034, + SAY_EVENT_C_2_ABED = -1599035, + SAY_EVENT_C_3 = -1599036, + + SAY_EVENT_D_1 = -1599037, + SAY_EVENT_D_2_ABED = -1599038, + SAY_EVENT_D_3 = -1599039, + SAY_EVENT_D_4_ABED = -1599040, + + SAY_EVENT_END_01 = -1599041, + SAY_EVENT_END_02 = -1599042, + SAY_EVENT_END_03_ABED = -1599043, + SAY_EVENT_END_04 = -1599044, + SAY_EVENT_END_05_ABED = -1599045, + SAY_EVENT_END_06 = -1599046, + SAY_EVENT_END_07_ABED = -1599047, + SAY_EVENT_END_08 = -1599048, + SAY_EVENT_END_09_KADD = -1599049, + SAY_EVENT_END_10 = -1599050, + SAY_EVENT_END_11_KADD = -1599051, + SAY_EVENT_END_12 = -1599052, + SAY_EVENT_END_13_KADD = -1599053, + SAY_EVENT_END_14 = -1599054, + SAY_EVENT_END_15_MARN = -1599055, + SAY_EVENT_END_16 = -1599056, + SAY_EVENT_END_17_MARN = -1599057, + SAY_EVENT_END_18 = -1599058, + SAY_EVENT_END_19_MARN = -1599059, + SAY_EVENT_END_20 = -1599060, + SAY_EVENT_END_21_ABED = -1599061, + + SAY_VICTORY_SJONNIR_1 = -1599062, + SAY_VICTORY_SJONNIR_2 = -1599063, + + SAY_ENTRANCE_MEET = -1599064, + + TEXT_ID_START = 13100, + TEXT_ID_PROGRESS = 13101 +}; + +#define GOSSIP_ITEM_START "Brann, it would be our honor!" +#define GOSSIP_ITEM_PROGRESS "Let's move Brann, enough of the history lessons!" + +/*###### +## npc_brann_hos +######*/ + +struct MANGOS_DLL_DECL npc_brann_hosAI : public npc_escortAI +{ + npc_brann_hosAI(Creature* pCreature) : npc_escortAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + void Reset() + { + } + + void WaypointReached(uint32 uiPointId) + { + } + + void KilledUnit(Unit* pVictim) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_KILL_1, m_creature); break; + case 1: DoScriptText(SAY_KILL_2, m_creature); break; + case 2: DoScriptText(SAY_KILL_3, m_creature); break; + } + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + } + + void UpdateEscortAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +bool GossipHello_npc_brann_hos(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_START, pCreature->GetGUID()); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_START, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + //pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_PROGRESS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + //pPlayer->SEND_GOSSIP_MENU(TEXT_ID_PROGRESS, pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_brann_hos(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1 || uiAction == GOSSIP_ACTION_INFO_DEF+2) + pPlayer->CLOSE_GOSSIP_MENU(); + + return true; +} + +CreatureAI* GetAI_npc_brann_hos(Creature* pCreature) +{ + return new npc_brann_hosAI(pCreature); +} + +void AddSC_halls_of_stone() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_brann_hos"; + newscript->GetAI = &GetAI_npc_brann_hos; + newscript->pGossipHello = &GossipHello_npc_brann_hos; + newscript->pGossipSelect = &GossipSelect_npc_brann_hos; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp new file mode 100644 index 000000000..083b6da11 --- /dev/null +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -0,0 +1,288 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 +* 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, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +/* ScriptData +SDName: Instance_Ulduar +SD%Complete: +SDComment: +SDCategory: Ulduar +EndScriptData */ + +#include "precompiled.h" +#include "ulduar.h" + +struct MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance +{ + instance_ulduar(Map* pMap) : ScriptedInstance(pMap) { Initialize(); } + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string m_strInstData; + + uint64 m_uiLeviathanGUID; + uint64 m_uiIgnisGUID; + uint64 m_uiRazorscaleGUID; + uint64 m_uiXT002GUID; + uint64 m_auiAssemblyGUIDs[3]; + uint64 m_uiKologarnGUID; + uint64 m_uiAuriayaGUID; + uint64 m_uiMimironGUID; + uint64 m_uiHodirGUID; + uint64 m_uiThorimGUID; + uint64 m_uiFreyaGUID; + uint64 m_uiVezaxGUID; + uint64 m_uiYoggSaronGUID; + uint64 m_uiAlgalonGUID; + + void Initialize() + { + m_uiLeviathanGUID = 0; + m_uiIgnisGUID = 0; + m_uiRazorscaleGUID = 0; + m_uiXT002GUID = 0; + m_uiKologarnGUID = 0; + m_uiAuriayaGUID = 0; + m_uiMimironGUID = 0; + m_uiHodirGUID = 0; + m_uiThorimGUID = 0; + m_uiFreyaGUID = 0; + m_uiVezaxGUID = 0; + m_uiYoggSaronGUID = 0; + m_uiAlgalonGUID = 0; + + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + memset(&m_auiAssemblyGUIDs, 0, sizeof(m_auiAssemblyGUIDs)); + } + + bool IsEncounterInProgress() const + { + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + return true; + } + + return false; + } + + void OnCreatureCreate(Creature* pCreature) + { + switch(pCreature->GetEntry()) + { + case NPC_LEVIATHAN: + m_uiLeviathanGUID = pCreature->GetGUID(); + break; + case NPC_IGNIS: + m_uiIgnisGUID = pCreature->GetGUID(); + break; + case NPC_RAZORSCALE: + m_uiRazorscaleGUID = pCreature->GetGUID(); + break; + case NPC_XT002: + m_uiXT002GUID = pCreature->GetGUID(); + break; + + // Assembly of Iron + case NPC_STEELBREAKER: + m_auiAssemblyGUIDs[0] = pCreature->GetGUID(); + break; + case NPC_MOLGEIM: + m_auiAssemblyGUIDs[1] = pCreature->GetGUID(); + break; + case NPC_BRUNDIR: + m_auiAssemblyGUIDs[2] = pCreature->GetGUID(); + break; + + case NPC_KOLOGARN: + m_uiKologarnGUID = pCreature->GetGUID(); + break; + case NPC_AURIAYA: + m_uiAuriayaGUID = pCreature->GetGUID(); + break; + case NPC_MIMIRON: + m_uiMimironGUID = pCreature->GetGUID(); + break; + case NPC_HODIR: + m_uiHodirGUID = pCreature->GetGUID(); + break; + case NPC_THORIM: + m_uiThorimGUID = pCreature->GetGUID(); + break; + case NPC_FREYA: + m_uiFreyaGUID = pCreature->GetGUID(); + break; + case NPC_VEZAX: + m_uiVezaxGUID = pCreature->GetGUID(); + break; + case NPC_YOGGSARON: + m_uiYoggSaronGUID = pCreature->GetGUID(); + break; + case NPC_ALGALON: + m_uiAlgalonGUID = pCreature->GetGUID(); + break; + } + } + + /*void OnObjectCreate(GameObject *pGo) + { + }*/ + + void SetData(uint32 uiType, uint32 uiData) + { + switch(uiType) + { + case TYPE_LEVIATHAN: + case TYPE_IGNIS: + case TYPE_RAZORSCALE: + case TYPE_XT002: + case TYPE_ASSEMBLY: + case TYPE_KOLOGARN: + case TYPE_AURIAYA: + case TYPE_MIMIRON: + case TYPE_HODIR: + case TYPE_THORIM: + case TYPE_FREYA: + case TYPE_VEZAX: + case TYPE_YOGGSARON: + case TYPE_ALGALON: + m_auiEncounter[uiType] = uiData; + break; + } + + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + saveStream << m_auiEncounter[i] << " "; + + m_strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } + } + + uint64 GetData64(uint32 uiData) + { + switch(uiData) + { + case TYPE_LEVIATHAN: + return m_uiLeviathanGUID; + case TYPE_IGNIS: + return m_uiIgnisGUID; + case TYPE_RAZORSCALE: + return m_uiRazorscaleGUID; + case TYPE_XT002: + return m_uiXT002GUID; + case TYPE_KOLOGARN: + return m_uiKologarnGUID; + case TYPE_AURIAYA: + return m_uiAuriayaGUID; + case TYPE_MIMIRON: + return m_uiMimironGUID; + case TYPE_HODIR: + return m_uiMimironGUID; + case TYPE_THORIM: + return m_uiThorimGUID; + case TYPE_FREYA: + return m_uiFreyaGUID; + case TYPE_VEZAX: + return m_uiVezaxGUID; + case TYPE_YOGGSARON: + return m_uiYoggSaronGUID; + case TYPE_ALGALON: + return m_uiAlgalonGUID; + + // Assembly of Iron + case DATA_STEELBREAKER: + return m_auiAssemblyGUIDs[0]; + case DATA_MOLGEIM: + return m_auiAssemblyGUIDs[1]; + case DATA_BRUNDIR: + return m_auiAssemblyGUIDs[2]; + } + + return 0; + } + + uint32 GetData(uint32 uiType) + { + switch(uiType) + { + case TYPE_LEVIATHAN: + case TYPE_IGNIS: + case TYPE_RAZORSCALE: + case TYPE_XT002: + case TYPE_ASSEMBLY: + case TYPE_KOLOGARN: + case TYPE_AURIAYA: + case TYPE_MIMIRON: + case TYPE_HODIR: + case TYPE_THORIM: + case TYPE_FREYA: + case TYPE_VEZAX: + case TYPE_YOGGSARON: + case TYPE_ALGALON: + return m_auiEncounter[uiType]; + } + + return 0; + } + + const char* Save() + { + return m_strInstData.c_str(); + } + + void Load(const char* strIn) + { + if (!strIn) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(strIn); + + std::istringstream loadStream(strIn); + + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + loadStream >> m_auiEncounter[i]; + + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; + } + + OUT_LOAD_INST_DATA_COMPLETE; + } +}; + +InstanceData* GetInstanceData_instance_ulduar(Map* pMap) +{ + return new instance_ulduar(pMap); +} + +void AddSC_instance_ulduar() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "instance_ulduar"; + newscript->GetInstanceData = &GetInstanceData_instance_ulduar; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h new file mode 100644 index 000000000..813320941 --- /dev/null +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -0,0 +1,49 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 +* This program is free software licensed under GPL version 2 +* Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_ULDUAR_H +#define DEF_ULDUAR_H + +enum +{ + MAX_ENCOUNTER = 14, + + TYPE_LEVIATHAN = 0, + TYPE_IGNIS = 1, + TYPE_RAZORSCALE = 2, + TYPE_XT002 = 3, + TYPE_ASSEMBLY = 4, + TYPE_KOLOGARN = 5, + TYPE_AURIAYA = 6, + TYPE_MIMIRON = 7, + TYPE_HODIR = 8, + TYPE_THORIM = 9, + TYPE_FREYA = 10, + TYPE_VEZAX = 11, + TYPE_YOGGSARON = 12, + TYPE_ALGALON = 13, + + DATA_STEELBREAKER = 20, + DATA_MOLGEIM = 21, + DATA_BRUNDIR = 22, + + NPC_LEVIATHAN = 33113, + NPC_IGNIS = 33118, + NPC_RAZORSCALE = 33186, + NPC_XT002 = 33293, + NPC_STEELBREAKER = 32867, + NPC_MOLGEIM = 32927, + NPC_BRUNDIR = 32857, + NPC_KOLOGARN = 32930, + NPC_AURIAYA = 33515, + NPC_MIMIRON = 33350, + NPC_HODIR = 32845, + NPC_THORIM = 32865, + NPC_FREYA = 32906, + NPC_VEZAX = 33271, + NPC_YOGGSARON = 33288, + NPC_ALGALON = 32871 +}; + +#endif diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp new file mode 100644 index 000000000..3b0173447 --- /dev/null +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp @@ -0,0 +1,236 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Ingvar +SD%Complete: 35% +SDComment: TODO: correct timers. Create ressurection sequenze and phase 2. +SDCategory: Utgarde Keep +EndScriptData */ + +#include "precompiled.h" +#include "utgarde_keep.h" + +enum +{ + SAY_AGGRO_FIRST = -1574005, + SAY_AGGRO_SECOND = -1574006, + SAY_DEATH_FIRST = -1574007, + SAY_DEATH_SECOND = -1574008, + SAY_KILL_FIRST = -1574009, + SAY_KILL_SECOND = -1574010, + EMOTE_ROAR = -1574022, + + NPC_ANNHYLDE = 24068, + NPC_THROW_TARGET = 23996, //the target, casting spell and target of moving dummy + NPC_THROW_DUMMY = 23997, //the axe, moving to target + + //phase 1 + SPELL_CLEAVE = 42724, + + SPELL_SMASH = 42669, + SPELL_SMASH_H = 59706, + + SPELL_ENRAGE = 42705, + SPELL_ENRAGE_H = 59707, + + SPELL_STAGGERING_ROAR = 42708, + SPELL_STAGGERING_ROAR_H = 59708, + + //phase 2 + SPELL_DARK_SMASH_H = 42723, + + SPELL_DREADFUL_ROAR = 42729, + SPELL_DREADFUL_ROAR_H = 59734, + + SPELL_WOE_STRIKE = 42730, + SPELL_WOE_STRIKE_H = 59735, + + SPELL_SHADOW_AXE = 42748, + SPELL_SHADOW_AXE_PROC = 42751, + SPELL_SHADOW_AXE_PROC_H = 59720, + + //ressurection sequenze + SPELL_FEIGN_DEATH = 42795, + SPELL_TRANSFORM = 42796, + SPELL_SCOURGE_RES_SUMMON = 42863, //summones a dummy target + SPELL_SCOURGE_RES_HEAL = 42704, //heals max HP + SPELL_SCOURGE_RES_BUBBLE = 42862, //black bubble + SPELL_SCOURGE_RES_CHANNEL = 42857 //the whirl from annhylde +}; + +/*###### +## boss_ingvar +######*/ + +struct MANGOS_DLL_DECL boss_ingvarAI : public ScriptedAI +{ + boss_ingvarAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + bool m_bIsResurrected; + + uint32 m_uiCleaveTimer; + uint32 m_uiSmashTimer; + uint32 m_uiStaggeringRoarTimer; + uint32 m_uiEnrageTimer; + + void Reset() + { + m_bIsResurrected = false; + + m_uiCleaveTimer = urand(5000, 7000); + m_uiSmashTimer = urand(8000, 15000); + m_uiStaggeringRoarTimer = urand(10000, 25000); + m_uiEnrageTimer = 30000; + } + + void Aggro(Unit* pWho) + { + DoScriptText(m_bIsResurrected ? SAY_AGGRO_SECOND : SAY_AGGRO_FIRST, m_creature); + } + + //this need to be done when spell works + /*void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + { + if (m_bIsResurrected) + return; + + if (uiDamage >= m_creature->GetHealth()) + { + uiDamage = m_creature->GetHealth() -1; + + m_creature->GetMotionMaster()->Clear(false); + m_creature->GetMotionMaster()->MoveIdle(); + + DoScriptText(SAY_DEATH_FIRST, m_creature); + + m_creature->CastSpell(m_creature, SPELL_FEIGN_DEATH, true); + } + }*/ + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH_SECOND, m_creature); + } + + void KilledUnit(Unit* pVictim) + { + if (urand(0, 1)) + DoScriptText(m_bIsResurrected ? SAY_KILL_SECOND : SAY_KILL_FIRST, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (!m_bIsResurrected) + { + if (m_uiCleaveTimer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_CLEAVE); + m_uiCleaveTimer = urand(2500, 7000); + } + else + m_uiCleaveTimer -= uiDiff; + + if (m_uiSmashTimer < uiDiff) + { + DoCast(m_creature, m_bIsHeroicMode ? SPELL_SMASH_H : SPELL_SMASH); + m_uiSmashTimer = urand(8000, 15000); + } + else + m_uiSmashTimer -= uiDiff; + + if (m_uiStaggeringRoarTimer < uiDiff) + { + DoScriptText(EMOTE_ROAR, m_creature); + DoCast(m_creature, m_bIsHeroicMode ? SPELL_STAGGERING_ROAR_H : SPELL_STAGGERING_ROAR); + m_uiStaggeringRoarTimer = urand(15000, 30000); + } + else + m_uiStaggeringRoarTimer -= uiDiff; + + if (m_uiEnrageTimer < uiDiff) + { + DoCast(m_creature, m_bIsHeroicMode ? SPELL_ENRAGE_H : SPELL_ENRAGE); + m_uiEnrageTimer = urand(10000, 20000); + } + else + m_uiEnrageTimer -= uiDiff; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_ingvar(Creature* pCreature) +{ + return new boss_ingvarAI(pCreature); +} + +/*###### +## npc_annhylde +######*/ + +struct MANGOS_DLL_DECL npc_annhyldeAI : public ScriptedAI +{ + npc_annhyldeAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + void Reset() + { + } + + void UpdateAI(const uint32 uiDiff) + { + } +}; + +CreatureAI* GetAI_npc_annhylde(Creature* pCreature) +{ + return new npc_annhyldeAI(pCreature); +} + +void AddSC_boss_ingvar() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_ingvar"; + newscript->GetAI = &GetAI_boss_ingvar; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_annhylde"; + newscript->GetAI = &GetAI_npc_annhylde; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp new file mode 100644 index 000000000..8bf7e568c --- /dev/null +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp @@ -0,0 +1,324 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Keleseth +SD%Complete: 60% +SDComment: +SDCategory: Utgarde Keep +EndScriptData */ + +#include "precompiled.h" +#include "utgarde_keep.h" + +enum +{ + SAY_AGGRO = -1574000, + SAY_FROSTTOMB = -1574001, + SAY_SKELETONS = -1574002, + SAY_KILL = -1574003, + SAY_DEATH = -1574004, + EMOTE_FROST_TOMB = -1574021, + + // Boss Spells + SPELL_SHADOWBOLT = 43667, + SPELL_SHADOWBOLT_H = 59389, + + SPELL_SUMMON_FROST_TOMB = 42714, + SPELL_FROST_TOMB = 48400, // stun and deal damage + + // Skeleton Spells + SPELL_DECREPIFY = 42702, + SPELL_DECREPIFY_H = 59397, + SPELL_BONE_ARMOR = 59386, // casted on boss, heroic only + + NPC_FROST_TOMB = 23965, + NPC_VRYKUL_SKELETON = 23970 +}; + +const float RUN_DISTANCE = 20.0; + +static float fAddPosition[4] = {163.5727, 252.1900, 42.8684, 5.57052}; + +/*###### +## mob_vrykul_skeleton +######*/ + +struct MANGOS_DLL_DECL mob_vrykul_skeletonAI : public ScriptedAI +{ + mob_vrykul_skeletonAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + m_bIsHeroicMode = m_creature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + Creature* m_pKeleseth; + uint32 m_uiCastTimer; + uint32 m_uiReviveTimer; + + void Reset() + { + m_uiReviveTimer = 0; + m_uiCastTimer = urand(5000, 10000); // taken out of thin air + + if (!m_pInstance) + return; + + m_pKeleseth = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_KELESETH)); + } + + void MoveInLineOfSight(Unit* pWho) + { + if (!pWho || m_uiReviveTimer) + return; + + ScriptedAI::MoveInLineOfSight(pWho); + } + + void AttackStart(Unit* pWho) + { + if (!pWho || m_uiReviveTimer) + return; + + ScriptedAI::AttackStart(pWho); + } + + void Revive() + { + m_creature->SetHealth(m_creature->GetMaxHealth()); + m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + m_creature->GetMotionMaster()->MoveChase(pTarget); + + DoResetThreat(); + m_uiReviveTimer = 0; + } + + void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + { + if (!m_pKeleseth || !m_pKeleseth->isAlive()) + { + uiDamage = m_creature->GetHealth(); + return; + } + + if (m_uiReviveTimer) + { + uiDamage = 0; + return; + } + + if (m_creature->GetHealth() < uiDamage) + { + // start faking death + uiDamage = 0; + m_uiReviveTimer = 6000; + m_creature->SetHealth(0); + m_creature->RemoveAllAuras(); + m_creature->GetMotionMaster()->Clear(); + m_creature->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD); + m_creature->SetStandState(UNIT_STAND_STATE_DEAD); + return; + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiReviveTimer) + { + if (m_uiReviveTimer <= uiDiff) + Revive(); + else + m_uiReviveTimer -= uiDiff; + + return; + } + + if (m_uiCastTimer < uiDiff) + { + if (m_bIsHeroicMode) + { + if (urand(0, 3)) + DoCast(m_creature->getVictim(), SPELL_DECREPIFY_H); + else if (m_pKeleseth && m_pKeleseth->isAlive()) + DoCast(m_pKeleseth, SPELL_BONE_ARMOR); + } + else + DoCast(m_creature->getVictim(), SPELL_DECREPIFY); + + m_uiCastTimer = urand(5000, 15000); + } + else + m_uiCastTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_vrykul_skeleton(Creature* pCreature) +{ + return new mob_vrykul_skeletonAI(pCreature); +} + +/*###### +## boss_keleseth +######*/ + +struct MANGOS_DLL_DECL boss_kelesethAI : public ScriptedAI +{ + boss_kelesethAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + uint32 m_uiFrostTombTimer; + uint32 m_uiSummonTimer; + uint32 m_uiShadowboltTimer; + + void Reset() + { + // timers need confirmation + m_uiFrostTombTimer = 20000; + m_uiSummonTimer = 5000 ; + m_uiShadowboltTimer = 0; + } + + void AttackStart(Unit* pWho) + { + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho, 0.0f); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + + m_creature->GetMotionMaster()->MoveChase(pWho, RUN_DISTANCE); + } + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void SummonAdds() + { + for (uint8 i=0; i<4; ++i) + m_creature->SummonCreature(NPC_VRYKUL_SKELETON, fAddPosition[0]+rand()%7, fAddPosition[1]+rand()%7, fAddPosition[2], fAddPosition[3], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, MINUTE*IN_MILISECONDS); + } + + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_VRYKUL_SKELETON) + pSummoned->AI()->AttackStart(m_creature->getVictim()); + + if (pSummoned->GetEntry() == NPC_FROST_TOMB) + pSummoned->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_FROST, true); + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(SAY_KILL, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiSummonTimer) + { + if (m_uiSummonTimer <= uiDiff) + { + SummonAdds(); + m_uiSummonTimer = 0; + } + else + m_uiSummonTimer -= uiDiff; + } + + if (m_uiShadowboltTimer < uiDiff) + { + DoCast(m_creature->getVictim(), m_bIsHeroicMode ? SPELL_SHADOWBOLT_H : SPELL_SHADOWBOLT); + m_uiShadowboltTimer = 3000; + } + else + m_uiShadowboltTimer -= uiDiff; + + if (m_uiFrostTombTimer < uiDiff) + { + if (Unit* pTombTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + { + //DoCast(pTombTarget, SPELL_SUMMON_FROST_TOMB); + float fPosX, fPosY, fPosZ; + pTombTarget->GetPosition(fPosX, fPosY, fPosZ); + + if (Creature* pFrostTomb = m_creature->SummonCreature(NPC_FROST_TOMB, fPosX, fPosY, fPosZ, 0, TEMPSUMMON_TIMED_DESPAWN, 20000)) + { + pFrostTomb->AddThreat(pTombTarget, 0.0); + pFrostTomb->CastSpell(pTombTarget, SPELL_FROST_TOMB, false); + } + + DoScriptText(SAY_FROSTTOMB, m_creature); + DoScriptText(EMOTE_FROST_TOMB, m_creature, pTombTarget); + } + + m_uiFrostTombTimer = 25000; + } + else + m_uiFrostTombTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_keleseth(Creature* pCreature) +{ + return new boss_kelesethAI(pCreature); +} + +void AddSC_boss_keleseth() +{ + Script* newscript; + + newscript = new Script; + newscript->Name = "boss_keleseth"; + newscript->GetAI = &GetAI_boss_keleseth; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_vrykul_skeleton"; + newscript->GetAI = &GetAI_mob_vrykul_skeleton; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp new file mode 100644 index 000000000..439d94cfd --- /dev/null +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp @@ -0,0 +1,320 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Skarvald_and_Dalronn +SD%Complete: 60% +SDComment: TODO: correct timers +SDCategory: Utgarde Keep +EndScriptData */ + +#include "precompiled.h" +#include "utgarde_keep.h" + +enum +{ + SAY_SKA_AGGRO = -1574011, + SAY_SKA_DEATH = -1574012, + SAY_SKA_DEATH_REAL = -1574013, + SAY_SKA_KILL = -1574014, + SAY_SKA_DAL_DIES_REPLY = -1574015, + + SAY_DAL_AGGRO_REPLY = -1574016, + SAY_DAL_DEATH = -1574017, + SAY_DAL_DEATH_REAL = -1574018, + SAY_DAL_KILL = -1574019, + SAY_DAL_SKA_DIES_REPLY = -1574020, + + SPELL_SUMMON_DAL_GHOST = 48612, + SPELL_SUMMON_SKA_GHOST = 48613, + + NPC_DAL_GHOST = 27389, + NPC_SKA_GHOST = 27390, + + NPC_SKELETAL = 28878, //summoned guardian in heroic + + //skarvald + SPELL_CHARGE = 43651, + SPELL_STONE_STRIKE = 48583, + SPELL_ENRAGE = 48193, + + //dalronn + SPELL_SHADOW_BOLT = 43649, + SPELL_SHADOW_BOLT_H = 59575, + + SPELL_DEBILITATE = 43650, + SPELL_DEBILITATE_H = 59577, + + SPELL_SUMMON_SKELETONS = 52611 +}; + +struct Yell +{ + int32 m_iTextId; + int32 m_iTextReplyId; +}; + +Yell m_aYell[] = +{ + {SAY_SKA_AGGRO, SAY_DAL_AGGRO_REPLY}, + {SAY_SKA_DEATH, SAY_DAL_SKA_DIES_REPLY}, + {SAY_DAL_DEATH, SAY_SKA_DAL_DIES_REPLY} +}; + +struct MANGOS_DLL_DECL boss_s_and_d_dummyAI : public ScriptedAI +{ + boss_s_and_d_dummyAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_uiGhostGUID = 0; + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + uint64 m_uiGhostGUID; + + Creature* GetBuddy() + { + if (!m_pInstance) + return NULL; + + return m_pInstance->instance->GetCreature(m_pInstance->GetData64(m_creature->GetEntry() == NPC_DALRONN ? NPC_SKARVALD : NPC_DALRONN)); + } + + void Reset() { } + + void EnterCombat(Unit* pWho) + { + if (!pWho) + return; + + if (Creature* pBuddy = GetBuddy()) + { + if (!pBuddy->getVictim()) + pBuddy->AI()->AttackStart(pWho); + } + + Aggro(pWho); + } + + void JustSummoned(Creature* pSummoned) + { + // EventAI can probably handle ghosts + if (pSummoned->GetEntry() == NPC_DAL_GHOST || pSummoned->GetEntry() == NPC_SKA_GHOST) + m_uiGhostGUID = pSummoned->GetGUID(); + + Unit* pTarget = SelectUnit(SELECT_TARGET_TOPAGGRO,1); + + if (m_creature->getVictim()) + pSummoned->AI()->AttackStart(pTarget ? pTarget : m_creature->getVictim()); + } + + void JustDied(Unit* pKiller) + { + if (Creature* pBuddy = GetBuddy()) + { + if (pBuddy->isAlive()) + { + DoScriptText(m_creature->GetEntry() == NPC_SKARVALD ? m_aYell[1].m_iTextId : m_aYell[2].m_iTextId, m_creature); + DoScriptText(m_creature->GetEntry() == NPC_SKARVALD ? m_aYell[1].m_iTextReplyId : m_aYell[2].m_iTextReplyId, pBuddy); + + pBuddy->CastSpell(m_creature, m_creature->GetEntry() == NPC_SKARVALD ? SPELL_SUMMON_SKA_GHOST : SPELL_SUMMON_DAL_GHOST, true); + + m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + } + else + { + if (Creature* pGhost = (Creature*)Unit::GetUnit(*m_creature,m_uiGhostGUID)) + pGhost->ForcedDespawn(); + + pBuddy->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + } + } + } +}; + +/*###### +## boss_skarvald +######*/ + +struct MANGOS_DLL_DECL boss_skarvaldAI : public boss_s_and_d_dummyAI +{ + boss_skarvaldAI(Creature* pCreature) : boss_s_and_d_dummyAI(pCreature) { Reset(); } + + uint32 m_uiYellDelayTimer; + uint32 m_uiChargeTimer; + uint32 m_uiEnrageTimer; + uint32 m_uiStoneStrikeTimer; + + void Reset() + { + m_uiYellDelayTimer = 0; + m_uiChargeTimer = urand(2000, 6000); + m_uiEnrageTimer = 15000; + m_uiStoneStrikeTimer = 8000; + } + + void Aggro(Unit* pWho) + { + DoScriptText(m_aYell[0].m_iTextId, m_creature); + m_uiYellDelayTimer = 5000; + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(SAY_SKA_KILL, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiYellDelayTimer) + { + if (m_uiYellDelayTimer <= uiDiff) + { + if (Creature* pBuddy = GetBuddy()) + DoScriptText(m_aYell[0].m_iTextReplyId, pBuddy); + + m_uiYellDelayTimer = 0; + } + else + m_uiYellDelayTimer -= uiDiff; + } + + if (m_uiChargeTimer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1)) + DoCast(pTarget, SPELL_CHARGE); + + m_uiChargeTimer = urand(8000, 16000); + } + else + m_uiChargeTimer -= uiDiff; + + if (m_uiEnrageTimer < uiDiff) + { + DoCast(m_creature, SPELL_ENRAGE); + m_uiEnrageTimer = 20000; + } + else + m_uiEnrageTimer -= uiDiff; + + if (m_uiStoneStrikeTimer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_STONE_STRIKE); + m_uiStoneStrikeTimer = urand(5000, 15000); + } + else + m_uiStoneStrikeTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_skarvald(Creature* pCreature) +{ + return new boss_skarvaldAI(pCreature); +} + +/*###### +## boss_dalronn +######*/ + +struct MANGOS_DLL_DECL boss_dalronnAI : public boss_s_and_d_dummyAI +{ + boss_dalronnAI(Creature* pCreature) : boss_s_and_d_dummyAI(pCreature) { Reset(); } + + uint32 m_uiDebilitateTimer; + uint32 m_uiShadowBoltTimer; + uint32 m_uiSkeletonTimer; + + void Reset() + { + m_uiDebilitateTimer = urand(5000, 10000); + m_uiShadowBoltTimer = urand(2500, 6000); + m_uiSkeletonTimer = urand(25000, 35000); + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(SAY_DAL_KILL, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiDebilitateTimer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, m_bIsHeroicMode ? SPELL_DEBILITATE_H : SPELL_DEBILITATE); + + m_uiDebilitateTimer = urand(12000, 20000); + } + else + m_uiDebilitateTimer -= uiDiff; + + if (m_uiShadowBoltTimer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, m_bIsHeroicMode ? SPELL_SHADOW_BOLT_H : SPELL_SHADOW_BOLT); + + m_uiShadowBoltTimer = urand(3000, 6000); + } + else + m_uiShadowBoltTimer -= uiDiff; + + if (m_bIsHeroicMode) + { + if (m_uiSkeletonTimer < uiDiff) + { + if (!m_creature->FindGuardianWithEntry(NPC_SKELETAL)) + DoCast(m_creature, SPELL_SUMMON_SKELETONS); + + m_uiSkeletonTimer = 30000; + } + else + m_uiSkeletonTimer -= uiDiff; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_dalronn(Creature* pCreature) +{ + return new boss_dalronnAI(pCreature); +} + +void AddSC_boss_skarvald_and_dalronn() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_skarvald"; + newscript->GetAI = &GetAI_boss_skarvald; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_dalronn"; + newscript->GetAI = &GetAI_boss_dalronn; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp new file mode 100644 index 000000000..ee2bfdc4e --- /dev/null +++ b/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp @@ -0,0 +1,203 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance_Utgarde_Keep +SD%Complete: 20% +SDComment: +SDCategory: Utgarde Keep +EndScriptData */ + +#include "precompiled.h" +#include "utgarde_keep.h" + +struct MANGOS_DLL_DECL instance_utgarde_keep : public ScriptedInstance +{ + instance_utgarde_keep(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string strInstData; + + uint64 m_uiKelesethGUID; + uint64 m_uiSkarvaldGUID; + uint64 m_uiDalronnGUID; + + uint64 m_uiBellow1GUID; + uint64 m_uiBellow2GUID; + uint64 m_uiBellow3GUID; + uint64 m_uiForgeFire1GUID; + uint64 m_uiForgeFire2GUID; + uint64 m_uiForgeFire3GUID; + + void Initialize() + { + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + + m_uiKelesethGUID = 0; + m_uiSkarvaldGUID = 0; + m_uiDalronnGUID = 0; + + m_uiBellow1GUID = 0; + m_uiBellow2GUID = 0; + m_uiBellow3GUID = 0; + m_uiForgeFire1GUID = 0; + m_uiForgeFire2GUID = 0; + m_uiForgeFire3GUID = 0; + } + + void OnCreatureCreate(Creature* pCreature) + { + switch(pCreature->GetEntry()) + { + case NPC_KELESETH: m_uiKelesethGUID = pCreature->GetGUID(); break; + case NPC_SKARVALD: m_uiSkarvaldGUID = pCreature->GetGUID(); break; + case NPC_DALRONN: m_uiDalronnGUID = pCreature->GetGUID(); break; + } + } + + void OnObjectCreate(GameObject* pGo) + { + switch(pGo->GetEntry()) + { + case GO_BELLOW_1: + m_uiBellow1GUID = pGo->GetGUID(); + if (m_auiEncounter[0] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_BELLOW_2: + m_uiBellow2GUID = pGo->GetGUID(); + if (m_auiEncounter[1] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_BELLOW_3: + m_uiBellow3GUID = pGo->GetGUID(); + if (m_auiEncounter[2] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_FORGEFIRE_1: + m_uiForgeFire1GUID = pGo->GetGUID(); + if (m_auiEncounter[0] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_FORGEFIRE_2: + m_uiForgeFire2GUID = pGo->GetGUID(); + if (m_auiEncounter[1] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_FORGEFIRE_3: + m_uiForgeFire3GUID = pGo->GetGUID(); + if (m_auiEncounter[2] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + } + } + + void SetData(uint32 uiType, uint32 uiData) + { + switch(uiType) + { + case GO_BELLOW_1: + m_auiEncounter[0] = uiData; + break; + case GO_BELLOW_2: + m_auiEncounter[1] = uiData; + break; + case GO_BELLOW_3: + m_auiEncounter[2] = uiData; + break; + } + + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2]; + + strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } + } + + const char* Save() + { + return strInstData.c_str(); + } + + uint64 GetData64(uint32 uiData) + { + switch(uiData) + { + case NPC_KELESETH: + return m_uiKelesethGUID; + case NPC_SKARVALD: + return m_uiSkarvaldGUID; + case NPC_DALRONN: + return m_uiDalronnGUID; + case GO_BELLOW_1: + return m_uiBellow1GUID; + case GO_BELLOW_2: + return m_uiBellow2GUID; + case GO_BELLOW_3: + return m_uiBellow3GUID; + case GO_FORGEFIRE_1: + return m_uiForgeFire1GUID; + case GO_FORGEFIRE_2: + return m_uiForgeFire2GUID; + case GO_FORGEFIRE_3: + return m_uiForgeFire3GUID; + } + return 0; + } + + void Load(const char* in) + { + if (!in) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(in); + + std::istringstream loadStream(in); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2]; + + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; + } + + OUT_LOAD_INST_DATA_COMPLETE; + } +}; + +InstanceData* GetInstanceData_instance_utgarde_keep(Map* pMap) +{ + return new instance_utgarde_keep(pMap); +} + +void AddSC_instance_utgarde_keep() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "instance_utgarde_keep"; + newscript->GetInstanceData = GetInstanceData_instance_utgarde_keep; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp new file mode 100644 index 000000000..025592d8d --- /dev/null +++ b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp @@ -0,0 +1,160 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Utgarde_Keep +SD%Complete: 75 +SDComment: +SDCategory: Utgarde Keep +EndScriptData */ + +/* ContentData +mob_dragonflayer_forge_master +EndContentData */ + +#include "precompiled.h" +#include "utgarde_keep.h" + +/*###### +## mob_dragonflayer_forge_master +######*/ + +enum +{ + SPELL_BURNING_BRAND = 43757, + SPELL_BURNING_BRAND_H = 59601, + SPELL_CAUTERIZE = 60211, + + MAX_FORGE = 3 +}; + +struct MANGOS_DLL_DECL mob_dragonflayer_forge_masterAI : public ScriptedAI +{ + mob_dragonflayer_forge_masterAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_uiForgeEncounterId = 0; + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + uint32 m_uiForgeEncounterId; + uint32 m_uiBurningBrandTimer; + + void Reset() + { + m_uiBurningBrandTimer = 2000; + } + + void SetMyForge() + { + std::list lGOList; + uint32 uiGOBellow = 0; + uint32 uiGOFire = 0; + + for(uint8 i = 0; i < MAX_FORGE; ++i) + { + switch(i) + { + case 0: uiGOBellow = GO_BELLOW_1; break; + case 1: uiGOBellow = GO_BELLOW_2; break; + case 2: uiGOBellow = GO_BELLOW_3; break; + } + + if (GameObject* pGOTemp = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(uiGOBellow))) + lGOList.push_back(pGOTemp); + } + + if (!lGOList.empty()) + { + if (lGOList.size() != MAX_FORGE) + error_log("SD2: mob_dragonflayer_forge_master expected %u in lGOList, but does not match.", MAX_FORGE); + + lGOList.sort(ObjectDistanceOrder(m_creature)); + + if (lGOList.front()->getLootState() == GO_READY) + lGOList.front()->UseDoorOrButton(DAY); + else if (lGOList.front()->getLootState() == GO_ACTIVATED) + lGOList.front()->ResetDoorOrButton(); + + switch(lGOList.front()->GetEntry()) + { + case GO_BELLOW_1: uiGOFire = GO_FORGEFIRE_1; break; + case GO_BELLOW_2: uiGOFire = GO_FORGEFIRE_2; break; + case GO_BELLOW_3: uiGOFire = GO_FORGEFIRE_3; break; + } + + if (GameObject* pGOTemp = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(uiGOFire))) + { + if (pGOTemp->getLootState() == GO_READY) + pGOTemp->UseDoorOrButton(DAY); + else if (pGOTemp->getLootState() == GO_ACTIVATED) + pGOTemp->ResetDoorOrButton(); + } + + m_uiForgeEncounterId = lGOList.front()->GetEntry(); + } + } + + void Aggro(Unit* pWho) + { + SetMyForge(); + } + + void JustReachedHome() + { + SetMyForge(); + } + + void JustDied(Unit* pKiller) + { + if (m_pInstance) + m_pInstance->SetData(m_uiForgeEncounterId, DONE); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiBurningBrandTimer < uiDiff) + { + DoCast(m_creature->getVictim(), m_bIsHeroicMode ? SPELL_BURNING_BRAND_H : SPELL_BURNING_BRAND); + m_uiBurningBrandTimer = 15000; + } + else m_uiBurningBrandTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_dragonflayer_forge_master(Creature* pCreature) +{ + return new mob_dragonflayer_forge_masterAI(pCreature); +} + +void AddSC_utgarde_keep() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "mob_dragonflayer_forge_master"; + newscript->GetAI = &GetAI_mob_dragonflayer_forge_master; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h new file mode 100644 index 000000000..e9ab8ab09 --- /dev/null +++ b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h @@ -0,0 +1,25 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_UTG_KEEP_H +#define DEF_UTG_KEEP_H + +enum +{ + MAX_ENCOUNTER = 3, + + //also using these as identifier for Set/GetData(), unlike normal naming + NPC_KELESETH = 23953, + NPC_SKARVALD = 24200, + NPC_DALRONN = 24201, + + GO_BELLOW_1 = 186688, + GO_BELLOW_2 = 186689, + GO_BELLOW_3 = 186690, + GO_FORGEFIRE_1 = 186692, + GO_FORGEFIRE_2 = 186693, + GO_FORGEFIRE_3 = 186691 +}; + +#endif diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp new file mode 100644 index 000000000..68c614d01 --- /dev/null +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp @@ -0,0 +1,91 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Gortok +SD%Complete: 20% +SDComment: +SDCategory: Utgarde Pinnacle +EndScriptData */ + +#include "precompiled.h" + +enum +{ + SAY_AGGRO = -1575015, + SAY_SLAY_1 = -1575016, + SAY_SLAY_2 = -1575017, + SAY_DEATH = -1575018 +}; + +/*###### +## boss_gortok +######*/ + +struct MANGOS_DLL_DECL boss_gortokAI : public ScriptedAI +{ + boss_gortokAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + void Reset() + { + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_gortok(Creature* pCreature) +{ + return new boss_gortokAI(pCreature); +} + +void AddSC_boss_gortok() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_gortok"; + newscript->GetAI = &GetAI_boss_gortok; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp new file mode 100644 index 000000000..c230564fb --- /dev/null +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp @@ -0,0 +1,104 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Skadi +SD%Complete: 20% +SDComment: +SDCategory: Utgarde Pinnacle +EndScriptData */ + +#include "precompiled.h" + +enum +{ + SAY_AGGRO = -1575019, + SAY_DRAKEBREATH_1 = -1575020, + SAY_DRAKEBREATH_2 = -1575021, + SAY_DRAKEBREATH_3 = -1575022, + SAY_DRAKE_HARPOON_1 = -1575023, + SAY_DRAKE_HARPOON_2 = -1575024, + SAY_KILL_1 = -1575025, + SAY_KILL_2 = -1575026, + SAY_KILL_3 = -1575027, + SAY_DEATH = -1575028, + SAY_DRAKE_DEATH = -1575029, + EMOTE_HARPOON_RANGE = -1575030 +}; + +/*###### +## boss_skadi +######*/ + +struct MANGOS_DLL_DECL boss_skadiAI : public ScriptedAI +{ + boss_skadiAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + void Reset() + { + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void KilledUnit(Unit* pVictim) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_KILL_1, m_creature); break; + case 1: DoScriptText(SAY_KILL_2, m_creature); break; + case 2: DoScriptText(SAY_KILL_3, m_creature); break; + } + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_skadi(Creature* pCreature) +{ + return new boss_skadiAI(pCreature); +} + +void AddSC_boss_skadi() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_skadi"; + newscript->GetAI = &GetAI_boss_skadi; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp new file mode 100644 index 000000000..016c38961 --- /dev/null +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp @@ -0,0 +1,272 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Svala +SD%Complete: 30% +SDComment: TODO: abilities. The way spells for intro works could use more research. +SDCategory: Utgarde Pinnacle +EndScriptData */ + +#include "precompiled.h" +#include "utgarde_pinnacle.h" + +enum +{ + SAY_INTRO_1 = -1575000, + SAY_INTRO_2_ARTHAS = -1575001, + SAY_INTRO_3 = -1575002, + SAY_INTRO_4_ARTHAS = -1575003, + SAY_INTRO_5 = -1575004, + + SAY_AGGRO = -1575005, + SAY_SLAY_1 = -1575006, + SAY_SLAY_2 = -1575007, + SAY_SLAY_3 = -1575008, + SAY_SACRIFICE_1 = -1575009, + SAY_SACRIFICE_2 = -1575010, + SAY_SACRIFICE_3 = -1575011, + SAY_SACRIFICE_4 = -1575012, + SAY_SACRIFICE_5 = -1575013, + SAY_DEATH = -1575014, + + NPC_SVALA_SORROW = 26668, + NPC_ARTHAS_IMAGE = 29280, + + SPELL_ARTHAS_VISUAL = 54134, + + // don't know how these should work in relation to each other + SPELL_TRANSFORMING = 54205, + SPELL_TRANSFORMING_FLOATING = 54140, + SPELL_TRANSFORMING_CHANNEL = 54142, + + SPELL_RITUAL_OF_SWORD = 48276, + SPELL_CALL_FLAMES = 48258, + SPELL_SINISTER_STRIKE = 15667, + SPELL_SINISTER_STRIKE_H = 59409 +}; + +/*###### +## boss_svala +######*/ + +struct MANGOS_DLL_DECL boss_svalaAI : public ScriptedAI +{ + boss_svalaAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsIntroDone = false; + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + Creature* pArthas; + + bool m_bIsIntroDone; + uint32 m_uiIntroTimer; + uint32 m_uiIntroCount; + + void Reset() + { + pArthas = NULL; + + m_uiIntroTimer = 2500; + m_uiIntroCount = 0; + + if (m_creature->isAlive() && m_pInstance && m_pInstance->GetData(TYPE_SVALA) > IN_PROGRESS) + { + if (m_creature->GetEntry() != NPC_SVALA_SORROW) + m_creature->UpdateEntry(NPC_SVALA_SORROW); + + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + + m_bIsIntroDone = true; + } + } + + void JustReachedHome() + { + DoMoveToPosition(); + } + + void MoveInLineOfSight(Unit* pWho) + { + if (!m_bIsIntroDone) + { + if (m_pInstance && m_pInstance->GetData(TYPE_SVALA) == IN_PROGRESS) + { + m_pInstance->SetData(TYPE_SVALA, SPECIAL); + + float fX, fY, fZ; + m_creature->GetClosePoint(fX, fY, fZ, m_creature->GetObjectSize(), 16.0f, 0.0f); + + // we assume m_creature is spawned in proper location + m_creature->SummonCreature(NPC_ARTHAS_IMAGE, fX, fY, fZ, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 60000); + } + + return; + } + + ScriptedAI::MoveInLineOfSight(pWho); + } + + void Aggro(Unit* pWho) + { + if (m_creature->HasMonsterMoveFlag(MONSTER_MOVE_SPLINE)) + m_creature->RemoveMonsterMoveFlag(MONSTER_MOVE_SPLINE); + + DoScriptText(SAY_AGGRO, m_creature); + } + + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_ARTHAS_IMAGE) + { + pSummoned->CastSpell(pSummoned, SPELL_ARTHAS_VISUAL, true); + pArthas = pSummoned; + pSummoned->SetFacingToObject(m_creature); + } + } + + void SummonedCreatureDespawn(Creature* pDespawned) + { + if (pDespawned->GetEntry() == NPC_ARTHAS_IMAGE) + pArthas = NULL; + } + + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + { + if (pSpell->Id == SPELL_TRANSFORMING) + { + if (pArthas) + pArthas->InterruptNonMeleeSpells(true); + + m_creature->UpdateEntry(NPC_SVALA_SORROW); + } + } + + void KilledUnit(Unit* pVictim) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_SLAY_1, m_creature); break; + case 1: DoScriptText(SAY_SLAY_2, m_creature); break; + case 2: DoScriptText(SAY_SLAY_3, m_creature); break; + } + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + } + + void DoMoveToPosition() + { + float fX, fZ, fY; + m_creature->GetRespawnCoord(fX, fY, fZ); + + m_creature->AddMonsterMoveFlag(MONSTER_MOVE_SPLINE); + + m_creature->SendMonsterMoveWithSpeed(fX, fY, fZ + 5.0f, m_uiIntroTimer); + m_creature->GetMap()->CreatureRelocation(m_creature, fX, fY, fZ + 5.0f, m_creature->GetOrientation()); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + { + if (m_bIsIntroDone) + return; + + if (pArthas && pArthas->isAlive()) + { + if (m_uiIntroTimer < uiDiff) + { + m_uiIntroTimer = 10000; + + switch(m_uiIntroCount) + { + case 0: + DoScriptText(SAY_INTRO_1, m_creature); + break; + case 1: + DoScriptText(SAY_INTRO_2_ARTHAS, pArthas); + break; + case 2: + pArthas->CastSpell(m_creature, SPELL_TRANSFORMING_CHANNEL, false); + m_creature->CastSpell(m_creature, SPELL_TRANSFORMING_FLOATING, false); + DoMoveToPosition(); + break; + case 3: + m_creature->CastSpell(m_creature, SPELL_TRANSFORMING, false); + DoScriptText(SAY_INTRO_3, m_creature); + break; + case 4: + DoScriptText(SAY_INTRO_4_ARTHAS, pArthas); + break; + case 5: + DoScriptText(SAY_INTRO_5, m_creature); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_bIsIntroDone = true; + break; + } + + ++m_uiIntroCount; + } + else + m_uiIntroTimer -= uiDiff; + } + + return; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_svala(Creature* pCreature) +{ + return new boss_svalaAI(pCreature); +} + +bool AreaTrigger_at_svala_intro(Player* pPlayer, AreaTriggerEntry* pAt) +{ + if (ScriptedInstance* pInstance = (ScriptedInstance*)pPlayer->GetInstanceData()) + { + if (pInstance->GetData(TYPE_SVALA) == NOT_STARTED) + pInstance->SetData(TYPE_SVALA, IN_PROGRESS); + } + + return false; +} + +void AddSC_boss_svala() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_svala"; + newscript->GetAI = &GetAI_boss_svala; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "at_svala_intro"; + newscript->pAreaTrigger = &AreaTrigger_at_svala_intro; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp new file mode 100644 index 000000000..b9e42741b --- /dev/null +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp @@ -0,0 +1,103 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Ymiron +SD%Complete: 20% +SDComment: +SDCategory: Utgarde Pinnacle +EndScriptData */ + +#include "precompiled.h" + +enum +{ + SAY_AGGRO = -1575031, + SAY_SUMMON_BJORN = -1575032, + SAY_SUMMON_HALDOR = -1575033, + SAY_SUMMON_RANULF = -1575034, + SAY_SUMMON_TORGYN = -1575035, + SAY_SLAY_1 = -1575036, + SAY_SLAY_2 = -1575037, + SAY_SLAY_3 = -1575038, + SAY_SLAY_4 = -1575039, + SAY_DEATH = -1575040 +}; + +/*###### +## boss_ymiron +######*/ + +struct MANGOS_DLL_DECL boss_ymironAI : public ScriptedAI +{ + boss_ymironAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + void Reset() + { + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void KilledUnit(Unit* pVictim) + { + switch(urand(0, 3)) + { + case 0: DoScriptText(SAY_SLAY_1, m_creature); break; + case 1: DoScriptText(SAY_SLAY_2, m_creature); break; + case 2: DoScriptText(SAY_SLAY_3, m_creature); break; + case 3: DoScriptText(SAY_SLAY_4, m_creature); break; + } + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_ymiron(Creature* pCreature) +{ + return new boss_ymironAI(pCreature); +} + +void AddSC_boss_ymiron() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_ymiron"; + newscript->GetAI = &GetAI_boss_ymiron; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp new file mode 100644 index 000000000..ca3e188de --- /dev/null +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp @@ -0,0 +1,135 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: instance_pinnacle +SD%Complete: 25% +SDComment: +SDCategory: Utgarde Pinnacle +EndScriptData */ + +#include "precompiled.h" +#include "utgarde_pinnacle.h" + +struct MANGOS_DLL_DECL instance_pinnacle : public ScriptedInstance +{ + instance_pinnacle(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string strInstData; + + void Initialize() + { + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + } + + uint32 GetData(uint32 uiType) + { + switch(uiType) + { + case TYPE_SVALA: + return m_auiEncounter[0]; + case TYPE_GORTOK: + return m_auiEncounter[1]; + case TYPE_SKADI: + return m_auiEncounter[2]; + case TYPE_YMIRON: + return m_auiEncounter[3]; + } + + return 0; + } + + void SetData(uint32 uiType, uint32 uiData) + { + debug_log("SD2: Instance Pinnacle: SetData received for type %u with data %u", uiType, uiData); + + switch(uiType) + { + case TYPE_SVALA: + m_auiEncounter[0] = uiData; + break; + case TYPE_GORTOK: + m_auiEncounter[1] = uiData; + break; + case TYPE_SKADI: + m_auiEncounter[2] = uiData; + break; + case TYPE_YMIRON: + m_auiEncounter[3] = uiData; + break; + default: + error_log("SD2: Instance Pinnacle: SetData = %u for type %u does not exist/not implemented.", uiType, uiData); + break; + } + + //saving also SPECIAL for this instance + if (uiData == DONE || uiData == SPECIAL) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3]; + + strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } + } + + const char* Save() + { + return strInstData.c_str(); + } + + void Load(const char* chrIn) + { + if (!chrIn) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(chrIn); + + std::istringstream loadStream(chrIn); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3]; + + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; + } + + OUT_LOAD_INST_DATA_COMPLETE; + } +}; + +InstanceData* GetInstanceData_instance_pinnacle(Map* pMap) +{ + return new instance_pinnacle(pMap); +} + +void AddSC_instance_pinnacle() +{ + Script* newscript; + + newscript = new Script; + newscript->Name = "instance_pinnacle"; + newscript->GetInstanceData = &GetInstanceData_instance_pinnacle; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h b/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h new file mode 100644 index 000000000..84a52948f --- /dev/null +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h @@ -0,0 +1,18 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_NEXUS_H +#define DEF_NEXUS_H + +enum +{ + MAX_ENCOUNTER = 4, + + TYPE_SVALA = 0, + TYPE_GORTOK = 1, + TYPE_SKADI = 2, + TYPE_YMIRON = 3 +}; + +#endif diff --git a/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp b/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp new file mode 100644 index 000000000..4e641920a --- /dev/null +++ b/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp @@ -0,0 +1,346 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Exarch_Maladaar +SD%Complete: 95 +SDComment: Most of event implemented, some adjustments to timers remain and possibly make some better code for switching his dark side in to better "images" of player. +SDCategory: Auchindoun, Auchenai Crypts +EndScriptData */ + +/* ContentData +mob_stolen_soul +boss_exarch_maladaar +mob_avatar_of_martyred +EndContentData */ + +#include "precompiled.h" + +#define SPELL_MOONFIRE 37328 +#define SPELL_FIREBALL 37329 +#define SPELL_MIND_FLAY 37330 +#define SPELL_HEMORRHAGE 37331 +#define SPELL_FROSTSHOCK 37332 +#define SPELL_CURSE_OF_AGONY 37334 +#define SPELL_MORTAL_STRIKE 37335 +#define SPELL_FREEZING_TRAP 37368 +#define SPELL_HAMMER_OF_JUSTICE 37369 + +struct MANGOS_DLL_DECL mob_stolen_soulAI : public ScriptedAI +{ + mob_stolen_soulAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint8 myClass; + uint32 Class_Timer; + + void Reset() + { + Class_Timer = 1000; + } + + void SetMyClass(uint8 myclass) + { + myClass = myclass; + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (Class_Timer < diff) + { + switch (myClass) + { + case CLASS_WARRIOR: + DoCast(m_creature->getVictim(), SPELL_MORTAL_STRIKE); + Class_Timer = 6000; + break; + case CLASS_PALADIN: + DoCast(m_creature->getVictim(), SPELL_HAMMER_OF_JUSTICE); + Class_Timer = 6000; + break; + case CLASS_HUNTER: + DoCast(m_creature->getVictim(), SPELL_FREEZING_TRAP); + Class_Timer = 20000; + break; + case CLASS_ROGUE: + DoCast(m_creature->getVictim(), SPELL_HEMORRHAGE); + Class_Timer = 10000; + break; + case CLASS_PRIEST: + DoCast(m_creature->getVictim(), SPELL_MIND_FLAY); + Class_Timer = 5000; + break; + case CLASS_SHAMAN: + DoCast(m_creature->getVictim(), SPELL_FROSTSHOCK); + Class_Timer = 8000; + break; + case CLASS_MAGE: + DoCast(m_creature->getVictim(), SPELL_FIREBALL); + Class_Timer = 5000; + break; + case CLASS_WARLOCK: + DoCast(m_creature->getVictim(), SPELL_CURSE_OF_AGONY); + Class_Timer = 20000; + break; + case CLASS_DRUID: + DoCast(m_creature->getVictim(), SPELL_MOONFIRE); + Class_Timer = 10000; + break; + } + } else Class_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_stolen_soul(Creature* pCreature) +{ + return new mob_stolen_soulAI(pCreature); +} + +#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 + +struct MANGOS_DLL_DECL boss_exarch_maladaarAI : public ScriptedAI +{ + boss_exarch_maladaarAI(Creature* pCreature) : ScriptedAI(pCreature) + { + HasTaunted = false; + Reset(); + } + + uint32 soulmodel; + uint64 soulholder; + uint8 soulclass; + + uint32 Fear_timer; + uint32 Ribbon_of_Souls_timer; + uint32 StolenSoul_Timer; + + bool HasTaunted; + bool Avatar_summoned; + + void Reset() + { + soulmodel = 0; + soulholder = 0; + soulclass = 0; + + Fear_timer = urand(15000, 20000); + Ribbon_of_Souls_timer = 5000; + StolenSoul_Timer = urand(25000, 35000); + + Avatar_summoned = false; + } + + void MoveInLineOfSight(Unit *who) + { + if (!HasTaunted && m_creature->IsWithinDistInMap(who, 150.0)) + { + DoScriptText(SAY_INTRO, m_creature); + HasTaunted = true; + } + + ScriptedAI::MoveInLineOfSight(who); + } + + void Aggro(Unit *who) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_AGGRO_1, m_creature); break; + case 1: DoScriptText(SAY_AGGRO_2, m_creature); break; + case 2: DoScriptText(SAY_AGGRO_3, m_creature); break; + } + } + + void JustSummoned(Creature *summoned) + { + if (summoned->GetEntry() == ENTRY_STOLEN_SOUL) + { + //SPELL_STOLEN_SOUL_VISUAL has shapeshift effect, but not implemented feature in mangos for this spell. + summoned->CastSpell(summoned,SPELL_STOLEN_SOUL_VISUAL,false); + summoned->SetDisplayId(soulmodel); + summoned->setFaction(m_creature->getFaction()); + + if (Unit *target = Unit::GetUnit(*m_creature,soulholder)) + { + ((mob_stolen_soulAI*)summoned->AI())->SetMyClass(soulclass); + summoned->AI()->AttackStart(target); + } + } + } + + void KilledUnit(Unit* victim) + { + if (urand(0, 1)) + return; + + DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); + } + + void JustDied(Unit* Killer) + { + DoScriptText(SAY_DEATH, m_creature); + + //When Exarch Maladar is defeated D'ore appear. + m_creature->SummonCreature(19412, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 600000); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (!Avatar_summoned && ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() < 25)) + { + if (m_creature->IsNonMeleeSpellCasted(false)) + m_creature->InterruptNonMeleeSpells(true); + + DoScriptText(SAY_SUMMON, m_creature); + + DoCast(m_creature, SPELL_SUMMON_AVATAR); + Avatar_summoned = true; + StolenSoul_Timer = urand(15000, 30000); + } + + if (StolenSoul_Timer < diff) + { + if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) + { + if (target->GetTypeId() == TYPEID_PLAYER) + { + if (m_creature->IsNonMeleeSpellCasted(false)) + m_creature->InterruptNonMeleeSpells(true); + + uint32 i = urand(1,2); + if (i == 1) + DoScriptText(SAY_ROAR, m_creature); + else + DoScriptText(SAY_SOUL_CLEAVE, m_creature); + + soulmodel = target->GetDisplayId(); + soulholder = target->GetGUID(); + soulclass = target->getClass(); + + DoCast(target,SPELL_STOLEN_SOUL); + m_creature->SummonCreature(ENTRY_STOLEN_SOUL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); + + StolenSoul_Timer = urand(20000, 30000); + } else StolenSoul_Timer = 1000; + } + }else StolenSoul_Timer -= diff; + + if (Ribbon_of_Souls_timer < diff) + { + if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_RIBBON_OF_SOULS); + + Ribbon_of_Souls_timer = urand(5000, 25000); + }else Ribbon_of_Souls_timer -= diff; + + if (Fear_timer < diff) + { + DoCast(m_creature,SPELL_SOUL_SCREAM); + Fear_timer = urand(15000, 30000); + }else Fear_timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_exarch_maladaar(Creature* pCreature) +{ + return new boss_exarch_maladaarAI(pCreature); +} + +#define SPELL_AV_MORTAL_STRIKE 16856 +#define SPELL_AV_SUNDER_ARMOR 16145 + +struct MANGOS_DLL_DECL mob_avatar_of_martyredAI : public ScriptedAI +{ + mob_avatar_of_martyredAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 Mortal_Strike_timer; + + void Reset() + { + Mortal_Strike_timer = 10000; + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (Mortal_Strike_timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_AV_MORTAL_STRIKE); + Mortal_Strike_timer = urand(10000, 30000); + } else Mortal_Strike_timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_avatar_of_martyred(Creature* pCreature) +{ + return new mob_avatar_of_martyredAI(pCreature); +} + +void AddSC_boss_exarch_maladaar() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_exarch_maladaar"; + newscript->GetAI = &GetAI_boss_exarch_maladaar; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_avatar_of_martyred"; + newscript->GetAI = &GetAI_mob_avatar_of_martyred; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_stolen_soul"; + newscript->GetAI = &GetAI_mob_stolen_soul; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp b/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp new file mode 100644 index 000000000..9770eee42 --- /dev/null +++ b/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp @@ -0,0 +1,265 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_NexusPrince_Shaffar +SD%Complete: 80 +SDComment: Need more tuning of spell timers, it should not be as linear fight as current. Also should possibly find a better way to deal with his three initial beacons to make sure all aggro. +SDCategory: Auchindoun, Mana Tombs +EndScriptData */ + +/* ContentData +boss_nexusprince_shaffar +mob_ethereal_beacon +EndContentData */ + +#include "precompiled.h" + +enum +{ + 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, + + SPELL_BLINK = 34605, + SPELL_FROSTBOLT = 32364, + SPELL_FIREBALL = 32363, + SPELL_FROSTNOVA = 32365, + + SPELL_ETHEREAL_BEACON = 32371, // Summons NPC_BEACON + SPELL_ETHEREAL_BEACON_VISUAL = 32368, + + NPC_BEACON = 18431 +}; + +struct MANGOS_DLL_DECL boss_nexusprince_shaffarAI : public ScriptedAI +{ + boss_nexusprince_shaffarAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_bHasTaunted = false; + Reset(); + } + + uint32 m_uiBlink_Timer; + uint32 m_uiBeacon_Timer; + uint32 m_uiFireBall_Timer; + uint32 m_uiFrostbolt_Timer; + uint32 m_uiFrostNova_Timer; + + bool m_bHasTaunted; + bool m_bCanBlink; + + void Reset() + { + m_uiBlink_Timer = 1500; + m_uiBeacon_Timer = 10000; + m_uiFireBall_Timer = 8000; + m_uiFrostbolt_Timer = 4000; + m_uiFrostNova_Timer = 15000; + + m_bCanBlink = false; + } + + void MoveInLineOfSight(Unit* pWho) + { + if (!m_bHasTaunted && pWho->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(pWho, 100.0f)) + { + DoScriptText(SAY_INTRO, m_creature); + m_bHasTaunted = true; + } + + ScriptedAI::MoveInLineOfSight(pWho); + } + + void Aggro(Unit* pWho) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_AGGRO_1, m_creature); break; + case 1: DoScriptText(SAY_AGGRO_2, m_creature); break; + case 2: DoScriptText(SAY_AGGRO_3, m_creature); break; + } + } + + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_BEACON) + { + pSummoned->CastSpell(pSummoned,SPELL_ETHEREAL_BEACON_VISUAL,false); + + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + pSummoned->AI()->AttackStart(pTarget); + } + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEAD, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiFrostNova_Timer < uiDiff) + { + if (m_creature->IsNonMeleeSpellCasted(false)) + m_creature->InterruptNonMeleeSpells(true); + + DoCast(m_creature,SPELL_FROSTNOVA); + m_uiFrostNova_Timer = urand(17500, 25000); + m_bCanBlink = true; + }else m_uiFrostNova_Timer -= uiDiff; + + if (m_uiFrostbolt_Timer < uiDiff) + { + DoCast(m_creature->getVictim(),SPELL_FROSTBOLT); + m_uiFrostbolt_Timer = urand(4500, 6000); + }else m_uiFrostbolt_Timer -= uiDiff; + + if (m_uiFireBall_Timer < uiDiff) + { + DoCast(m_creature->getVictim(),SPELL_FIREBALL); + m_uiFireBall_Timer = urand(4500, 6000); + }else m_uiFireBall_Timer -= uiDiff; + + if (m_bCanBlink) + { + if (m_uiBlink_Timer < uiDiff) + { + if (m_creature->IsNonMeleeSpellCasted(false)) + m_creature->InterruptNonMeleeSpells(true); + + //expire movement, will prevent from running right back to victim after cast + //(but should MoveChase be used again at a certain time or should he not move?) + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE) + m_creature->GetMotionMaster()->MovementExpired(); + + DoCast(m_creature,SPELL_BLINK); + + m_uiBlink_Timer = urand(1000, 2500); + m_bCanBlink = false; + }else m_uiBlink_Timer -= uiDiff; + } + + if (m_uiBeacon_Timer < uiDiff) + { + if (!urand(0,3)) + DoScriptText(SAY_SUMMON, m_creature); + + DoCast(m_creature,SPELL_ETHEREAL_BEACON,true); + + m_uiBeacon_Timer = 10000; + }else m_uiBeacon_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_nexusprince_shaffar(Creature* pCreature) +{ + return new boss_nexusprince_shaffarAI(pCreature); +} + +enum +{ + SPELL_ARCANE_BOLT = 15254, + SPELL_ETHEREAL_APPRENTICE = 32372 // Summon 18430 +}; + +struct MANGOS_DLL_DECL mob_ethereal_beaconAI : public ScriptedAI +{ + mob_ethereal_beaconAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + bool m_bIsHeroicMode; + + uint32 m_uiApprentice_Timer; + uint32 m_uiArcaneBolt_Timer; + + void Reset() + { + m_uiApprentice_Timer = m_bIsHeroicMode ? 10000 : 20000; + m_uiArcaneBolt_Timer = 1000; + } + + void JustSummoned(Creature* pSummoned) + { + if (m_creature->getVictim()) + pSummoned->AI()->AttackStart(m_creature->getVictim()); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiArcaneBolt_Timer < uiDiff) + { + DoCast(m_creature->getVictim(),SPELL_ARCANE_BOLT); + m_uiArcaneBolt_Timer = urand(2000, 4500); + }else m_uiArcaneBolt_Timer -= uiDiff; + + if (m_uiApprentice_Timer < uiDiff) + { + if (m_creature->IsNonMeleeSpellCasted(false)) + m_creature->InterruptNonMeleeSpells(true); + + m_creature->CastSpell(m_creature,SPELL_ETHEREAL_APPRENTICE,true); + + m_creature->ForcedDespawn(); + return; + + }else m_uiApprentice_Timer -= uiDiff; + + //should they do meele? + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_ethereal_beacon(Creature* pCreature) +{ + return new mob_ethereal_beaconAI(pCreature); +} + +void AddSC_boss_nexusprince_shaffar() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_nexusprince_shaffar"; + newscript->GetAI = &GetAI_boss_nexusprince_shaffar; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_ethereal_beacon"; + newscript->GetAI = &GetAI_mob_ethereal_beacon; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp b/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp new file mode 100644 index 000000000..fd13a668c --- /dev/null +++ b/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp @@ -0,0 +1,134 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Pandemonius +SD%Complete: 75 +SDComment: Not known how void blast is done (amount of rapid cast seems to be related to players in party). All mobs remaining in surrounding area should aggro when engaged. +SDCategory: Auchindoun, Mana Tombs +EndScriptData */ + +#include "precompiled.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 + +#define SPELL_VOID_BLAST 32325 +#define H_SPELL_VOID_BLAST 38760 +#define SPELL_DARK_SHELL 32358 +#define H_SPELL_DARK_SHELL 38759 + +struct MANGOS_DLL_DECL boss_pandemoniusAI : public ScriptedAI +{ + boss_pandemoniusAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + bool m_bIsHeroicMode; + uint32 VoidBlast_Timer; + uint32 DarkShell_Timer; + uint32 VoidBlast_Counter; + + void Reset() + { + VoidBlast_Timer = urand(8000, 23000); + DarkShell_Timer = 20000; + VoidBlast_Counter = 0; + } + + void JustDied(Unit* Killer) + { + DoScriptText(SAY_DEATH, m_creature); + } + + void KilledUnit(Unit* victim) + { + DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); + } + + void Aggro(Unit *who) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_AGGRO_1, m_creature); break; + case 1: DoScriptText(SAY_AGGRO_2, m_creature); break; + case 2: DoScriptText(SAY_AGGRO_3, m_creature); break; + } + + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (VoidBlast_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0)) + { + DoCast(target, m_bIsHeroicMode ? H_SPELL_VOID_BLAST : SPELL_VOID_BLAST); + VoidBlast_Timer = 500; + ++VoidBlast_Counter; + } + + if (VoidBlast_Counter == 5) + { + VoidBlast_Timer = urand(15000, 25000); + VoidBlast_Counter = 0; + } + }else VoidBlast_Timer -= diff; + + if (!VoidBlast_Counter) + { + if (DarkShell_Timer < diff) + { + if (m_creature->IsNonMeleeSpellCasted(false)) + m_creature->InterruptNonMeleeSpells(true); + + DoScriptText(EMOTE_DARK_SHELL, m_creature); + + DoCast(m_creature, m_bIsHeroicMode ? H_SPELL_DARK_SHELL : SPELL_DARK_SHELL); + DarkShell_Timer = 20000; + }else DarkShell_Timer -= diff; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_pandemonius(Creature* pCreature) +{ + return new boss_pandemoniusAI(pCreature); +} + +void AddSC_boss_pandemonius() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_pandemonius"; + newscript->GetAI = &GetAI_boss_pandemonius; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp new file mode 100644 index 000000000..1f5a41d6c --- /dev/null +++ b/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp @@ -0,0 +1,404 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Darkweaver_Syth +SD%Complete: 85 +SDComment: Shock spells/times need more work. Heroic not implemented. +SDCategory: Auchindoun, Sethekk Halls +EndScriptData */ + +#include "precompiled.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 37865 +#define SPELL_FLAME_SHOCK 34354 +#define SPELL_SHADOW_SHOCK 30138 +#define SPELL_ARCANE_SHOCK 37132 + +#define SPELL_CHAIN_LIGHTNING 39945 + +#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 + +#define SPELL_FLAME_BUFFET 33526 +#define H_SPELL_FLAME_BUFFET 38141 +#define SPELL_ARCANE_BUFFET 33527 +#define H_SPELL_ARCANE_BUFFET 38138 +#define SPELL_FROST_BUFFET 33528 +#define H_SPELL_FROST_BUFFET 38142 +#define SPELL_SHADOW_BUFFET 33529 +#define H_SPELL_SHADOW_BUFFET 38143 + +struct MANGOS_DLL_DECL boss_darkweaver_sythAI : public ScriptedAI +{ + boss_darkweaver_sythAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 flameshock_timer; + uint32 arcaneshock_timer; + uint32 frostshock_timer; + uint32 shadowshock_timer; + uint32 chainlightning_timer; + + bool summon90; + bool summon50; + bool summon10; + + void Reset() + { + flameshock_timer = 2000; + arcaneshock_timer = 4000; + frostshock_timer = 6000; + shadowshock_timer = 8000; + chainlightning_timer = 15000; + + summon90 = false; + summon50 = false; + summon10 = false; + } + + void Aggro(Unit *who) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_AGGRO_1, m_creature); break; + case 1: DoScriptText(SAY_AGGRO_2, m_creature); break; + case 2: DoScriptText(SAY_AGGRO_3, m_creature); break; + } + } + + void JustDied(Unit* Killer) + { + DoScriptText(SAY_DEATH, m_creature); + } + + void KilledUnit(Unit* victim) + { + if (urand(0, 1)) + return; + + DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); + } + + void JustSummoned(Creature *summoned) + { + if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) + summoned->AI()->AttackStart(target); + } + + void SythSummoning() + { + DoScriptText(SAY_SUMMON, m_creature); + + if (m_creature->IsNonMeleeSpellCasted(false)) + m_creature->InterruptNonMeleeSpells(false); + + DoCast(m_creature,SPELL_SUMMON_SYTH_ARCANE,true); //front + DoCast(m_creature,SPELL_SUMMON_SYTH_FIRE,true); //back + DoCast(m_creature,SPELL_SUMMON_SYTH_FROST,true); //left + DoCast(m_creature,SPELL_SUMMON_SYTH_SHADOW,true); //right + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() < 90) && !summon90) + { + SythSummoning(); + summon90 = true; + } + + if (((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() < 50) && !summon50) + { + SythSummoning(); + summon50 = true; + } + + if (((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() < 10) && !summon10) + { + SythSummoning(); + summon10 = true; + } + + if (flameshock_timer < diff) + { + if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_FLAME_SHOCK); + + flameshock_timer = urand(10000, 15000); + } else flameshock_timer -= diff; + + if (arcaneshock_timer < diff) + { + if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_ARCANE_SHOCK); + + arcaneshock_timer = urand(10000, 15000); + } else arcaneshock_timer -= diff; + + if (frostshock_timer < diff) + { + if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_FROST_SHOCK); + + frostshock_timer = urand(10000, 15000); + } else frostshock_timer -= diff; + + if (shadowshock_timer < diff) + { + if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_SHADOW_SHOCK); + + shadowshock_timer = urand(10000, 15000); + } else shadowshock_timer -= diff; + + if (chainlightning_timer < diff) + { + if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_CHAIN_LIGHTNING); + + chainlightning_timer = 25000; + } else chainlightning_timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_darkweaver_syth(Creature* pCreature) +{ + return new boss_darkweaver_sythAI(pCreature); +} + +/* ELEMENTALS */ + +struct MANGOS_DLL_DECL mob_syth_fireAI : public ScriptedAI +{ + mob_syth_fireAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 flameshock_timer; + uint32 flamebuffet_timer; + + void Reset() + { + m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, true); + flameshock_timer = 2500; + flamebuffet_timer = 5000; + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (flameshock_timer < diff) + { + if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_FLAME_SHOCK); + + flameshock_timer = 5000; + }else flameshock_timer -= diff; + + if (flamebuffet_timer < diff) + { + if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_FLAME_BUFFET); + + flamebuffet_timer = 5000; + }else flamebuffet_timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_syth_fire(Creature* pCreature) +{ + return new mob_syth_fireAI(pCreature); +} + +struct MANGOS_DLL_DECL mob_syth_arcaneAI : public ScriptedAI +{ + mob_syth_arcaneAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 arcaneshock_timer; + uint32 arcanebuffet_timer; + + void Reset() + { + m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_ARCANE, true); + arcaneshock_timer = 2500; + arcanebuffet_timer = 5000; + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (arcaneshock_timer < diff) + { + if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_ARCANE_SHOCK); + + arcaneshock_timer = 5000; + }else arcaneshock_timer -= diff; + + if (arcanebuffet_timer < diff) + { + if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_ARCANE_BUFFET); + + arcanebuffet_timer = 5000; + }else arcanebuffet_timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_syth_arcane(Creature* pCreature) +{ + return new mob_syth_arcaneAI(pCreature); +} + +struct MANGOS_DLL_DECL mob_syth_frostAI : public ScriptedAI +{ + mob_syth_frostAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 frostshock_timer; + uint32 frostbuffet_timer; + + void Reset() + { + m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true); + frostshock_timer = 2500; + frostbuffet_timer = 5000; + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (frostshock_timer < diff) + { + if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_FROST_SHOCK); + + frostshock_timer = 5000; + }else frostshock_timer -= diff; + + if (frostbuffet_timer < diff) + { + if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_FROST_BUFFET); + + frostbuffet_timer = 5000; + }else frostbuffet_timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_syth_frost(Creature* pCreature) +{ + return new mob_syth_frostAI(pCreature); +} + +struct MANGOS_DLL_DECL mob_syth_shadowAI : public ScriptedAI +{ + mob_syth_shadowAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 shadowshock_timer; + uint32 shadowbuffet_timer; + + void Reset() + { + m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_SHADOW, true); + shadowshock_timer = 2500; + shadowbuffet_timer = 5000; + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (shadowshock_timer < diff) + { + if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_SHADOW_SHOCK); + + shadowshock_timer = 5000; + }else shadowshock_timer -= diff; + + if (shadowbuffet_timer < diff) + { + if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_SHADOW_BUFFET); + + shadowbuffet_timer = 5000; + }else shadowbuffet_timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_syth_shadow(Creature* pCreature) +{ + return new mob_syth_shadowAI(pCreature); +} + +void AddSC_boss_darkweaver_syth() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_darkweaver_syth"; + newscript->GetAI = &GetAI_boss_darkweaver_syth; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_syth_fire"; + newscript->GetAI = &GetAI_mob_syth_arcane; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_syth_arcane"; + newscript->GetAI = &GetAI_mob_syth_arcane; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_syth_frost"; + newscript->GetAI = &GetAI_mob_syth_frost; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_syth_shadow"; + newscript->GetAI = &GetAI_mob_syth_shadow; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_tailonking_ikiss.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_tailonking_ikiss.cpp new file mode 100644 index 000000000..30deecb41 --- /dev/null +++ b/scripts/outland/auchindoun/sethekk_halls/boss_tailonking_ikiss.cpp @@ -0,0 +1,213 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Talon_King_Ikiss +SD%Complete: 80 +SDComment: Heroic supported. Some details missing, but most are spell related. +SDCategory: Auchindoun, Sethekk Halls +EndScriptData */ + +#include "precompiled.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 + +struct MANGOS_DLL_DECL boss_talon_king_ikissAI : public ScriptedAI +{ + boss_talon_king_ikissAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + uint32 ArcaneVolley_Timer; + uint32 Sheep_Timer; + uint32 Blink_Timer; + uint32 Slow_Timer; + + bool ManaShield; + bool Blink; + bool Intro; + + void Reset() + { + ArcaneVolley_Timer = 5000; + Sheep_Timer = 8000; + Blink_Timer = 35000; + Slow_Timer = urand(15000, 30000); + Blink = false; + Intro = false; + ManaShield = false; + } + + void MoveInLineOfSight(Unit *who) + { + if (!m_creature->getVictim() && who->isTargetableForAttack() && (m_creature->IsHostileTo(who)) && who->isInAccessablePlaceFor(m_creature)) + { + if (!Intro && m_creature->IsWithinDistInMap(who, 100)) + { + Intro = true; + DoScriptText(SAY_INTRO, m_creature); + } + + if (!m_creature->canFly() && m_creature->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE) + return; + + float attackRadius = m_creature->GetAttackDistance(who); + if (m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->IsWithinLOSInMap(who)) + { + who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); + AttackStart(who); + } + } + } + + void Aggro(Unit *who) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_AGGRO_1, m_creature); break; + case 1: DoScriptText(SAY_AGGRO_2, m_creature); break; + case 2: DoScriptText(SAY_AGGRO_3, m_creature); break; + } + } + + void JustDied(Unit* Killer) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(DATA_IKISSDOOREVENT, DONE); + } + + void KilledUnit(Unit* victim) + { + DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (Blink) + { + DoCast(m_creature, m_bIsHeroicMode ? H_SPELL_ARCANE_EXPLOSION : SPELL_ARCANE_EXPLOSION); + m_creature->CastSpell(m_creature,SPELL_ARCANE_BUBBLE,true); + Blink = false; + } + + if (ArcaneVolley_Timer < diff) + { + DoCast(m_creature, m_bIsHeroicMode ? H_SPELL_ARCANE_VOLLEY : SPELL_ARCANE_VOLLEY); + ArcaneVolley_Timer = urand(7000, 12000); + }else ArcaneVolley_Timer -= diff; + + if (Sheep_Timer < diff) + { + //second top aggro target in normal, random target in heroic correct? + Unit *target = NULL; + if (m_bIsHeroicMode ? target = SelectUnit(SELECT_TARGET_RANDOM,0) : target = SelectUnit(SELECT_TARGET_TOPAGGRO,1)) + DoCast(target, m_bIsHeroicMode ? H_SPELL_POLYMORPH : SPELL_POLYMORPH); + Sheep_Timer = urand(15000, 17500); + }else Sheep_Timer -= diff; + + //may not be correct time to cast + if (!ManaShield && ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() < 20)) + { + DoCast(m_creature,SPELL_MANA_SHIELD); + ManaShield = true; + } + + if (m_bIsHeroicMode) + { + if (Slow_Timer < diff) + { + DoCast(m_creature,H_SPELL_SLOW); + Slow_Timer = urand(15000, 40000); + }else Slow_Timer -= diff; + } + + if (Blink_Timer < diff) + { + DoScriptText(EMOTE_ARCANE_EXP, m_creature); + + if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) + { + if (m_creature->IsNonMeleeSpellCasted(false)) + m_creature->InterruptNonMeleeSpells(false); + + //Spell doesn't work, but we use for visual effect at least + DoCast(target,SPELL_BLINK); + + float X = target->GetPositionX(); + float Y = target->GetPositionY(); + float Z = target->GetPositionZ(); + + m_creature->GetMap()->CreatureRelocation(m_creature,X,Y,Z,0.0f); + m_creature->SendMonsterMove(X, Y, Z, 0, MONSTER_MOVE_WALK, 1); + + DoCast(target,SPELL_BLINK_TELEPORT); + Blink = true; + } + Blink_Timer = urand(35000, 40000); + }else Blink_Timer -= diff; + + if (!Blink) + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_talon_king_ikiss(Creature* pCreature) +{ + return new boss_talon_king_ikissAI(pCreature); +} + +void AddSC_boss_talon_king_ikiss() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_talon_king_ikiss"; + newscript->GetAI = &GetAI_boss_talon_king_ikiss; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp b/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp new file mode 100644 index 000000000..1bc26ad25 --- /dev/null +++ b/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp @@ -0,0 +1,70 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance - Sethekk Halls +SD%Complete: 50 +SDComment: Instance Data for Sethekk Halls instance +SDCategory: Auchindoun, Sethekk Halls +EndScriptData */ + +#include "precompiled.h" +#include "sethekk_halls.h" + +#define IKISS_DOOR 177203 + +struct MANGOS_DLL_DECL instance_sethekk_halls : public ScriptedInstance +{ + instance_sethekk_halls(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + + uint64 m_uiIkissDoorGUID; + + void Initialize() + { + m_uiIkissDoorGUID = 0; + } + + void OnObjectCreate(GameObject* pGo) + { + if (pGo->GetEntry() == IKISS_DOOR) + m_uiIkissDoorGUID = pGo->GetGUID(); + } + + void SetData(uint32 uiType, uint32 uiData) + { + switch(uiType) + { + case DATA_IKISSDOOREVENT: + if (uiData == DONE) + DoUseDoorOrButton(m_uiIkissDoorGUID,DAY*IN_MILISECONDS); + break; + } + } +}; + +InstanceData* GetInstanceData_instance_sethekk_halls(Map* pMap) +{ + return new instance_sethekk_halls(pMap); +} + +void AddSC_instance_sethekk_halls() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "instance_sethekk_halls"; + newscript->GetInstanceData = &GetInstanceData_instance_sethekk_halls; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h b/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h new file mode 100644 index 000000000..8c4bc5725 --- /dev/null +++ b/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h @@ -0,0 +1,9 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_SETHEKK_HALLS_H +#define DEF_SETHEKK_HALLS_H + +#define DATA_IKISSDOOREVENT 1 +#endif diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp new file mode 100644 index 000000000..ad3a1512d --- /dev/null +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp @@ -0,0 +1,208 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Ambassador_Hellmaw +SD%Complete: 80 +SDComment: Enrage spell missing/not known +SDCategory: Auchindoun, Shadow Labyrinth +EndScriptData */ + +#include "precompiled.h" +#include "shadow_labyrinth.h" +#include "escort_ai.h" + +#define SAY_INTRO -1555000 + +#define SAY_AGGRO1 -1555001 +#define SAY_AGGRO2 -1555002 +#define SAY_AGGRO3 -1555003 + +#define SAY_HELP -1555004 + +#define SAY_SLAY1 -1555005 +#define SAY_SLAY2 -1555006 + +#define SAY_DEATH -1555007 + +#define SPELL_BANISH 30231 +#define SPELL_CORROSIVE_ACID 33551 +#define SPELL_FEAR 33547 +#define SPELL_ENRAGE 34970 + +struct MANGOS_DLL_DECL boss_ambassador_hellmawAI : public npc_escortAI +{ + boss_ambassador_hellmawAI(Creature* pCreature) : npc_escortAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + uint32 EventCheck_Timer; + uint32 CorrosiveAcid_Timer; + uint32 Fear_Timer; + uint32 Enrage_Timer; + bool Intro; + bool IsBanished; + bool Enraged; + + void Reset() + { + EventCheck_Timer = 5000; + CorrosiveAcid_Timer = urand(5000, 10000); + Fear_Timer = urand(25000, 30000); + Enrage_Timer = 180000; + Intro = false; + IsBanished = true; + Enraged = false; + + if (m_pInstance && m_creature->isAlive()) + { + if (m_pInstance->GetData(TYPE_OVERSEER) != DONE) + m_creature->CastSpell(m_creature, SPELL_BANISH, true); + } + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_HELLMAW, FAIL); + } + + void WaypointReached(uint32 i) + { + } + + void DoIntro() + { + if (m_creature->HasAura(SPELL_BANISH,0)) + m_creature->RemoveAurasDueToSpell(SPELL_BANISH); + + IsBanished = false; + Intro = true; + + if (m_pInstance) + { + if (m_pInstance->GetData(TYPE_HELLMAW) != FAIL) + { + DoScriptText(SAY_INTRO, m_creature); + Start(true, false, 0, NULL, false, true); + } + + m_pInstance->SetData(TYPE_HELLMAW, IN_PROGRESS); + } + } + + void MoveInLineOfSight(Unit *who) + { + if (m_creature->HasAura(SPELL_BANISH,0)) + return; + + npc_escortAI::MoveInLineOfSight(who); + } + + void Aggro(Unit *who) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_AGGRO1, m_creature); break; + case 1: DoScriptText(SAY_AGGRO2, m_creature); break; + case 2: DoScriptText(SAY_AGGRO3, m_creature); break; + } + } + + void KilledUnit(Unit *victim) + { + DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); + } + + void JustDied(Unit *victim) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_HELLMAW, DONE); + } + + void UpdateEscortAI(const uint32 diff) + { + if (!Intro && !HasEscortState(STATE_ESCORT_ESCORTING)) + { + if (EventCheck_Timer < diff) + { + if (m_pInstance) + { + if (m_pInstance->GetData(TYPE_OVERSEER) == DONE) + { + DoIntro(); + return; + } + } + EventCheck_Timer = 5000; + return; + } + else + { + EventCheck_Timer -= diff; + return; + } + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (CorrosiveAcid_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_CORROSIVE_ACID); + CorrosiveAcid_Timer = urand(15000, 25000); + }else CorrosiveAcid_Timer -= diff; + + if (Fear_Timer < diff) + { + DoCast(m_creature,SPELL_FEAR); + Fear_Timer = urand(20000, 35000); + }else Fear_Timer -= diff; + + if (m_bIsHeroicMode) + { + if (!Enraged && Enrage_Timer < diff) + { + DoCast(m_creature,SPELL_ENRAGE); + Enraged = true; + }else Enrage_Timer -= diff; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_ambassador_hellmaw(Creature* pCreature) +{ + return new boss_ambassador_hellmawAI(pCreature); +} + +void AddSC_boss_ambassador_hellmaw() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_ambassador_hellmaw"; + newscript->GetAI = &GetAI_boss_ambassador_hellmaw; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp new file mode 100644 index 000000000..c6aaf779e --- /dev/null +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp @@ -0,0 +1,173 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Blackheart_the_Inciter +SD%Complete: 75 +SDComment: Incite Chaos not functional since core lacks Mind Control support +SDCategory: Auchindoun, Shadow Labyrinth +EndScriptData */ + +#include "precompiled.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 +#define SAY_INTRO2 -1555009 +#define SAY_INTRO3 -1555010 +#define SAY_AGGRO1 -1555011 +#define SAY_AGGRO2 -1555012 +#define SAY_AGGRO3 -1555013 +#define SAY_SLAY1 -1555014 +#define SAY_SLAY2 -1555015 +#define SAY_HELP -1555016 +#define SAY_DEATH -1555017 + +#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 + +struct MANGOS_DLL_DECL boss_blackheart_the_inciterAI : public ScriptedAI +{ + boss_blackheart_the_inciterAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + bool InciteChaos; + uint32 InciteChaos_Timer; + uint32 InciteChaosWait_Timer; + uint32 Charge_Timer; + uint32 Knockback_Timer; + + void Reset() + { + InciteChaos = false; + InciteChaos_Timer = 20000; + InciteChaosWait_Timer = 15000; + Charge_Timer = 5000; + Knockback_Timer = 15000; + + if (m_pInstance) + m_pInstance->SetData(TYPE_INCITER, NOT_STARTED); + } + + void KilledUnit(Unit *victim) + { + DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); + } + + void JustDied(Unit *victim) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_INCITER, DONE); + } + + void Aggro(Unit *who) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_AGGRO1, m_creature); break; + case 1: DoScriptText(SAY_AGGRO2, m_creature); break; + case 2: DoScriptText(SAY_AGGRO3, m_creature); break; + } + + if (m_pInstance) + m_pInstance->SetData(TYPE_INCITER, IN_PROGRESS); + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (InciteChaos) + { + if (InciteChaosWait_Timer < diff) + { + InciteChaos = false; + InciteChaosWait_Timer = 15000; + }else InciteChaosWait_Timer -= diff; + + return; + } + + if (InciteChaos_Timer < diff) + { + DoCast(m_creature, SPELL_INCITE_CHAOS); + + std::list t_list = m_creature->getThreatManager().getThreatList(); + for(std::list::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) + { + Unit* target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()); + if (target && target->GetTypeId() == TYPEID_PLAYER) + target->CastSpell(target,SPELL_INCITE_CHAOS_B,true); + } + + DoResetThreat(); + InciteChaos = true; + InciteChaos_Timer = 40000; + return; + }else InciteChaos_Timer -= diff; + + //Charge_Timer + if (Charge_Timer < diff) + { + if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(target, SPELL_CHARGE); + Charge_Timer = urand(15000, 25000); + }else Charge_Timer -= diff; + + //Knockback_Timer + if (Knockback_Timer < diff) + { + DoCast(m_creature, SPELL_WAR_STOMP); + Knockback_Timer = urand(18000, 24000); + }else Knockback_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_blackheart_the_inciter(Creature* pCreature) +{ + return new boss_blackheart_the_inciterAI(pCreature); +} + +void AddSC_boss_blackheart_the_inciter() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_blackheart_the_inciter"; + newscript->GetAI = &GetAI_boss_blackheart_the_inciter; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp new file mode 100644 index 000000000..a5e80829c --- /dev/null +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp @@ -0,0 +1,236 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Grandmaster_Vorpil +SD%Complete: 75 +SDComment: Despawn all summoned on death not implemented. Void Traveler effects not implemented. +SDCategory: Auchindoun, Shadow Labyrinth +EndScriptData */ + +#include "precompiled.h" +#include "shadow_labyrinth.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_DRAW_SHADOWS 33563 +#define SPELL_VOID_PORTAL_A 33566 //spell only summon one unit, but we use it for the visual effect and summon the 4 other portals manual way(only one spell exist) +#define SPELL_VOID_PORTAL_VISUAL 33569 +#define SPELL_SHADOW_BOLT_VOLLEY 32963 +#define SPELL_SUMMON_VOIDWALKER_A 33582 +#define SPELL_SUMMON_VOIDWALKER_B 33583 +#define SPELL_SUMMON_VOIDWALKER_C 33584 +#define SPELL_SUMMON_VOIDWALKER_D 33585 +#define SPELL_SUMMON_VOIDWALKER_E 33586 +#define SPELL_RAIN_OF_FIRE 33617 +#define H_SPELL_RAIN_OF_FIRE 39363 +#define H_SPELL_BANISH 38791 + +#define ENTRY_VOID_PORTAL 19224 +#define ENTRY_VOID_TRAVELER 19226 + +#define LOCX -253.06f +#define LOCY -264.02f +#define LOCZ 17.08 + +struct MANGOS_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI +{ + boss_grandmaster_vorpilAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Intro = false; + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + uint32 ShadowBoltVolley_Timer; + uint32 DrawShadows_Timer; + uint32 Teleport_Timer; + uint32 VoidTraveler_Timer; + uint32 Banish_Timer; + bool Intro; + bool Teleport; + + void Reset() + { + ShadowBoltVolley_Timer = urand(7000, 14000); + DrawShadows_Timer = 40000; + Teleport_Timer = 1000; + VoidTraveler_Timer = 20000; + Banish_Timer = 25000; + Teleport = false; + + if (m_pInstance) + m_pInstance->SetData(TYPE_VORPIL, NOT_STARTED); + } + + void MoveInLineOfSight(Unit *who) + { + //not sure about right radius + if (!Intro && m_creature->IsWithinDistInMap(who, 50)) + { + DoScriptText(SAY_INTRO, m_creature); + Intro = true; + } + + ScriptedAI::MoveInLineOfSight(who); + } + + void Aggro(Unit *who) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_AGGRO1, m_creature); break; + case 1: DoScriptText(SAY_AGGRO2, m_creature); break; + case 2: DoScriptText(SAY_AGGRO3, m_creature); break; + } + + DoCast(m_creature, SPELL_VOID_PORTAL_A,true); + m_creature->SummonCreature(ENTRY_VOID_PORTAL,-262.40,-229.57,17.08,0,TEMPSUMMON_CORPSE_DESPAWN,0); + m_creature->SummonCreature(ENTRY_VOID_PORTAL,-260.35,-297.56,17.08,0,TEMPSUMMON_CORPSE_DESPAWN,0); + m_creature->SummonCreature(ENTRY_VOID_PORTAL,-292.05,-270.37,12.68,0,TEMPSUMMON_CORPSE_DESPAWN,0); + m_creature->SummonCreature(ENTRY_VOID_PORTAL,-301.64,-255.97,12.68,0,TEMPSUMMON_CORPSE_DESPAWN,0); + + if (m_pInstance) + m_pInstance->SetData(TYPE_VORPIL, IN_PROGRESS); + } + + void KilledUnit(Unit *victim) + { + DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); + } + + void JustSummoned(Creature *summoned) + { + if (summoned->GetEntry() == ENTRY_VOID_TRAVELER) + { + summoned->GetMotionMaster()->MoveChase(m_creature); + summoned->SetSpeed(MOVE_WALK,0.8,true); + } + + if (summoned->GetEntry() == ENTRY_VOID_PORTAL) + summoned->CastSpell(summoned,SPELL_VOID_PORTAL_VISUAL,true); + } + + void JustDied(Unit *victim) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_VORPIL, DONE); + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (Teleport) + { + if (Teleport_Timer <= diff) + { + m_creature->GetMap()->CreatureRelocation(m_creature, LOCX, LOCY, LOCZ, 0.0f); + m_creature->SendMonsterMove(LOCX, LOCY, LOCZ, 0, MONSTER_MOVE_WALK, 0); + + float ranX = LOCX; + float ranY = LOCY; + float ranZ = LOCZ; + + std::list t_list = m_creature->getThreatManager().getThreatList(); + for(std::list::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) + { + Unit* target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()); + if (target && target->GetTypeId() == TYPEID_PLAYER) + { + target->GetRandomPoint(LOCX,LOCY,LOCZ,3.0,ranX,ranY,ranZ); + DoTeleportPlayer(target,ranX,ranY,ranZ,m_creature->GetAngle(m_creature->GetPositionX(),m_creature->GetPositionY())); + } + } + Teleport = false; + + DoCast(m_creature->getVictim(), m_bIsHeroicMode ? H_SPELL_RAIN_OF_FIRE : SPELL_RAIN_OF_FIRE); + + Teleport_Timer = 1000; + }else Teleport_Timer -= diff; + } + + if (ShadowBoltVolley_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_SHADOW_BOLT_VOLLEY); + ShadowBoltVolley_Timer = urand(15000, 30000); + }else ShadowBoltVolley_Timer -= diff; + + if (DrawShadows_Timer < diff) + { + DoCast(m_creature,SPELL_DRAW_SHADOWS); + DrawShadows_Timer = 30000; + Teleport = true; + }else DrawShadows_Timer -= diff; + + if (VoidTraveler_Timer < diff) + { + DoScriptText(SAY_HELP, m_creature); + + switch(urand(0, 4)) + { + case 0: DoCast(m_creature,SPELL_SUMMON_VOIDWALKER_A,true); break; + case 1: DoCast(m_creature,SPELL_SUMMON_VOIDWALKER_B,true); break; + case 2: DoCast(m_creature,SPELL_SUMMON_VOIDWALKER_C,true); break; + case 3: DoCast(m_creature,SPELL_SUMMON_VOIDWALKER_D,true); break; + case 4: DoCast(m_creature,SPELL_SUMMON_VOIDWALKER_E,true); break; + } + //faster rate when below (X) health? + VoidTraveler_Timer = 35000; + }else VoidTraveler_Timer -= diff; + + if (m_bIsHeroicMode) + { + if (Banish_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 1)) + DoCast(target,H_SPELL_BANISH); + Banish_Timer = 35000; + }else Banish_Timer -= diff; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_grandmaster_vorpil(Creature* pCreature) +{ + return new boss_grandmaster_vorpilAI(pCreature); +} + +void AddSC_boss_grandmaster_vorpil() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_grandmaster_vorpil"; + newscript->GetAI = &GetAI_boss_grandmaster_vorpil; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp new file mode 100644 index 000000000..b76bc62db --- /dev/null +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp @@ -0,0 +1,205 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Murmur +SD%Complete: 75 +SDComment: Database should have `RegenHealth`=0 to prevent regen. Also, his shockwave triggered after magnetic pull may be incorrect. Murmur's Touch does not work properly. +SDCategory: Auchindoun, Shadow Labyrinth +EndScriptData */ + +#include "precompiled.h" +#include "shadow_labyrinth.h" + +#define EMOTE_SONIC_BOOM -1555036 + +#define SPELL_MAGNETIC_PULL 33689 +#define SPELL_SONIC_BOOM_PRE 33923 +#define SPELL_SONIC_BOOM_CAST 38795 +#define SPELL_MURMURS_TOUCH 33711 +#define SPELL_RESONANCE 33657 +#define SPELL_SHOCKWAVE 33686 + +#define SPELL_SONIC_SHOCK 38797 //Heroic Spell +#define SPELL_THUNDERING_STORM 39365 //Heroic Spell + +struct MANGOS_DLL_DECL boss_murmurAI : public ScriptedAI +{ + boss_murmurAI(Creature* pCreature) : ScriptedAI(pCreature) + { + SetCombatMovement(false); + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + uint32 SonicBoom_Timer; + uint32 MurmursTouch_Timer; + uint32 Resonance_Timer; + uint32 MagneticPull_Timer; + uint32 SonicShock_Timer; + uint32 ThunderingStorm_Timer; + bool CanSonicBoom; + bool CanShockWave; + uint64 pTarget; + + void Reset() + { + SonicBoom_Timer = 30000; + MurmursTouch_Timer = urand(8000, 20000); + Resonance_Timer = 5000; + MagneticPull_Timer = urand(15000, 30000); + SonicShock_Timer = urand(4000, 10000); + ThunderingStorm_Timer = 12000; //Casting directly after Sonic Boom. + CanSonicBoom = false; + CanShockWave = false; + pTarget = 0; + + //database should have `RegenHealth`=0 to prevent regen + uint32 hp = (m_creature->GetMaxHealth()*40)/100; + if (hp) + m_creature->SetHealth(hp); + } + + void SonicBoomEffect() + { + std::list t_list = m_creature->getThreatManager().getThreatList(); + for(std::list::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) + { + Unit* target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()); + if (target && target->GetTypeId() == TYPEID_PLAYER) + { + //Not do anything without aura, spell can be resisted! + if (target->HasAura(SPELL_SONIC_BOOM_CAST,1) && m_creature->IsWithinDistInMap(target, 34.0f)) + { + //This will be wrong calculation. Also, comments suggest it must deal damage + target->SetHealth(uint32(target->GetMaxHealth() - target->GetMaxHealth() * 0.8)); + } + } + } + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //SonicBoom_Timer + if (SonicBoom_Timer < diff) + { + if (CanSonicBoom) + { + DoCast(m_creature, SPELL_SONIC_BOOM_CAST,true); + SonicBoomEffect(); + + CanSonicBoom = false; + SonicBoom_Timer = 30000; + } + else + { + DoScriptText(EMOTE_SONIC_BOOM, m_creature); + DoCast(m_creature,SPELL_SONIC_BOOM_PRE); + CanSonicBoom = true; + SonicBoom_Timer = 5000; + } + }else SonicBoom_Timer -= diff; + + //MurmursTouch_Timer + if (MurmursTouch_Timer < diff) + { + /*Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM,0); + if (target) + DoCast(target, SPELL_MURMURS_TOUCH);*/ + DoCast(m_creature, SPELL_MURMURS_TOUCH); + MurmursTouch_Timer = urand(25000, 35000); + }else MurmursTouch_Timer -= diff; + + //Resonance_Timer + if (!CanSonicBoom && !m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE)) + { + if (Resonance_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_RESONANCE); + Resonance_Timer = m_bIsHeroicMode ? 3000 : 5000; + }else Resonance_Timer -= diff; + } + + if (m_bIsHeroicMode) + { + if (SonicShock_Timer < diff) + { + if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(target, SPELL_SONIC_SHOCK); + SonicShock_Timer = urand(8000, 12000); + }else SonicShock_Timer -= diff; + + if (ThunderingStorm_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_THUNDERING_STORM); + ThunderingStorm_Timer = 12000; + }else ThunderingStorm_Timer -= diff; + } + + //MagneticPull_Timer + if (MagneticPull_Timer < diff) + { + if (!CanShockWave) + { + if (Unit* temp = SelectUnit(SELECT_TARGET_RANDOM,0)) + { + if (temp->GetTypeId() == TYPEID_PLAYER) + { + DoCast(temp, SPELL_MAGNETIC_PULL); + pTarget = temp->GetGUID(); + CanShockWave = true; + } + MagneticPull_Timer = 2500; + } + } + else + { + if (Unit* target = Unit::GetUnit(*m_creature,pTarget)) + target->CastSpell(target,SPELL_SHOCKWAVE,true); + + MagneticPull_Timer = urand(15000, 30000); + CanShockWave = false; + pTarget = 0; + } + }else MagneticPull_Timer -= diff; + + //no meele if preparing for sonic boom + if (!CanSonicBoom) + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_murmur(Creature* pCreature) +{ + return new boss_murmurAI(pCreature); +} + +void AddSC_boss_murmur() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_murmur"; + newscript->GetAI = &GetAI_boss_murmur; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp b/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp new file mode 100644 index 000000000..ec3aabb1e --- /dev/null +++ b/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp @@ -0,0 +1,213 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance_Shadow_Labyrinth +SD%Complete: 85 +SDComment: Some cleanup left along with save +SDCategory: Auchindoun, Shadow Labyrinth +EndScriptData */ + +#include "precompiled.h" +#include "shadow_labyrinth.h" + +/* Shadow Labyrinth encounters: +1 - Ambassador Hellmaw event +2 - Blackheart the Inciter event +3 - Grandmaster Vorpil event +4 - Murmur event +*/ + +struct MANGOS_DLL_DECL instance_shadow_labyrinth : public ScriptedInstance +{ + instance_shadow_labyrinth(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string strInstData; + + uint64 m_uiRefectoryDoorGUID; + uint64 m_uiScreamingHallDoorGUID; + + uint64 m_uiGrandmasterVorpil; + uint32 m_uiFelOverseerCount; + + void Initialize() + { + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + + m_uiRefectoryDoorGUID = 0; + m_uiScreamingHallDoorGUID = 0; + + m_uiGrandmasterVorpil = 0; + m_uiFelOverseerCount = 0; + } + + bool IsEncounterInProgress() const + { + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + if (m_auiEncounter[i] == IN_PROGRESS) return true; + + return false; + } + + void OnObjectCreate(GameObject* pGo) + { + switch(pGo->GetEntry()) + { + case GO_REFECTORY_DOOR: + m_uiRefectoryDoorGUID = pGo->GetGUID(); + if (m_auiEncounter[2] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_SCREAMING_HALL_DOOR: + m_uiScreamingHallDoorGUID = pGo->GetGUID(); + if (m_auiEncounter[3] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + } + } + + void OnCreatureCreate(Creature* pCreature) + { + switch(pCreature->GetEntry()) + { + case 18732: + m_uiGrandmasterVorpil = pCreature->GetGUID(); + break; + case 18796: + if (pCreature->isAlive()) + { + ++m_uiFelOverseerCount; + debug_log("SD2: Shadow Labyrinth: counting %u Fel Overseers.", m_uiFelOverseerCount); + } + break; + } + } + + void SetData(uint32 uiType, uint32 uiData) + { + switch(uiType) + { + case TYPE_HELLMAW: + m_auiEncounter[0] = uiData; + break; + + case TYPE_OVERSEER: + if (uiData != DONE) + { + error_log("SD2: Shadow Labyrinth: TYPE_OVERSEER did not expect other data than DONE"); + return; + } + if (m_uiFelOverseerCount) + { + --m_uiFelOverseerCount; + + if (m_uiFelOverseerCount) + debug_log("SD2: Shadow Labyrinth: %u Fel Overseers left to kill.", m_uiFelOverseerCount); + else + { + m_auiEncounter[1] = DONE; + debug_log("SD2: Shadow Labyrinth: TYPE_OVERSEER == DONE"); + } + } + break; + + case TYPE_INCITER: + if (uiData == DONE) + DoUseDoorOrButton(m_uiRefectoryDoorGUID); + m_auiEncounter[2] = uiData; + break; + + case TYPE_VORPIL: + if (uiData == DONE) + DoUseDoorOrButton(m_uiScreamingHallDoorGUID); + m_auiEncounter[3] = uiData; + break; + + case TYPE_MURMUR: + m_auiEncounter[4] = uiData; + break; + } + + if (uiData == DONE) + { + if (uiType == TYPE_OVERSEER && m_uiFelOverseerCount != 0) + return; + + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " + << m_auiEncounter[2] << " " << m_auiEncounter[3] << " " << m_auiEncounter[4]; + + strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } + } + + uint32 GetData(uint32 uiType) + { + switch(uiType) + { + case TYPE_HELLMAW: + return m_auiEncounter[0]; + case TYPE_OVERSEER: + return m_auiEncounter[1]; + } + return false; + } + + const char* Save() + { + return strInstData.c_str(); + } + + void Load(const char* in) + { + if (!in) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(in); + + std::istringstream loadStream(in); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] >> m_auiEncounter[4]; + + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; + + OUT_LOAD_INST_DATA_COMPLETE; + } +}; + +InstanceData* GetInstanceData_instance_shadow_labyrinth(Map* pMap) +{ + return new instance_shadow_labyrinth(pMap); +} + +void AddSC_instance_shadow_labyrinth() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "instance_shadow_labyrinth"; + newscript->GetInstanceData = &GetInstanceData_instance_shadow_labyrinth; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h b/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h new file mode 100644 index 000000000..f37d99a91 --- /dev/null +++ b/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h @@ -0,0 +1,22 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_SHADOW_LABYRINTH_H +#define DEF_SHADOW_LABYRINTH_H + +enum +{ + MAX_ENCOUNTER = 5, + + TYPE_HELLMAW = 1, + TYPE_OVERSEER = 2, + TYPE_INCITER = 3, + TYPE_VORPIL = 4, + TYPE_MURMUR = 5, + + GO_REFECTORY_DOOR = 183296, //door opened when blackheart the inciter dies + GO_SCREAMING_HALL_DOOR = 183295 //door opened when grandmaster vorpil dies +}; + +#endif diff --git a/scripts/outland/black_temple/black_temple.cpp b/scripts/outland/black_temple/black_temple.cpp new file mode 100644 index 000000000..209d9bcc8 --- /dev/null +++ b/scripts/outland/black_temple/black_temple.cpp @@ -0,0 +1,68 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Black_Temple +SD%Complete: 95 +SDComment: Spirit of Olum: Player Teleporter to Seer Kanai Teleport after defeating Naj'entus and Supremus. TODO: Find proper gossip. +SDCategory: Black Temple +EndScriptData */ + +/* ContentData +npc_spirit_of_olum +EndContentData */ + +#include "precompiled.h" +#include "black_temple.h" + +/*### +# npc_spirit_of_olum +####*/ + +#define SPELL_TELEPORT 41566 // s41566 - Teleport to Ashtongue NPC's +#define GOSSIP_OLUM1 "Teleport me to the other Ashtongue Deathsworn" + +bool GossipHello_npc_spirit_of_olum(Player* pPlayer, Creature* pCreature) +{ + ScriptedInstance* pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + + if (pInstance && (pInstance->GetData(TYPE_SUPREMUS) >= DONE) && (pInstance->GetData(TYPE_NAJENTUS) >= DONE)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_OLUM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_spirit_of_olum(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) + pPlayer->CLOSE_GOSSIP_MENU(); + + pPlayer->InterruptNonMeleeSpells(false); + pPlayer->CastSpell(pPlayer, SPELL_TELEPORT, false); + return true; +} + +void AddSC_black_temple() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_spirit_of_olum"; + newscript->pGossipHello = &GossipHello_npc_spirit_of_olum; + newscript->pGossipSelect = &GossipSelect_npc_spirit_of_olum; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/black_temple/black_temple.h b/scripts/outland/black_temple/black_temple.h new file mode 100644 index 000000000..5838f7188 --- /dev/null +++ b/scripts/outland/black_temple/black_temple.h @@ -0,0 +1,45 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_BLACK_TEMPLE_H +#define DEF_BLACK_TEMPLE_H + +enum +{ + MAX_ENCOUNTER = 9, + + TYPE_NAJENTUS = 1, + TYPE_SUPREMUS = 2, + TYPE_SHADE = 3, + TYPE_GOREFIEND = 4, + TYPE_BLOODBOIL = 5, + TYPE_RELIQUIARY = 6, + TYPE_SHAHRAZ = 7, + TYPE_COUNCIL = 8, + TYPE_ILLIDAN = 9, + + DATA_HIGHWARLORDNAJENTUS = 10, + DATA_SUPREMUS = 11, + DATA_SHADEOFAKAMA = 12, + DATA_AKAMA_SHADE = 13, + DATA_ILLIDARICOUNCIL = 14, + DATA_BLOOD_ELF_COUNCIL_VOICE = 15, + DATA_LADYMALANDE = 16, + DATA_HIGHNETHERMANCERZEREVOR = 17, + DATA_GATHIOSTHESHATTERER = 18, + DATA_VERASDARKSHADOW = 19, + DATA_AKAMA = 20, + DATA_ILLIDANSTORMRAGE = 21, + + DATA_GAMEOBJECT_NAJENTUS_GATE = 22, + DATA_GAMEOBJECT_SUPREMUS_DOORS = 23, + DATA_GO_PRE_SHAHRAZ_DOOR = 24, + DATA_GO_POST_SHAHRAZ_DOOR = 25, + DATA_GO_COUNCIL_DOOR = 26, + DATA_GAMEOBJECT_ILLIDAN_GATE = 27, + DATA_GAMEOBJECT_ILLIDAN_DOOR_R = 28, + DATA_GAMEOBJECT_ILLIDAN_DOOR_L = 29 +}; + +#endif diff --git a/scripts/outland/black_temple/boss_bloodboil.cpp b/scripts/outland/black_temple/boss_bloodboil.cpp new file mode 100644 index 000000000..69795701b --- /dev/null +++ b/scripts/outland/black_temple/boss_bloodboil.cpp @@ -0,0 +1,340 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Bloodboil +SD%Complete: 80 +SDComment: Bloodboil not working correctly, missing enrage +SDCategory: Black Temple +EndScriptData */ + +#include "precompiled.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 + +struct MANGOS_DLL_DECL boss_gurtogg_bloodboilAI : public ScriptedAI +{ + boss_gurtogg_bloodboilAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint64 TargetGUID; + + float TargetThreat; + + uint32 BloodboilTimer; + uint32 BloodboilCount; + uint32 AcidGeyserTimer; + uint32 AcidicWoundTimer; + uint32 ArcingSmashTimer; + uint32 EnrageTimer; + uint32 FelAcidTimer; + uint32 EjectTimer; + uint32 BewilderingStrikeTimer; + uint32 PhaseChangeTimer; + + bool Phase1; + + void Reset() + { + TargetGUID = 0; + + TargetThreat = 0; + + BloodboilTimer = 10000; + BloodboilCount = 0; + AcidGeyserTimer = 1000; + AcidicWoundTimer = 6000; + ArcingSmashTimer = 19000; + EnrageTimer = 600000; + FelAcidTimer = 25000; + EjectTimer = 10000; + BewilderingStrikeTimer = 15000; + PhaseChangeTimer = 60000; + + Phase1 = true; + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_BLOODBOIL, NOT_STARTED); + } + + void Aggro(Unit *who) + { + m_creature->SetInCombatWithZone(); + + DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_BLOODBOIL, IN_PROGRESS); + } + + void KilledUnit(Unit *victim) + { + DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); + } + + void JustDied(Unit *victim) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_BLOODBOIL, DONE); + + DoScriptText(SAY_DEATH, m_creature); + } + + // 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. + void CastBloodboil() + { + // Get the Threat List + std::list m_threatlist = m_creature->getThreatManager().getThreatList(); + + // He doesn't have anyone in his threatlist, useless to continue + if (!m_threatlist.size()) + return; + + std::list targets; + std::list::iterator itr = m_threatlist.begin(); + + //store the threat list in a different container + for(; itr!= m_threatlist.end(); ++itr) + { + Unit *target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()); + //only on alive players + if (target && target->isAlive() && target->GetTypeId() == TYPEID_PLAYER) + targets.push_back(target); + } + + //Sort the list of players + targets.sort(ObjectDistanceOrderReversed(m_creature)); + //Resize so we only get top 5 + targets.resize(5); + + //Aura each player in the targets list with Bloodboil. Aura code copied+pasted from Aura command in Level3.cpp + /*SpellEntry const *spellInfo = GetSpellStore()->LookupEntry(SPELL_BLOODBOIL); + if (spellInfo) + { + for(std::list::iterator itr = targets.begin(); itr != targets.end(); ++itr) + { + Unit* target = *itr; + if (!target) return; + for(uint32 i = 0;i<3; ++i) + { + uint8 eff = spellInfo->Effect[i]; + if (eff>=TOTAL_SPELL_EFFECTS) + continue; + + Aura *Aur = new Aura(spellInfo, i, NULL, target); + target->AddAura(Aur); + } + } + }*/ + } + + void RevertThreatOnTarget(uint64 guid) + { + Unit* pUnit = NULL; + pUnit = Unit::GetUnit((*m_creature), guid); + + if (pUnit) + { + if (m_creature->getThreatManager().getThreat(pUnit)) + m_creature->getThreatManager().modifyThreatPercent(pUnit, -100); + + if (TargetThreat) + m_creature->AddThreat(pUnit, TargetThreat); + } + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (ArcingSmashTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_ARCING_SMASH); + ArcingSmashTimer = 10000; + }else ArcingSmashTimer -= diff; + + if (FelAcidTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_FEL_ACID); + FelAcidTimer = 25000; + }else FelAcidTimer -= diff; + + if (!m_creature->HasAura(SPELL_BERSERK, 0)) + { + if (EnrageTimer < diff) + { + DoCast(m_creature, SPELL_BERSERK); + DoScriptText(urand(0, 1) ? SAY_ENRAGE1 : SAY_ENRAGE2, m_creature); + }else EnrageTimer -= diff; + } + + if (Phase1) + { + if (BewilderingStrikeTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_BEWILDERING_STRIKE); + float mt_threat = m_creature->getThreatManager().getThreat(m_creature->getVictim()); + + if (Unit* target = SelectUnit(SELECT_TARGET_TOPAGGRO, 1)) + m_creature->AddThreat(target, mt_threat); + + BewilderingStrikeTimer = 20000; + }else BewilderingStrikeTimer -= diff; + + if (EjectTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_EJECT1); + m_creature->getThreatManager().modifyThreatPercent(m_creature->getVictim(), -40); + EjectTimer = 15000; + }else EjectTimer -= diff; + + if (AcidicWoundTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_ACIDIC_WOUND); + AcidicWoundTimer = 10000; + }else AcidicWoundTimer -= diff; + + if (BloodboilTimer < diff) + { + if (BloodboilCount < 5) // Only cast it five times. + { + //CastBloodboil(); // Causes issues on windows, so is commented out. + DoCast(m_creature->getVictim(), SPELL_BLOODBOIL); + ++BloodboilCount; + BloodboilTimer = 10000*BloodboilCount; + } + }else BloodboilTimer -= diff; + } + + if (!Phase1) + { + if (AcidGeyserTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_ACID_GEYSER); + AcidGeyserTimer = 30000; + }else AcidGeyserTimer -= diff; + + if (EjectTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_EJECT2); + EjectTimer = 15000; + }else EjectTimer -= diff; + } + + if (PhaseChangeTimer < diff) + { + if (Phase1) + { + Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0); + if (target && target->isAlive()) + { + Phase1 = false; + + TargetThreat = m_creature->getThreatManager().getThreat(target); + TargetGUID = target->GetGUID(); + target->CastSpell(m_creature, SPELL_TAUNT_GURTOGG, true); + + if (m_creature->getThreatManager().getThreat(target)) + m_creature->getThreatManager().modifyThreatPercent(target, -100); + + m_creature->AddThreat(target, 50000000.0f); + + // If VMaps are disabled, this spell can call the whole instance + DoCast(m_creature, SPELL_INSIGNIFIGANCE, true); + DoCast(target, SPELL_FEL_RAGE_TARGET, true); + DoCast(target, SPELL_FEL_RAGE_2, true); + + /* These spells do not work, comment them out for now. + DoCast(target, SPELL_FEL_RAGE_2, true); + DoCast(target, SPELL_FEL_RAGE_3, true);*/ + + //Cast this without triggered so that it appears in combat logs and shows visual. + DoCast(m_creature, SPELL_FEL_RAGE_SELF); + + DoScriptText(urand(0, 1) ? SAY_SPECIAL1 : SAY_SPECIAL2, m_creature); + + AcidGeyserTimer = 1000; + PhaseChangeTimer = 30000; + } + }else // Encounter is a loop pretty much. Phase 1 -> Phase 2 -> Phase 1 -> Phase 2 till death or enrage + { + if (TargetGUID) + RevertThreatOnTarget(TargetGUID); + + TargetGUID = 0; + Phase1 = true; + BloodboilTimer = 10000; + BloodboilCount = 0; + AcidicWoundTimer += 2000; + ArcingSmashTimer += 2000; + FelAcidTimer += 2000; + EjectTimer += 2000; + PhaseChangeTimer = 60000; + } + }else PhaseChangeTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_gurtogg_bloodboil(Creature* pCreature) +{ + return new boss_gurtogg_bloodboilAI(pCreature); +} + +void AddSC_boss_gurtogg_bloodboil() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_gurtogg_bloodboil"; + newscript->GetAI = &GetAI_boss_gurtogg_bloodboil; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/black_temple/boss_illidan.cpp b/scripts/outland/black_temple/boss_illidan.cpp new file mode 100644 index 000000000..485d86b9b --- /dev/null +++ b/scripts/outland/black_temple/boss_illidan.cpp @@ -0,0 +1,2465 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Illidan_Stormrage +SD%Complete: 90 +SDComment: +SDCategory: Black Temple +EndScriptData */ + +#include "precompiled.h" +#include "black_temple.h" +#include "WorldPacket.h" + +/**** Creature Summon and Recognition IDs ****/ +enum CreatureEntry +{ + EMPTY = 0, + AKAMA = 22990, + ILLIDAN_STORMRAGE = 22917, + BLADE_OF_AZZINOTH = 22996, + FLAME_OF_AZZINOTH = 22997, + MAIEV_SHADOWSONG = 23197, + SHADOW_DEMON = 23375, + DEMON_FIRE = 23069, + FLAME_CRASH = 23336, + ILLIDAN_DOOR_TRIGGER = 23412, + SPIRIT_OF_OLUM = 23411, + SPIRIT_OF_UDALO = 23410, + ILLIDARI_ELITE = 23226, + PARASITIC_SHADOWFIEND = 23498, + CAGE_TRAP_TRIGGER = 23292, +}; + +/************* Quotes and Sounds ***********************/ +// Gossip for when a player clicks Akama +#define GOSSIP_ITEM "We are ready to face Illidan" + +#define SAY_CONVO_1 -1564097 +#define SAY_CONVO_2 -1564098 +#define SAY_CONVO_3 -1564099 +#define SAY_CONVO_4 -1564100 +#define SAY_CONVO_5 -1564101 +#define SAY_CONVO_6 -1564102 +#define SAY_CONVO_7 -1564103 +#define SAY_CONVO_8 -1564104 +#define SAY_CONVO_9 -1564105 +#define SAY_CONVO_10 -1564106 +#define SAY_CONVO_11 -1564107 +#define SAY_CONVO_12 -1564108 +#define SAY_CONVO_13 -1564109 +#define SAY_CONVO_14 -1564110 +#define SAY_CONVO_15 -1564111 + +#define SAY_TAUNT_1 -1564112 +#define SAY_TAUNT_2 -1564113 +#define SAY_TAUNT_3 -1564114 +#define SAY_TAUNT_4 -1564115 + +#define SAY_MAIEV_TAUNT_1 -1564116 +#define SAY_MAIEV_TAUNT_2 -1564117 +#define SAY_MAIEV_TAUNT_3 -1564118 +#define SAY_MAIEV_TAUNT_4 -1564119 + +//emote only defined if not related to textId (in database) +struct Yells +{ + int32 textId; + uint32 creature, timer, emote; + bool Talk; +}; + +static Yells Conversation[]= +{ + {SAY_CONVO_1, ILLIDAN_STORMRAGE, 8000, 0, true}, + {0, ILLIDAN_STORMRAGE, 5000, 396, true}, + {SAY_CONVO_2, AKAMA, 7000, 0, true}, + {0, AKAMA, 5000, 66, true}, + {SAY_CONVO_3, ILLIDAN_STORMRAGE, 8000, 0, true}, + {SAY_CONVO_4, AKAMA, 3000, 0, true}, + {0, AKAMA, 2000, 15, true}, + {SAY_CONVO_5, ILLIDAN_STORMRAGE, 3000, 0, true}, + {0, EMPTY, 1000, 0, true}, + {0, EMPTY, 0, 0, false}, + {SAY_CONVO_6, ILLIDAN_STORMRAGE, 8000, 0, true}, + {SAY_CONVO_7, MAIEV_SHADOWSONG, 8000, 0, true}, + {SAY_CONVO_8, ILLIDAN_STORMRAGE, 7000, 0, true}, + {SAY_CONVO_9, MAIEV_SHADOWSONG, 8000, 0, true}, + {SAY_CONVO_10, ILLIDAN_STORMRAGE, 1000, 0, false}, + {SAY_CONVO_11, MAIEV_SHADOWSONG, 6000, 0, true}, + // Emote dead for now. Kill him later + {SAY_CONVO_12, ILLIDAN_STORMRAGE, 22000, 0, true}, + {SAY_CONVO_13, MAIEV_SHADOWSONG, 9000, 0, true}, + {SAY_CONVO_14, MAIEV_SHADOWSONG, 0, true}, + {SAY_CONVO_15, AKAMA, 8000, 0, true}, + {0, EMPTY, 1000, 0, false} +}; + +static Yells RandomTaunts[]= +{ + {SAY_TAUNT_1, ILLIDAN_STORMRAGE, 0, 0, false}, + {SAY_TAUNT_2, ILLIDAN_STORMRAGE, 0, 0, false}, + {SAY_TAUNT_3, ILLIDAN_STORMRAGE, 0, 0, false}, + {SAY_TAUNT_4, ILLIDAN_STORMRAGE, 0, 0, false} +}; + +static Yells MaievTaunts[]= +{ + {SAY_MAIEV_TAUNT_1, MAIEV_SHADOWSONG, 0, 0, false}, + {SAY_MAIEV_TAUNT_2, MAIEV_SHADOWSONG, 0, 0, false}, + {SAY_MAIEV_TAUNT_3, MAIEV_SHADOWSONG, 0, 0, false}, + {SAY_MAIEV_TAUNT_4, MAIEV_SHADOWSONG, 0, 0, false} +}; + +// Yells for/by Akama +#define SAY_AKAMA_BEWARE -1564120 +#define SAY_AKAMA_MINION -1564121 +#define SAY_AKAMA_LEAVE -1564122 + +// Self explanatory +#define SAY_KILL1 -1564123 +#define SAY_KILL2 -1564124 + +// I think I'll fly now and let my subordinates take you on +#define SAY_TAKEOFF -1564125 +#define SAY_SUMMONFLAMES -1564126 + +// When casting Eye Blast. Demon Fire will be appear on places that he casts this +#define SAY_EYE_BLAST -1564127 + +// kk, I go big, dark and demon on you. +#define SAY_MORPH -1564128 + +// I KILL! +#define SAY_ENRAGE -1564129 + +/************** Spells *************/ +// Normal Form +#define SPELL_SHEAR 41032 // Reduces Max. Health by 60% for 7 seconds. Can stack 19 times. 1.5 second cast +#define SPELL_FLAME_CRASH 40832 // Summons an invis/unselect passive mob that has an aura of flame in a circle around him. +#define SPELL_DRAW_SOUL 40904 // 5k Shadow Damage in front of him. Heals Illidan for 100k health (script effect) +#define SPELL_PARASITIC_SHADOWFIEND 41917 // DoT of 3k Shadow every 2 seconds. Lasts 10 seconds. (Script effect: Summon 2 parasites once the debuff has ticked off) +#define SPELL_SUMMON_PARASITICS 41915 // Summons 2 Parasitic Shadowfiends on the target. It's supposed to be cast as soon as the Parasitic Shadowfiend debuff is gone, but the spells aren't linked :( +#define SPELL_AGONIZING_FLAMES 40932 // 4k fire damage initial to target and anyone w/i 5 yards. PHASE 3 ONLY +#define SPELL_ENRAGE 40683 // Increases damage by 50% and attack speed by 30%. 20 seconds, PHASE 5 ONLY +// Flying (Phase 2) +#define SPELL_THROW_GLAIVE 39635 // Throws a glaive on the ground +#define SPELL_THROW_GLAIVE2 39849 // Animation for the above spell +#define SPELL_GLAIVE_RETURNS 39873 // Glaive flies back to Illidan +#define SPELL_FIREBALL 40598 // 2.5k-3.5k damage in 10 yard radius. 2 second cast time. +#define SPELL_DARK_BARRAGE 40585 // 10 second channeled spell, 3k shadow damage per second. +// Demon Form +#define SPELL_DEMON_TRANSFORM_1 40511 // First phase of animations for transforming into Dark Illidan (fall to ground) +#define SPELL_DEMON_TRANSFORM_2 40398 // Second phase of animations (kneel) +#define SPELL_DEMON_TRANSFORM_3 40510 // Final phase of animations (stand up and roar) +#define SPELL_DEMON_FORM 40506 // Transforms into Demon Illidan. Has an Aura of Dread on him. +#define SPELL_SHADOW_BLAST 41078 // 8k - 11k Shadow Damage. Targets highest threat. Has a splash effect, damaging anyone in 20 yards of the target. +#define SPELL_FLAME_BURST 41126 // Hurls fire at entire raid for ~3.5k damage every 10 seconds. Resistable. (Does not work: Script effect) +#define SPELL_FLAME_BURST_EFFECT 41131 // The actual damage. Handled by core (41126 triggers 41131) +// Other Illidan spells +#define SPELL_KNEEL 39656 // Before beginning encounter, this is how he appears (talking to Wilson). +#define SPELL_SHADOW_PRISON 40647 // Illidan casts this spell to immobilize entire raid when he summons Maiev. +#define SPELL_DEATH 41220 // This spell doesn't do anything except stun Illidan and set him on his knees. +#define SPELL_BERSERK 45078 // Damage increased by 500%, attack speed by 150% + +// Non-Illidan spells +#define SPELL_AKAMA_DOOR_CHANNEL 41268 // Akama's channel spell on the door before the Temple Summit +#define SPELL_DEATHSWORN_DOOR_CHANNEL 41269 // Olum and Udalo's channel spell on the door before the Temple Summit +#define SPELL_AKAMA_DOOR_FAIL 41271 // Not sure where this is really used... +#define SPELL_HEALING_POTION 40535 // Akama uses this to heal himself to full. +#define SPELL_AZZINOTH_CHANNEL 39857 // Glaives cast it on Flames. Not sure if this is the right spell. +#define SPELL_SHADOW_DEMON_PASSIVE 41079 // Adds the "shadowform" aura to Shadow Demons. +#define SPELL_CONSUME_SOUL 41080 // Once the Shadow Demons reach their target, they use this to kill them +#define SPELL_PARALYZE 41083 // Shadow Demons cast this on their target +#define SPELL_PURPLE_BEAM 39123 // Purple Beam connecting Shadow Demon to their target +#define SPELL_CAGE_TRAP_DUMMY 40761 // Put this in DB for cage trap GO. +#define SPELL_EYE_BLAST_TRIGGER 40017 // This summons Demon Form every few seconds and deals ~20k damage in its radius +#define SPELL_EYE_BLAST 39908 // This does the blue flamey animation. +#define SPELL_FLAME_CRASH_EFFECT 40836 // Firey blue ring of circle that the other flame crash summons +#define SPELL_BLAZE_EFFECT 40610 // Green flame on the ground, triggers damage (5k) every few seconds +#define SPELL_BLAZE_SUMMON 40637 // Summons the Blaze creature +#define SPELL_DEMON_FIRE 40029 // Blue fire trail left by Eye Blast. Deals 2k per second if players stand on it. +#define SPELL_CAGED 40695 // Caged Trap triggers will cast this on Illidan if he is within 3 yards +#define SPELL_CAGE_TRAP_SUMMON 40694 // Summons a Cage Trap GO (bugged) on the ground along with a Cage Trap Disturb Trigger mob (working) +#define SPELL_CAGE_TRAP_BEAM 40713 // 8 Triggers on the ground in an octagon cast spells like this on Illidan 'caging him' +#define SPELL_FLAME_BLAST 40631 // Flames of Azzinoth use this. Frontal cone AoE 7k-9k damage. +#define SPELL_CHARGE 40602 // Flames of Azzinoth charges whoever is too far from them. They enrage after this. For simplicity, we'll use the same enrage as Illidan. +#define SPELL_TELEPORT_VISUAL 41232 // Teleport visual for Maiev +#define SPELL_SHADOWFIEND_PASSIVE 41913 // Passive aura for shadowfiends + +// Other defines +#define CENTER_X 676.740 +#define CENTER_Y 305.297 +#define CENTER_Z 353.192 + +#define EQUIP_ID_MAIN_HAND 32837 +#define EQUIP_ID_OFF_HAND 32838 + +/*** Phase Names ***/ +enum Phase +{ + PHASE_NORMAL = 1, + PHASE_FLIGHT = 2, + PHASE_NORMAL_2 = 3, + PHASE_DEMON = 4, + PHASE_NORMAL_MAIEV = 5, + PHASE_DEMON_SEQUENCE = 6, +}; + +struct Locations +{ + float x, y, z; + uint32 id; +}; + +static Locations GlaivePosition[]= +{ + {695.105, 305.303, 354.256}, + {659.338, 305.303, 354.256}, + {700.105, 305.303, 354.256}, + {664.338, 305.303, 354.256} +}; + +static Locations EyeBlast[]= +{ + {650.697, 320.128, 353.730}, + {652.799, 275.091, 353.367}, + {701.527, 273.815, 353.230}, + {709.865, 325.654, 353.322} +}; + +static Locations AkamaWP[]= +{ + { 770.01, 304.50, 312.29 }, // Bottom of the first stairs, at the doors + { 780.66, 304.50, 319.74 }, // Top of the first stairs + { 790.13, 319.68, 319.76 }, // Bottom of the second stairs (left from the entrance) + { 787.17, 347.38, 341.42 }, // Top of the second stairs + { 781.34, 350.31, 341.44 }, // Bottom of the third stairs + { 762.60, 361.06, 353.60 }, // Top of the third stairs + { 756.35, 360.52, 353.27 }, // Before the door-thingy + { 743.82, 342.21, 353.00 }, // Somewhere further + { 732.69, 305.13, 353.00 }, // In front of Illidan + { 738.11, 365.44, 353.00 }, // in front of the door-thingy (the other one!) + { 792.18, 366.62, 341.42 }, // Down the first flight of stairs + { 796.84, 304.89, 319.76 }, // Down the second flight of stairs + { 782.01, 304.55, 319.76 } // Final location - back at the initial gates. This is where he will fight the minions! +}; +// 755.762, 304.0747, 312.1769 -- This is where Akama should be spawned +static Locations SpiritSpawns[]= +{ + {755.5426, 309.9156, 312.2129, SPIRIT_OF_UDALO}, + {755.5426, 298.7923, 312.0834, SPIRIT_OF_OLUM} +}; + +struct WayPoints +{ + WayPoints(uint32 _id, float _x, float _y, float _z) + { + id = _id; + x = _x; + y = _y; + z = _z; + } + uint32 id; + float x, y, z; +}; + +struct Animation // For the demon transformation +{ + uint32 aura, unaura, timer, size, displayid, phase; + bool equip; +}; + +static Animation DemonTransformation[]= +{ + {SPELL_DEMON_TRANSFORM_1, 0, 1300, 0, 0, 6, true}, + {SPELL_DEMON_TRANSFORM_2, SPELL_DEMON_TRANSFORM_1, 4000, 0, 0, 6, true}, + {SPELL_DEMON_FORM, 0, 3000, 1073741824, 21322, 6, false}, + {SPELL_DEMON_TRANSFORM_3, SPELL_DEMON_TRANSFORM_2, 3500, 0, 0, 6, false}, + {0, 0, 0, 0, 0, 4, false}, + {SPELL_DEMON_TRANSFORM_1, 0, 1500, 0, 0, 6, false}, + {SPELL_DEMON_TRANSFORM_2, SPELL_DEMON_TRANSFORM_1, 4000, 0, 0, 6, false}, + {0, SPELL_DEMON_FORM, 3000, 1069547520, 21135, 6, false}, + {SPELL_DEMON_TRANSFORM_3, SPELL_DEMON_TRANSFORM_2, 3500, 0, 0, 6, true}, + {0, 0, 0, 0, 0, 8, true} +}; + +/**** Demon Fire will be used for Eye Blast. Illidan needs to have access to it's vars and functions, so we'll set it here ****/ +struct MANGOS_DLL_DECL demonfireAI : public ScriptedAI +{ + demonfireAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint64 IllidanGUID; + + bool IsTrigger; + + uint32 CheckTimer; + uint32 DemonFireTimer; + uint32 DespawnTimer; + + void Reset() + { + IllidanGUID = 0; + + IsTrigger = false; + + CheckTimer = 2000; + DemonFireTimer = 0; + DespawnTimer = 45000; + } + + void AttackStart(Unit* who) { } + void MoveInLineOfSight(Unit *who){ } + + void UpdateAI(const uint32 diff) + { + if (IsTrigger) + return; + + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + if (CheckTimer < diff) + { + if (!IllidanGUID && m_pInstance) + { + if (Creature* pIllidan = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_ILLIDANSTORMRAGE))) + { + IllidanGUID = m_pInstance->GetData64(DATA_ILLIDANSTORMRAGE); + + if (!pIllidan->HasMonsterMoveFlag(MONSTER_MOVE_LEVITATING)) + m_creature->setDeathState(JUST_DIED); + } + } + CheckTimer = 2000; + }else CheckTimer -= diff; + + if (DemonFireTimer < diff) + { + DoCast(m_creature, SPELL_DEMON_FIRE); + DemonFireTimer = 30000; + }else DemonFireTimer -= diff; + + if (DespawnTimer < diff) + m_creature->setDeathState(JUST_DIED); + else DespawnTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +/******* Functions and vars for Akama's AI ******/ +struct MANGOS_DLL_DECL npc_akama_illidanAI : public ScriptedAI +{ + npc_akama_illidanAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + WayPointList.clear(); + Reset(); + } + + /* Instance Data */ + ScriptedInstance* m_pInstance; + + /* Timers */ + uint32 ChannelTimer; + uint32 TalkTimer; + uint32 WalkTimer; + uint32 SummonMinionTimer; + + /* GUIDs */ + uint64 IllidanGUID; + uint64 PlayerGUID; + uint64 SpiritGUID[2]; + uint64 ChannelGUID; + + bool IsTalking; + bool StartChanneling; + bool DoorOpen; + bool FightMinions; + bool IsReturningToIllidan; + bool IsWalking; + uint32 TalkCount; + uint32 ChannelCount; + + std::list WayPointList; + std::list::iterator WayPoint; + + void BeginEvent(uint64 PlayerGUID); + + void Reset() + { + if (m_pInstance) + { + m_pInstance->SetData(TYPE_ILLIDAN, NOT_STARTED); + GameObject* pGate = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GAMEOBJECT_ILLIDAN_GATE)); + + // close door if already open (when raid wipes or something) + if (pGate && !pGate->GetGoState()) + pGate->SetGoState(GO_STATE_READY); + + for(uint8 i = DATA_GAMEOBJECT_ILLIDAN_DOOR_R; i < DATA_GAMEOBJECT_ILLIDAN_DOOR_L + 1; ++i) + { + if (GameObject* pDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(i))) + pDoor->SetGoState(GO_STATE_ACTIVE); + } + } + + IllidanGUID = 0; + PlayerGUID = 0; + ChannelGUID = 0; + for(uint8 i = 0; i < 2; ++i) SpiritGUID[i] = 0; + + ChannelTimer = 0; + ChannelCount = 0; + SummonMinionTimer = 2000; + + WalkTimer = 0; + IsWalking = false; + + TalkTimer = 0; + TalkCount = 0; + + KillAllElites(); + + IsReturningToIllidan = false; + FightMinions = false; + IsTalking = false; + StartChanneling = false; + DoorOpen = false; + + // Database sometimes has strange values.. + m_creature->SetUInt32Value(UNIT_NPC_FLAGS, 0); + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetVisibility(VISIBILITY_ON); + } + + // Do not call reset in Akama's evade mode, as this will stop him from summoning minions after he kills the first bit + void EnterEvadeMode() + { + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + } + + void KillAllElites() + { + std::list::iterator itr; + for(itr = m_creature->getThreatManager().getThreatList().begin(); itr != m_creature->getThreatManager().getThreatList().end(); ++itr) + { + Unit* pUnit = Unit::GetUnit((*m_creature), (*itr)->getUnitGuid()); + if (pUnit && (pUnit->GetTypeId() == TYPEID_UNIT) && (pUnit->GetEntry() == ILLIDARI_ELITE)) + pUnit->setDeathState(JUST_DIED); + } + } + + void ReturnToIllidan() + { + KillAllElites(); + FightMinions = false; + IsReturningToIllidan = true; + WayPoint = WayPointList.begin(); + m_creature->SetSpeed(MOVE_RUN, 2.0f); + m_creature->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + IsWalking = true; + } + + void AddWaypoint(uint32 id, float x, float y, float z) + { + WayPoints AWP(id, x, y, z); + WayPointList.push_back(AWP); + } + + void DamageTaken(Unit *done_by, uint32 &damage) + { + if (damage > m_creature->GetHealth() && (done_by->GetGUID() != m_creature->GetGUID())) + { + damage = 0; + DoCast(m_creature, SPELL_HEALING_POTION); + } + } + + void BeginDoorEvent(Player* pPlayer) + { + if (!m_pInstance) + return; + + debug_log("SD2: Akama - Door event initiated by player %s", pPlayer->GetName()); + PlayerGUID = pPlayer->GetGUID(); + + if (GameObject* pGate = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GAMEOBJECT_ILLIDAN_GATE))) + { + float x,y,z; + pGate->GetPosition(x, y, z); + Creature* Channel = m_creature->SummonCreature(ILLIDAN_DOOR_TRIGGER, x, y, z+5, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 360000); + if (Channel) + { + ChannelGUID = Channel->GetGUID(); + + // Invisible but spell visuals can still be seen. + Channel->SetDisplayId(11686); + Channel->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + float PosX, PosY, PosZ; + m_creature->GetPosition(PosX, PosY, PosZ); + for(uint8 i = 0; i < 2; ++i) + { + Creature* Spirit = m_creature->SummonCreature(SpiritSpawns[i].id, SpiritSpawns[i].x, SpiritSpawns[i].y, SpiritSpawns[i].z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 360000); + if (Spirit) + { + Spirit->SetVisibility(VISIBILITY_OFF); + SpiritGUID[i] = Spirit->GetGUID(); + } + } + + StartChanneling = true; + m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + DoCast(Channel, SPELL_AKAMA_DOOR_FAIL); + } + } + } + + void MovementInform(uint32 type, uint32 id) + { + if (type != POINT_MOTION_TYPE || !IsWalking) + return; + + if (WayPoint->id != id) + return; + + switch(id) + { + case 6: + if (!IsReturningToIllidan) + { + // open the doors that close the summit + for(uint32 i = DATA_GAMEOBJECT_ILLIDAN_DOOR_R; i < DATA_GAMEOBJECT_ILLIDAN_DOOR_L+1; ++i) + { + if (GameObject* pDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(i))) + pDoor->SetGoState(GO_STATE_ACTIVE); + } + } + break; + case 7: + if (IsReturningToIllidan) + { + IsWalking = false; + if (IllidanGUID) + { + Unit* Illidan = Unit::GetUnit((*m_creature), IllidanGUID); + if (Illidan) + { + float dx = Illidan->GetPositionX() + rand()%15; + float dy = Illidan->GetPositionY() + rand()%15; + m_creature->GetMotionMaster()->MovePoint(13, dx, dy, Illidan->GetPositionZ()); + m_creature->SetUInt64Value(UNIT_FIELD_TARGET, IllidanGUID); + } + } + } + break; + case 8: + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + if (!IsReturningToIllidan) + { + IsWalking = false; + BeginEvent(PlayerGUID); + } + break; + case 12: + IsWalking = false; + FightMinions = true; + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + break; + } + + ++WayPoint; + WalkTimer = 200; + } + + void DeleteFromThreatList() + { + // If we do not have Illidan's GUID, do not proceed + if (!IllidanGUID) + return; + + // Create a pointer to Illidan + Creature* Illidan = ((Creature*)Unit::GetUnit((*m_creature), IllidanGUID)); + + // No use to continue if Illidan does not exist + if (!Illidan) + return; + + std::list::iterator itr = Illidan->getThreatManager().getThreatList().begin(); + for(; itr != Illidan->getThreatManager().getThreatList().end(); ++itr) + { + // Loop through threatlist till our GUID is found in it. + if ((*itr)->getUnitGuid() == m_creature->GetGUID()) + { + (*itr)->removeReference(); // Delete ourself from his threatlist. + return; // No need to continue anymore. + } + } + + // Now we delete our threatlist to prevent attacking anyone for now + m_creature->DeleteThreatList(); + } + + void UpdateAI(const uint32 diff) + { + if (IllidanGUID) + { + Creature* Illidan = ((Creature*)Unit::GetUnit((*m_creature), IllidanGUID)); + if (Illidan) + { + if (Illidan->IsInEvadeMode() && !m_creature->IsInEvadeMode()) + EnterEvadeMode(); + + if (((Illidan->GetHealth()*100 / Illidan->GetMaxHealth()) < 85) && m_creature->isInCombat() && !FightMinions) + { + if (TalkTimer < diff) + { + switch(TalkCount) + { + case 0: + DoScriptText(SAY_AKAMA_MINION, Illidan); + TalkTimer = 8000; + TalkCount = 1; + break; + case 1: + DoScriptText(SAY_AKAMA_LEAVE, m_creature); + TalkTimer = 3000; + TalkCount = 2; + break; + case 2: + IsTalking = true; + TalkTimer = 2000; + m_creature->RemoveAllAuras(); + m_creature->CombatStop(true); + m_creature->AttackStop(); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + TalkCount = 3; + break; + case 3: + DeleteFromThreatList(); + IsWalking = true; + WayPoint = WayPointList.begin(); + std::advance(WayPoint, 9); + m_creature->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + break; + } + }else TalkTimer -= diff; + } + + if (((Illidan->GetHealth()*100 / Illidan->GetMaxHealth()) < 4) && !IsReturningToIllidan) + ReturnToIllidan(); + } + }else + { + if (m_pInstance) + IllidanGUID = m_pInstance->GetData64(DATA_ILLIDANSTORMRAGE); + } + + if (IsWalking && WalkTimer) + { + if (WalkTimer <= diff) + { + if (WayPoint == WayPointList.end()) + return; + + m_creature->GetMotionMaster()->MovePoint(WayPoint->id, WayPoint->x, WayPoint->y,WayPoint->z); + WalkTimer = 0; + }else WalkTimer -= diff; + } + + if (StartChanneling) + { + if (ChannelTimer < diff) + { + switch(ChannelCount) + { + case 3: + if (!DoorOpen) + { + m_creature->InterruptNonMeleeSpells(true); + + for(uint8 i = 0; i < 2; ++i) + { + if (SpiritGUID[i]) + { + Unit* Spirit = Unit::GetUnit((*m_creature), SpiritGUID[i]); + if (Spirit) + Spirit->InterruptNonMeleeSpells(true); + } + } + + if (GameObject* pGate = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GAMEOBJECT_ILLIDAN_GATE))) + pGate->SetGoState(GO_STATE_ACTIVE); + + ++ChannelCount; + ChannelTimer = 5000; + } + break; + case 4: + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_SALUTE); + ChannelTimer = 2000; + ++ChannelCount; + break; + case 5: + DoScriptText(SAY_AKAMA_BEWARE, m_creature); + if (ChannelGUID) + { + Unit* ChannelTarget = Unit::GetUnit((*m_creature), ChannelGUID); + if (ChannelTarget) + ChannelTarget->setDeathState(JUST_DIED); + ChannelGUID = 0; + } + for(uint8 i = 0; i < 2; ++i) + { + if (SpiritGUID[i]) + { + Unit* Spirit = Unit::GetUnit((*m_creature), SpiritGUID[i]); + if (Spirit) + Spirit->setDeathState(JUST_DIED); + } + } + ChannelTimer = 6000; + ++ChannelCount; + break; + case 6: + StartChanneling = false; + if (WayPointList.empty()) + { + error_log("SD2: Akama has no waypoints to start with!"); + return; + } + + WayPoint = WayPointList.begin(); + m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + m_creature->GetMotionMaster()->MovePoint(WayPoint->id, WayPoint->x, WayPoint->y, WayPoint->z); + IsWalking = true; + break; + default: + if (ChannelGUID) + { + Unit* Channel = Unit::GetUnit((*m_creature), ChannelGUID); + if (Channel) + { + m_creature->InterruptNonMeleeSpells(true); + + for(uint8 i = 0; i < 2; ++i) + { + if (SpiritGUID[i]) + { + Unit* Spirit = Unit::GetUnit((*m_creature), SpiritGUID[i]); + if (Spirit) + { + Spirit->InterruptNonMeleeSpells(true); + if (ChannelCount%2 == 0) + { + Spirit->CastSpell(Channel, SPELL_DEATHSWORN_DOOR_CHANNEL,false); + DoCast(Channel, SPELL_AKAMA_DOOR_CHANNEL); + } + else + { + if (Spirit->GetVisibility() == VISIBILITY_OFF) + Spirit->SetVisibility(VISIBILITY_ON); + } + } + } + } + if (ChannelCount < 3) + ++ChannelCount; + ChannelTimer = 10000; + } + } + break; + } + }else ChannelTimer -= diff; + } + + if (FightMinions) + { + if (SummonMinionTimer < diff) + { + if (IllidanGUID) + { + Creature* Illidan = ((Creature*)Unit::GetUnit((*m_creature), IllidanGUID)); + if (!Illidan || Illidan->IsInEvadeMode()) + { + Reset(); + EnterEvadeMode(); + return; + } + } + + float x,y,z; + m_creature->GetPosition(x,y,z); + Creature* Elite = m_creature->SummonCreature(ILLIDARI_ELITE, x+rand()%10, y+rand()%10, z, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000); + if (Elite) + { + Elite->AI()->AttackStart(m_creature); + Elite->AddThreat(m_creature, 1000000.0f); + AttackStart(Elite); + } + SummonMinionTimer = urand(10000, 16000); + }else SummonMinionTimer -= diff; + } + + // If we don't have a target, or is talking, or has run away, return + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + + DoMeleeAttackIfReady(); + } +}; + +/************************************** Illidan's AI ***************************************/ +struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI +{ + boss_illidan_stormrageAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + + for(uint8 i = 0; i < 2; ++i) + { + FlameGUID[i] = 0; + GlaiveGUID[i] = 0; + } + + AkamaGUID = 0; + MaievGUID = 0; + + Reset(); + } + + /** Instance Data **/ + ScriptedInstance* m_pInstance; + + /** Generic **/ + bool IsTalking; + bool HasSummoned; + bool RefaceVictim; + bool InformAkama; + uint32 Phase; + uint32 GlobalTimer; + uint32 TalkCount; + uint32 DemonFormSequence; + + /** GUIDs **/ + uint64 FlameGUID[2]; + uint64 GlaiveGUID[2]; + uint64 AkamaGUID; + uint64 MaievGUID; + + /** Timers **/ + uint32 ShearTimer; + uint32 DrawSoulTimer; + uint32 FlameCrashTimer; + uint32 ParasiticShadowFiendTimer; + uint32 FireballTimer; + uint32 EyeBlastTimer; + uint32 DarkBarrageTimer; + uint32 SummonBladesTimer; // Animate summoning the Blades of Azzinoth in Phase 2 + uint32 SummonFlamesTimer; // Summon Flames of Azzinoth in Phase 2 + uint32 CheckFlamesTimer; // This is used to check the status of the Flames to see if we should begin entering Phase 3 or not. + uint32 RetrieveBladesTimer; // Animate retrieving the Blades of Azzinoth in Phase 2 -> 3 transition + uint32 LandTimer; // This is used at the end of phase 2 to signal Illidan landing after Flames are dead + uint32 AgonizingFlamesTimer; + uint32 ShadowBlastTimer; + uint32 FlameBurstTimer; + uint32 ShadowDemonTimer; + uint32 TalkTimer; + uint32 TransformTimer; + uint32 EnrageTimer; + uint32 CageTimer; + uint32 LayTrapTimer; + uint32 AnimationTimer; + uint32 TauntTimer; // This is used for his random yells + uint32 FaceVictimTimer; + uint32 BerserkTimer; + + void Reset() + { + Phase = PHASE_NORMAL; + + // Check if any flames/glaives are alive/existing. Kill if alive and set GUIDs to 0 + for(uint8 i = 0; i < 2; ++i) + { + if (Unit* Flame = Unit::GetUnit((*m_creature), FlameGUID[i])) + { + if (Flame->isAlive()) + Flame->setDeathState(JUST_DIED); + + FlameGUID[i] = 0; + } + + if (Unit* Glaive = Unit::GetUnit((*m_creature), GlaiveGUID[i])) + { + if (Glaive->isAlive()) + Glaive->setDeathState(JUST_DIED); + + GlaiveGUID[i] = 0; + } + } + + if (Creature* Akama = ((Creature*)Unit::GetUnit((*m_creature), AkamaGUID))) + { + if (!Akama->isAlive()) + Akama->Respawn(); + + ((npc_akama_illidanAI*)Akama->AI())->Reset(); + ((npc_akama_illidanAI*)Akama->AI())->EnterEvadeMode(); + Akama->GetMotionMaster()->MoveTargetedHome(); + } + + InformAkama = false; + RefaceVictim = false; + HasSummoned = false; + + FaceVictimTimer = 1000; + BerserkTimer = 1500000; + GlobalTimer = 0; + DemonFormSequence = 0; + + /** Normal Form **/ + ShearTimer = urand(20000, 30000); // 20 to 30 seconds + FlameCrashTimer = 30000; // 30 seconds + ParasiticShadowFiendTimer = 25000; // 25 seconds + DrawSoulTimer = 50000; // 50 seconds + + /** Phase 2 **/ + SummonBladesTimer = 10000; + SummonFlamesTimer = 20000; // Phase 2 timers may be incorrect + FireballTimer = 5000; + DarkBarrageTimer = 45000; + EyeBlastTimer = 30000; + CheckFlamesTimer = 5000; + RetrieveBladesTimer = 5000; + LandTimer = 0; + + /** Phase 3+ **/ + AgonizingFlamesTimer = 35000; // Phase 3+ timers may be incorrect + ShadowBlastTimer = 3000; + FlameBurstTimer = 10000; + ShadowDemonTimer = 30000; + TransformTimer = 90000; + EnrageTimer = 40000; + CageTimer = 30000; + LayTrapTimer = CageTimer + 2000; + AnimationTimer = 0; + + TauntTimer = 30000; // This timer may be off. + + m_creature->SetDisplayId(21135); + m_creature->InterruptNonMeleeSpells(false); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + // Unequip warglaives if needed + SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_UNEQUIP, EQUIP_NO_CHANGE); + + m_creature->RemoveMonsterMoveFlag(MONSTER_MOVE_LEVITATING); + + IsTalking = false; + + TalkCount = 0; + TalkTimer = 0; + + if (m_pInstance) + m_pInstance->SetData(TYPE_ILLIDAN, NOT_STARTED); + } + + void Aggro(Unit* pWho) + { + m_creature->SetInCombatWithZone(); + } + + void AttackStart(Unit *who) + { + if (!who || IsTalking || Phase == 2 || Phase == 4 || Phase == 6 || m_creature->HasAura(SPELL_KNEEL, 0)) + return; + + if (who == m_creature) + return; + + if (m_creature->Attack(who, true)) + { + m_creature->AddThreat(who, 0.0f); + m_creature->SetInCombatWith(who); + who->SetInCombatWith(m_creature); + + DoStartMovement(who); + } + } + + void MoveInLineOfSight(Unit *who) + { + if (!who || m_creature->getVictim() || IsTalking || m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + return; + + if (who->isTargetableForAttack() && who->isInAccessablePlaceFor(m_creature) && m_creature->IsHostileTo(who)) + { + if (!m_creature->canFly() && m_creature->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE) + return; + + float attackRadius = m_creature->GetAttackDistance(who); + if (m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->IsWithinLOSInMap(who)) + { + who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); + AttackStart(who); + } + } + } + + void JustDied(Unit *killer) + { + IsTalking = false; + TalkCount = 0; + TalkTimer = 0; + + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + if (!m_pInstance) + return; + + // Completed + m_pInstance->SetData(TYPE_ILLIDAN, DONE); + + for(uint8 i = DATA_GAMEOBJECT_ILLIDAN_DOOR_R; i < DATA_GAMEOBJECT_ILLIDAN_DOOR_L + 1; ++i) + { + // Open Doors + if (GameObject* pDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(i))) + pDoor->SetGoState(GO_STATE_ACTIVE); + } + + } + + void KilledUnit(Unit *victim) + { + if (victim == m_creature) + return; + + DoScriptText(urand(0, 1) ? SAY_KILL1 : SAY_KILL2, m_creature); + } + + void DamageTaken(Unit *done_by, uint32 &damage) + { + if (damage > m_creature->GetHealth()) // Don't let ourselves be slain before we do our death speech + { + damage = 0; + m_creature->SetHealth(m_creature->GetMaxHealth()/100); + } + } + + void Cast(Unit* victim, uint32 Spell, bool triggered = false) + { + if (!victim) + return; + + RefaceVictim = true; + m_creature->SetUInt64Value(UNIT_FIELD_TARGET, victim->GetGUID()); + m_creature->CastSpell(victim, Spell, triggered); + } + + /** This will handle the cast of eye blast **/ + void CastEyeBlast() + { + m_creature->InterruptNonMeleeSpells(false); + + DarkBarrageTimer += 10000; + + DoScriptText(SAY_EYE_BLAST, m_creature); + + uint32 initial = urand(0, 3); + uint32 final = 0; + + if (initial < 3) + final = initial+1; + + float initial_X = EyeBlast[initial].x; + float initial_Y = EyeBlast[initial].y; + float initial_Z = EyeBlast[initial].z; + + float final_X = EyeBlast[final].x; + float final_Y = EyeBlast[final].y; + float final_Z = EyeBlast[final].z; + + for(uint8 i = 0; i < 2; ++i) + { + Creature* Trigger = NULL; + Trigger = m_creature->SummonCreature(DEMON_FIRE, initial_X, initial_Y, initial_Z, 0, TEMPSUMMON_TIMED_DESPAWN, 20000); + if (Trigger) + { + ((demonfireAI*)Trigger->AI())->IsTrigger = true; + Trigger->GetMotionMaster()->MovePoint(0, final_X, final_Y, final_Z); + + if (!i) + Trigger->CastSpell(Trigger, SPELL_EYE_BLAST_TRIGGER, true); + else + { + Trigger->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetUInt64Value(UNIT_FIELD_TARGET, Trigger->GetGUID()); + DoCast(Trigger, SPELL_EYE_BLAST); + } + } + } + } + + // It's only cast on players that are greater than 15 yards away from Illidan. + //If no one is found, cast it on MT instead (since selecting someone in that 15 yard radius would cause the flames to hit the MT anyway). + void CastAgonizingFlames() + { + // We'll use a grid searcher that selects a player that is at a distance >15 yards + if (Player* pPlayer = GetPlayerAtMinimumRange(15.0f)) + DoCast(pPlayer, SPELL_AGONIZING_FLAMES); + else + DoCast(m_creature->getVictim(), SPELL_AGONIZING_FLAMES); + } + + void Talk(uint32 count) + { + if (!m_creature->isAlive()) + return; + + int32 text = 0; + + if (Conversation[count].textId) + text = Conversation[count].textId; + + TalkTimer = Conversation[count].timer; + uint32 emote = Conversation[count].emote; + IsTalking = Conversation[count].Talk; + Creature* pCreature = NULL; + uint64 GUID = 0; + + if (Conversation[count].creature == ILLIDAN_STORMRAGE) + pCreature = m_creature; + else if (Conversation[count].creature == AKAMA) + { + if (!AkamaGUID) + { + if (m_pInstance) + { + AkamaGUID = m_pInstance->GetData64(DATA_AKAMA); + if (!AkamaGUID) + return; + GUID = AkamaGUID; + } + } + else GUID = AkamaGUID; + } + else if (Conversation[count].creature == MAIEV_SHADOWSONG) + { + if (!MaievGUID) + return; + GUID = MaievGUID; + } + else if (Conversation[count].creature == EMPTY) // This is just for special cases without speech/sounds/emotes. + return; + + if (GUID) // Now we check if we actually specified a GUID, if so: + // we grab a pointer to that creature + pCreature = ((Creature*)Unit::GetUnit((*m_creature), GUID)); + + if (pCreature) + { + if (emote) + pCreature->HandleEmoteCommand(emote); // Make the creature do some animation! + if (text) + DoScriptText(text, pCreature); // Have the creature yell out some text + } + } + + void Move(float X, float Y, float Z, Creature* pCreature) + { + pCreature->GetMotionMaster()->MovePoint(0, X, Y, Z); + } + + void HandleDemonTransformAnimation(uint32 count) + { + uint32 unaura = DemonTransformation[count].unaura; + uint32 aura = DemonTransformation[count].aura; + uint32 displayid = DemonTransformation[count].displayid; + AnimationTimer = DemonTransformation[count].timer; + uint32 size = DemonTransformation[count].size; + + m_creature->InterruptNonMeleeSpells(false); + + if (DemonTransformation[count].phase != 8) + { + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveIdle(); + } + + if (unaura) + m_creature->RemoveAurasDueToSpell(unaura); + + if (aura) + DoCast(m_creature, aura, true); + + if (displayid) + // It's morphin time! + m_creature->SetDisplayId(displayid); + /*if (size) + m_creature->SetUInt32Value(OBJECT_FIELD_SCALE_X, size); // Let us grow! (or shrink)*/ + + if (DemonTransformation[count].equip) + { + // Requip warglaives if needed + SetEquipmentSlots(false, EQUIP_ID_MAIN_HAND, EQUIP_ID_OFF_HAND, EQUIP_NO_CHANGE); + } + else + { + // Unequip warglaives if needed + SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_UNEQUIP, EQUIP_NO_CHANGE); + } + + if (DemonTransformation[count].phase != 8) + Phase = DemonTransformation[count].phase; // Set phase properly + else + { + // Refollow and attack our old victim + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + + // Depending on whether we summoned Maiev, we switch to either phase 5 or 3 + if (MaievGUID) Phase = PHASE_NORMAL_MAIEV; + else Phase = PHASE_NORMAL_2; + } + + if (count == 7) + { + DoResetThreat(); + m_creature->RemoveAurasDueToSpell(SPELL_DEMON_FORM); + } + else if (count == 4) + { + DoResetThreat(); + if (!m_creature->HasAura(SPELL_DEMON_FORM, 0)) + DoCast(m_creature, SPELL_DEMON_FORM, true); + } + } + + /** To reduce the amount of code in UpdateAI, we can seperate them into different functions and simply call them from UpdateAI **/ + void EnterPhase2() + { + DoScriptText(SAY_TAKEOFF, m_creature); + + SummonBladesTimer = 10000; // Summon Glaives when this decrements + SummonFlamesTimer = 20000; // Summon Flames when this decrements + GlobalTimer += 20000; + LandTimer = 0; + Phase = PHASE_FLIGHT; + m_creature->RemoveAllAuras(); + m_creature->SetUInt64Value(UNIT_FIELD_TARGET, 0); + + // So players don't shoot us down + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + + // We now hover! + m_creature->AddMonsterMoveFlag(MONSTER_MOVE_LEVITATING); + + m_creature->GetMotionMaster()->MovePoint(0, CENTER_X, CENTER_Y, CENTER_Z); + for(uint8 i = 0; i < 2; ++i) + { + Creature* Glaive = m_creature->SummonCreature(BLADE_OF_AZZINOTH, GlaivePosition[i].x, GlaivePosition[i].y, GlaivePosition[i].z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); + if (Glaive) + { + GlaiveGUID[i] = Glaive->GetGUID(); // We need this to remove them later on + Glaive->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + Glaive->SetVisibility(VISIBILITY_OFF); + Glaive->setFaction(m_creature->getFaction()); + } + } + } + + void SummonBladesOfAzzinoth() + { + m_creature->GetMotionMaster()->Clear(false); + + LandTimer = 0; + RetrieveBladesTimer = 0; + + // Make it look like we're throwing the glaives on the ground + DoCast(m_creature, SPELL_THROW_GLAIVE2); + + // We no longer wear the glaives! + // since they are now channeling the flames (or will be) + SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_UNEQUIP, EQUIP_NO_CHANGE); + + for(uint8 i = 0; i < 2; ++i) + { + Creature* Glaive = NULL; + Glaive = ((Creature*)Unit::GetUnit((*m_creature), GlaiveGUID[i])); + if (Glaive) + { + DoCast(Glaive, SPELL_THROW_GLAIVE, true); + Glaive->SetVisibility(VISIBILITY_ON); + } + } + } + + void SummonFlamesOfAzzinoth() + { + DoScriptText(SAY_SUMMONFLAMES, m_creature); + + for(uint8 i = 0; i < 2; ++i) + { + Creature* Flame = NULL; + Creature* Glaive = NULL; + Glaive = ((Creature*)Unit::GetUnit((*m_creature), GlaiveGUID[i])); + if (Glaive) + { + Flame = m_creature->SummonCreature(FLAME_OF_AZZINOTH, GlaivePosition[i+2].x, GlaivePosition[i+2].y, GlaivePosition[i+2].z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000); + if (Flame) + { + // Just in case the database has it as a different faction + Flame->setFaction(m_creature->getFaction()); + + // Attack our target! + Flame->AI()->AttackStart(m_creature->getVictim()); + + // Record GUID in order to check if they're dead later on to move to the next phase + FlameGUID[i] = Flame->GetGUID(); + + // Glaives do some random Beam type channel on it. + Glaive->CastSpell(Flame, SPELL_AZZINOTH_CHANNEL, true); + + if (m_creature->getVictim()) + Flame->AI()->AttackStart(m_creature->getVictim()); + } + else + { + error_log("SD2: Illidan Stormrage AI: Unable to summon Flame of Azzinoth (entry: 22997), please check your database"); + EnterEvadeMode(); + } + } + else + { + error_log("SD2: Illidan Stormrage AI: Unable to summon Blade of Azzinoth (entry: 22996), please check your database"); + } + } + DoResetThreat(); // And now reset our threatlist + HasSummoned = true; + } + + void SummonMaiev() + { + TauntTimer += 4000; + GlobalTimer += 4000; + + m_creature->InterruptNonMeleeSpells(false); // Interrupt any of our spells + Creature* Maiev = NULL; // Summon Maiev near Illidan + Maiev = m_creature->SummonCreature(MAIEV_SHADOWSONG, m_creature->GetPositionX() + 10, m_creature->GetPositionY() + 5, m_creature->GetPositionZ()+2, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45000); + if (Maiev) + { + m_creature->GetMotionMaster()->Clear(false); // Stop moving, it's rude to walk and talk! + m_creature->GetMotionMaster()->MoveIdle(); + // Just in case someone is unaffected by Shadow Prison + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + DoCast(m_creature, SPELL_SHADOW_PRISON, true); + TalkCount = 10; + IsTalking = true; // We are now talking/ + Maiev->SetVisibility(VISIBILITY_OFF); // Leave her invisible until she has to talk + Maiev->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + MaievGUID = Maiev->GetGUID(); + } + else // If Maiev cannot be summoned, reset the encounter and post some errors to the console. + { + EnterEvadeMode(); + debug_log("SD2: Unable to summon Maiev Shadowsong and enter Phase 4. Resetting Encounter."); + error_log("SD2: Unable to summon Maiev Shadowsong (entry: 23197). Check your database to see if you have the proper SQL for Maiev Shadowsong (entry: 23197)"); + } + } + + void InitializeDeath() + { + m_creature->RemoveAllAuras(); + DoCast(m_creature, SPELL_DEATH); // Animate his kneeling + stun him + // Don't let the players interrupt our talk! + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->GetMotionMaster()->Clear(false); // No moving! + m_creature->GetMotionMaster()->MoveIdle(); + + if (MaievGUID) + { + if (Creature* Maiev = ((Creature*)Unit::GetUnit((*m_creature), MaievGUID))) + { + Maiev->CombatStop(true); // Maiev shouldn't do anything either. No point in her attacking us =] + Maiev->GetMotionMaster()->Clear(false); // Stop her from moving as well + Maiev->GetMotionMaster()->MoveIdle(); + + float distance = 10.0f; + float dx = m_creature->GetPositionX() + (distance*cos(m_creature->GetOrientation())); + float dy = m_creature->GetPositionY() + (distance*sin(m_creature->GetOrientation())); + + Maiev->GetMap()->CreatureRelocation(m_creature, dx, dy, Maiev->GetPositionZ(), 0.0f); + Maiev->SendMonsterMove(dx, dy, Maiev->GetPositionZ(), 0, MONSTER_MOVE_NONE, 0); + + Maiev->CastSpell(Maiev, SPELL_TELEPORT_VISUAL, true); + Maiev->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->GetGUID()); + } + } + IsTalking = true; + ++TalkCount; + } + + void UpdateAI(const uint32 diff) + { + /*** This section will handle the conversations ***/ + if (IsTalking) // Somewhat more efficient using a function rather than a long switch + { + if (TalkTimer < diff) + { + switch(TalkCount) // This is only for specialized cases + { + case 0: + // Time to stand up! + m_creature->RemoveAurasDueToSpell(SPELL_KNEEL); + break; + case 8: + // Equip our warglaives! + SetEquipmentSlots(false, EQUIP_ID_MAIN_HAND, EQUIP_ID_OFF_HAND, EQUIP_NO_CHANGE); + // Hostile if we weren't before + m_creature->setFaction(14); + break; + case 9: + if (AkamaGUID) + { + Creature* Akama = ((Creature*)Unit::GetUnit((*m_creature), AkamaGUID)); + if (Akama) + { + // Start attacking Akama + AttackStart(Akama); + + // Akama stop talk and start attack illidan + ((npc_akama_illidanAI*)Akama->AI())->IsTalking = false; + ((npc_akama_illidanAI*)Akama->AI())->AttackStart(m_creature); + Akama->AddThreat(m_creature, 1000000.0f); + } + } + // We are now attackable! + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + debug_log("SD2: Black Temple: Illidan intro complete, players can attack Illidan."); + break; + case 11: + if (MaievGUID) + { + Unit* Maiev = Unit::GetUnit((*m_creature), MaievGUID); + if (Maiev) + { + // Maiev is now visible + Maiev->SetVisibility(VISIBILITY_ON); + // onoz she looks like she teleported! + Maiev->CastSpell(Maiev, SPELL_TELEPORT_VISUAL, true); + // Have her face us + Maiev->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->GetGUID()); + // Face her, so it's not rude =P + m_creature->SetUInt64Value(UNIT_FIELD_TARGET, Maiev->GetGUID()); + } + } + break; + case 14: + if (MaievGUID) + { + Creature* Maiev = ((Creature*)Unit::GetUnit((*m_creature), MaievGUID)); + if (Maiev) + { + Maiev->GetMotionMaster()->Clear(false); + Maiev->GetMotionMaster()->MoveChase(m_creature); + // Have Maiev add a lot of threat on us so that players don't pull her off if they damage her via AOE + Maiev->AddThreat(m_creature, 10000000.0f); + // Force Maiev to attack us. + Maiev->AI()->AttackStart(m_creature); + Maiev->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } + } + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + IsTalking = false; + FaceVictimTimer = 2000; + RefaceVictim = true; + break; + case 20: + // Kill ourself. + if (MaievGUID) + { + Creature* Maiev = ((Creature*)Unit::GetUnit((*m_creature), MaievGUID)); + if (Maiev) + { + // Make Maiev leave + Maiev->CastSpell(Maiev, SPELL_TELEPORT_VISUAL, true); + Maiev->setDeathState(JUST_DIED); + } + } + IsTalking = false; + if (m_creature->getVictim()) + m_creature->getVictim()->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE,SPELL_SCHOOL_MASK_NORMAL, NULL, false); + else + // Now we kill ourself + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + break; + } + + // This function does most of the talking + Talk(TalkCount); + ++TalkCount; + }else TalkTimer -= diff; + } + + // If we don't have a target, return. + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim() || IsTalking) + return; + + // If we are 'caged', then we shouldn't do anything such as cast spells or transform into Demon Form. + if (m_creature->HasAura(SPELL_CAGED, 0)) + { + // Just so that he doesn't immediately enrage after he stops being caged. + EnrageTimer = 40000; + CageTimer = 30000; + return; + } + + // Berserk Timer - flat 25 minutes + if (!m_creature->HasAura(SPELL_BERSERK, 0) && Phase != PHASE_DEMON_SEQUENCE) + { + if (BerserkTimer < diff) + { + DoScriptText(SAY_ENRAGE, m_creature); + DoCast(m_creature, SPELL_BERSERK, true); + }else BerserkTimer -= diff; + } + + if (RefaceVictim) + { + if (FaceVictimTimer < diff) + { + m_creature->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->getVictim()->GetGUID()); + FaceVictimTimer = 1000; + RefaceVictim = false; + }else FaceVictimTimer -= diff; + } + + /** Signal to change to phase 2 **/ + if (((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 65) && (Phase == PHASE_NORMAL)) + EnterPhase2(); + + /** Signal to summon Maiev **/ + if (((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 30) && !MaievGUID && + (Phase != PHASE_DEMON || Phase != PHASE_DEMON_SEQUENCE)) + SummonMaiev(); + + /** Time for the death speech **/ + if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 1) && (!IsTalking) && + (Phase != PHASE_DEMON || Phase != PHASE_DEMON_SEQUENCE)) + InitializeDeath(); + + /***** Spells for Phase 1, 3 and 5 (Normal Form) ******/ + if (Phase == PHASE_NORMAL || Phase == PHASE_NORMAL_2 || Phase == PHASE_NORMAL_MAIEV) + { + if (TauntTimer < diff) // His random taunt/yell timer. + { + uint32 random = urand(0, 3); + int32 yell = RandomTaunts[random].textId; + if (yell) + DoScriptText(yell, m_creature); + TauntTimer = 32000; + }else TauntTimer -= diff; + + // Global Timer so that spells do not overlap. + if (GlobalTimer < diff) + { + if (ShearTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_SHEAR); + ShearTimer = urand(25000, 40000); + GlobalTimer += 2000; + }else ShearTimer -= diff; + + if (FlameCrashTimer < diff) + { + //It spawns multiple flames sometimes. Therefore, we'll do this manually. + //DoCast(m_creature->getVictim(), SPELL_FLAME_CRASH); + m_creature->SummonCreature(FLAME_CRASH, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 40000); + FlameCrashTimer = 35000; + GlobalTimer += 2000; + }else FlameCrashTimer -= diff; + + if (ParasiticShadowFiendTimer < diff) + { + Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM,1); + if (target && target->isAlive() && !target->HasAura(SPELL_PARASITIC_SHADOWFIEND, 0)) + { + Cast(target, SPELL_PARASITIC_SHADOWFIEND); + ParasiticShadowFiendTimer = 40000; + } + }else ParasiticShadowFiendTimer -= diff; + + if (DrawSoulTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_DRAW_SOUL); + DrawSoulTimer = 55000; + GlobalTimer += 3000; + }else DrawSoulTimer -= diff; + }else GlobalTimer -= diff; + + if (!IsTalking) + DoMeleeAttackIfReady(); + } + + /*** Phase 2 ***/ + if (Phase == PHASE_FLIGHT) + { + // Check if we have summoned or not. + if (!HasSummoned) + { + if (SummonBladesTimer) + if (SummonBladesTimer <= diff) + { + SummonBladesOfAzzinoth(); + SummonBladesTimer = 0; + }else SummonBladesTimer -= diff; + + if (SummonFlamesTimer < diff) + { + SummonFlamesOfAzzinoth(); + }else SummonFlamesTimer -= diff; + } + + if (!m_creature->GetMotionMaster()->empty() && (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != POINT_MOTION_TYPE)) + m_creature->GetMotionMaster()->Clear(false); + + if (HasSummoned) + { + if (CheckFlamesTimer) + { + if (CheckFlamesTimer <= diff) + { + // Check if flames are dead or non-existant. If so, set GUID to 0. + for(uint8 i = 0; i < 2; ++i) + { + if (FlameGUID[i]) + { + Unit* Flame = NULL; + Flame = Unit::GetUnit((*m_creature), FlameGUID[i]); + + // If the flame dies, or somehow the pointer becomes invalid, reset GUID to 0. + if (!Flame || !Flame->isAlive()) + FlameGUID[i] = 0; + } + } + CheckFlamesTimer = 500; + }else CheckFlamesTimer -= diff; + } + + // If both flames are dead/non-existant, kill glaives and change to phase 3. + if (!FlameGUID[0] && !FlameGUID[1] && CheckFlamesTimer) + { + RetrieveBladesTimer = 5000; // Prepare for re-equipin! + CheckFlamesTimer = 0; + } + + if (RetrieveBladesTimer) + { + if (RetrieveBladesTimer <= diff) // Time to get back our glaives! + { + // Interrupt any spells we might be doing *cough* DArk Barrage *cough* + m_creature->InterruptNonMeleeSpells(false); + for(uint8 i = 0; i < 2; ++i) + { + if (GlaiveGUID[i]) + { + Unit* Glaive = NULL; + Glaive = Unit::GetUnit((*m_creature), GlaiveGUID[i]); + if (Glaive) + { + // Make it look like the Glaive flies back up to us + Glaive->CastSpell(m_creature, SPELL_GLAIVE_RETURNS, true); + // Despawn the Glaive + Glaive->setDeathState(JUST_DIED); + } + GlaiveGUID[i] = 0; + } + } + + // Re-equip our warblades! + SetEquipmentSlots(false, EQUIP_ID_MAIN_HAND, EQUIP_ID_OFF_HAND, EQUIP_NO_CHANGE); + + // Prepare for landin'! + LandTimer = 5000; + RetrieveBladesTimer = 0; + }else RetrieveBladesTimer -= diff; + } + + if (LandTimer) + { + // Time to land! + if (LandTimer <= diff) + { + DoResetThreat(); + + // anndddd touchdown! + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LAND); + m_creature->RemoveMonsterMoveFlag(MONSTER_MOVE_LEVITATING); + Phase = PHASE_NORMAL_2; + + // We should let the raid fight us =) + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->getVictim()->GetGUID()); + + // Chase our victim! + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + }else LandTimer -= diff; + return; // Do not continue past this point if LandTimer is not 0 and we are in phase 2. + } + } + + if (GlobalTimer < diff) + { + if (FireballTimer < diff) + { + Cast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_FIREBALL); + FireballTimer = 5000; + }else FireballTimer -= diff; + + if (DarkBarrageTimer < diff) + { + m_creature->InterruptNonMeleeSpells(false); + DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_DARK_BARRAGE); + DarkBarrageTimer = 35000; + GlobalTimer += 9000; + }else DarkBarrageTimer -= diff; + + if (EyeBlastTimer < diff) + { + CastEyeBlast(); + EyeBlastTimer = 30000; + }else EyeBlastTimer -= diff; + }else GlobalTimer -= diff; + } + + /** Phase 3,5 spells only**/ + if (Phase == PHASE_NORMAL_2 || Phase == PHASE_NORMAL_MAIEV) + { + if (GlobalTimer < diff) + { + if (AgonizingFlamesTimer < diff) + { + CastAgonizingFlames(); + AgonizingFlamesTimer = 60000; + }else AgonizingFlamesTimer -= diff; + }else GlobalTimer -= diff; + + if (TransformTimer < diff) + { + uint32 CurHealth = m_creature->GetHealth()*100 / m_creature->GetMaxHealth(); + // Prevent Illidan from morphing if less than 32% or 5%, as this may cause issues with the phase transition or death speech + if ((CurHealth < 32 && !MaievGUID) || (CurHealth < 5)) + return; + + Phase = PHASE_DEMON_SEQUENCE; // Transform sequence + DemonFormSequence = 0; + AnimationTimer = 0; + + DoScriptText(SAY_MORPH, m_creature); + + TransformTimer = 60000; + FlameBurstTimer = 10000; + ShadowDemonTimer = 30000; + m_creature->GetMotionMaster()->Clear(false);// Stop moving + }else TransformTimer -= diff; + } + + /** Phase 4 spells only (Demon Form) **/ + if (Phase == PHASE_DEMON) + { + // Stop moving if we are by clearing movement generators. + if (!m_creature->GetMotionMaster()->empty()) + m_creature->GetMotionMaster()->Clear(false); + + if (TransformTimer < diff) + { + Phase = PHASE_DEMON_SEQUENCE; + DemonFormSequence = 5; + AnimationTimer = 100; + TransformTimer = 60000; + }else TransformTimer -= diff; + + if (ShadowDemonTimer < diff) + { + m_creature->InterruptNonMeleeSpells(false); + Creature* ShadowDemon = NULL; + for(uint8 i = 0; i < 4; ++i) + { + Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM,0); + + // only on players. + if (target && target->GetTypeId() == TYPEID_PLAYER) + { + ShadowDemon = m_creature->SummonCreature(SHADOW_DEMON, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 25000); + if (ShadowDemon) + { + ShadowDemon->AddThreat(target, 5000000.0f); + ShadowDemon->AI()->AttackStart(target); + ShadowDemon->SetInCombatWithZone(); + } + } + } + ShadowDemonTimer = 60000; + }else ShadowDemonTimer -= diff; + + if (GlobalTimer < diff) + { + if (ShadowBlastTimer < diff) + { + Unit* target = SelectUnit(SELECT_TARGET_TOPAGGRO, 0); + if (target && target->isAlive()) + { + m_creature->SetUInt64Value(UNIT_FIELD_TARGET, target->GetGUID()); + DoCast(target, SPELL_SHADOW_BLAST); + ShadowBlastTimer = 4000; + GlobalTimer += 1500; + } + if (!m_creature->HasAura(SPELL_DEMON_FORM, 0)) + DoCast(m_creature, SPELL_DEMON_FORM, true); + }else ShadowBlastTimer -= diff; + + if (FlameBurstTimer < diff) + { + DoCast(m_creature, SPELL_FLAME_BURST); + FlameBurstTimer = 15000; + }else FlameBurstTimer -= diff; + }else GlobalTimer -= diff; + } + + /** Phase 5 timers. Enrage spell **/ + if (Phase == PHASE_NORMAL_MAIEV) + { + if (EnrageTimer < diff) + { + DoCast(m_creature, SPELL_ENRAGE); + EnrageTimer = 40000; + CageTimer = 30000; + TransformTimer += 10000; + }else EnrageTimer -= diff; + + // We'll handle Cage Trap in Illidan's script for simplicity's sake + if (CageTimer < diff) + { + if (MaievGUID) + { + Unit* Maiev = Unit::GetUnit((*m_creature), MaievGUID); + Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0); + + if (!Maiev || !target || (target->GetTypeId() != TYPEID_PLAYER)) + return; + + float X, Y, Z; + target->GetPosition(X, Y, Z); + Maiev->GetMap()->CreatureRelocation(m_creature, X, Y, Z, Maiev->GetOrientation()); + + // Make it look like she 'teleported' + Maiev->CastSpell(Maiev, SPELL_TELEPORT_VISUAL, true); + // summon the trap! + Maiev->CastSpell(Maiev, SPELL_CAGE_TRAP_SUMMON, false); + } + CageTimer = 15000; + }else CageTimer -= diff; + } + + if (Phase == PHASE_DEMON_SEQUENCE) // Demonic Transformation + { + if (AnimationTimer < diff) + { + HandleDemonTransformAnimation(DemonFormSequence); + ++DemonFormSequence; + }else AnimationTimer -= diff; + } + } +}; + +/*********************** End of Illidan AI ******************************************/ + +void npc_akama_illidanAI::BeginEvent(uint64 PlayerGUID) +{ + debug_log("SD2: Akama - Illidan Introduction started. Illidan event properly begun."); + if (m_pInstance) + { + IllidanGUID = m_pInstance->GetData64(DATA_ILLIDANSTORMRAGE); + m_pInstance->SetData(TYPE_ILLIDAN, IN_PROGRESS); + } + + if (m_pInstance) + { + for(uint8 i = DATA_GAMEOBJECT_ILLIDAN_DOOR_R; i < DATA_GAMEOBJECT_ILLIDAN_DOOR_L+1; ++i) + { + if (GameObject* pDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(i))) + pDoor->SetGoState(GO_STATE_READY); + } + } + + if (IllidanGUID) + { + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + Creature* Illidan = ((Creature*)Unit::GetUnit((*m_creature), IllidanGUID)); + if (Illidan) + { + Illidan->RemoveAurasDueToSpell(SPELL_KNEEL); // Time for Illidan to stand up. + // First line of Akama-Illidan convo + ((boss_illidan_stormrageAI*)Illidan->AI())->TalkCount = 0; + // Begin Talking + ((boss_illidan_stormrageAI*)Illidan->AI())->IsTalking = true; + ((boss_illidan_stormrageAI*)Illidan->AI())->AkamaGUID = m_creature->GetGUID(); + m_creature->SetUInt64Value(UNIT_FIELD_TARGET, Illidan->GetGUID()); + Illidan->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->GetGUID()); + IsTalking = true; // Prevent Akama from starting to attack him + // Prevent players from talking again + m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + Illidan->GetMotionMaster()->Clear(false); + Illidan->GetMotionMaster()->MoveIdle(); + m_creature->GetMotionMaster()->Clear(false); + m_creature->GetMotionMaster()->MoveIdle(); + + if (PlayerGUID) + { + Unit* pPlayer = Unit::GetUnit((*m_creature), PlayerGUID); + if (pPlayer) + Illidan->AddThreat(pPlayer, 100.0f); + } + } + } +} + +bool GossipHello_npc_akama_at_illidan(Player* pPlayer, Creature* pCreature) +{ + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + pPlayer->SEND_GOSSIP_MENU(10465, pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_akama_at_illidan(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF) // Time to begin the event + { + pPlayer->CLOSE_GOSSIP_MENU(); + ((npc_akama_illidanAI*)pCreature->AI())->BeginDoorEvent(pPlayer); + } + return true; +} + +struct MANGOS_DLL_DECL boss_maievAI : public ScriptedAI +{ + boss_maievAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + }; + + uint32 TauntTimer; + uint64 IllidanGUID; + + ScriptedInstance* m_pInstance; + + void Reset() + { + TauntTimer = 12000; + IllidanGUID = 0; + } + + void UpdateAI(const uint32 diff) + { + if (!IllidanGUID) + { + if (m_pInstance) + IllidanGUID = m_pInstance->GetData64(DATA_ILLIDANSTORMRAGE); + }else + { + Creature* Illidan = NULL; + Illidan = ((Creature*)Unit::GetUnit((*m_creature), IllidanGUID)); + if (!Illidan || !Illidan->isAlive() || Illidan->IsInEvadeMode()) + { + m_creature->SetVisibility(VISIBILITY_OFF); + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + else if (Illidan && ((Illidan->GetHealth()*100 / Illidan->GetMaxHealth()) < 2)) + return; + } + + // Return if we don't have a target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (TauntTimer < diff) + { + uint32 random = urand(0, 3); + int32 text = MaievTaunts[random].textId; + + DoScriptText(text, m_creature); + + TauntTimer = urand(22000, 42000); + }else TauntTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +struct MANGOS_DLL_DECL cage_trap_triggerAI : public ScriptedAI +{ + cage_trap_triggerAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint64 IllidanGUID; + uint64 CageTrapGUID; + + uint32 DespawnTimer; + + bool Active; + bool SummonedBeams; + + void Reset() + { + IllidanGUID = 0; + CageTrapGUID = 0; + + Active = false; + SummonedBeams = false; + + DespawnTimer = 0; + + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } + + void MoveInLineOfSight(Unit *who) + { + if (!Active) + return; + + if (who && (who->GetTypeId() != TYPEID_PLAYER)) + { + if (who->GetEntry() == ILLIDAN_STORMRAGE) // Check if who is Illidan + { + if (!IllidanGUID && m_creature->IsWithinDistInMap(who, 3) && !who->HasAura(SPELL_CAGED, 0)) + { + IllidanGUID = who->GetGUID(); + who->CastSpell(who, SPELL_CAGED, true); + DespawnTimer = 5000; + + // Dispel his enrage + if (who->HasAura(SPELL_ENRAGE, 0)) + who->RemoveAurasDueToSpell(SPELL_ENRAGE); + + if (GameObject* pCageTrap = m_creature->GetMap()->GetGameObject(CageTrapGUID)) + pCageTrap->SetLootState(GO_JUST_DEACTIVATED); + } + } + } + } + + void UpdateAI(const uint32 diff) + { + if (DespawnTimer) + { + if (DespawnTimer <= diff) + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + else DespawnTimer -= diff; + } + + //if (IllidanGUID && !SummonedBeams) + //{ + // if (Unit* Illidan = Unit::GetUnit(*m_creature, IllidanGUID) + // { + // //TODO: Find proper spells and properly apply 'caged' Illidan effect + // } + //} + } +}; + +bool GOHello_cage_trap(Player* pPlayer, GameObject* pGo) +{ + float x, y, z; + pPlayer->GetPosition(x, y, z); + + // Grid search for nearest live creature of entry 23304 within 10 yards + Creature* pTrigger = GetClosestCreatureWithEntry(pGo, 23304, 10.0f); + + if (!pTrigger) + { + error_log("SD2: Cage Trap- Unable to find trigger. This Cage Trap is now useless"); + return false; + } + + ((cage_trap_triggerAI*)pTrigger->AI())->Active = true; + pGo->SetGoState(GO_STATE_ACTIVE); + return true; +} + +struct MANGOS_DLL_DECL flame_of_azzinothAI : public ScriptedAI +{ + flame_of_azzinothAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 FlameBlastTimer; + uint32 SummonBlazeTimer; + uint32 ChargeTimer; + + void Reset() + { + FlameBlastTimer = urand(15000, 30000); + SummonBlazeTimer = urand(10000, 30000); + ChargeTimer = 5000; + } + + void Charge() + { + // Get the Threat List + std::list& m_threatlist = m_creature->getThreatManager().getThreatList(); + + // He doesn't have anyone in his threatlist, useless to continue + if (!m_threatlist.size()) + return; + + std::list targets; + std::list::iterator itr = m_threatlist.begin(); + + //store the threat list in a different container + for(; itr!= m_threatlist.end(); ++itr) + { + Unit *target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()); + //only on alive players + if (target && target->isAlive() && target->GetTypeId() == TYPEID_PLAYER) + targets.push_back(target); + } + + //Sort the list of players + targets.sort(ObjectDistanceOrderReversed(m_creature)); + //Resize so we only get the furthest target + targets.resize(1); + + Unit* target = (*targets.begin()); + if (target && (!m_creature->IsWithinDistInMap(target, 40))) + { + DoCast(m_creature, SPELL_ENRAGE, true); + DoCast(target, SPELL_CHARGE); + } + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (FlameBlastTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_FLAME_BLAST); + FlameBlastTimer = 30000; + }else FlameBlastTimer -= diff; + + if (SummonBlazeTimer < diff) + { + DoCast(m_creature, SPELL_BLAZE_SUMMON); + SummonBlazeTimer = urand(30000, 50000); + }else SummonBlazeTimer -= diff; + + if (ChargeTimer < diff) + { + Charge(); + ChargeTimer = 5000; + }else ChargeTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +struct MANGOS_DLL_DECL shadow_demonAI : public ScriptedAI +{ + shadow_demonAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint64 TargetGUID; + + void Reset() { TargetGUID = 0; } + + void JustDied(Unit *killer) + { + if (TargetGUID) + { + Unit* target = Unit::GetUnit((*m_creature), TargetGUID); + if (target) + target->RemoveAurasDueToSpell(SPELL_PARALYZE); + } + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + + // Only cast the below on players. + if (m_creature->getVictim()->GetTypeId() != TYPEID_PLAYER) return; + + if (!m_creature->getVictim()->HasAura(SPELL_PARALYZE, 0)) + { + TargetGUID = m_creature->getVictim()->GetGUID(); + m_creature->AddThreat(m_creature->getVictim(), 10000000.0f); + DoCast(m_creature, SPELL_SHADOW_DEMON_PASSIVE, true); + DoCast(m_creature->getVictim(), SPELL_PURPLE_BEAM, true); + DoCast(m_creature->getVictim(), SPELL_PARALYZE, true); + } + // Kill our target if we're very close. + if (m_creature->IsWithinDistInMap(m_creature->getVictim(), 3)) + DoCast(m_creature->getVictim(), SPELL_CONSUME_SOUL); + } +}; + +struct MANGOS_DLL_DECL flamecrashAI : public ScriptedAI +{ + flamecrashAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 FlameCrashTimer; + uint32 DespawnTimer; + + void Reset() + { + FlameCrashTimer = urand(3000, 8000); + DespawnTimer = 60000; + } + + void AttackStart(Unit *who) { } + + void MoveInLineOfSight(Unit *who){ } + + void UpdateAI(const uint32 diff) + { + if (FlameCrashTimer < diff) + { + DoCast(m_creature, SPELL_FLAME_CRASH_EFFECT); + FlameCrashTimer = 15000; + }else FlameCrashTimer -= diff; + + if (DespawnTimer < diff) + { + // So that players don't see the sparkly effect when we die. + m_creature->SetVisibility(VISIBILITY_OFF); + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + }else DespawnTimer -= diff; + } +}; + +// Shadowfiends interact with Illidan, setting more targets in Illidan's hashmap +struct MANGOS_DLL_DECL mob_parasitic_shadowfiendAI : public ScriptedAI +{ + mob_parasitic_shadowfiendAI(Creature* pCreature) : ScriptedAI(pCreature) + { + Reset(); + } + + void Reset() {} + + void DoMeleeAttackIfReady() + { + //If we are within range melee the target + if (m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE)) + { + //Make sure our attack is ready and we aren't currently casting + if (m_creature->isAttackReady() && !m_creature->IsNonMeleeSpellCasted(false)) + { + if (!m_creature->getVictim()->HasAura(SPELL_PARASITIC_SHADOWFIEND, 0)) + DoCast(m_creature->getVictim(), SPELL_PARASITIC_SHADOWFIEND, true); + + m_creature->AttackerStateUpdate(m_creature->getVictim()); + m_creature->resetAttackTimer(); + } + } + } +}; + +struct MANGOS_DLL_DECL blazeAI : public ScriptedAI +{ + blazeAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 BlazeTimer; + uint32 DespawnTimer; + + void Reset() + { + BlazeTimer = 2000; + DespawnTimer = 15000; + } + + void AttackStart(Unit* who) { } + + void MoveInLineOfSight(Unit *who){ } + + void UpdateAI(const uint32 diff) + { + if (BlazeTimer < diff) + { + DoCast(m_creature, SPELL_BLAZE_EFFECT); + BlazeTimer = 15000; + }else BlazeTimer -= diff; + + if (DespawnTimer < diff) + { + m_creature->SetVisibility(VISIBILITY_OFF); + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + }else DespawnTimer -= diff; + } +}; + +struct MANGOS_DLL_DECL blade_of_azzinothAI : public ScriptedAI +{ + blade_of_azzinothAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + void Reset() {} + + // Do-Nothing-But-Stand-There + void AttackStart(Unit* who) { } + void MoveInLineOfSight(Unit* who) { } + +}; + +CreatureAI* GetAI_boss_illidan_stormrage(Creature* pCreature) +{ + return new boss_illidan_stormrageAI(pCreature); +} + +CreatureAI* GetAI_npc_akama_at_illidan(Creature* pCreature) +{ + npc_akama_illidanAI* Akama_AI = new npc_akama_illidanAI(pCreature); + + for(uint8 i = 0; i < 13; ++i) + Akama_AI->AddWaypoint(i, AkamaWP[i].x, AkamaWP[i].y, AkamaWP[i].z); + + return ((CreatureAI*)Akama_AI); +} + +CreatureAI* GetAI_boss_maiev(Creature* pCreature) +{ + return new boss_maievAI(pCreature); +} + +CreatureAI* GetAI_mob_flame_of_azzinoth(Creature* pCreature) +{ + return new flame_of_azzinothAI(pCreature); +} + +CreatureAI* GetAI_cage_trap_trigger(Creature* pCreature) +{ + return new cage_trap_triggerAI(pCreature); +} + +CreatureAI* GetAI_shadow_demon(Creature* pCreature) +{ + return new shadow_demonAI(pCreature); +} + +CreatureAI* GetAI_flamecrash(Creature* pCreature) +{ + return new flamecrashAI(pCreature); +} + +CreatureAI* GetAI_demonfire(Creature* pCreature) +{ + return new demonfireAI(pCreature); +} + +CreatureAI* GetAI_blaze(Creature* pCreature) +{ + return new blazeAI(pCreature); +} + +CreatureAI* GetAI_blade_of_azzinoth(Creature* pCreature) +{ + return new blade_of_azzinothAI(pCreature); +} + +CreatureAI* GetAI_parasitic_shadowfiend(Creature* pCreature) +{ + return new mob_parasitic_shadowfiendAI(pCreature); +} + +void AddSC_boss_illidan() +{ + Script* newscript; + + newscript = new Script; + newscript->Name = "boss_illidan_stormrage"; + newscript->GetAI = &GetAI_boss_illidan_stormrage; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_akama_illidan"; + newscript->GetAI = &GetAI_npc_akama_at_illidan; + newscript->pGossipHello = &GossipHello_npc_akama_at_illidan; + newscript->pGossipSelect = &GossipSelect_npc_akama_at_illidan; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_maiev_shadowsong"; + newscript->GetAI = &GetAI_boss_maiev; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_flame_of_azzinoth"; + newscript->GetAI = &GetAI_mob_flame_of_azzinoth; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_blade_of_azzinoth"; + newscript->GetAI = &GetAI_blade_of_azzinoth; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "gameobject_cage_trap"; + newscript->pGOHello = &GOHello_cage_trap; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_cage_trap_trigger"; + newscript->GetAI = &GetAI_cage_trap_trigger; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_shadow_demon"; + newscript->GetAI = &GetAI_shadow_demon; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_flame_crash"; + newscript->GetAI = &GetAI_flamecrash; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_demon_fire"; + newscript->GetAI = &GetAI_demonfire; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_blaze"; + newscript->GetAI = &GetAI_blaze; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_parasitic_shadowfiend"; + newscript->GetAI = &GetAI_parasitic_shadowfiend; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/black_temple/boss_mother_shahraz.cpp b/scripts/outland/black_temple/boss_mother_shahraz.cpp new file mode 100644 index 000000000..4b1329ab2 --- /dev/null +++ b/scripts/outland/black_temple/boss_mother_shahraz.cpp @@ -0,0 +1,309 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Mother_Shahraz +SD%Complete: 80 +SDComment: Saber Lash missing, Fatal Attraction slightly incorrect; need to damage only if affected players are within range of each other +SDCategory: Black Temple +EndScriptData */ + +#include "precompiled.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 43267 +#define SPELL_SABER_LASH_IMM 43690 +#define SPELL_TELEPORT_VISUAL 40869 +#define SPELL_BERSERK 45078 + +uint32 PrismaticAuras[]= +{ + 40880, // Shadow + 40882, // Fire + 40883, // Nature + 40891, // Arcane + 40896, // Frost + 40897, // Holy +}; + +struct Locations +{ + float x,y,z; +}; + +static Locations TeleportPoint[]= +{ + {959.996, 212.576, 193.843}, + {932.537, 231.813, 193.838}, + {958.675, 254.767, 193.822}, + {946.955, 201.316, 192.535}, + {944.294, 149.676, 197.551}, + {930.548, 284.888, 193.367}, + {965.997, 278.398, 195.777} +}; + +struct MANGOS_DLL_DECL boss_shahrazAI : public ScriptedAI +{ + boss_shahrazAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint64 TargetGUID[3]; + uint32 BeamTimer; + uint32 BeamCount; + uint32 CurrentBeam; + uint32 PrismaticShieldTimer; + uint32 FatalAttractionTimer; + uint32 FatalAttractionExplodeTimer; + uint32 ShriekTimer; + uint32 RandomYellTimer; + uint32 EnrageTimer; + uint32 ExplosionCount; + + bool Enraged; + + void Reset() + { + for(uint8 i = 0; i<3; ++i) + TargetGUID[i] = 0; + + BeamTimer = 60000; // Timers may be incorrect + BeamCount = 0; + CurrentBeam = 0; // 0 - Sinister, 1 - Vile, 2 - Wicked, 3 - Sinful + PrismaticShieldTimer = 0; + FatalAttractionTimer = 60000; + FatalAttractionExplodeTimer = 70000; + ShriekTimer = 30000; + RandomYellTimer = urand(70000, 110000); + EnrageTimer = 600000; + ExplosionCount = 0; + + Enraged = false; + } + + void Aggro(Unit* pWho) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_SHAHRAZ, IN_PROGRESS); + + m_creature->SetInCombatWithZone(); + + DoScriptText(SAY_AGGRO, m_creature); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_SHAHRAZ, NOT_STARTED); + } + + void KilledUnit(Unit *victim) + { + DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); + } + + void JustDied(Unit *victim) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_SHAHRAZ, DONE); + + DoScriptText(SAY_DEATH, m_creature); + } + + void TeleportPlayers() + { + uint32 random = urand(0, 6); + float X = TeleportPoint[random].x; + float Y = TeleportPoint[random].y; + float Z = TeleportPoint[random].z; + + for(uint8 i = 0; i < 3; ++i) + { + Unit* pUnit = SelectUnit(SELECT_TARGET_RANDOM, 1); + if (pUnit && pUnit->isAlive() && (pUnit->GetTypeId() == TYPEID_PLAYER)) + { + TargetGUID[i] = pUnit->GetGUID(); + pUnit->CastSpell(pUnit, SPELL_TELEPORT_VISUAL, true); + DoTeleportPlayer(pUnit, X, Y, Z, pUnit->GetOrientation()); + } + } + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 10) && !Enraged) + { + Enraged = true; + DoCast(m_creature, SPELL_ENRAGE, true); + DoScriptText(SAY_ENRAGE, m_creature); + } + + //Randomly cast one beam. + if (BeamTimer < diff) + { + Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0); + if (!target || !target->isAlive()) + return; + + BeamTimer = 9000; + + switch(CurrentBeam) + { + case 0: + DoCast(target, SPELL_BEAM_SINISTER); + break; + case 1: + DoCast(target, SPELL_BEAM_VILE); + break; + case 2: + DoCast(target, SPELL_BEAM_WICKED); + break; + case 3: + DoCast(target, SPELL_BEAM_SINFUL); + break; + } + ++BeamCount; + uint32 Beam = CurrentBeam; + + if (BeamCount > 3) + while(CurrentBeam == Beam) + CurrentBeam = urand(0, 2); + + }else BeamTimer -= diff; + + // Random Prismatic Shield every 15 seconds. + if (PrismaticShieldTimer < diff) + { + uint32 random = urand(0, 5); + if (PrismaticAuras[random]) + DoCast(m_creature, PrismaticAuras[random]); + PrismaticShieldTimer = 15000; + }else PrismaticShieldTimer -= diff; + + // Select 3 random targets (can select same target more than once), teleport to a random location then make them cast explosions until they get away from each other. + if (FatalAttractionTimer < diff) + { + ExplosionCount = 0; + + TeleportPlayers(); + + DoScriptText(urand(0, 1) ? SAY_SPELL2 : SAY_SPELL3, m_creature); + + FatalAttractionExplodeTimer = 2000; + FatalAttractionTimer = urand(40000, 70000); + }else FatalAttractionTimer -= diff; + + if (FatalAttractionExplodeTimer < diff) + { + // Just make them explode three times... they're supposed to keep exploding while they are in range, but it'll take too much code. I'll try to think of an efficient way for it later. + if (ExplosionCount < 3) + { + for(uint8 i = 0; i < 3; ++i) + { + Unit* pUnit = NULL; + if (TargetGUID[i]) + { + pUnit = Unit::GetUnit((*m_creature), TargetGUID[i]); + if (pUnit) + pUnit->CastSpell(pUnit, SPELL_ATTRACTION, true); + TargetGUID[i] = 0; + } + } + + ++ExplosionCount; + FatalAttractionExplodeTimer = 1000; + } + else + { + FatalAttractionExplodeTimer = FatalAttractionTimer + 2000; + ExplosionCount = 0; + } + }else FatalAttractionExplodeTimer -= diff; + + if (ShriekTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_SILENCING_SHRIEK); + ShriekTimer = 30000; + }else ShriekTimer -= diff; + + //Enrage + if (!m_creature->HasAura(SPELL_BERSERK, 0)) + { + if (EnrageTimer < diff) + { + DoCast(m_creature, SPELL_BERSERK); + DoScriptText(SAY_ENRAGE, m_creature); + }else EnrageTimer -= diff; + } + + //Random taunts + if (RandomYellTimer < diff) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_TAUNT1, m_creature); break; + case 1: DoScriptText(SAY_TAUNT2, m_creature); break; + case 2: DoScriptText(SAY_TAUNT3, m_creature); break; + } + + RandomYellTimer = urand(60000, 150000); + }else RandomYellTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_shahraz(Creature* pCreature) +{ + return new boss_shahrazAI(pCreature); +} + +void AddSC_boss_mother_shahraz() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_mother_shahraz"; + newscript->GetAI = &GetAI_boss_shahraz; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/black_temple/boss_reliquary_of_souls.cpp b/scripts/outland/black_temple/boss_reliquary_of_souls.cpp new file mode 100644 index 000000000..0de30b311 --- /dev/null +++ b/scripts/outland/black_temple/boss_reliquary_of_souls.cpp @@ -0,0 +1,979 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Reliquary_of_Souls +SD%Complete: 90 +SDComment: Persistent Area Auras for each Essence (Aura of Suffering, Aura of Desire, Aura of Anger) requires core support. +SDCategory: Black Temple +EndScriptData */ + +#include "precompiled.h" +#include "black_temple.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 +#define ESSENCE_OF_SUFFERING_PASSIVE 41296 +#define SPELL_ENRAGE 41305 +#define SPELL_SOUL_DRAIN 41303 +#define SPELL_FIXATE 41295 + +#define AURA_OF_DESIRE 41350 +#define SPELL_RUNE_SHIELD 41431 +#define SPELL_DEADEN 41410 +#define SPELL_SOUL_SHOCK 41426 + +#define AURA_OF_ANGER 41337 +#define SPELL_SELF_SEETHE 41364 +#define SPELL_ENEMY_SEETHE 41520 +#define SPELL_SOUL_SCREAM 41545 +#define SPELL_SPITE 41377 + +#define ENSLAVED_SOUL_PASSIVE 41535 +#define SPELL_SOUL_RELEASE 41542 +#define SPELL_RESTORE_MANA 32848 +#define SPELL_RESTORE_HEALTH 25329 + +#define CREATURE_ENSLAVED_SOUL 23469 + +struct Position +{ + float x,y; +}; + +static Position Coords[]= +{ + {450.4, 212.3}, + {542.1, 212.3}, + {542.1, 168.3}, + {542.1, 137.4}, + {450.4, 137.4}, + {450.4, 168.3} +}; + +struct MANGOS_DLL_DECL npc_enslaved_soulAI : public ScriptedAI +{ + npc_enslaved_soulAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint64 ReliquaryGUID; + + void Reset() + { + ReliquaryGUID = 0; + } + + void DamageTaken(Unit *done_by, uint32 &damage) + { + if (damage >= m_creature->GetHealth()) + { + if (done_by->GetTypeId() == TYPEID_PLAYER) + { + done_by->CastSpell(done_by, SPELL_RESTORE_HEALTH, true); + if (done_by->GetMaxPower(POWER_MANA) > 0) + { + if ((done_by->GetPower(POWER_MANA) / done_by->GetMaxPower(POWER_MANA)) < 70) + { + uint32 mana = done_by->GetPower(POWER_MANA) + (uint32)(done_by->GetMaxPower(POWER_MANA)*0.3); + done_by->SetPower(POWER_MANA, mana); + }else done_by->SetPower(POWER_MANA, done_by->GetMaxPower(POWER_MANA)); + } + } + DoCast(done_by, SPELL_SOUL_RELEASE); + } + } + + void JustDied(Unit *killer); +}; + +struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI +{ + boss_reliquary_of_soulsAI(Creature* pCreature) : ScriptedAI(pCreature) + { + SufferingGUID = 0; + DesireGUID = 0; + AngerGUID = 0; + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint64 SufferingGUID; + uint64 DesireGUID; + uint64 AngerGUID; + + uint32 SoulDeathCount; + // 0 = Out of Combat, 1 = Not started, 2 = Suffering, 3 = Souls, 4 = Desire, 5 = Souls, 6 = Anger + uint32 Phase; + uint32 SummonEssenceTimer; + uint32 DespawnEssenceTimer; + uint32 SoulCount; + uint32 SummonSoulTimer; + uint32 AnimationTimer; + + bool IsDead; + bool EndingPhase; + + void Reset() + { + DespawnEssences(); + + SoulDeathCount = 0; + Phase = 0; + SummonEssenceTimer = 8000; + DespawnEssenceTimer = 2000; + SoulCount = 0; + SummonSoulTimer = 1000; + AnimationTimer = 8000; + + IsDead = false; + EndingPhase = false; + + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE,0); + m_creature->GetMotionMaster()->Clear(false); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_RELIQUIARY, NOT_STARTED); + } + + void DespawnEssences() + { + Creature* pEssence = NULL; + + if (SufferingGUID) + pEssence = (Creature*)Unit::GetUnit((*m_creature), SufferingGUID); + else if (DesireGUID) + pEssence = (Creature*)Unit::GetUnit((*m_creature), DesireGUID); + else if (AngerGUID) + pEssence = (Creature*)Unit::GetUnit((*m_creature), AngerGUID); + + if (pEssence && pEssence->isAlive()) + pEssence->ForcedDespawn(); + } + + void AttackStart(Unit* who) { } + + void MoveInLineOfSight(Unit *who) + { + if (who->isTargetableForAttack() && who->isInAccessablePlaceFor(m_creature) && m_creature->IsHostileTo(who)) + { + float attackRadius = m_creature->GetAttackDistance(who); + if (m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->GetDistanceZ(who) <= CREATURE_Z_ATTACK_RANGE && m_creature->IsWithinLOSInMap(who)) + { + who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); + + if (!m_creature->getVictim()) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_RELIQUIARY, IN_PROGRESS); + + Phase = 1; + + // I R ANNNGRRRY! + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE,375); + SummonEssenceTimer = 8000; + AnimationTimer = 5100; + m_creature->AddThreat(who, 1.0f); + } + } + } + } + + void SummonSoul() + { + uint32 random = urand(0, 5); + float x = Coords[random].x; + float y = Coords[random].y; + + Creature* Soul = m_creature->SummonCreature(CREATURE_ENSLAVED_SOUL, x, y, m_creature->GetPositionZ(), m_creature->GetOrientation(), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45000); + Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0); + if (target && Soul) + { + ((npc_enslaved_soulAI*)Soul->AI())->ReliquaryGUID = m_creature->GetGUID(); + Soul->CastSpell(Soul, ENSLAVED_SOUL_PASSIVE, true); + Soul->AddThreat(target, 1.0f); + ++SoulCount; + } + } + + void MergeThreatList(Creature* target) + { + if (!target) + return; + + std::list& m_threatlist = target->getThreatManager().getThreatList(); + std::list::iterator itr = m_threatlist.begin(); + for(; itr != m_threatlist.end(); ++itr) + { + Unit* pUnit = Unit::GetUnit((*m_creature), (*itr)->getUnitGuid()); + if (pUnit) + { + m_creature->AddThreat(pUnit, 1.0f); // This is so that we make sure the unit is in Reliquary's threat list before we reset the unit's threat. + m_creature->getThreatManager().modifyThreatPercent(pUnit, -100); + float threat = target->getThreatManager().getThreat(pUnit); + m_creature->AddThreat(pUnit, threat); // This makes it so that the unit has the same amount of threat in Reliquary's threatlist as in the target creature's (One of the Essences). + } + } + } + + void JustDied(Unit* killer) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_RELIQUIARY, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!Phase) + return; + + // Reset if event is begun and we don't have a threatlist + if (Phase && m_creature->getThreatManager().getThreatList().empty()) + EnterEvadeMode(); + + if (Phase == 1) + { + if (AnimationTimer < diff) + { + // Release the cube + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE,374); + AnimationTimer = 8300; + }else AnimationTimer -= diff; + + if (SummonEssenceTimer < diff) + { + // Ribs: open + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE,373); + Creature* EssenceSuffering = NULL; + EssenceSuffering = m_creature->SummonCreature(23418, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 1.57, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10000); + + if (EssenceSuffering) + { + DoScriptText(SUFF_SAY_FREED, EssenceSuffering); + + if (Unit* target = SelectUnit(SELECT_TARGET_TOPAGGRO, 0)) + { + EssenceSuffering->AddThreat(target, 1.0f); + EssenceSuffering->AI()->AttackStart(target); + } + + SufferingGUID = EssenceSuffering->GetGUID(); + } + + EndingPhase = false; + Phase = 2; + }else SummonEssenceTimer -= diff; + } + + if (Phase == 2) + { + if (SufferingGUID) + { + Creature* EssenceSuffering = NULL; + EssenceSuffering = ((Creature*)Unit::GetUnit((*m_creature), SufferingGUID)); + + if (!EssenceSuffering || (!EssenceSuffering->isAlive())) + EnterEvadeMode(); + + if (!EndingPhase) + { + if (EssenceSuffering) + { + if (EssenceSuffering->GetHealth() < (EssenceSuffering->GetMaxHealth()*0.1)) + { + DoScriptText(SUFF_SAY_RECAP, EssenceSuffering); + MergeThreatList(EssenceSuffering); + EssenceSuffering->RemoveAllAuras(); + EssenceSuffering->DeleteThreatList(); + EssenceSuffering->GetMotionMaster()->MoveFollow(m_creature,0.0f,0.0f); + EssenceSuffering->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + DespawnEssenceTimer = 4000; + AnimationTimer = 2200; + EndingPhase = true; + } + } + } + + if ((EndingPhase) && (EssenceSuffering) && (EssenceSuffering->isAlive())) + { + if (AnimationTimer < diff) + { + // Return + EssenceSuffering->SetUInt32Value(UNIT_NPC_EMOTESTATE,374); + AnimationTimer = 10000; + }else AnimationTimer -= diff; + + if (DespawnEssenceTimer < diff) + { + DoScriptText(SUFF_SAY_AFTER, EssenceSuffering); + + EssenceSuffering->DeleteThreatList(); + EssenceSuffering->SetDisplayId(11686); + EssenceSuffering->setFaction(35); + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE,0); + SummonEssenceTimer = 20000; //60000; + AnimationTimer = 18200; //58100; + SoulDeathCount = 0; + SoulCount = 0; + SummonSoulTimer = 1000; + EndingPhase = false; + Phase = 3; + SufferingGUID = 0; + }else DespawnEssenceTimer -= diff; + } + } + } + + if (Phase == 3) + { + if (SoulCount < 36) + { + if (SummonSoulTimer < diff) + { + SummonSoul(); + SummonSoulTimer = 500; + }else SummonSoulTimer -= diff; + } + + if (SoulDeathCount >= SoulCount) + { + if (AnimationTimer < diff) + { + // Release the cube + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE,374); + AnimationTimer = 10000; + }else AnimationTimer -= diff; + + if (SummonEssenceTimer < diff) + { + // Ribs: open + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE,373); + Creature* EssenceDesire = NULL; + EssenceDesire = m_creature->SummonCreature(23419, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 1.57, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10000); + + if (EssenceDesire) + { + DoScriptText(DESI_SAY_FREED, EssenceDesire); + + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0)) + { + EssenceDesire->AddThreat(target, 1.0f); + EssenceDesire->AI()->AttackStart(target); + } + + DesireGUID = EssenceDesire->GetGUID(); + SoulDeathCount = 0; + } + + Phase = 4; + }else SummonEssenceTimer -= diff; + } + } + + if (Phase == 4) + { + if (DesireGUID) + { + Creature* EssenceDesire = NULL; + EssenceDesire = ((Creature*)Unit::GetUnit((*m_creature), DesireGUID)); + + if (!EssenceDesire || !EssenceDesire->isAlive()) + EnterEvadeMode(); + + if (!EndingPhase && EssenceDesire) + { + if (EssenceDesire->GetHealth() < (EssenceDesire->GetMaxHealth()*0.1)) + { + MergeThreatList(EssenceDesire); + EssenceDesire->GetMotionMaster()->MoveFollow(m_creature,0.0f,0.0f); + EssenceDesire->RemoveAllAuras(); + EssenceDesire->DeleteThreatList(); + + DoScriptText(DESI_SAY_RECAP, EssenceDesire); + + EssenceDesire->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + DespawnEssenceTimer = 4000; + AnimationTimer = 2200; + EndingPhase = true; + } + } + + if (EndingPhase && EssenceDesire) + { + if (EssenceDesire->isAlive()) + { + if (AnimationTimer < diff) + { + // Return + EssenceDesire->SetUInt32Value(UNIT_NPC_EMOTESTATE,374); + AnimationTimer = 10000; + }else AnimationTimer -= diff; + + if (DespawnEssenceTimer < diff) + { + EssenceDesire->DeleteThreatList(); + EssenceDesire->setFaction(35); + + DoScriptText(DESI_SAY_AFTER, EssenceDesire); + + EssenceDesire->SetDisplayId(11686); + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE,0); + SummonEssenceTimer = 20000; + AnimationTimer = 18200; + SoulDeathCount = 0; + SoulCount = 0; + SummonSoulTimer = 1000; + EndingPhase = false; + Phase = 5; + DesireGUID = 0; + }else DespawnEssenceTimer -= diff; + } + } + } + } + + if (Phase == 5) + { + if (SoulCount < 36) + { + if (SummonSoulTimer < diff) + { + SummonSoul(); + SummonSoulTimer = 500; + }else SummonSoulTimer -= diff; + } + + if (SoulDeathCount >= SoulCount) + { + if (AnimationTimer < diff) + { + // Release the cube + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE,374); + AnimationTimer = 10000; + }else AnimationTimer -= diff; + + if (SummonEssenceTimer < diff) + { + // Ribs: open + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE,373); + Creature* EssenceAnger = NULL; + EssenceAnger = m_creature->SummonCreature(23420, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 1.57, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 45000); + + if (EssenceAnger) + { + if (Unit* target = SelectUnit(SELECT_TARGET_TOPAGGRO, 0)) + { + EssenceAnger->AddThreat(target, 1.0f); + EssenceAnger->AI()->AttackStart(target); + } + + AngerGUID = EssenceAnger->GetGUID(); + DoScriptText(ANGER_SAY_FREED, EssenceAnger); + SoulDeathCount = 0; + } + + Phase = 6; + }else SummonEssenceTimer -= diff; + } + } + + if (Phase == 6) + { + if (AngerGUID) + { + Creature* EssenceAnger = NULL; + EssenceAnger = ((Creature*)Unit::GetUnit((*m_creature), AngerGUID)); + + if (!EssenceAnger) + EnterEvadeMode(); + + if (m_creature->isAlive() && EssenceAnger) + { + if (!EssenceAnger->isAlive()) + { + AngerGUID = 0; + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + } + } + } + } +}; + +struct MANGOS_DLL_DECL boss_essence_of_sufferingAI : public ScriptedAI +{ + boss_essence_of_sufferingAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint64 StatAuraGUID; + + uint32 AggroYellTimer; + uint32 FixateTimer; + uint32 EnrageTimer; + uint32 SoulDrainTimer; + + void Reset() + { + StatAuraGUID = 0; + + AggroYellTimer = 5000; + FixateTimer = 5000; + EnrageTimer = 30000; + SoulDrainTimer = 150000; + } + + void DamageTaken(Unit *done_by, uint32 &damage) + { + if ((damage >= m_creature->GetHealth()) && (done_by != m_creature)) + { + damage = 0; + // 10% of total health, signalling time to return + m_creature->SetHealth(m_creature->GetMaxHealth()/10); + if (StatAuraGUID) + { + Unit* pUnit = Unit::GetUnit((*m_creature), StatAuraGUID); + if (pUnit) + pUnit->RemoveAurasDueToSpell(AURA_OF_SUFFERING_ARMOR); + } + } + } + + void Aggro(Unit* pWho) + { + m_creature->SetInCombatWithZone(); + DoCast(pWho, AURA_OF_SUFFERING, true); + DoCast(m_creature, ESSENCE_OF_SUFFERING_PASSIVE, true); + } + + void KilledUnit(Unit *victim) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SUFF_SAY_SLAY1, m_creature); break; + case 1: DoScriptText(SUFF_SAY_SLAY2, m_creature); break; + case 2: DoScriptText(SUFF_SAY_SLAY3, m_creature); break; + } + } + + void JustDied(Unit* killer) + { + } + + void CastFixate() + { + std::list& m_threatlist = m_creature->getThreatManager().getThreatList(); + if (m_threatlist.empty()) + return; // No point continuing if empty threatlist. + + std::list targets; + std::list::iterator itr = m_threatlist.begin(); + for(; itr != m_threatlist.end(); ++itr) + { + Unit* pUnit = Unit::GetUnit((*m_creature), (*itr)->getUnitGuid()); + // Only alive players + if (pUnit && pUnit->isAlive() && (pUnit->GetTypeId() == TYPEID_PLAYER)) + targets.push_back(pUnit); + } + + if (targets.empty()) + return; // No targets added for some reason. No point continuing. + + targets.sort(ObjectDistanceOrder(m_creature)); // Sort players by distance. + targets.resize(1); // Only need closest target. + Unit* target = targets.front(); // Get the first target. + + // Add threat equivalent to threat on victim. + m_creature->AddThreat(target, m_creature->getThreatManager().getThreat(m_creature->getVictim())); + DoCast(target, SPELL_FIXATE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_creature->GetHealth() <= (m_creature->GetMaxHealth()*0.1)) + { + if (StatAuraGUID) + { + Unit* pUnit = NULL; + pUnit = Unit::GetUnit((*m_creature), StatAuraGUID); + if (pUnit) + pUnit->RemoveAurasDueToSpell(AURA_OF_SUFFERING_ARMOR); + } + } + + if (m_creature->GetHealth() <= (m_creature->GetMaxHealth()*0.1)) + { + if (m_creature->getVictim()) + m_creature->DeleteThreatList(); // Delete our threatlist if below 10% as we should no longer attack. + return; + } + + // Prevent overlapping yells + if (AggroYellTimer) + { + if (AggroYellTimer <= diff) + { + DoScriptText(SUFF_SAY_AGGRO, m_creature); + AggroYellTimer = 0; + }else AggroYellTimer -= diff; + } + + //Supposed to be cast on nearest target + if (FixateTimer < diff) + { + CastFixate(); + FixateTimer = 5000; + }else FixateTimer -= diff; + + if (EnrageTimer < diff) + { + DoCast(m_creature, SPELL_ENRAGE); + DoScriptText(SUFF_EMOTE_ENRAGE, m_creature); + EnrageTimer = 60000; + }else EnrageTimer -= diff; + + if (SoulDrainTimer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(target, SPELL_SOUL_DRAIN); + SoulDrainTimer = 60000; + }else SoulDrainTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; +struct MANGOS_DLL_DECL boss_essence_of_desireAI : public ScriptedAI +{ + boss_essence_of_desireAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 AggroYellTimer; + uint32 RuneShieldTimer; + uint32 DeadenTimer; + uint32 SoulShockTimer; + + void Reset() + { + AggroYellTimer = 5000; + RuneShieldTimer = 60000; + DeadenTimer = 15000; + SoulShockTimer = 40000; + } + + void DamageTaken(Unit *done_by, uint32 &damage) + { + if ((damage >= m_creature->GetHealth()) && (done_by != m_creature)) + { + damage = 0; + // 10% of total health, signalling time to return + m_creature->SetHealth(m_creature->GetMaxHealth()/10); + } + else + { + if (done_by && (done_by->GetTypeId() == TYPEID_PLAYER) && done_by->isAlive()) + done_by->DealDamage(done_by, damage/2, NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + } + + void Aggro(Unit* pWho) + { + m_creature->SetInCombatWithZone(); + } + + void KilledUnit(Unit *victim) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(DESI_SAY_SLAY1, m_creature); break; + case 1: DoScriptText(DESI_SAY_SLAY2, m_creature); break; + case 2: DoScriptText(DESI_SAY_SLAY3, m_creature); break; + } + } + + void MoveInLineOfSight(Unit *who) + { + if (!who || m_creature->getVictim()) + return; + + if (who->isTargetableForAttack() && who->isInAccessablePlaceFor(m_creature) && m_creature->IsHostileTo(who)) + { + float attackRadius = m_creature->GetAttackDistance(who); + if (m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->GetDistanceZ(who) <= CREATURE_Z_ATTACK_RANGE && m_creature->IsWithinLOSInMap(who)) + { + if (!m_creature->isInCombat()) + { + DoCast(who, AURA_OF_DESIRE); + } + + who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); + AttackStart(who); + } + } + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_creature->GetHealth() <= (m_creature->GetMaxHealth()*0.1)) + { + if (m_creature->getVictim()) + m_creature->DeleteThreatList(); // Delete our threatlist if below 10% as we should no longer attack. + return; + } + + if (RuneShieldTimer < diff) + { + DoCast(m_creature, SPELL_RUNE_SHIELD); + RuneShieldTimer = 60000; + }else RuneShieldTimer -= diff; + + if (DeadenTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_DEADEN); + DeadenTimer = urand(30000, 60000); + }else DeadenTimer -= diff; + + if (SoulShockTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_SOUL_SHOCK); + SoulShockTimer = 40000; + + if (urand(0, 1)) + DoScriptText(DESI_SAY_SPEC, m_creature); + + }else SoulShockTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +struct MANGOS_DLL_DECL boss_essence_of_angerAI : public ScriptedAI +{ + boss_essence_of_angerAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint64 AggroTargetGUID; + + uint32 AggroYellTimer; + uint32 CheckTankTimer; + uint32 SoulScreamTimer; + uint32 SpiteTimer; + + bool CheckedAggro; + + void Reset() + { + AggroTargetGUID = 0; + + AggroYellTimer = 5000; + CheckTankTimer = 5000; + SoulScreamTimer = 10000; + SpiteTimer = 30000; + + CheckedAggro = false; + } + + void Aggro(Unit* pWho) + { + m_creature->SetInCombatWithZone(); + DoCast(m_creature->getVictim(), AURA_OF_ANGER, true); + } + + void MoveInLineOfSight(Unit *who) + { + if (!who || m_creature->getVictim()) + return; + + if (who->isTargetableForAttack() && who->isInAccessablePlaceFor(m_creature) && m_creature->IsHostileTo(who)) + { + float attackRadius = m_creature->GetAttackDistance(who); + if (m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->GetDistanceZ(who) <= CREATURE_Z_ATTACK_RANGE && m_creature->IsWithinLOSInMap(who)) + { + if (!m_creature->isInCombat()) + { + DoCast(who, AURA_OF_ANGER); + } + + who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); + AttackStart(who); + } + } + } + + void JustDied(Unit *victim) + { + DoScriptText(ANGER_SAY_DEATH, m_creature); + } + + void KilledUnit(Unit *victim) + { + DoScriptText(urand(0, 1) ? ANGER_SAY_SLAY1 : ANGER_SAY_SLAY2, m_creature); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (!CheckedAggro) + { + AggroTargetGUID = m_creature->getVictim()->GetGUID(); + CheckedAggro = true; + } + + if (AggroYellTimer) + { + if (AggroYellTimer <= diff) + { + DoScriptText(ANGER_SAY_FREED2, m_creature); + AggroYellTimer = 0; + }else AggroYellTimer -= diff; + } + + if (CheckTankTimer < diff) + { + if (m_creature->getVictim()->GetGUID() != AggroTargetGUID) + { + DoScriptText(ANGER_SAY_BEFORE, m_creature); + DoCast(m_creature, SPELL_SELF_SEETHE); + DoCast(m_creature->getVictim(), SPELL_ENEMY_SEETHE, true); + AggroTargetGUID = m_creature->getVictim()->GetGUID(); + } + CheckTankTimer = 2000; + }else CheckTankTimer -= diff; + + if (SoulScreamTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_SOUL_SCREAM); + SoulScreamTimer = 10000; + }else SoulScreamTimer -= diff; + + if (SpiteTimer < diff) + { + for(uint8 i = 0; i < 4; ++i) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(target, SPELL_SPITE); + } + + SpiteTimer = 30000; + DoScriptText(ANGER_SAY_SPEC, m_creature); + }else SpiteTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +void npc_enslaved_soulAI::JustDied(Unit *killer) +{ + if (ReliquaryGUID) + { + Creature* Reliquary = ((Creature*)Unit::GetUnit((*m_creature), ReliquaryGUID)); + if (Reliquary) + ((boss_reliquary_of_soulsAI*)Reliquary->AI())->SoulDeathCount++; + } +} + +CreatureAI* GetAI_boss_reliquary_of_souls(Creature* pCreature) +{ + return new boss_reliquary_of_soulsAI(pCreature); +} + +CreatureAI* GetAI_boss_essence_of_suffering(Creature* pCreature) +{ + return new boss_essence_of_sufferingAI(pCreature); +} + +CreatureAI* GetAI_boss_essence_of_desire(Creature* pCreature) +{ + return new boss_essence_of_desireAI(pCreature); +} + +CreatureAI* GetAI_boss_essence_of_anger(Creature* pCreature) +{ + return new boss_essence_of_angerAI(pCreature); +} + +CreatureAI* GetAI_npc_enslaved_soul(Creature* pCreature) +{ + return new npc_enslaved_soulAI(pCreature); +} + +void AddSC_boss_reliquary_of_souls() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_reliquary_of_souls"; + newscript->GetAI = &GetAI_boss_reliquary_of_souls; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_essence_of_suffering"; + newscript->GetAI = &GetAI_boss_essence_of_suffering; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_essence_of_desire"; + newscript->GetAI = &GetAI_boss_essence_of_desire; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_essence_of_anger"; + newscript->GetAI = &GetAI_boss_essence_of_anger; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_enslaved_soul"; + newscript->GetAI = &GetAI_npc_enslaved_soul; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/black_temple/boss_shade_of_akama.cpp b/scripts/outland/black_temple/boss_shade_of_akama.cpp new file mode 100644 index 000000000..ff1d3ef9d --- /dev/null +++ b/scripts/outland/black_temple/boss_shade_of_akama.cpp @@ -0,0 +1,895 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Shade_of_Akama +SD%Complete: 85 +SDComment: Seems to be complete. Some little details/cosmetics left (see next comment section). +SDCategory: Black Temple +EndScriptData */ + +/* ToDo: +(1) After start event Akama should walk a bit towards Shade of Akama, then stop (between the two pillars) and begin to channel. +(2) Some minor changes to post event (after killing Shade of Akama): +(2.1) After Shade of Akama is dead Akama should roar in direction to the door (he must turn around if he reached the stage). +(2.2) Positioning of broken NPCs. +(3) The channelers are casting their spell somestimes even if they are daed (move out of view distance and then move in - they are dead but they channel - maybe some clientspecific issue?). +(4) Unbanish Shade of Akama if a ashtongue sorcerer is spawned but not reached Shade of Akama and channels his spell? +*/ + +#include "precompiled.h" +#include "black_temple.h" + +#define GOSSIP_ITEM "We are ready to fight alongside you, Akama" + +// Spells +enum +{ + SAY_DEATH = -1564013, + SAY_LOW_HEALTH = -1564014, + // Ending cinematic text + SAY_FREE = -1564015, + SAY_BROKEN_FREE_01 = -1564016, + SAY_BROKEN_FREE_02 = -1564017, + + SPELL_VERTEX_SHADE_BLACK = 39833, + SPELL_SHADE_SOUL_CHANNEL = 40401, + SPELL_DESTRUCTIVE_POISON = 40874, + SPELL_LIGHTNING_BOLT = 42024, + SPELL_AKAMA_SOUL_CHANNEL = 40447, + SPELL_AKAMA_SOUL_RETRIEVE = 40902, + + NPC_AKAMA = 22990, + NPC_ASH_CHANNELER = 23421, + NPC_ASH_SORCERER = 23215, + NPC_ASH_DEFENDER = 23216, + NPC_ASH_BROKEN = 23319, + NPC_ASH_ELEMENTAL = 23523, + NPC_ASH_ROGUE = 23318, + NPC_ASH_SPIRITBIND = 23524, + + //akama's phases (used as point id's) + //PHASE_CHANNEL = 1, + //PHASE_BELOW_PLATFORM = 2, + //PHASE_ON_PLATFORM = 3 +}; + +const uint32 m_auiRandSpawnEntry[]= +{ + NPC_ASH_ELEMENTAL, + NPC_ASH_ROGUE, + NPC_ASH_SPIRITBIND +}; + +const float LOC_RAND_TO_CENTER_X = 482.793182; +const float LOC_RAND_TO_CENTER_Y = 401.270172; +const float LOC_RAND_TO_CENTER_Z = 112.783928; + +const float LOC_PLATFORM_Z = 118.537; +const float LOC_LOW_Z = 112.784; + +struct Location +{ + float m_fX, m_fY, m_fZ, m_fO; +}; + +Location m_afSpawnLoc[]= +{ + {498.652740, 461.728119, LOC_LOW_Z, 0.0}, + {498.505003, 339.619324, LOC_LOW_Z, 0.0} +}; + +Location m_afAkamaWP[]= +{ + //{516.885193, 400.836060, LOC_LOW_Z_SPAWN, 0.0}, //not used yet, he moves to here before start channel + {482.352448, 401.162720, LOC_LOW_Z, 0.0}, + {469.597443, 402.264404, LOC_PLATFORM_Z, 0.0} +}; + +Location m_afBrokenSpawnLoc[]= +{ + {541.375916, 401.439575, LOC_LOW_Z, M_PI}, // The place where Akama channels + {534.130005, 352.394531, LOC_LOW_Z, 2.164150}, // Behind a 'pillar' which is behind the east alcove + {499.621185, 341.534729, LOC_LOW_Z, 1.652856}, // East Alcove + {499.151093, 461.036438, LOC_LOW_Z, 4.770888} // West Alcove +}; + +Location m_afBrokenWP[]= +{ + {492.491638, 400.744690, LOC_LOW_Z, 3.122336}, + {494.335724, 382.221771, LOC_LOW_Z, 2.676230}, + {489.555939, 373.507202, LOC_LOW_Z, 2.416263}, + {491.136353, 427.868774, LOC_LOW_Z, 3.519748} +}; + +struct MANGOS_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI +{ + boss_shade_of_akamaAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_lChannelersGUIDList.clear(); + m_lSorcerersGUIDList.clear(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + std::list m_lChannelersGUIDList; + std::list m_lSorcerersGUIDList; + + uint64 m_uiAkamaGUID; + + uint32 m_uiSorcererCount; + uint32 m_uiDeathCount; + + uint32 m_uiReduceHealthTimer; + uint32 m_uiSummonTimer; + uint32 m_uiResetTimer; + uint32 m_uiDefenderTimer; // They are on a flat 15 second timer, independant of the other summon creature timer. + + bool m_bIsBanished; + bool m_bHasKilledAkama; + + void Reset() + { + m_uiSorcererCount = 0; + m_uiDeathCount = 0; + + m_uiSummonTimer = 10000; + m_uiReduceHealthTimer = 0; + m_uiResetTimer = 60000; + m_uiDefenderTimer = 15000; + + m_bIsBanished = true; + m_bHasKilledAkama = false; + + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_STUN); + } + + void AttackStart(Unit* pWho) + { + if (!pWho || m_bIsBanished) + return; + + ScriptedAI::AttackStart(pWho); + } + + void MoveInLineOfSight(Unit* pWho) + { + if (m_bIsBanished) + return; + + ScriptedAI::MoveInLineOfSight(pWho); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_SHADE, NOT_STARTED); + + RespawnChannelersIfDeadOrEvade(); + } + + void IncrementDeathCount(uint64 uiGuid = 0) // If guid is set, will remove it from list of sorcerer + { + debug_log("SD2: Increasing Death Count for Shade of Akama encounter"); + ++m_uiDeathCount; + + if (uiGuid) + { + if (m_lSorcerersGUIDList.empty()) + error_log("SD2: boss_shade_of_akamaAI attempt to remove guid %u from Sorcerers list but list is already empty", uiGuid); + else + m_lSorcerersGUIDList.remove(uiGuid); + } + } + + void SummonCreature() + { + uint32 uiRand = sizeof(m_afSpawnLoc)/sizeof(Location); + + // max of 6 sorcerers can be summoned + if (!urand(0, 2) && (m_uiDeathCount > 0) && (m_uiSorcererCount < 7)) + { + if (Creature* pSorcerer = m_creature->SummonCreature(NPC_ASH_SORCERER, + m_afSpawnLoc[uiRand].m_fX, m_afSpawnLoc[uiRand].m_fY, m_afSpawnLoc[uiRand].m_fZ, m_afSpawnLoc[uiRand].m_fO, + TEMPSUMMON_DEAD_DESPAWN, 0)) + { + pSorcerer->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + pSorcerer->GetMotionMaster()->MovePoint(0, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); + pSorcerer->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->GetGUID()); + + m_lSorcerersGUIDList.push_back(pSorcerer->GetGUID()); + + --m_uiDeathCount; + ++m_uiSorcererCount; + } + } + else + { + int iSize = (sizeof(m_auiRandSpawnEntry) / sizeof(uint32)); + + for(uint8 i = 0; i < iSize; ++i) + { + if (Creature* pSpawn = m_creature->SummonCreature(m_auiRandSpawnEntry[i], + m_afSpawnLoc[uiRand].m_fX, m_afSpawnLoc[uiRand].m_fY, m_afSpawnLoc[uiRand].m_fZ, m_afSpawnLoc[uiRand].m_fO, + TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 25000)) + { + pSpawn->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + pSpawn->GetMotionMaster()->MovePoint(0, LOC_RAND_TO_CENTER_X, LOC_RAND_TO_CENTER_Y, LOC_RAND_TO_CENTER_Z); + } + } + } + } + + void DespawnSorceres() + { + if (!m_lSorcerersGUIDList.empty() && m_pInstance) + { + for(std::list::iterator itr = m_lSorcerersGUIDList.begin(); itr != m_lSorcerersGUIDList.end(); ++itr) + { + if (Creature* pSorcerer = m_pInstance->instance->GetCreature(*itr)) + { + if (pSorcerer->isAlive()) + pSorcerer->ForcedDespawn(); + } + } + } + } + + void RespawnChannelersIfDeadOrEvade() + { + if (!m_lChannelersGUIDList.empty() && m_pInstance) + { + for(std::list::iterator itr = m_lChannelersGUIDList.begin(); itr != m_lChannelersGUIDList.end(); ++itr) + { + if (Creature* pChanneler = m_pInstance->instance->GetCreature(*itr)) + { + if (!pChanneler->isAlive()) + pChanneler->Respawn(); + else + pChanneler->AI()->EnterEvadeMode(); + } + } + } + else + error_log("SD2: boss_shade_of_akamaAI not able to respawn channelers, list is empty."); + } + + void PrepareChannelers() + { + std::list lChannelerList; + GetCreatureListWithEntryInGrid(lChannelerList,m_creature, NPC_ASH_CHANNELER, 50.0f); + + if (!lChannelerList.empty()) + { + //clear this, we want a clean start + m_lChannelersGUIDList.clear(); + + for(std::list::iterator itr = lChannelerList.begin(); itr != lChannelerList.end(); ++itr) + { + m_lChannelersGUIDList.push_back((*itr)->GetGUID()); + debug_log("SD2: boss_shade_of_akamaAI found channeler %u. Adding to list", (*itr)->GetGUID()); + + (*itr)->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } + } + else + error_log("SD2: boss_shade_of_akamaAI unable to find any channelers."); + } + + void KilledUnit(Unit* pVictim) + { + if (pVictim->GetEntry() == NPC_AKAMA) + EnterEvadeMode(); + } + + void JustDied(Unit* pKiller) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_SHADE, DONE); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->isInCombat()) + return; + + if (m_bIsBanished) + { + // Akama is set in the threatlist so when we reset, we make sure that he is not included in our check + if (m_creature->getThreatManager().getThreatList().size() < 2) + ScriptedAI::EnterEvadeMode(); + + if (m_uiDefenderTimer < uiDiff) + { + uint32 uiRand = sizeof(m_afSpawnLoc)/sizeof(Location); + + if (Creature* pDefender = m_creature->SummonCreature(NPC_ASH_DEFENDER, + m_afSpawnLoc[uiRand].m_fX, m_afSpawnLoc[uiRand].m_fY, m_afSpawnLoc[uiRand].m_fZ, m_afSpawnLoc[uiRand].m_fO, + TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 25000)) + { + if (Unit* pAkama = Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_AKAMA_SHADE))) + pDefender->AI()->AttackStart(pAkama); + } + + m_uiDefenderTimer = 15000; + } + else + m_uiDefenderTimer -= uiDiff; + + if (m_uiSummonTimer < uiDiff) + { + SummonCreature(); + m_uiSummonTimer = 35000; + } + else + m_uiSummonTimer -= uiDiff; + + if (m_uiDeathCount >= 6) + { + if (Unit* pAkama = Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_AKAMA_SHADE))) + { + if (pAkama && pAkama->isAlive()) + { + m_bIsBanished = false; + + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + // Shade should move to Akama, not the other way around + AttackStart(pAkama); + + // Crazy amount of threat + m_creature->AddThreat(pAkama, 10000000.0f); + pAkama->AddThreat(m_creature, 10000000.0f); + } + } + } + } + else // No longer banished, let's fight Akama now + { + if (m_uiReduceHealthTimer < uiDiff) + { + if (Unit* pAkama = Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_AKAMA_SHADE))) + { + if (pAkama->isAlive()) + { + // 10 % less health every few seconds. + m_creature->DealDamage(pAkama, pAkama->GetMaxHealth()/10, NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + m_uiReduceHealthTimer = 12000; + } + else + { + m_bHasKilledAkama = true; // Akama is dead, we stop fighting and disappear + EnterEvadeMode(); + return; + } + } + } + else + m_uiReduceHealthTimer -= uiDiff; + + if (m_bHasKilledAkama) + { + if (m_uiResetTimer < uiDiff) + { + EnterEvadeMode(); // Reset a little while after killing Akama + return; + } + else + m_uiResetTimer -= uiDiff; + } + + DoMeleeAttackIfReady(); + } + } +}; + +struct MANGOS_DLL_DECL npc_akamaAI : public ScriptedAI +{ + npc_akamaAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_bIsShadeDead = false; + m_bCanStartCombat = false; + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 m_uiDestructivePoisonTimer; + uint32 m_uiLightningBoltTimer; + uint32 m_uiCheckTimer; + uint32 m_uiCastSoulRetrieveTimer; + uint32 m_uiSoulRetrieveTimer; + uint32 m_uiSummonBrokenTimer; + uint32 m_uiEndingTalkCount; + uint32 m_uiWayPointId; + uint32 m_uiBrokenSummonIndex; + + std::list m_lBrokenGUIDList; + + bool m_bIsEventBegun; + bool m_bIsShadeDead; + bool m_bCanStartCombat; + bool m_bHasYelledOnce; + + void Reset() + { + SetCombatMovement(false); + + m_uiDestructivePoisonTimer = 15000; + m_uiLightningBoltTimer = 10000; + m_uiCheckTimer = 2000; + m_uiCastSoulRetrieveTimer = 0; + m_uiSoulRetrieveTimer = 0; + m_uiSummonBrokenTimer = 0; + m_uiEndingTalkCount = 0; + m_uiWayPointId = 0; + m_uiBrokenSummonIndex = 0; + + m_lBrokenGUIDList.clear(); + + m_bIsEventBegun = false; + m_bHasYelledOnce = false; + + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + } + + void BeginEvent() + { + if (!m_pInstance) + return; + + if (Creature* pShade = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_SHADEOFAKAMA))) + { + if (boss_shade_of_akamaAI* pShadeAI = dynamic_cast(pShade->AI())) + pShadeAI->PrepareChannelers(); + + // Prevent players from trying to restart event + m_pInstance->SetData(TYPE_SHADE, IN_PROGRESS); + + m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + + pShade->AddThreat(m_creature, 1000000.0f); + pShade->SetInCombatWith(m_creature); + m_creature->SetInCombatWith(pShade); + + pShade->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE); + pShade->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->GetGUID()); + + pShade->SetInCombatWithZone(); + + m_bIsEventBegun = true; + } + } + + void MovementInform(uint32 uiMoveType, uint32 uiPointId) + { + if (uiMoveType != POINT_MOTION_TYPE || !m_pInstance) + return; + + switch(uiPointId) + { + case 0: + ++m_uiWayPointId; + break; + case 1: + if (Unit* pShade = Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_SHADEOFAKAMA))) + { + DoCast(pShade, SPELL_AKAMA_SOUL_RETRIEVE); + m_uiEndingTalkCount = 0; + m_uiSoulRetrieveTimer = 16000; + } + break; + } + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_bIsEventBegun || !m_pInstance) + return; + + if (!m_bCanStartCombat) + { + if (Creature* pShade = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_SHADEOFAKAMA))) + { + if (!pShade->isAlive()) + { + EnterEvadeMode(); + return; + } + + if (boss_shade_of_akamaAI* pShadeAI = dynamic_cast(pShade->AI())) + { + if (pShadeAI->m_bIsBanished) + { + if (m_uiCastSoulRetrieveTimer < uiDiff) + { + DoCast(pShade, SPELL_AKAMA_SOUL_CHANNEL); + m_uiCastSoulRetrieveTimer = 500; + } + else + m_uiCastSoulRetrieveTimer -= uiDiff; + } + else + { + m_creature->InterruptNonMeleeSpells(false); + m_bCanStartCombat = true; + } + } + } + } + + if (m_bIsShadeDead && (m_uiWayPointId == 1)) + { + m_creature->GetMotionMaster()->MovePoint(m_uiWayPointId, m_afAkamaWP[1].m_fX, m_afAkamaWP[1].m_fY, m_afAkamaWP[1].m_fZ); + ++m_uiWayPointId; + } + + if (!m_bIsShadeDead && m_bCanStartCombat) + { + if (m_uiCheckTimer < uiDiff) + { + if (Unit* pShade = Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_SHADEOFAKAMA))) + { + if (!pShade->isAlive()) + { + m_bIsShadeDead = true; + m_uiWayPointId = 0; + m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + m_creature->GetMotionMaster()->MovePoint(m_uiWayPointId, m_afAkamaWP[0].m_fX, m_afAkamaWP[0].m_fY, m_afAkamaWP[0].m_fZ); + } + } + m_uiCheckTimer = 5000; + } + else + m_uiCheckTimer -= uiDiff; + } + + if (m_uiSummonBrokenTimer && m_uiBrokenSummonIndex < 4) + { + if (m_uiSummonBrokenTimer <= uiDiff) + { + for(uint8 i = 0; i < 4; ++i) + { + float x = m_afBrokenSpawnLoc[m_uiBrokenSummonIndex].m_fX + (i*5); + float y = m_afBrokenSpawnLoc[m_uiBrokenSummonIndex].m_fY + (1*5); + float z = m_afBrokenSpawnLoc[m_uiBrokenSummonIndex].m_fZ; + float o = m_afBrokenSpawnLoc[m_uiBrokenSummonIndex].m_fO; + + if (Creature* pBroken = m_creature->SummonCreature(NPC_ASH_BROKEN, x, y, z, o, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 360000)) + { + float wx = m_afBrokenWP[m_uiBrokenSummonIndex].m_fX + (i*5); + float wy = m_afBrokenWP[m_uiBrokenSummonIndex].m_fY + (i*5); + float wz = m_afBrokenWP[m_uiBrokenSummonIndex].m_fZ; + + pBroken->GetMotionMaster()->MovePoint(0, wx, wy, wz); + pBroken->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + + m_lBrokenGUIDList.push_back(pBroken->GetGUID()); + } + } + + ++m_uiBrokenSummonIndex; + m_uiSummonBrokenTimer = 1000; + } + else + m_uiSummonBrokenTimer -= uiDiff; + } + + if (m_uiSoulRetrieveTimer) + { + if (m_uiSoulRetrieveTimer <= uiDiff) + { + switch(m_uiEndingTalkCount) + { + case 0: + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_ROAR); + ++m_uiEndingTalkCount; + m_uiSoulRetrieveTimer = 2000; + m_uiSummonBrokenTimer = 1; + break; + case 1: + DoScriptText(SAY_FREE, m_creature); + ++m_uiEndingTalkCount; + m_uiSoulRetrieveTimer = 25000; + break; + case 2: + if (!m_lBrokenGUIDList.empty()) + { + bool bYelled = false; + + for(std::list::iterator itr = m_lBrokenGUIDList.begin(); itr != m_lBrokenGUIDList.end(); ++itr) + { + if (Unit* pUnit = Unit::GetUnit(*m_creature, *itr)) + { + if (!bYelled) + { + DoScriptText(SAY_BROKEN_FREE_01, pUnit); + bYelled = true; + } + pUnit->HandleEmoteCommand(EMOTE_ONESHOT_KNEEL); + } + } + } + ++m_uiEndingTalkCount; + m_uiSoulRetrieveTimer = 1500; + break; + case 3: + if (!m_lBrokenGUIDList.empty()) + { + for(std::list::iterator itr = m_lBrokenGUIDList.begin(); itr != m_lBrokenGUIDList.end(); ++itr) + { + // This is the incorrect spell, but can't seem to find the right one. + if (Unit* pUnit = Unit::GetUnit(*m_creature, *itr)) + pUnit->CastSpell(pUnit, 39656, true); + } + } + ++m_uiEndingTalkCount; + m_uiSoulRetrieveTimer = 5000; + break; + case 4: + if (!m_lBrokenGUIDList.empty()) + { + for(std::list::iterator itr = m_lBrokenGUIDList.begin(); itr != m_lBrokenGUIDList.end(); ++itr) + { + if (Unit* pUnit = Unit::GetUnit((*m_creature), *itr)) + DoScriptText(SAY_BROKEN_FREE_02, pUnit); + } + } + m_uiSoulRetrieveTimer = 0; + break; + } + } + else + m_uiSoulRetrieveTimer -= uiDiff; + } + + if (!m_creature->getVictim() || !m_creature->SelectHostileTarget()) + return; + + if (!m_bHasYelledOnce && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 15) + { + DoScriptText(SAY_LOW_HEALTH, m_creature); + m_bHasYelledOnce = true; + } + + if (m_uiDestructivePoisonTimer < uiDiff) + { + if (Unit* pShade = Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_SHADEOFAKAMA))) + { + if (pShade->isAlive()) + DoCast(pShade, SPELL_DESTRUCTIVE_POISON); + } + + m_uiDestructivePoisonTimer = 15000; + } + else + m_uiDestructivePoisonTimer -= uiDiff; + + if (m_uiLightningBoltTimer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_LIGHTNING_BOLT); + m_uiLightningBoltTimer = 10000; + } + else + m_uiLightningBoltTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +bool GossipHello_npc_akama(Player* pPlayer, Creature* pCreature) +{ + if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) + { + if (pInstance->GetData(TYPE_SHADE) != DONE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + } + + pPlayer->SEND_GOSSIP_MENU(907, pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_akama(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) //Fight time + { + pPlayer->CLOSE_GOSSIP_MENU(); + + if (npc_akamaAI* pAkamaAI = dynamic_cast(pCreature->AI())) + pAkamaAI->BeginEvent(); + } + + return true; +} + +struct MANGOS_DLL_DECL mob_ashtongue_channelerAI : public ScriptedAI +{ + mob_ashtongue_channelerAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + void Reset() + { + if (m_pInstance) + { + //self-resurrect if encounter not done and we are dead + if (!m_creature->isAlive() && m_pInstance->GetData(TYPE_SHADE) != DONE) + m_creature->Respawn(); + + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } + } + + void AttackStart(Unit* pWho) {} + void MoveInLineOfSight(Unit* pWho) {} + + void JustDied(Unit* pKiller) + { + if (!m_pInstance) + return; + + if (Creature* pShade = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_SHADEOFAKAMA))) + { + if (pShade->isAlive()) + { + if (boss_shade_of_akamaAI* pShadeAI = dynamic_cast(pShade->AI())) + pShadeAI->IncrementDeathCount(); + else + error_log("SD2: mob_ashtongue_channelerAI dead but unable to increment DeathCount for Shade of Akama."); + } + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->isAlive()) + return; + + //start channel (not nice way to start channeling) + if (!m_creature->IsNonMeleeSpellCasted(false) && !m_creature->getVictim() && m_pInstance) + { + if (Creature* pShade = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_SHADEOFAKAMA))) + m_creature->CastSpell(pShade, SPELL_SHADE_SOUL_CHANNEL, false); + } + } +}; + +struct MANGOS_DLL_DECL mob_ashtongue_sorcererAI : public ScriptedAI +{ + mob_ashtongue_sorcererAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 m_uiCheckTimer; + bool m_bStartBanishing; + + void Reset() + { + m_uiCheckTimer = 5000; + m_bStartBanishing = false; + } + + void AttackStart(Unit* pWho) {} + void MoveInLineOfSight(Unit* pWho) {} + + void JustDied(Unit* pKiller) + { + if (!m_pInstance) + return; + + if (Creature* pShade = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_SHADEOFAKAMA))) + { + if (pShade->isAlive()) + { + if (boss_shade_of_akamaAI* pShadeAI = dynamic_cast(pShade->AI())) + pShadeAI->IncrementDeathCount(m_creature->GetGUID()); + else + error_log("SD2: mob_ashtongue_sorcererAI dead but unable to increment DeathCount for Shade of Akama."); + } + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_bStartBanishing || !m_pInstance) + return; + + if (m_uiCheckTimer < uiDiff) + { + Unit* pShade = Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_SHADEOFAKAMA)); + + if (pShade && pShade->isAlive() && m_creature->isAlive()) + { + if (m_creature->IsWithinDist(pShade, 20.0f, false)) + { + m_creature->GetMotionMaster()->Clear(false); + m_creature->GetMotionMaster()->MoveIdle(); + + DoCast(pShade, SPELL_SHADE_SOUL_CHANNEL, true); + + m_bStartBanishing = true; + } + } + m_uiCheckTimer = 2000; + } + else + m_uiCheckTimer -= uiDiff; + } +}; + +CreatureAI* GetAI_boss_shade_of_akama(Creature* pCreature) +{ + return new boss_shade_of_akamaAI(pCreature); +} + +CreatureAI* GetAI_npc_akama_shade(Creature* pCreature) +{ + return new npc_akamaAI(pCreature); +} + +CreatureAI* GetAI_mob_ashtongue_channeler(Creature* pCreature) +{ + return new mob_ashtongue_channelerAI(pCreature); +} + +CreatureAI* GetAI_mob_ashtongue_sorcerer(Creature* pCreature) +{ + return new mob_ashtongue_sorcererAI(pCreature); +} + +void AddSC_boss_shade_of_akama() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_shade_of_akama"; + newscript->GetAI = &GetAI_boss_shade_of_akama; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_akama_shade"; + newscript->GetAI = &GetAI_npc_akama_shade; + newscript->pGossipHello = &GossipHello_npc_akama; + newscript->pGossipSelect = &GossipSelect_npc_akama; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_ashtongue_channeler"; + newscript->GetAI = &GetAI_mob_ashtongue_channeler; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_ashtongue_sorcerer"; + newscript->GetAI = &GetAI_mob_ashtongue_sorcerer; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/black_temple/boss_supremus.cpp b/scripts/outland/black_temple/boss_supremus.cpp new file mode 100644 index 000000000..ce5bdad21 --- /dev/null +++ b/scripts/outland/black_temple/boss_supremus.cpp @@ -0,0 +1,395 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Supremus +SD%Complete: 95 +SDComment: Need to implement molten punch +SDCategory: Black Temple +EndScriptData */ + +#include "precompiled.h" +#include "black_temple.h" + +#define EMOTE_NEW_TARGET -1564010 +#define EMOTE_PUNCH_GROUND -1564011 //DoScriptText(EMOTE_PUNCH_GROUND, m_creature); +#define EMOTE_GROUND_CRACK -1564012 + +//Spells +#define SPELL_HURTFUL_STRIKE 41926 +#define SPELL_DEMON_FIRE 40029 +#define SPELL_MOLTEN_FLAME 40253 +#define SPELL_VOLCANIC_ERUPTION 40276 +#define SPELL_VOLCANIC_FIREBALL 40118 +#define SPELL_VOLCANIC_GEYSER 42055 +#define SPELL_MOLTEN_PUNCH 40126 +#define SPELL_BERSERK 45078 + +#define CREATURE_VOLCANO 23085 +#define CREATURE_STALKER 23095 + +struct MANGOS_DLL_DECL molten_flameAI : public ScriptedAI +{ + molten_flameAI(Creature* pCreature) : ScriptedAI(pCreature) + { + Reset(); + } + + uint64 SupremusGUID; + bool TargetLocked; + uint32 CheckTimer; + + void Reset() + { + SupremusGUID = 0; + TargetLocked = false; + + CheckTimer = 1000; + } + + void AttackStart(Unit* who) {} + void MoveInLineOfSight(Unit *who) + { + if (TargetLocked) + return; + + // stop it from aggroing players who move in LOS if we have a target. + if (who && (who != m_creature) && (m_creature->IsWithinDistInMap(who, 10))) + StalkTarget(who); + } + + void SetSupremusGUID(uint64 GUID) { SupremusGUID = GUID; } + + void StalkTarget(Unit* target) + { + if (!target) + return; + + m_creature->AddThreat(target, 50000000.0f); + m_creature->GetMotionMaster()->MoveChase(target); + DoCast(m_creature, SPELL_DEMON_FIRE, true); + // DoCast(m_creature, SPELL_MOLTEN_FLAME, true); // This spell damages self, so disabled for now + TargetLocked = true; + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget()) + return; + + if (m_creature->getVictim() && m_creature->isAlive()) + { + if (CheckTimer < diff) + { + if (SupremusGUID) + { + Unit* Supremus = NULL; + Supremus = Unit::GetUnit((*m_creature), SupremusGUID); + if (Supremus && (!Supremus->isAlive())) + m_creature->DealDamage(m_creature, m_creature->GetHealth(), 0, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + CheckTimer = 2000; + }else CheckTimer -= diff; + } + } +}; + +struct MANGOS_DLL_DECL npc_volcanoAI : public ScriptedAI +{ + npc_volcanoAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 CheckTimer; + uint64 SupremusGUID; + uint32 FireballTimer; + uint32 GeyserTimer; + + void Reset() + { + CheckTimer = 1000; + SupremusGUID = 0; + FireballTimer = 500; + GeyserTimer = 0; + } + + void AttackStart(Unit* who) {} + void MoveInLineOfSight(Unit* who) {} + void SetSupremusGUID(uint64 guid) { SupremusGUID = guid; } + + void UpdateAI(const uint32 diff) + { + if (CheckTimer < diff) + { + if (SupremusGUID) + { + Unit* Supremus = NULL; + Supremus = Unit::GetUnit((*m_creature), SupremusGUID); + if (Supremus && (!Supremus->isAlive())) + m_creature->DealDamage(m_creature, m_creature->GetHealth(), 0, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + CheckTimer = 2000; + }else CheckTimer -= diff; + + if (GeyserTimer < diff) + { + DoCast(m_creature, SPELL_VOLCANIC_GEYSER); + GeyserTimer = 18000; + }else GeyserTimer -= diff; + } +}; + +struct MANGOS_DLL_DECL boss_supremusAI : public ScriptedAI +{ + boss_supremusAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 SummonFlameTimer; + uint32 SwitchTargetTimer; + uint32 PhaseSwitchTimer; + uint32 SummonVolcanoTimer; + uint32 HurtfulStrikeTimer; + uint32 BerserkTimer; + + bool Phase1; + + void Reset() + { + HurtfulStrikeTimer = 5000; + SummonFlameTimer = 20000; + SwitchTargetTimer = 90000; + PhaseSwitchTimer = 60000; + SummonVolcanoTimer = 5000; + BerserkTimer = 900000; // 15 minute enrage + + Phase1 = true; + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_SUPREMUS, NOT_STARTED); + } + + void Aggro(Unit* pWho) + { + m_creature->SetInCombatWithZone(); + + if (m_pInstance) + m_pInstance->SetData(TYPE_SUPREMUS, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_SUPREMUS, DONE); + } + + float CalculateRandomCoord(float initial) + { + float coord = 0; + + switch(urand(0, 1)) + { + case 0: coord = initial + 20 + rand()%20; break; + case 1: coord = initial - 20 - rand()%20; break; + } + + return coord; + } + + Creature* SummonCreature(uint32 entry, Unit* target) + { + if (target && entry) + { + Creature* Summon = m_creature->SummonCreature(entry, CalculateRandomCoord(target->GetPositionX()), CalculateRandomCoord(target->GetPositionY()), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 20000); + if (Summon) + { + Summon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + Summon->setFaction(m_creature->getFaction()); + return Summon; + } + } + return NULL; + } + + Unit* CalculateHurtfulStrikeTarget() + { + uint32 health = 0; + Unit* target = NULL; + + std::list& m_threatlist = m_creature->getThreatManager().getThreatList(); + std::list::iterator i = m_threatlist.begin(); + for (i = m_threatlist.begin(); i!= m_threatlist.end();++i) + { + Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid()); + if (pUnit && m_creature->IsWithinDistInMap(pUnit, ATTACK_DISTANCE)) + { + if (pUnit->GetHealth() > health) + { + health = pUnit->GetHealth(); + target = pUnit; + } + } + } + + return target; + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (!m_creature->HasAura(SPELL_BERSERK, 0)) + { + if (BerserkTimer < diff) + DoCast(m_creature, SPELL_BERSERK); + else BerserkTimer -= diff; + } + + if (SummonFlameTimer < diff) + { + Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM, 1); + + if (!target) // someone is trying to solo, set target as current victim. + target = m_creature->getVictim(); + + if (target) + { + Creature* MoltenFlame = SummonCreature(CREATURE_STALKER, target); + if (MoltenFlame) + { + // Invisible model + MoltenFlame->SetDisplayId(11686); + ((molten_flameAI*)MoltenFlame->AI())->SetSupremusGUID(m_creature->GetGUID()); + ((molten_flameAI*)MoltenFlame->AI())->StalkTarget(target); + SummonFlameTimer = 20000; + } + } + }else SummonFlameTimer -= diff; + + if (Phase1) + { + if (HurtfulStrikeTimer < diff) + { + Unit* target = CalculateHurtfulStrikeTarget(); + if (target) + { + DoCast(target, SPELL_HURTFUL_STRIKE); + HurtfulStrikeTimer = 5000; + } + }else HurtfulStrikeTimer -= diff; + } + + if (!Phase1) + { + if (SwitchTargetTimer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0)) + { + DoResetThreat(); + m_creature->AddThreat(target, 5000000.0f); + DoScriptText(EMOTE_NEW_TARGET, m_creature); + SwitchTargetTimer = 10000; + } + }else SwitchTargetTimer -= diff; + + if (SummonVolcanoTimer < diff) + { + Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 1); + + if (!target) + target = m_creature->getVictim(); + + if (target) + { + Creature* Volcano = NULL; + Volcano = SummonCreature(CREATURE_VOLCANO, target); + + if (Volcano) + { + DoCast(target, SPELL_VOLCANIC_ERUPTION); + ((npc_volcanoAI*)Volcano->AI())->SetSupremusGUID(m_creature->GetGUID()); + } + + DoScriptText(EMOTE_GROUND_CRACK, m_creature); + SummonVolcanoTimer = 10000; + } + }else SummonVolcanoTimer -= diff; + } + + if (PhaseSwitchTimer < diff) + { + if (!Phase1) + { + Phase1 = true; + DoResetThreat(); + PhaseSwitchTimer = 60000; + m_creature->SetSpeed(MOVE_RUN, 1.0f); + } + else + { + Phase1 = false; + DoResetThreat(); + SwitchTargetTimer = 10000; + SummonVolcanoTimer = 2000; + PhaseSwitchTimer = 60000; + m_creature->SetSpeed(MOVE_RUN, 0.9f); + } + }else PhaseSwitchTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_supremus(Creature* pCreature) +{ + return new boss_supremusAI(pCreature); +} + +CreatureAI* GetAI_molten_flame(Creature* pCreature) +{ + return new molten_flameAI(pCreature); +} + +CreatureAI* GetAI_npc_volcano(Creature* pCreature) +{ + return new npc_volcanoAI(pCreature); +} + +void AddSC_boss_supremus() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_supremus"; + newscript->GetAI = &GetAI_boss_supremus; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "molten_flame"; + newscript->GetAI = &GetAI_molten_flame; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_volcano"; + newscript->GetAI = &GetAI_npc_volcano; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/black_temple/boss_teron_gorefiend.cpp b/scripts/outland/black_temple/boss_teron_gorefiend.cpp new file mode 100644 index 000000000..722c3811c --- /dev/null +++ b/scripts/outland/black_temple/boss_teron_gorefiend.cpp @@ -0,0 +1,513 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Teron_Gorefiend +SD%Complete: 60 +SDComment: Requires Mind Control support for Ghosts. +SDCategory: Black Temple +EndScriptData */ + +#include "precompiled.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 + +struct MANGOS_DLL_DECL mob_doom_blossomAI : public ScriptedAI +{ + mob_doom_blossomAI(Creature* pCreature) : ScriptedAI(pCreature) + { + Reset(); + } + + uint32 CheckTeronTimer; + uint32 ShadowBoltTimer; + uint64 TeronGUID; + + void Reset() + { + CheckTeronTimer = 5000; + ShadowBoltTimer = 12000; + TeronGUID = 0; + } + + void AttackStart(Unit* who) { } + void MoveInLineOfSight(Unit* who) { } + + void UpdateAI(const uint32 diff) + { + if (CheckTeronTimer < diff) + { + if (TeronGUID) + { + m_creature->SetInCombatWithZone(); + + Creature* Teron = ((Creature*)Unit::GetUnit((*m_creature), TeronGUID)); + if ((Teron) && (!Teron->isAlive() || Teron->IsInEvadeMode())) + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + else + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + + CheckTeronTimer = 5000; + }else CheckTeronTimer -= diff; + + if (!m_creature->getVictim() || !m_creature->SelectHostileTarget()) + return; + + if (ShadowBoltTimer < diff) + { + DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_SHADOWBOLT); + ShadowBoltTimer = 10000; + }else ShadowBoltTimer -= diff; + } + + void SetTeronGUID(uint64 guid){ TeronGUID = guid; } +}; + +struct MANGOS_DLL_DECL mob_shadowy_constructAI : public ScriptedAI +{ + mob_shadowy_constructAI(Creature* pCreature) : ScriptedAI(pCreature) + { + Reset(); + } + + uint64 GhostGUID; + uint64 TeronGUID; + + uint32 CheckPlayerTimer; + uint32 CheckTeronTimer; + + void Reset() + { + GhostGUID = 0; + TeronGUID = 0; + + CheckPlayerTimer = 2000; + CheckTeronTimer = 5000; + } + + void MoveInLineOfSight(Unit *who) + { + if (!who || (!who->isAlive()) || (who->GetGUID() == GhostGUID)) + return; + + ScriptedAI::MoveInLineOfSight(who); + } + +/* Comment it out for now. NOTE TO FUTURE DEV: UNCOMMENT THIS OUT ONLY AFTER MIND CONTROL IS IMPLEMENTED + void DamageTaken(Unit* done_by, uint32 &damage) + { + if (done_by->GetGUID() != GhostGUID) + damage = 0; // Only the ghost can deal damage. + } + */ + + void CheckPlayers() + { + std::list& m_threatlist = m_creature->getThreatManager().getThreatList(); + if (m_threatlist.empty()) + return; // No threat list. Don't continue. + + std::list::iterator itr = m_threatlist.begin(); + std::list targets; + for(; itr != m_threatlist.end(); ++itr) + { + Unit* pUnit = Unit::GetUnit((*m_creature), (*itr)->getUnitGuid()); + if (pUnit && pUnit->isAlive()) + targets.push_back(pUnit); + } + + targets.sort(ObjectDistanceOrder(m_creature)); + Unit* target = targets.front(); + if (target && m_creature->IsWithinDistInMap(target, m_creature->GetAttackDistance(target))) + { + DoCast(target, SPELL_ATROPHY); + m_creature->AI()->AttackStart(target); + } + } + + void UpdateAI(const uint32 diff) + { + if (CheckPlayerTimer < diff) + { + CheckPlayers(); + CheckPlayerTimer = 3000; + }else CheckPlayerTimer -= diff; + + if (CheckTeronTimer < diff) + { + Creature* Teron = ((Creature*)Unit::GetUnit((*m_creature), TeronGUID)); + if (!Teron || !Teron->isAlive() || Teron->IsInEvadeMode()) + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + + CheckTeronTimer = 5000; + }else CheckTeronTimer -= diff; + } +}; + +struct MANGOS_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI +{ + boss_teron_gorefiendAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 IncinerateTimer; + uint32 SummonDoomBlossomTimer; + uint32 EnrageTimer; + uint32 CrushingShadowsTimer; + uint32 ShadowOfDeathTimer; + uint32 SummonShadowsTimer; + uint32 RandomYellTimer; + uint32 AggroTimer; + + uint64 AggroTargetGUID; + uint64 GhostGUID; // Player that gets killed by Shadow of Death and gets turned into a ghost + + bool Intro; + + void Reset() + { + IncinerateTimer = urand(20000, 30000); + SummonDoomBlossomTimer = 12000; + EnrageTimer = 600000; + CrushingShadowsTimer = 22000; + SummonShadowsTimer = 60000; + RandomYellTimer = 50000; + + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + // Start off unattackable so that the intro is done properly + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + + AggroTimer = 20000; + AggroTargetGUID = 0; + Intro = false; + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_GOREFIEND, NOT_STARTED); + } + + void MoveInLineOfSight(Unit* pWho) + { + if (!Intro && pWho->GetTypeId() == TYPEID_PLAYER && pWho->isTargetableForAttack() && + m_creature->IsHostileTo(pWho) && pWho->isInAccessablePlaceFor(m_creature)) + { + if (m_creature->IsWithinDistInMap(pWho, VISIBLE_RANGE) && m_creature->IsWithinLOSInMap(pWho)) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_GOREFIEND, IN_PROGRESS); + + m_creature->GetMotionMaster()->Clear(false); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + DoScriptText(SAY_INTRO, m_creature); + + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_TALK); + AggroTargetGUID = pWho->GetGUID(); + Intro = true; + } + } + + ScriptedAI::MoveInLineOfSight(pWho); + } + + void KilledUnit(Unit *victim) + { + DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); + } + + void JustDied(Unit *victim) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_GOREFIEND, DONE); + + DoScriptText(SAY_DEATH, m_creature); + } + + float CalculateRandomLocation(float Loc, uint32 radius) + { + float coord = Loc; + switch(urand(0, 1)) + { + case 0: + coord += rand()%radius; + break; + case 1: + coord -= rand()%radius; + break; + } + return coord; + } + + void SetThreatList(Creature* Blossom) + { + if (!Blossom) + return; + + std::list& m_threatlist = m_creature->getThreatManager().getThreatList(); + std::list::iterator i = m_threatlist.begin(); + for(i = m_threatlist.begin(); i != m_threatlist.end(); ++i) + { + Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid()); + if (pUnit && pUnit->isAlive()) + { + float threat = m_creature->getThreatManager().getThreat(pUnit); + Blossom->AddThreat(pUnit, threat); + } + } + } + + void MindControlGhost() + { + /************************************************************************/ + /** NOTE FOR FUTURE DEVELOPER: PROPERLY IMPLEMENT THE GHOST PORTION *****/ + /** ONLY AFTER MaNGOS FULLY IMPLEMENTS MIND CONTROL ABILITIES *****/ + /** THE CURRENT CODE IN THIS FUNCTION IS ONLY THE BEGINNING OF *****/ + /** WHAT IS FULLY NECESSARY FOR GOREFIEND TO BE 100% COMPLETE *****/ + /************************************************************************/ + + Unit* Ghost = NULL; + if (GhostGUID) + Ghost = Unit::GetUnit((*m_creature), GhostGUID); + if (Ghost && Ghost->isAlive() && Ghost->HasAura(SPELL_SHADOW_OF_DEATH, 0)) + { + /*float x,y,z; + Ghost->GetPosition(x,y,z); + Creature* control = m_creature->SummonCreature(CREATURE_GHOST, x, y, z, 0, TEMPSUMMON_TIMED_DESAWN, 30000); + if (control) + { + ((Player*)Ghost)->Possess(control); + Ghost->DealDamage(Ghost, Ghost->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, + false); + }*/ + for(uint8 i = 0; i < 4; ++i) + { + Creature* Construct = NULL; + float X = CalculateRandomLocation(Ghost->GetPositionX(), 10); + float Y = CalculateRandomLocation(Ghost->GetPositionY(), 10); + + Construct = m_creature->SummonCreature(CREATURE_SHADOWY_CONSTRUCT, X, Y, Ghost->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45000); + if (Construct) + { + Construct->CastSpell(Construct, SPELL_PASSIVE_SHADOWFORM, true); + + SetThreatList(Construct); // Use same function as Doom Blossom to set Threat List. + ((mob_shadowy_constructAI*)Construct->AI())->GhostGUID = GhostGUID; + + Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 1); + if (!target) // someone's trying to solo. + target = m_creature->getVictim(); + + if (target) + Construct->GetMotionMaster()->MoveChase(target); + } + } + } + } + + void UpdateAI(const uint32 diff) + { + if (Intro) + { + if (AggroTimer < diff) + { + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + + DoScriptText(SAY_AGGRO, m_creature); + + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE); + Intro = false; + if (AggroTargetGUID) + { + Unit* pUnit = Unit::GetUnit((*m_creature), AggroTargetGUID); + if (pUnit) + AttackStart(pUnit); + + m_creature->SetInCombatWithZone(); + }else EnterEvadeMode(); + }else AggroTimer -= diff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim() || Intro) + return; + + if (SummonShadowsTimer < diff) + { + //MindControlGhost(); + + for(uint8 i = 0; i < 2; ++i) + { + Creature* Shadow = NULL; + float X = CalculateRandomLocation(m_creature->GetPositionX(), 10); + + Shadow = m_creature->SummonCreature(CREATURE_SHADOWY_CONSTRUCT, X, m_creature->GetPositionY(), m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 0); + if (Shadow) + { + Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 1); + if (!target) + target = m_creature->getVictim(); + + if (target) + Shadow->AI()->AttackStart(target); + } + } + SummonShadowsTimer = 60000; + }else SummonShadowsTimer -= diff; + + if (SummonDoomBlossomTimer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0)) + { + float X = CalculateRandomLocation(target->GetPositionX(), 20); + float Y = CalculateRandomLocation(target->GetPositionY(), 20); + + Creature* DoomBlossom = m_creature->SummonCreature(CREATURE_DOOM_BLOSSOM, X, Y, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000); + if (DoomBlossom) + { + DoomBlossom->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + DoomBlossom->setFaction(m_creature->getFaction()); + DoomBlossom->AddThreat(target, 1.0f); + ((mob_doom_blossomAI*)DoomBlossom->AI())->SetTeronGUID(m_creature->GetGUID()); + + SetThreatList(DoomBlossom); + SummonDoomBlossomTimer = 35000; + } + } + }else SummonDoomBlossomTimer -= diff; + + if (IncinerateTimer < diff) + { + Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 1); + if (!target) + target = m_creature->getVictim(); + + if (target) + { + DoScriptText(urand(0, 1) ? SAY_SPECIAL1 : SAY_SPECIAL2, m_creature); + DoCast(target, SPELL_INCINERATE); + IncinerateTimer = urand(20000, 50000); + } + }else IncinerateTimer -= diff; + + if (CrushingShadowsTimer < diff) + { + Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0); + if (target && target->isAlive()) + DoCast(target, SPELL_CRUSHING_SHADOWS); + + CrushingShadowsTimer = urand(10000, 26000); + }else CrushingShadowsTimer -= diff; + + /*** NOTE FOR FUTURE DEV: UNCOMMENT BELOW ONLY IF MIND CONTROL IS FULLY IMPLEMENTED **/ + /*if (ShadowOfDeathTimer < diff) + { + Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 1); + + if (!target) + target = m_creature->getVictim(); + + if (target && target->isAlive() && target->GetTypeId() == TYPEID_PLAYER) + { + DoCast(target, SPELL_SHADOW_OF_DEATH); + GhostGUID = target->GetGUID(); + ShadowOfDeathTimer = 30000; + SummonShadowsTimer = 53000; // Make it VERY close but slightly less so that we can check if the aura is still on the pPlayer + } + }else ShadowOfDeathTimer -= diff;*/ + + if (RandomYellTimer < diff) + { + DoScriptText(urand(0, 1) ? SAY_SPELL1 : SAY_SPELL2, m_creature); + RandomYellTimer = urand(50000, 100000); + }else RandomYellTimer -= diff; + + if (!m_creature->HasAura(SPELL_BERSERK, 0)) + { + if (EnrageTimer < diff) + { + DoCast(m_creature, SPELL_BERSERK); + DoScriptText(SAY_ENRAGE, m_creature); + }else EnrageTimer -= diff; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_doom_blossom(Creature* pCreature) +{ + return new mob_doom_blossomAI(pCreature); +} + +CreatureAI* GetAI_mob_shadowy_construct(Creature* pCreature) +{ + return new mob_shadowy_constructAI(pCreature); +} + +CreatureAI* GetAI_boss_teron_gorefiend(Creature* pCreature) +{ + return new boss_teron_gorefiendAI(pCreature); +} + +void AddSC_boss_teron_gorefiend() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "mob_doom_blossom"; + newscript->GetAI = &GetAI_mob_doom_blossom; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_shadowy_construct"; + newscript->GetAI = &GetAI_mob_shadowy_construct; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_teron_gorefiend"; + newscript->GetAI = &GetAI_boss_teron_gorefiend; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/black_temple/boss_warlord_najentus.cpp b/scripts/outland/black_temple/boss_warlord_najentus.cpp new file mode 100644 index 000000000..5830627f6 --- /dev/null +++ b/scripts/outland/black_temple/boss_warlord_najentus.cpp @@ -0,0 +1,214 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Warlord_Najentus +SD%Complete: 90 +SDComment: Does the GO need script? Uncomment code to test. +SDCategory: Black Temple +EndScriptData */ + +#include "precompiled.h" +#include "black_temple.h" + +enum +{ + 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, + + SPELL_CRASHINGWAVE = 40100, + SPELL_NEEDLE_SPINE = 39835, + SPELL_NEEDLE_AOE = 39968, + SPELL_TIDAL_BURST = 39878, + SPELL_TIDAL_SHIELD = 39872, // Not going to use this since Hurl Spine doesn't dispel it. + SPELL_IMPALING_SPINE = 39837, + SPELL_CREATE_NAJENTUS_SPINE = 39956, + SPELL_HURL_SPINE = 39948, + SPELL_BERSERK = 26662 +}; + +struct MANGOS_DLL_DECL boss_najentusAI : public ScriptedAI +{ + boss_najentusAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 m_uiNeedleSpineTimer; + uint32 m_uiEnrageTimer; + uint32 m_uiSpecialYellTimer; + uint32 m_uiTidalShieldTimer; + uint32 m_uiImpalingSpineTimer; + + bool m_bIsShielded; + + void Reset() + { + m_bIsShielded = false; + + m_uiNeedleSpineTimer = 10000; + m_uiEnrageTimer = MINUTE*8*IN_MILISECONDS; + m_uiSpecialYellTimer = urand(45000, 120000); + m_uiTidalShieldTimer = 60000; + m_uiImpalingSpineTimer = 20000; + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_NAJENTUS, NOT_STARTED); + } + + void KilledUnit(Unit *victim) + { + DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); + } + + void JustDied(Unit *victim) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_NAJENTUS, DONE); + + DoScriptText(SAY_DEATH, m_creature); + } + + void SpellHit(Unit *caster, const SpellEntry *spell) + { + if (m_bIsShielded) + { + if (spell->Id == SPELL_HURL_SPINE) + { + if (m_creature->HasAura(SPELL_TIDAL_SHIELD, 0)) + m_creature->RemoveAurasDueToSpell(SPELL_TIDAL_SHIELD); + + DoCast(m_creature->getVictim(), SPELL_TIDAL_BURST); + m_bIsShielded = false; + } + } + } + + void Aggro(Unit* pWho) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_NAJENTUS, IN_PROGRESS); + + DoScriptText(SAY_AGGRO, m_creature); + + m_creature->SetInCombatWithZone(); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiEnrageTimer < diff) + { + if (m_creature->IsNonMeleeSpellCasted(false)) + m_creature->InterruptNonMeleeSpells(false); + + DoScriptText(SAY_ENRAGE2, m_creature); + DoCast(m_creature, SPELL_BERSERK); + m_uiEnrageTimer = MINUTE*8*IN_MILISECONDS; + }else m_uiEnrageTimer -= diff; + + if (m_bIsShielded) + { + m_creature->GetMotionMaster()->Clear(false); + m_creature->GetMotionMaster()->MoveIdle(); + + return; // Don't cast or do anything while Shielded + } + + // Needle + if (m_uiNeedleSpineTimer < diff) + { + for(uint8 i = 0; i < 3; ++i) + { + Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 1); + + if (!target) + target = m_creature->getVictim(); + + DoCast(target, SPELL_NEEDLE_SPINE); + target->CastSpell(target, SPELL_NEEDLE_AOE, false); + } + + m_uiNeedleSpineTimer = 3000; + }else m_uiNeedleSpineTimer -= diff; + + if (m_uiSpecialYellTimer < diff) + { + DoScriptText(urand(0, 1) ? SAY_SPECIAL1 : SAY_SPECIAL2, m_creature); + m_uiSpecialYellTimer = urand(25000, 100000); + }else m_uiSpecialYellTimer -= diff; + + if (m_uiImpalingSpineTimer < diff) + { + Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 1); + + if (!target) + target = m_creature->getVictim(); + + if (target && (target->GetTypeId() == TYPEID_PLAYER)) + { + DoCast(target, SPELL_IMPALING_SPINE); + m_uiImpalingSpineTimer = 20000; + + DoScriptText(urand(0, 1) ? SAY_NEEDLE1 : SAY_NEEDLE2, m_creature); + } + }else m_uiImpalingSpineTimer -= diff; + + if (m_uiTidalShieldTimer < diff) + { + m_creature->InterruptNonMeleeSpells(false); + DoCast(m_creature, SPELL_TIDAL_SHIELD, true); + + m_creature->GetMotionMaster()->Clear(false); + m_creature->GetMotionMaster()->MoveIdle(); + + m_bIsShielded = true; + m_uiTidalShieldTimer = 60000; + }else m_uiTidalShieldTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_najentus(Creature* pCreature) +{ + return new boss_najentusAI(pCreature); +} + +void AddSC_boss_najentus() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_najentus"; + newscript->GetAI = &GetAI_boss_najentus; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/black_temple/illidari_council.cpp b/scripts/outland/black_temple/illidari_council.cpp new file mode 100644 index 000000000..fa62ed2d1 --- /dev/null +++ b/scripts/outland/black_temple/illidari_council.cpp @@ -0,0 +1,857 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Illidari_Council +SD%Complete: 85 +SDComment: Circle of Healing not working properly. +SDCategory: Black Temple +EndScriptData */ + +#include "precompiled.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 +#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 + +#define ERROR_INST_DATA "SD2 ERROR: Instance Data for Black Temple not set properly; Illidari Council event will not function properly." + +struct CouncilYells +{ + int32 entry; + uint32 timer; +}; + +static CouncilYells CouncilAggro[]= +{ + {-1564069, 5000}, // Gathios + {-1564070, 5500}, // Veras + {-1564071, 5000}, // Malande + {-1564072, 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 +}; + +// 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_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 + +struct MANGOS_DLL_DECL mob_blood_elf_council_voice_triggerAI : public ScriptedAI +{ + mob_blood_elf_council_voice_triggerAI(Creature* pCreature) : ScriptedAI(pCreature) + { + for(uint8 i = 0; i < 4; ++i) + Council[i] = 0; + Reset(); + } + + uint64 Council[4]; + + uint32 EnrageTimer; + uint32 AggroYellTimer; + + uint8 YellCounter; // Serves as the counter for both the aggro and enrage yells + + bool EventStarted; + + void Reset() + { + EnrageTimer = 900000; // 15 minutes + AggroYellTimer = 500; + YellCounter = 0; + + EventStarted = false; + } + + // finds and stores the GUIDs for each Council member using instance data system. + void LoadCouncilGUIDs() + { + if (ScriptedInstance* pInstance = (ScriptedInstance*)m_creature->GetInstanceData()) + { + Council[0] = pInstance->GetData64(DATA_GATHIOSTHESHATTERER); + Council[1] = pInstance->GetData64(DATA_VERASDARKSHADOW); + Council[2] = pInstance->GetData64(DATA_LADYMALANDE); + Council[3] = pInstance->GetData64(DATA_HIGHNETHERMANCERZEREVOR); + }else error_log(ERROR_INST_DATA); + } + + void AttackStart(Unit* who) {} + void MoveInLineOfSight(Unit* who) {} + + void UpdateAI(const uint32 diff) + { + if (!EventStarted) + return; + + if (YellCounter > 3) + return; + + if (AggroYellTimer) + { + if (AggroYellTimer <= diff) + { + if (Unit* pMember = Unit::GetUnit(*m_creature, Council[YellCounter])) + { + DoScriptText(CouncilAggro[YellCounter].entry, pMember); + AggroYellTimer = CouncilAggro[YellCounter].timer; + } + ++YellCounter; + + if (YellCounter > 3) + YellCounter = 0; // Reuse for Enrage Yells + }else AggroYellTimer -= diff; + } + + if (EnrageTimer) + { + if (EnrageTimer <= diff) + { + if (Unit* pMember = Unit::GetUnit(*m_creature, Council[YellCounter])) + { + pMember->CastSpell(pMember, SPELL_BERSERK, true); + DoScriptText(CouncilEnrage[YellCounter].entry, pMember); + EnrageTimer = CouncilEnrage[YellCounter].timer; + } + ++YellCounter; + }else EnrageTimer -= diff; + } + } +}; + +struct MANGOS_DLL_DECL mob_illidari_councilAI : public ScriptedAI +{ + mob_illidari_councilAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + + for(uint8 i = 0; i < 4; ++i) + Council[i] = 0; + + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint64 Council[4]; + + uint32 CheckTimer; + uint32 EndEventTimer; + + uint8 DeathCount; + + bool EventBegun; + + void Reset() + { + CheckTimer = 2000; + EndEventTimer = 0; + + DeathCount = 0; + + Creature* pMember = NULL; + for(uint8 i = 0; i < 4; ++i) + { + if (pMember = ((Creature*)Unit::GetUnit((*m_creature), Council[i]))) + { + if (!pMember->isAlive()) + { + pMember->RemoveCorpse(); + pMember->Respawn(); + } + pMember->AI()->EnterEvadeMode(); + } + } + + EventBegun = false; + + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetDisplayId(11686); + + if (m_pInstance) + { + //if already done, not do anything + if (m_pInstance->GetData(TYPE_COUNCIL) == DONE) + return; + + if (Creature* VoiceTrigger = ((Creature*)Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_BLOOD_ELF_COUNCIL_VOICE)))) + VoiceTrigger->AI()->EnterEvadeMode(); + + m_pInstance->SetData(TYPE_COUNCIL, NOT_STARTED); + } + } + + void AttackStart(Unit* who) {} + void MoveInLineOfSight(Unit* who) {} + + void StartEvent(Unit *target) + { + if (!m_pInstance) + return; + + if (target && target->isAlive() && !EventBegun) + { + Council[0] = m_pInstance->GetData64(DATA_GATHIOSTHESHATTERER); + Council[1] = m_pInstance->GetData64(DATA_HIGHNETHERMANCERZEREVOR); + Council[2] = m_pInstance->GetData64(DATA_LADYMALANDE); + Council[3] = m_pInstance->GetData64(DATA_VERASDARKSHADOW); + + // Start the event for the Voice Trigger + if (Creature* VoiceTrigger = ((Creature*)Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_BLOOD_ELF_COUNCIL_VOICE)))) + { + ((mob_blood_elf_council_voice_triggerAI*)VoiceTrigger->AI())->LoadCouncilGUIDs(); + ((mob_blood_elf_council_voice_triggerAI*)VoiceTrigger->AI())->EventStarted = true; + } + + for(uint8 i = 0; i < 4; ++i) + { + Unit* Member = NULL; + if (Council[i]) + { + Member = Unit::GetUnit((*m_creature), Council[i]); + if (Member && Member->isAlive()) + ((Creature*)Member)->AI()->AttackStart(target); + } + } + + m_pInstance->SetData(TYPE_COUNCIL, IN_PROGRESS); + + EventBegun = true; + } + } + + void UpdateAI(const uint32 diff) + { + if (!EventBegun) + return; + + if (EndEventTimer) + { + if (EndEventTimer <= diff) + { + if (DeathCount > 3) + { + if (m_pInstance) + { + if (Creature* VoiceTrigger = ((Creature*)Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_BLOOD_ELF_COUNCIL_VOICE)))) + VoiceTrigger->DealDamage(VoiceTrigger, VoiceTrigger->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + + m_pInstance->SetData(TYPE_COUNCIL, DONE); + } + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + return; + } + + Creature* pMember = ((Creature*)Unit::GetUnit(*m_creature, Council[DeathCount])); + if (pMember && pMember->isAlive()) + pMember->DealDamage(pMember, pMember->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + + ++DeathCount; + EndEventTimer = 1500; + }else EndEventTimer -= diff; + } + + if (CheckTimer) + { + if (CheckTimer <= diff) + { + uint8 EvadeCheck = 0; + for(uint8 i = 0; i < 4; ++i) + { + if (Council[i]) + { + if (Creature* Member = ((Creature*)Unit::GetUnit((*m_creature), Council[i]))) + { + // This is the evade/death check. + if (Member->isAlive() && !Member->SelectHostileTarget()) + ++EvadeCheck; //If all members evade, we reset so that players can properly reset the event + else if (!Member->isAlive()) //If even one member dies, kill the rest, set instance data, and kill self. + { + EndEventTimer = 1000; + CheckTimer = 0; + return; + } + } + } + } + + if (EvadeCheck > 3) + Reset(); + + CheckTimer = 2000; + }else CheckTimer -= diff; + } + } +}; + +struct MANGOS_DLL_DECL boss_illidari_councilAI : public ScriptedAI +{ + boss_illidari_councilAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + + for(uint8 i = 0; i < 4; ++i) + Council[i] = 0; + + LoadedGUIDs = false; + } + + ScriptedInstance* m_pInstance; + + uint64 Council[4]; + + bool LoadedGUIDs; + + void Aggro(Unit* pWho) + { + if (m_pInstance) + { + Creature* Controller = ((Creature*)Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_ILLIDARICOUNCIL))); + if (Controller) + ((mob_illidari_councilAI*)Controller->AI())->StartEvent(pWho); + } + else + { + error_log(ERROR_INST_DATA); + EnterEvadeMode(); + } + + m_creature->SetInCombatWithZone(); + + // Load GUIDs on first aggro because the creature guids are only set as the creatures are created in world- + // this means that for each creature, it will attempt to LoadGUIDs even though some of the other creatures are + // not in world, and thus have no GUID set in the instance data system. Putting it in aggro ensures that all the creatures + // have been loaded and have their GUIDs set in the instance data system. + if (!LoadedGUIDs) + LoadGUIDs(); + } + + void DamageTaken(Unit* done_by, uint32 &damage) + { + if (done_by == m_creature) + return; + + damage /= 4; + for(uint8 i = 0; i < 4; ++i) + { + if (Unit* pUnit = Unit::GetUnit(*m_creature, Council[i])) + if (pUnit != m_creature && damage < pUnit->GetHealth()) + pUnit->SetHealth(pUnit->GetHealth() - damage); + } + } + + void LoadGUIDs() + { + if (!m_pInstance) + { + error_log(ERROR_INST_DATA); + return; + } + + Council[0] = m_pInstance->GetData64(DATA_LADYMALANDE); + Council[1] = m_pInstance->GetData64(DATA_HIGHNETHERMANCERZEREVOR); + Council[2] = m_pInstance->GetData64(DATA_GATHIOSTHESHATTERER); + Council[3] = m_pInstance->GetData64(DATA_VERASDARKSHADOW); + + LoadedGUIDs = true; + } +}; + +struct MANGOS_DLL_DECL boss_gathios_the_shattererAI : public boss_illidari_councilAI +{ + boss_gathios_the_shattererAI(Creature* pCreature) : boss_illidari_councilAI(pCreature) { Reset(); } + + uint32 ConsecrationTimer; + uint32 HammerOfJusticeTimer; + uint32 SealTimer; + uint32 AuraTimer; + uint32 BlessingTimer; + + void Reset() + { + ConsecrationTimer = 40000; + HammerOfJusticeTimer = 10000; + SealTimer = 40000; + AuraTimer = 90000; + BlessingTimer = 60000; + } + + void KilledUnit(Unit *victim) + { + DoScriptText(SAY_GATH_SLAY, m_creature); + } + + void JustDied(Unit *victim) + { + DoScriptText(SAY_GATH_DEATH, m_creature); + } + + Unit* SelectCouncilMember() + { + Unit* pUnit = m_creature; + uint32 member = 0; // He chooses Lady Malande most often + + if (!urand(0, 9)) // But there is a chance he picks someone else. + member = urand(1, 3); + + if (member != 2) // No need to create another pointer to us using Unit::GetUnit + pUnit = Unit::GetUnit((*m_creature), Council[member]); + + return pUnit; + } + + void CastAuraOnCouncil() + { + uint32 spellid = 0; + switch(urand(0, 1)) + { + case 0: spellid = SPELL_DEVOTION_AURA; break; + case 1: spellid = SPELL_CHROMATIC_AURA; break; + } + for(uint8 i = 0; i < 4; ++i) + { + Unit* pUnit = Unit::GetUnit((*m_creature), Council[i]); + if (pUnit) + pUnit->CastSpell(pUnit, spellid, true, 0, 0, m_creature->GetGUID()); + } + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (BlessingTimer < diff) + { + if (Unit* pUnit = SelectCouncilMember()) + DoCast(pUnit, urand(0, 1) ? SPELL_BLESS_SPELLWARD : SPELL_BLESS_PROTECTION); + + BlessingTimer = 60000; + }else BlessingTimer -= diff; + + if (ConsecrationTimer < diff) + { + DoCast(m_creature, SPELL_CONSECRATION); + ConsecrationTimer = 40000; + }else ConsecrationTimer -= diff; + + if (HammerOfJusticeTimer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0)) + { + // is in ~10-40 yd range + if (m_creature->IsInRange(target, 10.0f, 40.0f, false)) + { + DoCast(target, SPELL_HAMMER_OF_JUSTICE); + HammerOfJusticeTimer = 20000; + } + } + }else HammerOfJusticeTimer -= diff; + + if (SealTimer < diff) + { + DoCast(m_creature, urand(0, 1) ? SPELL_SEAL_OF_COMMAND : SPELL_SEAL_OF_BLOOD); + SealTimer = 40000; + }else SealTimer -= diff; + + if (AuraTimer < diff) + { + CastAuraOnCouncil(); + AuraTimer = 90000; + }else AuraTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +struct MANGOS_DLL_DECL boss_high_nethermancer_zerevorAI : public boss_illidari_councilAI +{ + boss_high_nethermancer_zerevorAI(Creature* pCreature) : boss_illidari_councilAI(pCreature) { Reset(); } + + uint32 BlizzardTimer; + uint32 FlamestrikeTimer; + uint32 ArcaneBoltTimer; + uint32 DampenMagicTimer; + uint32 Cooldown; + uint32 ArcaneExplosionTimer; + + void Reset() + { + BlizzardTimer = urand(30000, 90000); + FlamestrikeTimer = urand(30000, 90000); + ArcaneBoltTimer = 10000; + DampenMagicTimer = 2000; + ArcaneExplosionTimer = 14000; + Cooldown = 0; + } + + void KilledUnit(Unit *victim) + { + DoScriptText(SAY_ZERE_SLAY, m_creature); + } + + void JustDied(Unit *victim) + { + DoScriptText(SAY_ZERE_DEATH, m_creature); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (Cooldown) + { + if (Cooldown < diff) + Cooldown = 0; + else + { + Cooldown -= diff; + return; // Don't cast any other spells if global cooldown is still ticking + } + } + + if (DampenMagicTimer < diff) + { + DoCast(m_creature, SPELL_DAMPEN_MAGIC); + Cooldown = 1000; + DampenMagicTimer = 110000; // almost 2 minutes + ArcaneBoltTimer += 1000; // Give the Mage some time to spellsteal Dampen. + }else DampenMagicTimer -= diff; + + if (ArcaneExplosionTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_ARCANE_EXPLOSION); + Cooldown = 1000; + ArcaneExplosionTimer = 14000; + }else ArcaneExplosionTimer -= diff; + + if (ArcaneBoltTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_ARCANE_BOLT); + ArcaneBoltTimer = 3000; + Cooldown = 2000; + }else ArcaneBoltTimer -= diff; + + if (BlizzardTimer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0)) + { + DoCast(target, SPELL_BLIZZARD); + BlizzardTimer = urand(45000, 90000); + FlamestrikeTimer += 10000; + Cooldown = 1000; + } + }else BlizzardTimer -= diff; + + if (FlamestrikeTimer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0)) + { + DoCast(target, SPELL_FLAMESTRIKE); + FlamestrikeTimer = urand(55000, 100000); + BlizzardTimer += 10000; + Cooldown = 2000; + } + }else FlamestrikeTimer -= diff; + } +}; + +struct MANGOS_DLL_DECL boss_lady_malandeAI : public boss_illidari_councilAI +{ + boss_lady_malandeAI(Creature* pCreature) : boss_illidari_councilAI(pCreature) { Reset(); } + + uint32 EmpoweredSmiteTimer; + uint32 CircleOfHealingTimer; + uint32 DivineWrathTimer; + uint32 ReflectiveShieldTimer; + + void Reset() + { + EmpoweredSmiteTimer = 38000; + CircleOfHealingTimer = 20000; + DivineWrathTimer = 40000; + ReflectiveShieldTimer = 0; + } + + void KilledUnit(Unit *victim) + { + DoScriptText(SAY_MALA_SLAY, m_creature); + } + + void JustDied(Unit *victim) + { + DoScriptText(SAY_MALA_DEATH, m_creature); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (EmpoweredSmiteTimer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0)) + { + DoCast(target, SPELL_EMPOWERED_SMITE); + EmpoweredSmiteTimer = 38000; + } + }else EmpoweredSmiteTimer -= diff; + + if (CircleOfHealingTimer < diff) + { + //Currently bugged and puts Malande on the threatlist of the other council members. It also heals players. + //DoCast(m_creature, SPELL_CIRCLE_OF_HEALING); + CircleOfHealingTimer = 60000; + }else CircleOfHealingTimer -= diff; + + if (DivineWrathTimer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0)) + { + DoCast(target, SPELL_DIVINE_WRATH); + DivineWrathTimer = urand(40000, 80000); + } + }else DivineWrathTimer -= diff; + + if (ReflectiveShieldTimer < diff) + { + DoCast(m_creature, SPELL_REFLECTIVE_SHIELD); + ReflectiveShieldTimer = 65000; + }else ReflectiveShieldTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +struct MANGOS_DLL_DECL boss_veras_darkshadowAI : public boss_illidari_councilAI +{ + boss_veras_darkshadowAI(Creature* pCreature) : boss_illidari_councilAI(pCreature) { Reset(); } + + uint64 EnvenomTargetGUID; + + uint32 DeadlyPoisonTimer; + uint32 VanishTimer; + uint32 AppearEnvenomTimer; + + bool HasVanished; + + void Reset() + { + EnvenomTargetGUID = 0; + + DeadlyPoisonTimer = 20000; + VanishTimer = urand(60000, 120000); + AppearEnvenomTimer = 150000; + + HasVanished = false; + m_creature->SetVisibility(VISIBILITY_ON); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } + + void KilledUnit(Unit *victim) + { + DoScriptText(SAY_VERA_SLAY, m_creature); + } + + void JustDied(Unit *victim) + { + DoScriptText(SAY_VERA_DEATH, m_creature); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (!HasVanished) + { + if (DeadlyPoisonTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_DEADLY_POISON); + DeadlyPoisonTimer = urand(15000, 45000); + }else DeadlyPoisonTimer -= diff; + + if (AppearEnvenomTimer < diff) // Cast Envenom. This is cast 4 seconds after Vanish is over + { + DoCast(m_creature->getVictim(), SPELL_ENVENOM); + AppearEnvenomTimer = 90000; + }else AppearEnvenomTimer -= diff; + + if (VanishTimer < diff) // Disappear and stop attacking, but follow a random unit + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0)) + { + VanishTimer = 30000; + AppearEnvenomTimer= 28000; + HasVanished = true; + m_creature->SetVisibility(VISIBILITY_OFF); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + DoResetThreat(); + // Chase a unit. Check before DoMeleeAttackIfReady prevents from attacking + m_creature->AddThreat(target, 500000.0f); + m_creature->GetMotionMaster()->MoveChase(target); + } + }else VanishTimer -= diff; + + DoMeleeAttackIfReady(); + } + else + { + if (VanishTimer < diff) // Become attackable and poison current target + { + Unit* target = m_creature->getVictim(); + DoCast(target, SPELL_DEADLY_POISON); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + DoResetThreat(); + m_creature->AddThreat(target, 3000.0f); // Make Veras attack his target for a while, he will cast Envenom 4 seconds after. + DeadlyPoisonTimer += 6000; + VanishTimer = 90000; + AppearEnvenomTimer = 4000; + HasVanished = false; + }else VanishTimer -= diff; + + if (AppearEnvenomTimer < diff) // Appear 2 seconds before becoming attackable (Shifting out of vanish) + { + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + m_creature->SetVisibility(VISIBILITY_ON); + AppearEnvenomTimer = 6000; + }else AppearEnvenomTimer -= diff; + } + } +}; + +CreatureAI* GetAI_mob_blood_elf_council_voice_trigger(Creature* pCreature) +{ + return new mob_blood_elf_council_voice_triggerAI(pCreature); +} + +CreatureAI* GetAI_mob_illidari_council(Creature* pCreature) +{ + return new mob_illidari_councilAI(pCreature); +} + +CreatureAI* GetAI_boss_gathios_the_shatterer(Creature* pCreature) +{ + return new boss_gathios_the_shattererAI(pCreature); +} + +CreatureAI* GetAI_boss_lady_malande(Creature* pCreature) +{ + return new boss_lady_malandeAI(pCreature); +} + +CreatureAI* GetAI_boss_veras_darkshadow(Creature* pCreature) +{ + return new boss_veras_darkshadowAI(pCreature); +} + +CreatureAI* GetAI_boss_high_nethermancer_zerevor(Creature* pCreature) +{ + return new boss_high_nethermancer_zerevorAI(pCreature); +} + +void AddSC_boss_illidari_council() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "mob_illidari_council"; + newscript->GetAI = &GetAI_mob_illidari_council; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_blood_elf_council_voice_trigger"; + newscript->GetAI = &GetAI_mob_blood_elf_council_voice_trigger; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_gathios_the_shatterer"; + newscript->GetAI = &GetAI_boss_gathios_the_shatterer; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_lady_malande"; + newscript->GetAI = &GetAI_boss_lady_malande; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_veras_darkshadow"; + newscript->GetAI = &GetAI_boss_veras_darkshadow; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_high_nethermancer_zerevor"; + newscript->GetAI = &GetAI_boss_high_nethermancer_zerevor; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/black_temple/instance_black_temple.cpp b/scripts/outland/black_temple/instance_black_temple.cpp new file mode 100644 index 000000000..ebcd88d3b --- /dev/null +++ b/scripts/outland/black_temple/instance_black_temple.cpp @@ -0,0 +1,332 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance_Black_Temple +SD%Complete: 100 +SDComment: Instance Data Scripts and functions to acquire mobs and set encounter status for use in various Black Temple Scripts +SDCategory: Black Temple +EndScriptData */ + +#include "precompiled.h" +#include "black_temple.h" + +/* Black Temple encounters: +0 - High Warlord Naj'entus event +1 - Supremus Event +2 - Shade of Akama Event +3 - Teron Gorefiend Event +4 - Gurtogg Bloodboil Event +5 - Reliquary Of Souls Event +6 - Mother Shahraz Event +7 - Illidari Council Event +8 - Illidan Stormrage Event +*/ + +struct MANGOS_DLL_DECL instance_black_temple : public ScriptedInstance +{ + instance_black_temple(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string strInstData; + + uint64 m_uiNajentusGUID; + uint64 m_uiAkamaGUID; // This is the Akama that starts the Illidan encounter. + uint64 m_uiAkama_ShadeGUID; // This is the Akama that starts the Shade of Akama encounter. + uint64 m_uiShadeOfAkamaGUID; + uint64 m_uiSupremusGUID; + uint64 m_uiLadyMalandeGUID; + uint64 m_uiGathiosTheShattererGUID; + uint64 m_uiHighNethermancerZerevorGUID; + uint64 m_uiVerasDarkshadowGUID; + uint64 m_uiIllidariCouncilGUID; + uint64 m_uiBloodElfCouncilVoiceGUID; + uint64 m_uiIllidanStormrageGUID; + + uint64 m_uiNajentusGateGUID; + uint64 m_uiMainTempleDoorsGUID; + uint64 m_uiShadeAkamaDoorGUID; + uint64 m_uiIllidanGateGUID; + uint64 m_uiIllidanDoorGUID[2]; + uint64 m_uiShahrazPreDoorGUID; + uint64 m_uiShahrazPostDoorGUID; + uint64 m_uiCouncilDoorGUID; + + void Initialize() + { + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + + m_uiNajentusGUID = 0; + m_uiAkamaGUID = 0; + m_uiAkama_ShadeGUID = 0; + m_uiShadeOfAkamaGUID = 0; + m_uiSupremusGUID = 0; + m_uiLadyMalandeGUID = 0; + m_uiGathiosTheShattererGUID = 0; + m_uiHighNethermancerZerevorGUID = 0; + m_uiVerasDarkshadowGUID = 0; + m_uiIllidariCouncilGUID = 0; + m_uiBloodElfCouncilVoiceGUID = 0; + m_uiIllidanStormrageGUID = 0; + + m_uiNajentusGateGUID = 0; + m_uiMainTempleDoorsGUID = 0; + m_uiShadeAkamaDoorGUID = 0; + m_uiIllidanGateGUID = 0; + m_uiIllidanDoorGUID[0] = 0; + m_uiIllidanDoorGUID[1] = 0; + m_uiShahrazPreDoorGUID = 0; + m_uiShahrazPostDoorGUID = 0; + m_uiCouncilDoorGUID = 0; + } + + bool IsEncounterInProgress() const + { + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + if (m_auiEncounter[i] == IN_PROGRESS) return true; + + return false; + } + + void OnCreatureCreate(Creature* pCreature) + { + switch(pCreature->GetEntry()) + { + case 22887: m_uiNajentusGUID = pCreature->GetGUID(); break; + case 23089: m_uiAkamaGUID = pCreature->GetGUID(); break; + case 22990: m_uiAkama_ShadeGUID = pCreature->GetGUID(); break; + case 22841: m_uiShadeOfAkamaGUID = pCreature->GetGUID(); break; + case 22898: m_uiSupremusGUID = pCreature->GetGUID(); break; + case 22917: m_uiIllidanStormrageGUID = pCreature->GetGUID(); break; + case 22949: m_uiGathiosTheShattererGUID = pCreature->GetGUID(); break; + case 22950: m_uiHighNethermancerZerevorGUID = pCreature->GetGUID(); break; + case 22951: m_uiLadyMalandeGUID = pCreature->GetGUID(); break; + case 22952: m_uiVerasDarkshadowGUID = pCreature->GetGUID(); break; + case 23426: m_uiIllidariCouncilGUID = pCreature->GetGUID(); break; + case 23499: m_uiBloodElfCouncilVoiceGUID = pCreature->GetGUID(); break; + } + } + + void OnObjectCreate(GameObject* pGo) + { + switch(pGo->GetEntry()) + { + case 185483: // Gate past Naj'entus (at the entrance to Supermoose's courtyards) + m_uiNajentusGateGUID = pGo->GetGUID(); + if (m_auiEncounter[0] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case 185882: // Main Temple Doors - right past Supermoose (Supremus) + m_uiMainTempleDoorsGUID = pGo->GetGUID(); + if (m_auiEncounter[1] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case 185478: + m_uiShadeAkamaDoorGUID = pGo->GetGUID(); // Door close during encounter + break; + case 185479: // Door leading to Mother Shahraz + m_uiShahrazPreDoorGUID = pGo->GetGUID(); + if (CanPreMotherDoorOpen()) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case 185481: // Door leading to the Council (grand promenade) + m_uiCouncilDoorGUID = pGo->GetGUID(); + if (m_auiEncounter[6] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case 185482: // Door after shahraz + m_uiShahrazPostDoorGUID = pGo->GetGUID(); + if (m_auiEncounter[6] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case 185905: // Gate leading to Temple Summit + m_uiIllidanGateGUID = pGo->GetGUID(); + break; + case 186261: // Right door at Temple Summit + m_uiIllidanDoorGUID[0] = pGo->GetGUID(); + break; + case 186262: // Left door at Temple Summit + m_uiIllidanDoorGUID[1] = pGo->GetGUID(); + break; + } + } + + bool CanPreMotherDoorOpen() + { + if (m_auiEncounter[2] == DONE && m_auiEncounter[3] == DONE && m_auiEncounter[4] == DONE && m_auiEncounter[5] == DONE) + { + debug_log("SD2: Black Temple: door to Mother Shahraz can open"); + return true; + } + + debug_log("SD2: Black Temple: Door data to Mother Shahraz requested, cannot open yet (Encounter data: %u %u %u %u)",m_auiEncounter[2],m_auiEncounter[3],m_auiEncounter[4],m_auiEncounter[5]); + return false; + } + + void SetData(uint32 uiType, uint32 uiData) + { + debug_log("SD2: Instance Black Temple: SetData received for type %u with data %u",uiType,uiData); + + switch(uiType) + { + case TYPE_NAJENTUS: + m_auiEncounter[0] = uiData; + if (uiData == DONE) + DoUseDoorOrButton(m_uiNajentusGateGUID); + break; + case TYPE_SUPREMUS: + m_auiEncounter[1] = uiData; + if (uiData == DONE) + DoUseDoorOrButton(m_uiMainTempleDoorsGUID); + break; + case TYPE_SHADE: + m_auiEncounter[2] = uiData; + if (uiData == DONE && CanPreMotherDoorOpen()) + DoUseDoorOrButton(m_uiShahrazPreDoorGUID); + break; + case TYPE_GOREFIEND: + m_auiEncounter[3] = uiData; + if (uiData == DONE && CanPreMotherDoorOpen()) + DoUseDoorOrButton(m_uiShahrazPreDoorGUID); + break; + case TYPE_BLOODBOIL: + m_auiEncounter[4] = uiData; + if (uiData == DONE && CanPreMotherDoorOpen()) + DoUseDoorOrButton(m_uiShahrazPreDoorGUID); + break; + case TYPE_RELIQUIARY: + m_auiEncounter[5] = uiData; + if (uiData == DONE && CanPreMotherDoorOpen()) + DoUseDoorOrButton(m_uiShahrazPreDoorGUID); + break; + case TYPE_SHAHRAZ: + if (uiData == DONE) + { + DoUseDoorOrButton(m_uiCouncilDoorGUID); + DoUseDoorOrButton(m_uiShahrazPostDoorGUID); + } + m_auiEncounter[6] = uiData; + break; + case TYPE_COUNCIL: m_auiEncounter[7] = uiData; break; + case TYPE_ILLIDAN: m_auiEncounter[8] = uiData; break; + default: + error_log("SD2: Instance Black Temple: ERROR SetData = %u for type %u does not exist/not implemented.",uiType,uiData); + break; + } + + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " + << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " + << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8]; + + strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } + } + + uint32 GetData(uint32 uiType) + { + switch(uiType) + { + case TYPE_NAJENTUS: return m_auiEncounter[0]; + case TYPE_SUPREMUS: return m_auiEncounter[1]; + case TYPE_SHADE: return m_auiEncounter[2]; + case TYPE_GOREFIEND: return m_auiEncounter[3]; + case TYPE_BLOODBOIL: return m_auiEncounter[4]; + case TYPE_RELIQUIARY: return m_auiEncounter[5]; + case TYPE_SHAHRAZ: return m_auiEncounter[6]; + case TYPE_COUNCIL: return m_auiEncounter[7]; + case TYPE_ILLIDAN: return m_auiEncounter[8]; + } + + return 0; + } + + uint64 GetData64(uint32 uiData) + { + switch(uiData) + { + case DATA_HIGHWARLORDNAJENTUS: return m_uiNajentusGUID; + case DATA_AKAMA: return m_uiAkamaGUID; + case DATA_AKAMA_SHADE: return m_uiAkama_ShadeGUID; + case DATA_SHADEOFAKAMA: return m_uiShadeOfAkamaGUID; + case DATA_SUPREMUS: return m_uiSupremusGUID; + case DATA_ILLIDANSTORMRAGE: return m_uiIllidanStormrageGUID; + case DATA_GATHIOSTHESHATTERER: return m_uiGathiosTheShattererGUID; + case DATA_HIGHNETHERMANCERZEREVOR: return m_uiHighNethermancerZerevorGUID; + case DATA_LADYMALANDE: return m_uiLadyMalandeGUID; + case DATA_VERASDARKSHADOW: return m_uiVerasDarkshadowGUID; + case DATA_ILLIDARICOUNCIL: return m_uiIllidariCouncilGUID; + case DATA_GAMEOBJECT_NAJENTUS_GATE: return m_uiNajentusGateGUID; + case DATA_GAMEOBJECT_ILLIDAN_GATE: return m_uiIllidanGateGUID; + case DATA_GAMEOBJECT_ILLIDAN_DOOR_R: return m_uiIllidanDoorGUID[0]; + case DATA_GAMEOBJECT_ILLIDAN_DOOR_L: return m_uiIllidanDoorGUID[1]; + case DATA_GAMEOBJECT_SUPREMUS_DOORS: return m_uiMainTempleDoorsGUID; + case DATA_BLOOD_ELF_COUNCIL_VOICE: return m_uiBloodElfCouncilVoiceGUID; + case DATA_GO_PRE_SHAHRAZ_DOOR: return m_uiShahrazPreDoorGUID; + case DATA_GO_POST_SHAHRAZ_DOOR: return m_uiShahrazPostDoorGUID; + case DATA_GO_COUNCIL_DOOR: return m_uiCouncilDoorGUID; + } + + return 0; + } + + const char* Save() + { + return strInstData.c_str(); + } + + void Load(const char* chrIn) + { + if (!chrIn) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(chrIn); + + std::istringstream loadStream(chrIn); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] + >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] >> m_auiEncounter[8]; + + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + if (m_auiEncounter[i] == IN_PROGRESS) // Do not load an encounter as "In Progress" - reset it instead. + m_auiEncounter[i] = NOT_STARTED; + + OUT_LOAD_INST_DATA_COMPLETE; + } +}; + +InstanceData* GetInstanceData_instance_black_temple(Map* pMap) +{ + return new instance_black_temple(pMap); +} + +void AddSC_instance_black_temple() +{ + Script* newscript; + newscript = new Script; + newscript->Name = "instance_black_temple"; + newscript->GetInstanceData = &GetInstanceData_instance_black_temple; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/blades_edge_mountains.cpp b/scripts/outland/blades_edge_mountains.cpp new file mode 100644 index 000000000..cb3a8daad --- /dev/null +++ b/scripts/outland/blades_edge_mountains.cpp @@ -0,0 +1,391 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Blades_Edge_Mountains +SD%Complete: 90 +SDComment: Quest support: 10503, 10504, 10556, 10609, 10682, 10980. Ogri'la->Skettis Flight. (npc_daranelle needs bit more work before consider complete) +SDCategory: Blade's Edge Mountains +EndScriptData */ + +/* ContentData +mobs_bladespire_ogre +mobs_nether_drake +npc_daranelle +npc_overseer_nuaar +npc_saikkal_the_elder +npc_skyguard_handler_irena +EndContentData */ + +#include "precompiled.h" + +/*###### +## mobs_bladespire_ogre +######*/ + +//TODO: add support for quest 10512 + creature abilities +struct MANGOS_DLL_DECL mobs_bladespire_ogreAI : public ScriptedAI +{ + mobs_bladespire_ogreAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + void Reset() { } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mobs_bladespire_ogre(Creature* pCreature) +{ + return new mobs_bladespire_ogreAI(pCreature); +} + +/*###### +## mobs_nether_drake +######*/ + +#define SAY_NIHIL_1 -1000169 +#define SAY_NIHIL_2 -1000170 +#define SAY_NIHIL_3 -1000171 +#define SAY_NIHIL_4 -1000172 +#define SAY_NIHIL_INTERRUPT -1000173 + +#define ENTRY_WHELP 20021 +#define ENTRY_PROTO 21821 +#define ENTRY_ADOLE 21817 +#define ENTRY_MATUR 21820 +#define ENTRY_NIHIL 21823 + +#define SPELL_T_PHASE_MODULATOR 37573 + +#define SPELL_ARCANE_BLAST 38881 +#define SPELL_MANA_BURN 38884 +#define SPELL_INTANGIBLE_PRESENCE 36513 + +struct MANGOS_DLL_DECL mobs_nether_drakeAI : public ScriptedAI +{ + mobs_nether_drakeAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + bool IsNihil; + uint32 NihilSpeech_Timer; + uint32 NihilSpeech_Phase; + + uint32 ArcaneBlast_Timer; + uint32 ManaBurn_Timer; + uint32 IntangiblePresence_Timer; + + void Reset() + { + IsNihil = false; + NihilSpeech_Timer = 3000; + NihilSpeech_Phase = 0; + + ArcaneBlast_Timer = 7500; + ManaBurn_Timer = 10000; + IntangiblePresence_Timer = 15000; + } + + void MoveInLineOfSight(Unit *who) + { + if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + return; + + ScriptedAI::MoveInLineOfSight(who); + } + + //in case creature was not summoned (not expected) + void MovementInform(uint32 type, uint32 id) + { + if (type != POINT_MOTION_TYPE) + return; + + if (id == 0) + { + m_creature->setDeathState(JUST_DIED); + m_creature->RemoveCorpse(); + m_creature->SetHealth(0); + } + } + + void SpellHit(Unit *caster, const SpellEntry *spell) + { + if (spell->Id == SPELL_T_PHASE_MODULATOR && caster->GetTypeId() == TYPEID_PLAYER) + { + const uint32 entry_list[4] = {ENTRY_PROTO, ENTRY_ADOLE, ENTRY_MATUR, ENTRY_NIHIL}; + int cid = rand()%(4-1); + + if (entry_list[cid] == m_creature->GetEntry()) + ++cid; + + //we are nihil, so say before transform + if (m_creature->GetEntry() == ENTRY_NIHIL) + { + DoScriptText(SAY_NIHIL_INTERRUPT, m_creature); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + IsNihil = false; + } + + if (m_creature->UpdateEntry(entry_list[cid])) + { + if (entry_list[cid] == ENTRY_NIHIL) + { + EnterEvadeMode(); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + IsNihil = true; + }else + AttackStart(caster); + } + } + } + + void UpdateAI(const uint32 diff) + { + if (IsNihil) + { + if (NihilSpeech_Timer <= diff) + { + switch(NihilSpeech_Phase) + { + case 0: + DoScriptText(SAY_NIHIL_1, m_creature); + ++NihilSpeech_Phase; + break; + case 1: + DoScriptText(SAY_NIHIL_2, m_creature); + ++NihilSpeech_Phase; + break; + case 2: + DoScriptText(SAY_NIHIL_3, m_creature); + ++NihilSpeech_Phase; + break; + case 3: + DoScriptText(SAY_NIHIL_4, m_creature); + ++NihilSpeech_Phase; + break; + case 4: + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + //take off to location above + m_creature->GetMotionMaster()->MovePoint(0, m_creature->GetPositionX()+50.0f, m_creature->GetPositionY(), m_creature->GetPositionZ()+50.0f); + ++NihilSpeech_Phase; + break; + } + NihilSpeech_Timer = 5000; + }else NihilSpeech_Timer -=diff; + + //anything below here is not interesting for Nihil, so skip it + return; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (IntangiblePresence_Timer <= diff) + { + DoCast(m_creature->getVictim(),SPELL_INTANGIBLE_PRESENCE); + IntangiblePresence_Timer = urand(15000, 30000); + }else IntangiblePresence_Timer -= diff; + + if (ManaBurn_Timer <= diff) + { + Unit* target = m_creature->getVictim(); + if (target && target->getPowerType() == POWER_MANA) + DoCast(target,SPELL_MANA_BURN); + ManaBurn_Timer = urand(8000, 16000); + }else ManaBurn_Timer -= diff; + + if (ArcaneBlast_Timer <= diff) + { + DoCast(m_creature->getVictim(),SPELL_ARCANE_BLAST); + ArcaneBlast_Timer = urand(2500, 7500); + }else ArcaneBlast_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mobs_nether_drake(Creature* pCreature) +{ + return new mobs_nether_drakeAI(pCreature); +} + +/*###### +## npc_daranelle +######*/ + +enum +{ + SAY_SPELL_INFLUENCE = -1000174, + NPC_KALIRI_AURA_DISPEL = 21511, + SPELL_LASHHAN_CHANNEL = 36904 +}; + +struct MANGOS_DLL_DECL npc_daranelleAI : public ScriptedAI +{ + npc_daranelleAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + void Reset() { } + + void MoveInLineOfSight(Unit* pWho) + { + if (pWho->GetTypeId() == TYPEID_PLAYER) + { + if (pWho->HasAura(SPELL_LASHHAN_CHANNEL,0) && m_creature->IsWithinDistInMap(pWho, 10.0f)) + { + DoScriptText(SAY_SPELL_INFLUENCE, m_creature, pWho); + + //TODO: Move the below to updateAI and run if this statement == true + ((Player*)pWho)->KilledMonsterCredit(NPC_KALIRI_AURA_DISPEL, m_creature->GetGUID()); + pWho->RemoveAurasDueToSpell(SPELL_LASHHAN_CHANNEL); + } + } + + ScriptedAI::MoveInLineOfSight(pWho); + } +}; + +CreatureAI* GetAI_npc_daranelle(Creature* pCreature) +{ + return new npc_daranelleAI(pCreature); +} + +/*###### +## npc_overseer_nuaar +######*/ + +bool GossipHello_npc_overseer_nuaar(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->GetQuestStatus(10682) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Overseer, I am here to negotiate on behalf of the Cenarion Expedition.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + pPlayer->SEND_GOSSIP_MENU(10532, pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_overseer_nuaar(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + pPlayer->SEND_GOSSIP_MENU(10533, pCreature->GetGUID()); + pPlayer->AreaExploredOrEventHappens(10682); + } + return true; +} + +/*###### +## npc_saikkal_the_elder +######*/ + +bool GossipHello_npc_saikkal_the_elder(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->GetQuestStatus(10980) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Yes... yes, it's me.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + pPlayer->SEND_GOSSIP_MENU(10794, pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_saikkal_the_elder(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Yes elder. Tell me more of the book.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->SEND_GOSSIP_MENU(10795, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(10796, pCreature->GetGUID()); + break; + } + return true; +} + +/*###### +## npc_skyguard_handler_irena +######*/ + +#define GOSSIP_SKYGUARD "Fly me to Skettis please" + +bool GossipHello_npc_skyguard_handler_irena(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetReputationRank(1031) >= REP_HONORED) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SKYGUARD, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_skyguard_handler_irena(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->CastSpell(pPlayer,41278,true); //TaxiPath 706 + } + return true; +} + +/*###### +## AddSC +######*/ + +void AddSC_blades_edge_mountains() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "mobs_bladespire_ogre"; + newscript->GetAI = &GetAI_mobs_bladespire_ogre; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mobs_nether_drake"; + newscript->GetAI = &GetAI_mobs_nether_drake; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_daranelle"; + newscript->GetAI = &GetAI_npc_daranelle; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_overseer_nuaar"; + newscript->pGossipHello = &GossipHello_npc_overseer_nuaar; + newscript->pGossipSelect = &GossipSelect_npc_overseer_nuaar; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_saikkal_the_elder"; + newscript->pGossipHello = &GossipHello_npc_saikkal_the_elder; + newscript->pGossipSelect = &GossipSelect_npc_saikkal_the_elder; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_skyguard_handler_irena"; + newscript->pGossipHello = &GossipHello_npc_skyguard_handler_irena; + newscript->pGossipSelect = &GossipSelect_npc_skyguard_handler_irena; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/boss_doomlord_kazzak.cpp b/scripts/outland/boss_doomlord_kazzak.cpp new file mode 100644 index 000000000..74fa9837c --- /dev/null +++ b/scripts/outland/boss_doomlord_kazzak.cpp @@ -0,0 +1,181 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Doomlord_Kazzak +SD%Complete: 70 +SDComment: Using incorrect spell for Mark of Kazzak +SDCategory: Hellfire Peninsula +EndScriptData */ + +#include "precompiled.h" + +enum +{ + SAY_INTRO = -1000147, + SAY_AGGRO1 = -1000148, + SAY_AGGRO2 = -1000149, + SAY_SURPREME1 = -1000150, + SAY_SURPREME2 = -1000151, + SAY_KILL1 = -1000152, + SAY_KILL2 = -1000153, + SAY_KILL3 = -1000154, + SAY_DEATH = -1000155, + EMOTE_GENERIC_FRENZY = -1000002, + SAY_RAND1 = -1000157, + SAY_RAND2 = -1000158, + + SPELL_SHADOWVOLLEY = 32963, + SPELL_CLEAVE = 31779, + SPELL_THUNDERCLAP = 36706, + SPELL_VOIDBOLT = 39329, + SPELL_MARKOFKAZZAK = 32960, + SPELL_ENRAGE = 32964, + SPELL_CAPTURESOUL = 32966, + SPELL_TWISTEDREFLECTION = 21063 +}; + +struct MANGOS_DLL_DECL boss_doomlordkazzakAI : public ScriptedAI +{ + boss_doomlordkazzakAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 ShadowVolley_Timer; + uint32 Cleave_Timer; + uint32 ThunderClap_Timer; + uint32 VoidBolt_Timer; + uint32 MarkOfKazzak_Timer; + uint32 Enrage_Timer; + uint32 Twisted_Reflection_Timer; + + void Reset() + { + ShadowVolley_Timer = urand(6000, 10000); + Cleave_Timer = 7000; + ThunderClap_Timer = urand(14000, 18000); + VoidBolt_Timer = 30000; + MarkOfKazzak_Timer = 25000; + Enrage_Timer = 60000; + Twisted_Reflection_Timer = 33000; // Timer may be incorrect + } + + void JustRespawned() + { + DoScriptText(SAY_INTRO, m_creature); + } + + void Aggro(Unit *who) + { + DoScriptText(urand(0, 1) ? SAY_AGGRO1 : SAY_AGGRO2, m_creature); + } + + void KilledUnit(Unit* victim) + { + // When Kazzak kills a player (not pets/totems), he regens some health + if (victim->GetTypeId() != TYPEID_PLAYER) + return; + + DoCast(m_creature,SPELL_CAPTURESOUL); + + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_KILL1, m_creature); break; + case 1: DoScriptText(SAY_KILL2, m_creature); break; + case 2: DoScriptText(SAY_KILL3, m_creature); break; + } + } + + void JustDied(Unit *victim) + { + DoScriptText(SAY_DEATH, m_creature); + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //ShadowVolley_Timer + if (ShadowVolley_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_SHADOWVOLLEY); + ShadowVolley_Timer = urand(4000, 6000); + }else ShadowVolley_Timer -= diff; + + //Cleave_Timer + if (Cleave_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_CLEAVE); + Cleave_Timer = urand(8000, 12000); + }else Cleave_Timer -= diff; + + //ThunderClap_Timer + if (ThunderClap_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_THUNDERCLAP); + ThunderClap_Timer = urand(10000, 14000); + }else ThunderClap_Timer -= diff; + + //VoidBolt_Timer + if (VoidBolt_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_VOIDBOLT); + VoidBolt_Timer = urand(15000, 18000); + }else VoidBolt_Timer -= diff; + + //MarkOfKazzak_Timer + if (MarkOfKazzak_Timer < diff) + { + Unit* victim = SelectUnit(SELECT_TARGET_RANDOM, 0); + if (victim->GetPower(POWER_MANA)) + { + DoCast(victim, SPELL_MARKOFKAZZAK); + MarkOfKazzak_Timer = 20000; + } + }else MarkOfKazzak_Timer -= diff; + + //Enrage_Timer + if (Enrage_Timer < diff) + { + DoScriptText(EMOTE_GENERIC_FRENZY, m_creature); + DoCast(m_creature,SPELL_ENRAGE); + Enrage_Timer = 30000; + }else Enrage_Timer -= diff; + + if (Twisted_Reflection_Timer < diff) + { + DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_TWISTEDREFLECTION); + Twisted_Reflection_Timer = 15000; + }else Twisted_Reflection_Timer -= diff; + + DoMeleeAttackIfReady(); + } + +}; + +CreatureAI* GetAI_boss_doomlordkazzak(Creature* pCreature) +{ + return new boss_doomlordkazzakAI(pCreature); +} + +void AddSC_boss_doomlordkazzak() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_doomlord_kazzak"; + newscript->GetAI = &GetAI_boss_doomlordkazzak; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/boss_doomwalker.cpp b/scripts/outland/boss_doomwalker.cpp new file mode 100644 index 000000000..cdc5942cf --- /dev/null +++ b/scripts/outland/boss_doomwalker.cpp @@ -0,0 +1,184 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Doomwalker +SD%Complete: 100 +SDComment: +SDCategory: Shadowmoon Valley +EndScriptData */ + +#include "precompiled.h" + +#define SAY_AGGRO -1000159 +#define SAY_EARTHQUAKE_1 -1000160 +#define SAY_EARTHQUAKE_2 -1000161 +#define SAY_OVERRUN_1 -1000162 +#define SAY_OVERRUN_2 -1000163 +#define SAY_SLAY_1 -1000164 +#define SAY_SLAY_2 -1000165 +#define SAY_SLAY_3 -1000166 +#define SAY_DEATH -1000167 + +#define SPELL_EARTHQUAKE 32686 +#define SPELL_SUNDER_ARMOR 33661 +#define SPELL_CHAIN_LIGHTNING 33665 +#define SPELL_OVERRUN 32636 +#define SPELL_ENRAGE 33653 +#define SPELL_MARK_DEATH 37128 +#define SPELL_AURA_DEATH 37131 + +struct MANGOS_DLL_DECL boss_doomwalkerAI : public ScriptedAI +{ + boss_doomwalkerAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 Chain_Timer; + uint32 Enrage_Timer; + uint32 Overrun_Timer; + uint32 Quake_Timer; + uint32 Armor_Timer; + + bool InEnrage; + + void Reset() + { + Enrage_Timer = 0; + Armor_Timer = urand(5000, 13000); + Chain_Timer = urand(10000, 30000); + Quake_Timer = urand(25000, 35000); + Overrun_Timer = urand(30000, 45000); + + InEnrage = false; + } + + void KilledUnit(Unit* Victim) + { + + Victim->CastSpell(Victim,SPELL_MARK_DEATH,0); + + if (urand(0, 4)) + return; + + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_SLAY_1, m_creature); break; + case 1: DoScriptText(SAY_SLAY_2, m_creature); break; + case 2: DoScriptText(SAY_SLAY_3, m_creature); break; + } + + } + + void JustDied(Unit* Killer) + { + DoScriptText(SAY_DEATH, m_creature); + } + + void Aggro(Unit *who) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + + void MoveInLineOfSight(Unit *who) + { + if (who && who->GetTypeId() == TYPEID_PLAYER && m_creature->IsHostileTo(who)) + { + if (who->HasAura(SPELL_MARK_DEATH,0)) + { + who->CastSpell(who,SPELL_AURA_DEATH,1); + } + } + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Spell Enrage, when hp <= 20% gain enrage + if (((m_creature->GetHealth()*100)/ m_creature->GetMaxHealth()) <= 20) + { + if (Enrage_Timer < diff) + { + DoCast(m_creature,SPELL_ENRAGE); + Enrage_Timer = 6000; + InEnrage = true; + }else Enrage_Timer -= diff; + } + + //Spell Overrun + if (Overrun_Timer < diff) + { + DoScriptText(urand(0, 1) ? SAY_OVERRUN_1 : SAY_OVERRUN_2, m_creature); + DoCast(m_creature->getVictim(),SPELL_OVERRUN); + Overrun_Timer = urand(25000, 40000); + }else Overrun_Timer -= diff; + + //Spell Earthquake + if (Quake_Timer < diff) + { + if (urand(0, 1)) + return; + + DoScriptText(urand(0, 1) ? SAY_EARTHQUAKE_1 : SAY_EARTHQUAKE_2, m_creature); + + //remove enrage before casting earthquake because enrage + earthquake = 16000dmg over 8sec and all dead + if (InEnrage) + m_creature->RemoveAura(SPELL_ENRAGE, 0); + + DoCast(m_creature,SPELL_EARTHQUAKE); + Quake_Timer = urand(30000, 55000); + }else Quake_Timer -= diff; + + //Spell Chain Lightning + if (Chain_Timer < diff) + { + Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM,1); + + if (!target) + target = m_creature->getVictim(); + + if (target) + DoCast(target,SPELL_CHAIN_LIGHTNING); + + Chain_Timer = urand(7000, 27000); + }else Chain_Timer -= diff; + + //Spell Sunder Armor + if (Armor_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_SUNDER_ARMOR); + Armor_Timer = urand(10000, 25000); + }else Armor_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_doomwalker(Creature* pCreature) +{ + return new boss_doomwalkerAI(pCreature); +} + +void AddSC_boss_doomwalker() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_doomwalker"; + newscript->GetAI = &GetAI_boss_doomwalker; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp new file mode 100644 index 000000000..6021c7ab9 --- /dev/null +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp @@ -0,0 +1,605 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Fathomlord_Karathress +SD%Complete: 60 +SDComment: Missing Multishot, Totems, Windfury, Whirlwind +SDCategory: Coilfang Resevoir, Serpent Shrine Cavern +EndScriptData */ + +#include "precompiled.h" +#include "serpent_shrine.h" + +enum +{ + SAY_AGGRO = -1548021, + SAY_GAIN_BLESSING = -1548022, + SAY_GAIN_ABILITY1 = -1548023, + SAY_GAIN_ABILITY2 = -1548024, + SAY_GAIN_ABILITY3 = -1548025, + SAY_SLAY1 = -1548026, + SAY_SLAY2 = -1548027, + SAY_SLAY3 = -1548028, + SAY_DEATH = -1548029, + + //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_HURL_TRIDENT = 38374, + SPELL_MULTI_TOSS = 38366, + SPELL_SUMMON_FATHOM_LURKER = 38433, + SPELL_SUMMON_FATHOM_SPOREBAT = 38431, + + //Tidalvess spells + SPELL_FROST_SHOCK = 38234, + SPELL_SPITFIRE_TOTEM = 38236, + SPELL_POISON_CLEANSING_TOTEM = 38306, + SPELL_EARTHBIND_TOTEM = 38304, + SPELL_WINDFURY_WEAPON = 32911, // triggers spell 32912 (Windfury) + + //Caribdis Spells + SPELL_WATER_BOLT_VOLLEY = 38335, + SPELL_TIDAL_SURGE = 38353, // triggers 38357 + SPELL_HEAL = 38330, + SPELL_SUMMON_CYCLONE = 38337, // summons creature 22104 which uses spell 29538 + + MAX_ADVISORS = 3, + + NPC_SEER_OLUM = 22820 +}; + +// position for Seer Olum +const float afCoords_Olum[] = {446.78f, -542.76f, -7.54773f, 0.401581f}; + +//Fathom-Lord Karathress AI +struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI +{ + boss_fathomlord_karathressAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + memset(&m_auiAdvisorsGUID, 0, sizeof(m_auiAdvisorsGUID)); + Reset(); + } + + ScriptedInstance* m_pInstance; + + // timers + uint32 m_uiCataclysmicBolt_Timer; + uint32 m_uiEnrage_Timer; + + bool m_bBlessingOfTides_MobsChecked; + + uint64 m_auiAdvisorsGUID[MAX_ADVISORS]; // the GUIDs from the advisors + + void Reset() + { + m_uiCataclysmicBolt_Timer = 10000; + m_uiEnrage_Timer = 600000; + m_bBlessingOfTides_MobsChecked = false; + + for(uint8 i = 0; i < MAX_ADVISORS; ++i) + { + if (Creature* pAdvisor = (Creature*)Unit::GetUnit(*m_creature, m_auiAdvisorsGUID[i])) + { + if (pAdvisor->getVictim()) + pAdvisor->AI()->EnterEvadeMode(); + else if (!pAdvisor->isAlive()) + pAdvisor->Respawn(); + } + } + + if (m_pInstance) + m_pInstance->SetData(TYPE_KARATHRESS_EVENT, NOT_STARTED); + } + + // select the spell and the text based on the advisor which died + void EventAdvisorDeath(uint8 uiAdvisor) + { + if(!m_creature->isAlive()) + return; + + int32 iSayGainAbility = 0; + uint32 uiSpell = 0; + + switch(uiAdvisor) + { + case DATA_SHARKKIS: + iSayGainAbility = SAY_GAIN_ABILITY1; + uiSpell = SPELL_POWER_OF_SHARKKIS; + break; + case DATA_TIDALVESS: + iSayGainAbility = SAY_GAIN_ABILITY2; + uiSpell = SPELL_POWER_OF_TIDALVESS; + break; + case DATA_CARIBDIS: + iSayGainAbility = SAY_GAIN_ABILITY3; + uiSpell = SPELL_POWER_OF_CARIBDIS; + break; + default: + error_log("SD2: invalid advisor (id %u) for karathress!", uiAdvisor); + break; + } + + DoScriptText(iSayGainAbility, m_creature); + DoCast(m_creature, uiSpell); + } + + void GetAdvisors() + { + if (!m_pInstance) + return; + + m_auiAdvisorsGUID[0] = m_pInstance->GetData64(DATA_SHARKKIS); + m_auiAdvisorsGUID[1] = m_pInstance->GetData64(DATA_TIDALVESS); + m_auiAdvisorsGUID[2] = m_pInstance->GetData64(DATA_CARIBDIS); + } + + void Aggro(Unit* pWho) + { + if (!m_pInstance) + return; + + GetAdvisors(); + + DoScriptText(SAY_AGGRO, m_creature); + + m_pInstance->SetData64(DATA_KARATHRESS_STARTER, pWho->GetGUID()); + m_pInstance->SetData(TYPE_KARATHRESS_EVENT, IN_PROGRESS); + } + + void KilledUnit(Unit* pVictim) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_SLAY1, m_creature); break; + case 1: DoScriptText(SAY_SLAY2, m_creature); break; + case 2: DoScriptText(SAY_SLAY3, m_creature); break; + } + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_KARATHRESS_EVENT, DONE); + + //support for quest 10944 + m_creature->SummonCreature(NPC_SEER_OLUM, afCoords_Olum[0], afCoords_Olum[1], afCoords_Olum[2], afCoords_Olum[3], TEMPSUMMON_TIMED_DESPAWN, 3600000); + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + { + //check if the event is started + if (m_pInstance && m_pInstance->GetData(TYPE_KARATHRESS_EVENT) == IN_PROGRESS) + { + if (Unit* pTarget = Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_KARATHRESS_STARTER))) + { + AttackStart(pTarget); + GetAdvisors(); + } + } + return; + } + + //someone evaded! + if (m_pInstance && m_pInstance->GetData(TYPE_KARATHRESS_EVENT) == NOT_STARTED) + { + EnterEvadeMode(); + return; + } + + //m_uiCataclysmicBolt_Timer + if (m_uiCataclysmicBolt_Timer < uiDiff) + { + //select a random unit other than the main tank + Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1); + + //if there aren't other units, cast on the tank + if (!pTarget) + pTarget = m_creature->getVictim(); + + m_creature->CastSpell(pTarget, SPELL_CATACLYSMIC_BOLT, false); + + m_uiCataclysmicBolt_Timer = 10000; + }else m_uiCataclysmicBolt_Timer -= uiDiff; + + //hp under 75% + if (!m_bBlessingOfTides_MobsChecked && ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) <= 75)) + { + for(uint8 i = 0; i < MAX_ADVISORS; ++i) + { + if (Unit* pAdvisor = Unit::GetUnit(*m_creature, m_auiAdvisorsGUID[i])) + { + //stack max three times (one for each alive) + if (pAdvisor->isAlive()) + { + pAdvisor->InterruptNonMeleeSpells(false); + pAdvisor->CastSpell(m_creature, SPELL_BLESSING_OF_THE_TIDES, false); + } + } + } + + //yell if we now have the aura + if (m_creature->HasAura(SPELL_BLESSING_OF_THE_TIDES)) + DoScriptText(SAY_GAIN_BLESSING, m_creature); + + m_bBlessingOfTides_MobsChecked = true; + } + + //m_uiEnrage_Timer + if (m_uiEnrage_Timer < uiDiff) + { + DoCast(m_creature, SPELL_ENRAGE); + m_uiEnrage_Timer = 90000; + }else m_uiEnrage_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +// Base AI for every advisor +struct MANGOS_DLL_DECL Advisor_Base_AI : public ScriptedAI +{ + Advisor_Base_AI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + } + protected: + uint8 m_uiAdvisor; + + public: + ScriptedInstance* m_pInstance; + + void JustReachedHome() + { + if (m_pInstance && m_pInstance->GetData(TYPE_KARATHRESS_EVENT) == IN_PROGRESS) + m_pInstance->SetData(TYPE_KARATHRESS_EVENT, NOT_STARTED); + } + + void Aggro(Unit *pWho) + { + if (!m_pInstance) + return; + + if (m_pInstance->GetData(TYPE_KARATHRESS_EVENT) == NOT_STARTED) + m_pInstance->SetData(TYPE_KARATHRESS_EVENT, IN_PROGRESS); + + m_pInstance->SetData64(DATA_KARATHRESS_STARTER, pWho->GetGUID()); + } + + void JustDied(Unit* pVictim) + { + if (!m_pInstance) + return; + + if (Creature* pKarathress = (Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_KARATHRESS))) + ((boss_fathomlord_karathressAI*)pKarathress->AI())->EventAdvisorDeath(m_uiAdvisor); + } +}; + +//Fathom-Guard Sharkkis AI +struct MANGOS_DLL_DECL boss_fathomguard_sharkkisAI : public Advisor_Base_AI +{ + boss_fathomguard_sharkkisAI(Creature* pCreature) : Advisor_Base_AI(pCreature) + { + Reset(); + m_uiAdvisor = DATA_SHARKKIS; + } + + // timers + uint32 m_uiHurlTrident_Timer; + uint32 m_uiLeechingThrow_Timer; + uint32 m_uiTheBeastWithin_Timer; + uint32 m_uiPet_Timer; + + bool m_bIsPetCheckNeeded; + + void Reset() + { + m_uiHurlTrident_Timer = 2500; + m_uiLeechingThrow_Timer = 20000; + m_uiTheBeastWithin_Timer = 30000; + m_uiPet_Timer = 10000; + + m_bIsPetCheckNeeded = true; + } + + void AttackStart(Unit* pWho) + { + if (!pWho) + return; + + if (m_creature->Attack(pWho, false)) + { + m_creature->AddThreat(pWho, 0.0f); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + + //using larger distance, since hunter type + m_creature->GetMotionMaster()->MoveChase(pWho, 15.0f); + } + } + + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->isPet()) + { + m_uiPet_Timer = 10000; + m_bIsPetCheckNeeded = false; + } + } + + void SummonedCreatureDespawn(Creature* pDespawned) + { + if (pDespawned->isPet()) + m_bIsPetCheckNeeded = true; + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + { + //check if the event is started + if (m_pInstance && m_pInstance->GetData(TYPE_KARATHRESS_EVENT) == IN_PROGRESS) + { + if (Unit* pTarget = Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_KARATHRESS_STARTER))) + AttackStart(pTarget); + } + return; + } + + //someone evaded! + if (m_pInstance && m_pInstance->GetData(TYPE_KARATHRESS_EVENT) == NOT_STARTED) + { + EnterEvadeMode(); + return; + } + + //after 10 seconds: spawn pet if not exist + if (m_bIsPetCheckNeeded) + { + if (m_uiPet_Timer < uiDiff) + { + if (!m_creature->GetPet()) + DoCast(m_creature, urand(0,1) ? SPELL_SUMMON_FATHOM_LURKER : SPELL_SUMMON_FATHOM_SPOREBAT); + } + else + m_uiPet_Timer -= uiDiff; + } + + //m_uiHurlTrident_Timer + if (m_uiHurlTrident_Timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + { + if (!m_creature->IsWithinDist(pTarget,ATTACK_DISTANCE)) + DoCast(pTarget, SPELL_HURL_TRIDENT); + } + + m_uiHurlTrident_Timer = 5000; + }else m_uiHurlTrident_Timer -= uiDiff; + + //m_uiLeechingThrow_Timer + if (m_uiLeechingThrow_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_LEECHING_THROW); + m_uiLeechingThrow_Timer = 20000; + }else m_uiLeechingThrow_Timer -= uiDiff; + + //m_uiTheBeastWithin_Timer + if (m_uiTheBeastWithin_Timer < uiDiff) + { + DoCast(m_creature, SPELL_THE_BEAST_WITHIN); + m_uiTheBeastWithin_Timer = 30000; + }else m_uiTheBeastWithin_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +//Fathom-Guard Tidalvess AI +struct MANGOS_DLL_DECL boss_fathomguard_tidalvessAI : public Advisor_Base_AI +{ + boss_fathomguard_tidalvessAI(Creature* pCreature) : Advisor_Base_AI(pCreature) + { + Reset(); + m_uiAdvisor = DATA_TIDALVESS; + } + + // timers + uint32 m_uiFrostShock_Timer; + + void Reset() + { + m_uiFrostShock_Timer = 25000; + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + { + //check if the event is started + if (m_pInstance && m_pInstance->GetData(TYPE_KARATHRESS_EVENT) == IN_PROGRESS) + { + if (Unit* pTarget = Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_KARATHRESS_STARTER))) + AttackStart(pTarget); + } + return; + } + + //someone evaded! + if (m_pInstance && m_pInstance->GetData(TYPE_KARATHRESS_EVENT) == NOT_STARTED) + { + EnterEvadeMode(); + return; + } + + //m_uiFrostShock_Timer + if (m_uiFrostShock_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_FROST_SHOCK); + m_uiFrostShock_Timer = urand(25000, 30000); + }else m_uiFrostShock_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +//Fathom-Guard Caribdis AI +struct MANGOS_DLL_DECL boss_fathomguard_caribdisAI : public Advisor_Base_AI +{ + boss_fathomguard_caribdisAI(Creature* pCreature) : Advisor_Base_AI(pCreature) + { + Reset(); + m_uiAdvisor = DATA_CARIBDIS; + } + + // timers + uint32 m_uiWaterBoltVolley_Timer; + uint32 m_uiTidalSurge_Timer; + uint32 m_uiHeal_Timer; + + void Reset() + { + m_uiWaterBoltVolley_Timer = 35000; + m_uiTidalSurge_Timer = urand(15000, 20000); + m_uiHeal_Timer = 55000; + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + { + //check if the event is started + if (m_pInstance && m_pInstance->GetData(TYPE_KARATHRESS_EVENT) == IN_PROGRESS) + { + if (Unit* pTarget = Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_KARATHRESS_STARTER))) + AttackStart(pTarget); + } + return; + } + + //someone evaded! + if (m_pInstance && m_pInstance->GetData(TYPE_KARATHRESS_EVENT) == NOT_STARTED) + { + EnterEvadeMode(); + return; + } + + //m_uiWaterBoltVolley_Timer + if (m_uiWaterBoltVolley_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_WATER_BOLT_VOLLEY); + m_uiWaterBoltVolley_Timer = 30000; + }else m_uiWaterBoltVolley_Timer -= uiDiff; + + //m_uiTidalSurge_Timer + if (m_uiTidalSurge_Timer < uiDiff) + { + // the victim has to cast it on himself because in the spell.dbc the EffectImplicitTargetA1 is 1 (TARGET_SELF) + m_creature->getVictim()->CastSpell(m_creature->getVictim(), SPELL_TIDAL_SURGE, true); + m_uiTidalSurge_Timer = urand(15000, 20000); + }else m_uiTidalSurge_Timer -= uiDiff; + + //m_uiHeal_Timer + if (m_uiHeal_Timer < uiDiff) + { + // It can be cast on any of the mobs + Unit* pUnit = NULL; + + if (m_pInstance) + { + switch(urand(0, 3)) + { + case 0: pUnit = Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_KARATHRESS)); break; + case 1: pUnit = Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_SHARKKIS)); break; + case 2: pUnit = Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_TIDALVESS)); break; + case 3: pUnit = m_creature; break; + } + } + else + pUnit = m_creature; + + if (pUnit && pUnit->isAlive()) + DoCast(pUnit, SPELL_HEAL); + + m_uiHeal_Timer = 60000; + }else m_uiHeal_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_fathomlord_karathress(Creature* pCreature) +{ + return new boss_fathomlord_karathressAI(pCreature); +} + +CreatureAI* GetAI_boss_fathomguard_sharkkis(Creature* pCreature) +{ + return new boss_fathomguard_sharkkisAI(pCreature); +} + +CreatureAI* GetAI_boss_fathomguard_tidalvess(Creature* pCreature) +{ + return new boss_fathomguard_tidalvessAI(pCreature); +} + +CreatureAI* GetAI_boss_fathomguard_caribdis(Creature* pCreature) +{ + return new boss_fathomguard_caribdisAI(pCreature); +} + +void AddSC_boss_fathomlord_karathress() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_fathomlord_karathress"; + newscript->GetAI = &GetAI_boss_fathomlord_karathress; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_fathomguard_sharkkis"; + newscript->GetAI = &GetAI_boss_fathomguard_sharkkis; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_fathomguard_tidalvess"; + newscript->GetAI = &GetAI_boss_fathomguard_tidalvess; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_fathomguard_caribdis"; + newscript->GetAI = &GetAI_boss_fathomguard_caribdis; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp new file mode 100644 index 000000000..73d7e850a --- /dev/null +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp @@ -0,0 +1,322 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Hydross_The_Unstable +SD%Complete: 90 +SDComment: Some details and adjustments left to do, probably nothing major. Spawns may be spawned in different way/location. code cleanup needed +SDCategory: Coilfang Resevoir, Serpent Shrine Cavern +EndScriptData */ + +#include "precompiled.h" +#include "serpent_shrine.h" + +enum +{ + SAY_AGGRO = -1548000, + SAY_SWITCH_TO_CLEAN = -1548001, + SAY_CLEAN_SLAY1 = -1548002, + SAY_CLEAN_SLAY2 = -1548003, + SAY_CLEAN_DEATH = -1548004, + SAY_SWITCH_TO_CORRUPT = -1548005, + SAY_CORRUPT_SLAY1 = -1548006, + SAY_CORRUPT_SLAY2 = -1548007, + SAY_CORRUPT_DEATH = -1548008, + + 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 = 38015, //channeled Hydross Beam Helper (not in use yet) + SPELL_PURIFY_ELEMENTAL = 36461, //(not in use) visualize the line by tainting/purifying mobs + + NPC_PURE_SPAWN = 22035, + NPC_TAINTED_SPAWN = 22036 +}; + +const float afSpawnDiffs[4][2] = +{ + {6.934003f , -11.255012f}, // diff 1 + {-6.934003f , 11.255012f }, // diff 2 + {-12.577011f, -4.72702f }, // diff 3 + {12.577011f , 4.72702f } // diff 4 +}; + +struct MANGOS_DLL_DECL boss_hydross_the_unstableAI : public ScriptedAI +{ + boss_hydross_the_unstableAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; // the instance + + uint32 m_uiPosCheck_Timer; + uint32 m_uiMarkOfHydross_Timer; + uint32 m_uiMarkOfCorruption_Timer; + uint32 m_uiWaterTomb_Timer; + uint32 m_uiVileSludge_Timer; + uint32 m_uiMarkOfHydross_Count; + uint32 m_uiMarkOfCorruption_Count; + uint32 m_uiEnrageTimer; + bool m_bCorruptedForm; + + void Reset() + { + m_uiPosCheck_Timer = 2500; + m_uiMarkOfHydross_Timer = 15000; + m_uiMarkOfCorruption_Timer = 15000; + m_uiWaterTomb_Timer = 7000; + m_uiVileSludge_Timer = 7000; + m_uiMarkOfHydross_Count = 0; + m_uiMarkOfCorruption_Count = 0; + m_uiEnrageTimer = 600000; + + m_bCorruptedForm = false; + + m_creature->SetMeleeDamageSchool(SPELL_SCHOOL_FROST); + m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true); + m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, false); + + m_creature->SetDisplayId(MODEL_CLEAN); + + if (m_pInstance) + m_pInstance->SetData(TYPE_HYDROSS_EVENT, NOT_STARTED); + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_HYDROSS_EVENT, IN_PROGRESS); + } + + void KilledUnit(Unit* pVictim) + { + if (m_bCorruptedForm) + DoScriptText(urand(0,1) ? SAY_CORRUPT_SLAY1 : SAY_CORRUPT_SLAY2, m_creature); + else + DoScriptText(urand(0,1) ? SAY_CLEAN_SLAY1 : SAY_CLEAN_SLAY2, m_creature); + } + + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_PURE_SPAWN) + pSummoned->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true); + else if (pSummoned->GetEntry() == NPC_TAINTED_SPAWN) + pSummoned->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, true); + + pSummoned->CastSpell(pSummoned, SPELL_ELEMENTAL_SPAWNIN, true); + } + + void JustDied(Unit* pVictim) + { + DoScriptText(m_bCorruptedForm ? SAY_CORRUPT_DEATH : SAY_CLEAN_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_HYDROSS_EVENT, DONE); + } + + void SpawnAdds() + { + for(uint8 i = 0; i < 4; ++i) + DoSpawnCreature(m_bCorruptedForm ? NPC_TAINTED_SPAWN : NPC_PURE_SPAWN, + afSpawnDiffs[i][0], afSpawnDiffs[i][1], 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // corrupted form + if (m_bCorruptedForm) + { + //MarkOfCorruption_Timer + if (m_uiMarkOfCorruption_Timer < uiDiff) + { + if (m_uiMarkOfCorruption_Count <= 5) + { + uint32 uiMarkSpell = 0; + + switch(m_uiMarkOfCorruption_Count) + { + case 0: uiMarkSpell = SPELL_MARK_OF_CORRUPTION1; break; + case 1: uiMarkSpell = SPELL_MARK_OF_CORRUPTION2; break; + case 2: uiMarkSpell = SPELL_MARK_OF_CORRUPTION3; break; + case 3: uiMarkSpell = SPELL_MARK_OF_CORRUPTION4; break; + case 4: uiMarkSpell = SPELL_MARK_OF_CORRUPTION5; break; + case 5: uiMarkSpell = SPELL_MARK_OF_CORRUPTION6; break; + } + + DoCast(m_creature->getVictim(), uiMarkSpell); + + if (m_uiMarkOfCorruption_Count < 5) + ++m_uiMarkOfCorruption_Count; + } + + m_uiMarkOfCorruption_Timer = 15000; + }else m_uiMarkOfCorruption_Timer -= uiDiff; + + //VileSludge_Timer + if (m_uiVileSludge_Timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, SPELL_VILE_SLUDGE); + + m_uiVileSludge_Timer = 15000; + }else m_uiVileSludge_Timer -= uiDiff; + + //PosCheck_Timer + if (m_uiPosCheck_Timer < uiDiff) + { + float fPosX, fPosY, fPosZ; + m_creature->GetCombatStartPosition(fPosX, fPosY, fPosZ); + + if (m_creature->IsWithinDist2d(fPosX, fPosY, SWITCH_RADIUS)) + { + DoScriptText(SAY_SWITCH_TO_CLEAN, m_creature); + + // switch to clean form + m_creature->SetDisplayId(MODEL_CLEAN); + m_uiMarkOfHydross_Count = 0; + DoResetThreat(); + + // spawn 4 adds + SpawnAdds(); + + m_creature->SetMeleeDamageSchool(SPELL_SCHOOL_FROST); + m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true); + m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, false); + + m_bCorruptedForm = false; + } + + m_uiPosCheck_Timer = 2500; + }else m_uiPosCheck_Timer -=uiDiff; + } + // clean form + else + { + //MarkOfHydross_Timer + if (m_uiMarkOfHydross_Timer < uiDiff) + { + if (m_uiMarkOfHydross_Count <= 5) + { + uint32 uiMarkSpell; + + switch(m_uiMarkOfHydross_Count) + { + case 0: uiMarkSpell = SPELL_MARK_OF_HYDROSS1; break; + case 1: uiMarkSpell = SPELL_MARK_OF_HYDROSS2; break; + case 2: uiMarkSpell = SPELL_MARK_OF_HYDROSS3; break; + case 3: uiMarkSpell = SPELL_MARK_OF_HYDROSS4; break; + case 4: uiMarkSpell = SPELL_MARK_OF_HYDROSS5; break; + case 5: uiMarkSpell = SPELL_MARK_OF_HYDROSS6; break; + } + + DoCast(m_creature->getVictim(), uiMarkSpell); + + if (m_uiMarkOfHydross_Count < 5) + ++m_uiMarkOfHydross_Count; + } + + m_uiMarkOfHydross_Timer = 15000; + }else m_uiMarkOfHydross_Timer -= uiDiff; + + //WaterTomb_Timer + if (m_uiWaterTomb_Timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, SPELL_WATER_TOMB); + + m_uiWaterTomb_Timer = 7000; + }else m_uiWaterTomb_Timer -= uiDiff; + + //PosCheck_Timer + if (m_uiPosCheck_Timer < uiDiff) + { + float fPosX, fPosY, fPosZ; + m_creature->GetCombatStartPosition(fPosX, fPosY, fPosZ); + + if (!m_creature->IsWithinDist2d(fPosX, fPosY, SWITCH_RADIUS)) + { + DoScriptText(SAY_SWITCH_TO_CORRUPT, m_creature); + + // switch to corrupted form + m_creature->SetDisplayId(MODEL_CORRUPT); + m_uiMarkOfCorruption_Count = 0; + DoResetThreat(); + + // spawn 4 adds + SpawnAdds(); + + m_creature->SetMeleeDamageSchool(SPELL_SCHOOL_NATURE); + m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, true); + m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, false); + + m_bCorruptedForm = true; + } + + m_uiPosCheck_Timer = 2500; + }else m_uiPosCheck_Timer -=uiDiff; + } + + //EnrageTimer + if (m_uiEnrageTimer < uiDiff) + { + DoCast(m_creature, SPELL_ENRAGE); + m_uiEnrageTimer = 60000; + }else m_uiEnrageTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_hydross_the_unstable(Creature* pCreature) +{ + return new boss_hydross_the_unstableAI(pCreature); +} + +void AddSC_boss_hydross_the_unstable() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_hydross_the_unstable"; + newscript->GetAI = &GetAI_boss_hydross_the_unstable; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp new file mode 100644 index 000000000..8f93675db --- /dev/null +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp @@ -0,0 +1,806 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA02111-1307USA + */ + +/* ScriptData +SDName: Boss_Lady_Vashj +SD%Complete: 60 +SDComment: Code cleanup needed. This script needs further adjustments. +SDCategory: Coilfang Resevoir, Serpent Shrine Cavern +EndScriptData */ + +#include "precompiled.h" +#include "serpent_shrine.h" +#include "simple_ai.h" +#include "Item.h" +#include "Spell.h" + +enum +{ + SAY_INTRO = -1548042, + SAY_AGGRO1 = -1548043, + SAY_AGGRO2 = -1548044, + SAY_AGGRO3 = -1548045, + SAY_AGGRO4 = -1548046, + SAY_PHASE1 = -1548047, + SAY_PHASE2 = -1548048, + SAY_PHASE3 = -1548049, + SAY_BOWSHOT1 = -1548050, + SAY_BOWSHOT2 = -1548051, + SAY_SLAY1 = -1548052, + SAY_SLAY2 = -1548053, + SAY_SLAY3 = -1548054, + SAY_DEATH = -1548055, + + POINT_MOVE_CENTER = 0, + + PHASE_1 = 1, + PHASE_2 = 2, + PHASE_3 = 3, + + MAX_SHIELD_GEN = 4, + + SPELL_MULTI_SHOT = 38310, + SPELL_SHOCK_BLAST = 38509, + SPELL_ENTANGLE = 38316, + SPELL_STATIC_CHARGE_TRIGGER = 38280, + SPELL_FORKED_LIGHTNING = 38145, + SPELL_SHOOT = 38295, + + SPELL_TOXIC_SPORES = 38575, + SPELL_MAGIC_BARRIER = 38112, + SPELL_SURGE = 38044, + + //tainted elemental + SPELL_POISON_BOLT = 38253, + SPELL_SUMMON_TAINTED = 38139, + + NPC_ENCHANTED_ELEMENTAL = 21958, + NPC_TAINTED_ELEMENTAL = 22009, + NPC_COILFANG_STRIDER = 22056, + NPC_COILFANG_ELITE = 22055, + NPC_TOXIC_SPOREBAT = 22140, + + NPC_SHIELD_GENERATOR = 19870 +}; + +const float afMiddlePos[3] = {30.134f, -923.65f, 42.9f}; + +const float afSporebatPos[4] = {30.977156f, -925.297761f, 77.176567f, 5.223932f}; + +const float afElementPos[8][4] = +{ + {8.3f , -835.3f , 21.9f, 5.0f}, + {53.4f , -835.3f , 21.9f, 4.5f}, + {96.0f , -861.9f , 21.8f, 4.0f}, + {96.0f , -986.4f , 21.4f, 2.5f}, + {54.4f , -1010.6f, 22.0f, 1.8f}, + {9.8f , -1012.0f, 21.7f, 1.4f}, + {-35.0f, -987.6f , 21.5f, 0.8f}, + {-58.9f, -901.6f , 21.5f, 6.0f} +}; + +const float afCoilfangElitePos[3][4] = +{ + {28.84f , -923.28f , 42.9f , 6.0f }, + {31.183281f, -953.502625f, 41.523602f, 1.640957f}, + {58.895180f, -923.124268f, 41.545307f, 3.152848f} +}; + +const float afCoilfangStriderPos[3][4] = +{ + {66.427f, -948.778f, 41.262245f, 2.584f}, + {7.513f , -959.538f, 41.300422f, 1.0346f}, + {-12.843f, -907.798f, 41.239620f, 6.087f} +}; + +const float afShieldGeneratorChannelPos[4][4] = +{ + {49.626f, -902.181f, 41.54f, 3.956f}, + {10.988f, -901.616f, 41.54f, 5.437f}, + {10.385f, -944.036f, 41.54f, 0.779f}, + {49.312f, -943.398f, 41.54f, 2.401f} +}; + +//Lady Vashj AI +struct MANGOS_DLL_DECL boss_lady_vashjAI : public ScriptedAI +{ + boss_lady_vashjAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + memset(&m_auiShieldGeneratorChannel, 0, sizeof(m_auiShieldGeneratorChannel)); + Reset(); + } + + ScriptedInstance *m_pInstance; // the instance + + uint64 m_auiShieldGeneratorChannel[MAX_SHIELD_GEN]; + + // timers + uint32 m_uiShockBlast_Timer; + uint32 m_uiEntangle_Timer; + uint32 m_uiStaticCharge_Timer; + uint32 m_uiForkedLightning_Timer; + uint32 m_uiCheck_Timer; + uint32 m_uiEnchantedElemental_Timer; + uint32 m_uiTaintedElemental_Timer; + uint32 m_uiCoilfangElite_Timer; + uint32 m_uiCoilfangStrider_Timer; + uint32 m_uiSummonSporebat_Timer; + uint32 m_uiSummonSporebat_StaticTimer; + uint8 m_uiEnchantedElemental_Pos; + uint8 m_uiPhase; + + bool m_bEntangle; + + void Reset() + { + SetCombatMovement(true); + + m_uiShockBlast_Timer = urand(1000, 60000); + m_uiEntangle_Timer = 30000; + m_uiStaticCharge_Timer = urand(10000, 25000); + m_uiCheck_Timer = 1000; + + m_uiForkedLightning_Timer = urand(43000, 49000); + m_uiEnchantedElemental_Timer = 10000; + m_uiTaintedElemental_Timer = 50000; + m_uiCoilfangElite_Timer = 45000; + m_uiCoilfangStrider_Timer = 60000; + + m_uiSummonSporebat_Timer = 10000; + m_uiSummonSporebat_StaticTimer = 30000; + m_uiEnchantedElemental_Pos = 0; + m_uiPhase = PHASE_1; + + m_bEntangle = false; + + RemoveAllShieldGenerators(); + + if (m_pInstance) + m_pInstance->SetData(TYPE_LADYVASHJ_EVENT, NOT_STARTED); + } + + void RemoveAllShieldGenerators() + { + for(uint8 i = 0; i < MAX_SHIELD_GEN; ++i) + { + if (Unit* pTemp = Unit::GetUnit(*m_creature,m_auiShieldGeneratorChannel[i])) + { + if (pTemp->isAlive()) + pTemp->setDeathState(JUST_DIED); + + m_auiShieldGeneratorChannel[i] = 0; + } + } + } + + void Aggro(Unit* pWho) + { + switch(urand(0, 3)) + { + case 0: DoScriptText(SAY_AGGRO1, m_creature); break; + case 1: DoScriptText(SAY_AGGRO2, m_creature); break; + case 2: DoScriptText(SAY_AGGRO3, m_creature); break; + case 3: DoScriptText(SAY_AGGRO4, m_creature); break; + } + + if (m_pInstance) + m_pInstance->SetData(TYPE_LADYVASHJ_EVENT, IN_PROGRESS); + } + + void MovementInform(uint32 uiType, uint32 uiPointId) + { + if (uiType != POINT_MOTION_TYPE) + return; + + if (uiPointId == POINT_MOVE_CENTER) + { + m_creature->RemoveAllAuras(); + + for(uint8 i = 0; i < MAX_SHIELD_GEN; ++i) + { + if (Creature* pCreature = m_creature->SummonCreature(NPC_SHIELD_GENERATOR, afShieldGeneratorChannelPos[i][0], afShieldGeneratorChannelPos[i][1], afShieldGeneratorChannelPos[i][2], afShieldGeneratorChannelPos[i][3], TEMPSUMMON_CORPSE_DESPAWN, 0)) + m_auiShieldGeneratorChannel[i] = pCreature->GetGUID(); + } + } + } + + void JustSummoned(Creature* pSummoned) + { + uint32 uiEntry = pSummoned->GetEntry(); + + if (uiEntry == NPC_COILFANG_STRIDER || uiEntry == NPC_COILFANG_ELITE || uiEntry == NPC_TOXIC_SPOREBAT) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); + } + + if (uiEntry == NPC_SHIELD_GENERATOR) + { + //we should really expect database to have this set already + if (!pSummoned->HasFlag(UNIT_FIELD_FLAGS, (UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE))) + { + pSummoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + pSummoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } + + pSummoned->CastSpell(m_creature,SPELL_MAGIC_BARRIER,true); + } + } + + //called when any summoned (by m_creature) despawns + void SummonedCreatureDespawn(Creature* pDespawned) + { + if (pDespawned->GetEntry() == NPC_TAINTED_ELEMENTAL) + { + if (m_uiTaintedElemental_Timer > 50000) + m_uiTaintedElemental_Timer = 50000; + } + } + + void KilledUnit(Unit* pVictim) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_SLAY1, m_creature); break; + case 1: DoScriptText(SAY_SLAY2, m_creature); break; + case 2: DoScriptText(SAY_SLAY3, m_creature); break; + } + } + + void JustDied(Unit* pVictim) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_LADYVASHJ_EVENT, DONE); + } + + void CastShootOrMultishot() + { + //Shoot: Used in m_uiPhases 1 and 3 after Entangle or while having nobody in melee range. A shot that hits her target for 4097-5543 Physical damage. + //Multishot: Used in m_uiPhases 1 and 3 after Entangle or while having nobody in melee range. A shot that hits 1 person and 4 people around him for 6475-7525 physical damage. + DoCast(m_creature->getVictim(), urand(0,1) ? SPELL_SHOOT : SPELL_MULTI_SHOT); + + if (urand(0, 2)) + DoScriptText(urand(0,1) ? SAY_BOWSHOT1 : SAY_BOWSHOT2, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiPhase == PHASE_1 || m_uiPhase == PHASE_3) + { + //m_uiShockBlast_Timer + if (m_uiShockBlast_Timer < uiDiff) + { + //Randomly used in m_uiPhases 1 and 3 on Vashj's target, it's a Shock spell doing 8325-9675 nature damage and stunning the target for 5 seconds, during which she will not attack her target but switch to the next person on the aggro list. + DoCast(m_creature->getVictim(), SPELL_SHOCK_BLAST); + + m_uiShockBlast_Timer = urand(1000, 15000); //random cooldown + }else m_uiShockBlast_Timer -= uiDiff; + + //m_uiStaticCharge_Timer + if (m_uiStaticCharge_Timer < uiDiff) + { + //Used on random people (only 1 person at any given time) in m_uiPhases 1 and 3, it's a debuff doing 2775 to 3225 Nature damage to the target and everybody in about 5 yards around it, every 1 seconds for 30 seconds. It can be removed by Cloak of Shadows, Iceblock, Divine Shield, etc, but not by Cleanse or Dispel Magic. + Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); + + //cast Static Charge every 2 seconds for 20 seconds + if (pTarget && !pTarget->HasAura(SPELL_STATIC_CHARGE_TRIGGER)) + DoCast(pTarget, SPELL_STATIC_CHARGE_TRIGGER); + + m_uiStaticCharge_Timer = urand(10000, 30000); + }else m_uiStaticCharge_Timer -= uiDiff; + + //m_uiEntangle_Timer + if (m_uiEntangle_Timer < uiDiff) + { + if (!m_bEntangle) + { + //Used in m_uiPhases 1 and 3, it casts Entangling Roots on everybody in a 15 yard radius of Vashj, immobilzing them for 10 seconds and dealing 500 damage every 2 seconds. It's not a magic effect so it cannot be dispelled, but is removed by various buffs such as Cloak of Shadows or Blessing of Freedom. + DoCast(m_creature->getVictim(), SPELL_ENTANGLE); + m_bEntangle = true; + m_uiEntangle_Timer = 10000; + } + else + { + CastShootOrMultishot(); + m_bEntangle = false; + m_uiEntangle_Timer = urand(20000, 25000); + } + }else m_uiEntangle_Timer -= uiDiff; + + //m_uiPhase 1 + if (m_uiPhase == PHASE_1) + { + //m_uiPhase 2 begins when Vashj hits 70%. She will run to the middle of her platform and surround herself in a shield making her invulerable. + if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) <= 70) + { + DoScriptText(SAY_PHASE2, m_creature); + + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE) + { + //set false, so MoveChase is not triggered in AttackStart + SetCombatMovement(false); + + m_creature->GetMotionMaster()->MovementExpired(); + m_creature->GetMotionMaster()->MovePoint(POINT_MOVE_CENTER, afMiddlePos[0], afMiddlePos[1], afMiddlePos[2]); + } + + m_uiPhase = PHASE_2; + return; + } + } + //m_uiPhase PHASE_3 + else + { + //m_uiSummonSporebat_Timer + if (m_uiSummonSporebat_Timer < uiDiff) + { + m_creature->SummonCreature(NPC_TOXIC_SPOREBAT, + afSporebatPos[0], afSporebatPos[1], afSporebatPos[2], afSporebatPos[3], + TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + + //summon sporebats faster and faster + if (m_uiSummonSporebat_StaticTimer > 1000) + m_uiSummonSporebat_StaticTimer -= 1000; + + m_uiSummonSporebat_Timer = m_uiSummonSporebat_StaticTimer; + }else m_uiSummonSporebat_Timer -= uiDiff; + } + + //Melee attack + DoMeleeAttackIfReady(); + + //m_uiCheck_Timer - used to check if somebody is in melee range + if (m_uiCheck_Timer < uiDiff) + { + bool bInMeleeRange = false; + std::list t_list = m_creature->getThreatManager().getThreatList(); + for(std::list::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) + { + Unit* pTarget = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()); + + //if in melee range + if (pTarget && pTarget->IsWithinDistInMap(m_creature, ATTACK_DISTANCE)) + { + bInMeleeRange = true; + break; + } + } + + //if nobody is in melee range + if (!bInMeleeRange) + CastShootOrMultishot(); + + m_uiCheck_Timer = 1500; + }else m_uiCheck_Timer -= uiDiff; + } + //m_uiPhase PHASE_2 + else + { + //m_uiForkedLightning_Timer + if (m_uiForkedLightning_Timer < uiDiff) + { + //Used constantly in m_uiPhase 2, it shoots out completely randomly targeted bolts of lightning which hit everybody in a roughtly 60 degree cone in front of Vashj for 2313-2687 nature damage. + Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); + + if (!pTarget) + pTarget = m_creature->getVictim(); + + DoCast(pTarget, SPELL_FORKED_LIGHTNING); + + m_uiForkedLightning_Timer = urand(3000, 9000); + }else m_uiForkedLightning_Timer -= uiDiff; + + //NPC_ENCHANTED_ELEMENTAL + if (m_uiEnchantedElemental_Timer < uiDiff) + { + if (Creature* pElemental = m_creature->SummonCreature(NPC_ENCHANTED_ELEMENTAL, afElementPos[m_uiEnchantedElemental_Pos][0], afElementPos[m_uiEnchantedElemental_Pos][1], afElementPos[m_uiEnchantedElemental_Pos][2], afElementPos[m_uiEnchantedElemental_Pos][3], TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000)) + pElemental->GetMotionMaster()->MoveFollow(m_creature, 0.0f, 0.0f); + + if (m_uiEnchantedElemental_Pos == 7) + m_uiEnchantedElemental_Pos = 0; + else + ++m_uiEnchantedElemental_Pos; + + m_uiEnchantedElemental_Timer = urand(10000, 15000); + }else m_uiEnchantedElemental_Timer -= uiDiff; + + //NPC_TAINTED_ELEMENTAL + if (m_uiTaintedElemental_Timer < uiDiff) + { + uint32 uiPos = urand(0,7); + + m_creature->SummonCreature(NPC_TAINTED_ELEMENTAL, + afElementPos[uiPos][0], afElementPos[uiPos][1], afElementPos[uiPos][2], afElementPos[uiPos][3], + TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 15000); + + m_uiTaintedElemental_Timer = 120000; + }else m_uiTaintedElemental_Timer -= uiDiff; + + //NPC_COILFANG_ELITE + if (m_uiCoilfangElite_Timer < uiDiff) + { + uint32 uiPos = urand(0,2); + + m_creature->SummonCreature(NPC_COILFANG_ELITE, + afCoilfangElitePos[uiPos][0], afCoilfangElitePos[uiPos][1], afCoilfangElitePos[uiPos][2], afCoilfangElitePos[uiPos][3], + TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 45000); + + //wowwiki says 50 seconds, bosskillers says 45 + m_uiCoilfangElite_Timer = urand(45000, 50000); + }else m_uiCoilfangElite_Timer -= uiDiff; + + //NPC_COILFANG_STRIDER + if (m_uiCoilfangStrider_Timer < uiDiff) + { + uint32 uiPos = urand(0,2); + + m_creature->SummonCreature(NPC_COILFANG_STRIDER, + afCoilfangStriderPos[uiPos][0], afCoilfangStriderPos[uiPos][1], afCoilfangStriderPos[uiPos][2], afCoilfangStriderPos[uiPos][3], + TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + + //wowwiki says 60 seconds, bosskillers says 60-70 + m_uiCoilfangStrider_Timer = urand(60000, 70000); + }else m_uiCoilfangStrider_Timer -= uiDiff; + + //m_uiCheck_Timer + if (m_uiCheck_Timer < uiDiff) + { + //Start m_uiPhase 3 + if (m_pInstance && m_pInstance->GetData(TYPE_VASHJ_PHASE3_CHECK) == DONE) + { + DoScriptText(SAY_PHASE3, m_creature); + + //set life 50%, not correct. Must remove 5% for each generator switched off + m_creature->SetHealth(m_creature->GetMaxHealth()/2); + + //m_creature->RemoveAurasDueToSpell(SPELL_MAGIC_BARRIER); + + SetCombatMovement(true); + + //return to chase top aggro + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != TARGETED_MOTION_TYPE) + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + + m_uiPhase = PHASE_3; + } + m_uiCheck_Timer = 1000; + }else m_uiCheck_Timer -= uiDiff; + } + } +}; + +//Enchanted Elemental +//If one of them reaches Vashj he will increase her damage done by 5%. +struct MANGOS_DLL_DECL mob_enchanted_elementalAI : public ScriptedAI +{ + mob_enchanted_elementalAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + SetCombatMovement(false); + Reset(); + } + + ScriptedInstance *m_pInstance; // the instance + + void Reset() { } + + void MoveInLineOfSight(Unit* pWho) + { + if (m_pInstance) + { + if (Unit* pVashj = Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_LADYVASHJ))) + { + if (pVashj->IsWithinDistInMap(m_creature, ATTACK_DISTANCE)) + { + //increase lady vashj damage + if (pVashj->isAlive() && pVashj->isInCombat()) + m_creature->CastSpell(pVashj, SPELL_SURGE, false, 0, 0, pVashj->GetGUID()); + else + m_creature->setDeathState(JUST_DIED); + } + } + } + } + + void UpdateAI(const uint32 uiDiff) { } +}; + +//Tainted Elemental +//This mob has 7,900 life, doesn't move, and shoots Poison Bolts at one person anywhere in the area, doing 3,000 nature damage and placing a posion doing 2,000 damage every 2 seconds. He will switch targets often, or sometimes just hang on a single player, but there is nothing you can do about it except heal the damage and kill the Tainted Elemental +struct MANGOS_DLL_DECL mob_tainted_elementalAI : public ScriptedAI +{ + mob_tainted_elementalAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + SetCombatMovement(false); + Reset(); + } + + ScriptedInstance* m_pInstance; // the instance + + // timers + uint32 m_uiPoisonBolt_Timer; + + void Reset() + { + m_uiPoisonBolt_Timer = urand(5000, 10000); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //m_uiPoisonBolt_Timer + if (m_uiPoisonBolt_Timer < uiDiff) + { + Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); + + if (pTarget && pTarget->IsWithinDistInMap(m_creature, 30.0f)) + DoCast(pTarget, SPELL_POISON_BOLT); + + m_uiPoisonBolt_Timer = urand(5000, 10000); + }else m_uiPoisonBolt_Timer -= uiDiff; + } +}; + +//Toxic Sporebat +//Toxic Spores: Used in m_uiPhase 3 by the Spore Bats, it creates a contaminated green patch of ground, dealing about 2775-3225 nature damage every second to anyone who stands in it. +struct MANGOS_DLL_DECL mob_toxic_sporebatAI : public ScriptedAI +{ + mob_toxic_sporebatAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 m_uiToxicSpore_Timer; + uint32 m_uiCheck_Timer; + + void Reset() + { + m_creature->setFaction(14); + m_uiToxicSpore_Timer = 5000; + m_uiCheck_Timer = 1000; + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //m_uiToxicSpore_Timer + if (m_uiToxicSpore_Timer < uiDiff) + { + //The Spores will hit you anywhere in the instance: underwater, at the elevator, at the entrance, wherever. + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, SPELL_TOXIC_SPORES); + + m_uiToxicSpore_Timer = urand(20000, 25000); + }else m_uiToxicSpore_Timer -= uiDiff; + + //m_uiCheck_Timer + if (m_uiCheck_Timer < uiDiff) + { + if (m_pInstance) + { + //check if vashj is death + Unit* pVashj = Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_LADYVASHJ)); + if (!pVashj || !pVashj->isAlive()) + { + //remove + m_creature->setDeathState(DEAD); + m_creature->RemoveCorpse(); + m_creature->setFaction(35); + } + } + + m_uiCheck_Timer = 1000; + }else m_uiCheck_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +//Coilfang Elite +//It's an elite Naga mob with 170,000 HP. It does about 5000 damage on plate, and has a nasty cleave hitting for about 7500 damage +CreatureAI* GetAI_mob_coilfang_elite(Creature* pCreature) +{ + SimpleAI* pAI = new SimpleAI (pCreature); + + pAI->Spell[0].Enabled = true; + pAI->Spell[0].Spell_Id = 31345; //Cleave + pAI->Spell[0].Cooldown = 15000; + pAI->Spell[0].CooldownRandomAddition = 5000; + pAI->Spell[0].First_Cast = 5000; + pAI->Spell[0].Cast_Target_Type = CAST_HOSTILE_RANDOM; + + pAI->EnterEvadeMode(); + + return pAI; +} + +//Coilfang Strifer +//It hits plate for about 8000 damage, has a Mind Blast spell doing about 3000 shadow damage, and a Psychic Scream Aura, which fears everybody in a 8 yard range of it every 2-3 seconds , for 5 seconds and increasing their movement speed by 150% during the fear. +CreatureAI* GetAI_mob_coilfang_strider(Creature* pCreature) +{ + SimpleAI* pAI = new SimpleAI (pCreature); + + pAI->Spell[0].Enabled = true; + pAI->Spell[0].Spell_Id = 41374; //Mind Blast + pAI->Spell[0].Cooldown = 30000; + pAI->Spell[0].CooldownRandomAddition = 10000; + pAI->Spell[0].First_Cast = 8000; + pAI->Spell[0].Cast_Target_Type = CAST_HOSTILE_TARGET; + + //Scream aura not implemented + + pAI->EnterEvadeMode(); + + return pAI; +} + +//can probably be removed +struct MANGOS_DLL_DECL mob_shield_generator_channelAI : public ScriptedAI +{ + mob_shield_generator_channelAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; // the instance + + void Reset() { } + + void MoveInLineOfSight(Unit* pWho) { } +}; + +//this is wrong, alternative script needed +bool ItemUse_item_tainted_core(Player* pPlayer, Item* pItem, SpellCastTargets const& sctTargets) +{ + ScriptedInstance* pInstance = ((ScriptedInstance*)pPlayer->GetInstanceData()); + + if (!pInstance) + { + error_log("SD2: Lady Vashj Tainted Core: Instance Script Not Initialized"); + return true; + } + + Creature* pVashj = (Creature*)(Unit::GetUnit((*pPlayer), pInstance->GetData64(DATA_LADYVASHJ))); + if (pVashj && ((boss_lady_vashjAI*)pVashj->AI())->m_uiPhase == 2) + { + if (sctTargets.getGOTarget() && sctTargets.getGOTarget()->GetTypeId()==TYPEID_GAMEOBJECT) + { + uint32 uiIdentifier; + uint8 uiChannelIdentifier; + switch(sctTargets.getGOTarget()->GetEntry()) + { + case 185052: + uiIdentifier = TYPE_SHIELDGENERATOR1; + uiChannelIdentifier = 0; + break; + case 185053: + uiIdentifier = TYPE_SHIELDGENERATOR2; + uiChannelIdentifier = 1; + break; + case 185051: + uiIdentifier = TYPE_SHIELDGENERATOR3; + uiChannelIdentifier = 2; + break; + case 185054: + uiIdentifier = TYPE_SHIELDGENERATOR4; + uiChannelIdentifier = 3; + break; + default: + return true; + break; + } + + if (pInstance->GetData(uiIdentifier) == DONE) + return true; + + //get and remove channel + if (Unit* pChannel = Unit::GetUnit((*pVashj), ((boss_lady_vashjAI*)pVashj->AI())->m_auiShieldGeneratorChannel[uiChannelIdentifier])) + pChannel->setDeathState(JUST_DIED); //calls Unsummon() + + pInstance->SetData(uiIdentifier, DONE); + + //remove this item + pPlayer->DestroyItemCount(31088, 1, true); + } + } + return true; +} + +CreatureAI* GetAI_boss_lady_vashj(Creature* pCreature) +{ + return new boss_lady_vashjAI(pCreature); +} + +CreatureAI* GetAI_mob_enchanted_elemental(Creature* pCreature) +{ + return new mob_enchanted_elementalAI(pCreature); +} + +CreatureAI* GetAI_mob_tainted_elemental(Creature* pCreature) +{ + return new mob_tainted_elementalAI(pCreature); +} + +CreatureAI* GetAI_mob_toxic_sporebat(Creature* pCreature) +{ + return new mob_toxic_sporebatAI(pCreature); +} + +CreatureAI* GetAI_mob_shield_generator_channel(Creature* pCreature) +{ + return new mob_shield_generator_channelAI(pCreature); +} + +void AddSC_boss_lady_vashj() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_lady_vashj"; + newscript->GetAI = &GetAI_boss_lady_vashj; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_enchanted_elemental"; + newscript->GetAI = &GetAI_mob_enchanted_elemental; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_tainted_elemental"; + newscript->GetAI = &GetAI_mob_tainted_elemental; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_toxic_sporebat"; + newscript->GetAI = &GetAI_mob_toxic_sporebat; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_coilfang_elite"; + newscript->GetAI = &GetAI_mob_coilfang_elite; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_coilfang_strider"; + newscript->GetAI = &GetAI_mob_coilfang_strider; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_shield_generator_channel"; + newscript->GetAI = &GetAI_mob_shield_generator_channel; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "item_tainted_core"; + newscript->pItemUse = &ItemUse_item_tainted_core; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp new file mode 100644 index 000000000..cd7f326b4 --- /dev/null +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp @@ -0,0 +1,342 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Leotheras_The_Blind +SD%Complete: 50 +SDComment: Missing Inner Demons +SDCategory: Coilfang Resevoir, Serpent Shrine Cavern +EndScriptData */ + +#include "precompiled.h" +#include "serpent_shrine.h" + +enum +{ + SAY_AGGRO = -1548009, + SAY_SWITCH_TO_DEMON = -1548010, + SAY_INNER_DEMONS = -1548011, + SAY_DEMON_SLAY1 = -1548012, + SAY_DEMON_SLAY2 = -1548013, + SAY_DEMON_SLAY3 = -1548014, + SAY_NIGHTELF_SLAY1 = -1548015, + SAY_NIGHTELF_SLAY2 = -1548016, + SAY_NIGHTELF_SLAY3 = -1548017, + SAY_FINAL_FORM = -1548018, + SAY_FREE = -1548019, + SAY_DEATH = -1548020, + + SPELL_ENRAGE = 26662, + + SPELL_WHIRLWIND = 37640, + SPELL_CHAOS_BLAST = 37674, + SPELL_INSIDIOUS_WHISPER = 37676, //not implemented yet. After cast (spellHit), do the inner demon + SPELL_CONS_MADNESS = 37749, + + SPELL_DEMON_ALIGNMENT = 37713, //inner demon have this aura + SPELL_SHADOW_BOLT = 39309, //inner demon spell spam + + FACTION_DEMON_1 = 1829, + FACTION_DEMON_2 = 1830, + FACTION_DEMON_3 = 1831, + FACTION_DEMON_4 = 1832, + FACTION_DEMON_5 = 1833, + + MODEL_NIGHTELF = 20514, + MODEL_DEMON = 20125, + + NPC_INNER_DEMON = 21857, + NPC_SHADOW_LEO = 21875 +}; + +//Original Leotheras the Blind AI +struct MANGOS_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI +{ + boss_leotheras_the_blindAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_uiShadowLeo = 0; + Reset(); + } + + ScriptedInstance* m_pInstance; // the instance + + // timers + uint32 m_uiWhirlwind_Timer; + uint32 m_uiInnerDemon_Timer; + uint32 m_uiSwitch_Timer; + uint32 m_uiEnrage_Timer; + + bool m_bDemonForm; + bool m_bIsFinalForm; + + uint64 m_uiShadowLeo; + + void Reset() + { + m_uiWhirlwind_Timer = 18500; + m_uiInnerDemon_Timer = 15000; + m_uiSwitch_Timer = 45000; + m_uiEnrage_Timer = MINUTE*10*IN_MILISECONDS; + + m_bDemonForm = false; + m_bIsFinalForm = false; + + if (m_creature->GetDisplayId() != MODEL_NIGHTELF) + m_creature->SetDisplayId(MODEL_NIGHTELF); + + if (m_pInstance) + m_pInstance->SetData(TYPE_LEOTHERAS_EVENT, NOT_STARTED); + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_LEOTHERAS_EVENT, IN_PROGRESS); + } + + void KilledUnit(Unit* pVictim) + { + if (pVictim->GetTypeId() != TYPEID_PLAYER) + return; + + switch(urand(0, 2)) + { + case 0: DoScriptText(m_bDemonForm ? SAY_DEMON_SLAY1 : SAY_NIGHTELF_SLAY1, m_creature); break; + case 1: DoScriptText(m_bDemonForm ? SAY_DEMON_SLAY2 : SAY_NIGHTELF_SLAY2, m_creature); break; + case 2: DoScriptText(m_bDemonForm ? SAY_DEMON_SLAY3 : SAY_NIGHTELF_SLAY3, m_creature); break; + } + } + + void JustSummoned(Creature* pSummoned) + { + if (m_creature->getVictim() && pSummoned->GetEntry() == NPC_SHADOW_LEO) + { + m_uiShadowLeo = pSummoned->GetGUID(); + pSummoned->AI()->AttackStart(m_creature->getVictim()); + } + } + + void JustDied(Unit* pVictim) + { + DoScriptText(SAY_DEATH, m_creature); + + //despawn copy + if (m_uiShadowLeo) + { + if (Creature* pShadowLeo = (Creature*)Unit::GetUnit((*m_creature), m_uiShadowLeo)) + pShadowLeo->ForcedDespawn(); + } + + if (m_pInstance) + m_pInstance->SetData(TYPE_LEOTHERAS_EVENT, DONE); + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (!m_bDemonForm) + { + //Whirlwind_Timer + if (m_uiWhirlwind_Timer < uiDiff) + { + DoCast(m_creature, SPELL_WHIRLWIND); + m_uiWhirlwind_Timer = 30000; + }else m_uiWhirlwind_Timer -= uiDiff; + + //Switch_Timer + if (!m_bIsFinalForm) + { + if (m_uiSwitch_Timer < uiDiff) + { + DoScriptText(SAY_SWITCH_TO_DEMON, m_creature); + + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE) + { + //set false, so MoveChase is not triggered in AttackStart + SetCombatMovement(false); + + m_creature->GetMotionMaster()->Clear(false); + m_creature->GetMotionMaster()->MoveIdle(); + m_creature->StopMoving(); + } + + //switch to demon form + m_creature->SetDisplayId(MODEL_DEMON); + DoResetThreat(); + m_bDemonForm = true; + + m_uiInnerDemon_Timer = 15000; + m_uiSwitch_Timer = 60000; + }else m_uiSwitch_Timer -= uiDiff; + } + } + else + { + //inner demon + if (m_uiInnerDemon_Timer < uiDiff) + { + DoScriptText(SAY_INNER_DEMONS, m_creature); + + if (m_creature->IsNonMeleeSpellCasted(false)) + m_creature->InterruptNonMeleeSpells(false); + + DoCast(m_creature, SPELL_INSIDIOUS_WHISPER); + + m_uiInnerDemon_Timer = 60000; + }else m_uiInnerDemon_Timer -= uiDiff; + + //chaos blast spam + if (!m_creature->IsNonMeleeSpellCasted(false)) + m_creature->CastSpell(m_creature->getVictim(), SPELL_CHAOS_BLAST, false); + + //Switch_Timer + if (m_uiSwitch_Timer < uiDiff) + { + if (m_creature->IsNonMeleeSpellCasted(false)) + m_creature->InterruptNonMeleeSpells(false); + + //switch to nightelf form + m_creature->SetDisplayId(MODEL_NIGHTELF); + + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != TARGETED_MOTION_TYPE) + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + + //set true + SetCombatMovement(true); + + DoResetThreat(); + m_bDemonForm = false; + + m_uiWhirlwind_Timer = 18500; + m_uiSwitch_Timer = 45000; + }else m_uiSwitch_Timer -= uiDiff; + } + + if (!m_bIsFinalForm && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 15) + { + DoScriptText(SAY_FINAL_FORM, m_creature); + + //at this point he divides himself in two parts + m_creature->SummonCreature(NPC_SHADOW_LEO, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0); + + if (m_bDemonForm) + { + if (m_creature->IsNonMeleeSpellCasted(false)) + m_creature->InterruptNonMeleeSpells(false); + + //switch to nightelf form + m_creature->SetDisplayId(MODEL_NIGHTELF); + + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != TARGETED_MOTION_TYPE) + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + + //set true + SetCombatMovement(true); + + DoResetThreat(); + m_bDemonForm = false; + } + + m_bIsFinalForm = true; + } + + //m_uiEnrage_Timer + if (m_uiEnrage_Timer < uiDiff) + { + if (m_creature->IsNonMeleeSpellCasted(false)) + m_creature->InterruptNonMeleeSpells(false); + + DoCast(m_creature, SPELL_ENRAGE); + m_uiEnrage_Timer = MINUTE*5*IN_MILISECONDS; + }else m_uiEnrage_Timer -= uiDiff; + + if (!m_bDemonForm) + DoMeleeAttackIfReady(); + } +}; + +//Leotheras the Blind Demon Form AI +struct MANGOS_DLL_DECL boss_leotheras_the_blind_demonformAI : public ScriptedAI +{ + boss_leotheras_the_blind_demonformAI(Creature* pCreature) : ScriptedAI(pCreature) + { + SetCombatMovement(false); + Reset(); + } + + void Reset() { } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_FREE, m_creature); + } + + void KilledUnit(Unit* pVictim) + { + if (pVictim->GetTypeId() != TYPEID_PLAYER) + return; + + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_DEMON_SLAY1, m_creature); break; + case 1: DoScriptText(SAY_DEMON_SLAY2, m_creature); break; + case 2: DoScriptText(SAY_DEMON_SLAY3, m_creature); break; + } + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (!m_creature->IsNonMeleeSpellCasted(false)) + m_creature->CastSpell(m_creature->getVictim(), SPELL_CHAOS_BLAST, false); + + //Do NOT deal any melee damage to the target. + } +}; + +CreatureAI* GetAI_boss_leotheras_the_blind(Creature* pCreature) +{ + return new boss_leotheras_the_blindAI(pCreature); +} + +CreatureAI* GetAI_boss_leotheras_the_blind_demonform(Creature* pCreature) +{ + return new boss_leotheras_the_blind_demonformAI(pCreature); +} + +void AddSC_boss_leotheras_the_blind() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_leotheras_the_blind"; + newscript->GetAI = &GetAI_boss_leotheras_the_blind; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_leotheras_the_blind_demonform"; + newscript->GetAI = &GetAI_boss_leotheras_the_blind_demonform; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp new file mode 100644 index 000000000..9517930d2 --- /dev/null +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp @@ -0,0 +1,317 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Morogrim_Tidewalker +SD%Complete: 90 +SDComment: +SDCategory: Coilfang Resevoir, Serpent Shrine Cavern +EndScriptData */ + +#include "precompiled.h" +#include "serpent_shrine.h" + +enum +{ + 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, + EMOTE_WATERY_GRAVE = -1548039, + EMOTE_EARTHQUAKE = -1548040, + EMOTE_WATERY_GLOBULES = -1548041, + + SPELL_TIDAL_WAVE = 37730, + SPELL_EARTHQUAKE = 37764, + + SPELL_WATERY_GRAVE_1 = 37850, + SPELL_WATERY_GRAVE_2 = 38023, + SPELL_WATERY_GRAVE_3 = 38024, + SPELL_WATERY_GRAVE_4 = 38025, + + SPELL_SUMMON_MURLOC_A6 = 39813, + SPELL_SUMMON_MURLOC_A7 = 39814, + SPELL_SUMMON_MURLOC_A8 = 39815, + SPELL_SUMMON_MURLOC_A9 = 39816, + SPELL_SUMMON_MURLOC_A10 = 39817, + + SPELL_SUMMON_MURLOC_B6 = 39818, + SPELL_SUMMON_MURLOC_B7 = 39819, + SPELL_SUMMON_MURLOC_B8 = 39820, + SPELL_SUMMON_MURLOC_B9 = 39821, + SPELL_SUMMON_MURLOC_B10 = 39822, + + SPELL_SUMMON_GLOBULE_1 = 37854, + SPELL_SUMMON_GLOBULE_2 = 37858, + SPELL_SUMMON_GLOBULE_3 = 37860, + SPELL_SUMMON_GLOBULE_4 = 37861, + + NPC_WATER_GLOBULE = 21913, + NPC_TIDEWALKER_LURKER = 21920 +}; + +//Morogrim Tidewalker AI +struct MANGOS_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI +{ + boss_morogrim_tidewalkerAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; // the instance + + // timers + uint32 m_uiTidalWave_Timer; + uint32 m_uiWateryGrave_Timer; + uint32 m_uiEarthquake_Timer; + uint32 m_uiWateryGlobules_Timer; + + bool m_bEarthquake; + bool m_bPhase2; + + void Reset() + { + m_uiTidalWave_Timer = 10000; + m_uiWateryGrave_Timer = 30000; + m_uiEarthquake_Timer = 40000; + m_uiWateryGlobules_Timer = 0; + + m_bEarthquake = false; + m_bPhase2 = false; + + if (m_pInstance) + m_pInstance->SetData(TYPE_MOROGRIM_EVENT, NOT_STARTED); + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_MOROGRIM_EVENT, IN_PROGRESS); + } + + void KilledUnit(Unit* pVictim) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_SLAY1, m_creature); break; + case 1: DoScriptText(SAY_SLAY2, m_creature); break; + case 2: DoScriptText(SAY_SLAY3, m_creature); break; + } + } + + void JustDied(Unit* pVictim) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_MOROGRIM_EVENT, DONE); + } + + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_TIDEWALKER_LURKER) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); + } + + if (pSummoned->GetEntry() == NPC_WATER_GLOBULE) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + pSummoned->GetMotionMaster()->MoveFollow(pTarget, 0.0f, 0.0f); + } + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //m_uiEarthquake_Timer + if (m_uiEarthquake_Timer < uiDiff) + { + if (!m_bEarthquake) + { + DoCast(m_creature->getVictim(), SPELL_EARTHQUAKE); + m_bEarthquake = true; + m_uiEarthquake_Timer = 5000; + } + else + { + DoScriptText(urand(0,1) ? SAY_SUMMON1 : SAY_SUMMON2, m_creature); + + //north + m_creature->CastSpell(m_creature,SPELL_SUMMON_MURLOC_A6,true); + m_creature->CastSpell(m_creature,SPELL_SUMMON_MURLOC_A7,true); + m_creature->CastSpell(m_creature,SPELL_SUMMON_MURLOC_A8,true); + m_creature->CastSpell(m_creature,SPELL_SUMMON_MURLOC_A9,true); + m_creature->CastSpell(m_creature,SPELL_SUMMON_MURLOC_A10,true); + + //south + m_creature->CastSpell(m_creature,SPELL_SUMMON_MURLOC_B6,true); + m_creature->CastSpell(m_creature,SPELL_SUMMON_MURLOC_B7,true); + m_creature->CastSpell(m_creature,SPELL_SUMMON_MURLOC_B8,true); + m_creature->CastSpell(m_creature,SPELL_SUMMON_MURLOC_B9,true); + m_creature->CastSpell(m_creature,SPELL_SUMMON_MURLOC_B10,true); + + DoScriptText(EMOTE_EARTHQUAKE, m_creature); + + m_bEarthquake = false; + m_uiEarthquake_Timer = urand(40000, 45000); + } + }else m_uiEarthquake_Timer -= uiDiff; + + //m_uiTidalWave_Timer + if (m_uiTidalWave_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_TIDAL_WAVE); + m_uiTidalWave_Timer = 20000; + }else m_uiTidalWave_Timer -= uiDiff; + + if (!m_bPhase2) + { + //m_uiWateryGrave_Timer + if (m_uiWateryGrave_Timer < uiDiff) + { + //Teleport 4 players under the waterfalls + for(uint8 i = 0; i < 4; ++i) + { + Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1); + + if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER && !pTarget->HasAuraType(SPELL_AURA_MOD_STUN) && pTarget->IsWithinDistInMap(m_creature, 45.0f)) + { + switch(i) + { + case 0: m_creature->CastSpell(pTarget,SPELL_WATERY_GRAVE_1,false); break; + case 1: m_creature->CastSpell(pTarget,SPELL_WATERY_GRAVE_2,false); break; + case 2: m_creature->CastSpell(pTarget,SPELL_WATERY_GRAVE_3,false); break; + case 3: m_creature->CastSpell(pTarget,SPELL_WATERY_GRAVE_4,false); break; + } + } + } + + DoScriptText(urand(0,1) ? SAY_SUMMON_BUBL1 : SAY_SUMMON_BUBL2, m_creature); + DoScriptText(EMOTE_WATERY_GRAVE, m_creature); + + m_uiWateryGrave_Timer = 30000; + }else m_uiWateryGrave_Timer -= uiDiff; + + //Start Phase2 + if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 25) + m_bPhase2 = true; + } + else + { + //m_uiWateryGlobules_Timer + if (m_uiWateryGlobules_Timer < uiDiff) + { + DoScriptText(EMOTE_WATERY_GLOBULES, m_creature); + + m_creature->CastSpell(m_creature,SPELL_SUMMON_GLOBULE_1,true); + m_creature->CastSpell(m_creature,SPELL_SUMMON_GLOBULE_2,true); + m_creature->CastSpell(m_creature,SPELL_SUMMON_GLOBULE_3,true); + m_creature->CastSpell(m_creature,SPELL_SUMMON_GLOBULE_4,false); + + m_uiWateryGlobules_Timer = 25000; + }else m_uiWateryGlobules_Timer -= uiDiff; + } + + DoMeleeAttackIfReady(); + } +}; + +//Water Globule AI +struct MANGOS_DLL_DECL mob_water_globuleAI : public ScriptedAI +{ + mob_water_globuleAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + // timers + uint32 m_uiCheck_Timer; + + void Reset() + { + m_uiCheck_Timer = 1000; + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } + + void MoveInLineOfSight(Unit* pWho) + { + if (!pWho || m_creature->getVictim()) + return; + + if (pWho->isTargetableForAttack() && pWho->isInAccessablePlaceFor(m_creature) && m_creature->IsHostileTo(pWho)) + { + //no attack radius check - it attacks the first target that moves in his los + pWho->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); + AttackStart(pWho); + } + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiCheck_Timer < uiDiff) + { + if (m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE)) + { + m_creature->DealDamage(m_creature->getVictim(), 4000+rand()%2000, NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_FROST, NULL, false); + + //despawn + m_creature->ForcedDespawn(); + return; + } + m_uiCheck_Timer = 500; + }else m_uiCheck_Timer -= uiDiff; + + //do NOT deal any melee damage to the target. + } +}; + +CreatureAI* GetAI_boss_morogrim_tidewalker(Creature* pCreature) +{ + return new boss_morogrim_tidewalkerAI (pCreature); +} +CreatureAI* GetAI_mob_water_globule(Creature* pCreature) +{ + return new mob_water_globuleAI (pCreature); +} + +void AddSC_boss_morogrim_tidewalker() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_morogrim_tidewalker"; + newscript->GetAI = &GetAI_boss_morogrim_tidewalker; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_water_globule"; + newscript->GetAI = &GetAI_mob_water_globule; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp new file mode 100644 index 000000000..9380404db --- /dev/null +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp @@ -0,0 +1,211 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance_Serpent_Shrine +SD%Complete: 90 +SDComment: +SDCategory: Coilfang Resevoir, Serpent Shrine Cavern +EndScriptData */ + +#include "precompiled.h" +#include "serpent_shrine.h" + +/* Serpentshrine cavern encounters: +0 - Hydross The Unstable event +1 - Leotheras The Blind Event +2 - The Lurker Below Event +3 - Fathom-Lord Karathress Event +4 - Morogrim Tidewalker Event +5 - Lady Vashj Event +*/ + +const int MAX_ENCOUNTER = 6; +const int MAX_GENERATOR = 4; + +struct MANGOS_DLL_DECL instance_serpentshrine_cavern : public ScriptedInstance +{ + instance_serpentshrine_cavern(Map* pMap) : ScriptedInstance(pMap) { Initialize(); }; + + uint64 m_uiSharkkis; + uint64 m_uiTidalvess; + uint64 m_uiCaribdis; + uint64 m_uiLadyVashj; + uint64 m_uiKarathress; + uint64 m_uiKarathressEvent_Starter; + + uint32 m_auiShieldGenerator[MAX_GENERATOR]; + uint32 m_auiEncounter[MAX_ENCOUNTER]; + + void Initialize() + { + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + memset(&m_auiShieldGenerator, 0, sizeof(m_auiShieldGenerator)); + + m_uiSharkkis = 0; + m_uiTidalvess = 0; + m_uiCaribdis = 0; + m_uiLadyVashj = 0; + m_uiKarathress = 0; + m_uiKarathressEvent_Starter = 0; + } + + bool IsEncounterInProgress() + { + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + if (m_auiEncounter[i] == IN_PROGRESS) + return true; + + return false; + } + + void OnCreatureCreate(Creature* pCreature) + { + switch(pCreature->GetEntry()) + { + case 21212: m_uiLadyVashj = pCreature->GetGUID(); break; + case 21214: m_uiKarathress = pCreature->GetGUID(); break; + case 21966: m_uiSharkkis = pCreature->GetGUID(); break; + case 21965: m_uiTidalvess = pCreature->GetGUID(); break; + case 21964: m_uiCaribdis = pCreature->GetGUID(); break; + } + } + + void SetData64(uint32 uiType, uint64 uiData) + { + if (uiType == DATA_KARATHRESS_STARTER) + m_uiKarathressEvent_Starter = uiData; + } + + uint64 GetData64(uint32 uiIdentifier) + { + switch(uiIdentifier) + { + case DATA_SHARKKIS: + return m_uiSharkkis; + case DATA_TIDALVESS: + return m_uiTidalvess; + case DATA_CARIBDIS: + return m_uiCaribdis; + case DATA_LADYVASHJ: + return m_uiLadyVashj; + case DATA_KARATHRESS: + return m_uiKarathress; + case DATA_KARATHRESS_STARTER: + return m_uiKarathressEvent_Starter; + } + return 0; + } + + void SetData(uint32 uiType, uint32 uiData) + { + switch(uiType) + { + case TYPE_HYDROSS_EVENT: + m_auiEncounter[0] = uiData; + break; + case TYPE_LEOTHERAS_EVENT: + m_auiEncounter[1] = uiData; + break; + case TYPE_THELURKER_EVENT: + m_auiEncounter[2] = uiData; + break; + case TYPE_KARATHRESS_EVENT: + m_auiEncounter[3] = uiData; + break; + case TYPE_MOROGRIM_EVENT: + m_auiEncounter[4] = uiData; + break; + case TYPE_LADYVASHJ_EVENT: + if (uiData == NOT_STARTED) + memset(&m_auiShieldGenerator, 0, sizeof(m_auiShieldGenerator)); + m_auiEncounter[5] = uiData; + break; + case TYPE_SHIELDGENERATOR1: + m_auiShieldGenerator[0] = uiData; + break; + case TYPE_SHIELDGENERATOR2: + m_auiShieldGenerator[1] = uiData; + break; + case TYPE_SHIELDGENERATOR3: + m_auiShieldGenerator[2] = uiData; + break; + case TYPE_SHIELDGENERATOR4: + m_auiShieldGenerator[3] = uiData; + break; + } + } + + uint32 GetData(uint32 uiType) + { + switch(uiType) + { + case TYPE_HYDROSS_EVENT: + return m_auiEncounter[0]; + + case TYPE_LEOTHERAS_EVENT: + return m_auiEncounter[1]; + + case TYPE_THELURKER_EVENT: + return m_auiEncounter[2]; + + case TYPE_KARATHRESS_EVENT: + return m_auiEncounter[3]; + + case TYPE_MOROGRIM_EVENT: + return m_auiEncounter[4]; + + case TYPE_LADYVASHJ_EVENT: + return m_auiEncounter[5]; + + case TYPE_SHIELDGENERATOR1: + return m_auiShieldGenerator[0]; + + case TYPE_SHIELDGENERATOR2: + return m_auiShieldGenerator[1]; + + case TYPE_SHIELDGENERATOR3: + return m_auiShieldGenerator[2]; + + case TYPE_SHIELDGENERATOR4: + return m_auiShieldGenerator[3]; + + case TYPE_VASHJ_PHASE3_CHECK: + for(uint8 i = 0; i < MAX_GENERATOR; ++i) + { + if (m_auiShieldGenerator[i] != DONE) + return NOT_STARTED; + } + return DONE; + } + + return 0; + } +}; + +InstanceData* GetInstanceData_instance_serpentshrine_cavern(Map* pMap) +{ + return new instance_serpentshrine_cavern(pMap); +} + +void AddSC_instance_serpentshrine_cavern() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "instance_serpent_shrine"; + newscript->GetInstanceData = &GetInstanceData_instance_serpentshrine_cavern; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h b/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h new file mode 100644 index 000000000..d750d9814 --- /dev/null +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h @@ -0,0 +1,31 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_SERPENT_SHRINE_H +#define DEF_SERPENT_SHRINE_H + +enum +{ + TYPE_HYDROSS_EVENT = 1, + TYPE_KARATHRESS_EVENT = 2, + TYPE_LADYVASHJ_EVENT = 3, + TYPE_LEOTHERAS_EVENT = 4, + TYPE_MOROGRIM_EVENT = 5, + TYPE_THELURKER_EVENT = 6, + + DATA_KARATHRESS_STARTER = 10, + DATA_KARATHRESS = 11, + DATA_CARIBDIS = 12, + DATA_SHARKKIS = 13, + DATA_TIDALVESS = 14, + + DATA_LADYVASHJ = 15, + TYPE_VASHJ_PHASE3_CHECK = 16, + + TYPE_SHIELDGENERATOR1 = 20, + TYPE_SHIELDGENERATOR2 = 21, + TYPE_SHIELDGENERATOR3 = 22, + TYPE_SHIELDGENERATOR4 = 23 +}; +#endif diff --git a/scripts/outland/coilfang_reservoir/slave_pens/boss_rokmar.cpp b/scripts/outland/coilfang_reservoir/slave_pens/boss_rokmar.cpp new file mode 100644 index 000000000..bf32ff5e8 --- /dev/null +++ b/scripts/outland/coilfang_reservoir/slave_pens/boss_rokmar.cpp @@ -0,0 +1,66 @@ +/* Copyright (C) 2006 - 2008 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Rokmar +SD%Complete: 100 +SDComment: +SDCategory: Coilfang Resevoir, Slave Pens +EndScriptData */ + +#include "precompiled.h" +#include "simple_ai.h" + +#define SPELL_WATTER_SPIT 40086 +#define SPELL_GRIEVOUS_WOUND 31956 +#define SPELL_ENSARING_MOSS 31948 + +CreatureAI* GetAI_boss_rokmar_the_crackler(Creature *_Creature) +{ + SimpleAI* ai = new SimpleAI (_Creature); + + //Watter Spit + ai->Spell[0].Enabled = true; + ai->Spell[0].Spell_Id = SPELL_WATTER_SPIT; + ai->Spell[0].Cooldown = 15000; + ai->Spell[0].First_Cast = 15000; + ai->Spell[0].Cast_Target_Type = CAST_HOSTILE_TARGET; + + //Grievous Wound + ai->Spell[1].Enabled = true; + ai->Spell[1].Spell_Id = SPELL_GRIEVOUS_WOUND; + ai->Spell[1].Cooldown = 25000; + ai->Spell[1].First_Cast = 15000; + ai->Spell[1].Cast_Target_Type = CAST_HOSTILE_TARGET; + + //Ensaring Moss + ai->Spell[2].Enabled = true; + ai->Spell[2].Spell_Id = SPELL_ENSARING_MOSS; + ai->Spell[2].Cooldown = urand(15000, 25000); + ai->Spell[2].First_Cast = 25000; + ai->Spell[2].Cast_Target_Type = CAST_HOSTILE_TARGET; + + return ai; +} + +void AddSC_boss_rokmar_the_crackler() +{ + Script *newscript; + newscript = new Script; + newscript->Name="boss_rokmar_the_crackler"; + newscript->GetAI = GetAI_boss_rokmar_the_crackler; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp new file mode 100644 index 000000000..ee9811638 --- /dev/null +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp @@ -0,0 +1,194 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Hydromancer_Thespia +SD%Complete: 80 +SDComment: Needs additional adjustments (when instance script is adjusted) +SDCategory: Coilfang Resevoir, The Steamvault +EndScriptData */ + +/* ContentData +boss_hydromancer_thespia +mob_coilfang_waterelemental +EndContentData */ + +#include "precompiled.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 + +#define SPELL_LIGHTNING_CLOUD 25033 +#define SPELL_LUNG_BURST 31481 +#define SPELL_ENVELOPING_WINDS 31718 + +struct MANGOS_DLL_DECL boss_thespiaAI : public ScriptedAI +{ + boss_thespiaAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + uint32 LightningCloud_Timer; + uint32 LungBurst_Timer; + uint32 EnvelopingWinds_Timer; + + void Reset() + { + LightningCloud_Timer = 15000; + LungBurst_Timer = 7000; + EnvelopingWinds_Timer = 9000; + + if (m_pInstance && m_creature->isAlive()) + m_pInstance->SetData(TYPE_HYDROMANCER_THESPIA,NOT_STARTED); + } + + void JustDied(Unit* Killer) + { + DoScriptText(SAY_DEAD, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_HYDROMANCER_THESPIA, DONE); + } + + void KilledUnit(Unit* victim) + { + DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); + } + + void Aggro(Unit *who) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_AGGRO_1, m_creature); break; + case 1: DoScriptText(SAY_AGGRO_2, m_creature); break; + case 2: DoScriptText(SAY_AGGRO_3, m_creature); break; + } + + if (m_pInstance) + m_pInstance->SetData(TYPE_HYDROMANCER_THESPIA, IN_PROGRESS); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //LightningCloud_Timer + if (LightningCloud_Timer < diff) + { + //cast twice in Heroic mode + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, SPELL_LIGHTNING_CLOUD); + if (m_bIsHeroicMode) + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, SPELL_LIGHTNING_CLOUD); + LightningCloud_Timer = urand(15000, 25000); + }else LightningCloud_Timer -=diff; + + //LungBurst_Timer + if (LungBurst_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, SPELL_LUNG_BURST); + LungBurst_Timer = urand(7000, 12000); + }else LungBurst_Timer -=diff; + + //EnvelopingWinds_Timer + if (EnvelopingWinds_Timer < diff) + { + //cast twice in Heroic mode + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, SPELL_ENVELOPING_WINDS); + if (m_bIsHeroicMode) + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, SPELL_ENVELOPING_WINDS); + EnvelopingWinds_Timer = urand(10000, 15000); + }else EnvelopingWinds_Timer -=diff; + + DoMeleeAttackIfReady(); + } +}; + +#define SPELL_WATER_BOLT_VOLLEY 34449 +#define H_SPELL_WATER_BOLT_VOLLEY 37924 + +struct MANGOS_DLL_DECL mob_coilfang_waterelementalAI : public ScriptedAI +{ + mob_coilfang_waterelementalAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + bool m_bIsHeroicMode; + uint32 WaterBoltVolley_Timer; + + void Reset() + { + WaterBoltVolley_Timer = urand(3000, 6000); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (WaterBoltVolley_Timer < diff) + { + DoCast(m_creature, m_bIsHeroicMode ? H_SPELL_WATER_BOLT_VOLLEY : SPELL_WATER_BOLT_VOLLEY); + WaterBoltVolley_Timer = urand(7000, 12000); + }else WaterBoltVolley_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_thespiaAI(Creature* pCreature) +{ + return new boss_thespiaAI(pCreature); +} + +CreatureAI* GetAI_mob_coilfang_waterelementalAI(Creature* pCreature) +{ + return new mob_coilfang_waterelementalAI(pCreature); +} + +void AddSC_boss_hydromancer_thespia() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_hydromancer_thespia"; + newscript->GetAI = &GetAI_boss_thespiaAI; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_coilfang_waterelemental"; + newscript->GetAI = &GetAI_mob_coilfang_waterelementalAI; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp new file mode 100644 index 000000000..f3dd9fbaa --- /dev/null +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp @@ -0,0 +1,279 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Mekgineer_Steamrigger +SD%Complete: 60 +SDComment: Mechanics' interrrupt heal doesn't work very well, also a proper movement needs to be implemented -> summon further away and move towards target to repair. +SDCategory: Coilfang Resevoir, The Steamvault +EndScriptData */ + +/* ContentData +boss_mekgineer_steamrigger +mob_steamrigger_mechanic +EndContentData */ + +#include "precompiled.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 + +struct MANGOS_DLL_DECL boss_mekgineer_steamriggerAI : public ScriptedAI +{ + boss_mekgineer_steamriggerAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + uint32 Shrink_Timer; + uint32 Saw_Blade_Timer; + uint32 Electrified_Net_Timer; + bool Summon75; + bool Summon50; + bool Summon25; + + void Reset() + { + Shrink_Timer = 20000; + Saw_Blade_Timer = 15000; + Electrified_Net_Timer = 10000; + + Summon75 = false; + Summon50 = false; + Summon25 = false; + + if (m_pInstance && m_creature->isAlive()) + m_pInstance->SetData(TYPE_MEKGINEER_STEAMRIGGER,NOT_STARTED); + } + + void JustDied(Unit* Killer) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_MEKGINEER_STEAMRIGGER, DONE); + } + + void KilledUnit(Unit* victim) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_SLAY_1, m_creature); break; + case 1: DoScriptText(SAY_SLAY_2, m_creature); break; + case 2: DoScriptText(SAY_SLAY_3, m_creature); break; + } + } + + void Aggro(Unit *who) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_AGGRO_1, m_creature); break; + case 1: DoScriptText(SAY_AGGRO_2, m_creature); break; + case 2: DoScriptText(SAY_AGGRO_3, m_creature); break; + } + + if (m_pInstance) + m_pInstance->SetData(TYPE_MEKGINEER_STEAMRIGGER, IN_PROGRESS); + } + + //no known summon spells exist + void SummonMechanichs() + { + DoScriptText(SAY_MECHANICS, m_creature); + + 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); + DoSpawnCreature(ENTRY_STREAMRIGGER_MECHANIC,-5,-5,0,0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 240000); + + if (urand(0, 1)) + DoSpawnCreature(ENTRY_STREAMRIGGER_MECHANIC,5,-7,0,0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 240000); + + if (urand(0, 1)) + DoSpawnCreature(ENTRY_STREAMRIGGER_MECHANIC,7,-5,0,0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 240000); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (Shrink_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_SUPER_SHRINK_RAY); + Shrink_Timer = 20000; + }else Shrink_Timer -= diff; + + if (Saw_Blade_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1)) + DoCast(target,SPELL_SAW_BLADE); + else + DoCast(m_creature->getVictim(),SPELL_SAW_BLADE); + + Saw_Blade_Timer = 15000; + } else Saw_Blade_Timer -= diff; + + if (Electrified_Net_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_ELECTRIFIED_NET); + Electrified_Net_Timer = 10000; + } + else Electrified_Net_Timer -= diff; + + if (!Summon75) + { + if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 75) + { + SummonMechanichs(); + Summon75 = true; + } + } + + if (!Summon50) + { + if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 50) + { + SummonMechanichs(); + Summon50 = true; + } + } + + if (!Summon25) + { + if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 25) + { + SummonMechanichs(); + Summon25 = true; + } + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_mekgineer_steamrigger(Creature* pCreature) +{ + return new boss_mekgineer_steamriggerAI(pCreature); +} + +#define SPELL_DISPEL_MAGIC 17201 +#define SPELL_REPAIR 31532 +#define H_SPELL_REPAIR 37936 + +#define MAX_REPAIR_RANGE (13.0f) //we should be at least at this range for repair +#define MIN_REPAIR_RANGE (7.0f) //we can stop movement at this range to repair but not required + +struct MANGOS_DLL_DECL mob_steamrigger_mechanicAI : public ScriptedAI +{ + mob_steamrigger_mechanicAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + uint32 Repair_Timer; + + void Reset() + { + Repair_Timer = 2000; + } + + void MoveInLineOfSight(Unit* who) + { + //react only if attacked + return; + } + + void UpdateAI(const uint32 diff) + { + if (Repair_Timer < diff) + { + if (m_pInstance && m_pInstance->GetData64(DATA_MEKGINEERSTEAMRIGGER) && m_pInstance->GetData(TYPE_MEKGINEER_STEAMRIGGER) == IN_PROGRESS) + { + if (Unit* pMekgineer = Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_MEKGINEERSTEAMRIGGER))) + { + if (m_creature->IsWithinDistInMap(pMekgineer, MAX_REPAIR_RANGE)) + { + //are we already channeling? Doesn't work very well, find better check? + if (!m_creature->GetUInt32Value(UNIT_CHANNEL_SPELL)) + { + //m_creature->GetMotionMaster()->MovementExpired(); + //m_creature->GetMotionMaster()->MoveIdle(); + + DoCast(m_creature, m_bIsHeroicMode ? H_SPELL_REPAIR : SPELL_REPAIR, true); + } + Repair_Timer = 5000; + } + else + { + //m_creature->GetMotionMaster()->MovementExpired(); + //m_creature->GetMotionMaster()->MoveFollow(pMekgineer,0,0); + } + } + }else Repair_Timer = 5000; + }else Repair_Timer -= diff; + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_steamrigger_mechanic(Creature* pCreature) +{ + return new mob_steamrigger_mechanicAI(pCreature); +} + +void AddSC_boss_mekgineer_steamrigger() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_mekgineer_steamrigger"; + newscript->GetAI = &GetAI_boss_mekgineer_steamrigger; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_steamrigger_mechanic"; + newscript->GetAI = &GetAI_mob_steamrigger_mechanic; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp new file mode 100644 index 000000000..90b1e1d6a --- /dev/null +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp @@ -0,0 +1,208 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Warlord_Kalithres +SD%Complete: 65 +SDComment: Contains workarounds regarding warlord's rage spells not acting as expected. Both scripts here require review and fine tuning. +SDCategory: Coilfang Resevoir, The Steamvault +EndScriptData */ + +#include "precompiled.h" +#include "steam_vault.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 + +struct MANGOS_DLL_DECL mob_naga_distillerAI : public ScriptedAI +{ + mob_naga_distillerAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + void Reset() + { + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + + //hack, due to really weird spell behaviour :( + if (m_pInstance) + { + if (m_pInstance->GetData(TYPE_DISTILLER) == IN_PROGRESS) + { + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + } + } + } + + void StartRageGen(Unit *caster) + { + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + + DoCast(m_creature,SPELL_WARLORDS_RAGE_NAGA,true); + + if (m_pInstance) + m_pInstance->SetData(TYPE_DISTILLER,IN_PROGRESS); + } + + void DamageTaken(Unit *done_by, uint32 &damage) + { + if (m_creature->GetHealth() <= damage) + if (m_pInstance) + m_pInstance->SetData(TYPE_DISTILLER,DONE); + } +}; + +struct MANGOS_DLL_DECL boss_warlord_kalithreshAI : public ScriptedAI +{ + boss_warlord_kalithreshAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 Reflection_Timer; + uint32 Impale_Timer; + uint32 Rage_Timer; + bool CanRage; + + void Reset() + { + Reflection_Timer = 10000; + Impale_Timer = urand(7000, 14000); + Rage_Timer = 45000; + CanRage = false; + + if (m_pInstance) + m_pInstance->SetData(TYPE_WARLORD_KALITHRESH, NOT_STARTED); + } + + void Aggro(Unit *who) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_AGGRO1, m_creature); break; + case 1: DoScriptText(SAY_AGGRO2, m_creature); break; + case 2: DoScriptText(SAY_AGGRO3, m_creature); break; + } + + if (m_pInstance) + m_pInstance->SetData(TYPE_WARLORD_KALITHRESH, IN_PROGRESS); + } + + void KilledUnit(Unit* victim) + { + DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); + } + + void SpellHit(Unit *caster, const SpellEntry *spell) + { + //hack :( + if (spell->Id == SPELL_WARLORDS_RAGE_PROC) + if (m_pInstance) + if (m_pInstance->GetData(TYPE_DISTILLER) == DONE) + m_creature->RemoveAurasDueToSpell(SPELL_WARLORDS_RAGE_PROC); + } + + void JustDied(Unit* Killer) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_WARLORD_KALITHRESH, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (Rage_Timer < diff) + { + if (Creature* pDistiller = GetClosestCreatureWithEntry(m_creature, 17954, 100.0f)) + { + DoScriptText(SAY_REGEN, m_creature); + DoCast(m_creature,SPELL_WARLORDS_RAGE); + ((mob_naga_distillerAI*)pDistiller->AI())->StartRageGen(m_creature); + } + Rage_Timer = urand(3000, 18000); + }else Rage_Timer -= diff; + + //Reflection_Timer + if (Reflection_Timer < diff) + { + DoCast(m_creature, SPELL_SPELL_REFLECTION); + Reflection_Timer = urand(15000, 25000); + }else Reflection_Timer -= diff; + + //Impale_Timer + if (Impale_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_IMPALE); + + Impale_Timer = urand(7500, 12500); + }else Impale_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_naga_distiller(Creature* pCreature) +{ + return new mob_naga_distillerAI(pCreature); +} + +CreatureAI* GetAI_boss_warlord_kalithresh(Creature* pCreature) +{ + return new boss_warlord_kalithreshAI(pCreature); +} + +void AddSC_boss_warlord_kalithresh() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "mob_naga_distiller"; + newscript->GetAI = &GetAI_mob_naga_distiller; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_warlord_kalithresh"; + newscript->GetAI = &GetAI_boss_warlord_kalithresh; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp b/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp new file mode 100644 index 000000000..a8096c4af --- /dev/null +++ b/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp @@ -0,0 +1,204 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance_Steam_Vault +SD%Complete: 80 +SDComment: Instance script and access panel GO +SDCategory: Coilfang Resevoir, The Steamvault +EndScriptData */ + +#include "precompiled.h" +#include "steam_vault.h" + +#define MAX_ENCOUNTER 4 + +#define MAIN_CHAMBERS_DOOR 183049 +#define ACCESS_PANEL_HYDRO 184125 +#define ACCESS_PANEL_MEK 184126 + +/* Steam Vaults encounters: +1 - Hydromancer Thespia Event +2 - Mekgineer Steamrigger Event +3 - Warlord Kalithresh Event +*/ + +bool GOHello_go_main_chambers_access_panel(Player* pPlayer, GameObject* pGo) +{ + ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData(); + + if (!pInstance) + return false; + + if (pGo->GetEntry() == ACCESS_PANEL_HYDRO && pInstance->GetData(TYPE_HYDROMANCER_THESPIA) == DONE) + pInstance->SetData(TYPE_HYDROMANCER_THESPIA,SPECIAL); + + if (pGo->GetEntry() == ACCESS_PANEL_MEK && pInstance->GetData(TYPE_MEKGINEER_STEAMRIGGER) == DONE) + pInstance->SetData(TYPE_MEKGINEER_STEAMRIGGER,SPECIAL); + + return true; +} + +struct MANGOS_DLL_DECL instance_steam_vault : public ScriptedInstance +{ + instance_steam_vault(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + + uint64 m_uiThespiaGUID; + uint64 m_uiMekgineerGUID; + uint64 m_uiKalithreshGUID; + + uint64 m_uiMainChambersDoor; + uint64 m_uiAccessPanelHydro; + uint64 m_uiAccessPanelMek; + + void Initialize() + { + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + + m_uiThespiaGUID = 0; + m_uiMekgineerGUID = 0; + m_uiKalithreshGUID = 0; + m_uiMainChambersDoor = 0; + m_uiAccessPanelHydro = 0; + m_uiAccessPanelMek = 0; + } + + bool IsEncounterInProgress() const + { + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + if (m_auiEncounter[i] == IN_PROGRESS) + return true; + + return false; + } + + void OnCreatureCreate(Creature* pCreature) + { + switch(pCreature->GetEntry()) + { + case 17797: m_uiThespiaGUID = pCreature->GetGUID(); break; + case 17796: m_uiMekgineerGUID = pCreature->GetGUID(); break; + case 17798: m_uiKalithreshGUID = pCreature->GetGUID(); break; + } + } + + void OnObjectCreate(GameObject* pGo) + { + switch(pGo->GetEntry()) + { + case MAIN_CHAMBERS_DOOR: m_uiMainChambersDoor = pGo->GetGUID(); break; + case ACCESS_PANEL_HYDRO: m_uiAccessPanelHydro = pGo->GetGUID(); break; + case ACCESS_PANEL_MEK: m_uiAccessPanelMek = pGo->GetGUID(); break; + } + } + + void SetData(uint32 type, uint32 data) + { + switch(type) + { + case TYPE_HYDROMANCER_THESPIA: + if (data == SPECIAL) + { + if (GameObject* pGo = instance->GetGameObject(m_uiAccessPanelHydro)) + pGo->SetGoState(GO_STATE_ACTIVE); + + if (GetData(TYPE_MEKGINEER_STEAMRIGGER) == SPECIAL) + { + if (GameObject* pGo = instance->GetGameObject(m_uiMainChambersDoor)) + pGo->SetGoState(GO_STATE_ACTIVE); + } + + debug_log("SD2: Instance Steamvault: Access panel used."); + } + m_auiEncounter[0] = data; + break; + case TYPE_MEKGINEER_STEAMRIGGER: + if (data == SPECIAL) + { + if (GameObject* pGo = instance->GetGameObject(m_uiAccessPanelMek)) + pGo->SetGoState(GO_STATE_ACTIVE); + + if (GetData(TYPE_HYDROMANCER_THESPIA) == SPECIAL) + { + if (GameObject* pGo = instance->GetGameObject(m_uiMainChambersDoor)) + pGo->SetGoState(GO_STATE_ACTIVE); + } + + debug_log("SD2: Instance Steamvault: Access panel used."); + } + m_auiEncounter[1] = data; + break; + case TYPE_WARLORD_KALITHRESH: + m_auiEncounter[2] = data; + break; + case TYPE_DISTILLER: + m_auiEncounter[3] = data; + break; + } + } + + uint32 GetData(uint32 type) + { + switch(type) + { + case TYPE_HYDROMANCER_THESPIA: + return m_auiEncounter[0]; + case TYPE_MEKGINEER_STEAMRIGGER: + return m_auiEncounter[1]; + case TYPE_WARLORD_KALITHRESH: + return m_auiEncounter[2]; + case TYPE_DISTILLER: + return m_auiEncounter[3]; + } + return 0; + } + + uint64 GetData64(uint32 data) + { + switch(data) + { + case DATA_THESPIA: + return m_uiThespiaGUID; + case DATA_MEKGINEERSTEAMRIGGER: + return m_uiMekgineerGUID; + case DATA_KALITRESH: + return m_uiKalithreshGUID; + } + return 0; + } +}; + +InstanceData* GetInstanceData_instance_steam_vault(Map* pMap) +{ + return new instance_steam_vault(pMap); +} + +void AddSC_instance_steam_vault() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "go_main_chambers_access_panel"; + newscript->pGOHello = &GOHello_go_main_chambers_access_panel; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "instance_steam_vault"; + newscript->GetInstanceData = &GetInstanceData_instance_steam_vault; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h b/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h new file mode 100644 index 000000000..48127523f --- /dev/null +++ b/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h @@ -0,0 +1,16 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_STEAM_VAULT_H +#define DEF_STEAM_VAULT_H + +#define TYPE_HYDROMANCER_THESPIA 1 +#define TYPE_MEKGINEER_STEAMRIGGER 2 +#define TYPE_WARLORD_KALITHRESH 3 +#define TYPE_DISTILLER 4 + +#define DATA_MEKGINEERSTEAMRIGGER 5 +#define DATA_KALITRESH 6 +#define DATA_THESPIA 7 +#endif diff --git a/scripts/outland/coilfang_reservoir/underbog/boss_ghazan.cpp b/scripts/outland/coilfang_reservoir/underbog/boss_ghazan.cpp new file mode 100644 index 000000000..af63791b3 --- /dev/null +++ b/scripts/outland/coilfang_reservoir/underbog/boss_ghazan.cpp @@ -0,0 +1,79 @@ +/* Copyright (C) 2006 - 2008 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Ghazan +SD%Complete: 100 +SDComment: +SDCategory: Coilfang Resevoir, Underbog +EndScriptData */ + +#include "../../../creature/simple_ai.h" +#include "precompiled.h" + +/* +--== Ghaz'an ==-- +*Acid Spit - 34290; timer: 8sec +*Enrage - 20% hp; 40683 +*Tail Sweep - 34267; timer: ~10sec +*Acid Breath - 34268; timer: 5sec +*/ + +CreatureAI* GetAI_boss_ghazan(Creature *_Creature) +{ + SimpleAI* ai = new SimpleAI (_Creature); + + // Acid Spit - 34290; timer: 8sec + ai->Spell[0].Enabled = true; + ai->Spell[0].Spell_Id = 34290; + ai->Spell[0].Cooldown = 8000; + ai->Spell[0].First_Cast = 8000; + ai->Spell[0].Cast_Target_Type = CAST_SELF; + + // Acid Breath - 34268; timer: 5sec + ai->Spell[1].Enabled = true; + ai->Spell[1].Spell_Id = 34268; + ai->Spell[1].Cooldown = 5000; + ai->Spell[1].First_Cast = 5000; + ai->Spell[1].Cast_Target_Type = CAST_SELF; + + // Tail Sweep - 34267 + ai->Spell[2].Enabled = true; + ai->Spell[2].Spell_Id = 34267; + ai->Spell[2].Cooldown = 10000; + ai->Spell[2].First_Cast = 10000; + ai->Spell[2].Cast_Target_Type = CAST_SELF; + + // Enrage - 20% hp; 40683 + ai->Spell[3].Enabled = true; + ai->Spell[3].Spell_Id = 40683; + ai->Spell[3].Cooldown = -1; + ai->Spell[3].First_Cast = -80; + ai->Spell[3].Cast_Target_Type = CAST_SELF; + + ai->EnterEvadeMode(); + + return ai; +} + +void AddSC_boss_ghazan() +{ + Script *newscript; + newscript = new Script; + newscript->Name="boss_ghazan"; + newscript->GetAI = GetAI_boss_ghazan; + m_scripts[nrscripts++] = newscript; +} diff --git a/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp b/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp new file mode 100644 index 000000000..013acf671 --- /dev/null +++ b/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp @@ -0,0 +1,150 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Hungarfen +SD%Complete: 95 +SDComment: Need confirmation if spell data are same in both modes. Summons should have faster rate in heroic +SDCategory: Coilfang Resevoir, Underbog +EndScriptData */ + +#include "precompiled.h" + +#define SPELL_FOUL_SPORES 31673 +#define SPELL_ACID_GEYSER 38739 + +struct MANGOS_DLL_DECL boss_hungarfenAI : public ScriptedAI +{ + boss_hungarfenAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + bool m_bIsHeroicMode; + bool Root; + uint32 Mushroom_Timer; + uint32 AcidGeyser_Timer; + + void Reset() + { + Root = false; + Mushroom_Timer = 5000; // 1 mushroom after 5s, then one per 10s. This should be different in heroic mode + AcidGeyser_Timer = 10000; + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() <= 20) + { + if (!Root) + { + DoCast(m_creature,SPELL_FOUL_SPORES); + Root = true; + } + } + + if (Mushroom_Timer < diff) + { + if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) + m_creature->SummonCreature(17990, target->GetPositionX()+(rand()%8), target->GetPositionY()+(rand()%8), target->GetPositionZ(), (rand()%5), TEMPSUMMON_TIMED_DESPAWN, 22000); + else + m_creature->SummonCreature(17990, m_creature->GetPositionX()+(rand()%8), m_creature->GetPositionY()+(rand()%8), m_creature->GetPositionZ(), (rand()%5), TEMPSUMMON_TIMED_DESPAWN, 22000); + + Mushroom_Timer = 10000; + }else Mushroom_Timer -= diff; + + if (AcidGeyser_Timer < diff) + { + if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_ACID_GEYSER); + AcidGeyser_Timer = urand(10000, 17500); + }else AcidGeyser_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_hungarfen(Creature* pCreature) +{ + return new boss_hungarfenAI(pCreature); +} + +#define SPELL_SPORE_CLOUD 34168 +#define SPELL_PUTRID_MUSHROOM 31690 +#define SPELL_GROW 31698 + +struct MANGOS_DLL_DECL mob_underbog_mushroomAI : public ScriptedAI +{ + mob_underbog_mushroomAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + bool Stop; + uint32 Grow_Timer; + uint32 Shrink_Timer; + + void Reset() + { + Stop = false; + Grow_Timer = 0; + Shrink_Timer = 20000; + + DoCast(m_creature,SPELL_PUTRID_MUSHROOM,true); + DoCast(m_creature,SPELL_SPORE_CLOUD,true); + } + + void MoveInLineOfSight(Unit *who) { return; } + + void AttackStart(Unit* who) { return; } + + void UpdateAI(const uint32 diff) + { + if (Stop) + return; + + if (Grow_Timer <= diff) + { + DoCast(m_creature,SPELL_GROW); + Grow_Timer = 3000; + }else Grow_Timer -= diff; + + if (Shrink_Timer <= diff) + { + m_creature->RemoveAurasDueToSpell(SPELL_GROW); + Stop = true; + }else Shrink_Timer -= diff; + } +}; +CreatureAI* GetAI_mob_underbog_mushroom(Creature* pCreature) +{ + return new mob_underbog_mushroomAI(pCreature); +} + +void AddSC_boss_hungarfen() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_hungarfen"; + newscript->GetAI = &GetAI_boss_hungarfen; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_underbog_mushroom"; + newscript->GetAI = &GetAI_mob_underbog_mushroom; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/gruuls_lair/boss_gruul.cpp b/scripts/outland/gruuls_lair/boss_gruul.cpp new file mode 100644 index 000000000..636bc3df8 --- /dev/null +++ b/scripts/outland/gruuls_lair/boss_gruul.cpp @@ -0,0 +1,282 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Gruul +SD%Complete: 60 +SDComment: Ground Slam need further development (knock back effect and shatter effect must be added to mangos) +SDCategory: Gruul's Lair +EndScriptData */ + +#include "precompiled.h" +#include "gruuls_lair.h" + +enum +{ + 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, + + SPELL_GROWTH = 36300, + SPELL_CAVE_IN = 36240, + SPELL_GROUND_SLAM = 33525, //AoE Ground Slam applying Ground Slam to everyone with a script effect (most likely the knock back, we can code it to a set knockback) + SPELL_REVERBERATION = 36297, + SPELL_SHATTER = 33654, + + SPELL_SHATTER_EFFECT = 33671, + SPELL_HURTFUL_STRIKE = 33813, + SPELL_STONED = 33652, //Spell is self cast by target + + SPELL_MAGNETIC_PULL = 28337, + SPELL_KNOCK_BACK = 24199 //Knockback spell until correct implementation is made +}; + +struct MANGOS_DLL_DECL boss_gruulAI : public ScriptedAI +{ + boss_gruulAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 m_uiGrowth_Timer; + uint32 m_uiCaveIn_Timer; + uint32 m_uiCaveIn_StaticTimer; + uint32 m_uiGroundSlamTimer; + uint32 m_uiHurtfulStrike_Timer; + uint32 m_uiReverberation_Timer; + + bool m_bPerformingGroundSlam; + + void Reset() + { + m_uiGrowth_Timer = 30000; + m_uiCaveIn_Timer = 27000; + m_uiCaveIn_StaticTimer = 30000; + m_uiGroundSlamTimer = 35000; + m_uiHurtfulStrike_Timer = 8000; + m_uiReverberation_Timer = 60000+45000; + m_bPerformingGroundSlam = false; + } + + void Aggro(Unit *pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + + if (!m_pInstance) + return; + + m_pInstance->SetData(TYPE_GRUUL_EVENT, IN_PROGRESS); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_GRUUL_EVENT, NOT_STARTED); + } + + void KilledUnit(Unit* pVictim) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_SLAY1, m_creature); break; + case 1: DoScriptText(SAY_SLAY2, m_creature); break; + case 2: DoScriptText(SAY_SLAY3, m_creature); break; + } + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + + if (!m_pInstance) + return; + + m_pInstance->SetData(TYPE_GRUUL_EVENT, DONE); + } + + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) + { + //This to emulate effect1 (77) of SPELL_GROUND_SLAM, knock back to any direction + //It's initially wrong, since this will cause fall damage, which is by comments, not intended. + if (pSpell->Id == SPELL_GROUND_SLAM) + { + if (pTarget->GetTypeId() == TYPEID_PLAYER) + { + switch(urand(0, 1)) + { + case 0: pTarget->CastSpell(pTarget, SPELL_MAGNETIC_PULL, true, NULL, NULL, m_creature->GetGUID()); break; + case 1: pTarget->CastSpell(pTarget, SPELL_KNOCK_BACK, true, NULL, NULL, m_creature->GetGUID()); break; + } + } + } + + //this part should be in mangos + if (pSpell->Id == SPELL_SHATTER) + { + //this spell must have custom handling in mangos, dealing damage based on distance + pTarget->CastSpell(pTarget, SPELL_SHATTER_EFFECT, true); + + if (pTarget->HasAura(SPELL_STONED)) + pTarget->RemoveAurasDueToSpell(SPELL_STONED); + + //clear this, if we are still performing + if (m_bPerformingGroundSlam) + { + m_bPerformingGroundSlam = false; + + //and correct movement, if not already + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != TARGETED_MOTION_TYPE) + { + if (m_creature->getVictim()) + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + } + } + } + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // Growth + // Gruul can cast this spell up to 30 times + if (m_uiGrowth_Timer < uiDiff) + { + DoScriptText(EMOTE_GROW, m_creature); + DoCast(m_creature,SPELL_GROWTH); + m_uiGrowth_Timer = 30000; + } + else + m_uiGrowth_Timer -= uiDiff; + + if (m_bPerformingGroundSlam) + { + if (m_uiGroundSlamTimer < uiDiff) + { + m_uiGroundSlamTimer = 120000; + m_uiHurtfulStrike_Timer = 8000; + + //Give a little time to the players to undo the damage from shatter + if (m_uiReverberation_Timer < 10000) + m_uiReverberation_Timer += 10000; + + DoCast(m_creature, SPELL_SHATTER); + } + else + m_uiGroundSlamTimer -= uiDiff; + } + else + { + // Hurtful Strike + if (m_uiHurtfulStrike_Timer < uiDiff) + { + // Find 2nd-aggro target within melee range. + Unit *pTarget = NULL; + std::list t_list = m_creature->getThreatManager().getThreatList(); + std::list::iterator itr = t_list.begin(); + std::advance(itr, 1); + for(; itr!= t_list.end(); ++itr) + { + pTarget = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()); + // exclude pets, totems & player out of melee range + if (pTarget->GetTypeId() != TYPEID_PLAYER || !pTarget->IsWithinDist(m_creature, ATTACK_DISTANCE, false)) + { + pTarget = NULL; + continue; + } + //we've found someone + break; + } + + if (pTarget) + DoCast(pTarget,SPELL_HURTFUL_STRIKE); + else + DoCast(m_creature->getVictim(),SPELL_HURTFUL_STRIKE); + + m_uiHurtfulStrike_Timer = 8000; + } + else + m_uiHurtfulStrike_Timer -= uiDiff; + + // Reverberation + if (m_uiReverberation_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_REVERBERATION, true); + m_uiReverberation_Timer = urand(15000, 25000); + } + else + m_uiReverberation_Timer -= uiDiff; + + // Cave In + if (m_uiCaveIn_Timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(pTarget,SPELL_CAVE_IN); + + if (m_uiCaveIn_StaticTimer >= 4000) + m_uiCaveIn_StaticTimer -= 2000; + + m_uiCaveIn_Timer = m_uiCaveIn_StaticTimer; + + } + else + m_uiCaveIn_Timer -= uiDiff; + + // Ground Slam, Gronn Lord's Grasp, Stoned, Shatter + if (m_uiGroundSlamTimer < uiDiff) + { + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveIdle(); + + m_bPerformingGroundSlam = true; + m_uiGroundSlamTimer = 10000; + + DoCast(m_creature, SPELL_GROUND_SLAM); + } + else + m_uiGroundSlamTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } + } +}; + +CreatureAI* GetAI_boss_gruul(Creature* pCreature) +{ + return new boss_gruulAI(pCreature); +} + +void AddSC_boss_gruul() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_gruul"; + newscript->GetAI = &GetAI_boss_gruul; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp b/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp new file mode 100644 index 000000000..1b50e6497 --- /dev/null +++ b/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp @@ -0,0 +1,665 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_High_King_Maulgar +SD%Complete: 80 +SDComment: Verify that the script is working properly +SDCategory: Gruul's Lair +EndScriptData */ + +#include "precompiled.h" +#include "gruuls_lair.h" + +enum +{ + SAY_AGGRO = -1565000, + SAY_ENRAGE = -1565001, + SAY_OGRE_DEATH1 = -1565002, + SAY_OGRE_DEATH2 = -1565003, + SAY_OGRE_DEATH3 = -1565004, + SAY_OGRE_DEATH4 = -1565005, + SAY_SLAY1 = -1565006, + SAY_SLAY2 = -1565007, + SAY_SLAY3 = -1565008, + SAY_DEATH = -1565009, + + // High King Maulgar Spells + SPELL_ARCING_SMASH = 39144, + SPELL_MIGHTY_BLOW = 33230, + SPELL_WHIRLWIND = 33238, + SPELL_FLURRY = 33232, + SPELL_CHARGE = 26561, + SPELL_FEAR = 16508, + + // Olm the Summoner Spells + SPELL_DARK_DECAY = 33129, + SPELL_DEATH_COIL = 33130, + SPELL_SUMMON_WILD_FELHUNTER = 33131, + + //Kiggler the Crazed Spells + SPELL_GREATER_POLYMORPH = 33173, + SPELL_LIGHTNING_BOLT = 36152, + SPELL_ARCANE_SHOCK = 33175, + SPELL_ARCANE_EXPLOSION = 33237, + + //Blindeye the Seer Spells + SPELL_GREATER_PW_SHIELD = 33147, + SPELL_HEAL = 33144, + SPELL_PRAYEROFHEALING = 33152, + + //Krosh Firehand Spells + SPELL_GREATER_FIREBALL = 33051, + SPELL_SPELLSHIELD = 33054, + SPELL_BLAST_WAVE = 33061, + + MAX_COUNCIL = 4 +}; + +const float DISTANCE_KIGGLER = 20.0f; +const float DISTANCE_KROSH = 30.0f; + +//High King Maulgar AI +struct MANGOS_DLL_DECL boss_high_king_maulgarAI : public ScriptedAI +{ + boss_high_king_maulgarAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + memset(&m_auiCouncil, 0, sizeof(m_auiCouncil)); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 m_uiArcingSmash_Timer; + uint32 m_uiMightyBlow_Timer; + uint32 m_uiWhirlwind_Timer; + uint32 m_uiCharge_Timer; + uint32 m_uiFear_Timer; + uint32 m_uiCouncilDeathCount; + + bool m_bPhase2; + + uint64 m_auiCouncil[MAX_COUNCIL]; // Council GUIDs + + void Reset() + { + m_uiArcingSmash_Timer = urand(8000, 14000); + m_uiMightyBlow_Timer = urand(15000, 25000); + m_uiWhirlwind_Timer = 30000; + m_uiCharge_Timer = 2000; + m_uiFear_Timer = urand(10000, 25000); + m_uiCouncilDeathCount = 0; + m_bPhase2 = false; + } + + void JustReachedHome() + { + for (uint8 i = 0; i < MAX_COUNCIL; ++i) + { + if (Creature* pCreature = (Creature*)Unit::GetUnit((*m_creature), m_auiCouncil[i])) + { + if (!pCreature->isAlive()) + pCreature->Respawn(); + else if (pCreature->getVictim()) + pCreature->AI()->EnterEvadeMode(); + } + } + + if (m_pInstance && m_pInstance->GetData(TYPE_MAULGAR_EVENT) == IN_PROGRESS) + m_pInstance->SetData(TYPE_MAULGAR_EVENT, NOT_STARTED); + } + + void KilledUnit() + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_SLAY1, m_creature); break; + case 1: DoScriptText(SAY_SLAY2, m_creature); break; + case 2: DoScriptText(SAY_SLAY3, m_creature); break; + } + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + + if (!m_pInstance) + return; + + //we risk being DONE before adds are in fact dead + m_pInstance->SetData(TYPE_MAULGAR_EVENT, DONE); + } + + void Aggro(Unit *pWho) + { + if (!m_pInstance) + return; + + GetCouncil(); + + DoScriptText(SAY_AGGRO, m_creature); + + m_creature->CallForHelp(50.0f); + + if (m_pInstance->GetData(TYPE_MAULGAR_EVENT) == NOT_STARTED) + m_pInstance->SetData(TYPE_MAULGAR_EVENT, IN_PROGRESS); + } + + void GetCouncil() + { + if (!m_pInstance) + return; + + //get council member's guid to respawn them if needed + m_auiCouncil[0] = m_pInstance->GetData64(DATA_KIGGLER); + m_auiCouncil[1] = m_pInstance->GetData64(DATA_BLINDEYE); + m_auiCouncil[2] = m_pInstance->GetData64(DATA_OLM); + m_auiCouncil[3] = m_pInstance->GetData64(DATA_KROSH); + } + + void EventCouncilDeath() + { + switch(++m_uiCouncilDeathCount) + { + case 1: DoScriptText(SAY_OGRE_DEATH1, m_creature); break; + case 2: DoScriptText(SAY_OGRE_DEATH2, m_creature); break; + case 3: DoScriptText(SAY_OGRE_DEATH3, m_creature); break; + case 4: DoScriptText(SAY_OGRE_DEATH4, m_creature); break; + } + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //someone evaded! + if (m_pInstance && m_pInstance->GetData(TYPE_MAULGAR_EVENT) == NOT_STARTED) + { + EnterEvadeMode(); + return; + } + + //m_uiArcingSmash_Timer + if (m_uiArcingSmash_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_ARCING_SMASH); + m_uiArcingSmash_Timer = urand(8000, 12000); + } + else + m_uiArcingSmash_Timer -= uiDiff; + + //m_uiWhirlwind_Timer + if (m_uiWhirlwind_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_WHIRLWIND); + m_uiWhirlwind_Timer = urand(30000, 40000); + } + else + m_uiWhirlwind_Timer -= uiDiff; + + //m_uiMightyBlow_Timer + if (m_uiMightyBlow_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_MIGHTY_BLOW); + m_uiMightyBlow_Timer = urand(20000, 35000); + } + else + m_uiMightyBlow_Timer -= uiDiff; + + //Entering Phase 2 + if (!m_bPhase2 && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 50) + { + m_bPhase2 = true; + DoScriptText(SAY_ENRAGE, m_creature); + DoCast(m_creature, SPELL_FLURRY); + } + + if (m_bPhase2) + { + //m_uiCharge_Timer + if (m_uiCharge_Timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1)) + DoCast(pTarget, SPELL_CHARGE); + + m_uiCharge_Timer = urand(14000, 20000); + } + else + m_uiCharge_Timer -= uiDiff; + + //m_uiFear_Timer + if (m_uiFear_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_FEAR); + m_uiFear_Timer = urand(20000, 35000); + } + else + m_uiFear_Timer -= uiDiff; + } + + DoMeleeAttackIfReady(); + } +}; + +// Base AI for every council member +struct MANGOS_DLL_DECL Council_Base_AI : public ScriptedAI +{ + Council_Base_AI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + } + + ScriptedInstance* m_pInstance; + + void JustReachedHome() + { + if (m_pInstance && m_pInstance->GetData(TYPE_MAULGAR_EVENT) == IN_PROGRESS) + m_pInstance->SetData(TYPE_MAULGAR_EVENT, NOT_STARTED); + } + + void Aggro(Unit *pWho) + { + if (m_pInstance && m_pInstance->GetData(TYPE_MAULGAR_EVENT) == NOT_STARTED) + m_pInstance->SetData(TYPE_MAULGAR_EVENT, IN_PROGRESS); + + m_creature->CallForHelp(50.0f); + } + + void JustDied(Unit* pVictim) + { + if (!m_pInstance) + return; + + Creature* pMaulgar = (Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_MAULGAR)); + + if (pMaulgar->isAlive()) + { + if (boss_high_king_maulgarAI* pMaulgarAI = dynamic_cast(pMaulgar->AI())) + pMaulgarAI->EventCouncilDeath(); + } + } +}; + +//Olm The Summoner AI +struct MANGOS_DLL_DECL boss_olm_the_summonerAI : public Council_Base_AI +{ + boss_olm_the_summonerAI(Creature* pCreature) : Council_Base_AI(pCreature) {Reset();} + + uint32 m_uiDarkDecay_Timer; + uint32 m_uiDeathCoil_Timer; + uint32 m_uiSummon_Timer; + + void Reset() + { + m_uiDarkDecay_Timer = 18000; + m_uiDeathCoil_Timer = 14000; + m_uiSummon_Timer = 10000; + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //someone evaded! + if (m_pInstance && m_pInstance->GetData(TYPE_MAULGAR_EVENT) == NOT_STARTED) + { + EnterEvadeMode(); + return; + } + + //m_uiDarkDecay_Timer + if (m_uiDarkDecay_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_DARK_DECAY); + m_uiDarkDecay_Timer = 20000; + } + else + m_uiDarkDecay_Timer -= uiDiff; + + //m_uiDeathCoil_Timer + if (m_uiDeathCoil_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_DEATH_COIL); + m_uiDeathCoil_Timer = urand(8000, 13000); + } + else + m_uiDeathCoil_Timer -= uiDiff; + + //m_uiSummon_Timer + if (m_uiSummon_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_SUMMON_WILD_FELHUNTER); + m_uiSummon_Timer = urand(25000, 35000); + } + else + m_uiSummon_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +//Kiggler The Crazed AI +struct MANGOS_DLL_DECL boss_kiggler_the_crazedAI : public Council_Base_AI +{ + boss_kiggler_the_crazedAI(Creature* pCreature) : Council_Base_AI(pCreature) {Reset();} + + uint32 m_uiGreatherPolymorph_Timer; + uint32 m_uiLightningBolt_Timer; + uint32 m_uiArcaneShock_Timer; + uint32 m_uiArcaneExplosion_Timer; + + void Reset() + { + m_uiGreatherPolymorph_Timer = 15000; + m_uiLightningBolt_Timer = 10000; + m_uiArcaneShock_Timer = 20000; + m_uiArcaneExplosion_Timer = 30000; + } + + void SpellHitTarget(Unit* pVictim, const SpellEntry* pSpell) + { + // Spell currently not supported by core. Knock back effect should lower threat + // Workaround in script: + if (pSpell->Id == SPELL_ARCANE_EXPLOSION) + { + if (pVictim->GetTypeId() != TYPEID_PLAYER) + return; + + m_creature->getThreatManager().modifyThreatPercent(pVictim,-75); + } + } + + void AttackStart(Unit* pWho) + { + if (!pWho) + return; + + if (m_creature->Attack(pWho, false)) + { + m_creature->AddThreat(pWho, 0.0f); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + + m_creature->GetMotionMaster()->MoveChase(pWho, DISTANCE_KIGGLER); + } + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //someone evaded! + if (m_pInstance && m_pInstance->GetData(TYPE_MAULGAR_EVENT) == NOT_STARTED) + { + EnterEvadeMode(); + return; + } + + if (m_uiGreatherPolymorph_Timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, SPELL_GREATER_POLYMORPH); + m_uiGreatherPolymorph_Timer = urand(15000, 20000); + } + else + m_uiGreatherPolymorph_Timer -= uiDiff; + + //LightningBolt_Timer + if (m_uiLightningBolt_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_LIGHTNING_BOLT); + m_uiLightningBolt_Timer = urand(2500, 4000); + } + else + m_uiLightningBolt_Timer -= uiDiff; + + //ArcaneShock_Timer + if (m_uiArcaneShock_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_ARCANE_SHOCK); + m_uiArcaneShock_Timer = urand(15000, 20000); + } + else + m_uiArcaneShock_Timer -= uiDiff; + + //ArcaneExplosion_Timer + if (m_uiArcaneExplosion_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_ARCANE_EXPLOSION); + m_uiArcaneExplosion_Timer = 30000; + } + else + m_uiArcaneExplosion_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +//Blindeye The Seer AI +struct MANGOS_DLL_DECL boss_blindeye_the_seerAI : public Council_Base_AI +{ + boss_blindeye_the_seerAI(Creature* pCreature) : Council_Base_AI(pCreature) {Reset();} + + uint32 m_uiGreaterPowerWordShield_Timer; + uint32 m_uiHeal_Timer; + uint32 m_uiPrayerofHealing_Timer; + + void Reset() + { + m_uiGreaterPowerWordShield_Timer = 5000; + m_uiHeal_Timer = urand(25000, 40000); + m_uiPrayerofHealing_Timer = urand(45000, 55000); + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //someone evaded! + if (m_pInstance && m_pInstance->GetData(TYPE_MAULGAR_EVENT) == NOT_STARTED) + { + EnterEvadeMode(); + return; + } + + //m_uiGreaterPowerWordShield_Timer + if (m_uiGreaterPowerWordShield_Timer < uiDiff) + { + DoCast(m_creature, SPELL_GREATER_PW_SHIELD); + m_uiGreaterPowerWordShield_Timer = urand(30000, 40000); + } + else + m_uiGreaterPowerWordShield_Timer -= uiDiff; + + //m_uiHeal_Timer + if (m_uiHeal_Timer < uiDiff) + { + DoCast(m_creature, SPELL_HEAL); + m_uiHeal_Timer = urand(15000, 40000); + } + else + m_uiHeal_Timer -= uiDiff; + + //PrayerofHealing_Timer + if (m_uiPrayerofHealing_Timer < uiDiff) + { + DoCast(m_creature, SPELL_PRAYEROFHEALING); + m_uiPrayerofHealing_Timer = urand(35000, 50000); + } + else + m_uiPrayerofHealing_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +//Krosh Firehand AI +struct MANGOS_DLL_DECL boss_krosh_firehandAI : public Council_Base_AI +{ + boss_krosh_firehandAI(Creature* pCreature) : Council_Base_AI(pCreature) {Reset();} + + uint32 m_uiGreaterFireball_Timer; + uint32 m_uiSpellShield_Timer; + uint32 m_uiBlastWave_Timer; + + void Reset() + { + m_uiGreaterFireball_Timer = 4000; + m_uiSpellShield_Timer = 1000; + m_uiBlastWave_Timer = 12000; + } + + void AttackStart(Unit* pWho) + { + if (!pWho) + return; + + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho, 0.0f); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + + m_creature->GetMotionMaster()->MoveChase(pWho, DISTANCE_KROSH); + } + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //someone evaded! + if (m_pInstance && m_pInstance->GetData(TYPE_MAULGAR_EVENT) == NOT_STARTED) + { + EnterEvadeMode(); + return; + } + + //m_uiGreaterFireball_Timer + if (m_uiGreaterFireball_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_GREATER_FIREBALL); + m_uiGreaterFireball_Timer = 3200; + } + else + m_uiGreaterFireball_Timer -= uiDiff; + + //SpellShield_Timer + if (m_uiSpellShield_Timer < uiDiff) + { + m_creature->InterruptNonMeleeSpells(false); + DoCast(m_creature->getVictim(), SPELL_SPELLSHIELD); + m_uiSpellShield_Timer = 30000; + } + else + m_uiSpellShield_Timer -= uiDiff; + + //BlastWave_Timer + if (m_uiBlastWave_Timer < uiDiff) + { + bool bInRange = false; + Unit* pTarget = NULL; + + std::list& threatlist = m_creature->getThreatManager().getThreatList(); + for (std::list::iterator i = threatlist.begin(); i!= threatlist.end(); ++i) + { + Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid()); + if (pUnit && pUnit->IsWithinDistInMap(m_creature, 15.0f)) + { + bInRange = true; + pTarget = pUnit; + break; + } + } + + m_uiBlastWave_Timer = 6000; + + if (bInRange) + { + m_creature->InterruptNonMeleeSpells(false); + DoCast(pTarget, SPELL_BLAST_WAVE); + } + } + else + m_uiBlastWave_Timer -= uiDiff; + } +}; + +CreatureAI* GetAI_boss_high_king_maulgar(Creature* pCreature) +{ + return new boss_high_king_maulgarAI(pCreature); +} + +CreatureAI* GetAI_boss_olm_the_summoner(Creature* pCreature) +{ + return new boss_olm_the_summonerAI(pCreature); +} + +CreatureAI *GetAI_boss_kiggler_the_crazed(Creature* pCreature) +{ + return new boss_kiggler_the_crazedAI(pCreature); +} + +CreatureAI *GetAI_boss_blindeye_the_seer(Creature* pCreature) +{ + return new boss_blindeye_the_seerAI(pCreature); +} + +CreatureAI *GetAI_boss_krosh_firehand(Creature* pCreature) +{ + return new boss_krosh_firehandAI(pCreature); +} + +void AddSC_boss_high_king_maulgar() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_high_king_maulgar"; + newscript->GetAI = &GetAI_boss_high_king_maulgar; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_kiggler_the_crazed"; + newscript->GetAI = &GetAI_boss_kiggler_the_crazed; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_blindeye_the_seer"; + newscript->GetAI = &GetAI_boss_blindeye_the_seer; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_olm_the_summoner"; + newscript->GetAI = &GetAI_boss_olm_the_summoner; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_krosh_firehand"; + newscript->GetAI = &GetAI_boss_krosh_firehand; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/gruuls_lair/gruuls_lair.h b/scripts/outland/gruuls_lair/gruuls_lair.h new file mode 100644 index 000000000..927b1b774 --- /dev/null +++ b/scripts/outland/gruuls_lair/gruuls_lair.h @@ -0,0 +1,24 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_GRUULS_LAIR_H +#define DEF_GRUULS_LAIR_H + +enum +{ + MAX_ENCOUNTER = 2, + + // Encounter Status + TYPE_MAULGAR_EVENT = 1, + TYPE_GRUUL_EVENT = 2, + + // NPC GUIDs + DATA_MAULGAR = 3, + DATA_BLINDEYE = 4, + DATA_KIGGLER = 5, + DATA_KROSH = 6, + DATA_OLM = 7 +}; + +#endif diff --git a/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp b/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp new file mode 100644 index 000000000..ac4e5df49 --- /dev/null +++ b/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp @@ -0,0 +1,188 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance_Gruuls_Lair +SD%Complete: 100 +SDComment: +SDCategory: Gruul's Lair +EndScriptData */ + +#include "precompiled.h" +#include "gruuls_lair.h" + +/* Gruuls Lair encounters: +1 - High King Maulgar event +2 - Gruul event +*/ + +struct MANGOS_DLL_DECL instance_gruuls_lair : public ScriptedInstance +{ + instance_gruuls_lair(Map *pMap) : ScriptedInstance(pMap) {Initialize();} + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string strSaveData; + + uint64 m_uiMaulgarGUID; + uint64 m_uiKigglerGUID; + uint64 m_uiBlindeyeGUID; + uint64 m_uiOlmGUID; + uint64 m_uiKroshGUID; + uint64 m_uiMaulgarDoorGUID; + uint64 m_uiGruulEncounterDoorGUID; + + void Initialize() + { + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + + m_uiMaulgarGUID = 0; + m_uiKigglerGUID = 0; + m_uiBlindeyeGUID = 0; + m_uiOlmGUID = 0; + m_uiKroshGUID = 0; + + m_uiMaulgarDoorGUID = 0; + m_uiGruulEncounterDoorGUID = 0; + } + + bool IsEncounterInProgress() const + { + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) + if (m_auiEncounter[i] == IN_PROGRESS) + return true; + + return false; + } + + void OnCreatureCreate(Creature* pCreature) + { + switch (pCreature->GetEntry()) + { + case 18831: m_uiMaulgarGUID = pCreature->GetGUID(); break; + case 18832: m_uiKroshGUID = pCreature->GetGUID(); break; + case 18834: m_uiOlmGUID = pCreature->GetGUID(); break; + case 18835: m_uiKigglerGUID = pCreature->GetGUID(); break; + case 18836: m_uiBlindeyeGUID = pCreature->GetGUID(); break; + } + } + + void OnObjectCreate(GameObject* pGo) + { + switch (pGo->GetEntry()) + { + case 184468: + m_uiMaulgarDoorGUID = pGo->GetGUID(); + if (m_auiEncounter[0] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case 184662: + m_uiGruulEncounterDoorGUID = pGo->GetGUID(); + break; + } + } + + void SetData(uint32 uiType, uint32 uiData) + { + switch (uiType) + { + case TYPE_MAULGAR_EVENT: + if (uiData == DONE) + DoUseDoorOrButton(m_uiMaulgarDoorGUID); + m_auiEncounter[0] = uiData; + break; + case TYPE_GRUUL_EVENT: + DoUseDoorOrButton(m_uiGruulEncounterDoorGUID); + m_auiEncounter[1] = uiData; + break; + } + + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1]; + + strSaveData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } + } + + const char* Save() + { + return strSaveData.c_str(); + } + + uint32 GetData(uint32 uiType) + { + switch (uiType) + { + case TYPE_MAULGAR_EVENT: return m_auiEncounter[0]; + case TYPE_GRUUL_EVENT: return m_auiEncounter[1]; + } + return 0; + } + + uint64 GetData64(uint32 uiData) + { + switch (uiData) + { + case DATA_MAULGAR: return m_uiMaulgarGUID; + case DATA_BLINDEYE: return m_uiBlindeyeGUID; + case DATA_KIGGLER: return m_uiKigglerGUID; + case DATA_KROSH: return m_uiKroshGUID; + case DATA_OLM: return m_uiOlmGUID; + } + return 0; + } + + void Load(const char* chrIn) + { + if (!chrIn) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(chrIn); + + std::istringstream loadStream(chrIn); + + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1]; + + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; + + OUT_LOAD_INST_DATA_COMPLETE; + } +}; + +InstanceData* GetInstanceData_instance_gruuls_lair(Map* pMap) +{ + return new instance_gruuls_lair(pMap); +} + +void AddSC_instance_gruuls_lair() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "instance_gruuls_lair"; + newscript->GetInstanceData = &GetInstanceData_instance_gruuls_lair; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h b/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h new file mode 100644 index 000000000..07c4c72b2 --- /dev/null +++ b/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h @@ -0,0 +1,35 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_BLOOD_FURNACE_H +#define DEF_BLOOD_FURNACE_H + +enum +{ + GO_DOOR_FINAL_EXIT = 181766, + GO_DOOR_MAKER_FRONT = 181811, + GO_DOOR_MAKER_REAR = 181812, + GO_DOOR_BROGGOK_FRONT = 181822, + GO_DOOR_BROGGOK_REAR = 181819, + GO_DOOR_KELIDAN_EXIT = 181823, + + DATA_THE_MAKER = 1, + DATA_BROGGOK = 2, + DATA_KELIDAN_THE_MAKER = 3, + + TYPE_THE_MAKER_EVENT = 4, + TYPE_BROGGOK_EVENT = 5, + TYPE_KELIDAN_EVENT = 6, + + DATA_PRISON_CELL_MAKER1 = 10, + DATA_PRISON_CELL_MAKER2 = 11, + DATA_PRISON_CELL_MAKER3 = 12, + DATA_PRISON_CELL_MAKER4 = 13, + DATA_PRISON_CELL_BROGGOK1 = 14, + DATA_PRISON_CELL_BROGGOK2 = 15, + DATA_PRISON_CELL_BROGGOK3 = 16, + DATA_PRISON_CELL_BROGGOK4 = 17 +}; + +#endif diff --git a/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp b/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp new file mode 100644 index 000000000..011687d86 --- /dev/null +++ b/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp @@ -0,0 +1,145 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Broggok +SD%Complete: 70 +SDComment: pre-event not made +SDCategory: Hellfire Citadel, Blood Furnace +EndScriptData */ + +#include "precompiled.h" +#include "blood_furnace.h" + +enum +{ + SAY_AGGRO = -1542008, + + SPELL_SLIME_SPRAY = 30913, + SPELL_POISON_CLOUD = 30916, + SPELL_POISON_BOLT = 30917, + + SPELL_POISON = 30914 +}; + +struct MANGOS_DLL_DECL boss_broggokAI : public ScriptedAI +{ + boss_broggokAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 AcidSpray_Timer; + uint32 PoisonSpawn_Timer; + uint32 PoisonBolt_Timer; + + void Reset() + { + AcidSpray_Timer = 10000; + PoisonSpawn_Timer = 5000; + PoisonBolt_Timer = 7000; + } + + void Aggro(Unit *who) + { + DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_BROGGOK_EVENT,IN_PROGRESS); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_BROGGOK_EVENT,FAIL); + } + + void JustSummoned(Creature *summoned) + { + summoned->setFaction(16); + summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + summoned->CastSpell(summoned,SPELL_POISON,false,0,0,m_creature->GetGUID()); + } + + void JustDied(Unit *who) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_BROGGOK_EVENT,DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (AcidSpray_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_SLIME_SPRAY); + AcidSpray_Timer = urand(4000, 12000); + }else AcidSpray_Timer -=diff; + + if (PoisonBolt_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_POISON_BOLT); + PoisonBolt_Timer = urand(4000, 12000); + }else PoisonBolt_Timer -=diff; + + if (PoisonSpawn_Timer < diff) + { + DoCast(m_creature,SPELL_POISON_CLOUD); + PoisonSpawn_Timer = 20000; + }else PoisonSpawn_Timer -=diff; + + DoMeleeAttackIfReady(); + } +}; + +struct MANGOS_DLL_DECL mob_broggok_poisoncloudAI : public ScriptedAI +{ + mob_broggok_poisoncloudAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + void Reset() { } + void MoveInLineOfSight(Unit *who) { } + void AttackStart(Unit *who) { } +}; + +CreatureAI* GetAI_boss_broggok(Creature* pCreature) +{ + return new boss_broggokAI(pCreature); +} + +CreatureAI* GetAI_mob_broggok_poisoncloud(Creature* pCreature) +{ + return new mob_broggok_poisoncloudAI(pCreature); +} + +void AddSC_boss_broggok() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_broggok"; + newscript->GetAI = &GetAI_boss_broggok; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_broggok_poisoncloud"; + newscript->GetAI = &GetAI_mob_broggok_poisoncloud; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp b/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp new file mode 100644 index 000000000..92e357032 --- /dev/null +++ b/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp @@ -0,0 +1,238 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Kelidan_The_Breaker +SD%Complete: 60 +SDComment: Event with channeleres vs. boss not implemented yet +SDCategory: Hellfire Citadel, Blood Furnace +EndScriptData */ + +/* ContentData +boss_kelidan_the_breaker +mob_shadowmoon_channeler +EndContentData */ + +#include "precompiled.h" +#include "blood_furnace.h" + +enum +{ + 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, + + SPELL_CORRUPTION = 30938, + + SPELL_FIRE_NOVA = 33132, + H_SPELL_FIRE_NOVA = 37371, + + SPELL_SHADOW_BOLT_VOLLEY = 28599, + H_SPELL_SHADOW_BOLT_VOLLEY = 40070, + + SPELL_BURNING_NOVA = 30940, + SPELL_VORTEX = 37370 +}; + +struct MANGOS_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI +{ + boss_kelidan_the_breakerAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + bool m_bIsHeroicMode; + + uint32 ShadowVolley_Timer; + uint32 BurningNova_Timer; + uint32 Firenova_Timer; + uint32 Corruption_Timer; + bool Firenova; + + void Reset() + { + ShadowVolley_Timer = 1000; + BurningNova_Timer = 15000; + Corruption_Timer = 5000; + Firenova = false; + } + + void Aggro(Unit *who) + { + DoScriptText(SAY_WAKE, m_creature); + } + + void KilledUnit(Unit* victim) + { + if (urand(0, 1)) + return; + + DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); + } + + void JustDied(Unit* Killer) + { + DoScriptText(SAY_DIE, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_KELIDAN_EVENT,DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (Firenova) + { + if (Firenova_Timer < diff) + { + DoCast(m_creature, m_bIsHeroicMode ? H_SPELL_FIRE_NOVA : SPELL_FIRE_NOVA); + Firenova = false; + ShadowVolley_Timer = 2000; + }else Firenova_Timer -=diff; + + return; + } + + if (ShadowVolley_Timer < diff) + { + DoCast(m_creature, m_bIsHeroicMode ? H_SPELL_SHADOW_BOLT_VOLLEY : SPELL_SHADOW_BOLT_VOLLEY); + ShadowVolley_Timer = urand(5000, 13000); + }else ShadowVolley_Timer -=diff; + + if (Corruption_Timer < diff) + { + DoCast(m_creature,SPELL_CORRUPTION); + Corruption_Timer = urand(30000, 50000); + }else Corruption_Timer -=diff; + + if (BurningNova_Timer < diff) + { + if (m_creature->IsNonMeleeSpellCasted(false)) + m_creature->InterruptNonMeleeSpells(true); + + DoScriptText(SAY_NOVA, m_creature); + + if (m_bIsHeroicMode) + DoCast(m_creature,SPELL_VORTEX); + + DoCast(m_creature,SPELL_BURNING_NOVA); + + BurningNova_Timer = urand(20000, 28000); + Firenova_Timer= 5000; + Firenova = true; + }else BurningNova_Timer -=diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_kelidan_the_breaker(Creature* pCreature) +{ + return new boss_kelidan_the_breakerAI(pCreature); +} + +/*###### +## mob_shadowmoon_channeler +######*/ + +enum +{ + SPELL_SHADOW_BOLT = 12739, + H_SPELL_SHADOW_BOLT = 15472, + + SPELL_MARK_OF_SHADOW = 30937, + + SPELL_CHANNELING = 0 //initial spell channeling boss/each other not known +}; //when engaged all channelers must stop, trigger yell (SAY_ADD_AGGRO_*), and engage. + +struct MANGOS_DLL_DECL mob_shadowmoon_channelerAI : public ScriptedAI +{ + mob_shadowmoon_channelerAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + uint32 ShadowBolt_Timer; + uint32 MarkOfShadow_Timer; + + void Reset() + { + ShadowBolt_Timer = urand(1000, 2000); + MarkOfShadow_Timer = urand(5000, 7000); + } + + void Aggro(Unit* who) + { + //trigger boss to yell + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (MarkOfShadow_Timer < diff) + { + if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(target,SPELL_MARK_OF_SHADOW); + MarkOfShadow_Timer = urand(15000, 20000); + }else MarkOfShadow_Timer -=diff; + + if (ShadowBolt_Timer < diff) + { + DoCast(m_creature->getVictim(), m_bIsHeroicMode ? H_SPELL_SHADOW_BOLT : SPELL_SHADOW_BOLT); + ShadowBolt_Timer = urand(5000, 6000); + }else ShadowBolt_Timer -=diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_shadowmoon_channeler(Creature* pCreature) +{ + return new mob_shadowmoon_channelerAI(pCreature); +} + +void AddSC_boss_kelidan_the_breaker() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_kelidan_the_breaker"; + newscript->GetAI = &GetAI_boss_kelidan_the_breaker; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_shadowmoon_channeler"; + newscript->GetAI = &GetAI_mob_shadowmoon_channeler; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp b/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp new file mode 100644 index 000000000..e022f82b9 --- /dev/null +++ b/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp @@ -0,0 +1,149 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_The_Maker +SD%Complete: 80 +SDComment: Mind control no support +SDCategory: Hellfire Citadel, Blood Furnace +EndScriptData */ + +#include "precompiled.h" +#include "blood_furnace.h" + +enum +{ + 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 + SPELL_EXPLODING_BREAKER = 30925, + SPELL_KNOCKDOWN = 20276, + SPELL_DOMINATION = 25772 // ??? +}; + +struct MANGOS_DLL_DECL boss_the_makerAI : public ScriptedAI +{ + boss_the_makerAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 AcidSpray_Timer; + uint32 ExplodingBreaker_Timer; + uint32 Domination_Timer; + uint32 Knockdown_Timer; + + void Reset() + { + AcidSpray_Timer = 15000; + ExplodingBreaker_Timer = 6000; + Domination_Timer = 120000; + Knockdown_Timer = 10000; + } + + void Aggro(Unit *who) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_AGGRO_1, m_creature); break; + case 1: DoScriptText(SAY_AGGRO_2, m_creature); break; + case 2: DoScriptText(SAY_AGGRO_3, m_creature); break; + } + + if (m_pInstance) + m_pInstance->SetData(TYPE_THE_MAKER_EVENT,IN_PROGRESS); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_THE_MAKER_EVENT,FAIL); + } + + void KilledUnit(Unit* victim) + { + DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); + } + + void JustDied(Unit* Killer) + { + DoScriptText(SAY_DIE, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_THE_MAKER_EVENT,DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (AcidSpray_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_ACID_SPRAY); + AcidSpray_Timer = urand(15000, 23000); + }else AcidSpray_Timer -=diff; + + if (ExplodingBreaker_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_EXPLODING_BREAKER); + ExplodingBreaker_Timer = urand(4000, 12000); + }else ExplodingBreaker_Timer -=diff; + + /* // Disabled until Core Support for mind control + if (domination_timer_timer < diff) + { + Unit* target; + target = SelectUnit(SELECT_TARGET_RANDOM,0); + + DoCast(target,SPELL_DOMINATION); + + domination_timer = 120000; + }else domination_timer -=diff; + */ + + if (Knockdown_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_KNOCKDOWN); + Knockdown_Timer = urand(4000, 12000); + }else Knockdown_Timer -=diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_the_makerAI(Creature* pCreature) +{ + return new boss_the_makerAI(pCreature); +} + +void AddSC_boss_the_maker() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_the_maker"; + newscript->GetAI = &GetAI_boss_the_makerAI; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp b/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp new file mode 100644 index 000000000..a66e9d94a --- /dev/null +++ b/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp @@ -0,0 +1,256 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance_Blood_Furnace +SD%Complete: 75 +SDComment: +SDCategory: Blood Furnace +EndScriptData */ + +#include "precompiled.h" +#include "blood_furnace.h" + +#define MAX_ENCOUNTER 3 + +struct MANGOS_DLL_DECL instance_blood_furnace : public ScriptedInstance +{ + instance_blood_furnace(Map* pMap) : ScriptedInstance(pMap) {Initialize();} + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string strInstData; + + uint64 m_uiMakerGUID; + uint64 m_uiBroggokGUID; + uint64 m_uiKelidanGUID; + + uint64 m_uiDoorFinalExitGUID; + uint64 m_uiDoorMakerFrontGUID; + uint64 m_uiDoorMakerRearGUID; + uint64 m_uiDoorBroggokFrontGUID; + uint64 m_uiDoorBrokkokRearGUID; + uint64 m_uiDoorKelidanExitGUID; + + uint64 m_uiPrisonCell1GUID; + uint64 m_uiPrisonCell2GUID; + uint64 m_uiPrisonCell3GUID; + uint64 m_uiPrisonCell4GUID; + uint64 m_uiPrisonCell5GUID; + uint64 m_uiPrisonCell6GUID; + uint64 m_uiPrisonCell7GUID; + uint64 m_uiPrisonCell8GUID; + + void Initialize() + { + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + + m_uiMakerGUID = 0; + m_uiBroggokGUID = 0; + m_uiKelidanGUID = 0; + + m_uiDoorFinalExitGUID = 0; + m_uiDoorMakerFrontGUID = 0; + m_uiDoorMakerRearGUID = 0; + m_uiDoorBroggokFrontGUID = 0; + m_uiDoorBrokkokRearGUID = 0; + m_uiDoorKelidanExitGUID = 0; + + m_uiPrisonCell1GUID = 0; + m_uiPrisonCell2GUID = 0; + m_uiPrisonCell3GUID = 0; + m_uiPrisonCell4GUID = 0; + m_uiPrisonCell5GUID = 0; + m_uiPrisonCell6GUID = 0; + m_uiPrisonCell7GUID = 0; + m_uiPrisonCell8GUID = 0; + } + + void OnCreatureCreate(Creature* pCreature) + { + switch(pCreature->GetEntry()) + { + case 17381: m_uiMakerGUID = pCreature->GetGUID(); break; + case 17380: m_uiBroggokGUID = pCreature->GetGUID(); break; + case 17377: m_uiKelidanGUID = pCreature->GetGUID(); break; + } + } + + void OnObjectCreate(GameObject* pGo) + { + switch (pGo->GetEntry()) + { + case GO_DOOR_MAKER_FRONT: //the maker front door + m_uiDoorMakerFrontGUID = pGo->GetGUID(); + break; + case GO_DOOR_MAKER_REAR: //the maker rear door + m_uiDoorMakerRearGUID = pGo->GetGUID(); + if (m_auiEncounter[0] == DONE && pGo->GetGoState() == GO_STATE_READY) + DoUseDoorOrButton(m_uiDoorMakerRearGUID); + break; + case GO_DOOR_BROGGOK_FRONT: //broggok front door + m_uiDoorBroggokFrontGUID = pGo->GetGUID(); + break; + case GO_DOOR_BROGGOK_REAR: //broggok rear door + m_uiDoorBrokkokRearGUID = pGo->GetGUID(); + if (m_auiEncounter[1] == DONE && pGo->GetGoState() == GO_STATE_READY) + DoUseDoorOrButton(m_uiDoorBrokkokRearGUID); + break; + case GO_DOOR_KELIDAN_EXIT: //kelidan exit door + m_uiDoorKelidanExitGUID = pGo->GetGUID(); + if (m_auiEncounter[2] == DONE && pGo->GetGoState() == GO_STATE_READY) + DoUseDoorOrButton(m_uiDoorKelidanExitGUID); + break; + case GO_DOOR_FINAL_EXIT: //final exit door + m_uiDoorFinalExitGUID = pGo->GetGUID(); + if (m_auiEncounter[2] == DONE && pGo->GetGoState() == GO_STATE_READY) + DoUseDoorOrButton(m_uiDoorFinalExitGUID); + break; + case 181813: m_uiPrisonCell1GUID = pGo->GetGUID(); break;//the maker cell front right + case 181814: m_uiPrisonCell2GUID = pGo->GetGUID(); break;//the maker cell back right + case 181816: m_uiPrisonCell3GUID = pGo->GetGUID(); break;//the maker cell front left + case 181815: m_uiPrisonCell4GUID = pGo->GetGUID(); break;//the maker cell back left + case 181821: m_uiPrisonCell5GUID = pGo->GetGUID(); break;//broggok cell front right + case 181818: m_uiPrisonCell6GUID = pGo->GetGUID(); break;//broggok cell back right + case 181820: m_uiPrisonCell7GUID = pGo->GetGUID(); break;//broggok cell front left + case 181817: m_uiPrisonCell8GUID = pGo->GetGUID(); break;//broggok cell back left + } + } + + uint64 GetData64(uint32 uiData) + { + switch(uiData) + { + case DATA_THE_MAKER: return m_uiMakerGUID; + case DATA_BROGGOK: return m_uiBroggokGUID; + case DATA_PRISON_CELL_MAKER1: return m_uiPrisonCell1GUID; + case DATA_PRISON_CELL_MAKER2: return m_uiPrisonCell2GUID; + case DATA_PRISON_CELL_MAKER3: return m_uiPrisonCell3GUID; + case DATA_PRISON_CELL_MAKER4: return m_uiPrisonCell4GUID; + case DATA_PRISON_CELL_BROGGOK1: return m_uiPrisonCell5GUID; + case DATA_PRISON_CELL_BROGGOK2: return m_uiPrisonCell6GUID; + case DATA_PRISON_CELL_BROGGOK3: return m_uiPrisonCell7GUID; + case DATA_PRISON_CELL_BROGGOK4: return m_uiPrisonCell8GUID; + } + + return 0; + } + + void SetData(uint32 uiType, uint32 uiData) + { + switch(uiType) + { + case TYPE_THE_MAKER_EVENT: + if (uiData == IN_PROGRESS) + DoUseDoorOrButton(m_uiDoorMakerFrontGUID); + if (uiData == FAIL) + DoUseDoorOrButton(m_uiDoorMakerFrontGUID); + if (uiData == DONE) + { + DoUseDoorOrButton(m_uiDoorMakerFrontGUID); + DoUseDoorOrButton(m_uiDoorMakerRearGUID); + } + m_auiEncounter[0] = uiData; + break; + case TYPE_BROGGOK_EVENT: + if (uiData == IN_PROGRESS) + DoUseDoorOrButton(m_uiDoorBroggokFrontGUID); + if (uiData == FAIL) + DoUseDoorOrButton(m_uiDoorBroggokFrontGUID); + if (uiData == DONE) + { + DoUseDoorOrButton(m_uiDoorBroggokFrontGUID); + DoUseDoorOrButton(m_uiDoorBrokkokRearGUID); + } + m_auiEncounter[1] = uiData; + break; + case TYPE_KELIDAN_EVENT: + if (uiData == DONE) + { + DoUseDoorOrButton(m_uiDoorKelidanExitGUID); + DoUseDoorOrButton(m_uiDoorFinalExitGUID); + } + m_auiEncounter[2] = uiData; + break; + default: + error_log("SD2: Instance Blood Furnace SetData with Type %u Data %u, but this is not implemented.",uiType,uiData); + break; + } + + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2]; + + strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } + } + + uint32 GetData(uint32 uiData) + { + switch(uiData) + { + case TYPE_THE_MAKER_EVENT: return m_auiEncounter[0]; + case TYPE_BROGGOK_EVENT: return m_auiEncounter[1]; + case TYPE_KELIDAN_EVENT: return m_auiEncounter[2]; + } + + return 0; + } + + const char* Save() + { + return strInstData.c_str(); + } + + void Load(const char* in) + { + if (!in) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(in); + + std::istringstream loadStream(in); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2]; + + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + if (m_auiEncounter[i] == IN_PROGRESS || m_auiEncounter[i] == FAIL) + m_auiEncounter[i] = NOT_STARTED; + + OUT_LOAD_INST_DATA_COMPLETE; + } +}; + +InstanceData* GetInstanceData_instance_blood_furnace(Map* pMap) +{ + return new instance_blood_furnace(pMap); +} + +void AddSC_instance_blood_furnace() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "instance_blood_furnace"; + newscript->GetInstanceData = &GetInstanceData_instance_blood_furnace; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp new file mode 100644 index 000000000..8e32b229b --- /dev/null +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp @@ -0,0 +1,290 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Nazan_And_Vazruden +SD%Complete: 30 +SDComment: Encounter is not complete. TODO: re-check script when MovementInform call from core work as expected. +SDCategory: Hellfire Citadel, Hellfire Ramparts +EndScriptData */ + +#include "precompiled.h" +#include "hellfire_ramparts.h" + +enum +{ + SAY_INTRO = -1543017, + SAY_AGGRO1 = -1543018, + SAY_AGGRO2 = -1543019, + SAY_AGGRO3 = -1543020, + SAY_TAUNT = -1543021, + SAY_KILL1 = -1543022, + SAY_KILL2 = -1543023, + SAY_DEATH = -1543024, + EMOTE_DESCEND = -1543025, + + //vazruden + SPELL_REVENGE = 40392, + + //nazan + SPELL_FIREBALL = 30691, + SPELL_H_FIREBALL = 36920, + + SPELL_CONE_OF_FIRE = 30926, + SPELL_H_CONE_OF_FIRE = 36921, + + SPELL_H_BELLOW_ROAR = 39427, + + //misc + POINT_ID_CENTER = 100, + POINT_ID_WAITING = 101, + POINT_ID_COMBAT = 102, + + NPC_VAZRUDEN_HERALD = 17307, + NPC_NAZAN = 17536, + NPC_VAZRUDEN = 17537 +}; + +const float afCenterPos[3] = {-1399.401, 1736.365, 86.008}; //moves here to drop off nazan +const float afCombatPos[3] = {-1413.848, 1754.019, 83.146}; //moves here when decending + +struct MANGOS_DLL_DECL boss_vazrudenAI : public ScriptedAI +{ + boss_vazrudenAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + bool m_bHealthBelow; + + void Reset() + { + m_bHealthBelow = false; + } + + void Aggro(Unit* pWho) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_AGGRO1, m_creature); break; + case 1: DoScriptText(SAY_AGGRO2, m_creature); break; + case 2: DoScriptText(SAY_AGGRO3, m_creature); break; + } + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_VAZRUDEN, DONE); + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(urand(0, 1) ? SAY_KILL1 : SAY_KILL2, m_creature); + } + + void PrepareAndDescendMount() + { + if (Creature* pHerald = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_HERALD))) + { + if (pHerald->HasMonsterMoveFlag(MONSTER_MOVE_WALK)) + pHerald->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + + pHerald->GetMotionMaster()->MovePoint(POINT_ID_COMBAT, afCombatPos[0], afCombatPos[1], afCombatPos[2]); + + DoScriptText(EMOTE_DESCEND, pHerald); + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (!m_bHealthBelow && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) <= 30) + { + if (m_pInstance) + PrepareAndDescendMount(); + + m_bHealthBelow = true; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_vazruden(Creature* pCreature) +{ + return new boss_vazrudenAI(pCreature); +} + +// Creature fly around platform by default. +// After "dropping off" Vazruden, transforms to mount (Nazan) and are then ready to fight when +// Vazruden reach 30% HP +struct MANGOS_DLL_DECL boss_vazruden_heraldAI : public ScriptedAI +{ + boss_vazruden_heraldAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pCreature->SetActiveObjectState(true); + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + uint32 m_uiMovementTimer; + + void Reset() + { + if (m_creature->GetEntry() != NPC_VAZRUDEN_HERALD) + m_creature->UpdateEntry(NPC_VAZRUDEN_HERALD); + + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + + m_uiMovementTimer = 0; + } + + void MoveInLineOfSight(Unit* pWho) + { + if (m_pInstance && m_pInstance->GetData(TYPE_NAZAN) != IN_PROGRESS) + return; + + ScriptedAI::MoveInLineOfSight(pWho); + } + + void MovementInform(uint32 uiType, uint32 uiPointId) + { + if (!m_pInstance) + return; + + if (uiType == WAYPOINT_MOTION_TYPE) + { + if (m_uiMovementTimer) + return; + + if (m_pInstance->GetData(TYPE_NAZAN) == SPECIAL) + { + m_creature->SetCombatStartPosition(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); + m_uiMovementTimer = 1000; + } + } + + if (uiType == POINT_MOTION_TYPE) + { + if (uiPointId == POINT_ID_CENTER) + DoSplit(); + else if (uiPointId == POINT_ID_COMBAT) + { + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_pInstance->SetData(TYPE_NAZAN, IN_PROGRESS); + } + } + } + + void DoMoveToCenter() + { + DoScriptText(SAY_INTRO, m_creature); + + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == WAYPOINT_MOTION_TYPE) + { + m_creature->GetMotionMaster()->MovementExpired(); + m_creature->GetMotionMaster()->MoveIdle(); + } + + m_creature->GetMotionMaster()->MovePoint(POINT_ID_CENTER, afCenterPos[0], afCenterPos[1], afCenterPos[2]); + } + + void DoMoveToHold() + { + float fX, fY, fZ; + m_creature->GetCombatStartPosition(fX, fY, fZ); + + m_creature->GetMotionMaster()->MovePoint(POINT_ID_WAITING, fX, fY, fZ); + } + + void DoSplit() + { + m_creature->UpdateEntry(NPC_NAZAN); + + m_creature->SummonCreature(NPC_VAZRUDEN, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0); + + m_uiMovementTimer = 3000; + } + + void JustSummoned(Creature* pSummoned) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_VAZRUDEN, IN_PROGRESS); + } + + void JustDied(Unit* pKiller) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_NAZAN, DONE); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->getVictim() && m_uiMovementTimer) + { + if (m_uiMovementTimer <= uiDiff) + { + if (m_pInstance) + { + if (m_pInstance->GetData(TYPE_VAZRUDEN) == IN_PROGRESS) + DoMoveToHold(); + else + DoMoveToCenter(); + } + m_uiMovementTimer = 0; + } else m_uiMovementTimer -= uiDiff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_vazruden_herald(Creature* pCreature) +{ + return new boss_vazruden_heraldAI(pCreature); +} + +void AddSC_boss_nazan_and_vazruden() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_vazruden"; + newscript->GetAI = &GetAI_boss_vazruden; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_vazruden_herald"; + newscript->GetAI = &GetAI_boss_vazruden_herald; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp new file mode 100644 index 000000000..2a79e5d4b --- /dev/null +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp @@ -0,0 +1,214 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Omar_The_Unscarred +SD%Complete: 90 +SDComment: Temporary solution for orbital/shadow whip-ability. Needs more core support before making it more proper. +SDCategory: Hellfire Citadel, Hellfire Ramparts +EndScriptData */ + +#include "precompiled.h" + +#define SAY_AGGRO_1 -1543009 +#define SAY_AGGRO_2 -1543010 +#define SAY_AGGRO_3 -1543011 +#define SAY_SUMMON -1543012 +#define SAY_CURSE -1543013 +#define SAY_KILL_1 -1543014 +#define SAY_DIE -1543015 +#define SAY_WIPE -1543016 + +#define SPELL_ORBITAL_STRIKE 30637 +#define SPELL_SHADOW_WHIP 30638 +#define SPELL_TREACHEROUS_AURA 30695 +#define H_SPELL_BANE_OF_TREACHERY 37566 +#define SPELL_DEMONIC_SHIELD 31901 +#define SPELL_SHADOW_BOLT 30686 +#define H_SPELL_SHADOW_BOLT 39297 +#define SPELL_SUMMON_FIENDISH_HOUND 30707 + +struct MANGOS_DLL_DECL boss_omor_the_unscarredAI : public ScriptedAI +{ + boss_omor_the_unscarredAI(Creature* pCreature) : ScriptedAI(pCreature) + { + SetCombatMovement(false); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + bool m_bIsHeroicMode; + + uint32 OrbitalStrike_Timer; + uint32 ShadowWhip_Timer; + uint32 Aura_Timer; + uint32 DemonicShield_Timer; + uint32 Shadowbolt_Timer; + uint32 Summon_Timer; + uint32 SummonedCount; + uint64 playerGUID; + bool CanPullBack; + + void Reset() + { + DoScriptText(SAY_WIPE, m_creature); + + OrbitalStrike_Timer = 25000; + ShadowWhip_Timer = 2000; + Aura_Timer = 10000; + DemonicShield_Timer = 1000; + Shadowbolt_Timer = 2000; + Summon_Timer = 10000; + SummonedCount = 0; + playerGUID = 0; + CanPullBack = false; + } + + void Aggro(Unit *who) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_AGGRO_1, m_creature); break; + case 1: DoScriptText(SAY_AGGRO_2, m_creature); break; + case 2: DoScriptText(SAY_AGGRO_3, m_creature); break; + } + } + + void KilledUnit(Unit* victim) + { + if (urand(0, 1)) + return; + + DoScriptText(SAY_KILL_1, m_creature); + } + + void JustSummoned(Creature* summoned) + { + DoScriptText(SAY_SUMMON, m_creature); + + if (Unit* random = SelectUnit(SELECT_TARGET_RANDOM,0)) + summoned->AI()->AttackStart(random); + + ++SummonedCount; + } + + void JustDied(Unit* Killer) + { + DoScriptText(SAY_DIE, m_creature); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //only two may be wrong, perhaps increase timer and spawn periodically instead. + if (SummonedCount < 2) + { + if (Summon_Timer < diff) + { + m_creature->InterruptNonMeleeSpells(false); + DoCast(m_creature,SPELL_SUMMON_FIENDISH_HOUND); + Summon_Timer = urand(15000, 30000); + }else Summon_Timer -= diff; + } + + if (CanPullBack) + { + if (ShadowWhip_Timer < diff) + { + if (Player* pPlayer = (Player*)Unit::GetUnit(*m_creature,playerGUID)) + { + //if unit dosen't have this flag, then no pulling back (script will attempt cast, even if orbital strike was resisted) + if (pPlayer->HasMovementFlag(MOVEMENTFLAG_FALLING)) + { + m_creature->InterruptNonMeleeSpells(false); + DoCast(pPlayer,SPELL_SHADOW_WHIP); + } + } + playerGUID = 0; + ShadowWhip_Timer = 2000; + CanPullBack = false; + }else ShadowWhip_Timer -= diff; + } + else if (OrbitalStrike_Timer < diff) + { + Unit* temp = NULL; + if (m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE)) + temp = m_creature->getVictim(); + else temp = SelectUnit(SELECT_TARGET_RANDOM,0); + + if (temp && temp->GetTypeId() == TYPEID_PLAYER) + { + DoCast(temp,SPELL_ORBITAL_STRIKE); + OrbitalStrike_Timer = urand(14000, 16000); + playerGUID = temp->GetGUID(); + + if (playerGUID) + CanPullBack = true; + } + }else OrbitalStrike_Timer -= diff; + + if ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() < 20) + { + if (DemonicShield_Timer < diff) + { + DoCast(m_creature,SPELL_DEMONIC_SHIELD); + DemonicShield_Timer = 15000; + }else DemonicShield_Timer -= diff; + } + + if (Aura_Timer < diff) + { + DoScriptText(SAY_CURSE, m_creature); + + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + { + DoCast(target, m_bIsHeroicMode ? H_SPELL_BANE_OF_TREACHERY : SPELL_TREACHEROUS_AURA); + Aura_Timer = urand(8000, 16000); + } + }else Aura_Timer -= diff; + + if (Shadowbolt_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + { + if (target) + target = m_creature->getVictim(); + + DoCast(target, m_bIsHeroicMode ? H_SPELL_SHADOW_BOLT : SPELL_SHADOW_BOLT); + Shadowbolt_Timer = urand(4000, 6500); + } + }else Shadowbolt_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_omor_the_unscarredAI(Creature* pCreature) +{ + return new boss_omor_the_unscarredAI(pCreature); +} + +void AddSC_boss_omor_the_unscarred() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_omor_the_unscarred"; + newscript->GetAI = &GetAI_boss_omor_the_unscarredAI; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp new file mode 100644 index 000000000..a31291df3 --- /dev/null +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp @@ -0,0 +1,164 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Watchkeeper_Gargolmar +SD%Complete: 80 +SDComment: Missing adds to heal him. Surge should be used on target furthest away, not random. +SDCategory: Hellfire Citadel, Hellfire Ramparts +EndScriptData */ + +#include "precompiled.h" + +#define SAY_TAUNT -1543000 +#define SAY_HEAL -1543001 +#define SAY_SURGE -1543002 +#define SAY_AGGRO_1 -1543003 +#define SAY_AGGRO_2 -1543004 +#define SAY_AGGRO_3 -1543005 +#define SAY_KILL_1 -1543006 +#define SAY_KILL_2 -1543007 +#define SAY_DIE -1543008 + +#define SPELL_MORTAL_WOUND 30641 +#define H_SPELL_MORTAL_WOUND 36814 +#define SPELL_SURGE 34645 +#define SPELL_RETALIATION 22857 + +struct MANGOS_DLL_DECL boss_watchkeeper_gargolmarAI : public ScriptedAI +{ + boss_watchkeeper_gargolmarAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + bool m_bIsHeroicMode; + + uint32 Surge_Timer; + uint32 MortalWound_Timer; + uint32 Retaliation_Timer; + + bool HasTaunted; + bool YelledForHeal; + + void Reset() + { + Surge_Timer = 5000; + MortalWound_Timer = 4000; + Retaliation_Timer = 0; + + HasTaunted = false; + YelledForHeal = false; + } + + void Aggro(Unit *who) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_AGGRO_1, m_creature); break; + case 1: DoScriptText(SAY_AGGRO_2, m_creature); break; + case 2: DoScriptText(SAY_AGGRO_3, m_creature); break; + } + } + + void MoveInLineOfSight(Unit* who) + { + if (!m_creature->getVictim() && who->isTargetableForAttack() && (m_creature->IsHostileTo(who)) && who->isInAccessablePlaceFor(m_creature)) + { + if (!m_creature->canFly() && m_creature->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE) + return; + + float attackRadius = m_creature->GetAttackDistance(who); + if (m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->IsWithinLOSInMap(who)) + { + who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); + AttackStart(who); + } + else if (!HasTaunted && m_creature->IsWithinDistInMap(who, 60.0f)) + { + DoScriptText(SAY_TAUNT, m_creature); + HasTaunted = true; + } + } + } + + void KilledUnit(Unit* victim) + { + DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); + } + + void JustDied(Unit* Killer) + { + DoScriptText(SAY_DIE, m_creature); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (MortalWound_Timer < diff) + { + DoCast(m_creature->getVictim(), m_bIsHeroicMode ? H_SPELL_MORTAL_WOUND : SPELL_MORTAL_WOUND); + MortalWound_Timer = urand(5000, 13000); + }else MortalWound_Timer -= diff; + + if (Surge_Timer < diff) + { + DoScriptText(SAY_SURGE, m_creature); + + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_SURGE); + + Surge_Timer = urand(5000, 12000); + }else Surge_Timer -= diff; + + if ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() < 20) + { + if (Retaliation_Timer < diff) + { + DoCast(m_creature,SPELL_RETALIATION); + Retaliation_Timer = 30000; + }else Retaliation_Timer -= diff; + } + + if (!YelledForHeal) + { + if ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() < 40) + { + DoScriptText(SAY_HEAL, m_creature); + YelledForHeal = true; + } + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_watchkeeper_gargolmarAI(Creature* pCreature) +{ + return new boss_watchkeeper_gargolmarAI(pCreature); +} + +void AddSC_boss_watchkeeper_gargolmar() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_watchkeeper_gargolmar"; + newscript->GetAI = &GetAI_boss_watchkeeper_gargolmarAI; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h b/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h new file mode 100644 index 000000000..2b687e465 --- /dev/null +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h @@ -0,0 +1,17 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_RAMPARTS_H +#define DEF_RAMPARTS_H + +enum +{ + MAX_ENCOUNTER = 2, + + TYPE_VAZRUDEN = 1, + TYPE_NAZAN = 2, + DATA_HERALD = 3 +}; + +#endif diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp new file mode 100644 index 000000000..8a7978a75 --- /dev/null +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp @@ -0,0 +1,124 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance_Hellfire_Ramparts +SD%Complete: 50 +SDComment: +SDCategory: Hellfire Ramparts +EndScriptData */ + +#include "precompiled.h" +#include "hellfire_ramparts.h" + +struct MANGOS_DLL_DECL instance_ramparts : public ScriptedInstance +{ + instance_ramparts(Map* pMap) : ScriptedInstance(pMap) {Initialize();} + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + uint32 m_uiSentryCounter; + uint64 m_uiChestNGUID; + uint64 m_uiChestHGUID; + uint64 m_uiHeraldGUID; + + void Initialize() + { + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + + m_uiSentryCounter = 0; + m_uiChestNGUID = 0; + m_uiChestHGUID = 0; + m_uiHeraldGUID = 0; + } + + void OnCreatureCreate(Creature* pCreature) + { + if (pCreature->GetEntry() == 17307) + m_uiHeraldGUID = pCreature->GetGUID(); + } + + void OnObjectCreate(GameObject* pGo) + { + switch(pGo->GetEntry()) + { + case 185168: m_uiChestNGUID = pGo->GetGUID(); break; + case 185169: m_uiChestHGUID = pGo->GetGUID(); break; + } + } + + void SetData(uint32 uiType, uint32 uiData) + { + debug_log("SD2: Instance Ramparts: SetData received for type %u with data %u",uiType,uiData); + + switch(uiType) + { + case TYPE_VAZRUDEN: + if (uiData == DONE && m_auiEncounter[1] == DONE) + DoRespawnGameObject(instance->IsHeroic() ? m_uiChestHGUID : m_uiChestNGUID, HOUR*IN_MILISECONDS); + m_auiEncounter[0] = uiData; + break; + case TYPE_NAZAN: + if (uiData == SPECIAL) + { + ++m_uiSentryCounter; + + if (m_uiSentryCounter == 2) + m_auiEncounter[1] = uiData; + } + if (uiData == DONE && m_auiEncounter[0] == DONE) + { + DoRespawnGameObject(instance->IsHeroic() ? m_uiChestHGUID : m_uiChestNGUID, HOUR*IN_MILISECONDS); + m_auiEncounter[1] = uiData; + } + if (uiData == IN_PROGRESS) + m_auiEncounter[1] = uiData; + break; + } + } + + uint32 GetData(uint32 uiType) + { + if (uiType == TYPE_VAZRUDEN) + return m_auiEncounter[0]; + + if (uiType == TYPE_NAZAN) + return m_auiEncounter[1]; + + return 0; + } + + uint64 GetData64(uint32 uiData) + { + if (uiData == DATA_HERALD) + return m_uiHeraldGUID; + + return 0; + } +}; + +InstanceData* GetInstanceData_instance_ramparts(Map* pMap) +{ + return new instance_ramparts(pMap); +} + +void AddSC_instance_ramparts() +{ + Script* pNewScript; + pNewScript = new Script; + pNewScript->Name = "instance_ramparts"; + pNewScript->GetInstanceData = &GetInstanceData_instance_ramparts; + pNewScript->RegisterSelf(); +} diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp b/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp new file mode 100644 index 000000000..c2a3dbdea --- /dev/null +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp @@ -0,0 +1,698 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Magtheridon +SD%Complete: 80 +SDComment: Some spell issues with target selection. +SDCategory: Hellfire Citadel, Magtheridon's lair +EndScriptData */ + +#include "precompiled.h" +#include "magtheridons_lair.h" + +struct Yell +{ + int32 id; +}; + +static Yell RandomTaunt[]= +{ + {-1544000}, + {-1544001}, + {-1544002}, + {-1544003}, + {-1544004}, + {-1544005}, +}; + +enum +{ + SAY_FREED = -1544006, + SAY_AGGRO = -1544007, + SAY_BANISH = -1544008, + SAY_CHAMBER_DESTROY = -1544009, + SAY_PLAYER_KILLED = -1544010, + SAY_DEATH = -1544011, + + EMOTE_BERSERK = -1544012, + EMOTE_BLASTNOVA = -1544013, + EMOTE_BEGIN = -1544014, + EMOTE_FREED = -1544015, + + SPELL_BLASTNOVA = 30616, + SPELL_CLEAVE = 30619, + SPELL_QUAKE_TRIGGER = 30576, // must be cast with 30561 as the proc spell + SPELL_QUAKE_KNOCKBACK = 30571, + + SPELL_BLAZE_TRAP = 30542, + SPELL_DEBRIS_VISUAL = 30632, + SPELL_CAMERA_SHAKE = 36455, + SPELL_BERSERK = 27680, + + SPELL_SHADOW_CAGE_DUMMY = 30205, + SPELL_SHADOW_CAGE = 30168, + + SPELL_SHADOW_GRASP_DUMMY = 30207, + SPELL_SHADOW_GRASP = 30410, + SPELL_SHADOW_GRASP_VISUAL = 30166, + SPELL_MIND_EXHAUSTION = 44032, // Casted by the cubes when channeling ends + + SPELL_FIRE_BLAST = 37110, + + SPELL_SHADOW_BOLT_VOLLEY = 30510, + SPELL_DARK_MENDING = 30528, + SPELL_FEAR = 30530, // 39176 + SPELL_BURNING_ABYSSAL = 30511, + + NPC_MAGS_ROOM = 17516, + NPC_BURNING_ABYSS = 17454, + + // count of clickers needed to interrupt blast nova + MAX_CLICK = 5 +}; + +typedef std::map CubeMap; + +struct MANGOS_DLL_DECL mob_abyssalAI : public ScriptedAI +{ + mob_abyssalAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_uiTriggerId = 0; + m_uiDespawn_Timer = 60000; + Reset(); + } + + uint32 m_uiFireBlast_Timer; + uint32 m_uiDespawn_Timer; + uint32 m_uiTriggerId; + + void Reset() + { + m_uiFireBlast_Timer = 6000; + } + + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + { + if (m_uiTriggerId == 2 && pSpell->Id == SPELL_BLAZE_TARGET) + { + m_creature->CastSpell(m_creature, SPELL_BLAZE_TRAP, true); + m_creature->SetVisibility(VISIBILITY_OFF); + m_uiDespawn_Timer = 130000; + } + } + + void SetTrigger(uint32 uiTrigger) + { + m_uiTriggerId = uiTrigger; + m_creature->SetDisplayId(11686); + + if (m_uiTriggerId == 1) //debris + { + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->CastSpell(m_creature, SPELL_DEBRIS_VISUAL, true); + m_uiFireBlast_Timer = 5000; + m_uiDespawn_Timer = 10000; + } + } + + void Aggro(Unit* pWho) + { + m_creature->SetInCombatWithZone(); + } + + void AttackStart(Unit* pWho) + { + if (m_uiTriggerId) + return; + + ScriptedAI::AttackStart(pWho); + } + + void MoveInLineOfSight(Unit* pWho) + { + if (m_uiTriggerId) + return; + + ScriptedAI::MoveInLineOfSight(pWho); + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_uiTriggerId) + { + if (m_uiTriggerId == 1) + { + if (m_uiFireBlast_Timer < uiDiff) + { + m_creature->CastSpell(m_creature, SPELL_DEBRIS_DAMAGE, true); + m_uiTriggerId = 3; + } + else + m_uiFireBlast_Timer -= uiDiff; + } + } + + if (m_uiDespawn_Timer < uiDiff) + { + m_creature->ForcedDespawn(); + return; + } + else + m_uiDespawn_Timer -= uiDiff; + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiFireBlast_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_FIRE_BLAST); + m_uiFireBlast_Timer = urand(5000, 15000); + } + else + m_uiFireBlast_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +struct MANGOS_DLL_DECL boss_magtheridonAI : public ScriptedAI +{ + boss_magtheridonAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + CubeMap Cube; + + ScriptedInstance* m_pInstance; + + uint32 m_uiRandChat_Timer; + + uint32 m_uiBerserk_Timer; + uint32 m_uiQuake_Timer; + uint32 m_uiCleave_Timer; + uint32 m_uiBlastNova_Timer; + uint32 m_uiBlaze_Timer; + uint32 m_uiPhase3_Timer; + uint32 m_uiPhase3_Count; + + bool m_bIsIntroDone; + bool m_bIsPhase3; + bool m_bNeedCheckCube; + + void Reset() + { + m_uiRandChat_Timer = 90000; + + m_uiBerserk_Timer = 1320000; + m_uiQuake_Timer = 40000; + m_uiPhase3_Timer = 5000; + m_uiPhase3_Count = 0; + m_uiBlaze_Timer = urand(10000, 30000); + m_uiBlastNova_Timer = 60000; + m_uiCleave_Timer = 15000; + + m_bIsIntroDone = false; + m_bIsPhase3 = false; + m_bNeedCheckCube = false; + + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } + + void JustReachedHome() + { + if (m_pInstance) + { + m_pInstance->SetData(TYPE_MAGTHERIDON_EVENT, NOT_STARTED); + m_pInstance->SetData(TYPE_HALL_COLLAPSE, NOT_STARTED); + } + } + + void SetClicker(uint64 uiCubeGUID, uint64 uiClickerGUID) + { + // to avoid multiclicks from 1 cube + if (uint64 guid = Cube[uiCubeGUID]) + DebuffClicker(Unit::GetUnit(*m_creature, guid)); + + Cube[uiCubeGUID] = uiClickerGUID; + m_bNeedCheckCube = true; + } + + //function to interrupt channeling and debuff clicker with mind exhaused if second person clicks with same cube or after dispeling/ending shadow grasp DoT) + void DebuffClicker(Unit* pClicker) + { + if (!pClicker || !pClicker->isAlive()) + return; + + pClicker->RemoveAurasDueToSpell(SPELL_SHADOW_GRASP);// cannot interrupt triggered spells + pClicker->InterruptNonMeleeSpells(false); + pClicker->CastSpell(pClicker, SPELL_MIND_EXHAUSTION, true); + } + + void MoveInLineOfSight(Unit* pWho) + { + if (!m_bIsIntroDone) + return; + + ScriptedAI::MoveInLineOfSight(pWho); + } + + void NeedCheckCubeStatus() + { + uint32 ClickerNum = 0; + + // now checking if every clicker has debuff from manticron + // if not - apply mind exhaustion and delete from clicker's list + for(CubeMap::iterator i = Cube.begin(); i != Cube.end(); ++i) + { + Unit *clicker = Unit::GetUnit(*m_creature, (*i).second); + if (!clicker || !clicker->HasAura(SPELL_SHADOW_GRASP, 1)) + { + DebuffClicker(clicker); + (*i).second = 0; + } + else + ++ClickerNum; + } + + // if 5 clickers from other cubes apply shadow cage + if (ClickerNum >= MAX_CLICK && !m_creature->HasAura(SPELL_SHADOW_CAGE, 0) && m_creature->HasAura(SPELL_BLASTNOVA, 0)) + { + DoScriptText(SAY_BANISH, m_creature); + m_creature->CastSpell(m_creature, SPELL_SHADOW_CAGE, true); + } + else + { + if (ClickerNum < MAX_CLICK && m_creature->HasAura(SPELL_SHADOW_CAGE, 0)) + m_creature->RemoveAurasDueToSpell(SPELL_SHADOW_CAGE); + } + + if (!ClickerNum) + m_bNeedCheckCube = false; + } + + void IntroDone() + { + if (!m_pInstance) + return; + + if (m_pInstance->GetData(TYPE_MAGTHERIDON_EVENT) == NOT_STARTED) + return; + + if (m_pInstance->GetData(TYPE_MAGTHERIDON_EVENT) == DONE) + return; + + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveAurasDueToSpell(SPELL_SHADOW_CAGE_DUMMY); + m_creature->clearUnitState(UNIT_STAT_STUNNED); + + DoScriptText(EMOTE_FREED, m_creature); + DoScriptText(SAY_FREED, m_creature); + + m_bIsIntroDone = true; + } + + void Aggro(Unit* pWho) + { + m_creature->SetInCombatWithZone(); + DoScriptText(SAY_AGGRO, m_creature); + } + + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + { + if (pSpell->Id == SPELL_SHADOW_GRASP_DUMMY) + { + m_creature->CastSpell(m_creature, SPELL_SHADOW_CAGE_DUMMY, false); + m_creature->addUnitState(UNIT_STAT_STUNNED); + } + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(SAY_PLAYER_KILLED, m_creature); + } + + void JustDied(Unit* pKiller) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_MAGTHERIDON_EVENT, DONE); + + DoScriptText(SAY_DEATH, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + { + if (!m_bIsIntroDone) + { + IntroDone(); + return; + } + + if (m_uiRandChat_Timer < uiDiff) + { + DoScriptText(RandomTaunt[rand()%6].id, m_creature); + m_uiRandChat_Timer = 90000; + } + else + m_uiRandChat_Timer -= uiDiff; + + return; + } + + if (m_bNeedCheckCube) + NeedCheckCubeStatus(); + + if (m_uiBerserk_Timer < uiDiff) + { + DoScriptText(EMOTE_BERSERK, m_creature); + m_creature->CastSpell(m_creature, SPELL_BERSERK, true); + m_uiBerserk_Timer = 60000; + } + else + m_uiBerserk_Timer -= uiDiff; + + //Cleave_Timer + if (m_uiCleave_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_CLEAVE); + m_uiCleave_Timer = 10000; + } + else + m_uiCleave_Timer -= uiDiff; + + if (m_uiQuake_Timer < uiDiff) + { + // to avoid blastnova interruption + if (!m_creature->IsNonMeleeSpellCasted(false)) + { + int32 i = SPELL_QUAKE_KNOCKBACK; + m_creature->CastCustomSpell(m_creature, SPELL_QUAKE_TRIGGER, &i, 0, 0, false); + m_uiQuake_Timer = 50000; + } + } + else + m_uiQuake_Timer -= uiDiff; + + if (m_uiBlastNova_Timer < uiDiff) + { + // to avoid earthquake interruption + if (!m_creature->hasUnitState(UNIT_STAT_STUNNED)) + { + DoScriptText(EMOTE_BLASTNOVA, m_creature); + DoCast(m_creature, SPELL_BLASTNOVA); + m_uiBlastNova_Timer = 60000; + } + } + else + m_uiBlastNova_Timer -= uiDiff; + + if (m_uiBlaze_Timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + { + float x, y, z; + pTarget->GetPosition(x, y, z); + Creature *summon = m_creature->SummonCreature(NPC_BURNING_ABYSS, x, y, z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); + if (summon) + { + ((mob_abyssalAI*)summon->AI())->SetTrigger(2); + m_creature->CastSpell(summon, SPELL_BLAZE_TARGET, true); + summon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } + } + + m_uiBlaze_Timer = urand(20000, 40000); + } + else + m_uiBlaze_Timer -= uiDiff; + + if (!m_bIsPhase3 && m_creature->GetHealth()*10 < m_creature->GetMaxHealth()*3 + && !m_creature->IsNonMeleeSpellCasted(false) // blast nova + && !m_creature->hasUnitState(UNIT_STAT_STUNNED))// shadow cage and earthquake + { + m_bIsPhase3 = true; + DoScriptText(SAY_CHAMBER_DESTROY, m_creature); + } + + if (m_bIsPhase3) + { + if (m_uiPhase3_Timer < uiDiff) + { + switch(m_uiPhase3_Count) + { + case 0: + m_creature->CastSpell(m_creature, SPELL_CAMERA_SHAKE, true); + ++m_uiPhase3_Count; + m_uiPhase3_Timer = 2000; + break; + case 1: + if (m_pInstance) + m_pInstance->SetData(TYPE_HALL_COLLAPSE, IN_PROGRESS); + ++m_uiPhase3_Count; + m_uiPhase3_Timer = 8000; + break; + case 2: + m_creature->CastSpell(m_creature, SPELL_DEBRIS_KNOCKDOWN, true); + ++m_uiPhase3_Count; + m_uiPhase3_Timer = 15000; + break; + case 3: + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + { + float x, y, z; + pTarget->GetPosition(x, y, z); + Creature *summon = m_creature->SummonCreature(NPC_BURNING_ABYSS, x, y, z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); + if (summon) + ((mob_abyssalAI*)summon->AI())->SetTrigger(1); + m_uiPhase3_Timer = 15000; + } + break; + } + } + else + m_uiPhase3_Timer -= uiDiff; + } + + DoMeleeAttackIfReady(); + } +}; + +struct MANGOS_DLL_DECL mob_hellfire_channelerAI : public ScriptedAI +{ + mob_hellfire_channelerAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 m_uiShadowBoltVolley_Timer; + uint32 m_uiDarkMending_Timer; + uint32 m_uiFear_Timer; + uint32 m_uiInfernal_Timer; + + bool m_bIsInfernalSpawned; + + void Reset() + { + m_uiShadowBoltVolley_Timer = urand(8000, 10000); + m_uiDarkMending_Timer = 10000; + m_uiFear_Timer = urand(15000, 20000); + m_uiInfernal_Timer = urand(10000, 50000); + + m_bIsInfernalSpawned = false; + } + + void Aggro(Unit* pWho) + { + if (!m_pInstance) + return; + + m_creature->InterruptNonMeleeSpells(false); + + if (Creature* pMagtheridon = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_MAGTHERIDON))) + { + if (!pMagtheridon->isAlive()) + return; + + if (m_pInstance->GetData(TYPE_CHANNELER_EVENT) == NOT_STARTED) + DoScriptText(EMOTE_BEGIN, pMagtheridon); + } + + m_pInstance->SetData(TYPE_CHANNELER_EVENT, IN_PROGRESS); + + m_creature->SetInCombatWithZone(); + } + + void JustSummoned(Creature* pSummoned) + { + if (m_creature->getVictim()) + pSummoned->AI()->AttackStart(m_creature->getVictim()); + } + + void MoveInLineOfSight(Unit* pWho) + { + } + + void JustDied(Unit* pKiller) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_CHANNELER_EVENT, DONE); + + pKiller->CastSpell(pKiller, SPELL_SOUL_TRANSFER, false); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_CHANNELER_EVENT, NOT_STARTED); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + { + if (!m_creature->IsNonMeleeSpellCasted(false) && !m_creature->IsInEvadeMode()) + DoCast(m_creature, SPELL_SHADOW_GRASP_DUMMY); + + return; + } + + //Shadow bolt volley + if (m_uiShadowBoltVolley_Timer < uiDiff) + { + DoCast(m_creature, SPELL_SHADOW_BOLT_VOLLEY); + m_uiShadowBoltVolley_Timer = urand(10000, 20000); + } + else + m_uiShadowBoltVolley_Timer -= uiDiff; + + //Dark Mending + if (m_uiDarkMending_Timer < uiDiff) + { + if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 50) + { + //Cast on ourselves if we are lower then lowest hp friendly unit + /*if (pLowestHPTarget && LowestHP < m_creature->GetHealth()) + DoCast(pLowestHPTarget, SPELL_DARK_MENDING); + else*/ + DoCast(m_creature, SPELL_DARK_MENDING); + } + + m_uiDarkMending_Timer = urand(10000, 20000); + } + else + m_uiDarkMending_Timer -= uiDiff; + + //Fear + if (m_uiFear_Timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1)) + DoCast(pTarget, SPELL_FEAR); + + m_uiFear_Timer = urand(25000, 40000); + } + else + m_uiFear_Timer -= uiDiff; + + //Infernal spawning + if (!m_bIsInfernalSpawned && m_uiInfernal_Timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + m_creature->CastSpell(pTarget, SPELL_BURNING_ABYSSAL, true); + + m_bIsInfernalSpawned = true; + } + else + m_uiInfernal_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +//Manticron Cube +bool GOHello_go_manticron_cube(Player* pPlayer, GameObject* pGo) +{ + if (ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData()) + { + if (pInstance->GetData(TYPE_MAGTHERIDON_EVENT) != IN_PROGRESS) + return true; + + if (Creature* pMagtheridon = pInstance->instance->GetCreature(pInstance->GetData64(DATA_MAGTHERIDON))) + { + if (!pMagtheridon->isAlive()) + return true; + + // if exhausted or already channeling return + if (pPlayer->HasAura(SPELL_MIND_EXHAUSTION, 0) || pPlayer->HasAura(SPELL_SHADOW_GRASP, 1)) + return true; + + pPlayer->InterruptNonMeleeSpells(false); + pPlayer->CastSpell(pPlayer, SPELL_SHADOW_GRASP, true); + pPlayer->CastSpell(pPlayer, SPELL_SHADOW_GRASP_VISUAL, false); + + if (boss_magtheridonAI* pMagAI = dynamic_cast(pMagtheridon->AI())) + pMagAI->SetClicker(pGo->GetGUID(), pPlayer->GetGUID()); + } + } + + return false; +} + +CreatureAI* GetAI_boss_magtheridon(Creature* pCreature) +{ + return new boss_magtheridonAI(pCreature); +} + +CreatureAI* GetAI_mob_hellfire_channeler(Creature* pCreature) +{ + return new mob_hellfire_channelerAI(pCreature); +} + +CreatureAI* GetAI_mob_abyssalAI(Creature* pCreature) +{ + return new mob_abyssalAI(pCreature); +} + +void AddSC_boss_magtheridon() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_magtheridon"; + newscript->GetAI = &GetAI_boss_magtheridon; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_hellfire_channeler"; + newscript->GetAI = &GetAI_mob_hellfire_channeler; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "go_manticron_cube"; + newscript->pGOHello = &GOHello_go_manticron_cube; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_abyssal"; + newscript->GetAI = &GetAI_mob_abyssalAI; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp b/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp new file mode 100644 index 000000000..f0c56dd33 --- /dev/null +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp @@ -0,0 +1,288 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance_Magtheridons_Lair +SD%Complete: 100 +SDComment: +SDCategory: Hellfire Citadel, Magtheridon's lair +EndScriptData */ + +#include "precompiled.h" +#include "magtheridons_lair.h" + +struct MANGOS_DLL_DECL instance_magtheridons_lair : public ScriptedInstance +{ + instance_magtheridons_lair(Map* pMap) : ScriptedInstance(pMap) { Initialize(); } + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + + uint64 m_uiMagtheridonGUID; + std::set ChannelerGUID; + uint64 m_uiDoorGUID; + std::set ColumnGUID; + + uint32 m_uiCageTimer; + uint32 m_uiRespawnTimer; + + void Initialize() + { + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + + ChannelerGUID.clear(); + ColumnGUID.clear(); + + m_uiMagtheridonGUID = 0; + m_uiDoorGUID = 0; + + m_uiCageTimer = 0; + m_uiRespawnTimer = 0; + } + + bool IsEncounterInProgress() const + { + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + if (m_auiEncounter[i] == IN_PROGRESS) + return true; + + return false; + } + + void OnCreatureCreate(Creature* pCreature) + { + switch(pCreature->GetEntry()) + { + case NPC_MAGTHERION: m_uiMagtheridonGUID = pCreature->GetGUID(); break; + case NPC_CHANNELER: ChannelerGUID.insert(pCreature->GetGUID()); break; + } + } + + void OnObjectCreate(GameObject* pGo) + { + switch(pGo->GetEntry()) + { + case 181713: + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + break; + case 183847: //event door + m_uiDoorGUID = pGo->GetGUID(); + break; + case 184653: // hall + case 184634: // six columns + case 184635: + case 184636: + case 184637: + case 184638: + case 184639: + ColumnGUID.insert(pGo->GetGUID()); + break; + } + } + + void SetData(uint32 uiType, uint32 uiData) + { + switch(uiType) + { + case TYPE_MAGTHERIDON_EVENT: + m_auiEncounter[0] = uiData; + if (uiData == NOT_STARTED) + m_uiRespawnTimer = 10000; + if (uiData != IN_PROGRESS) + { + if (GameObject* pDoor = instance->GetGameObject(m_uiDoorGUID)) + pDoor->SetGoState(GO_STATE_ACTIVE); + } + break; + case TYPE_CHANNELER_EVENT: + switch(uiData) + { + case NOT_STARTED: // Reset all channelers once one is reset. + if (m_auiEncounter[1] != NOT_STARTED) + { + m_auiEncounter[1] = NOT_STARTED; + + if (ChannelerGUID.empty()) + { + debug_log("SD2: Instance Magtheridon: Channeler GUID list are empty."); + break; + } + + for(std::set::iterator i = ChannelerGUID.begin(); i != ChannelerGUID.end(); ++i) + { + if (Creature* pChanneler = instance->GetCreature(*i)) + { + if (pChanneler->isAlive()) + pChanneler->AI()->EnterEvadeMode(); + else + pChanneler->Respawn(); + } + } + + m_uiCageTimer = 0; + + if (GameObject* pDoor = instance->GetGameObject(m_uiDoorGUID)) + pDoor->SetGoState(GO_STATE_ACTIVE); + } + break; + case IN_PROGRESS: // Event start. + if (m_auiEncounter[1] != IN_PROGRESS) + { + m_auiEncounter[1] = IN_PROGRESS; + + // Let all five channelers aggro. + for(std::set::iterator i = ChannelerGUID.begin(); i != ChannelerGUID.end(); ++i) + { + Creature* pChanneler = instance->GetCreature(*i); + + if (pChanneler && pChanneler->isAlive()) + AttackNearestTarget(pChanneler); + } + + // Magtheridon breaks free after two minutes. + Creature* pMagtheridon = instance->GetCreature(m_uiMagtheridonGUID); + + if (pMagtheridon && pMagtheridon->isAlive()) + m_uiCageTimer = 120000; + + if (GameObject* pDoor = instance->GetGameObject(m_uiDoorGUID)) + pDoor->SetGoState(GO_STATE_READY); + } + break; + case DONE: // Add buff and check if all channelers are dead. + for(std::set::iterator i = ChannelerGUID.begin(); i != ChannelerGUID.end(); ++i) + { + Creature* pChanneler = instance->GetCreature(*i); + + if (pChanneler && pChanneler->isAlive()) + { + //Channeler->InterruptNonMeleeSpells(false); + //Channeler->CastSpell(Channeler, SPELL_SOUL_TRANSFER, false); + uiData = IN_PROGRESS; + break; + } + } + break; + } + m_auiEncounter[1] = uiData; + break; + case TYPE_HALL_COLLAPSE: + // IN_PROGRESS - collapse / NOT_STARTED - reset + for(std::set::iterator i = ColumnGUID.begin(); i != ColumnGUID.end(); ++i) + { + DoUseDoorOrButton(*i); + } + break; + } + } + + uint32 GetData(uint32 uiType) + { + if (uiType == TYPE_MAGTHERIDON_EVENT) + return m_auiEncounter[0]; + if (uiType == TYPE_CHANNELER_EVENT) + return m_auiEncounter[1]; + + return 0; + } + + uint64 GetData64(uint32 uiData) + { + if (uiData == DATA_MAGTHERIDON) + return m_uiMagtheridonGUID; + + return 0; + } + + void AttackNearestTarget(Creature* pCreature) + { + float minRange = VISIBLE_RANGE; + float range; + Player* target = NULL; + + Map::PlayerList const& players = instance->GetPlayers(); + for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) + { + if (Player* i_pl = itr->getSource()) + { + if (i_pl->isTargetableForAttack()) + { + range = i_pl->GetDistance(pCreature); + if (range < minRange) + { + minRange = range; + target = i_pl; + } + } + } + } + + if (!target) + { + debug_log("SD2: Instance Magtheridon: AttackNearestTarget failed. No player."); + return; + } + pCreature->AI()->AttackStart(target); + } + + void Update(uint32 uiDiff) + { + if (m_uiCageTimer) + { + if (m_uiCageTimer <= uiDiff) + { + SetData(TYPE_MAGTHERIDON_EVENT, IN_PROGRESS); + m_uiCageTimer = 0; + } + else + m_uiCageTimer -= uiDiff; + } + + if (m_uiRespawnTimer) + { + if (m_uiRespawnTimer <= uiDiff) + { + for(std::set::iterator i = ChannelerGUID.begin(); i != ChannelerGUID.end(); ++i) + { + if (Creature* pChanneler = instance->GetCreature(*i)) + { + if (pChanneler->isAlive()) + pChanneler->AI()->EnterEvadeMode(); + else + pChanneler->Respawn(); + } + } + + m_uiRespawnTimer = 0; + } + else + m_uiRespawnTimer -= uiDiff; + } + } +}; + +InstanceData* GetInstanceData_instance_magtheridons_lair(Map* pMap) +{ + return new instance_magtheridons_lair(pMap); +} + +void AddSC_instance_magtheridons_lair() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "instance_magtheridons_lair"; + newscript->GetInstanceData = &GetInstanceData_instance_magtheridons_lair; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h b/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h new file mode 100644 index 000000000..c5183d348 --- /dev/null +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h @@ -0,0 +1,28 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_MAGTHERIDONS_LAIR_H +#define DEF_MAGTHERIDONS_LAIR_H + +enum +{ + MAX_ENCOUNTER = 2, + + TYPE_MAGTHERIDON_EVENT = 1, + TYPE_CHANNELER_EVENT = 2, + DATA_MAGTHERIDON = 3, + TYPE_HALL_COLLAPSE = 4, + + DATA_CHANNELER = 5, + + NPC_MAGTHERION = 17257, + NPC_CHANNELER = 17256, + + SPELL_SOUL_TRANSFER = 30531, + SPELL_BLAZE_TARGET = 30541, + SPELL_DEBRIS_DAMAGE = 30631, + SPELL_DEBRIS_KNOCKDOWN = 36449 +}; + +#endif diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp new file mode 100644 index 000000000..e30463243 --- /dev/null +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp @@ -0,0 +1,421 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Grand_Warlock_Nethekurse +SD%Complete: 75 +SDComment: encounter not fully completed. missing part where boss kill minions. +SDCategory: Hellfire Citadel, Shattered Halls +EndScriptData */ + +/* ContentData +boss_grand_warlock_nethekurse +mob_fel_orc_convert +mob_lesser_shadow_fissure +EndContentData */ + +#include "precompiled.h" +#include "shattered_halls.h" + +struct Say +{ + int32 id; +}; + +static Say PeonAttacked[]= +{ + {-1540001}, + {-1540002}, + {-1540003}, + {-1540004}, +}; +static Say PeonDies[]= +{ + {-1540005}, + {-1540006}, + {-1540007}, + {-1540008}, +}; + +#define SAY_INTRO -1540000 +#define SAY_TAUNT_1 -1540009 +#define SAY_TAUNT_2 -1540010 +#define SAY_TAUNT_3 -1540011 +#define SAY_AGGRO_1 -1540012 +#define SAY_AGGRO_2 -1540013 +#define SAY_AGGRO_3 -1540014 +#define SAY_SLAY_1 -1540015 +#define SAY_SLAY_2 -1540016 +#define SAY_DIE -1540017 + +#define SPELL_DEATH_COIL 30500 +#define SPELL_DARK_SPIN 30502 // core bug spell attack caster :D +#define SPELL_SHADOW_FISSURE 30496 // Summon the ShadowFissure NPC + +#define SPELL_SHADOW_CLEAVE 30495 +#define H_SPELL_SHADOW_SLAM 35953 + +#define SPELL_HEMORRHAGE 30478 + +#define SPELL_CONSUMPTION 30497 +#define SPELL_TEMPORARY_VISUAL 39312 // this is wrong, a temporary solution. spell consumption already has the purple visual, but doesn't display as it should + +struct MANGOS_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI +{ + boss_grand_warlock_nethekurseAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + bool IntroOnce; + bool IsIntroEvent; + bool IsMainEvent; + bool SpinOnce; + //bool HasTaunted; + bool Phase; + + uint32 PeonEngagedCount; + uint32 PeonKilledCount; + + uint32 IntroEvent_Timer; + uint32 DeathCoil_Timer; + uint32 ShadowFissure_Timer; + uint32 Cleave_Timer; + + void Reset() + { + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + + IsIntroEvent = false; + IntroOnce = false; + IsMainEvent = false; + //HasTaunted = false; + SpinOnce = false; + Phase = false; + + PeonEngagedCount = 0; + PeonKilledCount = 0; + + IntroEvent_Timer = 90000; //how long before getting bored and kills his minions? + DeathCoil_Timer = 20000; + ShadowFissure_Timer = 8000; + Cleave_Timer = 5000; + } + + void DoYellForPeonAggro() + { + if (PeonEngagedCount >= 4) + return; + + DoScriptText(PeonAttacked[PeonEngagedCount].id, m_creature); + ++PeonEngagedCount; + } + + void DoYellForPeonDeath() + { + if (PeonKilledCount >= 4) + return; + + DoScriptText(PeonDies[PeonKilledCount].id, m_creature); + ++PeonKilledCount; + + if (PeonKilledCount == 4) + { + IsIntroEvent = false; + IsMainEvent = true; + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + } + } + + void DoTauntPeons() + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_TAUNT_1, m_creature); break; + case 1: DoScriptText(SAY_TAUNT_2, m_creature); break; + case 2: DoScriptText(SAY_TAUNT_3, m_creature); break; + } + + //TODO: kill the peons first + IsIntroEvent = false; + PeonEngagedCount = 4; + PeonKilledCount = 4; + IsMainEvent = true; + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + } + + void AttackStart(Unit* who) + { + if (IsIntroEvent || !IsMainEvent) + return; + + if (m_creature->Attack(who, true)) + { + m_creature->AddThreat(who, 0.0f); + m_creature->SetInCombatWith(who); + who->SetInCombatWith(m_creature); + + if (Phase) + DoStartNoMovement(who); + else + DoStartMovement(who); + } + } + + void MoveInLineOfSight(Unit *who) + { + if (!IntroOnce && m_creature->IsWithinDistInMap(who, 50.0f)) + { + if (who->GetTypeId() != TYPEID_PLAYER) + return; + + DoScriptText(SAY_INTRO, m_creature); + IntroOnce = true; + IsIntroEvent = true; + + if (m_pInstance) + m_pInstance->SetData(TYPE_NETHEKURSE,IN_PROGRESS); + } + + if (IsIntroEvent || !IsMainEvent) + return; + + ScriptedAI::MoveInLineOfSight(who); + } + + void Aggro(Unit *who) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_AGGRO_1, m_creature); break; + case 1: DoScriptText(SAY_AGGRO_2, m_creature); break; + case 2: DoScriptText(SAY_AGGRO_3, m_creature); break; + } + } + + void JustSummoned(Creature *summoned) + { + summoned->setFaction(16); + summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + //triggered spell of consumption does not properly show it's SpellVisual, wrong spellid? + summoned->CastSpell(summoned,SPELL_TEMPORARY_VISUAL,true); + summoned->CastSpell(summoned,SPELL_CONSUMPTION,false,0,0,m_creature->GetGUID()); + } + + void KilledUnit(Unit* victim) + { + DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); + } + + void JustDied(Unit* Killer) + { + DoScriptText(SAY_DIE, m_creature); + + if (!m_pInstance) + return; + + m_pInstance->SetData(TYPE_NETHEKURSE,DONE); + + if (m_pInstance->GetData64(DATA_NETHEKURSE_DOOR)) + { + if (GameObject* pDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_NETHEKURSE_DOOR))) + pDoor->SetGoState(GO_STATE_ACTIVE); + } + } + + void UpdateAI(const uint32 diff) + { + if (IsIntroEvent) + { + if (!m_pInstance) + return; + + if (m_pInstance->GetData(TYPE_NETHEKURSE) == IN_PROGRESS) + { + if (IntroEvent_Timer < diff) + { + DoTauntPeons(); + }else IntroEvent_Timer -= diff; + } + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (!IsMainEvent) + return; + + if (Phase) + { + if (!SpinOnce) + { + DoCast(m_creature->getVictim(),SPELL_DARK_SPIN); + SpinOnce = true; + } + + if (Cleave_Timer < diff) + { + DoCast(m_creature->getVictim(), m_bIsHeroicMode ? H_SPELL_SHADOW_SLAM : SPELL_SHADOW_CLEAVE); + Cleave_Timer = urand(6000, 8500); + }else Cleave_Timer -= diff; + } + else + { + if (ShadowFissure_Timer < diff) + { + if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_SHADOW_FISSURE); + ShadowFissure_Timer = urand(7500, 15000); + }else ShadowFissure_Timer -= diff; + + if (DeathCoil_Timer < diff) + { + if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_DEATH_COIL); + DeathCoil_Timer = urand(15000, 20000); + }else DeathCoil_Timer -= diff; + + if ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() <= 20) + Phase = true; + + DoMeleeAttackIfReady(); + } + } +}; + +struct MANGOS_DLL_DECL mob_fel_orc_convertAI : public ScriptedAI +{ + mob_fel_orc_convertAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + uint32 Hemorrhage_Timer; + + void Reset() + { + m_creature->SetNoCallAssistance(true); //we don't want any assistance (WE R HEROZ!) + Hemorrhage_Timer = 3000; + } + + void MoveInLineOfSight(Unit *who) + { + return; + } + + void Aggro(Unit* who) + { + if (m_pInstance) + { + if (m_pInstance->GetData64(DATA_NETHEKURSE)) + { + Creature *pKurse = (Creature*)Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_NETHEKURSE)); + if (pKurse && m_creature->IsWithinDist(pKurse, 45.0f)) + { + ((boss_grand_warlock_nethekurseAI*)pKurse->AI())->DoYellForPeonAggro(); + + if (m_pInstance->GetData(TYPE_NETHEKURSE) == IN_PROGRESS) + return; + else m_pInstance->SetData(TYPE_NETHEKURSE,IN_PROGRESS); + } + } + } + } + + void JustDied(Unit* Killer) + { + if (m_pInstance) + { + if (m_pInstance->GetData(TYPE_NETHEKURSE) != IN_PROGRESS) + return; + + if (m_pInstance->GetData64(DATA_NETHEKURSE)) + { + Creature *pKurse = (Creature*)Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_NETHEKURSE)); + if (pKurse) + ((boss_grand_warlock_nethekurseAI*)pKurse->AI())->DoYellForPeonDeath(); + } + } + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (Hemorrhage_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_HEMORRHAGE); + Hemorrhage_Timer = 15000; + }else Hemorrhage_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +//NOTE: this creature are also summoned by other spells, for different creatures +struct MANGOS_DLL_DECL mob_lesser_shadow_fissureAI : public ScriptedAI +{ + mob_lesser_shadow_fissureAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + void Reset() { } + void MoveInLineOfSight(Unit *who) { } + void AttackStart(Unit* who) { } +}; + +CreatureAI* GetAI_boss_grand_warlock_nethekurse(Creature* pCreature) +{ + return new boss_grand_warlock_nethekurseAI(pCreature); +} + +CreatureAI* GetAI_mob_fel_orc_convert(Creature* pCreature) +{ + return new mob_fel_orc_convertAI(pCreature); +} + +CreatureAI* GetAI_mob_lesser_shadow_fissure(Creature* pCreature) +{ + return new mob_lesser_shadow_fissureAI(pCreature); +} + +void AddSC_boss_grand_warlock_nethekurse() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_grand_warlock_nethekurse"; + newscript->GetAI = &GetAI_boss_grand_warlock_nethekurse; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_fel_orc_convert"; + newscript->GetAI = &GetAI_mob_fel_orc_convert; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_lesser_shadow_fissure"; + newscript->GetAI = &GetAI_mob_lesser_shadow_fissure; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp new file mode 100644 index 000000000..68e1ce708 --- /dev/null +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp @@ -0,0 +1,407 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Warbringer_Omrogg +SD%Complete: 85 +SDComment: Heroic enabled. Spell timing may need additional tweaks +SDCategory: Hellfire Citadel, Shattered Halls +EndScriptData */ + +/* ContentData +mob_omrogg_heads +boss_warbringer_omrogg +EndContentData */ + +#include "precompiled.h" +#include "shattered_halls.h" + +enum +{ + YELL_DIE_L = -1540039, + YELL_DIE_R = -1540040, + EMOTE_ENRAGE = -1540041, + + SPELL_BLAST_WAVE = 30600, + SPELL_FEAR = 30584, + SPELL_THUNDERCLAP = 30633, + + SPELL_BURNING_MAUL = 30598, + H_SPELL_BURNING_MAUL = 36056, + + NPC_LEFT_HEAD = 19523, + NPC_RIGHT_HEAD = 19524 +}; + +struct Yell +{ + int32 id; + uint32 creature; +}; + +static Yell GoCombat[]= +{ + {-1540018, NPC_LEFT_HEAD}, + {-1540019, NPC_LEFT_HEAD}, + {-1540020, NPC_LEFT_HEAD}, +}; +static Yell GoCombatDelay[]= +{ + {-1540021, NPC_RIGHT_HEAD}, + {-1540022, NPC_RIGHT_HEAD}, + {-1540023, NPC_RIGHT_HEAD}, +}; + +static Yell Threat[]= +{ + {-1540024, NPC_LEFT_HEAD}, + {-1540025, NPC_RIGHT_HEAD}, + {-1540026, NPC_LEFT_HEAD}, + {-1540027, NPC_LEFT_HEAD}, +}; +static Yell ThreatDelay1[]= +{ + {-1540028, NPC_RIGHT_HEAD}, + {-1540029, NPC_LEFT_HEAD}, + {-1540030, NPC_RIGHT_HEAD}, + {-1540031, NPC_RIGHT_HEAD}, +}; +static Yell ThreatDelay2[]= +{ + {-1540032, NPC_LEFT_HEAD}, + {-1540033, NPC_RIGHT_HEAD}, + {-1540034, NPC_LEFT_HEAD}, + {-1540035, NPC_LEFT_HEAD}, +}; + +static Yell Killing[]= +{ + {-1540036, NPC_LEFT_HEAD}, + {-1540037, NPC_RIGHT_HEAD}, +}; +static Yell KillingDelay[]= +{ + {-1540038, NPC_RIGHT_HEAD}, + {-1000000, NPC_LEFT_HEAD}, +}; + +struct MANGOS_DLL_DECL mob_omrogg_headsAI : public ScriptedAI +{ + mob_omrogg_headsAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + uint32 m_uiDeath_Timer; + bool m_bDeathYell; + + void Reset() + { + m_uiDeath_Timer = 4000; + m_bDeathYell = false; + } + + void DoDeathYell() + { + m_bDeathYell = true; + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_bDeathYell) + return; + + if (m_uiDeath_Timer < uiDiff) + { + DoScriptText(YELL_DIE_R, m_creature); + m_uiDeath_Timer = false; + m_creature->setDeathState(JUST_DIED); + }else m_uiDeath_Timer -= uiDiff; + } +}; + +struct MANGOS_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI +{ + boss_warbringer_omroggAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_uiLeftHeadGUID = 0; + m_uiRightHeadGUID = 0; + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + uint64 m_uiLeftHeadGUID; + uint64 m_uiRightHeadGUID; + + int m_iAggro; + int m_iThreat; + int m_iKilling; + + bool m_bAggroYell; + bool m_bThreatYell; + bool m_bThreatYell2; + bool m_bKillingYell; + + uint32 m_uiDelay_Timer; + uint32 m_uiBlastWave_Timer; + uint32 m_uiBlastCount; + uint32 m_uiFear_Timer; + uint32 m_uiBurningMaul_Timer; + uint32 m_uiThunderClap_Timer; + uint32 m_uiResetThreat_Timer; + + void Reset() + { + if (Unit* pLeftHead = Unit::GetUnit(*m_creature,m_uiLeftHeadGUID)) + { + pLeftHead->setDeathState(JUST_DIED); + m_uiLeftHeadGUID = 0; + } + + if (Unit* pRightHead = Unit::GetUnit(*m_creature,m_uiRightHeadGUID)) + { + pRightHead->setDeathState(JUST_DIED); + m_uiRightHeadGUID = 0; + } + + m_bAggroYell = false; + m_bThreatYell = false; + m_bThreatYell2 = false; + m_bKillingYell = false; + + m_uiDelay_Timer = 4000; + m_uiBlastWave_Timer = 0; + m_uiBlastCount = 0; + m_uiFear_Timer = 8000; + m_uiBurningMaul_Timer = 25000; + m_uiThunderClap_Timer = 15000; + m_uiResetThreat_Timer = 30000; + + if (m_pInstance) + m_pInstance->SetData(TYPE_OMROGG, NOT_STARTED); //End boss can use this later. O'mrogg must be defeated(DONE) or he will come to aid. + } + + void DoYellForThreat() + { + Unit* pLeftHead = Unit::GetUnit(*m_creature,m_uiLeftHeadGUID); + Unit* pRightHead = Unit::GetUnit(*m_creature,m_uiRightHeadGUID); + + if (!pLeftHead || !pRightHead) + return; + + m_iThreat = irand(0, 3); + + Unit* pSource = (pLeftHead->GetEntry() == Threat[m_iThreat].creature ? pLeftHead : pRightHead); + + DoScriptText(Threat[m_iThreat].id, pSource); + + m_uiDelay_Timer = 3500; + m_bThreatYell = true; + } + + void Aggro(Unit* pWho) + { + m_creature->SummonCreature(NPC_LEFT_HEAD, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0); + m_creature->SummonCreature(NPC_RIGHT_HEAD, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0); + + if (Unit* pLeftHead = Unit::GetUnit(*m_creature,m_uiLeftHeadGUID)) + { + m_iAggro = irand(0, 2); + + DoScriptText(GoCombat[m_iAggro].id, pLeftHead); + + m_uiDelay_Timer = 3500; + m_bAggroYell = true; + } + + if (m_pInstance) + m_pInstance->SetData(TYPE_OMROGG, IN_PROGRESS); + } + + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_LEFT_HEAD) + m_uiLeftHeadGUID = pSummoned->GetGUID(); + + if (pSummoned->GetEntry() == NPC_RIGHT_HEAD) + m_uiRightHeadGUID = pSummoned->GetGUID(); + + //summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + //summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + pSummoned->SetVisibility(VISIBILITY_OFF); + } + + void KilledUnit(Unit* pVictim) + { + Unit* pLeftHead = Unit::GetUnit(*m_creature,m_uiLeftHeadGUID); + Unit* pRightHead = Unit::GetUnit(*m_creature,m_uiRightHeadGUID); + + if (!pLeftHead || !pRightHead) + return; + + m_iKilling = irand(0, 1); + + Unit* pSource = (pLeftHead->GetEntry() == Killing[m_iKilling].creature ? pLeftHead : pRightHead); + + switch(m_iKilling) + { + case 0: + DoScriptText(Killing[m_iKilling].id, pSource); + m_uiDelay_Timer = 3500; + m_bKillingYell = true; + break; + case 1: + DoScriptText(Killing[m_iKilling].id, pSource); + m_bKillingYell = false; + break; + } + } + + void JustDied(Unit* pKiller) + { + Unit* pLeftHead = Unit::GetUnit(*m_creature,m_uiLeftHeadGUID); + Unit* pRightHead = Unit::GetUnit(*m_creature,m_uiRightHeadGUID); + + if (!pLeftHead || !pRightHead) + return; + + DoScriptText(YELL_DIE_L, pLeftHead); + pLeftHead->setDeathState(JUST_DIED); + + ((mob_omrogg_headsAI*)((Creature*)pRightHead)->AI())->DoDeathYell(); + + if (m_pInstance) + m_pInstance->SetData(TYPE_OMROGG, DONE); + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_uiDelay_Timer < uiDiff) + { + m_uiDelay_Timer = 3500; + + Unit* pLeftHead = Unit::GetUnit(*m_creature,m_uiLeftHeadGUID); + Unit* pRightHead = Unit::GetUnit(*m_creature,m_uiRightHeadGUID); + + if (!pLeftHead || !pRightHead) + return; + + if (m_bAggroYell) + { + DoScriptText(GoCombatDelay[m_iAggro].id, pRightHead); + m_bAggroYell = false; + } + + if (m_bThreatYell2) + { + Unit* pSource = (pLeftHead->GetEntry() == ThreatDelay2[m_iThreat].creature ? pLeftHead : pRightHead); + + DoScriptText(ThreatDelay2[m_iThreat].id, pSource); + m_bThreatYell2 = false; + } + + if (m_bThreatYell) + { + Unit* pSource = (pLeftHead->GetEntry() == ThreatDelay1[m_iThreat].creature ? pLeftHead : pRightHead); + + DoScriptText(ThreatDelay1[m_iThreat].id, pSource); + m_bThreatYell = false; + m_bThreatYell2 = true; + } + + if (m_bKillingYell) + { + Unit* pSource = (pLeftHead->GetEntry() == KillingDelay[m_iKilling].creature ? pLeftHead : pRightHead); + + DoScriptText(KillingDelay[m_iKilling].id, pSource); + m_bKillingYell = false; + } + }else m_uiDelay_Timer -= uiDiff; + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiBlastCount && m_uiBlastWave_Timer <= uiDiff) + { + DoCast(m_creature,SPELL_BLAST_WAVE); + m_uiBlastWave_Timer = 5000; + ++m_uiBlastCount; + + if (m_uiBlastCount == 3) + m_uiBlastCount = 0; + }else m_uiBlastWave_Timer -= uiDiff; + + if (m_uiBurningMaul_Timer < uiDiff) + { + DoScriptText(EMOTE_ENRAGE, m_creature); + DoCast(m_creature, m_bIsHeroicMode ? H_SPELL_BURNING_MAUL : SPELL_BURNING_MAUL); + m_uiBurningMaul_Timer = 40000; + m_uiBlastWave_Timer = 16000; + m_uiBlastCount = 1; + }else m_uiBurningMaul_Timer -= uiDiff; + + if (m_uiResetThreat_Timer < uiDiff) + { + if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) + { + DoYellForThreat(); + DoResetThreat(); + m_creature->AddThreat(target, 0.0f); + } + m_uiResetThreat_Timer = urand(25000, 40000); + }else m_uiResetThreat_Timer -= uiDiff; + + if (m_uiFear_Timer < uiDiff) + { + DoCast(m_creature,SPELL_FEAR); + m_uiFear_Timer = urand(15000, 35000); + }else m_uiFear_Timer -= uiDiff; + + if (m_uiThunderClap_Timer < uiDiff) + { + DoCast(m_creature,SPELL_THUNDERCLAP); + m_uiThunderClap_Timer = urand(15000, 30000); + }else m_uiThunderClap_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_warbringer_omrogg(Creature* pCreature) +{ + return new boss_warbringer_omroggAI(pCreature); +} + +CreatureAI* GetAI_mob_omrogg_heads(Creature* pCreature) +{ + return new mob_omrogg_headsAI(pCreature); +} + +void AddSC_boss_warbringer_omrogg() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_warbringer_omrogg"; + newscript->GetAI = &GetAI_boss_warbringer_omrogg; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_omrogg_heads"; + newscript->GetAI = &GetAI_mob_omrogg_heads; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp new file mode 100644 index 000000000..dbec2f7e4 --- /dev/null +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp @@ -0,0 +1,292 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Warchief_Kargath_Bladefist +SD%Complete: 90 +SDComment: +SDCategory: Hellfire Citadel, Shattered Halls +EndScriptData */ + +/* ContentData +boss_warchief_kargath_bladefist +EndContentData */ + +#include "precompiled.h" + +#define SAY_AGGRO1 -1540042 +#define SAY_AGGRO2 -1540043 +#define SAY_AGGRO3 -1540044 +#define SAY_SLAY1 -1540045 +#define SAY_SLAY2 -1540046 +#define SAY_DEATH -1540047 + +#define SPELL_BLADE_DANCE 30739 +#define H_SPELL_CHARGE 25821 + +#define TARGET_NUM 5 + +#define MOB_SHATTERED_ASSASSIN 17695 +#define MOB_HEARTHEN_GUARD 17621 +#define MOB_SHARPSHOOTER_GUARD 17622 +#define MOB_REAVER_GUARD 17623 + +float AssassEntrance[3] = {275.136,-84.29,2.3}; // y -8 +float AssassExit[3] = {184.233,-84.29,2.3}; // y -8 +float AddsEntrance[3] = {306.036,-84.29,1.93}; + +struct MANGOS_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI +{ + boss_warchief_kargath_bladefistAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + std::vector adds; + std::vector assassins; + + uint32 Charge_timer; + uint32 Blade_Dance_Timer; + uint32 Summon_Assistant_Timer; + uint32 resetcheck_timer; + uint32 Wait_Timer; + + uint32 Assassins_Timer; + + uint32 summoned; + bool InBlade; + + uint32 target_num; + + void Reset() + { + removeAdds(); + + m_creature->SetSpeed(MOVE_RUN,2); + + summoned = 2; + InBlade = false; + Wait_Timer = 0; + + Charge_timer = 0; + Blade_Dance_Timer = 45000; + Summon_Assistant_Timer = 30000; + Assassins_Timer = 5000; + resetcheck_timer = 5000; + } + + void Aggro(Unit *who) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_AGGRO1, m_creature); break; + case 1: DoScriptText(SAY_AGGRO2, m_creature); break; + case 2: DoScriptText(SAY_AGGRO3, m_creature); break; + } + } + + void JustSummoned(Creature *summoned) + { + switch(summoned->GetEntry()) + { + case MOB_HEARTHEN_GUARD: + case MOB_SHARPSHOOTER_GUARD: + case MOB_REAVER_GUARD: + summoned->AI()->AttackStart(SelectUnit(SELECT_TARGET_RANDOM,0)); + adds.push_back(summoned->GetGUID()); + break; + case MOB_SHATTERED_ASSASSIN: + assassins.push_back(summoned->GetGUID()); + break; + } + } + + void KilledUnit(Unit *victim) + { + if (victim->GetTypeId() == TYPEID_PLAYER) + DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); + } + + void JustDied(Unit* Killer) + { + DoScriptText(SAY_DEATH, m_creature); + removeAdds(); + } + + void MovementInform(uint32 type, uint32 id) + { + if (InBlade) + { + if (type != POINT_MOTION_TYPE) + return; + + if (id != 1) + return; + + if (target_num > 0) // to prevent loops + { + Wait_Timer = 1; + DoCast(m_creature,SPELL_BLADE_DANCE,true); + --target_num; + } + } + } + + void removeAdds() + { + if (!m_pInstance) + return; + + for(std::vector::iterator itr = adds.begin(); itr!= adds.end(); ++itr) + { + if (Creature* pTemp = m_pInstance->instance->GetCreature(*itr)) + pTemp->ForcedDespawn(); + } + + adds.clear(); + + for(std::vector::iterator itr = assassins.begin(); itr!= assassins.end(); ++itr) + { + if (Creature* pTemp = m_pInstance->instance->GetCreature(*itr)) + pTemp->ForcedDespawn(); + } + + assassins.clear(); + } + + void SpawnAssassin() + { + m_creature->SummonCreature(MOB_SHATTERED_ASSASSIN,AssassEntrance[0],AssassEntrance[1]+8, AssassEntrance[2], 0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,30000); + m_creature->SummonCreature(MOB_SHATTERED_ASSASSIN,AssassEntrance[0],AssassEntrance[1]-8, AssassEntrance[2], 0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,30000); + m_creature->SummonCreature(MOB_SHATTERED_ASSASSIN,AssassExit[0],AssassExit[1]+8, AssassExit[2], 0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,30000); + m_creature->SummonCreature(MOB_SHATTERED_ASSASSIN,AssassExit[0],AssassExit[1]-8, AssassExit[2], 0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,30000); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (Assassins_Timer) + if (Assassins_Timer <= diff) + { + SpawnAssassin(); + Assassins_Timer = 0; + }else Assassins_Timer -= diff; + + if (InBlade) + { + if (Wait_Timer) + if (Wait_Timer <= diff) + { + if (target_num <= 0) + { + // stop bladedance + InBlade = false; + m_creature->SetSpeed(MOVE_RUN,2); + (*m_creature).GetMotionMaster()->MoveChase(m_creature->getVictim()); + Wait_Timer = 0; + if (m_bIsHeroicMode) + Charge_timer = 5000; + } + else + { + //move in bladedance + float x,y,randx,randy; + randx = (rand()%40); + randy = (rand()%40); + x = 210+ randx ; + y = -60- randy ; + (*m_creature).GetMotionMaster()->MovePoint(1,x,y,m_creature->GetPositionZ()); + Wait_Timer = 0; + } + }else Wait_Timer -= diff; + } + else + { + if (Blade_Dance_Timer < diff) + { + target_num = TARGET_NUM; + Wait_Timer = 1; + InBlade = true; + Blade_Dance_Timer = 30000; + m_creature->SetSpeed(MOVE_RUN,4); + return; + }else Blade_Dance_Timer -= diff; + + if (Charge_timer) + if (Charge_timer <= diff) + { + DoCast(SelectUnit(SELECT_TARGET_RANDOM,0),H_SPELL_CHARGE); + Charge_timer = 0; + }else Charge_timer -= diff; + + if (Summon_Assistant_Timer < diff) + { + Unit* target = NULL; + + for(int i = 0; i < summoned; ++i) + { + switch(urand(0, 2)) + { + case 0: m_creature->SummonCreature(MOB_HEARTHEN_GUARD,AddsEntrance[0],AddsEntrance[1], AddsEntrance[2], 0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,30000); break; + case 1: m_creature->SummonCreature(MOB_SHARPSHOOTER_GUARD,AddsEntrance[0],AddsEntrance[1], AddsEntrance[2], 0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,30000); break; + case 2: m_creature->SummonCreature(MOB_REAVER_GUARD,AddsEntrance[0],AddsEntrance[1], AddsEntrance[2], 0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,30000); break; + } + } + + if (!urand(0, 4)) + ++summoned; + + Summon_Assistant_Timer = urand(25000, 35000); + } + else Summon_Assistant_Timer -= diff; + + DoMeleeAttackIfReady(); + } + + if (resetcheck_timer < diff) + { + uint32 tempx,tempy; + tempx = uint32(m_creature->GetPositionX()); + tempy = uint32(m_creature->GetPositionY()); + if (tempx > 255 || tempx < 205) + { + EnterEvadeMode(); + } + resetcheck_timer = 5000; + }else resetcheck_timer -= diff; + } +}; + +CreatureAI* GetAI_boss_warchief_kargath_bladefist(Creature* pCreature) +{ + return new boss_warchief_kargath_bladefistAI(pCreature); +} + +void AddSC_boss_warchief_kargath_bladefist() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_warchief_kargath_bladefist"; + newscript->GetAI = &GetAI_boss_warchief_kargath_bladefist; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp b/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp new file mode 100644 index 000000000..4c05fff83 --- /dev/null +++ b/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp @@ -0,0 +1,120 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance_Shattered_Halls +SD%Complete: 50 +SDComment: currently missing info about door. instance not complete +SDCategory: Hellfire Citadel, Shattered Halls +EndScriptData */ + +#include "precompiled.h" +#include "shattered_halls.h" + +enum +{ + MAX_ENCOUNTER = 2, + GO_DOOR_NETHEKURSE = 1, //entry unknown + NPC_NETHEKURSE = 16807 +}; + +struct MANGOS_DLL_DECL instance_shattered_halls : public ScriptedInstance +{ + instance_shattered_halls(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + uint64 m_uiNethekurseGUID; + uint64 m_uiNethekurseDoorGUID; + + void Initialize() + { + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + + m_uiNethekurseGUID = 0; + m_uiNethekurseDoorGUID = 0; + } + + bool IsEncounterInProgress() const + { + for(uint8 i = 0; i < MAX_ENCOUNTER; i++) + if (m_auiEncounter[i] == IN_PROGRESS) + return true; + return false; + } + + void OnObjectCreate(GameObject* pGo) + { + if (pGo->GetEntry() == GO_DOOR_NETHEKURSE) + m_uiNethekurseDoorGUID = pGo->GetGUID(); + } + + void OnCreatureCreate(Creature* pCreature) + { + if (pCreature->GetEntry() == NPC_NETHEKURSE) + m_uiNethekurseGUID = pCreature->GetGUID(); + } + + void SetData(uint32 uiType, uint32 uiData) + { + switch(uiType) + { + case TYPE_NETHEKURSE: + m_auiEncounter[0] = uiData; + break; + case TYPE_OMROGG: + m_auiEncounter[1] = uiData; + break; + } + } + + uint32 GetData(uint32 uiType) + { + switch(uiType) + { + case TYPE_NETHEKURSE: + return m_auiEncounter[0]; + case TYPE_OMROGG: + return m_auiEncounter[1]; + } + return 0; + } + + uint64 GetData64(uint32 uiData) + { + switch(uiData) + { + case DATA_NETHEKURSE: + return m_uiNethekurseGUID; + case DATA_NETHEKURSE_DOOR: + return m_uiNethekurseDoorGUID; + } + return 0; + } +}; + +InstanceData* GetInstanceData_instance_shattered_halls(Map* pMap) +{ + return new instance_shattered_halls(pMap); +} + +void AddSC_instance_shattered_halls() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "instance_shattered_halls"; + newscript->GetInstanceData = &GetInstanceData_instance_shattered_halls; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h b/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h new file mode 100644 index 000000000..7a9bb2345 --- /dev/null +++ b/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h @@ -0,0 +1,13 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_SHATTERED_H +#define DEF_SHATTERED_H + +#define TYPE_NETHEKURSE 1 +#define DATA_NETHEKURSE 2 +#define DATA_NETHEKURSE_DOOR 3 + +#define TYPE_OMROGG 4 +#endif diff --git a/scripts/outland/hellfire_peninsula.cpp b/scripts/outland/hellfire_peninsula.cpp new file mode 100644 index 000000000..19b09eef5 --- /dev/null +++ b/scripts/outland/hellfire_peninsula.cpp @@ -0,0 +1,816 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Hellfire_Peninsula +SD%Complete: 100 +SDComment: Quest support: 9375, 9410, 9418, 10129, 10146, 10162, 10163, 10340, 10346, 10347, 10382 (Special flight paths), 10838 +SDCategory: Hellfire Peninsula +EndScriptData */ + +/* ContentData +npc_aeranas +go_haaleshi_altar +npc_ancestral_wolf +npc_demoniac_scryer +npc_gryphoneer_windbellow +npc_naladu +npc_tracy_proudwell +npc_trollbane +npc_wing_commander_dabiree +npc_wing_commander_brack +npc_wounded_blood_elf +EndContentData */ + +#include "precompiled.h" +#include "escort_ai.h" + +/*###### +## npc_aeranas +######*/ + +#define SAY_SUMMON -1000138 +#define SAY_FREE -1000139 + +#define FACTION_HOSTILE 16 +#define FACTION_FRIENDLY 35 + +#define SPELL_ENVELOPING_WINDS 15535 +#define SPELL_SHOCK 12553 + +#define C_AERANAS 17085 + +struct MANGOS_DLL_DECL npc_aeranasAI : public ScriptedAI +{ + npc_aeranasAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + uint32 Faction_Timer; + uint32 EnvelopingWinds_Timer; + uint32 Shock_Timer; + + void Reset() + { + Faction_Timer = 8000; + EnvelopingWinds_Timer = 9000; + Shock_Timer = 5000; + + m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + m_creature->setFaction(FACTION_FRIENDLY); + + DoScriptText(SAY_SUMMON, m_creature); + } + + void UpdateAI(const uint32 diff) + { + if (Faction_Timer) + { + if (Faction_Timer <= diff) + { + m_creature->setFaction(FACTION_HOSTILE); + Faction_Timer = 0; + }else Faction_Timer -= diff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() < 30) + { + m_creature->setFaction(FACTION_FRIENDLY); + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + DoScriptText(SAY_FREE, m_creature); + return; + } + + if (Shock_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_SHOCK); + Shock_Timer = 10000; + }else Shock_Timer -= diff; + + if (EnvelopingWinds_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_ENVELOPING_WINDS); + EnvelopingWinds_Timer = 25000; + }else EnvelopingWinds_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_aeranas(Creature* pCreature) +{ + return new npc_aeranasAI(pCreature); +} + +/*###### +## go_haaleshi_altar +######*/ + +bool GOHello_go_haaleshi_altar(Player* pPlayer, GameObject* pGo) +{ + pGo->SummonCreature(C_AERANAS,-1321.79, 4043.80, 116.24, 1.25, TEMPSUMMON_TIMED_DESPAWN, 180000); + return false; +} + +/*###### +## npc_ancestral_wolf +######*/ + +enum +{ + EMOTE_WOLF_LIFT_HEAD = -1000496, + EMOTE_WOLF_HOWL = -1000497, + SAY_WOLF_WELCOME = -1000498, + + SPELL_ANCESTRAL_WOLF_BUFF = 29981, + + NPC_RYGA = 17123 +}; + +struct MANGOS_DLL_DECL npc_ancestral_wolfAI : public npc_escortAI +{ + npc_ancestral_wolfAI(Creature* pCreature) : npc_escortAI(pCreature) + { + if (pCreature->GetOwner() && pCreature->GetOwner()->GetTypeId() == TYPEID_PLAYER) + Start(false, false, pCreature->GetOwner()->GetGUID()); + else + error_log("SD2: npc_ancestral_wolf can not obtain owner or owner is not a player."); + + pCreature->SetSpeed(MOVE_WALK, 1.5f); + Reset(); + } + + Unit* pRyga; + + void Reset() + { + pRyga = NULL; + m_creature->CastSpell(m_creature, SPELL_ANCESTRAL_WOLF_BUFF, true); + } + + void MoveInLineOfSight(Unit* pWho) + { + if (!pRyga && pWho->GetTypeId() == TYPEID_UNIT && pWho->GetEntry() == NPC_RYGA && m_creature->IsWithinDistInMap(pWho, 15.0f)) + pRyga = pWho; + + npc_escortAI::MoveInLineOfSight(pWho); + } + + void WaypointReached(uint32 uiPointId) + { + switch(uiPointId) + { + case 0: + DoScriptText(EMOTE_WOLF_LIFT_HEAD, m_creature); + break; + case 2: + DoScriptText(EMOTE_WOLF_HOWL, m_creature); + break; + case 50: + if (pRyga && pRyga->isAlive() && !pRyga->isInCombat()) + DoScriptText(SAY_WOLF_WELCOME, pRyga); + break; + } + } +}; + +CreatureAI* GetAI_npc_ancestral_wolf(Creature* pCreature) +{ + return new npc_ancestral_wolfAI(pCreature); +} + +/*###### +## npc_demoniac_scryer +######*/ + +#define GOSSIP_ITEM_ATTUNE "Yes, Scryer. You may possess me." + +enum +{ + GOSSIP_TEXTID_PROTECT = 10659, + GOSSIP_TEXTID_ATTUNED = 10643, + + QUEST_DEMONIAC = 10838, + NPC_HELLFIRE_WARDLING = 22259, + NPC_BUTTRESS = 22267, //the 4x nodes + NPC_SPAWNER = 22260, //just a dummy, not used + + MAX_BUTTRESS = 4, + TIME_TOTAL = MINUTE*10*IN_MILISECONDS, + + SPELL_SUMMONED_DEMON = 7741, //visual spawn-in for demon + SPELL_DEMONIAC_VISITATION = 38708, //create item + + SPELL_BUTTRESS_APPERANCE = 38719, //visual on 4x bunnies + the flying ones + SPELL_SUCKER_CHANNEL = 38721, //channel to the 4x nodes + SPELL_SUCKER_DESPAWN_MOB = 38691 +}; + +//script is basic support, details like end event are not implemented +struct MANGOS_DLL_DECL npc_demoniac_scryerAI : public ScriptedAI +{ + npc_demoniac_scryerAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_bIsComplete = false; + m_uiSpawnDemonTimer = 15000; + m_uiSpawnButtressTimer = 45000; + m_uiButtressCount = 0; + Reset(); + } + + bool m_bIsComplete; + + uint32 m_uiSpawnDemonTimer; + uint32 m_uiSpawnButtressTimer; + uint32 m_uiButtressCount; + + void Reset() {} + + //we don't want anything to happen when attacked + void AttackedBy(Unit* pEnemy) {} + void AttackStart(Unit* pEnemy) {} + + void DoSpawnButtress() + { + ++m_uiButtressCount; + + float fAngle; + + switch(m_uiButtressCount) + { + case 1: fAngle = 0.0f; break; + case 2: fAngle = M_PI+M_PI/2; break; + case 3: fAngle = M_PI/2; break; + case 4: fAngle = M_PI; break; + } + + float fX, fY; + m_creature->GetNearPoint2D(fX, fY, 5.0f, fAngle); + + float fZ_Ground = m_creature->GetMap()->GetHeight(fX, fY, MAX_HEIGHT); + + uint32 uiTime = TIME_TOTAL - (m_uiSpawnButtressTimer * m_uiButtressCount); + m_creature->SummonCreature(NPC_BUTTRESS, fX, fY, fZ_Ground, m_creature->GetAngle(fX, fY), TEMPSUMMON_TIMED_DESPAWN, uiTime); + } + + void DoSpawnDemon() + { + float fX, fY, fZ; + m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 20.0f, fX, fY, fZ); + + m_creature->SummonCreature(NPC_HELLFIRE_WARDLING, fX, fY, fZ, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + } + + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_HELLFIRE_WARDLING) + { + pSummoned->CastSpell(pSummoned, SPELL_SUMMONED_DEMON, false); + pSummoned->AI()->AttackStart(m_creature); + } + else + { + if (pSummoned->GetEntry() == NPC_BUTTRESS) + { + pSummoned->CastSpell(pSummoned, SPELL_BUTTRESS_APPERANCE, false); + pSummoned->CastSpell(m_creature, SPELL_SUCKER_CHANNEL, true); + } + } + } + + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) + { + if (pTarget->GetEntry() == NPC_HELLFIRE_WARDLING && pSpell->Id == SPELL_SUCKER_DESPAWN_MOB) + ((Creature*)pTarget)->ForcedDespawn(); + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_bIsComplete || !m_creature->isAlive()) + return; + + if (m_uiSpawnButtressTimer <= uiDiff) + { + if (m_uiButtressCount >= MAX_BUTTRESS) + { + m_creature->CastSpell(m_creature, SPELL_SUCKER_DESPAWN_MOB, false); + + if (m_creature->isInCombat()) + { + m_creature->DeleteThreatList(); + m_creature->CombatStop(); + } + + m_bIsComplete = true; + return; + } + + m_uiSpawnButtressTimer = 45000; + DoSpawnButtress(); + } + else + m_uiSpawnButtressTimer -= uiDiff; + + if (m_uiSpawnDemonTimer <= uiDiff) + { + DoSpawnDemon(); + m_uiSpawnDemonTimer = 15000; + } + else + m_uiSpawnDemonTimer -= uiDiff; + } +}; + +CreatureAI* GetAI_npc_demoniac_scryer(Creature* pCreature) +{ + return new npc_demoniac_scryerAI(pCreature); +} + +bool GossipHello_npc_demoniac_scryer(Player* pPlayer, Creature* pCreature) +{ + if (npc_demoniac_scryerAI* pScryerAI = dynamic_cast(pCreature->AI())) + { + if (pScryerAI->m_bIsComplete) + { + if (pPlayer->GetQuestStatus(QUEST_DEMONIAC) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ATTUNE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ATTUNED, pCreature->GetGUID()); + return true; + } + } + + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_PROTECT, pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_demoniac_scryer(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) + { + pPlayer->CLOSE_GOSSIP_MENU(); + pCreature->CastSpell(pPlayer, SPELL_DEMONIAC_VISITATION, false); + } + + return true; +} + +/*###### +## npc_gryphoneer_windbellow +######*/ + +enum +{ + QUEST_ABYSSAL_A = 10163, + QUEST_RETURN_ABYSSAL_A = 10346, + QUEST_TO_THE_FRONT = 10382, + SPELL_TAXI_AERIAL_ASSULT = 33899, + SPELL_TAXI_TO_BEACH_HEAD = 35065 +}; + +#define GOSSIP_ITEM1_WIN "Fly me to The Abyssal Shelf" +#define GOSSIP_ITEM2_WIN "Fly me to Honor Point" + +bool GossipHello_npc_gryphoneer_windbellow(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + //Mission: The Abyssal Shelf || Return to the Abyssal Shelf + if (pPlayer->GetQuestStatus(QUEST_ABYSSAL_A) == QUEST_STATUS_INCOMPLETE || + pPlayer->GetQuestStatus(QUEST_RETURN_ABYSSAL_A) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM1_WIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + //Go to the Front + if (pPlayer->GetQuestStatus(QUEST_TO_THE_FRONT) == QUEST_STATUS_COMPLETE || + pPlayer->GetQuestRewardStatus(QUEST_TO_THE_FRONT)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM2_WIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_gryphoneer_windbellow(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + pPlayer->CLOSE_GOSSIP_MENU(); + //TaxiPath 589 + pPlayer->CastSpell(pPlayer,SPELL_TAXI_AERIAL_ASSULT,true); + } + if (uiAction == GOSSIP_ACTION_INFO_DEF+2) + { + pPlayer->CLOSE_GOSSIP_MENU(); + //TaxiPath 607 + pPlayer->CastSpell(pPlayer,SPELL_TAXI_TO_BEACH_HEAD,true); + } + return true; +} + +/*###### +## npc_naladu +######*/ + +#define GOSSIP_NALADU_ITEM1 "Why don't you escape?" + +enum +{ + GOSSIP_TEXTID_NALADU1 = 9788 +}; + +bool GossipHello_npc_naladu(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_NALADU_ITEM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_naladu(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_NALADU1, pCreature->GetGUID()); + + return true; +} + +/*###### +## npc_tracy_proudwell +######*/ + +#define GOSSIP_TEXT_REDEEM_MARKS "I have marks to redeem!" +#define GOSSIP_TRACY_PROUDWELL_ITEM1 "I heard that your dog Fei Fei took Klatu's prayer beads..." +#define GOSSIP_TRACY_PROUDWELL_ITEM2 "" + +enum +{ + GOSSIP_TEXTID_TRACY_PROUDWELL1 = 10689, + QUEST_DIGGING_FOR_PRAYER_BEADS = 10916 +}; + +bool GossipHello_npc_tracy_proudwell(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pCreature->isVendor()) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_REDEEM_MARKS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); + + if (pPlayer->GetQuestStatus(QUEST_DIGGING_FOR_PRAYER_BEADS) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TRACY_PROUDWELL_ITEM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_tracy_proudwell(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TRACY_PROUDWELL_ITEM2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_TRACY_PROUDWELL1, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + break; + case GOSSIP_ACTION_TRADE: + pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + break; + } + + return true; +} + +/*###### +## npc_trollbane +######*/ + +#define GOSSIP_TROLLBANE_ITEM1 "Tell me of the Sons of Lothar." +#define GOSSIP_TROLLBANE_ITEM2 "" +#define GOSSIP_TROLLBANE_ITEM3 "Tell me of your homeland." + +enum +{ + GOSSIP_TEXTID_TROLLBANE1 = 9932, + GOSSIP_TEXTID_TROLLBANE2 = 9933, + GOSSIP_TEXTID_TROLLBANE3 = 8772 +}; + +bool GossipHello_npc_trollbane(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TROLLBANE_ITEM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TROLLBANE_ITEM3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_trollbane(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TROLLBANE_ITEM2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_TROLLBANE1, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_TROLLBANE2, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+3: + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_TROLLBANE3, pCreature->GetGUID()); + break; + } + + return true; +} + +/*###### +## npc_wing_commander_dabiree +######*/ + +enum +{ + SPELL_TAXI_TO_GATEWAYS = 33768, + SPELL_TAXI_TO_SHATTER = 35069, + QUEST_MISSION_GATEWAYS_A = 10146, + QUEST_SHATTER_POINT = 10340 +}; + +#define GOSSIP_ITEM1_DAB "Fly me to Murketh and Shaadraz Gateways" +#define GOSSIP_ITEM2_DAB "Fly me to Shatter Point" + +bool GossipHello_npc_wing_commander_dabiree(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + //Mission: The Murketh and Shaadraz Gateways + if (pPlayer->GetQuestStatus(QUEST_MISSION_GATEWAYS_A) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM1_DAB, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + //Shatter Point + if (pPlayer->GetQuestStatus(QUEST_SHATTER_POINT) == QUEST_STATUS_COMPLETE || + pPlayer->GetQuestRewardStatus(QUEST_SHATTER_POINT)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM2_DAB, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_wing_commander_dabiree(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + pPlayer->CLOSE_GOSSIP_MENU(); + //TaxiPath 585 + pPlayer->CastSpell(pPlayer,SPELL_TAXI_TO_GATEWAYS,true); + } + if (uiAction == GOSSIP_ACTION_INFO_DEF+2) + { + pPlayer->CLOSE_GOSSIP_MENU(); + //TaxiPath 612 + pPlayer->CastSpell(pPlayer,SPELL_TAXI_TO_SHATTER,true); + } + return true; +} + +/*###### +## npc_wing_commander_brack +######*/ + +enum +{ + QUEST_MISSION_GATEWAYS_H = 10129, + QUEST_ABYSSAL_H = 10162, + QUEST_RETURN_ABYSSAL_H = 10347, + QUEST_SPINEBREAKER = 10242, + SPELL_TAXI_GATEWAYS_H = 33659, + SPELL_TAXI_ASSULT_H = 33825, + SPELL_TAXI_SPINEBREAKER = 34578 +}; + +#define GOSSIP_ITEM1_BRA "I'm on a bombing mission for Forward Commander To'arch. I need a wyvern destroyer!" +#define GOSSIP_ITEM2_BRA "Fly me to The Abyssal Shelf" +#define GOSSIP_ITEM3_BRA "Lend me a Wind Rider, I'm going to Spinebreaker Post." + +bool GossipHello_npc_wing_commander_brack(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + //Mission: The Murketh and Shaadraz Gateways + if (pPlayer->GetQuestStatus(QUEST_MISSION_GATEWAYS_H) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM1_BRA, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + //Mission: The Abyssal Shelf || Return to the Abyssal Shelf + if (pPlayer->GetQuestStatus(QUEST_ABYSSAL_H) == QUEST_STATUS_INCOMPLETE || + pPlayer->GetQuestStatus(QUEST_RETURN_ABYSSAL_H) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM2_BRA, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + + //Spinebreaker Post + if (pPlayer->GetQuestStatus(QUEST_SPINEBREAKER) == QUEST_STATUS_COMPLETE || + pPlayer->GetQuestRewardStatus(QUEST_SPINEBREAKER)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM3_BRA, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_wing_commander_brack(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->CLOSE_GOSSIP_MENU(); + //TaxiPath 584 + pPlayer->CastSpell(pPlayer,SPELL_TAXI_GATEWAYS_H,true); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->CLOSE_GOSSIP_MENU(); + //TaxiPath 587 + pPlayer->CastSpell(pPlayer,SPELL_TAXI_ASSULT_H,true); + break; + case GOSSIP_ACTION_INFO_DEF+3: + pPlayer->CLOSE_GOSSIP_MENU(); + //TaxiPath 604 + pPlayer->CastSpell(pPlayer,SPELL_TAXI_SPINEBREAKER,true); + break; + } + return true; +} + +/*###### +## npc_wounded_blood_elf +######*/ + +#define SAY_ELF_START -1000117 +#define SAY_ELF_SUMMON1 -1000118 +#define SAY_ELF_RESTING -1000119 +#define SAY_ELF_SUMMON2 -1000120 +#define SAY_ELF_COMPLETE -1000121 +#define SAY_ELF_AGGRO -1000122 + +#define QUEST_ROAD_TO_FALCON_WATCH 9375 + +struct MANGOS_DLL_DECL npc_wounded_blood_elfAI : public npc_escortAI +{ + npc_wounded_blood_elfAI(Creature* pCreature) : npc_escortAI(pCreature) {Reset();} + + void WaypointReached(uint32 i) + { + Player* pPlayer = GetPlayerForEscort(); + + if (!pPlayer) + return; + + switch (i) + { + case 0: + DoScriptText(SAY_ELF_START, m_creature, pPlayer); + break; + case 9: + DoScriptText(SAY_ELF_SUMMON1, m_creature, pPlayer); + // 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, m_creature, pPlayer); + break; + case 14: + DoScriptText(SAY_ELF_SUMMON2, m_creature, pPlayer); + // 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, m_creature, pPlayer); + // Award quest credit + pPlayer->GroupEventHappens(QUEST_ROAD_TO_FALCON_WATCH, m_creature); + break; + } + } + + void Reset() { } + + void Aggro(Unit* who) + { + if (HasEscortState(STATE_ESCORT_ESCORTING)) + DoScriptText(SAY_ELF_AGGRO, m_creature); + } + + void JustSummoned(Creature* summoned) + { + summoned->AI()->AttackStart(m_creature); + } +}; + +CreatureAI* GetAI_npc_wounded_blood_elf(Creature* pCreature) +{ + return new npc_wounded_blood_elfAI(pCreature); +} + +bool QuestAccept_npc_wounded_blood_elf(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_ROAD_TO_FALCON_WATCH) + { + // Change faction so mobs attack + pCreature->setFaction(FACTION_ESCORT_H_PASSIVE); + + if (npc_wounded_blood_elfAI* pEscortAI = dynamic_cast(pCreature->AI())) + pEscortAI->Start(true, false, pPlayer->GetGUID(), pQuest); + } + + return true; +} + +void AddSC_hellfire_peninsula() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_aeranas"; + newscript->GetAI = &GetAI_npc_aeranas; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "go_haaleshi_altar"; + newscript->pGOHello = &GOHello_go_haaleshi_altar; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_ancestral_wolf"; + newscript->GetAI = &GetAI_npc_ancestral_wolf; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_demoniac_scryer"; + newscript->GetAI = &GetAI_npc_demoniac_scryer; + newscript->pGossipHello = &GossipHello_npc_demoniac_scryer; + newscript->pGossipSelect = &GossipSelect_npc_demoniac_scryer; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_gryphoneer_windbellow"; + newscript->pGossipHello = &GossipHello_npc_gryphoneer_windbellow; + newscript->pGossipSelect = &GossipSelect_npc_gryphoneer_windbellow; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_naladu"; + newscript->pGossipHello = &GossipHello_npc_naladu; + newscript->pGossipSelect = &GossipSelect_npc_naladu; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_tracy_proudwell"; + newscript->pGossipHello = &GossipHello_npc_tracy_proudwell; + newscript->pGossipSelect = &GossipSelect_npc_tracy_proudwell; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_trollbane"; + newscript->pGossipHello = &GossipHello_npc_trollbane; + newscript->pGossipSelect = &GossipSelect_npc_trollbane; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_wing_commander_dabiree"; + newscript->pGossipHello = &GossipHello_npc_wing_commander_dabiree; + newscript->pGossipSelect = &GossipSelect_npc_wing_commander_dabiree; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_wing_commander_brack"; + newscript->pGossipHello = &GossipHello_npc_wing_commander_brack; + newscript->pGossipSelect = &GossipSelect_npc_wing_commander_brack; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_wounded_blood_elf"; + newscript->GetAI = &GetAI_npc_wounded_blood_elf; + newscript->pQuestAccept = &QuestAccept_npc_wounded_blood_elf; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/nagrand.cpp b/scripts/outland/nagrand.cpp new file mode 100644 index 000000000..172007c0f --- /dev/null +++ b/scripts/outland/nagrand.cpp @@ -0,0 +1,736 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Nagrand +SD%Complete: 90 +SDComment: Quest support: 9849, 9868, 9874, 9918, 9991, 10044, 10085, 10107, 10108, 10172, 10646. TextId's unknown for altruis_the_sufferer and greatmother_geyah (npc_text) +SDCategory: Nagrand +EndScriptData */ + +/* ContentData +mob_shattered_rumbler +mob_lump +mob_sunspring_villager +npc_altruis_the_sufferer +npc_greatmother_geyah +npc_lantresor_of_the_blade +npc_maghar_captive +npc_creditmarker_visit_with_ancestors +EndContentData */ + +#include "precompiled.h" +#include "escort_ai.h" + +/*###### +## mob_shattered_rumbler - this should be done with ACID +######*/ + +struct MANGOS_DLL_DECL mob_shattered_rumblerAI : public ScriptedAI +{ + bool Spawn; + + mob_shattered_rumblerAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + void Reset() + { + Spawn = false; + } + + void SpellHit(Unit *Hitter, const SpellEntry *Spellkind) + { + if (Spellkind->Id == 32001 && !Spawn) + { + float x = m_creature->GetPositionX(); + float y = m_creature->GetPositionY(); + float z = m_creature->GetPositionZ(); + + Hitter->SummonCreature(18181,x+(0.7 * (rand()%30)),y+(rand()%5),z,0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,60000); + Hitter->SummonCreature(18181,x+(rand()%5),y-(rand()%5),z,0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,60000); + Hitter->SummonCreature(18181,x-(rand()%5),y+(0.5 *(rand()%60)),z,0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,60000); + m_creature->setDeathState(CORPSE); + Spawn = true; + } + return; + } +}; +CreatureAI* GetAI_mob_shattered_rumbler(Creature* pCreature) +{ + return new mob_shattered_rumblerAI(pCreature); +} + +/*###### +## mob_lump +######*/ + +#define SAY_LUMP_0 -1000190 +#define SAY_LUMP_1 -1000191 +#define SAY_LUMP_DEFEAT -1000192 + +#define SPELL_VISUAL_SLEEP 16093 +#define SPELL_SPEAR_THROW 32248 + +struct MANGOS_DLL_DECL mob_lumpAI : public ScriptedAI +{ + mob_lumpAI(Creature* pCreature) : ScriptedAI(pCreature) + { + bReset = false; + Reset(); + } + + uint32 Reset_Timer; + uint32 Spear_Throw_Timer; + bool bReset; + + void Reset() + { + Reset_Timer = 60000; + Spear_Throw_Timer = 2000; + + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + } + + void AttackedBy(Unit* pAttacker) + { + if (m_creature->getVictim()) + return; + + if (m_creature->IsFriendlyTo(pAttacker)) + return; + + AttackStart(pAttacker); + } + + void DamageTaken(Unit *done_by, uint32 & damage) + { + if (done_by->GetTypeId() == TYPEID_PLAYER && (m_creature->GetHealth() - damage)*100 / m_creature->GetMaxHealth() < 30) + { + if (!bReset && ((Player*)done_by)->GetQuestStatus(9918) == QUEST_STATUS_INCOMPLETE) + { + //Take 0 damage + damage = 0; + + ((Player*)done_by)->AttackStop(); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->setFaction(1080); //friendly + m_creature->SetStandState(UNIT_STAND_STATE_SIT); + DoScriptText(SAY_LUMP_DEFEAT, m_creature, done_by); + + bReset = true; + } + } + } + + void Aggro(Unit *who) + { + if (m_creature->HasAura(SPELL_VISUAL_SLEEP,0)) + m_creature->RemoveAura(SPELL_VISUAL_SLEEP,0); + + if (!m_creature->IsStandState()) + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + + DoScriptText(urand(0, 1) ? SAY_LUMP_0 : SAY_LUMP_1, m_creature, who); + } + + void UpdateAI(const uint32 diff) + { + //check if we waiting for a reset + if (bReset) + { + if (Reset_Timer < diff) + { + EnterEvadeMode(); + bReset = false; + m_creature->setFaction(1711); //hostile + } + else Reset_Timer -= diff; + } + + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Spear_Throw_Timer + if (Spear_Throw_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_SPEAR_THROW); + Spear_Throw_Timer = 20000; + }else Spear_Throw_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_lump(Creature *_creature) +{ + return new mob_lumpAI(_creature); +} + +bool GossipHello_mob_lump(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->GetQuestStatus(9918) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I need answers, ogre!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + + pPlayer->SEND_GOSSIP_MENU(9352, pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_mob_lump(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Why are Boulderfist out this far? You know that this is Kurenai territory.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->SEND_GOSSIP_MENU(9353, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "And you think you can just eat anything you want? You're obviously trying to eat the Broken of Telaar.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->SEND_GOSSIP_MENU(9354, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "This means war, Lump! War I say!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->SEND_GOSSIP_MENU(9355, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+3: + pPlayer->SEND_GOSSIP_MENU(9356, pCreature->GetGUID()); + pPlayer->TalkedToCreature(18354, pCreature->GetGUID()); + break; + } + return true; +} + +/*#### +# mob_sunspring_villager - should be done with ACID +####*/ + +struct MANGOS_DLL_DECL mob_sunspring_villagerAI : public ScriptedAI +{ + mob_sunspring_villagerAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + void Reset() + { + m_creature->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD); + m_creature->SetStandState(UNIT_STAND_STATE_DEAD); + } + + void SpellHit(Unit *caster, const SpellEntry *spell) + { + if (spell->Id == 32146) + { + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + m_creature->RemoveCorpse(); + } + } +}; +CreatureAI* GetAI_mob_sunspring_villager(Creature* pCreature) +{ + return new mob_sunspring_villagerAI(pCreature); +} + +/*###### +## npc_altruis_the_sufferer +######*/ + +enum +{ + QUEST_SURVEY = 9991, + QUEST_PUPIL = 10646, + + TAXI_PATH_ID = 532 +}; + +bool GossipHello_npc_altruis_the_sufferer(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + //gossip before obtaining Survey the Land + if (pPlayer->GetQuestStatus(QUEST_SURVEY) == QUEST_STATUS_NONE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I see twisted steel and smell sundered earth.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+10); + + //gossip when Survey the Land is incomplete (technically, after the flight) + if (pPlayer->GetQuestStatus(QUEST_SURVEY) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Well...?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+20); + + //wowwiki.com/Varedis + if (pPlayer->GetQuestStatus(QUEST_PUPIL) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] Story about Illidan's Pupil", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+30); + + pPlayer->SEND_GOSSIP_MENU(9419, pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_altruis_the_sufferer(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF+10: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Legion?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11); + pPlayer->SEND_GOSSIP_MENU(9420, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+11: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "And now?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 12); + pPlayer->SEND_GOSSIP_MENU(9421, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+12: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "How do you see them now?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 13); + pPlayer->SEND_GOSSIP_MENU(9422, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+13: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Forge camps?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 14); + pPlayer->SEND_GOSSIP_MENU(9423, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+14: + pPlayer->SEND_GOSSIP_MENU(9424, pCreature->GetGUID()); + break; + + case GOSSIP_ACTION_INFO_DEF+20: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Ok.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 21); + pPlayer->SEND_GOSSIP_MENU(9427, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+21: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->AreaExploredOrEventHappens(QUEST_SURVEY); + break; + + case GOSSIP_ACTION_INFO_DEF+30: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] Story done", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 31); + pPlayer->SEND_GOSSIP_MENU(384, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+31: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->AreaExploredOrEventHappens(QUEST_PUPIL); + break; + } + return true; +} + +bool QuestAccept_npc_altruis_the_sufferer(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (!pPlayer->GetQuestRewardStatus(QUEST_SURVEY)) //Survey the Land + { + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->ActivateTaxiPathTo(TAXI_PATH_ID); + } + return true; +} + +/*###### +## npc_greatmother_geyah +######*/ + +//all the textId's for the below is unknown, but i do believe the gossip item texts are proper. +bool GossipHello_npc_greatmother_geyah(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestStatus(10044) == QUEST_STATUS_INCOMPLETE) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Hello, Greatmother. Garrosh told me that you wanted to speak with me.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + } + else if (pPlayer->GetQuestStatus(10172) == QUEST_STATUS_INCOMPLETE) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Garrosh is beyond redemption, Greatmother. I fear that in helping the Mag'har, I have convinced Garrosh that he is unfit to lead.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10); + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + } + else + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_greatmother_geyah(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "You raised all of the orcs here, Greatmother?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Do you believe that?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What can be done? I have tried many different things. I have done my best to help the people of Nagrand. Each time I have approached Garrosh, he has dismissed me.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Left? How can you choose to leave?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What is this duty?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Is there anything I can do for you, Greatmother?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 7: + pPlayer->AreaExploredOrEventHappens(10044); + pPlayer->CLOSE_GOSSIP_MENU(); + break; + + case GOSSIP_ACTION_INFO_DEF + 10: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I have done all that I could, Greatmother. I thank you for your kind words.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11); + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 11: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Greatmother, you are the mother of Durotan?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 12); + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 12: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Greatmother, I never had the honor. Durotan died long before my time, but his heroics are known to all on my world. The orcs of Azeroth reside in a place known as Durotar, named after your son. And ... (You take a moment to breathe and think through what you are about to tell the Greatmother.)", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 13); + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 13: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "It is my Warchief, Greatmother. The leader of my people. From my world. He ... He is the son of Durotan. He is your grandchild.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 14); + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 14: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I will return to Azeroth at once, Greatmother.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 15); + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 15: + pPlayer->AreaExploredOrEventHappens(10172); + pPlayer->CLOSE_GOSSIP_MENU(); + break; + } + return true; +} + +/*###### +## npc_lantresor_of_the_blade +######*/ + +bool GossipHello_npc_lantresor_of_the_blade(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestStatus(10107) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(10108) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I have killed many of your ogres, Lantresor. I have no fear.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + + pPlayer->SEND_GOSSIP_MENU(9361, pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_lantresor_of_the_blade(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Should I know? You look like an orc to me.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->SEND_GOSSIP_MENU(9362, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "And the other half?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->SEND_GOSSIP_MENU(9363, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I have heard of your kind, but I never thought to see the day when I would meet a half-breed.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->SEND_GOSSIP_MENU(9364, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+3: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "My apologies. I did not mean to offend. I am here on behalf of my people.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->SEND_GOSSIP_MENU(9365, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+4: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "My people ask that you pull back your Boulderfist ogres and cease all attacks on our territories. In return, we will also pull back our forces.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->SEND_GOSSIP_MENU(9366, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+5: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "We will fight you until the end, then, Lantresor. We will not stand idly by as you pillage our towns and kill our people.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->SEND_GOSSIP_MENU(9367, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+6: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What do I need to do?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->SEND_GOSSIP_MENU(9368, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+7: + pPlayer->SEND_GOSSIP_MENU(9369, pCreature->GetGUID()); + if (pPlayer->GetQuestStatus(10107) == QUEST_STATUS_INCOMPLETE) + pPlayer->AreaExploredOrEventHappens(10107); + if (pPlayer->GetQuestStatus(10108) == QUEST_STATUS_INCOMPLETE) + pPlayer->AreaExploredOrEventHappens(10108); + break; + } + return true; +} + +/*##### +## npc_maghar_captive +#####*/ + +enum +{ + 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, + + SPELL_CHAIN_LIGHTNING = 16006, + SPELL_EARTHBIND_TOTEM = 15786, + SPELL_FROST_SHOCK = 12548, + SPELL_HEALING_WAVE = 12491, + + QUEST_TOTEM_KARDASH_H = 9868, + + NPC_MURK_RAIDER = 18203, + NPC_MURK_BRUTE = 18211, + NPC_MURK_SCAVENGER = 18207, + NPC_MURK_PUTRIFIER = 18202 +}; + +static float m_afAmbushA[]= {-1568.805786, 8533.873047, 1.958}; +static float m_afAmbushB[]= {-1491.554321, 8506.483398, 1.248}; + +struct MANGOS_DLL_DECL npc_maghar_captiveAI : public npc_escortAI +{ + npc_maghar_captiveAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } + + uint32 m_uiChainLightningTimer; + uint32 m_uiHealTimer; + uint32 m_uiFrostShockTimer; + + void Reset() + { + m_uiChainLightningTimer = 1000; + m_uiHealTimer = 0; + m_uiFrostShockTimer = 6000; + } + + void Aggro(Unit* pWho) + { + m_creature->CastSpell(m_creature, SPELL_EARTHBIND_TOTEM, false); + } + + void WaypointReached(uint32 uiPointId) + { + switch(uiPointId) + { + case 7: + DoScriptText(SAY_MAG_MORE, m_creature); + + if (Creature* pTemp = m_creature->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, pTemp); + + m_creature->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); + + m_creature->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); + m_creature->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, m_creature); + + if (Player* pPlayer = GetPlayerForEscort()) + pPlayer->GroupEventHappens(QUEST_TOTEM_KARDASH_H, m_creature); + + SetRun(); + break; + } + } + + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_MURK_BRUTE) + DoScriptText(SAY_MAG_NO_ESCAPE, pSummoned); + + if (pSummoned->isTotem()) + return; + + pSummoned->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + pSummoned->GetMotionMaster()->MovePoint(0, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); + } + + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) + { + if (pSpell->Id == SPELL_CHAIN_LIGHTNING) + { + if (urand(0, 9)) + return; + + DoScriptText(SAY_MAG_LIGHTNING, m_creature); + } + } + + void UpdateEscortAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiChainLightningTimer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_CHAIN_LIGHTNING); + m_uiChainLightningTimer = urand(7000, 14000); + } + else + m_uiChainLightningTimer -= uiDiff; + + if (m_creature->GetHealth()*100 < m_creature->GetMaxHealth()*30) + { + if (m_uiHealTimer < uiDiff) + { + DoCast(m_creature, SPELL_HEALING_WAVE); + m_uiHealTimer = 5000; + } + else + m_uiHealTimer -= uiDiff; + } + + if (m_uiFrostShockTimer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_FROST_SHOCK); + m_uiFrostShockTimer = urand(7500, 15000); + } + else + m_uiFrostShockTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +bool QuestAccept_npc_maghar_captive(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_TOTEM_KARDASH_H) + { + if (npc_maghar_captiveAI* pEscortAI = dynamic_cast(pCreature->AI())) + { + pCreature->SetStandState(UNIT_STAND_STATE_STAND); + pCreature->setFaction(FACTION_ESCORT_H_NEUTRAL_ACTIVE); + + pEscortAI->Start(true, false, pPlayer->GetGUID(), pQuest); + + DoScriptText(SAY_MAG_START, pCreature); + + pCreature->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); + pCreature->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); + pCreature->SummonCreature(NPC_MURK_BRUTE, m_afAmbushA[0], m_afAmbushA[1], m_afAmbushA[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + } + } + return true; +} + +CreatureAI* GetAI_npc_maghar_captive(Creature* pCreature) +{ + return new npc_maghar_captiveAI(pCreature); +} + +/*###### +## npc_creditmarker_visist_with_ancestors (Quest 10085) +######*/ + +enum +{ + QUEST_VISIT_WITH_ANCESTORS = 10085 +}; + +struct MANGOS_DLL_DECL npc_creditmarker_visit_with_ancestorsAI : public ScriptedAI +{ + npc_creditmarker_visit_with_ancestorsAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + void Reset() {} + + void MoveInLineOfSight(Unit* pWho) + { + if (pWho->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(pWho, 30.0f)) + { + if (((Player*)pWho)->GetQuestStatus(QUEST_VISIT_WITH_ANCESTORS) == QUEST_STATUS_INCOMPLETE) + { + uint32 creditMarkerId = m_creature->GetEntry(); + if ((creditMarkerId >= 18840) && (creditMarkerId <= 18843)) + { + // 18840: Sunspring, 18841: Laughing, 18842: Garadar, 18843: Bleeding + if (!((Player*)pWho)->GetReqKillOrCastCurrentCount(QUEST_VISIT_WITH_ANCESTORS, creditMarkerId)) + ((Player*)pWho)->KilledMonsterCredit(creditMarkerId, m_creature->GetGUID()); + } + } + } + } +}; + +CreatureAI* GetAI_npc_creditmarker_visit_with_ancestors(Creature* pCreature) +{ + return new npc_creditmarker_visit_with_ancestorsAI(pCreature); +} + +/*###### +## AddSC +######*/ + +void AddSC_nagrand() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "mob_shattered_rumbler"; + newscript->GetAI = &GetAI_mob_shattered_rumbler; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_lump"; + newscript->GetAI = &GetAI_mob_lump; + newscript->pGossipHello = &GossipHello_mob_lump; + newscript->pGossipSelect = &GossipSelect_mob_lump; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_sunspring_villager"; + newscript->GetAI = &GetAI_mob_sunspring_villager; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_altruis_the_sufferer"; + newscript->pGossipHello = &GossipHello_npc_altruis_the_sufferer; + newscript->pGossipSelect = &GossipSelect_npc_altruis_the_sufferer; + newscript->pQuestAccept = &QuestAccept_npc_altruis_the_sufferer; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_greatmother_geyah"; + newscript->pGossipHello = &GossipHello_npc_greatmother_geyah; + newscript->pGossipSelect = &GossipSelect_npc_greatmother_geyah; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_lantresor_of_the_blade"; + newscript->pGossipHello = &GossipHello_npc_lantresor_of_the_blade; + newscript->pGossipSelect = &GossipSelect_npc_lantresor_of_the_blade; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_maghar_captive"; + newscript->GetAI = &GetAI_npc_maghar_captive; + newscript->pQuestAccept = &QuestAccept_npc_maghar_captive; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_creditmarker_visit_with_ancestors"; + newscript->GetAI = &GetAI_npc_creditmarker_visit_with_ancestors; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/netherstorm.cpp b/scripts/outland/netherstorm.cpp new file mode 100644 index 000000000..dfb23644f --- /dev/null +++ b/scripts/outland/netherstorm.cpp @@ -0,0 +1,724 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Netherstorm +SD%Complete: 80 +SDComment: Quest support: 10438, 10652 (special flight paths), 10299,10321,10322,10323,10329,10330,10338,10365(Shutting Down Manaforge), 10198 +SDCategory: Netherstorm +EndScriptData */ + +/* ContentData +npc_manaforge_control_console +go_manaforge_control_console +npc_commander_dawnforge +npc_protectorate_nether_drake +npc_veronia +EndContentData */ + +#include "precompiled.h" + +/*###### +## npc_manaforge_control_console +######*/ + +#define EMOTE_START -1000211 +#define EMOTE_60 -1000212 +#define EMOTE_30 -1000213 +#define EMOTE_10 -1000214 +#define EMOTE_COMPLETE -1000215 +#define EMOTE_ABORT -1000216 + +#define ENTRY_BNAAR_C_CONSOLE 20209 +#define ENTRY_CORUU_C_CONSOLE 20417 +#define ENTRY_DURO_C_CONSOLE 20418 +#define ENTRY_ARA_C_CONSOLE 20440 + +#define ENTRY_SUNFURY_TECH 20218 +#define ENTRY_SUNFURY_PROT 20436 + +#define ENTRY_ARA_TECH 20438 +#define ENTRY_ARA_ENGI 20439 +#define ENTRY_ARA_GORKLONN 20460 + +#define SPELL_DISABLE_VISUAL 35031 +#define SPELL_INTERRUPT_1 35016 //ACID mobs should cast this +#define SPELL_INTERRUPT_2 35176 //ACID mobs should cast this (Manaforge Ara-version) + +struct MANGOS_DLL_DECL npc_manaforge_control_consoleAI : public ScriptedAI +{ + npc_manaforge_control_consoleAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 Event_Timer; + uint32 Wave_Timer; + uint32 Phase; + bool Wave; + uint64 someplayer; + uint64 goConsole; + Creature* add; + + void Reset() + { + Event_Timer = 3000; + Wave_Timer = 0; + Phase = 1; + Wave = false; + someplayer = 0; + goConsole = 0; + Creature* add = NULL; + } + + /*void SpellHit(Unit *caster, const SpellEntry *spell) + { + //we have no way of telling the creature was hit by spell -> got aura applied after 10-12 seconds + //then no way for the mobs to actually stop the shutdown as intended. + if (spell->Id == SPELL_INTERRUPT_1) + ... + }*/ + + void JustDied(Unit* killer) + { + DoScriptText(EMOTE_ABORT, m_creature); + + if (someplayer) + { + Unit* p = Unit::GetUnit((*m_creature),someplayer); + if (p && p->GetTypeId() == TYPEID_PLAYER) + { + switch(m_creature->GetEntry()) + { + case ENTRY_BNAAR_C_CONSOLE: + ((Player*)p)->FailQuest(10299); + ((Player*)p)->FailQuest(10329); + break; + case ENTRY_CORUU_C_CONSOLE: + ((Player*)p)->FailQuest(10321); + ((Player*)p)->FailQuest(10330); + break; + case ENTRY_DURO_C_CONSOLE: + ((Player*)p)->FailQuest(10322); + ((Player*)p)->FailQuest(10338); + break; + case ENTRY_ARA_C_CONSOLE: + ((Player*)p)->FailQuest(10323); + ((Player*)p)->FailQuest(10365); + break; + } + } + } + + if (goConsole) + { + if (GameObject* pGo = m_creature->GetMap()->GetGameObject(goConsole)) + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE); + } + } + + void DoWaveSpawnForCreature(Creature* pCreature) + { + switch(pCreature->GetEntry()) + { + case ENTRY_BNAAR_C_CONSOLE: + if (urand(0, 1)) + { + add = m_creature->SummonCreature(ENTRY_SUNFURY_TECH,2933.68,4162.55,164.00,1.60,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000); + if (add) add->GetMotionMaster()->MovePoint(0,2927.36,4212.97,164.00); + } + else + { + add = m_creature->SummonCreature(ENTRY_SUNFURY_TECH,2927.36,4212.97,164.00,4.94,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000); + if (add) add->GetMotionMaster()->MovePoint(0,2933.68,4162.55,164.00); + } + Wave_Timer = 30000; + break; + case ENTRY_CORUU_C_CONSOLE: + add = m_creature->SummonCreature(ENTRY_SUNFURY_TECH,2445.21,2765.26,134.49,3.93,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000); + if (add) add->GetMotionMaster()->MovePoint(0,2424.21,2740.15,133.81); + add = m_creature->SummonCreature(ENTRY_SUNFURY_TECH,2429.86,2731.85,134.53,1.31,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000); + if (add) add->GetMotionMaster()->MovePoint(0,2435.37,2766.04,133.81); + Wave_Timer = 20000; + break; + case ENTRY_DURO_C_CONSOLE: + add = m_creature->SummonCreature(ENTRY_SUNFURY_TECH,2986.80,2205.36,165.37,3.74,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000); + if (add) add->GetMotionMaster()->MovePoint(0,2985.15,2197.32,164.79); + add = m_creature->SummonCreature(ENTRY_SUNFURY_TECH,2952.91,2191.20,165.32,0.22,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000); + if (add) add->GetMotionMaster()->MovePoint(0,2060.01,2185.27,164.67); + Wave_Timer = 15000; + break; + case ENTRY_ARA_C_CONSOLE: + if (urand(0, 1)) + { + add = m_creature->SummonCreature(ENTRY_ARA_TECH,4035.11,4038.97,194.27,2.57,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000); + if (add) add->GetMotionMaster()->MovePoint(0,4003.42,4040.19,193.49); + add = m_creature->SummonCreature(ENTRY_ARA_TECH,4033.66,4036.79,194.28,2.57,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000); + if (add) add->GetMotionMaster()->MovePoint(0,4003.42,4040.19,193.49); + add = m_creature->SummonCreature(ENTRY_ARA_TECH,4037.13,4037.30,194.23,2.57,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000); + if (add) add->GetMotionMaster()->MovePoint(0,4003.42,4040.19,193.49); + } + else + { + add = m_creature->SummonCreature(ENTRY_ARA_TECH,3099.59,4049.30,194.22,0.05,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000); + if (add) add->GetMotionMaster()->MovePoint(0,4028.01,4035.17,193.59); + add = m_creature->SummonCreature(ENTRY_ARA_TECH,3999.72,4046.75,194.22,0.05,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000); + if (add) add->GetMotionMaster()->MovePoint(0,4028.01,4035.17,193.59); + add = m_creature->SummonCreature(ENTRY_ARA_TECH,3996.81,4048.26,194.22,0.05,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000); + if (add) add->GetMotionMaster()->MovePoint(0,4028.01,4035.17,193.59); + } + Wave_Timer = 15000; + break; + } + } + void DoFinalSpawnForCreature(Creature* pCreature) + { + switch(pCreature->GetEntry()) + { + case ENTRY_BNAAR_C_CONSOLE: + add = m_creature->SummonCreature(ENTRY_SUNFURY_TECH,2946.52,4201.42,163.47,3.54,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000); + if (add) add->GetMotionMaster()->MovePoint(0,2927.49,4192.81,163.00); + break; + case ENTRY_CORUU_C_CONSOLE: + add = m_creature->SummonCreature(ENTRY_SUNFURY_TECH,2453.88,2737.85,133.27,2.59,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000); + if (add) add->GetMotionMaster()->MovePoint(0,2433.96,2751.53,133.85); + add = m_creature->SummonCreature(ENTRY_SUNFURY_TECH,2441.62,2735.32,134.49,1.97,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000); + if (add) add->GetMotionMaster()->MovePoint(0,2433.96,2751.53,133.85); + add = m_creature->SummonCreature(ENTRY_SUNFURY_TECH,2450.73,2754.50,134.49,3.29,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000); + if (add) add->GetMotionMaster()->MovePoint(0,2433.96,2751.53,133.85); + break; + case ENTRY_DURO_C_CONSOLE: + add = m_creature->SummonCreature(ENTRY_SUNFURY_TECH,2956.18,2202.85,165.32,5.45,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000); + if (add) add->GetMotionMaster()->MovePoint(0,2972.27,2193.22,164.48); + add = m_creature->SummonCreature(ENTRY_SUNFURY_TECH,2975.30,2211.50,165.32,4.55,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000); + if (add) add->GetMotionMaster()->MovePoint(0,2972.27,2193.22,164.48); + add = m_creature->SummonCreature(ENTRY_SUNFURY_PROT,2965.02,2217.45,164.16,4.96,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000); + if (add) add->GetMotionMaster()->MovePoint(0,2972.27,2193.22,164.48); + break; + case ENTRY_ARA_C_CONSOLE: + add = m_creature->SummonCreature(ENTRY_ARA_ENGI,3994.51,4020.46,192.18,0.91,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000); + if (add) add->GetMotionMaster()->MovePoint(0,4008.35,4035.04,192.70); + add = m_creature->SummonCreature(ENTRY_ARA_GORKLONN,4021.56,4059.35,193.59,4.44,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000); + if (add) add->GetMotionMaster()->MovePoint(0,4016.62,4039.89,193.46); + break; + } + } + + void UpdateAI(const uint32 diff) + { + if (Event_Timer < diff) + { + Unit *playertarget = NULL; + + if (someplayer) + { + playertarget = Unit::GetUnit((*m_creature),someplayer); + if (!playertarget) + return; + if (playertarget->GetTypeId() != TYPEID_PLAYER) + return; + }else return; + + switch(Phase) + { + case 1: + DoScriptText(EMOTE_START, m_creature, playertarget); + Event_Timer = 60000; + Wave = true; + ++Phase; + break; + case 2: + DoScriptText(EMOTE_60, m_creature, playertarget); + Event_Timer = 30000; + ++Phase; + break; + case 3: + DoScriptText(EMOTE_30, m_creature, playertarget); + Event_Timer = 20000; + DoFinalSpawnForCreature(m_creature); + ++Phase; + break; + case 4: + DoScriptText(EMOTE_10, m_creature, playertarget); + Event_Timer = 10000; + Wave = false; + ++Phase; + break; + case 5: + DoScriptText(EMOTE_COMPLETE, m_creature, playertarget); + ((Player*)playertarget)->KilledMonsterCredit(m_creature->GetEntry(),m_creature->GetGUID()); + DoCast(m_creature,SPELL_DISABLE_VISUAL); + if (goConsole) + { + if (GameObject* pGo = m_creature->GetMap()->GetGameObject(goConsole)) + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE); + } + ++Phase; + break; + } + } else Event_Timer -= diff; + + if (Wave) + { + if (Wave_Timer < diff) + { + DoWaveSpawnForCreature(m_creature); + } else Wave_Timer -= diff; + } + } +}; +CreatureAI* GetAI_npc_manaforge_control_console(Creature* pCreature) +{ + return new npc_manaforge_control_consoleAI(pCreature); +} + +/*###### +## go_manaforge_control_console +######*/ + +//TODO: clean up this workaround when mangos adds support to do it properly (with gossip selections instead of instant summon) +bool GOHello_go_manaforge_control_console(Player* pPlayer, GameObject* pGo) +{ + if (pGo->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER) + { + pPlayer->PrepareQuestMenu(pGo->GetGUID()); + pPlayer->SendPreparedQuest(pGo->GetGUID()); + } + + Creature* manaforge = NULL; + + switch(pGo->GetAreaId()) + { + case 3726: //b'naar + if ((pPlayer->GetQuestStatus(10299) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(10329) == QUEST_STATUS_INCOMPLETE) && + pPlayer->HasItemCount(29366,1)) + manaforge = pPlayer->SummonCreature(ENTRY_BNAAR_C_CONSOLE,2918.95,4189.98,161.88,0.34,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN,125000); + break; + case 3730: //coruu + if ((pPlayer->GetQuestStatus(10321) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(10330) == QUEST_STATUS_INCOMPLETE) && + pPlayer->HasItemCount(29396,1)) + manaforge = pPlayer->SummonCreature(ENTRY_CORUU_C_CONSOLE,2426.77,2750.38,133.24,2.14,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN,125000); + break; + case 3734: //duro + if ((pPlayer->GetQuestStatus(10322) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(10338) == QUEST_STATUS_INCOMPLETE) && + pPlayer->HasItemCount(29397,1)) + manaforge = pPlayer->SummonCreature(ENTRY_DURO_C_CONSOLE,2976.48,2183.29,163.20,1.85,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN,125000); + break; + case 3722: //ara + if ((pPlayer->GetQuestStatus(10323) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(10365) == QUEST_STATUS_INCOMPLETE) && + pPlayer->HasItemCount(29411,1)) + manaforge = pPlayer->SummonCreature(ENTRY_ARA_C_CONSOLE,4013.71,4028.76,192.10,1.25,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN,125000); + break; + } + + if (manaforge) + { + ((npc_manaforge_control_consoleAI*)manaforge->AI())->someplayer = pPlayer->GetGUID(); + ((npc_manaforge_control_consoleAI*)manaforge->AI())->goConsole = pGo->GetGUID(); + pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE); + } + return true; +} + +/*###### +## npc_commander_dawnforge +######*/ + +// The Speech of Dawnforge, Ardonis & Pathaleon +#define SAY_COMMANDER_DAWNFORGE_1 -1000128 +#define SAY_ARCANIST_ARDONIS_1 -1000129 +#define SAY_COMMANDER_DAWNFORGE_2 -1000130 +#define SAY_PATHALEON_CULATOR_IMAGE_1 -1000131 +#define SAY_COMMANDER_DAWNFORGE_3 -1000132 +#define SAY_PATHALEON_CULATOR_IMAGE_2 -1000133 +#define SAY_PATHALEON_CULATOR_IMAGE_2_1 -1000134 +#define SAY_PATHALEON_CULATOR_IMAGE_2_2 -1000135 +#define SAY_COMMANDER_DAWNFORGE_4 -1000136 +#define SAY_ARCANIST_ARDONIS_2 -1000136 +#define SAY_COMMANDER_DAWNFORGE_5 -1000137 + +#define QUEST_INFO_GATHERING 10198 +#define SPELL_SUNFURY_DISGUISE 34603 + +// Entries of Arcanist Ardonis, Commander Dawnforge, Pathaleon the Curators Image +const uint32 uiCreatureEntry[3] = +{ + 19830, // Ardonis + 19831, // Dawnforge + 21504 // Pathaleon +}; + +struct MANGOS_DLL_DECL npc_commander_dawnforgeAI : public ScriptedAI +{ + npc_commander_dawnforgeAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset (); } + + uint64 playerGUID; + uint64 ardonisGUID; + uint64 pathaleonGUID; + + uint32 Phase; + uint32 PhaseSubphase; + uint32 Phase_Timer; + bool isEvent; + + float angle_dawnforge; + float angle_ardonis; + + void Reset() + { + playerGUID = 0; + ardonisGUID = 0; + pathaleonGUID = 0; + + Phase = 1; + PhaseSubphase = 0; + Phase_Timer = 4000; + isEvent = false; + } + + void JustSummoned(Creature *summoned) + { + pathaleonGUID = summoned->GetGUID(); + } + + // Emote Ardonis and Pathaleon + void Turn_to_Pathaleons_Image() + { + Unit *ardonis = Unit::GetUnit(*m_creature,ardonisGUID); + Unit *pathaleon = Unit::GetUnit(*m_creature,pathaleonGUID); + Player* pPlayer = (Player*)Unit::GetUnit(*m_creature,playerGUID); + + if (!ardonis || !pathaleon || !pPlayer) + return; + + //Calculate the angle to Pathaleon + angle_dawnforge = m_creature->GetAngle(pathaleon->GetPositionX(), pathaleon->GetPositionY()); + angle_ardonis = ardonis->GetAngle(pathaleon->GetPositionX(), pathaleon->GetPositionY()); + + //Turn Dawnforge and update + m_creature->SetOrientation(angle_dawnforge); + m_creature->SendCreateUpdateToPlayer(pPlayer); + //Turn Ardonis and update + ardonis->SetOrientation(angle_ardonis); + ardonis->SendCreateUpdateToPlayer(pPlayer); + + //Set them to kneel + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + ardonis->SetStandState(UNIT_STAND_STATE_KNEEL); + } + + //Set them back to each other + void Turn_to_eachother() + { + if (Unit *ardonis = Unit::GetUnit(*m_creature,ardonisGUID)) + { + Player* pPlayer = (Player*)Unit::GetUnit(*m_creature,playerGUID); + + if (!pPlayer) + return; + + angle_dawnforge = m_creature->GetAngle(ardonis->GetPositionX(), ardonis->GetPositionY()); + angle_ardonis = ardonis->GetAngle(m_creature->GetPositionX(), m_creature->GetPositionY()); + + //Turn Dawnforge and update + m_creature->SetOrientation(angle_dawnforge); + m_creature->SendCreateUpdateToPlayer(pPlayer); + //Turn Ardonis and update + ardonis->SetOrientation(angle_ardonis); + ardonis->SendCreateUpdateToPlayer(pPlayer); + + //Set state + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + ardonis->SetStandState(UNIT_STAND_STATE_STAND); + } + } + + bool CanStartEvent(Player* pPlayer) + { + if (!isEvent) + { + Creature* ardonis = GetClosestCreatureWithEntry(m_creature, uiCreatureEntry[0], 10.0f); + + if (!ardonis) + return false; + + ardonisGUID = ardonis->GetGUID(); + playerGUID = pPlayer->GetGUID(); + + isEvent = true; + + Turn_to_eachother(); + return true; + } + + debug_log("SD2: npc_commander_dawnforge event already in progress, need to wait."); + return false; + } + + void UpdateAI(const uint32 diff) + { + //Is event even running? + if (!isEvent) + return; + + //Phase timing + if (Phase_Timer >= diff) + { + Phase_Timer -= diff; + return; + } + + Unit *ardonis = Unit::GetUnit(*m_creature,ardonisGUID); + Unit *pathaleon = Unit::GetUnit(*m_creature,pathaleonGUID); + Player* pPlayer = (Player*)Unit::GetUnit(*m_creature,playerGUID); + + if (!ardonis || !pPlayer) + { + Reset(); + return; + } + + if (Phase > 4 && !pathaleon) + { + Reset(); + return; + } + + //Phase 1 Dawnforge say + switch (Phase) + { + case 1: + DoScriptText(SAY_COMMANDER_DAWNFORGE_1, m_creature); + ++Phase; + Phase_Timer = 16000; + break; + //Phase 2 Ardonis say + case 2: + DoScriptText(SAY_ARCANIST_ARDONIS_1, ardonis); + ++Phase; + Phase_Timer = 16000; + break; + //Phase 3 Dawnforge say + case 3: + DoScriptText(SAY_COMMANDER_DAWNFORGE_2, m_creature); + ++Phase; + Phase_Timer = 16000; + break; + //Phase 4 Pathaleon spawns up to phase 9 + case 4: + //spawn pathaleon's image + m_creature->SummonCreature(uiCreatureEntry[2], 2325.851563, 2799.534668, 133.084229, 6.038996, TEMPSUMMON_TIMED_DESPAWN, 90000); + ++Phase; + Phase_Timer = 500; + break; + //Phase 5 Pathaleon say + case 5: + DoScriptText(SAY_PATHALEON_CULATOR_IMAGE_1, pathaleon); + ++Phase; + Phase_Timer = 6000; + break; + //Phase 6 + case 6: + switch(PhaseSubphase) + { + //Subphase 1: Turn Dawnforge and Ardonis + case 0: + Turn_to_Pathaleons_Image(); + ++PhaseSubphase; + Phase_Timer = 8000; + break; + //Subphase 2 Dawnforge say + case 1: + DoScriptText(SAY_COMMANDER_DAWNFORGE_3, m_creature); + PhaseSubphase = 0; + ++Phase; + Phase_Timer = 8000; + break; + } + break; + //Phase 7 Pathaleons say 3 Sentence, every sentence need a subphase + case 7: + switch(PhaseSubphase) + { + //Subphase 1 + case 0: + DoScriptText(SAY_PATHALEON_CULATOR_IMAGE_2, pathaleon); + ++PhaseSubphase; + Phase_Timer = 12000; + break; + //Subphase 2 + case 1: + DoScriptText(SAY_PATHALEON_CULATOR_IMAGE_2_1, pathaleon); + ++PhaseSubphase; + Phase_Timer = 16000; + break; + //Subphase 3 + case 2: + DoScriptText(SAY_PATHALEON_CULATOR_IMAGE_2_2, pathaleon); + PhaseSubphase = 0; + ++Phase; + Phase_Timer = 10000; + break; + } + break; + //Phase 8 Dawnforge & Ardonis say + case 8: + DoScriptText(SAY_COMMANDER_DAWNFORGE_4, m_creature); + DoScriptText(SAY_ARCANIST_ARDONIS_2, ardonis); + ++Phase; + Phase_Timer = 4000; + break; + //Phase 9 Pathaleons Despawn, Reset Dawnforge & Ardonis angle + case 9: + Turn_to_eachother(); + //hide pathaleon, unit will despawn shortly + pathaleon->SetVisibility(VISIBILITY_OFF); + PhaseSubphase = 0; + ++Phase; + Phase_Timer = 3000; + break; + //Phase 10 Dawnforge say + case 10: + DoScriptText(SAY_COMMANDER_DAWNFORGE_5, m_creature); + pPlayer->AreaExploredOrEventHappens(QUEST_INFO_GATHERING); + Reset(); + break; + } + } +}; + +CreatureAI* GetAI_npc_commander_dawnforge(Creature* pCreature) +{ + return new npc_commander_dawnforgeAI(pCreature); +} + +bool AreaTrigger_at_commander_dawnforge(Player* pPlayer, AreaTriggerEntry *at) +{ + //if player lost aura or not have at all, we should not try start event. + if (!pPlayer->HasAura(SPELL_SUNFURY_DISGUISE,0)) + return false; + + if (pPlayer->isAlive() && pPlayer->GetQuestStatus(QUEST_INFO_GATHERING) == QUEST_STATUS_INCOMPLETE) + { + Creature* pCreature = GetClosestCreatureWithEntry(pPlayer, uiCreatureEntry[1], 30.0f); + + if (!pCreature) + return false; + + if (((npc_commander_dawnforgeAI*)pCreature->AI())->CanStartEvent(pPlayer)) + return true; + } + return false; +} + +/*###### +## npc_protectorate_nether_drake +######*/ + +enum +{ + QUEST_NETHER_WINGS = 10438, + ITEM_PH_DISRUPTOR = 29778, + TAXI_PATH_ID = 627 //(possibly 627+628(152->153->154->155)) +}; + +#define GOSSIP_ITEM_FLY_ULTRIS "Fly me to Ultris" + +bool GossipHello_npc_protectorate_nether_drake(Player* pPlayer, Creature* pCreature) +{ + //On Nethery Wings + if (pPlayer->GetQuestStatus(QUEST_NETHER_WINGS) == QUEST_STATUS_INCOMPLETE && pPlayer->HasItemCount(ITEM_PH_DISRUPTOR,1)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FLY_ULTRIS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_protectorate_nether_drake(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->ActivateTaxiPathTo(TAXI_PATH_ID); + } + return true; +} + +/*###### +## npc_veronia +######*/ + +bool GossipHello_npc_veronia(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + //Behind Enemy Lines + if (pPlayer->GetQuestStatus(10652) && !pPlayer->GetQuestRewardStatus(10652)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Fly me to Manaforge Coruu please", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_veronia(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF) + { + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->CastSpell(pPlayer,34905,true); //TaxiPath 606 + } + return true; +} + +/*###### +## +######*/ + +void AddSC_netherstorm() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "go_manaforge_control_console"; + newscript->pGOHello = &GOHello_go_manaforge_control_console; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_manaforge_control_console"; + newscript->GetAI = &GetAI_npc_manaforge_control_console; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_commander_dawnforge"; + newscript->GetAI = GetAI_npc_commander_dawnforge; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "at_commander_dawnforge"; + newscript->pAreaTrigger = &AreaTrigger_at_commander_dawnforge; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_protectorate_nether_drake"; + newscript->pGossipHello = &GossipHello_npc_protectorate_nether_drake; + newscript->pGossipSelect = &GossipSelect_npc_protectorate_nether_drake; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_veronia"; + newscript->pGossipHello = &GossipHello_npc_veronia; + newscript->pGossipSelect = &GossipSelect_npc_veronia; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/shadowmoon_valley.cpp b/scripts/outland/shadowmoon_valley.cpp new file mode 100644 index 000000000..d9e9aedda --- /dev/null +++ b/scripts/outland/shadowmoon_valley.cpp @@ -0,0 +1,1377 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Shadowmoon_Valley +SD%Complete: 100 +SDComment: Quest support: 10519, 10583, 10601, 10781, 10814, 10804, 10854, 11082. Vendor Drake Dealer Hurlunk. +SDCategory: Shadowmoon Valley +EndScriptData */ + +/* ContentData +mob_mature_netherwing_drake +mob_enslaved_netherwing_drake +npc_drake_dealer_hurlunk +npcs_flanis_swiftwing_and_kagrosh +npc_murkblood_overseer +npc_neltharaku +npc_karynaku +npc_oronok_tornheart +npc_wilda +mob_torloth +npc_lord_illidan_stormrage +go_crystal_prison +EndContentData */ + +#include "precompiled.h" +#include "escort_ai.h" + +/*##### +# mob_mature_netherwing_drake +#####*/ + +enum +{ + SAY_JUST_EATEN = -1000175, + + SPELL_PLACE_CARCASS = 38439, + SPELL_JUST_EATEN = 38502, + SPELL_NETHER_BREATH = 38467, + POINT_ID = 1, + + QUEST_KINDNESS = 10804, + NPC_EVENT_PINGER = 22131 +}; + +struct MANGOS_DLL_DECL mob_mature_netherwing_drakeAI : public ScriptedAI +{ + mob_mature_netherwing_drakeAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + uint64 uiPlayerGUID; + + bool bCanEat; + bool bIsEating; + + uint32 EatTimer; + uint32 CastTimer; + + void Reset() + { + uiPlayerGUID = 0; + + bCanEat = false; + bIsEating = false; + + EatTimer = 5000; + CastTimer = 5000; + } + + void SpellHit(Unit* pCaster, SpellEntry const* pSpell) + { + if (bCanEat || bIsEating) + return; + + if (pCaster->GetTypeId() == TYPEID_PLAYER && pSpell->Id == SPELL_PLACE_CARCASS && !m_creature->HasAura(SPELL_JUST_EATEN)) + { + uiPlayerGUID = pCaster->GetGUID(); + bCanEat = true; + } + } + + void MovementInform(uint32 type, uint32 id) + { + if (type != POINT_MOTION_TYPE) + return; + + if (id == POINT_ID) + { + bIsEating = true; + EatTimer = 7000; + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_ATTACKUNARMED); + } + } + + void UpdateAI(const uint32 diff) + { + if (bCanEat || bIsEating) + { + if (EatTimer < diff) + { + if (bCanEat && !bIsEating) + { + if (Unit* pUnit = Unit::GetUnit(*m_creature, uiPlayerGUID)) + { + if (GameObject* pGo = pUnit->GetGameObject(SPELL_PLACE_CARCASS)) + { + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == WAYPOINT_MOTION_TYPE) + m_creature->GetMotionMaster()->MovementExpired(); + + m_creature->GetMotionMaster()->MoveIdle(); + m_creature->StopMoving(); + + m_creature->GetMotionMaster()->MovePoint(POINT_ID, pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ()); + } + } + bCanEat = false; + } + else if (bIsEating) + { + DoCast(m_creature, SPELL_JUST_EATEN); + DoScriptText(SAY_JUST_EATEN, m_creature); + + if (Player* pPlr = (Player*)Unit::GetUnit((*m_creature), uiPlayerGUID)) + pPlr->KilledMonsterCredit(NPC_EVENT_PINGER, m_creature->GetGUID()); + + Reset(); + m_creature->GetMotionMaster()->Clear(); + } + } + else + EatTimer -= diff; + + return; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (CastTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_NETHER_BREATH); + CastTimer = 5000; + }else CastTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_mature_netherwing_drake(Creature* pCreature) +{ + return new mob_mature_netherwing_drakeAI(pCreature); +} + +/*### +# mob_enslaved_netherwing_drake +####*/ + +enum +{ + FACTION_DEFAULT = 62, + FACTION_FRIENDLY = 1840, // Not sure if this is correct, it was taken off of Mordenai. + + SPELL_HIT_FORCE_OF_NELTHARAKU = 38762, + SPELL_FORCE_OF_NELTHARAKU = 38775, + + QUEST_FORCE_OF_NELT = 10854, + NPC_DRAGONMAW_SUBJUGATOR = 21718, + NPC_ESCAPE_DUMMY = 22317, + NPC_ENSLAVED_DRAKE_KILL_CREDIT = 22316 +}; + +struct MANGOS_DLL_DECL mob_enslaved_netherwing_drakeAI : public ScriptedAI +{ + mob_enslaved_netherwing_drakeAI(Creature* pCreature) : ScriptedAI(pCreature) + { + PlayerGUID = 0; + Tapped = false; + Reset(); + } + + uint64 PlayerGUID; + uint32 FlyTimer; + bool Tapped; + + void Reset() + { + if (!Tapped) + m_creature->setFaction(FACTION_DEFAULT); + + FlyTimer = 10000; + } + + void SpellHit(Unit* caster, const SpellEntry* spell) + { + if (!caster) + return; + + if (caster->GetTypeId() == TYPEID_PLAYER && spell->Id == SPELL_HIT_FORCE_OF_NELTHARAKU && !Tapped) + { + Tapped = true; + PlayerGUID = caster->GetGUID(); + + m_creature->setFaction(FACTION_FRIENDLY); + DoCast(caster, SPELL_FORCE_OF_NELTHARAKU, true); + + if (Creature* Dragonmaw = GetClosestCreatureWithEntry(m_creature, NPC_DRAGONMAW_SUBJUGATOR, 50.0f)) + { + m_creature->AddThreat(Dragonmaw, 100000.0f); + AttackStart(Dragonmaw); + } + + HostileReference* ref = m_creature->getThreatManager().getOnlineContainer().getReferenceByTarget(caster); + if (ref) + ref->removeReference(); + } + } + + void MovementInform(uint32 type, uint32 id) + { + if (type != POINT_MOTION_TYPE) + return; + + if (id == 1) + { + if (PlayerGUID) + { + Unit* plr = Unit::GetUnit((*m_creature), PlayerGUID); + if (plr) + DoCast(plr, SPELL_FORCE_OF_NELTHARAKU, true); + + PlayerGUID = 0; + } + + m_creature->ForcedDespawn(); + } + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + { + if (Tapped) + { + if (FlyTimer <= diff) + { + Tapped = false; + if (Player* pPlayer = (Player*)Unit::GetUnit(*m_creature, PlayerGUID)) + { + if (pPlayer->GetQuestStatus(QUEST_FORCE_OF_NELT) == QUEST_STATUS_INCOMPLETE) + { + pPlayer->KilledMonsterCredit(NPC_ENSLAVED_DRAKE_KILL_CREDIT, m_creature->GetGUID()); + + /* + float x,y,z; + m_creature->GetPosition(x,y,z); + + float dx,dy,dz; + m_creature->GetRandomPoint(x, y, z, 20, dx, dy, dz); + dz += 20; // so it's in the air, not ground*/ + + float dx, dy, dz; + + if (Creature* EscapeDummy = GetClosestCreatureWithEntry(m_creature, NPC_ESCAPE_DUMMY, 30.0f)) + EscapeDummy->GetPosition(dx, dy, dz); + else + { + m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 20, dx, dy, dz); + dz += 25; + } + + m_creature->GetMotionMaster()->MovePoint(1, dx, dy, dz); + } + } + } + else + FlyTimer -= diff; + } + return; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_enslaved_netherwing_drake(Creature* pCreature) +{ + return new mob_enslaved_netherwing_drakeAI(pCreature); +} + +/*##### +# mob_dragonmaw_peon +#####*/ + +enum +{ + SPELL_SERVING_MUTTON = 40468, + NPC_DRAGONMAW_KILL_CREDIT = 23209, + QUEST_SLOW_DEATH = 11020, + POINT_DEST = 1 +}; + +struct MANGOS_DLL_DECL mob_dragonmaw_peonAI : public ScriptedAI +{ + mob_dragonmaw_peonAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + uint64 m_uiPlayerGUID; + bool m_bIsTapped; + uint32 m_uiPoisonTimer; + + void Reset() + { + m_uiPlayerGUID = 0; + m_bIsTapped = false; + m_uiPoisonTimer = 0; + } + + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + { + if (!pCaster) + return; + + if (pCaster->GetTypeId() == TYPEID_PLAYER && pSpell->Id == SPELL_SERVING_MUTTON && !m_bIsTapped) + { + m_uiPlayerGUID = pCaster->GetGUID(); + + m_bIsTapped = true; + + float fX, fY, fZ; + pCaster->GetClosePoint(fX, fY, fZ, m_creature->GetObjectSize()); + + m_creature->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + m_creature->GetMotionMaster()->MovePoint(POINT_DEST, fX, fY, fZ); + } + } + + void MovementInform(uint32 uiType, uint32 uiPointId) + { + if (uiType != POINT_MOTION_TYPE) + return; + + if (uiPointId == POINT_DEST) + { + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_EAT); + m_uiPoisonTimer = 15000; + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_uiPoisonTimer) + { + if (m_uiPoisonTimer <= uiDiff) + { + if (Player* pPlayer = (Player*)Unit::GetUnit(*m_creature, m_uiPlayerGUID)) + { + if (pPlayer->GetQuestStatus(QUEST_SLOW_DEATH) == QUEST_STATUS_INCOMPLETE) + pPlayer->KilledMonsterCredit(NPC_DRAGONMAW_KILL_CREDIT, m_creature->GetGUID()); + } + + m_uiPoisonTimer = 0; + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + else + m_uiPoisonTimer -= uiDiff; + } + } +}; + +/*###### +## npc_drake_dealer_hurlunk +######*/ + +bool GossipHello_npc_drake_dealer_hurlunk(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isVendor() && pPlayer->GetReputationRank(1015) == REP_EXALTED) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_drake_dealer_hurlunk(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_TRADE) + pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + + return true; +} + +/*###### +## npc_flanis_swiftwing_and_kagrosh +######*/ + +bool GossipHello_npcs_flanis_swiftwing_and_kagrosh(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->GetQuestStatus(10583) == QUEST_STATUS_INCOMPLETE && !pPlayer->HasItemCount(30658,1,true)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Take Flanis's Pack", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + if (pPlayer->GetQuestStatus(10601) == QUEST_STATUS_INCOMPLETE && !pPlayer->HasItemCount(30659,1,true)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Take Kagrosh's Pack", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npcs_flanis_swiftwing_and_kagrosh(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + ItemPosCountVec dest; + uint8 msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, 30658, 1, false); + if (msg == EQUIP_ERR_OK) + { + pPlayer->StoreNewItem(dest, 30658, 1, true); + pPlayer->PlayerTalkClass->ClearMenus(); + } + } + if (uiAction == GOSSIP_ACTION_INFO_DEF+2) + { + ItemPosCountVec dest; + uint8 msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, 30659, 1, false); + if (msg == EQUIP_ERR_OK) + { + pPlayer->StoreNewItem(dest, 30659, 1, true); + pPlayer->PlayerTalkClass->ClearMenus(); + } + } + return true; +} + +/*###### +## npc_murkblood_overseer +######*/ + +#define QUEST_11082 11082 + +bool GossipHello_npc_murkblood_overseer(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->GetQuestStatus(QUEST_11082) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I am here for you, overseer.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + pPlayer->SEND_GOSSIP_MENU(10940, pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_murkblood_overseer(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "How dare you question an overseer of the Dragonmaw!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + //correct id not known + pPlayer->SEND_GOSSIP_MENU(10940, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Who speaks of me? What are you talking about, broken?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); + //correct id not known + pPlayer->SEND_GOSSIP_MENU(10940, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+3: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Continue please.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); + //correct id not known + pPlayer->SEND_GOSSIP_MENU(10940, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+4: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Who are these bidders?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); + //correct id not known + pPlayer->SEND_GOSSIP_MENU(10940, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+5: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Well... yes.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6); + //correct id not known + pPlayer->SEND_GOSSIP_MENU(10940, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+6: + //correct id not known + pPlayer->SEND_GOSSIP_MENU(10940, pCreature->GetGUID()); + pCreature->CastSpell(pPlayer,41121,false); + pPlayer->AreaExploredOrEventHappens(QUEST_11082); + break; + } + return true; +} + +/*###### +## npc_neltharaku +######*/ + +bool GossipHello_npc_neltharaku(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestStatus(10814) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I am listening, dragon", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + pPlayer->SEND_GOSSIP_MENU(10613, pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_neltharaku(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "But you are dragons! How could orcs do this to you?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->SEND_GOSSIP_MENU(10614, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Your mate?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); + pPlayer->SEND_GOSSIP_MENU(10615, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+3: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I have battled many beasts, dragon. I will help you.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); + pPlayer->SEND_GOSSIP_MENU(10616, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+4: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->AreaExploredOrEventHappens(10814); + break; + } + return true; +} + +/*###### +## npc_oronok +######*/ + +#define GOSSIP_ORONOK1 "I am ready to hear your story, Oronok." +#define GOSSIP_ORONOK2 "How do I find the cipher?" +#define GOSSIP_ORONOK3 "How do you know all of this?" +#define GOSSIP_ORONOK4 "Yet what? What is it, Oronok?" +#define GOSSIP_ORONOK5 "Continue, please." +#define GOSSIP_ORONOK6 "So what of the cipher now? And your boys?" +#define GOSSIP_ORONOK7 "I will find your boys and the cipher, Oronok." + +bool GossipHello_npc_oronok_tornheart(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + if (pCreature->isVendor()) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); + + if (pPlayer->GetQuestStatus(10519) == QUEST_STATUS_INCOMPLETE) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ORONOK1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + pPlayer->SEND_GOSSIP_MENU(10312, pCreature->GetGUID()); + }else + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_oronok_tornheart(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_TRADE: + pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ORONOK2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(10313, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ORONOK3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->SEND_GOSSIP_MENU(10314, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ORONOK4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); + pPlayer->SEND_GOSSIP_MENU(10315, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+3: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ORONOK5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); + pPlayer->SEND_GOSSIP_MENU(10316, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+4: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ORONOK6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); + pPlayer->SEND_GOSSIP_MENU(10317, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+5: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ORONOK7, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6); + pPlayer->SEND_GOSSIP_MENU(10318, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+6: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->AreaExploredOrEventHappens(10519); + break; + } + return true; +} + +/*#### +# npc_karynaku +####*/ + +enum +{ + QUEST_ALLY_OF_NETHER = 10870, + TAXI_PATH_ID = 649 +}; + +bool QuestAccept_npc_karynaku(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_ALLY_OF_NETHER) + pPlayer->ActivateTaxiPathTo(TAXI_PATH_ID); + + return true; +} + +/*###### +# npc_wilda +######*/ + +enum +{ + 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, + + SPELL_CHAIN_LIGHTNING = 16006, + SPELL_EARTHBING_TOTEM = 15786, + SPELL_FROST_SHOCK = 12548, + SPELL_HEALING_WAVE = 12491, + + QUEST_ESCAPE_COILSCAR = 10451, + NPC_COILSKAR_ASSASSIN = 21044, + FACTION_EARTHEN = 1726 //guessed +}; + +//this script needs verification +struct MANGOS_DLL_DECL npc_wildaAI : public npc_escortAI +{ + npc_wildaAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } + + uint32 m_uiHealingTimer; + + void Reset() + { + m_uiHealingTimer = 0; + } + + void WaypointReached(uint32 uiPointId) + { + Player* pPlayer = GetPlayerForEscort(); + + if (!pPlayer) + return; + + switch(uiPointId) + { + case 13: + DoScriptText(SAY_WIL_PROGRESS1, m_creature, pPlayer); + DoSpawnAssassin(); + break; + case 14: + DoSpawnAssassin(); + break; + case 15: + DoScriptText(SAY_WIL_FIND_EXIT, m_creature, pPlayer); + break; + case 19: + DoRandomSay(); + break; + case 20: + DoSpawnAssassin(); + break; + case 26: + DoRandomSay(); + break; + case 27: + DoSpawnAssassin(); + break; + case 33: + DoRandomSay(); + break; + case 34: + DoSpawnAssassin(); + break; + case 37: + DoRandomSay(); + break; + case 38: + DoSpawnAssassin(); + break; + case 39: + DoScriptText(SAY_WIL_JUST_AHEAD, m_creature, pPlayer); + break; + case 43: + DoRandomSay(); + break; + case 44: + DoSpawnAssassin(); + break; + case 50: + DoScriptText(SAY_WIL_END, m_creature, pPlayer); + pPlayer->GroupEventHappens(QUEST_ESCAPE_COILSCAR, m_creature); + break; + } + } + + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_COILSKAR_ASSASSIN) + pSummoned->AI()->AttackStart(m_creature); + } + + //this is very unclear, random say without no real relevance to script/event + void DoRandomSay() + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_WIL_PROGRESS2, m_creature); break; + case 1: DoScriptText(SAY_WIL_PROGRESS4, m_creature); break; + case 2: DoScriptText(SAY_WIL_PROGRESS5, m_creature); break; + } + } + + void DoSpawnAssassin() + { + //unknown where they actually appear + float fX, fY, fZ; + m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 15.0f, fX, fY, fZ); + + m_creature->SummonCreature(NPC_COILSKAR_ASSASSIN, fX, fY, fZ, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + } + + void Aggro(Unit* pWho) + { + //don't always use + if (urand(0, 4)) + return; + + //only aggro text if not player + if (pWho->GetTypeId() != TYPEID_PLAYER) + { + //appears to be random + switch(urand(0, 3)) + { + case 0: DoScriptText(SAY_WIL_AGGRO1, m_creature, pWho); break; + case 1: DoScriptText(SAY_WIL_AGGRO2, m_creature, pWho); break; + } + } + } + + void UpdateEscortAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //TODO: add more abilities + if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 30) + { + if (m_uiHealingTimer < uiDiff) + { + DoCast(m_creature, SPELL_HEALING_WAVE); + m_uiHealingTimer = 15000; + } + else + m_uiHealingTimer -= uiDiff; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_wilda(Creature* pCreature) +{ + return new npc_wildaAI(pCreature); +} + +bool QuestAccept_npc_wilda(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_ESCAPE_COILSCAR) + { + DoScriptText(SAY_WIL_START, pCreature, pPlayer); + pCreature->setFaction(FACTION_EARTHEN); + + if (npc_wildaAI* pEscortAI = dynamic_cast(pCreature->AI())) + pEscortAI->Start(false, false, pPlayer->GetGUID(), pQuest); + } + return true; +} + +/*##### +# Quest: Battle of the Crimson Watch +#####*/ + +enum +{ + QUEST_BATTLE_OF_THE_CRIMSON_WATCH = 10781, + + EVENT_COOLDOWN = 30000, + + SAY_TORLOTH_DIALOGUE1 = -1000532, + SAY_TORLOTH_DIALOGUE2 = -1000533, + SAY_TORLOTH_DIALOGUE3 = -1000534, + SAY_ILLIDAN_DIALOGUE = -1000535, + SAY_ILLIDAN_SUMMON1 = -1000536, + SAY_ILLIDAN_SUMMON2 = -1000537, + SAY_ILLIDAN_SUMMON3 = -1000538, + SAY_ILLIDAN_SUMMON4 = -1000539, + SAY_EVENT_COMPLETED = -1000540, + + MODEL_ID_FELGUARD = 18654, + MODEL_ID_DREADLORD = 19991, + + NPC_ILLIDARI_SOLDIER = 22075, + NPC_ILLIDARI_MIND_BREAKER = 22074, + NPC_ILLIDARI_HIGHLORD = 19797, + NPC_TORLOTH_THE_MAGNIFICENT = 22076, + NPC_LORD_ILLIDAN = 22083 +}; + +enum CinematicCreature +{ + LORD_ILLIDAN = 1, + TORLOTH = 0 +}; + +const float EVENT_AREA_RADIUS = 65.0; + +struct TorlothCinematic +{ + int32 iTextId; + uint32 uiCreature; + uint32 uiTimer; +}; + +static TorlothCinematic TorlothAnim[]= +{ + {SAY_TORLOTH_DIALOGUE1, TORLOTH, 2000}, + {SAY_ILLIDAN_DIALOGUE, LORD_ILLIDAN, 7000}, + {SAY_TORLOTH_DIALOGUE2, TORLOTH, 3000}, + {NULL, TORLOTH, 2000}, // Torloth stand + {SAY_TORLOTH_DIALOGUE3, TORLOTH, 1000}, + {NULL, TORLOTH, 3000}, + {NULL, TORLOTH, NULL} +}; + +struct Location +{ + float fLocX; + float fLocY; + float fLocZ; + float fOrient; +}; + +static Location SpawnLocation[]= +{ + {-4615.8556, 1342.2532, 139.9, 1.612}, // Illidari Soldier + {-4598.9365, 1377.3182, 139.9, 3.917}, // Illidari Soldier + {-4598.4697, 1360.8999, 139.9, 2.427}, // Illidari Soldier + {-4589.3599, 1369.1061, 139.9, 3.165}, // Illidari Soldier + {-4608.3477, 1386.0076, 139.9, 4.108}, // Illidari Soldier + {-4633.1889, 1359.8033, 139.9, 0.949}, // Illidari Soldier + {-4623.5791, 1351.4574, 139.9, 0.971}, // Illidari Soldier + {-4607.2988, 1351.6099, 139.9, 2.416}, // Illidari Soldier + {-4633.7764, 1376.0417, 139.9, 5.608}, // Illidari Soldier + {-4600.2461, 1369.1240, 139.9, 3.056}, // Illidari Mind Breaker + {-4631.7808, 1367.9459, 139.9, 0.020}, // Illidari Mind Breaker + {-4600.2461, 1369.1240, 139.9, 3.056}, // Illidari Highlord + {-4631.7808, 1367.9459, 139.9, 0.020}, // Illidari Highlord + {-4615.5586, 1353.0031, 139.9, 1.540}, // Illidari Highlord + {-4616.4736, 1384.2170, 139.9, 4.971}, // Illidari Highlord + {-4627.1240, 1378.8752, 139.9, 2.544} // Torloth The Magnificent +}; + +struct WaveData +{ + uint8 uiSpawnCount; + uint8 uiUsedSpawnPoint; + uint32 uiCreatureId; + uint32 uiSpawnTimer; + uint32 uiYellTimer; + int32 iTextId; +}; + +static WaveData WavesInfo[]= +{ + // Illidari Soldier + {9, 0, NPC_ILLIDARI_SOLDIER, 10000, 7000, SAY_ILLIDAN_SUMMON1}, + // Illidari Mind Breaker + {2, 9, NPC_ILLIDARI_MIND_BREAKER, 10000, 7000, SAY_ILLIDAN_SUMMON2}, + // Illidari Highlord + {4, 11, NPC_ILLIDARI_HIGHLORD, 10000, 7000, SAY_ILLIDAN_SUMMON3}, + // Torloth The Magnificent + {1, 15, NPC_TORLOTH_THE_MAGNIFICENT, 10000, 7000, SAY_ILLIDAN_SUMMON4} +}; + +/*###### +# mob_torloth +#####*/ + +enum +{ + SPELL_CLEAVE = 15284, + SPELL_SHADOWFURY = 39082, + SPELL_SPELL_REFLECTION = 33961 +}; + +struct MANGOS_DLL_DECL mob_torlothAI : public ScriptedAI +{ + mob_torlothAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint64 m_uiLordIllidanGUID; + uint64 m_uiPlayerGUID; + + uint32 m_uiCleaveTimer; + uint32 m_uiShadowfuryTimer; + uint32 m_uiSpellReflectionTimer; + uint8 m_uiAnimationCount; + uint32 m_uiAnimationTimer; + + void Reset() + { + m_uiLordIllidanGUID = 0; + m_uiPlayerGUID = 0; + + m_uiAnimationCount = 0; + m_uiAnimationTimer = 4000; + m_uiCleaveTimer = 10000; + m_uiShadowfuryTimer = 18000; + m_uiSpellReflectionTimer = 25000; + + // make him not attackable for the time of animation + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + SetCombatMovement(false); + } + + void EnterEvadeMode() + { + m_creature->ForcedDespawn(); + } + + void HandleAnimation() + { + Creature* pCreature = m_creature; + + if (TorlothAnim[m_uiAnimationCount].uiCreature == LORD_ILLIDAN) + { + pCreature = ((Creature*)Unit::GetUnit(*m_creature, m_uiLordIllidanGUID)); + + if (!pCreature) + { + m_creature->ForcedDespawn(); + return; + } + } + + if (TorlothAnim[m_uiAnimationCount].iTextId) + DoScriptText(TorlothAnim[m_uiAnimationCount].iTextId, pCreature); + + m_uiAnimationTimer = TorlothAnim[m_uiAnimationCount].uiTimer; + + switch(m_uiAnimationCount) + { + case 0: + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + break; + case 3: + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + break; + case 5: + if (Unit* pTarget = Unit::GetUnit((*m_creature), m_uiPlayerGUID)) + { + m_creature->AddThreat(pTarget, 0.0f); + m_creature->SetFacingToObject(pTarget); + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_POINT); + } + break; + case 6: + { + if (Unit* pTarget = Unit::GetUnit((*m_creature), m_uiPlayerGUID)) + { + SetCombatMovement(true); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + float fLocX, fLocY, fLocZ; + pTarget->GetPosition(fLocX, fLocY, fLocZ); + m_creature->GetMotionMaster()->MovePoint(0, fLocX, fLocY, fLocZ); + } + break; + } + } + + ++m_uiAnimationCount; + } + + void JustDied(Unit* pKiller) + { + if (Player* pPlayer = pKiller->GetCharmerOrOwnerPlayerOrPlayerItself()) + { + pPlayer->GroupEventHappens(QUEST_BATTLE_OF_THE_CRIMSON_WATCH, m_creature); + + if (Creature* pLordIllidan = ((Creature*)Unit::GetUnit(*m_creature, m_uiLordIllidanGUID))) + { + DoScriptText(SAY_EVENT_COMPLETED, pLordIllidan, pPlayer); + pLordIllidan->AI()->EnterEvadeMode(); + } + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_uiAnimationCount < 7) + { + if (m_uiAnimationTimer < uiDiff) + HandleAnimation(); + else + m_uiAnimationTimer -= uiDiff; + } + else + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiCleaveTimer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_CLEAVE); + m_uiCleaveTimer = 15000; + } + else + m_uiCleaveTimer -= uiDiff; + + if (m_uiShadowfuryTimer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_SHADOWFURY); + m_uiShadowfuryTimer = 20000; + } + else + m_uiShadowfuryTimer -= uiDiff; + + if (m_uiSpellReflectionTimer < uiDiff) + { + DoCast(m_creature, SPELL_SPELL_REFLECTION); + m_uiSpellReflectionTimer = 30000; + } + else + m_uiSpellReflectionTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } + } +}; + +CreatureAI* GetAI_mob_torloth(Creature* pCreature) +{ + return new mob_torlothAI(pCreature); +} + +/*##### +# npc_lord_illidan_stormrage +#####*/ + +struct MANGOS_DLL_DECL npc_lord_illidan_stormrageAI : public Scripted_NoMovementAI +{ + npc_lord_illidan_stormrageAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) {Reset();} + + uint64 m_uiPlayerGUID; + uint32 m_uiWaveTimer; + uint32 m_uiAnnounceTimer; + uint32 m_uiCheckTimer; + uint8 m_uiMobCount; + uint8 m_uiWaveCount; + + bool m_bEventStarted; + bool m_bEventFailed; + bool m_bWaveAnnounced; + + void Reset() + { + m_uiPlayerGUID = 0; + + m_uiWaveTimer = 10000; + m_uiAnnounceTimer = 7000; + m_uiCheckTimer = 2000; + + m_uiMobCount = 0; + m_uiWaveCount = 0; + + m_bEventStarted = false; + m_bEventFailed = false; + m_bWaveAnnounced = false; + } + + void StartEvent(Player* pPlayer) + { + m_bEventStarted = true; + m_uiPlayerGUID = pPlayer->GetGUID(); + } + + void SummonWave() + { + uint8 uiCount = WavesInfo[m_uiWaveCount].uiSpawnCount; + uint8 uiLocIndex = WavesInfo[m_uiWaveCount].uiUsedSpawnPoint; + uint8 uiFelguardCount = 0; + uint8 uiDreadlordCount = 0; + + for(uint8 i = 0; i < uiCount; ++i) + { + float fLocX, fLocY, fLocZ, fOrient; + fLocX = SpawnLocation[uiLocIndex + i].fLocX; + fLocY = SpawnLocation[uiLocIndex + i].fLocY; + fLocZ = SpawnLocation[uiLocIndex + i].fLocZ; + fOrient = SpawnLocation[uiLocIndex + i].fOrient; + + if (Creature* pSpawn = m_creature->SummonCreature(WavesInfo[m_uiWaveCount].uiCreatureId, fLocX, fLocY, fLocZ, fOrient, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 15000)) + { + + if (m_uiWaveCount) // only in first wave + continue; + + if (!urand(0,2) && uiFelguardCount < 2) + { + pSpawn->SetDisplayId(MODEL_ID_FELGUARD); + ++uiFelguardCount; + } + else if(uiDreadlordCount < 3) + { + pSpawn->SetDisplayId(MODEL_ID_DREADLORD); + ++uiDreadlordCount; + } + else if(uiFelguardCount < 2) + { + pSpawn->SetDisplayId(MODEL_ID_FELGUARD); + ++uiFelguardCount; + } + } + } + + ++m_uiWaveCount; + m_uiWaveTimer = WavesInfo[m_uiWaveCount].uiSpawnTimer; + m_uiAnnounceTimer = WavesInfo[m_uiWaveCount].uiYellTimer; + } + + void JustSummoned(Creature* pSummoned) + { + // increment mob count + ++m_uiMobCount; + + if (!m_uiPlayerGUID) + return; + + if (pSummoned->GetEntry() == NPC_TORLOTH_THE_MAGNIFICENT) + { + if (mob_torlothAI* pTorlothAI = dynamic_cast(pSummoned->AI())) + { + pTorlothAI->m_uiLordIllidanGUID = m_creature->GetGUID(); + pTorlothAI->m_uiPlayerGUID = m_uiPlayerGUID; + } + } + else + { + if (Unit* pTarget = Unit::GetUnit((*m_creature), m_uiPlayerGUID)) + { + float fLocX, fLocY, fLocZ; + pTarget->GetPosition(fLocX, fLocY, fLocZ); + pSummoned->GetMotionMaster()->MovePoint(0, fLocX, fLocY, fLocZ); + } + } + } + + void SummonedCreatureDespawn(Creature* pCreature) + { + // decrement mob count + --m_uiMobCount; + + if (!m_uiMobCount) + m_bWaveAnnounced = false; + } + + void CheckEventFail() + { + Player* pPlayer = ((Player*)Unit::GetUnit((*m_creature), m_uiPlayerGUID)); + + if (!pPlayer) + return; + + if (Group* pEventGroup = pPlayer->GetGroup()) + { + uint8 uiDeadMemberCount = 0; + uint8 uiFailedMemberCount = 0; + + for(GroupReference* pRef = pEventGroup->GetFirstMember(); pRef != NULL; pRef = pRef->next()) + { + if (Player* pMember = pRef->getSource()) + { + if (!pMember->isAlive()) + ++uiDeadMemberCount; + + // if we already failed no need to check other things + if (pMember->GetQuestStatus(QUEST_BATTLE_OF_THE_CRIMSON_WATCH) == QUEST_STATUS_FAILED) + { + ++uiFailedMemberCount; + continue; + } + + // we left event area fail quest + if (!pMember->IsWithinDistInMap(m_creature, EVENT_AREA_RADIUS)) + { + pMember->FailQuest(QUEST_BATTLE_OF_THE_CRIMSON_WATCH); + ++uiFailedMemberCount; + } + } + } + + if (pEventGroup->GetMembersCount() == uiFailedMemberCount) + { + m_bEventFailed = true; + return; + } + + if (pEventGroup->GetMembersCount() == uiDeadMemberCount) + { + for(GroupReference* pRef = pEventGroup->GetFirstMember(); pRef != NULL; pRef = pRef->next()) + { + if (Player* pMember = pRef->getSource()) + { + if (pMember->GetQuestStatus(QUEST_BATTLE_OF_THE_CRIMSON_WATCH) == QUEST_STATUS_INCOMPLETE) + pMember->FailQuest(QUEST_BATTLE_OF_THE_CRIMSON_WATCH); + } + } + + m_bEventFailed = true; + } + } + else if (pPlayer->isDead() || !pPlayer->IsWithinDistInMap(m_creature, EVENT_AREA_RADIUS)) + { + pPlayer->FailQuest(QUEST_BATTLE_OF_THE_CRIMSON_WATCH); + m_bEventFailed = true; + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_uiPlayerGUID || !m_bEventStarted) + return; + + if (!m_uiMobCount && m_uiWaveCount < 4) + { + if (!m_bWaveAnnounced && m_uiAnnounceTimer < uiDiff) + { + DoScriptText(WavesInfo[m_uiWaveCount].iTextId, m_creature); + m_bWaveAnnounced = true; + } + else + m_uiAnnounceTimer -= uiDiff; + + if (m_uiWaveTimer < uiDiff) + SummonWave(); + else + m_uiWaveTimer -= uiDiff; + } + + if (m_uiCheckTimer < uiDiff) + { + CheckEventFail(); + m_uiCheckTimer = 2000; + } + else + m_uiCheckTimer -= uiDiff; + + if (m_bEventFailed) + Reset(); + } +}; + +CreatureAI* GetAI_npc_lord_illidan_stormrage(Creature* (pCreature)) +{ + return new npc_lord_illidan_stormrageAI(pCreature); +} + +/*##### +# go_crystal_prison : GameObject that begins the event and hands out quest +######*/ +bool GOQuestAccept_GO_crystal_prison(Player* pPlayer, GameObject* pGo, Quest const* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_BATTLE_OF_THE_CRIMSON_WATCH ) + if (Creature* pLordIllidan = GetClosestCreatureWithEntry(pPlayer, NPC_LORD_ILLIDAN, 50.0)) + if (npc_lord_illidan_stormrageAI* pIllidanAI = dynamic_cast(pLordIllidan->AI())) + if (!pIllidanAI->m_bEventStarted) + pIllidanAI->StartEvent(pPlayer); + + return true; +} + +void AddSC_shadowmoon_valley() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "mob_mature_netherwing_drake"; + newscript->GetAI = &GetAI_mob_mature_netherwing_drake; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_enslaved_netherwing_drake"; + newscript->GetAI = &GetAI_mob_enslaved_netherwing_drake; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_drake_dealer_hurlunk"; + newscript->pGossipHello = &GossipHello_npc_drake_dealer_hurlunk; + newscript->pGossipSelect = &GossipSelect_npc_drake_dealer_hurlunk; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npcs_flanis_swiftwing_and_kagrosh"; + newscript->pGossipHello = &GossipHello_npcs_flanis_swiftwing_and_kagrosh; + newscript->pGossipSelect = &GossipSelect_npcs_flanis_swiftwing_and_kagrosh; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_murkblood_overseer"; + newscript->pGossipHello = &GossipHello_npc_murkblood_overseer; + newscript->pGossipSelect = &GossipSelect_npc_murkblood_overseer; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_neltharaku"; + newscript->pGossipHello = &GossipHello_npc_neltharaku; + newscript->pGossipSelect = &GossipSelect_npc_neltharaku; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_karynaku"; + newscript->pQuestAccept = &QuestAccept_npc_karynaku; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_oronok_tornheart"; + newscript->pGossipHello = &GossipHello_npc_oronok_tornheart; + newscript->pGossipSelect = &GossipSelect_npc_oronok_tornheart; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_wilda"; + newscript->GetAI = &GetAI_npc_wilda; + newscript->pQuestAccept = &QuestAccept_npc_wilda; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_lord_illidan_stormrage"; + newscript->GetAI = &GetAI_npc_lord_illidan_stormrage; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_torloth"; + newscript->GetAI = &GetAI_mob_torloth; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "go_crystal_prison"; + newscript->pGOQuestAccept = &GOQuestAccept_GO_crystal_prison; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/shattrath_city.cpp b/scripts/outland/shattrath_city.cpp new file mode 100644 index 000000000..3cbd809a2 --- /dev/null +++ b/scripts/outland/shattrath_city.cpp @@ -0,0 +1,898 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Shattrath_City +SD%Complete: 100 +SDComment: Quest support: 10004, 10009, 10211, 10231. Flask vendors, Teleport to Caverns of Time +SDCategory: Shattrath City +EndScriptData */ + +/* ContentData +npc_dirty_larry +npc_ishanah +npc_khadgar +npc_khadgars_servant +npc_raliq_the_drunk +npc_salsalabim +npc_shattrathflaskvendors +npc_zephyr +EndContentData */ + +#include "precompiled.h" +#include "escort_ai.h" + +enum +{ + SAY_START = -1000274, + SAY_COUNT = -1000275, + SAY_COUNT_1 = -1000276, + SAY_COUNT_2 = -1000277, + SAY_ATTACK = -1000278, + SAY_GIVEUP = -1000279, + QUEST_WHAT_BOOK = 10231, + ENTRY_CREEPJACK = 19726, + ENTRY_MALONE = 19725, +}; + +#define GOSSIP_ITEM_BOOK "Ezekiel said that you might have a certain book..." + +struct MANGOS_DLL_DECL npc_dirty_larryAI : public ScriptedAI +{ + npc_dirty_larryAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_uiNpcFlags = pCreature->GetUInt32Value(UNIT_NPC_FLAGS); + m_uiCreepjackGUID = 0; + m_uiMaloneGUID = 0; + Reset(); + } + + uint32 m_uiNpcFlags; + + uint64 m_uiCreepjackGUID; + uint64 m_uiMaloneGUID; + uint64 m_uiPlayerGUID; + + bool bEvent; + bool bActiveAttack; + + uint32 m_uiSayTimer; + uint32 m_uiStep; + + void Reset() + { + m_creature->SetUInt32Value(UNIT_NPC_FLAGS, m_uiNpcFlags); + + m_uiPlayerGUID = 0; + m_uiCreepjackGUID = 0; + m_uiMaloneGUID = 0; + + bEvent = false; + bActiveAttack = false; + + m_uiSayTimer = 1000; + m_uiStep = 0; + + //expect database to have correct faction (1194) and then only unit flags set/remove needed + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_9); + } + + void SetRuffies(uint64 guid, bool bAttack, bool bReset) + { + Creature* pCreature = (Creature*)Unit::GetUnit(*m_creature, guid); + + if (!pCreature) + return; + + if (bReset) + { + if (!pCreature->IsInEvadeMode() && pCreature->isAlive()) + pCreature->AI()->EnterEvadeMode(); + + pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_9); + } + else + { + pCreature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + pCreature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_9); + + if (!pCreature->isAlive()) + return; + + pCreature->SetStandState(UNIT_STAND_STATE_STAND); + + if (bAttack) + { + if (Unit* pUnit = Unit::GetUnit(*m_creature, m_uiPlayerGUID)) + { + if (pUnit->isAlive()) + pCreature->AI()->AttackStart(pUnit); + } + } + } + } + + void StartEvent() + { + m_creature->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE); + + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_9); + + if (Creature* pCreepjack = GetClosestCreatureWithEntry(m_creature, ENTRY_CREEPJACK, 20.0f)) + m_uiCreepjackGUID = pCreepjack->GetGUID(); + + if (Creature* pMalone = GetClosestCreatureWithEntry(m_creature, ENTRY_MALONE, 20.0f)) + m_uiMaloneGUID = pMalone->GetGUID(); + + bEvent = true; + } + + uint32 NextStep(uint32 uiStep) + { + Unit* pUnit = Unit::GetUnit(*m_creature, m_uiPlayerGUID); + + if (!pUnit || pUnit->GetTypeId() != TYPEID_PLAYER) + { + SetRuffies(m_uiCreepjackGUID,false,true); + SetRuffies(m_uiMaloneGUID,false,true); + EnterEvadeMode(); + return 0; + } + + switch(uiStep) + { + case 1: + DoScriptText(SAY_START, m_creature, pUnit); + SetRuffies(m_uiCreepjackGUID,false,false); + SetRuffies(m_uiMaloneGUID,false,false); + return 3000; + case 2: DoScriptText(SAY_COUNT, m_creature, pUnit); return 5000; + case 3: DoScriptText(SAY_COUNT_1, m_creature, pUnit); return 3000; + case 4: DoScriptText(SAY_COUNT_2, m_creature, pUnit); return 3000; + case 5: DoScriptText(SAY_ATTACK, m_creature, pUnit); return 3000; + case 6: + if (!m_creature->isInCombat() && pUnit->isAlive()) + AttackStart(pUnit); + + SetRuffies(m_uiCreepjackGUID,true,false); + SetRuffies(m_uiMaloneGUID,true,false); + bActiveAttack = true; + return 2000; + default: return 0; + } + } + + void DamageTaken(Unit* pDoneBy, uint32 &damage) + { + if (damage < m_creature->GetHealth()) + return; + + //damage will kill, this is pretty much the same as 1%HP left + if (bEvent) + { + damage = 0; + + if (Player* pPlayer = (Player*)Unit::GetUnit(*m_creature, m_uiPlayerGUID)) + { + DoScriptText(SAY_GIVEUP, m_creature, pPlayer); + pPlayer->GroupEventHappens(QUEST_WHAT_BOOK, m_creature); + } + + SetRuffies(m_uiCreepjackGUID,false,true); + SetRuffies(m_uiMaloneGUID,false,true); + EnterEvadeMode(); + } + } + + void UpdateAI(const uint32 diff) + { + if (bEvent && !bActiveAttack) + { + if (m_uiSayTimer < diff) + m_uiSayTimer = NextStep(++m_uiStep); + else + m_uiSayTimer -= diff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +bool GossipHello_npc_dirty_larry(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestStatus(QUEST_WHAT_BOOK) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BOOK, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_dirty_larry(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + ((npc_dirty_larryAI*)pCreature->AI())->m_uiPlayerGUID = pPlayer->GetGUID(); + ((npc_dirty_larryAI*)pCreature->AI())->StartEvent(); + pPlayer->CLOSE_GOSSIP_MENU(); + } + + return true; +} + +CreatureAI* GetAI_npc_dirty_larry(Creature* pCreature) +{ + return new npc_dirty_larryAI(pCreature); +} + +/*###### +## npc_ishanah +######*/ + +#define GOSSIP_ISHANAH_1 "Who are the Sha'tar?" +#define GOSSIP_ISHANAH_2 "Isn't Shattrath a draenei city? Why do you allow others here?" + +bool GossipHello_npc_ishanah(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ISHANAH_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ISHANAH_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_ishanah(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + pPlayer->SEND_GOSSIP_MENU(9458, pCreature->GetGUID()); + else if (uiAction == GOSSIP_ACTION_INFO_DEF+2) + pPlayer->SEND_GOSSIP_MENU(9459, pCreature->GetGUID()); + + return true; +} + +/*###### +## npc_khadgar +######*/ + +enum +{ + QUEST_CITY_LIGHT = 10211, +}; + +#define KHADGAR_GOSSIP_1 "I've heard your name spoken only in whispers, mage. Who are you?" +#define KHADGAR_GOSSIP_2 "Go on, please." +#define KHADGAR_GOSSIP_3 "I see." +#define KHADGAR_GOSSIP_4 "What did you do then?" +#define KHADGAR_GOSSIP_5 "What happened next?" +#define KHADGAR_GOSSIP_7 "There was something else I wanted to ask you." + +bool GossipHello_npc_khadgar(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestRewardStatus(QUEST_CITY_LIGHT)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + pPlayer->SEND_GOSSIP_MENU(9243, pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_khadgar(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->SEND_GOSSIP_MENU(9876, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); + pPlayer->SEND_GOSSIP_MENU(9877, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+3: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); + pPlayer->SEND_GOSSIP_MENU(9878, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+4: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); + pPlayer->SEND_GOSSIP_MENU(9879, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+5: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6); + pPlayer->SEND_GOSSIP_MENU(9880, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+6: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_7, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+7); + pPlayer->SEND_GOSSIP_MENU(9881, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+7: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(9243, pCreature->GetGUID()); + break; + } + return true; +} + +/*###### +## npc_khadgars_servant +######*/ + +enum +{ + SAY_KHAD_START = -1000489, + SAY_KHAD_SERV_0 = -1000234, + + SAY_KHAD_SERV_1 = -1000235, + SAY_KHAD_SERV_2 = -1000236, + SAY_KHAD_SERV_3 = -1000237, + SAY_KHAD_SERV_4 = -1000238, + + SAY_KHAD_SERV_5 = -1000239, + SAY_KHAD_SERV_6 = -1000240, + SAY_KHAD_SERV_7 = -1000241, + + SAY_KHAD_SERV_8 = -1000242, + SAY_KHAD_SERV_9 = -1000243, + SAY_KHAD_SERV_10 = -1000244, + SAY_KHAD_SERV_11 = -1000245, + + SAY_KHAD_SERV_12 = -1000246, + SAY_KHAD_SERV_13 = -1000247, + + SAY_KHAD_SERV_14 = -1000248, + SAY_KHAD_SERV_15 = -1000249, + SAY_KHAD_SERV_16 = -1000250, + SAY_KHAD_SERV_17 = -1000251, + + SAY_KHAD_SERV_18 = -1000252, + SAY_KHAD_SERV_19 = -1000253, + SAY_KHAD_SERV_20 = -1000254, + SAY_KHAD_SERV_21 = -1000255, + + SAY_KHAD_INJURED = -1000490, + SAY_KHAD_MIND_YOU = -1000491, + SAY_KHAD_MIND_ALWAYS = -1000492, + SAY_KHAD_ALDOR_GREET = -1000493, + SAY_KHAD_SCRYER_GREET = -1000494, + SAY_KHAD_HAGGARD = -1000495, + + NPC_KHADGAR = 18166, + NPC_SHANIR = 18597, + NPC_IZZARD = 18622, + NPC_ADYRIA = 18596, + NPC_ANCHORITE = 19142, + NPC_ARCANIST = 18547, + NPC_HAGGARD = 19684 +}; + +struct MANGOS_DLL_DECL npc_khadgars_servantAI : public npc_escortAI +{ + npc_khadgars_servantAI(Creature* pCreature) : npc_escortAI(pCreature) + { + if (pCreature->GetOwner() && pCreature->GetOwner()->GetTypeId() == TYPEID_PLAYER) + Start(false, false, pCreature->GetOwner()->GetGUID()); + else + error_log("SD2: npc_khadgars_servant can not obtain owner or owner is not a player."); + + pCreature->SetSpeed(MOVE_WALK,1.5f); + Reset(); + } + + uint32 m_uiPointId; + uint32 m_uiTalkTimer; + uint32 m_uiTalkCount; + uint32 m_uiRandomTalkCooldown; + + void Reset() + { + m_uiTalkTimer = 2500; + m_uiTalkCount = 0; + m_uiPointId = 0; + m_uiRandomTalkCooldown = 0; + } + + void MoveInLineOfSight(Unit* pWho) + { + if (!m_uiRandomTalkCooldown && pWho->GetTypeId() == TYPEID_UNIT && m_creature->IsWithinDistInMap(pWho, 10.0f)) + { + switch(pWho->GetEntry()) + { + case NPC_HAGGARD: + if (Player* pPlayer = GetPlayerForEscort()) + DoScriptText(SAY_KHAD_HAGGARD, pWho, pPlayer); + m_uiRandomTalkCooldown = 7500; + break; + case NPC_ANCHORITE: + if (Player* pPlayer = GetPlayerForEscort()) + DoScriptText(SAY_KHAD_ALDOR_GREET, pWho, pPlayer); + m_uiRandomTalkCooldown = 7500; + break; + case NPC_ARCANIST: + if (Player* pPlayer = GetPlayerForEscort()) + DoScriptText(SAY_KHAD_SCRYER_GREET, pWho, pPlayer); + m_uiRandomTalkCooldown = 7500; + break; + } + } + } + + void WaypointStart(uint32 uiPointId) + { + if (uiPointId == 2) + DoScriptText(SAY_KHAD_SERV_0, m_creature); + } + + void WaypointReached(uint32 uiPointId) + { + m_uiPointId = uiPointId; + + switch(uiPointId) + { + case 0: + if (Creature* pKhadgar = GetClosestCreatureWithEntry(m_creature, NPC_KHADGAR, 10.0f)) + DoScriptText(SAY_KHAD_START, pKhadgar); + break; + case 5: + case 24: + case 50: + case 63: + case 74: + case 75: + SetEscortPaused(true); + break; + case 34: + if (Creature* pIzzard = GetClosestCreatureWithEntry(m_creature, NPC_IZZARD, 10.0f)) + DoScriptText(SAY_KHAD_MIND_YOU, pIzzard); + break; + case 35: + if (Creature* pAdyria = GetClosestCreatureWithEntry(m_creature, NPC_ADYRIA, 10.0f)) + DoScriptText(SAY_KHAD_MIND_ALWAYS, pAdyria); + break; + } + } + + void UpdateEscortAI(const uint32 uiDiff) + { + if (m_uiRandomTalkCooldown) + { + if (m_uiRandomTalkCooldown <= uiDiff) + m_uiRandomTalkCooldown = 0; + else + m_uiRandomTalkCooldown -= uiDiff; + } + + if (HasEscortState(STATE_ESCORT_PAUSED)) + { + if (m_uiTalkTimer <= uiDiff) + { + ++m_uiTalkCount; + m_uiTalkTimer = 7500; + + Player* pPlayer = GetPlayerForEscort(); + + if (!pPlayer) + return; + + switch(m_uiPointId) + { + case 5: //to lower city + { + switch(m_uiTalkCount) + { + case 1: + DoScriptText(SAY_KHAD_SERV_1, m_creature, pPlayer); + break; + case 2: + DoScriptText(SAY_KHAD_SERV_2, m_creature, pPlayer); + break; + case 3: + DoScriptText(SAY_KHAD_SERV_3, m_creature, pPlayer); + break; + case 4: + DoScriptText(SAY_KHAD_SERV_4, m_creature, pPlayer); + SetEscortPaused(false); + break; + } + break; + } + case 24: //in lower city + { + switch(m_uiTalkCount) + { + case 5: + if (Creature* pShanir = GetClosestCreatureWithEntry(m_creature, NPC_SHANIR, 15.0f)) + DoScriptText(SAY_KHAD_INJURED, pShanir, pPlayer); + + DoScriptText(SAY_KHAD_SERV_5, m_creature, pPlayer); + break; + case 6: + DoScriptText(SAY_KHAD_SERV_6, m_creature, pPlayer); + break; + case 7: + DoScriptText(SAY_KHAD_SERV_7, m_creature, pPlayer); + SetEscortPaused(false); + break; + } + break; + } + case 50: //outside + { + switch(m_uiTalkCount) + { + case 8: + DoScriptText(SAY_KHAD_SERV_8, m_creature, pPlayer); + break; + case 9: + DoScriptText(SAY_KHAD_SERV_9, m_creature, pPlayer); + break; + case 10: + DoScriptText(SAY_KHAD_SERV_10, m_creature, pPlayer); + break; + case 11: + DoScriptText(SAY_KHAD_SERV_11, m_creature, pPlayer); + SetEscortPaused(false); + break; + } + break; + } + case 63: //scryer + { + switch(m_uiTalkCount) + { + case 12: + DoScriptText(SAY_KHAD_SERV_12, m_creature, pPlayer); + break; + case 13: + DoScriptText(SAY_KHAD_SERV_13, m_creature, pPlayer); + SetEscortPaused(false); + break; + } + break; + } + case 74: //aldor + { + switch(m_uiTalkCount) + { + case 14: + DoScriptText(SAY_KHAD_SERV_14, m_creature, pPlayer); + break; + case 15: + DoScriptText(SAY_KHAD_SERV_15, m_creature, pPlayer); + break; + case 16: + DoScriptText(SAY_KHAD_SERV_16, m_creature, pPlayer); + break; + case 17: + DoScriptText(SAY_KHAD_SERV_17, m_creature, pPlayer); + SetEscortPaused(false); + break; + } + break; + } + case 75: //a'dal + { + switch(m_uiTalkCount) + { + case 18: + DoScriptText(SAY_KHAD_SERV_18, m_creature, pPlayer); + break; + case 19: + DoScriptText(SAY_KHAD_SERV_19, m_creature, pPlayer); + break; + case 20: + DoScriptText(SAY_KHAD_SERV_20, m_creature, pPlayer); + break; + case 21: + DoScriptText(SAY_KHAD_SERV_21, m_creature, pPlayer); + pPlayer->AreaExploredOrEventHappens(QUEST_CITY_LIGHT); + SetEscortPaused(false); + break; + } + break; + } + } + } + else + m_uiTalkTimer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_npc_khadgars_servant(Creature* pCreature) +{ + return new npc_khadgars_servantAI(pCreature); +} + +/*###### +## npc_raliq_the_drunk +######*/ + +enum +{ + SPELL_UPPERCUT = 10966, + QUEST_CRACK_SKULLS = 10009, + FACTION_HOSTILE_RD = 45 +}; + +#define GOSSIP_RALIQ "You owe Sim'salabim money. Hand them over or die!" + +struct MANGOS_DLL_DECL npc_raliq_the_drunkAI : public ScriptedAI +{ + npc_raliq_the_drunkAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_uiNormFaction = pCreature->getFaction(); + Reset(); + } + + uint32 m_uiNormFaction; + uint32 m_uiUppercut_Timer; + + void Reset() + { + m_uiUppercut_Timer = 5000; + + if (m_creature->getFaction() != m_uiNormFaction) + m_creature->setFaction(m_uiNormFaction); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiUppercut_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_UPPERCUT); + m_uiUppercut_Timer = 15000; + }else m_uiUppercut_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_raliq_the_drunk(Creature* pCreature) +{ + return new npc_raliq_the_drunkAI(pCreature); +} + +bool GossipHello_npc_raliq_the_drunk(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->GetQuestStatus(QUEST_CRACK_SKULLS) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_RALIQ, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + pPlayer->SEND_GOSSIP_MENU(9440, pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_raliq_the_drunk(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + pPlayer->CLOSE_GOSSIP_MENU(); + pCreature->setFaction(FACTION_HOSTILE_RD); + ((npc_raliq_the_drunkAI*)pCreature->AI())->AttackStart(pPlayer); + } + return true; +} + +/*###### +# npc_salsalabim +######*/ + +#define FACTION_HOSTILE_SA 90 +#define FACTION_FRIENDLY_SA 35 +#define QUEST_10004 10004 + +#define SPELL_MAGNETIC_PULL 31705 + +struct MANGOS_DLL_DECL npc_salsalabimAI : public ScriptedAI +{ + npc_salsalabimAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + uint32 MagneticPull_Timer; + + void Reset() + { + MagneticPull_Timer = 15000; + m_creature->setFaction(FACTION_FRIENDLY_SA); + } + + void DamageTaken(Unit *done_by, uint32 &damage) + { + if (done_by->GetTypeId() == TYPEID_PLAYER) + if ((m_creature->GetHealth()-damage)*100 / m_creature->GetMaxHealth() < 20) + { + ((Player*)done_by)->GroupEventHappens(QUEST_10004,m_creature); + damage = 0; + EnterEvadeMode(); + } + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (MagneticPull_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_MAGNETIC_PULL); + MagneticPull_Timer = 15000; + }else MagneticPull_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_npc_salsalabim(Creature* pCreature) +{ + return new npc_salsalabimAI(pCreature); +} + +bool GossipHello_npc_salsalabim(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->GetQuestStatus(QUEST_10004) == QUEST_STATUS_INCOMPLETE) + { + pCreature->setFaction(FACTION_HOSTILE_SA); + ((npc_salsalabimAI*)pCreature->AI())->AttackStart(pPlayer); + } + else + { + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + } + return true; +} + +/* +################################################## +Shattrath City Flask Vendors provides flasks to people exalted with 3 factions: +Haldor the Compulsive +Arcanist Xorith +Both sell special flasks for use in Outlands 25man raids only, +purchasable for one Mark of Illidari each +Purchase requires exalted reputation with Scryers/Aldor, Cenarion Expedition and The Sha'tar +################################################## +*/ + +bool GossipHello_npc_shattrathflaskvendors(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->GetEntry() == 23484) + { + // Aldor vendor + if (pCreature->isVendor() && (pPlayer->GetReputationRank(932) == REP_EXALTED) && (pPlayer->GetReputationRank(935) == REP_EXALTED) && (pPlayer->GetReputationRank(942) == REP_EXALTED)) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); + pPlayer->SEND_GOSSIP_MENU(11085, pCreature->GetGUID()); + } + else + { + pPlayer->SEND_GOSSIP_MENU(11083, pCreature->GetGUID()); + } + } + + if (pCreature->GetEntry() == 23483) + { + // Scryers vendor + if (pCreature->isVendor() && (pPlayer->GetReputationRank(934) == REP_EXALTED) && (pPlayer->GetReputationRank(935) == REP_EXALTED) && (pPlayer->GetReputationRank(942) == REP_EXALTED)) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); + pPlayer->SEND_GOSSIP_MENU(11085, pCreature->GetGUID()); + } + else + { + pPlayer->SEND_GOSSIP_MENU(11084, pCreature->GetGUID()); + } + } + + return true; +} + +bool GossipSelect_npc_shattrathflaskvendors(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_TRADE) + pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + + return true; +} + +/*###### +# npc_zephyr +######*/ + +bool GossipHello_npc_zephyr(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->GetReputationRank(989) >= REP_REVERED) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Take me to the Caverns of Time.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_zephyr(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + pPlayer->CastSpell(pPlayer,37778,false); + + return true; +} + +void AddSC_shattrath_city() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_dirty_larry"; + newscript->GetAI = &GetAI_npc_dirty_larry; + newscript->pGossipHello = &GossipHello_npc_dirty_larry; + newscript->pGossipSelect = &GossipSelect_npc_dirty_larry; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_ishanah"; + newscript->pGossipHello = &GossipHello_npc_ishanah; + newscript->pGossipSelect = &GossipSelect_npc_ishanah; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_khadgar"; + newscript->pGossipHello = &GossipHello_npc_khadgar; + newscript->pGossipSelect = &GossipSelect_npc_khadgar; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_khadgars_servant"; + newscript->GetAI = &GetAI_npc_khadgars_servant; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_raliq_the_drunk"; + newscript->GetAI = &GetAI_npc_raliq_the_drunk; + newscript->pGossipHello = &GossipHello_npc_raliq_the_drunk; + newscript->pGossipSelect = &GossipSelect_npc_raliq_the_drunk; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_salsalabim"; + newscript->GetAI = &GetAI_npc_salsalabim; + newscript->pGossipHello = &GossipHello_npc_salsalabim; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_shattrathflaskvendors"; + newscript->pGossipHello = &GossipHello_npc_shattrathflaskvendors; + newscript->pGossipSelect = &GossipSelect_npc_shattrathflaskvendors; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_zephyr"; + newscript->pGossipHello = &GossipHello_npc_zephyr; + newscript->pGossipSelect = &GossipSelect_npc_zephyr; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp b/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp new file mode 100644 index 000000000..979d98831 --- /dev/null +++ b/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp @@ -0,0 +1,515 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Arcatraz +SD%Complete: 60 +SDComment: Warden Mellichar, event controller for Skyriss event. Millhouse Manastorm. TODO: make better combatAI for Millhouse. +SDCategory: Tempest Keep, The Arcatraz +EndScriptData */ + +/* ContentData +npc_millhouse_manastorm +npc_warden_mellichar +mob_zerekethvoidzone +EndContentData */ + +#include "precompiled.h" +#include "arcatraz.h" + +/*##### +# npc_millhouse_manastorm +#####*/ + +#define SAY_INTRO_1 -1552010 +#define SAY_INTRO_2 -1552011 +#define SAY_WATER -1552012 +#define SAY_BUFFS -1552013 +#define SAY_DRINK -1552014 +#define SAY_READY -1552015 +#define SAY_KILL_1 -1552016 +#define SAY_KILL_2 -1552017 +#define SAY_PYRO -1552018 +#define SAY_ICEBLOCK -1552019 +#define SAY_LOWHP -1552020 +#define SAY_DEATH -1552021 +#define SAY_COMPLETE -1552022 + +#define SPELL_CONJURE_WATER 36879 +#define SPELL_ARCANE_INTELLECT 36880 +#define SPELL_ICE_ARMOR 36881 + +#define SPELL_ARCANE_MISSILES 33833 +#define SPELL_CONE_OF_COLD 12611 +#define SPELL_FIRE_BLAST 13341 +#define SPELL_FIREBALL 14034 +#define SPELL_FROSTBOLT 15497 +#define SPELL_PYROBLAST 33975 + +struct MANGOS_DLL_DECL npc_millhouse_manastormAI : public ScriptedAI +{ + npc_millhouse_manastormAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 EventProgress_Timer; + uint32 Phase; + bool Init; + bool LowHp; + + uint32 Pyroblast_Timer; + uint32 Fireball_Timer; + + void Reset() + { + EventProgress_Timer = 2000; + LowHp = false; + Init = false; + Phase = 1; + + Pyroblast_Timer = 1000; + Fireball_Timer = 2500; + + if (m_pInstance) + { + if (m_pInstance->GetData(TYPE_WARDEN_2) == DONE) + Init = true; + + if (m_pInstance->GetData(TYPE_HARBINGERSKYRISS) == DONE) + DoScriptText(SAY_COMPLETE, m_creature); + } + } + + void AttackStart(Unit* pWho) + { + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho, 0.0f); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + + m_creature->GetMotionMaster()->MoveChase(pWho, 25.0f); + } + } + + void KilledUnit(Unit *victim) + { + DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); + } + + void JustDied(Unit *victim) + { + DoScriptText(SAY_DEATH, m_creature); + + /*for questId 10886 (heroic mode only) + if (m_pInstance && m_pInstance->GetData(TYPE_HARBINGERSKYRISS) != DONE) + ->FailQuest();*/ + } + + void UpdateAI(const uint32 diff) + { + if (!Init) + { + if (EventProgress_Timer < diff) + { + if (Phase < 8) + { + switch(Phase) + { + case 1: + DoScriptText(SAY_INTRO_1, m_creature); + EventProgress_Timer = 18000; + break; + case 2: + DoScriptText(SAY_INTRO_2, m_creature); + EventProgress_Timer = 18000; + break; + case 3: + DoScriptText(SAY_WATER, m_creature); + DoCast(m_creature,SPELL_CONJURE_WATER); + EventProgress_Timer = 7000; + break; + case 4: + DoScriptText(SAY_BUFFS, m_creature); + DoCast(m_creature,SPELL_ICE_ARMOR); + EventProgress_Timer = 7000; + break; + case 5: + DoScriptText(SAY_DRINK, m_creature); + DoCast(m_creature,SPELL_ARCANE_INTELLECT); + EventProgress_Timer = 7000; + break; + case 6: + DoScriptText(SAY_READY, m_creature); + EventProgress_Timer = 6000; + break; + case 7: + if (m_pInstance) + m_pInstance->SetData(TYPE_WARDEN_2,DONE); + Init = true; + break; + } + ++Phase; + } + } else EventProgress_Timer -= diff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (!LowHp && ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 20)) + { + DoScriptText(SAY_LOWHP, m_creature); + LowHp = true; + } + + if (Pyroblast_Timer < diff) + { + if (m_creature->IsNonMeleeSpellCasted(false)) + return; + + DoScriptText(SAY_PYRO, m_creature); + + DoCast(m_creature->getVictim(),SPELL_PYROBLAST); + Pyroblast_Timer = 40000; + }else Pyroblast_Timer -=diff; + + if (Fireball_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_FIREBALL); + Fireball_Timer = 4000; + }else Fireball_Timer -=diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_millhouse_manastorm(Creature* pCreature) +{ + return new npc_millhouse_manastormAI(pCreature); +} + +/*##### +# npc_warden_mellichar +#####*/ + +#define YELL_INTRO1 -1552023 +#define YELL_INTRO2 -1552024 +#define YELL_RELEASE1 -1552025 +#define YELL_RELEASE2A -1552026 +#define YELL_RELEASE2B -1552027 +#define YELL_RELEASE3 -1552028 +#define YELL_RELEASE4 -1552029 +#define YELL_WELCOME -1552030 + +//phase 2(acid mobs) +#define ENTRY_TRICKSTER 20905 +#define ENTRY_PH_HUNTER 20906 +//phase 3 +#define ENTRY_MILLHOUSE 20977 +//phase 4(acid mobs) +#define ENTRY_AKKIRIS 20908 +#define ENTRY_SULFURON 20909 +//phase 5(acid mobs) +#define ENTRY_TW_DRAK 20910 +#define ENTRY_BL_DRAK 20911 +//phase 6 +#define ENTRY_SKYRISS 20912 + +//TARGET_SCRIPT +#define SPELL_TARGET_ALPHA 36856 +#define SPELL_TARGET_BETA 36854 +#define SPELL_TARGET_DELTA 36857 +#define SPELL_TARGET_GAMMA 36858 +#define SPELL_TARGET_OMEGA 36852 +#define SPELL_BUBBLE_VISUAL 36849 + +struct MANGOS_DLL_DECL npc_warden_mellicharAI : public ScriptedAI +{ + npc_warden_mellicharAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + bool IsRunning; + bool CanSpawn; + + uint32 EventProgress_Timer; + uint32 Phase; + + void Reset() + { + IsRunning = false; + CanSpawn = false; + + EventProgress_Timer = 22000; + Phase = 1; + + m_creature->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NON_ATTACKABLE); + DoCast(m_creature,SPELL_TARGET_OMEGA); + + if (m_pInstance) + m_pInstance->SetData(TYPE_HARBINGERSKYRISS,NOT_STARTED); + } + + void AttackStart(Unit* who) { } + + void MoveInLineOfSight(Unit *who) + { + if (IsRunning) + return; + + if (!m_creature->getVictim() && who->isTargetableForAttack() && (m_creature->IsHostileTo(who)) && who->isInAccessablePlaceFor(m_creature)) + { + if (!m_creature->canFly() && m_creature->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE) + return; + + if (who->GetTypeId() != TYPEID_PLAYER) + return; + + float attackRadius = m_creature->GetAttackDistance(who)/10; + if (m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->IsWithinLOSInMap(who)) + Aggro(who); + } + } + + void Aggro(Unit *who) + { + DoScriptText(YELL_INTRO1, m_creature); + DoCast(m_creature,SPELL_BUBBLE_VISUAL); + + if (m_pInstance) + { + m_pInstance->SetData(TYPE_HARBINGERSKYRISS,IN_PROGRESS); + + if (GameObject* pSphere = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_SPHERE_SHIELD))) + pSphere->SetGoState(GO_STATE_READY); + + IsRunning = true; + } + } + + bool CanProgress() + { + if (m_pInstance) + { + if (Phase == 7 && m_pInstance->GetData(TYPE_WARDEN_4) == DONE) + return true; + if (Phase == 6 && m_pInstance->GetData(TYPE_WARDEN_3) == DONE) + return true; + if (Phase == 5 && m_pInstance->GetData(TYPE_WARDEN_2) == DONE) + return true; + if (Phase == 4) + return true; + if (Phase == 3 && m_pInstance->GetData(TYPE_WARDEN_1) == DONE) + return true; + if (Phase == 2 && m_pInstance->GetData(TYPE_HARBINGERSKYRISS) == IN_PROGRESS) + return true; + if (Phase == 1 && m_pInstance->GetData(TYPE_HARBINGERSKYRISS) == IN_PROGRESS) + return true; + + return false; + } + return false; + } + + void DoPrepareForPhase() + { + if (m_pInstance) + { + m_creature->InterruptNonMeleeSpells(true); + m_creature->RemoveSpellsCausingAura(SPELL_AURA_DUMMY); + + switch(Phase) + { + case 2: + DoCast(m_creature,SPELL_TARGET_ALPHA); + m_pInstance->SetData(TYPE_WARDEN_1,IN_PROGRESS); + break; + case 3: + DoCast(m_creature,SPELL_TARGET_BETA); + m_pInstance->SetData(TYPE_WARDEN_2,IN_PROGRESS); + break; + case 5: + DoCast(m_creature,SPELL_TARGET_DELTA); + m_pInstance->SetData(TYPE_WARDEN_3,IN_PROGRESS); + break; + case 6: + DoCast(m_creature,SPELL_TARGET_GAMMA); + m_pInstance->SetData(TYPE_WARDEN_4,IN_PROGRESS); + break; + case 7: + m_pInstance->SetData(TYPE_WARDEN_5,IN_PROGRESS); + break; + } + CanSpawn = true; + } + } + + void UpdateAI(const uint32 diff) + { + if (!IsRunning) + return; + + if (EventProgress_Timer < diff) + { + if (m_pInstance) + { + if (m_pInstance->GetData(TYPE_HARBINGERSKYRISS) == FAIL) + Reset(); + } + + if (CanSpawn) + { + //continue beam omega pod, unless we are about to summon skyriss + if (Phase != 7) + DoCast(m_creature,SPELL_TARGET_OMEGA); + + switch(Phase) + { + case 2: + switch(urand(0, 1)) + { + case 0: m_creature->SummonCreature(ENTRY_TRICKSTER,478.326,-148.505,42.56,3.19,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); break; + case 1: m_creature->SummonCreature(ENTRY_PH_HUNTER,478.326,-148.505,42.56,3.19,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); break; + } + break; + case 3: + m_creature->SummonCreature(ENTRY_MILLHOUSE,413.292,-148.378,42.56,6.27,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); + break; + case 4: + DoScriptText(YELL_RELEASE2B, m_creature); + break; + case 5: + switch(urand(0, 1)) + { + case 0: m_creature->SummonCreature(ENTRY_AKKIRIS,420.179,-174.396,42.58,0.02,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); break; + case 1: m_creature->SummonCreature(ENTRY_SULFURON,420.179,-174.396,42.58,0.02,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); break; + } + break; + case 6: + switch(urand(0, 1)) + { + case 0: m_creature->SummonCreature(ENTRY_TW_DRAK,471.795,-174.58,42.58,3.06,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); break; + case 1: m_creature->SummonCreature(ENTRY_BL_DRAK,471.795,-174.58,42.58,3.06,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); break; + } + break; + case 7: + m_creature->SummonCreature(ENTRY_SKYRISS,445.763,-191.639,44.64,1.60,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); + DoScriptText(YELL_WELCOME, m_creature); + break; + } + CanSpawn = false; + ++Phase; + } + if (CanProgress()) + { + switch(Phase) + { + case 1: + DoScriptText(YELL_INTRO2, m_creature); + EventProgress_Timer = 10000; + ++Phase; + break; + case 2: + DoScriptText(YELL_RELEASE1, m_creature); + DoPrepareForPhase(); + EventProgress_Timer = 7000; + break; + case 3: + DoScriptText(YELL_RELEASE2A, m_creature); + DoPrepareForPhase(); + EventProgress_Timer = 10000; + break; + case 4: + DoPrepareForPhase(); + EventProgress_Timer = 15000; + break; + case 5: + DoScriptText(YELL_RELEASE3, m_creature); + DoPrepareForPhase(); + EventProgress_Timer = 15000; + break; + case 6: + DoScriptText(YELL_RELEASE4, m_creature); + DoPrepareForPhase(); + EventProgress_Timer = 15000; + break; + case 7: + DoPrepareForPhase(); + EventProgress_Timer = 15000; + break; + } + } + } else EventProgress_Timer -= diff; + } +}; + +CreatureAI* GetAI_npc_warden_mellichar(Creature* pCreature) +{ + return new npc_warden_mellicharAI(pCreature); +} + +/*##### +# mob_zerekethvoidzone (this script probably not needed in future -> `creature_template_addon`.`auras`='36120 0') +#####*/ + +#define SPELL_VOID_ZONE_DAMAGE 36120 + +struct MANGOS_DLL_DECL mob_zerekethvoidzoneAI : public ScriptedAI +{ + mob_zerekethvoidzoneAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + void Reset() + { + m_creature->SetUInt32Value(UNIT_NPC_FLAGS,0); + m_creature->setFaction(16); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + DoCast(m_creature,SPELL_VOID_ZONE_DAMAGE); + } +}; +CreatureAI* GetAI_mob_zerekethvoidzoneAI(Creature* pCreature) +{ + return new mob_zerekethvoidzoneAI(pCreature); +} + +void AddSC_arcatraz() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_millhouse_manastorm"; + newscript->GetAI = &GetAI_npc_millhouse_manastorm; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_warden_mellichar"; + newscript->GetAI = &GetAI_npc_warden_mellichar; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_zerekethvoidzone"; + newscript->GetAI = &GetAI_mob_zerekethvoidzoneAI; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/tempest_keep/arcatraz/arcatraz.h b/scripts/outland/tempest_keep/arcatraz/arcatraz.h new file mode 100644 index 000000000..b2e82af76 --- /dev/null +++ b/scripts/outland/tempest_keep/arcatraz/arcatraz.h @@ -0,0 +1,37 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_ARCATRAZ_H +#define DEF_ARCATRAZ_H + +enum +{ + MAX_ENCOUNTER = 9, + + GO_CORE_SECURITY_FIELD_ALPHA = 184318, //door opened when Wrath-Scryer Soccothrates dies + GO_CORE_SECURITY_FIELD_BETA = 184319, //door opened when Dalliah the Doomsayer dies + GO_SEAL_SPHERE = 184802, //shield 'protecting' mellichar + GO_POD_ALPHA = 183961, //pod first boss wave + GO_POD_BETA = 183963, //pod second boss wave + GO_POD_DELTA = 183964, //pod third boss wave + GO_POD_GAMMA = 183962, //pod fourth boss wave + GO_POD_OMEGA = 183965, //pod fifth boss wave + + NPC_MELLICHAR = 20904, //skyriss will kill this unit + + TYPE_ZEREKETH = 1, + TYPE_DALLIAH = 2, + TYPE_SOCCOTHRATES = 3, + TYPE_HARBINGERSKYRISS = 4, + TYPE_WARDEN_1 = 5, + TYPE_WARDEN_2 = 6, + TYPE_WARDEN_3 = 7, + TYPE_WARDEN_4 = 8, + TYPE_WARDEN_5 = 9, + + DATA_MELLICHAR = 10, + DATA_SPHERE_SHIELD = 11 +}; + +#endif diff --git a/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp b/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp new file mode 100644 index 000000000..9195acb9c --- /dev/null +++ b/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp @@ -0,0 +1,291 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Harbinger_Skyriss +SD%Complete: 45 +SDComment: CombatAI not fully implemented. Timers will need adjustments. Need more docs on how event fully work. Reset all event and force start over if fail at one point? +SDCategory: Tempest Keep, The Arcatraz +EndScriptData */ + +/* ContentData +boss_harbinger_skyriss +boss_harbinger_skyriss_illusion +EndContentData */ + +#include "precompiled.h" +#include "arcatraz.h" + +#define SAY_INTRO -1552000 +#define SAY_AGGRO -1552001 +#define SAY_KILL_1 -1552002 +#define SAY_KILL_2 -1552003 +#define SAY_MIND_1 -1552004 +#define SAY_MIND_2 -1552005 +#define SAY_FEAR_1 -1552006 +#define SAY_FEAR_2 -1552007 +#define SAY_IMAGE -1552008 +#define SAY_DEATH -1552009 + +#define SPELL_FEAR 39415 + +#define SPELL_MIND_REND 36924 +#define H_SPELL_MIND_REND 39017 + +#define SPELL_DOMINATION 37162 +#define H_SPELL_DOMINATION 39019 + +#define H_SPELL_MANA_BURN 39020 + +#define SPELL_66_ILLUSION 36931 //entry 21466 +#define SPELL_33_ILLUSION 36932 //entry 21467 + +struct MANGOS_DLL_DECL boss_harbinger_skyrissAI : public ScriptedAI +{ + boss_harbinger_skyrissAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Intro = false; + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + bool Intro; + bool IsImage33; + bool IsImage66; + + uint32 Intro_Phase; + uint32 Intro_Timer; + uint32 MindRend_Timer; + uint32 Fear_Timer; + uint32 Domination_Timer; + uint32 ManaBurn_Timer; + + void Reset() + { + IsImage33 = false; + IsImage66 = false; + + Intro_Phase = 1; + Intro_Timer = 5000; + MindRend_Timer = 3000; + Fear_Timer = 15000; + Domination_Timer = 30000; + ManaBurn_Timer = 25000; + } + + void MoveInLineOfSight(Unit *who) + { + if (!Intro) + return; + + ScriptedAI::MoveInLineOfSight(who); + } + + void AttackStart(Unit* who) + { + if (!Intro) + return; + + ScriptedAI::AttackStart(who); + } + + void JustDied(Unit* Killer) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_HARBINGERSKYRISS,DONE); + } + + void KilledUnit(Unit* victim) + { + //won't yell killing pet/other unit + if (victim->GetTypeId() != TYPEID_PLAYER) + return; + + DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); + } + + void JustSummoned(Creature *summoned) + { + summoned->AI()->AttackStart(m_creature->getVictim()); + } + + void DoSplit() + { + if (m_creature->IsNonMeleeSpellCasted(false)) + m_creature->InterruptNonMeleeSpells(false); + + DoScriptText(SAY_IMAGE, m_creature); + + DoCast(m_creature, IsImage33 ? SPELL_33_ILLUSION : SPELL_66_ILLUSION); + } + + void UpdateAI(const uint32 diff) + { + if (!Intro && !m_creature->isInCombat()) + { + if (!m_pInstance) + return; + + if (Intro_Timer < diff) + { + switch(Intro_Phase) + { + case 1: + DoScriptText(SAY_INTRO, m_creature); + if (GameObject* pSphere = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_SPHERE_SHIELD))) + pSphere->SetGoState(GO_STATE_ACTIVE); + ++Intro_Phase; + Intro_Timer = 25000; + break; + case 2: + DoScriptText(SAY_AGGRO, m_creature); + if (Unit *mellic = Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_MELLICHAR))) + { + //should have a better way to do this. possibly spell exist. + mellic->setDeathState(JUST_DIED); + mellic->SetHealth(0); + } + ++Intro_Phase; + Intro_Timer = 3000; + break; + case 3: + Intro = true; + break; + } + }else Intro_Timer -=diff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (!IsImage66 && ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() <= 66)) + { + IsImage66 = true; + DoSplit(); + } + + if (!IsImage33 && ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() <= 33)) + { + IsImage33 = true; + DoSplit(); + } + + if (MindRend_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1)) + DoCast(target, m_bIsHeroicMode ? H_SPELL_MIND_REND : SPELL_MIND_REND); + else + DoCast(m_creature->getVictim(), m_bIsHeroicMode ? H_SPELL_MIND_REND : SPELL_MIND_REND); + + MindRend_Timer = 8000; + }else MindRend_Timer -=diff; + + if (Fear_Timer < diff) + { + if (m_creature->IsNonMeleeSpellCasted(false)) + return; + + DoScriptText(urand(0, 1) ? SAY_FEAR_1 : SAY_FEAR_2, m_creature); + + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1)) + DoCast(target,SPELL_FEAR); + else + DoCast(m_creature->getVictim(),SPELL_FEAR); + + Fear_Timer = 25000; + }else Fear_Timer -=diff; + + if (Domination_Timer < diff) + { + if (m_creature->IsNonMeleeSpellCasted(false)) + return; + + DoScriptText(urand(0, 1) ? SAY_MIND_1 : SAY_MIND_2, m_creature); + + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1)) + DoCast(target, m_bIsHeroicMode ? H_SPELL_DOMINATION : SPELL_DOMINATION); + else + DoCast(m_creature->getVictim(), m_bIsHeroicMode ? H_SPELL_DOMINATION : SPELL_DOMINATION); + + Domination_Timer = urand(16000, 32000); + }else Domination_Timer -=diff; + + if (m_bIsHeroicMode) + { + if (ManaBurn_Timer < diff) + { + if (m_creature->IsNonMeleeSpellCasted(false)) + return; + + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1)) + DoCast(target,H_SPELL_MANA_BURN); + + ManaBurn_Timer = urand(16000, 32000); + }else ManaBurn_Timer -=diff; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_harbinger_skyriss(Creature* pCreature) +{ + return new boss_harbinger_skyrissAI(pCreature); +} + +#define SPELL_MIND_REND_IMAGE 36929 +#define H_SPELL_MIND_REND_IMAGE 39021 + +struct MANGOS_DLL_DECL boss_harbinger_skyriss_illusionAI : public ScriptedAI +{ + boss_harbinger_skyriss_illusionAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + void Reset() { } +}; + +CreatureAI* GetAI_boss_harbinger_skyriss_illusion(Creature* pCreature) +{ + return new boss_harbinger_skyriss_illusionAI(pCreature); +} + +void AddSC_boss_harbinger_skyriss() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_harbinger_skyriss"; + newscript->GetAI = &GetAI_boss_harbinger_skyriss; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_harbinger_skyriss_illusion"; + newscript->GetAI = &GetAI_boss_harbinger_skyriss_illusion; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp b/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp new file mode 100644 index 000000000..5c9bec5b1 --- /dev/null +++ b/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp @@ -0,0 +1,205 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance_Arcatraz +SD%Complete: 80 +SDComment: Mainly Harbringer Skyriss event +SDCategory: Tempest Keep, The Arcatraz +EndScriptData */ + +#include "precompiled.h" +#include "arcatraz.h" + +/* Arcatraz encounters: +1 - Zereketh the Unbound event +2 - Dalliah the Doomsayer event +3 - Wrath-Scryer Soccothrates event +4 - Harbinger Skyriss event, 5 sub-events +*/ + +struct MANGOS_DLL_DECL instance_arcatraz : public ScriptedInstance +{ + instance_arcatraz(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + + uint64 m_uiCore_Security_Field_AlphaGUID; + uint64 m_uiCore_Security_Field_BetaGUID; + uint64 m_uiPod_AlphaGUID; + uint64 m_uiPod_GammaGUID; + uint64 m_uiPod_BetaGUID; + uint64 m_uiPod_DeltaGUID; + uint64 m_uiPod_OmegaGUID; + + uint64 m_uiGoSphereGUID; + uint64 m_uiMellicharGUID; + + void Initialize() + { + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + + m_uiCore_Security_Field_AlphaGUID = 0; + m_uiCore_Security_Field_BetaGUID = 0; + m_uiPod_AlphaGUID = 0; + m_uiPod_BetaGUID = 0; + m_uiPod_DeltaGUID = 0; + m_uiPod_GammaGUID = 0; + m_uiPod_OmegaGUID = 0; + + m_uiGoSphereGUID = 0; + m_uiMellicharGUID = 0; + } + + bool IsEncounterInProgress() const + { + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + if (m_auiEncounter[i] == IN_PROGRESS) return true; + + return false; + } + + void OnObjectCreate(GameObject* pGo) + { + switch(pGo->GetEntry()) + { + case GO_CORE_SECURITY_FIELD_ALPHA: m_uiCore_Security_Field_AlphaGUID = pGo->GetGUID(); break; + case GO_CORE_SECURITY_FIELD_BETA: m_uiCore_Security_Field_BetaGUID = pGo->GetGUID(); break; + case GO_SEAL_SPHERE: m_uiGoSphereGUID = pGo->GetGUID(); break; + case GO_POD_ALPHA: m_uiPod_AlphaGUID = pGo->GetGUID(); break; + case GO_POD_BETA: m_uiPod_BetaGUID = pGo->GetGUID(); break; + case GO_POD_DELTA: m_uiPod_DeltaGUID = pGo->GetGUID(); break; + case GO_POD_GAMMA: m_uiPod_GammaGUID = pGo->GetGUID(); break; + case GO_POD_OMEGA: m_uiPod_OmegaGUID = pGo->GetGUID(); break; + } + } + + void OnCreatureCreate(Creature* pCreature) + { + if (pCreature->GetEntry() == NPC_MELLICHAR) + m_uiMellicharGUID = pCreature->GetGUID(); + } + + void SetData(uint32 uiType, uint32 uiData) + { + switch(uiType) + { + case TYPE_ZEREKETH: + m_auiEncounter[0] = uiData; + break; + + case TYPE_DALLIAH: + if (uiData == DONE) + DoUseDoorOrButton(m_uiCore_Security_Field_BetaGUID); + m_auiEncounter[1] = uiData; + break; + + case TYPE_SOCCOTHRATES: + if (uiData == DONE) + DoUseDoorOrButton(m_uiCore_Security_Field_AlphaGUID); + m_auiEncounter[2] = uiData; + break; + + case TYPE_HARBINGERSKYRISS: + if (uiData == NOT_STARTED || uiData == FAIL) + { + m_auiEncounter[4] = NOT_STARTED; + m_auiEncounter[5] = NOT_STARTED; + m_auiEncounter[6] = NOT_STARTED; + m_auiEncounter[7] = NOT_STARTED; + m_auiEncounter[8] = NOT_STARTED; + } + m_auiEncounter[3] = uiData; + break; + + case TYPE_WARDEN_1: + if (uiData == IN_PROGRESS) + DoUseDoorOrButton(m_uiPod_AlphaGUID); + m_auiEncounter[4] = uiData; + break; + + case TYPE_WARDEN_2: + if (uiData == IN_PROGRESS) + DoUseDoorOrButton(m_uiPod_BetaGUID); + m_auiEncounter[5] = uiData; + break; + + case TYPE_WARDEN_3: + if (uiData == IN_PROGRESS) + DoUseDoorOrButton(m_uiPod_DeltaGUID); + m_auiEncounter[6] = uiData; + break; + + case TYPE_WARDEN_4: + if (uiData == IN_PROGRESS) + DoUseDoorOrButton(m_uiPod_GammaGUID); + m_auiEncounter[7] = uiData; + break; + + case TYPE_WARDEN_5: + if (uiData == IN_PROGRESS) + DoUseDoorOrButton(m_uiPod_OmegaGUID); + m_auiEncounter[8] = uiData; + break; + } + } + + uint32 GetData(uint32 uiType) + { + switch(uiType) + { + case TYPE_HARBINGERSKYRISS: + return m_auiEncounter[3]; + case TYPE_WARDEN_1: + return m_auiEncounter[4]; + case TYPE_WARDEN_2: + return m_auiEncounter[5]; + case TYPE_WARDEN_3: + return m_auiEncounter[6]; + case TYPE_WARDEN_4: + return m_auiEncounter[7]; + case TYPE_WARDEN_5: + return m_auiEncounter[8]; + } + return 0; + } + + uint64 GetData64(uint32 uiData) + { + switch(uiData) + { + case DATA_MELLICHAR: + return m_uiMellicharGUID; + case DATA_SPHERE_SHIELD: + return m_uiGoSphereGUID; + } + return 0; + } +}; + +InstanceData* GetInstanceData_instance_arcatraz(Map* pMap) +{ + return new instance_arcatraz(pMap); +} + +void AddSC_instance_arcatraz() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "instance_arcatraz"; + newscript->GetInstanceData = &GetInstanceData_instance_arcatraz; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp b/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp new file mode 100644 index 000000000..2b8bdc8f6 --- /dev/null +++ b/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp @@ -0,0 +1,190 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_High_Botanist_Freywinn +SD%Complete: 90 +SDComment: some strange visual related to tree form(if aura lost before normal duration end). possible make summon&transform -process smoother(transform after delay) +SDCategory: Tempest Keep, The Botanica +EndScriptData */ + +#include "precompiled.h" + +#define SAY_AGGRO -1553000 +#define SAY_KILL_1 -1553001 +#define SAY_KILL_2 -1553002 +#define SAY_TREE_1 -1553003 +#define SAY_TREE_2 -1553004 +#define SAY_DEATH -1553005 + +#define SPELL_TRANQUILITY 34550 +#define SPELL_TREE_FORM 34551 + +#define SPELL_SUMMON_FRAYER 34557 +#define ENTRY_FRAYER 19953 + +#define SPELL_PLANT_WHITE 34759 +#define SPELL_PLANT_GREEN 34761 +#define SPELL_PLANT_BLUE 34762 +#define SPELL_PLANT_RED 34763 + +struct MANGOS_DLL_DECL boss_high_botanist_freywinnAI : public ScriptedAI +{ + boss_high_botanist_freywinnAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + std::list Adds_List; + + uint32 SummonSeedling_Timer; + uint32 TreeForm_Timer; + uint32 MoveCheck_Timer; + uint32 DeadAddsCount; + bool MoveFree; + + void Reset() + { + Adds_List.clear(); + + SummonSeedling_Timer = 6000; + TreeForm_Timer = 30000; + MoveCheck_Timer = 1000; + DeadAddsCount = 0; + MoveFree = true; + } + + void Aggro(Unit *who) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void JustSummoned(Creature *summoned) + { + if (summoned->GetEntry() == ENTRY_FRAYER) + Adds_List.push_back(summoned->GetGUID()); + } + + void DoSummonSeedling() + { + switch(urand(0, 3)) + { + case 0: DoCast(m_creature,SPELL_PLANT_WHITE); break; + case 1: DoCast(m_creature,SPELL_PLANT_GREEN); break; + case 2: DoCast(m_creature,SPELL_PLANT_BLUE); break; + case 3: DoCast(m_creature,SPELL_PLANT_RED); break; + } + } + + void KilledUnit(Unit* victim) + { + DoScriptText(urand(0, 1) ? SAY_KILL_1 : SAY_KILL_2, m_creature); + } + + void JustDied(Unit* Killer) + { + DoScriptText(SAY_DEATH, m_creature); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (TreeForm_Timer < diff) + { + DoScriptText(urand(0, 1) ? SAY_TREE_1 : SAY_TREE_2, m_creature); + + if (m_creature->IsNonMeleeSpellCasted(false)) + m_creature->InterruptNonMeleeSpells(true); + + m_creature->RemoveAllAuras(); + + DoCast(m_creature,SPELL_SUMMON_FRAYER,true); + DoCast(m_creature,SPELL_TRANQUILITY,true); + DoCast(m_creature,SPELL_TREE_FORM,true); + + m_creature->GetMotionMaster()->MoveIdle(); + MoveFree = false; + + TreeForm_Timer = 75000; + }else TreeForm_Timer -= diff; + + if (!MoveFree) + { + if (MoveCheck_Timer < diff) + { + if (!Adds_List.empty()) + { + for(std::list::iterator itr = Adds_List.begin(); itr != Adds_List.end(); ++itr) + { + if (Unit *temp = Unit::GetUnit(*m_creature,*itr)) + { + if (!temp->isAlive()) + { + Adds_List.erase(itr); + ++DeadAddsCount; + break; + } + } + } + } + + if (DeadAddsCount < 3 && TreeForm_Timer-30000 < diff) + DeadAddsCount = 3; + + if (DeadAddsCount >= 3) + { + Adds_List.clear(); + DeadAddsCount = 0; + + m_creature->InterruptNonMeleeSpells(true); + m_creature->RemoveAllAuras(); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + MoveFree = true; + } + MoveCheck_Timer = 500; + } + else MoveCheck_Timer -= diff; + + return; + } + + /*if (m_creature->HasAura(SPELL_TREE_FORM,0) || m_creature->HasAura(SPELL_TRANQUILITY,0)) + return;*/ + + //one random seedling every 5 secs, but not in tree form + if (SummonSeedling_Timer < diff) + { + DoSummonSeedling(); + SummonSeedling_Timer = 6000; + }else SummonSeedling_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_high_botanist_freywinn(Creature* pCreature) +{ + return new boss_high_botanist_freywinnAI(pCreature); +} + +void AddSC_boss_high_botanist_freywinn() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_high_botanist_freywinn"; + newscript->GetAI = &GetAI_boss_high_botanist_freywinn; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/tempest_keep/botanica/boss_laj.cpp b/scripts/outland/tempest_keep/botanica/boss_laj.cpp new file mode 100644 index 000000000..8bfd79de9 --- /dev/null +++ b/scripts/outland/tempest_keep/botanica/boss_laj.cpp @@ -0,0 +1,194 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Laj +SD%Complete: 90 +SDComment: Immunities are wrong, must be adjusted to use resistance from creature_templates. Most spells require database support. +SDCategory: Tempest Keep, The Botanica +EndScriptData */ + +#include "precompiled.h" + +#define EMOTE_SUMMON -1553006 + +#define SPELL_ALLERGIC_REACTION 34697 +#define SPELL_TELEPORT_SELF 34673 + +#define SPELL_SUMMON_LASHER_1 34681 +#define SPELL_SUMMON_FLAYER_1 34682 +#define SPELL_SUMMON_LASHER_2 34684 +#define SPELL_SUMMON_FLAYER_2 34685 +#define SPELL_SUMMON_LASHER_3 34686 +#define SPELL_SUMMON_FLAYER_4 34687 +#define SPELL_SUMMON_LASHER_4 34688 +#define SPELL_SUMMON_FLAYER_3 34690 + +#define MODEL_DEFAULT 13109 +#define MODEL_ARCANE 14213 +#define MODEL_FIRE 13110 +#define MODEL_FROST 14112 +#define MODEL_NATURE 14214 + +struct MANGOS_DLL_DECL boss_lajAI : public ScriptedAI +{ + boss_lajAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + bool CanSummon; + uint32 Teleport_Timer; + uint32 Summon_Timer; + uint32 Transform_Timer; + uint32 Allergic_Timer; + + void Reset() + { + m_creature->SetDisplayId(MODEL_DEFAULT); + m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_SHADOW, true); + m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_ARCANE, false); + m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, false); + m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, false); + m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, false); + + CanSummon = false; + Teleport_Timer = 20000; + Summon_Timer = 2500; + Transform_Timer = 30000; + Allergic_Timer = 5000; + } + + void DoTransform() + { + switch(urand(0, 4)) + { + case 0: + m_creature->SetDisplayId(MODEL_DEFAULT); + m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_SHADOW, true); + m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_ARCANE, false); + m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, false); + m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, false); + m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, false); + break; + case 1: + m_creature->SetDisplayId(MODEL_ARCANE); + m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_SHADOW, false); + m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_ARCANE, true); + m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, false); + m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, false); + m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, false); + break; + case 2: + m_creature->SetDisplayId(MODEL_FIRE); + m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_SHADOW, false); + m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_ARCANE, false); + m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, true); + m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, false); + m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, false); + break; + case 3: + m_creature->SetDisplayId(MODEL_FROST); + m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_SHADOW, false); + m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_ARCANE, false); + m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, false); + m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true); + m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, false); + break; + case 4: + m_creature->SetDisplayId(MODEL_NATURE); + m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_SHADOW, false); + m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_ARCANE, false); + m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, false); + m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, false); + m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, true); + break; + } + } + + void DoSummons() + { + switch(urand(0, 3)) + { + case 0: + DoCast(m_creature,SPELL_SUMMON_LASHER_1,true); + DoCast(m_creature,SPELL_SUMMON_FLAYER_1,true); + break; + case 1: + DoCast(m_creature,SPELL_SUMMON_LASHER_2,true); + DoCast(m_creature,SPELL_SUMMON_FLAYER_2,true); + break; + case 2: + DoCast(m_creature,SPELL_SUMMON_LASHER_3,true); + DoCast(m_creature,SPELL_SUMMON_FLAYER_3,true); + break; + case 3: + DoCast(m_creature,SPELL_SUMMON_LASHER_4,true); + DoCast(m_creature,SPELL_SUMMON_FLAYER_4,true); + break; + } + CanSummon = false; + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (CanSummon) + { + if (Summon_Timer < diff) + { + DoScriptText(EMOTE_SUMMON, m_creature); + DoSummons(); + Summon_Timer = 2500; + }else Summon_Timer -= diff; + } + + if (Allergic_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_ALLERGIC_REACTION); + Allergic_Timer = urand(25000, 40000); + }else Allergic_Timer -= diff; + + if (Teleport_Timer < diff) + { + DoCast(m_creature,SPELL_TELEPORT_SELF); + Teleport_Timer = urand(30000, 40000); + CanSummon = true; + }else Teleport_Timer -= diff; + + if (Transform_Timer < diff) + { + DoTransform(); + Transform_Timer = urand(25000, 40000); + }else Transform_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_laj(Creature* pCreature) +{ + return new boss_lajAI(pCreature); +} + +void AddSC_boss_laj() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_laj"; + newscript->GetAI = &GetAI_boss_laj; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp b/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp new file mode 100644 index 000000000..2cf6c9bf1 --- /dev/null +++ b/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp @@ -0,0 +1,241 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Warp_Splinter +SD%Complete: 80 +SDComment: Includes Sapling (need some better control with these). Spells for boss possibly need some rework. +SDCategory: Tempest Keep, The Botanica +EndScriptData */ + +#include "precompiled.h" + +/*##### +# mob_treant (Sapling) +#####*/ + +struct MANGOS_DLL_DECL mob_treantAI : public ScriptedAI +{ + mob_treantAI (Creature* pCreature) : ScriptedAI(pCreature) + { + WarpGuid = 0; + Reset(); + } + + uint64 WarpGuid; + + void Reset() + { + m_creature->SetSpeed(MOVE_RUN, 0.5f, true); + } + + void MoveInLineOfSight(Unit *who) { } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_creature->getVictim()->GetGUID() != WarpGuid) + DoMeleeAttackIfReady(); + } +}; + +/*##### +# boss_warp_splinter +#####*/ + +#define SAY_AGGRO -1553007 +#define SAY_SLAY_1 -1553008 +#define SAY_SLAY_2 -1553009 +#define SAY_SUMMON_1 -1553010 +#define SAY_SUMMON_2 -1553011 +#define SAY_DEATH -1553012 + +#define WAR_STOMP 34716 +#define SUMMON_TREANTS 34727 // DBC: 34727, 34731, 34733, 34734, 34736, 34739, 34741 (with Ancestral Life spell 34742) // won't work (guardian summon) +#define ARCANE_VOLLEY 36705 //37078, 34785 //must additional script them (because Splinter eats them after 20 sec ^) +#define SPELL_HEAL_FATHER 6262 + +#define CREATURE_TREANT 19949 +#define TREANT_SPAWN_DIST 50 //50 yards from Warp Splinter's spawn point + +float treant_pos[6][3] = +{ + {24.301233, 427.221100, -27.060635}, + {16.795492, 359.678802, -27.355425}, + {53.493484, 345.381470, -26.196192}, + {61.867096, 439.362732, -25.921030}, + {109.861877, 423.201630, -27.356019}, + {106.780159, 355.582581, -27.593357} +}; + +struct MANGOS_DLL_DECL boss_warp_splinterAI : public ScriptedAI +{ + boss_warp_splinterAI(Creature* pCreature) : ScriptedAI(pCreature) + { + Treant_Spawn_Pos_X = pCreature->GetPositionX(); + Treant_Spawn_Pos_Y = pCreature->GetPositionY(); + Reset(); + } + + uint32 War_Stomp_Timer; + uint32 Summon_Treants_Timer; + uint32 Arcane_Volley_Timer; + uint32 CheckTreantLOS_Timer; + uint32 TreantLife_Timer; + uint64 Treant_GUIDs[6]; + + float Treant_Spawn_Pos_X; + float Treant_Spawn_Pos_Y; + + void Reset() + { + War_Stomp_Timer = urand(25000, 40000); + Summon_Treants_Timer = 45000; + Arcane_Volley_Timer = urand(8000, 20000); + CheckTreantLOS_Timer = 1000; + TreantLife_Timer = 999999; + + for(int i = 0; i < 6; ++i) + Treant_GUIDs[i] = 0; + + m_creature->SetSpeed(MOVE_RUN, 0.7f, true); + } + + void Aggro(Unit *who) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void KilledUnit(Unit* victim) + { + DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); + } + + void JustDied(Unit* Killer) + { + DoScriptText(SAY_DEATH, m_creature); + } + + void SummonTreants() + { + for(int i = 0; i < 6; ++i) + { + float angle = (M_PI / 3) * i; + + float X = Treant_Spawn_Pos_X + TREANT_SPAWN_DIST * cos(angle); + float Y = Treant_Spawn_Pos_Y + TREANT_SPAWN_DIST * sin(angle); + //float Z = m_creature->GetMap()->GetHeight(X,Y, m_creature->GetPositionZ()); + //float Z = m_creature->GetPositionZ(); + float O = - m_creature->GetAngle(X,Y); + + Creature* pTreant = m_creature->SummonCreature(CREATURE_TREANT,treant_pos[i][0],treant_pos[i][1],treant_pos[i][2],O,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN,40000); + if (pTreant) + { + //pTreant->GetMotionMaster()->Mutate(new TargetedMovementGenerator(*m_creature)); + pTreant->AddThreat(m_creature, 0.1f); + Treant_GUIDs[i] = pTreant->GetGUID(); + ((mob_treantAI*)pTreant->AI())->WarpGuid = m_creature->GetGUID(); + } + } + + DoScriptText(urand(0, 1) ? SAY_SUMMON_1 : SAY_SUMMON_2, m_creature); + } + + // Warp Splinter eat treants if they are near him + void EatTreant() + { + for(int i=0; i<6; ++i) + { + Unit *pTreant = Unit::GetUnit(*m_creature, Treant_GUIDs[i]); + + if (pTreant) + { + if (m_creature->IsWithinDistInMap(pTreant, 5)) + { + // 2) Heal Warp Splinter + int32 CurrentHP_Treant = (int32)pTreant->GetHealth(); + m_creature->CastCustomSpell(m_creature,SPELL_HEAL_FATHER,&CurrentHP_Treant, 0, 0, true,0 ,0, m_creature->GetGUID()); + + // 3) Kill Treant + pTreant->DealDamage(pTreant, pTreant->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + } + } + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Check for War Stomp + if (War_Stomp_Timer < diff) + { + DoCast(m_creature->getVictim(),WAR_STOMP); + War_Stomp_Timer = urand(25000, 40000); + } else War_Stomp_Timer -= diff; + + //Check for Arcane Volley + if (Arcane_Volley_Timer < diff) + { + DoCast(m_creature->getVictim(),ARCANE_VOLLEY); + Arcane_Volley_Timer = urand(20000, 35000); + } else Arcane_Volley_Timer -= diff; + + //Check for Summon Treants + if (Summon_Treants_Timer < diff) + { + SummonTreants(); + Summon_Treants_Timer = 45000; + } else Summon_Treants_Timer -= diff; + + // I check if there is a Treant in Warp Splinter's LOS, so he can eat them + if (CheckTreantLOS_Timer < diff) + { + EatTreant(); + CheckTreantLOS_Timer = 1000; + } else CheckTreantLOS_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_warp_splinter(Creature* pCreature) +{ + return new boss_warp_splinterAI(pCreature); +} + +CreatureAI* GetAI_mob_treant(Creature* pCreature) +{ + return new mob_treantAI(pCreature); +} + +void AddSC_boss_warp_splinter() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_warp_splinter"; + newscript->GetAI = &GetAI_boss_warp_splinter; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_warp_splinter_treant"; + newscript->GetAI = &GetAI_mob_treant; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp b/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp new file mode 100644 index 000000000..a4aee7fe1 --- /dev/null +++ b/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp @@ -0,0 +1,471 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Astromancer +SD%Complete: 80 +SDComment: +SDCategory: Tempest Keep, The Eye +EndScriptData */ + +#include "precompiled.h" +#include "the_eye.h" + +enum +{ + 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, + + SPELL_ARCANE_MISSILES = 33031, + SPELL_WRATH_OF_THE_ASTROMANCER = 42783, + SPELL_BLINDING_LIGHT = 33009, + SPELL_FEAR = 34322, + SPELL_VOID_BOLT = 39329, + + SPELL_SPOTLIGHT = 25824, + NPC_ASTROMANCER_SOLARIAN_SPOTLIGHT = 18928, + + NPC_SOLARIUM_AGENT = 18925, + NPC_SOLARIUM_PRIEST = 18806, + + MODEL_HUMAN = 18239, + MODEL_VOIDWALKER = 18988, + + SPELL_SOLARIUM_GREAT_HEAL = 33387, + SPELL_SOLARIUM_HOLY_SMITE = 25054, + SPELL_SOLARIUM_ARCANE_TORRENT = 33390, + + WV_ARMOR = 31000 +}; + +const float CENTER_X = 432.909f; +const float CENTER_Y = -373.424f; +const float CENTER_Z = 17.9608f; +const float CENTER_O = 1.06421f; +const float SMALL_PORTAL_RADIUS = 12.6f; +const float LARGE_PORTAL_RADIUS = 26.0f; +const float PORTAL_Z = 17.005f; + +struct MANGOS_DLL_DECL boss_high_astromancer_solarianAI : public ScriptedAI +{ + boss_high_astromancer_solarianAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + + defaultarmor = m_creature->GetArmor(); + defaultsize = m_creature->GetFloatValue(OBJECT_FIELD_SCALE_X); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 ArcaneMissiles_Timer; + uint32 m_uiWrathOfTheAstromancer_Timer; + uint32 BlindingLight_Timer; + uint32 Fear_Timer; + uint32 VoidBolt_Timer; + uint32 Phase1_Timer; + uint32 Phase2_Timer; + uint32 Phase3_Timer; + uint32 AppearDelay_Timer; + uint32 defaultarmor; + + float defaultsize; + + bool AppearDelay; + + uint8 Phase; + + float Portals[3][3]; + + void Reset() + { + ArcaneMissiles_Timer = 2000; + m_uiWrathOfTheAstromancer_Timer = 15000; + BlindingLight_Timer = 41000; + Fear_Timer = 20000; + VoidBolt_Timer = 10000; + Phase1_Timer = 50000; + Phase2_Timer = 10000; + Phase3_Timer = 15000; + AppearDelay_Timer = 2000; + AppearDelay = false; + Phase = 1; + + if (m_pInstance) + m_pInstance->SetData(TYPE_ASTROMANCER, NOT_STARTED); + + m_creature->SetArmor(defaultarmor); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetVisibility(VISIBILITY_ON); + m_creature->SetFloatValue(OBJECT_FIELD_SCALE_X, defaultsize); + m_creature->SetDisplayId(MODEL_HUMAN); + } + + void KilledUnit(Unit *victim) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_KILL1, m_creature); break; + case 1: DoScriptText(SAY_KILL2, m_creature); break; + case 2: DoScriptText(SAY_KILL3, m_creature); break; + } + } + + void JustDied(Unit *victim) + { + m_creature->SetFloatValue(OBJECT_FIELD_SCALE_X, defaultsize); + m_creature->SetDisplayId(MODEL_HUMAN); + + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_ASTROMANCER, DONE); + } + + void Aggro(Unit *who) + { + DoScriptText(SAY_AGGRO, m_creature); + m_creature->SetInCombatWithZone(); + + if (m_pInstance) + m_pInstance->SetData(TYPE_ASTROMANCER, IN_PROGRESS); + } + + void SummonMinion(uint32 entry, float x, float y, float z) + { + Creature* Summoned = m_creature->SummonCreature(entry, x, y, z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + if (Summoned) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0)) + Summoned->AI()->AttackStart(target); + } + } + + float Portal_X(float radius) + { + if (urand(0, 1)) + radius = -radius; + + return (radius * (float)(rand()%100)/100.0f + CENTER_X); + } + + float Portal_Y(float x, float radius) + { + float z = 0.0f; + + switch(urand(0, 1)) + { + case 0: z = 1; break; + case 1: z = -1; break; + } + return (z*sqrt(radius*radius - (x - CENTER_X)*(x - CENTER_X)) + CENTER_Y); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (AppearDelay) + { + m_creature->StopMoving(); + m_creature->AttackStop(); + + if (AppearDelay_Timer < diff) + { + AppearDelay = false; + + if (Phase == 2) + { + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetVisibility(VISIBILITY_OFF); + } + + AppearDelay_Timer = 2000; + }else AppearDelay_Timer -= diff; + } + + if (Phase == 1) + { + //ArcaneMissiles_Timer + if (ArcaneMissiles_Timer < diff) + { + //Solarian casts Arcane Missiles on on random targets in the raid. + Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0); + if (!m_creature->HasInArc(2.5f, target)) + target = m_creature->getVictim(); + if (target) + DoCast(target, SPELL_ARCANE_MISSILES); + + ArcaneMissiles_Timer = 3000; + }else ArcaneMissiles_Timer -= diff; + + //Wrath of the Astromancer targets a random player which will explode after 6 secondes + if (m_uiWrathOfTheAstromancer_Timer < diff) + { + m_creature->InterruptNonMeleeSpells(false); + + //Target the tank ? + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1)) + { + if (pTarget->GetTypeId() == TYPEID_PLAYER) + { + DoCast(pTarget, SPELL_WRATH_OF_THE_ASTROMANCER); + m_uiWrathOfTheAstromancer_Timer = 25000; + } + else + m_uiWrathOfTheAstromancer_Timer = 1000; + } + }else m_uiWrathOfTheAstromancer_Timer -= diff; + + //BlindingLight_Timer + if (BlindingLight_Timer < diff) + { + //She casts this spell every 45 seconds. It is a kind of Moonfire spell, which she strikes down on the whole raid simultaneously. It hits everyone in the raid for 2280 to 2520 arcane damage. + DoCast(m_creature->getVictim(), SPELL_BLINDING_LIGHT); + BlindingLight_Timer = 45000; + }else BlindingLight_Timer -= diff; + + //Phase1_Timer + if (Phase1_Timer < diff) + { + Phase = 2; + Phase1_Timer = 50000; + + //After these 50 seconds she portals to the middle of the room and disappears, leaving 3 light portals behind. + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMap()->CreatureRelocation(m_creature, CENTER_X, CENTER_Y, CENTER_Z, CENTER_O); + + for(int i = 0; i <= 2; ++i) + { + if (!i) + { + Portals[i][0] = Portal_X(SMALL_PORTAL_RADIUS); + Portals[i][1] = Portal_Y(Portals[i][0], SMALL_PORTAL_RADIUS); + Portals[i][2] = CENTER_Z; + } + else + { + Portals[i][0] = Portal_X(LARGE_PORTAL_RADIUS); + Portals[i][1] = Portal_Y(Portals[i][0], LARGE_PORTAL_RADIUS); + Portals[i][2] = PORTAL_Z; + } + } + + if ((abs(int(Portals[2][0]) - int(Portals[1][0])) < 7) && (abs(int(Portals[2][1]) - int(Portals[1][1])) < 7)) + { + int i = 1; + if (abs(int(CENTER_X) + int(26.0f) - int(Portals[2][0])) < 7) + i = -1; + + Portals[2][0] = Portals[2][0]+7*i; + Portals[2][1] = Portal_Y(Portals[2][0], LARGE_PORTAL_RADIUS); + } + + for (int i = 0; i <= 2; ++i) + { + if (Creature* Summoned = m_creature->SummonCreature(NPC_ASTROMANCER_SOLARIAN_SPOTLIGHT, Portals[i][0], Portals[i][1], Portals[i][2], CENTER_O, TEMPSUMMON_TIMED_DESPAWN, Phase2_Timer+Phase3_Timer+AppearDelay_Timer+1700)) + { + Summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + Summoned->CastSpell(Summoned, SPELL_SPOTLIGHT, false); + } + } + + AppearDelay = true; + }else Phase1_Timer -= diff; + } + else if (Phase == 2) + { + m_creature->AttackStop(); + m_creature->StopMoving(); + + //Check Phase2_Timer + if (Phase2_Timer < diff) + { + //10 seconds after Solarian disappears, 12 mobs spawn out of the three portals. + Phase = 3; + for (int i = 0; i <= 2; ++i) + { + for (int j = 1; j <= 4; ++j) + SummonMinion(NPC_SOLARIUM_AGENT, Portals[i][0], Portals[i][1], Portals[i][2]); + } + + DoScriptText(SAY_SUMMON1, m_creature); + + Phase2_Timer = 10000; + } else Phase2_Timer -= diff; + } + else if (Phase == 3) + { + m_creature->AttackStop(); + m_creature->StopMoving(); + + //Check Phase3_Timer + if (Phase3_Timer < diff) + { + Phase = 1; + + //15 seconds later Solarian reappears out of one of the 3 portals. Simultaneously, 2 healers appear in the two other portals. + int i = irand(0, 2); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMap()->CreatureRelocation(m_creature, Portals[i][0], Portals[i][1], Portals[i][2], CENTER_O); + + for (int j = 0; j <= 2; ++j) + if (j != i) + SummonMinion(NPC_SOLARIUM_PRIEST, Portals[j][0], Portals[j][1], Portals[j][2]); + + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetVisibility(VISIBILITY_ON); + + DoScriptText(SAY_SUMMON2, m_creature); + + AppearDelay = true; + Phase3_Timer = 15000; + }else Phase3_Timer -= diff; + } + else if (Phase == 4) + { + //Fear_Timer + if (Fear_Timer < diff) + { + DoCast(m_creature, SPELL_FEAR); + Fear_Timer = 20000; + }else Fear_Timer -= diff; + + //VoidBolt_Timer + if (VoidBolt_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_VOID_BOLT); + VoidBolt_Timer = 10000; + }else VoidBolt_Timer -= diff; + } + + //When Solarian reaches 20% she will transform into a huge void walker. + if (Phase != 4 && ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth())<20)) + { + Phase = 4; + + //To make sure she wont be invisible or not selecatble + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetVisibility(VISIBILITY_ON); + + DoScriptText(SAY_VOIDA, m_creature); + DoScriptText(SAY_VOIDB, m_creature); + + m_creature->SetArmor(WV_ARMOR); + m_creature->SetDisplayId(MODEL_VOIDWALKER); + m_creature->SetFloatValue(OBJECT_FIELD_SCALE_X, defaultsize*2.5f); + } + + DoMeleeAttackIfReady(); + } +}; + +struct MANGOS_DLL_DECL mob_solarium_priestAI : public ScriptedAI +{ + mob_solarium_priestAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 healTimer; + uint32 holysmiteTimer; + uint32 aoesilenceTimer; + + void Reset() + { + healTimer = 9000; + holysmiteTimer = 1; + aoesilenceTimer = 15000; + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (healTimer < diff) + { + Unit* target = NULL; + + switch(urand(0, 1)) + { + case 0: + if (m_pInstance) + target = Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_ASTROMANCER)); + break; + case 1: + target = m_creature; + break; + } + + if (target) + { + DoCast(target,SPELL_SOLARIUM_GREAT_HEAL); + healTimer = 9000; + } + } else healTimer -= diff; + + if (holysmiteTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_SOLARIUM_HOLY_SMITE); + holysmiteTimer = 4000; + } else holysmiteTimer -= diff; + + if (aoesilenceTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_SOLARIUM_ARCANE_TORRENT); + aoesilenceTimer = 13000; + } else aoesilenceTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_solarium_priest(Creature* pCreature) +{ + return new mob_solarium_priestAI(pCreature); +} + +CreatureAI* GetAI_boss_high_astromancer_solarian(Creature* pCreature) +{ + return new boss_high_astromancer_solarianAI(pCreature); +} + +void AddSC_boss_high_astromancer_solarian() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_high_astromancer_solarian"; + newscript->GetAI = &GetAI_boss_high_astromancer_solarian; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_solarium_priest"; + newscript->GetAI = &GetAI_mob_solarium_priest; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp new file mode 100644 index 000000000..aebba9ef1 --- /dev/null +++ b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp @@ -0,0 +1,1531 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Kaelthas +SD%Complete: 60 +SDComment: SQL, weapon scripts, mind control, need correct spells(interruptible/uninterruptible), phoenix spawn location & animation, phoenix behaviour & spawn during gravity lapse +SDCategory: Tempest Keep, The Eye +EndScriptData */ + +#include "precompiled.h" +#include "the_eye.h" +#include "WorldPacket.h" + +enum +{ + //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, + + //Thaladred the Darkener speech + SAY_THALADRED_AGGRO = -1550035, + SAY_THALADRED_DEATH = -1550036, + EMOTE_THALADRED_GAZE = -1550037, + + //Lord Sanguinar speech + SAY_SANGUINAR_AGGRO = -1550038, + SAY_SANGUINAR_DEATH = -1550039, + + //Grand Astromancer Capernian speech + SAY_CAPERNIAN_AGGRO = -1550040, + SAY_CAPERNIAN_DEATH = -1550041, + + //Master Engineer Telonicus speech + SAY_TELONICUS_AGGRO = -1550042, + SAY_TELONICUS_DEATH = -1550043, + + //Phase 2 spells + SPELL_SUMMON_WEAPONS = 36976, + SPELL_SUMMON_WEAPONA = 36958, + SPELL_SUMMON_WEAPONB = 36959, + SPELL_SUMMON_WEAPONC = 36960, + SPELL_SUMMON_WEAPOND = 36961, + SPELL_SUMMON_WEAPONE = 36962, + SPELL_SUMMON_WEAPONF = 36963, + SPELL_SUMMON_WEAPONG = 36964, + SPELL_RES_VISUAL = 24171, + + //Phase 4 spells + SPELL_FIREBALL = 22088, //wrong but works with CastCustomSpell + SPELL_PYROBLAST = 36819, + SPELL_FLAME_STRIKE = 36735, // summons + SPELL_FLAME_STRIKE_DUMMY = 36730, + SPELL_ARCANE_DISRUPTION = 36834, + SPELL_SHOCK_BARRIER = 36815, + SPELL_PHOENIX_ANIMATION = 36723, + SPELL_MIND_CONTROL = 32830, + + //Phase 5 spells + SPELL_EXPLODE = 36092, + SPELL_FULLPOWER = 36187, + SPELL_KNOCKBACK = 11027, + SPELL_GRAVITY_LAPSE = 34480, + SPELL_GRAVITY_LAPSE_AURA = 39432, + SPELL_NETHER_BEAM = 35873, + + //Thaladred the Darkener spells + SPELL_PSYCHIC_BLOW = 10689, + SPELL_SILENCE = 30225, + //Lord Sanguinar spells + SPELL_BELLOWING_ROAR = 40636, + //Grand Astromancer Capernian spells + + SPELL_CAPERNIAN_FIREBALL = 36971, + SPELL_CONFLAGRATION = 37018, + SPELL_ARCANE_EXPLOSION = 36970, + //Master Engineer Telonicus spells + SPELL_BOMB = 37036, + SPELL_REMOTE_TOY = 37027, + //Nether Vapor spell + SPELL_NETHER_VAPOR = 35859, + //Phoenix spell + SPELL_BURN = 36720, + SPELL_EMBER_BLAST = 34341, + SPELL_REBIRTH = 41587, + + //Creature IDs + NPC_FLAME_STRIKE_TRIGGER = 21369, + NPC_PHOENIX = 21362, + NPC_PHOENIX_EGG = 21364, + + //Phoenix egg and phoenix model + MODEL_ID_PHOENIX = 19682, + MODEL_ID_PHOENIX_EGG = 20245, + + MAX_ADVISORS = 4 +}; + +uint32 m_auiSpellSummonWeapon[]= +{ + SPELL_SUMMON_WEAPONA, SPELL_SUMMON_WEAPONB, SPELL_SUMMON_WEAPONC, SPELL_SUMMON_WEAPOND, + SPELL_SUMMON_WEAPONE, SPELL_SUMMON_WEAPONF, SPELL_SUMMON_WEAPONG +}; + +enum Phases +{ + PHASE_0_NOT_BEGUN = 0, + PHASE_1_ADVISOR = 1, + PHASE_2_WEAPON = 2, + PHASE_3_ADVISOR_ALL = 3, + PHASE_4_SOLO = 4, + PHASE_5_GRAVITY = 5, + PHASE_6_COMPLETE = 6 +}; + +const float CAPERNIAN_DISTANCE = 20.0f; //she casts away from the target +const float KAEL_VISIBLE_RANGE = 50.0f; + +const float afGravityPos[3] = {795.0f, 0.0f, 70.0f}; + +#define TIME_PHASE_2_3 120000 +#define TIME_PHASE_3_4 180000 + +//Base AI for Advisors +struct MANGOS_DLL_DECL advisorbase_ai : public ScriptedAI +{ + advisorbase_ai(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bDoubled_Health = false; + Reset(); + } + protected: + uint32 m_uiAdvisor_Speech; + + public: + ScriptedInstance* m_pInstance; + bool m_bFakeDeath; + bool m_bDoubled_Health; + uint32 m_uiDelayRes_Timer; + uint64 m_uiDelayRes_Target; + + void Reset() + { + if (m_bDoubled_Health) + { + m_creature->SetMaxHealth(m_creature->GetMaxHealth() / 2); + m_bDoubled_Health = false; + } + + m_bFakeDeath = false; + m_uiDelayRes_Timer = 0; + m_uiDelayRes_Target = 0; + + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + //reset encounter + if (m_pInstance && (m_pInstance->GetData(TYPE_KAELTHAS_PHASE) == PHASE_1_ADVISOR || m_pInstance->GetData(TYPE_KAELTHAS_PHASE) == PHASE_3_ADVISOR_ALL)) + { + if (Creature* pKaelthas = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_KAELTHAS))) + pKaelthas->AI()->EnterEvadeMode(); + } + } + + void MoveInLineOfSight(Unit* pWho) + { + if (!pWho || m_bFakeDeath || m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + return; + + ScriptedAI::MoveInLineOfSight(pWho); + } + + void AttackStart(Unit* pWho) + { + if (!pWho || m_bFakeDeath || m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + return; + + ScriptedAI::AttackStart(pWho); + } + + void Revive(Unit* Target) + { + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + // double health for phase 3 + m_creature->SetMaxHealth(m_creature->GetMaxHealth() * 2); + m_bDoubled_Health = true; + m_creature->SetHealth(m_creature->GetMaxHealth()); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + + DoCast(m_creature, SPELL_RES_VISUAL, false); + m_uiDelayRes_Timer = 2000; + } + + void JustDied(Unit* pKiller) + { + if (m_pInstance && m_pInstance->GetData(TYPE_KAELTHAS_PHASE) == PHASE_3_ADVISOR_ALL) + DoScriptText(m_uiAdvisor_Speech, m_creature); + } + + void DamageTaken(Unit* pKiller, uint32 &damage) + { + if (damage < m_creature->GetHealth()) + return; + + //Prevent glitch if in fake death + if (m_bFakeDeath && m_pInstance && m_pInstance->GetData(TYPE_KAELTHAS_PHASE) != PHASE_0_NOT_BEGUN) + { + damage = 0; + return; + } + + //Don't really die in phase 1 & 3, only die after that + if (m_pInstance && m_pInstance->GetData(TYPE_KAELTHAS_PHASE) != PHASE_0_NOT_BEGUN) + { + //prevent death + damage = 0; + m_bFakeDeath = true; + + m_creature->InterruptNonMeleeSpells(false); + m_creature->SetHealth(0); + m_creature->StopMoving(); + m_creature->ClearComboPointHolders(); + m_creature->RemoveAllAurasOnDeath(); + m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, false); + m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->ClearAllReactives(); + m_creature->SetUInt64Value(UNIT_FIELD_TARGET,0); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveIdle(); + m_creature->SetStandState(UNIT_STAND_STATE_DEAD); + JustDied(pKiller); + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_uiDelayRes_Timer) + { + if (m_uiDelayRes_Timer <= uiDiff) + { + m_uiDelayRes_Timer = 0; + m_bFakeDeath = false; + + Unit* pTarget = Unit::GetUnit((*m_creature), m_uiDelayRes_Target); + if (!pTarget) + pTarget = m_creature->getVictim(); + + DoResetThreat(); + AttackStart(pTarget); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveChase(pTarget); + m_creature->AddThreat(pTarget, 0.0f); + } + else + m_uiDelayRes_Timer -= uiDiff; + } + } + +}; + +//Kael'thas AI +struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI +{ + boss_kaelthasAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + memset(&m_auiAdvisorGuid, 0, sizeof(m_auiAdvisorGuid)); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 m_uiFireball_Timer; + uint32 m_uiArcaneDisruption_Timer; + uint32 m_uiPhoenix_Timer; + uint32 m_uiShockBarrier_Timer; + uint32 m_uiGravityLapse_Timer; + uint32 m_uiGravityLapse_Phase; + uint32 m_uiNetherBeam_Timer; + uint32 m_uiNetherVapor_Timer; + uint32 m_uiFlameStrike_Timer; + uint32 m_uiMindControl_Timer; + uint32 m_uiPhase; + uint32 m_uiPhaseSubphase; //generic + uint32 m_uiPhase_Timer; //generic timer + uint32 m_uiPyrosCasted; + + bool m_bInGravityLapse; + bool m_bIsCastingFireball; + bool m_bChainPyros; + + uint64 m_auiAdvisorGuid[MAX_ADVISORS]; + + void Reset() + { + m_uiFireball_Timer = urand(5000, 15000); + m_uiArcaneDisruption_Timer = 45000; + m_uiMindControl_Timer = 40000; + m_uiPhoenix_Timer = 50000; + m_uiShockBarrier_Timer = 60000; + m_uiFlameStrike_Timer = 30000; + m_uiGravityLapse_Timer = 20000; + m_uiGravityLapse_Phase = 0; + m_uiNetherBeam_Timer = 8000; + m_uiNetherVapor_Timer = 10000; + m_uiPyrosCasted = 0; + m_uiPhase = 0; + m_bInGravityLapse = false; + m_bIsCastingFireball = false; + m_bChainPyros = false; + + if (m_creature->isInCombat()) + PrepareAdvisors(); + + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + + if (m_pInstance) + m_pInstance->SetData(TYPE_KAELTHAS_PHASE, PHASE_0_NOT_BEGUN); + } + + void PrepareAdvisors() + { + for(uint8 i = 0; i < MAX_ADVISORS; ++i) + { + if (Creature* pCreature = (Creature*)Unit::GetUnit((*m_creature), m_auiAdvisorGuid[i])) + { + pCreature->Respawn(); + pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + pCreature->setFaction(m_creature->getFaction()); + pCreature->AI()->EnterEvadeMode(); + } + } + } + + void StartEvent() + { + if (!m_pInstance) + return; + + m_auiAdvisorGuid[0] = m_pInstance->GetData64(DATA_THALADRED); + m_auiAdvisorGuid[1] = m_pInstance->GetData64(DATA_SANGUINAR); + m_auiAdvisorGuid[2] = m_pInstance->GetData64(DATA_CAPERNIAN); + m_auiAdvisorGuid[3] = m_pInstance->GetData64(DATA_TELONICUS); + + if (!m_auiAdvisorGuid[0] || !m_auiAdvisorGuid[1] || !m_auiAdvisorGuid[2] || !m_auiAdvisorGuid[3]) + { + error_log("SD2: Kael'Thas One or more advisors missing, Skipping Phases 1-3"); + + DoScriptText(SAY_PHASE4_INTRO2, m_creature); + + m_uiPhase = PHASE_4_SOLO; + + m_pInstance->SetData(TYPE_KAELTHAS_PHASE, PHASE_4_SOLO); + + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + AttackStart(pTarget); + + } + else + { + PrepareAdvisors(); + + DoScriptText(SAY_INTRO, m_creature); + + m_pInstance->SetData(TYPE_KAELTHAS_PHASE, PHASE_1_ADVISOR); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + + m_uiPhaseSubphase = 0; + m_uiPhase_Timer = 23000; + m_uiPhase = PHASE_1_ADVISOR; + } + } + + void MoveInLineOfSight(Unit* pWho) + { + if (!m_creature->hasUnitState(UNIT_STAT_STUNNED) && pWho->isTargetableForAttack() && + m_creature->IsHostileTo(pWho) && pWho->isInAccessablePlaceFor(m_creature)) + { + if (!m_creature->canFly() && m_creature->GetDistanceZ(pWho) > CREATURE_Z_ATTACK_RANGE) + return; + + float attackRadius = m_creature->GetAttackDistance(pWho); + if (m_creature->IsWithinDistInMap(pWho, attackRadius) && m_creature->IsWithinLOSInMap(pWho)) + { + if (!m_creature->getVictim() && m_uiPhase >= PHASE_4_SOLO) + { + pWho->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); + AttackStart(pWho); + } + else if (m_creature->GetMap()->IsDungeon()) + { + if (m_pInstance && m_pInstance->GetData(TYPE_KAELTHAS_PHASE) == PHASE_0_NOT_BEGUN && !m_uiPhase) + StartEvent(); + + pWho->SetInCombatWith(m_creature); + m_creature->AddThreat(pWho, 0.0f); + } + } + } + } + + void Aggro(Unit* pWho) + { + if (m_pInstance && m_pInstance->GetData(TYPE_KAELTHAS_PHASE) == PHASE_0_NOT_BEGUN && !m_uiPhase) + StartEvent(); + } + + void KilledUnit(Unit* pUnit) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_SLAY1, m_creature); break; + case 1: DoScriptText(SAY_SLAY2, m_creature); break; + case 2: DoScriptText(SAY_SLAY3, m_creature); break; + } + } + + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_FLAME_STRIKE_TRIGGER) + { + pSummoned->CastSpell(pSummoned, SPELL_FLAME_STRIKE_DUMMY, false, NULL, NULL, m_creature->GetGUID()); + return; + } + + if (pSummoned->GetEntry() == NPC_PHOENIX) + { + return; + } + + // if not phoenix or trigger, then it's one of the 7 weapons + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); + } + + void JustDied(Unit* pKiller) + { + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_KAELTHAS_PHASE, PHASE_6_COMPLETE); + + for(uint8 i = 0; i < MAX_ADVISORS; ++i) + { + if (Unit* pAdvisor = Unit::GetUnit((*m_creature), m_auiAdvisorGuid[i])) + pAdvisor->DealDamage(pAdvisor, pAdvisor->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + } + + void UpdateAI(const uint32 uiDiff) + { + //Phase 1 + switch (m_uiPhase) + { + case PHASE_1_ADVISOR: + { + Unit* pTarget = NULL; + Creature* pAdvisor = NULL; + + //Subphase switch + switch(m_uiPhaseSubphase) + { + //Subphase 1 - Start + case 0: + if (m_uiPhase_Timer < uiDiff) + { + DoScriptText(SAY_INTRO_THALADRED, m_creature); + + //start advisor within 7 seconds + m_uiPhase_Timer = 7000; + ++m_uiPhaseSubphase; + } + else + m_uiPhase_Timer -= uiDiff; + + break; + + //Subphase 1 - Unlock advisor + case 1: + if (m_uiPhase_Timer < uiDiff) + { + pAdvisor = (Creature*)(Unit::GetUnit((*m_creature), m_auiAdvisorGuid[0])); + + if (pAdvisor) + { + pAdvisor->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + pAdvisor->setFaction(m_creature->getFaction()); + + pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); + if (pTarget) + pAdvisor->AI()->AttackStart(pTarget); + } + + ++m_uiPhaseSubphase; + } + else + m_uiPhase_Timer -= uiDiff; + + break; + + //Subphase 2 - Start + case 2: + pAdvisor = (Creature*)(Unit::GetUnit((*m_creature), m_auiAdvisorGuid[0])); + + if (pAdvisor && (pAdvisor->getStandState() == UNIT_STAND_STATE_DEAD)) + { + DoScriptText(SAY_INTRO_SANGUINAR, m_creature); + + //start advisor within 12.5 seconds + m_uiPhase_Timer = 12500; + ++m_uiPhaseSubphase; + } + break; + + //Subphase 2 - Unlock advisor + case 3: + if (m_uiPhase_Timer < uiDiff) + { + pAdvisor = (Creature*)(Unit::GetUnit((*m_creature), m_auiAdvisorGuid[1])); + + if (pAdvisor) + { + pAdvisor->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + pAdvisor->setFaction(m_creature->getFaction()); + + pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); + if (pTarget) + pAdvisor->AI()->AttackStart(pTarget); + } + + ++m_uiPhaseSubphase; + } + else + m_uiPhase_Timer -= uiDiff; + + break; + + //Subphase 3 - Start + case 4: + pAdvisor = (Creature*)(Unit::GetUnit((*m_creature), m_auiAdvisorGuid[1])); + + if (pAdvisor && (pAdvisor->getStandState() == UNIT_STAND_STATE_DEAD)) + { + DoScriptText(SAY_INTRO_CAPERNIAN, m_creature); + + //start advisor within 7 seconds + m_uiPhase_Timer = 7000; + ++m_uiPhaseSubphase; + } + break; + + //Subphase 3 - Unlock advisor + case 5: + if (m_uiPhase_Timer < uiDiff) + { + pAdvisor = (Creature*)(Unit::GetUnit((*m_creature), m_auiAdvisorGuid[2])); + + if (pAdvisor) + { + pAdvisor->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + pAdvisor->setFaction(m_creature->getFaction()); + + pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); + if (pTarget) + pAdvisor->AI()->AttackStart(pTarget); + } + + ++m_uiPhaseSubphase; + } + else + m_uiPhase_Timer -= uiDiff; + + break; + + //Subphase 4 - Start + case 6: + pAdvisor = (Creature*)(Unit::GetUnit((*m_creature), m_auiAdvisorGuid[2])); + + if (pAdvisor && (pAdvisor->getStandState() == UNIT_STAND_STATE_DEAD)) + { + DoScriptText(SAY_INTRO_TELONICUS, m_creature); + + //start advisor within 8.4 seconds + m_uiPhase_Timer = 8400; + ++m_uiPhaseSubphase; + } + break; + + //Subphase 4 - Unlock advisor + case 7: + if (m_uiPhase_Timer < uiDiff) + { + pAdvisor = (Creature*)(Unit::GetUnit((*m_creature), m_auiAdvisorGuid[3])); + + if (pAdvisor) + { + pAdvisor->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + pAdvisor->setFaction(m_creature->getFaction()); + + pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); + if (pTarget) + pAdvisor->AI()->AttackStart(pTarget); + } + + m_uiPhase_Timer = 3000; + ++m_uiPhaseSubphase; + }else m_uiPhase_Timer -= uiDiff; + break; + + //End of phase 1 + case 8: + pAdvisor = (Creature*)(Unit::GetUnit((*m_creature), m_auiAdvisorGuid[3])); + + if (pAdvisor && (pAdvisor->getStandState() == UNIT_STAND_STATE_DEAD)) + { + m_uiPhase = PHASE_2_WEAPON; + m_pInstance->SetData(TYPE_KAELTHAS_PHASE, PHASE_2_WEAPON); + + DoScriptText(SAY_PHASE2_WEAPON, m_creature); + + m_uiPhaseSubphase = 0; + m_uiPhase_Timer = 3500; + DoCast(m_creature, SPELL_SUMMON_WEAPONS); + } + break; + } + + break; + } + + case PHASE_2_WEAPON: + { + if (m_uiPhaseSubphase == 0) + { + if (m_uiPhase_Timer < uiDiff) + { + m_uiPhaseSubphase = 1; + }else m_uiPhase_Timer -= uiDiff; + } + + //Spawn weapons + if (m_uiPhaseSubphase == 1) + { + m_creature->CastSpell(m_creature, SPELL_SUMMON_WEAPONS, false); + + uint8 uiMaxWeapon = sizeof(m_auiSpellSummonWeapon)/sizeof(uint32); + + for (uint32 i = 0; i < uiMaxWeapon; ++i) + m_creature->CastSpell(m_creature,m_auiSpellSummonWeapon[i],true); + + m_uiPhaseSubphase = 2; + m_uiPhase_Timer = TIME_PHASE_2_3; + } + + if (m_uiPhaseSubphase == 2) + { + if (m_uiPhase_Timer < uiDiff) + { + DoScriptText(SAY_PHASE3_ADVANCE, m_creature); + m_pInstance->SetData(TYPE_KAELTHAS_PHASE, PHASE_3_ADVISOR_ALL); + m_uiPhase = PHASE_3_ADVISOR_ALL; + m_uiPhaseSubphase = 0; + } + else + m_uiPhase_Timer -= uiDiff; + } + + break; + } + + case PHASE_3_ADVISOR_ALL: + { + if (m_uiPhaseSubphase == 0) + { + //Respawn advisors + Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); + + Creature* pAdvisor; + for (uint32 i = 0; i < MAX_ADVISORS; ++i) + { + pAdvisor = (Creature*)(Unit::GetUnit((*m_creature), m_auiAdvisorGuid[i])); + + if (!pAdvisor) + error_log("SD2: Kael'Thas Advisor %u does not exist. Possibly despawned? Incorrectly Killed?", i); + else + ((advisorbase_ai*)pAdvisor->AI())->Revive(pTarget); + } + + m_uiPhaseSubphase = 1; + m_uiPhase_Timer = TIME_PHASE_3_4; + } + + if (m_uiPhase_Timer < uiDiff) + { + DoScriptText(SAY_PHASE4_INTRO2, m_creature); + m_uiPhase = PHASE_4_SOLO; + + m_pInstance->SetData(TYPE_KAELTHAS_PHASE, PHASE_4_SOLO); + + // Sometimes people can collect Aggro in Phase 1-3. Reset threat before releasing Kael. + DoResetThreat(); + + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + AttackStart(pTarget); + + m_uiPhase_Timer = 30000; + } + else + m_uiPhase_Timer -= uiDiff; + + break; + } + + case PHASE_4_SOLO: + case 5: + case 6: + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //m_uiFireball_Timer + if (!m_bInGravityLapse && !m_bChainPyros && m_uiPhase != 5) + { + if (m_uiFireball_Timer < uiDiff) + { + if (!m_bIsCastingFireball) + { + if (!m_creature->IsNonMeleeSpellCasted(false)) + { + //interruptable + m_creature->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_INTERRUPT_CAST, false); + int32 uiDmg = irand(20000, 25000); + m_creature->CastCustomSpell(m_creature->getVictim(), SPELL_FIREBALL, &uiDmg, 0, 0, false); + m_bIsCastingFireball = true; + m_uiFireball_Timer = 2500; + } + } + else + { + //apply resistance + m_creature->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_INTERRUPT_CAST, true); + m_bIsCastingFireball = false; + m_uiFireball_Timer = urand(5000, 15000); + } + } + else + m_uiFireball_Timer -= uiDiff; + + //m_uiArcaneDisruption_Timer + if (m_uiArcaneDisruption_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_ARCANE_DISRUPTION, true); + m_uiArcaneDisruption_Timer = 60000; + } + else + m_uiArcaneDisruption_Timer -= uiDiff; + + //m_uiFlameStrike_Timer + if (m_uiFlameStrike_Timer < uiDiff) + { + if (Unit* pUnit = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pUnit, SPELL_FLAME_STRIKE); + + m_uiFlameStrike_Timer = 30000; + } + else + m_uiFlameStrike_Timer -= uiDiff; + + if (m_uiMindControl_Timer < uiDiff) + { + if (m_creature->getThreatManager().getThreatList().size() >= 2) + for (uint32 i = 0; i < 3; ++i) + { + debug_log("SD2: Kael'Thas mind control not supported."); + //DoCast(pUnit, SPELL_MIND_CONTROL); + } + + m_uiMindControl_Timer = 60000; + } + else + m_uiMindControl_Timer -= uiDiff; + } + + //m_uiPhoenix_Timer + if (m_uiPhoenix_Timer < uiDiff) + { + DoCast(m_creature, SPELL_PHOENIX_ANIMATION); + + if (Creature* pPhoenix = m_creature->SummonCreature(NPC_PHOENIX, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45000)) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + pPhoenix->AI()->AttackStart(pTarget); + } + else + error_log("SD2: Kael'Thas Phoenix could not be spawned"); + + DoScriptText(urand(0, 1) ? SAY_SUMMON_PHOENIX1 : SAY_SUMMON_PHOENIX2, m_creature); + + m_uiPhoenix_Timer = 60000; + } + else + m_uiPhoenix_Timer -= uiDiff; + + //Phase 4 specific spells + if (m_uiPhase == PHASE_4_SOLO) + { + if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 50) + { + m_pInstance->SetData(TYPE_KAELTHAS_PHASE, PHASE_5_GRAVITY); + m_uiPhase = PHASE_5_GRAVITY; + m_uiPhase_Timer = 10000; + + DoScriptText(SAY_PHASE5_NUTS, m_creature); + + m_creature->StopMoving(); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveIdle(); + + m_creature->GetMap()->CreatureRelocation(m_creature, afGravityPos[0], afGravityPos[1], afGravityPos[2], 0.0f); + m_creature->SendMonsterMove(afGravityPos[0], afGravityPos[1], afGravityPos[2], 0, MONSTER_MOVE_NONE, 0); + + m_creature->InterruptNonMeleeSpells(false); + DoCast(m_creature, SPELL_FULLPOWER); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + } + + //m_uiShockBarrier_Timer + if (m_uiShockBarrier_Timer < uiDiff) + { + DoCast(m_creature, SPELL_SHOCK_BARRIER); + m_bChainPyros = true; + m_uiPyrosCasted = 0; + m_uiShockBarrier_Timer = 60000; + } + else + m_uiShockBarrier_Timer -= uiDiff; + + //Chain Pyros (3 of them max) + if (m_bChainPyros && !m_creature->IsNonMeleeSpellCasted(false)) + { + if (m_uiPyrosCasted < 3) + { + DoCast(m_creature->getVictim(), SPELL_PYROBLAST); + ++m_uiPyrosCasted; + } + else + { + m_bChainPyros = false; + m_uiFireball_Timer = 2500; + m_uiArcaneDisruption_Timer = 60000; + } + } + } + + if (m_uiPhase == PHASE_5_GRAVITY) + { + if (m_uiPhase_Timer < uiDiff) + { + m_creature->InterruptNonMeleeSpells(false); + m_creature->RemoveAurasDueToSpell(SPELL_FULLPOWER); + + DoCast(m_creature, SPELL_EXPLODE); + + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_uiPhase = 6; + AttackStart(m_creature->getVictim()); + } + else + m_uiPhase_Timer -= uiDiff; + } + + //Phase 5 + if (m_uiPhase == 6) + { + + //m_uiGravityLapse_Timer + if (m_uiGravityLapse_Timer < uiDiff) + { + std::list::iterator i = m_creature->getThreatManager().getThreatList().begin(); + switch(m_uiGravityLapse_Phase) + { + case 0: + m_creature->StopMoving(); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveIdle(); + m_creature->GetMap()->CreatureRelocation(m_creature, afGravityPos[0], afGravityPos[1], afGravityPos[2], 0.0f); + m_creature->SendMonsterMove(afGravityPos[0], afGravityPos[1], afGravityPos[2], 0, MONSTER_MOVE_NONE, 0); + + // 1) Kael'thas will portal the whole raid right into his body + for (i = m_creature->getThreatManager().getThreatList().begin(); i!= m_creature->getThreatManager().getThreatList().end();++i) + { + Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid()); + if (pUnit && (pUnit->GetTypeId() == TYPEID_PLAYER)) + { + //Use work around packet to prevent player from being dropped from combat + DoTeleportPlayer(pUnit, afGravityPos[0], afGravityPos[1], afGravityPos[2], pUnit->GetOrientation()); + } + } + + m_uiGravityLapse_Timer = 500; + ++m_uiGravityLapse_Phase; + m_bInGravityLapse = true; + m_uiShockBarrier_Timer = 1000; + m_uiNetherBeam_Timer = 5000; + break; + + case 1: + DoScriptText(urand(0, 1) ? SAY_GRAVITYLAPSE1 : SAY_GRAVITYLAPSE2, m_creature); + + // 2) At that point he will put a Gravity Lapse debuff on everyone + for (i = m_creature->getThreatManager().getThreatList().begin(); i!= m_creature->getThreatManager().getThreatList().end(); ++i) + { + if (Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid())) + { + m_creature->CastSpell(pUnit, SPELL_KNOCKBACK, true); + //Gravity lapse - needs an exception in Spell system to work + + pUnit->CastSpell(pUnit, SPELL_GRAVITY_LAPSE, true, 0, 0, m_creature->GetGUID()); + pUnit->CastSpell(pUnit, SPELL_GRAVITY_LAPSE_AURA, true, 0, 0, m_creature->GetGUID()); + + //Using packet workaround + WorldPacket data(12); + data.SetOpcode(SMSG_MOVE_SET_CAN_FLY); + data.append(pUnit->GetPackGUID()); + data << uint32(0); + pUnit->SendMessageToSet(&data, true); + } + } + m_uiGravityLapse_Timer = 10000; + ++m_uiGravityLapse_Phase; + break; + + case 2: + //Cast nether vapor aura on self + m_creature->InterruptNonMeleeSpells(false); + DoCast(m_creature, SPELL_NETHER_VAPOR); + + m_uiGravityLapse_Timer = 20000; + ++m_uiGravityLapse_Phase; + break; + + case 3: + //Remove flight + for (i = m_creature->getThreatManager().getThreatList().begin(); i!= m_creature->getThreatManager().getThreatList().end(); ++i) + { + if (Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid())) + { + //Using packet workaround + WorldPacket data(12); + data.SetOpcode(SMSG_MOVE_UNSET_CAN_FLY); + data.append(pUnit->GetPackGUID()); + data << uint32(0); + pUnit->SendMessageToSet(&data, true); + } + } + + m_creature->RemoveAurasDueToSpell(SPELL_NETHER_VAPOR); + m_bInGravityLapse = false; + m_uiGravityLapse_Timer = 60000; + m_uiGravityLapse_Phase = 0; + AttackStart(m_creature->getVictim()); + break; + } + } + else + m_uiGravityLapse_Timer -= uiDiff; + + if (m_bInGravityLapse) + { + //m_uiShockBarrier_Timer + if (m_uiShockBarrier_Timer < uiDiff) + { + DoCast(m_creature, SPELL_SHOCK_BARRIER); + m_uiShockBarrier_Timer = 20000; + } + else + m_uiShockBarrier_Timer -= uiDiff; + + //m_uiNetherBeam_Timer + if (m_uiNetherBeam_Timer < uiDiff) + { + if (Unit* pUnit = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pUnit, SPELL_NETHER_BEAM); + + m_uiNetherBeam_Timer = 4000; + } + else + m_uiNetherBeam_Timer -= uiDiff; + } + } + + if (!m_bInGravityLapse) + DoMeleeAttackIfReady(); + } + } + } +}; + +//Thaladred the Darkener AI +struct MANGOS_DLL_DECL boss_thaladred_the_darkenerAI : public advisorbase_ai +{ + boss_thaladred_the_darkenerAI(Creature* pCreature) : advisorbase_ai(pCreature) + { + m_uiAdvisor_Speech = SAY_THALADRED_DEATH; + } + + uint32 m_uiGaze_Timer; + uint32 m_uiSilence_Timer; + uint32 m_uiPsychicBlow_Timer; + + void Reset() + { + m_uiGaze_Timer = 100; + m_uiSilence_Timer = 20000; + m_uiPsychicBlow_Timer = 10000; + + advisorbase_ai::Reset(); + } + + void Aggro(Unit* pWho) + { + if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + return; + + if (!pWho || m_bFakeDeath) + return; + + DoScriptText(SAY_THALADRED_AGGRO, m_creature); + m_creature->AddThreat(pWho, 5000000.0f); + } + + void UpdateAI(const uint32 uiDiff) + { + advisorbase_ai::UpdateAI(uiDiff); + + //Faking death, don't do anything + if (m_bFakeDeath) + return; + + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //m_uiGaze_Timer + if (m_uiGaze_Timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + { + DoResetThreat(); + m_creature->AddThreat(pTarget, 5000000.0f); + DoScriptText(EMOTE_THALADRED_GAZE, m_creature, pTarget); + } + m_uiGaze_Timer = 8500; + } + else + m_uiGaze_Timer -= uiDiff; + + //m_uiSilence_Timer + if (m_uiSilence_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_SILENCE); + m_uiSilence_Timer = 20000; + } + else + m_uiSilence_Timer -= uiDiff; + + //m_uiPsychicBlow_Timer + if (m_uiPsychicBlow_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_PSYCHIC_BLOW); + m_uiPsychicBlow_Timer = urand(20000, 25000); + } + else + m_uiPsychicBlow_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +//Lord Sanguinar AI +struct MANGOS_DLL_DECL boss_lord_sanguinarAI : public advisorbase_ai +{ + boss_lord_sanguinarAI(Creature* pCreature) : advisorbase_ai(pCreature) + { + m_uiAdvisor_Speech = SAY_SANGUINAR_DEATH; + } + + uint32 m_uiFear_Timer; + + void Reset() + { + m_uiFear_Timer = 20000; + advisorbase_ai::Reset(); + } + + void Aggro(Unit* pWho) + { + if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + return; + + if (!pWho || m_bFakeDeath) + return; + + DoScriptText(SAY_SANGUINAR_AGGRO, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + advisorbase_ai::UpdateAI(uiDiff); + + //Faking death, don't do anything + if (m_bFakeDeath) + return; + + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //m_uiFear_Timer + if (m_uiFear_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_BELLOWING_ROAR); + m_uiFear_Timer = urand(25000, 35000); //approximately every 30 seconds + } + else + m_uiFear_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +//Grand Astromancer Capernian AI +struct MANGOS_DLL_DECL boss_grand_astromancer_capernianAI : public advisorbase_ai +{ + boss_grand_astromancer_capernianAI(Creature* pCreature) : advisorbase_ai(pCreature) + { + m_uiAdvisor_Speech = SAY_CAPERNIAN_DEATH; + } + + uint32 m_uiFireball_Timer; + uint32 m_uiConflagration_Timer; + uint32 m_uiArcaneExplosion_Timer; + uint32 m_uiYell_Timer; + bool m_bYell; + + void Reset() + { + m_uiFireball_Timer = 2000; + m_uiConflagration_Timer = 20000; + m_uiArcaneExplosion_Timer = 5000; + m_uiYell_Timer = 2000; + m_bYell = false; + + advisorbase_ai::Reset(); + } + + void AttackStart(Unit* pWho) + { + if (!pWho || m_bFakeDeath || m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + return; + + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho, 0.0f); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + + m_creature->GetMotionMaster()->MoveChase(pWho, CAPERNIAN_DISTANCE); + } + } + + void Aggro(Unit *pWho) + { + if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + return; + + if (!pWho || m_bFakeDeath) + return; + } + + void UpdateAI(const uint32 uiDiff) + { + advisorbase_ai::UpdateAI(uiDiff); + + //Faking Death, don't do anything + if (m_bFakeDeath) + return; + + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //m_uiYell_Timer + if (!m_bYell) + { + if (m_uiYell_Timer < uiDiff) + { + DoScriptText(SAY_CAPERNIAN_AGGRO, m_creature); + m_bYell = true; + } + else + m_uiYell_Timer -= uiDiff; + } + + //m_uiFireball_Timer + if (m_uiFireball_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_CAPERNIAN_FIREBALL); + m_uiFireball_Timer = 4000; + } + else + m_uiFireball_Timer -= uiDiff; + + //m_uiConflagration_Timer + if (m_uiConflagration_Timer < uiDiff) + { + Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); + + if (pTarget && m_creature->IsWithinDistInMap(pTarget, 30.0f)) + DoCast(pTarget, SPELL_CONFLAGRATION); + else + DoCast(m_creature->getVictim(), SPELL_CONFLAGRATION); + + m_uiConflagration_Timer = urand(10000, 15000); + } + else + m_uiConflagration_Timer -= uiDiff; + + //m_uiArcaneExplosion_Timer + if (m_uiArcaneExplosion_Timer < uiDiff) + { + bool m_bInMeleeRange = false; + Unit* pTarget = NULL; + std::list& m_threatlist = m_creature->getThreatManager().getThreatList(); + for (std::list::iterator i = m_threatlist.begin(); i!= m_threatlist.end();++i) + { + Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid()); + + //if in melee range + if (pUnit && pUnit->IsWithinDistInMap(m_creature, ATTACK_DISTANCE)) + { + m_bInMeleeRange = true; + pTarget = pUnit; + break; + } + } + + if (m_bInMeleeRange) + DoCast(pTarget, SPELL_ARCANE_EXPLOSION); + + m_uiArcaneExplosion_Timer = urand(4000, 6000); + } + else + m_uiArcaneExplosion_Timer -= uiDiff; + + //Do NOT deal any melee damage. + } +}; + +//Master Engineer Telonicus AI +struct MANGOS_DLL_DECL boss_master_engineer_telonicusAI : public advisorbase_ai +{ + boss_master_engineer_telonicusAI(Creature* pCreature) : advisorbase_ai(pCreature) + { + m_uiAdvisor_Speech = SAY_TELONICUS_DEATH; + } + + uint32 m_uiBomb_Timer; + uint32 m_uiRemoteToy_Timer; + + void Reset() + { + m_uiBomb_Timer = 10000; + m_uiRemoteToy_Timer = 5000; + + advisorbase_ai::Reset(); + } + + void Aggro(Unit *pWho) + { + if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + return; + + if (!pWho || m_bFakeDeath) + return; + + DoScriptText(SAY_TELONICUS_AGGRO, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + advisorbase_ai::UpdateAI(uiDiff); + + //Faking Death, do nothing + if (m_bFakeDeath) + return; + + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //m_uiBomb_Timer + if (m_uiBomb_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_BOMB); + m_uiBomb_Timer = 25000; + } + else + m_uiBomb_Timer -= uiDiff; + + //m_uiRemoteToy_Timer + if (m_uiRemoteToy_Timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, SPELL_REMOTE_TOY); + + m_uiRemoteToy_Timer = urand(10000, 15000); + } + else + m_uiRemoteToy_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +//Phoenix AI +struct MANGOS_DLL_DECL mob_phoenix_tkAI : public ScriptedAI +{ + mob_phoenix_tkAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 m_uiCycle_Timer; + + void Reset() + { + m_uiCycle_Timer = 2000; + m_creature->CastSpell(m_creature,SPELL_BURN,true); + } + + void JustDied(Unit* pKiller) + { + //is this spell in use anylonger? + //m_creature->CastSpell(m_creature,SPELL_EMBER_BLAST,true); + m_creature->SummonCreature(NPC_PHOENIX_EGG,m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ(),m_creature->GetOrientation(),TEMPSUMMON_TIMED_DESPAWN,16000); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiCycle_Timer < uiDiff) + { + //spell Burn should possible do this, but it doesn't, so do this for now. + uint32 uiDmg = urand(4500,5500); + + if (m_creature->GetHealth() > uiDmg) + m_creature->SetHealth(uint32(m_creature->GetHealth()-uiDmg)); + + m_uiCycle_Timer = 2000; + } + else + m_uiCycle_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +//Phoenix Egg AI +struct MANGOS_DLL_DECL mob_phoenix_egg_tkAI : public ScriptedAI +{ + mob_phoenix_egg_tkAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 m_uiRebirth_Timer; + + void Reset() + { + m_uiRebirth_Timer = 15000; + } + + //ignore any + void MoveInLineOfSight(Unit* pWho) { return; } + + void AttackStart(Unit* pWho) + { + if (m_creature->Attack(pWho, false)) + { + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + + DoStartNoMovement(pWho); + } + } + + void JustSummoned(Creature* pSummoned) + { + pSummoned->AddThreat(m_creature->getVictim(), 0.0f); + pSummoned->CastSpell(pSummoned,SPELL_REBIRTH,false); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_uiRebirth_Timer) + return; + + if (m_uiRebirth_Timer <= uiDiff) + { + m_creature->SummonCreature(NPC_PHOENIX,m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ(),m_creature->GetOrientation(),TEMPSUMMON_CORPSE_DESPAWN,5000); + m_uiRebirth_Timer = 0; + } + else + m_uiRebirth_Timer -= uiDiff; + } +}; + +CreatureAI* GetAI_boss_kaelthas(Creature* pCreature) +{ + return new boss_kaelthasAI(pCreature); +} + +CreatureAI* GetAI_boss_thaladred_the_darkener(Creature* pCreature) +{ + return new boss_thaladred_the_darkenerAI(pCreature); +} + +CreatureAI* GetAI_boss_lord_sanguinar(Creature* pCreature) +{ + return new boss_lord_sanguinarAI(pCreature); +} + +CreatureAI* GetAI_boss_grand_astromancer_capernian(Creature* pCreature) +{ + return new boss_grand_astromancer_capernianAI(pCreature); +} + +CreatureAI* GetAI_boss_master_engineer_telonicus(Creature* pCreature) +{ + return new boss_master_engineer_telonicusAI(pCreature); +} + +CreatureAI* GetAI_mob_phoenix_tk(Creature* pCreature) +{ + return new mob_phoenix_tkAI(pCreature); +} + +CreatureAI* GetAI_mob_phoenix_egg_tk(Creature* pCreature) +{ + return new mob_phoenix_egg_tkAI(pCreature); +} + +void AddSC_boss_kaelthas() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_kaelthas"; + newscript->GetAI = &GetAI_boss_kaelthas; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_thaladred_the_darkener"; + newscript->GetAI = &GetAI_boss_thaladred_the_darkener; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_lord_sanguinar"; + newscript->GetAI = &GetAI_boss_lord_sanguinar; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_grand_astromancer_capernian"; + newscript->GetAI = &GetAI_boss_grand_astromancer_capernian; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_master_engineer_telonicus"; + newscript->GetAI = &GetAI_boss_master_engineer_telonicus; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_phoenix_tk"; + newscript->GetAI = &GetAI_mob_phoenix_tk; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_phoenix_egg_tk"; + newscript->GetAI = &GetAI_mob_phoenix_egg_tk; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp b/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp new file mode 100644 index 000000000..32e6d4884 --- /dev/null +++ b/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp @@ -0,0 +1,181 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Void_Reaver +SD%Complete: 90 +SDComment: Should reset if raid are out of room. +SDCategory: Tempest Keep, The Eye +EndScriptData */ + +#include "precompiled.h" +#include "the_eye.h" + +#define SAY_AGGRO -1550000 +#define SAY_SLAY1 -1550001 +#define SAY_SLAY2 -1550002 +#define SAY_SLAY3 -1550003 +#define SAY_DEATH -1550004 +#define SAY_POUNDING1 -1550005 +#define SAY_POUNDING2 -1550006 + +#define SPELL_POUNDING 34162 +#define SPELL_ARCANE_ORB_MISSILE 34172 +#define SPELL_KNOCK_AWAY 25778 +#define SPELL_BERSERK 26662 + +//Unknown function. If target not found, this will be created and used as dummy target instead? +//#define CREATURE_ORB_TARGET 19577 + +struct MANGOS_DLL_DECL boss_void_reaverAI : public ScriptedAI +{ + boss_void_reaverAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 Pounding_Timer; + uint32 ArcaneOrb_Timer; + uint32 KnockAway_Timer; + uint32 Berserk_Timer; + + void Reset() + { + Pounding_Timer = 15000; + ArcaneOrb_Timer = 3000; + KnockAway_Timer = 30000; + Berserk_Timer = 600000; + + if (m_pInstance && m_creature->isAlive()) + m_pInstance->SetData(TYPE_VOIDREAVER, NOT_STARTED); + } + + void KilledUnit(Unit *victim) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_SLAY1, m_creature); break; + case 1: DoScriptText(SAY_SLAY2, m_creature); break; + case 2: DoScriptText(SAY_SLAY3, m_creature); break; + } + } + + void JustDied(Unit *victim) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_VOIDREAVER, DONE); + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + m_creature->SetInCombatWithZone(); + + if (m_pInstance) + m_pInstance->SetData(TYPE_VOIDREAVER, IN_PROGRESS); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // Pounding + if (Pounding_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_POUNDING); + DoScriptText(urand(0, 1) ? SAY_POUNDING1 : SAY_POUNDING2, m_creature); + + Pounding_Timer = 15000; //cast time(3000) + cooldown time(12000) + }else Pounding_Timer -= diff; + + // Arcane Orb + if (ArcaneOrb_Timer < diff) + { + Unit *target = NULL; + std::list t_list = m_creature->getThreatManager().getThreatList(); + std::vector target_list; + for(std::list::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) + { + target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()); + // exclude pets & totems + if (target->GetTypeId() != TYPEID_PLAYER) + continue; + + //18 yard radius minimum + if (target && !target->IsWithinDist(m_creature, 18.0f, false)) + target_list.push_back(target); + + target = NULL; + } + + if (target_list.size()) + target = *(target_list.begin()+rand()%target_list.size()); + else + target = m_creature->getVictim(); + + if (target) + DoCast(target, SPELL_ARCANE_ORB_MISSILE); + + ArcaneOrb_Timer = 3000; + }else ArcaneOrb_Timer -= diff; + + // Single Target knock back, reduces aggro + if (KnockAway_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_KNOCK_AWAY); + + //Drop 25% aggro + if (m_creature->getThreatManager().getThreat(m_creature->getVictim())) + m_creature->getThreatManager().modifyThreatPercent(m_creature->getVictim(),-25); + + KnockAway_Timer = 30000; + }else KnockAway_Timer -= diff; + + //Berserk + if (Berserk_Timer < diff) + { + if (m_creature->IsNonMeleeSpellCasted(false)) + m_creature->InterruptNonMeleeSpells(false); + + DoCast(m_creature,SPELL_BERSERK); + Berserk_Timer = 600000; + }else Berserk_Timer -= diff; + + DoMeleeAttackIfReady(); + + EnterEvadeIfOutOfCombatArea(diff); + } +}; + +CreatureAI* GetAI_boss_void_reaver(Creature* pCreature) +{ + return new boss_void_reaverAI(pCreature); +} + +void AddSC_boss_void_reaver() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_void_reaver"; + newscript->GetAI = &GetAI_boss_void_reaver; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp b/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp new file mode 100644 index 000000000..dd27ee0bd --- /dev/null +++ b/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp @@ -0,0 +1,161 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance_The_Eye +SD%Complete: 100 +SDComment: +SDCategory: Tempest Keep, The Eye +EndScriptData */ + +#include "precompiled.h" +#include "the_eye.h" + +/* The Eye encounters: +0 - Kael'thas event +1 - Al' ar event +2 - Solarian Event +3 - Void Reaver event +*/ + +struct MANGOS_DLL_DECL instance_the_eye : public ScriptedInstance +{ + instance_the_eye(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + + uint64 m_uiThaladredGUID; + uint64 m_uiSanguinarGUID; + uint64 m_uiCapernianGUID; + uint64 m_uiTelonicusGUID; + uint64 m_uiKaelthasGUID; + uint64 m_uiAstromancerGUID; + + uint32 m_uiKaelthasEventPhase; + + void Initialize() + { + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + + m_uiThaladredGUID = 0; + m_uiSanguinarGUID = 0; + m_uiCapernianGUID = 0; + m_uiTelonicusGUID = 0; + m_uiKaelthasGUID = 0; + m_uiAstromancerGUID = 0; + + m_uiKaelthasEventPhase = 0; + } + + bool IsEncounterInProgress() const + { + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + if (m_auiEncounter[i] == IN_PROGRESS) return true; + + return false; + } + + void OnCreatureCreate(Creature* pCreature) + { + switch(pCreature->GetEntry()) + { + case 20064: m_uiThaladredGUID = pCreature->GetGUID(); break; + case 20063: m_uiTelonicusGUID = pCreature->GetGUID(); break; + case 20062: m_uiCapernianGUID = pCreature->GetGUID(); break; + case 20060: m_uiSanguinarGUID = pCreature->GetGUID(); break; + case 19622: m_uiKaelthasGUID = pCreature->GetGUID(); break; + case 18805: m_uiAstromancerGUID = pCreature->GetGUID(); break; + } + } + + void SetData(uint32 uiType, uint32 uiData) + { + switch(uiType) + { + case TYPE_ALAR: + m_auiEncounter[0] = uiData; + break; + case TYPE_SOLARIAN: + m_auiEncounter[1] = uiData; + break; + case TYPE_VOIDREAVER: + m_auiEncounter[2] = uiData; + break; + case TYPE_ASTROMANCER: + m_auiEncounter[3] = uiData; + break; + + case TYPE_KAELTHAS_PHASE: + m_uiKaelthasEventPhase = uiData; + break; + } + } + + uint32 GetData(uint32 uiType) + { + switch(uiType) + { + case TYPE_ALAR: + return m_auiEncounter[0]; + case TYPE_SOLARIAN: + return m_auiEncounter[1]; + case TYPE_VOIDREAVER: + return m_auiEncounter[2]; + case TYPE_ASTROMANCER: + return m_auiEncounter[3]; + + case TYPE_KAELTHAS_PHASE: + return m_uiKaelthasEventPhase; + } + + return 0; + } + + uint64 GetData64(uint32 uiData) + { + switch(uiData) + { + case DATA_THALADRED: + return m_uiThaladredGUID; + case DATA_SANGUINAR: + return m_uiSanguinarGUID; + case DATA_CAPERNIAN: + return m_uiCapernianGUID; + case DATA_TELONICUS: + return m_uiTelonicusGUID; + case DATA_KAELTHAS: + return m_uiKaelthasGUID; + case DATA_ASTROMANCER: + return m_uiAstromancerGUID; + } + + return 0; + } +}; + +InstanceData* GetInstanceData_instance_the_eye(Map* pMap) +{ + return new instance_the_eye(pMap); +} + +void AddSC_instance_the_eye() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "instance_the_eye"; + newscript->GetInstanceData = &GetInstanceData_instance_the_eye; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/tempest_keep/the_eye/the_eye.cpp b/scripts/outland/tempest_keep/the_eye/the_eye.cpp new file mode 100644 index 000000000..5a29435d1 --- /dev/null +++ b/scripts/outland/tempest_keep/the_eye/the_eye.cpp @@ -0,0 +1,94 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: The_Eye +SD%Complete: 100 +SDComment: +SDCategory: Tempest Keep, The Eye +EndScriptData */ + +/* ContentData +mob_crystalcore_devastator +EndContentData */ + +#include "precompiled.h" +#include "the_eye.h" + +#define SPELL_COUNTERCHARGE 35035 +#define SPELL_KNOCKAWAY 22893 + +struct MANGOS_DLL_DECL mob_crystalcore_devastatorAI : public ScriptedAI +{ + mob_crystalcore_devastatorAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 Knockaway_Timer; + uint32 Countercharge_Timer; + + void Reset() + { + Countercharge_Timer = 9000; + Knockaway_Timer = 25000; + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Check if we have a current target + //Knockaway_Timer + if (Knockaway_Timer < diff) + { + m_creature->CastSpell(m_creature->getVictim(),SPELL_KNOCKAWAY, true); + + // current aggro target is knocked away pick new target + Unit* Target = SelectUnit(SELECT_TARGET_TOPAGGRO, 0); + + if (!Target || Target == m_creature->getVictim()) + Target = SelectUnit(SELECT_TARGET_TOPAGGRO, 1); + + if (Target) + m_creature->TauntApply(Target); + + Knockaway_Timer = 23000; + } + else Knockaway_Timer -= diff; + + //Countercharge_Timer + if (Countercharge_Timer < diff) + { + DoCast(this->m_creature,SPELL_COUNTERCHARGE); + Countercharge_Timer = 45000; + }else Countercharge_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_crystalcore_devastator(Creature* pCreature) +{ + return new mob_crystalcore_devastatorAI(pCreature); +} + +void AddSC_the_eye() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "mob_crystalcore_devastator"; + newscript->GetAI = &GetAI_mob_crystalcore_devastator; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/tempest_keep/the_eye/the_eye.h b/scripts/outland/tempest_keep/the_eye/the_eye.h new file mode 100644 index 000000000..7066e8458 --- /dev/null +++ b/scripts/outland/tempest_keep/the_eye/the_eye.h @@ -0,0 +1,27 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_THE_EYE_H +#define DEF_THE_EYE_H + +enum +{ + MAX_ENCOUNTER = 4, + + TYPE_ALAR = 1, + TYPE_ASTROMANCER = 2, + TYPE_SOLARIAN = 3, + TYPE_VOIDREAVER = 4, + TYPE_KAELTHAS_PHASE = 5, //not regular encounter, contains phase instead + + DATA_ASTROMANCER = 8, + DATA_KAELTHAS = 9, + + DATA_CAPERNIAN = 10, + DATA_SANGUINAR = 11, + DATA_TELONICUS = 12, + DATA_THALADRED = 13 +}; + +#endif diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_gyrokill.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_gyrokill.cpp new file mode 100644 index 000000000..09ecf0e52 --- /dev/null +++ b/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_gyrokill.cpp @@ -0,0 +1,37 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Gatewatcher_Gyrokill +SD%Complete: 0 +SDComment: Place Holder +SDCategory: Tempest Keep, The Mechanar +EndScriptData */ + +#include "precompiled.h" + +#define SAY_AGGRO -1554000 +#define SAY_SAW_ATTACK1 -1554001 +#define SAY_SAW_ATTACK2 -1554002 +#define SAY_SLAY1 -1554003 +#define SAY_SLAY2 -1554004 +#define SAY_DEATH -1554005 + +#define SPELL_STREAM_OF_MACHINE_FLUID 35311 +#define SPELL_SAW_BLADE 35318 +#define H_SPELL_SAW_BLADE 39192 +#define SPELL_SHADOW_POWER 35322 +#define H_SPELL_SHADOW_POWER 39193 diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp new file mode 100644 index 000000000..2b70c560d --- /dev/null +++ b/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp @@ -0,0 +1,136 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Gatewatcher_Ironhand +SD%Complete: 75 +SDComment: +SDCategory: Tempest Keep, The Mechanar +EndScriptData */ + +#include "precompiled.h" + +#define SAY_AGGRO_1 -1554006 +#define SAY_HAMMER_1 -1554007 +#define SAY_HAMMER_2 -1554008 +#define SAY_SLAY_1 -1554009 +#define SAY_SLAY_2 -1554010 +#define SAY_DEATH_1 -1554011 +#define EMOTE_HAMMER -1554012 + +#define SPELL_SHADOW_POWER 35322 +#define H_SPELL_SHADOW_POWER 39193 +#define SPELL_HAMMER_PUNCH 35326 +#define SPELL_JACKHAMMER 35327 +#define H_SPELL_JACKHAMMER 39194 +#define SPELL_STREAM_OF_MACHINE_FLUID 35311 + +struct MANGOS_DLL_DECL boss_gatewatcher_iron_handAI : public ScriptedAI +{ + boss_gatewatcher_iron_handAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + uint32 Shadow_Power_Timer; + uint32 Jackhammer_Timer; + uint32 Stream_of_Machine_Fluid_Timer; + + void Reset() + { + Shadow_Power_Timer = 25000; + Jackhammer_Timer = 45000; + Stream_of_Machine_Fluid_Timer = 55000; + } + + void Aggro(Unit *who) + { + DoScriptText(SAY_AGGRO_1, m_creature); + } + + void KilledUnit(Unit* victim) + { + if (urand(0, 1)) + return; + + DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); + } + + void JustDied(Unit* Killer) + { + DoScriptText(SAY_DEATH_1, m_creature); + + if (!m_pInstance) + return; + + //TODO: Add door check/open code + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Shadow Power + if (Shadow_Power_Timer < diff) + { + DoCast(m_creature, m_bIsHeroicMode ? H_SPELL_SHADOW_POWER : SPELL_SHADOW_POWER); + Shadow_Power_Timer = urand(20000, 28000); + }else Shadow_Power_Timer -= diff; + + //Jack Hammer + if (Jackhammer_Timer < diff) + { + //TODO: expect cast this about 5 times in a row (?), announce it by emote only once + DoScriptText(EMOTE_HAMMER, m_creature); + DoCast(m_creature->getVictim(), m_bIsHeroicMode ? H_SPELL_JACKHAMMER : SPELL_JACKHAMMER); + + //chance to yell, but not same time as emote (after spell in fact casted) + if (urand(0, 4)) + DoScriptText(urand(0, 1) ? SAY_HAMMER_1 : SAY_HAMMER_2, m_creature); + + Jackhammer_Timer = 30000; + }else Jackhammer_Timer -= diff; + + //Stream of Machine Fluid + if (Stream_of_Machine_Fluid_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_STREAM_OF_MACHINE_FLUID); + Stream_of_Machine_Fluid_Timer = urand(35000, 50000); + }else Stream_of_Machine_Fluid_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_gatewatcher_iron_hand(Creature* pCreature) +{ + return new boss_gatewatcher_iron_handAI(pCreature); +} + +void AddSC_boss_gatewatcher_iron_hand() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_gatewatcher_iron_hand"; + newscript->GetAI = &GetAI_boss_gatewatcher_iron_hand; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp new file mode 100644 index 000000000..c3cdd9ec4 --- /dev/null +++ b/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp @@ -0,0 +1,247 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Nethermancer_Sepethrea +SD%Complete: 90 +SDComment: Need adjustments to initial summons +SDCategory: Tempest Keep, The Mechanar +EndScriptData */ + +#include "precompiled.h" +#include "mechanar.h" + +#define SAY_AGGRO -1554013 +#define SAY_SUMMON -1554014 +#define SAY_DRAGONS_BREATH_1 -1554015 +#define SAY_DRAGONS_BREATH_2 -1554016 +#define SAY_SLAY1 -1554017 +#define SAY_SLAY2 -1554018 +#define SAY_DEATH -1554019 + +#define SPELL_SUMMON_RAGIN_FLAMES 35275 + +#define SPELL_FROST_ATTACK 35263 +#define SPELL_ARCANE_BLAST 35314 +#define SPELL_DRAGONS_BREATH 35250 +#define SPELL_KNOCKBACK 37317 +#define SPELL_SOLARBURN 35267 + +struct MANGOS_DLL_DECL boss_nethermancer_sepethreaAI : public ScriptedAI +{ + boss_nethermancer_sepethreaAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + uint32 frost_attack_Timer; + uint32 arcane_blast_Timer; + uint32 dragons_breath_Timer; + uint32 knockback_Timer; + uint32 solarburn_Timer; + + void Reset() + { + frost_attack_Timer = urand(7000, 10000); + arcane_blast_Timer = urand(12000, 18000); + dragons_breath_Timer = urand(18000, 22000); + knockback_Timer = urand(22000, 28000); + solarburn_Timer = 30000; + } + + void Aggro(Unit *who) + { + DoScriptText(SAY_AGGRO, m_creature); + + //Summon two guards, three in heroic + uint8 am = (m_bIsHeroicMode ? 1 : 2); + for(int i = 0; i < am; ++i) + { + DoCast(who,SPELL_SUMMON_RAGIN_FLAMES); + } + + DoScriptText(SAY_SUMMON, m_creature); + } + + void KilledUnit(Unit* victim) + { + DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); + } + + void JustDied(Unit* Killer) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_SEPETHREA, DONE); + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Frost Attack + if (frost_attack_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_FROST_ATTACK); + frost_attack_Timer = urand(7000, 10000); + }else frost_attack_Timer -= diff; + + //Arcane Blast + if (arcane_blast_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_ARCANE_BLAST); + arcane_blast_Timer = 15000; + }else arcane_blast_Timer -= diff; + + //Dragons Breath + if (dragons_breath_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_DRAGONS_BREATH); + + if (urand(0, 1)) + DoScriptText(urand(0, 1) ? SAY_DRAGONS_BREATH_1 : SAY_DRAGONS_BREATH_2, m_creature); + + dragons_breath_Timer = urand(12000, 22000); + }else dragons_breath_Timer -= diff; + + //Check for Knockback + if (knockback_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_KNOCKBACK); + knockback_Timer = urand(15000, 25000); + }else knockback_Timer -= diff; + + //Check for Solarburn + if (solarburn_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_SOLARBURN); + solarburn_Timer = 30000; + }else solarburn_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_nethermancer_sepethrea(Creature* pCreature) +{ + return new boss_nethermancer_sepethreaAI(pCreature); +} + +#define SPELL_INFERNO 35268 +#define H_SPELL_INFERNO 39346 +#define SPELL_FIRE_TAIL 35278 + +struct MANGOS_DLL_DECL mob_ragin_flamesAI : public ScriptedAI +{ + mob_ragin_flamesAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + + uint32 inferno_Timer; + uint32 flame_timer; + uint32 Check_Timer; + + bool onlyonce; + + void Reset() + { + inferno_Timer = 10000; + flame_timer = 500; + Check_Timer = 2000; + onlyonce = false; + m_creature->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_MAGIC, true); + m_creature->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, true); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (!onlyonce) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + m_creature->GetMotionMaster()->MoveChase(target); + onlyonce = true; + } + + if (inferno_Timer < diff) + { + DoCast(m_creature->getVictim(), m_bIsHeroicMode ? H_SPELL_INFERNO : SPELL_INFERNO); + + m_creature->TauntApply(m_creature->getVictim()); + + inferno_Timer = 10000; + }else inferno_Timer -= diff; + + if (flame_timer < diff) + { + DoCast(m_creature,SPELL_FIRE_TAIL); + flame_timer = 500; + }else flame_timer -=diff; + + //Check_Timer + if (Check_Timer < diff) + { + if (m_pInstance) + { + if (m_pInstance->GetData(TYPE_SEPETHREA) == DONE) + { + //remove + m_creature->setDeathState(JUST_DIED); + m_creature->RemoveCorpse(); + return; + } + } + + Check_Timer = 1000; + }else Check_Timer -= diff; + + DoMeleeAttackIfReady(); + } + +}; +CreatureAI* GetAI_mob_ragin_flames(Creature* pCreature) +{ + return new mob_ragin_flamesAI(pCreature); +} +void AddSC_boss_nethermancer_sepethrea() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_nethermancer_sepethrea"; + newscript->GetAI = &GetAI_boss_nethermancer_sepethrea; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_ragin_flames"; + newscript->GetAI = &GetAI_mob_ragin_flames; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp new file mode 100644 index 000000000..c0735faac --- /dev/null +++ b/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp @@ -0,0 +1,239 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss Pathaleon the Calculator +SD%Complete: 50 +SDComment: Event missing. Script for himself 99% blizzlike. +SDCategory: Tempest Keep, The Mechanar +EndScriptData */ + +#include "precompiled.h" + +#define SAY_AGGRO -1554020 +#define SAY_DOMINATION_1 -1554021 +#define SAY_DOMINATION_2 -1554022 +#define SAY_SUMMON -1554023 +#define SAY_ENRAGE -1554024 +#define SAY_SLAY_1 -1554025 +#define SAY_SLAY_2 -1554026 +#define SAY_DEATH -1554027 + +// Spells to be casted +#define SPELL_MANA_TAP 36021 +#define SPELL_ARCANE_TORRENT 36022 +#define SPELL_DOMINATION 35280 +#define H_SPELL_ARCANE_EXPLOSION 15453 +#define SPELL_FRENZY 36992 + +#define SPELL_SUMMON_NETHER_WRAITH_1 35285 //Spells work, but not implemented +#define SPELL_SUMMON_NETHER_WRAITH_2 35286 +#define SPELL_SUMMON_NETHER_WRAITH_3 35287 +#define SPELL_SUMMON_NETHER_WRAITH_4 35288 + +// Add Spells +#define SPELL_DETONATION 35058 +#define SPELL_ARCANE_MISSILES 35034 + +struct MANGOS_DLL_DECL boss_pathaleon_the_calculatorAI : public ScriptedAI +{ + boss_pathaleon_the_calculatorAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + bool m_bIsHeroicMode; + + uint32 Summon_Timer; + uint32 ManaTap_Timer; + uint32 ArcaneTorrent_Timer; + uint32 Domination_Timer; + uint32 ArcaneExplosion_Timer; + bool Enraged; + + uint32 Counter; + + void Reset() + { + Summon_Timer = 30000; + ManaTap_Timer = urand(12000, 20000); + ArcaneTorrent_Timer = urand(16000, 25000); + Domination_Timer = urand(25000, 40000); + ArcaneExplosion_Timer = urand(8000, 13000); + + Enraged = false; + Counter = 0; + } + + void Aggro(Unit *who) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void KilledUnit(Unit* victim) + { + DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); + } + + void JustDied(Unit* Killer) + { + DoScriptText(SAY_DEATH, m_creature); + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (Summon_Timer < diff) + { + for(int i = 0; i < 3; ++i) + { + Unit* target = NULL; + target = SelectUnit(SELECT_TARGET_RANDOM,0); + Creature* Wraith = m_creature->SummonCreature(21062,m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(),0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + if (target && Wraith) + Wraith->AI()->AttackStart(target); + } + + DoScriptText(SAY_SUMMON, m_creature); + + Summon_Timer = urand(30000, 45000); + }else Summon_Timer -= diff; + + if (ManaTap_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_MANA_TAP); + ManaTap_Timer = urand(14000, 22000); + }else ManaTap_Timer -= diff; + + if (ArcaneTorrent_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_ARCANE_TORRENT); + ArcaneTorrent_Timer = urand(12000, 18000); + }else ArcaneTorrent_Timer -= diff; + + if (Domination_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1)) + { + DoScriptText(urand(0, 1) ? SAY_DOMINATION_1 : SAY_DOMINATION_2, m_creature); + DoCast(target,SPELL_DOMINATION); + } + + Domination_Timer = urand(25000, 30000); + }else Domination_Timer -= diff; + + //Only casting if Heroic Mode is used + if (m_bIsHeroicMode) + { + if (ArcaneExplosion_Timer < diff) + { + DoCast(m_creature->getVictim(),H_SPELL_ARCANE_EXPLOSION); + ArcaneExplosion_Timer = urand(10000, 14000); + }else ArcaneExplosion_Timer -= diff; + } + + if (!Enraged && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 21) + { + DoCast(m_creature, SPELL_FRENZY); + DoScriptText(SAY_ENRAGE, m_creature); + Enraged = true; + } + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_boss_pathaleon_the_calculator(Creature* pCreature) +{ + return new boss_pathaleon_the_calculatorAI(pCreature); +} + +struct MANGOS_DLL_DECL mob_nether_wraithAI : public ScriptedAI +{ + mob_nether_wraithAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + ScriptedInstance* m_pInstance; + + uint32 ArcaneMissiles_Timer; + uint32 Detonation_Timer; + uint32 Die_Timer; + bool Detonation; + + void Reset() + { + ArcaneMissiles_Timer = urand(1000, 4000); + Detonation_Timer = 20000; + Die_Timer = 2200; + Detonation = false; + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (ArcaneMissiles_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1)) + DoCast(target,SPELL_ARCANE_MISSILES); + else + DoCast(m_creature->getVictim(),SPELL_ARCANE_MISSILES); + + ArcaneMissiles_Timer = urand(5000, 10000); + }else ArcaneMissiles_Timer -=diff; + + if (!Detonation) + { + if (Detonation_Timer < diff) + { + DoCast(m_creature,SPELL_DETONATION); + Detonation = true; + }else Detonation_Timer -= diff; + } + + if (Detonation) + { + if (Die_Timer < diff) + { + m_creature->setDeathState(JUST_DIED); + m_creature->RemoveCorpse(); + }else Die_Timer -= diff; + } + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_mob_nether_wraith(Creature* pCreature) +{ + return new mob_nether_wraithAI(pCreature); +} + +void AddSC_boss_pathaleon_the_calculator() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_pathaleon_the_calculator"; + newscript->GetAI = &GetAI_boss_pathaleon_the_calculator; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_nether_wraith"; + newscript->GetAI = &GetAI_mob_nether_wraith; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp b/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp new file mode 100644 index 000000000..981b08127 --- /dev/null +++ b/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp @@ -0,0 +1,69 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance_Mechanar +SD%Complete: 20 +SDComment: +SDCategory: Mechanar +EndScriptData */ + +#include "precompiled.h" +#include "mechanar.h" + +struct MANGOS_DLL_DECL instance_mechanar : public ScriptedInstance +{ + instance_mechanar(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + + void Initialize() + { + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + } + + void SetData(uint32 uiType, uint32 uiData) + { + switch(uiType) + { + case TYPE_SEPETHREA: + m_auiEncounter[0] = uiData; + break; + } + } + + uint32 GetData(uint32 uiType) + { + if (uiType == TYPE_SEPETHREA) + return m_auiEncounter[0]; + + return 0; + } +}; + +InstanceData* GetInstanceData_instance_mechanar(Map* pMap) +{ + return new instance_mechanar(pMap); +} + +void AddSC_instance_mechanar() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "instance_mechanar"; + newscript->GetInstanceData = &GetInstanceData_instance_mechanar; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/tempest_keep/the_mechanar/mechanar.h b/scripts/outland/tempest_keep/the_mechanar/mechanar.h new file mode 100644 index 000000000..1efa54a9c --- /dev/null +++ b/scripts/outland/tempest_keep/the_mechanar/mechanar.h @@ -0,0 +1,15 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_MECHANAR_H +#define DEF_MECHANAR_H + +enum +{ + MAX_ENCOUNTER = 1, + + TYPE_SEPETHREA = 1 +}; + +#endif diff --git a/scripts/outland/terokkar_forest.cpp b/scripts/outland/terokkar_forest.cpp new file mode 100644 index 000000000..962aad07e --- /dev/null +++ b/scripts/outland/terokkar_forest.cpp @@ -0,0 +1,940 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Terokkar_Forest +SD%Complete: 80 +SDComment: Quest support: 9889, 10009, 10873, 10896, 10446/10447, 10887, 10922, 11096. Skettis->Ogri'la Flight +SDCategory: Terokkar Forest +EndScriptData */ + +/* ContentData +mob_unkor_the_ruthless +mob_infested_root_walker +mob_rotting_forest_rager +mob_netherweb_victim +npc_akuno +npc_floon +npc_letoll +npc_mana_bomb_exp_trigger +go_mana_bomb +npc_skyguard_handler_deesak +npc_slim +EndContentData */ + +#include "precompiled.h" +#include "escort_ai.h" + +/*###### +## mob_unkor_the_ruthless +######*/ + +#define SAY_SUBMIT -1000194 + +#define FACTION_HOSTILE 45 +#define FACTION_FRIENDLY 35 +#define QUEST_DONTKILLTHEFATONE 9889 + +#define SPELL_PULVERIZE 2676 +//#define SPELL_QUID9889 32174 + +struct MANGOS_DLL_DECL mob_unkor_the_ruthlessAI : public ScriptedAI +{ + mob_unkor_the_ruthlessAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + bool CanDoQuest; + uint32 UnkorUnfriendly_Timer; + uint32 Pulverize_Timer; + + void Reset() + { + CanDoQuest = false; + UnkorUnfriendly_Timer = 0; + Pulverize_Timer = 3000; + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_creature->setFaction(FACTION_HOSTILE); + } + + void DoNice() + { + DoScriptText(SAY_SUBMIT, m_creature); + m_creature->setFaction(FACTION_FRIENDLY); + m_creature->SetStandState(UNIT_STAND_STATE_SIT); + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + UnkorUnfriendly_Timer = 60000; + } + + void DamageTaken(Unit *done_by, uint32 &damage) + { + if (done_by->GetTypeId() == TYPEID_PLAYER) + if ((m_creature->GetHealth()-damage)*100 / m_creature->GetMaxHealth() < 30) + { + if (Group* pGroup = ((Player*)done_by)->GetGroup()) + { + for(GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next()) + { + Player *pGroupie = itr->getSource(); + if (pGroupie && + pGroupie->GetQuestStatus(QUEST_DONTKILLTHEFATONE) == QUEST_STATUS_INCOMPLETE && + pGroupie->GetReqKillOrCastCurrentCount(QUEST_DONTKILLTHEFATONE, 18260) == 10) + { + pGroupie->AreaExploredOrEventHappens(QUEST_DONTKILLTHEFATONE); + if (!CanDoQuest) + CanDoQuest = true; + } + } + } else + if (((Player*)done_by)->GetQuestStatus(QUEST_DONTKILLTHEFATONE) == QUEST_STATUS_INCOMPLETE && + ((Player*)done_by)->GetReqKillOrCastCurrentCount(QUEST_DONTKILLTHEFATONE, 18260) == 10) + { + ((Player*)done_by)->AreaExploredOrEventHappens(QUEST_DONTKILLTHEFATONE); + CanDoQuest = true; + } + } + } + + void UpdateAI(const uint32 diff) + { + if (CanDoQuest) + { + if (!UnkorUnfriendly_Timer) + { + //DoCast(m_creature,SPELL_QUID9889); //not using spell for now + DoNice(); + } + else + { + if (UnkorUnfriendly_Timer <= diff) + { + EnterEvadeMode(); + }else UnkorUnfriendly_Timer -= diff; + } + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (Pulverize_Timer < diff) + { + DoCast(m_creature,SPELL_PULVERIZE); + Pulverize_Timer = 9000; + }else Pulverize_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_unkor_the_ruthless(Creature* pCreature) +{ + return new mob_unkor_the_ruthlessAI(pCreature); +} + +/*###### +## mob_infested_root_walker +######*/ + +struct MANGOS_DLL_DECL mob_infested_root_walkerAI : public ScriptedAI +{ + mob_infested_root_walkerAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + void Reset() { } + + void DamageTaken(Unit *done_by, uint32 &damage) + { + if (done_by && done_by->GetTypeId() == TYPEID_PLAYER) + if (m_creature->GetHealth() <= damage) + if (urand(0, 3)) + //Summon Wood Mites + m_creature->CastSpell(m_creature,39130,true); + } +}; +CreatureAI* GetAI_mob_infested_root_walker(Creature* pCreature) +{ + return new mob_infested_root_walkerAI(pCreature); +} + +/*###### +## mob_rotting_forest_rager +######*/ + +struct MANGOS_DLL_DECL mob_rotting_forest_ragerAI : public ScriptedAI +{ + mob_rotting_forest_ragerAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + void Reset() { } + + void DamageTaken(Unit *done_by, uint32 &damage) + { + if (done_by->GetTypeId() == TYPEID_PLAYER) + if (m_creature->GetHealth() <= damage) + if (urand(0, 3)) + //Summon Lots of Wood Mights + m_creature->CastSpell(m_creature,39134,true); + } +}; +CreatureAI* GetAI_mob_rotting_forest_rager(Creature* pCreature) +{ + return new mob_rotting_forest_ragerAI(pCreature); +} + +/*###### +## mob_netherweb_victim +######*/ + +enum +{ + NPC_FREED_WARRIOR = 22459, + QUEST_TAKEN_IN_NIGHT = 10873 + //SPELL_FREE_WEBBED = 38950 +}; + +const uint32 netherwebVictims[6] = +{ + 18470, 16805, 21242, 18452, 22482, 21285 +}; +struct MANGOS_DLL_DECL mob_netherweb_victimAI : public ScriptedAI +{ + mob_netherweb_victimAI(Creature* pCreature) : ScriptedAI(pCreature) + { + SetCombatMovement(false); + Reset(); + } + + void Reset() { } + void MoveInLineOfSight(Unit* pWho) { } + + void JustDied(Unit* pKiller) + { + if (pKiller->GetTypeId() == TYPEID_PLAYER) + { + if (((Player*)pKiller)->GetQuestStatus(QUEST_TAKEN_IN_NIGHT) == QUEST_STATUS_INCOMPLETE) + { + if (!urand(0, 3)) + { + m_creature->SummonCreature(NPC_FREED_WARRIOR, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); + ((Player*)pKiller)->KilledMonsterCredit(NPC_FREED_WARRIOR, m_creature->GetGUID()); + } + else + m_creature->SummonCreature(netherwebVictims[rand()%6], 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); + } + } + } +}; + +CreatureAI* GetAI_mob_netherweb_victim(Creature* pCreature) +{ + return new mob_netherweb_victimAI(pCreature); +} + +/*##### +## npc_akuno +#####*/ + +enum +{ + SAY_AKU_START = -1000477, + SAY_AKU_AMBUSH_A = -1000478, + SAY_AKU_AMBUSH_B = -1000479, + SAY_AKU_AMBUSH_B_REPLY = -1000480, + SAY_AKU_COMPLETE = -1000481, + + SPELL_CHAIN_LIGHTNING = 39945, + + QUEST_ESCAPING_TOMB = 10887, + NPC_CABAL_SKIRMISHER = 21661 +}; + +static float m_afAmbushB1[]= {-2895.525879, 5336.431641, -11.800}; +static float m_afAmbushB2[]= {-2890.604980, 5331.938965, -11.282}; + +struct MANGOS_DLL_DECL npc_akunoAI : public npc_escortAI +{ + npc_akunoAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } + + uint32 m_uiChainLightningTimer; + + void Reset() + { + m_uiChainLightningTimer = 1000; + } + + void WaypointReached(uint32 uiPointId) + { + switch(uiPointId) + { + case 5: + DoScriptText(SAY_AKU_AMBUSH_A, m_creature); + m_creature->SummonCreature(NPC_CABAL_SKIRMISHER, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + break; + case 14: + DoScriptText(SAY_AKU_AMBUSH_B, m_creature); + + if (Creature* pTemp = m_creature->SummonCreature(NPC_CABAL_SKIRMISHER, m_afAmbushB1[0], m_afAmbushB1[1], m_afAmbushB1[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000)) + DoScriptText(SAY_AKU_AMBUSH_B_REPLY, pTemp); + + m_creature->SummonCreature(NPC_CABAL_SKIRMISHER, m_afAmbushB2[0], m_afAmbushB2[1], m_afAmbushB2[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + break; + case 15: + SetRun(); + break; + case 18: + DoScriptText(SAY_AKU_COMPLETE, m_creature); + + if (Player* pPlayer = GetPlayerForEscort()) + pPlayer->GroupEventHappens(QUEST_ESCAPING_TOMB, m_creature); + + break; + } + } + + void JustSummoned(Creature* pSummoned) + { + pSummoned->AI()->AttackStart(m_creature); + } + + void UpdateEscortAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiChainLightningTimer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_CHAIN_LIGHTNING); + m_uiChainLightningTimer = urand(7000, 14000); + } + else + m_uiChainLightningTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +bool QuestAccept_npc_akuno(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_ESCAPING_TOMB) + { + if (npc_akunoAI* pEscortAI = dynamic_cast(pCreature->AI())) + { + pCreature->SetStandState(UNIT_STAND_STATE_STAND); + pCreature->setFaction(FACTION_ESCORT_N_NEUTRAL_ACTIVE); + + DoScriptText(SAY_AKU_START, pCreature); + pEscortAI->Start(true, false, pPlayer->GetGUID(), pQuest); + } + } + return true; +} + +CreatureAI* GetAI_npc_akuno(Creature* pCreature) +{ + return new npc_akunoAI(pCreature); +} + +/*###### +## npc_floon +######*/ + +enum +{ + SAY_FLOON_ATTACK = -1000195, + + SPELL_SILENCE = 6726, + SPELL_FROSTBOLT = 9672, + SPELL_FROST_NOVA = 11831, + + FACTION_HOSTILE_FL = 1738, + QUEST_CRACK_SKULLS = 10009 +}; + +#define GOSSIP_FLOON1 "You owe Sim'salabim money. Hand them over or die!" +#define GOSSIP_FLOON2 "Hand over the money or die...again!" + +struct MANGOS_DLL_DECL npc_floonAI : public ScriptedAI +{ + npc_floonAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_uiNormFaction = pCreature->getFaction(); + Reset(); + } + + uint32 m_uiNormFaction; + uint32 m_uiSilence_Timer; + uint32 m_uiFrostbolt_Timer; + uint32 m_uiFrostNova_Timer; + + void Reset() + { + m_uiSilence_Timer = 2000; + m_uiFrostbolt_Timer = 4000; + m_uiFrostNova_Timer = 9000; + + if (m_creature->getFaction() != m_uiNormFaction) + m_creature->setFaction(m_uiNormFaction); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiSilence_Timer < uiDiff) + { + DoCast(m_creature->getVictim(),SPELL_SILENCE); + m_uiSilence_Timer = 30000; + }else m_uiSilence_Timer -= uiDiff; + + if (m_uiFrostNova_Timer < uiDiff) + { + DoCast(m_creature,SPELL_FROST_NOVA); + m_uiFrostNova_Timer = 20000; + }else m_uiFrostNova_Timer -= uiDiff; + + if (m_uiFrostbolt_Timer < uiDiff) + { + DoCast(m_creature->getVictim(),SPELL_FROSTBOLT); + m_uiFrostbolt_Timer = 5000; + }else m_uiFrostbolt_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_floon(Creature* pCreature) +{ + return new npc_floonAI(pCreature); +} + +bool GossipHello_npc_floon(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->GetQuestStatus(QUEST_CRACK_SKULLS) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_FLOON1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + + pPlayer->SEND_GOSSIP_MENU(9442, pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_floon(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_FLOON2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(9443, pCreature->GetGUID()); + } + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + pPlayer->CLOSE_GOSSIP_MENU(); + pCreature->setFaction(FACTION_HOSTILE_FL); + DoScriptText(SAY_FLOON_ATTACK, pCreature, pPlayer); + ((npc_floonAI*)pCreature->AI())->AttackStart(pPlayer); + } + return true; +} + +/*###### +## npc_skyguard_handler_deesak +######*/ + +#define GOSSIP_SKYGUARD "Fly me to Ogri'la please" + +bool GossipHello_npc_skyguard_handler_deesak(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetReputationRank(1031) >= REP_HONORED) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SKYGUARD, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_skyguard_handler_deesak(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->CastSpell(pPlayer,41279,true); //TaxiPath 705 (Taxi - Skettis to Skyguard Outpost) + } + return true; +} + +/*###### +## npc_letoll +######*/ + +enum +{ + SAY_LE_START = -1000511, + SAY_LE_KEEP_SAFE = -1000512, + SAY_LE_NORTH = -1000513, + SAY_LE_ARRIVE = -1000514, + SAY_LE_BURIED = -1000515, + SAY_LE_ALMOST = -1000516, + SAY_LE_DRUM = -1000517, + SAY_LE_DRUM_REPLY = -1000518, + SAY_LE_DISCOVERY = -1000519, + SAY_LE_DISCOVERY_REPLY = -1000520, + SAY_LE_NO_LEAVE = -1000521, + SAY_LE_NO_LEAVE_REPLY1 = -1000522, + SAY_LE_NO_LEAVE_REPLY2 = -1000523, + SAY_LE_NO_LEAVE_REPLY3 = -1000524, + SAY_LE_NO_LEAVE_REPLY4 = -1000525, + SAY_LE_SHUT = -1000526, + SAY_LE_REPLY_HEAR = -1000527, + SAY_LE_IN_YOUR_FACE = -1000528, + SAY_LE_HELP_HIM = -1000529, + EMOTE_LE_PICK_UP = -1000530, + SAY_LE_THANKS = -1000531, + + QUEST_DIGGING_BONES = 10922, + + NPC_RESEARCHER = 22464, + NPC_BONE_SIFTER = 22466, + + MAX_RESEARCHER = 4 +}; + +//Some details still missing from here, and will also have issues if followers evade for any reason. +struct MANGOS_DLL_DECL npc_letollAI : public npc_escortAI +{ + npc_letollAI(Creature* pCreature) : npc_escortAI(pCreature) + { + m_uiEventTimer = 5000; + m_uiEventCount = 0; + Reset(); + } + + std::list m_lResearchersList; + + uint32 m_uiEventTimer; + uint32 m_uiEventCount; + + void Reset() {} + + //will make them follow, but will only work until they enter combat with any unit + void SetFormation() + { + uint32 uiCount = 0; + + for(std::list::iterator itr = m_lResearchersList.begin(); itr != m_lResearchersList.end(); ++itr) + { + float fAngle = uiCount < MAX_RESEARCHER ? M_PI/MAX_RESEARCHER - (uiCount*2*M_PI/MAX_RESEARCHER) : 0.0f; + + if ((*itr)->isAlive() && !(*itr)->isInCombat()) + (*itr)->GetMotionMaster()->MoveFollow(m_creature, 2.5f, fAngle); + + ++uiCount; + } + } + + Creature* GetAvailableResearcher(uint8 uiListNum) + { + if (!m_lResearchersList.empty()) + { + uint8 uiNum = 1; + + for(std::list::iterator itr = m_lResearchersList.begin(); itr != m_lResearchersList.end(); ++itr) + { + if (uiListNum && uiListNum != uiNum) + { + ++uiNum; + continue; + } + + if ((*itr)->isAlive() && (*itr)->IsWithinDistInMap(m_creature, 20.0f)) + return (*itr); + } + } + + return NULL; + } + + void JustStartedEscort() + { + m_uiEventTimer = 5000; + m_uiEventCount = 0; + + m_lResearchersList.clear(); + + GetCreatureListWithEntryInGrid(m_lResearchersList, m_creature, NPC_RESEARCHER, 25.0f); + + if (!m_lResearchersList.empty()) + SetFormation(); + } + + void WaypointReached(uint32 uiPointId) + { + switch(uiPointId) + { + case 0: + if (Player* pPlayer = GetPlayerForEscort()) + DoScriptText(SAY_LE_KEEP_SAFE, m_creature, pPlayer); + break; + case 1: + DoScriptText(SAY_LE_NORTH, m_creature); + break; + case 10: + DoScriptText(SAY_LE_ARRIVE, m_creature); + break; + case 12: + DoScriptText(SAY_LE_BURIED, m_creature); + SetEscortPaused(true); + break; + case 13: + SetRun(); + break; + } + } + + void Aggro(Unit* pWho) + { + if (pWho->isInCombat() && pWho->GetTypeId() == TYPEID_UNIT && pWho->GetEntry() == NPC_BONE_SIFTER) + DoScriptText(SAY_LE_HELP_HIM, m_creature); + } + + void JustSummoned(Creature* pSummoned) + { + Player* pPlayer = GetPlayerForEscort(); + + if (pPlayer && pPlayer->isAlive()) + pSummoned->AI()->AttackStart(pPlayer); + else + pSummoned->AI()->AttackStart(m_creature); + } + + void UpdateEscortAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + { + if (HasEscortState(STATE_ESCORT_PAUSED)) + { + if (m_uiEventTimer < uiDiff) + { + m_uiEventTimer = 7000; + + switch(m_uiEventCount) + { + case 0: + DoScriptText(SAY_LE_ALMOST, m_creature); + break; + case 1: + DoScriptText(SAY_LE_DRUM, m_creature); + break; + case 2: + if (Creature* pResearcher = GetAvailableResearcher(0)) + DoScriptText(SAY_LE_DRUM_REPLY, pResearcher); + break; + case 3: + DoScriptText(SAY_LE_DISCOVERY, m_creature); + break; + case 4: + if (Creature* pResearcher = GetAvailableResearcher(0)) + DoScriptText(SAY_LE_DISCOVERY_REPLY, pResearcher); + break; + case 5: + DoScriptText(SAY_LE_NO_LEAVE, m_creature); + break; + case 6: + if (Creature* pResearcher = GetAvailableResearcher(1)) + DoScriptText(SAY_LE_NO_LEAVE_REPLY1, pResearcher); + break; + case 7: + if (Creature* pResearcher = GetAvailableResearcher(2)) + DoScriptText(SAY_LE_NO_LEAVE_REPLY2, pResearcher); + break; + case 8: + if (Creature* pResearcher = GetAvailableResearcher(3)) + DoScriptText(SAY_LE_NO_LEAVE_REPLY3, pResearcher); + break; + case 9: + if (Creature* pResearcher = GetAvailableResearcher(4)) + DoScriptText(SAY_LE_NO_LEAVE_REPLY4, pResearcher); + break; + case 10: + DoScriptText(SAY_LE_SHUT, m_creature); + break; + case 11: + if (Creature* pResearcher = GetAvailableResearcher(0)) + DoScriptText(SAY_LE_REPLY_HEAR, pResearcher); + break; + case 12: + DoScriptText(SAY_LE_IN_YOUR_FACE, m_creature); + m_creature->SummonCreature(NPC_BONE_SIFTER, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + break; + case 13: + DoScriptText(EMOTE_LE_PICK_UP, m_creature); + + if (Player* pPlayer = GetPlayerForEscort()) + { + DoScriptText(SAY_LE_THANKS, m_creature, pPlayer); + pPlayer->GroupEventHappens(QUEST_DIGGING_BONES, m_creature); + } + + SetEscortPaused(false); + break; + } + + ++m_uiEventCount; + } + else + m_uiEventTimer -= uiDiff; + } + + return; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_letoll(Creature* pCreature) +{ + return new npc_letollAI(pCreature); +} + +bool QuestAccept_npc_letoll(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_DIGGING_BONES) + { + if (npc_letollAI* pEscortAI = dynamic_cast(pCreature->AI())) + { + DoScriptText(SAY_LE_START, pCreature); + pCreature->setFaction(FACTION_ESCORT_N_NEUTRAL_PASSIVE); + + pEscortAI->Start(false, false, pPlayer->GetGUID(), pQuest, true); + } + } + + return true; +} + +/*###### +## npc_mana_bomb_exp_trigger +######*/ + +enum +{ + SAY_COUNT_1 = -1000472, + SAY_COUNT_2 = -1000473, + SAY_COUNT_3 = -1000474, + SAY_COUNT_4 = -1000475, + SAY_COUNT_5 = -1000476, + + SPELL_MANA_BOMB_LIGHTNING = 37843, + SPELL_MANA_BOMB_EXPL = 35513, + + NPC_MANA_BOMB_EXPL_TRIGGER = 20767, + NPC_MANA_BOMB_KILL_TRIGGER = 21039 +}; + +struct MANGOS_DLL_DECL npc_mana_bomb_exp_triggerAI : public ScriptedAI +{ + npc_mana_bomb_exp_triggerAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + GameObject* pManaBomb; + + bool m_bIsActivated; + uint32 m_uiEventTimer; + uint32 m_uiEventCounter; + + void Reset() + { + pManaBomb = NULL; + m_bIsActivated = false; + m_uiEventTimer = 1000; + m_uiEventCounter = 0; + } + + void DoTrigger(Player* pPlayer, GameObject* pGo) + { + if (m_bIsActivated) + return; + + m_bIsActivated = true; + + pPlayer->KilledMonsterCredit(NPC_MANA_BOMB_KILL_TRIGGER, 0); + + pManaBomb = pGo; + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_bIsActivated) + return; + + if (m_uiEventTimer < uiDiff) + { + m_uiEventTimer = 1000; + + if (m_uiEventCounter < 10) + m_creature->CastSpell(m_creature, SPELL_MANA_BOMB_LIGHTNING, false); + + switch(m_uiEventCounter) + { + case 5: + if (pManaBomb) + pManaBomb->SetGoState(GO_STATE_ACTIVE); + + DoScriptText(SAY_COUNT_1, m_creature); + break; + case 6: + DoScriptText(SAY_COUNT_2, m_creature); + break; + case 7: + DoScriptText(SAY_COUNT_3, m_creature); + break; + case 8: + DoScriptText(SAY_COUNT_4, m_creature); + break; + case 9: + DoScriptText(SAY_COUNT_5, m_creature); + break; + case 10: + m_creature->CastSpell(m_creature, SPELL_MANA_BOMB_EXPL, false); + break; + case 30: + if (pManaBomb) + pManaBomb->SetGoState(GO_STATE_READY); + + Reset(); + break; + } + + ++m_uiEventCounter; + } + else + m_uiEventTimer -= uiDiff; + } +}; + +CreatureAI* GetAI_npc_mana_bomb_exp_trigger(Creature* pCreature) +{ + return new npc_mana_bomb_exp_triggerAI(pCreature); +} + +/*###### +## go_mana_bomb +######*/ + +bool GOHello_go_mana_bomb(Player* pPlayer, GameObject* pGo) +{ + if (Creature* pCreature = GetClosestCreatureWithEntry(pGo, NPC_MANA_BOMB_EXPL_TRIGGER, INTERACTION_DISTANCE)) + { + if (npc_mana_bomb_exp_triggerAI* pBombAI = dynamic_cast(pCreature->AI())) + pBombAI->DoTrigger(pPlayer, pGo); + } + + return true; +} + +/*###### +## npc_slim +######*/ + +enum +{ + FACTION_CONSORTIUM = 933 +}; + +bool GossipHello_npc_slim(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isVendor() && pPlayer->GetReputationRank(FACTION_CONSORTIUM) >= REP_FRIENDLY) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); + pPlayer->SEND_GOSSIP_MENU(9896, pCreature->GetGUID()); + } + else + pPlayer->SEND_GOSSIP_MENU(9895, pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_slim(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_TRADE) + pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + + return true; +} + +void AddSC_terokkar_forest() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "mob_unkor_the_ruthless"; + newscript->GetAI = &GetAI_mob_unkor_the_ruthless; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_infested_root_walker"; + newscript->GetAI = &GetAI_mob_infested_root_walker; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_rotting_forest_rager"; + newscript->GetAI = &GetAI_mob_rotting_forest_rager; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_netherweb_victim"; + newscript->GetAI = &GetAI_mob_netherweb_victim; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_akuno"; + newscript->GetAI = &GetAI_npc_akuno; + newscript->pQuestAccept = &QuestAccept_npc_akuno; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_floon"; + newscript->GetAI = &GetAI_npc_floon; + newscript->pGossipHello = &GossipHello_npc_floon; + newscript->pGossipSelect = &GossipSelect_npc_floon; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_letoll"; + newscript->GetAI = &GetAI_npc_letoll; + newscript->pQuestAccept = &QuestAccept_npc_letoll; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_mana_bomb_exp_trigger"; + newscript->GetAI = &GetAI_npc_mana_bomb_exp_trigger; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "go_mana_bomb"; + newscript->pGOHello = &GOHello_go_mana_bomb; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_skyguard_handler_deesak"; + newscript->pGossipHello = &GossipHello_npc_skyguard_handler_deesak; + newscript->pGossipSelect = &GossipSelect_npc_skyguard_handler_deesak; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_slim"; + newscript->pGossipHello = &GossipHello_npc_slim; + newscript->pGossipSelect = &GossipSelect_npc_slim; + newscript->RegisterSelf(); +} diff --git a/scripts/outland/zangarmarsh.cpp b/scripts/outland/zangarmarsh.cpp new file mode 100644 index 000000000..7bf66d073 --- /dev/null +++ b/scripts/outland/zangarmarsh.cpp @@ -0,0 +1,415 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Zangarmarsh +SD%Complete: 100 +SDComment: Quest support: 9752, 9785, 9803, 10009. Mark Of ... buffs. +SDCategory: Zangarmarsh +EndScriptData */ + +/* ContentData +npcs_ashyen_and_keleth +npc_cooshcoosh +npc_elder_kuruti +npc_kayra_longmane +npc_mortog_steamhead +npc_timothy_daniels +EndContentData */ + +#include "precompiled.h" +#include "escort_ai.h" + +/*###### +## npcs_ashyen_and_keleth +######*/ + +#define SAY_REWARD_BLESS -1000207 + +#define GOSSIP_ITEM_BLESS_ASH "Grant me your mark, wise ancient." +#define GOSSIP_ITEM_BLESS_KEL "Grant me your mark, mighty ancient." + +//#define TEXT_BLESSINGS "" + +bool GossipHello_npcs_ashyen_and_keleth(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->GetReputationRank(942) > REP_NEUTRAL) + { + if (pCreature->GetEntry() == 17900) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BLESS_ASH, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + if (pCreature->GetEntry() == 17901) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BLESS_KEL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + } + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npcs_ashyen_and_keleth(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + pCreature->setPowerType(POWER_MANA); + pCreature->SetMaxPower(POWER_MANA,200); //set a "fake" mana value, we can't depend on database doing it in this case + pCreature->SetPower(POWER_MANA,200); + + if (pCreature->GetEntry() == 17900) //check which creature we are dealing with + { + switch (pPlayer->GetReputationRank(942)) + { //mark of lore + case REP_FRIENDLY: + pCreature->CastSpell(pPlayer, 31808, true); + break; + case REP_HONORED: + pCreature->CastSpell(pPlayer, 31810, true); + break; + case REP_REVERED: + pCreature->CastSpell(pPlayer, 31811, true); + break; + case REP_EXALTED: + pCreature->CastSpell(pPlayer, 31815, true); + break; + } + } + + if (pCreature->GetEntry() == 17901) + { + switch (pPlayer->GetReputationRank(942)) //mark of war + { + case REP_FRIENDLY: + pCreature->CastSpell(pPlayer, 31807, true); + break; + case REP_HONORED: + pCreature->CastSpell(pPlayer, 31812, true); + break; + case REP_REVERED: + pCreature->CastSpell(pPlayer, 31813, true); + break; + case REP_EXALTED: + pCreature->CastSpell(pPlayer, 31814, true); + break; + } + } + + DoScriptText(SAY_REWARD_BLESS, pCreature, pPlayer); + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetGUID()); + } + return true; +} + +/*###### +## npc_cooshcoosh +######*/ + +enum +{ + SPELL_LIGHTNING_BOLT = 9532, + QUEST_CRACK_SKULLS = 10009, + FACTION_HOSTILE_CO = 45 +}; + +#define GOSSIP_COOSH "You owe Sim'salabim money. Hand them over or die!" + +struct MANGOS_DLL_DECL npc_cooshcooshAI : public ScriptedAI +{ + npc_cooshcooshAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_uiNormFaction = pCreature->getFaction(); + Reset(); + } + + uint32 m_uiNormFaction; + uint32 m_uiLightningBolt_Timer; + + void Reset() + { + m_uiLightningBolt_Timer = 2000; + + if (m_creature->getFaction() != m_uiNormFaction) + m_creature->setFaction(m_uiNormFaction); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiLightningBolt_Timer < uiDiff) + { + DoCast(m_creature->getVictim(),SPELL_LIGHTNING_BOLT); + m_uiLightningBolt_Timer = 5000; + }else m_uiLightningBolt_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_cooshcoosh(Creature* pCreature) +{ + return new npc_cooshcooshAI(pCreature); +} + +bool GossipHello_npc_cooshcoosh(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->GetQuestStatus(QUEST_CRACK_SKULLS) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_COOSH, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + + pPlayer->SEND_GOSSIP_MENU(9441, pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_cooshcoosh(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF) + { + pPlayer->CLOSE_GOSSIP_MENU(); + pCreature->setFaction(FACTION_HOSTILE_CO); + ((npc_cooshcooshAI*)pCreature->AI())->AttackStart(pPlayer); + } + return true; +} + +/*###### +## npc_elder_kuruti +######*/ + +#define GOSSIP_ITEM_KUR1 "Offer treat" +#define GOSSIP_ITEM_KUR2 "Im a messenger for Draenei" +#define GOSSIP_ITEM_KUR3 "Get message" + +bool GossipHello_npc_elder_kuruti(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->GetQuestStatus(9803) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KUR1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + + pPlayer->SEND_GOSSIP_MENU(9226, pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_elder_kuruti(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KUR2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->SEND_GOSSIP_MENU(9227, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 1: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KUR3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->SEND_GOSSIP_MENU(9229, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: + { + if (!pPlayer->HasItemCount(24573,1)) + { + ItemPosCountVec dest; + uint8 msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, 24573, 1, false); + if (msg == EQUIP_ERR_OK) + { + pPlayer->StoreNewItem(dest, 24573, true); + } + else + pPlayer->SendEquipError(msg,NULL,NULL); + } + pPlayer->SEND_GOSSIP_MENU(9231, pCreature->GetGUID()); + break; + } + } + return true; +} + +/*##### +## npc_kayra_longmane +#####*/ + +enum +{ + SAY_START = -1000343, + SAY_AMBUSH1 = -1000344, + SAY_PROGRESS = -1000345, + SAY_AMBUSH2 = -1000346, + SAY_END = -1000347, + + QUEST_ESCAPE_FROM = 9752, + NPC_SLAVEBINDER = 18042 +}; + +struct MANGOS_DLL_DECL npc_kayra_longmaneAI : public npc_escortAI +{ + npc_kayra_longmaneAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } + + void WaypointReached(uint32 i) + { + Player* pPlayer = GetPlayerForEscort(); + + if (!pPlayer) + return; + + switch(i) + { + case 4: + DoScriptText(SAY_AMBUSH1, m_creature, pPlayer); + 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, m_creature, pPlayer); + SetRun(); + break; + case 16: + DoScriptText(SAY_AMBUSH2, m_creature, pPlayer); + 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: + DoScriptText(SAY_END, m_creature, pPlayer); + break; + case 25: + pPlayer->GroupEventHappens(QUEST_ESCAPE_FROM, m_creature); + break; + } + } + + void Reset() { } +}; + +bool QuestAccept_npc_kayra_longmane(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_ESCAPE_FROM) + { + DoScriptText(SAY_START, pCreature, pPlayer); + + if (npc_kayra_longmaneAI* pEscortAI = dynamic_cast(pCreature->AI())) + pEscortAI->Start(false, false, pPlayer->GetGUID(), pQuest); + } + return true; +} + +CreatureAI* GetAI_npc_kayra_longmane(Creature* pCreature) +{ + return new npc_kayra_longmaneAI(pCreature); +} + +/*###### +## npc_mortog_steamhead +######*/ + +bool GossipHello_npc_mortog_steamhead(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isVendor() && pPlayer->GetReputationRank(942) == REP_EXALTED) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_mortog_steamhead(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_TRADE) + { + pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + } + return true; +} + +/*###### +## npc_timothy_daniels +######*/ + +#define GOSSIP_TIMOTHY_DANIELS_ITEM1 "Specialist, eh? Just what kind of specialist are you, anyway?" +#define GOSSIP_TEXT_BROWSE_POISONS "Let me browse your reagents and poison supplies." + +enum +{ + GOSSIP_TEXTID_TIMOTHY_DANIELS1 = 9239 +}; + +bool GossipHello_npc_timothy_daniels(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pCreature->isVendor()) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_POISONS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); + + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TIMOTHY_DANIELS_ITEM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_timothy_daniels(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_TIMOTHY_DANIELS1, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_TRADE: + pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + break; + } + + return true; +} + +/*###### +## AddSC +######*/ + +void AddSC_zangarmarsh() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npcs_ashyen_and_keleth"; + newscript->pGossipHello = &GossipHello_npcs_ashyen_and_keleth; + newscript->pGossipSelect = &GossipSelect_npcs_ashyen_and_keleth; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_cooshcoosh"; + newscript->GetAI = &GetAI_npc_cooshcoosh; + newscript->pGossipHello = &GossipHello_npc_cooshcoosh; + newscript->pGossipSelect = &GossipSelect_npc_cooshcoosh; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_elder_kuruti"; + newscript->pGossipHello = &GossipHello_npc_elder_kuruti; + newscript->pGossipSelect = &GossipSelect_npc_elder_kuruti; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_kayra_longmane"; + newscript->GetAI = &GetAI_npc_kayra_longmane; + newscript->pQuestAccept = &QuestAccept_npc_kayra_longmane; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_mortog_steamhead"; + newscript->pGossipHello = &GossipHello_npc_mortog_steamhead; + newscript->pGossipSelect = &GossipSelect_npc_mortog_steamhead; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_timothy_daniels"; + newscript->pGossipHello = &GossipHello_npc_timothy_daniels; + newscript->pGossipSelect = &GossipSelect_npc_timothy_daniels; + newscript->RegisterSelf(); +} diff --git a/scripts/world/areatrigger_scripts.cpp b/scripts/world/areatrigger_scripts.cpp new file mode 100644 index 000000000..abefe44c2 --- /dev/null +++ b/scripts/world/areatrigger_scripts.cpp @@ -0,0 +1,146 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Areatrigger_Scripts +SD%Complete: 100 +SDComment: Quest support: 6681, 11686, 10589/10604. +SDCategory: Areatrigger +EndScriptData */ + +/* ContentData +at_legion_teleporter 4560 Teleporter TO Invasion Point: Cataclysm +EndContentData */ + +#include "precompiled.h" + +/*###### +## at_legion_teleporter +######*/ + +enum +{ + SPELL_TELE_A_TO = 37387, + QUEST_GAINING_ACCESS_A = 10589, + + SPELL_TELE_H_TO = 37389, + QUEST_GAINING_ACCESS_H = 10604 +}; + +bool AreaTrigger_at_legion_teleporter(Player* pPlayer, AreaTriggerEntry* pAt) +{ + if (pPlayer->isAlive() && !pPlayer->isInCombat()) + { + if (pPlayer->GetTeam()== ALLIANCE && pPlayer->GetQuestRewardStatus(QUEST_GAINING_ACCESS_A)) + { + pPlayer->CastSpell(pPlayer,SPELL_TELE_A_TO,false); + return true; + } + + if (pPlayer->GetTeam()== HORDE && pPlayer->GetQuestRewardStatus(QUEST_GAINING_ACCESS_H)) + { + pPlayer->CastSpell(pPlayer,SPELL_TELE_H_TO,false); + return true; + } + + return false; + } + return false; +} + +/*###### +## at_ravenholdt +######*/ + +enum +{ + QUEST_MANOR_RAVENHOLDT = 6681, + NPC_RAVENHOLDT = 13936 +}; + +bool AreaTrigger_at_ravenholdt(Player* pPlayer, AreaTriggerEntry* pAt) +{ + if (pPlayer->GetQuestStatus(QUEST_MANOR_RAVENHOLDT) == QUEST_STATUS_INCOMPLETE) + pPlayer->KilledMonsterCredit(NPC_RAVENHOLDT, 0); + + return false; +} + +/*###### +## Quest 11686 +######*/ + +enum +{ + QUEST_THE_WARSONG_FARMS = 11686, + NPC_CREDIT_SLAUGHTERHOUSE = 25672, + NPC_CREDIT_GRAINERY = 25669, + NPC_CREDIT_TORP_FARM = 25671 +}; + +bool AreaTrigger_at_warsong_slaughterhouse(Player* pPlayer, AreaTriggerEntry *pAt) +{ + if (!pPlayer->isDead() && pPlayer->GetQuestStatus(QUEST_THE_WARSONG_FARMS) == QUEST_STATUS_INCOMPLETE) + pPlayer->KilledMonsterCredit(NPC_CREDIT_SLAUGHTERHOUSE, 0); + + return true; +} + +bool AreaTrigger_at_warsong_grainery(Player* pPlayer, AreaTriggerEntry *pAt) +{ + if (!pPlayer->isDead() && pPlayer->GetQuestStatus(QUEST_THE_WARSONG_FARMS) == QUEST_STATUS_INCOMPLETE) + pPlayer->KilledMonsterCredit(NPC_CREDIT_GRAINERY, 0); + + return true; +} + +bool AreaTrigger_at_torp_farm(Player* pPlayer, AreaTriggerEntry *pAt) +{ + if (!pPlayer->isDead() && pPlayer->GetQuestStatus(QUEST_THE_WARSONG_FARMS) == QUEST_STATUS_INCOMPLETE) + pPlayer->KilledMonsterCredit(NPC_CREDIT_TORP_FARM, 0); + + return true; +} + +void AddSC_areatrigger_scripts() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "at_legion_teleporter"; + newscript->pAreaTrigger = &AreaTrigger_at_legion_teleporter; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "at_ravenholdt"; + newscript->pAreaTrigger = &AreaTrigger_at_ravenholdt; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "at_warsong_slaughterhouse"; + newscript->pAreaTrigger = &AreaTrigger_at_warsong_slaughterhouse; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "at_warsong_grainery"; + newscript->pAreaTrigger = &AreaTrigger_at_warsong_grainery; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "at_torp_farm"; + newscript->pAreaTrigger = &AreaTrigger_at_torp_farm; + newscript->RegisterSelf(); +} diff --git a/scripts/world/boss_emeriss.cpp b/scripts/world/boss_emeriss.cpp new file mode 100644 index 000000000..458961ef2 --- /dev/null +++ b/scripts/world/boss_emeriss.cpp @@ -0,0 +1,142 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Emeriss +SD%Complete: 90 +SDComment: Teleport function & Mark of Nature missing +SDCategory: Bosses +EndScriptData */ + +#include "precompiled.h" + +enum +{ + SAY_AGGRO = -1000401, + SAY_CASTCORRUPTION = -1000402, + + SPELL_SLEEP = 24777, + SPELL_NOXIOUSBREATH = 24818, + SPELL_TAILSWEEP = 15847, + //SPELL_MARKOFNATURE = 25040, // Not working + SPELL_VOLATILEINFECTION = 24928, + SPELL_CORRUPTIONOFEARTH = 24910 +}; + +struct MANGOS_DLL_DECL boss_emerissAI : public ScriptedAI +{ + boss_emerissAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 m_uiSleep_Timer; + uint32 m_uiNoxiousBreath_Timer; + uint32 m_uiTailSweep_Timer; + //uint32 m_uiMarkOfNature_Timer; + uint32 m_uiVolatileInfection_Timer; + uint32 m_uiCorruptionsCasted; + + void Reset() + { + m_uiSleep_Timer = urand(15000, 20000); + m_uiNoxiousBreath_Timer = 8000; + m_uiTailSweep_Timer = 4000; + //m_uiMarkOfNature_Timer = 45000; + m_uiVolatileInfection_Timer = 12000; + m_uiCorruptionsCasted = 0; + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Sleep_Timer + if (m_uiSleep_Timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, SPELL_SLEEP); + + m_uiSleep_Timer = urand(8000, 16000); + } + else + m_uiSleep_Timer -= uiDiff; + + //NoxiousBreath_Timer + if (m_uiNoxiousBreath_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_NOXIOUSBREATH); + m_uiNoxiousBreath_Timer = urand(14000, 20000); + } + else + m_uiNoxiousBreath_Timer -= uiDiff; + + //Tailsweep every 2 seconds + if (m_uiTailSweep_Timer < uiDiff) + { + DoCast(m_creature, SPELL_TAILSWEEP); + m_uiTailSweep_Timer = 2000; + } + else + m_uiTailSweep_Timer -= uiDiff; + + //MarkOfNature_Timer + //if (m_uiMarkOfNature_Timer < uiDiff) + //{ + // DoCast(m_creature->getVictim(), SPELL_MARKOFNATURE); + // m_uiMarkOfNature_Timer = 45000; + //} + //else + //m_uiMarkOfNature_Timer -= uiDiff; + + //VolatileInfection_Timer + if (m_uiVolatileInfection_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_VOLATILEINFECTION); + m_uiVolatileInfection_Timer = urand(7000, 12000); + } + else + m_uiVolatileInfection_Timer -= uiDiff; + + //CorruptionofEarth at 75%, 50% and 25% + if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) <= (100-(25*m_uiCorruptionsCasted))) + { + ++m_uiCorruptionsCasted; // prevent casting twice on same hp + DoScriptText(SAY_CASTCORRUPTION, m_creature); + DoCast(m_creature->getVictim(), SPELL_CORRUPTIONOFEARTH); + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_emeriss(Creature* pCreature) +{ + return new boss_emerissAI(pCreature); +} + +void AddSC_boss_emeriss() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_emeriss"; + newscript->GetAI = &GetAI_boss_emeriss; + newscript->RegisterSelf(); +} diff --git a/scripts/world/boss_lethon.cpp b/scripts/world/boss_lethon.cpp new file mode 100644 index 000000000..40fe7e59b --- /dev/null +++ b/scripts/world/boss_lethon.cpp @@ -0,0 +1,24 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Lethon +SD%Complete: 0 +SDComment: Place Holder +SDCategory: Bosses +EndScriptData */ + +#include "precompiled.h" diff --git a/scripts/world/boss_taerar.cpp b/scripts/world/boss_taerar.cpp new file mode 100644 index 000000000..8d6cf7d19 --- /dev/null +++ b/scripts/world/boss_taerar.cpp @@ -0,0 +1,262 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Taerar +SD%Complete: 70 +SDComment: Mark of Nature & Teleport NYI. Fix the way to be banished. +SDCategory: Bosses +EndScriptData */ + +#include "precompiled.h" + +enum +{ + SAY_AGGRO = -1000399, + SAY_SUMMONSHADE = -1000400, + + //Spells of Taerar + SPELL_SLEEP = 24777, + SPELL_NOXIOUSBREATH = 24818, + SPELL_TAILSWEEP = 15847, + // SPELL_MARKOFNATURE = 25040, // Not working + SPELL_ARCANEBLAST = 24857, + SPELL_BELLOWINGROAR = 22686, + + SPELL_SUMMONSHADE_1 = 24841, + SPELL_SUMMONSHADE_2 = 24842, + SPELL_SUMMONSHADE_3 = 24843, + + //Spells of Shades of Taerar + SPELL_POSIONCLOUD = 24840, + SPELL_POSIONBREATH = 20667 +}; + +uint32 m_auiSpellSummonShade[]= +{ + SPELL_SUMMONSHADE_1, SPELL_SUMMONSHADE_2, SPELL_SUMMONSHADE_3 +}; + +struct MANGOS_DLL_DECL boss_taerarAI : public ScriptedAI +{ + boss_taerarAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 m_uiSleep_Timer; + uint32 m_uiNoxiousBreath_Timer; + uint32 m_uiTailSweep_Timer; + //uint32 m_uiMarkOfNature_Timer; + uint32 m_uiArcaneBlast_Timer; + uint32 m_uiBellowingRoar_Timer; + uint32 m_uiShades_Timer; + uint32 m_uiShadesSummoned; + + bool m_bShades; + + void Reset() + { + m_uiSleep_Timer = urand(15000, 20000); + m_uiNoxiousBreath_Timer = 8000; + m_uiTailSweep_Timer = 4000; + //m_uiMarkOfNature_Timer = 45000; + m_uiArcaneBlast_Timer = 12000; + m_uiBellowingRoar_Timer = 30000; + m_uiShades_Timer = 60000; //The time that Taerar is banished + m_uiShadesSummoned = 0; + + m_bShades = false; + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void JustSummoned(Creature* pSummoned) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_bShades && m_uiShades_Timer < uiDiff) + { + //Become unbanished again + m_creature->setFaction(14); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_bShades = false; + } + else if (m_bShades) + { + m_uiShades_Timer -= uiDiff; + //Do nothing while banished + return; + } + + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Sleep_Timer + if (m_uiSleep_Timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, SPELL_SLEEP); + + m_uiSleep_Timer = urand(8000, 15000); + } + else + m_uiSleep_Timer -= uiDiff; + + //NoxiousBreath_Timer + if (m_uiNoxiousBreath_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_NOXIOUSBREATH); + m_uiNoxiousBreath_Timer = urand(14000, 20000); + } + else + m_uiNoxiousBreath_Timer -= uiDiff; + + //Tailsweep every 2 seconds + if (m_uiTailSweep_Timer < uiDiff) + { + DoCast(m_creature, SPELL_TAILSWEEP); + m_uiTailSweep_Timer = 2000; + } + else + m_uiTailSweep_Timer -= uiDiff; + + //MarkOfNature_Timer + //if (m_uiMarkOfNature_Timer < uiDiff) + //{ + // DoCast(m_creature->getVictim(), SPELL_MARKOFNATURE); + // m_uiMarkOfNature_Timer = 45000; + //} + //else + //m_uiMarkOfNature_Timer -= uiDiff; + + //ArcaneBlast_Timer + if (m_uiArcaneBlast_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_ARCANEBLAST); + m_uiArcaneBlast_Timer = urand(7000, 12000); + } + else + m_uiArcaneBlast_Timer -= uiDiff; + + //BellowingRoar_Timer + if (m_uiBellowingRoar_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_BELLOWINGROAR); + m_uiBellowingRoar_Timer = urand(20000, 30000); + } + else + m_uiBellowingRoar_Timer -= uiDiff; + + //Summon 3 Shades at 75%, 50% and 25% (if bShades is true we already left in line 117, no need to check here again) + if (!m_bShades && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) <= (100-(25*m_uiShadesSummoned))) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + { + //Inturrupt any spell casting + m_creature->InterruptNonMeleeSpells(false); + + //horrible workaround, need to fix + m_creature->setFaction(35); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + DoScriptText(SAY_SUMMONSHADE, m_creature); + + int iSize = sizeof(m_auiSpellSummonShade) / sizeof(uint32); + + for(int i = 0; i < iSize; ++i) + m_creature->CastSpell(pTarget, m_auiSpellSummonShade[i], true); + + ++m_uiShadesSummoned; // prevent casting twice at same health + m_bShades = true; + } + m_uiShades_Timer = 60000; + } + + DoMeleeAttackIfReady(); + } +}; + +// Shades of Taerar Script +struct MANGOS_DLL_DECL boss_shadeoftaerarAI : public ScriptedAI +{ + boss_shadeoftaerarAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 m_uiPoisonCloud_Timer; + uint32 m_uiPosionBreath_Timer; + + void Reset() + { + m_uiPoisonCloud_Timer = 8000; + m_uiPosionBreath_Timer = 12000; + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //PoisonCloud_Timer + if (m_uiPoisonCloud_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_POSIONCLOUD); + m_uiPoisonCloud_Timer = 30000; + } + else + m_uiPoisonCloud_Timer -= uiDiff; + + //PosionBreath_Timer + if (m_uiPosionBreath_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_POSIONBREATH); + m_uiPosionBreath_Timer = 12000; + } + else + m_uiPosionBreath_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_taerar(Creature* pCreature) +{ + return new boss_taerarAI(pCreature); +} + +CreatureAI* GetAI_boss_shadeoftaerar(Creature* pCreature) +{ + return new boss_shadeoftaerarAI(pCreature); +} + +void AddSC_boss_taerar() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_taerar"; + newscript->GetAI = &GetAI_boss_taerar; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_shade_of_taerar"; + newscript->GetAI = &GetAI_boss_shadeoftaerar; + newscript->RegisterSelf(); +} diff --git a/scripts/world/boss_ysondre.cpp b/scripts/world/boss_ysondre.cpp new file mode 100644 index 000000000..20cbdb948 --- /dev/null +++ b/scripts/world/boss_ysondre.cpp @@ -0,0 +1,200 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Ysondre +SD%Complete: 90 +SDComment: Mark of Nature & Teleport missing +SDCategory: Bosses +EndScriptData */ + +#include "precompiled.h" + +enum +{ + SAY_AGGRO = -1000360, + SAY_SUMMONDRUIDS = -1000361, + + SPELL_SLEEP = 24777, + SPELL_NOXIOUSBREATH = 24818, + SPELL_TAILSWEEP = 15847, + //SPELL_MARKOFNATURE = 25040, // Not working + SPELL_LIGHTNINGWAVE = 24819, + SPELL_SUMMONDRUIDS = 24795, + + SPELL_SUMMON_PLAYER = 24776, + + //druid spells + SPELL_MOONFIRE = 21669 +}; + +// Ysondre script +struct MANGOS_DLL_DECL boss_ysondreAI : public ScriptedAI +{ + boss_ysondreAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 m_uiSleep_Timer; + uint32 m_uiNoxiousBreath_Timer; + uint32 m_uiTailSweep_Timer; + //uint32 m_uiMarkOfNature_Timer; + uint32 m_uiLightningWave_Timer; + uint32 m_uiSummonDruidModifier; + + void Reset() + { + m_uiSleep_Timer = urand(15000, 20000); + m_uiNoxiousBreath_Timer = 8000; + m_uiTailSweep_Timer = 4000; + //m_uiMarkOfNature_Timer = 45000; + m_uiLightningWave_Timer = 12000; + m_uiSummonDruidModifier = 0; + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void JustSummoned(Creature* pSummoned) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Sleep_Timer + if (m_uiSleep_Timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, SPELL_SLEEP); + + m_uiSleep_Timer = urand(8000, 15000); + } + else + m_uiSleep_Timer -= uiDiff; + + //NoxiousBreath_Timer + if (m_uiNoxiousBreath_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_NOXIOUSBREATH); + m_uiNoxiousBreath_Timer = urand(14000, 20000); + } + else + m_uiNoxiousBreath_Timer -= uiDiff; + + //Tailsweep every 2 seconds + if (m_uiTailSweep_Timer < uiDiff) + { + DoCast(m_creature, SPELL_TAILSWEEP); + m_uiTailSweep_Timer = 2000; + } + else + m_uiTailSweep_Timer -= uiDiff; + + //MarkOfNature_Timer + //if (m_uiMarkOfNature_Timer < uiDiff) + //{ + // DoCast(m_creature->getVictim(), SPELL_MARKOFNATURE); + // m_uiMarkOfNature_Timer = 45000; + //} + //else + //m_uiMarkOfNature_Timer -= uiDiff; + + //LightningWave_Timer + if (m_uiLightningWave_Timer < uiDiff) + { + //Cast LIGHTNINGWAVE on a Random target + if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, SPELL_LIGHTNINGWAVE); + + m_uiLightningWave_Timer = urand(7000, 12000); + } + else + m_uiLightningWave_Timer -= uiDiff; + + //Summon Druids + if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) <= (100-(25*m_uiSummonDruidModifier))) + { + DoScriptText(SAY_SUMMONDRUIDS, m_creature); + + for(int i = 0; i < 10; ++i) + DoCast(m_creature, SPELL_SUMMONDRUIDS, true); + + ++m_uiSummonDruidModifier; + } + + DoMeleeAttackIfReady(); + } +}; + +// Summoned druid script +struct MANGOS_DLL_DECL mob_dementeddruidsAI : public ScriptedAI +{ + mob_dementeddruidsAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 m_uiMoonFire_Timer; + + void Reset() + { + m_uiMoonFire_Timer = 3000; + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //MoonFire_Timer + if (m_uiMoonFire_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_MOONFIRE); + m_uiMoonFire_Timer = 5000; + } + else + m_uiMoonFire_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_ysondre(Creature* pCreature) +{ + return new boss_ysondreAI(pCreature); +} + +CreatureAI* GetAI_mob_dementeddruids(Creature* pCreature) +{ + return new mob_dementeddruidsAI(pCreature); +} + +void AddSC_boss_ysondre() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_ysondre"; + newscript->GetAI = &GetAI_boss_ysondre; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_dementeddruids"; + newscript->GetAI = &GetAI_mob_dementeddruids; + newscript->RegisterSelf(); +} diff --git a/scripts/world/go_scripts.cpp b/scripts/world/go_scripts.cpp new file mode 100644 index 000000000..846b18a1e --- /dev/null +++ b/scripts/world/go_scripts.cpp @@ -0,0 +1,484 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: GO_Scripts +SD%Complete: 100 +SDComment: Quest support: 4285,4287,4288(crystal pylons), 4296, 5088, 6481, 10990, 10991, 10992. Field_Repair_Bot->Teaches spell 22704. Barov_journal->Teaches spell 26089 +SDCategory: Game Objects +EndScriptData */ + +/* ContentData +go_cat_figurine (the "trap" version of GO, two different exist) +go_northern_crystal_pylon +go_eastern_crystal_pylon +go_western_crystal_pylon +go_barov_journal +go_ethereum_prison +go_ethereum_stasis +go_field_repair_bot_74A +go_orb_of_command +go_resonite_cask +go_sacred_fire_of_life +go_shrine_of_the_birds +go_tablet_of_madness +go_tablet_of_the_seven +go_tele_to_dalaran_crystal +go_tele_to_violet_stand +EndContentData */ + +#include "precompiled.h" + +/*###### +## go_cat_figurine +######*/ + +enum +{ + SPELL_SUMMON_GHOST_SABER = 5968, +}; + +bool GOHello_go_cat_figurine(Player* pPlayer, GameObject* pGo) +{ + pPlayer->CastSpell(pPlayer,SPELL_SUMMON_GHOST_SABER,true); + return false; +} + +/*###### +## go_crystal_pylons (3x) +######*/ + +bool GOHello_go_northern_crystal_pylon(Player* pPlayer, GameObject* pGo) +{ + if (pGo->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER) + { + pPlayer->PrepareQuestMenu(pGo->GetGUID()); + pPlayer->SendPreparedQuest(pGo->GetGUID()); + } + + if (pPlayer->GetQuestStatus(4285) == QUEST_STATUS_INCOMPLETE) + pPlayer->AreaExploredOrEventHappens(4285); + + return true; +} + +bool GOHello_go_eastern_crystal_pylon(Player* pPlayer, GameObject* pGo) +{ + if (pGo->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER) + { + pPlayer->PrepareQuestMenu(pGo->GetGUID()); + pPlayer->SendPreparedQuest(pGo->GetGUID()); + } + + if (pPlayer->GetQuestStatus(4287) == QUEST_STATUS_INCOMPLETE) + pPlayer->AreaExploredOrEventHappens(4287); + + return true; +} + +bool GOHello_go_western_crystal_pylon(Player* pPlayer, GameObject* pGo) +{ + if (pGo->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER) + { + pPlayer->PrepareQuestMenu(pGo->GetGUID()); + pPlayer->SendPreparedQuest(pGo->GetGUID()); + } + + if (pPlayer->GetQuestStatus(4288) == QUEST_STATUS_INCOMPLETE) + pPlayer->AreaExploredOrEventHappens(4288); + + return true; +} + +/*###### +## go_barov_journal +######*/ + +bool GOHello_go_barov_journal(Player* pPlayer, GameObject* pGo) +{ + if (pPlayer->HasSkill(SKILL_TAILORING) && pPlayer->GetBaseSkillValue(SKILL_TAILORING) >= 280 && !pPlayer->HasSpell(26086)) + { + pPlayer->CastSpell(pPlayer,26095,false); + } + return true; +} + +/*###### +## go_ethereum_prison +######*/ + +enum +{ + SPELL_REP_LC = 39456, + SPELL_REP_SHAT = 39457, + SPELL_REP_CE = 39460, + SPELL_REP_CON = 39474, + SPELL_REP_KT = 39475, + SPELL_REP_SPOR = 39476 +}; + +const uint32 uiNpcPrisonEntry[] = +{ + 22810, 22811, 22812, 22813, 22814, 22815, //good guys + 20783, 20784, 20785, 20786, 20788, 20789, 20790 //bad guys +}; + +bool GOHello_go_ethereum_prison(Player* pPlayer, GameObject* pGo) +{ + int iRandom = rand() % (sizeof(uiNpcPrisonEntry) / sizeof(uint32)); + + if (Creature* pCreature = pPlayer->SummonCreature(uiNpcPrisonEntry[iRandom], + pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), pGo->GetAngle(pPlayer), + TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000)) + { + if (!pCreature->IsHostileTo(pPlayer)) + { + uint32 uiSpell = 0; + + if (FactionTemplateEntry const* pFaction = pCreature->getFactionTemplateEntry()) + { + switch(pFaction->faction) + { + case 1011: uiSpell = SPELL_REP_LC; break; + case 935: uiSpell = SPELL_REP_SHAT; break; + case 942: uiSpell = SPELL_REP_CE; break; + case 933: uiSpell = SPELL_REP_CON; break; + case 989: uiSpell = SPELL_REP_KT; break; + case 970: uiSpell = SPELL_REP_SPOR; break; + } + + if (uiSpell) + pCreature->CastSpell(pPlayer,uiSpell,false); + else + error_log("SD2: go_ethereum_prison summoned creature (entry %u) but faction (%u) are not expected by script.",pCreature->GetEntry(),pCreature->getFaction()); + } + } + } + + return false; +} + +/*###### +## go_ethereum_stasis +######*/ + +const uint32 uiNpcStasisEntry[] = +{ + 22825, 20888, 22827, 22826, 22828 +}; + +bool GOHello_go_ethereum_stasis(Player* pPlayer, GameObject* pGo) +{ + int iRandom = rand() % (sizeof(uiNpcStasisEntry) / sizeof(uint32)); + + pPlayer->SummonCreature(uiNpcStasisEntry[iRandom], + pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), pGo->GetAngle(pPlayer), + TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + + return false; +} + +/*###### +## go_field_repair_bot_74A +######*/ + +bool GOHello_go_field_repair_bot_74A(Player* pPlayer, GameObject* pGo) +{ + if (pPlayer->HasSkill(SKILL_ENGINERING) && pPlayer->GetBaseSkillValue(SKILL_ENGINERING) >= 300 && !pPlayer->HasSpell(22704)) + { + pPlayer->CastSpell(pPlayer,22864,false); + } + return true; +} + +/*###### +## go_gilded_brazier +######*/ + +enum +{ + NPC_STILLBLADE = 17716, +}; + +bool GOHello_go_gilded_brazier(Player* pPlayer, GameObject* pGO) +{ + if (pGO->GetGoType() == GAMEOBJECT_TYPE_GOOBER) + { + if (Creature* pCreature = pPlayer->SummonCreature(NPC_STILLBLADE, 8087.632, -7542.740, 151.568, 0.122, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) + pCreature->AI()->AttackStart(pPlayer); + } + + return true; +} + +/*###### +## go_jump_a_tron +######*/ + +enum +{ + SPELL_JUMP_A_TRON = 33382, + NPC_JUMP_A_TRON = 19041 +}; + +bool GOHello_go_jump_a_tron(Player* pPlayer, GameObject* pGo) +{ + if (Creature* pCreature = GetClosestCreatureWithEntry(pGo, NPC_JUMP_A_TRON, INTERACTION_DISTANCE)) + pCreature->CastSpell(pPlayer, SPELL_JUMP_A_TRON, false); + + return false; +} + +/*###### +## go_orb_of_command +######*/ + +bool GOHello_go_orb_of_command(Player* pPlayer, GameObject* pGo) +{ + if (pPlayer->GetQuestRewardStatus(7761)) + pPlayer->CastSpell(pPlayer,23460,true); + + return true; +} + +/*###### +## go_resonite_cask +######*/ + +enum +{ + NPC_GOGGEROC = 11920 +}; + +bool GOHello_go_resonite_cask(Player* pPlayer, GameObject* pGO) +{ + if (pGO->GetGoType() == GAMEOBJECT_TYPE_GOOBER) + pGO->SummonCreature(NPC_GOGGEROC, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 300000); + + return false; +} + +/*###### +## go_sacred_fire_of_life +######*/ + +enum +{ + NPC_ARIKARA = 10882, +}; + +bool GOHello_go_sacred_fire_of_life(Player* pPlayer, GameObject* pGO) +{ + if (pGO->GetGoType() == GAMEOBJECT_TYPE_GOOBER) + pPlayer->SummonCreature(NPC_ARIKARA, -5008.338, -2118.894, 83.657, 0.874, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + + return true; +} + +/*###### +## go_shrine_of_the_birds +######*/ + +enum +{ + NPC_HAWK_GUARD = 22992, + NPC_EAGLE_GUARD = 22993, + NPC_FALCON_GUARD = 22994, + GO_SHRINE_HAWK = 185551, + GO_SHRINE_EAGLE = 185547, + GO_SHRINE_FALCON = 185553 +}; + +bool GOHello_go_shrine_of_the_birds(Player* pPlayer, GameObject* pGo) +{ + uint32 uiBirdEntry = 0; + + float fX,fY,fZ; + pGo->GetClosePoint(fX,fY,fZ,pGo->GetObjectSize(),INTERACTION_DISTANCE); + + switch(pGo->GetEntry()) + { + case GO_SHRINE_HAWK: + uiBirdEntry = NPC_HAWK_GUARD; + break; + case GO_SHRINE_EAGLE: + uiBirdEntry = NPC_EAGLE_GUARD; + break; + case GO_SHRINE_FALCON: + uiBirdEntry = NPC_FALCON_GUARD; + break; + } + + if (uiBirdEntry) + pPlayer->SummonCreature(uiBirdEntry, fX, fY, fZ, pGo->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); + + return false; +} + +/*###### +## go_tablet_of_madness +######*/ + +bool GOHello_go_tablet_of_madness(Player* pPlayer, GameObject* pGo) +{ + if (pPlayer->HasSkill(SKILL_ALCHEMY) && pPlayer->GetSkillValue(SKILL_ALCHEMY) >= 300 && !pPlayer->HasSpell(24266)) + { + pPlayer->CastSpell(pPlayer,24267,false); + } + return true; +} + +/*###### +## go_tablet_of_the_seven +######*/ + +//TODO: use gossip option ("Transcript the Tablet") instead, if Mangos adds support. +bool GOHello_go_tablet_of_the_seven(Player* pPlayer, GameObject* pGo) +{ + if (pGo->GetGoType() != GAMEOBJECT_TYPE_QUESTGIVER) + return true; + + if (pPlayer->GetQuestStatus(4296) == QUEST_STATUS_INCOMPLETE) + pPlayer->CastSpell(pPlayer,15065,false); + + return true; +} + +/*###### +## go_tele_to_dalaran_crystal +######*/ + +enum +{ + QUEST_LEARN_LEAVE_RETURN = 12790, + QUEST_TELE_CRYSTAL_FLAG = 12845 +}; + +bool GOHello_go_tele_to_dalaran_crystal(Player* pPlayer, GameObject* pGo) +{ + if (pPlayer->GetQuestRewardStatus(QUEST_TELE_CRYSTAL_FLAG)) + return false; + + //TODO: must send error message (what kind of message? On-screen?) + return true; +} + +/*###### +## go_tele_to_violet_stand +######*/ + +bool GOHello_go_tele_to_violet_stand(Player* pPlayer, GameObject* pGo) +{ + if (pPlayer->GetQuestRewardStatus(QUEST_LEARN_LEAVE_RETURN) || pPlayer->GetQuestStatus(QUEST_LEARN_LEAVE_RETURN) == QUEST_STATUS_INCOMPLETE) + return false; + + return true; +} + +void AddSC_go_scripts() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "go_cat_figurine"; + newscript->pGOHello = &GOHello_go_cat_figurine; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "go_northern_crystal_pylon"; + newscript->pGOHello = &GOHello_go_northern_crystal_pylon; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "go_eastern_crystal_pylon"; + newscript->pGOHello = &GOHello_go_eastern_crystal_pylon; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "go_western_crystal_pylon"; + newscript->pGOHello = &GOHello_go_western_crystal_pylon; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "go_barov_journal"; + newscript->pGOHello = &GOHello_go_barov_journal; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "go_ethereum_prison"; + newscript->pGOHello = &GOHello_go_ethereum_prison; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "go_ethereum_stasis"; + newscript->pGOHello = &GOHello_go_ethereum_stasis; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "go_field_repair_bot_74A"; + newscript->pGOHello = &GOHello_go_field_repair_bot_74A; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "go_gilded_brazier"; + newscript->pGOHello = &GOHello_go_gilded_brazier; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "go_jump_a_tron"; + newscript->pGOHello = &GOHello_go_jump_a_tron; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "go_orb_of_command"; + newscript->pGOHello = &GOHello_go_orb_of_command; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "go_resonite_cask"; + newscript->pGOHello = &GOHello_go_resonite_cask; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "go_sacred_fire_of_life"; + newscript->pGOHello = &GOHello_go_sacred_fire_of_life; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "go_shrine_of_the_birds"; + newscript->pGOHello = &GOHello_go_shrine_of_the_birds; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "go_tablet_of_madness"; + newscript->pGOHello = &GOHello_go_tablet_of_madness; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "go_tablet_of_the_seven"; + newscript->pGOHello = &GOHello_go_tablet_of_the_seven; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "go_tele_to_dalaran_crystal"; + newscript->pGOHello = &GOHello_go_tele_to_dalaran_crystal; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "go_tele_to_violet_stand"; + newscript->pGOHello = &GOHello_go_tele_to_violet_stand; + newscript->RegisterSelf(); +} diff --git a/scripts/world/guards.cpp b/scripts/world/guards.cpp new file mode 100644 index 000000000..8813ffcfd --- /dev/null +++ b/scripts/world/guards.cpp @@ -0,0 +1,4040 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Guards +SD%Complete: 100 +SDComment: All Guard gossip data, quite some npc_text-id's still missing, adding constantly as new id's are known. CombatAI should be organized better for future. +SDCategory: Guards +EndScriptData */ + +/* ContentData +guard_azuremyst +guard_bluffwatcher +guard_contested +guard_darnassus +guard_dunmorogh +guard_durotar +guard_elwynnforest +guard_eversong +guard_exodar +guard_ironforge +guard_mulgore +guard_orgrimmar +guard_shattrath +guard_shattrath_aldor +guard_shattrath_scryer +guard_silvermoon +guard_stormwind +guard_teldrassil +guard_tirisfal +guard_undercity +EndContentData */ + +#include "precompiled.h" +#include "guard_ai.h" + +//script spesific action +#define GOSSIP_ACTION_TAVERN 101 +#define GOSSIP_ACTION_GEMMERCHANT 102 +#define GOSSIP_ACTION_MANALOOM 103 + +//script spesific sender +#define GOSSIP_SENDER_SEC_GEMMERCHANT 101 +#define GOSSIP_SENDER_SEC_AUCTIONHOUSE 102 + +//script spesific gossip text +#define GOSSIP_TEXT_TAVERN "Worlds End Tavern" +#define GOSSIP_TEXT_BANKSCYERS "Scyers bank" +#define GOSSIP_TEXT_BANKALDOR "Aldor Bank" +#define GOSSIP_TEXT_INNSCYERS "Scyers Inn" +#define GOSSIP_TEXT_INNALDOR "Aldor Inn" +#define GOSSIP_TEXT_STABLESCYERS "Scyers Stable" +#define GOSSIP_TEXT_STABLEALDOR "Aldor Stable" +#define GOSSIP_TEXT_BATTLEMASTERALLIANCE "Alliance Battlemasters" +#define GOSSIP_TEXT_BATTLEMASTERHORDE "Horde Battlemasters" +#define GOSSIP_TEXT_BATTLEMASTERARENA "Arena Battlemasters" +#define GOSSIP_TEXT_MANALOOM "Mana Loom" +#define GOSSIP_TEXT_ALCHEMYLAB "Alchemy Lab" +#define GOSSIP_TEXT_GEMMERCHANT "Gem Merchant" +#define GOSSIP_TEXT_GEMSCYERS "Scyers Gem Merchant" +#define GOSSIP_TEXT_GEMALDOR "Aldor Gem Merchant" + +#define GOSSIP_TEXT_AH_SILVERMOON_1 "Western Auction House" +#define GOSSIP_TEXT_AH_SILVERMOON_2 "Royal Exchange Auction House" + +#define GOSSIP_TEXT_INN_SILVERMOON_1 "Silvermoon City Inn" +#define GOSSIP_TEXT_INN_SILVERMOON_2 "Wayfarer's Rest tavern" + +/******************************************************* + * guard_azuremyst start + *******************************************************/ + +bool GossipHello_guard_azuremyst(Player* pPlayer, Creature* pCreature) +{ + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BANK , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HIPPOGRYPH , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_GUILDMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INN , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_STABLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_CLASSTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PROFTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->SEND_GOSSIP_MENU(10066, pCreature->GetGUID()); + return true; +} + +void SendDefaultMenu_guard_azuremyst(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Bank + pPlayer->SEND_POI(-3918.95, -11544.7, 7, 6, 0, "Bank"); + pPlayer->SEND_GOSSIP_MENU(10067, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Hippogryph Master + pPlayer->SEND_POI(-4057.15, -11788.6, 7, 6, 0, "Stephanos"); + pPlayer->SEND_GOSSIP_MENU(10071, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Guild master + pPlayer->SEND_POI(-4092.43, -11626.6, 7, 6, 0, "Funaam"); + pPlayer->SEND_GOSSIP_MENU(10073, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Inn + pPlayer->SEND_POI(-4129.43, -12469, 7, 6, 0, "Caregiver Chellan"); + pPlayer->SEND_GOSSIP_MENU(10074, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //Stable Master + pPlayer->SEND_POI(-4146.42, -12492.7, 7, 6, 0, "Esbina"); + pPlayer->SEND_GOSSIP_MENU(10075, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //Class trainer + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_DRUID , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HUNTER , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAGE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PALADIN , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PRIEST , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SHAMAN , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARRIOR , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->SEND_GOSSIP_MENU(10076, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 7: //Profession trainer + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALCHEMY , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BLACKSMITHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_COOKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENCHANTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENGINEERING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FIRSTAID , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FISHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HERBALISM , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 8); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_JEWELCRAFTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 9); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_LEATHERWORKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 10); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MINING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 11); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SKINNING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 12); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_TAILORING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 13); + pPlayer->SEND_GOSSIP_MENU(10087, pCreature->GetGUID()); + break; + } +} + +void SendClassTrainerMenu_guard_azuremyst(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Druid + pPlayer->SEND_POI(-4274.81, -11495.3, 7, 6, 0, "Shalannius"); + pPlayer->SEND_GOSSIP_MENU(10077, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Hunter + pPlayer->SEND_POI(-4203.65, -12526.5, 7, 6, 0, "Acteon"); + pPlayer->SEND_GOSSIP_MENU(10078, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Mage + pPlayer->SEND_POI(-4149.62, -12530.1, 7, 6, 0, "Semid"); + pPlayer->SEND_GOSSIP_MENU(10081, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Paladin + pPlayer->SEND_POI(-4138.98, -12468.5, 7, 6, 0, "Tullas"); + pPlayer->SEND_GOSSIP_MENU(10083, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //Priest + pPlayer->SEND_POI(-4131.66, -12478.6, 7, 6, 0, "Guvan"); + pPlayer->SEND_GOSSIP_MENU(10084, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //Shaman + pPlayer->SEND_POI(-4162.33, -12456.1, 7, 6, 0, "Tuluun"); + pPlayer->SEND_GOSSIP_MENU(10085, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 7: //Warrior + pPlayer->SEND_POI(-4165.05, -12536.4, 7, 6, 0, "Ruada"); + pPlayer->SEND_GOSSIP_MENU(10086, pCreature->GetGUID()); + break; + } +} + +void SendProfTrainerMenu_guard_azuremyst(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy + pPlayer->SEND_POI(-4191.15, -12470, 7, 6, 0, "Daedal"); + pPlayer->SEND_GOSSIP_MENU(10088, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing + pPlayer->SEND_POI(-4726.29, -12387, 7, 6, 0, "Blacksmith Calypso"); + pPlayer->SEND_GOSSIP_MENU(10089, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Cooking + pPlayer->SEND_POI(-4710.87, -12400.6, 7, 6, 0, "'Cookie' McWeaksauce"); + pPlayer->SEND_GOSSIP_MENU(10090, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Enchanting + pPlayer->SEND_POI(-3882.85, -11496.7, 7, 6, 0, "Nahogg"); + pPlayer->SEND_GOSSIP_MENU(10091, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //Engineering + pPlayer->SEND_POI(-4157.57, -12470.2, 7, 6, 0, "Artificer Daelo"); + pPlayer->SEND_GOSSIP_MENU(10092, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //First Aid + pPlayer->SEND_POI(-4199.11, -12469.9, 7, 6, 0, "Anchorite Fateema"); + pPlayer->SEND_GOSSIP_MENU(10093, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 7: //Fishing + pPlayer->SEND_POI(-4266.38, -12985.1, 7, 6, 0, "Diktynna"); + pPlayer->SEND_GOSSIP_MENU(10094, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 8: //Herbalism + pPlayer->SEND_GOSSIP_MENU(10095, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 9: //Jewelcrafting + pPlayer->SEND_POI(-3781.55, -11541.8, 7, 6, 0, "Farii"); + pPlayer->SEND_GOSSIP_MENU(10097, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 10: //Leatherworking + pPlayer->SEND_POI(-3442.68, -12322.2, 7, 6, 0, "Moordo"); + pPlayer->SEND_GOSSIP_MENU(10098, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 11: //Mining + pPlayer->SEND_POI(-4179.89, -12493.1, 7, 6, 0, "Dulvi"); + pPlayer->SEND_GOSSIP_MENU(10097, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 12: //Skinning + pPlayer->SEND_POI(-3431.17, -12316.5, 7, 6, 0, "Gurf"); + pPlayer->SEND_GOSSIP_MENU(10098, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 13: //Tailoring + pPlayer->SEND_POI(-4711.54, -12386.7, 7, 6, 0, "Erin Kelly"); + pPlayer->SEND_GOSSIP_MENU(10099, pCreature->GetGUID()); + break; + } +} + +bool GossipSelect_guard_azuremyst(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch (uiSender) + { + case GOSSIP_SENDER_MAIN: SendDefaultMenu_guard_azuremyst(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_CLASSTRAIN: SendClassTrainerMenu_guard_azuremyst(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_PROFTRAIN: SendProfTrainerMenu_guard_azuremyst(pPlayer, pCreature, uiAction); break; + } + return true; +} + +/******************************************************* + * guard_azuremyst end + *******************************************************/ + +CreatureAI* GetAI_guard_azuremyst(Creature* pCreature) +{ + return new guardAI(pCreature); +} + +/******************************************************* + * guard_bluffwatcher start + *******************************************************/ + +bool GossipHello_guard_bluffwatcher(Player* pPlayer, Creature* pCreature) +{ + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BANK , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WINDRIDER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_GUILDMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INN , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAILBOX , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_AUCTIONHOUSE , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WEAPONMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_STABLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 8); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BATTLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 9); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_CLASSTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PROFTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11); + pPlayer->SEND_GOSSIP_MENU(3543, pCreature->GetGUID()); + return true; +} + +void SendDefaultMenu_guard_bluffwatcher(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Bank + pPlayer->SEND_POI(-1257.8, 24.14, 7, 6, 0, "Thunder Bluff Bank"); + pPlayer->SEND_GOSSIP_MENU(1292, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Wind master + pPlayer->SEND_POI(-1196.43, 28.26, 7, 6, 0, "Wind Rider Roost"); + pPlayer->SEND_GOSSIP_MENU(1293, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Guild master + pPlayer->SEND_POI(-1296.5, 127.57, 7, 6, 0, "Thunder Bluff Civic Information"); + pPlayer->SEND_GOSSIP_MENU(1291, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Inn + pPlayer->SEND_POI(-1296, 39.7, 7, 6, 0, "Thunder Bluff Inn"); + pPlayer->SEND_GOSSIP_MENU(3153, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //Mailbox + pPlayer->SEND_POI(-1263.59, 44.36, 7, 6, 0, "Thunder Bluff Mailbox"); + pPlayer->SEND_GOSSIP_MENU(3154, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //Auction House + pPlayer->SEND_POI(1381.77, -4371.16, 7, 6, 0, GOSSIP_TEXT_AUCTIONHOUSE); + pPlayer->SEND_GOSSIP_MENU(3155, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 7: //Weapon master + pPlayer->SEND_POI(-1282.31, 89.56, 7, 6, 0, "Ansekhwa"); + pPlayer->SEND_GOSSIP_MENU(4520, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 8: //Stable master + pPlayer->SEND_POI(-1270.19, 48.84, 7, 6, 0, "Bulrug"); + pPlayer->SEND_GOSSIP_MENU(5977, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 9: //battlemaster + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALTERACVALLEY , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ARATHIBASIN , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARSONGULCH , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->SEND_GOSSIP_MENU(7527, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 10: //Class trainer + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_DRUID , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HUNTER , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAGE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PRIEST , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SHAMAN , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARRIOR , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->SEND_GOSSIP_MENU(3542, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 11: //Profession trainer + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALCHEMY , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BLACKSMITHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_COOKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENCHANTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FIRSTAID , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FISHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HERBALISM , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_LEATHERWORKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 8); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MINING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 9); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SKINNING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 10); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_TAILORING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 11); + pPlayer->SEND_GOSSIP_MENU(3541, pCreature->GetGUID()); + break; + } +} + +void SendBattleMasterMenu_guard_bluffwatcher(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //AV + pPlayer->SEND_POI(-1387.82, -97.55, 7, 6, 0, "Taim Ragetotem"); + pPlayer->SEND_GOSSIP_MENU(7522, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //AB + pPlayer->SEND_POI(-997, 214.12, 7, 6, 0, "Martin Lindsey"); + pPlayer->SEND_GOSSIP_MENU(7648, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //WSG + pPlayer->SEND_POI(-1384.94, -75.91, 7, 6, 0, "Kergul Bloodaxe"); + pPlayer->SEND_GOSSIP_MENU(7523, pCreature->GetGUID()); + break; + } +} + +void SendClassTrainerMenu_guard_bluffwatcher(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Druid + pPlayer->SEND_POI(-1054.47, -285, 7, 6, 0, "Hall of Elders"); + pPlayer->SEND_GOSSIP_MENU(1294, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Hunter + pPlayer->SEND_POI(-1416.32, -114.28, 7, 6, 0, "Hunter's Hall"); + pPlayer->SEND_GOSSIP_MENU(1295, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Mage + pPlayer->SEND_POI(-1061.2, 195.5, 7, 6, 0, "Pools of Vision"); + pPlayer->SEND_GOSSIP_MENU(1296, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Priest + pPlayer->SEND_POI(-1061.2, 195.5, 7, 6, 0, "Pools of Vision"); + pPlayer->SEND_GOSSIP_MENU(1297, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //Shaman + pPlayer->SEND_POI(-989.54, 278.25, 7, 6, 0, "Hall of Spirits"); + pPlayer->SEND_GOSSIP_MENU(1298, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //Warrior + pPlayer->SEND_POI(-1416.32, -114.28, 7, 6, 0, "Hunter's Hall"); + pPlayer->SEND_GOSSIP_MENU(1299, pCreature->GetGUID()); + break; + } +} + +void SendProfTrainerMenu_guard_bluffwatcher(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy + pPlayer->SEND_POI(-1085.56, 27.29, 7, 6, 0, "Bena's Alchemy"); + pPlayer->SEND_GOSSIP_MENU(1332, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing + pPlayer->SEND_POI(-1239.75, 104.88, 7, 6, 0, "Karn's Smithy"); + pPlayer->SEND_GOSSIP_MENU(1333, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Cooking + pPlayer->SEND_POI(-1214.5, -21.23, 7, 6, 0, "Aska's Kitchen"); + pPlayer->SEND_GOSSIP_MENU(1334, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Enchanting + pPlayer->SEND_POI(-1112.65, 48.26, 7, 6, 0, "Dawnstrider Enchanters"); + pPlayer->SEND_GOSSIP_MENU(1335, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //First Aid + pPlayer->SEND_POI(-996.58, 200.5, 7, 6, 0, "Spiritual Healing"); + pPlayer->SEND_GOSSIP_MENU(1336, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //Fishing + pPlayer->SEND_POI(-1169.35, -68.87, 7, 6, 0, "Mountaintop Bait & Tackle"); + pPlayer->SEND_GOSSIP_MENU(1337, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 7: //Herbalism + pPlayer->SEND_POI(-1137.7, -1.51, 7, 6, 0, "Holistic Herbalism"); + pPlayer->SEND_GOSSIP_MENU(1338, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 8: //Leatherworking + pPlayer->SEND_POI(-1156.22, 66.86, 7, 6, 0, "Thunder Bluff Armorers"); + pPlayer->SEND_GOSSIP_MENU(1339, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 9: //Mining + pPlayer->SEND_POI(-1249.17, 155, 7, 6, 0, "Stonehoof Geology"); + pPlayer->SEND_GOSSIP_MENU(1340, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 10: //Skinning + pPlayer->SEND_POI(-1148.56, 51.18, 7, 6, 0, "Mooranta"); + pPlayer->SEND_GOSSIP_MENU(1343, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 11: //Tailoring + pPlayer->SEND_POI(-1156.22, 66.86, 7, 6, 0, "Thunder Bluff Armorers"); + pPlayer->SEND_GOSSIP_MENU(1341, pCreature->GetGUID()); + break; + } +} + +bool GossipSelect_guard_bluffwatcher(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch (uiSender) + { + case GOSSIP_SENDER_MAIN: SendDefaultMenu_guard_bluffwatcher(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_CLASSTRAIN: SendClassTrainerMenu_guard_bluffwatcher(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_PROFTRAIN: SendProfTrainerMenu_guard_bluffwatcher(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_BATTLEINFO: SendBattleMasterMenu_guard_bluffwatcher(pPlayer, pCreature, uiAction); break; + } + return true; +} + +/******************************************************* + * guard_bluffwatcher end + *******************************************************/ + +CreatureAI* GetAI_guard_bluffwatcher(Creature* pCreature) +{ + return new guardAI(pCreature); +} + +/******************************************************* + * guard_contested start + *******************************************************/ + +CreatureAI* GetAI_guard_contested(Creature* pCreature) +{ + return new guardAI(pCreature); +} + +/******************************************************* + * guard_contested end + *******************************************************/ + +/******************************************************* + * guard_darnassus start + *******************************************************/ + +bool GossipHello_guard_darnassus(Player* pPlayer, Creature* pCreature) +{ + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_AUCTIONHOUSE , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BANK , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HIPPOGRYPH , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_GUILDMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INN , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAILBOX , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_STABLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WEAPONMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 8); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BATTLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 9); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_CLASSTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PROFTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11); + pPlayer->SEND_GOSSIP_MENU(3016, pCreature->GetGUID()); + return true; +} + +void SendDefaultMenu_guard_darnassus(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Auction house + pPlayer->SEND_POI(9861.23, 2334.55, 7, 6, 0, "Darnassus Auction House"); + pPlayer->SEND_GOSSIP_MENU(3833, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Bank + pPlayer->SEND_POI(9938.45, 2512.35, 7, 6, 0, "Darnassus Bank"); + pPlayer->SEND_GOSSIP_MENU(3017, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Wind master + pPlayer->SEND_POI(9945.65, 2618.94, 7, 6, 0, "Rut'theran Village"); + pPlayer->SEND_GOSSIP_MENU(3018, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Guild master + pPlayer->SEND_POI(10076.40, 2199.59, 7, 6, 0, "Darnassus Guild Master"); + pPlayer->SEND_GOSSIP_MENU(3019, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //Inn + pPlayer->SEND_POI(10133.29, 2222.52, 7, 6, 0, "Darnassus Inn"); + pPlayer->SEND_GOSSIP_MENU(3020, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //Mailbox + pPlayer->SEND_POI(9942.17, 2495.48, 7, 6, 0, "Darnassus Mailbox"); + pPlayer->SEND_GOSSIP_MENU(3021, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 7: //Stable master + pPlayer->SEND_POI(10167.20, 2522.66, 7, 6, 0, "Alassin"); + pPlayer->SEND_GOSSIP_MENU(5980, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 8: //Weapon trainer + pPlayer->SEND_POI(9907.11, 2329.70, 7, 6, 0, "Ilyenia Moonfire"); + pPlayer->SEND_GOSSIP_MENU(4517, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 9: //Battlemaster + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALTERACVALLEY , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ARATHIBASIN , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARSONGULCH , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->SEND_GOSSIP_MENU(7519, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 10: //Class trainer + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_DRUID , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HUNTER , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PRIEST , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ROGUE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARRIOR , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->SEND_GOSSIP_MENU(4264, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 11: //Profession trainer + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALCHEMY , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_COOKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENCHANTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FIRSTAID , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FISHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HERBALISM , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_LEATHERWORKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SKINNING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 8); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_TAILORING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 9); + pPlayer->SEND_GOSSIP_MENU(4273, pCreature->GetGUID()); + break; + } +} + +void SendBattleMasterMenu_guard_darnassus(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //AV + pPlayer->SEND_POI(9923.61, 2327.43, 7, 6, 0, "Brogun Stoneshield"); + pPlayer->SEND_GOSSIP_MENU(7518, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //AB + pPlayer->SEND_POI(9977.37, 2324.39, 7, 6, 0, "Keras Wolfheart"); + pPlayer->SEND_GOSSIP_MENU(7651, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //WSG + pPlayer->SEND_POI(9979.84, 2315.79, 7, 6, 0, "Aethalas"); + pPlayer->SEND_GOSSIP_MENU(7482, pCreature->GetGUID()); + break; + } +} + +void SendClassTrainerMenu_guard_darnassus(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Druid + pPlayer->SEND_POI(10186, 2570.46, 7, 6, 0, "Darnassus Druid Trainer"); + pPlayer->SEND_GOSSIP_MENU(3024, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Hunter + pPlayer->SEND_POI(10177.29, 2511.10, 7, 6, 0, "Darnassus Hunter Trainer"); + pPlayer->SEND_GOSSIP_MENU(3023, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Priest + pPlayer->SEND_POI(9659.12, 2524.88, 7, 6, 0, "Temple of the Moon"); + pPlayer->SEND_GOSSIP_MENU(3025, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Rogue + pPlayer->SEND_POI(10122, 2599.12, 7, 6, 0, "Darnassus Rogue Trainer"); + pPlayer->SEND_GOSSIP_MENU(3026, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //Warrior + pPlayer->SEND_POI(9951.91, 2280.38, 7, 6, 0, "Warrior's Terrace"); + pPlayer->SEND_GOSSIP_MENU(3033, pCreature->GetGUID()); + break; + } +} + +void SendProfTrainerMenu_guard_darnassus(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy + pPlayer->SEND_POI(10075.90, 2356.76, 7, 6, 0, "Darnassus Alchemy Trainer"); + pPlayer->SEND_GOSSIP_MENU(3035, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Cooking + pPlayer->SEND_POI(10088.59, 2419.21, 7, 6, 0, "Darnassus Cooking Trainer"); + pPlayer->SEND_GOSSIP_MENU(3036, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Enchanting + pPlayer->SEND_POI(10146.09, 2313.42, 7, 6, 0, "Darnassus Enchanting Trainer"); + pPlayer->SEND_GOSSIP_MENU(3337, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //First Aid + pPlayer->SEND_POI(10150.09, 2390.43, 7, 6, 0, "Darnassus First Aid Trainer"); + pPlayer->SEND_GOSSIP_MENU(3037, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //Fishing + pPlayer->SEND_POI(9836.20, 2432.17, 7, 6, 0, "Darnassus Fishing Trainer"); + pPlayer->SEND_GOSSIP_MENU(3038, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //Herbalism + pPlayer->SEND_POI(9757.17, 2430.16, 7, 6, 0, "Darnassus Herbalism Trainer"); + pPlayer->SEND_GOSSIP_MENU(3039, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 7: //Leatherworking + pPlayer->SEND_POI(10086.59, 2255.77, 7, 6, 0, "Darnassus Leatherworking Trainer"); + pPlayer->SEND_GOSSIP_MENU(3040, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 8: //Skinning + pPlayer->SEND_POI(10081.40, 2257.18, 7, 6, 0, "Darnassus Skinning Trainer"); + pPlayer->SEND_GOSSIP_MENU(3042, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 9: //Tailoring + pPlayer->SEND_POI(10079.70, 2268.19, 7, 6, 0, "Darnassus Tailor"); + pPlayer->SEND_GOSSIP_MENU(3044, pCreature->GetGUID()); + break; + } +} + +bool GossipSelect_guard_darnassus(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch (uiSender) + { + case GOSSIP_SENDER_MAIN: SendDefaultMenu_guard_darnassus(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_CLASSTRAIN: SendClassTrainerMenu_guard_darnassus(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_PROFTRAIN: SendProfTrainerMenu_guard_darnassus(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_BATTLEINFO: SendBattleMasterMenu_guard_darnassus(pPlayer, pCreature, uiAction); break; + } + return true; +} + +/******************************************************* + * guard_darnassus end + *******************************************************/ + +CreatureAI* GetAI_guard_darnassus(Creature* pCreature) +{ + return new guardAI(pCreature); +} + +/******************************************************* + * guard_dunmorogh start + *******************************************************/ + +bool GossipHello_guard_dunmorogh(Player* pPlayer, Creature* pCreature) +{ + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BANK , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HIPPOGRYPH , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_GUILDMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INN , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_STABLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_CLASSTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PROFTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->SEND_GOSSIP_MENU(4287, pCreature->GetGUID()); + + return true; +} + +void SendDefaultMenu_guard_dunmorogh(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Bank + pPlayer->SEND_GOSSIP_MENU(4288, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Gryphon master + pPlayer->SEND_GOSSIP_MENU(4289, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Guild master + pPlayer->SEND_GOSSIP_MENU(4290, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Inn + pPlayer->SEND_POI(-5582.66, -525.89, 7, 6, 0, "Thunderbrew Distillery"); + pPlayer->SEND_GOSSIP_MENU(4291, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //Stable Master + pPlayer->SEND_POI(-5604, -509.58, 7, 6, 0, "Shelby Stoneflint"); + pPlayer->SEND_GOSSIP_MENU(5985, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //Class trainer + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HUNTER , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAGE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PALADIN , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PRIEST , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ROGUE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARLOCK , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARRIOR , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->SEND_GOSSIP_MENU(4292, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 7: //Profession trainer + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALCHEMY , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BLACKSMITHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_COOKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENCHANTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENGINEERING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FIRSTAID , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FISHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HERBALISM , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 8); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_LEATHERWORKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 9); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MINING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 10); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SKINNING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 11); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_TAILORING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 12); + pPlayer->SEND_GOSSIP_MENU(4300, pCreature->GetGUID()); + break; + } +} + +void SendClassTrainerMenu_guard_dunmorogh(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Hunter + pPlayer->SEND_POI(-5618.29, -454.25, 7, 6, 0, "Grif Wildheart"); + pPlayer->SEND_GOSSIP_MENU(4293, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Mage + pPlayer->SEND_POI(-5585.6, -539.99, 7, 6, 0, "Magis Sparkmantle"); + pPlayer->SEND_GOSSIP_MENU(4294, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Paladin + pPlayer->SEND_POI(-5585.6, -539.99, 7, 6, 0, "Azar Stronghammer"); + pPlayer->SEND_GOSSIP_MENU(4295, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Priest + pPlayer->SEND_POI(-5591.74, -525.61, 7, 6, 0, "Maxan Anvol"); + pPlayer->SEND_GOSSIP_MENU(4296, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //Rogue + pPlayer->SEND_POI(-5602.75, -542.4, 7, 6, 0, "Hogral Bakkan"); + pPlayer->SEND_GOSSIP_MENU(4297, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //Warlock + pPlayer->SEND_POI(-5641.97, -523.76, 7, 6, 0, "Gimrizz Shadowcog"); + pPlayer->SEND_GOSSIP_MENU(4298, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 7: //Warrior + pPlayer->SEND_POI(-5604.79, -529.38, 7, 6, 0, "Granis Swiftaxe"); + pPlayer->SEND_GOSSIP_MENU(4299, pCreature->GetGUID()); + break; + } +} + +void SendProfTrainerMenu_guard_dunmorogh(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy + pPlayer->SEND_GOSSIP_MENU(4301, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing + pPlayer->SEND_POI(-5584.72, -428.41, 7, 6, 0, "Tognus Flintfire"); + pPlayer->SEND_GOSSIP_MENU(4302, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Cooking + pPlayer->SEND_POI(-5596.85, -541.43, 7, 6, 0, "Gremlock Pilsnor"); + pPlayer->SEND_GOSSIP_MENU(4303, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Enchanting + pPlayer->SEND_GOSSIP_MENU(4304, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //Engineering + pPlayer->SEND_POI(-5531, -666.53, 7, 6, 0, "Bronk Guzzlegear"); + pPlayer->SEND_GOSSIP_MENU(4305, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //First Aid + pPlayer->SEND_POI(-5603.67, -523.57, 7, 6, 0, "Thamner Pol"); + pPlayer->SEND_GOSSIP_MENU(4306, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 7: //Fishing + pPlayer->SEND_POI(-5199.9, 58.58, 7, 6, 0, "Paxton Ganter"); + pPlayer->SEND_GOSSIP_MENU(4307, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 8: //Herbalism + pPlayer->SEND_GOSSIP_MENU(4308, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 9: //Leatherworking + pPlayer->SEND_GOSSIP_MENU(4310, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 10: //Mining + pPlayer->SEND_POI(-5531, -666.53, 7, 6, 0, "Yarr Hamerstone"); + pPlayer->SEND_GOSSIP_MENU(4311, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 11: //Skinning + pPlayer->SEND_GOSSIP_MENU(4312, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 12: //Tailoring + pPlayer->SEND_GOSSIP_MENU(4313, pCreature->GetGUID()); + break; + } +} + +bool GossipSelect_guard_dunmorogh(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch (uiSender) + { + case GOSSIP_SENDER_MAIN: SendDefaultMenu_guard_dunmorogh(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_CLASSTRAIN: SendClassTrainerMenu_guard_dunmorogh(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_PROFTRAIN: SendProfTrainerMenu_guard_dunmorogh(pPlayer, pCreature, uiAction); break; + } + return true; +} + +/******************************************************* + * guard_dunmorogh end + *******************************************************/ + +CreatureAI* GetAI_guard_dunmorogh(Creature* pCreature) +{ + return new guardAI(pCreature); +} + +/******************************************************* + * guard_durotar start + *******************************************************/ + +bool GossipHello_guard_durotar(Player* pPlayer, Creature* pCreature) +{ + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BANK , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WINDRIDER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INN , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_STABLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_CLASSTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PROFTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->SEND_GOSSIP_MENU(4037, pCreature->GetGUID()); + return true; +} + +void SendDefaultMenu_guard_durotar(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Bank + pPlayer->SEND_GOSSIP_MENU(4032, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Wind rider + pPlayer->SEND_GOSSIP_MENU(4033, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Inn + pPlayer->SEND_POI(338.7, -4688.87, 7, 6, 0, "Razor Hill Inn"); + pPlayer->SEND_GOSSIP_MENU(4034, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Stable master + pPlayer->SEND_POI(330.31, -4710.66, 7, 6, 0, "Shoja'my"); + pPlayer->SEND_GOSSIP_MENU(5973, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //Class trainer + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HUNTER , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAGE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PRIEST , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ROGUE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SHAMAN , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARLOCK , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARRIOR , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->SEND_GOSSIP_MENU(4035, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //Profession trainer + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALCHEMY , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BLACKSMITHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_COOKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENCHANTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENGINEERING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FIRSTAID , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FISHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HERBALISM , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 8); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_LEATHERWORKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 9); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MINING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 10); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SKINNING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 11); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_TAILORING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 12); + pPlayer->SEND_GOSSIP_MENU(4036, pCreature->GetGUID()); + break; + } +} + +void SendClassTrainerMenu_guard_durotar(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Hunter + pPlayer->SEND_POI(276, -4706.72, 7, 6, 0, "Thotar"); + pPlayer->SEND_GOSSIP_MENU(4013, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Mage + pPlayer->SEND_POI(-839.33, -4935.6, 7, 6, 0, "Un'Thuwa"); + pPlayer->SEND_GOSSIP_MENU(4014, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Priest + pPlayer->SEND_POI(296.22, -4828.1, 7, 6, 0, "Tai'jin"); + pPlayer->SEND_GOSSIP_MENU(4015, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Rogue + pPlayer->SEND_POI(265.76, -4709, 7, 6, 0, "Kaplak"); + pPlayer->SEND_GOSSIP_MENU(4016, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //Shaman + pPlayer->SEND_POI(307.79, -4836.97, 7, 6, 0, "Swart"); + pPlayer->SEND_GOSSIP_MENU(4017, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //Warlock + pPlayer->SEND_POI(355.88, -4836.45, 7, 6, 0, "Dhugru Gorelust"); + pPlayer->SEND_GOSSIP_MENU(4018, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 7: //Warrior + pPlayer->SEND_POI(312.3, -4824.66, 7, 6, 0, "Tarshaw Jaggedscar"); + pPlayer->SEND_GOSSIP_MENU(4019, pCreature->GetGUID()); + break; + } +} + +void SendProfTrainerMenu_guard_durotar(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy + pPlayer->SEND_POI(-800.25, -4894.33, 7, 6, 0, "Miao'zan"); + pPlayer->SEND_GOSSIP_MENU(4020, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing + pPlayer->SEND_POI(373.24, -4716.45, 7, 6, 0, "Dwukk"); + pPlayer->SEND_GOSSIP_MENU(4021, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Cooking + pPlayer->SEND_GOSSIP_MENU(4022, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Enchanting + pPlayer->SEND_GOSSIP_MENU(4023, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //Engineering + pPlayer->SEND_POI(368.95, -4723.95, 7, 6, 0, "Mukdrak"); + pPlayer->SEND_GOSSIP_MENU(4024, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //First Aid + pPlayer->SEND_POI(327.17, -4825.62, 7, 6, 0, "Rawrk"); + pPlayer->SEND_GOSSIP_MENU(4025, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 7: //Fishing + pPlayer->SEND_POI(-1065.48, -4777.43, 7, 6, 0, "Lau'Tiki"); + pPlayer->SEND_GOSSIP_MENU(4026, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 8: //Herbalism + pPlayer->SEND_POI(-836.25, -4896.89, 7, 6, 0, "Mishiki"); + pPlayer->SEND_GOSSIP_MENU(4027, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 9: //Leatherworking + pPlayer->SEND_GOSSIP_MENU(4028, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 10: //Mining + pPlayer->SEND_POI(366.94, -4705, 7, 6, 0, "Krunn"); + pPlayer->SEND_GOSSIP_MENU(4029, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 11: //Skinning + pPlayer->SEND_GOSSIP_MENU(4030, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 12: //Tailoring + pPlayer->SEND_GOSSIP_MENU(4031, pCreature->GetGUID()); + break; + } +} + +bool GossipSelect_guard_durotar(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch (uiSender) + { + case GOSSIP_SENDER_MAIN: SendDefaultMenu_guard_durotar(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_CLASSTRAIN: SendClassTrainerMenu_guard_durotar(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_PROFTRAIN: SendProfTrainerMenu_guard_durotar(pPlayer, pCreature, uiAction); break; + } + return true; +} + +/******************************************************* + * guard_durotar end + *******************************************************/ + +CreatureAI* GetAI_guard_durotar(Creature* pCreature) +{ + return new guardAI(pCreature); +} + +/******************************************************* + * guard_elwynnforest start + *******************************************************/ + +bool GossipHello_guard_elwynnforest(Player* pPlayer, Creature* pCreature) +{ + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BANK , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_GRYPHON , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_GUILDMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INN , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_STABLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_CLASSTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PROFTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->SEND_GOSSIP_MENU(933, pCreature->GetGUID()); + return true; +} + +void SendDefaultMenu_guard_elwynnforest(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Bank + pPlayer->SEND_GOSSIP_MENU(4260, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Gryphon master + pPlayer->SEND_GOSSIP_MENU(4261, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Guild master + pPlayer->SEND_GOSSIP_MENU(4262, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Inn + pPlayer->SEND_POI(-9459.34, 42.08, 7, 6, 0, "Lion's Pride Inn"); + pPlayer->SEND_GOSSIP_MENU(4263, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //Stable Master + pPlayer->SEND_POI(-9466.62, 45.87, 7, 6, 0, "Erma"); + pPlayer->SEND_GOSSIP_MENU(5983, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //Class trainer + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_DRUID , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HUNTER , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAGE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PALADIN , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PRIEST , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ROGUE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARLOCK , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARRIOR , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 8); + pPlayer->SEND_GOSSIP_MENU(4264, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 7: //Profession trainer + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALCHEMY , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BLACKSMITHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_COOKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENCHANTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENGINEERING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FIRSTAID , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FISHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HERBALISM , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 8); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_LEATHERWORKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 9); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MINING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 10); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SKINNING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 11); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_TAILORING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 12); + pPlayer->SEND_GOSSIP_MENU(4273, pCreature->GetGUID()); + break; + } +} + +void SendClassTrainerMenu_guard_elwynnforest(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Druid + pPlayer->SEND_GOSSIP_MENU(4265, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Hunter + pPlayer->SEND_GOSSIP_MENU(4266, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Mage + pPlayer->SEND_POI(-9471.12, 33.44, 7, 6, 0, "Zaldimar Wefhellt"); + pPlayer->SEND_GOSSIP_MENU(4268, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Paladin + pPlayer->SEND_POI(-9469, 108.05, 7, 6, 0, "Brother Wilhelm"); + pPlayer->SEND_GOSSIP_MENU(4269, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //Priest + pPlayer->SEND_POI(-9461.07, 32.6, 7, 6, 0, "Priestess Josetta"); + pPlayer->SEND_GOSSIP_MENU(4267, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //Rogue + pPlayer->SEND_POI(-9465.13, 13.29, 7, 6, 0, "Keryn Sylvius"); + pPlayer->SEND_GOSSIP_MENU(4270, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 7: //Warlock + pPlayer->SEND_POI(-9473.21, -4.08, 7, 6, 0, "Maximillian Crowe"); + pPlayer->SEND_GOSSIP_MENU(4272, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 8: //Warrior + pPlayer->SEND_POI(-9461.82, 109.50, 7, 6, 0, "Lyria Du Lac"); + pPlayer->SEND_GOSSIP_MENU(4271, pCreature->GetGUID()); + break; + } +} + +void SendProfTrainerMenu_guard_elwynnforest(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy + pPlayer->SEND_POI(-9057.04, 153.63, 7, 6, 0, "Alchemist Mallory"); + pPlayer->SEND_GOSSIP_MENU(4274, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing + pPlayer->SEND_POI(-9456.58, 87.90, 7, 6, 0, "Smith Argus"); + pPlayer->SEND_GOSSIP_MENU(4275, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Cooking + pPlayer->SEND_POI(-9467.54, -3.16, 7, 6, 0, "Tomas"); + pPlayer->SEND_GOSSIP_MENU(4276, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Enchanting + pPlayer->SEND_GOSSIP_MENU(4277, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //Engineering + pPlayer->SEND_GOSSIP_MENU(4278, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //First Aid + pPlayer->SEND_POI(-9456.82, 30.49, 7, 6, 0, "Michelle Belle"); + pPlayer->SEND_GOSSIP_MENU(4279, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 7: //Fishing + pPlayer->SEND_POI(-9386.54, -118.73, 7, 6, 0, "Lee Brown"); + pPlayer->SEND_GOSSIP_MENU(4280, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 8: //Herbalism + pPlayer->SEND_POI(-9060.70, 149.23, 7, 6, 0, "Herbalist Pomeroy"); + pPlayer->SEND_GOSSIP_MENU(4281, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 9: //Leatherworking + pPlayer->SEND_POI(-9376.12, -75.23, 7, 6, 0, "Adele Fielder"); + pPlayer->SEND_GOSSIP_MENU(4282, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 10: //Mining + pPlayer->SEND_GOSSIP_MENU(4283, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 11: //Skinning + pPlayer->SEND_POI(-9536.91, -1212.76, 7, 6, 0, "Helene Peltskinner"); + pPlayer->SEND_GOSSIP_MENU(4284, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 12: //Tailoring + pPlayer->SEND_POI(-9376.12, -75.23, 7, 6, 0, "Eldrin"); + pPlayer->SEND_GOSSIP_MENU(4285, pCreature->GetGUID()); + break; + } +} + +bool GossipSelect_guard_elwynnforest(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch (uiSender) + { + case GOSSIP_SENDER_MAIN: SendDefaultMenu_guard_elwynnforest(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_CLASSTRAIN: SendClassTrainerMenu_guard_elwynnforest(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_PROFTRAIN: SendProfTrainerMenu_guard_elwynnforest(pPlayer, pCreature, uiAction); break; + } + return true; +} + +/******************************************************* + * guard_elwynnforest end + *******************************************************/ + +CreatureAI* GetAI_guard_elwynnforest(Creature* pCreature) +{ + return new guardAI(pCreature); +} + +/******************************************************* + * guard_eversong start + *******************************************************/ + +bool GossipHello_guard_eversong(Player* pPlayer, Creature* pCreature) +{ + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BATHANDLER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_GUILDMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INN , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_STABLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_CLASSTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PROFTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->SEND_GOSSIP_MENU(10180, pCreature->GetGUID()); + return true; +} + +void SendDefaultMenu_guard_eversong(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Bat Handler + pPlayer->SEND_POI(9371.93, -7164.80, 7, 6, 0, "Skymistress Gloaming"); + pPlayer->SEND_GOSSIP_MENU(10181, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Guild master + pPlayer->SEND_GOSSIP_MENU(10182, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Inn + pPlayer->SEND_POI(9483.74, -6844.58, 7, 6, 0, "Delaniel's inn"); + pPlayer->SEND_GOSSIP_MENU(10183, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Stable Master + pPlayer->SEND_POI(9489.62, -6829.93, 7, 6, 0, "Anathos"); + pPlayer->SEND_GOSSIP_MENU(10184, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //Class trainer + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_DRUID , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HUNTER , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAGE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PALADIN , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PRIEST , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ROGUE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARLOCK , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->SEND_GOSSIP_MENU(10180, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //Profession trainer + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALCHEMY , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BLACKSMITHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_COOKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENGINEERING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FIRSTAID , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FISHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HERBALISM , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_JEWELCRAFTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 8); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_LEATHERWORKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 9); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MINING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 10); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SKINNING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 11); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_TAILORING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 12); + pPlayer->SEND_GOSSIP_MENU(10180, pCreature->GetGUID()); + break; + } +} + +void SendClassTrainerMenu_guard_eversong(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Druid + pPlayer->SEND_GOSSIP_MENU(10185, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Hunter + pPlayer->SEND_POI(9527.44, -6865.25, 7, 6, 0, "Hannovia"); + pPlayer->SEND_GOSSIP_MENU(10186, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Mage + pPlayer->SEND_POI(9464.24, -6855.52, 7, 6, 0, "Garridel"); + pPlayer->SEND_GOSSIP_MENU(10187, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Paladin + pPlayer->SEND_POI(9517.61, -6871.04, 7, 6, 0, "Noellene"); + pPlayer->SEND_GOSSIP_MENU(10189, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //Priest + pPlayer->SEND_POI(9467.39, -6845.72, 7, 6, 0, "Ponaris"); + pPlayer->SEND_GOSSIP_MENU(10190, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //Rogue + pPlayer->SEND_POI(9533.67, -6877.39, 7, 6, 0, "Tannaria"); + pPlayer->SEND_GOSSIP_MENU(10191, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 7: //Warlock + pPlayer->SEND_POI(9468.99, -6865.60, 7, 6, 0, "Celoenus"); + pPlayer->SEND_GOSSIP_MENU(10192, pCreature->GetGUID()); + break; + } +} + +void SendProfTrainerMenu_guard_eversong(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy + pPlayer->SEND_POI(8659.90, -6368.12, 7, 6, 0, "Arcanist Sheynathren"); + pPlayer->SEND_GOSSIP_MENU(10193, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing + pPlayer->SEND_POI(8984.21, -7419.21, 7, 6, 0, "Arathel Sunforge"); + pPlayer->SEND_GOSSIP_MENU(10194, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Cooking + pPlayer->SEND_POI(9494.04, -6881.51, 7, 6, 0, "Quarelestra"); + pPlayer->SEND_GOSSIP_MENU(10195, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Engineering + pPlayer->SEND_GOSSIP_MENU(10197, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //First Aid + pPlayer->SEND_POI(9479.46, -6879.16, 7, 6, 0, "Kanaria"); + pPlayer->SEND_GOSSIP_MENU(10198, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //Fishing + pPlayer->SEND_GOSSIP_MENU(10199, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 7: //Herbalism + pPlayer->SEND_POI(8678.92, -6329.09, 7, 6, 0, "Botanist Tyniarrel"); + pPlayer->SEND_GOSSIP_MENU(10200, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 8: //Jewelcrafting + pPlayer->SEND_POI(9484.32, -6874.98, 7, 6, 0, "Aleinia"); + pPlayer->SEND_GOSSIP_MENU(10203, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 9: //Leatherworking + pPlayer->SEND_POI(9362.04, -7130.33, 7, 6, 0, "Sathein"); + pPlayer->SEND_GOSSIP_MENU(10204, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 10: //Mining + pPlayer->SEND_GOSSIP_MENU(10205, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 11: //Skinning + pPlayer->SEND_POI(9362.04, -7130.33, 7, 6, 0, "Mathreyn"); + pPlayer->SEND_GOSSIP_MENU(10206, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 12: //Tailoring + pPlayer->SEND_POI(8680.36, -6327.51, 7, 6, 0, "Sempstress Ambershine"); + pPlayer->SEND_GOSSIP_MENU(10207, pCreature->GetGUID()); + break; + } +} + +bool GossipSelect_guard_eversong(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch (uiSender) + { + case GOSSIP_SENDER_MAIN: SendDefaultMenu_guard_eversong(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_CLASSTRAIN: SendClassTrainerMenu_guard_eversong(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_PROFTRAIN: SendProfTrainerMenu_guard_eversong(pPlayer, pCreature, uiAction); break; + } + return true; +} + +/******************************************************* + * guard_eversong end + *******************************************************/ + +CreatureAI* GetAI_guard_eversong(Creature* pCreature) +{ + return new guardAI(pCreature); +} + +/******************************************************* + * guard_exodar start + *******************************************************/ + +bool GossipHello_guard_exodar(Player* pPlayer, Creature* pCreature) +{ + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_AUCTIONHOUSE , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BANK , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_GUILDMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HIPPOGRYPH , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INN , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAILBOX , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_STABLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WEAPONMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 8); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BATTLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 9); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_CLASSTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PROFTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11); + pPlayer->SEND_GOSSIP_MENU(9551, pCreature->GetGUID()); + return true; +} + +void SendDefaultMenu_guard_exodar(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Auction house + pPlayer->SEND_POI(-4023.6, -11739.3, 7, 6, 0, "Exodar Auction House"); + pPlayer->SEND_GOSSIP_MENU(9528, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Bank + pPlayer->SEND_POI(-3923.89, -11544.5, 7, 6, 0, "Exodar Bank"); + pPlayer->SEND_GOSSIP_MENU(9529, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Guild master + pPlayer->SEND_POI(-4092.57, -11626.5, 7, 6, 0, "Exodar Guild Master"); + pPlayer->SEND_GOSSIP_MENU(9539, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Hippogryph master + pPlayer->SEND_POI(-4060.46, -11787.1, 7, 6, 0, "Exodar Hippogryph Master"); + pPlayer->SEND_GOSSIP_MENU(9530, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //Inn + pPlayer->SEND_POI(-3741.87, -11695.1, 7, 6, 0, "Exodar Inn"); + pPlayer->SEND_GOSSIP_MENU(9545, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //Mailbox + pPlayer->SEND_POI(-3972.5, -11696.0, 7, 6, 0, "Mailbox"); + pPlayer->SEND_GOSSIP_MENU(10254, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 7: //Stable master + pPlayer->SEND_POI(-3786.5, -11702.5, 7, 6, 0, "Stable Master Arthaid"); + pPlayer->SEND_GOSSIP_MENU(9558, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 8: //Weapon trainer + pPlayer->SEND_POI(-4215.68, -11628.9, 7, 6, 0, "Weapon Master Handiir"); + pPlayer->SEND_GOSSIP_MENU(9565, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 9: //Battlemaster + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALTERACVALLEY , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ARATHIBASIN , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ARENA , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_EYEOFTHESTORM , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARSONGULCH , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->SEND_GOSSIP_MENU(9531, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 10: //Class trainer + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_DRUID , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HUNTER , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAGE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PALADIN , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PRIEST , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SHAMAN , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARRIOR , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->SEND_GOSSIP_MENU(9533, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 11: //Profession trainer + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALCHEMY , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BLACKSMITHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_COOKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENCHANTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENGINEERING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FIRSTAID , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FISHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_JEWELCRAFTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 8); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HERBALISM , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 9); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_LEATHERWORKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 10); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MINING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 11); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SKINNING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 12); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_TAILORING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 13); + pPlayer->SEND_GOSSIP_MENU(9555, pCreature->GetGUID()); + break; + } +} + +void SendBattleMasterMenu_guard_exodar(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //AV + pPlayer->SEND_POI(-3978.1, -11357, 7, 6, 0, "Alterac Valley Battlemaster"); + pPlayer->SEND_GOSSIP_MENU(9531, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //AB + pPlayer->SEND_POI(-3998.9, -11345.2, 7, 6, 0, "Arathi Basin Battlemaster"); + pPlayer->SEND_GOSSIP_MENU(9531, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //A + pPlayer->SEND_POI(-3759.27, -11695.63, 7, 6, 0, "Miglik Blotstrom"); + pPlayer->SEND_GOSSIP_MENU(10223, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //EOS + pPlayer->SEND_POI(-3978.1, -11357, 7, 6, 0, "Eye Of The Storm Battlemaster"); + pPlayer->SEND_GOSSIP_MENU(9531, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //WSG + pPlayer->SEND_POI(-3977.5, -11381.2, 7, 6, 0, "Warsong Gulch Battlemaster"); + pPlayer->SEND_GOSSIP_MENU(9531, pCreature->GetGUID()); + break; + } +} + +void SendClassTrainerMenu_guard_exodar(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Druid + pPlayer->SEND_POI(-4276.0, -11495, 7, 6, 0, "Exodar Druid Trainer"); + pPlayer->SEND_GOSSIP_MENU(9534, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Hunter + pPlayer->SEND_POI(-4210.6, -11575.2, 7, 6, 0, "Exodar Hunter Trainer"); + pPlayer->SEND_GOSSIP_MENU(9544, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Mage + pPlayer->SEND_POI(-4057.32, -11556.5, 7, 6, 0, "Exodar Mage Trainer"); + pPlayer->SEND_GOSSIP_MENU(9550, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Paladin + pPlayer->SEND_POI(-4191.2, -11470.4, 7, 6, 0, "Exodar Paladin Trainer"); + pPlayer->SEND_GOSSIP_MENU(9553, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //Priest + pPlayer->SEND_POI(-3969.63, -11482.8, 7, 6, 0, "Exodar Priest Trainer"); + pPlayer->SEND_GOSSIP_MENU(9554, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //Shaman + pPlayer->SEND_POI(-3805.5, -11380.7, 7, 6, 0, "Exodar Shaman Trainer"); + pPlayer->SEND_GOSSIP_MENU(9556, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 7: //Warrior + pPlayer->SEND_POI(-4189.43, -11653.7, 7, 6, 0, "Exodar Warrior Trainer"); + pPlayer->SEND_GOSSIP_MENU(9562, pCreature->GetGUID()); + break; + } +} + +void SendProfTrainerMenu_guard_exodar(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy + pPlayer->SEND_POI(-4040.6, -11364.5, 7, 6, 0, "Exodar Alchemy Trainer"); + pPlayer->SEND_GOSSIP_MENU(9527, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing + pPlayer->SEND_POI(-4229.5, -11706, 7, 6, 0, "Exodar Blacksmithing Trainer"); + pPlayer->SEND_GOSSIP_MENU(9532, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Cooking + pPlayer->SEND_POI(-3798.3, -11651.7, 7, 6, 0, "Exodar Cooking Trainer"); + pPlayer->SEND_GOSSIP_MENU(9551, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Enchanting + pPlayer->SEND_POI(-3889.3, -11495, 7, 6, 0, "Exodar Enchanting Trainer"); + pPlayer->SEND_GOSSIP_MENU(9535, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //Engineering + pPlayer->SEND_POI(-4257.68, -11640.3, 7, 6, 0, "Exodar Engineering Trainer"); + pPlayer->SEND_GOSSIP_MENU(9536, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //First Aid + pPlayer->SEND_POI(-3769.5, -11479.6, 7, 6, 0, "Exodar First Aid Trainer"); + pPlayer->SEND_GOSSIP_MENU(9537, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 7: //Fishing + pPlayer->SEND_POI(-3725.5, -11385.2, 7, 6, 0, "Exodar Fishing Trainer"); + pPlayer->SEND_GOSSIP_MENU(9538, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 8: //Jewelcrafting + pPlayer->SEND_POI(-3783, -11546, 7, 6, 0, "Exodar Jewelcrafting Trainer"); + pPlayer->SEND_GOSSIP_MENU(9547, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 9: //Herbalism + pPlayer->SEND_POI(-4040.6, -11364.5, 7, 6, 0, "Exodar Herbalist Trainer"); + pPlayer->SEND_GOSSIP_MENU(9543, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 10: //Leatherworking + pPlayer->SEND_POI(-4140.6, -11776.7, 7, 6, 0, "Exodar Leatherworking Trainer"); + pPlayer->SEND_GOSSIP_MENU(9549, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 11: //Mining + pPlayer->SEND_POI(-4228, -11697, 7, 6, 0, "Exodar Mining Trainer"); + pPlayer->SEND_GOSSIP_MENU(9552, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 12: //Skinning + pPlayer->SEND_POI(-4134.97, -11760.5, 7, 6, 0, "Exodar Skinning Trainer"); + pPlayer->SEND_GOSSIP_MENU(9557, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 13: //Tailoring + pPlayer->SEND_POI(-4092.5, -11744.5, 7, 6, 0, "Exodar Tailor Trainer"); + pPlayer->SEND_GOSSIP_MENU(9559, pCreature->GetGUID()); + break; + } +} + +bool GossipSelect_guard_exodar(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch (uiSender) + { + case GOSSIP_SENDER_MAIN: SendDefaultMenu_guard_exodar(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_CLASSTRAIN: SendClassTrainerMenu_guard_exodar(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_PROFTRAIN: SendProfTrainerMenu_guard_exodar(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_BATTLEINFO: SendBattleMasterMenu_guard_exodar(pPlayer, pCreature, uiAction); break; + } + return true; +} + +/******************************************************* + * guard_exodar end + *******************************************************/ + +CreatureAI* GetAI_guard_exodar(Creature* pCreature) +{ + return new guardAI(pCreature); +} + +/******************************************************* + * guard_ironforge start + *******************************************************/ + +bool GossipHello_guard_ironforge(Player* pPlayer, Creature* pCreature) +{ + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_AUCTIONHOUSE , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_IRONFORGE_BANK , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_DEEPRUNTRAM , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_GRYPHON , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_GUILDMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INN , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAILBOX , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_STABLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 8); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WEAPONMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 9); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BATTLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_CLASSTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PROFTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 12); + pPlayer->SEND_GOSSIP_MENU(2760, pCreature->GetGUID()); + return true; +} + +void SendDefaultMenu_guard_ironforge(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Auction House + pPlayer->SEND_POI(-4957.39, -911.6, 7, 6, 0, "Ironforge Auction House"); + pPlayer->SEND_GOSSIP_MENU(3014, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Bank + pPlayer->SEND_POI(-4891.91, -991.47, 7, 6, 0, "The Vault"); + pPlayer->SEND_GOSSIP_MENU(2761, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Tram + pPlayer->SEND_POI(-4835.27, -1294.69, 7, 6, 0, "Deeprun Tram"); + pPlayer->SEND_GOSSIP_MENU(3814, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Gryphon Master + pPlayer->SEND_POI(-4821.52, -1152.3, 7, 6, 0, "Ironforge Gryphon Master"); + pPlayer->SEND_GOSSIP_MENU(2762, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //Guild Master + pPlayer->SEND_POI(-5021, -996.45, 7, 6, 0, "Ironforge Visitor's Center"); + pPlayer->SEND_GOSSIP_MENU(2764, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //Inn + pPlayer->SEND_POI(-4850.47, -872.57, 7, 6, 0, "Stonefire Tavern"); + pPlayer->SEND_GOSSIP_MENU(2768, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 7: //Mailbox + pPlayer->SEND_POI(-4845.7, -880.55, 7, 6, 0, "Ironforge Mailbox"); + pPlayer->SEND_GOSSIP_MENU(2769, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 8: //Stable Master + pPlayer->SEND_POI(-5010.2, -1262, 7, 6, 0, "Ulbrek Firehand"); + pPlayer->SEND_GOSSIP_MENU(5986, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 9: //Weapons Trainer + pPlayer->SEND_POI(-5040, -1201.88, 7, 6, 0, "Bixi and Buliwyf"); + pPlayer->SEND_GOSSIP_MENU(4518, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 10: //Battlemaster + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALTERACVALLEY , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ARATHIBASIN , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARSONGULCH , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->SEND_GOSSIP_MENU(7529, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 11: //Class Trainer + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HUNTER , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAGE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PALADIN , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PRIEST , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ROGUE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARLOCK , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARRIOR , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SHAMAN , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 8); + pPlayer->SEND_GOSSIP_MENU(2766, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 12: //Profession Trainer + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALCHEMY , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BLACKSMITHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_COOKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENCHANTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENGINEERING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FIRSTAID , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FISHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HERBALISM , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 8); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_LEATHERWORKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 9); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MINING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 10); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SKINNING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 11); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_TAILORING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 12); + pPlayer->SEND_GOSSIP_MENU(2793, pCreature->GetGUID()); + break; + } +} + +void SendBattleMasterMenu_guard_ironforge(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //AV + pPlayer->SEND_POI(-5047.87, -1263.77, 7, 6, 0, "Glordrum Steelbeard"); + pPlayer->SEND_GOSSIP_MENU(7483, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //AB + pPlayer->SEND_POI(-5038.37, -1266.39, 7, 6, 0, "Donal Osgood"); + pPlayer->SEND_GOSSIP_MENU(7649, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //WSG + pPlayer->SEND_POI(-5037.24, -1274.82, 7, 6, 0, "Lylandris"); + pPlayer->SEND_GOSSIP_MENU(7528, pCreature->GetGUID()); + break; + } +} + +void SendClassTrainerMenu_guard_ironforge(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Hunter + pPlayer->SEND_POI(-5023, -1253.68, 7, 6, 0, "Hall of Arms"); + pPlayer->SEND_GOSSIP_MENU(2770, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Mage + pPlayer->SEND_POI(-4627, -926.45, 7, 6, 0, "Hall of Mysteries"); + pPlayer->SEND_GOSSIP_MENU(2771, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Paladin + pPlayer->SEND_POI(-4627.02, -926.45, 7, 6, 0, "Hall of Mysteries"); + pPlayer->SEND_GOSSIP_MENU(2773, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Priest + pPlayer->SEND_POI(-4627, -926.45, 7, 6, 0, "Hall of Mysteries"); + pPlayer->SEND_GOSSIP_MENU(2772, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //Rogue + pPlayer->SEND_POI(-4647.83, -1124, 7, 6, 0, "Ironforge Rogue Trainer"); + pPlayer->SEND_GOSSIP_MENU(2774, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //Warlock + pPlayer->SEND_POI(-4605, -1110.45, 7, 6, 0, "Ironforge Warlock Trainer"); + pPlayer->SEND_GOSSIP_MENU(2775, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 7: //Warrior + pPlayer->SEND_POI(-5023.08, -1253.68, 7, 6, 0, "Hall of Arms"); + pPlayer->SEND_GOSSIP_MENU(2776, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 8: //Shaman + pPlayer->SEND_POI(-4732, -1147, 7, 6, 0, "Ironforge Shaman Trainer"); + //incorrect id + pPlayer->SEND_GOSSIP_MENU(2766, pCreature->GetGUID()); + break; + } +} + +void SendProfTrainerMenu_guard_ironforge(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy + pPlayer->SEND_POI(-4858.5, -1241.83, 7, 6, 0, "Berryfizz's Potions and Mixed Drinks"); + pPlayer->SEND_GOSSIP_MENU(2794, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing + pPlayer->SEND_POI(-4796.97, -1110.17, 7, 6, 0, "The Great Forge"); + pPlayer->SEND_GOSSIP_MENU(2795, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Cooking + pPlayer->SEND_POI(-4767.83, -1184.59, 7, 6, 0, "The Bronze Kettle"); + pPlayer->SEND_GOSSIP_MENU(2796, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Enchanting + pPlayer->SEND_POI(-4803.72, -1196.53, 7, 6, 0, "Thistlefuzz Arcanery"); + pPlayer->SEND_GOSSIP_MENU(2797, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //Engineering + pPlayer->SEND_POI(-4799.56, -1250.23, 7, 6, 0, "Springspindle's Gadgets"); + pPlayer->SEND_GOSSIP_MENU(2798, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //First Aid + pPlayer->SEND_POI(-4881.6, -1153.13, 7, 6, 0, "Ironforge Physician"); + pPlayer->SEND_GOSSIP_MENU(2799, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 7: //Fishing + pPlayer->SEND_POI(-4597.91, -1091.93, 7, 6, 0, "Traveling Fisherman"); + pPlayer->SEND_GOSSIP_MENU(2800, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 8: //Herbalism + pPlayer->SEND_POI(-4876.9, -1151.92, 7, 6, 0, "Ironforge Physician"); + pPlayer->SEND_GOSSIP_MENU(2801, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 9: //Leatherworking + pPlayer->SEND_POI(-4745, -1027.57, 7, 6, 0, "Finespindle's Leather Goods"); + pPlayer->SEND_GOSSIP_MENU(2802, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 10: //Minning + pPlayer->SEND_POI(-4705.06, -1116.43, 7, 6, 0, "Deepmountain Mining Guild"); + pPlayer->SEND_GOSSIP_MENU(2804, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 11: //Skinning + pPlayer->SEND_POI(-4745, -1027.57, 7, 6, 0, "Finespindle's Leather Goods"); + pPlayer->SEND_GOSSIP_MENU(2805, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 12: //Tailoring + pPlayer->SEND_POI(-4719.60, -1056.96, 7, 6, 0, "Stonebrow's Clothier"); + pPlayer->SEND_GOSSIP_MENU(2807, pCreature->GetGUID()); + break; + } +} + +bool GossipSelect_guard_ironforge(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch (uiSender) + { + case GOSSIP_SENDER_MAIN: SendDefaultMenu_guard_ironforge(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_CLASSTRAIN: SendClassTrainerMenu_guard_ironforge(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_PROFTRAIN: SendProfTrainerMenu_guard_ironforge(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_BATTLEINFO: SendBattleMasterMenu_guard_ironforge(pPlayer, pCreature, uiAction); break; + } + return true; +} + +/******************************************************* + * guard_ironforge end + *******************************************************/ + +CreatureAI* GetAI_guard_ironforge(Creature* pCreature) +{ + return new guardAI(pCreature); +} + +/******************************************************* + * guard_mulgore start + *******************************************************/ + +bool GossipHello_guard_mulgore(Player* pPlayer, Creature* pCreature) +{ + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BANK , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WINDRIDER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INN , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_STABLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_CLASSTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PROFTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->SEND_GOSSIP_MENU(3543, pCreature->GetGUID()); + return true; +} + +void SendDefaultMenu_guard_mulgore(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Bank + pPlayer->SEND_GOSSIP_MENU(4051, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Wind rider + pPlayer->SEND_GOSSIP_MENU(4052, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Inn + pPlayer->SEND_POI(-2361.38, -349.19, 7, 6, 0, "Bloodhoof Village Inn"); + pPlayer->SEND_GOSSIP_MENU(4053, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Stable master + pPlayer->SEND_POI(-2338.86, -357.56, 7, 6, 0, "Seikwa"); + pPlayer->SEND_GOSSIP_MENU(5976, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //Class trainer + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_DRUID , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HUNTER , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SHAMAN , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARRIOR , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->SEND_GOSSIP_MENU(4069, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //Profession trainer + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALCHEMY , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BLACKSMITHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_COOKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENCHANTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FIRSTAID , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FISHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HERBALISM , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_LEATHERWORKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 8); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MINING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 9); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SKINNING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 10); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_TAILORING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 11); + pPlayer->SEND_GOSSIP_MENU(4070, pCreature->GetGUID()); + break; + } +} + +void SendClassTrainerMenu_guard_mulgore(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Druid + pPlayer->SEND_POI(-2312.15, -443.69, 7, 6, 0, "Gennia Runetotem"); + pPlayer->SEND_GOSSIP_MENU(4054, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Hunter + pPlayer->SEND_POI(-2178.14, -406.14, 7, 6, 0, "Yaw Sharpmane"); + pPlayer->SEND_GOSSIP_MENU(4055, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Shaman + pPlayer->SEND_POI(-2301.5, -439.87, 7, 6, 0, "Narm Skychaser"); + pPlayer->SEND_GOSSIP_MENU(4056, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Warrior + pPlayer->SEND_POI(-2345.43, -494.11, 7, 6, 0, "Krang Stonehoof"); + pPlayer->SEND_GOSSIP_MENU(4057, pCreature->GetGUID()); + break; + } +} + +void SendProfTrainerMenu_guard_mulgore(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy + pPlayer->SEND_GOSSIP_MENU(4058, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing + pPlayer->SEND_GOSSIP_MENU(4059, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Cooking + pPlayer->SEND_POI(-2263.34, -287.91, 7, 6, 0, "Pyall Silentstride"); + pPlayer->SEND_GOSSIP_MENU(4060, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Enchanting + pPlayer->SEND_GOSSIP_MENU(4061, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //First Aid + pPlayer->SEND_POI(-2353.52, -355.82, 7, 6, 0, "Vira Younghoof"); + pPlayer->SEND_GOSSIP_MENU(4062, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //Fishing + pPlayer->SEND_POI(-2349.21, -241.37, 7, 6, 0, "Uthan Stillwater"); + pPlayer->SEND_GOSSIP_MENU(4063, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 7: //Herbalism + pPlayer->SEND_GOSSIP_MENU(4064, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 8: //Leatherworking + pPlayer->SEND_POI(-2257.12, -288.63, 7, 6, 0, "Chaw Stronghide"); + pPlayer->SEND_GOSSIP_MENU(4065, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 9: //Mining + pPlayer->SEND_GOSSIP_MENU(4066, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 10: //Skinning + pPlayer->SEND_POI(-2252.94, -291.32, 7, 6, 0, "Yonn Deepcut"); + pPlayer->SEND_GOSSIP_MENU(4067, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 11: //Tailoring + pPlayer->SEND_GOSSIP_MENU(4068, pCreature->GetGUID()); + break; + } +} + +bool GossipSelect_guard_mulgore(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch (uiSender) + { + case GOSSIP_SENDER_MAIN: SendDefaultMenu_guard_mulgore(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_CLASSTRAIN: SendClassTrainerMenu_guard_mulgore(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_PROFTRAIN: SendProfTrainerMenu_guard_mulgore(pPlayer, pCreature, uiAction); break; + } + return true; +} + +/******************************************************* + * guard_mulgore end + *******************************************************/ + +CreatureAI* GetAI_guard_mulgore(Creature* pCreature) +{ + return new guardAI(pCreature); +} + +/******************************************************* + * guard_orgrimmar start + *******************************************************/ + +bool GossipHello_guard_orgrimmar(Player* pPlayer, Creature* pCreature) +{ + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BANK , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WINDRIDER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_GUILDMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INN , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAILBOX , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_AUCTIONHOUSE , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ZEPPLINMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WEAPONMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 8); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_STABLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 9); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_OFFICERS , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BATTLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_CLASSTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 12); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PROFTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 13); + pPlayer->SEND_GOSSIP_MENU(2593, pCreature->GetGUID()); + + return true; +} + +void SendDefaultMenu_guard_orgrimmar(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Bank + pPlayer->SEND_POI(1631.51, -4375.33, 7, 6, 0, "Bank of Orgrimmar"); + pPlayer->SEND_GOSSIP_MENU(2554, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //wind rider + pPlayer->SEND_POI(1676.6, -4332.72, 7, 6, 0, "The Sky Tower"); + pPlayer->SEND_GOSSIP_MENU(2555, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //guild master + pPlayer->SEND_POI(1576.93, -4294.75, 7, 6, 0, "Horde Embassy"); + pPlayer->SEND_GOSSIP_MENU(2556, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Inn + pPlayer->SEND_POI(1644.51, -4447.27, 7, 6, 0, "Orgrimmar Inn"); + pPlayer->SEND_GOSSIP_MENU(2557, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //mailbox + pPlayer->SEND_POI(1622.53, -4388.79, 7, 6, 0, "Orgrimmar Mailbox"); + pPlayer->SEND_GOSSIP_MENU(2558, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //auction house + pPlayer->SEND_POI(1679.21, -4450.1, 7, 6, 0, "Orgrimmar Auction House"); + pPlayer->SEND_GOSSIP_MENU(3075, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 7: //zeppelin + pPlayer->SEND_POI(1337.36, -4632.7, 7, 6, 0, "Orgrimmar Zeppelin Tower"); + pPlayer->SEND_GOSSIP_MENU(3173, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 8: //weapon master + pPlayer->SEND_POI(2092.56, -4823.95, 7, 6, 0, "Sayoc & Hanashi"); + pPlayer->SEND_GOSSIP_MENU(4519, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 9: //stable master + pPlayer->SEND_POI(2133.12, -4663.93, 7, 6, 0, "Xon'cha"); + pPlayer->SEND_GOSSIP_MENU(5974, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 10: //officers lounge + pPlayer->SEND_POI(1633.56, -4249.37, 7, 6, 0, "Hall of Legends"); + pPlayer->SEND_GOSSIP_MENU(7046, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 11: //battlemaster + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALTERACVALLEY , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ARATHIBASIN , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARSONGULCH , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->SEND_GOSSIP_MENU(7521, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 12: //class trainer + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HUNTER , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAGE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PRIEST , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SHAMAN , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ROGUE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARLOCK , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARRIOR , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PALADIN , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 8); + pPlayer->SEND_GOSSIP_MENU(2599, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 13: //profession trainer + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALCHEMY , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BLACKSMITHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_COOKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENCHANTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENGINEERING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FIRSTAID , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FISHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HERBALISM , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 8); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_LEATHERWORKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 9); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MINING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 10); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SKINNING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 11); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_TAILORING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 12); + pPlayer->SEND_GOSSIP_MENU(2594, pCreature->GetGUID()); + break; + } +} + +void SendBattleMasterMenu_guard_orgrimmar(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //AV + pPlayer->SEND_POI(1983.92, -4794.2, 7, 6, 0, "Hall of the Brave"); + pPlayer->SEND_GOSSIP_MENU(7484, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //AB + pPlayer->SEND_POI(1983.92, -4794.2, 7, 6, 0, "Hall of the Brave"); + pPlayer->SEND_GOSSIP_MENU(7644, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //WSG + pPlayer->SEND_POI(1983.92, -4794.2, 7, 6, 0, "Hall of the Brave"); + pPlayer->SEND_GOSSIP_MENU(7520, pCreature->GetGUID()); + break; + } +} + +void SendClassTrainerMenu_guard_orgrimmar(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Hunter + pPlayer->SEND_POI(2114.84, -4625.31, 7, 6, 0, "Orgrimmar Hunter's Hall"); + pPlayer->SEND_GOSSIP_MENU(2559, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Mage + pPlayer->SEND_POI(1451.26, -4223.33, 7, 6, 0, "Darkbriar Lodge"); + pPlayer->SEND_GOSSIP_MENU(2560, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Priest + pPlayer->SEND_POI(1442.21, -4183.24, 7, 6, 0, "Spirit Lodge"); + pPlayer->SEND_GOSSIP_MENU(2561, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Shaman + pPlayer->SEND_POI(1925.34, -4181.89, 7, 6, 0, "Thrall's Fortress"); + pPlayer->SEND_GOSSIP_MENU(2562, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //Rogue + pPlayer->SEND_POI(1773.39, -4278.97, 7, 6, 0, "Shadowswift Brotherhood"); + pPlayer->SEND_GOSSIP_MENU(2563, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //Warlock + pPlayer->SEND_POI(1849.57, -4359.68, 7, 6, 0, "Darkfire Enclave"); + pPlayer->SEND_GOSSIP_MENU(2564, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 7: //Warrior + pPlayer->SEND_POI(1983.92, -4794.2, 7, 6, 0, "Hall of the Brave"); + pPlayer->SEND_GOSSIP_MENU(2565, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 8: //Paladin + pPlayer->SEND_POI(1906.65, -4134.26, 7, 6, 0, "Valley of Wisdom"); + pPlayer->SEND_GOSSIP_MENU(10843, pCreature->GetGUID()); + break; + } +} + +void SendProfTrainerMenu_guard_orgrimmar(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy + pPlayer->SEND_POI(1955.17, -4475.79, 7, 6, 0, "Yelmak's Alchemy and Potions"); + pPlayer->SEND_GOSSIP_MENU(2497, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing + pPlayer->SEND_POI(2054.34, -4831.85, 7, 6, 0, "The Burning Anvil"); + pPlayer->SEND_GOSSIP_MENU(2499, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Cooking + pPlayer->SEND_POI(1780.96, -4481.31, 7, 6, 0, "Borstan's Firepit"); + pPlayer->SEND_GOSSIP_MENU(2500, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Enchanting + pPlayer->SEND_POI(1917.5, -4434.95, 7, 6, 0, "Godan's Runeworks"); + pPlayer->SEND_GOSSIP_MENU(2501, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //Engineering + pPlayer->SEND_POI(2038.45, -4744.75, 7, 6, 0, "Nogg's Machine Shop"); + pPlayer->SEND_GOSSIP_MENU(2653, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //First Aid + pPlayer->SEND_POI(1485.21, -4160.91, 7, 6, 0, "Survival of the Fittest"); + pPlayer->SEND_GOSSIP_MENU(2502, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 7: //Fishing + pPlayer->SEND_POI(1994.15, -4655.7, 7, 6, 0, "Lumak's Fishing"); + pPlayer->SEND_GOSSIP_MENU(2503, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 8: //Herbalism + pPlayer->SEND_POI(1898.61, -4454.93, 7, 6, 0, "Jandi's Arboretum"); + pPlayer->SEND_GOSSIP_MENU(2504, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 9: //Leatherworking + pPlayer->SEND_POI(1852.82, -4562.31, 7, 6, 0, "Kodohide Leatherworkers"); + pPlayer->SEND_GOSSIP_MENU(2513, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 10: //Mining + pPlayer->SEND_POI(2029.79, -4704, 7, 6, 0, "Red Canyon Mining"); + pPlayer->SEND_GOSSIP_MENU(2515, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 11: //Skinning + pPlayer->SEND_POI(1852.82, -4562.31, 7, 6, 0, "Kodohide Leatherworkers"); + pPlayer->SEND_GOSSIP_MENU(2516, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 12: //Tailoring + pPlayer->SEND_POI(1802.66, -4560.66, 7, 6, 0, "Magar's Cloth Goods"); + pPlayer->SEND_GOSSIP_MENU(2518, pCreature->GetGUID()); + break; + } +} + +bool GossipSelect_guard_orgrimmar(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch (uiSender) + { + case GOSSIP_SENDER_MAIN: SendDefaultMenu_guard_orgrimmar(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_CLASSTRAIN: SendClassTrainerMenu_guard_orgrimmar(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_PROFTRAIN: SendProfTrainerMenu_guard_orgrimmar(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_BATTLEINFO: SendBattleMasterMenu_guard_orgrimmar(pPlayer, pCreature, uiAction); break; + } + return true; +} + +/******************************************************* + * guard_orgrimmar end + *******************************************************/ + +CreatureAI* GetAI_guard_orgrimmar(Creature* pCreature) +{ + return new guardAI_orgrimmar (pCreature); +} + +/******************************************************* + * guard_shattrath start + *******************************************************/ + +bool GossipHello_guard_shattrath(Player* pPlayer, Creature* pCreature) +{ + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_TAVERN , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BANK , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INN , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FLIGHTMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAILBOX , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_STABLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BATTLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PROFTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 8); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MANALOOM , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 9); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALCHEMYLAB , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_GEMMERCHANT , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11); + pPlayer->SEND_GOSSIP_MENU(10321, pCreature->GetGUID()); + + return true; +} + +void SendDefaultMenu_guard_shattrath(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Tavern + pPlayer->SEND_POI(-1759.5, 5165, 7, 6, 0, "Worlds End Tavern"); + pPlayer->SEND_GOSSIP_MENU(10394, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Bank + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BANKALDOR , GOSSIP_SENDER_SEC_BANK, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BANKSCYERS , GOSSIP_SENDER_SEC_BANK, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->SEND_GOSSIP_MENU(10379, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Inn + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INNALDOR , GOSSIP_SENDER_SEC_INN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INNSCYERS , GOSSIP_SENDER_SEC_INN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->SEND_GOSSIP_MENU(10382, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Flight master + pPlayer->SEND_POI(-1832, 5299, 7, 6, 0, "Flight Master"); + pPlayer->SEND_GOSSIP_MENU(10385, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //Mailbox + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BANKALDOR , GOSSIP_SENDER_SEC_MAILBOX, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INNALDOR , GOSSIP_SENDER_SEC_MAILBOX, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BANKSCYERS , GOSSIP_SENDER_SEC_MAILBOX, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INNSCYERS , GOSSIP_SENDER_SEC_MAILBOX, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->SEND_GOSSIP_MENU(10386, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //Stable master + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_STABLEALDOR , GOSSIP_SENDER_SEC_STABLEMASTER, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_STABLESCYERS , GOSSIP_SENDER_SEC_STABLEMASTER, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->SEND_GOSSIP_MENU(10387, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 7: //Battlemaster + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BATTLEMASTERALLIANCE , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BATTLEMASTERHORDE , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BATTLEMASTERARENA , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->SEND_GOSSIP_MENU(10388, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 8: //Profession master + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALCHEMY , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BLACKSMITHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_COOKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENCHANTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FIRSTAID , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_JEWELCRAFTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_LEATHERWORKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SKINNING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 8); + pPlayer->SEND_GOSSIP_MENU(10391, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 9: //Mana Loom + pPlayer->SEND_POI(-2070, 5265.5, 7, 6, 0, "Mana Loom"); + pPlayer->SEND_GOSSIP_MENU(10503, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 10: //Alchemy Lab + pPlayer->SEND_POI(-1648.5, 5540, 7, 6, 0, "Alchemy Lab"); + pPlayer->SEND_GOSSIP_MENU(10321, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 11: //Gem Merchant + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_GEMALDOR , GOSSIP_SENDER_SEC_GEMMERCHANT, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_GEMSCYERS , GOSSIP_SENDER_SEC_GEMMERCHANT, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->SEND_GOSSIP_MENU(10697, pCreature->GetGUID()); + break; + } +} + +void SendBankMenu_guard_shattrath(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) + { + pPlayer->SEND_POI(-1730.5, 5496, 7, 6, 0, "Aldor Bank"); + pPlayer->SEND_GOSSIP_MENU(10380, pCreature->GetGUID()); + } + if (uiAction == GOSSIP_ACTION_INFO_DEF + 2) + { + pPlayer->SEND_POI(-1997.7, 5363, 7, 6, 0, "Scyers Bank"); + pPlayer->SEND_GOSSIP_MENU(10381, pCreature->GetGUID()); + } +} + +void SendInnMenu_guard_shattrath(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) + { + pPlayer->SEND_POI(-1895, 5767, 7, 6, 0, "Aldor Inn"); + pPlayer->SEND_GOSSIP_MENU(10383, pCreature->GetGUID()); + } + if (uiAction == GOSSIP_ACTION_INFO_DEF + 2) + { + pPlayer->SEND_POI(-2178, 5405, 7, 6, 0, "Scyers Inn"); + pPlayer->SEND_GOSSIP_MENU(10384, pCreature->GetGUID()); + } +} + +void SendMailboxMenu_guard_shattrath(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: + pPlayer->SEND_POI(-1730.5, 5496, 7, 6, 0, "Aldor Bank"); + pPlayer->SEND_GOSSIP_MENU(10380, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: + pPlayer->SEND_POI(-1895, 5767, 7, 6, 0, "Aldor Inn"); + pPlayer->SEND_GOSSIP_MENU(10383, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: + pPlayer->SEND_POI(-1997.7, 5363, 7, 6, 0, "Scyers Bank"); + pPlayer->SEND_GOSSIP_MENU(10381, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: + pPlayer->SEND_POI(-2178, 5405, 7, 6, 0, "Scyers Inn"); + pPlayer->SEND_GOSSIP_MENU(10384, pCreature->GetGUID()); + break; + } +} + +void SendStableMasterMenu_guard_shattrath(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) + { + pPlayer->SEND_POI(-1888.5, 5761, 7, 6, 0, "Aldor Stable"); + pPlayer->SEND_GOSSIP_MENU(10321, pCreature->GetGUID()); + } + if (uiAction == GOSSIP_ACTION_INFO_DEF + 2) + { + pPlayer->SEND_POI(-2170, 5404, 7, 6, 0, "Scyers Stable"); + pPlayer->SEND_GOSSIP_MENU(10321, pCreature->GetGUID()); + } +} + +void SendBattleMasterMenu_guard_shattrath(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: + pPlayer->SEND_POI(-1774, 5251, 7, 6, 0, "Alliance Battlemasters"); + pPlayer->SEND_GOSSIP_MENU(10389, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: + pPlayer->SEND_POI(-1963, 5263, 7, 6, 0, "Horde Battlemasters"); + pPlayer->SEND_GOSSIP_MENU(10390, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: + pPlayer->SEND_POI(-1960, 5175, 7, 6, 0, "Arena Battlemasters"); + pPlayer->SEND_GOSSIP_MENU(12510, pCreature->GetGUID()); + break; + } +} + +void SendProfTrainerMenu_guard_shattrath(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy + pPlayer->SEND_POI(-1648.5, 5534, 7, 6, 0, "Lorokeem"); + pPlayer->SEND_GOSSIP_MENU(10392, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing + pPlayer->SEND_POI(-1847, 5222, 7, 6, 0, "Kradu Grimblade and Zula Slagfury"); + pPlayer->SEND_GOSSIP_MENU(10400, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Cooking + pPlayer->SEND_POI(-2067.4, 5316.5, 7, 6, 0, "Jack Trapper"); + pPlayer->SEND_GOSSIP_MENU(10393, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Enchanting + pPlayer->SEND_POI(-2263.5, 5563.5, 7, 6, 0, "High Enchanter Bardolan"); + pPlayer->SEND_GOSSIP_MENU(10395, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //First Aid + pPlayer->SEND_POI(-1591, 5265.5, 7, 6, 0, "Mildred Fletcher"); + pPlayer->SEND_GOSSIP_MENU(10396, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //Jewelcrafting + pPlayer->SEND_POI(-1654, 5667.5, 7, 6, 0, "Hamanar"); + pPlayer->SEND_GOSSIP_MENU(10397, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 7: //Leatherworking + pPlayer->SEND_POI(-2060.5, 5256.5, 7, 6, 0, "Darmari"); + pPlayer->SEND_GOSSIP_MENU(10399, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 8: //Skinning + pPlayer->SEND_POI(-2048, 5300, 7, 6, 0, "Seymour"); + pPlayer->SEND_GOSSIP_MENU(10398, pCreature->GetGUID()); + break; + } +} + +void SendGemMerchantMenu_guard_shattrath(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) + { + pPlayer->SEND_POI(-1645, 5669.5, 7, 6, 0, "Aldor Gem Merchant"); + pPlayer->SEND_GOSSIP_MENU(10698, pCreature->GetGUID()); + } + if (uiAction == GOSSIP_ACTION_INFO_DEF + 2) + { + pPlayer->SEND_POI(-2193, 5424.5, 7, 6, 0, "Scyers Gem Merchant"); + pPlayer->SEND_GOSSIP_MENU(10699, pCreature->GetGUID()); + } +} + +bool GossipSelect_guard_shattrath(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch (uiSender) + { + case GOSSIP_SENDER_MAIN: SendDefaultMenu_guard_shattrath(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_BANK: SendBankMenu_guard_shattrath(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_INN: SendInnMenu_guard_shattrath(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_STABLEMASTER: SendStableMasterMenu_guard_shattrath(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_GEMMERCHANT: SendGemMerchantMenu_guard_shattrath(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_MAILBOX: SendMailboxMenu_guard_shattrath(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_PROFTRAIN: SendProfTrainerMenu_guard_shattrath(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_BATTLEINFO: SendBattleMasterMenu_guard_shattrath(pPlayer, pCreature, uiAction); break; + } + return true; +} + +/******************************************************* + * guard_shattrath end + *******************************************************/ + +CreatureAI* GetAI_guard_shattrath(Creature* pCreature) +{ + return new guardAI(pCreature); +} + +/******************************************************* + * guard_shattrath_aldor + *******************************************************/ + +#define SPELL_BANISHED_SHATTRATH_A 36642 +#define SPELL_BANISHED_SHATTRATH_S 36671 +#define SPELL_BANISH_TELEPORT 36643 +#define SPELL_EXILE 39533 + +struct MANGOS_DLL_DECL guard_shattrath_aldorAI : public guardAI +{ + guard_shattrath_aldorAI(Creature* pCreature) : guardAI(pCreature) { Reset(); } + + uint32 Exile_Timer; + uint32 Banish_Timer; + uint64 playerGUID; + bool CanTeleport; + + void Reset() + { + Banish_Timer = 5000; + Exile_Timer = 8500; + playerGUID = 0; + CanTeleport = false; + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (CanTeleport) + { + if (Exile_Timer < diff) + { + if (Unit* temp = Unit::GetUnit(*m_creature,playerGUID)) + { + temp->CastSpell(temp,SPELL_EXILE,true); + temp->CastSpell(temp,SPELL_BANISH_TELEPORT,true); + } + playerGUID = 0; + Exile_Timer = 8500; + CanTeleport = false; + }else Exile_Timer -= diff; + } + else if (Banish_Timer < diff) + { + Unit* temp = m_creature->getVictim(); + if (temp && temp->GetTypeId() == TYPEID_PLAYER) + { + DoCast(temp,SPELL_BANISHED_SHATTRATH_A); + Banish_Timer = 9000; + playerGUID = temp->GetGUID(); + if (playerGUID) + CanTeleport = true; + } + }else Banish_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +bool GossipHello_guard_shattrath_aldor(Player* pPlayer, Creature* pCreature) +{ + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_TAVERN , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BANK , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INN , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FLIGHTMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAILBOX , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_STABLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BATTLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PROFTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 8); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MANALOOM , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 9); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALCHEMYLAB , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_GEMMERCHANT , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11); + pPlayer->SEND_GOSSIP_MENU(10524, pCreature->GetGUID()); + return true; +} + +void SendDefaultMenu_guard_shattrath_aldor(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Tavern + pPlayer->SEND_POI(-1759.5, 5165, 7, 6, 0, "Worlds End Tavern"); + pPlayer->SEND_GOSSIP_MENU(10394, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Bank + pPlayer->SEND_POI(-1730.5, 5496, 7, 6, 0, "Aldor Bank"); + pPlayer->SEND_GOSSIP_MENU(10380, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Inn + pPlayer->SEND_POI(-1895, 5767, 7, 6, 0, "Aldor Inn"); + pPlayer->SEND_GOSSIP_MENU(10525, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Flight master + pPlayer->SEND_POI(-1832, 5299, 7, 6, 0, "Shattrath Flight Master"); + pPlayer->SEND_GOSSIP_MENU(10402, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //Mailbox + pPlayer->SEND_POI(0, 0, 7, 6, 0, "Aldor Mailbox"); + //unknown + pPlayer->SEND_GOSSIP_MENU(10524, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //Stable master + pPlayer->SEND_POI(-1888.5, 5761, 7, 6, 0, "Aldor Stable Master"); + pPlayer->SEND_GOSSIP_MENU(10527, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 7: //Battlemaster + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BATTLEMASTERALLIANCE , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BATTLEMASTERHORDE , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BATTLEMASTERARENA , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->SEND_GOSSIP_MENU(10388, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 8: //Profession master + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALCHEMY , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BLACKSMITHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_COOKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENCHANTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FIRSTAID , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_JEWELCRAFTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_LEATHERWORKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SKINNING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 8); + pPlayer->SEND_GOSSIP_MENU(10391, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 9: //Mana Loom + pPlayer->SEND_POI(-2070, 5265.5, 7, 6, 0, "Mana Loom"); + pPlayer->SEND_GOSSIP_MENU(10522, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 10: //Alchemy Lab + pPlayer->SEND_POI(-1648.5, 5540, 7, 6, 0, "Alchemy Lab"); + pPlayer->SEND_GOSSIP_MENU(10696, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 11: //Gem Merchant + pPlayer->SEND_POI(-1645, 5669.5, 7, 6, 0, "Aldor Gem Merchant"); + pPlayer->SEND_GOSSIP_MENU(10411, pCreature->GetGUID()); + break; + } +} + +void SendProfTrainerMenu_guard_shattrath_aldor(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy + pPlayer->SEND_POI(-1648.5, 5534, 7, 6, 0, "Lorokeem"); + pPlayer->SEND_GOSSIP_MENU(10392, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing + pPlayer->SEND_POI(-1847, 5222, 7, 6, 0, "Kradu Grimblade and Zula Slagfury"); + pPlayer->SEND_GOSSIP_MENU(10400, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Cooking + pPlayer->SEND_POI(-2067.4, 5316.5, 7, 6, 0, "Jack Trapper"); + pPlayer->SEND_GOSSIP_MENU(10393, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Enchanting + pPlayer->SEND_POI(-2263.5, 5563.5, 7, 6, 0, "High Enchanter Bardolan"); + pPlayer->SEND_GOSSIP_MENU(10528, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //First Aid + pPlayer->SEND_POI(-1591, 5265.5, 7, 6, 0, "Mildred Fletcher"); + pPlayer->SEND_GOSSIP_MENU(10396, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //Jewelcrafting + pPlayer->SEND_POI(-1654, 5667.5, 7, 6, 0, "Hamanar"); + pPlayer->SEND_GOSSIP_MENU(10529, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 7: //Leatherworking + pPlayer->SEND_POI(-2060.5, 5256.5, 7, 6, 0, "Darmari"); + pPlayer->SEND_GOSSIP_MENU(10399, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 8: //Skinning + pPlayer->SEND_POI(-2048, 5300, 7, 6, 0, "Seymour"); + pPlayer->SEND_GOSSIP_MENU(10419, pCreature->GetGUID()); + break; + } +} + +bool GossipSelect_guard_shattrath_aldor(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch (uiSender) + { + case GOSSIP_SENDER_MAIN: SendDefaultMenu_guard_shattrath_aldor(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_PROFTRAIN: SendProfTrainerMenu_guard_shattrath_aldor(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_BATTLEINFO: SendBattleMasterMenu_guard_shattrath(pPlayer, pCreature, uiAction); break; + } + return true; +} + +/******************************************************* + * guard_shattrath_aldor end + *******************************************************/ + +CreatureAI* GetAI_guard_shattrath_aldor(Creature* pCreature) +{ + return new guard_shattrath_aldorAI(pCreature); +} + +/******************************************************* + * guard_shattrath_scryer + *******************************************************/ + +struct MANGOS_DLL_DECL guard_shattrath_scryerAI : public guardAI +{ + guard_shattrath_scryerAI(Creature* pCreature) : guardAI(pCreature) { Reset(); } + + uint32 Exile_Timer; + uint32 Banish_Timer; + uint64 playerGUID; + bool CanTeleport; + + void Reset() + { + Banish_Timer = 5000; + Exile_Timer = 8500; + playerGUID = 0; + CanTeleport = false; + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (CanTeleport) + { + if (Exile_Timer < diff) + { + if (Unit* temp = Unit::GetUnit(*m_creature,playerGUID)) + { + temp->CastSpell(temp,SPELL_EXILE,true); + temp->CastSpell(temp,SPELL_BANISH_TELEPORT,true); + } + playerGUID = 0; + Exile_Timer = 8500; + CanTeleport = false; + }else Exile_Timer -= diff; + } + else if (Banish_Timer < diff) + { + Unit* temp = m_creature->getVictim(); + if (temp && temp->GetTypeId() == TYPEID_PLAYER) + { + DoCast(temp,SPELL_BANISHED_SHATTRATH_S); + Banish_Timer = 9000; + playerGUID = temp->GetGUID(); + if (playerGUID) + CanTeleport = true; + } + }else Banish_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +bool GossipHello_guard_shattrath_scryer(Player* pPlayer, Creature* pCreature) +{ + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_TAVERN , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BANK , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INN , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FLIGHTMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAILBOX , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_STABLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BATTLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PROFTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 8); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MANALOOM , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 9); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALCHEMYLAB , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_GEMMERCHANT , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11); + pPlayer->SEND_GOSSIP_MENU(10430, pCreature->GetGUID()); + return true; +} + +void SendDefaultMenu_guard_shattrath_scryer(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Tavern + pPlayer->SEND_POI(-1759.5, 5165, 7, 6, 0, "Worlds End Tavern"); + pPlayer->SEND_GOSSIP_MENU(10431, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Bank + pPlayer->SEND_POI(-1996.6, 5363.7, 7, 6, 0, "Scryer Bank"); + pPlayer->SEND_GOSSIP_MENU(10432, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Inn + pPlayer->SEND_POI(-2176.6, 5405.8, 7, 6, 0, "Scryer Inn"); + pPlayer->SEND_GOSSIP_MENU(10433, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Flight master + pPlayer->SEND_POI(-1832, 5299, 7, 6, 0, "Shattrath Flight Master"); + pPlayer->SEND_GOSSIP_MENU(10435, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //Mailbox + pPlayer->SEND_POI(-2174.3, 5411.4, 7, 6, 0, "Scryer Mailbox"); + pPlayer->SEND_GOSSIP_MENU(10436, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //Stable master + pPlayer->SEND_POI(-2169.9, 5405.1, 7, 6, 0, "Scryer Stable Master"); + pPlayer->SEND_GOSSIP_MENU(10437, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 7: //Battlemaster + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BATTLEMASTERALLIANCE , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BATTLEMASTERHORDE , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BATTLEMASTERARENA , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->SEND_GOSSIP_MENU(10438, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 8: //Profession master + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALCHEMY , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BLACKSMITHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_COOKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENCHANTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FIRSTAID , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_JEWELCRAFTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_LEATHERWORKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SKINNING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 8); + pPlayer->SEND_GOSSIP_MENU(10504, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 9: //Mana Loom + pPlayer->SEND_POI(-2070, 5265.5, 7, 6, 0, "Mana Loom"); + pPlayer->SEND_GOSSIP_MENU(10522, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 10: //Alchemy Lab + pPlayer->SEND_POI(-1648.5, 5540, 7, 6, 0, "Alchemy Lab"); + pPlayer->SEND_GOSSIP_MENU(10701, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 11: //Gem Merchant + pPlayer->SEND_POI(-1645, 5669.5, 7, 6, 0, "Scryer Gem Merchant"); + pPlayer->SEND_GOSSIP_MENU(10702, pCreature->GetGUID()); + break; + } +} + +void SendProfTrainerMenu_guard_shattrath_scryer(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy + pPlayer->SEND_POI(-1648.5, 5534, 7, 6, 0, "Lorokeem"); + pPlayer->SEND_GOSSIP_MENU(10516, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing + pPlayer->SEND_POI(-1847, 5222, 7, 6, 0, "Kradu Grimblade and Zula Slagfury"); + pPlayer->SEND_GOSSIP_MENU(10517, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Cooking + pPlayer->SEND_POI(-2067.4, 5316.5, 7, 6, 0, "Jack Trapper"); + pPlayer->SEND_GOSSIP_MENU(10518, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Enchanting + pPlayer->SEND_POI(-2263.5, 5563.5, 7, 6, 0, "High Enchanter Bardolan"); + pPlayer->SEND_GOSSIP_MENU(10519, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //First Aid + pPlayer->SEND_POI(-1591, 5265.5, 7, 6, 0, "Mildred Fletcher"); + pPlayer->SEND_GOSSIP_MENU(10520, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //Jewelcrafting + pPlayer->SEND_POI(-1654, 5667.5, 7, 6, 0, "Hamanar"); + pPlayer->SEND_GOSSIP_MENU(10521, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 7: //Leatherworking + pPlayer->SEND_POI(-2060.5, 5256.5, 7, 6, 0, "Darmari"); + pPlayer->SEND_GOSSIP_MENU(10523, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 8: //Skinning + pPlayer->SEND_POI(-2048, 5300, 7, 6, 0, "Seymour"); + pPlayer->SEND_GOSSIP_MENU(10523, pCreature->GetGUID()); + break; + } +} + +bool GossipSelect_guard_shattrath_scryer(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch (uiSender) + { + case GOSSIP_SENDER_MAIN: SendDefaultMenu_guard_shattrath_scryer(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_PROFTRAIN: SendProfTrainerMenu_guard_shattrath_scryer(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_BATTLEINFO: SendBattleMasterMenu_guard_shattrath(pPlayer, pCreature, uiAction); break; + } + return true; +} + +/******************************************************* + * guard_shattrath_scryer end + *******************************************************/ + +CreatureAI* GetAI_guard_shattrath_scryer(Creature* pCreature) +{ + return new guard_shattrath_scryerAI(pCreature); +} + +/******************************************************* + * guard_silvermoon start + *******************************************************/ + +bool GossipHello_guard_silvermoon(Player* pPlayer, Creature* pCreature) +{ + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_AUCTIONHOUSE , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BANK , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_GUILDMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INN , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAILBOX , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_STABLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WEAPONMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WINDRIDER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 8); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BATTLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 9); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_CLASSTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PROFTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11); + pPlayer->SEND_GOSSIP_MENU(9316, pCreature->GetGUID()); + return true; +} + +void SendDefaultMenu_guard_silvermoon(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Auction house + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_AH_SILVERMOON_1 , GOSSIP_SENDER_SEC_AUCTIONHOUSE, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_AH_SILVERMOON_2 , GOSSIP_SENDER_SEC_AUCTIONHOUSE, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->SEND_GOSSIP_MENU(9317, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Bank + pPlayer->SEND_POI(9808.4, -7488.16, 7, 6, 0, "Silvermoon Bank"); + pPlayer->SEND_GOSSIP_MENU(9322, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Guild master + pPlayer->SEND_POI(9474.97, -7345.21, 7, 6, 0, "Tandrine"); + pPlayer->SEND_GOSSIP_MENU(9324, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Inn + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INN_SILVERMOON_1 , GOSSIP_SENDER_SEC_INN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INN_SILVERMOON_2 , GOSSIP_SENDER_SEC_INN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->SEND_GOSSIP_MENU(9602, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //Mailbox + pPlayer->SEND_POI(9658.33, -7492.17, 7, 6, 0, "Silvermoon Mailbox"); + pPlayer->SEND_GOSSIP_MENU(9326, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //Stable master + pPlayer->SEND_POI(9904.95, -7404.31, 7, 6, 0, "Shalenn"); + pPlayer->SEND_GOSSIP_MENU(9327, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 7: //Weapon trainer + pPlayer->SEND_POI(9841.17, -7505.13, 7, 6, 0, "Ileda"); + pPlayer->SEND_GOSSIP_MENU(9328, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 8: //Wind master + pPlayer->SEND_POI(9378.45, -7163.94, 7, 6, 0, "Silvermoon Wind Master"); + pPlayer->SEND_GOSSIP_MENU(10181, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 9: //Battlemaster + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALTERACVALLEY , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ARATHIBASIN , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ARENA , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_EYEOFTHESTORM , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARSONGULCH , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->SEND_GOSSIP_MENU(9329, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 10: //Class trainer + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_DRUID , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HUNTER , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAGE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PALADIN , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PRIEST , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ROGUE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARLOCK , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->SEND_GOSSIP_MENU(9331, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 11: //Profession trainer + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALCHEMY , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BLACKSMITHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_COOKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENCHANTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENGINEERING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FIRSTAID , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FISHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_JEWELCRAFTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 8); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HERBALISM , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 9); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_LEATHERWORKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 10); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MINING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 11); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SKINNING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 12); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_TAILORING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 13); + pPlayer->SEND_GOSSIP_MENU(9338, pCreature->GetGUID()); + break; + } +} + +void SendAuctionhouseMenu_guard_silvermoon(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) + { + pPlayer->SEND_POI(9644.47, -7140.22, 7, 6, 0, "Western Auction House"); + pPlayer->SEND_GOSSIP_MENU(9318, pCreature->GetGUID()); + } + if (uiAction == GOSSIP_ACTION_INFO_DEF + 2) + { + pPlayer->SEND_POI(9683.27, -7521.22, 7, 6, 0, "Royal Exchange Auction House"); + pPlayer->SEND_GOSSIP_MENU(9319, pCreature->GetGUID()); + } +} + +void SendInnMenu_guard_silvermoon(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) + { + pPlayer->SEND_POI(9677.7, -7368, 7, 6, 0, "Silvermoon City Inn"); + pPlayer->SEND_GOSSIP_MENU(9325, pCreature->GetGUID()); + } + if (uiAction == GOSSIP_ACTION_INFO_DEF + 2) + { + pPlayer->SEND_POI(9561.1, -7517.5, 7, 6, 0, "Wayfarer's Rest tavern"); + pPlayer->SEND_GOSSIP_MENU(9603, pCreature->GetGUID()); + } +} + +void SendBattleMasterMenu_guard_silvermoon(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //AV + pPlayer->SEND_POI(9850.49, -7572.26, 7, 6, 0, "Gurak"); + pPlayer->SEND_GOSSIP_MENU(9329, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //AB + pPlayer->SEND_POI(9857.18, -7564.36, 7, 6, 0, "Karen Wentworth"); + pPlayer->SEND_GOSSIP_MENU(9329, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //A + pPlayer->SEND_POI(9850.6, -7559.25, 7, 6, 0, "Bipp Glizzitor"); + pPlayer->SEND_GOSSIP_MENU(9329, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //EOS + pPlayer->SEND_POI(9857.18, -7564.36, 7, 6, 0, "Karen Wentworth"); + pPlayer->SEND_GOSSIP_MENU(9329, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //WSG + pPlayer->SEND_POI(9845.45, -7562.58, 7, 6, 0, "Krukk"); + pPlayer->SEND_GOSSIP_MENU(9329, pCreature->GetGUID()); + break; + } +} + +void SendClassTrainerMenu_guard_silvermoon(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Druid + pPlayer->SEND_POI(9700.55, -7262.57, 7, 6, 0, "Harene Plainwalker"); + pPlayer->SEND_GOSSIP_MENU(9330, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Hunter + pPlayer->SEND_POI(9927.48, -7426.14, 7, 6, 0, "Zandine"); + pPlayer->SEND_GOSSIP_MENU(9332, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Mage + pPlayer->SEND_POI(9995.07, -7118.17, 7, 6, 0, "Quithas"); + pPlayer->SEND_GOSSIP_MENU(9333, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Paladin + pPlayer->SEND_POI(9850.22, -7516.93, 7, 6, 0, "Champion Bachi"); + pPlayer->SEND_GOSSIP_MENU(9334, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //Priest + pPlayer->SEND_POI(9926.79, -7066.66, 7, 6, 0, "Belestra"); + pPlayer->SEND_GOSSIP_MENU(9335, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //Rogue + pPlayer->SEND_POI(9739.88, -7374.33, 7, 6, 0, "Zelanis"); + pPlayer->SEND_GOSSIP_MENU(9336, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 7: //Warlock + pPlayer->SEND_POI(9787.57, -7284.63, 7, 6, 0, "Alamma"); + pPlayer->SEND_GOSSIP_MENU(9337, pCreature->GetGUID()); + break; + } +} + +void SendProfTrainerMenu_guard_silvermoon(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy + pPlayer->SEND_POI(9998.09, -7214.36, 7, 6, 0, "Silvermoon Alchemy Trainer"); + pPlayer->SEND_GOSSIP_MENU(9316, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing + pPlayer->SEND_POI(9841.43, -7361.53, 7, 6, 0, "Silvermoon Blacksmithing Trainer"); + pPlayer->SEND_GOSSIP_MENU(9340, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Cooking + pPlayer->SEND_POI(9577.26, -7243.6, 7, 6, 0, "Silvermoon Cooking Trainer"); + pPlayer->SEND_GOSSIP_MENU(9316, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Enchanting + pPlayer->SEND_POI(9962.57, -7246.18, 7, 6, 0, "Silvermoon Enchanting Trainer"); + pPlayer->SEND_GOSSIP_MENU(9341, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //Engineering + pPlayer->SEND_POI(9820.18, -7329.56, 7, 6, 0, "Silvermoon Engineering Trainer"); + pPlayer->SEND_GOSSIP_MENU(9316, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //First Aid + pPlayer->SEND_POI(9579.8, -7343.71, 7, 6, 0, "Silvermoon First Aid Trainer"); + pPlayer->SEND_GOSSIP_MENU(9316, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 7: //Fishing + pPlayer->SEND_POI(9602.73, -7328.3, 7, 6, 0, "Silvermoon Fishing Trainer"); + pPlayer->SEND_GOSSIP_MENU(9316, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 8: //Jewelcrafting + pPlayer->SEND_POI(9553.54, -7506.43, 7, 6, 0, "Silvermoon Jewelcrafting Trainer"); + pPlayer->SEND_GOSSIP_MENU(9346, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 9: //Herbalism + pPlayer->SEND_POI(10004.4, -7216.86, 7, 6, 0, "Silvermoon Herbalism Trainer"); + pPlayer->SEND_GOSSIP_MENU(9316, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 10: //Leatherworking + pPlayer->SEND_POI(9503.72, -7430.16, 7, 6, 0, "Silvermoon Leatherworking Trainer"); + pPlayer->SEND_GOSSIP_MENU(9347, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 11: //Mining + pPlayer->SEND_POI(9805.1, -7355.56, 7, 6, 0, "Silvermoon Mining Trainer"); + pPlayer->SEND_GOSSIP_MENU(9348, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 12: //Skinning + pPlayer->SEND_POI(9513.37, -7429.4, 7, 6, 0, "Silvermoon Skinning Trainer"); + pPlayer->SEND_GOSSIP_MENU(9316, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 13: //Tailoring + pPlayer->SEND_POI(9750.55, -7095.28, 7, 6, 0, "Silvermoon Tailor"); + pPlayer->SEND_GOSSIP_MENU(9350, pCreature->GetGUID()); + break; + } +} + +bool GossipSelect_guard_silvermoon(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch (uiSender) + { + case GOSSIP_SENDER_MAIN: SendDefaultMenu_guard_silvermoon(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_AUCTIONHOUSE: SendAuctionhouseMenu_guard_silvermoon(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_INN: SendInnMenu_guard_silvermoon(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_CLASSTRAIN: SendClassTrainerMenu_guard_silvermoon(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_PROFTRAIN: SendProfTrainerMenu_guard_silvermoon(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_BATTLEINFO: SendBattleMasterMenu_guard_silvermoon(pPlayer, pCreature, uiAction); break; + } + return true; +} + +/******************************************************* + * guard_silvermoon end + *******************************************************/ + +CreatureAI* GetAI_guard_silvermoon(Creature* pCreature) +{ + return new guardAI(pCreature); +} + +/******************************************************* + * guard_stormwind start + *******************************************************/ + +bool GossipHello_guard_stormwind(Player* pPlayer, Creature* pCreature) +{ + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_AUCTIONHOUSE , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_STORMWIND_BANK , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_DEEPRUNTRAM , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INN , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_GRYPHON , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_GUILDMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAILBOX , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_STABLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 8); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WEAPONMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 9); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_OFFICERS , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BATTLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_CLASSTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 12); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PROFTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 13); + pPlayer->SEND_GOSSIP_MENU(933, pCreature->GetGUID()); + return true; +} + +void SendDefaultMenu_guard_stormwind(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Auction House + pPlayer->SEND_POI(-8811.46, 667.46, 7, 6, 0, "Stormwind Auction House"); + pPlayer->SEND_GOSSIP_MENU(3834, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Bank + pPlayer->SEND_POI(-8916.87, 622.87, 7, 6, 0, "Stormwind Bank"); + pPlayer->SEND_GOSSIP_MENU(764, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Deeprun tram + pPlayer->SEND_POI(-8378.88, 554.23, 7, 6, 0, "The Deeprun Tram"); + pPlayer->SEND_GOSSIP_MENU(3813, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Inn + pPlayer->SEND_POI(-8869.0, 675.4, 7, 6, 0, "The Gilded Rose"); + pPlayer->SEND_GOSSIP_MENU(3860, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //Gryphon Master + pPlayer->SEND_POI(-8837.0, 493.5, 7, 6, 0, "Stormwind Gryphon Master"); + pPlayer->SEND_GOSSIP_MENU(879, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //Guild Master + pPlayer->SEND_POI(-8894.0, 611.2, 7, 6, 0, "Stormwind Vistor`s Center"); + pPlayer->SEND_GOSSIP_MENU(882, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 7: //Mailbox + pPlayer->SEND_POI(-8876.48, 649.18, 7, 6, 0, "Stormwind Mailbox"); + pPlayer->SEND_GOSSIP_MENU(3861, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 8: //Stable Master + pPlayer->SEND_POI(-8433.0, 554.7, 7, 6, 0, "Jenova Stoneshield"); + pPlayer->SEND_GOSSIP_MENU(5984, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 9: //Weapon Trainer + pPlayer->SEND_POI(-8797.0, 612.8, 7, 6, 0, "Woo Ping"); + pPlayer->SEND_GOSSIP_MENU(4516, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 10: //Officers Lounge + pPlayer->SEND_POI(-8759.92, 399.69, 7, 6, 0, "Champions` Hall"); + pPlayer->SEND_GOSSIP_MENU(7047, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 11: //Battlemasters + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALTERACVALLEY , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ARATHIBASIN , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARSONGULCH , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->SEND_GOSSIP_MENU(7499, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 12: //Class trainers + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAGE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ROGUE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARRIOR , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_DRUID , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PRIEST , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PALADIN , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HUNTER , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARLOCK , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 8); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SHAMAN , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 9); + pPlayer->SEND_GOSSIP_MENU(898, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 13: //Profession trainers + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALCHEMY , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BLACKSMITHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_COOKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENCHANTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENGINEERING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FIRSTAID , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FISHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HERBALISM , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 8); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_LEATHERWORKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 9); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MINING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 10); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SKINNING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 11); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_TAILORING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 12); + pPlayer->SEND_GOSSIP_MENU(918, pCreature->GetGUID()); + break; + } +} + +void SendBattleMasterMenu_guard_stormwind(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //AV + pPlayer->SEND_POI(-8443.88, 335.99, 7, 6, 0, "Thelman Slatefist"); + pPlayer->SEND_GOSSIP_MENU(7500, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //AB + pPlayer->SEND_POI(-8443.88, 335.99, 7, 6, 0, "Lady Hoteshem"); + pPlayer->SEND_GOSSIP_MENU(7650, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //WSG + pPlayer->SEND_POI(-8443.88, 335.99, 7, 6, 0, "Elfarran"); + pPlayer->SEND_GOSSIP_MENU(7501, pCreature->GetGUID()); + break; + } +} + +void SendClassTrainerMenu_guard_stormwind(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Mage + pPlayer->SEND_POI(-9012.0, 867.6, 7, 6, 0, "Wizard`s Sanctum"); + pPlayer->SEND_GOSSIP_MENU(899, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Rogue + pPlayer->SEND_POI(-8753.0, 367.8, 7, 6, 0, "Stormwind - Rogue House"); + pPlayer->SEND_GOSSIP_MENU(900, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Warrior + pPlayer->SEND_POI(-8624.54, 402.61, 7, 6, 0, "Pig and Whistle Tavern"); + pPlayer->SEND_GOSSIP_MENU(901, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Druid + pPlayer->SEND_POI(-8751.0, 1124.5, 7, 6, 0, "The Park"); + pPlayer->SEND_GOSSIP_MENU(902, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //Priest + pPlayer->SEND_POI(-8512.0, 862.4, 7, 6, 0, "Catedral Of Light"); + pPlayer->SEND_GOSSIP_MENU(903, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //Paladin + pPlayer->SEND_POI(-8577.0, 881.7, 7, 6, 0, "Catedral Of Light"); + pPlayer->SEND_GOSSIP_MENU(904, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 7: //Hunter + pPlayer->SEND_POI(-8413.0, 541.5, 7, 6, 0, "Hunter Lodge"); + pPlayer->SEND_GOSSIP_MENU(905, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 8: //Warlock + pPlayer->SEND_POI(-8948.91, 998.35, 7, 6, 0, "The Slaughtered Lamb"); + pPlayer->SEND_GOSSIP_MENU(906, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 9: //Shaman + pPlayer->SEND_POI(-9033, 550, 7, 6, 0, "Valley Of Heroes"); + //incorrect id + pPlayer->SEND_GOSSIP_MENU(2593, pCreature->GetGUID()); + break; + } +} + +void SendProfTrainerMenu_guard_stormwind(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy + pPlayer->SEND_POI(-8988.0, 759.60, 7, 6, 0, "Alchemy Needs"); + pPlayer->SEND_GOSSIP_MENU(919, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing + pPlayer->SEND_POI(-8424.0, 616.9, 7, 6, 0, "Therum Deepforge"); + pPlayer->SEND_GOSSIP_MENU(920, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Cooking + pPlayer->SEND_POI(-8611.0, 364.6, 7, 6, 0, "Pig and Whistle Tavern"); + pPlayer->SEND_GOSSIP_MENU(921, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Enchanting + pPlayer->SEND_POI(-8858.0, 803.7, 7, 6, 0, "Lucan Cordell"); + pPlayer->SEND_GOSSIP_MENU(941, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //Engineering + pPlayer->SEND_POI(-8347.0, 644.1, 7, 6, 0, "Lilliam Sparkspindle"); + pPlayer->SEND_GOSSIP_MENU(922, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //First Aid + pPlayer->SEND_POI(-8513.0, 801.8, 7, 6, 0, "Shaina Fuller"); + pPlayer->SEND_GOSSIP_MENU(923, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 7: //Fishing + pPlayer->SEND_POI(-8803.0, 767.5, 7, 6, 0, "Arnold Leland"); + pPlayer->SEND_GOSSIP_MENU(940, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 8: //Herbalism + pPlayer->SEND_POI(-8967.0, 779.5, 7, 6, 0, "Alchemy Needs"); + pPlayer->SEND_GOSSIP_MENU(924, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 9: //Leatherworking + pPlayer->SEND_POI(-8726.0, 477.4, 7, 6, 0, "The Protective Hide"); + pPlayer->SEND_GOSSIP_MENU(925, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 10: //Mining + pPlayer->SEND_POI(-8434.0, 692.8, 7, 6, 0, "Gelman Stonehand"); + pPlayer->SEND_GOSSIP_MENU(927, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 11: //Skinning + pPlayer->SEND_POI(-8716.0, 469.4, 7, 6, 0, "The Protective Hide"); + pPlayer->SEND_GOSSIP_MENU(928, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 12: //Tailoring + pPlayer->SEND_POI(-8938.0, 800.7, 7, 6, 0, "Duncan`s Textiles"); + pPlayer->SEND_GOSSIP_MENU(929, pCreature->GetGUID()); + break; + } +} + +bool GossipSelect_guard_stormwind(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch (uiSender) + { + case GOSSIP_SENDER_MAIN: SendDefaultMenu_guard_stormwind(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_CLASSTRAIN: SendClassTrainerMenu_guard_stormwind(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_PROFTRAIN: SendProfTrainerMenu_guard_stormwind(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_BATTLEINFO: SendBattleMasterMenu_guard_stormwind(pPlayer, pCreature, uiAction); break; + } + return true; +} + +/******************************************************* + * guard_stormwind end + *******************************************************/ + +CreatureAI* GetAI_guard_stormwind(Creature* pCreature) +{ + return new guardAI_stormwind (pCreature); +} + +/******************************************************* + * guard_teldrassil start + *******************************************************/ + +bool GossipHello_guard_teldrassil(Player* pPlayer, Creature* pCreature) +{ + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BANK , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FERRY , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_GUILDMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INN , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_STABLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_CLASSTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PROFTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->SEND_GOSSIP_MENU(4316, pCreature->GetGUID()); + return true; +} + +void SendDefaultMenu_guard_teldrassil(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Bank + pPlayer->SEND_GOSSIP_MENU(4317, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Rut`theran + pPlayer->SEND_GOSSIP_MENU(4318, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Guild master + pPlayer->SEND_GOSSIP_MENU(4319, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Inn + pPlayer->SEND_POI(9821.49, 960.13, 7, 6, 0, "Dolanaar Inn"); + pPlayer->SEND_GOSSIP_MENU(4320, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //stable master + pPlayer->SEND_POI(9808.37, 931.1, 7, 6, 0, "Seriadne"); + pPlayer->SEND_GOSSIP_MENU(5982, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //class trainer + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_DRUID , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HUNTER , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PRIEST , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ROGUE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARRIOR , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->SEND_GOSSIP_MENU(4264, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 7: //profession trainer + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALCHEMY , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_COOKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENCHANTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FIRSTAID , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FISHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HERBALISM , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_LEATHERWORKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SKINNING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 8); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_TAILORING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 9); + pPlayer->SEND_GOSSIP_MENU(4273, pCreature->GetGUID()); + break; + } +} + +void SendClassTrainerMenu_guard_teldrassil(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Druid + pPlayer->SEND_POI(9741.58, 963.7, 7, 6, 0, "Kal"); + pPlayer->SEND_GOSSIP_MENU(4323, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Hunter + pPlayer->SEND_POI(9815.12, 926.28, 7, 6, 0, "Dazalar"); + pPlayer->SEND_GOSSIP_MENU(4324, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Priest + pPlayer->SEND_POI(9906.16, 986.63, 7, 6, 0, "Laurna Morninglight"); + pPlayer->SEND_GOSSIP_MENU(4325, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Rogue + pPlayer->SEND_POI(9789, 942.86, 7, 6, 0, "Jannok Breezesong"); + pPlayer->SEND_GOSSIP_MENU(4326, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //Warrior + pPlayer->SEND_POI(9821.96, 950.61, 7, 6, 0, "Kyra Windblade"); + pPlayer->SEND_GOSSIP_MENU(4327, pCreature->GetGUID()); + break; + } +} + +void SendProfTrainerMenu_guard_teldrassil(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy + pPlayer->SEND_POI(9767.59, 878.81, 7, 6, 0, "Cyndra Kindwhisper"); + pPlayer->SEND_GOSSIP_MENU(4329, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Cooking + pPlayer->SEND_POI(9751.19, 906.13, 7, 6, 0, "Zarrin"); + pPlayer->SEND_GOSSIP_MENU(4330, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Enchanting + pPlayer->SEND_POI(10677.59, 1946.56, 7, 6, 0, "Alanna Raveneye"); + pPlayer->SEND_GOSSIP_MENU(4331, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //First Aid + pPlayer->SEND_POI(9903.12, 999, 7, 6, 0, "Byancie"); + pPlayer->SEND_GOSSIP_MENU(4332, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //Fishing + pPlayer->SEND_GOSSIP_MENU(4333, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //Herbalism + pPlayer->SEND_POI(9773.78, 875.88, 7, 6, 0, "Malorne Bladeleaf"); + pPlayer->SEND_GOSSIP_MENU(4334, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 7: //Leatherworking + pPlayer->SEND_POI(10152.59, 1681.46, 7, 6, 0, "Nadyia Maneweaver"); + pPlayer->SEND_GOSSIP_MENU(4335, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 8: //Skinning + pPlayer->SEND_POI(10135.59, 1673.18, 7, 6, 0, "Radnaal Maneweaver"); + pPlayer->SEND_GOSSIP_MENU(4336, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 9: //Tailoring + pPlayer->SEND_GOSSIP_MENU(4337, pCreature->GetGUID()); + break; + } +} + +bool GossipSelect_guard_teldrassil(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch (uiSender) + { + case GOSSIP_SENDER_MAIN: SendDefaultMenu_guard_teldrassil(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_CLASSTRAIN: SendClassTrainerMenu_guard_teldrassil(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_PROFTRAIN: SendProfTrainerMenu_guard_teldrassil(pPlayer, pCreature, uiAction); break; + } + return true; +} + +/******************************************************* + * guard_teldrassil end + *******************************************************/ + +CreatureAI* GetAI_guard_teldrassil(Creature* pCreature) +{ + return new guardAI(pCreature); +} + +/******************************************************* + * guard_tirisfal start + *******************************************************/ + +bool GossipHello_guard_tirisfal(Player* pPlayer, Creature* pCreature) +{ + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BANK , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BATHANDLER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INN , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_STABLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_CLASSTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PROFTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->SEND_GOSSIP_MENU(4097, pCreature->GetGUID()); + return true; +} + +void SendDefaultMenu_guard_tirisfal(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Bank + pPlayer->SEND_GOSSIP_MENU(4074, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //bat handler + pPlayer->SEND_GOSSIP_MENU(4075, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Inn + pPlayer->SEND_POI(2246.68, 241.89, 7, 6, 0, "Gallows` End Tavern"); + pPlayer->SEND_GOSSIP_MENU(4076, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Stable Master + pPlayer->SEND_POI(2267.66, 319.32, 7, 6, 0, "Morganus"); + pPlayer->SEND_GOSSIP_MENU(5978, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //Class trainer + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAGE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PRIEST , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ROGUE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARLOCK , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARRIOR , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->SEND_GOSSIP_MENU(4292, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //Profession trainer + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALCHEMY , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BLACKSMITHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_COOKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENCHANTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENGINEERING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FIRSTAID , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FISHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HERBALISM , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 8); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_LEATHERWORKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 9); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MINING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 10); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SKINNING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 11); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_TAILORING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 12); + pPlayer->SEND_GOSSIP_MENU(4096, pCreature->GetGUID()); + break; + } +} + +void SendClassTrainerMenu_guard_tirisfal(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Mage + pPlayer->SEND_POI(2259.18, 240.93, 7, 6, 0, "Cain Firesong"); + pPlayer->SEND_GOSSIP_MENU(4077, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Priest + pPlayer->SEND_POI(2259.18, 240.93, 7, 6, 0, "Dark Cleric Beryl"); + pPlayer->SEND_GOSSIP_MENU(4078, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Rogue + pPlayer->SEND_POI(2259.18, 240.93, 7, 6, 0, "Marion Call"); + pPlayer->SEND_GOSSIP_MENU(4079, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Warlock + pPlayer->SEND_POI(2259.18, 240.93, 7, 6, 0, "Rupert Boch"); + pPlayer->SEND_GOSSIP_MENU(4080, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //Warrior + pPlayer->SEND_POI(2256.48, 240.32, 7, 6, 0, "Austil de Mon"); + pPlayer->SEND_GOSSIP_MENU(4081, pCreature->GetGUID()); + break; + } +} + +void SendProfTrainerMenu_guard_tirisfal(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy + pPlayer->SEND_POI(2263.25, 344.23, 7, 6, 0, "Carolai Anise"); + pPlayer->SEND_GOSSIP_MENU(4082, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing + pPlayer->SEND_GOSSIP_MENU(4083, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Cooking + pPlayer->SEND_GOSSIP_MENU(4084, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Enchanting + pPlayer->SEND_POI(2250.35, 249.12, 7, 6, 0, "Vance Undergloom"); + pPlayer->SEND_GOSSIP_MENU(4085, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //Engineering + pPlayer->SEND_GOSSIP_MENU(4086, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //First Aid + pPlayer->SEND_POI(2246.68, 241.89, 7, 6, 0, "Nurse Neela"); + pPlayer->SEND_GOSSIP_MENU(4087, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 7: //Fishing + pPlayer->SEND_POI(2292.37, -10.72, 7, 6, 0, "Clyde Kellen"); + pPlayer->SEND_GOSSIP_MENU(4088, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 8: //Herbalism + pPlayer->SEND_POI(2268.21, 331.69, 7, 6, 0, "Faruza"); + pPlayer->SEND_GOSSIP_MENU(4089, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 9: //Leatherworking + pPlayer->SEND_POI(2027, 78.72, 7, 6, 0, "Shelene Rhobart"); + pPlayer->SEND_GOSSIP_MENU(4090, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 10: //Mining + pPlayer->SEND_GOSSIP_MENU(4091, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 11: //Skinning + pPlayer->SEND_POI(2027, 78.72, 7, 6, 0, "Rand Rhobart"); + pPlayer->SEND_GOSSIP_MENU(4092, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 12: //Tailoring + pPlayer->SEND_POI(2160.45, 659.93, 7, 6, 0, "Bowen Brisboise"); + pPlayer->SEND_GOSSIP_MENU(4093, pCreature->GetGUID()); + break; + } +} + +bool GossipSelect_guard_tirisfal(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch (uiSender) + { + case GOSSIP_SENDER_MAIN: SendDefaultMenu_guard_tirisfal(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_CLASSTRAIN: SendClassTrainerMenu_guard_tirisfal(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_PROFTRAIN: SendProfTrainerMenu_guard_tirisfal(pPlayer, pCreature, uiAction); break; + } + return true; +} + +/******************************************************* + * guard_tirisfal end + *******************************************************/ + +CreatureAI* GetAI_guard_tirisfal(Creature* pCreature) +{ + return new guardAI(pCreature); +} + +/******************************************************* + * guard_undercity start + *******************************************************/ + +bool GossipHello_guard_undercity(Player* pPlayer, Creature* pCreature) +{ + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BANK , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BATHANDLER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_GUILDMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_INN , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAILBOX , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_AUCTIONHOUSE , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ZEPPLINMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WEAPONMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 8); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_STABLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 9); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BATTLEMASTER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_CLASSTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PROFTRAINER , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 12); + pPlayer->SEND_GOSSIP_MENU(3543, pCreature->GetGUID()); + return true; +} + +void SendDefaultMenu_guard_undercity(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Bank + pPlayer->SEND_POI(1595.64, 232.45, 7, 6, 0, "Undercity Bank"); + pPlayer->SEND_GOSSIP_MENU(3514, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Bat handler + pPlayer->SEND_POI(1565.9, 271.43, 7, 6, 0, "Undercity Bat Handler"); + pPlayer->SEND_GOSSIP_MENU(3515, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Guild master + pPlayer->SEND_POI(1594.17, 205.57, 7, 6, 0, "Undercity Guild Master"); + pPlayer->SEND_GOSSIP_MENU(3516, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Inn + pPlayer->SEND_POI(1639.43, 220.99, 7, 6, 0, "Undercity Inn"); + pPlayer->SEND_GOSSIP_MENU(3517, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //Mailbox + pPlayer->SEND_POI(1632.68, 219.4, 7, 6, 0, "Undercity Mailbox"); + pPlayer->SEND_GOSSIP_MENU(3518, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //Auction House + pPlayer->SEND_POI(1647.9, 258.49, 7, 6, 0, "Undercity Auction House"); + pPlayer->SEND_GOSSIP_MENU(3519, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 7: //Zeppelin + pPlayer->SEND_POI(2059, 274.86, 7, 6, 0, "Undercity Zeppelin"); + pPlayer->SEND_GOSSIP_MENU(3520, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 8: //Weapon Master + pPlayer->SEND_POI(1670.31, 324.66, 7, 6, 0, "Archibald"); + pPlayer->SEND_GOSSIP_MENU(4521, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 9: //Stable master + pPlayer->SEND_POI(1634.18, 226.76, 7, 6, 0, "Anya Maulray"); + pPlayer->SEND_GOSSIP_MENU(5979, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 10: //Battlemaster + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALTERACVALLEY , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ARATHIBASIN , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARSONGULCH , GOSSIP_SENDER_SEC_BATTLEINFO, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->SEND_GOSSIP_MENU(7527, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 11: //Class trainer + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MAGE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_PRIEST , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ROGUE , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARLOCK , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_WARRIOR , GOSSIP_SENDER_SEC_CLASSTRAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->SEND_GOSSIP_MENU(3542, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 12: //Profession trainer + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ALCHEMY , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_BLACKSMITHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_COOKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENCHANTING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_ENGINEERING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 5); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FIRSTAID , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_FISHING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 7); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_HERBALISM , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 8); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_LEATHERWORKING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 9); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_MINING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 10); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_SKINNING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 11); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEXT_TAILORING , GOSSIP_SENDER_SEC_PROFTRAIN, GOSSIP_ACTION_INFO_DEF + 12); + pPlayer->SEND_GOSSIP_MENU(3541, pCreature->GetGUID()); + break; + } +} + +void SendBattleMasterMenu_guard_undercity(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //AV + pPlayer->SEND_POI(1329, 333.92, 7, 6, 0, "Grizzle Halfmane"); + pPlayer->SEND_GOSSIP_MENU(7525, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //AB + pPlayer->SEND_POI(1283.3, 287.16, 7, 6, 0, "Sir Malory Wheeler"); + pPlayer->SEND_GOSSIP_MENU(7646, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //WSG + pPlayer->SEND_POI(1265, 351.18, 7, 6, 0, "Kurden Bloodclaw"); + pPlayer->SEND_GOSSIP_MENU(7526, pCreature->GetGUID()); + break; + } +} + +void SendClassTrainerMenu_guard_undercity(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Mage + pPlayer->SEND_POI(1781, 53, 7, 6, 0, "Undercity Mage Trainers"); + pPlayer->SEND_GOSSIP_MENU(3513, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Priest + pPlayer->SEND_POI(1758.33, 401.5, 7, 6, 0, "Undercity Priest Trainers"); + pPlayer->SEND_GOSSIP_MENU(3521, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Rogue + pPlayer->SEND_POI(1418.56, 65, 7, 6, 0, "Undercity Rogue Trainers"); + pPlayer->SEND_GOSSIP_MENU(3524, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Warlock + pPlayer->SEND_POI(1780.92, 53.16, 7, 6, 0, "Undercity Warlock Trainers"); + pPlayer->SEND_GOSSIP_MENU(3526, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //Warrior + pPlayer->SEND_POI(1775.59, 418.19, 7, 6, 0, "Undercity Warrior Trainers"); + pPlayer->SEND_GOSSIP_MENU(3527, pCreature->GetGUID()); + break; + } +} + +void SendProfTrainerMenu_guard_undercity(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: //Alchemy + pPlayer->SEND_POI(1419.82, 417.19, 7, 6, 0, "The Apothecarium"); + pPlayer->SEND_GOSSIP_MENU(3528, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: //Blacksmithing + pPlayer->SEND_POI(1696, 285, 7, 6, 0, "Undercity Blacksmithing Trainer"); + pPlayer->SEND_GOSSIP_MENU(3529, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: //Cooking + pPlayer->SEND_POI(1596.34, 274.68, 7, 6, 0, "Undercity Cooking Trainer"); + pPlayer->SEND_GOSSIP_MENU(3530, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 4: //Enchanting + pPlayer->SEND_POI(1488.54, 280.19, 7, 6, 0, "Undercity Enchanting Trainer"); + pPlayer->SEND_GOSSIP_MENU(3531, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 5: //Engineering + pPlayer->SEND_POI(1408.58, 143.43, 7, 6, 0, "Undercity Engineering Trainer"); + pPlayer->SEND_GOSSIP_MENU(3532, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 6: //First Aid + pPlayer->SEND_POI(1519.65, 167.19, 7, 6, 0, "Undercity First Aid Trainer"); + pPlayer->SEND_GOSSIP_MENU(3533, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 7: //Fishing + pPlayer->SEND_POI(1679.9, 89, 7, 6, 0, "Undercity Fishing Trainer"); + pPlayer->SEND_GOSSIP_MENU(3534, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 8: //Herbalism + pPlayer->SEND_POI(1558, 349.36, 7, 6, 0, "Undercity Herbalism Trainer"); + pPlayer->SEND_GOSSIP_MENU(3535, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 9: //Leatherworking + pPlayer->SEND_POI(1498.76, 196.43, 7, 6, 0, "Undercity Leatherworking Trainer"); + pPlayer->SEND_GOSSIP_MENU(3536, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 10: //Mining + pPlayer->SEND_POI(1642.88, 335.58, 7, 6, 0, "Undercity Mining Trainer"); + pPlayer->SEND_GOSSIP_MENU(3537, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 11: //Skinning + pPlayer->SEND_POI(1498.6, 196.46, 7, 6, 0, "Undercity Skinning Trainer"); + pPlayer->SEND_GOSSIP_MENU(3538, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 12: //Tailoring + pPlayer->SEND_POI(1689.55, 193, 7, 6, 0, "Undercity Tailoring Trainer"); + pPlayer->SEND_GOSSIP_MENU(3539, pCreature->GetGUID()); + break; + } +} + +bool GossipSelect_guard_undercity(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch (uiSender) + { + case GOSSIP_SENDER_MAIN: SendDefaultMenu_guard_undercity(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_CLASSTRAIN: SendClassTrainerMenu_guard_undercity(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_PROFTRAIN: SendProfTrainerMenu_guard_undercity(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_SEC_BATTLEINFO: SendBattleMasterMenu_guard_undercity(pPlayer, pCreature, uiAction); break; + } + return true; +} + +/******************************************************* + * guard_undercity end + *******************************************************/ + +CreatureAI* GetAI_guard_undercity(Creature* pCreature) +{ + return new guardAI(pCreature); +} + +/******************************************************* + * AddSC + *******************************************************/ + +void AddSC_guards() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "guard_azuremyst"; + newscript->pGossipHello = &GossipHello_guard_azuremyst; + newscript->pGossipSelect = &GossipSelect_guard_azuremyst; + newscript->GetAI = &GetAI_guard_azuremyst; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "guard_bluffwatcher"; + newscript->pGossipHello = &GossipHello_guard_bluffwatcher; + newscript->pGossipSelect = &GossipSelect_guard_bluffwatcher; + newscript->GetAI = &GetAI_guard_bluffwatcher; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "guard_contested"; + newscript->GetAI = &GetAI_guard_contested; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "guard_darnassus"; + newscript->pGossipHello = &GossipHello_guard_darnassus; + newscript->pGossipSelect = &GossipSelect_guard_darnassus; + newscript->GetAI = &GetAI_guard_darnassus; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "guard_dunmorogh"; + newscript->pGossipHello = &GossipHello_guard_dunmorogh; + newscript->pGossipSelect = &GossipSelect_guard_dunmorogh; + newscript->GetAI = &GetAI_guard_dunmorogh; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "guard_durotar"; + newscript->pGossipHello = &GossipHello_guard_durotar; + newscript->pGossipSelect = &GossipSelect_guard_durotar; + newscript->GetAI = &GetAI_guard_durotar; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "guard_elwynnforest"; + newscript->pGossipHello = &GossipHello_guard_elwynnforest; + newscript->pGossipSelect = &GossipSelect_guard_elwynnforest; + newscript->GetAI = &GetAI_guard_elwynnforest; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "guard_eversong"; + newscript->pGossipHello = &GossipHello_guard_eversong; + newscript->pGossipSelect = &GossipSelect_guard_eversong; + newscript->GetAI = &GetAI_guard_eversong; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "guard_exodar"; + newscript->pGossipHello = &GossipHello_guard_exodar; + newscript->pGossipSelect = &GossipSelect_guard_exodar; + newscript->GetAI = &GetAI_guard_exodar; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "guard_ironforge"; + newscript->pGossipHello = &GossipHello_guard_ironforge; + newscript->pGossipSelect = &GossipSelect_guard_ironforge; + newscript->GetAI = &GetAI_guard_ironforge; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "guard_mulgore"; + newscript->pGossipHello = &GossipHello_guard_mulgore; + newscript->pGossipSelect = &GossipSelect_guard_mulgore; + newscript->GetAI = &GetAI_guard_mulgore; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "guard_orgrimmar"; + newscript->pGossipHello = &GossipHello_guard_orgrimmar; + newscript->pGossipSelect = &GossipSelect_guard_orgrimmar; + newscript->GetAI = &GetAI_guard_orgrimmar; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "guard_shattrath"; + newscript->pGossipHello = &GossipHello_guard_shattrath; + newscript->pGossipSelect = &GossipSelect_guard_shattrath; + newscript->GetAI = &GetAI_guard_shattrath; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "guard_shattrath_aldor"; + newscript->GetAI = &GetAI_guard_shattrath_aldor; + newscript->pGossipHello = &GossipHello_guard_shattrath_aldor; + newscript->pGossipSelect = &GossipSelect_guard_shattrath_aldor; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "guard_shattrath_scryer"; + newscript->GetAI = &GetAI_guard_shattrath_scryer; + newscript->pGossipHello = &GossipHello_guard_shattrath_scryer; + newscript->pGossipSelect = &GossipSelect_guard_shattrath_scryer; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "guard_silvermoon"; + newscript->pGossipHello = &GossipHello_guard_silvermoon; + newscript->pGossipSelect = &GossipSelect_guard_silvermoon; + newscript->GetAI = &GetAI_guard_silvermoon; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "guard_stormwind"; + newscript->pGossipHello = &GossipHello_guard_stormwind; + newscript->pGossipSelect = &GossipSelect_guard_stormwind; + newscript->GetAI = &GetAI_guard_stormwind; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "guard_teldrassil"; + newscript->pGossipHello = &GossipHello_guard_teldrassil; + newscript->pGossipSelect = &GossipSelect_guard_teldrassil; + newscript->GetAI = &GetAI_guard_teldrassil; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "guard_tirisfal"; + newscript->pGossipHello = &GossipHello_guard_tirisfal; + newscript->pGossipSelect = &GossipSelect_guard_tirisfal; + newscript->GetAI = &GetAI_guard_tirisfal; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "guard_undercity"; + newscript->pGossipHello = &GossipHello_guard_undercity; + newscript->pGossipSelect = &GossipSelect_guard_undercity; + newscript->GetAI = &GetAI_guard_undercity; + newscript->RegisterSelf(); +} diff --git a/scripts/world/item_scripts.cpp b/scripts/world/item_scripts.cpp new file mode 100644 index 000000000..33350ce00 --- /dev/null +++ b/scripts/world/item_scripts.cpp @@ -0,0 +1,181 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Item_Scripts +SD%Complete: 100 +SDComment: Items for a range of different items. See content below (in script) +SDCategory: Items +EndScriptData */ + +/* ContentData +item_arcane_charges Prevent use if player is not flying (cannot cast while on ground) +item_draenei_fishing_net(i23654) Hacklike implements chance to spawn item or creature +item_nether_wraith_beacon(i31742) Summons creatures for quest Becoming a Spellfire Tailor (q10832) +item_flying_machine(i34060,i34061) Engineering crafted flying machines +item_gor_dreks_ointment(i30175) Protecting Our Own(q10488) +EndContentData */ + +#include "precompiled.h" +#include "Spell.h" + +/*##### +# item_arcane_charges +#####*/ + +enum +{ + SPELL_ARCANE_CHARGES = 45072 +}; + +bool ItemUse_item_arcane_charges(Player* pPlayer, Item* pItem, const SpellCastTargets &pTargets) +{ + if (pPlayer->isInFlight()) + return false; + + pPlayer->SendEquipError(EQUIP_ERR_NONE, pItem, NULL); + + if (const SpellEntry* pSpellInfo = GetSpellStore()->LookupEntry(SPELL_ARCANE_CHARGES)) + Spell::SendCastResult(pPlayer, pSpellInfo, 1, SPELL_FAILED_NOT_ON_GROUND); + + return true; +} + +/*##### +# item_draenei_fishing_net +#####*/ + +//This is just a hack and should be removed from here. +//Creature/Item are in fact created before spell are sucessfully casted, without any checks at all to ensure proper/expected behavior. +bool ItemUse_item_draenei_fishing_net(Player* pPlayer, Item* pItem, const SpellCastTargets &pTargets) +{ + //if (targets.getGOTarget() && targets.getGOTarget()->GetTypeId() == TYPEID_GAMEOBJECT && + //targets.getGOTarget()->GetGOInfo()->type == GAMEOBJECT_TYPE_SPELL_FOCUS && targets.getGOTarget()->GetEntry() == 181616) + //{ + if (pPlayer->GetQuestStatus(9452) == QUEST_STATUS_INCOMPLETE) + { + if (!urand(0, 2)) + { + Creature *Murloc = pPlayer->SummonCreature(17102,pPlayer->GetPositionX() ,pPlayer->GetPositionY()+20, pPlayer->GetPositionZ(), 0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); + if (Murloc) + Murloc->AI()->AttackStart(pPlayer); + } + else + { + ItemPosCountVec dest; + uint8 msg = pPlayer->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, 23614, 1); + if (msg == EQUIP_ERR_OK) + { + Item* item = pPlayer->StoreNewItem(dest,23614,true); + if (item) + pPlayer->SendNewItem(item,1,false,true); + }else + pPlayer->SendEquipError(msg,NULL,NULL); + } + } + //} + return false; +} + +/*##### +# item_nether_wraith_beacon +#####*/ + +bool ItemUse_item_nether_wraith_beacon(Player* pPlayer, Item* pItem, const SpellCastTargets &pTargets) +{ + if (pPlayer->GetQuestStatus(10832) == QUEST_STATUS_INCOMPLETE) + { + pPlayer->SummonCreature(22408,pPlayer->GetPositionX() ,pPlayer->GetPositionY()+20, pPlayer->GetPositionZ(), 0,TEMPSUMMON_TIMED_DESPAWN,180000); + pPlayer->SummonCreature(22408,pPlayer->GetPositionX() ,pPlayer->GetPositionY()-20, pPlayer->GetPositionZ(), 0,TEMPSUMMON_TIMED_DESPAWN,180000); + } + return false; +} + +/*##### +# item_flying_machine +#####*/ + +bool ItemUse_item_flying_machine(Player* pPlayer, Item* pItem, const SpellCastTargets &pTargets) +{ + uint32 itemId = pItem->GetEntry(); + + if (itemId == 34060) + if (pPlayer->GetBaseSkillValue(SKILL_RIDING) >= 225) + return false; + + if (itemId == 34061) + if (pPlayer->GetBaseSkillValue(SKILL_RIDING) == 300) + return false; + + debug_log("SD2: Player attempt to use item %u, but did not meet riding requirement",itemId); + pPlayer->SendEquipError(EQUIP_ERR_ERR_CANT_EQUIP_SKILL, pItem, NULL); + return true; +} + +/*##### +# item_gor_dreks_ointment +#####*/ + +enum +{ + NPC_TH_DIRE_WOLF = 20748, + SPELL_GORDREKS_OINTMENT = 32578 +}; + +bool ItemUse_item_gor_dreks_ointment(Player* pPlayer, Item* pItem, const SpellCastTargets &pTargets) +{ + if (pTargets.getUnitTarget() && pTargets.getUnitTarget()->GetTypeId() == TYPEID_UNIT && pTargets.getUnitTarget()->HasAura(SPELL_GORDREKS_OINTMENT)) + { + pPlayer->SendEquipError(EQUIP_ERR_NONE, pItem, NULL); + + if (const SpellEntry* pSpellInfo = GetSpellStore()->LookupEntry(SPELL_GORDREKS_OINTMENT)) + Spell::SendCastResult(pPlayer, pSpellInfo, 1, SPELL_FAILED_TARGET_AURASTATE); + + return true; + } + + return false; +} + +void AddSC_item_scripts() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "item_arcane_charges"; + newscript->pItemUse = &ItemUse_item_arcane_charges; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "item_draenei_fishing_net"; + newscript->pItemUse = &ItemUse_item_draenei_fishing_net; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "item_nether_wraith_beacon"; + newscript->pItemUse = &ItemUse_item_nether_wraith_beacon; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "item_flying_machine"; + newscript->pItemUse = &ItemUse_item_flying_machine; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "item_gor_dreks_ointment"; + newscript->pItemUse = &ItemUse_item_gor_dreks_ointment; + newscript->RegisterSelf(); +} diff --git a/scripts/world/mob_generic_creature.cpp b/scripts/world/mob_generic_creature.cpp new file mode 100644 index 000000000..df11b2f24 --- /dev/null +++ b/scripts/world/mob_generic_creature.cpp @@ -0,0 +1,172 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Generic_Creature +SD%Complete: 80 +SDComment: Should be replaced with core based AI +SDCategory: Creatures +EndScriptData */ + +#include "precompiled.h" + +#define GENERIC_CREATURE_COOLDOWN 5000 + +struct MANGOS_DLL_DECL generic_creatureAI : public ScriptedAI +{ + generic_creatureAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 GlobalCooldown; //This variable acts like the global cooldown that players have (1.5 seconds) + uint32 BuffTimer; //This variable keeps track of buffs + bool IsSelfRooted; + + void Reset() + { + GlobalCooldown = 0; + BuffTimer = 0; //Rebuff as soon as we can + IsSelfRooted = false; + } + + void Aggro(Unit *who) + { + if (!m_creature->IsWithinDistInMap(who, ATTACK_DISTANCE)) + { + IsSelfRooted = true; + } + } + + void UpdateAI(const uint32 diff) + { + //Always decrease our global cooldown first + if (GlobalCooldown > diff) + GlobalCooldown -= diff; + else GlobalCooldown = 0; + + //Buff timer (only buff when we are alive and not in combat + if (!m_creature->isInCombat() && m_creature->isAlive()) + if (BuffTimer < diff) + { + //Find a spell that targets friendly and applies an aura (these are generally buffs) + SpellEntry const *info = SelectSpell(m_creature, -1, -1, SELECT_TARGET_ANY_FRIEND, 0, 0, 0, 0, SELECT_EFFECT_AURA); + + if (info && !GlobalCooldown) + { + //Cast the buff spell + DoCastSpell(m_creature, info); + + //Set our global cooldown + GlobalCooldown = GENERIC_CREATURE_COOLDOWN; + + //Set our timer to 10 minutes before rebuff + BuffTimer = 600000; + }//Try agian in 30 seconds + else BuffTimer = 30000; + }else BuffTimer -= diff; + + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //If we are within range melee the target + if (m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE)) + { + //Make sure our attack is ready and we arn't currently casting + if (m_creature->isAttackReady() && !m_creature->IsNonMeleeSpellCasted(false)) + { + bool Healing = false; + SpellEntry const *info = NULL; + + //Select a healing spell if less than 30% hp + if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 30) + info = SelectSpell(m_creature, -1, -1, SELECT_TARGET_ANY_FRIEND, 0, 0, 0, 0, SELECT_EFFECT_HEALING); + + //No healing spell available, select a hostile spell + if (info) Healing = true; + else info = SelectSpell(m_creature->getVictim(), -1, -1, SELECT_TARGET_ANY_ENEMY, 0, 0, 0, 0, SELECT_EFFECT_DONTCARE); + + //50% chance if elite or higher, 20% chance if not, to replace our white hit with a spell + if (info && (rand() % (m_creature->GetCreatureInfo()->rank > 1 ? 2 : 5) == 0) && !GlobalCooldown) + { + //Cast the spell + if (Healing)DoCastSpell(m_creature, info); + else DoCastSpell(m_creature->getVictim(), info); + + //Set our global cooldown + GlobalCooldown = GENERIC_CREATURE_COOLDOWN; + } + else m_creature->AttackerStateUpdate(m_creature->getVictim()); + + m_creature->resetAttackTimer(); + } + } + else + { + //Only run this code if we arn't already casting + if (!m_creature->IsNonMeleeSpellCasted(false)) + { + bool Healing = false; + SpellEntry const *info = NULL; + + //Select a healing spell if less than 30% hp ONLY 33% of the time + if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 30 && !urand(0, 2)) + info = SelectSpell(m_creature, -1, -1, SELECT_TARGET_ANY_FRIEND, 0, 0, 0, 0, SELECT_EFFECT_HEALING); + + //No healing spell available, See if we can cast a ranged spell (Range must be greater than ATTACK_DISTANCE) + if (info) Healing = true; + else info = SelectSpell(m_creature->getVictim(), -1, -1, SELECT_TARGET_ANY_ENEMY, 0, 0, ATTACK_DISTANCE, 0, SELECT_EFFECT_DONTCARE); + + //Found a spell, check if we arn't on cooldown + if (info && !GlobalCooldown) + { + //If we are currently moving stop us and set the movement generator + if (!IsSelfRooted) + { + IsSelfRooted = true; + } + + //Cast spell + if (Healing) DoCastSpell(m_creature,info); + else DoCastSpell(m_creature->getVictim(),info); + + //Set our global cooldown + GlobalCooldown = GENERIC_CREATURE_COOLDOWN; + + + }//If no spells available and we arn't moving run to target + else if (IsSelfRooted) + { + //Cancel our current spell and then allow movement agian + m_creature->InterruptNonMeleeSpells(false); + IsSelfRooted = false; + } + } + } + } +}; +CreatureAI* GetAI_generic_creature(Creature* pCreature) +{ + return new generic_creatureAI(pCreature); +} + + +void AddSC_generic_creature() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "generic_creature"; + newscript->GetAI = &GetAI_generic_creature; + newscript->RegisterSelf(); +} diff --git a/scripts/world/npc_innkeeper.cpp b/scripts/world/npc_innkeeper.cpp new file mode 100644 index 000000000..2ff31c2e6 --- /dev/null +++ b/scripts/world/npc_innkeeper.cpp @@ -0,0 +1,144 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Npc_Innkeeper +SD%Complete: 50 +SDComment: This script are currently not in use. EventSystem cannot be used on Windows build of SD2 +SDCategory: NPCs +EndScriptData */ + +#include "precompiled.h" + +#define HALLOWEEN_EVENTID 12 +#define SPELL_TRICK_OR_TREATED 24755 +#define SPELL_TREAT 24715 + +#define LOCALE_TRICK_OR_TREAT_0 "Trick or Treat!" +#define LOCALE_TRICK_OR_TREAT_2 "Des bonbons ou des blagues!" +#define LOCALE_TRICK_OR_TREAT_3 "Ses oder Saures!" +#define LOCALE_TRICK_OR_TREAT_6 "Truco o trato!" + +bool isEventActive() +{ + /* + const GameEvent::ActiveEvents *ActiveEventsList = gameeventmgr.GetActiveEventList(); + GameEvent::ActiveEvents::const_iterator itr; + for (itr = ActiveEventsList->begin(); itr != ActiveEventsList->end(); ++itr) + { + if (*itr==HALLOWEEN_EVENTID) + { + return true; + } + }*/ + return false; +} + +bool GossipHello_npc_innkeeper(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (isEventActive()&& !pPlayer->GetAura(SPELL_TRICK_OR_TREATED,0)) + { + char* localizedEntry; + switch (pPlayer->GetSession()->GetSessionDbLocaleIndex()) + { + case 0: + localizedEntry=LOCALE_TRICK_OR_TREAT_0; + break; + case 2: + localizedEntry=LOCALE_TRICK_OR_TREAT_2; + break; + case 3: + localizedEntry=LOCALE_TRICK_OR_TREAT_3; + break; + case 6: + localizedEntry=LOCALE_TRICK_OR_TREAT_6; + break; + default: + localizedEntry=LOCALE_TRICK_OR_TREAT_0; + } + + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, localizedEntry, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+HALLOWEEN_EVENTID); + } + + pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_innkeeper(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+HALLOWEEN_EVENTID && isEventActive() && !pPlayer->GetAura(SPELL_TRICK_OR_TREATED,0)) + { + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->CastSpell(pPlayer, SPELL_TRICK_OR_TREATED, true); + + // either trick or treat, 50% chance + if (urand(0, 1)) + { + pPlayer->CastSpell(pPlayer, SPELL_TREAT, true); + } + else + { + int32 trickspell=0; + switch(urand(0, 8)) // note that female characters can get male costumes and vice versa + { + case 0: + trickspell=24753; // cannot cast, random 30sec + break; + case 1: + trickspell=24713; // lepper gnome costume + break; + case 2: + trickspell=24735; // male ghost costume + break; + case 3: + trickspell=24736; // female ghostcostume + break; + case 4: + trickspell=24710; // male ninja costume + break; + case 5: + trickspell=24711; // female ninja costume + break; + case 6: + trickspell=24708; // male pirate costume + break; + case 7: + trickspell=24709; // female pirate costume + break; + case 8: + trickspell=24723; // skeleton costume + break; + } + pPlayer->CastSpell(pPlayer, trickspell, true); + } + return true; // prevent mangos core handling + } + return false; // the player didn't select "trick or treat" or cheated, normal core handling +} + +void AddSC_npc_innkeeper() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "npc_innkeeper"; + newscript->pGossipHello = &GossipHello_npc_innkeeper; + newscript->pGossipSelect = &GossipSelect_npc_innkeeper; + newscript->RegisterSelf(); +} diff --git a/scripts/world/npc_professions.cpp b/scripts/world/npc_professions.cpp new file mode 100644 index 000000000..daa32768a --- /dev/null +++ b/scripts/world/npc_professions.cpp @@ -0,0 +1,1341 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Npc_Professions +SD%Complete: 80 +SDComment: Provides learn/unlearn/relearn-options for professions. Not supported: Unlearn engineering, re-learn engineering, re-learn leatherworking. +SDCategory: NPCs +EndScriptData */ + +#include "precompiled.h" + +/* +A few notes for future developement: +- A full implementation of gossip for GO's is required. They must have the same scripting capabilities as creatures. Basically, +there is no difference here (except that default text is chosen with `gameobject_template`.`data3` (for GO type2, different dataN for a few others) +- It's possible blacksmithing still require some tweaks and adjustments due to the way we _have_ to use reputation. +*/ + +/* +-- UPDATE `gameobject_template` SET `ScriptName` = 'go_soothsaying_for_dummies' WHERE `entry` = 177226; +*/ + +/*### +# to be removed from here (->ncp_text). This is data for database projects. +###*/ +#define TALK_MUST_UNLEARN_WEAPON "You must forget your weapon type specialty before I can help you. Go to Everlook in Winterspring and seek help there." + +#define TALK_HAMMER_LEARN "Ah, a seasoned veteran you once were. I know you are capable, you merely need to ask and I shall teach you the way of the hammersmith." +#define TALK_AXE_LEARN "Ah, a seasoned veteran you once were. I know you are capable, you merely need to ask and I shall teach you the way of the axesmith." +#define TALK_SWORD_LEARN "Ah, a seasoned veteran you once were. I know you are capable, you merely need to ask and I shall teach you the way of the swordsmith." + +#define TALK_HAMMER_UNLEARN "Forgetting your Hammersmithing skill is not something to do lightly. If you choose to abandon it you will forget all recipes that require Hammersmithing to create!" +#define TALK_AXE_UNLEARN "Forgetting your Axesmithing skill is not something to do lightly. If you choose to abandon it you will forget all recipes that require Axesmithing to create!" +#define TALK_SWORD_UNLEARN "Forgetting your Swordsmithing skill is not something to do lightly. If you choose to abandon it you will forget all recipes that require Swordsmithing to create!" + +/*### +# generic defines +###*/ + +#define GOSSIP_SENDER_LEARN 50 +#define GOSSIP_SENDER_UNLEARN 51 +#define GOSSIP_SENDER_CHECK 52 + +/*### +# gossip item and box texts +###*/ + +#define GOSSIP_LEARN_POTION "Please teach me how to become a Master of Potions, Lauranna" +#define GOSSIP_UNLEARN_POTION "I wish to unlearn Potion Mastery" +#define GOSSIP_LEARN_TRANSMUTE "Please teach me how to become a Master of Transmutations, Zarevhi" +#define GOSSIP_UNLEARN_TRANSMUTE "I wish to unlearn Transmutation Mastery" +#define GOSSIP_LEARN_ELIXIR "Please teach me how to become a Master of Elixirs, Lorokeem" +#define GOSSIP_UNLEARN_ELIXIR "I wish to unlearn Elixir Mastery" + +#define BOX_UNLEARN_ALCHEMY_SPEC "Do you really want to unlearn your alchemy specialty and lose all associated recipes? \n Cost: " + +#define GOSSIP_WEAPON_LEARN "Please teach me how to become a Weaponsmith" +#define GOSSIP_WEAPON_UNLEARN "I wish to unlearn the art of Weaponsmithing" +#define GOSSIP_ARMOR_LEARN "Please teach me how to become a Armorsmith" +#define GOSSIP_ARMOR_UNLEARN "I wish to unlearn the art of Armorsmithing" + +#define GOSSIP_UNLEARN_SMITH_SPEC "I wish to unlearn my blacksmith specialty" +#define BOX_UNLEARN_ARMORORWEAPON "Do you really want to unlearn your blacksmith specialty and lose all associated recipes? \n Cost: " + +#define GOSSIP_LEARN_HAMMER "Please teach me how to become a Hammersmith, Lilith" +#define GOSSIP_UNLEARN_HAMMER "I wish to unlearn Hammersmithing" +#define GOSSIP_LEARN_AXE "Please teach me how to become a Axesmith, Kilram" +#define GOSSIP_UNLEARN_AXE "I wish to unlearn Axesmithing" +#define GOSSIP_LEARN_SWORD "Please teach me how to become a Swordsmith, Seril" +#define GOSSIP_UNLEARN_SWORD "I wish to unlearn Swordsmithing" + +#define BOX_UNLEARN_WEAPON_SPEC "Do you really want to unlearn your weaponsmith specialty and lose all associated recipes? \n Cost: " + +#define GOSSIP_LEARN_DRAGON "I am absolutely certain that i want to learn dragonscale leatherworking" +#define GOSSIP_UNLEARN_DRAGON "I wish to unlearn Dragonscale Leatherworking" +#define GOSSIP_LEARN_ELEMENTAL "I am absolutely certain that i want to learn elemental leatherworking" +#define GOSSIP_UNLEARN_ELEMENTAL "I wish to unlearn Elemental Leatherworking" +#define GOSSIP_LEARN_TRIBAL "I am absolutely certain that i want to learn tribal leatherworking" +#define GOSSIP_UNLEARN_TRIBAL "I wish to unlearn Tribal Leatherworking" + +#define BOX_UNLEARN_LEATHER_SPEC "Do you really want to unlearn your leatherworking specialty and lose all associated recipes? \n Cost: " + +#define GOSSIP_LEARN_SPELLFIRE "Please teach me how to become a Spellcloth tailor" +#define GOSSIP_UNLEARN_SPELLFIRE "I wish to unlearn Spellfire Tailoring" +#define GOSSIP_LEARN_MOONCLOTH "Please teach me how to become a Mooncloth tailor" +#define GOSSIP_UNLEARN_MOONCLOTH "I wish to unlearn Mooncloth Tailoring" +#define GOSSIP_LEARN_SHADOWEAVE "Please teach me how to become a Shadoweave tailor" +#define GOSSIP_UNLEARN_SHADOWEAVE "I wish to unlearn Shadoweave Tailoring" + +#define BOX_UNLEARN_TAILOR_SPEC "Do you really want to unlearn your tailoring specialty and lose all associated recipes? \n Cost: " + +#define GOSSIP_LEARN_GOBLIN "I am absolutely certain that i want to learn Goblin engineering" +#define GOSSIP_LEARN_GNOMISH "I am absolutely certain that i want to learn Gnomish engineering" + +/*### +# spells defines +###*/ + +#define S_WEAPON 9787 +#define S_ARMOR 9788 +#define S_HAMMER 17040 +#define S_AXE 17041 +#define S_SWORD 17039 + +#define S_LEARN_WEAPON 9789 +#define S_LEARN_ARMOR 9790 +#define S_LEARN_HAMMER 39099 +#define S_LEARN_AXE 39098 +#define S_LEARN_SWORD 39097 + +#define S_UNLEARN_WEAPON 36436 +#define S_UNLEARN_ARMOR 36435 +#define S_UNLEARN_HAMMER 36441 +#define S_UNLEARN_AXE 36439 +#define S_UNLEARN_SWORD 36438 + +#define S_REP_ARMOR 17451 +#define S_REP_WEAPON 17452 + +#define REP_ARMOR 46 +#define REP_WEAPON 289 +#define REP_HAMMER 569 +#define REP_AXE 570 +#define REP_SWORD 571 + +#define S_DRAGON 10656 +#define S_ELEMENTAL 10658 +#define S_TRIBAL 10660 + +#define S_LEARN_DRAGON 10657 +#define S_LEARN_ELEMENTAL 10659 +#define S_LEARN_TRIBAL 10661 + +#define S_UNLEARN_DRAGON 36434 +#define S_UNLEARN_ELEMENTAL 36328 +#define S_UNLEARN_TRIBAL 36433 + +#define S_GOBLIN 20222 +#define S_GNOMISH 20219 + +#define S_LEARN_GOBLIN 20221 +#define S_LEARN_GNOMISH 20220 + +#define S_SPELLFIRE 26797 +#define S_MOONCLOTH 26798 +#define S_SHADOWEAVE 26801 + +#define S_LEARN_SPELLFIRE 26796 +#define S_LEARN_MOONCLOTH 26799 +#define S_LEARN_SHADOWEAVE 26800 + +#define S_UNLEARN_SPELLFIRE 41299 +#define S_UNLEARN_MOONCLOTH 41558 +#define S_UNLEARN_SHADOWEAVE 41559 + +#define S_TRANSMUTE 28672 +#define S_ELIXIR 28677 +#define S_POTION 28675 + +#define S_LEARN_TRANSMUTE 28674 +#define S_LEARN_ELIXIR 28678 +#define S_LEARN_POTION 28676 + +#define S_UNLEARN_TRANSMUTE 41565 +#define S_UNLEARN_ELIXIR 41564 +#define S_UNLEARN_POTION 41563 + +/*### +# formulas to calculate unlearning cost +###*/ + +int32 DoLearnCost(Player* pPlayer) //tailor, alchemy +{ + return 200000; +} + +int32 DoHighUnlearnCost(Player* pPlayer) //tailor, alchemy +{ + return 1500000; +} + +int32 DoMedUnlearnCost(Player* pPlayer) //blacksmith, leatherwork +{ + uint32 level = pPlayer->getLevel(); + if (level < 51) + return 250000; + else if (level < 66) + return 500000; + else + return 1000000; +} + +int32 DoLowUnlearnCost(Player* pPlayer) //blacksmith +{ + uint32 level = pPlayer->getLevel(); + if (level < 66) + return 50000; + else + return 100000; +} + +/*### +# unlearning related profession spells +###*/ + +bool EquippedOk(Player* pPlayer, uint32 spellId) +{ + SpellEntry const* spell = GetSpellStore()->LookupEntry(spellId); + + if (!spell) + return false; + + for(int i=0; i<3; ++i) + { + uint32 reqSpell = spell->EffectTriggerSpell[i]; + if (!reqSpell) + continue; + + Item* pItem; + for(int j = EQUIPMENT_SLOT_START; j < EQUIPMENT_SLOT_END; ++j) + { + pItem = pPlayer->GetItemByPos(INVENTORY_SLOT_BAG_0, j); + if (pItem) + if (pItem->GetProto()->RequiredSpell == reqSpell) + { + //pPlayer has item equipped that require specialty. Not allow to unlearn, player has to unequip first + debug_log("SD2: player attempt to unlearn spell %u, but item %u is equipped.",reqSpell,pItem->GetProto()->ItemId); + return false; + } + } + } + return true; +} + +void ProfessionUnlearnSpells(Player* pPlayer, uint32 type) +{ + switch (type) + { + case 36436: // S_UNLEARN_WEAPON + pPlayer->removeSpell(36125); // Light Earthforged Blade + pPlayer->removeSpell(36128); // Light Emberforged Hammer + pPlayer->removeSpell(36126); // Light Skyforged Axe + break; + case 36435: // S_UNLEARN_ARMOR + pPlayer->removeSpell(36122); // Earthforged Leggings + pPlayer->removeSpell(36129); // Heavy Earthforged Breastplate + pPlayer->removeSpell(36130); // Stormforged Hauberk + pPlayer->removeSpell(34533); // Breastplate of Kings + pPlayer->removeSpell(34529); // Nether Chain Shirt + pPlayer->removeSpell(34534); // Bulwark of Kings + pPlayer->removeSpell(36257); // Bulwark of the Ancient Kings + pPlayer->removeSpell(36256); // Embrace of the Twisting Nether + pPlayer->removeSpell(34530); // Twisting Nether Chain Shirt + pPlayer->removeSpell(36124); // Windforged Leggings + break; + case 36441: // S_UNLEARN_HAMMER + pPlayer->removeSpell(36262); // Dragonstrike + pPlayer->removeSpell(34546); // Dragonmaw + pPlayer->removeSpell(34545); // Drakefist Hammer + pPlayer->removeSpell(36136); // Lavaforged Warhammer + pPlayer->removeSpell(34547); // Thunder + pPlayer->removeSpell(34567); // Deep Thunder + pPlayer->removeSpell(36263); // Stormherald + pPlayer->removeSpell(36137); // Great Earthforged Hammer + break; + case 36439: // S_UNLEARN_AXE + pPlayer->removeSpell(36260); // Wicked Edge of the Planes + pPlayer->removeSpell(34562); // Black Planar Edge + pPlayer->removeSpell(34541); // The Planar Edge + pPlayer->removeSpell(36134); // Stormforged Axe + pPlayer->removeSpell(36135); // Skyforged Great Axe + pPlayer->removeSpell(36261); // Bloodmoon + pPlayer->removeSpell(34543); // Lunar Crescent + pPlayer->removeSpell(34544); // Mooncleaver + break; + case 36438: // S_UNLEARN_SWORD + pPlayer->removeSpell(36258); // Blazefury + pPlayer->removeSpell(34537); // Blazeguard + pPlayer->removeSpell(34535); // Fireguard + pPlayer->removeSpell(36131); // Windforged Rapier + pPlayer->removeSpell(36133); // Stoneforged Claymore + pPlayer->removeSpell(34538); // Lionheart Blade + pPlayer->removeSpell(34540); // Lionheart Champion + pPlayer->removeSpell(36259); // Lionheart Executioner + break; + case 36434: // S_UNLEARN_DRAGON + pPlayer->removeSpell(36076); // Dragonstrike Leggings + pPlayer->removeSpell(36079); // Golden Dragonstrike Breastplate + pPlayer->removeSpell(35576); // Ebon Netherscale Belt + pPlayer->removeSpell(35577); // Ebon Netherscale Bracers + pPlayer->removeSpell(35575); // Ebon Netherscale Breastplate + pPlayer->removeSpell(35582); // Netherstrike Belt + pPlayer->removeSpell(35584); // Netherstrike Bracers + pPlayer->removeSpell(35580); // Netherstrike Breastplate + break; + case 36328: // S_UNLEARN_ELEMENTAL + pPlayer->removeSpell(36074); // Blackstorm Leggings + pPlayer->removeSpell(36077); // Primalstorm Breastplate + pPlayer->removeSpell(35590); // Primalstrike Belt + pPlayer->removeSpell(35591); // Primalstrike Bracers + pPlayer->removeSpell(35589); // Primalstrike Vest + break; + case 36433: // S_UNLEARN_TRIBAL + pPlayer->removeSpell(35585); // Windhawk Hauberk + pPlayer->removeSpell(35587); // Windhawk Belt + pPlayer->removeSpell(35588); // Windhawk Bracers + pPlayer->removeSpell(36075); // Wildfeather Leggings + pPlayer->removeSpell(36078); // Living Crystal Breastplate + break; + case 41299: // S_UNLEARN_SPELLFIRE + pPlayer->removeSpell(26752); // Spellfire Belt + pPlayer->removeSpell(26753); // Spellfire Gloves + pPlayer->removeSpell(26754); // Spellfire Robe + break; + case 41558: // S_UNLEARN_MOONCLOTH + pPlayer->removeSpell(26760); // Primal Mooncloth Belt + pPlayer->removeSpell(26761); // Primal Mooncloth Shoulders + pPlayer->removeSpell(26762); // Primal Mooncloth Robe + break; + case 41559: // S_UNLEARN_SHADOWEAVE + pPlayer->removeSpell(26756); // Frozen Shadoweave Shoulders + pPlayer->removeSpell(26757); // Frozen Shadoweave Boots + pPlayer->removeSpell(26758); // Frozen Shadoweave Robe + break; + } +} + +/*### +# start menues alchemy +###*/ + +bool HasAlchemySpell(Player* pPlayer) +{ + if (pPlayer->HasSpell(S_TRANSMUTE) || pPlayer->HasSpell(S_ELIXIR) || pPlayer->HasSpell(S_POTION)) + return true; + return false; +} + +bool GossipHello_npc_prof_alchemy(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + if (pCreature->isVendor()) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); + if (pCreature->isTrainer()) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_TEXT_TRAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRAIN); + + uint32 eCreature = pCreature->GetEntry(); + + if (pPlayer->HasSkill(SKILL_ALCHEMY) && pPlayer->GetBaseSkillValue(SKILL_ALCHEMY)>=350 && pPlayer->getLevel() > 67) + { + if (pPlayer->GetQuestRewardStatus(10899) || pPlayer->GetQuestRewardStatus(10902) || pPlayer->GetQuestRewardStatus(10897)) + { + switch (eCreature) + { + case 22427: //Zarevhi + if (!HasAlchemySpell(pPlayer)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_TRANSMUTE, GOSSIP_SENDER_LEARN, GOSSIP_ACTION_INFO_DEF + 1); + if (pPlayer->HasSpell(S_TRANSMUTE)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_UNLEARN_TRANSMUTE, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 4); + break; + case 19052: //Lorokeem + if (!HasAlchemySpell(pPlayer)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_ELIXIR, GOSSIP_SENDER_LEARN, GOSSIP_ACTION_INFO_DEF + 2); + if (pPlayer->HasSpell(S_ELIXIR)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_UNLEARN_ELIXIR, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 5); + break; + case 17909: //Lauranna Thar'well + if (!HasAlchemySpell(pPlayer)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_POTION, GOSSIP_SENDER_LEARN, GOSSIP_ACTION_INFO_DEF + 3); + if (pPlayer->HasSpell(S_POTION)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_UNLEARN_POTION, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 6); + break; + } + } + } + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +void SendActionMenu_npc_prof_alchemy(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_TRADE: + pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + break; + case GOSSIP_ACTION_TRAIN: + pPlayer->SEND_TRAINERLIST(pCreature->GetGUID()); + break; + //Learn Alchemy + case GOSSIP_ACTION_INFO_DEF + 1: + if (!pPlayer->HasSpell(S_TRANSMUTE) && pPlayer->GetMoney() >= DoLearnCost(pPlayer)) + { + pPlayer->CastSpell(pPlayer, S_LEARN_TRANSMUTE, true); + pPlayer->ModifyMoney(-DoLearnCost(pPlayer)); + } else + pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); + pPlayer->CLOSE_GOSSIP_MENU(); + break; + case GOSSIP_ACTION_INFO_DEF + 2: + if (!pPlayer->HasSpell(S_ELIXIR) && pPlayer->GetMoney() >= DoLearnCost(pPlayer)) + { + pPlayer->CastSpell(pPlayer, S_LEARN_ELIXIR, true); + pPlayer->ModifyMoney(-DoLearnCost(pPlayer)); + } else + pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); + pPlayer->CLOSE_GOSSIP_MENU(); + break; + case GOSSIP_ACTION_INFO_DEF + 3: + if (!pPlayer->HasSpell(S_POTION) && pPlayer->GetMoney() >= DoLearnCost(pPlayer)) + { + pPlayer->CastSpell(pPlayer, S_LEARN_POTION, true); + pPlayer->ModifyMoney(-DoLearnCost(pPlayer)); + } else + pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); + pPlayer->CLOSE_GOSSIP_MENU(); + break; + //Unlearn Alchemy + case GOSSIP_ACTION_INFO_DEF + 4: + if (pPlayer->GetMoney() >= DoHighUnlearnCost(pPlayer)) + { + pCreature->CastSpell(pPlayer, S_UNLEARN_TRANSMUTE, true); + pPlayer->ModifyMoney(-DoHighUnlearnCost(pPlayer)); + } else + pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); + pPlayer->CLOSE_GOSSIP_MENU(); + break; + case GOSSIP_ACTION_INFO_DEF + 5: + if (pPlayer->GetMoney() >= DoHighUnlearnCost(pPlayer)) + { + pCreature->CastSpell(pPlayer, S_UNLEARN_ELIXIR, true); + pPlayer->ModifyMoney(-DoHighUnlearnCost(pPlayer)); + } else + pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); + pPlayer->CLOSE_GOSSIP_MENU(); + break; + case GOSSIP_ACTION_INFO_DEF + 6: + if (pPlayer->GetMoney() >= DoHighUnlearnCost(pPlayer)) + { + pCreature->CastSpell(pPlayer, S_UNLEARN_POTION, true); + pPlayer->ModifyMoney(-DoHighUnlearnCost(pPlayer)); + } else + pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); + pPlayer->CLOSE_GOSSIP_MENU(); + break; + } +} + +void SendConfirmLearn_npc_prof_alchemy(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + if (uiAction) + { + uint32 eCreature = pCreature->GetEntry(); + switch(eCreature) + { + case 22427: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_TRANSMUTE, GOSSIP_SENDER_CHECK, uiAction); + //unknown textID () + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + break; + case 19052: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_ELIXIR, GOSSIP_SENDER_CHECK, uiAction); + //unknown textID () + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + break; + case 17909: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_POTION, GOSSIP_SENDER_CHECK, uiAction); + //unknown textID () + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + break; + } + } +} + +void SendConfirmUnlearn_npc_prof_alchemy(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + if (uiAction) + { + uint32 eCreature = pCreature->GetEntry(); + switch(eCreature) + { + case 22427: //Zarevhi + pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_TRANSMUTE, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_ALCHEMY_SPEC, DoHighUnlearnCost(pPlayer),false); + //unknown textID () + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + break; + case 19052: //Lorokeem + pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_ELIXIR, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_ALCHEMY_SPEC, DoHighUnlearnCost(pPlayer),false); + //unknown textID () + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + break; + case 17909: //Lauranna Thar'well + pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_POTION, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_ALCHEMY_SPEC, DoHighUnlearnCost(pPlayer),false); + //unknown textID () + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + break; + } + } +} + +bool GossipSelect_npc_prof_alchemy(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiSender) + { + case GOSSIP_SENDER_MAIN: SendActionMenu_npc_prof_alchemy(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_LEARN: SendConfirmLearn_npc_prof_alchemy(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_UNLEARN: SendConfirmUnlearn_npc_prof_alchemy(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_CHECK: SendActionMenu_npc_prof_alchemy(pPlayer, pCreature, uiAction); break; + } + return true; +} + +/*### +# start menues blacksmith +###*/ + +bool HasWeaponSub(Player* pPlayer) +{ + if (pPlayer->HasSpell(S_HAMMER) || pPlayer->HasSpell(S_AXE) || pPlayer->HasSpell(S_SWORD)) + return true; + return false; +} + +bool GossipHello_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + if (pCreature->isVendor()) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); + if (pCreature->isTrainer()) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_TEXT_TRAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRAIN); + + uint32 eCreature = pCreature->GetEntry(); + //WEAPONSMITH & ARMORSMITH + if (pPlayer->GetBaseSkillValue(SKILL_BLACKSMITHING)>=225) + { + switch (eCreature) + { + case 11145: //Myolor Sunderfury + case 11176: //Krathok Moltenfist + if (!pPlayer->HasSpell(S_ARMOR) && !pPlayer->HasSpell(S_WEAPON) && pPlayer->GetReputationRank(REP_ARMOR) == REP_FRIENDLY) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ARMOR_LEARN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + if (!pPlayer->HasSpell(S_WEAPON) && !pPlayer->HasSpell(S_ARMOR) && pPlayer->GetReputationRank(REP_WEAPON) == REP_FRIENDLY) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_WEAPON_LEARN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + break; + case 11146: //Ironus Coldsteel + case 11178: //Borgosh Corebender + if (pPlayer->HasSpell(S_WEAPON)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_WEAPON_UNLEARN, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 3); + break; + case 5164: //Grumnus Steelshaper + case 11177: //Okothos Ironrager + if (pPlayer->HasSpell(S_ARMOR)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ARMOR_UNLEARN, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 4); + break; + } + } + //WEAPONSMITH SPEC + if (pPlayer->HasSpell(S_WEAPON) && pPlayer->getLevel() > 49 && pPlayer->GetBaseSkillValue(SKILL_BLACKSMITHING)>=250) + { + switch (eCreature) + { + case 11191: //Lilith the Lithe + if (!HasWeaponSub(pPlayer)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_HAMMER, GOSSIP_SENDER_LEARN, GOSSIP_ACTION_INFO_DEF + 5); + if (pPlayer->HasSpell(S_HAMMER)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_UNLEARN_HAMMER, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 8); + break; + case 11192: //Kilram + if (!HasWeaponSub(pPlayer)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_AXE, GOSSIP_SENDER_LEARN, GOSSIP_ACTION_INFO_DEF + 6); + if (pPlayer->HasSpell(S_AXE)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_UNLEARN_AXE, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 9); + break; + case 11193: //Seril Scourgebane + if (!HasWeaponSub(pPlayer)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_SWORD, GOSSIP_SENDER_LEARN, GOSSIP_ACTION_INFO_DEF + 7); + if (pPlayer->HasSpell(S_SWORD)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_UNLEARN_SWORD, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 10); + break; + } + } + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +void SendActionMenu_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_TRADE: + pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + break; + case GOSSIP_ACTION_TRAIN: + pPlayer->SEND_TRAINERLIST(pCreature->GetGUID()); + break; + //Learn Armor/Weapon + case GOSSIP_ACTION_INFO_DEF + 1: + if (!pPlayer->HasSpell(S_ARMOR)) + { + pPlayer->CastSpell(pPlayer, S_LEARN_ARMOR, true); + //pCreature->CastSpell(pPlayer, S_REP_ARMOR, true); + } + pPlayer->CLOSE_GOSSIP_MENU(); + break; + case GOSSIP_ACTION_INFO_DEF + 2: + if (!pPlayer->HasSpell(S_WEAPON)) + { + pPlayer->CastSpell(pPlayer, S_LEARN_WEAPON, true); + //pCreature->CastSpell(pPlayer, S_REP_WEAPON, true); + } + pPlayer->CLOSE_GOSSIP_MENU(); + break; + //Unlearn Armor/Weapon + case GOSSIP_ACTION_INFO_DEF + 3: + if (HasWeaponSub(pPlayer)) + { + //unknown textID (TALK_MUST_UNLEARN_WEAPON) + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + } + else if (EquippedOk(pPlayer,S_UNLEARN_WEAPON)) + { + if (pPlayer->GetMoney() >= DoLowUnlearnCost(pPlayer)) + { + pPlayer->CastSpell(pPlayer, S_UNLEARN_WEAPON, true); + ProfessionUnlearnSpells(pPlayer, S_UNLEARN_WEAPON); + pPlayer->ModifyMoney(-DoLowUnlearnCost(pPlayer)); + pCreature->CastSpell(pPlayer, S_REP_ARMOR, true); + pPlayer->CLOSE_GOSSIP_MENU(); + } else + pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); + } + else + { + pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW,NULL,NULL); + pPlayer->CLOSE_GOSSIP_MENU(); + } + break; + case GOSSIP_ACTION_INFO_DEF + 4: + if (EquippedOk(pPlayer,S_UNLEARN_ARMOR)) + { + if (pPlayer->GetMoney() >= DoLowUnlearnCost(pPlayer)) + { + pPlayer->CastSpell(pPlayer, S_UNLEARN_ARMOR, true); + ProfessionUnlearnSpells(pPlayer, S_UNLEARN_ARMOR); + pPlayer->ModifyMoney(-DoLowUnlearnCost(pPlayer)); + pCreature->CastSpell(pPlayer, S_REP_WEAPON, true); + } else + pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); + } else + pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW,NULL,NULL); + pPlayer->CLOSE_GOSSIP_MENU(); + break; + //Learn Hammer/Axe/Sword + case GOSSIP_ACTION_INFO_DEF + 5: + pPlayer->CastSpell(pPlayer, S_LEARN_HAMMER, true); + pPlayer->CLOSE_GOSSIP_MENU(); + break; + case GOSSIP_ACTION_INFO_DEF + 6: + pPlayer->CastSpell(pPlayer, S_LEARN_AXE, true); + pPlayer->CLOSE_GOSSIP_MENU(); + break; + case GOSSIP_ACTION_INFO_DEF + 7: + pPlayer->CastSpell(pPlayer, S_LEARN_SWORD, true); + pPlayer->CLOSE_GOSSIP_MENU(); + break; + //Unlearn Hammer/Axe/Sword + case GOSSIP_ACTION_INFO_DEF + 8: + if (EquippedOk(pPlayer,S_UNLEARN_HAMMER)) + { + if (pPlayer->GetMoney() >= DoMedUnlearnCost(pPlayer)) + { + pPlayer->CastSpell(pPlayer, S_UNLEARN_HAMMER, true); + ProfessionUnlearnSpells(pPlayer, S_UNLEARN_HAMMER); + pPlayer->ModifyMoney(-DoMedUnlearnCost(pPlayer)); + } else + pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); + } else + pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW,NULL,NULL); + pPlayer->CLOSE_GOSSIP_MENU(); + break; + case GOSSIP_ACTION_INFO_DEF + 9: + if (EquippedOk(pPlayer,S_UNLEARN_AXE)) + { + if (pPlayer->GetMoney() >= DoMedUnlearnCost(pPlayer)) + { + pPlayer->CastSpell(pPlayer, S_UNLEARN_AXE, true); + ProfessionUnlearnSpells(pPlayer, S_UNLEARN_AXE); + pPlayer->ModifyMoney(-DoMedUnlearnCost(pPlayer)); + } else + pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); + } else + pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW,NULL,NULL); + pPlayer->CLOSE_GOSSIP_MENU(); + break; + case GOSSIP_ACTION_INFO_DEF + 10: + if (EquippedOk(pPlayer,S_UNLEARN_SWORD)) + { + if (pPlayer->GetMoney() >= DoMedUnlearnCost(pPlayer)) + { + pPlayer->CastSpell(pPlayer, S_UNLEARN_SWORD, true); + ProfessionUnlearnSpells(pPlayer, S_UNLEARN_SWORD); + pPlayer->ModifyMoney(-DoMedUnlearnCost(pPlayer)); + } else + pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); + } else + pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW,NULL,NULL); + pPlayer->CLOSE_GOSSIP_MENU(); + break; + } +} + +void SendConfirmLearn_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + if (uiAction) + { + uint32 eCreature = pCreature->GetEntry(); + switch(eCreature) + { + case 11191: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_HAMMER, GOSSIP_SENDER_CHECK, uiAction); + //unknown textID (TALK_HAMMER_LEARN) + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + break; + case 11192: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_AXE, GOSSIP_SENDER_CHECK, uiAction); + //unknown textID (TALK_AXE_LEARN) + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + break; + case 11193: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_SWORD, GOSSIP_SENDER_CHECK, uiAction); + //unknown textID (TALK_SWORD_LEARN) + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + break; + } + } +} + +void SendConfirmUnlearn_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + if (uiAction) + { + uint32 eCreature = pCreature->GetEntry(); + switch(eCreature) + { + case 11146: //Ironus Coldsteel + case 11178: //Borgosh Corebender + case 5164: //Grumnus Steelshaper + case 11177: //Okothos Ironrager + pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_SMITH_SPEC, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_ARMORORWEAPON, DoLowUnlearnCost(pPlayer),false); + //unknown textID (TALK_UNLEARN_AXEORWEAPON) + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + break; + + case 11191: + pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_HAMMER, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_WEAPON_SPEC, DoMedUnlearnCost(pPlayer),false); + //unknown textID (TALK_HAMMER_UNLEARN) + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + break; + case 11192: + pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_AXE, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_WEAPON_SPEC, DoMedUnlearnCost(pPlayer),false); + //unknown textID (TALK_AXE_UNLEARN) + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + break; + case 11193: + pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_SWORD, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_WEAPON_SPEC, DoMedUnlearnCost(pPlayer),false); + //unknown textID (TALK_SWORD_UNLEARN) + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + break; + } + } +} + +bool GossipSelect_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiSender) + { + case GOSSIP_SENDER_MAIN: SendActionMenu_npc_prof_blacksmith(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_LEARN: SendConfirmLearn_npc_prof_blacksmith(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_UNLEARN: SendConfirmUnlearn_npc_prof_blacksmith(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_CHECK: SendActionMenu_npc_prof_blacksmith(pPlayer, pCreature, uiAction); break; + } + return true; +} + +/*bool QuestComplete_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if ((pQuest->GetQuestId() == 5283) || (pQuest->GetQuestId() == 5301)) //armorsmith + pCreature->CastSpell(pPlayer, 17451, true); + + if ((pQuest->GetQuestId() == 5284) || (pQuest->GetQuestId() == 5302)) //weaponsmith + pCreature->CastSpell(pPlayer, 17452, true); + + return true; +}*/ + +/*### +# engineering trinkets +###*/ + +enum +{ + NPC_ZAP = 14742, + NPC_JHORDY = 14743, + NPC_KABLAM = 21493, + NPC_SMILES = 21494, + + SPELL_LEARN_TO_EVERLOOK = 23490, + SPELL_LEARN_TO_GADGET = 23491, + SPELL_LEARN_TO_AREA52 = 36956, + SPELL_LEARN_TO_TOSHLEY = 36957, + + SPELL_TO_EVERLOOK = 23486, + SPELL_TO_GADGET = 23489, + SPELL_TO_AREA52 = 36954, + SPELL_TO_TOSHLEY = 36955, + + ITEM_GNOMISH_CARD = 10790, + ITEM_GOBLIN_CARD = 10791 +}; + +#define GOSSIP_ITEM_ZAP "[PH] Unknown" +#define GOSSIP_ITEM_JHORDY "I must build a beacon for this marvelous device!" +#define GOSSIP_ITEM_KABLAM "[PH] Unknown" +#define GOSSIP_ITEM_SMILES "[PH] Unknown" + +bool GossipHello_npc_engineering_tele_trinket(Player* pPlayer, Creature* pCreature) +{ + uint32 uiNpcTextId = 0; + std::string strGossipItem; + bool bCanLearn = false; + + if (pPlayer->HasSkill(SKILL_ENGINERING)) + { + switch(pCreature->GetEntry()) + { + case NPC_ZAP: + uiNpcTextId = 7249; + if (pPlayer->GetBaseSkillValue(SKILL_ENGINERING) >= 260 && pPlayer->HasSpell(S_GOBLIN)) + { + if (!pPlayer->HasSpell(SPELL_TO_EVERLOOK)) + { + bCanLearn = true; + strGossipItem = GOSSIP_ITEM_ZAP; + } + else if (pPlayer->HasSpell(SPELL_TO_EVERLOOK)) + uiNpcTextId = 0; + } + break; + case NPC_JHORDY: + uiNpcTextId = 7251; + if (pPlayer->GetBaseSkillValue(SKILL_ENGINERING) >= 260 && pPlayer->HasSpell(S_GNOMISH)) + { + if (!pPlayer->HasSpell(SPELL_TO_GADGET)) + { + bCanLearn = true; + strGossipItem = GOSSIP_ITEM_JHORDY; + } + else if (pPlayer->HasSpell(SPELL_TO_GADGET)) + uiNpcTextId = 7252; + } + break; + case NPC_KABLAM: + uiNpcTextId = 10365; + if (pPlayer->GetBaseSkillValue(SKILL_ENGINERING) >= 350 && pPlayer->HasSpell(S_GOBLIN)) + { + if (!pPlayer->HasSpell(SPELL_TO_AREA52)) + { + bCanLearn = true; + strGossipItem = GOSSIP_ITEM_KABLAM; + } + else if (pPlayer->HasSpell(SPELL_TO_AREA52)) + uiNpcTextId = 0; + } + break; + case NPC_SMILES: + uiNpcTextId = 10363; + if (pPlayer->GetBaseSkillValue(SKILL_ENGINERING) >= 350 && pPlayer->HasSpell(S_GNOMISH)) + { + if (!pPlayer->HasSpell(SPELL_TO_TOSHLEY)) + { + bCanLearn = true; + strGossipItem = GOSSIP_ITEM_SMILES; + } + else if (pPlayer->HasSpell(SPELL_TO_TOSHLEY)) + uiNpcTextId = 0; + } + break; + } + } + + if (bCanLearn) + { + if (pPlayer->HasItemCount(ITEM_GOBLIN_CARD,1) || pPlayer->HasItemCount(ITEM_GNOMISH_CARD,1)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, strGossipItem, pCreature->GetEntry(), GOSSIP_ACTION_INFO_DEF+1); + } + + pPlayer->SEND_GOSSIP_MENU(uiNpcTextId ? uiNpcTextId : pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_engineering_tele_trinket(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + pPlayer->CLOSE_GOSSIP_MENU(); + + if (uiSender != pCreature->GetEntry()) + return true; + + switch(uiSender) + { + case NPC_ZAP: + pPlayer->CastSpell(pPlayer,SPELL_LEARN_TO_EVERLOOK,false); + break; + case NPC_JHORDY: + pPlayer->CastSpell(pPlayer,SPELL_LEARN_TO_GADGET,false); + break; + case NPC_KABLAM: + pPlayer->CastSpell(pPlayer,SPELL_LEARN_TO_AREA52,false); + break; + case NPC_SMILES: + pPlayer->CastSpell(pPlayer,SPELL_LEARN_TO_TOSHLEY,false); + break; + } + + return true; +} + +/*### +# start menues leatherworking +###*/ + +bool GossipHello_npc_prof_leather(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + if (pCreature->isVendor()) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); + if (pCreature->isTrainer()) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_TEXT_TRAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRAIN); + + uint32 eCreature = pCreature->GetEntry(); + + if (pPlayer->HasSkill(SKILL_LEATHERWORKING) && pPlayer->GetBaseSkillValue(SKILL_LEATHERWORKING)>=250 && pPlayer->getLevel() > 49) + { + switch (eCreature) + { + case 7866: //Peter Galen + case 7867: //Thorkaf Dragoneye + if (pPlayer->HasSpell(S_DRAGON)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_UNLEARN_DRAGON, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 1); + break; + case 7868: //Sarah Tanner + case 7869: //Brumn Winterhoof + if (pPlayer->HasSpell(S_ELEMENTAL)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_UNLEARN_ELEMENTAL, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 2); + break; + case 7870: //Caryssia Moonhunter + case 7871: //Se'Jib + if (pPlayer->HasSpell(S_TRIBAL)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_UNLEARN_TRIBAL, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 3); + break; + } + } + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +void SendActionMenu_npc_prof_leather(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_TRADE: + pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + break; + case GOSSIP_ACTION_TRAIN: + pPlayer->SEND_TRAINERLIST(pCreature->GetGUID()); + break; + //Unlearn Leather + case GOSSIP_ACTION_INFO_DEF + 1: + if (EquippedOk(pPlayer,S_UNLEARN_DRAGON)) + { + if (pPlayer->GetMoney() >= DoMedUnlearnCost(pPlayer)) + { + pPlayer->CastSpell(pPlayer, S_UNLEARN_DRAGON, true); + ProfessionUnlearnSpells(pPlayer, S_UNLEARN_DRAGON); + pPlayer->ModifyMoney(-DoMedUnlearnCost(pPlayer)); + } else + pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); + } else + pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW,NULL,NULL); + pPlayer->CLOSE_GOSSIP_MENU(); + break; + case GOSSIP_ACTION_INFO_DEF + 2: + if (EquippedOk(pPlayer,S_UNLEARN_ELEMENTAL)) + { + if (pPlayer->GetMoney() >= DoMedUnlearnCost(pPlayer)) + { + pPlayer->CastSpell(pPlayer, S_UNLEARN_ELEMENTAL, true); + ProfessionUnlearnSpells(pPlayer, S_UNLEARN_ELEMENTAL); + pPlayer->ModifyMoney(-DoMedUnlearnCost(pPlayer)); + } else + pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); + } else + pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW,NULL,NULL); + pPlayer->CLOSE_GOSSIP_MENU(); + break; + case GOSSIP_ACTION_INFO_DEF + 3: + if (EquippedOk(pPlayer,S_UNLEARN_TRIBAL)) + { + if (pPlayer->GetMoney() >= DoMedUnlearnCost(pPlayer)) + { + pPlayer->CastSpell(pPlayer, S_UNLEARN_TRIBAL, true); + ProfessionUnlearnSpells(pPlayer, S_UNLEARN_TRIBAL); + pPlayer->ModifyMoney(-DoMedUnlearnCost(pPlayer)); + } else + pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); + } else + pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW,NULL,NULL); + pPlayer->CLOSE_GOSSIP_MENU(); + break; + } +} + +void SendConfirmUnlearn_npc_prof_leather(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + if (uiAction) + { + uint32 eCreature = pCreature->GetEntry(); + switch(eCreature) + { + case 7866: //Peter Galen + case 7867: //Thorkaf Dragoneye + pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_DRAGON, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_LEATHER_SPEC, DoMedUnlearnCost(pPlayer),false); + //unknown textID () + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + break; + case 7868: //Sarah Tanner + case 7869: //Brumn Winterhoof + pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_ELEMENTAL, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_LEATHER_SPEC, DoMedUnlearnCost(pPlayer),false); + //unknown textID () + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + break; + case 7870: //Caryssia Moonhunter + case 7871: //Se'Jib + pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_TRIBAL, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_LEATHER_SPEC, DoMedUnlearnCost(pPlayer),false); + //unknown textID () + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + break; + } + } +} + +bool GossipSelect_npc_prof_leather(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiSender) + { + case GOSSIP_SENDER_MAIN: SendActionMenu_npc_prof_leather(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_UNLEARN: SendConfirmUnlearn_npc_prof_leather(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_CHECK: SendActionMenu_npc_prof_leather(pPlayer, pCreature, uiAction); break; + } + return true; +} + +/*### +# start menues tailoring +###*/ + +bool HasTailorSpell(Player* pPlayer) +{ + if (pPlayer->HasSpell(S_MOONCLOTH) || pPlayer->HasSpell(S_SHADOWEAVE) || pPlayer->HasSpell(S_SPELLFIRE)) + return true; + return false; +} + +bool GossipHello_npc_prof_tailor(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + if (pCreature->isVendor()) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); + if (pCreature->isTrainer()) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_TEXT_TRAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRAIN); + + uint32 eCreature = pCreature->GetEntry(); + //TAILORING SPEC + if (pPlayer->HasSkill(SKILL_TAILORING) && pPlayer->GetBaseSkillValue(SKILL_TAILORING)>=350 && pPlayer->getLevel() > 59) + { + if (pPlayer->GetQuestRewardStatus(10831) || pPlayer->GetQuestRewardStatus(10832) || pPlayer->GetQuestRewardStatus(10833)) + { + switch (eCreature) + { + case 22213: //Gidge Spellweaver + if (!HasTailorSpell(pPlayer)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_SPELLFIRE, GOSSIP_SENDER_LEARN, GOSSIP_ACTION_INFO_DEF + 1); + if (pPlayer->HasSpell(S_SPELLFIRE)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_UNLEARN_SPELLFIRE, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 4); + break; + case 22208: //Nasmara Moonsong + if (!HasTailorSpell(pPlayer)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_MOONCLOTH, GOSSIP_SENDER_LEARN, GOSSIP_ACTION_INFO_DEF + 2); + if (pPlayer->HasSpell(S_MOONCLOTH)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_UNLEARN_MOONCLOTH, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 5); + break; + case 22212: //Andrion Darkspinner + if (!HasTailorSpell(pPlayer)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_SHADOWEAVE, GOSSIP_SENDER_LEARN, GOSSIP_ACTION_INFO_DEF + 3); + if (pPlayer->HasSpell(S_SHADOWEAVE)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_UNLEARN_SHADOWEAVE, GOSSIP_SENDER_UNLEARN, GOSSIP_ACTION_INFO_DEF + 6); + break; + } + } + } + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +void SendActionMenu_npc_prof_tailor(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_TRADE: + pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + break; + case GOSSIP_ACTION_TRAIN: + pPlayer->SEND_TRAINERLIST(pCreature->GetGUID()); + break; + //Learn Tailor + case GOSSIP_ACTION_INFO_DEF + 1: + if (!pPlayer->HasSpell(S_SPELLFIRE) && pPlayer->GetMoney() >= DoLearnCost(pPlayer)) + { + pPlayer->CastSpell(pPlayer, S_LEARN_SPELLFIRE, true); + pPlayer->ModifyMoney(-DoLearnCost(pPlayer)); + } else + pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); + pPlayer->CLOSE_GOSSIP_MENU(); + break; + case GOSSIP_ACTION_INFO_DEF + 2: + if (!pPlayer->HasSpell(S_MOONCLOTH) && pPlayer->GetMoney() >= DoLearnCost(pPlayer)) + { + pPlayer->CastSpell(pPlayer, S_LEARN_MOONCLOTH, true); + pPlayer->ModifyMoney(-DoLearnCost(pPlayer)); + } else + pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); + pPlayer->CLOSE_GOSSIP_MENU(); + break; + case GOSSIP_ACTION_INFO_DEF + 3: + if (!pPlayer->HasSpell(S_SHADOWEAVE) && pPlayer->GetMoney() >= DoLearnCost(pPlayer)) + { + pPlayer->CastSpell(pPlayer, S_LEARN_SHADOWEAVE, true); + pPlayer->ModifyMoney(-DoLearnCost(pPlayer)); + } else + pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); + pPlayer->CLOSE_GOSSIP_MENU(); + break; + //Unlearn Tailor + case GOSSIP_ACTION_INFO_DEF + 4: + if (EquippedOk(pPlayer,S_UNLEARN_SPELLFIRE)) + { + if (pPlayer->GetMoney() >= DoHighUnlearnCost(pPlayer)) + { + pPlayer->CastSpell(pPlayer, S_UNLEARN_SPELLFIRE, true); + ProfessionUnlearnSpells(pPlayer, S_UNLEARN_SPELLFIRE); + pPlayer->ModifyMoney(-DoHighUnlearnCost(pPlayer)); + } else + pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); + } else + pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW,NULL,NULL); + pPlayer->CLOSE_GOSSIP_MENU(); + break; + case GOSSIP_ACTION_INFO_DEF + 5: + if (EquippedOk(pPlayer,S_UNLEARN_MOONCLOTH)) + { + if (pPlayer->GetMoney() >= DoHighUnlearnCost(pPlayer)) + { + pPlayer->CastSpell(pPlayer, S_UNLEARN_MOONCLOTH, true); + ProfessionUnlearnSpells(pPlayer, S_UNLEARN_MOONCLOTH); + pPlayer->ModifyMoney(-DoHighUnlearnCost(pPlayer)); + } else + pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); + } else + pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW,NULL,NULL); + pPlayer->CLOSE_GOSSIP_MENU(); + break; + case GOSSIP_ACTION_INFO_DEF + 6: + if (EquippedOk(pPlayer,S_UNLEARN_SHADOWEAVE)) + { + if (pPlayer->GetMoney() >= DoHighUnlearnCost(pPlayer)) + { + pPlayer->CastSpell(pPlayer, S_UNLEARN_SHADOWEAVE, true); + ProfessionUnlearnSpells(pPlayer, S_UNLEARN_SHADOWEAVE); + pPlayer->ModifyMoney(-DoHighUnlearnCost(pPlayer)); + } else + pPlayer->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, pCreature, 0, 0); + } else + pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW,NULL,NULL); + pPlayer->CLOSE_GOSSIP_MENU(); + break; + } +} + +void SendConfirmLearn_npc_prof_tailor(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + if (uiAction) + { + uint32 eCreature = pCreature->GetEntry(); + switch(eCreature) + { + case 22213: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_SPELLFIRE, GOSSIP_SENDER_CHECK, uiAction); + //unknown textID () + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + break; + case 22208: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_MOONCLOTH, GOSSIP_SENDER_CHECK, uiAction); + //unknown textID () + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + break; + case 22212: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_SHADOWEAVE, GOSSIP_SENDER_CHECK, uiAction); + //unknown textID () + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + break; + } + } +} + +void SendConfirmUnlearn_npc_prof_tailor(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + if (uiAction) + { + uint32 eCreature = pCreature->GetEntry(); + switch(eCreature) + { + case 22213: //Gidge Spellweaver + pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_SPELLFIRE, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_TAILOR_SPEC, DoHighUnlearnCost(pPlayer),false); + //unknown textID () + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + break; + case 22208: //Nasmara Moonsong + pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_MOONCLOTH, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_TAILOR_SPEC, DoHighUnlearnCost(pPlayer),false); + //unknown textID () + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + break; + case 22212: //Andrion Darkspinner + pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_SHADOWEAVE, GOSSIP_SENDER_CHECK, uiAction,BOX_UNLEARN_TAILOR_SPEC, DoHighUnlearnCost(pPlayer),false); + //unknown textID () + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + break; + } + } +} + +bool GossipSelect_npc_prof_tailor(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiSender) + { + case GOSSIP_SENDER_MAIN: SendActionMenu_npc_prof_tailor(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_LEARN: SendConfirmLearn_npc_prof_tailor(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_UNLEARN: SendConfirmUnlearn_npc_prof_tailor(pPlayer, pCreature, uiAction); break; + case GOSSIP_SENDER_CHECK: SendActionMenu_npc_prof_tailor(pPlayer, pCreature, uiAction); break; + } + return true; +} + +/*### +# start menues for GO (engineering and leatherworking) +###*/ + +/*bool GOHello_go_soothsaying_for_dummies(Player* pPlayer, GameObject* pGo) +{ + pPlayer->PlayerTalkClass->GetGossipMenu()->AddMenuItem(0,GOSSIP_LEARN_DRAGON, GOSSIP_SENDER_INFO, GOSSIP_ACTION_INFO_DEF, "", 0); + + pPlayer->SEND_GOSSIP_MENU(5584, pGo->GetGUID()); + + return true; +}*/ + +/*### +# +###*/ + +void AddSC_npc_professions() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_prof_alchemy"; + newscript->pGossipHello = &GossipHello_npc_prof_alchemy; + newscript->pGossipSelect = &GossipSelect_npc_prof_alchemy; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_prof_blacksmith"; + newscript->pGossipHello = &GossipHello_npc_prof_blacksmith; + newscript->pGossipSelect = &GossipSelect_npc_prof_blacksmith; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_engineering_tele_trinket"; + newscript->pGossipHello = &GossipHello_npc_engineering_tele_trinket; + newscript->pGossipSelect = &GossipSelect_npc_engineering_tele_trinket; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_prof_leather"; + newscript->pGossipHello = &GossipHello_npc_prof_leather; + newscript->pGossipSelect = &GossipSelect_npc_prof_leather; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_prof_tailor"; + newscript->pGossipHello = &GossipHello_npc_prof_tailor; + newscript->pGossipSelect = &GossipSelect_npc_prof_tailor; + newscript->RegisterSelf(); + + /*newscript = new Script; + newscript->Name = "go_soothsaying_for_dummies"; + newscript->pGOHello = &GOHello_go_soothsaying_for_dummies; + //newscript->pGossipSelect = &GossipSelect_go_soothsaying_for_dummies; + newscript->RegisterSelf();*/ +} diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp new file mode 100644 index 000000000..7373afa16 --- /dev/null +++ b/scripts/world/npcs_special.cpp @@ -0,0 +1,1411 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Npcs_Special +SD%Complete: 100 +SDComment: To be used for special NPCs that are located globally. +SDCategory: NPCs +EndScriptData +*/ + +#include "precompiled.h" +#include "escort_ai.h" +#include "ObjectMgr.h" + +/* ContentData +npc_air_force_bots 80% support for misc (invisible) guard bots in areas where player allowed to fly. Summon guards after a preset time if tagged by spell +npc_chicken_cluck 100% support for quest 3861 (Cluck!) +npc_dancing_flames 100% midsummer event NPC +npc_guardian 100% guardianAI used to prevent players from accessing off-limits areas. Not in use by SD2 +npc_garments_of_quests 80% NPC's related to all Garments of-quests 5621, 5624, 5625, 5648, 5650 +npc_injured_patient 100% patients for triage-quests (6622 and 6624) +npc_doctor 100% Gustaf Vanhowzen and Gregory Victor, quest 6622 and 6624 (Triage) +npc_kingdom_of_dalaran_quests Misc NPC's gossip option related to quests 12791, 12794 and 12796 +npc_lunaclaw_spirit 100% Appears at two different locations, quest 6001/6002 +npc_mount_vendor 100% Regular mount vendors all over the world. Display gossip if player doesn't meet the requirements to buy +npc_rogue_trainer 80% Scripted trainers, so they are able to offer item 17126 for class quest 6681 +npc_sayge 100% Darkmoon event fortune teller, buff player based on answers given +EndContentData */ + +/*######## +# npc_air_force_bots +#########*/ + +enum SpawnType +{ + SPAWNTYPE_TRIPWIRE_ROOFTOP, // no warning, summon creature at smaller range + SPAWNTYPE_ALARMBOT, // cast guards mark and summon npc - if player shows up with that buff duration < 5 seconds attack +}; + +struct SpawnAssociation +{ + uint32 m_uiThisCreatureEntry; + uint32 m_uiSpawnedCreatureEntry; + SpawnType m_SpawnType; +}; + +enum +{ + SPELL_GUARDS_MARK = 38067, + AURA_DURATION_TIME_LEFT = 5000 +}; + +const float RANGE_TRIPWIRE = 15.0f; +const float RANGE_GUARDS_MARK = 50.0f; + +SpawnAssociation m_aSpawnAssociations[] = +{ + {2614, 15241, SPAWNTYPE_ALARMBOT}, //Air Force Alarm Bot (Alliance) + {2615, 15242, SPAWNTYPE_ALARMBOT}, //Air Force Alarm Bot (Horde) + {21974, 21976, SPAWNTYPE_ALARMBOT}, //Air Force Alarm Bot (Area 52) + {21993, 15242, SPAWNTYPE_ALARMBOT}, //Air Force Guard Post (Horde - Bat Rider) + {21996, 15241, SPAWNTYPE_ALARMBOT}, //Air Force Guard Post (Alliance - Gryphon) + {21997, 21976, SPAWNTYPE_ALARMBOT}, //Air Force Guard Post (Goblin - Area 52 - Zeppelin) + {21999, 15241, SPAWNTYPE_TRIPWIRE_ROOFTOP}, //Air Force Trip Wire - Rooftop (Alliance) + {22001, 15242, SPAWNTYPE_TRIPWIRE_ROOFTOP}, //Air Force Trip Wire - Rooftop (Horde) + {22002, 15242, SPAWNTYPE_TRIPWIRE_ROOFTOP}, //Air Force Trip Wire - Ground (Horde) + {22003, 15241, SPAWNTYPE_TRIPWIRE_ROOFTOP}, //Air Force Trip Wire - Ground (Alliance) + {22063, 21976, SPAWNTYPE_TRIPWIRE_ROOFTOP}, //Air Force Trip Wire - Rooftop (Goblin - Area 52) + {22065, 22064, SPAWNTYPE_ALARMBOT}, //Air Force Guard Post (Ethereal - Stormspire) + {22066, 22067, SPAWNTYPE_ALARMBOT}, //Air Force Guard Post (Scryer - Dragonhawk) + {22068, 22064, SPAWNTYPE_TRIPWIRE_ROOFTOP}, //Air Force Trip Wire - Rooftop (Ethereal - Stormspire) + {22069, 22064, SPAWNTYPE_ALARMBOT}, //Air Force Alarm Bot (Stormspire) + {22070, 22067, SPAWNTYPE_TRIPWIRE_ROOFTOP}, //Air Force Trip Wire - Rooftop (Scryer) + {22071, 22067, SPAWNTYPE_ALARMBOT}, //Air Force Alarm Bot (Scryer) + {22078, 22077, SPAWNTYPE_ALARMBOT}, //Air Force Alarm Bot (Aldor) + {22079, 22077, SPAWNTYPE_ALARMBOT}, //Air Force Guard Post (Aldor - Gryphon) + {22080, 22077, SPAWNTYPE_TRIPWIRE_ROOFTOP}, //Air Force Trip Wire - Rooftop (Aldor) + {22086, 22085, SPAWNTYPE_ALARMBOT}, //Air Force Alarm Bot (Sporeggar) + {22087, 22085, SPAWNTYPE_ALARMBOT}, //Air Force Guard Post (Sporeggar - Spore Bat) + {22088, 22085, SPAWNTYPE_TRIPWIRE_ROOFTOP}, //Air Force Trip Wire - Rooftop (Sporeggar) + {22090, 22089, SPAWNTYPE_ALARMBOT}, //Air Force Guard Post (Toshley's Station - Flying Machine) + {22124, 22122, SPAWNTYPE_ALARMBOT}, //Air Force Alarm Bot (Cenarion) + {22125, 22122, SPAWNTYPE_ALARMBOT}, //Air Force Guard Post (Cenarion - Stormcrow) + {22126, 22122, SPAWNTYPE_ALARMBOT} //Air Force Trip Wire - Rooftop (Cenarion Expedition) +}; + +struct MANGOS_DLL_DECL npc_air_force_botsAI : public ScriptedAI +{ + npc_air_force_botsAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pSpawnAssoc = NULL; + m_uiSpawnedGUID = 0; + + // find the correct spawnhandling + static uint32 uiEntryCount = sizeof(m_aSpawnAssociations)/sizeof(SpawnAssociation); + + for (uint8 i=0; iGetEntry()) + { + m_pSpawnAssoc = &m_aSpawnAssociations[i]; + break; + } + } + + if (!m_pSpawnAssoc) + error_db_log("SD2: Creature template entry %u has ScriptName npc_air_force_bots, but it's not handled by that script", pCreature->GetEntry()); + else + { + CreatureInfo const* spawnedTemplate = GetCreatureTemplateStore(m_pSpawnAssoc->m_uiSpawnedCreatureEntry); + + if (!spawnedTemplate) + { + m_pSpawnAssoc = NULL; + error_db_log("SD2: Creature template entry %u does not exist in DB, which is required by npc_air_force_bots", m_pSpawnAssoc->m_uiSpawnedCreatureEntry); + return; + } + } + } + + SpawnAssociation* m_pSpawnAssoc; + uint64 m_uiSpawnedGUID; + + void Reset() { } + + Creature* SummonGuard() + { + Creature* pSummoned = m_creature->SummonCreature(m_pSpawnAssoc->m_uiSpawnedCreatureEntry, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 300000); + + if (pSummoned) + m_uiSpawnedGUID = pSummoned->GetGUID(); + else + { + error_db_log("SD2: npc_air_force_bots: wasn't able to spawn creature %u", m_pSpawnAssoc->m_uiSpawnedCreatureEntry); + m_pSpawnAssoc = NULL; + } + + return pSummoned; + } + + Creature* GetSummonedGuard() + { + Creature* pCreature = (Creature*)Unit::GetUnit(*m_creature, m_uiSpawnedGUID); + + if (pCreature && pCreature->isAlive()) + return pCreature; + + return NULL; + } + + void MoveInLineOfSight(Unit* pWho) + { + if (!m_pSpawnAssoc) + return; + + if (pWho->isTargetableForAttack() && m_creature->IsHostileTo(pWho)) + { + Player* pPlayerTarget = pWho->GetTypeId() == TYPEID_PLAYER ? (Player*)pWho : NULL; + + // airforce guards only spawn for players + if (!pPlayerTarget) + return; + + Creature* pLastSpawnedGuard = m_uiSpawnedGUID == 0 ? NULL : GetSummonedGuard(); + + // prevent calling Unit::GetUnit at next MoveInLineOfSight call - speedup + if (!pLastSpawnedGuard) + m_uiSpawnedGUID = 0; + + switch(m_pSpawnAssoc->m_SpawnType) + { + case SPAWNTYPE_ALARMBOT: + { + if (!pWho->IsWithinDistInMap(m_creature, RANGE_GUARDS_MARK)) + return; + + Aura* pMarkAura = pWho->GetAura(SPELL_GUARDS_MARK, 0); + if (pMarkAura) + { + // the target wasn't able to move out of our range within 25 seconds + if (!pLastSpawnedGuard) + { + pLastSpawnedGuard = SummonGuard(); + + if (!pLastSpawnedGuard) + return; + } + + if (pMarkAura->GetAuraDuration() < AURA_DURATION_TIME_LEFT) + { + if (!pLastSpawnedGuard->getVictim()) + pLastSpawnedGuard->AI()->AttackStart(pWho); + } + } + else + { + if (!pLastSpawnedGuard) + pLastSpawnedGuard = SummonGuard(); + + if (!pLastSpawnedGuard) + return; + + pLastSpawnedGuard->CastSpell(pWho, SPELL_GUARDS_MARK, true); + } + break; + } + case SPAWNTYPE_TRIPWIRE_ROOFTOP: + { + if (!pWho->IsWithinDistInMap(m_creature, RANGE_TRIPWIRE)) + return; + + if (!pLastSpawnedGuard) + pLastSpawnedGuard = SummonGuard(); + + if (!pLastSpawnedGuard) + return; + + // ROOFTOP only triggers if the player is on the ground + if (!pPlayerTarget->IsFlying()) + { + if (!pLastSpawnedGuard->getVictim()) + pLastSpawnedGuard->AI()->AttackStart(pWho); + } + break; + } + } + } + } +}; + +CreatureAI* GetAI_npc_air_force_bots(Creature* pCreature) +{ + return new npc_air_force_botsAI(pCreature); +} + +/*######## +# npc_chicken_cluck +#########*/ + +enum +{ + EMOTE_A_HELLO = -1000204, + EMOTE_H_HELLO = -1000205, + EMOTE_CLUCK_TEXT2 = -1000206, + + QUEST_CLUCK = 3861, + FACTION_FRIENDLY = 35, + FACTION_CHICKEN = 31 +}; + +struct MANGOS_DLL_DECL npc_chicken_cluckAI : public ScriptedAI +{ + npc_chicken_cluckAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 m_uiResetFlagTimer; + + void Reset() + { + m_uiResetFlagTimer = 120000; + + m_creature->setFaction(FACTION_CHICKEN); + m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + } + + void ReceiveEmote(Player* pPlayer, uint32 uiEmote) + { + if (uiEmote == TEXTEMOTE_CHICKEN) + { + if (!urand(0, 29)) + { + if (pPlayer->GetQuestStatus(QUEST_CLUCK) == QUEST_STATUS_NONE) + { + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + m_creature->setFaction(FACTION_FRIENDLY); + + DoScriptText(EMOTE_A_HELLO, m_creature); + + /* are there any difference in texts, after 3.x ? + if (pPlayer->GetTeam() == HORDE) + DoScriptText(EMOTE_H_HELLO, m_creature); + else + DoScriptText(EMOTE_A_HELLO, m_creature); + */ + } + } + } + + if (uiEmote == TEXTEMOTE_CHEER) + { + if (pPlayer->GetQuestStatus(QUEST_CLUCK) == QUEST_STATUS_COMPLETE) + { + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + m_creature->setFaction(FACTION_FRIENDLY); + DoScriptText(EMOTE_CLUCK_TEXT2, m_creature); + } + } + } + + void UpdateAI(const uint32 uiDiff) + { + // Reset flags after a certain time has passed so that the next player has to start the 'event' again + if (m_creature->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER)) + { + if (m_uiResetFlagTimer < uiDiff) + EnterEvadeMode(); + else + m_uiResetFlagTimer -= uiDiff; + } + + if (m_creature->SelectHostileTarget() && m_creature->getVictim()) + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_chicken_cluck(Creature* pCreature) +{ + return new npc_chicken_cluckAI(pCreature); +} + +bool QuestAccept_npc_chicken_cluck(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_CLUCK) + { + if (npc_chicken_cluckAI* pChickenAI = dynamic_cast(pCreature->AI())) + pChickenAI->Reset(); + } + + return true; +} + +bool QuestComplete_npc_chicken_cluck(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_CLUCK) + { + if (npc_chicken_cluckAI* pChickenAI = dynamic_cast(pCreature->AI())) + pChickenAI->Reset(); + } + + return true; +} + +/*###### +## npc_dancing_flames +######*/ + +struct MANGOS_DLL_DECL npc_dancing_flamesAI : public ScriptedAI +{ + npc_dancing_flamesAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + void Reset() {} + + void ReceiveEmote(Player* pPlayer, uint32 emote) + { + if (emote == TEXTEMOTE_DANCE) + m_creature->CastSpell(pPlayer,47057,false); + } +}; + +CreatureAI* GetAI_npc_dancing_flames(Creature* pCreature) +{ + return new npc_dancing_flamesAI(pCreature); +} + +/*###### +## Triage quest +######*/ + +#define SAY_DOC1 -1000201 +#define SAY_DOC2 -1000202 +#define SAY_DOC3 -1000203 + +#define DOCTOR_ALLIANCE 12939 +#define DOCTOR_HORDE 12920 +#define ALLIANCE_COORDS 7 +#define HORDE_COORDS 6 + +struct Location +{ + float x, y, z, o; +}; + +static Location AllianceCoords[]= +{ + {-3757.38, -4533.05, 14.16, 3.62}, // Top-far-right bunk as seen from entrance + {-3754.36, -4539.13, 14.16, 5.13}, // Top-far-left bunk + {-3749.54, -4540.25, 14.28, 3.34}, // Far-right bunk + {-3742.10, -4536.85, 14.28, 3.64}, // Right bunk near entrance + {-3755.89, -4529.07, 14.05, 0.57}, // Far-left bunk + {-3749.51, -4527.08, 14.07, 5.26}, // Mid-left bunk + {-3746.37, -4525.35, 14.16, 5.22}, // Left bunk near entrance +}; + +//alliance run to where +#define A_RUNTOX -3742.96 +#define A_RUNTOY -4531.52 +#define A_RUNTOZ 11.91 + +static Location HordeCoords[]= +{ + {-1013.75, -3492.59, 62.62, 4.34}, // Left, Behind + {-1017.72, -3490.92, 62.62, 4.34}, // Right, Behind + {-1015.77, -3497.15, 62.82, 4.34}, // Left, Mid + {-1019.51, -3495.49, 62.82, 4.34}, // Right, Mid + {-1017.25, -3500.85, 62.98, 4.34}, // Left, front + {-1020.95, -3499.21, 62.98, 4.34} // Right, Front +}; + +//horde run to where +#define H_RUNTOX -1016.44 +#define H_RUNTOY -3508.48 +#define H_RUNTOZ 62.96 + +const uint32 AllianceSoldierId[3] = +{ + 12938, // 12938 Injured Alliance Soldier + 12936, // 12936 Badly injured Alliance Soldier + 12937 // 12937 Critically injured Alliance Soldier +}; + +const uint32 HordeSoldierId[3] = +{ + 12923, //12923 Injured Soldier + 12924, //12924 Badly injured Soldier + 12925 //12925 Critically injured Soldier +}; + +/*###### +## npc_doctor (handles both Gustaf Vanhowzen and Gregory Victor) +######*/ + +struct MANGOS_DLL_DECL npc_doctorAI : public ScriptedAI +{ + npc_doctorAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint64 Playerguid; + + uint32 SummonPatient_Timer; + uint32 SummonPatientCount; + uint32 PatientDiedCount; + uint32 PatientSavedCount; + + bool Event; + + std::list Patients; + std::vector Coordinates; + + void Reset() + { + Playerguid = 0; + + SummonPatient_Timer = 10000; + SummonPatientCount = 0; + PatientDiedCount = 0; + PatientSavedCount = 0; + + Patients.clear(); + Coordinates.clear(); + + Event = false; + + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } + + void BeginEvent(Player* pPlayer); + void PatientDied(Location* Point); + void PatientSaved(Creature* soldier, Player* pPlayer, Location* Point); + void UpdateAI(const uint32 diff); +}; + +/*##### +## npc_injured_patient (handles all the patients, no matter Horde or Alliance) +#####*/ + +struct MANGOS_DLL_DECL npc_injured_patientAI : public ScriptedAI +{ + npc_injured_patientAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint64 Doctorguid; + Location* Coord; + + void Reset() + { + Doctorguid = 0; + Coord = NULL; + + //no select + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + //no regen health + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT); + //to make them lay with face down + m_creature->SetStandState(UNIT_STAND_STATE_DEAD); + + uint32 mobId = m_creature->GetEntry(); + + switch (mobId) + { //lower max health + case 12923: + case 12938: //Injured Soldier + m_creature->SetHealth(uint32(m_creature->GetMaxHealth()*.75)); + break; + case 12924: + case 12936: //Badly injured Soldier + m_creature->SetHealth(uint32(m_creature->GetMaxHealth()*.50)); + break; + case 12925: + case 12937: //Critically injured Soldier + m_creature->SetHealth(uint32(m_creature->GetMaxHealth()*.25)); + break; + } + } + + void SpellHit(Unit *caster, const SpellEntry *spell) + { + if (caster->GetTypeId() == TYPEID_PLAYER && m_creature->isAlive() && spell->Id == 20804) + { + if ((((Player*)caster)->GetQuestStatus(6624) == QUEST_STATUS_INCOMPLETE) || (((Player*)caster)->GetQuestStatus(6622) == QUEST_STATUS_INCOMPLETE)) + { + if (Doctorguid) + { + if (Creature* Doctor = ((Creature*)Unit::GetUnit((*m_creature), Doctorguid))) + ((npc_doctorAI*)Doctor->AI())->PatientSaved(m_creature, ((Player*)caster), Coord); + } + } + //make not selectable + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + //regen health + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT); + //stand up + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_DOC1,m_creature); break; + case 1: DoScriptText(SAY_DOC2,m_creature); break; + case 2: DoScriptText(SAY_DOC3,m_creature); break; + } + + m_creature->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + + uint32 mobId = m_creature->GetEntry(); + + switch (mobId) + { + case 12923: + case 12924: + case 12925: + m_creature->GetMotionMaster()->MovePoint(0, H_RUNTOX, H_RUNTOY, H_RUNTOZ); + break; + case 12936: + case 12937: + case 12938: + m_creature->GetMotionMaster()->MovePoint(0, A_RUNTOX, A_RUNTOY, A_RUNTOZ); + break; + } + } + } + + void UpdateAI(const uint32 diff) + { + //lower HP on every world tick makes it a useful counter, not officlone though + if (m_creature->isAlive() && m_creature->GetHealth() > 6) + { + m_creature->SetHealth(uint32(m_creature->GetHealth()-5)); + } + + if (m_creature->isAlive() && m_creature->GetHealth() <= 6) + { + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->setDeathState(JUST_DIED); + m_creature->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD); + + if (Doctorguid) + { + if (Creature* Doctor = ((Creature*)Unit::GetUnit((*m_creature), Doctorguid))) + ((npc_doctorAI*)Doctor->AI())->PatientDied(Coord); + } + } + } +}; + +CreatureAI* GetAI_npc_injured_patient(Creature* pCreature) +{ + return new npc_injured_patientAI(pCreature); +} + +/* +npc_doctor (continue) +*/ + +void npc_doctorAI::BeginEvent(Player* pPlayer) +{ + Playerguid = pPlayer->GetGUID(); + + SummonPatient_Timer = 10000; + SummonPatientCount = 0; + PatientDiedCount = 0; + PatientSavedCount = 0; + + switch(m_creature->GetEntry()) + { + case DOCTOR_ALLIANCE: + for(uint8 i = 0; i < ALLIANCE_COORDS; ++i) + Coordinates.push_back(&AllianceCoords[i]); + break; + case DOCTOR_HORDE: + for(uint8 i = 0; i < HORDE_COORDS; ++i) + Coordinates.push_back(&HordeCoords[i]); + break; + } + + Event = true; + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); +} + +void npc_doctorAI::PatientDied(Location* Point) +{ + Player* pPlayer = ((Player*)Unit::GetUnit((*m_creature), Playerguid)); + + if (pPlayer && ((pPlayer->GetQuestStatus(6624) == QUEST_STATUS_INCOMPLETE) || (pPlayer->GetQuestStatus(6622) == QUEST_STATUS_INCOMPLETE))) + { + ++PatientDiedCount; + + if (PatientDiedCount > 5 && Event) + { + if (pPlayer->GetQuestStatus(6624) == QUEST_STATUS_INCOMPLETE) + pPlayer->FailQuest(6624); + else if (pPlayer->GetQuestStatus(6622) == QUEST_STATUS_INCOMPLETE) + pPlayer->FailQuest(6622); + + Reset(); + return; + } + + Coordinates.push_back(Point); + } + else + // If no player or player abandon quest in progress + Reset(); +} + +void npc_doctorAI::PatientSaved(Creature* soldier, Player* pPlayer, Location* Point) +{ + if (pPlayer && Playerguid == pPlayer->GetGUID()) + { + if ((pPlayer->GetQuestStatus(6624) == QUEST_STATUS_INCOMPLETE) || (pPlayer->GetQuestStatus(6622) == QUEST_STATUS_INCOMPLETE)) + { + ++PatientSavedCount; + + if (PatientSavedCount == 15) + { + if (!Patients.empty()) + { + std::list::iterator itr; + for(itr = Patients.begin(); itr != Patients.end(); ++itr) + { + if (Creature* Patient = ((Creature*)Unit::GetUnit((*m_creature), *itr))) + Patient->setDeathState(JUST_DIED); + } + } + + if (pPlayer->GetQuestStatus(6624) == QUEST_STATUS_INCOMPLETE) + pPlayer->AreaExploredOrEventHappens(6624); + else if (pPlayer->GetQuestStatus(6622) == QUEST_STATUS_INCOMPLETE) + pPlayer->AreaExploredOrEventHappens(6622); + + Reset(); + return; + } + + Coordinates.push_back(Point); + } + } +} + +void npc_doctorAI::UpdateAI(const uint32 diff) +{ + if (Event && SummonPatientCount >= 20) + { + Reset(); + return; + } + + if (Event) + { + if (SummonPatient_Timer < diff) + { + Creature* Patient = NULL; + Location* Point = NULL; + + if (Coordinates.empty()) + return; + + std::vector::iterator itr = Coordinates.begin()+rand()%Coordinates.size(); + uint32 patientEntry = 0; + + switch(m_creature->GetEntry()) + { + case DOCTOR_ALLIANCE: patientEntry = AllianceSoldierId[urand(0, 2)]; break; + case DOCTOR_HORDE: patientEntry = HordeSoldierId[urand(0, 2)]; break; + default: + error_log("SD2: Invalid entry for Triage doctor. Please check your database"); + return; + } + + Point = *itr; + + Patient = m_creature->SummonCreature(patientEntry, Point->x, Point->y, Point->z, Point->o, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + + if (Patient) + { + //303, this flag appear to be required for client side item->spell to work (TARGET_SINGLE_FRIEND) + Patient->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE); + + Patients.push_back(Patient->GetGUID()); + ((npc_injured_patientAI*)Patient->AI())->Doctorguid = m_creature->GetGUID(); + + if (Point) + ((npc_injured_patientAI*)Patient->AI())->Coord = Point; + + Coordinates.erase(itr); + } + SummonPatient_Timer = 10000; + ++SummonPatientCount; + }else SummonPatient_Timer -= diff; + } +} + +bool QuestAccept_npc_doctor(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if ((pQuest->GetQuestId() == 6624) || (pQuest->GetQuestId() == 6622)) + ((npc_doctorAI*)pCreature->AI())->BeginEvent(pPlayer); + + return true; +} + +CreatureAI* GetAI_npc_doctor(Creature* pCreature) +{ + return new npc_doctorAI(pCreature); +} + +/*###### +## npc_garments_of_quests +######*/ + +//TODO: get text for each NPC + +enum +{ + SPELL_LESSER_HEAL_R2 = 2052, + SPELL_FORTITUDE_R1 = 1243, + + QUEST_MOON = 5621, + QUEST_LIGHT_1 = 5624, + QUEST_LIGHT_2 = 5625, + QUEST_SPIRIT = 5648, + QUEST_DARKNESS = 5650, + + ENTRY_SHAYA = 12429, + ENTRY_ROBERTS = 12423, + ENTRY_DOLF = 12427, + ENTRY_KORJA = 12430, + ENTRY_DG_KEL = 12428, + + SAY_COMMON_HEALED = -1000231, + SAY_DG_KEL_THANKS = -1000232, + SAY_DG_KEL_GOODBYE = -1000233, + SAY_ROBERTS_THANKS = -1000256, + SAY_ROBERTS_GOODBYE = -1000257, + SAY_KORJA_THANKS = -1000258, + SAY_KORJA_GOODBYE = -1000259, + SAY_DOLF_THANKS = -1000260, + SAY_DOLF_GOODBYE = -1000261, + SAY_SHAYA_THANKS = -1000262, + SAY_SHAYA_GOODBYE = -1000263, +}; + +struct MANGOS_DLL_DECL npc_garments_of_questsAI : public npc_escortAI +{ + npc_garments_of_questsAI(Creature* pCreature) : npc_escortAI(pCreature) {Reset();} + + uint64 caster; + + bool bIsHealed; + bool bCanRun; + + uint32 RunAwayTimer; + + void Reset() + { + caster = 0; + + bIsHealed = false; + bCanRun = false; + + RunAwayTimer = 5000; + + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + //expect database to have RegenHealth=0 + m_creature->SetHealth(int(m_creature->GetMaxHealth()*0.7)); + } + + void SpellHit(Unit* pCaster, const SpellEntry *Spell) + { + if (Spell->Id == SPELL_LESSER_HEAL_R2 || Spell->Id == SPELL_FORTITUDE_R1) + { + //not while in combat + if (m_creature->isInCombat()) + return; + + //nothing to be done now + if (bIsHealed && bCanRun) + return; + + if (pCaster->GetTypeId() == TYPEID_PLAYER) + { + switch(m_creature->GetEntry()) + { + case ENTRY_SHAYA: + if (((Player*)pCaster)->GetQuestStatus(QUEST_MOON) == QUEST_STATUS_INCOMPLETE) + { + if (bIsHealed && !bCanRun && Spell->Id == SPELL_FORTITUDE_R1) + { + DoScriptText(SAY_SHAYA_THANKS,m_creature,pCaster); + bCanRun = true; + } + else if (!bIsHealed && Spell->Id == SPELL_LESSER_HEAL_R2) + { + caster = pCaster->GetGUID(); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + DoScriptText(SAY_COMMON_HEALED,m_creature,pCaster); + bIsHealed = true; + } + } + break; + case ENTRY_ROBERTS: + if (((Player*)pCaster)->GetQuestStatus(QUEST_LIGHT_1) == QUEST_STATUS_INCOMPLETE) + { + if (bIsHealed && !bCanRun && Spell->Id == SPELL_FORTITUDE_R1) + { + DoScriptText(SAY_ROBERTS_THANKS,m_creature,pCaster); + bCanRun = true; + } + else if (!bIsHealed && Spell->Id == SPELL_LESSER_HEAL_R2) + { + caster = pCaster->GetGUID(); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + DoScriptText(SAY_COMMON_HEALED,m_creature,pCaster); + bIsHealed = true; + } + } + break; + case ENTRY_DOLF: + if (((Player*)pCaster)->GetQuestStatus(QUEST_LIGHT_2) == QUEST_STATUS_INCOMPLETE) + { + if (bIsHealed && !bCanRun && Spell->Id == SPELL_FORTITUDE_R1) + { + DoScriptText(SAY_DOLF_THANKS,m_creature,pCaster); + bCanRun = true; + } + else if (!bIsHealed && Spell->Id == SPELL_LESSER_HEAL_R2) + { + caster = pCaster->GetGUID(); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + DoScriptText(SAY_COMMON_HEALED,m_creature,pCaster); + bIsHealed = true; + } + } + break; + case ENTRY_KORJA: + if (((Player*)pCaster)->GetQuestStatus(QUEST_SPIRIT) == QUEST_STATUS_INCOMPLETE) + { + if (bIsHealed && !bCanRun && Spell->Id == SPELL_FORTITUDE_R1) + { + DoScriptText(SAY_KORJA_THANKS,m_creature,pCaster); + bCanRun = true; + } + else if (!bIsHealed && Spell->Id == SPELL_LESSER_HEAL_R2) + { + caster = pCaster->GetGUID(); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + DoScriptText(SAY_COMMON_HEALED,m_creature,pCaster); + bIsHealed = true; + } + } + break; + case ENTRY_DG_KEL: + if (((Player*)pCaster)->GetQuestStatus(QUEST_DARKNESS) == QUEST_STATUS_INCOMPLETE) + { + if (bIsHealed && !bCanRun && Spell->Id == SPELL_FORTITUDE_R1) + { + DoScriptText(SAY_DG_KEL_THANKS,m_creature,pCaster); + bCanRun = true; + } + else if (!bIsHealed && Spell->Id == SPELL_LESSER_HEAL_R2) + { + caster = pCaster->GetGUID(); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + DoScriptText(SAY_COMMON_HEALED,m_creature,pCaster); + bIsHealed = true; + } + } + break; + } + + //give quest credit, not expect any special quest objectives + if (bCanRun) + ((Player*)pCaster)->TalkedToCreature(m_creature->GetEntry(),m_creature->GetGUID()); + } + } + } + + void WaypointReached(uint32 uiPoint) + { + } + + void UpdateEscortAI(const uint32 diff) + { + if (bCanRun && !m_creature->isInCombat()) + { + if (RunAwayTimer <= diff) + { + if (Unit *pUnit = Unit::GetUnit(*m_creature,caster)) + { + switch(m_creature->GetEntry()) + { + case ENTRY_SHAYA: DoScriptText(SAY_SHAYA_GOODBYE,m_creature,pUnit); break; + case ENTRY_ROBERTS: DoScriptText(SAY_ROBERTS_GOODBYE,m_creature,pUnit); break; + case ENTRY_DOLF: DoScriptText(SAY_DOLF_GOODBYE,m_creature,pUnit); break; + case ENTRY_KORJA: DoScriptText(SAY_KORJA_GOODBYE,m_creature,pUnit); break; + case ENTRY_DG_KEL: DoScriptText(SAY_DG_KEL_GOODBYE,m_creature,pUnit); break; + } + + Start(false,true); + } + else + EnterEvadeMode(); //something went wrong + + RunAwayTimer = 30000; + }else RunAwayTimer -= diff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_garments_of_quests(Creature* pCreature) +{ + return new npc_garments_of_questsAI(pCreature); +} + +/*###### +## npc_guardian +######*/ + +#define SPELL_DEATHTOUCH 5 + +struct MANGOS_DLL_DECL npc_guardianAI : public ScriptedAI +{ + npc_guardianAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + void Reset() + { + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_creature->isAttackReady()) + { + m_creature->CastSpell(m_creature->getVictim(),SPELL_DEATHTOUCH, true); + m_creature->resetAttackTimer(); + } + } +}; + +CreatureAI* GetAI_npc_guardian(Creature* pCreature) +{ + return new npc_guardianAI(pCreature); +} + +/*###### +## npc_kingdom_of_dalaran_quests +######*/ + +enum +{ + SPELL_TELEPORT_DALARAN = 53360, + ITEM_KT_SIGNET = 39740, + QUEST_MAGICAL_KINGDOM_A = 12794, + QUEST_MAGICAL_KINGDOM_H = 12791, + QUEST_MAGICAL_KINGDOM_N = 12796 +}; + +#define GOSSIP_ITEM_TELEPORT_TO "I am ready to be teleported to Dalaran." + +bool GossipHello_npc_kingdom_of_dalaran_quests(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->HasItemCount(ITEM_KT_SIGNET,1) && (!pPlayer->GetQuestRewardStatus(QUEST_MAGICAL_KINGDOM_A) || + !pPlayer->GetQuestRewardStatus(QUEST_MAGICAL_KINGDOM_H) || !pPlayer->GetQuestRewardStatus(QUEST_MAGICAL_KINGDOM_N))) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TELEPORT_TO, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_kingdom_of_dalaran_quests(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->CastSpell(pPlayer,SPELL_TELEPORT_DALARAN,false); + } + return true; +} + +/*###### +## npc_lunaclaw_spirit +######*/ + +enum +{ + QUEST_BODY_HEART_A = 6001, + QUEST_BODY_HEART_H = 6002, + + TEXT_ID_DEFAULT = 4714, + TEXT_ID_PROGRESS = 4715 +}; + +#define GOSSIP_ITEM_GRANT "You have thought well, spirit. I ask you to grant me the strength of your body and the strength of your heart." + +bool GossipHello_npc_lunaclaw_spirit(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->GetQuestStatus(QUEST_BODY_HEART_A) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(QUEST_BODY_HEART_H) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_GRANT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_DEFAULT, pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_lunaclaw_spirit(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_PROGRESS, pCreature->GetGUID()); + pPlayer->AreaExploredOrEventHappens((pPlayer->getRace() == ALLIANCE) ? QUEST_BODY_HEART_A : QUEST_BODY_HEART_H); + } + return true; +} + +/*###### +## npc_mount_vendor +######*/ + +bool GossipHello_npc_mount_vendor(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + bool canBuy; + canBuy = false; + uint32 vendor = pCreature->GetEntry(); + uint8 race = pPlayer->getRace(); + + switch (vendor) + { + case 384: //Katie Hunter + case 1460: //Unger Statforth + case 2357: //Merideth Carlson + case 4885: //Gregor MacVince + if (pPlayer->GetReputationRank(72) != REP_EXALTED && race != RACE_HUMAN) + pPlayer->SEND_GOSSIP_MENU(5855, pCreature->GetGUID()); + else canBuy = true; + break; + case 1261: //Veron Amberstill + if (pPlayer->GetReputationRank(47) != REP_EXALTED && race != RACE_DWARF) + pPlayer->SEND_GOSSIP_MENU(5856, pCreature->GetGUID()); + else canBuy = true; + break; + case 3362: //Ogunaro Wolfrunner + if (pPlayer->GetReputationRank(76) != REP_EXALTED && race != RACE_ORC) + pPlayer->SEND_GOSSIP_MENU(5841, pCreature->GetGUID()); + else canBuy = true; + break; + case 3685: //Harb Clawhoof + if (pPlayer->GetReputationRank(81) != REP_EXALTED && race != RACE_TAUREN) + pPlayer->SEND_GOSSIP_MENU(5843, pCreature->GetGUID()); + else canBuy = true; + break; + case 4730: //Lelanai + if (pPlayer->GetReputationRank(69) != REP_EXALTED && race != RACE_NIGHTELF) + pPlayer->SEND_GOSSIP_MENU(5844, pCreature->GetGUID()); + else canBuy = true; + break; + case 4731: //Zachariah Post + if (pPlayer->GetReputationRank(68) != REP_EXALTED && race != RACE_UNDEAD_PLAYER) + pPlayer->SEND_GOSSIP_MENU(5840, pCreature->GetGUID()); + else canBuy = true; + break; + case 7952: //Zjolnir + if (pPlayer->GetReputationRank(530) != REP_EXALTED && race != RACE_TROLL) + pPlayer->SEND_GOSSIP_MENU(5842, pCreature->GetGUID()); + else canBuy = true; + break; + case 7955: //Milli Featherwhistle + if (pPlayer->GetReputationRank(54) != REP_EXALTED && race != RACE_GNOME) + pPlayer->SEND_GOSSIP_MENU(5857, pCreature->GetGUID()); + else canBuy = true; + break; + case 16264: //Winaestra + if (pPlayer->GetReputationRank(911) != REP_EXALTED && race != RACE_BLOODELF) + pPlayer->SEND_GOSSIP_MENU(10305, pCreature->GetGUID()); + else canBuy = true; + break; + case 17584: //Torallius the Pack Handler + if (pPlayer->GetReputationRank(930) != REP_EXALTED && race != RACE_DRAENEI) + pPlayer->SEND_GOSSIP_MENU(10239, pCreature->GetGUID()); + else canBuy = true; + break; + } + + if (canBuy) + { + if (pCreature->isVendor()) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + } + return true; +} + +bool GossipSelect_npc_mount_vendor(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_TRADE) + pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + + return true; +} + +/*###### +## npc_rogue_trainer +######*/ + +bool GossipHello_npc_rogue_trainer(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pCreature->isTrainer()) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_TEXT_TRAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRAIN); + + if (pCreature->isCanTrainingAndResetTalentsOf(pPlayer)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, "I wish to unlearn my talents", GOSSIP_SENDER_MAIN, GOSSIP_OPTION_UNLEARNTALENTS); + + if (pPlayer->getClass() == CLASS_ROGUE && pPlayer->getLevel() >= 24 && !pPlayer->HasItemCount(17126,1) && !pPlayer->GetQuestRewardStatus(6681)) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(5996, pCreature->GetGUID()); + } else + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_rogue_trainer(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->CastSpell(pPlayer,21100,false); + break; + case GOSSIP_ACTION_TRAIN: + pPlayer->SEND_TRAINERLIST(pCreature->GetGUID()); + break; + case GOSSIP_OPTION_UNLEARNTALENTS: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->SendTalentWipeConfirm(pCreature->GetGUID()); + break; + } + return true; +} + +/*###### +## npc_sayge +######*/ + +#define SPELL_DMG 23768 //dmg +#define SPELL_RES 23769 //res +#define SPELL_ARM 23767 //arm +#define SPELL_SPI 23738 //spi +#define SPELL_INT 23766 //int +#define SPELL_STM 23737 //stm +#define SPELL_STR 23735 //str +#define SPELL_AGI 23736 //agi +#define SPELL_FORTUNE 23765 //faire fortune + +bool GossipHello_npc_sayge(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->HasSpellCooldown(SPELL_INT) || + pPlayer->HasSpellCooldown(SPELL_ARM) || + pPlayer->HasSpellCooldown(SPELL_DMG) || + pPlayer->HasSpellCooldown(SPELL_RES) || + pPlayer->HasSpellCooldown(SPELL_STR) || + pPlayer->HasSpellCooldown(SPELL_AGI) || + pPlayer->HasSpellCooldown(SPELL_STM) || + pPlayer->HasSpellCooldown(SPELL_SPI)) + pPlayer->SEND_GOSSIP_MENU(7393, pCreature->GetGUID()); + else + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Yes", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(7339, pCreature->GetGUID()); + } + + return true; +} + +void SendAction_npc_sayge(Player* pPlayer, Creature* pCreature, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Slay the Man", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Turn him over to liege", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Confiscate the corn", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Let him go and have the corn", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); + pPlayer->SEND_GOSSIP_MENU(7340, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Execute your friend painfully", GOSSIP_SENDER_MAIN+1, GOSSIP_ACTION_INFO_DEF); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Execute your friend painlessly", GOSSIP_SENDER_MAIN+2, GOSSIP_ACTION_INFO_DEF); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Let your friend go", GOSSIP_SENDER_MAIN+3, GOSSIP_ACTION_INFO_DEF); + pPlayer->SEND_GOSSIP_MENU(7341, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+3: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Confront the diplomat", GOSSIP_SENDER_MAIN+4, GOSSIP_ACTION_INFO_DEF); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Show not so quiet defiance", GOSSIP_SENDER_MAIN+5, GOSSIP_ACTION_INFO_DEF); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Remain quiet", GOSSIP_SENDER_MAIN+2, GOSSIP_ACTION_INFO_DEF); + pPlayer->SEND_GOSSIP_MENU(7361, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+4: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Speak against your brother openly", GOSSIP_SENDER_MAIN+6, GOSSIP_ACTION_INFO_DEF); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Help your brother in", GOSSIP_SENDER_MAIN+7, GOSSIP_ACTION_INFO_DEF); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Keep your brother out without letting him know", GOSSIP_SENDER_MAIN+8, GOSSIP_ACTION_INFO_DEF); + pPlayer->SEND_GOSSIP_MENU(7362, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+5: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Take credit, keep gold", GOSSIP_SENDER_MAIN+5, GOSSIP_ACTION_INFO_DEF); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Take credit, share the gold", GOSSIP_SENDER_MAIN+4, GOSSIP_ACTION_INFO_DEF); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Let the knight take credit", GOSSIP_SENDER_MAIN+3, GOSSIP_ACTION_INFO_DEF); + pPlayer->SEND_GOSSIP_MENU(7363, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Thanks", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6); + pPlayer->SEND_GOSSIP_MENU(7364, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+6: + pCreature->CastSpell(pPlayer, SPELL_FORTUNE, false); + pPlayer->SEND_GOSSIP_MENU(7365, pCreature->GetGUID()); + break; + } +} + +bool GossipSelect_npc_sayge(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiSender) + { + case GOSSIP_SENDER_MAIN: + SendAction_npc_sayge(pPlayer, pCreature, uiAction); + break; + case GOSSIP_SENDER_MAIN+1: + pCreature->CastSpell(pPlayer, SPELL_DMG, false); + pPlayer->AddSpellCooldown(SPELL_DMG,0,time(NULL) + 7200); + SendAction_npc_sayge(pPlayer, pCreature, uiAction); + break; + case GOSSIP_SENDER_MAIN+2: + pCreature->CastSpell(pPlayer, SPELL_RES, false); + pPlayer->AddSpellCooldown(SPELL_RES,0,time(NULL) + 7200); + SendAction_npc_sayge(pPlayer, pCreature, uiAction); + break; + case GOSSIP_SENDER_MAIN+3: + pCreature->CastSpell(pPlayer, SPELL_ARM, false); + pPlayer->AddSpellCooldown(SPELL_ARM,0,time(NULL) + 7200); + SendAction_npc_sayge(pPlayer, pCreature, uiAction); + break; + case GOSSIP_SENDER_MAIN+4: + pCreature->CastSpell(pPlayer, SPELL_SPI, false); + pPlayer->AddSpellCooldown(SPELL_SPI,0,time(NULL) + 7200); + SendAction_npc_sayge(pPlayer, pCreature, uiAction); + break; + case GOSSIP_SENDER_MAIN+5: + pCreature->CastSpell(pPlayer, SPELL_INT, false); + pPlayer->AddSpellCooldown(SPELL_INT,0,time(NULL) + 7200); + SendAction_npc_sayge(pPlayer, pCreature, uiAction); + break; + case GOSSIP_SENDER_MAIN+6: + pCreature->CastSpell(pPlayer, SPELL_STM, false); + pPlayer->AddSpellCooldown(SPELL_STM,0,time(NULL) + 7200); + SendAction_npc_sayge(pPlayer, pCreature, uiAction); + break; + case GOSSIP_SENDER_MAIN+7: + pCreature->CastSpell(pPlayer, SPELL_STR, false); + pPlayer->AddSpellCooldown(SPELL_STR,0,time(NULL) + 7200); + SendAction_npc_sayge(pPlayer, pCreature, uiAction); + break; + case GOSSIP_SENDER_MAIN+8: + pCreature->CastSpell(pPlayer, SPELL_AGI, false); + pPlayer->AddSpellCooldown(SPELL_AGI,0,time(NULL) + 7200); + SendAction_npc_sayge(pPlayer, pCreature, uiAction); + break; + } + return true; +} + +void AddSC_npcs_special() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_air_force_bots"; + newscript->GetAI = &GetAI_npc_air_force_bots; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_chicken_cluck"; + newscript->GetAI = &GetAI_npc_chicken_cluck; + newscript->pQuestAccept = &QuestAccept_npc_chicken_cluck; + newscript->pQuestComplete = &QuestComplete_npc_chicken_cluck; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_dancing_flames"; + newscript->GetAI = &GetAI_npc_dancing_flames; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_injured_patient"; + newscript->GetAI = &GetAI_npc_injured_patient; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_doctor"; + newscript->GetAI = &GetAI_npc_doctor; + newscript->pQuestAccept = &QuestAccept_npc_doctor; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_garments_of_quests"; + newscript->GetAI = &GetAI_npc_garments_of_quests; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_guardian"; + newscript->GetAI = &GetAI_npc_guardian; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_kingdom_of_dalaran_quests"; + newscript->pGossipHello = &GossipHello_npc_kingdom_of_dalaran_quests; + newscript->pGossipSelect = &GossipSelect_npc_kingdom_of_dalaran_quests; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_lunaclaw_spirit"; + newscript->pGossipHello = &GossipHello_npc_lunaclaw_spirit; + newscript->pGossipSelect = &GossipSelect_npc_lunaclaw_spirit; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_mount_vendor"; + newscript->pGossipHello = &GossipHello_npc_mount_vendor; + newscript->pGossipSelect = &GossipSelect_npc_mount_vendor; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_rogue_trainer"; + newscript->pGossipHello = &GossipHello_npc_rogue_trainer; + newscript->pGossipSelect = &GossipSelect_npc_rogue_trainer; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_sayge"; + newscript->pGossipHello = &GossipHello_npc_sayge; + newscript->pGossipSelect = &GossipSelect_npc_sayge; + newscript->RegisterSelf(); +} diff --git a/sql/Makefile.am b/sql/Makefile.am new file mode 100644 index 000000000..7a664de98 --- /dev/null +++ b/sql/Makefile.am @@ -0,0 +1,32 @@ +# Copyright (C) 2005-2009 MaNGOS +# +# 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, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +## Process this file with automake to produce Makefile.in + +## Sub-directories to parse +SUBDIRS = Updates + +## Change installation location +# datadir = scriptdev2/sql +pkgdatadir = $(datadir)/scriptdev2/sql + +## Files to be installed +# Install basic SQL files to datadir +pkgdata_DATA = \ + mangos_scriptname_full.sql \ + scriptdev2_create_database.sql \ + scriptdev2_create_structure_mysql.sql \ + scriptdev2_create_structure_pgsql.sql \ + scriptdev2_script_full.sql diff --git a/sql/Updates/0.0.1/09_BraveWindfeather.sql b/sql/Updates/0.0.1/09_BraveWindfeather.sql new file mode 100644 index 000000000..ae78c7073 --- /dev/null +++ b/sql/Updates/0.0.1/09_BraveWindfeather.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET`ScriptName` = '' WHERE `entry` = 3209; \ No newline at end of file diff --git a/sql/Updates/0.0.1/11_SilvaFilnaveth.sql b/sql/Updates/0.0.1/11_SilvaFilnaveth.sql new file mode 100644 index 000000000..9900466b7 --- /dev/null +++ b/sql/Updates/0.0.1/11_SilvaFilnaveth.sql @@ -0,0 +1 @@ +UPDATE `creature` SET `id` = 11798, `curhealth` = 3857 WHERE `guid` = 46833; \ No newline at end of file diff --git a/sql/Updates/0.0.1/27_Vaelastraz.sql b/sql/Updates/0.0.1/27_Vaelastraz.sql new file mode 100644 index 000000000..e57ed2107 --- /dev/null +++ b/sql/Updates/0.0.1/27_Vaelastraz.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET faction=35 WHERE entry=13020; +UPDATE creature_template SET npcflag=65 WHERE entry=13020; \ No newline at end of file diff --git a/sql/Updates/0.0.1/Makefile.am b/sql/Updates/0.0.1/Makefile.am new file mode 100644 index 000000000..eed44c8ff --- /dev/null +++ b/sql/Updates/0.0.1/Makefile.am @@ -0,0 +1,29 @@ +# Copyright (C) 2005-2009 MaNGOS +# +# 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, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +## Process this file with automake to produce Makefile.in + +## Sub-directories to parse + +## Change installation location +# datadir = scriptdev2/sql/updates/0.0.1 +pkgdatadir = $(datadir)/scriptdev2/sql/updates/0.0.1 + +## Files to be installed +# Install basic SQL files to datadir +pkgdata_DATA = \ + 09_BraveWindfeather.sql \ + 11_SilvaFilnaveth.sql \ + 27_Vaelastraz.sql diff --git a/sql/Updates/0.0.2/Makefile.am b/sql/Updates/0.0.2/Makefile.am new file mode 100644 index 000000000..5e652b182 --- /dev/null +++ b/sql/Updates/0.0.2/Makefile.am @@ -0,0 +1,270 @@ +# Copyright (C) 2005-2009 MaNGOS +# +# 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, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +## Process this file with automake to produce Makefile.in + +## Sub-directories to parse + +## Change installation location +# datadir = scriptdev2/sql/updates/0.0.2 +pkgdatadir = $(datadir)/scriptdev2/sql/updates/0.0.2 + +## Files to be installed +# Install basic SQL files to datadir +pkgdata_DATA = \ + r56.sql \ + r59.sql \ + r63.sql \ + r65.sql \ + r72.sql \ + r78.sql \ + r81.sql \ + r91.sql \ + r92.sql \ + r97.sql \ + r108.sql \ + r110.sql \ + r121.sql \ + r123.sql \ + r124.sql \ + r125.sql \ + r128.sql \ + r131.sql \ + r134.sql \ + r136.sql \ + r139.sql \ + r142.sql \ + r144.sql \ + r145.sql \ + r149.sql \ + r150.sql \ + r152.sql \ + r153.sql \ + r157.sql \ + r161.sql \ + r163.sql \ + r169.sql \ + r170.sql \ + r171.sql \ + r172.sql \ + r174.sql \ + r176.sql \ + r177.sql \ + r178.sql \ + r181.sql \ + r182.sql \ + r183.sql \ + r184.sql \ + r186.sql \ + r187.sql \ + r189.sql \ + r191.sql \ + r192.sql \ + r197.sql \ + r204.sql \ + r206.sql \ + r211.sql \ + r213.sql \ + r214.sql \ + r215.sql \ + r218.sql \ + r219.sql \ + r221_scriptdev2.sql \ + r227_scriptdev2.sql \ + r230_mangos.sql \ + r234_mangos.sql \ + r237_mangos.sql \ + r238_mangos.sql \ + r239_mangos.sql \ + r240_scriptdev2.sql \ + r241_mangos.sql \ + r242_mangos.sql \ + r243_mangos.sql \ + r249_mangos.sql \ + r250_mangos.sql \ + r253_mangos.sql \ + r255_mangos.sql \ + r256_mangos.sql \ + r257_mangos.sql \ + r258_mangos.sql \ + r260_mangos.sql \ + r261_mangos.sql \ + r262_mangos.sql \ + r263_mangos.sql \ + r264_mangos.sql \ + r265_mangos.sql \ + r269_mangos.sql \ + r270_mangos.sql \ + r271_mangos.sql \ + r272_mangos.sql \ + r273_mangos.sql \ + r274_mangos.sql \ + r275_mangos.sql \ + r281_scriptdev2.sql \ + r282_mangos.sql \ + r286_mangos.sql \ + r289_mangos.sql \ + r291_mangos.sql \ + r295_mangos.sql \ + r297_mangos.sql \ + r298_scriptdev2.sql \ + r299_scriptdev2.sql \ + r304_mangos.sql \ + r306_scriptdev2.sql \ + r307_mangos.sql \ + r308_mangos.sql \ + r309_mangos.sql \ + r311_mangos.sql \ + r312_mangos.sql \ + r318_mangos.sql \ + r324_mangos.sql \ + r327_mangos.sql \ + r332_scriptdev2.sql \ + r333_mangos.sql \ + r334_mangos.sql \ + r336_mangos.sql \ + r352_mangos.sql \ + r355_mangos.sql \ + r358_mangos.sql \ + r364_mangos.sql \ + r367_mangos.sql \ + r368_mangos.sql \ + r369_mangos.sql \ + r374_mangos.sql \ + r386_mangos.sql \ + r417_mangos.sql \ + r428_mangos.sql \ + r431_mangos.sql \ + r444_mangos.sql \ + r445_mangos.sql \ + r446_mangos.sql \ + r448_scriptdev2.sql \ + r462_mangos.sql \ + r465_mangos.sql \ + r467_mangos.sql \ + r473_mangos.sql \ + r476_mangos.sql \ + r477_mangos.sql \ + r479_mangos.sql \ + r482_mangos.sql \ + r484_mangos.sql \ + r486_mangos.sql \ + r487_mangos.sql \ + r494_mangos.sql \ + r501_mangos.sql \ + r513_mangos.sql \ + r514_mangos.sql \ + r515_mangos.sql \ + r516_mangos.sql \ + r517_mangos.sql \ + r518_mangos.sql \ + r519_mangos.sql \ + r520_mangos.sql \ + r521_mangos.sql \ + r522_mangos.sql \ + r526_mangos.sql \ + r528_mangos.sql \ + r533_mangos.sql \ + r538_scriptdev2.sql \ + r547_mangos.sql \ + r554_mangos.sql \ + r555_mangos.sql \ + r575_mangos.sql \ + r576_mangos.sql \ + r578_mangos.sql \ + r584_mangos.sql \ + r590_mangos.sql \ + r591_mangos.sql \ + r593_mangos.sql \ + r594_mangos.sql \ + r596_mangos.sql \ + r610_mangos.sql \ + r615_scriptdev2.sql \ + r617_mangos.sql \ + r621_mangos.sql \ + r628_mangos.sql \ + r632_mangos.sql \ + r633_mangos.sql \ + r634_scriptdev2.sql \ + r636_mangos.sql \ + r637_mangos.sql \ + r638_mangos.sql \ + r639_mangos.sql \ + r642_mangos.sql \ + r643_mangos.sql \ + r646_mangos.sql \ + r647_scriptdev2.sql \ + r656_scriptdev2.sql \ + r658_mangos.sql \ + r659_mangos.sql \ + r681_scriptdev2.sql \ + r695_scriptdev2.sql \ + r699_scriptdev2_script_texts.sql \ + r700_scriptdev2_script_texts.sql \ + r701_scriptdev2_script_texts.sql \ + r702_scriptdev2_script_texts.sql \ + r703_scriptdev2_script_texts.sql \ + r704_scriptdev2_script_texts.sql \ + r705_scriptdev2_script_texts.sql \ + r706_mangos.sql \ + r707_scriptdev2_script_texts.sql \ + r709_scriptdev2_script_texts.sql \ + r710_scriptdev2_script_texts.sql \ + r713_scriptdev2_script_texts.sql \ + r715_scriptdev2_script_texts.sql \ + r725_scriptdev2_script_texts.sql \ + r726_scriptdev2_script_texts.sql \ + r727_scriptdev2_script_texts.sql \ + r728_scriptdev2_script_texts.sql \ + r729_scriptdev2_script_texts.sql \ + r730_scriptdev2_script_texts.sql \ + r732_scriptdev2_script_texts.sql \ + r735_mangos.sql \ + r735_scriptdev2_script_texts.sql \ + r740_mangos.sql \ + r740_scriptdev2_script_texts.sql \ + r743_mangos.sql \ + r743_scriptdev2_script_texts.sql \ + r745_scriptdev2_script_texts.sql \ + r747_scriptdev2_script_texts.sql \ + r751_scriptdev2_script_texts.sql \ + r755_scriptdev2_script_texts.sql \ + r757_mangos.sql \ + r757_scriptdev2_script_texts.sql \ + r764_mangos.sql \ + r764_scriptdev2_script_texts.sql \ + r766_mangos.sql \ + r766_scriptdev2_script_texts.sql \ + r767_mangos.sql \ + r768_scriptdev2_script_texts.sql \ + r769_mangos.sql \ + r771_scriptdev2_script_texts.sql \ + r772_mangos.sql \ + r777_mangos.sql \ + r778_mangos.sql \ + r779_scriptdev2_script_texts.sql \ + r779_mangos.sql \ + r782_mangos.sql \ + r783_mangos.sql \ + r783_scriptdev2_script_texts.sql \ + r790_mangos.sql \ + r794_mangos.sql \ + r796_scriptdev2_script_texts.sql \ + r802_mangos.sql \ + r804_mangos.sql \ + r804_scriptdev2_script_texts.sql \ + r809_mangos.sql \ + r809_scriptdev2_script_texts.sql \ + r810_mangos.sql diff --git a/sql/Updates/0.0.2/r104.sql b/sql/Updates/0.0.2/r104.sql new file mode 100644 index 000000000..29372b726 --- /dev/null +++ b/sql/Updates/0.0.2/r104.sql @@ -0,0 +1 @@ +UPDATE `gameobject_template` SET `ScriptName`='go_orb_of_command' WHERE `entry`='179879'; \ No newline at end of file diff --git a/sql/Updates/0.0.2/r108.sql b/sql/Updates/0.0.2/r108.sql new file mode 100644 index 000000000..7c50fe13d --- /dev/null +++ b/sql/Updates/0.0.2/r108.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName` = 'mob_dementeddruids' WHERE `entry` = 15260; \ No newline at end of file diff --git a/sql/Updates/0.0.2/r110.sql b/sql/Updates/0.0.2/r110.sql new file mode 100644 index 000000000..d5bd73a2f --- /dev/null +++ b/sql/Updates/0.0.2/r110.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName` = 'mob_illusionofjandicebarov' WHERE `entry` = 11439; \ No newline at end of file diff --git a/sql/Updates/0.0.2/r121.sql b/sql/Updates/0.0.2/r121.sql new file mode 100644 index 000000000..597bf5325 --- /dev/null +++ b/sql/Updates/0.0.2/r121.sql @@ -0,0 +1,2 @@ +UPDATE `creature_template` SET `ScriptName` = 'mobs_spectral_ghostly_citizen' WHERE `entry` IN (10384, 10385); + diff --git a/sql/Updates/0.0.2/r123.sql b/sql/Updates/0.0.2/r123.sql new file mode 100644 index 000000000..14f73d1e2 --- /dev/null +++ b/sql/Updates/0.0.2/r123.sql @@ -0,0 +1,4 @@ +UPDATE creature_template SET ScriptName = 'dashel_stonefist' WHERE entry = '4961'; +UPDATE creature_template SET ScriptName = 'blood_knight_stillblade' WHERE entry = '17768'; +UPDATE creature_template SET ScriptName = 'shattered_rumbler' WHERE entry = '17157'; +UPDATE `creature_template` SET `ScriptName`='neltharaku' WHERE `entry`='21657'; \ No newline at end of file diff --git a/sql/Updates/0.0.2/r124.sql b/sql/Updates/0.0.2/r124.sql new file mode 100644 index 000000000..4b5f5cb57 --- /dev/null +++ b/sql/Updates/0.0.2/r124.sql @@ -0,0 +1,13 @@ +-- BT Trash Mobs +UPDATE `creature_template` SET `scriptname`='mob_blacktemple' WHERE `entry` IN (22844,22845,22846,22849,22853,22855,22869,22873,22875,22876,22877,22878,22880,22881,22882,22883,22884,22945,22953,22954,23337,23339); + +-- The Eye Trash Mobs +UPDATE `creature_template` SET `scriptname`='mob_the_eye' WHERE `entry` IN (20031,20032,20033,20034,20035,20039,20041,20043,20046,20052); +UPDATE `creature_template` SET `scriptname`='mob_crystalcore_devastator' WHERE `entry`='20040'; + +-- Uldaman Trash Mobs +UPDATE `creature_template` SET `scriptname`='mob_uldaman' WHERE `entry` IN (4847,4852,4853,4854,4860,4861,6910,7011,7012,7022,7030,7078,7291); +UPDATE `creature_template` SET `scriptname`='mob_jadespine_basilisk' WHERE `entry`='4863'; + +-- Uldaman Boss Ironaya +UPDATE `creature_template` SET `scriptname`='boss_ironaya' WHERE `entry`='7228'; \ No newline at end of file diff --git a/sql/Updates/0.0.2/r125.sql b/sql/Updates/0.0.2/r125.sql new file mode 100644 index 000000000..85477c24e --- /dev/null +++ b/sql/Updates/0.0.2/r125.sql @@ -0,0 +1,24 @@ +UPDATE `creature_template` SET `ScriptName` = 'mob_infested_root_walker' WHERE `entry` = 22095; +UPDATE `creature_template` SET `ScriptName` = 'mob_rotting_forest_rager' WHERE `entry` = 22307; +UPDATE `creature_template` SET `ScriptName` = 'mob_netherweb_victim' WHERE `entry` = 22355; + +UPDATE `creature_template` SET `ScriptName` = 'mobs_shadow_council_covert' WHERE `entry` IN (18716, 18717, 18719); +UPDATE `creature_template` SET `npcflag` = 1 WHERE `entry` IN (18716, 18717, 18719); + +UPDATE `creature_template` SET `ScriptName` = 'mob_gurok_the_usurper' WHERE `entry` = 18182; +UPDATE `creature_template` SET `ScriptName` = 'mob_shattered_rumbler' WHERE `entry` = '17157'; +UPDATE `creature_template` SET `ScriptName` = 'mobs_kilsorrow_agent' WHERE `entry` IN (17146, 17147, 17148, 18397, 18658); +UPDATE `creature_template` SET `ScriptName` = 'npc_altruis_the_sufferer' WHERE `entry` = 18417; + +UPDATE `creature_template` SET `ScriptName` = 'npcs_ashyen_and_keleth' WHERE `entry` IN (17900, 17901); +UPDATE `creature_template` SET `npcflag` = 1 WHERE `entry` IN (17900,17901); +UPDATE `creature_template` SET `ScriptName` = 'npc_elder_kuruti' WHERE `entry` = 18197; +UPDATE `creature_template` SET `npcflag` = 1 WHERE `entry` = 18197; + +UPDATE `creature_template` SET `ScriptName` = 'mob_lunaclaw' WHERE `entry` = 12138; + +UPDATE `creature_template` SET `ScriptName` = 'npc_steward_of_time' WHERE `entry` = 20142; + +UPDATE `creature_template` SET `ScriptName` = 'boss_death_knight_darkreaver' WHERE `entry` = 14516; + +UPDATE `creature_template` SET `ScriptName` = 'mob_yenniku' WHERE `entry` = 2530; diff --git a/sql/Updates/0.0.2/r128.sql b/sql/Updates/0.0.2/r128.sql new file mode 100644 index 000000000..f652fa16f --- /dev/null +++ b/sql/Updates/0.0.2/r128.sql @@ -0,0 +1 @@ +update `creature_template` SET `scriptname`='npc_guardian' WHERE `entry`='5764'; \ No newline at end of file diff --git a/sql/Updates/0.0.2/r131.sql b/sql/Updates/0.0.2/r131.sql new file mode 100644 index 000000000..0899dae38 --- /dev/null +++ b/sql/Updates/0.0.2/r131.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName` = 'npc_henze_faulk' WHERE `entry`= 6172; \ No newline at end of file diff --git a/sql/Updates/0.0.2/r134.sql b/sql/Updates/0.0.2/r134.sql new file mode 100644 index 000000000..eac5bb784 --- /dev/null +++ b/sql/Updates/0.0.2/r134.sql @@ -0,0 +1,15 @@ + +UPDATE `instance_template` SET `script` = 'instance_molten_core' WHERE `map`= 409; +UPDATE `instance_template` SET `script` = 'instance_blackwing_lair' WHERE `map`= 469; +UPDATE `instance_template` SET `script` = 'instance_zulgurub' WHERE `map`= 309; +UPDATE `instance_template` SET `script` = 'instance_ruins_of_ahnqiraj' WHERE `map`= 509; +UPDATE `instance_template` SET `script` = 'instance_temple_of_ahnqiraj' WHERE `map`= 531; +UPDATE `instance_template` SET `script` = 'instance_naxxramas' WHERE `map`= 533; + +UPDATE `instance_template` SET `script` = 'instance_karazhan' WHERE `map`= 532; +UPDATE `instance_template` SET `script` = 'instance_hyjal' WHERE `map`= 534; +UPDATE `instance_template` SET `script` = 'instance_gruuls_lair' WHERE `map`= 565; +UPDATE `instance_template` SET `script` = 'instance_magtheridons_lair' WHERE `map`= 544; +UPDATE `instance_template` SET `script` = 'instance_serpent_shrine' WHERE `map`= 548; +UPDATE `instance_template` SET `script` = 'instance_the_eye' WHERE `map`= 550; +UPDATE `instance_template` SET `script` = 'instance_black_temple' WHERE `map`= 564; \ No newline at end of file diff --git a/sql/Updates/0.0.2/r136.sql b/sql/Updates/0.0.2/r136.sql new file mode 100644 index 000000000..52a9d87d6 --- /dev/null +++ b/sql/Updates/0.0.2/r136.sql @@ -0,0 +1,55 @@ + +-- AQ40 bosses -- + +-- Skeram 15263 +UPDATE `creature_template` SET `ScriptName` = 'boss_skeram' WHERE `entry` = 15263; + +-- Vem, Yauj, Kri +-- Vem 15544 +UPDATE `creature_template` SET `ScriptName` = 'boss_vem' WHERE `entry` = 15544; +-- Yauj 15543 +UPDATE `creature_template` SET `ScriptName` = 'boss_yauj' WHERE `entry` = 15543; +-- Yauj Brood 15621 +UPDATE `creature_template` SET `ScriptName` = 'mob_yauj_brood' WHERE `entry` = 15621; +-- Kri 15511 +UPDATE `creature_template` SET `ScriptName` = 'boss_kri' WHERE `entry` = 15511; + +-- Sartura 15516 +UPDATE `creature_template` SET `ScriptName` = 'boss_sartura' WHERE `entry` = 15516; +-- Sartura's Royal Guard 15984 +UPDATE `creature_template` SET `ScriptName` = 'mob_sartura_royal_guard' WHERE `entry` = 15984; + +-- Fankriss 15510 +UPDATE `creature_template` SET `ScriptName` = 'boss_fankriss' WHERE `entry` = 15510; +-- Spawn of Fankriss 15630 +UPDATE `creature_template` SET `ScriptName` = 'mob_spawn_of_fankriss' WHERE `entry` = 15630; + +-- Viscidus 15299 +UPDATE `creature_template` SET `ScriptName` = 'boss_viscidus' WHERE `entry` = 15299; +-- Glob of Viscidus 15667 +UPDATE `creature_template` SET `ScriptName` = 'boss_glob_of_viscidus' WHERE `entry` = 15667; + +-- Huhuran 15509 +UPDATE `creature_template` SET `ScriptName` = 'boss_huhuran' WHERE `entry` = 15509; + +-- Veklor & Veknilash +-- Veklor 15276 +UPDATE `creature_template` SET `ScriptName` = 'boss_veklor' WHERE `entry` = 15276; +-- Veknilash 15275 +UPDATE `creature_template` SET `ScriptName` = 'boss_veknilash' WHERE `entry` = 15275; + +-- Ouro 15517 +UPDATE `creature_template` SET `ScriptName` = 'boss_ouro' WHERE `entry` = 15517; + +-- C'thun +-- Eye 15589 +-- Body 15727 + +UPDATE creature_template SET ScriptName='boss_eye_of_cthun' WHERE entry=15589; +UPDATE creature_template SET ScriptName='mob_claw_tentacle' WHERE entry=15725; +UPDATE creature_template SET ScriptName='mob_eye_tentacle' WHERE entry=15726; + +UPDATE creature_template SET ScriptName='boss_cthun' WHERE entry=15727; +UPDATE creature_template SET ScriptName='mob_giant_claw_tentacle' WHERE entry=15728; +UPDATE creature_template SET ScriptName='mob_giant_eye_tentacle' WHERE entry=15334; +UPDATE creature_template SET ScriptName='mob_giant_flesh_tentacle' WHERE entry=15802; \ No newline at end of file diff --git a/sql/Updates/0.0.2/r139.sql b/sql/Updates/0.0.2/r139.sql new file mode 100644 index 000000000..73c013f1a --- /dev/null +++ b/sql/Updates/0.0.2/r139.sql @@ -0,0 +1,35 @@ +UPDATE `creature_template` SET `ScriptName` = 'npc_lokhtos_darkbargainer' WHERE `entry` = 12944; + +UPDATE creature_template SET ScriptName='npc_lady_jaina_proudmoore' WHERE entry=4968; + +UPDATE `creature_template` SET `ScriptName` = 'mobs_spitelashes' WHERE entry IN (6190,6193,6194,6195,6196,7885,7886,12204,12205); + +UPDATE creature_template SET npcflag=1, ScriptName='npc_beaten_corpse' WHERE entry=10668; +UPDATE quest_template SET SpecialFlags=8, ReqCreatureOrGOId1=10668, ReqCreatureOrGOCount1=1 WHERE entry=4921; + +UPDATE creature_template SET ScriptName='boss_rokmar_the_crackler' WHERE entry=17991; +UPDATE creature_template SET ScriptName='boss_warlord_kalithresh' WHERE entry=17798; + +UPDATE `creature_template` SET `ScriptName` = 'boss_midnight' WHERE `entry` = 16151; +UPDATE `creature_template` SET `ScriptName` = 'boss_attumen' WHERE `entry` = 15550; +UPDATE `creature_template` SET `ScriptName` = 'boss_moroes' WHERE `entry` = 15687; +UPDATE `creature_template` SET `ScriptName` = 'boss_maiden_of_virtue' WHERE `entry` = 16457; +UPDATE `creature_template` SET `ScriptName` = 'boss_curator' WHERE `entry` = 15691; +UPDATE `creature_template` SET `ScriptName` = 'boss_big_bad_wolf' WHERE `entry` = 17521; +UPDATE `creature_template` SET `ScriptName` = 'boss_julianne' WHERE `entry` = 17534; +UPDATE `creature_template` SET `ScriptName` = 'boss_romulo' WHERE `entry` = 17533; +UPDATE `creature_template` SET `ScriptName` = 'boss_dorothee' WHERE `entry` = 17535; +UPDATE `creature_template` SET `ScriptName` = 'boss_strawman' WHERE `entry` = 17543; +UPDATE `creature_template` SET `ScriptName` = 'boss_tinhead' WHERE `entry` = 17547; +UPDATE `creature_template` SET `ScriptName` = 'boss_tito' WHERE `entry` = 17548; +UPDATE `creature_template` SET `ScriptName` = 'boss_roar' WHERE `entry` = 17546; +UPDATE `creature_template` SET `ScriptName` = 'boss_crone' WHERE `entry` = 18168; +UPDATE `creature_template` SET `ScriptName` = 'boss_terestian_illhoof' WHERE `entry` = 15688; +UPDATE `creature_template` SET `ScriptName` = 'boss_shade_of_aran' WHERE `entry` = 16524; +UPDATE `creature_template` SET `ScriptName` = 'boss_netherspite' WHERE `entry` = 15689; +UPDATE `creature_template` SET `ScriptName` = 'boss_malchezaar' WHERE `entry` = 15690; +UPDATE `creature_template` SET `ScriptName` = 'boss_nightbane' WHERE `entry` = 17225; + +UPDATE `creature_template` SET `ScriptName` = 'mob_homunculus' WHERE `entry` = 16539; +UPDATE `creature_template` SET `ScriptName` = 'mob_kilrek' WHERE `entry` = 17229; +UPDATE `creature_template` SET `ScriptName` = 'netherspite_infernal' WHERE `entry` = 17646; \ No newline at end of file diff --git a/sql/Updates/0.0.2/r142.sql b/sql/Updates/0.0.2/r142.sql new file mode 100644 index 000000000..2cd9b29e6 --- /dev/null +++ b/sql/Updates/0.0.2/r142.sql @@ -0,0 +1,11 @@ +-- VoidReaver 19516 +UPDATE `creature_template` SET `ScriptName` = 'boss_void_reaver' WHERE `entry` = 19516; + +-- Arcane Orb Target +REPLACE INTO `creature_template` (`entry`, `modelid_A`, `modelid_H`, `name`, `subname`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `baseattacktime`, `rangeattacktime`, `flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `class`, `race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `civilian`, `flag1`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `RacialLeader`, `RegenHealth`, `equipment_id`, `ScriptName`) VALUES (19577, 16946, 16946, 'Arcane Orb Target', '', 70, 70, 1, 1, 0, 0, 0, 35, 35, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0, 1, 0, 'mob_arcane_orb_target'); + +UPDATE `creature_template` SET `ScriptName` = 'boss_omor_the_unscarred' WHERE `entry` = 17308; +UPDATE `creature_template` SET `ScriptName` = 'boss_watchkeeper_gargolmar' WHERE `entry` = 17306; + +UPDATE `creature_template` SET `ScriptName` = 'boss_hungarfen' WHERE `entry` = 17770; +UPDATE `creature_template` SET `ScriptName` = 'mob_underbog_mushroom' WHERE `entry` = 17990; \ No newline at end of file diff --git a/sql/Updates/0.0.2/r144.sql b/sql/Updates/0.0.2/r144.sql new file mode 100644 index 000000000..ddf354b9e --- /dev/null +++ b/sql/Updates/0.0.2/r144.sql @@ -0,0 +1,5 @@ +UPDATE `creature_template` SET `ScriptName` = 'boss_the_maker' WHERE `entry` = 17381; +UPDATE `creature_template` SET `ScriptName` = 'boss_broggok' WHERE `entry` = 17380; +UPDATE `creature_template` SET `ScriptName` = 'boss_kelidan_the_breaker' WHERE `entry` = 17377; +UPDATE `creature_template` SET `ScriptName` = 'mob_broggok_poisoncloud' WHERE `entry` = 17662; +UPDATE `creature_template` SET minlevel = 63, maxlevel = 63 WHERE `entry` = 17662; \ No newline at end of file diff --git a/sql/Updates/0.0.2/r145.sql b/sql/Updates/0.0.2/r145.sql new file mode 100644 index 000000000..d2d799740 --- /dev/null +++ b/sql/Updates/0.0.2/r145.sql @@ -0,0 +1,4 @@ + +UPDATE `creature_template` SET `ScriptName` = 'mob_shadow_of_aran' WHERE `entry` = 18254; +UPDATE `creature_template` SET `ScriptName` = 'mob_aran_elemental' WHERE `entry` = 17167; +UPDATE `creature_template` SET `ScriptName` = 'mob_aran_blizzard' WHERE `entry` = 17161; \ No newline at end of file diff --git a/sql/Updates/0.0.2/r149.sql b/sql/Updates/0.0.2/r149.sql new file mode 100644 index 000000000..a6311a14e --- /dev/null +++ b/sql/Updates/0.0.2/r149.sql @@ -0,0 +1 @@ +INSERT INTO `spell_script_target` VALUES (30834, 1, 17646); diff --git a/sql/Updates/0.0.2/r150.sql b/sql/Updates/0.0.2/r150.sql new file mode 100644 index 000000000..eb1eb1806 --- /dev/null +++ b/sql/Updates/0.0.2/r150.sql @@ -0,0 +1,19 @@ +UPDATE `creature_template` SET `ScriptName` = 'boss_grand_warlock_nethekurse' WHERE `entry` = 16807; +UPDATE `creature_template` SET `ScriptName` = 'mob_nethe_shadowfissure' WHERE `entry` = 17471; + +UPDATE `creature_template` SET `scriptname`='mob_phoenix' WHERE `entry`='21362'; +UPDATE `creature_template` SET `scriptname`='mob_phoenix_egg' WHERE `entry`='21364'; + +UPDATE `item_template` SET `ScriptName` = 'vorenthals_presence' WHERE `entry`= 30259; + +UPDATE `creature_template` SET `ScriptName` = 'boss_hydromancer_thespia' WHERE `entry` = 17797; +UPDATE `creature_template` SET `ScriptName` = 'mob_coilfang_waterelemental' WHERE `entry` = 17917; + +UPDATE `creature_template` SET `ScriptName` = 'mob_ethereal_beacon' WHERE `entry` = 18431; +UPDATE `creature_template` SET `ScriptName` = 'mob_ethereal_apprentice' WHERE `entry` = 18430; + +UPDATE `creature_template` SET `ScriptName` = 'boss_tavarok' WHERE `entry` = 18343; +UPDATE `creature_template` SET `ScriptName` = 'boss_pandemonius' WHERE `entry` = 18341; +UPDATE `creature_template` SET `ScriptName` = 'boss_nexusprince_shaffar' WHERE `entry` = 18344; + +UPDATE `creature_template` SET `ScriptName` = 'boss_ghazan' WHERE `entry` = 18105; \ No newline at end of file diff --git a/sql/Updates/0.0.2/r152.sql b/sql/Updates/0.0.2/r152.sql new file mode 100644 index 000000000..7efe9eba9 --- /dev/null +++ b/sql/Updates/0.0.2/r152.sql @@ -0,0 +1,12 @@ +UPDATE `creature_template` SET `ScriptName` = 'mob_syth_fire' WHERE `entry` = 19203; +UPDATE `creature_template` SET `ScriptName` = 'mob_syth_arcane' WHERE `entry` = 19205; +UPDATE `creature_template` SET `ScriptName` = 'mob_syth_frost' WHERE `entry` = 19204; +UPDATE `creature_template` SET `ScriptName` = 'mob_syth_shadow' WHERE `entry` = 19206; + +UPDATE `creature_template` SET `ScriptName` = 'boss_tailonking_ikiss' WHERE `entry` = 18473; +UPDATE `creature_template` SET `ScriptName` = 'boss_darkweaver_syth' WHERE `entry` = 18472; + +UPDATE creature_template SET ScriptName = 'npc_shattrathflaskvendors' WHERE entry = '23483'; +UPDATE creature_template SET ScriptName = 'npc_shattrathflaskvendors' WHERE entry = '23484'; + +UPDATE `creature_template` SET ScriptName='innkeeper' WHERE `npcflag` & 128<>0; diff --git a/sql/Updates/0.0.2/r153.sql b/sql/Updates/0.0.2/r153.sql new file mode 100644 index 000000000..fb59c996e --- /dev/null +++ b/sql/Updates/0.0.2/r153.sql @@ -0,0 +1,33 @@ +-- Fishing net +UPDATE item_template SET ScriptName = 'draenei_fishing_net' WHERE entry = 23654; + +-- Auchenai Crypts +UPDATE `creature_template` set `scriptname` = 'boss_shirrak_the_dead_watcher' where `entry` = '18371'; +UPDATE `creature_template` set `scriptname` = 'boss_shirrak_the_dead_watcher' where `entry` = '20318'; + +-- Old Hillsbrad +UPDATE `creature_template` set `scriptname` = 'mob_lieutenant_drake' where `entry` = '17848'; +UPDATE `creature_template` set `scriptname` = 'mob_epoch_hunter' where `entry` = '18096'; +UPDATE `creature_template` SET `ScriptName` = 'boss_captain_skarloc' WHERE `entry`=17862; + +-- The Black Morass +UPDATE `creature_template` set `ScriptName` = 'boss_chrono_lord_deja' where `entry` = '17879'; +UPDATE `creature_template` SET `ScriptName` = 'boss_aeonus' WHERE `entry`=17881; +UPDATE `creature_template` set `ScriptName` = 'boss_temporus' where `entry` = '17880'; + +-- Deadmines +UPDATE `creature_template` SET `ScriptName` = 'boss_deadmines' WHERE `entry`=645; +UPDATE `creature_template` SET `ScriptName` = 'boss_deadmines' WHERE `entry`=1763; +UPDATE `creature_template` SET `ScriptName` = 'boss_deadmines' WHERE `entry`=599; +UPDATE `creature_template` SET `ScriptName` = 'boss_deadmines' WHERE `entry`=3586; + +-- Wailing Caverns +UPDATE `creature_template` SET `ScriptName` = 'boss_wailing_caverns' WHERE `entry`=3654; + +-- Gruul's Lair +UPDATE `creature_template` SET `ScriptName` = 'boss_high_king_maulgar' WHERE `entry`=18831; +UPDATE `creature_template` SET `ScriptName` = 'boss_kiggler_the_crazed' WHERE `entry`=18835; +UPDATE `creature_template` SET `ScriptName` = 'boss_blindeye_the_seer' WHERE `entry`=18836; +UPDATE `creature_template` SET `ScriptName` = 'boss_olm_the_summoner' WHERE `entry`=18834; +UPDATE `creature_template` SET `ScriptName` = 'boss_krosh_firehand' WHERE `entry`=18832; +UPDATE `instance_template` SET `script`="instance_gruuls_lair" WHERE `map`=565; \ No newline at end of file diff --git a/sql/Updates/0.0.2/r157.sql b/sql/Updates/0.0.2/r157.sql new file mode 100644 index 000000000..05c829952 --- /dev/null +++ b/sql/Updates/0.0.2/r157.sql @@ -0,0 +1,7 @@ +UPDATE `creature_template` SET `ScriptName` = 'boss_hydross_the_unstable' WHERE `entry`=21216; +UPDATE `creature_template` SET `ScriptName` = 'boss_leotheras_the_blind' WHERE `entry`=21215; + +-- Magtheridon's Lair +UPDATE `gameobject_template` SET `ScriptName`='go_manticron_cube' WHERE `entry`='181713'; +UPDATE `creature_template` SET `ScriptName` = 'boss_magtheridon' WHERE `entry`=17257; +UPDATE `creature_template` SET `ScriptName` = 'mob_hellfire_channeler' WHERE `entry`=17256; diff --git a/sql/Updates/0.0.2/r161.sql b/sql/Updates/0.0.2/r161.sql new file mode 100644 index 000000000..0bb31ee2b --- /dev/null +++ b/sql/Updates/0.0.2/r161.sql @@ -0,0 +1,12 @@ +-- shadow labyrinth +UPDATE `instance_template` SET `script` = 'instance_shadow_labyrinth' WHERE `map`= 555; +UPDATE `creature_template` SET `ScriptName` = 'boss_murmur' WHERE `entry` = 18708; +UPDATE `creature_template` SET `ScriptName` = 'boss_ambassador_hellmaw' WHERE `entry` = 18731; +UPDATE `creature_template` SET `ScriptName` = 'boss_grandmaster_vorpil' WHERE `entry` = 18732; +UPDATE `creature_template` SET `ScriptName` = 'boss_blackheart_the_inciter' WHERE `entry` = 18667; + +-- fathomlord karathress +UPDATE `creature_template` SET `ScriptName` = 'boss_fathomlord_karathress' WHERE `entry`=21214; +UPDATE `creature_template` SET `ScriptName` = 'boss_fathomguard_sharkkis' WHERE `entry`=21966; +UPDATE `creature_template` SET `ScriptName` = 'boss_fathomguard_tidalvess' WHERE `entry`=21965; +UPDATE `creature_template` SET `ScriptName` = 'boss_fathomguard_caribdis' WHERE `entry`=21964; diff --git a/sql/Updates/0.0.2/r163.sql b/sql/Updates/0.0.2/r163.sql new file mode 100644 index 000000000..9f8253e3c --- /dev/null +++ b/sql/Updates/0.0.2/r163.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET npcflag=npcflag|1, ScriptName='npc_cairne_bloodhoof' WHERE entry=3057; +UPDATE `gameobject_template` SET `ScriptName`='go_barov_journal' WHERE `entry`=180794; \ No newline at end of file diff --git a/sql/Updates/0.0.2/r164.sql b/sql/Updates/0.0.2/r164.sql new file mode 100644 index 000000000..30b7a6a05 --- /dev/null +++ b/sql/Updates/0.0.2/r164.sql @@ -0,0 +1,10 @@ +-- gruuls lair trash mobs +UPDATE `creature_template` SET `ScriptName` = 'mob_gruuls_lair' WHERE `entry` IN (19389, 21350); + +-- morogrim tidewalker +UPDATE `creature_template` SET `ScriptName` = 'boss_morogrim_tidewalker' WHERE `entry`=21213; +-- Water Globule +UPDATE `creature_template` SET `ScriptName` = 'mob_water_globule' WHERE `entry`=21913; + +-- Serpentshrine Cavern Trash Mobs +UPDATE `creature_template` SET `ScriptName` = 'mob_serpentshrine_cavern' WHERE `entry` IN (21246, 21339, 21221, 21224, 21227, 21228, 21226, 21225, 21298, 21299); \ No newline at end of file diff --git a/sql/Updates/0.0.2/r165.sql b/sql/Updates/0.0.2/r165.sql new file mode 100644 index 000000000..69401cdb8 --- /dev/null +++ b/sql/Updates/0.0.2/r165.sql @@ -0,0 +1,8 @@ + +-- the steam vault +UPDATE `instance_template` SET `script` = 'instance_steam_vault' WHERE `map` = 545; + +-- right old hillsbrad foothills bosses script name +UPDATE `creature_template` SET `ScriptName` = 'boss_lieutenant_drake' WHERE `entry` = 17848; +UPDATE `creature_template` SET `ScriptName` = 'boss_epoch_hunter' WHERE `entry` = 18096; + diff --git a/sql/Updates/0.0.2/r169.sql b/sql/Updates/0.0.2/r169.sql new file mode 100644 index 000000000..d5511e821 --- /dev/null +++ b/sql/Updates/0.0.2/r169.sql @@ -0,0 +1,4 @@ +-- hellfire peninsula special taxi path +UPDATE `creature_template` SET `ScriptName` = 'npc_wing_commander_brack' WHERE `entry` = 19401; +UPDATE `creature_template` SET `ScriptName` = 'npc_wing_commander_dabiree' WHERE `entry` = 19409; +UPDATE `creature_template` SET `ScriptName` = 'npc_gryphoneer_windbellow' WHERE `entry` = 20235; diff --git a/sql/Updates/0.0.2/r170.sql b/sql/Updates/0.0.2/r170.sql new file mode 100644 index 000000000..c397c1600 --- /dev/null +++ b/sql/Updates/0.0.2/r170.sql @@ -0,0 +1,2 @@ +-- special taxi path netherstorm +UPDATE `creature_template` SET `ScriptName` = 'npc_protectorate_nether_drake' WHERE `entry` = 20903; diff --git a/sql/Updates/0.0.2/r171.sql b/sql/Updates/0.0.2/r171.sql new file mode 100644 index 000000000..5a7adb615 --- /dev/null +++ b/sql/Updates/0.0.2/r171.sql @@ -0,0 +1,2 @@ +-- multi kill quest mobs hfp +UPDATE `creature_template` SET `ScriptName` = 'mobs_shattered_hand_orc' WHERE `entry` IN (19411, 19410, 19413, 19414, 16867, 19295, 16870, 16878, 19415); diff --git a/sql/Updates/0.0.2/r172.sql b/sql/Updates/0.0.2/r172.sql new file mode 100644 index 000000000..4cac98302 --- /dev/null +++ b/sql/Updates/0.0.2/r172.sql @@ -0,0 +1,3 @@ +-- support multikill bladespire and bloodmaul ogres +UPDATE `creature_template` SET `ScriptName` = 'mobs_bladespire_ogre' WHERE `entry` IN (19998, 20334, 21296, 21975); +UPDATE `creature_template` SET `ScriptName` = 'mobs_bloodmaul_ogre' WHERE `entry` IN (19948, 19952, 19957); diff --git a/sql/Updates/0.0.2/r174.sql b/sql/Updates/0.0.2/r174.sql new file mode 100644 index 000000000..57dde5a0f --- /dev/null +++ b/sql/Updates/0.0.2/r174.sql @@ -0,0 +1,8 @@ +-- multikill creatures +UPDATE `creature_template` SET `ScriptName` = 'mobs_dragonmaw_orc' WHERE `entry` IN (21717, 21718, 21719, 21720, 22331); +UPDATE `creature_template` SET `ScriptName` = 'mobs_shadowmoon_valley_wildlife' WHERE `entry` IN (21878, 21879); +UPDATE `creature_template` SET `ScriptName` = 'mobs_gordunni_ogre' WHERE `entry` IN (22143, 22144, 22148, 23022); +-- vendor +UPDATE `creature_template` SET `ScriptName` = 'npc_drake_dealer_hurlunk' WHERE `entry` = 23489; +UPDATE `creature_template` SET `ScriptName` = 'npc_rivern_frostwind' WHERE `entry` = 10618; + diff --git a/sql/Updates/0.0.2/r176.sql b/sql/Updates/0.0.2/r176.sql new file mode 100644 index 000000000..58e75375c --- /dev/null +++ b/sql/Updates/0.0.2/r176.sql @@ -0,0 +1,5 @@ +-- tales and stories +UPDATE `creature_template` SET `ScriptName` = 'npc_tirion_fordring' WHERE `entry` = 1855; +UPDATE `creature_template` SET `ScriptName` = 'npc_loramus_thalipedes' WHERE `entry` = 7783; +UPDATE `creature_template` SET `ScriptName` = 'npc_fallen_hero_of_horde' WHERE `entry` = 7572; +UPDATE `creature_template` SET `ScriptName` = 'npc_lorax' WHERE `entry` = 10918; diff --git a/sql/Updates/0.0.2/r177.sql b/sql/Updates/0.0.2/r177.sql new file mode 100644 index 000000000..3914679aa --- /dev/null +++ b/sql/Updates/0.0.2/r177.sql @@ -0,0 +1,2 @@ +-- kalaran windblade +UPDATE `creature_template` SET `ScriptName` = 'npc_kalaran_windblade' WHERE `entry` = 8479; diff --git a/sql/Updates/0.0.2/r178.sql b/sql/Updates/0.0.2/r178.sql new file mode 100644 index 000000000..f20a43668 --- /dev/null +++ b/sql/Updates/0.0.2/r178.sql @@ -0,0 +1,2 @@ +-- kharan mighthammer +UPDATE `creature_template` SET `ScriptName` = 'npc_kharan_mighthammer' WHERE `entry` = 9021; diff --git a/sql/Updates/0.0.2/r181.sql b/sql/Updates/0.0.2/r181.sql new file mode 100644 index 000000000..4807582d1 --- /dev/null +++ b/sql/Updates/0.0.2/r181.sql @@ -0,0 +1,2 @@ +-- npc_lantresor_of_the_blade +UPDATE `creature_template` SET `ScriptName` = 'npc_lantresor_of_the_blade' WHERE `entry` = 18261; diff --git a/sql/Updates/0.0.2/r182.sql b/sql/Updates/0.0.2/r182.sql new file mode 100644 index 000000000..5d0a3c68f --- /dev/null +++ b/sql/Updates/0.0.2/r182.sql @@ -0,0 +1,2 @@ +-- npc_ragged_john +UPDATE `creature_template` SET `ScriptName` = 'npc_ragged_john' WHERE `entry` = 9563; diff --git a/sql/Updates/0.0.2/r183.sql b/sql/Updates/0.0.2/r183.sql new file mode 100644 index 000000000..79c175d09 --- /dev/null +++ b/sql/Updates/0.0.2/r183.sql @@ -0,0 +1,5 @@ +-- revert to original specialflags + flag 4 for mangos support, script no longer needed for quest +UPDATE `quest_template` SET `SpecialFlags`= 140 WHERE `entry` IN (10040, 10041); +UPDATE `creature_template` SET `ScriptName` = '' WHERE `entry` IN (18716, 18717, 18719); +-- gossip only, key to searing gorge discussion +UPDATE `creature_template` SET `ScriptName` = 'npc_mountaineer_pebblebitty' WHERE `entry` = 3836; diff --git a/sql/Updates/0.0.2/r184.sql b/sql/Updates/0.0.2/r184.sql new file mode 100644 index 000000000..599fd9f3c --- /dev/null +++ b/sql/Updates/0.0.2/r184.sql @@ -0,0 +1,2 @@ +-- revert to default database values +UPDATE `quest_template` SET `SpecialFlags`= 10, `ReqCreatureOrGOId1` = 0, `ReqCreatureOrGOId2` = 0, `ReqCreatureOrGOId3`= 0, `ReqCreatureOrGOId4`= 0, `ReqCreatureOrGOCount1` = 0, `ReqCreatureOrGOCount2` = 0, `ReqCreatureOrGOCount3` = 0, `ReqCreatureOrGOCount4`= 0, `ReqSpellCast1` = 0, `ReqSpellCast2` = 0, `ReqSpellCast3` = 0, `ReqSpellCast4` = 0 WHERE `entry` IN (5929, 5930); diff --git a/sql/Updates/0.0.2/r186.sql b/sql/Updates/0.0.2/r186.sql new file mode 100644 index 000000000..a225e6850 --- /dev/null +++ b/sql/Updates/0.0.2/r186.sql @@ -0,0 +1,2 @@ +-- leotheras the blind demonform +UPDATE `creature_template` SET `ScriptName` = 'boss_leotheras_the_blind_demonform' WHERE `entry` = 21845; \ No newline at end of file diff --git a/sql/Updates/0.0.2/r187.sql b/sql/Updates/0.0.2/r187.sql new file mode 100644 index 000000000..2b34b1c84 --- /dev/null +++ b/sql/Updates/0.0.2/r187.sql @@ -0,0 +1,12 @@ +-- test of lore quest npcs +UPDATE `creature_template` SET `ScriptName` = 'npc_parqual_fintallas' WHERE `entry` = 4488; +UPDATE `creature_template` SET `ScriptName` = 'npc_braug_dimspirit' WHERE `entry` = 4489; +-- quest Scratches +UPDATE `creature_template` SET `ScriptName` = 'npc_daranelle' WHERE `entry` = 21469; + +-- no comments of malfuntion, implementing mount vendors script +UPDATE `creature_template` SET `ScriptName` = 'npc_mount_vendor' WHERE `entry` IN (384, 1261, 1460, 2357, 3362, 3685, 4730, 4731, 4885, 7952, 7955, 16264, 17584); + +-- one time update, this is database related sql and should be included in any database +UPDATE `creature_template` SET `npcflag` = `npcflag`|1 WHERE `entry` IN (4488, 4489, 21469); +INSERT IGNORE `spell_teleport` VALUES (6766, 1,-2354.03,-1902.07,95.78,4.6); diff --git a/sql/Updates/0.0.2/r189.sql b/sql/Updates/0.0.2/r189.sql new file mode 100644 index 000000000..51fc09abc --- /dev/null +++ b/sql/Updates/0.0.2/r189.sql @@ -0,0 +1,3 @@ +UPDATE `gameobject_template` SET `ScriptName` = 'go_field_repair_bot' where `entry`=179552; +UPDATE `creature_template` SET `ScriptName` = 'boss_doomwalker' WHERE `entry` = 17711; +UPDATE `creature_template` SET `ScriptName` = 'boss_exarch_maladaar' WHERE `entry` = 18373; \ No newline at end of file diff --git a/sql/Updates/0.0.2/r191.sql b/sql/Updates/0.0.2/r191.sql new file mode 100644 index 000000000..f5d563bc2 --- /dev/null +++ b/sql/Updates/0.0.2/r191.sql @@ -0,0 +1,5 @@ + +/* THE MECHANAR */ +UPDATE `creature_template` SET `ScriptName` = 'boss_gatewatcher_iron_hand' WHERE `entry` = 19710; +UPDATE `creature_template` SET `ScriptName` = 'boss_nethermancer_sepethrea' WHERE `entry` = 19221; +UPDATE `creature_template` SET `ScriptName` = 'mob_ragin_flames' WHERE `entry` = 20481; \ No newline at end of file diff --git a/sql/Updates/0.0.2/r192.sql b/sql/Updates/0.0.2/r192.sql new file mode 100644 index 000000000..beb8aa31e --- /dev/null +++ b/sql/Updates/0.0.2/r192.sql @@ -0,0 +1,9 @@ +-- lady vashj event +UPDATE `creature_template` SET `ScriptName` = 'boss_lady_vashj' WHERE `entry` = 21212; +UPDATE `creature_template` SET `ScriptName` = 'mob_enchanted_elemental' WHERE `entry` = 21958; +UPDATE `creature_template` SET `ScriptName` = 'mob_tainted_elemental' WHERE `entry` = 22009; +UPDATE `creature_template` SET `ScriptName` = 'mob_coilfang_elite' WHERE `entry` = 22055; +UPDATE `creature_template` SET `ScriptName` = 'mob_coilfang_strider' WHERE `entry` = 22056; +UPDATE `creature_template` SET `ScriptName` = 'mob_fathom_sporebat' WHERE `entry` = 22120; + +UPDATE `gameobject_template` SET `ScriptName` = 'go_shield_generator' WHERE `entry` IN (185052, 185053, 185051, 185054); diff --git a/sql/Updates/0.0.2/r197.sql b/sql/Updates/0.0.2/r197.sql new file mode 100644 index 000000000..800595abd --- /dev/null +++ b/sql/Updates/0.0.2/r197.sql @@ -0,0 +1,5 @@ +-- scholomance script +UPDATE `instance_template` SET `script` = 'instance_scholomance' WHERE `map` = 289; + +-- arcatraz script +UPDATE `instance_template` SET `script` = 'instance_arcatraz' WHERE `map` = 552; \ No newline at end of file diff --git a/sql/Updates/0.0.2/r204.sql b/sql/Updates/0.0.2/r204.sql new file mode 100644 index 000000000..960ba366f --- /dev/null +++ b/sql/Updates/0.0.2/r204.sql @@ -0,0 +1,7 @@ +-- lady vashj event +UPDATE `gameobject_template` SET `type`=0,`ScriptName`='' WHERE `entry` IN (185052, 185053, 185051, 185054); +UPDATE `item_template` SET `ScriptName` = 'item_tainted_core' WHERE `entry` = 31088; +UPDATE `creature_template` SET `ScriptName` = 'mob_shield_generator_channel' WHERE `entry` = 19870; + +-- BWL trash mobs +UPDATE `creature_template` SET `ScriptName` = 'mob_blackwing_lair' WHERE `entry` IN (14265, 12457, 13996, 12459, 14261, 14263, 12467, 12463, 12461, 12464, 12460, 12465, 14262, 14264); diff --git a/sql/Updates/0.0.2/r206.sql b/sql/Updates/0.0.2/r206.sql new file mode 100644 index 000000000..9adcb76a6 --- /dev/null +++ b/sql/Updates/0.0.2/r206.sql @@ -0,0 +1,16 @@ +-- Zul'Gurub Bosses Part 1 + Trash Mobs +UPDATE `creature_template` SET `ScriptName` = 'boss_jeklik' WHERE `entry` = 14517; +UPDATE `creature_template` SET `ScriptName` = 'boss_venoxis' WHERE `entry` = 14607; +UPDATE `creature_template` SET `ScriptName` = 'boss_marli' WHERE `entry` = 14510; +UPDATE `creature_template` SET `ScriptName` = 'boss_mandokir' WHERE `entry` = 11382; +UPDATE `creature_template` SET `ScriptName` = 'boss_gahzranka' WHERE `entry` = 15114; +UPDATE `creature_template` SET `ScriptName` = 'boss_jindo' WHERE `entry` = 11380; + +/* Spawn of Marli */ +UPDATE `creature_template` SET `ScriptName` = 'mob_spawn_of_marli' WHERE `entry` = 15041; +/* Jeklik Batrider */ +UPDATE `creature_template` SET `ScriptName` = 'mob_batrider' WHERE `entry` = 14965; + + +-- Darkmaster Ganling +UPDATE `creature_template` SET `ScriptName` = 'boss_darkmaster_gandling' WHERE `entry` = 1853; \ No newline at end of file diff --git a/sql/Updates/0.0.2/r211.sql b/sql/Updates/0.0.2/r211.sql new file mode 100644 index 000000000..ceb91171b --- /dev/null +++ b/sql/Updates/0.0.2/r211.sql @@ -0,0 +1,6 @@ +-- kael'thas event +UPDATE `creature_template` SET `ScriptName` = 'boss_kaelthas' WHERE `entry` = 19622; +UPDATE `creature_template` SET `ScriptName` = 'boss_thaladred_the_darkener' WHERE `entry` = 20064; +UPDATE `creature_template` SET `ScriptName` = 'boss_lord_sanguinar' WHERE `entry` = 20060; +UPDATE `creature_template` SET `ScriptName` = 'boss_grand_astromancer_capernian' WHERE `entry` = 20062; +UPDATE `creature_template` SET `ScriptName` = 'boss_master_engineer_telonicus' WHERE `entry` = 20063; diff --git a/sql/Updates/0.0.2/r213.sql b/sql/Updates/0.0.2/r213.sql new file mode 100644 index 000000000..b512cfd50 --- /dev/null +++ b/sql/Updates/0.0.2/r213.sql @@ -0,0 +1,11 @@ +-- Zul'Gurub Part II +UPDATE `creature_template` SET `ScriptName` = "boss_hakkar" WHERE `creature_template`.`entry` = 15295; +UPDATE `creature_template` SET `ScriptName` = "boss_thekal" WHERE `creature_template`.`entry` = 14509; +UPDATE `creature_template` SET `ScriptName` = "boss_arlokk" WHERE `creature_template`.`entry` = 14515; +UPDATE `creature_template` SET `ScriptName` = "mob_zealot_lorkhan" WHERE `creature_template`.`entry` = 11347; +UPDATE `creature_template` SET `ScriptName` = "mob_zealot_zath" WHERE `creature_template`.`entry` = 11348; +UPDATE `creature_template` SET `ScriptName` = "mob_healing_ward" WHERE `creature_template`.`entry` = 14987; +UPDATE `creature_template` SET `Scriptname` = "mobs_zulgurub" WHERE `creature_template`.`entry` IN (11340 ,11352 , 11350, 11830, 11372, 11351, 14750); + + + diff --git a/sql/Updates/0.0.2/r214.sql b/sql/Updates/0.0.2/r214.sql new file mode 100644 index 000000000..24b5aa393 --- /dev/null +++ b/sql/Updates/0.0.2/r214.sql @@ -0,0 +1,2 @@ +UPDATE `creature_template` SET `ScriptName` = "boss_hakkar" WHERE `creature_template`.`entry` = 14834; + diff --git a/sql/Updates/0.0.2/r215.sql b/sql/Updates/0.0.2/r215.sql new file mode 100644 index 000000000..90bfbf0e8 --- /dev/null +++ b/sql/Updates/0.0.2/r215.sql @@ -0,0 +1 @@ +UPDATE `item_template` SET `ScriptName` = 'item_skin_of_purest_water' WHERE `entry` = 23751; diff --git a/sql/Updates/0.0.2/r218.sql b/sql/Updates/0.0.2/r218.sql new file mode 100644 index 000000000..e6eeb7782 --- /dev/null +++ b/sql/Updates/0.0.2/r218.sql @@ -0,0 +1,5 @@ +-- misc quest related +UPDATE `creature_template` SET `ScriptName` = 'npc_restless_apparition' WHERE `entry` = 23861; +UPDATE `creature_template` SET `ScriptName` = 'mobs_direhorn_grimtotem' WHERE `entry` = 23595; +UPDATE `creature_template` SET `ScriptName` = 'mobs_risen_husk_spirit' WHERE `entry` IN (23554, 23555); + diff --git a/sql/Updates/0.0.2/r219.sql b/sql/Updates/0.0.2/r219.sql new file mode 100644 index 000000000..8b01dd437 --- /dev/null +++ b/sql/Updates/0.0.2/r219.sql @@ -0,0 +1,3 @@ +/* Fix for Wrong ZG Update */ +UPDATE `creature_template` SET `ScriptName` = ' ' WHERE `entry` = 14607; +UPDATE `creature_template` SET `ScriptName` = ' ' WHERE `entry` = 15295; \ No newline at end of file diff --git a/sql/Updates/0.0.2/r221_scriptdev2.sql b/sql/Updates/0.0.2/r221_scriptdev2.sql new file mode 100644 index 000000000..06cd43345 --- /dev/null +++ b/sql/Updates/0.0.2/r221_scriptdev2.sql @@ -0,0 +1 @@ +ALTER TABLE `eventai_Scripts` RENAME TO `eventai_scripts`; \ No newline at end of file diff --git a/sql/Updates/0.0.2/r227_scriptdev2.sql b/sql/Updates/0.0.2/r227_scriptdev2.sql new file mode 100644 index 000000000..3b22874e7 --- /dev/null +++ b/sql/Updates/0.0.2/r227_scriptdev2.sql @@ -0,0 +1,28 @@ +ALTER TABLE `eventai_scripts` + DROP PRIMARY KEY, + DROP `id`, + ADD `id` int(11) unsigned NOT NULL COMMENT 'Identifier' PRIMARY KEY AUTO_INCREMENT FIRST, + + MODIFY `event_param1` int(11) signed NOT NULL default '0', + MODIFY `event_param2` int(11) signed NOT NULL default '0', + MODIFY `event_param3` int(11) signed NOT NULL default '0', + + MODIFY `action1_param1` int(11) signed NOT NULL default '0', + MODIFY `action1_param2` int(11) signed NOT NULL default '0', + MODIFY `action1_param3` int(11) signed NOT NULL default '0', + + MODIFY `action2_param1` int(11) signed NOT NULL default '0', + MODIFY `action2_param2` int(11) signed NOT NULL default '0', + MODIFY `action2_param3` int(11) signed NOT NULL default '0', + + MODIFY `action3_param1` int(11) signed NOT NULL default '0', + MODIFY `action3_param2` int(11) signed NOT NULL default '0', + MODIFY `action3_param3` int(11) signed NOT NULL default '0', + + ADD `comment` varchar(255) NOT NULL default '' COMMENT 'Event Comment'; + +ALTER TABLE `localized_texts` + DROP PRIMARY KEY, + DROP `id`, + ADD `id` int(11) unsigned NOT NULL COMMENT 'Identifier' PRIMARY KEY AUTO_INCREMENT FIRST, + ADD `comment` varchar(255) NOT NULL default '' COMMENT 'Text Comment'; diff --git a/sql/Updates/0.0.2/r230_mangos.sql b/sql/Updates/0.0.2/r230_mangos.sql new file mode 100644 index 000000000..4db445125 --- /dev/null +++ b/sql/Updates/0.0.2/r230_mangos.sql @@ -0,0 +1,2 @@ +UPDATE `creature_template` SET `ScriptName` = 'npc_deserter_agitator' WHERE `entry` = 23602; +UPDATE `gameobject_template` SET `ScriptName` = 'go_field_repair_bot_74A' where `entry`= 179552; diff --git a/sql/Updates/0.0.2/r234_mangos.sql b/sql/Updates/0.0.2/r234_mangos.sql new file mode 100644 index 000000000..8a72910ad --- /dev/null +++ b/sql/Updates/0.0.2/r234_mangos.sql @@ -0,0 +1,2 @@ +UPDATE `creature_template` SET `ScriptName` = 'npc_screecher_spirit' WHERE `entry` = 8612; +UPDATE `item_template` SET `ScriptName` = 'item_yehkinyas_bramble' WHERE `entry`= 10699; diff --git a/sql/Updates/0.0.2/r237_mangos.sql b/sql/Updates/0.0.2/r237_mangos.sql new file mode 100644 index 000000000..265bde228 --- /dev/null +++ b/sql/Updates/0.0.2/r237_mangos.sql @@ -0,0 +1,6 @@ +-- new +UPDATE `creature_template` SET `ScriptName` = 'guard_azuremyst' WHERE `entry` = 18038; +UPDATE `creature_template` SET `ScriptName` = 'guard_eversong' WHERE `entry` = 16221; +-- update +UPDATE `creature_template` SET `ScriptName` = 'guard_durotar' WHERE `entry` = 5953; +UPDATE `creature_template` SET `ScriptName` = '' WHERE `entry` IN (3210, 3211, 3213, 3214, 1736, 1739, 1737); diff --git a/sql/Updates/0.0.2/r238_mangos.sql b/sql/Updates/0.0.2/r238_mangos.sql new file mode 100644 index 000000000..d148e11f8 --- /dev/null +++ b/sql/Updates/0.0.2/r238_mangos.sql @@ -0,0 +1,2 @@ +-- revert previously bad sql +UPDATE `creature_template` SET `ScriptName` = '' WHERE `ScriptName` LIKE '%innkeeper%' AND `npcflag` & 128<>0; diff --git a/sql/Updates/0.0.2/r239_mangos.sql b/sql/Updates/0.0.2/r239_mangos.sql new file mode 100644 index 000000000..8936e4d8f --- /dev/null +++ b/sql/Updates/0.0.2/r239_mangos.sql @@ -0,0 +1 @@ +UPDATE `item_template` SET `ScriptName` = '' WHERE `entry` = 23268; diff --git a/sql/Updates/0.0.2/r240_scriptdev2.sql b/sql/Updates/0.0.2/r240_scriptdev2.sql new file mode 100644 index 000000000..635ee46b1 --- /dev/null +++ b/sql/Updates/0.0.2/r240_scriptdev2.sql @@ -0,0 +1,2 @@ +ALTER TABLE `eventai_scripts` +ADD `event_inverse_phase_mask` int(11) signed NOT NULL default '0', COMMENT 'Mask which phases this event will not trigger in'; \ No newline at end of file diff --git a/sql/Updates/0.0.2/r241_mangos.sql b/sql/Updates/0.0.2/r241_mangos.sql new file mode 100644 index 000000000..ffc99c200 --- /dev/null +++ b/sql/Updates/0.0.2/r241_mangos.sql @@ -0,0 +1,2 @@ +UPDATE `creature_template` SET `ScriptName` = 'npc_skyguard_handler_irena' WHERE `entry` = 23413; +UPDATE `creature_template` SET `ScriptName` = 'npc_skyguard_handler_deesak' WHERE `entry` = 23415; diff --git a/sql/Updates/0.0.2/r242_mangos.sql b/sql/Updates/0.0.2/r242_mangos.sql new file mode 100644 index 000000000..49465a656 --- /dev/null +++ b/sql/Updates/0.0.2/r242_mangos.sql @@ -0,0 +1,2 @@ +UPDATE `creature_template` SET `ScriptName` = 'npc_zamael_lunthistle' WHERE `entry` = 8436; +UPDATE `creature_template` SET `ScriptName` = 'npc_lothos_riftwaker' WHERE `entry` = 14387; diff --git a/sql/Updates/0.0.2/r243_mangos.sql b/sql/Updates/0.0.2/r243_mangos.sql new file mode 100644 index 000000000..6b1ad08d0 --- /dev/null +++ b/sql/Updates/0.0.2/r243_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName` = 'npc_marin_noggenfogger' WHERE `entry` = 7564; diff --git a/sql/Updates/0.0.2/r249_mangos.sql b/sql/Updates/0.0.2/r249_mangos.sql new file mode 100644 index 000000000..cf0c36ef4 --- /dev/null +++ b/sql/Updates/0.0.2/r249_mangos.sql @@ -0,0 +1,3 @@ +UPDATE `creature_template` SET `ScriptName` = 'mob_flamewaker_priest' WHERE `entry` = 11662; +UPDATE `creature_template` SET `ScriptName` = 'boss_datrohan_balnazzar' WHERE `entry` = 10812; + diff --git a/sql/Updates/0.0.2/r250_mangos.sql b/sql/Updates/0.0.2/r250_mangos.sql new file mode 100644 index 000000000..66c0d7642 --- /dev/null +++ b/sql/Updates/0.0.2/r250_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName` = 'boss_dathrohan_balnazzar' WHERE `entry` = 10812; diff --git a/sql/Updates/0.0.2/r253_mangos.sql b/sql/Updates/0.0.2/r253_mangos.sql new file mode 100644 index 000000000..424237be2 --- /dev/null +++ b/sql/Updates/0.0.2/r253_mangos.sql @@ -0,0 +1 @@ +UPDATE `item_template` SET `ScriptName` = 'item_zezzaks_shard' WHERE `entry` = 31463; \ No newline at end of file diff --git a/sql/Updates/0.0.2/r255_mangos.sql b/sql/Updates/0.0.2/r255_mangos.sql new file mode 100644 index 000000000..04d095f0d --- /dev/null +++ b/sql/Updates/0.0.2/r255_mangos.sql @@ -0,0 +1,5 @@ +UPDATE instance_template SET script = 'instance_zulaman' WHERE map = 568; +UPDATE creature_template SET scriptname='boss_janalai' WHERE entry=23578; +UPDATE creature_template SET scriptname='mob_jandalai_firebomb' WHERE entry=23920; +UPDATE creature_template SET scriptname='mob_amanishi_hatcher' WHERE entry=23818; +UPDATE creature_template SET scriptname='mob_hatchling' WHERE entry=23598; diff --git a/sql/Updates/0.0.2/r256_mangos.sql b/sql/Updates/0.0.2/r256_mangos.sql new file mode 100644 index 000000000..420745411 --- /dev/null +++ b/sql/Updates/0.0.2/r256_mangos.sql @@ -0,0 +1,35 @@ +UPDATE creature_template SET ScriptName = 'npc_tyrande_whisperwind' WHERE entry = 17948; +UPDATE creature_template SET ScriptName = 'npc_thrall' WHERE entry = 17852; +UPDATE creature_template SET ScriptName = 'npc_jaina_proudmoore' WHERE entry = 17772; + +UPDATE creature_template SET ScriptName = 'npc_akama_shade' WHERE entry = 23089; -- Akama at Shade of Akama +UPDATE creature_template SET ScriptName = 'npc_akama_illidan' WHERE entry = 22990; -- Akama at Illidan +UPDATE creature_template SET ScriptName = 'illidari_council' WHERE entry = 23426; -- Illidari Council controller mob +UPDATE creature_template SET ScriptName = 'boss_veras_darkshadow' WHERE entry = 22952; -- Rogue of Illidari Council +UPDATE creature_template SET ScriptName = 'boss_teron_gorefiend' WHERE entry = 22871; -- Teron Gorefiend +UPDATE creature_template SET ScriptName = 'boss_supremus' WHERE entry = 22898; -- Supremus +UPDATE creature_template SET ScriptName = 'boss_shade_of_akama' WHERE entry = 22841; -- Shade of Akama +UPDATE creature_template SET ScriptName = 'boss_reliquary_of_souls' WHERE entry = 22856; -- Reliquary Controller Mob +UPDATE creature_template SET ScriptName = 'boss_essence_of_suffering' WHERE entry = 23418; -- Essence Of Suffering +UPDATE creature_template SET ScriptName = 'boss_essence_of_desire' WHERE entry = 23419; -- Essence of Desire +UPDATE creature_template SET ScriptName = 'boss_essence_of_anger' WHERE entry = 23420; -- Essence of Anger +UPDATE creature_template SET ScriptName = 'boss_najentus' WHERE entry = 22887; -- High Warlord Naj'entus +UPDATE creature_template SET ScriptName = 'boss_gurtogg_bloodboil' WHERE entry = 22948; -- Gurtogg Bloodboil +UPDATE creature_template SET ScriptName = 'boss_mother_shahraz' WHERE entry = 22947; -- Mother Shahraz +UPDATE creature_template SET ScriptName = 'boss_lady_malande' WHERE entry = 22951; -- Priest <3 at Illidari Council +UPDATE creature_template SET ScriptName = 'boss_illidan_stormrage' WHERE entry = 22917; -- Illidan The Betrayer! +UPDATE creature_template SET ScriptName = 'boss_high_nethermancer_zerevor' WHERE entry = 22950; -- Mage at Illidari Council +UPDATE creature_template SET ScriptName = 'boss_gathios_the_shatterer' WHERE entry = 22949; -- Paladin at Illidari Council +UPDATE creature_template SET ScriptName = 'boss_maiev_shadowsong' WHERE entry = 23197; -- Maiev Shadowsong +UPDATE creature_template SET ScriptName = 'mob_blaze' WHERE entry = 23259; -- Blaze mob in Illidan Phase 2 +UPDATE creature_template SET ScriptName = 'mob_flame_of_azzinoth' WHERE entry = 22997; -- Flame of Azzinoth (Illidan Phase 2) +UPDATE creature_template SET ScriptName = 'mob_demon_fire' WHERE entry = 23069; -- Demon Fire in Illidan Phase 2 +UPDATE creature_template SET ScriptName = 'mob_flame_crash' WHERE entry = 23336; -- Flame Crash in Illidan Normal Form +UPDATE creature_template SET ScriptName = 'mob_cage_trap_trigger' WHERE entry = 23304; -- Cage Trap mob in Illidan Phase 3/4 Normal +UPDATE creature_template SET ScriptName = 'mob_shadow_demon' WHERE entry = 23375; -- Shadow Demon in Illidan Demon Form +UPDATE creature_template SET ScriptName = 'npc_volcano' WHERE entry = 23085; -- Supremus Volcano +UPDATE creature_template SET ScriptName = 'molten_flame' WHERE entry = 23095; -- Molten Flame in SUpremus +UPDATE creature_template SET ScriptName = 'mob_ashtongue_channeler' WHERE entry = 23421; -- Ashtongue CHanneler in Shade of AKama +UPDATE creature_template SET ScriptName = 'mob_ashtongue_sorcerer' WHERE entry = 23215; -- Ashtongue Sorcerer in Shade of Akama +UPDATE creature_template SET ScriptName = 'npc_enslaved_soul' WHERE entry = 23469; -- Enslaved Soul in Reliquary Event +-- UPDATE creature_template SET ScriptName = 'mob_najentus_spine' WHERE entry = 500000; -- Workaround creature for spine in Najentus event \ No newline at end of file diff --git a/sql/Updates/0.0.2/r257_mangos.sql b/sql/Updates/0.0.2/r257_mangos.sql new file mode 100644 index 000000000..1bed2c9f0 --- /dev/null +++ b/sql/Updates/0.0.2/r257_mangos.sql @@ -0,0 +1,4 @@ +UPDATE `creature_template` SET `ScriptName` = 'npc_archmage_malin' WHERE `entry` = 2708; +UPDATE `creature_template` SET `ScriptName` = 'npc_dashel_stonefist' WHERE `entry` = 4961; +UPDATE `creature_template` SET `ScriptName` = 'npc_doctor' WHERE `entry` IN (12939, 12920); +UPDATE `creature_template` SET `ScriptName` = 'npc_injured_patient' WHERE `entry` IN (12936, 12937, 12938, 12923, 12924, 12925); diff --git a/sql/Updates/0.0.2/r258_mangos.sql b/sql/Updates/0.0.2/r258_mangos.sql new file mode 100644 index 000000000..18970d669 --- /dev/null +++ b/sql/Updates/0.0.2/r258_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName` = 'npc_deathly_usher' WHERE `entry` = 8816; diff --git a/sql/Updates/0.0.2/r260_mangos.sql b/sql/Updates/0.0.2/r260_mangos.sql new file mode 100644 index 000000000..e96598d09 --- /dev/null +++ b/sql/Updates/0.0.2/r260_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName` = 'npc_lady_katrana_prestor' WHERE `entry` = 1749; diff --git a/sql/Updates/0.0.2/r261_mangos.sql b/sql/Updates/0.0.2/r261_mangos.sql new file mode 100644 index 000000000..b1c8e6312 --- /dev/null +++ b/sql/Updates/0.0.2/r261_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName` = 'npc_general_marcus_jonathan' WHERE `entry` = 466; diff --git a/sql/Updates/0.0.2/r262_mangos.sql b/sql/Updates/0.0.2/r262_mangos.sql new file mode 100644 index 000000000..225b7c384 --- /dev/null +++ b/sql/Updates/0.0.2/r262_mangos.sql @@ -0,0 +1,3 @@ +UPDATE `creature_template` SET `ScriptName` = 'npc_royal_historian_archesonus' WHERE `entry` = 8879; +UPDATE `creature_template` SET `ScriptName` = 'npc_bunthen_plainswind' WHERE `entry` = 11798; +UPDATE `creature_template` SET `ScriptName` = 'npc_silva_filnaveth' WHERE `entry` = 11800; diff --git a/sql/Updates/0.0.2/r263_mangos.sql b/sql/Updates/0.0.2/r263_mangos.sql new file mode 100644 index 000000000..a3ff56a0b --- /dev/null +++ b/sql/Updates/0.0.2/r263_mangos.sql @@ -0,0 +1,3 @@ +UPDATE `gameobject_template` SET `ScriptName` = 'go_northern_crystal_pylon' WHERE `entry` = 164955; +UPDATE `gameobject_template` SET `ScriptName` = 'go_western_crystal_pylon' WHERE `entry` = 164956; +UPDATE `gameobject_template` SET `ScriptName` = 'go_eastern_crystal_pylon' WHERE `entry` = 164957; diff --git a/sql/Updates/0.0.2/r264_mangos.sql b/sql/Updates/0.0.2/r264_mangos.sql new file mode 100644 index 000000000..410f1de42 --- /dev/null +++ b/sql/Updates/0.0.2/r264_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName` = 'npc_astor_hadren' WHERE `entry` = 6497; diff --git a/sql/Updates/0.0.2/r265_mangos.sql b/sql/Updates/0.0.2/r265_mangos.sql new file mode 100644 index 000000000..4eaed94ee --- /dev/null +++ b/sql/Updates/0.0.2/r265_mangos.sql @@ -0,0 +1,9 @@ +UPDATE `item_template` SET `ScriptName` = 'item_nether_wraith_beacon' WHERE `entry` = 31742; +UPDATE `item_template` SET `ScriptName` = 'item_area_52_special' WHERE `entry` = 28132; +UPDATE `item_template` SET `ScriptName` = 'item_vorenthals_presence' WHERE `entry` = 30259; +UPDATE `item_template` SET `ScriptName` = 'item_draenei_fishing_net' WHERE `entry` = 23654; +UPDATE `item_template` SET `ScriptName` = 'item_skin_of_purest_water' WHERE `entry` = 23751; +UPDATE `item_template` SET `ScriptName` = 'item_yehkinyas_bramble' WHERE `entry` = 10699; +UPDATE `item_template` SET `ScriptName` = 'item_zezzaks_shard' WHERE `entry` = 31463; +UPDATE `creature_template` SET `ScriptName` = '' WHERE `entry` IN (40100,40101,40102,40103,40104,40105,40106,40107,40108,40109,40110,40111,40112,40113); +UPDATE `creature_template` SET `ScriptName` = '' WHERE `entry` IN (40200,40201,40202,40203,40204,40205,40206,40207,40208,40209,40210,40211,40212,40213); diff --git a/sql/Updates/0.0.2/r269_mangos.sql b/sql/Updates/0.0.2/r269_mangos.sql new file mode 100644 index 000000000..95ed71530 --- /dev/null +++ b/sql/Updates/0.0.2/r269_mangos.sql @@ -0,0 +1,6 @@ +-- removing old script names that does no longer exist +UPDATE `creature_template` SET `ScriptName` = '' WHERE `entry` IN (12198,14982,857,12197,7427,347,15007,2804); +UPDATE `creature_template` SET `ScriptName` = '' WHERE `entry` IN (9564,12136,3149,12137,9566,3150,9559,9558); +UPDATE `creature_template` SET `ScriptName` = '' WHERE `entry` = 197; +UPDATE `creature_template` SET `ScriptName` = '' WHERE `entry` IN (11328, 11260); +UPDATE `creature_template` SET `ScriptName` = '' WHERE `entry` IN (80, 1236, 3578, 40, 1358, 1360, 5996, 1426, 1094, 674); diff --git a/sql/Updates/0.0.2/r270_mangos.sql b/sql/Updates/0.0.2/r270_mangos.sql new file mode 100644 index 000000000..2d7ffe0c4 --- /dev/null +++ b/sql/Updates/0.0.2/r270_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName` = 'npc_overseer_nuaar' WHERE `entry` = 21981; diff --git a/sql/Updates/0.0.2/r271_mangos.sql b/sql/Updates/0.0.2/r271_mangos.sql new file mode 100644 index 000000000..74fcb0228 --- /dev/null +++ b/sql/Updates/0.0.2/r271_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName` = 'npc_greatmother_geyah' WHERE `entry` = 18141; diff --git a/sql/Updates/0.0.2/r272_mangos.sql b/sql/Updates/0.0.2/r272_mangos.sql new file mode 100644 index 000000000..3e5313f20 --- /dev/null +++ b/sql/Updates/0.0.2/r272_mangos.sql @@ -0,0 +1,8 @@ +UPDATE `creature_template` SET `ScriptName` = 'boss_kaelthas' WHERE `entry` = 23054; +UPDATE `creature_template` SET `ScriptName` = 'boss_thaladred_the_darkener' WHERE `entry` = 20064; +UPDATE `creature_template` SET `ScriptName` = 'boss_lord_sanguinar' WHERE `entry` = 20060; +UPDATE `creature_template` SET `ScriptName` = 'boss_grand_astromancer_capernian' WHERE `entry` = 20062; +UPDATE `creature_template` SET `ScriptName` = 'boss_master_engineer_telonicus' WHERE `entry` = 20063; +UPDATE `creature_template` SET `ScriptName` = 'mob_phoenix' WHERE `entry` = 21362; +UPDATE `creature_template` SET `ScriptName` = 'mob_nether_vapor' WHERE `entry` = 21002; +UPDATE `creature_template` SET `ScriptName` = 'mob_kael_flamestrike' WHERE `entry` = 21369; \ No newline at end of file diff --git a/sql/Updates/0.0.2/r273_mangos.sql b/sql/Updates/0.0.2/r273_mangos.sql new file mode 100644 index 000000000..db98e282f --- /dev/null +++ b/sql/Updates/0.0.2/r273_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName` = 'npc_saikkal_the_elder' WHERE `entry` = 22932; diff --git a/sql/Updates/0.0.2/r274_mangos.sql b/sql/Updates/0.0.2/r274_mangos.sql new file mode 100644 index 000000000..fef98f84e --- /dev/null +++ b/sql/Updates/0.0.2/r274_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName` = 'mob_blackwing_lair' WHERE `entry` = 12557; diff --git a/sql/Updates/0.0.2/r275_mangos.sql b/sql/Updates/0.0.2/r275_mangos.sql new file mode 100644 index 000000000..618666b80 --- /dev/null +++ b/sql/Updates/0.0.2/r275_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName` = 'mob_shade_of_jindo' WHERE `entry` = 14986; diff --git a/sql/Updates/0.0.2/r281_scriptdev2.sql b/sql/Updates/0.0.2/r281_scriptdev2.sql new file mode 100644 index 000000000..719d1ee78 --- /dev/null +++ b/sql/Updates/0.0.2/r281_scriptdev2.sql @@ -0,0 +1,35 @@ +ALTER TABLE eventai_scripts +ADD event_chance tinyint(3) unsigned NOT NULL default 100 AFTER event_inverse_phase_mask; + +-- EVENT_T_TIMER_REPEAT +UPDATE eventai_scripts SET event_chance = -event_param3 WHERE event_type = 0 AND event_param3 < 0; + +-- EVENT_T_TIMER_SINGLE +UPDATE eventai_scripts SET event_chance = event_param2 WHERE event_type = 1; + +-- EVENT_T_TIMER_OOC_REPEAT +UPDATE eventai_scripts SET event_chance = -event_param3 WHERE event_type = 2 AND event_param3 < 0; + +-- EVENT_T_TIMER_OOC_SINGLE +UPDATE eventai_scripts SET event_chance = event_param2 WHERE event_type = 3; + +-- EVENT_T_HP_SINGLE +UPDATE eventai_scripts SET event_chance = -event_param3 WHERE event_type = 4 AND event_param3 < 0; + +-- EVENT_T_MANA_SINGLE +UPDATE eventai_scripts SET event_chance = -event_param3 WHERE event_type = 5 AND event_param3 < 0; + +-- EVENT_T_AGGRO +UPDATE eventai_scripts SET event_chance = event_param1 WHERE event_type = 6; + +-- EVENT_T_KILL +UPDATE eventai_scripts SET event_chance = event_param2 WHERE event_type = 7; + +-- EVENT_T_DEATH +UPDATE eventai_scripts SET event_chance = event_param1 WHERE event_type = 8; + +-- EVENT_T_EVADE +UPDATE eventai_scripts SET event_chance = event_param1 WHERE event_type = 9; + +-- EVENT_T_SPELLHIT +UPDATE eventai_scripts SET event_chance = event_param3 WHERE event_type = 10; \ No newline at end of file diff --git a/sql/Updates/0.0.2/r282_mangos.sql b/sql/Updates/0.0.2/r282_mangos.sql new file mode 100644 index 000000000..93ea05852 --- /dev/null +++ b/sql/Updates/0.0.2/r282_mangos.sql @@ -0,0 +1,38 @@ +UPDATE creature_template SET ScriptName = 'npc_tyrande_whisperwind' WHERE entry = 17948; +UPDATE creature_template SET ScriptName = 'npc_thrall' WHERE entry = 17852; +UPDATE creature_template SET ScriptName = 'npc_jaina_proudmoore' WHERE entry = 17772; + +UPDATE creature_template SET ScriptName = 'npc_akama_shade' WHERE entry = 23089; -- Akama at Shade of Akama +UPDATE creature_template SET ScriptName = 'npc_akama_illidan' WHERE entry = 22990; -- Akama at Illidan +UPDATE creature_template SET ScriptName = 'illidari_council' WHERE entry = 23426; -- Illidari Council controller mob +UPDATE creature_template SET ScriptName = 'boss_veras_darkshadow' WHERE entry = 22952; -- Rogue of Illidari Council +UPDATE creature_template SET ScriptName = 'boss_teron_gorefiend' WHERE entry = 22871; -- Teron Gorefiend +UPDATE creature_template SET ScriptName = 'boss_supremus' WHERE entry = 22898; -- Supremus +UPDATE creature_template SET ScriptName = 'boss_shade_of_akama' WHERE entry = 22841; -- Shade of Akama +UPDATE creature_template SET ScriptName = 'boss_reliquary_of_souls' WHERE entry = 22856; -- Reliquary Controller Mob +UPDATE creature_template SET ScriptName = 'boss_essence_of_suffering' WHERE entry = 23418; -- Essence Of Suffering +UPDATE creature_template SET ScriptName = 'boss_essence_of_desire' WHERE entry = 23419; -- Essence of Desire +UPDATE creature_template SET ScriptName = 'boss_essence_of_anger' WHERE entry = 23420; -- Essence of Anger +UPDATE creature_template SET ScriptName = 'boss_najentus' WHERE entry = 22887; -- High Warlord Naj'entus +UPDATE creature_template SET ScriptName = 'boss_gurtogg_bloodboil' WHERE entry = 22948; -- Gurtogg Bloodboil +UPDATE creature_template SET ScriptName = 'boss_mother_shahraz' WHERE entry = 22947; -- Mother Shahraz +UPDATE creature_template SET ScriptName = 'boss_lady_malande' WHERE entry = 22951; -- Priest <3 at Illidari Council +UPDATE creature_template SET ScriptName = 'boss_illidan_stormrage' WHERE entry = 22917; -- Illidan The Betrayer! +UPDATE creature_template SET ScriptName = 'boss_high_nethermancer_zerevor' WHERE entry = 22950; -- Mage at Illidari Council +UPDATE creature_template SET ScriptName = 'boss_gathios_the_shatterer' WHERE entry = 22949; -- Paladin at Illidari Council +UPDATE creature_template SET ScriptName = 'boss_maiev_shadowsong' WHERE entry = 23197; -- Maiev Shadowsong +UPDATE creature_template SET ScriptName = 'mob_blaze' WHERE entry = 23259; -- Blaze mob in Illidan Phase 2 +UPDATE creature_template SET ScriptName = 'mob_flame_of_azzinoth' WHERE entry = 22997; -- Flame of Azzinoth (Illidan Phase 2) +UPDATE creature_template SET ScriptName = 'mob_blade_of_azzinoth' WHERE entry = 22996; -- Blade of Azzinoth (Illidan Phase 2) +UPDATE creature_template SET ScriptName = 'mob_demon_fire' WHERE entry = 23069; -- Demon Fire in Illidan Phase 2 +UPDATE creature_template SET ScriptName = 'mob_flame_crash' WHERE entry = 23336; -- Flame Crash in Illidan Normal Form +UPDATE creature_template SET ScriptName = 'mob_cage_trap_trigger' WHERE entry = 23304; -- Cage Trap mob in Illidan Phase 3/4 Normal +UPDATE creature_template SET ScriptName = 'mob_shadow_demon' WHERE entry = 23375; -- Shadow Demon in Illidan Demon Form +UPDATE creature_template SET ScriptName = 'npc_volcano' WHERE entry = 23085; -- Supremus Volcano +UPDATE creature_template SET ScriptName = 'molten_flame' WHERE entry = 23095; -- Molten Flame in SUpremus +UPDATE creature_template SET ScriptName = 'mob_ashtongue_channeler' WHERE entry = 23421; -- Ashtongue CHanneler in Shade of AKama +UPDATE creature_template SET ScriptName = 'mob_ashtongue_sorcerer' WHERE entry = 23215; -- Ashtongue Sorcerer in Shade of Akama +UPDATE creature_template SET ScriptName = 'npc_enslaved_soul' WHERE entry = 23469; -- Enslaved Soul in Reliquary Event +UPDATE creature_template SET ScriptName = 'mob_doom_blossom' WHERE entry = 23123; -- Doom Blossoms in Teron Gorefiend's encounter +-- UPDATE creature_template sET ScriptName = 'mob_shadowy_construct' WHERE entry = 23111; -- Shadowy Construct in Teron Gorefiend's encounter. Commented until Mind Control is implemented. +-- UPDATE creature_template SET ScriptName = 'mob_najentus_spine' WHERE entry = 500000; -- Workaround creature for spine in Najentus event diff --git a/sql/Updates/0.0.2/r286_mangos.sql b/sql/Updates/0.0.2/r286_mangos.sql new file mode 100644 index 000000000..d1d0a14df --- /dev/null +++ b/sql/Updates/0.0.2/r286_mangos.sql @@ -0,0 +1,2 @@ +-- Items +UPDATE `item_template` SET `ScriptName` = '' WHERE `entry` = 23751; -- Remove script for Skin of Purest Water \ No newline at end of file diff --git a/sql/Updates/0.0.2/r289_mangos.sql b/sql/Updates/0.0.2/r289_mangos.sql new file mode 100644 index 000000000..48e08ebb8 --- /dev/null +++ b/sql/Updates/0.0.2/r289_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `scriptname` = 'npc_creditmarker_visit_with_ancestors' WHERE `entry` IN (18840,18841,18842,18843); \ No newline at end of file diff --git a/sql/Updates/0.0.2/r291_mangos.sql b/sql/Updates/0.0.2/r291_mangos.sql new file mode 100644 index 000000000..a85fb7bf3 --- /dev/null +++ b/sql/Updates/0.0.2/r291_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName` = 'mob_spawn_of_fankriss' WHERE `entry` = 15630; \ No newline at end of file diff --git a/sql/Updates/0.0.2/r295_mangos.sql b/sql/Updates/0.0.2/r295_mangos.sql new file mode 100644 index 000000000..b992e0ee6 --- /dev/null +++ b/sql/Updates/0.0.2/r295_mangos.sql @@ -0,0 +1,2 @@ +UPDATE `instance_template` SET `script` = 'instance_stratholme' WHERE `map` = 329; +UPDATE `creature_template` SET `ScriptName` = 'boss_silver_hand_bosses' WHERE `entry` IN (17910, 17911, 17912, 17913, 17914); diff --git a/sql/Updates/0.0.2/r297_mangos.sql b/sql/Updates/0.0.2/r297_mangos.sql new file mode 100644 index 000000000..702013c46 --- /dev/null +++ b/sql/Updates/0.0.2/r297_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName` = 'npc_berthold' WHERE `entry` = 16153; diff --git a/sql/Updates/0.0.2/r298_scriptdev2.sql b/sql/Updates/0.0.2/r298_scriptdev2.sql new file mode 100644 index 000000000..953baee55 --- /dev/null +++ b/sql/Updates/0.0.2/r298_scriptdev2.sql @@ -0,0 +1,2 @@ +-- EVENT_T_SPELLHIT +UPDATE eventai_scripts SET event_param3 = event_param2, event_param2 = -1 WHERE event_type = 10; \ No newline at end of file diff --git a/sql/Updates/0.0.2/r299_scriptdev2.sql b/sql/Updates/0.0.2/r299_scriptdev2.sql new file mode 100644 index 000000000..8b835b0ed --- /dev/null +++ b/sql/Updates/0.0.2/r299_scriptdev2.sql @@ -0,0 +1,9 @@ +CREATE TABLE `eventai_summons` ( +`id` int(11) unsigned NOT NULL COMMENT 'Location Identifier' AUTO_INCREMENT, +`position_x` float NOT NULL default '0', +`position_y` float NOT NULL default '0', +`position_z` float NOT NULL default '0', +`orientation` float NOT NULL default '0', +`spawntimesecs` int(11) unsigned NOT NULL default '120', +PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='EventAI Summoning Locations'; \ No newline at end of file diff --git a/sql/Updates/0.0.2/r304_mangos.sql b/sql/Updates/0.0.2/r304_mangos.sql new file mode 100644 index 000000000..2a6ed9c0f --- /dev/null +++ b/sql/Updates/0.0.2/r304_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName` = '' WHERE `entry` IN (15440, 15612); diff --git a/sql/Updates/0.0.2/r306_scriptdev2.sql b/sql/Updates/0.0.2/r306_scriptdev2.sql new file mode 100644 index 000000000..60eac88d0 --- /dev/null +++ b/sql/Updates/0.0.2/r306_scriptdev2.sql @@ -0,0 +1,4 @@ +DROP TABLE IF EXISTS `db_version`; +CREATE TABLE `db_version` ( +`version` varchar(255) NOT NULL default '' COMMENT 'Database version string' +) ENGINE=MyISAM DEFAULT CHARSET=utf8; \ No newline at end of file diff --git a/sql/Updates/0.0.2/r307_mangos.sql b/sql/Updates/0.0.2/r307_mangos.sql new file mode 100644 index 000000000..e239d4070 --- /dev/null +++ b/sql/Updates/0.0.2/r307_mangos.sql @@ -0,0 +1,4 @@ +UPDATE `creature_template` SET `ScriptName` = 'npcs_dithers_and_arbington' WHERE `entry` IN (11056, 11057); +UPDATE `creature_template` SET `ScriptName` = 'npc_witch_doctor_mauari' WHERE `entry` = 10307; +UPDATE `creature_template` SET `ScriptName` = 'npcs_riverbreeze_and_silversky' WHERE `entry` IN (9528, 9529); +UPDATE `creature_template` SET `ScriptName` = 'npc_sayge' WHERE `entry` = 14822; diff --git a/sql/Updates/0.0.2/r308_mangos.sql b/sql/Updates/0.0.2/r308_mangos.sql new file mode 100644 index 000000000..b3c16a914 --- /dev/null +++ b/sql/Updates/0.0.2/r308_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName` = 'npc_nat_pagle' WHERE `entry` = 12919; diff --git a/sql/Updates/0.0.2/r309_mangos.sql b/sql/Updates/0.0.2/r309_mangos.sql new file mode 100644 index 000000000..03bd078c7 --- /dev/null +++ b/sql/Updates/0.0.2/r309_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName` = 'mob_webbed_creature' WHERE `entry` = 17680; diff --git a/sql/Updates/0.0.2/r311_mangos.sql b/sql/Updates/0.0.2/r311_mangos.sql new file mode 100644 index 000000000..22cb32562 --- /dev/null +++ b/sql/Updates/0.0.2/r311_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName` = 'npc_invis_legion_teleporter' WHERE `entry` = 21807; diff --git a/sql/Updates/0.0.2/r312_mangos.sql b/sql/Updates/0.0.2/r312_mangos.sql new file mode 100644 index 000000000..978152764 --- /dev/null +++ b/sql/Updates/0.0.2/r312_mangos.sql @@ -0,0 +1,2 @@ +UPDATE `creature_template` SET `ScriptName` = 'npc_captured_sunhawk_agent' WHERE `entry` = 17824; +UPDATE `creature_template` SET `ScriptName` = 'npc_neltharaku' WHERE `entry` = 21657; diff --git a/sql/Updates/0.0.2/r318_mangos.sql b/sql/Updates/0.0.2/r318_mangos.sql new file mode 100644 index 000000000..5ce2afca2 --- /dev/null +++ b/sql/Updates/0.0.2/r318_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName` = 'npcs_flanis_swiftwing_and_kagrosh' WHERE `entry` IN (21725, 21727); diff --git a/sql/Updates/0.0.2/r324_mangos.sql b/sql/Updates/0.0.2/r324_mangos.sql new file mode 100644 index 000000000..4b9fb91dc --- /dev/null +++ b/sql/Updates/0.0.2/r324_mangos.sql @@ -0,0 +1,3 @@ +UPDATE `creature_template` SET `ScriptName` = 'npc_mortog_steamhead' WHERE `entry` = 23373; +UPDATE `creature_template` SET `ScriptName` = 'npc_veronia' WHERE `entry` = 20162; +UPDATE `creature_template` SET `ScriptName` = 'npc_susurrus' WHERE `entry` = 17435; diff --git a/sql/Updates/0.0.2/r327_mangos.sql b/sql/Updates/0.0.2/r327_mangos.sql new file mode 100644 index 000000000..d2d56fdfc --- /dev/null +++ b/sql/Updates/0.0.2/r327_mangos.sql @@ -0,0 +1,5 @@ +-- Sunspring Villagers. +UPDATE `creature_template` SET `ScriptName` = 'mob_sunspring_villager' WHERE `entry` = 18240; + +-- Terestian Illhoof +UPDATE `creature_template` SET `ScriptName` = 'mob_demon_chain' WHERE `entry` = 17248; diff --git a/sql/Updates/0.0.2/r332_scriptdev2.sql b/sql/Updates/0.0.2/r332_scriptdev2.sql new file mode 100644 index 000000000..ea67d3e73 --- /dev/null +++ b/sql/Updates/0.0.2/r332_scriptdev2.sql @@ -0,0 +1,2 @@ +ALTER TABLE eventai_summons +ADD `comment` varchar(255) NOT NULL default '' COMMENT 'Summon Comment' AFTER spawntimesecs; \ No newline at end of file diff --git a/sql/Updates/0.0.2/r333_mangos.sql b/sql/Updates/0.0.2/r333_mangos.sql new file mode 100644 index 000000000..48a7f673f --- /dev/null +++ b/sql/Updates/0.0.2/r333_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName` = 'npc_oronok_tornheart' WHERE `entry` = 21183; diff --git a/sql/Updates/0.0.2/r334_mangos.sql b/sql/Updates/0.0.2/r334_mangos.sql new file mode 100644 index 000000000..5d010c622 --- /dev/null +++ b/sql/Updates/0.0.2/r334_mangos.sql @@ -0,0 +1 @@ +UPDATE `instance_template` SET `script` = 'instance_sethekk_halls' WHERE `map` = 556; diff --git a/sql/Updates/0.0.2/r336_mangos.sql b/sql/Updates/0.0.2/r336_mangos.sql new file mode 100644 index 000000000..993b954bb --- /dev/null +++ b/sql/Updates/0.0.2/r336_mangos.sql @@ -0,0 +1,9 @@ +UPDATE `gameobject_template` SET `ScriptName` = 'go_tablet_of_madness' WHERE `entry` = 180368; +UPDATE `creature_template` SET `ScriptName` = 'boss_grilek' WHERE `entry` = 15082; +UPDATE `creature_template` SET `ScriptName` = 'boss_hazzarah' WHERE `entry` = 15083; +UPDATE `creature_template` SET `ScriptName` = 'boss_renataki' WHERE `entry` = 15084; +UPDATE `creature_template` SET `ScriptName` = 'boss_wushoolay' WHERE `entry` = 15085; +UPDATE `creature_template` SET `ScriptName` = 'mobs_zulgurub' WHERE `entry` = 14883; +UPDATE `creature_template` SET `ScriptName` = 'mob_blackwing_lair' WHERE `entry` = 12468; + + diff --git a/sql/Updates/0.0.2/r352_mangos.sql b/sql/Updates/0.0.2/r352_mangos.sql new file mode 100644 index 000000000..a40281bcd --- /dev/null +++ b/sql/Updates/0.0.2/r352_mangos.sql @@ -0,0 +1,23 @@ +-- Moroes +update creature_template set scriptname = "boss_moroes" where entry = 15687; +update creature_template set scriptname = "boss_baroness_dorothea_millstipe" where entry = 19875; +update creature_template set scriptname = "boss_baron_rafe_dreuger" where entry = 19874; +update creature_template set scriptname = "boss_lady_catriona_von_indi" where entry = 19872; +update creature_template set scriptname = "boss_lady_keira_berrybuck" where entry = 17007; +update creature_template set scriptname = "boss_lord_robin_daris" where entry = 19876; +update creature_template set scriptname = "boss_lord_crispin_ference" where entry = 19873; + +-- Barnes +update creature_template set scriptname = "npc_barnes" where entry = 16812; +-- Oz Event +update creature_template set scriptname = "boss_dorothee" where entry = 17535; +update creature_template set scriptname = "boss_strawman" where entry = 17543; +update creature_template set scriptname = "boss_tinhead" where entry = 17547; +update creature_template set scriptname = "boss_roar" where entry = 17546; +update creature_template set scriptname = "boss_crone" where entry = 18168; +-- Hood Event +update creature_template set scriptname = "npc_grandmother" where entry = 17603; +update creature_template set scriptname = "boss_bigbadwolf" where entry = 17521; +-- Romeo and Juliet disabled for now +-- update creature_template set scriptname = "boss_julianne" where entry = 17543; +-- update creature_template set scriptname = "boss_romulo" where entry = 17533; diff --git a/sql/Updates/0.0.2/r355_mangos.sql b/sql/Updates/0.0.2/r355_mangos.sql new file mode 100644 index 000000000..a40281bcd --- /dev/null +++ b/sql/Updates/0.0.2/r355_mangos.sql @@ -0,0 +1,23 @@ +-- Moroes +update creature_template set scriptname = "boss_moroes" where entry = 15687; +update creature_template set scriptname = "boss_baroness_dorothea_millstipe" where entry = 19875; +update creature_template set scriptname = "boss_baron_rafe_dreuger" where entry = 19874; +update creature_template set scriptname = "boss_lady_catriona_von_indi" where entry = 19872; +update creature_template set scriptname = "boss_lady_keira_berrybuck" where entry = 17007; +update creature_template set scriptname = "boss_lord_robin_daris" where entry = 19876; +update creature_template set scriptname = "boss_lord_crispin_ference" where entry = 19873; + +-- Barnes +update creature_template set scriptname = "npc_barnes" where entry = 16812; +-- Oz Event +update creature_template set scriptname = "boss_dorothee" where entry = 17535; +update creature_template set scriptname = "boss_strawman" where entry = 17543; +update creature_template set scriptname = "boss_tinhead" where entry = 17547; +update creature_template set scriptname = "boss_roar" where entry = 17546; +update creature_template set scriptname = "boss_crone" where entry = 18168; +-- Hood Event +update creature_template set scriptname = "npc_grandmother" where entry = 17603; +update creature_template set scriptname = "boss_bigbadwolf" where entry = 17521; +-- Romeo and Juliet disabled for now +-- update creature_template set scriptname = "boss_julianne" where entry = 17543; +-- update creature_template set scriptname = "boss_romulo" where entry = 17533; diff --git a/sql/Updates/0.0.2/r358_mangos.sql b/sql/Updates/0.0.2/r358_mangos.sql new file mode 100644 index 000000000..01db3736d --- /dev/null +++ b/sql/Updates/0.0.2/r358_mangos.sql @@ -0,0 +1 @@ +update creature_template set scriptname = "mob_cyclone" where entry = 18412; \ No newline at end of file diff --git a/sql/Updates/0.0.2/r364_mangos.sql b/sql/Updates/0.0.2/r364_mangos.sql new file mode 100644 index 000000000..d893f4d92 --- /dev/null +++ b/sql/Updates/0.0.2/r364_mangos.sql @@ -0,0 +1,7 @@ +UPDATE `creature_template` SET `ScriptName` = 'npc_ayren_cloudbreaker' WHERE `entry` = 25059; +UPDATE `creature_template` SET `ScriptName` = 'npc_unrestrained_dragonhawk' WHERE `entry` = 25236; +UPDATE `creature_template` SET `ScriptName` = 'npc_sputtervalve' WHERE `entry` = 3442; +UPDATE `creature_template` SET `ScriptName` = 'npc_budd_nedreck' WHERE `entry` = 23559; +UPDATE `creature_template` SET `ScriptName` = 'npc_blood_knight_dawnstar' WHERE `entry` = 17832; +UPDATE `creature_template` SET `ScriptName` = 'npc_stone_watcher_of_norgannon' WHERE `entry` = 7918; +UPDATE `creature_template` SET `ScriptName` = 'npc_lore_keeper_of_norgannon' WHERE `entry` = 7172; diff --git a/sql/Updates/0.0.2/r367_mangos.sql b/sql/Updates/0.0.2/r367_mangos.sql new file mode 100644 index 000000000..29a27c7d7 --- /dev/null +++ b/sql/Updates/0.0.2/r367_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName` = 'mob_aquementas' WHERE `entry` = 9453; diff --git a/sql/Updates/0.0.2/r368_mangos.sql b/sql/Updates/0.0.2/r368_mangos.sql new file mode 100644 index 000000000..b4cf82da0 --- /dev/null +++ b/sql/Updates/0.0.2/r368_mangos.sql @@ -0,0 +1,5 @@ +UPDATE `instance_template` SET `script` = 'instance_shadowfang_keep' WHERE `map` = 33; +UPDATE `creature_template` SET `ScriptName` = 'boss_fenrus' WHERE `entry` = 4274; +UPDATE `creature_template` SET `ScriptName` = 'boss_nandos' WHERE `entry` = 3927; +UPDATE `creature_template` SET `ScriptName` = 'boss_rethilgore' WHERE `entry` = 3914; +UPDATE `creature_template` SET `ScriptName` = 'npc_shadowfang_prisoner' WHERE `entry` IN (3849, 3850); diff --git a/sql/Updates/0.0.2/r369_mangos.sql b/sql/Updates/0.0.2/r369_mangos.sql new file mode 100644 index 000000000..1d053e5f5 --- /dev/null +++ b/sql/Updates/0.0.2/r369_mangos.sql @@ -0,0 +1,5 @@ +UPDATE `creature_template` SET `ScriptName` = 'boss_rage_winterchill' WHERE `entry` = 17767; +UPDATE `creature_template` SET `ScriptName` = 'boss_anetheron' WHERE `entry` = 17808; +UPDATE `creature_template` SET `ScriptName` = 'boss_kazrogal' WHERE `entry` = 17888; +UPDATE `creature_template` SET `ScriptName` = 'boss_azgalor' WHERE `entry` = 17842; +UPDATE `creature_template` SET `ScriptName` = 'mob_echo_of_archimonde' WHERE `entry` = 13083; \ No newline at end of file diff --git a/sql/Updates/0.0.2/r374_mangos.sql b/sql/Updates/0.0.2/r374_mangos.sql new file mode 100644 index 000000000..f430c086f --- /dev/null +++ b/sql/Updates/0.0.2/r374_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName` = 'npc_the_scourge_cauldron' WHERE `entry` = 11152; diff --git a/sql/Updates/0.0.2/r386_mangos.sql b/sql/Updates/0.0.2/r386_mangos.sql new file mode 100644 index 000000000..7913666b5 --- /dev/null +++ b/sql/Updates/0.0.2/r386_mangos.sql @@ -0,0 +1,7 @@ +UPDATE `item_template` SET `ScriptName` = 'item_Sparrowhawk_Net' WHERE `entry` = 32321; +UPDATE `item_template` SET `ScriptName` = 'item_Blackwhelp_Net' WHERE `entry` = 31129; + +UPDATE `creature_template` SET `ScriptName` = 'npc_spirit_of_olum' WHERE `entry` = 23411; + +UPDATE creature_template SET ScriptName='boss_warp_splinter' WHERE entry='17977'; +UPDATE creature_template SET ScriptName='mob_warp_splinter_treant' WHERE entry='19949'; \ No newline at end of file diff --git a/sql/Updates/0.0.2/r417_mangos.sql b/sql/Updates/0.0.2/r417_mangos.sql new file mode 100644 index 000000000..c9c08fe59 --- /dev/null +++ b/sql/Updates/0.0.2/r417_mangos.sql @@ -0,0 +1 @@ +UPDATE `item_template` SET `ScriptName` = 'item_tame_beast_rods' WHERE `entry` IN (15908,15911,15913,15914,15915,15916,15917,15919,15920,15921,15922,15923,23697,23702,23703,23896,23897,23898); diff --git a/sql/Updates/0.0.2/r428_mangos.sql b/sql/Updates/0.0.2/r428_mangos.sql new file mode 100644 index 000000000..997c63633 --- /dev/null +++ b/sql/Updates/0.0.2/r428_mangos.sql @@ -0,0 +1,4 @@ +-- Quest Support 10804 (Kindness) +UPDATE creature_template SET scriptname = 'mob_mature_netherwing_drake' WHERE entry = 21648; +-- Quest Support 10854 (The Force of Neltharaku) +UPDATE creature_template SET scriptname = 'mob_enslaved_netherwing_drake' WHERE entry = 21722; \ No newline at end of file diff --git a/sql/Updates/0.0.2/r431_mangos.sql b/sql/Updates/0.0.2/r431_mangos.sql new file mode 100644 index 000000000..bd8481815 --- /dev/null +++ b/sql/Updates/0.0.2/r431_mangos.sql @@ -0,0 +1,4 @@ +UPDATE `creature_template` SET `ScriptName`='npc_zephyr' WHERE `entry`=25967; +UPDATE `instance_template` SET `script`='instance_old_hillsbrad' WHERE `map`=560; +UPDATE `creature_template` SET `ScriptName`='npc_brazen' WHERE `entry`=18725; +UPDATE `creature_template` SET `ScriptName`='npc_erozion' WHERE `entry`=18723; diff --git a/sql/Updates/0.0.2/r444_mangos.sql b/sql/Updates/0.0.2/r444_mangos.sql new file mode 100644 index 000000000..c45fa7b96 --- /dev/null +++ b/sql/Updates/0.0.2/r444_mangos.sql @@ -0,0 +1,5 @@ +UPDATE `creature_template` SET `ScriptName`='' WHERE `entry`=22120; +UPDATE `creature_template` SET `ScriptName`='mob_fathom_sporebat' WHERE `entry`=22140; +UPDATE `creature_template` SET `ScriptName`='' WHERE `entry`=20318; +UPDATE `creature_template` SET `ScriptName`='mob_eventai' WHERE `entry` IN (3927,3914,4274); +UPDATE `creature_template` SET `ScriptName`='mob_eventai' WHERE `entry` IN (21717,21718,21719,21720,22331,21878,21879,18371,18343,13083,17808); diff --git a/sql/Updates/0.0.2/r445_mangos.sql b/sql/Updates/0.0.2/r445_mangos.sql new file mode 100644 index 000000000..5ca5011dd --- /dev/null +++ b/sql/Updates/0.0.2/r445_mangos.sql @@ -0,0 +1,2 @@ +UPDATE `creature_template` SET `ScriptName`='boss_high_astromancer_solarian' WHERE `entry`=18805; +UPDATE `creature_template` SET `ScriptName`='mob_solarium_priest' WHERE `entry`=18806; diff --git a/sql/Updates/0.0.2/r446_mangos.sql b/sql/Updates/0.0.2/r446_mangos.sql new file mode 100644 index 000000000..a8a819e3b --- /dev/null +++ b/sql/Updates/0.0.2/r446_mangos.sql @@ -0,0 +1,2 @@ +-- Set ACID (mob_eventai) ScriptName for 4 Hyjal-wave bosses +UPDATE `creature_template` SET `ScriptName` = 'mob_eventai' WHERE `entry` IN (17767, 17808, 17888, 17842); diff --git a/sql/Updates/0.0.2/r448_scriptdev2.sql b/sql/Updates/0.0.2/r448_scriptdev2.sql new file mode 100644 index 000000000..66d78082a --- /dev/null +++ b/sql/Updates/0.0.2/r448_scriptdev2.sql @@ -0,0 +1,5 @@ +DROP TABLE IF EXISTS `db_version`; +DROP TABLE IF EXISTS `sd2_db_version`; +CREATE TABLE `sd2_db_version` ( +`version` varchar(255) NOT NULL default '' COMMENT 'Database version string' +) ENGINE=MyISAM DEFAULT CHARSET=utf8; \ No newline at end of file diff --git a/sql/Updates/0.0.2/r462_mangos.sql b/sql/Updates/0.0.2/r462_mangos.sql new file mode 100644 index 000000000..6d8ac269d --- /dev/null +++ b/sql/Updates/0.0.2/r462_mangos.sql @@ -0,0 +1,2 @@ +UPDATE `creature_template` SET `ScriptName`='npc_taretha' WHERE `entry`=18887; +UPDATE `creature_template` SET `ScriptName`='npc_thrall_old_hillsbrad' WHERE `entry`=17876; diff --git a/sql/Updates/0.0.2/r465_mangos.sql b/sql/Updates/0.0.2/r465_mangos.sql new file mode 100644 index 000000000..35d7d3834 --- /dev/null +++ b/sql/Updates/0.0.2/r465_mangos.sql @@ -0,0 +1,3 @@ +UPDATE `creature_template` SET `ScriptName`='boss_harbinger_skyriss' WHERE `entry`=20912; +UPDATE `creature_template` SET `ScriptName`='npc_warden_mellichar' WHERE `entry`=20904; +UPDATE `creature_template` SET `ScriptName`='npc_millhouse_manastorm' WHERE `entry`=20977; diff --git a/sql/Updates/0.0.2/r467_mangos.sql b/sql/Updates/0.0.2/r467_mangos.sql new file mode 100644 index 000000000..711bba7cc --- /dev/null +++ b/sql/Updates/0.0.2/r467_mangos.sql @@ -0,0 +1 @@ +UPDATE `item_template` SET `ScriptName`='item_flying_machine' WHERE `entry` IN (34060,34061); diff --git a/sql/Updates/0.0.2/r473_mangos.sql b/sql/Updates/0.0.2/r473_mangos.sql new file mode 100644 index 000000000..f9918bc1b --- /dev/null +++ b/sql/Updates/0.0.2/r473_mangos.sql @@ -0,0 +1,3 @@ +UPDATE `item_template` SET `ScriptName`='item_soul_cannon' WHERE `entry`=32825; +UPDATE `item_template` SET `ScriptName`='item_sparrowhawk_net' WHERE `entry`=32321; +UPDATE `item_template` SET `ScriptName`='item_blackwhelp_net' WHERE `entry`=31129; diff --git a/sql/Updates/0.0.2/r476_mangos.sql b/sql/Updates/0.0.2/r476_mangos.sql new file mode 100644 index 000000000..998045f21 --- /dev/null +++ b/sql/Updates/0.0.2/r476_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName`='npc_engineer_spark_overgrind' WHERE `entry`=17243; diff --git a/sql/Updates/0.0.2/r477_mangos.sql b/sql/Updates/0.0.2/r477_mangos.sql new file mode 100644 index 000000000..0f9c76c53 --- /dev/null +++ b/sql/Updates/0.0.2/r477_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName`='' WHERE `entry`=19577; diff --git a/sql/Updates/0.0.2/r479_mangos.sql b/sql/Updates/0.0.2/r479_mangos.sql new file mode 100644 index 000000000..216fe0683 --- /dev/null +++ b/sql/Updates/0.0.2/r479_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName`='npc_chicken_cluck' WHERE `entry`=620; diff --git a/sql/Updates/0.0.2/r482_mangos.sql b/sql/Updates/0.0.2/r482_mangos.sql new file mode 100644 index 000000000..b431b85c9 --- /dev/null +++ b/sql/Updates/0.0.2/r482_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName`='npc_dancing_flames' WHERE `entry`=25305; diff --git a/sql/Updates/0.0.2/r484_mangos.sql b/sql/Updates/0.0.2/r484_mangos.sql new file mode 100644 index 000000000..1f4fefd7f --- /dev/null +++ b/sql/Updates/0.0.2/r484_mangos.sql @@ -0,0 +1,8 @@ +-- Quest support 9678 +UPDATE `gameobject_template` SET `ScriptName`='go_gilded_brazier' WHERE `entry` = '181956'; + +-- Archimonde with related creatures. +UPDATE `creature_template` SET `Scriptname` = "boss_archimonde" WHERE `entry` = 17968; +UPDATE `creature_template` SET `ScriptName` = "mob_doomfire" WHERE `entry` = 18095; +UPDATE `creature_template` SET `Scriptname` = "mob_doomfire_targetting" WHERE `entry` = 18104; +UPDATE `creature_template` SET `ScriptName` = "mob_ancient_wisp" WHERE `entry` = 17946; diff --git a/sql/Updates/0.0.2/r486_mangos.sql b/sql/Updates/0.0.2/r486_mangos.sql new file mode 100644 index 000000000..28920abf0 --- /dev/null +++ b/sql/Updates/0.0.2/r486_mangos.sql @@ -0,0 +1 @@ +UPDATE `gameobject_template` SET `ScriptName`='' WHERE `entry`=181956; diff --git a/sql/Updates/0.0.2/r487_mangos.sql b/sql/Updates/0.0.2/r487_mangos.sql new file mode 100644 index 000000000..229be4239 --- /dev/null +++ b/sql/Updates/0.0.2/r487_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName`='npc_prospector_anvilward' WHERE `entry`=15420; diff --git a/sql/Updates/0.0.2/r494_mangos.sql b/sql/Updates/0.0.2/r494_mangos.sql new file mode 100644 index 000000000..c8f5aef5d --- /dev/null +++ b/sql/Updates/0.0.2/r494_mangos.sql @@ -0,0 +1 @@ +UPDATE `gameobject_template` SET `ScriptName` = 'gameobject_cage_trap' WHERE `entry` = 185916; diff --git a/sql/Updates/0.0.2/r501_mangos.sql b/sql/Updates/0.0.2/r501_mangos.sql new file mode 100644 index 000000000..7242f3b8a --- /dev/null +++ b/sql/Updates/0.0.2/r501_mangos.sql @@ -0,0 +1,4 @@ +UPDATE `creature_template` SET `ScriptName`='npc_prof_alchemy' WHERE `entry` IN (17909,19052,22427); +UPDATE `creature_template` SET `ScriptName`='npc_prof_blacksmith' WHERE `entry` IN (5164,11145,11146,11176,11177,11178,11191,11192,11193); +UPDATE `creature_template` SET `ScriptName`='npc_prof_leather' WHERE `entry` IN (7866,7867,7868,7869,7870,7871); +UPDATE `creature_template` SET `ScriptName`='npc_prof_tailor' WHERE `entry` IN (22208,22212,22213); diff --git a/sql/Updates/0.0.2/r513_mangos.sql b/sql/Updates/0.0.2/r513_mangos.sql new file mode 100644 index 000000000..fcc3433fa --- /dev/null +++ b/sql/Updates/0.0.2/r513_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName`='npc_salsalabim' WHERE `entry`=18584; diff --git a/sql/Updates/0.0.2/r514_mangos.sql b/sql/Updates/0.0.2/r514_mangos.sql new file mode 100644 index 000000000..108948250 --- /dev/null +++ b/sql/Updates/0.0.2/r514_mangos.sql @@ -0,0 +1,3 @@ +UPDATE `creature_template` SET `ScriptName`='npc_raliq_the_drunk' WHERE `entry`=18585; +UPDATE `creature_template` SET `ScriptName`='npc_cooshcoosh' WHERE `entry`=18586; +UPDATE `creature_template` SET `ScriptName`='npc_floon' WHERE `entry`=18588; diff --git a/sql/Updates/0.0.2/r515_mangos.sql b/sql/Updates/0.0.2/r515_mangos.sql new file mode 100644 index 000000000..8860641d4 --- /dev/null +++ b/sql/Updates/0.0.2/r515_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName`='npc_murkblood_overseer' WHERE `entry`=23309; diff --git a/sql/Updates/0.0.2/r516_mangos.sql b/sql/Updates/0.0.2/r516_mangos.sql new file mode 100644 index 000000000..76bd7b837 --- /dev/null +++ b/sql/Updates/0.0.2/r516_mangos.sql @@ -0,0 +1,3 @@ +UPDATE `creature_template` SET `ScriptName`='npc_neeru_fireblade' WHERE `entry`=3216; +UPDATE `creature_template` SET `ScriptName`='npc_shenthul' WHERE `entry`=3401; +UPDATE `creature_template` SET `ScriptName`='npc_thrall_warchief' WHERE `entry`=4949; diff --git a/sql/Updates/0.0.2/r517_mangos.sql b/sql/Updates/0.0.2/r517_mangos.sql new file mode 100644 index 000000000..2077e416c --- /dev/null +++ b/sql/Updates/0.0.2/r517_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName`='npc_taskmaster_fizzule' WHERE `entry`=7233; diff --git a/sql/Updates/0.0.2/r518_mangos.sql b/sql/Updates/0.0.2/r518_mangos.sql new file mode 100644 index 000000000..5930aba92 --- /dev/null +++ b/sql/Updates/0.0.2/r518_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName`='npc_rathis_tomber' WHERE `entry`=16224; diff --git a/sql/Updates/0.0.2/r519_mangos.sql b/sql/Updates/0.0.2/r519_mangos.sql new file mode 100644 index 000000000..fa408a043 --- /dev/null +++ b/sql/Updates/0.0.2/r519_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName`='npc_calvin_montague' WHERE `entry`=6784; diff --git a/sql/Updates/0.0.2/r520_mangos.sql b/sql/Updates/0.0.2/r520_mangos.sql new file mode 100644 index 000000000..959ac79be --- /dev/null +++ b/sql/Updates/0.0.2/r520_mangos.sql @@ -0,0 +1,2 @@ +UPDATE `item_template` SET `ScriptName`='item_disciplinary_rod' WHERE `entry`=22473; +UPDATE `item_template` SET `ScriptName`='item_protovoltaic_magneto_collector' WHERE `entry`=30656; diff --git a/sql/Updates/0.0.2/r521_mangos.sql b/sql/Updates/0.0.2/r521_mangos.sql new file mode 100644 index 000000000..37d09546b --- /dev/null +++ b/sql/Updates/0.0.2/r521_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName`='npc_gregan_brewspewer' WHERE `entry`=7775; diff --git a/sql/Updates/0.0.2/r522_mangos.sql b/sql/Updates/0.0.2/r522_mangos.sql new file mode 100644 index 000000000..159e6e838 --- /dev/null +++ b/sql/Updates/0.0.2/r522_mangos.sql @@ -0,0 +1,2 @@ +UPDATE `creature_template` SET `ScriptName`='guard_shattrath_aldor' WHERE `entry`=18549; +UPDATE `creature_template` SET `ScriptName`='guard_shattrath_scryer' WHERE `entry`=18568; diff --git a/sql/Updates/0.0.2/r526_mangos.sql b/sql/Updates/0.0.2/r526_mangos.sql new file mode 100644 index 000000000..2171bed65 --- /dev/null +++ b/sql/Updates/0.0.2/r526_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName`='npc_injured_draenei' WHERE `entry`=16971; diff --git a/sql/Updates/0.0.2/r528_mangos.sql b/sql/Updates/0.0.2/r528_mangos.sql new file mode 100644 index 000000000..90b63aabe --- /dev/null +++ b/sql/Updates/0.0.2/r528_mangos.sql @@ -0,0 +1,2 @@ +UPDATE `creature_template` SET `ScriptName`='npc_skorn_whitecloud' WHERE `entry`=3052; +UPDATE `creature_template` SET `ScriptName`='npc_blood_knight_stillblade' WHERE `entry`=17768; diff --git a/sql/Updates/0.0.2/r533_mangos.sql b/sql/Updates/0.0.2/r533_mangos.sql new file mode 100644 index 000000000..a05d4bfb7 --- /dev/null +++ b/sql/Updates/0.0.2/r533_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName`='npc_augustus_the_touched' WHERE `entry`=12384; diff --git a/sql/Updates/0.0.2/r538_scriptdev2.sql b/sql/Updates/0.0.2/r538_scriptdev2.sql new file mode 100644 index 000000000..92ef9ea24 --- /dev/null +++ b/sql/Updates/0.0.2/r538_scriptdev2.sql @@ -0,0 +1,60 @@ +-- Structure updates + +ALTER TABLE eventai_scripts +ADD event_flags tinyint(3) unsigned NOT NULL default '0' AFTER event_chance; + +ALTER TABLE eventai_scripts +ADD event_param4 int(11) signed NOT NULL default '0' AFTER event_param3; + +-- Event updates + +-- EVENT_T_TIMER_REPEAT +UPDATE eventai_scripts SET event_param4 = event_param3+event_param1, event_param3 = event_param1, event_param1 = event_param2, event_flags = 1 WHERE event_type = 0; + +-- EVENT_T_TIMER_SINGLE +UPDATE eventai_scripts SET event_param4 = event_param3+event_param1, event_param3 = event_param1, event_param1 = event_param2, event_type = 0 WHERE event_type = 1; + +-- EVENT_T_TIMER_OOC_REPEAT +UPDATE eventai_scripts SET event_param4 = event_param3+event_param1, event_param3 = event_param1, event_param1 = event_param2, event_flags = 1, event_type = 1 WHERE event_type = 2; + +-- EVENT_T_TIMER_OOC_SINGLE +UPDATE eventai_scripts SET event_param4 = event_param3+event_param1, event_param3 = event_param1, event_param1 = event_param2, event_type = 1 WHERE event_type = 3; + +-- EVENT_T_HP_SINGLE +UPDATE eventai_scripts SET event_param4 = event_param3, event_flags = 0, event_type = 2 WHERE event_type = 4; + +-- EVENT_T_MANA_SINGLE +UPDATE eventai_scripts SET event_param4 = event_param3, event_flags = 0, event_type = 3 WHERE event_type = 5; + +-- EVENT_T_AGGRO +UPDATE eventai_scripts SET event_type = 4 WHERE event_type = 6; + +-- EVENT_T_KILL +UPDATE eventai_scripts SET event_param2 = event_param1, event_flags = 1, event_type = 5 WHERE event_type = 7; + +-- EVENT_T_DEATH +UPDATE eventai_scripts SET event_type = 6 WHERE event_type = 8; + +-- EVENT_T_EVADE +UPDATE eventai_scripts SET event_type = 7 WHERE event_type = 9; + +-- EVENT_T_SPELLHIT +UPDATE eventai_scripts SET event_param4 = event_param3, event_flags = 1, event_type = 8 WHERE event_type = 10; + +-- EVENT_T_RANGE +UPDATE eventai_scripts SET event_param4 = event_param3, event_flags = 1, event_type = 9 WHERE event_type = 11; + +-- EVENT_T_OOC_LOS +UPDATE eventai_scripts SET event_param4 = event_param3, event_flags = 1, event_type = 10 WHERE event_type = 12; + +-- EVENT_T_SPAWNED +UPDATE eventai_scripts SET event_type = 11 WHERE event_type = 13; + +-- EVENT_T_TARGET_HP +UPDATE eventai_scripts SET event_param4 = event_param3, event_flags = 1, event_type = 12 WHERE event_type = 14; + +-- EVENT_T_TARGET_CASTING +UPDATE eventai_scripts SET event_param2 = event_param1, event_flags = 1, event_type = 13 WHERE event_type = 15; + +-- EVENT_T_FRIENDLY_HP +UPDATE eventai_scripts SET event_param4 = event_param3, event_flags = 1, event_type = 14 WHERE event_type = 16; \ No newline at end of file diff --git a/sql/Updates/0.0.2/r547_mangos.sql b/sql/Updates/0.0.2/r547_mangos.sql new file mode 100644 index 000000000..cc9886202 --- /dev/null +++ b/sql/Updates/0.0.2/r547_mangos.sql @@ -0,0 +1,22 @@ +/* Magister's Terrace */ +UPDATE `instance_template` SET `script` = 'instance_magisters_terrace' WHERE `map` = 585; +UPDATE `creature_template` SET `ScriptName` = 'boss_selin_fireheart' WHERE `entry` = 24723; +UPDATE `creature_template` SET `ScriptName` = 'mob_fel_crystal' WHERE `entry` = 24722; +UPDATE `creature_template` SET `ScriptName` = 'boss_vexallus' WHERE `entry` = 24744; +UPDATE `creature_template` SET `ScriptName` = 'mob_pure_energy' WHERE `entry` = 24745; +UPDATE `creature_template` SET `ScriptName` = 'boss_priestess_delrissa' WHERE `entry` = 24560; +UPDATE `creature_template` SET `ScriptName` = 'boss_kagani_nightstrike' WHERE `entry` = 24557; +UPDATE `creature_template` SET `ScriptName` = 'boss_ellris_duskhallow' WHERE `entry` = 24558; +UPDATE `creature_template` SET `ScriptName` = 'mob_imp' WHERE `entry` = 24656; +UPDATE `creature_template` SET `ScriptName` = 'boss_eramas_brightblaze' WHERE `entry` = 24554; +UPDATE `creature_template` SET `ScriptName` = 'boss_yazzai' WHERE `entry` = 24561; +UPDATE `creature_template` SET `ScriptName` = 'boss_warlord_salaris' WHERE `entry` = 24559; +UPDATE `creature_template` SET `ScriptName` = 'boss_garaxxas' WHERE `entry` = 24555; +UPDATE `creature_template` SET `ScriptName` = 'mob_sliver' WHERE `entry` = 24552; +UPDATE `creature_template` SET `ScriptName` = 'boss_apoko' WHERE `entry` = 24553; +UPDATE `creature_template` SET `ScriptName` = 'boss_zelfan' WHERE `entry` = 24556; +UPDATE `creature_template` SET `ScriptName` = 'boss_felblood_kaelthas' WHERE `entry` = 24664; +UPDATE `creature_template` SET `ScriptName` = 'mob_arcane_sphere' WHERE `entry` = 24708; +UPDATE `creature_template` SET `ScriptName` = 'mob_felkael_phoenix' WHERE `entry` = 24674; +UPDATE `creature_template` SET `ScriptName` = 'mob_felkael_phoenix_egg' WHERE `entry` = 24675; +UPDATE `creature_template` SET `ScriptName` = 'mob_felkael_flamestrike' WHERE `entry` = 24666; \ No newline at end of file diff --git a/sql/Updates/0.0.2/r554_mangos.sql b/sql/Updates/0.0.2/r554_mangos.sql new file mode 100644 index 000000000..b6beac3ad --- /dev/null +++ b/sql/Updates/0.0.2/r554_mangos.sql @@ -0,0 +1,3 @@ +UPDATE `creature_template` SET `ScriptName`='boss_mekgineer_steamrigger' WHERE `entry`=17796; +UPDATE `creature_template` SET `ScriptName`='mob_steamrigger_mechanic' WHERE `entry`=17951; +UPDATE `creature_template` SET `ScriptName`='mob_naga_distiller' WHERE `entry`=17954; diff --git a/sql/Updates/0.0.2/r555_mangos.sql b/sql/Updates/0.0.2/r555_mangos.sql new file mode 100644 index 000000000..f0284ddd0 --- /dev/null +++ b/sql/Updates/0.0.2/r555_mangos.sql @@ -0,0 +1,2 @@ +UPDATE `gameobject_template` SET `ScriptName`='go_manaforge_control_console' WHERE `entry` IN (183770,183956,184311,184312); +UPDATE `creature_template` SET `ScriptName`='npc_manaforge_control_console' WHERE `entry` IN (20209,20417,20418,20440); diff --git a/sql/Updates/0.0.2/r56.sql b/sql/Updates/0.0.2/r56.sql new file mode 100644 index 000000000..69e31e9e2 --- /dev/null +++ b/sql/Updates/0.0.2/r56.sql @@ -0,0 +1,2 @@ +/* Remove guildmaster script from npc's. Core has full support */ +UPDATE `creature_template` SET `ScriptName` = '' WHERE `entry` IN (4974,5054,4613); diff --git a/sql/Updates/0.0.2/r575_mangos.sql b/sql/Updates/0.0.2/r575_mangos.sql new file mode 100644 index 000000000..bbf52bd5c --- /dev/null +++ b/sql/Updates/0.0.2/r575_mangos.sql @@ -0,0 +1 @@ +UPDATE `item_template` SET `ScriptName`='item_gor_dreks_ointment' WHERE `entry`=30175; diff --git a/sql/Updates/0.0.2/r576_mangos.sql b/sql/Updates/0.0.2/r576_mangos.sql new file mode 100644 index 000000000..0df344433 --- /dev/null +++ b/sql/Updates/0.0.2/r576_mangos.sql @@ -0,0 +1 @@ +UPDATE `item_template` SET `ScriptName`='item_muiseks_vessel' WHERE `entry` IN (9606,9618,9619,9620,9621); diff --git a/sql/Updates/0.0.2/r578_mangos.sql b/sql/Updates/0.0.2/r578_mangos.sql new file mode 100644 index 000000000..f82ea62c2 --- /dev/null +++ b/sql/Updates/0.0.2/r578_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName`='npc_forest_frog' WHERE `entry`=24396; diff --git a/sql/Updates/0.0.2/r584_mangos.sql b/sql/Updates/0.0.2/r584_mangos.sql new file mode 100644 index 000000000..0980b86cc --- /dev/null +++ b/sql/Updates/0.0.2/r584_mangos.sql @@ -0,0 +1 @@ +UPDATE `item_template` SET `ScriptName`='item_voodoo_charm' WHERE `entry`=8149; diff --git a/sql/Updates/0.0.2/r59.sql b/sql/Updates/0.0.2/r59.sql new file mode 100644 index 000000000..219f96220 --- /dev/null +++ b/sql/Updates/0.0.2/r59.sql @@ -0,0 +1,3 @@ +UPDATE `creature_template` SET `ScriptName` = 'npc_narm_faulk' WHERE `entry`= 6177; +UPDATE `creature_template` SET `ScriptName` = 'npc_q8304' WHERE `entry` IN (15170, 15171); +UPDATE `creature_template` SET `ScriptName` = 'npc_q8507_q8731' WHERE `entry` IN (15440, 15612); \ No newline at end of file diff --git a/sql/Updates/0.0.2/r590_mangos.sql b/sql/Updates/0.0.2/r590_mangos.sql new file mode 100644 index 000000000..72348756d --- /dev/null +++ b/sql/Updates/0.0.2/r590_mangos.sql @@ -0,0 +1,2 @@ +UPDATE `creature_template` SET `ScriptName`='npc_sergeant_bly' WHERE `entry`=7604; +UPDATE `creature_template` SET `ScriptName`='npc_weegli_blastfuse' WHERE `entry`=7607; diff --git a/sql/Updates/0.0.2/r591_mangos.sql b/sql/Updates/0.0.2/r591_mangos.sql new file mode 100644 index 000000000..253fe3ed5 --- /dev/null +++ b/sql/Updates/0.0.2/r591_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName`='mobs_nether_drake' WHERE `entry` IN (20021,21817,21820,21821,21823); diff --git a/sql/Updates/0.0.2/r593_mangos.sql b/sql/Updates/0.0.2/r593_mangos.sql new file mode 100644 index 000000000..ec6730e3d --- /dev/null +++ b/sql/Updates/0.0.2/r593_mangos.sql @@ -0,0 +1 @@ +UPDATE `gameobject_template` SET `ScriptName`='go_tablet_of_the_seven' WHERE `entry`=169294; diff --git a/sql/Updates/0.0.2/r594_mangos.sql b/sql/Updates/0.0.2/r594_mangos.sql new file mode 100644 index 000000000..3315fd472 --- /dev/null +++ b/sql/Updates/0.0.2/r594_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName`='mob_anubisath_sentinel' WHERE `entry`=15264; \ No newline at end of file diff --git a/sql/Updates/0.0.2/r596_mangos.sql b/sql/Updates/0.0.2/r596_mangos.sql new file mode 100644 index 000000000..2f0e45878 --- /dev/null +++ b/sql/Updates/0.0.2/r596_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName`='boss_ambassador_hellmaw' WHERE `entry`=18731; diff --git a/sql/Updates/0.0.2/r610_mangos.sql b/sql/Updates/0.0.2/r610_mangos.sql new file mode 100644 index 000000000..1aa9f4b50 --- /dev/null +++ b/sql/Updates/0.0.2/r610_mangos.sql @@ -0,0 +1,2 @@ +UPDATE `creature_template` SET `ScriptName`='npc_lady_sylvanas_windrunner' WHERE `entry`=10181; +UPDATE `creature_template` SET `ScriptName`='npc_highborne_lamenter' WHERE `entry`=21628; diff --git a/sql/Updates/0.0.2/r615_scriptdev2.sql b/sql/Updates/0.0.2/r615_scriptdev2.sql new file mode 100644 index 000000000..5c5625860 --- /dev/null +++ b/sql/Updates/0.0.2/r615_scriptdev2.sql @@ -0,0 +1,4 @@ +-- Structure updates + +ALTER TABLE localized_texts +ADD `locale_8` varchar(255) NOT NULL default '' AFTER locale_7; \ No newline at end of file diff --git a/sql/Updates/0.0.2/r617_mangos.sql b/sql/Updates/0.0.2/r617_mangos.sql new file mode 100644 index 000000000..7a30f9c55 --- /dev/null +++ b/sql/Updates/0.0.2/r617_mangos.sql @@ -0,0 +1 @@ +UPDATE `item_template` SET `ScriptName`='item_razorthorn_flayer_gland' WHERE `entry`=34255; diff --git a/sql/Updates/0.0.2/r621_mangos.sql b/sql/Updates/0.0.2/r621_mangos.sql new file mode 100644 index 000000000..822de701e --- /dev/null +++ b/sql/Updates/0.0.2/r621_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName`='boss_talon_king_ikiss' WHERE `entry`=18473; diff --git a/sql/Updates/0.0.2/r628_mangos.sql b/sql/Updates/0.0.2/r628_mangos.sql new file mode 100644 index 000000000..47d286d27 --- /dev/null +++ b/sql/Updates/0.0.2/r628_mangos.sql @@ -0,0 +1,3 @@ +UPDATE `instance_template` SET `script`='instance_shattered_halls' WHERE `map`=540; +UPDATE `creature_template` SET `ScriptName`='mob_fel_orc_convert' WHERE `entry`=17083; +UPDATE `creature_template` SET `ScriptName`='mob_lesser_shadow_fissure' WHERE `entry`=17471; diff --git a/sql/Updates/0.0.2/r63.sql b/sql/Updates/0.0.2/r63.sql new file mode 100644 index 000000000..4627d4006 --- /dev/null +++ b/sql/Updates/0.0.2/r63.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName` = 'npc_bartleby' WHERE `entry` IN (6090); \ No newline at end of file diff --git a/sql/Updates/0.0.2/r632_mangos.sql b/sql/Updates/0.0.2/r632_mangos.sql new file mode 100644 index 000000000..4ea0c35e6 --- /dev/null +++ b/sql/Updates/0.0.2/r632_mangos.sql @@ -0,0 +1,2 @@ +UPDATE `creature_template` SET `ScriptName`='boss_warbringer_omrogg' WHERE `entry`=16809; +UPDATE `creature_template` SET `ScriptName`='mob_omrogg_heads' WHERE `entry` IN (19523,19524); diff --git a/sql/Updates/0.0.2/r633_mangos.sql b/sql/Updates/0.0.2/r633_mangos.sql new file mode 100644 index 000000000..bbf75d1f9 --- /dev/null +++ b/sql/Updates/0.0.2/r633_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName`='npc_rogue_trainer' WHERE `entry` IN (918,4163,3328,4583,5165,5167,13283,16684); diff --git a/sql/Updates/0.0.2/r634_scriptdev2.sql b/sql/Updates/0.0.2/r634_scriptdev2.sql new file mode 100644 index 000000000..ca8e49938 --- /dev/null +++ b/sql/Updates/0.0.2/r634_scriptdev2.sql @@ -0,0 +1,35 @@ +DROP TABLE IF EXISTS `script_texts`; +CREATE TABLE `script_texts` ( +`ScriptName` varchar(255) NOT NULL default '', +`Id` int(11) unsigned NOT NULL default '0', +`Sound` int(11) unsigned NOT NULL default '0', +`Type` int(11) unsigned NOT NULL default '0', +`Language` int(11) unsigned NOT NULL default '0', +`Text` varchar(255) NOT NULL default '', +`Comment` varchar(255) NOT NULL default '', +PRIMARY KEY (`ScriptName`,`Id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Script Texts'; + + +DROP TABLE IF EXISTS `script_localized_texts`; +CREATE TABLE `script_localized_texts` ( +`id` int(11) unsigned NOT NULL auto_increment COMMENT 'Identifier', +`locale_1` varchar(255) NOT NULL default '', +`locale_2` varchar(255) NOT NULL default '', +`locale_3` varchar(255) NOT NULL default '', +`locale_4` varchar(255) NOT NULL default '', +`locale_5` varchar(255) NOT NULL default '', +`locale_6` varchar(255) NOT NULL default '', +`locale_7` varchar(255) NOT NULL default '', +`locale_8` varchar(255) NOT NULL default '', +`comment` varchar(255) NOT NULL default '' COMMENT 'Text Comment', +PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Localized Script Text'; + + +DROP TABLE IF EXISTS `eventai_texts`; +CREATE TABLE `eventai_texts` AS SELECT `id`, `locale_0` AS `text`, `comment` FROM `localized_texts`; +TRUNCATE TABLE `localized_texts`; +DROP TABLE IF EXISTS `eventai_localized_texts`; +ALTER TABLE `localized_texts` RENAME TO `eventai_localized_texts`; +ALTER TABLE `eventai_localized_texts` DROP COLUMN `locale_0`; diff --git a/sql/Updates/0.0.2/r636_mangos.sql b/sql/Updates/0.0.2/r636_mangos.sql new file mode 100644 index 000000000..55eea42bf --- /dev/null +++ b/sql/Updates/0.0.2/r636_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName`='boss_laj' WHERE `entry`=17980; diff --git a/sql/Updates/0.0.2/r637_mangos.sql b/sql/Updates/0.0.2/r637_mangos.sql new file mode 100644 index 000000000..03a53749c --- /dev/null +++ b/sql/Updates/0.0.2/r637_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName`='boss_high_botanist_freywinn' WHERE `entry`=17975; diff --git a/sql/Updates/0.0.2/r638_mangos.sql b/sql/Updates/0.0.2/r638_mangos.sql new file mode 100644 index 000000000..cf20d33e9 --- /dev/null +++ b/sql/Updates/0.0.2/r638_mangos.sql @@ -0,0 +1,2 @@ +UPDATE `item_template` SET `ScriptName`='item_attuned_crystal_cores' WHERE `entry`=34368; +UPDATE `creature_template` SET `ScriptName`='npc_converted_sentry' WHERE `entry`=24981; diff --git a/sql/Updates/0.0.2/r639_mangos.sql b/sql/Updates/0.0.2/r639_mangos.sql new file mode 100644 index 000000000..7946ac237 --- /dev/null +++ b/sql/Updates/0.0.2/r639_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName`='npc_ravenholdt' WHERE `entry`=13936; diff --git a/sql/Updates/0.0.2/r642_mangos.sql b/sql/Updates/0.0.2/r642_mangos.sql new file mode 100644 index 000000000..b99637282 --- /dev/null +++ b/sql/Updates/0.0.2/r642_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName`='mob_shadowmoon_channeler' WHERE `entry`=17653; diff --git a/sql/Updates/0.0.2/r643_mangos.sql b/sql/Updates/0.0.2/r643_mangos.sql new file mode 100644 index 000000000..8659ebcb8 --- /dev/null +++ b/sql/Updates/0.0.2/r643_mangos.sql @@ -0,0 +1,2 @@ +UPDATE `creature_template` SET `ScriptName`='mob_stolen_soul' WHERE `entry`=18441; +UPDATE `creature_template` SET `ScriptName`='mob_avatar_of_martyred' WHERE `entry`=18478; diff --git a/sql/Updates/0.0.2/r646_mangos.sql b/sql/Updates/0.0.2/r646_mangos.sql new file mode 100644 index 000000000..3f43d49bc --- /dev/null +++ b/sql/Updates/0.0.2/r646_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName`='boss_harbinger_skyriss_illusion' WHERE `entry` IN (21466,21467); diff --git a/sql/Updates/0.0.2/r647_scriptdev2.sql b/sql/Updates/0.0.2/r647_scriptdev2.sql new file mode 100644 index 000000000..bd259718b --- /dev/null +++ b/sql/Updates/0.0.2/r647_scriptdev2.sql @@ -0,0 +1,10 @@ +DROP TABLE IF EXISTS `script_texts`; +CREATE TABLE `script_texts` ( +`id` int(11) unsigned NOT NULL auto_increment COMMENT 'Identifier', +`sound` int(11) unsigned NOT NULL default '0', +`type` int(11) unsigned NOT NULL default '0', +`language` int(11) unsigned NOT NULL default '0', +`text` varchar(255) NOT NULL default '', +`comment` varchar(255) NOT NULL default '', +PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Script Texts'; \ No newline at end of file diff --git a/sql/Updates/0.0.2/r65.sql b/sql/Updates/0.0.2/r65.sql new file mode 100644 index 000000000..2c878bfed --- /dev/null +++ b/sql/Updates/0.0.2/r65.sql @@ -0,0 +1,2 @@ +UPDATE `creature_template` SET `npcflag`='3', `ScriptName`='npc_lothos_riftwalker' WHERE `entry`='14387'; +UPDATE creature_template SET ScriptName="boss_gruul" WHERE entry=19044; \ No newline at end of file diff --git a/sql/Updates/0.0.2/r656_scriptdev2.sql b/sql/Updates/0.0.2/r656_scriptdev2.sql new file mode 100644 index 000000000..a8440b517 --- /dev/null +++ b/sql/Updates/0.0.2/r656_scriptdev2.sql @@ -0,0 +1,5 @@ +ALTER TABLE +`eventai_localized_texts` ADD COLUMN `locale_8` varchar(255) NOT NULL default '' AFTER locale_7; + +ALTER TABLE +`script_localized_texts` ADD COLUMN `locale_8` varchar(255) NOT NULL default '' AFTER locale_7; diff --git a/sql/Updates/0.0.2/r658_mangos.sql b/sql/Updates/0.0.2/r658_mangos.sql new file mode 100644 index 000000000..50ae5fcbd --- /dev/null +++ b/sql/Updates/0.0.2/r658_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName`='npc_custodian_of_time' WHERE `entry`=20129; diff --git a/sql/Updates/0.0.2/r659_mangos.sql b/sql/Updates/0.0.2/r659_mangos.sql new file mode 100644 index 000000000..feb9379b8 --- /dev/null +++ b/sql/Updates/0.0.2/r659_mangos.sql @@ -0,0 +1,4 @@ +UPDATE `creature_template` SET `ScriptName`='npc_akama_shade' WHERE `entry`=22990; -- Akama at Shade of Akama +UPDATE `creature_template` SET `ScriptName`='npc_akama_illidan' WHERE `entry`=23089; -- Akama at Illidan +UPDATE `creature_template` SET `ScriptName`='mob_illidari_council' WHERE `entry`=23426; -- Illidari Council controller mob +UPDATE `creature_template` SET `ScriptName`='mob_blood_elf_council_voice_trigger' WHERE `entry` = 23499; -- Voice Trigger Mob (Controls Aggro + Enrage yells) diff --git a/sql/Updates/0.0.2/r681_scriptdev2.sql b/sql/Updates/0.0.2/r681_scriptdev2.sql new file mode 100644 index 000000000..cb5a7d5b7 --- /dev/null +++ b/sql/Updates/0.0.2/r681_scriptdev2.sql @@ -0,0 +1,43 @@ +-- +-- NOTE: if you have temporary stored data in table `script_localized_texts` make sure to make backup of this before running this update! +-- Also note if you have any texts in current script_texts and they are not using entries valid for *_texts table, you _will_ get error messages on startup. +-- + +-- drop obsolete table +DROP TABLE script_localized_texts; + +-- alter and add fields in table `script_texts` +ALTER TABLE script_texts CHANGE COLUMN `id` `entry` mediumint(8) NOT NULL; +ALTER TABLE script_texts CHANGE COLUMN `text` `content_default` text NOT NULL AFTER `entry`; +ALTER TABLE script_texts ADD COLUMN `content_loc1` text AFTER `content_default`; +ALTER TABLE script_texts ADD COLUMN `content_loc2` text AFTER `content_loc1`; +ALTER TABLE script_texts ADD COLUMN `content_loc3` text AFTER `content_loc2`; +ALTER TABLE script_texts ADD COLUMN `content_loc4` text AFTER `content_loc3`; +ALTER TABLE script_texts ADD COLUMN `content_loc5` text AFTER `content_loc4`; +ALTER TABLE script_texts ADD COLUMN `content_loc6` text AFTER `content_loc5`; +ALTER TABLE script_texts ADD COLUMN `content_loc7` text AFTER `content_loc6`; +ALTER TABLE script_texts ADD COLUMN `content_loc8` text AFTER `content_loc7`; +ALTER TABLE script_texts MODIFY COLUMN `sound` tinyint unsigned NOT NULL default '0'; +ALTER TABLE script_texts MODIFY COLUMN `type` tinyint unsigned NOT NULL default '0'; +ALTER TABLE script_texts MODIFY COLUMN `language` tinyint unsigned NOT NULL default '0'; +ALTER TABLE script_texts MODIFY COLUMN `comment` text; + +-- new table for custom texts +DROP TABLE IF EXISTS `custom_texts`; +CREATE TABLE `custom_texts` ( + `entry` mediumint(8) NOT NULL, + `content_default` text NOT NULL, + `content_loc1` text, + `content_loc2` text, + `content_loc3` text, + `content_loc4` text, + `content_loc5` text, + `content_loc6` text, + `content_loc7` text, + `content_loc8` text, + `sound` mediumint(8) unsigned NOT NULL default '0', + `type` tinyint unsigned NOT NULL default '0', + `language` tinyint unsigned NOT NULL default '0', + `comment` text, + PRIMARY KEY (`entry`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Custom Texts'; diff --git a/sql/Updates/0.0.2/r695_scriptdev2.sql b/sql/Updates/0.0.2/r695_scriptdev2.sql new file mode 100644 index 000000000..d200b483b --- /dev/null +++ b/sql/Updates/0.0.2/r695_scriptdev2.sql @@ -0,0 +1,62 @@ +-- +-- NOTE: If you have temporary stored data in table `eventai_localized_texts` make sure to make backup of this before running this update! +-- NOTE: If you have any texts in current eventai_texts and they are not using entries valid for *_texts table, you _will_ get error messages on startup. +-- NOTE: Do not run this update twice, it may create bad data if you choose to do so. +-- + +-- drop obsolete table +DROP TABLE eventai_localized_texts; + +-- alter and add fields in table `eventai_texts` +ALTER TABLE eventai_texts CHANGE COLUMN `id` `entry` mediumint(8) NOT NULL; +ALTER TABLE eventai_texts CHANGE COLUMN `text` `content_default` text NOT NULL AFTER `entry`; +ALTER TABLE eventai_texts ADD COLUMN `content_loc1` text AFTER `content_default`; +ALTER TABLE eventai_texts ADD COLUMN `content_loc2` text AFTER `content_loc1`; +ALTER TABLE eventai_texts ADD COLUMN `content_loc3` text AFTER `content_loc2`; +ALTER TABLE eventai_texts ADD COLUMN `content_loc4` text AFTER `content_loc3`; +ALTER TABLE eventai_texts ADD COLUMN `content_loc5` text AFTER `content_loc4`; +ALTER TABLE eventai_texts ADD COLUMN `content_loc6` text AFTER `content_loc5`; +ALTER TABLE eventai_texts ADD COLUMN `content_loc7` text AFTER `content_loc6`; +ALTER TABLE eventai_texts ADD COLUMN `content_loc8` text AFTER `content_loc7`; +ALTER TABLE eventai_texts ADD COLUMN `sound` mediumint(8) unsigned NOT NULL default '0' AFTER `content_loc8`; +ALTER TABLE eventai_texts ADD COLUMN `type` tinyint unsigned NOT NULL default '0' AFTER `sound`; +ALTER TABLE eventai_texts ADD COLUMN `language` tinyint unsigned NOT NULL default '0' AFTER `type`; +ALTER TABLE eventai_texts MODIFY COLUMN `comment` text; + +-- get our current action type, and update text type = yell +UPDATE eventai_texts,eventai_scripts SET eventai_texts.type=1 WHERE eventai_scripts.action1_type IN (2,7) AND eventai_scripts.action1_param1=eventai_texts.entry; +UPDATE eventai_texts,eventai_scripts SET eventai_texts.type=1 WHERE eventai_scripts.action2_type IN (2,7) AND eventai_scripts.action2_param1=eventai_texts.entry; +UPDATE eventai_texts,eventai_scripts SET eventai_texts.type=1 WHERE eventai_scripts.action3_type IN (2,7) AND eventai_scripts.action3_param1=eventai_texts.entry; +-- get our current action type, and update text type = textemote +UPDATE eventai_texts,eventai_scripts SET eventai_texts.type=2 WHERE eventai_scripts.action1_type IN (3,8) AND eventai_scripts.action1_param1=eventai_texts.entry; +UPDATE eventai_texts,eventai_scripts SET eventai_texts.type=2 WHERE eventai_scripts.action2_type IN (3,8) AND eventai_scripts.action2_param1=eventai_texts.entry; +UPDATE eventai_texts,eventai_scripts SET eventai_texts.type=2 WHERE eventai_scripts.action3_type IN (3,8) AND eventai_scripts.action3_param1=eventai_texts.entry; + +-- update our scripts, for all action type 2, 3, 6, 7 & 8 to become 1 +UPDATE eventai_scripts SET action1_type=1 WHERE action1_type IN (2,3,6,7,8); +UPDATE eventai_scripts SET action2_type=1 WHERE action2_type IN (2,3,6,7,8); +UPDATE eventai_scripts SET action3_type=1 WHERE action3_type IN (2,3,6,7,8); + +-- was OOC, so at least one could be -1, set this to 0 (dev note: below will be bad, if run twice) +UPDATE eventai_scripts SET action1_param2=0 WHERE action1_type=1 AND action1_param2=-1; +UPDATE eventai_scripts SET action1_param3=0 WHERE action1_type=1 AND action1_param3=-1; +UPDATE eventai_scripts SET action2_param2=0 WHERE action2_type=1 AND action2_param2=-1; +UPDATE eventai_scripts SET action2_param3=0 WHERE action2_type=1 AND action2_param3=-1; +UPDATE eventai_scripts SET action3_param2=0 WHERE action3_type=1 AND action3_param2=-1; +UPDATE eventai_scripts SET action3_param3=0 WHERE action3_type=1 AND action3_param3=-1; + +-- expect all to be action type 1 now, continue convert to negative text entry +UPDATE eventai_scripts SET action1_param1=(`action1_param1`) *-1 WHERE action1_type=1 AND action1_param1>0; +UPDATE eventai_scripts SET action2_param1=(`action2_param1`) *-1 WHERE action2_type=1 AND action2_param1>0; +UPDATE eventai_scripts SET action3_param1=(`action3_param1`) *-1 WHERE action3_type=1 AND action3_param1>0; + +UPDATE eventai_scripts SET action1_param2=(`action1_param2`) *-1 WHERE action1_type=1 AND action1_param2>0; +UPDATE eventai_scripts SET action2_param2=(`action2_param2`) *-1 WHERE action2_type=1 AND action2_param2>0; +UPDATE eventai_scripts SET action3_param2=(`action3_param2`) *-1 WHERE action3_type=1 AND action3_param2>0; + +UPDATE eventai_scripts SET action1_param3=(`action1_param3`) *-1 WHERE action1_type=1 AND action1_param3>0; +UPDATE eventai_scripts SET action2_param3=(`action2_param3`) *-1 WHERE action2_type=1 AND action2_param3>0; +UPDATE eventai_scripts SET action3_param3=(`action3_param3`) *-1 WHERE action3_type=1 AND action3_param3>0; + +-- now we have negative numbers in script, must make sure text entries have same entry as script +UPDATE eventai_texts SET entry=(`entry`) *-1 WHERE entry>0; diff --git a/sql/Updates/0.0.2/r699_scriptdev2_script_texts.sql b/sql/Updates/0.0.2/r699_scriptdev2_script_texts.sql new file mode 100644 index 000000000..bfe9cabdd --- /dev/null +++ b/sql/Updates/0.0.2/r699_scriptdev2_script_texts.sql @@ -0,0 +1 @@ +ALTER TABLE script_texts MODIFY COLUMN `sound` mediumint(8) unsigned NOT NULL default '0'; diff --git a/sql/Updates/0.0.2/r700_scriptdev2_script_texts.sql b/sql/Updates/0.0.2/r700_scriptdev2_script_texts.sql new file mode 100644 index 000000000..85e660be5 --- /dev/null +++ b/sql/Updates/0.0.2/r700_scriptdev2_script_texts.sql @@ -0,0 +1,81 @@ +TRUNCATE `script_texts`; + +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1000000,'',0,0,0,'DEFAULT_TEXT'), +(-1555000,'Infidels have invaded the sanctuary! Sniveling pests...You have yet to learn the true meaning of agony!',10473,1,0,'hellmaw SAY_INTRO'), +(-1555001,'Pathetic mortals! You will pay dearly!',10475,1,0,'hellmaw SAY_AGGRO1'), +(-1555002,'I will break you!',10476,1,0,'hellmaw SAY_AGGRO2'), +(-1555003,'Finally! Something to relieve the tedium!',10477,1,0,'hellmaw SAY_AGGRO3'), +(-1555004,'Aid me, you fools, before it\'s too late!',10474,1,0,'hellmaw SAY_HELP'), +(-1555005,'Do you fear death?',10478,1,0,'hellmaw SAY_SLAY1'), +(-1555006,'This is the part I enjoy most.',10479,1,0,'hellmaw SAY_SLAY2'), +(-1555007,'Do not...grow...overconfident, mortal.',10480,1,0,'hellmaw SAY_DEATH'), +(-1555008,'All flesh must burn.',10482,1,0,'blackhearth SAY_INTRO1'), +(-1555009,'All creation must be unmade!',10483,1,0,'blackhearth SAY_INTRO2'), +(-1555010,'Power will be yours!',10484,1,0,'blackhearth SAY_INTRO3'), +(-1555011,'You\'ll be sorry!',10486,1,0,'blackhearth SAY_AGGRO1'), +(-1555012,'Time for fun!',10487,1,0,'blackhearth SAY_AGGRO2'), +(-1555013,'I see dead people!',10488,1,0,'blackhearth SAY_AGGRO3'), +(-1555014,'No comin\' back for you!',10489,1,0,'blackhearth SAY_SLAY1'), +(-1555015,'Nice try!',10490,1,0,'blackhearth SAY_SLAY2'), +(-1555016,'Help us, hurry!',10485,1,0,'blackhearth SAY_HELP'), +(-1555017,'This... no... good...',10491,1,0,'blackhearth SAY_DEATH'), +(-1555018,'Be ready for Dark One\'s return.',10492,1,0,'blackhearth SAY2_INTRO1'), +(-1555019,'So we have place in new universe.',10493,1,0,'blackhearth SAY2_INTRO2'), +(-1555020,'Dark one promise!',10494,1,0,'blackhearth SAY2_INTRO3'), +(-1555021,'You\'ll be sorry!',10496,1,0,'blackhearth SAY2_AGGRO1'), +(-1555022,'Time to kill!',10497,1,0,'blackhearth SAY2_AGGRO2'), +(-1555023,'You be dead people!',10498,1,0,'blackhearth SAY2_AGGRO3'), +(-1555024,'Now you gone for good.',10499,1,0,'blackhearth SAY2_SLAY1'), +(-1555025,'You failed, haha haha',10500,1,0,'blackhearth SAY2_SLAY2'), +(-1555026,'Help us, hurry!',10495,1,0,'blackhearth SAY2_HELP'), +(-1555027,'Arrgh, aah...ahhh',10501,1,0,'blackhearth SAY2_DEATH'), +(-1555028,'Keep your minds focused for the days of reckoning are close at hand. Soon, the destroyer of worlds will return to make good on his promise. Soon the destruction of all that is will begin!',10522,1,0,'vorpil SAY_INTRO'), +(-1555029,'I\'ll make an offering of your blood!',10524,1,0,'vorpil SAY_AGGRO1'), +(-1555030,'You\'ll be a fine example, for the others.',10525,1,0,'vorpil SAY_AGGRO2'), +(-1555031,'Good, a worthy sacrifice.',10526,1,0,'vorpil SAY_AGGRO3'), +(-1555032,'Come to my aid, heed your master now!',10523,1,0,'vorpil SAY_HELP'), +(-1555033,'I serve with pride.',10527,1,0,'vorpil SAY_SLAY1'), +(-1555034,'Your death is for the greater cause!',10528,1,0,'vorpil SAY_SLAY2'), +(-1555035,'I give my life... Gladly.',10529,1,0,'vorpil SAY_DEATH'), +(-1555036,'draws energy from the air.',0,2,0,'murmur EMOTE_SONIC_BOOM'), +(-1556000,'I have pets....of my own!',10502,1,0,'syth SAY_SUMMON'), +(-1556001,'Hrrmm.. Time to.. hrrm.. make my move.',10503,1,0,'syth SAY_AGGRO_1'), +(-1556002,'Nice pets..hrm.. Yes! ',10504,1,0,'syth SAY_AGGRO_2'), +(-1556003,'Nice pets have.. weapons. No so....nice.',10505,1,0,'syth SAY_AGGRO_3'), +(-1556004,'Death.. meeting life is.. ',10506,1,0,'syth SAY_SLAY_1'), +(-1556005,'Uhn.. Be free..',10507,1,0,'syth SAY_SLAY_2'), +(-1556006,'No more life..hrm. No more pain. ',10508,1,0,'syth SAY_DEATH'), +(-1556007,'..Trinkets yes pretty Trinkets....power, great power...power in Trinkets..',10557,1,0,'ikiss SAY_INTRO'), +(-1556008,'You make war on Ikiss?..',10554,1,0,'ikiss SAY_AGGRO_1'), +(-1556009,'Ikiss cut you pretty....slice you. Yes!',10555,1,0,'ikiss SAY_AGGRO_2'), +(-1556010,'No escape for....for you',10556,1,0,'ikiss SAY_AGGRO_3'), +(-1556011,'You die....stay away from Trinkets',10558,1,0,'ikiss SAY_SLAY_1'), +(-1556012,'',10559,1,0,'ikiss SAY_SLAY_2'), +(-1556013,'Ikiss will not....die',10560,1,0,'ikiss SAY_DEATH'), +(-1556015,'begins to channel arcane energy...',0,3,0,'ikiss EMOTE_ARCANE_EXP'), +(-1557000,'What is this? You must forgive me, but I was not expecting company. As you can see, we are somewhat preoccupied right now. But no matter. As I am a gracious host, I will tend to you... personally.',10539,1,0,'shaffar SAY_INTRO'), +(-1557001,'We have not yet been properly introduced.',10541,1,0,'shaffar SAY_AGGRO_1'), +(-1557002,'An epic battle. How exciting!',10542,1,0,'shaffar SAY_AGGRO_2'), +(-1557003,'I have longed for a good adventure.',10543,1,0,'shaffar SAY_AGGRO_3'), +(-1557004,'It has been... entertaining.',10544,1,0,'shaffar SAY_SLAY_1'), +(-1557005,'And now we part company.',10545,1,0,'shaffar SAY_SLAY_2'), +(-1557006,'I have such fascinating things to show you.',10540,1,0,'shaffar SAY_SUMMON'), +(-1557007,'I must bid you... farewell.',10546,1,0,'shaffar SAY_DEAD'), +(-1557008,'I will feed on your soul.',10561,1,0,'pandemonius SAY_AGGRO_1'), +(-1557009,'So... full of life!',10562,1,0,'pandemonius SAY_AGGRO_2'), +(-1557010,'Do not... resist.',10563,1,0,'pandemonius SAY_AGGRO_3'), +(-1557011,'Yes! I am... empowered!',10564,1,0,'pandemonius SAY_KILL_1'), +(-1557012,'More... I must have more!',10565,1,0,'pandemonius SAY_KILL_2'), +(-1557013,'To the void... once... more..',10566,1,0,'pandemonius SAY_DEATH'), +(-1557014,'shifts into the void...',0,3,0,'pandemonius EMOTE_DARK_SHELL'), +(-1558000,'You have defiled the resting place of our ancestors. For this offense, there can be but one punishment. It is fitting that you have come to a place of the dead... for you will soon be joining them.',10509,1,0,'maladaar SAY_INTRO'), +(-1558001,'Rise my fallen brothers. Take form and fight!',10512,1,0,'maladaar SAY_SUMMON'), +(-1558002,'You will pay with your life!',10513,1,0,'maladaar SAY_AGGRO_1'), +(-1558003,'There\'s no turning back now!',10514,1,0,'maladaar SAY_AGGRO_2'), +(-1558004,'Serve your penitence!',10515,1,0,'maladaar SAY_AGGRO_3'), +(-1558005,'Let your mind be clouded.',10510,1,0,'maladaar SAY_ROAR'), +(-1558006,'Stare into the darkness of your soul.',10511,1,0,'maladaar SAY_SOUL_CLEAVE'), +(-1558007,'These walls will be your doom.',10516,1,0,'maladaar SAY_SLAY_1'), +(-1558008,' Now, you\'ll stay for eternity!',10517,1,0,'maladaar SAY_SLAY_2'), +(-1558009,'This is... where.. I belong...',10518,1,0,'maladaar SAY_DEATH'); \ No newline at end of file diff --git a/sql/Updates/0.0.2/r701_scriptdev2_script_texts.sql b/sql/Updates/0.0.2/r701_scriptdev2_script_texts.sql new file mode 100644 index 000000000..cc6bd4788 --- /dev/null +++ b/sql/Updates/0.0.2/r701_scriptdev2_script_texts.sql @@ -0,0 +1,33 @@ +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1469030 AND -1469000; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1469000,'None of your kind should be here! You\'ve doomed only yourselves!',8286,1,0,'broodlord SAY_AGGRO'), +(-1469001,'Clever Mortals but I am not so easily lured away from my sanctum!',8287,1,0,'broodlord SAY_LEASH'), +(-1469002,'goes into a killing frenzy!',0,2,0,'chromaggus EMOTE_FRENZY'), +(-1469003,'flinches as its skin shimmers.',0,2,0,'chromaggus EMOTE_SHIMMER'), +(-1469004,'In this world where time is your enemy, it is my greatest ally. This grand game of life that you think you play in fact plays you. To that I say...',0,0,0,'victor_nefarius SAY_GAMESBEGIN_1'), +(-1469005,'Let the games begin!',8280,1,0,'victor_nefarius SAY_GAMESBEGIN_2'), +(-1469006,'Ah, the heroes. You are persistent, aren\'t you. Your allied attempted to match his power against mine, and had to pay the price. Now he shall serve me, by slaughtering you. Get up little red wyrm and destroy them!',8279,1,0,'victor_nefarius SAY_VAEL_INTRO'), +(-1469007,'Well done, my minions. The mortals\' courage begins to wane! Now, let\'s see how they contend with the true Lord of Blackrock Spire!',8288,1,0,'nefarian SAY_AGGRO'), +(-1469008,'Enough! Now you vermin shall feel the force of my birthright, the fury of the earth itself.',8289,1,0,'nefarian SAY_XHEALTH'), +(-1469009,'Burn, you wretches! Burn!',8290,1,0,'nefarian SAY_SHADOWFLAME'), +(-1469010,'Impossible! Rise my minions! Serve your master once more!',8291,1,0,'nefarian SAY_RAISE_SKELETONS'), +(-1469011,'Worthless $N! Your friends will join you soon enough!',8293,1,0,'nefarian SAY_SLAY'), +(-1469012,'This cannot be! I am the Master here! You mortals are nothing to my kind! DO YOU HEAR? NOTHING!',8292,1,0,'nefarian SAY_DEATH'), +(-1469013,'Mages too? You should be more careful when you play with magic...',0,1,0,'nefarian SAY_MAGE'), +(-1469014,'Warriors, I know you can hit harder than that! Let\'s see it!',0,1,0,'nefarian SAY_WARRIOR'), +(-1469015,'Druids and your silly shapeshifting. Let\'s see it in action!',0,1,0,'nefarian SAY_DRUID'), +(-1469016,'Priests! If you\'re going to keep healing like that, we might as well make it a little more interesting!',0,1,0,'nefarian SAY_PRIEST'), +(-1469017,'Paladins, I\'ve heard you have many lives. Show me.',0,1,0,'nefarian SAY_PALADIN'), +(-1469018,'Shamans, show me what your totems can do!',0,1,0,'nefarian SAY_SHAMAN'), +(-1469019,'Warlocks, you shouldn\'t be playing with magic you don\'t understand. See what happens?',0,1,0,'nefarian SAY_WARLOCK'), +(-1469020,'Hunters and your annoying pea-shooters!',0,1,0,'nefarian SAY_HUNTER'), +(-1469021,'Rogues? Stop hiding and face me!',0,1,0,'nefarian SAY_ROGUE'), +(-1469022,'You\'ll pay for forcing me to do this.',8275,1,0,'razorgore SAY_EGGS_BROKEN1'), +(-1469023,'Fools! These eggs are more precious than you know.',8276,1,0,'razorgore SAY_EGGS_BROKEN2'), +(-1469024,'No! Not another one! I\'ll have your heads for this atrocity.',8277,1,0,'razorgore SAY_EGGS_BROKEN3'), +(-1469025,'If I fall into the abyss I\'ll take all of you mortals with me...',8278,1,0,'razorgore SAY_DEATH'), +(-1469026,'Too late...friends. Nefarius\' corruption has taken hold. I cannot...control myself.',8281,1,0,'vaelastrasz SAY_LINE1'), +(-1469027,'I beg you Mortals, flee! Flee before I lose all control. The Black Fire rages within my heart. I must release it!',8282,1,0,'vaelastrasz SAY_LINE2'), +(-1469028,'FLAME! DEATH! DESTRUCTION! COWER MORTALS BEFORE THE WRATH OF LORD....NO! I MUST FIGHT THIS!',8283,1,0,'vaelastrasz SAY_LINE3'), +(-1469029,'Nefarius\' hate has made me stronger than ever before. You should have fled, while you could, mortals! The fury of Blackrock courses through my veins!',8285,1,0,'vaelastrasz SAY_HALFLIFE'), +(-1469030,'Forgive me $N, your death only adds to my failure.',8284,1,0,'vaelastrasz SAY_KILLTARGET'); diff --git a/sql/Updates/0.0.2/r702_scriptdev2_script_texts.sql b/sql/Updates/0.0.2/r702_scriptdev2_script_texts.sql new file mode 100644 index 000000000..292befe24 --- /dev/null +++ b/sql/Updates/0.0.2/r702_scriptdev2_script_texts.sql @@ -0,0 +1,46 @@ +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1269017 AND -1269000; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1269000,'Why do you persist? Surely you can see the futility of it all. It is not too late! You may still leave with your lives ...',10442,1,0,'temporus SAY_ENTER'), +(-1269001,'So be it ... you have been warned.',10444,1,0,'temporus SAY_AGGRO'), +(-1269002,'Time... sands of time is run out for you.',10443,1,0,'temporus SAY_BANISH'), +(-1269003,'You should have left when you had the chance.',10445,1,0,'temporus SAY_SLAY1'), +(-1269004,'Your days are done.',10446,1,0,'temporus SAY_SLAY2'), +(-1269005,'My death means ... little.',10447,1,0,'temporus SAY_DEATH'), +(-1269006,'Why do you aid the Magus? Just think of how many lives could be saved if the portal is never opened, if the resulting wars could be erased ...',10412,1,0,'chrono_lord_deja SAY_ENTER'), +(-1269007,'If you will not cease this foolish quest, then you will die!',10414,1,0,'chrono_lord_deja SAY_AGGRO'), +(-1269008,'You have outstayed your welcome, Timekeeper. Begone!',10413,1,0,'chrono_lord_deja SAY_BANISH'), +(-1269009,'I told you it was a fool\'s quest!',10415,1,0,'chrono_lord_deja SAY_SLAY1'), +(-1269010,'Leaving so soon?',10416,1,0,'chrono_lord_deja SAY_SLAY2'), +(-1269011,'Time ... is on our side.',10417,1,0,'chrono_lord_deja SAY_DEATH'), +(-1269012,'The time has come to shatter this clockwork universe forever! Let us no longer be slaves of the hourglass! I warn you: those who do not embrace the greater path shall become victims of its passing!',10400,1,0,'aeonus SAY_ENTER'), +(-1269013,'Let us see what fate lays in store...',10402,1,0,'aeonus SAY_AGGRO'), +(-1269014,'Your time is up, slave of the past!',10401,1,0,'aeonus SAY_BANISH'), +(-1269015,'One less obstacle in our way!',10403,1,0,'aeonus SAY_SLAY1'), +(-1269016,'No one can stop us! No one!',10404,1,0,'aeonus SAY_SLAY2'), +(-1269017,'It is only a matter...of time.',10405,1,0,'aeonus SAY_DEATH'); + +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1560022 AND -1560000; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1560000,'Thrall! You didn\'t really think you would escape did you? You and your allies shall answer to Blackmoore - after I\'ve had my fun!',10406,1,0,'skarloc SAY_ENTER'), +(-1560001,'You\'re a slave. That\'s all you\'ll ever be.',10407,1,0,'skarloc SAY_TAUNT1'), +(-1560002,'I don\'t know what Blackmoore sees in you. For my money, you\'re just another ignorant savage!',10408,1,0,'skarloc SAY_TAUNT2'), +(-1560003,'Thrall will never be free!',10409,1,0,'skarloc SAY_SLAY1'), +(-1560004,'Did you really think you would leave here alive?',10410,1,0,'skarloc SAY_SLAY2'), +(-1560005,'Guards! Urgh..Guards..!',10411,1,0,'skarloc SAY_DEATH'), +(-1560006,'You there, fetch water quickly! Get these flames out before they spread to the rest of the keep! Hurry, damn you!',10428,1,0,'lieutenant_drake SAY_ENTER'), +(-1560007,'I know what you\'re up to, and I mean to put an end to it, permanently!',10429,1,0,'lieutenant_drake SAY_AGGRO'), +(-1560008,'No more middling for you.',10432,1,0,'lieutenant_drake SAY_SLAY1'), +(-1560009,'You will not interfere!',10433,1,0,'lieutenant_drake SAY_SLAY2'), +(-1560010,'Time to bleed!',10430,1,0,'lieutenant_drake SAY_MORTAL'), +(-1560011,'Run, you blasted cowards!',10431,1,0,'lieutenant_drake SAY_SHOUT'), +(-1560012,'Thrall... must not... go free.',10434,1,0,'lieutenant_drake SAY_DEATH'), +(-1560013,'Thrall! Come outside and face your fate!',10418,1,0,'epoch SAY_ENTER1'), +(-1560014,'Taretha\'s life hangs in the balance. Surely you care for her. Surely you wish to save her...',10419,1,0,'epoch SAY_ENTER2'), +(-1560015,'Ah, there you are. I had hoped to accomplish this with a bit of subtlety, but I suppose direct confrontation was inevitable. Your future, Thrall, must not come to pass and so...you and your troublesome friends must die!',10420,1,0,'epoch SAY_ENTER3'), +(-1560016,'Enough! I will erase your very existence!',10421,1,0,'epoch SAY_AGGRO1'), +(-1560017,'You cannot fight fate!',10422,1,0,'epoch SAY_AGGRO2'), +(-1560018,'You are...irrelevant.',10425,1,0,'epoch SAY_SLAY1'), +(-1560019,'Thrall will remain a slave. Taretha will die. You have failed.',10426,1,0,'epoch SAY_SLAY2'), +(-1560020,'Not so fast!',10423,1,0,'epoch SAY_BREATH1'), +(-1560021,'Struggle as much as you like!',10424,1,0,'epoch SAY_BREATH2'), +(-1560022,'No!...The master... will not... be pleased.',10427,1,0,'epoch SAY_DEATH'); diff --git a/sql/Updates/0.0.2/r703_scriptdev2_script_texts.sql b/sql/Updates/0.0.2/r703_scriptdev2_script_texts.sql new file mode 100644 index 000000000..1a3a47220 --- /dev/null +++ b/sql/Updates/0.0.2/r703_scriptdev2_script_texts.sql @@ -0,0 +1,58 @@ +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1548055 AND -1548000; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1548000,'I cannot allow you to interfere!',11289,1,0,'hydross SAY_AGGRO'), +(-1548001,'Better, much better.',11290,1,0,'hydross SAY_SWITCH_TO_CLEAN'), +(-1548002,'They have forced me to this...',11291,1,0,'hydross SAY_CLEAN_SLAY1'), +(-1548003,'I have no choice.',11292,1,0,'hydross SAY_CLEAN_SLAY2'), +(-1548004,'I am... released...',11293,1,0,'hydross SAY_CLEAN_DEATH'), +(-1548005,'Aaghh, the poison...',11297,1,0,'hydross SAY_SWITCH_TO_CORRUPT'), +(-1548006,'I will purge you from this place.',11298,1,0,'hydross SAY_CORRUPT_SLAY1'), +(-1548007,'You are no better than they!',11299,1,0,'hydross SAY_CORRUPT_SLAY2'), +(-1548008,'You are the disease, not I',11300,1,0,'hydross SAY_CORRUPT_DEATH'), +(-1548009,'Finally my banishment ends!',11312,1,0,'leotheras SAY_AGGRO'), +(-1548010,'Be gone trifling elf. I\'m in control now.',11304,1,0,'leotheras SAY_SWITCH_TO_DEMON'), +(-1548011,'We all have our demons...',11305,1,0,'leotheras SAY_INNER_DEMONS'), +(-1548012,'I have no equal.',11306,1,0,'leotheras SAY_DEMON_SLAY1'), +(-1548013,'Perish, mortal.',11307,1,0,'leotheras SAY_DEMON_SLAY2'), +(-1548014,'Yes, YES! Ahahah!',11308,1,0,'leotheras SAY_DEMON_SLAY3'), +(-1548015,'Kill! KILL!',11314,1,0,'leotheras SAY_NIGHTELF_SLAY1'), +(-1548016,'That\'s right! Yes!',11315,1,0,'leotheras SAY_NIGHTELF_SLAY2'), +(-1548017,'Who\'s the master now?',11316,1,0,'leotheras SAY_NIGHTELF_SLAY3'), +(-1548018,'No! NO! What have you done?! I am the master, do you hear me? I... aaghh... Can\'t... contain him...',11313,1,0,'leotheras SAY_FINAL_FORM'), +(-1548019,'At last I am liberated. It has been too long since I have tasted true freedom!',11309,1,0,'leotheras SAY_FREE'), +(-1548020,'You cannot kill me! Fools, I\'ll be back! I\'ll... aarghh...',11317,1,0,'leotheras SAY_DEATH'), +(-1548021,'Guards, attention! We have visitors...',11277,1,0,'karathress SAY_AGGRO'), +(-1548022,'Your overconfidence will be your undoing! Guards, lend me your strength!',11278,1,0,'karathress SAY_GAIN_BLESSING'), +(-1548023,'Go on, kill them! I\'ll be the better for it!',11279,1,0,'karathress SAY_GAIN_ABILITY1'), +(-1548024,'I am more powerful than ever!',11280,1,0,'karathress SAY_GAIN_ABILITY2'), +(-1548025,'More knowledge, more power!',11281,1,0,'karathress SAY_GAIN_ABILITY3'), +(-1548026,'Land-dwelling scum!',11282,1,0,'karathress SAY_SLAY1'), +(-1548027,'Alana be\'lendor!',11283,1,0,'karathress SAY_SLAY2'), +(-1548028,'I am rid of you.',11284,1,0,'karathress SAY_SLAY3'), +(-1548029,'Her ... excellency ... awaits!',11285,1,0,'karathress SAY_DEATH'), +(-1548030,'Flood of the deep, take you!',11321,1,0,'morogrim SAY_AGGRO'), +(-1548031,'By the Tides, kill them at once!',11322,1,0,'morogrim SAY_SUMMON1'), +(-1548032,'Destroy them my subjects!',11323,1,0,'morogrim SAY_SUMMON2'), +(-1548033,'There is nowhere to hide!',11324,1,0,'morogrim SAY_SUMMON_BUBL1'), +(-1548034,'Soon it will be finished!',11325,1,0,'morogrim SAY_SUMMON_BUBL2'), +(-1548035,'It is done!',11326,1,0,'morogrim SAY_SLAY1'), +(-1548036,'Strugging only makes it worse.',11327,1,0,'morogrim SAY_SLAY2'), +(-1548037,'Only the strong survive.',11328,1,0,'morogrim SAY_SLAY3'), +(-1548038,'Great... currents of... Ageon.',11329,1,0,'morogrim SAY_DEATH'), +(-1548039,'sends his enemies to their watery graves!',0,2,0,'morogrim EMOTE_WATERY_GRAVE'), +(-1548040,'The violent earthquake has alerted nearby murlocs!',0,3,0,'morogrim EMOTE_EARTHQUAKE'), +(-1548041,'summons Watery Globules!',0,2,0,'morogrim EMOTE_WATERY_GLOBULES'), +(-1548042,'Water is life. It has become a rare commodity here in Outland. A commodity that we alone shall control. We are the Highborne, and the time has come at last for us to retake our rightful place in the world!',11531,1,0,'vashj SAY_INTRO'), +(-1548043,'I\'ll split you from stem to stern!',11532,1,0,'vashj SAY_AGGRO1'), +(-1548044,'Victory to Lord Illidan!',11533,1,0,'vashj SAY_AGGRO2'), +(-1548045,'I spit on you, surface filth!',11534,1,0,'vashj SAY_AGGRO3'), +(-1548046,'Death to the outsiders!',11535,1,0,'vashj SAY_AGGRO4'), +(-1548047,'I did not wish to lower myself by engaging your kind, but you leave me little choice!',11538,1,0,'vashj SAY_PHASE1'), +(-1548048,'The time is now! Leave none standing!',11539,1,0,'vashj SAY_PHASE2'), +(-1548049,'You may want to take cover.',11540,1,0,'vashj SAY_PHASE3'), +(-1548050,'Straight to the heart!',11536,1,0,'vashj SAY_BOWSHOT1'), +(-1548051,'Seek your mark!',11537,1,0,'vashj SAY_BOWSHOT2'), +(-1548052,'Your time ends now!',11541,1,0,'vashj SAY_SLAY1'), +(-1548053,'You have failed!',11542,1,0,'vashj SAY_SLAY2'), +(-1548054,'Be\'lamere an\'delay',11543,1,0,'vashj SAY_SLAY3'), +(-1548055,'Lord Illidan, I... I am... sorry.',11544,1,0,'vashj SAY_DEATH'); diff --git a/sql/Updates/0.0.2/r704_scriptdev2_script_texts.sql b/sql/Updates/0.0.2/r704_scriptdev2_script_texts.sql new file mode 100644 index 000000000..3d5b1eff1 --- /dev/null +++ b/sql/Updates/0.0.2/r704_scriptdev2_script_texts.sql @@ -0,0 +1,26 @@ +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1545023 AND -1545000; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1545000,'Surge forth my pets!',10360,1,0,'thespia SAY_SUMMON'), +(-1545001,'The depths will consume you!',10361,1,0,'thespia SAY_AGGRO_1'), +(-1545002,'Meet your doom, surface dwellers!',10362,1,0,'thespia SAY_AGGRO_2'), +(-1545003,'You will drown in blood!',10363,1,0,'thespia SAY_AGGRO_3'), +(-1545004,'To the depths of oblivion with you!',10364,1,0,'thespia SAY_SLAY_1'), +(-1545005,'For my lady and master!',10365,1,0,'thespia SAY_SLAY_2'), +(-1545006,'Our matron will be.. the end of.. you..',10366,1,0,'thespia SAY_DEAD'), +(-1545007,'I\'m bringin\' the pain!',10367,1,0,'mekgineer SAY_MECHANICS'), +(-1545008,'You\'re in for a world of hurt!',10368,1,0,'mekgineer SAY_AGGRO_1'), +(-1545009,'Eat hot metal, scumbag!',10369,1,0,'mekgineer SAY_AGGRO_2'), +(-1545010,'I\'ll come over there!',10370,1,0,'mekgineer SAY_AGGRO_3'), +(-1545011,'I\'m bringin\' the pain!',10371,1,0,'mekgineer SAY_AGGRO_4'), +(-1545012,'You just got served, punk!',10372,1,0,'mekgineer SOUND_SLAY_1'), +(-1545013,'I own you!',10373,1,0,'mekgineer SOUND_SLAY_2'), +(-1545014,'Have fun dyin\', cupcake!',10374,1,0,'mekgineer SOUND_SLAY_3'), +(-1545015,'Mommy!',10375,1,0,'mekgineer SAY_DEATH'), +(-1545016,'You deem yourselves worthy simply because you bested my guards? Our work here will not be compromised!',10390,1,0,'kalithresh SAY_INTRO'), +(-1545017,'This is not nearly over...',10391,1,0,'kalithresh SAY_REGEN'), +(-1545018,'Your head will roll!',10392,1,0,'kalithresh SAY_AGGRO1'), +(-1545019,'I despise all of your kind!',10393,1,0,'kalithresh SAY_AGGRO2'), +(-1545020,'Ba\'ahntha sol\'dorei!',10394,1,0,'kalithresh SAY_AGGRO3'), +(-1545021,'Scram, surface filth!',10395,1,0,'kalithresh SAY_SLAY1'), +(-1545022,'Ah ha ha ha ha ha ha!',10396,1,0,'kalithresh SAY_SLAY2'), +(-1545023,'For her Excellency... for... Vashj!',10397,1,0,'kalithresh SAY_DEATH'); diff --git a/sql/Updates/0.0.2/r705_scriptdev2_script_texts.sql b/sql/Updates/0.0.2/r705_scriptdev2_script_texts.sql new file mode 100644 index 000000000..a3c0de4b1 --- /dev/null +++ b/sql/Updates/0.0.2/r705_scriptdev2_script_texts.sql @@ -0,0 +1,100 @@ +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1540041 AND -1540000; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1540000,'You wish to fight us all at once? This should be amusing!',10262,1,0,'nethekurse SAY_INTRO'), +(-1540001,'You can have that one. I no longer need him.',10263,1,0,'nethekurse PEON_ATTACK_1'), +(-1540002,'Yes, beat him mercilessly. His skull is a thick as an ogres.',10264,1,0,'nethekurse PEON_ATTACK_2'), +(-1540003,'Don\'t waste your time on that one. He\'s weak!',10265,1,0,'nethekurse PEON_ATTACK_3'), +(-1540004,'You want him? Very well, take him!',10266,1,0,'nethekurse PEON_ATTACK_4'), +(-1540005,'One pitiful wretch down. Go on, take another one.',10267,1,0,'nethekurse PEON_DIE_1'), +(-1540006,'Ahh, what a waste... Next!',10268,1,0,'nethekurse PEON_DIE_2'), +(-1540007,'I was going to kill him anyway!',10269,1,0,'nethekurse PEON_DIE_3'), +(-1540008,'Thank you for saving me the trouble! Now it\'s my turn to have some fun...',10270,1,0,'nethekurse PEON_DIE_4'), +(-1540009,'Beg for your pittyfull life!',10259,1,0,'nethekurse SAY_TAUNT_1'), +(-1540010,'Run covad, ruun!',10260,1,0,'nethekurse SAY_TAUNT_2'), +(-1540011,'Your pain amuses me.',10261,1,0,'nethekurse SAY_TAUNT_3'), +(-1540012,'I\'m already bored.',10271,1,0,'nethekurse SAY_AGGRO_1'), +(-1540013,'Come on! ... Show me a real fight.',10272,1,0,'nethekurse SAY_AGGRO_2'), +(-1540014,'I had more fun torturing the peons.',10273,1,0,'nethekurse SAY_AGGRO_3'), +(-1540015,'You Loose.',10274,1,0,'nethekurse SAY_SLAY_1'), +(-1540016,'Ohh! Just die.',10275,1,0,'nethekurse SAY_SLAY_2'), +(-1540017,'What a ... a shame.',10276,1,0,'nethekurse SAY_DIE'), +(-1540018,'Smash!',10306,1,0,'omrogg GoCombat_1'), +(-1540019,'If you nice me let you live.',10308,1,0,'omrogg GoCombat_2'), +(-1540020,'Me hungry!',10309,1,0,'omrogg GoCombat_3'), +(-1540021,'Why don\'t you let me do the talking?',10317,1,0,'omrogg GoCombatDelay_1'), +(-1540022,'No, we will NOT let you live!',10318,1,0,'omrogg GoCombatDelay_2'), +(-1540023,'You always hungry. That why we so fat!',10319,1,0,'omrogg GoCombatDelay_3'), +(-1540024,'You stay here. Me go kill someone else!',10303,1,0,'omrogg Threat_1'), +(-1540025,'What are you doing!',10315,1,0,'omrogg Threat_2'), +(-1540026,'Me kill someone else...',10302,1,0,'omrogg Threat_3'), +(-1540027,'Me not like this one...',10300,1,0,'omrogg Threat_4'), +(-1540028,'That\'s not funny!',10314,1,0,'omrogg ThreatDelay1_1'), +(-1540029,'Me get bored...',10305,1,0,'omrogg ThreatDelay1_2'), +(-1540030,'I\'m not done yet, idiot!',10313,1,0,'omrogg ThreatDelay1_3'), +(-1540031,'Hey you numbskull!',10312,1,0,'omrogg ThreatDelay1_4'), +(-1540032,'Ha ha ha.',10304,1,0,'omrogg ThreatDelay2_1'), +(-1540033,'Whhy! He almost dead!',10316,1,0,'omrogg ThreatDelay2_2'), +(-1540034,'H\'ey...',10307,1,0,'omrogg ThreatDelay2_3'), +(-1540035,'We kill his friend!',10301,1,0,'omrogg ThreatDelay2_4'), +(-1540036,'This one die easy!',10310,1,0,'omrogg Killing_1'), +(-1540037,'I\'m tired. You kill next one!',10320,1,0,'omrogg Killing_2'), +(-1540038,'That\'s because I do all the hard work!',10321,1,0,'omrogg KillingDelay_1'), +(-1540039,'This all...your fault!',10311,1,0,'omrogg YELL_DIE_L'), +(-1540040,'I...hate...you...',10322,1,0,'omrogg YELL_DIE_R'), +(-1540041,'enrages',0,2,0,'omrogg EMOTE_ENRAGE'); + +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1542014 AND -1542000; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1542000,'Who dares interrupt... What is this? What have you done? You ruin everything!',10164,1,0,'kelidan SAY_WAKE'), +(-1542001,'You mustn\'t let him loose!',10166,1,0,'kelidan SAY_ADD_AGGRO_1'), +(-1542002,'Ignorant whelps!',10167,1,0,'kelidan SAY_ADD_AGGRO_2'), +(-1542003,'You fools! He\'ll kill us all!',10168,1,0,'kelidan SAY_ADD_AGGRO_3'), +(-1542004,'Just as you deserve!',10169,1,0,'kelidan SAY_KILL_1'), +(-1542005,'Your friends will soon be joining you.',10170,1,0,'kelidan SAY_KILL_2'), +(-1542006,'Closer... Come closer.. and burn!',10165,1,0,'kelidan SAY_NOVA'), +(-1542007,'Good luck... you\'ll need it..',10171,1,0,'kelidan SAY_DIE'), +(-1542008,'Come intruders....',0,1,0,'broggok SAY_AGGRO'), +(-1542009,'My work must not be interrupted.',10286,1,0,'the_maker SAY_AGGRO_1'), +(-1542010,'Perhaps I can find a use for you.',10287,1,0,'the_maker SAY_AGGRO_2'), +(-1542011,'Anger... Hate... These are tools I can use.',10288,1,0,'the_maker SAY_AGGRO_3'), +(-1542012,'Let\'s see what I can make of you.',10289,1,0,'the_maker SAY_KILL_1'), +(-1542013,'It is pointless to resist.',10290,1,0,'the_maker SAY_KILL_2'), +(-1542014,'Stay away from... me.',10291,1,0,'the_maker SAY_DIE'); + +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1543016 AND -1543000; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1543000,'Do you smell that? Fresh meat has somehow breached our citadel. Be wary of any intruders.',0,1,0,'gargolmar SAY_TAUNT'), +(-1543001,'Heal me! QUICKLY!',10329,1,0,'gargolmar SAY_HEAL'), +(-1543002,'Back off, pup!',10330,1,0,'gargolmar SAY_SURGE'), +(-1543003,'What have we here...?',10331,1,0,'gargolmar SAY_AGGRO_1'), +(-1543004,'Heh... this may hurt a little.',10332,1,0,'gargolmar SAY_AGGRO_2'), +(-1543005,'I\'m gonna enjoy this.',10333,1,0,'gargolmar SAY_AGGRO_3'), +(-1543006,'Say farewell!',10334,1,0,'gargolmar SAY_KILL_1'), +(-1543007,'Much too easy...',10335,1,0,'gargolmar SAY_KILL_2'), +(-1543008,'Hahah.. ..argh!',10336,1,0,'gargolmar SAY_DIE'), +(-1543009,'You dare stand against me?!',10280,1,0,'omor SAY_AGGRO_1'), +(-1543010,'I will not be defeated!',10279,1,0,'omor SAY_AGGRO_2'), +(-1543011,'Your insolence will be your death.',10281,1,0,'omor SAY_AGGRO_3'), +(-1543012,'Achor-she-ki! Feast my pet! Eat your fill!',10277,1,0,'omor SAY_SUMMON'), +(-1543013,'A-Kreesh!',10278,1,0,'omor SAY_CURSE'), +(-1543014,'Die, weakling!',10282,1,0,'omor SAY_KILL_1'), +(-1543015,'It is... not over.',10284,1,0,'omor SAY_DIE'), +(-1543016,'I am victorious!',10283,1,0,'omor SAY_WIPE'); + +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1544014 AND -1544000; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1544000,'Wretched, meddling insects. Release me and perhaps i will grant you a merciful death!',10247,1,0,'magtheridon SAY_TAUNT1'), +(-1544001,'Vermin! Leeches! Take my blood and choke on it!',10248,1,0,'magtheridon SAY_TAUNT2'), +(-1544002,'Illidan is an arrogant fool. I will crush him and reclaim Outland as my own.',10249,1,0,'magtheridon SAY_TAUNT3'), +(-1544003,'Away, you mindless parasites. My blood is my own!',10250,1,0,'magtheridon SAY_TAUNT4'), +(-1544004,'How long do you believe your pathetic sorcery can hold me?',10251,1,0,'magtheridon SAY_TAUNT5'), +(-1544005,'My blood will be the end of you!',10252,1,0,'magtheridon SAY_TAUNT6'), +(-1544006,'I...am...UNLEASHED!!!',10253,1,0,'magtheridon SAY_FREED'), +(-1544007,'Thank you for releasing me. Now...die!',10254,1,0,'magtheridon SAY_AGGRO'), +(-1544008,'Not again...NOT AGAIN!',10256,1,0,'magtheridon SAY_BANISH'), +(-1544009,'I will not be taken so easily. Let the walls of this prison tremble...and FALL!!!',10257,1,0,'magtheridon SAY_CHAMBER_DESTROY'), +(-1544010,'Did you think me weak? Soft? Who is the weak one now?!',10255,1,0,'magtheridon SAY_PLAYER_KILLED'), +(-1544011,'The Legion...will consume you...all...',10258,1,0,'magtheridon SAY_DEATH'), +(-1544012,'becomes enraged!',0,2,0,'magtheridon EMOTE_BERSERK'), +(-1544013,'begins to cast Blast Nova!',0,2,0,'magtheridon EMOTE_BLASTNOVA'), +(-1544014,'bonds begin to weaken!',0,2,0,'magtheridon EMOTE_BEGIN'); diff --git a/sql/Updates/0.0.2/r706_mangos.sql b/sql/Updates/0.0.2/r706_mangos.sql new file mode 100644 index 000000000..33f2e0597 --- /dev/null +++ b/sql/Updates/0.0.2/r706_mangos.sql @@ -0,0 +1,3 @@ +UPDATE `creature_template` SET `ScriptName`='boss_pathaleon_the_calculator' WHERE `entry`=19220; +UPDATE `creature_template` SET `ScriptName`='mob_nether_wraith' WHERE `entry`=21062; +UPDATE `instance_template` SET `script`='instance_mechanar' WHERE `map`=554; diff --git a/sql/Updates/0.0.2/r707_scriptdev2_script_texts.sql b/sql/Updates/0.0.2/r707_scriptdev2_script_texts.sql new file mode 100644 index 000000000..4e2c98435 --- /dev/null +++ b/sql/Updates/0.0.2/r707_scriptdev2_script_texts.sql @@ -0,0 +1,128 @@ +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1565019 AND -1565000; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1565000,'Gronn are the real power in outland.',11367,1,0,'maulgar SAY_AGGRO'), +(-1565001,'You will not defeat the hand of Gruul!',11368,1,0,'maulgar SAY_ENRAGE'), +(-1565002,'You won\'t kill next one so easy!',11369,1,0,'maulgar SAY_OGRE_DEATH1'), +(-1565003,'Pah! Does not prove anything!',11370,1,0,'maulgar SAY_OGRE_DEATH2'), +(-1565004,'I\'m not afraid of you.',11371,1,0,'maulgar SAY_OGRE_DEATH3'), +(-1565005,'Good, now you fight me!',11372,1,0,'maulgar SAY_OGRE_DEATH4'), +(-1565006,'You not so tough afterall!',11373,1,0,'maulgar SAY_SLAY1'), +(-1565007,'Aha-ha ha ha!',11374,1,0,'maulgar SAY_SLAY2'), +(-1565008,'Mulgar is king!',11375,1,0,'maulgar SAY_SLAY3'), +(-1565009,'Gruul... will crush you...',11376,1,0,'maulgar SAY_DEATH'), +(-1565010,'Come... and die.',11355,1,0,'gruul SAY_AGGRO'), +(-1565011,'Scurry',11356,1,0,'gruul SAY_SLAM1'), +(-1565012,'No escape',11357,1,0,'gruul SAY_SLAM2'), +(-1565013,'Stay',11358,1,0,'gruul SAY_SHATTER1'), +(-1565014,'Beg... for life',11359,1,0,'gruul SAY_SHATTER2'), +(-1565015,'No more',11360,1,0,'gruul SAY_SLAY1'), +(-1565016,'Unworthy',11361,1,0,'gruul SAY_SLAY2'), +(-1565017,'Die',11362,1,0,'gruul SAY_SLAY3'), +(-1565018,'Aaargh...',11363,1,0,'gruul SAY_DEATH'), +(-1565019,'grows in size!',0,2,0,'gruul EMOTE_GROW'); + +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1532102 AND -1532000; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1532000,'Well done Midnight!',9173,1,0,'attumen SAY_MIDNIGHT_KILL'), +(-1532001,'Cowards! Wretches!',9167,1,0,'attumen SAY_APPEAR1'), +(-1532002,'Who dares attack the steed of the Huntsman?',9298,1,0,'attumen SAY_APPEAR2'), +(-1532003,'Perhaps you would rather test yourselves against a more formidable opponent?!',9299,1,0,'attumen SAY_APPEAR3'), +(-1532004,'Come, Midnight, let\'s disperse this petty rabble!',9168,1,0,'attumen SAY_MOUNT'), +(-1532005,'It was... inevitable.',9169,1,0,'attumen SAY_KILL1'), +(-1532006,'Another trophy to add to my collection!',9300,1,0,'attumen SAY_KILL2'), +(-1532007,'Weapons are merely a convenience for a warrior of my skill!',9166,1,0,'attumen SAY_DISARMED'), +(-1532008,'I always knew... someday I would become... the hunted.',9165,1,0,'attumen SAY_DEATH'), +(-1532009,'Such easy sport.',9170,1,0,'attumen SAY_RANDOM1'), +(-1532010,'Amateurs! Do not think you can best me! I kill for a living.',9304,1,0,'attumen SAY_RANDOM2'), +(-1532011,'Hmm, unannounced visitors? Preparations must be made.',9211,1,0,'moroes SAY_AGGRO'), +(-1532012,'Now, where was I? Oh yes...',9215,1,0,'moroes SAY_SPECIAL_1'), +(-1532013,'You rang?',9316,1,0,'moroes SAY_SPECIAL_2'), +(-1532014,'One more for dinner this evening.',9214,1,0,'moroes SAY_KILL_1'), +(-1532015,'Time... Never enough time.',9314,1,0,'moroes SAY_KILL_2'), +(-1532016,'I\'ve gone and made a mess.',9315,1,0,'moroes SAY_KILL_3'), +(-1532017,'How terribly clumsy of me...',9213,1,0,'moroes SAY_DEATH'), +(-1532018,'Your behavior will not be tolerated!',9204,1,0,'maiden SAY_AGGRO'), +(-1532019,'Ah ah ah...',9207,1,0,'maiden SAY_SLAY1'), +(-1532020,'This is for the best.',9312,1,0,'maiden SAY_SLAY2'), +(-1532021,'Impure thoughts lead to profane actions.',9311,1,0,'maiden SAY_SLAY3'), +(-1532022,'Cast out your corrupt thoughts.',9313,1,0,'maiden SAY_REPENTANCE1'), +(-1532023,'Your impurity must be cleansed.',9208,1,0,'maiden SAY_REPENTANCE2'), +(-1532024,'Death comes. Will your conscience be clear?',9206,1,0,'maiden SAY_DEATH'), +(-1532025,'Oh at last, at last. I can go home.',9190,1,0,'dorothee SAY_DOROTHEE_DEATH'), +(-1532026,'Don\'t let them hurt us, Tito! Oh, you won\'t, will you?',9191,1,0,'dorothee SAY_DOROTHEE_SUMMON'), +(-1532027,'Tito, oh Tito, no!',9192,1,0,'dorothee SAY_DOROTHEE_TITO_DEATH'), +(-1532028,'Oh dear, we simply must find a way home! The old wizard could be our only hope! Strawman, Roar, Tinhead, will you... wait! Oh golly, look! We have visitors!',9195,1,0,'dorothee SAY_DOROTHEE_AGGRO'), +(-1532029,'Wanna fight? Huh? Do ya? C\'mon, I\'ll fight you with both claws behind my back!',9227,1,0,'roar SAY_ROAR_AGGRO'), +(-1532030,'You didn\'t have to go and do that.',9229,1,0,'roar SAY_ROAR_DEATH'), +(-1532031,'I think I\'m going to go take fourty winks.',9230,1,0,'roar SAY_ROAR_SLAY'), +(-1532032,'Now what should I do with you? I simply can\'t make up my mind.',9254,1,0,'strawman SAY_STRAWMAN_AGGRO'), +(-1532033,'Don\'t let them make a mattress... out of me.',9256,1,0,'strawman SAY_STRAWMAN_DEATH'), +(-1532034,'I guess I\'m not a failure after all.',9257,1,0,'strawman SAY_STRAWMAN_SLAY'), +(-1532035,'I could really use a heart. Say, can I have yours?',9268,1,0,'tinhead SAY_TINHEAD_AGGRO'), +(-1532036,'Back to being an old rustbucket.',9270,1,0,'tinhead SAY_TINHEAD_DEATH'), +(-1532037,'Guess I\'m not so rusty, after all.',9271,1,0,'tinhead SAY_TINHEAD_SLAY'), +(-1532038,'begins to rust.',0,2,0,'tinhead EMOTE_RUST'), +(-1532039,'Woe to each and every one of you my pretties! ',9179,1,0,'crone SAY_CRONE_AGGRO'), +(-1532040,'It will all be over soon! ',9307,1,0,'crone SAY_CRONE_AGGRO2'), +(-1532041,'How could you? What a cruel, cruel world!',9178,1,0,'crone SAY_CRONE_DEATH'), +(-1532042,'Fixed you, didn\'t I? ',9180,1,0,'crone SAY_CRONE_SLAY'), +(-1532043,'All the better to own you with!',9276,1,0,'wolf SAY_WOLF_AGGRO'), +(-1532044,'Mmmm... delicious.',9277,1,0,'wolf SAY_WOLF_SLAY'), +(-1532045,'Run away little girl, run away!',9278,1,0,'wolf SAY_WOLF_HOOD'), +(-1532046,'What devil art thou, that dost torment me thus?',9196,1,0,'julianne SAY_JULIANNE_AGGRO'), +(-1532047,'Where is my lord? Where is my Romulo?',9199,1,0,'julianne SAY_JULIANNE_ENTER'), +(-1532048,'Romulo, I come! Oh... this do I drink to thee!',9198,1,0,'julianne SAY_JULIANNE_DEATH01'), +(-1532049,'Where is my Lord? Where is my Romulo? Ohh, happy dagger! This is thy sheath! There rust, and let me die!',9310,1,0,'julianne SAY_JULIANNE_DEATH02'), +(-1532050,'Come, gentle night; and give me back my Romulo!',9200,1,0,'julianne SAY_JULIANNE_RESURRECT'), +(-1532051,'Parting is such sweet sorrow.',9201,1,0,'julianne SAY_JULIANNE_SLAY'), +(-1532052,'Wilt thou provoke me? Then have at thee, boy!',9233,1,0,'romulo SAY_ROMULO_AGGRO'), +(-1532053,'Thou smilest... upon the stroke that... murders me.',9235,1,0,'romulo SAY_ROMULO_DEATH'), +(-1532054,'This day\'s black fate on more days doth depend. This but begins the woe. Others must end.',9236,1,0,'romulo SAY_ROMULO_ENTER'), +(-1532055,'Thou detestable maw, thou womb of death; I enforce thy rotten jaws to open!',9237,1,0,'romulo SAY_ROMULO_RESURRECT'), +(-1532056,'How well my comfort is revived by this!',9238,1,0,'romulo SAY_ROMULO_SLAY'), +(-1532057,'The Menagerie is for guests only.',9183,1,0,'curator SAY_AGGRO'), +(-1532058,'Gallery rules will be strictly enforced.',9188,1,0,'curator SAY_SUMMON1'), +(-1532059,'This curator is equipped for gallery protection.',9309,1,0,'curator SAY_SUMMON2'), +(-1532060,'Your request cannot be processed.',9186,1,0,'curator SAY_EVOCATE'), +(-1532061,'Failure to comply will result in offensive action.',9185,1,0,'curator SAY_ENRAGE'), +(-1532062,'Do not touch the displays.',9187,1,0,'curator SAY_KILL1'), +(-1532063,'You are not a guest.',9308,1,0,'curator SAY_KILL2'), +(-1532064,'This Curator is no longer op... er... ation... al.',9184,1,0,'curator SAY_DEATH'), +(-1532065,'Your blood will anoint my circle.',9264,1,0,'terestian SAY_SLAY1'), +(-1532066,'The great one will be pleased.',9329,1,0,'terestian SAY_SLAY2'), +(-1532067,'My life, is yours. Oh great one.',9262,1,0,'terestian SAY_DEATH'), +(-1532068,'Ah, you\'re just in time. The rituals are about to begin.',9260,1,0,'terestian SAY_AGGRO'), +(-1532069,'Please, accept this humble offering, oh great one.',9263,1,0,'terestian SAY_SACRIFICE1'), +(-1532070,'Let the sacrifice serve his testament to my fealty.',9330,1,0,'terestian SAY_SACRIFICE2'), +(-1532071,'Come, you dwellers in the dark. Rally to my call!',9265,1,0,'terestian SAY_SUMMON1'), +(-1532072,'Gather, my pets. There is plenty for all.',9331,1,0,'terestian SAY_SUMMON2'), +(-1532073,'Please, no more. My son... he\'s gone mad!',9241,1,0,'aran SAY_AGGRO1'), +(-1532074,'I\'ll not be tortured again!',9323,1,0,'aran SAY_AGGRO2'), +(-1532075,'Who are you? What do you want? Stay away from me!',9324,1,0,'aran SAY_AGGRO3'), +(-1532076,'I\'ll show you this beaten dog still has some teeth!',9245,1,0,'aran SAY_FLAMEWREATH1'), +(-1532077,'Burn you hellish fiends!',9326,1,0,'aran SAY_FLAMEWREATH2'), +(-1532078,'I\'ll freeze you all!',9246,1,0,'aran SAY_BLIZZARD1'), +(-1532079,'Back to the cold dark with you!',9327,1,0,'aran SAY_BLIZZARD2'), +(-1532080,'Yes, yes, my son is quite powerful... but I have powers of my own!',9242,1,0,'aran SAY_EXPLOSION1'), +(-1532081,'I am not some simple jester! I am Nielas Aran!',9325,1,0,'aran SAY_EXPLOSION2'), +(-1532082,'Surely you would not deny an old man a replenishing drink? No, no I thought not.',9248,1,0,'aran SAY_DRINK'), +(-1532083,'I\'m not finished yet! No, I have a few more tricks up me sleeve.',9251,1,0,'aran SAY_ELEMENTALS'), +(-1532084,'I want this nightmare to be over!',9250,1,0,'aran SAY_KILL1'), +(-1532085,'Torment me no more!',9328,1,0,'aran SAY_KILL2'), +(-1532086,'You\'ve wasted enough of my time. Let these games be finished!',9247,1,0,'aran SAY_TIMEOVER'), +(-1532087,'At last... The nightmare is.. over...',9244,1,0,'aran SAY_DEATH'), +(-1532088,'Where did you get that?! Did HE send you?!',9249,1,0,'aran SAY_ATIESH'), +(-1532089,'cries out in withdrawal, opening gates to the warp.',0,2,0,'netherspite EMOTE_PHASE_PORTAL'), +(-1532090,'goes into a nether-fed rage!',0,2,0,'netherspite EMOTE_PHASE_BANISH'), +(-1532091,'Madness has brought you here to me. I shall be your undoing!',9218,1,0,'malchezaar SAY_AGGRO'), +(-1532092,'Simple fools! Time is the fire in which you\'ll burn!',9220,1,0,'malchezaar SAY_AXE_TOSS1'), +(-1532093,'I see the subtlety of conception is beyond primitives such as you.',9317,1,0,'malchezaar SAY_AXE_TOSS2'), +(-1532094,'Who knows what secrets hide in the dark.',9223,1,0,'malchezaar SAY_SPECIAL1'), +(-1532095,'The cerestial forces are mine to manipulate.',9320,1,0,'malchezaar SAY_SPECIAL2'), +(-1532096,'How can you hope to withstand against such overwhelming power?',9321,1,0,'malchezaar SAY_SPECIAL3'), +(-1532097,'Surely you did not think you could win.',9222,1,0,'malchezaar SAY_SLAY1'), +(-1532098,'Your greed, your foolishness has brought you to this end.',9318,1,0,'malchezaar SAY_SLAY2'), +(-1532099,'You are, but a plaything, unfit even to amuse.',9319,1,0,'malchezaar SAY_SLAY3'), +(-1532100,'All realities, all dimensions are open to me!',9224,1,0,'malchezaar SAY_SUMMON1'), +(-1532101,'You face not Malchezaar alone, but the legions I command!',9322,1,0,'malchezaar SAY_SUMMON2'), +(-1532102,'I refuse to concede defeat. I am a prince of the Eredar! I am...',9221,1,0,'malchezaar SAY_DEATH'); diff --git a/sql/Updates/0.0.2/r709_scriptdev2_script_texts.sql b/sql/Updates/0.0.2/r709_scriptdev2_script_texts.sql new file mode 100644 index 000000000..942f1e67e --- /dev/null +++ b/sql/Updates/0.0.2/r709_scriptdev2_script_texts.sql @@ -0,0 +1,93 @@ +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1550043 AND -1550000; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1550000,'Alert, you are marked for extermination!',11213,1,0,'voidreaver SAY_AGGRO'), +(-1550001,'Extermination, successful.',11215,1,0,'voidreaver SAY_SLAY1'), +(-1550002,'Imbecile life form, no longer functional.',11216,1,0,'voidreaver SAY_SLAY2'), +(-1550003,'Threat neutralized.',11217,1,0,'voidreaver SAY_SLAY3'), +(-1550004,'Systems... shutting... down...',11214,1,0,'voidreaver SAY_DEATH'), +(-1550005,'Alternative measure commencing...',11218,1,0,'voidreaver SAY_POUNDING1'), +(-1550006,'Calculating force parameters...',11219,1,0,'voidreaver SAY_POUNDING2'), +(-1550007,'Tal anu\'men no Sin\'dorei!',11134,1,0,'solarian SAY_AGGRO'), +(-1550008,'Ha ha ha! You are hopelessly outmatched!',11139,1,0,'solarian SAY_SUMMON1'), +(-1550009,'I will crush your delusions of grandeur!',11140,1,0,'solarian SAY_SUMMON2'), +(-1550010,'Your soul belongs to the Abyss!',11136,1,0,'solarian SAY_KILL1'), +(-1550011,'By the blood of the Highborne!',11137,1,0,'solarian SAY_KILL2'), +(-1550012,'For the Sunwell!',11138,1,0,'solarian SAY_KILL3'), +(-1550013,'The warmth of the sun... awaits.',11135,1,0,'solarian SAY_DEATH'), +(-1550014,'Enough of this! Now I call upon the fury of the cosmos itself.',0,1,0,'solarian SAY_VOIDA'), +(-1550015,'I become ONE... with the VOID!',0,1,0,'solarian SAY_VOIDB'), +(-1550016,'Energy. Power. My people are addicted to it... a dependence made manifest after the Sunwell was destroyed. Welcome... to the future. A pity you are too late to stop it. No one can stop me now! Selama ashal\'anore!',11256,1,0,'kaelthas SAY_INTRO'), +(-1550017,'Capernian will see to it that your stay here is a short one.',11257,1,0,'kaelthas SAY_INTRO_CAPERNIAN'), +(-1550018,'Well done, you have proven worthy to test your skills against my master engineer, Telonicus.',11258,1,0,'kaelthas SAY_INTRO_TELONICUS'), +(-1550019,'Let us see how your nerves hold up against the Darkener, Thaladred.',11259,1,0,'kaelthas SAY_INTRO_THALADRED'), +(-1550020,'You have persevered against some of my best advisors... but none can withstand the might of the Blood Hammer. Behold, Lord Sanguinar!',11260,1,0,'kaelthas SAY_INTRO_SANGUINAR'), +(-1550021,'As you see, I have many weapons in my arsenal...',11261,1,0,'kaelthas SAY_PHASE2_WEAPON'), +(-1550022,'Perhaps I underestimated you. It would be unfair to make you fight all four advisors at once, but... fair treatment was never shown to my people. I\'m just returning the favor.',11262,1,0,'kaelthas SAY_PHASE3_ADVANCE'), +(-1550023,'Alas, sometimes one must take matters into one\'s own hands. Balamore shanal!',11263,1,0,'kaelthas SAY_PHASE4_INTRO2'), +(-1550024,'I have not come this far to be stopped! The future I have planned will not be jeopardized! Now you will taste true power!!',11273,1,0,'kaelthas SAY_PHASE5_NUTS'), +(-1550025,'You will not prevail.',11270,1,0,'kaelthas SAY_SLAY1'), +(-1550026,'You gambled...and lost.',11271,1,0,'kaelthas SAY_SLAY2'), +(-1550027,'This was Child\'s play.',11272,1,0,'kaelthas SAY_SLAY3'), +(-1550028,'Obey me.',11268,1,0,'kaelthas SAY_MINDCONTROL1'), +(-1550029,'Bow to my will.',11269,1,0,'kaelthas SAY_MINDCONTROL2'), +(-1550030,'Let us see how you fare when your world is turned upside down.',11264,1,0,'kaelthas SAY_GRAVITYLAPSE1'), +(-1550031,'Having trouble staying grounded?',11265,1,0,'kaelthas SAY_GRAVITYLAPSE2'), +(-1550032,'Anara\'nel belore!',11267,1,0,'kaelthas SAY_SUMMON_PHOENIX1'), +(-1550033,'By the power of the sun!',11266,1,0,'kaelthas SAY_SUMMON_PHOENIX2'), +(-1550034,'For...Quel...thalas!',11274,1,0,'kaelthas SAY_DEATH'), +(-1550035,'Prepare yourselves!',11203,1,0,'thaladred SAY_THALADRED_AGGRO'), +(-1550036,'Forgive me, my prince! I have... failed.',11204,1,0,'thaladred SAY_THALADRED_DEATH'), +(-1550037,'sets his gaze on $N!',0,2,0,'thaladred EMOTE_THALADRED_GAZE'), +(-1550038,'Blood for blood!',11152,1,0,'sanguinar SAY_SANGUINAR_AGGRO'), +(-1550039,'NO! I ...will... not...',11153,1,0,'sanguinar SAY_SANGUINAR_DEATH'), +(-1550040,'The sin\'dore reign supreme!',11117,1,0,'capernian SAY_CAPERNIAN_AGGRO'), +(-1550041,'This is not over!',11118,1,0,'capernian SAY_CAPERNIAN_DEATH'), +(-1550042,'Anar\'alah belore!',11157,1,0,'telonicus SAY_TELONICUS_AGGRO'), +(-1550043,'More perils... await',11158,1,0,'telonicus SAY_TELONICUS_DEATH'); + +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1553012 AND -1553000; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1553000,'What are you doing? These specimens are very delicate!',11144,1,0,'freywinn SAY_AGGRO'), +(-1553001,'Your life cycle is now concluded!',11145,1,0,'freywinn SAY_KILL_1'), +(-1553002,'You will feed the worms.',11146,1,0,'freywinn SAY_KILL_2'), +(-1553003,'Endorel aluminor!',11147,1,0,'freywinn SAY_TREE_1'), +(-1553004,'Nature bends to my will!',11148,1,0,'freywinn SAY_TREE_2'), +(-1553005,'The specimens...must be preserved.',11149,1,0,'freywinn SAY_DEATH'), +(-1553006,'emits a strange noise.',0,2,0,'laj EMOTE_SUMMON'), +(-1553007,'Who disturbs this sanctuary?',11230,1,0,'warp SAY_AGGRO'), +(-1553008,'You must die! But wait: this does not--No, no... you must die!',11231,1,0,'warp SAY_SLAY_1'), +(-1553009,'What am I doing? Why do I...',11232,1,0,'warp SAY_SLAY_2'), +(-1553010,'Children, come to me!',11233,1,0,'warp SAY_SUMMON_1'), +(-1553011,'Maybe this is not--No, we fight! Come to my aid.',11234,1,0,'warp SAY_SUMMON_2'), +(-1553012,'So... confused. Do not... belong here!',11235,1,0,'warp SAY_DEATH'); + +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1554027 AND -1554000; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1554000,'I predict a painful death.',11101,1,0,'gyro SAY_AGGRO'), +(-1554001,'Measure twice; cut once!',11104,1,0,'gyro SAY_SAW_ATTACK1'), +(-1554002,'If my division is correct, you should be quite dead.',11105,1,0,'gyro SAY_SAW_ATTACK2'), +(-1554003,'Your strategy was flawed!',11102,1,0,'gyro SAY_SLAY1'), +(-1554004,'Yes, the only logical outcome.',11103,1,0,'gyro SAY_SLAY2'), +(-1554005,'An unforseen... contingency',11106,1,0,'gyro SAY_DEATH'), +(-1554006,'You have approximately five seconds to live.',11109,1,0,'ironhand SAY_AGGRO_1'), +(-1554007,'With the precise angle and velocity...',11112,1,0,'ironhand SAY_HAMMER_1'), +(-1554008,'Low tech yet quiet effective!',11113,1,0,'ironhand SAY_HAMMER_2'), +(-1554009,'A foregone conclusion.',11110,1,0,'ironhand SAY_SLAY_1'), +(-1554010,'The processing will continue a schedule!',11111,1,0,'ironhand SAY_SLAY_2'), +(-1554011,'My calculations did not...',11114,1,0,'ironhand SAY_DEATH_1'), +(-1554012,'raises his hammer menacingly...',0,3,0,'ironhand EMOTE_HAMMER'), +(-1554013,'Don\'t value your life very much, do you?',11186,1,0,'sepethrea SAY_AGGRO'), +(-1554014,'I am not alone.',11191,1,0,'sepethrea SAY_SUMMON'), +(-1554015,'Think you can take the heat?',11189,1,0,'sepethrea SAY_DRAGONS_BREATH_1'), +(-1554016,'Anar\'endal dracon!',11190,1,0,'sepethrea SAY_DRAGONS_BREATH_2'), +(-1554017,'And don\'t come back!',11187,1,0,'sepethrea SAY_SLAY1'), +(-1554018,'En\'dala finel el\'dal',11188,1,0,'sepethrea SAY_SLAY2'), +(-1554019,'Anu... bala belore...alon.',11192,1,0,'sepethrea SAY_DEATH'), +(-1554020,'We are on a strict timetable. You will not interfere!',11193,1,0,'pathaleon SAY_AGGRO'), +(-1554021,'I\'m looking for a team player...',11197,1,0,'pathaleon SAY_DOMINATION_1'), +(-1554022,'You work for me now!',11198,1,0,'pathaleon SAY_DOMINATION_2'), +(-1554023,'Time to supplement my work force.',11196,1,0,'pathaleon SAY_SUMMON'), +(-1554024,'I prefeer to be hands-on...',11199,1,0,'pathaleon SAY_ENRAGE'), +(-1554025,'A minor inconvenience.',11194,1,0,'pathaleon SAY_SLAY_1'), +(-1554026,'Looks like you lose.',11195,1,0,'pathaleon SAY_SLAY_2'), +(-1554027,'The project will... continue.',11200,1,0,'pathaleon SAY_DEATH'); diff --git a/sql/Updates/0.0.2/r710_scriptdev2_script_texts.sql b/sql/Updates/0.0.2/r710_scriptdev2_script_texts.sql new file mode 100644 index 000000000..f8e1d03e2 --- /dev/null +++ b/sql/Updates/0.0.2/r710_scriptdev2_script_texts.sql @@ -0,0 +1,32 @@ +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1585029 AND -1585000; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1585000,'You only waste my time!',12378,1,0,'selin SAY_AGGRO'), +(-1585001,'My hunger knows no bounds!',12381,1,0,'selin SAY_ENERGY'), +(-1585002,'Yes! I am a god!',12382,1,0,'selin SAY_EMPOWERED'), +(-1585003,'Enough distractions!',12388,1,0,'selin SAY_KILL_1'), +(-1585004,'I am invincible!',12385,1,0,'selin SAY_KILL_2'), +(-1585005,'No! More... I must have more!',12383,1,0,'selin SAY_DEATH'), +(-1585006,'begins to channel from the nearby Fel Crystal...',0,3,0,'selin EMOTE_CRYSTAL'), +(-1585007,'Drain...life!',12389,1,0,'vexallus SAY_AGGRO'), +(-1585008,'Un...con...tainable.',12392,1,0,'vexallus SAY_ENERGY'), +(-1585009,'Un...leash...',12390,1,0,'vexallus SAY_OVERLOAD'), +(-1585010,'Con...sume.',12393,1,0,'vexallus SAY_KILL'), +(-1585011,'discharges pure energy!',0,3,0,'vexallus EMOTE_DISCHARGE_ENERGY'), +(-1585012,'Annihilate them!',12395,1,0,'delrissa SAY_AGGRO'), +(-1585013,'Oh, the horror.',12398,1,0,'delrissa LackeyDeath1'), +(-1585014,'Well, aren\'t you lucky?',12400,1,0,'delrissa LackeyDeath2'), +(-1585015,'Now I\'m getting annoyed.',12401,1,0,'delrissa LackeyDeath3'), +(-1585016,'Lackies be damned! I\'ll finish you myself!',12403,1,0,'delrissa LackeyDeath4'), +(-1585017,'I call that a good start.',12405,1,0,'delrissa PlayerDeath1'), +(-1585018,'I could have sworn there were more of you.',12407,1,0,'delrissa PlayerDeath2'), +(-1585019,'Not really much of a group, anymore, is it?',12409,1,0,'delrissa PlayerDeath3'), +(-1585020,'One is such a lonely number.',12410,1,0,'delrissa PlayerDeath4'), +(-1585021,'It\'s been a kick, really.',12411,1,0,'delrissa PlayerDeath5'), +(-1585022,'Not what I had... planned...',12397,1,0,'delrissa SAY_DEATH'), +(-1585023,'Don\'t look so smug! I know what you\'re thinking, but Tempest Keep was merely a set back. Did you honestly believe I would trust the future to some blind, half-night elf mongrel? Oh no, he was merely an instrument, a stepping stone to a much larger plan! It has all led to this, and this time, you will not interfere!',12413,1,0,'kaelthas MT SAY_AGGRO'), +(-1585024,'Vengeance burns!',12415,1,0,'kaelthas MT SAY_PHOENIX'), +(-1585025,'Felomin ashal!',12417,1,0,'kaelthas MT SAY_FLAMESTRIKE'), +(-1585026,'I\'ll turn your world... upside... down...',12418,1,0,'kaelthas MT SAY_GRAVITY_LAPSE'), +(-1585027,'Master... grant me strength.',12419,1,0,'kaelthas MT SAY_TIRED'), +(-1585028,'Do not... get too comfortable.',12420,1,0,'kaelthas MT SAY_RECAST_GRAVITY'), +(-1585029,'My demise accomplishes nothing! The Master will have you! You will drown in your own blood! This world shall burn! Aaaghh!',12421,1,0,'kaelthas MT SAY_DEATH'); diff --git a/sql/Updates/0.0.2/r713_scriptdev2_script_texts.sql b/sql/Updates/0.0.2/r713_scriptdev2_script_texts.sql new file mode 100644 index 000000000..6968c3d5d --- /dev/null +++ b/sql/Updates/0.0.2/r713_scriptdev2_script_texts.sql @@ -0,0 +1,38 @@ +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1580035 AND -1580000; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1580000,'Aggh! No longer will I be a slave to Malygos! Challenge me and you will be destroyed!',12422,1,0,'kalecgos SAY_EVIL_AGGRO'), +(-1580001,'I will purge you!',12423,1,0,'kalecgos SAY_EVIL_SPELL1'), +(-1580002,'Your pain has only begun!',12424,1,0,'kalecgos SAY_EVIL_SPELL2'), +(-1580003,'In the name of Kil\'jaeden!',12425,1,0,'kalecgos SAY_EVIL_SLAY1'), +(-1580004,'You were warned!',12426,1,0,'kalecgos SAY_EVIL_SLAY2'), +(-1580005,'My awakening is complete! You shall all perish!',12427,1,0,'kalecgos SAY_EVIL_ENRAGE'), +(-1580006,'I need... your help... Cannot... resist him... much longer...',12428,1,0,'kalecgos humanoid SAY_GOOD_AGGRO'), +(-1580007,'Aaahhh! Help me, before I lose my mind!',12429,1,0,'kalecgos humanoid SAY_GOOD_NEAR_DEATH'), +(-1580008,'Hurry! There is not much of me left!',12430,1,0,'kalecgos humanoid SAY_GOOD_NEAR_DEATH2'), +(-1580009,'I am forever in your debt. Once we have triumphed over Kil\'jaeden, this entire world will be in your debt as well.',12431,1,0,'kalecgos humanoid SAY_GOOD_PLRWIN'), +(-1580010,'There will be no reprieve. My work here is nearly finished.',12451,1,0,'sathrovarr SAY_SATH_AGGRO'), +(-1580011,'I\'m... never on... the losing... side...',12452,1,0,'sathrovarr SAY_SATH_DEATH'), +(-1580012,'Your misery is my delight!',12453,1,0,'sathrovarr SAY_SATH_SPELL1'), +(-1580013,'I will watch you bleed!',12454,1,0,'sathrovarr SAY_SATH_SPELL2'), +(-1580014,'Pitious mortal!',12455,1,0,'sathrovarr SAY_SATH_SLAY1'), +(-1580015,'Haven\'t you heard? I always win!',12456,1,0,'sathrovarr SAY_SATH_SLAY2'), +(-1580016,'I have toyed with you long enough!',12457,1,0,'sathrovarr SAY_SATH_ENRAGE'), +(-1580017,'Puny lizard! Death is the only answer you\'ll find here!',12458,1,0,'brutallus YELL_INTRO'), +(-1580018,'Grah! Your magic is weak!',12459,1,0,'brutallus YELL_INTRO_BREAK_ICE'), +(-1580019,'I will crush you!',12460,1,0,'brutallus YELL_INTRO_CHARGE'), +(-1580020,'That was fun.',12461,1,0,'brutallus YELL_INTRO_KILL_MADRIGOSA'), +(-1580021,'Come, try your luck!',12462,1,0,'brutallus YELL_INTRO_TAUNT'), +(-1580022,'Ahh! More lambs to the slaughter!',12463,1,0,'brutallus YELL_AGGRO'), +(-1580023,'Perish, insect!',12464,1,0,'brutallus YELL_KILL1'), +(-1580024,'You are meat!',12465,1,0,'brutallus YELL_KILL2'), +(-1580025,'Too easy!',12466,1,0,'brutallus YELL_KILL3'), +(-1580026,'Bring the fight to me!',12467,1,0,'brutallus YELL_LOVE1'), +(-1580027,'Another day, another glorious battle!',12468,1,0,'brutallus YELL_LOVE2'), +(-1580028,'I live for this!',12469,1,0,'brutallus YELL_LOVE3'), +(-1580029,'So much for a real challenge... Die!',12470,1,0,'brutallus YELL_BERSERK'), +(-1580030,'Gah! Well done... Now... this gets... interesting...',12471,1,0,'brutallus YELL_DEATH'), +(-1580031,'Hold, friends! There is information to be had before this devil meets his fate!',12472,1,0,'madrigosa YELL_MADR_ICE_BARRIER'), +(-1580032,'Where is Anveena, demon? What has become of Kalec?',12473,1,0,'madrigosa YELL_MADR_INTRO'), +(-1580033,'You will tell me where they are!',12474,1,0,'madrigosa YELL_MADR_ICE_BLOCK'), +(-1580034,'Speak, I grow weary of asking!',12475,1,0,'madrigosa YELL_MADR_TRAP'), +(-1580035,'Malygos, my lord! I did my best!',12476,1,0,'madrigosa YELL_MADR_DEATH'); diff --git a/sql/Updates/0.0.2/r715_scriptdev2_script_texts.sql b/sql/Updates/0.0.2/r715_scriptdev2_script_texts.sql new file mode 100644 index 000000000..b09c2d765 --- /dev/null +++ b/sql/Updates/0.0.2/r715_scriptdev2_script_texts.sql @@ -0,0 +1,3 @@ +DELETE FROM `script_texts` WHERE `entry`=-1033000; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1033000,'Thanks for freeing me, I\'ll open this door for you, then I will get out of here.',0,0,0,'shadowfang_prisoner SAY_FREE'); diff --git a/sql/Updates/0.0.2/r72.sql b/sql/Updates/0.0.2/r72.sql new file mode 100644 index 000000000..fd79e95cd --- /dev/null +++ b/sql/Updates/0.0.2/r72.sql @@ -0,0 +1,4 @@ +UPDATE `creature_template` SET `ScriptName` = 'mobs_mana_tapped' WHERE `entry` IN (15273,15274,15294,15298,15367); +UPDATE `creature_template` SET `ScriptName` = 'mobs_ghoul_flayer' WHERE `entry` IN (8530, 8531, 8532); +UPDATE `creature_template` SET `ScriptName` = 'mobs_bonechewer_orc' WHERE `entry` IN (16876, 16925, 18952, 19701); +UPDATE `item_template` SET `ScriptName` = 'purification_mixture' WHERE `entry`= 23268; \ No newline at end of file diff --git a/sql/Updates/0.0.2/r725_scriptdev2_script_texts.sql b/sql/Updates/0.0.2/r725_scriptdev2_script_texts.sql new file mode 100644 index 000000000..39a7bd6d0 --- /dev/null +++ b/sql/Updates/0.0.2/r725_scriptdev2_script_texts.sql @@ -0,0 +1,26 @@ +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1309023 AND -1309000; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1309000,'Let the coils of hate unfurl!',8421,1,0,'venoxis SAY_TRANSFORM'), +(-1309001,'Ssserenity..at lassst!',0,1,0,'venoxis SAY_DEATH'), +(-1309002,'Lord Hir\'eek, grant me wings of vengance!',8417,1,0,'jeklik SAY_AGGRO'), +(-1309003,'I command you to rain fire down upon these invaders!',0,1,0,'jeklik SAY_RAIN_FIRE'), +(-1309004,'Finally ...death. Curse you Hakkar! Curse you!',8422,1,0,'jeklik SAY_DEATH'), +(-1309005,'Draw me to your web mistress Shadra. Unleash your venom!',8418,1,0,'marli SAY_AGGRO'), +(-1309006,'Shadra, make of me your avatar!',0,1,0,'marli SAY_TRANSFORM'), +(-1309007,'Aid me my brood!',0,1,0,'marli SAY_SPIDER_SPAWN'), +(-1309008,'Bless you mortal for this release. Hakkar controls me no longer...',8423,1,0,'marli SAY_DEATH'), +(-1309009,'Shirvallah, fill me with your RAGE!',8419,1,0,'thekal SAY_AGGRO'), +(-1309010,'Hakkar binds me no more! Peace at last!',8424,1,0,'thekal SAY_DEATH'), +(-1309011,'Bethekk, your priestess calls upon your might!',8416,1,0,'arlokk SAY_AGGRO'), +(-1309012,'Feast on $n, my pretties!',0,1,0,'arlokk SAY_FEAST_PANTHER'), +(-1309013,'At last, I am free of the Soulflayer!',8412,1,0,'arlokk SAY_DEATH'), +(-1309014,'Welcome to da great show friends! Step right up to die!',8425,1,0,'jindo SAY_AGGRO'), +(-1309015,'I\'ll feed your souls to Hakkar himself!',8413,1,0,'mandokir SAY_AGGRO'), +(-1309016,'DING!',0,1,0,'mandokir SAY_DING_KILL'), +(-1309017,'GRATS!',0,1,0,'mandokir SAY_GRATS_JINDO'), +(-1309018,'I\'m keeping my eye on you, $N!',0,1,0,'mandokir SAY_WATCH'), +(-1309019,'Don\'t make me angry. You won\'t like it when I\'m angry.',0,1,0,'mandokir SAY_WATCH_WHISPER'), +(-1309020,'PRIDE HERALDS THE END OF YOUR WORLD. COME, MORTALS! FACE THE WRATH OF THE SOULFLAYER!',8414,1,0,'hakkar SAY_AGGRO'), +(-1309021,'Fleeing will do you no good, mortals!',0,1,0,'hakkar SAY_FLEEING'), +(-1309022,'You dare set foot upon Hakkari holy ground? Minions of Hakkar, destroy the infidels!',0,1,0,'hakkar SAY_MINION_DESTROY'), +(-1309023,'Minions of Hakkar, hear your God. The sanctity of this temple has been compromised. Invaders encroach upon holy ground! The Altar of Blood must be protected. Kill them all!',0,1,0,'hakkar SAY_PROTECT_ALTAR'); diff --git a/sql/Updates/0.0.2/r726_scriptdev2_script_texts.sql b/sql/Updates/0.0.2/r726_scriptdev2_script_texts.sql new file mode 100644 index 000000000..d432be6f3 --- /dev/null +++ b/sql/Updates/0.0.2/r726_scriptdev2_script_texts.sql @@ -0,0 +1,26 @@ +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1568023 AND -1568000; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1568000,'Spirits of da wind be your doom!',12031,1,0,'janalai SAY_AGGRO'), +(-1568001,'I burn ya now!',12032,1,0,'janalai SAY_FIRE_BOMBS'), +(-1568002,'Where ma hatcha? Get to work on dem eggs!',12033,1,0,'janalai SAY_SUMMON_HATCHER'), +(-1568003,'I show you strength... in numbers.',12034,1,0,'janalai SAY_ALL_EGGS'), +(-1568004,'You done run outta time!',12035,1,0,'janalai SAY_BERSERK'), +(-1568005,'It all be over now, mon!',12036,1,0,'janalai SAY_SLAY_1'), +(-1568006,'Tazaga-choo!',12037,1,0,'janalai SAY_SLAY_2'), +(-1568007,'Zul\'jin... got a surprise for you...',12038,1,0,'janalai SAY_DEATH'), +(-1568008,'Come, strangers. The spirit of the dragonhawk hot be hungry for worthy souls.',12039,1,0,'janalai SAY_EVENT_STRANGERS'), +(-1568009,'Come, friends. Your bodies gonna feed ma hatchlings, and your souls are going to feed me with power!',12040,1,0,'janalai SAY_EVENT_FRIENDS'), +(-1568010,'Get da move on, guards! It be killin\' time!',12066,1,0,'nalorakk SAY_WAVE1_AGGRO'), +(-1568011,'Guards, go already! Who you more afraid of, dem... or me?',12067,1,0,'nalorakk SAY_WAVE2_STAIR1'), +(-1568012,'Ride now! Ride out dere and bring me back some heads!',12068,1,0,'nalorakk SAY_WAVE3_STAIR2'), +(-1568013,'I be losin\' me patience! Go on: make dem wish dey was never born!',12069,1,0,'nalorakk SAY_WAVE4_PLATFORM'), +(-1568014,'What could be better than servin\' da bear spirit for eternity? Come closer now. Bring your souls to me!',12078,1,0,'nalorakk SAY_EVENT1_SACRIFICE'), +(-1568015,'Don\'t be delayin\' your fate. Come to me now. I make your sacrifice quick.',12079,1,0,'nalorakk SAY_EVENT2_SACRIFICE'), +(-1568016,'You be dead soon enough!',12070,1,0,'nalorakk SAY_AGGRO'), +(-1568017,'I bring da pain!',12071,1,0,'nalorakk SAY_SURGE'), +(-1568018,'You call on da beast, you gonna get more dan you bargain for!',12072,1,0,'nalorakk SAY_TOBEAR'), +(-1568019,'Make way for Nalorakk!',12073,1,0,'nalorakk SAY_TOTROLL'), +(-1568020,'You had your chance, now it be too late!',12074,1,0,'nalorakk SAY_BERSERK'), +(-1568021,'Mua-ha-ha! Now whatchoo got to say?',12075,1,0,'nalorakk SAY_SLAY1'), +(-1568022,'Da Amani gonna rule again!',12076,1,0,'nalorakk SAY_SLAY2'), +(-1568023,'I... be waitin\' on da udda side....',12077,1,0,'nalorakk SAY_DEATH'); diff --git a/sql/Updates/0.0.2/r727_scriptdev2_script_texts.sql b/sql/Updates/0.0.2/r727_scriptdev2_script_texts.sql new file mode 100644 index 000000000..b7a2080d0 --- /dev/null +++ b/sql/Updates/0.0.2/r727_scriptdev2_script_texts.sql @@ -0,0 +1,45 @@ +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1509027 AND -1509000; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1509000,'senses your fear.',0,2,0,'moam EMOTE_AGGRO'), +(-1509001,'bristles with energy!',0,2,0,'moan EMOTE_MANA_FULL'), +(-1509002,'sets eyes on $N!',0,2,0,'buru EMOTE_TARGET'), +(-1509003,'They come now. Try not to get yourself killed, young blood.',0,1,0,'andorov SAY_ANDOROV_INTRO'), +(-1509004,'Remember, Rajaxx, when I said I\'d kill you last? I lied...',0,1,0,'andorov SAY_ANDOROV_ATTACK'), +(-1509005,'The time of our retribution is at hand! Let darkness reign in the hearts of our enemies!',8612,1,0,'rajaxx SAY_WAVE3'), +(-1509006,'No longer will we wait behind barred doors and walls of stone! No longer will our vengeance be denied! The dragons themselves will tremble before our wrath!',8610,1,0,'rajaxx SAY_WAVE4'), +(-1509007,'Fear is for the enemy! Fear and death!',8608,1,0,'rajaxx SAY_WAVE5'), +(-1509008,'Staghelm will whimper and beg for his life, just as his whelp of a son did! One thousand years of injustice will end this day!',8611,1,0,'rajaxx SAY_WAVE6'), +(-1509009,'Fandral! Your time has come! Go and hide in the Emerald Dream and pray we never find you!',8607,1,0,'rajaxx SAY_WAVE7'), +(-1509010,'Impudent fool! I will kill you myself!',8609,1,0,'rajaxx SAY_INTRO'), +(-1509011,'Attack and make them pay dearly!',8603,1,0,'rajaxx SAY_UNK1'), +(-1509012,'Crush them! Drive them out!',8605,1,0,'rajaxx SAY_UNK2'), +(-1509013,'Do not hesitate! Destroy them!',8606,1,0,'rajaxx SAY_UNK3'), +(-1509014,'Warriors! Captains! Continue the fight!',8613,1,0,'rajaxx SAY_UNK4'), +(-1509015,'You are not worth my time $N!',8614,1,0,'rajaxx SAY_DEAGGRO'), +(-1509016,'Breath your last!',8604,1,0,'rajaxx SAY_KILLS_ANDOROV'), +(-1509017,'Soon you will know the price of your meddling, mortals... The master is nearly whole... And when he rises, your world will be cease!',0,1,0,'rajaxx SAY_COMPLETE_QUEST'); +(-1509018,'I am rejuvinated!',8593,1,0,'ossirian SAY_SURPREME1'), +(-1509019,'My powers are renewed!',8595,1,0,'ossirian SAY_SURPREME2'), +(-1509020,'My powers return!',8596,1,0,'ossirian SAY_SURPREME3'), +(-1509021,'Protect the city at all costs!',8597,1,0,'ossirian SAY_RAND_INTRO1'), +(-1509022,'The walls have been breached!',8599,1,0,'ossirian SAY_RAND_INTRO2'), +(-1509023,'To your posts. Defend the city.',8600,1,0,'ossirian SAY_RAND_INTRO3'), +(-1509024,'Tresspassers will be terminated.',8601,1,0,'ossirian SAY_RAND_INTRO4'), +(-1509025,'Sands of the desert rise and block out the sun!',8598,1,0,'ossirian SAY_AGGRO'), +(-1509026,'You are terminated.',8602,1,0,'ossirian SAY_SLAY'), +(-1509027,'I...have...failed.',8594,1,0,'ossirian SAY_DEATH'); + +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1531011 AND -1531000; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1531000,'Are you so eager to die? I would be happy to accomodate you.',8615,1,0,'skeram SAY_AGGRO1'), +(-1531001,'Cower mortals! The age of darkness is at hand.',8616,1,0,'skeram SAY_AGGRO2'), +(-1531002,'Tremble! The end is upon you.',8621,1,0,'skeram SAY_AGGRO3'), +(-1531003,'Let your death serve as an example!',8617,1,0,'skeram SAY_SLAY1'), +(-1531004,'Spineless wretches! You will drown in rivers of blood!',8619,1,0,'skeram SAY_SLAY2'), +(-1531005,'The screams of the dying will fill the air. A symphony of terror is about to begin!',8620,1,0,'skeram SAY_SLAY3'), +(-1531006,'Prepare for the return of the ancient ones!',8618,1,0,'skeram SAY_SPLIT'), +(-1531007,'You only delay... the inevetable.',8622,1,0,'skeram SAY_DEATH'), +(-1531008,'You will be judged for defiling these sacred grounds! The laws of the Ancients will not be challenged! Trespassers will be annihilated!',8646,1,0,'sartura SAY_AGGRO'), +(-1531009,'I sentence you to death!',8647,1,0,'sartura SAY_SLAY'), +(-1531010,'I serve to the last!',8648,1,0,'sartura SAY_DEATH'), +(-1531011,'is weakened!',0,2,0,'cthun EMOTE_WEAKENED'); diff --git a/sql/Updates/0.0.2/r728_scriptdev2_script_texts.sql b/sql/Updates/0.0.2/r728_scriptdev2_script_texts.sql new file mode 100644 index 000000000..56e8ae1ae --- /dev/null +++ b/sql/Updates/0.0.2/r728_scriptdev2_script_texts.sql @@ -0,0 +1,12 @@ +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1509027 AND -1509018; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1509018,'I am rejuvinated!',8593,1,0,'ossirian SAY_SURPREME1'), +(-1509019,'My powers are renewed!',8595,1,0,'ossirian SAY_SURPREME2'), +(-1509020,'My powers return!',8596,1,0,'ossirian SAY_SURPREME3'), +(-1509021,'Protect the city at all costs!',8597,1,0,'ossirian SAY_RAND_INTRO1'), +(-1509022,'The walls have been breached!',8599,1,0,'ossirian SAY_RAND_INTRO2'), +(-1509023,'To your posts. Defend the city.',8600,1,0,'ossirian SAY_RAND_INTRO3'), +(-1509024,'Tresspassers will be terminated.',8601,1,0,'ossirian SAY_RAND_INTRO4'), +(-1509025,'Sands of the desert rise and block out the sun!',8598,1,0,'ossirian SAY_AGGRO'), +(-1509026,'You are terminated.',8602,1,0,'ossirian SAY_SLAY'), +(-1509027,'I...have...failed.',8594,1,0,'ossirian SAY_DEATH'); diff --git a/sql/Updates/0.0.2/r729_scriptdev2_script_texts.sql b/sql/Updates/0.0.2/r729_scriptdev2_script_texts.sql new file mode 100644 index 000000000..1447905a5 --- /dev/null +++ b/sql/Updates/0.0.2/r729_scriptdev2_script_texts.sql @@ -0,0 +1,99 @@ +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1564096 AND -1564000; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1564000,'You will die in the name of Lady Vashj!',11450,1,0,'SAY_AGGRO'), +(-1564001,'Stick around!',11451,1,0,'SAY_NEEDLE1'), +(-1564002,'I\'ll deal with you later!',11452,1,0,'SAY_NEEDLE2'), +(-1564003,'Your success was short lived!',11455,1,0,'SAY_SLAY1'), +(-1564004,'Time for you to go!',11456,1,0,'SAY_SLAY2'), +(-1564005,'Bel\'anen dal\'lorei!',11453,1,0,'SAY_SPECIAL1'), +(-1564006,'Blood will flow!',11454,1,0,'SAY_SPECIAL2'), +(-1564007,'Bal\'amer ch\'itah!',11457,1,0,'SAY_ENRAGE1'), +(-1564008,'My patience has ran out! Die, DIE!',11458,1,0,'SAY_ENRAGE2'), +(-1564009,'Lord Illidan will... crush you.',11459,1,0,'SAY_DEATH'), +(-1564010,'%s acquires a new target!',0,3,0,'supremus EMOTE_NEW_TARGET'), +(-1564011,'%s punches the ground in anger!',0,3,0,'supremus EMOTE_PUNCH_GROUND'), +(-1564012,'The ground begins to crack open!',0,3,0,'supremus EMOTE_GROUND_CRACK'), +(-1564013,'No! Not yet...',11385,1,0,'akama shade SAY_LOW_HEALTH'), +(-1564014,'I will not last much longer...',11386,1,0,'akama shade SAY_DEATH'), +(-1564015,'Come out from the shadows! I\'ve returned to lead you against our true enemy! Shed your chains and raise your weapons against your Illidari masters!',0,1,0,'akama shade SAY_FREE'), +(-1564016,'Hail our leader! Hail Akama!',0,1,0,'akama shade broken SAY_BROKEN_FREE_01'), +(-1564017,'Hail Akama!',0,1,0,'akama shade broken SAY_BROKEN_FREE_02'), +(-1564018,'You play, you pay.',11501,1,0,'shahraz SAY_TAUNT1'), +(-1564019,'I\'m not impressed.',11502,1,0,'shahraz SAY_TAUNT2'), +(-1564020,'Enjoying yourselves?',11503,1,0,'shahraz SAY_TAUNT3'), +(-1564021,'So... business or pleasure?',11504,1,0,'shahraz SAY_AGGRO'), +(-1564022,'You seem a little tense.',11505,1,0,'shahraz SAY_SPELL1'), +(-1564023,'Don\'t be shy.',11506,1,0,'shahraz SAY_SPELL2'), +(-1564024,'I\'m all... yours.',11507,1,0,'shahraz SAY_SPELL3'), +(-1564025,'Easy come, easy go.',11508,1,0,'shahraz SAY_SLAY1'), +(-1564026,'So much for a happy ending.',11509,1,0,'shahraz SAY_SLAY2'), +(-1564027,'Stop toying with my emotions!',11510,1,0,'shahraz SAY_ENRAGE'), +(-1564028,'I wasn\'t... finished.',11511,1,0,'shahraz SAY_DEATH'), +(-1564029,'Horde will... crush you.',11432,1,0,'bloodboil SOUND_AGGRO'), +(-1564030,'Time to feast!',11433,1,0,'bloodboil SAY_SLAY1'), +(-1564031,'More! I want more!',11434,1,0,'bloodboil SAY_SLAY2'), +(-1564032,'Drink your blood! Eat your flesh!',11435,1,0,'bloodboil SAY_SPECIAL1'), +(-1564033,'I hunger!',11436,1,0,'bloodboil SAY_SPECIAL2'), +(-1564034,'',11437,1,0,'bloodboil SAY_ENRAGE1'), +(-1564035,'I\'ll rip the meat from your bones!',11438,1,0,'bloodboil SAY_ENRAGE2'), +(-1564036,'Aaaahrg...',11439,1,0,'bloodboil SAY_DEATH'), +(-1564037,'I was the first, you know. For me, the wheel of death has spun many times. So much time has passed. I have a lot of catching up to do...',11512,1,0,'teron SAY_INTRO'), +(-1564038,'Vengeance is mine!',11513,1,0,'teron SAY_AGGRO'), +(-1564039,'I have use for you!',11514,1,0,'teron SAY_SLAY1'), +(-1564040,'It gets worse...',11515,1,0,'teron SAY_SLAY2'), +(-1564041,'What are you afraid of?',11517,1,0,'teron SAY_SPELL1'), +(-1564042,'Death... really isn\'t so bad.',11516,1,0,'teron SAY_SPELL2'), +(-1564043,'Give in!',11518,1,0,'teron SAY_SPECIAL1'), +(-1564044,'I have something for you...',11519,1,0,'teron SAY_SPECIAL2'), +(-1564045,'YOU WILL SHOW THE PROPER RESPECT!',11520,1,0,'teron SAY_ENRAGE'), +(-1564046,'The wheel...spins...again....',11521,1,0,'teron SAY_DEATH'), +(-1564047,'Pain and suffering are all that await you!',11415,1,0,'essence SUFF_SAY_FREED'), +(-1564048,'Don\'t leave me alone!',11416,1,0,'essence SUFF_SAY_AGGRO'), +(-1564049,'Look at what you make me do!',11417,1,0,'essence SUFF_SAY_SLAY1'), +(-1564050,'I didn\'t ask for this!',11418,1,0,'essence SUFF_SAY_SLAY2'), +(-1564051,'The pain is only beginning!',11419,1,0,'essence SUFF_SAY_SLAY3'), +(-1564052,'I don\'t want to go back!',11420,1,0,'essence SUFF_SAY_RECAP'), +(-1564053,'Now what do I do?',11421,1,0,'essence SUFF_SAY_AFTER'), +(-1564054,'%s becomes enraged!',0,3,0,'essence SUFF_EMOTE_ENRAGE'), +(-1564055,'You can have anything you desire... for a price.',11408,1,0,'essence DESI_SAY_FREED'), +(-1564056,'Fulfilment is at hand!',11409,1,0,'essence DESI_SAY_SLAY1'), +(-1564057,'Yes... you\'ll stay with us now...',11410,1,0,'essence DESI_SAY_SLAY2'), +(-1564058,'Your reach exceeds your grasp.',11412,1,0,'essence DESI_SAY_SLAY3'), +(-1564059,'Be careful what you wish for...',11411,1,0,'essence DESI_SAY_SPEC'), +(-1564060,'I\'ll be waiting...',11413,1,0,'essence DESI_SAY_RECAP'), +(-1564061,'I won\'t be far...',11414,1,0,'essence DESI_SAY_AFTER'), +(-1564062,'Beware: I live!',11399,1,0,'essence ANGER_SAY_FREED'), +(-1564063,'So... foolish.',11400,1,0,'essence ANGER_SAY_FREED2'), +(-1564064,'',11401,1,0,'essence ANGER_SAY_SLAY1'), +(-1564065,'Enough. No more.',11402,1,0,'essence ANGER_SAY_SLAY2'), +(-1564066,'On your knees!',11403,1,0,'essence ANGER_SAY_SPEC'), +(-1564067,'Beware, coward.',11405,1,0,'essence ANGER_SAY_BEFORE'), +(-1564068,'I won\'t... be... ignored.',11404,1,0,'essence ANGER_SAY_DEATH'), +(-1564069,'You wish to test me?',11524,1,0,'council vera AGGRO'), +(-1564070,'I have better things to do...',11422,1,0,'council gath AGGRO'), +(-1564071,'Flee or die!',11482,1,0,'council mala AGGRO'), +(-1564072,'Common... such a crude language. Bandal!',11440,1,0,'council zere AGGRO'), +(-1564073,'Enough games!',11428,1,0,'council gath ENRAGE'), +(-1564074,'You wish to kill me? Hahaha, you first!',11530,1,0,'council vera ENRAGE'), +(-1564075,'For Quel\'Thalas! For the Sunwell!',11488,1,0,'council mala ENRAGE'), +(-1564076,'Sha\'amoor sine menoor!',11446,1,0,'council zere ENRAGE'), +(-1564077,'Enjoy your final moments!',11426,1,0,'council gath SPECIAL1'), +(-1564078,'You\'re not caught up for this!',11528,1,0,'council vera SPECIAL1'), +(-1564079,'No second chances!',11486,1,0,'council mala SPECIAL1'), +(-1564080,'Diel fin\'al',11444,1,0,'council zere SPECIAL1'), +(-1564081,'You are mine!',11427,1,0,'council gath SPECIAL2'), +(-1564082,'Anar\'alah belore!',11529,1,0,'council vera SPECIAL2'), +(-1564083,'I\'m full of surprises!',11487,1,0,'council mala SPECIAL2'), +(-1564084,'Sha\'amoor ara mashal?',11445,1,0,'council zere SPECIAL2'), +(-1564085,'Selama am\'oronor!',11423,1,0,'council gath SLAY'), +(-1564086,'Valiant effort!',11525,1,0,'council vera SLAY'), +(-1564087,'My work is done.',11483,1,0,'council mala SLAY'), +(-1564088,'Shorel\'aran.',11441,1,0,'council zere SLAY'), +(-1564089,'Well done!',11424,1,0,'council gath SLAY_COMT'), +(-1564090,'A glorious kill!',11526,1,0,'council vera SLAY_COMT'), +(-1564091,'As it should be!',11484,1,0,'council mala SLAY_COMT'), +(-1564092,'Belesa menoor!',11442,1,0,'council zere SLAY_COMT'), +(-1564093,'Lord Illidan... I...',11425,1,0,'council gath DEATH'), +(-1564094,'You got lucky!',11527,1,0,'council vera DEATH'), +(-1564095,'Destiny... awaits.',11485,1,0,'council mala DEATH'), +(-1564096,'Diel ma\'ahn... oreindel\'o',11443,1,0,'council zere DEATH'); diff --git a/sql/Updates/0.0.2/r730_scriptdev2_script_texts.sql b/sql/Updates/0.0.2/r730_scriptdev2_script_texts.sql new file mode 100644 index 000000000..829043eaa --- /dev/null +++ b/sql/Updates/0.0.2/r730_scriptdev2_script_texts.sql @@ -0,0 +1,21 @@ +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1409018 AND -1409000; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1409000,'performs one last service for Ragnaros.',0,2,0,'geddon EMOTE_SERVICE'), +(-1409001,'goes into a killing frenzy!',0,2,0,'magmadar EMOTE_FRENZY'), +(-1409002,'refuses to die while its master is in trouble.',0,2,0,'core rager EMOTE_AEGIS'), +(-1409003,'Reckless mortals, none may challenge the sons of the living flame!',8035,1,0,'majordomo SAY_AGGRO'), +(-1409004,'The runes of warding have been destroyed! Hunt down the infedels my bretheren.',8039,1,0,'majordomo SAY_SPAWN'), +(-1409005,'Ashes to Ashes!',8037,1,0,'majordomo SAY_SLAY'), +(-1409006,'Burn mortals! Burn for this transgression!',8036,1,0,'majordomo SAY_SPECIAL'), +(-1409007,'Impossible! Stay your attack mortals! I submitt! I submitt! Brashly you have come to rest the secrets of the living flame. You will soon regret the recklessness of your quest. I go now to summon the lord whos house this is. Should you seek an audiance with him your paltry lives will surly be forfit. Nevertheless seek out his lair if you dare!',8038,1,0,'majordomo SAY_DEFEAT'), +(-1409008,'Behold Ragnaros, the Firelord! He who was ancient when this world was young! Bow before him, mortals! Bow before your ending!',8040,1,0,'ragnaros SAY_SUMMON_MAJ'), +(-1409009,'TOO SOON! YOU HAVE AWAKENED ME TOO SOON, EXECUTUS! WHAT IS THE MEANING OF THIS INTRUSION?',8043,1,0,'ragnaros SAY_ARRIVAL1_RAG'), +(-1409010,'These mortal infidels, my lord! They have invaded your sanctum, and seek to steal your secrets!',8041,1,0,'ragnaros SAY_ARRIVAL2_MAJ'), +(-1409011,'FOOL! YOU ALLOWED THESE INSECTS TO RUN RAMPANT THROUGH THE HALLOWED CORE, AND NOW YOU LEAD THEM TO MY VERY LAIR? YOU HAVE FAILED ME, EXECUTUS! JUSTICE SHALL BE MET, INDEED!',8044,1,0,'ragnaros SAY_ARRIVAL3_RAG'), +(-1409012,'NOW FOR YOU, INSECTS. BOLDLY YOU SAUGHT THE POWER OF RAGNAROS NOW YOU SHALL SEE IT FIRST HAND.',8045,1,0,'ragnaros SAY_ARRIVAL5_RAG'), +(-1409013,'COME FORTH, MY SERVANTS! DEFEND YOUR MASTER!',8049,1,0,'ragnaros SAY_REINFORCEMENTS1'), +(-1409014,'YOU CANNOT DEFEAT THE LIVING FLAME! COME YOU MINIONS OF FIRE! COME FORTH YOU CREATURES OF HATE! YOUR MASTER CALLS!',8050,1,0,'ragnaros SAY_REINFORCEMENTS2'), +(-1409015,'BY FIRE BE PURGED!',8046,1,0,'ragnaros SAY_HAND'), +(-1409016,'TASTE THE FLAMES OF SULFURON!',8047,1,0,'ragnaros SAY_WRATH'), +(-1409017,'DIE INSECT!',8051,1,0,'ragnaros SAY_KILL'), +(-1409018,'MY PATIENCE IS DWINDILING! COME NATS TO YOUR DEATH!',8048,1,0,'ragnaros SAY_MAGMABURST'); diff --git a/sql/Updates/0.0.2/r732_scriptdev2_script_texts.sql b/sql/Updates/0.0.2/r732_scriptdev2_script_texts.sql new file mode 100644 index 000000000..445a2ffc4 --- /dev/null +++ b/sql/Updates/0.0.2/r732_scriptdev2_script_texts.sql @@ -0,0 +1,50 @@ +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1552030 AND -1552000; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1552000,'It is a small matter to control the mind of the weak... for I bear allegiance to powers untouched by time, unmoved by fate. No force on this world or beyond harbors the strength to bend our knee... not even the mighty Legion!',11122,1,0,'skyriss SAY_INTRO'), +(-1552001,'Bear witness to the agent of your demise!',11123,1,0,'skyriss SAY_AGGRO'), +(-1552002,'Your fate is written!',11124,1,0,'skyriss SAY_KILL_1'), +(-1552003,'The chaos I have sown here is but a taste...',11125,1,0,'skyriss SAY_KILL_2'), +(-1552004,'You will do my bidding, weakling.',11127,1,0,'skyriss SAY_MIND_1'), +(-1552005,'Your will is no longer your own.',11128,1,0,'skyriss SAY_MIND_2'), +(-1552006,'Flee in terror!',11129,1,0,'skyriss SAY_FEAR_1'), +(-1552007,'I will show you horrors undreamed of!',11130,1,0,'skyriss SAY_FEAR_2'), +(-1552008,'We span the universe, as countless as the stars!',11131,1,0,'skyriss SAY_IMAGE'), +(-1552009,'I am merely one of... infinite multitudes.',11126,1,0,'skyriss SAY_DEATH'), +(-1552010,'Where in Bonzo\'s brass buttons am I? And who are-- yaaghh, that\'s one mother of a headache!',11171,1,0,'millhouse SAY_INTRO_1'), +(-1552011,'\"Lowly\"? I don\'t care who you are friend, no one refers to the mighty Millhouse Manastorm as \"Lowly\"! I have no idea what goes on here, but I will gladly join your fight against this impudent imbecile! Prepare to defend yourself, cretin!',11172,1,0,'millhouse SAY_INTRO_2'), +(-1552012,'I just need to get some things ready first. You guys go ahead and get started. I need to summon up some water...',11173,1,0,'millhouse SAY_WATER'), +(-1552013,'Fantastic! Next, some protective spells. Yes! Now we\'re cookin\'',11174,1,0,'millhouse SAY_BUFFS'), +(-1552014,'And of course i\'ll need some mana. You guys are gonna love this, just wait.',11175,1,0,'millhouse SAY_DRINK'), +(-1552015,'Aaalllriiiight!! Who ordered up an extra large can of whoop-ass?',11176,1,0,'millhouse SAY_READY'), +(-1552016,'I didn\'t even break a sweat on that one.',11177,1,0,'millhouse SAY_KILL_1'), +(-1552017,'You guys, feel free to jump in anytime.',11178,1,0,'millhouse SAY_KILL_2'), +(-1552018,'I\'m gonna light you up, sweet cheeks!',11179,1,0,'millhouse SAY_PYRO'), +(-1552019,'Ice, ice, baby!',11180,1,0,'millhouse SAY_ICEBLOCK'), +(-1552020,'Heal me! Oh, for the love of all that is holy, HEAL me! I\'m dying!',11181,1,0,'millhouse SAY_LOWHP'), +(-1552021,'You\'ll be hearing from my lawyer...',11182,1,0,'millhouse SAY_DEATH'), +(-1552022,'Who\'s bad? Who\'s bad? That\'s right: we bad!',11183,1,0,'millhouse SAY_COMPLETE'), +(-1552023,'I knew the prince would be angry but, I... I have not been myself. I had to let them out! The great one speaks to me, you see. Wait--outsiders. Kael\'thas did not send you! Good... I\'ll just tell the prince you released the prisoners!',11222,1,0,'mellichar YELL_INTRO1'), +(-1552024,'The naaru kept some of the most dangerous beings in existence here in these cells. Let me introduce you to another...',11223,1,0,'mellichar YELL_INTRO2'), +(-1552025,'Yes, yes... another! Your will is mine!',11224,1,0,'mellichar YELL_RELEASE1'), +(-1552026,'Behold another terrifying creature of incomprehensible power!',11225,1,0,'mellichar YELL_RELEASE2A'), +(-1552027,'What is this? A lowly gnome? I will do better, O\'great one.',11226,1,0,'mellichar YELL_RELEASE2B'), +(-1552028,'Anarchy! Bedlam! Oh, you are so wise! Yes, I see it now, of course!',11227,1,0,'mellichar YELL_RELEASE3'), +(-1552029,'One final cell remains. Yes, O\'great one, right away!',11228,1,0,'mellichar YELL_RELEASE4'), +(-1552030,'Welcome, O\'great one. I am your humble servant.',11229,1,0,'mellichar YELL_WELCOME'); + +DELETE FROM `script_texts` WHERE `entry`=-1000100; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1000100,'Come, little ones. Face me!',0,1,0,'azuregos SAY_TELEPORT'); + +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1249004 AND -1249000; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1249000,'How fortuitous. Usually, I must leave my lair to feed.',0,1,0,'onyxia SAY_AGGRO'), +(-1249001,'Learn your place mortal!',0,1,0,'onyxia SAY_KILL'), +(-1249002,'This meaningless exertion bores me. I\'ll incinerate you all from above!',0,1,0,'onyxia SAY_PHASE_2_TRANS'), +(-1249003,'It seems you\'ll need another lesson, mortals!',0,1,0,'onyxia SAY_PHASE_3_TRANS'), +(-1249004,'takes in a deep breath...',0,1,0,'onyxia EMOTE_BREATH'); + +DELETE FROM `script_texts` WHERE `entry`=-1469031; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1469031,'goes into a frenzy!',0,2,0,'flamegor EMOTE_FRENZY'); + diff --git a/sql/Updates/0.0.2/r735_mangos.sql b/sql/Updates/0.0.2/r735_mangos.sql new file mode 100644 index 000000000..f621534e8 --- /dev/null +++ b/sql/Updates/0.0.2/r735_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName`='npc_defias_traitor' WHERE `entry`=467; diff --git a/sql/Updates/0.0.2/r735_scriptdev2_script_texts.sql b/sql/Updates/0.0.2/r735_scriptdev2_script_texts.sql new file mode 100644 index 000000000..2dea0fe9d --- /dev/null +++ b/sql/Updates/0.0.2/r735_scriptdev2_script_texts.sql @@ -0,0 +1,7 @@ +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000105 AND -1000101; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1000101,'Follow me, $N. I\'ll take you to the Defias hideout. But you better protect me or I am as good as dead',0,0,7,'defias traitor SAY_START'), +(-1000102,'The entrance is hidden here in Moonbrook. Keep your eyes peeled for thieves. They want me dead.',0,0,7,'defias traitor SAY_PROGRESS'), +(-1000103,'You can go tell Stoutmantle this is where the Defias Gang is holed up, $N.',0,0,7,'defias traitor SAY_END'), +(-1000104,'%s coming in fast! Prepare to fight!',0,0,7,'defias traitor SAY_AGGRO_1'), +(-1000105,'Help!',0,0,7,'defias traitor SAY_AGGRO_2'); diff --git a/sql/Updates/0.0.2/r740_mangos.sql b/sql/Updates/0.0.2/r740_mangos.sql new file mode 100644 index 000000000..6c95ec939 --- /dev/null +++ b/sql/Updates/0.0.2/r740_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName`='npc_torek' WHERE `entry`=12858; diff --git a/sql/Updates/0.0.2/r740_scriptdev2_script_texts.sql b/sql/Updates/0.0.2/r740_scriptdev2_script_texts.sql new file mode 100644 index 000000000..5b94c5cfc --- /dev/null +++ b/sql/Updates/0.0.2/r740_scriptdev2_script_texts.sql @@ -0,0 +1,7 @@ +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000110 AND -1000106; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1000106,'Everyone ready?',0,0,1,'torek SAY_READY'), +(-1000107,'Ok, Lets move out!',0,0,1,'torek SAY_MOVE'), +(-1000108,'Prepare yourselves. Silverwing is just around the bend.',0,0,1,'torek SAY_PREPARE'), +(-1000109,'Silverwing is ours!',0,0,1,'torek SAY_WIN'), +(-1000110,'Go report that the outpost is taken. We will remain here.',0,0,1,'torek SAY_END'); diff --git a/sql/Updates/0.0.2/r743_mangos.sql b/sql/Updates/0.0.2/r743_mangos.sql new file mode 100644 index 000000000..752da5bd5 --- /dev/null +++ b/sql/Updates/0.0.2/r743_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName`='npc_magwin' WHERE `entry`=17312; diff --git a/sql/Updates/0.0.2/r743_scriptdev2_script_texts.sql b/sql/Updates/0.0.2/r743_scriptdev2_script_texts.sql new file mode 100644 index 000000000..c6fade116 --- /dev/null +++ b/sql/Updates/0.0.2/r743_scriptdev2_script_texts.sql @@ -0,0 +1,8 @@ +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000116 AND -1000111; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1000111, 'Our house is this way, through the thicket.', 0, 0, 7, 'magwin SAY_START'), +(-1000112, 'Help me!', 0, 0, 7, 'magwin SAY_AGGRO'), +(-1000113, 'My poor family. Everything has been destroyed.', 0, 0, 7, 'magwin SAY_PROGRESS'), +(-1000114, 'Father! Father! You\'re alive!', 0, 0, 7, 'magwin SAY_END1'), +(-1000115, 'You can thank $N for getting me back here safely, father.', 0, 0, 7, 'magwin SAY_END2'), +(-1000116, 'hugs her father.', 0, 2, 7, 'magwin EMOTE_HUG'); diff --git a/sql/Updates/0.0.2/r745_scriptdev2_script_texts.sql b/sql/Updates/0.0.2/r745_scriptdev2_script_texts.sql new file mode 100644 index 000000000..a8fbdf12d --- /dev/null +++ b/sql/Updates/0.0.2/r745_scriptdev2_script_texts.sql @@ -0,0 +1,28 @@ +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1560048 AND -1560023; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1560023,'Very well then. Let\'s go!',10465,1,0,'thrall hillsbrad SAY_TH_START_EVENT_PART1'), +(-1560024,'As long as we\'re going with a new plan, I may aswell pick up a weapon and some armor.',0,0,0,'thrall hillsbrad SAY_TH_ARMORY'), +(-1560025,'A rider approaches!',10466,0,0,'thrall hillsbrad SAY_TH_SKARLOC_MEET'), +(-1560026,'I\'ll never be chained again!',10467,1,0,'thrall hillsbrad SAY_TH_SKARLOC_TAUNT'), +(-1560027,'Very well. Tarren Mill lies just west of here. Since time is of the essence...',10468,1,0,'thrall hillsbrad SAY_TH_START_EVENT_PART2'), +(-1560028,'Let\'s ride!',10469,0,0,'thrall hillsbrad SAY_TH_MOUNTS_UP'), +(-1560029,'Taretha must be in the inn. Let\'s go.',0,0,0,'thrall hillsbrad SAY_TH_CHURCH_END'), +(-1560030,'Taretha! What foul magic is this?',0,0,0,'thrall hillsbrad SAY_TH_MEET_TARETHA'), +(-1560031,'Who or what was that?',10470,1,0,'thrall hillsbrad SAY_TH_EPOCH_WONDER'), +(-1560032,'No!',10471,1,0,'thrall hillsbrad SAY_TH_EPOCH_KILL_TARETHA'), +(-1560033,'Goodbye, Taretha. I will never forget your kindness.',10472,1,0,'thrall hillsbrad SAY_TH_EVENT_COMPLETE'), +(-1560034,'Things are looking grim...',10458,1,0,'thrall hillsbrad SAY_TH_RANDOM_LOW_HP1'), +(-1560035,'I will fight to the last!',10459,1,0,'thrall hillsbrad SAY_TH_RANDOM_LOW_HP2'), +(-1560036,'Taretha...',10460,1,0,'thrall hillsbrad SAY_TH_RANDOM_DIE1'), +(-1560037,'A good day...to die...',10461,1,0,'thrall hillsbrad SAY_TH_RANDOM_DIE2'), +(-1560038,'I have earned my freedom!',10448,1,0,'thrall hillsbrad SAY_TH_RANDOM_AGGRO1'), +(-1560039,'This day is long overdue. Out of my way!',10449,1,0,'thrall hillsbrad SAY_TH_RANDOM_AGGRO2'), +(-1560040,'I am a slave no longer!',10450,1,0,'thrall hillsbrad SAY_TH_RANDOM_AGGRO3'), +(-1560041,'Blackmoore has much to answer for!',10451,1,0,'thrall hillsbrad SAY_TH_RANDOM_AGGRO4'), +(-1560042,'You have forced my hand!',10452,1,0,'thrall hillsbrad SAY_TH_RANDOM_KILL1'), +(-1560043,'It should not have come to this!',10453,1,0,'thrall hillsbrad SAY_TH_RANDOM_KILL2'), +(-1560044,'I did not ask for this!',10454,1,0,'thrall hillsbrad SAY_TH_RANDOM_KILL3'), +(-1560045,'I am truly in your debt, strangers.',10455,1,0,'thrall hillsbrad SAY_TH_LEAVE_COMBAT1'), +(-1560046,'Thank you, strangers. You have given me hope.',10456,1,0,'thrall hillsbrad SAY_TH_LEAVE_COMBAT2'), +(-1560047,'I will not waste this chance. I will seek out my destiny.',10457,1,0,'thrall hillsbrad SAY_TH_LEAVE_COMBAT3'), +(-1560048,'I\'m free! Thank you all!',0,0,0,'taretha SAY_TA_FREE'); diff --git a/sql/Updates/0.0.2/r747_scriptdev2_script_texts.sql b/sql/Updates/0.0.2/r747_scriptdev2_script_texts.sql new file mode 100644 index 000000000..5c345f219 --- /dev/null +++ b/sql/Updates/0.0.2/r747_scriptdev2_script_texts.sql @@ -0,0 +1,3 @@ +DELETE FROM `script_texts` WHERE `entry`=-1560049; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1560049,'Thrall, you escaped!',0,0,0,'taretha SAY_TA_ESCAPED'); diff --git a/sql/Updates/0.0.2/r751_scriptdev2_script_texts.sql b/sql/Updates/0.0.2/r751_scriptdev2_script_texts.sql new file mode 100644 index 000000000..a16093b35 --- /dev/null +++ b/sql/Updates/0.0.2/r751_scriptdev2_script_texts.sql @@ -0,0 +1,20 @@ +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1534017 AND -1534000; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1534000,'I\'m in jeopardy, help me if you can!',11007,1,0,'jaina hyjal ATTACKED 1'), +(-1534001,'They\'ve broken through!',11049,1,0,'jaina hyjal ATTACKED 2'), +(-1534002,'Stay alert! Another wave approaches.',11008,1,0,'jaina hyjal INCOMING'), +(-1534003,'Don\'t give up! We must prevail!',11006,1,0,'jaina hyjal BEGIN'), +(-1534004,'Hold them back as long as possible.',11050,1,0,'jaina hyjal RALLY 1'), +(-1534005,'We must hold strong!',11051,1,0,'jaina hyjal RALLY 2'), +(-1534006,'We are lost. Fall back!',11009,1,0,'jaina hyjal FAILURE'), +(-1534007,'We have won valuable time. Now we must pull back!',11011,1,0,'jaina hyjal SUCCESS'), +(-1534008,'I did... my best.',11010,1,0,'jaina hyjal DEATH'), +(-1534009,'I will lie down for no one!',11031,1,0,'thrall hyjal ATTACKED 1'), +(-1534010,'Bring the fight to me and pay with your lives!',11061,1,0,'thrall hyjal ATTACKED 2'), +(-1534011,'Make ready for another wave! LOK-TAR OGAR!',11032,1,0,'thrall hyjal INCOMING'), +(-1534012,'Hold them back! Do not falter!',11030,1,0,'thrall hyjal BEGIN'), +(-1534013,'Victory or death!',11059,1,0,'thrall hyjal RALLY 1'), +(-1534014,'Do not give an inch of ground!',11060,1,0,'thrall hyjal RALLY 2'), +(-1534015,'It is over. Withdraw! We have failed.',11033,1,0,'thrall hyjal FAILURE'), +(-1534016,'We have played our part and done well. It is up to the others now.',11035,1,0,'thrall hyjal SUCCESS'), +(-1534017,'Uraaa...',11034,1,0,'thrall hyjal DEATH'); diff --git a/sql/Updates/0.0.2/r755_scriptdev2_script_texts.sql b/sql/Updates/0.0.2/r755_scriptdev2_script_texts.sql new file mode 100644 index 000000000..95648cb22 --- /dev/null +++ b/sql/Updates/0.0.2/r755_scriptdev2_script_texts.sql @@ -0,0 +1,15 @@ +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1534030 AND -1534018; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1534018,'All of your efforts have been in vain, for the draining of the World Tree has already begun. Soon the heart of your world will beat no more.',10986,1,0,'archimonde SAY_PRE_EVENTS_COMPLETE'), +(-1534019,'Your resistance is insignificant.',10987,1,0,'archimonde SAY_AGGRO'), +(-1534020,'This world will burn!',10990,1,0,'archimonde SAY_DOOMFIRE1'), +(-1534021,'Manach sheek-thrish!',11041,1,0,'archimonde SAY_DOOMFIRE2'), +(-1534022,'A-kreesh!',10989,1,0,'archimonde SAY_AIR_BURST1'), +(-1534023,'Away vermin!',11043,1,0,'archimonde SAY_AIR_BURST2'), +(-1534024,'All creation will be devoured!',11044,1,0,'archimonde SAY_SLAY1'), +(-1534025,'Your soul will languish for eternity.',10991,1,0,'archimonde SAY_SLAY2'), +(-1534026,'I am the coming of the end!',11045,1,0,'archimonde SAY_SLAY3'), +(-1534027,'At last it is here. Mourn and lament the passing of all you have ever known and all that would have been! Akmin-kurai!',10993,1,0,'archimonde SAY_ENRAGE'), +(-1534028,'No, it cannot be! Nooo!',10992,1,0,'archimonde SAY_DEATH'), +(-1534029,'You are mine now.',10988,1,0,'archimonde SAY_SOUL_CHARGE1'), +(-1534030,'Bow to my will.',11042,1,0,'archimonde SAY_SOUL_CHARGE2'); diff --git a/sql/Updates/0.0.2/r757_mangos.sql b/sql/Updates/0.0.2/r757_mangos.sql new file mode 100644 index 000000000..451cb9404 --- /dev/null +++ b/sql/Updates/0.0.2/r757_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName`='npc_wounded_blood_elf' WHERE `entry`=16993; diff --git a/sql/Updates/0.0.2/r757_scriptdev2_script_texts.sql b/sql/Updates/0.0.2/r757_scriptdev2_script_texts.sql new file mode 100644 index 000000000..17ba6ca1d --- /dev/null +++ b/sql/Updates/0.0.2/r757_scriptdev2_script_texts.sql @@ -0,0 +1,8 @@ +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000117 AND -1000122; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1000117, 'Thank you for agreeing to help. Now, let\'s get out of here $N.', 0, 0, 1, 'wounded elf SAY_ELF_START'), +(-1000118, 'Over there! They\'re following us!', 0, 0, 1, 'wounded elf SAY_ELF_SUMMON1'), +(-1000119, 'Allow me a moment to rest. The journey taxes what little strength I have.', 0, 0, 1, 'wounded elf SAY_ELF_RESTING'), +(-1000120, 'Did you hear something?', 0, 0, 1, 'wounded elf SAY_ELF_SUMMON2'), +(-1000121, 'Falcon Watch, at last! Now, where\'s my... Oh no! My pack, it\'s missing! Where has -', 0, 0, 1, 'wounded elf SAY_ELF_COMPLETE'), +(-1000122, 'You won\'t keep me from getting to Falcon Watch!', 0, 0, 1, 'wounded elf SAY_ELF_AGGRO'); diff --git a/sql/Updates/0.0.2/r764_mangos.sql b/sql/Updates/0.0.2/r764_mangos.sql new file mode 100644 index 000000000..c20014614 --- /dev/null +++ b/sql/Updates/0.0.2/r764_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName`='mob_abyssal' WHERE `entry`=17454; diff --git a/sql/Updates/0.0.2/r764_scriptdev2_script_texts.sql b/sql/Updates/0.0.2/r764_scriptdev2_script_texts.sql new file mode 100644 index 000000000..53b209746 --- /dev/null +++ b/sql/Updates/0.0.2/r764_scriptdev2_script_texts.sql @@ -0,0 +1,5 @@ +DELETE FROM `script_texts` WHERE `entry`=-1544015; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1544015,'breaks free!',0,2,0,'magtheridon EMOTE_FREED'); + +UPDATE `script_texts` SET `type`=3 WHERE `entry`=-1544013; diff --git a/sql/Updates/0.0.2/r766_mangos.sql b/sql/Updates/0.0.2/r766_mangos.sql new file mode 100644 index 000000000..e5508408b --- /dev/null +++ b/sql/Updates/0.0.2/r766_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName`='mob_scarlet_trainee' WHERE `entry`=6575; diff --git a/sql/Updates/0.0.2/r766_scriptdev2_script_texts.sql b/sql/Updates/0.0.2/r766_scriptdev2_script_texts.sql new file mode 100644 index 000000000..6ad68c46c --- /dev/null +++ b/sql/Updates/0.0.2/r766_scriptdev2_script_texts.sql @@ -0,0 +1,7 @@ +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1189004 AND -1189000; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1189000,'Ah, I have been waiting for a real challenge!',5830,1,0,'herod SAY_AGGRO'), +(-1189001,'Blades of Light!',5832,1,0,'herod SAY_WHIRLWIND'), +(-1189002,'Light, give me strength!',5833,1,0,'herod SAY_ENRAGE'), +(-1189003,'Hah, is that all?',5831,1,0,'herod SAY_KILL'), +(-1189004,'becomes enraged!',0,2,0,'herod EMOTE_ENRAGE'); diff --git a/sql/Updates/0.0.2/r767_mangos.sql b/sql/Updates/0.0.2/r767_mangos.sql new file mode 100644 index 000000000..8e4b44676 --- /dev/null +++ b/sql/Updates/0.0.2/r767_mangos.sql @@ -0,0 +1 @@ +UPDATE `instance_template` SET `script`='instance_scarlet_monastery' WHERE `map`=189; diff --git a/sql/Updates/0.0.2/r768_scriptdev2_script_texts.sql b/sql/Updates/0.0.2/r768_scriptdev2_script_texts.sql new file mode 100644 index 000000000..e29788c12 --- /dev/null +++ b/sql/Updates/0.0.2/r768_scriptdev2_script_texts.sql @@ -0,0 +1,8 @@ +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1189010 AND -1189005; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1189005,'Infidels! They must be purified!',5835,1,0,'mograine SAY_MO_AGGRO'), +(-1189006,'Unworthy!',5836,1,0,'mograine SAY_MO_KILL'), +(-1189007,'At your side, milady!',5837,1,0,'mograine SAY_MO_RESSURECTED'), +(-1189008,'What, Mograine has fallen? You shall pay for this treachery!',5838,1,0,'whitemane SAY_WH_INTRO'), +(-1189009,'The Light has spoken!',5839,1,0,'whitemane SAY_WH_KILL'), +(-1189010,'Arise, my champion!',5840,1,0,'whitemane SAY_WH_RESSURECT'); diff --git a/sql/Updates/0.0.2/r769_mangos.sql b/sql/Updates/0.0.2/r769_mangos.sql new file mode 100644 index 000000000..7489aeac9 --- /dev/null +++ b/sql/Updates/0.0.2/r769_mangos.sql @@ -0,0 +1,2 @@ +UPDATE `creature_template` SET `ScriptName`='mob_phoenix_tk' WHERE `entry`=21362; +UPDATE `creature_template` SET `ScriptName`='mob_phoenix_egg_tk' WHERE `entry`=21364; diff --git a/sql/Updates/0.0.2/r771_scriptdev2_script_texts.sql b/sql/Updates/0.0.2/r771_scriptdev2_script_texts.sql new file mode 100644 index 000000000..c7d13d921 --- /dev/null +++ b/sql/Updates/0.0.2/r771_scriptdev2_script_texts.sql @@ -0,0 +1,14 @@ +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1532114 AND -1532103; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1532103,'Welcome Ladies and Gentlemen, to this evening\'s presentation!',9174,1,0,'barnes OZ1'), +(-1532104,'Tonight we plumb the depths of the human soul as we join a lost, lonely girl trying desperately -- with the help of her loyal companions -- to find her way home!',9338,1,0,'barnes OZ2'), +(-1532105,'But she is pursued... by a wicked malevolent crone!',9339,1,0,'barnes OZ3'), +(-1532106,'Will she survive? Will she prevail? Only time will tell. And now ... on with the show!',9340,1,0,'barnes OZ4'), +(-1532107,'Good evening, Ladies and Gentlemen! Welcome to this evening\'s presentation!',9175,1,0,'barnes HOOD1'), +(-1532108,'Tonight, things are not what they seem. For tonight, your eyes may not be trusted',9335,1,0,'barnes HOOD2'), +(-1532109,'Take for instance, this quiet, elderly woman, waiting for a visit from her granddaughter. Surely there is nothing to fear from this sweet, grey-haired, old lady.',9336,1,0,'barnes HOOD3'), +(-1532110,'But don\'t let me pull the wool over your eyes. See for yourself what lies beneath those covers! And now... on with the show!',9337,1,0,'barnes HOOD4'), +(-1532111,'Welcome, Ladies and Gentlemen, to this evening\'s presentation!',9176,1,0,'barnes RAJ1'), +(-1532112,'Tonight, we explore a tale of forbidden love!',9341,1,0,'barnes RAJ2'), +(-1532113,'But beware, for not all love stories end happily, as you may find out. Sometimes, love pricks like a thorn.',9342,1,0,'barnes RAJ3'), +(-1532114,'But don\'t take it from me, see for yourself what tragedy lies ahead when the paths of star-crossed lovers meet. And now...on with the show!',9343,1,0,'barnes RAJ4'); diff --git a/sql/Updates/0.0.2/r772_mangos.sql b/sql/Updates/0.0.2/r772_mangos.sql new file mode 100644 index 000000000..0c61bc037 --- /dev/null +++ b/sql/Updates/0.0.2/r772_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName`='npc_highlord_demitrian' WHERE `entry`=14347; diff --git a/sql/Updates/0.0.2/r777_mangos.sql b/sql/Updates/0.0.2/r777_mangos.sql new file mode 100644 index 000000000..12d462e41 --- /dev/null +++ b/sql/Updates/0.0.2/r777_mangos.sql @@ -0,0 +1,3 @@ +UPDATE `gameobject_template` SET `ScriptName`='go_gauntlet_gate' WHERE `entry`=175357; +UPDATE `creature_template` SET `ScriptName`='' WHERE `entry`=11197; +UPDATE `creature_template` SET `ScriptName`='' WHERE `entry`=10399; diff --git a/sql/Updates/0.0.2/r778_mangos.sql b/sql/Updates/0.0.2/r778_mangos.sql new file mode 100644 index 000000000..9f7edda06 --- /dev/null +++ b/sql/Updates/0.0.2/r778_mangos.sql @@ -0,0 +1 @@ +UPDATE `gameobject_template` SET `ScriptName`='go_barrel_old_hillsbrad' WHERE `entry`=182589; diff --git a/sql/Updates/0.0.2/r779_mangos.sql b/sql/Updates/0.0.2/r779_mangos.sql new file mode 100644 index 000000000..d0aae870d --- /dev/null +++ b/sql/Updates/0.0.2/r779_mangos.sql @@ -0,0 +1,3 @@ +UPDATE `instance_template` SET `script`='instance_deadmines' WHERE `map`=36; +UPDATE `gameobject_template` SET `ScriptName`='go_defias_cannon' WHERE `entry`=16398; +UPDATE `gameobject_template` SET `ScriptName`='go_door_lever_dm' WHERE `entry`=101833; diff --git a/sql/Updates/0.0.2/r779_scriptdev2_script_texts.sql b/sql/Updates/0.0.2/r779_scriptdev2_script_texts.sql new file mode 100644 index 000000000..29cbb2100 --- /dev/null +++ b/sql/Updates/0.0.2/r779_scriptdev2_script_texts.sql @@ -0,0 +1,4 @@ +DELETE FROM `script_texts` WHERE `entry` IN (-1036000,-1036001); +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1036000,'You there, check out that noise!',5775,1,7,'smite INST_SAY_ALARM1'), +(-1036001,'We\'re under attack! A vast, ye swabs! Repel the invaders!',5777,1,7,'smite INST_SAY_ALARM2'); diff --git a/sql/Updates/0.0.2/r78.sql b/sql/Updates/0.0.2/r78.sql new file mode 100644 index 000000000..783482aed --- /dev/null +++ b/sql/Updates/0.0.2/r78.sql @@ -0,0 +1,3 @@ +UPDATE `item_template` SET `ScriptName` = 'nether_wraith_beacon' WHERE `entry` = 31742; +UPDATE `item_template` SET `ScriptName` = 'area_52_special' WHERE `entry` = 28132; +UPDATE `creature_template` SET `ScriptName` = 'guard_shattrath' WHERE `entry` = 19687; diff --git a/sql/Updates/0.0.2/r782_mangos.sql b/sql/Updates/0.0.2/r782_mangos.sql new file mode 100644 index 000000000..4e8ebe4fd --- /dev/null +++ b/sql/Updates/0.0.2/r782_mangos.sql @@ -0,0 +1 @@ +UPDATE `gameobject_template` SET `ScriptName`='go_main_chambers_access_panel' WHERE `entry` IN (184125,184126); diff --git a/sql/Updates/0.0.2/r783_mangos.sql b/sql/Updates/0.0.2/r783_mangos.sql new file mode 100644 index 000000000..0afcb35ce --- /dev/null +++ b/sql/Updates/0.0.2/r783_mangos.sql @@ -0,0 +1,3 @@ +UPDATE `creature_template` SET `ScriptName`='npc_twiggy_flathead' WHERE `entry`=6248; +DELETE FROM `areatrigger_scripts` WHERE `entry`=522; +INSERT INTO `areatrigger_scripts` VALUES (522,'at_twiggy_flathead'); diff --git a/sql/Updates/0.0.2/r783_scriptdev2_script_texts.sql b/sql/Updates/0.0.2/r783_scriptdev2_script_texts.sql new file mode 100644 index 000000000..5bffe30b3 --- /dev/null +++ b/sql/Updates/0.0.2/r783_scriptdev2_script_texts.sql @@ -0,0 +1,7 @@ +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000127 AND -1000123; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1000123, 'Ready when you are, $c.', 0, 0, 0, 'big will SAY_BIG_WILL_READY'), +(-1000124, 'The Affray has begun. $n, get ready to fight!', 0, 0, 0, 'twiggy SAY_TWIGGY_BEGIN'), +(-1000125, 'You! Enter the fray!', 0, 0, 0, 'twiggy SAY_TWIGGY_FRAY'), +(-1000126, 'Challenger is down!', 0, 0, 0, 'twiggy SAY_TWIGGY_DOWN'), +(-1000127, 'The Affray is over.', 0, 0, 0, 'twiggy SAY_TWIGGY_OVER'); diff --git a/sql/Updates/0.0.2/r790_mangos.sql b/sql/Updates/0.0.2/r790_mangos.sql new file mode 100644 index 000000000..7d598f5d1 --- /dev/null +++ b/sql/Updates/0.0.2/r790_mangos.sql @@ -0,0 +1,4 @@ +UPDATE `instance_template` SET `script`='instance_dark_portal' WHERE `map`=269; +UPDATE `creature_template` SET `ScriptName`='npc_medivh_bm' WHERE `entry`=15608; +UPDATE `creature_template` SET `ScriptName`='npc_time_rift' WHERE `entry`=17838; +UPDATE `creature_template` SET `ScriptName`='npc_saat' WHERE `entry`=20201; diff --git a/sql/Updates/0.0.2/r794_mangos.sql b/sql/Updates/0.0.2/r794_mangos.sql new file mode 100644 index 000000000..f502e0ce1 --- /dev/null +++ b/sql/Updates/0.0.2/r794_mangos.sql @@ -0,0 +1,5 @@ +UPDATE `creature_template` SET `ScriptName`='' WHERE `entry` IN (15299,15621,15667,15689,15928,15929,15930,15931,15936,15990,16060,16539,17161,17225,21002,24552); +UPDATE `creature_template` SET `ScriptName`='mob_unkor_the_ruthless' WHERE `entry`=18262; +UPDATE `creature_template` SET `ScriptName`='mob_tito' WHERE `entry`=17548; +UPDATE `creature_template` SET `ScriptName`='mob_ohgan' WHERE `entry`=14988; +UPDATE `instance_template` SET `script`='' WHERE `map` IN (469,509,533); diff --git a/sql/Updates/0.0.2/r796_scriptdev2_script_texts.sql b/sql/Updates/0.0.2/r796_scriptdev2_script_texts.sql new file mode 100644 index 000000000..4bd398156 --- /dev/null +++ b/sql/Updates/0.0.2/r796_scriptdev2_script_texts.sql @@ -0,0 +1,13 @@ +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1269028 AND -1269018; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1269018,'goes into a frenzy!',0,2,0,'aeonus EMOTE_FRENZY'), +(-1269019,'Stop! Do not go further, mortals. You are ill-prepared to face the forces of the Infinite Dragonflight. Come, let me help you.',0,0,0,'saat SAY_SAAT_WELCOME'), +(-1269020,'The time has come! Gul\'dan, order your warlocks to double their efforts! Moments from now the gateway will open, and your Horde will be released upon this ripe, unsuspecting world!',10435,1,0,'medivh SAY_ENTER'), +(-1269021,'What is this? Champions, coming to my aid? I sense the hand of the dark one in this. Truly this sacred event bears his blessing?',10436,1,0,'medivh SAY_INTRO'), +(-1269022,'Champions, my shield grows weak!',10437,1,0,'medivh SAY_WEAK75'), +(-1269023,'My powers must be concentrated on the portal! I do not have time to hold the shield!',10438,1,0,'medivh SAY_WEAK50'), +(-1269024,'The shield is nearly gone! All that I have worked for is in danger!',10439,1,0,'medivh SAY_WEAK25'), +(-1269025,'No... damn this feeble mortal coil...',10441,1,0,'medivh SAY_DEATH'), +(-1269026,'I am grateful for your aid, champions. Now, Gul\'dan\'s Horde will sweep across this world, like a locust swarm, and all my designs, all my carefully laid plans will at last fall into place.',10440,1,0,'medivh SAY_WIN'), +(-1269027,'Orcs of the Horde! This portalis the gateway to your new destiny! Azeroth lies before you, ripe for the taking!',0,1,0,'medivh SAY_ORCS_ENTER'), +(-1269028,'Gul\'dan speaks the truth! We should return at once to tell our brothers of the news! Retreat back trought the portal!',0,1,0,'medivh SAY_ORCS_ANSWER'); diff --git a/sql/Updates/0.0.2/r802_mangos.sql b/sql/Updates/0.0.2/r802_mangos.sql new file mode 100644 index 000000000..88c958ac8 --- /dev/null +++ b/sql/Updates/0.0.2/r802_mangos.sql @@ -0,0 +1,4 @@ +UPDATE `creature_template` SET `ScriptName`='' WHERE `entry`=21807; + +DELETE FROM `areatrigger_scripts` WHERE `entry`=4560; +INSERT INTO `areatrigger_scripts` VALUES (4560,'at_legion_teleporter'); diff --git a/sql/Updates/0.0.2/r804_mangos.sql b/sql/Updates/0.0.2/r804_mangos.sql new file mode 100644 index 000000000..6ca31fada --- /dev/null +++ b/sql/Updates/0.0.2/r804_mangos.sql @@ -0,0 +1,4 @@ +UPDATE `creature_template` SET `ScriptName`='npc_commander_dawnforge' WHERE `entry`=19831; + +DELETE FROM `areatrigger_scripts` WHERE `entry`=4497; +INSERT INTO `areatrigger_scripts` VALUES (4497,'at_commander_dawnforge'); diff --git a/sql/Updates/0.0.2/r804_scriptdev2_script_texts.sql b/sql/Updates/0.0.2/r804_scriptdev2_script_texts.sql new file mode 100644 index 000000000..fcd8b4d33 --- /dev/null +++ b/sql/Updates/0.0.2/r804_scriptdev2_script_texts.sql @@ -0,0 +1,12 @@ +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000137 AND -1000128; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1000128, 'We need you to send reinforcements to Manaforge Duro, Ardonis. This is not a request, it\'s an order.', 0, 0, 0, 'dawnforge SAY_COMMANDER_DAWNFORGE_1'), +(-1000129, 'You cannot be serious! We are severely understaffed and can barely keep this manaforge functional!', 0, 0, 0, 'dawnforge SAY_ARCANIST_ARDONIS_1'), +(-1000130, 'You will do as ordered. Manaforge Duro has come under heavy attack by mana creatures and the situation is out of control. Failure to comply will not be tolerated!', 0, 0, 0, 'dawnforge SAY_COMMANDER_DAWNFORGE_2'), +(-1000131, 'Indeed, it is not a request.', 0, 0, 0, 'dawnforge SAY_PATHALEON_CULATOR_IMAGE_1'), +(-1000132, 'My lord!', 0, 0, 0, 'dawnforge SAY_COMMANDER_DAWNFORGE_3'), +(-1000133, 'Duro will be reinforced! Ultris was a complete disaster. I will NOT have that mistake repeated!', 0, 0, 0, 'dawnforge PATHALEON_CULATOR_IMAGE_2'), +(-1000134, 'We\'ve had too many setbacks along the way: Hellfire Citadel, Fallen Sky Ridge, Firewing Point... Prince Kael\'thas will tolerate no further delays. I will tolerate nothing other than complete success!', 0, 0, 0, 'dawnforge PATHALEON_CULATOR_IMAGE_2_1'), +(-1000135, 'I am returning to Tempest Keep. See to it that I do not have reason to return!', 0, 0, 0, 'dawnforge PATHALEON_CULATOR_IMAGE_2_2' ), +(-1000136, 'Yes, my lord.', 0, 0, 0, 'dawnforge COMMANDER_DAWNFORGE_4 SAY_ARCANIST_ARDONIS_2'), +(-1000137, 'See to it, Ardonis!', 0, 0, 0, 'dawnforge COMMANDER_DAWNFORGE_5'); diff --git a/sql/Updates/0.0.2/r809_mangos.sql b/sql/Updates/0.0.2/r809_mangos.sql new file mode 100644 index 000000000..bd364fc71 --- /dev/null +++ b/sql/Updates/0.0.2/r809_mangos.sql @@ -0,0 +1,2 @@ +UPDATE `creature_template` SET `ScriptName`='npc_aeranas' WHERE `entry`=17085; +UPDATE `gameobject_template` SET `ScriptName`='go_haaleshi_altar' WHERE `entry`=181606; diff --git a/sql/Updates/0.0.2/r809_scriptdev2_script_texts.sql b/sql/Updates/0.0.2/r809_scriptdev2_script_texts.sql new file mode 100644 index 000000000..b967b7d71 --- /dev/null +++ b/sql/Updates/0.0.2/r809_scriptdev2_script_texts.sql @@ -0,0 +1,4 @@ +DELETE FROM `script_texts` WHERE `entry` IN (-1000138,-1000139); +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1000138, 'Avruu\'s magic... it still controls me. You must fight me, mortal. It\'s the only way to break the spell!', 0, 0, 0, 'aeranas SAY_SUMMON'), +(-1000139, 'Avruu\'s magic is broken! I\'m free once again!', 0, 0, 0, 'aeranas SAY_FREE'); diff --git a/sql/Updates/0.0.2/r81.sql b/sql/Updates/0.0.2/r81.sql new file mode 100644 index 000000000..3916683da --- /dev/null +++ b/sql/Updates/0.0.2/r81.sql @@ -0,0 +1,17 @@ +UPDATE `creature_template` SET `ScriptName` = 'boss_gyth' WHERE `entry` = 10339; +UPDATE `creature_template` SET `ScriptName` = 'boss_rend_blackhand' WHERE `entry` = 10429; +UPDATE `creature_template` SET `ScriptName` = 'boss_pyroguard_emberseer' WHERE `entry` = 9816; +UPDATE `creature_template` SET `ScriptName` = 'mob_chromatic_elite_guard' WHERE `entry` = 10814; +UPDATE `creature_template` SET `ScriptName` = 'mob_ancient_core_hound' WHERE `entry` = 11673; +UPDATE `creature_template` SET `ScriptName` = 'mob_core_rager' WHERE `entry` = 11672; +UPDATE `creature_template` SET `ScriptName` = 'mob_firesworn' WHERE `entry` = 12099; +UPDATE `creature_template` SET `ScriptName` = 'mob_firewalker' WHERE `entry` = 11666; +UPDATE `creature_template` SET `ScriptName` = 'mob_flame_guard' WHERE `entry` = 11667; +UPDATE `creature_template` SET `ScriptName` = 'mob_flamewaker' WHERE `entry` = 11661; +UPDATE `creature_template` SET `ScriptName` = 'mob_flamewaker_elite' WHERE `entry` = 11664; +UPDATE `creature_template` SET `ScriptName` = 'mob_flamewaker_healer' WHERE `entry` = 11663; +UPDATE `creature_template` SET `ScriptName` = 'mob_flamewaker_protector' WHERE `entry` = 12119; +UPDATE `creature_template` SET `ScriptName` = 'mob_lavaspawn' WHERE `entry` = 12265; +UPDATE `creature_template` SET `ScriptName` = 'mob_molten_destroyer' WHERE `entry` = 11659; +UPDATE `creature_template` SET `ScriptName` = 'mob_molten_giant' WHERE `entry` = 11658; +UPDATE `creature_template` SET `ScriptName` = 'boss_azuregos' WHERE `entry` = 6109; diff --git a/sql/Updates/0.0.2/r810_mangos.sql b/sql/Updates/0.0.2/r810_mangos.sql new file mode 100644 index 000000000..70e6a2b56 --- /dev/null +++ b/sql/Updates/0.0.2/r810_mangos.sql @@ -0,0 +1,2 @@ +UPDATE `gameobject_template` SET `ScriptName`='go_mausoleum_trigger' WHERE `entry`=104593; +UPDATE `gameobject_template` SET `ScriptName`='go_mausoleum_door' WHERE `entry`=176594; diff --git a/sql/Updates/0.0.2/r91.sql b/sql/Updates/0.0.2/r91.sql new file mode 100644 index 000000000..bd7fc1131 --- /dev/null +++ b/sql/Updates/0.0.2/r91.sql @@ -0,0 +1,2 @@ +UPDATE `creature_template` SET `ScriptName` = 'npc_great_bear_spirit' WHERE `entry` = 11956; +UPDATE `creature_template` SET `ScriptName` = 'npcs_rutgar_and_frankal.cpp' WHERE `entry` IN (15170, 15171); \ No newline at end of file diff --git a/sql/Updates/0.0.2/r92.sql b/sql/Updates/0.0.2/r92.sql new file mode 100644 index 000000000..b149b69c1 --- /dev/null +++ b/sql/Updates/0.0.2/r92.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName` = 'npcs_rutgar_and_frankal' WHERE `entry` IN (15170, 15171); \ No newline at end of file diff --git a/sql/Updates/0.0.2/r97.sql b/sql/Updates/0.0.2/r97.sql new file mode 100644 index 000000000..95934d6ce --- /dev/null +++ b/sql/Updates/0.0.2/r97.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName` = 'npcs_captains_blackanvil_and_skullsplit' WHERE `entry` IN (15440, 15612); diff --git a/sql/Updates/0.0.3/Makefile.am b/sql/Updates/0.0.3/Makefile.am new file mode 100644 index 000000000..876f4f993 --- /dev/null +++ b/sql/Updates/0.0.3/Makefile.am @@ -0,0 +1,304 @@ +# Copyright (C) 2005-2009 MaNGOS +# +# 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, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +## Process this file with automake to produce Makefile.in + +## Sub-directories to parse + +## Change installation location +# datadir = scriptdev2/sql/updates/0.0.3 +pkgdatadir = $(datadir)/scriptdev2/sql/updates/0.0.3 + +## Files to be installed +# Install basic SQL files to datadir +pkgdata_DATA = \ + r814_scriptdev2_eventai_scripts.sql \ + r820_scriptdev2_script_texts.sql \ + r822_mangos.sql \ + r822_scriptdev2_script_texts.sql \ + r823_scriptdev2_script_texts.sql \ + r824_mangos.sql \ + r824_scriptdev2_script_texts.sql \ + r825_scriptdev2_script_texts.sql \ + r826_scriptdev2.sql \ + r827_mangos.sql \ + r828_mangos.sql \ + r834_mangos.sql \ + r834_scriptdev2_script_texts.sql \ + r835_mangos.sql \ + r845_mangos.sql \ + r846_scriptdev2.sql \ + r847_scriptdev2_script_texts.sql \ + r848_scriptdev2_script_texts.sql \ + r849_scriptdev2_script_texts.sql \ + r850_mangos.sql \ + r851_scriptdev2_script_texts.sql \ + r852_scriptdev2_script_texts.sql \ + r854_scriptdev2_script_texts.sql \ + r855_scriptdev2_script_texts.sql \ + r856_scriptdev2_script_texts.sql \ + r860_scriptdev2_script_texts.sql \ + r862_scriptdev2_script_texts.sql \ + r863_mangos.sql \ + r872_mangos.sql \ + r883_mangos.sql \ + r895_mangos.sql \ + r900_mangos.sql \ + r903_mangos.sql \ + r903_scriptdev2_script_texts.sql \ + r907_mangos.sql \ + r907_scriptdev2_script_texts.sql \ + r909_mangos.sql \ + r910_scriptdev2_script_texts.sql \ + r912_mangos.sql \ + r912_scriptdev2_script_texts.sql \ + r916_mangos.sql \ + r916_scriptdev2_script_texts.sql \ + r919_mangos.sql \ + r922_scriptdev2_script_waypoint.sql \ + r924_scriptdev2_script_waypoint.sql \ + r936_scriptdev2_script_waypoint.sql \ + r937_mangos.sql \ + r937_scriptdev2_script_texts.sql \ + r937_scriptdev2_script_waypoint.sql \ + r939_scriptdev2_script_texts.sql \ + r940_mangos.sql \ + r941_mangos.sql \ + r945_mangos.sql \ + r945_scriptdev2_script_texts.sql \ + r945_scriptdev2_script_waypoint.sql \ + r947_mangos.sql \ + r949_scriptdev2_script_waypoint.sql \ + r951_scriptdev2_script_waypoint.sql \ + r953_scriptdev2_script_waypoint.sql \ + r956_scriptdev2.sql \ + r963_mangos.sql \ + r964_mangos.sql \ + r965_mangos.sql \ + r965_scriptdev2.sql \ + r972_mangos.sql \ + r972_scriptdev2.sql \ + r973_mangos.sql \ + r973_scriptdev2_script_waypoint.sql \ + r975_mangos.sql \ + r975_scriptdev2.sql \ + r976_mangos.sql \ + r976_scriptdev2.sql \ + r978_mangos.sql \ + r979_mangos.sql \ + r979_scriptdev2_script_texts.sql \ + r980_mangos.sql \ + r982_mangos.sql \ + r982_scriptdev2_script_texts.sql \ + r989_mangos.sql \ + r990_mangos.sql \ + r991_scriptdev2.sql \ + r992_mangos.sql \ + r993_mangos.sql \ + r993_scriptdev2_script_texts.sql \ + r995_mangos.sql \ + r995_scriptdev2.sql \ + r997_mangos.sql \ + r998_mangos.sql \ + r998_scriptdev2_script_texts.sql \ + r1002_scriptdev2.sql \ + r1006_scriptdev2.sql \ + r1008_mangos.sql \ + r1008_scriptdev2.sql \ + r1009_scriptdev2.sql \ + r1010_mangos.sql \ + r1010_scriptdev2.sql \ + r1012_mangos.sql \ + r1012_scriptdev2.sql \ + r1014_mangos.sql \ + r1014_scriptdev2.sql \ + r1016_scriptdev2.sql \ + r1023_scriptdev2.sql \ + r1025_mangos.sql \ + r1030_scriptdev2.sql \ + r1032_mangos.sql \ + r1032_scriptdev2.sql \ + r1039_mangos.sql \ + r1056_scriptdev2.sql \ + r1058_mangos.sql \ + r1058_scriptdev2.sql \ + r1062_mangos.sql \ + r1067_mangos.sql \ + r1068_mangos.sql \ + r1068_scriptdev2.sql \ + r1069_mangos.sql \ + r1073_mangos.sql \ + r1074_scriptdev2.sql \ + r1075_mangos.sql \ + r1080_scriptdev2.sql \ + r1082_mangos.sql \ + r1098_scriptdev2.sql \ + r1099_mangos.sql \ + r1100_mangos.sql \ + r1103_mangos.sql \ + r1104_scriptdev2.sql \ + r1106_mangos.sql \ + r1112_mangos.sql \ + r1116_mangos.sql \ + r1119_mangos.sql \ + r1119_scriptdev2.sql \ + r1120_scriptdev2.sql \ + r1121_mangos.sql \ + r1121_scriptdev2.sql \ + r1123_scriptdev2.sql \ + r1128_mangos.sql \ + r1129_mangos.sql \ + r1129_scriptdev2.sql \ + r1131_mangos.sql \ + r1136_mangos.sql \ + r1136_scriptdev2.sql \ + r1140_scriptdev2.sql \ + r1141_mangos.sql \ + r1145_scriptdev2.sql \ + r1146_scriptdev2.sql \ + r1149_scriptdev2.sql \ + r1152_scriptdev2.sql \ + r1154_mangos.sql \ + r1155_mangos.sql \ + r1169_mangos.sql \ + r1169_scriptdev2.sql \ + r1171_scriptdev2.sql \ + r1173_scriptdev2.sql \ + r1180_mangos.sql \ + r1184_mangos.sql \ + r1197_mangos.sql \ + r1199_mangos.sql \ + r1202_mangos.sql \ + r1202_scriptdev2.sql \ + r1207_mangos.sql \ + r1207_scriptdev2.sql \ + r1210_mangos.sql \ + r1212_mangos.sql \ + r1212_scriptdev2.sql \ + r1215_mangos.sql \ + r1215_scriptdev2.sql \ + r1218_scriptdev2.sql \ + r1221_mangos.sql \ + r1221_scriptdev2.sql \ + r1222_scriptdev2.sql \ + r1234_mangos.sql \ + r1241_scriptdev2.sql \ + r1242_mangos.sql \ + r1242_scriptdev2.sql \ + r1243_mangos.sql \ + r1243_scriptdev2.sql \ + r1249_mangos.sql \ + r1249_scriptdev2.sql \ + r1250_mangos.sql \ + r1250_scriptdev2.sql \ + r1251_scriptdev2.sql \ + r1257_scriptdev2.sql \ + r1258_mangos.sql \ + r1258_scriptdev2.sql \ + r1260_scriptdev2.sql \ + r1261_mangos.sql \ + r1263_mangos.sql \ + r1265_mangos.sql \ + r1265_scriptdev2.sql \ + r1266_mangos.sql \ + r1266_scriptdev2.sql \ + r1280_mangos.sql \ + r1280_scriptdev2.sql \ + r1281_mangos.sql \ + r1282_mangos.sql \ + r1283_mangos.sql \ + r1299_scriptdev2.sql \ + r1300_mangos.sql \ + r1307_mangos.sql \ + r1317_mangos.sql \ + r1317_scriptdev2.sql \ + r1321_mangos.sql \ + r1321_scriptdev2.sql \ + r1322_scriptdev2.sql \ + r1326_scriptdev2.sql \ + r1333_mangos.sql \ + r1334_mangos.sql \ + r1335_scriptdev2.sql \ + r1336_mangos.sql \ + r1336_scriptdev2.sql \ + r1341_scriptdev2.sql \ + r1351_mangos.sql \ + r1351_scriptdev2.sql \ + r1352_mangos.sql \ + r1352_scriptdev2.sql \ + r1354_scriptdev2.sql \ + r1358_mangos.sql \ + r1359_mangos.sql \ + r1359_scriptdev2.sql \ + r1367_mangos.sql \ + r1368_mangos.sql \ + r1369_mangos.sql \ + r1370_mangos.sql \ + r1371_scriptdev2.sql \ + r1374_mangos.sql \ + r1374_scriptdev2.sql \ + r1378_mangos.sql \ + r1378_scriptdev2.sql \ + r1379_mangos.sql \ + r1379_scriptdev2.sql \ + r1380_mangos.sql \ + r1380_scriptdev2.sql \ + r1382_mangos.sql \ + r1383_scriptdev2.sql \ + r1384_scriptdev2.sql \ + r1385_mangos.sql \ + r1385_scriptdev2.sql \ + r1386_mangos.sql \ + r1386_scriptdev2.sql \ + r1388_mangos.sql \ + r1388_scriptdev2.sql \ + r1391_mangos.sql \ + r1391_scriptdev2.sql \ + r1392_mangos.sql \ + r1392_scriptdev2.sql \ + r1394_mangos.sql \ + r1394_scriptdev2.sql \ + r1405_mangos.sql \ + r1405_scriptdev2.sql \ + r1406_mangos.sql \ + r1408_mangos.sql \ + r1408_scriptdev2.sql \ + r1409_mangos.sql \ + r1409_scriptdev2.sql \ + r1410_mangos.sql \ + r1410_scriptdev2.sql \ + r1411_mangos.sql \ + r1411_scriptdev2.sql \ + r1412_mangos.sql \ + r1412_scriptdev2.sql \ + r1413_mangos.sql \ + r1413_scriptdev2.sql \ + r1414_mangos.sql \ + r1414_scriptdev2.sql \ + r1415_mangos.sql \ + r1417_mangos.sql \ + r1418_scriptdev2.sql \ + r1419_mangos.sql \ + r1421_scriptdev2.sql \ + r1422_mangos.sql \ + r1422_scriptdev2.sql \ + r1428_scriptdev2.sql \ + r1430_mangos.sql \ + r1433_mangos.sql \ + r1435_mangos.sql \ + r1436_mangos.sql \ + r1437_scriptdev2.sql \ + r1439_scriptdev2.sql \ + r1441_mangos.sql diff --git a/sql/Updates/0.0.3/r1002_scriptdev2.sql b/sql/Updates/0.0.3/r1002_scriptdev2.sql new file mode 100644 index 000000000..f2e06ecc2 --- /dev/null +++ b/sql/Updates/0.0.3/r1002_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 7658+) '; diff --git a/sql/Updates/0.0.3/r1006_scriptdev2.sql b/sql/Updates/0.0.3/r1006_scriptdev2.sql new file mode 100644 index 000000000..e8a2602d3 --- /dev/null +++ b/sql/Updates/0.0.3/r1006_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 7667+) '; diff --git a/sql/Updates/0.0.3/r1008_mangos.sql b/sql/Updates/0.0.3/r1008_mangos.sql new file mode 100644 index 000000000..2fde1ce40 --- /dev/null +++ b/sql/Updates/0.0.3/r1008_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_kayra_longmane' WHERE entry=17969; diff --git a/sql/Updates/0.0.3/r1008_scriptdev2.sql b/sql/Updates/0.0.3/r1008_scriptdev2.sql new file mode 100644 index 000000000..df4e2ef25 --- /dev/null +++ b/sql/Updates/0.0.3/r1008_scriptdev2.sql @@ -0,0 +1,36 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000347 AND -1000343; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000343, 'Is the way clear? Let\'s get out while we can, $N.',0,0,0,0,'kayra SAY_START'), +(-1000344, 'Looks like we won\'t get away so easy. Get ready!',0,0,0,0,'kayra SAY_AMBUSH1'), +(-1000345, 'Let\'s keep moving. We\'re not safe here!',0,0,0,0,'kayra SAY_PROGRESS'), +(-1000346, 'Look out, $N! Enemies ahead!',0,0,0,0,'kayra SAY_AMBUSH2'), +(-1000347, 'We\'re almost to the refuge! Let\'s go.',0,0,0,0,'kayra SAY_END'); + +DELETE FROM script_waypoint WHERE entry=17969; +INSERT INTO script_waypoint VALUES +(17969, 0, -930.048950, 5288.080078, 23.848402, 0, ''), +(17969, 1, -925.677917, 5296.482910, 18.183748, 0, ''), +(17969, 2, -924.297180, 5299.016113, 17.710915, 0, ''), +(17969, 3, -928.390076, 5317.022949, 18.208593, 0, ''), +(17969, 4, -930.620972, 5329.915039, 18.773422, 0, 'SAY_AMBUSH1'), +(17969, 5, -931.490295, 5357.654785, 18.027155, 0, 'SAY_PROGRESS'), +(17969, 6, -934.777771, 5369.341797, 22.278048, 0, ''), +(17969, 7, -934.521851, 5373.407227, 22.834690, 0, ''), +(17969, 8, -937.008545, 5382.980469, 22.699078, 0, ''), +(17969, 9, -941.948059, 5404.141602, 22.669743, 0, ''), +(17969, 10, -931.244263, 5415.846680, 23.063961, 0, 'at crossroad'), +(17969, 11, -901.497925, 5420.315430, 24.213270, 0, ''), +(17969, 12, -860.311707, 5415.617676, 23.671139, 0, ''), +(17969, 13, -777.988953, 5391.982422, 23.001669, 0, ''), +(17969, 14, -750.362000, 5385.786621, 22.765791, 0, ''), +(17969, 15, -731.339417, 5382.449707, 22.517065, 0, ''), +(17969, 16, -681.235901, 5381.377930, 22.050159, 2500, 'end bridge SAY_AMBUSH2'), +(17969, 17, -637.944458, 5384.338379, 22.205647, 0, 'SAY_END'), +(17969, 18, -608.954407, 5408.715332, 21.630386, 0, ''), +(17969, 19, -598.134277, 5413.608398, 21.412275, 0, ''), +(17969, 20, -571.268982, 5420.771973, 21.184925, 0, ''), +(17969, 21, -553.099915, 5424.616211, 21.193716, 0, ''), +(17969, 22, -524.745483, 5443.945313, 20.977013, 0, ''), +(17969, 23, -502.984985, 5446.283691, 22.149435, 0, ''), +(17969, 24, -472.463959, 5449.546875, 22.561453, 0, ''), +(17969, 25, -454.533264, 5461.302246, 22.602837, 30000, 'quest complete'); diff --git a/sql/Updates/0.0.3/r1009_scriptdev2.sql b/sql/Updates/0.0.3/r1009_scriptdev2.sql new file mode 100644 index 000000000..abea8ff54 --- /dev/null +++ b/sql/Updates/0.0.3/r1009_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 7672+) '; diff --git a/sql/Updates/0.0.3/r1010_mangos.sql b/sql/Updates/0.0.3/r1010_mangos.sql new file mode 100644 index 000000000..561241f8d --- /dev/null +++ b/sql/Updates/0.0.3/r1010_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=466; diff --git a/sql/Updates/0.0.3/r1010_scriptdev2.sql b/sql/Updates/0.0.3/r1010_scriptdev2.sql new file mode 100644 index 000000000..3c044b843 --- /dev/null +++ b/sql/Updates/0.0.3/r1010_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE script_texts SET content_default='UNUSED', language=0, comment='REUSE ME' WHERE entry=-1000208; diff --git a/sql/Updates/0.0.3/r1012_mangos.sql b/sql/Updates/0.0.3/r1012_mangos.sql new file mode 100644 index 000000000..7fdeaa62e --- /dev/null +++ b/sql/Updates/0.0.3/r1012_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_aged_dying_ancient_kodo' WHERE entry IN (4700, 4701, 4702, 11627); diff --git a/sql/Updates/0.0.3/r1012_scriptdev2.sql b/sql/Updates/0.0.3/r1012_scriptdev2.sql new file mode 100644 index 000000000..8c7940bfa --- /dev/null +++ b/sql/Updates/0.0.3/r1012_scriptdev2.sql @@ -0,0 +1,5 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000350 AND -1000348; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000348, 'Ah...the wondrous sound of kodos. I love the way they make the ground shake... inspect the beast for me.',0,0,0,0,'kodo round SAY_SMEED_HOME_1'), +(-1000349, 'Hey, look out with that kodo! You had better inspect that beast before i give you credit!',0,0,0,0,'kodo round SAY_SMEED_HOME_2'), +(-1000350, 'That kodo sure is a beauty. Wait a minute, where are my bifocals? Perhaps you should inspect the beast for me.',0,0,0,0,'kodo round SAY_SMEED_HOME_3'); diff --git a/sql/Updates/0.0.3/r1014_mangos.sql b/sql/Updates/0.0.3/r1014_mangos.sql new file mode 100644 index 000000000..039b62beb --- /dev/null +++ b/sql/Updates/0.0.3/r1014_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE ScriptName='mob_eventai'; diff --git a/sql/Updates/0.0.3/r1014_scriptdev2.sql b/sql/Updates/0.0.3/r1014_scriptdev2.sql new file mode 100644 index 000000000..1a2bd9b07 --- /dev/null +++ b/sql/Updates/0.0.3/r1014_scriptdev2.sql @@ -0,0 +1,5 @@ +-- Note: if SD2 installed after rev 986, you do not have to run this query (will produce error) +-- This only intended for cleaning up older, existing SD2 database. +DROP TABLE eventai_scripts; +DROP TABLE eventai_summons; +DROP TABLE eventai_texts; diff --git a/sql/Updates/0.0.3/r1016_scriptdev2.sql b/sql/Updates/0.0.3/r1016_scriptdev2.sql new file mode 100644 index 000000000..58c6db061 --- /dev/null +++ b/sql/Updates/0.0.3/r1016_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 7690+) '; diff --git a/sql/Updates/0.0.3/r1023_scriptdev2.sql b/sql/Updates/0.0.3/r1023_scriptdev2.sql new file mode 100644 index 000000000..2c80f9e18 --- /dev/null +++ b/sql/Updates/0.0.3/r1023_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 7715+) '; diff --git a/sql/Updates/0.0.3/r1025_mangos.sql b/sql/Updates/0.0.3/r1025_mangos.sql new file mode 100644 index 000000000..4f7436c96 --- /dev/null +++ b/sql/Updates/0.0.3/r1025_mangos.sql @@ -0,0 +1 @@ +UPDATE instance_template SET script='instance_blood_furnace' WHERE map=542; diff --git a/sql/Updates/0.0.3/r1030_scriptdev2.sql b/sql/Updates/0.0.3/r1030_scriptdev2.sql new file mode 100644 index 000000000..7b6fd04ae --- /dev/null +++ b/sql/Updates/0.0.3/r1030_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 7723+) '; diff --git a/sql/Updates/0.0.3/r1032_mangos.sql b/sql/Updates/0.0.3/r1032_mangos.sql new file mode 100644 index 000000000..2b9b800dd --- /dev/null +++ b/sql/Updates/0.0.3/r1032_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=21845; +UPDATE creature_template SET ScriptName='boss_leotheras_the_blind_demonform' WHERE entry=21875; diff --git a/sql/Updates/0.0.3/r1032_scriptdev2.sql b/sql/Updates/0.0.3/r1032_scriptdev2.sql new file mode 100644 index 000000000..48e94d77c --- /dev/null +++ b/sql/Updates/0.0.3/r1032_scriptdev2.sql @@ -0,0 +1,3 @@ +UPDATE script_texts SET content_default='Finally, my banishment ends!' WHERE entry=-1548009; +UPDATE script_texts SET content_default='Be gone, trifling elf. I am in control now!' WHERE entry=-1548010; +UPDATE script_texts SET content_default='No... no! What have you done? I am the master! Do you hear me? I am... aaggh! Can\'t... contain him...' WHERE entry=-1548018; diff --git a/sql/Updates/0.0.3/r1039_mangos.sql b/sql/Updates/0.0.3/r1039_mangos.sql new file mode 100644 index 000000000..aef64e0b2 --- /dev/null +++ b/sql/Updates/0.0.3/r1039_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_plucky_johnson' WHERE entry=6626; diff --git a/sql/Updates/0.0.3/r1056_scriptdev2.sql b/sql/Updates/0.0.3/r1056_scriptdev2.sql new file mode 100644 index 000000000..87c67c0fb --- /dev/null +++ b/sql/Updates/0.0.3/r1056_scriptdev2.sql @@ -0,0 +1,15 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1543025 AND -1543017; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1543017,'You have faced many challenges, pity they were all in vain. Soon your people will kneel to my lord!',10292,1,0,0,'vazruden SAY_INTRO'), +(-1543018,'Your time is running out!',10294,1,0,0,'vazruden SAY_AGGRO1'), +(-1543019,'You are nothing, I answer a higher call!',10295,1,0,0,'vazruden SAY_AGGRO2'), +(-1543020,'The Dark Lord laughs at you!',10296,1,0,0,'vazruden SAY_AGGRO3'), +(-1543021,'Is there no one left to test me?',10293,1,0,0,'vazruden SAY_TAUNT'), +(-1543022,'It is over. Finished!',10297,1,0,0,'vazruden SAY_KILL1'), +(-1543023,'Your days are done!',10298,1,0,0,'vazruden SAY_KILL2'), +(-1543024,'My lord will be the end you all...',10299,1,0,0,'vazruden SAY_DEATH'), +(-1543025,'%s descends from the sky.',0,3,0,0,'vazruden EMOTE_DESCEND'); + +UPDATE script_waypoint SET waittime=10000 WHERE entry=24358 AND pointid=3; +DELETE FROM script_waypoint WHERE entry=24358 AND pointid=4; +INSERT INTO script_waypoint VALUES (24358, 4, 120.536003, 1611.654663, 43.473, 0, ''); diff --git a/sql/Updates/0.0.3/r1058_mangos.sql b/sql/Updates/0.0.3/r1058_mangos.sql new file mode 100644 index 000000000..7854f5d13 --- /dev/null +++ b/sql/Updates/0.0.3/r1058_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_karynaku' WHERE entry=22112; diff --git a/sql/Updates/0.0.3/r1058_scriptdev2.sql b/sql/Updates/0.0.3/r1058_scriptdev2.sql new file mode 100644 index 000000000..200792202 --- /dev/null +++ b/sql/Updates/0.0.3/r1058_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 7798+) '; diff --git a/sql/Updates/0.0.3/r1062_mangos.sql b/sql/Updates/0.0.3/r1062_mangos.sql new file mode 100644 index 000000000..137284279 --- /dev/null +++ b/sql/Updates/0.0.3/r1062_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_air_force_bots' WHERE entry IN (2614, 2615, 21974, 21993, 21996, 21997, 21999, 22001, 22002, 22003, 22063, 22065, 22066, 22068, 22069, 22070, 22071, 22078, 22079, 22080, 22086, 22087, 22088, 22090, 22124, 22125, 22126); diff --git a/sql/Updates/0.0.3/r1067_mangos.sql b/sql/Updates/0.0.3/r1067_mangos.sql new file mode 100644 index 000000000..f641950e8 --- /dev/null +++ b/sql/Updates/0.0.3/r1067_mangos.sql @@ -0,0 +1,8 @@ +UPDATE creature_template SET ScriptName='mob_alyson_antille' WHERE entry=24240; +UPDATE creature_template SET ScriptName='mob_thurg' WHERE entry=24241; +UPDATE creature_template SET ScriptName='mob_slither' WHERE entry=24242; +UPDATE creature_template SET ScriptName='mob_lord_raadan' WHERE entry=24243; +UPDATE creature_template SET ScriptName='mob_gazakroth' WHERE entry=24244; +UPDATE creature_template SET ScriptName='mob_fenstalker' WHERE entry=24245; +UPDATE creature_template SET ScriptName='mob_darkheart' WHERE entry=24246; +UPDATE creature_template SET ScriptName='mob_koragg' WHERE entry=24247; diff --git a/sql/Updates/0.0.3/r1068_mangos.sql b/sql/Updates/0.0.3/r1068_mangos.sql new file mode 100644 index 000000000..763c43055 --- /dev/null +++ b/sql/Updates/0.0.3/r1068_mangos.sql @@ -0,0 +1,3 @@ +UPDATE creature_template SET ScriptName='npc_rizzle_sprysprocket' WHERE entry=23002; +UPDATE creature_template SET ScriptName='npc_depth_charge' WHERE entry=23025; +UPDATE gameobject_template SET ScriptName='go_southfury_moonstone' WHERE entry=185566; diff --git a/sql/Updates/0.0.3/r1068_scriptdev2.sql b/sql/Updates/0.0.3/r1068_scriptdev2.sql new file mode 100644 index 000000000..a2f91bf67 --- /dev/null +++ b/sql/Updates/0.0.3/r1068_scriptdev2.sql @@ -0,0 +1,85 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000355 AND -1000351; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000351, 'You, there! Hand over that moonstone and nobody gets hurt!',0,1,0,0,'sprysprocket SAY_START'), +(-1000352, '%s takes the Southfury moonstone and escapes into the river. Follow her!',0,3,0,0,'sprysprocket EMOTE_START'), +(-1000353, 'Just chill!',0,4,0,0,'sprysprocket SAY_WHISPER_CHILL'), +(-1000354, 'Stupid grenade picked a fine time to backfire! So much for high quality goblin engineering!',0,1,0,0,'sprysprocket SAY_GRENADE_FAIL'), +(-1000355, 'All right, you win! I surrender! Just don\'t hurt me!',0,1,0,0,'sprysprocket SAY_END'); + +DELETE FROM script_waypoint WHERE entry=23002; +INSERT INTO script_waypoint VALUES +(23002, 0, 3687.11, -3960.69, 31.8726, 0, ''), +(23002, 1, 3676.28, -3953.76, 29.9396, 0, ''), +(23002, 2, 3658.54, -3952.15, 30.0414, 0, ''), +(23002, 3, 3628.91, -3956.90, 29.4050, 0, ''), +(23002, 4, 3602.54, -3968.16, 31.5110, 0, ''), +(23002, 5, 3564.96, -3978.00, 30.3622, 0, ''), +(23002, 6, 3542.47, -3981.81, 29.1465, 0, ''), +(23002, 7, 3511.34, -3981.25, 30.2822, 0, ''), +(23002, 8, 3473.45, -3992.67, 30.2861, 0, ''), +(23002, 9, 3439.10, -4006.73, 29.2737, 0, ''), +(23002, 10, 3415.66, -4026.24, 25.2498, 0, ''), +(23002, 11, 3380.88, -4045.38, 26.3114, 0, ''), +(23002, 12, 3355.23, -4051.42, 25.5665, 0, ''), +(23002, 13, 3312.00, -4055.65, 28.3297, 0, ''), +(23002, 14, 3286.34, -4079.27, 28.2464, 0, ''), +(23002, 15, 3260.68, -4087.29, 31.4043, 0, ''), +(23002, 16, 3236.83, -4087.65, 32.6894, 0, ''), +(23002, 17, 3215.06, -4082.10, 32.4181, 0, ''), +(23002, 18, 3203.59, -4082.47, 32.7436, 0, ''), +(23002, 19, 3166.41, -4062.09, 33.2357, 0, ''), +(23002, 20, 3147.51, -4055.33, 33.5683, 0, ''), +(23002, 21, 3125.41, -4050.01, 34.6100, 0, ''), +(23002, 22, 3121.16, -4045.07, 36.5481, 0, ''), +(23002, 23, 3101.54, -4023.78, 33.7169, 0, ''), +(23002, 24, 3094.16, -4016.89, 33.8487, 0, ''), +(23002, 25, 3079.57, -4011.01, 35.7546, 0, ''), +(23002, 26, 3058.83, -4001.71, 34.3039, 0, ''), +(23002, 27, 3037.83, -3986.60, 33.4216, 0, ''), +(23002, 28, 3016.93, -3970.83, 33.3743, 0, ''), +(23002, 29, 2998.05, -3954.89, 33.2338, 0, ''), +(23002, 30, 2969.35, -3929.27, 33.4831, 0, ''), +(23002, 31, 2941.23, -3909.56, 31.3506, 0, ''), +(23002, 32, 2911.42, -3895.07, 32.0950, 0, ''), +(23002, 33, 2892.44, -3875.52, 30.8123, 0, ''), +(23002, 34, 2870.52, -3858.97, 32.1977, 0, ''), +(23002, 35, 2865.84, -3836.99, 32.1108, 0, ''), +(23002, 36, 2850.52, -3814.52, 32.8635, 0, ''), +(23002, 37, 2836.63, -3796.94, 33.1473, 0, ''), +(23002, 38, 2820.73, -3780.22, 28.6916, 0, ''), +(23002, 39, 2795.82, -3770.13, 30.1327, 0, ''), +(23002, 40, 2773.15, -3765.54, 30.2947, 0, ''), +(23002, 41, 2742.31, -3761.65, 30.1218, 0, ''), +(23002, 42, 2708.43, -3748.46, 21.2468, 0, ''), +(23002, 43, 2661.45, -3741.11, 21.9603, 0, ''), +(23002, 44, 2623.89, -3735.29, 25.8979, 0, ''), +(23002, 45, 2585.93, -3728.85, 28.5146, 0, ''), +(23002, 46, 2554.93, -3730.10, 26.6795, 0, ''), +(23002, 47, 2538.68, -3721.28, 28.1589, 0, ''), +(23002, 48, 2508.54, -3708.71, 29.6718, 0, ''), +(23002, 49, 2474.69, -3710.37, 31.0805, 0, ''), +(23002, 50, 2456.40, -3698.83, 31.6187, 0, ''), +(23002, 51, 2430.54, -3701.87, 31.0494, 0, ''), +(23002, 52, 2390.13, -3681.76, 29.5484, 0, ''), +(23002, 53, 2357.06, -3673.96, 29.8845, 0, ''), +(23002, 54, 2330.15, -3672.73, 31.1314, 0, ''), +(23002, 55, 2302.77, -3665.22, 29.4110, 0, ''), +(23002, 56, 2279.24, -3659.46, 29.6247, 0, ''), +(23002, 57, 2254.65, -3661.12, 29.6984, 0, ''), +(23002, 58, 2223.32, -3654.92, 31.0149, 0, ''), +(23002, 59, 2194.29, -3645.40, 32.0417, 0, ''), +(23002, 60, 2153.05, -3650.82, 31.2292, 0, ''), +(23002, 61, 2114.15, -3639.96, 31.7371, 0, ''), +(23002, 62, 2093.68, -3646.65, 31.3745, 0, ''), +(23002, 63, 2069.86, -3670.59, 30.6172, 0, ''), +(23002, 64, 2024.40, -3677.64, 29.7682, 0, ''), +(23002, 65, 1988.61, -3680.02, 31.8937, 0, ''), +(23002, 66, 1962.68, -3692.17, 32.7811, 0, ''), +(23002, 67, 1931.94, -3708.48, 31.3641, 0, ''), +(23002, 68, 1893.36, -3710.02, 33.0193, 0, ''), +(23002, 69, 1865.73, -3718.35, 32.1664, 0, ''), +(23002, 70, 1839.74, -3732.92, 32.5322, 0, ''), +(23002, 71, 1805.08, -3757.76, 32.6295, 0, ''), +(23002, 72, 1780.24, -3775.53, 30.5931, 0, ''), +(23002, 73, 1753.28, -3786.79, 30.7445, 0, ''), +(23002, 74, 1731.09, -3796.64, 36.8866, 0, ''); diff --git a/sql/Updates/0.0.3/r1069_mangos.sql b/sql/Updates/0.0.3/r1069_mangos.sql new file mode 100644 index 000000000..ed3f599dd --- /dev/null +++ b/sql/Updates/0.0.3/r1069_mangos.sql @@ -0,0 +1 @@ +UPDATE instance_template SET script='instance_blackfathom_deeps' WHERE map=48; diff --git a/sql/Updates/0.0.3/r1073_mangos.sql b/sql/Updates/0.0.3/r1073_mangos.sql new file mode 100644 index 000000000..902ce51f2 --- /dev/null +++ b/sql/Updates/0.0.3/r1073_mangos.sql @@ -0,0 +1 @@ +UPDATE instance_template SET script='instance_naxxramas' WHERE map=533; diff --git a/sql/Updates/0.0.3/r1074_scriptdev2.sql b/sql/Updates/0.0.3/r1074_scriptdev2.sql new file mode 100644 index 000000000..5484d69fb --- /dev/null +++ b/sql/Updates/0.0.3/r1074_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 7810+) '; diff --git a/sql/Updates/0.0.3/r1075_mangos.sql b/sql/Updates/0.0.3/r1075_mangos.sql new file mode 100644 index 000000000..59c523a73 --- /dev/null +++ b/sql/Updates/0.0.3/r1075_mangos.sql @@ -0,0 +1,3 @@ +UPDATE creature_template SET ScriptName='npc_afrasastrasz' WHERE entry=27575; +UPDATE creature_template SET ScriptName='npc_tariolstrasz' WHERE entry=26443; +UPDATE creature_template SET ScriptName='npc_torastrasza' WHERE entry=26949; diff --git a/sql/Updates/0.0.3/r1080_scriptdev2.sql b/sql/Updates/0.0.3/r1080_scriptdev2.sql new file mode 100644 index 000000000..0a1eeeaa7 --- /dev/null +++ b/sql/Updates/0.0.3/r1080_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 7829+) '; diff --git a/sql/Updates/0.0.3/r1082_mangos.sql b/sql/Updates/0.0.3/r1082_mangos.sql new file mode 100644 index 000000000..f450d9e8d --- /dev/null +++ b/sql/Updates/0.0.3/r1082_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='mob_amanishi_hatcher' WHERE entry IN (23818,24504); diff --git a/sql/Updates/0.0.3/r1098_scriptdev2.sql b/sql/Updates/0.0.3/r1098_scriptdev2.sql new file mode 100644 index 000000000..ba149124c --- /dev/null +++ b/sql/Updates/0.0.3/r1098_scriptdev2.sql @@ -0,0 +1,45 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1615042 AND -1615000; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1615000,'I fear nothing! Least of all you!',14111,1,0,0,'shadron SAY_SHADRON_AGGRO'), +(-1615001,'You are insignificant!',14112,1,0,0,'shadron SAY_SHADRON_SLAY_1'), +(-1615002,'Such mediocre resistance!',14113,1,0,0,'shadron SAY_SHADRON_SLAY_2'), +(-1615003,'We...are superior! How could this...be...',14118,1,0,0,'shadron SAY_SHADRON_DEATH'), +(-1615004,'You are easily bested! ',14114,1,0,0,'shadron SAY_SHADRON_BREATH'), +(-1615005,'I will take pity on you Sartharion, just this once.',14117,1,0,0,'shadron SAY_SHADRON_RESPOND'), +(-1615006,'Father tought me well!',14115,1,0,0,'shadron SAY_SHADRON_SPECIAL_1'), +(-1615007,'On your knees!',14116,1,0,0,'shadron SAY_SHADRON_SPECIAL_2'), +(-1615008,'A Shadron Disciple appears in the Twilight!',0,5,0,0,'shadron WHISPER_SHADRON_DICIPLE'), +(-1615009,'You have no place here. Your place is among the departed.',14122,1,0,0,'tenebron SAY_TENEBRON_AGGRO'), +(-1615010,'No contest.',14123,1,0,0,'tenebron SAY_TENEBRON_SLAY_1'), +(-1615011,'Typical... Just as I was having fun.',14124,1,0,0,'tenebron SAY_TENEBRON_SLAY_2'), +(-1615012,'I should not... have held back...', 14129,1,0,0,'tenebron SAY_TENEBRON_DEATH'), +(-1615013,'To darkness I condemn you...',14125,1,0,0,'tenebron SAY_TENEBRON_BREATH'), +(-1615014,'It is amusing to watch you struggle. Very well, witness how it is done.',14128,1,0,0,'tenebron SAY_TENEBRON_RESPOND'), +(-1615015,'Arrogant little creatures! To challenge powers you do not yet understand...',14126,1,0,0,'tenebron SAY_TENEBRON_SPECIAL_1'), +(-1615016,'I am no mere dragon! You will find I am much, much, more...',14127,1,0,0,'tenebron SAY_TENEBRON_SPECIAL_2'), +(-1615017,'%s begins to hatch eggs in the twilight!',0,5,0,0,'tenebron WHISPER_HATCH_EGGS'), +(-1615018,'It is my charge to watch over these eggs. I will see you burn before any harm comes to them!',14093,1,0,0,'sartharion SAY_SARTHARION_AGGRO'), +(-1615019,'This pathetic siege ends NOW!',14103,1,0,0,'sartharion SAY_SARTHARION_BERSERK'), +(-1615020,'Burn, you miserable wretches!',14098, 1,0,0,'sartharion SAY_SARTHARION_BREATH'), +(-1615021,'Shadron! Come to me, all is at risk!',14105,1,0,0,'sartharion SARTHARION_CALL_SHADRON'), +(-1615022,'Tenebron! The eggs are yours to protect as well!',14106,1,0,0,'sartharion SAY_SARTHARION_CALL_TENEBRON'), +(-1615023,'Vesperon! The clutch is in danger! Assist me!',14104,1,0,0,'sartharion SAY_SARTHARION_CALL_VESPERON'), +(-1615024,'Such is the price... of failure...',14107,1,0,0,'sartharion SAY_SARTHARION_DEATH'), +(-1615025,'Such flammable little insects....',14099,1,0,0,'sartharion SAY_SARTHARION_SPECIAL_1'), +(-1615026,'Your charred bones will litter the floor!',14100,1,0,0,'sartharion SAY_SARTHARION_SPECIAL_2'), +(-1615027,'How much heat can you take?',14101,1,0,0,'sartharion SAY_SARTHARION_SPECIAL_3'), +(-1615028,'All will be reduced to ash!',14102,1,0,0,'sartharion SAY_SARTHARION_SPECIAL_4'), +(-1615029,'You will make a fine meal for the hatchlings.',14094,1,0,0,'sartharion SAY_SARTHARION_SLAY_1'), +(-1615030,'You are the grave disadvantage.',14096,1,0,0,'sartharion SAY_SARTHARION_SLAY_2'), +(-1615031,'This is why we call you lesser beeings.',14097,1,0,0,'sartharion SAY_SARTHARION_SLAY_3'), +(-1615032,'The lava surrounding %s churns!',0,5,0,0,'sartharion WHISPER_LAVA_CHURN'), +(-1615033,'You pose no threat, lesser beings...give me your worst!',14133,1,0,0,'vesperon SAY_VESPERON_AGGRO'), +(-1615034,'The least you could do is put up a fight...',14134,1,0,0,'vesperon SAY_VESPERON_SLAY_1'), +(-1615035,'Was that the best you can do?',14135,1,0,0,'vesperon SAY_VESPERON_SLAY_2'), +(-1615036,'I still have some...fight..in...me...', 14140,1,0,0,'vesperon SAY_VESPERON_DEATH'), +(-1615037,'I will pick my teeth with your bones!',14136,1,0,0,'vesperon SAY_VESPERON_BREATH'), +(-1615038,'Father was right about you, Sartharion...You are a weakling!',14139,1,0,0,'vesperon SAY_VESPERON_RESPOND'), +(-1615039,'Aren\'t you tricky...I have a few tricks of my own...',14137,1,0,0,'vesperon SAY_VESPERON_SPECIAL_1'), +(-1615040,'Unlike, I have many talents.',14138,1,0,0,'vesperon SAY_VESPERON_SPECIAL_2'), +(-1615041,'A Vesperon Disciple appears in the Twilight!',0,5,0,0,'shadron WHISPER_VESPERON_DICIPLE'), +(-1615042,'%s begins to open a Twilight Portal!',0,5,0,0,'sartharion drake WHISPER_OPEN_PORTAL'); diff --git a/sql/Updates/0.0.3/r1099_mangos.sql b/sql/Updates/0.0.3/r1099_mangos.sql new file mode 100644 index 000000000..f34a407ab --- /dev/null +++ b/sql/Updates/0.0.3/r1099_mangos.sql @@ -0,0 +1 @@ +UPDATE instance_template SET script='instance_obsidian_sanctum' WHERE map=615; diff --git a/sql/Updates/0.0.3/r1100_mangos.sql b/sql/Updates/0.0.3/r1100_mangos.sql new file mode 100644 index 000000000..0e27351cb --- /dev/null +++ b/sql/Updates/0.0.3/r1100_mangos.sql @@ -0,0 +1,8 @@ +UPDATE creature_template SET ScriptName='boss_sartharion' WHERE entry=28860; +UPDATE creature_template SET ScriptName='mob_vesperon' WHERE entry=30449; +UPDATE creature_template SET ScriptName='mob_shadron' WHERE entry=30451; +UPDATE creature_template SET ScriptName='mob_tenebron' WHERE entry=30452; +UPDATE creature_template SET ScriptName='mob_twilight_eggs' WHERE entry=30882; +UPDATE creature_template SET ScriptName='mob_twilight_whelp' WHERE entry IN (30890, 31214); +UPDATE creature_template SET ScriptName='mob_acolyte_of_shadron' WHERE entry=31218; +UPDATE creature_template SET ScriptName='mob_acolyte_of_vesperon' WHERE entry=31219; diff --git a/sql/Updates/0.0.3/r1103_mangos.sql b/sql/Updates/0.0.3/r1103_mangos.sql new file mode 100644 index 000000000..dec84d035 --- /dev/null +++ b/sql/Updates/0.0.3/r1103_mangos.sql @@ -0,0 +1 @@ +UPDATE gameobject_template SET ScriptName='go_resonite_cask' WHERE entry=178145; diff --git a/sql/Updates/0.0.3/r1104_scriptdev2.sql b/sql/Updates/0.0.3/r1104_scriptdev2.sql new file mode 100644 index 000000000..781ab7376 --- /dev/null +++ b/sql/Updates/0.0.3/r1104_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 7871+) '; diff --git a/sql/Updates/0.0.3/r1106_mangos.sql b/sql/Updates/0.0.3/r1106_mangos.sql new file mode 100644 index 000000000..fdc50ed94 --- /dev/null +++ b/sql/Updates/0.0.3/r1106_mangos.sql @@ -0,0 +1 @@ +UPDATE item_template SET ScriptName='item_dart_gun' WHERE entry=44222; diff --git a/sql/Updates/0.0.3/r1112_mangos.sql b/sql/Updates/0.0.3/r1112_mangos.sql new file mode 100644 index 000000000..6010c41bd --- /dev/null +++ b/sql/Updates/0.0.3/r1112_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_kalecgos' WHERE entry IN (24844, 24848); diff --git a/sql/Updates/0.0.3/r1116_mangos.sql b/sql/Updates/0.0.3/r1116_mangos.sql new file mode 100644 index 000000000..fb7d10173 --- /dev/null +++ b/sql/Updates/0.0.3/r1116_mangos.sql @@ -0,0 +1,2 @@ +UPDATE instance_template SET script='instance_utgarde_keep' WHERE map=574; +UPDATE creature_template SET ScriptName='mob_dragonflayer_forge_master' WHERE entry=24079; diff --git a/sql/Updates/0.0.3/r1119_mangos.sql b/sql/Updates/0.0.3/r1119_mangos.sql new file mode 100644 index 000000000..06d46dad4 --- /dev/null +++ b/sql/Updates/0.0.3/r1119_mangos.sql @@ -0,0 +1,4 @@ +UPDATE creature_template SET ScriptName='boss_skarvald' WHERE entry=24200; +UPDATE creature_template SET ScriptName='boss_dalronn' WHERE entry=24201; +UPDATE creature_template SET ScriptName='boss_ingvar' WHERE entry=23954; +UPDATE creature_template SET ScriptName='boss_keleseth' WHERE entry=23953; diff --git a/sql/Updates/0.0.3/r1119_scriptdev2.sql b/sql/Updates/0.0.3/r1119_scriptdev2.sql new file mode 100644 index 000000000..e0f3927b9 --- /dev/null +++ b/sql/Updates/0.0.3/r1119_scriptdev2.sql @@ -0,0 +1,23 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1574020 AND -1574000; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1574000,'Your blood is mine!',13221,1,0,0,'keleseth SAY_AGGRO'), +(-1574001,'Not so fast.',13222,1,0,0,'keleseth SAY_FROSTTOMB'), +(-1574002,'Aranal, lidel! Their fate shall be yours!',13224,1,0,0,'keleseth SAY_SKELETONS'), +(-1574003,'Darkness waits!',13223,1,0,0,'keleseth SAY_KILL'), +(-1574004,'I join... the night.',13225,1,0,0,'keleseth SAY_DEATH'), +(-1574005,'I\'ll paint my face with your blood!',13207,1,0,0,'ingvar SAY_AGGRO_FIRST'), +(-1574006,'I return! A second chance to carve out your skull!',13209,1,0,0,'ingvar SAY_AGGRO_SECOND'), +(-1574007,'My life for the... death god!',13213,1,0,0,'ingvar SAY_DEATH_FIRST'), +(-1574008,'No! I can do... better! I can...',13211,1,0,0,'ingvar SAY_DEATH_SECOND'), +(-1574009,'Mjul orm agn gjor!',13212,1,0,0,'ingvar SAY_KILL_FIRST'), +(-1574010,'I am a warrior born!',13214,1,0,0,'ingvar SAY_KILL_SECOND'), +(-1574011,'Dalronn! See if you can muster the nerve to join my attack!',13229,1,0,0,'skarvald SAY_SKA_AGGRO'), +(-1574012,'Not... over... yet.',13230,1,0,0,'skarvald SAY_SKA_DEATH'), +(-1574013,'A warrior\'s death.',13231,1,0,0,'skarvald SAY_SKA_DEATH_REAL'), +(-1574014,'???',13232,1,0,0,'skarvald SAY_SKA_KILL'), +(-1574015,'Pagh! What sort of necromancer lets death stop him? I knew you were worthless!',13233,1,0,0,'skarvald SAY_SKA_DAL_DIES_REPLY'), +(-1574016,'By all means, don\'t assess the situation, you halfwit! Just jump into the fray!',13199,1,0,0,'dalronn SAY_DAL_AGGRO_REPLY'), +(-1574017,'See... you... soon.',13200,1,0,0,'dalronn SAY_DAL_DEATH'), +(-1574018,'There\'s no... greater... glory.',13201,1,0,0,'dalronn SAY_DAL_DEATH_REAL'), +(-1574019,'You may serve me yet.',13202,1,0,0,'dalronn SAY_DAL_KILL'), +(-1574020,'Skarvald, you incompetent slug! Return and make yourself useful!',13203,1,0,0,'dalronn SAY_DAL_SKA_DIES_REPLY'); diff --git a/sql/Updates/0.0.3/r1120_scriptdev2.sql b/sql/Updates/0.0.3/r1120_scriptdev2.sql new file mode 100644 index 000000000..fb17a3720 --- /dev/null +++ b/sql/Updates/0.0.3/r1120_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 7951+) '; diff --git a/sql/Updates/0.0.3/r1121_mangos.sql b/sql/Updates/0.0.3/r1121_mangos.sql new file mode 100644 index 000000000..f01ab1a92 --- /dev/null +++ b/sql/Updates/0.0.3/r1121_mangos.sql @@ -0,0 +1,4 @@ +UPDATE creature_template SET ScriptName='boss_anomalus' WHERE entry=26763; +UPDATE creature_template SET ScriptName='boss_keristrasza' WHERE entry=26723; +UPDATE creature_template SET ScriptName='boss_ormorok' WHERE entry=26794; +UPDATE creature_template SET ScriptName='boss_telestra' WHERE entry=26731; diff --git a/sql/Updates/0.0.3/r1121_scriptdev2.sql b/sql/Updates/0.0.3/r1121_scriptdev2.sql new file mode 100644 index 000000000..34ef92436 --- /dev/null +++ b/sql/Updates/0.0.3/r1121_scriptdev2.sql @@ -0,0 +1,23 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1576020 AND -1576000; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1576000,'You know what they say about curiosity.',13319,1,0,0,'telestra SAY_AGGRO'), +(-1576001,'I\'ll give you more than you can handle.',13321,1,0,0,'telestra SAY_SPLIT_1'), +(-1576002,'There\'s plenty of me to go around.',13322,1,0,0,'telestra SAY_SPLIT_2'), +(-1576003,'Now to finish the job!',13323,1,0,0,'telestra SAY_MERGE'), +(-1576004,'Death becomes you!',13324,1,0,0,'telestra SAY_KILL'), +(-1576005,'Damn the... luck.',13320,1,0,0,'telestra SAY_DEATH'), +(-1576006,'Chaos beckons.',13186,1,0,0,'anomalus SAY_AGGRO'), +(-1576007,'Reality... unwoven.',13188,1,0,0,'anomalus SAY_RIFT'), +(-1576008,'Indestructible.',13189,1,0,0,'anomalus SAY_SHIELD'), +(-1576009,'Expiration... is necesarry.',13274,1,0,0,'anomalus SAY_KILL'), +(-1576010,'Of course.',13187,1,0,0,'anomalus SAY_DEATH'), +(-1576011,'Noo!',13328,1,0,0,'ormorok SAY_AGGRO'), +(-1576012,'???',13329,1,0,0,'ormorok SAY_KILL'), +(-1576013,'Baaack!',13331,1,0,0,'ormorok SAY_REFLECT'), +(-1576014,'Bleeeed!',13332,1,0,0,'ormorok SAY_ICESPIKE'), +(-1576015,'Aaggh!',13330,1,0,0,'ormorok SAY_DEATH'), +(-1576016,'Preserve? Why? There\'s no truth in it. No no no... only in the taking! I see that now!',13450,1,0,0,'keristrasza SAY_AGGRO'), +(-1576017,'Stay. Enjoy your final moments.',13451,1,0,0,'keristrasza SAY_CRYSTAL_NOVA'), +(-1576018,'Finish it! Finish it! Kill me, or I swear by the Dragonqueen you\'ll never see daylight again!',13452,1,0,0,'keristrasza SAY_ENRAGE'), +(-1576019,'Now we\'ve come to the truth!',13453,1,0,0,'keristrasza SAY_KILL'), +(-1576020,'Dragonqueen... Life-Binder... preserve... me.',13454,1,0,0,'keristrasza SAY_DEATH'); diff --git a/sql/Updates/0.0.3/r1123_scriptdev2.sql b/sql/Updates/0.0.3/r1123_scriptdev2.sql new file mode 100644 index 000000000..6c3e11d88 --- /dev/null +++ b/sql/Updates/0.0.3/r1123_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM script_texts WHERE entry=-1533119; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1533119,'%s spots a nearby Zombie to devour!',0,3,0,0,'gluth EMOTE_ZOMBIE'); diff --git a/sql/Updates/0.0.3/r1128_mangos.sql b/sql/Updates/0.0.3/r1128_mangos.sql new file mode 100644 index 000000000..f1990593a --- /dev/null +++ b/sql/Updates/0.0.3/r1128_mangos.sql @@ -0,0 +1,14 @@ +UPDATE item_template SET ScriptName='' WHERE entry=34368; +UPDATE item_template SET ScriptName='' WHERE entry=31129; +UPDATE item_template SET ScriptName='' WHERE entry=44222; +UPDATE item_template SET ScriptName='' WHERE entry=22473; +UPDATE item_template SET ScriptName='' WHERE entry IN (9606,9618,9619,9620,9621); +UPDATE item_template SET ScriptName='' WHERE entry=30656; +UPDATE item_template SET ScriptName='' WHERE entry=34255; +UPDATE item_template SET ScriptName='' WHERE entry=32825; +UPDATE item_template SET ScriptName='' WHERE entry=32321; +UPDATE item_template SET ScriptName='' WHERE entry IN (15908,15911,15913,15914,15915,15916,15917,15919,15920,15921,15922,15923,23697,23702,23703,23896,23897,23898); +UPDATE item_template SET ScriptName='' WHERE entry=8149; +UPDATE item_template SET ScriptName='' WHERE entry=30259; +UPDATE item_template SET ScriptName='' WHERE entry=10699; +UPDATE item_template SET ScriptName='' WHERE entry=31463; diff --git a/sql/Updates/0.0.3/r1129_mangos.sql b/sql/Updates/0.0.3/r1129_mangos.sql new file mode 100644 index 000000000..4795b60c4 --- /dev/null +++ b/sql/Updates/0.0.3/r1129_mangos.sql @@ -0,0 +1 @@ +UPDATE item_template SET ScriptName='' WHERE entry=28132; diff --git a/sql/Updates/0.0.3/r1129_scriptdev2.sql b/sql/Updates/0.0.3/r1129_scriptdev2.sql new file mode 100644 index 000000000..8673e1cd9 --- /dev/null +++ b/sql/Updates/0.0.3/r1129_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 7983+) '; diff --git a/sql/Updates/0.0.3/r1131_mangos.sql b/sql/Updates/0.0.3/r1131_mangos.sql new file mode 100644 index 000000000..d4e18f7bc --- /dev/null +++ b/sql/Updates/0.0.3/r1131_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='boss_vazruden_herald' WHERE entry=17307; +UPDATE creature_template SET ScriptName='boss_vazruden' WHERE entry=17537; diff --git a/sql/Updates/0.0.3/r1136_mangos.sql b/sql/Updates/0.0.3/r1136_mangos.sql new file mode 100644 index 000000000..54b43c1d2 --- /dev/null +++ b/sql/Updates/0.0.3/r1136_mangos.sql @@ -0,0 +1,3 @@ +UPDATE creature_template SET ScriptName='npc_unworthy_initiate_anchor' WHERE entry=29521; +UPDATE creature_template SET ScriptName='npc_unworthy_initiate' WHERE entry IN (29519,29520,29565,29566,29567); +UPDATE gameobject_template SET ScriptName='go_acherus_soul_prison' WHERE entry IN (191577,191580,191581,191582,191583,191584,191585,191586,191587,191588,191589,191590); diff --git a/sql/Updates/0.0.3/r1136_scriptdev2.sql b/sql/Updates/0.0.3/r1136_scriptdev2.sql new file mode 100644 index 000000000..99c7902f9 --- /dev/null +++ b/sql/Updates/0.0.3/r1136_scriptdev2.sql @@ -0,0 +1,18 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1609015 AND -1609000; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1609000,'You have made a grave error, fiend!',0,0,0,0,'unworthy SAY_START_1'), +(-1609001,'I was a soldier of the Light once... Look at what I have become... ',0,0,0,0,'unworthy SAY_START_2'), +(-1609002,'You are hopelessly outmatched, $R.',0,0,0,0,'unworthy SAY_START_3'), +(-1609003,'They brand me unworthy? I will show them unmorthy!',0,0,0,0,'unworthy SAY_START_4'), +(-1609004,'You will allow me a weapon and armor, yes?',0,0,0,0,'unworthy SAY_START_5'), +(-1609005,'I will win my freedom and leave this cursed place!',0,0,0,0,'unworthy SAY_START_6'), +(-1609006,'I will dismantle this festering hellhole!',0,0,0,0,'unworthy SAY_START_7'), +(-1609007,'There can be only one survivor!',0,0,0,0,'unworthy SAY_START_8'), +(-1609008,'Let your fears consume you!',0,0,0,0,'unworthy SAY_AGGRO_1'), +(-1609009,'HAH! You can barely hold a blade! Yours will be a quick death.',0,0,0,0,'unworthy SAY_AGGRO_2'), +(-1609010,'And now you die',0,0,0,0,'unworthy SAY_AGGRO_3'), +(-1609011,'To battle!',0,0,0,0,'unworthy SAY_AGGRO_4'), +(-1609012,'There is no hope for our future...',0,0,0,0,'unworthy SAY_AGGRO_5'), +(-1609013,'Sate your hunger on cold steel, $R',0,0,0,0,'unworthy SAY_AGGRO_6'), +(-1609014,'It ends here!',0,0,0,0,'unworthy SAY_AGGRO_7'), +(-1609015,'Death is the only cure!',0,0,0,0,'unworthy SAY_AGGRO_8'); diff --git a/sql/Updates/0.0.3/r1140_scriptdev2.sql b/sql/Updates/0.0.3/r1140_scriptdev2.sql new file mode 100644 index 000000000..604bd11d9 --- /dev/null +++ b/sql/Updates/0.0.3/r1140_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 8015+) '; diff --git a/sql/Updates/0.0.3/r1141_mangos.sql b/sql/Updates/0.0.3/r1141_mangos.sql new file mode 100644 index 000000000..a41739a2e --- /dev/null +++ b/sql/Updates/0.0.3/r1141_mangos.sql @@ -0,0 +1 @@ +UPDATE instance_template SET script='instance_azjol-nerub' WHERE map=601; diff --git a/sql/Updates/0.0.3/r1145_scriptdev2.sql b/sql/Updates/0.0.3/r1145_scriptdev2.sql new file mode 100644 index 000000000..80ff7f5b1 --- /dev/null +++ b/sql/Updates/0.0.3/r1145_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM script_texts WHERE entry=-1000356; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000356,'Okay, okay... gimme a minute to rest now. You gone and beat me up good.',0,0,14,1,'calvin SAY_COMPLETE'); diff --git a/sql/Updates/0.0.3/r1146_scriptdev2.sql b/sql/Updates/0.0.3/r1146_scriptdev2.sql new file mode 100644 index 000000000..82d0c196c --- /dev/null +++ b/sql/Updates/0.0.3/r1146_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 8040+) '; diff --git a/sql/Updates/0.0.3/r1149_scriptdev2.sql b/sql/Updates/0.0.3/r1149_scriptdev2.sql new file mode 100644 index 000000000..dd25b6d38 --- /dev/null +++ b/sql/Updates/0.0.3/r1149_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE script_texts SET language=1, emote=14 WHERE entry=-1000356; diff --git a/sql/Updates/0.0.3/r1152_scriptdev2.sql b/sql/Updates/0.0.3/r1152_scriptdev2.sql new file mode 100644 index 000000000..a88b35109 --- /dev/null +++ b/sql/Updates/0.0.3/r1152_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 8057+) '; diff --git a/sql/Updates/0.0.3/r1154_mangos.sql b/sql/Updates/0.0.3/r1154_mangos.sql new file mode 100644 index 000000000..774999a61 --- /dev/null +++ b/sql/Updates/0.0.3/r1154_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='mob_soaring_eagle' WHERE entry=24858; diff --git a/sql/Updates/0.0.3/r1155_mangos.sql b/sql/Updates/0.0.3/r1155_mangos.sql new file mode 100644 index 000000000..9ca0e6bdc --- /dev/null +++ b/sql/Updates/0.0.3/r1155_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='boss_spirit_lynx' WHERE entry=24143; diff --git a/sql/Updates/0.0.3/r1169_mangos.sql b/sql/Updates/0.0.3/r1169_mangos.sql new file mode 100644 index 000000000..749d238ed --- /dev/null +++ b/sql/Updates/0.0.3/r1169_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_death_knight_initiate' WHERE entry=28406; diff --git a/sql/Updates/0.0.3/r1169_scriptdev2.sql b/sql/Updates/0.0.3/r1169_scriptdev2.sql new file mode 100644 index 000000000..76fd3a494 --- /dev/null +++ b/sql/Updates/0.0.3/r1169_scriptdev2.sql @@ -0,0 +1,8 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1609021 AND -1609016; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1609016,'No potions!',0,0,0,0,'dk_initiate SAY_DUEL_A'), +(-1609017,'Remember this day, $n, for it is the day that you will be thoroughly owned.',0,0,0,0,'dk_initiate SAY_DUEL_B'), +(-1609018,'I\'m going to tear your heart out, cupcake!',0,0,0,0,'dk_initiate SAY_DUEL_C'), +(-1609019,'Don\'t make me laugh.',0,0,0,0,'dk_initiate SAY_DUEL_D'), +(-1609020,'Here come the tears...',0,0,0,0,'dk_initiate SAY_DUEL_E'), +(-1609021,'You have challenged death itself!',0,0,0,0,'dk_initiate SAY_DUEL_F'); diff --git a/sql/Updates/0.0.3/r1171_scriptdev2.sql b/sql/Updates/0.0.3/r1171_scriptdev2.sql new file mode 100644 index 000000000..11187d712 --- /dev/null +++ b/sql/Updates/0.0.3/r1171_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 8078+) '; diff --git a/sql/Updates/0.0.3/r1173_scriptdev2.sql b/sql/Updates/0.0.3/r1173_scriptdev2.sql new file mode 100644 index 000000000..3aee5498c --- /dev/null +++ b/sql/Updates/0.0.3/r1173_scriptdev2.sql @@ -0,0 +1,5 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1609024 AND -1609022; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1609022,'The Lich King will see his true champion on this day!',0,0,0,0,'dk_initiate SAY_DUEL_G'), +(-1609023,'You\'re going down!',0,0,0,0,'dk_initiate SAY_DUEL_H'), +(-1609024,'You don\'t stand a chance, $n',0,0,0,0,'dk_initiate SAY_DUEL_I'); diff --git a/sql/Updates/0.0.3/r1180_mangos.sql b/sql/Updates/0.0.3/r1180_mangos.sql new file mode 100644 index 000000000..f2462e1cf --- /dev/null +++ b/sql/Updates/0.0.3/r1180_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_slim' WHERE entry=19679; diff --git a/sql/Updates/0.0.3/r1184_mangos.sql b/sql/Updates/0.0.3/r1184_mangos.sql new file mode 100644 index 000000000..c676b1845 --- /dev/null +++ b/sql/Updates/0.0.3/r1184_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName` = 'npc_cassa_crimsonwing' WHERE `entry` =23704; diff --git a/sql/Updates/0.0.3/r1197_mangos.sql b/sql/Updates/0.0.3/r1197_mangos.sql new file mode 100644 index 000000000..11aa2fd7d --- /dev/null +++ b/sql/Updates/0.0.3/r1197_mangos.sql @@ -0,0 +1,5 @@ +UPDATE instance_template SET script='instance_sunwell_plateau' WHERE map=580; +UPDATE creature_template SET ScriptName='boss_kalecgos' WHERE entry=24850; +UPDATE creature_template SET ScriptName='boss_kalecgos_humanoid' WHERE entry=24891; +UPDATE creature_template SET ScriptName='boss_sathrovarr' WHERE entry=24892; +UPDATE gameobject_template SET ScriptName='go_spectral_rift' WHERE entry=187055; diff --git a/sql/Updates/0.0.3/r1199_mangos.sql b/sql/Updates/0.0.3/r1199_mangos.sql new file mode 100644 index 000000000..3ec1e0640 --- /dev/null +++ b/sql/Updates/0.0.3/r1199_mangos.sql @@ -0,0 +1,2 @@ +DELETE FROM areatrigger_scripts WHERE entry=4853; +INSERT INTO areatrigger_scripts VALUES (4853,'at_madrigosa'); diff --git a/sql/Updates/0.0.3/r1202_mangos.sql b/sql/Updates/0.0.3/r1202_mangos.sql new file mode 100644 index 000000000..fd06804f2 --- /dev/null +++ b/sql/Updates/0.0.3/r1202_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_a_special_surprise' WHERE entry IN (29032,29061,29065,29067,29068,29070,29074,29072,29073,29071); diff --git a/sql/Updates/0.0.3/r1202_scriptdev2.sql b/sql/Updates/0.0.3/r1202_scriptdev2.sql new file mode 100644 index 000000000..1e848e4a4 --- /dev/null +++ b/sql/Updates/0.0.3/r1202_scriptdev2.sql @@ -0,0 +1,56 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1609078 AND -1609025; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1609025,'Come to finish the job, have you?',0,0,0,1,'special_surprise SAY_EXEC_START_1'), +(-1609026,'Come to finish the job, have ye?',0,0,0,1,'special_surprise SAY_EXEC_START_2'), +(-1609027,'Come ta finish da job, mon?',0,0,0,1,'special_surprise SAY_EXEC_START_3'), +(-1609028,'You\'ll look me in the eyes when...',0,0,0,25,'special_surprise SAY_EXEC_PROG_1'), +(-1609029,'Well this son o\' Ironforge would like...',0,0,0,25,'special_surprise SAY_EXEC_PROG_2'), +(-1609030,'Ironic, isn\'t it? To be killed...',0,0,0,25,'special_surprise SAY_EXEC_PROG_3'), +(-1609031,'If you\'d allow me just one...',0,0,0,25,'special_surprise SAY_EXEC_PROG_4'), +(-1609032,'I\'d like to stand for...',0,0,0,25,'special_surprise SAY_EXEC_PROG_5'), +(-1609033,'I want to die like an orc...',0,0,0,25,'special_surprise SAY_EXEC_PROG_6'), +(-1609034,'Dis troll gonna stand for da...',0,0,0,25,'special_surprise SAY_EXEC_PROG_7'), +(-1609035,'$N?',0,0,0,1,'special_surprise SAY_EXEC_NAME_1'), +(-1609036,'$N? Mon?',0,0,0,1,'special_surprise SAY_EXEC_NAME_2'), +(-1609037,'$N, I\'d recognize that face anywhere... What... What have they done to you, $N?',0,0,0,1,'special_surprise SAY_EXEC_RECOG_1'), +(-1609038,'$N, I\'d recognize those face tentacles anywhere... What... What have they done to you, $N?',0,0,0,1,'special_surprise SAY_EXEC_RECOG_2'), +(-1609039,'$N, I\'d recognize that face anywhere... What... What have they done to ye, $Glad:lass;?',0,0,0,1,'special_surprise SAY_EXEC_RECOG_3'), +(-1609040,'$N, I\'d recognize that decay anywhere... What... What have they done to you, $N?',0,0,0,1,'special_surprise SAY_EXEC_RECOG_4'), +(-1609041,'$N, I\'d recognize those horns anywhere... What have they done to you, $N?',0,0,0,1,'special_surprise SAY_EXEC_RECOG_5'), +(-1609042,'$N, I\'d recognize dem tusks anywhere... What... What have dey done ta you, mon?',0,0,0,1,'special_surprise SAY_EXEC_RECOG_6'), +(-1609043,'You don\'t remember me, do you? Blasted Scourge... They\'ve tried to drain you of everything that made you a righteous force of reckoning. Every last ounce of good... Everything that made you a draenei!',0,0,0,1,'special_surprise SAY_EXEC_NOREM_1'), +(-1609044,'Ye don\'t remember me, do ye? Blasted Scourge... They\'ve tried to drain ye o\' everything that made ye a righteous force o\' reckoning. Every last ounce o\' good... Everything that made you a $Gson:daughter; of Ironforge!',0,0,0,1,'special_surprise SAY_EXEC_NOREM_2'), +(-1609045,'You don\'t remember me, do you? We were humans once - long, long ago - until Lordaeron fell to the Scourge. Your transformation to a Scourge zombie came shortly after my own. Not long after that, our minds were freed by the Dark Lady.',0,0,0,1,'special_surprise SAY_EXEC_NOREM_3'), +(-1609046,'You don\'t remember me, do you? Blasted Scourge... They\'ve tried to drain you of everything that made you a pint-sized force of reckoning. Every last ounce of good... Everything that made you a gnome!',0,0,0,1,'special_surprise SAY_EXEC_NOREM_4'), +(-1609047,'You don\'t remember me, do you? Blasted Scourge...They\'ve tried to drain of everything that made you a righteous force of reckoning. Every last ounce of good...Everything that made you a human!',0,0,0,1,'special_surprise SAY_EXEC_NOREM_5'), +(-1609048,'You don\'t remember me? When you were a child your mother would leave you in my care while she served at the Temple of the Moon. I held you in my arms and fed you with honey and sheep\'s milk to calm you until she would return. You were my little angel. Blasted Scourge... What have they done to you, $N?',0,0,0,1,'special_surprise SAY_EXEC_NOREM_6'), +(-1609049,'You don\'t recognize me, do you? Blasted Scourge... They\'ve tried to drain you of everything that made you a righteous force of reckoning. Every last ounce of good... Everything that made you an orc!',0,0,0,1,'special_surprise SAY_EXEC_NOREM_7'), +(-1609050,'You don\'t remember me, do you? Blasted Scourge... They\'ve tried to drain you of everything that made you a righteous force of reckoning. Every last ounce of good... Everything that made you a tauren!',0,0,0,1,'special_surprise SAY_EXEC_NOREM_8'), +(-1609051,'You don\'t remember me, mon? Damn da Scourge! Dey gone ta drain you of everytin dat made ya a mojo masta. Every last ounce of good... Everytin\' dat made ya a troll hero, mon!',0,0,0,1,'special_surprise SAY_EXEC_NOREM_9'), +(-1609052,'A pact was made, $Gbrother:sister;! We vowed vengeance against the Lich King! For what he had done to us! We battled the Scourge as Forsaken, pushing them back into the plaguelands and freeing Tirisfal! You and I were champions of the Forsaken!',0,0,0,1,'special_surprise SAY_EXEC_THINK_1'), +(-1609053,'You must remember the splendor of life, $Gbrother:sister;. You were a champion of the Kaldorei once! This isn\'t you!',0,0,0,1,'special_surprise SAY_EXEC_THINK_2'), +(-1609054,'Think, $N. Think back. Try and remember the majestic halls of Silvermoon City, where you were born. Remember the splendor of life, $Gbrother:sister;. You were a champion of the sin\'dorei once! This isn\'t you.',0,0,0,6,'special_surprise SAY_EXEC_THINK_3'), +(-1609055,'Think, $N. Think back. Try and remember the proud mountains of Argus, where you were born. Remember the splendor of life, $Gbrother:sister;. You were a champion of the draenei once! This isn\'t you.',0,0,0,6,'special_surprise SAY_EXEC_THINK_4'), +(-1609056,'Think, $N. Think back. Try and remember the snow capped mountains o\' Dun Morogh! Ye were born there, $Glad:lass;. Remember the splendor o\' life, $N! Ye were a champion o\' the dwarves once! This isn\'t ye!',0,0,0,6,'special_surprise SAY_EXEC_THINK_5'), +(-1609057,'Think, $N. Think back. Try and remember Gnomeregan before those damned troggs! Remember the feel of an [arclight spanner] $Gbrother:sister;. You were a champion of gnome-kind once! This isn\'t you.',0,0,0,6,'special_surprise SAY_EXEC_THINK_6'), +(-1609058,'Think, $N. Think back. Try and remember the hills and valleys of Elwynn, where you were born. Remember the splendor of life, $Gbrother:sister;. You were a champion of the Alliance once! This isn\'t you.',0,0,0,6,'special_surprise SAY_EXEC_THINK_7'), +(-1609059,'Think, $N. Think back. Try and remember Durotar, $Gbrother:sister;! Remember the sacrifices our heroes made so that we could be free of the blood curse. Harken back to the Valley of Trials, where we were reborn into a world without demonic influence. We found the splendor of life, $N. Together! This isn\'t you. You were a champion of the Horde once!',0,0,0,6,'special_surprise SAY_EXEC_THINK_8'), +(-1609060,'Think, $N. Think back. Try and remember the rolling plains of Mulgore, where you were born. Remember the splendor of life, $Gbrother:sister;. You were a champion of the tauren once! This isn\'t you.',0,0,0,6,'special_surprise SAY_EXEC_THINK_9'), +(-1609061,'TINK $N. Tink back, mon! We be Darkspear, mon! Bruddas and sistas! Remember when we fought the Zalazane and done took he head and freed da Echo Isles? MON! TINK! You was a champion of da Darkspear trolls!',0,0,0,6,'special_surprise SAY_EXEC_THINK_10'), +(-1609062,'Listen to me, $N. You must fight against the Lich King\'s control. He is a monster that wants to see this world - our world - in ruin. Don\'t let him use you to accomplish his goals. You were once a hero and you can be again. Fight, damn you! Fight his control!',0,0,0,5,'special_surprise SAY_EXEC_LISTEN_1'), +(-1609063,'Listen to me, $N Ye must fight against the Lich King\'s control. He\'s a monster that wants to see this world - our world - in ruin. Don\'t let him use ye to accomplish his goals. Ye were once a hero and ye can be again. Fight, damn ye! Fight his control!',0,0,0,5,'special_surprise SAY_EXEC_LISTEN_2'), +(-1609064,'Listen to me, $N. You must fight against the Lich King\'s control. He is a monster that wants to see this world - our world - in ruin. Don\'t let him use you to accomplish his goals AGAIN. You were once a hero and you can be again. Fight, damn you! Fight his control!',0,0,0,5,'special_surprise SAY_EXEC_LISTEN_3'), +(-1609065,'Listen ta me, $Gbrudda:sista;. You must fight against da Lich King\'s control. He be a monstar dat want ta see dis world - our world - be ruined. Don\'t let he use you ta accomplish he goals. You be a hero once and you be a hero again! Fight it, mon! Fight he control!',0,0,0,5,'special_surprise SAY_EXEC_LISTEN_4'), +(-1609066,'What\'s going on in there? What\'s taking so long, $N?',0,1,0,0,'special_surprise SAY_PLAGUEFIST'), +(-1609067,'There... There\'s no more time for me. I\'m done for. Finish me off, $N. Do it or they\'ll kill us both. $N... Remember Silvermoon. This world is worth saving!',0,0,0,18,'special_surprise SAY_EXEC_TIME_1'), +(-1609068,'There... There\'s no more time for me. I\'m done for. Finish me off, $N. Do it or they\'ll kill us both. $N... Remember Argus. Don\'t let that happen to this world.',0,0,0,18,'special_surprise SAY_EXEC_TIME_2'), +(-1609069,'There... There\'s no more time for me. I\'m done for. Finish me off, $N. Do it or they\'ll kill us both $N... For KHAAAAAAAAZZZ MODAAAAAANNNNNN!!!',0,0,0,18,'special_surprise SAY_EXEC_TIME_3'), +(-1609070,'There... There\'s no more time for me. I\'m done for. Finish me off, $N. Do it or they\'ll kill us both. $N... Remember Tirisfal! This world is worth saving!',0,0,0,18,'special_surprise SAY_EXEC_TIME_4'), +(-1609071,'There... There\'s no more time for me. I\'m done for. Finish me off, $N. Do it or they\'ll kill us both. $N... Remember Gnomeregan! This world is worth saving.',0,0,0,18,'special_surprise SAY_EXEC_TIME_5'), +(-1609072,'There... There\'s no more time for me. I\'m done for. FInish me off, $N. Do it or they\'ll kill us both. $N...Remember Elwynn. This world is worth saving.',0,0,0,18,'special_surprise SAY_EXEC_TIME_6'), +(-1609073,'There... There\'s no more time for me. I\'m done for. Finish me off, $N. Do it or they\'ll kill us both. $N... Remember Teldrassil, our beloved home. This world is worth saving.',0,0,0,18,'special_surprise SAY_EXEC_TIME_7'), +(-1609074,'There... There\'s no more time for me. I\'m done for. Finish me off, $N. Do it or they\'ll kill us both. $N... For the Horde! This world is worth saving.',0,0,0,18,'special_surprise SAY_EXEC_TIME_8'), +(-1609075,'There... There\'s no more time for me. I\'m done for. Finish me off, $N. Do it or they\'ll kill us both. $N... Remember Mulgore. This world is worth saving.',0,0,0,18,'special_surprise SAY_EXEC_TIME_9'), +(-1609076,'Der... Der\'s no more time for me. I be done for. Finish me off $N. Do it or they\'ll kill us both. $N... Remember Sen\'jin Village, mon! Dis world be worth saving!',0,0,0,18,'special_surprise SAY_EXEC_TIME_10'), +(-1609077,'Do it, $N! Put me out of my misery!',0,0,0,1,'special_surprise SAY_EXEC_WAITING'), +(-1609078,'dies from his wounds.',0,2,0,0,'special_surprise EMOTE_DIES'); diff --git a/sql/Updates/0.0.3/r1207_mangos.sql b/sql/Updates/0.0.3/r1207_mangos.sql new file mode 100644 index 000000000..89aa95b48 --- /dev/null +++ b/sql/Updates/0.0.3/r1207_mangos.sql @@ -0,0 +1,9 @@ +UPDATE instance_template SET script='instance_halls_of_lightning' WHERE map=602; +UPDATE creature_template SET ScriptName='boss_bjarngrim' WHERE entry=28586; +UPDATE creature_template SET ScriptName='mob_stormforged_lieutenant' WHERE entry=29240; +UPDATE creature_template SET ScriptName='boss_volkhan' WHERE entry=28587; +UPDATE creature_template SET ScriptName='mob_molten_golem' WHERE entry=28695; +UPDATE creature_template SET ScriptName='npc_volkhan_anvil' WHERE entry=28823; +UPDATE creature_template SET ScriptName='boss_ionar' WHERE entry=28546; +UPDATE creature_template SET ScriptName='mob_spark_of_ionar' WHERE entry=28926; +UPDATE creature_template SET ScriptName='boss_loken' WHERE entry=28923; diff --git a/sql/Updates/0.0.3/r1207_scriptdev2.sql b/sql/Updates/0.0.3/r1207_scriptdev2.sql new file mode 100644 index 000000000..d7552d9ea --- /dev/null +++ b/sql/Updates/0.0.3/r1207_scriptdev2.sql @@ -0,0 +1,45 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1602042 AND -1602000; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1602000,'I am the greatest of my father\'s sons! Your end has come!',14149,1,0,0,'bjarngrim SAY_AGGRO'), +(-1602001,'So ends your curse!',14153,1,0,0,'bjarngrim SAY_SLAY_1'), +(-1602002,'Flesh... is... weak!',14154,1,0,0,'bjarngrim SAY_SLAY_2'), +(-1602003,'...',14155,1,0,0,'bjarngrim SAY_SLAY_3'), +(-1602004,'How can it be...? Flesh is not... stronger!',14156,1,0,0,'bjarngrim SAY_DEATH'), +(-1602005,'Defend yourself, for all the good it will do!',14151,1,0,0,'bjarngrim SAY_BATTLE_STANCE'), +(-1602006,'switches to Battle Stance!',0,3,0,0,'bjarngrim EMOTE_BATTLE_STANCE'), +(-1602007,'GRAAAAAH! Behold the fury of iron and steel!',14152,1,0,0,'bjarngrim SAY_BERSEKER_STANCE'), +(-1602008,'switches to Berserker Stance!',0,3,0,0,'bjarngrim EMOTE_BERSEKER_STANCE'), +(-1602009,'Give me your worst!',14150,1,0,0,'bjarngrim SAY_DEFENSIVE_STANCE'), +(-1602010,'switches to Defensive Stance!',0,3,0,0,'bjarngrim EMOTE_DEFENSIVE_STANCE'), +(-1602011,'You wish to confront the master? You must weather the storm!',14453,1,0,0,'ionar SAY_AGGRO'), +(-1602012,'Shocking ... I know!',14456,1,0,0,'ionar SAY_SLAY_1'), +(-1602013,'You atempt the unpossible.',14457,1,0,0,'ionar SAY_SLAY_2'), +(-1602014,'Your spark of light is ... extinguish.',14458,1,0,0,'ionar SAY_SLAY_3'), +(-1602015,'Master... you have guests.',14459,1,0,0,'ionar SAY_DEATH'), +(-1602016,'The slightest spark shall be your undoing.',14454,1,0,0,'ionar SAY_SPLIT_1'), +(-1602017,'No one is safe!',14455,1,0,0,'ionar SAY_SPLIT_2'), +(-1602018,'What hope is there for you? None!',14162,1,0,0,'loken SAY_AGGRO0'), +(-1602019,'I have witnessed the rise and fall of empires. The birth and extinction of entire species. Over countless millennia the foolishness of mortals has remained beyond a constant. Your presence here confirms this.',14160,1,0,0,'loken SAY_INTRO_1'), +(-1602020,'My master has shown me the future, and you have no place in it. Azeroth will be reborn in darkness. Yogg-Saron shall be released! The Pantheon shall fall!',14162,1,0,0,'loken SAY_INTRO_2'), +(-1602021,'Only mortal...',14166,1,0,0,'loken SAY_SLAY_1'), +(-1602022,'I... am... FOREVER!',14167,1,0,0,'loken SAY_SLAY_2'), +(-1602023,'What little time you had, you wasted!',14168,1,0,0,'loken SAY_SLAY_3'), +(-1602024,'My death... heralds the end of this world.',14172,1,0,0,'loken SAY_DEATH'), +(-1602025,'You cannot hide from fate!',14163,1,0,0,'loken SAY_NOVA_1'), +(-1602026,'Come closer. I will make it quick.',14164,1,0,0,'loken SAY_NOVA_2'), +(-1602027,'Your flesh cannot hold out for long.',14165,1,0,0,'loken SAY_NOVA_3'), +(-1602028,'You stare blindly into the abyss!',14169,1,0,0,'loken SAY_75HEALTH'), +(-1602029,'Your ignorance is profound. Can you not see where this path leads?',14170,1,0,0,'loken SAY_50HEALTH'), +(-1602030,'You cross the precipice of oblivion!',14171,1,0,0,'loken SAY_25HEALTH'), +(-1602031,'begins to cast Lightning Nova!',0,3,0,0,'loken EMOTE_NOVA'), +(-1602032,'It is you who have destroyed my children? You... shall... pay!',13960,1,0,0,'volkhan SAY_AGGRO'), +(-1602033,'The armies of iron will conquer all!',13965, 1,0,0,'volkhan SAY_SLAY_1'), +(-1602034,'Ha, pathetic!',13966,1,0,0,'volkhan SAY_SLAY_2'), +(-1602035,'You have cost me too much work!',13967,1,0,0,'volkhan SAY_SLAY_3'), +(-1602036,'The master was right... to be concerned.',13968,1,0,0,'volkhan SAY_DEATH'), +(-1602037,'I will crush you beneath my boots!',13963,1,0,0,'volkhan SAY_STOMP_1'), +(-1602038,'All my work... undone!',13964,1,0,0,'volkhan SAY_STOMP_2'), +(-1602039,'Life from the lifelessness... death for you.',13961,1,0,0,'volkhan SAY_FORGE_1'), +(-1602040,'Nothing is wasted in the process. You will see....',13962,1,0,0,'volkhan SAY_FORGE_2'), +(-1602041,'runs to his anvil!',0,3,0,0,'volkhan EMOTE_TO_ANVIL'), +(-1602042,'prepares to shatter his Brittle Golems!',0,3,0,0,'volkhan EMOTE_SHATTER'); diff --git a/sql/Updates/0.0.3/r1210_mangos.sql b/sql/Updates/0.0.3/r1210_mangos.sql new file mode 100644 index 000000000..80e81176c --- /dev/null +++ b/sql/Updates/0.0.3/r1210_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='boss_brutallus' WHERE entry=24882; diff --git a/sql/Updates/0.0.3/r1212_mangos.sql b/sql/Updates/0.0.3/r1212_mangos.sql new file mode 100644 index 000000000..ecc5803fc --- /dev/null +++ b/sql/Updates/0.0.3/r1212_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_kaya' WHERE entry=11856; diff --git a/sql/Updates/0.0.3/r1212_scriptdev2.sql b/sql/Updates/0.0.3/r1212_scriptdev2.sql new file mode 100644 index 000000000..15214ed25 --- /dev/null +++ b/sql/Updates/0.0.3/r1212_scriptdev2.sql @@ -0,0 +1,27 @@ +DELETE FROM script_waypoint WHERE entry=11856; +INSERT INTO script_waypoint VALUES +(11856, 0, 113.91, -350.13, 4.55, 0, ''), +(11856, 1, 109.54, -350.08, 3.74, 0, ''), +(11856, 2, 106.95, -353.40, 3.60, 0, ''), +(11856, 3, 100.28, -338.89, 2.97, 0, ''), +(11856, 4, 110.11, -320.26, 3.47, 0, ''), +(11856, 5, 109.78, -287.80, 5.30, 0, ''), +(11856, 6, 105.02, -269.71, 4.71, 0, ''), +(11856, 7, 86.71, -251.81, 5.34, 0, ''), +(11856, 8, 64.10, -246.38, 5.91, 0, ''), +(11856, 9, -2.55, -243.58, 6.3, 0, ''), +(11856, 10, -27.78, -267.53, -1.08, 0, ''), +(11856, 11, -31.27, -283.54, -4.36, 0, ''), +(11856, 12, -28.96, -322.44, -9.19, 0, ''), +(11856, 13, -35.63, -360.03, -16.59, 0, ''), +(11856, 14, -58.30, -412.26, -30.60, 0, ''), +(11856, 15, -58.88, -474.17, -44.54, 0, ''), +(11856, 16, -45.92, -496.57, -46.26, 5000, 'AMBUSH'), +(11856, 17, -40.25, -510.07, -46.05, 0, ''), +(11856, 18, -38.88, -520.72, -46.06, 5000, 'END'); + +DELETE FROM script_texts WHERE entry BETWEEN -1000359 AND -1000357; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000357,'Let\'s go before they find out I\'m free!',0,0,0,1,'KAYA_SAY_START'), +(-1000358,'Look out! We\'re under attack!',0,0,0,0,'KAYA_AMBUSH'), +(-1000359,'Thank you for helping me. I know my way back from here.',0,0,0,0,'KAYA_END'); diff --git a/sql/Updates/0.0.3/r1215_mangos.sql b/sql/Updates/0.0.3/r1215_mangos.sql new file mode 100644 index 000000000..93432dc46 --- /dev/null +++ b/sql/Updates/0.0.3/r1215_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_koltira_deathweaver' WHERE entry=28912; diff --git a/sql/Updates/0.0.3/r1215_scriptdev2.sql b/sql/Updates/0.0.3/r1215_scriptdev2.sql new file mode 100644 index 000000000..1d2512ec3 --- /dev/null +++ b/sql/Updates/0.0.3/r1215_scriptdev2.sql @@ -0,0 +1,26 @@ +DELETE FROM script_waypoint WHERE entry=28912; +INSERT INTO script_waypoint VALUES +(28912, 0, 1653.518, -6038.374, 127.585, 0, 'Jump off'), +(28912, 1, 1653.978, -6034.614, 127.585, 5000, 'To Box'), +(28912, 2, 1653.854, -6034.726, 127.585, 500, 'Equip'), +(28912, 3, 1652.297, -6035.671, 127.585, 3000, 'Recover'), +(28912, 4, 1639.762, -6046.343, 127.948, 0, 'Escape'), +(28912, 5, 1640.963, -6028.119, 134.740, 0, ''), +(28912, 6, 1625.805, -6029.197, 134.740, 0, ''), +(28912, 7, 1626.845, -6015.085, 134.740, 0, ''), +(28912, 8, 1649.150, -6016.975, 133.240, 0, ''), +(28912, 9, 1653.063, -5974.844, 132.652, 5000, 'Mount'), +(28912, 10, 1654.747, -5926.424, 121.191, 0, 'Disappear'); + +DELETE FROM script_texts WHERE entry BETWEEN -1609088 AND -1609079; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1609079, 'I\'ll need to get my runeblade and armor... Just need a little more time.',0,0,0,399,'koltira SAY_BREAKOUT1'), +(-1609080, 'I\'m still weak, but I think I can get an anti-magic barrier up. Stay inside it or you\'ll be destroyed by their spells.',0,0,0,0,'koltira SAY_BREAKOUT2'), +(-1609081, 'Maintaining this barrier will require all of my concentration. Kill them all!',0,0,0,16,'koltira SAY_BREAKOUT3'), +(-1609082, 'There are more coming. Defend yourself! Don\'t fall out of the anti-magic field! They\'ll tear you apart without its protection!',0,0,0,0,'koltira SAY_BREAKOUT4'), +(-1609083, 'I can\'t keep barrier up much longer... Where is that coward?',0,0,0,0,'koltira SAY_BREAKOUT5'), +(-1609084, 'The High Inquisitor comes! Be ready, death knight! Do not let him draw you out of the protective bounds of my anti-magic field! Kill him and take his head!',0,0,0,0,'koltira SAY_BREAKOUT6'), +(-1609085, 'Stay in the anti-magic field! Make them come to you!',0,0,0,0,'koltira SAY_BREAKOUT7'), +(-1609086, 'The death of the High Inquisitor of New Avalon will not go unnoticed. You need to get out of here at once! Go, before more of them show up. I\'ll be fine on my own.',0,0,0,0,'koltira SAY_BREAKOUT8'), +(-1609087, 'I\'ll draw their fire, you make your escape behind me.',0,0,0,0,'koltira SAY_BREAKOUT9'), +(-1609088, 'Your High Inquisitor is nothing more than a pile of meat, Crusaders! There are none beyond the grasp of the Scourge!',0,1,0,0,'koltira SAY_BREAKOUT10'); diff --git a/sql/Updates/0.0.3/r1218_scriptdev2.sql b/sql/Updates/0.0.3/r1218_scriptdev2.sql new file mode 100644 index 000000000..4b9068059 --- /dev/null +++ b/sql/Updates/0.0.3/r1218_scriptdev2.sql @@ -0,0 +1,57 @@ +UPDATE script_texts SET content_default='%s goes into a killing frenzy!' WHERE entry=-1000001; +UPDATE script_texts SET content_default='%s goes into a frenzy!' WHERE entry=-1000002; +UPDATE script_texts SET content_default='%s becomes enraged!' WHERE entry=-1000003; +UPDATE script_texts SET content_default='%s goes into a berserker rage!' WHERE entry=-1000004; +UPDATE script_texts SET content_default='%s hugs her father.' WHERE entry=-1000116; +UPDATE script_texts SET content_default='%s looks up at you quizzically. Maybe you should inspect it?' WHERE entry=-1000204; +UPDATE script_texts SET content_default='%s looks at you unexpectadly.' WHERE entry=-1000205; +UPDATE script_texts SET content_default='%s starts pecking at the feed.' WHERE entry=-1000206; +UPDATE script_texts SET content_default='Warning! %s emergency shutdown process initiated by $N. Shutdown will complete in two minutes.' WHERE entry=-1000211; +UPDATE script_texts SET content_default='%s begins tinkering with the goggles before the stone.' WHERE entry=-1000267; +UPDATE script_texts SET content_default='%s hands one glowing goggles over to Doctor Draxlegauge.' WHERE entry=-1000272; +UPDATE script_texts SET content_default='%s growls in acknowledgement before straightening and making her way off into the forest.' WHERE entry=-1000324; +UPDATE script_texts SET content_default='%s becomes enraged!' WHERE entry=-1189004; +UPDATE script_texts SET content_default='%s takes in a deep breath...' WHERE entry=-1249004; +UPDATE script_texts SET content_default='%s goes into a frenzy!' WHERE entry=-1269018; +UPDATE script_texts SET content_default='%s performs one last service for Ragnaros.' WHERE entry=-1409000; +UPDATE script_texts SET content_default='%s goes into a killing frenzy!' WHERE entry=-1409001; +UPDATE script_texts SET content_default='%s refuses to die while its master is in trouble.' WHERE entry=-1409002; +UPDATE script_texts SET content_default='%s goes into a killing frenzy!' WHERE entry=-1469002; +UPDATE script_texts SET content_default='%s flinches as its skin shimmers.' WHERE entry=-1469003; +UPDATE script_texts SET content_default='%s goes into a frenzy!' WHERE entry=-1469031; +UPDATE script_texts SET content_default='%s senses your fear.' WHERE entry=-1509000; +UPDATE script_texts SET content_default='%s bristles with energy!' WHERE entry=-1509001; +UPDATE script_texts SET content_default='%s sets eyes on $N!' WHERE entry=-1509002; +UPDATE script_texts SET content_default='%s is weakened!' WHERE entry=-1531011; +UPDATE script_texts SET content_default='%s begins to rust.' WHERE entry=-1532038; +UPDATE script_texts SET content_default='%s cries out in withdrawal, opening gates to the warp.' WHERE entry=-1532089; +UPDATE script_texts SET content_default='%s goes into a nether-fed rage!' WHERE entry=-1532090; +UPDATE script_texts SET content_default='%s goes into a berserker rage!' WHERE entry=-1533021; +UPDATE script_texts SET content_default='%s becomes enraged!' WHERE entry=-1533022; +UPDATE script_texts SET content_default='%s takes in a deep breath...' WHERE entry=-1533082; +UPDATE script_texts SET content_default='%s enrages!' WHERE entry=-1533083; +UPDATE script_texts SET content_default='%s enrages!' WHERE entry=-1540041; +UPDATE script_texts SET content_default='%s becomes enraged!' WHERE entry=-1544012; +UPDATE script_texts SET content_default='%s begins to cast Blast Nova!' WHERE entry=-1544013; +UPDATE script_texts SET content_default='%s\'s bonds begin to weaken!' WHERE entry=-1544014; +UPDATE script_texts SET content_default='%s breaks free!' WHERE entry=-1544015; +UPDATE script_texts SET content_default='%s sends his enemies to their watery graves!' WHERE entry=-1548039; +UPDATE script_texts SET content_default='%s summons Watery Globules!' WHERE entry=-1548041; +UPDATE script_texts SET content_default='%s sets his gaze on $N!' WHERE entry=-1550037; +UPDATE script_texts SET content_default='%s emits a strange noise.' WHERE entry=-1553006; +UPDATE script_texts SET content_default='%s draws energy from the air.' WHERE entry=-1555036; +UPDATE script_texts SET content_default='%s begins to channel arcane energy...' WHERE entry=-1556015; +UPDATE script_texts SET content_default='%s shifts into the void...' WHERE entry=-1557014; +UPDATE script_texts SET content_default='%s grows in size!' WHERE entry=-1565019; +UPDATE script_texts SET content_default='%s begins to channel from the nearby Fel Crystal...' WHERE entry=-1585006; +UPDATE script_texts SET content_default='%s discharges pure energy!' WHERE entry=-1585011; +UPDATE script_texts SET content_default='%s switches to Berserker Stance!' WHERE entry=-1602008; +UPDATE script_texts SET content_default='%s switches to Defensive Stance!' WHERE entry=-1602010; +UPDATE script_texts SET content_default='%s switches to Battle Stance!' WHERE entry=-1602006; +UPDATE script_texts SET content_default='%s begins to cast Lightning Nova!' WHERE entry=-1602031; +UPDATE script_texts SET content_default='%s runs to his anvil!' WHERE entry=-1602041; +UPDATE script_texts SET content_default='%s prepares to shatter his Brittle Golems!' WHERE entry=-1602042; +UPDATE script_texts SET content_default='%s dies from his wounds.' WHERE entry=-1609078; +UPDATE script_texts SET content_default='%s puts the shell to his ear.' WHERE entry=-1000185; +UPDATE script_texts SET content_default='%s kneels down and pick up the amulet.' WHERE entry=-1000197; +UPDATE script_texts SET content_default='%s raises his hammer menacingly...' WHERE entry=-1554012; diff --git a/sql/Updates/0.0.3/r1221_mangos.sql b/sql/Updates/0.0.3/r1221_mangos.sql new file mode 100644 index 000000000..757d5bac7 --- /dev/null +++ b/sql/Updates/0.0.3/r1221_mangos.sql @@ -0,0 +1,4 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=13936; + +DELETE FROM areatrigger_scripts WHERE entry=3066; +INSERT INTO areatrigger_scripts VALUES (3066,'at_ravenholdt'); diff --git a/sql/Updates/0.0.3/r1221_scriptdev2.sql b/sql/Updates/0.0.3/r1221_scriptdev2.sql new file mode 100644 index 000000000..cac2208ae --- /dev/null +++ b/sql/Updates/0.0.3/r1221_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 8190+) '; diff --git a/sql/Updates/0.0.3/r1222_scriptdev2.sql b/sql/Updates/0.0.3/r1222_scriptdev2.sql new file mode 100644 index 000000000..2251758a6 --- /dev/null +++ b/sql/Updates/0.0.3/r1222_scriptdev2.sql @@ -0,0 +1,12 @@ +DELETE FROM script_waypoint WHERE entry=16812; +INSERT INTO script_waypoint VALUES +(16812, 0, -10868.260, -1779.836, 90.476, 2500, 'Open door, begin walking'), +(16812, 1, -10875.585, -1779.581, 90.478, 0, ''), +(16812, 2, -10887.447, -1779.258, 90.476, 0, ''), +(16812, 3, -10894.592, -1780.668, 90.476, 0, ''), +(16812, 4, -10895.015, -1782.036, 90.476, 2500, 'Begin Speech after this'), +(16812, 5, -10894.592, -1780.668, 90.476, 0, 'Resume walking (back to spawn point now) after speech'), +(16812, 6, -10887.447, -1779.258, 90.476, 0, ''), +(16812, 7, -10875.585, -1779.581, 90.478, 0, ''), +(16812, 8, -10868.260, -1779.836, 90.476, 5000, 'close door'), +(16812, 9, -10866.799, -1780.958, 90.470, 2000, 'Summon mobs, open curtains'); diff --git a/sql/Updates/0.0.3/r1234_mangos.sql b/sql/Updates/0.0.3/r1234_mangos.sql new file mode 100644 index 000000000..db07cfd2b --- /dev/null +++ b/sql/Updates/0.0.3/r1234_mangos.sql @@ -0,0 +1 @@ +UPDATE gameobject_template SET ScriptName='go_gong_of_bethekk' WHERE entry=180526; diff --git a/sql/Updates/0.0.3/r1241_scriptdev2.sql b/sql/Updates/0.0.3/r1241_scriptdev2.sql new file mode 100644 index 000000000..d5839ff6d --- /dev/null +++ b/sql/Updates/0.0.3/r1241_scriptdev2.sql @@ -0,0 +1,4 @@ +DELETE FROM script_texts WHERE entry IN (-1000360, -1000361); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000360,'The strands of LIFE have been severed! The Dreamers must be avenged!',0,1,0,0,' ysondre SAY_AGGRO'), +(-1000361,'Come forth, ye Dreamers and claim your vengeance!',0,1,0,0,' ysondre SAY_SUMMONDRUIDS'); diff --git a/sql/Updates/0.0.3/r1242_mangos.sql b/sql/Updates/0.0.3/r1242_mangos.sql new file mode 100644 index 000000000..3c9a6a8c2 --- /dev/null +++ b/sql/Updates/0.0.3/r1242_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_paoka_swiftmountain' WHERE entry=10427; diff --git a/sql/Updates/0.0.3/r1242_scriptdev2.sql b/sql/Updates/0.0.3/r1242_scriptdev2.sql new file mode 100644 index 000000000..3327fb00f --- /dev/null +++ b/sql/Updates/0.0.3/r1242_scriptdev2.sql @@ -0,0 +1,36 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000364 AND -1000362; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000362,'Let\'s go $N. I am ready to reach Whitereach Post.',0,0,1,0,'paoka SAY_START'), +(-1000363,'Now this looks familiar. If we keep heading east, I think we can... Ahh, Wyvern on the attack!',0,0,1,0,'paoka SAY_WYVERN'), +(-1000364,'Thanks a bunch... I can find my way back to Whitereach Post from here. Be sure to talk with Motega Firemane; perhaps you can keep him from sending me home.',0,0,1,0,'paoka SAY_COMPLETE'); + +DELETE FROM script_waypoint WHERE entry=10427; +INSERT INTO script_waypoint VALUES +(10427, 0, -5185.463, -1185.927, 45.951, 0, ''), +(10427, 1, -5184.880, -1154.210, 45.035, 0, ''), +(10427, 2, -5175.880, -1126.526, 43.701, 0, ''), +(10427, 3, -5138.651, -1111.874, 44.024, 0, ''), +(10427, 4, -5134.728, -1104.796, 47.365, 0, ''), +(10427, 5, -5129.681, -1097.878, 49.449, 2500, ''), +(10427, 6, -5125.303, -1080.572, 47.033, 0, ''), +(10427, 7, -5146.668, -1053.694, 28.415, 0, ''), +(10427, 8, -5147.463, -1027.539, 13.818, 0, ''), +(10427, 9, -5139.238, -1018.889, 8.220, 0, ''), +(10427, 10, -5121.168, -1013.126, -0.619, 0, ''), +(10427, 11, -5091.919, -1014.205, -4.902, 0, ''), +(10427, 12, -5069.240, -994.299, -4.631, 0, ''), +(10427, 13, -5059.975, -944.112, -5.377, 0, ''), +(10427, 14, -5013.546, -906.184, -5.490, 0, ''), +(10427, 15, -4992.461, -920.983, -4.980, 5000, 'SAY_WYVERN'), +(10427, 16, -4976.355, -1002.997, -5.380, 0, ''), +(10427, 17, -4958.478, -1033.185, -5.433, 0, ''), +(10427, 18, -4953.353, -1052.211, -10.836, 0, ''), +(10427, 19, -4937.447, -1056.351, -22.139, 0, ''), +(10427, 20, -4908.455, -1050.433, -33.458, 0, ''), +(10427, 21, -4905.530, -1056.885, -33.722, 0, ''), +(10427, 22, -4920.830, -1073.284, -45.515, 0, ''), +(10427, 23, -4933.368, -1082.700, -50.186, 0, ''), +(10427, 24, -4935.313, -1092.353, -52.785, 0, ''), +(10427, 25, -4929.553, -1101.268, -50.637, 0, ''), +(10427, 26, -4920.679, -1100.028, -51.944, 10000, 'SAY_COMPLETE'), +(10427, 27, -4920.679, -1100.028, -51.944, 0, 'quest complete'); diff --git a/sql/Updates/0.0.3/r1243_mangos.sql b/sql/Updates/0.0.3/r1243_mangos.sql new file mode 100644 index 000000000..fc97af61c --- /dev/null +++ b/sql/Updates/0.0.3/r1243_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_lakota_windsong' WHERE entry=10646; diff --git a/sql/Updates/0.0.3/r1243_scriptdev2.sql b/sql/Updates/0.0.3/r1243_scriptdev2.sql new file mode 100644 index 000000000..dec541c22 --- /dev/null +++ b/sql/Updates/0.0.3/r1243_scriptdev2.sql @@ -0,0 +1,56 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000369 AND -1000365; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000365,'Be on guard... Arnak has some strange power over the Grimtotem... they will not be happy to see me escape.',0,0,1,0,'lakota SAY_LAKO_START'), +(-1000366,'Look out, the Grimtotem are upon us!',0,0,1,0,'lakota SAY_LAKO_LOOK_OUT'), +(-1000367,'Here they come.',0,0,1,0,'lakota SAY_LAKO_HERE_COME'), +(-1000368,'More Grimtotems are coming this way!',0,0,1,0,'lakota SAY_LAKO_MORE'), +(-1000369,'Finally, free at last... I must be going now, thanks for helping me escape. I can get back to Freewind Post by myself.',0,0,1,0,'lakota SAY_LAKO_END'); + +DELETE FROM script_waypoint WHERE entry=10646; +INSERT INTO script_waypoint VALUES +(10646, 0, -4792.401855, -2137.775146, 82.423, 0, ''), +(10646, 1, -4813.508301, -2141.543457, 80.774, 0, ''), +(10646, 2, -4828.630859, -2154.309814, 82.074, 0, ''), +(10646, 3, -4833.772949, -2149.182617, 81.676, 0, ''), +(10646, 4, -4846.418945, -2136.045410, 77.871, 0, ''), +(10646, 5, -4865.076660, -2116.549561, 76.483, 0, ''), +(10646, 6, -4888.434570, -2090.729248, 80.907, 0, ''), +(10646, 7, -4893.068359, -2085.468994, 82.094, 0, ''), +(10646, 8, -4907.256836, -2074.929932, 84.437, 5000, 'SAY_LAKO_LOOK_OUT'), +(10646, 9, -4899.899902, -2062.143555, 83.780, 0, ''), +(10646, 10, -4897.762207, -2056.520020, 84.184, 0, ''), +(10646, 11, -4888.331543, -2033.182495, 83.654, 0, ''), +(10646, 12, -4876.343750, -2003.916138, 90.887, 0, ''), +(10646, 13, -4872.227051, -1994.173340, 91.513, 0, ''), +(10646, 14, -4879.569336, -1976.985229, 92.185, 5000, 'SAY_LAKO_HERE_COME'), +(10646, 15, -4879.049316, -1964.349609, 92.001, 0, ''), +(10646, 16, -4874.720215, -1956.939819, 90.737, 0, ''), +(10646, 17, -4869.474609, -1952.612671, 89.206, 0, ''), +(10646, 18, -4842.466797, -1929.000732, 84.147, 0, ''), +(10646, 19, -4804.444824, -1897.302734, 89.362, 0, ''), +(10646, 20, -4798.072754, -1892.383545, 89.368, 0, ''), +(10646, 21, -4779.447754, -1882.759155, 90.169, 5000, 'SAY_LAKO_MORE'), +(10646, 22, -4762.081055, -1866.530640, 89.481, 0, ''), +(10646, 23, -4766.267090, -1861.867798, 87.847, 0, ''), +(10646, 24, -4782.929688, -1852.174683, 78.354, 0, ''), +(10646, 25, -4793.605469, -1850.961182, 77.658, 0, ''), +(10646, 26, -4803.323730, -1855.102661, 78.958, 0, ''), +(10646, 27, -4807.971680, -1854.501221, 77.743, 0, ''), +(10646, 28, -4837.212891, -1848.493408, 64.488, 0, ''), +(10646, 29, -4884.619629, -1840.401123, 56.219, 0, ''), +(10646, 30, -4889.705566, -1839.623291, 54.417, 0, ''), +(10646, 31, -4893.904297, -1843.685791, 53.012, 0, ''), +(10646, 32, -4903.142090, -1872.383545, 32.266, 0, ''), +(10646, 33, -4910.940918, -1879.864868, 29.940, 0, ''), +(10646, 34, -4920.047363, -1880.940796, 30.597, 0, ''), +(10646, 35, -4924.457031, -1881.447144, 29.292, 0, ''), +(10646, 36, -4966.120117, -1886.033081, 10.977, 0, ''), +(10646, 37, -4999.369629, -1890.847290, 4.430, 0, ''), +(10646, 38, -5007.271484, -1891.669678, 2.771, 0, ''), +(10646, 39, -5013.334473, -1879.588257, -1.947, 0, ''), +(10646, 40, -5023.328613, -1855.959961, -17.103, 0, ''), +(10646, 41, -5038.513184, -1825.986694, -35.821, 0, ''), +(10646, 42, -5048.733887, -1809.798218, -46.457, 0, ''), +(10646, 43, -5053.188965, -1791.682983, -57.186, 0, ''), +(10646, 44, -5062.093750, -1794.399780, -56.515, 0, ''), +(10646, 45, -5052.657227, -1797.044800, -54.734, 5000, 'SAY_LAKO_END'); diff --git a/sql/Updates/0.0.3/r1249_mangos.sql b/sql/Updates/0.0.3/r1249_mangos.sql new file mode 100644 index 000000000..060287a6f --- /dev/null +++ b/sql/Updates/0.0.3/r1249_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_gilthares' WHERE entry=3465; diff --git a/sql/Updates/0.0.3/r1249_scriptdev2.sql b/sql/Updates/0.0.3/r1249_scriptdev2.sql new file mode 100644 index 000000000..9cdcfdf47 --- /dev/null +++ b/sql/Updates/0.0.3/r1249_scriptdev2.sql @@ -0,0 +1,70 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000380 AND -1000370; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000370,'Stay close, $n. I\'ll need all the help I can get to break out of here. Let\'s go!',0,0,1,1,'gilthares SAY_GIL_START'), +(-1000371,'At last! Free from Northwatch Hold! I need a moment to catch my breath...',0,0,1,5,'gilthares SAY_GIL_AT_LAST'), +(-1000372,'Now i feel better. Let\'s get back to Ratchet. Come on, $n.',0,0,1,23,'gilthares SAY_GIL_PROCEED'), +(-1000373,'Looks like the Southsea Freeboters are heavily entrenched on the coast. This could get rough.',0,0,1,25,'gilthares SAY_GIL_FREEBOOTERS'), +(-1000374,'Help! $C attacking!',0,0,1,0,'gilthares SAY_GIL_AGGRO_1'), +(-1000375,'$C heading this way fast! Time for revenge!',0,0,1,0,'gilthares SAY_GIL_AGGRO_2'), +(-1000376,'$C coming right at us!',0,0,1,0,'gilthares SAY_GIL_AGGRO_3'), +(-1000377,'Get this $C off of me!',0,0,1,0,'gilthares SAY_GIL_AGGRO_4'), +(-1000378,'Almost back to Ratchet! Let\'s keep up the pace...',0,0,1,0,'gilthares SAY_GIL_ALMOST'), +(-1000379,'Ah, the sweet salt air of Ratchet.',0,0,1,0,'gilthares SAY_GIL_SWEET'), +(-1000380,'Captain Brightsun, $N here has freed me! $N, i am certain the Captain will reward your bravery.',0,0,1,66,'gilthares SAY_GIL_FREED'); + +DELETE FROM script_waypoint WHERE entry=3465; +INSERT INTO script_waypoint VALUES +(3465, 0, -2095.840820, -3650.001221, 61.716, 0, ''), +(3465, 1, -2100.193604, -3613.949219, 61.604, 0, ''), +(3465, 2, -2098.549561, -3601.557129, 59.154, 0, ''), +(3465, 3, -2093.796387, -3595.234375, 56.658, 0, ''), +(3465, 4, -2072.575928, -3578.827637, 48.844, 0, ''), +(3465, 5, -2023.858398, -3568.146240, 24.636, 0, ''), +(3465, 6, -2013.576416, -3571.499756, 22.203, 0, ''), +(3465, 7, -2009.813721, -3580.547852, 21.791, 0, ''), +(3465, 8, -2015.296021, -3597.387695, 21.760, 0, ''), +(3465, 9, -2020.677368, -3610.296143, 21.759, 0, ''), +(3465, 10, -2019.990845, -3640.155273, 21.759, 0, ''), +(3465, 11, -2016.110596, -3664.133301, 21.758, 0, ''), +(3465, 12, -1999.397095, -3679.435059, 21.316, 0, ''), +(3465, 13, -1987.455811, -3688.309326, 18.495, 0, ''), +(3465, 14, -1973.966553, -3687.666748, 14.996, 0, ''), +(3465, 15, -1949.163940, -3678.054932, 11.293, 0, ''), +(3465, 16, -1934.091187, -3682.859619, 9.897, 30000, 'SAY_GIL_AT_LAST'), +(3465, 17, -1935.383911, -3682.322021, 10.029, 1500, 'SAY_GIL_PROCEED'), +(3465, 18, -1879.039185, -3699.498047, 6.582, 7500, 'SAY_GIL_FREEBOOTERS'), +(3465, 19, -1852.728149, -3703.778809, 6.875, 0, ''), +(3465, 20, -1812.989990, -3718.500732, 10.572, 0, ''), +(3465, 21, -1788.171265, -3722.867188, 9.663, 0, ''), +(3465, 22, -1767.206665, -3739.923096, 10.082, 0, ''), +(3465, 23, -1750.194580, -3747.392090, 10.390, 0, ''), +(3465, 24, -1729.335571, -3776.665527, 11.779, 0, ''), +(3465, 25, -1715.997925, -3802.404541, 12.618, 0, ''), +(3465, 26, -1690.711548, -3829.262451, 13.905, 0, ''), +(3465, 27, -1674.700684, -3842.398682, 13.872, 0, ''), +(3465, 28, -1632.726318, -3846.109619, 14.401, 0, ''), +(3465, 29, -1592.734497, -3842.225342, 14.981, 0, ''), +(3465, 30, -1561.614746, -3839.320801, 19.118, 0, ''), +(3465, 31, -1544.567627, -3834.393311, 18.761, 0, ''), +(3465, 32, -1512.514404, -3831.715820, 22.914, 0, ''), +(3465, 33, -1486.889771, -3836.639893, 23.964, 0, ''), +(3465, 34, -1434.193604, -3852.702881, 18.843, 0, ''), +(3465, 35, -1405.794678, -3854.488037, 17.276, 0, ''), +(3465, 36, -1366.592041, -3852.383789, 19.273, 0, ''), +(3465, 37, -1337.360962, -3837.827148, 17.352, 2000, 'SAY_GIL_ALMOST'), +(3465, 38, -1299.744507, -3810.691406, 20.801, 0, ''), +(3465, 39, -1277.144409, -3782.785156, 25.918, 0, ''), +(3465, 40, -1263.686768, -3781.251953, 26.447, 0, ''), +(3465, 41, -1243.674438, -3786.328125, 25.281, 0, ''), +(3465, 42, -1221.875488, -3784.124512, 24.051, 0, ''), +(3465, 43, -1204.011230, -3775.943848, 24.437, 0, ''), +(3465, 44, -1181.706787, -3768.934082, 23.368, 0, ''), +(3465, 45, -1156.913818, -3751.559326, 21.074, 0, ''), +(3465, 46, -1138.830688, -3741.809326, 17.843, 0, ''), +(3465, 47, -1080.101196, -3738.780029, 19.805, 0, 'SAY_GIL_SWEET'), +(3465, 48, -1069.065186, -3735.006348, 19.302, 0, ''), +(3465, 49, -1061.941040, -3724.062256, 21.086, 0, ''), +(3465, 50, -1053.593262, -3697.608643, 27.320, 0, ''), +(3465, 51, -1044.110474, -3690.133301, 24.856, 0, ''), +(3465, 52, -1040.260986, -3690.739014, 25.342, 0, ''), +(3465, 53, -1028.146606, -3688.718750, 23.843, 7500, 'SAY_GIL_FREED'); diff --git a/sql/Updates/0.0.3/r1250_mangos.sql b/sql/Updates/0.0.3/r1250_mangos.sql new file mode 100644 index 000000000..adbb1087e --- /dev/null +++ b/sql/Updates/0.0.3/r1250_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_wilda' WHERE entry=21027; diff --git a/sql/Updates/0.0.3/r1250_scriptdev2.sql b/sql/Updates/0.0.3/r1250_scriptdev2.sql new file mode 100644 index 000000000..2d17c0623 --- /dev/null +++ b/sql/Updates/0.0.3/r1250_scriptdev2.sql @@ -0,0 +1,66 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000390 AND -1000381; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000381,'I sense the tortured spirits, $n. They are this way, come quickly!',0,0,0,1,'wilda SAY_WIL_START'), +(-1000382,'Watch out!',0,0,0,0,'wilda SAY_WIL_AGGRO1'), +(-1000383,'Naga attackers! Defend yourself!',0,0,0,0,'wilda SAY_WIL_AGGRO2'), +(-1000384,'Grant me protection $n, i must break trough their foul magic!',0,0,0,0,'wilda SAY_WIL_PROGRESS1'), +(-1000385,'The naga of Coilskar are exceptionally cruel to their prisoners. It is a miracle that I survived inside that watery prison for as long as I did. Earthmother be praised.',0,0,0,0,'wilda SAY_WIL_PROGRESS2'), +(-1000386,'Now we must find the exit.',0,0,0,0,'wilda SAY_WIL_FIND_EXIT'), +(-1000387,'Lady Vashj must answer for these atrocities. She must be brought to justice!',0,0,0,0,'wilda SAY_WIL_PROGRESS4'), +(-1000388,'The tumultuous nature of the great waterways of Azeroth and Draenor are a direct result of tormented water spirits.',0,0,0,0,'wilda SAY_WIL_PROGRESS5'), +(-1000389,'It shouldn\'t be much further, $n. The exit is just up ahead.',0,0,0,0,'wilda SAY_WIL_JUST_AHEAD'), +(-1000390,'Thank you, $n. Please return to my brethren at the Altar of Damnation, near the Hand of Gul\'dan, and tell them that Wilda is safe. May the Earthmother watch over you...',0,0,0,0,'wilda SAY_WIL_END'); + +DELETE FROM script_waypoint WHERE entry=21027; +INSERT INTO script_waypoint VALUES +(21027, 0, -2714.697266, 1326.879395, 34.306953, 0, ''), +(21027, 1, -2666.364990, 1348.222656, 34.445557, 0, ''), +(21027, 2, -2693.789307, 1336.964966, 34.445557, 0, ''), +(21027, 3, -2715.495361, 1328.054443, 34.106014, 0, ''), +(21027, 4, -2742.530762, 1314.138550, 33.606144, 0, ''), +(21027, 5, -2745.077148, 1311.108765, 33.630898, 0, ''), +(21027, 6, -2749.855225, 1302.737915, 33.475632, 0, ''), +(21027, 7, -2753.639648, 1294.059448, 33.314930, 0, ''), +(21027, 8, -2756.796387, 1285.122192, 33.391262, 0, ''), +(21027, 9, -2750.042969, 1273.661987, 33.188259, 0, ''), +(21027, 10, -2740.378418, 1258.846680, 33.212521, 0, ''), +(21027, 11, -2733.629395, 1248.259766, 33.640598, 0, ''), +(21027, 12, -2727.212646, 1238.606445, 33.520847, 0, ''), +(21027, 13, -2726.377197, 1237.264526, 33.461823, 3000, 'SAY_WIL_PROGRESS1'), +(21027, 14, -2746.383301, 1266.390625, 33.191952, 2000, ''), +(21027, 15, -2746.383301, 1266.390625, 33.191952, 4000, 'SAY_WIL_FIND_EXIT'), +(21027, 16, -2758.927734, 1285.134155, 33.341728, 0, ''), +(21027, 17, -2761.845703, 1292.313599, 33.209042, 0, ''), +(21027, 18, -2758.871826, 1300.677612, 33.285332, 0, ''), +(21027, 19, -2753.928955, 1307.755859, 33.452457, 0, ''), +(21027, 20, -2738.612061, 1316.191284, 33.482975, 0, ''), +(21027, 21, -2727.897461, 1320.013916, 33.381111, 0, ''), +(21027, 22, -2709.458740, 1315.739990, 33.301838, 0, ''), +(21027, 23, -2704.658936, 1301.620361, 32.463303, 0, ''), +(21027, 24, -2704.120117, 1298.922607, 32.768162, 0, ''), +(21027, 25, -2691.798340, 1292.846436, 33.852642, 0, ''), +(21027, 26, -2682.879639, 1288.853882, 32.995399, 0, ''), +(21027, 27, -2661.869141, 1279.682495, 26.686783, 0, ''), +(21027, 28, -2648.943604, 1270.272827, 24.147522, 0, ''), +(21027, 29, -2642.506836, 1262.938721, 23.512444, 0, ''), +(21027, 30, -2636.984863, 1252.429077, 20.418257, 0, ''), +(21027, 31, -2648.113037, 1224.984863, 8.691818, 0, ''), +(21027, 32, -2658.393311, 1200.136719, 5.492243, 0, ''), +(21027, 33, -2668.504395, 1190.450562, 3.127407, 0, ''), +(21027, 34, -2685.930420, 1174.360840, 5.163924, 0, ''), +(21027, 35, -2701.613770, 1160.026367, 5.611311, 0, ''), +(21027, 36, -2714.659668, 1149.980347, 4.342373, 0, ''), +(21027, 37, -2721.443359, 1145.002808, 1.913474, 0, ''), +(21027, 38, -2733.962158, 1143.436279, 2.620415, 0, ''), +(21027, 39, -2757.876709, 1146.937500, 6.184002, 2000, 'SAY_WIL_JUST_AHEAD'), +(21027, 40, -2772.300537, 1166.052734, 6.331811, 0, ''), +(21027, 41, -2790.265381, 1189.941650, 5.207958, 0, ''), +(21027, 42, -2805.448975, 1208.663940, 5.557623, 0, ''), +(21027, 43, -2820.617676, 1225.870239, 6.266103, 0, ''), +(21027, 44, -2831.926758, 1237.725830, 5.808506, 0, ''), +(21027, 45, -2842.578369, 1252.869629, 6.807481, 0, ''), +(21027, 46, -2846.344971, 1258.727295, 7.386168, 0, ''), +(21027, 47, -2847.556396, 1266.771729, 8.208790, 0, ''), +(21027, 48, -2841.654541, 1285.809204, 7.933223, 0, ''), +(21027, 49, -2841.754883, 1289.832520, 6.990304, 0, ''), +(21027, 50, -2871.398438, 1302.348145, 6.807335, 7500, 'SAY_WIL_END'); diff --git a/sql/Updates/0.0.3/r1251_scriptdev2.sql b/sql/Updates/0.0.3/r1251_scriptdev2.sql new file mode 100644 index 000000000..7e5c04a0c --- /dev/null +++ b/sql/Updates/0.0.3/r1251_scriptdev2.sql @@ -0,0 +1,11 @@ +DELETE FROM script_waypoint WHERE entry=18731; +INSERT INTO script_waypoint VALUES +(18731, 0, -157.366, 2.177, 8.073, 0, ''), +(18731, 1, -172.266, -18.280, 8.073, 0, ''), +(18731, 2, -171.051, -38.748, 8.073, 0, ''), +(18731, 3, -170.718, -59.436, 8.073, 0, ''), +(18731, 4, -156.659, -72.118, 8.073, 0, ''), +(18731, 5, -142.292, -59.423, 8.073, 0, ''), +(18731, 6, -141.779, -38.972, 8.073, 0, ''), +(18731, 7, -142.922, -18.950, 8.073, 0, ''), +(18731, 8, -157.366, 2.177, 8.073, 0, ''); diff --git a/sql/Updates/0.0.3/r1257_scriptdev2.sql b/sql/Updates/0.0.3/r1257_scriptdev2.sql new file mode 100644 index 000000000..557066467 --- /dev/null +++ b/sql/Updates/0.0.3/r1257_scriptdev2.sql @@ -0,0 +1,4 @@ +DELETE FROM script_waypoint WHERE entry=2768 AND pointid IN (0, 18); +INSERT INTO script_waypoint VALUES +(2768, 0, -2077.73, -2091.17, 9.49, 0, ''), +(2768, 18, -2077.73, -2091.17, 9.49, 0, ''); diff --git a/sql/Updates/0.0.3/r1258_mangos.sql b/sql/Updates/0.0.3/r1258_mangos.sql new file mode 100644 index 000000000..907f2612a --- /dev/null +++ b/sql/Updates/0.0.3/r1258_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_tooga' WHERE entry=5955; diff --git a/sql/Updates/0.0.3/r1258_scriptdev2.sql b/sql/Updates/0.0.3/r1258_scriptdev2.sql new file mode 100644 index 000000000..78ce85689 --- /dev/null +++ b/sql/Updates/0.0.3/r1258_scriptdev2.sql @@ -0,0 +1,10 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000398 AND -1000391; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000391,'I\'m Thirsty.',0,0,0,0,'tooga SAY_TOOG_THIRST'), +(-1000392,'Torta must be so worried.',0,0,0,0,'tooga SAY_TOOG_WORRIED'), +(-1000393,'Torta, my love! I have returned at long last.',0,0,0,0,'tooga SAY_TOOG_POST_1'), +(-1000394,'You have any idea how long I\'ve been waiting here? And where\'s dinner? All that time gone and nothing to show for it?',0,0,0,0,'tooga SAY_TORT_POST_2'), +(-1000395,'My dearest Torta. I have been gone for so long. Finally we are reunited. At long last our love can blossom again.',0,0,0,0,'tooga SAY_TOOG_POST_3'), +(-1000396,'Enough with the rambling. I am starving! Now, get your dusty shell into that ocean and bring momma some grub.',0,0,0,0,'tooga SAY_TORT_POST_4'), +(-1000397,'Yes Torta. Whatever your heart desires...',0,0,0,0,'tooga SAY_TOOG_POST_5'), +(-1000398,'And try not to get lost this time...',0,0,0,0,'tooga SAY_TORT_POST_6'); diff --git a/sql/Updates/0.0.3/r1260_scriptdev2.sql b/sql/Updates/0.0.3/r1260_scriptdev2.sql new file mode 100644 index 000000000..fb1b74b2d --- /dev/null +++ b/sql/Updates/0.0.3/r1260_scriptdev2.sql @@ -0,0 +1,6 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000402 AND -1000399; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000399,'Peace is but a fleeting dream! Let the NIGHTMARE reign!',0,1,0,0,'taerar SAY_AGGRO'), +(-1000400,'Children of Madness - I release you upon this world!',0,1,0,0,'taerar SAY_SUMMONSHADE'), +(-1000401,'Hope is a DISEASE of the soul! This land shall wither and die!',0,1,0,0,'emeriss SAY_AGGRO'), +(-1000402,'Taste your world\'s corruption!',0,1,0,0,'emeriss SAY_CASTCORRUPTION'); diff --git a/sql/Updates/0.0.3/r1261_mangos.sql b/sql/Updates/0.0.3/r1261_mangos.sql new file mode 100644 index 000000000..a1889199a --- /dev/null +++ b/sql/Updates/0.0.3/r1261_mangos.sql @@ -0,0 +1 @@ +UPDATE gameobject_template SET ScriptName='go_shadowforge_brazier' WHERE entry IN (174744, 174745); diff --git a/sql/Updates/0.0.3/r1263_mangos.sql b/sql/Updates/0.0.3/r1263_mangos.sql new file mode 100644 index 000000000..99529e603 --- /dev/null +++ b/sql/Updates/0.0.3/r1263_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry IN (9034, 9035, 9036, 9038, 9040); diff --git a/sql/Updates/0.0.3/r1265_mangos.sql b/sql/Updates/0.0.3/r1265_mangos.sql new file mode 100644 index 000000000..1961282a0 --- /dev/null +++ b/sql/Updates/0.0.3/r1265_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_rinji' WHERE entry=7780; diff --git a/sql/Updates/0.0.3/r1265_scriptdev2.sql b/sql/Updates/0.0.3/r1265_scriptdev2.sql new file mode 100644 index 000000000..0c88a293c --- /dev/null +++ b/sql/Updates/0.0.3/r1265_scriptdev2.sql @@ -0,0 +1,36 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000409 AND -1000403; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000403,'Rin\'ji is free!',0,0,0,0,'SAY_RIN_FREE'), +(-1000404,'Attack my sisters! The troll must not escape!',0,0,0,0,'SAY_RIN_BY_OUTRUNNER'), +(-1000405,'Rin\'ji needs help!',0,0,1,0,'SAY_RIN_HELP_1'), +(-1000406,'Rin\'ji is being attacked!',0,0,1,0,'SAY_RIN_HELP_2'), +(-1000407,'Rin\'ji can see road now, $n. Rin\'ji knows the way home.',0,0,1,0,'SAY_RIN_COMPLETE'), +(-1000408,'Rin\'ji will tell you secret now... $n, should go to the Overlook Cliffs. Rin\'ji hid something on island there',0,0,1,0,'SAY_RIN_PROGRESS_1'), +(-1000409,'You find it, you keep it! Don\'t tell no one that Rin\'ji talked to you!',0,0,1,0,'SAY_RIN_PROGRESS_2'); + +DELETE FROM script_waypoint WHERE entry=7780; +INSERT INTO script_waypoint VALUES +(7780, 0, 261.058868, -2757.876221, 122.553, 0, ''), +(7780, 1, 259.812195, -2758.249023, 122.555, 0, 'SAY_RIN_FREE'), +(7780, 2, 253.823441, -2758.619141, 122.562, 0, ''), +(7780, 3, 241.394791, -2769.754883, 123.309, 0, ''), +(7780, 4, 218.915588, -2783.397461, 123.355, 0, ''), +(7780, 5, 209.088196, -2789.676270, 122.001, 0, ''), +(7780, 6, 204.453568, -2792.205811, 120.620, 0, ''), +(7780, 7, 182.012604, -2809.995361, 113.887, 0, 'summon'), +(7780, 8, 164.411591, -2825.162842, 107.779, 0, ''), +(7780, 9, 149.727600, -2833.704346, 106.224, 0, ''), +(7780, 10, 142.448074, -2838.807373, 109.665, 0, ''), +(7780, 11, 133.274963, -2845.135254, 112.606, 0, ''), +(7780, 12, 111.247459, -2861.065674, 116.305, 0, ''), +(7780, 13, 96.104073, -2874.886230, 114.397, 0, 'summon'), +(7780, 14, 73.369942, -2881.184570, 117.666, 0, ''), +(7780, 15, 58.579178, -2889.151611, 116.253, 0, ''), +(7780, 16, 33.214249, -2906.343994, 115.083, 0, ''), +(7780, 17, 19.586519, -2908.712402, 117.276, 7500, 'SAY_RIN_COMPLETE'), +(7780, 18, 10.282522, -2911.607422, 118.394, 0, ''), +(7780, 19, -37.580383, -2942.730225, 117.145, 0, ''), +(7780, 20, -68.599411, -2953.694824, 116.685, 0, ''), +(7780, 21, -102.054253, -2956.965576, 116.677, 0, ''), +(7780, 22, -135.993637, -2955.743652, 115.788, 0, ''), +(7780, 23, -171.561600, -2951.417480, 115.451, 0, ''); diff --git a/sql/Updates/0.0.3/r1266_mangos.sql b/sql/Updates/0.0.3/r1266_mangos.sql new file mode 100644 index 000000000..67ab0763b --- /dev/null +++ b/sql/Updates/0.0.3/r1266_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_kanati' WHERE entry=10638; diff --git a/sql/Updates/0.0.3/r1266_scriptdev2.sql b/sql/Updates/0.0.3/r1266_scriptdev2.sql new file mode 100644 index 000000000..a9895ecda --- /dev/null +++ b/sql/Updates/0.0.3/r1266_scriptdev2.sql @@ -0,0 +1,8 @@ +DELETE FROM script_texts WHERE entry=-1000410; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000410,'Here they come! Defend yourself!',0,0,1,5,'kanati SAY_KAN_START'); + +DELETE FROM script_waypoint WHERE entry=10638; +INSERT INTO script_waypoint VALUES +(10638, 0, -4903.521973, -1368.339844, -52.611, 5000, 'SAY_KAN_START'), +(10638, 1, -4906.004395, -1367.048096, -52.611, 0, ''); diff --git a/sql/Updates/0.0.3/r1280_mangos.sql b/sql/Updates/0.0.3/r1280_mangos.sql new file mode 100644 index 000000000..6ce3fe82f --- /dev/null +++ b/sql/Updates/0.0.3/r1280_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_private_hendel' WHERE entry=4966; diff --git a/sql/Updates/0.0.3/r1280_scriptdev2.sql b/sql/Updates/0.0.3/r1280_scriptdev2.sql new file mode 100644 index 000000000..79297dd68 --- /dev/null +++ b/sql/Updates/0.0.3/r1280_scriptdev2.sql @@ -0,0 +1,7 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000415 AND -1000411; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000411,'Why don\'t we deal with you now, Hendel? Lady Proudmoore will speak for you back in the tower.',0,0,7,0,'hendel SAY_PROGRESS_1_TER'), +(-1000412,'Please... please... Miss Proudmore. I didn\'t mean to...',0,0,7,0,'hendel SAY_PROGRESS_2_HEN'), +(-1000413,'I apologize for taking so long to get here. I wanted Lady Proudmoore to be present also.',0,0,7,0,'hendel SAY_PROGRESS_3_TER'), +(-1000414,'We can only stay a few moments before returning to the tower. If you wish to speak to us more you may find us there.',0,0,7,0,'hendel SAY_PROGRESS_4_TER'), +(-1000415,'%s, too injured, gives up the chase.',0,2,0,0,'hendel EMOTE_SURRENDER'); diff --git a/sql/Updates/0.0.3/r1281_mangos.sql b/sql/Updates/0.0.3/r1281_mangos.sql new file mode 100644 index 000000000..810da6ea8 --- /dev/null +++ b/sql/Updates/0.0.3/r1281_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_orsonn_and_kodian' WHERE entry IN (27274, 27275); diff --git a/sql/Updates/0.0.3/r1282_mangos.sql b/sql/Updates/0.0.3/r1282_mangos.sql new file mode 100644 index 000000000..843edfd6b --- /dev/null +++ b/sql/Updates/0.0.3/r1282_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_fizzcrank_fullthrottle' WHERE entry=25590; diff --git a/sql/Updates/0.0.3/r1283_mangos.sql b/sql/Updates/0.0.3/r1283_mangos.sql new file mode 100644 index 000000000..ad2cc862d --- /dev/null +++ b/sql/Updates/0.0.3/r1283_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_arete' WHERE entry=29344; diff --git a/sql/Updates/0.0.3/r1299_scriptdev2.sql b/sql/Updates/0.0.3/r1299_scriptdev2.sql new file mode 100644 index 000000000..b87d09165 --- /dev/null +++ b/sql/Updates/0.0.3/r1299_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE script_texts SET comment='core rager EMOTE_LOWHP' WHERE entry=-1409002; diff --git a/sql/Updates/0.0.3/r1300_mangos.sql b/sql/Updates/0.0.3/r1300_mangos.sql new file mode 100644 index 000000000..b0ed3f583 --- /dev/null +++ b/sql/Updates/0.0.3/r1300_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_naladu' WHERE entry=19361; diff --git a/sql/Updates/0.0.3/r1307_mangos.sql b/sql/Updates/0.0.3/r1307_mangos.sql new file mode 100644 index 000000000..bd9535181 --- /dev/null +++ b/sql/Updates/0.0.3/r1307_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_tracy_proudwell' WHERE entry=18266; diff --git a/sql/Updates/0.0.3/r1317_mangos.sql b/sql/Updates/0.0.3/r1317_mangos.sql new file mode 100644 index 000000000..14076655b --- /dev/null +++ b/sql/Updates/0.0.3/r1317_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='npc_tapoke_slim_jahn' WHERE entry=4962; +UPDATE creature_template SET ScriptName='npc_mikhail' WHERE entry=4963; diff --git a/sql/Updates/0.0.3/r1317_scriptdev2.sql b/sql/Updates/0.0.3/r1317_scriptdev2.sql new file mode 100644 index 000000000..c8973352b --- /dev/null +++ b/sql/Updates/0.0.3/r1317_scriptdev2.sql @@ -0,0 +1,9 @@ +DELETE FROM script_waypoint WHERE entry=4962; +INSERT INTO script_waypoint VALUES +(4962, 0, -3804.438965, -828.048035, 10.093068, 0, ''), +(4962, 1, -3803.934326, -835.772400, 10.077722, 0, ''), +(4962, 2, -3792.629150, -835.670898, 9.655657, 0, ''), +(4962, 3, -3772.433838, -835.345947, 10.868981, 0, ''), +(4962, 4, -3765.937256, -840.128601, 10.885593, 0, ''), +(4962, 5, -3738.633789, -830.997498, 11.057384, 0, ''), +(4962, 6, -3690.224121, -862.261597, 9.960449, 0, ''); diff --git a/sql/Updates/0.0.3/r1321_mangos.sql b/sql/Updates/0.0.3/r1321_mangos.sql new file mode 100644 index 000000000..7ab9ac7a7 --- /dev/null +++ b/sql/Updates/0.0.3/r1321_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_00x09hl' WHERE entry=7806; diff --git a/sql/Updates/0.0.3/r1321_scriptdev2.sql b/sql/Updates/0.0.3/r1321_scriptdev2.sql new file mode 100644 index 000000000..50036505f --- /dev/null +++ b/sql/Updates/0.0.3/r1321_scriptdev2.sql @@ -0,0 +1,74 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000419 AND -1000416; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000416,'Emergency power activated! Initializing ambulatory motor! CLUCK!',0,0,0,0,'oox09 SAY_OOX_START'), +(-1000417,'Threat analyzed! Activating combat plan beta! CLUCK!',0,0,0,0,'oox09 SAY_OOX_AGGRO'), +(-1000418,'CLUCK! Sensors detect spatial anomaly -- danger imminent! CLUCK!',0,0,0,0,'oox09 SAY_OOX_DANGER'), +(-1000419,'Cloaking systems online! CLUCK! Engaging cloak for transport to Booty Bay!',0,0,0,0,'oox09 SAY_OOX_COMPLETE'); + +DELETE FROM script_waypoint WHERE entry=7806; +INSERT INTO script_waypoint VALUES +(7806, 0, 495.404358, -3478.350830, 114.837, 0, ''), +(7806, 1, 492.704742, -3486.112549, 108.627, 0, ''), +(7806, 2, 487.249756, -3485.764404, 107.890, 0, ''), +(7806, 3, 476.851959, -3489.875977, 99.985, 0, ''), +(7806, 4, 467.212402, -3493.355469, 99.819, 0, ''), +(7806, 5, 460.017029, -3496.984375, 104.481, 0, ''), +(7806, 6, 439.619446, -3500.730225, 110.534, 0, ''), +(7806, 7, 428.326385, -3495.874756, 118.662, 0, ''), +(7806, 8, 424.664032, -3489.381592, 121.999, 0, ''), +(7806, 9, 424.137299, -3470.952637, 124.333, 0, ''), +(7806, 10, 421.791107, -3449.242676, 119.126, 0, ''), +(7806, 11, 404.247070, -3429.376953, 117.644, 0, ''), +(7806, 12, 335.465271, -3430.717773, 116.456, 0, ''), +(7806, 13, 317.160126, -3426.708984, 116.226, 0, ''), +(7806, 14, 331.180115, -3464.002197, 117.143, 0, ''), +(7806, 15, 336.393616, -3501.877441, 118.201, 0, ''), +(7806, 16, 337.251312, -3544.764648, 117.284, 0, ''), +(7806, 17, 337.748932, -3565.415527, 116.797, 0, ''), +(7806, 18, 336.010925, -3597.363037, 118.225, 0, ''), +(7806, 19, 324.619141, -3622.884033, 119.811, 0, ''), +(7806, 20, 308.027466, -3648.600098, 123.047, 0, ''), +(7806, 21, 276.325409, -3685.738525, 128.356, 0, ''), +(7806, 22, 239.981064, -3717.330811, 131.874, 0, ''), +(7806, 23, 224.950974, -3730.169678, 132.125, 0, ''), +(7806, 24, 198.707870, -3768.292725, 129.420, 0, ''), +(7806, 25, 183.758316, -3791.068848, 128.045, 0, ''), +(7806, 26, 178.110657, -3801.575439, 128.370, 3000, 'SAY_OOX_DANGER'), +(7806, 27, 162.215225, -3827.014160, 129.424, 0, ''), +(7806, 28, 141.664734, -3864.519287, 131.419, 0, ''), +(7806, 29, 135.301697, -3880.089111, 132.120, 0, ''), +(7806, 30, 122.461151, -3910.071533, 135.605, 0, ''), +(7806, 31, 103.376175, -3937.725098, 137.342, 0, ''), +(7806, 32, 81.414474, -3958.614258, 138.469, 0, ''), +(7806, 33, 55.378139, -3982.004639, 136.520, 0, ''), +(7806, 34, 13.983131, -4013.952881, 126.903, 0, ''), +(7806, 35, -21.658007, -4048.713623, 118.068, 0, ''), +(7806, 36, -52.443058, -4081.209717, 117.477, 0, ''), +(7806, 37, -102.710854, -4116.760742, 118.666, 0, ''), +(7806, 38, -92.996193, -4135.847168, 119.310, 0, ''), +(7806, 39, -86.391273, -4153.331055, 122.502, 0, ''), +(7806, 40, -85.746086, -4163.600586, 121.892, 0, ''), +(7806, 41, -90.544006, -4183.577637, 117.587, 0, ''), +(7806, 42, -110.223564, -4205.861328, 121.878, 0, ''), +(7806, 43, -115.257607, -4211.962402, 121.878, 3000, 'SAY_OOX_DANGER'), +(7806, 44, -128.594650, -4233.343750, 117.766, 0, ''), +(7806, 45, -135.358917, -4258.120117, 117.562, 0, ''), +(7806, 46, -156.832428, -4258.961914, 120.059, 0, ''), +(7806, 47, -167.119873, -4274.102539, 117.062, 0, ''), +(7806, 48, -176.291016, -4287.594727, 118.721, 0, ''), +(7806, 49, -196.992981, -4315.815430, 117.588, 0, ''), +(7806, 50, -209.329300, -4331.671387, 115.142, 0, ''), +(7806, 51, -232.292236, -4356.015625, 108.543, 0, ''), +(7806, 52, -232.159683, -4370.904297, 102.815, 0, ''), +(7806, 53, -210.271133, -4389.896973, 84.167, 0, ''), +(7806, 54, -187.940186, -4407.532715, 70.987, 0, ''), +(7806, 55, -181.353577, -4418.771973, 64.778, 0, ''), +(7806, 56, -170.529861, -4440.438965, 58.943, 0, ''), +(7806, 57, -141.428543, -4465.323242, 45.963, 0, ''), +(7806, 58, -120.993629, -4487.088379, 32.075, 0, ''), +(7806, 59, -104.134621, -4501.837402, 25.051, 0, ''), +(7806, 60, -84.154663, -4529.436523, 11.952, 0, ''), +(7806, 61, -88.698898, -4544.626465, 9.055, 0, ''), +(7806, 62, -100.603447, -4575.034180, 11.388, 0, ''), +(7806, 63, -106.908669, -4600.407715, 11.046, 0, ''), +(7806, 64, -106.831703, -4620.503418, 11.057, 3000, 'SAY_OOX_COMPLETE'); diff --git a/sql/Updates/0.0.3/r1322_scriptdev2.sql b/sql/Updates/0.0.3/r1322_scriptdev2.sql new file mode 100644 index 000000000..ca31b0561 --- /dev/null +++ b/sql/Updates/0.0.3/r1322_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 8273+) '; diff --git a/sql/Updates/0.0.3/r1326_scriptdev2.sql b/sql/Updates/0.0.3/r1326_scriptdev2.sql new file mode 100644 index 000000000..72907f060 --- /dev/null +++ b/sql/Updates/0.0.3/r1326_scriptdev2.sql @@ -0,0 +1,27 @@ +DELETE FROM script_waypoint WHERE entry=3439; +INSERT INTO script_waypoint VALUES +(3439, 0, 1105.090332, -3101.254150, 82.706, 1000, 'SAY_STARTUP1'), +(3439, 1, 1103.204468, -3104.345215, 83.113, 1000, ''), +(3439, 2, 1107.815186, -3106.495361, 82.739, 1000, ''), +(3439, 3, 1104.733276, -3100.830811, 82.747, 1000, ''), +(3439, 4, 1103.242554, -3106.270020, 83.133, 1000, ''), +(3439, 5, 1112.807373, -3106.285400, 82.320, 1000, ''), +(3439, 6, 1112.826782, -3108.908691, 82.377, 1000, ''), +(3439, 7, 1108.053955, -3115.156738, 82.894, 0, ''), +(3439, 8, 1108.355591, -3104.365234, 82.377, 5000, ''), +(3439, 9, 1100.306763, -3097.539063, 83.150, 0, 'SAY_STARTUP2'), +(3439, 10, 1100.562378, -3082.721924, 82.768, 0, ''), +(3439, 11, 1097.512939, -3069.226563, 82.206, 0, ''), +(3439, 12, 1092.964966, -3053.114746, 82.351, 0, ''), +(3439, 13, 1094.010986, -3036.958496, 82.888, 0, ''), +(3439, 14, 1095.623901, -3025.760254, 83.392, 0, ''), +(3439, 15, 1107.656494, -3013.530518, 85.653, 0, ''), +(3439, 16, 1119.647705, -3006.928223, 87.019, 0, ''), +(3439, 17, 1129.991211, -3002.410645, 91.232, 7000, 'SAY_MERCENARY'), +(3439, 18, 1133.328735, -2997.710693, 91.675, 1000, 'SAY_PROGRESS_1'), +(3439, 19, 1131.799316, -2987.948242, 91.976, 1000, ''), +(3439, 20, 1122.028687, -2993.397461, 91.536, 0, ''), +(3439, 21, 1116.614868, -2981.916748, 92.103, 0, ''), +(3439, 22, 1102.239136, -2994.245117, 92.074, 0, ''), +(3439, 23, 1096.366211, -2978.306885, 91.873, 0, ''), +(3439, 24, 1091.971558, -2985.919189, 91.730, 40000, 'SAY_PROGRESS_2'); diff --git a/sql/Updates/0.0.3/r1333_mangos.sql b/sql/Updates/0.0.3/r1333_mangos.sql new file mode 100644 index 000000000..b226cdb5b --- /dev/null +++ b/sql/Updates/0.0.3/r1333_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=24666; +UPDATE creature_template SET ScriptName='' WHERE entry=21369; diff --git a/sql/Updates/0.0.3/r1334_mangos.sql b/sql/Updates/0.0.3/r1334_mangos.sql new file mode 100644 index 000000000..3ed409f34 --- /dev/null +++ b/sql/Updates/0.0.3/r1334_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='npc_trollbane' WHERE entry=16819; +UPDATE creature_template SET ScriptName='npc_timothy_daniels' WHERE entry=18019; diff --git a/sql/Updates/0.0.3/r1335_scriptdev2.sql b/sql/Updates/0.0.3/r1335_scriptdev2.sql new file mode 100644 index 000000000..78b11db77 --- /dev/null +++ b/sql/Updates/0.0.3/r1335_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM script_texts WHERE entry=-1230003; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1230003,'You have challenged the Seven, and now you will die!',0,0,0,0,'doomrel SAY_DOOMREL_START_EVENT'); diff --git a/sql/Updates/0.0.3/r1336_mangos.sql b/sql/Updates/0.0.3/r1336_mangos.sql new file mode 100644 index 000000000..f8c4e5c46 --- /dev/null +++ b/sql/Updates/0.0.3/r1336_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_vekjik' WHERE entry=28315; diff --git a/sql/Updates/0.0.3/r1336_scriptdev2.sql b/sql/Updates/0.0.3/r1336_scriptdev2.sql new file mode 100644 index 000000000..37a9bb325 --- /dev/null +++ b/sql/Updates/0.0.3/r1336_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE script_texts SET content_default='Frenzyheart kill you if you come back. You no welcome here no more!', comment='vekjik SAY_TEXTID_VEKJIK1' WHERE entry=-1000208; diff --git a/sql/Updates/0.0.3/r1341_scriptdev2.sql b/sql/Updates/0.0.3/r1341_scriptdev2.sql new file mode 100644 index 000000000..c86d21154 --- /dev/null +++ b/sql/Updates/0.0.3/r1341_scriptdev2.sql @@ -0,0 +1,11 @@ +UPDATE script_texts SET content_default='Emergency power activated! Initializing ambulanory motor! CLUCK!' WHERE entry = -1000287; +UPDATE script_texts SET comment='oox SAY_OOX_START' WHERE entry = -1000287; +UPDATE script_texts SET comment='oox SAY_OOX_AGGRO1' WHERE entry = -1000288; +UPDATE script_texts SET comment='oox SAY_OOX_AGGRO2' WHERE entry = -1000289; +UPDATE script_texts SET comment='oox SAY_OOX_AMBUSH' WHERE entry = -1000290; +UPDATE script_texts SET comment='oox SAY_OOX17_AMBUSH_REPLY' WHERE entry = -1000291; +UPDATE script_texts SET comment='oox SAY_OOX_END' WHERE entry = -1000292; +UPDATE script_texts SET content_default='REUSE', comment='REUSE' WHERE entry = -1000416; +UPDATE script_texts SET content_default='REUSE', comment='REUSE' WHERE entry = -1000417; +UPDATE script_texts SET content_default='REUSE', comment='REUSE' WHERE entry = -1000418; +UPDATE script_texts SET content_default='REUSE', comment='REUSE' WHERE entry = -1000419; diff --git a/sql/Updates/0.0.3/r1351_mangos.sql b/sql/Updates/0.0.3/r1351_mangos.sql new file mode 100644 index 000000000..87af6d3a4 --- /dev/null +++ b/sql/Updates/0.0.3/r1351_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_ringo' WHERE entry=9999; diff --git a/sql/Updates/0.0.3/r1351_scriptdev2.sql b/sql/Updates/0.0.3/r1351_scriptdev2.sql new file mode 100644 index 000000000..8fe8ddb49 --- /dev/null +++ b/sql/Updates/0.0.3/r1351_scriptdev2.sql @@ -0,0 +1,21 @@ +UPDATE script_texts SET content_default='Well, I\'m not sure how far I\'ll make it in this state... I\'m feeling kind of faint...', comment='ringo SAY_RIN_START_1' WHERE entry=-1000416; +UPDATE script_texts SET content_default='Remember, if I faint again, the water that Spraggle gave you will revive me.', comment='ringo SAY_RIN_START_2' WHERE entry=-1000417; +UPDATE script_texts SET content_default='The heat... I can\'t take it...', comment='ringo SAY_FAINT_1' WHERE entry=-1000418; +UPDATE script_texts SET content_default='Maybe... you could carry me?', comment='ringo SAY_FAINT_2' WHERE entry=-1000419; + +DELETE FROM script_texts WHERE entry BETWEEN -1000433 AND -1000420; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000420,'Uuuuuuggggghhhhh....',0,0,0,0,'ringo SAY_FAINT_3'), +(-1000421,'I\'m not feeling so well...',0,0,0,0,'ringo SAY_FAINT_4'), +(-1000422,'Where... Where am I?',0,0,0,0,'ringo SAY_WAKE_1'), +(-1000423,'I am feeling a little better now, thank you.',0,0,0,0,'ringo SAY_WAKE_2'), +(-1000424,'Yes, I must go on.',0,0,0,0,'ringo SAY_WAKE_3'), +(-1000425,'How am I feeling? Quite soaked, thank you.',0,0,0,0,'ringo SAY_WAKE_4'), +(-1000426,'Spraggle! I didn\'t think I\'d make it back!',0,0,0,0,'ringo SAY_RIN_END_1'), +(-1000427,'Ringo! You\'re okay!',0,0,0,0,'ringo SAY_SPR_END_2'), +(-1000428,'Oh... I\'m feeling faint...',0,0,0,0,'ringo SAY_RIN_END_3'), +(-1000429,'%s collapses onto the ground.',0,2,0,0,'ringo EMOTE_RIN_END_4'), +(-1000430,'%s stands up after a short pause.',0,2,0,0,'ringo EMOTE_RIN_END_5'), +(-1000431,'Ugh.',0,0,0,0,'ringo SAY_RIN_END_6'), +(-1000432,'Ringo? Wake up! Don\'t worry, I\'ll take care of you.',0,0,0,0,'ringo SAY_SPR_END_7'), +(-1000433,'%s fades away after a long pause.',0,2,0,0,'ringo EMOTE_RIN_END_8'); diff --git a/sql/Updates/0.0.3/r1352_mangos.sql b/sql/Updates/0.0.3/r1352_mangos.sql new file mode 100644 index 000000000..14c65c1ca --- /dev/null +++ b/sql/Updates/0.0.3/r1352_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_kerlonian' WHERE entry=11218; diff --git a/sql/Updates/0.0.3/r1352_scriptdev2.sql b/sql/Updates/0.0.3/r1352_scriptdev2.sql new file mode 100644 index 000000000..0e5cbd268 --- /dev/null +++ b/sql/Updates/0.0.3/r1352_scriptdev2.sql @@ -0,0 +1,13 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000444 AND -1000434; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000434,'Liladris has been waiting for me at Maestra\'s Post, so we should make haste, $N.',0,0,0,0,'kerlonian SAY_KER_START'), +(-1000435,'%s looks very sleepy...',0,2,0,0,'kerlonian EMOTE_KER_SLEEP_1'), +(-1000436,'%s suddenly falls asleep',0,2,0,0,'kerlonian EMOTE_KER_SLEEP_2'), +(-1000437,'%s begins to drift off...',0,2,0,0,'kerlonian EMOTE_KER_SLEEP_3'), +(-1000438,'This looks like the perfect place for a nap...',0,0,0,0,'kerlonian SAY_KER_SLEEP_1'), +(-1000439,'Yaaaaawwwwwnnnn...',0,0,0,0,'kerlonian SAY_KER_SLEEP_2'), +(-1000440,'Oh, I am so tired...',0,0,0,0,'kerlonian SAY_KER_SLEEP_3'), +(-1000441,'You don\'t mind if I stop here for a moment, do you?',0,0,0,0,'kerlonian SAY_KER_SLEEP_4'), +(-1000442,'Be on the alert! The Blackwood furbolgs are numerous in the area...',0,0,0,0,'kerlonian SAY_KER_ALERT_1'), +(-1000443,'It\'s quiet... Too quiet...',0,0,0,0,'kerlonian SAY_KER_ALERT_2'), +(-1000444,'Oh, I can see Liladris from here... Tell her I\'m here, won\'t you?',0,0,0,0,'kerlonian SAY_KER_END'); diff --git a/sql/Updates/0.0.3/r1354_scriptdev2.sql b/sql/Updates/0.0.3/r1354_scriptdev2.sql new file mode 100644 index 000000000..2cc8543a9 --- /dev/null +++ b/sql/Updates/0.0.3/r1354_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM script_texts WHERE entry=-1000445; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000445,'%s wakes up!',0,2,0,0,'kerlonian EMOTE_KER_AWAKEN'); diff --git a/sql/Updates/0.0.3/r1358_mangos.sql b/sql/Updates/0.0.3/r1358_mangos.sql new file mode 100644 index 000000000..55d85fe88 --- /dev/null +++ b/sql/Updates/0.0.3/r1358_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_kara_thricestar' WHERE entry=26602; diff --git a/sql/Updates/0.0.3/r1359_mangos.sql b/sql/Updates/0.0.3/r1359_mangos.sql new file mode 100644 index 000000000..5e4a6a968 --- /dev/null +++ b/sql/Updates/0.0.3/r1359_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_ame01' WHERE entry=9623; diff --git a/sql/Updates/0.0.3/r1359_scriptdev2.sql b/sql/Updates/0.0.3/r1359_scriptdev2.sql new file mode 100644 index 000000000..f6cb299a9 --- /dev/null +++ b/sql/Updates/0.0.3/r1359_scriptdev2.sql @@ -0,0 +1,51 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000451 AND -1000446; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000446,'A-Me good. Good, A-Me. Follow... follow A-Me. Home. A-Me go home.',0,0,0,0,'ame01 SAY_AME_START'), +(-1000447,'Good... good, A-Me. A-Me good. Home. Find home.',0,0,0,0,'ame01 SAY_AME_PROGRESS'), +(-1000448,'A-Me home! A-Me good! Good A-Me. Home. Home. Home.',0,0,0,0,'ame01 SAY_AME_END'), +(-1000449,'$c, no hurt A-Me. A-Me good.',0,0,0,0,'ame01 SAY_AME_AGGRO1'), +(-1000450,'Danger. Danger! $c try hurt A-Me.',0,0,0,0,'ame01 SAY_AME_AGGRO2'), +(-1000451,'Bad, $c. $c, bad!',0,0,0,0,'ame01 SAY_AME_AGGRO3'); + +DELETE FROM script_waypoint WHERE entry=9623; +INSERT INTO script_waypoint VALUES +(9623, 0, -6383.070801, -1964.368896, -258.709, 0, 'SAY_AME_START'), +(9623, 1, -6393.649414, -1949.572266, -261.449, 0, ''), +(9623, 2, -6397.846680, -1931.099609, -263.366, 0, ''), +(9623, 3, -6397.501953, -1921.470703, -263.876, 0, ''), +(9623, 4, -6389.630371, -1909.995361, -259.601, 0, ''), +(9623, 5, -6380.065430, -1905.452881, -255.858, 0, ''), +(9623, 6, -6373.437988, -1900.275024, -254.774, 0, ''), +(9623, 7, -6372.868652, -1893.500854, -255.678, 0, ''), +(9623, 8, -6379.730469, -1877.627808, -259.654, 0, ''), +(9623, 9, -6380.264160, -1871.139648, -260.617, 0, ''), +(9623, 10, -6373.830566, -1855.620361, -259.566, 0, ''), +(9623, 11, -6368.824707, -1847.770508, -259.246, 0, ''), +(9623, 12, -6370.902832, -1835.038940, -260.212, 0, ''), +(9623, 13, -6376.591309, -1821.592285, -260.856, 0, ''), +(9623, 14, -6381.931152, -1810.434326, -266.180, 0, ''), +(9623, 15, -6396.713867, -1807.123535, -269.329, 0, ''), +(9623, 16, -6400.266602, -1795.053589, -269.744, 0, ''), +(9623, 17, -6402.675781, -1747.514648, -272.961, 0, ''), +(9623, 18, -6396.997559, -1710.052979, -273.719, 0, ''), +(9623, 19, -6388.105957, -1676.328125, -272.133, 5000, 'SAY_AME_PROGRESS'), +(9623, 20, -6370.711914, -1638.638306, -272.031, 0, ''), +(9623, 21, -6366.709473, -1592.645996, -272.201, 0, ''), +(9623, 22, -6333.869629, -1534.598755, -270.493, 0, ''), +(9623, 23, -6305.362305, -1477.913330, -269.518, 0, ''), +(9623, 24, -6311.588867, -1419.017456, -267.622, 0, ''), +(9623, 25, -6330.014648, -1400.064331, -266.425, 0, ''), +(9623, 26, -6356.021973, -1392.607422, -267.123, 0, ''), +(9623, 27, -6370.859375, -1386.179321, -270.218, 0, ''), +(9623, 28, -6381.529785, -1369.780273, -272.110, 0, ''), +(9623, 29, -6405.381348, -1321.522827, -271.699, 0, ''), +(9623, 30, -6406.583496, -1307.574585, -271.802, 0, ''), +(9623, 31, -6386.325684, -1286.851074, -272.074, 0, ''), +(9623, 32, -6364.254883, -1264.706299, -269.075, 0, ''), +(9623, 33, -6343.636230, -1239.844360, -268.364, 0, ''), +(9623, 34, -6335.568848, -1202.449585, -271.515, 0, ''), +(9623, 35, -6325.625000, -1184.455322, -270.461, 0, ''), +(9623, 36, -6317.797363, -1177.668091, -269.792, 0, ''), +(9623, 37, -6303.024414, -1180.252686, -269.332, 0, 'SAY_AME_END'), +(9623, 38, -6301.975098, -1184.787842, -269.371, 1000, ''), +(9623, 39, -6297.575684, -1186.412964, -268.962, 5000, ''); diff --git a/sql/Updates/0.0.3/r1367_mangos.sql b/sql/Updates/0.0.3/r1367_mangos.sql new file mode 100644 index 000000000..86f6b124f --- /dev/null +++ b/sql/Updates/0.0.3/r1367_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_iruk' WHERE entry=26219; diff --git a/sql/Updates/0.0.3/r1368_mangos.sql b/sql/Updates/0.0.3/r1368_mangos.sql new file mode 100644 index 000000000..d059d5e9c --- /dev/null +++ b/sql/Updates/0.0.3/r1368_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_roxi_ramrocket' WHERE entry=31247; diff --git a/sql/Updates/0.0.3/r1369_mangos.sql b/sql/Updates/0.0.3/r1369_mangos.sql new file mode 100644 index 000000000..4c248df7c --- /dev/null +++ b/sql/Updates/0.0.3/r1369_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_zidormi' WHERE entry=31848; diff --git a/sql/Updates/0.0.3/r1370_mangos.sql b/sql/Updates/0.0.3/r1370_mangos.sql new file mode 100644 index 000000000..df5f35cc0 --- /dev/null +++ b/sql/Updates/0.0.3/r1370_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_demoniac_scryer' WHERE entry=22258; diff --git a/sql/Updates/0.0.3/r1371_scriptdev2.sql b/sql/Updates/0.0.3/r1371_scriptdev2.sql new file mode 100644 index 000000000..43bd3b9b4 --- /dev/null +++ b/sql/Updates/0.0.3/r1371_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 8422+) '; diff --git a/sql/Updates/0.0.3/r1374_mangos.sql b/sql/Updates/0.0.3/r1374_mangos.sql new file mode 100644 index 000000000..ee72277a8 --- /dev/null +++ b/sql/Updates/0.0.3/r1374_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_ogron' WHERE entry=4983; diff --git a/sql/Updates/0.0.3/r1374_scriptdev2.sql b/sql/Updates/0.0.3/r1374_scriptdev2.sql new file mode 100644 index 000000000..a43a6f311 --- /dev/null +++ b/sql/Updates/0.0.3/r1374_scriptdev2.sql @@ -0,0 +1,48 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000471 AND -1000452; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000452,'I noticed some fire on that island over there. A human, too. Let\'s go check it out, $n.',0,0,1,0,'ogron SAY_OGR_START'), +(-1000453,'That\'s Reethe alright. Let\'s go see what he has to say, yeah?',0,0,1,1,'ogron SAY_OGR_SPOT'), +(-1000454,'W-what do you want? Just leave me alone...',0,0,0,6,'ogron SAY_OGR_RET_WHAT'), +(-1000455,'I swear. I didn\'t steal anything from you! Here, take some of my supplies, just go away!',0,0,0,27,'ogron SAY_OGR_RET_SWEAR'), +(-1000456,'Just tell us what you know about the Shady Rest Inn, and I won\'t bash your skull in.',0,0,1,0,'ogron SAY_OGR_REPLY_RET'), +(-1000457,'I... Well, I may of taken a little thing or two from the inn... but what would an ogre care about that?',0,0,0,6,'ogron SAY_OGR_RET_TAKEN'), +(-1000458,'Look here, if you don\'t tell me about the fire--',0,0,1,0,'ogron SAY_OGR_TELL_FIRE'), +(-1000459,'Not one step closer, ogre!',0,0,0,27,'ogron SAY_OGR_RET_NOCLOSER'), +(-1000460,'And I don\'t know anything about this fire of yours...',0,0,0,0,'ogron SAY_OGR_RET_NOFIRE'), +(-1000461,'What was that? Did you hear something?',0,0,0,0,'ogron SAY_OGR_RET_HEAR'), +(-1000462,'Paval Reethe! Found you at last. And consorting with ogres now? No fear, even deserters and traitors are afforded some mercy.',0,0,0,0,'ogron SAY_OGR_CAL_FOUND'), +(-1000463,'Private, show Lieutenant Reethe some mercy.',0,0,0,29,'ogron SAY_OGR_CAL_MERCY'), +(-1000464,'Gladly, sir.',0,0,0,0,'ogron SAY_OGR_HALL_GLAD'), +(-1000465,'%s staggers backwards as the arrow lodges itself deeply in his chest.',0,2,0,0,'ogron EMOTE_OGR_RET_ARROW'), +(-1000466,'Ugh... Hallan, didn\'t think you had it in you...',0,0,0,34,'ogron SAY_OGR_RET_ARROW'), +(-1000467,'Now, let\'s clean up the rest of the trash, men!',0,0,0,0,'ogron SAY_OGR_CAL_CLEANUP'), +(-1000468,'Damn it! You\'d better not die on me, human!',0,0,1,0,'ogron SAY_OGR_NODIE'), +(-1000469,'Still with us, Reethe?',0,0,1,0,'ogron SAY_OGR_SURVIVE'), +(-1000470,'Must be your lucky day. Alright, I\'ll talk. Just leave me alone. Look, you\'re not going to believe me, but it wa... oh, Light, looks like the girl could shoot...',0,0,0,0,'ogron SAY_OGR_RET_LUCKY'), +(-1000471,'By the way, thanks for watching my back.',0,0,1,0,'ogron SAY_OGR_THANKS'); + +DELETE FROM script_waypoint WHERE entry=4983; +INSERT INTO script_waypoint VALUES +(4983, 0, -3322.649414, -3124.631836, 33.842, 0, ''), +(4983, 1, -3326.336670, -3126.833496, 34.426, 0, ''), +(4983, 2, -3336.984131, -3129.611816, 30.692, 0, ''), +(4983, 3, -3342.598389, -3132.146729, 30.422, 0, ''), +(4983, 4, -3355.827881, -3140.947998, 29.534, 0, ''), +(4983, 5, -3365.828125, -3144.284180, 35.176, 0, ''), +(4983, 6, -3368.904541, -3147.265381, 36.091, 0, ''), +(4983, 7, -3369.355957, -3169.828857, 36.325, 0, ''), +(4983, 8, -3371.443359, -3183.905029, 33.454, 0, ''), +(4983, 9, -3373.824951, -3190.861084, 34.717, 5000, 'SAY_OGR_SPOT'), +(4983, 10, -3368.529785, -3198.210205, 34.926, 0, 'SAY_OGR_RET_WHAT'), +(4983, 11, -3366.265625, -3210.867676, 33.733, 5000, 'pause'), +(4983, 12, -3368.529785, -3198.210205, 34.926, 0, ''), +(4983, 13, -3373.824951, -3190.861084, 34.717, 0, ''), +(4983, 14, -3371.443359, -3183.905029, 33.454, 0, ''), +(4983, 15, -3369.355957, -3169.828857, 36.325, 0, ''), +(4983, 16, -3368.904541, -3147.265381, 36.091, 0, ''), +(4983, 17, -3365.828125, -3144.284180, 35.176, 0, ''), +(4983, 18, -3355.827881, -3140.947998, 29.534, 0, ''), +(4983, 19, -3342.598389, -3132.146729, 30.422, 0, ''), +(4983, 20, -3336.984131, -3129.611816, 30.692, 0, ''), +(4983, 21, -3326.336670, -3126.833496, 34.426, 0, ''), +(4983, 22, -3322.649414, -3124.631836, 33.842, 0, ''); diff --git a/sql/Updates/0.0.3/r1378_mangos.sql b/sql/Updates/0.0.3/r1378_mangos.sql new file mode 100644 index 000000000..1697e0ee0 --- /dev/null +++ b/sql/Updates/0.0.3/r1378_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='npc_mana_bomb_exp_trigger' WHERE entry=20767; +UPDATE gameobject_template SET ScriptName='go_mana_bomb' WHERE entry=184725; diff --git a/sql/Updates/0.0.3/r1378_scriptdev2.sql b/sql/Updates/0.0.3/r1378_scriptdev2.sql new file mode 100644 index 000000000..133e53fca --- /dev/null +++ b/sql/Updates/0.0.3/r1378_scriptdev2.sql @@ -0,0 +1,7 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000476 AND -1000472; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000472,'1...',0,3,0,0,'mana bomb SAY_COUNT_1'), +(-1000473,'2...',0,3,0,0,'mana bomb SAY_COUNT_2'), +(-1000474,'3...',0,3,0,0,'mana bomb SAY_COUNT_3'), +(-1000475,'4...',0,3,0,0,'mana bomb SAY_COUNT_4'), +(-1000476,'5...',0,3,0,0,'mana bomb SAY_COUNT_5'); diff --git a/sql/Updates/0.0.3/r1379_mangos.sql b/sql/Updates/0.0.3/r1379_mangos.sql new file mode 100644 index 000000000..f4437dd91 --- /dev/null +++ b/sql/Updates/0.0.3/r1379_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_akuno' WHERE entry=22377; diff --git a/sql/Updates/0.0.3/r1379_scriptdev2.sql b/sql/Updates/0.0.3/r1379_scriptdev2.sql new file mode 100644 index 000000000..6a06e2d93 --- /dev/null +++ b/sql/Updates/0.0.3/r1379_scriptdev2.sql @@ -0,0 +1,29 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000481 AND -1000477; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000477,'Let us leave this place. I\'ve had enough of these madmen!',0,0,0,0,'akuno SAY_AKU_START'), +(-1000478,'You\'ll go nowhere, fool!',0,0,0,0,'akuno SAY_AKU_AMBUSH_A'), +(-1000479,'Beware! More cultists come!',0,0,0,0,'akuno SAY_AKU_AMBUSH_B'), +(-1000480,'You will not escape us so easily!',0,0,0,0,'akuno SAY_AKU_AMBUSH_B_REPLY'), +(-1000481,'I can find my way from here. My friend Mekeda will reward you for your kind actions.',0,0,0,0,'akuno SAY_AKU_COMPLETE'); + +DELETE FROM script_waypoint WHERE entry=22377; +INSERT INTO script_waypoint VALUES +(22377, 0, -2770.457520, 5418.410645, -34.538, 0, ''), +(22377, 1, -2778.180420, 5416.253906, -34.538, 0, ''), +(22377, 2, -2816.960449, 5414.944336, -34.529, 0, ''), +(22377, 3, -2827.533203, 5414.737305, -28.265, 0, ''), +(22377, 4, -2841.610596, 5413.021973, -28.261, 0, ''), +(22377, 5, -2863.605957, 5411.964355, -28.262, 1000, 'SAY_AKU_AMBUSH_A'), +(22377, 6, -2874.559570, 5413.799316, -28.260, 0, ''), +(22377, 7, -2878.775879, 5413.812012, -28.261, 0, ''), +(22377, 8, -2892.586914, 5413.478516, -18.784, 0, ''), +(22377, 9, -2896.040527, 5413.137207, -18.589, 0, ''), +(22377, 10, -2896.318848, 5409.431641, -18.450, 0, ''), +(22377, 11, -2895.997803, 5396.909668, -8.855, 0, ''), +(22377, 12, -2895.734131, 5386.623535, -9.260, 0, ''), +(22377, 13, -2895.318359, 5367.613281, -9.456, 0, ''), +(22377, 14, -2890.306641, 5353.883301, -11.280, 1000, 'SAY_AKU_AMBUSH_B'), +(22377, 15, -2880.419189, 5334.625977, -10.629, 0, ''), +(22377, 16, -2866.394043, 5314.253906, -9.678, 0, ''), +(22377, 17, -2864.753174, 5277.734375, -11.087, 0, ''), +(22377, 18, -2856.330322, 5255.902344, -11.496, 5000, 'SAY_AKU_COMPLETE'); diff --git a/sql/Updates/0.0.3/r1380_mangos.sql b/sql/Updates/0.0.3/r1380_mangos.sql new file mode 100644 index 000000000..3768d1b2e --- /dev/null +++ b/sql/Updates/0.0.3/r1380_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_maghar_captive' WHERE entry=18210; diff --git a/sql/Updates/0.0.3/r1380_scriptdev2.sql b/sql/Updates/0.0.3/r1380_scriptdev2.sql new file mode 100644 index 000000000..cb9d91123 --- /dev/null +++ b/sql/Updates/0.0.3/r1380_scriptdev2.sql @@ -0,0 +1,32 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000488 AND -1000482; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000482,'Look out!',0,0,0,0,'maghar captive SAY_MAG_START'), +(-1000483,'Don\'t let them escape! Kill the strong one first!',0,0,0,0,'maghar captive SAY_MAG_NO_ESCAPE'), +(-1000484,'More of them coming! Watch out!',0,0,0,0,'maghar captive SAY_MAG_MORE'), +(-1000485,'Where do you think you\'re going? Kill them all!',0,0,0,0,'maghar captive SAY_MAG_MORE_REPLY'), +(-1000486,'Ride the lightning, filth!',0,0,0,0,'maghar captive SAY_MAG_LIGHTNING'), +(-1000487,'FROST SHOCK!!!',0,0,0,0,'maghar captive SAY_MAG_SHOCK'), +(-1000488,'It is best that we split up now, in case they send more after us. Hopefully one of us will make it back to Garrosh. Farewell stranger.',0,0,0,0,'maghar captive SAY_MAG_COMPLETE'); + +DELETE FROM script_waypoint WHERE entry=18210; +INSERT INTO script_waypoint VALUES +(18210, 0, -1581.410034, 8557.933594, 2.726, 0, ''), +(18210, 1, -1579.908447, 8553.716797, 2.559, 0, ''), +(18210, 2, -1577.829102, 8549.880859, 2.001, 0, ''), +(18210, 3, -1571.161987, 8543.494141, 2.001, 0, ''), +(18210, 4, -1563.944824, 8530.334961, 1.605, 0, ''), +(18210, 5, -1554.565552, 8518.413086, 0.364, 0, ''), +(18210, 6, -1549.239136, 8515.518555, 0.293, 0, ''), +(18210, 7, -1518.490112, 8516.771484, 0.683, 2000, 'SAY_MAG_MORE'), +(18210, 8, -1505.038940, 8513.247070, 0.672, 0, ''), +(18210, 9, -1476.161133, 8496.066406, 2.157, 0, ''), +(18210, 10, -1464.450684, 8492.601563, 3.529, 0, ''), +(18210, 11, -1457.568359, 8492.183594, 4.449, 0, ''), +(18210, 12, -1444.100342, 8499.031250, 6.177, 0, ''), +(18210, 13, -1426.472168, 8510.116211, 7.686, 0, ''), +(18210, 14, -1403.685303, 8524.146484, 9.680, 0, ''), +(18210, 15, -1384.890503, 8542.014648, 11.180, 0, ''), +(18210, 16, -1382.286133, 8539.869141, 11.139, 7500, 'SAY_MAG_COMPLETE'), +(18210, 17, -1361.224609, 8521.440430, 11.144, 0, ''), +(18210, 18, -1324.803589, 8510.688477, 13.050, 0, ''), +(18210, 19, -1312.075439, 8492.709961, 14.235, 0, ''); diff --git a/sql/Updates/0.0.3/r1382_mangos.sql b/sql/Updates/0.0.3/r1382_mangos.sql new file mode 100644 index 000000000..bc00caadc --- /dev/null +++ b/sql/Updates/0.0.3/r1382_mangos.sql @@ -0,0 +1 @@ +UPDATE gameobject_template SET ScriptName='go_jump_a_tron' WHERE entry=183146; diff --git a/sql/Updates/0.0.3/r1383_scriptdev2.sql b/sql/Updates/0.0.3/r1383_scriptdev2.sql new file mode 100644 index 000000000..096634aa1 --- /dev/null +++ b/sql/Updates/0.0.3/r1383_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 8443+) '; diff --git a/sql/Updates/0.0.3/r1384_scriptdev2.sql b/sql/Updates/0.0.3/r1384_scriptdev2.sql new file mode 100644 index 000000000..f99eaf66e --- /dev/null +++ b/sql/Updates/0.0.3/r1384_scriptdev2.sql @@ -0,0 +1,88 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000495 AND -1000489; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000489,'Show our guest around Shattrath, will you? Keep an eye out for pickpockets in the lower city.',0,0,0,0,'SAY_KHAD_START'), +(-1000490,'A newcomer to Shattrath! Make sure to drop by later. We can always use a hand with the injured.',0,0,0,0,'SAY_KHAD_INJURED'), +(-1000491,'Be mindful of what you say, this one\'s being shown around by Khadgar\'s pet.',0,0,0,0,'SAY_KHAD_MIND_YOU'), +(-1000492,'Are you joking? I\'m a Scryer, I always watch what i say. More enemies than allies in this city, it seems.',0,0,0,0,'SAY_KHAD_MIND_ALWAYS'), +(-1000493,'Light be with you, $n. And welcome to Shattrath.',0,0,0,0,'SAY_KHAD_ALDOR_GREET'), +(-1000494,'We\'re rather selective of who we befriend, $n. You think you have what it takes?',0,0,0,0,'SAY_KHAD_SCRYER_GREET'), +(-1000495,'Khadgar himself is showing you around? You must have made a good impression, $n.',0,0,0,0,'SAY_KHAD_HAGGARD'); + +DELETE FROM script_waypoint WHERE entry=19685; +INSERT INTO script_waypoint VALUES +(19685, 0, -1860.536987, 5416.987793, -10.480, 2500, ''), +(19685, 1, -1855.899048, 5412.805664, -12.427, 0, 'SAY_KHAD_SERV_0'), +(19685, 2, -1845.518433, 5385.352539, -12.427, 0, ''), +(19685, 3, -1815.247803, 5340.255371, -12.427, 0, ''), +(19685, 4, -1799.338379, 5312.777344, -12.427, 0, ''), +(19685, 5, -1780.491455, 5278.535156, -33.877, 2500, 'pause'), +(19685, 6, -1776.057983, 5270.247559, -38.809, 0, ''), +(19685, 7, -1772.219727, 5262.777344, -38.810, 0, ''), +(19685, 8, -1762.195557, 5261.720215, -38.850, 0, ''), +(19685, 9, -1759.242798, 5259.751465, -40.208, 0, ''), +(19685, 10, -1743.427612, 5259.661621, -40.208, 0, ''), +(19685, 11, -1744.361816, 5251.179199, -44.523, 0, ''), +(19685, 12, -1740.121582, 5240.120117, -47.740, 0, ''), +(19685, 13, -1737.636719, 5238.288086, -49.793, 0, ''), +(19685, 14, -1727.411621, 5233.874512, -50.477, 0, ''), +(19685, 15, -1707.489746, 5230.437988, -51.050, 0, ''), +(19685, 16, -1684.122925, 5223.633301, -49.415, 0, ''), +(19685, 17, -1669.973267, 5221.929688, -46.336, 0, ''), +(19685, 18, -1662.870117, 5221.712891, -44.959, 0, ''), +(19685, 19, -1657.170410, 5225.206055, -45.708, 0, ''), +(19685, 20, -1645.025635, 5238.360352, -40.212, 0, ''), +(19685, 21, -1631.657471, 5252.759766, -40.962, 0, ''), +(19685, 22, -1631.368286, 5276.543945, -41.032, 0, ''), +(19685, 23, -1621.732544, 5298.553711, -40.209, 0, ''), +(19685, 24, -1615.498169, 5298.098145, -40.209, 2500, 'pause'), +(19685, 25, -1636.979370, 5302.677734, -40.209, 0, ''), +(19685, 26, -1655.330322, 5315.736328, -40.207, 0, ''), +(19685, 27, -1656.884155, 5321.649414, -40.209, 0, ''), +(19685, 28, -1663.975586, 5335.206055, -46.526, 0, ''), +(19685, 29, -1659.141602, 5359.131836, -45.846, 0, ''), +(19685, 30, -1644.207520, 5390.886230, -45.542, 0, ''), +(19685, 31, -1646.183594, 5405.273926, -44.649, 0, ''), +(19685, 32, -1650.202637, 5414.541992, -46.324, 0, ''), +(19685, 33, -1656.052490, 5424.683594, -40.461, 0, ''), +(19685, 34, -1661.628296, 5423.929199, -40.405, 0, ''), +(19685, 35, -1664.651855, 5423.659180, -38.848, 0, ''), +(19685, 36, -1681.772339, 5425.999512, -38.809, 0, ''), +(19685, 37, -1729.785767, 5427.246094, -12.445, 0, ''), +(19685, 38, -1735.371460, 5423.663086, -12.427, 0, ''), +(19685, 39, -1741.627075, 5386.767578, -12.427, 0, ''), +(19685, 40, -1764.786133, 5363.735840, -12.427, 0, ''), +(19685, 41, -1816.372314, 5340.664063, -12.427, 0, ''), +(19685, 42, -1880.022705, 5309.796387, -12.427, 0, ''), +(19685, 43, -1887.374146, 5315.426270, -12.427, 0, ''), +(19685, 44, -1888.768066, 5324.518066, -5.146, 0, ''), +(19685, 45, -1888.399170, 5334.149902, 0.151, 0, ''), +(19685, 46, -1890.221680, 5337.659668, 0.921, 0, ''), +(19685, 47, -1897.542725, 5323.042969, 1.256, 0, ''), +(19685, 48, -1900.250244, 5319.804688, 0.831, 0, ''), +(19685, 49, -1910.039673, 5291.258789, 1.288, 0, ''), +(19685, 50, -1915.219482, 5275.572266, 2.502, 2500, 'pause'), +(19685, 51, -1927.226196, 5273.250977, 2.703, 0, ''), +(19685, 52, -1926.980225, 5278.467285, 0.109, 0, ''), +(19685, 53, -1927.665894, 5299.210449, -12.427, 0, ''), +(19685, 54, -1922.841797, 5319.263672, -12.427, 0, ''), +(19685, 55, -1925.779053, 5347.405273, -12.427, 0, ''), +(19685, 56, -1954.912476, 5384.230957, -12.427, 0, ''), +(19685, 57, -1966.727295, 5428.203613, -12.427, 0, ''), +(19685, 58, -1979.477661, 5448.415527, -12.427, 0, ''), +(19685, 59, -1977.533569, 5453.861328, -12.385, 0, ''), +(19685, 60, -1968.064087, 5455.781250, -4.343, 0, ''), +(19685, 61, -1959.223145, 5454.895020, 0.202, 0, ''), +(19685, 62, -1954.629028, 5457.011230, 0.900, 0, ''), +(19685, 63, -1967.760010, 5464.953125, 1.220, 2500, 'pause'), +(19685, 64, -1952.874023, 5462.962402, 0.956, 0, ''), +(19685, 65, -1955.339478, 5467.116699, 0.445, 0, ''), +(19685, 66, -1962.033203, 5472.804688, -4.243, 0, ''), +(19685, 67, -1968.007690, 5480.914551, -12.427, 0, ''), +(19685, 68, -1945.900146, 5515.948242, -12.427, 0, ''), +(19685, 69, -1874.867310, 5549.783691, -12.427, 0, ''), +(19685, 70, -1840.641602, 5544.234375, -12.427, 0, ''), +(19685, 71, -1838.963501, 5536.059570, -5.639, 0, ''), +(19685, 72, -1839.582275, 5525.627930, 0.193, 0, ''), +(19685, 73, -1837.931763, 5521.119629, 0.844, 0, ''), +(19685, 74, -1829.182495, 5533.433594, 1.209, 2500, 'pause'), +(19685, 75, -1848.397095, 5476.073730, 0.856, 40000, 'end'); diff --git a/sql/Updates/0.0.3/r1385_mangos.sql b/sql/Updates/0.0.3/r1385_mangos.sql new file mode 100644 index 000000000..8fe47f339 --- /dev/null +++ b/sql/Updates/0.0.3/r1385_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_ancestral_wolf' WHERE entry=17077; diff --git a/sql/Updates/0.0.3/r1385_scriptdev2.sql b/sql/Updates/0.0.3/r1385_scriptdev2.sql new file mode 100644 index 000000000..ee8ebcd93 --- /dev/null +++ b/sql/Updates/0.0.3/r1385_scriptdev2.sql @@ -0,0 +1,59 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000498 AND -1000496; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000496,'%s lifts its head into the air, as if listening for something.',0,2,0,0,'ancestral wolf EMOTE_WOLF_LIFT_HEAD'), +(-1000497,'%s lets out a howl that rings across the mountains to the north and motions for you to follow.',0,2,0,0,'ancestral wolf EMOTE_WOLF_HOWL'), +(-1000498,'Welcome, kind spirit. What has brought you to us?',0,0,0,0,'ancestral wolf SAY_WOLF_WELCOME'); + +DELETE FROM script_waypoint WHERE entry=17077; +INSERT INTO script_waypoint VALUES +(17077, 0, -16.950142, 3801.409424, 95.064, 5000, 'EMOTE_WOLF_LIFT_HEAD'), +(17077, 1, -15.577404, 3805.170898, 94.833, 2500, ''), +(17077, 2, -20.011766, 3806.609863, 92.476, 5000, 'EMOTE_WOLF_HOWL'), +(17077, 3, -18.594666, 3816.207764, 91.482, 0, ''), +(17077, 4, -19.293468, 3838.218750, 85.012, 0, ''), +(17077, 5, -16.504408, 3871.034668, 82.327, 0, ''), +(17077, 6, 2.064510, 3898.678711, 85.623, 0, ''), +(17077, 7, 16.403864, 3921.174072, 86.024, 0, ''), +(17077, 8, 47.307926, 3932.001465, 83.302, 0, ''), +(17077, 9, 90.067230, 3942.906250, 77.000, 0, ''), +(17077, 10, 106.886024, 3944.388428, 76.502, 0, ''), +(17077, 11, 139.085480, 3941.897217, 80.617, 0, ''), +(17077, 12, 150.092346, 3942.782959, 80.399, 0, ''), +(17077, 13, 193.511475, 3950.396484, 74.366, 0, ''), +(17077, 14, 226.274948, 3958.003418, 73.257, 0, ''), +(17077, 15, 246.686981, 3963.309326, 76.376, 0, ''), +(17077, 16, 264.206177, 3977.726563, 83.704, 0, ''), +(17077, 17, 279.857422, 3986.417236, 88.245, 0, ''), +(17077, 18, 304.039642, 3998.354004, 95.649, 0, ''), +(17077, 19, 328.071503, 3995.832764, 104.434, 0, ''), +(17077, 20, 347.485229, 3990.817627, 113.608, 0, ''), +(17077, 21, 351.257202, 3954.260254, 125.747, 0, ''), +(17077, 22, 345.625977, 3932.016113, 132.358, 0, ''), +(17077, 23, 347.971893, 3908.549561, 135.520, 0, ''), +(17077, 24, 351.887878, 3891.062744, 139.957, 0, ''), +(17077, 25, 346.116852, 3864.634277, 146.647, 0, ''), +(17077, 26, 330.012360, 3839.859375, 154.148, 0, ''), +(17077, 27, 297.250610, 3811.855225, 166.893, 0, ''), +(17077, 28, 290.783112, 3800.188477, 172.130, 0, ''), +(17077, 29, 288.125427, 3782.474365, 180.825, 0, ''), +(17077, 30, 296.817841, 3771.629639, 184.961, 0, ''), +(17077, 31, 305.256256, 3765.380615, 185.360, 0, ''), +(17077, 32, 311.447906, 3757.902100, 184.312, 0, ''), +(17077, 33, 325.258026, 3730.282227, 184.076, 0, ''), +(17077, 34, 341.158630, 3717.757080, 183.904, 0, ''), +(17077, 35, 365.589020, 3717.200684, 183.902, 0, ''), +(17077, 36, 387.395081, 3731.750732, 183.645, 0, ''), +(17077, 37, 396.574127, 3732.604248, 179.831, 0, ''), +(17077, 38, 404.303192, 3737.313232, 180.151, 0, ''), +(17077, 39, 410.995972, 3742.286865, 183.364, 0, ''), +(17077, 40, 434.904541, 3761.058838, 186.219, 0, ''), +(17077, 41, 460.128815, 3774.436768, 186.348, 0, ''), +(17077, 42, 467.643951, 3788.506104, 186.446, 0, ''), +(17077, 43, 491.551666, 3815.446777, 189.848, 0, ''), +(17077, 44, 496.957855, 3836.875244, 193.078, 0, ''), +(17077, 45, 502.889191, 3855.458740, 194.834, 0, ''), +(17077, 46, 508.208466, 3863.689453, 194.024, 0, ''), +(17077, 47, 528.907593, 3887.348633, 189.762, 0, ''), +(17077, 48, 527.722229, 3890.686523, 189.240, 0, ''), +(17077, 49, 524.637329, 3891.768066, 189.149, 0, ''), +(17077, 50, 519.146057, 3886.701660, 190.128, 60000, 'SAY_WOLF_WELCOME'); diff --git a/sql/Updates/0.0.3/r1386_mangos.sql b/sql/Updates/0.0.3/r1386_mangos.sql new file mode 100644 index 000000000..b0d96c64b --- /dev/null +++ b/sql/Updates/0.0.3/r1386_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_morokk' WHERE entry=4500; diff --git a/sql/Updates/0.0.3/r1386_scriptdev2.sql b/sql/Updates/0.0.3/r1386_scriptdev2.sql new file mode 100644 index 000000000..2c7315f84 --- /dev/null +++ b/sql/Updates/0.0.3/r1386_scriptdev2.sql @@ -0,0 +1,15 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000500 AND -1000499; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000499,'Puny $r wanna fight %s? Me beat you! Me boss here!',0,0,1,0,'morokk SAY_MOR_CHALLENGE'), +(-1000500,'Me scared! Me run now!',0,1,0,0,'morokk SAY_MOR_SCARED'); + +DELETE FROM script_waypoint WHERE entry=4500; +INSERT INTO script_waypoint VALUES +(4500, 0, -3125.597168, -2885.673828, 34.731, 2500, ''), +(4500, 1, -3120.257080, -2877.830322, 34.917, 0, ''), +(4500, 2, -3116.487305, -2850.670410, 34.869, 0, ''), +(4500, 3, -3093.474854, -2819.189697, 34.432, 0, ''), +(4500, 4, -3104.726318, -2802.020996, 33.954, 0, ''), +(4500, 5, -3105.906006, -2780.234375, 34.469, 0, ''), +(4500, 6, -3116.080811, -2757.902588, 34.734, 0, ''), +(4500, 7, -3125.234375, -2733.960205, 33.189, 0, ''); diff --git a/sql/Updates/0.0.3/r1388_mangos.sql b/sql/Updates/0.0.3/r1388_mangos.sql new file mode 100644 index 000000000..04079f26a --- /dev/null +++ b/sql/Updates/0.0.3/r1388_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='npc_muglash' WHERE entry=12717; +UPDATE gameobject_template SET ScriptName='go_naga_brazier' WHERE entry=178247; diff --git a/sql/Updates/0.0.3/r1388_scriptdev2.sql b/sql/Updates/0.0.3/r1388_scriptdev2.sql new file mode 100644 index 000000000..30d28f81c --- /dev/null +++ b/sql/Updates/0.0.3/r1388_scriptdev2.sql @@ -0,0 +1,45 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000510 AND -1000501; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000501,'Are you sure that you are ready? If we do not have a group of your allies to aid us, we will surely fail.',0,0,1,0,'muglash SAY_MUG_START1'), +(-1000502,'This will be a though fight, $n. Follow me closely.',0,0,1,0,'muglash SAY_MUG_START2'), +(-1000503,'This is the brazier, $n. Put it out. Vorsha is a beast, worthy of praise from no one!',0,0,1,0,'muglash SAY_MUG_BRAZIER'), +(-1000504,'Now we must wait. It won\'t be long before the naga realize what we have done.',0,0,1,0,'muglash SAY_MUG_BRAZIER_WAIT'), +(-1000505,'Be on your guard, $n!',0,0,1,0,'muglash SAY_MUG_ON_GUARD'), +(-1000506,'Perhaps we will get a moment to rest. But i will not give up until we have faced off against Vorsha!',0,0,1,0,'muglash SAY_MUG_REST'), +(-1000507,'We have done it!',0,0,1,0,'muglash SAY_MUG_DONE'), +(-1000508,'You have my deepest gratitude. I thank you.',0,0,1,0,'muglash SAY_MUG_GRATITUDE'), +(-1000509,'I am going to patrol the area for a while longer and ensure that things are truly safe.',0,0,1,0,'muglash SAY_MUG_PATROL'), +(-1000510,'Please return to Zoram\'gar and report our success to the Warsong runner.',0,0,1,0,'muglash SAY_MUG_RETURN'); + +DELETE FROM script_waypoint WHERE entry=12717; +INSERT INTO script_waypoint VALUES +(12717, 0, 3346.247070, 1007.879028, 3.590, 0, 'SAY_MUG_START2'), +(12717, 1, 3367.388428, 1011.505859, 3.720, 0, ''), +(12717, 2, 3418.636963, 1013.963684, 2.905, 0, ''), +(12717, 3, 3426.844971, 1015.097534, 3.449, 0, ''), +(12717, 4, 3437.025391, 1020.786194, 2.742, 0, ''), +(12717, 5, 3460.563721, 1024.256470, 1.353, 0, ''), +(12717, 6, 3479.869629, 1037.957153, 1.023, 0, ''), +(12717, 7, 3490.526367, 1043.346313, 3.338, 0, ''), +(12717, 8, 3504.282959, 1047.772339, 8.205, 0, ''), +(12717, 9, 3510.733398, 1049.790771, 12.143, 0, ''), +(12717, 10, 3514.411133, 1051.167725, 13.235, 0, ''), +(12717, 11, 3516.939697, 1052.911377, 12.918, 0, ''), +(12717, 12, 3523.635742, 1056.297485, 7.563, 0, ''), +(12717, 13, 3531.939941, 1059.863525, 6.175, 0, ''), +(12717, 14, 3535.475342, 1069.959473, 1.697, 0, ''), +(12717, 15, 3546.978027, 1093.485474, 0.680, 0, ''), +(12717, 16, 3549.729980, 1101.882446, -1.123, 0, ''), +(12717, 17, 3555.140137, 1116.985718, -4.326, 0, ''), +(12717, 18, 3571.940430, 1132.175781, -0.634, 0, ''), +(12717, 19, 3574.283203, 1137.575928, 3.684, 0, ''), +(12717, 20, 3579.312744, 1137.252319, 8.205, 0, ''), +(12717, 21, 3590.218994, 1143.646973, 8.291, 0, ''), +(12717, 22, 3595.972900, 1145.827148, 6.773, 0, ''), +(12717, 23, 3603.650391, 1146.920776, 9.763, 0, ''), +(12717, 24, 3607.081787, 1146.014282, 10.692, 5000, 'SAY_MUG_BRAZIER'), +(12717, 25, 3614.518555, 1142.629150, 10.248, 0, ''), +(12717, 26, 3616.660889, 1140.837036, 10.682, 3000, 'SAY_MUG_PATROL'), +(12717, 27, 3621.078613, 1138.109497, 10.369, 0, 'SAY_MUG_RETURN'), +(12717, 28, 3615.478516, 1145.525879, 9.614, 0, ''), +(12717, 29, 3607.188232, 1152.715942, 8.871, 0, ''); diff --git a/sql/Updates/0.0.3/r1391_mangos.sql b/sql/Updates/0.0.3/r1391_mangos.sql new file mode 100644 index 000000000..5cb504b25 --- /dev/null +++ b/sql/Updates/0.0.3/r1391_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_letoll' WHERE entry=22458; diff --git a/sql/Updates/0.0.3/r1391_scriptdev2.sql b/sql/Updates/0.0.3/r1391_scriptdev2.sql new file mode 100644 index 000000000..e9f2f8f7b --- /dev/null +++ b/sql/Updates/0.0.3/r1391_scriptdev2.sql @@ -0,0 +1,50 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000531 AND -1000511; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000511,'Aright, listen up! Form a circle around me and move out!',0,0,0,0,'letoll SAY_LE_START'), +(-1000512,'Aright, $r, just keep us safe from harm while we work. We\'ll pay you when we return.',0,0,0,0,'letoll SAY_LE_KEEP_SAFE'), +(-1000513,'The dig site is just north of here.',0,0,0,0,'letoll SAY_LE_NORTH'), +(-1000514,'We\'re here! Start diggin\'!',0,0,0,0,'letoll SAY_LE_ARRIVE'), +(-1000515,'I think there\'s somethin\' buried here, beneath the sand!',0,0,0,0,'letoll SAY_LE_BURIED'), +(-1000516,'Almost got it!',0,0,0,0,'letoll SAY_LE_ALMOST'), +(-1000517,'By brann\'s brittle bananas! What is it!? It... It looks like a drum.',0,0,0,0,'letoll SAY_LE_DRUM'), +(-1000518,'Wow... a drum.',0,0,0,0,'letoll SAY_LE_DRUM_REPLY'), +(-1000519,'This discovery will surely rock the foundation of modern archaeology.',0,0,0,0,'letoll SAY_LE_DISCOVERY'), +(-1000520,'Yea, great. Can we leave now? This desert is giving me hives.',0,0,0,0,'letoll SAY_LE_DISCOVERY_REPLY'), +(-1000521,'Have ye gone mad? You expect me to leave behind a drum without first beatin\' on it? Not this son of Ironforge! No sir!',0,0,0,0,'letoll SAY_LE_NO_LEAVE'), +(-1000522,'This reminds me of that one time where you made us search Silithus for evidence of sand gnomes.',0,0,0,0,'letoll SAY_LE_NO_LEAVE_REPLY1'), +(-1000523,'Or that time when you told us that you\'d discovered the cure for the plague of the 20th century. What is that even? 20th century?',0,0,0,0,'letoll SAY_LE_NO_LEAVE_REPLY2'), +(-1000524,'I don\'t think it can top the one time where he told us that he\'d heard that Artha\'s "cousin\'s" skeleton was frozen beneath a glacier in Winterspring. I\'ll never forgive you for that one, Letoll. I mean honestly... Artha\'s cousin?',0,0,0,0,'letoll SAY_LE_NO_LEAVE_REPLY3'), +(-1000525,'I dunno. It can\'t possibly beat the time he tried to convince us that we\'re all actually a figment of some being\'s imagination and that they only use us for their own personal amusement. That went over well during dinner with the family.',0,0,0,0,'letoll SAY_LE_NO_LEAVE_REPLY4'), +(-1000526,'Shut yer yaps! I\'m gonna bang on this drum and that\'s that!',0,0,0,0,'letoll SAY_LE_SHUT'), +(-1000527,'Say, do you guys hear that?',0,0,0,0,'letoll SAY_LE_REPLY_HEAR'), +(-1000528,'IN YOUR FACE! I told you there was somethin\' here!',0,0,0,0,'letoll SAY_LE_IN_YOUR_FACE'), +(-1000529,'Don\'t just stand there! Help him out!',0,0,0,0,'letoll SAY_LE_HELP_HIM'), +(-1000530,'%s picks up the drum.',0,2,0,0,'letoll EMOTE_LE_PICK_UP'), +(-1000531,'You\'ve been a tremendous help, $r! Let\'s get out of here before more of those things show up! I\'ll let Dwarfowitz know you did the job asked of ya\' admirably.',0,0,0,0,'letoll SAY_LE_THANKS'); + +DELETE FROM script_waypoint WHERE entry=22458; +INSERT INTO script_waypoint VALUES +(22458, 0, -3739.907959, 5393.691895, -4.213, 5000, 'SAY_LE_KEEP_SAFE'), +(22458, 1, -3733.334229, 5389.243164, -5.331, 0, ''), +(22458, 2, -3728.771729, 5385.649414, -3.704, 0, ''), +(22458, 3, -3717.267090, 5379.179199, -4.400, 0, ''), +(22458, 4, -3705.626465, 5379.261719, -7.711, 0, ''), +(22458, 5, -3688.279541, 5379.716309, -9.400, 0, ''), +(22458, 6, -3649.186523, 5389.111816, -11.917, 0, ''), +(22458, 7, -3612.791504, 5392.812500, -13.655, 0, ''), +(22458, 8, -3574.865479, 5412.704590, -16.543, 0, ''), +(22458, 9, -3564.438232, 5422.615723, -16.104, 0, ''), +(22458, 10, -3553.387695, 5444.732910, -12.184, 2500, 'arivve dig site SAY_LE_ARRIVE'), +(22458, 11, -3557.291016, 5465.319336, -9.282, 7500, 'dig 1'), +(22458, 12, -3548.102051, 5453.417969, -12.282, 10000, 'dig 2 SAY_LE_BURIED pause'), +(22458, 13, -3556.580322, 5446.475098, -11.920, 0, 'start returning'), +(22458, 14, -3564.438232, 5422.615723, -16.104, 0, ''), +(22458, 15, -3574.865479, 5412.704590, -16.543, 0, ''), +(22458, 16, -3612.791504, 5392.812500, -13.655, 0, ''), +(22458, 17, -3649.186523, 5389.111816, -11.917, 0, ''), +(22458, 18, -3688.279541, 5379.716309, -9.400, 0, ''), +(22458, 19, -3705.626465, 5379.261719, -7.711, 0, ''), +(22458, 20, -3717.267090, 5379.179199, -4.400, 0, ''), +(22458, 21, -3728.771729, 5385.649414, -3.704, 0, ''), +(22458, 22, -3733.334229, 5389.243164, -5.331, 0, ''), +(22458, 23, -3739.907959, 5393.691895, -4.213, 0, ''); diff --git a/sql/Updates/0.0.3/r1392_mangos.sql b/sql/Updates/0.0.3/r1392_mangos.sql new file mode 100644 index 000000000..76ccdf5a6 --- /dev/null +++ b/sql/Updates/0.0.3/r1392_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='mob_torloth' WHERE entry=22076; +UPDATE creature_template SET ScriptName='npc_lord_illidan_stormrage' WHERE entry=22083; diff --git a/sql/Updates/0.0.3/r1392_scriptdev2.sql b/sql/Updates/0.0.3/r1392_scriptdev2.sql new file mode 100644 index 000000000..82b2b9c1f --- /dev/null +++ b/sql/Updates/0.0.3/r1392_scriptdev2.sql @@ -0,0 +1,11 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000540 AND -1000532; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000532,'At your command, my liege...',0,0,0,0,'torloth TORLOTH_DIALOGUE1'), +(-1000533,'As you desire, Lord Illidan.',0,0,0,0,'torloth TORLOTH_DIALOGUE2'), +(-1000534,'Yes, Lord Illidan, I would sacrifice to you this magnificent physique. On this day you will fall - another victim of Torloth...',0,0,0,0,'torloth TORLOTH_DIALOGUE3'), +(-1000535,'Destroy them, Torloth. Let lose their blood like a river upon this hallowed ground.',0,0,0,0,'lordillidan ILLIDAN_DIALOGUE'), +(-1000536,'What manner of fool dares stand before Illidan Stormrage? Soldiers, destroy these insects!',0,1,0,0,'lordillidan ILLIDAN_SUMMON1'), +(-1000537,'You are no challenge for the Crimson Sigil. Mind breakers, end this nonsense.',0,1,0,0,'lordillidan ILLIDAN_SUMMON2'), +(-1000538,'Run while you still can. The highlords come soon...',0,1,0,0,'lordillidan ILLIDAN_SUMMON3'), +(-1000539,'Torloth your master calls!',0,1,0,0,'lordillidan ILLIDAN_SUMMON4'), +(-1000540,'So you have defeated the Crimson Sigil. You now seek to challenge my rule? Not even Arthas could defeat me, yet you dare to even harbor such thoughts? Then I say to you, come! Come $N! The Black Temple awaits...',0,1,0,0,'lordillidan EVENT_COMPLETED'); diff --git a/sql/Updates/0.0.3/r1394_mangos.sql b/sql/Updates/0.0.3/r1394_mangos.sql new file mode 100644 index 000000000..9d0bbf63a --- /dev/null +++ b/sql/Updates/0.0.3/r1394_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='npc_kitten' WHERE entry=9937; +UPDATE creature_template SET ScriptName='npc_corrupt_saber' WHERE entry=10042; diff --git a/sql/Updates/0.0.3/r1394_scriptdev2.sql b/sql/Updates/0.0.3/r1394_scriptdev2.sql new file mode 100644 index 000000000..d200268d4 --- /dev/null +++ b/sql/Updates/0.0.3/r1394_scriptdev2.sql @@ -0,0 +1,4 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000542 AND -1000541; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000541,'%s jumps into the moonwell and goes underwater...',0,2,0,0,'kitten EMOTE_SAB_JUMP'), +(-1000542,'%s follows $n obediertly.',0,2,0,0,'kitten EMOTE_SAB_FOLLOW'); diff --git a/sql/Updates/0.0.3/r1405_mangos.sql b/sql/Updates/0.0.3/r1405_mangos.sql new file mode 100644 index 000000000..268a06795 --- /dev/null +++ b/sql/Updates/0.0.3/r1405_mangos.sql @@ -0,0 +1,4 @@ +UPDATE creature_template SET ScriptName='boss_gortok' WHERE entry=26687; +UPDATE creature_template SET ScriptName='boss_skadi' WHERE entry=26693; +UPDATE creature_template SET ScriptName='boss_svala' WHERE entry=29281; +UPDATE creature_template SET ScriptName='boss_ymiron' WHERE entry=26861; diff --git a/sql/Updates/0.0.3/r1405_scriptdev2.sql b/sql/Updates/0.0.3/r1405_scriptdev2.sql new file mode 100644 index 000000000..a0c2f4db4 --- /dev/null +++ b/sql/Updates/0.0.3/r1405_scriptdev2.sql @@ -0,0 +1,43 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1575040 AND -1575000; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1575000,'My liege! I have done as you asked, and now beseech you for your blessing!',13856,1,0,0,'svala SAY_INTRO_1'), +(-1575001,'Your sacrifice is a testament to your obedience. Indeed you are worthy of this charge. Arise, and forever be known as Svala Sorrowgrave!',14732,1,0,0,'svala SAY_INTRO_2_ARTHAS'), +(-1575002,'The sensation is... beyond my imagining. I am yours to command, my king.',13857,1,0,0,'svala SAY_INTRO_3'), +(-1575003,'Your first test awaits you. Destroy our uninvited guests.',14733,1,0,0,'svala SAY_INTRO_4_ARTHAS'), +(-1575004,'I will be happy to slaughter them in your name! Come, enemies of the Scourge! I will show you the might of the Lich King!',13858,1,0,0,'svala SAY_INTRO_5'), +(-1575005,'I will vanquish your soul!',13842,1,0,0,'svala SAY_AGGRO'), +(-1575006,'You were a fool to challenge the power of the Lich King!',13845,1,0,0,'svala SAY_SLAY_1'), +(-1575007,'Your will is done, my king.',13847,1,0,0,'svala SAY_SLAY_2'), +(-1575008,'Another soul for my master.',13848,1,0,0,'svala SAY_SLAY_3'), +(-1575009,'Your death approaches.',13850,1,0,0,'svala SAY_SACRIFICE_1'), +(-1575010,'Go now to my master.',13851,1,0,0,'svala SAY_SACRIFICE_2'), +(-1575011,'Your end is inevitable.',13852,1,0,0,'svala SAY_SACRIFICE_3'), +(-1575012,'Yor-guul mak!',13853,1,0,0,'svala SAY_SACRIFICE_4'), +(-1575013,'Any last words?',13854,1,0,0,'svala SAY_SACRIFICE_5'), +(-1575014,'Nooo! I did not come this far... to...',13855,1,0,0,'svala SAY_DEATH'), +(-1575015,'What this place? I will destroy you!',13464,1,0,0,'gortok SAY_AGGRO'), +(-1575016,'You die! That what master wants!',13465,1,0,0,'gortok SAY_SLAY_1'), +(-1575017,'An easy task!',13466,1,0,0,'gortok SAY_SLAY_2'), +(-1575018,' ',13467,1,0,0,'gortok SAY_DEATH'), +(-1575019,'What mongrels dare intrude here? Look alive, my brothers! A feast for the one that brings me their heads!',13497,1,0,0,'skadi SAY_AGGRO'), +(-1575020,'Sear them to the bone!',13498,1,0,0,'skadi SAY_DRAKEBREATH_1'), +(-1575021,'Go now! Leave nothing but ash in your wake!',13499,1,0,0,'skadi SAY_DRAKEBREATH_2'), +(-1575022,'Cleanse our sacred halls with flame!',13500,1,0,0,'skadi SAY_DRAKEBREATH_3'), +(-1575023,'I ask for ... to kill them, yet all I get is feeble whelps! By Ye.. SLAUGHTER THEM!',13501,1,0,0,'skadi SAY_DRAKE_HARPOON_1'), +(-1575024,'If one more harpoon touches my drake I\'ll flae my miserable heins.',13502,1,0,0,'skadi SAY_DRAKE_HARPOON_2'), +(-1575025,'Mjor Na Ul Kaval!',13503,1,0,0,'skadi SAY_KILL_1'), +(-1575026,'Not so brash now, are you?',13504,1,0,0,'skadi SAY_KILL_2'), +(-1575027,'I\'ll mount your skull from the highest tower!',13505,1,0,0,'skadi SAY_KILL_3'), +(-1575028,'ARGH! You call that... an attack? I\'ll... show... aghhhh...',13506,1,0,0,'skadi SAY_DEATH'), +(-1575029,'You motherless knaves! Your corpses will make fine morsels for my new drake!',13507,1,0,0,'skadi SAY_DRAKE_DEATH'), +(-1575030,'%s is within range of the harpoon launchers!',0,3,0,0,'skadi EMOTE_HARPOON_RANGE'), +(-1575031,'You invade my home and then dare to challenge me? I will tear the hearts from your chests and offer them as gifts to the death god! Rualg nja gaborr!',13609,1,0,0,'ymiron SAY_AGGRO'), +(-1575032,'Bjorn of the Black Storm! Honor me now with your presence!',13610,1,0,0,'ymiron SAY_SUMMON_BJORN'), +(-1575033,'Haldor of the rocky cliffs, grant me your strength!',13611,1,0,0,'ymiron SAY_SUMMON_HALDOR'), +(-1575034,'Ranulf of the screaming abyss, snuff these maggots with darkest night!',13612,1,0,0,'ymiron SAY_SUMMON_RANULF'), +(-1575035,'Tor of the Brutal Siege! Bestow your might upon me!',13613,1,0,0,'ymiron SAY_SUMMON_TORGYN'), +(-1575036,'Your death is only the beginning!',13614,1,0,0,'ymiron SAY_SLAY_1'), +(-1575037,'You have failed your people!',13615,1,0,0,'ymiron SAY_SLAY_2'), +(-1575038,'There is a reason I am king!',13616,1,0,0,'ymiron SAY_SLAY_3'), +(-1575039,'Bleed no more!',13617,1,0,0,'ymiron SAY_SLAY_4'), +(-1575040,'What... awaits me... now?',13618,1,0,0,'ymiron SAY_DEATH'); diff --git a/sql/Updates/0.0.3/r1406_mangos.sql b/sql/Updates/0.0.3/r1406_mangos.sql new file mode 100644 index 000000000..abf0ff398 --- /dev/null +++ b/sql/Updates/0.0.3/r1406_mangos.sql @@ -0,0 +1 @@ +UPDATE instance_template SET script='instance_ulduar' WHERE map=603; diff --git a/sql/Updates/0.0.3/r1408_mangos.sql b/sql/Updates/0.0.3/r1408_mangos.sql new file mode 100644 index 000000000..e19d63878 --- /dev/null +++ b/sql/Updates/0.0.3/r1408_mangos.sql @@ -0,0 +1,4 @@ +UPDATE creature_template SET ScriptName='boss_colossus' WHERE entry=29307; +UPDATE creature_template SET ScriptName='boss_galdarah' WHERE entry=29306; +UPDATE creature_template SET ScriptName='boss_moorabi' WHERE entry=29305; +UPDATE creature_template SET ScriptName='boss_sladran' WHERE entry=29304; diff --git a/sql/Updates/0.0.3/r1408_scriptdev2.sql b/sql/Updates/0.0.3/r1408_scriptdev2.sql new file mode 100644 index 000000000..07236330a --- /dev/null +++ b/sql/Updates/0.0.3/r1408_scriptdev2.sql @@ -0,0 +1,31 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1604028 AND -1604000; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1604000,'Drakkari gonna kill anybody who trespass on these lands!',14443,1,0,0,'sladran SAY_AGGRO'), +(-1604001,'Minions of the scale, heed my call!',14444,1,0,0,'sladran SAY_SUMMON_SNAKE'), +(-1604002,'Our thousand fangs gonna rend your flesh! ',14445,1,0,0,'sladran SAY_SUMMON_CONSTRICT'), +(-1604003,'Ye not breathin\'! Good.',14446,1,0,0,'sladran SAY_SLAY_1'), +(-1604004,'You scared now?',14447,1,0,0,'sladran SAY_SLAY_2'), +(-1604005,'I\'ll eat you next, mon!',14448,1,0,0,'sladran SAY_SLAY_3'), +(-1604006,'I sssee now... Ssscourge wasss not... our greatessst enemy...',14449,1,0,0,'sladran SAY_DEATH'), +(-1604007,'%s begins to cast Poison Nova!',0,3,0,0,'sladran EMOTE_NOVA'), +(-1604008,'%s surges forward!',0,2,0,0,'colossus EMOTE_SURGE'), +(-1604009,'%s seep into the ground.',0,2,0,0,'colossus EMOTE_SEEP'), +(-1604010,'%s begins to glow faintly.',0,2,0,0,'colossus EMOTE_GLOW'), +(-1604011,'We fought back da Scourge. What chance joo be thinkin\' JOO got?',14721,1,0,0,'moorabi SAY_AGGRO'), +(-1604012,'Da ground gonna swallow you up! ',14723,1,0,0,'moorabi SAY_QUAKE'), +(-1604013,'Get ready for somethin\'... much... BIGGAH!',14722,1,0,0,'moorabi SAY_TRANSFORM'), +(-1604014,'I crush you, cockroaches!',14725,1,0,0,'moorabi SAY_SLAY_1'), +(-1604015,'Who gonna stop me; you?',14726,1,0,0,'moorabi SAY_SLAY_2'), +(-1604016,'Not so tough now.',14727,1,0,0,'moorabi SAY_SLAY_3'), +(-1604017,'If our gods can die... den so can we...',14728,1,0,0,'moorabi SAY_DEATH'), +(-1604018,'%s begins to transform!',0,3,0,0,'moorabi EMOTE_TRANSFORM'), +(-1604019,'I\'m gonna spill your guts, mon!',14430,1,0,0,'galdarah SAY_AGGRO'), +(-1604020,'Ain\'t gonna be nottin\' left after this!',14431,1,0,0,'galdarah SAY_TRANSFORM_1'), +(-1604021,'You wanna see power? I\'m gonna show you power!',14432,1,0,0,'galdarah SAY_TRANSFORM_2'), +(-1604022,'Gut them! Impale them!',14433,1,0,0,'galdarah SAY_SUMMON_1'), +(-1604023,'Kill them all!',14434,1,0,0,'galdarah SAY_SUMMON_2'), +(-1604024,'Say hello to my BIG friend!',14435,1,0,0,'galdarah SAY_SUMMON_3'), +(-1604025,'What a rush!',14436,1,0,0,'galdarah SAY_SLAY_1'), +(-1604026,'Who needs gods, when WE ARE GODS!',14437,1,0,0,'galdarah SAY_SLAY_2'), +(-1604027,'I told ya so!',14438,1,0,0,'galdarah SAY_SLAY_3'), +(-1604028,'Even the mighty... can fall.',14439,1,0,0,'galdarah SAY_DEATH'); diff --git a/sql/Updates/0.0.3/r1409_mangos.sql b/sql/Updates/0.0.3/r1409_mangos.sql new file mode 100644 index 000000000..f128ba880 --- /dev/null +++ b/sql/Updates/0.0.3/r1409_mangos.sql @@ -0,0 +1,3 @@ +UPDATE creature_template SET ScriptName='boss_novos' WHERE entry=26631; +UPDATE creature_template SET ScriptName='boss_tharonja' WHERE entry=26632; +UPDATE creature_template SET ScriptName='boss_trollgore' WHERE entry=26630; diff --git a/sql/Updates/0.0.3/r1409_scriptdev2.sql b/sql/Updates/0.0.3/r1409_scriptdev2.sql new file mode 100644 index 000000000..4b6b6d100 --- /dev/null +++ b/sql/Updates/0.0.3/r1409_scriptdev2.sql @@ -0,0 +1,22 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1600019 AND -1600000; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1600000,'More grunts, more glands, more FOOD!',13181,1,0,0,'trollgore SAY_AGGRO'), +(-1600001,'So hungry! Must feed!',13182,1,0,0,'trollgore SAY_CONSUME'), +(-1600002,'Aaaargh...',13183,1,0,0,'trollgore SAY_DEATH'), +(-1600003,'Corpse go boom!',13184,1,0,0,'trollgore SAY_EXPLODE'), +(-1600004,'You have gone, me gonna eat you!',13185,1,0,0,'trollgore SAY_KILL'), +(-1600005,'The chill that you feel is the herald of your doom!',13173,1,0,0,'novos SAY_AGGRO'), +(-1600006,'Your efforts... are in vain.',13174,1,0,0,'novos SAY_DEATH'), +(-1600007,'Such is the fate of all who oppose the Lich King.',13175,1,0,0,'novos SAY_KILL'), +(-1600008,'Bolster my defenses! Hurry, curse you!',13176,1,0,0,'novos SAY_ADDS'), +(-1600009,'Surely you can see the futility of it all!',13177,1,0,0,'novos SAY_BUBBLE_1'), +(-1600010,'Just give up and die already!',13178,1,0,0,'novos SAY_BUBBLE_2'), +(-1600011,'%s calls for assistance.',0,3,0,0,'novos EMOTE_ASSISTANCE'), +(-1600012,'Tharon\'ja sees all! The work of mortals shall not end the eternal dynasty!',13862,1,0,0,'tharonja SAY_AGGRO'), +(-1600013,'As Tharon\'ja predicted.',13863,1,0,0,'tharonja SAY_KILL_1'), +(-1600014,'As it was written.',13864,1,0,0,'tharonja SAY_KILL_2'), +(-1600015,'Your flesh serves Tharon\'ja now!',13865,1,0,0,'tharonja SAY_FLESH_1'), +(-1600016,'Tharon\'ja has a use for your mortal shell!',13866,1,0,0,'tharonja SAY_FLESH_2'), +(-1600017,'No! A taste... all too brief!',13867,1,0,0,'tharonja SAY_SKELETON_1'), +(-1600018,'Tharon\'ja will have more!',13868,1,0,0,'tharonja SAY_SKELETON_2'), +(-1600019,'Im... impossible! Tharon\'ja is eternal! Tharon\'ja... is...',13869,1,0,0,'tharonja SAY_DEATH'); diff --git a/sql/Updates/0.0.3/r1410_mangos.sql b/sql/Updates/0.0.3/r1410_mangos.sql new file mode 100644 index 000000000..5c1df6def --- /dev/null +++ b/sql/Updates/0.0.3/r1410_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='mob_vrykul_skeleton' WHERE entry=23970; diff --git a/sql/Updates/0.0.3/r1410_scriptdev2.sql b/sql/Updates/0.0.3/r1410_scriptdev2.sql new file mode 100644 index 000000000..e47d8191d --- /dev/null +++ b/sql/Updates/0.0.3/r1410_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM script_texts WHERE entry=-1574021; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1574021,'%s casts Frost Tomb on $N',0,3,0,0,'keleseth EMOTE_FROST_TOMB'); diff --git a/sql/Updates/0.0.3/r1411_mangos.sql b/sql/Updates/0.0.3/r1411_mangos.sql new file mode 100644 index 000000000..f332839a4 --- /dev/null +++ b/sql/Updates/0.0.3/r1411_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='boss_maiden_of_grief' WHERE entry=27975; +UPDATE creature_template SET ScriptName='boss_sjonnir' WHERE entry=27978; diff --git a/sql/Updates/0.0.3/r1411_scriptdev2.sql b/sql/Updates/0.0.3/r1411_scriptdev2.sql new file mode 100644 index 000000000..b12f7897e --- /dev/null +++ b/sql/Updates/0.0.3/r1411_scriptdev2.sql @@ -0,0 +1,14 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1599011 AND -1599000; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1599000,'Soft, vulnerable shells. Brief, fragile lives. You can not escape the curse of flesh!',14180,1,0,0,'sjonnir SAY_AGGRO'), +(-1599001,'???',14181,1,0,0,'sjonnir SAY_SLAY_1'), +(-1599002,'Flesh is no match for iron!',14182,1,0,0,'sjonnir SAY_SLAY_2'), +(-1599003,'Armies of iron will smother the world!',14183,1,0,0,'sjonnir SAY_SLAY_3'), +(-1599004,'Loken will not rest, until the forge is retaken. You changed nothing!',14184,1,0,0,'sjonnir SAY_DEATH'), +(-1599005,'You shouldn\'t have come...now you will die!',13487,1,0,0,'maiden SAY_AGGRO'), +(-1599006,'Why must it be this way?',13488,1,0,0,'maiden SAY_SLAY_1'), +(-1599007,'You had it coming!',13489,1,0,0,'maiden SAY_SLAY_2'), +(-1599008,'My burden grows heavier.',13490,1,0,0,'maiden SAY_SLAY_3'), +(-1599009,'This is your own fault!',13491,1,0,0,'maiden SAY_SLAY_4'), +(-1599010,'So much lost time... that you\'ll never get back!',13492,1,0,0,'maiden SAY_STUN'), +(-1599011,'I hope you all rot! I never...wanted...this.',13493,1,0,0,'maiden SAY_DEATH'); diff --git a/sql/Updates/0.0.3/r1412_mangos.sql b/sql/Updates/0.0.3/r1412_mangos.sql new file mode 100644 index 000000000..22e68ac87 --- /dev/null +++ b/sql/Updates/0.0.3/r1412_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_brann_hos' WHERE entry=28070; diff --git a/sql/Updates/0.0.3/r1412_scriptdev2.sql b/sql/Updates/0.0.3/r1412_scriptdev2.sql new file mode 100644 index 000000000..8d79c58bf --- /dev/null +++ b/sql/Updates/0.0.3/r1412_scriptdev2.sql @@ -0,0 +1,89 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1599064 AND -1599012; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1599012,'Now that\'s owning your supper!',14244,1,0,0,'brann SAY_KILL_1'), +(-1599013,'Press on, that\'s the way!',14245,1,0,0,'brann SAY_KILL_2'), +(-1599014,'Keep it up now. Plenty of death-dealing for everyone!',14246,1,0,0,'brann SAY_KILL_3'), +(-1599015,'I\'m all kinds of busted up. Might not... make it...',14257,1,0,0,'brann SAY_LOW_HEALTH'), +(-1599016,'Not yet, not... yet-',14258,1,0,0,'brann SAY_DEATH'), +(-1599017,'I\'m doing everything I can!',14260,1,0,0,'brann SAY_PLAYER_DEATH_1'), +(-1599018,'Light preserve you!',14261,1,0,0,'brann SAY_PLAYER_DEATH_2'), +(-1599019,'I hope this is all worth it!',14262,1,0,0,'brann SAY_PLAYER_DEATH_3'), +(-1599020,'Time to get some answers! Let\'s get this show on the road!',14259,1,0,0,'brann SAY_ESCORT_START'), + +(-1599021,'Don\'t worry. Old Brann has got your back. Keep that metal monstrosity busy and I\'ll see if I can sweet talk this machine into helping you.',14274,1,0,0,'brann SAY_SPAWN_DWARF'), +(-1599022,'This is a wee bit trickier that before... Oh, bloody--incomin\'!',14275,1,0,0,'brann SAY_SPAWN_TROGG'), +(-1599023,'What in the name o\' Madoran did THAT do? Oh! Wait: I just about got it...',14276,1,0,0,'brann SAY_SPAWN_OOZE'), +(-1599024,'Ha, that did it. Help\'s a-coming. Take this you glow-eying brute!',14277,1,0,0,'brann SAY_SPAWN_EARTHEN'), + +(-1599025,'Take a moment and relish this with me! Soon all will be revealed! Okay then, lets do this!',14247,1,0,0,'brann SAY_EVENT_INTRO_1'), +(-1599026,'Now keep an eye out! I\'ll have this licked in two shakes of a--',14248,1,0,0,'brann SAY_EVENT_INTRO_2'), +(-1599027,'Warning! Life form pattern not recognized. Archival processing terminated. Continued interference will result in targeted response.',13765,1,0,0,'brann SAY_EVENT_INTRO_3_ABED'), + +(-1599028,'Oh, that doesn\'t sound good. We might have a complication or two...',14249,1,0,0,'brann SAY_EVENT_A_1'), +(-1599029,'Security breach in progress. Analysis of historical archives transferred to lower priority queue. Countermeasures engaged.',13756,1,0,0,'brann SAY_EVENT_A_2_KADD'), +(-1599030,'Ah, you want to play hardball, eh? That\'s just my game!',14250,1,0,0,'brann SAY_EVENT_A_3'), + +(-1599031,'Couple more minutes and I\'ll--',14251,1,0,0,'brann SAY_EVENT_B_1'), +(-1599032,'Threat index threshold exceeded. Celestial archive aborted. Security level heightened.',13761,1,0,0,'brann SAY_EVENT_B_2_MARN'), +(-1599033,'Heightened? What\'s the good news?',14252,1,0,0,'brann SAY_EVENT_B_3'), + +(-1599034,'So that was the problem? Now I\'m makin\' progress...',14253,1,0,0,'brann SAY_EVENT_C_1'), +(-1599035,'Critical threat index. Void analysis diverted. Initiating sanitization protocol.',13767,1,0,0,'brann SAY_EVENT_C_2_ABED'), +(-1599036,'Hang on! Nobody\'s gonna\' be sanitized as long as I have a say in it!',14254,1,0,0,'brann SAY_EVENT_C_3'), + +(-1599037,'Ha! The old magic fingers finally won through! Now let\'s get down to-',14255,1,0,0,'brann SAY_EVENT_D_1'), +(-1599038,'Alert! Security fail safes deactivated. Beginning memory purge...',13768,1,0,0,'brann SAY_EVENT_D_2_ABED'), +(-1599039,'Purge? No no no no no! Where did I-- Aha, this should do the trick...',14256,1,0,0,'brann SAY_EVENT_D_3'), +(-1599040,'System online. Life form pattern recognized. Welcome Branbronzan. Query?',13769,1,0,0,'brann SAY_EVENT_D_4_ABED'), + +(-1599041,'Query? What do you think Im here for? Tea and biscuits? Spill the beans already!',14263,1,0,0,'brann SAY_EVENT_END_01'), +(-1599042,'Tell me how that dwarfs came to be! And start at the beginning!',14264,1,0,0,'brann SAY_EVENT_END_02'), +(-1599043,'Accessing prehistoric data. Retrieved. In the beginning Earthen were created to-',13770,1,0,0,'brann SAY_EVENT_END_03_ABED'), +(-1599044,'Right, right! I know that the Earthen were made of stone to shape the deep reaches of the world but what about the anomalies? Matrix non-stabilizing and whatnot.',14265,1,0,0,'brann SAY_EVENT_END_04'), +(-1599045,'Accessing. In the early stages of its development cycle Azeroth suffered infection by parasitic, necrophotic symbiotes.',13771,1,0,0,'brann SAY_EVENT_END_05_ABED'), +(-1599046,'Necro-what? Speak bloody common will ya?',14266,1,0,0,'brann SAY_EVENT_END_06'), +(-1599047,'Designation: Old Gods. Old Gods rendered all systems, including Earthen defenseless in order to facilitate assimilation. This matrix destabilization has been termed the Curse of Flesh. Effects of destabilization increased over time.',13772,1,0,0,'brann SAY_EVENT_END_07_ABED'), +(-1599048,'Old Gods eh? So they zapped the Earthen with this Curse of Flesh. And then what?',14267,1,0,0,'brann SAY_EVENT_END_08'), +(-1599049,'Accessing. Creators arrived to extirpate symbiotic infection. Assessment revealed that Old God infestation had grown malignant. Excising parasites would result in loss of host.',13757,1,0,0,'brann SAY_EVENT_END_09_KADD'), +(-1599050,'If they killed the Old Gods Azeroth would have been destroyed.',14268,1,0,0,'brann SAY_EVENT_END_10'), +(-1599051,'Correct. Creators neutralized parasitic threat and contained it within the host. Forge of Wills and other systems were instituted to create new Earthen. Safeguards were implemented and protectors were appointed.',13758,1,0,0,'brann SAY_EVENT_END_11_KADD'), +(-1599052,'What protectors?',14269,1,0,0,'brann SAY_EVENT_END_12'), +(-1599053,'Designations: Aesir and Vanir or in common nomenclator Storm and Earth Giants. Sentinel Loken designated supreme. Dragon Aspects appointed to monitor evolution of Azeroth.',13759,1,0,0,'brann SAY_EVENT_END_13_KADD'), +(-1599054,'Aesir and Vanir. Okay. So the Forge of Wills started to make new Earthen. But what happened to the old ones?',14270,1,0,0,'brann SAY_EVENT_END_14'), +(-1599055,'Additional background is relevant to your query. Following global combat between-',13262,1,0,0,'brann SAY_EVENT_END_15_MARN'), +(-1599056,'Hold everything! The Aesir and Vanir went to war? Why?',14271,1,0,0,'brann SAY_EVENT_END_16'), +(-1599057,'Unknown. Data suggests that impetus for global combat originated with prime designate Loken who neutralized all remaining Aesir and Vanir affecting termination of conflict. Prime designate Loken then initiated stasis of several seed races including Earthen, Giant and Vrykul at designated holding facilities.',13263,1,0,0,'brann SAY_EVENT_END_17_MARN'), +(-1599058,'This Loken sounds like a nasty character. Glad we dont have to worry about the likes of him anymore. So if Im understanding you lads the original Earthen eventually woke up from this statis. And by that time this destabily-whatever had turned them into our brother dwarfs. Or at least dwarf ancestors. Hm?',14272,1,0,0,'brann SAY_EVENT_END_18'), +(-1599059,'Essentially that is correct.',13764,1,0,0,'brann SAY_EVENT_END_19_MARN'), +(-1599060,'Well now. Thats a lot to digest. Im gonna need some time to take all of this in. Thank you!',14273,1,0,0,'brann SAY_EVENT_END_20'), +(-1599061,'Acknowledged Branbronzan. Session terminated.',13773,1,0,0,'brann SAY_EVENT_END_21_ABED'), + +(-1599062,'Loken?! That\'s downright bothersome... We might\'ve neutralized the iron dwarves, but I\'d lay odds there\'s another machine somewhere else churnin\' out a whole mess o\' these iron vrykul!',14278,1,0,0,'brann SAY_VICTORY_SJONNIR_1'), +(-1599063,'I\'ll use the forge to make badtches o\' earthen to stand guard... But our greatest challenge still remains: find and stop Loken!',14279,1,0,0,'brann SAY_VICTORY_SJONNIR_2'), + +(-1599064,'I think it\'s time to see what\'s behind the door near the entrance. I\'m going to sneak over there, nice and quiet. Meet me at the door and I\'ll get us in.',0,1,0,0,'brann SAY_ENTRANCE_MEET'); + +DELETE FROM script_waypoint WHERE entry=28070; +INSERT INTO script_waypoint VALUES +(28070, 0, 1053.789795, 476.639343, 207.744, 0, ''), +(28070, 1, 1032.293945, 467.623444, 207.736, 0, ''), +(28070, 2, 1017.908752, 454.765656, 207.719, 0, ''), +(28070, 3, 1004.810120, 441.305115, 207.373, 0, ''), +(28070, 4, 988.694214, 424.422485, 207.425, 0, ''), +(28070, 5, 984.816345, 422.177917, 205.994, 0, ''), +(28070, 6, 977.204468, 420.026917, 205.994, 0, ''), +(28070, 7, 962.388123, 421.983307, 205.994, 0, ''), +(28070, 8, 950.419556, 416.515198, 205.994, 0, ''), +(28070, 9, 943.972290, 403.071228, 205.994, 0, ''), +(28070, 10, 947.921936, 387.683563, 205.994, 0, ''), +(28070, 11, 946.554749, 383.270782, 205.994, 0, ''), +(28070, 12, 944.654724, 380.630859, 207.286, 0, ''), +(28070, 13, 941.101563, 377.373413, 207.421, 0, 'reach tribunal, set pause'), +(28070, 14, 935.217896, 370.557343, 207.421, 0, ''), +(28070, 15, 928.035950, 363.026733, 204.018, 0, ''), +(28070, 16, 909.287292, 344.392792, 203.706, 0, ''), +(28070, 17, 897.946838, 333.634735, 203.706, 0, 'reach panel'), +(28070, 18, 918.914429, 351.312866, 203.706, 0, 'reach floor disc (end event begin)'), +(28070, 19, 928.070068, 363.296326, 204.091, 0, 'stealth'), +(28070, 20, 934.817627, 370.136261, 207.421, 0, ''), +(28070, 21, 941.501465, 377.254456, 207.421, 0, ''); diff --git a/sql/Updates/0.0.3/r1413_mangos.sql b/sql/Updates/0.0.3/r1413_mangos.sql new file mode 100644 index 000000000..9330de8c3 --- /dev/null +++ b/sql/Updates/0.0.3/r1413_mangos.sql @@ -0,0 +1,3 @@ +UPDATE creature_template SET ScriptName='boss_anubarak' WHERE entry=29120; +UPDATE creature_template SET ScriptName='boss_hadronox' WHERE entry=28921; +UPDATE creature_template SET ScriptName='boss_krikthir' WHERE entry=28684; diff --git a/sql/Updates/0.0.3/r1413_scriptdev2.sql b/sql/Updates/0.0.3/r1413_scriptdev2.sql new file mode 100644 index 000000000..bd7744815 --- /dev/null +++ b/sql/Updates/0.0.3/r1413_scriptdev2.sql @@ -0,0 +1,28 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1601024 AND -1601000; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1601000,'This kingdom belongs to the Scourge! Only the dead may enter.',14075,1,0,0,'krikthir SAY_AGGRO'), +(-1601001,'???',14076,1,0,0,'krikthir SAY_KILL_1'), +(-1601002,'You were foolish to come.',14077,1,0,0,'krikthir SAY_KILL_2'), +(-1601003,'As Anub\'Arak commands!',14078,1,0,0,'krikthir SAY_KILL_3'), +(-1601004,'We are besieged. Strike out and bring back their corpses!',14079,1,0,0,'krikthir SAY_SEND_GROUP_1'), +(-1601005,'We must hold the gate. Attack! Tear them limb from limb!',14080,1,0,0,'krikthir SAY_SEND_GROUP_2'), +(-1601006,'The gate must be protected at all costs. Rip them to shreds!',14081,1,0,0,'krikthir SAY_SEND_GROUP_3'), +(-1601007,'Keep an eye on the tunnel. We must not let anyone through!',14082,1,0,0,'krikthir SAY_PREFIGHT_1'), +(-1601008,'I hear footsteps. Be on your guard.',14083,1,0,0,'krikthir SAY_PREFIGHT_2'), +(-1601009,'I sense the living. Be ready.',14084,1,0,0,'krikthir SAY_PREFIGHT_3'), +(-1601010,'They hunger.',14085,1,0,0,'krikthir SAY_SWARM_1'), +(-1601011,'Dinner time, my pets.',14086,1,0,0,'krikthir SAY_SWARM_2'), +(-1601012,'I should be grateful. But I long ago lost the capacity.',14087,1,0,0,'krikthir SAY_DEATH'), +(-1601013,'%s goes into a frenzy!',0,3,0,0,'krikthir EMOTE_FRENZY'), + +(-1601014,'I was king of this empire once, long ago. In life I stood as champion. In death I returned as conqueror. Now I protect the kingdom once more. Ironic, yes?',14053,1,0,0,'anubarak SAY_INTRO'), +(-1601015,'Eternal agony awaits you!',14054,1,0,0,'anubarak SAY_AGGRO'), +(-1601016,'You shall experience my torment, first-hand!',14055,1,0,0,'anubarak SAY_KILL_1'), +(-1601017,'You have made your choice.',14056,1,0,0,'anubarak SAY_KILL_2'), +(-1601018,'Soon, the Master\'s voice will call to you.',14057,1,0,0,'anubarak SAY_KILL_3'), +(-1601019,'Come forth, my brethren. Feast on their flesh!',14058,1,0,0,'anubarak SAY_SUBMERGE_1'), +(-1601020,'Auum na-l ak-k-k-k, isshhh.',14059,1,0,0,'anubarak SAY_SUBMERGE_2'), +(-1601021,'Your armor is useless against my locusts!',14060,1,0,0,'anubarak SAY_LOCUST_1'), +(-1601022,'The pestilence upon you!',14067,1,0,0,'anubarak SAY_LOCUST_2'), +(-1601023,'Uunak-hissss tik-k-k-k-k!',14068,1,0,0,'anubarak SAY_LOCUST_3'), +(-1601024,'Ahhh... RAAAAAGH! Never thought... I would be free of him...',14069,1,0,0,'anubarak SAY_DEATH'); diff --git a/sql/Updates/0.0.3/r1414_mangos.sql b/sql/Updates/0.0.3/r1414_mangos.sql new file mode 100644 index 000000000..c15e4b765 --- /dev/null +++ b/sql/Updates/0.0.3/r1414_mangos.sql @@ -0,0 +1,5 @@ +UPDATE creature_template SET ScriptName='boss_jedoga' WHERE entry=29310; +UPDATE creature_template SET ScriptName='boss_nadox' WHERE entry=29309; +UPDATE creature_template SET ScriptName='boss_taldaram' WHERE entry=29308; +UPDATE gameobject_template SET ScriptName='go_nerubian_device' WHERE entry IN (193093,193094); +UPDATE creature_template SET ScriptName='boss_volazj' WHERE entry=29311; diff --git a/sql/Updates/0.0.3/r1414_scriptdev2.sql b/sql/Updates/0.0.3/r1414_scriptdev2.sql new file mode 100644 index 000000000..252beee6b --- /dev/null +++ b/sql/Updates/0.0.3/r1414_scriptdev2.sql @@ -0,0 +1,42 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1619039 AND -1619000; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1619000,'The secrets of the deep shall remain hidden.',14033,1,0,0,'nadox SAY_AGGRO'), +(-1619001,'The young must not grow hungry...',14034,1,0,0,'nadox SAY_SUMMON_EGG_1'), +(-1619002,'Shhhad ak kereeesshh chak-k-k!',14035,1,0,0,'nadox SAY_SUMMON_EGG_2'), +(-1619003,'Sleep now, in the cold dark.',14036,1,0,0,'nadox SAY_SLAY_1'), +(-1619004,'For the Lich King!',14037,1,0,0,'nadox SAY_SLAY_2'), +(-1619005,'Perhaps we will be allies soon.',14038,1,0,0,'nadox SAY_SLAY_3'), +(-1619006,'Master, is my service complete?',14039,1,0,0,'nadox SAY_DEATH'), +(-1619007,'An Ahn\'kahar Guardian hatches!',0,3,0,0,'nadox EMOTE_HATCH'), +(-1619008,'I will feast on your remains.',14360,1,0,0,'taldaram SAY_AGGRO'), +(-1619009,'Your heartbeat is music to my ears.',14361,1,0,0,'taldaram SAY_VANISH_1'), +(-1619010,'I am nowhere. I am everywhere. I am the watcher, unseen.',14362,1,0,0,'taldaram SAY_VANISH_2'), +(-1619011,'So appetizing.',14363,1,0,0,'taldaram SAY_FEED_1'), +(-1619012,'Fresh, warm blood. It has been too long.',14364,1,0,0,'taldaram SAY_FEED_2'), +(-1619013,'Bin-dor\'el',14365,1,0,0,'taldaram SAY_SLAY_1'), +(-1619014,'I will drink no blood before it\'s time.',14366,1,0,0,'taldaram SAY_SLAY_2'), +(-1619015,'One final embrace.',14367,1,0,0,'taldaram SAY_SLAY_3'), +(-1619016,'Still I hunger, still I thirst.',14368,1,0,0,'taldaram SAY_DEATH'), +(-1619017,'These are sacred halls! Your intrusion will be met with death.',14343,1,0,0,'jedoga SAY_AGGRO'), +(-1619018,'Who among you is devoted?',14344,1,0,0,'jedoga SAY_CALL_SACRIFICE_1'), +(-1619019,'You there! Step forward!',14345,1,0,0,'jedoga SAY_CALL_SACRIFICE_2'), +(-1619020,'Yogg-Saron, grant me your power!',14346,1,0,0,'jedoga SAY_SACRIFICE_1'), +(-1619021,'Master, a gift for you!',14347,1,0,0,'jedoga SAY_SACRIFICE_2'), +(-1619022,'Glory to Yogg-Saron!',14348,1,0,0,'jedoga SAY_SLAY_1'), +(-1619023,'You are unworthy!',14349,1,0,0,'jedoga SAY_SLAY_2'), +(-1619024,'Get up! You haven\'t suffered enough.',14350,1,0,0,'jedoga SAY_SLAY_3'), +(-1619025,'Do not expect your sacrilege... to go unpunished.',14351,1,0,0,'jedoga SAY_DEATH'), +(-1619026,'The elements themselves will rise up against the civilized world! Only the faithful will be spared!',14352,1,0,0,'jedoga SAY_PREACHING_1'), +(-1619027,'Immortality can be yours. But only if you pledge yourself fully to Yogg-Saron!',14353,1,0,0,'jedoga SAY_PREACHING_2'), +(-1619028,'Here on the very borders of his domain. You will experience powers you would never have imagined! ',14354,1,0,0,'jedoga SAY_PREACHING_3'), +(-1619029,'You have traveled long and risked much to be here. Your devotion shall be rewarded.',14355,1,0,0,'jedoga SAY_PREACHING_4'), +(-1619030,'The faithful shall be exalted! But there is more work to be done. We will press on until all of Azeroth lies beneath his shadow!',14356,1,0,0,'jedoga SAY_PREACHING_5'), +(-1619031,'I have been chosen!',0,1,0,0,'jedoga SAY_VOLUNTEER_1'), +(-1619032,'I give myself to the master!',0,1,0,0,'jedoga SAY_VOLUNTEER_2'), +(-1619033,'Shgla\'yos plahf mh\'naus.',14043,1,0,0,'volazj SAY_AGGRO'), +(-1619034,' ',14044,1,0,0,'volazj SAY_INSANITY'), +(-1619035,' ',14045,1,0,0,'volazj SAY_SLAY_1'), +(-1619036,' ',14046,1,0,0,'volazj SAY_SLAY_2'), +(-1619037,' ',14047,1,0,0,'volazj SAY_SLAY_3'), +(-1619038,' ',14048,1,0,0,'volazj SAY_DEATH_1'), +(-1619039,' ',14049,1,0,0,'volazj SAY_DEATH_2'); diff --git a/sql/Updates/0.0.3/r1415_mangos.sql b/sql/Updates/0.0.3/r1415_mangos.sql new file mode 100644 index 000000000..3241098d6 --- /dev/null +++ b/sql/Updates/0.0.3/r1415_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_lunaclaw_spirit' WHERE entry=12144; diff --git a/sql/Updates/0.0.3/r1417_mangos.sql b/sql/Updates/0.0.3/r1417_mangos.sql new file mode 100644 index 000000000..4d22d21a0 --- /dev/null +++ b/sql/Updates/0.0.3/r1417_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_loklira_the_crone' WHERE entry=29975; diff --git a/sql/Updates/0.0.3/r1418_scriptdev2.sql b/sql/Updates/0.0.3/r1418_scriptdev2.sql new file mode 100644 index 000000000..d81c0784b --- /dev/null +++ b/sql/Updates/0.0.3/r1418_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 8524+) '; diff --git a/sql/Updates/0.0.3/r1419_mangos.sql b/sql/Updates/0.0.3/r1419_mangos.sql new file mode 100644 index 000000000..029b67294 --- /dev/null +++ b/sql/Updates/0.0.3/r1419_mangos.sql @@ -0,0 +1,2 @@ +UPDATE gameobject_template SET ScriptName='go_gundrak_altar' WHERE entry IN (192518, 192519, 192520); +UPDATE instance_template SET script='instance_gundrak' WHERE map=604; diff --git a/sql/Updates/0.0.3/r1421_scriptdev2.sql b/sql/Updates/0.0.3/r1421_scriptdev2.sql new file mode 100644 index 000000000..f24f04f03 --- /dev/null +++ b/sql/Updates/0.0.3/r1421_scriptdev2.sql @@ -0,0 +1,2 @@ +UPDATE script_texts SET sound=13762 WHERE entry=-1599055; +UPDATE script_texts SET sound=13763 WHERE entry=-1599057; diff --git a/sql/Updates/0.0.3/r1422_mangos.sql b/sql/Updates/0.0.3/r1422_mangos.sql new file mode 100644 index 000000000..5efe47a5d --- /dev/null +++ b/sql/Updates/0.0.3/r1422_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_spirit_guide' WHERE entry IN (13116, 13117); diff --git a/sql/Updates/0.0.3/r1422_scriptdev2.sql b/sql/Updates/0.0.3/r1422_scriptdev2.sql new file mode 100644 index 000000000..3464c5ce5 --- /dev/null +++ b/sql/Updates/0.0.3/r1422_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 8555+) '; diff --git a/sql/Updates/0.0.3/r1428_scriptdev2.sql b/sql/Updates/0.0.3/r1428_scriptdev2.sql new file mode 100644 index 000000000..ccab71a45 --- /dev/null +++ b/sql/Updates/0.0.3/r1428_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE script_texts SET type=3 WHERE entry=-1249004; diff --git a/sql/Updates/0.0.3/r1430_mangos.sql b/sql/Updates/0.0.3/r1430_mangos.sql new file mode 100644 index 000000000..e8c98c2e5 --- /dev/null +++ b/sql/Updates/0.0.3/r1430_mangos.sql @@ -0,0 +1 @@ +UPDATE gameobject_template SET ScriptName='go_crystal_prison' WHERE entry=185126; diff --git a/sql/Updates/0.0.3/r1433_mangos.sql b/sql/Updates/0.0.3/r1433_mangos.sql new file mode 100644 index 000000000..d137c5ead --- /dev/null +++ b/sql/Updates/0.0.3/r1433_mangos.sql @@ -0,0 +1,2 @@ +UPDATE instance_template SET Script='instance_nexus' WHERE map=576; +UPDATE gameobject_template SET ScriptName='go_containment_sphere' WHERE entry IN (188526, 188527, 188528); diff --git a/sql/Updates/0.0.3/r1435_mangos.sql b/sql/Updates/0.0.3/r1435_mangos.sql new file mode 100644 index 000000000..a5d3f8623 --- /dev/null +++ b/sql/Updates/0.0.3/r1435_mangos.sql @@ -0,0 +1,5 @@ +DELETE FROM areatrigger_scripts WHERE entry IN (4871, 4872, 4873); +INSERT INTO areatrigger_scripts VALUES +(4871,'at_warsong_grainery'), +(4872,'at_torp_farm'), +(4873,'at_warsong_slaughterhouse'); diff --git a/sql/Updates/0.0.3/r1436_mangos.sql b/sql/Updates/0.0.3/r1436_mangos.sql new file mode 100644 index 000000000..2b35b9fcb --- /dev/null +++ b/sql/Updates/0.0.3/r1436_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_thorim' WHERE entry=29445; diff --git a/sql/Updates/0.0.3/r1437_scriptdev2.sql b/sql/Updates/0.0.3/r1437_scriptdev2.sql new file mode 100644 index 000000000..21f84ad8f --- /dev/null +++ b/sql/Updates/0.0.3/r1437_scriptdev2.sql @@ -0,0 +1,10 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000550 AND -1000543; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000543,'Why have you come here, outsider? You will only find pain! Our fate will be yours...',0,0,0,25,'restless app SAY_RAND_1'), +(-1000544,'It was ... terrible... the demon...',0,0,0,25,'restless app SAY_RAND_2'), +(-1000545,'The darkness... the corruption... they came too quickly for anyone to know...',0,0,0,25,'restless app SAY_RAND_3'), +(-1000546,'The darkness will consume all... all the living...',0,0,0,25,'restless app SAY_RAND_4'), +(-1000547,'It is too late for us, living one. Take yourself and your friend away from here before you both are... claimed...',0,0,0,25,'restless app SAY_RAND_5'), +(-1000548,'It is too late for Jarl... its hold is too strong...',0,0,0,25,'restless app SAY_RAND_6'), +(-1000549,'Go away, whoever you are! Witch Hill is mine... mine!',0,0,0,25,'restless app SAY_RAND_7'), +(-1000550,'The manor... someone else... will soon be consumed...',0,0,0,25,'restless app SAY_RAND_8'); diff --git a/sql/Updates/0.0.3/r1439_scriptdev2.sql b/sql/Updates/0.0.3/r1439_scriptdev2.sql new file mode 100644 index 000000000..9daa29373 --- /dev/null +++ b/sql/Updates/0.0.3/r1439_scriptdev2.sql @@ -0,0 +1,4 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1576022 AND -1576021; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1576021,'%s opens a Chaotic Rift!',0,3,0,0,'anomalus EMOTE_OPEN_RIFT'), +(-1576022,'%s shields himself and divert his power to the rifts!',0,3,0,0,'anomalus EMOTE_SHIELD'); diff --git a/sql/Updates/0.0.3/r1441_mangos.sql b/sql/Updates/0.0.3/r1441_mangos.sql new file mode 100644 index 000000000..3f79d2cd2 --- /dev/null +++ b/sql/Updates/0.0.3/r1441_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='npc_deathstalker_razael' WHERE entry=23998; +UPDATE creature_template SET ScriptName='npc_dark_ranger_lyana' WHERE entry=23778; diff --git a/sql/Updates/0.0.3/r814_scriptdev2_eventai_scripts.sql b/sql/Updates/0.0.3/r814_scriptdev2_eventai_scripts.sql new file mode 100644 index 000000000..af347d2de --- /dev/null +++ b/sql/Updates/0.0.3/r814_scriptdev2_eventai_scripts.sql @@ -0,0 +1,18 @@ +ALTER TABLE `eventai_scripts` + CHANGE COLUMN `creature_id` `creature_id` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'Creature Template Identifier', + CHANGE COLUMN `event_type` `event_type` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'Event Type', + CHANGE COLUMN `event_inverse_phase_mask` `event_inverse_phase_mask` int NOT NULL DEFAULT 0 COMMENT 'Mask which phases this event will not trigger in', + CHANGE COLUMN `event_chance` `event_chance` tinyint unsigned NOT NULL DEFAULT 100, + CHANGE COLUMN `event_flags` `event_flags` tinyint unsigned NOT NULL DEFAULT 0, + CHANGE COLUMN `action1_param1` `action1_param1` int NOT NULL DEFAULT 0, + CHANGE COLUMN `action1_param2` `action1_param2` int NOT NULL DEFAULT 0, + CHANGE COLUMN `action1_param3` `action1_param3` int NOT NULL DEFAULT 0, + CHANGE COLUMN `action1_type` `action1_type` tinyint(3) unsigned NOT NULL DEFAULT 0 COMMENT 'Action Type', + CHANGE COLUMN `action2_param1` `action2_param1` int NOT NULL DEFAULT 0, + CHANGE COLUMN `action2_param2` `action2_param2` int NOT NULL DEFAULT 0, + CHANGE COLUMN `action2_param3` `action2_param3` int NOT NULL DEFAULT 0, + CHANGE COLUMN `action2_type` `action2_type` tinyint(3) unsigned NOT NULL DEFAULT 0 COMMENT 'Action Type', + CHANGE COLUMN `action3_param1` `action3_param1` int NOT NULL DEFAULT 0, + CHANGE COLUMN `action3_param2` `action3_param2` int NOT NULL DEFAULT 0, + CHANGE COLUMN `action3_param3` `action3_param3` int NOT NULL DEFAULT 0, + CHANGE COLUMN `action3_type` `action3_type` tinyint(3) unsigned NOT NULL DEFAULT 0 COMMENT 'Action Type'; diff --git a/sql/Updates/0.0.3/r820_scriptdev2_script_texts.sql b/sql/Updates/0.0.3/r820_scriptdev2_script_texts.sql new file mode 100644 index 000000000..397bfa523 --- /dev/null +++ b/sql/Updates/0.0.3/r820_scriptdev2_script_texts.sql @@ -0,0 +1,42 @@ +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1533039 AND -1533000; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1533000,'Ahh... welcome to my parlor.',8788,1,0,'anubrekhan SAY_GREET'), +(-1533001,'Just a little taste...',8785,1,0,'anubrekhan SAY_AGGRO1'), +(-1533002,'There is no way out.',8786,1,0,'anubrekhan SAY_AGGRO2'), +(-1533003,'Yes, Run! It makes the blood pump faster!',8787,1,0,'anubrekhan SAY_AGGRO3'), +(-1533004,'I hear little hearts beating. Yesss... beating faster now. Soon the beating will stop.',8790,1,0,'anubrekhan SAY_TAUNT1'), +(-1533005,'Where to go? What to do? So many choices that all end in pain, end in death.',8791,1,0,'anubrekhan SAY_TAUNT2'), +(-1533006,'Which one shall I eat first? So difficult to choose... the all smell so delicious.',8792,1,0,'anubrekhan SAY_TAUNT3'), +(-1533007,'Closer now... tasty morsels. I\'ve been too long without food. Without blood to drink.',8793,1,0,'anubrekhan SAY_TAUNT4'), +(-1533008,'Shh... it will all be over soon.',8789,1,0,'anubrekhan SAY_SLAY'), +(-1533009,'Your old lives, your mortal desires, mean nothing. You are acolytes of the master now, and you will serve the cause without question! The greatest glory is to die in the master\'s service!',8799,1,0,'faerlina SAY_GREET'), +(-1533010,'Slay them in the master\'s name!',8794,1,0,'faerlina SAY_AGGRO1'), +(-1533011,'You cannot hide from me!',8795,1,0,'faerlina SAY_AGGRO2'), +(-1533012,'Kneel before me, worm!',8796,1,0,'faerlina SAY_AGGRO3'), +(-1533013,'Run while you still can!',8797,1,0,'faerlina SAY_AGGRO4'), +(-1533014,'You have failed!',8800,1,0,'faerlina SAY_SLAY1'), +(-1533015,'Pathetic wretch!',8801,1,0,'faerlina SAY_SLAY2'), +(-1533016,'The master... will avenge me!',8798,1,0,'faerlina SAY_DEATH'), +(-1533017,'Patchwerk want to play!',8909,1,0,'patchwerk SAY_AGGRO1'), +(-1533018,'Kel\'Thuzad make Patchwerk his Avatar of War!',8910,1,0,'patchwerk SAY_AGGRO2'), +(-1533019,'No more play?',8912,1,0,'patchwerk SAY_SLAY'), +(-1533020,'What happened to... Patch...',8911,1,0,'patchwerk SAY_DEATH'), +(-1533021,'goes into a berserker rage!',0,2,0,'patchwerk EMOTE_BERSERK'), +(-1533022,'becomes enraged!',0,2,0,'patchwerk EMOTE_ENRAGE'), +(-1533023,'Stalagg crush you!',8864,1,0,'stalagg SAY_STAL_AGGRO'), +(-1533024,'Stalagg kill!',8866,1,0,'stalagg SAY_STAL_SLAY'), +(-1533025,'Master save me...',8865,1,0,'stalagg SAY_STAL_DEATH'), +(-1533026,'Feed you to master!',8802,1,0,'feugen SAY_FEUG_AGGRO'), +(-1533027,'Feugen make master happy!',8804,1,0,'feugen SAY_FEUG_SLAY'), +(-1533028,'No... more... Feugen...',8803,1,0,'feugen SAY_FEUG_DEATH'), +(-1533029,'You are too late... I... must... OBEY!',8872,1,0,'thaddius SAY_GREET'), +(-1533030,'KILL!',8867,1,0,'thaddius SAY_AGGRO1'), +(-1533031,'EAT YOUR BONES!',8868,1,0,'thaddius SAY_AGGRO2'), +(-1533032,'BREAK YOU!',8869,1,0,'thaddius SAY_AGGRO3'), +(-1533033,'You die now!',8877,1,0,'thaddius SAY_SLAY'), +(-1533034,'Now YOU feel pain!',8871,1,0,'thaddius SAY_ELECT'), +(-1533035,'Thank... you...',8870,1,0,'thaddius SAY_DEATH'), +(-1533036,'Pleeease!',8873,1,0,'thaddius SAY_SCREAM1'), +(-1533037,'Stop, make it stop!',8874,1,0,'thaddius SAY_SCREAM2'), +(-1533038,'Help me! Save me!',8875,1,0,'thaddius SAY_SCREAM3'), +(-1533039,'Please, nooo!',8876,1,0,'thaddius SAY_SCREAM4'); diff --git a/sql/Updates/0.0.3/r822_mangos.sql b/sql/Updates/0.0.3/r822_mangos.sql new file mode 100644 index 000000000..0b7b49965 --- /dev/null +++ b/sql/Updates/0.0.3/r822_mangos.sql @@ -0,0 +1,2 @@ +UPDATE `creature_template` SET `ScriptName`='' WHERE `entry`=16062; +UPDATE `creature_template` SET `ScriptName`='boss_rivendare_naxx' WHERE `entry`=30549; diff --git a/sql/Updates/0.0.3/r822_scriptdev2_script_texts.sql b/sql/Updates/0.0.3/r822_scriptdev2_script_texts.sql new file mode 100644 index 000000000..fe53968f9 --- /dev/null +++ b/sql/Updates/0.0.3/r822_scriptdev2_script_texts.sql @@ -0,0 +1,37 @@ +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1533074 AND -1533040; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1533040,'Foolishly you have sought your own demise. Brazenly you have disregarded powers beyond your understanding. You have fought hard to invade the realm of the harvester. Now there is only one way out - to walk the lonely path of the damned.',8807,1,0,'gothik SAY_SPEECH'), +(-1533041,'Death is the only escape.',8806,1,0,'gothik SAY_KILL'), +(-1533042,'I... am... undone!',8805,1,0,'gothik SAY_DEATH'), +(-1533043,'I have waited long enough! Now, you face the harvester of souls!',8808,1,0,'gothik SAY_TELEPORT'), +(-1533044,'Defend youself!',8892,1,0,'blaumeux SAY_BLAU_AGGRO'), +(-1533045,'Come, Zeliek, do not drive them out. Not before we\'ve had our fun.',8896,1,0,'blaumeux SAY_BLAU_TAUNT1'), +(-1533046,'I do hope they stay alive long enough for me to... introduce myself.',8897,1,0,'blaumeux SAY_BLAU_TAUNT2'), +(-1533047,'The first kill goes to me! Anyone care to wager?',8898,1,0,'blaumeux SAY_BLAU_TAUNT3'), +(-1533048,'Your life is mine!',8895,1,0,'blaumeux SAY_BLAU_SPECIAL'), +(-1533049,'Who\'s next?',8894,1,0,'blaumeux SAY_BLAU_SLAY'), +(-1533050,'Tou... che!',8893,1,0,'blaumeux SAY_BLAU_DEATH'), +(-1533051,'Come out and fight, ye wee ninny!',8899,1,0,'korthazz SAY_KORT_AGGRO'), +(-1533052,'To arms, ye roustabouts! We\'ve got company!',8903,1,0,'korthazz SAY_KORT_TAUNT1'), +(-1533053,'I heard about enough of yer sniveling. Shut yer fly trap \'afore I shut it for ye!',8904,1,0,'korthazz SAY_KORT_TAUNT2'), +(-1533054,'I\'m gonna enjoy killin\' these slack-jawed daffodils!',8905,1,0,'korthazz SAY_KORT_TAUNT3'), +(-1533055,'I like my meat extra crispy!',8901,1,0,'korthazz SAY_KORT_SPECIAl'), +(-1533056,'Next time, bring more friends!',8902,1,0,'korthazz SAY_KORT_SLAY'), +(-1533057,'What a bloody waste this is!',8900,1,0,'korthazz SAY_KORT_DEATH'), +(-1533058,'Flee, before it\'s too late!',8913,1,0,'zeliek SAY_ZELI_AGGRO'), +(-1533059,'Invaders, cease this foolish venture at once! Turn away while you still can!',8917,1,0,'zeliek SAY_ZELI_TAUNT1'), +(-1533060,'Perhaps they will come to their senses, and run away as fast as they can!',8918,1,0,'zeliek SAY_ZELI_TAUNT2'), +(-1533061,'Do not continue! Turn back while there\'s still time!',8919,1,0,'zeliek SAY_ZELI_TAUNT3'), +(-1533062,'I- I have no choice but to obey!',8916,1,0,'zeliek SAY_ZELI_SPECIAL'), +(-1533063,'Forgive me!',8915,1,0,'zeliek SAY_ZELI_SLAY'), +(-1533064,'It is... as it should be.',8914,1,0,'zeliek SAY_ZELI_DEATH'), +(-1533065,'You seek death?',14571,1,0,'rivendare_naxx SAY_RIVE_AGGRO1'), +(-1533066,'None shall pass!',14572,1,0,'rivendare_naxx SAY_RIVE_AGGRO2'), +(-1533067,'Be still!',14573,1,0,'rivendare_naxx SAY_RIVE_AGGRO3'), +(-1533068,'You will find no peace in death.',14574,1,0,'rivendare_naxx SAY_RIVE_SLAY1'), +(-1533069,'The master\'s will is done.',14575,1,0,'rivendare_naxx SAY_RIVE_SLAY2'), +(-1533070,'Bow to the might of the scourge!',14576,1,0,'rivendare_naxx SAY_RIVE_SPECIAL'), +(-1533071,'Enough prattling. Let them come! We shall grind their bones to dust.',14577,1,0,'rivendare_naxx SAY_RIVE_TAUNT1'), +(-1533072,'Conserve your anger! Harness your rage! You will all have outlets for your frustration soon enough.',14578,1,0,'rivendare_naxx SAY_RIVE_TAUNT2'), +(-1533073,'Life is meaningless. It is in death that we are truly tested.',14579,1,0,'rivendare_naxx SAY_RIVE_TAUNT3'), +(-1533074,'Death... will not stop me...',14580,1,0,'rivendare_naxx SAY_RIVE_DEATH'); diff --git a/sql/Updates/0.0.3/r823_scriptdev2_script_texts.sql b/sql/Updates/0.0.3/r823_scriptdev2_script_texts.sql new file mode 100644 index 000000000..896ddf58c --- /dev/null +++ b/sql/Updates/0.0.3/r823_scriptdev2_script_texts.sql @@ -0,0 +1,36 @@ +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1533108 AND -1533075; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1533075,'Glory to the master!',8845,1,0,'noth SAY_AGGRO1'), +(-1533076,'Your life is forfeit!',8846,1,0,'noth SAY_AGGRO2'), +(-1533077,'Die, trespasser!',8847,1,0,'noth SAY_AGGRO3'), +(-1533078,'Rise, my soldiers! Rise and fight once more!',8851,1,0,'noth SAY_SUMMON'), +(-1533079,'My task is done!',8849,1,0,'noth SAY_SLAY1'), +(-1533080,'Breathe no more!',8850,1,0,'noth SAY_SLAY2'), +(-1533081,'I will serve the master... in... death!',8848,1,0,'noth SAY_DEATH'), +(-1533082,'takes in a deep breath...',0,2,0,'sapphiron EMOTE_BREATH'), +(-1533083,'enrages!',0,2,0,'sapphiron EMOTE_ENRAGE'), +(-1533084,'Our preparations continue as planned, master.',14467,1,0,'kelthuzad SAY_SAPP_DIALOG1'), +(-1533085,'It is good that you serve me so faithfully. Soon, all will serve the Lich King and in the end, you shall be rewarded...so long as you do not falter.',8881,1,0,'kelthuzad SAY_SAPP_DIALOG2_LICH'), +(-1533086,'I see no complications... Wait... What is this?',14468,1,0,'kelthuzad SAY_SAPP_DIALOG3'), +(-1533087,'Your security measures have failed! See to this interruption immediately!',8882,1,0,'kelthuzad SAY_SAPP_DIALOG4_LICH'), +(-1533088,'Yes, master!',14469,1,0,'kelthuzad SAY_SAPP_DIALOG5'), +(-1533089,'No!!! A curse upon you, interlopers! The armies of the Lich King will hunt you down. You will not escape your fate...',14484,1,0,'kelthuzad SAY_CAT_DIED'), +(-1533090,'Who dares violate the sanctity of my domain? Be warned, all who trespass here are doomed.',14463,1,0,'kelthuzad SAY_TAUNT1'), +(-1533091,'Fools, you think yourselves triumphant? You have only taken one step closer to the abyss! ',14464,1,0,'kelthuzad SAY_TAUNT2'), +(-1533092,'I grow tired of these games. Proceed, and I will banish your souls to oblivion!',14465,1,0,'kelthuzad SAY_TAUNT3'), +(-1533093,'You have no idea what horrors lie ahead. You have seen nothing! The frozen heart of Naxxramas awaits you!',14466,1,0,'kelthuzad SAY_TAUNT4'), +(-1533094,'Pray for mercy!',14475,1,0,'kelthuzad SAY_AGGRO1'), +(-1533095,'Scream your dying breath!',14476,1,0,'kelthuzad SAY_AGGRO2'), +(-1533096,'The end is upon you!',14477,1,0,'kelthuzad SAY_AGGRO3'), +(-1533097,'The dark void awaits you!',14478,1,0,'kelthuzad SAY_SLAY1'), +(-1533098,'',14479,1,0,'kelthuzad SAY_SLAY2'), +(-1533099,'AAAAGHHH!... Do not rejoice... your victory is a hollow one... for I shall return with powers beyond your imagining!',14480,1,0,'kelthuzad SAY_DEATH'), +(-1533100,'Your soul, is bound to me now!',14472,1,0,'kelthuzad SAY_CHAIN1'), +(-1533101,'There will be no escape!',14473,1,0,'kelthuzad SAY_CHAIN2'), +(-1533102,'I will freeze the blood in your veins!',14474,1,0,'kelthuzad SAY_FROST_BLAST'), +(-1533103,'Master! I require aid! ',14470,1,0,'kelthuzad SAY_REQUEST_AID'), +(-1533104,'Very well... warriors of the frozen wastes, rise up! I command you to fight, kill, and die for your master. Let none survive...',0,1,0,'kelthuzad SAY_ANSWER_REQUEST'), +(-1533105,'Minions, servants, soldiers of the cold dark, obey the call of Kel\'Thuzad!',14471,1,0,'kelthuzad SAY_SUMMON_MINIONS'), +(-1533106,'Your petty magics are no challenge to the might of the Scourge! ',14481,1,0,'kelthuzad SAY_SPECIAL1_MANA_DET'), +(-1533107,'Enough! I grow tired of these distractions! ',14483,1,0,'kelthuzad SAY_SPECIAL3_MANA_DET'), +(-1533108,'Fools, you have spread your powers too thin. Be free, my minions!',14482,1,0,'kelthuzad SAY_SPECIAL2_DISPELL'); diff --git a/sql/Updates/0.0.3/r824_mangos.sql b/sql/Updates/0.0.3/r824_mangos.sql new file mode 100644 index 000000000..3bebfa0a8 --- /dev/null +++ b/sql/Updates/0.0.3/r824_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName`='npc_ranger_lilatha' WHERE `entry`=16295; diff --git a/sql/Updates/0.0.3/r824_scriptdev2_script_texts.sql b/sql/Updates/0.0.3/r824_scriptdev2_script_texts.sql new file mode 100644 index 000000000..7bb5692b7 --- /dev/null +++ b/sql/Updates/0.0.3/r824_scriptdev2_script_texts.sql @@ -0,0 +1,9 @@ +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000146 AND -1000140; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1000140,'Let\'s go.',0,0,1,'lilatha SAY_START'), +(-1000141,'$N, let\'s use the antechamber to the right.',0,0,1,'lilatha SAY_PROGRESS1'), +(-1000142,'I can see the light at the end of the tunnel!',0,0,1,'lilatha SAY_PROGRESS2'), +(-1000143,'There\'s Farstrider Enclave now, $C. Not far to go... Look out! Troll ambush!!',0,0,1,'lilatha SAY_PROGRESS3'), +(-1000144,'Thank you for saving my life and bringing me back to safety, $N',0,0,1,'lilatha SAY_END1'), +(-1000145,'Captain Helios, I\'ve been rescued from the Amani Catacombs. Reporting for duty, sir!',0,0,1,'lilatha SAY_END2'), +(-1000146,'Liatha, get someone to look at those injuries. Thank you for bringing her back safely.',0,0,1,'lilatha CAPTAIN_ANSWER'); diff --git a/sql/Updates/0.0.3/r825_scriptdev2_script_texts.sql b/sql/Updates/0.0.3/r825_scriptdev2_script_texts.sql new file mode 100644 index 000000000..569162600 --- /dev/null +++ b/sql/Updates/0.0.3/r825_scriptdev2_script_texts.sql @@ -0,0 +1,2 @@ +UPDATE `script_texts` SET `sound`=8902 WHERE `entry`=-1533055; +UPDATE `script_texts` SET `sound`=8901 WHERE `entry`=-1533056; diff --git a/sql/Updates/0.0.3/r826_scriptdev2.sql b/sql/Updates/0.0.3/r826_scriptdev2.sql new file mode 100644 index 000000000..1e1a5453f --- /dev/null +++ b/sql/Updates/0.0.3/r826_scriptdev2.sql @@ -0,0 +1,3 @@ +ALTER TABLE custom_texts ADD COLUMN emote tinyint(3) UNSIGNED DEFAULT '0' NOT NULL AFTER language; +ALTER TABLE eventai_texts ADD COLUMN emote tinyint(3) UNSIGNED DEFAULT '0' NOT NULL AFTER language; +ALTER TABLE script_texts ADD COLUMN emote tinyint(3) UNSIGNED DEFAULT '0' NOT NULL AFTER language; diff --git a/sql/Updates/0.0.3/r827_mangos.sql b/sql/Updates/0.0.3/r827_mangos.sql new file mode 100644 index 000000000..be05f0766 --- /dev/null +++ b/sql/Updates/0.0.3/r827_mangos.sql @@ -0,0 +1 @@ +UPDATE `instance_template` SET `script`='instance_blackrock_depths' WHERE `map` =230; diff --git a/sql/Updates/0.0.3/r828_mangos.sql b/sql/Updates/0.0.3/r828_mangos.sql new file mode 100644 index 000000000..8d78370c2 --- /dev/null +++ b/sql/Updates/0.0.3/r828_mangos.sql @@ -0,0 +1,5 @@ +UPDATE `creature_template` SET `ScriptName`='npc_grimstone' WHERE `entry`=10096; +UPDATE `creature_template` SET `ScriptName`='mob_phalanx' WHERE `entry`=9502; + +DELETE FROM `areatrigger_scripts` WHERE `entry`=1526; +INSERT INTO `areatrigger_scripts` VALUES (1526,'at_ring_of_law'); diff --git a/sql/Updates/0.0.3/r834_mangos.sql b/sql/Updates/0.0.3/r834_mangos.sql new file mode 100644 index 000000000..82657c7c9 --- /dev/null +++ b/sql/Updates/0.0.3/r834_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName`='npc_rocknot' WHERE `entry`=9503; diff --git a/sql/Updates/0.0.3/r834_scriptdev2_script_texts.sql b/sql/Updates/0.0.3/r834_scriptdev2_script_texts.sql new file mode 100644 index 000000000..e8db6807e --- /dev/null +++ b/sql/Updates/0.0.3/r834_scriptdev2_script_texts.sql @@ -0,0 +1,3 @@ +DELETE FROM `script_texts` WHERE `entry`=-1230000; +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +(-1230000,'Ah, hits the spot!',0,0,0,'rocknot SAY_GOT_BEER'); diff --git a/sql/Updates/0.0.3/r835_mangos.sql b/sql/Updates/0.0.3/r835_mangos.sql new file mode 100644 index 000000000..5e3fec740 --- /dev/null +++ b/sql/Updates/0.0.3/r835_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName`='mob_toxic_sporebat' WHERE `entry`=22140; diff --git a/sql/Updates/0.0.3/r845_mangos.sql b/sql/Updates/0.0.3/r845_mangos.sql new file mode 100644 index 000000000..10b05a9e0 --- /dev/null +++ b/sql/Updates/0.0.3/r845_mangos.sql @@ -0,0 +1,2 @@ +UPDATE `creature_template` SET `ScriptName`='boss_warchief_kargath_bladefist' WHERE `entry`=16808; +UPDATE `creature_template` SET `ScriptName`='mob_karazhan_imp' WHERE `entry`=17267; diff --git a/sql/Updates/0.0.3/r846_scriptdev2.sql b/sql/Updates/0.0.3/r846_scriptdev2.sql new file mode 100644 index 000000000..eefa3619a --- /dev/null +++ b/sql/Updates/0.0.3/r846_scriptdev2.sql @@ -0,0 +1,3 @@ +ALTER TABLE custom_texts CHANGE COLUMN emote emote smallint(5) unsigned NOT NULL DEFAULT '0'; +ALTER TABLE eventai_texts CHANGE COLUMN emote emote smallint(5) unsigned NOT NULL DEFAULT '0'; +ALTER TABLE script_texts CHANGE COLUMN emote emote smallint(5) unsigned NOT NULL DEFAULT '0'; diff --git a/sql/Updates/0.0.3/r847_scriptdev2_script_texts.sql b/sql/Updates/0.0.3/r847_scriptdev2_script_texts.sql new file mode 100644 index 000000000..599a12687 --- /dev/null +++ b/sql/Updates/0.0.3/r847_scriptdev2_script_texts.sql @@ -0,0 +1,8 @@ +UPDATE script_texts SET emote=15 WHERE entry=-1000123; +UPDATE script_texts SET emote=1 WHERE entry=-1560028; +UPDATE script_texts SET emote=1 WHERE entry=-1560031; +UPDATE script_texts SET emote=5 WHERE entry=-1560032; +UPDATE script_texts SET emote=16 WHERE entry=-1000119; +UPDATE script_texts SET emote=254 WHERE entry=-1249002; +UPDATE script_texts SET emote=293 WHERE entry=-1249003; +UPDATE script_texts SET emote=1 WHERE entry=-1033000; diff --git a/sql/Updates/0.0.3/r848_scriptdev2_script_texts.sql b/sql/Updates/0.0.3/r848_scriptdev2_script_texts.sql new file mode 100644 index 000000000..fefbada29 --- /dev/null +++ b/sql/Updates/0.0.3/r848_scriptdev2_script_texts.sql @@ -0,0 +1,21 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1540047 AND -1540042; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1540042,'Ours is the true Horde! The only Horde!',10323,1,0,0,'kargath SAY_AGGRO1'), +(-1540043,'I\'ll carve the meat from your bones!',10324,1,0,0,'kargath SAY_AGGRO2'), +(-1540044,'I am called Bladefist for a reason, as you will see!',10325,1,0,0,'kargath SAY_AGGRO3'), +(-1540045,'For the real Horde!',10326,1,0,0,'kargath SAY_SLAY1'), +(-1540046,'I am the only Warchief!',10327,1,0,0,'kargath SAY_SLAY2'), +(-1540047,'The true Horde... will.. prevail...',10328,1,0,0,'kargath SAY_DEATH'); + +DELETE FROM script_texts WHERE entry BETWEEN -1533118 AND -1533109; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1533109,'You are mine now!',8825,1,0,0,'heigan SAY_AGGRO1'), +(-1533110,'I see you!',8826,1,0,0,'heigan SAY_AGGRO2'), +(-1533111,'You...are next!',8827,1,0,0,'heigan SAY_AGGRO3'), +(-1533112,'Close your eyes... sleep!',8829,1,0,0,'heigan SAY_SLAY'), +(-1533113,'The races of the world will perish. It is only a matter of time.',8830,1,0,0,'heigan SAY_TAUNT1'), +(-1533114,'I see endless suffering, I see torment, I see rage. I see... everything!',8831,1,0,0,'heigan SAY_TAUNT2'), +(-1533115,'Soon... the world will tremble!',8832,1,0,0,'heigan SAY_TAUNT3'), +(-1533116,'The end is upon you.',8833,1,0,0,'heigan SAY_TAUNT4'), +(-1533117,'Hungry worms will feast on your rotten flesh!',8834,1,0,0,'heigan SAY_TAUNT5'), +(-1533118,'Noo... o...',8828,1,0,0,'heigan SAY_DEATH'); diff --git a/sql/Updates/0.0.3/r849_scriptdev2_script_texts.sql b/sql/Updates/0.0.3/r849_scriptdev2_script_texts.sql new file mode 100644 index 000000000..808b23d52 --- /dev/null +++ b/sql/Updates/0.0.3/r849_scriptdev2_script_texts.sql @@ -0,0 +1,16 @@ +DELETE FROM script_texts WHERE entry=-1070000; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1070000,'None may steal the secrets of the makers!',5851,1,0,0,'ironaya SAY_AGGRO'); + +DELETE FROM script_texts WHERE entry BETWEEN -1129004 AND -1129000; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1129000,'You\'ll never leave this place... alive.',5825,1,0,0,'amnennar SAY_AGGRO'), +(-1129001,'To me, my servants!',5828,1,0,0,'amnennar SAY_SUMMON60'), +(-1129002,'Come, spirits, attend your master!',5829,1,0,0,'amnennar SAY_SUMMON30'), +(-1129003,'I am the hand of the Lich King!',5827,1,0,0,'amnennar SAY_HP'), +(-1129004,'Too...easy!',5826,1,0,0,'amnennar SAY_KILL'); + +DELETE FROM script_texts WHERE entry IN (-1230001,-1230002); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1230001,'Come to aid the Throne!',0,1,0,0,'dagran SAY_AGGRO'), +(-1230002,'Hail to the king, baby!',0,1,0,0,'dagran SAY_SLAY'); diff --git a/sql/Updates/0.0.3/r850_mangos.sql b/sql/Updates/0.0.3/r850_mangos.sql new file mode 100644 index 000000000..b7dcf9c53 --- /dev/null +++ b/sql/Updates/0.0.3/r850_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='npc_surristrasz' WHERE entry=24795; +UPDATE creature_template SET ScriptName='npc_tiare' WHERE entry=30051; diff --git a/sql/Updates/0.0.3/r851_scriptdev2_script_texts.sql b/sql/Updates/0.0.3/r851_scriptdev2_script_texts.sql new file mode 100644 index 000000000..74639f696 --- /dev/null +++ b/sql/Updates/0.0.3/r851_scriptdev2_script_texts.sql @@ -0,0 +1,23 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000167 AND -1000147; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000147,'I remember well the sting of defeat at the conclusion of the Third War. I have waited far too long for my revenge. Now the shadow of the Legion falls over this world. It is only a matter of time until all of your failed creation... is undone.',11332,1,0,0,'kazzak SAY_INTRO'), +(-1000148,'The Legion will conquer all!',11333,1,0,0,'kazzak SAY_AGGRO1'), +(-1000149,'All mortals will perish!',11334,1,0,0,'kazzak SAY_AGGRO2'), +(-1000150,'All life must be eradicated!',11335,1,0,0,'kazzak SAY_SURPREME1'), +(-1000151,'I\'ll rip the flesh from your bones!',11336,1,0,0,'kazzak SAY_SURPREME2'), +(-1000152,'Kirel Narak!',11337,1,0,0,'kazzak SAY_KILL1'), +(-1000153,'Contemptible wretch!',11338,1,0,0,'kazzak SAY_KILL2'), +(-1000154,'The universe will be remade.',11339,1,0,0,'kazzak SAY_KILL3'), +(-1000155,'The Legion... will never... fall.',11340,1,0,0,'kazzak SAY_DEATH'), +(-1000156,'%s goes into a frenzy!',0,2,0,0,'kazzak EMOTE_FRENZY'), +(-1000157,'Invaders, you dangle upon the precipice of oblivion! The Burning Legion comes and with it comes your end.',0,1,0,0,'kazzak SAY_RAND1'), +(-1000158,'Impudent whelps, you only delay the inevitable. Where one has fallen, ten shall rise. Such is the will of Kazzak...',0,1,0,0,'kazzak SAY_RAND2'), +(-1000159,'Do not proceed. You will be eliminated!',11344,1,0,0,'doomwalker SAY_AGGRO'), +(-1000160,'Tectonic disruption commencing.',11345,1,0,0,'doomwalker SAY_EARTHQUAKE_1'), +(-1000161,'Magnitude set. Release.',11346,1,0,0,'doomwalker SAY_EARTHQUAKE_2'), +(-1000162,'Trajectory locked.',11347,1,0,0,'doomwalker SAY_OVERRUN_1'), +(-1000163,'Engage maximum speed.',11348,1,0,0,'doomwalker SAY_OVERRUN_2'), +(-1000164,'Threat level zero.',11349,1,0,0,'doomwalker SAY_SLAY_1'), +(-1000165,'Directive accomplished.',11350,1,0,0,'doomwalker SAY_SLAY_2'), +(-1000166,'Target exterminated.',11351,1,0,0,'doomwalker SAY_SLAY_3'), +(-1000167,'System failure in five, f-o-u-r...',11352,1,0,0,'doomwalker SAY_DEATH'); diff --git a/sql/Updates/0.0.3/r852_scriptdev2_script_texts.sql b/sql/Updates/0.0.3/r852_scriptdev2_script_texts.sql new file mode 100644 index 000000000..57cd80a1b --- /dev/null +++ b/sql/Updates/0.0.3/r852_scriptdev2_script_texts.sql @@ -0,0 +1,13 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1189021 AND -1189011; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1189011,'Tell me... tell me everything!',5847,1,0,0,'vishas SAY_AGGRO'), +(-1189012,'Naughty secrets!',5849,1,0,0,'vishas SAY_HEALTH1'), +(-1189013,'I\'ll rip the secrets from your flesh!',5850,1,0,0,'vishas SAY_HEALTH2'), +(-1189014,'Purged by pain!',5848,1,0,0,'vishas SAY_KILL'), +(-1189015,'The monster got what he deserved.',0,0,1,0,'vishas SAY_TRIGGER_VORREL'), +(-1189016,'We hunger for vengeance.',5844,1,0,0,'thalnos SAY_AGGRO'), +(-1189017,'No rest, for the angry dead.',5846,1,0,0,'thalnos SAY_HEALTH'), +(-1189018,'More... More souls.',5845,1,0,0,'thalnos SAY_KILL'), +(-1189019,'You will not defile these mysteries!',5842,1,0,0,'doan SAY_AGGRO'), +(-1189020,'Burn in righteous fire!',5843,1,0,0,'doan SAY_SPECIALAE'), +(-1189021,'Release the hounds!',5841,1,0,0,'loksey SAY_AGGRO'); diff --git a/sql/Updates/0.0.3/r854_scriptdev2_script_texts.sql b/sql/Updates/0.0.3/r854_scriptdev2_script_texts.sql new file mode 100644 index 000000000..cc00cce6f --- /dev/null +++ b/sql/Updates/0.0.3/r854_scriptdev2_script_texts.sql @@ -0,0 +1,41 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000206 AND -1000168; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000168,'Who dares awaken Aquementas?',0,1,0,0,'aquementas AGGRO_YELL_AQUE'), +(-1000169,'Muahahahaha! You fool! You\'ve released me from my banishment in the interstices between space and time!',0,1,0,0,'nether_drake SAY_NIHIL_1'), +(-1000170,'All of Draenor shall quick beneath my feet! I will destroy this world and reshape it in my image!',0,1,0,0,'nether_drake SAY_NIHIL_2'), +(-1000171,'Where shall I begin? I cannot bother myself with a worm such as yourself. There is a world to be conquered!',0,1,0,0,'nether_drake SAY_NIHIL_3'), +(-1000172,'No doubt the fools that banished me are long dead. I shall take wing survey my demense. Pray to whatever gods you hold dear that we do not meet again.',0,1,0,0,'nether_drake SAY_NIHIL_4'), +(-1000173,'NOOOOooooooo!',0,1,0,0,'nether_drake SAY_NIHIL_INTERRUPT'), +(-1000174,'Good $N, you are under the spell\'s influence. I must analyze it quickly, then we can talk.',0,0,7,0,'daranelle SAY_SPELL_INFLUENCE'), +(-1000175,'Thank you, mortal.',0,0,11,0,' SAY_JUST_EATEN'), +(-1000176,'The last thing I remember is the ship falling and us getting into the pods. I\'ll go see how I can help. Thank you!',0,0,7,0,'draenei_survivor SAY_HEAL1'), +(-1000177,'$C, Where am I? Who are you? Oh no! What happened to the ship?',0,0,7,0,'draenei_survivor SAY_HEAL2'), +(-1000178,'$C You saved me! I owe you a debt that I can never repay. I\'ll go see if I can help the others.',0,0,7,0,'draenei_survivor SAY_HEAL3'), +(-1000179,'Ugh... what is this place? Is that all that\'s left of the ship over there?',0,0,7,0,'draenei_survivor SAY_HEAL4'), +(-1000180,'Oh, the pain...',0,0,7,0,'draenei_survivor SAY_HELP1'), +(-1000181,'Everything hurts, Please make it stop...',0,0,7,0,'draenei_survivor SAY_HELP2'), +(-1000182,'Ughhh... I hurt. Can you help me?',0,0,7,0,'draenei_survivor SAY_HELP3'), +(-1000183,'I don\'t know if I can make it, please help me...',0,0,7,0,'draenei_survivor SAY_HELP4'), +(-1000184,'Yes Master, all goes along as planned.',0,0,7,0,'engineer_spark SAY_TEXT'), +(-1000185,'puts the shell to his ear.',0,2,7,0,'engineer_spark EMOTE_SHELL'), +(-1000186,'Now I cut you!',0,1,7,0,'engineer_spark SAY_ATTACK'), +(-1000187,'Thank you, dear $C, you just saved my life.',0,0,7,0,'faulk SAY_HEAL'), +(-1000188,'Deployment sucessful. Trespassers will be neutralized.',0,0,0,0,'converted_sentry SAY_CONVERTED_1'), +(-1000189,'Objective acquired. Initiating security routines.',0,0,0,0,'converted_sentry SAY_CONVERTED_2'), +(-1000190,'In Nagrand, food hunt ogre!',0,0,0,0,' SAY_LUMP_0'), +(-1000191,'You taste good with maybe a little salt and pepper.',0,0,0,0,' SAY_LUMP_1'), +(-1000192,'OK, OK! Lump give up!',0,0,0,0,' SAY_LUMP_DEFEAT'), +(-1000193,'Thank you, dear $C, you just saved my life.',0,0,1,0,'stillblade SAY_HEAL'), +(-1000194,'I give up! Please don\'t kill me!',0,0,0,0,'unkor SAY_SUBMIT'), +(-1000195,'I choose the third option: KILLING YOU!',0,0,0,0,'floon SAY_FLOON_ATTACK'), +(-1000196,'Belore...',0,0,1,0,'lady_sylvanas SAY_LAMENT_END'), +(-1000197,'kneels down and pick up the amulet.',0,2,1,0,'lady_sylvanas EMOTE_LAMENT_END'), +(-1000198,'Taste blade, mongrel!',0,0,0,0,'SAY_GUARD_SIL_AGGRO1'), +(-1000199,'Please tell me that you didn\'t just do what I think you just did. Please tell me that I\'m not going to have to hurt you...',0,0,0,0,'SAY_GUARD_SIL_AGGRO2'), +(-1000200,'As if we don\'t have enough problems, you go and create more!',0,0,0,0,'SAY_GUARD_SIL_AGGRO3'), +(-1000201,'I\'m saved! Thank you, doctor!',0,0,0,0,'injured_patient SAY_DOC1'), +(-1000202,'HOORAY! I AM SAVED!',0,0,0,0,'injured_patient SAY_DOC2'), +(-1000203,'Sweet, sweet embrace... take me...',0,0,0,0,'injured_patient SAY_DOC3'), +(-1000204,'looks up at you quizzically. Maybe you should inspect it?',0,2,0,0,'cluck EMOTE_A_HELLO'), +(-1000205,'looks at you unexpectadly.',0,2,0,0,'cluck EMOTE_H_HELLO'), +(-1000206,'starts pecking at the feed.',0,2,0,0,'cluck EMOTE_CLUCK_TEXT2'); diff --git a/sql/Updates/0.0.3/r855_scriptdev2_script_texts.sql b/sql/Updates/0.0.3/r855_scriptdev2_script_texts.sql new file mode 100644 index 000000000..5d2d1c62e --- /dev/null +++ b/sql/Updates/0.0.3/r855_scriptdev2_script_texts.sql @@ -0,0 +1,26 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000004 AND -1000001; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000001,'goes into a killing frenzy!',0,2,0,0,'EMOTE_GENERIC_FRENZY_KILL'), +(-1000002,'goes into a frenzy!',0,2,0,0,'EMOTE_GENERIC_FRENZY'), +(-1000003,'becomes enraged!',0,2,0,0,'EMOTE_GENERIC_ENRAGED'), +(-1000004,'goes into a berserker rage!',0,2,0,0,'EMOTE_GENERIC_BERSERK'); + +DELETE FROM script_texts WHERE entry BETWEEN -1000216 AND -1000207; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000207,'You have my blessing',0,0,0,0,'ashyen_and_keleth SAY_REWARD_BLESS'), +(-1000208,'Greetings citizen',0,0,7,0,'general_marcus SAY_GREETING'), +(-1000209,'Very well. Let\'s see what you have to show me, $N.',0,0,1,0,'anvilward SAY_ANVIL1'), +(-1000210,'What manner of trick is this, $R? If you seek to ambush me, I warn you I will not go down quietly!',0,0,1,0,'anvilward SAY_ANVIL2'), +(-1000211,'Warning! Emergency shutdown process initiated by $N. Shutdown will complete in two minutes.',0,2,0,0,'manaforge_control EMOTE_START'), +(-1000212,'Emergency shutdown will complete in one minute.',0,2,0,0,'manaforge_control EMOTE_60'), +(-1000213,'Emergency shutdown will complete in thirty seconds.',0,2,0,0,'manaforge_control EMOTE_30'), +(-1000214,'Emergency shutdown will complete in ten seconds.',0,2,0,0,'manaforge_control EMOTE_10'), +(-1000215,'Emergency shutdown complete.',0,2,0,0,'manaforge_control EMOTE_COMPLETE'), +(-1000216,'Emergency shutdown aborted.',0,2,0,0,'manaforge_control EMOTE_ABORT'); + +DELETE FROM script_texts WHERE entry BETWEEN -1329003 AND -1329000; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1329000,'Thanks to Egan',0,0,0,0,'freed_soul SAY_ZAPPED0'), +(-1329001,'Rivendare must die',0,0,0,0,'freed_soul SAY_ZAPPED1'), +(-1329002,'Who you gonna call?',0,0,0,0,'freed_soul SAY_ZAPPED2'), +(-1329003,'Don\'t cross those beams!',0,0,0,0,'freed_soul SAY_ZAPPED3'); diff --git a/sql/Updates/0.0.3/r856_scriptdev2_script_texts.sql b/sql/Updates/0.0.3/r856_scriptdev2_script_texts.sql new file mode 100644 index 000000000..a470f86de --- /dev/null +++ b/sql/Updates/0.0.3/r856_scriptdev2_script_texts.sql @@ -0,0 +1,35 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1564129 AND -1564097; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1564097,'Akama... your duplicity is hardly surprising. I should have slaughtered you and your malformed brethren long ago.',11463,1,0,0,'illidan SAY_CONVO_1'), +(-1564098,'We\'ve come to end your reign, Illidan. My people and all of Outland shall be free!',11389,1,0,25,'illidan SAY_CONVO_2'), +(-1564099,'Boldly said. But I remain unconvinced.',11464,1,0,396,'illidan SAY_CONVO_3'), +(-1564100,'The time has come! The moment is at hand!',11380,1,0,22,'illidan SAY_CONVO_4'), +(-1564101,'You are not prepared!',11466,1,0,406,'illidan SAY_CONVO_5'), +(-1564102,'Is this it, mortals? Is this all the fury you can muster?',11476,1,0,0,'illidan SAY_CONVO_6'), +(-1564103,'Their fury pales before mine, Illidan. We have some unsettled business between us.',11491,1,0,5,'illidan SAY_CONVO_7'), +(-1564104,'Maiev... How is this even possible?',11477,1,0,1,'illidan SAY_CONVO_8'), +(-1564105,'Ah... my long hunt is finally over. Today, Justice will be done!',11492,1,0,15,'illidan SAY_CONVO_9'), +(-1564106,'Feel the hatred of ten thousand years!',11470,1,0,0,'illidan SAY_CONVO_10'), +(-1564107,'Ahh... It is finished. You are beaten.',11496,1,0,0,'illidan SAY_CONVO_11'), +(-1564108,'You have won... Maiev...but the huntress... is nothing...without the hunt... you... are nothing... without me..',11478,1,0,65,'illidan SAY_CONVO_12'), +(-1564109,'He is right. I feel nothing... I am nothing...',11497,1,0,0,'illidan SAY_CONVO_13'), +(-1564110,'Farewell, champions.',11498,1,0,0,'illidan SAY_CONVO_14'), +(-1564111,'The Light will fill these dismal halls once again. I swear it.',11387,1,0,0,'illidan SAY_CONVO_15'), +(-1564112,'I can feel your hatred.',11467,1,0,0,'illidan SAY_TAUNT_1'), +(-1564113,'Give in to your fear!',11468,1,0,0,'illidan SAY_TAUNT_2'), +(-1564114,'You know nothing of power!',11469,1,0,0,'illidan SAY_TAUNT_3'), +(-1564115,'Such... arrogance!',11471,1,0,0,'illidan SAY_TAUNT_4'), +(-1564116,'That is for Naisha!',11493,1,0,0,'illidan SAY_MAIEV_TAUNT_1'), +(-1564117,'Bleed as I have bled!',11494,1,0,0,'illidan SAY_MAIEV_TAUNT_2'), +(-1564118,'There shall be no prison for you this time!',11495,1,0,0,'illidan SAY_MAIEV_TAUNT_3'), +(-1564119,'Meet your end, demon!',11500,1,0,0,'illidan SAY_MAIEV_TAUNT_4'), +(-1564120,'Be wary friends, The Betrayer meditates in the court just beyond.',11388,1,0,0,'illidan SAY_AKAMA_BEWARE'), +(-1564121,'Come, my minions. Deal with this traitor as he deserves!',11465,1,0,0,'illidan SAY_AKAMA_MINION'), +(-1564122,'I\'ll deal with these mongrels. Strike now, friends! Strike at the betrayer!',11390,1,0,0,'illidan SAY_AKAMA_LEAVE'), +(-1564123,'Who shall be next to taste my blades?!',11473,1,0,0,'illidan SAY_KILL1'), +(-1564124,'This is too easy!',11472,1,0,0,'illidan SAY_KILL2'), +(-1564125,'I will not be touched by rabble such as you!',11479,1,0,254,'illidan SAY_TAKEOFF'), +(-1564126,'Behold the flames of Azzinoth!',11480,1,0,0,'illidan SAY_SUMMONFLAMES'), +(-1564127,'Stare into the eyes of the Betrayer!',11481,1,0,0,'illidan SAY_EYE_BLAST'), +(-1564128,'Behold the power... of the demon within!',11475,1,0,0,'illidan SAY_MORPH'), +(-1564129,'You\'ve wasted too much time mortals, now you shall fall!',11474,1,0,0,'illidan SAY_ENRAGE'); diff --git a/sql/Updates/0.0.3/r860_scriptdev2_script_texts.sql b/sql/Updates/0.0.3/r860_scriptdev2_script_texts.sql new file mode 100644 index 000000000..f27d82f3b --- /dev/null +++ b/sql/Updates/0.0.3/r860_scriptdev2_script_texts.sql @@ -0,0 +1,28 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1999925 AND -1999900; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1999900,'Let the games begin.',8280,1,0,0,'example_creature SAY_AGGRO'), +(-1999901,'I see endless suffering. I see torment. I see rage. I see everything.',8831,1,0,0,'example_creature SAY_RANDOM_0'), +(-1999902,'Muahahahaha',8818,1,0,0,'example_creature SAY_RANDOM_1'), +(-1999903,'These mortal infedels my lord, they have invaded your sanctum and seek to steal your secrets.',8041,1,0,0,'example_creature SAY_RANDOM_2'), +(-1999904,'You are already dead.',8581,1,0,0,'example_creature SAY_RANDOM_3'), +(-1999905,'Where to go? What to do? So many choices that all end in pain, end in death.',8791,1,0,0,'example_creature SAY_RANDOM_4'), +(-1999906,'$N, I sentance you to death!',8588,1,0,0,'example_creature SAY_BESERK'), +(-1999907,'The suffering has just begun!',0,1,0,0,'example_creature SAY_PHASE'), +(-1999908,'I always thought I was a good dancer.',0,0,0,0,'example_creature SAY_DANCE'), +(-1999909,'Move out Soldier!',0,0,0,0,'example_creature SAY_SALUTE'), +(-1999910,'Help $N! I\'m under attack!',0,0,0,0,'example_escort SAY_AGGRO1'), +(-1999911,'Die scum!',0,0,0,0,'example_escort SAY_AGGRO2'), +(-1999912,'Hmm a nice day for a walk alright',0,0,0,0,'example_escort SAY_WP_1'), +(-1999913,'Wild Felboar attack!',0,0,0,0,'example_escort SAY_WP_2'), +(-1999914,'Time for me to go! See ya around $N!',0,0,0,3,'example_escort SAY_WP_3'), +(-1999915,'Bye Bye!',0,0,0,3,'example_escort SAY_WP_4'), +(-1999916,'How dare you leave me like that! I hate you! =*(',0,3,0,0,'example_escort SAY_DEATH_1'), +(-1999917,'...no...how could you let me die $N',0,0,0,0,'example_escort SAY_DEATH_2'), +(-1999918,'ugh...',0,0,0,0,'example_escort SAY_DEATH_3'), +(-1999919,'Taste death!',0,0,0,0,'example_escort SAY_SPELL'), +(-1999920,'Fireworks!',0,0,0,0,'example_escort SAY_RAND_1'), +(-1999921,'Hmm, I think I could use a buff.',0,0,0,0,'example_escort SAY_RAND_2'), +(-1999922,'Normal select, guess you\'re not interested.',0,0,0,0,'example_gossip_codebox SAY_NOT_INTERESTED'), +(-1999923,'Wrong!',0,0,0,0,'example_gossip_codebox SAY_WRONG'), +(-1999924,'You\'re right, you are allowed to see my inner secrets.',0,0,0,0,'example_gossip_codebox SAY_CORRECT'), +(-1999925,'Hi!',0,0,0,0,'example_areatrigger SAY_HI'); diff --git a/sql/Updates/0.0.3/r862_scriptdev2_script_texts.sql b/sql/Updates/0.0.3/r862_scriptdev2_script_texts.sql new file mode 100644 index 000000000..9c4e63914 --- /dev/null +++ b/sql/Updates/0.0.3/r862_scriptdev2_script_texts.sql @@ -0,0 +1,16 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000230 AND -1000217; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000217,'Greetings, $N. I will guide you through the cavern. Please try and keep up.',0,3,0,0,'WHISPER_CUSTODIAN_1'), +(-1000218,'We do not know if the Caverns of Time have always been accessible to mortals. Truly, it is impossible to tell as the Timeless One is in perpetual motion, changing our timeways as he sees fit. What you see now may very well not exist tomorrow. You may wake up and have no memory of this place.',0,3,0,0,'WHISPER_CUSTODIAN_2'), +(-1000219,'It is strange, I know... Most mortals cannot actually comprehend what they see here, as often, what they see is not anchored within their own perception of reality.',0,3,0,0,'WHISPER_CUSTODIAN_3'), +(-1000220,'Follow me, please.',0,3,0,0,'WHISPER_CUSTODIAN_4'), +(-1000221,'There are only two truths to be found here: First, that time is chaotic, always in flux, and completely malleable and second, perception does not dictate reality.',0,3,0,0,'WHISPER_CUSTODIAN_5'), +(-1000222,'As custodians of time, we watch over and care for Nozdormu\'s realm. The master is away at the moment, which means that attempts are being made to dramatically alter time. The master never meddles in the affairs of mortals but instead corrects the alterations made to time by others. He is reactionary in this regard.',0,3,0,0,'WHISPER_CUSTODIAN_6'), +(-1000223,'For normal maintenance of time, the Keepers of Time are sufficient caretakers. We are able to deal with most ordinary disturbances. I speak of little things, such as rogue mages changing something in the past to elevate their status or wealth in the present.',0,3,0,0,'WHISPER_CUSTODIAN_7'), +(-1000224,'These tunnels that you see are called timeways. They are infinite in number. The ones that currently exist in your reality are what the master has deemed as \'trouble spots.\' These trouble spots may differ completely in theme but they always share a cause. That is, their existence is a result of the same temporal disturbance. Remember that should you venture inside one...',0,3,0,0,'WHISPER_CUSTODIAN_8'), +(-1000225,'This timeway is in great disarray! We have agents inside right now attempting to restore order. What information I have indicates that Thrall\'s freedom is in jeopardy. A malevolent organization known as the Infinite Dragonflight is trying to prevent his escape. I fear without outside assistance, all will be lost.',0,3,0,0,'WHISPER_CUSTODIAN_9'), +(-1000226,'We have very little information on this timeway. Sa\'at has been dispatched and is currently inside. The data we have gathered from his correspondence is that the Infinite Dragonflight are once again attempting to alter time. Could it be that the opening of the Dark Portal is being targeted for sabotage? Let us hope not...',0,3,0,0,'WHISPER_CUSTODIAN_10'), +(-1000227,'This timeway is currently collapsing. What that may hold for the past, present and future is currently unknown...',0,3,0,0,'WHISPER_CUSTODIAN_11'), +(-1000228,'The timeways are currently ranked in order from least catastrophic to most catastrophic. Note that they are all classified as catastrophic, meaning that any single one of these timeways collapsing would mean that your world would end. We only classify them in such a way so that the heroes and adventurers that are sent here know which timeway best suits their abilities.',0,3,0,0,'WHISPER_CUSTODIAN_12'), +(-1000229,'All we know of this timeway is that it leads to Mount Hyjal. The Infinite Dragonflight have gone to great lengths to prevent our involvement. We know next to nothing, mortal. Soridormi is currently attempting to break through the timeway\'s defenses but has thus far been unsuccessful. You might be our only hope of breaking through and resolving the conflict.',0,3,0,0,'WHISPER_CUSTODIAN_13'), +(-1000230,'Our time is at an end $N. I would wish you luck, if such a thing existed.',0,3,0,0,'WHISPER_CUSTODIAN_14'); diff --git a/sql/Updates/0.0.3/r863_mangos.sql b/sql/Updates/0.0.3/r863_mangos.sql new file mode 100644 index 000000000..ca629066b --- /dev/null +++ b/sql/Updates/0.0.3/r863_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName`='' WHERE `entry` IN (15273,15274,15294,15298,15367); diff --git a/sql/Updates/0.0.3/r872_mangos.sql b/sql/Updates/0.0.3/r872_mangos.sql new file mode 100644 index 000000000..3ce61124c --- /dev/null +++ b/sql/Updates/0.0.3/r872_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName`='npc_draenei_survivor' WHERE `entry`=16483; diff --git a/sql/Updates/0.0.3/r883_mangos.sql b/sql/Updates/0.0.3/r883_mangos.sql new file mode 100644 index 000000000..a1e9e0835 --- /dev/null +++ b/sql/Updates/0.0.3/r883_mangos.sql @@ -0,0 +1 @@ +UPDATE `item_template` SET `ScriptName`='item_arcane_charges' WHERE `entry`=34475; diff --git a/sql/Updates/0.0.3/r895_mangos.sql b/sql/Updates/0.0.3/r895_mangos.sql new file mode 100644 index 000000000..f9cdf4f98 --- /dev/null +++ b/sql/Updates/0.0.3/r895_mangos.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName`='npc_ishanah' WHERE `entry`=18538; diff --git a/sql/Updates/0.0.3/r900_mangos.sql b/sql/Updates/0.0.3/r900_mangos.sql new file mode 100644 index 000000000..360eed34e --- /dev/null +++ b/sql/Updates/0.0.3/r900_mangos.sql @@ -0,0 +1 @@ +UPDATE `gameobject_template` SET `ScriptName`='go_cat_figurine' WHERE `entry`=13873; diff --git a/sql/Updates/0.0.3/r903_mangos.sql b/sql/Updates/0.0.3/r903_mangos.sql new file mode 100644 index 000000000..85df8a38f --- /dev/null +++ b/sql/Updates/0.0.3/r903_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='npc_garments_of_quests' WHERE entry IN (12429,12423,12427,12430,12428); +UPDATE creature_template SET ScriptName='npc_ruul_snowhoof' WHERE entry=12818; diff --git a/sql/Updates/0.0.3/r903_scriptdev2_script_texts.sql b/sql/Updates/0.0.3/r903_scriptdev2_script_texts.sql new file mode 100644 index 000000000..78b792f20 --- /dev/null +++ b/sql/Updates/0.0.3/r903_scriptdev2_script_texts.sql @@ -0,0 +1,5 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000233 AND -1000231; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000231,'Ah, $GPriest:Priestess; you came along just in time. I appreciate it.',0,0,1,2,'SAY_DG_KEL_HEALED'), +(-1000232,'Thank you! Thank you, $GPriest:Priestess;. Now i can take on those gnolls with your power back to me!',0,0,1,1,'SAY_DG_KEL_THANKS'), +(-1000233,'Farewell to you, and may shadow always protect you!',0,0,1,3,'SAY_DG_KEL_GOODBYE'); diff --git a/sql/Updates/0.0.3/r907_mangos.sql b/sql/Updates/0.0.3/r907_mangos.sql new file mode 100644 index 000000000..d5333b146 --- /dev/null +++ b/sql/Updates/0.0.3/r907_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='npc_khadgar' WHERE entry=18166; +UPDATE creature_template SET ScriptName='npc_khadgars_servant' WHERE entry=19685; diff --git a/sql/Updates/0.0.3/r907_scriptdev2_script_texts.sql b/sql/Updates/0.0.3/r907_scriptdev2_script_texts.sql new file mode 100644 index 000000000..1a42a4745 --- /dev/null +++ b/sql/Updates/0.0.3/r907_scriptdev2_script_texts.sql @@ -0,0 +1,24 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000255 AND -1000234; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000234,'Follow me, stranger. This won\'t take long.',0,0,0,0,'SAY_KHAD_SERV_0'), +(-1000235,'Shattrath was once the draenei capital of this world. Its name means "dwelling of light."',0,4,0,0,'SAY_KHAD_SERV_1'), +(-1000236,'When the Burning Legion turned the orcs against the draenei, the fiercest battle was fought here. The draenei fought tooth and nail, but in the end the city fell.',0,4,0,0,'SAY_KHAD_SERV_2'), +(-1000237,'The city was left in ruins and darkness... until the Sha\'tar arrived.',0,4,0,0,'SAY_KHAD_SERV_3'), +(-1000238,'Let us go into the Lower City. I will warn you that as one of the only safe havens in Outland, Shattrath has attracted droves of refugees from all wars, current and past.',0,4,0,0,'SAY_KHAD_SERV_4'), +(-1000239,'The Sha\'tar, or "born from light" are the naaru that came to Outland to fight the demons of the Burning Legion.',0,4,0,0,'SAY_KHAD_SERV_5'), +(-1000240,'They were drawn to the ruins of Shattrath City where a small remnant of the draenei priesthood conducted its rites inside a ruined temple on this very spot.',0,4,0,0,'SAY_KHAD_SERV_6'), +(-1000241,'The priesthood, known as the Aldor, quickly regained its strength as word spread that the naaru had returned and reconstruction soon began. The ruined temple is now used as an infirmary for injured refugees.',0,4,0,0,'SAY_KHAD_SERV_7'), +(-1000242,'It wouldn\'t be long, however, before the city came under attack once again. This time, the attack came from Illidan\'s armies. A large regiment of blood elves had been sent by Illidan\'s ally, Kael\'thas Sunstrider, to lay waste to the city.',0,4,0,0,'SAY_KHAD_SERV_8'), +(-1000243,'As the regiment of blood elves crossed this very bridge, the Aldor\'s exarchs and vindicators lined up to defend the Terrace of Light. But then the unexpected happened.',0,4,0,0,'SAY_KHAD_SERV_9'), +(-1000244,'The blood elves laid down their weapons in front of the city\'s defenders; their leader, a blood elf elder known as Voren\'thal, stormed into the Terrace of Light and demanded to speak to A\'dal.',0,4,0,0,'SAY_KHAD_SERV_10'), +(-1000245,'As the naaru approached him, Voren\'thal kneeled before him and uttered the following words: "I\'ve seen you in a vision, naaru. My race\'s only hope for survival lies with you. My followers and I are here to serve you."',0,4,0,0,'SAY_KHAD_SERV_11'), +(-1000246,'The defection of Voren\'thal and his followers was the largest loss ever incurred by Kael\'s forces. And these weren\'t just any blood elves. Many of the best and brightest amongst Kael\'s scholars and magisters had been swayed by Voren\'thal\'s influence.',0,4,0,0,'SAY_KHAD_SERV_12'), +(-1000247,'The naaru accepted the defectors, who would become known as the Scryers; their dwelling lies in the platform above. Only those initiated with the Scryers are allowed there.',0,4,0,0,'SAY_KHAD_SERV_13'), +(-1000248,'The Aldor are followers of the Light and forgiveness and redemption are values they understand. However, they found hard to forget the deeds of the blood elves while under Kael\'s command.',0,4,0,0,'SAY_KHAD_SERV_14'), +(-1000249,'Many of the priesthood had been slain by the same magisters who now vowed to serve the naaru. They were not happy to share the city with their former enemies.',0,4,0,0,'SAY_KHAD_SERV_15'), +(-1000250,'The Aldor\'s most holy temple and its surrounding dwellings lie on the terrace above. As a holy site, only the initiated are welcome inside.',0,4,0,0,'SAY_KHAD_SERV_16'), +(-1000251,'The attacks against Shattrath continued, but the city did not fall\, as you can see. On the contrary, the naaru known as Xi\'ri led a successful incursion into Shadowmoon Valley - Illidan\'s doorstep.',0,4,0,0,'SAY_KHAD_SERV_17'), +(-1000252,'There he continues to wage war on Illidan with the assistance of the Aldor and the Scryers. The two factions have not given up on their old feuds, though.',0,4,0,0,'SAY_KHAD_SERV_18'), +(-1000253,'Such is their animosity that they vie for the honor of being sent to assist the naaru there. Each day, that decision is made here by A\'dal. The armies gather here to receive A\'dal\'s blessing before heading to Shadowmoon.',0,4,0,0,'SAY_KHAD_SERV_19'), +(-1000254,'Khadgar should be ready to see you again. Just remember that to serve the Sha\'tar you will most likely have to ally with the Aldor or the Scryers. And seeking the favor of one group will cause the others\' dislike.',0,4,0,0,'SAY_KHAD_SERV_20'), +(-1000255,'Good luck stranger, and welcome to Shattrath City.','0','4','0','0','SAY_KHAD_SERV_21'); diff --git a/sql/Updates/0.0.3/r909_mangos.sql b/sql/Updates/0.0.3/r909_mangos.sql new file mode 100644 index 000000000..579bfa49d --- /dev/null +++ b/sql/Updates/0.0.3/r909_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_nestlewood_owlkin' WHERE entry=16518; diff --git a/sql/Updates/0.0.3/r910_scriptdev2_script_texts.sql b/sql/Updates/0.0.3/r910_scriptdev2_script_texts.sql new file mode 100644 index 000000000..f08852c03 --- /dev/null +++ b/sql/Updates/0.0.3/r910_scriptdev2_script_texts.sql @@ -0,0 +1,16 @@ +UPDATE script_texts SET language=0 WHERE entry=-1000231; +UPDATE script_texts SET comment='garments SAY_COMMON_HEALED' WHERE entry=-1000231; +UPDATE script_texts SET content_default='Thank you! Thank you, $GPriest:Priestess;. Now I can take on those gnolls with your power to back me!' WHERE entry=-1000232; +UPDATE script_texts SET comment='garments SAY_DG_KEL_THANKS' WHERE entry=-1000232; +UPDATE script_texts SET comment='garments SAY_DG_KEL_GOODBYE' WHERE entry=-1000233; + +DELETE FROM script_texts WHERE entry BETWEEN -1000263 AND -1000256; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000256,'Thank you! Thank you, $GPriest:Priestess;. Now I can take on those murlocs with the Light on my side!',0,0,7,1,'garments SAY_ROBERTS_THANKS'), +(-1000257,'Farewell to you, and may the Light be with you always.',0,0,7,3,'garments SAY_ROBERTS_GOODBYE'), +(-1000258,'Thank you! Thank you, $GPriest:Priestess;. Now I can take on those humans with your power to back me!',0,0,1,1,'garments SAY_KORJA_THANKS'), +(-1000259,'Farewell to you, and may our ancestors be with you always!',0,0,1,3,'garments SAY_KORJA_GOODBYE'), +(-1000260,'Thank you! Thank you, $GPriest:Priestess;. Now I can take on those wendigo with the Light on my side!',0,0,7,1,'garments SAY_DOLF_THANKS'), +(-1000261,'Farewell to you, and may the Light be with you always.',0,0,7,3,'garments SAY_DOLF_GOODBYE'), +(-1000262,'Thank you! Thank you, $GPriest:Priestess;. Now I can take on those corrupt timberlings with Elune\'s power behind me!',0,0,2,1,'garments SAY_SHAYA_THANKS'), +(-1000263,'Farewell to you, and may Elune be with you always.',0,0,2,3,'garments SAY_SHAYA_GOODBYE'); diff --git a/sql/Updates/0.0.3/r912_mangos.sql b/sql/Updates/0.0.3/r912_mangos.sql new file mode 100644 index 000000000..469698b9c --- /dev/null +++ b/sql/Updates/0.0.3/r912_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_professor_phizzlethorpe' WHERE entry=2768; diff --git a/sql/Updates/0.0.3/r912_scriptdev2_script_texts.sql b/sql/Updates/0.0.3/r912_scriptdev2_script_texts.sql new file mode 100644 index 000000000..079bab5e3 --- /dev/null +++ b/sql/Updates/0.0.3/r912_scriptdev2_script_texts.sql @@ -0,0 +1,12 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000273 and -1000264; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000264,'Ok, $N. Follow me to the cave where I\'ll attempt to harness the power of the rune stone into these goggles.',0,0,0,1,'phizzlethorpe SAY_PROGRESS_1'), +(-1000265,'I discovered this cave on our first day here. I believe the energy in the stone can be used to our advantage.',0,0,0,1,'phizzlethorpe SAY_PROGRESS_2'), +(-1000266,'I\'ll begin drawing energy from the stone. Your job, $N, is to defend me. This place is cursed... trust me.',0,0,0,1,'phizzlethorpe SAY_PROGRESS_3'), +(-1000267,'begins tinkering with the goggles before the stone.',0,2,0,0,'phizzlethorpe EMOTE_PROGRESS_4'), +(-1000268,'Help!!! Get these things off me so I can get my work done!',0,0,0,0,'phizzlethorpe SAY_AGGRO'), +(-1000269,'Almost done! Just a little longer!',0,0,0,1,'phizzlethorpe SAY_PROGRESS_5'), +(-1000270,'I\'ve done it! I have harnessed the power of the stone into the goggles! Let\'s get out of here!',0,0,0,1,'phizzlethorpe SAY_PROGRESS_6'), +(-1000271,'Phew! Glad to be back from that creepy cave.',0,0,0,1,'phizzlethorpe SAY_PROGRESS_7'), +(-1000272,'hands one glowing goggles over to Doctor Draxlegauge.',0,2,0,0,'phizzlethorpe EMOTE_PROGRESS_8'), +(-1000273,'Doctor Draxlegauge will give you further instructions, $N. Many thanks for your help!',0,0,0,1,'phizzlethorpe SAY_PROGRESS_9'); diff --git a/sql/Updates/0.0.3/r916_mangos.sql b/sql/Updates/0.0.3/r916_mangos.sql new file mode 100644 index 000000000..3aaa023d7 --- /dev/null +++ b/sql/Updates/0.0.3/r916_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_dirty_larry' WHERE entry=19720; diff --git a/sql/Updates/0.0.3/r916_scriptdev2_script_texts.sql b/sql/Updates/0.0.3/r916_scriptdev2_script_texts.sql new file mode 100644 index 000000000..518982416 --- /dev/null +++ b/sql/Updates/0.0.3/r916_scriptdev2_script_texts.sql @@ -0,0 +1,8 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000279 AND -1000274; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000274,'Time to teach you a lesson in manners, little $Gboy:girl;!',0,0,0,0,'larry SAY_START'), +(-1000275,'Now I\'m gonna give you to the count of \'3\' to get out of here before I sick the dogs on you.',0,0,0,0,'larry SAY_COUNT'), +(-1000276,'1...',0,0,0,0,'larry SAY_COUNT_1'), +(-1000277,'2...',0,0,0,0,'larry SAY_COUNT_2'), +(-1000278,'Time to meet your maker!',0,0,0,0,'larry SAY_ATTACK_5'), +(-1000279,'Alright, we give up! Don\'t hurt us!',0,0,0,0,'larry SAY_GIVEUP'); diff --git a/sql/Updates/0.0.3/r919_mangos.sql b/sql/Updates/0.0.3/r919_mangos.sql new file mode 100644 index 000000000..3d4e34220 --- /dev/null +++ b/sql/Updates/0.0.3/r919_mangos.sql @@ -0,0 +1 @@ +UPDATE gameobject_template SET ScriptName='go_gilded_brazier' WHERE entry=181956; diff --git a/sql/Updates/0.0.3/r922_scriptdev2_script_waypoint.sql b/sql/Updates/0.0.3/r922_scriptdev2_script_waypoint.sql new file mode 100644 index 000000000..3d75c6a57 --- /dev/null +++ b/sql/Updates/0.0.3/r922_scriptdev2_script_waypoint.sql @@ -0,0 +1,11 @@ +DROP TABLE IF EXISTS script_waypoint; +CREATE TABLE script_waypoint ( + entry mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'creature_template entry', + pointid mediumint(8) unsigned NOT NULL DEFAULT '0', + location_x float NOT NULL DEFAULT '0', + location_y float NOT NULL DEFAULT '0', + location_z float NOT NULL DEFAULT '0', + waittime int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'waittime in millisecs', + point_comment text, + PRIMARY KEY (entry, pointid) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Script Creature waypoints'; diff --git a/sql/Updates/0.0.3/r924_scriptdev2_script_waypoint.sql b/sql/Updates/0.0.3/r924_scriptdev2_script_waypoint.sql new file mode 100644 index 000000000..fa21e0139 --- /dev/null +++ b/sql/Updates/0.0.3/r924_scriptdev2_script_waypoint.sql @@ -0,0 +1,37 @@ +DELETE FROM script_waypoint WHERE entry=16295; +INSERT INTO script_waypoint VALUES +(16295, 0, 7545.070000, -7359.870000, 162.354000, 4000, 'SAY_START'), +(16295, 1, 7550.048340, -7362.237793, 162.235657, 0, ''), +(16295, 2, 7566.976074, -7364.315430, 161.738770, 0, ''), +(16295, 3, 7578.830566, -7361.677734, 161.738770, 0, ''), +(16295, 4, 7590.969238, -7359.053711, 162.257660, 0, ''), +(16295, 5, 7598.354004, -7362.815430, 162.256683, 4000, 'SAY_PROGRESS_1'), +(16295, 6, 7605.861328, -7380.424316, 161.937073, 0, ''), +(16295, 7, 7605.295410, -7387.382813, 157.253998, 0, ''), +(16295, 8, 7606.131836, -7393.893555, 156.941925, 0, ''), +(16295, 9, 7615.207520, -7400.187012, 157.142639, 0, ''), +(16295, 10, 7618.956543, -7402.652832, 158.202042, 0, ''), +(16295, 11, 7636.850586, -7401.756836, 162.144791, 0, 'SAY_PROGRESS_2'), +(16295, 12, 7637.058105, -7404.944824, 162.206970, 4000, ''), +(16295, 13, 7636.910645, -7412.585449, 162.366425, 0, ''), +(16295, 14, 7637.607910, -7425.591797, 162.630661, 0, ''), +(16295, 15, 7637.816895, -7459.057129, 163.302704, 0, ''), +(16295, 16, 7638.859863, -7470.902344, 162.517059, 0, ''), +(16295, 17, 7641.395996, -7488.217285, 157.381287, 0, ''), +(16295, 18, 7634.455566, -7505.451660, 154.682159, 0, 'SAY_PROGRESS_3'), +(16295, 19, 7631.906738, -7516.948730, 153.597382, 0, ''), +(16295, 20, 7622.231445, -7537.037598, 151.587112, 0, ''), +(16295, 21, 7610.921875, -7550.670410, 149.639374, 0, ''), +(16295, 22, 7598.229004, -7562.551758, 145.953888, 0, ''), +(16295, 23, 7588.509277, -7577.755371, 148.294479, 0, ''), +(16295, 24, 7567.339355, -7608.456055, 146.006485, 0, ''), +(16295, 25, 7562.547852, -7617.417969, 148.097504, 0, ''), +(16295, 26, 7561.508789, -7645.064453, 151.245163, 0, ''), +(16295, 27, 7563.337402, -7654.652344, 151.227158, 0, ''), +(16295, 28, 7565.533691, -7658.296387, 151.248886, 0, ''), +(16295, 39, 7571.155762, -7659.118652, 151.244568, 0, ''), +(16295, 30, 7579.119629, -7662.213867, 151.651505, 0, 'quest complete'), +(16295, 31, 7603.768066, -7667.000488, 153.997726, 0, ''), +(16295, 32, 7603.768066, -7667.000488, 153.997726, 4000, 'SAY_END_1'), +(16295, 33, 7603.768066, -7667.000488, 153.997726, 8000, 'SAY_END_2'), +(16295, 34, 7603.768066, -7667.000488, 153.997726, 0, ''); diff --git a/sql/Updates/0.0.3/r936_scriptdev2_script_waypoint.sql b/sql/Updates/0.0.3/r936_scriptdev2_script_waypoint.sql new file mode 100644 index 000000000..a8df7e4d4 --- /dev/null +++ b/sql/Updates/0.0.3/r936_scriptdev2_script_waypoint.sql @@ -0,0 +1,288 @@ +DELETE FROM script_waypoint WHERE entry=467; +INSERT INTO script_waypoint VALUES +(467, 0, -10508.40, 1068.00, 55.21, 0, ''), +(467, 1, -10518.30, 1074.84, 53.96, 0, ''), +(467, 2, -10534.82, 1081.92, 49.88, 0, ''), +(467, 3, -10546.51, 1084.88, 50.13, 0, ''), +(467, 4, -10555.29, 1084.45, 45.75, 0, ''), +(467, 5, -10566.57, 1083.53, 42.10, 0, ''), +(467, 6, -10575.83, 1082.34, 39.46, 0, ''), +(467, 7, -10585.67, 1081.08, 37.77, 0, ''), +(467, 8, -10600.08, 1078.19, 36.23, 0, ''), +(467, 9, -10608.69, 1076.08, 35.88, 0, ''), +(467, 10, -10621.26, 1073.00, 35.40, 0, ''), +(467, 11, -10638.12, 1060.18, 33.61, 0, ''), +(467, 12, -10655.87, 1038.99, 33.48, 0, ''), +(467, 13, -10664.68, 1030.54, 32.70, 0, ''), +(467, 14, -10708.68, 1033.86, 33.32, 0, ''), +(467, 15, -10754.43, 1017.93, 32.79, 0, ''), +(467, 16, -10802.26, 1018.01, 32.16, 0, ''), +(467, 17, -10832.60, 1009.04, 32.71, 0, ''), +(467, 18, -10866.56, 1006.51, 31.71, 0, ''), +(467, 19, -10879.98, 1005.10, 32.84, 0, ''), +(467, 20, -10892.45, 1001.32, 34.46, 0, ''), +(467, 21, -10906.14, 997.11, 36.15, 0, ''), +(467, 22, -10922.26, 1002.23, 35.74, 0, ''), +(467, 23, -10936.32, 1023.38, 36.52, 0, ''), +(467, 24, -10933.35, 1052.61, 35.85, 0, ''), +(467, 25, -10940.25, 1077.66, 36.49, 0, ''), +(467, 26, -10957.09, 1099.33, 36.83, 0, ''), +(467, 27, -10956.53, 1119.90, 36.73, 0, ''), +(467, 28, -10939.30, 1150.75, 37.42, 0, ''), +(467, 29, -10915.14, 1202.09, 36.55, 0, ''), +(467, 30, -10892.59, 1257.03, 33.37, 0, ''), +(467, 31, -10891.93, 1306.66, 35.45, 0, ''), +(467, 32, -10896.17, 1327.86, 37.77, 0, ''), +(467, 33, -10906.03, 1368.05, 40.91, 0, ''), +(467, 34, -10910.18, 1389.33, 42.62, 0, ''), +(467, 35, -10915.42, 1417.72, 42.93, 0, ''), +(467, 36, -10926.37, 1421.18, 43.04, 0, 'walk here and say'), +(467, 37, -10952.31, 1421.74, 43.40, 0, ''), +(467, 38, -10980.04, 1411.38, 42.79, 0, ''), +(467, 39, -11006.06, 1420.47, 43.26, 0, ''), +(467, 40, -11021.98, 1450.59, 43.09, 0, ''), +(467, 41, -11025.36, 1491.59, 43.15, 0, ''), +(467, 42, -11036.09, 1508.32, 43.28, 0, ''), +(467, 43, -11060.68, 1526.72, 43.19, 0, ''), +(467, 44, -11072.75, 1527.77, 43.20, 5000, 'say and quest credit'); + +DELETE FROM script_waypoint WHERE entry=2768; +INSERT INTO script_waypoint VALUES +(2768, 0, -2066.45, -2085.96, 9.08, 0, ''), +(2768, 1, -2077.99, -2105.33, 13.24, 0, ''), +(2768, 2, -2074.60, -2109.67, 14.24, 0, ''), +(2768, 3, -2076.60, -2117.46, 16.67, 0, ''), +(2768, 4, -2073.51, -2123.46, 18.42, 2000, ''), +(2768, 5, -2073.51, -2123.46, 18.42, 4000, ''), +(2768, 6, -2066.60, -2131.85, 21.56, 0, ''), +(2768, 7, -2053.85, -2143.19, 20.31, 0, ''), +(2768, 8, -2043.49, -2153.73, 20.20, 10000, ''), +(2768, 9, -2043.49, -2153.73, 20.20, 20000, ''), +(2768, 10, -2043.49, -2153.73, 20.20, 10000, ''), +(2768, 11, -2043.49, -2153.73, 20.20, 2000, ''), +(2768, 12, -2053.85, -2143.19, 20.31, 0, ''), +(2768, 13, -2066.60, -2131.85, 21.56, 0, ''), +(2768, 14, -2073.51, -2123.46, 18.42, 0, ''), +(2768, 15, -2076.60, -2117.46, 16.67, 0, ''), +(2768, 16, -2074.60, -2109.67, 14.24, 0, ''), +(2768, 17, -2077.99, -2105.33, 13.24, 0, ''), +(2768, 18, -2066.45, -2085.96, 9.08, 0, ''), +(2768, 19, -2066.41, -2086.21, 8.97, 6000, ''), +(2768, 20, -2066.41, -2086.21, 8.97, 2000, ''); + +DELETE FROM script_waypoint WHERE entry=12818; +INSERT INTO script_waypoint VALUES +(12818, 0, 3347.250089, -694.700989, 159.925995, 0, ''), +(12818, 1, 3341.527039, -694.725891, 161.124542, 4000, ''), +(12818, 2, 3338.351074, -686.088138, 163.444000, 0, ''), +(12818, 3, 3352.744873, -677.721741, 162.316269, 0, ''), +(12818, 4, 3370.291016, -669.366943, 160.751358, 0, ''), +(12818, 5, 3381.479492, -659.449097, 162.545303, 0, ''), +(12818, 6, 3389.554199, -648.500000, 163.651825, 0, ''), +(12818, 7, 3396.645020, -641.508911, 164.216019, 0, ''), +(12818, 8, 3410.498535, -634.299622, 165.773453, 0, ''), +(12818, 9, 3418.461426, -631.791992, 166.477615, 0, ''), +(12818, 10, 3429.500000, -631.588745, 166.921265, 0, ''), +(12818, 11,3434.950195, -629.245483, 168.333969, 0, ''), +(12818, 12,3438.927979, -618.503235, 171.503143, 0, ''), +(12818, 13,3444.217529, -609.293640, 173.077972, 1000, 'Ambush 1'), +(12818, 14,3460.505127, -593.794189, 174.342255, 0, ''), +(12818, 15,3480.283203, -578.210327, 176.652313, 0, ''), +(12818, 16,3492.912842, -562.335449, 181.396301, 0, ''), +(12818, 17,3495.230957, -550.977600, 184.652267, 0, ''), +(12818, 18,3496.247070, -529.194214, 188.172028, 0, ''), +(12818, 19,3497.619385, -510.411499, 188.345322, 1000, 'Ambush 2'), +(12818, 20,3498.498047, -497.787506, 185.806274, 0, ''), +(12818, 21,3484.218750, -489.717529, 182.389862, 4000, ''); + +DELETE FROM script_waypoint WHERE entry=12858; +INSERT INTO script_waypoint VALUES +(12858, 0, 1782.63, -2241.11, 109.73, 5000, ''), +(12858, 1, 1788.88, -2240.17, 111.71, 0, ''), +(12858, 2, 1797.49, -2238.11, 112.31, 0, ''), +(12858, 3, 1803.83, -2232.77, 111.22, 0, ''), +(12858, 4, 1806.65, -2217.83, 107.36, 0, ''), +(12858, 5, 1811.81, -2208.01, 107.45, 0, ''), +(12858, 6, 1820.85, -2190.82, 100.49, 0, ''), +(12858, 7, 1829.60, -2177.49, 96.44, 0, ''), +(12858, 8, 1837.98, -2164.19, 96.71, 0, 'prepare'), +(12858, 9, 1839.99, -2149.29, 96.78, 0, ''), +(12858, 10, 1835.14, -2134.98, 96.80, 0, ''), +(12858, 11, 1823.57, -2118.27, 97.43, 0, ''), +(12858, 12, 1814.99, -2110.35, 98.38, 0, ''), +(12858, 13, 1806.60, -2103.09, 99.19, 0, ''), +(12858, 14, 1798.27, -2095.77, 100.04, 0, ''), +(12858, 15, 1783.59, -2079.92, 100.81, 0, ''), +(12858, 16, 1776.79, -2069.48, 101.77, 0, ''), +(12858, 17, 1776.82, -2054.59, 109.82, 0, ''), +(12858, 18, 1776.88, -2047.56, 109.83, 0, ''), +(12858, 19, 1776.86, -2036.55, 109.83, 0, ''), +(12858, 20, 1776.90, -2024.56, 109.83, 0, 'win'), +(12858, 21, 1776.87, -2028.31, 109.83,60000, 'stay'), +(12858, 22, 1776.90, -2028.30, 109.83, 0, ''); + +DELETE FROM script_waypoint WHERE entry=15420; +INSERT INTO script_waypoint VALUES +(15420, 0, 9294.78, -6682.51, 22.42, 0, ''), +(15420, 1, 9298.27, -6667.99, 22.42, 0, ''), +(15420, 2, 9309.63, -6658.84, 22.43, 0, ''), +(15420, 3, 9304.43, -6649.31, 26.46, 0, ''), +(15420, 4, 9298.83, -6648.00, 28.61, 0, ''), +(15420, 5, 9291.06, -6653.46, 31.83,2500, ''), +(15420, 6, 9289.08, -6660.17, 31.85,5000, ''), +(15420, 7, 9291.06, -6653.46, 31.83, 0, ''); + +DELETE FROM script_waypoint WHERE entry=16993; +INSERT INTO script_waypoint VALUES +(16993, 0, -1137.72, 4272.10, 14.04, 5000, ''), +(16993, 1, -1141.34, 4232.42, 14.63, 0, ''), +(16993, 2, -1133.47, 4220.88, 11.78, 0, ''), +(16993, 3, -1126.18, 4213.26, 13.51, 0, ''), +(16993, 4, -1100.12, 4204.32, 16.41, 0, ''), +(16993, 5, -1063.68, 4197.92, 15.51, 0, ''), +(16993, 6, -1027.28, 4194.36, 15.52, 0, ''), +(16993, 7, -995.68, 4189.59, 19.84, 0, ''), +(16993, 8, -970.90, 4188.60, 24.61, 0, ''), +(16993, 9, -961.93, 4193.34, 26.11, 15000, 'Summon 1'), +(16993, 10, -935.52, 4210.99, 31.98, 0, ''), +(16993, 11, -913.42, 4218.27, 37.29, 0, ''), +(16993, 12, -896.53, 4207.73, 43.23, 0, ''), +(16993, 13, -868.49, 4194.77, 46.75, 30000, 'Kneel and Rest Here'), +(16993, 14, -852.83, 4198.29, 47.28, 15000, 'Summon 2'), +(16993, 15, -819.85, 4200.50, 46.37, 0, ''), +(16993, 16, -791.92, 4201.96, 44.19, 0, ''), +(16993, 17, -774.42, 4202.46, 47.41, 0, ''), +(16993, 18, -762.90, 4202.17, 48.81, 0, ''), +(16993, 19, -728.25, 4195.35, 50.68, 0, ''), +(16993, 20, -713.58, 4192.07, 53.98, 0, ''), +(16993, 21, -703.09, 4189.74, 56.96, 0, ''), +(16993, 22, -693.70, 4185.43, 57.06, 0, ''), +(16993, 23, -686.38, 4159.81, 60.26, 0, ''), +(16993, 24, -679.88, 4147.04, 64.20, 0, ''), +(16993, 25, -656.74, 4147.72, 64.11, 0, ''), +(16993, 26, -652.22, 4137.50, 64.58, 0, ''), +(16993, 27, -649.99, 4136.38, 64.63, 30000, 'Quest Credit'); + +DELETE FROM script_waypoint WHERE entry=17312; +INSERT INTO script_waypoint VALUES +(17312, 0, -4784.532227, -11051.060547, 3.484263, 0, ''), +(17312, 1, -4805.509277, -11037.293945, 3.043942, 0, ''), +(17312, 2, -4827.826172, -11034.398438, 1.741959, 0, ''), +(17312, 3, -4852.630859, -11033.695313, 2.208656, 0, ''), +(17312, 4, -4876.791992, -11034.517578, 3.175228, 0, ''), +(17312, 5, -4895.486816, -11038.306641, 9.390890, 0, ''), +(17312, 6, -4915.464844, -11048.402344, 12.369793, 0, ''), +(17312, 7, -4937.288086, -11067.041992, 13.857983, 0, ''), +(17312, 8, -4966.577637, -11067.507813, 15.754786, 0, ''), +(17312, 9, -4993.799805, -11056.544922, 19.175295, 0, ''), +(17312, 10, -5017.836426, -11052.569336, 22.476587, 0, ''), +(17312, 11, -5039.706543, -11058.459961, 25.831593, 0, ''), +(17312, 12, -5057.289063, -11045.474609, 26.972496, 0, ''), +(17312, 13, -5078.828125, -11037.601563, 29.053417, 0, ''), +(17312, 14, -5104.158691, -11039.195313, 29.440195, 0, ''), +(17312, 15, -5120.780273, -11039.518555, 30.142139, 0, ''), +(17312, 16, -5140.833008, -11039.810547, 28.788074, 0, ''), +(17312, 17, -5161.201660, -11040.050781, 27.879545, 4000, ''), +(17312, 18, -5171.842285, -11046.803711, 27.183821, 0, ''), +(17312, 19, -5185.995117, -11056.359375, 20.234867, 0, ''), +(17312, 20, -5198.485840, -11065.065430, 18.872593, 0, ''), +(17312, 21, -5214.062500, -11074.653320, 19.215731, 0, ''), +(17312, 22, -5220.157227, -11088.377930, 19.818476, 0, ''), +(17312, 23, -5233.652832, -11098.846680, 18.349432, 0, ''), +(17312, 24, -5250.163086, -11111.653320, 16.438959, 0, ''), +(17312, 25, -5268.194336, -11125.639648, 12.668313, 0, ''), +(17312, 26, -5286.270508, -11130.669922, 6.912246, 0, ''), +(17312, 27, -5317.449707, -11137.392578, 4.963446, 0, ''), +(17312, 28, -5334.854492, -11154.384766, 6.742664, 0, ''), +(17312, 29, -5353.874512, -11171.595703, 6.903912, 20000, ''), +(17312, 30, -5354.240000, -11171.940000, 6.890000, 0, ''); + +DELETE FROM script_waypoint WHERE entry=19685; +INSERT INTO script_waypoint VALUES +(19685, 0, -1863.369019, 5419.517090, -10.463668, 5000, ''), +(19685, 1, -1861.749023, 5416.465332, -10.508068, 0, ''), +(19685, 2, -1857.036133, 5410.966309, -12.428039, 0, ''), +(19685, 3, -1831.539185, 5365.472168, -12.428039, 0, ''), +(19685, 4, -1813.416504, 5333.776855, -12.428039, 0, ''), +(19685, 5, -1800.354370, 5313.290039, -12.428039, 0, ''), +(19685, 6, -1775.624878, 5268.786133, -38.809181, 0, ''), +(19685, 7, -1770.147339, 5259.268066, -38.829231, 0, ''), +(19685, 8, -1762.814209, 5261.098145, -38.848995, 0, ''), +(19685, 9, -1740.110474, 5268.858398, -40.208965, 0, ''), +(19685, 10, -1725.837402, 5270.936035, -40.208965, 0, ''), +(19685, 11, -1701.580322, 5290.323242, -40.209187, 0, ''), +(19685, 12, -1682.877808, 5291.406738, -34.429646, 0, ''), +(19685, 13, -1670.101685, 5291.201172, -32.786007, 0, ''), +(19685, 14, -1656.666870, 5294.333496, -37.862648, 0, ''), +(19685, 15, -1652.035767, 5295.413086, -40.245499, 0, ''), +(19685, 16, -1620.860596, 5300.133301, -40.208992, 0, ''), +(19685, 17, -1607.630981, 5293.983398, -38.577045, 5000, ''), +(19685, 18, -1607.630981, 5293.983398, -38.577045, 5000, ''), +(19685, 19, -1607.630981, 5293.983398, -38.577045, 5000, ''), +(19685, 20, -1622.140869, 5301.955566, -40.208897, 0, ''), +(19685, 21, -1621.131836, 5333.112793, -40.208897, 0, ''), +(19685, 22, -1637.598999, 5342.134277, -40.208790, 0, ''), +(19685, 23, -1648.521606, 5352.309570, -47.496170, 0, ''), +(19685, 24, -1654.606934, 5357.419434, -45.870892, 0, ''), +(19685, 25, -1633.670044, 5422.067871, -42.835541, 0, ''), +(19685, 26, -1656.567505, 5426.236328, -40.405815, 0, ''), +(19685, 27, -1664.932373, 5425.686523, -38.846405, 0, ''), +(19685, 28, -1681.406006, 5425.871094, -38.810928, 0, ''), +(19685, 29, -1730.875977, 5427.413574, -12.427910, 0, ''), +(19685, 30, -1743.509521, 5369.599121, -12.427910, 0, ''), +(19685, 31, -1877.217041, 5303.710449, -12.427989, 0, ''), +(19685, 32, -1890.371216, 5289.273438, -12.428268, 0, ''), +(19685, 33, -1905.505737, 5266.534668, 2.630672, 0, ''), +(19685, 34, -1909.381348, 5273.008301, 1.663714, 10000, ''), +(19685, 35, -1909.381348, 5273.008301, 1.663714, 12000, ''), +(19685, 36, -1909.381348, 5273.008301, 1.663714, 8000, ''), +(19685, 37, -1909.381348, 5273.008301, 1.663714, 15000, ''), +(19685, 38, -1927.561401, 5275.324707, 1.984987, 0, ''), +(19685, 39, -1927.385498, 5300.879883, -12.427236, 0, ''), +(19685, 40, -1921.063965, 5314.318359, -12.427236, 0, ''), +(19685, 41, -1965.425415, 5379.298828, -12.427236, 0, ''), +(19685, 42, -1981.233154, 5450.743652, -12.427236, 0, ''), +(19685, 43, -1958.022461, 5455.904297, 0.487659, 0, ''), +(19685, 44, -1951.991455, 5463.580566, 0.874490, 10000, ''), +(19685, 45, -1951.991455, 5463.580566, 0.874490, 12000, ''), +(19685, 46, -1968.730225, 5481.752930, -12.427846, 0, ''), +(19685, 47, -1881.839844, 5554.040039, -12.427846, 0, ''), +(19685, 48, -1841.566650, 5545.965332, -12.427846, 0, ''), +(19685, 49, -1837.658325, 5523.780273, 0.558756, 0, ''), +(19685, 50, -1831.321777, 5534.821777, 1.221819, 6000, ''), +(19685, 51, -1831.321777, 5534.821777, 1.221819, 8000, ''), +(19685, 52, -1831.321777, 5534.821777, 1.221819, 5000, ''), +(19685, 53, -1850.060669, 5472.610840, 0.857320, 6000, ''), +(19685, 54, -1850.060669, 5472.610840, 0.857320, 8000, ''), +(19685, 55, -1850.060669, 5472.610840, 0.857320, 9000, ''), +(19685, 56, -1850.060669, 5472.610840, 0.857320, 9000, ''), +(19685, 57, -1850.060669, 5472.610840, 0.857320, 4000, ''); + +DELETE FROM script_waypoint WHERE entry=20129; +INSERT INTO script_waypoint VALUES +(20129, 0, -8374.93,-4250.21, -204.38,5000, ''), +(20129, 1, -8374.93,-4250.21, -204.38,16000, ''), +(20129, 2, -8374.93,-4250.21, -204.38,10000, ''), +(20129, 3, -8374.93,-4250.21, -204.38,2000, ''), +(20129, 4, -8439.40,-4180.05, -209.25, 0, ''), +(20129, 5, -8437.82,-4120.84, -208.59,10000, ''), +(20129, 6, -8437.82,-4120.84, -208.59,16000, ''), +(20129, 7, -8437.82,-4120.84, -208.59,13000, ''), +(20129, 8, -8437.82,-4120.84, -208.59,18000, ''), +(20129, 9, -8437.82,-4120.84, -208.59,15000, ''), +(20129, 10, -8437.82,-4120.84, -208.59,2000, ''), +(20129, 11, -8467.26,-4198.63, -214.21, 0, ''), +(20129, 12, -8667.76,-4252.13, -209.56, 0, ''), +(20129, 13, -8703.71,-4234.58, -209.5,14000, ''), +(20129, 14, -8703.71,-4234.58, -209.5,2000, ''), +(20129, 15, -8642.81,-4304.37, -209.57, 0, ''), +(20129, 16, -8649.06,-4394.36, -208.46,6000, ''), +(20129, 17, -8649.06,-4394.36, -208.46,18000, ''), +(20129, 18, -8649.06,-4394.36, -208.46,2000, ''), +(20129, 19, -8468.72,-4437.67, -215.45, 0, ''), +(20129, 20, -8427.54,-4426, -211.13, 0, ''), +(20129, 21, -8364.83,-4393.32, -205.91, 0, ''), +(20129, 22, -8304.54,-4357.2, -208.2,18000, ''), +(20129, 23, -8304.54,-4357.2, -208.2,2000, ''), +(20129, 24, -8375.42,-4250.41, -205.14,5000, ''), +(20129, 25, -8375.42,-4250.41, -205.14,5000, ''); diff --git a/sql/Updates/0.0.3/r937_mangos.sql b/sql/Updates/0.0.3/r937_mangos.sql new file mode 100644 index 000000000..b3d4aedd4 --- /dev/null +++ b/sql/Updates/0.0.3/r937_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_clintar_dw_spirit' WHERE entry=22916; diff --git a/sql/Updates/0.0.3/r937_scriptdev2_script_texts.sql b/sql/Updates/0.0.3/r937_scriptdev2_script_texts.sql new file mode 100644 index 000000000..a78678b96 --- /dev/null +++ b/sql/Updates/0.0.3/r937_scriptdev2_script_texts.sql @@ -0,0 +1,9 @@ +DELETE FROM script_texts where entry BETWEEN -1000286 and -1000280; +INSERT INTO script_texts (entry, content_default, sound, type, language, emote, comment) VALUES +(-1000280, 'A shadowy, sinister presence has invaded the Emerald Dream. Its power is poised to spill over into our world, $N. We must oppose it! That\'s why I cannot accompany you in person.',0,0,0,1,'clintar SAY_START'), +(-1000281, 'The Emerald Dream will never be yours!',0,0,0,0,'clintar SAY_AGGRO_1'), +(-1000282, 'Begone from this place!',0,0,0,0,'clintar SAY_AGGRO_2'), +(-1000283, 'That\'s the first relic, but there are still two more. Follow me, $N.',0,0,0,0,'clintar SAY_RELIC1'), +(-1000284, 'I\'ve recovered the second relic. Take a moment to rest, and then we\'ll continue to the last reliquary.',0,0,0,0,'clintar SAY_RELIC2'), +(-1000285, 'We have all three of the relics, but my energy is rapidly fading. We must make our way back to Dreamwarden Lurosa! He will let you know what to do next.',0,0,0,0,'clintar SAY_RELIC3'), +(-1000286, 'Lurosa, I am entrusting the Relics of Aviana to $N, who will take them to Morthis Whisperwing. I must return completely to the Emerald Dream now. Do not let $N fail!',0,0,0,1,'clintar SAY_END'); diff --git a/sql/Updates/0.0.3/r937_scriptdev2_script_waypoint.sql b/sql/Updates/0.0.3/r937_scriptdev2_script_waypoint.sql new file mode 100644 index 000000000..a3016e0b0 --- /dev/null +++ b/sql/Updates/0.0.3/r937_scriptdev2_script_waypoint.sql @@ -0,0 +1,52 @@ +DELETE FROM script_waypoint WHERE entry=22916; +INSERT INTO script_waypoint VALUES +(22916, 0, 7461.49, -3121.06, 438.210, 7000, 'SAY_START'), +(22916, 1, 7465.26, -3115.50, 439.315, 0, ''), +(22916, 2, 7470.03, -3109.29, 439.333, 0, ''), +(22916, 3, 7473.77, -3104.65, 442.366, 0, ''), +(22916, 4, 7478.67, -3098.55, 443.551, 0, ''), +(22916, 5, 7482.78, -3093.35, 441.883, 0, ''), +(22916, 6, 7486.23, -3089.19, 439.698, 0, ''), +(22916, 7, 7484.64, -3084.55, 439.566, 0, ''), +(22916, 8, 7477.09, -3084.43, 442.132, 0, ''), +(22916, 9, 7470.66, -3084.86, 443.194, 0, ''), +(22916, 10, 7456.51, -3085.83, 438.863, 0, ''), +(22916, 11, 7446.00, -3085.59, 438.210, 0, ''), +(22916, 12, 7444.60, -3084.10, 438.323, 0, ''), +(22916, 13, 7445.58, -3080.92, 439.374, 5000, 'collect 1'), +(22916, 14, 7446.18, -3085.36, 438.210, 5000, 'SAY_RELIC1'), +(22916, 15, 7453.90, -3086.69, 439.454, 0, ''), +(22916, 16, 7459.41, -3085.50, 439.158, 0, ''), +(22916, 17, 7465.90, -3085.01, 442.329, 0, ''), +(22916, 18, 7472.80, -3084.81, 443.085, 0, ''), +(22916, 19, 7480.58, -3084.56, 440.642, 0, ''), +(22916, 20, 7484.59, -3084.71, 439.568, 0, ''), +(22916, 21, 7491.81, -3090.55, 440.052, 0, ''), +(22916, 22, 7497.13, -3095.34, 437.505, 0, ''), +(22916, 23, 7496.61, -3113.62, 434.554, 0, ''), +(22916, 24, 7501.79, -3123.79, 435.347, 0, ''), +(22916, 25, 7506.60, -3130.78, 434.179, 0, ''), +(22916, 26, 7504.53, -3133.46, 435.579, 5000, 'collect 2'), +(22916, 27, 7505.20, -3130.03, 434.151, 15000, 'SAY_RELIC2'), +(22916, 28, 7502.04, -3124.44, 435.298, 0, ''), +(22916, 29, 7495.90, -3113.93, 434.538, 0, ''), +(22916, 30, 7488.79, -3111.10, 434.310, 0, ''), +(22916, 31, 7477.81, -3105.37, 430.541, 0, 'summon'), +(22916, 32, 7471.49, -3092.55, 429.006, 0, ''), +(22916, 33, 7472.35, -3062.72, 428.341, 0, ''), +(22916, 34, 7472.26, -3054.92, 427.150, 0, ''), +(22916, 35, 7475.03, -3053.39, 428.672, 5000, 'collect 3'), +(22916, 36, 7472.40, -3057.21, 426.870, 5000, 'SAY_RELIC3'), +(22916, 37, 7472.39, -3062.86, 428.301, 0, ''), +(22916, 38, 7470.24, -3087.69, 429.045, 0, ''), +(22916, 39, 7475.24, -3099.03, 429.917, 0, ''), +(22916, 40, 7484.24, -3109.85, 432.719, 0, ''), +(22916, 41, 7489.10, -3111.31, 434.400, 0, ''), +(22916, 42, 7497.02, -3108.54, 434.798, 0, ''), +(22916, 43, 7497.75, -3097.70, 437.031, 0, ''), +(22916, 44, 7492.53, -3090.12, 440.041, 0, ''), +(22916, 45, 7490.43, -3085.44, 439.807, 0, ''), +(22916, 46, 7501.02, -3069.70, 441.875, 0, ''), +(22916, 47, 7509.15, -3064.67, 445.012, 0, ''), +(22916, 48, 7515.78, -3060.16, 445.727, 0, ''), +(22916, 49, 7516.46, -3058.11, 445.682, 10000, 'quest credit'); diff --git a/sql/Updates/0.0.3/r939_scriptdev2_script_texts.sql b/sql/Updates/0.0.3/r939_scriptdev2_script_texts.sql new file mode 100644 index 000000000..ed6198149 --- /dev/null +++ b/sql/Updates/0.0.3/r939_scriptdev2_script_texts.sql @@ -0,0 +1,57 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1568078 AND -1568024; +INSERT INTO script_texts (entry, content_default, sound, type, language, emote, comment) VALUES +(-1568024,'Da eagles gonna bear your spirits to me. Your sacrifice is not gonna be in vein!',12122,1,0,0,'akilzon SAY_EVENT1'), +(-1568025,'Your death gonna be quick, strangers. You shoulda never have come to this place...',12123,1,0,0,'akilzon SAY_EVENT2'), +(-1568026,'I be da predator! You da prey...',12013,1,0,0,'akilzon SAY_AGGRO'), +(-1568027,'Feed, me bruddahs!',12014,1,0,0,'akilzon SAY_SUMMON'), +(-1568028,'Come, and join me bruddahs!',12015,1,0,0,'akilzon SAY_SUMMON_ALT'), +(-1568029,'All you be doing is wasting my time!',12016,1,0,0,'akilzon SAY_ENRAGE'), +(-1568030,'Ya got nothin\'!',12017,1,0,0,'akilzon SAY_SLAY1'), +(-1568031,'Stop your cryin\'!',12018,1,0,0,'akilzon SAY_SLAY2'), +(-1568032,'You can\'t... kill... me spirit!',12019,1,0,0,'akilzon SAY_DEATH'), +(-1568033,'An Electrical Storm Appears!',0,2,0,0,'akilzon EMOTE_STORM'), +(-1568034,'Get on ya knees and bow.... to da fang and claw!',12020,1,0,0,'halazzi SAY_AGGRO'), +(-1568035,'I fight wit\' untamed spirit....',12021,1,0,0,'halazzi SAY_SPLIT'), +(-1568036,'Spirit, come back to me!',12022,1,0,0,'halazzi SAY_MERGE'), +(-1568037,'Me gonna carve ya now!',12023,1,0,0,'halazzi SAY_SABERLASH1'), +(-1568038,'You gonna leave in pieces!',12024,1,0,0,'halazzi SAY_SABERLASH2'), +(-1568039,'Whatch you be doing? Pissin\' yourselves...',12025,1,0,0,'halazzi SAY_BERSERK'), +(-1568040,'You cant fight the power!',12026,1,0,0,'halazzi SAY_KILL1'), +(-1568041,'You gonna fail!',12027,1,0,0,'halazzi SAY_KILL2'), +(-1568042,'Chaga... choka\'jinn.',12028,1,0,0,'halazzi SAY_DEATH'), +(-1568043,'Come, fools. Fill ma empty cages...',12029,1,0,0,'halazzi SAY_EVENT1'), +(-1568044,'I be waitin, strangers. Your deaths gonna make me stronger!',12030,1,0,0,'halazzi SAY_EVENT2'), +(-1568045,'Da shadow gonna fall on you...',12041,1,0,0,'malacrass SAY_AGGRO'), +(-1568046,'Ya don\'t kill me yet, ya don\'t get another chance!',12042,1,0,0,'malacrass SAY_ENRAGE'), +(-1568047,'Dis a nightmare ya don\' wake up from!',12043,1,0,0,'malacrass SAY_KILL1'), +(-1568048,'Azzaga choogo zinn!',12044,1,0,0,'malacrass SAY_KILL2'), +(-1568049,'Your will belong ta me now!',12045,1,0,0,'malacrass SAY_SOUL_SIPHON'), +(-1568050,'Darkness comin\' for you...',12046,1,0,0,'malacrass SAY_DRAIN_POWER'), +(-1568051,'Your soul gonna bleed!',12047,1,0,0,'malacrass SAY_SPIRIT_BOLTS'), +(-1568052,'It not gonna make no difference.',12048,1,0,0,'malacrass SAY_ADD_DIED1'), +(-1568053,'You gonna die worse dan him.',12049,1,0,0,'malacrass SAY_ADD_DIED2'), +(-1568054,'Dat no bodda me.',12050,1,0,0,'malacrass SAY_ADD_DIED3'), +(-1568055,'Dis not... da end of me...',12051,1,0,0,'malacrass SAY_DEATH'), +(-1568056,'Everybody always wanna take from us. Now we gonna start takin\' back. Anybody who get in our way...gonna drown in dey own blood! Da Amani empire be back now...seekin\' vengeance. And we gonna start wit\' you.',12090,1,0,0,'zuljin SAY_INTRO'), +(-1568057,'Nobody badduh dan me!',12091,1,0,0,'zuljin SAY_AGGRO'), +(-1568058,'Got me some new tricks... like me brudda bear....',12092,1,0,0,'zuljin SAY_BEAR_TRANSFORM'), +(-1568059,'Dere be no hidin\' from da eagle!',12093,1,0,0,'zuljin SAY_EAGLE_TRANSFORM'), +(-1568060,'Let me introduce you to me new bruddas: fang and claw!',12094,1,0,0,'zuljin SAY_LYNX_TRANSFORM'), +(-1568061,'Ya don\' have to look to da sky to see da dragonhawk!',12095,1,0,0,'zuljin SAY_DRAGONHAWK_TRANSFORM'), +(-1568062,'Fire kill you just as quick!',12096,1,0,0,'zuljin SAY_FIRE_BREATH'), +(-1568063,'You too slow! Me too strong!',12097,1,0,0,'zuljin SAY_BERSERK'), +(-1568064,'Da Amani de chuka!',12098,1,0,0,'zuljin SAY_KILL1'), +(-1568065,'Lot more gonna fall like you!',12099,1,0,0,'zuljin SAY_KILL2'), +(-1568066,'Mebbe me fall...but da Amani empire...never gonna die...',12100,1,0,0,'zuljin SAY_DEATH'), +(-1568067,'Zul\'jin got a surprise for ya...',12052,1,0,0,'zulaman SAY_INST_RELEASE'), +(-1568068,'Da spirits gonna feast today! Begin da ceremonies, sacrifice da prisoners... make room for our new guests!',12053,1,0,0,'zulaman SAY_INST_BEGIN'), +(-1568069,'Take your pick, trespassers! Any of ma priests be happy to accommodate ya.',12054,1,0,0,'zulaman SAY_INST_PROGRESS_1'), +(-1568070,'Don\'t be shy. Thousands have come before you. Ya not be alone in your service.',12055,1,0,0,'zulaman SAY_INST_PROGRESS_2'), +(-1568071,'Ya gonna fail, strangers. Many try before you, but dey only make us stronger!',12056,1,0,0,'zulaman SAY_INST_PROGRESS_3'), +(-1568072,'Your efforts was in vain, trespassers. The rituals nearly be complete.',12057,1,0,0,'zulaman SAY_INST_WARN_1'), +(-1568073,'Soon da cages gonna be empty, da sacrifices be complete, and you gonna take dere places.',12058,1,0,0,'zulaman SAY_INST_WARN_2'), +(-1568074,'Time be running low, strangers. Soon you gonna join da souls of dem ya failed to save.',12059,1,0,0,'zulaman SAY_INST_WARN_3'), +(-1568075,'Make haste, ma priests! Da rituals must not be interrupted!',12060,1,0,0,'zulaman SAY_INST_WARN_4'), +(-1568076,'Ya make a good try... but now you gonna join da ones who already fall.',12061,1,0,0,'zulaman SAY_INST_SACRIF1'), +(-1568077,'Ya not do too bad. Ya efforts [...] for a small time. Come to me now. Ya prove yourself worthy offerings.',12062,1,0,0,'zulaman SAY_INST_SACRIF2'), +(-1568078,'Watch now. Every offering gonna strengthen our ties to da spirit world. Soon, we gonna be unstoppable!',12065,1,0,0,'zulaman SAY_INST_COMPLETE'); diff --git a/sql/Updates/0.0.3/r940_mangos.sql b/sql/Updates/0.0.3/r940_mangos.sql new file mode 100644 index 000000000..0474cef26 --- /dev/null +++ b/sql/Updates/0.0.3/r940_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_henry_stern' WHERE entry=8696; diff --git a/sql/Updates/0.0.3/r941_mangos.sql b/sql/Updates/0.0.3/r941_mangos.sql new file mode 100644 index 000000000..5fce0cc8f --- /dev/null +++ b/sql/Updates/0.0.3/r941_mangos.sql @@ -0,0 +1 @@ +UPDATE gameobject_template SET ScriptName='go_sacred_fire_of_life' WHERE entry=175944; diff --git a/sql/Updates/0.0.3/r945_mangos.sql b/sql/Updates/0.0.3/r945_mangos.sql new file mode 100644 index 000000000..240993c69 --- /dev/null +++ b/sql/Updates/0.0.3/r945_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='npc_harrison_jones_za' WHERE entry=24358; +UPDATE gameobject_template SET ScriptName='go_strange_gong' WHERE entry=187359; diff --git a/sql/Updates/0.0.3/r945_scriptdev2_script_texts.sql b/sql/Updates/0.0.3/r945_scriptdev2_script_texts.sql new file mode 100644 index 000000000..698a76397 --- /dev/null +++ b/sql/Updates/0.0.3/r945_scriptdev2_script_texts.sql @@ -0,0 +1,5 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1568081 AND -1568079; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1568079,'Suit yourself. At least five of you must assist me if we\'re to get inside. Follow me.',0,1,0,0,'harrison SAY_START'), +(-1568080,'According to my calculations, if enough of us bang the gong at once the seal on these doors will break and we can enter.',0,1,0,0,'harrison SAY_AT_GONG'), +(-1568081,'I\'ve researched this site extensively and i won\'t allow any dim-witted treasure hunters to swoop in and steal what belongs to in a museum. I\'ll lead this charge.',0,1,0,0,'harrison SAY_OPEN_ENTRANCE'); diff --git a/sql/Updates/0.0.3/r945_scriptdev2_script_waypoint.sql b/sql/Updates/0.0.3/r945_scriptdev2_script_waypoint.sql new file mode 100644 index 000000000..2a749b1aa --- /dev/null +++ b/sql/Updates/0.0.3/r945_scriptdev2_script_waypoint.sql @@ -0,0 +1,6 @@ +DELETE FROM script_waypoint WHERE entry=24358; +INSERT INTO script_waypoint VALUES +(24358, 0, 121.193970, 1645.619385, 42.021, 0, ''), +(24358, 1, 132.051468, 1642.176025, 42.021, 10000, 'SAY_AT_GONG'), +(24358, 2, 120.670631, 1636.346802, 42.415, 0, ''), +(24358, 3, 120.536003, 1611.654663, 43.473, 30000, 'SAY_OPEN_ENTRANCE'); diff --git a/sql/Updates/0.0.3/r947_mangos.sql b/sql/Updates/0.0.3/r947_mangos.sql new file mode 100644 index 000000000..75e814c2c --- /dev/null +++ b/sql/Updates/0.0.3/r947_mangos.sql @@ -0,0 +1,4 @@ +UPDATE creature_template SET ScriptName='boss_akilzon' WHERE entry=23574; +UPDATE creature_template SET ScriptName='boss_halazzi' WHERE entry=23577; +UPDATE creature_template SET ScriptName='boss_malacrass' WHERE entry=24239; +UPDATE creature_template SET ScriptName='boss_zuljin' WHERE entry=23863; diff --git a/sql/Updates/0.0.3/r949_scriptdev2_script_waypoint.sql b/sql/Updates/0.0.3/r949_scriptdev2_script_waypoint.sql new file mode 100644 index 000000000..8f4daaa92 --- /dev/null +++ b/sql/Updates/0.0.3/r949_scriptdev2_script_waypoint.sql @@ -0,0 +1,14 @@ +DELETE FROM script_waypoint WHERE entry=6575; +INSERT INTO script_waypoint VALUES +(6575, 0, 1945.81, -431.54, 16.36, 0, ''), +(6575, 1, 1946.21, -436.41, 16.36, 0, ''), +(6575, 2, 1950.01, -444.11, 14.63, 0, ''), +(6575, 3, 1956.08, -449.34, 13.12, 0, ''), +(6575, 4, 1966.59, -450.55, 11.27, 0, ''), +(6575, 5, 1976.09, -447.51, 11.27, 0, ''), +(6575, 6, 1983.42, -435.85, 11.27, 0, ''), +(6575, 7, 1978.17, -428.81, 11.27, 0, ''), +(6575, 8, 1973.97, -422.08, 9.04, 0, ''), +(6575, 9, 1963.84, -418.90, 6.17, 0, ''), +(6575, 10, 1961.22, -422.74, 6.17, 0, ''), +(6575, 11, 1964.80, -431.26, 6.17, 300000, ''); diff --git a/sql/Updates/0.0.3/r951_scriptdev2_script_waypoint.sql b/sql/Updates/0.0.3/r951_scriptdev2_script_waypoint.sql new file mode 100644 index 000000000..0f47b338f --- /dev/null +++ b/sql/Updates/0.0.3/r951_scriptdev2_script_waypoint.sql @@ -0,0 +1,19 @@ +DELETE FROM script_waypoint WHERE entry=3849; +INSERT INTO script_waypoint VALUES +(3849, 0, -252.92, 2126.82, 81.17, 0, ''), +(3849, 1, -253.88, 2131.11, 81.21, 0, ''), +(3849, 2, -249.66, 2142.45, 87.01, 0, ''), +(3849, 3, -248.08, 2143.68, 87.01, 0, ''), +(3849, 4, -238.87, 2139.93, 87.01, 0, ''), +(3849, 5, -235.47, 2149.18, 90.59, 0, ''), +(3849, 6, -239.89, 2156.06, 90.62, 20000, 'SAY_FREE'); + +DELETE FROM script_waypoint WHERE entry=3850; +INSERT INTO script_waypoint VALUES +(3850, 0, -255.33, 2117.99, 81.17, 0, ''), +(3850, 1, -253.88, 2131.11, 81.21, 0, ''), +(3850, 2, -249.66, 2142.45, 87.01, 0, ''), +(3850, 3, -248.08, 2143.68, 87.01, 0, ''), +(3850, 4, -238.87, 2139.93, 87.01, 0, ''), +(3850, 5, -235.47, 2149.18, 90.59, 0, ''), +(3850, 6, -239.89, 2156.06, 90.62, 20000, 'SAY_FREE'); diff --git a/sql/Updates/0.0.3/r953_scriptdev2_script_waypoint.sql b/sql/Updates/0.0.3/r953_scriptdev2_script_waypoint.sql new file mode 100644 index 000000000..150e6bb0a --- /dev/null +++ b/sql/Updates/0.0.3/r953_scriptdev2_script_waypoint.sql @@ -0,0 +1,142 @@ +DELETE FROM script_waypoint WHERE entry=17876; +INSERT INTO script_waypoint VALUES +(17876, 0, 2230.91, 118.765, 82.2947,5000, ''), +(17876, 1, 2230.33, 114.980, 82.2946, 0, ''), +(17876, 2, 2233.36, 111.057, 82.2996, 0, ''), +(17876, 3, 2231.17, 108.486, 82.6624, 0, ''), +(17876, 4, 2220.22, 114.605, 89.4264, 0, ''), +(17876, 5, 2215.23, 115.990, 89.4549, 0, ''), +(17876, 6, 2210.00, 106.849, 89.4549, 0, ''), +(17876, 7, 2205.66, 105.234, 89.4549, 0, ''), +(17876, 8, 2192.26, 112.618, 89.4549, 0, 'spawn armorer'), +(17876, 9, 2181.28, 118.612, 89.4549,8000, 'get weapon'), +(17876, 10, 2181.62, 120.385, 89.4549,5000, 'get armor'), +(17876, 11, 2189.44, 113.922, 89.4549, 0, ''), +(17876, 12, 2195.63, 110.584, 89.4549, 0, ''), +(17876, 13, 2201.09, 115.115, 89.4549, 0, ''), +(17876, 14, 2204.34, 121.036, 89.4355, 0, ''), +(17876, 15, 2208.66, 129.127, 87.9560, 0, 'first ambush'), +(17876, 16, 2193.09, 137.940, 88.2164, 0, ''), +(17876, 17, 2173.39, 149.064, 87.9227, 0, ''), +(17876, 18, 2164.25, 137.965, 85.0595, 0, ''), +(17876, 19, 2149.31, 125.645, 77.0858, 0, ''), +(17876, 20, 2142.78, 127.173, 75.5954, 0, ''), +(17876, 21, 2139.28, 133.952, 73.6386, 0, 'second ambush'), +(17876, 22, 2139.54, 155.235, 67.1269, 0, ''), +(17876, 23, 2145.38, 167.551, 64.8974, 0, ''), +(17876, 24, 2134.28, 175.304, 67.9446, 0, ''), +(17876, 25, 2118.08, 187.387, 68.8141, 0, ''), +(17876, 26, 2105.88, 195.461, 65.1854, 0, 'third ambush'), +(17876, 27, 2096.77, 196.939, 65.2117, 0, ''), +(17876, 28, 2083.90, 209.395, 64.8736, 0, ''), +(17876, 29, 2067.84, 224.376, 64.8022,30000, 'meeting scarloc'), +(17876, 30, 2055.40, 242.90, 63.3418, 0, 'after skarloc'), +(17876, 31, 2039.20, 266.460, 63.0182,10000, 'mount up'), +(17876, 32, 2011.77, 278.478, 65.3388, 0, ''), +(17876, 33, 2005.08, 289.676, 66.1179, 0, ''), +(17876, 34, 2033.11, 337.450, 66.0948, 0, ''), +(17876, 35, 2070.30, 416.208, 66.0893, 0, ''), +(17876, 36, 2086.76, 469.768, 65.9182, 0, ''), +(17876, 37, 2101.70, 497.955, 61.7881, 0, 'road ambush'), +(17876, 38, 2133.39, 530.933, 55.3700,5000, ''), +(17876, 39, 2157.91, 559.635, 48.5157, 0, ''), +(17876, 40, 2167.34, 586.191, 42.4394, 0, ''), +(17876, 41, 2174.17, 637.643, 33.9002, 0, ''), +(17876, 42, 2179.31, 656.053, 34.723, 0, ''), +(17876, 43, 2183.65, 670.941, 34.0318, 0, ''), +(17876, 44, 2201.50, 668.616, 36.1236, 0, ''), +(17876, 45, 2221.56, 652.747, 36.6153, 0, ''), +(17876, 46, 2238.97, 640.125, 37.2214, 0, ''), +(17876, 47, 2251.17, 620.574, 40.1473, 0, ''), +(17876, 48, 2261.98, 595.303, 41.4117, 0, ''), +(17876, 49, 2278.67, 560.172, 38.9090, 0, ''), +(17876, 50, 2336.72, 528.327, 40.9369, 0, ''), +(17876, 51, 2381.04, 519.612, 37.7312, 0, ''), +(17876, 52, 2412.20, 515.425, 39.2068, 0, ''), +(17876, 53, 2452.39, 516.174, 42.9387, 0, ''), +(17876, 54, 2467.38, 539.389, 47.4992, 0, ''), +(17876, 55, 2470.70, 554.333, 46.6668, 0, ''), +(17876, 56, 2478.07, 575.321, 55.4549, 0, ''), +(17876, 57, 2480.00, 585.408, 56.6921, 0, ''), +(17876, 58, 2482.67, 608.817, 55.6643, 0, ''), +(17876, 59, 2485.62, 626.061, 58.0132, 2000, 'dismount'), +(17876, 60, 2486.91, 626.356, 58.0761, 0, 'scare horse'), +(17876, 61, 2488.58, 660.940, 57.3913, 0, ''), +(17876, 62, 2502.56, 686.059, 55.6252, 0, ''), +(17876, 63, 2502.08, 694.360, 55.5083, 0, ''), +(17876, 64, 2491.46, 694.321, 55.7163, 0, ''), +(17876, 65, 2491.10, 703.300, 55.7630, 0, ''), +(17876, 66, 2485.64, 702.992, 55.7917, 0, ''), +(17876, 67, 2479.10, 695.291, 55.7901, 10000, ''), +(17876, 68, 2476.75, 693.689, 55.7960, 0, 'spawn mobs'), +(17876, 69, 2475.39, 695.983, 55.8146, 0, ''), +(17876, 70, 2477.75, 694.473, 55.7945, 0, ''), +(17876, 71, 2481.27, 697.747, 55.7910, 0, 'mobs in doorway'), +(17876, 72, 2486.31, 703.131, 55.7861, 5000, ''), +(17876, 73, 2490.76, 703.511, 55.7662, 0, ''), +(17876, 74, 2491.30, 694.792, 55.7195, 0, ''), +(17876, 75, 2518.69, 693.876, 55.1383, 0, ''), +(17876, 76, 2531.33, 681.914, 55.1383, 0, ''), +(17876, 77, 2568.25, 682.654, 55.1778, 0, ''), +(17876, 78, 2589.61, 689.981, 55.1421, 0, ''), +(17876, 79, 2634.74, 679.833, 54.6613, 0, ''), +(17876, 80, 2630.41, 661.464, 54.2761, 0, ''), +(17876, 81, 2629.00, 656.982, 56.0651, 0, ''), +(17876, 82, 2620.84, 633.007, 56.0300, 3000, 'stop in church'), +(17876, 83, 2622.99, 639.178, 56.0300, 0, 'summon'), +(17876, 84, 2628.73, 656.693, 56.0610, 5000, ''), +(17876, 85, 2630.34, 661.135, 54.2738, 0, ''), +(17876, 86, 2635.38, 672.243, 54.4508, 0, ''), +(17876, 87, 2644.13, 668.158, 55.3797, 0, ''), +(17876, 88, 2646.82, 666.740, 56.9898, 0, ''), +(17876, 89, 2658.22, 665.432, 57.1725, 0, ''), +(17876, 90, 2661.88, 674.849, 57.1725, 0, ''), +(17876, 91, 2656.23, 677.208, 57.1725, 0, ''), +(17876, 92, 2652.28, 670.270, 61.9353, 0, ''), +(17876, 93, 2650.79, 664.290, 61.9302, 0, 'summon inn'), +(17876, 94, 2658.19, 660.454, 61.9320, 5000, ''), +(17876, 95, 2660.57, 659.173, 61.9370, 0, 'speak with Taretha'), +(17876, 96, 2658.19, 660.454, 61.9320, 5000, 'epoch calls'), +(17876, 97, 2659.84, 659.482, 61.9361, 5000, 'taretha "dies"'), +(17876, 98, 2654.28, 662.722, 61.9313, 0, ''), +(17876, 99, 2652.37, 670.561, 61.9368, 0, ''), +(17876, 100, 2656.05, 676.761, 57.1727, 0, ''), +(17876, 101, 2658.49, 677.166, 57.1727, 0, ''), +(17876, 102, 2659.28, 667.117, 57.1727, 0, ''), +(17876, 103, 2649.71, 665.387, 57.1727, 0, ''), +(17876, 104, 2634.79, 672.964, 54.4577, 0, 'outside inn'), +(17876, 105, 2635.06, 673.892, 54.4713, 30000, 'getting ready'), +(17876, 106, 2634.79, 672.964, 54.4577, 60000, 'when all dead and meet Taretha'), +(17876, 107, 2631.72, 665.629, 54.2923, 0, 'run off'), +(17876, 108, 2647.40, 640.530, 55.7634, 0, ''); + +DELETE FROM script_waypoint WHERE entry=18887; +INSERT INTO script_waypoint VALUES +(18887, 0, 2650.06, 665.473, 61.9305, 0, ''), +(18887, 1, 2652.44, 670.761, 61.9370, 0, ''), +(18887, 2, 2655.96, 676.913, 57.1725, 0, ''), +(18887, 3, 2659.40, 677.317, 57.1725, 0, ''), +(18887, 4, 2651.75, 664.482, 57.1725, 0, ''), +(18887, 5, 2647.49, 666.595, 57.0824, 0, ''), +(18887, 6, 2644.37, 668.167, 55.4182, 0, ''), +(18887, 7, 2640.96, 669.890, 54.7567, 60000, ''); + +DELETE FROM script_waypoint WHERE entry=10096; +INSERT INTO script_waypoint VALUES +(10096, 0, 604.802673, -191.081985, -54.058590, 0,'ring'), +(10096, 1, 604.072998, -222.106918, -52.743759, 0,'first gate'), +(10096, 2, 621.400391, -214.499054, -52.814453, 0,'hiding in corner'), +(10096, 3, 601.300781, -198.556992, -53.950256, 0,'ring'), +(10096, 4, 631.818359, -180.548126, -52.654770, 0,'second gate'), +(10096, 5, 627.390381, -201.075974, -52.692917, 0,'hiding in corner'); + +DELETE FROM script_waypoint WHERE entry=9503; +INSERT INTO script_waypoint VALUES +(9503, 0, 883.294861, -188.926300, -43.703655, 0,''), +(9503, 1, 872.763550, -185.605621, -43.703655, 5000,'b1'), +(9503, 2, 867.923401, -188.006393, -43.703655, 5000,'b2'), +(9503, 3, 863.295898, -190.795212, -43.703655, 5000,'b3'), +(9503, 4, 856.139587, -194.652756, -43.703655, 5000,'b4'), +(9503, 5, 851.878906, -196.928131, -43.703655, 15000,'b5'), +(9503, 6, 877.035217, -187.048080, -43.703655, 0,''), +(9503, 7, 891.198000, -197.924000, -43.620400, 0,'home'); diff --git a/sql/Updates/0.0.3/r956_scriptdev2.sql b/sql/Updates/0.0.3/r956_scriptdev2.sql new file mode 100644 index 000000000..7d349d75a --- /dev/null +++ b/sql/Updates/0.0.3/r956_scriptdev2.sql @@ -0,0 +1,27 @@ +DELETE FROM script_waypoint WHERE entry=12423; +INSERT INTO script_waypoint VALUES +(12423, 0, -9509.72, -147.03, 58.74, 0, ''), +(12423, 1, -9517.07, -172.82, 58.66, 0, ''); + +DELETE FROM script_waypoint WHERE entry=12427; +INSERT INTO script_waypoint VALUES +(12427, 0, -5689.20, -456.44, 391.08, 0, ''), +(12427, 1, -5700.37, -450.77, 393.19, 0, ''); + +DELETE FROM script_waypoint WHERE entry=12428; +INSERT INTO script_waypoint VALUES +(12428, 0, 2454.09, 361.26, 31.51, 0, ''), +(12428, 1, 2472.03, 378.08, 30.98, 0, ''); + +DELETE FROM script_waypoint WHERE entry=12429; +INSERT INTO script_waypoint VALUES +(12429, 0, 9654.19, 909.58, 1272.11, 0, ''), +(12429, 1, 9642.53, 908.11, 1269.10, 0, ''); + +DELETE FROM script_waypoint WHERE entry=12430; +INSERT INTO script_waypoint VALUES +(12430, 0, 161.65, -4779.34, 14.64, 0, ''), +(12430, 1, 140.71, -4813.56, 17.04, 0, ''); + +UPDATE script_texts SET emote=20 WHERE entry=-1000231; +UPDATE script_texts SET emote=4 WHERE entry IN (-1000232, -1000256, -1000258, -1000260, -1000262); diff --git a/sql/Updates/0.0.3/r963_mangos.sql b/sql/Updates/0.0.3/r963_mangos.sql new file mode 100644 index 000000000..9ba166c96 --- /dev/null +++ b/sql/Updates/0.0.3/r963_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_kingdom_of_dalaran_quests' WHERE entry IN (29169,23729,26673,27158,29158,29161,26471,29155,29159,29160,29162); diff --git a/sql/Updates/0.0.3/r964_mangos.sql b/sql/Updates/0.0.3/r964_mangos.sql new file mode 100644 index 000000000..34c6c6faf --- /dev/null +++ b/sql/Updates/0.0.3/r964_mangos.sql @@ -0,0 +1,2 @@ +UPDATE gameobject_template SET ScriptName='go_tele_to_dalaran_crystal' WHERE entry=191230; +UPDATE gameobject_template SET ScriptName='go_tele_to_violet_stand' WHERE entry=191229; diff --git a/sql/Updates/0.0.3/r965_mangos.sql b/sql/Updates/0.0.3/r965_mangos.sql new file mode 100644 index 000000000..939512dcd --- /dev/null +++ b/sql/Updates/0.0.3/r965_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_oox17tn' WHERE entry=7784; diff --git a/sql/Updates/0.0.3/r965_scriptdev2.sql b/sql/Updates/0.0.3/r965_scriptdev2.sql new file mode 100644 index 000000000..0da9ba56a --- /dev/null +++ b/sql/Updates/0.0.3/r965_scriptdev2.sql @@ -0,0 +1,46 @@ +DELETE FROM script_waypoint WHERE entry=7784; +INSERT INTO script_waypoint VALUES +(7784, 0, -8845.65, -4373.98, 43.87, 5000, 'SAY_START'), +(7784, 1, -8840.79, -4373.73, 44.24, 0, ''), +(7784, 2, -8837.43, -4373.56, 45.60, 0, ''), +(7784, 3, -8832.74, -4373.32, 45.68, 0, ''), +(7784, 4, -8829.37, -4373.14, 44.33, 0, ''), +(7784, 5, -8817.38, -4372.41, 35.58, 0, ''), +(7784, 6, -8803.47, -4371.60, 30.34, 0, ''), +(7784, 7, -8795.10, -4365.61, 26.08, 0, ''), +(7784, 8, -8766.78, -4367.13, 25.15, 0, ''), +(7784, 9, -8755.63, -4367.54, 24.63, 0, ''), +(7784, 10, -8754.42, -4365.59, 24.15, 0, ''), +(7784, 11, -8728.82, -4353.13, 20.90, 0, ''), +(7784, 12, -8706.60, -4356.55, 17.93, 0, ''), +(7784, 13, -8679.00, -4380.23, 12.64, 0, ''), +(7784, 14, -8642.96, -4393.82, 12.52, 0, ''), +(7784, 15, -8611.19, -4399.11, 9.55, 0, ''), +(7784, 16, -8554.87, -4409.32, 13.05, 0, ''), +(7784, 17, -8531.64, -4411.96, 11.20, 0, ''), +(7784, 18, -8510.40, -4414.38, 12.84, 0, ''), +(7784, 19, -8476.92, -4418.34, 9.71, 0, ''), +(7784, 20, -8435.89, -4426.74, 9.67, 0, ''), +(7784, 21, -8381.89, -4446.40, 10.23, 0, ''), +(7784, 22, -8351.15, -4447.79, 9.99, 5000, 'first ambush SAY_AMBUSH'), +(7784, 23, -8324.18, -4445.05, 9.71, 0, ''), +(7784, 24, -8138.94, -4384.78, 10.92, 0, ''), +(7784, 25, -8036.87, -4443.38, 9.65, 0, ''), +(7784, 26, -7780.92, -4761.81, 9.50, 0, ''), +(7784, 27, -7587.67, -4765.01, 8.96, 0, ''), +(7784, 28, -7497.65, -4792.86, 10.01, 0, 'second ambush SAY_AMBUSH'), +(7784, 29, -7391.54, -4774.26, 12.44, 0, ''), +(7784, 30, -7308.42, -4739.87, 12.65, 0, ''), +(7784, 31, -7016.11, -4751.12, 10.06, 0, ''), +(7784, 32, -6985.52, -4777.41, 10.26, 0, ''), +(7784, 33, -6953.02, -4786.00, 6.32, 0, ''), +(7784, 34, -6940.37, -4831.03, 0.67, 10000, 'quest complete SAY_END'); + +DELETE FROM script_texts WHERE entry BETWEEN -1000292 AND -1000287; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000287,'Emergency power activated! Initializing ambulancery motor! CLUCK!',0,0,0,0,'oox17 SAY_START'), +(-1000288,'Physical threat detected! Evasive action! CLUCK!',0,0,0,0,'oox17 SAY_AGGRO1'), +(-1000289,'Thread analyzed! Activating combat plan beta! CLUCK!',0,0,0,0,'oox17 SAY_AGGRO2'), +(-1000290,'CLUCK! Sensors detect spatial anomaly - danger imminent! CLUCK!',0,0,0,0,'oox17 SAY_AMBUSH'), +(-1000291,'No one challanges the Wastewander nomads - not even robotic chickens! ATTACK!',0,0,0,0,'oox17 SAY_AMBUSH_REPLY'), +(-1000292,'Cloaking systems online! CLUCK! Engaging cloak for transport to Booty Bay!',0,0,0,0,'oox17 SAY_END'); diff --git a/sql/Updates/0.0.3/r972_mangos.sql b/sql/Updates/0.0.3/r972_mangos.sql new file mode 100644 index 000000000..5e5177991 --- /dev/null +++ b/sql/Updates/0.0.3/r972_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_daphne_stilwell' WHERE entry=6182; diff --git a/sql/Updates/0.0.3/r972_scriptdev2.sql b/sql/Updates/0.0.3/r972_scriptdev2.sql new file mode 100644 index 000000000..654d64f6e --- /dev/null +++ b/sql/Updates/0.0.3/r972_scriptdev2.sql @@ -0,0 +1,29 @@ +DELETE FROM script_waypoint WHERE entry=6182; +INSERT INTO script_waypoint VALUES +(6182, 0, -11480.684570, 1545.091187, 49.898571, 0, ''), +(6182, 1, -11466.825195, 1530.151733, 50.263611, 0, ''), +(6182, 2, -11465.213867, 1528.343750, 50.954369, 0, 'entrance hut'), +(6182, 3, -11462.990234, 1525.235596, 50.937702, 0, ''), +(6182, 4, -11461.000000, 1526.614014, 50.937702, 5000, 'pick up rifle'), +(6182, 5, -11462.990234, 1525.235596, 50.937702, 0, ''), +(6182, 6, -11465.213867, 1528.343750, 50.954369, 0, ''), +(6182, 7, -11468.353516, 1535.075562, 50.400948, 15000, 'hold, prepare for wave1'), +(6182, 8, -11468.353516, 1535.075562, 50.400948, 15000, 'hold, prepare for wave2'), +(6182, 9, -11468.353516, 1535.075562, 50.400948, 10000, 'hold, prepare for wave3'), +(6182, 10, -11467.898438, 1532.459595, 50.348885, 0, 'we are done'), +(6182, 11, -11466.064453, 1529.855225, 50.209351, 0, ''), +(6182, 12, -11462.990234, 1525.235596, 50.937702, 0, ''), +(6182, 13, -11461.000000, 1526.614014, 50.937702, 5000, 'deliver rifle'), +(6182, 14, -11462.990234, 1525.235596, 50.937702, 0, ''), +(6182, 15, -11465.213867, 1528.343750, 50.954369, 0, ''), +(6182, 16, -11470.260742, 1537.276733, 50.378487, 0, ''), +(6182, 17, -11475.581055, 1548.678833, 50.184380, 0, 'complete quest'), +(6182, 18, -11482.299805, 1557.410034, 48.624519, 0, ''); + +DELETE FROM script_texts WHERE entry BETWEEN -1000297 AND -1000293; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000293,'To the house! Stay close to me, no matter what! I have my gun and ammo there!',0,0,7,0,'stilwell SAY_DS_START'), +(-1000294,'We showed that one!',0,0,7,0,'stilwell SAY_DS_DOWN_1'), +(-1000295,'One more down!',0,0,7,0,'stilwell SAY_DS_DOWN_2'), +(-1000296,'We\'ve done it! We won!',0,0,7,0,'stilwell SAY_DS_DOWN_3'), +(-1000297,'Meet me down by the orchard--I just need to put my gun away.',0,0,7,0,'stilwell SAY_DS_PROLOGUE'); diff --git a/sql/Updates/0.0.3/r973_mangos.sql b/sql/Updates/0.0.3/r973_mangos.sql new file mode 100644 index 000000000..a69b03ba4 --- /dev/null +++ b/sql/Updates/0.0.3/r973_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_oox22fe' WHERE entry=7807; diff --git a/sql/Updates/0.0.3/r973_scriptdev2_script_waypoint.sql b/sql/Updates/0.0.3/r973_scriptdev2_script_waypoint.sql new file mode 100644 index 000000000..c243b25bb --- /dev/null +++ b/sql/Updates/0.0.3/r973_scriptdev2_script_waypoint.sql @@ -0,0 +1,40 @@ +DELETE FROM script_waypoint WHERE entry=7807; +INSERT INTO script_waypoint VALUES +(7807, 0, -4943.74, 1715.74, 62.74, 0, 'SAY_START'), +(7807, 1, -4944.93, 1706.66, 63.16, 0, ''), +(7807, 2, -4942.82, 1690.22, 64.25, 0, ''), +(7807, 3, -4946.47, 1669.62, 63.84, 0, ''), +(7807, 4, -4955.93, 1651.88, 63.00, 0, ''), +(7807, 5, -4967.58, 1643.86, 64.31, 0, ''), +(7807, 6, -4978.12, 1607.90, 64.30, 0, ''), +(7807, 7, -4975.38, 1596.16, 64.70, 0, ''), +(7807, 8, -4972.82, 1581.89, 61.75, 0, ''), +(7807, 9, -4958.65, 1581.05, 61.81, 0, ''), +(7807, 10, -4936.72, 1594.89, 65.96, 0, ''), +(7807, 11, -4885.69, 1598.10, 67.45, 4000, 'first ambush SAY_AMBUSH'), +(7807, 12, -4874.20, 1601.73, 68.54, 0, ''), +(7807, 13, -4816.64, 1594.47, 78.20, 0, ''), +(7807, 14, -4802.20, 1571.92, 87.01, 0, ''), +(7807, 15, -4746.40, 1576.11, 84.59, 0, ''), +(7807, 16, -4739.72, 1707.16, 94.04, 0, ''), +(7807, 17, -4674.03, 1840.44, 89.17, 0, ''), +(7807, 18, -4667.94, 1864.11, 85.18, 0, ''), +(7807, 19, -4668.08, 1886.39, 81.14, 0, ''), +(7807, 20, -4679.43, 1932.32, 73.76, 0, ''), +(7807, 21, -4674.17, 1946.66, 70.83, 5000, 'second ambush SAY_AMBUSH'), +(7807, 22, -4643.94, 1967.45, 65.27, 0, ''), +(7807, 23, -4595.60, 2010.75, 52.10, 0, ''), +(7807, 24, -4562.65, 2029.28, 45.41, 0, ''), +(7807, 25, -4538.56, 2032.65, 45.28, 0, ''), +(7807, 26, -4531.96, 2034.15, 48.34, 0, ''), +(7807, 27, -4507.75, 2039.32, 51.57, 0, ''), +(7807, 28, -4482.74, 2045.67, 48.15, 0, ''), +(7807, 29, -4460.87, 2051.54, 45.55, 0, ''), +(7807, 30, -4449.97, 2060.03, 45.51, 10000, 'third ambush SAY_AMBUSH'), +(7807, 31, -4448.99, 2079.05, 44.64, 0, ''), +(7807, 32, -4436.64, 2134.48, 28.83, 0, ''), +(7807, 33, -4429.25, 2170.20, 15.44, 0, ''), +(7807, 34, -4424.83, 2186.11, 11.48, 0, ''), +(7807, 35, -4416.71, 2209.76, 7.36, 0, ''), +(7807, 36, -4405.25, 2231.77, 5.94, 0, ''), +(7807, 37, -4377.61, 2265.45, 06.71, 15000, 'complete quest SAY_END'); diff --git a/sql/Updates/0.0.3/r975_mangos.sql b/sql/Updates/0.0.3/r975_mangos.sql new file mode 100644 index 000000000..c4b3340a1 --- /dev/null +++ b/sql/Updates/0.0.3/r975_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_wizzlecranks_shredder' WHERE entry=3439; diff --git a/sql/Updates/0.0.3/r975_scriptdev2.sql b/sql/Updates/0.0.3/r975_scriptdev2.sql new file mode 100644 index 000000000..866110434 --- /dev/null +++ b/sql/Updates/0.0.3/r975_scriptdev2.sql @@ -0,0 +1,45 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000305 and -1000298; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000298, 'Alright, alright I think I can figure out how to operate this thing...',0,0,0,393,'wizzlecrank SAY_START'), +(-1000299, 'Arrrgh! This isn\'t right!',0,0,0,0,'wizzlecrank SAY_STARTUP1'), +(-1000300, 'Okay, I think I\'ve got it, now. Follow me, $n!',0,0,0,1,'wizzlecrank SAY_STARTUP2'), +(-1000301, 'There\'s the stolen shredder! Stop it or Lugwizzle will have our hides!',0,1,0,0,'wizzlecrank SAY_MERCENARY'), +(-1000302, 'Looks like we\'re out of woods, eh? Wonder what this does...',0,0,0,0,'wizzlecrank SAY_PROGRESS_1'), +(-1000303, 'Come on, don\'t break down on me now!',0,0,0,393,'wizzlecrank SAY_PROGRESS_2'), +(-1000304, 'That was a close one! Well, let\'s get going, it\'s still a ways to Ratchet!',0,0,0,0,'wizzlecrank SAY_PROGRESS_3'), +(-1000305, 'Hmm... I don\'t think this blinking red light is a good thing...',0,0,0,0,'wizzlecrank SAY_END'); + +DELETE FROM script_waypoint WHERE entry=3439; +INSERT INTO script_waypoint VALUES +(3439, 0, 1109.15, -3104.11, 82.41, 5000, ''), +(3439, 1, 1105.39, -3102.86, 82.74, 1000, 'SAY_STARTUP1'), +(3439, 2, 1104.97, -3108.52, 83.10, 1000, ''), +(3439, 3, 1110.01, -3110.48, 82.81, 1000, ''), +(3439, 4, 1111.72, -3103.03, 82.21, 1000, ''), +(3439, 5, 1106.98, -3099.44, 82.18, 1000, ''), +(3439, 6, 1103.74, -3103.29, 83.05, 1000, ''), +(3439, 7, 1112.55, -3106.56, 82.31, 1000, ''), +(3439, 8, 1108.12, -3111.04, 82.99, 1000, ''), +(3439, 9, 1109.32, -3100.39, 82.08, 1000, ''), +(3439, 10, 1109.32, -3100.39, 82.08, 5000, 'SAY_STARTUP2'), +(3439, 11, 1098.92, -3095.14, 82.97, 0, ''), +(3439, 12, 1100.94, -3082.60, 82.83, 0, ''), +(3439, 13, 1101.12, -3068.83, 82.53, 0, ''), +(3439, 14, 1096.97, -3051.99, 82.50, 0, ''), +(3439, 15, 1094.06, -3036.79, 82.70, 0, ''), +(3439, 16, 1098.22, -3027.84, 83.79, 0, ''), +(3439, 17, 1109.51, -3015.92, 85.73, 0, ''), +(3439, 18, 1119.87, -3007.21, 87.08, 0, ''), +(3439, 19, 1130.23, -3002.49, 91.27, 5000, ''), +(3439, 20, 1130.23, -3002.49, 91.27, 3000, ''), +(3439, 21, 1130.23, -3002.49, 91.27, 4000, 'SAY_PROGRESS_1'), +(3439, 22, 1129.73, -2985.89, 92.46, 0, ''), +(3439, 23, 1124.10, -2983.29, 92.81, 0, ''), +(3439, 24, 1111.74, -2992.38, 91.59, 0, ''), +(3439, 25, 1111.06, -2976.54, 91.81, 0, ''), +(3439, 26, 1099.91, -2991.17, 91.67, 0, ''), +(3439, 27, 1096.32, -2981.55, 91.73, 8000, 'SAY_PROGRESS_2'), +(3439, 28, 1091.28, -2985.82, 91.74, 5000, 'SAY_PROGRESS_3'), +(3439, 29, 1091.28, -2985.82, 91.74, 0, ''), +(3439, 30, 1091.28, -2985.82, 91.74, 5000, 'SAY_END'), +(3439, 31, 1091.28, -2985.82, 91.74, 180000, ''); diff --git a/sql/Updates/0.0.3/r976_mangos.sql b/sql/Updates/0.0.3/r976_mangos.sql new file mode 100644 index 000000000..0e702c637 --- /dev/null +++ b/sql/Updates/0.0.3/r976_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_deathstalker_erland' WHERE entry=1978; diff --git a/sql/Updates/0.0.3/r976_scriptdev2.sql b/sql/Updates/0.0.3/r976_scriptdev2.sql new file mode 100644 index 000000000..c7267c1cc --- /dev/null +++ b/sql/Updates/0.0.3/r976_scriptdev2.sql @@ -0,0 +1,45 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000318 and -1000306; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000306, 'Let\'s get to the others, and keep an eye open for those wolves cutside...',0,0,1,0,'erland SAY_START_1'), +(-1000307, 'Be careful, $N. Those wolves like to hide among the trees.',0,0,1,0,'erland SAY_START_2'), +(-1000308, 'A $C attacks!',0,0,1,0,'erland SAY_AGGRO_1'), +(-1000309, 'Beware! I am under attack!',0,0,1,0,'erland SAY_AGGRO_2'), +(-1000310, 'Oh no! A $C is upon us!',0,0,1,0,'erland SAY_AGGRO_3'), +(-1000311, 'We\'re almost there!',0,0,1,0,'erland SAY_PROGRESS'), +(-1000312, 'We made it! Thanks, $N. I couldn\'t have gotten without you.',0,0,1,0,'erland SAY_END'), +(-1000313, 'It\'s good to see you again, Erland. What is your report?',0,0,33,1,'erland SAY_RANE'), +(-1000314, 'Masses of wolves are to the east, and whoever lived at Malden\'s Orchard is gone.',0,0,1,1,'erland SAY_RANE_REPLY'), +(-1000315, 'If I am excused, then I\'d like to check on Quinn...',0,0,1,1,'erland SAY_CHECK_NEXT'), +(-1000316, 'Hello, Quinn. How are you faring?',0,0,1,1,'erland SAY_QUINN'), +(-1000317, 'I\'ve been better. Ivar the Foul got the better of me...',0,0,33,1,'erland SAY_QUINN_REPLY'), +(-1000318, 'Try to take better care of yourself, Quinn. You were lucky this time.',0,0,1,1,'erland SAY_BYE'); + +DELETE FROM script_waypoint WHERE entry=1978; +INSERT INTO script_waypoint VALUES +(1978, 0, 1406.32, 1083.10, 52.55, 0, ''), +(1978, 1, 1400.49, 1080.42, 52.50, 0, 'SAY_START_2'), +(1978, 2, 1388.48, 1083.10, 52.52, 0, ''), +(1978, 3, 1370.16, 1084.02, 52.30, 0, ''), +(1978, 4, 1359.02, 1080.85, 52.46, 0, ''), +(1978, 5, 1341.43, 1087.39, 52.69, 0, ''), +(1978, 6, 1321.93, 1090.51, 50.66, 0, ''), +(1978, 7, 1312.98, 1095.91, 47.49, 0, ''), +(1978, 8, 1301.09, 1102.94, 47.76, 0, ''), +(1978, 9, 1297.73, 1106.35, 50.18, 0, ''), +(1978, 10, 1295.49, 1124.32, 50.49, 0, ''), +(1978, 11, 1294.84, 1137.25, 51.75, 0, ''), +(1978, 12, 1292.89, 1158.99, 52.65, 0, ''), +(1978, 13, 1290.75, 1168.67, 52.56, 2000, 'quest complete SAY_END'), +(1978, 14, 1287.12, 1203.49, 52.66, 5000, 'SAY_RANE'), +(1978, 15, 1288.30, 1203.89, 52.68, 5000, 'SAY_RANE_REPLY'), +(1978, 16, 1288.30, 1203.89, 52.68, 5000, 'SAY_CHECK_NEXT'), +(1978, 17, 1290.72, 1207.44, 52.69, 0, ''), +(1978, 18, 1297.50, 1207.18, 53.74, 0, ''), +(1978, 19, 1301.32, 1220.90, 53.74, 0, ''), +(1978, 20, 1298.55, 1220.43, 53.74, 0, ''), +(1978, 21, 1297.38, 1212.87, 58.51, 0, ''), +(1978, 22, 1297.80, 1210.04, 58.51, 0, ''), +(1978, 23, 1305.01, 1206.10, 58.51, 0, ''), +(1978, 24, 1310.51, 1207.36, 58.51, 5000, 'SAY_QUINN'), +(1978, 25, 1312.59, 1207.21, 58.51, 5000, 'SAY_QUINN_REPLY'), +(1978, 26, 1312.59, 1207.21, 58.51, 30000, 'SAY_BYE'); diff --git a/sql/Updates/0.0.3/r978_mangos.sql b/sql/Updates/0.0.3/r978_mangos.sql new file mode 100644 index 000000000..b550f53b2 --- /dev/null +++ b/sql/Updates/0.0.3/r978_mangos.sql @@ -0,0 +1 @@ +UPDATE instance_template SET script='instance_ramparts' WHERE map=543; diff --git a/sql/Updates/0.0.3/r979_mangos.sql b/sql/Updates/0.0.3/r979_mangos.sql new file mode 100644 index 000000000..6a9722217 --- /dev/null +++ b/sql/Updates/0.0.3/r979_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='npc_kelerun_bloodmourn' WHERE entry=17807; +UPDATE gameobject_template SET ScriptName='go_harbinger_second_trial' WHERE entry=182052; diff --git a/sql/Updates/0.0.3/r979_scriptdev2_script_texts.sql b/sql/Updates/0.0.3/r979_scriptdev2_script_texts.sql new file mode 100644 index 000000000..b3c90c3dd --- /dev/null +++ b/sql/Updates/0.0.3/r979_scriptdev2_script_texts.sql @@ -0,0 +1,6 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000322 AND -1000319; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000319, 'Let the trial begin, Bloodwrath, attack!',0,1,1,0,'kelerun SayId1'), +(-1000320, 'Champion Lightrend, make me proud!',0,1,1,0,'kelerun SayId2'), +(-1000321, 'Show this upstart how a real Blood Knight fights, Swiftblade!',0,1,1,0,'kelerun SayId3'), +(-1000322, 'Show $n the meaning of pain, Sunstriker!',0,1,1,0,'kelerun SayId4'); diff --git a/sql/Updates/0.0.3/r980_mangos.sql b/sql/Updates/0.0.3/r980_mangos.sql new file mode 100644 index 000000000..a6597afa5 --- /dev/null +++ b/sql/Updates/0.0.3/r980_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_alexstrasza_wr_gate' WHERE entry=31333; diff --git a/sql/Updates/0.0.3/r982_mangos.sql b/sql/Updates/0.0.3/r982_mangos.sql new file mode 100644 index 000000000..d03b602b4 --- /dev/null +++ b/sql/Updates/0.0.3/r982_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_mist' WHERE entry=3568; diff --git a/sql/Updates/0.0.3/r982_scriptdev2_script_texts.sql b/sql/Updates/0.0.3/r982_scriptdev2_script_texts.sql new file mode 100644 index 000000000..918a0759f --- /dev/null +++ b/sql/Updates/0.0.3/r982_scriptdev2_script_texts.sql @@ -0,0 +1,4 @@ +DELETE FROM script_texts WHERE entry IN (-1000323, -1000324); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000323, 'Mist! I feared I would never see you again! Yes, I am well, do not worry for me. You must rest and recover your health.',0,0,7,0,'mist SAY_AT_HOME'), +(-1000324, 'growls in acknowledgement before straightening and making her way off into the forest.',0,2,0,0,'mist EMOTE_AT_HOME'); diff --git a/sql/Updates/0.0.3/r989_mangos.sql b/sql/Updates/0.0.3/r989_mangos.sql new file mode 100644 index 000000000..d07d8948a --- /dev/null +++ b/sql/Updates/0.0.3/r989_mangos.sql @@ -0,0 +1,4 @@ +UPDATE gameobject_template SET ScriptName='go_ethereum_prison' WHERE entry BETWEEN 184418 AND 184431; +UPDATE gameobject_template SET ScriptName='go_ethereum_stasis' WHERE entry BETWEEN 185465 AND 185467; +UPDATE gameobject_template SET ScriptName='go_ethereum_stasis' WHERE entry=184595; +UPDATE gameobject_template SET ScriptName='go_ethereum_stasis' WHERE entry BETWEEN 185461 AND 185464; diff --git a/sql/Updates/0.0.3/r990_mangos.sql b/sql/Updates/0.0.3/r990_mangos.sql new file mode 100644 index 000000000..3f66b48f0 --- /dev/null +++ b/sql/Updates/0.0.3/r990_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_engineering_tele_trinket' WHERE entry IN (14742,14743,21493,21494); diff --git a/sql/Updates/0.0.3/r991_scriptdev2.sql b/sql/Updates/0.0.3/r991_scriptdev2.sql new file mode 100644 index 000000000..b75da0b15 --- /dev/null +++ b/sql/Updates/0.0.3/r991_scriptdev2.sql @@ -0,0 +1,46 @@ +DELETE FROM script_waypoint WHERE entry=3849; +INSERT INTO script_waypoint VALUES +(3849, 0, -250.923431, 2116.264160, 81.179, 0, 'SAY_FREE_AD'), +(3849, 1, -255.048538, 2119.392578, 81.179, 0, ''), +(3849, 2, -254.129105, 2123.454346, 81.179, 0, ''), +(3849, 3, -253.897552, 2130.873535, 81.179, 0, ''), +(3849, 4, -249.889435, 2142.307861, 86.972, 0, ''), +(3849, 5, -248.204926, 2144.017090, 87.013, 0, ''), +(3849, 6, -240.552826, 2140.552734, 87.012, 0, ''), +(3849, 7, -237.513916, 2142.066650, 87.012, 0, ''), +(3849, 8, -235.638138, 2149.231689, 90.587, 0, ''), +(3849, 9, -237.188019, 2151.946045, 90.624, 0, ''), +(3849, 10, -241.162064, 2153.649658, 90.624, 0, 'SAY_OPEN_DOOR_AD'), +(3849, 11, -241.129700, 2154.562988, 90.624, 5000, ''), +(3849, 12, -241.129700, 2154.562988, 90.624, 5000, 'SAY_POST1_DOOR_AD'), +(3849, 13, -241.129700, 2154.562988, 90.624, 25000, 'SAY_POST2_DOOR_AD'); + +DELETE FROM script_waypoint WHERE entry=3850; +INSERT INTO script_waypoint VALUES +(3850, 0, -241.816895, 2122.904053, 81.179, 0, 'SAY_FREE_AS'), +(3850, 1, -247.139297, 2124.886475, 81.179, 0, ''), +(3850, 2, -253.179184, 2127.406738, 81.179, 0, ''), +(3850, 3, -253.897552, 2130.873535, 81.179, 0, ''), +(3850, 4, -249.889435, 2142.307861, 86.972, 0, ''), +(3850, 5, -248.204926, 2144.017090, 87.013, 0, ''), +(3850, 6, -240.552826, 2140.552734, 87.012, 0, ''), +(3850, 7, -237.513916, 2142.066650, 87.012, 0, ''), +(3850, 8, -235.638138, 2149.231689, 90.587, 0, ''), +(3850, 9, -237.188019, 2151.946045, 90.624, 0, ''), +(3850, 10, -241.162064, 2153.649658, 90.624, 0, 'SAY_OPEN_DOOR_AS'), +(3850, 11, -241.129700, 2154.562988, 90.624, 5000, 'cast'), +(3850, 12, -241.129700, 2154.562988, 90.624, 5000, 'SAY_POST_DOOR_AS'), +(3850, 13, -241.129700, 2154.562988, 90.624, 25000, ''); + +UPDATE script_texts SET content_default='Follow me and I\'ll open the courtyard door for you.', language=7, comment='prisoner ashcrombe SAY_FREE_AS' WHERE entry=-1033000; + +DELETE FROM script_texts WHERE entry BETWEEN -1033008 AND -1033001; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1033001,'I have just the spell to get this door open. Too bad the cell doors weren\'t locked so haphazardly.',0,0,7,1,'prisoner ashcrombe SAY_OPEN_DOOR_AS'), +(-1033002,'There it is! Wide open. Good luck to you conquering what lies beyond. I must report back to the Kirin Tor at once!',0,0,7,1,'prisoner ashcrombe SAY_POST_DOOR_AS'), +(-1033003,'Free from this wretched cell at last! Let me show you to the courtyard....',0,0,1,1,'prisoner adamant SAY_FREE_AD'), +(-1033004,'You are indeed courageous for wanting to brave the horrors that lie beyond this door.',0,0,1,1,'prisoner adamant SAY_OPEN_DOOR_AD'), +(-1033005,'There we go!',0,0,1,1,'prisoner adamant SAY_POST1_DOOR_AD'), +(-1033006,'Good luck with Arugal. I must hurry back to Hadrec now.',0,0,1,1,'prisoner adamant SAY_POST2_DOOR_AD'), +(-1033007,'About time someone killed the wretch.',0,0,1,1,'prisoner adamant SAY_BOSS_DIE_AD'), +(-1033008,'For once I agree with you... scum.',0,0,7,1,'prisoner ashcrombe SAY_BOSS_DIE_AS'); diff --git a/sql/Updates/0.0.3/r992_mangos.sql b/sql/Updates/0.0.3/r992_mangos.sql new file mode 100644 index 000000000..ac7f150d8 --- /dev/null +++ b/sql/Updates/0.0.3/r992_mangos.sql @@ -0,0 +1 @@ +UPDATE gameobject_template SET ScriptName='go_shrine_of_the_birds' WHERE entry IN (185547,185553,185551); diff --git a/sql/Updates/0.0.3/r993_mangos.sql b/sql/Updates/0.0.3/r993_mangos.sql new file mode 100644 index 000000000..d505a4b9a --- /dev/null +++ b/sql/Updates/0.0.3/r993_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_threshwackonator' WHERE entry=6669; diff --git a/sql/Updates/0.0.3/r993_scriptdev2_script_texts.sql b/sql/Updates/0.0.3/r993_scriptdev2_script_texts.sql new file mode 100644 index 000000000..8efa580ba --- /dev/null +++ b/sql/Updates/0.0.3/r993_scriptdev2_script_texts.sql @@ -0,0 +1,4 @@ +DELETE FROM script_texts WHERE entry IN (-1000325, -1000326); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000325, '"Threshwackonator First Mate unit prepared to follow"',0,2,0,0,'threshwackonator EMOTE_START'), +(-1000326, 'YARRR! Swabie, what have ye done?! He\'s gone mad! Baton him down the hatches! Hoist the mast! ARRRR! Every man for hi\'self!',0,0,7,0,'threshwackonator SAY_AT_CLOSE'); diff --git a/sql/Updates/0.0.3/r995_mangos.sql b/sql/Updates/0.0.3/r995_mangos.sql new file mode 100644 index 000000000..de3ad9fa2 --- /dev/null +++ b/sql/Updates/0.0.3/r995_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_prospector_remtravel' WHERE entry=2917; diff --git a/sql/Updates/0.0.3/r995_scriptdev2.sql b/sql/Updates/0.0.3/r995_scriptdev2.sql new file mode 100644 index 000000000..69e33af7d --- /dev/null +++ b/sql/Updates/0.0.3/r995_scriptdev2.sql @@ -0,0 +1,61 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000339 AND -1000327; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000327, 'Ok, $n, let\'s go find where I left that mysterious fossil. Follow me!',0,0,7,0,'remtravel SAY_REM_START'), +(-1000328, 'Now where did I put that mysterious fossil? Ah, maybe up there...',0,0,7,0,'remtravel SAY_REM_RAMP1_1'), +(-1000329, 'Hrm, nothing up here.',0,0,7,0,'remtravel SAY_REM_RAMP1_2'), +(-1000330, 'No mysterious fossil here... Ah, but my copy of Green Hills of Stranglethorn. What a good book!',0,0,7,0,'remtravel SAY_REM_BOOK'), +(-1000331, 'I bet you I left it in the tent!',0,0,7,0,'remtravel SAY_REM_TENT1_1'), +(-1000332, 'Oh wait, that\'s Hollee\'s tent... and it\'s empty.',0,0,7,0,'remtravel SAY_REM_TENT1_2'), +(-1000333, 'Interesting... I hadn\'t noticed this earlier...',0,0,7,0,'remtravel SAY_REM_MOSS'), +(-1000334, '%s inspects the ancient, mossy stone.',0,2,7,0,'remtravel EMOTE_REM_MOSS'), +(-1000335, 'Oh wait! I\'m supposed to be looking for that mysterious fossil!',0,0,7,0,'remtravel SAY_REM_MOSS_PROGRESS'), +(-1000336, 'Nope. didn\'t leave the fossil back here!',0,0,7,0,'remtravel SAY_REM_PROGRESS'), +(-1000337, 'Ah. I remember now! I gave the mysterious fossil to Hollee! Check with her.',0,0,7,0,'remtravel SAY_REM_REMEMBER'), +(-1000338, '%s goes back to work, oblivious to everything around him.',0,2,7,0,'remtravel EMOTE_REM_END'), +(-1000339, 'Something tells me this $r wants the mysterious fossil too. Help!',0,0,7,0,'remtravel SAY_REM_AGGRO'); + +DELETE FROM script_waypoint WHERE entry=2917; +INSERT INTO script_waypoint VALUES +(2917, 0, 4675.812500, 598.614563, 17.645658, 0, 'SAY_REM_START'), +(2917, 1, 4672.844238, 599.325378, 16.417622, 0, ''), +(2917, 2, 4663.449707, 607.430176, 10.494752, 0, ''), +(2917, 3, 4655.969238, 613.761353, 8.523270, 0, ''), +(2917, 4, 4640.804688, 623.999329, 8.377054, 0, ''), +(2917, 5, 4631.678711, 630.801086, 6.414999, 5000, 'SAY_REM_RAMP1_1'), +(2917, 6, 4633.533203, 632.476440, 6.509831, 0, 'ambush'), +(2917, 7, 4639.413574, 637.120789, 13.338119, 0, ''), +(2917, 8, 4642.352051, 637.668152, 13.437444, 0, ''), +(2917, 9, 4645.082031, 634.463989, 13.437208, 5000, 'SAY_REM_RAMP1_2'), +(2917, 10, 4642.345215, 637.584839, 13.435211, 0, ''), +(2917, 11, 4639.630859, 637.233765, 13.339752, 0, ''), +(2917, 12, 4633.363281, 632.462280, 6.488438, 0, ''), +(2917, 13, 4624.714844, 631.723511, 6.264030, 0, ''), +(2917, 14, 4623.525879, 629.718506, 6.201339, 5000, 'SAY_REM_BOOK'), +(2917, 15, 4623.452148, 630.369629, 6.218942, 0, 'SAY_REM_TENT1_1'), +(2917, 16, 4622.622070, 637.221558, 6.312845, 0, 'ambush'), +(2917, 17, 4619.755371, 637.386230, 6.312050, 5000, 'SAY_REM_TENT1_2'), +(2917, 18, 4620.027832, 637.367676, 6.312050, 0, ''), +(2917, 19, 4624.154785, 637.560303, 6.313898, 0, ''), +(2917, 20, 4622.967773, 634.016479, 6.294979, 0, ''), +(2917, 21, 4616.926758, 630.303284, 6.239193, 0, ''), +(2917, 22, 4614.546387, 616.983337, 5.687642, 0, ''), +(2917, 23, 4610.279297, 610.029419, 5.442539, 0, ''), +(2917, 24, 4601.149902, 604.111694, 2.054856, 0, ''), +(2917, 25, 4589.618164, 597.685730, 1.057147, 0, ''), +(2917, 26, 4577.588379, 592.145813, 1.120190, 0, 'SAY_REM_MOSS (?)'), +(2917, 27, 4569.848145, 592.177490, 1.260874, 5000, 'EMOTE_REM_MOSS (?)'), +(2917, 28, 4568.791992, 590.870911, 1.211338, 3000, 'SAY_REM_MOSS_PROGRESS (?)'), +(2917, 29, 4566.722656, 564.077881, 1.343084, 0, 'ambush'), +(2917, 30, 4568.269531, 551.958435, 5.004200, 0, ''), +(2917, 31, 4566.731934, 551.557861, 5.426314, 5000, 'SAY_REM_PROGRESS'), +(2917, 32, 4566.741699, 560.767639, 1.703257, 0, ''), +(2917, 33, 4573.916016, 582.566101, 0.749801, 0, ''), +(2917, 34, 4594.206055, 598.533020, 1.034056, 0, ''), +(2917, 35, 4601.194824, 604.283081, 2.060146, 0, ''), +(2917, 36, 4609.539551, 610.844727, 5.402220, 0, ''), +(2917, 37, 4624.800293, 618.076477, 5.851541, 0, ''), +(2917, 38, 4632.414063, 623.778442, 7.286243, 0, ''), +(2917, 39, 4645.915039, 621.983765, 8.579967, 0, ''), +(2917, 40, 4658.669922, 611.092651, 8.891747, 0, ''), +(2917, 41, 4671.924316, 599.752197, 16.01242, 5000, 'SAY_REM_REMEMBER'), +(2917, 42, 4676.976074, 600.649780, 17.82566, 5000, 'EMOTE_REM_END'); diff --git a/sql/Updates/0.0.3/r997_mangos.sql b/sql/Updates/0.0.3/r997_mangos.sql new file mode 100644 index 000000000..90323679a --- /dev/null +++ b/sql/Updates/0.0.3/r997_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_myranda_the_hag' WHERE entry=11872; diff --git a/sql/Updates/0.0.3/r998_mangos.sql b/sql/Updates/0.0.3/r998_mangos.sql new file mode 100644 index 000000000..992e165f2 --- /dev/null +++ b/sql/Updates/0.0.3/r998_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_kyle_the_frenzied' WHERE entry=23616; diff --git a/sql/Updates/0.0.3/r998_scriptdev2_script_texts.sql b/sql/Updates/0.0.3/r998_scriptdev2_script_texts.sql new file mode 100644 index 000000000..138eb9a71 --- /dev/null +++ b/sql/Updates/0.0.3/r998_scriptdev2_script_texts.sql @@ -0,0 +1,5 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000342 AND -1000340; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000340, '%s howls in delight at the sight of his lunch!',0,2,0,0,'kyle EMOTE_SEE_LUNCH'), +(-1000341, '%s eats his lunch.',0,2,0,0,'kyle EMOTE_EAT_LUNCH'), +(-1000342, '%s thanks you with a special dance.',0,2,0,0,'kyle EMOTE_DANCE'); diff --git a/sql/Updates/Makefile.am b/sql/Updates/Makefile.am new file mode 100644 index 000000000..3b044f6b3 --- /dev/null +++ b/sql/Updates/Makefile.am @@ -0,0 +1,40 @@ +# Copyright (C) 2005-2009 MaNGOS +# +# 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, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +## Process this file with automake to produce Makefile.in + +## Sub-directories to parse + +## Change installation location +# datadir = scriptdev2/sql/updates +pkgdatadir = $(datadir)/scriptdev2/sql/updates + +## Files to be installed +# Install basic SQL files to datadir +pkgdata_DATA = \ + r1453_scriptdev2.sql \ + r1457_scriptdev2.sql \ + r1459_mangos.sql \ + r1460_mangos.sql \ + r1461_mangos.sql \ + r1461_scriptdev2.sql \ + r1463_mangos.sql \ + r1465_scriptdev2.sql \ + r1466_scriptdev2.sql \ + r1470_scriptdev2.sql \ + r1473_scriptdev2.sql \ + r1474_scriptdev2.sql \ + r1476_mangos.sql \ + r1476_scriptdev2.sql diff --git a/sql/Updates/r1453_scriptdev2.sql b/sql/Updates/r1453_scriptdev2.sql new file mode 100644 index 000000000..7851b4b99 --- /dev/null +++ b/sql/Updates/r1453_scriptdev2.sql @@ -0,0 +1,6 @@ +UPDATE script_texts SET content_default='$N! I\'m watching you!' WHERE entry=-1309018; +UPDATE script_texts SET type=4 WHERE entry=-1309019; + +DELETE FROM script_texts WHERE entry=-1309024; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1309024,'%s goes into a rage after seeing his raptor fall in battle!',0,2,0,0,'mandokir EMOTE_RAGE'); diff --git a/sql/Updates/r1457_scriptdev2.sql b/sql/Updates/r1457_scriptdev2.sql new file mode 100644 index 000000000..23468d930 --- /dev/null +++ b/sql/Updates/r1457_scriptdev2.sql @@ -0,0 +1,5 @@ +DELETE FROM script_texts WHERE entry=-1000005; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000005,'%s goes into a frenzy!',0,3,0,0,'EMOTE_BOSS_GENERIC_FRENZY'); + +UPDATE script_texts SET content_default='REUSE ME', type=0, comment='REUSE ME' WHERE entry IN (-1000156, -1269018, -1469031, -1601013, -1409001, -1469002); diff --git a/sql/Updates/r1459_mangos.sql b/sql/Updates/r1459_mangos.sql new file mode 100644 index 000000000..6742e6454 --- /dev/null +++ b/sql/Updates/r1459_mangos.sql @@ -0,0 +1 @@ +UPDATE instance_template SET script='instance_ahnkahet' WHERE map=619; diff --git a/sql/Updates/r1460_mangos.sql b/sql/Updates/r1460_mangos.sql new file mode 100644 index 000000000..de71d87ee --- /dev/null +++ b/sql/Updates/r1460_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='mob_chaotic_rift' WHERE entry=26918; diff --git a/sql/Updates/r1461_mangos.sql b/sql/Updates/r1461_mangos.sql new file mode 100644 index 000000000..b8736b07a --- /dev/null +++ b/sql/Updates/r1461_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_annhylde' WHERE entry=24068; diff --git a/sql/Updates/r1461_scriptdev2.sql b/sql/Updates/r1461_scriptdev2.sql new file mode 100644 index 000000000..2f6cc653e --- /dev/null +++ b/sql/Updates/r1461_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM script_texts WHERE entry=-1574022; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1574022,'%s roars!',0,3,0,0,'ingvar EMOTE_ROAR'); diff --git a/sql/Updates/r1463_mangos.sql b/sql/Updates/r1463_mangos.sql new file mode 100644 index 000000000..b4c6639a4 --- /dev/null +++ b/sql/Updates/r1463_mangos.sql @@ -0,0 +1,4 @@ +DELETE FROM areatrigger_scripts WHERE entry=5140; +INSERT INTO areatrigger_scripts VALUES (5140,'at_svala_intro'); + +UPDATE instance_template SET script='instance_pinnacle' WHERE map=575; diff --git a/sql/Updates/r1465_scriptdev2.sql b/sql/Updates/r1465_scriptdev2.sql new file mode 100644 index 000000000..a55b17311 --- /dev/null +++ b/sql/Updates/r1465_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 8623+) '; diff --git a/sql/Updates/r1466_scriptdev2.sql b/sql/Updates/r1466_scriptdev2.sql new file mode 100644 index 000000000..4e7e29881 --- /dev/null +++ b/sql/Updates/r1466_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 8627+) '; diff --git a/sql/Updates/r1470_scriptdev2.sql b/sql/Updates/r1470_scriptdev2.sql new file mode 100644 index 000000000..f3748955c --- /dev/null +++ b/sql/Updates/r1470_scriptdev2.sql @@ -0,0 +1,12 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1533129 AND -1533120; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1533120,'Hah hah, I\'m just getting warmed up!',8852,1,0,0,'razuvious SAY_AGGRO1'), +(-1533121,'Stand and fight!',8853,1,0,0,'razuvious SAY_AGGRO2'), +(-1533122,'Show me what you\'ve got!',8854,1,0,0,'razuvious SAY_AGGRO3'), +(-1533123,'Sweep the leg! Do you have a problem with that?',8861,1,0,0,'razuvious SAY_SLAY1'), +(-1533124,'You should have stayed home!',8862,1,0,0,'razuvious SAY_SLAY2'), +(-1533125,'Do as I taught you!',8855,1,0,0,'razuvious SAY_COMMAND1'), +(-1533126,'Show them no mercy!',8856,1,0,0,'razuvious SAY_COMMAND2'), +(-1533127,'You disappoint me, students!',8858,1,0,0,'razuvious SAY_COMMAND3'), +(-1533128,'The time for practice is over! Show me what you\'ve learned!',8859,1,0,0,'razuvious SAY_COMMAND4'), +(-1533129,'An honorable... death...',8860,1,0,0,'razuvious SAY_DEATH'); diff --git a/sql/Updates/r1473_scriptdev2.sql b/sql/Updates/r1473_scriptdev2.sql new file mode 100644 index 000000000..e4517b502 --- /dev/null +++ b/sql/Updates/r1473_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 8642+) '; diff --git a/sql/Updates/r1474_scriptdev2.sql b/sql/Updates/r1474_scriptdev2.sql new file mode 100644 index 000000000..eed9f93b1 --- /dev/null +++ b/sql/Updates/r1474_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 8645+) '; diff --git a/sql/Updates/r1476_mangos.sql b/sql/Updates/r1476_mangos.sql new file mode 100644 index 000000000..c44978c85 --- /dev/null +++ b/sql/Updates/r1476_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='boss_headless_horseman' WHERE entry=23682; diff --git a/sql/Updates/r1476_scriptdev2.sql b/sql/Updates/r1476_scriptdev2.sql new file mode 100644 index 000000000..3993a9824 --- /dev/null +++ b/sql/Updates/r1476_scriptdev2.sql @@ -0,0 +1,15 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1189034 AND -1189022; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1189022,'It is over, your search is done! Let fate choose now, the righteous one.',11961,1,0,0,'horseman SAY_ENTRANCE'), +(-1189023,'Here\'s my body, fit and pure! Now, your blackened souls I\'ll cure!',12567,1,0,0,'horseman SAY_REJOINED'), +(-1189024,'So eager you are for my blood to spill, yet to vanquish me this my head you must kill!',11969,1,0,0,'horseman SAY_BODY_DEFEAT'), +(-1189025,'Over here, you idiot!',12569,1,0,0,'horseman SAY_LOST_HEAD'), +(-1189026,'Harken, cur! Tis you I spurn! Now, $N, feel the burn!',12573,1,0,0,'horseman SAY_CONFLAGRATION'), +(-1189027,'Soldiers arise, stand and fight! Bring victory at last to this fallen knight!',11963,1,0,0,'horseman SAY_SPROUTING_PUMPKINS'), +(-1189028,'Your body lies beaten, battered and broken. Let my curse be your own, fate has spoken.',11962,1,0,0,'horseman SAY_SLAY'), +(-1189029,'This end have I reached before. What new adventure lies in store?',11964,1,0,0,'horseman SAY_DEATH'), +(-1189030,'%s laughs.',0,2,0,0,'horseman EMOTE_LAUGH'), +(-1189031,'Horseman rise...',0,0,0,0,'horseman SAY_PLAYER1'), +(-1189032,'Your time is night...',0,0,0,0,'horseman SAY_PLAYER2'), +(-1189033,'You felt death once...',0,0,0,0,'horseman SAY_PLAYER3'), +(-1189034,'Now, know demise!',0,0,0,0,'horseman SAY_PLAYER4'); diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql new file mode 100644 index 000000000..f6cc077f0 --- /dev/null +++ b/sql/mangos_scriptname_full.sql @@ -0,0 +1,1167 @@ +/* */ + +/* AREATRIGGER */ +DELETE FROM areatrigger_scripts WHERE entry=4560; +INSERT INTO areatrigger_scripts VALUES (4560,'at_legion_teleporter'); +DELETE FROM areatrigger_scripts WHERE entry=3066; +INSERT INTO areatrigger_scripts VALUES (3066,'at_ravenholdt'); +DELETE FROM areatrigger_scripts WHERE entry IN (4871, 4872, 4873); +INSERT INTO areatrigger_scripts VALUES +(4871,'at_warsong_grainery'), +(4872,'at_torp_farm'), +(4873,'at_warsong_slaughterhouse'); + +/* BATTLEGROUNDS */ +UPDATE creature_template SET ScriptName='npc_spirit_guide' WHERE entry IN (13116, 13117); + +/* WORLD BOSS */ +UPDATE creature_template SET ScriptName='boss_ysondre' WHERE entry=14887; +UPDATE creature_template SET ScriptName='boss_emeriss' WHERE entry=14889; +UPDATE creature_template SET ScriptName='boss_taerar' WHERE entry=14890; +UPDATE creature_template SET ScriptName='boss_shade_of_taerar' WHERE entry=15302; +UPDATE creature_template SET ScriptName='boss_kruul' WHERE entry=18338; +UPDATE creature_template SET ScriptName='boss_azuregos' WHERE entry=6109; +UPDATE creature_template SET ScriptName='mob_dementeddruids' WHERE entry=15260; + +/* GO */ +UPDATE gameobject_template SET ScriptName='go_cat_figurine' WHERE entry=13873; +UPDATE gameobject_template SET ScriptName='go_northern_crystal_pylon' WHERE entry=164955; +UPDATE gameobject_template SET ScriptName='go_western_crystal_pylon' WHERE entry=164956; +UPDATE gameobject_template SET ScriptName='go_eastern_crystal_pylon' WHERE entry=164957; +UPDATE gameobject_template SET ScriptName='go_barov_journal' WHERE entry=180794; +UPDATE gameobject_template SET ScriptName='go_ethereum_prison' WHERE entry BETWEEN 184418 AND 184431; +UPDATE gameobject_template SET ScriptName='go_ethereum_stasis' WHERE entry BETWEEN 185465 AND 185467; +UPDATE gameobject_template SET ScriptName='go_ethereum_stasis' WHERE entry=184595; +UPDATE gameobject_template SET ScriptName='go_ethereum_stasis' WHERE entry BETWEEN 185461 AND 185464; +UPDATE gameobject_template SET ScriptName='go_field_repair_bot_74A' where entry=179552; +UPDATE gameobject_template SET ScriptName='go_gilded_brazier' WHERE entry=181956; +UPDATE gameobject_template SET ScriptName='go_jump_a_tron' WHERE entry=183146; +UPDATE gameobject_template SET ScriptName='go_orb_of_command' WHERE entry=179879; +UPDATE gameobject_template SET ScriptName='go_resonite_cask' WHERE entry=178145; +UPDATE gameobject_template SET ScriptName='go_sacred_fire_of_life' WHERE entry=175944; +UPDATE gameobject_template SET ScriptName='go_shrine_of_the_birds' WHERE entry IN (185547,185553,185551); +UPDATE gameobject_template SET ScriptName='go_tablet_of_madness' WHERE entry=180368; +UPDATE gameobject_template SET ScriptName='go_tablet_of_the_seven' WHERE entry=169294; +UPDATE gameobject_template SET ScriptName='go_tele_to_dalaran_crystal' WHERE entry=191230; +UPDATE gameobject_template SET ScriptName='go_tele_to_violet_stand' WHERE entry=191229; + +/* GUARD */ +UPDATE creature_template SET ScriptName='guard_azuremyst' WHERE entry=18038; +UPDATE creature_template SET ScriptName='guard_orgrimmar' WHERE entry=3296; +UPDATE creature_template SET ScriptName='guard_stormwind' WHERE entry IN (68,1976); +UPDATE creature_template SET ScriptName='guard_contested' WHERE entry IN (9460,4624,3502,11190,15184); +UPDATE creature_template SET ScriptName='guard_elwynnforest' WHERE entry=1423; +UPDATE creature_template SET ScriptName='guard_eversong' WHERE entry=16221; +UPDATE creature_template SET ScriptName='guard_darnassus' WHERE entry=4262; +UPDATE creature_template SET ScriptName='guard_teldrassil' WHERE entry=3571; +UPDATE creature_template SET ScriptName='guard_ironforge' WHERE entry=5595; +UPDATE creature_template SET ScriptName='guard_dunmorogh' WHERE entry IN (727,13076); +UPDATE creature_template SET ScriptName='guard_undercity' WHERE entry=5624; +UPDATE creature_template SET ScriptName='guard_bluffwatcher' WHERE entry=3084; +UPDATE creature_template SET ScriptName='guard_durotar' WHERE entry=5953; +UPDATE creature_template SET ScriptName='guard_mulgore' WHERE entry IN (3212,3215,3217,3218,3219,3220,3221,3222,3223,3224); +UPDATE creature_template SET ScriptName='guard_dunmorogh' WHERE entry IN (727,13076); +UPDATE creature_template SET ScriptName='guard_tirisfal' WHERE entry IN (1735,1738,2210,1744,1745,5725,1743,2209,1746,1742); +UPDATE creature_template SET ScriptName='guard_silvermoon' WHERE entry=16222; +UPDATE creature_template SET ScriptName='guard_exodar' WHERE entry=16733; +UPDATE creature_template SET ScriptName='guard_shattrath' WHERE entry=19687; +UPDATE creature_template SET ScriptName='guard_shattrath_aldor' WHERE entry=18549; +UPDATE creature_template SET ScriptName='guard_shattrath_scryer' WHERE entry=18568; + +/* ITEM */ +UPDATE item_template SET ScriptName='item_arcane_charges' WHERE entry=34475; +UPDATE item_template SET ScriptName='item_draenei_fishing_net' WHERE entry=23654; +UPDATE item_template SET ScriptName='item_flying_machine' WHERE entry IN (34060,34061); +UPDATE item_template SET ScriptName='item_gor_dreks_ointment' WHERE entry=30175; +UPDATE item_template SET ScriptName='item_nether_wraith_beacon' WHERE entry=31742; +UPDATE item_template SET ScriptName='item_tainted_core' WHERE entry=31088; + +/* NPC (usually creatures to be found in more than one specific zone) */ +UPDATE creature_template SET ScriptName='npc_air_force_bots' WHERE entry IN (2614, 2615, 21974, 21993, 21996, 21997, 21999, 22001, 22002, 22003, 22063, 22065, 22066, 22068, 22069, 22070, 22071, 22078, 22079, 22080, 22086, 22087, 22088, 22090, 22124, 22125, 22126); +UPDATE creature_template SET ScriptName='npc_chicken_cluck' WHERE entry=620; +UPDATE creature_template SET ScriptName='npc_dancing_flames' WHERE entry=25305; +UPDATE creature_template SET ScriptName='npc_garments_of_quests' WHERE entry IN (12429,12423,12427,12430,12428); +UPDATE creature_template SET ScriptName='npc_guardian' WHERE entry=5764; +UPDATE creature_template SET ScriptName='npc_kingdom_of_dalaran_quests' WHERE entry IN (29169,23729,26673,27158,29158,29161,26471,29155,29159,29160,29162); +UPDATE creature_template SET ScriptName='npc_lunaclaw_spirit' WHERE entry=12144; +UPDATE creature_template SET ScriptName='npc_mount_vendor' WHERE entry IN (384,1261,1460,2357,3362,3685,4730,4731,4885,7952,7955,16264,17584); +UPDATE creature_template SET ScriptName='npc_doctor' WHERE entry IN (12939,12920); +UPDATE creature_template SET ScriptName='npc_injured_patient' WHERE entry IN (12936,12937,12938,12923,12924,12925); +UPDATE creature_template SET ScriptName='npc_prof_alchemy' WHERE entry IN (17909,19052,22427); +UPDATE creature_template SET ScriptName='npc_prof_blacksmith' WHERE entry IN (5164,11145,11146,11176,11177,11178,11191,11192,11193); +UPDATE creature_template SET ScriptName='npc_engineering_tele_trinket' WHERE entry IN (14742,14743,21493,21494); +UPDATE creature_template SET ScriptName='npc_prof_leather' WHERE entry IN (7866,7867,7868,7869,7870,7871); +UPDATE creature_template SET ScriptName='npc_prof_tailor' WHERE entry IN (22208,22212,22213); +UPDATE creature_template SET ScriptName='npc_rogue_trainer' WHERE entry IN (918,4163,3328,4583,5165,5167,13283,16684); +UPDATE creature_template SET ScriptName='npc_sayge' WHERE entry=14822; + +/* */ +/* ZONE */ +/* */ + +/* ALTERAC MOUNTAINS */ + + +/* ALTERAC VALLEY */ + + +/* ARATHI HIGHLANDS */ +UPDATE creature_template SET ScriptName='npc_professor_phizzlethorpe' WHERE entry=2768; + +/* ASHENVALE */ +UPDATE creature_template SET ScriptName='npc_muglash' WHERE entry=12717; +UPDATE gameobject_template SET ScriptName='go_naga_brazier' WHERE entry=178247; +UPDATE creature_template SET ScriptName='npc_ruul_snowhoof' WHERE entry=12818; +UPDATE creature_template SET ScriptName='npc_torek' WHERE entry=12858; + +/* */ +/* AUCHINDOUN */ +/* */ + +/* MANA TOMBS */ +UPDATE creature_template SET ScriptName='boss_pandemonius' WHERE entry=18341; +UPDATE creature_template SET ScriptName='boss_nexusprince_shaffar' WHERE entry=18344; +UPDATE creature_template SET ScriptName='mob_ethereal_beacon' WHERE entry=18431; + +/* AUCHENAI CRYPTS */ +UPDATE creature_template SET ScriptName='boss_exarch_maladaar' WHERE entry=18373; +UPDATE creature_template SET ScriptName='mob_avatar_of_martyred' WHERE entry=18478; +UPDATE creature_template SET ScriptName='mob_stolen_soul' WHERE entry=18441; + +/* SETHEKK HALLS */ +UPDATE instance_template SET script='instance_sethekk_halls' WHERE map=556; +UPDATE creature_template SET ScriptName='mob_syth_fire' WHERE entry=19203; +UPDATE creature_template SET ScriptName='mob_syth_arcane' WHERE entry=19205; +UPDATE creature_template SET ScriptName='mob_syth_frost' WHERE entry=19204; +UPDATE creature_template SET ScriptName='mob_syth_shadow' WHERE entry=19206; +UPDATE creature_template SET ScriptName='boss_talon_king_ikiss' WHERE entry=18473; +UPDATE creature_template SET ScriptName='boss_darkweaver_syth' WHERE entry=18472; + +/* SHADOW LABYRINTH */ +UPDATE instance_template SET script='instance_shadow_labyrinth' WHERE map=555; +UPDATE creature_template SET ScriptName='boss_murmur' WHERE entry=18708; +UPDATE creature_template SET ScriptName='boss_grandmaster_vorpil' WHERE entry=18732; +UPDATE creature_template SET ScriptName='boss_blackheart_the_inciter' WHERE entry=18667; +UPDATE creature_template SET ScriptName='boss_ambassador_hellmaw' WHERE entry=18731; + +/* */ +/* AZJOL-NERUB */ +/* */ + +/* AHN'KAHET */ +UPDATE creature_template SET ScriptName='boss_jedoga' WHERE entry=29310; +UPDATE creature_template SET ScriptName='boss_nadox' WHERE entry=29309; +UPDATE creature_template SET ScriptName='boss_taldaram' WHERE entry=29308; +UPDATE gameobject_template SET ScriptName='go_nerubian_device' WHERE entry IN (193093,193094); +UPDATE creature_template SET ScriptName='boss_volazj' WHERE entry=29311; +UPDATE instance_template SET script='instance_ahnkahet' WHERE map=619; + +/* AZJOL-NERUB */ +UPDATE creature_template SET ScriptName='boss_anubarak' WHERE entry=29120; +UPDATE creature_template SET ScriptName='boss_hadronox' WHERE entry=28921; +UPDATE creature_template SET ScriptName='boss_krikthir' WHERE entry=28684; +UPDATE instance_template SET script='instance_azjol-nerub' WHERE map=601; + +/* AZSHARA */ +UPDATE creature_template SET ScriptName='npc_rizzle_sprysprocket' WHERE entry=23002; +UPDATE creature_template SET ScriptName='npc_depth_charge' WHERE entry=23025; +UPDATE gameobject_template SET ScriptName='go_southfury_moonstone' WHERE entry=185566; +UPDATE creature_template SET ScriptName='mobs_spitelashes' WHERE entry IN (6190,6193,6194,6195,6196,7885,7886,12204,12205); +UPDATE creature_template SET ScriptName='npc_loramus_thalipedes' WHERE entry=7783; + +/* AZUREMYST ISLE */ +UPDATE creature_template SET ScriptName='npc_draenei_survivor' WHERE entry=16483; +UPDATE creature_template SET ScriptName='npc_engineer_spark_overgrind' WHERE entry=17243; +UPDATE creature_template SET ScriptName='npc_injured_draenei' WHERE entry=16971; +UPDATE creature_template SET ScriptName='npc_magwin' WHERE entry=17312; +UPDATE creature_template SET ScriptName='npc_nestlewood_owlkin' WHERE entry=16518; +UPDATE creature_template SET ScriptName='npc_susurrus' WHERE entry=17435; + +/* BADLANDS */ + + +/* BARRENS */ +UPDATE creature_template SET ScriptName='npc_beaten_corpse' WHERE entry=10668; +UPDATE creature_template SET ScriptName='npc_gilthares' WHERE entry=3465; +UPDATE creature_template SET ScriptName='npc_sputtervalve' WHERE entry=3442; +UPDATE creature_template SET ScriptName='npc_taskmaster_fizzule' WHERE entry=7233; +UPDATE creature_template SET ScriptName='npc_twiggy_flathead' WHERE entry=6248; +DELETE FROM areatrigger_scripts WHERE entry=522; +INSERT INTO areatrigger_scripts VALUES (522,'at_twiggy_flathead'); +UPDATE creature_template SET ScriptName='npc_wizzlecranks_shredder' WHERE entry=3439; + +/* BLACK TEMPLE */ +UPDATE instance_template SET script='instance_black_temple' WHERE map=564; +UPDATE creature_template SET ScriptName='npc_akama_shade' WHERE entry=22990; -- Akama at Shade of Akama +UPDATE creature_template SET ScriptName='npc_akama_illidan' WHERE entry=23089; -- Akama at Illidan +UPDATE creature_template SET ScriptName='mob_illidari_council' WHERE entry=23426; -- Illidari Council controller mob +UPDATE creature_template SET ScriptName='mob_blood_elf_council_voice_trigger' WHERE entry=23499; -- Voice Trigger Mob (Controls Aggro + Enrage yells) +UPDATE creature_template SET ScriptName='boss_veras_darkshadow' WHERE entry=22952; -- Rogue of Illidari Council +UPDATE creature_template SET ScriptName='boss_teron_gorefiend' WHERE entry=22871; -- Teron Gorefiend +UPDATE creature_template SET ScriptName='boss_supremus' WHERE entry=22898; -- Supremus +UPDATE creature_template SET ScriptName='boss_shade_of_akama' WHERE entry=22841; -- Shade of Akama +UPDATE creature_template SET ScriptName='boss_reliquary_of_souls' WHERE entry=22856; -- Reliquary Controller Mob +UPDATE creature_template SET ScriptName='boss_essence_of_suffering' WHERE entry=23418; -- Essence Of Suffering +UPDATE creature_template SET ScriptName='boss_essence_of_desire' WHERE entry=23419; -- Essence of Desire +UPDATE creature_template SET ScriptName='boss_essence_of_anger' WHERE entry=23420; -- Essence of Anger +UPDATE creature_template SET ScriptName='boss_najentus' WHERE entry=22887; -- High Warlord Naj'entus +UPDATE creature_template SET ScriptName='boss_gurtogg_bloodboil' WHERE entry=22948; -- Gurtogg Bloodboil +UPDATE creature_template SET ScriptName='boss_mother_shahraz' WHERE entry=22947; -- Mother Shahraz +UPDATE creature_template SET ScriptName='boss_lady_malande' WHERE entry=22951; -- Priest <3 at Illidari Council +UPDATE creature_template SET ScriptName='boss_illidan_stormrage' WHERE entry=22917; -- Illidan The Betrayer! +UPDATE creature_template SET ScriptName='boss_high_nethermancer_zerevor' WHERE entry=22950; -- Mage at Illidari Council +UPDATE creature_template SET ScriptName='boss_gathios_the_shatterer' WHERE entry=22949; -- Paladin at Illidari Council +UPDATE creature_template SET ScriptName='boss_maiev_shadowsong' WHERE entry=23197; -- Maiev Shadowsong +UPDATE gameobject_template SET ScriptName='gameobject_cage_trap' WHERE entry=185916; -- Cage Trap GO in Illidan Encounter +UPDATE creature_template SET ScriptName='mob_blaze' WHERE entry=23259; -- Blaze mob in Illidan Phase 2 +UPDATE creature_template SET ScriptName='mob_flame_of_azzinoth' WHERE entry=22997; -- Flame of Azzinoth (Illidan Phase 2) +UPDATE creature_template SET ScriptName='mob_blade_of_azzinoth' WHERE entry=22996; -- Blade of Azzinoth (Illidan Phase 2) +UPDATE creature_template SET ScriptName='mob_demon_fire' WHERE entry=23069; -- Demon Fire in Illidan Phase 2 +UPDATE creature_template SET ScriptName='mob_flame_crash' WHERE entry=23336; -- Flame Crash in Illidan Normal Form +UPDATE creature_template SET ScriptName='mob_cage_trap_trigger' WHERE entry=23304; -- Cage Trap mob in Illidan Phase 3/4 Normal +UPDATE creature_template SET ScriptName='mob_shadow_demon' WHERE entry=23375; -- Shadow Demon in Illidan Demon Form +UPDATE creature_template SET ScriptName='npc_volcano' WHERE entry=23085; -- Supremus Volcano +UPDATE creature_template SET ScriptName='molten_flame' WHERE entry=23095; -- Molten Flame in SUpremus +UPDATE creature_template SET ScriptName='mob_ashtongue_channeler' WHERE entry=23421; -- Ashtongue CHanneler in Shade of AKama +UPDATE creature_template SET ScriptName='mob_ashtongue_sorcerer' WHERE entry=23215; -- Ashtongue Sorcerer in Shade of Akama +UPDATE creature_template SET ScriptName='npc_enslaved_soul' WHERE entry=23469; -- Enslaved Soul in Reliquary Event +UPDATE creature_template SET ScriptName='mob_doom_blossom' WHERE entry=23123; -- Doom Blossoms in Teron Gorefiend's encounter +UPDATE creature_template SET ScriptName='npc_spirit_of_olum' WHERE entry=23411; +-- UPDATE creature_template SET ScriptName='mob_shadowy_construct' WHERE entry=23111; -- Shadowy Construct in Teron Gorefiend's encounter. Commented until Mind Control is implemented. + +/* BLACKFATHOM DEPTHS */ +UPDATE instance_template SET script='instance_blackfathom_deeps' WHERE map=48; + +/* BLACKROCK DEPTHS */ +DELETE FROM areatrigger_scripts WHERE entry=1526; +INSERT INTO areatrigger_scripts VALUES (1526,'at_ring_of_law'); +UPDATE instance_template SET script='instance_blackrock_depths' WHERE map =230; +UPDATE creature_template SET ScriptName='boss_emperor_dagran_thaurissan' WHERE entry=9019; +UPDATE creature_template SET ScriptName='boss_moira_bronzebeard' WHERE entry=8929; +UPDATE creature_template SET ScriptName='boss_ambassador_flamelash' WHERE entry=9156; +UPDATE creature_template SET ScriptName='boss_anubshiah' WHERE entry=9031; +UPDATE creature_template SET ScriptName='boss_doomrel' WHERE entry=9039; +UPDATE creature_template SET ScriptName='boss_gloomrel' WHERE entry=9037; +UPDATE creature_template SET ScriptName='boss_general_angerforge' WHERE entry=9033; +UPDATE creature_template SET ScriptName='boss_gorosh_the_dervish' WHERE entry=9027; +UPDATE creature_template SET ScriptName='boss_grizzle' WHERE entry=9028; +UPDATE creature_template SET ScriptName='boss_high_interrogator_gerstahn' WHERE entry=9018; +UPDATE creature_template SET ScriptName='boss_magmus' WHERE entry=9938; +UPDATE creature_template SET ScriptName='mob_phalanx' WHERE entry=9502; +UPDATE creature_template SET ScriptName='npc_grimstone' WHERE entry=10096; +UPDATE creature_template SET ScriptName='npc_lokhtos_darkbargainer' WHERE entry=12944; +UPDATE creature_template SET ScriptName='npc_kharan_mighthammer' WHERE entry=9021; +UPDATE creature_template SET ScriptName='npc_rocknot' WHERE entry=9503; +UPDATE gameobject_template SET ScriptName='go_shadowforge_brazier' WHERE entry IN (174744, 174745); + +/* BLACKROCK SPIRE */ +/* BLACKROCK SPIRE Lower bosses */ +UPDATE creature_template SET ScriptName='boss_highlord_omokk' WHERE entry=9196; +UPDATE creature_template SET ScriptName='boss_shadow_hunter_voshgajin' WHERE entry=9236; +UPDATE creature_template SET ScriptName='boss_warmaster_voone' WHERE entry=9237; +UPDATE creature_template SET ScriptName='boss_mother_smolderweb' WHERE entry=10596; +UPDATE creature_template SET ScriptName='quartermaster_zigris' WHERE entry=9736; +UPDATE creature_template SET ScriptName='boss_halycon' WHERE entry=10220; +UPDATE creature_template SET ScriptName='boss_overlord_wyrmthalak' WHERE entry=9568; +/* BLACKROCK SPIRE Upper bosses */ +UPDATE creature_template SET ScriptName='boss_the_beast' WHERE entry=10430; +UPDATE creature_template SET ScriptName='boss_drakkisath' WHERE entry=10363; +UPDATE creature_template SET ScriptName='boss_gyth' WHERE entry=10339; +UPDATE creature_template SET ScriptName='boss_rend_blackhand' WHERE entry=10429; +UPDATE creature_template SET ScriptName='boss_pyroguard_emberseer' WHERE entry=9816; + +/* BLACKWING LAIR */ +-- UPDATE instance_template SET script='instance_blackwing_lair' WHERE map=469; +UPDATE creature_template SET ScriptName='boss_razorgore' WHERE entry=12435; +UPDATE creature_template SET ScriptName='boss_vaelastrasz' WHERE entry=13020; +UPDATE creature_template SET ScriptName='boss_broodlord' WHERE entry=12017; +UPDATE creature_template SET ScriptName='boss_firemaw' WHERE entry=11983; +UPDATE creature_template SET ScriptName='boss_ebonroc' WHERE entry=14601; +UPDATE creature_template SET ScriptName='boss_flamegor' WHERE entry=11981; +UPDATE creature_template SET ScriptName='boss_chromaggus' WHERE entry=14020; +UPDATE creature_template SET ScriptName='boss_victor_nefarius' WHERE entry=10162; +UPDATE creature_template SET ScriptName='boss_nefarian' WHERE entry=11583; + +/* BLADE'S EDGE MOUNTAINS */ +UPDATE creature_template SET ScriptName='mobs_bladespire_ogre' WHERE entry IN (19998,20334,21296,21975); +UPDATE creature_template SET ScriptName='mobs_nether_drake' WHERE entry IN (20021,21817,21820,21821,21823); +UPDATE creature_template SET ScriptName='npc_daranelle' WHERE entry=21469; +UPDATE creature_template SET ScriptName='npc_overseer_nuaar' WHERE entry=21981; +UPDATE creature_template SET ScriptName='npc_saikkal_the_elder' WHERE entry=22932; +UPDATE creature_template SET ScriptName='npc_skyguard_handler_deesak' WHERE entry=23415; + +/* BLASTED LANDS */ +UPDATE creature_template SET ScriptName='npc_deathly_usher' WHERE entry=8816; +UPDATE creature_template SET ScriptName='npc_fallen_hero_of_horde' WHERE entry=7572; + +/* BLOODMYST ISLE */ +UPDATE creature_template SET ScriptName='mob_webbed_creature' WHERE entry=17680; +UPDATE creature_template SET ScriptName='npc_captured_sunhawk_agent' WHERE entry=17824; + +/* BOREAN TUNDRA */ +UPDATE creature_template SET ScriptName='npc_fizzcrank_fullthrottle' WHERE entry=25590; +UPDATE creature_template SET ScriptName='npc_iruk' WHERE entry=26219; +UPDATE creature_template SET ScriptName='npc_kara_thricestar' WHERE entry=26602; +UPDATE creature_template SET ScriptName='npc_surristrasz' WHERE entry=24795; +UPDATE creature_template SET ScriptName='npc_tiare' WHERE entry=30051; + +/* BURNING STEPPES */ +UPDATE creature_template SET ScriptName='npc_ragged_john' WHERE entry=9563; + +/* */ +/* CAVERNS OF TIME */ +/* */ + +/* MT. HYJAL */ +UPDATE instance_template SET script='instance_hyjal' WHERE map=534; +UPDATE creature_template SET ScriptName='npc_tyrande_whisperwind' WHERE entry=17948; +UPDATE creature_template SET ScriptName='npc_thrall' WHERE entry=17852; +UPDATE creature_template SET ScriptName='npc_jaina_proudmoore' WHERE entry=17772; +UPDATE creature_template SET ScriptName='boss_archimonde' WHERE entry=17968; +UPDATE creature_template SET ScriptName='mob_doomfire' WHERE entry=18095; +UPDATE creature_template SET ScriptName='mob_doomfire_targetting' WHERE entry=18104; +UPDATE creature_template SET ScriptName='mob_ancient_wisp' WHERE entry=17946; + +/* OLD HILLSBRAD */ +UPDATE instance_template SET script='instance_old_hillsbrad' WHERE map=560; +UPDATE creature_template SET ScriptName='boss_lieutenant_drake' WHERE entry=17848; +UPDATE creature_template SET ScriptName='boss_epoch_hunter' WHERE entry=18096; +UPDATE creature_template SET ScriptName='boss_captain_skarloc' WHERE entry=17862; +UPDATE gameobject_template SET ScriptName='go_barrel_old_hillsbrad' WHERE entry=182589; +UPDATE creature_template SET ScriptName='npc_brazen' WHERE entry=18725; +UPDATE creature_template SET ScriptName='npc_erozion' WHERE entry=18723; +UPDATE creature_template SET ScriptName='npc_taretha' WHERE entry=18887; +UPDATE creature_template SET ScriptName='npc_thrall_old_hillsbrad' WHERE entry=17876; + +/* THE CULLING OF STRATHOLME */ + +/* THE DARK PORTAL */ +UPDATE creature_template SET ScriptName='boss_chrono_lord_deja' WHERE entry=17879; +UPDATE creature_template SET ScriptName='boss_aeonus' WHERE entry=17881; +UPDATE creature_template SET ScriptName='boss_temporus' WHERE entry=17880; +UPDATE instance_template SET script='instance_dark_portal' WHERE map=269; +UPDATE creature_template SET ScriptName='npc_medivh_bm' WHERE entry=15608; +UPDATE creature_template SET ScriptName='npc_time_rift' WHERE entry=17838; +UPDATE creature_template SET ScriptName='npc_saat' WHERE entry=20201; + +/* */ +/* COILFANG RESERVOIR */ +/* */ + +/* THE SLAVE PENS */ + +/* THE UNDERBOG */ +UPDATE creature_template SET ScriptName='mob_underbog_mushroom' WHERE entry=17990; +UPDATE creature_template SET ScriptName='boss_hungarfen' WHERE entry=17770; + +/* THE STEAMVAULT */ +UPDATE instance_template SET script='instance_steam_vault' WHERE map=545; +UPDATE creature_template SET ScriptName='boss_hydromancer_thespia' WHERE entry=17797; +UPDATE creature_template SET ScriptName='boss_mekgineer_steamrigger' WHERE entry=17796; +UPDATE creature_template SET ScriptName='boss_warlord_kalithresh' WHERE entry=17798; +UPDATE gameobject_template SET ScriptName='go_main_chambers_access_panel' WHERE entry IN (184125,184126); +UPDATE creature_template SET ScriptName='mob_coilfang_waterelemental' WHERE entry=17917; +UPDATE creature_template SET ScriptName='mob_naga_distiller' WHERE entry=17954; +UPDATE creature_template SET ScriptName='mob_steamrigger_mechanic' WHERE entry=17951; + +/* SERPENTSHRINE CAVERN */ +UPDATE instance_template SET script='instance_serpent_shrine' WHERE map=548; +UPDATE creature_template SET ScriptName='boss_hydross_the_unstable' WHERE entry=21216; +/* Leotheras the Blind event */ +UPDATE creature_template SET ScriptName='boss_leotheras_the_blind' WHERE entry=21215; +UPDATE creature_template SET ScriptName='boss_leotheras_the_blind_demonform' WHERE entry=21875; +/* Fathom-lord Karathress event */ +UPDATE creature_template SET ScriptName='boss_fathomlord_karathress' WHERE entry=21214; +UPDATE creature_template SET ScriptName='boss_fathomguard_sharkkis' WHERE entry=21966; +UPDATE creature_template SET ScriptName='boss_fathomguard_tidalvess' WHERE entry=21965; +UPDATE creature_template SET ScriptName='boss_fathomguard_caribdis' WHERE entry=21964; +/* Morogrim Tidewalker event */ +UPDATE creature_template SET ScriptName='boss_morogrim_tidewalker' WHERE entry=21213; +UPDATE creature_template SET ScriptName='mob_water_globule' WHERE entry=21913; +/* Lady Vashj event */ +UPDATE creature_template SET ScriptName='boss_lady_vashj' WHERE entry=21212; +UPDATE creature_template SET ScriptName='mob_enchanted_elemental' WHERE entry=21958; +UPDATE creature_template SET ScriptName='mob_tainted_elemental' WHERE entry=22009; +UPDATE creature_template SET ScriptName='mob_coilfang_elite' WHERE entry=22055; +UPDATE creature_template SET ScriptName='mob_coilfang_strider' WHERE entry=22056; +UPDATE creature_template SET ScriptName='mob_toxic_sporebat' WHERE entry=22140; +UPDATE creature_template SET ScriptName='mob_shield_generator_channel' WHERE entry=19870; + + +/* CRYSTALSONG FOREST */ + + +/* DALARAN */ +UPDATE creature_template SET ScriptName='npc_zidormi' WHERE entry=31848; + +/* DARKSHORE */ +UPDATE creature_template SET ScriptName='npc_kerlonian' WHERE entry=11218; +UPDATE creature_template SET ScriptName='npc_prospector_remtravel' WHERE entry=2917; +UPDATE creature_template SET ScriptName='npc_threshwackonator' WHERE entry=6669; + +/* DARNASSUS */ + + +/* DEADMINES */ +UPDATE instance_template SET script='instance_deadmines' WHERE map=36; +UPDATE gameobject_template SET ScriptName='go_defias_cannon' WHERE entry=16398; +UPDATE gameobject_template SET ScriptName='go_door_lever_dm' WHERE entry=101833; + +/* DEADWIND PASS */ + + +/* DESOLACE */ +UPDATE creature_template SET ScriptName='npc_aged_dying_ancient_kodo' WHERE entry IN (4700, 4701, 4702, 11627); + +/* DIRE MAUL */ + + +/* DRAGONBLIGHT */ +UPDATE creature_template SET ScriptName='npc_afrasastrasz' WHERE entry=27575; +UPDATE creature_template SET ScriptName='npc_alexstrasza_wr_gate' WHERE entry=31333; +UPDATE creature_template SET ScriptName='npc_tariolstrasz' WHERE entry=26443; +UPDATE creature_template SET ScriptName='npc_torastrasza' WHERE entry=26949; + +/* DRAK'THARON KEEP */ +UPDATE creature_template SET ScriptName='boss_novos' WHERE entry=26631; +UPDATE creature_template SET ScriptName='boss_tharonja' WHERE entry=26632; +UPDATE creature_template SET ScriptName='boss_trollgore' WHERE entry=26630; + +/* DUN MOROGH */ +UPDATE creature_template SET ScriptName='npc_narm_faulk' WHERE entry=6177; + + +/* DUROTAR */ + + +/* DUSKWOOD */ + + +/* DUSTWALLOW MARSH */ +UPDATE creature_template SET ScriptName='mobs_risen_husk_spirit' WHERE entry IN (23554,23555); +UPDATE creature_template SET ScriptName='npc_deserter_agitator' WHERE entry=23602; +UPDATE creature_template SET ScriptName='npc_lady_jaina_proudmoore' WHERE entry=4968; +UPDATE creature_template SET ScriptName='npc_ogron' WHERE entry=4983; +UPDATE creature_template SET ScriptName='npc_morokk' WHERE entry=4500; +UPDATE creature_template SET ScriptName='npc_nat_pagle' WHERE entry=12919; +UPDATE creature_template SET ScriptName='npc_cassa_crimsonwing' WHERE entry=23704; +UPDATE creature_template SET ScriptName='npc_restless_apparition' WHERE entry=23861; +UPDATE creature_template SET ScriptName='npc_private_hendel' WHERE entry=4966; + +/* EASTERN PLAGUELANDS */ +UPDATE creature_template SET ScriptName='mobs_ghoul_flayer' WHERE entry IN (8530,8531,8532); +UPDATE creature_template SET ScriptName='npc_augustus_the_touched' WHERE entry=12384; +UPDATE creature_template SET ScriptName='npc_darrowshire_spirit' WHERE entry=11064; +UPDATE creature_template SET ScriptName='npc_tirion_fordring' WHERE entry=1855; + +/* EBON HOLD */ +UPDATE creature_template SET ScriptName='npc_death_knight_initiate' WHERE entry=28406; +UPDATE creature_template SET ScriptName='npc_unworthy_initiate_anchor' WHERE entry=29521; +UPDATE creature_template SET ScriptName='npc_unworthy_initiate' WHERE entry IN (29519,29520,29565,29566,29567); +UPDATE gameobject_template SET ScriptName='go_acherus_soul_prison' WHERE entry IN (191577,191580,191581,191582,191583,191584,191585,191586,191587,191588,191589,191590); +UPDATE creature_template SET ScriptName='npc_a_special_surprise' WHERE entry IN (29032,29061,29065,29067,29068,29070,29074,29072,29073,29071); +UPDATE creature_template SET ScriptName='npc_koltira_deathweaver' WHERE entry=28912; + +/* ELWYNN FOREST */ +UPDATE creature_template SET ScriptName='npc_henze_faulk' WHERE entry=6172; + +/* EVERSONG WOODS */ +UPDATE creature_template SET ScriptName='npc_kelerun_bloodmourn' WHERE entry=17807; +UPDATE gameobject_template SET ScriptName='go_harbinger_second_trial' WHERE entry=182052; +UPDATE creature_template SET ScriptName='npc_prospector_anvilward' WHERE entry=15420; + +/* FELWOOD */ +UPDATE creature_template SET ScriptName='npc_kitten' WHERE entry=9937; +UPDATE creature_template SET ScriptName='npc_corrupt_saber' WHERE entry=10042; +UPDATE creature_template SET ScriptName='npcs_riverbreeze_and_silversky' WHERE entry IN (9528,9529); + +/* FERALAS */ +UPDATE creature_template SET ScriptName='npc_gregan_brewspewer' WHERE entry=7775; +UPDATE creature_template SET ScriptName='npc_oox22fe' WHERE entry=7807; +UPDATE creature_template SET ScriptName='npc_screecher_spirit' WHERE entry=8612; + +/* GHOSTLANDS */ +UPDATE creature_template SET ScriptName='npc_blood_knight_dawnstar' WHERE entry=17832; +UPDATE creature_template SET ScriptName='npc_budd_nedreck' WHERE entry=23559; +UPDATE creature_template SET ScriptName='npc_ranger_lilatha' WHERE entry=16295; +UPDATE creature_template SET ScriptName='npc_rathis_tomber' WHERE entry=16224; + +/* GNOMEREGAN */ + + +/* GRIZZLY HILLS */ +UPDATE creature_template SET ScriptName='npc_orsonn_and_kodian' WHERE entry IN (27274, 27275); + +/* GRUUL'S LAIR */ +UPDATE instance_template SET script='instance_gruuls_lair' WHERE map =565; +UPDATE creature_template SET ScriptName='boss_gruul' WHERE entry=19044; +/* Maulgar and Event */ +UPDATE creature_template SET ScriptName='boss_high_king_maulgar' WHERE entry=18831; +UPDATE creature_template SET ScriptName='boss_kiggler_the_crazed' WHERE entry=18835; +UPDATE creature_template SET ScriptName='boss_blindeye_the_seer' WHERE entry=18836; +UPDATE creature_template SET ScriptName='boss_olm_the_summoner' WHERE entry=18834; +UPDATE creature_template SET ScriptName='boss_krosh_firehand' WHERE entry=18832; + +/* GUNDRAK */ +UPDATE creature_template SET ScriptName='boss_colossus' WHERE entry=29307; +UPDATE creature_template SET ScriptName='boss_galdarah' WHERE entry=29306; +UPDATE creature_template SET ScriptName='boss_moorabi' WHERE entry=29305; +UPDATE creature_template SET ScriptName='boss_sladran' WHERE entry=29304; +UPDATE gameobject_template SET ScriptName='go_gundrak_altar' WHERE entry IN (192518, 192519, 192520); +UPDATE instance_template SET script='instance_gundrak' WHERE map=604; + +/* */ +/* HELLFIRE CITADEL */ +/* */ + +/* BLOOD FURNACE */ +/* The Maker,Broggok,Kelidan,Broggok's cloud */ +UPDATE creature_template SET ScriptName='boss_the_maker' WHERE entry=17381; +UPDATE creature_template SET ScriptName='boss_broggok' WHERE entry=17380; +UPDATE creature_template SET ScriptName='boss_kelidan_the_breaker' WHERE entry=17377; +UPDATE creature_template SET ScriptName='mob_broggok_poisoncloud' WHERE entry=17662; +UPDATE creature_template SET ScriptName='mob_shadowmoon_channeler' WHERE entry=17653; +UPDATE instance_template SET script='instance_blood_furnace' WHERE map=542; + +/* HELLFIRE RAMPARTS */ +/* Vazruden,Omor the Unscarred,Watchkeeper Gargolmar */ +UPDATE creature_template SET ScriptName='boss_omor_the_unscarred' WHERE entry=17308; +UPDATE creature_template SET ScriptName='boss_watchkeeper_gargolmar' WHERE entry=17306; +UPDATE creature_template SET ScriptName='boss_vazruden_herald' WHERE entry=17307; +UPDATE creature_template SET ScriptName='boss_vazruden' WHERE entry=17537; +UPDATE instance_template SET script='instance_ramparts' WHERE map=543; + +/* SHATTERED HALLS */ +/* Nethekurse and his spawned shadowfissure */ +UPDATE creature_template SET ScriptName='boss_grand_warlock_nethekurse' WHERE entry=16807; +UPDATE creature_template SET ScriptName='boss_warbringer_omrogg' WHERE entry=16809; +UPDATE creature_template SET ScriptName='mob_fel_orc_convert' WHERE entry=17083; +UPDATE creature_template SET ScriptName='mob_lesser_shadow_fissure' WHERE entry=17471; +UPDATE creature_template SET ScriptName='mob_omrogg_heads' WHERE entry IN (19523,19524); +UPDATE creature_template SET ScriptName='boss_warchief_kargath_bladefist' WHERE entry=16808; +UPDATE instance_template SET script='instance_shattered_halls' WHERE map=540; + +/* MAGTHERIDON'S LAIR */ +UPDATE instance_template SET script='instance_magtheridons_lair' WHERE map=544; +UPDATE gameobject_template SET ScriptName='go_manticron_cube' WHERE entry=181713; +UPDATE creature_template SET ScriptName='boss_magtheridon' WHERE entry=17257; +UPDATE creature_template SET ScriptName='mob_abyssal' WHERE entry=17454; +UPDATE creature_template SET ScriptName='mob_hellfire_channeler' WHERE entry=17256; + +/* HELLFIRE PENINSULA */ +UPDATE creature_template SET ScriptName='boss_doomlord_kazzak' WHERE entry=18728; +UPDATE creature_template SET ScriptName='npc_aeranas' WHERE entry=17085; +UPDATE gameobject_template SET ScriptName='go_haaleshi_altar' WHERE entry=181606; +UPDATE creature_template SET ScriptName='npc_ancestral_wolf' WHERE entry=17077; +UPDATE creature_template SET ScriptName='npc_demoniac_scryer' WHERE entry=22258; +UPDATE creature_template SET ScriptName='npc_gryphoneer_windbellow' WHERE entry=20235; +UPDATE creature_template SET ScriptName='npc_naladu' WHERE entry=19361; +UPDATE creature_template SET ScriptName='npc_tracy_proudwell' WHERE entry=18266; +UPDATE creature_template SET ScriptName='npc_trollbane' WHERE entry=16819; +UPDATE creature_template SET ScriptName='npc_wing_commander_brack' WHERE entry=19401; +UPDATE creature_template SET ScriptName='npc_wing_commander_dabiree' WHERE entry=19409; +UPDATE creature_template SET ScriptName='npc_wounded_blood_elf' WHERE entry=16993; + +/* HILLSBRAD FOOTHILLS */ + + +/* HINTERLANDS */ +UPDATE creature_template SET ScriptName='npc_00x09hl' WHERE entry=7806; +UPDATE creature_template SET ScriptName='npc_rinji' WHERE entry=7780; + +/* HOWLING FJORD */ +UPDATE creature_template SET ScriptName='npc_deathstalker_razael' WHERE entry=23998; +UPDATE creature_template SET ScriptName='npc_dark_ranger_lyana' WHERE entry=23778; + + +/* ICECROWN */ +UPDATE creature_template SET ScriptName='npc_arete' WHERE entry=29344; + +/* IRONFORGE */ +UPDATE creature_template SET ScriptName='npc_royal_historian_archesonus' WHERE entry=8879; + +/* ISLE OF QUEL'DANAS */ +UPDATE creature_template SET ScriptName='npc_ayren_cloudbreaker' WHERE entry=25059; +UPDATE creature_template SET ScriptName='npc_converted_sentry' WHERE entry=24981; +UPDATE creature_template SET ScriptName='npc_unrestrained_dragonhawk' WHERE entry=25236; + +/* KARAZHAN */ +UPDATE instance_template SET script='instance_karazhan' WHERE map=532; +UPDATE creature_template SET ScriptName='boss_midnight' WHERE entry=16151; +UPDATE creature_template SET ScriptName='boss_attumen' WHERE entry=15550; +UPDATE creature_template SET ScriptName='boss_moroes' WHERE entry=15687; +UPDATE creature_template SET ScriptName='boss_maiden_of_virtue' WHERE entry=16457; +UPDATE creature_template SET ScriptName='boss_curator' WHERE entry=15691; +UPDATE creature_template SET ScriptName='boss_julianne' WHERE entry=17534; +UPDATE creature_template SET ScriptName='boss_romulo' WHERE entry=17533; +UPDATE creature_template SET ScriptName='boss_dorothee' WHERE entry=17535; +UPDATE creature_template SET ScriptName='boss_strawman' WHERE entry=17543; +UPDATE creature_template SET ScriptName='boss_tinhead' WHERE entry=17547; +UPDATE creature_template SET ScriptName='mob_tito' WHERE entry=17548; +UPDATE creature_template SET ScriptName='boss_roar' WHERE entry=17546; +UPDATE creature_template SET ScriptName='boss_crone' WHERE entry=18168; +UPDATE creature_template SET ScriptName='boss_terestian_illhoof' WHERE entry=15688; +UPDATE creature_template SET ScriptName='boss_shade_of_aran' WHERE entry=16524; +-- UPDATE creature_template SET ScriptName='boss_netherspite' WHERE entry=15689; +UPDATE creature_template SET ScriptName='boss_malchezaar' WHERE entry=15690; +-- UPDATE creature_template SET ScriptName='boss_nightbane' WHERE entry=17225; +UPDATE creature_template SET ScriptName='boss_baroness_dorothea_millstipe' WHERE entry=19875; +UPDATE creature_template SET ScriptName='boss_baron_rafe_dreuger' WHERE entry=19874; +UPDATE creature_template SET ScriptName='boss_lady_catriona_von_indi' WHERE entry=19872; +UPDATE creature_template SET ScriptName='boss_lady_keira_berrybuck' WHERE entry=17007; +UPDATE creature_template SET ScriptName='boss_lord_robin_daris' WHERE entry=19876; +UPDATE creature_template SET ScriptName='boss_lord_crispin_ference' WHERE entry=19873; +UPDATE creature_template SET ScriptName='boss_bigbadwolf' WHERE entry=17521; +UPDATE creature_template SET ScriptName='mob_shadow_of_aran' WHERE entry=18254; +UPDATE creature_template SET ScriptName='mob_aran_elemental' WHERE entry=17167; +UPDATE creature_template SET ScriptName='mob_kilrek' WHERE entry=17229; +UPDATE creature_template SET ScriptName='mob_demon_chain' WHERE entry=17248; +UPDATE creature_template SET ScriptName='mob_karazhan_imp' WHERE entry=17267; +UPDATE creature_template SET ScriptName='mob_cyclone' WHERE entry=18412; +UPDATE creature_template SET ScriptName='netherspite_infernal' WHERE entry=17646; +UPDATE creature_template SET ScriptName='npc_berthold' WHERE entry=16153; +UPDATE creature_template SET ScriptName='npc_barnes' WHERE entry=16812; +UPDATE creature_template SET ScriptName='npc_grandmother' WHERE entry=17603; + +/* LOCH MODAN */ +UPDATE creature_template SET ScriptName='npc_mountaineer_pebblebitty' WHERE entry=3836; + +/* MAGISTER'S TERRACE */ +UPDATE instance_template SET script='instance_magisters_terrace' WHERE map=585; +UPDATE creature_template SET ScriptName='boss_selin_fireheart' WHERE entry=24723; +UPDATE creature_template SET ScriptName='mob_fel_crystal' WHERE entry=24722; +UPDATE creature_template SET ScriptName='boss_vexallus' WHERE entry=24744; +UPDATE creature_template SET ScriptName='mob_pure_energy' WHERE entry=24745; +UPDATE creature_template SET ScriptName='boss_priestess_delrissa' WHERE entry=24560; +UPDATE creature_template SET ScriptName='boss_kagani_nightstrike' WHERE entry=24557; +UPDATE creature_template SET ScriptName='boss_ellris_duskhallow' WHERE entry=24558; +UPDATE creature_template SET ScriptName='boss_eramas_brightblaze' WHERE entry=24554; +UPDATE creature_template SET ScriptName='boss_yazzai' WHERE entry=24561; +UPDATE creature_template SET ScriptName='boss_warlord_salaris' WHERE entry=24559; +UPDATE creature_template SET ScriptName='boss_garaxxas' WHERE entry=24555; +-- UPDATE creature_template SET ScriptName='mob_sliver' WHERE entry=24552; +UPDATE creature_template SET ScriptName='boss_apoko' WHERE entry=24553; +UPDATE creature_template SET ScriptName='boss_zelfan' WHERE entry=24556; +UPDATE creature_template SET ScriptName='boss_felblood_kaelthas' WHERE entry=24664; +UPDATE creature_template SET ScriptName='mob_arcane_sphere' WHERE entry=24708; +UPDATE creature_template SET ScriptName='mob_felkael_phoenix' WHERE entry=24674; +UPDATE creature_template SET ScriptName='mob_felkael_phoenix_egg' WHERE entry=24675; +UPDATE creature_template SET ScriptName='npc_kalecgos' WHERE entry IN (24844, 24848); + +/* MARAUDON */ +UPDATE creature_template SET ScriptName='boss_princess_theradras' WHERE entry=12201; +UPDATE creature_template SET ScriptName='boss_noxxion' WHERE entry=13282; +UPDATE creature_template SET ScriptName='boss_landslide' WHERE entry=12203; +UPDATE creature_template SET ScriptName='celebras_the_cursed' WHERE entry=12225; + +/* MOLTEN CORE */ +UPDATE instance_template SET script='instance_molten_core' WHERE map=409; +UPDATE creature_template SET ScriptName='boss_lucifron' WHERE entry=12118; +UPDATE creature_template SET ScriptName='boss_magmadar' WHERE entry=11982; +UPDATE creature_template SET ScriptName='boss_gehennas' WHERE entry=12259; +UPDATE creature_template SET ScriptName='boss_garr' WHERE entry=12057; +UPDATE creature_template SET ScriptName='boss_baron_geddon' WHERE entry=12056; +UPDATE creature_template SET ScriptName='boss_shazzrah' WHERE entry=12264; +UPDATE creature_template SET ScriptName='boss_golemagg' WHERE entry=11988; +UPDATE creature_template SET ScriptName='boss_sulfuron' WHERE entry=12098; +UPDATE creature_template SET ScriptName='boss_majordomo' WHERE entry=12018; +UPDATE creature_template SET ScriptName='boss_ragnaros' WHERE entry=11502; +UPDATE creature_template SET ScriptName='mob_ancient_core_hound' WHERE entry=11673; +UPDATE creature_template SET ScriptName='mob_firesworn' WHERE entry=12099; +UPDATE creature_template SET ScriptName='mob_core_rager' WHERE entry=11672; +UPDATE creature_template SET ScriptName='mob_flamewaker_priest' WHERE entry=11662; + +/* MOONGLADE */ +UPDATE creature_template SET ScriptName='npc_bunthen_plainswind' WHERE entry=11798; +UPDATE creature_template SET ScriptName='npc_clintar_dw_spirit' WHERE entry=22916; +UPDATE creature_template SET ScriptName='npc_great_bear_spirit' WHERE entry=11956; +UPDATE creature_template SET ScriptName='npc_silva_filnaveth' WHERE entry=11800; + +/* MULGORE */ +UPDATE creature_template SET ScriptName='npc_kyle_the_frenzied' WHERE entry=23616; +UPDATE creature_template SET ScriptName='npc_skorn_whitecloud' WHERE entry=3052; + +/* NAGRAND */ +UPDATE creature_template SET ScriptName='mob_lump' WHERE entry=18351; +UPDATE creature_template SET ScriptName='mob_shattered_rumbler' WHERE entry=17157; +UPDATE creature_template SET ScriptName='mob_sunspring_villager' WHERE entry=18240; +UPDATE creature_template SET ScriptName='npc_altruis_the_sufferer' WHERE entry=18417; +UPDATE creature_template SET ScriptName='npc_greatmother_geyah' WHERE entry=18141; +UPDATE creature_template SET ScriptName='npc_lantresor_of_the_blade' WHERE entry=18261; +UPDATE creature_template SET ScriptName='npc_maghar_captive' WHERE entry=18210; +UPDATE creature_template SET ScriptName='npc_creditmarker_visit_with_ancestors' WHERE entry IN (18840,18841,18842,18843); + +/* NAXXRAMAS */ +UPDATE instance_template SET script='instance_naxxramas' WHERE map=533; +UPDATE creature_template SET ScriptName='boss_anubrekhan' WHERE entry=15956; +UPDATE creature_template SET ScriptName='boss_faerlina' WHERE entry=15953; +UPDATE creature_template SET ScriptName='boss_maexxna' WHERE entry=15952; +UPDATE creature_template SET ScriptName='boss_noth' WHERE entry=15954; +-- UPDATE creature_template SET ScriptName='boss_heigan' WHERE entry=15936; +UPDATE creature_template SET ScriptName='boss_loatheb' WHERE entry=16011; +UPDATE creature_template SET ScriptName='boss_razuvious' WHERE entry=16061; +-- UPDATE creature_template SET ScriptName='boss_gothik' WHERE entry=16060; +UPDATE creature_template SET ScriptName='boss_thane_korthazz' WHERE entry=16064; +UPDATE creature_template SET ScriptName='boss_sir_zeliek' WHERE entry=16063; +UPDATE creature_template SET ScriptName='boss_lady_blaumeux' WHERE entry=16065; +UPDATE creature_template SET ScriptName='boss_rivendare_naxx' WHERE entry=30549; +UPDATE creature_template SET ScriptName='boss_patchwerk' WHERE entry=16028; +-- UPDATE creature_template SET ScriptName='boss_grobbulus' WHERE entry=15931; +UPDATE creature_template SET ScriptName='boss_gluth' WHERE entry=15932; +-- UPDATE creature_template SET ScriptName='boss_thaddius' WHERE entry=15928; +-- UPDATE creature_template SET ScriptName='boss_stalagg' WHERE entry=15929; +-- UPDATE creature_template SET ScriptName='boss_feugen' WHERE entry=15930; +UPDATE creature_template SET ScriptName='boss_sapphiron' WHERE entry=15989; +-- UPDATE creature_template SET ScriptName='boss_kelthuzad' WHERE entry=15990; + +/* NETHERSTORM */ +DELETE FROM areatrigger_scripts WHERE entry=4497; +INSERT INTO areatrigger_scripts VALUES (4497,'at_commander_dawnforge'); +UPDATE gameobject_template SET ScriptName='go_manaforge_control_console' WHERE entry IN (183770,183956,184311,184312); +UPDATE creature_template SET ScriptName='npc_manaforge_control_console' WHERE entry IN (20209,20417,20418,20440); +UPDATE creature_template SET ScriptName='npc_commander_dawnforge' WHERE entry=19831; +UPDATE creature_template SET ScriptName='npc_protectorate_nether_drake' WHERE entry=20903; +UPDATE creature_template SET ScriptName='npc_veronia' WHERE entry=20162; + +/* */ +/* THE NEXUS */ +/* */ + +/* EYE OF ETERNITY */ + +/* NEXUS */ +UPDATE creature_template SET ScriptName='boss_anomalus' WHERE entry=26763; +UPDATE creature_template SET ScriptName='mob_chaotic_rift' WHERE entry=26918; +UPDATE creature_template SET ScriptName='boss_keristrasza' WHERE entry=26723; +UPDATE creature_template SET ScriptName='boss_ormorok' WHERE entry=26794; +UPDATE creature_template SET ScriptName='boss_telestra' WHERE entry=26731; +UPDATE gameobject_template SET ScriptName='go_containment_sphere' WHERE entry IN (188526, 188527, 188528); +UPDATE instance_template SET script='instance_nexus' WHERE map=576; + +/* OCULUS */ + + +/* OBSIDIAN SANCTUM */ +UPDATE instance_template SET script='instance_obsidian_sanctum' WHERE map=615; +UPDATE creature_template SET ScriptName='boss_sartharion' WHERE entry=28860; +UPDATE creature_template SET ScriptName='mob_vesperon' WHERE entry=30449; +UPDATE creature_template SET ScriptName='mob_shadron' WHERE entry=30451; +UPDATE creature_template SET ScriptName='mob_tenebron' WHERE entry=30452; +UPDATE creature_template SET ScriptName='mob_twilight_eggs' WHERE entry=30882; +UPDATE creature_template SET ScriptName='mob_twilight_whelp' WHERE entry IN (30890, 31214); +UPDATE creature_template SET ScriptName='mob_acolyte_of_shadron' WHERE entry=31218; +UPDATE creature_template SET ScriptName='mob_acolyte_of_vesperon' WHERE entry=31219; + +/* ONYXIA'S LAIR */ +UPDATE creature_template SET ScriptName='boss_onyxia' WHERE entry=10184; + +/* ORGRIMMAR */ +UPDATE creature_template SET ScriptName='npc_neeru_fireblade' WHERE entry=3216; +UPDATE creature_template SET ScriptName='npc_shenthul' WHERE entry=3401; +UPDATE creature_template SET ScriptName='npc_thrall_warchief' WHERE entry=4949; + +/* RAGEFIRE CHASM */ + + +/* RAZORFEN DOWNS */ +UPDATE creature_template SET ScriptName='boss_amnennar_the_coldbringer' WHERE entry=7358; +UPDATE creature_template SET ScriptName='npc_henry_stern' WHERE entry=8696; + +/* REDRIDGE MOUNTAINS */ + + +/* RUINS OF AHN'QIRAJ */ +-- UPDATE instance_template SET script='instance_ruins_of_ahnqiraj' WHERE map=509; + +/* SCARLET MONASTERY */ +UPDATE instance_template SET script='instance_scarlet_monastery' WHERE map=189; +UPDATE creature_template SET ScriptName='boss_arcanist_doan' WHERE entry=6487; +UPDATE creature_template SET ScriptName='boss_azshir_the_sleepless' WHERE entry=6490; +UPDATE creature_template SET ScriptName='boss_bloodmage_thalnos' WHERE entry=4543; +UPDATE creature_template SET ScriptName='boss_herod' WHERE entry=3975; +UPDATE creature_template SET ScriptName='boss_high_inquisitor_fairbanks' WHERE entry=4542; +UPDATE creature_template SET ScriptName='boss_high_inquisitor_whitemane' WHERE entry=3977; +UPDATE creature_template SET ScriptName='boss_houndmaster_loksey' WHERE entry=3974; +UPDATE creature_template SET ScriptName='boss_interrogator_vishas' WHERE entry=3983; +UPDATE creature_template SET ScriptName='boss_scarlet_commander_mograine' WHERE entry=3976; +UPDATE creature_template SET ScriptName='boss_scorn' WHERE entry=14693; +UPDATE creature_template SET ScriptName='mob_scarlet_trainee' WHERE entry=6575; +UPDATE creature_template SET ScriptName='boss_headless_horseman' WHERE entry=23682; + +/* SCHOLOMANCE */ +UPDATE instance_template SET script='instance_scholomance' WHERE map=289; +UPDATE creature_template SET ScriptName='boss_darkmaster_gandling' WHERE entry=1853; +UPDATE creature_template SET ScriptName='boss_death_knight_darkreaver' WHERE entry=14516; +UPDATE creature_template SET ScriptName='boss_lord_alexei_barov' WHERE entry=10504; +UPDATE creature_template SET ScriptName='boss_instructor_malicia' WHERE entry=10505; +UPDATE creature_template SET ScriptName='boss_boss_ras_frostwhisper' WHERE entry=10508; +UPDATE creature_template SET ScriptName='boss_the_ravenian' WHERE entry=10507; +UPDATE creature_template SET ScriptName='boss_vectus' WHERE entry=10432; +UPDATE creature_template SET ScriptName='boss_illucia_barov' WHERE entry=10502; +UPDATE creature_template SET ScriptName='boss_doctor_theolen_krastinov' WHERE entry=11261; +UPDATE creature_template SET ScriptName='boss_jandice_barov' WHERE entry=10503; +UPDATE creature_template SET ScriptName='boss_lorekeeper_polkelt' WHERE entry=10901; +UPDATE creature_template SET ScriptName='boss_kormok' WHERE entry=16118; +UPDATE creature_template SET ScriptName='mob_illusionofjandicebarov' WHERE entry=11439; + +/* SEARING GORGE */ +UPDATE creature_template SET ScriptName='npc_kalaran_windblade' WHERE entry=8479; +UPDATE creature_template SET ScriptName='npc_lothos_riftwaker' WHERE entry=14387; +UPDATE creature_template SET ScriptName='npc_zamael_lunthistle' WHERE entry=8436; + +/* SHADOWFANG KEEP */ +UPDATE instance_template SET script='instance_shadowfang_keep' WHERE map=33; +UPDATE creature_template SET ScriptName='npc_shadowfang_prisoner' WHERE entry IN (3849,3850); + +/* SHADOWMOON VALLEY */ +UPDATE creature_template SET ScriptName='boss_doomwalker' WHERE entry=17711; +UPDATE creature_template SET ScriptName='npc_drake_dealer_hurlunk' WHERE entry=23489; +UPDATE creature_template SET ScriptName='npcs_flanis_swiftwing_and_kagrosh' WHERE entry IN (21725,21727); +UPDATE creature_template SET ScriptName='npc_murkblood_overseer' WHERE entry=23309; +UPDATE creature_template SET ScriptName='npc_neltharaku' WHERE entry=21657; +UPDATE creature_template SET ScriptName='npc_oronok_tornheart' WHERE entry=21183; +UPDATE creature_template SET ScriptName='mob_mature_netherwing_drake' WHERE entry=21648; +UPDATE creature_template SET ScriptName='mob_enslaved_netherwing_drake' WHERE entry=21722; +UPDATE creature_template SET ScriptName='npc_karynaku' WHERE entry=22112; +UPDATE creature_template SET ScriptName='npc_wilda' WHERE entry=21027; +UPDATE creature_template SET ScriptName='mob_torloth' WHERE entry=22076; +UPDATE creature_template SET ScriptName='npc_lord_illidan_stormrage' WHERE entry=22083; +UPDATE gameobject_template SET ScriptName='go_crystal_prison' WHERE entry=185126; + +/* SHATTRATH */ +UPDATE creature_template SET ScriptName='npc_dirty_larry' WHERE entry=19720; +UPDATE creature_template SET ScriptName='npc_ishanah' WHERE entry=18538; +UPDATE creature_template SET ScriptName='npc_khadgar' WHERE entry=18166; +UPDATE creature_template SET ScriptName='npc_khadgars_servant' WHERE entry=19685; +UPDATE creature_template SET ScriptName='npc_raliq_the_drunk' WHERE entry=18585; +UPDATE creature_template SET ScriptName='npc_salsalabim' WHERE entry=18584; +UPDATE creature_template SET ScriptName='npc_shattrathflaskvendors' WHERE entry IN (23483,23484); +UPDATE creature_template SET ScriptName='npc_zephyr' WHERE entry=25967; + +/* SHOLAZAR BASIN */ +UPDATE creature_template SET ScriptName='npc_vekjik' WHERE entry=28315; + +/* SILITHUS */ +UPDATE creature_template SET ScriptName='npc_highlord_demitrian' WHERE entry=14347; +UPDATE creature_template SET ScriptName='npcs_rutgar_and_frankal' WHERE entry IN (15170,15171); + +/* SILVERMOON */ +UPDATE creature_template SET ScriptName='npc_blood_knight_stillblade' WHERE entry=17768; + +/* SILVERPINE FOREST */ +UPDATE creature_template SET ScriptName='npc_astor_hadren' WHERE entry=6497; +UPDATE creature_template SET ScriptName='npc_deathstalker_erland' WHERE entry=1978; + +/* STOCKADES */ + +/* STONETALON MOUNTAINS */ +UPDATE creature_template SET ScriptName='npc_braug_dimspirit' WHERE entry=4489; +UPDATE creature_template SET ScriptName='npc_kaya' WHERE entry=11856; + +/* STORM PEAKS */ +UPDATE creature_template SET ScriptName='npc_loklira_the_crone' WHERE entry=29975; +UPDATE creature_template SET ScriptName='npc_thorim' WHERE entry=29445; +UPDATE creature_template SET ScriptName='npc_roxi_ramrocket' WHERE entry=31247; + +/* STORMWIND CITY */ +UPDATE creature_template SET ScriptName='npc_archmage_malin' WHERE entry=2708; +UPDATE creature_template SET ScriptName='npc_bartleby' WHERE entry=6090; +UPDATE creature_template SET ScriptName='npc_dashel_stonefist' WHERE entry=4961; +UPDATE creature_template SET ScriptName='npc_lady_katrana_prestor' WHERE entry=1749; + +/* STRANGLETHORN VALE */ +UPDATE creature_template SET ScriptName='mob_yenniku' WHERE entry=2530; + +/* STRATHOLME */ +UPDATE instance_template SET script='instance_stratholme' WHERE map=329; +UPDATE creature_template SET ScriptName='boss_dathrohan_balnazzar' WHERE entry=10812; +UPDATE creature_template SET ScriptName='boss_magistrate_barthilas' WHERE entry=10435; +UPDATE creature_template SET ScriptName='boss_maleki_the_pallid' WHERE entry=10438; +UPDATE creature_template SET ScriptName='boss_nerubenkan' WHERE entry=10437; +UPDATE creature_template SET ScriptName='boss_cannon_master_willey' WHERE entry=10997; +UPDATE creature_template SET ScriptName='boss_baroness_anastari' WHERE entry=10436; +UPDATE creature_template SET ScriptName='boss_ramstein_the_gorger' WHERE entry=10439; +UPDATE creature_template SET ScriptName='boss_timmy_the_cruel' WHERE entry=10808; +UPDATE creature_template SET ScriptName='boss_silver_hand_bosses' WHERE entry IN (17910,17911,17912,17913,17914); +UPDATE creature_template SET ScriptName='boss_postmaster_malown' WHERE entry=11143; +UPDATE creature_template SET ScriptName='boss_baron_rivendare' WHERE entry=10440; +UPDATE creature_template SET ScriptName='mobs_spectral_ghostly_citizen' WHERE entry IN (10384,10385); +UPDATE creature_template SET ScriptName='mob_restless_soul' WHERE entry=11122; +UPDATE creature_template SET ScriptName='mob_freed_soul' WHERE entry=11136; +UPDATE gameobject_template SET ScriptName='go_gauntlet_gate' WHERE entry=175357; + +/* SUNKEN TEMPLE */ + + +/* SUNWELL PLATEAU */ +UPDATE instance_template SET script='instance_sunwell_plateau' WHERE map=580; +UPDATE creature_template SET ScriptName='boss_brutallus' WHERE entry=24882; +UPDATE creature_template SET ScriptName='boss_kalecgos' WHERE entry=24850; +UPDATE creature_template SET ScriptName='boss_kalecgos_humanoid' WHERE entry=24891; +UPDATE creature_template SET ScriptName='boss_sathrovarr' WHERE entry=24892; +UPDATE gameobject_template SET ScriptName='go_spectral_rift' WHERE entry=187055; +DELETE FROM areatrigger_scripts WHERE entry=4853; +INSERT INTO areatrigger_scripts VALUES (4853,'at_madrigosa'); + +/* SWAMP OF SORROWS */ + + +/* TANARIS */ +UPDATE creature_template SET ScriptName='mob_aquementas' WHERE entry=9453; +UPDATE creature_template SET ScriptName='npc_custodian_of_time' WHERE entry=20129; +UPDATE creature_template SET ScriptName='npc_marin_noggenfogger' WHERE entry=7564; +UPDATE creature_template SET ScriptName='npc_oox17tn' WHERE entry=7784; +UPDATE creature_template SET ScriptName='npc_steward_of_time' WHERE entry=20142; +UPDATE creature_template SET ScriptName='npc_stone_watcher_of_norgannon' WHERE entry=7918; +UPDATE creature_template SET ScriptName='npc_tooga' WHERE entry=5955; + +/* TELDRASSIL */ +UPDATE creature_template SET ScriptName='npc_mist' WHERE entry=3568; + +/* */ +/* TEMPEST KEEP */ +/* */ + +/* THE MECHANAR */ +UPDATE creature_template SET ScriptName='boss_gatewatcher_iron_hand' WHERE entry=19710; +UPDATE creature_template SET ScriptName='boss_nethermancer_sepethrea' WHERE entry=19221; +UPDATE creature_template SET ScriptName='mob_ragin_flames' WHERE entry=20481; +UPDATE creature_template SET ScriptName='boss_pathaleon_the_calculator' WHERE entry=19220; +UPDATE creature_template SET ScriptName='mob_nether_wraith' WHERE entry=21062; +UPDATE instance_template SET script='instance_mechanar' WHERE map=554; + +/* THE BOTANICA */ +UPDATE creature_template SET ScriptName='boss_high_botanist_freywinn' WHERE entry=17975; +UPDATE creature_template SET ScriptName='boss_laj' WHERE entry=17980; +UPDATE creature_template SET ScriptName='boss_warp_splinter' WHERE entry=17977; +UPDATE creature_template SET ScriptName='mob_warp_splinter_treant' WHERE entry=19949; + +/* THE ARCATRAZ */ +UPDATE instance_template SET script='instance_arcatraz' WHERE map=552; +UPDATE creature_template SET ScriptName='mob_zerekethvoidzone' WHERE entry=21101; +UPDATE creature_template SET ScriptName='boss_harbinger_skyriss' WHERE entry=20912; +UPDATE creature_template SET ScriptName='boss_harbinger_skyriss_illusion' WHERE entry IN (21466,21467); +UPDATE creature_template SET ScriptName='npc_warden_mellichar' WHERE entry=20904; +UPDATE creature_template SET ScriptName='npc_millhouse_manastorm' WHERE entry=20977; + +/* THE EYE */ +UPDATE instance_template SET script='instance_the_eye' WHERE map=550; +/* The Eye Trash Mobs */ +UPDATE creature_template SET ScriptName='mob_crystalcore_devastator' WHERE entry=20040; +/* Void Reaver event */ +UPDATE creature_template SET ScriptName='boss_void_reaver' WHERE entry=19516; +/* Astromancer event */ +UPDATE creature_template SET ScriptName='boss_high_astromancer_solarian' WHERE entry=18805; +UPDATE creature_template SET ScriptName='mob_solarium_priest' WHERE entry=18806; +/* Kael'thas event */ +UPDATE creature_template SET ScriptName='boss_kaelthas' WHERE entry=19622; +UPDATE creature_template SET ScriptName='boss_thaladred_the_darkener' WHERE entry=20064; +UPDATE creature_template SET ScriptName='boss_lord_sanguinar' WHERE entry=20060; +UPDATE creature_template SET ScriptName='boss_grand_astromancer_capernian' WHERE entry=20062; +UPDATE creature_template SET ScriptName='boss_master_engineer_telonicus' WHERE entry=20063; +UPDATE creature_template SET ScriptName='mob_phoenix_tk' WHERE entry=21362; +UPDATE creature_template SET ScriptName='mob_phoenix_egg_tk' WHERE entry=21364; + +/* TEMPLE OF AHN'QIRAJ */ +UPDATE instance_template SET script='instance_temple_of_ahnqiraj' WHERE map=531; +UPDATE creature_template SET ScriptName='boss_cthun' WHERE entry=15727; +UPDATE creature_template SET ScriptName='boss_skeram' WHERE entry=15263; +UPDATE creature_template SET ScriptName='boss_vem' WHERE entry=15544; +UPDATE creature_template SET ScriptName='boss_yauj' WHERE entry=15543; +UPDATE creature_template SET ScriptName='boss_kri' WHERE entry=15511; +UPDATE creature_template SET ScriptName='boss_sartura' WHERE entry=15516; +UPDATE creature_template SET ScriptName='boss_fankriss' WHERE entry=15510; +-- UPDATE creature_template SET ScriptName='boss_viscidus' WHERE entry=15299; +-- UPDATE creature_template SET ScriptName='boss_glob_of_viscidus' WHERE entry=15667; +UPDATE creature_template SET ScriptName='boss_huhuran' WHERE entry=15509; +UPDATE creature_template SET ScriptName='boss_veklor' WHERE entry=15276; +UPDATE creature_template SET ScriptName='boss_veknilash' WHERE entry=15275; +UPDATE creature_template SET ScriptName='boss_ouro' WHERE entry=15517; +UPDATE creature_template SET ScriptName='boss_eye_of_cthun' WHERE entry=15589; +UPDATE creature_template SET ScriptName='mob_sartura_royal_guard' WHERE entry=15984; +UPDATE creature_template SET ScriptName='mob_claw_tentacle' WHERE entry=15725; +UPDATE creature_template SET ScriptName='mob_eye_tentacle' WHERE entry=15726; +UPDATE creature_template SET ScriptName='mob_giant_claw_tentacle' WHERE entry=15728; +UPDATE creature_template SET ScriptName='mob_giant_eye_tentacle' WHERE entry=15334; +UPDATE creature_template SET ScriptName='mob_giant_flesh_tentacle' WHERE entry=15802; +UPDATE creature_template SET ScriptName='mob_anubisath_sentinel' WHERE entry=15264; + +/* TEROKKAR FOREST */ +UPDATE creature_template SET ScriptName='mob_infested_root_walker' WHERE entry=22095; +UPDATE creature_template SET ScriptName='mob_netherweb_victim' WHERE entry=22355; +UPDATE creature_template SET ScriptName='mob_rotting_forest_rager' WHERE entry=22307; +UPDATE creature_template SET ScriptName='mob_unkor_the_ruthless' WHERE entry=18262; +UPDATE creature_template SET ScriptName='npc_akuno' WHERE entry=22377; +UPDATE creature_template SET ScriptName='npc_floon' WHERE entry=18588; +UPDATE creature_template SET ScriptName='npc_letoll' WHERE entry=22458; +UPDATE creature_template SET ScriptName='npc_mana_bomb_exp_trigger' WHERE entry=20767; +UPDATE gameobject_template SET ScriptName='go_mana_bomb' WHERE entry=184725; +UPDATE creature_template SET ScriptName='npc_skyguard_handler_irena' WHERE entry=23413; +UPDATE creature_template SET ScriptName='npc_slim' WHERE entry=19679; + +/* THOUSAND NEEDLES */ +UPDATE creature_template SET ScriptName='npc_kanati' WHERE entry=10638; +UPDATE creature_template SET ScriptName='npc_plucky_johnson' WHERE entry=6626; +UPDATE creature_template SET ScriptName='npc_paoka_swiftmountain' WHERE entry=10427; +UPDATE creature_template SET ScriptName='npc_lakota_windsong' WHERE entry=10646; + +/* THUNDER BLUFF */ +UPDATE creature_template SET ScriptName='npc_cairne_bloodhoof' WHERE entry=3057; + +/* TIRISFAL GLADES */ +UPDATE gameobject_template SET ScriptName='go_mausoleum_trigger' WHERE entry=104593; +UPDATE gameobject_template SET ScriptName='go_mausoleum_door' WHERE entry=176594; +UPDATE creature_template SET ScriptName='npc_calvin_montague' WHERE entry=6784; + +/* ULDAMAN */ +UPDATE creature_template SET ScriptName='boss_ironaya' WHERE entry=7228; +UPDATE creature_template SET ScriptName='mob_jadespine_basilisk' WHERE entry=4863; +UPDATE creature_template SET ScriptName='npc_lore_keeper_of_norgannon' WHERE entry=7172; + +/* */ +/* ULDUAR */ +/* */ + +/* HALLS OF LIGHTNING */ +UPDATE instance_template SET script='instance_halls_of_lightning' WHERE map=602; +UPDATE creature_template SET ScriptName='boss_bjarngrim' WHERE entry=28586; +UPDATE creature_template SET ScriptName='mob_stormforged_lieutenant' WHERE entry=29240; +UPDATE creature_template SET ScriptName='boss_volkhan' WHERE entry=28587; +UPDATE creature_template SET ScriptName='mob_molten_golem' WHERE entry=28695; +UPDATE creature_template SET ScriptName='npc_volkhan_anvil' WHERE entry=28823; +UPDATE creature_template SET ScriptName='boss_ionar' WHERE entry=28546; +UPDATE creature_template SET ScriptName='mob_spark_of_ionar' WHERE entry=28926; +UPDATE creature_template SET ScriptName='boss_loken' WHERE entry=28923; + +/* HALLS OF STONE */ +UPDATE creature_template SET ScriptName='boss_maiden_of_grief' WHERE entry=27975; +UPDATE creature_template SET ScriptName='boss_sjonnir' WHERE entry=27978; +UPDATE creature_template SET ScriptName='npc_brann_hos' WHERE entry=28070; + +/* ULDUAR */ +UPDATE instance_template SET script='instance_ulduar' WHERE map=603; + +/* UN'GORO CRATER */ +UPDATE creature_template SET ScriptName='npc_ame01' WHERE entry=9623; +UPDATE creature_template SET ScriptName='npc_ringo' WHERE entry=9999; + +/* UNDERCITY */ +UPDATE creature_template SET ScriptName='npc_lady_sylvanas_windrunner' WHERE entry=10181; +UPDATE creature_template SET ScriptName='npc_highborne_lamenter' WHERE entry=21628; +UPDATE creature_template SET ScriptName='npc_parqual_fintallas' WHERE entry=4488; + +/* */ +/* UTGARDE KEEP */ +/* */ + +/* UTGARDE KEEP */ +UPDATE instance_template SET script='instance_utgarde_keep' WHERE map=574; +UPDATE creature_template SET ScriptName='mob_dragonflayer_forge_master' WHERE entry=24079; +UPDATE creature_template SET ScriptName='boss_skarvald' WHERE entry=24200; +UPDATE creature_template SET ScriptName='boss_dalronn' WHERE entry=24201; +UPDATE creature_template SET ScriptName='boss_ingvar' WHERE entry=23954; +UPDATE creature_template SET ScriptName='npc_annhylde' WHERE entry=24068; +UPDATE creature_template SET ScriptName='boss_keleseth' WHERE entry=23953; +UPDATE creature_template SET ScriptName='mob_vrykul_skeleton' WHERE entry=23970; + +/* UTGARDE PINNACLE */ +UPDATE creature_template SET ScriptName='boss_gortok' WHERE entry=26687; +UPDATE creature_template SET ScriptName='boss_skadi' WHERE entry=26693; +UPDATE creature_template SET ScriptName='boss_svala' WHERE entry=29281; +DELETE FROM areatrigger_scripts WHERE entry=5140; +INSERT INTO areatrigger_scripts VALUES (5140,'at_svala_intro'); +UPDATE creature_template SET ScriptName='boss_ymiron' WHERE entry=26861; +UPDATE instance_template SET script='instance_pinnacle' WHERE map=575; + +/* VAULT OF ARCHAVON */ + + +/* VIOLET HOLD */ + + +/* WAILING CAVERNS */ + + +/* WESTERN PLAGUELANDS */ +UPDATE creature_template SET ScriptName='npcs_dithers_and_arbington' WHERE entry IN (11056,11057); +UPDATE creature_template SET ScriptName='npc_myranda_the_hag' WHERE entry=11872; +UPDATE creature_template SET ScriptName='npc_the_scourge_cauldron' WHERE entry=11152; + +/* WESTFALL */ +UPDATE creature_template SET ScriptName='npc_daphne_stilwell' WHERE entry=6182; +UPDATE creature_template SET ScriptName='npc_defias_traitor' WHERE entry=467; + +/* WETLANDS */ +UPDATE creature_template SET ScriptName='npc_tapoke_slim_jahn' WHERE entry=4962; +UPDATE creature_template SET ScriptName='npc_mikhail' WHERE entry=4963; + +/* WINTERSPRING */ +UPDATE creature_template SET ScriptName='npc_lorax' WHERE entry=10918; +UPDATE creature_template SET ScriptName='npc_rivern_frostwind' WHERE entry=10618; +UPDATE creature_template SET ScriptName='npc_witch_doctor_mauari' WHERE entry=10307; + +/* ZANGARMARSH */ +UPDATE creature_template SET ScriptName='npcs_ashyen_and_keleth' WHERE entry IN (17900,17901); +UPDATE creature_template SET ScriptName='npc_cooshcoosh' WHERE entry=18586; +UPDATE creature_template SET ScriptName='npc_elder_kuruti' WHERE entry=18197; +UPDATE creature_template SET ScriptName='npc_kayra_longmane' WHERE entry=17969; +UPDATE creature_template SET ScriptName='npc_mortog_steamhead' WHERE entry=23373; +UPDATE creature_template SET ScriptName='npc_timothy_daniels' WHERE entry=18019; + +/* ZUL'AMAN */ +UPDATE instance_template SET script='instance_zulaman' WHERE map=568; +UPDATE creature_template SET ScriptName='npc_harrison_jones_za' WHERE entry=24358; +UPDATE gameobject_template SET ScriptName='go_strange_gong' WHERE entry=187359; +UPDATE creature_template SET ScriptName='boss_akilzon' WHERE entry=23574; +UPDATE creature_template SET ScriptName='mob_soaring_eagle' WHERE entry=24858; +UPDATE creature_template SET ScriptName='boss_halazzi' WHERE entry=23577; +UPDATE creature_template SET ScriptName='boss_spirit_lynx' WHERE entry=24143; +UPDATE creature_template SET ScriptName='boss_janalai' WHERE entry=23578; +UPDATE creature_template SET ScriptName='boss_malacrass' WHERE entry=24239; +UPDATE creature_template SET ScriptName='mob_alyson_antille' WHERE entry=24240; +UPDATE creature_template SET ScriptName='mob_thurg' WHERE entry=24241; +UPDATE creature_template SET ScriptName='mob_slither' WHERE entry=24242; +UPDATE creature_template SET ScriptName='mob_lord_raadan' WHERE entry=24243; +UPDATE creature_template SET ScriptName='mob_gazakroth' WHERE entry=24244; +UPDATE creature_template SET ScriptName='mob_fenstalker' WHERE entry=24245; +UPDATE creature_template SET ScriptName='mob_darkheart' WHERE entry=24246; +UPDATE creature_template SET ScriptName='mob_koragg' WHERE entry=24247; +UPDATE creature_template SET ScriptName='boss_nalorakk' WHERE entry=23576; +UPDATE creature_template SET ScriptName='boss_zuljin' WHERE entry=23863; +UPDATE creature_template SET ScriptName='mob_jandalai_firebomb' WHERE entry=23920; +UPDATE creature_template SET ScriptName='mob_amanishi_hatcher' WHERE entry IN (23818,24504); +UPDATE creature_template SET ScriptName='mob_hatchling' WHERE entry=23598; +UPDATE creature_template SET ScriptName='npc_forest_frog' WHERE entry=24396; + +/* ZUL'DRAK */ + + +/* ZUL'FARRAK */ +UPDATE creature_template SET ScriptName='npc_sergeant_bly' WHERE entry=7604; +UPDATE creature_template SET ScriptName='npc_weegli_blastfuse' WHERE entry=7607; + +/* ZUL'GURUB */ +UPDATE instance_template SET script='instance_zulgurub' WHERE map=309; +UPDATE creature_template SET ScriptName='boss_jeklik' WHERE entry=14517; +UPDATE creature_template SET ScriptName='boss_venoxis' WHERE entry=14507; +UPDATE creature_template SET ScriptName='boss_marli' WHERE entry=14510; +UPDATE creature_template SET ScriptName='boss_mandokir' WHERE entry=11382; +UPDATE creature_template SET ScriptName='mob_ohgan' WHERE entry=14988; +UPDATE creature_template SET ScriptName='boss_gahzranka' WHERE entry=15114; +UPDATE creature_template SET ScriptName='boss_jindo' WHERE entry=11380; +UPDATE creature_template SET ScriptName='boss_hakkar' WHERE entry=14834; +UPDATE creature_template SET ScriptName='boss_thekal' WHERE entry=14509; +UPDATE creature_template SET ScriptName='boss_arlokk' WHERE entry=14515; +UPDATE gameobject_template SET ScriptName='go_gong_of_bethekk' WHERE entry=180526; +UPDATE creature_template SET ScriptName='boss_grilek' WHERE entry=15082; +UPDATE creature_template SET ScriptName='boss_hazzarah' WHERE entry=15083; +UPDATE creature_template SET ScriptName='boss_renataki' WHERE entry=15084; +UPDATE creature_template SET ScriptName='boss_wushoolay' WHERE entry=15085; +UPDATE creature_template SET ScriptName='mob_zealot_lorkhan' WHERE entry=11347; +UPDATE creature_template SET ScriptName='mob_zealot_zath' WHERE entry=11348; +UPDATE creature_template SET ScriptName='mob_healing_ward' WHERE entry=14987; +UPDATE creature_template SET ScriptName='mob_spawn_of_marli' WHERE entry=15041; +UPDATE creature_template SET ScriptName='mob_batrider' WHERE entry=14965; +UPDATE creature_template SET ScriptName='mob_shade_of_jindo' WHERE entry=14986; + +/* EOF */ diff --git a/sql/old/mangos_old_spells.sql b/sql/old/mangos_old_spells.sql new file mode 100644 index 000000000..8419cacd2 --- /dev/null +++ b/sql/old/mangos_old_spells.sql @@ -0,0 +1,374 @@ +/* Old spell queries from Scriptdev revision 55. Not supported by scriptdev anylonger */ +/* To be used in ordinary database developement. Can be added in any changeset/revision as database developers sees fit */ + +UPDATE `creature_template` SET `spell1` = 116 WHERE `entry` = 946; +UPDATE `creature_template` SET `spell1` = 16415 WHERE `entry` = 4063; +UPDATE `creature_template` SET `spell1` = 205 WHERE `entry` = 1867; +UPDATE `creature_template` SET `spell1` = 705 WHERE `entry` = 1915; +UPDATE `creature_template` SET `spell1` = 145, `spell2` = 134 WHERE `entry` = 1914; +UPDATE `creature_template` SET `spell1` = 837, `spell2` = 122 WHERE `entry` = 1889; +UPDATE `creature_template` SET `spell1` = 8406, `spell2` = 865 WHERE `entry` = 314; +UPDATE `creature_template` SET `spell1` = 6041, `spell2` = 6364 WHERE `entry` = 2570; +UPDATE `creature_template` SET `spell1` = 8407, `spell2` = 12486 WHERE `entry` = 2567; +UPDATE `creature_template` SET `spell1` = 6041 WHERE `entry` = 697; +UPDATE `creature_template` SET `spell1` = 8402, `spell2` = 8423 WHERE `entry` = 1653; +UPDATE `creature_template` SET `spell1` = 8402 WHERE `entry` = 1562; +UPDATE `creature_template` SET `spell1` = 7641, `spell2` = 11707 WHERE `entry` = 1564; +UPDATE `creature_template` SET `spell1` = 1106 WHERE `entry` = 3218; +UPDATE `creature_template` SET `spell1` = 837 WHERE `entry` = 2591; +UPDATE `creature_template` SET `spell1` = 837 WHERE `entry` = 2255; +UPDATE `creature_template` SET `spell1` = 205 WHERE `entry` = 1539; +UPDATE `creature_template` SET `spell1` = 15264, `spell2` = 6060, `spell3` = 988 WHERE `entry` = 4299; +UPDATE `creature_template` SET `spell1` = 984, `spell2` = 1026 WHERE `entry` = 4296; +UPDATE `creature_template` SET `spell1` = 8438, `spell2` = 2601 WHERE `entry` = 4300; +UPDATE `creature_template` SET `spell1` = 1088, `spell2` = 992 WHERE `entry` = 533; +UPDATE `creature_template` SET `spell1` = 7322 WHERE `entry` = 203; +UPDATE `creature_template` SET `spell1` = 1106, `spell2` = 2941 WHERE `entry` = 2577; +UPDATE `creature_template` SET `spell1` = 548, `spell2` = 6535 WHERE `entry` = 3273; +UPDATE `creature_template` SET `spell1` = 529 WHERE `entry` = 1183; +UPDATE `creature_template` SET `spell1` = 992, `spell2` = 705 WHERE `entry` = 436; +UPDATE `creature_template` SET `spell1` = 5177 WHERE `entry` = 7235; +UPDATE `creature_template` SET `spell1` = 5177 WHERE `entry` = 2012; +UPDATE `creature_template` SET `spell1` = 403, `spell2` = 770 WHERE `entry` = 1397; +UPDATE `creature_template` SET `spell1` = 2136 WHERE `entry` = 1174; +UPDATE `creature_template` SET `spell1` = 143 WHERE `entry` = 2018; +UPDATE `creature_template` SET `spell1` = 915, `spell2` = 2606 WHERE `entry` = 1399; +UPDATE `creature_template` SET `spell1` = 915, `spell2` = 8293 WHERE `entry` = 3783; +UPDATE `creature_template` SET `spell1` = 984 WHERE `entry` = 3732; +UPDATE `creature_template` SET `spell1` = 13480 WHERE `entry` = 3725; +UPDATE `creature_template` SET `spell1` = 13480 WHERE `entry` = 3728; +UPDATE `creature_template` SET `spell1` = 9672, `spell2` = 7101 WHERE `entry` = 3662; +UPDATE `creature_template` SET `spell1` = 18089 WHERE `entry` = 2207; +UPDATE `creature_template` SET `spell1` = 8402, `spell2` = 10215 WHERE `entry` = 7026; +UPDATE `creature_template` SET `spell1` = 11659, `spell2` = 8402 WHERE `entry` = 7028; +UPDATE `creature_template` SET `spell1` = 7918, `spell2` = 6685 WHERE `entry` = 7038; +UPDATE `creature_template` SET `spell1` = 676, `spell2` = 53, `spell3` = 0 WHERE `entry` = 6866; +UPDATE `creature_template` SET `spell1` = 53, `spell2` = 0, `spell3` = 0 WHERE `entry` = 122; +UPDATE `creature_template` SET `spell1` = 71, `spell2` = 1671 WHERE `entry` = 449; +UPDATE `creature_template` SET `spell1` = 6554 WHERE `entry` = 121; +UPDATE `creature_template` SET `spell1` = 53 WHERE `entry` = 590; +UPDATE `creature_template` SET `spell1` = 12166 WHERE `entry` = 3232; +UPDATE `creature_template` SET `spell1` = 403 WHERE `entry` = 2953; +UPDATE `creature_template` SET `spell1` = 3385 WHERE `entry` = 2954; +UPDATE `creature_template` SET `spell1` = 15657, `spell2` = 17230, `spell3` = 16509, `spell4` = 0 WHERE `entry` = 1707; +UPDATE `creature_template` SET `spell1` = 6253, `spell2` = 16244, `spell3` = 8242, `spell4` = 16509 WHERE `entry` = 1711; +UPDATE `creature_template` SET `spell1` = 6547, `spell2` = 2590, `spell3` = 6253 WHERE `entry` = 1708; +UPDATE `creature_template` SET `spell1` = 11554, `spell2` = 8242, `spell3` = 6253 WHERE `entry` = 1715; +UPDATE `creature_template` SET `spell1` = 1768, `spell2` = 17230, `spell3` = 16509 WHERE `entry` = 1706; +UPDATE `creature_template` SET `spell1` = 5115 WHERE `entry` = 1729; +UPDATE `creature_template` SET `spell1` = 9915 WHERE `entry` = 1732; +UPDATE `creature_template` SET `spell1` = 143 WHERE `entry` = 1726; +UPDATE `creature_template` SET `spell1` = 143 WHERE `entry` = 619; +UPDATE `creature_template` SET `spell1` = 6660 WHERE `entry` = 657; +UPDATE `creature_template` SET `spell1` = 6660, `spell2` = 6685 WHERE `entry` = 4417; +UPDATE `creature_template` SET `spell1` = 6685 WHERE `entry` = 598; +UPDATE `creature_template` SET `spell1` = 6016 WHERE `entry` = 4416; +UPDATE `creature_template` SET `spell1` = 5115, `spell2` = 6435 WHERE `entry` = 594; +UPDATE `creature_template` SET `spell1` = 9915 WHERE `entry` = 634; +UPDATE `creature_template` SET `spell1` = 205 WHERE `entry` = 1725; +UPDATE `creature_template` SET `spell1` = 133, `spell2` = 205, `spell3` = 113 WHERE `entry` = 4418; +UPDATE `creature_template` SET `spell1` = 6136, `spell2` = 116 WHERE `entry` = 474; +UPDATE `creature_template` SET `spell1` = 3140, `spell2` = 12486, `spell3` = 3443 WHERE `entry` = 910; +UPDATE `creature_template` SET `spell1` = 744, `spell2` = 7992, `spell3` = 2590 WHERE `entry` = 909; +UPDATE `creature_template` SET `spell1` = 8646 WHERE `entry` = 116; +UPDATE `creature_template` SET `spell1` = 53 WHERE `entry` = 504; +UPDATE `creature_template` SET `spell1` = 2764 WHERE `entry` = 95; +UPDATE `creature_template` SET `spell1` = 53, `spell2` = 133 WHERE `entry` = 94; +UPDATE `creature_template` SET `spell1` = 168 WHERE `entry` = 589; +UPDATE `creature_template` SET `spell1` = 8382, `spell2` = 8733 WHERE `entry` = 4819; +UPDATE `creature_template` SET `spell1` = 6145, `spell2` = 71, `spell3` = 22691 WHERE `entry` = 4818; +UPDATE `creature_template` SET `spell1` = 14109, `spell2` = 3358, `spell3` = 8733, `spell4` = 12024 WHERE `entry` = 4820; +UPDATE `creature_template` SET `spell1` = 7357 WHERE `entry` = 4359; +UPDATE `creature_template` SET `spell1` = 7357 WHERE `entry` = 1024; +UPDATE `creature_template` SET `spell1` = 1777, `spell2` = 6533 WHERE `entry` = 1028; +UPDATE `creature_template` SET `spell1` = 10177 WHERE `entry` = 1418; +UPDATE `creature_template` SET `spell1` = 744, `spell2` = 1707 WHERE `entry` = 1026; +UPDATE `creature_template` SET `spell1` = 7372, `spell2` = 2457 WHERE `entry` = 1027; +UPDATE `creature_template` SET `spell1` = 15869 WHERE `entry` = 1029; +UPDATE `creature_template` SET `spell1` = 7357 WHERE `entry` = 747; +UPDATE `creature_template` SET `spell1` = 7357 WHERE `entry` = 171; +UPDATE `creature_template` SET `spell1` = 7357 WHERE `entry` = 544; +UPDATE `creature_template` SET `spell1` = 7357 WHERE `entry` = 545; +UPDATE `creature_template` SET `spell1` = 7357 WHERE `entry` = 578; +UPDATE `creature_template` SET `spell1` = 744, `spell2` = 865 WHERE `entry` = 127; +UPDATE `creature_template` SET `spell1` = 13519, `spell2` = 6074 WHERE `entry` = 517; +UPDATE `creature_template` SET `spell1` = 10277 WHERE `entry` = 458; +UPDATE `creature_template` SET `spell1` = 7357 WHERE `entry` = 126; +UPDATE `creature_template` SET `spell1` = 205, `spell2` = 331 WHERE `entry` = 548; +UPDATE `creature_template` SET `spell1` = 2589 WHERE `entry` = 732; +UPDATE `creature_template` SET `spell1` = 3368 WHERE `entry` = 46; +UPDATE `creature_template` SET `spell1` = 6268 WHERE `entry` = 1083; +UPDATE `creature_template` SET `spell1` = 3393 WHERE `entry` = 422; +UPDATE `creature_template` SET `spell1` = 3288 WHERE `entry` = 1011; +UPDATE `creature_template` SET `spell1` = 8016 WHERE `entry` = 1008; +UPDATE `creature_template` SET `spell1` = 8016 WHERE `entry` = 1007; +UPDATE `creature_template` SET `spell1` = 205 WHERE `entry` = 1009; +UPDATE `creature_template` SET `spell1` = 547, `spell2` = 548 WHERE `entry` = 1013; +UPDATE `creature_template` SET `spell1` = 744 WHERE `entry` = 434; +UPDATE `creature_template` SET `spell1` = 3150 WHERE `entry` = 433; +UPDATE `creature_template` SET `spell1` = 6205 WHERE `entry` = 432; +UPDATE `creature_template` SET `spell1` = 705 WHERE `entry` = 429; +UPDATE `creature_template` SET `spell1` = 71, `spell2` = 8380, `spell3` = 8629 WHERE `entry` = 568; +UPDATE `creature_template` SET `spell1` = 744 WHERE `entry` = 579; +UPDATE `creature_template` SET `spell1` = 6730, `spell2` = 6016 WHERE `entry` = 448; +UPDATE `creature_template` SET `spell1` = 6730, `spell2` = 6016 WHERE `entry` = 500; +UPDATE `creature_template` SET `spell1` = 8016, `spell2` = 0 WHERE `entry` = 123; +UPDATE `creature_template` SET `spell1` = 1160 WHERE `entry` = 124; +UPDATE `creature_template` SET `spell1` = 3368 WHERE `entry` = 501; +UPDATE `creature_template` SET `spell1` = 3237 WHERE `entry` = 1674; +UPDATE `creature_template` SET `spell1` = 3237 WHERE `entry` = 1772; +UPDATE `creature_template` SET `spell1` = 3237, `spell2` = 695 WHERE `entry` = 1773; +UPDATE `creature_template` SET `spell1` = 3237 WHERE `entry` = 1939; +UPDATE `creature_template` SET `spell1` = 3237 WHERE `entry` = 1940; +UPDATE `creature_template` SET `spell1` = 3237 WHERE `entry` = 1942; +UPDATE `creature_template` SET `spell1` = 3237 WHERE `entry` = 1944; +UPDATE `creature_template` SET `spell1` = 2480 WHERE `entry` = 3112; +UPDATE `creature_template` SET `spell1` = 5280 WHERE `entry` = 3111; +UPDATE `creature_template` SET `spell1` = 3248 WHERE `entry` = 3114; +UPDATE `creature_template` SET `spell1` = 6950, `spell2` = 774 WHERE `entry` = 3113; +UPDATE `creature_template` SET `spell1` = 548, `spell2` = 8045, `spell3` = 8052 WHERE `entry` = 3269; +UPDATE `creature_template` SET `spell1` = 594, `spell2` = 8092, `spell3` = 2052 WHERE `entry` = 3458; +UPDATE `creature_template` SET `spell1` = 594, `spell2` = 598, `spell3` = 8102, `spell4` = 6074 WHERE `entry` = 3271; +UPDATE `creature_template` SET `spell1` = 1978, `spell2` = 3044 WHERE `entry` = 3265; +UPDATE `creature_template` SET `spell1` = 13446, `spell2` = 12323, `spell3` = 13443 WHERE `entry` = 3459; +UPDATE `creature_template` SET `spell1` = 22356 WHERE `entry` = 3267; +UPDATE `creature_template` SET `spell1` = 3427 WHERE `entry` = 712; +UPDATE `creature_template` SET `spell1` = 5164 WHERE `entry` = 446; +UPDATE `creature_template` SET `spell1` = 331, `spell2` = 548 WHERE `entry` = 430; +UPDATE `creature_template` SET `spell1` = 7919 WHERE `entry` = 424; +UPDATE `creature_template` SET `spell1` = 3148 WHERE `entry` = 1115; +UPDATE `creature_template` SET `spell1` = 5164 WHERE `entry` = 1117; +UPDATE `creature_template` SET `spell1` = 53 WHERE `entry` = 1116; +UPDATE `creature_template` SET `spell1` = 5164 WHERE `entry` = 1118; +UPDATE `creature_template` SET `spell1` = 10277 WHERE `entry` = 1162; +UPDATE `creature_template` SET `spell1` = 529 WHERE `entry` = 1166; +UPDATE `creature_template` SET `spell1` = 1776 WHERE `entry` = 1163; +UPDATE `creature_template` SET `spell1` = 11976 WHERE `entry` = 1164; +UPDATE `creature_template` SET `spell1` = 331 WHERE `entry` = 1197; +UPDATE `creature_template` SET `spell1` = 2121 WHERE `entry` = 1165; +UPDATE `creature_template` SET `spell1` = 7405, `spell2` = 71 WHERE `entry` = 1167; +UPDATE `creature_template` SET `spell1` = 11660, `spell2` = 17926, `spell3` = 6215, `spell4` = 11672 WHERE `entry` = 1789; +UPDATE `creature_template` SET `spell1` = 348, `spell2` = 686 WHERE `entry` = 4473; +UPDATE `creature_template` SET `spell1` = 15580, `spell2` = 15613, `spell3` = 23600, `spell4` = 16406 WHERE `entry` = 10391; +UPDATE `creature_template` SET `spell1` = 3416 WHERE `entry` = 531; +UPDATE `creature_template` SET `spell1` = 7369 WHERE `entry` = 1783; +UPDATE `creature_template` SET `spell1` = 838 WHERE `entry` = 7341; +UPDATE `creature_template` SET `spell1` = 15580, `spell2` = 15613, `spell3` = 16406 WHERE `entry` = 10390; +UPDATE `creature_template` SET `spell1` = 9734, `spell2` = 6074 WHERE `entry` = 787; +UPDATE `creature_template` SET `spell1` = 7322, `spell2` = 12486 WHERE `entry` = 203; +UPDATE `creature_template` SET `spell1` = 7992 WHERE `entry` = 1110; +UPDATE `creature_template` SET `spell1` = 17312, `spell2` = 992, `spell3` = 984 WHERE `entry` = 7340; +UPDATE `creature_template` SET `spell1` = 22940, `spell2` = 1411 WHERE `entry` = 1784; +UPDATE `creature_template` SET `spell1` = 705, `spell2` = 1014 WHERE `entry` = 7342; +UPDATE `creature_template` SET `spell1` = 8699 WHERE `entry` = 785; +UPDATE `creature_template` SET `spell1` = 7373 WHERE `entry` = 48; +UPDATE `creature_template` SET `spell1` = 19644, `spell2` = 21949, `spell3` = 19642 WHERE `entry` = 6488; +UPDATE `creature_template` SET `spell1` = 10179, `spell2` = 22645, `spell3` = 13009, `spell4` = 12556 WHERE `entry` = 7358; +UPDATE `creature_template` SET `spell1` = 10148, `spell2` = 12470 WHERE `entry` = 7357; +UPDATE `creature_template` SET `spell1` = 12947, `spell2` = 12946 WHERE `entry` = 7356; +UPDATE `creature_template` SET `spell1` = 12255, `spell2` = 12252, `spell3` = 12254 WHERE `entry` = 7355; +UPDATE `creature_template` SET `spell1` = 10892, `spell2` = 11659 WHERE `entry` = 7354; +UPDATE `creature_template` SET `spell1` = 21667, `spell2` = 21331, `spell3` = 21793 WHERE `entry` = 12225; +UPDATE `creature_template` SET `spell1` = 21080, `spell2` = 8817 WHERE `entry` = 12236; +UPDATE `creature_template` SET `spell1` = 24375, `spell2` = 15580 WHERE `entry` = 12237; +UPDATE `creature_template` SET `spell1` = 21909, `spell2` = 21832, `spell3` = 19128, `spell4` = 21869 WHERE `entry` = 12201; +UPDATE `creature_template` SET `spell1` = 21911, `spell2` = 15584, `spell3` = 21749 WHERE `entry` = 12258; +UPDATE `creature_template` SET `spell1` = 21833, `spell2` = 22334 WHERE `entry` = 13601; +UPDATE `creature_template` SET `spell1` = 21687, `spell2` = 21547, `spell3` = 21707 WHERE `entry` = 13282; +UPDATE `creature_template` SET `spell1` = 9770, `spell2` = 16145, `spell3` = 1604, `spell4` = 9776 WHERE `entry` = 6206; +UPDATE `creature_template` SET `spell1` = 9770, `spell2` = 1604, `spell3` = 12540 WHERE `entry` = 6208; +UPDATE `creature_template` SET `spell1` = 10851 WHERE `entry` = 6209; +UPDATE `creature_template` SET `spell1` = 1604, `spell2` = 6409, `spell3` = 3420 WHERE `entry` = 6215; +UPDATE `creature_template` SET `spell1` = 9459, `spell2` = 1604, `spell3` = 10341, `spell4` = 11638 WHERE `entry` = 6219; +UPDATE `creature_template` SET `spell1` = 16169, `spell2` = 5568, `spell3` = 10887 WHERE `entry` = 6229; +UPDATE `creature_template` SET `spell1` = 3053, `spell2` = 16412 WHERE `entry` = 6228; +UPDATE `creature_template` SET `spell1` = 11082, `spell2` = 11085, `spell3` = 11084 WHERE `entry` = 6235; +UPDATE `creature_template` SET `spell1` = 1604 WHERE `entry` = 7361; +UPDATE `creature_template` SET `spell1` = 6660, `spell2` = 8858 WHERE `entry` = 6407; +UPDATE `creature_template` SET `spell1` = 8211, `spell2` = 10341, `spell3` = 1604, `spell4` = 9459 WHERE `entry` = 6220; +UPDATE `creature_template` SET `spell1` = 10341, `spell2` = 1604, `spell3` = 9459 WHERE `entry` = 6218; +UPDATE `creature_template` SET `spell1` = 1604, `spell2` = 11264, `spell3` = 12024 WHERE `entry` = 7603; +UPDATE `creature_template` SET `spell1` = 6660, `spell2` = 2643, `spell3` = 5116 WHERE `entry` = 6223; +UPDATE `creature_template` SET `spell1` = 13398, `spell2` = 1604, `spell3` = 12024 WHERE `entry` = 6222; +UPDATE `creature_template` SET `spell1` = 11820, `spell2` = 1604 WHERE `entry` = 6234; +UPDATE `creature_template` SET `spell1` = 1604 WHERE `entry` = 6233; +UPDATE `creature_template` SET `spell1` = 11306, `spell2` = 10733 WHERE `entry` = 6226; +UPDATE `creature_template` SET `spell1` = 22519, `spell2` = 11264 WHERE `entry` = 6227; +UPDATE `creature_template` SET `spell1` = 10346, `spell2` = 1604, `spell3` = 17174 WHERE `entry` = 6225; +UPDATE `creature_template` SET `spell1` = 6533, `spell2` = 1604, `spell3` = 11820, `spell4` = 11084 WHERE `entry` = 6230; +UPDATE `creature_template` SET `spell1` = 10341, `spell2` = 9459 WHERE `entry` = 7079; +UPDATE `creature_template` SET `spell1` = 22689, `spell2` = 22662, `spell3` = 19319 WHERE `entry` = 11492; +UPDATE `creature_template` SET `spell1` = 15708, `spell2` = 23511 WHERE `entry` = 14325; +UPDATE `creature_template` SET `spell1` = 10947, `spell2` = 10151 WHERE `entry` = 14324; +UPDATE `creature_template` SET `spell1` = 15580, `spell2` = 15655, `spell3` = 22572, `spell4` = 20691 WHERE `entry` = 14321; +UPDATE `creature_template` SET `spell1` = 15580, `spell2` = 15655, `spell3` = 20691 WHERE `entry` = 14326; +UPDATE `creature_template` SET `spell1` = 15580, `spell2` = 17307, `spell3` = 20691 WHERE `entry` = 14323; +UPDATE `creature_template` SET `spell1` = 22419, `spell2` = 22420, `spell3` = 22421 WHERE `entry` = 13280; +UPDATE `creature_template` SET `spell1` = 22422 WHERE `entry` = 14122; +UPDATE `creature_template` SET `spell1` = 5116, `spell2` = 20904, `spell3` = 14290, `spell4` = 14295 WHERE `entry` = 11488; +UPDATE `creature_template` SET `spell1` = 16128, `spell2` = 15550, `spell3` = 22899 WHERE `entry` = 11496; +UPDATE `creature_template` SET `spell1` = 22909 WHERE `entry` = 14396; +UPDATE `creature_template` SET `spell1` = 15708, `spell2` = 24375 WHERE `entry` = 11501; +UPDATE `creature_template` SET `spell1` = 11668, `spell2` = 14887 WHERE `entry` = 14327; +UPDATE `creature_template` SET `spell1` = 10984 WHERE `entry` = 14506; +UPDATE `creature_template` SET `spell1` = 10894, `spell2` = 10947, `spell3` = 18807 WHERE `entry` = 11487; +UPDATE `creature_template` SET `spell1` = 20691, `spell2` = 22920 WHERE `entry` = 11486; +UPDATE `creature_template` SET `spell1` = 22424, `spell2` = 10151, `spell3` = 16144 WHERE `entry` = 14354; +UPDATE `creature_template` SET `spell1` = 20691, `spell2` = 24375 WHERE `entry` = 11498; +UPDATE `creature_template` SET `spell1` = 15550, `spell2` = 22924, `spell3` = 22994 WHERE `entry` = 11489; +UPDATE `creature_template` SET `spell1` = 22478, `spell2` = 22651 WHERE `entry` = 11490; +UPDATE `creature_template` SET `spell1` = 20832, `spell2` = 16102, `spell3` = 15530, `spell4` = 16170 WHERE `entry` = 11444; +UPDATE `creature_template` SET `spell1` = 22572, `spell2` = 22916 WHERE `entry` = 11450; +UPDATE `creature_template` SET `spell1` = 13737, `spell2` = 20677, `spell3` = 24317 WHERE `entry` = 11441; +UPDATE `creature_template` SET `spell1` = 19474 WHERE `entry` = 11457; +UPDATE `creature_template` SET `spell1` = 22460, `spell2` = 22272 WHERE `entry` = 13197; +UPDATE `creature_template` SET `spell1`=512, `spell2`=1010, `spell3`=0, `spell4`=0 WHERE `entry`=10415; +UPDATE `creature_template` SET `spell1`=1096, `spell2`=0, `spell3`=0, `spell4`=0 WHERE `entry`=10917; +UPDATE `creature_template` SET `spell1`=20603, `spell2`=15398, `spell3`=9256, `spell4`=20741 WHERE `entry`=10813; +UPDATE `creature_template` SET `spell1`=16565, `spell2`=16867, `spell3`=18327, `spell4`=0 WHERE `entry`=10436; +UPDATE `creature_template` SET `spell1`=16866, `spell2`=1604, `spell3`=0, `spell4`=0 WHERE `entry`=10697; +UPDATE `creature_template` SET `spell1`=1604, `spell2`=16866, `spell3`=0, `spell4`=0 WHERE `entry`=10416; +UPDATE `creature_template` SET `spell1`=17439, `spell2`=15584, `spell3`=1604, `spell4`=0 WHERE `entry`=10394; +UPDATE `creature_template` SET `spell1`=1604, `spell2`=5884, `spell3`=0, `spell4`=0 WHERE `entry`=11121; +UPDATE `creature_template` SET `spell1`=16140, `spell2`=1604, `spell3`=0, `spell4`=0 WHERE `entry`=10383; +UPDATE `creature_template` SET `spell1`=1604, `spell2`=3589, `spell3`=0, `spell4`=0 WHERE `entry`=8530; +UPDATE `creature_template` SET `spell1`=23382, `spell2`=15615, `spell3`=16496, `spell4`=0 WHERE `entry`=10997; +UPDATE `creature_template` SET `spell1`=13020, `spell2`=23413, `spell3`=0, `spell4`=0 WHERE `entry`=10425; +UPDATE `creature_template` SET `spell1`=17293, `spell2`=23462, `spell3`=17274, `spell4`=0 WHERE `entry`=10811; +UPDATE `creature_template` SET `spell1`=1604, `spell2`=15749, `spell3`=11972, `spell4`=13534 WHERE `entry`=13118; +UPDATE `creature_template` SET `spell1`=11831, `spell2`=23412, `spell3`=1604, `spell4`=0 WHERE `entry`=10419; +UPDATE `creature_template` SET `spell1`=5101, `spell2`=17143, `spell3`=13005, `spell4`=0 WHERE `entry`=12337; +UPDATE `creature_template` SET `spell1`=13005, `spell2`=1604, `spell3`=20005, `spell4`=0 WHERE `entry`=10421; +UPDATE `creature_template` SET `spell1`=36647, `spell2`=17143, `spell3`=1604, `spell4`=0 WHERE `entry`=10424; +UPDATE `creature_template` SET `spell1`=15749, `spell2`=33871, `spell3`=1604, `spell4`=0 WHERE `entry`=10418; +UPDATE `creature_template` SET `spell1`=17445, `spell2`=1604, `spell3`=39077, `spell4`=0 WHERE `entry`=11120; +UPDATE `creature_template` SET `spell1`=17287, `spell2`=1604, `spell3`=22645, `spell4`=0 WHERE `entry`=10420; +UPDATE `creature_template` SET `spell1`=22645, `spell2`=17165, `spell3`=22947, `spell4`=0 WHERE `entry`=10426; +UPDATE `creature_template` SET `spell1`=36033, `spell2`=17145, `spell3`=1604, `spell4`=0 WHERE `entry`=11043; +UPDATE `creature_template` SET `spell1`=36176, `spell2`=36947, `spell3`=1604, `spell4`=0 WHERE `entry`=10423; +UPDATE `creature_template` SET `spell1`=38094, `spell2`=1604, `spell3`=6788, `spell4`=0 WHERE `entry`=11054; +UPDATE `creature_template` SET `spell1`=15451, `spell2`=16927, `spell3`=16144, `spell4`=15534 WHERE `entry`=10422; +UPDATE `creature_template` SET `spell1`=22412, `spell2`=4962, `spell3`=1604, `spell4`=3589 WHERE `entry`=10413; +UPDATE `creature_template` SET `spell1`=15471, `spell2`=1604, `spell3`=3589, `spell4`=16430 WHERE `entry`=10412; +UPDATE `creature_template` SET `spell1`=16401, `spell2`=12023, `spell3`=1604, `spell4`=20812 WHERE `entry`=8556; +UPDATE `creature_template` SET `spell1`=4629, `spell2`=20549, `spell3`=20812, `spell4`=21949 WHERE `entry`=11859; +UPDATE `creature_template` SET `spell1`=1604, `spell2`=15530, `spell3`=15531, `spell4`=16458 WHERE `entry`=15607; +UPDATE `creature_template` SET `spell1`=16388, `spell2`=0, `spell3`=0, `spell4`=0 WHERE `entry`=10557; +UPDATE `creature_template` SET `spell1`=18200, `spell2`=1604, `spell3`=9791, `spell4`=16458 WHERE `entry`=10407; +UPDATE `creature_template` SET `spell1`=7964, `spell2`=20712, `spell3`=1604, `spell4`=23511 WHERE `entry`=11058; +UPDATE `creature_template` SET `spell1`=16249, `spell2`=16143, `spell3`=16449, `spell4`=0 WHERE `entry`=11136; +UPDATE `creature_template` SET `spell1`=22687, `spell2`=1604, `spell3`=0, `spell4`=0 WHERE `entry`=10385; +UPDATE `creature_template` SET `spell1`=12538, `spell2`=15608, `spell3`=16172, `spell4`=1604 WHERE `entry`=10406; +UPDATE `creature_template` SET `spell1`=17286, `spell2`=1604, `spell3`=20830, `spell4`=0 WHERE `entry`=10812; +UPDATE `creature_template` SET `spell1`=3589, `spell2`=16867, `spell3`=1604, `spell4`=0 WHERE `entry`=8541; +UPDATE `creature_template` SET `spell1`=17685, `spell2`=18663, `spell3`=19643, `spell4`=20812 WHERE `entry`=16101; +UPDATE `creature_template` SET `spell1`=16793, `spell2`=10887, `spell3`=14099, `spell4`=1604 WHERE `entry`=10435; +UPDATE `creature_template` SET `spell1`=15850, `spell2`=16249, `spell3`=20743, `spell4`=16869 WHERE `entry`=10438; +UPDATE `creature_template` SET `spell1`=12734, `spell2`=16172, `spell3`=1604, `spell4`=6788 WHERE `entry`=11032; +UPDATE `creature_template` SET `spell1`=16143, `spell2`=1604, `spell3`=15043, `spell4`=0 WHERE `entry`=10382; +UPDATE `creature_template` SET `spell1`=1604, `spell2`=6788, `spell3`=0, `spell4`=0 WHERE `entry`=11197; +UPDATE `creature_template` SET `spell1`=1604, `spell2`=6788, `spell3`=0, `spell4`=0 WHERE `entry`=11030; +UPDATE `creature_template` SET `spell1`=5568, `spell2`=17307, `spell3`=1604, `spell4`=6788 WHERE `entry`=10439; +UPDATE `creature_template` SET `spell1`=19813, `spell2`=4283, `spell3`=0, `spell4`=0 WHERE `entry`=11658; +UPDATE `creature_template` SET `spell1`=19393, `spell2`=0, `spell3`=0, `spell4`=0 WHERE `entry`=11668; +UPDATE `creature_template` SET `spell1`=25787, `spell2`=0, `spell3`=0, `spell4`=0 WHERE `entry`=12101; +UPDATE `creature_template` SET `spell1`=19364, `spell2`=19365, `spell3`=19369, `spell4`=19367 WHERE `entry`=11673; +UPDATE `creature_template` SET `spell1`=4283, `spell2`=19813, `spell3`=0, `spell4`=0 WHERE `entry`=11659; +UPDATE `creature_template` SET `spell1`=20228, `spell2`=0, `spell3`=0, `spell4`=0 WHERE `entry`=12143; +UPDATE `creature_template` SET `spell1`=20203, `spell2`=0, `spell3`=0, `spell4`=0 WHERE `entry`=11669; +UPDATE `creature_template` SET `spell1`=24668, `spell2`=23952, `spell3`=10960, `spell4`=0 WHERE `entry`=11663; +UPDATE `creature_template` SET `spell1`=23952, `spell2`=20294, `spell3`=0, `spell4`=0 WHERE `entry`=11662; +UPDATE `creature_template` SET `spell1`=20677, `spell2`=20740, `spell3`=0, `spell4`=0 WHERE `entry`=12119; +UPDATE `creature_template` SET `spell1`=20623, `spell2`=0, `spell3`=0, `spell4`=0 WHERE `entry`=11664; +UPDATE `creature_template` SET `spell1`=19778, `spell2`=19771, `spell3`=0, `spell4`=0 WHERE `entry`=11671; +UPDATE `creature_template` SET `spell1`=21081, `spell2`=19730, `spell3`=0, `spell4`=0 WHERE `entry`=11661; +UPDATE `creature_template` SET `spell1`=19626, `spell2`=19630, `spell3`=19631, `spell4`=0 WHERE `entry`=11667; +UPDATE `creature_template` SET `spell1`=19798, `spell2`=19496, `spell3`=0, `spell4`=0 WHERE `entry`=12806; +UPDATE `creature_template` SET `spell1`=19635, `spell2`=0, `spell3`=0, `spell4`=0 WHERE `entry`=11666; +UPDATE `creature_template` SET `spell1`=19642, `spell2`=19644, `spell3`=0, `spell4`=0 WHERE `entry`=12100; +UPDATE `creature_template` SET `spell1`=19641, `spell2`=0, `spell3`=0, `spell4`=0 WHERE `entry`=12076; +UPDATE `creature_template` SET `spell1`=20294, `spell2`=0, `spell3`=0, `spell4`=0 WHERE `entry`=12099; +UPDATE `creature_template` SET `spell1`=18108, `spell2`=0, `spell3`=0, `spell4`=0 WHERE `entry`=12265; +UPDATE `creature_template` SET `spell1`=22689, `spell2`=19319, `spell3`=0, `spell4`=0 WHERE `entry`=11672; +UPDATE `creature_template` SET `spell1`=35178, `spell2`=15749, `spell3`=0, `spell4`=0 WHERE `entry`=10509; +UPDATE `creature_template` SET `spell1`=35178, `spell2`=0, `spell3`=0, `spell4`=0 WHERE `entry`=9819; +UPDATE `creature_template` SET `spell1`=30688, `spell2`=0, `spell3`=0, `spell4`=0 WHERE `entry`=10319; +UPDATE `creature_template` SET `spell1`=20816, `spell2`=0, `spell3`=0, `spell4`=0 WHERE `entry`=9817; +UPDATE `creature_template` SET `spell1`=32192, `spell2`=18108, `spell3`=0, `spell4`=0 WHERE `entry`=9818; +UPDATE `creature_template` SET `spell1`=23462, `spell2`=23341, `spell3`=17274, `spell4`=0 WHERE `entry`=9816; +UPDATE `creature_template` SET `spell1`=24317, `spell2`=0, `spell3`=0, `spell4`=0 WHERE `entry`=10258; +UPDATE `creature_template` SET `spell1`=145, `spell2`=0, `spell3`=0, `spell4`=0 WHERE `entry`=10161; +UPDATE `creature_template` SET `spell1`=0, `spell2`=0, `spell3`=0, `spell4`=0 WHERE `entry`=10683; +UPDATE `creature_template` SET `spell1`=28725, `spell2`=0, `spell3`=0, `spell4`=0 WHERE `entry`=10264; +UPDATE `creature_template` SET `spell1`=12461, `spell2`=22591, `spell3`=16172, `spell4`=24317 WHERE `entry`=10899; +UPDATE `creature_template` SET `spell1`=12461, `spell2`=0, `spell3`=0, `spell4`=0 WHERE `entry`=10317; +UPDATE `creature_template` SET `spell1`=0, `spell2`=0, `spell3`=0, `spell4`=0 WHERE `entry`=10762; +UPDATE `creature_template` SET `spell1`=0, `spell2`=0, `spell3`=0, `spell4`=0 WHERE `entry`=10742; +UPDATE `creature_template` SET `spell1`=30014, `spell2`=32370, `spell3`=0, `spell4`=0 WHERE `entry`=10447; +UPDATE `creature_template` SET `spell1`=22414, `spell2`=23512, `spell3`=0, `spell4`=0 WHERE `entry`=10442; +UPDATE `creature_template` SET `spell1`=20691, `spell2`=15589, `spell3`=23931, `spell4`=0 WHERE `entry`=10429; +UPDATE `creature_template` SET `spell1`=20667, `spell2`=20712, `spell3`=18763, `spell4`=0 WHERE `entry`=10339; +UPDATE `creature_template` SET `spell1`=11286, `spell2`=0, `spell3`=0, `spell4`=0 WHERE `entry`=10318; +UPDATE `creature_template` SET `spell1`=23462, `spell2`=25668, `spell3`=0, `spell4`=0 WHERE `entry`=10372; +UPDATE `creature_template` SET `spell1`=28168, `spell2`=27580, `spell3`=0, `spell4`=0 WHERE `entry`=10371; +UPDATE `creature_template` SET `spell1`=23462, `spell2`=0, `spell3`=0, `spell4`=0 WHERE `entry`=10083; +UPDATE `creature_template` SET `spell1`=20741, `spell2`=24668, `spell3`=0, `spell4`=0 WHERE `entry`=10162; +UPDATE `creature_template` SET `spell1`=17883, `spell2`=16785, `spell3`=0, `spell4`=0 WHERE `entry`=10430; +UPDATE `creature_template` SET `spell1`=23462, `spell2`=20691, `spell3`=23023, `spell4`=23931 WHERE `entry`=10363; +UPDATE `creature_template` SET `spell1`=20276, `spell2`=0, `spell3`=0, `spell4`=0 WHERE `entry`=10814; +UPDATE `creature_template` SET `spell1`=13496, `spell2`=0, `spell3`=0, `spell4`=0 WHERE `entry`=11598; +UPDATE `creature_template` SET `spell1`=27559, `spell2`=20691, `spell3`=12020, `spell4`=30138 WHERE `entry`=10487; +UPDATE `creature_template` SET `spell1`=17715, `spell2`=27559, `spell3`=20276, `spell4`=0 WHERE `entry`=10491; +UPDATE `creature_template` SET `spell1`=11660, `spell2`=18807, `spell3`=0, `spell4`=0 WHERE `entry`=10470; +UPDATE `creature_template` SET `spell1`=18270, `spell2`=0, `spell3`=0, `spell4`=0 WHERE `entry`=10481; +UPDATE `creature_template` SET `spell1`=18116, `spell2`=17695, `spell3`=20741, `spell4`=15584 WHERE `entry`=10433; +UPDATE `creature_template` SET `spell1`=17472, `spell2`=15584, `spell3`=0, `spell4`=0 WHERE `entry`=10482; +UPDATE `creature_template` SET `spell1`=18106, `spell2`=18116, `spell3`=15584, `spell4`=0 WHERE `entry`=11261; +UPDATE `creature_template` SET `spell1`=18116, `spell2`=20741, `spell3`=18144, `spell4`=0 WHERE `entry`=10506; +UPDATE `creature_template` SET `spell1`=11672, `spell2`=12020, `spell3`=18116, `spell4`=0 WHERE `entry`=10505; +UPDATE `creature_template` SET `spell1`=16359, `spell2`=3584, `spell3`=18116, `spell4`=0 WHERE `entry`=10901; +UPDATE `creature_template` SET `spell1`=24375, `spell2`=18813, `spell3`=18116, `spell4`=0 WHERE `entry`=11622; +UPDATE `creature_template` SET `spell1`=15550, `spell2`=20691, `spell3`=18116, `spell4`=0 WHERE `entry`=10507; +UPDATE `creature_template` SET `spell1`=11668, `spell2`=11700, `spell3`=18116, `spell4`=0 WHERE `entry`=10504; +UPDATE `creature_template` SET `spell1`=24673, `spell2`=18270, `spell3`=18116, `spell4`=0 WHERE `entry`=10503; +UPDATE `creature_template` SET `spell1`=15584, `spell2`=17472, `spell3`=0, `spell4`=0 WHERE `entry`=11439; +UPDATE `creature_template` SET `spell1`=18116, `spell2`=19460, `spell3`=6215, `spell4`=15487 WHERE `entry`=10502; +UPDATE `creature_template` SET `spell1`=18702, `spell2`=10212, `spell3`=18116, `spell4`=0 WHERE `entry`=1853; +UPDATE `creature_template` SET `spell1`=16350, `spell2`=21369, `spell3`=8398, `spell4`=18033 WHERE `entry`=10508; +UPDATE `creature_template` SET `spell1`=27224, `spell2`=30900, `spell3`=3609, `spell4`=0 WHERE `entry`=14861; +UPDATE `creature_template` SET `spell1`=18278, `spell2`=29405, `spell3`=12020, `spell4`=0 WHERE `entry`=10498; +UPDATE `creature_template` SET `spell1`=24063, `spell2`=18270, `spell3`=0, `spell4`=0 WHERE `entry`=10495; +UPDATE `creature_template` SET `spell1`=12020, `spell2`=18278, `spell3`=25304, `spell4`=0 WHERE `entry`=11263; +UPDATE `creature_template` SET `spell1`=16469, `spell2`=25349, `spell3`=0, `spell4`=0 WHERE `entry`=11551; +UPDATE `creature_template` SET `spell1`=25304, `spell2`=11660, `spell3`=12020, `spell4`=0 WHERE `entry`=10477; +UPDATE `creature_template` SET `spell1`=25304, `spell2`=12020, `spell3`=10161, `spell4`=0 WHERE `entry`=10472; +UPDATE `creature_template` SET `spell1`=15571, `spell2`=0, `spell3`=0, `spell4`=0 WHERE `entry`=10475; +UPDATE `creature_template` SET `spell1`=25304, `spell2`=10161, `spell3`=10473, `spell4`=0 WHERE `entry`=10469; +UPDATE `creature_template` SET `spell1`=11660, `spell2`=15571, `spell3`=10161, `spell4`=0 WHERE `entry`=11284; +UPDATE `creature_template` SET `spell1`=17689, `spell2`=15571, `spell3`=18270, `spell4`=0 WHERE `entry`=10480; +UPDATE `creature_template` SET `spell1`=15571, `spell2`=30138, `spell3`=0, `spell4`=0 WHERE `entry`=10497; +UPDATE `creature_template` SET `spell1`=15571, `spell2`=30138, `spell3`=0, `spell4`=0 WHERE `entry`=10479; +UPDATE `creature_template` SET `spell1`=17504, `spell2`=12867, `spell3`=0, `spell4`=0 WHERE `entry`=14513; +UPDATE `creature_template` SET `spell1`=17504, `spell2`=12867, `spell3`=24673, `spell4`=0 WHERE `entry`=14520; +UPDATE `creature_template` SET `spell1`=30138, `spell2`=11660, `spell3`=0, `spell4`=0 WHERE `entry`=14521; +UPDATE `creature_template` SET `spell1`=11556, `spell2`=8140, `spell3`=23262, `spell4`=0 WHERE `entry`=14518; +UPDATE `creature_template` SET `spell1`=10894, `spell2`=23244, `spell3`=0, `spell4`=0 WHERE `entry`=14519; +UPDATE `creature_template` SET `spell1`=11556, `spell2`=8140, `spell3`=15571, `spell4`=0 WHERE `entry`=14514; +UPDATE `creature_template` SET `spell1`=15571, `spell2`=23244, `spell3`=0, `spell4`=0 WHERE `entry`=14512; +UPDATE `creature_template` SET `spell1`=12292, `spell2`=15571, `spell3`=28168, `spell4`=0 WHERE `entry`=10488; +UPDATE `creature_template` SET `spell1`=15571, `spell2`=24063, `spell3`=18270, `spell4`=12021 WHERE `entry`=10485; +UPDATE `creature_template` SET `spell1`=10161, `spell2`=13021, `spell3`=20883, `spell4`=0 WHERE `entry`=11257; +UPDATE `creature_template` SET `spell1`=15571, `spell2`=0, `spell3`=0, `spell4`=0 WHERE `entry`=10478; +UPDATE `creature_template` SET `spell1`=17504, `spell2`=26554, `spell3`=35011, `spell4`=0 WHERE `entry`=10486; +UPDATE `creature_template` SET `spell1`=19627, `spell2`=18816, `spell3`=13021, `spell4`=0 WHERE `entry`=10432; +UPDATE `creature_template` SET `spell1`=18807, `spell2`=10876, `spell3`=0, `spell4`=0 WHERE `entry`=10471; +UPDATE `creature_template` SET `spell1`=10876, `spell2`=25304, `spell3`=18647, `spell4`=0 WHERE `entry`=10500; +UPDATE `creature_template` SET `spell1`=29684, `spell2`=25051, `spell3`=0, `spell4`=0 WHERE `entry`=10489; + +UPDATE `creature_template` SET `spell1` = 24317, `spell2` = 19644 WHERE `entry` = 8890; +UPDATE `creature_template` SET `spell1` = 30901, `spell2` = 27581, `spell3` = 34510 WHERE `entry` = 8891; +UPDATE `creature_template` SET `spell1` = 29560, `spell2` = 19644 WHERE `entry` = 8892; +UPDATE `creature_template` SET `spell1` = 40082, `spell2` = 30901 WHERE `entry` = 8893; +UPDATE `creature_template` SET `spell1` = 8812, `spell2` = 10961, `spell3` = 10947 WHERE `entry` = 8894; +UPDATE `creature_template` SET `spell1` = 25292, `spell2` = 1020 WHERE `entry` = 8895; +UPDATE `creature_template` SET `spell1` = 17143, `spell2` = 10293, `spell3` = 25292 WHERE `entry` = 8898; diff --git a/sql/optional/mangos_optional_generic_creature.sql b/sql/optional/mangos_optional_generic_creature.sql new file mode 100644 index 000000000..a787b584e --- /dev/null +++ b/sql/optional/mangos_optional_generic_creature.sql @@ -0,0 +1,283 @@ +/* */ + +/* WORLD CREATURE These are creatures to be found in more than one specific zone */ +/* Spider */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (14881); + +/* */ +/* ZONE */ +/* */ + +/* ALTERAC MOUNTAINS */ +/* Crushridge Mage, Argus Shadow Mage, Dalaran Summoner, Archmage Ansirem Runeweaver */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (2255, 2318, 2358, 2543); + +/* ALTERAC VALLEY */ +/* Wildpaw Mystic */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (11838); + +/* ARATHI HIGHLANDS */ +/* Feeboz, Boulderfist Shaman, Boulderfist Magus, Syndicate Magus, Dark Iron Shadowcaster, Witherbark Axe Thrower, Plains Creeper, Giant Plains Creeper */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (4063, 2570, 2567, 2591, 2577, 2554, 2563, 2565); + +/* ASHENVALE */ +/* Shadethicket Raincaller, Forsaken Seeker, Dark Strand Cultist, Dark Strand Adept */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (3783, 3732, 3725, 3728); + + +/* */ +/* AUCHINDOUN */ +/* */ + + + +/* AZSHARA */ +/* Draconic Magelord, Draconic Mageweaver, Archmage Xylem */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (6129, 6131, 8379); + +/* BADLANDS */ +/* Dustbelcher Ogre Mage, Dustbelcher Mystic, Shadowmage Vivian Lagrave */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (2720, 2907, 9078); + +/* BARRENS */ +/* Kolkar Stormer, Razormane Geomancer, Razormane Seer, Razormane Mystic, Razormane Hunter, Razormane Warfrenzy, Razormane Water Seeker, Silithid Creeper, Elder Mystic Razorsnout, Horde Axe Thrower */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (3273, 3269, 3458, 3271, 3265, 3459, 3267, 3250, 3270, 9458); + +/* BLACKFATHOM DEPTHS */ +/* Blindlight Oracle, Blindlight Muckdweller, Blindlight Murloc, Twilight Shadowmage */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (4820, 4819, 4818, 4813); + + +/* Hedrum the Creeper, Dark Keeper Zimrel */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (9032, 9441); +/* Anvilrage military */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (8890, 8891, 8892, 8893, 8894, 8895, 8898); +/* Cave Creeper */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (8933); + +/* BLACKROCK SPIRE */ +/* Blackhand Dreadweaver,Blackhand Summoner,Blackhand Veteran,Blackhand Elite,Blackhand Assassin,Blackhand Iron Guard,Chromatic Whelp,Chromatic Dragonspawn,Rookery Whelp,Rookery Guardian,Rage Talon Captain,Rage Talon Fire Tongue,Rage Talon Flamescale */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (9817, 9818, 9819, 10317, 10318, 10319, 10442, 10447, 10161, 10258, 10371, 10372, 10083); +/* Spirestone Battle Mage, Spirestone Mystic, Smolderthorn Mystic, Smolderthorn Axe Thrower, Bloodaxe Summoner , Spire Spider, Spire Spiderling */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (9197, 9198, 9239, 9267, 9717, 10374, 10375); + + +/* BLACKROCK SPIRE Upper */ +/* Jed Runewatcher,Solakar Flamewreath,Goraluk Anvilcrack */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry`IN (10509,10264,10899); + +/* BLACKWING LAIR */ +/* Trash Mobs */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (12420); + + +/* BLASTED LANDS */ +/* Dreadmaul Ogre Mage, Bloodmage Drazial, Bloodmage Lynnore, Archmage Allistarj */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (5975, 7505, 7506, 7666); + +/* BURNING STEPPES */ +/* Blackrock Sorcerer, Blackrock Warlock, Scalding Broodling, Thaurissan Agent, Firegut Ogre Mage */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (7026, 7028, 7048, 7038, 7034); + + +/* DARKSHORE */ +/* Delmanis the Hated, Greymist Oracle, */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (3662, 2207); + +/* DEADMINES */ +/* Defias Squallshaper, Defias Magician, Defias Conjurer, Defias Overseer, Defias Watchman, Defias Wizard, Defias Evoker, Defias Pirate, Defias Taskmaster, Defias Miner, Defias Strip Miner, Defias Henchman, */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (1732, 1726, 619, 634, 1725, 4418, 1729, 657, 4417, 598, 4416, 594); + +/* DEADWIND PASS */ +/* Deadwind Ogre Mage */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (7379); + +/* DESOLACE */ +/* Burning Blade Shadowmage, Burning Blade Summoner, Mage Hunter */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (4667, 4668, 4681); + +/* DIRE MAUL */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (11492, 14325, 14324, 14321, 14326, 14323, 13280, 14122, 11488, 11496, 14396, 11501, 14327, 14506, 11487, 11486, 14354, 11498, 11489, 11490, 11444, 11450, 11441, 11457, 13197); +/* Gordok Mage-Lord, Highborne Summoner */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (11444, 11466); + +/* DUN MOROGH */ +/* Frostmane Novice, Frostmane Seer, Rockjaw Skullthumper, Rockjaw Bonesnapper, Rockjaw Ambusher, Rockjaw Backbreaker, */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (946, 1397, 1115, 1117, 1116, 1118); + +/* DUROTAR */ +/* Razormane Scout, Razormane Dustrunner, Razormane Quilboar, Razormane Battleguard, Vile Familiar */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (3112, 3113, 3111, 3114, 3101); + +/* DUSKWOOD */ +/* Eliza, Nightbane Shadow Weaver, Skeletal Mage, Defias Night Runner, Defias Night Blade, Skeletal Fiend, Skeletal Healer, Skeletal Mage, Skeletal Raider, Skeletal Warder, Skeletal Warrior, Venom Web Spider, Pygmy Venom Web Spider */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (314, 533, 203, 215, 909, 531, 787, 203, 1110, 785, 48, 217, 539); + +/* DUSTWALLOW MARSH */ +/* Mirefin Murloc, Darkmist Spider, Withervine Creeper, Darkfang Creeper, Darkfang Spider, Giant Darkfang Spider, Archmage Tervosh */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (4359, 4376, 4382, 4412, 4413, 4415, 4967); + +/* EASTERN PLAGUELANDS */ +/* Crimson Bodyguard, Crimson Courier, Crypt Walker, Hate Shrieker, Cursed Mage, Shadowmage, Dark Summoner, Scarlet Archmage, Archmage Angela Dosantos */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (13118, 12337, 8556, 8541, 8524, 8550, 8551, 9451, 16116); + +/* ELWYNN FOREST */ +/* Hogger, Defias Rogue Wizard, Defias Enchanter, Defias Bodyguard, Defias Bandit, Defias Cutpurse, Murloc Lurker, Murloc Forager, Forest Spider, Mine Spider */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (448, 474, 910, 6866, 116, 94, 732, 46, 30, 43); + +/* FELWOOD */ +/* Timbermaw Mystic */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (11552); + +/* FERALAS */ +/* Gordunni Ogre Mage, Gordunni Mage-Lord, Woodpaw Mystic, Gordok Ogre-Mage */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (5237, 5239, 5254, 11443); + +/* GNOMEREGAN */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (6206, 6208, 6209, 6215, 6219, 6229, 6228, 6235, 7361, 6407, 6220, 6218, 7603, 6223, 6222, 6234, 6233, 6226, 6227, 6225, 6230, 7079); + +/* */ +/* HELLFIRE CITADEL */ +/* */ + +/* Laughing Skull Legionnaire, Laughing Skull Warden, Laughing Skull Rogue, Hellfire Imp, Shadowmoon Channeler, Fel Orc Neophyte, Shadowmoon Technician, Shadowmoon Adept, Hellfire Familiar, Felguard Brute, Shadowmoon Summoner, Shadowmoon Warlock */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (17626, 17624, 17491, 17477, 17653, 17429, 17414, 17397, 19016, 18894, 17395, 17371); + +/* HELLFIRE RAMPARTS */ +/* Vazruden, Omor the Unscarred, Watchkeeper Gargolmar */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (17537, 17308, 17306); +/* Hellfire Watcher , Bonechewer Hungerer, Bonechewer Beastmaster, Bonechewer Ravener, Bonechewer Ripper, Bonechewer Destroyer, Bleeding Hollow Archer, Bleeding Hollow Darkcaster, Hellfire Sentry , Bleeding Hollow Scryer */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (17309, 17259, 17455, 17264, 17281, 17271, 17270, 17269, 17517, 17478); + +/* SHATTERED HALLS */ +/* Warchief Kargath Bladefist */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (16808); +/* Shattered Hand Centurion, Shadowmoon Darkcaster, Shattered Hand Champion, Sharpshooter Guard, Shattered Hand Assassin, Warbringer O'mrogg, Grand Warlock Nethekurse, Shattered Hand Sharpshooter, Shattered Hand Legionnaire, Shattered Hand Reaver, Shattered Hand Brawler */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (17465, 17694, 17671, 17622, 17695, 16809, 16807, 16704, 16700, 16699, 16593); + + +/* HILLSBRAD FOOTHILLS */ +/* Syndicate Shadow Mage, Elder Moss Creeper, Giant Moss Creeper(also AM), Forest Moss Creeper, Writhing Mage */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (2244, 2348, 2349, 2350, 7075); + +/* HINTERLANDS */ +/* Vilebranch Axe Thrower, Mystic Yayo'jin */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (2639, 14739); + +/* LOCH MODAN */ +/* Mo'grosh Mystic, Tunnel Rat Geomancer, Magosh , Stonesplinter Scout, Stonesplinter Seer, Stonesplinter Geomancer, Stonesplinter Skullthumper, Stonesplinter Bonesnapper, Stonesplinter Shaman, Stonesplinter Digger, */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (1183, 1174, 1399, 1162, 1166, 1165, 1163, 1164, 1197, 1167); + +/* MULGORE */ +/* Bristleback Shaman, Bristleback Interloper, Bristleback Quilboar, Bristleback Battleboar, Bristleback Interloper, */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (2953, 3232, 2952, 2954, 3232); + +/* NAXXRAMAS */ +/* Dread Creeper, Archmage Tarsis Kir-Moldir */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (15974, 16381); + +/* ONYXIA'S LAIR */ +/* Onyxian Whelp */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (11262); + +/* RAZORFEN DOWNS */ +/* Mordresh Fire Eye, Plaguemaw the Rotting, Tuten\'kash, Ragglesnout, Glutton */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (7357, 7356, 7355, 7354, 8567); +/* Skeletal Frostweaver, Skeletal Shadowcaster, Skeletal Summoner, */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (7341, 7340, 7342); + +/* REDRIDGE MOUNTAINS */ +/* Blackrock Shadowcaster, Murloc Minor Tidecaller, Murloc Nightcrawler, Murloc Tidecaller, Murloc Scout, Murloc Shorestriker, Shadowhide Darkweaver, Rabid Shadowhide Gnoll, Shadowhide Gnoll, Shadowhide Brute, Shadowhide Warrior, Shadowhide Assassin, Redridge Mystic, Redridge Poacher, Redridge Thrasher, Redridge Basher, Black Dragon Whelp, Tarantula, Greater Tarantula, Blackrock Summoner */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (436, 548, 544, 545, 578, 1083, 422, 429, 434, 433, 432, 568, 579, 430, 424, 712, 446, 441, 442, 505, 4463); + +/* SCARLET MONASTERY */ +/* Fallen Champion, Scarlet Chaplain, Scarlet Adept, Scarlet Wizard, */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (6488, 4299, 4296, 4300); + +/* SCHOLOMANCE */ +/* Kirtonos the Herald, Rattlegore, Marduk Blackpool, Risen Guard, Risen Bonewarder, Risen Lackey, Risen Aberration, Risen Warrior, Risen Protector, Risen Construct, Risen Guardian, Diseased Ghoul, Ragged Ghoul, Spectral Projection, Spectral Teacher, Necrofiend, Scholomance Neophyte, Scholomance Acolyte, Scholomance Occultist */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (10506, 11622, 10433, 10489, 10491, 10482, 10485, 10486, 10487, 10488, 11598, 10495, 10497, 11263, 10500, 11551, 10470, 10471, 10472); +/* Scholomance Student, Scholomance Necromancer, Scholomance Adept, Scholomance Handler, Splintered Skeleton, Skulking Corpse, Unstable Corpse, Reanimated Corpse, Aspect of Banality, Aspect of Corruption, Aspect of Malice, Aspect of Shadow, Blood Steward of Kirtonos, Spectral Tutor, Dark Shade, Corrupted Spirit, Malicious Spirit, Banal Spirit, Scholomance Dark Summoner */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (10475, 10477, 10469, 11257, 10478, 10479, 10480, 10481, 14518, 14519, 14520, 14521, 14861, 10498, 11284, 14512, 14513, 14514, 11582); + +/* SEARING GORGE */ +/* Glassweb Spider, Searing Lava Spider, Greater Lava Spider */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (5856, 5857, 5858); + +/* SHADOWFANG KEEP */ +/* Archmage Arugal */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (4275); + + +/* SILITHUS */ +/* Orgrimmar Legion Axe Thrower, Stormwind Archmage */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (15617, 15859); + +/* SILVERPINE FOREST */ +/* Dalaran Apprentice, Dalaran Conjuror, Dalaran Mage, Dalaran Wizard, Rot Hide Mystic, Rot Hide Gladerunner, Rot Hide Brute, Rot Hide Plague Weaver, Rot Hide Savage, Rot Hide Bruiser, Mist Creeper, Dalaran Apprentice, Dalaran Wizard, Dalaran Protector, Dalaran Warder, Dalaran Mage, Dalaran Conjuror, Lake Creeper, Elder Lake Creeper, Vile Fin Shorecreeper, Nightlash, Archmage Ataeric */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (1867, 1915, 1914, 1889, 1773, 1772, 1939, 1940, 1942, 1944, 1781, 1867, 1889, 1912, 1913, 1914, 1915, 1955, 1956, 1957, 1983, 2120); + +/* STOCKADES */ +/* Defias Captive, Defias Convict, Defias Inmate, Defias Insurgent, Defias Prisoner, */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (1707, 1711, 1708, 1715, 1706); + +/* STONETALON MOUNTAINS */ +/* Deepmoss Creeper */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (4005); + +/* STRANGLETHORN VALE */ +/* Bloodscalp Shaman, Bloodsail Elder Magus, Bloodsail Mage, Bloodsail Warlock, Bloodscalp Axe Thrower, Skullsplitter Axe Thrower, Bloodscalp Mystic, Skullsplitter Mystic */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (697, 1653, 1562, 1564, 694, 696, 701, 780); + +/* STRATHOLME */ +/* Jarien, Aurius, Ash'ari Crystal, Elder Farwhisper, Mindless Undead */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (16101, 10917, 10415, 15607, 11030); + +/* SUNKEN TEMPLE */ +/* Zekkis, Kazkaz the Unholy, Spawn of Hakkar, Shade of Eranikus, Jammal'an the Prophet, Ogom the Wretched, Zolo, Gasher, Loro, Hukku, Zul'Lor, Mijan, Morphaz, Weaver, Dreamscythe, Hazzas, Avatar of Hakkar, Atal'alarion */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (5400, 5401, 5708, 5709, 5710, 5711, 5712, 5713, 5714, 5715, 5716, 5717, 5719, 5720, 5721, 5722, 8443, 8580); +/* Jade, Murk Slitherer, Murk Spitter, Murk Worm, Saturated Ooze, Fungal Ooze, Cursed Atal'ai, Atal'ai Witch Doctor, Enthralled Atal'ai, Mummified Atal'ai, Unliving Atal'ai, Atal'ai Priest, Atal'ai Corpse Eater, Atal'ai Deathwalker, Atal'ai High Priest, Nightmare Scalebane, Nightmare Wyrmkin, Nightmare Wanderer, Hakkari Frostwing, Nightmare Whelp, Atal'ai Skeleton, Hakkari Sapper, Hakkari Minion, Hakkari Bloodkeeper, Nightmare Suppressor */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (1063, 5224, 5225, 5226, 5228, 5235, 5243, 5259, 5261, 5263, 5267, 5269, 5270, 5271, 5273, 5277, 5280, 5283, 5291, 8319, 8324, 8336, 8437, 8438, 8497); + +/* SWAMP OF SORROWS */ +/* Marsh Murloc, Adolescent Whelp, Dreaming Whelp, Wyrmkin Dreamwalker, Scalebane Captain, Deathstrike Tarantula */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (747, 740, 741, 743, 745, 769); + +/* TANARIS */ +/* Dunemaul Ogre Mage, Wastewander Shadow Mage, Sandfury Axe Thrower */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (5473, 5617, 5646); + +/* TELDRASSIL */ +/* Gnarlpine Mystic, Gnarlpine Pathfinder, Bloodfeather Sorceress, Webwood Spider, Giant Webwood Spider */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (7235, 2012, 2018, 1986, 2001); + +/* TIRISFAL GLADES */ +/* Scarlet Neophyte, Rot Hide Gnoll, Young Night Web Spider, Night Web Spider, Vicious Night Web Spider */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (1539, 1674, 1504, 1505, 1555); + +/* UN'GORO CRATER */ +/* Tar Creeper */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (6527); + +/* WAILING CAVERNS */ +/* Deviate Creeper */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (3632); + +/* WESTERN PLAGUELANDS */ +/* Skeletal Acolyte, Skeletal Flayer, Skeletal Sorcerer, Scarlet Mage, Araj the Summoner */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (1789, 1783, 1784, 1826, 1852); + +/* WESTFALL */ +/* Defias Pillager, Defias Smuggler, Defias Trapper, Defias Highwayman, Defias Knuckleduster, Defias Pathstalker, Defias Looter, Murloc Oracle, Murloc Hunter, Murloc Warrior, Murloc Tidehunter, Murloc Coastrunner, Riverpaw Scout, Riverpaw Mongrel, Riverpaw Brute, Riverpaw Herbalist, Defias Renegade Mage, Riverpaw Mystic */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (589, 95, 504, 122, 449, 121, 590, 517, 458, 171, 127, 126, 500, 123, 124, 501, 450, 453); + +/* WETLANDS */ +/* Bluegill Forager, Bluegill Murloc, Bluegill Muckdweller, Bluegill Raider, Bluegill Warrior, Bluegill Oracle, Mosshide Mistweaver, Mosshide Mystic, Mosshide Trapper, Mosshide Mongrel, Mosshide Gnoll, Fen Creeper, Red Whelp, Lost Whelp, Flamesnorting Whelp, Crimson Whelp */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (1026, 1024, 1028, 1418, 1027, 1029, 1009, 1013, 1011, 1008, 1007, 1040, 1042, 1043, 1044, 1069); + +/* WINTERSPRING */ +/* Cobalt Mageweaver, Chillwind Chimaera */ +UPDATE `creature_template` SET `ScriptName` = 'generic_creature' WHERE `entry` IN (7437, 7448); + + +/* EOF */ diff --git a/sql/scriptdev2_create_database.sql b/sql/scriptdev2_create_database.sql new file mode 100644 index 000000000..747dab2ac --- /dev/null +++ b/sql/scriptdev2_create_database.sql @@ -0,0 +1,4 @@ +CREATE DATABASE `scriptdev2` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; + +GRANT ALL PRIVILEGES ON `scriptdev2` . * TO 'mangos'@'localhost' WITH GRANT OPTION; + diff --git a/sql/scriptdev2_create_structure_mysql.sql b/sql/scriptdev2_create_structure_mysql.sql new file mode 100644 index 000000000..2ec41cf6b --- /dev/null +++ b/sql/scriptdev2_create_structure_mysql.sql @@ -0,0 +1,56 @@ +DROP TABLE IF EXISTS `custom_texts`; +CREATE TABLE `custom_texts` ( + `entry` mediumint(8) NOT NULL, + `content_default` text NOT NULL, + `content_loc1` text, + `content_loc2` text, + `content_loc3` text, + `content_loc4` text, + `content_loc5` text, + `content_loc6` text, + `content_loc7` text, + `content_loc8` text, + `sound` mediumint(8) unsigned NOT NULL DEFAULT '0', + `type` tinyint(3) unsigned NOT NULL DEFAULT '0', + `language` tinyint(3) unsigned NOT NULL DEFAULT '0', + `emote` smallint(5) unsigned NOT NULL DEFAULT '0', + `comment` text, + PRIMARY KEY (`entry`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Custom Texts'; + +DROP TABLE IF EXISTS `script_texts`; +CREATE TABLE `script_texts` ( + `entry` mediumint(8) NOT NULL, + `content_default` text NOT NULL, + `content_loc1` text, + `content_loc2` text, + `content_loc3` text, + `content_loc4` text, + `content_loc5` text, + `content_loc6` text, + `content_loc7` text, + `content_loc8` text, + `sound` mediumint(8) unsigned NOT NULL DEFAULT '0', + `type` tinyint(3) unsigned NOT NULL DEFAULT '0', + `language` tinyint(3) unsigned NOT NULL DEFAULT '0', + `emote` smallint(5) unsigned NOT NULL DEFAULT '0', + `comment` text, + PRIMARY KEY (`entry`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Script Texts'; + +DROP TABLE IF EXISTS script_waypoint; +CREATE TABLE script_waypoint ( + entry mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'creature_template entry', + pointid mediumint(8) unsigned NOT NULL DEFAULT '0', + location_x float NOT NULL DEFAULT '0', + location_y float NOT NULL DEFAULT '0', + location_z float NOT NULL DEFAULT '0', + waittime int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'waittime in millisecs', + point_comment text, + PRIMARY KEY (entry, pointid) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Script Creature waypoints'; + +DROP TABLE IF EXISTS `sd2_db_version`; +CREATE TABLE `sd2_db_version` ( + `version` varchar(255) NOT NULL default '' COMMENT 'Database version string' +) ENGINE=MyISAM DEFAULT CHARSET=utf8; diff --git a/sql/scriptdev2_create_structure_pgsql.sql b/sql/scriptdev2_create_structure_pgsql.sql new file mode 100644 index 000000000..0ae0359b6 --- /dev/null +++ b/sql/scriptdev2_create_structure_pgsql.sql @@ -0,0 +1,52 @@ +CREATE TABLE custom_texts ( + entry bigint NOT NULL, + content_default text NOT NULL, + content_loc1 text, + content_loc2 text, + content_loc3 text, + content_loc4 text, + content_loc5 text, + content_loc6 text, + content_loc7 text, + content_loc8 text, + sound integer DEFAULT 0 NOT NULL, + type smallint DEFAULT (0)::smallint NOT NULL, + language smallint DEFAULT (0)::smallint NOT NULL, + emote smallint DEFAULT (0)::smallint NOT NULL, + comment text, + PRIMARY KEY(entry) +); + +CREATE TABLE script_texts ( + entry bigint NOT NULL, + content_default text NOT NULL, + content_loc1 text, + content_loc2 text, + content_loc3 text, + content_loc4 text, + content_loc5 text, + content_loc6 text, + content_loc7 text, + content_loc8 text, + sound integer DEFAULT 0 NOT NULL, + type smallint DEFAULT (0)::smallint NOT NULL, + language smallint DEFAULT (0)::smallint NOT NULL, + emote smallint DEFAULT (0)::smallint NOT NULL, + comment text, + PRIMARY KEY(entry) +); + +CREATE TABLE script_waypoint ( + entry bigint NOT NULL, + pointid bigint NOT NULL, + location_x float DEFAULT (0)::float NOT NULL, + location_y float DEFAULT (0)::float NOT NULL, + location_z float DEFAULT (0)::float NOT NULL, + waittime integer DEFAULT 0 NOT NULL, + point_comment text, + PRIMARY KEY(entry,pointid) +); + +CREATE TABLE sd2_db_version ( + version varchar(255) NOT NULL DEFAULT '' +); diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql new file mode 100644 index 000000000..212fed458 --- /dev/null +++ b/sql/scriptdev2_script_full.sql @@ -0,0 +1,4198 @@ +-- +-- Version data (part used in command .server info ) +-- + +DELETE FROM sd2_db_version; +INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for MaNGOS 8645+) '); + +-- +-- Below contains data for table `script_texts` mainly used in C++ parts. +-- valid entries for table are between -1000000 and -1999999 +-- + +TRUNCATE script_texts; + +-- +-- -1 000 000 First 100 entries are reserved for special use, do not add regular text here. +-- + +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000000,'',0,0,0,0,'DEFAULT_TEXT'), +(-1000001,'%s goes into a killing frenzy!',0,2,0,0,'EMOTE_GENERIC_FRENZY_KILL'), +(-1000002,'%s goes into a frenzy!',0,2,0,0,'EMOTE_GENERIC_FRENZY'), +(-1000003,'%s becomes enraged!',0,2,0,0,'EMOTE_GENERIC_ENRAGED'), +(-1000004,'%s goes into a berserker rage!',0,2,0,0,'EMOTE_GENERIC_BERSERK'), +(-1000005,'%s goes into a frenzy!',0,3,0,0,'EMOTE_BOSS_GENERIC_FRENZY'); + +-- +-- Normal text entries below. Say/Yell/Whisper/Emote for any regular world object. +-- Text entries for text used by creatures in instances are using map id as part of entry. +-- Example: for map 430, the database text entry for all creatures normally on this map start with -1430 +-- Values decrement as they are made. +-- For creatures outside instance, use -1 000 100 and below. Decrement value as they are made. +-- +-- Comment should contain a unique name that can be easily identified later by using sql queries like for example +-- SELECT * FROM script_texts WHERE comment LIKE '%defias%'; +-- Place the define used in script itself at the end of the comment. +-- +-- Do not change entry without a very good reason. Localization projects depends on using entries that does not change! +-- Example: UPDATE script_texts SET content_loc1 = 'the translated text' WHERE entry = -1000100; +-- + +-- -1 000 100 GENERAL MAPS (not instance maps) +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000100,'Come, little ones. Face me!',0,1,0,0,'azuregos SAY_TELEPORT'), + +(-1000101,'Follow me, $N. I\'ll take you to the Defias hideout. But you better protect me or I am as good as dead',0,0,7,0,'defias traitor SAY_START'), +(-1000102,'The entrance is hidden here in Moonbrook. Keep your eyes peeled for thieves. They want me dead.',0,0,7,0,'defias traitor SAY_PROGRESS'), +(-1000103,'You can go tell Stoutmantle this is where the Defias Gang is holed up, $N.',0,0,7,0,'defias traitor SAY_END'), +(-1000104,'%s coming in fast! Prepare to fight!',0,0,7,0,'defias traitor SAY_AGGRO_1'), +(-1000105,'Help!',0,0,7,0,'defias traitor SAY_AGGRO_2'), + +(-1000106,'Everyone ready?',0,0,1,0,'torek SAY_READY'), +(-1000107,'Ok, Lets move out!',0,0,1,0,'torek SAY_MOVE'), +(-1000108,'Prepare yourselves. Silverwing is just around the bend.',0,0,1,0,'torek SAY_PREPARE'), +(-1000109,'Silverwing is ours!',0,0,1,0,'torek SAY_WIN'), +(-1000110,'Go report that the outpost is taken. We will remain here.',0,0,1,0,'torek SAY_END'), + +(-1000111, 'Our house is this way, through the thicket.',0,0,7,0,'magwin SAY_START'), +(-1000112, 'Help me!',0,0,7,0,'magwin SAY_AGGRO'), +(-1000113, 'My poor family. Everything has been destroyed.',0,0,7,0,'magwin SAY_PROGRESS'), +(-1000114, 'Father! Father! You\'re alive!',0,0,7,0,'magwin SAY_END1'), +(-1000115, 'You can thank $N for getting me back here safely, father.',0,0,7,0,'magwin SAY_END2'), +(-1000116, '%s hugs her father.',0,2,7,0,'magwin EMOTE_HUG'), + +(-1000117, 'Thank you for agreeing to help. Now, let\'s get out of here $N.',0,0,1,0,'wounded elf SAY_ELF_START'), +(-1000118, 'Over there! They\'re following us!',0,0,1,0,'wounded elf SAY_ELF_SUMMON1'), +(-1000119, 'Allow me a moment to rest. The journey taxes what little strength I have.',0,0,1,16,'wounded elf SAY_ELF_RESTING'), +(-1000120, 'Did you hear something?',0,0,1,0,'wounded elf SAY_ELF_SUMMON2'), +(-1000121, 'Falcon Watch, at last! Now, where\'s my... Oh no! My pack, it\'s missing! Where has -',0,0,1,0,'wounded elf SAY_ELF_COMPLETE'), +(-1000122, 'You won\'t keep me from getting to Falcon Watch!',0,0,1,0,'wounded elf SAY_ELF_AGGRO'), + +(-1000123, 'Ready when you are, $c.',0,0,0,15,'big will SAY_BIG_WILL_READY'), +(-1000124, 'The Affray has begun. $n, get ready to fight!',0,0,0,0,'twiggy SAY_TWIGGY_BEGIN'), +(-1000125, 'You! Enter the fray!',0,0,0,0,'twiggy SAY_TWIGGY_FRAY'), +(-1000126, 'Challenger is down!',0,0,0,0,'twiggy SAY_TWIGGY_DOWN'), +(-1000127, 'The Affray is over.',0,0,0,0,'twiggy SAY_TWIGGY_OVER'), + +(-1000128, 'We need you to send reinforcements to Manaforge Duro, Ardonis. This is not a request, it\'s an order.',0,0,0,0,'dawnforge SAY_COMMANDER_DAWNFORGE_1'), +(-1000129, 'You cannot be serious! We are severely understaffed and can barely keep this manaforge functional!',0,0,0,0,'dawnforge SAY_ARCANIST_ARDONIS_1'), +(-1000130, 'You will do as ordered. Manaforge Duro has come under heavy attack by mana creatures and the situation is out of control. Failure to comply will not be tolerated!',0,0,0,0,'dawnforge SAY_COMMANDER_DAWNFORGE_2'), +(-1000131, 'Indeed, it is not a request.',0,0,0,0,'dawnforge SAY_PATHALEON_CULATOR_IMAGE_1'), +(-1000132, 'My lord!',0,0,0,0,'dawnforge SAY_COMMANDER_DAWNFORGE_3'), +(-1000133, 'Duro will be reinforced! Ultris was a complete disaster. I will NOT have that mistake repeated!',0,0,0,0,'dawnforge PATHALEON_CULATOR_IMAGE_2'), +(-1000134, 'We\'ve had too many setbacks along the way: Hellfire Citadel, Fallen Sky Ridge, Firewing Point... Prince Kael\'thas will tolerate no further delays. I will tolerate nothing other than complete success!',0,0,0,0,'dawnforge PATHALEON_CULATOR_IMAGE_2_1'), +(-1000135, 'I am returning to Tempest Keep. See to it that I do not have reason to return!',0,0,0,0,'dawnforge PATHALEON_CULATOR_IMAGE_2_2' ), +(-1000136, 'Yes, my lord.',0,0,0,0,'dawnforge COMMANDER_DAWNFORGE_4 SAY_ARCANIST_ARDONIS_2'), +(-1000137, 'See to it, Ardonis!',0,0,0,0,'dawnforge COMMANDER_DAWNFORGE_5'), + +(-1000138, 'Avruu\'s magic... it still controls me. You must fight me, mortal. It\'s the only way to break the spell!',0,0,0,0,'aeranas SAY_SUMMON'), +(-1000139, 'Avruu\'s magic is broken! I\'m free once again!',0,0,0,0,'aeranas SAY_FREE'), + +(-1000140,'Let\'s go.',0,0,1,0,'lilatha SAY_START'), +(-1000141,'$N, let\'s use the antechamber to the right.',0,0,1,0,'lilatha SAY_PROGRESS1'), +(-1000142,'I can see the light at the end of the tunnel!',0,0,1,0,'lilatha SAY_PROGRESS2'), +(-1000143,'There\'s Farstrider Enclave now, $C. Not far to go... Look out! Troll ambush!!',0,0,1,0,'lilatha SAY_PROGRESS3'), +(-1000144,'Thank you for saving my life and bringing me back to safety, $N',0,0,1,0,'lilatha SAY_END1'), +(-1000145,'Captain Helios, I\'ve been rescued from the Amani Catacombs. Reporting for duty, sir!',0,0,1,0,'lilatha SAY_END2'), +(-1000146,'Liatha, get someone to look at those injuries. Thank you for bringing her back safely.',0,0,1,0,'lilatha CAPTAIN_ANSWER'), + +(-1000147,'I remember well the sting of defeat at the conclusion of the Third War. I have waited far too long for my revenge. Now the shadow of the Legion falls over this world. It is only a matter of time until all of your failed creation... is undone.',11332,1,0,0,'kazzak SAY_INTRO'), +(-1000148,'The Legion will conquer all!',11333,1,0,0,'kazzak SAY_AGGRO1'), +(-1000149,'All mortals will perish!',11334,1,0,0,'kazzak SAY_AGGRO2'), +(-1000150,'All life must be eradicated!',11335,1,0,0,'kazzak SAY_SURPREME1'), +(-1000151,'I\'ll rip the flesh from your bones!',11336,1,0,0,'kazzak SAY_SURPREME2'), +(-1000152,'Kirel Narak!',11337,1,0,0,'kazzak SAY_KILL1'), +(-1000153,'Contemptible wretch!',11338,1,0,0,'kazzak SAY_KILL2'), +(-1000154,'The universe will be remade.',11339,1,0,0,'kazzak SAY_KILL3'), +(-1000155,'The Legion... will never... fall.',11340,1,0,0,'kazzak SAY_DEATH'), +(-1000156,'REUSE ME',0,0,0,0,'REUSE ME'), +(-1000157,'Invaders, you dangle upon the precipice of oblivion! The Burning Legion comes and with it comes your end.',0,1,0,0,'kazzak SAY_RAND1'), +(-1000158,'Impudent whelps, you only delay the inevitable. Where one has fallen, ten shall rise. Such is the will of Kazzak...',0,1,0,0,'kazzak SAY_RAND2'), + +(-1000159,'Do not proceed. You will be eliminated!',11344,1,0,0,'doomwalker SAY_AGGRO'), +(-1000160,'Tectonic disruption commencing.',11345,1,0,0,'doomwalker SAY_EARTHQUAKE_1'), +(-1000161,'Magnitude set. Release.',11346,1,0,0,'doomwalker SAY_EARTHQUAKE_2'), +(-1000162,'Trajectory locked.',11347,1,0,0,'doomwalker SAY_OVERRUN_1'), +(-1000163,'Engage maximum speed.',11348,1,0,0,'doomwalker SAY_OVERRUN_2'), +(-1000164,'Threat level zero.',11349,1,0,0,'doomwalker SAY_SLAY_1'), +(-1000165,'Directive accomplished.',11350,1,0,0,'doomwalker SAY_SLAY_2'), +(-1000166,'Target exterminated.',11351,1,0,0,'doomwalker SAY_SLAY_3'), +(-1000167,'System failure in five, f-o-u-r...',11352,1,0,0,'doomwalker SAY_DEATH'), + +(-1000168,'Who dares awaken Aquementas?',0,1,0,0,'aquementas AGGRO_YELL_AQUE'), + +(-1000169,'Muahahahaha! You fool! You\'ve released me from my banishment in the interstices between space and time!',0,1,0,0,'nether_drake SAY_NIHIL_1'), +(-1000170,'All of Draenor shall quick beneath my feet! I will destroy this world and reshape it in my image!',0,1,0,0,'nether_drake SAY_NIHIL_2'), +(-1000171,'Where shall I begin? I cannot bother myself with a worm such as yourself. There is a world to be conquered!',0,1,0,0,'nether_drake SAY_NIHIL_3'), +(-1000172,'No doubt the fools that banished me are long dead. I shall take wing survey my demense. Pray to whatever gods you hold dear that we do not meet again.',0,1,0,0,'nether_drake SAY_NIHIL_4'), +(-1000173,'NOOOOooooooo!',0,1,0,0,'nether_drake SAY_NIHIL_INTERRUPT'), + +(-1000174,'Good $N, you are under the spell\'s influence. I must analyze it quickly, then we can talk.',0,0,7,0,'daranelle SAY_SPELL_INFLUENCE'), + +(-1000175,'Thank you, mortal.',0,0,11,0,' SAY_JUST_EATEN'), + +(-1000176,'The last thing I remember is the ship falling and us getting into the pods. I\'ll go see how I can help. Thank you!',0,0,7,0,'draenei_survivor SAY_HEAL1'), +(-1000177,'$C, Where am I? Who are you? Oh no! What happened to the ship?',0,0,7,0,'draenei_survivor SAY_HEAL2'), +(-1000178,'$C You saved me! I owe you a debt that I can never repay. I\'ll go see if I can help the others.',0,0,7,0,'draenei_survivor SAY_HEAL3'), +(-1000179,'Ugh... what is this place? Is that all that\'s left of the ship over there?',0,0,7,0,'draenei_survivor SAY_HEAL4'), +(-1000180,'Oh, the pain...',0,0,7,0,'draenei_survivor SAY_HELP1'), +(-1000181,'Everything hurts, Please make it stop...',0,0,7,0,'draenei_survivor SAY_HELP2'), +(-1000182,'Ughhh... I hurt. Can you help me?',0,0,7,0,'draenei_survivor SAY_HELP3'), +(-1000183,'I don\'t know if I can make it, please help me...',0,0,7,0,'draenei_survivor SAY_HELP4'), + +(-1000184,'Yes Master, all goes along as planned.',0,0,7,0,'engineer_spark SAY_TEXT'), +(-1000185,'%s puts the shell to his ear.',0,2,7,0,'engineer_spark EMOTE_SHELL'), +(-1000186,'Now I cut you!',0,1,7,0,'engineer_spark SAY_ATTACK'), + +(-1000187,'Thank you, dear $C, you just saved my life.',0,0,7,0,'faulk SAY_HEAL'), + +(-1000188,'Deployment sucessful. Trespassers will be neutralized.',0,0,0,0,'converted_sentry SAY_CONVERTED_1'), +(-1000189,'Objective acquired. Initiating security routines.',0,0,0,0,'converted_sentry SAY_CONVERTED_2'), + +(-1000190,'In Nagrand, food hunt ogre!',0,0,0,0,' SAY_LUMP_0'), +(-1000191,'You taste good with maybe a little salt and pepper.',0,0,0,0,' SAY_LUMP_1'), +(-1000192,'OK, OK! Lump give up!',0,0,0,0,' SAY_LUMP_DEFEAT'), + +(-1000193,'Thank you, dear $C, you just saved my life.',0,0,1,0,'stillblade SAY_HEAL'), + +(-1000194,'I give up! Please don\'t kill me!',0,0,0,0,'unkor SAY_SUBMIT'), + +(-1000195,'I choose the third option: KILLING YOU!',0,0,0,0,'floon SAY_FLOON_ATTACK'), + +(-1000196,'Belore...',0,0,1,0,'lady_sylvanas SAY_LAMENT_END'), +(-1000197,'%s kneels down and pick up the amulet.',0,2,1,0,'lady_sylvanas EMOTE_LAMENT_END'), + +(-1000198,'Taste blade, mongrel!',0,0,0,0,'SAY_GUARD_SIL_AGGRO1'), +(-1000199,'Please tell me that you didn\'t just do what I think you just did. Please tell me that I\'m not going to have to hurt you...',0,0,0,0,'SAY_GUARD_SIL_AGGRO2'), +(-1000200,'As if we don\'t have enough problems, you go and create more!',0,0,0,0,'SAY_GUARD_SIL_AGGRO3'), + +(-1000201,'I\'m saved! Thank you, doctor!',0,0,0,0,'injured_patient SAY_DOC1'), +(-1000202,'HOORAY! I AM SAVED!',0,0,0,0,'injured_patient SAY_DOC2'), +(-1000203,'Sweet, sweet embrace... take me...',0,0,0,0,'injured_patient SAY_DOC3'), + +(-1000204,'%s looks up at you quizzically. Maybe you should inspect it?',0,2,0,0,'cluck EMOTE_A_HELLO'), +(-1000205,'%s looks at you unexpectadly.',0,2,0,0,'cluck EMOTE_H_HELLO'), +(-1000206,'%s starts pecking at the feed.',0,2,0,0,'cluck EMOTE_CLUCK_TEXT2'), + +(-1000207,'You have my blessing',0,0,0,0,'ashyen_and_keleth SAY_REWARD_BLESS'), + +(-1000208,'Frenzyheart kill you if you come back. You no welcome here no more!',0,0,0,0,'vekjik SAY_TEXTID_VEKJIK1'), + +(-1000209,'Very well. Let\'s see what you have to show me, $N.',0,0,1,0,'anvilward SAY_ANVIL1'), +(-1000210,'What manner of trick is this, $R? If you seek to ambush me, I warn you I will not go down quietly!',0,0,1,0,'anvilward SAY_ANVIL2'), + +(-1000211,'Warning! %s emergency shutdown process initiated by $N. Shutdown will complete in two minutes.',0,2,0,0,'manaforge_control EMOTE_START'), +(-1000212,'Emergency shutdown will complete in one minute.',0,2,0,0,'manaforge_control EMOTE_60'), +(-1000213,'Emergency shutdown will complete in thirty seconds.',0,2,0,0,'manaforge_control EMOTE_30'), +(-1000214,'Emergency shutdown will complete in ten seconds.',0,2,0,0,'manaforge_control EMOTE_10'), +(-1000215,'Emergency shutdown complete.',0,2,0,0,'manaforge_control EMOTE_COMPLETE'), +(-1000216,'Emergency shutdown aborted.',0,2,0,0,'manaforge_control EMOTE_ABORT'), + +(-1000217,'Greetings, $N. I will guide you through the cavern. Please try and keep up.',0,3,0,0,'WHISPER_CUSTODIAN_1'), +(-1000218,'We do not know if the Caverns of Time have always been accessible to mortals. Truly, it is impossible to tell as the Timeless One is in perpetual motion, changing our timeways as he sees fit. What you see now may very well not exist tomorrow. You may wake up and have no memory of this place.',0,3,0,0,'WHISPER_CUSTODIAN_2'), +(-1000219,'It is strange, I know... Most mortals cannot actually comprehend what they see here, as often, what they see is not anchored within their own perception of reality.',0,3,0,0,'WHISPER_CUSTODIAN_3'), +(-1000220,'Follow me, please.',0,3,0,0,'WHISPER_CUSTODIAN_4'), +(-1000221,'There are only two truths to be found here: First, that time is chaotic, always in flux, and completely malleable and second, perception does not dictate reality.',0,3,0,0,'WHISPER_CUSTODIAN_5'), +(-1000222,'As custodians of time, we watch over and care for Nozdormu\'s realm. The master is away at the moment, which means that attempts are being made to dramatically alter time. The master never meddles in the affairs of mortals but instead corrects the alterations made to time by others. He is reactionary in this regard.',0,3,0,0,'WHISPER_CUSTODIAN_6'), +(-1000223,'For normal maintenance of time, the Keepers of Time are sufficient caretakers. We are able to deal with most ordinary disturbances. I speak of little things, such as rogue mages changing something in the past to elevate their status or wealth in the present.',0,3,0,0,'WHISPER_CUSTODIAN_7'), +(-1000224,'These tunnels that you see are called timeways. They are infinite in number. The ones that currently exist in your reality are what the master has deemed as \'trouble spots.\' These trouble spots may differ completely in theme but they always share a cause. That is, their existence is a result of the same temporal disturbance. Remember that should you venture inside one...',0,3,0,0,'WHISPER_CUSTODIAN_8'), +(-1000225,'This timeway is in great disarray! We have agents inside right now attempting to restore order. What information I have indicates that Thrall\'s freedom is in jeopardy. A malevolent organization known as the Infinite Dragonflight is trying to prevent his escape. I fear without outside assistance, all will be lost.',0,3,0,0,'WHISPER_CUSTODIAN_9'), +(-1000226,'We have very little information on this timeway. Sa\'at has been dispatched and is currently inside. The data we have gathered from his correspondence is that the Infinite Dragonflight are once again attempting to alter time. Could it be that the opening of the Dark Portal is being targeted for sabotage? Let us hope not...',0,3,0,0,'WHISPER_CUSTODIAN_10'), +(-1000227,'This timeway is currently collapsing. What that may hold for the past, present and future is currently unknown...',0,3,0,0,'WHISPER_CUSTODIAN_11'), +(-1000228,'The timeways are currently ranked in order from least catastrophic to most catastrophic. Note that they are all classified as catastrophic, meaning that any single one of these timeways collapsing would mean that your world would end. We only classify them in such a way so that the heroes and adventurers that are sent here know which timeway best suits their abilities.',0,3,0,0,'WHISPER_CUSTODIAN_12'), +(-1000229,'All we know of this timeway is that it leads to Mount Hyjal. The Infinite Dragonflight have gone to great lengths to prevent our involvement. We know next to nothing, mortal. Soridormi is currently attempting to break through the timeway\'s defenses but has thus far been unsuccessful. You might be our only hope of breaking through and resolving the conflict.',0,3,0,0,'WHISPER_CUSTODIAN_13'), +(-1000230,'Our time is at an end $N. I would wish you luck, if such a thing existed.',0,3,0,0,'WHISPER_CUSTODIAN_14'), + +(-1000231,'Ah, $GPriest:Priestess; you came along just in time. I appreciate it.',0,0,0,20,'garments SAY_COMMON_HEALED'), +(-1000232,'Thank you! Thank you, $GPriest:Priestess;. Now I can take on those gnolls with your power to back me!',0,0,1,4,'garments SAY_DG_KEL_THANKS'), +(-1000233,'Farewell to you, and may shadow always protect you!',0,0,1,3,'garments SAY_DG_KEL_GOODBYE'), + +(-1000234,'Follow me, stranger. This won\'t take long.',0,0,0,0,'SAY_KHAD_SERV_0'), +(-1000235,'Shattrath was once the draenei capital of this world. Its name means "dwelling of light."',0,4,0,0,'SAY_KHAD_SERV_1'), +(-1000236,'When the Burning Legion turned the orcs against the draenei, the fiercest battle was fought here. The draenei fought tooth and nail, but in the end the city fell.',0,4,0,0,'SAY_KHAD_SERV_2'), +(-1000237,'The city was left in ruins and darkness... until the Sha\'tar arrived.',0,4,0,0,'SAY_KHAD_SERV_3'), +(-1000238,'Let us go into the Lower City. I will warn you that as one of the only safe havens in Outland, Shattrath has attracted droves of refugees from all wars, current and past.',0,4,0,0,'SAY_KHAD_SERV_4'), +(-1000239,'The Sha\'tar, or "born from light" are the naaru that came to Outland to fight the demons of the Burning Legion.',0,4,0,0,'SAY_KHAD_SERV_5'), +(-1000240,'They were drawn to the ruins of Shattrath City where a small remnant of the draenei priesthood conducted its rites inside a ruined temple on this very spot.',0,4,0,0,'SAY_KHAD_SERV_6'), +(-1000241,'The priesthood, known as the Aldor, quickly regained its strength as word spread that the naaru had returned and reconstruction soon began. The ruined temple is now used as an infirmary for injured refugees.',0,4,0,0,'SAY_KHAD_SERV_7'), +(-1000242,'It wouldn\'t be long, however, before the city came under attack once again. This time, the attack came from Illidan\'s armies. A large regiment of blood elves had been sent by Illidan\'s ally, Kael\'thas Sunstrider, to lay waste to the city.',0,4,0,0,'SAY_KHAD_SERV_8'), +(-1000243,'As the regiment of blood elves crossed this very bridge, the Aldor\'s exarchs and vindicators lined up to defend the Terrace of Light. But then the unexpected happened.',0,4,0,0,'SAY_KHAD_SERV_9'), +(-1000244,'The blood elves laid down their weapons in front of the city\'s defenders; their leader, a blood elf elder known as Voren\'thal, stormed into the Terrace of Light and demanded to speak to A\'dal.',0,4,0,0,'SAY_KHAD_SERV_10'), +(-1000245,'As the naaru approached him, Voren\'thal kneeled before him and uttered the following words: "I\'ve seen you in a vision, naaru. My race\'s only hope for survival lies with you. My followers and I are here to serve you."',0,4,0,0,'SAY_KHAD_SERV_11'), +(-1000246,'The defection of Voren\'thal and his followers was the largest loss ever incurred by Kael\'s forces. And these weren\'t just any blood elves. Many of the best and brightest amongst Kael\'s scholars and magisters had been swayed by Voren\'thal\'s influence.',0,4,0,0,'SAY_KHAD_SERV_12'), +(-1000247,'The naaru accepted the defectors, who would become known as the Scryers; their dwelling lies in the platform above. Only those initiated with the Scryers are allowed there.',0,4,0,0,'SAY_KHAD_SERV_13'), +(-1000248,'The Aldor are followers of the Light and forgiveness and redemption are values they understand. However, they found hard to forget the deeds of the blood elves while under Kael\'s command.',0,4,0,0,'SAY_KHAD_SERV_14'), +(-1000249,'Many of the priesthood had been slain by the same magisters who now vowed to serve the naaru. They were not happy to share the city with their former enemies.',0,4,0,0,'SAY_KHAD_SERV_15'), +(-1000250,'The Aldor\'s most holy temple and its surrounding dwellings lie on the terrace above. As a holy site, only the initiated are welcome inside.',0,4,0,0,'SAY_KHAD_SERV_16'), +(-1000251,'The attacks against Shattrath continued, but the city did not fall\, as you can see. On the contrary, the naaru known as Xi\'ri led a successful incursion into Shadowmoon Valley - Illidan\'s doorstep.',0,4,0,0,'SAY_KHAD_SERV_17'), +(-1000252,'There he continues to wage war on Illidan with the assistance of the Aldor and the Scryers. The two factions have not given up on their old feuds, though.',0,4,0,0,'SAY_KHAD_SERV_18'), +(-1000253,'Such is their animosity that they vie for the honor of being sent to assist the naaru there. Each day, that decision is made here by A\'dal. The armies gather here to receive A\'dal\'s blessing before heading to Shadowmoon.',0,4,0,0,'SAY_KHAD_SERV_19'), +(-1000254,'Khadgar should be ready to see you again. Just remember that to serve the Sha\'tar you will most likely have to ally with the Aldor or the Scryers. And seeking the favor of one group will cause the others\' dislike.',0,4,0,0,'SAY_KHAD_SERV_20'), +(-1000255,'Good luck stranger, and welcome to Shattrath City.',0,4,0,0,'SAY_KHAD_SERV_21'), + +(-1000256,'Thank you! Thank you, $GPriest:Priestess;. Now I can take on those murlocs with the Light on my side!',0,0,7,4,'garments SAY_ROBERTS_THANKS'), +(-1000257,'Farewell to you, and may the Light be with you always.',0,0,7,3,'garments SAY_ROBERTS_GOODBYE'), +(-1000258,'Thank you! Thank you, $GPriest:Priestess;. Now I can take on those humans with your power to back me!',0,0,1,4,'garments SAY_KORJA_THANKS'), +(-1000259,'Farewell to you, and may our ancestors be with you always!',0,0,1,3,'garments SAY_KORJA_GOODBYE'), +(-1000260,'Thank you! Thank you, $GPriest:Priestess;. Now I can take on those wendigo with the Light on my side!',0,0,7,4,'garments SAY_DOLF_THANKS'), +(-1000261,'Farewell to you, and may the Light be with you always.',0,0,7,3,'garments SAY_DOLF_GOODBYE'), +(-1000262,'Thank you! Thank you, $GPriest:Priestess;. Now I can take on those corrupt timberlings with Elune\'s power behind me!',0,0,2,4,'garments SAY_SHAYA_THANKS'), +(-1000263,'Farewell to you, and may Elune be with you always.',0,0,2,3,'garments SAY_SHAYA_GOODBYE'), + +(-1000264,'Ok, $N. Follow me to the cave where I\'ll attempt to harness the power of the rune stone into these goggles.',0,0,0,1,'phizzlethorpe SAY_PROGRESS_1'), +(-1000265,'I discovered this cave on our first day here. I believe the energy in the stone can be used to our advantage.',0,0,0,1,'phizzlethorpe SAY_PROGRESS_2'), +(-1000266,'I\'ll begin drawing energy from the stone. Your job, $N, is to defend me. This place is cursed... trust me.',0,0,0,1,'phizzlethorpe SAY_PROGRESS_3'), +(-1000267,'%s begins tinkering with the goggles before the stone.',0,2,0,0,'phizzlethorpe EMOTE_PROGRESS_4'), +(-1000268,'Help!!! Get these things off me so I can get my work done!',0,0,0,0,'phizzlethorpe SAY_AGGRO'), +(-1000269,'Almost done! Just a little longer!',0,0,0,1,'phizzlethorpe SAY_PROGRESS_5'), +(-1000270,'I\'ve done it! I have harnessed the power of the stone into the goggles! Let\'s get out of here!',0,0,0,1,'phizzlethorpe SAY_PROGRESS_6'), +(-1000271,'Phew! Glad to be back from that creepy cave.',0,0,0,1,'phizzlethorpe SAY_PROGRESS_7'), +(-1000272,'%s hands one glowing goggles over to Doctor Draxlegauge.',0,2,0,0,'phizzlethorpe EMOTE_PROGRESS_8'), +(-1000273,'Doctor Draxlegauge will give you further instructions, $N. Many thanks for your help!',0,0,0,1,'phizzlethorpe SAY_PROGRESS_9'), + +(-1000274,'Time to teach you a lesson in manners, little $Gboy:girl;!',0,0,0,0,'larry SAY_START'), +(-1000275,'Now I\'m gonna give you to the count of \'3\' to get out of here before I sick the dogs on you.',0,0,0,0,'larry SAY_COUNT'), +(-1000276,'1...',0,0,0,0,'larry SAY_COUNT_1'), +(-1000277,'2...',0,0,0,0,'larry SAY_COUNT_2'), +(-1000278,'Time to meet your maker!',0,0,0,0,'larry SAY_ATTACK_5'), +(-1000279,'Alright, we give up! Don\'t hurt us!',0,0,0,0,'larry SAY_GIVEUP'), + +(-1000280, 'A shadowy, sinister presence has invaded the Emerald Dream. Its power is poised to spill over into our world, $N. We must oppose it! That\'s why I cannot accompany you in person.',0,0,0,1,'clintar SAY_START'), +(-1000281, 'The Emerald Dream will never be yours!',0,0,0,0,'clintar SAY_AGGRO_1'), +(-1000282, 'Begone from this place!',0,0,0,0,'clintar SAY_AGGRO_2'), +(-1000283, 'That\'s the first relic, but there are still two more. Follow me, $N.',0,0,0,0,'clintar SAY_RELIC1'), +(-1000284, 'I\'ve recovered the second relic. Take a moment to rest, and then we\'ll continue to the last reliquary.',0,0,0,0,'clintar SAY_RELIC2'), +(-1000285, 'We have all three of the relics, but my energy is rapidly fading. We must make our way back to Dreamwarden Lurosa! He will let you know what to do next.',0,0,0,0,'clintar SAY_RELIC3'), +(-1000286, 'Lurosa, I am entrusting the Relics of Aviana to $N, who will take them to Morthis Whisperwing. I must return completely to the Emerald Dream now. Do not let $N fail!',0,0,0,1,'clintar SAY_END'), + +(-1000287,'Emergency power activated! Initializing ambulanory motor! CLUCK!',0,0,0,0,'oox SAY_OOX_START'), +(-1000288,'Physical threat detected! Evasive action! CLUCK!',0,0,0,0,'oox SAY_OOX_AGGRO1'), +(-1000289,'Thread analyzed! Activating combat plan beta! CLUCK!',0,0,0,0,'oox SAY_OOX_AGGRO2'), +(-1000290,'CLUCK! Sensors detect spatial anomaly - danger imminent! CLUCK!',0,0,0,0,'oox SAY_OOX_AMBUSH'), +(-1000291,'No one challanges the Wastewander nomads - not even robotic chickens! ATTACK!',0,0,0,0,'oox SAY_OOX17_AMBUSH_REPLY'), +(-1000292,'Cloaking systems online! CLUCK! Engaging cloak for transport to Booty Bay!',0,0,0,0,'oox SAY_OOX_END'), + +(-1000293,'To the house! Stay close to me, no matter what! I have my gun and ammo there!',0,0,7,0,'stilwell SAY_DS_START'), +(-1000294,'We showed that one!',0,0,7,0,'stilwell SAY_DS_DOWN_1'), +(-1000295,'One more down!',0,0,7,0,'stilwell SAY_DS_DOWN_2'), +(-1000296,'We\'ve done it! We won!',0,0,7,0,'stilwell SAY_DS_DOWN_3'), +(-1000297,'Meet me down by the orchard--I just need to put my gun away.',0,0,7,0,'stilwell SAY_DS_PROLOGUE'), + +(-1000298, 'Alright, alright I think I can figure out how to operate this thing...',0,0,0,393,'wizzlecrank SAY_START'), +(-1000299, 'Arrrgh! This isn\'t right!',0,0,0,0,'wizzlecrank SAY_STARTUP1'), +(-1000300, 'Okay, I think I\'ve got it, now. Follow me, $n!',0,0,0,1,'wizzlecrank SAY_STARTUP2'), +(-1000301, 'There\'s the stolen shredder! Stop it or Lugwizzle will have our hides!',0,1,0,0,'wizzlecrank SAY_MERCENARY'), +(-1000302, 'Looks like we\'re out of woods, eh? Wonder what this does...',0,0,0,0,'wizzlecrank SAY_PROGRESS_1'), +(-1000303, 'Come on, don\'t break down on me now!',0,0,0,393,'wizzlecrank SAY_PROGRESS_2'), +(-1000304, 'That was a close one! Well, let\'s get going, it\'s still a ways to Ratchet!',0,0,0,0,'wizzlecrank SAY_PROGRESS_3'), +(-1000305, 'Hmm... I don\'t think this blinking red light is a good thing...',0,0,0,0,'wizzlecrank SAY_END'), + +(-1000306, 'Let\'s get to the others, and keep an eye open for those wolves cutside...',0,0,1,0,'erland SAY_START_1'), +(-1000307, 'Be careful, $N. Those wolves like to hide among the trees.',0,0,1,0,'erland SAY_START_2'), +(-1000308, 'A $C attacks!',0,0,1,0,'erland SAY_AGGRO_1'), +(-1000309, 'Beware! I am under attack!',0,0,1,0,'erland SAY_AGGRO_2'), +(-1000310, 'Oh no! A $C is upon us!',0,0,1,0,'erland SAY_AGGRO_3'), +(-1000311, 'We\'re almost there!',0,0,1,0,'erland SAY_PROGRESS'), +(-1000312, 'We made it! Thanks, $N. I couldn\'t have gotten without you.',0,0,1,0,'erland SAY_END'), +(-1000313, 'It\'s good to see you again, Erland. What is your report?',0,0,33,1,'erland SAY_RANE'), +(-1000314, 'Masses of wolves are to the east, and whoever lived at Malden\'s Orchard is gone.',0,0,1,1,'erland SAY_RANE_REPLY'), +(-1000315, 'If I am excused, then I\'d like to check on Quinn...',0,0,1,1,'erland SAY_CHECK_NEXT'), +(-1000316, 'Hello, Quinn. How are you faring?',0,0,1,1,'erland SAY_QUINN'), +(-1000317, 'I\'ve been better. Ivar the Foul got the better of me...',0,0,33,1,'erland SAY_QUINN_REPLY'), +(-1000318, 'Try to take better care of yourself, Quinn. You were lucky this time.',0,0,1,1,'erland SAY_BYE'), + +(-1000319, 'Let the trial begin, Bloodwrath, attack!',0,1,1,0,'kelerun SayId1'), +(-1000320, 'Champion Lightrend, make me proud!',0,1,1,0,'kelerun SayId2'), +(-1000321, 'Show this upstart how a real Blood Knight fights, Swiftblade!',0,1,1,0,'kelerun SayId3'), +(-1000322, 'Show $n the meaning of pain, Sunstriker!',0,1,1,0,'kelerun SayId4'), + +(-1000323, 'Mist! I feared I would never see you again! Yes, I am well, do not worry for me. You must rest and recover your health.',0,0,7,0,'mist SAY_AT_HOME'), +(-1000324, '%s growls in acknowledgement before straightening and making her way off into the forest.',0,2,0,0,'mist EMOTE_AT_HOME'), + +(-1000325, '"Threshwackonator First Mate unit prepared to follow"',0,2,0,0,'threshwackonator EMOTE_START'), +(-1000326, 'YARRR! Swabie, what have ye done?! He\'s gone mad! Baton him down the hatches! Hoist the mast! ARRRR! Every man for hi\'self!',0,0,7,0,'threshwackonator SAY_AT_CLOSE'), + +(-1000327, 'Ok, $n, let\'s go find where I left that mysterious fossil. Follow me!',0,0,7,0,'remtravel SAY_REM_START'), +(-1000328, 'Now where did I put that mysterious fossil? Ah, maybe up there...',0,0,7,0,'remtravel SAY_REM_RAMP1_1'), +(-1000329, 'Hrm, nothing up here.',0,0,7,0,'remtravel SAY_REM_RAMP1_2'), +(-1000330, 'No mysterious fossil here... Ah, but my copy of Green Hills of Stranglethorn. What a good book!',0,0,7,0,'remtravel SAY_REM_BOOK'), +(-1000331, 'I bet you I left it in the tent!',0,0,7,0,'remtravel SAY_REM_TENT1_1'), +(-1000332, 'Oh wait, that\'s Hollee\'s tent... and it\'s empty.',0,0,7,0,'remtravel SAY_REM_TENT1_2'), +(-1000333, 'Interesting... I hadn\'t noticed this earlier...',0,0,7,0,'remtravel SAY_REM_MOSS'), +(-1000334, '%s inspects the ancient, mossy stone.',0,2,7,0,'remtravel EMOTE_REM_MOSS'), +(-1000335, 'Oh wait! I\'m supposed to be looking for that mysterious fossil!',0,0,7,0,'remtravel SAY_REM_MOSS_PROGRESS'), +(-1000336, 'Nope. didn\'t leave the fossil back here!',0,0,7,0,'remtravel SAY_REM_PROGRESS'), +(-1000337, 'Ah. I remember now! I gave the mysterious fossil to Hollee! Check with her.',0,0,7,0,'remtravel SAY_REM_REMEMBER'), +(-1000338, '%s goes back to work, oblivious to everything around him.',0,2,7,0,'remtravel EMOTE_REM_END'), +(-1000339, 'Something tells me this $r wants the mysterious fossil too. Help!',0,0,7,0,'remtravel SAY_REM_AGGRO'), + +(-1000340, '%s howls in delight at the sight of his lunch!',0,2,0,0,'kyle EMOTE_SEE_LUNCH'), +(-1000341, '%s eats his lunch.',0,2,0,0,'kyle EMOTE_EAT_LUNCH'), +(-1000342, '%s thanks you with a special dance.',0,2,0,0,'kyle EMOTE_DANCE'), + +(-1000343, 'Is the way clear? Let\'s get out while we can, $N.',0,0,0,0,'kayra SAY_START'), +(-1000344, 'Looks like we won\'t get away so easy. Get ready!',0,0,0,0,'kayra SAY_AMBUSH1'), +(-1000345, 'Let\'s keep moving. We\'re not safe here!',0,0,0,0,'kayra SAY_PROGRESS'), +(-1000346, 'Look out, $N! Enemies ahead!',0,0,0,0,'kayra SAY_AMBUSH2'), +(-1000347, 'We\'re almost to the refuge! Let\'s go.',0,0,0,0,'kayra SAY_END'), + +(-1000348, 'Ah...the wondrous sound of kodos. I love the way they make the ground shake... inspect the beast for me.',0,0,0,0,'kodo round SAY_SMEED_HOME_1'), +(-1000349, 'Hey, look out with that kodo! You had better inspect that beast before i give you credit!',0,0,0,0,'kodo round SAY_SMEED_HOME_2'), +(-1000350, 'That kodo sure is a beauty. Wait a minute, where are my bifocals? Perhaps you should inspect the beast for me.',0,0,0,0,'kodo round SAY_SMEED_HOME_3'), + +(-1000351, 'You, there! Hand over that moonstone and nobody gets hurt!',0,1,0,0,'sprysprocket SAY_START'), +(-1000352, '%s takes the Southfury moonstone and escapes into the river. Follow her!',0,3,0,0,'sprysprocket EMOTE_START'), +(-1000353, 'Just chill!',0,4,0,0,'sprysprocket SAY_WHISPER_CHILL'), +(-1000354, 'Stupid grenade picked a fine time to backfire! So much for high quality goblin engineering!',0,1,0,0,'sprysprocket SAY_GRENADE_FAIL'), +(-1000355, 'All right, you win! I surrender! Just don\'t hurt me!',0,1,0,0,'sprysprocket SAY_END'), + +(-1000356,'Okay, okay... gimme a minute to rest now. You gone and beat me up good.',0,0,1,14,'calvin SAY_COMPLETE'), + +(-1000357,'Let\'s go before they find out I\'m free!',0,0,0,1,'KAYA_SAY_START'), +(-1000358,'Look out! We\'re under attack!',0,0,0,0,'KAYA_AMBUSH'), +(-1000359,'Thank you for helping me. I know my way back from here.',0,0,0,0,'KAYA_END'), + +(-1000360,'The strands of LIFE have been severed! The Dreamers must be avenged!',0,1,0,0,' ysondre SAY_AGGRO'), +(-1000361,'Come forth, ye Dreamers and claim your vengeance!',0,1,0,0,' ysondre SAY_SUMMONDRUIDS'), + +(-1000362,'Let\'s go $N. I am ready to reach Whitereach Post.',0,0,1,0,'paoka SAY_START'), +(-1000363,'Now this looks familiar. If we keep heading east, I think we can... Ahh, Wyvern on the attack!',0,0,1,0,'paoka SAY_WYVERN'), +(-1000364,'Thanks a bunch... I can find my way back to Whitereach Post from here. Be sure to talk with Motega Firemane; perhaps you can keep him from sending me home.',0,0,1,0,'paoka SAY_COMPLETE'), + +(-1000365,'Be on guard... Arnak has some strange power over the Grimtotem... they will not be happy to see me escape.',0,0,1,0,'lakota SAY_LAKO_START'), +(-1000366,'Look out, the Grimtotem are upon us!',0,0,1,0,'lakota SAY_LAKO_LOOK_OUT'), +(-1000367,'Here they come.',0,0,1,0,'lakota SAY_LAKO_HERE_COME'), +(-1000368,'More Grimtotems are coming this way!',0,0,1,0,'lakota SAY_LAKO_MORE'), +(-1000369,'Finally, free at last... I must be going now, thanks for helping me escape. I can get back to Freewind Post by myself.',0,0,1,0,'lakota SAY_LAKO_END'), + +(-1000370,'Stay close, $n. I\'ll need all the help I can get to break out of here. Let\'s go!',0,0,1,1,'gilthares SAY_GIL_START'), +(-1000371,'At last! Free from Northwatch Hold! I need a moment to catch my breath...',0,0,1,5,'gilthares SAY_GIL_AT_LAST'), +(-1000372,'Now i feel better. Let\'s get back to Ratchet. Come on, $n.',0,0,1,23,'gilthares SAY_GIL_PROCEED'), +(-1000373,'Looks like the Southsea Freeboters are heavily entrenched on the coast. This could get rough.',0,0,1,25,'gilthares SAY_GIL_FREEBOOTERS'), +(-1000374,'Help! $C attacking!',0,0,1,0,'gilthares SAY_GIL_AGGRO_1'), +(-1000375,'$C heading this way fast! Time for revenge!',0,0,1,0,'gilthares SAY_GIL_AGGRO_2'), +(-1000376,'$C coming right at us!',0,0,1,0,'gilthares SAY_GIL_AGGRO_3'), +(-1000377,'Get this $C off of me!',0,0,1,0,'gilthares SAY_GIL_AGGRO_4'), +(-1000378,'Almost back to Ratchet! Let\'s keep up the pace...',0,0,1,0,'gilthares SAY_GIL_ALMOST'), +(-1000379,'Ah, the sweet salt air of Ratchet.',0,0,1,0,'gilthares SAY_GIL_SWEET'), +(-1000380,'Captain Brightsun, $N here has freed me! $N, i am certain the Captain will reward your bravery.',0,0,1,66,'gilthares SAY_GIL_FREED'), + +(-1000381,'I sense the tortured spirits, $n. They are this way, come quickly!',0,0,0,1,'wilda SAY_WIL_START'), +(-1000382,'Watch out!',0,0,0,0,'wilda SAY_WIL_AGGRO1'), +(-1000383,'Naga attackers! Defend yourself!',0,0,0,0,'wilda SAY_WIL_AGGRO2'), +(-1000384,'Grant me protection $n, i must break trough their foul magic!',0,0,0,0,'wilda SAY_WIL_PROGRESS1'), +(-1000385,'The naga of Coilskar are exceptionally cruel to their prisoners. It is a miracle that I survived inside that watery prison for as long as I did. Earthmother be praised.',0,0,0,0,'wilda SAY_WIL_PROGRESS2'), +(-1000386,'Now we must find the exit.',0,0,0,0,'wilda SAY_WIL_FIND_EXIT'), +(-1000387,'Lady Vashj must answer for these atrocities. She must be brought to justice!',0,0,0,0,'wilda SAY_WIL_PROGRESS4'), +(-1000388,'The tumultuous nature of the great waterways of Azeroth and Draenor are a direct result of tormented water spirits.',0,0,0,0,'wilda SAY_WIL_PROGRESS5'), +(-1000389,'It shouldn\'t be much further, $n. The exit is just up ahead.',0,0,0,0,'wilda SAY_WIL_JUST_AHEAD'), +(-1000390,'Thank you, $n. Please return to my brethren at the Altar of Damnation, near the Hand of Gul\'dan, and tell them that Wilda is safe. May the Earthmother watch over you...',0,0,0,0,'wilda SAY_WIL_END'), + +(-1000391,'I\'m Thirsty.',0,0,0,0,'tooga SAY_TOOG_THIRST'), +(-1000392,'Torta must be so worried.',0,0,0,0,'tooga SAY_TOOG_WORRIED'), +(-1000393,'Torta, my love! I have returned at long last.',0,0,0,0,'tooga SAY_TOOG_POST_1'), +(-1000394,'You have any idea how long I\'ve been waiting here? And where\'s dinner? All that time gone and nothing to show for it?',0,0,0,0,'tooga SAY_TORT_POST_2'), +(-1000395,'My dearest Torta. I have been gone for so long. Finally we are reunited. At long last our love can blossom again.',0,0,0,0,'tooga SAY_TOOG_POST_3'), +(-1000396,'Enough with the rambling. I am starving! Now, get your dusty shell into that ocean and bring momma some grub.',0,0,0,0,'tooga SAY_TORT_POST_4'), +(-1000397,'Yes Torta. Whatever your heart desires...',0,0,0,0,'tooga SAY_TOOG_POST_5'), +(-1000398,'And try not to get lost this time...',0,0,0,0,'tooga SAY_TORT_POST_6'), + +(-1000399,'Peace is but a fleeting dream! Let the NIGHTMARE reign!',0,1,0,0,'taerar SAY_AGGRO'), +(-1000400,'Children of Madness - I release you upon this world!',0,1,0,0,'taerar SAY_SUMMONSHADE'), + +(-1000401,'Hope is a DISEASE of the soul! This land shall wither and die!',0,1,0,0,'emeriss SAY_AGGRO'), +(-1000402,'Taste your world\'s corruption!',0,1,0,0,'emeriss SAY_CASTCORRUPTION'), + +(-1000403,'Rin\'ji is free!',0,0,0,0,'SAY_RIN_FREE'), +(-1000404,'Attack my sisters! The troll must not escape!',0,0,0,0,'SAY_RIN_BY_OUTRUNNER'), +(-1000405,'Rin\'ji needs help!',0,0,1,0,'SAY_RIN_HELP_1'), +(-1000406,'Rin\'ji is being attacked!',0,0,1,0,'SAY_RIN_HELP_2'), +(-1000407,'Rin\'ji can see road now, $n. Rin\'ji knows the way home.',0,0,1,0,'SAY_RIN_COMPLETE'), +(-1000408,'Rin\'ji will tell you secret now... $n, should go to the Overlook Cliffs. Rin\'ji hid something on island there',0,0,1,0,'SAY_RIN_PROGRESS_1'), +(-1000409,'You find it, you keep it! Don\'t tell no one that Rin\'ji talked to you!',0,0,1,0,'SAY_RIN_PROGRESS_2'), + +(-1000410,'Here they come! Defend yourself!',0,0,1,5,'kanati SAY_KAN_START'), + +(-1000411,'Why don\'t we deal with you now, Hendel? Lady Proudmoore will speak for you back in the tower.',0,0,7,0,'hendel SAY_PROGRESS_1_TER'), +(-1000412,'Please... please... Miss Proudmore. I didn\'t mean to...',0,0,7,0,'hendel SAY_PROGRESS_2_HEN'), +(-1000413,'I apologize for taking so long to get here. I wanted Lady Proudmoore to be present also.',0,0,7,0,'hendel SAY_PROGRESS_3_TER'), +(-1000414,'We can only stay a few moments before returning to the tower. If you wish to speak to us more you may find us there.',0,0,7,0,'hendel SAY_PROGRESS_4_TER'), +(-1000415,'%s, too injured, gives up the chase.',0,2,0,0,'hendel EMOTE_SURRENDER'), + +(-1000416,'Well, I\'m not sure how far I\'ll make it in this state... I\'m feeling kind of faint...',0,0,0,0,'ringo SAY_RIN_START_1'), +(-1000417,'Remember, if I faint again, the water that Spraggle gave you will revive me.',0,0,0,0,'ringo SAY_RIN_START_2'), +(-1000418,'The heat... I can\'t take it...',0,0,0,0,'ringo SAY_FAINT_1'), +(-1000419,'Maybe... you could carry me?',0,0,0,0,'ringo SAY_FAINT_2'), +(-1000420,'Uuuuuuggggghhhhh....',0,0,0,0,'ringo SAY_FAINT_3'), +(-1000421,'I\'m not feeling so well...',0,0,0,0,'ringo SAY_FAINT_4'), +(-1000422,'Where... Where am I?',0,0,0,0,'ringo SAY_WAKE_1'), +(-1000423,'I am feeling a little better now, thank you.',0,0,0,0,'ringo SAY_WAKE_2'), +(-1000424,'Yes, I must go on.',0,0,0,0,'ringo SAY_WAKE_3'), +(-1000425,'How am I feeling? Quite soaked, thank you.',0,0,0,0,'ringo SAY_WAKE_4'), +(-1000426,'Spraggle! I didn\'t think I\'d make it back!',0,0,0,0,'ringo SAY_RIN_END_1'), +(-1000427,'Ringo! You\'re okay!',0,0,0,0,'ringo SAY_SPR_END_2'), +(-1000428,'Oh... I\'m feeling faint...',0,0,0,0,'ringo SAY_RIN_END_3'), +(-1000429,'%s collapses onto the ground.',0,2,0,0,'ringo EMOTE_RIN_END_4'), +(-1000430,'%s stands up after a short pause.',0,2,0,0,'ringo EMOTE_RIN_END_5'), +(-1000431,'Ugh.',0,0,0,0,'ringo SAY_RIN_END_6'), +(-1000432,'Ringo? Wake up! Don\'t worry, I\'ll take care of you.',0,0,0,0,'ringo SAY_SPR_END_7'), +(-1000433,'%s fades away after a long pause.',0,2,0,0,'ringo EMOTE_RIN_END_8'), + +(-1000434,'Liladris has been waiting for me at Maestra\'s Post, so we should make haste, $N.',0,0,0,0,'kerlonian SAY_KER_START'), +(-1000435,'%s looks very sleepy...',0,2,0,0,'kerlonian EMOTE_KER_SLEEP_1'), +(-1000436,'%s suddenly falls asleep',0,2,0,0,'kerlonian EMOTE_KER_SLEEP_2'), +(-1000437,'%s begins to drift off...',0,2,0,0,'kerlonian EMOTE_KER_SLEEP_3'), +(-1000438,'This looks like the perfect place for a nap...',0,0,0,0,'kerlonian SAY_KER_SLEEP_1'), +(-1000439,'Yaaaaawwwwwnnnn...',0,0,0,0,'kerlonian SAY_KER_SLEEP_2'), +(-1000440,'Oh, I am so tired...',0,0,0,0,'kerlonian SAY_KER_SLEEP_3'), +(-1000441,'You don\'t mind if I stop here for a moment, do you?',0,0,0,0,'kerlonian SAY_KER_SLEEP_4'), +(-1000442,'Be on the alert! The Blackwood furbolgs are numerous in the area...',0,0,0,0,'kerlonian SAY_KER_ALERT_1'), +(-1000443,'It\'s quiet... Too quiet...',0,0,0,0,'kerlonian SAY_KER_ALERT_2'), +(-1000444,'Oh, I can see Liladris from here... Tell her I\'m here, won\'t you?',0,0,0,0,'kerlonian SAY_KER_END'), +(-1000445,'%s wakes up!',0,2,0,0,'kerlonian EMOTE_KER_AWAKEN'), + +(-1000446,'A-Me good. Good, A-Me. Follow... follow A-Me. Home. A-Me go home.',0,0,0,0,'ame01 SAY_AME_START'), +(-1000447,'Good... good, A-Me. A-Me good. Home. Find home.',0,0,0,0,'ame01 SAY_AME_PROGRESS'), +(-1000448,'A-Me home! A-Me good! Good A-Me. Home. Home. Home.',0,0,0,0,'ame01 SAY_AME_END'), +(-1000449,'$c, no hurt A-Me. A-Me good.',0,0,0,0,'ame01 SAY_AME_AGGRO1'), +(-1000450,'Danger. Danger! $c try hurt A-Me.',0,0,0,0,'ame01 SAY_AME_AGGRO2'), +(-1000451,'Bad, $c. $c, bad!',0,0,0,0,'ame01 SAY_AME_AGGRO3'), + +(-1000452,'I noticed some fire on that island over there. A human, too. Let\'s go check it out, $n.',0,0,1,0,'ogron SAY_OGR_START'), +(-1000453,'That\'s Reethe alright. Let\'s go see what he has to say, yeah?',0,0,1,1,'ogron SAY_OGR_SPOT'), +(-1000454,'W-what do you want? Just leave me alone...',0,0,0,6,'ogron SAY_OGR_RET_WHAT'), +(-1000455,'I swear. I didn\'t steal anything from you! Here, take some of my supplies, just go away!',0,0,0,27,'ogron SAY_OGR_RET_SWEAR'), +(-1000456,'Just tell us what you know about the Shady Rest Inn, and I won\'t bash your skull in.',0,0,1,0,'ogron SAY_OGR_REPLY_RET'), +(-1000457,'I... Well, I may of taken a little thing or two from the inn... but what would an ogre care about that?',0,0,0,6,'ogron SAY_OGR_RET_TAKEN'), +(-1000458,'Look here, if you don\'t tell me about the fire--',0,0,1,0,'ogron SAY_OGR_TELL_FIRE'), +(-1000459,'Not one step closer, ogre!',0,0,0,27,'ogron SAY_OGR_RET_NOCLOSER'), +(-1000460,'And I don\'t know anything about this fire of yours...',0,0,0,0,'ogron SAY_OGR_RET_NOFIRE'), +(-1000461,'What was that? Did you hear something?',0,0,0,0,'ogron SAY_OGR_RET_HEAR'), +(-1000462,'Paval Reethe! Found you at last. And consorting with ogres now? No fear, even deserters and traitors are afforded some mercy.',0,0,0,0,'ogron SAY_OGR_CAL_FOUND'), +(-1000463,'Private, show Lieutenant Reethe some mercy.',0,0,0,29,'ogron SAY_OGR_CAL_MERCY'), +(-1000464,'Gladly, sir.',0,0,0,0,'ogron SAY_OGR_HALL_GLAD'), +(-1000465,'%s staggers backwards as the arrow lodges itself deeply in his chest.',0,2,0,0,'ogron EMOTE_OGR_RET_ARROW'), +(-1000466,'Ugh... Hallan, didn\'t think you had it in you...',0,0,0,34,'ogron SAY_OGR_RET_ARROW'), +(-1000467,'Now, let\'s clean up the rest of the trash, men!',0,0,0,0,'ogron SAY_OGR_CAL_CLEANUP'), +(-1000468,'Damn it! You\'d better not die on me, human!',0,0,1,0,'ogron SAY_OGR_NODIE'), +(-1000469,'Still with us, Reethe?',0,0,1,0,'ogron SAY_OGR_SURVIVE'), +(-1000470,'Must be your lucky day. Alright, I\'ll talk. Just leave me alone. Look, you\'re not going to believe me, but it wa... oh, Light, looks like the girl could shoot...',0,0,0,0,'ogron SAY_OGR_RET_LUCKY'), +(-1000471,'By the way, thanks for watching my back.',0,0,1,0,'ogron SAY_OGR_THANKS'), + +(-1000472,'1...',0,3,0,0,'mana bomb SAY_COUNT_1'), +(-1000473,'2...',0,3,0,0,'mana bomb SAY_COUNT_2'), +(-1000474,'3...',0,3,0,0,'mana bomb SAY_COUNT_3'), +(-1000475,'4...',0,3,0,0,'mana bomb SAY_COUNT_4'), +(-1000476,'5...',0,3,0,0,'mana bomb SAY_COUNT_5'), + +(-1000477,'Let us leave this place. I\'ve had enough of these madmen!',0,0,0,0,'akuno SAY_AKU_START'), +(-1000478,'You\'ll go nowhere, fool!',0,0,0,0,'akuno SAY_AKU_AMBUSH_A'), +(-1000479,'Beware! More cultists come!',0,0,0,0,'akuno SAY_AKU_AMBUSH_B'), +(-1000480,'You will not escape us so easily!',0,0,0,0,'akuno SAY_AKU_AMBUSH_B_REPLY'), +(-1000481,'I can find my way from here. My friend Mekeda will reward you for your kind actions.',0,0,0,0,'akuno SAY_AKU_COMPLETE'), + +(-1000482,'Look out!',0,0,0,0,'maghar captive SAY_MAG_START'), +(-1000483,'Don\'t let them escape! Kill the strong one first!',0,0,0,0,'maghar captive SAY_MAG_NO_ESCAPE'), +(-1000484,'More of them coming! Watch out!',0,0,0,0,'maghar captive SAY_MAG_MORE'), +(-1000485,'Where do you think you\'re going? Kill them all!',0,0,0,0,'maghar captive SAY_MAG_MORE_REPLY'), +(-1000486,'Ride the lightning, filth!',0,0,0,0,'maghar captive SAY_MAG_LIGHTNING'), +(-1000487,'FROST SHOCK!!!',0,0,0,0,'maghar captive SAY_MAG_SHOCK'), +(-1000488,'It is best that we split up now, in case they send more after us. Hopefully one of us will make it back to Garrosh. Farewell stranger.',0,0,0,0,'maghar captive SAY_MAG_COMPLETE'), + +(-1000489,'Show our guest around Shattrath, will you? Keep an eye out for pickpockets in the lower city.',0,0,0,0,'SAY_KHAD_START'), +(-1000490,'A newcomer to Shattrath! Make sure to drop by later. We can always use a hand with the injured.',0,0,0,0,'SAY_KHAD_INJURED'), +(-1000491,'Be mindful of what you say, this one\'s being shown around by Khadgar\'s pet.',0,0,0,0,'SAY_KHAD_MIND_YOU'), +(-1000492,'Are you joking? I\'m a Scryer, I always watch what i say. More enemies than allies in this city, it seems.',0,0,0,0,'SAY_KHAD_MIND_ALWAYS'), +(-1000493,'Light be with you, $n. And welcome to Shattrath.',0,0,0,0,'SAY_KHAD_ALDOR_GREET'), +(-1000494,'We\'re rather selective of who we befriend, $n. You think you have what it takes?',0,0,0,0,'SAY_KHAD_SCRYER_GREET'), +(-1000495,'Khadgar himself is showing you around? You must have made a good impression, $n.',0,0,0,0,'SAY_KHAD_HAGGARD'), + +(-1000496,'%s lifts its head into the air, as if listening for something.',0,2,0,0,'ancestral wolf EMOTE_WOLF_LIFT_HEAD'), +(-1000497,'%s lets out a howl that rings across the mountains to the north and motions for you to follow.',0,2,0,0,'ancestral wolf EMOTE_WOLF_HOWL'), +(-1000498,'Welcome, kind spirit. What has brought you to us?',0,0,0,0,'ancestral wolf SAY_WOLF_WELCOME'), + +(-1000499,'Puny $r wanna fight %s? Me beat you! Me boss here!',0,0,1,0,'morokk SAY_MOR_CHALLENGE'), +(-1000500,'Me scared! Me run now!',0,1,0,0,'morokk SAY_MOR_SCARED'), + +(-1000501,'Are you sure that you are ready? If we do not have a group of your allies to aid us, we will surely fail.',0,0,1,0,'muglash SAY_MUG_START1'), +(-1000502,'This will be a though fight, $n. Follow me closely.',0,0,1,0,'muglash SAY_MUG_START2'), +(-1000503,'This is the brazier, $n. Put it out. Vorsha is a beast, worthy of praise from no one!',0,0,1,0,'muglash SAY_MUG_BRAZIER'), +(-1000504,'Now we must wait. It won\'t be long before the naga realize what we have done.',0,0,1,0,'muglash SAY_MUG_BRAZIER_WAIT'), +(-1000505,'Be on your guard, $n!',0,0,1,0,'muglash SAY_MUG_ON_GUARD'), +(-1000506,'Perhaps we will get a moment to rest. But i will not give up until we have faced off against Vorsha!',0,0,1,0,'muglash SAY_MUG_REST'), +(-1000507,'We have done it!',0,0,1,0,'muglash SAY_MUG_DONE'), +(-1000508,'You have my deepest gratitude. I thank you.',0,0,1,0,'muglash SAY_MUG_GRATITUDE'), +(-1000509,'I am going to patrol the area for a while longer and ensure that things are truly safe.',0,0,1,0,'muglash SAY_MUG_PATROL'), +(-1000510,'Please return to Zoram\'gar and report our success to the Warsong runner.',0,0,1,0,'muglash SAY_MUG_RETURN'), + +(-1000511,'Aright, listen up! Form a circle around me and move out!',0,0,0,0,'letoll SAY_LE_START'), +(-1000512,'Aright, $r, just keep us safe from harm while we work. We\'ll pay you when we return.',0,0,0,0,'letoll SAY_LE_KEEP_SAFE'), +(-1000513,'The dig site is just north of here.',0,0,0,0,'letoll SAY_LE_NORTH'), +(-1000514,'We\'re here! Start diggin\'!',0,0,0,0,'letoll SAY_LE_ARRIVE'), +(-1000515,'I think there\'s somethin\' buried here, beneath the sand!',0,0,0,0,'letoll SAY_LE_BURIED'), +(-1000516,'Almost got it!',0,0,0,0,'letoll SAY_LE_ALMOST'), +(-1000517,'By brann\'s brittle bananas! What is it!? It... It looks like a drum.',0,0,0,0,'letoll SAY_LE_DRUM'), +(-1000518,'Wow... a drum.',0,0,0,0,'letoll SAY_LE_DRUM_REPLY'), +(-1000519,'This discovery will surely rock the foundation of modern archaeology.',0,0,0,0,'letoll SAY_LE_DISCOVERY'), +(-1000520,'Yea, great. Can we leave now? This desert is giving me hives.',0,0,0,0,'letoll SAY_LE_DISCOVERY_REPLY'), +(-1000521,'Have ye gone mad? You expect me to leave behind a drum without first beatin\' on it? Not this son of Ironforge! No sir!',0,0,0,0,'letoll SAY_LE_NO_LEAVE'), +(-1000522,'This reminds me of that one time where you made us search Silithus for evidence of sand gnomes.',0,0,0,0,'letoll SAY_LE_NO_LEAVE_REPLY1'), +(-1000523,'Or that time when you told us that you\'d discovered the cure for the plague of the 20th century. What is that even? 20th century?',0,0,0,0,'letoll SAY_LE_NO_LEAVE_REPLY2'), +(-1000524,'I don\'t think it can top the one time where he told us that he\'d heard that Artha\'s "cousin\'s" skeleton was frozen beneath a glacier in Winterspring. I\'ll never forgive you for that one, Letoll. I mean honestly... Artha\'s cousin?',0,0,0,0,'letoll SAY_LE_NO_LEAVE_REPLY3'), +(-1000525,'I dunno. It can\'t possibly beat the time he tried to convince us that we\'re all actually a figment of some being\'s imagination and that they only use us for their own personal amusement. That went over well during dinner with the family.',0,0,0,0,'letoll SAY_LE_NO_LEAVE_REPLY4'), +(-1000526,'Shut yer yaps! I\'m gonna bang on this drum and that\'s that!',0,0,0,0,'letoll SAY_LE_SHUT'), +(-1000527,'Say, do you guys hear that?',0,0,0,0,'letoll SAY_LE_REPLY_HEAR'), +(-1000528,'IN YOUR FACE! I told you there was somethin\' here!',0,0,0,0,'letoll SAY_LE_IN_YOUR_FACE'), +(-1000529,'Don\'t just stand there! Help him out!',0,0,0,0,'letoll SAY_LE_HELP_HIM'), +(-1000530,'%s picks up the drum.',0,2,0,0,'letoll EMOTE_LE_PICK_UP'), +(-1000531,'You\'ve been a tremendous help, $r! Let\'s get out of here before more of those things show up! I\'ll let Dwarfowitz know you did the job asked of ya\' admirably.',0,0,0,0,'letoll SAY_LE_THANKS'), + +(-1000532,'At your command, my liege...',0,0,0,0,'torloth TORLOTH_DIALOGUE1'), +(-1000533,'As you desire, Lord Illidan.',0,0,0,0,'torloth TORLOTH_DIALOGUE2'), +(-1000534,'Yes, Lord Illidan, I would sacrifice to you this magnificent physique. On this day you will fall - another victim of Torloth...',0,0,0,0,'torloth TORLOTH_DIALOGUE3'), +(-1000535,'Destroy them, Torloth. Let lose their blood like a river upon this hallowed ground.',0,0,0,0,'lordillidan ILLIDAN_DIALOGUE'), +(-1000536,'What manner of fool dares stand before Illidan Stormrage? Soldiers, destroy these insects!',0,1,0,0,'lordillidan ILLIDAN_SUMMON1'), +(-1000537,'You are no challenge for the Crimson Sigil. Mind breakers, end this nonsense.',0,1,0,0,'lordillidan ILLIDAN_SUMMON2'), +(-1000538,'Run while you still can. The highlords come soon...',0,1,0,0,'lordillidan ILLIDAN_SUMMON3'), +(-1000539,'Torloth your master calls!',0,1,0,0,'lordillidan ILLIDAN_SUMMON4'), +(-1000540,'So you have defeated the Crimson Sigil. You now seek to challenge my rule? Not even Arthas could defeat me, yet you dare to even harbor such thoughts? Then I say to you, come! Come $N! The Black Temple awaits...',0,1,0,0,'lordillidan EVENT_COMPLETED'), + +(-1000541,'%s jumps into the moonwell and goes underwater...',0,2,0,0,'kitten EMOTE_SAB_JUMP'), +(-1000542,'%s follows $n obediertly.',0,2,0,0,'kitten EMOTE_SAB_FOLLOW'), + +(-1000543,'Why have you come here, outsider? You will only find pain! Our fate will be yours...',0,0,0,25,'restless app SAY_RAND_1'), +(-1000544,'It was ... terrible... the demon...',0,0,0,25,'restless app SAY_RAND_2'), +(-1000545,'The darkness... the corruption... they came too quickly for anyone to know...',0,0,0,25,'restless app SAY_RAND_3'), +(-1000546,'The darkness will consume all... all the living...',0,0,0,25,'restless app SAY_RAND_4'), +(-1000547,'It is too late for us, living one. Take yourself and your friend away from here before you both are... claimed...',0,0,0,25,'restless app SAY_RAND_5'), +(-1000548,'It is too late for Jarl... its hold is too strong...',0,0,0,25,'restless app SAY_RAND_6'), +(-1000549,'Go away, whoever you are! Witch Hill is mine... mine!',0,0,0,25,'restless app SAY_RAND_7'), +(-1000550,'The manor... someone else... will soon be consumed...',0,0,0,25,'restless app SAY_RAND_8'); + +-- -1 033 000 SHADOWFANG KEEP +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1033000,'Follow me and I\'ll open the courtyard door for you.',0,0,7,1,'prisoner ashcrombe SAY_FREE_AS'), +(-1033001,'I have just the spell to get this door open. Too bad the cell doors weren\'t locked so haphazardly.',0,0,7,1,'prisoner ashcrombe SAY_OPEN_DOOR_AS'), +(-1033002,'There it is! Wide open. Good luck to you conquering what lies beyond. I must report back to the Kirin Tor at once!',0,0,7,1,'prisoner ashcrombe SAY_POST_DOOR_AS'), + +(-1033003,'Free from this wretched cell at last! Let me show you to the courtyard....',0,0,1,1,'prisoner adamant SAY_FREE_AD'), +(-1033004,'You are indeed courageous for wanting to brave the horrors that lie beyond this door.',0,0,1,1,'prisoner adamant SAY_OPEN_DOOR_AD'), +(-1033005,'There we go!',0,0,1,1,'prisoner adamant SAY_POST1_DOOR_AD'), +(-1033006,'Good luck with Arugal. I must hurry back to Hadrec now.',0,0,1,1,'prisoner adamant SAY_POST2_DOOR_AD'), + +(-1033007,'About time someone killed the wretch.',0,0,1,1,'prisoner adamant SAY_BOSS_DIE_AD'), +(-1033008,'For once I agree with you... scum.',0,0,7,1,'prisoner ashcrombe SAY_BOSS_DIE_AS'); + +-- -1 034 000 STOCKADES + +-- -1 036 000 DEADMINES +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1036000,'You there, check out that noise!',5775,1,7,0,'smite INST_SAY_ALARM1'), +(-1036001,'We\'re under attack! A vast, ye swabs! Repel the invaders!',5777,1,7,0,'smite INST_SAY_ALARM2'); + +-- -1 043 000 WAILING CAVERNS + +-- -1 047 000 RAZORFEN KRAUL + +-- -1 048 000 BLACKFATHOM DEEPS + +-- -1 070 000 ULDAMAN +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1070000,'None may steal the secrets of the makers!',5851,1,0,0,'ironaya SAY_AGGRO'); + +-- -1 090 000 GNOMEREGAN + +-- -1 109 000 SUNKEN TEMPLE + +-- -1 129 000 RAZORFEN DOWNS +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1129000,'You\'ll never leave this place... alive.',5825,1,0,0,'amnennar SAY_AGGRO'), +(-1129001,'To me, my servants!',5828,1,0,0,'amnennar SAY_SUMMON60'), +(-1129002,'Come, spirits, attend your master!',5829,1,0,0,'amnennar SAY_SUMMON30'), +(-1129003,'I am the hand of the Lich King!',5827,1,0,0,'amnennar SAY_HP'), +(-1129004,'Too...easy!',5826,1,0,0,'amnennar SAY_KILL'); + +-- -1 189 000 SCARLET MONASTERY +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1189000,'Ah, I have been waiting for a real challenge!',5830,1,0,0,'herod SAY_AGGRO'), +(-1189001,'Blades of Light!',5832,1,0,0,'herod SAY_WHIRLWIND'), +(-1189002,'Light, give me strength!',5833,1,0,0,'herod SAY_ENRAGE'), +(-1189003,'Hah, is that all?',5831,1,0,0,'herod SAY_KILL'), +(-1189004,'%s becomes enraged!',0,2,0,0,'herod EMOTE_ENRAGE'), + +(-1189005,'Infidels! They must be purified!',5835,1,0,0,'mograine SAY_MO_AGGRO'), +(-1189006,'Unworthy!',5836,1,0,0,'mograine SAY_MO_KILL'), +(-1189007,'At your side, milady!',5837,1,0,0,'mograine SAY_MO_RESSURECTED'), + +(-1189008,'What, Mograine has fallen? You shall pay for this treachery!',5838,1,0,0,'whitemane SAY_WH_INTRO'), +(-1189009,'The Light has spoken!',5839,1,0,0,'whitemane SAY_WH_KILL'), +(-1189010,'Arise, my champion!',5840,1,0,0,'whitemane SAY_WH_RESSURECT'), + +(-1189011,'Tell me... tell me everything!',5847,1,0,0,'vishas SAY_AGGRO'), +(-1189012,'Naughty secrets!',5849,1,0,0,'vishas SAY_HEALTH1'), +(-1189013,'I\'ll rip the secrets from your flesh!',5850,1,0,0,'vishas SAY_HEALTH2'), +(-1189014,'Purged by pain!',5848,1,0,0,'vishas SAY_KILL'), +(-1189015,'The monster got what he deserved.',0,0,1,0,'vishas SAY_TRIGGER_VORREL'), + +(-1189016,'We hunger for vengeance.',5844,1,0,0,'thalnos SAY_AGGRO'), +(-1189017,'No rest, for the angry dead.',5846,1,0,0,'thalnos SAY_HEALTH'), +(-1189018,'More... More souls.',5845,1,0,0,'thalnos SAY_KILL'), + +(-1189019,'You will not defile these mysteries!',5842,1,0,0,'doan SAY_AGGRO'), +(-1189020,'Burn in righteous fire!',5843,1,0,0,'doan SAY_SPECIALAE'), + +(-1189021,'Release the hounds!',5841,1,0,0,'loksey SAY_AGGRO'), + +(-1189022,'It is over, your search is done! Let fate choose now, the righteous one.',11961,1,0,0,'horseman SAY_ENTRANCE'), +(-1189023,'Here\'s my body, fit and pure! Now, your blackened souls I\'ll cure!',12567,1,0,0,'horseman SAY_REJOINED'), +(-1189024,'So eager you are for my blood to spill, yet to vanquish me this my head you must kill!',11969,1,0,0,'horseman SAY_BODY_DEFEAT'), +(-1189025,'Over here, you idiot!',12569,1,0,0,'horseman SAY_LOST_HEAD'), +(-1189026,'Harken, cur! Tis you I spurn! Now, $N, feel the burn!',12573,1,0,0,'horseman SAY_CONFLAGRATION'), +(-1189027,'Soldiers arise, stand and fight! Bring victory at last to this fallen knight!',11963,1,0,0,'horseman SAY_SPROUTING_PUMPKINS'), +(-1189028,'Your body lies beaten, battered and broken. Let my curse be your own, fate has spoken.',11962,1,0,0,'horseman SAY_SLAY'), +(-1189029,'This end have I reached before. What new adventure lies in store?',11964,1,0,0,'horseman SAY_DEATH'), +(-1189030,'%s laughs.',0,2,0,0,'horseman EMOTE_LAUGH'), +(-1189031,'Horseman rise...',0,0,0,0,'horseman SAY_PLAYER1'), +(-1189032,'Your time is night...',0,0,0,0,'horseman SAY_PLAYER2'), +(-1189033,'You felt death once...',0,0,0,0,'horseman SAY_PLAYER3'), +(-1189034,'Now, know demise!',0,0,0,0,'horseman SAY_PLAYER4'); + +-- -1 209 000 ZUL'FARRAK + +-- -1 229 000 BLACKROCK SPIRE + +-- -1 230 000 BLACKROCK DEPTHS +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1230000,'Ah, hits the spot!',0,0,0,0,'rocknot SAY_GOT_BEER'), +(-1230001,'Come to aid the Throne!',0,1,0,0,'dagran SAY_AGGRO'), +(-1230002,'Hail to the king, baby!',0,1,0,0,'dagran SAY_SLAY'), +(-1230003,'You have challenged the Seven, and now you will die!',0,0,0,0,'doomrel SAY_DOOMREL_START_EVENT'); + +-- -1 249 000 ONYXIA'S LAIR +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1249000,'How fortuitous. Usually, I must leave my lair to feed.',0,1,0,0,'onyxia SAY_AGGRO'), +(-1249001,'Learn your place mortal!',0,1,0,0,'onyxia SAY_KILL'), +(-1249002,'This meaningless exertion bores me. I\'ll incinerate you all from above!',0,1,0,254,'onyxia SAY_PHASE_2_TRANS'), +(-1249003,'It seems you\'ll need another lesson, mortals!',0,1,0,293,'onyxia SAY_PHASE_3_TRANS'), +(-1249004,'%s takes in a deep breath...',0,3,0,0,'onyxia EMOTE_BREATH'); + +-- -1 269 000 OPENING OF THE DARK PORTAL (BLACK MORASS) +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1269000,'Why do you persist? Surely you can see the futility of it all. It is not too late! You may still leave with your lives ...',10442,1,0,0,'temporus SAY_ENTER'), +(-1269001,'So be it ... you have been warned.',10444,1,0,0,'temporus SAY_AGGRO'), +(-1269002,'Time... sands of time is run out for you.',10443,1,0,0,'temporus SAY_BANISH'), +(-1269003,'You should have left when you had the chance.',10445,1,0,0,'temporus SAY_SLAY1'), +(-1269004,'Your days are done.',10446,1,0,0,'temporus SAY_SLAY2'), +(-1269005,'My death means ... little.',10447,1,0,0,'temporus SAY_DEATH'), + +(-1269006,'Why do you aid the Magus? Just think of how many lives could be saved if the portal is never opened, if the resulting wars could be erased ...',10412,1,0,0,'chrono_lord_deja SAY_ENTER'), +(-1269007,'If you will not cease this foolish quest, then you will die!',10414,1,0,0,'chrono_lord_deja SAY_AGGRO'), +(-1269008,'You have outstayed your welcome, Timekeeper. Begone!',10413,1,0,0,'chrono_lord_deja SAY_BANISH'), +(-1269009,'I told you it was a fool\'s quest!',10415,1,0,0,'chrono_lord_deja SAY_SLAY1'), +(-1269010,'Leaving so soon?',10416,1,0,0,'chrono_lord_deja SAY_SLAY2'), +(-1269011,'Time ... is on our side.',10417,1,0,0,'chrono_lord_deja SAY_DEATH'), + +(-1269012,'The time has come to shatter this clockwork universe forever! Let us no longer be slaves of the hourglass! I warn you: those who do not embrace the greater path shall become victims of its passing!',10400,1,0,0,'aeonus SAY_ENTER'), +(-1269013,'Let us see what fate lays in store...',10402,1,0,0,'aeonus SAY_AGGRO'), +(-1269014,'Your time is up, slave of the past!',10401,1,0,0,'aeonus SAY_BANISH'), +(-1269015,'One less obstacle in our way!',10403,1,0,0,'aeonus SAY_SLAY1'), +(-1269016,'No one can stop us! No one!',10404,1,0,0,'aeonus SAY_SLAY2'), +(-1269017,'It is only a matter...of time.',10405,1,0,0,'aeonus SAY_DEATH'), +(-1269018,'REUSE ME',0,0,0,0,'REUSE ME'), + +(-1269019,'Stop! Do not go further, mortals. You are ill-prepared to face the forces of the Infinite Dragonflight. Come, let me help you.',0,0,0,0,'saat SAY_SAAT_WELCOME'), + +(-1269020,'The time has come! Gul\'dan, order your warlocks to double their efforts! Moments from now the gateway will open, and your Horde will be released upon this ripe, unsuspecting world!',10435,1,0,0,'medivh SAY_ENTER'), +(-1269021,'What is this? Champions, coming to my aid? I sense the hand of the dark one in this. Truly this sacred event bears his blessing?',10436,1,0,0,'medivh SAY_INTRO'), +(-1269022,'Champions, my shield grows weak!',10437,1,0,0,'medivh SAY_WEAK75'), +(-1269023,'My powers must be concentrated on the portal! I do not have time to hold the shield!',10438,1,0,0,'medivh SAY_WEAK50'), +(-1269024,'The shield is nearly gone! All that I have worked for is in danger!',10439,1,0,0,'medivh SAY_WEAK25'), +(-1269025,'No... damn this feeble mortal coil...',10441,1,0,0,'medivh SAY_DEATH'), +(-1269026,'I am grateful for your aid, champions. Now, Gul\'dan\'s Horde will sweep across this world, like a locust swarm, and all my designs, all my carefully laid plans will at last fall into place.',10440,1,0,0,'medivh SAY_WIN'), +(-1269027,'Orcs of the Horde! This portalis the gateway to your new destiny! Azeroth lies before you, ripe for the taking!',0,1,0,0,'medivh SAY_ORCS_ENTER'), +(-1269028,'Gul\'dan speaks the truth! We should return at once to tell our brothers of the news! Retreat back trought the portal!',0,1,0,0,'medivh SAY_ORCS_ANSWER'); + +-- -1 289 000 SCHOLOMANCE + +-- -1 309 000 ZUL'GURUB +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1309000,'Let the coils of hate unfurl!',8421,1,0,0,'venoxis SAY_TRANSFORM'), +(-1309001,'Ssserenity..at lassst!',0,1,0,0,'venoxis SAY_DEATH'), + +(-1309002,'Lord Hir\'eek, grant me wings of vengance!',8417,1,0,0,'jeklik SAY_AGGRO'), +(-1309003,'I command you to rain fire down upon these invaders!',0,1,0,0,'jeklik SAY_RAIN_FIRE'), +(-1309004,'Finally ...death. Curse you Hakkar! Curse you!',8422,1,0,0,'jeklik SAY_DEATH'), + +(-1309005,'Draw me to your web mistress Shadra. Unleash your venom!',8418,1,0,0,'marli SAY_AGGRO'), +(-1309006,'Shadra, make of me your avatar!',0,1,0,0,'marli SAY_TRANSFORM'), +(-1309007,'Aid me my brood!',0,1,0,0,'marli SAY_SPIDER_SPAWN'), +(-1309008,'Bless you mortal for this release. Hakkar controls me no longer...',8423,1,0,0,'marli SAY_DEATH'), + +(-1309009,'Shirvallah, fill me with your RAGE!',8419,1,0,0,'thekal SAY_AGGRO'), +(-1309010,'Hakkar binds me no more! Peace at last!',8424,1,0,0,'thekal SAY_DEATH'), + +(-1309011,'Bethekk, your priestess calls upon your might!',8416,1,0,0,'arlokk SAY_AGGRO'), +(-1309012,'Feast on $n, my pretties!',0,1,0,0,'arlokk SAY_FEAST_PANTHER'), +(-1309013,'At last, I am free of the Soulflayer!',8412,1,0,0,'arlokk SAY_DEATH'), + +(-1309014,'Welcome to da great show friends! Step right up to die!',8425,1,0,0,'jindo SAY_AGGRO'), + +(-1309015,'I\'ll feed your souls to Hakkar himself!',8413,1,0,0,'mandokir SAY_AGGRO'), +(-1309016,'DING!',0,1,0,0,'mandokir SAY_DING_KILL'), +(-1309017,'GRATS!',0,1,0,0,'mandokir SAY_GRATS_JINDO'), +(-1309018,'$N! I\'m watching you!',0,1,0,0,'mandokir SAY_WATCH'), +(-1309019,'Don\'t make me angry. You won\'t like it when I\'m angry.',0,4,0,0,'mandokir SAY_WATCH_WHISPER'), + +(-1309020,'PRIDE HERALDS THE END OF YOUR WORLD. COME, MORTALS! FACE THE WRATH OF THE SOULFLAYER!',8414,1,0,0,'hakkar SAY_AGGRO'), +(-1309021,'Fleeing will do you no good, mortals!',0,1,0,0,'hakkar SAY_FLEEING'), +(-1309022,'You dare set foot upon Hakkari holy ground? Minions of Hakkar, destroy the infidels!',0,1,0,0,'hakkar SAY_MINION_DESTROY'), +(-1309023,'Minions of Hakkar, hear your God. The sanctity of this temple has been compromised. Invaders encroach upon holy ground! The Altar of Blood must be protected. Kill them all!',0,1,0,0,'hakkar SAY_PROTECT_ALTAR'), + +(-1309024,'%s goes into a rage after seeing his raptor fall in battle!',0,2,0,0,'mandokir EMOTE_RAGE'); + +-- -1 329 000 STRATHOLME +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1329000,'Thanks to Egan',0,0,0,0,'freed_soul SAY_ZAPPED0'), +(-1329001,'Rivendare must die',0,0,0,0,'freed_soul SAY_ZAPPED1'), +(-1329002,'Who you gonna call?',0,0,0,0,'freed_soul SAY_ZAPPED2'), +(-1329003,'Don\'t cross those beams!',0,0,0,0,'freed_soul SAY_ZAPPED3'); + +-- -1 349 000 MARAUDON + +-- -1 389 000 RAGEFIRE CHASM + +-- -1 409 000 MOLTEN CORE +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1409000,'%s performs one last service for Ragnaros.',0,2,0,0,'geddon EMOTE_SERVICE'), +(-1409001,'REUSE ME',0,0,0,0,'REUSE ME'), +(-1409002,'%s refuses to die while its master is in trouble.',0,2,0,0,'core rager EMOTE_LOWHP'), + +(-1409003,'Reckless mortals, none may challenge the sons of the living flame!',8035,1,0,0,'majordomo SAY_AGGRO'), +(-1409004,'The runes of warding have been destroyed! Hunt down the infedels my bretheren.',8039,1,0,0,'majordomo SAY_SPAWN'), +(-1409005,'Ashes to Ashes!',8037,1,0,0,'majordomo SAY_SLAY'), +(-1409006,'Burn mortals! Burn for this transgression!',8036,1,0,0,'majordomo SAY_SPECIAL'), +(-1409007,'Impossible! Stay your attack mortals! I submitt! I submitt! Brashly you have come to rest the secrets of the living flame. You will soon regret the recklessness of your quest. I go now to summon the lord whos house this is. Should you seek an audiance with him your paltry lives will surly be forfit. Nevertheless seek out his lair if you dare!',8038,1,0,0,'majordomo SAY_DEFEAT'), + +(-1409008,'Behold Ragnaros, the Firelord! He who was ancient when this world was young! Bow before him, mortals! Bow before your ending!',8040,1,0,0,'ragnaros SAY_SUMMON_MAJ'), +(-1409009,'TOO SOON! YOU HAVE AWAKENED ME TOO SOON, EXECUTUS! WHAT IS THE MEANING OF THIS INTRUSION?',8043,1,0,0,'ragnaros SAY_ARRIVAL1_RAG'), +(-1409010,'These mortal infidels, my lord! They have invaded your sanctum, and seek to steal your secrets!',8041,1,0,0,'ragnaros SAY_ARRIVAL2_MAJ'), +(-1409011,'FOOL! YOU ALLOWED THESE INSECTS TO RUN RAMPANT THROUGH THE HALLOWED CORE, AND NOW YOU LEAD THEM TO MY VERY LAIR? YOU HAVE FAILED ME, EXECUTUS! JUSTICE SHALL BE MET, INDEED!',8044,1,0,0,'ragnaros SAY_ARRIVAL3_RAG'), +(-1409012,'NOW FOR YOU, INSECTS. BOLDLY YOU SAUGHT THE POWER OF RAGNAROS NOW YOU SHALL SEE IT FIRST HAND.',8045,1,0,0,'ragnaros SAY_ARRIVAL5_RAG'), + +(-1409013,'COME FORTH, MY SERVANTS! DEFEND YOUR MASTER!',8049,1,0,0,'ragnaros SAY_REINFORCEMENTS1'), +(-1409014,'YOU CANNOT DEFEAT THE LIVING FLAME! COME YOU MINIONS OF FIRE! COME FORTH YOU CREATURES OF HATE! YOUR MASTER CALLS!',8050,1,0,0,'ragnaros SAY_REINFORCEMENTS2'), +(-1409015,'BY FIRE BE PURGED!',8046,1,0,0,'ragnaros SAY_HAND'), +(-1409016,'TASTE THE FLAMES OF SULFURON!',8047,1,0,0,'ragnaros SAY_WRATH'), +(-1409017,'DIE INSECT!',8051,1,0,0,'ragnaros SAY_KILL'), +(-1409018,'MY PATIENCE IS DWINDILING! COME NATS TO YOUR DEATH!',8048,1,0,0,'ragnaros SAY_MAGMABURST'); + +-- -1 429 000 DIRE MAUL + +-- -1 469 000 BLACKWING LAIR +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1469000,'None of your kind should be here! You\'ve doomed only yourselves!',8286,1,0,0,'broodlord SAY_AGGRO'), +(-1469001,'Clever Mortals but I am not so easily lured away from my sanctum!',8287,1,0,0,'broodlord SAY_LEASH'), + +(-1469002,'REUSE ME',0,0,0,0,'REUSE ME'), +(-1469003,'%s flinches as its skin shimmers.',0,2,0,0,'chromaggus EMOTE_SHIMMER'), + +(-1469004,'In this world where time is your enemy, it is my greatest ally. This grand game of life that you think you play in fact plays you. To that I say...',0,0,0,0,'victor_nefarius SAY_GAMESBEGIN_1'), +(-1469005,'Let the games begin!',8280,1,0,0,'victor_nefarius SAY_GAMESBEGIN_2'), +(-1469006,'Ah, the heroes. You are persistent, aren\'t you. Your allied attempted to match his power against mine, and had to pay the price. Now he shall serve me, by slaughtering you. Get up little red wyrm and destroy them!',8279,1,0,0,'victor_nefarius SAY_VAEL_INTRO'), + +(-1469007,'Well done, my minions. The mortals\' courage begins to wane! Now, let\'s see how they contend with the true Lord of Blackrock Spire!',8288,1,0,0,'nefarian SAY_AGGRO'), +(-1469008,'Enough! Now you vermin shall feel the force of my birthright, the fury of the earth itself.',8289,1,0,0,'nefarian SAY_XHEALTH'), +(-1469009,'Burn, you wretches! Burn!',8290,1,0,0,'nefarian SAY_SHADOWFLAME'), +(-1469010,'Impossible! Rise my minions! Serve your master once more!',8291,1,0,0,'nefarian SAY_RAISE_SKELETONS'), +(-1469011,'Worthless $N! Your friends will join you soon enough!',8293,1,0,0,'nefarian SAY_SLAY'), +(-1469012,'This cannot be! I am the Master here! You mortals are nothing to my kind! DO YOU HEAR? NOTHING!',8292,1,0,0,'nefarian SAY_DEATH'), +(-1469013,'Mages too? You should be more careful when you play with magic...',0,1,0,0,'nefarian SAY_MAGE'), +(-1469014,'Warriors, I know you can hit harder than that! Let\'s see it!',0,1,0,0,'nefarian SAY_WARRIOR'), +(-1469015,'Druids and your silly shapeshifting. Let\'s see it in action!',0,1,0,0,'nefarian SAY_DRUID'), +(-1469016,'Priests! If you\'re going to keep healing like that, we might as well make it a little more interesting!',0,1,0,0,'nefarian SAY_PRIEST'), +(-1469017,'Paladins, I\'ve heard you have many lives. Show me.',0,1,0,0,'nefarian SAY_PALADIN'), +(-1469018,'Shamans, show me what your totems can do!',0,1,0,0,'nefarian SAY_SHAMAN'), +(-1469019,'Warlocks, you shouldn\'t be playing with magic you don\'t understand. See what happens?',0,1,0,0,'nefarian SAY_WARLOCK'), +(-1469020,'Hunters and your annoying pea-shooters!',0,1,0,0,'nefarian SAY_HUNTER'), +(-1469021,'Rogues? Stop hiding and face me!',0,1,0,0,'nefarian SAY_ROGUE'), + +(-1469022,'You\'ll pay for forcing me to do this.',8275,1,0,0,'razorgore SAY_EGGS_BROKEN1'), +(-1469023,'Fools! These eggs are more precious than you know.',8276,1,0,0,'razorgore SAY_EGGS_BROKEN2'), +(-1469024,'No! Not another one! I\'ll have your heads for this atrocity.',8277,1,0,0,'razorgore SAY_EGGS_BROKEN3'), +(-1469025,'If I fall into the abyss I\'ll take all of you mortals with me...',8278,1,0,0,'razorgore SAY_DEATH'), + +(-1469026,'Too late...friends. Nefarius\' corruption has taken hold. I cannot...control myself.',8281,1,0,0,'vaelastrasz SAY_LINE1'), +(-1469027,'I beg you Mortals, flee! Flee before I lose all control. The Black Fire rages within my heart. I must release it!',8282,1,0,0,'vaelastrasz SAY_LINE2'), +(-1469028,'FLAME! DEATH! DESTRUCTION! COWER MORTALS BEFORE THE WRATH OF LORD....NO! I MUST FIGHT THIS!',8283,1,0,0,'vaelastrasz SAY_LINE3'), +(-1469029,'Nefarius\' hate has made me stronger than ever before. You should have fled, while you could, mortals! The fury of Blackrock courses through my veins!',8285,1,0,0,'vaelastrasz SAY_HALFLIFE'), +(-1469030,'Forgive me $N, your death only adds to my failure.',8284,1,0,0,'vaelastrasz SAY_KILLTARGET'), + +(-1469031,'REUSE ME',0,0,0,0,'REUSE ME'); + +-- -1 509 000 RUINS OF AHN'QIRAJ +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1509000,'%s senses your fear.',0,2,0,0,'moam EMOTE_AGGRO'), +(-1509001,'%s bristles with energy!',0,2,0,0,'moan EMOTE_MANA_FULL'), + +(-1509002,'%s sets eyes on $N!',0,2,0,0,'buru EMOTE_TARGET'), + +(-1509003,'They come now. Try not to get yourself killed, young blood.',0,1,0,0,'andorov SAY_ANDOROV_INTRO'), +(-1509004,'Remember, Rajaxx, when I said I\'d kill you last? I lied...',0,1,0,0,'andorov SAY_ANDOROV_ATTACK'), + +(-1509005,'The time of our retribution is at hand! Let darkness reign in the hearts of our enemies!',8612,1,0,0,'rajaxx SAY_WAVE3'), +(-1509006,'No longer will we wait behind barred doors and walls of stone! No longer will our vengeance be denied! The dragons themselves will tremble before our wrath!',8610,1,0,0,'rajaxx SAY_WAVE4'), +(-1509007,'Fear is for the enemy! Fear and death!',8608,1,0,0,'rajaxx SAY_WAVE5'), +(-1509008,'Staghelm will whimper and beg for his life, just as his whelp of a son did! One thousand years of injustice will end this day!',8611,1,0,0,'rajaxx SAY_WAVE6'), +(-1509009,'Fandral! Your time has come! Go and hide in the Emerald Dream and pray we never find you!',8607,1,0,0,'rajaxx SAY_WAVE7'), +(-1509010,'Impudent fool! I will kill you myself!',8609,1,0,0,'rajaxx SAY_INTRO'), +(-1509011,'Attack and make them pay dearly!',8603,1,0,0,'rajaxx SAY_UNK1'), +(-1509012,'Crush them! Drive them out!',8605,1,0,0,'rajaxx SAY_UNK2'), +(-1509013,'Do not hesitate! Destroy them!',8606,1,0,0,'rajaxx SAY_UNK3'), +(-1509014,'Warriors! Captains! Continue the fight!',8613,1,0,0,'rajaxx SAY_UNK4'), +(-1509015,'You are not worth my time $N!',8614,1,0,0,'rajaxx SAY_DEAGGRO'), +(-1509016,'Breath your last!',8604,1,0,0,'rajaxx SAY_KILLS_ANDOROV'), +(-1509017,'Soon you will know the price of your meddling, mortals... The master is nearly whole... And when he rises, your world will be cease!',0,1,0,0,'rajaxx SAY_COMPLETE_QUEST'), + +(-1509018,'I am rejuvinated!',8593,1,0,0,'ossirian SAY_SURPREME1'), +(-1509019,'My powers are renewed!',8595,1,0,0,'ossirian SAY_SURPREME2'), +(-1509020,'My powers return!',8596,1,0,0,'ossirian SAY_SURPREME3'), +(-1509021,'Protect the city at all costs!',8597,1,0,0,'ossirian SAY_RAND_INTRO1'), +(-1509022,'The walls have been breached!',8599,1,0,0,'ossirian SAY_RAND_INTRO2'), +(-1509023,'To your posts. Defend the city.',8600,1,0,0,'ossirian SAY_RAND_INTRO3'), +(-1509024,'Tresspassers will be terminated.',8601,1,0,0,'ossirian SAY_RAND_INTRO4'), +(-1509025,'Sands of the desert rise and block out the sun!',8598,1,0,0,'ossirian SAY_AGGRO'), +(-1509026,'You are terminated.',8602,1,0,0,'ossirian SAY_SLAY'), +(-1509027,'I...have...failed.',8594,1,0,0,'ossirian SAY_DEATH'); + +-- -1 531 000 TEMPLE OF AHN'QIRAJ +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1531000,'Are you so eager to die? I would be happy to accomodate you.',8615,1,0,0,'skeram SAY_AGGRO1'), +(-1531001,'Cower mortals! The age of darkness is at hand.',8616,1,0,0,'skeram SAY_AGGRO2'), +(-1531002,'Tremble! The end is upon you.',8621,1,0,0,'skeram SAY_AGGRO3'), +(-1531003,'Let your death serve as an example!',8617,1,0,0,'skeram SAY_SLAY1'), +(-1531004,'Spineless wretches! You will drown in rivers of blood!',8619,1,0,0,'skeram SAY_SLAY2'), +(-1531005,'The screams of the dying will fill the air. A symphony of terror is about to begin!',8620,1,0,0,'skeram SAY_SLAY3'), +(-1531006,'Prepare for the return of the ancient ones!',8618,1,0,0,'skeram SAY_SPLIT'), +(-1531007,'You only delay... the inevetable.',8622,1,0,0,'skeram SAY_DEATH'), + +(-1531008,'You will be judged for defiling these sacred grounds! The laws of the Ancients will not be challenged! Trespassers will be annihilated!',8646,1,0,0,'sartura SAY_AGGRO'), +(-1531009,'I sentence you to death!',8647,1,0,0,'sartura SAY_SLAY'), +(-1531010,'I serve to the last!',8648,1,0,0,'sartura SAY_DEATH'), + +(-1531011,'%s is weakened!',0,2,0,0,'cthun EMOTE_WEAKENED'); + +-- -1 532 000 KARAZHAN +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1532000,'Well done Midnight!',9173,1,0,0,'attumen SAY_MIDNIGHT_KILL'), +(-1532001,'Cowards! Wretches!',9167,1,0,0,'attumen SAY_APPEAR1'), +(-1532002,'Who dares attack the steed of the Huntsman?',9298,1,0,0,'attumen SAY_APPEAR2'), +(-1532003,'Perhaps you would rather test yourselves against a more formidable opponent?!',9299,1,0,0,'attumen SAY_APPEAR3'), +(-1532004,'Come, Midnight, let\'s disperse this petty rabble!',9168,1,0,0,'attumen SAY_MOUNT'), +(-1532005,'It was... inevitable.',9169,1,0,0,'attumen SAY_KILL1'), +(-1532006,'Another trophy to add to my collection!',9300,1,0,0,'attumen SAY_KILL2'), +(-1532007,'Weapons are merely a convenience for a warrior of my skill!',9166,1,0,0,'attumen SAY_DISARMED'), +(-1532008,'I always knew... someday I would become... the hunted.',9165,1,0,0,'attumen SAY_DEATH'), +(-1532009,'Such easy sport.',9170,1,0,0,'attumen SAY_RANDOM1'), +(-1532010,'Amateurs! Do not think you can best me! I kill for a living.',9304,1,0,0,'attumen SAY_RANDOM2'), + +(-1532011,'Hmm, unannounced visitors? Preparations must be made.',9211,1,0,0,'moroes SAY_AGGRO'), +(-1532012,'Now, where was I? Oh yes...',9215,1,0,0,'moroes SAY_SPECIAL_1'), +(-1532013,'You rang?',9316,1,0,0,'moroes SAY_SPECIAL_2'), +(-1532014,'One more for dinner this evening.',9214,1,0,0,'moroes SAY_KILL_1'), +(-1532015,'Time... Never enough time.',9314,1,0,0,'moroes SAY_KILL_2'), +(-1532016,'I\'ve gone and made a mess.',9315,1,0,0,'moroes SAY_KILL_3'), +(-1532017,'How terribly clumsy of me...',9213,1,0,0,'moroes SAY_DEATH'), + +(-1532018,'Your behavior will not be tolerated!',9204,1,0,0,'maiden SAY_AGGRO'), +(-1532019,'Ah ah ah...',9207,1,0,0,'maiden SAY_SLAY1'), +(-1532020,'This is for the best.',9312,1,0,0,'maiden SAY_SLAY2'), +(-1532021,'Impure thoughts lead to profane actions.',9311,1,0,0,'maiden SAY_SLAY3'), +(-1532022,'Cast out your corrupt thoughts.',9313,1,0,0,'maiden SAY_REPENTANCE1'), +(-1532023,'Your impurity must be cleansed.',9208,1,0,0,'maiden SAY_REPENTANCE2'), +(-1532024,'Death comes. Will your conscience be clear?',9206,1,0,0,'maiden SAY_DEATH'), + +(-1532025,'Oh at last, at last. I can go home.',9190,1,0,0,'dorothee SAY_DOROTHEE_DEATH'), +(-1532026,'Don\'t let them hurt us, Tito! Oh, you won\'t, will you?',9191,1,0,0,'dorothee SAY_DOROTHEE_SUMMON'), +(-1532027,'Tito, oh Tito, no!',9192,1,0,0,'dorothee SAY_DOROTHEE_TITO_DEATH'), +(-1532028,'Oh dear, we simply must find a way home! The old wizard could be our only hope! Strawman, Roar, Tinhead, will you... wait! Oh golly, look! We have visitors!',9195,1,0,0,'dorothee SAY_DOROTHEE_AGGRO'), + +(-1532029,'Wanna fight? Huh? Do ya? C\'mon, I\'ll fight you with both claws behind my back!',9227,1,0,0,'roar SAY_ROAR_AGGRO'), +(-1532030,'You didn\'t have to go and do that.',9229,1,0,0,'roar SAY_ROAR_DEATH'), +(-1532031,'I think I\'m going to go take fourty winks.',9230,1,0,0,'roar SAY_ROAR_SLAY'), + +(-1532032,'Now what should I do with you? I simply can\'t make up my mind.',9254,1,0,0,'strawman SAY_STRAWMAN_AGGRO'), +(-1532033,'Don\'t let them make a mattress... out of me.',9256,1,0,0,'strawman SAY_STRAWMAN_DEATH'), +(-1532034,'I guess I\'m not a failure after all.',9257,1,0,0,'strawman SAY_STRAWMAN_SLAY'), + +(-1532035,'I could really use a heart. Say, can I have yours?',9268,1,0,0,'tinhead SAY_TINHEAD_AGGRO'), +(-1532036,'Back to being an old rustbucket.',9270,1,0,0,'tinhead SAY_TINHEAD_DEATH'), +(-1532037,'Guess I\'m not so rusty, after all.',9271,1,0,0,'tinhead SAY_TINHEAD_SLAY'), +(-1532038,'%s begins to rust.',0,2,0,0,'tinhead EMOTE_RUST'), + +(-1532039,'Woe to each and every one of you my pretties! ',9179,1,0,0,'crone SAY_CRONE_AGGRO'), +(-1532040,'It will all be over soon! ',9307,1,0,0,'crone SAY_CRONE_AGGRO2'), +(-1532041,'How could you? What a cruel, cruel world!',9178,1,0,0,'crone SAY_CRONE_DEATH'), +(-1532042,'Fixed you, didn\'t I? ',9180,1,0,0,'crone SAY_CRONE_SLAY'), + +(-1532043,'All the better to own you with!',9276,1,0,0,'wolf SAY_WOLF_AGGRO'), +(-1532044,'Mmmm... delicious.',9277,1,0,0,'wolf SAY_WOLF_SLAY'), +(-1532045,'Run away little girl, run away!',9278,1,0,0,'wolf SAY_WOLF_HOOD'), + +(-1532046,'What devil art thou, that dost torment me thus?',9196,1,0,0,'julianne SAY_JULIANNE_AGGRO'), +(-1532047,'Where is my lord? Where is my Romulo?',9199,1,0,0,'julianne SAY_JULIANNE_ENTER'), +(-1532048,'Romulo, I come! Oh... this do I drink to thee!',9198,1,0,0,'julianne SAY_JULIANNE_DEATH01'), +(-1532049,'Where is my Lord? Where is my Romulo? Ohh, happy dagger! This is thy sheath! There rust, and let me die!',9310,1,0,0,'julianne SAY_JULIANNE_DEATH02'), +(-1532050,'Come, gentle night; and give me back my Romulo!',9200,1,0,0,'julianne SAY_JULIANNE_RESURRECT'), +(-1532051,'Parting is such sweet sorrow.',9201,1,0,0,'julianne SAY_JULIANNE_SLAY'), + +(-1532052,'Wilt thou provoke me? Then have at thee, boy!',9233,1,0,0,'romulo SAY_ROMULO_AGGRO'), +(-1532053,'Thou smilest... upon the stroke that... murders me.',9235,1,0,0,'romulo SAY_ROMULO_DEATH'), +(-1532054,'This day\'s black fate on more days doth depend. This but begins the woe. Others must end.',9236,1,0,0,'romulo SAY_ROMULO_ENTER'), +(-1532055,'Thou detestable maw, thou womb of death; I enforce thy rotten jaws to open!',9237,1,0,0,'romulo SAY_ROMULO_RESURRECT'), +(-1532056,'How well my comfort is revived by this!',9238,1,0,0,'romulo SAY_ROMULO_SLAY'), + +(-1532057,'The Menagerie is for guests only.',9183,1,0,0,'curator SAY_AGGRO'), +(-1532058,'Gallery rules will be strictly enforced.',9188,1,0,0,'curator SAY_SUMMON1'), +(-1532059,'This curator is equipped for gallery protection.',9309,1,0,0,'curator SAY_SUMMON2'), +(-1532060,'Your request cannot be processed.',9186,1,0,0,'curator SAY_EVOCATE'), +(-1532061,'Failure to comply will result in offensive action.',9185,1,0,0,'curator SAY_ENRAGE'), +(-1532062,'Do not touch the displays.',9187,1,0,0,'curator SAY_KILL1'), +(-1532063,'You are not a guest.',9308,1,0,0,'curator SAY_KILL2'), +(-1532064,'This Curator is no longer op... er... ation... al.',9184,1,0,0,'curator SAY_DEATH'), + +(-1532065,'Your blood will anoint my circle.',9264,1,0,0,'terestian SAY_SLAY1'), +(-1532066,'The great one will be pleased.',9329,1,0,0,'terestian SAY_SLAY2'), +(-1532067,'My life, is yours. Oh great one.',9262,1,0,0,'terestian SAY_DEATH'), +(-1532068,'Ah, you\'re just in time. The rituals are about to begin.',9260,1,0,0,'terestian SAY_AGGRO'), +(-1532069,'Please, accept this humble offering, oh great one.',9263,1,0,0,'terestian SAY_SACRIFICE1'), +(-1532070,'Let the sacrifice serve his testament to my fealty.',9330,1,0,0,'terestian SAY_SACRIFICE2'), +(-1532071,'Come, you dwellers in the dark. Rally to my call!',9265,1,0,0,'terestian SAY_SUMMON1'), +(-1532072,'Gather, my pets. There is plenty for all.',9331,1,0,0,'terestian SAY_SUMMON2'), + +(-1532073,'Please, no more. My son... he\'s gone mad!',9241,1,0,0,'aran SAY_AGGRO1'), +(-1532074,'I\'ll not be tortured again!',9323,1,0,0,'aran SAY_AGGRO2'), +(-1532075,'Who are you? What do you want? Stay away from me!',9324,1,0,0,'aran SAY_AGGRO3'), +(-1532076,'I\'ll show you this beaten dog still has some teeth!',9245,1,0,0,'aran SAY_FLAMEWREATH1'), +(-1532077,'Burn you hellish fiends!',9326,1,0,0,'aran SAY_FLAMEWREATH2'), +(-1532078,'I\'ll freeze you all!',9246,1,0,0,'aran SAY_BLIZZARD1'), +(-1532079,'Back to the cold dark with you!',9327,1,0,0,'aran SAY_BLIZZARD2'), +(-1532080,'Yes, yes, my son is quite powerful... but I have powers of my own!',9242,1,0,0,'aran SAY_EXPLOSION1'), +(-1532081,'I am not some simple jester! I am Nielas Aran!',9325,1,0,0,'aran SAY_EXPLOSION2'), +(-1532082,'Surely you would not deny an old man a replenishing drink? No, no I thought not.',9248,1,0,0,'aran SAY_DRINK'), +(-1532083,'I\'m not finished yet! No, I have a few more tricks up me sleeve.',9251,1,0,0,'aran SAY_ELEMENTALS'), +(-1532084,'I want this nightmare to be over!',9250,1,0,0,'aran SAY_KILL1'), +(-1532085,'Torment me no more!',9328,1,0,0,'aran SAY_KILL2'), +(-1532086,'You\'ve wasted enough of my time. Let these games be finished!',9247,1,0,0,'aran SAY_TIMEOVER'), +(-1532087,'At last... The nightmare is.. over...',9244,1,0,0,'aran SAY_DEATH'), +(-1532088,'Where did you get that?! Did HE send you?!',9249,1,0,0,'aran SAY_ATIESH'), + +(-1532089,'%s cries out in withdrawal, opening gates to the warp.',0,2,0,0,'netherspite EMOTE_PHASE_PORTAL'), +(-1532090,'%s goes into a nether-fed rage!',0,2,0,0,'netherspite EMOTE_PHASE_BANISH'), + +(-1532091,'Madness has brought you here to me. I shall be your undoing!',9218,1,0,0,'malchezaar SAY_AGGRO'), +(-1532092,'Simple fools! Time is the fire in which you\'ll burn!',9220,1,0,0,'malchezaar SAY_AXE_TOSS1'), +(-1532093,'I see the subtlety of conception is beyond primitives such as you.',9317,1,0,0,'malchezaar SAY_AXE_TOSS2'), +(-1532094,'Who knows what secrets hide in the dark.',9223,1,0,0,'malchezaar SAY_SPECIAL1'), +(-1532095,'The cerestial forces are mine to manipulate.',9320,1,0,0,'malchezaar SAY_SPECIAL2'), +(-1532096,'How can you hope to withstand against such overwhelming power?',9321,1,0,0,'malchezaar SAY_SPECIAL3'), +(-1532097,'Surely you did not think you could win.',9222,1,0,0,'malchezaar SAY_SLAY1'), +(-1532098,'Your greed, your foolishness has brought you to this end.',9318,1,0,0,'malchezaar SAY_SLAY2'), +(-1532099,'You are, but a plaything, unfit even to amuse.',9319,1,0,0,'malchezaar SAY_SLAY3'), +(-1532100,'All realities, all dimensions are open to me!',9224,1,0,0,'malchezaar SAY_SUMMON1'), +(-1532101,'You face not Malchezaar alone, but the legions I command!',9322,1,0,0,'malchezaar SAY_SUMMON2'), +(-1532102,'I refuse to concede defeat. I am a prince of the Eredar! I am...',9221,1,0,0,'malchezaar SAY_DEATH'), + +(-1532103,'Welcome Ladies and Gentlemen, to this evening\'s presentation!',9174,1,0,0,'barnes OZ1'), +(-1532104,'Tonight we plumb the depths of the human soul as we join a lost, lonely girl trying desperately -- with the help of her loyal companions -- to find her way home!',9338,1,0,0,'barnes OZ2'), +(-1532105,'But she is pursued... by a wicked malevolent crone!',9339,1,0,0,'barnes OZ3'), +(-1532106,'Will she survive? Will she prevail? Only time will tell. And now ... on with the show!',9340,1,0,0,'barnes OZ4'), +(-1532107,'Good evening, Ladies and Gentlemen! Welcome to this evening\'s presentation!',9175,1,0,0,'barnes HOOD1'), +(-1532108,'Tonight, things are not what they seem. For tonight, your eyes may not be trusted',9335,1,0,0,'barnes HOOD2'), +(-1532109,'Take for instance, this quiet, elderly woman, waiting for a visit from her granddaughter. Surely there is nothing to fear from this sweet, grey-haired, old lady.',9336,1,0,0,'barnes HOOD3'), +(-1532110,'But don\'t let me pull the wool over your eyes. See for yourself what lies beneath those covers! And now... on with the show!',9337,1,0,0,'barnes HOOD4'), +(-1532111,'Welcome, Ladies and Gentlemen, to this evening\'s presentation!',9176,1,0,0,'barnes RAJ1'), +(-1532112,'Tonight, we explore a tale of forbidden love!',9341,1,0,0,'barnes RAJ2'), +(-1532113,'But beware, for not all love stories end happily, as you may find out. Sometimes, love pricks like a thorn.',9342,1,0,0,'barnes RAJ3'), +(-1532114,'But don\'t take it from me, see for yourself what tragedy lies ahead when the paths of star-crossed lovers meet. And now...on with the show!',9343,1,0,0,'barnes RAJ4'); + +-- -1 533 000 NAXXRAMAS +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1533000,'Ahh... welcome to my parlor.',8788,1,0,0,'anubrekhan SAY_GREET'), +(-1533001,'Just a little taste...',8785,1,0,0,'anubrekhan SAY_AGGRO1'), +(-1533002,'There is no way out.',8786,1,0,0,'anubrekhan SAY_AGGRO2'), +(-1533003,'Yes, Run! It makes the blood pump faster!',8787,1,0,0,'anubrekhan SAY_AGGRO3'), +(-1533004,'I hear little hearts beating. Yesss... beating faster now. Soon the beating will stop.',8790,1,0,0,'anubrekhan SAY_TAUNT1'), +(-1533005,'Where to go? What to do? So many choices that all end in pain, end in death.',8791,1,0,0,'anubrekhan SAY_TAUNT2'), +(-1533006,'Which one shall I eat first? So difficult to choose... the all smell so delicious.',8792,1,0,0,'anubrekhan SAY_TAUNT3'), +(-1533007,'Closer now... tasty morsels. I\'ve been too long without food. Without blood to drink.',8793,1,0,0,'anubrekhan SAY_TAUNT4'), +(-1533008,'Shh... it will all be over soon.',8789,1,0,0,'anubrekhan SAY_SLAY'), + +(-1533009,'Your old lives, your mortal desires, mean nothing. You are acolytes of the master now, and you will serve the cause without question! The greatest glory is to die in the master\'s service!',8799,1,0,0,'faerlina SAY_GREET'), +(-1533010,'Slay them in the master\'s name!',8794,1,0,0,'faerlina SAY_AGGRO1'), +(-1533011,'You cannot hide from me!',8795,1,0,0,'faerlina SAY_AGGRO2'), +(-1533012,'Kneel before me, worm!',8796,1,0,0,'faerlina SAY_AGGRO3'), +(-1533013,'Run while you still can!',8797,1,0,0,'faerlina SAY_AGGRO4'), +(-1533014,'You have failed!',8800,1,0,0,'faerlina SAY_SLAY1'), +(-1533015,'Pathetic wretch!',8801,1,0,0,'faerlina SAY_SLAY2'), +(-1533016,'The master... will avenge me!',8798,1,0,0,'faerlina SAY_DEATH'), + +(-1533017,'Patchwerk want to play!',8909,1,0,0,'patchwerk SAY_AGGRO1'), +(-1533018,'Kel\'Thuzad make Patchwerk his Avatar of War!',8910,1,0,0,'patchwerk SAY_AGGRO2'), +(-1533019,'No more play?',8912,1,0,0,'patchwerk SAY_SLAY'), +(-1533020,'What happened to... Patch...',8911,1,0,0,'patchwerk SAY_DEATH'), +(-1533021,'%s goes into a berserker rage!',0,2,0,0,'patchwerk EMOTE_BERSERK'), +(-1533022,'%s becomes enraged!',0,2,0,0,'patchwerk EMOTE_ENRAGE'), + +(-1533023,'Stalagg crush you!',8864,1,0,0,'stalagg SAY_STAL_AGGRO'), +(-1533024,'Stalagg kill!',8866,1,0,0,'stalagg SAY_STAL_SLAY'), +(-1533025,'Master save me...',8865,1,0,0,'stalagg SAY_STAL_DEATH'), +(-1533026,'Feed you to master!',8802,1,0,0,'feugen SAY_FEUG_AGGRO'), +(-1533027,'Feugen make master happy!',8804,1,0,0,'feugen SAY_FEUG_SLAY'), +(-1533028,'No... more... Feugen...',8803,1,0,0,'feugen SAY_FEUG_DEATH'), + +(-1533029,'You are too late... I... must... OBEY!',8872,1,0,0,'thaddius SAY_GREET'), +(-1533030,'KILL!',8867,1,0,0,'thaddius SAY_AGGRO1'), +(-1533031,'EAT YOUR BONES!',8868,1,0,0,'thaddius SAY_AGGRO2'), +(-1533032,'BREAK YOU!',8869,1,0,0,'thaddius SAY_AGGRO3'), +(-1533033,'You die now!',8877,1,0,0,'thaddius SAY_SLAY'), +(-1533034,'Now YOU feel pain!',8871,1,0,0,'thaddius SAY_ELECT'), +(-1533035,'Thank... you...',8870,1,0,0,'thaddius SAY_DEATH'), +(-1533036,'Pleeease!',8873,1,0,0,'thaddius SAY_SCREAM1'), +(-1533037,'Stop, make it stop!',8874,1,0,0,'thaddius SAY_SCREAM2'), +(-1533038,'Help me! Save me!',8875,1,0,0,'thaddius SAY_SCREAM3'), +(-1533039,'Please, nooo!',8876,1,0,0,'thaddius SAY_SCREAM4'), + +(-1533040,'Foolishly you have sought your own demise. Brazenly you have disregarded powers beyond your understanding. You have fought hard to invade the realm of the harvester. Now there is only one way out - to walk the lonely path of the damned.',8807,1,0,0,'gothik SAY_SPEECH'), +(-1533041,'Death is the only escape.',8806,1,0,0,'gothik SAY_KILL'), +(-1533042,'I... am... undone!',8805,1,0,0,'gothik SAY_DEATH'), +(-1533043,'I have waited long enough! Now, you face the harvester of souls!',8808,1,0,0,'gothik SAY_TELEPORT'), + +(-1533044,'Defend youself!',8892,1,0,0,'blaumeux SAY_BLAU_AGGRO'), +(-1533045,'Come, Zeliek, do not drive them out. Not before we\'ve had our fun.',8896,1,0,0,'blaumeux SAY_BLAU_TAUNT1'), +(-1533046,'I do hope they stay alive long enough for me to... introduce myself.',8897,1,0,0,'blaumeux SAY_BLAU_TAUNT2'), +(-1533047,'The first kill goes to me! Anyone care to wager?',8898,1,0,0,'blaumeux SAY_BLAU_TAUNT3'), +(-1533048,'Your life is mine!',8895,1,0,0,'blaumeux SAY_BLAU_SPECIAL'), +(-1533049,'Who\'s next?',8894,1,0,0,'blaumeux SAY_BLAU_SLAY'), +(-1533050,'Tou... che!',8893,1,0,0,'blaumeux SAY_BLAU_DEATH'), + +(-1533051,'Come out and fight, ye wee ninny!',8899,1,0,0,'korthazz SAY_KORT_AGGRO'), +(-1533052,'To arms, ye roustabouts! We\'ve got company!',8903,1,0,0,'korthazz SAY_KORT_TAUNT1'), +(-1533053,'I heard about enough of yer sniveling. Shut yer fly trap \'afore I shut it for ye!',8904,1,0,0,'korthazz SAY_KORT_TAUNT2'), +(-1533054,'I\'m gonna enjoy killin\' these slack-jawed daffodils!',8905,1,0,0,'korthazz SAY_KORT_TAUNT3'), +(-1533055,'I like my meat extra crispy!',8902,1,0,0,'korthazz SAY_KORT_SPECIAl'), +(-1533056,'Next time, bring more friends!',8901,1,0,0,'korthazz SAY_KORT_SLAY'), +(-1533057,'What a bloody waste this is!',8900,1,0,0,'korthazz SAY_KORT_DEATH'), + +(-1533058,'Flee, before it\'s too late!',8913,1,0,0,'zeliek SAY_ZELI_AGGRO'), +(-1533059,'Invaders, cease this foolish venture at once! Turn away while you still can!',8917,1,0,0,'zeliek SAY_ZELI_TAUNT1'), +(-1533060,'Perhaps they will come to their senses, and run away as fast as they can!',8918,1,0,0,'zeliek SAY_ZELI_TAUNT2'), +(-1533061,'Do not continue! Turn back while there\'s still time!',8919,1,0,0,'zeliek SAY_ZELI_TAUNT3'), +(-1533062,'I- I have no choice but to obey!',8916,1,0,0,'zeliek SAY_ZELI_SPECIAL'), +(-1533063,'Forgive me!',8915,1,0,0,'zeliek SAY_ZELI_SLAY'), +(-1533064,'It is... as it should be.',8914,1,0,0,'zeliek SAY_ZELI_DEATH'), + +(-1533065,'You seek death?',14571,1,0,0,'rivendare_naxx SAY_RIVE_AGGRO1'), +(-1533066,'None shall pass!',14572,1,0,0,'rivendare_naxx SAY_RIVE_AGGRO2'), +(-1533067,'Be still!',14573,1,0,0,'rivendare_naxx SAY_RIVE_AGGRO3'), +(-1533068,'You will find no peace in death.',14574,1,0,0,'rivendare_naxx SAY_RIVE_SLAY1'), +(-1533069,'The master\'s will is done.',14575,1,0,0,'rivendare_naxx SAY_RIVE_SLAY2'), +(-1533070,'Bow to the might of the scourge!',14576,1,0,0,'rivendare_naxx SAY_RIVE_SPECIAL'), +(-1533071,'Enough prattling. Let them come! We shall grind their bones to dust.',14577,1,0,0,'rivendare_naxx SAY_RIVE_TAUNT1'), +(-1533072,'Conserve your anger! Harness your rage! You will all have outlets for your frustration soon enough.',14578,1,0,0,'rivendare_naxx SAY_RIVE_TAUNT2'), +(-1533073,'Life is meaningless. It is in death that we are truly tested.',14579,1,0,0,'rivendare_naxx SAY_RIVE_TAUNT3'), +(-1533074,'Death... will not stop me...',14580,1,0,0,'rivendare_naxx SAY_RIVE_DEATH'), + +(-1533075,'Glory to the master!',8845,1,0,0,'noth SAY_AGGRO1'), +(-1533076,'Your life is forfeit!',8846,1,0,0,'noth SAY_AGGRO2'), +(-1533077,'Die, trespasser!',8847,1,0,0,'noth SAY_AGGRO3'), +(-1533078,'Rise, my soldiers! Rise and fight once more!',8851,1,0,0,'noth SAY_SUMMON'), +(-1533079,'My task is done!',8849,1,0,0,'noth SAY_SLAY1'), +(-1533080,'Breathe no more!',8850,1,0,0,'noth SAY_SLAY2'), +(-1533081,'I will serve the master... in... death!',8848,1,0,0,'noth SAY_DEATH'), + +(-1533082,'%s takes in a deep breath...',0,2,0,0,'sapphiron EMOTE_BREATH'), +(-1533083,'%s enrages!',0,2,0,0,'sapphiron EMOTE_ENRAGE'), + +(-1533084,'Our preparations continue as planned, master.',14467,1,0,0,'kelthuzad SAY_SAPP_DIALOG1'), +(-1533085,'It is good that you serve me so faithfully. Soon, all will serve the Lich King and in the end, you shall be rewarded...so long as you do not falter.',8881,1,0,0,'kelthuzad SAY_SAPP_DIALOG2_LICH'), +(-1533086,'I see no complications... Wait... What is this?',14468,1,0,0,'kelthuzad SAY_SAPP_DIALOG3'), +(-1533087,'Your security measures have failed! See to this interruption immediately!',8882,1,0,0,'kelthuzad SAY_SAPP_DIALOG4_LICH'), +(-1533088,'Yes, master!',14469,1,0,0,'kelthuzad SAY_SAPP_DIALOG5'), +(-1533089,'No!!! A curse upon you, interlopers! The armies of the Lich King will hunt you down. You will not escape your fate...',14484,1,0,0,'kelthuzad SAY_CAT_DIED'), +(-1533090,'Who dares violate the sanctity of my domain? Be warned, all who trespass here are doomed.',14463,1,0,0,'kelthuzad SAY_TAUNT1'), +(-1533091,'Fools, you think yourselves triumphant? You have only taken one step closer to the abyss! ',14464,1,0,0,'kelthuzad SAY_TAUNT2'), +(-1533092,'I grow tired of these games. Proceed, and I will banish your souls to oblivion!',14465,1,0,0,'kelthuzad SAY_TAUNT3'), +(-1533093,'You have no idea what horrors lie ahead. You have seen nothing! The frozen heart of Naxxramas awaits you!',14466,1,0,0,'kelthuzad SAY_TAUNT4'), +(-1533094,'Pray for mercy!',14475,1,0,0,'kelthuzad SAY_AGGRO1'), +(-1533095,'Scream your dying breath!',14476,1,0,0,'kelthuzad SAY_AGGRO2'), +(-1533096,'The end is upon you!',14477,1,0,0,'kelthuzad SAY_AGGRO3'), +(-1533097,'The dark void awaits you!',14478,1,0,0,'kelthuzad SAY_SLAY1'), +(-1533098,'',14479,1,0,0,'kelthuzad SAY_SLAY2'), +(-1533099,'AAAAGHHH!... Do not rejoice... your victory is a hollow one... for I shall return with powers beyond your imagining!',14480,1,0,0,'kelthuzad SAY_DEATH'), +(-1533100,'Your soul, is bound to me now!',14472,1,0,0,'kelthuzad SAY_CHAIN1'), +(-1533101,'There will be no escape!',14473,1,0,0,'kelthuzad SAY_CHAIN2'), +(-1533102,'I will freeze the blood in your veins!',14474,1,0,0,'kelthuzad SAY_FROST_BLAST'), +(-1533103,'Master! I require aid! ',14470,1,0,0,'kelthuzad SAY_REQUEST_AID'), +(-1533104,'Very well... warriors of the frozen wastes, rise up! I command you to fight, kill, and die for your master. Let none survive...',0,1,0,0,'kelthuzad SAY_ANSWER_REQUEST'), +(-1533105,'Minions, servants, soldiers of the cold dark, obey the call of Kel\'Thuzad!',14471,1,0,0,'kelthuzad SAY_SUMMON_MINIONS'), +(-1533106,'Your petty magics are no challenge to the might of the Scourge! ',14481,1,0,0,'kelthuzad SAY_SPECIAL1_MANA_DET'), +(-1533107,'Enough! I grow tired of these distractions! ',14483,1,0,0,'kelthuzad SAY_SPECIAL3_MANA_DET'), +(-1533108,'Fools, you have spread your powers too thin. Be free, my minions!',14482,1,0,0,'kelthuzad SAY_SPECIAL2_DISPELL'), + +(-1533109,'You are mine now!',8825,1,0,0,'heigan SAY_AGGRO1'), +(-1533110,'I see you!',8826,1,0,0,'heigan SAY_AGGRO2'), +(-1533111,'You...are next!',8827,1,0,0,'heigan SAY_AGGRO3'), +(-1533112,'Close your eyes... sleep!',8829,1,0,0,'heigan SAY_SLAY'), +(-1533113,'The races of the world will perish. It is only a matter of time.',8830,1,0,0,'heigan SAY_TAUNT1'), +(-1533114,'I see endless suffering, I see torment, I see rage. I see... everything!',8831,1,0,0,'heigan SAY_TAUNT2'), +(-1533115,'Soon... the world will tremble!',8832,1,0,0,'heigan SAY_TAUNT3'), +(-1533116,'The end is upon you.',8833,1,0,0,'heigan SAY_TAUNT4'), +(-1533117,'Hungry worms will feast on your rotten flesh!',8834,1,0,0,'heigan SAY_TAUNT5'), +(-1533118,'Noo... o...',8828,1,0,0,'heigan SAY_DEATH'), + +(-1533119,'%s spots a nearby Zombie to devour!',0,3,0,0,'gluth EMOTE_ZOMBIE'), + +(-1533120,'Hah hah, I\'m just getting warmed up!',8852,1,0,0,'razuvious SAY_AGGRO1'), +(-1533121,'Stand and fight!',8853,1,0,0,'razuvious SAY_AGGRO2'), +(-1533122,'Show me what you\'ve got!',8854,1,0,0,'razuvious SAY_AGGRO3'), +(-1533123,'Sweep the leg! Do you have a problem with that?',8861,1,0,0,'razuvious SAY_SLAY1'), +(-1533124,'You should have stayed home!',8862,1,0,0,'razuvious SAY_SLAY2'), +(-1533125,'Do as I taught you!',8855,1,0,0,'razuvious SAY_COMMAND1'), +(-1533126,'Show them no mercy!',8856,1,0,0,'razuvious SAY_COMMAND2'), +(-1533127,'You disappoint me, students!',8858,1,0,0,'razuvious SAY_COMMAND3'), +(-1533128,'The time for practice is over! Show me what you\'ve learned!',8859,1,0,0,'razuvious SAY_COMMAND4'), +(-1533129,'An honorable... death...',8860,1,0,0,'razuvious SAY_DEATH'); + +-- -1 534 000 THE BATTLE OF MT. HYJAL +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1534000,'I\'m in jeopardy, help me if you can!',11007,1,0,0,'jaina hyjal ATTACKED 1'), +(-1534001,'They\'ve broken through!',11049,1,0,0,'jaina hyjal ATTACKED 2'), +(-1534002,'Stay alert! Another wave approaches.',11008,1,0,0,'jaina hyjal INCOMING'), +(-1534003,'Don\'t give up! We must prevail!',11006,1,0,0,'jaina hyjal BEGIN'), +(-1534004,'Hold them back as long as possible.',11050,1,0,0,'jaina hyjal RALLY 1'), +(-1534005,'We must hold strong!',11051,1,0,0,'jaina hyjal RALLY 2'), +(-1534006,'We are lost. Fall back!',11009,1,0,0,'jaina hyjal FAILURE'), +(-1534007,'We have won valuable time. Now we must pull back!',11011,1,0,0,'jaina hyjal SUCCESS'), +(-1534008,'I did... my best.',11010,1,0,0,'jaina hyjal DEATH'), + +(-1534009,'I will lie down for no one!',11031,1,0,0,'thrall hyjal ATTACKED 1'), +(-1534010,'Bring the fight to me and pay with your lives!',11061,1,0,0,'thrall hyjal ATTACKED 2'), +(-1534011,'Make ready for another wave! LOK-TAR OGAR!',11032,1,0,0,'thrall hyjal INCOMING'), +(-1534012,'Hold them back! Do not falter!',11030,1,0,0,'thrall hyjal BEGIN'), +(-1534013,'Victory or death!',11059,1,0,0,'thrall hyjal RALLY 1'), +(-1534014,'Do not give an inch of ground!',11060,1,0,0,'thrall hyjal RALLY 2'), +(-1534015,'It is over. Withdraw! We have failed.',11033,1,0,0,'thrall hyjal FAILURE'), +(-1534016,'We have played our part and done well. It is up to the others now.',11035,1,0,0,'thrall hyjal SUCCESS'), +(-1534017,'Uraaa...',11034,1,0,0,'thrall hyjal DEATH'), + +(-1534018,'All of your efforts have been in vain, for the draining of the World Tree has already begun. Soon the heart of your world will beat no more.',10986,1,0,0,'archimonde SAY_PRE_EVENTS_COMPLETE'), +(-1534019,'Your resistance is insignificant.',10987,1,0,0,'archimonde SAY_AGGRO'), +(-1534020,'This world will burn!',10990,1,0,0,'archimonde SAY_DOOMFIRE1'), +(-1534021,'Manach sheek-thrish!',11041,1,0,0,'archimonde SAY_DOOMFIRE2'), +(-1534022,'A-kreesh!',10989,1,0,0,'archimonde SAY_AIR_BURST1'), +(-1534023,'Away vermin!',11043,1,0,0,'archimonde SAY_AIR_BURST2'), +(-1534024,'All creation will be devoured!',11044,1,0,0,'archimonde SAY_SLAY1'), +(-1534025,'Your soul will languish for eternity.',10991,1,0,0,'archimonde SAY_SLAY2'), +(-1534026,'I am the coming of the end!',11045,1,0,0,'archimonde SAY_SLAY3'), +(-1534027,'At last it is here. Mourn and lament the passing of all you have ever known and all that would have been! Akmin-kurai!',10993,1,0,0,'archimonde SAY_ENRAGE'), +(-1534028,'No, it cannot be! Nooo!',10992,1,0,0,'archimonde SAY_DEATH'), +(-1534029,'You are mine now.',10988,1,0,0,'archimonde SAY_SOUL_CHARGE1'), +(-1534030,'Bow to my will.',11042,1,0,0,'archimonde SAY_SOUL_CHARGE2'); + +-- -1 540 000 SHATTERED HALLS +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1540000,'You wish to fight us all at once? This should be amusing!',10262,1,0,0,'nethekurse SAY_INTRO'), +(-1540001,'You can have that one. I no longer need him.',10263,1,0,0,'nethekurse PEON_ATTACK_1'), +(-1540002,'Yes, beat him mercilessly. His skull is a thick as an ogres.',10264,1,0,0,'nethekurse PEON_ATTACK_2'), +(-1540003,'Don\'t waste your time on that one. He\'s weak!',10265,1,0,0,'nethekurse PEON_ATTACK_3'), +(-1540004,'You want him? Very well, take him!',10266,1,0,0,'nethekurse PEON_ATTACK_4'), +(-1540005,'One pitiful wretch down. Go on, take another one.',10267,1,0,0,'nethekurse PEON_DIE_1'), +(-1540006,'Ahh, what a waste... Next!',10268,1,0,0,'nethekurse PEON_DIE_2'), +(-1540007,'I was going to kill him anyway!',10269,1,0,0,'nethekurse PEON_DIE_3'), +(-1540008,'Thank you for saving me the trouble! Now it\'s my turn to have some fun...',10270,1,0,0,'nethekurse PEON_DIE_4'), +(-1540009,'Beg for your pittyfull life!',10259,1,0,0,'nethekurse SAY_TAUNT_1'), +(-1540010,'Run covad, ruun!',10260,1,0,0,'nethekurse SAY_TAUNT_2'), +(-1540011,'Your pain amuses me.',10261,1,0,0,'nethekurse SAY_TAUNT_3'), +(-1540012,'I\'m already bored.',10271,1,0,0,'nethekurse SAY_AGGRO_1'), +(-1540013,'Come on! ... Show me a real fight.',10272,1,0,0,'nethekurse SAY_AGGRO_2'), +(-1540014,'I had more fun torturing the peons.',10273,1,0,0,'nethekurse SAY_AGGRO_3'), +(-1540015,'You Loose.',10274,1,0,0,'nethekurse SAY_SLAY_1'), +(-1540016,'Ohh! Just die.',10275,1,0,0,'nethekurse SAY_SLAY_2'), +(-1540017,'What a ... a shame.',10276,1,0,0,'nethekurse SAY_DIE'), + +(-1540018,'Smash!',10306,1,0,0,'omrogg GoCombat_1'), +(-1540019,'If you nice me let you live.',10308,1,0,0,'omrogg GoCombat_2'), +(-1540020,'Me hungry!',10309,1,0,0,'omrogg GoCombat_3'), +(-1540021,'Why don\'t you let me do the talking?',10317,1,0,0,'omrogg GoCombatDelay_1'), +(-1540022,'No, we will NOT let you live!',10318,1,0,0,'omrogg GoCombatDelay_2'), +(-1540023,'You always hungry. That why we so fat!',10319,1,0,0,'omrogg GoCombatDelay_3'), +(-1540024,'You stay here. Me go kill someone else!',10303,1,0,0,'omrogg Threat_1'), +(-1540025,'What are you doing!',10315,1,0,0,'omrogg Threat_2'), +(-1540026,'Me kill someone else...',10302,1,0,0,'omrogg Threat_3'), +(-1540027,'Me not like this one...',10300,1,0,0,'omrogg Threat_4'), +(-1540028,'That\'s not funny!',10314,1,0,0,'omrogg ThreatDelay1_1'), +(-1540029,'Me get bored...',10305,1,0,0,'omrogg ThreatDelay1_2'), +(-1540030,'I\'m not done yet, idiot!',10313,1,0,0,'omrogg ThreatDelay1_3'), +(-1540031,'Hey you numbskull!',10312,1,0,0,'omrogg ThreatDelay1_4'), +(-1540032,'Ha ha ha.',10304,1,0,0,'omrogg ThreatDelay2_1'), +(-1540033,'Whhy! He almost dead!',10316,1,0,0,'omrogg ThreatDelay2_2'), +(-1540034,'H\'ey...',10307,1,0,0,'omrogg ThreatDelay2_3'), +(-1540035,'We kill his friend!',10301,1,0,0,'omrogg ThreatDelay2_4'), +(-1540036,'This one die easy!',10310,1,0,0,'omrogg Killing_1'), +(-1540037,'I\'m tired. You kill next one!',10320,1,0,0,'omrogg Killing_2'), +(-1540038,'That\'s because I do all the hard work!',10321,1,0,0,'omrogg KillingDelay_1'), +(-1540039,'This all...your fault!',10311,1,0,0,'omrogg YELL_DIE_L'), +(-1540040,'I...hate...you...',10322,1,0,0,'omrogg YELL_DIE_R'), +(-1540041,'%s enrages!',0,2,0,0,'omrogg EMOTE_ENRAGE'), + +(-1540042,'Ours is the true Horde! The only Horde!',10323,1,0,0,'kargath SAY_AGGRO1'), +(-1540043,'I\'ll carve the meat from your bones!',10324,1,0,0,'kargath SAY_AGGRO2'), +(-1540044,'I am called Bladefist for a reason, as you will see!',10325,1,0,0,'kargath SAY_AGGRO3'), +(-1540045,'For the real Horde!',10326,1,0,0,'kargath SAY_SLAY1'), +(-1540046,'I am the only Warchief!',10327,1,0,0,'kargath SAY_SLAY2'), +(-1540047,'The true Horde... will.. prevail...',10328,1,0,0,'kargath SAY_DEATH'); + +-- -1 542 000 BLOOD FURNACE +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1542000,'Who dares interrupt... What is this? What have you done? You ruin everything!',10164,1,0,0,'kelidan SAY_WAKE'), +(-1542001,'You mustn\'t let him loose!',10166,1,0,0,'kelidan SAY_ADD_AGGRO_1'), +(-1542002,'Ignorant whelps!',10167,1,0,0,'kelidan SAY_ADD_AGGRO_2'), +(-1542003,'You fools! He\'ll kill us all!',10168,1,0,0,'kelidan SAY_ADD_AGGRO_3'), +(-1542004,'Just as you deserve!',10169,1,0,0,'kelidan SAY_KILL_1'), +(-1542005,'Your friends will soon be joining you.',10170,1,0,0,'kelidan SAY_KILL_2'), +(-1542006,'Closer... Come closer.. and burn!',10165,1,0,0,'kelidan SAY_NOVA'), +(-1542007,'Good luck... you\'ll need it..',10171,1,0,0,'kelidan SAY_DIE'), + +(-1542008,'Come intruders....',0,1,0,0,'broggok SAY_AGGRO'), + +(-1542009,'My work must not be interrupted.',10286,1,0,0,'the_maker SAY_AGGRO_1'), +(-1542010,'Perhaps I can find a use for you.',10287,1,0,0,'the_maker SAY_AGGRO_2'), +(-1542011,'Anger... Hate... These are tools I can use.',10288,1,0,0,'the_maker SAY_AGGRO_3'), +(-1542012,'Let\'s see what I can make of you.',10289,1,0,0,'the_maker SAY_KILL_1'), +(-1542013,'It is pointless to resist.',10290,1,0,0,'the_maker SAY_KILL_2'), +(-1542014,'Stay away from... me.',10291,1,0,0,'the_maker SAY_DIE'); + +-- -1 543 000 HELLFIRE RAMPARTS +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1543000,'Do you smell that? Fresh meat has somehow breached our citadel. Be wary of any intruders.',0,1,0,0,'gargolmar SAY_TAUNT'), +(-1543001,'Heal me! QUICKLY!',10329,1,0,0,'gargolmar SAY_HEAL'), +(-1543002,'Back off, pup!',10330,1,0,0,'gargolmar SAY_SURGE'), +(-1543003,'What have we here...?',10331,1,0,0,'gargolmar SAY_AGGRO_1'), +(-1543004,'Heh... this may hurt a little.',10332,1,0,0,'gargolmar SAY_AGGRO_2'), +(-1543005,'I\'m gonna enjoy this.',10333,1,0,0,'gargolmar SAY_AGGRO_3'), +(-1543006,'Say farewell!',10334,1,0,0,'gargolmar SAY_KILL_1'), +(-1543007,'Much too easy...',10335,1,0,0,'gargolmar SAY_KILL_2'), +(-1543008,'Hahah.. ..argh!',10336,1,0,0,'gargolmar SAY_DIE'), + +(-1543009,'You dare stand against me?!',10280,1,0,0,'omor SAY_AGGRO_1'), +(-1543010,'I will not be defeated!',10279,1,0,0,'omor SAY_AGGRO_2'), +(-1543011,'Your insolence will be your death.',10281,1,0,0,'omor SAY_AGGRO_3'), +(-1543012,'Achor-she-ki! Feast my pet! Eat your fill!',10277,1,0,0,'omor SAY_SUMMON'), +(-1543013,'A-Kreesh!',10278,1,0,0,'omor SAY_CURSE'), +(-1543014,'Die, weakling!',10282,1,0,0,'omor SAY_KILL_1'), +(-1543015,'It is... not over.',10284,1,0,0,'omor SAY_DIE'), +(-1543016,'I am victorious!',10283,1,0,0,'omor SAY_WIPE'), + +(-1543017,'You have faced many challenges, pity they were all in vain. Soon your people will kneel to my lord!',10292,1,0,0,'vazruden SAY_INTRO'), +(-1543018,'Your time is running out!',10294,1,0,0,'vazruden SAY_AGGRO1'), +(-1543019,'You are nothing, I answer a higher call!',10295,1,0,0,'vazruden SAY_AGGRO2'), +(-1543020,'The Dark Lord laughs at you!',10296,1,0,0,'vazruden SAY_AGGRO3'), +(-1543021,'Is there no one left to test me?',10293,1,0,0,'vazruden SAY_TAUNT'), +(-1543022,'It is over. Finished!',10297,1,0,0,'vazruden SAY_KILL1'), +(-1543023,'Your days are done!',10298,1,0,0,'vazruden SAY_KILL2'), +(-1543024,'My lord will be the end you all...',10299,1,0,0,'vazruden SAY_DEATH'), +(-1543025,'%s descends from the sky.',0,3,0,0,'vazruden EMOTE_DESCEND'); + +-- -1 544 000 MAGTHERIDON'S LAIR +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1544000,'Wretched, meddling insects. Release me and perhaps i will grant you a merciful death!',10247,1,0,0,'magtheridon SAY_TAUNT1'), +(-1544001,'Vermin! Leeches! Take my blood and choke on it!',10248,1,0,0,'magtheridon SAY_TAUNT2'), +(-1544002,'Illidan is an arrogant fool. I will crush him and reclaim Outland as my own.',10249,1,0,0,'magtheridon SAY_TAUNT3'), +(-1544003,'Away, you mindless parasites. My blood is my own!',10250,1,0,0,'magtheridon SAY_TAUNT4'), +(-1544004,'How long do you believe your pathetic sorcery can hold me?',10251,1,0,0,'magtheridon SAY_TAUNT5'), +(-1544005,'My blood will be the end of you!',10252,1,0,0,'magtheridon SAY_TAUNT6'), +(-1544006,'I...am...UNLEASHED!!!',10253,1,0,0,'magtheridon SAY_FREED'), +(-1544007,'Thank you for releasing me. Now...die!',10254,1,0,0,'magtheridon SAY_AGGRO'), +(-1544008,'Not again...NOT AGAIN!',10256,1,0,0,'magtheridon SAY_BANISH'), +(-1544009,'I will not be taken so easily. Let the walls of this prison tremble...and FALL!!!',10257,1,0,0,'magtheridon SAY_CHAMBER_DESTROY'), +(-1544010,'Did you think me weak? Soft? Who is the weak one now?!',10255,1,0,0,'magtheridon SAY_PLAYER_KILLED'), +(-1544011,'The Legion...will consume you...all...',10258,1,0,0,'magtheridon SAY_DEATH'), +(-1544012,'%s becomes enraged!',0,2,0,0,'magtheridon EMOTE_BERSERK'), +(-1544013,'%s begins to cast Blast Nova!',0,3,0,0,'magtheridon EMOTE_BLASTNOVA'), +(-1544014,'%s\'s bonds begin to weaken!',0,2,0,0,'magtheridon EMOTE_BEGIN'), +(-1544015,'%s breaks free!',0,2,0,0,'magtheridon EMOTE_FREED'); + +-- -1 545 000 THE STEAMVAULT +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1545000,'Surge forth my pets!',10360,1,0,0,'thespia SAY_SUMMON'), +(-1545001,'The depths will consume you!',10361,1,0,0,'thespia SAY_AGGRO_1'), +(-1545002,'Meet your doom, surface dwellers!',10362,1,0,0,'thespia SAY_AGGRO_2'), +(-1545003,'You will drown in blood!',10363,1,0,0,'thespia SAY_AGGRO_3'), +(-1545004,'To the depths of oblivion with you!',10364,1,0,0,'thespia SAY_SLAY_1'), +(-1545005,'For my lady and master!',10365,1,0,0,'thespia SAY_SLAY_2'), +(-1545006,'Our matron will be.. the end of.. you..',10366,1,0,0,'thespia SAY_DEAD'), + +(-1545007,'I\'m bringin\' the pain!',10367,1,0,0,'mekgineer SAY_MECHANICS'), +(-1545008,'You\'re in for a world of hurt!',10368,1,0,0,'mekgineer SAY_AGGRO_1'), +(-1545009,'Eat hot metal, scumbag!',10369,1,0,0,'mekgineer SAY_AGGRO_2'), +(-1545010,'I\'ll come over there!',10370,1,0,0,'mekgineer SAY_AGGRO_3'), +(-1545011,'I\'m bringin\' the pain!',10371,1,0,0,'mekgineer SAY_AGGRO_4'), +(-1545012,'You just got served, punk!',10372,1,0,0,'mekgineer SOUND_SLAY_1'), +(-1545013,'I own you!',10373,1,0,0,'mekgineer SOUND_SLAY_2'), +(-1545014,'Have fun dyin\', cupcake!',10374,1,0,0,'mekgineer SOUND_SLAY_3'), +(-1545015,'Mommy!',10375,1,0,0,'mekgineer SAY_DEATH'), + +(-1545016,'You deem yourselves worthy simply because you bested my guards? Our work here will not be compromised!',10390,1,0,0,'kalithresh SAY_INTRO'), +(-1545017,'This is not nearly over...',10391,1,0,0,'kalithresh SAY_REGEN'), +(-1545018,'Your head will roll!',10392,1,0,0,'kalithresh SAY_AGGRO1'), +(-1545019,'I despise all of your kind!',10393,1,0,0,'kalithresh SAY_AGGRO2'), +(-1545020,'Ba\'ahntha sol\'dorei!',10394,1,0,0,'kalithresh SAY_AGGRO3'), +(-1545021,'Scram, surface filth!',10395,1,0,0,'kalithresh SAY_SLAY1'), +(-1545022,'Ah ha ha ha ha ha ha!',10396,1,0,0,'kalithresh SAY_SLAY2'), +(-1545023,'For her Excellency... for... Vashj!',10397,1,0,0,'kalithresh SAY_DEATH'); + +-- -1 546 000 THE UNDERBOG + +-- -1 547 000 THE SLAVE PENS + +-- -1 548 000 SERPENTSHRINE CAVERN +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1548000,'I cannot allow you to interfere!',11289,1,0,0,'hydross SAY_AGGRO'), +(-1548001,'Better, much better.',11290,1,0,0,'hydross SAY_SWITCH_TO_CLEAN'), +(-1548002,'They have forced me to this...',11291,1,0,0,'hydross SAY_CLEAN_SLAY1'), +(-1548003,'I have no choice.',11292,1,0,0,'hydross SAY_CLEAN_SLAY2'), +(-1548004,'I am... released...',11293,1,0,0,'hydross SAY_CLEAN_DEATH'), +(-1548005,'Aaghh, the poison...',11297,1,0,0,'hydross SAY_SWITCH_TO_CORRUPT'), +(-1548006,'I will purge you from this place.',11298,1,0,0,'hydross SAY_CORRUPT_SLAY1'), +(-1548007,'You are no better than they!',11299,1,0,0,'hydross SAY_CORRUPT_SLAY2'), +(-1548008,'You are the disease, not I',11300,1,0,0,'hydross SAY_CORRUPT_DEATH'), + +(-1548009,'Finally, my banishment ends!',11312,1,0,0,'leotheras SAY_AGGRO'), +(-1548010,'Be gone, trifling elf. I am in control now!',11304,1,0,0,'leotheras SAY_SWITCH_TO_DEMON'), +(-1548011,'We all have our demons...',11305,1,0,0,'leotheras SAY_INNER_DEMONS'), +(-1548012,'I have no equal.',11306,1,0,0,'leotheras SAY_DEMON_SLAY1'), +(-1548013,'Perish, mortal.',11307,1,0,0,'leotheras SAY_DEMON_SLAY2'), +(-1548014,'Yes, YES! Ahahah!',11308,1,0,0,'leotheras SAY_DEMON_SLAY3'), +(-1548015,'Kill! KILL!',11314,1,0,0,'leotheras SAY_NIGHTELF_SLAY1'), +(-1548016,'That\'s right! Yes!',11315,1,0,0,'leotheras SAY_NIGHTELF_SLAY2'), +(-1548017,'Who\'s the master now?',11316,1,0,0,'leotheras SAY_NIGHTELF_SLAY3'), +(-1548018,'No... no! What have you done? I am the master! Do you hear me? I am... aaggh! Can\'t... contain him...',11313,1,0,0,'leotheras SAY_FINAL_FORM'), +(-1548019,'At last I am liberated. It has been too long since I have tasted true freedom!',11309,1,0,0,'leotheras SAY_FREE'), +(-1548020,'You cannot kill me! Fools, I\'ll be back! I\'ll... aarghh...',11317,1,0,0,'leotheras SAY_DEATH'), + +(-1548021,'Guards, attention! We have visitors...',11277,1,0,0,'karathress SAY_AGGRO'), +(-1548022,'Your overconfidence will be your undoing! Guards, lend me your strength!',11278,1,0,0,'karathress SAY_GAIN_BLESSING'), +(-1548023,'Go on, kill them! I\'ll be the better for it!',11279,1,0,0,'karathress SAY_GAIN_ABILITY1'), +(-1548024,'I am more powerful than ever!',11280,1,0,0,'karathress SAY_GAIN_ABILITY2'), +(-1548025,'More knowledge, more power!',11281,1,0,0,'karathress SAY_GAIN_ABILITY3'), +(-1548026,'Land-dwelling scum!',11282,1,0,0,'karathress SAY_SLAY1'), +(-1548027,'Alana be\'lendor!',11283,1,0,0,'karathress SAY_SLAY2'), +(-1548028,'I am rid of you.',11284,1,0,0,'karathress SAY_SLAY3'), +(-1548029,'Her ... excellency ... awaits!',11285,1,0,0,'karathress SAY_DEATH'), + +(-1548030,'Flood of the deep, take you!',11321,1,0,0,'morogrim SAY_AGGRO'), +(-1548031,'By the Tides, kill them at once!',11322,1,0,0,'morogrim SAY_SUMMON1'), +(-1548032,'Destroy them my subjects!',11323,1,0,0,'morogrim SAY_SUMMON2'), +(-1548033,'There is nowhere to hide!',11324,1,0,0,'morogrim SAY_SUMMON_BUBL1'), +(-1548034,'Soon it will be finished!',11325,1,0,0,'morogrim SAY_SUMMON_BUBL2'), +(-1548035,'It is done!',11326,1,0,0,'morogrim SAY_SLAY1'), +(-1548036,'Strugging only makes it worse.',11327,1,0,0,'morogrim SAY_SLAY2'), +(-1548037,'Only the strong survive.',11328,1,0,0,'morogrim SAY_SLAY3'), +(-1548038,'Great... currents of... Ageon.',11329,1,0,0,'morogrim SAY_DEATH'), +(-1548039,'%s sends his enemies to their watery graves!',0,2,0,0,'morogrim EMOTE_WATERY_GRAVE'), +(-1548040,'The violent earthquake has alerted nearby murlocs!',0,3,0,0,'morogrim EMOTE_EARTHQUAKE'), +(-1548041,'%s summons Watery Globules!',0,2,0,0,'morogrim EMOTE_WATERY_GLOBULES'), + +(-1548042,'Water is life. It has become a rare commodity here in Outland. A commodity that we alone shall control. We are the Highborne, and the time has come at last for us to retake our rightful place in the world!',11531,1,0,0,'vashj SAY_INTRO'), +(-1548043,'I\'ll split you from stem to stern!',11532,1,0,0,'vashj SAY_AGGRO1'), +(-1548044,'Victory to Lord Illidan!',11533,1,0,0,'vashj SAY_AGGRO2'), +(-1548045,'I spit on you, surface filth!',11534,1,0,0,'vashj SAY_AGGRO3'), +(-1548046,'Death to the outsiders!',11535,1,0,0,'vashj SAY_AGGRO4'), +(-1548047,'I did not wish to lower myself by engaging your kind, but you leave me little choice!',11538,1,0,0,'vashj SAY_PHASE1'), +(-1548048,'The time is now! Leave none standing!',11539,1,0,0,'vashj SAY_PHASE2'), +(-1548049,'You may want to take cover.',11540,1,0,0,'vashj SAY_PHASE3'), +(-1548050,'Straight to the heart!',11536,1,0,0,'vashj SAY_BOWSHOT1'), +(-1548051,'Seek your mark!',11537,1,0,0,'vashj SAY_BOWSHOT2'), +(-1548052,'Your time ends now!',11541,1,0,0,'vashj SAY_SLAY1'), +(-1548053,'You have failed!',11542,1,0,0,'vashj SAY_SLAY2'), +(-1548054,'Be\'lamere an\'delay',11543,1,0,0,'vashj SAY_SLAY3'), +(-1548055,'Lord Illidan, I... I am... sorry.',11544,1,0,0,'vashj SAY_DEATH'); + +-- -1 550 000 THE EYE +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1550000,'Alert, you are marked for extermination!',11213,1,0,0,'voidreaver SAY_AGGRO'), +(-1550001,'Extermination, successful.',11215,1,0,0,'voidreaver SAY_SLAY1'), +(-1550002,'Imbecile life form, no longer functional.',11216,1,0,0,'voidreaver SAY_SLAY2'), +(-1550003,'Threat neutralized.',11217,1,0,0,'voidreaver SAY_SLAY3'), +(-1550004,'Systems... shutting... down...',11214,1,0,0,'voidreaver SAY_DEATH'), +(-1550005,'Alternative measure commencing...',11218,1,0,0,'voidreaver SAY_POUNDING1'), +(-1550006,'Calculating force parameters...',11219,1,0,0,'voidreaver SAY_POUNDING2'), + +(-1550007,'Tal anu\'men no Sin\'dorei!',11134,1,0,0,'solarian SAY_AGGRO'), +(-1550008,'Ha ha ha! You are hopelessly outmatched!',11139,1,0,0,'solarian SAY_SUMMON1'), +(-1550009,'I will crush your delusions of grandeur!',11140,1,0,0,'solarian SAY_SUMMON2'), +(-1550010,'Your soul belongs to the Abyss!',11136,1,0,0,'solarian SAY_KILL1'), +(-1550011,'By the blood of the Highborne!',11137,1,0,0,'solarian SAY_KILL2'), +(-1550012,'For the Sunwell!',11138,1,0,0,'solarian SAY_KILL3'), +(-1550013,'The warmth of the sun... awaits.',11135,1,0,0,'solarian SAY_DEATH'), +(-1550014,'Enough of this! Now I call upon the fury of the cosmos itself.',0,1,0,0,'solarian SAY_VOIDA'), +(-1550015,'I become ONE... with the VOID!',0,1,0,0,'solarian SAY_VOIDB'), + +(-1550016,'Energy. Power. My people are addicted to it... a dependence made manifest after the Sunwell was destroyed. Welcome... to the future. A pity you are too late to stop it. No one can stop me now! Selama ashal\'anore!',11256,1,0,0,'kaelthas SAY_INTRO'), +(-1550017,'Capernian will see to it that your stay here is a short one.',11257,1,0,0,'kaelthas SAY_INTRO_CAPERNIAN'), +(-1550018,'Well done, you have proven worthy to test your skills against my master engineer, Telonicus.',11258,1,0,0,'kaelthas SAY_INTRO_TELONICUS'), +(-1550019,'Let us see how your nerves hold up against the Darkener, Thaladred.',11259,1,0,0,'kaelthas SAY_INTRO_THALADRED'), +(-1550020,'You have persevered against some of my best advisors... but none can withstand the might of the Blood Hammer. Behold, Lord Sanguinar!',11260,1,0,0,'kaelthas SAY_INTRO_SANGUINAR'), +(-1550021,'As you see, I have many weapons in my arsenal...',11261,1,0,0,'kaelthas SAY_PHASE2_WEAPON'), +(-1550022,'Perhaps I underestimated you. It would be unfair to make you fight all four advisors at once, but... fair treatment was never shown to my people. I\'m just returning the favor.',11262,1,0,0,'kaelthas SAY_PHASE3_ADVANCE'), +(-1550023,'Alas, sometimes one must take matters into one\'s own hands. Balamore shanal!',11263,1,0,0,'kaelthas SAY_PHASE4_INTRO2'), +(-1550024,'I have not come this far to be stopped! The future I have planned will not be jeopardized! Now you will taste true power!!',11273,1,0,0,'kaelthas SAY_PHASE5_NUTS'), +(-1550025,'You will not prevail.',11270,1,0,0,'kaelthas SAY_SLAY1'), +(-1550026,'You gambled...and lost.',11271,1,0,0,'kaelthas SAY_SLAY2'), +(-1550027,'This was Child\'s play.',11272,1,0,0,'kaelthas SAY_SLAY3'), +(-1550028,'Obey me.',11268,1,0,0,'kaelthas SAY_MINDCONTROL1'), +(-1550029,'Bow to my will.',11269,1,0,0,'kaelthas SAY_MINDCONTROL2'), +(-1550030,'Let us see how you fare when your world is turned upside down.',11264,1,0,0,'kaelthas SAY_GRAVITYLAPSE1'), +(-1550031,'Having trouble staying grounded?',11265,1,0,0,'kaelthas SAY_GRAVITYLAPSE2'), +(-1550032,'Anara\'nel belore!',11267,1,0,0,'kaelthas SAY_SUMMON_PHOENIX1'), +(-1550033,'By the power of the sun!',11266,1,0,0,'kaelthas SAY_SUMMON_PHOENIX2'), +(-1550034,'For...Quel...thalas!',11274,1,0,0,'kaelthas SAY_DEATH'), + +(-1550035,'Prepare yourselves!',11203,1,0,0,'thaladred SAY_THALADRED_AGGRO'), +(-1550036,'Forgive me, my prince! I have... failed.',11204,1,0,0,'thaladred SAY_THALADRED_DEATH'), +(-1550037,'%s sets his gaze on $N!',0,2,0,0,'thaladred EMOTE_THALADRED_GAZE'), + +(-1550038,'Blood for blood!',11152,1,0,0,'sanguinar SAY_SANGUINAR_AGGRO'), +(-1550039,'NO! I ...will... not...',11153,1,0,0,'sanguinar SAY_SANGUINAR_DEATH'), + +(-1550040,'The sin\'dore reign supreme!',11117,1,0,0,'capernian SAY_CAPERNIAN_AGGRO'), +(-1550041,'This is not over!',11118,1,0,0,'capernian SAY_CAPERNIAN_DEATH'), + +(-1550042,'Anar\'alah belore!',11157,1,0,0,'telonicus SAY_TELONICUS_AGGRO'), +(-1550043,'More perils... await',11158,1,0,0,'telonicus SAY_TELONICUS_DEATH'); + +-- -1 552 000 THE ARCATRAZ +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1552000,'It is a small matter to control the mind of the weak... for I bear allegiance to powers untouched by time, unmoved by fate. No force on this world or beyond harbors the strength to bend our knee... not even the mighty Legion!',11122,1,0,0,'skyriss SAY_INTRO'), +(-1552001,'Bear witness to the agent of your demise!',11123,1,0,0,'skyriss SAY_AGGRO'), +(-1552002,'Your fate is written!',11124,1,0,0,'skyriss SAY_KILL_1'), +(-1552003,'The chaos I have sown here is but a taste...',11125,1,0,0,'skyriss SAY_KILL_2'), +(-1552004,'You will do my bidding, weakling.',11127,1,0,0,'skyriss SAY_MIND_1'), +(-1552005,'Your will is no longer your own.',11128,1,0,0,'skyriss SAY_MIND_2'), +(-1552006,'Flee in terror!',11129,1,0,0,'skyriss SAY_FEAR_1'), +(-1552007,'I will show you horrors undreamed of!',11130,1,0,0,'skyriss SAY_FEAR_2'), +(-1552008,'We span the universe, as countless as the stars!',11131,1,0,0,'skyriss SAY_IMAGE'), +(-1552009,'I am merely one of... infinite multitudes.',11126,1,0,0,'skyriss SAY_DEATH'), + +(-1552010,'Where in Bonzo\'s brass buttons am I? And who are-- yaaghh, that\'s one mother of a headache!',11171,1,0,0,'millhouse SAY_INTRO_1'), +(-1552011,'\"Lowly\"? I don\'t care who you are friend, no one refers to the mighty Millhouse Manastorm as \"Lowly\"! I have no idea what goes on here, but I will gladly join your fight against this impudent imbecile! Prepare to defend yourself, cretin!',11172,1,0,0,'millhouse SAY_INTRO_2'), +(-1552012,'I just need to get some things ready first. You guys go ahead and get started. I need to summon up some water...',11173,1,0,0,'millhouse SAY_WATER'), +(-1552013,'Fantastic! Next, some protective spells. Yes! Now we\'re cookin\'',11174,1,0,0,'millhouse SAY_BUFFS'), +(-1552014,'And of course i\'ll need some mana. You guys are gonna love this, just wait.',11175,1,0,0,'millhouse SAY_DRINK'), +(-1552015,'Aaalllriiiight!! Who ordered up an extra large can of whoop-ass?',11176,1,0,0,'millhouse SAY_READY'), +(-1552016,'I didn\'t even break a sweat on that one.',11177,1,0,0,'millhouse SAY_KILL_1'), +(-1552017,'You guys, feel free to jump in anytime.',11178,1,0,0,'millhouse SAY_KILL_2'), +(-1552018,'I\'m gonna light you up, sweet cheeks!',11179,1,0,0,'millhouse SAY_PYRO'), +(-1552019,'Ice, ice, baby!',11180,1,0,0,'millhouse SAY_ICEBLOCK'), +(-1552020,'Heal me! Oh, for the love of all that is holy, HEAL me! I\'m dying!',11181,1,0,0,'millhouse SAY_LOWHP'), +(-1552021,'You\'ll be hearing from my lawyer...',11182,1,0,0,'millhouse SAY_DEATH'), +(-1552022,'Who\'s bad? Who\'s bad? That\'s right: we bad!',11183,1,0,0,'millhouse SAY_COMPLETE'), + +(-1552023,'I knew the prince would be angry but, I... I have not been myself. I had to let them out! The great one speaks to me, you see. Wait--outsiders. Kael\'thas did not send you! Good... I\'ll just tell the prince you released the prisoners!',11222,1,0,0,'mellichar YELL_INTRO1'), +(-1552024,'The naaru kept some of the most dangerous beings in existence here in these cells. Let me introduce you to another...',11223,1,0,0,'mellichar YELL_INTRO2'), +(-1552025,'Yes, yes... another! Your will is mine!',11224,1,0,0,'mellichar YELL_RELEASE1'), +(-1552026,'Behold another terrifying creature of incomprehensible power!',11225,1,0,0,'mellichar YELL_RELEASE2A'), +(-1552027,'What is this? A lowly gnome? I will do better, O\'great one.',11226,1,0,0,'mellichar YELL_RELEASE2B'), +(-1552028,'Anarchy! Bedlam! Oh, you are so wise! Yes, I see it now, of course!',11227,1,0,0,'mellichar YELL_RELEASE3'), +(-1552029,'One final cell remains. Yes, O\'great one, right away!',11228,1,0,0,'mellichar YELL_RELEASE4'), +(-1552030,'Welcome, O\'great one. I am your humble servant.',11229,1,0,0,'mellichar YELL_WELCOME'); + +-- -1 553 000 THE BOTANICA +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1553000,'What are you doing? These specimens are very delicate!',11144,1,0,0,'freywinn SAY_AGGRO'), +(-1553001,'Your life cycle is now concluded!',11145,1,0,0,'freywinn SAY_KILL_1'), +(-1553002,'You will feed the worms.',11146,1,0,0,'freywinn SAY_KILL_2'), +(-1553003,'Endorel aluminor!',11147,1,0,0,'freywinn SAY_TREE_1'), +(-1553004,'Nature bends to my will!',11148,1,0,0,'freywinn SAY_TREE_2'), +(-1553005,'The specimens...must be preserved.',11149,1,0,0,'freywinn SAY_DEATH'), + +(-1553006,'%s emits a strange noise.',0,2,0,0,'laj EMOTE_SUMMON'), + +(-1553007,'Who disturbs this sanctuary?',11230,1,0,0,'warp SAY_AGGRO'), +(-1553008,'You must die! But wait: this does not--No, no... you must die!',11231,1,0,0,'warp SAY_SLAY_1'), +(-1553009,'What am I doing? Why do I...',11232,1,0,0,'warp SAY_SLAY_2'), +(-1553010,'Children, come to me!',11233,1,0,0,'warp SAY_SUMMON_1'), +(-1553011,'Maybe this is not--No, we fight! Come to my aid.',11234,1,0,0,'warp SAY_SUMMON_2'), +(-1553012,'So... confused. Do not... belong here!',11235,1,0,0,'warp SAY_DEATH'); + +-- -1 554 000 THE MECHANAR +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1554000,'I predict a painful death.',11101,1,0,0,'gyro SAY_AGGRO'), +(-1554001,'Measure twice; cut once!',11104,1,0,0,'gyro SAY_SAW_ATTACK1'), +(-1554002,'If my division is correct, you should be quite dead.',11105,1,0,0,'gyro SAY_SAW_ATTACK2'), +(-1554003,'Your strategy was flawed!',11102,1,0,0,'gyro SAY_SLAY1'), +(-1554004,'Yes, the only logical outcome.',11103,1,0,0,'gyro SAY_SLAY2'), +(-1554005,'An unforseen... contingency',11106,1,0,0,'gyro SAY_DEATH'), + +(-1554006,'You have approximately five seconds to live.',11109,1,0,0,'ironhand SAY_AGGRO_1'), +(-1554007,'With the precise angle and velocity...',11112,1,0,0,'ironhand SAY_HAMMER_1'), +(-1554008,'Low tech yet quiet effective!',11113,1,0,0,'ironhand SAY_HAMMER_2'), +(-1554009,'A foregone conclusion.',11110,1,0,0,'ironhand SAY_SLAY_1'), +(-1554010,'The processing will continue a schedule!',11111,1,0,0,'ironhand SAY_SLAY_2'), +(-1554011,'My calculations did not...',11114,1,0,0,'ironhand SAY_DEATH_1'), +(-1554012,'%s raises his hammer menacingly...',0,3,0,0,'ironhand EMOTE_HAMMER'), + +(-1554013,'Don\'t value your life very much, do you?',11186,1,0,0,'sepethrea SAY_AGGRO'), +(-1554014,'I am not alone.',11191,1,0,0,'sepethrea SAY_SUMMON'), +(-1554015,'Think you can take the heat?',11189,1,0,0,'sepethrea SAY_DRAGONS_BREATH_1'), +(-1554016,'Anar\'endal dracon!',11190,1,0,0,'sepethrea SAY_DRAGONS_BREATH_2'), +(-1554017,'And don\'t come back!',11187,1,0,0,'sepethrea SAY_SLAY1'), +(-1554018,'En\'dala finel el\'dal',11188,1,0,0,'sepethrea SAY_SLAY2'), +(-1554019,'Anu... bala belore...alon.',11192,1,0,0,'sepethrea SAY_DEATH'), + +(-1554020,'We are on a strict timetable. You will not interfere!',11193,1,0,0,'pathaleon SAY_AGGRO'), +(-1554021,'I\'m looking for a team player...',11197,1,0,0,'pathaleon SAY_DOMINATION_1'), +(-1554022,'You work for me now!',11198,1,0,0,'pathaleon SAY_DOMINATION_2'), +(-1554023,'Time to supplement my work force.',11196,1,0,0,'pathaleon SAY_SUMMON'), +(-1554024,'I prefeer to be hands-on...',11199,1,0,0,'pathaleon SAY_ENRAGE'), +(-1554025,'A minor inconvenience.',11194,1,0,0,'pathaleon SAY_SLAY_1'), +(-1554026,'Looks like you lose.',11195,1,0,0,'pathaleon SAY_SLAY_2'), +(-1554027,'The project will... continue.',11200,1,0,0,'pathaleon SAY_DEATH'); + +-- -1 555 000 SHADOW LABYRINTH +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1555000,'Infidels have invaded the sanctuary! Sniveling pests...You have yet to learn the true meaning of agony!',10473,1,0,0,'hellmaw SAY_INTRO'), +(-1555001,'Pathetic mortals! You will pay dearly!',10475,1,0,0,'hellmaw SAY_AGGRO1'), +(-1555002,'I will break you!',10476,1,0,0,'hellmaw SAY_AGGRO2'), +(-1555003,'Finally! Something to relieve the tedium!',10477,1,0,0,'hellmaw SAY_AGGRO3'), +(-1555004,'Aid me, you fools, before it\'s too late!',10474,1,0,0,'hellmaw SAY_HELP'), +(-1555005,'Do you fear death?',10478,1,0,0,'hellmaw SAY_SLAY1'), +(-1555006,'This is the part I enjoy most.',10479,1,0,0,'hellmaw SAY_SLAY2'), +(-1555007,'Do not...grow...overconfident, mortal.',10480,1,0,0,'hellmaw SAY_DEATH'), + +(-1555008,'All flesh must burn.',10482,1,0,0,'blackhearth SAY_INTRO1'), +(-1555009,'All creation must be unmade!',10483,1,0,0,'blackhearth SAY_INTRO2'), +(-1555010,'Power will be yours!',10484,1,0,0,'blackhearth SAY_INTRO3'), +(-1555011,'You\'ll be sorry!',10486,1,0,0,'blackhearth SAY_AGGRO1'), +(-1555012,'Time for fun!',10487,1,0,0,'blackhearth SAY_AGGRO2'), +(-1555013,'I see dead people!',10488,1,0,0,'blackhearth SAY_AGGRO3'), +(-1555014,'No comin\' back for you!',10489,1,0,0,'blackhearth SAY_SLAY1'), +(-1555015,'Nice try!',10490,1,0,0,'blackhearth SAY_SLAY2'), +(-1555016,'Help us, hurry!',10485,1,0,0,'blackhearth SAY_HELP'), +(-1555017,'This... no... good...',10491,1,0,0,'blackhearth SAY_DEATH'), + +(-1555018,'Be ready for Dark One\'s return.',10492,1,0,0,'blackhearth SAY2_INTRO1'), +(-1555019,'So we have place in new universe.',10493,1,0,0,'blackhearth SAY2_INTRO2'), +(-1555020,'Dark one promise!',10494,1,0,0,'blackhearth SAY2_INTRO3'), +(-1555021,'You\'ll be sorry!',10496,1,0,0,'blackhearth SAY2_AGGRO1'), +(-1555022,'Time to kill!',10497,1,0,0,'blackhearth SAY2_AGGRO2'), +(-1555023,'You be dead people!',10498,1,0,0,'blackhearth SAY2_AGGRO3'), +(-1555024,'Now you gone for good.',10499,1,0,0,'blackhearth SAY2_SLAY1'), +(-1555025,'You failed, haha haha',10500,1,0,0,'blackhearth SAY2_SLAY2'), +(-1555026,'Help us, hurry!',10495,1,0,0,'blackhearth SAY2_HELP'), +(-1555027,'Arrgh, aah...ahhh',10501,1,0,0,'blackhearth SAY2_DEATH'), + +(-1555028,'Keep your minds focused for the days of reckoning are close at hand. Soon, the destroyer of worlds will return to make good on his promise. Soon the destruction of all that is will begin!',10522,1,0,0,'vorpil SAY_INTRO'), +(-1555029,'I\'ll make an offering of your blood!',10524,1,0,0,'vorpil SAY_AGGRO1'), +(-1555030,'You\'ll be a fine example, for the others.',10525,1,0,0,'vorpil SAY_AGGRO2'), +(-1555031,'Good, a worthy sacrifice.',10526,1,0,0,'vorpil SAY_AGGRO3'), +(-1555032,'Come to my aid, heed your master now!',10523,1,0,0,'vorpil SAY_HELP'), +(-1555033,'I serve with pride.',10527,1,0,0,'vorpil SAY_SLAY1'), +(-1555034,'Your death is for the greater cause!',10528,1,0,0,'vorpil SAY_SLAY2'), +(-1555035,'I give my life... Gladly.',10529,1,0,0,'vorpil SAY_DEATH'), + +(-1555036,'%s draws energy from the air.',0,2,0,0,'murmur EMOTE_SONIC_BOOM'); + +-- -1 556 000 SETHEKK HALLS +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1556000,'I have pets....of my own!',10502,1,0,0,'syth SAY_SUMMON'), +(-1556001,'Hrrmm.. Time to.. hrrm.. make my move.',10503,1,0,0,'syth SAY_AGGRO_1'), +(-1556002,'Nice pets..hrm.. Yes! ',10504,1,0,0,'syth SAY_AGGRO_2'), +(-1556003,'Nice pets have.. weapons. No so....nice.',10505,1,0,0,'syth SAY_AGGRO_3'), +(-1556004,'Death.. meeting life is.. ',10506,1,0,0,'syth SAY_SLAY_1'), +(-1556005,'Uhn.. Be free..',10507,1,0,0,'syth SAY_SLAY_2'), +(-1556006,'No more life..hrm. No more pain. ',10508,1,0,0,'syth SAY_DEATH'), + +(-1556007,'..Trinkets yes pretty Trinkets....power, great power...power in Trinkets..',10557,1,0,0,'ikiss SAY_INTRO'), +(-1556008,'You make war on Ikiss?..',10554,1,0,0,'ikiss SAY_AGGRO_1'), +(-1556009,'Ikiss cut you pretty....slice you. Yes!',10555,1,0,0,'ikiss SAY_AGGRO_2'), +(-1556010,'No escape for....for you',10556,1,0,0,'ikiss SAY_AGGRO_3'), +(-1556011,'You die....stay away from Trinkets',10558,1,0,0,'ikiss SAY_SLAY_1'), +(-1556012,'',10559,1,0,0,'ikiss SAY_SLAY_2'), +(-1556013,'Ikiss will not....die',10560,1,0,0,'ikiss SAY_DEATH'), +(-1556015,'%s begins to channel arcane energy...',0,3,0,0,'ikiss EMOTE_ARCANE_EXP'); + +-- -1 557 000 MANA TOMBS +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1557000,'What is this? You must forgive me, but I was not expecting company. As you can see, we are somewhat preoccupied right now. But no matter. As I am a gracious host, I will tend to you... personally.',10539,1,0,0,'shaffar SAY_INTRO'), +(-1557001,'We have not yet been properly introduced.',10541,1,0,0,'shaffar SAY_AGGRO_1'), +(-1557002,'An epic battle. How exciting!',10542,1,0,0,'shaffar SAY_AGGRO_2'), +(-1557003,'I have longed for a good adventure.',10543,1,0,0,'shaffar SAY_AGGRO_3'), +(-1557004,'It has been... entertaining.',10544,1,0,0,'shaffar SAY_SLAY_1'), +(-1557005,'And now we part company.',10545,1,0,0,'shaffar SAY_SLAY_2'), +(-1557006,'I have such fascinating things to show you.',10540,1,0,0,'shaffar SAY_SUMMON'), +(-1557007,'I must bid you... farewell.',10546,1,0,0,'shaffar SAY_DEAD'), + +(-1557008,'I will feed on your soul.',10561,1,0,0,'pandemonius SAY_AGGRO_1'), +(-1557009,'So... full of life!',10562,1,0,0,'pandemonius SAY_AGGRO_2'), +(-1557010,'Do not... resist.',10563,1,0,0,'pandemonius SAY_AGGRO_3'), +(-1557011,'Yes! I am... empowered!',10564,1,0,0,'pandemonius SAY_KILL_1'), +(-1557012,'More... I must have more!',10565,1,0,0,'pandemonius SAY_KILL_2'), +(-1557013,'To the void... once... more..',10566,1,0,0,'pandemonius SAY_DEATH'), +(-1557014,'%s shifts into the void...',0,3,0,0,'pandemonius EMOTE_DARK_SHELL'); + +-- -1 558 000 AUCHENAI CRYPTS +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1558000,'You have defiled the resting place of our ancestors. For this offense, there can be but one punishment. It is fitting that you have come to a place of the dead... for you will soon be joining them.',10509,1,0,0,'maladaar SAY_INTRO'), +(-1558001,'Rise my fallen brothers. Take form and fight!',10512,1,0,0,'maladaar SAY_SUMMON'), +(-1558002,'You will pay with your life!',10513,1,0,0,'maladaar SAY_AGGRO_1'), +(-1558003,'There\'s no turning back now!',10514,1,0,0,'maladaar SAY_AGGRO_2'), +(-1558004,'Serve your penitence!',10515,1,0,0,'maladaar SAY_AGGRO_3'), +(-1558005,'Let your mind be clouded.',10510,1,0,0,'maladaar SAY_ROAR'), +(-1558006,'Stare into the darkness of your soul.',10511,1,0,0,'maladaar SAY_SOUL_CLEAVE'), +(-1558007,'These walls will be your doom.',10516,1,0,0,'maladaar SAY_SLAY_1'), +(-1558008,' Now, you\'ll stay for eternity!',10517,1,0,0,'maladaar SAY_SLAY_2'), +(-1558009,'This is... where.. I belong...',10518,1,0,0,'maladaar SAY_DEATH'); + +-- -1 560 000 ESCAPE FROM DURNHOLDE (OLD HILLSBRAD) +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1560000,'Thrall! You didn\'t really think you would escape did you? You and your allies shall answer to Blackmoore - after I\'ve had my fun!',10406,1,0,0,'skarloc SAY_ENTER'), +(-1560001,'You\'re a slave. That\'s all you\'ll ever be.',10407,1,0,0,'skarloc SAY_TAUNT1'), +(-1560002,'I don\'t know what Blackmoore sees in you. For my money, you\'re just another ignorant savage!',10408,1,0,0,'skarloc SAY_TAUNT2'), +(-1560003,'Thrall will never be free!',10409,1,0,0,'skarloc SAY_SLAY1'), +(-1560004,'Did you really think you would leave here alive?',10410,1,0,0,'skarloc SAY_SLAY2'), +(-1560005,'Guards! Urgh..Guards..!',10411,1,0,0,'skarloc SAY_DEATH'), + +(-1560006,'You there, fetch water quickly! Get these flames out before they spread to the rest of the keep! Hurry, damn you!',10428,1,0,0,'lieutenant_drake SAY_ENTER'), +(-1560007,'I know what you\'re up to, and I mean to put an end to it, permanently!',10429,1,0,0,'lieutenant_drake SAY_AGGRO'), +(-1560008,'No more middling for you.',10432,1,0,0,'lieutenant_drake SAY_SLAY1'), +(-1560009,'You will not interfere!',10433,1,0,0,'lieutenant_drake SAY_SLAY2'), +(-1560010,'Time to bleed!',10430,1,0,0,'lieutenant_drake SAY_MORTAL'), +(-1560011,'Run, you blasted cowards!',10431,1,0,0,'lieutenant_drake SAY_SHOUT'), +(-1560012,'Thrall... must not... go free.',10434,1,0,0,'lieutenant_drake SAY_DEATH'), + +(-1560013,'Thrall! Come outside and face your fate!',10418,1,0,0,'epoch SAY_ENTER1'), +(-1560014,'Taretha\'s life hangs in the balance. Surely you care for her. Surely you wish to save her...',10419,1,0,0,'epoch SAY_ENTER2'), +(-1560015,'Ah, there you are. I had hoped to accomplish this with a bit of subtlety, but I suppose direct confrontation was inevitable. Your future, Thrall, must not come to pass and so...you and your troublesome friends must die!',10420,1,0,0,'epoch SAY_ENTER3'), +(-1560016,'Enough! I will erase your very existence!',10421,1,0,0,'epoch SAY_AGGRO1'), +(-1560017,'You cannot fight fate!',10422,1,0,0,'epoch SAY_AGGRO2'), +(-1560018,'You are...irrelevant.',10425,1,0,0,'epoch SAY_SLAY1'), +(-1560019,'Thrall will remain a slave. Taretha will die. You have failed.',10426,1,0,0,'epoch SAY_SLAY2'), +(-1560020,'Not so fast!',10423,1,0,0,'epoch SAY_BREATH1'), +(-1560021,'Struggle as much as you like!',10424,1,0,0,'epoch SAY_BREATH2'), +(-1560022,'No!...The master... will not... be pleased.',10427,1,0,0,'epoch SAY_DEATH'), + +(-1560023,'Very well then. Let\'s go!',10465,1,0,0,'thrall hillsbrad SAY_TH_START_EVENT_PART1'), +(-1560024,'As long as we\'re going with a new plan, I may aswell pick up a weapon and some armor.',0,0,0,0,'thrall hillsbrad SAY_TH_ARMORY'), +(-1560025,'A rider approaches!',10466,0,0,0,'thrall hillsbrad SAY_TH_SKARLOC_MEET'), +(-1560026,'I\'ll never be chained again!',10467,1,0,0,'thrall hillsbrad SAY_TH_SKARLOC_TAUNT'), +(-1560027,'Very well. Tarren Mill lies just west of here. Since time is of the essence...',10468,1,0,0,'thrall hillsbrad SAY_TH_START_EVENT_PART2'), +(-1560028,'Let\'s ride!',10469,0,0,1,'thrall hillsbrad SAY_TH_MOUNTS_UP'), +(-1560029,'Taretha must be in the inn. Let\'s go.',0,0,0,0,'thrall hillsbrad SAY_TH_CHURCH_END'), +(-1560030,'Taretha! What foul magic is this?',0,0,0,0,'thrall hillsbrad SAY_TH_MEET_TARETHA'), +(-1560031,'Who or what was that?',10470,1,0,1,'thrall hillsbrad SAY_TH_EPOCH_WONDER'), +(-1560032,'No!',10471,1,0,5,'thrall hillsbrad SAY_TH_EPOCH_KILL_TARETHA'), +(-1560033,'Goodbye, Taretha. I will never forget your kindness.',10472,1,0,0,'thrall hillsbrad SAY_TH_EVENT_COMPLETE'), +(-1560034,'Things are looking grim...',10458,1,0,0,'thrall hillsbrad SAY_TH_RANDOM_LOW_HP1'), +(-1560035,'I will fight to the last!',10459,1,0,0,'thrall hillsbrad SAY_TH_RANDOM_LOW_HP2'), +(-1560036,'Taretha...',10460,1,0,0,'thrall hillsbrad SAY_TH_RANDOM_DIE1'), +(-1560037,'A good day...to die...',10461,1,0,0,'thrall hillsbrad SAY_TH_RANDOM_DIE2'), +(-1560038,'I have earned my freedom!',10448,1,0,0,'thrall hillsbrad SAY_TH_RANDOM_AGGRO1'), +(-1560039,'This day is long overdue. Out of my way!',10449,1,0,0,'thrall hillsbrad SAY_TH_RANDOM_AGGRO2'), +(-1560040,'I am a slave no longer!',10450,1,0,0,'thrall hillsbrad SAY_TH_RANDOM_AGGRO3'), +(-1560041,'Blackmoore has much to answer for!',10451,1,0,0,'thrall hillsbrad SAY_TH_RANDOM_AGGRO4'), +(-1560042,'You have forced my hand!',10452,1,0,0,'thrall hillsbrad SAY_TH_RANDOM_KILL1'), +(-1560043,'It should not have come to this!',10453,1,0,0,'thrall hillsbrad SAY_TH_RANDOM_KILL2'), +(-1560044,'I did not ask for this!',10454,1,0,0,'thrall hillsbrad SAY_TH_RANDOM_KILL3'), +(-1560045,'I am truly in your debt, strangers.',10455,1,0,0,'thrall hillsbrad SAY_TH_LEAVE_COMBAT1'), +(-1560046,'Thank you, strangers. You have given me hope.',10456,1,0,0,'thrall hillsbrad SAY_TH_LEAVE_COMBAT2'), +(-1560047,'I will not waste this chance. I will seek out my destiny.',10457,1,0,0,'thrall hillsbrad SAY_TH_LEAVE_COMBAT3'), + +(-1560048,'I\'m free! Thank you all!',0,0,0,0,'taretha SAY_TA_FREE'), +(-1560049,'Thrall, you escaped!',0,0,0,0,'taretha SAY_TA_ESCAPED'); + +-- -1 564 000 BLACK TEMPLE +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1564000,'You will die in the name of Lady Vashj!',11450,1,0,0,'SAY_AGGRO'), +(-1564001,'Stick around!',11451,1,0,0,'SAY_NEEDLE1'), +(-1564002,'I\'ll deal with you later!',11452,1,0,0,'SAY_NEEDLE2'), +(-1564003,'Your success was short lived!',11455,1,0,0,'SAY_SLAY1'), +(-1564004,'Time for you to go!',11456,1,0,0,'SAY_SLAY2'), +(-1564005,'Bel\'anen dal\'lorei!',11453,1,0,0,'SAY_SPECIAL1'), +(-1564006,'Blood will flow!',11454,1,0,0,'SAY_SPECIAL2'), +(-1564007,'Bal\'amer ch\'itah!',11457,1,0,0,'SAY_ENRAGE1'), +(-1564008,'My patience has ran out! Die, DIE!',11458,1,0,0,'SAY_ENRAGE2'), +(-1564009,'Lord Illidan will... crush you.',11459,1,0,0,'SAY_DEATH'), + +(-1564010,'%s acquires a new target!',0,3,0,0,'supremus EMOTE_NEW_TARGET'), +(-1564011,'%s punches the ground in anger!',0,3,0,0,'supremus EMOTE_PUNCH_GROUND'), +(-1564012,'The ground begins to crack open!',0,3,0,0,'supremus EMOTE_GROUND_CRACK'), + +(-1564013,'No! Not yet...',11385,1,0,0,'akama shade SAY_LOW_HEALTH'), +(-1564014,'I will not last much longer...',11386,1,0,0,'akama shade SAY_DEATH'), +(-1564015,'Come out from the shadows! I\'ve returned to lead you against our true enemy! Shed your chains and raise your weapons against your Illidari masters!',0,1,0,0,'akama shade SAY_FREE'), +(-1564016,'Hail our leader! Hail Akama!',0,1,0,0,'akama shade broken SAY_BROKEN_FREE_01'), +(-1564017,'Hail Akama!',0,1,0,0,'akama shade broken SAY_BROKEN_FREE_02'), + +(-1564018,'You play, you pay.',11501,1,0,0,'shahraz SAY_TAUNT1'), +(-1564019,'I\'m not impressed.',11502,1,0,0,'shahraz SAY_TAUNT2'), +(-1564020,'Enjoying yourselves?',11503,1,0,0,'shahraz SAY_TAUNT3'), +(-1564021,'So... business or pleasure?',11504,1,0,0,'shahraz SAY_AGGRO'), +(-1564022,'You seem a little tense.',11505,1,0,0,'shahraz SAY_SPELL1'), +(-1564023,'Don\'t be shy.',11506,1,0,0,'shahraz SAY_SPELL2'), +(-1564024,'I\'m all... yours.',11507,1,0,0,'shahraz SAY_SPELL3'), +(-1564025,'Easy come, easy go.',11508,1,0,0,'shahraz SAY_SLAY1'), +(-1564026,'So much for a happy ending.',11509,1,0,0,'shahraz SAY_SLAY2'), +(-1564027,'Stop toying with my emotions!',11510,1,0,0,'shahraz SAY_ENRAGE'), +(-1564028,'I wasn\'t... finished.',11511,1,0,0,'shahraz SAY_DEATH'), + +(-1564029,'Horde will... crush you.',11432,1,0,0,'bloodboil SOUND_AGGRO'), +(-1564030,'Time to feast!',11433,1,0,0,'bloodboil SAY_SLAY1'), +(-1564031,'More! I want more!',11434,1,0,0,'bloodboil SAY_SLAY2'), +(-1564032,'Drink your blood! Eat your flesh!',11435,1,0,0,'bloodboil SAY_SPECIAL1'), +(-1564033,'I hunger!',11436,1,0,0,'bloodboil SAY_SPECIAL2'), +(-1564034,'',11437,1,0,0,'bloodboil SAY_ENRAGE1'), +(-1564035,'I\'ll rip the meat from your bones!',11438,1,0,0,'bloodboil SAY_ENRAGE2'), +(-1564036,'Aaaahrg...',11439,1,0,0,'bloodboil SAY_DEATH'), + +(-1564037,'I was the first, you know. For me, the wheel of death has spun many times. So much time has passed. I have a lot of catching up to do...',11512,1,0,0,'teron SAY_INTRO'), +(-1564038,'Vengeance is mine!',11513,1,0,0,'teron SAY_AGGRO'), +(-1564039,'I have use for you!',11514,1,0,0,'teron SAY_SLAY1'), +(-1564040,'It gets worse...',11515,1,0,0,'teron SAY_SLAY2'), +(-1564041,'What are you afraid of?',11517,1,0,0,'teron SAY_SPELL1'), +(-1564042,'Death... really isn\'t so bad.',11516,1,0,0,'teron SAY_SPELL2'), +(-1564043,'Give in!',11518,1,0,0,'teron SAY_SPECIAL1'), +(-1564044,'I have something for you...',11519,1,0,0,'teron SAY_SPECIAL2'), +(-1564045,'YOU WILL SHOW THE PROPER RESPECT!',11520,1,0,0,'teron SAY_ENRAGE'), +(-1564046,'The wheel...spins...again....',11521,1,0,0,'teron SAY_DEATH'), + +(-1564047,'Pain and suffering are all that await you!',11415,1,0,0,'essence SUFF_SAY_FREED'), +(-1564048,'Don\'t leave me alone!',11416,1,0,0,'essence SUFF_SAY_AGGRO'), +(-1564049,'Look at what you make me do!',11417,1,0,0,'essence SUFF_SAY_SLAY1'), +(-1564050,'I didn\'t ask for this!',11418,1,0,0,'essence SUFF_SAY_SLAY2'), +(-1564051,'The pain is only beginning!',11419,1,0,0,'essence SUFF_SAY_SLAY3'), +(-1564052,'I don\'t want to go back!',11420,1,0,0,'essence SUFF_SAY_RECAP'), +(-1564053,'Now what do I do?',11421,1,0,0,'essence SUFF_SAY_AFTER'), +(-1564054,'%s becomes enraged!',0,3,0,0,'essence SUFF_EMOTE_ENRAGE'), + +(-1564055,'You can have anything you desire... for a price.',11408,1,0,0,'essence DESI_SAY_FREED'), +(-1564056,'Fulfilment is at hand!',11409,1,0,0,'essence DESI_SAY_SLAY1'), +(-1564057,'Yes... you\'ll stay with us now...',11410,1,0,0,'essence DESI_SAY_SLAY2'), +(-1564058,'Your reach exceeds your grasp.',11412,1,0,0,'essence DESI_SAY_SLAY3'), +(-1564059,'Be careful what you wish for...',11411,1,0,0,'essence DESI_SAY_SPEC'), +(-1564060,'I\'ll be waiting...',11413,1,0,0,'essence DESI_SAY_RECAP'), +(-1564061,'I won\'t be far...',11414,1,0,0,'essence DESI_SAY_AFTER'), + +(-1564062,'Beware: I live!',11399,1,0,0,'essence ANGER_SAY_FREED'), +(-1564063,'So... foolish.',11400,1,0,0,'essence ANGER_SAY_FREED2'), +(-1564064,'',11401,1,0,0,'essence ANGER_SAY_SLAY1'), +(-1564065,'Enough. No more.',11402,1,0,0,'essence ANGER_SAY_SLAY2'), +(-1564066,'On your knees!',11403,1,0,0,'essence ANGER_SAY_SPEC'), +(-1564067,'Beware, coward.',11405,1,0,0,'essence ANGER_SAY_BEFORE'), +(-1564068,'I won\'t... be... ignored.',11404,1,0,0,'essence ANGER_SAY_DEATH'), + +(-1564069,'You wish to test me?',11524,1,0,0,'council vera AGGRO'), +(-1564070,'I have better things to do...',11422,1,0,0,'council gath AGGRO'), +(-1564071,'Flee or die!',11482,1,0,0,'council mala AGGRO'), +(-1564072,'Common... such a crude language. Bandal!',11440,1,0,0,'council zere AGGRO'), + +(-1564073,'Enough games!',11428,1,0,0,'council gath ENRAGE'), +(-1564074,'You wish to kill me? Hahaha, you first!',11530,1,0,0,'council vera ENRAGE'), +(-1564075,'For Quel\'Thalas! For the Sunwell!',11488,1,0,0,'council mala ENRAGE'), +(-1564076,'Sha\'amoor sine menoor!',11446,1,0,0,'council zere ENRAGE'), + +(-1564077,'Enjoy your final moments!',11426,1,0,0,'council gath SPECIAL1'), +(-1564078,'You\'re not caught up for this!',11528,1,0,0,'council vera SPECIAL1'), +(-1564079,'No second chances!',11486,1,0,0,'council mala SPECIAL1'), +(-1564080,'Diel fin\'al',11444,1,0,0,'council zere SPECIAL1'), + +(-1564081,'You are mine!',11427,1,0,0,'council gath SPECIAL2'), +(-1564082,'Anar\'alah belore!',11529,1,0,0,'council vera SPECIAL2'), +(-1564083,'I\'m full of surprises!',11487,1,0,0,'council mala SPECIAL2'), +(-1564084,'Sha\'amoor ara mashal?',11445,1,0,0,'council zere SPECIAL2'), + +(-1564085,'Selama am\'oronor!',11423,1,0,0,'council gath SLAY'), +(-1564086,'Valiant effort!',11525,1,0,0,'council vera SLAY'), +(-1564087,'My work is done.',11483,1,0,0,'council mala SLAY'), +(-1564088,'Shorel\'aran.',11441,1,0,0,'council zere SLAY'), + +(-1564089,'Well done!',11424,1,0,0,'council gath SLAY_COMT'), +(-1564090,'A glorious kill!',11526,1,0,0,'council vera SLAY_COMT'), +(-1564091,'As it should be!',11484,1,0,0,'council mala SLAY_COMT'), +(-1564092,'Belesa menoor!',11442,1,0,0,'council zere SLAY_COMT'), + +(-1564093,'Lord Illidan... I...',11425,1,0,0,'council gath DEATH'), +(-1564094,'You got lucky!',11527,1,0,0,'council vera DEATH'), +(-1564095,'Destiny... awaits.',11485,1,0,0,'council mala DEATH'), +(-1564096,'Diel ma\'ahn... oreindel\'o',11443,1,0,0,'council zere DEATH'), + +(-1564097,'Akama... your duplicity is hardly surprising. I should have slaughtered you and your malformed brethren long ago.',11463,1,0,0,'illidan SAY_CONVO_1'), +(-1564098,'We\'ve come to end your reign, Illidan. My people and all of Outland shall be free!',11389,1,0,25,'illidan SAY_CONVO_2'), +(-1564099,'Boldly said. But I remain unconvinced.',11464,1,0,396,'illidan SAY_CONVO_3'), +(-1564100,'The time has come! The moment is at hand!',11380,1,0,22,'illidan SAY_CONVO_4'), +(-1564101,'You are not prepared!',11466,1,0,406,'illidan SAY_CONVO_5'), +(-1564102,'Is this it, mortals? Is this all the fury you can muster?',11476,1,0,0,'illidan SAY_CONVO_6'), +(-1564103,'Their fury pales before mine, Illidan. We have some unsettled business between us.',11491,1,0,5,'illidan SAY_CONVO_7'), +(-1564104,'Maiev... How is this even possible?',11477,1,0,1,'illidan SAY_CONVO_8'), +(-1564105,'Ah... my long hunt is finally over. Today, Justice will be done!',11492,1,0,15,'illidan SAY_CONVO_9'), +(-1564106,'Feel the hatred of ten thousand years!',11470,1,0,0,'illidan SAY_CONVO_10'), +(-1564107,'Ahh... It is finished. You are beaten.',11496,1,0,0,'illidan SAY_CONVO_11'), +(-1564108,'You have won... Maiev...but the huntress... is nothing...without the hunt... you... are nothing... without me..',11478,1,0,65,'illidan SAY_CONVO_12'), +(-1564109,'He is right. I feel nothing... I am nothing...',11497,1,0,0,'illidan SAY_CONVO_13'), +(-1564110,'Farewell, champions.',11498,1,0,0,'illidan SAY_CONVO_14'), +(-1564111,'The Light will fill these dismal halls once again. I swear it.',11387,1,0,0,'illidan SAY_CONVO_15'), +(-1564112,'I can feel your hatred.',11467,1,0,0,'illidan SAY_TAUNT_1'), +(-1564113,'Give in to your fear!',11468,1,0,0,'illidan SAY_TAUNT_2'), +(-1564114,'You know nothing of power!',11469,1,0,0,'illidan SAY_TAUNT_3'), +(-1564115,'Such... arrogance!',11471,1,0,0,'illidan SAY_TAUNT_4'), +(-1564116,'That is for Naisha!',11493,1,0,0,'illidan SAY_MAIEV_TAUNT_1'), +(-1564117,'Bleed as I have bled!',11494,1,0,0,'illidan SAY_MAIEV_TAUNT_2'), +(-1564118,'There shall be no prison for you this time!',11495,1,0,0,'illidan SAY_MAIEV_TAUNT_3'), +(-1564119,'Meet your end, demon!',11500,1,0,0,'illidan SAY_MAIEV_TAUNT_4'), +(-1564120,'Be wary friends, The Betrayer meditates in the court just beyond.',11388,1,0,0,'illidan SAY_AKAMA_BEWARE'), +(-1564121,'Come, my minions. Deal with this traitor as he deserves!',11465,1,0,0,'illidan SAY_AKAMA_MINION'), +(-1564122,'I\'ll deal with these mongrels. Strike now, friends! Strike at the betrayer!',11390,1,0,0,'illidan SAY_AKAMA_LEAVE'), +(-1564123,'Who shall be next to taste my blades?!',11473,1,0,0,'illidan SAY_KILL1'), +(-1564124,'This is too easy!',11472,1,0,0,'illidan SAY_KILL2'), +(-1564125,'I will not be touched by rabble such as you!',11479,1,0,254,'illidan SAY_TAKEOFF'), +(-1564126,'Behold the flames of Azzinoth!',11480,1,0,0,'illidan SAY_SUMMONFLAMES'), +(-1564127,'Stare into the eyes of the Betrayer!',11481,1,0,0,'illidan SAY_EYE_BLAST'), +(-1564128,'Behold the power... of the demon within!',11475,1,0,0,'illidan SAY_MORPH'), +(-1564129,'You\'ve wasted too much time mortals, now you shall fall!',11474,1,0,0,'illidan SAY_ENRAGE'); + +-- -1 565 000 GRUUL'S LAIR +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1565000,'Gronn are the real power in outland.',11367,1,0,0,'maulgar SAY_AGGRO'), +(-1565001,'You will not defeat the hand of Gruul!',11368,1,0,0,'maulgar SAY_ENRAGE'), +(-1565002,'You won\'t kill next one so easy!',11369,1,0,0,'maulgar SAY_OGRE_DEATH1'), +(-1565003,'Pah! Does not prove anything!',11370,1,0,0,'maulgar SAY_OGRE_DEATH2'), +(-1565004,'I\'m not afraid of you.',11371,1,0,0,'maulgar SAY_OGRE_DEATH3'), +(-1565005,'Good, now you fight me!',11372,1,0,0,'maulgar SAY_OGRE_DEATH4'), +(-1565006,'You not so tough afterall!',11373,1,0,0,'maulgar SAY_SLAY1'), +(-1565007,'Aha-ha ha ha!',11374,1,0,0,'maulgar SAY_SLAY2'), +(-1565008,'Mulgar is king!',11375,1,0,0,'maulgar SAY_SLAY3'), +(-1565009,'Gruul... will crush you...',11376,1,0,0,'maulgar SAY_DEATH'), + +(-1565010,'Come... and die.',11355,1,0,0,'gruul SAY_AGGRO'), +(-1565011,'Scurry',11356,1,0,0,'gruul SAY_SLAM1'), +(-1565012,'No escape',11357,1,0,0,'gruul SAY_SLAM2'), +(-1565013,'Stay',11358,1,0,0,'gruul SAY_SHATTER1'), +(-1565014,'Beg... for life',11359,1,0,0,'gruul SAY_SHATTER2'), +(-1565015,'No more',11360,1,0,0,'gruul SAY_SLAY1'), +(-1565016,'Unworthy',11361,1,0,0,'gruul SAY_SLAY2'), +(-1565017,'Die',11362,1,0,0,'gruul SAY_SLAY3'), +(-1565018,'Aaargh...',11363,1,0,0,'gruul SAY_DEATH'), +(-1565019,'%s grows in size!',0,2,0,0,'gruul EMOTE_GROW'); + +-- -1 568 000 ZUL'AMAN +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1568000,'Spirits of da wind be your doom!',12031,1,0,0,'janalai SAY_AGGRO'), +(-1568001,'I burn ya now!',12032,1,0,0,'janalai SAY_FIRE_BOMBS'), +(-1568002,'Where ma hatcha? Get to work on dem eggs!',12033,1,0,0,'janalai SAY_SUMMON_HATCHER'), +(-1568003,'I show you strength... in numbers.',12034,1,0,0,'janalai SAY_ALL_EGGS'), +(-1568004,'You done run outta time!',12035,1,0,0,'janalai SAY_BERSERK'), +(-1568005,'It all be over now, mon!',12036,1,0,0,'janalai SAY_SLAY_1'), +(-1568006,'Tazaga-choo!',12037,1,0,0,'janalai SAY_SLAY_2'), +(-1568007,'Zul\'jin... got a surprise for you...',12038,1,0,0,'janalai SAY_DEATH'), +(-1568008,'Come, strangers. The spirit of the dragonhawk hot be hungry for worthy souls.',12039,1,0,0,'janalai SAY_EVENT_STRANGERS'), +(-1568009,'Come, friends. Your bodies gonna feed ma hatchlings, and your souls are going to feed me with power!',12040,1,0,0,'janalai SAY_EVENT_FRIENDS'), + +(-1568010,'Get da move on, guards! It be killin\' time!',12066,1,0,0,'nalorakk SAY_WAVE1_AGGRO'), +(-1568011,'Guards, go already! Who you more afraid of, dem... or me?',12067,1,0,0,'nalorakk SAY_WAVE2_STAIR1'), +(-1568012,'Ride now! Ride out dere and bring me back some heads!',12068,1,0,0,'nalorakk SAY_WAVE3_STAIR2'), +(-1568013,'I be losin\' me patience! Go on: make dem wish dey was never born!',12069,1,0,0,'nalorakk SAY_WAVE4_PLATFORM'), +(-1568014,'What could be better than servin\' da bear spirit for eternity? Come closer now. Bring your souls to me!',12078,1,0,0,'nalorakk SAY_EVENT1_SACRIFICE'), +(-1568015,'Don\'t be delayin\' your fate. Come to me now. I make your sacrifice quick.',12079,1,0,0,'nalorakk SAY_EVENT2_SACRIFICE'), +(-1568016,'You be dead soon enough!',12070,1,0,0,'nalorakk SAY_AGGRO'), +(-1568017,'I bring da pain!',12071,1,0,0,'nalorakk SAY_SURGE'), +(-1568018,'You call on da beast, you gonna get more dan you bargain for!',12072,1,0,0,'nalorakk SAY_TOBEAR'), +(-1568019,'Make way for Nalorakk!',12073,1,0,0,'nalorakk SAY_TOTROLL'), +(-1568020,'You had your chance, now it be too late!',12074,1,0,0,'nalorakk SAY_BERSERK'), +(-1568021,'Mua-ha-ha! Now whatchoo got to say?',12075,1,0,0,'nalorakk SAY_SLAY1'), +(-1568022,'Da Amani gonna rule again!',12076,1,0,0,'nalorakk SAY_SLAY2'), +(-1568023,'I... be waitin\' on da udda side....',12077,1,0,0,'nalorakk SAY_DEATH'), + +(-1568024,'Da eagles gonna bear your spirits to me. Your sacrifice is not gonna be in vein!',12122,1,0,0,'akilzon SAY_EVENT1'), +(-1568025,'Your death gonna be quick, strangers. You shoulda never have come to this place...',12123,1,0,0,'akilzon SAY_EVENT2'), +(-1568026,'I be da predator! You da prey...',12013,1,0,0,'akilzon SAY_AGGRO'), +(-1568027,'Feed, me bruddahs!',12014,1,0,0,'akilzon SAY_SUMMON'), +(-1568028,'Come, and join me bruddahs!',12015,1,0,0,'akilzon SAY_SUMMON_ALT'), +(-1568029,'All you be doing is wasting my time!',12016,1,0,0,'akilzon SAY_ENRAGE'), +(-1568030,'Ya got nothin\'!',12017,1,0,0,'akilzon SAY_SLAY1'), +(-1568031,'Stop your cryin\'!',12018,1,0,0,'akilzon SAY_SLAY2'), +(-1568032,'You can\'t... kill... me spirit!',12019,1,0,0,'akilzon SAY_DEATH'), +(-1568033,'An Electrical Storm Appears!',0,2,0,0,'akilzon EMOTE_STORM'), + +(-1568034,'Get on ya knees and bow.... to da fang and claw!',12020,1,0,0,'halazzi SAY_AGGRO'), +(-1568035,'I fight wit\' untamed spirit....',12021,1,0,0,'halazzi SAY_SPLIT'), +(-1568036,'Spirit, come back to me!',12022,1,0,0,'halazzi SAY_MERGE'), +(-1568037,'Me gonna carve ya now!',12023,1,0,0,'halazzi SAY_SABERLASH1'), +(-1568038,'You gonna leave in pieces!',12024,1,0,0,'halazzi SAY_SABERLASH2'), +(-1568039,'Whatch you be doing? Pissin\' yourselves...',12025,1,0,0,'halazzi SAY_BERSERK'), +(-1568040,'You cant fight the power!',12026,1,0,0,'halazzi SAY_KILL1'), +(-1568041,'You gonna fail!',12027,1,0,0,'halazzi SAY_KILL2'), +(-1568042,'Chaga... choka\'jinn.',12028,1,0,0,'halazzi SAY_DEATH'), +(-1568043,'Come, fools. Fill ma empty cages...',12029,1,0,0,'halazzi SAY_EVENT1'), +(-1568044,'I be waitin, strangers. Your deaths gonna make me stronger!',12030,1,0,0,'halazzi SAY_EVENT2'), + +(-1568045,'Da shadow gonna fall on you...',12041,1,0,0,'malacrass SAY_AGGRO'), +(-1568046,'Ya don\'t kill me yet, ya don\'t get another chance!',12042,1,0,0,'malacrass SAY_ENRAGE'), +(-1568047,'Dis a nightmare ya don\' wake up from!',12043,1,0,0,'malacrass SAY_KILL1'), +(-1568048,'Azzaga choogo zinn!',12044,1,0,0,'malacrass SAY_KILL2'), +(-1568049,'Your will belong ta me now!',12045,1,0,0,'malacrass SAY_SOUL_SIPHON'), +(-1568050,'Darkness comin\' for you...',12046,1,0,0,'malacrass SAY_DRAIN_POWER'), +(-1568051,'Your soul gonna bleed!',12047,1,0,0,'malacrass SAY_SPIRIT_BOLTS'), +(-1568052,'It not gonna make no difference.',12048,1,0,0,'malacrass SAY_ADD_DIED1'), +(-1568053,'You gonna die worse dan him.',12049,1,0,0,'malacrass SAY_ADD_DIED2'), +(-1568054,'Dat no bodda me.',12050,1,0,0,'malacrass SAY_ADD_DIED3'), +(-1568055,'Dis not... da end of me...',12051,1,0,0,'malacrass SAY_DEATH'), + +(-1568056,'Everybody always wanna take from us. Now we gonna start takin\' back. Anybody who get in our way...gonna drown in dey own blood! Da Amani empire be back now...seekin\' vengeance. And we gonna start wit\' you.',12090,1,0,0,'zuljin SAY_INTRO'), +(-1568057,'Nobody badduh dan me!',12091,1,0,0,'zuljin SAY_AGGRO'), +(-1568058,'Got me some new tricks... like me brudda bear....',12092,1,0,0,'zuljin SAY_BEAR_TRANSFORM'), +(-1568059,'Dere be no hidin\' from da eagle!',12093,1,0,0,'zuljin SAY_EAGLE_TRANSFORM'), +(-1568060,'Let me introduce you to me new bruddas: fang and claw!',12094,1,0,0,'zuljin SAY_LYNX_TRANSFORM'), +(-1568061,'Ya don\' have to look to da sky to see da dragonhawk!',12095,1,0,0,'zuljin SAY_DRAGONHAWK_TRANSFORM'), +(-1568062,'Fire kill you just as quick!',12096,1,0,0,'zuljin SAY_FIRE_BREATH'), +(-1568063,'You too slow! Me too strong!',12097,1,0,0,'zuljin SAY_BERSERK'), +(-1568064,'Da Amani de chuka!',12098,1,0,0,'zuljin SAY_KILL1'), +(-1568065,'Lot more gonna fall like you!',12099,1,0,0,'zuljin SAY_KILL2'), +(-1568066,'Mebbe me fall...but da Amani empire...never gonna die...',12100,1,0,0,'zuljin SAY_DEATH'), + +(-1568067,'Zul\'jin got a surprise for ya...',12052,1,0,0,'zulaman SAY_INST_RELEASE'), +(-1568068,'Da spirits gonna feast today! Begin da ceremonies, sacrifice da prisoners... make room for our new guests!',12053,1,0,0,'zulaman SAY_INST_BEGIN'), +(-1568069,'Take your pick, trespassers! Any of ma priests be happy to accommodate ya.',12054,1,0,0,'zulaman SAY_INST_PROGRESS_1'), +(-1568070,'Don\'t be shy. Thousands have come before you. Ya not be alone in your service.',12055,1,0,0,'zulaman SAY_INST_PROGRESS_2'), +(-1568071,'Ya gonna fail, strangers. Many try before you, but dey only make us stronger!',12056,1,0,0,'zulaman SAY_INST_PROGRESS_3'), +(-1568072,'Your efforts was in vain, trespassers. The rituals nearly be complete.',12057,1,0,0,'zulaman SAY_INST_WARN_1'), +(-1568073,'Soon da cages gonna be empty, da sacrifices be complete, and you gonna take dere places.',12058,1,0,0,'zulaman SAY_INST_WARN_2'), +(-1568074,'Time be running low, strangers. Soon you gonna join da souls of dem ya failed to save.',12059,1,0,0,'zulaman SAY_INST_WARN_3'), +(-1568075,'Make haste, ma priests! Da rituals must not be interrupted!',12060,1,0,0,'zulaman SAY_INST_WARN_4'), +(-1568076,'Ya make a good try... but now you gonna join da ones who already fall.',12061,1,0,0,'zulaman SAY_INST_SACRIF1'), +(-1568077,'Ya not do too bad. Ya efforts [...] for a small time. Come to me now. Ya prove yourself worthy offerings.',12062,1,0,0,'zulaman SAY_INST_SACRIF2'), +(-1568078,'Watch now. Every offering gonna strengthen our ties to da spirit world. Soon, we gonna be unstoppable!',12065,1,0,0,'zulaman SAY_INST_COMPLETE'), + +(-1568079,'Suit yourself. At least five of you must assist me if we\'re to get inside. Follow me.',0,1,0,0,'harrison SAY_START'), +(-1568080,'According to my calculations, if enough of us bang the gong at once the seal on these doors will break and we can enter.',0,1,0,0,'harrison SAY_AT_GONG'), +(-1568081,'I\'ve researched this site extensively and i won\'t allow any dim-witted treasure hunters to swoop in and steal what belongs to in a museum. I\'ll lead this charge.',0,1,0,0,'harrison SAY_OPEN_ENTRANCE'); + +-- -1 574 000 UTGARDE KEEP +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1574000,'Your blood is mine!',13221,1,0,0,'keleseth SAY_AGGRO'), +(-1574001,'Not so fast.',13222,1,0,0,'keleseth SAY_FROSTTOMB'), +(-1574002,'Aranal, lidel! Their fate shall be yours!',13224,1,0,0,'keleseth SAY_SKELETONS'), +(-1574003,'Darkness waits!',13223,1,0,0,'keleseth SAY_KILL'), +(-1574004,'I join... the night.',13225,1,0,0,'keleseth SAY_DEATH'), + +(-1574005,'I\'ll paint my face with your blood!',13207,1,0,0,'ingvar SAY_AGGRO_FIRST'), +(-1574006,'I return! A second chance to carve out your skull!',13209,1,0,0,'ingvar SAY_AGGRO_SECOND'), +(-1574007,'My life for the... death god!',13213,1,0,0,'ingvar SAY_DEATH_FIRST'), +(-1574008,'No! I can do... better! I can...',13211,1,0,0,'ingvar SAY_DEATH_SECOND'), +(-1574009,'Mjul orm agn gjor!',13212,1,0,0,'ingvar SAY_KILL_FIRST'), +(-1574010,'I am a warrior born!',13214,1,0,0,'ingvar SAY_KILL_SECOND'), + +(-1574011,'Dalronn! See if you can muster the nerve to join my attack!',13229,1,0,0,'skarvald SAY_SKA_AGGRO'), +(-1574012,'Not... over... yet.',13230,1,0,0,'skarvald SAY_SKA_DEATH'), +(-1574013,'A warrior\'s death.',13231,1,0,0,'skarvald SAY_SKA_DEATH_REAL'), +(-1574014,'???',13232,1,0,0,'skarvald SAY_SKA_KILL'), +(-1574015,'Pagh! What sort of necromancer lets death stop him? I knew you were worthless!',13233,1,0,0,'skarvald SAY_SKA_DAL_DIES_REPLY'), + +(-1574016,'By all means, don\'t assess the situation, you halfwit! Just jump into the fray!',13199,1,0,0,'dalronn SAY_DAL_AGGRO_REPLY'), +(-1574017,'See... you... soon.',13200,1,0,0,'dalronn SAY_DAL_DEATH'), +(-1574018,'There\'s no... greater... glory.',13201,1,0,0,'dalronn SAY_DAL_DEATH_REAL'), +(-1574019,'You may serve me yet.',13202,1,0,0,'dalronn SAY_DAL_KILL'), +(-1574020,'Skarvald, you incompetent slug! Return and make yourself useful!',13203,1,0,0,'dalronn SAY_DAL_SKA_DIES_REPLY'), + +(-1574021,'%s casts Frost Tomb on $N',0,3,0,0,'keleseth EMOTE_FROST_TOMB'), + +(-1574022,'%s roars!',0,3,0,0,'ingvar EMOTE_ROAR'); + +-- -1 575 000 UTGARDE PINNACLE +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1575000,'My liege! I have done as you asked, and now beseech you for your blessing!',13856,1,0,0,'svala SAY_INTRO_1'), +(-1575001,'Your sacrifice is a testament to your obedience. Indeed you are worthy of this charge. Arise, and forever be known as Svala Sorrowgrave!',14732,1,0,0,'svala SAY_INTRO_2_ARTHAS'), +(-1575002,'The sensation is... beyond my imagining. I am yours to command, my king.',13857,1,0,0,'svala SAY_INTRO_3'), +(-1575003,'Your first test awaits you. Destroy our uninvited guests.',14733,1,0,0,'svala SAY_INTRO_4_ARTHAS'), +(-1575004,'I will be happy to slaughter them in your name! Come, enemies of the Scourge! I will show you the might of the Lich King!',13858,1,0,0,'svala SAY_INTRO_5'), +(-1575005,'I will vanquish your soul!',13842,1,0,0,'svala SAY_AGGRO'), +(-1575006,'You were a fool to challenge the power of the Lich King!',13845,1,0,0,'svala SAY_SLAY_1'), +(-1575007,'Your will is done, my king.',13847,1,0,0,'svala SAY_SLAY_2'), +(-1575008,'Another soul for my master.',13848,1,0,0,'svala SAY_SLAY_3'), +(-1575009,'Your death approaches.',13850,1,0,0,'svala SAY_SACRIFICE_1'), +(-1575010,'Go now to my master.',13851,1,0,0,'svala SAY_SACRIFICE_2'), +(-1575011,'Your end is inevitable.',13852,1,0,0,'svala SAY_SACRIFICE_3'), +(-1575012,'Yor-guul mak!',13853,1,0,0,'svala SAY_SACRIFICE_4'), +(-1575013,'Any last words?',13854,1,0,0,'svala SAY_SACRIFICE_5'), +(-1575014,'Nooo! I did not come this far... to...',13855,1,0,0,'svala SAY_DEATH'), + +(-1575015,'What this place? I will destroy you!',13464,1,0,0,'gortok SAY_AGGRO'), +(-1575016,'You die! That what master wants!',13465,1,0,0,'gortok SAY_SLAY_1'), +(-1575017,'An easy task!',13466,1,0,0,'gortok SAY_SLAY_2'), +(-1575018,' ',13467,1,0,0,'gortok SAY_DEATH'), + +(-1575019,'What mongrels dare intrude here? Look alive, my brothers! A feast for the one that brings me their heads!',13497,1,0,0,'skadi SAY_AGGRO'), +(-1575020,'Sear them to the bone!',13498,1,0,0,'skadi SAY_DRAKEBREATH_1'), +(-1575021,'Go now! Leave nothing but ash in your wake!',13499,1,0,0,'skadi SAY_DRAKEBREATH_2'), +(-1575022,'Cleanse our sacred halls with flame!',13500,1,0,0,'skadi SAY_DRAKEBREATH_3'), +(-1575023,'I ask for ... to kill them, yet all I get is feeble whelps! By Ye.. SLAUGHTER THEM!',13501,1,0,0,'skadi SAY_DRAKE_HARPOON_1'), +(-1575024,'If one more harpoon touches my drake I\'ll flae my miserable heins.',13502,1,0,0,'skadi SAY_DRAKE_HARPOON_2'), +(-1575025,'Mjor Na Ul Kaval!',13503,1,0,0,'skadi SAY_KILL_1'), +(-1575026,'Not so brash now, are you?',13504,1,0,0,'skadi SAY_KILL_2'), +(-1575027,'I\'ll mount your skull from the highest tower!',13505,1,0,0,'skadi SAY_KILL_3'), +(-1575028,'ARGH! You call that... an attack? I\'ll... show... aghhhh...',13506,1,0,0,'skadi SAY_DEATH'), +(-1575029,'You motherless knaves! Your corpses will make fine morsels for my new drake!',13507,1,0,0,'skadi SAY_DRAKE_DEATH'), +(-1575030,'%s is within range of the harpoon launchers!',0,3,0,0,'skadi EMOTE_HARPOON_RANGE'), + +(-1575031,'You invade my home and then dare to challenge me? I will tear the hearts from your chests and offer them as gifts to the death god! Rualg nja gaborr!',13609,1,0,0,'ymiron SAY_AGGRO'), +(-1575032,'Bjorn of the Black Storm! Honor me now with your presence!',13610,1,0,0,'ymiron SAY_SUMMON_BJORN'), +(-1575033,'Haldor of the rocky cliffs, grant me your strength!',13611,1,0,0,'ymiron SAY_SUMMON_HALDOR'), +(-1575034,'Ranulf of the screaming abyss, snuff these maggots with darkest night!',13612,1,0,0,'ymiron SAY_SUMMON_RANULF'), +(-1575035,'Tor of the Brutal Siege! Bestow your might upon me!',13613,1,0,0,'ymiron SAY_SUMMON_TORGYN'), +(-1575036,'Your death is only the beginning!',13614,1,0,0,'ymiron SAY_SLAY_1'), +(-1575037,'You have failed your people!',13615,1,0,0,'ymiron SAY_SLAY_2'), +(-1575038,'There is a reason I am king!',13616,1,0,0,'ymiron SAY_SLAY_3'), +(-1575039,'Bleed no more!',13617,1,0,0,'ymiron SAY_SLAY_4'), +(-1575040,'What... awaits me... now?',13618,1,0,0,'ymiron SAY_DEATH'); + +-- -1 576 000 NEXUS +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1576000,'You know what they say about curiosity.',13319,1,0,0,'telestra SAY_AGGRO'), +(-1576001,'I\'ll give you more than you can handle.',13321,1,0,0,'telestra SAY_SPLIT_1'), +(-1576002,'There\'s plenty of me to go around.',13322,1,0,0,'telestra SAY_SPLIT_2'), +(-1576003,'Now to finish the job!',13323,1,0,0,'telestra SAY_MERGE'), +(-1576004,'Death becomes you!',13324,1,0,0,'telestra SAY_KILL'), +(-1576005,'Damn the... luck.',13320,1,0,0,'telestra SAY_DEATH'), + +(-1576006,'Chaos beckons.',13186,1,0,0,'anomalus SAY_AGGRO'), +(-1576007,'Reality... unwoven.',13188,1,0,0,'anomalus SAY_RIFT'), +(-1576008,'Indestructible.',13189,1,0,0,'anomalus SAY_SHIELD'), +(-1576009,'Expiration... is necesarry.',13274,1,0,0,'anomalus SAY_KILL'), +(-1576010,'Of course.',13187,1,0,0,'anomalus SAY_DEATH'), + +(-1576011,'Noo!',13328,1,0,0,'ormorok SAY_AGGRO'), +(-1576012,'???',13329,1,0,0,'ormorok SAY_KILL'), +(-1576013,'Baaack!',13331,1,0,0,'ormorok SAY_REFLECT'), +(-1576014,'Bleeeed!',13332,1,0,0,'ormorok SAY_ICESPIKE'), +(-1576015,'Aaggh!',13330,1,0,0,'ormorok SAY_DEATH'), + +(-1576016,'Preserve? Why? There\'s no truth in it. No no no... only in the taking! I see that now!',13450,1,0,0,'keristrasza SAY_AGGRO'), +(-1576017,'Stay. Enjoy your final moments.',13451,1,0,0,'keristrasza SAY_CRYSTAL_NOVA'), +(-1576018,'Finish it! Finish it! Kill me, or I swear by the Dragonqueen you\'ll never see daylight again!',13452,1,0,0,'keristrasza SAY_ENRAGE'), +(-1576019,'Now we\'ve come to the truth!',13453,1,0,0,'keristrasza SAY_KILL'), +(-1576020,'Dragonqueen... Life-Binder... preserve... me.',13454,1,0,0,'keristrasza SAY_DEATH'), + +(-1576021,'%s opens a Chaotic Rift!',0,3,0,0,'anomalus EMOTE_OPEN_RIFT'), +(-1576022,'%s shields himself and divert his power to the rifts!',0,3,0,0,'anomalus EMOTE_SHIELD'); + +-- -1 578 000 OCULUS + +-- -1 580 000 SUNWELL PLATEAU +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1580000,'Aggh! No longer will I be a slave to Malygos! Challenge me and you will be destroyed!',12422,1,0,0,'kalecgos SAY_EVIL_AGGRO'), +(-1580001,'I will purge you!',12423,1,0,0,'kalecgos SAY_EVIL_SPELL1'), +(-1580002,'Your pain has only begun!',12424,1,0,0,'kalecgos SAY_EVIL_SPELL2'), +(-1580003,'In the name of Kil\'jaeden!',12425,1,0,0,'kalecgos SAY_EVIL_SLAY1'), +(-1580004,'You were warned!',12426,1,0,0,'kalecgos SAY_EVIL_SLAY2'), +(-1580005,'My awakening is complete! You shall all perish!',12427,1,0,0,'kalecgos SAY_EVIL_ENRAGE'), +(-1580006,'I need... your help... Cannot... resist him... much longer...',12428,1,0,0,'kalecgos humanoid SAY_GOOD_AGGRO'), +(-1580007,'Aaahhh! Help me, before I lose my mind!',12429,1,0,0,'kalecgos humanoid SAY_GOOD_NEAR_DEATH'), +(-1580008,'Hurry! There is not much of me left!',12430,1,0,0,'kalecgos humanoid SAY_GOOD_NEAR_DEATH2'), +(-1580009,'I am forever in your debt. Once we have triumphed over Kil\'jaeden, this entire world will be in your debt as well.',12431,1,0,0,'kalecgos humanoid SAY_GOOD_PLRWIN'), +(-1580010,'There will be no reprieve. My work here is nearly finished.',12451,1,0,0,'sathrovarr SAY_SATH_AGGRO'), +(-1580011,'I\'m... never on... the losing... side...',12452,1,0,0,'sathrovarr SAY_SATH_DEATH'), +(-1580012,'Your misery is my delight!',12453,1,0,0,'sathrovarr SAY_SATH_SPELL1'), +(-1580013,'I will watch you bleed!',12454,1,0,0,'sathrovarr SAY_SATH_SPELL2'), +(-1580014,'Pitious mortal!',12455,1,0,0,'sathrovarr SAY_SATH_SLAY1'), +(-1580015,'Haven\'t you heard? I always win!',12456,1,0,0,'sathrovarr SAY_SATH_SLAY2'), +(-1580016,'I have toyed with you long enough!',12457,1,0,0,'sathrovarr SAY_SATH_ENRAGE'), + +(-1580017,'Puny lizard! Death is the only answer you\'ll find here!',12458,1,0,0,'brutallus YELL_INTRO'), +(-1580018,'Grah! Your magic is weak!',12459,1,0,0,'brutallus YELL_INTRO_BREAK_ICE'), +(-1580019,'I will crush you!',12460,1,0,0,'brutallus YELL_INTRO_CHARGE'), +(-1580020,'That was fun.',12461,1,0,0,'brutallus YELL_INTRO_KILL_MADRIGOSA'), +(-1580021,'Come, try your luck!',12462,1,0,0,'brutallus YELL_INTRO_TAUNT'), +(-1580022,'Ahh! More lambs to the slaughter!',12463,1,0,0,'brutallus YELL_AGGRO'), +(-1580023,'Perish, insect!',12464,1,0,0,'brutallus YELL_KILL1'), +(-1580024,'You are meat!',12465,1,0,0,'brutallus YELL_KILL2'), +(-1580025,'Too easy!',12466,1,0,0,'brutallus YELL_KILL3'), +(-1580026,'Bring the fight to me!',12467,1,0,0,'brutallus YELL_LOVE1'), +(-1580027,'Another day, another glorious battle!',12468,1,0,0,'brutallus YELL_LOVE2'), +(-1580028,'I live for this!',12469,1,0,0,'brutallus YELL_LOVE3'), +(-1580029,'So much for a real challenge... Die!',12470,1,0,0,'brutallus YELL_BERSERK'), +(-1580030,'Gah! Well done... Now... this gets... interesting...',12471,1,0,0,'brutallus YELL_DEATH'), + +(-1580031,'Hold, friends! There is information to be had before this devil meets his fate!',12472,1,0,0,'madrigosa YELL_MADR_ICE_BARRIER'), +(-1580032,'Where is Anveena, demon? What has become of Kalec?',12473,1,0,0,'madrigosa YELL_MADR_INTRO'), +(-1580033,'You will tell me where they are!',12474,1,0,0,'madrigosa YELL_MADR_ICE_BLOCK'), +(-1580034,'Speak, I grow weary of asking!',12475,1,0,0,'madrigosa YELL_MADR_TRAP'), +(-1580035,'Malygos, my lord! I did my best!',12476,1,0,0,'madrigosa YELL_MADR_DEATH'); + +-- -1 585 000 MAGISTER'S TERRACE +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1585000,'You only waste my time!',12378,1,0,0,'selin SAY_AGGRO'), +(-1585001,'My hunger knows no bounds!',12381,1,0,0,'selin SAY_ENERGY'), +(-1585002,'Yes! I am a god!',12382,1,0,0,'selin SAY_EMPOWERED'), +(-1585003,'Enough distractions!',12388,1,0,0,'selin SAY_KILL_1'), +(-1585004,'I am invincible!',12385,1,0,0,'selin SAY_KILL_2'), +(-1585005,'No! More... I must have more!',12383,1,0,0,'selin SAY_DEATH'), +(-1585006,'%s begins to channel from the nearby Fel Crystal...',0,3,0,0,'selin EMOTE_CRYSTAL'), + +(-1585007,'Drain...life!',12389,1,0,0,'vexallus SAY_AGGRO'), +(-1585008,'Un...con...tainable.',12392,1,0,0,'vexallus SAY_ENERGY'), +(-1585009,'Un...leash...',12390,1,0,0,'vexallus SAY_OVERLOAD'), +(-1585010,'Con...sume.',12393,1,0,0,'vexallus SAY_KILL'), +(-1585011,'%s discharges pure energy!',0,3,0,0,'vexallus EMOTE_DISCHARGE_ENERGY'), + +(-1585012,'Annihilate them!',12395,1,0,0,'delrissa SAY_AGGRO'), +(-1585013,'Oh, the horror.',12398,1,0,0,'delrissa LackeyDeath1'), +(-1585014,'Well, aren\'t you lucky?',12400,1,0,0,'delrissa LackeyDeath2'), +(-1585015,'Now I\'m getting annoyed.',12401,1,0,0,'delrissa LackeyDeath3'), +(-1585016,'Lackies be damned! I\'ll finish you myself!',12403,1,0,0,'delrissa LackeyDeath4'), +(-1585017,'I call that a good start.',12405,1,0,0,'delrissa PlayerDeath1'), +(-1585018,'I could have sworn there were more of you.',12407,1,0,0,'delrissa PlayerDeath2'), +(-1585019,'Not really much of a group, anymore, is it?',12409,1,0,0,'delrissa PlayerDeath3'), +(-1585020,'One is such a lonely number.',12410,1,0,0,'delrissa PlayerDeath4'), +(-1585021,'It\'s been a kick, really.',12411,1,0,0,'delrissa PlayerDeath5'), +(-1585022,'Not what I had... planned...',12397,1,0,0,'delrissa SAY_DEATH'), + +(-1585023,'Don\'t look so smug! I know what you\'re thinking, but Tempest Keep was merely a set back. Did you honestly believe I would trust the future to some blind, half-night elf mongrel? Oh no, he was merely an instrument, a stepping stone to a much larger plan! It has all led to this, and this time, you will not interfere!',12413,1,0,0,'kaelthas MT SAY_AGGRO'), +(-1585024,'Vengeance burns!',12415,1,0,0,'kaelthas MT SAY_PHOENIX'), +(-1585025,'Felomin ashal!',12417,1,0,0,'kaelthas MT SAY_FLAMESTRIKE'), +(-1585026,'I\'ll turn your world... upside... down...',12418,1,0,0,'kaelthas MT SAY_GRAVITY_LAPSE'), +(-1585027,'Master... grant me strength.',12419,1,0,0,'kaelthas MT SAY_TIRED'), +(-1585028,'Do not... get too comfortable.',12420,1,0,0,'kaelthas MT SAY_RECAST_GRAVITY'), +(-1585029,'My demise accomplishes nothing! The Master will have you! You will drown in your own blood! This world shall burn! Aaaghh!',12421,1,0,0,'kaelthas MT SAY_DEATH'); + +-- -1 595 000 CULLING OF STRATHOLME + +-- -1 599 000 HALLS OF STONE +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1599000,'Soft, vulnerable shells. Brief, fragile lives. You can not escape the curse of flesh!',14180,1,0,0,'sjonnir SAY_AGGRO'), +(-1599001,'???',14181,1,0,0,'sjonnir SAY_SLAY_1'), +(-1599002,'Flesh is no match for iron!',14182,1,0,0,'sjonnir SAY_SLAY_2'), +(-1599003,'Armies of iron will smother the world!',14183,1,0,0,'sjonnir SAY_SLAY_3'), +(-1599004,'Loken will not rest, until the forge is retaken. You changed nothing!',14184,1,0,0,'sjonnir SAY_DEATH'), + +(-1599005,'You shouldn\'t have come...now you will die!',13487,1,0,0,'maiden SAY_AGGRO'), +(-1599006,'Why must it be this way?',13488,1,0,0,'maiden SAY_SLAY_1'), +(-1599007,'You had it coming!',13489,1,0,0,'maiden SAY_SLAY_2'), +(-1599008,'My burden grows heavier.',13490,1,0,0,'maiden SAY_SLAY_3'), +(-1599009,'This is your own fault!',13491,1,0,0,'maiden SAY_SLAY_4'), +(-1599010,'So much lost time... that you\'ll never get back!',13492,1,0,0,'maiden SAY_STUN'), +(-1599011,'I hope you all rot! I never...wanted...this.',13493,1,0,0,'maiden SAY_DEATH'), + +(-1599012,'Now that\'s owning your supper!',14244,1,0,0,'brann SAY_KILL_1'), +(-1599013,'Press on, that\'s the way!',14245,1,0,0,'brann SAY_KILL_2'), +(-1599014,'Keep it up now. Plenty of death-dealing for everyone!',14246,1,0,0,'brann SAY_KILL_3'), +(-1599015,'I\'m all kinds of busted up. Might not... make it...',14257,1,0,0,'brann SAY_LOW_HEALTH'), +(-1599016,'Not yet, not... yet-',14258,1,0,0,'brann SAY_DEATH'), +(-1599017,'I\'m doing everything I can!',14260,1,0,0,'brann SAY_PLAYER_DEATH_1'), +(-1599018,'Light preserve you!',14261,1,0,0,'brann SAY_PLAYER_DEATH_2'), +(-1599019,'I hope this is all worth it!',14262,1,0,0,'brann SAY_PLAYER_DEATH_3'), +(-1599020,'Time to get some answers! Let\'s get this show on the road!',14259,1,0,0,'brann SAY_ESCORT_START'), + +(-1599021,'Don\'t worry. Old Brann has got your back. Keep that metal monstrosity busy and I\'ll see if I can sweet talk this machine into helping you.',14274,1,0,0,'brann SAY_SPAWN_DWARF'), +(-1599022,'This is a wee bit trickier that before... Oh, bloody--incomin\'!',14275,1,0,0,'brann SAY_SPAWN_TROGG'), +(-1599023,'What in the name o\' Madoran did THAT do? Oh! Wait: I just about got it...',14276,1,0,0,'brann SAY_SPAWN_OOZE'), +(-1599024,'Ha, that did it. Help\'s a-coming. Take this you glow-eying brute!',14277,1,0,0,'brann SAY_SPAWN_EARTHEN'), + +(-1599025,'Take a moment and relish this with me! Soon all will be revealed! Okay then, lets do this!',14247,1,0,0,'brann SAY_EVENT_INTRO_1'), +(-1599026,'Now keep an eye out! I\'ll have this licked in two shakes of a--',14248,1,0,0,'brann SAY_EVENT_INTRO_2'), +(-1599027,'Warning! Life form pattern not recognized. Archival processing terminated. Continued interference will result in targeted response.',13765,1,0,0,'brann SAY_EVENT_INTRO_3_ABED'), + +(-1599028,'Oh, that doesn\'t sound good. We might have a complication or two...',14249,1,0,0,'brann SAY_EVENT_A_1'), +(-1599029,'Security breach in progress. Analysis of historical archives transferred to lower priority queue. Countermeasures engaged.',13756,1,0,0,'brann SAY_EVENT_A_2_KADD'), +(-1599030,'Ah, you want to play hardball, eh? That\'s just my game!',14250,1,0,0,'brann SAY_EVENT_A_3'), + +(-1599031,'Couple more minutes and I\'ll--',14251,1,0,0,'brann SAY_EVENT_B_1'), +(-1599032,'Threat index threshold exceeded. Celestial archive aborted. Security level heightened.',13761,1,0,0,'brann SAY_EVENT_B_2_MARN'), +(-1599033,'Heightened? What\'s the good news?',14252,1,0,0,'brann SAY_EVENT_B_3'), + +(-1599034,'So that was the problem? Now I\'m makin\' progress...',14253,1,0,0,'brann SAY_EVENT_C_1'), +(-1599035,'Critical threat index. Void analysis diverted. Initiating sanitization protocol.',13767,1,0,0,'brann SAY_EVENT_C_2_ABED'), +(-1599036,'Hang on! Nobody\'s gonna\' be sanitized as long as I have a say in it!',14254,1,0,0,'brann SAY_EVENT_C_3'), + +(-1599037,'Ha! The old magic fingers finally won through! Now let\'s get down to-',14255,1,0,0,'brann SAY_EVENT_D_1'), +(-1599038,'Alert! Security fail safes deactivated. Beginning memory purge...',13768,1,0,0,'brann SAY_EVENT_D_2_ABED'), +(-1599039,'Purge? No no no no no! Where did I-- Aha, this should do the trick...',14256,1,0,0,'brann SAY_EVENT_D_3'), +(-1599040,'System online. Life form pattern recognized. Welcome Branbronzan. Query?',13769,1,0,0,'brann SAY_EVENT_D_4_ABED'), + +(-1599041,'Query? What do you think Im here for? Tea and biscuits? Spill the beans already!',14263,1,0,0,'brann SAY_EVENT_END_01'), +(-1599042,'Tell me how that dwarfs came to be! And start at the beginning!',14264,1,0,0,'brann SAY_EVENT_END_02'), +(-1599043,'Accessing prehistoric data. Retrieved. In the beginning Earthen were created to-',13770,1,0,0,'brann SAY_EVENT_END_03_ABED'), +(-1599044,'Right, right! I know that the Earthen were made of stone to shape the deep reaches of the world but what about the anomalies? Matrix non-stabilizing and whatnot.',14265,1,0,0,'brann SAY_EVENT_END_04'), +(-1599045,'Accessing. In the early stages of its development cycle Azeroth suffered infection by parasitic, necrophotic symbiotes.',13771,1,0,0,'brann SAY_EVENT_END_05_ABED'), +(-1599046,'Necro-what? Speak bloody common will ya?',14266,1,0,0,'brann SAY_EVENT_END_06'), +(-1599047,'Designation: Old Gods. Old Gods rendered all systems, including Earthen defenseless in order to facilitate assimilation. This matrix destabilization has been termed the Curse of Flesh. Effects of destabilization increased over time.',13772,1,0,0,'brann SAY_EVENT_END_07_ABED'), +(-1599048,'Old Gods eh? So they zapped the Earthen with this Curse of Flesh. And then what?',14267,1,0,0,'brann SAY_EVENT_END_08'), +(-1599049,'Accessing. Creators arrived to extirpate symbiotic infection. Assessment revealed that Old God infestation had grown malignant. Excising parasites would result in loss of host.',13757,1,0,0,'brann SAY_EVENT_END_09_KADD'), +(-1599050,'If they killed the Old Gods Azeroth would have been destroyed.',14268,1,0,0,'brann SAY_EVENT_END_10'), +(-1599051,'Correct. Creators neutralized parasitic threat and contained it within the host. Forge of Wills and other systems were instituted to create new Earthen. Safeguards were implemented and protectors were appointed.',13758,1,0,0,'brann SAY_EVENT_END_11_KADD'), +(-1599052,'What protectors?',14269,1,0,0,'brann SAY_EVENT_END_12'), +(-1599053,'Designations: Aesir and Vanir or in common nomenclator Storm and Earth Giants. Sentinel Loken designated supreme. Dragon Aspects appointed to monitor evolution of Azeroth.',13759,1,0,0,'brann SAY_EVENT_END_13_KADD'), +(-1599054,'Aesir and Vanir. Okay. So the Forge of Wills started to make new Earthen. But what happened to the old ones?',14270,1,0,0,'brann SAY_EVENT_END_14'), +(-1599055,'Additional background is relevant to your query. Following global combat between-',13762,1,0,0,'brann SAY_EVENT_END_15_MARN'), +(-1599056,'Hold everything! The Aesir and Vanir went to war? Why?',14271,1,0,0,'brann SAY_EVENT_END_16'), +(-1599057,'Unknown. Data suggests that impetus for global combat originated with prime designate Loken who neutralized all remaining Aesir and Vanir affecting termination of conflict. Prime designate Loken then initiated stasis of several seed races including Earthen, Giant and Vrykul at designated holding facilities.',13763,1,0,0,'brann SAY_EVENT_END_17_MARN'), +(-1599058,'This Loken sounds like a nasty character. Glad we dont have to worry about the likes of him anymore. So if Im understanding you lads the original Earthen eventually woke up from this statis. And by that time this destabily-whatever had turned them into our brother dwarfs. Or at least dwarf ancestors. Hm?',14272,1,0,0,'brann SAY_EVENT_END_18'), +(-1599059,'Essentially that is correct.',13764,1,0,0,'brann SAY_EVENT_END_19_MARN'), +(-1599060,'Well now. Thats a lot to digest. Im gonna need some time to take all of this in. Thank you!',14273,1,0,0,'brann SAY_EVENT_END_20'), +(-1599061,'Acknowledged Branbronzan. Session terminated.',13773,1,0,0,'brann SAY_EVENT_END_21_ABED'), + +(-1599062,'Loken?! That\'s downright bothersome... We might\'ve neutralized the iron dwarves, but I\'d lay odds there\'s another machine somewhere else churnin\' out a whole mess o\' these iron vrykul!',14278,1,0,0,'brann SAY_VICTORY_SJONNIR_1'), +(-1599063,'I\'ll use the forge to make badtches o\' earthen to stand guard... But our greatest challenge still remains: find and stop Loken!',14279,1,0,0,'brann SAY_VICTORY_SJONNIR_2'), + +(-1599064,'I think it\'s time to see what\'s behind the door near the entrance. I\'m going to sneak over there, nice and quiet. Meet me at the door and I\'ll get us in.',0,1,0,0,'brann SAY_ENTRANCE_MEET'); + +-- -1 600 000 DRAK'THARON KEEP +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1600000,'More grunts, more glands, more FOOD!',13181,1,0,0,'trollgore SAY_AGGRO'), +(-1600001,'So hungry! Must feed!',13182,1,0,0,'trollgore SAY_CONSUME'), +(-1600002,'Aaaargh...',13183,1,0,0,'trollgore SAY_DEATH'), +(-1600003,'Corpse go boom!',13184,1,0,0,'trollgore SAY_EXPLODE'), +(-1600004,'You have gone, me gonna eat you!',13185,1,0,0,'trollgore SAY_KILL'), + +(-1600005,'The chill that you feel is the herald of your doom!',13173,1,0,0,'novos SAY_AGGRO'), +(-1600006,'Your efforts... are in vain.',13174,1,0,0,'novos SAY_DEATH'), +(-1600007,'Such is the fate of all who oppose the Lich King.',13175,1,0,0,'novos SAY_KILL'), +(-1600008,'Bolster my defenses! Hurry, curse you!',13176,1,0,0,'novos SAY_ADDS'), +(-1600009,'Surely you can see the futility of it all!',13177,1,0,0,'novos SAY_BUBBLE_1'), +(-1600010,'Just give up and die already!',13178,1,0,0,'novos SAY_BUBBLE_2'), +(-1600011,'%s calls for assistance.',0,3,0,0,'novos EMOTE_ASSISTANCE'), + +(-1600012,'Tharon\'ja sees all! The work of mortals shall not end the eternal dynasty!',13862,1,0,0,'tharonja SAY_AGGRO'), +(-1600013,'As Tharon\'ja predicted.',13863,1,0,0,'tharonja SAY_KILL_1'), +(-1600014,'As it was written.',13864,1,0,0,'tharonja SAY_KILL_2'), +(-1600015,'Your flesh serves Tharon\'ja now!',13865,1,0,0,'tharonja SAY_FLESH_1'), +(-1600016,'Tharon\'ja has a use for your mortal shell!',13866,1,0,0,'tharonja SAY_FLESH_2'), +(-1600017,'No! A taste... all too brief!',13867,1,0,0,'tharonja SAY_SKELETON_1'), +(-1600018,'Tharon\'ja will have more!',13868,1,0,0,'tharonja SAY_SKELETON_2'), +(-1600019,'Im... impossible! Tharon\'ja is eternal! Tharon\'ja... is...',13869,1,0,0,'tharonja SAY_DEATH'); + +-- -1 601 000 AZJOL-NERUB +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1601000,'This kingdom belongs to the Scourge! Only the dead may enter.',14075,1,0,0,'krikthir SAY_AGGRO'), +(-1601001,'???',14076,1,0,0,'krikthir SAY_KILL_1'), +(-1601002,'You were foolish to come.',14077,1,0,0,'krikthir SAY_KILL_2'), +(-1601003,'As Anub\'Arak commands!',14078,1,0,0,'krikthir SAY_KILL_3'), +(-1601004,'We are besieged. Strike out and bring back their corpses!',14079,1,0,0,'krikthir SAY_SEND_GROUP_1'), +(-1601005,'We must hold the gate. Attack! Tear them limb from limb!',14080,1,0,0,'krikthir SAY_SEND_GROUP_2'), +(-1601006,'The gate must be protected at all costs. Rip them to shreds!',14081,1,0,0,'krikthir SAY_SEND_GROUP_3'), +(-1601007,'Keep an eye on the tunnel. We must not let anyone through!',14082,1,0,0,'krikthir SAY_PREFIGHT_1'), +(-1601008,'I hear footsteps. Be on your guard.',14083,1,0,0,'krikthir SAY_PREFIGHT_2'), +(-1601009,'I sense the living. Be ready.',14084,1,0,0,'krikthir SAY_PREFIGHT_3'), +(-1601010,'They hunger.',14085,1,0,0,'krikthir SAY_SWARM_1'), +(-1601011,'Dinner time, my pets.',14086,1,0,0,'krikthir SAY_SWARM_2'), +(-1601012,'I should be grateful. But I long ago lost the capacity.',14087,1,0,0,'krikthir SAY_DEATH'), +(-1601013,'REUSE ME',0,0,0,0,'REUSE ME'), + +(-1601014,'I was king of this empire once, long ago. In life I stood as champion. In death I returned as conqueror. Now I protect the kingdom once more. Ironic, yes?',14053,1,0,0,'anubarak SAY_INTRO'), +(-1601015,'Eternal agony awaits you!',14054,1,0,0,'anubarak SAY_AGGRO'), +(-1601016,'You shall experience my torment, first-hand!',14055,1,0,0,'anubarak SAY_KILL_1'), +(-1601017,'You have made your choice.',14056,1,0,0,'anubarak SAY_KILL_2'), +(-1601018,'Soon, the Master\'s voice will call to you.',14057,1,0,0,'anubarak SAY_KILL_3'), +(-1601019,'Come forth, my brethren. Feast on their flesh!',14058,1,0,0,'anubarak SAY_SUBMERGE_1'), +(-1601020,'Auum na-l ak-k-k-k, isshhh.',14059,1,0,0,'anubarak SAY_SUBMERGE_2'), +(-1601021,'Your armor is useless against my locusts!',14060,1,0,0,'anubarak SAY_LOCUST_1'), +(-1601022,'The pestilence upon you!',14067,1,0,0,'anubarak SAY_LOCUST_2'), +(-1601023,'Uunak-hissss tik-k-k-k-k!',14068,1,0,0,'anubarak SAY_LOCUST_3'), +(-1601024,'Ahhh... RAAAAAGH! Never thought... I would be free of him...',14069,1,0,0,'anubarak SAY_DEATH'); + +-- -1 602 000 HALLS OF LIGHTNING +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1602000,'I am the greatest of my father\'s sons! Your end has come!',14149,1,0,0,'bjarngrim SAY_AGGRO'), +(-1602001,'So ends your curse!',14153,1,0,0,'bjarngrim SAY_SLAY_1'), +(-1602002,'Flesh... is... weak!',14154,1,0,0,'bjarngrim SAY_SLAY_2'), +(-1602003,'...',14155,1,0,0,'bjarngrim SAY_SLAY_3'), +(-1602004,'How can it be...? Flesh is not... stronger!',14156,1,0,0,'bjarngrim SAY_DEATH'), +(-1602005,'Defend yourself, for all the good it will do!',14151,1,0,0,'bjarngrim SAY_BATTLE_STANCE'), +(-1602006,'%s switches to Battle Stance!',0,3,0,0,'bjarngrim EMOTE_BATTLE_STANCE'), +(-1602007,'GRAAAAAH! Behold the fury of iron and steel!',14152,1,0,0,'bjarngrim SAY_BERSEKER_STANCE'), +(-1602008,'%s switches to Berserker Stance!',0,3,0,0,'bjarngrim EMOTE_BERSEKER_STANCE'), +(-1602009,'Give me your worst!',14150,1,0,0,'bjarngrim SAY_DEFENSIVE_STANCE'), +(-1602010,'%s switches to Defensive Stance!',0,3,0,0,'bjarngrim EMOTE_DEFENSIVE_STANCE'), + +(-1602011,'You wish to confront the master? You must weather the storm!',14453,1,0,0,'ionar SAY_AGGRO'), +(-1602012,'Shocking ... I know!',14456,1,0,0,'ionar SAY_SLAY_1'), +(-1602013,'You atempt the unpossible.',14457,1,0,0,'ionar SAY_SLAY_2'), +(-1602014,'Your spark of light is ... extinguish.',14458,1,0,0,'ionar SAY_SLAY_3'), +(-1602015,'Master... you have guests.',14459,1,0,0,'ionar SAY_DEATH'), +(-1602016,'The slightest spark shall be your undoing.',14454,1,0,0,'ionar SAY_SPLIT_1'), +(-1602017,'No one is safe!',14455,1,0,0,'ionar SAY_SPLIT_2'), + +(-1602018,'What hope is there for you? None!',14162,1,0,0,'loken SAY_AGGRO0'), +(-1602019,'I have witnessed the rise and fall of empires. The birth and extinction of entire species. Over countless millennia the foolishness of mortals has remained beyond a constant. Your presence here confirms this.',14160,1,0,0,'loken SAY_INTRO_1'), +(-1602020,'My master has shown me the future, and you have no place in it. Azeroth will be reborn in darkness. Yogg-Saron shall be released! The Pantheon shall fall!',14162,1,0,0,'loken SAY_INTRO_2'), +(-1602021,'Only mortal...',14166,1,0,0,'loken SAY_SLAY_1'), +(-1602022,'I... am... FOREVER!',14167,1,0,0,'loken SAY_SLAY_2'), +(-1602023,'What little time you had, you wasted!',14168,1,0,0,'loken SAY_SLAY_3'), +(-1602024,'My death... heralds the end of this world.',14172,1,0,0,'loken SAY_DEATH'), +(-1602025,'You cannot hide from fate!',14163,1,0,0,'loken SAY_NOVA_1'), +(-1602026,'Come closer. I will make it quick.',14164,1,0,0,'loken SAY_NOVA_2'), +(-1602027,'Your flesh cannot hold out for long.',14165,1,0,0,'loken SAY_NOVA_3'), +(-1602028,'You stare blindly into the abyss!',14169,1,0,0,'loken SAY_75HEALTH'), +(-1602029,'Your ignorance is profound. Can you not see where this path leads?',14170,1,0,0,'loken SAY_50HEALTH'), +(-1602030,'You cross the precipice of oblivion!',14171,1,0,0,'loken SAY_25HEALTH'), +(-1602031,'%s begins to cast Lightning Nova!',0,3,0,0,'loken EMOTE_NOVA'), + +(-1602032,'It is you who have destroyed my children? You... shall... pay!',13960,1,0,0,'volkhan SAY_AGGRO'), +(-1602033,'The armies of iron will conquer all!',13965, 1,0,0,'volkhan SAY_SLAY_1'), +(-1602034,'Ha, pathetic!',13966,1,0,0,'volkhan SAY_SLAY_2'), +(-1602035,'You have cost me too much work!',13967,1,0,0,'volkhan SAY_SLAY_3'), +(-1602036,'The master was right... to be concerned.',13968,1,0,0,'volkhan SAY_DEATH'), +(-1602037,'I will crush you beneath my boots!',13963,1,0,0,'volkhan SAY_STOMP_1'), +(-1602038,'All my work... undone!',13964,1,0,0,'volkhan SAY_STOMP_2'), +(-1602039,'Life from the lifelessness... death for you.',13961,1,0,0,'volkhan SAY_FORGE_1'), +(-1602040,'Nothing is wasted in the process. You will see....',13962,1,0,0,'volkhan SAY_FORGE_2'), +(-1602041,'%s runs to his anvil!',0,3,0,0,'volkhan EMOTE_TO_ANVIL'), +(-1602042,'%s prepares to shatter his Brittle Golems!',0,3,0,0,'volkhan EMOTE_SHATTER'); + +-- -1 603 000 ULDUAR + +-- -1 604 000 GUNDRAK +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1604000,'Drakkari gonna kill anybody who trespass on these lands!',14443,1,0,0,'sladran SAY_AGGRO'), +(-1604001,'Minions of the scale, heed my call!',14444,1,0,0,'sladran SAY_SUMMON_SNAKE'), +(-1604002,'Our thousand fangs gonna rend your flesh! ',14445,1,0,0,'sladran SAY_SUMMON_CONSTRICT'), +(-1604003,'Ye not breathin\'! Good.',14446,1,0,0,'sladran SAY_SLAY_1'), +(-1604004,'You scared now?',14447,1,0,0,'sladran SAY_SLAY_2'), +(-1604005,'I\'ll eat you next, mon!',14448,1,0,0,'sladran SAY_SLAY_3'), +(-1604006,'I sssee now... Ssscourge wasss not... our greatessst enemy...',14449,1,0,0,'sladran SAY_DEATH'), +(-1604007,'%s begins to cast Poison Nova!',0,3,0,0,'sladran EMOTE_NOVA'), + +(-1604008,'%s surges forward!',0,2,0,0,'colossus EMOTE_SURGE'), +(-1604009,'%s seep into the ground.',0,2,0,0,'colossus EMOTE_SEEP'), +(-1604010,'%s begins to glow faintly.',0,2,0,0,'colossus EMOTE_GLOW'), + +(-1604011,'We fought back da Scourge. What chance joo be thinkin\' JOO got?',14721,1,0,0,'moorabi SAY_AGGRO'), +(-1604012,'Da ground gonna swallow you up! ',14723,1,0,0,'moorabi SAY_QUAKE'), +(-1604013,'Get ready for somethin\'... much... BIGGAH!',14722,1,0,0,'moorabi SAY_TRANSFORM'), +(-1604014,'I crush you, cockroaches!',14725,1,0,0,'moorabi SAY_SLAY_1'), +(-1604015,'Who gonna stop me; you?',14726,1,0,0,'moorabi SAY_SLAY_2'), +(-1604016,'Not so tough now.',14727,1,0,0,'moorabi SAY_SLAY_3'), +(-1604017,'If our gods can die... den so can we...',14728,1,0,0,'moorabi SAY_DEATH'), +(-1604018,'%s begins to transform!',0,3,0,0,'moorabi EMOTE_TRANSFORM'), + +(-1604019,'I\'m gonna spill your guts, mon!',14430,1,0,0,'galdarah SAY_AGGRO'), +(-1604020,'Ain\'t gonna be nottin\' left after this!',14431,1,0,0,'galdarah SAY_TRANSFORM_1'), +(-1604021,'You wanna see power? I\'m gonna show you power!',14432,1,0,0,'galdarah SAY_TRANSFORM_2'), +(-1604022,'Gut them! Impale them!',14433,1,0,0,'galdarah SAY_SUMMON_1'), +(-1604023,'Kill them all!',14434,1,0,0,'galdarah SAY_SUMMON_2'), +(-1604024,'Say hello to my BIG friend!',14435,1,0,0,'galdarah SAY_SUMMON_3'), +(-1604025,'What a rush!',14436,1,0,0,'galdarah SAY_SLAY_1'), +(-1604026,'Who needs gods, when WE ARE GODS!',14437,1,0,0,'galdarah SAY_SLAY_2'), +(-1604027,'I told ya so!',14438,1,0,0,'galdarah SAY_SLAY_3'), +(-1604028,'Even the mighty... can fall.',14439,1,0,0,'galdarah SAY_DEATH'); + +-- -1 608 000 VIOLET HOLD + +-- -1 609 000 EBON HOLD (DK START) +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1609000,'You have made a grave error, fiend!',0,0,0,0,'unworthy SAY_START_1'), +(-1609001,'I was a soldier of the Light once... Look at what I have become... ',0,0,0,0,'unworthy SAY_START_2'), +(-1609002,'You are hopelessly outmatched, $R.',0,0,0,0,'unworthy SAY_START_3'), +(-1609003,'They brand me unworthy? I will show them unmorthy!',0,0,0,0,'unworthy SAY_START_4'), +(-1609004,'You will allow me a weapon and armor, yes?',0,0,0,0,'unworthy SAY_START_5'), +(-1609005,'I will win my freedom and leave this cursed place!',0,0,0,0,'unworthy SAY_START_6'), +(-1609006,'I will dismantle this festering hellhole!',0,0,0,0,'unworthy SAY_START_7'), +(-1609007,'There can be only one survivor!',0,0,0,0,'unworthy SAY_START_8'), + +(-1609008,'Let your fears consume you!',0,0,0,0,'unworthy SAY_AGGRO_1'), +(-1609009,'HAH! You can barely hold a blade! Yours will be a quick death.',0,0,0,0,'unworthy SAY_AGGRO_2'), +(-1609010,'And now you die',0,0,0,0,'unworthy SAY_AGGRO_3'), +(-1609011,'To battle!',0,0,0,0,'unworthy SAY_AGGRO_4'), +(-1609012,'There is no hope for our future...',0,0,0,0,'unworthy SAY_AGGRO_5'), +(-1609013,'Sate your hunger on cold steel, $R',0,0,0,0,'unworthy SAY_AGGRO_6'), +(-1609014,'It ends here!',0,0,0,0,'unworthy SAY_AGGRO_7'), +(-1609015,'Death is the only cure!',0,0,0,0,'unworthy SAY_AGGRO_8'), + +(-1609016,'No potions!',0,0,0,0,'dk_initiate SAY_DUEL_A'), +(-1609017,'Remember this day, $n, for it is the day that you will be thoroughly owned.',0,0,0,0,'dk_initiate SAY_DUEL_B'), +(-1609018,'I\'m going to tear your heart out, cupcake!',0,0,0,0,'dk_initiate SAY_DUEL_C'), +(-1609019,'Don\'t make me laugh.',0,0,0,0,'dk_initiate SAY_DUEL_D'), +(-1609020,'Here come the tears...',0,0,0,0,'dk_initiate SAY_DUEL_E'), +(-1609021,'You have challenged death itself!',0,0,0,0,'dk_initiate SAY_DUEL_F'), +(-1609022,'The Lich King will see his true champion on this day!',0,0,0,0,'dk_initiate SAY_DUEL_G'), +(-1609023,'You\'re going down!',0,0,0,0,'dk_initiate SAY_DUEL_H'), +(-1609024,'You don\'t stand a chance, $n',0,0,0,0,'dk_initiate SAY_DUEL_I'), + +(-1609025,'Come to finish the job, have you?',0,0,0,1,'special_surprise SAY_EXEC_START_1'), +(-1609026,'Come to finish the job, have ye?',0,0,0,1,'special_surprise SAY_EXEC_START_2'), +(-1609027,'Come ta finish da job, mon?',0,0,0,1,'special_surprise SAY_EXEC_START_3'), + +(-1609028,'You\'ll look me in the eyes when...',0,0,0,25,'special_surprise SAY_EXEC_PROG_1'), +(-1609029,'Well this son o\' Ironforge would like...',0,0,0,25,'special_surprise SAY_EXEC_PROG_2'), +(-1609030,'Ironic, isn\'t it? To be killed...',0,0,0,25,'special_surprise SAY_EXEC_PROG_3'), +(-1609031,'If you\'d allow me just one...',0,0,0,25,'special_surprise SAY_EXEC_PROG_4'), +(-1609032,'I\'d like to stand for...',0,0,0,25,'special_surprise SAY_EXEC_PROG_5'), +(-1609033,'I want to die like an orc...',0,0,0,25,'special_surprise SAY_EXEC_PROG_6'), +(-1609034,'Dis troll gonna stand for da...',0,0,0,25,'special_surprise SAY_EXEC_PROG_7'), + +(-1609035,'$N?',0,0,0,1,'special_surprise SAY_EXEC_NAME_1'), +(-1609036,'$N? Mon?',0,0,0,1,'special_surprise SAY_EXEC_NAME_2'), + +(-1609037,'$N, I\'d recognize that face anywhere... What... What have they done to you, $N?',0,0,0,1,'special_surprise SAY_EXEC_RECOG_1'), +(-1609038,'$N, I\'d recognize those face tentacles anywhere... What... What have they done to you, $N?',0,0,0,1,'special_surprise SAY_EXEC_RECOG_2'), +(-1609039,'$N, I\'d recognize that face anywhere... What... What have they done to ye, $Glad:lass;?',0,0,0,1,'special_surprise SAY_EXEC_RECOG_3'), +(-1609040,'$N, I\'d recognize that decay anywhere... What... What have they done to you, $N?',0,0,0,1,'special_surprise SAY_EXEC_RECOG_4'), +(-1609041,'$N, I\'d recognize those horns anywhere... What have they done to you, $N?',0,0,0,1,'special_surprise SAY_EXEC_RECOG_5'), +(-1609042,'$N, I\'d recognize dem tusks anywhere... What... What have dey done ta you, mon?',0,0,0,1,'special_surprise SAY_EXEC_RECOG_6'), + +(-1609043,'You don\'t remember me, do you? Blasted Scourge... They\'ve tried to drain you of everything that made you a righteous force of reckoning. Every last ounce of good... Everything that made you a draenei!',0,0,0,1,'special_surprise SAY_EXEC_NOREM_1'), +(-1609044,'Ye don\'t remember me, do ye? Blasted Scourge... They\'ve tried to drain ye o\' everything that made ye a righteous force o\' reckoning. Every last ounce o\' good... Everything that made you a $Gson:daughter; of Ironforge!',0,0,0,1,'special_surprise SAY_EXEC_NOREM_2'), +(-1609045,'You don\'t remember me, do you? We were humans once - long, long ago - until Lordaeron fell to the Scourge. Your transformation to a Scourge zombie came shortly after my own. Not long after that, our minds were freed by the Dark Lady.',0,0,0,1,'special_surprise SAY_EXEC_NOREM_3'), +(-1609046,'You don\'t remember me, do you? Blasted Scourge... They\'ve tried to drain you of everything that made you a pint-sized force of reckoning. Every last ounce of good... Everything that made you a gnome!',0,0,0,1,'special_surprise SAY_EXEC_NOREM_4'), +(-1609047,'You don\'t remember me, do you? Blasted Scourge...They\'ve tried to drain of everything that made you a righteous force of reckoning. Every last ounce of good...Everything that made you a human!',0,0,0,1,'special_surprise SAY_EXEC_NOREM_5'), +(-1609048,'You don\'t remember me? When you were a child your mother would leave you in my care while she served at the Temple of the Moon. I held you in my arms and fed you with honey and sheep\'s milk to calm you until she would return. You were my little angel. Blasted Scourge... What have they done to you, $N?',0,0,0,1,'special_surprise SAY_EXEC_NOREM_6'), +(-1609049,'You don\'t recognize me, do you? Blasted Scourge... They\'ve tried to drain you of everything that made you a righteous force of reckoning. Every last ounce of good... Everything that made you an orc!',0,0,0,1,'special_surprise SAY_EXEC_NOREM_7'), +(-1609050,'You don\'t remember me, do you? Blasted Scourge... They\'ve tried to drain you of everything that made you a righteous force of reckoning. Every last ounce of good... Everything that made you a tauren!',0,0,0,1,'special_surprise SAY_EXEC_NOREM_8'), +(-1609051,'You don\'t remember me, mon? Damn da Scourge! Dey gone ta drain you of everytin dat made ya a mojo masta. Every last ounce of good... Everytin\' dat made ya a troll hero, mon!',0,0,0,1,'special_surprise SAY_EXEC_NOREM_9'), + +(-1609052,'A pact was made, $Gbrother:sister;! We vowed vengeance against the Lich King! For what he had done to us! We battled the Scourge as Forsaken, pushing them back into the plaguelands and freeing Tirisfal! You and I were champions of the Forsaken!',0,0,0,1,'special_surprise SAY_EXEC_THINK_1'), +(-1609053,'You must remember the splendor of life, $Gbrother:sister;. You were a champion of the Kaldorei once! This isn\'t you!',0,0,0,1,'special_surprise SAY_EXEC_THINK_2'), +(-1609054,'Think, $N. Think back. Try and remember the majestic halls of Silvermoon City, where you were born. Remember the splendor of life, $Gbrother:sister;. You were a champion of the sin\'dorei once! This isn\'t you.',0,0,0,6,'special_surprise SAY_EXEC_THINK_3'), +(-1609055,'Think, $N. Think back. Try and remember the proud mountains of Argus, where you were born. Remember the splendor of life, $Gbrother:sister;. You were a champion of the draenei once! This isn\'t you.',0,0,0,6,'special_surprise SAY_EXEC_THINK_4'), +(-1609056,'Think, $N. Think back. Try and remember the snow capped mountains o\' Dun Morogh! Ye were born there, $Glad:lass;. Remember the splendor o\' life, $N! Ye were a champion o\' the dwarves once! This isn\'t ye!',0,0,0,6,'special_surprise SAY_EXEC_THINK_5'), +(-1609057,'Think, $N. Think back. Try and remember Gnomeregan before those damned troggs! Remember the feel of an [arclight spanner] $Gbrother:sister;. You were a champion of gnome-kind once! This isn\'t you.',0,0,0,6,'special_surprise SAY_EXEC_THINK_6'), +(-1609058,'Think, $N. Think back. Try and remember the hills and valleys of Elwynn, where you were born. Remember the splendor of life, $Gbrother:sister;. You were a champion of the Alliance once! This isn\'t you.',0,0,0,6,'special_surprise SAY_EXEC_THINK_7'), +(-1609059,'Think, $N. Think back. Try and remember Durotar, $Gbrother:sister;! Remember the sacrifices our heroes made so that we could be free of the blood curse. Harken back to the Valley of Trials, where we were reborn into a world without demonic influence. We found the splendor of life, $N. Together! This isn\'t you. You were a champion of the Horde once!',0,0,0,6,'special_surprise SAY_EXEC_THINK_8'), +(-1609060,'Think, $N. Think back. Try and remember the rolling plains of Mulgore, where you were born. Remember the splendor of life, $Gbrother:sister;. You were a champion of the tauren once! This isn\'t you.',0,0,0,6,'special_surprise SAY_EXEC_THINK_9'), +(-1609061,'TINK $N. Tink back, mon! We be Darkspear, mon! Bruddas and sistas! Remember when we fought the Zalazane and done took he head and freed da Echo Isles? MON! TINK! You was a champion of da Darkspear trolls!',0,0,0,6,'special_surprise SAY_EXEC_THINK_10'), + +(-1609062,'Listen to me, $N. You must fight against the Lich King\'s control. He is a monster that wants to see this world - our world - in ruin. Don\'t let him use you to accomplish his goals. You were once a hero and you can be again. Fight, damn you! Fight his control!',0,0,0,5,'special_surprise SAY_EXEC_LISTEN_1'), +(-1609063,'Listen to me, $N Ye must fight against the Lich King\'s control. He\'s a monster that wants to see this world - our world - in ruin. Don\'t let him use ye to accomplish his goals. Ye were once a hero and ye can be again. Fight, damn ye! Fight his control!',0,0,0,5,'special_surprise SAY_EXEC_LISTEN_2'), +(-1609064,'Listen to me, $N. You must fight against the Lich King\'s control. He is a monster that wants to see this world - our world - in ruin. Don\'t let him use you to accomplish his goals AGAIN. You were once a hero and you can be again. Fight, damn you! Fight his control!',0,0,0,5,'special_surprise SAY_EXEC_LISTEN_3'), +(-1609065,'Listen ta me, $Gbrudda:sista;. You must fight against da Lich King\'s control. He be a monstar dat want ta see dis world - our world - be ruined. Don\'t let he use you ta accomplish he goals. You be a hero once and you be a hero again! Fight it, mon! Fight he control!',0,0,0,5,'special_surprise SAY_EXEC_LISTEN_4'), + +(-1609066,'What\'s going on in there? What\'s taking so long, $N?',0,1,0,0,'special_surprise SAY_PLAGUEFIST'), + +(-1609067,'There... There\'s no more time for me. I\'m done for. Finish me off, $N. Do it or they\'ll kill us both. $N... Remember Silvermoon. This world is worth saving!',0,0,0,18,'special_surprise SAY_EXEC_TIME_1'), +(-1609068,'There... There\'s no more time for me. I\'m done for. Finish me off, $N. Do it or they\'ll kill us both. $N... Remember Argus. Don\'t let that happen to this world.',0,0,0,18,'special_surprise SAY_EXEC_TIME_2'), +(-1609069,'There... There\'s no more time for me. I\'m done for. Finish me off, $N. Do it or they\'ll kill us both $N... For KHAAAAAAAAZZZ MODAAAAAANNNNNN!!!',0,0,0,18,'special_surprise SAY_EXEC_TIME_3'), +(-1609070,'There... There\'s no more time for me. I\'m done for. Finish me off, $N. Do it or they\'ll kill us both. $N... Remember Tirisfal! This world is worth saving!',0,0,0,18,'special_surprise SAY_EXEC_TIME_4'), +(-1609071,'There... There\'s no more time for me. I\'m done for. Finish me off, $N. Do it or they\'ll kill us both. $N... Remember Gnomeregan! This world is worth saving.',0,0,0,18,'special_surprise SAY_EXEC_TIME_5'), +(-1609072,'There... There\'s no more time for me. I\'m done for. FInish me off, $N. Do it or they\'ll kill us both. $N...Remember Elwynn. This world is worth saving.',0,0,0,18,'special_surprise SAY_EXEC_TIME_6'), +(-1609073,'There... There\'s no more time for me. I\'m done for. Finish me off, $N. Do it or they\'ll kill us both. $N... Remember Teldrassil, our beloved home. This world is worth saving.',0,0,0,18,'special_surprise SAY_EXEC_TIME_7'), +(-1609074,'There... There\'s no more time for me. I\'m done for. Finish me off, $N. Do it or they\'ll kill us both. $N... For the Horde! This world is worth saving.',0,0,0,18,'special_surprise SAY_EXEC_TIME_8'), +(-1609075,'There... There\'s no more time for me. I\'m done for. Finish me off, $N. Do it or they\'ll kill us both. $N... Remember Mulgore. This world is worth saving.',0,0,0,18,'special_surprise SAY_EXEC_TIME_9'), +(-1609076,'Der... Der\'s no more time for me. I be done for. Finish me off $N. Do it or they\'ll kill us both. $N... Remember Sen\'jin Village, mon! Dis world be worth saving!',0,0,0,18,'special_surprise SAY_EXEC_TIME_10'), + +(-1609077,'Do it, $N! Put me out of my misery!',0,0,0,1,'special_surprise SAY_EXEC_WAITING'), +(-1609078,'%s dies from his wounds.',0,2,0,0,'special_surprise EMOTE_DIES'), + +(-1609079, 'I\'ll need to get my runeblade and armor... Just need a little more time.',0,0,0,399,'koltira SAY_BREAKOUT1'), +(-1609080, 'I\'m still weak, but I think I can get an anti-magic barrier up. Stay inside it or you\'ll be destroyed by their spells.',0,0,0,0,'koltira SAY_BREAKOUT2'), +(-1609081, 'Maintaining this barrier will require all of my concentration. Kill them all!',0,0,0,16,'koltira SAY_BREAKOUT3'), +(-1609082, 'There are more coming. Defend yourself! Don\'t fall out of the anti-magic field! They\'ll tear you apart without its protection!',0,0,0,0,'koltira SAY_BREAKOUT4'), +(-1609083, 'I can\'t keep barrier up much longer... Where is that coward?',0,0,0,0,'koltira SAY_BREAKOUT5'), +(-1609084, 'The High Inquisitor comes! Be ready, death knight! Do not let him draw you out of the protective bounds of my anti-magic field! Kill him and take his head!',0,0,0,0,'koltira SAY_BREAKOUT6'), +(-1609085, 'Stay in the anti-magic field! Make them come to you!',0,0,0,0,'koltira SAY_BREAKOUT7'), +(-1609086, 'The death of the High Inquisitor of New Avalon will not go unnoticed. You need to get out of here at once! Go, before more of them show up. I\'ll be fine on my own.',0,0,0,0,'koltira SAY_BREAKOUT8'), +(-1609087, 'I\'ll draw their fire, you make your escape behind me.',0,0,0,0,'koltira SAY_BREAKOUT9'), +(-1609088, 'Your High Inquisitor is nothing more than a pile of meat, Crusaders! There are none beyond the grasp of the Scourge!',0,1,0,0,'koltira SAY_BREAKOUT10'); + +-- -1 615 000 OBSIDIAN SANCTUM +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1615000,'I fear nothing! Least of all you!',14111,1,0,0,'shadron SAY_SHADRON_AGGRO'), +(-1615001,'You are insignificant!',14112,1,0,0,'shadron SAY_SHADRON_SLAY_1'), +(-1615002,'Such mediocre resistance!',14113,1,0,0,'shadron SAY_SHADRON_SLAY_2'), +(-1615003,'We...are superior! How could this...be...',14118,1,0,0,'shadron SAY_SHADRON_DEATH'), +(-1615004,'You are easily bested! ',14114,1,0,0,'shadron SAY_SHADRON_BREATH'), +(-1615005,'I will take pity on you Sartharion, just this once.',14117,1,0,0,'shadron SAY_SHADRON_RESPOND'), +(-1615006,'Father tought me well!',14115,1,0,0,'shadron SAY_SHADRON_SPECIAL_1'), +(-1615007,'On your knees!',14116,1,0,0,'shadron SAY_SHADRON_SPECIAL_2'), +(-1615008,'A Shadron Disciple appears in the Twilight!',0,5,0,0,'shadron WHISPER_SHADRON_DICIPLE'), + +(-1615009,'You have no place here. Your place is among the departed.',14122,1,0,0,'tenebron SAY_TENEBRON_AGGRO'), +(-1615010,'No contest.',14123,1,0,0,'tenebron SAY_TENEBRON_SLAY_1'), +(-1615011,'Typical... Just as I was having fun.',14124,1,0,0,'tenebron SAY_TENEBRON_SLAY_2'), +(-1615012,'I should not... have held back...', 14129,1,0,0,'tenebron SAY_TENEBRON_DEATH'), +(-1615013,'To darkness I condemn you...',14125,1,0,0,'tenebron SAY_TENEBRON_BREATH'), +(-1615014,'It is amusing to watch you struggle. Very well, witness how it is done.',14128,1,0,0,'tenebron SAY_TENEBRON_RESPOND'), +(-1615015,'Arrogant little creatures! To challenge powers you do not yet understand...',14126,1,0,0,'tenebron SAY_TENEBRON_SPECIAL_1'), +(-1615016,'I am no mere dragon! You will find I am much, much, more...',14127,1,0,0,'tenebron SAY_TENEBRON_SPECIAL_2'), +(-1615017,'%s begins to hatch eggs in the twilight!',0,5,0,0,'tenebron WHISPER_HATCH_EGGS'), + +(-1615018,'It is my charge to watch over these eggs. I will see you burn before any harm comes to them!',14093,1,0,0,'sartharion SAY_SARTHARION_AGGRO'), +(-1615019,'This pathetic siege ends NOW!',14103,1,0,0,'sartharion SAY_SARTHARION_BERSERK'), +(-1615020,'Burn, you miserable wretches!',14098, 1,0,0,'sartharion SAY_SARTHARION_BREATH'), +(-1615021,'Shadron! Come to me, all is at risk!',14105,1,0,0,'sartharion SARTHARION_CALL_SHADRON'), +(-1615022,'Tenebron! The eggs are yours to protect as well!',14106,1,0,0,'sartharion SAY_SARTHARION_CALL_TENEBRON'), +(-1615023,'Vesperon! The clutch is in danger! Assist me!',14104,1,0,0,'sartharion SAY_SARTHARION_CALL_VESPERON'), +(-1615024,'Such is the price... of failure...',14107,1,0,0,'sartharion SAY_SARTHARION_DEATH'), +(-1615025,'Such flammable little insects....',14099,1,0,0,'sartharion SAY_SARTHARION_SPECIAL_1'), +(-1615026,'Your charred bones will litter the floor!',14100,1,0,0,'sartharion SAY_SARTHARION_SPECIAL_2'), +(-1615027,'How much heat can you take?',14101,1,0,0,'sartharion SAY_SARTHARION_SPECIAL_3'), +(-1615028,'All will be reduced to ash!',14102,1,0,0,'sartharion SAY_SARTHARION_SPECIAL_4'), +(-1615029,'You will make a fine meal for the hatchlings.',14094,1,0,0,'sartharion SAY_SARTHARION_SLAY_1'), +(-1615030,'You are the grave disadvantage.',14096,1,0,0,'sartharion SAY_SARTHARION_SLAY_2'), +(-1615031,'This is why we call you lesser beeings.',14097,1,0,0,'sartharion SAY_SARTHARION_SLAY_3'), +(-1615032,'The lava surrounding %s churns!',0,5,0,0,'sartharion WHISPER_LAVA_CHURN'), + +(-1615033,'You pose no threat, lesser beings...give me your worst!',14133,1,0,0,'vesperon SAY_VESPERON_AGGRO'), +(-1615034,'The least you could do is put up a fight...',14134,1,0,0,'vesperon SAY_VESPERON_SLAY_1'), +(-1615035,'Was that the best you can do?',14135,1,0,0,'vesperon SAY_VESPERON_SLAY_2'), +(-1615036,'I still have some...fight..in...me...', 14140,1,0,0,'vesperon SAY_VESPERON_DEATH'), +(-1615037,'I will pick my teeth with your bones!',14136,1,0,0,'vesperon SAY_VESPERON_BREATH'), +(-1615038,'Father was right about you, Sartharion...You are a weakling!',14139,1,0,0,'vesperon SAY_VESPERON_RESPOND'), +(-1615039,'Aren\'t you tricky...I have a few tricks of my own...',14137,1,0,0,'vesperon SAY_VESPERON_SPECIAL_1'), +(-1615040,'Unlike, I have many talents.',14138,1,0,0,'vesperon SAY_VESPERON_SPECIAL_2'), +(-1615041,'A Vesperon Disciple appears in the Twilight!',0,5,0,0,'shadron WHISPER_VESPERON_DICIPLE'), + +(-1615042,'%s begins to open a Twilight Portal!',0,5,0,0,'sartharion drake WHISPER_OPEN_PORTAL'); + +-- -1 616 000 EYE OF ETERNITY + +-- -1 619 000 AHN'KAHET +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1619000,'The secrets of the deep shall remain hidden.',14033,1,0,0,'nadox SAY_AGGRO'), +(-1619001,'The young must not grow hungry...',14034,1,0,0,'nadox SAY_SUMMON_EGG_1'), +(-1619002,'Shhhad ak kereeesshh chak-k-k!',14035,1,0,0,'nadox SAY_SUMMON_EGG_2'), +(-1619003,'Sleep now, in the cold dark.',14036,1,0,0,'nadox SAY_SLAY_1'), +(-1619004,'For the Lich King!',14037,1,0,0,'nadox SAY_SLAY_2'), +(-1619005,'Perhaps we will be allies soon.',14038,1,0,0,'nadox SAY_SLAY_3'), +(-1619006,'Master, is my service complete?',14039,1,0,0,'nadox SAY_DEATH'), +(-1619007,'An Ahn\'kahar Guardian hatches!',0,3,0,0,'nadox EMOTE_HATCH'), + +(-1619008,'I will feast on your remains.',14360,1,0,0,'taldaram SAY_AGGRO'), +(-1619009,'Your heartbeat is music to my ears.',14361,1,0,0,'taldaram SAY_VANISH_1'), +(-1619010,'I am nowhere. I am everywhere. I am the watcher, unseen.',14362,1,0,0,'taldaram SAY_VANISH_2'), +(-1619011,'So appetizing.',14363,1,0,0,'taldaram SAY_FEED_1'), +(-1619012,'Fresh, warm blood. It has been too long.',14364,1,0,0,'taldaram SAY_FEED_2'), +(-1619013,'Bin-dor\'el',14365,1,0,0,'taldaram SAY_SLAY_1'), +(-1619014,'I will drink no blood before it\'s time.',14366,1,0,0,'taldaram SAY_SLAY_2'), +(-1619015,'One final embrace.',14367,1,0,0,'taldaram SAY_SLAY_3'), +(-1619016,'Still I hunger, still I thirst.',14368,1,0,0,'taldaram SAY_DEATH'), + +(-1619017,'These are sacred halls! Your intrusion will be met with death.',14343,1,0,0,'jedoga SAY_AGGRO'), +(-1619018,'Who among you is devoted?',14344,1,0,0,'jedoga SAY_CALL_SACRIFICE_1'), +(-1619019,'You there! Step forward!',14345,1,0,0,'jedoga SAY_CALL_SACRIFICE_2'), +(-1619020,'Yogg-Saron, grant me your power!',14346,1,0,0,'jedoga SAY_SACRIFICE_1'), +(-1619021,'Master, a gift for you!',14347,1,0,0,'jedoga SAY_SACRIFICE_2'), +(-1619022,'Glory to Yogg-Saron!',14348,1,0,0,'jedoga SAY_SLAY_1'), +(-1619023,'You are unworthy!',14349,1,0,0,'jedoga SAY_SLAY_2'), +(-1619024,'Get up! You haven\'t suffered enough.',14350,1,0,0,'jedoga SAY_SLAY_3'), +(-1619025,'Do not expect your sacrilege... to go unpunished.',14351,1,0,0,'jedoga SAY_DEATH'), +(-1619026,'The elements themselves will rise up against the civilized world! Only the faithful will be spared!',14352,1,0,0,'jedoga SAY_PREACHING_1'), +(-1619027,'Immortality can be yours. But only if you pledge yourself fully to Yogg-Saron!',14353,1,0,0,'jedoga SAY_PREACHING_2'), +(-1619028,'Here on the very borders of his domain. You will experience powers you would never have imagined! ',14354,1,0,0,'jedoga SAY_PREACHING_3'), +(-1619029,'You have traveled long and risked much to be here. Your devotion shall be rewarded.',14355,1,0,0,'jedoga SAY_PREACHING_4'), +(-1619030,'The faithful shall be exalted! But there is more work to be done. We will press on until all of Azeroth lies beneath his shadow!',14356,1,0,0,'jedoga SAY_PREACHING_5'), +(-1619031,'I have been chosen!',0,1,0,0,'jedoga SAY_VOLUNTEER_1'), +(-1619032,'I give myself to the master!',0,1,0,0,'jedoga SAY_VOLUNTEER_2'), + +(-1619033,'Shgla\'yos plahf mh\'naus.',14043,1,0,0,'volazj SAY_AGGRO'), +(-1619034,' ',14044,1,0,0,'volazj SAY_INSANITY'), +(-1619035,' ',14045,1,0,0,'volazj SAY_SLAY_1'), +(-1619036,' ',14046,1,0,0,'volazj SAY_SLAY_2'), +(-1619037,' ',14047,1,0,0,'volazj SAY_SLAY_3'), +(-1619038,' ',14048,1,0,0,'volazj SAY_DEATH_1'), +(-1619039,' ',14049,1,0,0,'volazj SAY_DEATH_2'); + +-- -1 999 900 EXAMPLE TEXT +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1999900,'Let the games begin.',8280,1,0,0,'example_creature SAY_AGGRO'), +(-1999901,'I see endless suffering. I see torment. I see rage. I see everything.',8831,1,0,0,'example_creature SAY_RANDOM_0'), +(-1999902,'Muahahahaha',8818,1,0,0,'example_creature SAY_RANDOM_1'), +(-1999903,'These mortal infedels my lord, they have invaded your sanctum and seek to steal your secrets.',8041,1,0,0,'example_creature SAY_RANDOM_2'), +(-1999904,'You are already dead.',8581,1,0,0,'example_creature SAY_RANDOM_3'), +(-1999905,'Where to go? What to do? So many choices that all end in pain, end in death.',8791,1,0,0,'example_creature SAY_RANDOM_4'), +(-1999906,'$N, I sentance you to death!',8588,1,0,0,'example_creature SAY_BESERK'), +(-1999907,'The suffering has just begun!',0,1,0,0,'example_creature SAY_PHASE'), +(-1999908,'I always thought I was a good dancer.',0,0,0,0,'example_creature SAY_DANCE'), +(-1999909,'Move out Soldier!',0,0,0,0,'example_creature SAY_SALUTE'), + +(-1999910,'Help $N! I\'m under attack!',0,0,0,0,'example_escort SAY_AGGRO1'), +(-1999911,'Die scum!',0,0,0,0,'example_escort SAY_AGGRO2'), +(-1999912,'Hmm a nice day for a walk alright',0,0,0,0,'example_escort SAY_WP_1'), +(-1999913,'Wild Felboar attack!',0,0,0,0,'example_escort SAY_WP_2'), +(-1999914,'Time for me to go! See ya around $N!',0,0,0,3,'example_escort SAY_WP_3'), +(-1999915,'Bye Bye!',0,0,0,3,'example_escort SAY_WP_4'), +(-1999916,'How dare you leave me like that! I hate you! =*(',0,3,0,0,'example_escort SAY_DEATH_1'), +(-1999917,'...no...how could you let me die $N',0,0,0,0,'example_escort SAY_DEATH_2'), +(-1999918,'ugh...',0,0,0,0,'example_escort SAY_DEATH_3'), +(-1999919,'Taste death!',0,0,0,0,'example_escort SAY_SPELL'), +(-1999920,'Fireworks!',0,0,0,0,'example_escort SAY_RAND_1'), +(-1999921,'Hmm, I think I could use a buff.',0,0,0,0,'example_escort SAY_RAND_2'), + +(-1999922,'Normal select, guess you\'re not interested.',0,0,0,0,'example_gossip_codebox SAY_NOT_INTERESTED'), +(-1999923,'Wrong!',0,0,0,0,'example_gossip_codebox SAY_WRONG'), +(-1999924,'You\'re right, you are allowed to see my inner secrets.',0,0,0,0,'example_gossip_codebox SAY_CORRECT'), + +(-1999925,'Hi!',0,0,0,0,'example_areatrigger SAY_HI'); + +-- +-- Below just for beautiful view in table, run at own desire +-- + +-- ALTER TABLE `script_texts` ORDER BY `entry` desc; + + +-- +-- Below contains all waypoints used by escortAI scripts +-- Entry is entry == creature_template.entry +-- + +DELETE FROM script_waypoint WHERE entry=467; +INSERT INTO script_waypoint VALUES +(467, 0, -10508.40, 1068.00, 55.21, 0, ''), +(467, 1, -10518.30, 1074.84, 53.96, 0, ''), +(467, 2, -10534.82, 1081.92, 49.88, 0, ''), +(467, 3, -10546.51, 1084.88, 50.13, 0, ''), +(467, 4, -10555.29, 1084.45, 45.75, 0, ''), +(467, 5, -10566.57, 1083.53, 42.10, 0, ''), +(467, 6, -10575.83, 1082.34, 39.46, 0, ''), +(467, 7, -10585.67, 1081.08, 37.77, 0, ''), +(467, 8, -10600.08, 1078.19, 36.23, 0, ''), +(467, 9, -10608.69, 1076.08, 35.88, 0, ''), +(467, 10, -10621.26, 1073.00, 35.40, 0, ''), +(467, 11, -10638.12, 1060.18, 33.61, 0, ''), +(467, 12, -10655.87, 1038.99, 33.48, 0, ''), +(467, 13, -10664.68, 1030.54, 32.70, 0, ''), +(467, 14, -10708.68, 1033.86, 33.32, 0, ''), +(467, 15, -10754.43, 1017.93, 32.79, 0, ''), +(467, 16, -10802.26, 1018.01, 32.16, 0, ''), +(467, 17, -10832.60, 1009.04, 32.71, 0, ''), +(467, 18, -10866.56, 1006.51, 31.71, 0, ''), +(467, 19, -10879.98, 1005.10, 32.84, 0, ''), +(467, 20, -10892.45, 1001.32, 34.46, 0, ''), +(467, 21, -10906.14, 997.11, 36.15, 0, ''), +(467, 22, -10922.26, 1002.23, 35.74, 0, ''), +(467, 23, -10936.32, 1023.38, 36.52, 0, ''), +(467, 24, -10933.35, 1052.61, 35.85, 0, ''), +(467, 25, -10940.25, 1077.66, 36.49, 0, ''), +(467, 26, -10957.09, 1099.33, 36.83, 0, ''), +(467, 27, -10956.53, 1119.90, 36.73, 0, ''), +(467, 28, -10939.30, 1150.75, 37.42, 0, ''), +(467, 29, -10915.14, 1202.09, 36.55, 0, ''), +(467, 30, -10892.59, 1257.03, 33.37, 0, ''), +(467, 31, -10891.93, 1306.66, 35.45, 0, ''), +(467, 32, -10896.17, 1327.86, 37.77, 0, ''), +(467, 33, -10906.03, 1368.05, 40.91, 0, ''), +(467, 34, -10910.18, 1389.33, 42.62, 0, ''), +(467, 35, -10915.42, 1417.72, 42.93, 0, ''), +(467, 36, -10926.37, 1421.18, 43.04, 0, 'walk here and say'), +(467, 37, -10952.31, 1421.74, 43.40, 0, ''), +(467, 38, -10980.04, 1411.38, 42.79, 0, ''), +(467, 39, -11006.06, 1420.47, 43.26, 0, ''), +(467, 40, -11021.98, 1450.59, 43.09, 0, ''), +(467, 41, -11025.36, 1491.59, 43.15, 0, ''), +(467, 42, -11036.09, 1508.32, 43.28, 0, ''), +(467, 43, -11060.68, 1526.72, 43.19, 0, ''), +(467, 44, -11072.75, 1527.77, 43.20, 5000, 'say and quest credit'); + +DELETE FROM script_waypoint WHERE entry=1978; +INSERT INTO script_waypoint VALUES +(1978, 0, 1406.32, 1083.10, 52.55, 0, ''), +(1978, 1, 1400.49, 1080.42, 52.50, 0, 'SAY_START_2'), +(1978, 2, 1388.48, 1083.10, 52.52, 0, ''), +(1978, 3, 1370.16, 1084.02, 52.30, 0, ''), +(1978, 4, 1359.02, 1080.85, 52.46, 0, ''), +(1978, 5, 1341.43, 1087.39, 52.69, 0, ''), +(1978, 6, 1321.93, 1090.51, 50.66, 0, ''), +(1978, 7, 1312.98, 1095.91, 47.49, 0, ''), +(1978, 8, 1301.09, 1102.94, 47.76, 0, ''), +(1978, 9, 1297.73, 1106.35, 50.18, 0, ''), +(1978, 10, 1295.49, 1124.32, 50.49, 0, ''), +(1978, 11, 1294.84, 1137.25, 51.75, 0, ''), +(1978, 12, 1292.89, 1158.99, 52.65, 0, ''), +(1978, 13, 1290.75, 1168.67, 52.56, 2000, 'quest complete SAY_END'), +(1978, 14, 1287.12, 1203.49, 52.66, 5000, 'SAY_RANE'), +(1978, 15, 1288.30, 1203.89, 52.68, 5000, 'SAY_RANE_REPLY'), +(1978, 16, 1288.30, 1203.89, 52.68, 5000, 'SAY_CHECK_NEXT'), +(1978, 17, 1290.72, 1207.44, 52.69, 0, ''), +(1978, 18, 1297.50, 1207.18, 53.74, 0, ''), +(1978, 19, 1301.32, 1220.90, 53.74, 0, ''), +(1978, 20, 1298.55, 1220.43, 53.74, 0, ''), +(1978, 21, 1297.38, 1212.87, 58.51, 0, ''), +(1978, 22, 1297.80, 1210.04, 58.51, 0, ''), +(1978, 23, 1305.01, 1206.10, 58.51, 0, ''), +(1978, 24, 1310.51, 1207.36, 58.51, 5000, 'SAY_QUINN'), +(1978, 25, 1312.59, 1207.21, 58.51, 5000, 'SAY_QUINN_REPLY'), +(1978, 26, 1312.59, 1207.21, 58.51, 30000, 'SAY_BYE'); + +DELETE FROM script_waypoint WHERE entry=2768; +INSERT INTO script_waypoint VALUES +(2768, 0, -2077.73, -2091.17, 9.49, 0, ''), +(2768, 1, -2077.99, -2105.33, 13.24, 0, ''), +(2768, 2, -2074.60, -2109.67, 14.24, 0, ''), +(2768, 3, -2076.60, -2117.46, 16.67, 0, ''), +(2768, 4, -2073.51, -2123.46, 18.42, 2000, ''), +(2768, 5, -2073.51, -2123.46, 18.42, 4000, ''), +(2768, 6, -2066.60, -2131.85, 21.56, 0, ''), +(2768, 7, -2053.85, -2143.19, 20.31, 0, ''), +(2768, 8, -2043.49, -2153.73, 20.20, 10000, ''), +(2768, 9, -2043.49, -2153.73, 20.20, 20000, ''), +(2768, 10, -2043.49, -2153.73, 20.20, 10000, ''), +(2768, 11, -2043.49, -2153.73, 20.20, 2000, ''), +(2768, 12, -2053.85, -2143.19, 20.31, 0, ''), +(2768, 13, -2066.60, -2131.85, 21.56, 0, ''), +(2768, 14, -2073.51, -2123.46, 18.42, 0, ''), +(2768, 15, -2076.60, -2117.46, 16.67, 0, ''), +(2768, 16, -2074.60, -2109.67, 14.24, 0, ''), +(2768, 17, -2077.99, -2105.33, 13.24, 0, ''), +(2768, 18, -2077.73, -2091.17, 9.49, 0, ''), +(2768, 19, -2066.41, -2086.21, 8.97, 6000, ''), +(2768, 20, -2066.41, -2086.21, 8.97, 2000, ''); + +DELETE FROM script_waypoint WHERE entry=2917; +INSERT INTO script_waypoint VALUES +(2917, 0, 4675.812500, 598.614563, 17.645658, 0, 'SAY_REM_START'), +(2917, 1, 4672.844238, 599.325378, 16.417622, 0, ''), +(2917, 2, 4663.449707, 607.430176, 10.494752, 0, ''), +(2917, 3, 4655.969238, 613.761353, 8.523270, 0, ''), +(2917, 4, 4640.804688, 623.999329, 8.377054, 0, ''), +(2917, 5, 4631.678711, 630.801086, 6.414999, 5000, 'SAY_REM_RAMP1_1'), +(2917, 6, 4633.533203, 632.476440, 6.509831, 0, 'ambush'), +(2917, 7, 4639.413574, 637.120789, 13.338119, 0, ''), +(2917, 8, 4642.352051, 637.668152, 13.437444, 0, ''), +(2917, 9, 4645.082031, 634.463989, 13.437208, 5000, 'SAY_REM_RAMP1_2'), +(2917, 10, 4642.345215, 637.584839, 13.435211, 0, ''), +(2917, 11, 4639.630859, 637.233765, 13.339752, 0, ''), +(2917, 12, 4633.363281, 632.462280, 6.488438, 0, ''), +(2917, 13, 4624.714844, 631.723511, 6.264030, 0, ''), +(2917, 14, 4623.525879, 629.718506, 6.201339, 5000, 'SAY_REM_BOOK'), +(2917, 15, 4623.452148, 630.369629, 6.218942, 0, 'SAY_REM_TENT1_1'), +(2917, 16, 4622.622070, 637.221558, 6.312845, 0, 'ambush'), +(2917, 17, 4619.755371, 637.386230, 6.312050, 5000, 'SAY_REM_TENT1_2'), +(2917, 18, 4620.027832, 637.367676, 6.312050, 0, ''), +(2917, 19, 4624.154785, 637.560303, 6.313898, 0, ''), +(2917, 20, 4622.967773, 634.016479, 6.294979, 0, ''), +(2917, 21, 4616.926758, 630.303284, 6.239193, 0, ''), +(2917, 22, 4614.546387, 616.983337, 5.687642, 0, ''), +(2917, 23, 4610.279297, 610.029419, 5.442539, 0, ''), +(2917, 24, 4601.149902, 604.111694, 2.054856, 0, ''), +(2917, 25, 4589.618164, 597.685730, 1.057147, 0, ''), +(2917, 26, 4577.588379, 592.145813, 1.120190, 0, 'SAY_REM_MOSS (?)'), +(2917, 27, 4569.848145, 592.177490, 1.260874, 5000, 'EMOTE_REM_MOSS (?)'), +(2917, 28, 4568.791992, 590.870911, 1.211338, 3000, 'SAY_REM_MOSS_PROGRESS (?)'), +(2917, 29, 4566.722656, 564.077881, 1.343084, 0, 'ambush'), +(2917, 30, 4568.269531, 551.958435, 5.004200, 0, ''), +(2917, 31, 4566.731934, 551.557861, 5.426314, 5000, 'SAY_REM_PROGRESS'), +(2917, 32, 4566.741699, 560.767639, 1.703257, 0, ''), +(2917, 33, 4573.916016, 582.566101, 0.749801, 0, ''), +(2917, 34, 4594.206055, 598.533020, 1.034056, 0, ''), +(2917, 35, 4601.194824, 604.283081, 2.060146, 0, ''), +(2917, 36, 4609.539551, 610.844727, 5.402220, 0, ''), +(2917, 37, 4624.800293, 618.076477, 5.851541, 0, ''), +(2917, 38, 4632.414063, 623.778442, 7.286243, 0, ''), +(2917, 39, 4645.915039, 621.983765, 8.579967, 0, ''), +(2917, 40, 4658.669922, 611.092651, 8.891747, 0, ''), +(2917, 41, 4671.924316, 599.752197, 16.01242, 5000, 'SAY_REM_REMEMBER'), +(2917, 42, 4676.976074, 600.649780, 17.82566, 5000, 'EMOTE_REM_END'); + +DELETE FROM script_waypoint WHERE entry=3439; +INSERT INTO script_waypoint VALUES +(3439, 0, 1105.090332, -3101.254150, 82.706, 1000, 'SAY_STARTUP1'), +(3439, 1, 1103.204468, -3104.345215, 83.113, 1000, ''), +(3439, 2, 1107.815186, -3106.495361, 82.739, 1000, ''), +(3439, 3, 1104.733276, -3100.830811, 82.747, 1000, ''), +(3439, 4, 1103.242554, -3106.270020, 83.133, 1000, ''), +(3439, 5, 1112.807373, -3106.285400, 82.320, 1000, ''), +(3439, 6, 1112.826782, -3108.908691, 82.377, 1000, ''), +(3439, 7, 1108.053955, -3115.156738, 82.894, 0, ''), +(3439, 8, 1108.355591, -3104.365234, 82.377, 5000, ''), +(3439, 9, 1100.306763, -3097.539063, 83.150, 0, 'SAY_STARTUP2'), +(3439, 10, 1100.562378, -3082.721924, 82.768, 0, ''), +(3439, 11, 1097.512939, -3069.226563, 82.206, 0, ''), +(3439, 12, 1092.964966, -3053.114746, 82.351, 0, ''), +(3439, 13, 1094.010986, -3036.958496, 82.888, 0, ''), +(3439, 14, 1095.623901, -3025.760254, 83.392, 0, ''), +(3439, 15, 1107.656494, -3013.530518, 85.653, 0, ''), +(3439, 16, 1119.647705, -3006.928223, 87.019, 0, ''), +(3439, 17, 1129.991211, -3002.410645, 91.232, 7000, 'SAY_MERCENARY'), +(3439, 18, 1133.328735, -2997.710693, 91.675, 1000, 'SAY_PROGRESS_1'), +(3439, 19, 1131.799316, -2987.948242, 91.976, 1000, ''), +(3439, 20, 1122.028687, -2993.397461, 91.536, 0, ''), +(3439, 21, 1116.614868, -2981.916748, 92.103, 0, ''), +(3439, 22, 1102.239136, -2994.245117, 92.074, 0, ''), +(3439, 23, 1096.366211, -2978.306885, 91.873, 0, ''), +(3439, 24, 1091.971558, -2985.919189, 91.730, 40000, 'SAY_PROGRESS_2'); + +DELETE FROM script_waypoint WHERE entry=3465; +INSERT INTO script_waypoint VALUES +(3465, 0, -2095.840820, -3650.001221, 61.716, 0, ''), +(3465, 1, -2100.193604, -3613.949219, 61.604, 0, ''), +(3465, 2, -2098.549561, -3601.557129, 59.154, 0, ''), +(3465, 3, -2093.796387, -3595.234375, 56.658, 0, ''), +(3465, 4, -2072.575928, -3578.827637, 48.844, 0, ''), +(3465, 5, -2023.858398, -3568.146240, 24.636, 0, ''), +(3465, 6, -2013.576416, -3571.499756, 22.203, 0, ''), +(3465, 7, -2009.813721, -3580.547852, 21.791, 0, ''), +(3465, 8, -2015.296021, -3597.387695, 21.760, 0, ''), +(3465, 9, -2020.677368, -3610.296143, 21.759, 0, ''), +(3465, 10, -2019.990845, -3640.155273, 21.759, 0, ''), +(3465, 11, -2016.110596, -3664.133301, 21.758, 0, ''), +(3465, 12, -1999.397095, -3679.435059, 21.316, 0, ''), +(3465, 13, -1987.455811, -3688.309326, 18.495, 0, ''), +(3465, 14, -1973.966553, -3687.666748, 14.996, 0, ''), +(3465, 15, -1949.163940, -3678.054932, 11.293, 0, ''), +(3465, 16, -1934.091187, -3682.859619, 9.897, 30000, 'SAY_GIL_AT_LAST'), +(3465, 17, -1935.383911, -3682.322021, 10.029, 1500, 'SAY_GIL_PROCEED'), +(3465, 18, -1879.039185, -3699.498047, 6.582, 7500, 'SAY_GIL_FREEBOOTERS'), +(3465, 19, -1852.728149, -3703.778809, 6.875, 0, ''), +(3465, 20, -1812.989990, -3718.500732, 10.572, 0, ''), +(3465, 21, -1788.171265, -3722.867188, 9.663, 0, ''), +(3465, 22, -1767.206665, -3739.923096, 10.082, 0, ''), +(3465, 23, -1750.194580, -3747.392090, 10.390, 0, ''), +(3465, 24, -1729.335571, -3776.665527, 11.779, 0, ''), +(3465, 25, -1715.997925, -3802.404541, 12.618, 0, ''), +(3465, 26, -1690.711548, -3829.262451, 13.905, 0, ''), +(3465, 27, -1674.700684, -3842.398682, 13.872, 0, ''), +(3465, 28, -1632.726318, -3846.109619, 14.401, 0, ''), +(3465, 29, -1592.734497, -3842.225342, 14.981, 0, ''), +(3465, 30, -1561.614746, -3839.320801, 19.118, 0, ''), +(3465, 31, -1544.567627, -3834.393311, 18.761, 0, ''), +(3465, 32, -1512.514404, -3831.715820, 22.914, 0, ''), +(3465, 33, -1486.889771, -3836.639893, 23.964, 0, ''), +(3465, 34, -1434.193604, -3852.702881, 18.843, 0, ''), +(3465, 35, -1405.794678, -3854.488037, 17.276, 0, ''), +(3465, 36, -1366.592041, -3852.383789, 19.273, 0, ''), +(3465, 37, -1337.360962, -3837.827148, 17.352, 2000, 'SAY_GIL_ALMOST'), +(3465, 38, -1299.744507, -3810.691406, 20.801, 0, ''), +(3465, 39, -1277.144409, -3782.785156, 25.918, 0, ''), +(3465, 40, -1263.686768, -3781.251953, 26.447, 0, ''), +(3465, 41, -1243.674438, -3786.328125, 25.281, 0, ''), +(3465, 42, -1221.875488, -3784.124512, 24.051, 0, ''), +(3465, 43, -1204.011230, -3775.943848, 24.437, 0, ''), +(3465, 44, -1181.706787, -3768.934082, 23.368, 0, ''), +(3465, 45, -1156.913818, -3751.559326, 21.074, 0, ''), +(3465, 46, -1138.830688, -3741.809326, 17.843, 0, ''), +(3465, 47, -1080.101196, -3738.780029, 19.805, 0, 'SAY_GIL_SWEET'), +(3465, 48, -1069.065186, -3735.006348, 19.302, 0, ''), +(3465, 49, -1061.941040, -3724.062256, 21.086, 0, ''), +(3465, 50, -1053.593262, -3697.608643, 27.320, 0, ''), +(3465, 51, -1044.110474, -3690.133301, 24.856, 0, ''), +(3465, 52, -1040.260986, -3690.739014, 25.342, 0, ''), +(3465, 53, -1028.146606, -3688.718750, 23.843, 7500, 'SAY_GIL_FREED'); + +DELETE FROM script_waypoint WHERE entry=3849; +INSERT INTO script_waypoint VALUES +(3849, 0, -250.923431, 2116.264160, 81.179, 0, 'SAY_FREE_AD'), +(3849, 1, -255.048538, 2119.392578, 81.179, 0, ''), +(3849, 2, -254.129105, 2123.454346, 81.179, 0, ''), +(3849, 3, -253.897552, 2130.873535, 81.179, 0, ''), +(3849, 4, -249.889435, 2142.307861, 86.972, 0, ''), +(3849, 5, -248.204926, 2144.017090, 87.013, 0, ''), +(3849, 6, -240.552826, 2140.552734, 87.012, 0, ''), +(3849, 7, -237.513916, 2142.066650, 87.012, 0, ''), +(3849, 8, -235.638138, 2149.231689, 90.587, 0, ''), +(3849, 9, -237.188019, 2151.946045, 90.624, 0, ''), +(3849, 10, -241.162064, 2153.649658, 90.624, 0, 'SAY_OPEN_DOOR_AD'), +(3849, 11, -241.129700, 2154.562988, 90.624, 5000, ''), +(3849, 12, -241.129700, 2154.562988, 90.624, 5000, 'SAY_POST1_DOOR_AD'), +(3849, 13, -241.129700, 2154.562988, 90.624, 25000, 'SAY_POST2_DOOR_AD'); + +DELETE FROM script_waypoint WHERE entry=3850; +INSERT INTO script_waypoint VALUES +(3850, 0, -241.816895, 2122.904053, 81.179, 0, 'SAY_FREE_AS'), +(3850, 1, -247.139297, 2124.886475, 81.179, 0, ''), +(3850, 2, -253.179184, 2127.406738, 81.179, 0, ''), +(3850, 3, -253.897552, 2130.873535, 81.179, 0, ''), +(3850, 4, -249.889435, 2142.307861, 86.972, 0, ''), +(3850, 5, -248.204926, 2144.017090, 87.013, 0, ''), +(3850, 6, -240.552826, 2140.552734, 87.012, 0, ''), +(3850, 7, -237.513916, 2142.066650, 87.012, 0, ''), +(3850, 8, -235.638138, 2149.231689, 90.587, 0, ''), +(3850, 9, -237.188019, 2151.946045, 90.624, 0, ''), +(3850, 10, -241.162064, 2153.649658, 90.624, 0, 'SAY_OPEN_DOOR_AS'), +(3850, 11, -241.129700, 2154.562988, 90.624, 5000, 'cast'), +(3850, 12, -241.129700, 2154.562988, 90.624, 5000, 'SAY_POST_DOOR_AS'), +(3850, 13, -241.129700, 2154.562988, 90.624, 25000, ''); + +DELETE FROM script_waypoint WHERE entry=4500; +INSERT INTO script_waypoint VALUES +(4500, 0, -3125.597168, -2885.673828, 34.731, 2500, ''), +(4500, 1, -3120.257080, -2877.830322, 34.917, 0, ''), +(4500, 2, -3116.487305, -2850.670410, 34.869, 0, ''), +(4500, 3, -3093.474854, -2819.189697, 34.432, 0, ''), +(4500, 4, -3104.726318, -2802.020996, 33.954, 0, ''), +(4500, 5, -3105.906006, -2780.234375, 34.469, 0, ''), +(4500, 6, -3116.080811, -2757.902588, 34.734, 0, ''), +(4500, 7, -3125.234375, -2733.960205, 33.189, 0, ''); + +DELETE FROM script_waypoint WHERE entry=4962; +INSERT INTO script_waypoint VALUES +(4962, 0, -3804.438965, -828.048035, 10.093068, 0, ''), +(4962, 1, -3803.934326, -835.772400, 10.077722, 0, ''), +(4962, 2, -3792.629150, -835.670898, 9.655657, 0, ''), +(4962, 3, -3772.433838, -835.345947, 10.868981, 0, ''), +(4962, 4, -3765.937256, -840.128601, 10.885593, 0, ''), +(4962, 5, -3738.633789, -830.997498, 11.057384, 0, ''), +(4962, 6, -3690.224121, -862.261597, 9.960449, 0, ''); + +DELETE FROM script_waypoint WHERE entry=4983; +INSERT INTO script_waypoint VALUES +(4983, 0, -3322.649414, -3124.631836, 33.842, 0, ''), +(4983, 1, -3326.336670, -3126.833496, 34.426, 0, ''), +(4983, 2, -3336.984131, -3129.611816, 30.692, 0, ''), +(4983, 3, -3342.598389, -3132.146729, 30.422, 0, ''), +(4983, 4, -3355.827881, -3140.947998, 29.534, 0, ''), +(4983, 5, -3365.828125, -3144.284180, 35.176, 0, ''), +(4983, 6, -3368.904541, -3147.265381, 36.091, 0, ''), +(4983, 7, -3369.355957, -3169.828857, 36.325, 0, ''), +(4983, 8, -3371.443359, -3183.905029, 33.454, 0, ''), +(4983, 9, -3373.824951, -3190.861084, 34.717, 5000, 'SAY_OGR_SPOT'), +(4983, 10, -3368.529785, -3198.210205, 34.926, 0, 'SAY_OGR_RET_WHAT'), +(4983, 11, -3366.265625, -3210.867676, 33.733, 5000, 'pause'), +(4983, 12, -3368.529785, -3198.210205, 34.926, 0, ''), +(4983, 13, -3373.824951, -3190.861084, 34.717, 0, ''), +(4983, 14, -3371.443359, -3183.905029, 33.454, 0, ''), +(4983, 15, -3369.355957, -3169.828857, 36.325, 0, ''), +(4983, 16, -3368.904541, -3147.265381, 36.091, 0, ''), +(4983, 17, -3365.828125, -3144.284180, 35.176, 0, ''), +(4983, 18, -3355.827881, -3140.947998, 29.534, 0, ''), +(4983, 19, -3342.598389, -3132.146729, 30.422, 0, ''), +(4983, 20, -3336.984131, -3129.611816, 30.692, 0, ''), +(4983, 21, -3326.336670, -3126.833496, 34.426, 0, ''), +(4983, 22, -3322.649414, -3124.631836, 33.842, 0, ''); + +DELETE FROM script_waypoint WHERE entry=6182; +INSERT INTO script_waypoint VALUES +(6182, 0, -11480.684570, 1545.091187, 49.898571, 0, ''), +(6182, 1, -11466.825195, 1530.151733, 50.263611, 0, ''), +(6182, 2, -11465.213867, 1528.343750, 50.954369, 0, 'entrance hut'), +(6182, 3, -11462.990234, 1525.235596, 50.937702, 0, ''), +(6182, 4, -11461.000000, 1526.614014, 50.937702, 5000, 'pick up rifle'), +(6182, 5, -11462.990234, 1525.235596, 50.937702, 0, ''), +(6182, 6, -11465.213867, 1528.343750, 50.954369, 0, ''), +(6182, 7, -11468.353516, 1535.075562, 50.400948, 15000, 'hold, prepare for wave1'), +(6182, 8, -11468.353516, 1535.075562, 50.400948, 15000, 'hold, prepare for wave2'), +(6182, 9, -11468.353516, 1535.075562, 50.400948, 10000, 'hold, prepare for wave3'), +(6182, 10, -11467.898438, 1532.459595, 50.348885, 0, 'we are done'), +(6182, 11, -11466.064453, 1529.855225, 50.209351, 0, ''), +(6182, 12, -11462.990234, 1525.235596, 50.937702, 0, ''), +(6182, 13, -11461.000000, 1526.614014, 50.937702, 5000, 'deliver rifle'), +(6182, 14, -11462.990234, 1525.235596, 50.937702, 0, ''), +(6182, 15, -11465.213867, 1528.343750, 50.954369, 0, ''), +(6182, 16, -11470.260742, 1537.276733, 50.378487, 0, ''), +(6182, 17, -11475.581055, 1548.678833, 50.184380, 0, 'complete quest'), +(6182, 18, -11482.299805, 1557.410034, 48.624519, 0, ''); + +DELETE FROM script_waypoint WHERE entry=6575; +INSERT INTO script_waypoint VALUES +(6575, 0, 1945.81, -431.54, 16.36, 0, ''), +(6575, 1, 1946.21, -436.41, 16.36, 0, ''), +(6575, 2, 1950.01, -444.11, 14.63, 0, ''), +(6575, 3, 1956.08, -449.34, 13.12, 0, ''), +(6575, 4, 1966.59, -450.55, 11.27, 0, ''), +(6575, 5, 1976.09, -447.51, 11.27, 0, ''), +(6575, 6, 1983.42, -435.85, 11.27, 0, ''), +(6575, 7, 1978.17, -428.81, 11.27, 0, ''), +(6575, 8, 1973.97, -422.08, 9.04, 0, ''), +(6575, 9, 1963.84, -418.90, 6.17, 0, ''), +(6575, 10, 1961.22, -422.74, 6.17, 0, ''), +(6575, 11, 1964.80, -431.26, 6.17, 300000, ''); + +DELETE FROM script_waypoint WHERE entry=7780; +INSERT INTO script_waypoint VALUES +(7780, 0, 261.058868, -2757.876221, 122.553, 0, ''), +(7780, 1, 259.812195, -2758.249023, 122.555, 0, 'SAY_RIN_FREE'), +(7780, 2, 253.823441, -2758.619141, 122.562, 0, ''), +(7780, 3, 241.394791, -2769.754883, 123.309, 0, ''), +(7780, 4, 218.915588, -2783.397461, 123.355, 0, ''), +(7780, 5, 209.088196, -2789.676270, 122.001, 0, ''), +(7780, 6, 204.453568, -2792.205811, 120.620, 0, ''), +(7780, 7, 182.012604, -2809.995361, 113.887, 0, 'summon'), +(7780, 8, 164.411591, -2825.162842, 107.779, 0, ''), +(7780, 9, 149.727600, -2833.704346, 106.224, 0, ''), +(7780, 10, 142.448074, -2838.807373, 109.665, 0, ''), +(7780, 11, 133.274963, -2845.135254, 112.606, 0, ''), +(7780, 12, 111.247459, -2861.065674, 116.305, 0, ''), +(7780, 13, 96.104073, -2874.886230, 114.397, 0, 'summon'), +(7780, 14, 73.369942, -2881.184570, 117.666, 0, ''), +(7780, 15, 58.579178, -2889.151611, 116.253, 0, ''), +(7780, 16, 33.214249, -2906.343994, 115.083, 0, ''), +(7780, 17, 19.586519, -2908.712402, 117.276, 7500, 'SAY_RIN_COMPLETE'), +(7780, 18, 10.282522, -2911.607422, 118.394, 0, ''), +(7780, 19, -37.580383, -2942.730225, 117.145, 0, ''), +(7780, 20, -68.599411, -2953.694824, 116.685, 0, ''), +(7780, 21, -102.054253, -2956.965576, 116.677, 0, ''), +(7780, 22, -135.993637, -2955.743652, 115.788, 0, ''), +(7780, 23, -171.561600, -2951.417480, 115.451, 0, ''); + +DELETE FROM script_waypoint WHERE entry=7784; +INSERT INTO script_waypoint VALUES +(7784, 0, -8845.65, -4373.98, 43.87, 5000, 'SAY_START'), +(7784, 1, -8840.79, -4373.73, 44.24, 0, ''), +(7784, 2, -8837.43, -4373.56, 45.60, 0, ''), +(7784, 3, -8832.74, -4373.32, 45.68, 0, ''), +(7784, 4, -8829.37, -4373.14, 44.33, 0, ''), +(7784, 5, -8817.38, -4372.41, 35.58, 0, ''), +(7784, 6, -8803.47, -4371.60, 30.34, 0, ''), +(7784, 7, -8795.10, -4365.61, 26.08, 0, ''), +(7784, 8, -8766.78, -4367.13, 25.15, 0, ''), +(7784, 9, -8755.63, -4367.54, 24.63, 0, ''), +(7784, 10, -8754.42, -4365.59, 24.15, 0, ''), +(7784, 11, -8728.82, -4353.13, 20.90, 0, ''), +(7784, 12, -8706.60, -4356.55, 17.93, 0, ''), +(7784, 13, -8679.00, -4380.23, 12.64, 0, ''), +(7784, 14, -8642.96, -4393.82, 12.52, 0, ''), +(7784, 15, -8611.19, -4399.11, 9.55, 0, ''), +(7784, 16, -8554.87, -4409.32, 13.05, 0, ''), +(7784, 17, -8531.64, -4411.96, 11.20, 0, ''), +(7784, 18, -8510.40, -4414.38, 12.84, 0, ''), +(7784, 19, -8476.92, -4418.34, 9.71, 0, ''), +(7784, 20, -8435.89, -4426.74, 9.67, 0, ''), +(7784, 21, -8381.89, -4446.40, 10.23, 0, ''), +(7784, 22, -8351.15, -4447.79, 9.99, 5000, 'first ambush SAY_AMBUSH'), +(7784, 23, -8324.18, -4445.05, 9.71, 0, ''), +(7784, 24, -8138.94, -4384.78, 10.92, 0, ''), +(7784, 25, -8036.87, -4443.38, 9.65, 0, ''), +(7784, 26, -7780.92, -4761.81, 9.50, 0, ''), +(7784, 27, -7587.67, -4765.01, 8.96, 0, ''), +(7784, 28, -7497.65, -4792.86, 10.01, 0, 'second ambush SAY_AMBUSH'), +(7784, 29, -7391.54, -4774.26, 12.44, 0, ''), +(7784, 30, -7308.42, -4739.87, 12.65, 0, ''), +(7784, 31, -7016.11, -4751.12, 10.06, 0, ''), +(7784, 32, -6985.52, -4777.41, 10.26, 0, ''), +(7784, 33, -6953.02, -4786.00, 6.32, 0, ''), +(7784, 34, -6940.37, -4831.03, 0.67, 10000, 'quest complete SAY_END'); + +DELETE FROM script_waypoint WHERE entry=7806; +INSERT INTO script_waypoint VALUES +(7806, 0, 495.404358, -3478.350830, 114.837, 0, ''), +(7806, 1, 492.704742, -3486.112549, 108.627, 0, ''), +(7806, 2, 487.249756, -3485.764404, 107.890, 0, ''), +(7806, 3, 476.851959, -3489.875977, 99.985, 0, ''), +(7806, 4, 467.212402, -3493.355469, 99.819, 0, ''), +(7806, 5, 460.017029, -3496.984375, 104.481, 0, ''), +(7806, 6, 439.619446, -3500.730225, 110.534, 0, ''), +(7806, 7, 428.326385, -3495.874756, 118.662, 0, ''), +(7806, 8, 424.664032, -3489.381592, 121.999, 0, ''), +(7806, 9, 424.137299, -3470.952637, 124.333, 0, ''), +(7806, 10, 421.791107, -3449.242676, 119.126, 0, ''), +(7806, 11, 404.247070, -3429.376953, 117.644, 0, ''), +(7806, 12, 335.465271, -3430.717773, 116.456, 0, ''), +(7806, 13, 317.160126, -3426.708984, 116.226, 0, ''), +(7806, 14, 331.180115, -3464.002197, 117.143, 0, ''), +(7806, 15, 336.393616, -3501.877441, 118.201, 0, ''), +(7806, 16, 337.251312, -3544.764648, 117.284, 0, ''), +(7806, 17, 337.748932, -3565.415527, 116.797, 0, ''), +(7806, 18, 336.010925, -3597.363037, 118.225, 0, ''), +(7806, 19, 324.619141, -3622.884033, 119.811, 0, ''), +(7806, 20, 308.027466, -3648.600098, 123.047, 0, ''), +(7806, 21, 276.325409, -3685.738525, 128.356, 0, ''), +(7806, 22, 239.981064, -3717.330811, 131.874, 0, ''), +(7806, 23, 224.950974, -3730.169678, 132.125, 0, ''), +(7806, 24, 198.707870, -3768.292725, 129.420, 0, ''), +(7806, 25, 183.758316, -3791.068848, 128.045, 0, ''), +(7806, 26, 178.110657, -3801.575439, 128.370, 3000, 'SAY_OOX_DANGER'), +(7806, 27, 162.215225, -3827.014160, 129.424, 0, ''), +(7806, 28, 141.664734, -3864.519287, 131.419, 0, ''), +(7806, 29, 135.301697, -3880.089111, 132.120, 0, ''), +(7806, 30, 122.461151, -3910.071533, 135.605, 0, ''), +(7806, 31, 103.376175, -3937.725098, 137.342, 0, ''), +(7806, 32, 81.414474, -3958.614258, 138.469, 0, ''), +(7806, 33, 55.378139, -3982.004639, 136.520, 0, ''), +(7806, 34, 13.983131, -4013.952881, 126.903, 0, ''), +(7806, 35, -21.658007, -4048.713623, 118.068, 0, ''), +(7806, 36, -52.443058, -4081.209717, 117.477, 0, ''), +(7806, 37, -102.710854, -4116.760742, 118.666, 0, ''), +(7806, 38, -92.996193, -4135.847168, 119.310, 0, ''), +(7806, 39, -86.391273, -4153.331055, 122.502, 0, ''), +(7806, 40, -85.746086, -4163.600586, 121.892, 0, ''), +(7806, 41, -90.544006, -4183.577637, 117.587, 0, ''), +(7806, 42, -110.223564, -4205.861328, 121.878, 0, ''), +(7806, 43, -115.257607, -4211.962402, 121.878, 3000, 'SAY_OOX_DANGER'), +(7806, 44, -128.594650, -4233.343750, 117.766, 0, ''), +(7806, 45, -135.358917, -4258.120117, 117.562, 0, ''), +(7806, 46, -156.832428, -4258.961914, 120.059, 0, ''), +(7806, 47, -167.119873, -4274.102539, 117.062, 0, ''), +(7806, 48, -176.291016, -4287.594727, 118.721, 0, ''), +(7806, 49, -196.992981, -4315.815430, 117.588, 0, ''), +(7806, 50, -209.329300, -4331.671387, 115.142, 0, ''), +(7806, 51, -232.292236, -4356.015625, 108.543, 0, ''), +(7806, 52, -232.159683, -4370.904297, 102.815, 0, ''), +(7806, 53, -210.271133, -4389.896973, 84.167, 0, ''), +(7806, 54, -187.940186, -4407.532715, 70.987, 0, ''), +(7806, 55, -181.353577, -4418.771973, 64.778, 0, ''), +(7806, 56, -170.529861, -4440.438965, 58.943, 0, ''), +(7806, 57, -141.428543, -4465.323242, 45.963, 0, ''), +(7806, 58, -120.993629, -4487.088379, 32.075, 0, ''), +(7806, 59, -104.134621, -4501.837402, 25.051, 0, ''), +(7806, 60, -84.154663, -4529.436523, 11.952, 0, ''), +(7806, 61, -88.698898, -4544.626465, 9.055, 0, ''), +(7806, 62, -100.603447, -4575.034180, 11.388, 0, ''), +(7806, 63, -106.908669, -4600.407715, 11.046, 0, ''), +(7806, 64, -106.831703, -4620.503418, 11.057, 3000, 'SAY_OOX_COMPLETE'); + +DELETE FROM script_waypoint WHERE entry=7807; +INSERT INTO script_waypoint VALUES +(7807, 0, -4943.74, 1715.74, 62.74, 0, 'SAY_START'), +(7807, 1, -4944.93, 1706.66, 63.16, 0, ''), +(7807, 2, -4942.82, 1690.22, 64.25, 0, ''), +(7807, 3, -4946.47, 1669.62, 63.84, 0, ''), +(7807, 4, -4955.93, 1651.88, 63.00, 0, ''), +(7807, 5, -4967.58, 1643.86, 64.31, 0, ''), +(7807, 6, -4978.12, 1607.90, 64.30, 0, ''), +(7807, 7, -4975.38, 1596.16, 64.70, 0, ''), +(7807, 8, -4972.82, 1581.89, 61.75, 0, ''), +(7807, 9, -4958.65, 1581.05, 61.81, 0, ''), +(7807, 10, -4936.72, 1594.89, 65.96, 0, ''), +(7807, 11, -4885.69, 1598.10, 67.45, 4000, 'first ambush SAY_AMBUSH'), +(7807, 12, -4874.20, 1601.73, 68.54, 0, ''), +(7807, 13, -4816.64, 1594.47, 78.20, 0, ''), +(7807, 14, -4802.20, 1571.92, 87.01, 0, ''), +(7807, 15, -4746.40, 1576.11, 84.59, 0, ''), +(7807, 16, -4739.72, 1707.16, 94.04, 0, ''), +(7807, 17, -4674.03, 1840.44, 89.17, 0, ''), +(7807, 18, -4667.94, 1864.11, 85.18, 0, ''), +(7807, 19, -4668.08, 1886.39, 81.14, 0, ''), +(7807, 20, -4679.43, 1932.32, 73.76, 0, ''), +(7807, 21, -4674.17, 1946.66, 70.83, 5000, 'second ambush SAY_AMBUSH'), +(7807, 22, -4643.94, 1967.45, 65.27, 0, ''), +(7807, 23, -4595.60, 2010.75, 52.10, 0, ''), +(7807, 24, -4562.65, 2029.28, 45.41, 0, ''), +(7807, 25, -4538.56, 2032.65, 45.28, 0, ''), +(7807, 26, -4531.96, 2034.15, 48.34, 0, ''), +(7807, 27, -4507.75, 2039.32, 51.57, 0, ''), +(7807, 28, -4482.74, 2045.67, 48.15, 0, ''), +(7807, 29, -4460.87, 2051.54, 45.55, 0, ''), +(7807, 30, -4449.97, 2060.03, 45.51, 10000, 'third ambush SAY_AMBUSH'), +(7807, 31, -4448.99, 2079.05, 44.64, 0, ''), +(7807, 32, -4436.64, 2134.48, 28.83, 0, ''), +(7807, 33, -4429.25, 2170.20, 15.44, 0, ''), +(7807, 34, -4424.83, 2186.11, 11.48, 0, ''), +(7807, 35, -4416.71, 2209.76, 7.36, 0, ''), +(7807, 36, -4405.25, 2231.77, 5.94, 0, ''), +(7807, 37, -4377.61, 2265.45, 06.71, 15000, 'complete quest SAY_END'); + +DELETE FROM script_waypoint WHERE entry=9503; +INSERT INTO script_waypoint VALUES +(9503, 0, 883.294861, -188.926300, -43.703655, 0,''), +(9503, 1, 872.763550, -185.605621, -43.703655, 5000,'b1'), +(9503, 2, 867.923401, -188.006393, -43.703655, 5000,'b2'), +(9503, 3, 863.295898, -190.795212, -43.703655, 5000,'b3'), +(9503, 4, 856.139587, -194.652756, -43.703655, 5000,'b4'), +(9503, 5, 851.878906, -196.928131, -43.703655, 15000,'b5'), +(9503, 6, 877.035217, -187.048080, -43.703655, 0,''), +(9503, 7, 891.198000, -197.924000, -43.620400, 0,'home'); + +DELETE FROM script_waypoint WHERE entry=9623; +INSERT INTO script_waypoint VALUES +(9623, 0, -6383.070801, -1964.368896, -258.709, 0, 'SAY_AME_START'), +(9623, 1, -6393.649414, -1949.572266, -261.449, 0, ''), +(9623, 2, -6397.846680, -1931.099609, -263.366, 0, ''), +(9623, 3, -6397.501953, -1921.470703, -263.876, 0, ''), +(9623, 4, -6389.630371, -1909.995361, -259.601, 0, ''), +(9623, 5, -6380.065430, -1905.452881, -255.858, 0, ''), +(9623, 6, -6373.437988, -1900.275024, -254.774, 0, ''), +(9623, 7, -6372.868652, -1893.500854, -255.678, 0, ''), +(9623, 8, -6379.730469, -1877.627808, -259.654, 0, ''), +(9623, 9, -6380.264160, -1871.139648, -260.617, 0, ''), +(9623, 10, -6373.830566, -1855.620361, -259.566, 0, ''), +(9623, 11, -6368.824707, -1847.770508, -259.246, 0, ''), +(9623, 12, -6370.902832, -1835.038940, -260.212, 0, ''), +(9623, 13, -6376.591309, -1821.592285, -260.856, 0, ''), +(9623, 14, -6381.931152, -1810.434326, -266.180, 0, ''), +(9623, 15, -6396.713867, -1807.123535, -269.329, 0, ''), +(9623, 16, -6400.266602, -1795.053589, -269.744, 0, ''), +(9623, 17, -6402.675781, -1747.514648, -272.961, 0, ''), +(9623, 18, -6396.997559, -1710.052979, -273.719, 0, ''), +(9623, 19, -6388.105957, -1676.328125, -272.133, 5000, 'SAY_AME_PROGRESS'), +(9623, 20, -6370.711914, -1638.638306, -272.031, 0, ''), +(9623, 21, -6366.709473, -1592.645996, -272.201, 0, ''), +(9623, 22, -6333.869629, -1534.598755, -270.493, 0, ''), +(9623, 23, -6305.362305, -1477.913330, -269.518, 0, ''), +(9623, 24, -6311.588867, -1419.017456, -267.622, 0, ''), +(9623, 25, -6330.014648, -1400.064331, -266.425, 0, ''), +(9623, 26, -6356.021973, -1392.607422, -267.123, 0, ''), +(9623, 27, -6370.859375, -1386.179321, -270.218, 0, ''), +(9623, 28, -6381.529785, -1369.780273, -272.110, 0, ''), +(9623, 29, -6405.381348, -1321.522827, -271.699, 0, ''), +(9623, 30, -6406.583496, -1307.574585, -271.802, 0, ''), +(9623, 31, -6386.325684, -1286.851074, -272.074, 0, ''), +(9623, 32, -6364.254883, -1264.706299, -269.075, 0, ''), +(9623, 33, -6343.636230, -1239.844360, -268.364, 0, ''), +(9623, 34, -6335.568848, -1202.449585, -271.515, 0, ''), +(9623, 35, -6325.625000, -1184.455322, -270.461, 0, ''), +(9623, 36, -6317.797363, -1177.668091, -269.792, 0, ''), +(9623, 37, -6303.024414, -1180.252686, -269.332, 0, 'SAY_AME_END'), +(9623, 38, -6301.975098, -1184.787842, -269.371, 1000, ''), +(9623, 39, -6297.575684, -1186.412964, -268.962, 5000, ''); + +DELETE FROM script_waypoint WHERE entry=10096; +INSERT INTO script_waypoint VALUES +(10096, 0, 604.802673, -191.081985, -54.058590, 0,'ring'), +(10096, 1, 604.072998, -222.106918, -52.743759, 0,'first gate'), +(10096, 2, 621.400391, -214.499054, -52.814453, 0,'hiding in corner'), +(10096, 3, 601.300781, -198.556992, -53.950256, 0,'ring'), +(10096, 4, 631.818359, -180.548126, -52.654770, 0,'second gate'), +(10096, 5, 627.390381, -201.075974, -52.692917, 0,'hiding in corner'); + +DELETE FROM script_waypoint WHERE entry=10427; +INSERT INTO script_waypoint VALUES +(10427, 0, -5185.463, -1185.927, 45.951, 0, ''), +(10427, 1, -5184.880, -1154.210, 45.035, 0, ''), +(10427, 2, -5175.880, -1126.526, 43.701, 0, ''), +(10427, 3, -5138.651, -1111.874, 44.024, 0, ''), +(10427, 4, -5134.728, -1104.796, 47.365, 0, ''), +(10427, 5, -5129.681, -1097.878, 49.449, 2500, ''), +(10427, 6, -5125.303, -1080.572, 47.033, 0, ''), +(10427, 7, -5146.668, -1053.694, 28.415, 0, ''), +(10427, 8, -5147.463, -1027.539, 13.818, 0, ''), +(10427, 9, -5139.238, -1018.889, 8.220, 0, ''), +(10427, 10, -5121.168, -1013.126, -0.619, 0, ''), +(10427, 11, -5091.919, -1014.205, -4.902, 0, ''), +(10427, 12, -5069.240, -994.299, -4.631, 0, ''), +(10427, 13, -5059.975, -944.112, -5.377, 0, ''), +(10427, 14, -5013.546, -906.184, -5.490, 0, ''), +(10427, 15, -4992.461, -920.983, -4.980, 5000, 'SAY_WYVERN'), +(10427, 16, -4976.355, -1002.997, -5.380, 0, ''), +(10427, 17, -4958.478, -1033.185, -5.433, 0, ''), +(10427, 18, -4953.353, -1052.211, -10.836, 0, ''), +(10427, 19, -4937.447, -1056.351, -22.139, 0, ''), +(10427, 20, -4908.455, -1050.433, -33.458, 0, ''), +(10427, 21, -4905.530, -1056.885, -33.722, 0, ''), +(10427, 22, -4920.830, -1073.284, -45.515, 0, ''), +(10427, 23, -4933.368, -1082.700, -50.186, 0, ''), +(10427, 24, -4935.313, -1092.353, -52.785, 0, ''), +(10427, 25, -4929.553, -1101.268, -50.637, 0, ''), +(10427, 26, -4920.679, -1100.028, -51.944, 10000, 'SAY_COMPLETE'), +(10427, 27, -4920.679, -1100.028, -51.944, 0, 'quest complete'); + +DELETE FROM script_waypoint WHERE entry=10638; +INSERT INTO script_waypoint VALUES +(10638, 0, -4903.521973, -1368.339844, -52.611, 5000, 'SAY_KAN_START'), +(10638, 1, -4906.004395, -1367.048096, -52.611, 0, ''); + +DELETE FROM script_waypoint WHERE entry=10646; +INSERT INTO script_waypoint VALUES +(10646, 0, -4792.401855, -2137.775146, 82.423, 0, ''), +(10646, 1, -4813.508301, -2141.543457, 80.774, 0, ''), +(10646, 2, -4828.630859, -2154.309814, 82.074, 0, ''), +(10646, 3, -4833.772949, -2149.182617, 81.676, 0, ''), +(10646, 4, -4846.418945, -2136.045410, 77.871, 0, ''), +(10646, 5, -4865.076660, -2116.549561, 76.483, 0, ''), +(10646, 6, -4888.434570, -2090.729248, 80.907, 0, ''), +(10646, 7, -4893.068359, -2085.468994, 82.094, 0, ''), +(10646, 8, -4907.256836, -2074.929932, 84.437, 5000, 'SAY_LAKO_LOOK_OUT'), +(10646, 9, -4899.899902, -2062.143555, 83.780, 0, ''), +(10646, 10, -4897.762207, -2056.520020, 84.184, 0, ''), +(10646, 11, -4888.331543, -2033.182495, 83.654, 0, ''), +(10646, 12, -4876.343750, -2003.916138, 90.887, 0, ''), +(10646, 13, -4872.227051, -1994.173340, 91.513, 0, ''), +(10646, 14, -4879.569336, -1976.985229, 92.185, 5000, 'SAY_LAKO_HERE_COME'), +(10646, 15, -4879.049316, -1964.349609, 92.001, 0, ''), +(10646, 16, -4874.720215, -1956.939819, 90.737, 0, ''), +(10646, 17, -4869.474609, -1952.612671, 89.206, 0, ''), +(10646, 18, -4842.466797, -1929.000732, 84.147, 0, ''), +(10646, 19, -4804.444824, -1897.302734, 89.362, 0, ''), +(10646, 20, -4798.072754, -1892.383545, 89.368, 0, ''), +(10646, 21, -4779.447754, -1882.759155, 90.169, 5000, 'SAY_LAKO_MORE'), +(10646, 22, -4762.081055, -1866.530640, 89.481, 0, ''), +(10646, 23, -4766.267090, -1861.867798, 87.847, 0, ''), +(10646, 24, -4782.929688, -1852.174683, 78.354, 0, ''), +(10646, 25, -4793.605469, -1850.961182, 77.658, 0, ''), +(10646, 26, -4803.323730, -1855.102661, 78.958, 0, ''), +(10646, 27, -4807.971680, -1854.501221, 77.743, 0, ''), +(10646, 28, -4837.212891, -1848.493408, 64.488, 0, ''), +(10646, 29, -4884.619629, -1840.401123, 56.219, 0, ''), +(10646, 30, -4889.705566, -1839.623291, 54.417, 0, ''), +(10646, 31, -4893.904297, -1843.685791, 53.012, 0, ''), +(10646, 32, -4903.142090, -1872.383545, 32.266, 0, ''), +(10646, 33, -4910.940918, -1879.864868, 29.940, 0, ''), +(10646, 34, -4920.047363, -1880.940796, 30.597, 0, ''), +(10646, 35, -4924.457031, -1881.447144, 29.292, 0, ''), +(10646, 36, -4966.120117, -1886.033081, 10.977, 0, ''), +(10646, 37, -4999.369629, -1890.847290, 4.430, 0, ''), +(10646, 38, -5007.271484, -1891.669678, 2.771, 0, ''), +(10646, 39, -5013.334473, -1879.588257, -1.947, 0, ''), +(10646, 40, -5023.328613, -1855.959961, -17.103, 0, ''), +(10646, 41, -5038.513184, -1825.986694, -35.821, 0, ''), +(10646, 42, -5048.733887, -1809.798218, -46.457, 0, ''), +(10646, 43, -5053.188965, -1791.682983, -57.186, 0, ''), +(10646, 44, -5062.093750, -1794.399780, -56.515, 0, ''), +(10646, 45, -5052.657227, -1797.044800, -54.734, 5000, 'SAY_LAKO_END'); + +DELETE FROM script_waypoint WHERE entry=11856; +INSERT INTO script_waypoint VALUES +(11856, 0, 113.91, -350.13, 4.55, 0, ''), +(11856, 1, 109.54, -350.08, 3.74, 0, ''), +(11856, 2, 106.95, -353.40, 3.60, 0, ''), +(11856, 3, 100.28, -338.89, 2.97, 0, ''), +(11856, 4, 110.11, -320.26, 3.47, 0, ''), +(11856, 5, 109.78, -287.80, 5.30, 0, ''), +(11856, 6, 105.02, -269.71, 4.71, 0, ''), +(11856, 7, 86.71, -251.81, 5.34, 0, ''), +(11856, 8, 64.10, -246.38, 5.91, 0, ''), +(11856, 9, -2.55, -243.58, 6.3, 0, ''), +(11856, 10, -27.78, -267.53, -1.08, 0, ''), +(11856, 11, -31.27, -283.54, -4.36, 0, ''), +(11856, 12, -28.96, -322.44, -9.19, 0, ''), +(11856, 13, -35.63, -360.03, -16.59, 0, ''), +(11856, 14, -58.30, -412.26, -30.60, 0, ''), +(11856, 15, -58.88, -474.17, -44.54, 0, ''), +(11856, 16, -45.92, -496.57, -46.26, 5000, 'AMBUSH'), +(11856, 17, -40.25, -510.07, -46.05, 0, ''), +(11856, 18, -38.88, -520.72, -46.06, 5000, 'END'); + +DELETE FROM script_waypoint WHERE entry=12423; +INSERT INTO script_waypoint VALUES +(12423, 0, -9509.72, -147.03, 58.74, 0, ''), +(12423, 1, -9517.07, -172.82, 58.66, 0, ''); + +DELETE FROM script_waypoint WHERE entry=12427; +INSERT INTO script_waypoint VALUES +(12427, 0, -5689.20, -456.44, 391.08, 0, ''), +(12427, 1, -5700.37, -450.77, 393.19, 0, ''); + +DELETE FROM script_waypoint WHERE entry=12428; +INSERT INTO script_waypoint VALUES +(12428, 0, 2454.09, 361.26, 31.51, 0, ''), +(12428, 1, 2472.03, 378.08, 30.98, 0, ''); + +DELETE FROM script_waypoint WHERE entry=12429; +INSERT INTO script_waypoint VALUES +(12429, 0, 9654.19, 909.58, 1272.11, 0, ''), +(12429, 1, 9642.53, 908.11, 1269.10, 0, ''); + +DELETE FROM script_waypoint WHERE entry=12430; +INSERT INTO script_waypoint VALUES +(12430, 0, 161.65, -4779.34, 14.64, 0, ''), +(12430, 1, 140.71, -4813.56, 17.04, 0, ''); + +DELETE FROM script_waypoint WHERE entry=12717; +INSERT INTO script_waypoint VALUES +(12717, 0, 3346.247070, 1007.879028, 3.590, 0, 'SAY_MUG_START2'), +(12717, 1, 3367.388428, 1011.505859, 3.720, 0, ''), +(12717, 2, 3418.636963, 1013.963684, 2.905, 0, ''), +(12717, 3, 3426.844971, 1015.097534, 3.449, 0, ''), +(12717, 4, 3437.025391, 1020.786194, 2.742, 0, ''), +(12717, 5, 3460.563721, 1024.256470, 1.353, 0, ''), +(12717, 6, 3479.869629, 1037.957153, 1.023, 0, ''), +(12717, 7, 3490.526367, 1043.346313, 3.338, 0, ''), +(12717, 8, 3504.282959, 1047.772339, 8.205, 0, ''), +(12717, 9, 3510.733398, 1049.790771, 12.143, 0, ''), +(12717, 10, 3514.411133, 1051.167725, 13.235, 0, ''), +(12717, 11, 3516.939697, 1052.911377, 12.918, 0, ''), +(12717, 12, 3523.635742, 1056.297485, 7.563, 0, ''), +(12717, 13, 3531.939941, 1059.863525, 6.175, 0, ''), +(12717, 14, 3535.475342, 1069.959473, 1.697, 0, ''), +(12717, 15, 3546.978027, 1093.485474, 0.680, 0, ''), +(12717, 16, 3549.729980, 1101.882446, -1.123, 0, ''), +(12717, 17, 3555.140137, 1116.985718, -4.326, 0, ''), +(12717, 18, 3571.940430, 1132.175781, -0.634, 0, ''), +(12717, 19, 3574.283203, 1137.575928, 3.684, 0, ''), +(12717, 20, 3579.312744, 1137.252319, 8.205, 0, ''), +(12717, 21, 3590.218994, 1143.646973, 8.291, 0, ''), +(12717, 22, 3595.972900, 1145.827148, 6.773, 0, ''), +(12717, 23, 3603.650391, 1146.920776, 9.763, 0, ''), +(12717, 24, 3607.081787, 1146.014282, 10.692, 5000, 'SAY_MUG_BRAZIER'), +(12717, 25, 3614.518555, 1142.629150, 10.248, 0, ''), +(12717, 26, 3616.660889, 1140.837036, 10.682, 3000, 'SAY_MUG_PATROL'), +(12717, 27, 3621.078613, 1138.109497, 10.369, 0, 'SAY_MUG_RETURN'), +(12717, 28, 3615.478516, 1145.525879, 9.614, 0, ''), +(12717, 29, 3607.188232, 1152.715942, 8.871, 0, ''); + +DELETE FROM script_waypoint WHERE entry=12818; +INSERT INTO script_waypoint VALUES +(12818, 0, 3347.250089, -694.700989, 159.925995, 0, ''), +(12818, 1, 3341.527039, -694.725891, 161.124542, 4000, ''), +(12818, 2, 3338.351074, -686.088138, 163.444000, 0, ''), +(12818, 3, 3352.744873, -677.721741, 162.316269, 0, ''), +(12818, 4, 3370.291016, -669.366943, 160.751358, 0, ''), +(12818, 5, 3381.479492, -659.449097, 162.545303, 0, ''), +(12818, 6, 3389.554199, -648.500000, 163.651825, 0, ''), +(12818, 7, 3396.645020, -641.508911, 164.216019, 0, ''), +(12818, 8, 3410.498535, -634.299622, 165.773453, 0, ''), +(12818, 9, 3418.461426, -631.791992, 166.477615, 0, ''), +(12818, 10, 3429.500000, -631.588745, 166.921265, 0, ''), +(12818, 11,3434.950195, -629.245483, 168.333969, 0, ''), +(12818, 12,3438.927979, -618.503235, 171.503143, 0, ''), +(12818, 13,3444.217529, -609.293640, 173.077972, 1000, 'Ambush 1'), +(12818, 14,3460.505127, -593.794189, 174.342255, 0, ''), +(12818, 15,3480.283203, -578.210327, 176.652313, 0, ''), +(12818, 16,3492.912842, -562.335449, 181.396301, 0, ''), +(12818, 17,3495.230957, -550.977600, 184.652267, 0, ''), +(12818, 18,3496.247070, -529.194214, 188.172028, 0, ''), +(12818, 19,3497.619385, -510.411499, 188.345322, 1000, 'Ambush 2'), +(12818, 20,3498.498047, -497.787506, 185.806274, 0, ''), +(12818, 21,3484.218750, -489.717529, 182.389862, 4000, ''); + +DELETE FROM script_waypoint WHERE entry=12858; +INSERT INTO script_waypoint VALUES +(12858, 0, 1782.63, -2241.11, 109.73, 5000, ''), +(12858, 1, 1788.88, -2240.17, 111.71, 0, ''), +(12858, 2, 1797.49, -2238.11, 112.31, 0, ''), +(12858, 3, 1803.83, -2232.77, 111.22, 0, ''), +(12858, 4, 1806.65, -2217.83, 107.36, 0, ''), +(12858, 5, 1811.81, -2208.01, 107.45, 0, ''), +(12858, 6, 1820.85, -2190.82, 100.49, 0, ''), +(12858, 7, 1829.60, -2177.49, 96.44, 0, ''), +(12858, 8, 1837.98, -2164.19, 96.71, 0, 'prepare'), +(12858, 9, 1839.99, -2149.29, 96.78, 0, ''), +(12858, 10, 1835.14, -2134.98, 96.80, 0, ''), +(12858, 11, 1823.57, -2118.27, 97.43, 0, ''), +(12858, 12, 1814.99, -2110.35, 98.38, 0, ''), +(12858, 13, 1806.60, -2103.09, 99.19, 0, ''), +(12858, 14, 1798.27, -2095.77, 100.04, 0, ''), +(12858, 15, 1783.59, -2079.92, 100.81, 0, ''), +(12858, 16, 1776.79, -2069.48, 101.77, 0, ''), +(12858, 17, 1776.82, -2054.59, 109.82, 0, ''), +(12858, 18, 1776.88, -2047.56, 109.83, 0, ''), +(12858, 19, 1776.86, -2036.55, 109.83, 0, ''), +(12858, 20, 1776.90, -2024.56, 109.83, 0, 'win'), +(12858, 21, 1776.87, -2028.31, 109.83,60000, 'stay'), +(12858, 22, 1776.90, -2028.30, 109.83, 0, ''); + +DELETE FROM script_waypoint WHERE entry=15420; +INSERT INTO script_waypoint VALUES +(15420, 0, 9294.78, -6682.51, 22.42, 0, ''), +(15420, 1, 9298.27, -6667.99, 22.42, 0, ''), +(15420, 2, 9309.63, -6658.84, 22.43, 0, ''), +(15420, 3, 9304.43, -6649.31, 26.46, 0, ''), +(15420, 4, 9298.83, -6648.00, 28.61, 0, ''), +(15420, 5, 9291.06, -6653.46, 31.83,2500, ''), +(15420, 6, 9289.08, -6660.17, 31.85,5000, ''), +(15420, 7, 9291.06, -6653.46, 31.83, 0, ''); + +DELETE FROM script_waypoint WHERE entry=16295; +INSERT INTO script_waypoint VALUES +(16295, 0, 7545.070000, -7359.870000, 162.354000, 4000, 'SAY_START'), +(16295, 1, 7550.048340, -7362.237793, 162.235657, 0, ''), +(16295, 2, 7566.976074, -7364.315430, 161.738770, 0, ''), +(16295, 3, 7578.830566, -7361.677734, 161.738770, 0, ''), +(16295, 4, 7590.969238, -7359.053711, 162.257660, 0, ''), +(16295, 5, 7598.354004, -7362.815430, 162.256683, 4000, 'SAY_PROGRESS_1'), +(16295, 6, 7605.861328, -7380.424316, 161.937073, 0, ''), +(16295, 7, 7605.295410, -7387.382813, 157.253998, 0, ''), +(16295, 8, 7606.131836, -7393.893555, 156.941925, 0, ''), +(16295, 9, 7615.207520, -7400.187012, 157.142639, 0, ''), +(16295, 10, 7618.956543, -7402.652832, 158.202042, 0, ''), +(16295, 11, 7636.850586, -7401.756836, 162.144791, 0, 'SAY_PROGRESS_2'), +(16295, 12, 7637.058105, -7404.944824, 162.206970, 4000, ''), +(16295, 13, 7636.910645, -7412.585449, 162.366425, 0, ''), +(16295, 14, 7637.607910, -7425.591797, 162.630661, 0, ''), +(16295, 15, 7637.816895, -7459.057129, 163.302704, 0, ''), +(16295, 16, 7638.859863, -7470.902344, 162.517059, 0, ''), +(16295, 17, 7641.395996, -7488.217285, 157.381287, 0, ''), +(16295, 18, 7634.455566, -7505.451660, 154.682159, 0, 'SAY_PROGRESS_3'), +(16295, 19, 7631.906738, -7516.948730, 153.597382, 0, ''), +(16295, 20, 7622.231445, -7537.037598, 151.587112, 0, ''), +(16295, 21, 7610.921875, -7550.670410, 149.639374, 0, ''), +(16295, 22, 7598.229004, -7562.551758, 145.953888, 0, ''), +(16295, 23, 7588.509277, -7577.755371, 148.294479, 0, ''), +(16295, 24, 7567.339355, -7608.456055, 146.006485, 0, ''), +(16295, 25, 7562.547852, -7617.417969, 148.097504, 0, ''), +(16295, 26, 7561.508789, -7645.064453, 151.245163, 0, ''), +(16295, 27, 7563.337402, -7654.652344, 151.227158, 0, ''), +(16295, 28, 7565.533691, -7658.296387, 151.248886, 0, ''), +(16295, 39, 7571.155762, -7659.118652, 151.244568, 0, ''), +(16295, 30, 7579.119629, -7662.213867, 151.651505, 0, 'quest complete'), +(16295, 31, 7603.768066, -7667.000488, 153.997726, 0, ''), +(16295, 32, 7603.768066, -7667.000488, 153.997726, 4000, 'SAY_END_1'), +(16295, 33, 7603.768066, -7667.000488, 153.997726, 8000, 'SAY_END_2'), +(16295, 34, 7603.768066, -7667.000488, 153.997726, 0, ''); + +DELETE FROM script_waypoint WHERE entry=16812; +INSERT INTO script_waypoint VALUES +(16812, 0, -10868.260, -1779.836, 90.476, 2500, 'Open door, begin walking'), +(16812, 1, -10875.585, -1779.581, 90.478, 0, ''), +(16812, 2, -10887.447, -1779.258, 90.476, 0, ''), +(16812, 3, -10894.592, -1780.668, 90.476, 0, ''), +(16812, 4, -10895.015, -1782.036, 90.476, 2500, 'Begin Speech after this'), +(16812, 5, -10894.592, -1780.668, 90.476, 0, 'Resume walking (back to spawn point now) after speech'), +(16812, 6, -10887.447, -1779.258, 90.476, 0, ''), +(16812, 7, -10875.585, -1779.581, 90.478, 0, ''), +(16812, 8, -10868.260, -1779.836, 90.476, 5000, 'close door'), +(16812, 9, -10866.799, -1780.958, 90.470, 2000, 'Summon mobs, open curtains'); + +DELETE FROM script_waypoint WHERE entry=16993; +INSERT INTO script_waypoint VALUES +(16993, 0, -1137.72, 4272.10, 14.04, 5000, ''), +(16993, 1, -1141.34, 4232.42, 14.63, 0, ''), +(16993, 2, -1133.47, 4220.88, 11.78, 0, ''), +(16993, 3, -1126.18, 4213.26, 13.51, 0, ''), +(16993, 4, -1100.12, 4204.32, 16.41, 0, ''), +(16993, 5, -1063.68, 4197.92, 15.51, 0, ''), +(16993, 6, -1027.28, 4194.36, 15.52, 0, ''), +(16993, 7, -995.68, 4189.59, 19.84, 0, ''), +(16993, 8, -970.90, 4188.60, 24.61, 0, ''), +(16993, 9, -961.93, 4193.34, 26.11, 15000, 'Summon 1'), +(16993, 10, -935.52, 4210.99, 31.98, 0, ''), +(16993, 11, -913.42, 4218.27, 37.29, 0, ''), +(16993, 12, -896.53, 4207.73, 43.23, 0, ''), +(16993, 13, -868.49, 4194.77, 46.75, 30000, 'Kneel and Rest Here'), +(16993, 14, -852.83, 4198.29, 47.28, 15000, 'Summon 2'), +(16993, 15, -819.85, 4200.50, 46.37, 0, ''), +(16993, 16, -791.92, 4201.96, 44.19, 0, ''), +(16993, 17, -774.42, 4202.46, 47.41, 0, ''), +(16993, 18, -762.90, 4202.17, 48.81, 0, ''), +(16993, 19, -728.25, 4195.35, 50.68, 0, ''), +(16993, 20, -713.58, 4192.07, 53.98, 0, ''), +(16993, 21, -703.09, 4189.74, 56.96, 0, ''), +(16993, 22, -693.70, 4185.43, 57.06, 0, ''), +(16993, 23, -686.38, 4159.81, 60.26, 0, ''), +(16993, 24, -679.88, 4147.04, 64.20, 0, ''), +(16993, 25, -656.74, 4147.72, 64.11, 0, ''), +(16993, 26, -652.22, 4137.50, 64.58, 0, ''), +(16993, 27, -649.99, 4136.38, 64.63, 30000, 'Quest Credit'); + +DELETE FROM script_waypoint WHERE entry=17077; +INSERT INTO script_waypoint VALUES +(17077, 0, -16.950142, 3801.409424, 95.064, 5000, 'EMOTE_WOLF_LIFT_HEAD'), +(17077, 1, -15.577404, 3805.170898, 94.833, 2500, ''), +(17077, 2, -20.011766, 3806.609863, 92.476, 5000, 'EMOTE_WOLF_HOWL'), +(17077, 3, -18.594666, 3816.207764, 91.482, 0, ''), +(17077, 4, -19.293468, 3838.218750, 85.012, 0, ''), +(17077, 5, -16.504408, 3871.034668, 82.327, 0, ''), +(17077, 6, 2.064510, 3898.678711, 85.623, 0, ''), +(17077, 7, 16.403864, 3921.174072, 86.024, 0, ''), +(17077, 8, 47.307926, 3932.001465, 83.302, 0, ''), +(17077, 9, 90.067230, 3942.906250, 77.000, 0, ''), +(17077, 10, 106.886024, 3944.388428, 76.502, 0, ''), +(17077, 11, 139.085480, 3941.897217, 80.617, 0, ''), +(17077, 12, 150.092346, 3942.782959, 80.399, 0, ''), +(17077, 13, 193.511475, 3950.396484, 74.366, 0, ''), +(17077, 14, 226.274948, 3958.003418, 73.257, 0, ''), +(17077, 15, 246.686981, 3963.309326, 76.376, 0, ''), +(17077, 16, 264.206177, 3977.726563, 83.704, 0, ''), +(17077, 17, 279.857422, 3986.417236, 88.245, 0, ''), +(17077, 18, 304.039642, 3998.354004, 95.649, 0, ''), +(17077, 19, 328.071503, 3995.832764, 104.434, 0, ''), +(17077, 20, 347.485229, 3990.817627, 113.608, 0, ''), +(17077, 21, 351.257202, 3954.260254, 125.747, 0, ''), +(17077, 22, 345.625977, 3932.016113, 132.358, 0, ''), +(17077, 23, 347.971893, 3908.549561, 135.520, 0, ''), +(17077, 24, 351.887878, 3891.062744, 139.957, 0, ''), +(17077, 25, 346.116852, 3864.634277, 146.647, 0, ''), +(17077, 26, 330.012360, 3839.859375, 154.148, 0, ''), +(17077, 27, 297.250610, 3811.855225, 166.893, 0, ''), +(17077, 28, 290.783112, 3800.188477, 172.130, 0, ''), +(17077, 29, 288.125427, 3782.474365, 180.825, 0, ''), +(17077, 30, 296.817841, 3771.629639, 184.961, 0, ''), +(17077, 31, 305.256256, 3765.380615, 185.360, 0, ''), +(17077, 32, 311.447906, 3757.902100, 184.312, 0, ''), +(17077, 33, 325.258026, 3730.282227, 184.076, 0, ''), +(17077, 34, 341.158630, 3717.757080, 183.904, 0, ''), +(17077, 35, 365.589020, 3717.200684, 183.902, 0, ''), +(17077, 36, 387.395081, 3731.750732, 183.645, 0, ''), +(17077, 37, 396.574127, 3732.604248, 179.831, 0, ''), +(17077, 38, 404.303192, 3737.313232, 180.151, 0, ''), +(17077, 39, 410.995972, 3742.286865, 183.364, 0, ''), +(17077, 40, 434.904541, 3761.058838, 186.219, 0, ''), +(17077, 41, 460.128815, 3774.436768, 186.348, 0, ''), +(17077, 42, 467.643951, 3788.506104, 186.446, 0, ''), +(17077, 43, 491.551666, 3815.446777, 189.848, 0, ''), +(17077, 44, 496.957855, 3836.875244, 193.078, 0, ''), +(17077, 45, 502.889191, 3855.458740, 194.834, 0, ''), +(17077, 46, 508.208466, 3863.689453, 194.024, 0, ''), +(17077, 47, 528.907593, 3887.348633, 189.762, 0, ''), +(17077, 48, 527.722229, 3890.686523, 189.240, 0, ''), +(17077, 49, 524.637329, 3891.768066, 189.149, 0, ''), +(17077, 50, 519.146057, 3886.701660, 190.128, 60000, 'SAY_WOLF_WELCOME'); + +DELETE FROM script_waypoint WHERE entry=17312; +INSERT INTO script_waypoint VALUES +(17312, 0, -4784.532227, -11051.060547, 3.484263, 0, ''), +(17312, 1, -4805.509277, -11037.293945, 3.043942, 0, ''), +(17312, 2, -4827.826172, -11034.398438, 1.741959, 0, ''), +(17312, 3, -4852.630859, -11033.695313, 2.208656, 0, ''), +(17312, 4, -4876.791992, -11034.517578, 3.175228, 0, ''), +(17312, 5, -4895.486816, -11038.306641, 9.390890, 0, ''), +(17312, 6, -4915.464844, -11048.402344, 12.369793, 0, ''), +(17312, 7, -4937.288086, -11067.041992, 13.857983, 0, ''), +(17312, 8, -4966.577637, -11067.507813, 15.754786, 0, ''), +(17312, 9, -4993.799805, -11056.544922, 19.175295, 0, ''), +(17312, 10, -5017.836426, -11052.569336, 22.476587, 0, ''), +(17312, 11, -5039.706543, -11058.459961, 25.831593, 0, ''), +(17312, 12, -5057.289063, -11045.474609, 26.972496, 0, ''), +(17312, 13, -5078.828125, -11037.601563, 29.053417, 0, ''), +(17312, 14, -5104.158691, -11039.195313, 29.440195, 0, ''), +(17312, 15, -5120.780273, -11039.518555, 30.142139, 0, ''), +(17312, 16, -5140.833008, -11039.810547, 28.788074, 0, ''), +(17312, 17, -5161.201660, -11040.050781, 27.879545, 4000, ''), +(17312, 18, -5171.842285, -11046.803711, 27.183821, 0, ''), +(17312, 19, -5185.995117, -11056.359375, 20.234867, 0, ''), +(17312, 20, -5198.485840, -11065.065430, 18.872593, 0, ''), +(17312, 21, -5214.062500, -11074.653320, 19.215731, 0, ''), +(17312, 22, -5220.157227, -11088.377930, 19.818476, 0, ''), +(17312, 23, -5233.652832, -11098.846680, 18.349432, 0, ''), +(17312, 24, -5250.163086, -11111.653320, 16.438959, 0, ''), +(17312, 25, -5268.194336, -11125.639648, 12.668313, 0, ''), +(17312, 26, -5286.270508, -11130.669922, 6.912246, 0, ''), +(17312, 27, -5317.449707, -11137.392578, 4.963446, 0, ''), +(17312, 28, -5334.854492, -11154.384766, 6.742664, 0, ''), +(17312, 29, -5353.874512, -11171.595703, 6.903912, 20000, ''), +(17312, 30, -5354.240000, -11171.940000, 6.890000, 0, ''); + +DELETE FROM script_waypoint WHERE entry=17876; +INSERT INTO script_waypoint VALUES +(17876, 0, 2230.91, 118.765, 82.2947,5000, ''), +(17876, 1, 2230.33, 114.980, 82.2946, 0, ''), +(17876, 2, 2233.36, 111.057, 82.2996, 0, ''), +(17876, 3, 2231.17, 108.486, 82.6624, 0, ''), +(17876, 4, 2220.22, 114.605, 89.4264, 0, ''), +(17876, 5, 2215.23, 115.990, 89.4549, 0, ''), +(17876, 6, 2210.00, 106.849, 89.4549, 0, ''), +(17876, 7, 2205.66, 105.234, 89.4549, 0, ''), +(17876, 8, 2192.26, 112.618, 89.4549, 0, 'spawn armorer'), +(17876, 9, 2181.28, 118.612, 89.4549,8000, 'get weapon'), +(17876, 10, 2181.62, 120.385, 89.4549,5000, 'get armor'), +(17876, 11, 2189.44, 113.922, 89.4549, 0, ''), +(17876, 12, 2195.63, 110.584, 89.4549, 0, ''), +(17876, 13, 2201.09, 115.115, 89.4549, 0, ''), +(17876, 14, 2204.34, 121.036, 89.4355, 0, ''), +(17876, 15, 2208.66, 129.127, 87.9560, 0, 'first ambush'), +(17876, 16, 2193.09, 137.940, 88.2164, 0, ''), +(17876, 17, 2173.39, 149.064, 87.9227, 0, ''), +(17876, 18, 2164.25, 137.965, 85.0595, 0, ''), +(17876, 19, 2149.31, 125.645, 77.0858, 0, ''), +(17876, 20, 2142.78, 127.173, 75.5954, 0, ''), +(17876, 21, 2139.28, 133.952, 73.6386, 0, 'second ambush'), +(17876, 22, 2139.54, 155.235, 67.1269, 0, ''), +(17876, 23, 2145.38, 167.551, 64.8974, 0, ''), +(17876, 24, 2134.28, 175.304, 67.9446, 0, ''), +(17876, 25, 2118.08, 187.387, 68.8141, 0, ''), +(17876, 26, 2105.88, 195.461, 65.1854, 0, 'third ambush'), +(17876, 27, 2096.77, 196.939, 65.2117, 0, ''), +(17876, 28, 2083.90, 209.395, 64.8736, 0, ''), +(17876, 29, 2067.84, 224.376, 64.8022,30000, 'meeting scarloc'), +(17876, 30, 2055.40, 242.90, 63.3418, 0, 'after skarloc'), +(17876, 31, 2039.20, 266.460, 63.0182,10000, 'mount up'), +(17876, 32, 2011.77, 278.478, 65.3388, 0, ''), +(17876, 33, 2005.08, 289.676, 66.1179, 0, ''), +(17876, 34, 2033.11, 337.450, 66.0948, 0, ''), +(17876, 35, 2070.30, 416.208, 66.0893, 0, ''), +(17876, 36, 2086.76, 469.768, 65.9182, 0, ''), +(17876, 37, 2101.70, 497.955, 61.7881, 0, 'road ambush'), +(17876, 38, 2133.39, 530.933, 55.3700,5000, ''), +(17876, 39, 2157.91, 559.635, 48.5157, 0, ''), +(17876, 40, 2167.34, 586.191, 42.4394, 0, ''), +(17876, 41, 2174.17, 637.643, 33.9002, 0, ''), +(17876, 42, 2179.31, 656.053, 34.723, 0, ''), +(17876, 43, 2183.65, 670.941, 34.0318, 0, ''), +(17876, 44, 2201.50, 668.616, 36.1236, 0, ''), +(17876, 45, 2221.56, 652.747, 36.6153, 0, ''), +(17876, 46, 2238.97, 640.125, 37.2214, 0, ''), +(17876, 47, 2251.17, 620.574, 40.1473, 0, ''), +(17876, 48, 2261.98, 595.303, 41.4117, 0, ''), +(17876, 49, 2278.67, 560.172, 38.9090, 0, ''), +(17876, 50, 2336.72, 528.327, 40.9369, 0, ''), +(17876, 51, 2381.04, 519.612, 37.7312, 0, ''), +(17876, 52, 2412.20, 515.425, 39.2068, 0, ''), +(17876, 53, 2452.39, 516.174, 42.9387, 0, ''), +(17876, 54, 2467.38, 539.389, 47.4992, 0, ''), +(17876, 55, 2470.70, 554.333, 46.6668, 0, ''), +(17876, 56, 2478.07, 575.321, 55.4549, 0, ''), +(17876, 57, 2480.00, 585.408, 56.6921, 0, ''), +(17876, 58, 2482.67, 608.817, 55.6643, 0, ''), +(17876, 59, 2485.62, 626.061, 58.0132, 2000, 'dismount'), +(17876, 60, 2486.91, 626.356, 58.0761, 0, 'scare horse'), +(17876, 61, 2488.58, 660.940, 57.3913, 0, ''), +(17876, 62, 2502.56, 686.059, 55.6252, 0, ''), +(17876, 63, 2502.08, 694.360, 55.5083, 0, ''), +(17876, 64, 2491.46, 694.321, 55.7163, 0, ''), +(17876, 65, 2491.10, 703.300, 55.7630, 0, ''), +(17876, 66, 2485.64, 702.992, 55.7917, 0, ''), +(17876, 67, 2479.10, 695.291, 55.7901, 10000, ''), +(17876, 68, 2476.75, 693.689, 55.7960, 0, 'spawn mobs'), +(17876, 69, 2475.39, 695.983, 55.8146, 0, ''), +(17876, 70, 2477.75, 694.473, 55.7945, 0, ''), +(17876, 71, 2481.27, 697.747, 55.7910, 0, 'mobs in doorway'), +(17876, 72, 2486.31, 703.131, 55.7861, 5000, ''), +(17876, 73, 2490.76, 703.511, 55.7662, 0, ''), +(17876, 74, 2491.30, 694.792, 55.7195, 0, ''), +(17876, 75, 2518.69, 693.876, 55.1383, 0, ''), +(17876, 76, 2531.33, 681.914, 55.1383, 0, ''), +(17876, 77, 2568.25, 682.654, 55.1778, 0, ''), +(17876, 78, 2589.61, 689.981, 55.1421, 0, ''), +(17876, 79, 2634.74, 679.833, 54.6613, 0, ''), +(17876, 80, 2630.41, 661.464, 54.2761, 0, ''), +(17876, 81, 2629.00, 656.982, 56.0651, 0, ''), +(17876, 82, 2620.84, 633.007, 56.0300, 3000, 'stop in church'), +(17876, 83, 2622.99, 639.178, 56.0300, 0, 'summon'), +(17876, 84, 2628.73, 656.693, 56.0610, 5000, ''), +(17876, 85, 2630.34, 661.135, 54.2738, 0, ''), +(17876, 86, 2635.38, 672.243, 54.4508, 0, ''), +(17876, 87, 2644.13, 668.158, 55.3797, 0, ''), +(17876, 88, 2646.82, 666.740, 56.9898, 0, ''), +(17876, 89, 2658.22, 665.432, 57.1725, 0, ''), +(17876, 90, 2661.88, 674.849, 57.1725, 0, ''), +(17876, 91, 2656.23, 677.208, 57.1725, 0, ''), +(17876, 92, 2652.28, 670.270, 61.9353, 0, ''), +(17876, 93, 2650.79, 664.290, 61.9302, 0, 'summon inn'), +(17876, 94, 2658.19, 660.454, 61.9320, 5000, ''), +(17876, 95, 2660.57, 659.173, 61.9370, 0, 'speak with Taretha'), +(17876, 96, 2658.19, 660.454, 61.9320, 5000, 'epoch calls'), +(17876, 97, 2659.84, 659.482, 61.9361, 5000, 'taretha "dies"'), +(17876, 98, 2654.28, 662.722, 61.9313, 0, ''), +(17876, 99, 2652.37, 670.561, 61.9368, 0, ''), +(17876, 100, 2656.05, 676.761, 57.1727, 0, ''), +(17876, 101, 2658.49, 677.166, 57.1727, 0, ''), +(17876, 102, 2659.28, 667.117, 57.1727, 0, ''), +(17876, 103, 2649.71, 665.387, 57.1727, 0, ''), +(17876, 104, 2634.79, 672.964, 54.4577, 0, 'outside inn'), +(17876, 105, 2635.06, 673.892, 54.4713, 30000, 'getting ready'), +(17876, 106, 2634.79, 672.964, 54.4577, 60000, 'when all dead and meet Taretha'), +(17876, 107, 2631.72, 665.629, 54.2923, 0, 'run off'), +(17876, 108, 2647.40, 640.530, 55.7634, 0, ''); + +DELETE FROM script_waypoint WHERE entry=17969; +INSERT INTO script_waypoint VALUES +(17969, 0, -930.048950, 5288.080078, 23.848402, 0, ''), +(17969, 1, -925.677917, 5296.482910, 18.183748, 0, ''), +(17969, 2, -924.297180, 5299.016113, 17.710915, 0, ''), +(17969, 3, -928.390076, 5317.022949, 18.208593, 0, ''), +(17969, 4, -930.620972, 5329.915039, 18.773422, 0, 'SAY_AMBUSH1'), +(17969, 5, -931.490295, 5357.654785, 18.027155, 0, 'SAY_PROGRESS'), +(17969, 6, -934.777771, 5369.341797, 22.278048, 0, ''), +(17969, 7, -934.521851, 5373.407227, 22.834690, 0, ''), +(17969, 8, -937.008545, 5382.980469, 22.699078, 0, ''), +(17969, 9, -941.948059, 5404.141602, 22.669743, 0, ''), +(17969, 10, -931.244263, 5415.846680, 23.063961, 0, 'at crossroad'), +(17969, 11, -901.497925, 5420.315430, 24.213270, 0, ''), +(17969, 12, -860.311707, 5415.617676, 23.671139, 0, ''), +(17969, 13, -777.988953, 5391.982422, 23.001669, 0, ''), +(17969, 14, -750.362000, 5385.786621, 22.765791, 0, ''), +(17969, 15, -731.339417, 5382.449707, 22.517065, 0, ''), +(17969, 16, -681.235901, 5381.377930, 22.050159, 2500, 'end bridge SAY_AMBUSH2'), +(17969, 17, -637.944458, 5384.338379, 22.205647, 0, 'SAY_END'), +(17969, 18, -608.954407, 5408.715332, 21.630386, 0, ''), +(17969, 19, -598.134277, 5413.608398, 21.412275, 0, ''), +(17969, 20, -571.268982, 5420.771973, 21.184925, 0, ''), +(17969, 21, -553.099915, 5424.616211, 21.193716, 0, ''), +(17969, 22, -524.745483, 5443.945313, 20.977013, 0, ''), +(17969, 23, -502.984985, 5446.283691, 22.149435, 0, ''), +(17969, 24, -472.463959, 5449.546875, 22.561453, 0, ''), +(17969, 25, -454.533264, 5461.302246, 22.602837, 30000, 'quest complete'); + +DELETE FROM script_waypoint WHERE entry=18210; +INSERT INTO script_waypoint VALUES +(18210, 0, -1581.410034, 8557.933594, 2.726, 0, ''), +(18210, 1, -1579.908447, 8553.716797, 2.559, 0, ''), +(18210, 2, -1577.829102, 8549.880859, 2.001, 0, ''), +(18210, 3, -1571.161987, 8543.494141, 2.001, 0, ''), +(18210, 4, -1563.944824, 8530.334961, 1.605, 0, ''), +(18210, 5, -1554.565552, 8518.413086, 0.364, 0, ''), +(18210, 6, -1549.239136, 8515.518555, 0.293, 0, ''), +(18210, 7, -1518.490112, 8516.771484, 0.683, 2000, 'SAY_MAG_MORE'), +(18210, 8, -1505.038940, 8513.247070, 0.672, 0, ''), +(18210, 9, -1476.161133, 8496.066406, 2.157, 0, ''), +(18210, 10, -1464.450684, 8492.601563, 3.529, 0, ''), +(18210, 11, -1457.568359, 8492.183594, 4.449, 0, ''), +(18210, 12, -1444.100342, 8499.031250, 6.177, 0, ''), +(18210, 13, -1426.472168, 8510.116211, 7.686, 0, ''), +(18210, 14, -1403.685303, 8524.146484, 9.680, 0, ''), +(18210, 15, -1384.890503, 8542.014648, 11.180, 0, ''), +(18210, 16, -1382.286133, 8539.869141, 11.139, 7500, 'SAY_MAG_COMPLETE'), +(18210, 17, -1361.224609, 8521.440430, 11.144, 0, ''), +(18210, 18, -1324.803589, 8510.688477, 13.050, 0, ''), +(18210, 19, -1312.075439, 8492.709961, 14.235, 0, ''); + +DELETE FROM script_waypoint WHERE entry=18731; +INSERT INTO script_waypoint VALUES +(18731, 0, -157.366, 2.177, 8.073, 0, ''), +(18731, 1, -172.266, -18.280, 8.073, 0, ''), +(18731, 2, -171.051, -38.748, 8.073, 0, ''), +(18731, 3, -170.718, -59.436, 8.073, 0, ''), +(18731, 4, -156.659, -72.118, 8.073, 0, ''), +(18731, 5, -142.292, -59.423, 8.073, 0, ''), +(18731, 6, -141.779, -38.972, 8.073, 0, ''), +(18731, 7, -142.922, -18.950, 8.073, 0, ''), +(18731, 8, -157.366, 2.177, 8.073, 0, ''); + +DELETE FROM script_waypoint WHERE entry=18887; +INSERT INTO script_waypoint VALUES +(18887, 0, 2650.06, 665.473, 61.9305, 0, ''), +(18887, 1, 2652.44, 670.761, 61.9370, 0, ''), +(18887, 2, 2655.96, 676.913, 57.1725, 0, ''), +(18887, 3, 2659.40, 677.317, 57.1725, 0, ''), +(18887, 4, 2651.75, 664.482, 57.1725, 0, ''), +(18887, 5, 2647.49, 666.595, 57.0824, 0, ''), +(18887, 6, 2644.37, 668.167, 55.4182, 0, ''), +(18887, 7, 2640.96, 669.890, 54.7567, 60000, ''); + +DELETE FROM script_waypoint WHERE entry=19685; +INSERT INTO script_waypoint VALUES +(19685, 0, -1860.536987, 5416.987793, -10.480, 2500, ''), +(19685, 1, -1855.899048, 5412.805664, -12.427, 0, 'SAY_KHAD_SERV_0'), +(19685, 2, -1845.518433, 5385.352539, -12.427, 0, ''), +(19685, 3, -1815.247803, 5340.255371, -12.427, 0, ''), +(19685, 4, -1799.338379, 5312.777344, -12.427, 0, ''), +(19685, 5, -1780.491455, 5278.535156, -33.877, 2500, 'pause'), +(19685, 6, -1776.057983, 5270.247559, -38.809, 0, ''), +(19685, 7, -1772.219727, 5262.777344, -38.810, 0, ''), +(19685, 8, -1762.195557, 5261.720215, -38.850, 0, ''), +(19685, 9, -1759.242798, 5259.751465, -40.208, 0, ''), +(19685, 10, -1743.427612, 5259.661621, -40.208, 0, ''), +(19685, 11, -1744.361816, 5251.179199, -44.523, 0, ''), +(19685, 12, -1740.121582, 5240.120117, -47.740, 0, ''), +(19685, 13, -1737.636719, 5238.288086, -49.793, 0, ''), +(19685, 14, -1727.411621, 5233.874512, -50.477, 0, ''), +(19685, 15, -1707.489746, 5230.437988, -51.050, 0, ''), +(19685, 16, -1684.122925, 5223.633301, -49.415, 0, ''), +(19685, 17, -1669.973267, 5221.929688, -46.336, 0, ''), +(19685, 18, -1662.870117, 5221.712891, -44.959, 0, ''), +(19685, 19, -1657.170410, 5225.206055, -45.708, 0, ''), +(19685, 20, -1645.025635, 5238.360352, -40.212, 0, ''), +(19685, 21, -1631.657471, 5252.759766, -40.962, 0, ''), +(19685, 22, -1631.368286, 5276.543945, -41.032, 0, ''), +(19685, 23, -1621.732544, 5298.553711, -40.209, 0, ''), +(19685, 24, -1615.498169, 5298.098145, -40.209, 2500, 'pause'), +(19685, 25, -1636.979370, 5302.677734, -40.209, 0, ''), +(19685, 26, -1655.330322, 5315.736328, -40.207, 0, ''), +(19685, 27, -1656.884155, 5321.649414, -40.209, 0, ''), +(19685, 28, -1663.975586, 5335.206055, -46.526, 0, ''), +(19685, 29, -1659.141602, 5359.131836, -45.846, 0, ''), +(19685, 30, -1644.207520, 5390.886230, -45.542, 0, ''), +(19685, 31, -1646.183594, 5405.273926, -44.649, 0, ''), +(19685, 32, -1650.202637, 5414.541992, -46.324, 0, ''), +(19685, 33, -1656.052490, 5424.683594, -40.461, 0, ''), +(19685, 34, -1661.628296, 5423.929199, -40.405, 0, ''), +(19685, 35, -1664.651855, 5423.659180, -38.848, 0, ''), +(19685, 36, -1681.772339, 5425.999512, -38.809, 0, ''), +(19685, 37, -1729.785767, 5427.246094, -12.445, 0, ''), +(19685, 38, -1735.371460, 5423.663086, -12.427, 0, ''), +(19685, 39, -1741.627075, 5386.767578, -12.427, 0, ''), +(19685, 40, -1764.786133, 5363.735840, -12.427, 0, ''), +(19685, 41, -1816.372314, 5340.664063, -12.427, 0, ''), +(19685, 42, -1880.022705, 5309.796387, -12.427, 0, ''), +(19685, 43, -1887.374146, 5315.426270, -12.427, 0, ''), +(19685, 44, -1888.768066, 5324.518066, -5.146, 0, ''), +(19685, 45, -1888.399170, 5334.149902, 0.151, 0, ''), +(19685, 46, -1890.221680, 5337.659668, 0.921, 0, ''), +(19685, 47, -1897.542725, 5323.042969, 1.256, 0, ''), +(19685, 48, -1900.250244, 5319.804688, 0.831, 0, ''), +(19685, 49, -1910.039673, 5291.258789, 1.288, 0, ''), +(19685, 50, -1915.219482, 5275.572266, 2.502, 2500, 'pause'), +(19685, 51, -1927.226196, 5273.250977, 2.703, 0, ''), +(19685, 52, -1926.980225, 5278.467285, 0.109, 0, ''), +(19685, 53, -1927.665894, 5299.210449, -12.427, 0, ''), +(19685, 54, -1922.841797, 5319.263672, -12.427, 0, ''), +(19685, 55, -1925.779053, 5347.405273, -12.427, 0, ''), +(19685, 56, -1954.912476, 5384.230957, -12.427, 0, ''), +(19685, 57, -1966.727295, 5428.203613, -12.427, 0, ''), +(19685, 58, -1979.477661, 5448.415527, -12.427, 0, ''), +(19685, 59, -1977.533569, 5453.861328, -12.385, 0, ''), +(19685, 60, -1968.064087, 5455.781250, -4.343, 0, ''), +(19685, 61, -1959.223145, 5454.895020, 0.202, 0, ''), +(19685, 62, -1954.629028, 5457.011230, 0.900, 0, ''), +(19685, 63, -1967.760010, 5464.953125, 1.220, 2500, 'pause'), +(19685, 64, -1952.874023, 5462.962402, 0.956, 0, ''), +(19685, 65, -1955.339478, 5467.116699, 0.445, 0, ''), +(19685, 66, -1962.033203, 5472.804688, -4.243, 0, ''), +(19685, 67, -1968.007690, 5480.914551, -12.427, 0, ''), +(19685, 68, -1945.900146, 5515.948242, -12.427, 0, ''), +(19685, 69, -1874.867310, 5549.783691, -12.427, 0, ''), +(19685, 70, -1840.641602, 5544.234375, -12.427, 0, ''), +(19685, 71, -1838.963501, 5536.059570, -5.639, 0, ''), +(19685, 72, -1839.582275, 5525.627930, 0.193, 0, ''), +(19685, 73, -1837.931763, 5521.119629, 0.844, 0, ''), +(19685, 74, -1829.182495, 5533.433594, 1.209, 2500, 'pause'), +(19685, 75, -1848.397095, 5476.073730, 0.856, 40000, 'end'); + +DELETE FROM script_waypoint WHERE entry=20129; +INSERT INTO script_waypoint VALUES +(20129, 0, -8374.93,-4250.21, -204.38,5000, ''), +(20129, 1, -8374.93,-4250.21, -204.38,16000, ''), +(20129, 2, -8374.93,-4250.21, -204.38,10000, ''), +(20129, 3, -8374.93,-4250.21, -204.38,2000, ''), +(20129, 4, -8439.40,-4180.05, -209.25, 0, ''), +(20129, 5, -8437.82,-4120.84, -208.59,10000, ''), +(20129, 6, -8437.82,-4120.84, -208.59,16000, ''), +(20129, 7, -8437.82,-4120.84, -208.59,13000, ''), +(20129, 8, -8437.82,-4120.84, -208.59,18000, ''), +(20129, 9, -8437.82,-4120.84, -208.59,15000, ''), +(20129, 10, -8437.82,-4120.84, -208.59,2000, ''), +(20129, 11, -8467.26,-4198.63, -214.21, 0, ''), +(20129, 12, -8667.76,-4252.13, -209.56, 0, ''), +(20129, 13, -8703.71,-4234.58, -209.5,14000, ''), +(20129, 14, -8703.71,-4234.58, -209.5,2000, ''), +(20129, 15, -8642.81,-4304.37, -209.57, 0, ''), +(20129, 16, -8649.06,-4394.36, -208.46,6000, ''), +(20129, 17, -8649.06,-4394.36, -208.46,18000, ''), +(20129, 18, -8649.06,-4394.36, -208.46,2000, ''), +(20129, 19, -8468.72,-4437.67, -215.45, 0, ''), +(20129, 20, -8427.54,-4426, -211.13, 0, ''), +(20129, 21, -8364.83,-4393.32, -205.91, 0, ''), +(20129, 22, -8304.54,-4357.2, -208.2,18000, ''), +(20129, 23, -8304.54,-4357.2, -208.2,2000, ''), +(20129, 24, -8375.42,-4250.41, -205.14,5000, ''), +(20129, 25, -8375.42,-4250.41, -205.14,5000, ''); + +DELETE FROM script_waypoint WHERE entry=21027; +INSERT INTO script_waypoint VALUES +(21027, 0, -2714.697266, 1326.879395, 34.306953, 0, ''), +(21027, 1, -2666.364990, 1348.222656, 34.445557, 0, ''), +(21027, 2, -2693.789307, 1336.964966, 34.445557, 0, ''), +(21027, 3, -2715.495361, 1328.054443, 34.106014, 0, ''), +(21027, 4, -2742.530762, 1314.138550, 33.606144, 0, ''), +(21027, 5, -2745.077148, 1311.108765, 33.630898, 0, ''), +(21027, 6, -2749.855225, 1302.737915, 33.475632, 0, ''), +(21027, 7, -2753.639648, 1294.059448, 33.314930, 0, ''), +(21027, 8, -2756.796387, 1285.122192, 33.391262, 0, ''), +(21027, 9, -2750.042969, 1273.661987, 33.188259, 0, ''), +(21027, 10, -2740.378418, 1258.846680, 33.212521, 0, ''), +(21027, 11, -2733.629395, 1248.259766, 33.640598, 0, ''), +(21027, 12, -2727.212646, 1238.606445, 33.520847, 0, ''), +(21027, 13, -2726.377197, 1237.264526, 33.461823, 3000, 'SAY_WIL_PROGRESS1'), +(21027, 14, -2746.383301, 1266.390625, 33.191952, 2000, ''), +(21027, 15, -2746.383301, 1266.390625, 33.191952, 4000, 'SAY_WIL_FIND_EXIT'), +(21027, 16, -2758.927734, 1285.134155, 33.341728, 0, ''), +(21027, 17, -2761.845703, 1292.313599, 33.209042, 0, ''), +(21027, 18, -2758.871826, 1300.677612, 33.285332, 0, ''), +(21027, 19, -2753.928955, 1307.755859, 33.452457, 0, ''), +(21027, 20, -2738.612061, 1316.191284, 33.482975, 0, ''), +(21027, 21, -2727.897461, 1320.013916, 33.381111, 0, ''), +(21027, 22, -2709.458740, 1315.739990, 33.301838, 0, ''), +(21027, 23, -2704.658936, 1301.620361, 32.463303, 0, ''), +(21027, 24, -2704.120117, 1298.922607, 32.768162, 0, ''), +(21027, 25, -2691.798340, 1292.846436, 33.852642, 0, ''), +(21027, 26, -2682.879639, 1288.853882, 32.995399, 0, ''), +(21027, 27, -2661.869141, 1279.682495, 26.686783, 0, ''), +(21027, 28, -2648.943604, 1270.272827, 24.147522, 0, ''), +(21027, 29, -2642.506836, 1262.938721, 23.512444, 0, ''), +(21027, 30, -2636.984863, 1252.429077, 20.418257, 0, ''), +(21027, 31, -2648.113037, 1224.984863, 8.691818, 0, ''), +(21027, 32, -2658.393311, 1200.136719, 5.492243, 0, ''), +(21027, 33, -2668.504395, 1190.450562, 3.127407, 0, ''), +(21027, 34, -2685.930420, 1174.360840, 5.163924, 0, ''), +(21027, 35, -2701.613770, 1160.026367, 5.611311, 0, ''), +(21027, 36, -2714.659668, 1149.980347, 4.342373, 0, ''), +(21027, 37, -2721.443359, 1145.002808, 1.913474, 0, ''), +(21027, 38, -2733.962158, 1143.436279, 2.620415, 0, ''), +(21027, 39, -2757.876709, 1146.937500, 6.184002, 2000, 'SAY_WIL_JUST_AHEAD'), +(21027, 40, -2772.300537, 1166.052734, 6.331811, 0, ''), +(21027, 41, -2790.265381, 1189.941650, 5.207958, 0, ''), +(21027, 42, -2805.448975, 1208.663940, 5.557623, 0, ''), +(21027, 43, -2820.617676, 1225.870239, 6.266103, 0, ''), +(21027, 44, -2831.926758, 1237.725830, 5.808506, 0, ''), +(21027, 45, -2842.578369, 1252.869629, 6.807481, 0, ''), +(21027, 46, -2846.344971, 1258.727295, 7.386168, 0, ''), +(21027, 47, -2847.556396, 1266.771729, 8.208790, 0, ''), +(21027, 48, -2841.654541, 1285.809204, 7.933223, 0, ''), +(21027, 49, -2841.754883, 1289.832520, 6.990304, 0, ''), +(21027, 50, -2871.398438, 1302.348145, 6.807335, 7500, 'SAY_WIL_END'); + +DELETE FROM script_waypoint WHERE entry=22377; +INSERT INTO script_waypoint VALUES +(22377, 0, -2770.457520, 5418.410645, -34.538, 0, ''), +(22377, 1, -2778.180420, 5416.253906, -34.538, 0, ''), +(22377, 2, -2816.960449, 5414.944336, -34.529, 0, ''), +(22377, 3, -2827.533203, 5414.737305, -28.265, 0, ''), +(22377, 4, -2841.610596, 5413.021973, -28.261, 0, ''), +(22377, 5, -2863.605957, 5411.964355, -28.262, 1000, 'SAY_AKU_AMBUSH_A'), +(22377, 6, -2874.559570, 5413.799316, -28.260, 0, ''), +(22377, 7, -2878.775879, 5413.812012, -28.261, 0, ''), +(22377, 8, -2892.586914, 5413.478516, -18.784, 0, ''), +(22377, 9, -2896.040527, 5413.137207, -18.589, 0, ''), +(22377, 10, -2896.318848, 5409.431641, -18.450, 0, ''), +(22377, 11, -2895.997803, 5396.909668, -8.855, 0, ''), +(22377, 12, -2895.734131, 5386.623535, -9.260, 0, ''), +(22377, 13, -2895.318359, 5367.613281, -9.456, 0, ''), +(22377, 14, -2890.306641, 5353.883301, -11.280, 1000, 'SAY_AKU_AMBUSH_B'), +(22377, 15, -2880.419189, 5334.625977, -10.629, 0, ''), +(22377, 16, -2866.394043, 5314.253906, -9.678, 0, ''), +(22377, 17, -2864.753174, 5277.734375, -11.087, 0, ''), +(22377, 18, -2856.330322, 5255.902344, -11.496, 5000, 'SAY_AKU_COMPLETE'); + +DELETE FROM script_waypoint WHERE entry=22458; +INSERT INTO script_waypoint VALUES +(22458, 0, -3739.907959, 5393.691895, -4.213, 5000, 'SAY_LE_KEEP_SAFE'), +(22458, 1, -3733.334229, 5389.243164, -5.331, 0, ''), +(22458, 2, -3728.771729, 5385.649414, -3.704, 0, ''), +(22458, 3, -3717.267090, 5379.179199, -4.400, 0, ''), +(22458, 4, -3705.626465, 5379.261719, -7.711, 0, ''), +(22458, 5, -3688.279541, 5379.716309, -9.400, 0, ''), +(22458, 6, -3649.186523, 5389.111816, -11.917, 0, ''), +(22458, 7, -3612.791504, 5392.812500, -13.655, 0, ''), +(22458, 8, -3574.865479, 5412.704590, -16.543, 0, ''), +(22458, 9, -3564.438232, 5422.615723, -16.104, 0, ''), +(22458, 10, -3553.387695, 5444.732910, -12.184, 2500, 'arivve dig site SAY_LE_ARRIVE'), +(22458, 11, -3557.291016, 5465.319336, -9.282, 7500, 'dig 1'), +(22458, 12, -3548.102051, 5453.417969, -12.282, 10000, 'dig 2 SAY_LE_BURIED pause'), +(22458, 13, -3556.580322, 5446.475098, -11.920, 0, 'start returning'), +(22458, 14, -3564.438232, 5422.615723, -16.104, 0, ''), +(22458, 15, -3574.865479, 5412.704590, -16.543, 0, ''), +(22458, 16, -3612.791504, 5392.812500, -13.655, 0, ''), +(22458, 17, -3649.186523, 5389.111816, -11.917, 0, ''), +(22458, 18, -3688.279541, 5379.716309, -9.400, 0, ''), +(22458, 19, -3705.626465, 5379.261719, -7.711, 0, ''), +(22458, 20, -3717.267090, 5379.179199, -4.400, 0, ''), +(22458, 21, -3728.771729, 5385.649414, -3.704, 0, ''), +(22458, 22, -3733.334229, 5389.243164, -5.331, 0, ''), +(22458, 23, -3739.907959, 5393.691895, -4.213, 0, ''); + +DELETE FROM script_waypoint WHERE entry=22916; +INSERT INTO script_waypoint VALUES +(22916, 0, 7461.49, -3121.06, 438.210, 7000, 'SAY_START'), +(22916, 1, 7465.26, -3115.50, 439.315, 0, ''), +(22916, 2, 7470.03, -3109.29, 439.333, 0, ''), +(22916, 3, 7473.77, -3104.65, 442.366, 0, ''), +(22916, 4, 7478.67, -3098.55, 443.551, 0, ''), +(22916, 5, 7482.78, -3093.35, 441.883, 0, ''), +(22916, 6, 7486.23, -3089.19, 439.698, 0, ''), +(22916, 7, 7484.64, -3084.55, 439.566, 0, ''), +(22916, 8, 7477.09, -3084.43, 442.132, 0, ''), +(22916, 9, 7470.66, -3084.86, 443.194, 0, ''), +(22916, 10, 7456.51, -3085.83, 438.863, 0, ''), +(22916, 11, 7446.00, -3085.59, 438.210, 0, ''), +(22916, 12, 7444.60, -3084.10, 438.323, 0, ''), +(22916, 13, 7445.58, -3080.92, 439.374, 5000, 'collect 1'), +(22916, 14, 7446.18, -3085.36, 438.210, 5000, 'SAY_RELIC1'), +(22916, 15, 7453.90, -3086.69, 439.454, 0, ''), +(22916, 16, 7459.41, -3085.50, 439.158, 0, ''), +(22916, 17, 7465.90, -3085.01, 442.329, 0, ''), +(22916, 18, 7472.80, -3084.81, 443.085, 0, ''), +(22916, 19, 7480.58, -3084.56, 440.642, 0, ''), +(22916, 20, 7484.59, -3084.71, 439.568, 0, ''), +(22916, 21, 7491.81, -3090.55, 440.052, 0, ''), +(22916, 22, 7497.13, -3095.34, 437.505, 0, ''), +(22916, 23, 7496.61, -3113.62, 434.554, 0, ''), +(22916, 24, 7501.79, -3123.79, 435.347, 0, ''), +(22916, 25, 7506.60, -3130.78, 434.179, 0, ''), +(22916, 26, 7504.53, -3133.46, 435.579, 5000, 'collect 2'), +(22916, 27, 7505.20, -3130.03, 434.151, 15000, 'SAY_RELIC2'), +(22916, 28, 7502.04, -3124.44, 435.298, 0, ''), +(22916, 29, 7495.90, -3113.93, 434.538, 0, ''), +(22916, 30, 7488.79, -3111.10, 434.310, 0, ''), +(22916, 31, 7477.81, -3105.37, 430.541, 0, 'summon'), +(22916, 32, 7471.49, -3092.55, 429.006, 0, ''), +(22916, 33, 7472.35, -3062.72, 428.341, 0, ''), +(22916, 34, 7472.26, -3054.92, 427.150, 0, ''), +(22916, 35, 7475.03, -3053.39, 428.672, 5000, 'collect 3'), +(22916, 36, 7472.40, -3057.21, 426.870, 5000, 'SAY_RELIC3'), +(22916, 37, 7472.39, -3062.86, 428.301, 0, ''), +(22916, 38, 7470.24, -3087.69, 429.045, 0, ''), +(22916, 39, 7475.24, -3099.03, 429.917, 0, ''), +(22916, 40, 7484.24, -3109.85, 432.719, 0, ''), +(22916, 41, 7489.10, -3111.31, 434.400, 0, ''), +(22916, 42, 7497.02, -3108.54, 434.798, 0, ''), +(22916, 43, 7497.75, -3097.70, 437.031, 0, ''), +(22916, 44, 7492.53, -3090.12, 440.041, 0, ''), +(22916, 45, 7490.43, -3085.44, 439.807, 0, ''), +(22916, 46, 7501.02, -3069.70, 441.875, 0, ''), +(22916, 47, 7509.15, -3064.67, 445.012, 0, ''), +(22916, 48, 7515.78, -3060.16, 445.727, 0, ''), +(22916, 49, 7516.46, -3058.11, 445.682, 10000, 'quest credit'); + +DELETE FROM script_waypoint WHERE entry=23002; +INSERT INTO script_waypoint VALUES +(23002, 0, 3687.11, -3960.69, 31.8726, 0, ''), +(23002, 1, 3676.28, -3953.76, 29.9396, 0, ''), +(23002, 2, 3658.54, -3952.15, 30.0414, 0, ''), +(23002, 3, 3628.91, -3956.90, 29.4050, 0, ''), +(23002, 4, 3602.54, -3968.16, 31.5110, 0, ''), +(23002, 5, 3564.96, -3978.00, 30.3622, 0, ''), +(23002, 6, 3542.47, -3981.81, 29.1465, 0, ''), +(23002, 7, 3511.34, -3981.25, 30.2822, 0, ''), +(23002, 8, 3473.45, -3992.67, 30.2861, 0, ''), +(23002, 9, 3439.10, -4006.73, 29.2737, 0, ''), +(23002, 10, 3415.66, -4026.24, 25.2498, 0, ''), +(23002, 11, 3380.88, -4045.38, 26.3114, 0, ''), +(23002, 12, 3355.23, -4051.42, 25.5665, 0, ''), +(23002, 13, 3312.00, -4055.65, 28.3297, 0, ''), +(23002, 14, 3286.34, -4079.27, 28.2464, 0, ''), +(23002, 15, 3260.68, -4087.29, 31.4043, 0, ''), +(23002, 16, 3236.83, -4087.65, 32.6894, 0, ''), +(23002, 17, 3215.06, -4082.10, 32.4181, 0, ''), +(23002, 18, 3203.59, -4082.47, 32.7436, 0, ''), +(23002, 19, 3166.41, -4062.09, 33.2357, 0, ''), +(23002, 20, 3147.51, -4055.33, 33.5683, 0, ''), +(23002, 21, 3125.41, -4050.01, 34.6100, 0, ''), +(23002, 22, 3121.16, -4045.07, 36.5481, 0, ''), +(23002, 23, 3101.54, -4023.78, 33.7169, 0, ''), +(23002, 24, 3094.16, -4016.89, 33.8487, 0, ''), +(23002, 25, 3079.57, -4011.01, 35.7546, 0, ''), +(23002, 26, 3058.83, -4001.71, 34.3039, 0, ''), +(23002, 27, 3037.83, -3986.60, 33.4216, 0, ''), +(23002, 28, 3016.93, -3970.83, 33.3743, 0, ''), +(23002, 29, 2998.05, -3954.89, 33.2338, 0, ''), +(23002, 30, 2969.35, -3929.27, 33.4831, 0, ''), +(23002, 31, 2941.23, -3909.56, 31.3506, 0, ''), +(23002, 32, 2911.42, -3895.07, 32.0950, 0, ''), +(23002, 33, 2892.44, -3875.52, 30.8123, 0, ''), +(23002, 34, 2870.52, -3858.97, 32.1977, 0, ''), +(23002, 35, 2865.84, -3836.99, 32.1108, 0, ''), +(23002, 36, 2850.52, -3814.52, 32.8635, 0, ''), +(23002, 37, 2836.63, -3796.94, 33.1473, 0, ''), +(23002, 38, 2820.73, -3780.22, 28.6916, 0, ''), +(23002, 39, 2795.82, -3770.13, 30.1327, 0, ''), +(23002, 40, 2773.15, -3765.54, 30.2947, 0, ''), +(23002, 41, 2742.31, -3761.65, 30.1218, 0, ''), +(23002, 42, 2708.43, -3748.46, 21.2468, 0, ''), +(23002, 43, 2661.45, -3741.11, 21.9603, 0, ''), +(23002, 44, 2623.89, -3735.29, 25.8979, 0, ''), +(23002, 45, 2585.93, -3728.85, 28.5146, 0, ''), +(23002, 46, 2554.93, -3730.10, 26.6795, 0, ''), +(23002, 47, 2538.68, -3721.28, 28.1589, 0, ''), +(23002, 48, 2508.54, -3708.71, 29.6718, 0, ''), +(23002, 49, 2474.69, -3710.37, 31.0805, 0, ''), +(23002, 50, 2456.40, -3698.83, 31.6187, 0, ''), +(23002, 51, 2430.54, -3701.87, 31.0494, 0, ''), +(23002, 52, 2390.13, -3681.76, 29.5484, 0, ''), +(23002, 53, 2357.06, -3673.96, 29.8845, 0, ''), +(23002, 54, 2330.15, -3672.73, 31.1314, 0, ''), +(23002, 55, 2302.77, -3665.22, 29.4110, 0, ''), +(23002, 56, 2279.24, -3659.46, 29.6247, 0, ''), +(23002, 57, 2254.65, -3661.12, 29.6984, 0, ''), +(23002, 58, 2223.32, -3654.92, 31.0149, 0, ''), +(23002, 59, 2194.29, -3645.40, 32.0417, 0, ''), +(23002, 60, 2153.05, -3650.82, 31.2292, 0, ''), +(23002, 61, 2114.15, -3639.96, 31.7371, 0, ''), +(23002, 62, 2093.68, -3646.65, 31.3745, 0, ''), +(23002, 63, 2069.86, -3670.59, 30.6172, 0, ''), +(23002, 64, 2024.40, -3677.64, 29.7682, 0, ''), +(23002, 65, 1988.61, -3680.02, 31.8937, 0, ''), +(23002, 66, 1962.68, -3692.17, 32.7811, 0, ''), +(23002, 67, 1931.94, -3708.48, 31.3641, 0, ''), +(23002, 68, 1893.36, -3710.02, 33.0193, 0, ''), +(23002, 69, 1865.73, -3718.35, 32.1664, 0, ''), +(23002, 70, 1839.74, -3732.92, 32.5322, 0, ''), +(23002, 71, 1805.08, -3757.76, 32.6295, 0, ''), +(23002, 72, 1780.24, -3775.53, 30.5931, 0, ''), +(23002, 73, 1753.28, -3786.79, 30.7445, 0, ''), +(23002, 74, 1731.09, -3796.64, 36.8866, 0, ''); + +DELETE FROM script_waypoint WHERE entry=24358; +INSERT INTO script_waypoint VALUES +(24358, 0, 121.193970, 1645.619385, 42.021, 0, ''), +(24358, 1, 132.051468, 1642.176025, 42.021, 5000, 'SAY_AT_GONG'), +(24358, 2, 120.670631, 1636.346802, 42.415, 0, ''), +(24358, 3, 120.536003, 1611.654663, 43.473, 10000, 'SAY_OPEN_ENTRANCE'), +(24358, 4, 120.536003, 1611.654663, 43.473, 0, ''); + +DELETE FROM script_waypoint WHERE entry=28070; +INSERT INTO script_waypoint VALUES +(28070, 0, 1053.789795, 476.639343, 207.744, 0, ''), +(28070, 1, 1032.293945, 467.623444, 207.736, 0, ''), +(28070, 2, 1017.908752, 454.765656, 207.719, 0, ''), +(28070, 3, 1004.810120, 441.305115, 207.373, 0, ''), +(28070, 4, 988.694214, 424.422485, 207.425, 0, ''), +(28070, 5, 984.816345, 422.177917, 205.994, 0, ''), +(28070, 6, 977.204468, 420.026917, 205.994, 0, ''), +(28070, 7, 962.388123, 421.983307, 205.994, 0, ''), +(28070, 8, 950.419556, 416.515198, 205.994, 0, ''), +(28070, 9, 943.972290, 403.071228, 205.994, 0, ''), +(28070, 10, 947.921936, 387.683563, 205.994, 0, ''), +(28070, 11, 946.554749, 383.270782, 205.994, 0, ''), +(28070, 12, 944.654724, 380.630859, 207.286, 0, ''), +(28070, 13, 941.101563, 377.373413, 207.421, 0, 'reach tribunal, set pause'), +(28070, 14, 935.217896, 370.557343, 207.421, 0, ''), +(28070, 15, 928.035950, 363.026733, 204.018, 0, ''), +(28070, 16, 909.287292, 344.392792, 203.706, 0, ''), +(28070, 17, 897.946838, 333.634735, 203.706, 0, 'reach panel'), +(28070, 18, 918.914429, 351.312866, 203.706, 0, 'reach floor disc (end event begin)'), +(28070, 19, 928.070068, 363.296326, 204.091, 0, 'stealth'), +(28070, 20, 934.817627, 370.136261, 207.421, 0, ''), +(28070, 21, 941.501465, 377.254456, 207.421, 0, ''); + +DELETE FROM script_waypoint WHERE entry=28912; +INSERT INTO script_waypoint VALUES +(28912, 0, 1653.518, -6038.374, 127.585, 0, 'Jump off'), +(28912, 1, 1653.978, -6034.614, 127.585, 5000, 'To Box'), +(28912, 2, 1653.854, -6034.726, 127.585, 500, 'Equip'), +(28912, 3, 1652.297, -6035.671, 127.585, 3000, 'Recover'), +(28912, 4, 1639.762, -6046.343, 127.948, 0, 'Escape'), +(28912, 5, 1640.963, -6028.119, 134.740, 0, ''), +(28912, 6, 1625.805, -6029.197, 134.740, 0, ''), +(28912, 7, 1626.845, -6015.085, 134.740, 0, ''), +(28912, 8, 1649.150, -6016.975, 133.240, 0, ''), +(28912, 9, 1653.063, -5974.844, 132.652, 5000, 'Mount'), +(28912, 10, 1654.747, -5926.424, 121.191, 0, 'Disappear'); + +-- EOF diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp new file mode 100644 index 000000000..eb52a495d --- /dev/null +++ b/system/ScriptLoader.cpp @@ -0,0 +1,776 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 +* This program is free software licensed under GPL version 2 +* Please see the included DOCS/LICENSE.TXT for more information */ + +#include "precompiled.h" + +//battlegrounds +extern void AddSC_battleground(); + +//custom + +//examples +extern void AddSC_example_creature(); +extern void AddSC_example_escort(); +extern void AddSC_example_gossip_codebox(); +extern void AddSC_example_misc(); + +//world +extern void AddSC_areatrigger_scripts(); +extern void AddSC_boss_emeriss(); +extern void AddSC_boss_taerar(); +extern void AddSC_boss_ysondre(); +extern void AddSC_generic_creature(); +extern void AddSC_go_scripts(); +extern void AddSC_guards(); +extern void AddSC_item_scripts(); +extern void AddSC_npc_professions(); +extern void AddSC_npcs_special(); + +//eastern kingdoms +extern void AddSC_blackrock_depths(); //blackrock_depths +extern void AddSC_boss_ambassador_flamelash(); +extern void AddSC_boss_anubshiah(); +extern void AddSC_boss_draganthaurissan(); +extern void AddSC_boss_general_angerforge(); +extern void AddSC_boss_gorosh_the_dervish(); +extern void AddSC_boss_grizzle(); +extern void AddSC_boss_high_interrogator_gerstahn(); +extern void AddSC_boss_magmus(); +extern void AddSC_boss_tomb_of_seven(); +extern void AddSC_instance_blackrock_depths(); +extern void AddSC_boss_drakkisath(); //blackrock_spire +extern void AddSC_boss_halycon(); +extern void AddSC_boss_highlordomokk(); +extern void AddSC_boss_mothersmolderweb(); +extern void AddSC_boss_overlordwyrmthalak(); +extern void AddSC_boss_shadowvosh(); +extern void AddSC_boss_thebeast(); +extern void AddSC_boss_warmastervoone(); +extern void AddSC_boss_quatermasterzigris(); +extern void AddSC_boss_pyroguard_emberseer(); +extern void AddSC_boss_gyth(); +extern void AddSC_boss_rend_blackhand(); +extern void AddSC_boss_razorgore(); //blackwing_lair +extern void AddSC_boss_vael(); +extern void AddSC_boss_broodlord(); +extern void AddSC_boss_firemaw(); +extern void AddSC_boss_ebonroc(); +extern void AddSC_boss_flamegor(); +extern void AddSC_boss_chromaggus(); +extern void AddSC_boss_nefarian(); +extern void AddSC_boss_victor_nefarius(); +extern void AddSC_deadmines(); //deadmines +extern void AddSC_instance_deadmines(); +extern void AddSC_boss_attumen(); //karazhan +extern void AddSC_boss_curator(); +extern void AddSC_boss_maiden_of_virtue(); +extern void AddSC_boss_shade_of_aran(); +extern void AddSC_boss_malchezaar(); +extern void AddSC_boss_terestian_illhoof(); +extern void AddSC_netherspite_infernal(); +extern void AddSC_boss_moroes(); +extern void AddSC_bosses_opera(); +extern void AddSC_instance_karazhan(); +extern void AddSC_karazhan(); +extern void AddSC_boss_felblood_kaelthas(); //magisters_terrace +extern void AddSC_boss_selin_fireheart(); +extern void AddSC_boss_vexallus(); +extern void AddSC_boss_priestess_delrissa(); +extern void AddSC_instance_magisters_terrace(); +extern void AddSC_magisters_terrace(); +extern void AddSC_boss_lucifron(); //molten_core +extern void AddSC_boss_magmadar(); +extern void AddSC_boss_gehennas(); +extern void AddSC_boss_garr(); +extern void AddSC_boss_baron_geddon(); +extern void AddSC_boss_shazzrah(); +extern void AddSC_boss_golemagg(); +extern void AddSC_boss_sulfuron(); +extern void AddSC_boss_majordomo(); +extern void AddSC_boss_ragnaros(); +extern void AddSC_instance_molten_core(); +extern void AddSC_molten_core(); +extern void AddSC_ebon_hold(); //scarlet_enclave +extern void AddSC_boss_arcanist_doan(); //scarlet_monastery +extern void AddSC_boss_azshir_the_sleepless(); +extern void AddSC_boss_bloodmage_thalnos(); +extern void AddSC_boss_herod(); +extern void AddSC_boss_high_inquisitor_fairbanks(); +extern void AddSC_boss_houndmaster_loksey(); +extern void AddSC_boss_interrogator_vishas(); +extern void AddSC_boss_mograine_and_whitemane(); +extern void AddSC_boss_scorn(); +extern void AddSC_boss_headless_horseman(); +extern void AddSC_instance_scarlet_monastery(); +extern void AddSC_boss_darkmaster_gandling(); //scholomance +extern void AddSC_boss_death_knight_darkreaver(); +extern void AddSC_boss_theolenkrastinov(); +extern void AddSC_boss_illuciabarov(); +extern void AddSC_boss_instructormalicia(); +extern void AddSC_boss_jandicebarov(); +extern void AddSC_boss_kormok(); +extern void AddSC_boss_lordalexeibarov(); +extern void AddSC_boss_lorekeeperpolkelt(); +extern void AddSC_boss_rasfrost(); +extern void AddSC_boss_theravenian(); +extern void AddSC_boss_vectus(); +extern void AddSC_instance_scholomance(); +extern void AddSC_shadowfang_keep(); //shadowfang_keep +extern void AddSC_instance_shadowfang_keep(); +extern void AddSC_boss_magistrate_barthilas(); //stratholme +extern void AddSC_boss_maleki_the_pallid(); +extern void AddSC_boss_nerubenkan(); +extern void AddSC_boss_cannon_master_willey(); +extern void AddSC_boss_baroness_anastari(); +extern void AddSC_boss_ramstein_the_gorger(); +extern void AddSC_boss_timmy_the_cruel(); +extern void AddSC_boss_postmaster_malown(); +extern void AddSC_boss_baron_rivendare(); +extern void AddSC_boss_dathrohan_balnazzar(); +extern void AddSC_boss_order_of_silver_hand(); +extern void AddSC_instance_stratholme(); +extern void AddSC_stratholme(); +extern void AddSC_boss_brutallus(); //sunwell_plateau +extern void AddSC_boss_kalecgos(); +extern void AddSC_instance_sunwell_plateau(); +extern void AddSC_boss_ironaya(); //uldaman +extern void AddSC_uldaman(); +extern void AddSC_boss_akilzon(); //zulaman +extern void AddSC_boss_halazzi(); +extern void AddSC_boss_janalai(); +extern void AddSC_boss_malacrass(); +extern void AddSC_boss_nalorakk(); +extern void AddSC_instance_zulaman(); +extern void AddSC_zulaman(); +extern void AddSC_boss_zuljin(); +extern void AddSC_boss_arlokk(); //zulgurub +extern void AddSC_boss_gahzranka(); +extern void AddSC_boss_grilek(); +extern void AddSC_boss_hakkar(); +extern void AddSC_boss_hazzarah(); +extern void AddSC_boss_jeklik(); +extern void AddSC_boss_jindo(); +extern void AddSC_boss_mandokir(); +extern void AddSC_boss_marli(); +extern void AddSC_boss_ouro(); +extern void AddSC_boss_renataki(); +extern void AddSC_boss_thekal(); +extern void AddSC_boss_venoxis(); +extern void AddSC_boss_wushoolay(); +extern void AddSC_instance_zulgurub(); + +//extern void AddSC_alterac_mountains(); +extern void AddSC_arathi_highlands(); +extern void AddSC_blasted_lands(); +extern void AddSC_boss_kruul(); +extern void AddSC_burning_steppes(); +extern void AddSC_dun_morogh(); +extern void AddSC_eastern_plaguelands(); +extern void AddSC_elwynn_forest(); +extern void AddSC_eversong_woods(); +extern void AddSC_ghostlands(); +extern void AddSC_hinterlands(); +extern void AddSC_ironforge(); +extern void AddSC_isle_of_queldanas(); +extern void AddSC_loch_modan(); +extern void AddSC_searing_gorge(); +extern void AddSC_silvermoon_city(); +extern void AddSC_silverpine_forest(); +extern void AddSC_stormwind_city(); +extern void AddSC_stranglethorn_vale(); +extern void AddSC_tirisfal_glades(); +extern void AddSC_undercity(); +extern void AddSC_western_plaguelands(); +extern void AddSC_westfall(); +extern void AddSC_wetlands(); + +//kalimdor +extern void AddSC_instance_blackfathom_deeps(); //blackfathom_deeps +extern void AddSC_boss_aeonus(); //COT, dark_portal +extern void AddSC_boss_chrono_lord_deja(); +extern void AddSC_boss_temporus(); +extern void AddSC_dark_portal(); +extern void AddSC_instance_dark_portal(); +extern void AddSC_hyjal(); //COT, hyjal +extern void AddSC_boss_archimonde(); +extern void AddSC_instance_mount_hyjal(); +extern void AddSC_boss_captain_skarloc(); //COT, old_hillsbrad +extern void AddSC_boss_epoch_hunter(); +extern void AddSC_boss_lieutenant_drake(); +extern void AddSC_instance_old_hillsbrad(); +extern void AddSC_old_hillsbrad(); +extern void AddSC_boss_celebras_the_cursed(); //maraudon +extern void AddSC_boss_landslide(); +extern void AddSC_boss_noxxion(); +extern void AddSC_boss_ptheradras(); +extern void AddSC_boss_onyxia(); //onyxias_lair +extern void AddSC_boss_amnennar_the_coldbringer(); //razorfen_downs +extern void AddSC_razorfen_downs(); +extern void AddSC_boss_ayamiss(); //ruins_of_ahnqiraj +extern void AddSC_boss_kurinnaxx(); +extern void AddSC_boss_moam(); +extern void AddSC_boss_cthun(); //temple_of_ahnqiraj +extern void AddSC_boss_fankriss(); +extern void AddSC_boss_huhuran(); +extern void AddSC_bug_trio(); +extern void AddSC_boss_sartura(); +extern void AddSC_boss_skeram(); +extern void AddSC_boss_twinemperors(); +extern void AddSC_mob_anubisath_sentinel(); +extern void AddSC_instance_temple_of_ahnqiraj(); +extern void AddSC_zulfarrak(); //zulfarrak + +extern void AddSC_ashenvale(); +extern void AddSC_azshara(); +extern void AddSC_azuremyst_isle(); +extern void AddSC_bloodmyst_isle(); +extern void AddSC_boss_azuregos(); +extern void AddSC_darkshore(); +extern void AddSC_desolace(); +extern void AddSC_dustwallow_marsh(); +extern void AddSC_felwood(); +extern void AddSC_feralas(); +extern void AddSC_moonglade(); +extern void AddSC_mulgore(); +extern void AddSC_orgrimmar(); +extern void AddSC_silithus(); +extern void AddSC_stonetalon_mountains(); +extern void AddSC_tanaris(); +extern void AddSC_teldrassil(); +extern void AddSC_the_barrens(); +extern void AddSC_thousand_needles(); +extern void AddSC_thunder_bluff(); +extern void AddSC_ungoro_crater(); +extern void AddSC_winterspring(); + +//northrend +extern void AddSC_boss_jedoga(); //ahnkahet +extern void AddSC_boss_nadox(); +extern void AddSC_boss_taldaram(); +extern void AddSC_boss_volazj(); +extern void AddSC_instance_ahnkahet(); +extern void AddSC_boss_anubarak(); //azjol-nerub +extern void AddSC_boss_hadronox(); +extern void AddSC_boss_krikthir(); +extern void AddSC_instance_azjol_nerub(); +extern void AddSC_boss_novos(); //draktharon_keep +extern void AddSC_boss_tharonja(); +extern void AddSC_boss_trollgore(); +extern void AddSC_boss_colossus(); //gundrak +extern void AddSC_boss_galdarah(); +extern void AddSC_boss_moorabi(); +extern void AddSC_boss_sladran(); +extern void AddSC_instance_gundrak(); +extern void AddSC_boss_anubrekhan(); //naxxramas +extern void AddSC_boss_four_horsemen(); +extern void AddSC_boss_faerlina(); +extern void AddSC_boss_gluth(); +extern void AddSC_howling_fjord(); +extern void AddSC_boss_kelthuzad(); +extern void AddSC_boss_loatheb(); +extern void AddSC_boss_maexxna(); +extern void AddSC_boss_noth(); +extern void AddSC_boss_patchwerk(); +extern void AddSC_boss_razuvious(); +extern void AddSC_boss_sapphiron(); +extern void AddSC_instance_naxxramas(); +extern void AddSC_boss_anomalus(); //nexus +extern void AddSC_boss_keristrasza(); +extern void AddSC_boss_ormorok(); +extern void AddSC_boss_telestra(); +extern void AddSC_instance_nexus(); +extern void AddSC_boss_sartharion(); //obsidian_sanctum +extern void AddSC_instance_obsidian_sanctum(); +extern void AddSC_boss_bjarngrim(); //Ulduar, halls_of_lightning +extern void AddSC_boss_ionar(); +extern void AddSC_boss_loken(); +extern void AddSC_boss_volkhan(); +extern void AddSC_instance_halls_of_lightning(); +extern void AddSC_boss_maiden_of_grief(); //Ulduar, halls_of_stone +extern void AddSC_boss_sjonnir(); +extern void AddSC_halls_of_stone(); +extern void AddSC_instance_ulduar(); //ulduar +extern void AddSC_boss_ingvar(); //utgarde_keep +extern void AddSC_boss_keleseth(); +extern void AddSC_boss_skarvald_and_dalronn(); +extern void AddSC_instance_utgarde_keep(); +extern void AddSC_utgarde_keep(); +extern void AddSC_boss_gortok(); //utgarde_pinnacle +extern void AddSC_boss_skadi(); +extern void AddSC_boss_svala(); +extern void AddSC_boss_ymiron(); +extern void AddSC_instance_pinnacle(); + +extern void AddSC_borean_tundra(); +extern void AddSC_dalaran(); +extern void AddSC_dragonblight(); +extern void AddSC_grizzly_hills(); +extern void AddSC_icecrown(); +extern void AddSC_sholazar_basin(); +extern void AddSC_storm_peaks(); + +//outland +extern void AddSC_boss_exarch_maladaar(); //auchindoun, auchenai_crypts +extern void AddSC_boss_nexusprince_shaffar(); //auchindoun, mana_tombs +extern void AddSC_boss_pandemonius(); +extern void AddSC_boss_darkweaver_syth(); //auchindoun, sethekk_halls +extern void AddSC_boss_talon_king_ikiss(); +extern void AddSC_instance_sethekk_halls(); +extern void AddSC_boss_ambassador_hellmaw(); //auchindoun, shadow_labyrinth +extern void AddSC_boss_blackheart_the_inciter(); +extern void AddSC_boss_grandmaster_vorpil(); +extern void AddSC_boss_murmur(); +extern void AddSC_instance_shadow_labyrinth(); +extern void AddSC_black_temple(); //black_temple +extern void AddSC_boss_illidan(); +extern void AddSC_boss_shade_of_akama(); +extern void AddSC_boss_supremus(); +extern void AddSC_boss_gurtogg_bloodboil(); +extern void AddSC_boss_mother_shahraz(); +extern void AddSC_boss_reliquary_of_souls(); +extern void AddSC_boss_teron_gorefiend(); +extern void AddSC_boss_najentus(); +extern void AddSC_boss_illidari_council(); +extern void AddSC_instance_black_temple(); +extern void AddSC_boss_fathomlord_karathress(); //CR, serpent_shrine +extern void AddSC_boss_hydross_the_unstable(); +extern void AddSC_boss_lady_vashj(); +extern void AddSC_boss_leotheras_the_blind(); +extern void AddSC_boss_morogrim_tidewalker(); +extern void AddSC_instance_serpentshrine_cavern(); +extern void AddSC_boss_hydromancer_thespia(); //CR, steam_vault +extern void AddSC_boss_mekgineer_steamrigger(); +extern void AddSC_boss_warlord_kalithresh(); +extern void AddSC_instance_steam_vault(); +extern void AddSC_boss_hungarfen(); //CR, Underbog +extern void AddSC_boss_gruul(); //gruuls_lair +extern void AddSC_boss_high_king_maulgar(); +extern void AddSC_instance_gruuls_lair(); +extern void AddSC_boss_broggok(); //HC, blood_furnace +extern void AddSC_boss_kelidan_the_breaker(); +extern void AddSC_boss_the_maker(); +extern void AddSC_instance_blood_furnace(); +extern void AddSC_boss_nazan_and_vazruden(); //HC, hellfire_ramparts +extern void AddSC_boss_omor_the_unscarred(); +extern void AddSC_boss_watchkeeper_gargolmar(); +extern void AddSC_instance_ramparts(); +extern void AddSC_boss_magtheridon(); //HC, magtheridons_lair +extern void AddSC_instance_magtheridons_lair(); +extern void AddSC_boss_grand_warlock_nethekurse(); //HC, shattered_halls +extern void AddSC_boss_warbringer_omrogg(); +extern void AddSC_boss_warchief_kargath_bladefist(); +extern void AddSC_instance_shattered_halls(); +extern void AddSC_arcatraz(); //TK, arcatraz +extern void AddSC_boss_harbinger_skyriss(); +extern void AddSC_instance_arcatraz(); +extern void AddSC_boss_high_botanist_freywinn(); //TK, botanica +extern void AddSC_boss_laj(); +extern void AddSC_boss_warp_splinter(); +extern void AddSC_boss_kaelthas(); //TK, the_eye +extern void AddSC_boss_void_reaver(); +extern void AddSC_boss_high_astromancer_solarian(); +extern void AddSC_instance_the_eye(); +extern void AddSC_the_eye(); +extern void AddSC_boss_gatewatcher_iron_hand(); //TK, the_mechanar +extern void AddSC_boss_nethermancer_sepethrea(); +extern void AddSC_boss_pathaleon_the_calculator(); +extern void AddSC_instance_mechanar(); + +extern void AddSC_blades_edge_mountains(); +extern void AddSC_boss_doomlordkazzak(); +extern void AddSC_boss_doomwalker(); +extern void AddSC_hellfire_peninsula(); +extern void AddSC_nagrand(); +extern void AddSC_netherstorm(); +extern void AddSC_shadowmoon_valley(); +extern void AddSC_shattrath_city(); +extern void AddSC_terokkar_forest(); +extern void AddSC_zangarmarsh(); + +void AddScripts() +{ + //battlegrounds + AddSC_battleground(); + + //custom + + //examples + AddSC_example_creature(); + AddSC_example_escort(); + AddSC_example_gossip_codebox(); + AddSC_example_misc(); + + //world + AddSC_areatrigger_scripts(); + AddSC_boss_emeriss(); + AddSC_boss_taerar(); + AddSC_boss_ysondre(); + AddSC_generic_creature(); + AddSC_go_scripts(); + AddSC_guards(); + AddSC_item_scripts(); + AddSC_npc_professions(); + AddSC_npcs_special(); + + //eastern kingdoms + AddSC_blackrock_depths(); //blackrock_depths + AddSC_boss_ambassador_flamelash(); + AddSC_boss_anubshiah(); + AddSC_boss_draganthaurissan(); + AddSC_boss_general_angerforge(); + AddSC_boss_gorosh_the_dervish(); + AddSC_boss_grizzle(); + AddSC_boss_high_interrogator_gerstahn(); + AddSC_boss_magmus(); + AddSC_boss_tomb_of_seven(); + AddSC_instance_blackrock_depths(); + AddSC_boss_drakkisath(); //blackrock_spire + AddSC_boss_halycon(); + AddSC_boss_highlordomokk(); + AddSC_boss_mothersmolderweb(); + AddSC_boss_overlordwyrmthalak(); + AddSC_boss_shadowvosh(); + AddSC_boss_thebeast(); + AddSC_boss_warmastervoone(); + AddSC_boss_quatermasterzigris(); + AddSC_boss_pyroguard_emberseer(); + AddSC_boss_gyth(); + AddSC_boss_rend_blackhand(); + AddSC_boss_razorgore(); //blackwing_lair + AddSC_boss_vael(); + AddSC_boss_broodlord(); + AddSC_boss_firemaw(); + AddSC_boss_ebonroc(); + AddSC_boss_flamegor(); + AddSC_boss_chromaggus(); + AddSC_boss_nefarian(); + AddSC_boss_victor_nefarius(); + AddSC_deadmines(); //deadmines + AddSC_instance_deadmines(); + AddSC_boss_attumen(); //karazhan + AddSC_boss_curator(); + AddSC_boss_maiden_of_virtue(); + AddSC_boss_shade_of_aran(); + AddSC_boss_malchezaar(); + AddSC_boss_terestian_illhoof(); + AddSC_netherspite_infernal(); + AddSC_boss_moroes(); + AddSC_bosses_opera(); + AddSC_instance_karazhan(); + AddSC_karazhan(); + AddSC_boss_felblood_kaelthas(); //magisters_terrace + AddSC_boss_selin_fireheart(); + AddSC_boss_vexallus(); + AddSC_boss_priestess_delrissa(); + AddSC_instance_magisters_terrace(); + AddSC_magisters_terrace(); + AddSC_boss_lucifron(); //molten_core + AddSC_boss_magmadar(); + AddSC_boss_gehennas(); + AddSC_boss_garr(); + AddSC_boss_baron_geddon(); + AddSC_boss_shazzrah(); + AddSC_boss_golemagg(); + AddSC_boss_sulfuron(); + AddSC_boss_majordomo(); + AddSC_boss_ragnaros(); + AddSC_instance_molten_core(); + AddSC_molten_core(); + AddSC_ebon_hold(); //scarlet_enclave + AddSC_boss_arcanist_doan(); //scarlet_monastery + AddSC_boss_azshir_the_sleepless(); + AddSC_boss_bloodmage_thalnos(); + AddSC_boss_herod(); + AddSC_boss_high_inquisitor_fairbanks(); + AddSC_boss_houndmaster_loksey(); + AddSC_boss_interrogator_vishas(); + AddSC_boss_mograine_and_whitemane(); + AddSC_boss_scorn(); + AddSC_boss_headless_horseman(); + AddSC_instance_scarlet_monastery(); + AddSC_boss_darkmaster_gandling(); //scholomance + AddSC_boss_death_knight_darkreaver(); + AddSC_boss_theolenkrastinov(); + AddSC_boss_illuciabarov(); + AddSC_boss_instructormalicia(); + AddSC_boss_jandicebarov(); + AddSC_boss_kormok(); + AddSC_boss_lordalexeibarov(); + AddSC_boss_lorekeeperpolkelt(); + AddSC_boss_rasfrost(); + AddSC_boss_theravenian(); + AddSC_boss_vectus(); + AddSC_instance_scholomance(); + AddSC_shadowfang_keep(); //shadowfang_keep + AddSC_instance_shadowfang_keep(); + AddSC_boss_magistrate_barthilas(); //stratholme + AddSC_boss_maleki_the_pallid(); + AddSC_boss_nerubenkan(); + AddSC_boss_cannon_master_willey(); + AddSC_boss_baroness_anastari(); + AddSC_boss_ramstein_the_gorger(); + AddSC_boss_timmy_the_cruel(); + AddSC_boss_postmaster_malown(); + AddSC_boss_baron_rivendare(); + AddSC_boss_dathrohan_balnazzar(); + AddSC_boss_order_of_silver_hand(); + AddSC_instance_stratholme(); + AddSC_stratholme(); + AddSC_boss_brutallus(); //sunwell_plateau + AddSC_boss_kalecgos(); + AddSC_instance_sunwell_plateau(); + AddSC_boss_ironaya(); //uldaman + AddSC_uldaman(); + AddSC_boss_akilzon(); //zulaman + AddSC_boss_halazzi(); + AddSC_boss_janalai(); + AddSC_boss_malacrass(); + AddSC_boss_nalorakk(); + AddSC_instance_zulaman(); + AddSC_zulaman(); + AddSC_boss_zuljin(); + AddSC_boss_arlokk(); //zulgurub + AddSC_boss_gahzranka(); + AddSC_boss_grilek(); + AddSC_boss_hakkar(); + AddSC_boss_hazzarah(); + AddSC_boss_jeklik(); + AddSC_boss_jindo(); + AddSC_boss_mandokir(); + AddSC_boss_marli(); + AddSC_boss_ouro(); + AddSC_boss_renataki(); + AddSC_boss_thekal(); + AddSC_boss_venoxis(); + AddSC_boss_wushoolay(); + AddSC_instance_zulgurub(); + + //AddSC_alterac_mountains(); + AddSC_arathi_highlands(); + AddSC_blasted_lands(); + AddSC_boss_kruul(); + AddSC_burning_steppes(); + AddSC_dun_morogh(); + AddSC_eastern_plaguelands(); + AddSC_elwynn_forest(); + AddSC_eversong_woods(); + AddSC_ghostlands(); + AddSC_hinterlands(); + AddSC_ironforge(); + AddSC_isle_of_queldanas(); + AddSC_loch_modan(); + AddSC_searing_gorge(); + AddSC_silvermoon_city(); + AddSC_silverpine_forest(); + AddSC_stormwind_city(); + AddSC_stranglethorn_vale(); + AddSC_tirisfal_glades(); + AddSC_undercity(); + AddSC_western_plaguelands(); + AddSC_westfall(); + AddSC_wetlands(); + + //kalimdor + AddSC_instance_blackfathom_deeps(); //blackfathom_deeps + AddSC_boss_aeonus(); //COT, dark_portal + AddSC_boss_chrono_lord_deja(); + AddSC_boss_temporus(); + AddSC_dark_portal(); + AddSC_instance_dark_portal(); + AddSC_hyjal(); //COT, hyjal + AddSC_boss_archimonde(); + AddSC_instance_mount_hyjal(); + AddSC_boss_captain_skarloc(); //COT, old_hillsbrad + AddSC_boss_epoch_hunter(); + AddSC_boss_lieutenant_drake(); + AddSC_instance_old_hillsbrad(); + AddSC_old_hillsbrad(); + AddSC_boss_celebras_the_cursed(); //maraudon + AddSC_boss_landslide(); + AddSC_boss_noxxion(); + AddSC_boss_ptheradras(); + AddSC_boss_onyxia(); //onyxias_lair + AddSC_boss_amnennar_the_coldbringer(); //razorfen_downs + AddSC_razorfen_downs(); + AddSC_boss_ayamiss(); //ruins_of_ahnqiraj + AddSC_boss_kurinnaxx(); + AddSC_boss_moam(); + AddSC_boss_cthun(); //temple_of_ahnqiraj + AddSC_boss_fankriss(); + AddSC_boss_huhuran(); + AddSC_bug_trio(); + AddSC_boss_sartura(); + AddSC_boss_skeram(); + AddSC_boss_twinemperors(); + AddSC_mob_anubisath_sentinel(); + AddSC_instance_temple_of_ahnqiraj(); + AddSC_zulfarrak(); //zulfarrak + + AddSC_ashenvale(); + AddSC_azshara(); + AddSC_azuremyst_isle(); + AddSC_bloodmyst_isle(); + AddSC_boss_azuregos(); + AddSC_darkshore(); + AddSC_desolace(); + AddSC_dustwallow_marsh(); + AddSC_felwood(); + AddSC_feralas(); + AddSC_moonglade(); + AddSC_mulgore(); + AddSC_orgrimmar(); + AddSC_silithus(); + AddSC_stonetalon_mountains(); + AddSC_tanaris(); + AddSC_teldrassil(); + AddSC_the_barrens(); + AddSC_thousand_needles(); + AddSC_thunder_bluff(); + AddSC_ungoro_crater(); + AddSC_winterspring(); + + //northrend + AddSC_boss_jedoga(); //ahnkahet + AddSC_boss_nadox(); + AddSC_boss_taldaram(); + AddSC_boss_volazj(); + AddSC_instance_ahnkahet(); + AddSC_boss_anubarak(); //azjol-nerub + AddSC_boss_hadronox(); + AddSC_boss_krikthir(); + AddSC_instance_azjol_nerub(); + AddSC_boss_novos(); //draktharon_keep + AddSC_boss_tharonja(); + AddSC_boss_trollgore(); + AddSC_boss_colossus(); //gundrak + AddSC_boss_galdarah(); + AddSC_boss_moorabi(); + AddSC_boss_sladran(); + AddSC_instance_gundrak(); + AddSC_boss_anubrekhan(); //naxxramas + AddSC_boss_four_horsemen(); + AddSC_boss_faerlina(); + AddSC_boss_gluth(); + AddSC_howling_fjord(); + AddSC_boss_kelthuzad(); + AddSC_boss_loatheb(); + AddSC_boss_maexxna(); + AddSC_boss_noth(); + AddSC_boss_patchwerk(); + AddSC_boss_razuvious(); + AddSC_boss_sapphiron(); + AddSC_instance_naxxramas(); + AddSC_boss_anomalus(); //nexus + AddSC_boss_keristrasza(); + AddSC_boss_ormorok(); + AddSC_boss_telestra(); + AddSC_instance_nexus(); + AddSC_boss_sartharion(); //obsidian_sanctum + AddSC_instance_obsidian_sanctum(); + AddSC_boss_bjarngrim(); //Ulduar, halls_of_lightning + AddSC_boss_ionar(); + AddSC_boss_loken(); + AddSC_boss_volkhan(); + AddSC_instance_halls_of_lightning(); + AddSC_boss_maiden_of_grief(); //Ulduar, halls_of_stone + AddSC_boss_sjonnir(); + AddSC_halls_of_stone(); + AddSC_instance_ulduar(); //ulduar + AddSC_boss_ingvar(); //utgarde_keep + AddSC_boss_keleseth(); + AddSC_boss_skarvald_and_dalronn(); + AddSC_instance_utgarde_keep(); + AddSC_utgarde_keep(); + AddSC_boss_gortok(); //utgarde_pinnacle + AddSC_boss_skadi(); + AddSC_boss_svala(); + AddSC_boss_ymiron(); + AddSC_instance_pinnacle(); + + AddSC_borean_tundra(); + AddSC_dalaran(); + AddSC_dragonblight(); + AddSC_grizzly_hills(); + AddSC_icecrown(); + AddSC_sholazar_basin(); + AddSC_storm_peaks(); + + //outland + AddSC_boss_exarch_maladaar(); //auchindoun, auchenai_crypts + AddSC_boss_nexusprince_shaffar(); //auchindoun, mana_tombs + AddSC_boss_pandemonius(); + AddSC_boss_darkweaver_syth(); //auchindoun, sethekk_halls + AddSC_boss_talon_king_ikiss(); + AddSC_instance_sethekk_halls(); + AddSC_boss_ambassador_hellmaw(); //auchindoun, shadow_labyrinth + AddSC_boss_blackheart_the_inciter(); + AddSC_boss_grandmaster_vorpil(); + AddSC_boss_murmur(); + AddSC_instance_shadow_labyrinth(); + AddSC_black_temple(); //black_temple + AddSC_boss_illidan(); + AddSC_boss_shade_of_akama(); + AddSC_boss_supremus(); + AddSC_boss_gurtogg_bloodboil(); + AddSC_boss_mother_shahraz(); + AddSC_boss_reliquary_of_souls(); + AddSC_boss_teron_gorefiend(); + AddSC_boss_najentus(); + AddSC_boss_illidari_council(); + AddSC_instance_black_temple(); + AddSC_boss_fathomlord_karathress(); //CR, serpent_shrine + AddSC_boss_hydross_the_unstable(); + AddSC_boss_lady_vashj(); + AddSC_boss_leotheras_the_blind(); + AddSC_boss_morogrim_tidewalker(); + AddSC_instance_serpentshrine_cavern(); + AddSC_boss_hydromancer_thespia(); //CR, steam_vault + AddSC_boss_mekgineer_steamrigger(); + AddSC_boss_warlord_kalithresh(); + AddSC_instance_steam_vault(); + AddSC_boss_hungarfen(); //CR, Underbog + AddSC_boss_gruul(); //gruuls_lair + AddSC_boss_high_king_maulgar(); + AddSC_instance_gruuls_lair(); + AddSC_boss_broggok(); //HC, blood_furnace + AddSC_boss_kelidan_the_breaker(); + AddSC_boss_the_maker(); + AddSC_instance_blood_furnace(); + AddSC_boss_nazan_and_vazruden(); //HC, hellfire_ramparts + AddSC_boss_omor_the_unscarred(); + AddSC_boss_watchkeeper_gargolmar(); + AddSC_instance_ramparts(); + AddSC_boss_magtheridon(); //HC, magtheridons_lair + AddSC_instance_magtheridons_lair(); + AddSC_boss_grand_warlock_nethekurse(); //HC, shattered_halls + AddSC_boss_warbringer_omrogg(); + AddSC_boss_warchief_kargath_bladefist(); + AddSC_instance_shattered_halls(); + AddSC_arcatraz(); //TK, arcatraz + AddSC_boss_harbinger_skyriss(); + AddSC_instance_arcatraz(); + AddSC_boss_high_botanist_freywinn(); //TK, botanica + AddSC_boss_laj(); + AddSC_boss_warp_splinter(); + AddSC_boss_kaelthas(); //TK, the_eye + AddSC_boss_void_reaver(); + AddSC_boss_high_astromancer_solarian(); + AddSC_instance_the_eye(); + AddSC_the_eye(); + AddSC_boss_gatewatcher_iron_hand(); //TK, the_mechanar + AddSC_boss_nethermancer_sepethrea(); + AddSC_boss_pathaleon_the_calculator(); + AddSC_instance_mechanar(); + + AddSC_blades_edge_mountains(); + AddSC_boss_doomlordkazzak(); + AddSC_boss_doomwalker(); + AddSC_hellfire_peninsula(); + AddSC_nagrand(); + AddSC_netherstorm(); + AddSC_shadowmoon_valley(); + AddSC_shattrath_city(); + AddSC_terokkar_forest(); + AddSC_zangarmarsh(); +} diff --git a/system/ScriptLoader.h b/system/ScriptLoader.h new file mode 100644 index 000000000..57fb7d821 --- /dev/null +++ b/system/ScriptLoader.h @@ -0,0 +1,10 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 +* This program is free software licensed under GPL version 2 +* Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef SC_SCRIPTLOADER_H +#define SC_SCRIPTLOADER_H + +void AddScripts(); + +#endif diff --git a/system/system.cpp b/system/system.cpp new file mode 100644 index 000000000..425ea8643 --- /dev/null +++ b/system/system.cpp @@ -0,0 +1,242 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 +* This program is free software licensed under GPL version 2 +* Please see the included DOCS/LICENSE.TXT for more information */ + +#include "precompiled.h" +#include "system.h" +#include "ProgressBar.h" +#include "ObjectMgr.h" +#include "Database/DatabaseEnv.h" + +DatabaseType SD2Database; +std::string strSD2Version; + +SystemMgr::SystemMgr() +{ +} + +SystemMgr& SystemMgr::Instance() +{ + static SystemMgr pSysMgr; + return pSysMgr; +} + +void SystemMgr::LoadVersion() +{ + //Get Version information + QueryResult* pResult = SD2Database.PQuery("SELECT version FROM sd2_db_version LIMIT 1"); + + if (pResult) + { + Field* pFields = pResult->Fetch(); + + strSD2Version = pFields[0].GetCppString(); + + outstring_log("Loading %s", strSD2Version.c_str()); + outstring_log(""); + } + else + { + error_log("SD2: Missing `sd2_db_version` information."); + outstring_log(""); + } +} + +void SystemMgr::LoadScriptTexts() +{ + outstring_log("SD2: Loading Script Texts..."); + LoadMangosStrings(SD2Database,"script_texts",TEXT_SOURCE_RANGE,1+(TEXT_SOURCE_RANGE*2)); + + QueryResult* pResult = SD2Database.PQuery("SELECT entry, sound, type, language, emote FROM script_texts"); + + outstring_log("SD2: Loading Script Texts additional data..."); + + if (pResult) + { + barGoLink bar(pResult->GetRowCount()); + uint32 uiCount = 0; + + do + { + bar.step(); + Field* pFields = pResult->Fetch(); + StringTextData pTemp; + + int32 iId = pFields[0].GetInt32(); + pTemp.uiSoundId = pFields[1].GetUInt32(); + pTemp.uiType = pFields[2].GetUInt32(); + pTemp.uiLanguage = pFields[3].GetUInt32(); + pTemp.uiEmote = pFields[4].GetUInt32(); + + if (iId >= 0) + { + error_db_log("SD2: Entry %i in table `script_texts` is not a negative value.", iId); + continue; + } + + if (iId > TEXT_SOURCE_RANGE || iId <= TEXT_SOURCE_RANGE*2) + { + error_db_log("SD2: Entry %i in table `script_texts` is out of accepted entry range for table.", iId); + continue; + } + + if (pTemp.uiSoundId) + { + if (!GetSoundEntriesStore()->LookupEntry(pTemp.uiSoundId)) + error_db_log("SD2: Entry %i in table `script_texts` has soundId %u but sound does not exist.", iId, pTemp.uiSoundId); + } + + if (!GetLanguageDescByID(pTemp.uiLanguage)) + error_db_log("SD2: Entry %i in table `script_texts` using Language %u but Language does not exist.", iId, pTemp.uiLanguage); + + if (pTemp.uiType > CHAT_TYPE_ZONE_YELL) + error_db_log("SD2: Entry %i in table `script_texts` has Type %u but this Chat Type does not exist.", iId, pTemp.uiType); + + m_mTextDataMap[iId] = pTemp; + ++uiCount; + } while (pResult->NextRow()); + + outstring_log(""); + outstring_log(">> Loaded %u additional Script Texts data.", uiCount); + } + else + { + barGoLink bar(1); + bar.step(); + outstring_log(""); + outstring_log(">> Loaded 0 additional Script Texts data. DB table `script_texts` is empty."); + } +} + +void SystemMgr::LoadScriptTextsCustom() +{ + outstring_log("SD2: Loading Custom Texts..."); + LoadMangosStrings(SD2Database,"custom_texts",TEXT_SOURCE_RANGE*2,1+(TEXT_SOURCE_RANGE*3)); + + QueryResult* pResult = SD2Database.PQuery("SELECT entry, sound, type, language, emote FROM custom_texts"); + + outstring_log("SD2: Loading Custom Texts additional data..."); + + if (pResult) + { + barGoLink bar(pResult->GetRowCount()); + uint32 uiCount = 0; + + do + { + bar.step(); + Field* pFields = pResult->Fetch(); + StringTextData pTemp; + + int32 iId = pFields[0].GetInt32(); + pTemp.uiSoundId = pFields[1].GetUInt32(); + pTemp.uiType = pFields[2].GetUInt32(); + pTemp.uiLanguage = pFields[3].GetUInt32(); + pTemp.uiEmote = pFields[4].GetUInt32(); + + if (iId >= 0) + { + error_db_log("SD2: Entry %i in table `custom_texts` is not a negative value.", iId); + continue; + } + + if (iId > TEXT_SOURCE_RANGE*2 || iId <= TEXT_SOURCE_RANGE*3) + { + error_db_log("SD2: Entry %i in table `custom_texts` is out of accepted entry range for table.", iId); + continue; + } + + if (pTemp.uiSoundId) + { + if (!GetSoundEntriesStore()->LookupEntry(pTemp.uiSoundId)) + error_db_log("SD2: Entry %i in table `custom_texts` has soundId %u but sound does not exist.", iId, pTemp.uiSoundId); + } + + if (!GetLanguageDescByID(pTemp.uiLanguage)) + error_db_log("SD2: Entry %i in table `custom_texts` using Language %u but Language does not exist.", iId, pTemp.uiLanguage); + + if (pTemp.uiType > CHAT_TYPE_ZONE_YELL) + error_db_log("SD2: Entry %i in table `custom_texts` has Type %u but this Chat Type does not exist.", iId, pTemp.uiType); + + m_mTextDataMap[iId] = pTemp; + ++uiCount; + } while (pResult->NextRow()); + + outstring_log(""); + outstring_log(">> Loaded %u additional Custom Texts data.", uiCount); + } + else + { + barGoLink bar(1); + bar.step(); + outstring_log(""); + outstring_log(">> Loaded 0 additional Custom Texts data. DB table `custom_texts` is empty."); + } +} + +void SystemMgr::LoadScriptWaypoints() +{ + // Drop Existing Waypoint list + m_mPointMoveMap.clear(); + + uint64 uiCreatureCount = 0; + + // Load Waypoints + QueryResult* pResult = SD2Database.PQuery("SELECT COUNT(entry) FROM script_waypoint GROUP BY entry"); + if (pResult) + { + uiCreatureCount = pResult->GetRowCount(); + delete pResult; + } + + outstring_log("SD2: Loading Script Waypoints for %u creature(s)...", uiCreatureCount); + + pResult = SD2Database.PQuery("SELECT entry, pointid, location_x, location_y, location_z, waittime FROM script_waypoint ORDER BY pointid"); + + if (pResult) + { + barGoLink bar(pResult->GetRowCount()); + uint32 uiNodeCount = 0; + + do + { + bar.step(); + Field* pFields = pResult->Fetch(); + ScriptPointMove pTemp; + + pTemp.uiCreatureEntry = pFields[0].GetUInt32(); + uint32 uiEntry = pTemp.uiCreatureEntry; + pTemp.uiPointId = pFields[1].GetUInt32(); + pTemp.fX = pFields[2].GetFloat(); + pTemp.fY = pFields[3].GetFloat(); + pTemp.fZ = pFields[4].GetFloat(); + pTemp.uiWaitTime = pFields[5].GetUInt32(); + + CreatureInfo const* pCInfo = GetCreatureTemplateStore(pTemp.uiCreatureEntry); + + if (!pCInfo) + { + error_db_log("SD2: DB table script_waypoint has waypoint for non-existant creature entry %u", pTemp.uiCreatureEntry); + continue; + } + + if (!pCInfo->ScriptID) + error_db_log("SD2: DB table script_waypoint has waypoint for creature entry %u, but creature does not have ScriptName defined and then useless.", pTemp.uiCreatureEntry); + + m_mPointMoveMap[uiEntry].push_back(pTemp); + ++uiNodeCount; + } while (pResult->NextRow()); + + delete pResult; + + outstring_log(""); + outstring_log(">> Loaded %u Script Waypoint nodes.", uiNodeCount); + } + else + { + barGoLink bar(1); + bar.step(); + outstring_log(""); + outstring_log(">> Loaded 0 Script Waypoints. DB table `script_waypoint` is empty."); + } +} diff --git a/system/system.h b/system/system.h new file mode 100644 index 000000000..ea31a0c9e --- /dev/null +++ b/system/system.h @@ -0,0 +1,103 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 +* This program is free software licensed under GPL version 2 +* Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef SC_SYSTEM_H +#define SC_SYSTEM_H + +extern DatabaseType SD2Database; +extern std::string strSD2Version; //version info from database + +#define TEXT_SOURCE_RANGE -1000000 //the amount of entries each text source has available + +//TODO: find better namings and definitions. +//N=Neutral, A=Alliance, H=Horde. +//NEUTRAL or FRIEND = Hostility to player surroundings (not a good definition) +//ACTIVE or PASSIVE = Hostility to environment surroundings. +enum eEscortFaction +{ + FACTION_ESCORT_A_NEUTRAL_PASSIVE = 10, + FACTION_ESCORT_H_NEUTRAL_PASSIVE = 33, + FACTION_ESCORT_N_NEUTRAL_PASSIVE = 113, + + FACTION_ESCORT_A_NEUTRAL_ACTIVE = 231, + FACTION_ESCORT_H_NEUTRAL_ACTIVE = 232, + FACTION_ESCORT_N_NEUTRAL_ACTIVE = 250, + + FACTION_ESCORT_N_FRIEND_PASSIVE = 290, + FACTION_ESCORT_N_FRIEND_ACTIVE = 495, + + FACTION_ESCORT_A_PASSIVE = 774, + FACTION_ESCORT_H_PASSIVE = 775, + + FACTION_ESCORT_N_ACTIVE = 1986, + FACTION_ESCORT_H_ACTIVE = 2046 +}; + +struct ScriptPointMove +{ + uint32 uiCreatureEntry; + uint32 uiPointId; + float fX; + float fY; + float fZ; + uint32 uiWaitTime; +}; + +struct StringTextData +{ + uint32 uiSoundId; + uint8 uiType; + uint32 uiLanguage; + uint32 uiEmote; +}; + +#define pSystemMgr SystemMgr::Instance() + +class SystemMgr +{ + public: + SystemMgr(); + ~SystemMgr() {} + + static SystemMgr& Instance(); + + //Maps and lists + typedef UNORDERED_MAP TextDataMap; + typedef UNORDERED_MAP > PointMoveMap; + + //Database + void LoadVersion(); + void LoadScriptTexts(); + void LoadScriptTextsCustom(); + void LoadScriptWaypoints(); + + //Retrive from storage + StringTextData const* GetTextData(int32 uiTextId) const + { + TextDataMap::const_iterator itr = m_mTextDataMap.find(uiTextId); + + if (itr == m_mTextDataMap.end()) + return NULL; + + return &itr->second; + } + + std::vector const &GetPointMoveList(uint32 uiCreatureEntry) const + { + static std::vector vEmpty; + + PointMoveMap::const_iterator itr = m_mPointMoveMap.find(uiCreatureEntry); + + if (itr == m_mPointMoveMap.end()) + return vEmpty; + + return itr->second; + } + + protected: + TextDataMap m_mTextDataMap; //additional data for text strings + PointMoveMap m_mPointMoveMap; //coordinates for waypoints +}; + +#endif diff --git a/tool/VCProjToLinuxMake.exe b/tool/VCProjToLinuxMake.exe new file mode 100644 index 0000000000000000000000000000000000000000..1862fe32e3e4d2a9cbbfa92cdc549c8416fba10c GIT binary patch literal 32768 zcmeHw4SZC`b??;&u!04x9m&SAh_Csu!GI75Y(QYGgf5mG7Oy^*566yJq!o9Cv@7q2 zz>RTn7PV}aO`HZdxTTFK^wnwIgyd0MPF!1j#K<;jFd+_(X`bRJ$(5xhYNHxCmc9L- zGxzS^6~f>;dB6Ajy)K@exo6ItIp@roGiPS*%8vUVm$D>D%0@~gB&iEIeeC@G;a?i6 zr`__MY0|Nr@88;$vF`h~)~Vj0+!pX}3%Fb52Di`W56N3Saviv zI(71Fo%EjDiw|_KeehKy?aF!e)#G^nX|Mb=K{QSnNr#SzYSHFk+SG#X}^#t7h1-&bMj=CkO;7XN% zSGJ59n=RlWR3H8{zKAc9l?L1Nks)nipwS&d-}~mFVhhq8NX#&D{bNVh zg#t|~AR3P&kt~0NWct`8sk<-`3^V}7vUZ|C_>Ul&KK3!9n5zD#_@=#tk11Ae%6;HD^j3XjWn^H|X=Ox^9T5Vi)3X(Kmt2>-zdJ=V zRbTuv=;c0f{0ql*)i6V-Z%(N1y6jTpAtLOoJ~aJtyHxx=XIvR>JWQadV<_erO5}&2 z)ziu-fnv(gX=y2qh{IBi%E)mmw7!Mw!70>?Cc}-_WlQ8mdwjOzIi44r}1PQG+Is_=}e^f zyWGB}jo<&Z=$qMt&Ra}6cMP4*V3oNnkrURMkEC`UYh7RH|72>sBZC$Ch)0zn^PnF+ ztsJA_Qzt_;amV>Y{%$eAHO_7Y*ovI8MwK%$*O{oR z2j))F#*`kgZLsAyA9*<=>Nqdhx{$~phb_U3uwU@Ad{c6MVRnzh&tP@zOw==^J$N&E za|~*8usrE=t(gJmGZ`Qz*PvMg=GnmW1^uZTll_f5pN(nk7}DM|5yoQ+5w%1)*DX&7oRSxI9<{`{_h`AX$iPC=KL$SB%0nbc z`e?GgQ|rM_s}#=BSAc;VN&g^UmN&oL`s8yIq+NO!YeWqHrKlM6X}uYZ*=_U7lDLe8 zdgwdq&|(fv`vLUU(M?_S(c~DIjx_+<(zJDT31br(qn0(}uv2QZW@ z6C5Y`C9xS_t0KA4ntfif-g4;zDMovhNU^F7e#sxE{PVc}Net+a_C=6R`YMD==rZfx z>_mR&7Q2-DOm|0js0g4Gd?(-l-b{vuxo63$&W^p3$R}{DCz0=@JiUr2VI|#LmW_Ud zcO6Riee6CL9t@b~qef)3 z8kk2^*&kE(g9aQMDmr83hVSdtzKzBMD;QhpLrcid!6m$)tIuF$7vyfnKkcV?CD-#V zX@*@onY4*ct@3xQl&FHa-)Xp|PT`i4yv`!x;6Ujd$1Q;|nx8EDWLEXy_LmE?uxh$G zqxa^)WwT3xAMeD%$z=MX<<|ZVUi~{`Ww!ZBa-G1imbcbrN_`k4gNNpW|A zMJ{TGr%;qQnuP|src5MbF5CRG@N$p_3Wlow6Cw{R1DM@(XO@!|cN_CeUbs_RidBRa z_qTVl;;8Sg6`vA{V@6DENvvuc2cXOzp1~UTXmx5Uz!_{`S2znq5nTUX633BO9d{f_ zib%&RVw|H&w;%(yyU8%XT+G!y|1~y_f0|5fg)+N=LHdn3y65*mc599H4yw^*Tsfk* z%%TO8YMvG~NoLSBhm)z@Q~hT@6La(;%6&^lAMm8+^5yWw6EC8qRZ z^Marx<{FA#XUrrDQ_PN)9eL89VuAI^G%Dm(Y3Cq5dOd<}T7q9dxI?>{wDrrpe{_If zeeDyc5@`Qn@#8_(%}*Fh_X`X<+i@;zP{TTo1=XHCzbxAbb4=2k*CXJG z_%@T4+R<2MR#`SJvYRlMum;ZnQ&^ZYDa*;K#G*|Vgs_})5igkIFHpITgAiWfuS#VV zQAu0scmNG~MMS8@VL{;F>ic`>=Q_3|iepSmut5*?xBeQmnD6v@9`6xYUDcn>&WY?A zmD(*piz>rppTihLNIPs$)#>T>^$o1om)jS1KNPKNc62C$2V-=?mhJDruZ(6rluZaf z__su&q|LVDrkJR3jb;V7;u)^6290)#h5gYe4Uub97|3|LA0A&=8@!Z7`!dIM7PB_Q z_!oEYRlt}dfjxc!c2u-A`k-2SOt`Y#XW+Y)*&rdq#Zi5pQ|n+svuO`et?kqwI1-8R zgG^x=DIWSkd}T@b6T}}|5OrMcQ#?bbl|d*M+O;|p`Nv=nn9S@vOcCJ$fIGS$r7eOv zA|!B$qCGk`QY83%MT;t@Xz)%6@~3#mgA)zMMQzo8CK84Z!{dYR&=AoCnuh2k(u4j7 z`+G3vSo*L_H8FA!lxYo7y61G$#2&Hd?umi^Ko0y?q#p+geUV*#(xZO_tyV&nPcK$z6$jI|Giz9LJajCOk4Iy!qfyuSxN-qXKaaDGqX5I! z_A1}Zea7|8j&mW3rv%3X6Z&_+F-3L_O5qjb^z~GXcg^Hzo=W6*GyNkm*O3yJ7RpId zq2{?A*DBNDar!w3nGQpygN958VvYk*$5}(B{V~`6sOwBzIZG>-S*EW*rmu`A6P=!z zMqxjAADG>o(M%h7vq3z73VmF=9=}b56*T%ZQ3q){q&69ZN^Vx6;~}UmL3YviTXGIP zrWJ?Q?KD@C^iNlqKV>`pSZw?kEub|Adjp_HXz#^#656V7?IG${AB6aM5 z{)jR5Cczlgef8zE8l8W;ktj~0Sv;!MS91g+b&WZFSiqBmNTOuO`!RgHie229? zzd#hMQ51|LFU@`jmKBEuA%3;?7dP-Q>xu*Y52KfD&|8{DZ)hIVJN~oGYVF>!^i1)j zIPm9y<*N5x;1BVa5l0zDo|Kh_J@=M%O{C*a#|VyC`M`A)!>2CuVoUd4n zh&qb9yZtyT6*Az}=%W z1p?;wS9xW^P;+2dt^GPpr2SK1e_vE!^x!E+cZo-5$~Gn2d<;BZh!+t z2a#@=6V7Pa*z$=oRj#GV9_>rW2F{TIIr3=lFO)`euu%V6*l?QvrS&xFYaP0g)3LE;*B`WPyaMy;Gj9L6Y-)5t*0aSf4fL8A z06y+7(#@atB6I)*PeH7`huQre&F<+myMM;Q{?& z(6t|dP1Z7=v0r*FWzUhp*_Z8=V7)1eu|o1#E8ewEy!nI^sMZ zbDfX6a6>vut7QzqHcU$lEnx5t2zd2d&w;;#`I}cTxB-1!h~FLC>W5vR4e#AOR^#2pYM8OHW0Nf{g1Q0731SS?1z)?^RN8n^{~ z@!neR1;iky=F~pN>aYwPpq_>z{pe{3Zo9-a6ue*1Bj8w)+}RLmX&g?n2jl@<){zo% ziXx~&7sEB$G`+JY@PbK+Vhzg>4pB*XdK{V(mz5Un4TOlW>i!>+^*V;&Aj71|64yuw z2kNw$!}5BHg9S{&q@TtTO9zHgM=y;Ad3cQO2#+qNDBTtG)@X6jY#@v(oQsDQlg#=M zGHb)=iU)A0M%%1+h21s@1XICMK+@QCVsp`itA-#>)Nv7~n9%J-r*@0p(ip-1LU`o# zIY#~lkhgR+!?odL5RC(vZ6m_Div5TFp#6+dY$oR|)>96`ml{oI zVYuCB@+rZfsR{Fg{`TnoC1Z$UMm4qtX8!>GV#1k;{@^d3OgsOXo4kM0#@;_+;zFZ1 z3`pef!DQ2Y79GCOik)(GJf85!7FbPaCLJD#B`Z&R?_Jusi>p`d1tHJCsms@JTWSs0 z&_rLuZ~Rp9NW1IwovC93P#3R{2zLqg_#pkV0|JMJgZ&(wG8>~R^haFI=7T_$8XU2JP-Lz%1`R=%jWgKcG-FWdHKA2sJgj8oBReZN0{8Y_9DA9DReyt zbq-D3gkWmWd03xV5c))1M54jS8&hw2iS?9^Tr`Y74Jzc}^_E`C6DlyhfcI}44kAWR zt#SrFKp%SFiF!Jd!TWPmvZ6%qV(6F9N$WD=L3sCM@EsYMoBPFo;FT>6+@0}ci}J$Q|Azu?M07W=-pQY z7HI~7`r>XA1kaH{G9;5mNL*!9-)4+Nc8y4nu7rP&yp5Ny=yehyJYEx_ca&)HdSnZo zKn_7>a7*g|Cj2b!eC|NEVaZ|;&>zLCR`ze$&6xWoS0(I>2xPLyune3tacjg6o6YuY zyw3%TO3r!!+#eZ1NUI2Hpv zYJP=Kl8@jj&2{uI95dV4bNm2);4*y+b3`zH7Sg3DQ}_oGfDCQS`VXTJaP29My|Ffu zY1_uKt#9{iPHnf2he<)WCVGfeXaN*(ZIi%bR$veC?>VXWKO%#d-xnr_1o0O|R`I%= zOx(y1Oh&{JUngbK>q;&S!OSk~^|XkVk({0yUm07*$_5K0G!9@46wnpOLjNEbby)}g z3YfI8&!N?$KSL*X87>?$CWlp@6Mb~YVN8o&vA*lu7P_H`oSK^)&b+H!sX{-OPm)Ev zo-c+)@DVK?b{yfWQ92KXNBXM%!27@SBUjK9=fQOT#_Rpt;!<_Yc`Kc@(FDMG=W~pp zpLgms79`%CL(>wi-JG~sQ+{&iCxq@!&^AT8Y#omkmv{Fk#KUYkvW zANUoDXE0QxmT}@4-2wg>BmUsYlBx9mc{ua8C;QJ~MM%uq>9*sWUW9JWQ;+)WlGa1f zk7ra$IBYvt!pqF3qen}^l{fHjyi4iBdpO@u9)9X*{qlbF*8IbsQDJhM^9>AA&7fv)bZ^pWDqpr~| z{Q67k|5toPmz@EZ2DO{j{nTh5H5!G)n>U}HK(w$TODi7i3tMWzUJ-a$F=INwp_^37 zv`-K!$WN|q&a6%36YLNvB{p>gxY3NnGI~lZBON7{k&?7dJ`1uQ?!m)~8PDT8d>7pO zFz{h#xIN6lX3<%#<&okxpM*)l;2693O&xy{@YjLU6*EW#I@WRGNtf^t5!On<_{lEE z{gTwQ0z87_?BebL$Dvgy#&;9ovE}q@v2cIxvz5~ydv^+~E_5?;vb=pPrsyz>ZBdZsHq7=5Oo=R$OA&S}#u9-`Hg>$H* zYyuZ|pVVTg>Hiuc0k;0f2IpqsM_?Dej1H!rr|0E`+TlTZ?&yWvIz3@7${F}~h$;_X z1gEDboW*xew$y!k!g-WvRPqLcLE=bL=gH3X- z+FwHVShpV(Nbt`w*ckcA@Ewtzwyf~%m_2W`JmD)hh4NS5O4+p4Gbx+2TCzWx5uTvk z4P9Vc0so`=z`sxdMmaHO6QqKlw&5mClYy03M&=b;wu;pA`etk-BO}5k;zc09HVzN6LHnWpu^u+7HODrSnL>n~fjVrx~_4}M~rLkpXyns8kUt~&f^A{80zQpUojKjT& z*U7C>Q^PZ3cTIj@dmVoIBs%*#T4A=56DH5R9!y@kaC7&i3!5uRBOAJo!2i8KUmIg1 zB`*bYW0T-FG81Pbr?X2w2>g5fXBq2h!lJJ$VkPEOf>YCG6h-b9ONc((UoY*Ey)*B`71tynAy62X>9?*)rVI67Y1V7Cms6`ksVT*^z6rBiCQU*A} zKL^vT4VDPa5|T>JNxK93Lr?-0xnM~P3FZ_vPOh<_rX*&ceO$Zc(pmiYP9GMt&5AcA zgip;VKDQcfu$x6EpQ_^*cVFHD>*?qg*uoqMddA41+brTLLn?k}gGO6H1jFcl>IV8~ zCm4|T*^{tT)+2VpJjEiO5e_J7H@>+3m-g>|SHe$^OHPNTcAO05TsnK09KgVq4RM^C zCh`}c!&rEPh9|{d zI^JuWG8A1#lkw8)(Ph-ZXX`&hUO^_?o->=j=koUg{x0J0rTlH@?+Sby`{U1jCK+!( zHkb{A*F!#R(oU-sks0#gJ1e9fdK_Fj)gh2VbcQ<$b^2DUiyA?-hkil> zi@;Yk3iYB8>p}cL;!UOI)vAm(v3zP&qpeCuDemq+kJrNR!i}ANVgSp`u8zlt@s2ju zMKsVYDfR?`a2*ogH$hY$K_#D?hrF?T>ZV3*p>6~T^`NQCm&E~=Q|mSg&x(S<=jjd! zg8#83QFrJ$VQ{bybYooEU&vg>Wi1~Cq1B%|NG=yzN}2)W;b(HA3~ zF)&FVak zax-v}YHg&B>dZikYGYuV8JMGPV&FbAaI$)kflrx%Q`CzLJY@!2RjY?O>NNwWsx}6W znt{{QItEVvok^lx^#B8xnt?X;H<%moxYG>0PVHmN7BldA^#)e*UNi6$s@z1)kC=gZ z>M90yn}PZ2jokdA8F+)bjxk5fz#G*T2Ilc3(uZTZx|e}PX5dX~7X#OsfuB^p+>vSq z-mJE4BR=<-fdy(O13S&Y8R`%NpEmI>LdI&Zn$yXJEG(c&oac zn~M-j$DFC|WZ;MybC!CHfq94{lcqRZ{Y$1@)-Csa7wE`Meo;hdP&m7tFx#+DyGSnt?^?Tn5rlO_DShtD6{j&9_>-;S^uec$9_SG>pQ64 zsMtpp+V!GmI4ve8=)_Y!#p92dDk@SH+H!7b%Y7zJ0a3@xxqE($0aS-+Y=A}`{` zcs!fPzhKe>_*U# zn6rmM2S;9F4)GAHn{A1gTVwYQ7x!p40<}wO!;j9+q95}P@p60(_`iA^_zMWXa|}K< zMg3i8(6K>&1n6CazKPHu8iRg@UfmJ=DCe;m%iS{-dW?9^e?Z5YTyZi<>MTgL5~+Pe z>NX}te}_SDf6UbW*m&)`(0(D>$L<|PX%u1VAN zcM1(QqJhvK-VjK1S%YXgk(<(w2GjA$3T`K?<%C6ta0c&Ud`<~``qgE6!^hF^*T15U zNcDXvb)6>?e`O|t`=9=<7fkZd^y(s9DFoby%(&d2*nG~}hbgH~^Eoul_1zJ3pl^!w zav!+@z06x6z05lwz04aPz0CU@z0BJiz0A8Bz08{#z07+Uz06w|z05lnz04aGz0CU) zz0BJZz0A82z08{sz07+Lz06w&kwY($HoAO3LFLV5_mpSa$%N*_NWe)Q7vI;XaXmUue z!#R@I%N)S#WsckRGKcGWnWJ>Q%)z-{=9pYBb11HtIRe+q9C+(xj<@wPhuM0Wqiem) zLA73<3-%5ED@QgFn{0_Zp<3T9>V>Z#4bPZ6MOjwy`}F$(>!!EMAv$jD&B z<$QrwH_W0yAI&{--6~35MeUeRw_+PjEAJodvv#i}tw(A>+Ksdy=_t~_Aiae&ie!yS z(oCe~NJV(2Px&rM`aIGpr0ho}X)V%jq;8~4oS@VoeFy1xNY34o^fyTVfmHsOB%Me4 z=_8W#?au=@g8q>XAe~3D?UAGnNbN}bk-m*|7HJU4(t$rqhjc$uC)yY7l%xlc&qg}? zIZ1jHX#vu=@%QL5k$NANq(4Wx0qG~eRnZ@PPW*`^y@K>Q(pyMFNE825l0J!a2hvKU zN~HUdT97`EbP(wr(nX}Vk^Tc|6logtAtN0Fji-_R2IXAK7O`e8OP!9R|F&J|D z8r^|L*&hzIg+qnJ%S<`oaW{H>+hk85;19@iL1?RcYs zW^x;Uo5yErv)+&Xz3pIgnYUgK|jIN;r;hUBlyONxq?Ex^~E^mUi)aIe1y ze|vJ38Va?oT(oG%jva-qZr?V4kVFU9h5o>{MR!ZHKx>wq_BSjcaZ|wKk%RuG&<=ON zQzAd?57S?^geZ+*GvM7Ch621H8R9O2O!)hj-X_@FEP{o7jh+CjBjgFR24#N}Kisq4 zCEw%mc>?Yh*%{v2;%$)Ec^f>wphtG&&u0=Os6xG4nGPv;E%8vR^B}MFgD{V0iR|&B zJ|JT#gBV|ViP48naDnU(fS0-M5HTK*{cU6h^T6%Ha*G>W87)bVj5>s;=@rSDjq8ezUx>tfr=Heck2~v|s}#z$&=t5O9zI0VO*~iukKE`9xxFnxC_u=+83P;ye=Uu& z>Tbs$FZDEdyzSu5EjPf#3U)*kVm z8s!CYm9L?2fxK*mT<3wRJhHRJ-QZau*M@2K6&DvRkjwqSkl(jJc9h9QOBOF)yl`Qnr3=)w=O2!Q&dIQ*LT;Zv%rE8?UdSCEVxnmrePffRhFl@}Ej>i;!*+7{`3n346`po+=f zxM-Z3Cj4nz&klcJ`*@YxP?rwZyI4d_L&oy37j~ulqhLe8+ZK{ryjuhAz{526MYjfo z=OjG{XQiX3o(E1j)X<)I|K$cebHh3;rj-kfd4eP;x7;o7ZZrzHW;W26}mKa_}CXeac z2KvD?+gM4{d5r>M{+8gPZE%I{K7-PjN3_kkHZ+N8u4G;z4mE;4LLo2^#QZ9ARvByw zmH=Dl^=+5k+uUAXFa*29%G2oaHNfamSLxrO3yW0@uG(<9USE@cCF&Q-ejk>yt>JB$ zU^_8S$g6o;J-(2qk?OaGTieJlB^yF>>*^e3v^3SPan;l)>+4n~0X52os@kgi*3Vy@ zf|cE)a6j(wHbIujdC@_j3H|_*Le^{Q2ULsF=+0lvZ5PU01ODys%6`~R8sU#Xw}|*i z3ZhGfNtzBf1k@{%_z=>-9mfV?xMdX;rWp@F?L721KCa;(7V3kwkOm9hBH5eH-Mp11 zn88^Z5NuI5WcOu_jb2(sv3irAWQS->fgLK8hd+1C5zFoDT50{f9ph5Vvpq=e%pGnC zVZl*0)zy^MS5(#3K_JYj935p*u%TYZDr{(LqpGoW2kV5^eAyW zg?#cA5_QzhZhlqW-82_vTE-;lOe>D`Y<9_p*m5_@Mc1Q@RD|+TyROt+~#R85`b7 zOV$IBmgeQT%?qtS9*Q#?;d} zuz~+~<#y@2Nc1th}b)6O=vhu#%JT8BiR$MrUy#`BoA)aTG0!sfb7?TT!6YA#&_jCeR(XP4+b zGaAnkofadQzNn7*b)|4;x7ke?siJ{fWWse`1=kB)`fSnLWTO1YRoZ-AZ_{aNbMz{0 zhICxwvF|Fl@`jYGHk=lZ_c3I3ns8TL1$VazSG@}EQ4{X|tKbrUhE3T`%zm#h^+fzq zItyAf=A`FtlnK^5hQ1-2w9$^*^pD;2=($a_Cw!tuc~L;nCto-nWrEp}n?DBqBG5PN zZ|4{s1K+^iV!}Og72L_Wq^dX;udy_d|ckbCJ(Nelzmf$ZtnJ2YE5_+mM$cza9Cfk(1Bgh@67S2IO}j_amQ= z{By_`ApcY33z2^XIqliLhI|q7e?VS@{8{9Sk)K4q1o;n;7bAZY`BLP+LcR?7Z;{`L zJc0Z!H5%~(_vyiVuz6f~<^5w`$&NAeyk#9nNH}Xd0rO5rr$+pT+o*S~` z`|=Oz>tcHf{`n5j-2z?jNWmKaM3RO9J7U7CiJ~5`@jm}^M*aWJ8TAcPY3c0JJ1bnJ zvl|eP*M|abZzyQ5um?kpcKe3X+4^C#KLFTby8v%4D=S0QR(H_bP>+KuY@l21S0G_8 zvIBWBzRQzM#HqoRT8!y*i5(>D_e-CjSlWP7M!`XGlGfF_Uu=hYZ(}JdufXD%4pUN= zrlkDnEJI#M?JTbV@88NP^|kqfc0*?$l^PGmlB#m})+wc7Ujt4I)KI-=XM=~&e~nS8 zU%%;o=>*A&qyHA{DX(3{+(X*9(rNfLjqArz5_A*gv2lFVv8iAGu?(sRJ^%HT(%=qv z+s7M~>M~^$892=JeyM75XJ%qys0SXOnpQUS|qhrV$4<4ZOa7P2+mbd~01N+sq&CAyX#nNV7PU$ALs zlE&5MFB>K)84O7OJf$?`^(5O~3**j|d0wrnC3fm#BRE{=Pai+bgKLqJc|42uE+1~_ z(k$SkPzVY=Hzei!2zn-)c{`_+F4>aJ{Y_Vy%1Is5DA6$0WR#W`8CG}A%}IT8%`Lsx z+A+CF?pV6jQrgslDU@RV8hICU5FE_NDlNS;$@{gp#@uk;NedfI75=v0PZs;t$)$lt z8hwN2N3^=D51z2Q3XHlZgnQP|M=@|rjLQ1;#ODFD4{t?pNk&n|N%)oK=9pCv{!5ra zxq@X6?yRbcsP;p8T-P*yY@$^dVy5^Od7s}S!KH``>VF?%gF%}AUz=2lYl4q0FUJn` zwLAoLIUfww<8m+H#--b}kBG30MH5T6dbW8}6Z&HeZ0YRZ4^Q=2mlhi{;=jjFnZo|o zZ}u4fZA!_-O=|zW(1S6+{6F`5p+#0TA-lA+zQR!0HM>+^QQn0|OSQdbr^;=Qur;?B z5h5I0k_YJe!{R&kf=f7HkS1A6cX%5^svW)$!A;Pk`wA@VysBHSP+zW8LU@^cI_`nT zwidNtu#|4|`x`H>RN_}4Bpsr|49pWIKGZU{+S5{ulJXo$+uZMurBpLj#?r&4`Awj-^$gvBdKL1{roeS@fZBtxJyN%fl=+CsPp0x9WCwy5nyJFgEu z)7LI#6Sv+F^(0M5mFqpyDp2$Ln!FenSaT!27}esDevYe0HD{vWnDbrH`^;;9+D`5I7B-v*@+U%i56y}PZAEe7X5=sOU? z)gJDMw?TcX-@hF<;UpDp%<5IVL)794EERqDaCTG5Eg?&jzrGPG0ZJf^o5y+#fQm^# zrpVQHyAkvLGOIq!;iUBE-~d+T_pyT7GwUhHlnS!yb;yA26L{E(OL9L(*Vo`#gZHOsgqkwZcb&IkI|C%?A5FZ}v3XQAO48q(pgM;D-$!k0 z9}b2*t##g3Pg#(zC8;ERTB%vDtSer^6Iu#l4A$)2xt69(r5Ilv)!i=<5PkS}Bqbd0 z$*y%?SC^#b4A#$ybS@bGDMEq=TpQqS-D z>9taNJ-f$r1T$^CyI9Z1Ny*lKczyi;+5?^2)2+gEd?W3qC;Aw08he~Q? zFV(G{+2n2sdS>3eYEhDQdgCO06UJq|uUeGG>#9Xbp@j~TuOk_GF{iHehlqb z;r*o$#FuGqub#QX>nmO|Q})3bt)A&HMxk)S8m!K1YU*Yh?49h10b+-`JJfa7g#^-dAN>V9KxVAH7ws+ymf_pv1jpePw`e# p%UEu7K36RoUxF08fn-g!zuSqJqN1W|{XLryYjELzo Date: Sat, 17 Oct 2009 16:55:59 +0800 Subject: [PATCH 002/405] Created empty folder for SQL files from patches --- addition/here you can find SQL files from patches.sql | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 addition/here you can find SQL files from patches.sql diff --git a/addition/here you can find SQL files from patches.sql b/addition/here you can find SQL files from patches.sql new file mode 100644 index 000000000..e69de29bb From 37ea3550a9b70b8098aa12eb1ca2fd0df6f81b98 Mon Sep 17 00:00:00 2001 From: Insider Date: Sat, 17 Oct 2009 18:45:53 +0800 Subject: [PATCH 003/405] [patch 1] Improvements in scripts for raid instance Naxxramas --- addition/1_mangos_naxxramass.sql | 5 + .../northrend/naxxramas/boss_anubrekhan.cpp | 314 ++++++--- scripts/northrend/naxxramas/boss_faerlina.cpp | 221 +++--- .../naxxramas/boss_four_horsemen.cpp | 353 ++++++---- scripts/northrend/naxxramas/boss_gluth.cpp | 143 ++-- scripts/northrend/naxxramas/boss_gothik.cpp | 560 +++++++++++++-- .../northrend/naxxramas/boss_grobbulus.cpp | 77 ++- scripts/northrend/naxxramas/boss_heigan.cpp | 38 +- .../northrend/naxxramas/boss_kelthuzad.cpp | 583 ++++++---------- scripts/northrend/naxxramas/boss_loatheb.cpp | 221 +++--- scripts/northrend/naxxramas/boss_maexxna.cpp | 184 +++-- scripts/northrend/naxxramas/boss_noth.cpp | 183 ++--- .../northrend/naxxramas/boss_patchwerk.cpp | 182 ++--- .../northrend/naxxramas/boss_razuvious.cpp | 4 +- .../northrend/naxxramas/boss_sapphiron.cpp | 104 ++- scripts/northrend/naxxramas/boss_thaddius.cpp | 72 +- .../naxxramas/instance_naxxramas.cpp | 640 +++++++----------- scripts/northrend/naxxramas/naxxramas.h | 80 +-- system/ScriptLoader.cpp | 6 +- 19 files changed, 2211 insertions(+), 1759 deletions(-) create mode 100644 addition/1_mangos_naxxramass.sql diff --git a/addition/1_mangos_naxxramass.sql b/addition/1_mangos_naxxramass.sql new file mode 100644 index 000000000..ede64447e --- /dev/null +++ b/addition/1_mangos_naxxramass.sql @@ -0,0 +1,5 @@ +UPDATE `creature_template` SET `ScriptName`='mob_loatheb_spores' WHERE `entry`=16286; +UPDATE `creature_template` SET `ScriptName`='boss_gothik' WHERE `entry`=16060; +UPDATE `creature_template` SET `ScriptName`='mob_gothik_trainee' WHERE `entry` IN (16124,16127); +UPDATE `creature_template` SET `ScriptName`='mob_gothik_dk' WHERE `entry` IN (16125,16148); +UPDATE `creature_template` SET `ScriptName`='mob_gothik_rider' WHERE `entry` IN (16126,16150); diff --git a/scripts/northrend/naxxramas/boss_anubrekhan.cpp b/scripts/northrend/naxxramas/boss_anubrekhan.cpp index 2aaf57c6f..7661cc680 100644 --- a/scripts/northrend/naxxramas/boss_anubrekhan.cpp +++ b/scripts/northrend/naxxramas/boss_anubrekhan.cpp @@ -16,167 +16,287 @@ /* ScriptData SDName: Boss_Anubrekhan -SD%Complete: 70 -SDComment: +SD%Complete: 90 +SDComment: timers may be not offi SDCategory: Naxxramas EndScriptData */ #include "precompiled.h" #include "naxxramas.h" +//Anub'Rekhan speech +enum Speech +{ + SAY_GREET = -1533000, + SAY_AGGRO1 = -1533001, + SAY_AGGRO2 = -1533002, + SAY_AGGRO3 = -1533003, + SAY_TAUNT1 = -1533004, + SAY_TAUNT2 = -1533005, + SAY_TAUNT3 = -1533006, + SAY_TAUNT4 = -1533007, + SAY_SLAY = -1533008 +}; + enum { - SAY_GREET = -1533000, - SAY_AGGRO1 = -1533001, - SAY_AGGRO2 = -1533002, - SAY_AGGRO3 = -1533003, - SAY_TAUNT1 = -1533004, - SAY_TAUNT2 = -1533005, - SAY_TAUNT3 = -1533006, - SAY_TAUNT4 = -1533007, - SAY_SLAY = -1533008, - - SPELL_IMPALE = 28783, //May be wrong spell id. Causes more dmg than I expect - SPELL_IMPALE_H = 56090, - SPELL_LOCUSTSWARM = 28785, //This is a self buff that triggers the dmg debuff - SPELL_LOCUSTSWARM_H = 54021, - - //spellId invalid - SPELL_SUMMONGUARD = 29508, //Summons 1 crypt guard at targeted location - - SPELL_SELF_SPAWN_5 = 29105, //This spawns 5 corpse scarabs ontop of us (most likely the pPlayer casts this on death) - SPELL_SELF_SPAWN_10 = 28864, //This is used by the crypt guards when they die - - NPC_CRYPT_GUARD = 16573 +//Anub'Rekhan spels + SPELL_IMPALE = 28783, //May be wrong spell id. Causes more dmg than I expect + SPELL_LOCUSTSWARM = 54021, //This is a self buff that triggers the dmg debuff + SPELL_BERSERK = 46587, + SPELL_SELF_SPAWN_5 = 29105, //This spawns 5 corpse scarabs ontop of us (most likely the player casts this on death) + +// Adds + MOB_CRYPT_GUARD = 16573, + MOB_CORPSE_SCARAB = 16698, + +//Crypt Guard spells + SPELL_CG_ACID_SPIT = 28969, + SPELL_CG_CLEAVE = 40504, + SPELL_CG_FRENZY = 8269, + SPELL_SELF_SPAWN_10 = 28864 //This spawns 10 corpse scarabs. This is used by the crypt guards when they die }; +static const uint32 MAX_CRYPT_GUARDS = 8; + +//Anub'Rekhan AI struct MANGOS_DLL_DECL boss_anubrekhanAI : public ScriptedAI { - boss_anubrekhanAI(Creature* pCreature) : ScriptedAI(pCreature) + boss_anubrekhanAI(Creature *c) : ScriptedAI(c) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); - m_bHasTaunted = false; + pInstance = ((ScriptedInstance*)c->GetInstanceData()); + + for (int i = 0; i < MAX_CRYPT_GUARDS; i++) + guidCryptGuards[i] = 0; + HasTaunted = false; Reset(); } - ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + ScriptedInstance *pInstance; - uint32 m_uiImpaleTimer; - uint32 m_uiLocustSwarmTimer; - uint32 m_uiSummonTimer; - bool m_bHasTaunted; + uint32 Impale_Timer; + uint32 LocustSwarm_Timer; + uint32 SummonFirst_Timer; + uint32 Berserk_Timer; + uint32 RiseFromCorpse_Timer; + + uint64 guidCryptGuards[MAX_CRYPT_GUARDS]; + uint32 CryptGuard_count; + + bool HasTaunted; //in fact says we entered the room with big beetle + bool swarm; //is active spell LocustSwarm or not, when active he cannot use other spels void Reset() { - m_uiImpaleTimer = 15000; // 15 seconds - m_uiLocustSwarmTimer = urand(80000, 120000); // Random time between 80 seconds and 2 minutes for initial cast - m_uiSummonTimer = m_uiLocustSwarmTimer + 45000; // 45 seconds after initial locust swarm + Impale_Timer = 15000; //15 seconds + LocustSwarm_Timer = urand(80000, 120000); //Random time between 80 seconds and 2 minutes for initial cast + SummonFirst_Timer = 20000; //45 seconds after initial locust swarm + Berserk_Timer = 600000; + RiseFromCorpse_Timer = 20000 + (rand()%20000); + swarm = false; + CryptGuard_count = 0; + + // Remove all Crypt Guards + for (int i = 0; i < MAX_CRYPT_GUARDS; i++) + { + //delete creature + Unit* pUnit = Unit::GetUnit((*m_creature), guidCryptGuards[i]); + if (pUnit) + pUnit->AddObjectToRemoveList(); + guidCryptGuards[i] = 0; + } + + //Remove all corpse scarabs + std::list CorpseScarabs = GetCreaturesByEntry(MOB_CORPSE_SCARAB); + if (!CorpseScarabs.empty()) + for(std::list::iterator itr = CorpseScarabs.begin(); itr != CorpseScarabs.end(); ++itr) + (*itr)->AddObjectToRemoveList(); + + //if anubrekhan is alive -> this must be first time we entered Arachnid Quarter -> close all other doors + if(pInstance && m_creature->isAlive()) + pInstance->SetData(TYPE_ANUBREKHAN, NOT_STARTED); } - void KilledUnit(Unit* pVictim) + void JustDied(Unit*) { - //Force the player to spawn corpse scarabs via spell - if (pVictim->GetTypeId() == TYPEID_PLAYER) - pVictim->CastSpell(pVictim, SPELL_SELF_SPAWN_5, true); - - if (urand(0, 4)) - return; + //Anubrekhan is slayed -> open all doors to Faerlina + if(pInstance) + pInstance->SetData(TYPE_ANUBREKHAN, DONE); + } + void KilledUnit(Unit* Victim) + { DoScriptText(SAY_SLAY, m_creature); } - void Aggro(Unit* pWho) + void Aggro(Unit *who) { - switch(urand(0, 2)) + if(pInstance) pInstance->SetData(TYPE_ANUBREKHAN, IN_PROGRESS); + + switch(rand()%3) { case 0: DoScriptText(SAY_AGGRO1, m_creature); break; case 1: DoScriptText(SAY_AGGRO2, m_creature); break; case 2: DoScriptText(SAY_AGGRO3, m_creature); break; } - - if (m_pInstance) - m_pInstance->SetData(TYPE_ANUB_REKHAN, IN_PROGRESS); + } + + bool IsVisible(Unit* who) const + { + if (!who) + return false; + return m_creature->IsWithinDistInMap(who, 100.0f); } - void JustDied(Unit* pKiller) + void MoveInLineOfSight(Unit *who) { - if (m_pInstance) - m_pInstance->SetData(TYPE_ANUB_REKHAN, DONE); + if (!HasTaunted) + { + DoScriptText(SAY_GREET, m_creature); + HasTaunted = true; + } + + ScriptedAI::MoveInLineOfSight(who); } + + std::list GetCreaturesByEntry(uint32 entry) + { + CellPair pair(MaNGOS::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY())); + Cell cell(pair); + cell.data.Part.reserved = ALL_DISTRICT; + cell.SetNoCreate(); + + std::list creatureList; - void MoveInLineOfSight(Unit* pWho) + AllCreaturesOfEntryInRange check(m_creature, entry, 100); + MaNGOS::CreatureListSearcher searcher(m_creature, creatureList, check); + TypeContainerVisitor, GridTypeMapContainer> visitor(searcher); + + CellLock cell_lock(cell, pair); + cell_lock->Visit(cell_lock, visitor, *(m_creature->GetMap())); + + return creatureList; + } + + void JustSummoned(Creature* temp) { - if (!m_bHasTaunted && m_creature->IsWithinDistInMap(pWho, 60.0f)) + if (!temp) + return; + + //Summoned Crypt Guard will target random player + guidCryptGuards[CryptGuard_count++] = temp->GetGUID(); + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) { - switch(urand(0, 4)) - { - case 0: DoScriptText(SAY_GREET, m_creature); break; - case 1: DoScriptText(SAY_TAUNT1, m_creature); break; - case 2: DoScriptText(SAY_TAUNT2, m_creature); break; - case 3: DoScriptText(SAY_TAUNT3, m_creature); break; - case 4: DoScriptText(SAY_TAUNT4, m_creature); break; - } - m_bHasTaunted = true; + temp->AddThreat(target,0.0f); + m_creature->SetInCombatWithZone(); } - ScriptedAI::MoveInLineOfSight(pWho); + switch (rand()%4) + { + case 0: DoScriptText(SAY_TAUNT1, m_creature); break; + case 1: DoScriptText(SAY_TAUNT2, m_creature); break; + case 2: DoScriptText(SAY_TAUNT3, m_creature); break; + case 3: DoScriptText(SAY_TAUNT4, m_creature); break; + } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 diff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - // Impale - if (m_uiImpaleTimer < uiDiff) + //Berserk_Timer + if (Berserk_Timer < diff) { - //Cast Impale on a random target - //Do NOT cast it when we are afflicted by locust swarm - if (!m_creature->HasAura(SPELL_LOCUSTSWARM) || !m_creature->HasAura(SPELL_LOCUSTSWARM_H)) - { - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(target, m_bIsHeroicMode ? SPELL_IMPALE_H : SPELL_IMPALE); - } + DoCast(m_creature,SPELL_BERSERK); + Berserk_Timer = 300000; + }else Berserk_Timer -= diff; - m_uiImpaleTimer = 15000; - } - else - m_uiImpaleTimer -= uiDiff; + //SumonFirstCryptGuard_Timer + if (SummonFirst_Timer < diff) + { + if (CryptGuard_count < MAX_CRYPT_GUARDS) + DoSpawnCreature(MOB_CRYPT_GUARD,0,0,0,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,10000); + SummonFirst_Timer = 2000000; + }else SummonFirst_Timer -= diff; - // Locust Swarm - if (m_uiLocustSwarmTimer < uiDiff) + //RiseFromCorpse_Timer + if (RiseFromCorpse_Timer < diff) { - DoCast(m_creature, m_bIsHeroicMode?SPELL_LOCUSTSWARM_H:SPELL_LOCUSTSWARM); - m_uiLocustSwarmTimer = 90000; - } - else - m_uiLocustSwarmTimer -= uiDiff; + RiseFromCorpse_Timer = 60000 + (rand()%10000); + std::list CryptGuards = GetCreaturesByEntry(MOB_CRYPT_GUARD); + if (!CryptGuards.empty()) + for(std::list::iterator itr = CryptGuards.begin(); itr != CryptGuards.end(); ++itr) + if ((*itr)->isDead()) + { + (*itr)->CastSpell((*itr),SPELL_SELF_SPAWN_10,true); + (*itr)->AddObjectToRemoveList(); + } + + const Map::PlayerList &players = m_creature->GetMap()->GetPlayers(); + if (players.isEmpty()) + return; + + for(Map::PlayerList::const_iterator i = players.begin(); i != players.end(); ++i) + if (Player* pPlayer = i->getSource()) + { + if (pPlayer->isGameMaster()) + continue; + + if (pPlayer->isDead()) + pPlayer->CastSpell(pPlayer,SPELL_SELF_SPAWN_5,true); + } + CryptGuards.clear(); + }else RiseFromCorpse_Timer -= diff; - // Summon - /*if (m_uiSummonTimer < uiDiff) + if(!swarm) { - DoCast(m_creature, SPELL_SUMMONGUARD); - Summon_Timer = 45000; + //Impale_Timer + if (Impale_Timer < diff) + { + //Cast Impale on a random target + //Do NOT cast it when we are afflicted by locust swarm + if (!m_creature->HasAura(SPELL_LOCUSTSWARM,1)) + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1)) + DoCast(target,SPELL_IMPALE); + Impale_Timer = 15000; + }else Impale_Timer -= diff; + + //LocustSwarm_Timer + if (LocustSwarm_Timer < diff) + { + //Cast Locust Swarm buff on ourselves + DoCast(m_creature, SPELL_LOCUSTSWARM); + swarm = true; + //Summon Crypt Guard immidietly after Locust Swarm + if (CryptGuard_count < MAX_CRYPT_GUARDS) + DoSpawnCreature(MOB_CRYPT_GUARD,0,0,0,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,10000); + LocustSwarm_Timer = 20000; + }else LocustSwarm_Timer -= diff; } else - m_uiSummonTimer -= uiDiff;*/ + { + if (LocustSwarm_Timer < diff) + { + swarm = false; + LocustSwarm_Timer = 60000 + rand()%20000; + }else LocustSwarm_Timer -= diff; + } DoMeleeAttackIfReady(); } }; -CreatureAI* GetAI_boss_anubrekhan(Creature* pCreature) +CreatureAI* GetAI_boss_anubrekhan(Creature *_Creature) { - return new boss_anubrekhanAI(pCreature); + return new boss_anubrekhanAI (_Creature); } void AddSC_boss_anubrekhan() { - Script* NewScript; - NewScript = new Script; - NewScript->Name = "boss_anubrekhan"; - NewScript->GetAI = &GetAI_boss_anubrekhan; - NewScript->RegisterSelf(); + Script *newscript; + newscript = new Script; + newscript->Name = "boss_anubrekhan"; + newscript->GetAI = &GetAI_boss_anubrekhan; + newscript->RegisterSelf(); } diff --git a/scripts/northrend/naxxramas/boss_faerlina.cpp b/scripts/northrend/naxxramas/boss_faerlina.cpp index 5a871fe8a..f979affef 100644 --- a/scripts/northrend/naxxramas/boss_faerlina.cpp +++ b/scripts/northrend/naxxramas/boss_faerlina.cpp @@ -16,145 +16,196 @@ /* ScriptData SDName: Boss_Faerlina -SD%Complete: 50 -SDComment: +SD%Complete: 80 +SDComment: Need core support: spell 28732 SDCategory: Naxxramas EndScriptData */ #include "precompiled.h" #include "naxxramas.h" +#define SPELL_28732_NOT_YET_IMPLEMENTED + +enum +{ + SAY_GREET = -1533009, + SAY_AGGRO = -1533010, + SAY_ENRAGE1 = -1533011, + SAY_ENRAGE2 = -1533012, + SAY_ENRAGE3 = -1533013, + SAY_SLAY1 = -1533014, + SAY_SLAY2 = -1533015, + SAY_DEATH = -1533016 +}; enum { - SAY_GREET = -1533009, - SAY_AGGRO1 = -1533010, - SAY_AGGRO2 = -1533011, - SAY_AGGRO3 = -1533012, - SAY_AGGRO4 = -1533013, - SAY_SLAY1 = -1533014, - SAY_SLAY2 = -1533015, - SAY_DEATH = -1533016, - - //SOUND_RANDOM_AGGRO = 8955, //soundId containing the 4 aggro sounds, we not using this - - SPELL_POSIONBOLT_VOLLEY = 28796, - H_SPELL_POSIONBOLT_VOLLEY = 54098, - SPELL_ENRAGE = 28798, - H_SPELL_ENRAGE = 54100, - - SPELL_RAINOFFIRE = 28794 //Not sure if targeted AoEs work if casted directly upon a pPlayer + SPELL_POSIONBOLT_VOLLEY = 28796, + SPELL_ENRAGE = 28798, + SPELL_RAINOFFIRE = 39024, //Not sure if targeted AoEs work if casted directly upon a player + + SPELL_WIDOWS_EMBRACE = 28732, //We will use it, but the real thing will be another + SPELL_FIREBALL = 54095 }; + struct MANGOS_DLL_DECL boss_faerlinaAI : public ScriptedAI { - boss_faerlinaAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); - m_bHasTaunted = false; - Reset(); - } + boss_faerlinaAI(Creature *c) : ScriptedAI(c) + { + pInstance = ((ScriptedInstance*)c->GetInstanceData()); + Reset(); + } - ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + ScriptedInstance *pInstance; - uint32 m_uiPoisonBoltVolleyTimer; - uint32 m_uiRainOfFireTimer; - uint32 m_uiEnrageTimer; - bool m_bHasTaunted; + uint32 PoisonBoltVolley_Timer; + uint32 RainOfFire_Timer; + uint32 Enrage_Timer; + bool HasTaunted; void Reset() { - m_uiPoisonBoltVolleyTimer = 8000; - m_uiRainOfFireTimer = 16000; - m_uiEnrageTimer = 60000; + PoisonBoltVolley_Timer = 8000; + RainOfFire_Timer = 16000; + Enrage_Timer = 60000; + HasTaunted = false; + + if(pInstance && m_creature->isAlive()) + pInstance->SetData(TYPE_FAERLINA, NOT_STARTED); } - void Aggro(Unit* pWho) + void Aggro(Unit *who) { - switch(urand(0, 3)) - { - case 0: DoScriptText(SAY_AGGRO1, m_creature); break; - case 1: DoScriptText(SAY_AGGRO2, m_creature); break; - case 2: DoScriptText(SAY_AGGRO3, m_creature); break; - case 3: DoScriptText(SAY_AGGRO4, m_creature); break; - } + //Close the room for boss fight + if(pInstance) pInstance->SetData(TYPE_FAERLINA, IN_PROGRESS); - if (m_pInstance) - m_pInstance->SetData(TYPE_FAERLINA, IN_PROGRESS); + DoScriptText(SAY_AGGRO, m_creature); } - void MoveInLineOfSight(Unit* pWho) + void MoveInLineOfSight(Unit *who) { - if (!m_bHasTaunted && m_creature->IsWithinDistInMap(pWho, 60.0f)) + if (!HasTaunted && m_creature->IsWithinDistInMap(who, 100.0f)) { DoScriptText(SAY_GREET, m_creature); - m_bHasTaunted = true; + HasTaunted = true; } - ScriptedAI::MoveInLineOfSight(pWho); + ScriptedAI::MoveInLineOfSight(who); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* victim) { - DoScriptText(urand(0, 1)?SAY_SLAY1:SAY_SLAY2, m_creature); + DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* Killer) { - DoScriptText(SAY_DEATH, m_creature); + if(pInstance) pInstance->SetData(TYPE_FAERLINA, DONE); - if (m_pInstance) - m_pInstance->SetData(TYPE_FAERLINA, DONE); + DoScriptText(SAY_DEATH, m_creature); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 diff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - // Poison Bolt Volley - if (m_uiPoisonBoltVolleyTimer < uiDiff) + //PoisonBoltVolley_Timer + if (PoisonBoltVolley_Timer < diff) { - DoCast(m_creature->getVictim(), SPELL_POSIONBOLT_VOLLEY); - m_uiPoisonBoltVolleyTimer = 11000; - } - else - m_uiPoisonBoltVolleyTimer -= uiDiff; + DoCast(m_creature->getVictim(),SPELL_POSIONBOLT_VOLLEY); + PoisonBoltVolley_Timer = 11000; + }else PoisonBoltVolley_Timer -= diff; - // Rain Of Fire - if (m_uiRainOfFireTimer < uiDiff) + //RainOfFire_Timer + if (RainOfFire_Timer < diff) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, SPELL_RAINOFFIRE); - - m_uiRainOfFireTimer = 16000; - } - else - m_uiRainOfFireTimer -= uiDiff; + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_RAINOFFIRE); + RainOfFire_Timer = 16000; + }else RainOfFire_Timer -= diff; //Enrage_Timer - if (m_uiEnrageTimer < uiDiff) + if (Enrage_Timer < diff) { - DoCast(m_creature, SPELL_ENRAGE); - m_uiEnrageTimer = 61000; - } - else - m_uiEnrageTimer -= uiDiff; + switch (rand()%3) + { + case 0: DoScriptText(SAY_ENRAGE1, m_creature); break; + case 1: DoScriptText(SAY_ENRAGE2, m_creature); break; + case 2: DoScriptText(SAY_ENRAGE3, m_creature); break; + } + DoCast(m_creature,SPELL_ENRAGE); + Enrage_Timer = 61000; + }else Enrage_Timer -= diff; DoMeleeAttackIfReady(); } }; -CreatureAI* GetAI_boss_faerlina(Creature* pCreature) +CreatureAI* GetAI_boss_faerlina(Creature *_Creature) +{ + return new boss_faerlinaAI (_Creature); +} + +struct MANGOS_DLL_DECL mob_faerlina_worshipperAI : public ScriptedAI +{ + mob_faerlina_worshipperAI(Creature *c) : ScriptedAI(c) + { + pInstance = ((ScriptedInstance*)c->GetInstanceData()); + Reset(); + } + + ScriptedInstance *pInstance; + uint32 fireball_timer; + + void Reset() + { + fireball_timer = 0; + } + + void Aggro(Unit *who){} + + void JustDied(Unit* Killer) + { +#ifndef SPELL_28732_NOT_YET_IMPLEMENTED + DoCast(m_creature,SPELL_WIDOWS_EMBRACE,true); +#else + Unit* Faerlina = Unit::GetUnit((*m_creature), pInstance->GetData64(GUID_FAERLINA)); + if(Faerlina && m_creature->GetDistance2d(Faerlina) < 15.0f) + Faerlina->RemoveAurasByCasterSpell(SPELL_ENRAGE,pInstance->GetData64(GUID_FAERLINA)); +#endif + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //PoisonBoltVolley_Timer + if (fireball_timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_FIREBALL); + fireball_timer = 3000; + }else fireball_timer -= diff; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_mob_faerlina_worshipper(Creature *_Creature) { - return new boss_faerlinaAI(pCreature); + return new mob_faerlina_worshipperAI (_Creature); } void AddSC_boss_faerlina() { - Script* NewScript; - NewScript = new Script; - NewScript->Name = "boss_faerlina"; - NewScript->GetAI = &GetAI_boss_faerlina; - NewScript->RegisterSelf(); + Script *newscript; + newscript = new Script; + newscript->Name = "boss_faerlina"; + newscript->GetAI = &GetAI_boss_faerlina; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_faerlina_worshipper"; + newscript->GetAI = &GetAI_mob_faerlina_worshipper; + newscript->RegisterSelf(); } diff --git a/scripts/northrend/naxxramas/boss_four_horsemen.cpp b/scripts/northrend/naxxramas/boss_four_horsemen.cpp index 6404ad960..6a083d26d 100644 --- a/scripts/northrend/naxxramas/boss_four_horsemen.cpp +++ b/scripts/northrend/naxxramas/boss_four_horsemen.cpp @@ -24,84 +24,42 @@ EndScriptData */ #include "precompiled.h" #include "naxxramas.h" -enum -{ - //all horsemen - SPELL_SHIELDWALL = 29061, - SPELL_BESERK = 26662, - - //lady blaumeux - SAY_BLAU_AGGRO = -1533044, - SAY_BLAU_TAUNT1 = -1533045, - SAY_BLAU_TAUNT2 = -1533046, - SAY_BLAU_TAUNT3 = -1533047, - SAY_BLAU_SPECIAL = -1533048, - SAY_BLAU_SLAY = -1533049, - SAY_BLAU_DEATH = -1533050, - - SPELL_MARK_OF_BLAUMEUX = 28833, - SPELL_UNYILDING_PAIN = 57381, - SPELL_VOIDZONE = 28863, - H_SPELL_VOIDZONE = 57463, - SPELL_SHADOW_BOLT = 57374, - H_SPELL_SHADOW_BOLT = 57464, - - //baron rivendare - SAY_RIVE_AGGRO1 = -1533065, - SAY_RIVE_AGGRO2 = -1533066, - SAY_RIVE_AGGRO3 = -1533067, - SAY_RIVE_SLAY1 = -1533068, - SAY_RIVE_SLAY2 = -1533069, - SAY_RIVE_SPECIAL = -1533070, - SAY_RIVE_TAUNT1 = -1533071, - SAY_RIVE_TAUNT2 = -1533072, - SAY_RIVE_TAUNT3 = -1533073, - SAY_RIVE_DEATH = -1533074, - - SPELL_MARK_OF_RIVENDARE = 28834, - SPELL_UNHOLY_SHADOW = 28882, - H_SPELL_UNHOLY_SHADOW = 57369, - - //thane korthazz - SAY_KORT_AGGRO = -1533051, - SAY_KORT_TAUNT1 = -1533052, - SAY_KORT_TAUNT2 = -1533053, - SAY_KORT_TAUNT3 = -1533054, - SAY_KORT_SPECIAL = -1533055, - SAY_KORT_SLAY = -1533056, - SAY_KORT_DEATH = -1533057, - - SPELL_MARK_OF_KORTHAZZ = 28832, - SPELL_METEOR = 26558, // m_creature->getVictim() auto-area spell but with a core problem - - //sir zeliek - SAY_ZELI_AGGRO = -1533058, - SAY_ZELI_TAUNT1 = -1533059, - SAY_ZELI_TAUNT2 = -1533060, - SAY_ZELI_TAUNT3 = -1533061, - SAY_ZELI_SPECIAL = -1533062, - SAY_ZELI_SLAY = -1533063, - SAY_ZELI_DEATH = -1533064, - - SPELL_MARK_OF_ZELIEK = 28835, - SPELL_HOLY_WRATH = 28883, - H_SPELL_HOLY_WRATH = 57466, - SPELL_HOLY_BOLT = 57376, - H_SPELL_HOLY_BOLT = 57465, - - // horseman spirits - NPC_SPIRIT_OF_BLAUMEUX = 16776, - NPC_SPIRIT_OF_RIVENDARE = 0, //creature entry not known yet - NPC_SPIRIT_OF_KORTHAZZ = 16778, - NPC_SPIRIT_OF_ZELIREK = 16777 -}; +//all horsemen +#define SPELL_SHIELDWALL 29061 +#define SPELL_BESERK 26662 + +//lady blaumeux +#define SAY_BLAU_AGGRO -1533044 +#define SAY_BLAU_TAUNT1 -1533045 +#define SAY_BLAU_TAUNT2 -1533046 +#define SAY_BLAU_TAUNT3 -1533047 +#define SAY_BLAU_SPECIAL -1533048 +#define SAY_BLAU_SLAY -1533049 +#define SAY_BLAU_DEATH -1533050 + +#define SPELL_MARK_OF_BLAUMEUX 28833 +#define SPELL_UNYILDING_PAIN 57381 +#define SPELL_VOIDZONE 28863 +#define H_SPELL_VOIDZONE 57463 +#define SPELL_SHADOW_BOLT 57374 +#define H_SPELL_SHADOW_BOLT 57464 + +#define C_SPIRIT_OF_BLAUMEUX 16776 struct MANGOS_DLL_DECL boss_lady_blaumeuxAI : public ScriptedAI { - boss_lady_blaumeuxAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + boss_lady_blaumeuxAI(Creature* pCreature) : ScriptedAI(pCreature) + { + Heroic = m_creature->GetMap()->IsHeroic(); + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + bool Heroic; + ScriptedInstance *pInstance; uint32 Mark_Timer; uint32 VoidZone_Timer; + uint32 ShadowboltTimer; bool ShieldWall1; bool ShieldWall2; @@ -111,11 +69,15 @@ struct MANGOS_DLL_DECL boss_lady_blaumeuxAI : public ScriptedAI VoidZone_Timer = 12000; // right ShieldWall1 = true; ShieldWall2 = true; + ShadowboltTimer = 3000; + if(pInstance) pInstance->SetData(TYPE_BLAUMEAUX, NOT_STARTED); } void Aggro(Unit *who) { DoScriptText(SAY_BLAU_AGGRO, m_creature); + if(pInstance) pInstance->SetData(TYPE_FOURHORSEMEN, IN_PROGRESS); + if(pInstance) pInstance->SetData(TYPE_BLAUMEAUX, IN_PROGRESS); } void KilledUnit(Unit* Victim) @@ -126,32 +88,34 @@ struct MANGOS_DLL_DECL boss_lady_blaumeuxAI : public ScriptedAI void JustDied(Unit* Killer) { DoScriptText(SAY_BLAU_DEATH, m_creature); + if(pInstance) pInstance->SetData(TYPE_BLAUMEAUX, DONE); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 diff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; // Mark of Blaumeux - if (Mark_Timer < uiDiff) + if(Mark_Timer < diff) { DoCast(m_creature->getVictim(),SPELL_MARK_OF_BLAUMEUX); Mark_Timer = 12000; - }else Mark_Timer -= uiDiff; + } + else Mark_Timer -= diff; // Shield Wall - All 4 horsemen will shield wall at 50% hp and 20% hp for 20 seconds - if (ShieldWall1 && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 50) + if(ShieldWall1 && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 50) { - if (ShieldWall1) + if(ShieldWall1) { DoCast(m_creature,SPELL_SHIELDWALL); ShieldWall1 = false; } } - if (ShieldWall2 && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 20) + if(ShieldWall2 && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 20) { - if (ShieldWall2) + if(ShieldWall2) { DoCast(m_creature,SPELL_SHIELDWALL); ShieldWall2 = false; @@ -159,11 +123,20 @@ struct MANGOS_DLL_DECL boss_lady_blaumeuxAI : public ScriptedAI } // Void Zone - if (VoidZone_Timer < uiDiff) + if(VoidZone_Timer < diff) { - DoCast(m_creature->getVictim(),SPELL_VOIDZONE); + Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + if(target) DoCast(target, Heroic ? H_SPELL_VOIDZONE : SPELL_VOIDZONE); VoidZone_Timer = 12000; - }else VoidZone_Timer -= uiDiff; + } + else VoidZone_Timer -= diff; + + if(ShadowboltTimer < diff) + { + DoCast(m_creature->getVictim(), Heroic ? H_SPELL_SHADOW_BOLT : SPELL_SHADOW_BOLT); + ShadowboltTimer = 3000; + } + else ShadowboltTimer -= diff; DoMeleeAttackIfReady(); } @@ -174,12 +147,47 @@ CreatureAI* GetAI_boss_lady_blaumeux(Creature* pCreature) return new boss_lady_blaumeuxAI(pCreature); } +//baron rivendare +#define SAY_RIVE_AGGRO1 -1533065 +#define SAY_RIVE_AGGRO2 -1533066 +#define SAY_RIVE_AGGRO3 -1533067 +#define SAY_RIVE_SLAY1 -1533068 +#define SAY_RIVE_SLAY2 -1533069 +#define SAY_RIVE_SPECIAL -1533070 +#define SAY_RIVE_TAUNT1 -1533071 +#define SAY_RIVE_TAUNT2 -1533072 +#define SAY_RIVE_TAUNT3 -1533073 +#define SAY_RIVE_DEATH -1533074 + +#define SPELL_MARK_OF_RIVENDARE 28834 +#define SPELL_UNHOLY_SHADOW 28882 +#define H_SPELL_UNHOLY_SHADOW 57369 + +#define C_SPIRIT_OF_RIVENDARE 0 //creature entry not known yet + struct MANGOS_DLL_DECL boss_rivendare_naxxAI : public ScriptedAI { - boss_rivendare_naxxAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + boss_rivendare_naxxAI(Creature* pCreature) : ScriptedAI(pCreature) + { + Heroic = m_creature->GetMap()->IsHeroic(); + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + bool Heroic; + ScriptedInstance *pInstance; + uint32 UnholyShadowTimer; + uint32 Mark_Timer; + bool ShieldWall1; + bool ShieldWall2; void Reset() { + if(pInstance) pInstance->SetData(TYPE_RIVENDARE, NOT_STARTED); + UnholyShadowTimer = 15000; + ShieldWall1 = true; + ShieldWall2 = true; + Mark_Timer = 20000; } void Aggro(Unit *who) @@ -190,6 +198,8 @@ struct MANGOS_DLL_DECL boss_rivendare_naxxAI : public ScriptedAI case 1: DoScriptText(SAY_RIVE_AGGRO2, m_creature); break; case 2: DoScriptText(SAY_RIVE_AGGRO3, m_creature); break; } + if(pInstance) pInstance->SetData(TYPE_FOURHORSEMEN, IN_PROGRESS); + if(pInstance) pInstance->SetData(TYPE_RIVENDARE, IN_PROGRESS); } void KilledUnit(Unit* Victim) @@ -200,13 +210,47 @@ struct MANGOS_DLL_DECL boss_rivendare_naxxAI : public ScriptedAI void JustDied(Unit* Killer) { DoScriptText(SAY_RIVE_DEATH, m_creature); + if(pInstance) pInstance->SetData(TYPE_RIVENDARE, DONE); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 diff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + // Mark of Rivendare + if (Mark_Timer < diff) + { + DoCast(m_creature->getVictim(),SPELL_MARK_OF_RIVENDARE); + Mark_Timer = 12000; + }else Mark_Timer -= diff; + + // Shield Wall - All 4 horsemen will shield wall at 50% hp and 20% hp for 20 seconds + if (ShieldWall1 && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 50) + { + if (ShieldWall1) + { + DoCast(m_creature,SPELL_SHIELDWALL); + ShieldWall1 = false; + } + } + if (ShieldWall2 && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 20) + { + if (ShieldWall2) + { + DoCast(m_creature,SPELL_SHIELDWALL); + ShieldWall2 = false; + } + } + + //Unholy Shadow + if(UnholyShadowTimer < diff) + { + DoCast(m_creature->getVictim(), Heroic ? H_SPELL_UNHOLY_SHADOW : SPELL_UNHOLY_SHADOW); + UnholyShadowTimer = 15000; + } + else UnholyShadowTimer -= diff; + DoMeleeAttackIfReady(); } }; @@ -216,10 +260,32 @@ CreatureAI* GetAI_boss_rivendare_naxx(Creature* pCreature) return new boss_rivendare_naxxAI(pCreature); } +//thane korthazz +#define SAY_KORT_AGGRO -1533051 +#define SAY_KORT_TAUNT1 -1533052 +#define SAY_KORT_TAUNT2 -1533053 +#define SAY_KORT_TAUNT3 -1533054 +#define SAY_KORT_SPECIAL -1533055 +#define SAY_KORT_SLAY -1533056 +#define SAY_KORT_DEATH -1533057 + +#define SPELL_MARK_OF_KORTHAZZ 28832 +#define SPELL_METEOR 26558 // m_creature->getVictim() auto-area spell but with a core problem +#define H_SPELL_METEOR 57467 + +#define C_SPIRIT_OF_KORTHAZZ 16778 + struct MANGOS_DLL_DECL boss_thane_korthazzAI : public ScriptedAI { - boss_thane_korthazzAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + boss_thane_korthazzAI(Creature* pCreature) : ScriptedAI(pCreature) + { + Heroic = m_creature->GetMap()->IsHeroic(); + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + bool Heroic; + ScriptedInstance *pInstance; uint32 Mark_Timer; uint32 Meteor_Timer; bool ShieldWall1; @@ -231,11 +297,14 @@ struct MANGOS_DLL_DECL boss_thane_korthazzAI : public ScriptedAI Meteor_Timer = 30000; // wrong ShieldWall1 = true; ShieldWall2 = true; + if(pInstance) pInstance->SetData(TYPE_KORTHAZZ, NOT_STARTED); } void Aggro(Unit *who) { DoScriptText(SAY_KORT_AGGRO, m_creature); + if(pInstance) pInstance->SetData(TYPE_FOURHORSEMEN, IN_PROGRESS); + if(pInstance) pInstance->SetData(TYPE_KORTHAZZ, IN_PROGRESS); } void KilledUnit(Unit* Victim) @@ -246,19 +315,20 @@ struct MANGOS_DLL_DECL boss_thane_korthazzAI : public ScriptedAI void JustDied(Unit* Killer) { DoScriptText(SAY_KORT_DEATH, m_creature); + if(pInstance) pInstance->SetData(TYPE_KORTHAZZ, DONE); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 diff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; // Mark of Korthazz - if (Mark_Timer < uiDiff) + if (Mark_Timer < diff) { DoCast(m_creature->getVictim(),SPELL_MARK_OF_KORTHAZZ); Mark_Timer = 12000; - }else Mark_Timer -= uiDiff; + }else Mark_Timer -= diff; // Shield Wall - All 4 horsemen will shield wall at 50% hp and 20% hp for 20 seconds if (ShieldWall1 && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 50) @@ -279,11 +349,12 @@ struct MANGOS_DLL_DECL boss_thane_korthazzAI : public ScriptedAI } // Meteor - if (Meteor_Timer < uiDiff) + if (Meteor_Timer < diff) { - DoCast(m_creature->getVictim(),SPELL_METEOR); - Meteor_Timer = 20000; // wrong - }else Meteor_Timer -= uiDiff; + DoCast(m_creature->getVictim(), Heroic ? H_SPELL_METEOR : SPELL_METEOR); + Meteor_Timer = 25000; + } + else Meteor_Timer -= diff; DoMeleeAttackIfReady(); } @@ -294,26 +365,55 @@ CreatureAI* GetAI_boss_thane_korthazz(Creature* pCreature) return new boss_thane_korthazzAI(pCreature); } +//sir zeliek +#define SAY_ZELI_AGGRO -1533058 +#define SAY_ZELI_TAUNT1 -1533059 +#define SAY_ZELI_TAUNT2 -1533060 +#define SAY_ZELI_TAUNT3 -1533061 +#define SAY_ZELI_SPECIAL -1533062 +#define SAY_ZELI_SLAY -1533063 +#define SAY_ZELI_DEATH -1533064 + +#define SPELL_MARK_OF_ZELIEK 28835 +#define SPELL_HOLY_WRATH 28883 +#define H_SPELL_HOLY_WRATH 57466 +#define SPELL_HOLY_BOLT 57376 +#define H_SPELL_HOLY_BOLT 57465 + +#define C_SPIRIT_OF_ZELIREK 16777 + struct MANGOS_DLL_DECL boss_sir_zeliekAI : public ScriptedAI { - boss_sir_zeliekAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + boss_sir_zeliekAI(Creature* pCreature) : ScriptedAI(pCreature) + { + Heroic = m_creature->GetMap()->IsHeroic(); + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + bool Heroic; + ScriptedInstance *pInstance; uint32 Mark_Timer; uint32 HolyWrath_Timer; + uint32 HolyBoltTimer; bool ShieldWall1; bool ShieldWall2; void Reset() { - Mark_Timer = 20000; // First Horsemen Mark is applied at 20 sec. - HolyWrath_Timer = 12000; // right + Mark_Timer = 20000; // First Horsemen Mark is applied at 20 sec. + HolyWrath_Timer = 12000; // right + HolyBoltTimer = 3000; ShieldWall1 = true; ShieldWall2 = true; + if(pInstance) pInstance->SetData(TYPE_ZELIEK, NOT_STARTED); } void Aggro(Unit *who) { DoScriptText(SAY_ZELI_AGGRO, m_creature); + if(pInstance) pInstance->SetData(TYPE_FOURHORSEMEN, IN_PROGRESS); + if(pInstance) pInstance->SetData(TYPE_ZELIEK, IN_PROGRESS); } void KilledUnit(Unit* Victim) @@ -324,20 +424,21 @@ struct MANGOS_DLL_DECL boss_sir_zeliekAI : public ScriptedAI void JustDied(Unit* Killer) { DoScriptText(SAY_ZELI_DEATH, m_creature); + if(pInstance) pInstance->SetData(TYPE_ZELIEK, DONE); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 diff) { //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; // Mark of Zeliek - if (Mark_Timer < uiDiff) + if (Mark_Timer < diff) { DoCast(m_creature->getVictim(),SPELL_MARK_OF_ZELIEK); Mark_Timer = 12000; - }else Mark_Timer -= uiDiff; + }else Mark_Timer -= diff; // Shield Wall - All 4 horsemen will shield wall at 50% hp and 20% hp for 20 seconds if (ShieldWall1 && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 50) @@ -358,11 +459,19 @@ struct MANGOS_DLL_DECL boss_sir_zeliekAI : public ScriptedAI } // Holy Wrath - if (HolyWrath_Timer < uiDiff) + if(HolyWrath_Timer < diff) { - DoCast(m_creature->getVictim(),SPELL_HOLY_WRATH); + DoCast(m_creature->getVictim(),Heroic ? H_SPELL_HOLY_WRATH : SPELL_HOLY_WRATH); HolyWrath_Timer = 12000; - }else HolyWrath_Timer -= uiDiff; + } + else HolyWrath_Timer -= diff; + + if(HolyBoltTimer < diff) + { + DoCast(m_creature->getVictim(), Heroic ? H_SPELL_HOLY_BOLT : SPELL_HOLY_BOLT); + HolyBoltTimer = 3000; + } + else HolyBoltTimer -= diff; DoMeleeAttackIfReady(); } @@ -375,25 +484,25 @@ CreatureAI* GetAI_boss_sir_zeliek(Creature* pCreature) void AddSC_boss_four_horsemen() { - Script* NewScript; - - NewScript = new Script; - NewScript->Name = "boss_lady_blaumeux"; - NewScript->GetAI = &GetAI_boss_lady_blaumeux; - NewScript->RegisterSelf(); - - NewScript = new Script; - NewScript->Name = "boss_rivendare_naxx"; - NewScript->GetAI = &GetAI_boss_rivendare_naxx; - NewScript->RegisterSelf(); - - NewScript = new Script; - NewScript->Name = "boss_thane_korthazz"; - NewScript->GetAI = &GetAI_boss_thane_korthazz; - NewScript->RegisterSelf(); - - NewScript = new Script; - NewScript->Name = "boss_sir_zeliek"; - NewScript->GetAI = &GetAI_boss_sir_zeliek; - NewScript->RegisterSelf(); + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_lady_blaumeux"; + newscript->GetAI = &GetAI_boss_lady_blaumeux; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_rivendare_naxx"; + newscript->GetAI = &GetAI_boss_rivendare_naxx; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_thane_korthazz"; + newscript->GetAI = &GetAI_boss_thane_korthazz; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_sir_zeliek"; + newscript->GetAI = &GetAI_boss_sir_zeliek; + newscript->RegisterSelf(); } diff --git a/scripts/northrend/naxxramas/boss_gluth.cpp b/scripts/northrend/naxxramas/boss_gluth.cpp index 2d0d136e7..3c5b9c660 100644 --- a/scripts/northrend/naxxramas/boss_gluth.cpp +++ b/scripts/northrend/naxxramas/boss_gluth.cpp @@ -26,15 +26,15 @@ EndScriptData */ enum { - EMOTE_ZOMBIE = -1533119, + EMOTE_ZOMBIE = -1533119, - SPELL_MORTALWOUND = 25646, - SPELL_DECIMATE = 28374, - SPELL_ENRAGE = 28371, - SPELL_ENRAGE_H = 54427, - SPELL_BERSERK = 26662, + SPELL_MORTALWOUND = 25646, + SPELL_DECIMATE = 28374, + SPELL_ENRAGE = 28371, + SPELL_ENRAGE_H = 54427, + SPELL_BERSERK = 26662, - NPC_ZOMBIE_CHOW = 16360 + NPC_ZOMBIE_CHOW = 16360, }; #define ADD_1X 3269.590 @@ -77,106 +77,109 @@ struct MANGOS_DLL_DECL boss_gluthAI : public ScriptedAI { boss_gluthAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Heroic = pCreature->GetMap()->IsHeroic(); Reset(); } - ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + std::vector addsGuid; - uint32 m_uiMortalWoundTimer; - uint32 m_uiDecimateTimer; - uint32 m_uiEnrageTimer; - uint32 m_uiSummonTimer; + ScriptedInstance* pInstance; + bool Heroic; + + uint32 MortalWound_Timer; + uint32 Decimate_Timer; + uint32 Enrage_Timer; + uint32 Summon_Timer; uint32 m_uiBerserkTimer; void Reset() { - m_uiMortalWoundTimer = 8000; - m_uiDecimateTimer = 100000; - m_uiEnrageTimer = 60000; - m_uiSummonTimer = 10000; + MortalWound_Timer = 8000; + Decimate_Timer = 100000; + Enrage_Timer = 60000; + Summon_Timer = 10000; m_uiBerserkTimer = MINUTE*8*IN_MILISECONDS; + addsGuid.clear(); + + if(pInstance) pInstance->SetData(TYPE_GLUTH, NOT_STARTED); } - void JustDied(Unit* pKiller) + void JustDied(Unit *killer) { - if (m_pInstance) - m_pInstance->SetData(TYPE_GLUTH, DONE); + std::vector::iterator itr; + for(itr=addsGuid.begin(); itr!=addsGuid.end(); itr++) + { + Unit* zombie = Unit::GetUnit((*m_creature), (*itr)); + if(zombie && zombie->isAlive()) + zombie->DealDamage(zombie, zombie->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + addsGuid.clear(); + if(pInstance) pInstance->SetData(TYPE_GLUTH, DONE); } - void Aggro(Unit* pWho) + void Aggro(Unit *who) { - if (m_pInstance) - m_pInstance->SetData(TYPE_GLUTH, IN_PROGRESS); + if(pInstance) pInstance->SetData(TYPE_GLUTH, IN_PROGRESS); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 diff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - // Mortal Wound - if (m_uiMortalWoundTimer < uiDiff) + //MortalWound_Timer + if (MortalWound_Timer < diff) { - DoCast(m_creature->getVictim(), SPELL_MORTALWOUND); - m_uiMortalWoundTimer = 10000; - } - else - m_uiMortalWoundTimer -= uiDiff; + DoCast(m_creature->getVictim(),SPELL_MORTALWOUND); + MortalWound_Timer = 10000; + }else MortalWound_Timer -= diff; - // Decimate - if (m_uiDecimateTimer < uiDiff) + //Decimate_Timer + if (Decimate_Timer < diff) { - DoCast(m_creature->getVictim(), SPELL_DECIMATE); - m_uiDecimateTimer = 100000; - } - else - m_uiDecimateTimer -= uiDiff; + DoCast(m_creature->getVictim(),SPELL_DECIMATE); + Decimate_Timer = 100000; + }else Decimate_Timer -= diff; - // Enrage - if (m_uiEnrageTimer < uiDiff) + //Enrage_Timer + if (Enrage_Timer < diff) { - DoCast(m_creature, m_bIsHeroicMode?SPELL_ENRAGE_H:SPELL_ENRAGE); - m_uiEnrageTimer = 60000; - } - else - m_uiEnrageTimer -= uiDiff; + DoCast(m_creature, Heroic ? SPELL_ENRAGE_H : SPELL_ENRAGE); + Enrage_Timer = 60000; + }else Enrage_Timer -= diff; - // Summon - if (m_uiSummonTimer < uiDiff) + //Summon_Timer + if (Summon_Timer < diff) { - if (Creature* pZombie = m_creature->SummonCreature(NPC_ZOMBIE_CHOW, ADD_1X, ADD_1Y, ADD_1Z, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 80000)) + if (Creature* pZombie = m_creature->SummonCreature(NPC_ZOMBIE_CHOW,ADD_1X,ADD_1Y,ADD_1Z,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000)) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - pZombie->AddThreat(pTarget, 0.0f); + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + pZombie->AddThreat(pTarget,0.0f); + addsGuid.push_back(pZombie->GetGUID()); } - if (m_bIsHeroicMode) + if (Heroic) { - if (Creature* pZombie = m_creature->SummonCreature(NPC_ZOMBIE_CHOW, ADD_1X, ADD_1Y, ADD_1Z, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 80000)) + if (Creature* pZombie = m_creature->SummonCreature(NPC_ZOMBIE_CHOW,ADD_1X,ADD_1Y,ADD_1Z,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000)) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - pZombie->AddThreat(pTarget, 0.0f); + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + pZombie->AddThreat(pTarget,0.0f); + addsGuid.push_back(pZombie->GetGUID()); } } - m_uiSummonTimer = 10000; - } - else - m_uiSummonTimer -= uiDiff; + Summon_Timer = 20000; + } else Summon_Timer -= diff; - // Berserk - if (m_uiBerserkTimer < uiDiff) + //m_uiBerserkTimer + if (m_uiBerserkTimer < diff) { DoCast(m_creature, SPELL_BERSERK, true); m_uiBerserkTimer = MINUTE*5*IN_MILISECONDS; - } - else - m_uiBerserkTimer -= uiDiff; + }else m_uiBerserkTimer -= diff; DoMeleeAttackIfReady(); } @@ -189,9 +192,9 @@ CreatureAI* GetAI_boss_gluth(Creature* pCreature) void AddSC_boss_gluth() { - Script* NewScript; - NewScript = new Script; - NewScript->Name = "boss_gluth"; - NewScript->GetAI = &GetAI_boss_gluth; - NewScript->RegisterSelf(); + Script *newscript; + newscript = new Script; + newscript->Name = "boss_gluth"; + newscript->GetAI = &GetAI_boss_gluth; + newscript->RegisterSelf(); } diff --git a/scripts/northrend/naxxramas/boss_gothik.cpp b/scripts/northrend/naxxramas/boss_gothik.cpp index 7f175b838..d3dc41688 100644 --- a/scripts/northrend/naxxramas/boss_gothik.cpp +++ b/scripts/northrend/naxxramas/boss_gothik.cpp @@ -24,45 +24,525 @@ EndScriptData */ #include "precompiled.h" #include "naxxramas.h" -enum +//GO: the door +#define GO_GOTHIK_GATE 181170 + +//creatures id +//Gothik - 16060 +#define CR_UN_TRAINEE 16124 +#define CR_UN_DEATHKNIGHT 16125 +#define CR_UN_RIDER 16126 +#define CR_SP_TRAINEE 16127 +#define CR_SP_DEATHKNIGHT 16148 +#define CR_SP_RIDER 16150 + +//SPELLS +//Gothik the Harvester +#define SP_HARVEST_SOUL 28679 +#define SP_SHADOWBOLT 29317 +#define H_SP_SHADOWBOLT 56405 +//Unrelenting Trainee +#define SP_DEATH_PLAGUE 55604 +#define H_SP_DEATH_PLAGUE 55645 +//Unrelenting Death Knight +#define SP_SHADOW_MARK 27825 +//Unrelenting Rider +#define SP_SHADOW_VOLLEY 27831 +#define H_SP_SHADOW_VOLLEY 55638 +//Spectral Trainee +#define SP_EXPLOSION 27989 +#define H_SP_EXPLOSION 56407 +//Spectral Death Knight +#define SP_WHIRLWIND 56408 +//Spectral Rider +#define SP_UNHOLY_AURA 55606 +#define H_SP_UNHOLY_AURA 55608 +#define SP_UNHOLY_FRENZY 55648 +#define H_SP_UNHOLY_FRENZY 27995 +#define SP_DRAIN_LIFE 27994 +#define H_SP_DRAIN_LIFE 55646 + + +//Gothik Teleport Coordinates +#define LIVE_X 2691.991699 +#define LIVE_Y -3422.510742 +#define LIVE_Z 267.689362 +#define UNDEAD_X 2693.844238 +#define UNDEAD_Y -3298.302490 +#define UNDEAD_Z 267.683167 +//Mobs summon coords +//Live: +//Undead: + + +/* + 1 (3:30 ) + , + 2 (60 ) + , + 3 (15 ) + 1, + 4 (15 ) + 2, + 5 ( 30% ) + , +*/ + + +struct MANGOS_DLL_DECL boss_gothikAI : public ScriptedAI +{ + boss_gothikAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Heroic = m_creature->GetMap()->IsHeroic(); + + trainees = Heroic ? 3 : 2; + + LiveX[0]=2669.430176; LiveY[0]=-3430.828613; LiveZ[0]=268.563049; + LiveX[1]=2692.187988; LiveY[1]=-3431.384277; LiveZ[1]=268.563538; + LiveX[2]=2714.282959; LiveY[2]=-3431.556152; LiveZ[2]=268.563538; + + Reset(); + } + + //summon coordinates + float LiveX[3]; + float LiveY[3]; + float LiveZ[3]; + + bool Heroic; + uint32 phase; + uint32 Phase_Timer; + uint32 Shadowbolt_Timer; + + //summon timers + uint32 Trainee_Timer; + uint32 DeathKnight_Timer; + uint32 Rider_Timer; + + int trainees; + + ScriptedInstance* pInstance; + + void Reset() + { + phase = 1; + Phase_Timer = 210000; + Shadowbolt_Timer = 1200; + + Trainee_Timer = 12000; + DeathKnight_Timer = 20000; + Rider_Timer = 60000; + + SetCombatMovement(false); + + if(pInstance) pInstance->SetData(TYPE_GOTHIK, NOT_STARTED); + } + + void DamageTaken(Unit *done_by, uint32 &damage) + { + if(phase==1 || phase==2) damage=0; + } + + void Aggro(Unit *who) + { + if(pInstance) pInstance->SetData(TYPE_GOTHIK, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_GOTHIK, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + int i; + + //PHASE 1 + if(phase==1) + { + if(Phase_Timer < diff) + { + phase = 2; + Phase_Timer = 60000; //phase 2 lasts 60 seconds + } + else Phase_Timer -= diff; + + //summon trainees + if(Trainee_Timer < diff) + { + for(i=0; iSummonCreature(CR_UN_TRAINEE, LiveX[i], LiveY[i], LiveZ[i], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); + Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + if(mob && target) mob->AddThreat(target, 1.0f); + } + Trainee_Timer = 15000; + } + else Trainee_Timer -= diff; + + //summon death knights + if(DeathKnight_Timer < diff) + { + i = irand(0,2); + Unit *mob = m_creature->SummonCreature(CR_UN_DEATHKNIGHT, LiveX[i], LiveY[i], LiveZ[i], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); + Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + if(mob && target) mob->AddThreat(target, 1.0f); + DeathKnight_Timer = 30000; + } + else DeathKnight_Timer -= diff; + + //summon rider + if(Rider_Timer < diff) + { + i = irand(0,2); + Unit *mob = m_creature->SummonCreature(CR_UN_RIDER, LiveX[i], LiveY[i], LiveZ[i], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); + Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + if(mob && target) mob->AddThreat(target, 1.0f); + Rider_Timer = 45000; + } + else Rider_Timer -= diff; + } + + //PHASE 2 + if(phase==2) + { + if(Phase_Timer < diff) + { + //teleport gothik down + m_creature->NearTeleportTo(UNDEAD_X, UNDEAD_Y, UNDEAD_Z, 0); + Phase_Timer = 15000; + phase = 3; + + SetCombatMovement(true); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + } + else Phase_Timer -= diff; + } + + //PHASE 3,4 + if(phase==3 || phase==4) + { + if(Phase_Timer < diff) + { + //cast Harvest Soul (-10% stats to the raid) + Unit* target = NULL; + std::list::iterator i = m_creature->getThreatManager().getThreatList().begin(); + for (i = m_creature->getThreatManager().getThreatList().begin(); i!=m_creature->getThreatManager().getThreatList().end(); ++i) + { + target = Unit::GetUnit((*m_creature),(*i)->getUnitGuid()); + if(target && target->isAlive()) + DoCast(target, SP_HARVEST_SOUL, true); + } + //teleport gothik to the other side + if(phase==3) + m_creature->NearTeleportTo(LIVE_X, LIVE_Y, LIVE_Z, 0); + else + m_creature->NearTeleportTo(UNDEAD_X, UNDEAD_Y, UNDEAD_Z, 0); + + Phase_Timer = 15000; + phase = (phase==3) ? 4 : 3; + } + else Phase_Timer -= diff; + + //cast shadowbolts + if(Shadowbolt_Timer < diff) + { + DoCast(m_creature->getVictim(), Heroic ? H_SP_SHADOWBOLT : SP_SHADOWBOLT); + Shadowbolt_Timer = 1200; + } + else Shadowbolt_Timer -= diff; + + //if 30% left, stop teleporting + if ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() <= 30) + { + phase=5; + if(pInstance) pInstance->SetData(TYPE_GOTHIK, SPECIAL); + } + } + + //PHASE 5 + if(phase==5) + { + if(Shadowbolt_Timer < diff) + { + DoCast(m_creature->getVictim(), Heroic ? H_SP_SHADOWBOLT : SP_SHADOWBOLT); + Shadowbolt_Timer = 1200; + } + else Shadowbolt_Timer -= diff; + } + } +}; + + +/*******************************************************************/ +// UNRELENTING / SPECTRAL TRAINEE AI // +/*******************************************************************/ + +struct MANGOS_DLL_DECL mob_gothik_trainee_addAI : public ScriptedAI +{ + mob_gothik_trainee_addAI(Creature* pCreature) : ScriptedAI(pCreature) + { + Heroic = m_creature->GetMap()->IsHeroic(); + Reset(); + } + + bool Heroic; + float UndeadX[5]; + float UndeadY[5]; + float UndeadZ[5]; + uint32 PlagueTimer; + uint32 ExplosionTimer; + + void Reset() + { + UndeadX[0]=2733.049561; UndeadY[0]=-3349.463135; UndeadZ[0]=268.113251; + UndeadX[1]=2725.951416; UndeadY[1]=-3310.180664; UndeadZ[1]=269.058899; + UndeadX[2]=2700.589111; UndeadY[2]=-3322.897949; UndeadZ[2]=269.107666; + UndeadX[3]=2683.933350; UndeadY[3]=-3304.313232; UndeadZ[3]=269.135010; + UndeadX[4]=2665.220459; UndeadY[4]=-3339.860840; UndeadZ[4]=268.846222; + PlagueTimer = 3000; + ExplosionTimer = 3000+rand()%8000; + } + + void Aggro(Unit *who) {} + + void JustDied(Unit *killer) + { + //if unrelenting trainee then spawn spectral trainee + if(m_creature->GetEntry()==CR_UN_TRAINEE) //maybe need check heroic entry too + { + int i = irand(0,5); + Unit *mob = m_creature->SummonCreature(CR_SP_TRAINEE, UndeadX[i], UndeadY[i], UndeadZ[i], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); + if(mob) mob->AddThreat(killer, 1.0f); + } + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if(m_creature->GetEntry()==CR_UN_TRAINEE) + { + if(PlagueTimer < diff) + { + DoCast(m_creature->getVictim(), Heroic ? H_SP_DEATH_PLAGUE : SP_DEATH_PLAGUE); + PlagueTimer = 3500; + } + PlagueTimer -= diff; + } + else + { + if(ExplosionTimer < diff) + { + DoCast(m_creature, Heroic ? H_SP_EXPLOSION : SP_EXPLOSION); + ExplosionTimer = 5000+rand()%10000; + } + ExplosionTimer -= diff; + } + + DoMeleeAttackIfReady(); + } +}; + +/*******************************************************************/ +// UNRELENTING / SPECTRAL DEATH KNIGHT AI // +/*******************************************************************/ + +struct MANGOS_DLL_DECL mob_gothik_dk_addAI : public ScriptedAI { - SAY_SPEECH = -1533040, - SAY_KILL = -1533041, - SAY_DEATH = -1533042, - SAY_TELEPORT = -1533043, - - //Gothik - SPELL_HARVESTSOUL = 28679, - SPELL_SHADOWBOLT = 29317, - H_SPELL_SHADOWBOLT = 56405, - - //Unrelenting Trainee - SPELL_EAGLECLAW = 30285, - SPELL_KNOCKDOWN_PASSIVE = 6961, - - //Unrelenting Deathknight - SPELL_CHARGE = 22120, - SPELL_SHADOW_MARK = 27825, - - //Unrelenting Rider - SPELL_UNHOLY_AURA = 55606, - H_SPELL_UNHOLY_AURA = 55608, - SPELL_SHADOWBOLT_VOLLEY = 27831, //Search thru targets and find those who have the SHADOW_MARK to cast this on - H_SPELL_SHADOWBOLT_VOLLEY = 55638, - - //Spectral Trainee - SPELL_ARCANE_EXPLOSION = 27989, - - //Spectral Deathknight - SPELL_WHIRLWIND = 28334, - SPELL_SUNDER_ARMOR = 25051, //cannot find sunder that reduces armor by 2950 - SPELL_CLEAVE = 20677, - SPELL_MANA_BURN = 17631, - - //Spectral Rider - SPELL_LIFEDRAIN = 24300, - //USES SAME UNHOLY AURA AS UNRELENTING RIDER - - //Spectral Horse - SPELL_STOMP = 27993 + mob_gothik_dk_addAI(Creature* pCreature) : ScriptedAI(pCreature) + { + //Heroic = m_creature->GetMap()->IsHeroic(); + Reset(); + } + + float UndeadX[5]; + float UndeadY[5]; + float UndeadZ[5]; + uint32 SpellTimer; + + void Reset() + { + UndeadX[0]=2733.049561; UndeadY[0]=-3349.463135; UndeadZ[0]=268.113251; + UndeadX[1]=2725.951416; UndeadY[1]=-3310.180664; UndeadZ[1]=269.058899; + UndeadX[2]=2700.589111; UndeadY[2]=-3322.897949; UndeadZ[2]=269.107666; + UndeadX[3]=2683.933350; UndeadY[3]=-3304.313232; UndeadZ[3]=269.135010; + UndeadX[4]=2665.220459; UndeadY[4]=-3339.860840; UndeadZ[4]=268.846222; + SpellTimer = 8000+rand()%8000; //Shadow Mark and Whirlwind + } + + void Aggro(Unit *who) {} + + void JustDied(Unit *killer) + { + //if unrelenting DK then spawn spectral DK + if(m_creature->GetEntry()==CR_UN_DEATHKNIGHT) + { + int i = irand(0,5); + Unit *mob = m_creature->SummonCreature(CR_SP_DEATHKNIGHT, UndeadX[i], UndeadY[i], UndeadZ[i], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); + if(mob) mob->AddThreat(killer, 1.0f); + } + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if(SpellTimer < diff) + { + if(m_creature->GetEntry()==CR_UN_DEATHKNIGHT) + DoCast(m_creature->getVictim(), SP_SHADOW_MARK); + else //Spectral DK + DoCast(m_creature->getVictim(), SP_WHIRLWIND); + SpellTimer = 8000+rand()%8000; + } + else SpellTimer -= diff; + + DoMeleeAttackIfReady(); + } }; + + + +/*******************************************************************/ +// UNRELENTING / SPECTRAL RIDER AI // +/*******************************************************************/ + +struct MANGOS_DLL_DECL mob_gothik_rider_addAI : public ScriptedAI +{ + mob_gothik_rider_addAI(Creature* pCreature) : ScriptedAI(pCreature) + { + Heroic = m_creature->GetMap()->IsHeroic(); + Reset(); + } + + bool Heroic; + uint32 VolleyTimer; + uint32 DrainTimer; + //uint32 FrenzyTimer; + float UndeadX[5]; + float UndeadY[5]; + float UndeadZ[5]; + + void Reset() + { + UndeadX[0]=2733.049561; UndeadY[0]=-3349.463135; UndeadZ[0]=268.113251; + UndeadX[1]=2725.951416; UndeadY[1]=-3310.180664; UndeadZ[1]=269.058899; + UndeadX[2]=2700.589111; UndeadY[2]=-3322.897949; UndeadZ[2]=269.107666; + UndeadX[3]=2683.933350; UndeadY[3]=-3304.313232; UndeadZ[3]=269.135010; + UndeadX[4]=2665.220459; UndeadY[4]=-3339.860840; UndeadZ[4]=268.846222; + VolleyTimer = 5000+rand()%10000; + DrainTimer = 8000+rand()%10000; + //FrenzyTimer = 2000; + } + + void Aggro(Unit *who) + { + DoCast(m_creature, SP_UNHOLY_AURA); + } + + void JustDied(Unit *killer) + { + //if unrelenting rider then spawn spectral rider + if(m_creature->GetEntry()==CR_UN_RIDER) //maybe need check heroic entry too + { + int i = irand(0,5); + Unit *mob = m_creature->SummonCreature(CR_SP_RIDER, UndeadX[i], UndeadY[i], UndeadZ[i], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); + if(mob) mob->AddThreat(killer, 1.0f); + } + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if(m_creature->GetEntry()==CR_UN_RIDER) + { + if(VolleyTimer < diff) + { + //hit only targets with shadow mark + /*Unit* target = NULL; + std::list::iterator i = m_creature->getThreatManager().getThreatList().begin(); + for (i = m_creature->getThreatManager().getThreatList().begin(); i!=m_creature->getThreatManager().getThreatList().end(); ++i) + { + target = Unit::GetUnit((*m_creature),(*i)->getUnitGuid()); + if(target && target->isAlive() && target->HasAura(SP_SHADOW_MARK)) + DoCast(target, Heroic ? H_SP_SHADOW_VOLLEY : SP_SHADOW_VOLLEY); + }*/ + DoCast(m_creature->getVictim(), Heroic ? H_SP_SHADOW_VOLLEY : SP_SHADOW_VOLLEY); + VolleyTimer = 10000+rand()%10000; + } + else VolleyTimer -= diff; + } + else + { + if(DrainTimer < diff) + { + Unit *target = SelectUnit(SELECT_TARGET_TOPAGGRO, 0); + if(target) DoCast(target, Heroic ? H_SP_DRAIN_LIFE : SP_DRAIN_LIFE); + DrainTimer = 10000+rand()%10000; + } + else DrainTimer -= diff; + + /*if(FrenzyTimer < diff) + { + FrenzyTimer = 30000; + } + else FrenzyTimer -= diff;*/ + } + + DoMeleeAttackIfReady(); + } +}; + + +CreatureAI* GetAI_mob_gothik_trainee_addAI(Creature* pCreature) +{ + return new mob_gothik_trainee_addAI(pCreature); +} + +CreatureAI* GetAI_mob_gothik_dk_addAI(Creature* pCreature) +{ + return new mob_gothik_dk_addAI(pCreature); +} + +CreatureAI* GetAI_mob_gothik_rider_addAI(Creature* pCreature) +{ + return new mob_gothik_rider_addAI(pCreature); +} + +CreatureAI* GetAI_boss_gothik(Creature* pCreature) +{ + return new boss_gothikAI(pCreature); +} + +void AddSC_boss_gothik() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_gothik"; + newscript->GetAI = &GetAI_boss_gothik; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_gothik_trainee"; + newscript->GetAI = &GetAI_mob_gothik_trainee_addAI; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_gothik_dk"; + newscript->GetAI = &GetAI_mob_gothik_dk_addAI; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_gothik_rider"; + newscript->GetAI = &GetAI_mob_gothik_rider_addAI; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/naxxramas/boss_grobbulus.cpp b/scripts/northrend/naxxramas/boss_grobbulus.cpp index 22054a272..84bebdba3 100644 --- a/scripts/northrend/naxxramas/boss_grobbulus.cpp +++ b/scripts/northrend/naxxramas/boss_grobbulus.cpp @@ -14,12 +14,6 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* ScriptData -SDName: Boss_Grobbulus -SD%Complete: 0 -SDComment: Place holder -SDCategory: Naxxramas -EndScriptData */ /*Poison Cloud 26590 Slime Spray 28157 @@ -28,4 +22,73 @@ Mutating Injection 28169 Enrages 26527*/ #include "precompiled.h" -#include "precompiled.h" + +#define SP_ENRAGE 26662 +#define SP_SLIME_SPRAY 28157 +#define SP_INJECTION 28169 + +struct MANGOS_DLL_DECL boss_grobbulusAI : public ScriptedAI +{ + boss_grobbulusAI(Creature *pCreature) : ScriptedAI(pCreature) + { + Reset(); + } + + uint32 EnrageTimer; + uint32 MutatingInjectionTimer; + uint32 PoisonCloudTimer; + uint32 SlimeSprayTimer; + + void Reset() + { + EnrageTimer = 720000; + SlimeSprayTimer = 15000 + rand()%10000; + MutatingInjectionTimer = 10000; + }; + + void Aggro(Unit *who) {} + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if(SlimeSprayTimer < diff) + { + DoCast(m_creature, SP_SLIME_SPRAY); + SlimeSprayTimer = 15000 + rand()%10000; + } + else SlimeSprayTimer -= diff; + + if(MutatingInjectionTimer < diff) + { + Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + if(target) DoCast(target, SP_INJECTION); + MutatingInjectionTimer = 10000; + } + else MutatingInjectionTimer -= diff; + + if(EnrageTimer < diff) + { + DoCast(m_creature, SP_ENRAGE); + EnrageTimer = 120000; + } + else EnrageTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_grobbulus(Creature* pCreature) +{ + return new boss_grobbulusAI(pCreature); +} + +void AddSC_boss_grobbulus() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_grobbulus"; + newscript->GetAI = &GetAI_boss_grobbulus; + newscript->RegisterSelf(); +}; diff --git a/scripts/northrend/naxxramas/boss_heigan.cpp b/scripts/northrend/naxxramas/boss_heigan.cpp index 43020f1e7..80f3fe57c 100644 --- a/scripts/northrend/naxxramas/boss_heigan.cpp +++ b/scripts/northrend/naxxramas/boss_heigan.cpp @@ -22,28 +22,24 @@ SDCategory: Naxxramas EndScriptData */ #include "precompiled.h" -#include "naxxramas.h" -enum -{ - SAY_AGGRO1 = -1533109, - SAY_AGGRO2 = -1533110, - SAY_AGGRO3 = -1533111, - SAY_SLAY = -1533112, - SAY_TAUNT1 = -1533113, - SAY_TAUNT2 = -1533114, - SAY_TAUNT3 = -1533115, - SAY_TAUNT4 = -1533116, - SAY_TAUNT5 = -1533117, - SAY_DEATH = -1533118, +#define SAY_AGGRO1 -1533109 +#define SAY_AGGRO2 -1533110 +#define SAY_AGGRO3 -1533111 +#define SAY_SLAY -1533112 +#define SAY_TAUNT1 -1533113 +#define SAY_TAUNT2 -1533114 +#define SAY_TAUNT3 -1533115 +#define SAY_TAUNT4 -1533116 +#define SAY_TAUNT5 -1533117 +#define SAY_DEATH -1533118 - //Spell used by floor peices to cause damage to players - SPELL_ERUPTION = 29371, +//Spell used by floor peices to cause damage to players +#define SPELL_ERUPTION 29371 - //Spells by boss - SPELL_WILT = 23772, - SPELL_FEAVER = 29998, +//Spells by boss +#define SPELL_WILT 23772 +#define SPELL_FEAVER 29998 - //Spell by eye stalks - SPELL_MIND_FLAY = 26143 -}; +//Spell by eye stalks +#define SPELL_MIND_FLAY 26143 diff --git a/scripts/northrend/naxxramas/boss_kelthuzad.cpp b/scripts/northrend/naxxramas/boss_kelthuzad.cpp index 589d6f691..7d5bba3fd 100644 --- a/scripts/northrend/naxxramas/boss_kelthuzad.cpp +++ b/scripts/northrend/naxxramas/boss_kelthuzad.cpp @@ -14,446 +14,275 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* ScriptData -SDName: Boss_KelThuzud -SD%Complete: 0 -SDComment: VERIFY SCRIPT -SDCategory: Naxxramas -EndScriptData */ - #include "precompiled.h" #include "naxxramas.h" -//***THIS SCRIPTS IS UNDER DEVELOPMENT*** -/* -DATA. -This script has been made with info taken from wowwikki... so there are things wrong... -like spell timers and Says. Also there's another major problem as there is no aggroed list -I cannot make Kel'thuzad to target specific party members, that is needed for spells like -Mana Detonation... so what I'm doing untill now is just to cast everything on my main aggroed -target. Sorry for him. -Another bug is that there are spells that are actually NOT working... I have to implement -them first. -Need DISPELL efect -I also don't know the emotes -*/ - -enum -{ - //when shappiron dies. dialog between kel and lich king (in this order) - SAY_SAPP_DIALOG1 = -1533084, - SAY_SAPP_DIALOG2_LICH = -1533085, - SAY_SAPP_DIALOG3 = -1533086, - SAY_SAPP_DIALOG4_LICH = -1533087, - SAY_SAPP_DIALOG5 = -1533088, - - //when cat dies - SAY_CAT_DIED = -1533089, - - //when each of the 4 wing bosses dies - SAY_TAUNT1 = -1533090, - SAY_TAUNT2 = -1533091, - SAY_TAUNT3 = -1533092, - SAY_TAUNT4 = -1533093, - - SAY_SUMMON_MINIONS = -1533105, //start of phase 1 - - SAY_AGGRO1 = -1533094, //start of phase 2 - SAY_AGGRO2 = -1533095, - SAY_AGGRO3 = -1533096, - - SAY_SLAY1 = -1533097, - SAY_SLAY2 = -1533098, - - SAY_DEATH = -1533099, - - SAY_CHAIN1 = -1533100, - SAY_CHAIN2 = -1533101, - SAY_FROST_BLAST = -1533102, - - SAY_REQUEST_AID = -1533103, //start of phase 3 - SAY_ANSWER_REQUEST = -1533104, //lich king answer - - SAY_SPECIAL1_MANA_DET = -1533106, - SAY_SPECIAL3_MANA_DET = -1533107, - SAY_SPECIAL2_DISPELL = -1533108, - - //spells to be casted - SPELL_FROST_BOLT = 28478, - H_SPELL_FROST_BOLT = 55802, - SPELL_FROST_BOLT_NOVA = 28479, - H_SPELL_FROST_BOLT_NOVA = 55807, - - SPELL_CHAINS_OF_KELTHUZAD = 28410, //casted spell should be 28408. Also as of 303, heroic only - SPELL_MANA_DETONATION = 27819, - SPELL_SHADOW_FISURE = 27810, - SPELL_FROST_BLAST = 27808 -}; -//Positional defines -#define ADDX_LEFT_FAR 3783.272705 -#define ADDY_LEFT_FAR -5062.697266 -#define ADDZ_LEFT_FAR 143.711203 -#define ADDO_LEFT_FAR 3.617599 - -#define ADDX_LEFT_MIDDLE 3730.291260 -#define ADDY_LEFT_MIDDLE -5027.239258 -#define ADDZ_LEFT_MIDDLE 143.956909 -#define ADDO_LEFT_MIDDLE 4.461900 - -#define ADDX_LEFT_NEAR 3683.868652 -#define ADDY_LEFT_NEAR -5057.281250 -#define ADDZ_LEFT_NEAR 143.183884 -#define ADDO_LEFT_NEAR 5.237086 - -#define ADDX_RIGHT_FAR 3759.355225 -#define ADDY_RIGHT_FAR -5174.128418 -#define ADDZ_RIGHT_FAR 143.802383 -#define ADDO_RIGHT_FAR 2.170104 - -#define ADDX_RIGHT_MIDDLE 370.724365 -#define ADDY_RIGHT_MIDDLE -5185.123047 -#define ADDZ_RIGHT_MIDDLE 143.928024 -#define ADDO_RIGHT_MIDDLE 1.309310 - -#define ADDX_RIGHT_NEAR 3665.121094 -#define ADDY_RIGHT_NEAR -5138.679199 -#define ADDZ_RIGHT_NEAR 143.183212 -#define ADDO_RIGHT_NEAR 0.604023 - -#define WALKX_LEFT_FAR 3754.431396 -#define WALKY_LEFT_FAR -5080.727734 -#define WALKZ_LEFT_FAR 142.036316 -#define WALKO_LEFT_FAR 3.736189 - -#define WALKX_LEFT_MIDDLE 3724.396484 -#define WALKY_LEFT_MIDDLE -5061.330566 -#define WALKZ_LEFT_MIDDLE 142.032700 -#define WALKO_LEFT_MIDDLE 4.564785 - -#define WALKX_LEFT_NEAR 3687.158424 -#define WALKY_LEFT_NEAR -5076.834473 -#define WALKZ_LEFT_NEAR 142.017319 -#define WALKO_LEFT_NEAR 5.237086 - -#define WALKX_RIGHT_FAR 3687.571777 -#define WALKY_RIGHT_FAR -5126.831055 -#define WALKZ_RIGHT_FAR 142.017807 -#define WALKO_RIGHT_FAR 0.604023 - -#define WALKX_RIGHT_MIDDLE 3707.990733 -#define WALKY_RIGHT_MIDDLE -5151.450195 -#define WALKZ_RIGHT_MIDDLE 142.032562 -#define WALKO_RIGHT_MIDDLE 1.376855 - -#define WALKX_RIGHT_NEAR 3739.500000 -#define WALKY_RIGHT_NEAR -5141.883989 -#define WALKZ_RIGHT_NEAR 142.0141130 -#define WALKO_RIGHT_NEAR 2.121412 +//emotes +#define SAY_SUMMON_MINIONS -1533105 + +#define SAY_REQUEST_AID -1533103 +#define SAY_ANSWER_REQUEST -1533104 + +#define SAY_AGGRO1 -1533094 +#define SAY_AGGRO2 -1533095 +#define SAY_AGGRO3 -1533096 + +#define SAY_DEATH -1533099 + +//summoned creatures +#define CR_SKELETON 16427 +#define CR_BANSHEE 16429 +#define CR_ABOMINATION 16428 +#define CR_GUARDIAN 16441 + +//Kel'Thuzad spells +#define SP_FROSTBOLT 28478 +#define H_SP_FROSTBOLT 55802 +#define SP_FROSTBOLT_VOLLEY 28479 +#define H_SP_FROSTBOLT_VOLLEY 55807 +#define SP_FROST_BLAST 27808 +#define SP_DETONATE_MANA 27819 +#define SP_SHADOW_FISSURE 27810 + struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI { - boss_kelthuzadAI(Creature* pCreature) : ScriptedAI(pCreature) + boss_kelthuzadAI(Creature* c) : ScriptedAI(c) { - memset(&GuardiansOfIcecrown, 0, sizeof(GuardiansOfIcecrown)); - GuardiansOfIcecrown_Count = 0; - - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + pInstance = (ScriptedInstance*)c->GetInstanceData(); + Heroic = m_creature->GetMap()->IsHeroic(); + MaxGuardians = Heroic ? 4 : 2; Reset(); } - ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; - - uint64 GuardiansOfIcecrown[5]; - uint32 GuardiansOfIcecrown_Count; - uint32 GuardiansOfIcecrown_Timer; - uint32 FrostBolt_Timer; - uint32 FrostBoltNova_Timer; - uint32 ChainsOfKelthuzad_Timer; - uint32 ManaDetonation_Timer; - uint32 ShadowFisure_Timer; - uint32 FrostBlast_Timer; - uint32 ChainsOfKelthuzad_Targets; + //Variables + ScriptedInstance* pInstance; + bool Heroic; + uint32 phase; uint32 Phase1_Timer; - bool Phase2; - bool Phase3; + // + uint32 Skeleton_Timer; + uint32 Abomination_Timer; + uint32 Banshee_Timer; + // + uint32 Frostbolt_Timer; + uint32 FrostboltV_Timer; + uint32 FrostBlast_Timer; + uint32 DetonateMana_Timer; + uint32 ShadowFissure_Timer; + // + uint64 Guardians[4]; + uint32 Guardian_Count; + uint32 MaxGuardians; + uint32 Guardian_Timer; + //adds coords + float AddX[6]; + float AddY[6]; + float AddZ[6]; void Reset() { - FrostBolt_Timer = urand(1000, 600000); //It won't be more than a minute without cast it - FrostBoltNova_Timer = 15000; //Cast every 15 seconds - ChainsOfKelthuzad_Timer = urand(30000, 60000); //Cast no sooner than once every 30 seconds - ManaDetonation_Timer = 20000; //Seems to cast about every 20 seconds - ShadowFisure_Timer = 25000; //25 seconds - FrostBlast_Timer = urand(30000, 60000); //Random time between 30-60 seconds - GuardiansOfIcecrown_Timer = 5000; //5 seconds for summoning each Guardian of Icecrown in phase 3 - - for(int i=0; i<5; ++i) - { - if (GuardiansOfIcecrown[i]) - { - //delete creature - if (Creature* pGuardian = (Creature*)Unit::GetUnit(*m_creature, GuardiansOfIcecrown[i])) - { - if (pGuardian->isAlive()) - pGuardian->ForcedDespawn(); - } - - GuardiansOfIcecrown[i] = 0; - } - } - - Phase1_Timer = 310000; //Phase 1 lasts 5 minutes and 10 seconds - Phase2 = false; - Phase3 = false; + phase = 1; + Phase1_Timer = 220000; // 3m 40s + + AddX[0] = 3783.272705; AddY[0] = -5062.697266; AddZ[0] = 143.711203; //left far + AddX[1] = 3759.355225; AddY[1] = -5174.128418; AddZ[1] = 143.802383; //right far + AddX[2] = 3730.291260; AddY[2] = -5027.239258; AddZ[2] = 143.956909; //left middle + AddX[3] = 3700.724365; AddY[3] = -5185.123047; AddZ[3] = 143.928024; //right middle + AddX[4] = 3683.868652; AddY[4] = -5057.281250; AddZ[4] = 143.183884; //left near + AddX[5] = 3665.121094; AddY[5] = -5138.679199; AddZ[5] = 143.183212; //right near + + Skeleton_Timer = 5000; + Abomination_Timer = 30000; + Banshee_Timer = 15000; + + Frostbolt_Timer = 5000 + rand()%10000; + FrostboltV_Timer = 15000 + rand()%5000; + FrostBlast_Timer = 30000 + rand()%30000; + DetonateMana_Timer = 30000 + rand()%30000; + ShadowFissure_Timer = 15000 + rand()%25000; + + Guardian_Timer = 8000; + Guardian_Count = 0; + Guardians[0] = 0; + Guardians[1] = 0; + Guardians[2] = 0; + Guardians[3] = 0; + + SetCombatMovement(false); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + if(pInstance) pInstance->SetData(TYPE_KELTHUZAD, NOT_STARTED); } - void KilledUnit(Unit* pVictim) + void Aggro(Unit *unit) { - DoScriptText(urand(0, 1)?SAY_SLAY1:SAY_SLAY2, m_creature); + DoScriptText(SAY_SUMMON_MINIONS, m_creature); + + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + if(pInstance) pInstance->SetData(TYPE_KELTHUZAD, IN_PROGRESS); } - void JustDied(Unit* pKiller) + void JustDied(Unit* Killer) //despawn guardians here { DoScriptText(SAY_DEATH, m_creature); - - for(int i=0; i<5; ++i) + if(pInstance) pInstance->SetData(TYPE_KELTHUZAD, DONE); + for(int i=0; i<4; i++) { - if (GuardiansOfIcecrown[i]) + if(Guardians[i]) { - Creature* pGuardian = (Creature*)Unit::GetUnit(*m_creature, GuardiansOfIcecrown[i]); - - if (!pGuardian || !pGuardian->isAlive()) - continue; - - pGuardian->CombatStop(); - - float Walk_Pos_X = 0.0f; - float Walk_Pos_Y = 0.0f; - float Walk_Pos_Z = 0.0f; - - switch(urand(0, 5)) - { - case 0: - Walk_Pos_X = ADDX_LEFT_FAR; - Walk_Pos_Y = ADDY_LEFT_FAR; - Walk_Pos_Z = ADDZ_LEFT_FAR; - break; - case 1: - Walk_Pos_X = ADDX_LEFT_MIDDLE; - Walk_Pos_Y = ADDY_LEFT_MIDDLE; - Walk_Pos_Z = ADDZ_LEFT_MIDDLE; - break; - case 2: - Walk_Pos_X = ADDX_LEFT_NEAR; - Walk_Pos_Y = ADDY_LEFT_NEAR; - Walk_Pos_Z = ADDZ_LEFT_NEAR; - break; - case 3: - Walk_Pos_X = ADDX_RIGHT_FAR; - Walk_Pos_Y = ADDY_RIGHT_FAR; - Walk_Pos_Z = ADDZ_RIGHT_FAR; - break; - case 4: - Walk_Pos_X = ADDX_RIGHT_MIDDLE; - Walk_Pos_Y = ADDY_RIGHT_MIDDLE; - Walk_Pos_Z = ADDZ_RIGHT_MIDDLE; - break; - case 5: - Walk_Pos_X = ADDX_RIGHT_NEAR; - Walk_Pos_Y = ADDY_RIGHT_NEAR; - Walk_Pos_Z = ADDZ_RIGHT_NEAR; - break; - } - - pGuardian->SendMonsterMoveWithSpeed(Walk_Pos_X, Walk_Pos_Y, Walk_Pos_Z); + Unit* guard = Unit::GetUnit((*m_creature), Guardians[i]); + if(guard && guard->isAlive()) + guard->DealDamage(guard, guard->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); } } - - if (m_pInstance) - m_pInstance->SetData(TYPE_KELTHUZAD, DONE); } - - void Aggro(Unit* pWho) + + void JustSummoned(Unit *summoned) { - switch(urand(0, 2)) + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) { - case 0: DoScriptText(SAY_AGGRO1, m_creature); break; - case 1: DoScriptText(SAY_AGGRO2, m_creature); break; - case 2: DoScriptText(SAY_AGGRO3, m_creature); break; + summoned->AddThreat(target, 1.0f); + summoned->GetMotionMaster()->MoveChase(target); } - - if (m_pInstance) - m_pInstance->SetData(TYPE_KELTHUZAD, IN_PROGRESS); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 diff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //Check for Frost Bolt - if (FrostBolt_Timer < uiDiff) + if(phase==1) { - DoCast(m_creature->getVictim(),SPELL_FROST_BOLT); - FrostBolt_Timer = urand(1000, 60000); - }else FrostBolt_Timer -= uiDiff; - - //Check for Frost Bolt Nova - if (FrostBoltNova_Timer < uiDiff) - { - DoCast(m_creature->getVictim(),SPELL_FROST_BOLT_NOVA); - FrostBoltNova_Timer = 15000; - }else FrostBoltNova_Timer -= uiDiff; - - //Check for Chains Of Kelthuzad - if (ChainsOfKelthuzad_Timer < uiDiff) - { - //DoCast(m_creature->getVictim(),SPELL_CHAINS_OF_KELTHUZAD); - - //if (urand(0, 1)) - //DoScriptText(SAY_CHAIN1, m_creature); - //else - //DoScriptText(SAY_CHAIN2, m_creature); - - ChainsOfKelthuzad_Timer = urand(30000, 60000); - }else ChainsOfKelthuzad_Timer -= uiDiff; + if(Phase1_Timer < diff) + { + switch(rand()%3) + { + case 0: DoScriptText(SAY_AGGRO1, m_creature); break; + case 1: DoScriptText(SAY_AGGRO2, m_creature); break; + case 2: DoScriptText(SAY_AGGRO3, m_creature); break; + } + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + SetCombatMovement(true); + phase = 2; + } + else Phase1_Timer -= diff; - //Check for Mana Detonation - if (ManaDetonation_Timer < uiDiff) - { - DoCast(m_creature->getVictim(),SPELL_MANA_DETONATION); + if(Skeleton_Timer < diff) + { + int i = irand(0,5); + Unit *mob = m_creature->SummonCreature(CR_SKELETON, AddX[i], AddY[i], AddZ[i], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); + Skeleton_Timer = 5000; + } + else Skeleton_Timer -= diff; - if (urand(0, 1)) - DoScriptText(SAY_SPECIAL1_MANA_DET, m_creature); + if(Abomination_Timer < diff) + { + int i = irand(0,5); + Unit *mob = m_creature->SummonCreature(CR_ABOMINATION, AddX[i], AddY[i], AddZ[i], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); + Abomination_Timer = Heroic ? (30000+rand()%15000) : (40000+rand()%15000); + } + else Abomination_Timer -= diff; - ManaDetonation_Timer = 20000; - }else ManaDetonation_Timer -= uiDiff; + if(Banshee_Timer < diff) + { + int i = irand(0,5); + Unit *mob = m_creature->SummonCreature(CR_BANSHEE, AddX[i], AddY[i], AddZ[i], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); + Banshee_Timer = Heroic ? (17000+rand()%10000) : (20000+rand()%15000); + } + else Banshee_Timer -= diff; + } - //Check for Shadow Fissure - if (ShadowFisure_Timer < uiDiff) + if(phase==2 || phase==3) { - DoCast(m_creature->getVictim(),SPELL_SHADOW_FISURE); - - if (urand(0, 1)) - DoScriptText(SAY_SPECIAL3_MANA_DET, m_creature); + //Frostbolt Volley + if(FrostboltV_Timer < diff) + { + DoCast(m_creature->getVictim(), Heroic ? H_SP_FROSTBOLT_VOLLEY : SP_FROSTBOLT_VOLLEY); + FrostboltV_Timer = 15000 + rand()%5000; + } + else FrostboltV_Timer -= diff; - ShadowFisure_Timer = 25000; - }else ShadowFisure_Timer -= uiDiff; + //Frost Blast + if(FrostBlast_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, SP_FROST_BLAST); + FrostBlast_Timer = 40000 + rand()%20000; + } + else FrostBlast_Timer -= diff; - //Check for Frost Blast - if (FrostBlast_Timer < uiDiff) - { - DoCast(m_creature->getVictim(),SPELL_FROST_BLAST); + if(ShadowFissure_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, SP_SHADOW_FISSURE); + ShadowFissure_Timer = 15000 + rand()%25000; + } + else ShadowFissure_Timer -= diff; - if (urand(0, 1)) - DoScriptText(SAY_FROST_BLAST, m_creature); + //Detonate Mana + if(DetonateMana_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, SP_DETONATE_MANA); + DetonateMana_Timer = 30000 + rand()%30000; + } + else DetonateMana_Timer -= diff; - FrostBlast_Timer = urand(30000, 60000); - }else FrostBlast_Timer -= uiDiff; + //Frostbolt + if(Frostbolt_Timer < diff) + { + DoCast(m_creature->getVictim(), Heroic ? H_SP_FROSTBOLT : SP_FROSTBOLT); + Frostbolt_Timer = 5000 + rand()%10000; + } + else Frostbolt_Timer -= diff; + } - //start phase 3 when we are 40% health - if (!Phase3 && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 40) + if (phase!=3 && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 40) { - Phase3 = true; - DoScriptText(SAY_REQUEST_AID, m_creature); - //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_REQUEST_AID, m_creature); DoScriptText(SAY_ANSWER_REQUEST, m_creature); + phase=3; } - if (Phase3 && (GuardiansOfIcecrown_Count < 5)) + if(phase==3) { - if (GuardiansOfIcecrown_Timer < uiDiff) + if(Guardian_Count < MaxGuardians) { - //Summon a Guardian of Icecrown in a random alcove (Creature # 16441) - //uint32 TimeToWalk; - Creature* pGuardian = NULL; - - float Walk_Pos_X; - float Walk_Pos_Y; - float Walk_Pos_Z; - - switch(urand(0, 5)) - { - case 0: - pGuardian = m_creature->SummonCreature(16441,ADDX_LEFT_FAR,ADDY_LEFT_FAR,ADDZ_LEFT_FAR,ADDO_LEFT_FAR,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,1000); - //Setting walk position - Walk_Pos_X = WALKX_LEFT_FAR; - Walk_Pos_Y = WALKY_LEFT_FAR; - Walk_Pos_Z = WALKZ_LEFT_FAR; - break; - case 1: - pGuardian = m_creature->SummonCreature(16441,ADDX_LEFT_MIDDLE,ADDY_LEFT_MIDDLE,ADDZ_LEFT_MIDDLE,ADDO_LEFT_MIDDLE,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,1000); - //Start moving guardian towards the center of the room - Walk_Pos_X = WALKX_LEFT_MIDDLE; - Walk_Pos_Y = WALKY_LEFT_MIDDLE; - Walk_Pos_Z = WALKZ_LEFT_MIDDLE; - break; - case 2: - pGuardian = m_creature->SummonCreature(16441,ADDX_LEFT_NEAR,ADDY_LEFT_NEAR,ADDZ_LEFT_NEAR,ADDO_LEFT_NEAR,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,1000); - //Start moving guardian towards the center of the room - Walk_Pos_X = WALKX_LEFT_NEAR; - Walk_Pos_Y = WALKY_LEFT_NEAR; - Walk_Pos_Z = WALKZ_LEFT_NEAR; - break; - case 3: - pGuardian = m_creature->SummonCreature(16441,ADDX_RIGHT_FAR,ADDY_RIGHT_FAR,ADDZ_RIGHT_FAR,ADDO_RIGHT_FAR,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,1000); - //Start moving guardian towards the center of the room - Walk_Pos_X = WALKX_RIGHT_FAR; - Walk_Pos_Y = WALKY_RIGHT_FAR; - Walk_Pos_Z = WALKZ_RIGHT_FAR; - break; - case 4: - pGuardian = m_creature->SummonCreature(16441,ADDX_RIGHT_MIDDLE,ADDY_RIGHT_MIDDLE,ADDZ_RIGHT_MIDDLE,ADDO_RIGHT_MIDDLE,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,1000); - //Start moving guardian towards the center of the room - Walk_Pos_X = WALKX_RIGHT_MIDDLE; - Walk_Pos_Y = WALKY_RIGHT_MIDDLE; - Walk_Pos_Z = WALKZ_RIGHT_MIDDLE; - break; - case 5: - pGuardian = m_creature->SummonCreature(16441,ADDX_RIGHT_NEAR,ADDY_RIGHT_NEAR,ADDZ_RIGHT_NEAR,ADDO_RIGHT_NEAR,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,1000); - //Start moving guardian towards the center of the room - Walk_Pos_X = WALKX_RIGHT_NEAR; - Walk_Pos_Y = WALKY_RIGHT_NEAR; - Walk_Pos_Z = WALKZ_RIGHT_NEAR; - break; - } - - if (pGuardian) + if(Guardian_Timer < diff) { - //if we find no one to figth walk to the center - if (!pGuardian->getVictim()) - pGuardian->SendMonsterMoveWithSpeed(Walk_Pos_X,Walk_Pos_Y,Walk_Pos_Z); - - //Safe storing of creatures - GuardiansOfIcecrown[GuardiansOfIcecrown_Count] = pGuardian->GetGUID(); - - //Update guardian count - ++GuardiansOfIcecrown_Count; + Unit *guard = NULL; + guard = DoSpawnCreature(CR_GUARDIAN, 40, 0, 5, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); + if(guard) + { + Guardians[Guardian_Count] = guard->GetGUID(); + Guardian_Count++; + } + Guardian_Timer = 8000; } - - //5 seconds until summoning next guardian - GuardiansOfIcecrown_Timer = 5000; - }else GuardiansOfIcecrown_Timer -= uiDiff; + else Guardian_Timer -= diff; + } } - DoMeleeAttackIfReady(); + if(phase!=1) DoMeleeAttackIfReady(); } }; -CreatureAI* GetAI_boss_kelthuzadAI(Creature* pCreature) +CreatureAI* GetAI_boss_kelthuzadAI(Creature *_Creature) { - return new boss_kelthuzadAI(pCreature); + return new boss_kelthuzadAI (_Creature); } void AddSC_boss_kelthuzad() { - Script* NewScript; - NewScript = new Script; - NewScript->Name = "boss_kelthuzad"; - NewScript->GetAI = &GetAI_boss_kelthuzadAI; - NewScript->RegisterSelf(); + Script *newscript; + newscript = new Script; + newscript->Name = "boss_kelthuzad"; + newscript->GetAI = &GetAI_boss_kelthuzadAI; + newscript->RegisterSelf(); } diff --git a/scripts/northrend/naxxramas/boss_loatheb.cpp b/scripts/northrend/naxxramas/boss_loatheb.cpp index 9f8ccb944..d0ae4f147 100644 --- a/scripts/northrend/naxxramas/boss_loatheb.cpp +++ b/scripts/northrend/naxxramas/boss_loatheb.cpp @@ -16,22 +16,29 @@ /* ScriptData SDName: Boss_Loatheb -SD%Complete: 100 -SDComment: +SD%Complete: 90 +SDComment: Doors don't work, timing not off, but very close SDCategory: Naxxramas EndScriptData */ +/*SQL +update creature_template set ScriptName="mob_loatheb_spores" where entry=16286 +update creature_template set ScriptName="boss_loatheb" where entry=16011 +*/ + #include "precompiled.h" #include "naxxramas.h" -enum -{ - SPELL_CORRUPTED_MIND = 29198, - SPELL_POISON_AURA = 29865, - SPELL_INEVITABLE_DOOM = 29204, - SPELL_REMOVE_CURSE = 30281 -}; +//Boss Loatheb spells +#define SPELL_NECROTIC_AURA 55593 +#define SPELL_DEATHBLOOM 29865 +#define SPELL_INEVITABLE_DOOM 29204 + +//Mob Loatheb Spore and his spell +#define MOB_LOATHEB_SPORE 16286 +#define SPELL_FUNGAL_CREEP 29232 +//Loatheb Spore spawn places #define ADD_1X 2957.040 #define ADD_1Y -3997.590 #define ADD_1Z 274.280 @@ -46,127 +53,137 @@ enum struct MANGOS_DLL_DECL boss_loathebAI : public ScriptedAI { - boss_loathebAI(Creature* pCreature) : ScriptedAI(pCreature) + boss_loathebAI(Creature *c) : ScriptedAI(c) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + pInstance = (ScriptedInstance*)c->GetInstanceData(); Reset(); } - ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; - - uint32 m_uiCorruptedMindTimer; - uint32 m_uiPoisonAuraTimer; - uint32 m_uiInevitableDoomTimer; - uint32 m_uiInevitableDoom5minsTimer; - uint32 m_uiRemoveCurseTimer; - uint32 m_uiSummonTimer; + ScriptedInstance *pInstance; + uint32 NecroticAura_Timer; + uint32 Deathbloom_Timer; + uint32 InevitableDoom_Timer; + uint32 InevitableDoom_Cooldown; + uint32 Summon_Timer; void Reset() { - m_uiCorruptedMindTimer = 4000; - m_uiPoisonAuraTimer = 2500; - m_uiInevitableDoomTimer = 120000; - m_uiInevitableDoom5minsTimer = 300000; - m_uiRemoveCurseTimer = 30000; - m_uiSummonTimer = 8000; - } - - void Aggro(Unit* pWho) + NecroticAura_Timer = 20000; + Deathbloom_Timer = 30000; + InevitableDoom_Timer = 120000; + InevitableDoom_Cooldown = 40000; + //This is cooldown for Doom spell. 40000 means 30sec + //cooldown + 10sec spelltime, so next doom will be cast 30 sec + //after first ends. cooldown decreases by 5 sec after each doom + Summon_Timer = 8000; + + if(pInstance) pInstance->SetData(TYPE_LOATHEB, NOT_STARTED); + } + + void Aggro(Unit *who) { - if (m_pInstance) - m_pInstance->SetData(TYPE_LOATHEB, IN_PROGRESS); + if(pInstance) pInstance->SetData(TYPE_LOATHEB, IN_PROGRESS); } - - void JustDied(Unit* pKiller) + + void JustDied(Unit *killer) { - if (m_pInstance) - m_pInstance->SetData(TYPE_LOATHEB, DONE); + if(pInstance) pInstance->SetData(TYPE_LOATHEB, DONE); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 diff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - // Corrupted Mind - if (m_uiCorruptedMindTimer < uiDiff) + //NecroticAura_Timer + if (NecroticAura_Timer < diff) { - DoCast(m_creature->getVictim(), SPELL_CORRUPTED_MIND); - m_uiCorruptedMindTimer = 62000; - } - else - m_uiCorruptedMindTimer -= uiDiff; - - // Poison Aura - if (m_uiPoisonAuraTimer < uiDiff) - { - DoCast(m_creature->getVictim(), SPELL_POISON_AURA); - m_uiPoisonAuraTimer = 60000; - } - else - m_uiPoisonAuraTimer -= uiDiff; - - // Inevitable Doom - if (m_uiInevitableDoomTimer < uiDiff) - { - DoCast(m_creature->getVictim(), SPELL_INEVITABLE_DOOM); - m_uiInevitableDoomTimer = 120000; - } - else - m_uiInevitableDoomTimer -= uiDiff; - - // Inevitable Doom 5mins - if (m_uiInevitableDoom5minsTimer < uiDiff) + DoCast(m_creature->getVictim(),SPELL_NECROTIC_AURA); + NecroticAura_Timer = 20000; + }else NecroticAura_Timer -= diff; + + //Deathbloom_Timer + if (Deathbloom_Timer < diff) { - DoCast(m_creature->getVictim(), SPELL_INEVITABLE_DOOM); - m_uiInevitableDoom5minsTimer = 15000; - } - else - m_uiInevitableDoom5minsTimer -= uiDiff; - - // Remove Curse - if (m_uiRemoveCurseTimer < uiDiff) + DoCast(m_creature->getVictim(),SPELL_DEATHBLOOM); + Deathbloom_Timer = 30000; + }else Deathbloom_Timer -= diff; + + //InevitableDoom_Timer + if (InevitableDoom_Timer < diff) { - DoCast(m_creature, SPELL_REMOVE_CURSE); - m_uiRemoveCurseTimer = 30000; - } - else - m_uiRemoveCurseTimer -= uiDiff; - - // Summon - if (m_uiSummonTimer < uiDiff) + DoCast(m_creature->getVictim(),SPELL_INEVITABLE_DOOM); + InevitableDoom_Timer = InevitableDoom_Cooldown; + if (InevitableDoom_Cooldown > 15000) + InevitableDoom_Cooldown -= 5000; + }else InevitableDoom_Timer -= diff; + + //Summon_Timer + if (Summon_Timer < diff) { - Unit* pSummonedSpores = NULL; - - pSummonedSpores = m_creature->SummonCreature(16286,ADD_1X,ADD_1Y,ADD_1Z,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000); - pSummonedSpores = m_creature->SummonCreature(16286,ADD_2X,ADD_2Y,ADD_2Z,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000); - pSummonedSpores = m_creature->SummonCreature(16286,ADD_3X,ADD_3Y,ADD_3Z,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000); - if (pSummonedSpores) + Unit* SummonedSpores = NULL; + switch (rand()%3) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) - pSummonedSpores->AddThreat(pTarget,1.0f); - } - - m_uiSummonTimer = 28000; - } - else - m_uiSummonTimer -= uiDiff; + case 0: + SummonedSpores = m_creature->SummonCreature(16286,ADD_1X,ADD_1Y,ADD_1Z,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000); + break; + case 1: + SummonedSpores = m_creature->SummonCreature(16286,ADD_2X,ADD_2Y,ADD_2Z,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000); + break; + case 2: + SummonedSpores = m_creature->SummonCreature(16286,ADD_3X,ADD_3Y,ADD_3Z,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000); + break; + }; + if (SummonedSpores) + SummonedSpores->AddThreat(m_creature->getVictim(), 1.0f); + Summon_Timer = 24000; + } else Summon_Timer -= diff; DoMeleeAttackIfReady(); } }; -CreatureAI* GetAI_boss_loatheb(Creature* pCreature) +CreatureAI* GetAI_boss_loatheb(Creature *_Creature) +{ + return new boss_loathebAI (_Creature); +} + +struct MANGOS_DLL_DECL mob_loatheb_sporesAI : public ScriptedAI +{ + mob_loatheb_sporesAI(Creature *c) : ScriptedAI(c){Reset();} + + bool InCombat; + void Reset(){} + + void Aggro(Unit *who){} + void JustDied(Unit* Killer) + { + DoCast(m_creature,SPELL_FUNGAL_CREEP,true); + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; +CreatureAI* GetAI_mob_loatheb_spores(Creature *_Creature) { - return new boss_loathebAI(pCreature); + return new mob_loatheb_sporesAI (_Creature); } void AddSC_boss_loatheb() { - Script* NewScript; - NewScript = new Script; - NewScript->Name = "boss_loatheb"; - NewScript->GetAI = &GetAI_boss_loatheb; - NewScript->RegisterSelf(); + Script *newscript; + newscript = new Script; + newscript->Name = "boss_loatheb"; + newscript->GetAI = &GetAI_boss_loatheb; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_loatheb_spores"; + newscript->GetAI = &GetAI_mob_loatheb_spores; + newscript->RegisterSelf(); } diff --git a/scripts/northrend/naxxramas/boss_maexxna.cpp b/scripts/northrend/naxxramas/boss_maexxna.cpp index 8e5f4f1f2..30330f2ee 100644 --- a/scripts/northrend/naxxramas/boss_maexxna.cpp +++ b/scripts/northrend/naxxramas/boss_maexxna.cpp @@ -24,22 +24,19 @@ EndScriptData */ #include "precompiled.h" #include "naxxramas.h" -enum -{ - SPELL_WEBWRAP = 28622, //Spell is normally used by the webtrap on the wall NOT by Maexxna - - SPELL_WEBSPRAY = 29484, - H_SPELL_WEBSPRAY = 54125, - SPELL_POISONSHOCK = 28741, - H_SPELL_POISONSHOCK = 54122, - SPELL_NECROTICPOISON = 28776, - H_SPELL_NECROTICPOISON = 54121, - SPELL_FRENZY = 54123, - H_SPELL_FRENZY = 54124, - - //spellId invalid - SPELL_SUMMON_SPIDERLING = 29434, -}; +#define SPELL_WEBTRAP 28622 //Spell is normally used by the webtrap on the wall NOT by Maexxna + +#define SPELL_WEBSPRAY 29484 +#define H_SPELL_WEBSPRAY 54125 +#define SPELL_POISONSHOCK 28741 +#define H_SPELL_POISONSHOCK 54122 +#define SPELL_NECROTICPOISON 28776 +#define H_SPELL_NECROTICPOISON 54121 +#define SPELL_FRENZY 54123 +#define H_SPELL_FRENZY 54124 + +//spellId invalid +#define SPELL_SUMMON_SPIDERLING 29434 #define LOC_X1 3546.796 #define LOC_Y1 -3869.082 @@ -57,77 +54,78 @@ struct MANGOS_DLL_DECL mob_webwrapAI : public ScriptedAI { mob_webwrapAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - uint64 m_uiVictimGUID; + uint64 victimGUID; void Reset() { - m_uiVictimGUID = 0; + victimGUID = 0; } - void SetVictim(Unit* pVictim) + void SetVictim(Unit* victim) { - if (pVictim) + if (victim) { - m_uiVictimGUID = pVictim->GetGUID(); - pVictim->CastSpell(pVictim, SPELL_WEBWRAP, true); + victimGUID = victim->GetGUID(); + victim->CastSpell(victim, SPELL_WEBTRAP, true); } } - void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + void DamageTaken(Unit *done_by, uint32 &damage) { - if (uiDamage > m_creature->GetHealth()) + if (damage > m_creature->GetHealth()) { - if (m_uiVictimGUID) + if (victimGUID) { - if (Unit* pVictim = Unit::GetUnit((*m_creature), m_uiVictimGUID)) - pVictim->RemoveAurasDueToSpell(SPELL_WEBWRAP); + Unit* victim = NULL; + victim = Unit::GetUnit((*m_creature), victimGUID); + if (victim) + victim->RemoveAurasDueToSpell(SPELL_WEBTRAP); } } } - void MoveInLineOfSight(Unit* pWho) { } - void UpdateAI(const uint32 uiDiff) { } + void MoveInLineOfSight(Unit *who) { } + void UpdateAI(const uint32 diff) { } }; struct MANGOS_DLL_DECL boss_maexxnaAI : public ScriptedAI { boss_maexxnaAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + Heroic = m_creature->GetMap()->IsHeroic(); Reset(); } - ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; - - uint32 m_uiWebWrapTimer; - uint32 m_uiWebSprayTimer; - uint32 m_uiPoisonShockTimer; - uint32 m_uiNecroticPoisonTimer; - uint32 m_uiSummonSpiderlingTimer; - bool m_bEnraged; + ScriptedInstance *pInstance; + bool Heroic; + uint32 WebTrap_Timer; + uint32 WebSpray_Timer; + uint32 PoisonShock_Timer; + uint32 NecroticPoison_Timer; + uint32 SummonSpiderling_Timer; + bool Enraged; void Reset() { - m_uiWebWrapTimer = 20000; //20 sec init, 40 sec normal - m_uiWebSprayTimer = 40000; //40 seconds - m_uiPoisonShockTimer = 20000; //20 seconds - m_uiNecroticPoisonTimer = 30000; //30 seconds - m_uiSummonSpiderlingTimer = 30000; //30 sec init, 40 sec normal - m_bEnraged = false; + WebTrap_Timer = 20000; //20 sec init, 40 sec normal + WebSpray_Timer = 40000; //40 seconds + PoisonShock_Timer = 20000; //20 seconds + NecroticPoison_Timer = 30000; //30 seconds + SummonSpiderling_Timer = 30000; //30 sec init, 40 sec normal + Enraged = false; + + if(pInstance) pInstance->SetData(TYPE_MAEXXNA, NOT_STARTED); } - void Aggro(Unit* pWho) + void Aggro(Unit *who) { - if (m_pInstance) - m_pInstance->SetData(TYPE_MAEXXNA, IN_PROGRESS); + if(pInstance) pInstance->SetData(TYPE_MAEXXNA, IN_PROGRESS); } - void JustDied(Unit* pKiller) + void JustDied(Unit *killer) { - if (m_pInstance) - m_pInstance->SetData(TYPE_MAEXXNA, DONE); + if(pInstance) pInstance->SetData(TYPE_MAEXXNA, DONE); } void DoCastWebWrap() @@ -183,61 +181,51 @@ struct MANGOS_DLL_DECL boss_maexxnaAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 diff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - // Web Wrap - if (m_uiWebWrapTimer < uiDiff) + //WebTrap_Timer + if (WebTrap_Timer < diff) { DoCastWebWrap(); - m_uiWebWrapTimer = 40000; - } - else - m_uiWebWrapTimer -= uiDiff; + WebTrap_Timer = 40000; + }else WebTrap_Timer -= diff; - // Web Spray - if (m_uiWebSprayTimer < uiDiff) + //WebSpray_Timer + if (WebSpray_Timer < diff) { - DoCast(m_creature->getVictim(), SPELL_WEBSPRAY); - m_uiWebSprayTimer = 40000; - } - else - m_uiWebSprayTimer -= uiDiff; + DoCast(m_creature->getVictim(), Heroic ? H_SPELL_WEBSPRAY : SPELL_WEBSPRAY); + WebSpray_Timer = 40000; + }else WebSpray_Timer -= diff; - // Poison Shock - if (m_uiPoisonShockTimer < uiDiff) + //PoisonShock_Timer + if (PoisonShock_Timer < diff) { - DoCast(m_creature->getVictim(), SPELL_POISONSHOCK); - m_uiPoisonShockTimer = 20000; - } - else - m_uiPoisonShockTimer -= uiDiff; + DoCast(m_creature->getVictim(), Heroic ? H_SPELL_POISONSHOCK : SPELL_POISONSHOCK); + PoisonShock_Timer = 20000; + }else PoisonShock_Timer -= diff; - // Necrotic Poison - if (m_uiNecroticPoisonTimer < uiDiff) + //NecroticPoison_Timer + if (NecroticPoison_Timer < diff) { - DoCast(m_creature->getVictim(), SPELL_NECROTICPOISON); - m_uiNecroticPoisonTimer = 30000; - } - else - m_uiNecroticPoisonTimer -= uiDiff; + DoCast(m_creature->getVictim(), Heroic ? H_SPELL_NECROTICPOISON : SPELL_NECROTICPOISON); + NecroticPoison_Timer = 30000; + }else NecroticPoison_Timer -= diff; - // Summon Spiderling - if (m_uiSummonSpiderlingTimer < uiDiff) + //SummonSpiderling_Timer + if (SummonSpiderling_Timer < diff) { DoCast(m_creature, SPELL_SUMMON_SPIDERLING); - m_uiSummonSpiderlingTimer = 40000; - } - else - m_uiSummonSpiderlingTimer -= uiDiff; + SummonSpiderling_Timer = 40000; + }else SummonSpiderling_Timer -= diff; //Enrage if not already enraged and below 30% - if (!m_bEnraged && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 30) + if (!Enraged && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 30) { - DoCast(m_creature, SPELL_FRENZY); - m_bEnraged = true; + DoCast(m_creature, Heroic ? H_SPELL_FRENZY : SPELL_FRENZY); + Enraged = true; } DoMeleeAttackIfReady(); @@ -256,15 +244,15 @@ CreatureAI* GetAI_boss_maexxna(Creature* pCreature) void AddSC_boss_maexxna() { - Script* NewScript; + Script *newscript; - NewScript = new Script; - NewScript->Name = "boss_maexxna"; - NewScript->GetAI = &GetAI_boss_maexxna; - NewScript->RegisterSelf(); + newscript = new Script; + newscript->Name = "boss_maexxna"; + newscript->GetAI = &GetAI_boss_maexxna; + newscript->RegisterSelf(); - NewScript = new Script; - NewScript->Name = "mob_webwrap"; - NewScript->GetAI = &GetAI_mob_webwrap; - NewScript->RegisterSelf(); + newscript = new Script; + newscript->Name = "mob_webwrap"; + newscript->GetAI = &GetAI_mob_webwrap; + newscript->RegisterSelf(); } diff --git a/scripts/northrend/naxxramas/boss_noth.cpp b/scripts/northrend/naxxramas/boss_noth.cpp index 33bb921d4..d0fc9d926 100644 --- a/scripts/northrend/naxxramas/boss_noth.cpp +++ b/scripts/northrend/naxxramas/boss_noth.cpp @@ -44,22 +44,7 @@ enum SPELL_SUMMON_GUARDIAN_AND_CONSTRUCT = 29269, NPC_PLAGUED_WARRIOR = 16984, - -}; - -uint32 m_auiSpellSummonPlaguedWarrior[]= -{ - 29247, 29248, 29249 -}; - -uint32 m_auiSpellSummonPlaguedChampion[]= -{ - 29217, 29224, 29225, 29227, 29238, 29255, 29257, 29258, 29262, 29267 -}; - -uint32 m_auiSpellSummonPlaguedGuardian[]= -{ - 29226, 29239, 29256, 29268 + NPC_PLAGUED_CHAMPION = 16983 }; // Teleport position of Noth on his balcony @@ -68,34 +53,45 @@ uint32 m_auiSpellSummonPlaguedGuardian[]= #define TELE_Z 274.040 #define TELE_O 6.277 -// IMPORTANT: BALCONY TELEPORT NOT ADDED YET! WILL BE ADDED SOON! -// Dev note 26.12.2008: When is soon? :) -// Dev note 12.10.2009: http://www.wowwiki.com/Soon - struct MANGOS_DLL_DECL boss_nothAI : public ScriptedAI { boss_nothAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Heroic = pCreature->GetMap()->IsHeroic(); + AddsCount = Heroic ? 3 : 2; //normal phase + BalconyAddsCount = Heroic ? 4 : 2; //balcony phase Reset(); } - ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + ScriptedInstance* pInstance; + bool Heroic; + + uint32 BlinkTimer; + uint32 CurseTimer; + uint32 SummonTimer; + uint32 BalconySummonTimer; - uint32 m_uiBlinkTimer; - uint32 m_uiCurseTimer; - uint32 m_uiSummonTimer; + uint32 AddsCount; + uint32 BalconyAddsCount; + + bool BalconyPhase; + uint32 PhaseTimer; void Reset() { - m_uiBlinkTimer = 25000; - m_uiCurseTimer = 4000; - m_uiSummonTimer = 12000; + BlinkTimer = 25000; + CurseTimer = 4000; + SummonTimer = 12000; + BalconySummonTimer = 5000; + + BalconyPhase = false; + PhaseTimer = 90000; + + if(pInstance) pInstance->SetData(TYPE_NOTH, NOT_STARTED); } - void Aggro(Unit* pWho) + void Aggro(Unit *who) { switch(urand(0, 2)) { @@ -103,69 +99,104 @@ struct MANGOS_DLL_DECL boss_nothAI : public ScriptedAI case 1: DoScriptText(SAY_AGGRO2, m_creature); break; case 2: DoScriptText(SAY_AGGRO3, m_creature); break; } - - if (m_pInstance) - m_pInstance->SetData(TYPE_NOTH, IN_PROGRESS); + + if(pInstance) pInstance->SetData(TYPE_NOTH, IN_PROGRESS); } - void JustSummoned(Creature* pSummoned) + void JustSummoned(Creature* summoned) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - pSummoned->AddThreat(pTarget, 0.0f); + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + summoned->AddThreat(target,0.0f); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* victim) { - DoScriptText(urand(0, 1)?SAY_SLAY1:SAY_SLAY2, m_creature); + DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* Killer) { DoScriptText(SAY_DEATH, m_creature); - - if (m_pInstance) - m_pInstance->SetData(TYPE_NOTH, DONE); + if(pInstance) pInstance->SetData(TYPE_NOTH, DONE); } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 diff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - // Blink - if (m_uiBlinkTimer < uiDiff) + if(PhaseTimer < diff) { - DoCast(m_creature->getVictim(), SPELL_CRIPPLE); - DoCast(m_creature, SPELL_BLINK); - - m_uiBlinkTimer = 25000; + if(!BalconyPhase) + { + BalconyPhase = true; + PhaseTimer = 70000; + //teleport to balcony and make inactive + SetCombatMovement(false); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveIdle(); + m_creature->NearTeleportTo(TELE_X, TELE_Y, TELE_Z, TELE_O); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } + else + { + BalconyPhase = false; + PhaseTimer = 110000; + //teleport back and make active + m_creature->NearTeleportTo(2684.804, -3502.517, 261.313, 0); + SetCombatMovement(true); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } } - else - m_uiBlinkTimer -= uiDiff; + else PhaseTimer -= diff; - // Curse - if (m_uiCurseTimer < uiDiff) + if(BalconyPhase) { - DoCast(m_creature->getVictim(), SPELL_CURSE_PLAGUEBRINGER); - m_uiCurseTimer = 28000; + if(BalconySummonTimer < diff) + { + DoScriptText(SAY_SUMMON, m_creature); + for(uint8 i = 0; i < BalconyAddsCount; ++i) + m_creature->SummonCreature(NPC_PLAGUED_CHAMPION, 2704.65, -3460.58, 262.86, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + BalconySummonTimer = 35000; + } + else BalconySummonTimer -= diff; } else - m_uiCurseTimer -= uiDiff; - - // Summon - if (m_uiSummonTimer < uiDiff) { - DoScriptText(SAY_SUMMON, m_creature); - - for(uint8 i = 0; i < 6; ++i) - m_creature->SummonCreature(NPC_PLAGUED_WARRIOR, 2684.804, -3502.517, 261.313, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 80000); - - m_uiSummonTimer = 30500; - } - else - m_uiSummonTimer -= uiDiff; - - DoMeleeAttackIfReady(); + if (BlinkTimer < diff) + { + DoCast(m_creature->getVictim(),SPELL_CRIPPLE); + if(Heroic) + { + DoCast(m_creature, SPELL_BLINK); + DoResetThreat(); + } + BlinkTimer = 25000; + }else BlinkTimer -= diff; + + if (CurseTimer < diff) + { + DoCast(m_creature->getVictim(),SPELL_CURSE_PLAGUEBRINGER); + CurseTimer = 28000; + } + else CurseTimer -= diff; + + //Summon_Timer + if (SummonTimer < diff) + { + DoScriptText(SAY_SUMMON, m_creature); + for(uint8 i = 0; i < AddsCount; ++i) + m_creature->SummonCreature(NPC_PLAGUED_WARRIOR, 2684.804, -3502.517, 261.313, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); + SummonTimer = 30000; + } + else SummonTimer -= diff; + + DoMeleeAttackIfReady(); + } } }; @@ -176,9 +207,9 @@ CreatureAI* GetAI_boss_noth(Creature* pCreature) void AddSC_boss_noth() { - Script* NewScript; - NewScript = new Script; - NewScript->Name = "boss_noth"; - NewScript->GetAI = &GetAI_boss_noth; - NewScript->RegisterSelf(); + Script *newscript; + newscript = new Script; + newscript->Name = "boss_noth"; + newscript->GetAI = &GetAI_boss_noth; + newscript->RegisterSelf(); } diff --git a/scripts/northrend/naxxramas/boss_patchwerk.cpp b/scripts/northrend/naxxramas/boss_patchwerk.cpp index 5018b47f4..d412d2387 100644 --- a/scripts/northrend/naxxramas/boss_patchwerk.cpp +++ b/scripts/northrend/naxxramas/boss_patchwerk.cpp @@ -17,60 +17,49 @@ /* ScriptData SDName: Boss_Patchwerk SD%Complete: 80 -SDComment: TODO: confirm how hateful strike work +SDComment: Some issues with hateful strike inturrupting the melee swing timer. SDCategory: Naxxramas EndScriptData */ #include "precompiled.h" -#include "naxxramas.h" -enum -{ - SAY_AGGRO1 = -1533017, - SAY_AGGRO2 = -1533018, - SAY_SLAY = -1533019, - SAY_DEATH = -1533020, - - EMOTE_BERSERK = -1533021, - EMOTE_ENRAGE = -1533022, - - SPELL_HATEFULSTRIKE = 28308, - SPELL_HATEFULSTRIKE_H = 59192, - SPELL_ENRAGE = 28131, - SPELL_BERSERK = 26662, - SPELL_SLIMEBOLT = 32309 -}; +#define SAY_AGGRO1 -1533017 +#define SAY_AGGRO2 -1533018 +#define SAY_SLAY -1533019 +#define SAY_DEATH -1533020 -const float MELEE_DISTANCE = 5.0; +#define EMOTE_BERSERK -1533021 +#define EMOTE_ENRAGE -1533022 + +#define SPELL_HATEFULSTRIKE 28308 +#define H_SPELL_HATEFULSTRIKE 59192 +#define SPELL_ENRAGE 28131 +#define SPELL_BERSERK 26662 +#define SPELL_SLIMEBOLT 32309 struct MANGOS_DLL_DECL boss_patchwerkAI : public ScriptedAI { boss_patchwerkAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Heroic = m_creature->GetMap()->IsHeroic(); Reset(); } - ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; - - uint32 m_uiHatefulStrikeTimer; - uint32 m_uiBerserkTimer; - uint32 m_uiSlimeboltTimer; - bool m_bEnraged; - bool m_bBerserk; + bool Heroic; + uint32 HatefullStrike_Timer; + uint32 Enrage_Timer; + uint32 Slimebolt_Timer; + bool Enraged; void Reset() { - m_uiHatefulStrikeTimer = 1000; //1 second - m_uiBerserkTimer = MINUTE*6*IN_MILISECONDS; //6 minutes - m_uiSlimeboltTimer = 10000; - m_bEnraged = false; - m_bBerserk = false; + HatefullStrike_Timer = 1200; //1.2 seconds + Enrage_Timer = 420000; //7 minutes 420,000 + Slimebolt_Timer = 450000; //7.5 minutes 450,000 + Enraged = false; } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* Victim) { if (urand(0, 4)) return; @@ -78,98 +67,71 @@ struct MANGOS_DLL_DECL boss_patchwerkAI : public ScriptedAI DoScriptText(SAY_SLAY, m_creature); } - void JustDied(Unit* pKiller) + void JustDied(Unit* Killer) { DoScriptText(SAY_DEATH, m_creature); - - if (m_pInstance) - m_pInstance->SetData(TYPE_PATCHWERK, DONE); } - void Aggro(Unit* pWho) + void Aggro(Unit *who) { - DoScriptText(urand(0, 1)?SAY_AGGRO1:SAY_AGGRO2, m_creature); - - if (m_pInstance) - m_pInstance->SetData(TYPE_PATCHWERK, IN_PROGRESS); + if (urand(0, 1)) + DoScriptText(SAY_AGGRO1, m_creature); + else + DoScriptText(SAY_AGGRO2, m_creature); } - void DoHatefulStrike() + void UpdateAI(const uint32 diff) { - // The ability is used on highest HP target choosen of the top 2 (3 heroic) targets on threat list being in melee range - Unit* pTarget = NULL; - uint32 uiHighestHP = 0; - uint32 uiTargets = m_bIsHeroicMode?3:2; + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; - std::list::iterator iter = m_creature->getThreatManager().getThreatList().begin(); - for (iter = m_creature->getThreatManager().getThreatList().begin(); iter != m_creature->getThreatManager().getThreatList().end(); ++iter) + //HatefullStrike_Timer + if (HatefullStrike_Timer < diff) { - if (!uiTargets) - return; - - if (Unit* pTempTarget = Unit::GetUnit((*m_creature), (*iter)->getUnitGuid())) + //Cast Hateful strike on the player with the highest + //amount of HP within melee distance + uint32 MostHP = 0; + Unit* pMostHPTarget = NULL; + Unit* pTemp = NULL; + std::list::iterator i = m_creature->getThreatManager().getThreatList().begin(); + + for (i = m_creature->getThreatManager().getThreatList().begin(); i!=m_creature->getThreatManager().getThreatList().end(); ++i) { - if (pTempTarget->GetHealth() > uiHighestHP && m_creature->IsWithinDistInMap(pTempTarget, MELEE_DISTANCE)) + pTemp = Unit::GetUnit((*m_creature),(*i)->getUnitGuid()); + if (pTemp && pTemp->isAlive() && pTemp->GetHealth() > MostHP && m_creature->IsWithinDist(pTemp, 5.0f, false)) { - uiHighestHP = pTempTarget->GetHealth(); - pTarget = pTempTarget; + MostHP = pTemp->GetHealth(); + pMostHPTarget = pTemp; } } - --uiTargets; - } + if (pMostHPTarget) + DoCast(pMostHPTarget, Heroic ? H_SPELL_HATEFULSTRIKE : SPELL_HATEFULSTRIKE); - if (pTarget) - DoCast(pTarget, m_bIsHeroicMode?SPELL_HATEFULSTRIKE_H:SPELL_HATEFULSTRIKE); - } - - void UpdateAI(const uint32 uiDiff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; + HatefullStrike_Timer = 1200; + }else HatefullStrike_Timer -= diff; - // Hateful Strike - if (m_uiHatefulStrikeTimer < uiDiff) + //Enrage_Timer + if (Enrage_Timer < diff) { - DoHatefulStrike(); - m_uiHatefulStrikeTimer = 1000; - } - else - m_uiHatefulStrikeTimer -= uiDiff; + DoCast(m_creature, SPELL_BERSERK); + DoScriptText(EMOTE_BERSERK, m_creature); + Enrage_Timer = 300000; + }else Enrage_Timer -= diff; - // Soft Enrage at 5% - if (!m_bEnraged) + //Slimebolt_Timer + if (Slimebolt_Timer < diff) { - if (m_creature->GetHealth()*20 < m_creature->GetMaxHealth()) - { - DoCast(m_creature, SPELL_ENRAGE); - DoScriptText(EMOTE_ENRAGE, m_creature); - m_bEnraged = true; - } - } + DoCast(m_creature->getVictim(),SPELL_SLIMEBOLT); + Slimebolt_Timer = 5000; + }else Slimebolt_Timer -= diff; - // Berserk after 6 minutes - if (!m_bBerserk) + //Enrage if not already enraged and below 5% + if (!Enraged && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 5) { - if (m_uiBerserkTimer < uiDiff) - { - DoCast(m_creature, SPELL_BERSERK); - DoScriptText(EMOTE_BERSERK, m_creature); - m_bBerserk = true; - } - else - m_uiBerserkTimer -= uiDiff; - } - else - { - // Slimebolt - casted only while Berserking to prevent kiting - if (m_uiSlimeboltTimer < uiDiff) - { - DoCast(m_creature->getVictim(), SPELL_SLIMEBOLT); - m_uiSlimeboltTimer = 5000; - } - else - m_uiSlimeboltTimer -= uiDiff; + DoCast(m_creature,SPELL_ENRAGE); + DoScriptText(EMOTE_ENRAGE,NULL); + Enraged = true; } DoMeleeAttackIfReady(); @@ -183,9 +145,9 @@ CreatureAI* GetAI_boss_patchwerk(Creature* pCreature) void AddSC_boss_patchwerk() { - Script* NewScript; - NewScript = new Script; - NewScript->Name = "boss_patchwerk"; - NewScript->GetAI = &GetAI_boss_patchwerk; - NewScript->RegisterSelf(); + Script *newscript; + newscript = new Script; + newscript->Name = "boss_patchwerk"; + newscript->GetAI = &GetAI_boss_patchwerk; + newscript->RegisterSelf(); } diff --git a/scripts/northrend/naxxramas/boss_razuvious.cpp b/scripts/northrend/naxxramas/boss_razuvious.cpp index 90287f27e..30c6d444a 100644 --- a/scripts/northrend/naxxramas/boss_razuvious.cpp +++ b/scripts/northrend/naxxramas/boss_razuvious.cpp @@ -110,7 +110,7 @@ struct MANGOS_DLL_DECL boss_razuviousAI : public ScriptedAI // Unbalancing Strike if (m_uiUnbalancingStrikeTimer < uiDiff) { - DoCast(m_creature->getVictim(),SPELL_UNBALANCING_STRIKE); + DoCast(m_creature->getVictim(), SPELL_UNBALANCING_STRIKE); m_uiUnbalancingStrikeTimer = 30000; } else @@ -119,7 +119,7 @@ struct MANGOS_DLL_DECL boss_razuviousAI : public ScriptedAI // Disrupting Shout if (m_uiDisruptingShoutTimer < uiDiff) { - DoCast(m_creature->getVictim(), m_bIsHeroicMode?SPELL_DISRUPTING_SHOUT_H:SPELL_DISRUPTING_SHOUT); + DoCast(m_creature->getVictim(), m_bIsHeroicMode ? SPELL_DISRUPTING_SHOUT_H : SPELL_DISRUPTING_SHOUT); m_uiDisruptingShoutTimer = 25000; } else diff --git a/scripts/northrend/naxxramas/boss_sapphiron.cpp b/scripts/northrend/naxxramas/boss_sapphiron.cpp index 918d2bc6b..2315fbedd 100644 --- a/scripts/northrend/naxxramas/boss_sapphiron.cpp +++ b/scripts/northrend/naxxramas/boss_sapphiron.cpp @@ -22,33 +22,24 @@ SDCategory: Naxxramas EndScriptData */ #include "precompiled.h" -#include "naxxramas.h" -enum -{ - EMOTE_BREATH = -1533082, - EMOTE_ENRAGE = -1533083, - - SPELL_ICEBOLT = 28522, - SPELL_FROST_BREATH = 29318, - SPELL_FROST_AURA = 28531, - SPELL_LIFE_DRAIN = 28542, - SPELL_BLIZZARD = 28547, - SPELL_BESERK = 26662 -}; +#define EMOTE_BREATH -1533082 +#define EMOTE_ENRAGE -1533083 + +#define SPELL_ICEBOLT 28522 +#define SPELL_FROST_BREATH 29318 //should be 28524 +#define SPELL_FROST_AURA 28531 +#define SPELL_LIFE_DRAIN 28542 +#define SPELL_BLIZZARD 28547 +#define SPELL_BERSERK 26662 struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI { boss_sapphironAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); Reset(); } - ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; - uint32 Icebolt_Count; uint32 Icebolt_Timer; uint32 FrostBreath_Timer; @@ -56,7 +47,7 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI uint32 LifeDrain_Timer; uint32 Blizzard_Timer; uint32 Fly_Timer; - uint32 Beserk_Timer; + uint32 Berserk_Timer; uint32 phase; bool landoff; uint32 land_Timer; @@ -64,13 +55,13 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI void Reset() { FrostAura_Timer = 2000; - FrostBreath_Timer = 2500; + FrostBreath_Timer = 6000; LifeDrain_Timer = 24000; Blizzard_Timer = 20000; Fly_Timer = 45000; Icebolt_Timer = 4000; land_Timer = 2000; - Beserk_Timer = 0; + Berserk_Timer = 900000; phase = 1; Icebolt_Count = 0; landoff = false; @@ -78,92 +69,80 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI //m_creature->ApplySpellMod(SPELL_FROST_AURA, SPELLMOD_DURATION, -1); } - void Aggro(Unit* pWho) - { - if (m_pInstance) - m_pInstance->SetData(TYPE_SAPPHIRON, IN_PROGRESS); - } - - void JustDied(Unit* pKiller) - { - if (m_pInstance) - m_pInstance->SetData(TYPE_SAPPHIRON, DONE); - } - - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 diff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; if (phase == 1) { - if (FrostAura_Timer < uiDiff) + if (FrostAura_Timer < diff) { DoCast(m_creature->getVictim(),SPELL_FROST_AURA); FrostAura_Timer = 5000; - }else FrostAura_Timer -= uiDiff; + }else FrostAura_Timer -= diff; - if (LifeDrain_Timer < uiDiff) + if (LifeDrain_Timer < diff) { if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) DoCast(target,SPELL_LIFE_DRAIN); LifeDrain_Timer = 24000; - }else LifeDrain_Timer -= uiDiff; + }else LifeDrain_Timer -= diff; - if (Blizzard_Timer < uiDiff) + if (Blizzard_Timer < diff) { if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) DoCast(target,SPELL_BLIZZARD); Blizzard_Timer = 20000; - }else Blizzard_Timer -= uiDiff; + }else Blizzard_Timer -= diff; if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() > 10) { - if (Fly_Timer < uiDiff) + if (Fly_Timer < diff) { phase = 2; m_creature->InterruptNonMeleeSpells(false); m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF); m_creature->GetMotionMaster()->Clear(false); m_creature->GetMotionMaster()->MoveIdle(); - DoCast(m_creature,11010); + //DoCast(m_creature,11010); m_creature->SetHover(true); - DoCast(m_creature,18430); + //DoCast(m_creature,18430); Icebolt_Timer = 4000; Icebolt_Count = 0; landoff = false; - }else Fly_Timer -= uiDiff; + }else Fly_Timer -= diff; } } if (phase == 2) { - if (Icebolt_Timer < uiDiff && Icebolt_Count < 5) + if (Icebolt_Timer < diff && Icebolt_Count < 5) { if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) DoCast(target,SPELL_ICEBOLT); ++Icebolt_Count; Icebolt_Timer = 4000; - }else Icebolt_Timer -= uiDiff; + }else Icebolt_Timer -= diff; if (Icebolt_Count == 5 && !landoff) { - if (FrostBreath_Timer < uiDiff) + if (FrostBreath_Timer < diff) { DoScriptText(EMOTE_BREATH, m_creature); - DoCast(m_creature->getVictim(),SPELL_FROST_BREATH); + //DoCast(m_creature->getVictim(),SPELL_FROST_BREATH); land_Timer = 2000; landoff = true; FrostBreath_Timer = 6000; - }else FrostBreath_Timer -= uiDiff; + }else FrostBreath_Timer -= diff; } if (landoff) { - if (land_Timer < uiDiff) + if (land_Timer < diff) { phase = 1; m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LAND); @@ -171,19 +150,16 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI m_creature->GetMotionMaster()->Clear(false); m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); Fly_Timer = 67000; - }else land_Timer -= uiDiff; + }else land_Timer -= diff; } } - if ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() <= 10) + if (Berserk_Timer < diff) { - if (Beserk_Timer < uiDiff) - { - DoScriptText(EMOTE_ENRAGE, m_creature); - DoCast(m_creature,SPELL_BESERK); - Beserk_Timer = 300000; - }else Beserk_Timer -= uiDiff; - } + DoScriptText(EMOTE_ENRAGE, m_creature); + DoCast(m_creature,SPELL_BERSERK); + Berserk_Timer = 300000; + }else Berserk_Timer -= diff; if (phase!=2) DoMeleeAttackIfReady(); @@ -197,9 +173,9 @@ CreatureAI* GetAI_boss_sapphiron(Creature* pCreature) void AddSC_boss_sapphiron() { - Script* NewScript; - NewScript = new Script; - NewScript->Name = "boss_sapphiron"; - NewScript->GetAI = &GetAI_boss_sapphiron; - NewScript->RegisterSelf(); + Script *newscript; + newscript = new Script; + newscript->Name = "boss_sapphiron"; + newscript->GetAI = &GetAI_boss_sapphiron; + newscript->RegisterSelf(); } diff --git a/scripts/northrend/naxxramas/boss_thaddius.cpp b/scripts/northrend/naxxramas/boss_thaddius.cpp index fd8b55834..a507ebb64 100644 --- a/scripts/northrend/naxxramas/boss_thaddius.cpp +++ b/scripts/northrend/naxxramas/boss_thaddius.cpp @@ -22,53 +22,49 @@ SDCategory: Naxxramas EndScriptData */ #include "precompiled.h" -#include "naxxramas.h" -enum -{ - // Stalagg - SAY_STAL_AGGRO = -1533023, - SAY_STAL_SLAY = -1533024, - SAY_STAL_DEATH = -1533025, +//Stalagg +#define SAY_STAL_AGGRO -1533023 +#define SAY_STAL_SLAY -1533024 +#define SAY_STAL_DEATH -1533025 - SPELL_POWERSURGE = 28134, +#define SPELL_POWERSURGE 28134 - //Feugen - SAY_FEUG_AGGRO = -1533026, - SAY_FEUG_SLAY = -1533027, - SAY_FEUG_DEATH = -1533028, +//Feugen +#define SAY_FEUG_AGGRO -1533026 +#define SAY_FEUG_SLAY -1533027 +#define SAY_FEUG_DEATH -1533028 - SPELL_MANABURN = 28135, +#define SPELL_MANABURN 28135 - //both - SPELL_WARSTOMP = 28125, +//both +#define SPELL_WARSTOMP 28125 - //Thaddus - SAY_GREET = -1533029, - SAY_AGGRO1 = -1533030, - SAY_AGGRO2 = -1533031, - SAY_AGGRO3 = -1533032, - SAY_SLAY = -1533033, - SAY_ELECT = -1533034, - SAY_DEATH = -1533035, - SAY_SCREAM1 = -1533036, - SAY_SCREAM2 = -1533037, - SAY_SCREAM3 = -1533038, - SAY_SCREAM4 = -1533039, +//Thaddus +#define SAY_GREET -1533029 +#define SAY_AGGRO1 -1533030 +#define SAY_AGGRO2 -1533031 +#define SAY_AGGRO3 -1533032 +#define SAY_SLAY -1533033 +#define SAY_ELECT -1533034 +#define SAY_DEATH -1533035 +#define SAY_SCREAM1 -1533036 +#define SAY_SCREAM2 -1533037 +#define SAY_SCREAM3 -1533038 +#define SAY_SCREAM4 -1533039 - SPELL_BALL_LIGHTNING = 28299, +#define SPELL_BALL_LIGHTNING 28299 - SPELL_CHARGE_POSITIVE_DMGBUFF = 29659, - SPELL_CHARGE_POSITIVE_NEARDMG = 28059, +#define SPELL_CHARGE_POSITIVE_DMGBUFF 29659 +#define SPELL_CHARGE_POSITIVE_NEARDMG 28059 - SPELL_CHARGE_NEGATIVE_DMGBUFF = 29660, - SPELL_CHARGE_NEGATIVE_NEARDMG = 28084, +#define SPELL_CHARGE_NEGATIVE_DMGBUFF 29660 +#define SPELL_CHARGE_NEGATIVE_NEARDMG 28084 - SPELL_CHAIN_LIGHTNING = 28167, - H_SPELL_CHAIN_LIGHTNING = 54531, +#define SPELL_CHAIN_LIGHTNING 28167 +#define H_SPELL_CHAIN_LIGHTNING 54531 - SPELL_BESERK = 26662, +#define SPELL_BESERK 26662 - //generic - C_TESLA_COIL = 16218 //the coils (emotes "Tesla Coil overloads!") -}; +//generic +#define C_TESLA_COIL 16218 //the coils (emotes "Tesla Coil overloads!") diff --git a/scripts/northrend/naxxramas/instance_naxxramas.cpp b/scripts/northrend/naxxramas/instance_naxxramas.cpp index 97cce7a14..316c23c2c 100644 --- a/scripts/northrend/naxxramas/instance_naxxramas.cpp +++ b/scripts/northrend/naxxramas/instance_naxxramas.cpp @@ -14,504 +14,324 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* ScriptData -SDName: Instance_Naxxramas -SD%Complete: 90% -SDComment: -SDCategory: Naxxramas -EndScriptData */ +/* Originally based on BroodWyrm scripts. Modified by danbst. Rewrited by Lutik.*/ #include "precompiled.h" #include "naxxramas.h" + struct MANGOS_DLL_DECL instance_naxxramas : public ScriptedInstance { - instance_naxxramas(Map* pMap) : ScriptedInstance(pMap) {Initialize();} - - std::string strInstData; - uint32 m_auiEncounter[MAX_ENCOUNTER]; - - uint64 m_uiAracEyeRampGUID; - uint64 m_uiPlagEyeRampGUID; - uint64 m_uiMiliEyeRampGUID; - uint64 m_uiConsEyeRampGUID; - - uint64 m_uiAracPortalGUID; - uint64 m_uiPlagPortalGUID; - uint64 m_uiMiliPortalGUID; - uint64 m_uiConsPortalGUID; - - uint64 m_uiAnubRekhanGUID; - uint64 m_uiFaerlinanGUID; + instance_naxxramas(Map *Map) : ScriptedInstance(Map) + { + Heroic = Map->IsHeroic(); + Initialize(); + }; - uint64 m_uiZeliekGUID; - uint64 m_uiThaneGUID; - uint64 m_uiBlaumeuxGUID; - uint64 m_uiRivendareGUID; + std::string str_data; - uint64 m_uiThaddiusGUID; - uint64 m_uiStalaggGUID; - uint64 m_uiFeugenGUID; + uint32 mEncounter[ENCOUNTERS]; + uint32 mHorsemen[4]; - uint64 m_uiPathExitDoorGUID; - uint64 m_uiGlutExitDoorGUID; - uint64 m_uiThadDoorGUID; + bool Heroic; + //Bosses and other NPC's + uint64 mFaerlinaGUID; + //Doors and other GO's + uint64 mAnubRoomDoorGUID; + uint64 mNothEnterDoorGUID; + uint64 mNothExitDoorGUID; + uint64 mGothikEnterDoorGUID; + uint64 mGothikCombatDoorGUID; + uint64 mGothikExitDoorGUID; + uint64 mGluthDoorGUID; + uint64 mHorsemenDoorGUID; - uint64 m_uiAnubDoorGUID; - uint64 m_uiAnubGateGUID; - uint64 m_uiFaerDoorGUID; - uint64 m_uiFaerWebGUID; - uint64 m_uiMaexOuterGUID; - uint64 m_uiMaexInnerGUID; + uint64 mHorsemenChestGUID; - uint64 m_uiGothCombatGateGUID; - uint64 m_uiGothikEntryDoorGUID; - uint64 m_uiGothikExitDoorGUID; - uint64 m_uiHorsemenDoorGUID; - uint64 m_uiHorsemenChestGUID; - uint64 m_uiNothEntryDoorGUID; - uint64 m_uiNothExitDoorGUID; - uint64 m_uiHeigEntryDoorGUID; - uint64 m_uiHeigExitDoorGUID; - uint64 m_uiLoathebDoorGUID; + void OpenDoor(uint64 guid) + { + if(!guid) return; + GameObject* pGo = instance->GetGameObject(guid); + if(pGo) pGo->SetGoState(GO_STATE_ACTIVE); + } - uint64 m_uiKelthuzadDoorGUID; + void CloseDoor(uint64 guid) + { + if(!guid) return; + GameObject* pGo = instance->GetGameObject(guid); + if(pGo) pGo->SetGoState(GO_STATE_READY); + } + + void CheckHorsemen() + { + if(mHorsemen[0]==DONE && mHorsemen[1]==DONE && mHorsemen[2]==DONE && mHorsemen[3]==DONE) + SetData(TYPE_FOURHORSEMEN, DONE); + if(mHorsemen[0]==NOT_STARTED && mHorsemen[1]==NOT_STARTED && mHorsemen[2]==NOT_STARTED && mHorsemen[3]==NOT_STARTED) + SetData(TYPE_FOURHORSEMEN, NOT_STARTED); + } void Initialize() { - memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - - m_uiAracEyeRampGUID = 0; - m_uiPlagEyeRampGUID = 0; - m_uiMiliEyeRampGUID = 0; - m_uiConsEyeRampGUID = 0; - - m_uiAracPortalGUID = 0; - m_uiPlagPortalGUID = 0; - m_uiMiliPortalGUID = 0; - m_uiConsPortalGUID = 0; - - m_uiAnubRekhanGUID = 0; - m_uiFaerlinanGUID = 0; - - m_uiZeliekGUID = 0; - m_uiThaneGUID = 0; - m_uiBlaumeuxGUID = 0; - m_uiRivendareGUID = 0; - - m_uiThaddiusGUID = 0; - m_uiStalaggGUID = 0; - m_uiFeugenGUID = 0; - - m_uiPathExitDoorGUID = 0; - m_uiGlutExitDoorGUID = 0; - m_uiThadDoorGUID = 0; - - m_uiAnubDoorGUID = 0; - m_uiAnubGateGUID = 0; - m_uiFaerDoorGUID = 0; - m_uiFaerWebGUID = 0; - m_uiMaexOuterGUID = 0; - m_uiMaexInnerGUID = 0; - - m_uiGothCombatGateGUID = 0; - m_uiGothikEntryDoorGUID = 0; - m_uiGothikExitDoorGUID = 0; - m_uiHorsemenDoorGUID = 0; - m_uiHorsemenChestGUID = 0; - - m_uiNothEntryDoorGUID = 0; - m_uiNothExitDoorGUID = 0; - m_uiHeigEntryDoorGUID = 0; - m_uiHeigExitDoorGUID = 0; - m_uiLoathebDoorGUID = 0; - - m_uiKelthuzadDoorGUID = 0; + //Bosses and other NPC's + mFaerlinaGUID = 0; + //Doors and other GO's + uint64 mAnubRoomDoorGUID = 0; + mNothEnterDoorGUID = 0; + mNothExitDoorGUID = 0; + mGothikEnterDoorGUID = 0; + mGothikCombatDoorGUID = 0; + mGothikExitDoorGUID = 0; + mGluthDoorGUID = 0; + mHorsemenChestGUID = 0; + mHorsemenDoorGUID = 0; + + for(uint8 i = 0; i < ENCOUNTERS; i++) + mEncounter[i] = NOT_STARTED; + + for(uint8 i = 0; i < 4; i++) + mHorsemen[i] = NOT_STARTED; } - void OnCreatureCreate(Creature* pCreature) + void OnCreatureCreate(Creature *pCreature, uint32 entry) { - switch(pCreature->GetEntry()) + switch(entry) { - case NPC_ANUB_REKHAN: m_uiAnubRekhanGUID = pCreature->GetGUID(); break; - case NPC_FAERLINA: m_uiFaerlinanGUID = pCreature->GetGUID(); break; - case NPC_THADDIUS: m_uiThaddiusGUID = pCreature->GetGUID(); break; - case NPC_STALAGG: m_uiStalaggGUID = pCreature->GetGUID(); break; - case NPC_FEUGEN: m_uiFeugenGUID = pCreature->GetGUID(); break; - case NPC_ZELIEK: m_uiZeliekGUID = pCreature->GetGUID(); break; - case NPC_THANE: m_uiThaneGUID = pCreature->GetGUID(); break; - case NPC_BLAUMEUX: m_uiBlaumeuxGUID = pCreature->GetGUID(); break; - case NPC_RIVENDARE: m_uiRivendareGUID = pCreature->GetGUID(); break; + //Spider Quarter + case 15953: mFaerlinaGUID = pCreature->GetGUID(); + //Military Quarter + //Plague Quarter + //Construct Quarter + //Frostwyrm Lair } } - void OnObjectCreate(GameObject* pGo) + void OnObjectCreate(GameObject *pGo) { switch(pGo->GetEntry()) { - case GO_ARAC_ANUB_DOOR: - m_uiAnubDoorGUID = pGo->GetGUID(); - break; - case GO_ARAC_ANUB_GATE: - m_uiAnubGateGUID = pGo->GetGUID(); - if (m_auiEncounter[0] == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); - break; - case GO_ARAC_FAER_WEB: - m_uiFaerWebGUID = pGo->GetGUID(); - break; - case GO_ARAC_FAER_DOOR: - m_uiFaerDoorGUID = pGo->GetGUID(); - if (m_auiEncounter[1] == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); - break; - case GO_ARAC_MAEX_INNER_DOOR: - m_uiMaexInnerGUID = pGo->GetGUID(); - break; - case GO_ARAC_MAEX_OUTER_DOOR: - m_uiMaexOuterGUID = pGo->GetGUID(); - if (m_auiEncounter[2] == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); - break; - - case GO_PLAG_NOTH_ENTRY_DOOR: - m_uiNothEntryDoorGUID = pGo->GetGUID(); - break; - case GO_PLAG_NOTH_EXIT_DOOR: - m_uiNothExitDoorGUID = pGo->GetGUID(); - if (m_auiEncounter[3] == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); - break; - case GO_PLAG_HEIG_ENTRY_DOOR: - m_uiHeigEntryDoorGUID = pGo->GetGUID(); - if (m_auiEncounter[3] == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); - break; - case GO_PLAG_HEIG_EXIT_DOOR: - m_uiHeigExitDoorGUID = pGo->GetGUID(); - if (m_auiEncounter[4] == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); - break; - case GO_PLAG_LOAT_DOOR: - m_uiLoathebDoorGUID = pGo->GetGUID(); - break; - - case GO_MILI_GOTH_ENTRY_GATE: - m_uiGothikEntryDoorGUID = pGo->GetGUID(); - break; - case GO_MILI_GOTH_EXIT_GATE: - m_uiGothikExitDoorGUID = pGo->GetGUID(); - if (m_auiEncounter[7] == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); - break; - case GO_MILI_GOTH_COMBAT_GATE: - m_uiGothCombatGateGUID = pGo->GetGUID(); - break; - case GO_MILI_HORSEMEN_DOOR: - m_uiHorsemenDoorGUID = pGo->GetGUID(); - if (m_auiEncounter[7] == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); - break; - - case GO_CHEST_HORSEMEN_NORM: - m_uiHorsemenChestGUID = pGo->GetGUID(); - break; - - case GO_CONS_PATH_EXIT_DOOR: - m_uiPathExitDoorGUID = pGo->GetGUID(); - if (m_auiEncounter[9] == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); - break; - case GO_CONS_GLUT_EXIT_DOOR: - m_uiGlutExitDoorGUID = pGo->GetGUID(); - if (m_auiEncounter[11] == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); - break; - case GO_CONS_THAD_DOOR: - m_uiThadDoorGUID = pGo->GetGUID(); - if (m_auiEncounter[11] == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); - break; - - case GO_KELTHUZAD_WATERFALL_DOOR: - m_uiKelthuzadDoorGUID = pGo->GetGUID(); - if (m_auiEncounter[13] == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); - break; - - case GO_ARAC_EYE_RAMP: - m_uiAracEyeRampGUID = pGo->GetGUID(); - if (m_auiEncounter[2] == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); - break; - case GO_PLAG_EYE_RAMP: - m_uiPlagEyeRampGUID = pGo->GetGUID(); - if (m_auiEncounter[5] == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); - break; - case GO_MILI_EYE_RAMP: - m_uiMiliEyeRampGUID = pGo->GetGUID(); - if (m_auiEncounter[8] == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); - break; - case GO_CONS_EYE_RAMP: - m_uiConsEyeRampGUID = pGo->GetGUID(); - if (m_auiEncounter[12] == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); - break; + case GO_ARAC_ANUB_DOOR: mAnubRoomDoorGUID = pGo->GetGUID(); break; + case GO_PLAG_NOTH_ENTRY_DOOR: mNothEnterDoorGUID = pGo->GetGUID(); break; + case GO_PLAG_NOTH_EXIT_DOOR: mNothExitDoorGUID = pGo->GetGUID(); break; + case GO_MILI_GOTH_ENTRY_GATE: mGothikEnterDoorGUID = pGo->GetGUID(); break; + case GO_MILI_GOTH_EXIT_GATE: mGothikExitDoorGUID = pGo->GetGUID(); break; + case GO_MILI_GOTH_COMBAT_GATE: mGothikCombatDoorGUID = pGo->GetGUID(); break; + case GO_CONS_GLUT_EXIT_DOOR: mGluthDoorGUID = pGo->GetGUID(); break; + case GO_CHEST_HORSEMEN_NORM: if(!Heroic) mHorsemenChestGUID = pGo->GetGUID(); break; + case GO_CHEST_HORSEMEN_HERO: if(Heroic) mHorsemenChestGUID = pGo->GetGUID(); break; + case GO_MILI_HORSEMEN_DOOR: mHorsemenDoorGUID = pGo->GetGUID(); break; + } + } - case GO_ARAC_PORTAL: - m_uiAracPortalGUID = pGo->GetGUID(); - break; - case GO_PLAG_PORTAL: - m_uiPlagPortalGUID = pGo->GetGUID(); - break; - case GO_MILI_PORTAL: - m_uiMiliPortalGUID = pGo->GetGUID(); - break; - case GO_CONS_PORTAL: - m_uiConsPortalGUID = pGo->GetGUID(); - break; + uint64 GetData64(uint32 type) + { + switch (type) + { + case GUID_FAERLINA: return mFaerlinaGUID; } + return 0; } - void SetData(uint32 uiType, uint32 uiData) + void SetData(uint32 type, uint32 data) { - switch(uiType) + //todo: rewrite door system + switch(type) { - case TYPE_ANUB_REKHAN: - m_auiEncounter[0] = uiData; - DoUseDoorOrButton(m_uiAnubDoorGUID); - if (uiData == DONE) - DoUseDoorOrButton(m_uiAnubGateGUID); + //Spider Quarter + case TYPE_ANUBREKHAN: + mEncounter[0] = data; + if(data == IN_PROGRESS) + CloseDoor(mAnubRoomDoorGUID); + else + OpenDoor(mAnubRoomDoorGUID); break; case TYPE_FAERLINA: - m_auiEncounter[1] = uiData; - DoUseDoorOrButton(m_uiFaerWebGUID); - if (uiData == DONE) - { - DoUseDoorOrButton(m_uiFaerDoorGUID); - DoUseDoorOrButton(m_uiMaexOuterGUID); - } + mEncounter[1] = data; break; case TYPE_MAEXXNA: - m_auiEncounter[2] = uiData; - DoUseDoorOrButton(m_uiMaexInnerGUID, uiData); - if (uiData == DONE) - { - DoUseDoorOrButton(m_uiAracEyeRampGUID); - DoRespawnGameObject(m_uiAracPortalGUID, 30*MINUTE); - } + mEncounter[2] = data; break; - case TYPE_NOTH: - m_auiEncounter[3] = uiData; - DoUseDoorOrButton(m_uiNothEntryDoorGUID); - if (uiData == DONE) - { - DoUseDoorOrButton(m_uiNothExitDoorGUID); - DoUseDoorOrButton(m_uiHeigEntryDoorGUID); - } + //Construct Quarter + case TYPE_PATCHWERK: + mEncounter[3] = data; break; - case TYPE_HEIGAN: - m_auiEncounter[4] = uiData; - DoUseDoorOrButton(m_uiHeigEntryDoorGUID); - if (uiData == DONE) - DoUseDoorOrButton(m_uiHeigExitDoorGUID); + case TYPE_GROBBULUS: + mEncounter[4] = data; break; - case TYPE_LOATHEB: - m_auiEncounter[5] = uiData; - DoUseDoorOrButton(m_uiLoathebDoorGUID); - if (uiData == DONE) - { - DoUseDoorOrButton(m_uiPlagEyeRampGUID); - DoRespawnGameObject(m_uiPlagPortalGUID, 30*MINUTE); - } + case TYPE_GLUTH: + mEncounter[5] = data; + if(data == IN_PROGRESS) + CloseDoor(mGluthDoorGUID); + else + OpenDoor(mGluthDoorGUID); break; + case TYPE_THADDIUS: + mEncounter[6] = data; + break; + //Military Quarter case TYPE_RAZUVIOUS: - m_auiEncounter[6] = uiData; - if (uiData == DONE) - DoUseDoorOrButton(m_uiGothikEntryDoorGUID); + mEncounter[7] = data; break; case TYPE_GOTHIK: - m_auiEncounter[7] = uiData; - DoUseDoorOrButton(m_uiGothikEntryDoorGUID); - if (uiData == DONE) + mEncounter[8] = data; + if(data == IN_PROGRESS) { - DoUseDoorOrButton(m_uiGothikExitDoorGUID); - DoUseDoorOrButton(m_uiHorsemenDoorGUID); + CloseDoor(mGothikEnterDoorGUID); + CloseDoor(mGothikExitDoorGUID); + CloseDoor(mGothikCombatDoorGUID); } - break; - case TYPE_FOUR_HORSEMEN: - m_auiEncounter[8] = uiData; - DoUseDoorOrButton(m_uiHorsemenDoorGUID); - if (uiData == DONE) + else if(data == SPECIAL) { - DoUseDoorOrButton(m_uiMiliEyeRampGUID); - DoRespawnGameObject(m_uiMiliPortalGUID, 30*MINUTE); - DoRespawnGameObject(m_uiHorsemenChestGUID, 30*MINUTE); + OpenDoor(mGothikCombatDoorGUID); } - break; - case TYPE_PATCHWERK: - m_auiEncounter[9] = uiData; - if (uiData == DONE) - DoUseDoorOrButton(m_uiPathExitDoorGUID); - break; - case TYPE_GROBBULUS: - m_auiEncounter[10] = uiData; - break; - case TYPE_GLUTH: - m_auiEncounter[11] = uiData; - if (uiData == DONE) + else //DONE, NOT_STARTED { - DoUseDoorOrButton(m_uiGlutExitDoorGUID); - DoUseDoorOrButton(m_uiThadDoorGUID); + OpenDoor(mGothikEnterDoorGUID); + OpenDoor(mGothikExitDoorGUID); + OpenDoor(mGothikCombatDoorGUID); + }; + break; + case TYPE_FOURHORSEMEN: + mEncounter[9] = data; + if(data == DONE) + { + DoRespawnGameObject(mHorsemenChestGUID, DAY); + }; + if(data == IN_PROGRESS) + CloseDoor(mHorsemenDoorGUID); + else + OpenDoor(mHorsemenDoorGUID); + break; + //Plague Quarter + case TYPE_NOTH: + mEncounter[10] = data; + if(data == IN_PROGRESS) + { + CloseDoor(mNothEnterDoorGUID); + CloseDoor(mNothExitDoorGUID); } - break; - case TYPE_THADDIUS: - m_auiEncounter[12] = uiData; - DoUseDoorOrButton(m_uiThadDoorGUID, uiData); - if (uiData == DONE) + else { - DoUseDoorOrButton(m_uiConsEyeRampGUID); - DoRespawnGameObject(m_uiConsPortalGUID, 30*MINUTE); + OpenDoor(mNothEnterDoorGUID); + OpenDoor(mNothExitDoorGUID); } break; + case TYPE_HEIGAN: + mEncounter[11] = data; + break; + case TYPE_LOATHEB: + mEncounter[12] = data; + break; + //Frostwyrm Lair case TYPE_SAPPHIRON: - m_auiEncounter[13] = uiData; - if (uiData == DONE) - DoUseDoorOrButton(m_uiKelthuzadDoorGUID); + mEncounter[13] = data; break; case TYPE_KELTHUZAD: - m_auiEncounter[14] = uiData; - break; + mEncounter[14] = data; + break; + + //Four Horsemen Chest + case TYPE_BLAUMEAUX: + mHorsemen[0] = data; CheckHorsemen(); break; + case TYPE_RIVENDARE: + mHorsemen[1] = data; CheckHorsemen(); break; + case TYPE_KORTHAZZ: + mHorsemen[2] = data; CheckHorsemen(); break; + case TYPE_ZELIEK: + mHorsemen[3] = data; CheckHorsemen(); break; + + + + } - if (uiData == DONE) + if (data == DONE) { OUT_SAVE_INST_DATA; std::ostringstream saveStream; - saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " - << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " - << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8] << " " - << m_auiEncounter[9] << " " << m_auiEncounter[10] << " " << m_auiEncounter[11] << " " - << m_auiEncounter[12] << " " << m_auiEncounter[13] << " " << m_auiEncounter[14]; + saveStream << mEncounter[0] << " " << mEncounter[1] << " " << mEncounter[2] << " " + << mEncounter[3] << " " << mEncounter[4] << " " << mEncounter[5] << " " + << mEncounter[6] << " " << mEncounter[7] << " " << mEncounter[8] << " " + << mEncounter[9] << " " << mEncounter[10] << " " << mEncounter[11] << " " + << mEncounter[12] << " " << mEncounter[13] << " " << mEncounter[14]; - strInstData = saveStream.str(); + str_data = saveStream.str(); SaveToDB(); OUT_SAVE_INST_DATA_COMPLETE; } } + uint32 GetData(uint32 type) + { + switch (type) + { + //Arachnid Quarter + case TYPE_ANUBREKHAN: return mEncounter[0]; + case TYPE_FAERLINA: return mEncounter[1]; + case TYPE_MAEXXNA: return mEncounter[2]; + //Construct Quarter + case TYPE_PATCHWERK: return mEncounter[3]; + case TYPE_GROBBULUS: return mEncounter[4]; + case TYPE_GLUTH: return mEncounter[5]; + case TYPE_THADDIUS: return mEncounter[6]; + //Military Quarter + case TYPE_RAZUVIOUS: return mEncounter[7]; + case TYPE_GOTHIK: return mEncounter[8]; + case TYPE_FOURHORSEMEN: return mEncounter[9]; + //Plague Quarter + case TYPE_NOTH: return mEncounter[10]; + case TYPE_HEIGAN: return mEncounter[11]; + case TYPE_LOATHEB: return mEncounter[12]; + //Frostwyrm Lair + case TYPE_SAPPHIRON: return mEncounter[13]; + case TYPE_KELTHUZAD: return mEncounter[14]; + } + return 0; + } + const char* Save() { - return strInstData.c_str(); + return str_data.c_str(); } - void Load(const char* chrIn) + void Load(const char* in) { - if (!chrIn) + if (!in) { OUT_LOAD_INST_DATA_FAIL; return; } - OUT_LOAD_INST_DATA(chrIn); + OUT_LOAD_INST_DATA(in); - std::istringstream loadStream(chrIn); - loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] - >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] - >> m_auiEncounter[8] >> m_auiEncounter[9] >> m_auiEncounter[10] >> m_auiEncounter[11] - >> m_auiEncounter[12] >> m_auiEncounter[13] >> m_auiEncounter[14]; - - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + std::istringstream loadStream(in); + loadStream >> mEncounter[0] >> mEncounter[1] >> mEncounter[2] + >> mEncounter[3] >> mEncounter[4] >> mEncounter[5] + >> mEncounter[6] >> mEncounter[7] >> mEncounter[8] + >> mEncounter[9] >> mEncounter[10] >> mEncounter[11] + >> mEncounter[12] >> mEncounter[13] >> mEncounter[14]; + for(uint32 i = 0; i < ENCOUNTERS; i++) { - if (m_auiEncounter[i] == IN_PROGRESS) - m_auiEncounter[i] = NOT_STARTED; + if (mEncounter[i] == IN_PROGRESS) // Do not load an encounter as "In Progress" - reset it instead. + mEncounter[i] = NOT_STARTED; + SetData(i,mEncounter[i]); } - OUT_LOAD_INST_DATA_COMPLETE; } - - uint32 GetData(uint32 uiType) - { - switch(uiType) - { - case TYPE_ANUB_REKHAN: - return m_auiEncounter[0]; - case TYPE_FAERLINA: - return m_auiEncounter[1]; - case TYPE_MAEXXNA: - return m_auiEncounter[2]; - case TYPE_NOTH: - return m_auiEncounter[3]; - case TYPE_HEIGAN: - return m_auiEncounter[4]; - case TYPE_LOATHEB: - return m_auiEncounter[5]; - case TYPE_RAZUVIOUS: - return m_auiEncounter[6]; - case TYPE_GOTHIK: - return m_auiEncounter[7]; - case TYPE_FOUR_HORSEMEN: - return m_auiEncounter[8]; - case TYPE_PATCHWERK: - return m_auiEncounter[9]; - case TYPE_GROBBULUS: - return m_auiEncounter[10]; - case TYPE_GLUTH: - return m_auiEncounter[11]; - case TYPE_THADDIUS: - return m_auiEncounter[12]; - case TYPE_SAPPHIRON: - return m_auiEncounter[13]; - case TYPE_KELTHUZAD: - return m_auiEncounter[14]; - } - return 0; - } - - uint64 GetData64(uint32 uiData) - { - switch(uiData) - { - case NPC_ANUB_REKHAN: - return m_uiAnubRekhanGUID; - case NPC_FAERLINA: - return m_uiFaerlinanGUID; - case GO_MILI_GOTH_COMBAT_GATE: - return m_uiGothCombatGateGUID; - case NPC_ZELIEK: - return m_uiZeliekGUID; - case NPC_THANE: - return m_uiThaneGUID; - case NPC_BLAUMEUX: - return m_uiBlaumeuxGUID; - case NPC_RIVENDARE: - return m_uiRivendareGUID; - case NPC_THADDIUS: - return m_uiThaddiusGUID; - case NPC_STALAGG: - return m_uiStalaggGUID; - case NPC_FEUGEN: - return m_uiFeugenGUID; - } - return 0; - } }; -InstanceData* GetInstanceData_instance_naxxramas(Map* pMap) +InstanceData* GetInstanceData_naxxramas(Map* map) { - return new instance_naxxramas(pMap); + return new instance_naxxramas(map); } void AddSC_instance_naxxramas() { - Script* pNewScript; - pNewScript = new Script; - pNewScript->Name = "instance_naxxramas"; - pNewScript->GetInstanceData = &GetInstanceData_instance_naxxramas; - pNewScript->RegisterSelf(); + Script *newscript; + newscript = new Script; + newscript->Name = "instance_naxxramas"; + newscript->GetInstanceData = &GetInstanceData_naxxramas; + newscript->RegisterSelf(); } diff --git a/scripts/northrend/naxxramas/naxxramas.h b/scripts/northrend/naxxramas/naxxramas.h index fc148de98..a4f9b8c21 100644 --- a/scripts/northrend/naxxramas/naxxramas.h +++ b/scripts/northrend/naxxramas/naxxramas.h @@ -2,48 +2,54 @@ * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ +/* Originally based on BroodWyrm scripts. Modified by danbst. Modified by Lutik.*/ + #ifndef DEF_NAXXRAMAS_H #define DEF_NAXXRAMAS_H enum { - MAX_ENCOUNTER = 15, - - TYPE_ANUB_REKHAN = 1, - TYPE_FAERLINA = 2, - TYPE_MAEXXNA = 3, - - TYPE_NOTH = 4, - TYPE_HEIGAN = 5, - TYPE_LOATHEB = 6, - - TYPE_RAZUVIOUS = 7, - TYPE_GOTHIK = 8, - TYPE_FOUR_HORSEMEN = 9, - - TYPE_PATCHWERK = 10, - TYPE_GROBBULUS = 11, - TYPE_GLUTH = 12, - TYPE_THADDIUS = 13, - TYPE_STALAGG = 14, - TYPE_FEUGEN = 15, - - TYPE_SAPPHIRON = 16, - TYPE_KELTHUZAD = 17, - - NPC_ANUB_REKHAN = 15956, - NPC_FAERLINA = 15953, - - NPC_THADDIUS = 15928, - NPC_STALAGG = 15929, - NPC_FEUGEN = 15930, + //Spider Quarter + TYPE_ANUBREKHAN = 0, + TYPE_FAERLINA = 1, + TYPE_MAEXXNA = 2, + + //Construct Quarter + TYPE_PATCHWERK = 3, + TYPE_GROBBULUS = 4, + TYPE_GLUTH = 5, + TYPE_THADDIUS = 6, + + //Military Quarter + TYPE_RAZUVIOUS = 7, + TYPE_GOTHIK = 8, + TYPE_FOURHORSEMEN = 9, + + //Plague Quarter + TYPE_NOTH = 10, + TYPE_HEIGAN = 11, + TYPE_LOATHEB = 12, + + //Frostwyrm Lair + TYPE_SAPPHIRON = 13, + TYPE_KELTHUZAD = 14, + + //Misc + TYPE_KORTHAZZ, + TYPE_BLAUMEAUX, + TYPE_ZELIEK, + TYPE_RIVENDARE, + + ENCOUNTERS = 15 +}; - NPC_ZELIEK = 16063, - NPC_THANE = 16064, - NPC_BLAUMEUX = 16065, - NPC_RIVENDARE = 30549, +enum +{ + GUID_FAERLINA +}; - // Arachnid Quarter +enum +{ GO_ARAC_ANUB_DOOR = 181126, //encounter door GO_ARAC_ANUB_GATE = 181195, //open after boss is dead GO_ARAC_FAER_WEB = 181235, //encounter door @@ -87,9 +93,7 @@ enum GO_ARAC_PORTAL = 181575, GO_PLAG_PORTAL = 181577, GO_MILI_PORTAL = 181578, - GO_CONS_PORTAL = 181576, - - AREATRIGGER_FROSTWYRM = 4120 //not needed here, but AT to be scripted + GO_CONS_PORTAL = 181576 }; #endif diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index eb52a495d..8be3fe7ee 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -266,7 +266,7 @@ extern void AddSC_boss_anubrekhan(); //naxxramas extern void AddSC_boss_four_horsemen(); extern void AddSC_boss_faerlina(); extern void AddSC_boss_gluth(); -extern void AddSC_howling_fjord(); +extern void AddSC_boss_gothik(); extern void AddSC_boss_kelthuzad(); extern void AddSC_boss_loatheb(); extern void AddSC_boss_maexxna(); @@ -306,6 +306,7 @@ extern void AddSC_borean_tundra(); extern void AddSC_dalaran(); extern void AddSC_dragonblight(); extern void AddSC_grizzly_hills(); +extern void AddSC_howling_fjord(); extern void AddSC_icecrown(); extern void AddSC_sholazar_basin(); extern void AddSC_storm_peaks(); @@ -652,7 +653,7 @@ void AddScripts() AddSC_boss_four_horsemen(); AddSC_boss_faerlina(); AddSC_boss_gluth(); - AddSC_howling_fjord(); + AddSC_boss_gothik(); AddSC_boss_kelthuzad(); AddSC_boss_loatheb(); AddSC_boss_maexxna(); @@ -692,6 +693,7 @@ void AddScripts() AddSC_dalaran(); AddSC_dragonblight(); AddSC_grizzly_hills(); + AddSC_howling_fjord(); AddSC_icecrown(); AddSC_sholazar_basin(); AddSC_storm_peaks(); From f04c57b7478120a43473aeba7229d7092c39a613 Mon Sep 17 00:00:00 2001 From: Insider Date: Sat, 17 Oct 2009 20:08:18 +0800 Subject: [PATCH 004/405] [patch 2] Added scripts for raid instance Vault of Archavon --- Makefile.am | 5 + VC80/80ScriptDev2.vcproj | 20 + VC90/90ScriptDev2.vcproj | 20 + addition/2_vault_of_archavon.sql | 6 + .../vault_of_archavon/boss_archavon.cpp | 274 +++++++++++ .../vault_of_archavon/boss_emalon.cpp | 447 ++++++++++++++++++ .../vault_of_archavon/boss_koralon.cpp | 125 +++++ .../instance_vault_of_archavon.cpp | 204 ++++++++ .../vault_of_archavon/vault_of_archavon.h | 30 ++ system/ScriptLoader.cpp | 8 + 10 files changed, 1139 insertions(+) create mode 100644 addition/2_vault_of_archavon.sql create mode 100644 scripts/northrend/vault_of_archavon/boss_archavon.cpp create mode 100644 scripts/northrend/vault_of_archavon/boss_emalon.cpp create mode 100644 scripts/northrend/vault_of_archavon/boss_koralon.cpp create mode 100644 scripts/northrend/vault_of_archavon/instance_vault_of_archavon.cpp create mode 100644 scripts/northrend/vault_of_archavon/vault_of_archavon.h diff --git a/Makefile.am b/Makefile.am index ef2f6b580..e4f0e8721 100644 --- a/Makefile.am +++ b/Makefile.am @@ -367,6 +367,11 @@ scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp \ scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp \ scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp \ scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h \ +scripts/northrend/vault_of_archavon/boss_emalon.cpp \ +scripts/northrend/vault_of_archavon/boss_koralon.cpp \ +scripts/northrend/vault_of_archavon/boss_archavon.cpp \ +scripts/northrend/vault_of_archavon/instance_vault_of_archavon.cpp \ +scripts/northrend/vault_of_archavon/vault_of_archavon.h \ scripts/outland/blades_edge_mountains.cpp \ scripts/outland/boss_doomlord_kazzak.cpp \ scripts/outland/boss_doomwalker.cpp \ diff --git a/VC80/80ScriptDev2.vcproj b/VC80/80ScriptDev2.vcproj index 1290a35b0..d589b0cb4 100644 --- a/VC80/80ScriptDev2.vcproj +++ b/VC80/80ScriptDev2.vcproj @@ -1923,6 +1923,26 @@ + + + + + + + + + + + + + + + + + + + + + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Archavon_The_Stone_Watcher +SD%Complete: 0% +SDComment: +SDCategory: Vault of Archavon +EndScriptData */ + +#include "precompiled.h" +#include "vault_of_archavon.h" + +enum +{ + SPELL_ROCK_SHARDS_LEFT_N = 58695, + SPELL_ROCK_SHARDS_LEFT_H = 60883, + SPELL_ROCK_SHARDS_RIGHT_N = 58696, + SPELL_ROCK_SHARDS_RIGHT_H = 60884, + SPELL_CRUSHING_LEAP_N = 58963, + SPELL_CRUSHING_LEAP_H = 60895, + SPELL_STOMP_N = 58663, + SPELL_STOMP_H = 60880, + SPELL_IMPALE_DMG_N = 58666, + SPELL_IMPALE_DMG_H = 60882, + SPELL_IMPALE_STUN = 50839, + SPELL_BERSERK = 47008 +}; + +struct MANGOS_DLL_DECL boss_archavonAI : public ScriptedAI +{ + boss_archavonAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_fDefaultMoveSpeed = m_creature->GetSpeedRate(MOVE_RUN); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + float m_fDefaultMoveSpeed; + uint32 m_uiEvadeCheckCooldown; + + uint32 m_uiBerserkTimer; + uint32 m_uiRockShardsTimer; + bool m_bRockShardsInProgress; + uint32 m_uiRockShardsProgressTimer; + uint32 m_uiRockShardTimer; + bool m_bRLRockShard; + Unit* m_pRockShardsTarget; + uint32 m_uiCrushingLeapTimer; + Unit* m_pCrushingLeapTarget; + bool m_bCrushingLeapInProgress; + uint32 m_uiCrushingLeapSecureTimer; + uint32 m_uiStompTimer; + uint32 m_uiImpaleAfterStompTimer; + bool m_bImpaleInProgress; + + void Reset() + { + m_uiEvadeCheckCooldown = 2000; + m_creature->SetSpeed(MOVE_RUN, m_fDefaultMoveSpeed); + m_uiBerserkTimer = 300000; + m_uiRockShardsTimer = 15000; + m_bRockShardsInProgress = false; + m_uiRockShardsProgressTimer = 3000; + m_uiRockShardTimer = 0; + m_bRLRockShard = true; + m_pRockShardsTarget = NULL; + m_uiCrushingLeapTimer = 30000; + m_pCrushingLeapTarget = NULL; + m_bCrushingLeapInProgress = false; + m_uiCrushingLeapSecureTimer = 2000; + m_uiStompTimer = 45000; + m_uiImpaleAfterStompTimer = 1000; + m_bImpaleInProgress = false; + + if(m_pInstance) + m_pInstance->SetData(TYPE_ARCHAVON, NOT_STARTED); + } + + void Aggro(Unit *pWho) + { + if(m_pInstance) + m_pInstance->SetData(TYPE_ARCHAVON, IN_PROGRESS); + } + + void JustDied(Unit* pKiller) + { + if(m_pInstance) + m_pInstance->SetData(TYPE_ARCHAVON, DONE); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiEvadeCheckCooldown < uiDiff) + { + if (m_creature->GetDistance2d(-36.287f, -101.09f) > 80.0f) + EnterEvadeMode(); + m_uiEvadeCheckCooldown = 2000; + } + else + m_uiEvadeCheckCooldown -= uiDiff; + + if (m_bImpaleInProgress) + { + if (m_uiImpaleAfterStompTimer < uiDiff) + { + if (Unit* pTarget = m_creature->getVictim()) + { + DoCast(pTarget, m_bIsHeroicMode ? SPELL_IMPALE_DMG_H : SPELL_IMPALE_DMG_N); + pTarget->CastSpell(pTarget, SPELL_IMPALE_STUN, true); + } + m_bImpaleInProgress = false; + } + else + { + m_uiImpaleAfterStompTimer -= uiDiff; + return; + } + } + + if (m_bCrushingLeapInProgress) + { + if (m_pCrushingLeapTarget) + { + if (m_pCrushingLeapTarget->isDead() || !m_pCrushingLeapTarget->IsInWorld() && !m_pCrushingLeapTarget->IsInMap(m_creature)) + { + m_bCrushingLeapInProgress = false; + return; + } + } + else + { + m_bCrushingLeapInProgress = false; + return; + } + if ((m_uiCrushingLeapSecureTimer < uiDiff) || (m_pCrushingLeapTarget && m_creature->IsWithinDist(m_pCrushingLeapTarget, 5.0f))) + { + m_creature->getThreatManager().addThreat(m_pCrushingLeapTarget, -100000000.0f); + m_creature->SetSpeed(MOVE_RUN, m_fDefaultMoveSpeed); + DoCast(m_pCrushingLeapTarget, m_bIsHeroicMode ? SPELL_CRUSHING_LEAP_H : SPELL_CRUSHING_LEAP_N, true); + m_bCrushingLeapInProgress = false; + } + else + m_uiCrushingLeapSecureTimer -= uiDiff; + + return; + } + + if (m_bRockShardsInProgress) + { + if (m_uiRockShardsProgressTimer < uiDiff) + { + m_bRockShardsInProgress = false; + if (m_pRockShardsTarget) + m_creature->getThreatManager().addThreat(m_pRockShardsTarget, -100000000.0f); + return; + } + else + m_uiRockShardsProgressTimer -= uiDiff; + + if (m_uiRockShardTimer < uiDiff) + { + if (m_pRockShardsTarget) + { + DoCast(m_pRockShardsTarget, m_bIsHeroicMode ? (m_bRLRockShard ? SPELL_ROCK_SHARDS_LEFT_H : SPELL_ROCK_SHARDS_RIGHT_H) : (m_bRLRockShard ? SPELL_ROCK_SHARDS_LEFT_N : SPELL_ROCK_SHARDS_RIGHT_N)); + m_bRLRockShard = !m_bRLRockShard; + } + m_uiRockShardTimer = 100; + } + else + m_uiRockShardsTimer -= uiDiff; + + return; + } + + if (m_uiRockShardsTimer < uiDiff) + { + m_bRockShardsInProgress = true; + m_uiRockShardsProgressTimer = 3000; + m_bRLRockShard = true; + m_pRockShardsTarget = NULL; + if (m_pRockShardsTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + m_creature->getThreatManager().addThreat(m_pRockShardsTarget, 100000000.0f); + m_uiRockShardsTimer = 15000+rand()%15000; + return; + } + else + m_uiRockShardsTimer -= uiDiff; + + if (m_uiCrushingLeapTimer < uiDiff) + { + std::list::iterator i = m_creature->getThreatManager().getThreatList().begin(); + std::list lTargets; + for (; i != m_creature->getThreatManager().getThreatList().end(); ++i) + { + Unit* pTemp = Unit::GetUnit((*m_creature),(*i)->getUnitGuid()); + if (pTemp && pTemp->GetTypeId() == TYPEID_PLAYER && !m_creature->IsWithinDist(pTemp, 10.0f) && m_creature->IsWithinDist(pTemp, 80.0f)) + lTargets.push_back(pTemp); + } + m_pCrushingLeapTarget = NULL; + if (!lTargets.empty()) + { + std::list::iterator pTarget = lTargets.begin(); + advance(pTarget, (rand() % lTargets.size())); + m_pCrushingLeapTarget = *pTarget; + if (m_pCrushingLeapTarget) + { + m_creature->MonsterSay(m_pCrushingLeapTarget->GetName(), LANG_UNIVERSAL, NULL); + m_creature->getThreatManager().addThreat(m_pCrushingLeapTarget, 100000000.0f); + m_creature->SetSpeed(MOVE_RUN, m_fDefaultMoveSpeed*10.0f); + m_bCrushingLeapInProgress = true; + m_uiCrushingLeapSecureTimer = 2000; + } + } + m_uiCrushingLeapTimer = 30000+rand()%15000; + return; + } + else + m_uiCrushingLeapTimer -= uiDiff; + + if (m_uiStompTimer < uiDiff) + { + DoCast(m_creature, m_bIsHeroicMode ? SPELL_STOMP_H : SPELL_STOMP_N); + m_uiImpaleAfterStompTimer = 1000; + m_bImpaleInProgress = true; + m_uiStompTimer = 45000+rand()%15000; + } + else + m_uiStompTimer -= uiDiff; + + if (m_uiBerserkTimer < uiDiff) + { + DoCast(m_creature, SPELL_BERSERK); + m_uiBerserkTimer = 60000; + } + else + m_uiBerserkTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_archavon(Creature *pCreature) +{ + return new boss_archavonAI (pCreature); +}; + +void AddSC_boss_archavon() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_archavon"; + newscript->GetAI = &GetAI_boss_archavon; + newscript->RegisterSelf(); +}; diff --git a/scripts/northrend/vault_of_archavon/boss_emalon.cpp b/scripts/northrend/vault_of_archavon/boss_emalon.cpp new file mode 100644 index 000000000..f4bbda560 --- /dev/null +++ b/scripts/northrend/vault_of_archavon/boss_emalon.cpp @@ -0,0 +1,447 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Emalon_The_Storm_Watcher +SD%Complete: 0% +SDComment: +SDCategory: Vault of Archavon +EndScriptData */ + +#include "precompiled.h" +#include "vault_of_archavon.h" + +enum +{ + // Emalon spells + SPELL_CHAIN_LIGHTNING_N = 64213, + SPELL_CHAIN_LIGHTNING_H = 64215, + SPELL_LIGHTNING_NOVA_N = 64216, + SPELL_LIGHTNING_NOVA_H = 65279, + SPELL_OVERCHARGE = 64379, //This spell is used by Time Warder, and temporary by Emalon, because 64218 is bugged + SPELL_BERSERK = 26662, + + // Tempest Minion spells + SPELL_SHOCK = 64363, + SPELL_OVERCHARGED_BLAST = 64219, + SPELL_OVERCHARGED = 64217 +}; + +/*###### +## npc_tempest_minion +######*/ + +struct MANGOS_DLL_DECL npc_tempest_minionAI : public ScriptedAI +{ + npc_tempest_minionAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_fDefaultX = m_creature->GetPositionX(); + m_fDefaultY = m_creature->GetPositionY(); + m_fDefaultZ = m_creature->GetPositionZ(); + m_fDefaultO = m_creature->GetOrientation(); + Reset(); + } + + ScriptedInstance* m_pInstance; + uint32 m_uiEvadeCheckCooldown; + + uint32 m_uiShockTimer; + uint32 m_uiRespawnTimer; + uint32 m_uiOverchargedStacksCheckTimer; + bool m_bDead; + bool m_bTimeToDie; + float m_fDefaultX; + float m_fDefaultY; + float m_fDefaultZ; + float m_fDefaultO; + + void Init() + { + m_uiEvadeCheckCooldown = 2000; + m_uiShockTimer = 8000+rand()%4000; + m_bDead = false; + m_bTimeToDie = false; + m_uiRespawnTimer = 4000; + m_uiOverchargedStacksCheckTimer = 2000; + + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_creature->SetVisibility(VISIBILITY_ON); + } + + void Reset() + { + Init(); + } + + void Aggro(Unit* pWho) + { + m_creature->CallForHelp(80.0f); + } + + void FakeDeath() + { + m_bDead = true; + m_bTimeToDie = false; + m_uiRespawnTimer = 4000; + m_creature->InterruptNonMeleeSpells(false); + m_creature->SetHealth(0); + m_creature->StopMoving(); + m_creature->ClearComboPointHolders(); + m_creature->RemoveAllAurasOnDeath(); + m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, false); + m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->ClearAllReactives(); + m_creature->SetUInt64Value(UNIT_FIELD_TARGET,0); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveIdle(); + m_creature->SetStandState(UNIT_STAND_STATE_DEAD); + m_creature->GetMap()->CreatureRelocation(m_creature, m_fDefaultX, m_fDefaultY, m_fDefaultZ, m_fDefaultO); + } + + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) + { + if (uiDamage < m_creature->GetHealth()) + return; + + if (m_pInstance && (m_pInstance->GetData(TYPE_EMALON) != DONE)) + { + uiDamage = 0; + FakeDeath(); + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiEvadeCheckCooldown < uiDiff) + { + Creature* pEmalon = (Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_EMALON)); + if ((pEmalon && pEmalon->IsInEvadeMode()) || (m_creature->GetDistance2d(-219.119f, -289.037f) > 80.0f)) + { + EnterEvadeMode(); + return; + } + m_uiEvadeCheckCooldown = 2000; + } + else + m_uiEvadeCheckCooldown -= uiDiff; + + if (m_bTimeToDie) + { + FakeDeath(); + return; + } + + if (m_bDead) + { + if (m_uiRespawnTimer < uiDiff) + { + m_creature->SetHealth(m_creature->GetMaxHealth()); + m_creature->SetVisibility(VISIBILITY_OFF); + Init(); + m_creature->MonsterTextEmote("%s appears to defend Emalon!", 0, true); + m_creature->SetInCombatWithZone(); + DoResetThreat(); + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + m_creature->GetMotionMaster()->MoveChase(pTarget); + + } + else + m_uiRespawnTimer -= uiDiff; + + return; + } + + if (m_uiOverchargedStacksCheckTimer < uiDiff) + { + m_uiOverchargedStacksCheckTimer = 2000; + Aura* pAuraOvercharged = m_creature->GetAura(SPELL_OVERCHARGED, 0); + if(pAuraOvercharged && pAuraOvercharged->GetStackAmount() >= 10) + { + DoCast(m_creature, SPELL_OVERCHARGED_BLAST); + m_bTimeToDie = true; + return; + } + } + else + m_uiOverchargedStacksCheckTimer -= uiDiff; + + if (m_uiShockTimer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_SHOCK); + m_uiShockTimer = 8000+rand()%4000; + } + else + m_uiShockTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + + +/*###### +## boss_emalon +######*/ + +struct MANGOS_DLL_DECL boss_emalonAI : public ScriptedAI +{ + boss_emalonAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroicMode; + uint32 m_uiEvadeCheckCooldown; + + uint64 m_auiTempestMinionGUID[4]; + uint32 m_uiChainLightningTimer; + uint32 m_uiChainLightningCount; + uint32 m_uiLightningNovaTimer; + uint32 m_uiOverchargeTimer; + uint32 m_uiEnrageTimer; + + void Reset() + { + m_uiEvadeCheckCooldown = 2000; + memset(&m_auiTempestMinionGUID, 0, sizeof(m_auiTempestMinionGUID)); + m_uiChainLightningTimer = 15000; + m_uiChainLightningCount = 0; + m_uiLightningNovaTimer = 20000; + m_uiOverchargeTimer = 45000; + m_uiEnrageTimer = 360000; + + if (m_pInstance) + { + m_auiTempestMinionGUID[0] = m_pInstance->GetData64(DATA_TEMPEST_MINION_1); + m_auiTempestMinionGUID[1] = m_pInstance->GetData64(DATA_TEMPEST_MINION_2); + m_auiTempestMinionGUID[2] = m_pInstance->GetData64(DATA_TEMPEST_MINION_3); + m_auiTempestMinionGUID[3] = m_pInstance->GetData64(DATA_TEMPEST_MINION_4); + } + + for (uint8 i=0; i<4; ++i) + { + Creature* pMinion = (Creature*)Unit::GetUnit((*m_creature), m_auiTempestMinionGUID[i]); + if (pMinion && pMinion->isDead()) + pMinion->Respawn(); + } + + if (m_pInstance) + m_pInstance->SetData(TYPE_EMALON, NOT_STARTED); + } + + void Aggro(Unit* pWho) + { + if (m_pInstance) + { + m_auiTempestMinionGUID[0] = m_pInstance->GetData64(DATA_TEMPEST_MINION_1); + m_auiTempestMinionGUID[1] = m_pInstance->GetData64(DATA_TEMPEST_MINION_2); + m_auiTempestMinionGUID[2] = m_pInstance->GetData64(DATA_TEMPEST_MINION_3); + m_auiTempestMinionGUID[3] = m_pInstance->GetData64(DATA_TEMPEST_MINION_4); + } + + m_creature->CallForHelp(80.0f); + + if (m_pInstance) + m_pInstance->SetData(TYPE_EMALON, IN_PROGRESS); + } + + void JustDied(Unit* pKiller) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_EMALON, DONE); + for (uint8 i=0; i<4; ++i) + { + Creature *pMinion = (Creature*)Unit::GetUnit((*m_creature), m_auiTempestMinionGUID[i]); + if (pMinion) + pMinion->DealDamage(pMinion, pMinion->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiEvadeCheckCooldown < uiDiff) + { + if (m_creature->GetDistance2d(-219.119f, -289.037f) > 80.0f) + EnterEvadeMode(); + m_creature->CallForHelp(80.0f); + m_uiEvadeCheckCooldown = 2000; + } + else + m_uiEvadeCheckCooldown -= uiDiff; + + if (m_uiOverchargeTimer < uiDiff) + { + Creature* pMinion = (Creature*)Unit::GetUnit((*m_creature), m_auiTempestMinionGUID[rand()%4]); + if(pMinion && pMinion->isAlive()) + { + m_creature->MonsterTextEmote("%s overcharges Tempest Minion!", 0, true); + pMinion->SetHealth(pMinion->GetMaxHealth()); + pMinion->CastSpell(pMinion, SPELL_OVERCHARGE, false); + } + m_uiOverchargeTimer = 45000; + } + else + m_uiOverchargeTimer -= uiDiff; + + if (m_uiChainLightningTimer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, m_bIsHeroicMode ? SPELL_CHAIN_LIGHTNING_H : SPELL_CHAIN_LIGHTNING_N); + m_uiChainLightningTimer = 10000 + rand()%15000; + } + else + m_uiChainLightningTimer -= uiDiff; + + if (m_uiLightningNovaTimer < uiDiff) + { + DoCast(m_creature, m_bIsHeroicMode ? SPELL_LIGHTNING_NOVA_H : SPELL_LIGHTNING_NOVA_N); + m_uiLightningNovaTimer = 45000; + } + else + m_uiLightningNovaTimer -= uiDiff; + + if (m_uiEnrageTimer < uiDiff) + { + DoCast(m_creature, SPELL_BERSERK); + m_uiEnrageTimer = 30000; + } + else + m_uiEnrageTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +/*###### +## npc_tempest_warder +######*/ + +struct MANGOS_DLL_DECL npc_tempest_warderAI : public ScriptedAI +{ + npc_tempest_warderAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 m_uiShockTimer; + bool m_bOvercharged; + uint32 m_uiOverchargedStacksCheckTimer; + bool m_bTimeToDie; + + void Reset() + { + m_uiShockTimer = 8000+rand()%4000; + m_bOvercharged = false; + uint32 m_uiOverchargedStacksCheckTimer = 2000; + m_bTimeToDie = false; + } + + void Aggro(Unit* pWho) {} + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_bTimeToDie) + { + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + return; + } + + if (!m_bOvercharged && ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 37)) + { + DoCast(m_creature, SPELL_OVERCHARGE); + m_bOvercharged = true; + } + + if (m_bOvercharged) + { + if (m_uiOverchargedStacksCheckTimer < uiDiff) + { + m_uiOverchargedStacksCheckTimer = 2000; + Aura* pAuraOvercharged = m_creature->GetAura(SPELL_OVERCHARGED, 0); + if(pAuraOvercharged && pAuraOvercharged->GetStackAmount() >= 10) + { + DoCast(m_creature, SPELL_OVERCHARGED_BLAST); + m_bTimeToDie = true; + return; + } + } + else + m_uiOverchargedStacksCheckTimer -= uiDiff; + } + + if (m_uiShockTimer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_SHOCK); + m_uiShockTimer = 8000+rand()%4000; + } + else + m_uiShockTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_emalonAI(Creature* pCreature) +{ + return new boss_emalonAI(pCreature); +} + +CreatureAI* GetAI_npc_tempest_minionAI(Creature* pCreature) +{ + return new npc_tempest_minionAI(pCreature); +} + +CreatureAI* GetAI_npc_tempest_warderAI(Creature* pCreature) +{ + return new npc_tempest_warderAI(pCreature); +} + +void AddSC_boss_emalon() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_emalon"; + newscript->GetAI = &GetAI_boss_emalonAI; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_tempest_minion"; + newscript->GetAI = &GetAI_npc_tempest_minionAI; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_tempest_warder"; + newscript->GetAI = &GetAI_npc_tempest_warderAI; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/vault_of_archavon/boss_koralon.cpp b/scripts/northrend/vault_of_archavon/boss_koralon.cpp new file mode 100644 index 000000000..a24b424d9 --- /dev/null +++ b/scripts/northrend/vault_of_archavon/boss_koralon.cpp @@ -0,0 +1,125 @@ + +#include "precompiled.h" +#include "vault_of_archavon.h" + +#define SP_BURNING_FURY_AURA 66895 +#define SP_BURNING_FURY_AURA2 68168 +#define SP_BURNING_FURY_EFFECT 66721 + +#define SP_BURNING_BREATH 66665 +#define H_SP_BURNING_BREATH 67328 //DBM +#define SP_BB_EFFECT 66670 +#define H_SP_BB_EFFECT 67329 + +#define SP_METEOR_FISTS 66725 //DBM +#define H_SP_METEOR_FISTS 68161 +#define SP_METEOR_FISTS_EFF 66765 +#define H_SP_METEOR_FISTS_EFF 67333 + +#define SP_CINDER 66684 +#define H_SP_CINDER 67332 + + +struct MANGOS_DLL_DECL boss_koralonAI : public ScriptedAI +{ + boss_koralonAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Heroic = m_creature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* pInstance; + bool Heroic; + uint32 BurningBreathTimer; + uint32 MeteorFistsTimer; + uint32 FlamesTimer; + + uint32 BBTickTimer; + uint32 BBTicks; + bool BB; + + void Reset() + { + BurningBreathTimer = 25000; + MeteorFistsTimer = 47000; + FlamesTimer = 12000; + + BB = false; + + if(pInstance) pInstance->SetData(TYPE_KORALON, NOT_STARTED); + } + + void Aggro(Unit *who) + { + DoCast(m_creature, SP_BURNING_FURY_AURA); + + if(pInstance) pInstance->SetData(TYPE_KORALON, IN_PROGRESS); + }; + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_KORALON, DONE); + }; + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if(BurningBreathTimer < diff) + { + DoCast(m_creature, Heroic ? H_SP_BURNING_BREATH : SP_BURNING_BREATH); + BurningBreathTimer = 45000; + + BB = true; + BBTickTimer = 1000; + BBTicks = 0; + } + else BurningBreathTimer -= diff; + + if(BB) + { + if(BBTickTimer < diff) + { + DoCast(NULL, Heroic ? H_SP_BB_EFFECT : SP_BB_EFFECT, true); + BBTickTimer = 1000; + ++BBTicks; + if(BBTicks > 2) BB = false; + } + else BBTickTimer -= diff; + } + + if(FlamesTimer < diff) + { + Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + if(target) DoCast(target, Heroic ? H_SP_CINDER : SP_CINDER); + FlamesTimer = 8000; + } + else FlamesTimer -= diff; + + if(MeteorFistsTimer < diff) + { + DoCast(m_creature->getVictim(), SP_METEOR_FISTS_EFF); + MeteorFistsTimer = 45000; + } + else MeteorFistsTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_koralonAI(Creature* pCreature) +{ + return new boss_koralonAI(pCreature); +} + +void AddSC_boss_koralon() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_koralon"; + newscript->GetAI = &GetAI_boss_koralonAI; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/vault_of_archavon/instance_vault_of_archavon.cpp b/scripts/northrend/vault_of_archavon/instance_vault_of_archavon.cpp new file mode 100644 index 000000000..70471f9d9 --- /dev/null +++ b/scripts/northrend/vault_of_archavon/instance_vault_of_archavon.cpp @@ -0,0 +1,204 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance_Vault_of_Archavon +SD%Complete: 0 +SDComment: +SDCategory: Vault of Archavon +EndScriptData */ + +#include "precompiled.h" +#include "vault_of_archavon.h" + +struct MANGOS_DLL_DECL instance_vault_of_archavon : public ScriptedInstance +{ + instance_vault_of_archavon(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string strInstData; + + uint64 m_uiArchavonGUID; + uint64 m_uiEmalonGUID; + uint64 m_uiKoralonGUID; + uint64 m_uiTempestMinion1GUID; + uint64 m_uiTempestMinion2GUID; + uint64 m_uiTempestMinion3GUID; + uint64 m_uiTempestMinion4GUID; + uint8 m_uiMinion; + + void Initialize() + { + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + m_uiArchavonGUID = 0; + m_uiEmalonGUID = 0; + m_uiKoralonGUID = 0; + m_uiTempestMinion1GUID = 0; + m_uiTempestMinion2GUID = 0; + m_uiTempestMinion3GUID = 0; + m_uiTempestMinion4GUID = 0; + m_uiMinion = 0; + } + + void OnCreatureCreate(Creature* pCreature) + { + switch (pCreature->GetEntry()) + { + case NPC_ARCHAVON: + m_uiArchavonGUID = pCreature->GetGUID(); + break; + case NPC_EMALON: + m_uiEmalonGUID = pCreature->GetGUID(); + break; + case NPC_KORALON: + m_uiKoralonGUID = pCreature->GetGUID(); + break; + case NPC_TEMPEST_MINION: + ++m_uiMinion; + switch (m_uiMinion) + { + case 1: + m_uiTempestMinion1GUID = pCreature->GetGUID(); + break; + case 2: + m_uiTempestMinion2GUID = pCreature->GetGUID(); + break; + case 3: + m_uiTempestMinion3GUID = pCreature->GetGUID(); + break; + case 4: + m_uiTempestMinion4GUID = pCreature->GetGUID(); + break; + case 5: + m_uiMinion = 0; + break; + } + break; + } + } + + void SetData(uint32 uiType, uint32 uiData) + { + switch (uiType) + { + case TYPE_ARCHAVON: + m_auiEncounter[0] = uiData; + break; + case TYPE_EMALON: + m_auiEncounter[1] = uiData; + break; + case TYPE_KORALON: + m_auiEncounter[2] = uiData; + break; + } + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2]; + + strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } + } + + uint32 GetData(uint32 uiType) + { + switch (uiType) + { + case TYPE_ARCHAVON: + return m_auiEncounter[0]; + case TYPE_EMALON: + return m_auiEncounter[1]; + case TYPE_KORALON: + return m_auiEncounter[2]; + } + return 0; + } + + uint64 GetData64(uint32 uiData) + { + switch (uiData) + { + case DATA_ARCHAVON: + return m_uiArchavonGUID; + case DATA_EMALON: + return m_uiEmalonGUID; + case DATA_KORALON: + return m_uiKoralonGUID; + case DATA_TEMPEST_MINION_1: + return m_uiTempestMinion1GUID; + case DATA_TEMPEST_MINION_2: + return m_uiTempestMinion2GUID; + case DATA_TEMPEST_MINION_3: + return m_uiTempestMinion3GUID; + case DATA_TEMPEST_MINION_4: + return m_uiTempestMinion4GUID; + } + return 0; + } + const char* Save() + { + return strInstData.c_str(); + } + + void Load(const char* in) + { + if (!in) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(in); + + std::istringstream loadStream(in); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1]; + + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; + } + + OUT_LOAD_INST_DATA_COMPLETE; + } + + bool IsEncounterInProgress() const + { + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) + if (m_auiEncounter[i] == IN_PROGRESS) + return true; + return false; + } +}; + +InstanceData* GetInstanceData_instance_vault_of_archavon(Map* pMap) +{ + return new instance_vault_of_archavon(pMap); +} + +void AddSC_instance_vault_of_archavon() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "instance_vault_of_archavon"; + newscript->GetInstanceData = &GetInstanceData_instance_vault_of_archavon; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/vault_of_archavon/vault_of_archavon.h b/scripts/northrend/vault_of_archavon/vault_of_archavon.h new file mode 100644 index 000000000..cd54f28f2 --- /dev/null +++ b/scripts/northrend/vault_of_archavon/vault_of_archavon.h @@ -0,0 +1,30 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_VAULT_OF_ARCHAVON_H +#define DEF_VAULT_OF_ARCHAVON_H + +enum +{ + MAX_ENCOUNTER = 3, + + DATA_ARCHAVON = 1, + DATA_EMALON = 2, + DATA_KORALON = 3, + DATA_TEMPEST_MINION_1 = 4, + DATA_TEMPEST_MINION_2 = 5, + DATA_TEMPEST_MINION_3 = 6, + DATA_TEMPEST_MINION_4 = 7, + + TYPE_ARCHAVON = 8, + TYPE_EMALON = 9, + TYPE_KORALON = 10, + + NPC_ARCHAVON = 31125, + NPC_EMALON = 33993, + NPC_KORALON = 35013, + NPC_TEMPEST_MINION = 33998 +}; + +#endif diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index 8be3fe7ee..81b0b4735 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -282,6 +282,10 @@ extern void AddSC_boss_telestra(); extern void AddSC_instance_nexus(); extern void AddSC_boss_sartharion(); //obsidian_sanctum extern void AddSC_instance_obsidian_sanctum(); +extern void AddSC_instance_vault_of_archavon(); //vault_of_archavon +extern void AddSC_boss_koralon(); +extern void AddSC_boss_emalon(); +extern void AddSC_boss_archavon(); extern void AddSC_boss_bjarngrim(); //Ulduar, halls_of_lightning extern void AddSC_boss_ionar(); extern void AddSC_boss_loken(); @@ -669,6 +673,10 @@ void AddScripts() AddSC_instance_nexus(); AddSC_boss_sartharion(); //obsidian_sanctum AddSC_instance_obsidian_sanctum(); + AddSC_instance_vault_of_archavon(); //vault_of_archavon + AddSC_boss_koralon(); + AddSC_boss_emalon(); + AddSC_boss_archavon(); AddSC_boss_bjarngrim(); //Ulduar, halls_of_lightning AddSC_boss_ionar(); AddSC_boss_loken(); From 1f2c57e33819f70a2452fe6c9142cc371f47c524 Mon Sep 17 00:00:00 2001 From: Insider Date: Sat, 17 Oct 2009 20:09:24 +0800 Subject: [PATCH 005/405] Changed extension of placeholder file --- ...m patches.sql => here you can find SQL files from patches.txt} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename addition/{here you can find SQL files from patches.sql => here you can find SQL files from patches.txt} (100%) diff --git a/addition/here you can find SQL files from patches.sql b/addition/here you can find SQL files from patches.txt similarity index 100% rename from addition/here you can find SQL files from patches.sql rename to addition/here you can find SQL files from patches.txt From b33005ceab456375d106a1db69e53fd30db9181b Mon Sep 17 00:00:00 2001 From: Insider Date: Sat, 17 Oct 2009 20:42:05 +0800 Subject: [PATCH 006/405] [patch 3] Added script for npc teleporter --- Makefile.am | 1 + VC80/80ScriptDev2.vcproj | 4 + VC90/90ScriptDev2.vcproj | 4 + addition/3_mangos_teleguy.sql | 2 + scripts/custom/teleguy.cpp | 879 ++++++++++++++++++++++++++++++++++ system/ScriptLoader.cpp | 2 + 6 files changed, 892 insertions(+) create mode 100644 addition/3_mangos_teleguy.sql create mode 100644 scripts/custom/teleguy.cpp diff --git a/Makefile.am b/Makefile.am index e4f0e8721..cd167bfff 100644 --- a/Makefile.am +++ b/Makefile.am @@ -48,6 +48,7 @@ include/sc_grid_searchers.h \ include/sc_instance.cpp \ include/sc_instance.h \ scripts/battlegrounds/battleground.cpp \ +scripts/custom/teleguy.cpp \ scripts/eastern_kingdoms/alterac_mountains.cpp \ scripts/eastern_kingdoms/arathi_highlands.cpp \ scripts/eastern_kingdoms/blasted_lands.cpp \ diff --git a/VC80/80ScriptDev2.vcproj b/VC80/80ScriptDev2.vcproj index d589b0cb4..d824cb66e 100644 --- a/VC80/80ScriptDev2.vcproj +++ b/VC80/80ScriptDev2.vcproj @@ -404,6 +404,10 @@ + + + + GetTeam() == ALLIANCE ) { + player->ADD_GOSSIP_ITEM( 5, "Darnassus. 5 Silver" , GOSSIP_SENDER_MAIN, 1203); + player->ADD_GOSSIP_ITEM( 5, "Exodar. 5 Silver" , GOSSIP_SENDER_MAIN, 1216); + player->ADD_GOSSIP_ITEM( 5, "Stormwind. 5 Silver" , GOSSIP_SENDER_MAIN, 1206); + player->ADD_GOSSIP_ITEM( 5, "Ironforge. 5 Silver" , GOSSIP_SENDER_MAIN, 1224); + player->ADD_GOSSIP_ITEM( 5, "Gnomeregan. 5 Silver" , GOSSIP_SENDER_MAIN, 1222); + player->ADD_GOSSIP_ITEM( 5, "Shattrath City. 5 Silver" , GOSSIP_SENDER_MAIN, 1287); + player->ADD_GOSSIP_ITEM( 5, "Dalaran. 5 Silver" , GOSSIP_SENDER_MAIN, 1205); + player->ADD_GOSSIP_ITEM( 5, "Isle Of Quel'Danas. 5 Silver" , GOSSIP_SENDER_MAIN, 1288); + player->ADD_GOSSIP_ITEM( 7, "[Instances] ->" , GOSSIP_SENDER_MAIN, 5550); + player->ADD_GOSSIP_ITEM( 7, "[Instances WotLK] ->" , GOSSIP_SENDER_MAIN, 5554); + } else { + player->ADD_GOSSIP_ITEM( 5, "Orgrimmar. 5 Silver" , GOSSIP_SENDER_MAIN, 1215); + player->ADD_GOSSIP_ITEM( 5, "Silvermoon. 5 Silver" , GOSSIP_SENDER_MAIN, 1217); + player->ADD_GOSSIP_ITEM( 5, "Undercity. 5 Silver" , GOSSIP_SENDER_MAIN, 1213); + player->ADD_GOSSIP_ITEM( 5, "Thunder Bluff. 5 Silver" , GOSSIP_SENDER_MAIN, 1225); + player->ADD_GOSSIP_ITEM( 5, "Gnomeregan. 5 Silver" , GOSSIP_SENDER_MAIN, 1222); + player->ADD_GOSSIP_ITEM( 5, "Shattrath City. 5 Silver" , GOSSIP_SENDER_MAIN, 1287); + player->ADD_GOSSIP_ITEM( 5, "Dalaran. 5 Silver" , GOSSIP_SENDER_MAIN, 1205); + player->ADD_GOSSIP_ITEM( 5, "Isle Of Quel'Danas. 5 Silver" , GOSSIP_SENDER_MAIN, 1288); + player->ADD_GOSSIP_ITEM( 7, "[Instances] ->" , GOSSIP_SENDER_MAIN, 5550); + player->ADD_GOSSIP_ITEM( 7, "[Instances WotLK] ->" , GOSSIP_SENDER_MAIN, 5554); + } + + player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + return true; +} + + +void SendDefaultMenu_teleguy(Player *player, Creature *_Creature, uint32 action ) +{ + if(!player->getAttackers().empty()) + { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You are in combat!", LANG_UNIVERSAL, NULL); + return; + } + + if( player->getLevel() < 8 ) + { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be lvl 8+", LANG_UNIVERSAL, NULL); + return; + } + + money = player-> GetMoney(); + costo = 500; + + if (money < costo ) + { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You haven't enough money", LANG_UNIVERSAL, NULL); + return; + } + + switch(action) + { + case 5550: //Instances + player->ADD_GOSSIP_ITEM( 5, "Ragefire Chasm. 10 Silver" , GOSSIP_SENDER_MAIN, 1248); + player->ADD_GOSSIP_ITEM( 5, "The Wailing Caverns. 10 Silver" , GOSSIP_SENDER_MAIN, 1249); + player->ADD_GOSSIP_ITEM( 5, "The Stockade. 10 Silver" , GOSSIP_SENDER_MAIN, 1253); + player->ADD_GOSSIP_ITEM( 5, "Deadmines. 10 Silver" , GOSSIP_SENDER_MAIN, 1250); + player->ADD_GOSSIP_ITEM( 5, "Shadowfang Keep. 10 Silver" , GOSSIP_SENDER_MAIN, 1251); + player->ADD_GOSSIP_ITEM( 5, "Blackfathom Deeps. 10 Silver" , GOSSIP_SENDER_MAIN, 1252); + player->ADD_GOSSIP_ITEM( 5, "Razorfen Kraul. 20 Silver" , GOSSIP_SENDER_MAIN, 1254); + player->ADD_GOSSIP_ITEM( 5, "Razorfen Downs. 20 Silver" , GOSSIP_SENDER_MAIN, 1256); + player->ADD_GOSSIP_ITEM( 5, "Scarlet Monastery. 20 Silver" , GOSSIP_SENDER_MAIN, 1257); + player->ADD_GOSSIP_ITEM( 7, "[More] ->" , GOSSIP_SENDER_MAIN, 5551); + player->ADD_GOSSIP_ITEM( 7, "<- [Main Menu]" , GOSSIP_SENDER_MAIN, 5552); + player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + break; + case 5551: //More Instances + player->ADD_GOSSIP_ITEM( 5, "Uldaman. 30 Silver" , GOSSIP_SENDER_MAIN, 1258); + player->ADD_GOSSIP_ITEM( 5, "Zul'Farrak. 30 Silver" , GOSSIP_SENDER_MAIN, 1259); + player->ADD_GOSSIP_ITEM( 5, "Maraudon. 40 Silver" , GOSSIP_SENDER_MAIN, 1260); + player->ADD_GOSSIP_ITEM( 5, "Maraudon. 40 Silver" , GOSSIP_SENDER_MAIN, 1260); + player->ADD_GOSSIP_ITEM( 5, "The Sunken Temple. 40 Silver" , GOSSIP_SENDER_MAIN, 1261); + player->ADD_GOSSIP_ITEM( 5, "Blackrock Depths. 40 Silver" , GOSSIP_SENDER_MAIN, 1262); + player->ADD_GOSSIP_ITEM( 5, "Dire Maul. 50 Silver" , GOSSIP_SENDER_MAIN, 1263); + player->ADD_GOSSIP_ITEM( 5, "Blackrock Spire. 50 Silver" , GOSSIP_SENDER_MAIN, 1264); + player->ADD_GOSSIP_ITEM( 5, "Stratholme. 50 Silver" , GOSSIP_SENDER_MAIN, 1265); + player->ADD_GOSSIP_ITEM( 5, "Scholomance. 50 Silver" , GOSSIP_SENDER_MAIN, 1266); + player->ADD_GOSSIP_ITEM( 7, "[More] ->" , GOSSIP_SENDER_MAIN, 5553); + player->ADD_GOSSIP_ITEM( 7, "<- [Back]" , GOSSIP_SENDER_MAIN, 5550); + player->ADD_GOSSIP_ITEM( 7, "<- [Main Menu]" , GOSSIP_SENDER_MAIN, 5552); + player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + break; + +case 5553: //Instances 60-70 +player->ADD_GOSSIP_ITEM( 5, "Karazhan. 1 Gold" , GOSSIP_SENDER_MAIN, 4007); +player->ADD_GOSSIP_ITEM( 5, "Gruul's Lair. 1 Gold" , GOSSIP_SENDER_MAIN, 4008); +player->ADD_GOSSIP_ITEM( 5, "Hellfire Citadel. 1 Gold" , GOSSIP_SENDER_MAIN, 4009); +player->ADD_GOSSIP_ITEM( 5, "Coilfang Reservoir. 1 Gold" , GOSSIP_SENDER_MAIN, 4010); +player->ADD_GOSSIP_ITEM( 5, "Tempest Keep. 1 Gold" , GOSSIP_SENDER_MAIN, 4011); +player->ADD_GOSSIP_ITEM( 5, "Caverns of Time. 1 Gold" , GOSSIP_SENDER_MAIN, 4012); +player->ADD_GOSSIP_ITEM( 5, "Zul'Aman. 1 Gold" , GOSSIP_SENDER_MAIN, 4016); +player->ADD_GOSSIP_ITEM( 5, "Black Temple. 1 Gold" , GOSSIP_SENDER_MAIN, 4013); +player->ADD_GOSSIP_ITEM( 5, "Magister's Terrace. 2 Gold" , GOSSIP_SENDER_MAIN, 4017); +player->ADD_GOSSIP_ITEM( 5, "Sunwell Plateau. 2 Gold" , GOSSIP_SENDER_MAIN, 4018); +player->ADD_GOSSIP_ITEM( 7, "<- [Back]" , GOSSIP_SENDER_MAIN, 5550); +player->ADD_GOSSIP_ITEM( 7, "<- [Main Menu]" , GOSSIP_SENDER_MAIN, 5552); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 5554: //Instances 75-80 NORTHREND +player->ADD_GOSSIP_ITEM( 5, "Utgarde Keep. 20 Gold" , GOSSIP_SENDER_MAIN, 4019); +player->ADD_GOSSIP_ITEM( 5, "The Nexus. 20 Gold" , GOSSIP_SENDER_MAIN, 4020); +player->ADD_GOSSIP_ITEM( 5, "Azjol-Nerub. 20 Gold" , GOSSIP_SENDER_MAIN, 4021); +player->ADD_GOSSIP_ITEM( 5, "Ahn'kahet: The Old Kingdom. 20 Gold" , GOSSIP_SENDER_MAIN, 4022); +player->ADD_GOSSIP_ITEM( 5, "Drak'Tharon Keep. 20 Gold" , GOSSIP_SENDER_MAIN, 4023); +player->ADD_GOSSIP_ITEM( 5, "The Violet Hold. 20 Gold" , GOSSIP_SENDER_MAIN, 4024); +player->ADD_GOSSIP_ITEM( 5, "Gun' Drak. 20 Gold" , GOSSIP_SENDER_MAIN, 4025); +player->ADD_GOSSIP_ITEM( 5, "Utgarde Pinnacle. 20 Gold" , GOSSIP_SENDER_MAIN, 4026); +player->ADD_GOSSIP_ITEM( 5, "Ulduar. 20 Gold" , GOSSIP_SENDER_MAIN, 4027); +player->ADD_GOSSIP_ITEM( 5, "The Obsidian Sanctum. 20 Gold" , GOSSIP_SENDER_MAIN, 4028); +player->ADD_GOSSIP_ITEM( 5, "Naxxramas. 20 Gold" , GOSSIP_SENDER_MAIN, 4029); +player->ADD_GOSSIP_ITEM( 7, "<- [Back]" , GOSSIP_SENDER_MAIN, 5550); +player->ADD_GOSSIP_ITEM( 7, "<- [Main Menu]" , GOSSIP_SENDER_MAIN, 5552); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 5552: //Back To Main Menu + if ( player->GetTeam() == ALLIANCE ) { +player->ADD_GOSSIP_ITEM( 5, "Darnassus. 5 Silver" , GOSSIP_SENDER_MAIN, 1203); +player->ADD_GOSSIP_ITEM( 5, "Exodar. 5 Silver" , GOSSIP_SENDER_MAIN, 1216); +player->ADD_GOSSIP_ITEM( 5, "Stormwind. 5 Silver" , GOSSIP_SENDER_MAIN, 1206); +player->ADD_GOSSIP_ITEM( 5, "Ironforge. 5 Silver" , GOSSIP_SENDER_MAIN, 1224); +player->ADD_GOSSIP_ITEM( 5, "Gnomeregan. 5 Silver" , GOSSIP_SENDER_MAIN, 1222); +player->ADD_GOSSIP_ITEM( 5, "Shattrath City. 5 Silver" , GOSSIP_SENDER_MAIN, 1287); +player->ADD_GOSSIP_ITEM( 5, "Dalaran. 5 Silver" , GOSSIP_SENDER_MAIN, 1205); +player->ADD_GOSSIP_ITEM( 5, "Isle Of Quel'Danas. 5 Silver" , GOSSIP_SENDER_MAIN, 1288); +player->ADD_GOSSIP_ITEM( 7, "[Instances] ->" , GOSSIP_SENDER_MAIN, 5550); +player->ADD_GOSSIP_ITEM( 7, "[Instances WotLK] ->" , GOSSIP_SENDER_MAIN, 5554); + + } else { + + +player->ADD_GOSSIP_ITEM( 5, "Orgrimmar. 5 Silver" , GOSSIP_SENDER_MAIN, 1215); +player->ADD_GOSSIP_ITEM( 5, "Silvermoon. 5 Silver" , GOSSIP_SENDER_MAIN, 1217); +player->ADD_GOSSIP_ITEM( 5, "Undercity. 5 Silver" , GOSSIP_SENDER_MAIN, 1213); +player->ADD_GOSSIP_ITEM( 5, "Thunder Bluff. 5 Silver" , GOSSIP_SENDER_MAIN, 1225); +player->ADD_GOSSIP_ITEM( 5, "Gnomeregan. 5 Silver" , GOSSIP_SENDER_MAIN, 1222); +player->ADD_GOSSIP_ITEM( 5, "Shattrath City. 5 Silver" , GOSSIP_SENDER_MAIN, 1287); +player->ADD_GOSSIP_ITEM( 5, "Dalaran. 5 Silver" , GOSSIP_SENDER_MAIN, 1205); +player->ADD_GOSSIP_ITEM( 5, "Isle Of Quel'Danas. 5 Silver" , GOSSIP_SENDER_MAIN, 1288); +player->ADD_GOSSIP_ITEM( 7, "[Instances] ->" , GOSSIP_SENDER_MAIN, 5550); +player->ADD_GOSSIP_ITEM( 7, "[Instances WotLK] ->" , GOSSIP_SENDER_MAIN, 5554); + } + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 1203: // Teleport to Darnassus +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(1, 9947.52f, 2482.73f, 1316.21f, 0.0f); +player->ModifyMoney(-1*costo); +break; + +// Teleport to Stormwind +case 1206: +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(0, -8960.14f, 516.266f, 96.3568f, 0.0f); +player->ModifyMoney(-1*costo); +break; + +// Teleport to Dalaran +case 1205: +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(571, 5804.14f, 624.770f, 647.7670f, 1.64f); +player->ModifyMoney(-1*costo); +break; + +// Teleport to Undercity +case 1213: +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(0, 1819.71f, 238.79f, 60.5321f, 0.0f); +player->ModifyMoney(-1*costo); + +break; + +// Teleport to Orgrimmar +case 1215: +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(1, 1552.5f, -4420.66f, 8.94802f, 0.0f); +player->ModifyMoney(-1*costo); +break; + +// Teleport to Exodar +case 1216: +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(530, -4073.03f, -12020.4f, -1.47f, 0.0f); +player->ModifyMoney(-1*costo); +break; + +// Teleport to Silvermoon +case 1217: +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(530, 9338.74f, -7277.27f, 13.7895f, 0.0f); +player->ModifyMoney(-1*costo); + +break; + +case 1222://teleport player to Gnomeregan +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(0, -5163.43f,660.40f,348.28f,4.65f); +player->ModifyMoney(-1*costo); + +break; + +// Teleport to Ironforge +case 1224: +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(0, -4924.07f, -951.95f, 501.55f, 5.40f); +player->ModifyMoney(-1*costo); + +break; + +// Teleport to Thunder Bluff +case 1225: +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(1, -1280.19f,127.21f,131.35f,5.16f); +player->ModifyMoney(-1*costo); + +break; + +case 1248://teleport player to Ragefire Chasm + +if( player->getLevel() >= 8) + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(1, 1800.53f,-4394.68f,-17.93f,5.49f); + player->ModifyMoney(-2*costo); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 8!", LANG_UNIVERSAL, NULL); + } + +break; + +case 1249://teleport player to the Wailing Caverns + +if (player->getLevel() >= 10) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(1, -722.53f,-2226.30f,16.94f,2.71f); + player->ModifyMoney(-2*costo); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 10!", LANG_UNIVERSAL, NULL); + } + +break; + +case 1250://teleport player to the Deadmines + +if (player->getLevel() >= 10) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(0, -11212.04f,1658.58f,25.67f,1.45f); + player->ModifyMoney(-2*costo); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 10!", LANG_UNIVERSAL, NULL); + } + +break; + +case 1251://teleport player to Shadowfang Keep + + if (player->getLevel() >= 15) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(0, -254.47f,1524.68f,76.89f,1.56f); + player->ModifyMoney(-2*costo); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 15!", LANG_UNIVERSAL, NULL); + } + +break; + +case 1252://teleport player to Blackfathom Deeps + + if (player->getLevel() >= 15) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(1, 4254.58f,664.74f,-29.04f,1.97f); + player->ModifyMoney(-2*costo); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 15!", LANG_UNIVERSAL, NULL); + } + +break; + +case 1253://teleport player to the Stockade + + if (player->getLevel() >= 20) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(0, -8769.76f,813.08f,97.63f,2.26f); + player->ModifyMoney(-2*costo); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 20!", LANG_UNIVERSAL, NULL); + } + +break; + +case 1254://teleport player to Razorfen Kraul + + if (player->getLevel() >= 24) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(1, -4484.04f,-1739.40f,86.47f,1.23f); + player->ModifyMoney(-4*costo); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 24!", LANG_UNIVERSAL, NULL); + } + +break; + +case 1255://teleport player to Gnomeregan + + if (player->getLevel() >= 20) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(0, -5162.62f,667.81f,248.05f,1.48f); + player->ModifyMoney(-4*costo); + + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 20!", LANG_UNIVERSAL, NULL); + } + +break; + +case 1256://teleport player to Razorfen Downs + + if (player->getLevel() >= 25) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(1, -4645.08f,-2470.85f,85.53f,4.39f); + player->ModifyMoney(-4*costo); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 25!", LANG_UNIVERSAL, NULL); + } + +break; + +case 1257://teleport player to the Scarlet Monastery + + if (player->getLevel() >= 25) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(0, 2843.89f,-693.74f,139.32f,5.11f); + player->ModifyMoney(-4*costo); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 25!", LANG_UNIVERSAL, NULL); + } + +break; + +case 1258://teleport player to Uldaman + + if (player->getLevel() >= 35) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(0, -6119.70f,-2957.30f,204.11f,0.03f); + player->ModifyMoney(-6*costo); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 35!", LANG_UNIVERSAL, NULL); + } + +break; + +case 1259://teleport player to Zul'Farrak + + if (player->getLevel() >= 35) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(1, -6839.39f,-2911.03f,8.87f,0.41f); + player->ModifyMoney(-6*costo); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 35!", LANG_UNIVERSAL, NULL); + } + +break; + + +case 1260://teleport player to Maraudon + + if (player->getLevel() >= 40) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(1, -1433.33f,2955.34f,96.21f,4.82f); + player->ModifyMoney(-8*costo); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 40!", LANG_UNIVERSAL, NULL); + } + +break; + +case 1261://teleport player to the Sunken Temple + + if (player->getLevel() >= 45) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(0, -10346.92f,-3851.90f,-43.41f,6.09f); + player->ModifyMoney(-8*costo); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 45!", LANG_UNIVERSAL, NULL); + } + +break; + +case 1262://teleport player to Blackrock Depths + + if (player->getLevel() >= 45) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(0, -7301.03f,-913.19f,165.37f,0.08f); + player->ModifyMoney(-8*costo); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 45!", LANG_UNIVERSAL, NULL); + } + +break; + +case 1263://teleport player to Dire Maul + + if (player->getLevel() >= 50) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(1, -3982.47f,1127.79f,161.02f,0.05f); + player->ModifyMoney(-10*costo); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 50!", LANG_UNIVERSAL, NULL); + } + +break; + +case 1264://teleport player to Blackrock Spire + + if (player->getLevel() >= 50) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(0, -7535.43f,-1212.04f,285.45f,5.29f); + player->ModifyMoney(-10*costo); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 50!", LANG_UNIVERSAL, NULL); + } + +break; + +case 1265://teleport player to Stratholme + + if (player->getLevel() >= 50) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(0, 3263.54f,-3379.46f,143.59f,0.00f); + player->ModifyMoney(-10*costo); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 50!", LANG_UNIVERSAL, NULL); + } + +break; + +case 1266://teleport player to Scholomance + + if (player->getLevel() >= 50) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(0, 1219.01f,-2604.66f,85.61f,0.50f); + player->ModifyMoney(-10*costo); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 50!", LANG_UNIVERSAL, NULL); + } + +break; + +case 1287:// Shattrath City + +if( player->getLevel() >= 58) + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(530, -1850.209961f, 5435.821777f, -10.961435f, 3.403913f); + player->ModifyMoney(-1*costo); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 58!", LANG_UNIVERSAL, NULL); + } + +break; + +case 1288://teleport player to Isle Of Quel'Danas + + if (player->getLevel() >= 65) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(530, 12947.4f,-6893.31f,5.68398f,3.09154f); + player->ModifyMoney(-1*costo); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 65!", LANG_UNIVERSAL, NULL); + } + +break; + +case 4007:// Karazhan + + if (player->getLevel() >= 70) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(0, -11118.8f, -2010.84f, 47.0807f, 0.0f); + player->ModifyMoney(-20*costo); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 70!", LANG_UNIVERSAL, NULL); + } + +break; + +case 4008:// Gruul's Lair + + if (player->getLevel() >= 65) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(530, 3539.007568f, 5082.357910f, 1.691071f, 0.0f); + player->ModifyMoney(-20*costo); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 65!", LANG_UNIVERSAL, NULL); + } + +break; + +case 4009:// Hellfire Citadel +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(530, -305.816223f, 3056.401611f, -2.473183f, 2.01f); +player->ModifyMoney(-20*costo); +break; + +case 4010:// Coilfang Reservoir +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(530, 517.288025f, 6976.279785f, 32.007198f, 0.0f); +player->ModifyMoney(-20*costo); +break; + +case 4011:// Tempest Keep + + if (player->getLevel() >= 70) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(530, 3089.579346f, 1399.046509f, 187.653458f, 4.794070f); + player->ModifyMoney(-20*costo); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 70!", LANG_UNIVERSAL, NULL); + } + +break; + +case 4012:// Caverns of Time + + if (player->getLevel() >= 66) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(1, -8173.66f, -4746.36f, 33.8423f, 4.93989f); + player->ModifyMoney(-20*costo); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 66!", LANG_UNIVERSAL, NULL); + } + +break; + +case 4016:// Zul'Aman + + if (player->getLevel() >= 70) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(530, 6846.95f, -7954.5f, 170.028f, 4.61501f); + player->ModifyMoney(-20*costo); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 70!", LANG_UNIVERSAL, NULL); + } + +break; + +case 4013:// Black Temple + + if (player->getLevel() >= 70) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(530, -3610.719482f, 324.987579f, 37.400028f, 3.282981f); + player->ModifyMoney(-20*costo); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 70!", LANG_UNIVERSAL, NULL); + } + +break; + +case 4017:// magistrate + + if (player->getLevel() >= 70) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(530, 12884.6f, -7317.69f, 65.5023f, 4.799f); + player->ModifyMoney(-40*costo); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 70!", LANG_UNIVERSAL, NULL); + } + +break; + +case 4018:// sunwell + + if (player->getLevel() >= 70) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(530, 12574.1f, -6774.81f, 15.0904f, 3.13788f); + player->ModifyMoney(-40*costo); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 70!", LANG_UNIVERSAL, NULL); + } + +break; + +case 4019:// Utgarde Keep + + if (player->getLevel() >= 80) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(571, 1219.720f, -4865.28f, 41.25f, 0.31f); + player->ModifyMoney(-400*costo); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 80!", LANG_UNIVERSAL, NULL); + } + +break; + +case 4020:// The Nexus + + if (player->getLevel() >= 80) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(571, 3776.950f, 6953.80f, 105.05f, 0.345f); + player->ModifyMoney(-400*costo); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 80!", LANG_UNIVERSAL, NULL); + } + +break; + +case 4021:// Azjol-Nerub + + if (player->getLevel() >= 80) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(571, 3675.430f, 2169.00f, 35.90f, 2.29f); + player->ModifyMoney(-400*costo); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 80!", LANG_UNIVERSAL, NULL); + } + +break; + +case 4022:// Ahn'kahet: The Old Kingdom + + if (player->getLevel() >= 80) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(571, 3646.760f, 2045.17f, 1.79f, 4.37f); + player->ModifyMoney(-400*costo); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 80!", LANG_UNIVERSAL, NULL); + } + +break; + +case 4023:// Drak'Tharon Keep + + if (player->getLevel() >= 80) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(571, 4450.860f, -2045.25f, 162.83f, 0.00f); + player->ModifyMoney(-400*costo); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 80!", LANG_UNIVERSAL, NULL); + } + +break; + +case 4024:// The Violet Hold + + if (player->getLevel() >= 80) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(571, 5679.820f, 486.80f, 652.40f, 4.08f); + player->ModifyMoney(-400*costo); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 80!", LANG_UNIVERSAL, NULL); + } + +break; + +case 4025:// Gun' Drak + + if (player->getLevel() >= 80) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(571, 6937.540f, -4455.98f, 450.68f, 1.00f); + player->ModifyMoney(-400*costo); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 80!", LANG_UNIVERSAL, NULL); + } + +break; + +case 4026:// Utgarde Pinnacle + + if (player->getLevel() >= 80) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(571, 1245.690f, -4856.59f, 216.86f, 3.45f); + player->ModifyMoney(-400*costo); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 80!", LANG_UNIVERSAL, NULL); + } + +break; + +case 4027:// Ulduar + + if (player->getLevel() >= 80) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(571, 8976.240f, -1281.33f, 1059.01f, 0.58f); + player->ModifyMoney(-400*costo); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 80!", LANG_UNIVERSAL, NULL); + } + +break; + +case 4028:// The Obsidian Sanctum + + if (player->getLevel() >= 80) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(571, 3625.780f, 280.40f, -120.14f, 3.25f); + player->ModifyMoney(-400*costo); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 80!", LANG_UNIVERSAL, NULL); + } + +break; + +case 4029:// Naxxramas + + if (player->getLevel() >= 80) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(571, 3668.719f, -1262.460f, 243.63f, 5.03f); + player->ModifyMoney(-400*costo); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 80!", LANG_UNIVERSAL, NULL); + } + +break; + +} + + +} + +bool GossipSelect_teleguy(Player *player, Creature *_Creature, uint32 sender, uint32 action ) +{ + // Main menu + if (sender == GOSSIP_SENDER_MAIN) + SendDefaultMenu_teleguy(player, _Creature, action ); + return true; +} + +void AddSC_teleguy() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "teleguy"; + newscript->pGossipHello = &GossipHello_teleguy; + newscript->pGossipSelect = &GossipSelect_teleguy; + newscript->pItemHello = NULL; + newscript->pGOHello = NULL; + newscript->pAreaTrigger = NULL; + newscript->pItemQuestAccept = NULL; + newscript->pGOQuestAccept = NULL; + newscript->pGOChooseReward = NULL; + newscript->RegisterSelf(); +} diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index 81b0b4735..c02c6c227 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -8,6 +8,7 @@ extern void AddSC_battleground(); //custom +extern void AddSC_teleguy(); //examples extern void AddSC_example_creature(); @@ -399,6 +400,7 @@ void AddScripts() AddSC_battleground(); //custom + AddSC_teleguy(); //examples AddSC_example_creature(); From 8885c661c47ae4349a850e49ae29b59f580d7b6e Mon Sep 17 00:00:00 2001 From: Insider Date: Sat, 17 Oct 2009 20:42:44 +0800 Subject: [PATCH 007/405] Fixed SQL file name for [patch 2] --- .../{2_vault_of_archavon.sql => 2_mangos_vault_of_archavon.sql} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename addition/{2_vault_of_archavon.sql => 2_mangos_vault_of_archavon.sql} (100%) diff --git a/addition/2_vault_of_archavon.sql b/addition/2_mangos_vault_of_archavon.sql similarity index 100% rename from addition/2_vault_of_archavon.sql rename to addition/2_mangos_vault_of_archavon.sql From c081228a69f3cf64b8544c3b4347acf535800b93 Mon Sep 17 00:00:00 2001 From: Insider Date: Sat, 17 Oct 2009 21:06:05 +0800 Subject: [PATCH 008/405] [patch 4] Added script for npc arena-honor exchanger --- Makefile.am | 1 + VC80/80ScriptDev2.vcproj | 4 +++ VC90/90ScriptDev2.vcproj | 4 +++ addition/4_mangos_arena_honor.sql | 2 ++ scripts/custom/npc_arena_honor.cpp | 47 ++++++++++++++++++++++++++++++ system/ScriptLoader.cpp | 2 ++ 6 files changed, 60 insertions(+) create mode 100644 addition/4_mangos_arena_honor.sql create mode 100644 scripts/custom/npc_arena_honor.cpp diff --git a/Makefile.am b/Makefile.am index cd167bfff..2914b7767 100644 --- a/Makefile.am +++ b/Makefile.am @@ -48,6 +48,7 @@ include/sc_grid_searchers.h \ include/sc_instance.cpp \ include/sc_instance.h \ scripts/battlegrounds/battleground.cpp \ +scripts/custom/npc_arena_honor.cpp \ scripts/custom/teleguy.cpp \ scripts/eastern_kingdoms/alterac_mountains.cpp \ scripts/eastern_kingdoms/arathi_highlands.cpp \ diff --git a/VC80/80ScriptDev2.vcproj b/VC80/80ScriptDev2.vcproj index d824cb66e..ff02bfc19 100644 --- a/VC80/80ScriptDev2.vcproj +++ b/VC80/80ScriptDev2.vcproj @@ -404,6 +404,10 @@ + + diff --git a/VC90/90ScriptDev2.vcproj b/VC90/90ScriptDev2.vcproj index 27a59d765..2f75813f4 100644 --- a/VC90/90ScriptDev2.vcproj +++ b/VC90/90ScriptDev2.vcproj @@ -403,6 +403,10 @@ + + diff --git a/addition/4_mangos_arena_honor.sql b/addition/4_mangos_arena_honor.sql new file mode 100644 index 000000000..e56e848e9 --- /dev/null +++ b/addition/4_mangos_arena_honor.sql @@ -0,0 +1,2 @@ +DELETE FROM `creature_template` WHERE `entry`=7; +INSERT INTO `creature_template` VALUES ('7','0','0','0','17858','0','17858','0','Besdoban Durnoye','Arena-Honor Exchange',NULL,'59','61','6700','24000','5598','5875','20','35','35','1','1.48','0','0','170','182','0','1235','1','1400','1900','0','0','0','0','0','0','0','0','0','0','100','7','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','1','3','0','1','0','0','0','0','0','0','0','0','1','0','0','0','npc_arena_honor'); diff --git a/scripts/custom/npc_arena_honor.cpp b/scripts/custom/npc_arena_honor.cpp new file mode 100644 index 000000000..0580349e0 --- /dev/null +++ b/scripts/custom/npc_arena_honor.cpp @@ -0,0 +1,47 @@ +#include "precompiled.h" +#include "sc_creature.h" +#include "sc_gossip.h" +//#include "Player.h" + +#define GOSSIP_ITEM_ARENA_TO_HONOR "Change 50 Arena to 1000 Honor" +#define GOSSIP_ITEM_HONOR_TO_ARENA "Change 1000 Honor to 50 Arena" + +bool GossipHello_npc_arena_honor(Player *player, Creature *_Creature) +{ + player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM_HONOR_TO_ARENA, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM_ARENA_TO_HONOR, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + player->SEND_GOSSIP_MENU(3961,_Creature->GetGUID()); + return true; +} + +bool GossipSelect_npc_arena_honor(Player *player, Creature *_Creature, uint32 sender, uint32 action) +{ + if (action == GOSSIP_ACTION_INFO_DEF + 1) + { + if (player->GetHonorPoints() >= 1000) + { + player->ModifyHonorPoints(-1000); + player->ModifyArenaPoints(+50); + } + } + else if (action == GOSSIP_ACTION_INFO_DEF + 2) + { + if (player->GetArenaPoints() >= 50 && player->GetHonorPoints() <= 74000) + { + player->ModifyArenaPoints(-50); + player->ModifyHonorPoints(+1000); + } + } + player->CLOSE_GOSSIP_MENU(); + return true; +} + +void AddSC_npc_arena_honor() +{ + Script *newscript; + newscript = new Script; + newscript->Name="npc_arena_honor"; + newscript->pGossipHello = &GossipHello_npc_arena_honor; + newscript->pGossipSelect = &GossipSelect_npc_arena_honor; + newscript->RegisterSelf(); +} diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index c02c6c227..1b189618a 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -8,6 +8,7 @@ extern void AddSC_battleground(); //custom +extern void AddSC_npc_arena_honor(); extern void AddSC_teleguy(); //examples @@ -400,6 +401,7 @@ void AddScripts() AddSC_battleground(); //custom + AddSC_npc_arena_honor(); AddSC_teleguy(); //examples From af6e70c12d55b7e7bd88794ec8f8eabce5978e9c Mon Sep 17 00:00:00 2001 From: Insider Date: Sat, 17 Oct 2009 21:31:08 +0800 Subject: [PATCH 009/405] [patch 5] Some improvements for boss Supremus in raid instance Black Temple --- scripts/outland/black_temple/boss_supremus.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/scripts/outland/black_temple/boss_supremus.cpp b/scripts/outland/black_temple/boss_supremus.cpp index ce5bdad21..01b27b1ff 100644 --- a/scripts/outland/black_temple/boss_supremus.cpp +++ b/scripts/outland/black_temple/boss_supremus.cpp @@ -121,7 +121,7 @@ struct MANGOS_DLL_DECL npc_volcanoAI : public ScriptedAI CheckTimer = 1000; SupremusGUID = 0; FireballTimer = 500; - GeyserTimer = 0; + GeyserTimer = 2000; } void AttackStart(Unit* who) {} @@ -321,15 +321,7 @@ struct MANGOS_DLL_DECL boss_supremusAI : public ScriptedAI if (target) { - Creature* Volcano = NULL; - Volcano = SummonCreature(CREATURE_VOLCANO, target); - - if (Volcano) - { - DoCast(target, SPELL_VOLCANIC_ERUPTION); - ((npc_volcanoAI*)Volcano->AI())->SetSupremusGUID(m_creature->GetGUID()); - } - + DoCast(target, SPELL_VOLCANIC_ERUPTION); DoScriptText(EMOTE_GROUND_CRACK, m_creature); SummonVolcanoTimer = 10000; } From fe7c8b93e8339277df73d824b00289b321e621c0 Mon Sep 17 00:00:00 2001 From: Insider Date: Sat, 17 Oct 2009 21:42:15 +0800 Subject: [PATCH 010/405] [patch 6] Disabled one spell for boss Mother Shahraz in raid instance Black Temple to prevent a server crash --- scripts/outland/black_temple/boss_mother_shahraz.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/outland/black_temple/boss_mother_shahraz.cpp b/scripts/outland/black_temple/boss_mother_shahraz.cpp index 4b1329ab2..8b148da8c 100644 --- a/scripts/outland/black_temple/boss_mother_shahraz.cpp +++ b/scripts/outland/black_temple/boss_mother_shahraz.cpp @@ -161,7 +161,7 @@ struct MANGOS_DLL_DECL boss_shahrazAI : public ScriptedAI if (pUnit && pUnit->isAlive() && (pUnit->GetTypeId() == TYPEID_PLAYER)) { TargetGUID[i] = pUnit->GetGUID(); - pUnit->CastSpell(pUnit, SPELL_TELEPORT_VISUAL, true); +// pUnit->CastSpell(pUnit, SPELL_TELEPORT_VISUAL, true); DoTeleportPlayer(pUnit, X, Y, Z, pUnit->GetOrientation()); } } From a795447abc52edb87a4eccdfb766626214490246 Mon Sep 17 00:00:00 2001 From: Insider Date: Sun, 18 Oct 2009 14:38:20 +0800 Subject: [PATCH 011/405] Fixed threat creation for summons of boss Kel'Thuzad in [patch 1] --- .../northrend/naxxramas/boss_kelthuzad.cpp | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/scripts/northrend/naxxramas/boss_kelthuzad.cpp b/scripts/northrend/naxxramas/boss_kelthuzad.cpp index 7d5bba3fd..ac7cd69a9 100644 --- a/scripts/northrend/naxxramas/boss_kelthuzad.cpp +++ b/scripts/northrend/naxxramas/boss_kelthuzad.cpp @@ -141,15 +141,6 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI } } } - - void JustSummoned(Unit *summoned) - { - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) - { - summoned->AddThreat(target, 1.0f); - summoned->GetMotionMaster()->MoveChase(target); - } - } void UpdateAI(const uint32 diff) { @@ -177,6 +168,9 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI { int i = irand(0,5); Unit *mob = m_creature->SummonCreature(CR_SKELETON, AddX[i], AddY[i], AddZ[i], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); + Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0); + mob->AddThreat(target, 1.0f); + mob->GetMotionMaster()->MoveChase(target); Skeleton_Timer = 5000; } else Skeleton_Timer -= diff; @@ -185,6 +179,9 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI { int i = irand(0,5); Unit *mob = m_creature->SummonCreature(CR_ABOMINATION, AddX[i], AddY[i], AddZ[i], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); + Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0); + mob->AddThreat(target, 1.0f); + mob->GetMotionMaster()->MoveChase(target); Abomination_Timer = Heroic ? (30000+rand()%15000) : (40000+rand()%15000); } else Abomination_Timer -= diff; @@ -193,6 +190,9 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI { int i = irand(0,5); Unit *mob = m_creature->SummonCreature(CR_BANSHEE, AddX[i], AddY[i], AddZ[i], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); + Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0); + mob->AddThreat(target, 1.0f); + mob->GetMotionMaster()->MoveChase(target); Banshee_Timer = Heroic ? (17000+rand()%10000) : (20000+rand()%15000); } else Banshee_Timer -= diff; @@ -260,6 +260,9 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI guard = DoSpawnCreature(CR_GUARDIAN, 40, 0, 5, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); if(guard) { + Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0); + guard->AddThreat(target, 1.0f); + guard->GetMotionMaster()->MoveChase(m_creature); Guardians[Guardian_Count] = guard->GetGUID(); Guardian_Count++; } From 75653cd999dac6ca6f682a42f16b78fc294d1ea8 Mon Sep 17 00:00:00 2001 From: Insider Date: Wed, 21 Oct 2009 00:22:26 +0800 Subject: [PATCH 012/405] Update for [patch 2] --- .../northrend/vault_of_archavon/boss_koralon.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/scripts/northrend/vault_of_archavon/boss_koralon.cpp b/scripts/northrend/vault_of_archavon/boss_koralon.cpp index a24b424d9..a20d205d5 100644 --- a/scripts/northrend/vault_of_archavon/boss_koralon.cpp +++ b/scripts/northrend/vault_of_archavon/boss_koralon.cpp @@ -43,7 +43,7 @@ struct MANGOS_DLL_DECL boss_koralonAI : public ScriptedAI { BurningBreathTimer = 25000; MeteorFistsTimer = 47000; - FlamesTimer = 12000; + FlamesTimer = 15000; BB = false; @@ -92,9 +92,14 @@ struct MANGOS_DLL_DECL boss_koralonAI : public ScriptedAI if(FlamesTimer < diff) { - Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); - if(target) DoCast(target, Heroic ? H_SP_CINDER : SP_CINDER); - FlamesTimer = 8000; + int flames = Heroic ? 5 : 3; + int i; + for(i=0; i< flames; ++i) + { + Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + if(target) DoCast(target, Heroic ? H_SP_CINDER : SP_CINDER); + } + FlamesTimer = 20000; } else FlamesTimer -= diff; From 90fe34cf7e1cd1bbae1c99275224f48e5da8f806 Mon Sep 17 00:00:00 2001 From: Insider Date: Thu, 22 Oct 2009 18:04:31 +0800 Subject: [PATCH 013/405] SD2 updated to 1480 --- base/escort_ai.cpp | 6 +- base/follower_ai.cpp | 6 +- include/sc_creature.cpp | 6 +- .../boss_emperor_dagran_thaurissan.cpp | 2 +- .../blackrock_spire/boss_gyth.cpp | 2 +- .../blackwing_lair/boss_vaelastrasz.cpp | 18 +- .../blackwing_lair/boss_victor_nefarius.cpp | 2 +- .../karazhan/boss_terestian_illhoof.cpp | 6 +- .../karazhan/bosses_opera.cpp | 2 +- .../boss_felblood_kaelthas.cpp | 4 +- .../boss_priestess_delrissa.cpp | 6 +- .../scarlet_enclave/ebon_hold.cpp | 2 +- .../sunwell_plateau/boss_kalecgos.cpp | 2 +- .../instance_sunwell_plateau.cpp | 2 +- scripts/eastern_kingdoms/westfall.cpp | 2 +- .../eastern_kingdoms/zulaman/boss_akilzon.cpp | 2 +- .../eastern_kingdoms/zulaman/boss_janalai.cpp | 8 +- .../zulaman/boss_malacrass.cpp | 6 +- .../eastern_kingdoms/zulgurub/boss_arlokk.cpp | 35 +- .../dark_portal/dark_portal.cpp | 2 +- .../dark_portal/instance_dark_portal.cpp | 4 +- .../temple_of_ahnqiraj/boss_sartura.cpp | 8 +- .../temple_of_ahnqiraj/boss_twinemperors.cpp | 2 +- scripts/northrend/naxxramas/boss_noth.cpp | 2 +- .../ulduar/halls_of_lightning/boss_ionar.cpp | 2 +- .../halls_of_lightning/boss_volkhan.cpp | 4 +- .../utgarde_keep/boss_keleseth.cpp | 4 +- scripts/outland/black_temple/boss_illidan.cpp | 2 +- .../black_temple/boss_reliquary_of_souls.cpp | 12 +- .../black_temple/boss_teron_gorefiend.cpp | 2 +- .../boss_fathomlord_karathress.cpp | 2 +- .../gruuls_lair/boss_high_king_maulgar.cpp | 4 +- .../shattered_halls/boss_nethekurse.cpp | 2 +- .../boss_warbringer_omrogg.cpp | 2 +- scripts/outland/netherstorm.cpp | 732 +++++++++--------- scripts/outland/shadowmoon_valley.cpp | 2 +- .../tempest_keep/arcatraz/arcatraz.cpp | 2 +- .../botanica/boss_warp_splinter.cpp | 2 +- .../tempest_keep/the_eye/boss_kaelthas.cpp | 8 +- sql/Updates/Makefile.am | 3 +- sql/Updates/r1478_scriptdev2.sql | 1 + sql/scriptdev2_script_full.sql | 2 +- 42 files changed, 470 insertions(+), 455 deletions(-) create mode 100644 sql/Updates/r1478_scriptdev2.sql diff --git a/base/escort_ai.cpp b/base/escort_ai.cpp index 548ce62c1..11bb5de22 100644 --- a/base/escort_ai.cpp +++ b/base/escort_ai.cpp @@ -47,7 +47,7 @@ void npc_escortAI::AttackStart(Unit* pWho) if (m_creature->Attack(pWho, true)) { - m_creature->AddThreat(pWho, 0.0f); + m_creature->AddThreat(pWho); m_creature->SetInCombatWith(pWho); pWho->SetInCombatWith(m_creature); @@ -101,7 +101,7 @@ bool npc_escortAI::AssistPlayerInCombat(Unit* pWho) else { pWho->SetInCombatWith(m_creature); - m_creature->AddThreat(pWho, 0.0f); + m_creature->AddThreat(pWho); return true; } } @@ -132,7 +132,7 @@ void npc_escortAI::MoveInLineOfSight(Unit* pWho) else if (m_creature->GetMap()->IsDungeon()) { pWho->SetInCombatWith(m_creature); - m_creature->AddThreat(pWho, 0.0f); + m_creature->AddThreat(pWho); } } } diff --git a/base/follower_ai.cpp b/base/follower_ai.cpp index 7320b24ea..252594d07 100644 --- a/base/follower_ai.cpp +++ b/base/follower_ai.cpp @@ -33,7 +33,7 @@ void FollowerAI::AttackStart(Unit* pWho) if (m_creature->Attack(pWho, true)) { - m_creature->AddThreat(pWho, 0.0f); + m_creature->AddThreat(pWho); m_creature->SetInCombatWith(pWho); pWho->SetInCombatWith(m_creature); @@ -77,7 +77,7 @@ bool FollowerAI::AssistPlayerInCombat(Unit* pWho) else { pWho->SetInCombatWith(m_creature); - m_creature->AddThreat(pWho, 0.0f); + m_creature->AddThreat(pWho); return true; } } @@ -108,7 +108,7 @@ void FollowerAI::MoveInLineOfSight(Unit* pWho) else if (m_creature->GetMap()->IsDungeon()) { pWho->SetInCombatWith(m_creature); - m_creature->AddThreat(pWho, 0.0f); + m_creature->AddThreat(pWho); } } } diff --git a/include/sc_creature.cpp b/include/sc_creature.cpp index db6a28d14..311ba5961 100644 --- a/include/sc_creature.cpp +++ b/include/sc_creature.cpp @@ -46,7 +46,7 @@ void ScriptedAI::MoveInLineOfSight(Unit* pWho) else if (m_creature->GetMap()->IsDungeon()) { pWho->SetInCombatWith(m_creature); - m_creature->AddThreat(pWho, 0.0f); + m_creature->AddThreat(pWho); } } } @@ -59,7 +59,7 @@ void ScriptedAI::AttackStart(Unit* pWho) if (m_creature->Attack(pWho, true)) { - m_creature->AddThreat(pWho, 0.0f); + m_creature->AddThreat(pWho); m_creature->SetInCombatWith(pWho); pWho->SetInCombatWith(m_creature); @@ -617,7 +617,7 @@ void Scripted_NoMovementAI::AttackStart(Unit* pWho) if (m_creature->Attack(pWho, true)) { - m_creature->AddThreat(pWho, 0.0f); + m_creature->AddThreat(pWho); m_creature->SetInCombatWith(pWho); pWho->SetInCombatWith(m_creature); diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp index 218d39a56..a0c919521 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp @@ -167,7 +167,7 @@ struct MANGOS_DLL_DECL boss_moira_bronzebeardAI : public ScriptedAI { if (m_creature->Attack(pWho, false)) { - m_creature->AddThreat(pWho, 0.0f); + m_creature->AddThreat(pWho); m_creature->SetInCombatWith(pWho); pWho->SetInCombatWith(m_creature); diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp index 86a14694c..1c35d6a78 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp @@ -83,7 +83,7 @@ struct MANGOS_DLL_DECL boss_gythAI : public ScriptedAI { Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0); if (target) - Summoned->AddThreat(target, 1.0f); + Summoned->AddThreat(target); } } diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp index 1833fc65f..2cbaeb3a1 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp @@ -42,7 +42,6 @@ struct MANGOS_DLL_DECL boss_vaelAI : public ScriptedAI { boss_vaelAI(Creature* pCreature) : ScriptedAI(pCreature) { - pCreature->SetUInt32Value(UNIT_NPC_FLAGS,1); pCreature->setFaction(35); pCreature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); Reset(); @@ -216,26 +215,25 @@ struct MANGOS_DLL_DECL boss_vaelAI : public ScriptedAI } }; -void SendDefaultMenu_boss_vael(Player* pPlayer, Creature* pCreature, uint32 uiAction) +bool GossipSelect_boss_vael(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) //Fight time { pPlayer->CLOSE_GOSSIP_MENU(); - ((boss_vaelAI*)pCreature->AI())->BeginSpeach((Unit*)pPlayer); - } -} -bool GossipSelect_boss_vael(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiSender == GOSSIP_SENDER_MAIN) - SendDefaultMenu_boss_vael(pPlayer, pCreature, uiAction); + if (boss_vaelAI* pVaelAI = dynamic_cast(pCreature->AI())) + pVaelAI->BeginSpeach((Unit*)pPlayer); + } return true; } bool GossipHello_boss_vael(Player* pPlayer, Creature* pCreature) { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); pPlayer->SEND_GOSSIP_MENU(907, pCreature->GetGUID()); return true; diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp index d61125954..becffee59 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp @@ -211,7 +211,7 @@ struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI if (who && who->GetTypeId() == TYPEID_PLAYER && m_creature->IsHostileTo(who)) { //Add them to our threat list - m_creature->AddThreat(who,0.0f); + m_creature->AddThreat(who); } } diff --git a/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp b/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp index 059b7131b..16dfec21f 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp @@ -94,7 +94,7 @@ struct MANGOS_DLL_DECL mob_kilrekAI : public ScriptedAI Creature* pTerestian = ((Creature*)Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_TERESTIAN))); if (pTerestian && (!pTerestian->SelectHostileTarget() && !pTerestian->getVictim())) - pTerestian->AddThreat(pWho, 1.0f); + pTerestian->AddThreat(pWho); } void JustDied(Unit* pKiller) @@ -224,7 +224,7 @@ struct MANGOS_DLL_DECL boss_terestianAI : public ScriptedAI // Put Kil'rek in combat against our target so players don't skip him if (pKilrek && !pKilrek->getVictim()) - pKilrek->AddThreat(pWho, 0.0f); + pKilrek->AddThreat(pWho); m_pInstance->SetData(TYPE_TERESTIAN, IN_PROGRESS); } @@ -339,7 +339,7 @@ struct MANGOS_DLL_DECL boss_terestianAI : public ScriptedAI Creature* pImp = m_creature->SummonCreature(NPC_FIENDISHIMP, afPortalLocations[uiRnd][0], afPortalLocations[uiRnd][1], PORTAL_Z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 15000); if (pImp) { - pImp->AddThreat(m_creature->getVictim(), 1.0f); + pImp->AddThreat(m_creature->getVictim()); if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1)) pImp->AI()->AttackStart(pTarget); } diff --git a/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp b/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp index 31390f76c..755624a88 100644 --- a/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp +++ b/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp @@ -1113,7 +1113,7 @@ struct MANGOS_DLL_DECL boss_romuloAI : public ScriptedAI Creature* Julianne = ((Creature*)Unit::GetUnit((*m_creature), JulianneGUID)); if (Julianne && Julianne->getVictim()) { - m_creature->AddThreat(Julianne->getVictim(), 1.0f); + m_creature->AddThreat(Julianne->getVictim()); } } } diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp index b68b4f829..9821f5dac 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp @@ -405,7 +405,7 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI if (Orb && target) { //SetThreatList(Orb); - Orb->AddThreat(target, 1.0f); + Orb->AddThreat(target); Orb->AI()->AttackStart(target); } @@ -596,7 +596,7 @@ struct MANGOS_DLL_DECL mob_arcane_sphereAI : public ScriptedAI Unit* target = NULL; target = SelectUnit(SELECT_TARGET_RANDOM,0); if (target) - m_creature->AddThreat(target, 1.0f); + m_creature->AddThreat(target); m_creature->TauntApply(target); AttackStart(target); diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp index 7a2976203..0cdc6dd84 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp @@ -141,7 +141,7 @@ struct MANGOS_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI if (!pAdd->getVictim()) { pWho->SetInCombatWith(pAdd); - pAdd->AddThreat(pWho, 0.0f); + pAdd->AddThreat(pWho); } } } @@ -382,7 +382,7 @@ struct MANGOS_DLL_DECL boss_priestess_lackey_commonAI : public ScriptedAI if (!pAdd->getVictim() && pAdd != m_creature) { pWho->SetInCombatWith(pAdd); - pAdd->AddThreat(pWho, 0.0f); + pAdd->AddThreat(pWho); } } } @@ -392,7 +392,7 @@ struct MANGOS_DLL_DECL boss_priestess_lackey_commonAI : public ScriptedAI if (pDelrissa->isAlive() && !pDelrissa->getVictim()) { pWho->SetInCombatWith(pDelrissa); - pDelrissa->AddThreat(pWho, 0.0f); + pDelrissa->AddThreat(pWho); } } } diff --git a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp index 6dc2e0749..aeb289b29 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp +++ b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp @@ -724,7 +724,7 @@ struct MANGOS_DLL_DECL npc_koltira_deathweaverAI : public npc_escortAI if (Player* pPlayer = GetPlayerForEscort()) { pSummoned->AI()->AttackStart(pPlayer); - pSummoned->AddThreat(m_creature, 0.0f); + pSummoned->AddThreat(m_creature); } if (pSummoned->GetEntry() == NPC_HIGH_INQUISITOR_VALROTH) diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp index 6dd078266..051172167 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp @@ -544,7 +544,7 @@ bool GOHello_go_spectral_rift(Player* pPlayer, GameObject* pGo) if (pSath->isAlive()) { debug_log("SD2: Adding %s in pSath' threatlist", pPlayer->GetName()); - pSath->AddThreat(pPlayer, 0.0f); + pSath->AddThreat(pPlayer); } } diff --git a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp index ee33ac1b1..3ebcdc53f 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp @@ -281,7 +281,7 @@ struct MANGOS_DLL_DECL instance_sunwell_plateau : public ScriptedInstance if (pKalecgos->isAlive()) { debug_log("SD2: Adding %s in Kalecgos' threatlist", pPlayer->GetName()); - pKalecgos->AddThreat(pPlayer, 0.0f); + pKalecgos->AddThreat(pPlayer); } } diff --git a/scripts/eastern_kingdoms/westfall.cpp b/scripts/eastern_kingdoms/westfall.cpp index 7515420f7..3848907a0 100644 --- a/scripts/eastern_kingdoms/westfall.cpp +++ b/scripts/eastern_kingdoms/westfall.cpp @@ -131,7 +131,7 @@ struct MANGOS_DLL_DECL npc_daphne_stilwellAI : public npc_escortAI if (m_creature->Attack(pWho, false)) { - m_creature->AddThreat(pWho, 0.0f); + m_creature->AddThreat(pWho); m_creature->SetInCombatWith(pWho); pWho->SetInCombatWith(m_creature); diff --git a/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp b/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp index 40abe4118..3cfb31942 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp @@ -225,7 +225,7 @@ struct MANGOS_DLL_DECL mob_soaring_eagleAI : public ScriptedAI if (m_creature->Attack(pWho, false)) { - m_creature->AddThreat(pWho, 0.0f); + m_creature->AddThreat(pWho); m_creature->SetInCombatWith(pWho); pWho->SetInCombatWith(m_creature); } diff --git a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp index cc0cfd0a7..f14e24ee9 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp @@ -531,7 +531,9 @@ struct MANGOS_DLL_DECL boss_janalaiAI : public ScriptedAI { if (hatchertime < diff) { - if (m_pInstance->GetData(DATA_J_EGGS_LEFT) > 0 || m_pInstance->GetData(DATA_J_EGGS_RIGHT) > 0) + if (!m_pInstance || (m_pInstance->GetData(DATA_J_EGGS_LEFT) == 0 && m_pInstance->GetData(DATA_J_EGGS_RIGHT) == 0)) + m_bIsEggRemaining = false; + else { DoScriptText(SAY_SUMMON_HATCHER, m_creature); @@ -552,8 +554,6 @@ struct MANGOS_DLL_DECL boss_janalaiAI : public ScriptedAI hatchertime = 90000; } - else - m_bIsEggRemaining = false; }else hatchertime -=diff; } @@ -631,7 +631,7 @@ struct MANGOS_DLL_DECL mob_amanishi_hatcherAI : public ScriptedAI if (m_creature->Attack(pWho, false)) { - m_creature->AddThreat(pWho, 0.0f); + m_creature->AddThreat(pWho); m_creature->SetInCombatWith(pWho); pWho->SetInCombatWith(m_creature); } diff --git a/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp b/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp index c545d5692..74600f685 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp @@ -441,7 +441,7 @@ struct MANGOS_DLL_DECL mob_alyson_antilleAI : public boss_malacrass_addAI if (m_creature->Attack(pWho, false)) { - m_creature->AddThreat(pWho, 0.0f); + m_creature->AddThreat(pWho); m_creature->SetInCombatWith(pWho); pWho->SetInCombatWith(m_creature); @@ -546,7 +546,7 @@ struct MANGOS_DLL_DECL mob_gazakrothAI : public boss_malacrass_addAI if (m_creature->Attack(pWho, false)) { - m_creature->AddThreat(pWho, 0.0f); + m_creature->AddThreat(pWho); m_creature->SetInCombatWith(pWho); pWho->SetInCombatWith(m_creature); @@ -696,7 +696,7 @@ struct MANGOS_DLL_DECL mob_slitherAI : public boss_malacrass_addAI if (m_creature->Attack(pWho, false)) { - m_creature->AddThreat(pWho, 0.0f); + m_creature->AddThreat(pWho); m_creature->SetInCombatWith(pWho); pWho->SetInCombatWith(m_creature); diff --git a/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp b/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp index 61bd2b02c..6ba07fd0d 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp @@ -76,7 +76,7 @@ struct MANGOS_DLL_DECL boss_arlokkAI : public ScriptedAI uint32 m_uiSummon_Timer; uint32 m_uiSummonCount; - Unit* m_pMarkedTarget; + uint64 m_uiMarkedGUID; bool m_bIsPhaseTwo; bool m_bIsVanished; @@ -96,7 +96,7 @@ struct MANGOS_DLL_DECL boss_arlokkAI : public ScriptedAI m_bIsPhaseTwo = false; m_bIsVanished = false; - m_pMarkedTarget = NULL; + m_uiMarkedGUID = 0; m_creature->SetDisplayId(MODEL_ID_NORMAL); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); @@ -129,8 +129,9 @@ struct MANGOS_DLL_DECL boss_arlokkAI : public ScriptedAI void DoSummonPhanters() { - if (m_pMarkedTarget) - DoScriptText(SAY_FEAST_PANTHER, m_creature, m_pMarkedTarget); + if (Unit* pUnit = Unit::GetUnit(*m_creature, m_uiMarkedGUID)) + if (pUnit->isAlive()) + DoScriptText(SAY_FEAST_PANTHER, m_creature, pUnit); m_creature->SummonCreature(NPC_ZULIAN_PROWLER, -11532.7998, -1649.6734, 41.4800, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); m_creature->SummonCreature(NPC_ZULIAN_PROWLER, -11532.9970, -1606.4840, 41.2979, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); @@ -138,8 +139,9 @@ struct MANGOS_DLL_DECL boss_arlokkAI : public ScriptedAI void JustSummoned(Creature* pSummoned) { - if (m_pMarkedTarget) - pSummoned->AI()->AttackStart(m_pMarkedTarget); + if (Unit* pUnit = Unit::GetUnit(*m_creature, m_uiMarkedGUID)) + if (pUnit->isAlive()) + pSummoned->AI()->AttackStart(pUnit); ++m_uiSummonCount; } @@ -161,12 +163,21 @@ struct MANGOS_DLL_DECL boss_arlokkAI : public ScriptedAI if (m_uiMark_Timer < uiDiff) { - m_pMarkedTarget = SelectUnit(SELECT_TARGET_RANDOM,0); - - if (m_pMarkedTarget) - DoCast(m_pMarkedTarget, SPELL_MARK); - else - error_log("SD2: boss_arlokk could not accuire m_pMarkedTarget."); + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + { + if (Player* pMark = pTarget->GetCharmerOrOwnerPlayerOrPlayerItself()) + { + DoCast(pMark, SPELL_MARK); + m_uiMarkedGUID = pMark->GetGUID(); + } + else + { + if (m_uiMarkedGUID) + m_uiMarkedGUID = 0; + + error_log("SD2: boss_arlokk could not accuire a new target to mark."); + } + } m_uiMark_Timer = 15000; } diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp index 0ffd791ee..587b55279 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp @@ -301,7 +301,7 @@ struct MANGOS_DLL_DECL npc_time_riftAI : public ScriptedAI if (Summon) { if (Unit *temp = Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_MEDIVH))) - Summon->AddThreat(temp,0.0f); + Summon->AddThreat(temp); } } diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp index 38572be26..cbefd3be6 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp @@ -287,11 +287,11 @@ struct MANGOS_DLL_DECL instance_dark_portal : public ScriptedInstance { if (pBoss->GetEntry() == NPC_AEONUS) { - pBoss->AddThreat(pMedivh,0.0f); + pBoss->AddThreat(pMedivh); } else { - pBoss->AddThreat(pTemp,0.0f); + pBoss->AddThreat(pTemp); pTemp->CastSpell(pBoss,SPELL_RIFT_CHANNEL,false); } } diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp index 78ffb7f24..3348b78a4 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp @@ -96,7 +96,7 @@ struct MANGOS_DLL_DECL boss_sarturaAI : public ScriptedAI Unit* target = NULL; target = SelectUnit(SELECT_TARGET_RANDOM,1); if (target) - m_creature->AddThreat(target, 1.0f); + m_creature->AddThreat(target); m_creature->TauntApply(target); AttackStart(target); @@ -125,7 +125,7 @@ struct MANGOS_DLL_DECL boss_sarturaAI : public ScriptedAI Unit* target = NULL; target = SelectUnit(SELECT_TARGET_RANDOM,1); if (target) - m_creature->AddThreat(target, 1.0f); + m_creature->AddThreat(target); m_creature->TauntApply(target); AttackStart(target); @@ -217,7 +217,7 @@ struct MANGOS_DLL_DECL mob_sartura_royal_guardAI : public ScriptedAI Unit* target = NULL; target = SelectUnit(SELECT_TARGET_RANDOM,1); if (target) - m_creature->AddThreat(target, 1.0f); + m_creature->AddThreat(target); m_creature->TauntApply(target); AttackStart(target); @@ -238,7 +238,7 @@ struct MANGOS_DLL_DECL mob_sartura_royal_guardAI : public ScriptedAI Unit* target = NULL; target = SelectUnit(SELECT_TARGET_RANDOM,1); if (target) - m_creature->AddThreat(target, 1.0f); + m_creature->AddThreat(target); m_creature->TauntApply(target); AttackStart(target); diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp index 8b92b8f72..d715e8337 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp @@ -633,7 +633,7 @@ struct MANGOS_DLL_DECL boss_veklorAI : public boss_twinemperorsAI // VL doesn't melee if (m_creature->Attack(who, false)) { - m_creature->AddThreat(who, 0.0f); + m_creature->AddThreat(who); m_creature->SetInCombatWith(who); who->SetInCombatWith(m_creature); diff --git a/scripts/northrend/naxxramas/boss_noth.cpp b/scripts/northrend/naxxramas/boss_noth.cpp index d0fc9d926..f4c1041cc 100644 --- a/scripts/northrend/naxxramas/boss_noth.cpp +++ b/scripts/northrend/naxxramas/boss_noth.cpp @@ -106,7 +106,7 @@ struct MANGOS_DLL_DECL boss_nothAI : public ScriptedAI void JustSummoned(Creature* summoned) { if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) - summoned->AddThreat(target,0.0f); + summoned->AddThreat(target, 0.0f); } void KilledUnit(Unit* victim) diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp index 606254d4a..181b2e856 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp @@ -127,7 +127,7 @@ struct MANGOS_DLL_DECL boss_ionarAI : public ScriptedAI { if (m_creature->Attack(pWho, true)) { - m_creature->AddThreat(pWho, 0.0f); + m_creature->AddThreat(pWho); m_creature->SetInCombatWith(pWho); pWho->SetInCombatWith(m_creature); diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp index 3ca16d0b7..88aeb6f57 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp @@ -125,7 +125,7 @@ struct MANGOS_DLL_DECL boss_volkhanAI : public ScriptedAI { if (m_creature->Attack(pWho, true)) { - m_creature->AddThreat(pWho, 0.0f); + m_creature->AddThreat(pWho); m_creature->SetInCombatWith(pWho); pWho->SetInCombatWith(m_creature); @@ -383,7 +383,7 @@ struct MANGOS_DLL_DECL mob_molten_golemAI : public ScriptedAI { if (m_creature->Attack(pWho, true)) { - m_creature->AddThreat(pWho, 0.0f); + m_creature->AddThreat(pWho); m_creature->SetInCombatWith(pWho); pWho->SetInCombatWith(m_creature); diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp index 8bf7e568c..e0b0048a0 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp @@ -214,7 +214,7 @@ struct MANGOS_DLL_DECL boss_kelesethAI : public ScriptedAI { if (m_creature->Attack(pWho, true)) { - m_creature->AddThreat(pWho, 0.0f); + m_creature->AddThreat(pWho); m_creature->SetInCombatWith(pWho); pWho->SetInCombatWith(m_creature); @@ -286,7 +286,7 @@ struct MANGOS_DLL_DECL boss_kelesethAI : public ScriptedAI if (Creature* pFrostTomb = m_creature->SummonCreature(NPC_FROST_TOMB, fPosX, fPosY, fPosZ, 0, TEMPSUMMON_TIMED_DESPAWN, 20000)) { - pFrostTomb->AddThreat(pTombTarget, 0.0); + pFrostTomb->AddThreat(pTombTarget); pFrostTomb->CastSpell(pTombTarget, SPELL_FROST_TOMB, false); } diff --git a/scripts/outland/black_temple/boss_illidan.cpp b/scripts/outland/black_temple/boss_illidan.cpp index 485d86b9b..815fc87d0 100644 --- a/scripts/outland/black_temple/boss_illidan.cpp +++ b/scripts/outland/black_temple/boss_illidan.cpp @@ -1004,7 +1004,7 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI if (m_creature->Attack(who, true)) { - m_creature->AddThreat(who, 0.0f); + m_creature->AddThreat(who); m_creature->SetInCombatWith(who); who->SetInCombatWith(m_creature); diff --git a/scripts/outland/black_temple/boss_reliquary_of_souls.cpp b/scripts/outland/black_temple/boss_reliquary_of_souls.cpp index 0de30b311..11f9eac1d 100644 --- a/scripts/outland/black_temple/boss_reliquary_of_souls.cpp +++ b/scripts/outland/black_temple/boss_reliquary_of_souls.cpp @@ -221,7 +221,7 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE,375); SummonEssenceTimer = 8000; AnimationTimer = 5100; - m_creature->AddThreat(who, 1.0f); + m_creature->AddThreat(who); } } } @@ -239,7 +239,7 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI { ((npc_enslaved_soulAI*)Soul->AI())->ReliquaryGUID = m_creature->GetGUID(); Soul->CastSpell(Soul, ENSLAVED_SOUL_PASSIVE, true); - Soul->AddThreat(target, 1.0f); + Soul->AddThreat(target); ++SoulCount; } } @@ -256,7 +256,7 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI Unit* pUnit = Unit::GetUnit((*m_creature), (*itr)->getUnitGuid()); if (pUnit) { - m_creature->AddThreat(pUnit, 1.0f); // This is so that we make sure the unit is in Reliquary's threat list before we reset the unit's threat. + m_creature->AddThreat(pUnit); // This is so that we make sure the unit is in Reliquary's threat list before we reset the unit's threat. m_creature->getThreatManager().modifyThreatPercent(pUnit, -100); float threat = target->getThreatManager().getThreat(pUnit); m_creature->AddThreat(pUnit, threat); // This makes it so that the unit has the same amount of threat in Reliquary's threatlist as in the target creature's (One of the Essences). @@ -301,7 +301,7 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI if (Unit* target = SelectUnit(SELECT_TARGET_TOPAGGRO, 0)) { - EssenceSuffering->AddThreat(target, 1.0f); + EssenceSuffering->AddThreat(target); EssenceSuffering->AI()->AttackStart(target); } @@ -405,7 +405,7 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0)) { - EssenceDesire->AddThreat(target, 1.0f); + EssenceDesire->AddThreat(target); EssenceDesire->AI()->AttackStart(target); } @@ -511,7 +511,7 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI { if (Unit* target = SelectUnit(SELECT_TARGET_TOPAGGRO, 0)) { - EssenceAnger->AddThreat(target, 1.0f); + EssenceAnger->AddThreat(target); EssenceAnger->AI()->AttackStart(target); } diff --git a/scripts/outland/black_temple/boss_teron_gorefiend.cpp b/scripts/outland/black_temple/boss_teron_gorefiend.cpp index 722c3811c..a6adac354 100644 --- a/scripts/outland/black_temple/boss_teron_gorefiend.cpp +++ b/scripts/outland/black_temple/boss_teron_gorefiend.cpp @@ -410,7 +410,7 @@ struct MANGOS_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI { DoomBlossom->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); DoomBlossom->setFaction(m_creature->getFaction()); - DoomBlossom->AddThreat(target, 1.0f); + DoomBlossom->AddThreat(target); ((mob_doom_blossomAI*)DoomBlossom->AI())->SetTeronGUID(m_creature->GetGUID()); SetThreatList(DoomBlossom); diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp index 6021c7ab9..38c6bd5d6 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp @@ -338,7 +338,7 @@ struct MANGOS_DLL_DECL boss_fathomguard_sharkkisAI : public Advisor_Base_AI if (m_creature->Attack(pWho, false)) { - m_creature->AddThreat(pWho, 0.0f); + m_creature->AddThreat(pWho); m_creature->SetInCombatWith(pWho); pWho->SetInCombatWith(m_creature); diff --git a/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp b/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp index 1b50e6497..52df71274 100644 --- a/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp +++ b/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp @@ -394,7 +394,7 @@ struct MANGOS_DLL_DECL boss_kiggler_the_crazedAI : public Council_Base_AI if (m_creature->Attack(pWho, false)) { - m_creature->AddThreat(pWho, 0.0f); + m_creature->AddThreat(pWho); m_creature->SetInCombatWith(pWho); pWho->SetInCombatWith(m_creature); @@ -538,7 +538,7 @@ struct MANGOS_DLL_DECL boss_krosh_firehandAI : public Council_Base_AI if (m_creature->Attack(pWho, true)) { - m_creature->AddThreat(pWho, 0.0f); + m_creature->AddThreat(pWho); m_creature->SetInCombatWith(pWho); pWho->SetInCombatWith(m_creature); diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp index e30463243..28bdb68e7 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp @@ -169,7 +169,7 @@ struct MANGOS_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI if (m_creature->Attack(who, true)) { - m_creature->AddThreat(who, 0.0f); + m_creature->AddThreat(who); m_creature->SetInCombatWith(who); who->SetInCombatWith(m_creature); diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp index 68e1ce708..528d1fb60 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp @@ -360,7 +360,7 @@ struct MANGOS_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI { DoYellForThreat(); DoResetThreat(); - m_creature->AddThreat(target, 0.0f); + m_creature->AddThreat(target); } m_uiResetThreat_Timer = urand(25000, 40000); }else m_uiResetThreat_Timer -= uiDiff; diff --git a/scripts/outland/netherstorm.cpp b/scripts/outland/netherstorm.cpp index dfb23644f..5affb6f13 100644 --- a/scripts/outland/netherstorm.cpp +++ b/scripts/outland/netherstorm.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Netherstorm SD%Complete: 80 -SDComment: Quest support: 10438, 10652 (special flight paths), 10299,10321,10322,10323,10329,10330,10338,10365(Shutting Down Manaforge), 10198 +SDComment: Quest support: 10438, 10652 (special flight paths), 10299, 10321, 10322, 10323, 10329, 10330, 10338, 10365(Shutting Down Manaforge), 10198 SDCategory: Netherstorm EndScriptData */ @@ -34,51 +34,65 @@ EndContentData */ /*###### ## npc_manaforge_control_console ######*/ - -#define EMOTE_START -1000211 -#define EMOTE_60 -1000212 -#define EMOTE_30 -1000213 -#define EMOTE_10 -1000214 -#define EMOTE_COMPLETE -1000215 -#define EMOTE_ABORT -1000216 - -#define ENTRY_BNAAR_C_CONSOLE 20209 -#define ENTRY_CORUU_C_CONSOLE 20417 -#define ENTRY_DURO_C_CONSOLE 20418 -#define ENTRY_ARA_C_CONSOLE 20440 - -#define ENTRY_SUNFURY_TECH 20218 -#define ENTRY_SUNFURY_PROT 20436 - -#define ENTRY_ARA_TECH 20438 -#define ENTRY_ARA_ENGI 20439 -#define ENTRY_ARA_GORKLONN 20460 - -#define SPELL_DISABLE_VISUAL 35031 -#define SPELL_INTERRUPT_1 35016 //ACID mobs should cast this -#define SPELL_INTERRUPT_2 35176 //ACID mobs should cast this (Manaforge Ara-version) +enum +{ + EMOTE_START = -1000211, + EMOTE_60 = -1000212, + EMOTE_30 = -1000213, + EMOTE_10 = -1000214, + EMOTE_COMPLETE = -1000215, + EMOTE_ABORT = -1000216, + + NPC_BNAAR_C_CONSOLE = 20209, + NPC_CORUU_C_CONSOLE = 20417, + NPC_DURO_C_CONSOLE = 20418, + NPC_ARA_C_CONSOLE = 20440, + + NPC_SUNFURY_TECH = 20218, + NPC_SUNFURY_PROT = 20436, + + NPC_ARA_TECH = 20438, + NPC_ARA_ENGI = 20439, + NPC_ARA_GORKLONN = 20460, + + QUEST_SHUTDOWN_BNAAR_ALDOR = 10299, + QUEST_SHUTDOWN_BNAAR_SCRYERS = 10329, + QUEST_SHUTDOWN_CORUU_ALDOR = 10321, + QUEST_SHUTDOWN_CORUU_SCRYERS = 10330, + QUEST_SHUTDOWN_DURO_ALDOR = 10322, + QUEST_SHUTDOWN_DURO_SCRYERS = 10338, + QUEST_SHUTDOWN_ARA_ALDOR = 10323, + QUEST_SHUTDOWN_ARA_SCRYERS = 10365, + + ITEM_BNAAR_ACESS_CRYSTAL = 29366, + ITEM_CORUU_ACESS_CRYSTAL = 29396, + ITEM_DURO_ACESS_CRYSTAL = 29397, + ITEM_ARA_ACESS_CRYSTAL = 29411, + + SPELL_DISABLE_VISUAL = 35031, + SPELL_INTERRUPT_1 = 35016, // ACID mobs should cast this + SPELL_INTERRUPT_2 = 35176, // ACID mobs should cast this (Manaforge Ara-version) +}; struct MANGOS_DLL_DECL npc_manaforge_control_consoleAI : public ScriptedAI { npc_manaforge_control_consoleAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - uint32 Event_Timer; - uint32 Wave_Timer; - uint32 Phase; - bool Wave; - uint64 someplayer; - uint64 goConsole; - Creature* add; + uint64 m_uiPlayerGUID; + uint64 m_uiConsoleGUID; + uint32 m_uiEventTimer; + uint32 m_uiWaveTimer; + uint32 m_uiPhase; + bool m_bWave; void Reset() { - Event_Timer = 3000; - Wave_Timer = 0; - Phase = 1; - Wave = false; - someplayer = 0; - goConsole = 0; - Creature* add = NULL; + m_uiPlayerGUID = 0; + m_uiConsoleGUID = 0; + m_uiEventTimer = 3000; + m_uiWaveTimer = 0; + m_uiPhase = 1; + m_bWave = false; } /*void SpellHit(Unit *caster, const SpellEntry *spell) @@ -89,191 +103,199 @@ struct MANGOS_DLL_DECL npc_manaforge_control_consoleAI : public ScriptedAI ... }*/ - void JustDied(Unit* killer) + void JustDied(Unit* pKiller) { DoScriptText(EMOTE_ABORT, m_creature); - if (someplayer) + if (m_uiPlayerGUID) { - Unit* p = Unit::GetUnit((*m_creature),someplayer); - if (p && p->GetTypeId() == TYPEID_PLAYER) + Unit* pPlayer = Unit::GetUnit((*m_creature), m_uiPlayerGUID); + if (pPlayer && pPlayer->GetTypeId() == TYPEID_PLAYER) { switch(m_creature->GetEntry()) { - case ENTRY_BNAAR_C_CONSOLE: - ((Player*)p)->FailQuest(10299); - ((Player*)p)->FailQuest(10329); + case NPC_BNAAR_C_CONSOLE: + ((Player*)pPlayer)->FailQuest(QUEST_SHUTDOWN_BNAAR_ALDOR); + ((Player*)pPlayer)->FailQuest(QUEST_SHUTDOWN_BNAAR_SCRYERS); break; - case ENTRY_CORUU_C_CONSOLE: - ((Player*)p)->FailQuest(10321); - ((Player*)p)->FailQuest(10330); + case NPC_CORUU_C_CONSOLE: + ((Player*)pPlayer)->FailQuest(QUEST_SHUTDOWN_CORUU_ALDOR); + ((Player*)pPlayer)->FailQuest(QUEST_SHUTDOWN_CORUU_SCRYERS); break; - case ENTRY_DURO_C_CONSOLE: - ((Player*)p)->FailQuest(10322); - ((Player*)p)->FailQuest(10338); + case NPC_DURO_C_CONSOLE: + ((Player*)pPlayer)->FailQuest(QUEST_SHUTDOWN_DURO_ALDOR); + ((Player*)pPlayer)->FailQuest(QUEST_SHUTDOWN_DURO_SCRYERS); break; - case ENTRY_ARA_C_CONSOLE: - ((Player*)p)->FailQuest(10323); - ((Player*)p)->FailQuest(10365); + case NPC_ARA_C_CONSOLE: + ((Player*)pPlayer)->FailQuest(QUEST_SHUTDOWN_ARA_ALDOR); + ((Player*)pPlayer)->FailQuest(QUEST_SHUTDOWN_ARA_SCRYERS); break; } } } - if (goConsole) + if (m_uiConsoleGUID) { - if (GameObject* pGo = m_creature->GetMap()->GetGameObject(goConsole)) + if (GameObject* pGo = m_creature->GetMap()->GetGameObject(m_uiConsoleGUID)) pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE); } } void DoWaveSpawnForCreature(Creature* pCreature) { + Creature* pAdd = NULL; + switch(pCreature->GetEntry()) { - case ENTRY_BNAAR_C_CONSOLE: + case NPC_BNAAR_C_CONSOLE: if (urand(0, 1)) { - add = m_creature->SummonCreature(ENTRY_SUNFURY_TECH,2933.68,4162.55,164.00,1.60,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000); - if (add) add->GetMotionMaster()->MovePoint(0,2927.36,4212.97,164.00); + if (pAdd = m_creature->SummonCreature(NPC_SUNFURY_TECH, 2933.68, 4162.55, 164.00, 1.60, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000)) + pAdd->GetMotionMaster()->MovePoint(0, 2927.36, 4212.97, 164.00); } else { - add = m_creature->SummonCreature(ENTRY_SUNFURY_TECH,2927.36,4212.97,164.00,4.94,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000); - if (add) add->GetMotionMaster()->MovePoint(0,2933.68,4162.55,164.00); + if (pAdd = m_creature->SummonCreature(NPC_SUNFURY_TECH, 2927.36, 4212.97, 164.00, 4.94, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000)) + pAdd->GetMotionMaster()->MovePoint(0, 2933.68, 4162.55, 164.00); } - Wave_Timer = 30000; + m_uiWaveTimer = 30000; break; - case ENTRY_CORUU_C_CONSOLE: - add = m_creature->SummonCreature(ENTRY_SUNFURY_TECH,2445.21,2765.26,134.49,3.93,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000); - if (add) add->GetMotionMaster()->MovePoint(0,2424.21,2740.15,133.81); - add = m_creature->SummonCreature(ENTRY_SUNFURY_TECH,2429.86,2731.85,134.53,1.31,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000); - if (add) add->GetMotionMaster()->MovePoint(0,2435.37,2766.04,133.81); - Wave_Timer = 20000; + case NPC_CORUU_C_CONSOLE: + if (pAdd = m_creature->SummonCreature(NPC_SUNFURY_TECH, 2445.21, 2765.26, 134.49, 3.93, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000)) + pAdd->GetMotionMaster()->MovePoint(0, 2424.21, 2740.15, 133.81); + if (pAdd = m_creature->SummonCreature(NPC_SUNFURY_TECH, 2429.86, 2731.85, 134.53, 1.31, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000)) + pAdd->GetMotionMaster()->MovePoint(0, 2435.37, 2766.04, 133.81); + m_uiWaveTimer = 20000; break; - case ENTRY_DURO_C_CONSOLE: - add = m_creature->SummonCreature(ENTRY_SUNFURY_TECH,2986.80,2205.36,165.37,3.74,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000); - if (add) add->GetMotionMaster()->MovePoint(0,2985.15,2197.32,164.79); - add = m_creature->SummonCreature(ENTRY_SUNFURY_TECH,2952.91,2191.20,165.32,0.22,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000); - if (add) add->GetMotionMaster()->MovePoint(0,2060.01,2185.27,164.67); - Wave_Timer = 15000; + case NPC_DURO_C_CONSOLE: + if (pAdd = m_creature->SummonCreature(NPC_SUNFURY_TECH, 2986.80, 2205.36, 165.37, 3.74, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000)) + pAdd->GetMotionMaster()->MovePoint(0, 2985.15, 2197.32, 164.79); + if (pAdd = m_creature->SummonCreature(NPC_SUNFURY_TECH, 2952.91, 2191.20, 165.32, 0.22, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000)) + pAdd->GetMotionMaster()->MovePoint(0, 2060.01, 2185.27, 164.67); + m_uiWaveTimer = 15000; break; - case ENTRY_ARA_C_CONSOLE: + case NPC_ARA_C_CONSOLE: if (urand(0, 1)) { - add = m_creature->SummonCreature(ENTRY_ARA_TECH,4035.11,4038.97,194.27,2.57,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000); - if (add) add->GetMotionMaster()->MovePoint(0,4003.42,4040.19,193.49); - add = m_creature->SummonCreature(ENTRY_ARA_TECH,4033.66,4036.79,194.28,2.57,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000); - if (add) add->GetMotionMaster()->MovePoint(0,4003.42,4040.19,193.49); - add = m_creature->SummonCreature(ENTRY_ARA_TECH,4037.13,4037.30,194.23,2.57,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000); - if (add) add->GetMotionMaster()->MovePoint(0,4003.42,4040.19,193.49); + if (pAdd = m_creature->SummonCreature(NPC_ARA_TECH, 4035.11, 4038.97, 194.27, 2.57, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000)) + pAdd->GetMotionMaster()->MovePoint(0, 4003.42, 4040.19, 193.49); + if (pAdd = m_creature->SummonCreature(NPC_ARA_TECH, 4033.66, 4036.79, 194.28, 2.57, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000)) + pAdd->GetMotionMaster()->MovePoint(0, 4003.42, 4040.19, 193.49); + if (pAdd = m_creature->SummonCreature(NPC_ARA_TECH, 4037.13, 4037.30, 194.23, 2.57, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000)) + pAdd->GetMotionMaster()->MovePoint(0, 4003.42, 4040.19, 193.49); } else { - add = m_creature->SummonCreature(ENTRY_ARA_TECH,3099.59,4049.30,194.22,0.05,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000); - if (add) add->GetMotionMaster()->MovePoint(0,4028.01,4035.17,193.59); - add = m_creature->SummonCreature(ENTRY_ARA_TECH,3999.72,4046.75,194.22,0.05,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000); - if (add) add->GetMotionMaster()->MovePoint(0,4028.01,4035.17,193.59); - add = m_creature->SummonCreature(ENTRY_ARA_TECH,3996.81,4048.26,194.22,0.05,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000); - if (add) add->GetMotionMaster()->MovePoint(0,4028.01,4035.17,193.59); + if (pAdd = m_creature->SummonCreature(NPC_ARA_TECH, 3099.59, 4049.30, 194.22, 0.05, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000)) + pAdd->GetMotionMaster()->MovePoint(0, 4028.01, 4035.17, 193.59); + if (pAdd = m_creature->SummonCreature(NPC_ARA_TECH, 3999.72, 4046.75, 194.22, 0.05, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000)) + pAdd->GetMotionMaster()->MovePoint(0, 4028.01, 4035.17, 193.59); + if (pAdd = m_creature->SummonCreature(NPC_ARA_TECH, 3996.81, 4048.26, 194.22, 0.05, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000)) + pAdd->GetMotionMaster()->MovePoint(0, 4028.01, 4035.17, 193.59); } - Wave_Timer = 15000; + m_uiWaveTimer = 15000; break; } } + void DoFinalSpawnForCreature(Creature* pCreature) { + Creature* pAdd = NULL; + switch(pCreature->GetEntry()) { - case ENTRY_BNAAR_C_CONSOLE: - add = m_creature->SummonCreature(ENTRY_SUNFURY_TECH,2946.52,4201.42,163.47,3.54,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000); - if (add) add->GetMotionMaster()->MovePoint(0,2927.49,4192.81,163.00); + case NPC_BNAAR_C_CONSOLE: + if (pAdd = m_creature->SummonCreature(NPC_SUNFURY_TECH, 2946.52, 4201.42, 163.47, 3.54, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000)) + pAdd->GetMotionMaster()->MovePoint(0, 2927.49, 4192.81, 163.00); break; - case ENTRY_CORUU_C_CONSOLE: - add = m_creature->SummonCreature(ENTRY_SUNFURY_TECH,2453.88,2737.85,133.27,2.59,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000); - if (add) add->GetMotionMaster()->MovePoint(0,2433.96,2751.53,133.85); - add = m_creature->SummonCreature(ENTRY_SUNFURY_TECH,2441.62,2735.32,134.49,1.97,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000); - if (add) add->GetMotionMaster()->MovePoint(0,2433.96,2751.53,133.85); - add = m_creature->SummonCreature(ENTRY_SUNFURY_TECH,2450.73,2754.50,134.49,3.29,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000); - if (add) add->GetMotionMaster()->MovePoint(0,2433.96,2751.53,133.85); + case NPC_CORUU_C_CONSOLE: + if (pAdd = m_creature->SummonCreature(NPC_SUNFURY_TECH, 2453.88, 2737.85, 133.27, 2.59, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000)) + pAdd->GetMotionMaster()->MovePoint(0, 2433.96, 2751.53, 133.85); + if (pAdd = m_creature->SummonCreature(NPC_SUNFURY_TECH, 2441.62, 2735.32, 134.49, 1.97, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000)) + pAdd->GetMotionMaster()->MovePoint(0, 2433.96, 2751.53, 133.85); + if (pAdd = m_creature->SummonCreature(NPC_SUNFURY_TECH, 2450.73, 2754.50, 134.49, 3.29, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000)) + pAdd->GetMotionMaster()->MovePoint(0, 2433.96, 2751.53, 133.85); break; - case ENTRY_DURO_C_CONSOLE: - add = m_creature->SummonCreature(ENTRY_SUNFURY_TECH,2956.18,2202.85,165.32,5.45,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000); - if (add) add->GetMotionMaster()->MovePoint(0,2972.27,2193.22,164.48); - add = m_creature->SummonCreature(ENTRY_SUNFURY_TECH,2975.30,2211.50,165.32,4.55,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000); - if (add) add->GetMotionMaster()->MovePoint(0,2972.27,2193.22,164.48); - add = m_creature->SummonCreature(ENTRY_SUNFURY_PROT,2965.02,2217.45,164.16,4.96,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000); - if (add) add->GetMotionMaster()->MovePoint(0,2972.27,2193.22,164.48); + case NPC_DURO_C_CONSOLE: + if (pAdd = m_creature->SummonCreature(NPC_SUNFURY_TECH, 2956.18, 2202.85, 165.32, 5.45, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000)) + pAdd->GetMotionMaster()->MovePoint(0, 2972.27, 2193.22, 164.48); + if (pAdd = m_creature->SummonCreature(NPC_SUNFURY_TECH, 2975.30, 2211.50, 165.32, 4.55, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000)) + pAdd->GetMotionMaster()->MovePoint(0, 2972.27, 2193.22, 164.48); + if (pAdd = m_creature->SummonCreature(NPC_SUNFURY_PROT, 2965.02, 2217.45, 164.16, 4.96, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000)) + pAdd->GetMotionMaster()->MovePoint(0, 2972.27, 2193.22, 164.48); break; - case ENTRY_ARA_C_CONSOLE: - add = m_creature->SummonCreature(ENTRY_ARA_ENGI,3994.51,4020.46,192.18,0.91,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000); - if (add) add->GetMotionMaster()->MovePoint(0,4008.35,4035.04,192.70); - add = m_creature->SummonCreature(ENTRY_ARA_GORKLONN,4021.56,4059.35,193.59,4.44,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000); - if (add) add->GetMotionMaster()->MovePoint(0,4016.62,4039.89,193.46); + case NPC_ARA_C_CONSOLE: + if (pAdd = m_creature->SummonCreature(NPC_ARA_ENGI, 3994.51, 4020.46, 192.18, 0.91, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000)) + pAdd->GetMotionMaster()->MovePoint(0, 4008.35 ,4035.04, 192.70); + if (pAdd = m_creature->SummonCreature(NPC_ARA_GORKLONN, 4021.56, 4059.35, 193.59, 4.44, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000)) + pAdd->GetMotionMaster()->MovePoint(0, 4016.62, 4039.89, 193.46); break; } } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - if (Event_Timer < diff) + if (m_uiEventTimer < uiDiff) { - Unit *playertarget = NULL; + if (!m_uiPlayerGUID) + return; - if (someplayer) - { - playertarget = Unit::GetUnit((*m_creature),someplayer); - if (!playertarget) - return; - if (playertarget->GetTypeId() != TYPEID_PLAYER) - return; - }else return; - - switch(Phase) + Unit* pPlayer = Unit::GetUnit((*m_creature), m_uiPlayerGUID); + if (!pPlayer) + return; + + if (pPlayer->GetTypeId() != TYPEID_PLAYER) + return; + + switch(m_uiPhase) { case 1: - DoScriptText(EMOTE_START, m_creature, playertarget); - Event_Timer = 60000; - Wave = true; - ++Phase; + DoScriptText(EMOTE_START, m_creature, pPlayer); + m_uiEventTimer = 60000; + m_bWave = true; + ++m_uiPhase; break; case 2: - DoScriptText(EMOTE_60, m_creature, playertarget); - Event_Timer = 30000; - ++Phase; + DoScriptText(EMOTE_60, m_creature, pPlayer); + m_uiEventTimer = 30000; + ++m_uiPhase; break; case 3: - DoScriptText(EMOTE_30, m_creature, playertarget); - Event_Timer = 20000; + DoScriptText(EMOTE_30, m_creature, pPlayer); + m_uiEventTimer = 20000; DoFinalSpawnForCreature(m_creature); - ++Phase; + ++m_uiPhase; break; case 4: - DoScriptText(EMOTE_10, m_creature, playertarget); - Event_Timer = 10000; - Wave = false; - ++Phase; + DoScriptText(EMOTE_10, m_creature, pPlayer); + m_uiEventTimer = 10000; + m_bWave = false; + ++m_uiPhase; break; case 5: - DoScriptText(EMOTE_COMPLETE, m_creature, playertarget); - ((Player*)playertarget)->KilledMonsterCredit(m_creature->GetEntry(),m_creature->GetGUID()); - DoCast(m_creature,SPELL_DISABLE_VISUAL); - if (goConsole) + DoScriptText(EMOTE_COMPLETE, m_creature, pPlayer); + ((Player*)pPlayer)->KilledMonsterCredit(m_creature->GetEntry(), m_creature->GetGUID()); + DoCast(m_creature, SPELL_DISABLE_VISUAL); + if (m_uiConsoleGUID) { - if (GameObject* pGo = m_creature->GetMap()->GetGameObject(goConsole)) + if (GameObject* pGo = m_creature->GetMap()->GetGameObject(m_uiConsoleGUID)) pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE); } - ++Phase; + ++m_uiPhase; break; } - } else Event_Timer -= diff; + } + else + m_uiEventTimer -= uiDiff; - if (Wave) + if (m_bWave) { - if (Wave_Timer < diff) + if (m_uiWaveTimer < uiDiff) { DoWaveSpawnForCreature(m_creature); - } else Wave_Timer -= diff; + } + else + m_uiWaveTimer -= uiDiff; } } }; @@ -286,7 +308,7 @@ CreatureAI* GetAI_npc_manaforge_control_console(Creature* pCreature) ## go_manaforge_control_console ######*/ -//TODO: clean up this workaround when mangos adds support to do it properly (with gossip selections instead of instant summon) +// TODO: clean up this workaround when mangos adds support to do it properly (with gossip selections instead of instant summon) bool GOHello_go_manaforge_control_console(Player* pPlayer, GameObject* pGo) { if (pGo->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER) @@ -295,36 +317,44 @@ bool GOHello_go_manaforge_control_console(Player* pPlayer, GameObject* pGo) pPlayer->SendPreparedQuest(pGo->GetGUID()); } - Creature* manaforge = NULL; + Creature* pManaforge = NULL; switch(pGo->GetAreaId()) { - case 3726: //b'naar - if ((pPlayer->GetQuestStatus(10299) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(10329) == QUEST_STATUS_INCOMPLETE) && - pPlayer->HasItemCount(29366,1)) - manaforge = pPlayer->SummonCreature(ENTRY_BNAAR_C_CONSOLE,2918.95,4189.98,161.88,0.34,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN,125000); + case 3726: // b'naar + if ((pPlayer->GetQuestStatus(QUEST_SHUTDOWN_BNAAR_ALDOR) == QUEST_STATUS_INCOMPLETE + || pPlayer->GetQuestStatus(QUEST_SHUTDOWN_BNAAR_SCRYERS) == QUEST_STATUS_INCOMPLETE) + && pPlayer->HasItemCount(ITEM_BNAAR_ACESS_CRYSTAL, 1)) + pManaforge = pPlayer->SummonCreature(NPC_BNAAR_C_CONSOLE, 2918.95, 4189.98, 161.88, 0.34, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 125000); break; - case 3730: //coruu - if ((pPlayer->GetQuestStatus(10321) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(10330) == QUEST_STATUS_INCOMPLETE) && - pPlayer->HasItemCount(29396,1)) - manaforge = pPlayer->SummonCreature(ENTRY_CORUU_C_CONSOLE,2426.77,2750.38,133.24,2.14,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN,125000); + case 3730: // coruu + if ((pPlayer->GetQuestStatus(QUEST_SHUTDOWN_CORUU_ALDOR) == QUEST_STATUS_INCOMPLETE + || pPlayer->GetQuestStatus(QUEST_SHUTDOWN_CORUU_SCRYERS) == QUEST_STATUS_INCOMPLETE) + && pPlayer->HasItemCount(ITEM_CORUU_ACESS_CRYSTAL, 1)) + pManaforge = pPlayer->SummonCreature(NPC_CORUU_C_CONSOLE, 2426.77, 2750.38, 133.24, 2.14, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 125000); break; - case 3734: //duro - if ((pPlayer->GetQuestStatus(10322) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(10338) == QUEST_STATUS_INCOMPLETE) && - pPlayer->HasItemCount(29397,1)) - manaforge = pPlayer->SummonCreature(ENTRY_DURO_C_CONSOLE,2976.48,2183.29,163.20,1.85,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN,125000); + case 3734: // duro + if ((pPlayer->GetQuestStatus(QUEST_SHUTDOWN_DURO_ALDOR) == QUEST_STATUS_INCOMPLETE + || pPlayer->GetQuestStatus(QUEST_SHUTDOWN_DURO_SCRYERS) == QUEST_STATUS_INCOMPLETE) + && pPlayer->HasItemCount(ITEM_DURO_ACESS_CRYSTAL, 1)) + pManaforge = pPlayer->SummonCreature(NPC_DURO_C_CONSOLE, 2976.48, 2183.29, 163.20, 1.85, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 125000); break; - case 3722: //ara - if ((pPlayer->GetQuestStatus(10323) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(10365) == QUEST_STATUS_INCOMPLETE) && - pPlayer->HasItemCount(29411,1)) - manaforge = pPlayer->SummonCreature(ENTRY_ARA_C_CONSOLE,4013.71,4028.76,192.10,1.25,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN,125000); + case 3722: // ara + if ((pPlayer->GetQuestStatus(QUEST_SHUTDOWN_ARA_ALDOR) == QUEST_STATUS_INCOMPLETE + || pPlayer->GetQuestStatus(QUEST_SHUTDOWN_ARA_SCRYERS) == QUEST_STATUS_INCOMPLETE) + && pPlayer->HasItemCount(ITEM_ARA_ACESS_CRYSTAL, 1)) + pManaforge = pPlayer->SummonCreature(NPC_ARA_C_CONSOLE, 4013.71, 4028.76, 192.10, 1.25, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 125000); break; } - if (manaforge) + if (pManaforge) { - ((npc_manaforge_control_consoleAI*)manaforge->AI())->someplayer = pPlayer->GetGUID(); - ((npc_manaforge_control_consoleAI*)manaforge->AI())->goConsole = pGo->GetGUID(); + if (npc_manaforge_control_consoleAI* pManaforgeAI = dynamic_cast(pManaforge->AI())) + { + pManaforgeAI->m_uiPlayerGUID = pPlayer->GetGUID(); + pManaforgeAI->m_uiConsoleGUID = pGo->GetGUID(); + } + pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE); } return true; @@ -335,129 +365,109 @@ bool GOHello_go_manaforge_control_console(Player* pPlayer, GameObject* pGo) ######*/ // The Speech of Dawnforge, Ardonis & Pathaleon -#define SAY_COMMANDER_DAWNFORGE_1 -1000128 -#define SAY_ARCANIST_ARDONIS_1 -1000129 -#define SAY_COMMANDER_DAWNFORGE_2 -1000130 -#define SAY_PATHALEON_CULATOR_IMAGE_1 -1000131 -#define SAY_COMMANDER_DAWNFORGE_3 -1000132 -#define SAY_PATHALEON_CULATOR_IMAGE_2 -1000133 -#define SAY_PATHALEON_CULATOR_IMAGE_2_1 -1000134 -#define SAY_PATHALEON_CULATOR_IMAGE_2_2 -1000135 -#define SAY_COMMANDER_DAWNFORGE_4 -1000136 -#define SAY_ARCANIST_ARDONIS_2 -1000136 -#define SAY_COMMANDER_DAWNFORGE_5 -1000137 - -#define QUEST_INFO_GATHERING 10198 -#define SPELL_SUNFURY_DISGUISE 34603 - -// Entries of Arcanist Ardonis, Commander Dawnforge, Pathaleon the Curators Image -const uint32 uiCreatureEntry[3] = +enum { - 19830, // Ardonis - 19831, // Dawnforge - 21504 // Pathaleon + SAY_COMMANDER_DAWNFORGE_1 = -1000128, + SAY_ARCANIST_ARDONIS_1 = -1000129, + SAY_COMMANDER_DAWNFORGE_2 = -1000130, + SAY_PATHALEON_THE_CALCULATOR_IMAGE_1 = -1000131, + SAY_COMMANDER_DAWNFORGE_3 = -1000132, + SAY_PATHALEON_THE_CALCULATOR_IMAGE_2 = -1000133, + SAY_PATHALEON_THE_CALCULATOR_IMAGE_2_1 = -1000134, + SAY_PATHALEON_THE_CALCULATOR_IMAGE_2_2 = -1000135, + SAY_COMMANDER_DAWNFORGE_4 = -1000136, + SAY_ARCANIST_ARDONIS_2 = -1000136, + SAY_COMMANDER_DAWNFORGE_5 = -1000137, + + QUEST_INFO_GATHERING = 10198, + SPELL_SUNFURY_DISGUISE = 34603, + + NPC_ARCANIST_ARDONIS = 19830, + NPC_COMMANDER_DAWNFORGE = 19831, + NPC_PATHALEON_THE_CALCULATOR_IMAGE = 21504 }; struct MANGOS_DLL_DECL npc_commander_dawnforgeAI : public ScriptedAI { npc_commander_dawnforgeAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset (); } - uint64 playerGUID; - uint64 ardonisGUID; - uint64 pathaleonGUID; - - uint32 Phase; - uint32 PhaseSubphase; - uint32 Phase_Timer; - bool isEvent; + uint64 m_uiPlayerGUID; + uint64 m_uiArdonisGUID; + uint64 m_uiPathaleonGUID; - float angle_dawnforge; - float angle_ardonis; + uint32 m_uiPhase; + uint32 m_uiPhaseSubphase; + uint32 m_uiPhaseTimer; + bool m_bIsEvent; void Reset() { - playerGUID = 0; - ardonisGUID = 0; - pathaleonGUID = 0; - - Phase = 1; - PhaseSubphase = 0; - Phase_Timer = 4000; - isEvent = false; + m_uiPlayerGUID = 0; + m_uiArdonisGUID = 0; + m_uiPathaleonGUID = 0; + + m_uiPhase = 1; + m_uiPhaseSubphase = 0; + m_uiPhaseTimer = 4000; + m_bIsEvent = false; } - void JustSummoned(Creature *summoned) + void JustSummoned(Creature* pSummoned) { - pathaleonGUID = summoned->GetGUID(); + if (pSummoned->GetEntry() == NPC_PATHALEON_THE_CALCULATOR_IMAGE) + m_uiPathaleonGUID = pSummoned->GetGUID(); } - // Emote Ardonis and Pathaleon - void Turn_to_Pathaleons_Image() + void TurnToPathaleonsImage() { - Unit *ardonis = Unit::GetUnit(*m_creature,ardonisGUID); - Unit *pathaleon = Unit::GetUnit(*m_creature,pathaleonGUID); - Player* pPlayer = (Player*)Unit::GetUnit(*m_creature,playerGUID); + Unit* pArdonis = Unit::GetUnit(*m_creature, m_uiArdonisGUID); + Unit* pPathaleon = Unit::GetUnit(*m_creature, m_uiPathaleonGUID); + Player* pPlayer = (Player*)Unit::GetUnit(*m_creature, m_uiPlayerGUID); - if (!ardonis || !pathaleon || !pPlayer) + if (!pArdonis || !pPathaleon || !pPlayer) return; - //Calculate the angle to Pathaleon - angle_dawnforge = m_creature->GetAngle(pathaleon->GetPositionX(), pathaleon->GetPositionY()); - angle_ardonis = ardonis->GetAngle(pathaleon->GetPositionX(), pathaleon->GetPositionY()); + m_creature->SetFacingToObject(pPathaleon); + pArdonis->SetFacingToObject(pPathaleon); - //Turn Dawnforge and update - m_creature->SetOrientation(angle_dawnforge); - m_creature->SendCreateUpdateToPlayer(pPlayer); - //Turn Ardonis and update - ardonis->SetOrientation(angle_ardonis); - ardonis->SendCreateUpdateToPlayer(pPlayer); - - //Set them to kneel + // the boss is there kneel before him m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); - ardonis->SetStandState(UNIT_STAND_STATE_KNEEL); + pArdonis->SetStandState(UNIT_STAND_STATE_KNEEL); } - //Set them back to each other - void Turn_to_eachother() + void TurnToEachOther() { - if (Unit *ardonis = Unit::GetUnit(*m_creature,ardonisGUID)) + if (Unit* pArdonis = Unit::GetUnit(*m_creature, m_uiArdonisGUID)) { - Player* pPlayer = (Player*)Unit::GetUnit(*m_creature,playerGUID); + Player* pPlayer = (Player*)Unit::GetUnit(*m_creature, m_uiPlayerGUID); if (!pPlayer) return; - angle_dawnforge = m_creature->GetAngle(ardonis->GetPositionX(), ardonis->GetPositionY()); - angle_ardonis = ardonis->GetAngle(m_creature->GetPositionX(), m_creature->GetPositionY()); - - //Turn Dawnforge and update - m_creature->SetOrientation(angle_dawnforge); - m_creature->SendCreateUpdateToPlayer(pPlayer); - //Turn Ardonis and update - ardonis->SetOrientation(angle_ardonis); - ardonis->SendCreateUpdateToPlayer(pPlayer); + m_creature->SetFacingToObject(pArdonis); + pArdonis->SetFacingToObject(m_creature); - //Set state + // get up m_creature->SetStandState(UNIT_STAND_STATE_STAND); - ardonis->SetStandState(UNIT_STAND_STATE_STAND); + pArdonis->SetStandState(UNIT_STAND_STATE_STAND); } } bool CanStartEvent(Player* pPlayer) { - if (!isEvent) + if (!m_bIsEvent) { - Creature* ardonis = GetClosestCreatureWithEntry(m_creature, uiCreatureEntry[0], 10.0f); + Creature* pArdonis = GetClosestCreatureWithEntry(m_creature, NPC_ARCANIST_ARDONIS, 10.0f); - if (!ardonis) + if (!pArdonis) return false; - ardonisGUID = ardonis->GetGUID(); - playerGUID = pPlayer->GetGUID(); + m_uiArdonisGUID = pArdonis->GetGUID(); + m_uiPlayerGUID = pPlayer->GetGUID(); - isEvent = true; + m_bIsEvent = true; - Turn_to_eachother(); + TurnToEachOther(); return true; } @@ -465,129 +475,114 @@ struct MANGOS_DLL_DECL npc_commander_dawnforgeAI : public ScriptedAI return false; } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - //Is event even running? - if (!isEvent) + // Is event even running? + if (!m_bIsEvent) return; - //Phase timing - if (Phase_Timer >= diff) + // Phase timing + if (m_uiPhaseTimer >= uiDiff) { - Phase_Timer -= diff; + m_uiPhaseTimer -= uiDiff; return; } - Unit *ardonis = Unit::GetUnit(*m_creature,ardonisGUID); - Unit *pathaleon = Unit::GetUnit(*m_creature,pathaleonGUID); - Player* pPlayer = (Player*)Unit::GetUnit(*m_creature,playerGUID); + Unit* pArdonis = Unit::GetUnit(*m_creature, m_uiArdonisGUID); + Unit* pPathaleon = Unit::GetUnit(*m_creature, m_uiPathaleonGUID); + Player* pPlayer = (Player*)Unit::GetUnit(*m_creature, m_uiPlayerGUID); - if (!ardonis || !pPlayer) + if (!pArdonis || !pPlayer) { Reset(); return; } - if (Phase > 4 && !pathaleon) + if (m_uiPhase > 4 && !pPathaleon) { Reset(); return; } - //Phase 1 Dawnforge say - switch (Phase) + switch (m_uiPhase) { case 1: DoScriptText(SAY_COMMANDER_DAWNFORGE_1, m_creature); - ++Phase; - Phase_Timer = 16000; + ++m_uiPhase; + m_uiPhaseTimer = 16000; break; - //Phase 2 Ardonis say case 2: - DoScriptText(SAY_ARCANIST_ARDONIS_1, ardonis); - ++Phase; - Phase_Timer = 16000; + DoScriptText(SAY_ARCANIST_ARDONIS_1, pArdonis); + ++m_uiPhase; + m_uiPhaseTimer = 16000; break; - //Phase 3 Dawnforge say case 3: DoScriptText(SAY_COMMANDER_DAWNFORGE_2, m_creature); - ++Phase; - Phase_Timer = 16000; + ++m_uiPhase; + m_uiPhaseTimer = 16000; break; - //Phase 4 Pathaleon spawns up to phase 9 case 4: - //spawn pathaleon's image - m_creature->SummonCreature(uiCreatureEntry[2], 2325.851563, 2799.534668, 133.084229, 6.038996, TEMPSUMMON_TIMED_DESPAWN, 90000); - ++Phase; - Phase_Timer = 500; + // spawn pathaleon's image + m_creature->SummonCreature(NPC_PATHALEON_THE_CALCULATOR_IMAGE, 2325.851563, 2799.534668, 133.084229, 6.038996, TEMPSUMMON_TIMED_DESPAWN, 90000); + ++m_uiPhase; + m_uiPhaseTimer = 500; break; - //Phase 5 Pathaleon say case 5: - DoScriptText(SAY_PATHALEON_CULATOR_IMAGE_1, pathaleon); - ++Phase; - Phase_Timer = 6000; + DoScriptText(SAY_PATHALEON_THE_CALCULATOR_IMAGE_1, pPathaleon); + ++m_uiPhase; + m_uiPhaseTimer = 6000; break; - //Phase 6 case 6: - switch(PhaseSubphase) + switch(m_uiPhaseSubphase) { - //Subphase 1: Turn Dawnforge and Ardonis case 0: - Turn_to_Pathaleons_Image(); - ++PhaseSubphase; - Phase_Timer = 8000; + TurnToPathaleonsImage(); + ++m_uiPhaseSubphase; + m_uiPhaseTimer = 8000; break; - //Subphase 2 Dawnforge say case 1: DoScriptText(SAY_COMMANDER_DAWNFORGE_3, m_creature); - PhaseSubphase = 0; - ++Phase; - Phase_Timer = 8000; + m_uiPhaseSubphase = 0; + ++m_uiPhase; + m_uiPhaseTimer = 8000; break; } break; - //Phase 7 Pathaleons say 3 Sentence, every sentence need a subphase case 7: - switch(PhaseSubphase) + switch(m_uiPhaseSubphase) { - //Subphase 1 case 0: - DoScriptText(SAY_PATHALEON_CULATOR_IMAGE_2, pathaleon); - ++PhaseSubphase; - Phase_Timer = 12000; + DoScriptText(SAY_PATHALEON_THE_CALCULATOR_IMAGE_2, pPathaleon); + ++m_uiPhaseSubphase; + m_uiPhaseTimer = 12000; break; - //Subphase 2 case 1: - DoScriptText(SAY_PATHALEON_CULATOR_IMAGE_2_1, pathaleon); - ++PhaseSubphase; - Phase_Timer = 16000; + DoScriptText(SAY_PATHALEON_THE_CALCULATOR_IMAGE_2_1, pPathaleon); + ++m_uiPhaseSubphase; + m_uiPhaseTimer = 16000; break; - //Subphase 3 case 2: - DoScriptText(SAY_PATHALEON_CULATOR_IMAGE_2_2, pathaleon); - PhaseSubphase = 0; - ++Phase; - Phase_Timer = 10000; + DoScriptText(SAY_PATHALEON_THE_CALCULATOR_IMAGE_2_2, pPathaleon); + m_uiPhaseSubphase = 0; + ++m_uiPhase; + m_uiPhaseTimer = 10000; break; } break; - //Phase 8 Dawnforge & Ardonis say case 8: DoScriptText(SAY_COMMANDER_DAWNFORGE_4, m_creature); - DoScriptText(SAY_ARCANIST_ARDONIS_2, ardonis); - ++Phase; - Phase_Timer = 4000; + DoScriptText(SAY_ARCANIST_ARDONIS_2, pArdonis); + ++m_uiPhase; + m_uiPhaseTimer = 4000; break; - //Phase 9 Pathaleons Despawn, Reset Dawnforge & Ardonis angle case 9: - Turn_to_eachother(); - //hide pathaleon, unit will despawn shortly - pathaleon->SetVisibility(VISIBILITY_OFF); - PhaseSubphase = 0; - ++Phase; - Phase_Timer = 3000; + TurnToEachOther(); + // hide pathaleon, unit will despawn shortly + pPathaleon->SetVisibility(VISIBILITY_OFF); + m_uiPhaseSubphase = 0; + ++m_uiPhase; + m_uiPhaseTimer = 3000; break; - //Phase 10 Dawnforge say case 10: DoScriptText(SAY_COMMANDER_DAWNFORGE_5, m_creature); pPlayer->AreaExploredOrEventHappens(QUEST_INFO_GATHERING); @@ -604,19 +599,24 @@ CreatureAI* GetAI_npc_commander_dawnforge(Creature* pCreature) bool AreaTrigger_at_commander_dawnforge(Player* pPlayer, AreaTriggerEntry *at) { - //if player lost aura or not have at all, we should not try start event. - if (!pPlayer->HasAura(SPELL_SUNFURY_DISGUISE,0)) + // if player lost aura or not have at all, we should not try start event. + if (!pPlayer->HasAura(SPELL_SUNFURY_DISGUISE, 0)) return false; if (pPlayer->isAlive() && pPlayer->GetQuestStatus(QUEST_INFO_GATHERING) == QUEST_STATUS_INCOMPLETE) { - Creature* pCreature = GetClosestCreatureWithEntry(pPlayer, uiCreatureEntry[1], 30.0f); + Creature* pDawnforge = GetClosestCreatureWithEntry(pPlayer, NPC_COMMANDER_DAWNFORGE, 30.0f); - if (!pCreature) + if (!pDawnforge) return false; - if (((npc_commander_dawnforgeAI*)pCreature->AI())->CanStartEvent(pPlayer)) + if (npc_commander_dawnforgeAI* pDawnforgeAI = dynamic_cast(pDawnforge->AI())) + { + pDawnforgeAI->CanStartEvent(pPlayer); return true; + } + + } return false; } @@ -636,8 +636,8 @@ enum bool GossipHello_npc_protectorate_nether_drake(Player* pPlayer, Creature* pCreature) { - //On Nethery Wings - if (pPlayer->GetQuestStatus(QUEST_NETHER_WINGS) == QUEST_STATUS_INCOMPLETE && pPlayer->HasItemCount(ITEM_PH_DISRUPTOR,1)) + // On Nethery Wings + if (pPlayer->GetQuestStatus(QUEST_NETHER_WINGS) == QUEST_STATUS_INCOMPLETE && pPlayer->HasItemCount(ITEM_PH_DISRUPTOR, 1)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FLY_ULTRIS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); @@ -658,14 +658,22 @@ bool GossipSelect_npc_protectorate_nether_drake(Player* pPlayer, Creature* pCrea ## npc_veronia ######*/ +enum +{ + QUEST_BEHIND_ENEMY_LINES = 10652, + SPELL_STEALTH_FLIGHT = 34905 +}; + +#define GOSSIP_ITEM_FLY_CORUU "Fly me to Manaforge Coruu please" + bool GossipHello_npc_veronia(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) pPlayer->PrepareQuestMenu(pCreature->GetGUID()); - //Behind Enemy Lines - if (pPlayer->GetQuestStatus(10652) && !pPlayer->GetQuestRewardStatus(10652)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Fly me to Manaforge Coruu please", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + // Behind Enemy Lines + if (pPlayer->GetQuestStatus(QUEST_BEHIND_ENEMY_LINES) && !pPlayer->GetQuestRewardStatus(QUEST_BEHIND_ENEMY_LINES)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FLY_CORUU, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); @@ -677,48 +685,44 @@ bool GossipSelect_npc_veronia(Player* pPlayer, Creature* pCreature, uint32 uiSen if (uiAction == GOSSIP_ACTION_INFO_DEF) { pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->CastSpell(pPlayer,34905,true); //TaxiPath 606 + pPlayer->CastSpell(pPlayer, SPELL_STEALTH_FLIGHT, true);//TaxiPath 606 } return true; } -/*###### -## -######*/ - void AddSC_netherstorm() { - Script *newscript; - - newscript = new Script; - newscript->Name = "go_manaforge_control_console"; - newscript->pGOHello = &GOHello_go_manaforge_control_console; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_manaforge_control_console"; - newscript->GetAI = &GetAI_npc_manaforge_control_console; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_commander_dawnforge"; - newscript->GetAI = GetAI_npc_commander_dawnforge; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "at_commander_dawnforge"; - newscript->pAreaTrigger = &AreaTrigger_at_commander_dawnforge; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_protectorate_nether_drake"; - newscript->pGossipHello = &GossipHello_npc_protectorate_nether_drake; - newscript->pGossipSelect = &GossipSelect_npc_protectorate_nether_drake; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_veronia"; - newscript->pGossipHello = &GossipHello_npc_veronia; - newscript->pGossipSelect = &GossipSelect_npc_veronia; - newscript->RegisterSelf(); + Script* NewScript; + + NewScript = new Script; + NewScript->Name = "go_manaforge_control_console"; + NewScript->pGOHello = &GOHello_go_manaforge_control_console; + NewScript->RegisterSelf(); + + NewScript = new Script; + NewScript->Name = "npc_manaforge_control_console"; + NewScript->GetAI = &GetAI_npc_manaforge_control_console; + NewScript->RegisterSelf(); + + NewScript = new Script; + NewScript->Name = "npc_commander_dawnforge"; + NewScript->GetAI = GetAI_npc_commander_dawnforge; + NewScript->RegisterSelf(); + + NewScript = new Script; + NewScript->Name = "at_commander_dawnforge"; + NewScript->pAreaTrigger = &AreaTrigger_at_commander_dawnforge; + NewScript->RegisterSelf(); + + NewScript = new Script; + NewScript->Name = "npc_protectorate_nether_drake"; + NewScript->pGossipHello = &GossipHello_npc_protectorate_nether_drake; + NewScript->pGossipSelect = &GossipSelect_npc_protectorate_nether_drake; + NewScript->RegisterSelf(); + + NewScript = new Script; + NewScript->Name = "npc_veronia"; + NewScript->pGossipHello = &GossipHello_npc_veronia; + NewScript->pGossipSelect = &GossipSelect_npc_veronia; + NewScript->RegisterSelf(); } diff --git a/scripts/outland/shadowmoon_valley.cpp b/scripts/outland/shadowmoon_valley.cpp index d9e9aedda..c7e549bf2 100644 --- a/scripts/outland/shadowmoon_valley.cpp +++ b/scripts/outland/shadowmoon_valley.cpp @@ -985,7 +985,7 @@ struct MANGOS_DLL_DECL mob_torlothAI : public ScriptedAI case 5: if (Unit* pTarget = Unit::GetUnit((*m_creature), m_uiPlayerGUID)) { - m_creature->AddThreat(pTarget, 0.0f); + m_creature->AddThreat(pTarget); m_creature->SetFacingToObject(pTarget); m_creature->HandleEmoteCommand(EMOTE_ONESHOT_POINT); } diff --git a/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp b/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp index 979d98831..e0a471be3 100644 --- a/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp +++ b/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp @@ -101,7 +101,7 @@ struct MANGOS_DLL_DECL npc_millhouse_manastormAI : public ScriptedAI { if (m_creature->Attack(pWho, true)) { - m_creature->AddThreat(pWho, 0.0f); + m_creature->AddThreat(pWho); m_creature->SetInCombatWith(pWho); pWho->SetInCombatWith(m_creature); diff --git a/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp b/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp index 2cf6c9bf1..e73b80e5e 100644 --- a/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp +++ b/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp @@ -147,7 +147,7 @@ struct MANGOS_DLL_DECL boss_warp_splinterAI : public ScriptedAI if (pTreant) { //pTreant->GetMotionMaster()->Mutate(new TargetedMovementGenerator(*m_creature)); - pTreant->AddThreat(m_creature, 0.1f); + pTreant->AddThreat(m_creature); Treant_GUIDs[i] = pTreant->GetGUID(); ((mob_treantAI*)pTreant->AI())->WarpGuid = m_creature->GetGUID(); } diff --git a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp index aebba9ef1..807cf035b 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp @@ -282,7 +282,7 @@ struct MANGOS_DLL_DECL advisorbase_ai : public ScriptedAI AttackStart(pTarget); m_creature->GetMotionMaster()->Clear(); m_creature->GetMotionMaster()->MoveChase(pTarget); - m_creature->AddThreat(pTarget, 0.0f); + m_creature->AddThreat(pTarget); } else m_uiDelayRes_Timer -= uiDiff; @@ -430,7 +430,7 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI StartEvent(); pWho->SetInCombatWith(m_creature); - m_creature->AddThreat(pWho, 0.0f); + m_creature->AddThreat(pWho); } } } @@ -1205,7 +1205,7 @@ struct MANGOS_DLL_DECL boss_grand_astromancer_capernianAI : public advisorbase_a if (m_creature->Attack(pWho, true)) { - m_creature->AddThreat(pWho, 0.0f); + m_creature->AddThreat(pWho); m_creature->SetInCombatWith(pWho); pWho->SetInCombatWith(m_creature); @@ -1437,7 +1437,7 @@ struct MANGOS_DLL_DECL mob_phoenix_egg_tkAI : public ScriptedAI void JustSummoned(Creature* pSummoned) { - pSummoned->AddThreat(m_creature->getVictim(), 0.0f); + pSummoned->AddThreat(m_creature->getVictim()); pSummoned->CastSpell(pSummoned,SPELL_REBIRTH,false); } diff --git a/sql/Updates/Makefile.am b/sql/Updates/Makefile.am index 3b044f6b3..2ac6e5b7c 100644 --- a/sql/Updates/Makefile.am +++ b/sql/Updates/Makefile.am @@ -37,4 +37,5 @@ pkgdata_DATA = \ r1473_scriptdev2.sql \ r1474_scriptdev2.sql \ r1476_mangos.sql \ - r1476_scriptdev2.sql + r1476_scriptdev2.sql \ + r1478_scriptdev2.sql diff --git a/sql/Updates/r1478_scriptdev2.sql b/sql/Updates/r1478_scriptdev2.sql new file mode 100644 index 000000000..89ed3fa72 --- /dev/null +++ b/sql/Updates/r1478_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 8659+) '; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 212fed458..6d87530ce 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3,7 +3,7 @@ -- DELETE FROM sd2_db_version; -INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for MaNGOS 8645+) '); +INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for MaNGOS 8659+) '); -- -- Below contains data for table `script_texts` mainly used in C++ parts. From 9c9ca3629ddd746b3d627808de4c10c1a96ef686 Mon Sep 17 00:00:00 2001 From: Insider Date: Thu, 22 Oct 2009 18:08:38 +0800 Subject: [PATCH 014/405] Small improvements for [patch 1] --- scripts/northrend/naxxramas/boss_anubrekhan.cpp | 2 +- scripts/northrend/naxxramas/boss_gluth.cpp | 4 ++-- scripts/northrend/naxxramas/boss_noth.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/northrend/naxxramas/boss_anubrekhan.cpp b/scripts/northrend/naxxramas/boss_anubrekhan.cpp index 7661cc680..45b113c11 100644 --- a/scripts/northrend/naxxramas/boss_anubrekhan.cpp +++ b/scripts/northrend/naxxramas/boss_anubrekhan.cpp @@ -187,7 +187,7 @@ struct MANGOS_DLL_DECL boss_anubrekhanAI : public ScriptedAI guidCryptGuards[CryptGuard_count++] = temp->GetGUID(); if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) { - temp->AddThreat(target,0.0f); + temp->AddThreat(target); m_creature->SetInCombatWithZone(); } diff --git a/scripts/northrend/naxxramas/boss_gluth.cpp b/scripts/northrend/naxxramas/boss_gluth.cpp index 3c5b9c660..f16f7deb5 100644 --- a/scripts/northrend/naxxramas/boss_gluth.cpp +++ b/scripts/northrend/naxxramas/boss_gluth.cpp @@ -157,7 +157,7 @@ struct MANGOS_DLL_DECL boss_gluthAI : public ScriptedAI if (Creature* pZombie = m_creature->SummonCreature(NPC_ZOMBIE_CHOW,ADD_1X,ADD_1Y,ADD_1Z,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000)) { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) - pZombie->AddThreat(pTarget,0.0f); + pZombie->AddThreat(pTarget); addsGuid.push_back(pZombie->GetGUID()); } @@ -166,7 +166,7 @@ struct MANGOS_DLL_DECL boss_gluthAI : public ScriptedAI if (Creature* pZombie = m_creature->SummonCreature(NPC_ZOMBIE_CHOW,ADD_1X,ADD_1Y,ADD_1Z,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000)) { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) - pZombie->AddThreat(pTarget,0.0f); + pZombie->AddThreat(pTarget); addsGuid.push_back(pZombie->GetGUID()); } } diff --git a/scripts/northrend/naxxramas/boss_noth.cpp b/scripts/northrend/naxxramas/boss_noth.cpp index f4c1041cc..04e48a873 100644 --- a/scripts/northrend/naxxramas/boss_noth.cpp +++ b/scripts/northrend/naxxramas/boss_noth.cpp @@ -106,7 +106,7 @@ struct MANGOS_DLL_DECL boss_nothAI : public ScriptedAI void JustSummoned(Creature* summoned) { if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) - summoned->AddThreat(target, 0.0f); + summoned->AddThreat(target); } void KilledUnit(Unit* victim) From 846437e63dc5ace0ceffaaf66b7d87d5eeb09a89 Mon Sep 17 00:00:00 2001 From: Insider Date: Mon, 26 Oct 2009 00:00:07 +0700 Subject: [PATCH 015/405] [patch 7] Added scripts for raid instance Ulduar --- Makefile.am | 17 +- VC80/80ScriptDev2.vcproj | 62 ++- VC90/90ScriptDev2.vcproj | 62 ++- addition/7_mangos_ulduar.sql | 19 + addition/7_mangos_ulduar_eventai.sql | 5 + .../northrend/ulduar/ulduar/boss_algalon.cpp | 78 +++ .../northrend/ulduar/ulduar/boss_auriaya.cpp | 127 +++++ .../northrend/ulduar/ulduar/boss_freya.cpp | 210 +++++++ .../northrend/ulduar/ulduar/boss_hodir.cpp | 128 +++++ .../northrend/ulduar/ulduar/boss_ignis.cpp | 111 ++++ .../ulduar/ulduar/boss_iron_council.cpp | 280 ++++++++++ .../northrend/ulduar/ulduar/boss_kologarn.cpp | 309 +++++++++++ .../ulduar/ulduar/boss_leviathan.cpp | 114 ++++ .../northrend/ulduar/ulduar/boss_mimiron.cpp | 53 ++ .../ulduar/ulduar/boss_razorscale.cpp | 141 +++++ .../northrend/ulduar/ulduar/boss_thorim.cpp | 53 ++ .../northrend/ulduar/ulduar/boss_vezax.cpp | 85 +++ .../northrend/ulduar/ulduar/boss_xt_002.cpp | 241 ++++++++ .../ulduar/ulduar/boss_yogg_saron.cpp | 56 ++ scripts/northrend/ulduar/ulduar/def_ulduar.h | 42 ++ .../ulduar/ulduar/instance_ulduar.cpp | 515 +++++++++++------- scripts/northrend/ulduar/ulduar/ulduar.h | 49 -- .../ulduar/ulduar/ulduar_teleport.cpp | 117 ++++ system/ScriptLoader.cpp | 34 +- 24 files changed, 2646 insertions(+), 262 deletions(-) create mode 100644 addition/7_mangos_ulduar.sql create mode 100644 addition/7_mangos_ulduar_eventai.sql create mode 100644 scripts/northrend/ulduar/ulduar/boss_algalon.cpp create mode 100644 scripts/northrend/ulduar/ulduar/boss_auriaya.cpp create mode 100644 scripts/northrend/ulduar/ulduar/boss_freya.cpp create mode 100644 scripts/northrend/ulduar/ulduar/boss_hodir.cpp create mode 100644 scripts/northrend/ulduar/ulduar/boss_ignis.cpp create mode 100644 scripts/northrend/ulduar/ulduar/boss_iron_council.cpp create mode 100644 scripts/northrend/ulduar/ulduar/boss_kologarn.cpp create mode 100644 scripts/northrend/ulduar/ulduar/boss_leviathan.cpp create mode 100644 scripts/northrend/ulduar/ulduar/boss_mimiron.cpp create mode 100644 scripts/northrend/ulduar/ulduar/boss_razorscale.cpp create mode 100644 scripts/northrend/ulduar/ulduar/boss_thorim.cpp create mode 100644 scripts/northrend/ulduar/ulduar/boss_vezax.cpp create mode 100644 scripts/northrend/ulduar/ulduar/boss_xt_002.cpp create mode 100644 scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp create mode 100644 scripts/northrend/ulduar/ulduar/def_ulduar.h delete mode 100644 scripts/northrend/ulduar/ulduar/ulduar.h create mode 100644 scripts/northrend/ulduar/ulduar/ulduar_teleport.cpp diff --git a/Makefile.am b/Makefile.am index 2914b7767..b16f79ff0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -355,8 +355,23 @@ scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp \ scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp \ scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp \ scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp \ +scripts/northrend/ulduar/ulduar/boss_algalon.cpp \ +scripts/northrend/ulduar/ulduar/boss_auriaya.cpp \ +scripts/northrend/ulduar/ulduar/boss_freya.cpp \ +scripts/northrend/ulduar/ulduar/boss_hodir.cpp \ +scripts/northrend/ulduar/ulduar/boss_ignis.cpp \ +scripts/northrend/ulduar/ulduar/boss_iron_council.cpp \ +scripts/northrend/ulduar/ulduar/boss_kologarn.cpp \ +scripts/northrend/ulduar/ulduar/boss_leviathan.cpp \ +scripts/northrend/ulduar/ulduar/boss_mimiron.cpp \ +scripts/northrend/ulduar/ulduar/boss_razorscale.cpp \ +scripts/northrend/ulduar/ulduar/boss_thorim.cpp \ +scripts/northrend/ulduar/ulduar/boss_vezax.cpp \ +scripts/northrend/ulduar/ulduar/boss_xt_002.cpp \ +scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp \ +scripts/northrend/ulduar/ulduar/ulduar_teleport.cpp \ scripts/northrend/ulduar/ulduar/instance_ulduar.cpp \ -scripts/northrend/ulduar/ulduar/ulduar.h \ +scripts/northrend/ulduar/ulduar/def_ulduar.h \ scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp \ scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp \ scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp \ diff --git a/VC80/80ScriptDev2.vcproj b/VC80/80ScriptDev2.vcproj index ff02bfc19..dcdd11c37 100644 --- a/VC80/80ScriptDev2.vcproj +++ b/VC80/80ScriptDev2.vcproj @@ -1858,12 +1858,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/VC90/90ScriptDev2.vcproj b/VC90/90ScriptDev2.vcproj index 2f75813f4..891682ef4 100644 --- a/VC90/90ScriptDev2.vcproj +++ b/VC90/90ScriptDev2.vcproj @@ -1857,12 +1857,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/addition/7_mangos_ulduar.sql b/addition/7_mangos_ulduar.sql new file mode 100644 index 000000000..bf8d4a5e5 --- /dev/null +++ b/addition/7_mangos_ulduar.sql @@ -0,0 +1,19 @@ +UPDATE `creature_template` SET `ScriptName`='boss_razorscale' WHERE `entry`=33186; +UPDATE `creature_template` SET `ScriptName`='boss_ignis' WHERE `entry`=33118; +UPDATE `creature_template` SET `ScriptName`='boss_xt002' WHERE `entry`=33293; +UPDATE `creature_template` SET `ScriptName`='boss_flame_leviathan' WHERE `entry`=33113; +UPDATE `creature_template` SET `ScriptName`='boss_auriaya' WHERE `entry`=33515; +UPDATE `creature_template` SET `ScriptName`='boss_kologarn' WHERE `entry`=32930; +UPDATE `creature_template` SET `ScriptName`='boss_kologarn_left_arm' WHERE `entry`=32933; +UPDATE `creature_template` SET `ScriptName`='boss_kologarn_right_arm' WHERE `entry`=32934; +UPDATE `creature_template` SET `ScriptName`='boss_steelbreaker' WHERE `entry`=32867; +UPDATE `creature_template` SET `ScriptName`='boss_molgeim' WHERE `entry`=32927; +UPDATE `creature_template` SET `ScriptName`='boss_brundir' WHERE `entry`=32857; +UPDATE `creature_template` SET `ScriptName`='boss_thorim' WHERE `entry`=32865; +UPDATE `creature_template` SET `ScriptName`='boss_hodir' WHERE `entry`=32845; +UPDATE `creature_template` SET `ScriptName`='boss_freya' WHERE `entry`=32906; +UPDATE `creature_template` SET `ScriptName`='boss_mimiron' WHERE `entry`=33350; +UPDATE `creature_template` SET `ScriptName`='boss_vezax' WHERE `entry`=33271; +UPDATE `creature_template` SET `ScriptName`='boss_yogg_saron' WHERE `entry`=33288; +UPDATE `creature_template` SET `ScriptName`='boss_algalon' WHERE `entry`=32871; +UPDATE `instance_template` SET `script`='instance_ulduar' WHERE `map`=603; diff --git a/addition/7_mangos_ulduar_eventai.sql b/addition/7_mangos_ulduar_eventai.sql new file mode 100644 index 000000000..3cdf0f6b9 --- /dev/null +++ b/addition/7_mangos_ulduar_eventai.sql @@ -0,0 +1,5 @@ +UPDATE creature_template SET AIName='EventAI', ScriptName='' WHERE entry IN (32918, 36561); +DELETE FROM creature_ai_scripts WHERE creature_id IN (32918, 36561); +INSERT INTO creature_ai_scripts VALUES +(3291800, 32918, 6, 0, 100, 2, 0, 0, 0, 0, 11, 62598, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Detonating Lasher - OnDeath (N)'), +(3291801, 32918, 6, 0, 100, 4, 0, 0, 0, 0, 11, 62937, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Detonating Lasher - OnDeath (H)'), diff --git a/scripts/northrend/ulduar/ulduar/boss_algalon.cpp b/scripts/northrend/ulduar/ulduar/boss_algalon.cpp new file mode 100644 index 000000000..62ad5082c --- /dev/null +++ b/scripts/northrend/ulduar/ulduar/boss_algalon.cpp @@ -0,0 +1,78 @@ + +#include "precompiled.h" +#include "def_ulduar.h" + +#define SP_HEAVENS 64487 +#define SP_BIG_BANG 64443 +#define H_SP_BIG_BANG 64584 +#define SP_QUANTUM_STRIKE 64395 +#define H_SP_QUANTUM_STRIKE 64592 +#define SP_ENRAGE 47008 + +struct MANGOS_DLL_DECL boss_algalonAI : public ScriptedAI +{ + boss_algalonAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Heroic = m_creature->GetMap()->IsHeroic(); + Reset(); + } + + bool Heroic; + ScriptedInstance *pInstance; + uint32 QuantumStrikeTimer; + uint32 EnrageTimer; + + void Reset() + { + if(pInstance) pInstance->SetData(TYPE_ALGALON, NOT_STARTED); + QuantumStrikeTimer = 4000 + rand()%10000; + EnrageTimer = 360000; //6 minutes + } + + void Aggro(Unit *who) + { + if(pInstance) pInstance->SetData(TYPE_ALGALON, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_ALGALON, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if(QuantumStrikeTimer < diff) + { + DoCast(m_creature->getVictim(), Heroic ? H_SP_QUANTUM_STRIKE : SP_QUANTUM_STRIKE); + QuantumStrikeTimer = 4000 + rand()%10000; + } + else QuantumStrikeTimer -= diff; + + if(EnrageTimer < diff) + { + DoCast(m_creature, SP_ENRAGE, true); + EnrageTimer = 30000; + } + else EnrageTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_algalon(Creature* pCreature) +{ + return new boss_algalonAI(pCreature); +} + +void AddSC_boss_algalon() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_algalon"; + newscript->GetAI = &GetAI_boss_algalon; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp b/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp new file mode 100644 index 000000000..e263e2504 --- /dev/null +++ b/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp @@ -0,0 +1,127 @@ + +#include "precompiled.h" +#include "def_ulduar.h" + +#define SP_BERSERK 47008 +#define SP_TERRIFY 64386 +#define SP_GUARDIAN_SWARM 64396 +#define SP_SONIC_SCREECH 64422 +#define H_SP_SONIC_SCREECH 64688 +#define SP_SENTINEL_BLAST 64389 +#define H_SP_SENTINEL_BLAST 64678 + +#define CR_FERAL_DEFENDER 34035 +#define CR_SWARMING_GUARDIAN 34034 + + +struct MANGOS_DLL_DECL boss_auriayaAI : public ScriptedAI +{ + boss_auriayaAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Heroic = m_creature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance *pInstance; + bool Heroic; + uint32 EnrageTimer; + uint32 ScreechTimer; + uint32 TerrifyTimer; + uint32 SwarmTimer; + uint32 DefenderTimer; + + void Reset() + { + EnrageTimer = 600000; //10 minutes + DefenderTimer = 60000; + ScreechTimer = 20000 + rand()%10000; + TerrifyTimer = 30000 + rand()%15000; + SwarmTimer = 10000; + + if(pInstance) pInstance->SetData(TYPE_AURIAYA, NOT_STARTED); + } + + void Aggro(Unit *who) + { + if(pInstance) pInstance->SetData(TYPE_AURIAYA, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_AURIAYA, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (DefenderTimer < diff) + { + Unit *defender = DoSpawnCreature(CR_FERAL_DEFENDER, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); + Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + if(defender && target && target->isAlive()) + defender->AddThreat(target, 1.0f); + DefenderTimer = 45000; + } + else DefenderTimer -= diff; + + if (ScreechTimer < diff) + { + DoCast(m_creature, Heroic ? H_SP_SONIC_SCREECH : SP_SONIC_SCREECH); + ScreechTimer = 25000 + rand()%15000; + } + else ScreechTimer -= diff; + + if (SwarmTimer < diff) + { + Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + if(target && target->isAlive()) + { + DoCast(target, SP_GUARDIAN_SWARM); + /*Creature *add = NULL; + for(int i=0; i<16; i++) + { + add = DoSpawnCreature(CR_SWARMING_GUARDIAN, + target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, + TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); + if(add) add->AddThreat(target, 1.0f); + }*/ + } + + SwarmTimer = 20000 + rand()%20000; + } + else SwarmTimer -= diff; + + if (TerrifyTimer < diff) + { + DoCast(m_creature->getVictim(), SP_TERRIFY); + TerrifyTimer = 30000 + rand()%15000; + } + else TerrifyTimer -= diff; + + if (EnrageTimer < diff) + { + DoCast(m_creature, SP_BERSERK); + EnrageTimer = 20000 + rand()%20000; + } + else EnrageTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_auriaya(Creature* pCreature) +{ + return new boss_auriayaAI(pCreature); +} + +void AddSC_boss_auriaya() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_auriaya"; + newscript->GetAI = &GetAI_boss_auriaya; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/ulduar/ulduar/boss_freya.cpp b/scripts/northrend/ulduar/ulduar/boss_freya.cpp new file mode 100644 index 000000000..72abed2ff --- /dev/null +++ b/scripts/northrend/ulduar/ulduar/boss_freya.cpp @@ -0,0 +1,210 @@ + +#include "precompiled.h" +#include "def_ulduar.h" + +#define SP_ATTUNED_TO_NATURE 62519 //increases healing, start at 150 stacks +#define SP_TOUCH_OF_EONAR 62528 //heals Freya, 6k per second +#define H_SP_TOUCH_OF_EONAR 62892 //heals Freya, 24k per second +#define SP_SUNBEAM 62623 +#define H_SP_SUNBEAM 62872 +#define SP_BERSERK 47008 + + +#define CR_DETONATING_LASHER 32918 +#define CR_ANCIENT_CONSERVATOR 33203 +#define CR_WATER_SPIRIT 33202 +#define CR_STORM_LASHER 32919 +#define CR_SNAPLASHER 32916 + +class MANGOS_DLL_DECL AttunedToNatureAura : public Aura +{ + public: + AttunedToNatureAura(const SpellEntry *spell, uint32 eff, int32 *bp, Unit *target, Unit *caster) : Aura(spell, eff, bp, target, caster, NULL) + {} +}; + +struct MANGOS_DLL_DECL boss_freyaAI : public ScriptedAI +{ + boss_freyaAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Heroic = m_creature->GetMap()->IsHeroic(); + + bp = 8; + sp = GetSpellStore()->LookupEntry(SP_ATTUNED_TO_NATURE); + if(!m_creature->HasAura(SP_ATTUNED_TO_NATURE, 0)) + m_creature->AddAura(new AttunedToNatureAura(sp, 0, &bp, m_creature, m_creature)); + m_creature->GetAura(SP_ATTUNED_TO_NATURE, 0)->SetStackAmount(150); + + Reset(); + } + + uint32 SummonTimer; + uint32 WaveNumber; + uint32 WaveType; + uint32 WaveTypeInc; + uint32 SunbeamTimer; + uint32 EnrageTimer; + + bool Heroic; + ScriptedInstance *pInstance; + SpellEntry const *sp; + int32 bp; + + void Reset() + { + SummonTimer = 15000; + WaveNumber = 0; + WaveType = irand(0,2); + WaveTypeInc = irand(1,2); + SunbeamTimer = rand()%10000; + EnrageTimer = 600000; //10 minutes + + if(!m_creature->HasAura(SP_ATTUNED_TO_NATURE, 0)) + m_creature->AddAura(new AttunedToNatureAura(sp, 0, &bp, m_creature, m_creature)); + m_creature->GetAura(SP_ATTUNED_TO_NATURE, 0)->SetStackAmount(150); + + if(pInstance) pInstance->SetData(TYPE_FREYA, NOT_STARTED); + } + + void Aggro(Unit *who) + { + if(!m_creature->HasAura(SP_ATTUNED_TO_NATURE, 0)) + m_creature->AddAura(new AttunedToNatureAura(sp, 0, &bp, m_creature, m_creature)); + m_creature->GetAura(SP_ATTUNED_TO_NATURE, 0)->SetStackAmount(150); + + DoCast(m_creature, Heroic ? H_SP_TOUCH_OF_EONAR : SP_TOUCH_OF_EONAR); + + if(pInstance) pInstance->SetData(TYPE_FREYA, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_FREYA, DONE); + } + + void SummonLashers() + { + int i; + float x,y; + for(i=0; i<10; ++i) + { + x = (rand_norm() * 30.0f) - 15.0f; + y = (rand_norm() * 30.0f) - 15.0f; + Creature *lasher = DoSpawnCreature(CR_DETONATING_LASHER, x, y, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 2000); + Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + if(lasher && target) + lasher->AddThreat(target, 1.0f); + } + } + + void SummonConservator() + { + float x = (rand_norm() * 30.0f) - 15.0f; + float y = (rand_norm() * 30.0f) - 15.0f; + Creature *add = DoSpawnCreature(CR_ANCIENT_CONSERVATOR, x, y, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 2000); + Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + if(add && target) + add->AddThreat(target, 1.0f); + } + + void SummonElementals() + { + Creature *add; + Unit *target; + add = DoSpawnCreature(CR_WATER_SPIRIT, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 2000); + target = SelectUnit(SELECT_TARGET_RANDOM, 0); + if(add && target) + add->AddThreat(target, 1.0f); + + add = DoSpawnCreature(CR_STORM_LASHER, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 2000); + target = SelectUnit(SELECT_TARGET_RANDOM, 0); + if(add && target) + add->AddThreat(target, 1.0f); + + add = DoSpawnCreature(CR_SNAPLASHER, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 2000); + target = SelectUnit(SELECT_TARGET_RANDOM, 0); + if(add && target) + add->AddThreat(target, 1.0f); + } + + void SummonedCreatureDespawn(Creature* mob) + { + if(!m_creature->HasAura(SP_ATTUNED_TO_NATURE, 0)) return; + + switch(mob->GetEntry()) + { + case CR_DETONATING_LASHER: + if(m_creature->GetAura(SP_ATTUNED_TO_NATURE, 0)->modStackAmount(-2)) + m_creature->RemoveAurasDueToSpell(SP_ATTUNED_TO_NATURE); + break; + case CR_ANCIENT_CONSERVATOR: + if(m_creature->GetAura(SP_ATTUNED_TO_NATURE, 0)->modStackAmount(-25)) + m_creature->RemoveAurasDueToSpell(SP_ATTUNED_TO_NATURE); + break; + case CR_SNAPLASHER: + case CR_STORM_LASHER: + case CR_WATER_SPIRIT: + if(m_creature->GetAura(SP_ATTUNED_TO_NATURE, 0)->modStackAmount(-10)) + m_creature->RemoveAurasDueToSpell(SP_ATTUNED_TO_NATURE); + + } + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Phase 1, waves of adds + if(WaveNumber < 6) + { + if(SummonTimer < diff) + { + switch(WaveType) + { + case 0: SummonLashers(); break; + case 1: SummonConservator(); break; + case 2: SummonElementals(); break; + } + WaveType = (WaveType + WaveTypeInc) % 3; + ++WaveNumber; + SummonTimer = 60000; + } + else SummonTimer -= diff; + } + + + //All phases + if(SunbeamTimer < diff) + { + if( Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(target, Heroic ? H_SP_SUNBEAM : SP_SUNBEAM); + SunbeamTimer = 6000 + rand()%10000; + } + else SunbeamTimer -= diff; + + if(EnrageTimer < diff) + { + DoCast(m_creature, SP_BERSERK); + EnrageTimer = 30000; + } + else EnrageTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_freya(Creature* pCreature) +{ + return new boss_freyaAI(pCreature); +} + +void AddSC_boss_freya() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_freya"; + newscript->GetAI = &GetAI_boss_freya; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/ulduar/ulduar/boss_hodir.cpp b/scripts/northrend/ulduar/ulduar/boss_hodir.cpp new file mode 100644 index 000000000..627f13060 --- /dev/null +++ b/scripts/northrend/ulduar/ulduar/boss_hodir.cpp @@ -0,0 +1,128 @@ + +#include "precompiled.h" +#include "def_ulduar.h" + +#define SP_ENRAGE 26662 + +#define SP_FROZEN_BLOWS 62478 +#define H_SP_FROZEN_BLOWS 63512 +#define SP_FREEZE 62469 + +#define SAY_AGGRO -1603012 +#define SAY_DEATH -1603013 +#define SAY_SLAY01 -1603014 +#define SAY_SLAY02 -1603015 +#define SAY_FLASH_FREEZE -1603016 +#define SAY_FROZEN_BLOWS -1603017 +#define SOUND_FROZEN_BLOWS 15556 + +struct MANGOS_DLL_DECL boss_hodirAI : public ScriptedAI +{ + boss_hodirAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Heroic = m_creature->GetMap()->IsHeroic(); + Reset(); + } + + bool Heroic; + ScriptedInstance *pInstance; + + uint64 SpeedKillTimer; + uint64 EnrageTimer; + uint64 FlashFreezeTimer; + uint64 FrozenBlowsTimer; + uint64 FreezeTimer; + + void Reset() + { + SpeedKillTimer = 180000; + EnrageTimer = 480000; + FlashFreezeTimer = 50000; + FrozenBlowsTimer = 60000; + FreezeTimer = 40000; + + if(pInstance) pInstance->SetData(TYPE_HODIR, NOT_STARTED); + } + + void Aggro(Unit *who) + { + if(pInstance) pInstance->SetData(TYPE_HODIR, IN_PROGRESS); + + DoScriptText(SAY_AGGRO, m_creature); + } + + void JustDied(Unit *killer) + { + if(pInstance) + { + if(SpeedKillTimer > 0) + pInstance->SetData(TYPE_HODIR_HARD, DONE); + else + pInstance->SetData(TYPE_HODIR, DONE); + } + DoScriptText(SAY_DEATH, m_creature); + } + + void KilledUnit(Unit *who) + { + if(irand(0,1)) + DoScriptText(SAY_SLAY01, m_creature); + else + DoScriptText(SAY_SLAY02, m_creature); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + SpeedKillTimer -= diff; + + if(FlashFreezeTimer < diff) + { + DoScriptText(SAY_FLASH_FREEZE, m_creature); + FlashFreezeTimer = 60000; + } + else FlashFreezeTimer -= diff; + + if(FrozenBlowsTimer < diff) + { + DoPlaySoundToSet(m_creature, SOUND_FROZEN_BLOWS); + DoCast(m_creature, Heroic ? H_SP_FROZEN_BLOWS : SP_FROZEN_BLOWS); + FrozenBlowsTimer = 60000; + } + else FrozenBlowsTimer -= diff; + + if(FreezeTimer < diff) + { + Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + if(target) DoCast(target, SP_FREEZE); + FreezeTimer = 60000; + } + else FreezeTimer -= diff; + + if(EnrageTimer < diff) + { + DoCast(m_creature, SP_ENRAGE); + EnrageTimer = 30000; + } + else EnrageTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_hodir(Creature* pCreature) +{ + return new boss_hodirAI(pCreature); +} + +void AddSC_boss_hodir() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_hodir"; + newscript->GetAI = &GetAI_boss_hodir; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/ulduar/ulduar/boss_ignis.cpp b/scripts/northrend/ulduar/ulduar/boss_ignis.cpp new file mode 100644 index 000000000..1fe59fb99 --- /dev/null +++ b/scripts/northrend/ulduar/ulduar/boss_ignis.cpp @@ -0,0 +1,111 @@ + + +#include "precompiled.h" +#include "def_ulduar.h" + + +#define SP_FLAME_JETS 62680 +#define H_SP_FLAME_JETS 63472 +#define SP_SCORCH 62546 +#define H_SP_SCORCH 63474 +#define SP_SLAG_POT 62717 +#define H_SP_SLAG_POT 63477 +#define SP_STRENGTH_OF_THE_CREATOR 64473 + +#define CR_CONSTRUCT 34085 + +struct MANGOS_DLL_DECL boss_ignisAI : public ScriptedAI +{ + boss_ignisAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Heroic = m_creature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance *pInstance; + bool Heroic; + //Timers + uint32 ScorchTimer; + uint32 SlagPotTimer; + uint32 FlameJetsTimer; + uint32 SummonTimer; + + void Reset() + { + ScorchTimer = 25000; + SlagPotTimer = 15000; + FlameJetsTimer = 20000; + SummonTimer = 40000 + rand()%20000; + + if(pInstance) pInstance->SetData(TYPE_IGNIS, NOT_STARTED); + } + + void Aggro(Unit* who) + { + if(pInstance) pInstance->SetData(TYPE_IGNIS, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_IGNIS, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (ScorchTimer < diff) + { + DoCast(m_creature->getVictim(), Heroic ? H_SP_SCORCH : SP_SCORCH); + ScorchTimer = 25000; + } + else ScorchTimer -= diff; + + if (FlameJetsTimer < diff) + { + DoCast(m_creature->getVictim(), Heroic ? H_SP_FLAME_JETS : SP_FLAME_JETS); + FlameJetsTimer = 20000+rand()%10000; + } + else FlameJetsTimer -= diff; + + /*if (SlagPotTimer < diff) + { + Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + if(target && target->isAlive()) + DoCast(target, Heroic ? H_SP_SLAG_POT : SP_SLAG_POT); + SlagPotTimer = 15000; + } + else SlagPotTimer -= diff;*/ + + if (SummonTimer < diff) + { + Creature *construct; + construct = DoSpawnCreature(CR_CONSTRUCT, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); + Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + if(construct && target && target->isAlive()) + { + construct->AddThreat(target, 1.0f); + } + SummonTimer = 60000+rand()%30000; + } + else SummonTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_ignisAI(Creature* pCreature) +{ + return new boss_ignisAI(pCreature); +} + +void AddSC_boss_ignis() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_ignis"; + newscript->GetAI = &GetAI_boss_ignisAI; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/ulduar/ulduar/boss_iron_council.cpp b/scripts/northrend/ulduar/ulduar/boss_iron_council.cpp new file mode 100644 index 000000000..152342f66 --- /dev/null +++ b/scripts/northrend/ulduar/ulduar/boss_iron_council.cpp @@ -0,0 +1,280 @@ + + +#include "precompiled.h" +#include "def_ulduar.h" + +#define SP_SUPERCHARGE 61920 + +//Steelbreaker spells +#define SP_HIGH_VOLTAGE 61890 +#define H_SP_HIGH_VOLTAGE 63498 +#define SP_FUSION_PUNCH 61903 +#define H_SP_FUSION_PUNCH 63493 + +//Stormcaller Brundir spells +#define SP_CHAIN_LIGHTNING 61879 +#define H_SP_CHAIN_LIGHTNING 63479 +#define SP_OVERLOAD 61869 +#define H_SP_OVERLOAD 63481 + +//Runemaster Molgeim spells +#define SP_RUNE_OF_DEATH 62269 +#define H_SP_RUNE_OF_DEATH 63490 +#define CR_LIGHTNING_ELEMENTAL 32958 + +#define CR_STEELBREAKER 32867 +#define CR_BRUNDIR 32857 +#define CR_MOLGEIM 32927 + + +struct MANGOS_DLL_DECL iron_councilAI : public ScriptedAI +{ + iron_councilAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Heroic = m_creature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance *pInstance; + bool Heroic; + int CouncilAlive; + + void Reset() + { + if(pInstance) + { + RespawnFriends(); + CouncilAlive = 3; + pInstance->SetData(TYPE_IRON_COUNCIL, NOT_STARTED); + } + } + + void EnterCombat(Unit *who) + { + if(!who) return; + if(!pInstance) return; + + uint32 entry = m_creature->GetEntry(); + Creature *council; + + if(entry!=CR_STEELBREAKER) + { + council = pInstance->instance->GetCreature(pInstance->GetData64(NPC_STEELBREAKER)); + if(council && !council->getVictim()) council->AddThreat(who, 0.0f); + }; + if(entry!=CR_BRUNDIR) + { + council = pInstance->instance->GetCreature(pInstance->GetData64(NPC_BRUNDIR)); + if(council && !council->getVictim()) council->AddThreat(who, 0.0f); + }; + if(entry!=CR_MOLGEIM) + { + council = pInstance->instance->GetCreature(pInstance->GetData64(NPC_MOLGEIM)); + if(council && !council->getVictim()) council->AddThreat(who, 0.0f); + }; + + pInstance->SetData(TYPE_IRON_COUNCIL, IN_PROGRESS); + + Aggro(who); + } + + void JustDied(Unit *killer) + { + if(!pInstance) return; + + --CouncilAlive; + if(CouncilAlive <= 0) pInstance->SetData(TYPE_IRON_COUNCIL, DONE); + } + + void RespawnFriends() + { + if(!pInstance) return; + + Creature *council; + council = pInstance->instance->GetCreature(pInstance->GetData64(NPC_STEELBREAKER)); + if(council && council->isDead()) council->Respawn(); + council = pInstance->instance->GetCreature(pInstance->GetData64(NPC_BRUNDIR)); + if(council && council->isDead()) council->Respawn(); + council = pInstance->instance->GetCreature(pInstance->GetData64(NPC_MOLGEIM)); + if(council && council->isDead()) council->Respawn(); + } +}; + + +/************************************** + Steelbreakeer +**************************************/ +struct MANGOS_DLL_DECL boss_steelbreakerAI : public iron_councilAI +{ + boss_steelbreakerAI(Creature* pCreature) : iron_councilAI(pCreature) + { + Reset(); + } + + uint32 PunchTimer; + + void Reset() + { + PunchTimer = 30000; + //iron_councilAI::Reset(); + } + + void Aggro(Unit *who) + { + DoCast(m_creature, Heroic ? H_SP_HIGH_VOLTAGE : SP_HIGH_VOLTAGE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if(PunchTimer < diff) + { + DoCast(m_creature->getVictim(), Heroic ? H_SP_FUSION_PUNCH : SP_FUSION_PUNCH); + PunchTimer = 30000; + } + else PunchTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +/************************************ + Stormcaller Brundir +************************************/ +struct MANGOS_DLL_DECL boss_brundirAI : public iron_councilAI +{ + boss_brundirAI(Creature* pCreature) : iron_councilAI(pCreature) + { + Reset(); + } + + uint32 LightningTimer; + uint32 OverloadTimer; + + void Reset() + { + LightningTimer = 5000 + rand()%5000; + OverloadTimer = 60000; + //iron_councilAI::Reset(); + } + + void Aggro(Unit *who) + { + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if(OverloadTimer < diff) + { + DoCast(m_creature->getVictim(), Heroic ? H_SP_OVERLOAD : SP_OVERLOAD); + OverloadTimer = 60000; + } + else OverloadTimer -= diff; + + if(LightningTimer < diff) + { + Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + if(target && target->isAlive()) + DoCast(target, Heroic ? H_SP_CHAIN_LIGHTNING : SP_CHAIN_LIGHTNING); + LightningTimer = 5000 + rand()%5000; + } + else LightningTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + + +/************************************ + Runemaster Molgeim +************************************/ +struct MANGOS_DLL_DECL boss_molgeimAI : public iron_councilAI +{ + boss_molgeimAI(Creature* pCreature) : iron_councilAI(pCreature) + { + Reset(); + } + + uint32 ElementalTimer; + uint32 DeathRuneTimer; + + void Reset() + { + ElementalTimer = 15000 + rand()%10000; + DeathRuneTimer = 15000; + //iron_councilAI::Reset(); + } + + void Aggro(Unit *who) + { + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + /*if(ElementalTimer < diff) + { + Creature *elem = DoSpawnCreature(CR_LIGHTNING_ELEMENTAL, 0,0,0,0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); + Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + if(elem && target && target->isAlive()) + elem->AddThreat(target, 1.0f); + ElementalTimer = 15000 + rand()%10000; + } + else ElementalTimer -= diff;*/ + + if(CouncilAlive < 3) + { + if(DeathRuneTimer < diff) + { + Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + if(target) DoCast(target, Heroic ? H_SP_RUNE_OF_DEATH : SP_RUNE_OF_DEATH); + } + } + + DoMeleeAttackIfReady(); + } +}; + + +CreatureAI* GetAI_boss_steelbreaker(Creature* pCreature) +{ + return new boss_steelbreakerAI(pCreature); +} + +CreatureAI* GetAI_boss_brundir(Creature* pCreature) +{ + return new boss_brundirAI(pCreature); +} + +CreatureAI* GetAI_boss_molgeim(Creature* pCreature) +{ + return new boss_molgeimAI(pCreature); +} + +void AddSC_boss_iron_council() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_steelbreaker"; + newscript->GetAI = &GetAI_boss_steelbreaker; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_brundir"; + newscript->GetAI = &GetAI_boss_brundir; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_molgeim"; + newscript->GetAI = &GetAI_boss_molgeim; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp b/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp new file mode 100644 index 000000000..feb0046cd --- /dev/null +++ b/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp @@ -0,0 +1,309 @@ + +#include "precompiled.h" +#include "def_ulduar.h" + +#define SP_OVERHEAD_SMASH_2H 63356 //64710 +#define SP_OVERHEAD_SMASH_1H 63573 //64715 +#define SP_STONE_SHOUT 64004 +#define SP_PETRIFYING_BREATH 62030 +#define H_SP_PETRIFYING_BREATH 63980 +#define SP_FOCUSED_EYEBEAM 63346 +#define H_SP_FOCUSED_EYEBEAM 63976 + +#define SP_BERSERK 64238 + +#define SP_SHOCKWAVE 63783 +#define H_SP_SHOCKWAVE 63982 + +#define SP_STONE_GRIP 62056 +#define H_SP_STONE_GRIP 63985 + +#define CR_RUBBLE 33768 + +#define LEFT 0x01 //01 +#define RIGHT 0x02 //10 + + +struct MANGOS_DLL_DECL boss_kologarnAI : public Scripted_NoMovementAI +{ + boss_kologarnAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Heroic = m_creature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance *pInstance; + bool Heroic; + uint32 BreathTimer; + uint32 SmashTimer; + uint32 EnrageTimer; + uint8 arms; + uint32 LeftArmRespawn; + uint32 RightArmRespawn; + + void Reset() + { + BreathTimer = 5000; + SmashTimer = 10000+rand()%5000; + EnrageTimer = 600000; + arms = LEFT & RIGHT; + if(pInstance) + { + pInstance->SetData(TYPE_KOLOGARN, NOT_STARTED); + Creature *arm = NULL; + arm = (Creature *) Unit::GetUnit((*m_creature), pInstance->GetData64(NPC_KOLOGARN_LEFT_ARM)); + if(arm) arm->Respawn(); + arm = (Creature *) Unit::GetUnit((*m_creature), pInstance->GetData64(NPC_KOLOGARN_RIGHT_ARM)); + if(arm) arm->Respawn(); + } + LeftArmRespawn = 30000; + RightArmRespawn = 30000; + } + + void ArmDied(int arm) + { + arms = arms & !arm; + } + + void Aggro(Unit *who) + { + if(pInstance) + { + pInstance->SetData(TYPE_KOLOGARN, IN_PROGRESS); + /*Creature *arm = NULL; + arm = (Creature *) Unit::GetUnit((*m_creature), pInstance->GetData64(NPC_KOLOGARN_LEFT_ARM)); + if(arm) arm->Respawn(); + arm = (Creature *) Unit::GetUnit((*m_creature), pInstance->GetData64(NPC_KOLOGARN_RIGHT_ARM)); + if(arm) arm->Respawn();*/ + } + } + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_KOLOGARN, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if(BreathTimer < diff) + { + if(!m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE)) + DoCast(m_creature->getVictim(), Heroic ? H_SP_PETRIFYING_BREATH : SP_PETRIFYING_BREATH); + BreathTimer = 5000; + } + else BreathTimer -= diff; + + if(pInstance) + { + if((arms & LEFT) != LEFT) + { + if(LeftArmRespawn < diff) + { + Creature *arm = NULL; + arm = (Creature *) Unit::GetUnit((*m_creature), pInstance->GetData64(NPC_KOLOGARN_LEFT_ARM)); + if(arm) arm->Respawn(); + } + else LeftArmRespawn -= diff; + } + + if((arms & RIGHT) != RIGHT) + { + if(RightArmRespawn < diff) + { + Creature *arm = NULL; + arm = (Creature *) Unit::GetUnit((*m_creature), pInstance->GetData64(NPC_KOLOGARN_RIGHT_ARM)); + if(arm) arm->Respawn(); + } + else RightArmRespawn -= diff; + } + } + + if(SmashTimer < diff) + { + if(arms== (LEFT & RIGHT)) DoCast(m_creature->getVictim(), SP_OVERHEAD_SMASH_2H); + if(arms==LEFT || arms==RIGHT) DoCast(m_creature->getVictim(), SP_OVERHEAD_SMASH_1H); + //if(arms==0) DoCast(m_creature->getVictim(), SP_STONE_SHOUT); + SmashTimer = 10000 + rand()%5000; + } + else SmashTimer -= diff; + + if(EnrageTimer < diff) + { + DoCast(m_creature, SP_BERSERK); + EnrageTimer = 30000; + } + else EnrageTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +struct MANGOS_DLL_DECL boss_kologarn_left_armAI : public Scripted_NoMovementAI +{ + boss_kologarn_left_armAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Heroic = m_creature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance *pInstance; + bool Heroic; + uint32 ShockwaveTimer; + + void Reset() + { + ShockwaveTimer = 20000 + rand()%10000; + } + + void Aggro(Unit *who) {} + + void JustDied(Unit *killer) + { + Creature *kologarn = (Creature *) Unit::GetUnit((*m_creature), pInstance->GetData64(NPC_KOLOGARN)); + if(kologarn && kologarn->isAlive()) + { + kologarn->DealDamage(kologarn, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + ((boss_kologarnAI *)kologarn->AI())->ArmDied(LEFT); + } + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if(ShockwaveTimer < diff) + { + DoCast(m_creature->getVictim(), SP_SHOCKWAVE); + ShockwaveTimer = 20000 + rand()%10000; + } + else ShockwaveTimer -= diff; + } +}; + +struct MANGOS_DLL_DECL boss_kologarn_right_armAI : public Scripted_NoMovementAI +{ + boss_kologarn_right_armAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Heroic = m_creature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance *pInstance; + bool Heroic; + uint32 GripThreshold; + uint32 GripTimer; + Unit *GrippedPlayer; + bool Gripped; + + void Reset() + { + GrippedPlayer = NULL; + Gripped = false; + GripTimer = 10000 + rand()%10000; + GripThreshold = Heroic ? 480000 : 100000; + } + + void Aggro(Unit *who) {} + + void JustDied(Unit *killer) + { + Creature *kologarn = (Creature *) Unit::GetUnit((*m_creature), pInstance->GetData64(NPC_KOLOGARN)); + if(kologarn && kologarn->isAlive()) + { + kologarn->DealDamage(kologarn, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + ((boss_kologarnAI *)kologarn->AI())->ArmDied(RIGHT); + } + + //summon rubbles + Creature *rubble; + Unit *target; + for(int i=0; i<5; i++) + { + rubble = DoSpawnCreature(CR_RUBBLE, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); + target = SelectUnit(SELECT_TARGET_RANDOM, 0); + if(rubble && target && target->isAlive()) + rubble->AddThreat(target, 1.0f); + } + } + + void DamageTaken(Unit *done_by, uint32 &dmg) + { + if(Gripped) GripThreshold -= dmg; + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if(Gripped) + { + if(!GrippedPlayer || GrippedPlayer->isDead() || GripThreshold < 0) + { + //release gripped player + //GrippedPlayer->RemoveAurasDueToSpell(SP_STONE_GRIP); + GrippedPlayer = NULL; + GripTimer = 10000 + rand()%10000; + Gripped = false; + GripThreshold = Heroic ? 400000 : 100000; + } + } + else + { + if(GripTimer < diff) + { + GrippedPlayer = SelectUnit(SELECT_TARGET_RANDOM, 0); + if(GrippedPlayer && GrippedPlayer->isAlive()) + { + //grip player + //DoCast(GrippedPlayer, SP_STONE_GRIP); + Gripped = true; + } + else GripTimer = 5000; + } + else GripTimer -= diff; + } + } +}; + +CreatureAI* GetAI_boss_kologarn(Creature* pCreature) +{ + return new boss_kologarnAI(pCreature); +} + +CreatureAI* GetAI_boss_kologarn_left_arm(Creature* pCreature) +{ + return new boss_kologarn_left_armAI(pCreature); +} + +CreatureAI* GetAI_boss_kologarn_right_arm(Creature* pCreature) +{ + return new boss_kologarn_right_armAI(pCreature); +} + +void AddSC_boss_kologarn() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_kologarn"; + newscript->GetAI = &GetAI_boss_kologarn; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_kologarn_left_arm"; + newscript->GetAI = &GetAI_boss_kologarn_left_arm; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_kologarn_right_arm"; + newscript->GetAI = &GetAI_boss_kologarn_right_arm; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/ulduar/ulduar/boss_leviathan.cpp b/scripts/northrend/ulduar/ulduar/boss_leviathan.cpp new file mode 100644 index 000000000..2958b4700 --- /dev/null +++ b/scripts/northrend/ulduar/ulduar/boss_leviathan.cpp @@ -0,0 +1,114 @@ + + +#include "precompiled.h" +#include "def_ulduar.h" + +#define SP_BATTERING_RAM 62376 +#define SP_FLAME_VENTS 62396 +#define SP_GATHERING_SPEED 62375 + +#define SP_ROCKET 62400 + +#define SAY_AGGRO -1603009 +#define SAY_DEATH -1603010 +#define SAY_SLAY -1603011 + + + + +struct MANGOS_DLL_DECL boss_flame_leviathan : public ScriptedAI +{ + boss_flame_leviathan(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Heroic = m_creature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance *pInstance; + bool Heroic; + + uint32 BatteringRamTimer; + uint32 FlameVentsTimer; + uint32 RocketTimer; + + void Reset() + { + BatteringRamTimer = 15000 + rand()%20000; + FlameVentsTimer = 20000 + rand()%10000; + RocketTimer = 1000; + + if(pInstance) pInstance->SetData(TYPE_FLAME_LEVIATHAN, NOT_STARTED); + } + + void Aggro(Unit *who) + { + if(pInstance) pInstance->SetData(TYPE_FLAME_LEVIATHAN, IN_PROGRESS); + + DoScriptText(SAY_AGGRO, m_creature); + } + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_FLAME_LEVIATHAN, DONE); + + DoScriptText(SAY_DEATH, m_creature); + } + + void KilledUnit(Unit *who) + { + DoScriptText(SAY_SLAY, m_creature); + } + + void DamageTaken(Unit *pDoneBy, uint32 &dmg) + { + // + dmg *= 4; + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if(FlameVentsTimer < diff) + { + DoCast(m_creature->getVictim(), SP_FLAME_VENTS); + FlameVentsTimer = 30000 + rand()%20000; + } + else FlameVentsTimer -= diff; + + if(BatteringRamTimer < diff) + { + DoCast(m_creature->getVictim(), SP_BATTERING_RAM); + BatteringRamTimer = 25000 + rand()%15000; + } + else BatteringRamTimer -= diff; + + if(RocketTimer < diff) + { + Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + int32 dmg = Heroic ? (3000 + rand()%2000) : (2000 + rand()%1200); + if(target && target->isAlive()) + m_creature->CastCustomSpell(target, SP_ROCKET, &dmg, 0, 0, false); + RocketTimer = 3000 + rand()%2000; + } + else RocketTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_flame_leviathan(Creature* pCreature) +{ + return new boss_flame_leviathan(pCreature); +} + +void AddSC_boss_leviathan() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_flame_leviathan"; + newscript->GetAI = &GetAI_boss_flame_leviathan; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp b/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp new file mode 100644 index 000000000..c572efe4a --- /dev/null +++ b/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp @@ -0,0 +1,53 @@ + +#include "precompiled.h" +#include "def_ulduar.h" + +struct MANGOS_DLL_DECL boss_mimironAI : public ScriptedAI +{ + boss_mimironAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Heroic = m_creature->GetMap()->IsHeroic(); + Reset(); + } + + bool Heroic; + ScriptedInstance *pInstance; + + void Reset() + { + if(pInstance) pInstance->SetData(TYPE_MIMIRON, NOT_STARTED); + } + + void Aggro(Unit *who) + { + if(pInstance) pInstance->SetData(TYPE_MIMIRON, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_MIMIRON, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_mimiron(Creature* pCreature) +{ + return new boss_mimironAI(pCreature); +} + +void AddSC_boss_mimiron() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_mimiron"; + newscript->GetAI = &GetAI_boss_mimiron; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp b/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp new file mode 100644 index 000000000..d42d57ba7 --- /dev/null +++ b/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp @@ -0,0 +1,141 @@ + + + +#include "precompiled.h" +#include "def_ulduar.h" + +#define SP_DEVOURING_FLAME1 63236 //animation? +#define SP_DEVOURING_FLAME 63014 +#define H_SP_DEVOURING_FLAME 63816 +#define SP_FIREBALL 62796 //only air phase +#define H_SP_FIREBALL 63815 +#define SP_FLAME_BUFFET 64016 +#define H_SP_FLAME_BUFFET 64023 +#define SP_WING_BUFFET 62666 +#define SP_BERSERK 47008 +#define SP_FLAME_BREATH 63317 +#define H_SP_FLAME_BREATH 64021 +#define SP_FUSE_ARMOR 64771 + + + + +struct MANGOS_DLL_DECL boss_razorscaleAI : public ScriptedAI +{ + boss_razorscaleAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Heroic = m_creature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance *pInstance; + bool Heroic; + //Timers + uint32 BerserkTimer; + uint32 DevouringFlameTimer; + uint32 FlameBuffetTimer; + uint32 WingBuffetTimer; + uint32 FlameBreathTimer; + uint32 FuseArmorTimer; + uint32 FireballTimer; + + + void Reset() + { + BerserkTimer = 420000; //7 minutes + DevouringFlameTimer = 10000+rand()%10000; //every 10 sec + FlameBuffetTimer = 20000+rand()%15000; //every 10-15 seconds + WingBuffetTimer = 30000 + rand()%60000; //completely random + FlameBreathTimer = 15000+rand()%5000; //every 15 sec + FuseArmorTimer = 10000+rand()%5000; //every 10 seconds + FireballTimer = 5000 + rand()%5000; + + if(pInstance) pInstance->SetData(TYPE_RAZORSCALE, NOT_STARTED); + } + + void Aggro(Unit* who) + { + if(pInstance) pInstance->SetData(TYPE_RAZORSCALE, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_RAZORSCALE, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (FuseArmorTimer < diff) + { + DoCast(m_creature->getVictim(), SP_FUSE_ARMOR); + FuseArmorTimer = 10000; + } + else FuseArmorTimer -= diff; + + if (WingBuffetTimer < diff) + { + DoCast(m_creature->getVictim(), SP_WING_BUFFET); + WingBuffetTimer = 30000 + rand()%60000; + } + else WingBuffetTimer -= diff; + + if (DevouringFlameTimer < diff) + { + Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + if(target && target->isAlive()) + DoCast(target, Heroic ? H_SP_DEVOURING_FLAME : SP_DEVOURING_FLAME); + DevouringFlameTimer = 9000+rand()%3000; + } + else DevouringFlameTimer -= diff; + + if (FlameBreathTimer < diff) + { + DoCast(m_creature->getVictim(), Heroic ? H_SP_FLAME_BREATH : SP_FLAME_BREATH); + FlameBreathTimer = 15000 + rand()%5000; + } + else FlameBreathTimer -= diff; + + if (FlameBuffetTimer < diff) + { + DoCast(m_creature, Heroic ? H_SP_FLAME_BUFFET : SP_FLAME_BUFFET, true); + FlameBuffetTimer = 20000 + rand()%15000; + } + else FlameBuffetTimer -= diff; + + if (FireballTimer < diff) + { + Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + if(target && target->isAlive()) + DoCast(target, Heroic ? H_SP_FIREBALL : SP_FIREBALL); + FireballTimer = 4000 + rand()%4000; + } + else FireballTimer -= diff; + + if (BerserkTimer < diff) + { + DoCast(m_creature, SP_BERSERK); + BerserkTimer = 30000; + } + else BerserkTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_razorscaleAI(Creature* pCreature) +{ + return new boss_razorscaleAI(pCreature); +} + +void AddSC_boss_razorscale() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_razorscale"; + newscript->GetAI = &GetAI_boss_razorscaleAI; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/ulduar/ulduar/boss_thorim.cpp b/scripts/northrend/ulduar/ulduar/boss_thorim.cpp new file mode 100644 index 000000000..84c3c95dc --- /dev/null +++ b/scripts/northrend/ulduar/ulduar/boss_thorim.cpp @@ -0,0 +1,53 @@ + +#include "precompiled.h" +#include "def_ulduar.h" + +struct MANGOS_DLL_DECL boss_thorimAI : public ScriptedAI +{ + boss_thorimAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Heroic = m_creature->GetMap()->IsHeroic(); + Reset(); + } + + bool Heroic; + ScriptedInstance *pInstance; + + void Reset() + { + if(pInstance) pInstance->SetData(TYPE_THORIM, NOT_STARTED); + } + + void Aggro(Unit *who) + { + if(pInstance) pInstance->SetData(TYPE_THORIM, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_THORIM, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_thorim(Creature* pCreature) +{ + return new boss_thorimAI(pCreature); +} + +void AddSC_boss_thorim() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_thorim"; + newscript->GetAI = &GetAI_boss_thorim; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/ulduar/ulduar/boss_vezax.cpp b/scripts/northrend/ulduar/ulduar/boss_vezax.cpp new file mode 100644 index 000000000..5fdd53686 --- /dev/null +++ b/scripts/northrend/ulduar/ulduar/boss_vezax.cpp @@ -0,0 +1,85 @@ + +#include "precompiled.h" +#include "def_ulduar.h" + +#define SP_AURA_OF_DESPAIR 62692 +#define SP_SHADOW_CRASH 62660 +#define H_SP_SHADOW_CRASH +#define SP_MARK_OF_FACELESS +#define SP_SEARING_FLAMES +#define SP_SURGE_OF_DARKNESS +#define SP_BERSERK 26662 +#define SP_AURA_OF_DESPAIR 62692 + +struct MANGOS_DLL_DECL boss_vezaxAI : public ScriptedAI +{ + boss_vezaxAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Heroic = m_creature->GetMap()->IsHeroic(); + Reset(); + } + + bool Heroic; + ScriptedInstance *pInstance; + + uint32 EnrageTimer; + /*uint32 CrashTimer; + uint32 MarkTimer; + uint32 FlamesTimer; + uint32 SurgeTimer;*/ + + void Reset() + { + EnrageTimer = 600000; //10 minutes + //FlamesTimer = 10000 + rand()%10000; + if(pInstance) pInstance->SetData(TYPE_VEZAX, NOT_STARTED); + } + + void Aggro(Unit *who) + { + if(pInstance) pInstance->SetData(TYPE_VEZAX, IN_PROGRESS); + DoCast(NULL, SP_AURA_OF_DESPAIR, true); + } + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_VEZAX, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + /*if(FlamesTimer < diff) + { + DoCast(m_creature->getVictim(), SP_SEARING_FLAMES); + FlamesTimer = 10000 + rand()%10000; + } + else FlamesTimer -= diff; */ + + if(EnrageTimer < diff) + { + DoCast(m_creature, SP_BERSERK); + EnrageTimer = 30000; + } + else EnrageTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_vezax(Creature* pCreature) +{ + return new boss_vezaxAI(pCreature); +} + +void AddSC_boss_vezax() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_vezax"; + newscript->GetAI = &GetAI_boss_vezax; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp b/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp new file mode 100644 index 000000000..8aac44f89 --- /dev/null +++ b/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp @@ -0,0 +1,241 @@ + +#include "precompiled.h" +#include "def_ulduar.h" + +#define SP_TANTRUM 62776 +#define SP_SEARING_LIGHT 63018 +#define H_SP_SEARING_LIGHT 65121 +#define SEARING_LIGHT_EFFECT 63023 +#define H_SEARING_LIGHT_EFFECT 65120 +#define SP_ENRAGE 47008 +#define SP_GRAVITY 63024 +#define H_SP_GRAVITY 64234 + + +#define CR_PUMMELER 33344 +#define CR_SCRAPBOT 33343 +#define CR_BOOMBOT 33346 + +#define SAY_AGGRO -1603000 +#define SAY_DEATH -1603008 +#define SAY_TANTRUM -1603001 +#define SAY_SLAY_01 -1603002 +#define SAY_SLAY_02 -1603003 +#define SAY_BERSERK -1603007 +#define SAY_ADDS -1603006 +#define SAY_HEART_OPEN -1603004 +#define SAY_HEART_CLOSE -1603005 + +/* +792.706 64.033 413.632 - 4.823 +879.750 64.815 409.804 - 3.816 +896.488 -93.018 411.731 - 1.858 +791.016 -83.516 409.804 - 0.782 +*/ + +float AddX[4]; +float AddY[4]; +float AddZ[4]; + +struct MANGOS_DLL_DECL boss_xt002 : public ScriptedAI +{ + boss_xt002(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Heroic = m_creature->GetMap()->IsHeroic(); + //PummelerCount = Heroic ? 2 : 1; + ScrapbotCount = Heroic ? 6 : 4; + BoombotCount = Heroic ? 4 : 2; + AddX[0] = 792.706; AddY[0] = 64.033; AddZ[0] = 413.632; + AddX[1] = 879.750; AddY[1] = 64.815; AddZ[1] = 409.804; + AddX[2] = 896.488; AddY[2] = -93.018; AddZ[2] = 411.731; + AddX[3] = 791.016; AddY[3] = -83.516; AddZ[3] = 409.804; + Reset(); + } + + ScriptedInstance *pInstance; + bool Heroic; + + uint32 AddsPhaseTimer; + bool addsPhase; + uint32 addsPhaseNumber; + uint32 NextWaveTimer; + + //uint32 PummelerCount; + uint32 ScrapbotCount; + uint32 BoombotCount; + + uint32 TantrumTimer; + uint32 LightTimer; + uint32 EnrageTimer; + uint32 GravityTimer; + + void Reset() + { + addsPhase = false; + AddsPhaseTimer = 30000; + addsPhaseNumber = 3; + + TantrumTimer = 45000; + LightTimer = 10000; + EnrageTimer = 600000; + GravityTimer = 15000 + rand()%5000; + + if(pInstance) pInstance->SetData(TYPE_XT002, NOT_STARTED); + } + + void Aggro(Unit *who) + { + if(pInstance) pInstance->SetData(TYPE_XT002, IN_PROGRESS); + + DoScriptText(SAY_AGGRO, m_creature); + } + + void DamageTaken(Unit *done_by, uint32 &damage) + { + if(addsPhase) damage += damage; + } + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_XT002, DONE); + + DoScriptText(SAY_DEATH, m_creature); + } + + void KilledUnit(Unit *who) + { + if(irand(0,1)) + DoScriptText(SAY_SLAY_01, m_creature); + else + DoScriptText(SAY_SLAY_02, m_creature); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if(addsPhase) + { + if(AddsPhaseTimer < diff) + { + addsPhase = false; + //make boss active and attackable + SetCombatMovement(true); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + //m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + + DoScriptText(SAY_HEART_CLOSE, m_creature); + } + else AddsPhaseTimer -= diff; + + if(NextWaveTimer < diff) + { + NextWaveTimer = 15000; + int rnd = irand(0,3); + /*if( m_creature->GetDistance2d(AddX[rnd], AddY[rnd]) > 220) + { + EnterEvadeMode(); + return; + }*/ + int i; + Creature *add; + Unit *target; + if(Heroic || (AddsPhaseTimer > 15000)) + { + add = m_creature->SummonCreature(CR_PUMMELER, AddX[rnd], AddY[rnd], AddZ[rnd], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); + add->SetActiveObjectState(true); + target = SelectUnit(SELECT_TARGET_RANDOM, 0); + if(add && target && target->isAlive()) + add->AddThreat(target, 1.0f); + } + for(i=0; i < ScrapbotCount; i++) + { + add = m_creature->SummonCreature(CR_SCRAPBOT, AddX[rnd], AddY[rnd], AddZ[rnd], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); + add->SetActiveObjectState(true); + target = SelectUnit(SELECT_TARGET_RANDOM, 0); + if(add && target && target->isAlive()) + add->AddThreat(target, 1.0f); + } + for(i=0; i < BoombotCount; i++) + { + add = m_creature->SummonCreature(CR_BOOMBOT, AddX[rnd], AddY[rnd], AddZ[rnd], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); + add->SetActiveObjectState(true); + target = SelectUnit(SELECT_TARGET_RANDOM, 0); + if(add && target && target->isAlive()) + add->AddThreat(target, 1.0f); + } + } + else NextWaveTimer -= diff; + } + else + { + if (addsPhaseNumber && ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() <= addsPhaseNumber*25)) + { + addsPhaseNumber--; + addsPhase = true; + AddsPhaseTimer = 30000; + NextWaveTimer = 5000; + //make boss unattackable and inactive + SetCombatMovement(false); + m_creature->GetMotionMaster()->Clear(); + //m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + + DoScriptText(SAY_HEART_OPEN, m_creature); + } + + //regular spells + if(TantrumTimer < diff) + { + DoCast(m_creature->getVictim(), SP_TANTRUM); + TantrumTimer = 45000; + DoScriptText(SAY_TANTRUM, m_creature); + } + else TantrumTimer -= diff; + + if(LightTimer < diff) + { + Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + if(target && target->isAlive()) + DoCast(target, Heroic ? H_SP_SEARING_LIGHT : SP_SEARING_LIGHT); + LightTimer = 10000; + } + else LightTimer -= diff; + + if(GravityTimer < diff) + { + Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + if(target && target->isAlive()) + DoCast(target, Heroic ? H_SP_GRAVITY : SP_GRAVITY); + GravityTimer = 15000 + rand()%5000; + } + else GravityTimer -= diff; + + if(EnrageTimer < diff) + { + DoCast(m_creature, SP_ENRAGE); + EnrageTimer = 60000; + + DoScriptText(SAY_BERSERK, m_creature); + } + else EnrageTimer -= diff; + + DoMeleeAttackIfReady(); + } + } +}; + +CreatureAI* GetAI_boss_xt002(Creature* pCreature) +{ + return new boss_xt002(pCreature); +} + +void AddSC_boss_xt002() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_xt002"; + newscript->GetAI = &GetAI_boss_xt002; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp new file mode 100644 index 000000000..a33ce6d74 --- /dev/null +++ b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp @@ -0,0 +1,56 @@ + +#include "precompiled.h" +#include "def_ulduar.h" + +#define CR_GUARDIAN_OF_YOGG_SARON 33136 +#define CR_IMMORTAL_GUARDIAN 33988 + +struct MANGOS_DLL_DECL boss_yogg_saronAI : public ScriptedAI +{ + boss_yogg_saronAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Heroic = m_creature->GetMap()->IsHeroic(); + Reset(); + } + + bool Heroic; + ScriptedInstance *pInstance; + + void Reset() + { + if(pInstance) pInstance->SetData(TYPE_YOGG_SARON, NOT_STARTED); + } + + void Aggro(Unit *who) + { + if(pInstance) pInstance->SetData(TYPE_YOGG_SARON, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_YOGG_SARON, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_yogg_saron(Creature* pCreature) +{ + return new boss_yogg_saronAI(pCreature); +} + +void AddSC_boss_yogg_saron() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_yogg_saron"; + newscript->GetAI = &GetAI_boss_yogg_saron; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/ulduar/ulduar/def_ulduar.h b/scripts/northrend/ulduar/ulduar/def_ulduar.h new file mode 100644 index 000000000..a70d0e76d --- /dev/null +++ b/scripts/northrend/ulduar/ulduar/def_ulduar.h @@ -0,0 +1,42 @@ + +#ifndef DEF_ULDUAR_H +#define DEF_ULDUAR_H + +enum +{ + TYPE_FLAME_LEVIATHAN = 1, + TYPE_IGNIS, + TYPE_RAZORSCALE, + TYPE_XT002, + TYPE_IRON_COUNCIL, + TYPE_KOLOGARN, + TYPE_AURIAYA, + TYPE_HODIR, + TYPE_FREYA, + TYPE_THORIM, + TYPE_MIMIRON, + TYPE_VEZAX, + TYPE_YOGG_SARON, + TYPE_ALGALON, + + //Hardmodes etc. + TYPE_HODIR_HARD, + TYPE_MIMIRON_HARD, + TYPE_THORIM_HARD, + + TYPE_LEVIATHAN_TP, + TYPE_XT002_TP, + TYPE_MIMIRON_TP, + + TYPE_KEEPERS, + + NPC_KOLOGARN = 100, + NPC_KOLOGARN_RIGHT_ARM, + NPC_KOLOGARN_LEFT_ARM, + NPC_STEELBREAKER, + NPC_MOLGEIM, + NPC_BRUNDIR, +}; + + +#endif diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 083b6da11..ab81d6906 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -1,276 +1,375 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 -* 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, write to the Free Software -* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -/* ScriptData -SDName: Instance_Ulduar -SD%Complete: -SDComment: -SDCategory: Ulduar -EndScriptData */ #include "precompiled.h" -#include "ulduar.h" +#include "def_ulduar.h" + +#define ENCOUNTERS 14 + +//Ancient Gate of the Keepers (194255) +//Ice door after Hodir (194441) +//Runed Stone Door after vezax (194750) + +/* +TODO: Save "reached" variables with encounters for correct teleporter work. +*/ + struct MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance { - instance_ulduar(Map* pMap) : ScriptedInstance(pMap) { Initialize(); } - - uint32 m_auiEncounter[MAX_ENCOUNTER]; - std::string m_strInstData; - - uint64 m_uiLeviathanGUID; - uint64 m_uiIgnisGUID; - uint64 m_uiRazorscaleGUID; - uint64 m_uiXT002GUID; - uint64 m_auiAssemblyGUIDs[3]; - uint64 m_uiKologarnGUID; - uint64 m_uiAuriayaGUID; - uint64 m_uiMimironGUID; - uint64 m_uiHodirGUID; - uint64 m_uiThorimGUID; - uint64 m_uiFreyaGUID; - uint64 m_uiVezaxGUID; - uint64 m_uiYoggSaronGUID; - uint64 m_uiAlgalonGUID; + instance_ulduar(Map* pMap) : ScriptedInstance(pMap) + { + Heroic = pMap->IsHeroic(); + Initialize(); + } - void Initialize() + bool Heroic; + //Creatures GUID + uint64 mKologarnGUID; + uint64 mKologarnLeftArmGUID; + uint64 mKologarnRightArmGUID; + uint64 mSteelbreakerGUID; + uint64 mMolgeimGUID; + uint64 mBrundirGUID; + //GO Guid (Caches) + uint64 mKologarnCacheGUID; + uint64 mHodirCacheGUID; + uint64 mHodirRareCacheGUID; + uint64 mThorimCacheGUID; + uint64 mThorimHardCacheGUID; + uint64 mMimironCacheGUID; + uint64 mMimironHardCacheGUID; + uint64 mAlgalonCacheGUID; + uint64 mFreyaCacheGUID; + uint64 mFreyaHard1CacheGUID; + uint64 mFreyaHard2CacheGUID; + uint64 mFreyaHard3CacheGUID; + //Doors + uint64 mXT002DoorGUID; + uint64 mHodirFrozenDoorGUID; + uint64 mAncientGateGUID; + // + uint32 mEncounter[ENCOUNTERS]; + uint32 mLeviathanReached; + uint32 mXT002Reached; + uint32 mMimironReached; + std::string strSaveData; + //misc + bool KeepersKilled; + bool KeepersKilledHM; + + void OpenDoor(uint64 guid) { - m_uiLeviathanGUID = 0; - m_uiIgnisGUID = 0; - m_uiRazorscaleGUID = 0; - m_uiXT002GUID = 0; - m_uiKologarnGUID = 0; - m_uiAuriayaGUID = 0; - m_uiMimironGUID = 0; - m_uiHodirGUID = 0; - m_uiThorimGUID = 0; - m_uiFreyaGUID = 0; - m_uiVezaxGUID = 0; - m_uiYoggSaronGUID = 0; - m_uiAlgalonGUID = 0; - - memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - memset(&m_auiAssemblyGUIDs, 0, sizeof(m_auiAssemblyGUIDs)); + if(!guid) return; + GameObject* pGo = instance->GetGameObject(guid); + if(pGo) pGo->SetGoState(GO_STATE_ACTIVE); } - bool IsEncounterInProgress() const + void CloseDoor(uint64 guid) { - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) - { - if (m_auiEncounter[i] == IN_PROGRESS) - return true; - } + if(!guid) return; + GameObject* pGo = instance->GetGameObject(guid); + if(pGo) pGo->SetGoState(GO_STATE_READY); + } - return false; + void Initialize() + { + for (uint8 i = 0; i < ENCOUNTERS; ++i) + mEncounter[i] = NOT_STARTED; + + mKologarnGUID = 0; + mKologarnLeftArmGUID = 0; + mKologarnRightArmGUID = 0; + mSteelbreakerGUID = 0; + mMolgeimGUID = 0; + mBrundirGUID = 0; + + mKologarnCacheGUID = 0; + mHodirCacheGUID = 0; + mHodirRareCacheGUID = 0; + mThorimCacheGUID = 0; + mThorimHardCacheGUID = 0; + mMimironCacheGUID = 0; + mMimironHardCacheGUID = 0; + mAlgalonCacheGUID = 0; + mFreyaCacheGUID = 0; + mFreyaHard1CacheGUID = 0; + mFreyaHard2CacheGUID = 0; + mFreyaHard3CacheGUID = 0; + + mXT002DoorGUID = 0; + mHodirFrozenDoorGUID = 0; + mAncientGateGUID = 0; + + mLeviathanReached = 0; + mXT002Reached = 0; + mMimironReached = 0; + + KeepersKilled = false; } void OnCreatureCreate(Creature* pCreature) { switch(pCreature->GetEntry()) { - case NPC_LEVIATHAN: - m_uiLeviathanGUID = pCreature->GetGUID(); - break; - case NPC_IGNIS: - m_uiIgnisGUID = pCreature->GetGUID(); - break; - case NPC_RAZORSCALE: - m_uiRazorscaleGUID = pCreature->GetGUID(); - break; - case NPC_XT002: - m_uiXT002GUID = pCreature->GetGUID(); - break; - - // Assembly of Iron - case NPC_STEELBREAKER: - m_auiAssemblyGUIDs[0] = pCreature->GetGUID(); - break; - case NPC_MOLGEIM: - m_auiAssemblyGUIDs[1] = pCreature->GetGUID(); - break; - case NPC_BRUNDIR: - m_auiAssemblyGUIDs[2] = pCreature->GetGUID(); - break; - - case NPC_KOLOGARN: - m_uiKologarnGUID = pCreature->GetGUID(); - break; - case NPC_AURIAYA: - m_uiAuriayaGUID = pCreature->GetGUID(); - break; - case NPC_MIMIRON: - m_uiMimironGUID = pCreature->GetGUID(); - break; - case NPC_HODIR: - m_uiHodirGUID = pCreature->GetGUID(); - break; - case NPC_THORIM: - m_uiThorimGUID = pCreature->GetGUID(); - break; - case NPC_FREYA: - m_uiFreyaGUID = pCreature->GetGUID(); - break; - case NPC_VEZAX: - m_uiVezaxGUID = pCreature->GetGUID(); - break; - case NPC_YOGGSARON: - m_uiYoggSaronGUID = pCreature->GetGUID(); - break; - case NPC_ALGALON: - m_uiAlgalonGUID = pCreature->GetGUID(); - break; + case 32930: mKologarnGUID = pCreature->GetGUID(); + case 32933: mKologarnLeftArmGUID = pCreature->GetGUID(); + case 32934: mKologarnRightArmGUID = pCreature->GetGUID(); + case 32867: mSteelbreakerGUID = pCreature->GetGUID(); + case 32927: mMolgeimGUID = pCreature->GetGUID(); + case 32857: mBrundirGUID = pCreature->GetGUID(); } } - /*void OnObjectCreate(GameObject *pGo) + void OnObjectCreate(GameObject* pGo) { - }*/ + switch(pGo->GetEntry()) + { + //LOOT CACHES: + //Cache of Living Stone (Kologarn) + case 195046: if(!Heroic) mKologarnCacheGUID = pGo->GetGUID(); break; + case 195047: if(Heroic) mKologarnCacheGUID = pGo->GetGUID(); break; + //Cache of Winter (Hodir) + case 194307: if(!Heroic) mHodirCacheGUID = pGo->GetGUID(); break; + case 194308: if(Heroic) mHodirCacheGUID = pGo->GetGUID(); break; + //Rare Cache of Winter (Hodir hard) + case 194200: if(!Heroic) mHodirRareCacheGUID = pGo->GetGUID(); break; + case 194201: if(Heroic) mHodirRareCacheGUID = pGo->GetGUID(); break; + //Thorim's cache + case 194312: if(!Heroic) mThorimCacheGUID = pGo->GetGUID(); break; + case 194314: if(Heroic) mThorimCacheGUID = pGo->GetGUID(); break; + //Thorim's cache (hard) + case 194313: if(!Heroic) mThorimHardCacheGUID = pGo->GetGUID(); break; + case 194315: if(Heroic) mThorimHardCacheGUID = pGo->GetGUID(); break; + //Cache of Innovation (Mimiron) + case 194789: if(!Heroic) mMimironCacheGUID = pGo->GetGUID(); break; + case 194956: if(Heroic) mMimironCacheGUID = pGo->GetGUID(); break; + //Cache of Innovation (Mimiron hard) + //Gift of Freya + case 194324: if(!Heroic) mFreyaCacheGUID = pGo->GetGUID(); break; + case 194328: if(Heroic) mFreyaCacheGUID = pGo->GetGUID(); break; + //Gift of the Observer + case 194822: if(!Heroic) mAlgalonCacheGUID = pGo->GetGUID(); break; + case 194823: if(Heroic) mAlgalonCacheGUID = pGo->GetGUID(); break; + + //DOORS: + case 194631: mXT002DoorGUID = pGo->GetGUID(); break; + case 194441: mHodirFrozenDoorGUID = pGo->GetGUID(); break; + case 194255: mAncientGateGUID = pGo->GetGUID(); break; + } + } void SetData(uint32 uiType, uint32 uiData) { + bool needSave = false; switch(uiType) { - case TYPE_LEVIATHAN: - case TYPE_IGNIS: - case TYPE_RAZORSCALE: - case TYPE_XT002: - case TYPE_ASSEMBLY: + case TYPE_FLAME_LEVIATHAN: + if(uiData == IN_PROGRESS) + { + mLeviathanReached = 1; + needSave = true; + } + mEncounter[0] = uiData; + break; + case TYPE_IGNIS: + mEncounter[1] = uiData; break; + case TYPE_RAZORSCALE: + mEncounter[2] = uiData; break; + case TYPE_XT002: + if(uiData == IN_PROGRESS) + { + mXT002Reached = 1; + needSave = true; + CloseDoor(mXT002DoorGUID); + } + else + { + OpenDoor(mXT002DoorGUID); + } + mEncounter[3] = uiData; + break; + case TYPE_IRON_COUNCIL: + mEncounter[4] = uiData; break; case TYPE_KOLOGARN: - case TYPE_AURIAYA: - case TYPE_MIMIRON: + if(uiData == DONE) DoRespawnGameObject(mKologarnCacheGUID, DAY); + mEncounter[5] = uiData; + break; + case TYPE_AURIAYA: + mEncounter[6] = uiData; break; case TYPE_HODIR: - case TYPE_THORIM: + if(uiData == DONE) + { + DoRespawnGameObject(mHodirCacheGUID, DAY); + OpenDoor(mHodirFrozenDoorGUID); + + //Unlock Ancient Gate of the Keepers + //TODO: onscreen notification + KeepersKilled = mEncounter[7]==DONE && mEncounter[8]==DONE && mEncounter[9]==DONE && mEncounter[10]==DONE; + if(KeepersKilled) OpenDoor(mAncientGateGUID); + } + mEncounter[7] = uiData; + break; case TYPE_FREYA: - case TYPE_VEZAX: - case TYPE_YOGGSARON: + if(uiData == DONE) + { + DoRespawnGameObject(mFreyaCacheGUID, DAY); + //Unlock Ancient Gate of the Keepers + //TODO: onscreen notification + KeepersKilled = mEncounter[7]==DONE && mEncounter[8]==DONE && mEncounter[9]==DONE && mEncounter[10]==DONE; + if(KeepersKilled) OpenDoor(mAncientGateGUID);; + } + mEncounter[8] = uiData; + break; + case TYPE_THORIM: + if(uiData == DONE) + { + DoRespawnGameObject(mThorimCacheGUID, DAY); + //Unlock Ancient Gate of the Keepers + //TODO: onscreen notification + KeepersKilled = mEncounter[7]==DONE && mEncounter[8]==DONE && mEncounter[9]==DONE && mEncounter[10]==DONE; + if(KeepersKilled) OpenDoor(mAncientGateGUID); + } + mEncounter[9] = uiData; + break; + case TYPE_MIMIRON: + if(uiData == IN_PROGRESS) + { + mMimironReached = 1; + needSave = true; + } + if(uiData == DONE) + { + DoRespawnGameObject(mMimironCacheGUID, DAY); + //Unlock Ancient Gate of the Keepers + //TODO: onscreen notification + KeepersKilled = mEncounter[7]==DONE && mEncounter[8]==DONE && mEncounter[9]==DONE && mEncounter[10]==DONE; + if(KeepersKilled) OpenDoor(mAncientGateGUID); + } + mEncounter[10] = uiData; + break; + case TYPE_VEZAX: + mEncounter[11] = uiData; break; + case TYPE_YOGG_SARON: + mEncounter[12] = uiData; break; case TYPE_ALGALON: - m_auiEncounter[uiType] = uiData; + if(uiData == DONE) DoRespawnGameObject(mAlgalonCacheGUID, DAY); + mEncounter[13] = uiData; + break; + + //Hard Modes + case TYPE_HODIR_HARD: + if(uiData == DONE) + { + DoRespawnGameObject(mHodirRareCacheGUID, DAY); + DoRespawnGameObject(mHodirCacheGUID, DAY); + OpenDoor(mHodirFrozenDoorGUID); + mEncounter[7] = uiData; + } + break; + case TYPE_THORIM_HARD: + if(uiData == DONE) DoRespawnGameObject(mThorimHardCacheGUID, DAY); + mEncounter[9] = uiData; break; } - if (uiData == DONE) + if (uiData == DONE || needSave) { OUT_SAVE_INST_DATA; std::ostringstream saveStream; + saveStream << mEncounter[0] << " " << mEncounter[1] << " " << mEncounter[2] << " " + << mEncounter[3] << " " << mEncounter[4] << " " << mEncounter[5] << " " + << mEncounter[6] << " " << mEncounter[7] << " " << mEncounter[8] << " " + << mEncounter[9] << " " << mEncounter[10] << " " << mEncounter[11] << " " + << mEncounter[12] << " " << mEncounter[13] << " " << mEncounter[14] << " " + << mLeviathanReached << " " << mXT002Reached << " " << mMimironReached; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) - saveStream << m_auiEncounter[i] << " "; - - m_strInstData = saveStream.str(); + strSaveData = saveStream.str(); SaveToDB(); OUT_SAVE_INST_DATA_COMPLETE; } } - uint64 GetData64(uint32 uiData) + const char* Save() { - switch(uiData) - { - case TYPE_LEVIATHAN: - return m_uiLeviathanGUID; - case TYPE_IGNIS: - return m_uiIgnisGUID; - case TYPE_RAZORSCALE: - return m_uiRazorscaleGUID; - case TYPE_XT002: - return m_uiXT002GUID; - case TYPE_KOLOGARN: - return m_uiKologarnGUID; - case TYPE_AURIAYA: - return m_uiAuriayaGUID; - case TYPE_MIMIRON: - return m_uiMimironGUID; - case TYPE_HODIR: - return m_uiMimironGUID; - case TYPE_THORIM: - return m_uiThorimGUID; - case TYPE_FREYA: - return m_uiFreyaGUID; - case TYPE_VEZAX: - return m_uiVezaxGUID; - case TYPE_YOGGSARON: - return m_uiYoggSaronGUID; - case TYPE_ALGALON: - return m_uiAlgalonGUID; - - // Assembly of Iron - case DATA_STEELBREAKER: - return m_auiAssemblyGUIDs[0]; - case DATA_MOLGEIM: - return m_auiAssemblyGUIDs[1]; - case DATA_BRUNDIR: - return m_auiAssemblyGUIDs[2]; - } - - return 0; + return strSaveData.c_str(); } uint32 GetData(uint32 uiType) { switch(uiType) { - case TYPE_LEVIATHAN: - case TYPE_IGNIS: - case TYPE_RAZORSCALE: - case TYPE_XT002: - case TYPE_ASSEMBLY: - case TYPE_KOLOGARN: - case TYPE_AURIAYA: - case TYPE_MIMIRON: - case TYPE_HODIR: - case TYPE_THORIM: - case TYPE_FREYA: - case TYPE_VEZAX: - case TYPE_YOGGSARON: - case TYPE_ALGALON: - return m_auiEncounter[uiType]; + case TYPE_FLAME_LEVIATHAN: return mEncounter[0]; + case TYPE_IGNIS: return mEncounter[1]; + case TYPE_RAZORSCALE: return mEncounter[2]; + case TYPE_XT002: return mEncounter[3]; + case TYPE_IRON_COUNCIL: return mEncounter[4]; + case TYPE_KOLOGARN: return mEncounter[5]; + case TYPE_AURIAYA: return mEncounter[6]; + case TYPE_HODIR: return mEncounter[7]; + case TYPE_FREYA: return mEncounter[8]; + case TYPE_THORIM: return mEncounter[9]; + case TYPE_MIMIRON: return mEncounter[10]; + case TYPE_VEZAX: return mEncounter[11]; + case TYPE_YOGG_SARON: return mEncounter[12]; + case TYPE_ALGALON: return mEncounter[13]; + + case TYPE_LEVIATHAN_TP: return mLeviathanReached; + case TYPE_XT002_TP: return mXT002Reached; + case TYPE_MIMIRON_TP: return mMimironReached; + + case TYPE_KEEPERS: return KeepersKilled ? 1 : 0; } - return 0; } - const char* Save() + uint64 GetData64(uint32 uiData) { - return m_strInstData.c_str(); + switch(uiData) + { + case NPC_KOLOGARN: return mKologarnGUID; + case NPC_KOLOGARN_LEFT_ARM: return mKologarnLeftArmGUID; + case NPC_KOLOGARN_RIGHT_ARM: return mKologarnRightArmGUID; + case NPC_STEELBREAKER: return mSteelbreakerGUID; + case NPC_MOLGEIM: return mMolgeimGUID; + case NPC_BRUNDIR: return mBrundirGUID; + } + return 0; } - void Load(const char* strIn) + void Load(const char* chrIn) { - if (!strIn) + if (!chrIn) { OUT_LOAD_INST_DATA_FAIL; return; } - OUT_LOAD_INST_DATA(strIn); + OUT_LOAD_INST_DATA(chrIn); - std::istringstream loadStream(strIn); + std::istringstream loadStream(chrIn); - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) - { - loadStream >> m_auiEncounter[i]; + loadStream >> mEncounter[0] >> mEncounter[1] >> mEncounter[2] >> mEncounter[3] + >> mEncounter[4] >> mEncounter[5] >> mEncounter[6] >> mEncounter[7] + >> mEncounter[8] >> mEncounter[9] >> mEncounter[10] >> mEncounter[11] + >> mEncounter[12] >> mEncounter[13] >> mEncounter[14] >> mLeviathanReached + >> mXT002Reached >> mMimironReached; - if (m_auiEncounter[i] == IN_PROGRESS) - m_auiEncounter[i] = NOT_STARTED; - } + for(uint8 i = 0; i < ENCOUNTERS; ++i) + if (mEncounter[i] == IN_PROGRESS) + mEncounter[i] = NOT_STARTED; OUT_LOAD_INST_DATA_COMPLETE; } + + bool IsEncounterInProgress() const + { + for (uint8 i = 0; i < ENCOUNTERS; ++i) + if (mEncounter[i] == IN_PROGRESS) + return true; + + return false; + } }; InstanceData* GetInstanceData_instance_ulduar(Map* pMap) @@ -280,9 +379,9 @@ InstanceData* GetInstanceData_instance_ulduar(Map* pMap) void AddSC_instance_ulduar() { - Script *newscript; - newscript = new Script; - newscript->Name = "instance_ulduar"; - newscript->GetInstanceData = &GetInstanceData_instance_ulduar; - newscript->RegisterSelf(); + Script* pNewScript; + pNewScript = new Script; + pNewScript->Name = "instance_ulduar"; + pNewScript->GetInstanceData = &GetInstanceData_instance_ulduar; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h deleted file mode 100644 index 813320941..000000000 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 -* This program is free software licensed under GPL version 2 -* Please see the included DOCS/LICENSE.TXT for more information */ - -#ifndef DEF_ULDUAR_H -#define DEF_ULDUAR_H - -enum -{ - MAX_ENCOUNTER = 14, - - TYPE_LEVIATHAN = 0, - TYPE_IGNIS = 1, - TYPE_RAZORSCALE = 2, - TYPE_XT002 = 3, - TYPE_ASSEMBLY = 4, - TYPE_KOLOGARN = 5, - TYPE_AURIAYA = 6, - TYPE_MIMIRON = 7, - TYPE_HODIR = 8, - TYPE_THORIM = 9, - TYPE_FREYA = 10, - TYPE_VEZAX = 11, - TYPE_YOGGSARON = 12, - TYPE_ALGALON = 13, - - DATA_STEELBREAKER = 20, - DATA_MOLGEIM = 21, - DATA_BRUNDIR = 22, - - NPC_LEVIATHAN = 33113, - NPC_IGNIS = 33118, - NPC_RAZORSCALE = 33186, - NPC_XT002 = 33293, - NPC_STEELBREAKER = 32867, - NPC_MOLGEIM = 32927, - NPC_BRUNDIR = 32857, - NPC_KOLOGARN = 32930, - NPC_AURIAYA = 33515, - NPC_MIMIRON = 33350, - NPC_HODIR = 32845, - NPC_THORIM = 32865, - NPC_FREYA = 32906, - NPC_VEZAX = 33271, - NPC_YOGGSARON = 33288, - NPC_ALGALON = 32871 -}; - -#endif diff --git a/scripts/northrend/ulduar/ulduar/ulduar_teleport.cpp b/scripts/northrend/ulduar/ulduar/ulduar_teleport.cpp new file mode 100644 index 000000000..246a5369c --- /dev/null +++ b/scripts/northrend/ulduar/ulduar/ulduar_teleport.cpp @@ -0,0 +1,117 @@ + +#include "precompiled.h" +#include "def_ulduar.h" + +/* +The teleporter appears to be active and stable. + +- Expedition Base Camp +- Formation Grounds +- Colossal Forge +- Scrapyard +- Antechamber of Ulduar +- Shattered Walkway +- Conservatory of Life +- Spark of Imagination +- Prison of Yogg-Saron +*/ + +#define BASE_CAMP 200 +#define GROUNDS 201 +#define FORGE 202 +#define SCRAPYARD 203 +#define ANTECHAMBER 204 +#define WALKWAY 205 +#define CONSERVATORY 206 +#define SPARK 207 +#define PRISON 208 + +bool GossipHello_ulduar_teleporter(Player *player, Creature *creature) +{ + ScriptedInstance *pInstance = (ScriptedInstance *) creature->GetInstanceData(); + if(!pInstance) return true; + + player->ADD_GOSSIP_ITEM(0, "Teleport to the Expedition Base Camp", GOSSIP_SENDER_MAIN, BASE_CAMP); + if(pInstance->GetData(TYPE_LEVIATHAN_TP)) + { + player->ADD_GOSSIP_ITEM(0, "Teleport to the Formation Grounds", GOSSIP_SENDER_MAIN, GROUNDS); + if(pInstance->GetData(TYPE_FLAME_LEVIATHAN) == DONE) + { + player->ADD_GOSSIP_ITEM(0, "Teleport to the Colossal Forge", GOSSIP_SENDER_MAIN, FORGE); + if(pInstance->GetData(TYPE_XT002_TP)) + { + player->ADD_GOSSIP_ITEM(0, "Teleport to the Scrapyard", GOSSIP_SENDER_MAIN, SCRAPYARD); + if(pInstance->GetData(TYPE_XT002) == DONE) + { + player->ADD_GOSSIP_ITEM(0, "Teleport to the Antechamber of Ulduar", GOSSIP_SENDER_MAIN, ANTECHAMBER); + if(pInstance->GetData(TYPE_KOLOGARN) == DONE) + { + player->ADD_GOSSIP_ITEM(0, "Teleport to the Shattered Walkway", GOSSIP_SENDER_MAIN, WALKWAY); + if(pInstance->GetData(TYPE_AURIAYA) == DONE) + { + player->ADD_GOSSIP_ITEM(0, "Teleport to the Conservatory of Life", GOSSIP_SENDER_MAIN, CONSERVATORY); + if(pInstance->GetData(TYPE_MIMIRON_TP)) + { + player->ADD_GOSSIP_ITEM(0, "Teleport to the Spark of Imagination", GOSSIP_SENDER_MAIN, SPARK); + if(pInstance->GetData(TYPE_VEZAX) == DONE) + player->ADD_GOSSIP_ITEM(0, "Teleport to the Prison of Yogg-Saron", GOSSIP_SENDER_MAIN, PRISON); + } + } + } + } + } + } + } + player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, creature->GetGUID()); + + return true; +} + +bool GossipSelect_ulduar_teleporter(Player *player, Creature *creature, uint32 sender, uint32 action) +{ + if(sender != GOSSIP_SENDER_MAIN) return true; + if(!player->getAttackers().empty()) return true; + + switch(action) + { + case BASE_CAMP: + player->TeleportTo(603, -706.122, -92.6024, 429.876, 0); + player->CLOSE_GOSSIP_MENU(); break; + case GROUNDS: + player->TeleportTo(603, 131.248, -35.3802, 409.804, 0); + player->CLOSE_GOSSIP_MENU(); break; + case FORGE: + player->TeleportTo(603, 553.233, -12.3247, 409.679, 0); + player->CLOSE_GOSSIP_MENU(); break; + case SCRAPYARD: + player->TeleportTo(603, 926.292, -11.4635, 418.595, 0); + player->CLOSE_GOSSIP_MENU(); break; + case ANTECHAMBER: + player->TeleportTo(603, 1498.09, -24.246, 420.967, 0); + player->CLOSE_GOSSIP_MENU(); break; + case WALKWAY: + player->TeleportTo(603, 1859.45, -24.1, 448.9, 0); + player->CLOSE_GOSSIP_MENU(); break; + case CONSERVATORY: + player->TeleportTo(603, 2086.27, -24.3134, 421.239, 0); + player->CLOSE_GOSSIP_MENU(); break; + case SPARK: + player->TeleportTo(603, 2536.87, 2569.15, 412.304, 0); + player->CLOSE_GOSSIP_MENU(); break; + case PRISON: + //player->TeleportTo(603, 2536.87, 2569.15, 412.304, 0); + player->CLOSE_GOSSIP_MENU(); break; + } + + return true; +} + +void AddSC_ulduar_teleport() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "ulduar_teleporter"; + newscript->pGossipHello = &GossipHello_ulduar_teleporter; + newscript->pGossipSelect = &GossipSelect_ulduar_teleporter; + newscript->RegisterSelf(); +} diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index 1b189618a..bf3d9179a 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -296,7 +296,22 @@ extern void AddSC_instance_halls_of_lightning(); extern void AddSC_boss_maiden_of_grief(); //Ulduar, halls_of_stone extern void AddSC_boss_sjonnir(); extern void AddSC_halls_of_stone(); -extern void AddSC_instance_ulduar(); //ulduar +extern void AddSC_boss_leviathan(); //ulduar +extern void AddSC_boss_ignis(); +extern void AddSC_boss_razorscale(); +extern void AddSC_boss_xt002(); +extern void AddSC_boss_iron_council(); +extern void AddSC_boss_kologarn(); +extern void AddSC_boss_auriaya(); +extern void AddSC_boss_thorim(); +extern void AddSC_boss_mimiron(); +extern void AddSC_boss_hodir(); +extern void AddSC_boss_freya(); +extern void AddSC_boss_vezax(); +extern void AddSC_boss_yogg_saron(); +extern void AddSC_boss_algalon(); +extern void AddSC_ulduar_teleport(); +extern void AddSC_instance_ulduar(); extern void AddSC_boss_ingvar(); //utgarde_keep extern void AddSC_boss_keleseth(); extern void AddSC_boss_skarvald_and_dalronn(); @@ -689,7 +704,22 @@ void AddScripts() AddSC_boss_maiden_of_grief(); //Ulduar, halls_of_stone AddSC_boss_sjonnir(); AddSC_halls_of_stone(); - AddSC_instance_ulduar(); //ulduar + AddSC_boss_leviathan(); //ulduar + AddSC_boss_ignis(); + AddSC_boss_razorscale(); + AddSC_boss_xt002(); + AddSC_boss_iron_council(); + AddSC_boss_kologarn(); + AddSC_boss_auriaya(); + AddSC_boss_thorim(); + AddSC_boss_mimiron(); + AddSC_boss_hodir(); + AddSC_boss_freya(); + AddSC_boss_vezax(); + AddSC_boss_yogg_saron(); + AddSC_boss_algalon(); + AddSC_ulduar_teleport(); + AddSC_instance_ulduar(); AddSC_boss_ingvar(); //utgarde_keep AddSC_boss_keleseth(); AddSC_boss_skarvald_and_dalronn(); From 3351a536e42866eed4c6177e94be18350e453995 Mon Sep 17 00:00:00 2001 From: Insider Date: Mon, 26 Oct 2009 00:02:54 +0700 Subject: [PATCH 016/405] Fixed typo is SQL file for [patch 7] --- addition/7_mangos_ulduar_eventai.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addition/7_mangos_ulduar_eventai.sql b/addition/7_mangos_ulduar_eventai.sql index 3cdf0f6b9..e0fc432ce 100644 --- a/addition/7_mangos_ulduar_eventai.sql +++ b/addition/7_mangos_ulduar_eventai.sql @@ -2,4 +2,4 @@ UPDATE creature_template SET AIName='EventAI', ScriptName='' WHERE entry IN (329 DELETE FROM creature_ai_scripts WHERE creature_id IN (32918, 36561); INSERT INTO creature_ai_scripts VALUES (3291800, 32918, 6, 0, 100, 2, 0, 0, 0, 0, 11, 62598, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Detonating Lasher - OnDeath (N)'), -(3291801, 32918, 6, 0, 100, 4, 0, 0, 0, 0, 11, 62937, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Detonating Lasher - OnDeath (H)'), +(3291801, 32918, 6, 0, 100, 4, 0, 0, 0, 0, 11, 62937, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Detonating Lasher - OnDeath (H)'); From 800251b7933fe823008db77eb8de7647d70a7988 Mon Sep 17 00:00:00 2001 From: Insider Date: Mon, 26 Oct 2009 00:22:16 +0700 Subject: [PATCH 017/405] Added missed file for [patch 7] --- addition/7_scriptdev2_ulduar.sql | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 addition/7_scriptdev2_ulduar.sql diff --git a/addition/7_scriptdev2_ulduar.sql b/addition/7_scriptdev2_ulduar.sql new file mode 100644 index 000000000..f841d43f6 --- /dev/null +++ b/addition/7_scriptdev2_ulduar.sql @@ -0,0 +1,20 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1603017 AND -1603000; +INSERT INTO script_texts VALUES +(-1603000, "New toys? For me? I promise I won't break them this time!", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15724, 1, 0, 0, "XT-002 Aggro"), +(-1603001, "NO! NO! NO! NO! NO!", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15727, 1, 0, 0, "XT-002 Tympanic Tantrum"), +(-1603002, "I... I think I broke it.", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15728, 1, 0, 0, "XT-002 Slay 1"), +(-1603003, "I guess it doesn't bend that way.", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15729, 1, 0, 0, "XT-002 Slay 2"), +(-1603004, "So tired. I will rest for just a moment!", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15725, 1, 0, 0, "XT-002 Heart Opened"), +(-1603005, "I'm ready to play!", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15726, 1, 0, 0, "XT-002 Heart Closed"), +(-1603006, "Time for a new game! My old toys will fight my new toys!", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15732, 1, 0, 0, "XT-002 Adds"), +(-1603007, "I'm tired of these toys. I don't want to play anymore!", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15730, 1, 0, 0, "XT-002 Berserk"), +(-1603008, "You are bad... Toys... Very... Baaaaad!", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15731, 1, 0, 0, "XT-002 Death"), +(-1603009, "Hostile entities detected. Threat assessment protocol active. Primary target engaged. Time minus thirty seconds to re-evaluation.", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15506, 1, 0, 0, "Flame Leviathan Aggro"), +(-1603010, "Total systems failure. Defense protocols breached. Leviathan Unit shutting down.", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15520, 1, 0, 0, "Flame Leviathan Death"), +(-1603011, "Threat assessment routine modified. Current target threat level: zero. Acquiring new target.", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15521, 1, 0, 0, "Flame Leviathan Slay"), +(-1603012, "You will suffer for this trespass!", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15552, 1, 0, 0, "Hodir Aggro"), +(-1603013, "I... I am released from his grasp... at last.", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15557, 1, 0, 0, "Hodir Death"), +(-1603014, "Tragic. To come so far, only to fail.", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15553, 1, 0, 0, "Hodir Slay 1"), +(-1603015, "Welcome to the endless winter.", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15554, 1, 0, 0, "Hodir Slay 2"), +(-1603016, "Winds of the north consume you!", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15555, 1, 0, 0, "Hodir Flash Freeze"), +(-1603017, "", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15556, 1, 0, 0, "Hodir Frozen Blows"); From d5d9ec0e6b84fbd15c43621a4193b11eae8991f1 Mon Sep 17 00:00:00 2001 From: Insider Date: Mon, 26 Oct 2009 01:24:28 +0700 Subject: [PATCH 018/405] Another update in SQL file for [patch 7] --- addition/7_mangos_ulduar.sql | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/addition/7_mangos_ulduar.sql b/addition/7_mangos_ulduar.sql index bf8d4a5e5..8e6497e95 100644 --- a/addition/7_mangos_ulduar.sql +++ b/addition/7_mangos_ulduar.sql @@ -17,3 +17,14 @@ UPDATE `creature_template` SET `ScriptName`='boss_vezax' WHERE `entry`=33271; UPDATE `creature_template` SET `ScriptName`='boss_yogg_saron' WHERE `entry`=33288; UPDATE `creature_template` SET `ScriptName`='boss_algalon' WHERE `entry`=32871; UPDATE `instance_template` SET `script`='instance_ulduar' WHERE `map`=603; + +replace into `creature_template` values ('99005','0','0','0','22448','0','22448','0','Ulduar teleporter','',NULL,'80','80','64200','64200','12300','12300','31200','35','35','1','1.48','0.5','0','3170','6182','0','33235','1','1400','1900','0','0','0','0','0','0','0','0','0','0','100','7','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','1','3','1','1','0','0','0','0','0','0','0','0','1','99003','0','0','ulduar_teleporter'); +replace into `creature_template_addon` values ('99005','0','0','0','0','0','48143 0'); +replace into `locales_creature` values ('99005','','','','','','','',' ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,''); +replace into `creature` values +('500000','99005','571','1','1','0','99003','9025.76','-1179.12','1060.18','4.59386','25','0','0','64200','12300','0','0'), +('500001','99005','603','2','1','0','99003','1497.84','-23.9801','421.367','5.0242','25','0','0','64200','12300','0','0'), +('500002','99005','603','2','1','0','99003','131.248','-35.3802','410.204','0','25','0','0','64200','12300','0','0'), +('500003','99005','603','2','1','0','99003','553.233','-12.3247','410.079','0','25','0','0','64200','12300','0','0'), +('500004','99005','603','2','1','0','99003','926.292','-11.4635','418.995','0','25','0','0','64200','12300','0','0'), +('500005','99005','603','2','1','0','99003','2086.17','-24.3111','421.639','3.11803','25','0','0','64200','12300','0','0'); From cb1c7ba56928a6e64d2b572b19cb52e50176c830 Mon Sep 17 00:00:00 2001 From: Insider Date: Tue, 27 Oct 2009 08:34:55 +0700 Subject: [PATCH 019/405] SD2 updated to 1484 --- include/sc_gossip.h | 18 +++++++------ ...ev2.patch => MaNGOS-8735-ScriptDev2.patch} | 25 +++++++++---------- .../tempest_keep/the_eye/boss_kaelthas.cpp | 18 +++++-------- scripts/world/npcs_special.cpp | 2 +- sql/Updates/r1481_scriptdev2.sql | 1 + sql/scriptdev2_script_full.sql | 2 +- 6 files changed, 31 insertions(+), 35 deletions(-) rename patches/{MaNGOS-8273-ScriptDev2.patch => MaNGOS-8735-ScriptDev2.patch} (77%) create mode 100644 sql/Updates/r1481_scriptdev2.sql diff --git a/include/sc_gossip.h b/include/sc_gossip.h index 349d6130f..67e478eb0 100644 --- a/include/sc_gossip.h +++ b/include/sc_gossip.h @@ -135,11 +135,11 @@ extern uint32 GetSkillLevel(Player* pPlayer,uint32 skill); // d - Action (identifys this Menu Item) // e - Text to be displayed in pop up box // f - Money value in pop up box -#define ADD_GOSSIP_ITEM(a,b,c,d) PlayerTalkClass->GetGossipMenu().AddMenuItem(a,b,c,d,"",0) -#define ADD_GOSSIP_ITEM_EXTENDED(a,b,c,d,e,f,g) PlayerTalkClass->GetGossipMenu().AddMenuItem(a,b,c,d,e,f,g) +#define ADD_GOSSIP_ITEM(a, b, c, d) PlayerTalkClass->GetGossipMenu().AddMenuItem(a, b, c, d, "", 0) +#define ADD_GOSSIP_ITEM_EXTENDED(a, b, c, d, e, f, g) PlayerTalkClass->GetGossipMenu().AddMenuItem(a, b, c, d, e, f, g) // This fuction Sends the current menu to show to client, a - NPCTEXTID(uint32) , b - npc guid(uint64) -#define SEND_GOSSIP_MENU(a,b) PlayerTalkClass->SendGossipMenu(a,b) +#define SEND_GOSSIP_MENU(a, b) PlayerTalkClass->SendGossipMenu(a, b) // This fuction shows POI(point of interest) to client. // a - position X @@ -148,7 +148,7 @@ extern uint32 GetSkillLevel(Player* pPlayer,uint32 skill); // d - Flags // e - Data // f - Location Name -#define SEND_POI(a,b,c,d,e,f) PlayerTalkClass->SendPointOfInterest(a,b,c,d,e,f) +#define SEND_POI(a, b, c, d, e, f) PlayerTalkClass->SendPointOfInterest(a, b, c, d, e, f) // Closes the Menu #define CLOSE_GOSSIP_MENU() PlayerTalkClass->CloseGossip() @@ -157,23 +157,25 @@ extern uint32 GetSkillLevel(Player* pPlayer,uint32 skill); // a - quest object // b - npc guid(uint64) // c - Activate accept(bool) -#define SEND_QUEST_DETAILS(a,b,c) PlayerTalkClass->SendQuestDetails(a,b,c) +#define SEND_QUEST_DETAILS(a, b, c) PlayerTalkClass->SendQuestDetails(a, b, c) // Fuction to tell to client the requested items to complete quest // a - quest object // b - npc guid(uint64) // c - Iscompletable(bool) // d - close at cancel(bool) - in case single incomplite ques -#define SEND_REQUESTEDITEMS(a,b,c,d) PlayerTalkClass->SendRequestedItems(a,b,c,d) +#define SEND_REQUESTEDITEMS(a, b, c, d) PlayerTalkClass->SendRequestedItems(a, b, c, d) // Fuctions to send NPC lists, a - is always the npc guid(uint64) #define SEND_VENDORLIST(a) GetSession()->SendListInventory(a) #define SEND_TRAINERLIST(a) GetSession()->SendTrainerList(a) #define SEND_BANKERLIST(a) GetSession()->SendShowBank(a) #define SEND_TABARDLIST(a) GetSession()->SendTabardVendorActivate(a) -#define SEND_AUCTIONLIST(a) GetSession()->SendAuctionHello(a) #define SEND_TAXILIST(a) GetSession()->SendTaxiStatus(a) +// Function to send the Auction List, a - npc guid(uint64), b - pointer to npc(Creature*) +#define SEND_AUCTIONLIST(a, b) GetSession()->SendAuctionHello(a, b) + // Ressurect's the player if is dead. #define SEND_SPRESURRECT() GetSession()->SendSpiritResurrect() @@ -183,5 +185,5 @@ extern uint32 GetSkillLevel(Player* pPlayer,uint32 skill); // defined fuctions to use with Creature -#define QUEST_DIALOG_STATUS(a,b,c) GetSession()->getDialogStatus(a,b,c) +#define QUEST_DIALOG_STATUS(a, b, c) GetSession()->getDialogStatus(a, b, c) #endif diff --git a/patches/MaNGOS-8273-ScriptDev2.patch b/patches/MaNGOS-8735-ScriptDev2.patch similarity index 77% rename from patches/MaNGOS-8273-ScriptDev2.patch rename to patches/MaNGOS-8735-ScriptDev2.patch index a983cdecd..83f6b6759 100644 --- a/patches/MaNGOS-8273-ScriptDev2.patch +++ b/patches/MaNGOS-8735-ScriptDev2.patch @@ -1,9 +1,8 @@ -From 52a2f249eb5f94ea070c169e5c0f15e212fa9b5e Mon Sep 17 00:00:00 2001 -From: NoFantasy -Date: Wed, 29 Jul 2009 15:22:04 +0200 -Subject: [PATCH] ScriptDev2 patch +From 87122c1232f145cbaac4e90339b4321fb03a0613 Mon Sep 17 00:00:00 2001 +From: Reve +Date: Mon, 26 Oct 2009 13:42:30 +0100 +Subject: [PATCH] ScriptDev2 patch. -Signed-off-by: NoFantasy --- configure.ac | 6 +++++- src/bindings/.gitignore | 2 +- @@ -12,7 +11,7 @@ Signed-off-by: NoFantasy 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac -index 7a1b219..8cc9bfe 100644 +index e016db0..b29d062 100644 --- a/configure.ac +++ b/configure.ac @@ -276,7 +276,11 @@ AC_CONFIG_FILES([ @@ -49,7 +48,7 @@ index 2cc0efd..f2dbbc7 100644 -SUBDIRS = universal +SUBDIRS = ScriptDev2 diff --git a/src/mangosd/Makefile.am b/src/mangosd/Makefile.am -index 3fd4068..076d8d8 100644 +index 608d0a1..62ee2ba 100644 --- a/src/mangosd/Makefile.am +++ b/src/mangosd/Makefile.am @@ -34,7 +34,7 @@ mangos_worldd_SOURCES = \ @@ -61,15 +60,15 @@ index 3fd4068..076d8d8 100644 ../game/libmangosgame.a \ ../shared/Database/libmangosdatabase.a \ ../shared/Config/libmangosconfig.a \ -@@ -45,7 +45,7 @@ mangos_worldd_LDADD = \ - ../../dep/src/sockets/libmangossockets.a \ - ../../dep/src/g3dlite/libg3dlite.a +@@ -46,7 +46,7 @@ mangos_worldd_LDADD = \ + ../../dep/src/g3dlite/libg3dlite.a \ + ../../dep/tbb/libtbbmalloc.so --mangos_worldd_LDFLAGS = -L../../dep/src/sockets -L../../dep/src/g3dlite -L../bindings/universal/ -L$(libdir) $(MANGOS_LIBS) -export-dynamic -+mangos_worldd_LDFLAGS = -L../../dep/src/sockets -L../../dep/src/g3dlite -L../bindings/ScriptDev2/ -L$(libdir) $(MANGOS_LIBS) -export-dynamic +-mangos_worldd_LDFLAGS = -L../../dep/src/sockets -L../../dep/src/g3dlite -L../bindings/universal/ -L../../dep/tbb -L$(libdir) $(MANGOS_LIBS) -export-dynamic ++mangos_worldd_LDFLAGS = -L../../dep/src/sockets -L../../dep/src/g3dlite -L../bindings/ScriptDev2/ -L../../dep/tbb -L$(libdir) $(MANGOS_LIBS) -export-dynamic ## Additional files to include when running 'make dist' # Include world daemon configuration -- -1.6.3.2.1299.gee46c +1.6.4.msysgit.0 diff --git a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp index 807cf035b..9bee806f3 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp @@ -825,20 +825,14 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI m_uiMindControl_Timer -= uiDiff; } - //m_uiPhoenix_Timer - if (m_uiPhoenix_Timer < uiDiff) - { - DoCast(m_creature, SPELL_PHOENIX_ANIMATION); - - if (Creature* pPhoenix = m_creature->SummonCreature(NPC_PHOENIX, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45000)) + // Summon Phoenix + if (m_uiPhoenix_Timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - pPhoenix->AI()->AttackStart(pTarget); + DoCast(pTarget, SPELL_PHOENIX_ANIMATION); + DoScriptText(urand(0, 1) ? SAY_SUMMON_PHOENIX1 : SAY_SUMMON_PHOENIX2, pTarget); } - else - error_log("SD2: Kael'Thas Phoenix could not be spawned"); - - DoScriptText(urand(0, 1) ? SAY_SUMMON_PHOENIX1 : SAY_SUMMON_PHOENIX2, m_creature); m_uiPhoenix_Timer = 60000; } diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index 7373afa16..c9612e29b 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -125,8 +125,8 @@ struct MANGOS_DLL_DECL npc_air_force_botsAI : public ScriptedAI if (!spawnedTemplate) { - m_pSpawnAssoc = NULL; error_db_log("SD2: Creature template entry %u does not exist in DB, which is required by npc_air_force_bots", m_pSpawnAssoc->m_uiSpawnedCreatureEntry); + m_pSpawnAssoc = NULL; return; } } diff --git a/sql/Updates/r1481_scriptdev2.sql b/sql/Updates/r1481_scriptdev2.sql new file mode 100644 index 000000000..2beffbc90 --- /dev/null +++ b/sql/Updates/r1481_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 8735+) '; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 6d87530ce..d168bc462 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3,7 +3,7 @@ -- DELETE FROM sd2_db_version; -INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for MaNGOS 8659+) '); +INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for MaNGOS 8735+) '); -- -- Below contains data for table `script_texts` mainly used in C++ parts. From bf6e315052ea7e0eb805f911fdbfaacd0d08a2de Mon Sep 17 00:00:00 2001 From: Insider Date: Wed, 28 Oct 2009 12:00:30 +0700 Subject: [PATCH 020/405] Update for [patch 1] --- scripts/northrend/naxxramas/boss_four_horsemen.cpp | 8 ++++---- scripts/northrend/naxxramas/boss_gluth.cpp | 2 +- scripts/northrend/naxxramas/boss_gothik.cpp | 14 +++----------- scripts/northrend/naxxramas/boss_kelthuzad.cpp | 2 +- scripts/northrend/naxxramas/boss_maexxna.cpp | 2 +- scripts/northrend/naxxramas/boss_noth.cpp | 2 +- scripts/northrend/naxxramas/boss_patchwerk.cpp | 2 +- scripts/northrend/naxxramas/boss_razuvious.cpp | 2 +- 8 files changed, 13 insertions(+), 21 deletions(-) diff --git a/scripts/northrend/naxxramas/boss_four_horsemen.cpp b/scripts/northrend/naxxramas/boss_four_horsemen.cpp index 6a083d26d..510a38fda 100644 --- a/scripts/northrend/naxxramas/boss_four_horsemen.cpp +++ b/scripts/northrend/naxxramas/boss_four_horsemen.cpp @@ -50,7 +50,7 @@ struct MANGOS_DLL_DECL boss_lady_blaumeuxAI : public ScriptedAI { boss_lady_blaumeuxAI(Creature* pCreature) : ScriptedAI(pCreature) { - Heroic = m_creature->GetMap()->IsHeroic(); + Heroic = pCreature->GetMap()->GetSpawnMode() > 0; pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Reset(); } @@ -169,7 +169,7 @@ struct MANGOS_DLL_DECL boss_rivendare_naxxAI : public ScriptedAI { boss_rivendare_naxxAI(Creature* pCreature) : ScriptedAI(pCreature) { - Heroic = m_creature->GetMap()->IsHeroic(); + Heroic = pCreature->GetMap()->GetSpawnMode() > 0; pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Reset(); } @@ -279,7 +279,7 @@ struct MANGOS_DLL_DECL boss_thane_korthazzAI : public ScriptedAI { boss_thane_korthazzAI(Creature* pCreature) : ScriptedAI(pCreature) { - Heroic = m_creature->GetMap()->IsHeroic(); + Heroic = pCreature->GetMap()->GetSpawnMode() > 0; pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Reset(); } @@ -386,7 +386,7 @@ struct MANGOS_DLL_DECL boss_sir_zeliekAI : public ScriptedAI { boss_sir_zeliekAI(Creature* pCreature) : ScriptedAI(pCreature) { - Heroic = m_creature->GetMap()->IsHeroic(); + Heroic = pCreature->GetMap()->GetSpawnMode() > 0; pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Reset(); } diff --git a/scripts/northrend/naxxramas/boss_gluth.cpp b/scripts/northrend/naxxramas/boss_gluth.cpp index f16f7deb5..df343919b 100644 --- a/scripts/northrend/naxxramas/boss_gluth.cpp +++ b/scripts/northrend/naxxramas/boss_gluth.cpp @@ -78,7 +78,7 @@ struct MANGOS_DLL_DECL boss_gluthAI : public ScriptedAI boss_gluthAI(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Heroic = pCreature->GetMap()->IsHeroic(); + Heroic = m_creature->GetMap()->GetSpawnMode() > 0; Reset(); } diff --git a/scripts/northrend/naxxramas/boss_gothik.cpp b/scripts/northrend/naxxramas/boss_gothik.cpp index d3dc41688..bbbddd1c9 100644 --- a/scripts/northrend/naxxramas/boss_gothik.cpp +++ b/scripts/northrend/naxxramas/boss_gothik.cpp @@ -14,13 +14,6 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* ScriptData -SDName: Boss_Gothik -SD%Complete: 0 -SDComment: Placeholder -SDCategory: Naxxramas -EndScriptData */ - #include "precompiled.h" #include "naxxramas.h" @@ -94,7 +87,7 @@ struct MANGOS_DLL_DECL boss_gothikAI : public ScriptedAI boss_gothikAI(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Heroic = m_creature->GetMap()->IsHeroic(); + Heroic = pCreature->GetMap()->IsHeroic(); trainees = Heroic ? 3 : 2; @@ -286,7 +279,7 @@ struct MANGOS_DLL_DECL mob_gothik_trainee_addAI : public ScriptedAI { mob_gothik_trainee_addAI(Creature* pCreature) : ScriptedAI(pCreature) { - Heroic = m_creature->GetMap()->IsHeroic(); + Heroic = pCreature->GetMap()->GetSpawnMode() > 0; Reset(); } @@ -357,7 +350,6 @@ struct MANGOS_DLL_DECL mob_gothik_dk_addAI : public ScriptedAI { mob_gothik_dk_addAI(Creature* pCreature) : ScriptedAI(pCreature) { - //Heroic = m_creature->GetMap()->IsHeroic(); Reset(); } @@ -418,7 +410,7 @@ struct MANGOS_DLL_DECL mob_gothik_rider_addAI : public ScriptedAI { mob_gothik_rider_addAI(Creature* pCreature) : ScriptedAI(pCreature) { - Heroic = m_creature->GetMap()->IsHeroic(); + Heroic = pCreature->GetMap()->GetSpawnMode() > 0; Reset(); } diff --git a/scripts/northrend/naxxramas/boss_kelthuzad.cpp b/scripts/northrend/naxxramas/boss_kelthuzad.cpp index ac7cd69a9..1eea6e870 100644 --- a/scripts/northrend/naxxramas/boss_kelthuzad.cpp +++ b/scripts/northrend/naxxramas/boss_kelthuzad.cpp @@ -51,7 +51,7 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI boss_kelthuzadAI(Creature* c) : ScriptedAI(c) { pInstance = (ScriptedInstance*)c->GetInstanceData(); - Heroic = m_creature->GetMap()->IsHeroic(); + Heroic = m_creature->GetMap()->GetSpawnMode() > 0; MaxGuardians = Heroic ? 4 : 2; Reset(); } diff --git a/scripts/northrend/naxxramas/boss_maexxna.cpp b/scripts/northrend/naxxramas/boss_maexxna.cpp index 30330f2ee..9f3125a91 100644 --- a/scripts/northrend/naxxramas/boss_maexxna.cpp +++ b/scripts/northrend/naxxramas/boss_maexxna.cpp @@ -93,7 +93,7 @@ struct MANGOS_DLL_DECL boss_maexxnaAI : public ScriptedAI boss_maexxnaAI(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); - Heroic = m_creature->GetMap()->IsHeroic(); + Heroic = pCreature->GetMap()->GetSpawnMode() > 0; Reset(); } diff --git a/scripts/northrend/naxxramas/boss_noth.cpp b/scripts/northrend/naxxramas/boss_noth.cpp index 04e48a873..7010534f9 100644 --- a/scripts/northrend/naxxramas/boss_noth.cpp +++ b/scripts/northrend/naxxramas/boss_noth.cpp @@ -58,7 +58,7 @@ struct MANGOS_DLL_DECL boss_nothAI : public ScriptedAI boss_nothAI(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Heroic = pCreature->GetMap()->IsHeroic(); + Heroic = pCreature->GetMap()->GetSpawnMode() > 0; AddsCount = Heroic ? 3 : 2; //normal phase BalconyAddsCount = Heroic ? 4 : 2; //balcony phase Reset(); diff --git a/scripts/northrend/naxxramas/boss_patchwerk.cpp b/scripts/northrend/naxxramas/boss_patchwerk.cpp index d412d2387..9955d09ab 100644 --- a/scripts/northrend/naxxramas/boss_patchwerk.cpp +++ b/scripts/northrend/naxxramas/boss_patchwerk.cpp @@ -41,7 +41,7 @@ struct MANGOS_DLL_DECL boss_patchwerkAI : public ScriptedAI { boss_patchwerkAI(Creature* pCreature) : ScriptedAI(pCreature) { - Heroic = m_creature->GetMap()->IsHeroic(); + Heroic = pCreature->GetMap()->GetSpawnMode() > 0; Reset(); } diff --git a/scripts/northrend/naxxramas/boss_razuvious.cpp b/scripts/northrend/naxxramas/boss_razuvious.cpp index 30c6d444a..adf478490 100644 --- a/scripts/northrend/naxxramas/boss_razuvious.cpp +++ b/scripts/northrend/naxxramas/boss_razuvious.cpp @@ -49,7 +49,7 @@ struct MANGOS_DLL_DECL boss_razuviousAI : public ScriptedAI boss_razuviousAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->GetSpawnMode() > 0; Reset(); } From 636ac02227d8787519144034c30d1c10bed98b86 Mon Sep 17 00:00:00 2001 From: Insider Date: Wed, 28 Oct 2009 12:06:40 +0700 Subject: [PATCH 021/405] Update for [patch 7] --- scripts/northrend/ulduar/ulduar/boss_algalon.cpp | 2 +- scripts/northrend/ulduar/ulduar/boss_auriaya.cpp | 2 +- scripts/northrend/ulduar/ulduar/boss_freya.cpp | 11 ++++------- scripts/northrend/ulduar/ulduar/boss_hodir.cpp | 2 +- scripts/northrend/ulduar/ulduar/boss_ignis.cpp | 2 +- scripts/northrend/ulduar/ulduar/boss_iron_council.cpp | 2 +- scripts/northrend/ulduar/ulduar/boss_kologarn.cpp | 6 +++--- scripts/northrend/ulduar/ulduar/boss_leviathan.cpp | 2 +- scripts/northrend/ulduar/ulduar/boss_mimiron.cpp | 2 +- scripts/northrend/ulduar/ulduar/boss_razorscale.cpp | 2 +- scripts/northrend/ulduar/ulduar/boss_thorim.cpp | 2 +- scripts/northrend/ulduar/ulduar/boss_vezax.cpp | 2 +- scripts/northrend/ulduar/ulduar/boss_xt_002.cpp | 2 +- scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp | 4 +--- scripts/northrend/ulduar/ulduar/instance_ulduar.cpp | 5 ----- 15 files changed, 19 insertions(+), 29 deletions(-) diff --git a/scripts/northrend/ulduar/ulduar/boss_algalon.cpp b/scripts/northrend/ulduar/ulduar/boss_algalon.cpp index 62ad5082c..e28824873 100644 --- a/scripts/northrend/ulduar/ulduar/boss_algalon.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_algalon.cpp @@ -14,7 +14,7 @@ struct MANGOS_DLL_DECL boss_algalonAI : public ScriptedAI boss_algalonAI(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Heroic = m_creature->GetMap()->IsHeroic(); + Heroic = pCreature->GetMap()->GetSpawnMode() > 0; Reset(); } diff --git a/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp b/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp index e263e2504..8b7e50a62 100644 --- a/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp @@ -19,7 +19,7 @@ struct MANGOS_DLL_DECL boss_auriayaAI : public ScriptedAI boss_auriayaAI(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Heroic = m_creature->GetMap()->IsHeroic(); + Heroic = pCreature->GetMap()->GetSpawnMode() > 0; Reset(); } diff --git a/scripts/northrend/ulduar/ulduar/boss_freya.cpp b/scripts/northrend/ulduar/ulduar/boss_freya.cpp index 72abed2ff..6b2cd59db 100644 --- a/scripts/northrend/ulduar/ulduar/boss_freya.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_freya.cpp @@ -28,14 +28,11 @@ struct MANGOS_DLL_DECL boss_freyaAI : public ScriptedAI boss_freyaAI(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Heroic = m_creature->GetMap()->IsHeroic(); - + Heroic = pCreature->GetMap()->GetSpawnMode() > 0; bp = 8; - sp = GetSpellStore()->LookupEntry(SP_ATTUNED_TO_NATURE); - if(!m_creature->HasAura(SP_ATTUNED_TO_NATURE, 0)) - m_creature->AddAura(new AttunedToNatureAura(sp, 0, &bp, m_creature, m_creature)); - m_creature->GetAura(SP_ATTUNED_TO_NATURE, 0)->SetStackAmount(150); - + if(!pCreature->HasAura(SP_ATTUNED_TO_NATURE, 0)) + pCreature->AddAura(new AttunedToNatureAura(sp, 0, &bp, pCreature, pCreature)); + pCreature->GetAura(SP_ATTUNED_TO_NATURE, 0)->SetStackAmount(150); Reset(); } diff --git a/scripts/northrend/ulduar/ulduar/boss_hodir.cpp b/scripts/northrend/ulduar/ulduar/boss_hodir.cpp index 627f13060..942afa5fb 100644 --- a/scripts/northrend/ulduar/ulduar/boss_hodir.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_hodir.cpp @@ -21,7 +21,7 @@ struct MANGOS_DLL_DECL boss_hodirAI : public ScriptedAI boss_hodirAI(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Heroic = m_creature->GetMap()->IsHeroic(); + Heroic = pCreature->GetMap()->GetSpawnMode() > 0; Reset(); } diff --git a/scripts/northrend/ulduar/ulduar/boss_ignis.cpp b/scripts/northrend/ulduar/ulduar/boss_ignis.cpp index 1fe59fb99..5e397eecd 100644 --- a/scripts/northrend/ulduar/ulduar/boss_ignis.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_ignis.cpp @@ -19,7 +19,7 @@ struct MANGOS_DLL_DECL boss_ignisAI : public ScriptedAI boss_ignisAI(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Heroic = m_creature->GetMap()->IsHeroic(); + Heroic = pCreature->GetMap()->GetSpawnMode() > 0; Reset(); } diff --git a/scripts/northrend/ulduar/ulduar/boss_iron_council.cpp b/scripts/northrend/ulduar/ulduar/boss_iron_council.cpp index 152342f66..7a2f432eb 100644 --- a/scripts/northrend/ulduar/ulduar/boss_iron_council.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_iron_council.cpp @@ -32,7 +32,7 @@ struct MANGOS_DLL_DECL iron_councilAI : public ScriptedAI iron_councilAI(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Heroic = m_creature->GetMap()->IsHeroic(); + Heroic = pCreature->GetMap()->GetSpawnMode() > 0; Reset(); } diff --git a/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp b/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp index feb0046cd..aaddc1621 100644 --- a/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp @@ -29,7 +29,7 @@ struct MANGOS_DLL_DECL boss_kologarnAI : public Scripted_NoMovementAI boss_kologarnAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Heroic = m_creature->GetMap()->IsHeroic(); + Heroic = pCreature->GetMap()->GetSpawnMode() > 0; Reset(); } @@ -147,7 +147,7 @@ struct MANGOS_DLL_DECL boss_kologarn_left_armAI : public Scripted_NoMovementAI boss_kologarn_left_armAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Heroic = m_creature->GetMap()->IsHeroic(); + Heroic = pCreature->GetMap()->GetSpawnMode() > 0; Reset(); } @@ -191,7 +191,7 @@ struct MANGOS_DLL_DECL boss_kologarn_right_armAI : public Scripted_NoMovementAI boss_kologarn_right_armAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Heroic = m_creature->GetMap()->IsHeroic(); + Heroic = pCreature->GetMap()->GetSpawnMode() > 0; Reset(); } diff --git a/scripts/northrend/ulduar/ulduar/boss_leviathan.cpp b/scripts/northrend/ulduar/ulduar/boss_leviathan.cpp index 2958b4700..bebcb29d1 100644 --- a/scripts/northrend/ulduar/ulduar/boss_leviathan.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_leviathan.cpp @@ -21,7 +21,7 @@ struct MANGOS_DLL_DECL boss_flame_leviathan : public ScriptedAI boss_flame_leviathan(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Heroic = m_creature->GetMap()->IsHeroic(); + Heroic = pCreature->GetMap()->GetSpawnMode() > 0; Reset(); } diff --git a/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp b/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp index c572efe4a..712c71844 100644 --- a/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp @@ -7,7 +7,7 @@ struct MANGOS_DLL_DECL boss_mimironAI : public ScriptedAI boss_mimironAI(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Heroic = m_creature->GetMap()->IsHeroic(); + Heroic = pCreature->GetMap()->GetSpawnMode() > 0; Reset(); } diff --git a/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp b/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp index d42d57ba7..e2a435456 100644 --- a/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp @@ -25,7 +25,7 @@ struct MANGOS_DLL_DECL boss_razorscaleAI : public ScriptedAI boss_razorscaleAI(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Heroic = m_creature->GetMap()->IsHeroic(); + Heroic = pCreature->GetMap()->GetSpawnMode() > 0; Reset(); } diff --git a/scripts/northrend/ulduar/ulduar/boss_thorim.cpp b/scripts/northrend/ulduar/ulduar/boss_thorim.cpp index 84c3c95dc..ff872f2bb 100644 --- a/scripts/northrend/ulduar/ulduar/boss_thorim.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_thorim.cpp @@ -7,7 +7,7 @@ struct MANGOS_DLL_DECL boss_thorimAI : public ScriptedAI boss_thorimAI(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Heroic = m_creature->GetMap()->IsHeroic(); + Heroic = pCreature->GetMap()->GetSpawnMode() > 0; Reset(); } diff --git a/scripts/northrend/ulduar/ulduar/boss_vezax.cpp b/scripts/northrend/ulduar/ulduar/boss_vezax.cpp index 5fdd53686..dbdb741b8 100644 --- a/scripts/northrend/ulduar/ulduar/boss_vezax.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_vezax.cpp @@ -16,7 +16,7 @@ struct MANGOS_DLL_DECL boss_vezaxAI : public ScriptedAI boss_vezaxAI(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Heroic = m_creature->GetMap()->IsHeroic(); + Heroic = pCreature->GetMap()->GetSpawnMode() > 0; Reset(); } diff --git a/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp b/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp index 8aac44f89..33888033b 100644 --- a/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp @@ -42,7 +42,7 @@ struct MANGOS_DLL_DECL boss_xt002 : public ScriptedAI boss_xt002(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Heroic = m_creature->GetMap()->IsHeroic(); + Heroic = pCreature->GetMap()->GetSpawnMode() > 0; //PummelerCount = Heroic ? 2 : 1; ScrapbotCount = Heroic ? 6 : 4; BoombotCount = Heroic ? 4 : 2; diff --git a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp index a33ce6d74..a07b4bf08 100644 --- a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp @@ -10,7 +10,7 @@ struct MANGOS_DLL_DECL boss_yogg_saronAI : public ScriptedAI boss_yogg_saronAI(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Heroic = m_creature->GetMap()->IsHeroic(); + Heroic = pCreature->GetMap()->GetSpawnMode() > 0; Reset(); } @@ -36,8 +36,6 @@ struct MANGOS_DLL_DECL boss_yogg_saronAI : public ScriptedAI { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - - DoMeleeAttackIfReady(); } }; diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index ab81d6906..b628ef088 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -8,11 +8,6 @@ //Ice door after Hodir (194441) //Runed Stone Door after vezax (194750) -/* -TODO: Save "reached" variables with encounters for correct teleporter work. -*/ - - struct MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance { instance_ulduar(Map* pMap) : ScriptedInstance(pMap) From 86dc66221bf2adc4fec760feac578f795fa893fa Mon Sep 17 00:00:00 2001 From: Insider Date: Wed, 28 Oct 2009 12:08:23 +0700 Subject: [PATCH 022/405] Update for [patch 2] --- scripts/northrend/vault_of_archavon/boss_archavon.cpp | 4 ++-- scripts/northrend/vault_of_archavon/boss_emalon.cpp | 2 +- scripts/northrend/vault_of_archavon/boss_koralon.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/northrend/vault_of_archavon/boss_archavon.cpp b/scripts/northrend/vault_of_archavon/boss_archavon.cpp index c6dfad922..5067c9841 100644 --- a/scripts/northrend/vault_of_archavon/boss_archavon.cpp +++ b/scripts/northrend/vault_of_archavon/boss_archavon.cpp @@ -45,8 +45,8 @@ struct MANGOS_DLL_DECL boss_archavonAI : public ScriptedAI boss_archavonAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); - m_fDefaultMoveSpeed = m_creature->GetSpeedRate(MOVE_RUN); + m_bIsHeroicMode = pCreature->GetMap()->GetSpawnMode() > 0; + m_fDefaultMoveSpeed = pCreature->GetSpeedRate(MOVE_RUN); Reset(); } diff --git a/scripts/northrend/vault_of_archavon/boss_emalon.cpp b/scripts/northrend/vault_of_archavon/boss_emalon.cpp index f4bbda560..c28f16308 100644 --- a/scripts/northrend/vault_of_archavon/boss_emalon.cpp +++ b/scripts/northrend/vault_of_archavon/boss_emalon.cpp @@ -206,7 +206,7 @@ struct MANGOS_DLL_DECL boss_emalonAI : public ScriptedAI boss_emalonAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->GetSpawnMode() > 0; Reset(); } diff --git a/scripts/northrend/vault_of_archavon/boss_koralon.cpp b/scripts/northrend/vault_of_archavon/boss_koralon.cpp index a20d205d5..e64e422d7 100644 --- a/scripts/northrend/vault_of_archavon/boss_koralon.cpp +++ b/scripts/northrend/vault_of_archavon/boss_koralon.cpp @@ -25,7 +25,7 @@ struct MANGOS_DLL_DECL boss_koralonAI : public ScriptedAI boss_koralonAI(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Heroic = m_creature->GetMap()->IsHeroic(); + Heroic = pCreature->GetMap()->GetSpawnMode() > 0; Reset(); } From e0d2ef57329ca5f7c201d987d87ea2d4911ec704 Mon Sep 17 00:00:00 2001 From: Insider Date: Fri, 30 Oct 2009 15:29:14 +0700 Subject: [PATCH 023/405] Update for [patch 1] --- .../northrend/naxxramas/boss_anubrekhan.cpp | 12 ++-- scripts/northrend/naxxramas/boss_gothik.cpp | 2 +- .../northrend/naxxramas/boss_sapphiron.cpp | 63 ++++++++++++++----- .../naxxramas/instance_naxxramas.cpp | 2 +- 4 files changed, 59 insertions(+), 20 deletions(-) diff --git a/scripts/northrend/naxxramas/boss_anubrekhan.cpp b/scripts/northrend/naxxramas/boss_anubrekhan.cpp index 45b113c11..04e80423e 100644 --- a/scripts/northrend/naxxramas/boss_anubrekhan.cpp +++ b/scripts/northrend/naxxramas/boss_anubrekhan.cpp @@ -42,7 +42,9 @@ enum { //Anub'Rekhan spels SPELL_IMPALE = 28783, //May be wrong spell id. Causes more dmg than I expect - SPELL_LOCUSTSWARM = 54021, //This is a self buff that triggers the dmg debuff + H_SPELL_IMPALE = 56090, + SPELL_LOCUSTSWARM = 28785, //This is a self buff that triggers the dmg debuff + H_SPELL_LOCUSTSWARM = 54021, SPELL_BERSERK = 46587, SPELL_SELF_SPAWN_5 = 29105, //This spawns 5 corpse scarabs ontop of us (most likely the player casts this on death) @@ -65,6 +67,7 @@ struct MANGOS_DLL_DECL boss_anubrekhanAI : public ScriptedAI boss_anubrekhanAI(Creature *c) : ScriptedAI(c) { pInstance = ((ScriptedInstance*)c->GetInstanceData()); + Heroic = c->GetMap()->GetSpawnMode() > 0; for (int i = 0; i < MAX_CRYPT_GUARDS; i++) guidCryptGuards[i] = 0; @@ -73,6 +76,7 @@ struct MANGOS_DLL_DECL boss_anubrekhanAI : public ScriptedAI } ScriptedInstance *pInstance; + bool Heroic; uint32 Impale_Timer; uint32 LocustSwarm_Timer; @@ -256,9 +260,9 @@ struct MANGOS_DLL_DECL boss_anubrekhanAI : public ScriptedAI { //Cast Impale on a random target //Do NOT cast it when we are afflicted by locust swarm - if (!m_creature->HasAura(SPELL_LOCUSTSWARM,1)) + if (!m_creature->HasAura(Heroic ? H_SPELL_LOCUSTSWARM : SPELL_LOCUSTSWARM, 1)) if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1)) - DoCast(target,SPELL_IMPALE); + DoCast(target,Heroic ? H_SPELL_IMPALE : SPELL_IMPALE); Impale_Timer = 15000; }else Impale_Timer -= diff; @@ -266,7 +270,7 @@ struct MANGOS_DLL_DECL boss_anubrekhanAI : public ScriptedAI if (LocustSwarm_Timer < diff) { //Cast Locust Swarm buff on ourselves - DoCast(m_creature, SPELL_LOCUSTSWARM); + DoCast(m_creature, Heroic ? H_SPELL_LOCUSTSWARM : SPELL_LOCUSTSWARM); swarm = true; //Summon Crypt Guard immidietly after Locust Swarm if (CryptGuard_count < MAX_CRYPT_GUARDS) diff --git a/scripts/northrend/naxxramas/boss_gothik.cpp b/scripts/northrend/naxxramas/boss_gothik.cpp index bbbddd1c9..9ecf10a75 100644 --- a/scripts/northrend/naxxramas/boss_gothik.cpp +++ b/scripts/northrend/naxxramas/boss_gothik.cpp @@ -87,7 +87,7 @@ struct MANGOS_DLL_DECL boss_gothikAI : public ScriptedAI boss_gothikAI(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Heroic = pCreature->GetMap()->IsHeroic(); + Heroic = pCreature->GetMap()->GetSpawnMode() > 0; trainees = Heroic ? 3 : 2; diff --git a/scripts/northrend/naxxramas/boss_sapphiron.cpp b/scripts/northrend/naxxramas/boss_sapphiron.cpp index 2315fbedd..1e00762de 100644 --- a/scripts/northrend/naxxramas/boss_sapphiron.cpp +++ b/scripts/northrend/naxxramas/boss_sapphiron.cpp @@ -29,23 +29,34 @@ EndScriptData */ #define SPELL_ICEBOLT 28522 #define SPELL_FROST_BREATH 29318 //should be 28524 #define SPELL_FROST_AURA 28531 +#define H_SPELL_FROST_AURA 55799 #define SPELL_LIFE_DRAIN 28542 +#define H_SPELL_LIFE_DRAIN 55665 #define SPELL_BLIZZARD 28547 -#define SPELL_BERSERK 26662 +#define H_SPELL_BLIZZARD 55699 +#define SPELL_TAIL_SWEEP 55697 +#define H_SPELL_TAIL_SWEEP 55696 +#define SPELL_CLEAVE 19983 +#define SPELL_BERSERK 26662 struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI { boss_sapphironAI(Creature* pCreature) : ScriptedAI(pCreature) { + Heroic = pCreature->GetMap()->GetSpawnMode() > 0; Reset(); } + bool Heroic; + uint32 Icebolt_Count; uint32 Icebolt_Timer; uint32 FrostBreath_Timer; uint32 FrostAura_Timer; uint32 LifeDrain_Timer; uint32 Blizzard_Timer; + uint32 TailSweep_Timer; + uint32 Cleave_Timer; uint32 Fly_Timer; uint32 Berserk_Timer; uint32 phase; @@ -59,6 +70,8 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI LifeDrain_Timer = 24000; Blizzard_Timer = 20000; Fly_Timer = 45000; + TailSweep_Timer = 10000 + rand()%10000; + Cleave_Timer = 10000 + rand()%10000; Icebolt_Timer = 4000; land_Timer = 2000; Berserk_Timer = 900000; @@ -78,25 +91,42 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI { if (FrostAura_Timer < diff) { - DoCast(m_creature->getVictim(),SPELL_FROST_AURA); + DoCast(m_creature->getVictim(), Heroic ? H_SPELL_FROST_AURA : SPELL_FROST_AURA); FrostAura_Timer = 5000; - }else FrostAura_Timer -= diff; + } + else FrostAura_Timer -= diff; if (LifeDrain_Timer < diff) { if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(target,SPELL_LIFE_DRAIN); + DoCast(target, Heroic ? H_SPELL_LIFE_DRAIN : SPELL_LIFE_DRAIN); LifeDrain_Timer = 24000; - }else LifeDrain_Timer -= diff; + } + else LifeDrain_Timer -= diff; if (Blizzard_Timer < diff) { if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(target,SPELL_BLIZZARD); + DoCast(target, Heroic ? H_SPELL_BLIZZARD : SPELL_BLIZZARD); Blizzard_Timer = 20000; - }else Blizzard_Timer -= diff; + } + else Blizzard_Timer -= diff; + + if(TailSweep_Timer < diff) + { + DoCast(m_creature->getVictim(), Heroic ? H_SPELL_TAIL_SWEEP : SPELL_TAIL_SWEEP); + TailSweep_Timer = 10000 + rand()%10000; + } + else TailSweep_Timer -= diff; + + if(Cleave_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_CLEAVE); + Cleave_Timer = 10000 + rand()%10000; + } + else Cleave_Timer -= diff; if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() > 10) { @@ -113,7 +143,8 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI Icebolt_Timer = 4000; Icebolt_Count = 0; landoff = false; - }else Fly_Timer -= diff; + } + else Fly_Timer -= diff; } } @@ -122,11 +153,12 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI if (Icebolt_Timer < diff && Icebolt_Count < 5) { if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(target,SPELL_ICEBOLT); + DoCast(target, SPELL_ICEBOLT); ++Icebolt_Count; Icebolt_Timer = 4000; - }else Icebolt_Timer -= diff; + } + else Icebolt_Timer -= diff; if (Icebolt_Count == 5 && !landoff) { @@ -137,7 +169,8 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI land_Timer = 2000; landoff = true; FrostBreath_Timer = 6000; - }else FrostBreath_Timer -= diff; + } + else FrostBreath_Timer -= diff; } if (landoff) @@ -150,16 +183,18 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI m_creature->GetMotionMaster()->Clear(false); m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); Fly_Timer = 67000; - }else land_Timer -= diff; + } + else land_Timer -= diff; } } if (Berserk_Timer < diff) { DoScriptText(EMOTE_ENRAGE, m_creature); - DoCast(m_creature,SPELL_BERSERK); + DoCast(m_creature, SPELL_BERSERK); Berserk_Timer = 300000; - }else Berserk_Timer -= diff; + } + else Berserk_Timer -= diff; if (phase!=2) DoMeleeAttackIfReady(); diff --git a/scripts/northrend/naxxramas/instance_naxxramas.cpp b/scripts/northrend/naxxramas/instance_naxxramas.cpp index 316c23c2c..c6ac2fb03 100644 --- a/scripts/northrend/naxxramas/instance_naxxramas.cpp +++ b/scripts/northrend/naxxramas/instance_naxxramas.cpp @@ -24,7 +24,7 @@ struct MANGOS_DLL_DECL instance_naxxramas : public ScriptedInstance { instance_naxxramas(Map *Map) : ScriptedInstance(Map) { - Heroic = Map->IsHeroic(); + Heroic = Map->GetSpawnMode() > 0; Initialize(); }; From 653763f734d46b850ef9ae31b80f64fe6bf5bb2e Mon Sep 17 00:00:00 2001 From: Insider Date: Fri, 30 Oct 2009 15:30:36 +0700 Subject: [PATCH 024/405] SD2 updated to 1486 --- Makefile.am | 1 - VC80/80ScriptDev2.vcproj | 4 - VC90/90ScriptDev2.vcproj | 4 - include/sc_creature.cpp | 11 ++- include/sc_grid_searchers.cpp | 8 +- scripts/world/npc_innkeeper.cpp | 144 -------------------------------- scripts/world/npcs_special.cpp | 98 ++++++++++++++++++++++ sql/Updates/Makefile.am | 3 +- sql/Updates/r1486_mangos.sql | 2 + sql/mangos_scriptname_full.sql | 2 + 10 files changed, 115 insertions(+), 162 deletions(-) delete mode 100644 scripts/world/npc_innkeeper.cpp create mode 100644 sql/Updates/r1486_mangos.sql diff --git a/Makefile.am b/Makefile.am index b16f79ff0..eff154487 100644 --- a/Makefile.am +++ b/Makefile.am @@ -487,7 +487,6 @@ scripts/world/go_scripts.cpp \ scripts/world/guards.cpp \ scripts/world/item_scripts.cpp \ scripts/world/mob_generic_creature.cpp \ -scripts/world/npc_innkeeper.cpp \ scripts/world/npc_professions.cpp \ scripts/world/npcs_special.cpp \ system/ScriptLoader.cpp \ diff --git a/VC80/80ScriptDev2.vcproj b/VC80/80ScriptDev2.vcproj index dcdd11c37..6111dee32 100644 --- a/VC80/80ScriptDev2.vcproj +++ b/VC80/80ScriptDev2.vcproj @@ -2508,10 +2508,6 @@ RelativePath="..\scripts\world\mob_generic_creature.cpp" > - - diff --git a/VC90/90ScriptDev2.vcproj b/VC90/90ScriptDev2.vcproj index 891682ef4..80a1dd16c 100644 --- a/VC90/90ScriptDev2.vcproj +++ b/VC90/90ScriptDev2.vcproj @@ -2507,10 +2507,6 @@ RelativePath="..\scripts\world\mob_generic_creature.cpp" > - - diff --git a/include/sc_creature.cpp b/include/sc_creature.cpp index 311ba5961..80aa42fa1 100644 --- a/include/sc_creature.cpp +++ b/include/sc_creature.cpp @@ -469,7 +469,7 @@ Unit* ScriptedAI::DoSelectLowestHpFriendly(float fRange, uint32 uiMinHPDiff) TypeContainerVisitor, GridTypeMapContainer > grid_unit_searcher(searcher); CellLock cell_lock(cell, p); - cell_lock->Visit(cell_lock, grid_unit_searcher, *(m_creature->GetMap())); + cell_lock->Visit(cell_lock, grid_unit_searcher, *(m_creature->GetMap()), *m_creature, fRange); return pUnit; } @@ -489,7 +489,7 @@ std::list ScriptedAI::DoFindFriendlyCC(float fRange) TypeContainerVisitor, GridTypeMapContainer > grid_creature_searcher(searcher); CellLock cell_lock(cell, p); - cell_lock->Visit(cell_lock, grid_creature_searcher, *(m_creature->GetMap())); + cell_lock->Visit(cell_lock, grid_creature_searcher, *(m_creature->GetMap()), *m_creature, fRange); return pList; } @@ -509,7 +509,7 @@ std::list ScriptedAI::DoFindFriendlyMissingBuff(float fRange, uint32 TypeContainerVisitor, GridTypeMapContainer > grid_creature_searcher(searcher); CellLock cell_lock(cell, p); - cell_lock->Visit(cell_lock, grid_creature_searcher, *(m_creature->GetMap())); + cell_lock->Visit(cell_lock, grid_creature_searcher, *(m_creature->GetMap()), *m_creature, fRange); return pList; } @@ -528,7 +528,10 @@ Player* ScriptedAI::GetPlayerAtMinimumRange(float fMinimumRange) TypeContainerVisitor, GridTypeMapContainer> visitor(searcher); CellLock cell_lock(cell, pair); - cell_lock->Visit(cell_lock, visitor, *(m_creature->GetMap())); + Map * map = m_creature->GetMap(); + //lets limit the maximum player search distance to speed up calculations... + const float fMaxSearchDst = map->GetVisibilityDistance() > MAX_PLAYER_STEALTH_DETECT_RANGE ? MAX_PLAYER_STEALTH_DETECT_RANGE : map->GetVisibilityDistance(); + cell_lock->Visit(cell_lock, visitor, *map, *m_creature, fMaxSearchDst); return pPlayer; } diff --git a/include/sc_grid_searchers.cpp b/include/sc_grid_searchers.cpp index 75aab9cab..32ed719de 100644 --- a/include/sc_grid_searchers.cpp +++ b/include/sc_grid_searchers.cpp @@ -20,7 +20,7 @@ GameObject* GetClosestGameObjectWithEntry(WorldObject* pSource, uint32 uiEntry, TypeContainerVisitor, GridTypeMapContainer> go_searcher(searcher); CellLock cell_lock(cell, pair); - cell_lock->Visit(cell_lock, go_searcher,*(pSource->GetMap())); + cell_lock->Visit(cell_lock, go_searcher,*(pSource->GetMap()), *pSource, fMaxSearchRange); return pGo; } @@ -41,7 +41,7 @@ Creature* GetClosestCreatureWithEntry(WorldObject* pSource, uint32 uiEntry, floa TypeContainerVisitor, GridTypeMapContainer> creature_searcher(searcher); CellLock cell_lock(cell, pair); - cell_lock->Visit(cell_lock, creature_searcher,*(pSource->GetMap())); + cell_lock->Visit(cell_lock, creature_searcher,*(pSource->GetMap()), *pSource, fMaxSearchRange); return pCreature; } @@ -58,7 +58,7 @@ void GetGameObjectListWithEntryInGrid(std::list& lList , WorldObjec TypeContainerVisitor, GridTypeMapContainer> visitor(searcher); CellLock cell_lock(cell, pair); - cell_lock->Visit(cell_lock, visitor, *(pSource->GetMap())); + cell_lock->Visit(cell_lock, visitor, *(pSource->GetMap()), *pSource, fMaxSearchRange); } void GetCreatureListWithEntryInGrid(std::list& lList, WorldObject* pSource, uint32 uiEntry, float fMaxSearchRange) @@ -73,5 +73,5 @@ void GetCreatureListWithEntryInGrid(std::list& lList, WorldObject* pS TypeContainerVisitor, GridTypeMapContainer> visitor(searcher); CellLock cell_lock(cell, pair); - cell_lock->Visit(cell_lock, visitor, *(pSource->GetMap())); + cell_lock->Visit(cell_lock, visitor, *(pSource->GetMap()), *pSource, fMaxSearchRange); } diff --git a/scripts/world/npc_innkeeper.cpp b/scripts/world/npc_innkeeper.cpp deleted file mode 100644 index 2ff31c2e6..000000000 --- a/scripts/world/npc_innkeeper.cpp +++ /dev/null @@ -1,144 +0,0 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 - * 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, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* ScriptData -SDName: Npc_Innkeeper -SD%Complete: 50 -SDComment: This script are currently not in use. EventSystem cannot be used on Windows build of SD2 -SDCategory: NPCs -EndScriptData */ - -#include "precompiled.h" - -#define HALLOWEEN_EVENTID 12 -#define SPELL_TRICK_OR_TREATED 24755 -#define SPELL_TREAT 24715 - -#define LOCALE_TRICK_OR_TREAT_0 "Trick or Treat!" -#define LOCALE_TRICK_OR_TREAT_2 "Des bonbons ou des blagues!" -#define LOCALE_TRICK_OR_TREAT_3 "Ses oder Saures!" -#define LOCALE_TRICK_OR_TREAT_6 "Truco o trato!" - -bool isEventActive() -{ - /* - const GameEvent::ActiveEvents *ActiveEventsList = gameeventmgr.GetActiveEventList(); - GameEvent::ActiveEvents::const_iterator itr; - for (itr = ActiveEventsList->begin(); itr != ActiveEventsList->end(); ++itr) - { - if (*itr==HALLOWEEN_EVENTID) - { - return true; - } - }*/ - return false; -} - -bool GossipHello_npc_innkeeper(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); - - if (isEventActive()&& !pPlayer->GetAura(SPELL_TRICK_OR_TREATED,0)) - { - char* localizedEntry; - switch (pPlayer->GetSession()->GetSessionDbLocaleIndex()) - { - case 0: - localizedEntry=LOCALE_TRICK_OR_TREAT_0; - break; - case 2: - localizedEntry=LOCALE_TRICK_OR_TREAT_2; - break; - case 3: - localizedEntry=LOCALE_TRICK_OR_TREAT_3; - break; - case 6: - localizedEntry=LOCALE_TRICK_OR_TREAT_6; - break; - default: - localizedEntry=LOCALE_TRICK_OR_TREAT_0; - } - - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, localizedEntry, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+HALLOWEEN_EVENTID); - } - - pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetGUID()); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); - return true; -} - -bool GossipSelect_npc_innkeeper(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_INFO_DEF+HALLOWEEN_EVENTID && isEventActive() && !pPlayer->GetAura(SPELL_TRICK_OR_TREATED,0)) - { - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->CastSpell(pPlayer, SPELL_TRICK_OR_TREATED, true); - - // either trick or treat, 50% chance - if (urand(0, 1)) - { - pPlayer->CastSpell(pPlayer, SPELL_TREAT, true); - } - else - { - int32 trickspell=0; - switch(urand(0, 8)) // note that female characters can get male costumes and vice versa - { - case 0: - trickspell=24753; // cannot cast, random 30sec - break; - case 1: - trickspell=24713; // lepper gnome costume - break; - case 2: - trickspell=24735; // male ghost costume - break; - case 3: - trickspell=24736; // female ghostcostume - break; - case 4: - trickspell=24710; // male ninja costume - break; - case 5: - trickspell=24711; // female ninja costume - break; - case 6: - trickspell=24708; // male pirate costume - break; - case 7: - trickspell=24709; // female pirate costume - break; - case 8: - trickspell=24723; // skeleton costume - break; - } - pPlayer->CastSpell(pPlayer, trickspell, true); - } - return true; // prevent mangos core handling - } - return false; // the player didn't select "trick or treat" or cheated, normal core handling -} - -void AddSC_npc_innkeeper() -{ - Script *newscript; - newscript = new Script; - newscript->Name = "npc_innkeeper"; - newscript->pGossipHello = &GossipHello_npc_innkeeper; - newscript->pGossipSelect = &GossipSelect_npc_innkeeper; - newscript->RegisterSelf(); -} diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index c9612e29b..911cd366d 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -25,6 +25,7 @@ EndScriptData #include "precompiled.h" #include "escort_ai.h" #include "ObjectMgr.h" +#include "GameEventMgr.h" /* ContentData npc_air_force_bots 80% support for misc (invisible) guard bots in areas where player allowed to fly. Summon guards after a preset time if tagged by spell @@ -34,6 +35,7 @@ npc_guardian 100% guardianAI used to prevent players from accessin npc_garments_of_quests 80% NPC's related to all Garments of-quests 5621, 5624, 5625, 5648, 5650 npc_injured_patient 100% patients for triage-quests (6622 and 6624) npc_doctor 100% Gustaf Vanhowzen and Gregory Victor, quest 6622 and 6624 (Triage) +npc_innkeeper 25% Innkeepers in general. A lot do be done here (misc options for events) npc_kingdom_of_dalaran_quests Misc NPC's gossip option related to quests 12791, 12794 and 12796 npc_lunaclaw_spirit 100% Appears at two different locations, quest 6001/6002 npc_mount_vendor 100% Regular mount vendors all over the world. Display gossip if player doesn't meet the requirements to buy @@ -999,6 +1001,96 @@ CreatureAI* GetAI_npc_guardian(Creature* pCreature) return new npc_guardianAI(pCreature); } +/*######## +# npc_innkeeper +#########*/ + +// Script applied to all innkeepers by npcflag. +// Are there any known innkeepers that does not hape the options in the below? +// (remember gossipHello is not called unless npcflag|1 is present) + +enum +{ + TEXT_ID_WHAT_TO_DO = 1853, + + SPELL_TRICK_OR_TREAT = 24751, // create item or random buff + SPELL_TRICK_OR_TREATED = 24755, // buff player get when tricked or treated + SPELL_TREAT = 24715, + SPELL_TRICK_NO_ATTACK = 24753, + SPELL_TRICK_GNOME = 24713, + SPELL_TRICK_GHOST_MALE = 24735, + SPELL_TRICK_GHOST_FEMALE = 24736, + SPELL_TRICK_NINJA_MALE = 24710, + SPELL_TRICK_NINJA_FEMALE = 24711, + SPELL_TRICK_PIRATE_MALE = 24708, + SPELL_TRICK_PIRATE_FEMALE = 24709, + SPELL_TRICK_SKELETON = 24723, + SPELL_TRICK_BAT = 24732 +}; + +#define GOSSIP_ITEM_TRICK_OR_TREAT "Trick or Treat!" +#define GOSSIP_ITEM_WHAT_TO_DO "What can I do at an Inn?" + +bool GossipHello_npc_innkeeper(Player* pPlayer, Creature* pCreature) +{ + pCreature->prepareGossipMenu(pPlayer); + + if (IsHolidayActive(HOLIDAY_HALLOWS_END) && !pPlayer->HasAura(SPELL_TRICK_OR_TREATED,0)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TRICK_OR_TREAT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + + // Should only apply to innkeeper close to start areas. Area flag or other unknown fields? + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_WHAT_TO_DO, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetGUID()); + pCreature->sendPreparedGossip(pPlayer); + return true; +} + +bool GossipSelect_npc_innkeeper(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_WHAT_TO_DO, pCreature->GetGUID()); + return true; + } + + if (uiAction == GOSSIP_ACTION_INFO_DEF+2) + { + pPlayer->CLOSE_GOSSIP_MENU(); + + // either trick or treat, 50% chance + if (urand(0, 1)) + { + pPlayer->CastSpell(pPlayer, SPELL_TREAT, true); + } + else + { + uint32 uiTrickSpell = 0; + + switch(urand(0, 9)) // note that female characters can get male costumes and vice versa + { + case 0: uiTrickSpell = SPELL_TRICK_NO_ATTACK; break; + case 1: uiTrickSpell = SPELL_TRICK_GNOME; break; + case 2: uiTrickSpell = SPELL_TRICK_GHOST_MALE; break; + case 3: uiTrickSpell = SPELL_TRICK_GHOST_FEMALE; break; + case 4: uiTrickSpell = SPELL_TRICK_NINJA_MALE; break; + case 5: uiTrickSpell = SPELL_TRICK_NINJA_FEMALE; break; + case 6: uiTrickSpell = SPELL_TRICK_PIRATE_MALE; break; + case 7: uiTrickSpell = SPELL_TRICK_PIRATE_FEMALE; break; + case 8: uiTrickSpell = SPELL_TRICK_SKELETON; break; + case 9: uiTrickSpell = SPELL_TRICK_BAT; break; + } + + pPlayer->CastSpell(pPlayer, uiTrickSpell, true); + } + + pPlayer->CastSpell(pPlayer, SPELL_TRICK_OR_TREATED, true); + return true; // prevent mangos handling + } + + return false; // player didn't select scripted gossip, normal core handling +} + /*###### ## npc_kingdom_of_dalaran_quests ######*/ @@ -1379,6 +1471,12 @@ void AddSC_npcs_special() newscript->GetAI = &GetAI_npc_guardian; newscript->RegisterSelf(); + newscript = new Script; + newscript->Name = "npc_innkeeper"; + newscript->pGossipHello = &GossipHello_npc_innkeeper; + newscript->pGossipSelect = &GossipSelect_npc_innkeeper; + newscript->RegisterSelf(); + newscript = new Script; newscript->Name = "npc_kingdom_of_dalaran_quests"; newscript->pGossipHello = &GossipHello_npc_kingdom_of_dalaran_quests; diff --git a/sql/Updates/Makefile.am b/sql/Updates/Makefile.am index 2ac6e5b7c..7f82c5a7b 100644 --- a/sql/Updates/Makefile.am +++ b/sql/Updates/Makefile.am @@ -38,4 +38,5 @@ pkgdata_DATA = \ r1474_scriptdev2.sql \ r1476_mangos.sql \ r1476_scriptdev2.sql \ - r1478_scriptdev2.sql + r1478_scriptdev2.sql \ + r1486_mangos.sql diff --git a/sql/Updates/r1486_mangos.sql b/sql/Updates/r1486_mangos.sql new file mode 100644 index 000000000..b07d09081 --- /dev/null +++ b/sql/Updates/r1486_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='' WHERE npcflag!=npcflag|65536 AND ScriptName='npc_innkeeper'; +UPDATE creature_template SET ScriptName='npc_innkeeper' WHERE npcflag=npcflag|65536; diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index f6cc077f0..01db2332a 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -87,6 +87,8 @@ UPDATE creature_template SET ScriptName='npc_lunaclaw_spirit' WHERE entry=12144; UPDATE creature_template SET ScriptName='npc_mount_vendor' WHERE entry IN (384,1261,1460,2357,3362,3685,4730,4731,4885,7952,7955,16264,17584); UPDATE creature_template SET ScriptName='npc_doctor' WHERE entry IN (12939,12920); UPDATE creature_template SET ScriptName='npc_injured_patient' WHERE entry IN (12936,12937,12938,12923,12924,12925); +UPDATE creature_template SET ScriptName='' WHERE npcflag!=npcflag|65536 AND ScriptName='npc_innkeeper'; +UPDATE creature_template SET ScriptName='npc_innkeeper' WHERE npcflag=npcflag|65536; UPDATE creature_template SET ScriptName='npc_prof_alchemy' WHERE entry IN (17909,19052,22427); UPDATE creature_template SET ScriptName='npc_prof_blacksmith' WHERE entry IN (5164,11145,11146,11176,11177,11178,11191,11192,11193); UPDATE creature_template SET ScriptName='npc_engineering_tele_trinket' WHERE entry IN (14742,14743,21493,21494); From bced3f1fc5fb6ad6bec6c493ec4e0decbbeced22 Mon Sep 17 00:00:00 2001 From: Insider Date: Fri, 30 Oct 2009 18:59:51 +0700 Subject: [PATCH 025/405] Disabled small part of SQL file for [patch 7] --- addition/7_mangos_ulduar.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addition/7_mangos_ulduar.sql b/addition/7_mangos_ulduar.sql index 8e6497e95..57bc228e8 100644 --- a/addition/7_mangos_ulduar.sql +++ b/addition/7_mangos_ulduar.sql @@ -21,10 +21,10 @@ UPDATE `instance_template` SET `script`='instance_ulduar' WHERE `map`=603; replace into `creature_template` values ('99005','0','0','0','22448','0','22448','0','Ulduar teleporter','',NULL,'80','80','64200','64200','12300','12300','31200','35','35','1','1.48','0.5','0','3170','6182','0','33235','1','1400','1900','0','0','0','0','0','0','0','0','0','0','100','7','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','1','3','1','1','0','0','0','0','0','0','0','0','1','99003','0','0','ulduar_teleporter'); replace into `creature_template_addon` values ('99005','0','0','0','0','0','48143 0'); replace into `locales_creature` values ('99005','','','','','','','',' ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,''); -replace into `creature` values +/*replace into `creature` values ('500000','99005','571','1','1','0','99003','9025.76','-1179.12','1060.18','4.59386','25','0','0','64200','12300','0','0'), ('500001','99005','603','2','1','0','99003','1497.84','-23.9801','421.367','5.0242','25','0','0','64200','12300','0','0'), ('500002','99005','603','2','1','0','99003','131.248','-35.3802','410.204','0','25','0','0','64200','12300','0','0'), ('500003','99005','603','2','1','0','99003','553.233','-12.3247','410.079','0','25','0','0','64200','12300','0','0'), ('500004','99005','603','2','1','0','99003','926.292','-11.4635','418.995','0','25','0','0','64200','12300','0','0'), -('500005','99005','603','2','1','0','99003','2086.17','-24.3111','421.639','3.11803','25','0','0','64200','12300','0','0'); +('500005','99005','603','2','1','0','99003','2086.17','-24.3111','421.639','3.11803','25','0','0','64200','12300','0','0');*/ From c87e9c1248714984ce82da8b5c3a1e345fd861e5 Mon Sep 17 00:00:00 2001 From: Insider Date: Sat, 31 Oct 2009 00:14:00 +0700 Subject: [PATCH 026/405] SD2 updated to 1487 --- .../eastern_kingdoms/zulaman/boss_janalai.cpp | 74 +++++++------------ 1 file changed, 28 insertions(+), 46 deletions(-) diff --git a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp index f14e24ee9..1ed28cece 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp @@ -71,7 +71,7 @@ enum }; //spells should summon Fire Bomb, used in Throw5Bombs() -uint32 m_auiSpellFireBombSummon[]= +static uint32 m_auiSpellFireBombSummon[]= { 42622, 42623, 42624, 42625, 42626 }; @@ -256,6 +256,10 @@ struct MANGOS_DLL_DECL boss_janalaiAI : public ScriptedAI //visual spell, spell hit pSummoned after a short time m_creature->CastSpell(pSummoned,SPELL_FIRE_BOMB_THROW,true); } + else + { + pSummoned->CastSpell(pSummoned, SPELL_FIRE_WALL, true); + } break; } } @@ -269,64 +273,42 @@ struct MANGOS_DLL_DECL boss_janalaiAI : public ScriptedAI void CreateFireWall() // Create Firewall { - Creature* wall = NULL; - wall = m_creature->SummonCreature(NPC_FIRE_BOMB,FireWallCoords[0][0],FireWallCoords[0][1],FireWallCoords[0][2],FireWallCoords[0][3],TEMPSUMMON_TIMED_DESPAWN,11500); - if (wall) - wall->CastSpell(wall,SPELL_FIRE_WALL,false); - - wall = m_creature->SummonCreature(NPC_FIRE_BOMB,FireWallCoords[0][0],FireWallCoords[0][1]+5,FireWallCoords[0][2],FireWallCoords[0][3],TEMPSUMMON_TIMED_DESPAWN,11500); - if (wall) - wall->CastSpell(wall,SPELL_FIRE_WALL,false); - - wall = m_creature->SummonCreature(NPC_FIRE_BOMB,FireWallCoords[0][0],FireWallCoords[0][1]-5,FireWallCoords[0][2],FireWallCoords[0][3],TEMPSUMMON_TIMED_DESPAWN,11500); - if (wall) - wall->CastSpell(wall,SPELL_FIRE_WALL,false); - - wall = m_creature->SummonCreature(NPC_FIRE_BOMB,FireWallCoords[1][0]-2,FireWallCoords[1][1]-2,FireWallCoords[1][2],FireWallCoords[1][3],TEMPSUMMON_TIMED_DESPAWN,11500); - if (wall) - wall->CastSpell(wall,SPELL_FIRE_WALL,false); - - wall = m_creature->SummonCreature(NPC_FIRE_BOMB,FireWallCoords[1][0]+2,FireWallCoords[1][1]+2,FireWallCoords[1][2],FireWallCoords[1][3],TEMPSUMMON_TIMED_DESPAWN,11500); - if (wall) - wall->CastSpell(wall,SPELL_FIRE_WALL,false); - - wall = m_creature->SummonCreature(NPC_FIRE_BOMB,FireWallCoords[2][0],FireWallCoords[2][1],FireWallCoords[2][2],FireWallCoords[2][3],TEMPSUMMON_TIMED_DESPAWN,11500); - if (wall) - wall->CastSpell(wall,SPELL_FIRE_WALL,false); - - wall = m_creature->SummonCreature(NPC_FIRE_BOMB,FireWallCoords[2][0],FireWallCoords[2][1]-5,FireWallCoords[2][2],FireWallCoords[2][3],TEMPSUMMON_TIMED_DESPAWN,11500); - if (wall) - wall->CastSpell(wall,SPELL_FIRE_WALL,false); - - wall = m_creature->SummonCreature(NPC_FIRE_BOMB,FireWallCoords[2][0],FireWallCoords[2][1]+5,FireWallCoords[2][2],FireWallCoords[2][3],TEMPSUMMON_TIMED_DESPAWN,11500); - if (wall) - wall->CastSpell(wall,SPELL_FIRE_WALL,false); - - wall = m_creature->SummonCreature(NPC_FIRE_BOMB,FireWallCoords[3][0]-2,FireWallCoords[3][1],FireWallCoords[3][2],FireWallCoords[3][3],TEMPSUMMON_TIMED_DESPAWN,11500); - if (wall) - wall->CastSpell(wall,SPELL_FIRE_WALL,false); - - wall = m_creature->SummonCreature(NPC_FIRE_BOMB,FireWallCoords[3][0]+2,FireWallCoords[3][1],FireWallCoords[3][2],FireWallCoords[3][3],TEMPSUMMON_TIMED_DESPAWN,11500); - if (wall) - wall->CastSpell(wall,SPELL_FIRE_WALL,false); + m_creature->SummonCreature(NPC_FIRE_BOMB,FireWallCoords[0][0],FireWallCoords[0][1],FireWallCoords[0][2],FireWallCoords[0][3],TEMPSUMMON_TIMED_DESPAWN,11500); + + m_creature->SummonCreature(NPC_FIRE_BOMB,FireWallCoords[0][0],FireWallCoords[0][1]+5,FireWallCoords[0][2],FireWallCoords[0][3],TEMPSUMMON_TIMED_DESPAWN,11500); + + m_creature->SummonCreature(NPC_FIRE_BOMB,FireWallCoords[0][0],FireWallCoords[0][1]-5,FireWallCoords[0][2],FireWallCoords[0][3],TEMPSUMMON_TIMED_DESPAWN,11500); + + m_creature->SummonCreature(NPC_FIRE_BOMB,FireWallCoords[1][0]-2,FireWallCoords[1][1]-2,FireWallCoords[1][2],FireWallCoords[1][3],TEMPSUMMON_TIMED_DESPAWN,11500); + + m_creature->SummonCreature(NPC_FIRE_BOMB,FireWallCoords[1][0]+2,FireWallCoords[1][1]+2,FireWallCoords[1][2],FireWallCoords[1][3],TEMPSUMMON_TIMED_DESPAWN,11500); + + m_creature->SummonCreature(NPC_FIRE_BOMB,FireWallCoords[2][0],FireWallCoords[2][1],FireWallCoords[2][2],FireWallCoords[2][3],TEMPSUMMON_TIMED_DESPAWN,11500); + + m_creature->SummonCreature(NPC_FIRE_BOMB,FireWallCoords[2][0],FireWallCoords[2][1]-5,FireWallCoords[2][2],FireWallCoords[2][3],TEMPSUMMON_TIMED_DESPAWN,11500); + + m_creature->SummonCreature(NPC_FIRE_BOMB,FireWallCoords[2][0],FireWallCoords[2][1]+5,FireWallCoords[2][2],FireWallCoords[2][3],TEMPSUMMON_TIMED_DESPAWN,11500); + + m_creature->SummonCreature(NPC_FIRE_BOMB,FireWallCoords[3][0]-2,FireWallCoords[3][1],FireWallCoords[3][2],FireWallCoords[3][3],TEMPSUMMON_TIMED_DESPAWN,11500); + + m_creature->SummonCreature(NPC_FIRE_BOMB,FireWallCoords[3][0]+2,FireWallCoords[3][1],FireWallCoords[3][2],FireWallCoords[3][3],TEMPSUMMON_TIMED_DESPAWN,11500); } - //workaround for summon to emulate effect. EffectImplicitTarget 73 not implemented void Throw5Bombs() { //all available spells (each spell has different radius for summon location) uint8 uiMaxBombs = sizeof(m_auiSpellFireBombSummon)/sizeof(uint32); - float fX, fY, fZ; - float fRadius = 5.0f; + //float fX, fY, fZ; + //float fRadius = 5.0f; for(uint8 i = 0; i < uiMaxBombs; ++i) { m_creature->CastSpell(m_creature, m_auiSpellFireBombSummon[i], true); //workaround part - m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), fRadius+(fRadius*i), fX, fY, fZ); - m_creature->SummonCreature(NPC_FIRE_BOMB, fX, fY, fZ, 0.0f, TEMPSUMMON_TIMED_DESPAWN, MINUTE*IN_MILISECONDS); + //m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), fRadius+(fRadius*i), fX, fY, fZ); + //m_creature->SummonCreature(NPC_FIRE_BOMB, fX, fY, fZ, 0.0f, TEMPSUMMON_TIMED_DESPAWN, MINUTE*IN_MILISECONDS); } ++m_uiBombCounter; From 78e67b30d1aaf90f7e6cd2dc75c457978b191657 Mon Sep 17 00:00:00 2001 From: Insider Date: Sat, 31 Oct 2009 12:10:46 +0700 Subject: [PATCH 027/405] SD2 updated to 1488 --- scripts/world/npcs_special.cpp | 45 ++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 18 deletions(-) diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index 911cd366d..3ce692690 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -381,14 +381,20 @@ CreatureAI* GetAI_npc_dancing_flames(Creature* pCreature) ## Triage quest ######*/ -#define SAY_DOC1 -1000201 -#define SAY_DOC2 -1000202 -#define SAY_DOC3 -1000203 +enum +{ + SAY_DOC1 = -1000201, + SAY_DOC2 = -1000202, + SAY_DOC3 = -1000203, + + QUEST_TRIAGE_H = 6622, + QUEST_TRIAGE_A = 6624, -#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 { @@ -639,10 +645,10 @@ void npc_doctorAI::PatientDied(Location* Point) if (PatientDiedCount > 5 && Event) { - if (pPlayer->GetQuestStatus(6624) == QUEST_STATUS_INCOMPLETE) - pPlayer->FailQuest(6624); - else if (pPlayer->GetQuestStatus(6622) == QUEST_STATUS_INCOMPLETE) - pPlayer->FailQuest(6622); + if (pPlayer->GetQuestStatus(QUEST_TRIAGE_A) == QUEST_STATUS_INCOMPLETE) + pPlayer->FailQuest(QUEST_TRIAGE_A); + else if (pPlayer->GetQuestStatus(QUEST_TRIAGE_H) == QUEST_STATUS_INCOMPLETE) + pPlayer->FailQuest(QUEST_TRIAGE_H); Reset(); return; @@ -659,7 +665,7 @@ void npc_doctorAI::PatientSaved(Creature* soldier, Player* pPlayer, Location* Po { if (pPlayer && Playerguid == pPlayer->GetGUID()) { - if ((pPlayer->GetQuestStatus(6624) == QUEST_STATUS_INCOMPLETE) || (pPlayer->GetQuestStatus(6622) == QUEST_STATUS_INCOMPLETE)) + if ((pPlayer->GetQuestStatus(QUEST_TRIAGE_A) == QUEST_STATUS_INCOMPLETE) || (pPlayer->GetQuestStatus(QUEST_TRIAGE_H) == QUEST_STATUS_INCOMPLETE)) { ++PatientSavedCount; @@ -675,10 +681,10 @@ void npc_doctorAI::PatientSaved(Creature* soldier, Player* pPlayer, Location* Po } } - if (pPlayer->GetQuestStatus(6624) == QUEST_STATUS_INCOMPLETE) - pPlayer->AreaExploredOrEventHappens(6624); - else if (pPlayer->GetQuestStatus(6622) == QUEST_STATUS_INCOMPLETE) - pPlayer->AreaExploredOrEventHappens(6622); + if (pPlayer->GetQuestStatus(QUEST_TRIAGE_A) == QUEST_STATUS_INCOMPLETE) + pPlayer->GroupEventHappens(QUEST_TRIAGE_A, m_creature); + else if (pPlayer->GetQuestStatus(QUEST_TRIAGE_H) == QUEST_STATUS_INCOMPLETE) + pPlayer->GroupEventHappens(QUEST_TRIAGE_H, m_creature); Reset(); return; @@ -744,8 +750,11 @@ void npc_doctorAI::UpdateAI(const uint32 diff) bool QuestAccept_npc_doctor(Player* pPlayer, Creature* pCreature, const Quest* pQuest) { - if ((pQuest->GetQuestId() == 6624) || (pQuest->GetQuestId() == 6622)) - ((npc_doctorAI*)pCreature->AI())->BeginEvent(pPlayer); + if ((pQuest->GetQuestId() == QUEST_TRIAGE_A) || (pQuest->GetQuestId() == QUEST_TRIAGE_H)) + { + if (npc_doctorAI* pDocAI = dynamic_cast(pCreature->AI())) + pDocAI->BeginEvent(pPlayer); + } return true; } From 7e004233c42591ee65288b9d341bc61e93b97b80 Mon Sep 17 00:00:00 2001 From: Insider Date: Sat, 31 Oct 2009 22:22:19 +0700 Subject: [PATCH 028/405] SD2 updated to 1489 --- scripts/world/npcs_special.cpp | 69 +++++++++++++++++++--------------- 1 file changed, 39 insertions(+), 30 deletions(-) diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index 3ce692690..7afedb7fd 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -1057,47 +1057,56 @@ bool GossipHello_npc_innkeeper(Player* pPlayer, Creature* pCreature) bool GossipSelect_npc_innkeeper(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) - { - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_WHAT_TO_DO, pCreature->GetGUID()); - return true; - } - - if (uiAction == GOSSIP_ACTION_INFO_DEF+2) + switch(uiAction) { - pPlayer->CLOSE_GOSSIP_MENU(); + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_WHAT_TO_DO, pCreature->GetGUID()); + break; - // either trick or treat, 50% chance - if (urand(0, 1)) - { - pPlayer->CastSpell(pPlayer, SPELL_TREAT, true); - } - else + case GOSSIP_ACTION_INFO_DEF+2: { - uint32 uiTrickSpell = 0; + pPlayer->CLOSE_GOSSIP_MENU(); - switch(urand(0, 9)) // note that female characters can get male costumes and vice versa + // either trick or treat, 50% chance + if (urand(0, 1)) { - case 0: uiTrickSpell = SPELL_TRICK_NO_ATTACK; break; - case 1: uiTrickSpell = SPELL_TRICK_GNOME; break; - case 2: uiTrickSpell = SPELL_TRICK_GHOST_MALE; break; - case 3: uiTrickSpell = SPELL_TRICK_GHOST_FEMALE; break; - case 4: uiTrickSpell = SPELL_TRICK_NINJA_MALE; break; - case 5: uiTrickSpell = SPELL_TRICK_NINJA_FEMALE; break; - case 6: uiTrickSpell = SPELL_TRICK_PIRATE_MALE; break; - case 7: uiTrickSpell = SPELL_TRICK_PIRATE_FEMALE; break; - case 8: uiTrickSpell = SPELL_TRICK_SKELETON; break; - case 9: uiTrickSpell = SPELL_TRICK_BAT; break; + pPlayer->CastSpell(pPlayer, SPELL_TREAT, true); + } + else + { + uint32 uiTrickSpell = 0; + + switch(urand(0, 9)) // note that female characters can get male costumes and vice versa + { + case 0: uiTrickSpell = SPELL_TRICK_NO_ATTACK; break; + case 1: uiTrickSpell = SPELL_TRICK_GNOME; break; + case 2: uiTrickSpell = SPELL_TRICK_GHOST_MALE; break; + case 3: uiTrickSpell = SPELL_TRICK_GHOST_FEMALE; break; + case 4: uiTrickSpell = SPELL_TRICK_NINJA_MALE; break; + case 5: uiTrickSpell = SPELL_TRICK_NINJA_FEMALE; break; + case 6: uiTrickSpell = SPELL_TRICK_PIRATE_MALE; break; + case 7: uiTrickSpell = SPELL_TRICK_PIRATE_FEMALE; break; + case 8: uiTrickSpell = SPELL_TRICK_SKELETON; break; + case 9: uiTrickSpell = SPELL_TRICK_BAT; break; + } + + pPlayer->CastSpell(pPlayer, uiTrickSpell, true); } - pPlayer->CastSpell(pPlayer, uiTrickSpell, true); + pPlayer->CastSpell(pPlayer, SPELL_TRICK_OR_TREATED, true); + break; } - pPlayer->CastSpell(pPlayer, SPELL_TRICK_OR_TREATED, true); - return true; // prevent mangos handling + case GOSSIP_OPTION_VENDOR: + pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + break; + case GOSSIP_OPTION_INNKEEPER: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->SetBindPoint(pCreature->GetGUID()); + break; } - return false; // player didn't select scripted gossip, normal core handling + return true; } /*###### From 11371e56c1d6eb8f8fec317eb06011356167d142 Mon Sep 17 00:00:00 2001 From: Insider Date: Sun, 1 Nov 2009 13:20:58 +0700 Subject: [PATCH 029/405] SD2 updated to 1490 --- scripts/world/npcs_special.cpp | 8 ++++++-- sql/Updates/Makefile.am | 3 ++- sql/Updates/r1490_scriptdev2.sql | 1 + sql/scriptdev2_script_full.sql | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 sql/Updates/r1490_scriptdev2.sql diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index 7afedb7fd..6ab2aeb2a 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -1047,8 +1047,12 @@ bool GossipHello_npc_innkeeper(Player* pPlayer, Creature* pCreature) if (IsHolidayActive(HOLIDAY_HALLOWS_END) && !pPlayer->HasAura(SPELL_TRICK_OR_TREATED,0)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TRICK_OR_TREAT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - // Should only apply to innkeeper close to start areas. Area flag or other unknown fields? - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_WHAT_TO_DO, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + // Should only apply to innkeeper close to start areas. + if (AreaTableEntry const* pAreaEntry = GetAreaEntryByAreaID(pCreature->GetAreaId())) + { + if (pAreaEntry->flags & AREA_FLAG_LOWLEVEL) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_WHAT_TO_DO, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + } pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetGUID()); pCreature->sendPreparedGossip(pPlayer); diff --git a/sql/Updates/Makefile.am b/sql/Updates/Makefile.am index 7f82c5a7b..1410a69a4 100644 --- a/sql/Updates/Makefile.am +++ b/sql/Updates/Makefile.am @@ -39,4 +39,5 @@ pkgdata_DATA = \ r1476_mangos.sql \ r1476_scriptdev2.sql \ r1478_scriptdev2.sql \ - r1486_mangos.sql + r1486_mangos.sql \ + r1490_scriptdev2.sql diff --git a/sql/Updates/r1490_scriptdev2.sql b/sql/Updates/r1490_scriptdev2.sql new file mode 100644 index 000000000..cfe570602 --- /dev/null +++ b/sql/Updates/r1490_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 8758+) '; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index d168bc462..7a742c0ae 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3,7 +3,7 @@ -- DELETE FROM sd2_db_version; -INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for MaNGOS 8735+) '); +INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for MaNGOS 8758+) '); -- -- Below contains data for table `script_texts` mainly used in C++ parts. From fbac6ad848b24979afca6f384c90ce40921c8a1a Mon Sep 17 00:00:00 2001 From: Insider Date: Mon, 2 Nov 2009 16:28:07 +0700 Subject: [PATCH 030/405] SD2 updated to 1492 --- .../tempest_keep/the_eye/boss_void_reaver.cpp | 9 +++--- scripts/world/areatrigger_scripts.cpp | 32 ++++++++++++++++++- sql/Updates/Makefile.am | 3 +- sql/Updates/r1492_mangos.sql | 2 ++ sql/mangos_scriptname_full.sql | 2 ++ 5 files changed, 42 insertions(+), 6 deletions(-) create mode 100644 sql/Updates/r1492_mangos.sql diff --git a/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp b/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp index 32e6d4884..b5f6184c7 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp @@ -116,15 +116,16 @@ struct MANGOS_DLL_DECL boss_void_reaverAI : public ScriptedAI for(std::list::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) { target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()); + // exclude pets & totems - if (target->GetTypeId() != TYPEID_PLAYER) + if (!target || target->GetTypeId() != TYPEID_PLAYER) continue; //18 yard radius minimum - if (target && !target->IsWithinDist(m_creature, 18.0f, false)) - target_list.push_back(target); + if (target->IsWithinDist(m_creature, 18.0f, false)) + continue; - target = NULL; + target_list.push_back(target); } if (target_list.size()) diff --git a/scripts/world/areatrigger_scripts.cpp b/scripts/world/areatrigger_scripts.cpp index abefe44c2..87b9bcf8e 100644 --- a/scripts/world/areatrigger_scripts.cpp +++ b/scripts/world/areatrigger_scripts.cpp @@ -22,11 +22,36 @@ SDCategory: Areatrigger EndScriptData */ /* ContentData -at_legion_teleporter 4560 Teleporter TO Invasion Point: Cataclysm +at_coilfang_waterfall 4591 +at_legion_teleporter 4560 Teleporter TO Invasion Point: Cataclysm +at_ravenholdt +at_warsong_slaughterhouse +at_warsong_grainery +at_torp_farm EndContentData */ #include "precompiled.h" +/*###### +## at_coilfang_waterfall +######*/ + +enum +{ + GO_COILFANG_WATERFALL = 184212 +}; + +bool AreaTrigger_at_coilfang_waterfall(Player* pPlayer, AreaTriggerEntry* pAt) +{ + if (GameObject* pGo = GetClosestGameObjectWithEntry(pPlayer, GO_COILFANG_WATERFALL, 35.0f)) + { + if (pGo->getLootState() == GO_READY) + pGo->UseDoorOrButton(); + } + + return false; +} + /*###### ## at_legion_teleporter ######*/ @@ -119,6 +144,11 @@ void AddSC_areatrigger_scripts() { Script *newscript; + newscript = new Script; + newscript->Name = "at_coilfang_waterfall"; + newscript->pAreaTrigger = &AreaTrigger_at_coilfang_waterfall; + newscript->RegisterSelf(); + newscript = new Script; newscript->Name = "at_legion_teleporter"; newscript->pAreaTrigger = &AreaTrigger_at_legion_teleporter; diff --git a/sql/Updates/Makefile.am b/sql/Updates/Makefile.am index 1410a69a4..26bad0a12 100644 --- a/sql/Updates/Makefile.am +++ b/sql/Updates/Makefile.am @@ -40,4 +40,5 @@ pkgdata_DATA = \ r1476_scriptdev2.sql \ r1478_scriptdev2.sql \ r1486_mangos.sql \ - r1490_scriptdev2.sql + r1490_scriptdev2.sql \ + r1492_mangos.sql diff --git a/sql/Updates/r1492_mangos.sql b/sql/Updates/r1492_mangos.sql new file mode 100644 index 000000000..f7bbf1364 --- /dev/null +++ b/sql/Updates/r1492_mangos.sql @@ -0,0 +1,2 @@ +DELETE FROM areatrigger_scripts WHERE entry=4591; +INSERT INTO areatrigger_scripts VALUES (4591,'at_coilfang_waterfall'); diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 01db2332a..eda1b72c6 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1,6 +1,8 @@ /* */ /* AREATRIGGER */ +DELETE FROM areatrigger_scripts WHERE entry=4591; +INSERT INTO areatrigger_scripts VALUES (4591,'at_coilfang_waterfall'); DELETE FROM areatrigger_scripts WHERE entry=4560; INSERT INTO areatrigger_scripts VALUES (4560,'at_legion_teleporter'); DELETE FROM areatrigger_scripts WHERE entry=3066; From a93e1c01c84c5475e0217eae0151d1a645708e2f Mon Sep 17 00:00:00 2001 From: Insider Date: Mon, 2 Nov 2009 21:20:20 +0700 Subject: [PATCH 031/405] SD2 updated to 1493 --- ...ptDev2.patch => MaNGOS-8759-ScriptDev2.patch} | 16 ++++++++-------- sql/Updates/r1493-scriptdev2.sql | 1 + sql/scriptdev2_script_full.sql | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) rename patches/{MaNGOS-8735-ScriptDev2.patch => MaNGOS-8759-ScriptDev2.patch} (82%) create mode 100644 sql/Updates/r1493-scriptdev2.sql diff --git a/patches/MaNGOS-8735-ScriptDev2.patch b/patches/MaNGOS-8759-ScriptDev2.patch similarity index 82% rename from patches/MaNGOS-8735-ScriptDev2.patch rename to patches/MaNGOS-8759-ScriptDev2.patch index 83f6b6759..ac5977067 100644 --- a/patches/MaNGOS-8735-ScriptDev2.patch +++ b/patches/MaNGOS-8759-ScriptDev2.patch @@ -1,6 +1,6 @@ -From 87122c1232f145cbaac4e90339b4321fb03a0613 Mon Sep 17 00:00:00 2001 +From 114944adbcff81cac4d31339f597b3a245290f69 Mon Sep 17 00:00:00 2001 From: Reve -Date: Mon, 26 Oct 2009 13:42:30 +0100 +Date: Mon, 2 Nov 2009 10:44:52 +0100 Subject: [PATCH] ScriptDev2 patch. --- @@ -48,7 +48,7 @@ index 2cc0efd..f2dbbc7 100644 -SUBDIRS = universal +SUBDIRS = ScriptDev2 diff --git a/src/mangosd/Makefile.am b/src/mangosd/Makefile.am -index 608d0a1..62ee2ba 100644 +index 3fd4068..076d8d8 100644 --- a/src/mangosd/Makefile.am +++ b/src/mangosd/Makefile.am @@ -34,7 +34,7 @@ mangos_worldd_SOURCES = \ @@ -60,12 +60,12 @@ index 608d0a1..62ee2ba 100644 ../game/libmangosgame.a \ ../shared/Database/libmangosdatabase.a \ ../shared/Config/libmangosconfig.a \ -@@ -46,7 +46,7 @@ mangos_worldd_LDADD = \ - ../../dep/src/g3dlite/libg3dlite.a \ - ../../dep/tbb/libtbbmalloc.so +@@ -45,7 +45,7 @@ mangos_worldd_LDADD = \ + ../../dep/src/sockets/libmangossockets.a \ + ../../dep/src/g3dlite/libg3dlite.a --mangos_worldd_LDFLAGS = -L../../dep/src/sockets -L../../dep/src/g3dlite -L../bindings/universal/ -L../../dep/tbb -L$(libdir) $(MANGOS_LIBS) -export-dynamic -+mangos_worldd_LDFLAGS = -L../../dep/src/sockets -L../../dep/src/g3dlite -L../bindings/ScriptDev2/ -L../../dep/tbb -L$(libdir) $(MANGOS_LIBS) -export-dynamic +-mangos_worldd_LDFLAGS = -L../../dep/src/sockets -L../../dep/src/g3dlite -L../bindings/universal/ -L$(libdir) $(MANGOS_LIBS) -export-dynamic ++mangos_worldd_LDFLAGS = -L../../dep/src/sockets -L../../dep/src/g3dlite -L../bindings/ScriptDev2/ -L$(libdir) $(MANGOS_LIBS) -export-dynamic ## Additional files to include when running 'make dist' # Include world daemon configuration diff --git a/sql/Updates/r1493-scriptdev2.sql b/sql/Updates/r1493-scriptdev2.sql new file mode 100644 index 000000000..5ef72fd54 --- /dev/null +++ b/sql/Updates/r1493-scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 8759+) '; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 7a742c0ae..9fb49512b 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3,7 +3,7 @@ -- DELETE FROM sd2_db_version; -INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for MaNGOS 8758+) '); +INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for MaNGOS 8759+) '); -- -- Below contains data for table `script_texts` mainly used in C++ parts. From e1d695c04130e7a04e92a8f4af939b340b1e99b6 Mon Sep 17 00:00:00 2001 From: Insider Date: Tue, 3 Nov 2009 23:19:06 +0700 Subject: [PATCH 032/405] [patch 8] Added script for experience eliminator. Required Mangos core with [patch 199] --- addition/8_mangos_exp_eliminator.sql | 1 + scripts/world/npcs_special.cpp | 53 ++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 addition/8_mangos_exp_eliminator.sql diff --git a/addition/8_mangos_exp_eliminator.sql b/addition/8_mangos_exp_eliminator.sql new file mode 100644 index 000000000..3e2f44002 --- /dev/null +++ b/addition/8_mangos_exp_eliminator.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName`='npc_experience_eliminator' WHERE `entry` IN (35365,35364); diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index 6ab2aeb2a..8e6066c00 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -1151,6 +1151,53 @@ bool GossipSelect_npc_kingdom_of_dalaran_quests(Player* pPlayer, Creature* pCrea return true; } +/*###### +## npc_experience_eliminator +######*/ + +#define GOSSIP_ITEM_STOP_XP_GAIN "I don't want to gain experience anymore." +#define GOSSIP_CONFIRM_STOP_XP_GAIN "Are you sure you want to stop gaining experience?" +#define GOSSIP_ITEM_START_XP_GAIN "I want to be able to gain experience again." +#define GOSSIP_CONFIRM_START_XP_GAIN "Are you sure you want to be able to gain experience once again?" + +bool GossipHello_npc_experience_eliminator(Player* pPlayer, Creature* pCreature) +{ + pPlayer->ADD_GOSSIP_ITEM_EXTENDED( + GOSSIP_ICON_CHAT, + pPlayer->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_NO_XP_GAIN) ? GOSSIP_ITEM_START_XP_GAIN : GOSSIP_ITEM_STOP_XP_GAIN, + GOSSIP_SENDER_MAIN, + GOSSIP_ACTION_INFO_DEF+1, + pPlayer->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_NO_XP_GAIN) ? GOSSIP_CONFIRM_START_XP_GAIN : GOSSIP_CONFIRM_STOP_XP_GAIN, + 100000, + false + ); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_experience_eliminator(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if(uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + // cheater(?) passed through client limitations + if(pPlayer->GetMoney() < 100000) + return true; + + pPlayer->ModifyMoney(-100000); + + if(pPlayer->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_NO_XP_GAIN)) + pPlayer->RemoveFlag(PLAYER_FLAGS, PLAYER_FLAGS_NO_XP_GAIN); + else + pPlayer->SetFlag(PLAYER_FLAGS, PLAYER_FLAGS_NO_XP_GAIN); + + pPlayer->CLOSE_GOSSIP_MENU(); + return true; + } + pPlayer->CLOSE_GOSSIP_MENU(); + return true; +} + /*###### ## npc_lunaclaw_spirit ######*/ @@ -1528,4 +1575,10 @@ void AddSC_npcs_special() newscript->pGossipHello = &GossipHello_npc_sayge; newscript->pGossipSelect = &GossipSelect_npc_sayge; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_experience_eliminator"; + newscript->pGossipHello = &GossipHello_npc_experience_eliminator; + newscript->pGossipSelect = &GossipSelect_npc_experience_eliminator; + newscript->RegisterSelf(); } From 35578206d78fdd189757e8a7498563414aea356f Mon Sep 17 00:00:00 2001 From: Insider Date: Mon, 9 Nov 2009 22:22:59 +0700 Subject: [PATCH 033/405] SD2 updated to 1496 --- Makefile.am | 1 + VC80/80ScriptDev2.vcproj | 4 + VC90/90ScriptDev2.vcproj | 4 + .../instance_ruins_of_ahnqiraj.cpp | 186 +++++++++++++++++- .../ruins_of_ahnqiraj/ruins_of_ahnqiraj.h | 44 +++++ .../azjol-nerub/ahnkahet/boss_nadox.cpp | 166 +++++++++++++++- scripts/world/npcs_special.cpp | 2 +- sql/Updates/Makefile.am | 5 +- ...93-scriptdev2.sql => r1493_scriptdev2.sql} | 0 sql/Updates/r1494_mangos.sql | 1 + sql/Updates/r1496_mangos.sql | 1 + sql/mangos_scriptname_full.sql | 3 +- 12 files changed, 402 insertions(+), 15 deletions(-) create mode 100644 scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h rename sql/Updates/{r1493-scriptdev2.sql => r1493_scriptdev2.sql} (100%) create mode 100644 sql/Updates/r1494_mangos.sql create mode 100644 sql/Updates/r1496_mangos.sql diff --git a/Makefile.am b/Makefile.am index eff154487..2ce665eec 100644 --- a/Makefile.am +++ b/Makefile.am @@ -278,6 +278,7 @@ scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp \ scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp \ scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp \ scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp \ +scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h \ scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp \ scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp \ scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp \ diff --git a/VC80/80ScriptDev2.vcproj b/VC80/80ScriptDev2.vcproj index 6111dee32..1cadf8249 100644 --- a/VC80/80ScriptDev2.vcproj +++ b/VC80/80ScriptDev2.vcproj @@ -1463,6 +1463,10 @@ RelativePath="..\scripts\kalimdor\ruins_of_ahnqiraj\instance_ruins_of_ahnqiraj.cpp" > + + + + GetEntry()) + { + case NPC_OSSIRIAN: m_uiOssirianGUID = pCreature->GetGUID(); break; + case NPC_BURU: m_uiBuruGUID = pCreature->GetGUID(); break; + case NPC_KURINNAXX: m_uiKurinnaxxGUID = pCreature->GetGUID(); break; + case NPC_GENERAL_ANDOROV: m_uiAndorovGUID = pCreature->GetGUID(); break; + case NPC_CAPTAIN_QEEZ: m_uiQeezGUID = pCreature->GetGUID(); break; + case NPC_CAPTAIN_TUUBID: m_uiTuubidGUID = pCreature->GetGUID(); break; + case NPC_CAPTAIN_DRENN: m_uiDrennGUID = pCreature->GetGUID(); break; + case NPC_CAPTAIN_XURREM: m_uiXurremGUID = pCreature->GetGUID(); break; + case NPC_MAJOR_YEGGETH: m_uiYeggethGUID = pCreature->GetGUID(); break; + case NPC_MAJOR_PAKKON: m_uiPakkonGUID = pCreature->GetGUID(); break; + case NPC_COLONEL_ZERRAN: m_uiZerranGUID = pCreature->GetGUID(); break; + case NPC_RAJAXX: m_uiRajaxxGUID = pCreature->GetGUID(); break; + } + } + + void OnObjectCreate(GameObject* pGo) + { + switch(pGo->GetEntry()) + { + case GO_OSSIRIAN_CRYSTAL: pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_INTERACT_COND); break; //to make them unusable temporarily + } + } + + bool IsEncounterInProgress() const + { + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) + if (m_auiEncounter[i] == IN_PROGRESS) + return true; + + return false; + } + + const char* Save() + { + return strInstData.c_str(); + } + + uint64 GetData64(uint32 uiData) + { + switch(uiData) + { + case DATA_OSSIRIAN: return m_uiOssirianGUID; + case DATA_BURU: return m_uiBuruGUID; + case DATA_ANDOROV: return m_uiAndorovGUID; + case DATA_KURINNAXX: return m_uiKurinnaxxGUID; + case DATA_QEEZ: return m_uiQeezGUID; + case DATA_TUUBID: return m_uiTuubidGUID; + case DATA_DRENN: return m_uiDrennGUID; + case DATA_XURREM: return m_uiXurremGUID; + case DATA_YEGGETH: return m_uiYeggethGUID; + case DATA_PAKKON: return m_uiPakkonGUID; + case DATA_ZERRAN: return m_uiZerranGUID; + case DATA_RAJAXX: return m_uiRajaxxGUID; + } + return 0; + } + + void SetData(uint32 uiType, uint32 uiData) + { + switch(uiType) + { + case TYPE_RAJAXX: + m_auiEncounter[0] = uiData; + break; + case TYPE_KURINNAXX: + m_auiEncounter[1] = uiData; + break; + } + + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " "; + + strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } + } + + void Load(const char* chrIn) + { + if (!chrIn) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(chrIn); + + std::istringstream loadStream(chrIn); + + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1]; + + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; + } + + OUT_LOAD_INST_DATA_COMPLETE; + + //spawn andorov on load + if (m_auiEncounter[0] == DONE) + if (Creature* pRajaxx = instance->GetCreature(m_uiRajaxxGUID)) + pRajaxx->SummonCreature(NPC_GENERAL_ANDOROV, -8873.42, 1647.67, 21.386, 5.69141, TEMPSUMMON_CORPSE_DESPAWN, 0); + } + + uint32 GetData(uint32 uiType) + { + switch(uiType) + { + case TYPE_RAJAXX: + return m_auiEncounter[0]; + case TYPE_KURINNAXX: + return m_auiEncounter[1]; + } + return 0; + } +}; + +InstanceData* GetInstanceData_instance_ruins_of_ahnqiraj(Map* pMap) +{ + return new instance_ruins_of_ahnqiraj(pMap); +} + +void AddSC_instance_ruins_of_ahnqiraj() +{ + Script* newscript; + newscript = new Script; + newscript->Name = "instance_ruins_of_ahnqiraj"; + newscript->GetInstanceData = &GetInstanceData_instance_ruins_of_ahnqiraj; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h new file mode 100644 index 000000000..49b326d69 --- /dev/null +++ b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h @@ -0,0 +1,44 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_RUINS_OF_AHNQIRAJ_H +#define DEF_RUINS_OF_AHNQIRAJ_H + +enum +{ + MAX_ENCOUNTER = 2, + + DATA_OSSIRIAN = 1, + DATA_BURU = 2, + DATA_ANDOROV = 3, + DATA_KURINNAXX = 4, + DATA_QEEZ = 5, + DATA_TUUBID = 6, + DATA_DRENN = 7, + DATA_XURREM = 8, + DATA_YEGGETH = 9, + DATA_PAKKON = 10, + DATA_ZERRAN = 11, + DATA_RAJAXX = 12, + + TYPE_RAJAXX = 13, + TYPE_KURINNAXX = 14, + + NPC_OSSIRIAN = 15339, + NPC_BURU = 15370, + NPC_KALDOREI_ELITE = 15473, + NPC_GENERAL_ANDOROV = 15471, + NPC_RAJAXX = 15341, + NPC_KURINNAXX = 15348, + NPC_COLONEL_ZERRAN = 15385, + NPC_MAJOR_PAKKON = 15388, + NPC_MAJOR_YEGGETH = 15386, + NPC_CAPTAIN_XURREM = 15390, + NPC_CAPTAIN_DRENN = 15389, + NPC_CAPTAIN_TUUBID = 15392, + NPC_CAPTAIN_QEEZ = 15391, + + GO_OSSIRIAN_CRYSTAL = 180619 +}; +#endif diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp index 8f6654e08..ba5f48f04 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp @@ -16,25 +16,82 @@ /* ScriptData SDName: Boss_Nadox -SD%Complete: 20% -SDComment: +SD%Complete: 90% +SDComment: TODO: some more research on guardian aura needed, BroodRage needs core and db support SDCategory: Ahn'kahet EndScriptData */ #include "precompiled.h" +#include "ahnkahet.h" enum { - SAY_AGGRO = -1619000, - SAY_SUMMON_EGG_1 = -1619001, - SAY_SUMMON_EGG_2 = -1619002, - SAY_SLAY_1 = -1619003, - SAY_SLAY_2 = -1619004, - SAY_SLAY_3 = -1619005, - SAY_DEATH = -1619006, - EMOTE_HATCH = -1619007 + SAY_AGGRO = -1619000, + SAY_SUMMON_EGG_1 = -1619001, + SAY_SUMMON_EGG_2 = -1619002, + SAY_SLAY_1 = -1619003, + SAY_SLAY_2 = -1619004, + SAY_SLAY_3 = -1619005, + SAY_DEATH = -1619006, + EMOTE_HATCH = -1619007, + + SPELL_BROOD_PLAGUE = 56130, + SPELL_BROOD_PLAGUE_H = 59467, + SPELL_BERSERK = 26662, + SPELL_BROOD_RAGE = 59465, + + SPELL_GUARDIAN_AURA = 56151, + SPELL_GUARDIAN_AURA_TRIGGERED = 56153, + + // JustSummoned is not called for spell summoned creatures + SPELL_SUMMON_SWARM_GUARDIAN = 56120, + SPELL_SUMMON_SWARMERS = 56119, + + NPC_AHNKAHAR_GUARDIAN_EGG = 30173, + NPC_AHNKAHAR_SWARM_EGG = 30172, + NPC_AHNKAHAR_GUARDIAN = 30176, + NPC_AHNKAHAR_SWARMER = 30178 +}; + +/*###### +## mob_ahnkahat_egg +######*/ +struct MANGOS_DLL_DECL mob_ahnkahar_eggAI : public ScriptedAI +{ + mob_ahnkahar_eggAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + void Reset() {} + void MoveInLineOfSight(Unit* pWho) {} + void AttackStart(Unit* pWho) {} + + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_AHNKAHAR_GUARDIAN) + DoScriptText(EMOTE_HATCH, m_creature); + + if (m_pInstance) + { + if (Creature* pElderNadox = ((Creature*)Unit::GetUnit(*m_creature, m_pInstance->GetData64(NPC_ELDER_NADOX)))) + { + float fPosX, fPosY, fPosZ; + pElderNadox->GetPosition(fPosX, fPosY, fPosZ); + pSummoned->GetMotionMaster()->MovePoint(0, fPosX, fPosY, fPosZ); + } + } + } }; +CreatureAI* GetAI_mob_ahnkahar_egg(Creature* pCreature) +{ + return new mob_ahnkahar_eggAI(pCreature); +} + /*###### ## boss_nadox ######*/ @@ -51,8 +108,35 @@ struct MANGOS_DLL_DECL boss_nadoxAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsHeroicMode; + bool m_bBerserk; + uint8 m_uiGuardianCount; + uint32 m_uiBroodPlagueTimer; + uint32 m_uiBroodRageTimer; + uint32 m_uiSummonTimer; + void Reset() { + m_bBerserk = false; + m_uiGuardianCount = 3; + m_uiSummonTimer = 5000; + m_uiBroodPlagueTimer = 15000; + m_uiBroodRageTimer = 20000; + } + + Creature* SelectRandomCreatureOfEntryInRange(uint32 uiEntry, float fRange) + { + std::list lCreatureList; + GetCreatureListWithEntryInGrid(lCreatureList, m_creature, uiEntry, fRange); + + if (!lCreatureList.size()) + return NULL; + + uint32 uiCount = urand(1, lCreatureList.size()); + std::list::iterator iter = lCreatureList.begin(); + for(; uiCount != 0; --uiCount) + ++iter; + + return *iter; } void Aggro(Unit* pWho) @@ -80,6 +164,63 @@ struct MANGOS_DLL_DECL boss_nadoxAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (m_creature->GetHealth()*4 < m_creature->GetMaxHealth()*m_uiGuardianCount) + { + // guardian is summoned at 75%, 50% and 25% of boss HP + if (Creature* pGuardianEgg = SelectRandomCreatureOfEntryInRange(NPC_AHNKAHAR_GUARDIAN_EGG, 75.0)) + { + // pGuardianEgg->CastSpell(pGuardianEgg, SPELL_SUMMON_SWARM_GUARDIAN, false); + pGuardianEgg->SummonCreature(NPC_AHNKAHAR_GUARDIAN, pGuardianEgg->GetPositionX(), pGuardianEgg->GetPositionY(), pGuardianEgg->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 3*MINUTE*IN_MILISECONDS); + } + + --m_uiGuardianCount; + } + + if (m_uiSummonTimer < uiDiff) + { + DoScriptText(rand()%2?SAY_SUMMON_EGG_1:SAY_SUMMON_EGG_2, m_creature); + + if (Creature* pSwarmerEgg = SelectRandomCreatureOfEntryInRange(NPC_AHNKAHAR_SWARM_EGG, 75.0)) + { + // pSwarmerEgg->CastSpell(pSwarmerEgg, SPELL_SUMMON_SWARMERS, false); + pSwarmerEgg->SummonCreature(NPC_AHNKAHAR_SWARMER, pSwarmerEgg->GetPositionX(), pSwarmerEgg->GetPositionY(), pSwarmerEgg->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 3*MINUTE*IN_MILISECONDS); + pSwarmerEgg->SummonCreature(NPC_AHNKAHAR_SWARMER, pSwarmerEgg->GetPositionX(), pSwarmerEgg->GetPositionY(), pSwarmerEgg->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 3*MINUTE*IN_MILISECONDS); + } + + m_uiSummonTimer = 10000; + } + else + m_uiSummonTimer -= uiDiff; + + if (m_uiBroodPlagueTimer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, m_bIsHeroicMode?SPELL_BROOD_PLAGUE_H:SPELL_BROOD_PLAGUE); + + m_uiBroodPlagueTimer = 20000; + } + else + m_uiBroodPlagueTimer -= uiDiff; + + if(m_bIsHeroicMode) + { + if (m_uiBroodRageTimer < uiDiff) + { + if (Creature* pRageTarget = SelectRandomCreatureOfEntryInRange(NPC_AHNKAHAR_SWARMER, 50.0)) + DoCast(pRageTarget, SPELL_BROOD_RAGE); + + m_uiBroodRageTimer = 20000; + } + else + m_uiBroodRageTimer -= uiDiff; + } + + if (!m_bBerserk && (m_creature->GetPositionZ() < 24.0)) + { + m_bBerserk = true; + DoCast(m_creature, SPELL_BERSERK); + } + DoMeleeAttackIfReady(); } }; @@ -97,4 +238,9 @@ void AddSC_boss_nadox() newscript->Name = "boss_nadox"; newscript->GetAI = &GetAI_boss_nadox; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_ahnkahar_egg"; + newscript->GetAI = &GetAI_mob_ahnkahar_egg; + newscript->RegisterSelf(); } diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index 8e6066c00..408ac805e 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -1227,7 +1227,7 @@ bool GossipSelect_npc_lunaclaw_spirit(Player* pPlayer, Creature* pCreature, uint if (uiAction == GOSSIP_ACTION_INFO_DEF+1) { pPlayer->SEND_GOSSIP_MENU(TEXT_ID_PROGRESS, pCreature->GetGUID()); - pPlayer->AreaExploredOrEventHappens((pPlayer->getRace() == ALLIANCE) ? QUEST_BODY_HEART_A : QUEST_BODY_HEART_H); + pPlayer->AreaExploredOrEventHappens((pPlayer->GetTeam() == ALLIANCE) ? QUEST_BODY_HEART_A : QUEST_BODY_HEART_H); } return true; } diff --git a/sql/Updates/Makefile.am b/sql/Updates/Makefile.am index 26bad0a12..9614836db 100644 --- a/sql/Updates/Makefile.am +++ b/sql/Updates/Makefile.am @@ -41,4 +41,7 @@ pkgdata_DATA = \ r1478_scriptdev2.sql \ r1486_mangos.sql \ r1490_scriptdev2.sql \ - r1492_mangos.sql + r1492_mangos.sql \ + r1493_scriptdev2.sql \ + r1494_mangos.sql \ + r1496_mangos.sql diff --git a/sql/Updates/r1493-scriptdev2.sql b/sql/Updates/r1493_scriptdev2.sql similarity index 100% rename from sql/Updates/r1493-scriptdev2.sql rename to sql/Updates/r1493_scriptdev2.sql diff --git a/sql/Updates/r1494_mangos.sql b/sql/Updates/r1494_mangos.sql new file mode 100644 index 000000000..5f2b3a883 --- /dev/null +++ b/sql/Updates/r1494_mangos.sql @@ -0,0 +1 @@ +UPDATE instance_template SET script='instance_ruins_of_ahnqiraj' WHERE map=509; diff --git a/sql/Updates/r1496_mangos.sql b/sql/Updates/r1496_mangos.sql new file mode 100644 index 000000000..90ec79158 --- /dev/null +++ b/sql/Updates/r1496_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName = 'mob_ahnkahar_egg' WHERE entry IN (30172,30173); diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index eda1b72c6..e9f303f6b 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -155,6 +155,7 @@ UPDATE creature_template SET ScriptName='boss_ambassador_hellmaw' WHERE entry=18 /* AHN'KAHET */ UPDATE creature_template SET ScriptName='boss_jedoga' WHERE entry=29310; UPDATE creature_template SET ScriptName='boss_nadox' WHERE entry=29309; +UPDATE creature_template SET ScriptName = 'mob_ahnkahar_egg' WHERE entry IN (30172,30173); UPDATE creature_template SET ScriptName='boss_taldaram' WHERE entry=29308; UPDATE gameobject_template SET ScriptName='go_nerubian_device' WHERE entry IN (193093,193094); UPDATE creature_template SET ScriptName='boss_volazj' WHERE entry=29311; @@ -775,7 +776,7 @@ UPDATE creature_template SET ScriptName='npc_henry_stern' WHERE entry=8696; /* RUINS OF AHN'QIRAJ */ --- UPDATE instance_template SET script='instance_ruins_of_ahnqiraj' WHERE map=509; +UPDATE instance_template SET script='instance_ruins_of_ahnqiraj' WHERE map=509; /* SCARLET MONASTERY */ UPDATE instance_template SET script='instance_scarlet_monastery' WHERE map=189; From 3570d7c5f5bebd0d3ac319354d76f10a46d322de Mon Sep 17 00:00:00 2001 From: Insider Date: Tue, 10 Nov 2009 16:47:15 +0700 Subject: [PATCH 034/405] Fixed a crash with boss Freya in [patch 7] --- scripts/northrend/ulduar/ulduar/boss_freya.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/northrend/ulduar/ulduar/boss_freya.cpp b/scripts/northrend/ulduar/ulduar/boss_freya.cpp index 6b2cd59db..900723218 100644 --- a/scripts/northrend/ulduar/ulduar/boss_freya.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_freya.cpp @@ -29,6 +29,7 @@ struct MANGOS_DLL_DECL boss_freyaAI : public ScriptedAI { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Heroic = pCreature->GetMap()->GetSpawnMode() > 0; + sp = (SpellEntry *)GetSpellStore()->LookupEntry(SP_ATTUNED_TO_NATURE); bp = 8; if(!pCreature->HasAura(SP_ATTUNED_TO_NATURE, 0)) pCreature->AddAura(new AttunedToNatureAura(sp, 0, &bp, pCreature, pCreature)); From 7272db5e71737ff0e3b787bfd75b7bec07e3b37d Mon Sep 17 00:00:00 2001 From: Insider Date: Thu, 12 Nov 2009 19:19:00 +0700 Subject: [PATCH 035/405] [patch 9] Fixed a crash with boss Elder Nadox in dungeon The Old Kingdom --- scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp index ba5f48f04..b1f5f1da5 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp @@ -131,7 +131,7 @@ struct MANGOS_DLL_DECL boss_nadoxAI : public ScriptedAI if (!lCreatureList.size()) return NULL; - uint32 uiCount = urand(1, lCreatureList.size()); + uint32 uiCount = urand(0, lCreatureList.size()-1); std::list::iterator iter = lCreatureList.begin(); for(; uiCount != 0; --uiCount) ++iter; From 5bf7aa481a6a033aeac92d070a2cb8644a05eacf Mon Sep 17 00:00:00 2001 From: Insider Date: Thu, 12 Nov 2009 22:30:57 +0700 Subject: [PATCH 036/405] Reverted [patch 9] --- scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp index b1f5f1da5..ba5f48f04 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp @@ -131,7 +131,7 @@ struct MANGOS_DLL_DECL boss_nadoxAI : public ScriptedAI if (!lCreatureList.size()) return NULL; - uint32 uiCount = urand(0, lCreatureList.size()-1); + uint32 uiCount = urand(1, lCreatureList.size()); std::list::iterator iter = lCreatureList.begin(); for(; uiCount != 0; --uiCount) ++iter; From bfd4fe1619119404b72527b8ab7cdfbcbc190d35 Mon Sep 17 00:00:00 2001 From: Insider Date: Thu, 12 Nov 2009 22:36:12 +0700 Subject: [PATCH 037/405] SD2 updated to 1497 --- scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp index ba5f48f04..84cc976bc 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp @@ -128,13 +128,11 @@ struct MANGOS_DLL_DECL boss_nadoxAI : public ScriptedAI std::list lCreatureList; GetCreatureListWithEntryInGrid(lCreatureList, m_creature, uiEntry, fRange); - if (!lCreatureList.size()) + if (lCreatureList.empty()) return NULL; - uint32 uiCount = urand(1, lCreatureList.size()); std::list::iterator iter = lCreatureList.begin(); - for(; uiCount != 0; --uiCount) - ++iter; + advance(iter, urand(0, lCreatureList.size()-1)); return *iter; } From 01868d799e2e32b7c9cfda08c03585cde67bc181 Mon Sep 17 00:00:00 2001 From: Insider Date: Fri, 13 Nov 2009 15:44:32 +0700 Subject: [PATCH 038/405] SD2 updated to 1498 --- scripts/northrend/storm_peaks.cpp | 63 ++++++++++++++++++++++++++++++- sql/Updates/Makefile.am | 4 +- sql/Updates/r1498_mangos.sql | 1 + sql/mangos_scriptname_full.sql | 1 + 4 files changed, 66 insertions(+), 3 deletions(-) create mode 100644 sql/Updates/r1498_mangos.sql diff --git a/scripts/northrend/storm_peaks.cpp b/scripts/northrend/storm_peaks.cpp index 90545ac98..953768f10 100644 --- a/scripts/northrend/storm_peaks.cpp +++ b/scripts/northrend/storm_peaks.cpp @@ -17,17 +17,70 @@ /* ScriptData SDName: Storm_Peaks SD%Complete: 100 -SDComment: Vendor Support (31247). Quest support: 12970 +SDComment: Vendor Support (31247). Quest support: 12970, 12684 SDCategory: Storm Peaks EndScriptData */ /* ContentData npc_loklira_the_crone npc_roxi_ramrocket +npc_frostborn_scout EndContentData */ #include "precompiled.h" +/*###### +## npc_frostborn_scout +######*/ + +enum Scout +{ + QUEST_MISSING_SCOUT = 12864, + + GOSSIP_TEXTID_SCOUT_1 = 13611, + GOSSIP_TEXTID_SCOUT_2 = 13612, + GOSSIP_TEXTID_SCOUT_3 = 13613, + GOSSIP_TEXTID_SCOUT_4 = 13614 + +}; + +#define GOSSIP_ITEM_SCOUT_1 "Are you okay? I've come to take you back to Frosthold if you can stand." +#define GOSSIP_ITEM_SCOUT_2 "I'm sorry that I didn't get here sooner. What happened?" +#define GOSSIP_ITEM_SCOUT_3 "I'll go get some help. Hang in there." + +bool GossipHello_npc_frostborn_scout(Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->GetQuestStatus(QUEST_MISSING_SCOUT) == QUEST_STATUS_INCOMPLETE) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SCOUT_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_SCOUT_1, pCreature->GetGUID()); + return true; + } + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_frostborn_scout(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SCOUT_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_SCOUT_2, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SCOUT_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_SCOUT_3, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+3: + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_SCOUT_4, pCreature->GetGUID()); + pPlayer->AreaExploredOrEventHappens(QUEST_MISSING_SCOUT); + break; + } + return true; +} + /*###### ## npc_loklira_the_crone ######*/ @@ -194,7 +247,13 @@ bool GossipSelect_npc_roxi_ramrocket(Player* pPlayer, Creature* pCreature, uint3 void AddSC_storm_peaks() { - Script *newscript; + Script* newscript; + + newscript = new Script; + newscript->Name = "npc_frostborn_scout"; + newscript->pGossipHello = &GossipHello_npc_frostborn_scout; + newscript->pGossipSelect = &GossipSelect_npc_frostborn_scout; + newscript->RegisterSelf(); newscript = new Script; newscript->Name = "npc_loklira_the_crone"; diff --git a/sql/Updates/Makefile.am b/sql/Updates/Makefile.am index 9614836db..a51b45164 100644 --- a/sql/Updates/Makefile.am +++ b/sql/Updates/Makefile.am @@ -44,4 +44,6 @@ pkgdata_DATA = \ r1492_mangos.sql \ r1493_scriptdev2.sql \ r1494_mangos.sql \ - r1496_mangos.sql + r1496_mangos.sql \ + r1498_mangos.sql + \ No newline at end of file diff --git a/sql/Updates/r1498_mangos.sql b/sql/Updates/r1498_mangos.sql new file mode 100644 index 000000000..5acc12fe4 --- /dev/null +++ b/sql/Updates/r1498_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName = 'npc_frostborn_scout' WHERE entry = 29811; diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index e9f303f6b..aac51855e 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -867,6 +867,7 @@ UPDATE creature_template SET ScriptName='npc_kaya' WHERE entry=11856; UPDATE creature_template SET ScriptName='npc_loklira_the_crone' WHERE entry=29975; UPDATE creature_template SET ScriptName='npc_thorim' WHERE entry=29445; UPDATE creature_template SET ScriptName='npc_roxi_ramrocket' WHERE entry=31247; +UPDATE creature_template SET ScriptName = 'npc_frostborn_scout' WHERE entry = 29811; /* STORMWIND CITY */ UPDATE creature_template SET ScriptName='npc_archmage_malin' WHERE entry=2708; From 26f071788372b46a8d8c96e8a0f030d9a31da18a Mon Sep 17 00:00:00 2001 From: Insider Date: Tue, 17 Nov 2009 18:11:59 +0700 Subject: [PATCH 039/405] SD2 updated to 1502 --- Makefile.am | 1 + VC80/80ScriptDev2.vcproj | 4 + VC90/90ScriptDev2.vcproj | 4 + scripts/northrend/howling_fjord.cpp | 165 +++++++++++++++++++------- scripts/northrend/zuldrak.cpp | 31 +++++ scripts/world/npcs_special.cpp | 174 +++++++++++++++++++++++++++- sql/Updates/Makefile.am | 5 +- sql/Updates/r1500_mangos.sql | 1 + sql/Updates/r1502_mangos.sql | 1 + sql/mangos_scriptname_full.sql | 2 + system/ScriptLoader.cpp | 2 + 11 files changed, 339 insertions(+), 51 deletions(-) create mode 100644 scripts/northrend/zuldrak.cpp create mode 100644 sql/Updates/r1500_mangos.sql create mode 100644 sql/Updates/r1502_mangos.sql diff --git a/Makefile.am b/Makefile.am index 2ce665eec..3c0c44730 100644 --- a/Makefile.am +++ b/Makefile.am @@ -301,6 +301,7 @@ scripts/northrend/icecrown.cpp \ scripts/northrend/sholazar_basin.cpp \ scripts/northrend/storm_peaks.cpp \ scripts/northrend/howling_fjord.cpp \ +scripts/northrend/zuldrak.cpp \ scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp \ scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp \ scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp \ diff --git a/VC80/80ScriptDev2.vcproj b/VC80/80ScriptDev2.vcproj index 1cadf8249..4fbab4c4b 100644 --- a/VC80/80ScriptDev2.vcproj +++ b/VC80/80ScriptDev2.vcproj @@ -1572,6 +1572,10 @@ RelativePath="..\scripts\northrend\storm_peaks.cpp" > + + diff --git a/VC90/90ScriptDev2.vcproj b/VC90/90ScriptDev2.vcproj index 56b46a089..b3dab93cf 100644 --- a/VC90/90ScriptDev2.vcproj +++ b/VC90/90ScriptDev2.vcproj @@ -1571,6 +1571,10 @@ RelativePath="..\scripts\northrend\storm_peaks.cpp" > + + diff --git a/scripts/northrend/howling_fjord.cpp b/scripts/northrend/howling_fjord.cpp index 7c27c313b..243f33887 100644 --- a/scripts/northrend/howling_fjord.cpp +++ b/scripts/northrend/howling_fjord.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Howling_Fjord SD%Complete: ? -SDComment: Quest support: 11221 +SDComment: Quest support: 11221, 11483 SDCategory: Howling Fjord EndScriptData */ @@ -28,38 +28,42 @@ EndScriptData */ #######################*/ #define GOSSIP_ITEM_DEATHSTALKER_RAZAEL "High Executor Anselm requests your report." + enum { - QUEST_REPORTS_FROM_THE_FIELD = 11221, - SPELL_RAZAEL_KILL_CREDIT = 42756, - GOSSIP_TEXTID_DEATHSTALKER_RAZAEL1 = 11562, - GOSSIP_TEXTID_DEATHSTALKER_RAZAEL2 = 11564 + QUEST_REPORTS_FROM_THE_FIELD = 11221, + SPELL_RAZAEL_KILL_CREDIT = 42756, + GOSSIP_TEXTID_DEATHSTALKER_RAZAEL1 = 11562, + GOSSIP_TEXTID_DEATHSTALKER_RAZAEL2 = 11564 }; + bool GossipHello_npc_deathstalker_razael(Player* pPlayer, Creature* pCreature) { - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); - - if (pPlayer->GetQuestStatus(QUEST_REPORTS_FROM_THE_FIELD) == QUEST_STATUS_INCOMPLETE) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DEATHSTALKER_RAZAEL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DEATHSTALKER_RAZAEL1, pCreature->GetGUID()); - } - else - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); - return true; + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestStatus(QUEST_REPORTS_FROM_THE_FIELD) == QUEST_STATUS_INCOMPLETE) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DEATHSTALKER_RAZAEL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DEATHSTALKER_RAZAEL1, pCreature->GetGUID()); + } + else + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + + return true; } bool GossipSelect_npc_deathstalker_razael(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - switch(uiAction) - { - case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DEATHSTALKER_RAZAEL2, pCreature->GetGUID()); - pCreature->CastSpell(pPlayer, SPELL_RAZAEL_KILL_CREDIT, true); + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DEATHSTALKER_RAZAEL2, pCreature->GetGUID()); + pCreature->CastSpell(pPlayer, SPELL_RAZAEL_KILL_CREDIT, true); break; - } - return true; + } + + return true; } /*##################### @@ -70,41 +74,107 @@ bool GossipSelect_npc_deathstalker_razael(Player* pPlayer, Creature* pCreature, enum { - GOSSIP_TEXTID_DARK_RANGER_LYANA1 = 11586, - GOSSIP_TEXTID_DARK_RANGER_LYANA2 = 11588, - SPELL_DARK_RANGER_LYANA_KILL_CREDIT = 42799 + GOSSIP_TEXTID_DARK_RANGER_LYANA1 = 11586, + GOSSIP_TEXTID_DARK_RANGER_LYANA2 = 11588, + SPELL_DARK_RANGER_LYANA_KILL_CREDIT = 42799 }; bool GossipHello_npc_dark_ranger_lyana(Player* pPlayer, Creature* pCreature) { - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); - - if (pPlayer->GetQuestStatus(QUEST_REPORTS_FROM_THE_FIELD) == QUEST_STATUS_INCOMPLETE) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DARK_RANGER_LYANA, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DARK_RANGER_LYANA1, pCreature->GetGUID()); - } - else - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); - return true; + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestStatus(QUEST_REPORTS_FROM_THE_FIELD) == QUEST_STATUS_INCOMPLETE) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DARK_RANGER_LYANA, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DARK_RANGER_LYANA1, pCreature->GetGUID()); + } + else + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + + return true; } bool GossipSelect_npc_dark_ranger_lyana(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - switch(uiAction) - { - case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DARK_RANGER_LYANA2, pCreature->GetGUID()); - pCreature->CastSpell(pPlayer, SPELL_DARK_RANGER_LYANA_KILL_CREDIT, true); + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DARK_RANGER_LYANA2, pCreature->GetGUID()); + pCreature->CastSpell(pPlayer, SPELL_DARK_RANGER_LYANA_KILL_CREDIT, true); + break; + } + + return true; +} + +/*############ +## McGoyver ## +############*/ + +#define GOSSIP_ITEM_MCGOYVER1 "Walt sent me to pick up some dark iron ingots." +#define GOSSIP_ITEM_MCGOYVER2 "Yarp." + +enum +{ + QUEST_WE_CAN_REBUILD_IT = 11483, + GOSSIP_TEXTID_MCGOYVER = 12193, + ITEM_DARK_IRON_INGOTS = 34135, + SPELL_MCGOYVER_TAXI_EXPLORERSLEAGUE = 44280, + SPELL_MCGOYVER_CREATE_DARK_IRON_INGOTS = 44512 +}; + +bool GossipHello_npc_mcgoyver(Player* pPlayer, Creature* pCreature) +{ + switch(pPlayer->GetQuestStatus(QUEST_WE_CAN_REBUILD_IT)) + { + case QUEST_STATUS_INCOMPLETE: + if (!pPlayer->HasItemCount(ITEM_DARK_IRON_INGOTS, 1, true)) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_MCGOYVER1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + } + else + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_MCGOYVER2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_MCGOYVER, pCreature->GetGUID()); + } break; - } - return true; + case QUEST_STATUS_COMPLETE: + if (!pPlayer->GetQuestRewardStatus(QUEST_WE_CAN_REBUILD_IT)) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_MCGOYVER2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_MCGOYVER, pCreature->GetGUID()); + break; + } + default: + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + } + + return true; +} + +bool GossipSelect_npc_mcgoyver(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pCreature->CastSpell(pPlayer, SPELL_MCGOYVER_CREATE_DARK_IRON_INGOTS, true); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_MCGOYVER2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_MCGOYVER, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->CLOSE_GOSSIP_MENU(); + pCreature->CastSpell(pPlayer, SPELL_MCGOYVER_TAXI_EXPLORERSLEAGUE, true); + break; + } + + return true; } void AddSC_howling_fjord() { - Script *newscript; + Script* newscript; newscript = new Script; newscript->Name = "npc_deathstalker_razael"; @@ -118,4 +188,9 @@ void AddSC_howling_fjord() newscript->pGossipSelect = &GossipSelect_npc_dark_ranger_lyana; newscript->RegisterSelf(); + newscript = new Script; + newscript->Name = "npc_mcgoyver"; + newscript->pGossipHello = &GossipHello_npc_mcgoyver; + newscript->pGossipSelect = &GossipSelect_npc_mcgoyver; + newscript->RegisterSelf(); } diff --git a/scripts/northrend/zuldrak.cpp b/scripts/northrend/zuldrak.cpp new file mode 100644 index 000000000..9bb4cdf42 --- /dev/null +++ b/scripts/northrend/zuldrak.cpp @@ -0,0 +1,31 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Zuldrak +SD%Complete: +SDComment: +SDCategory: Zuldrak +EndScriptData */ + +/* ContentData +EndContentData */ + +#include "precompiled.h" + +void AddSC_zuldrak() +{ +} diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index 408ac805e..360183195 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -32,15 +32,16 @@ npc_air_force_bots 80% support for misc (invisible) guard bots in areas npc_chicken_cluck 100% support for quest 3861 (Cluck!) npc_dancing_flames 100% midsummer event NPC npc_guardian 100% guardianAI used to prevent players from accessing off-limits areas. Not in use by SD2 -npc_garments_of_quests 80% NPC's related to all Garments of-quests 5621, 5624, 5625, 5648, 5650 +npc_garments_of_quests 80% NPC's related to all Garments of-quests 5621, 5624, 5625, 5648, 5650 npc_injured_patient 100% patients for triage-quests (6622 and 6624) npc_doctor 100% Gustaf Vanhowzen and Gregory Victor, quest 6622 and 6624 (Triage) -npc_innkeeper 25% Innkeepers in general. A lot do be done here (misc options for events) +npc_innkeeper 25% Innkeepers in general. A lot do be done here (misc options for events) npc_kingdom_of_dalaran_quests Misc NPC's gossip option related to quests 12791, 12794 and 12796 npc_lunaclaw_spirit 100% Appears at two different locations, quest 6001/6002 npc_mount_vendor 100% Regular mount vendors all over the world. Display gossip if player doesn't meet the requirements to buy -npc_rogue_trainer 80% Scripted trainers, so they are able to offer item 17126 for class quest 6681 +npc_rogue_trainer 80% Scripted trainers, so they are able to offer item 17126 for class quest 6681 npc_sayge 100% Darkmoon event fortune teller, buff player based on answers given +npc_tabard_vendor 50% allow recovering quest related tabards, achievement related ones need core support EndContentData */ /*######## @@ -1498,9 +1499,168 @@ bool GossipSelect_npc_sayge(Player* pPlayer, Creature* pCreature, uint32 uiSende return true; } +/*###### +## npc_tabard_vendor +######*/ + +enum +{ + QUEST_TRUE_MASTERS_OF_LIGHT = 9737, + QUEST_THE_UNWRITTEN_PROPHECY = 9762, + QUEST_INTO_THE_BREACH = 10259, + QUEST_BATTLE_OF_THE_CRIMSON_WATCH = 10781, + QUEST_SHARDS_OF_AHUNE = 11972, + + ACHIEVEMENT_EXPLORE_NORTHREND = 45, + ACHIEVEMENT_TWENTYFIVE_TABARDS = 1021, + ACHIEVEMENT_THE_LOREMASTER_A = 1681, + ACHIEVEMENT_THE_LOREMASTER_H = 1682, + + ITEM_TABARD_OF_THE_HAND = 24344, + ITEM_TABARD_OF_THE_BLOOD_KNIGHT = 25549, + ITEM_TABARD_OF_THE_PROTECTOR = 28788, + ITEM_OFFERING_OF_THE_SHATAR = 31408, + ITEM_GREEN_TROPHY_TABARD_OF_THE_ILLIDARI = 31404, + ITEM_PURPLE_TROPHY_TABARD_OF_THE_ILLIDARI = 31405, + ITEM_TABARD_OF_THE_SUMMER_SKIES = 35279, + ITEM_TABARD_OF_THE_SUMMER_FLAMES = 35280, + ITEM_TABARD_OF_THE_ACHIEVER = 40643, + ITEM_LOREMASTERS_COLORS = 43300, + ITEM_TABARD_OF_THE_EXPLORER = 43348, + + SPELL_TABARD_OF_THE_BLOOD_KNIGHT = 54974, + SPELL_TABARD_OF_THE_HAND = 54976, + SPELL_GREEN_TROPHY_TABARD_OF_THE_ILLIDARI = 54977, + SPELL_PURPLE_TROPHY_TABARD_OF_THE_ILLIDARI = 54982, + SPELL_TABARD_OF_THE_ACHIEVER = 55006, + SPELL_TABARD_OF_THE_PROTECTOR = 55008, + SPELL_LOREMASTERS_COLORS = 58194, + SPELL_TABARD_OF_THE_EXPLORER = 58224, + SPELL_TABARD_OF_SUMMER_SKIES = 62768, + SPELL_TABARD_OF_SUMMER_FLAMES = 62769 +}; + +#define GOSSIP_LOST_TABARD_OF_BLOOD_KNIGHT "I've lost my Tabard of Blood Knight." +#define GOSSIP_LOST_TABARD_OF_THE_HAND "I've lost my Tabard of the Hand." +#define GOSSIP_LOST_TABARD_OF_THE_PROTECTOR "I've lost my Tabard of the Protector." +#define GOSSIP_LOST_GREEN_TROPHY_TABARD_OF_THE_ILLIDARI "I've lost my Green Trophy Tabard of the Illidari." +#define GOSSIP_LOST_PURPLE_TROPHY_TABARD_OF_THE_ILLIDARI "I've lost my Purple Trophy Tabard of the Illidari." +#define GOSSIP_LOST_TABARD_OF_SUMMER_SKIES "I've lost my Tabard of Summer Skies." +#define GOSSIP_LOST_TABARD_OF_SUMMER_FLAMES "I've lost my Tabard of Summer Flames." +#define GOSSIP_LOST_LOREMASTERS_COLORS "I've lost my Loremaster's Colors." +#define GOSSIP_LOST_TABARD_OF_THE_EXPLORER "I've lost my Tabard of the Explorer." +#define GOSSIP_LOST_TABARD_OF_THE_ACHIEVER "I've lost my Tabard of the Achiever." + +bool GossipHello_npc_tabard_vendor(Player* pPlayer, Creature* pCreature) +{ + bool m_bLostBloodKnight = false; + bool m_bLostHand = false; + bool m_bLostProtector = false; + bool m_bLostIllidari = false; + bool m_bLostSummer = false; + + //Tabard of the Blood Knight + if (pPlayer->GetQuestRewardStatus(QUEST_TRUE_MASTERS_OF_LIGHT) && !pPlayer->HasItemCount(ITEM_TABARD_OF_THE_BLOOD_KNIGHT, 1, true)) + m_bLostBloodKnight = true; + + //Tabard of the Hand + if (pPlayer->GetQuestRewardStatus(QUEST_THE_UNWRITTEN_PROPHECY) && !pPlayer->HasItemCount(ITEM_TABARD_OF_THE_HAND, 1, true)) + m_bLostHand = true; + + //Tabard of the Protector + if (pPlayer->GetQuestRewardStatus(QUEST_INTO_THE_BREACH) && !pPlayer->HasItemCount(ITEM_TABARD_OF_THE_PROTECTOR, 1, true)) + m_bLostProtector = true; + + //Green Trophy Tabard of the Illidari + //Purple Trophy Tabard of the Illidari + if (pPlayer->GetQuestRewardStatus(QUEST_BATTLE_OF_THE_CRIMSON_WATCH) && + (!pPlayer->HasItemCount(ITEM_GREEN_TROPHY_TABARD_OF_THE_ILLIDARI, 1, true) && + !pPlayer->HasItemCount(ITEM_PURPLE_TROPHY_TABARD_OF_THE_ILLIDARI, 1, true) && + !pPlayer->HasItemCount(ITEM_OFFERING_OF_THE_SHATAR, 1, true))) + m_bLostIllidari = true; + + //Tabard of Summer Skies + //Tabard of Summer Flames + if (pPlayer->GetQuestRewardStatus(QUEST_SHARDS_OF_AHUNE) && + !pPlayer->HasItemCount(ITEM_TABARD_OF_THE_SUMMER_SKIES, 1, true) && + !pPlayer->HasItemCount(ITEM_TABARD_OF_THE_SUMMER_FLAMES, 1, true)) + m_bLostSummer = true; + + if (m_bLostBloodKnight || m_bLostHand || m_bLostProtector || m_bLostIllidari || m_bLostSummer) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); + + if (m_bLostBloodKnight) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_TABARD_OF_BLOOD_KNIGHT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF +1); + + if (m_bLostHand) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_TABARD_OF_THE_HAND, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF +2); + + if (m_bLostProtector) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_TABARD_OF_THE_PROTECTOR, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); + + if (m_bLostIllidari) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_GREEN_TROPHY_TABARD_OF_THE_ILLIDARI, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_PURPLE_TROPHY_TABARD_OF_THE_ILLIDARI, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); + } + + if (m_bLostSummer) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_TABARD_OF_SUMMER_SKIES, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_TABARD_OF_SUMMER_FLAMES, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+7); + } + + pPlayer->SEND_GOSSIP_MENU(13583, pCreature->GetGUID()); + } + else + pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_tabard_vendor(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_TRADE: + pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->CastSpell(pPlayer, SPELL_TABARD_OF_THE_BLOOD_KNIGHT, false); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->CastSpell(pPlayer, SPELL_TABARD_OF_THE_HAND, false); + break; + case GOSSIP_ACTION_INFO_DEF+3: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->CastSpell(pPlayer, SPELL_TABARD_OF_THE_PROTECTOR, false); + break; + case GOSSIP_ACTION_INFO_DEF+4: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->CastSpell(pPlayer, SPELL_GREEN_TROPHY_TABARD_OF_THE_ILLIDARI, false); + break; + case GOSSIP_ACTION_INFO_DEF+5: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->CastSpell(pPlayer, SPELL_PURPLE_TROPHY_TABARD_OF_THE_ILLIDARI, false); + break; + case GOSSIP_ACTION_INFO_DEF+6: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->CastSpell(pPlayer, SPELL_TABARD_OF_SUMMER_SKIES, false); + break; + case GOSSIP_ACTION_INFO_DEF+7: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->CastSpell(pPlayer, SPELL_TABARD_OF_SUMMER_FLAMES, false); + break; + } + return true; +} + void AddSC_npcs_special() { - Script *newscript; + Script* newscript; newscript = new Script; newscript->Name = "npc_air_force_bots"; @@ -1576,6 +1736,12 @@ void AddSC_npcs_special() newscript->pGossipSelect = &GossipSelect_npc_sayge; newscript->RegisterSelf(); + newscript = new Script; + newscript->Name = "npc_tabard_vendor"; + newscript->pGossipHello = &GossipHello_npc_tabard_vendor; + newscript->pGossipSelect = &GossipSelect_npc_tabard_vendor; + newscript->RegisterSelf(); + newscript = new Script; newscript->Name = "npc_experience_eliminator"; newscript->pGossipHello = &GossipHello_npc_experience_eliminator; diff --git a/sql/Updates/Makefile.am b/sql/Updates/Makefile.am index a51b45164..cabde121f 100644 --- a/sql/Updates/Makefile.am +++ b/sql/Updates/Makefile.am @@ -45,5 +45,6 @@ pkgdata_DATA = \ r1493_scriptdev2.sql \ r1494_mangos.sql \ r1496_mangos.sql \ - r1498_mangos.sql - \ No newline at end of file + r1498_mangos.sql \ + r1500_mangos.sql \ + r1502_mangos.sql diff --git a/sql/Updates/r1500_mangos.sql b/sql/Updates/r1500_mangos.sql new file mode 100644 index 000000000..9aacf0433 --- /dev/null +++ b/sql/Updates/r1500_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_tabard_vendor' WHERE entry=28776; diff --git a/sql/Updates/r1502_mangos.sql b/sql/Updates/r1502_mangos.sql new file mode 100644 index 000000000..c37b56e1f --- /dev/null +++ b/sql/Updates/r1502_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_mcgoyver' WHERE entry=24040; diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index aac51855e..4ca79104c 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -98,6 +98,7 @@ UPDATE creature_template SET ScriptName='npc_prof_leather' WHERE entry IN (7866, UPDATE creature_template SET ScriptName='npc_prof_tailor' WHERE entry IN (22208,22212,22213); UPDATE creature_template SET ScriptName='npc_rogue_trainer' WHERE entry IN (918,4163,3328,4583,5165,5167,13283,16684); UPDATE creature_template SET ScriptName='npc_sayge' WHERE entry=14822; +UPDATE creature_template SET ScriptName='npc_tabard_vendor' WHERE entry=28776; /* */ /* ZONE */ @@ -577,6 +578,7 @@ UPDATE creature_template SET ScriptName='npc_rinji' WHERE entry=7780; /* HOWLING FJORD */ UPDATE creature_template SET ScriptName='npc_deathstalker_razael' WHERE entry=23998; UPDATE creature_template SET ScriptName='npc_dark_ranger_lyana' WHERE entry=23778; +UPDATE creature_template SET ScriptName='npc_mcgoyver' WHERE entry=24040; /* ICECROWN */ diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index bf3d9179a..4252fe56e 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -331,6 +331,7 @@ extern void AddSC_howling_fjord(); extern void AddSC_icecrown(); extern void AddSC_sholazar_basin(); extern void AddSC_storm_peaks(); +extern void AddSC_zuldrak(); //outland extern void AddSC_boss_exarch_maladaar(); //auchindoun, auchenai_crypts @@ -739,6 +740,7 @@ void AddScripts() AddSC_icecrown(); AddSC_sholazar_basin(); AddSC_storm_peaks(); + AddSC_zuldrak(); //outland AddSC_boss_exarch_maladaar(); //auchindoun, auchenai_crypts From b473f79a9da75a97696db0176868107797b9767c Mon Sep 17 00:00:00 2001 From: mangos3 Date: Thu, 19 Nov 2009 13:31:32 +0300 Subject: [PATCH 040/405] yogg-saron melee fix --- scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp index a07b4bf08..09038bbf3 100644 --- a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp @@ -36,6 +36,8 @@ struct MANGOS_DLL_DECL boss_yogg_saronAI : public ScriptedAI { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + + DoMeleeAttackIfReady(); } }; From b7167cdae9223cb2cceaefecab4d5f48594a2617 Mon Sep 17 00:00:00 2001 From: Insider Date: Thu, 19 Nov 2009 18:27:59 +0700 Subject: [PATCH 041/405] SD2 updated to 1503. Fixed compilation with [patch 1] --- .../magisters_terrace/boss_felblood_kaelthas.cpp | 2 +- .../boss_priestess_delrissa.cpp | 2 +- .../magisters_terrace/boss_selin_fireheart.cpp | 2 +- .../magisters_terrace/boss_vexallus.cpp | 2 +- .../magisters_terrace/magisters_terrace.cpp | 2 +- .../caverns_of_time/dark_portal/boss_aeonus.cpp | 2 +- .../dark_portal/boss_chrono_lord_deja.cpp | 2 +- .../dark_portal/boss_temporus.cpp | 2 +- .../azjol-nerub/ahnkahet/boss_jedoga.cpp | 2 +- .../azjol-nerub/ahnkahet/boss_nadox.cpp | 2 +- .../azjol-nerub/ahnkahet/boss_taldaram.cpp | 2 +- .../azjol-nerub/ahnkahet/boss_volazj.cpp | 2 +- .../azjol-nerub/azjol-nerub/boss_anubarak.cpp | 2 +- .../azjol-nerub/azjol-nerub/boss_hadronox.cpp | 2 +- .../azjol-nerub/azjol-nerub/boss_krikthir.cpp | 2 +- scripts/northrend/draktharon_keep/boss_novos.cpp | 2 +- .../northrend/draktharon_keep/boss_tharonja.cpp | 2 +- .../northrend/draktharon_keep/boss_trollgore.cpp | 2 +- scripts/northrend/gundrak/boss_colossus.cpp | 2 +- scripts/northrend/gundrak/boss_galdarah.cpp | 2 +- scripts/northrend/gundrak/boss_moorabi.cpp | 2 +- scripts/northrend/gundrak/boss_sladran.cpp | 2 +- scripts/northrend/gundrak/instance_gundrak.cpp | 4 ++-- scripts/northrend/naxxramas/boss_anubrekhan.cpp | 2 +- .../northrend/naxxramas/boss_four_horsemen.cpp | 8 ++++---- scripts/northrend/naxxramas/boss_gluth.cpp | 2 +- scripts/northrend/naxxramas/boss_gothik.cpp | 6 +++--- scripts/northrend/naxxramas/boss_kelthuzad.cpp | 2 +- scripts/northrend/naxxramas/boss_maexxna.cpp | 2 +- scripts/northrend/naxxramas/boss_noth.cpp | 2 +- scripts/northrend/naxxramas/boss_patchwerk.cpp | 2 +- scripts/northrend/naxxramas/boss_razuvious.cpp | 2 +- scripts/northrend/naxxramas/boss_sapphiron.cpp | 2 +- scripts/northrend/nexus/nexus/boss_anomalus.cpp | 2 +- .../northrend/nexus/nexus/boss_keristrasza.cpp | 2 +- scripts/northrend/nexus/nexus/boss_ormorok.cpp | 2 +- scripts/northrend/nexus/nexus/boss_telestra.cpp | 2 +- .../obsidian_sanctum/boss_sartharion.cpp | 4 ++-- .../ulduar/halls_of_lightning/boss_bjarngrim.cpp | 4 ++-- .../ulduar/halls_of_lightning/boss_ionar.cpp | 2 +- .../ulduar/halls_of_lightning/boss_loken.cpp | 2 +- .../ulduar/halls_of_lightning/boss_volkhan.cpp | 4 ++-- .../halls_of_stone/boss_maiden_of_grief.cpp | 2 +- .../ulduar/halls_of_stone/boss_sjonnir.cpp | 2 +- .../ulduar/halls_of_stone/halls_of_stone.cpp | 2 +- .../utgarde_keep/utgarde_keep/boss_ingvar.cpp | 4 ++-- .../utgarde_keep/utgarde_keep/boss_keleseth.cpp | 16 ++++++++++++++-- .../utgarde_keep/boss_skarvald_and_dalronn.cpp | 2 +- .../utgarde_keep/utgarde_keep/utgarde_keep.cpp | 2 +- .../utgarde_pinnacle/boss_gortok.cpp | 2 +- .../utgarde_keep/utgarde_pinnacle/boss_skadi.cpp | 2 +- .../utgarde_keep/utgarde_pinnacle/boss_svala.cpp | 2 +- .../utgarde_pinnacle/boss_ymiron.cpp | 2 +- .../mana_tombs/boss_nexusprince_shaffar.cpp | 2 +- .../auchindoun/mana_tombs/boss_pandemonius.cpp | 2 +- .../sethekk_halls/boss_tailonking_ikiss.cpp | 2 +- .../shadow_labyrinth/boss_ambassador_hellmaw.cpp | 2 +- .../shadow_labyrinth/boss_grandmaster_vorpil.cpp | 2 +- .../auchindoun/shadow_labyrinth/boss_murmur.cpp | 2 +- .../steam_vault/boss_hydromancer_thespia.cpp | 4 ++-- .../steam_vault/boss_mekgineer_steamrigger.cpp | 4 ++-- .../underbog/boss_hungarfen.cpp | 2 +- .../blood_furnace/boss_kelidan_the_breaker.cpp | 4 ++-- .../boss_nazan_and_vazruden.cpp | 4 ++-- .../boss_omor_the_unscarred.cpp | 2 +- .../boss_watchkeeper_gargolmar.cpp | 2 +- .../instance_hellfire_ramparts.cpp | 4 ++-- .../shattered_halls/boss_nethekurse.cpp | 2 +- .../shattered_halls/boss_warbringer_omrogg.cpp | 2 +- .../boss_warchief_kargath_bladefist.cpp | 2 +- .../arcatraz/boss_harbinger_skyriss.cpp | 4 ++-- .../the_mechanar/boss_gatewatcher_ironhand.cpp | 2 +- .../the_mechanar/boss_nethermancer_sepethrea.cpp | 4 ++-- .../boss_pathaleon_the_calculator.cpp | 2 +- sql/Updates/Makefile.am | 3 ++- sql/Updates/r1503_scriptdev2.sql | 1 + sql/scriptdev2_script_full.sql | 2 +- 77 files changed, 108 insertions(+), 94 deletions(-) create mode 100644 sql/Updates/r1503_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp index 9821f5dac..fac55721e 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp @@ -79,7 +79,7 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI boss_felblood_kaelthasAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp index 0cdc6dd84..892582f3e 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp @@ -90,7 +90,7 @@ struct MANGOS_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI boss_priestess_delrissaAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); memset(&m_auiLackeyGUID, 0, sizeof(m_auiLackeyGUID)); LackeyEntryList.clear(); Reset(); diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp index ed08df2d5..0de1f4047 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp @@ -54,7 +54,7 @@ struct MANGOS_DLL_DECL boss_selin_fireheartAI : public ScriptedAI boss_selin_fireheartAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Crystals.clear(); //GUIDs per instance is static, so we only need to load them once. diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp index 7a118fab0..299458b57 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp @@ -62,7 +62,7 @@ struct MANGOS_DLL_DECL boss_vexallusAI : public ScriptedAI boss_vexallusAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp index 3b87f41ce..5cf922f4d 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp @@ -78,7 +78,7 @@ struct MANGOS_DLL_DECL npc_kalecgosAI : public ScriptedAI { Map* pMap = m_creature->GetMap(); - if (!pMap || pMap->IsHeroic()) + if (!pMap || pMap->IsRaidOrHeroicDungeon()) return; Map::PlayerList const &lList = pMap->GetPlayers(); diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp index 02ca1f2e6..b6d1204d8 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp @@ -46,7 +46,7 @@ struct MANGOS_DLL_DECL boss_aeonusAI : public ScriptedAI boss_aeonusAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp index f142dfe2a..cd7c993a3 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp @@ -43,7 +43,7 @@ struct MANGOS_DLL_DECL boss_chrono_lord_dejaAI : public ScriptedAI boss_chrono_lord_dejaAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp index 7d91b9614..559ea56ba 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp @@ -42,7 +42,7 @@ struct MANGOS_DLL_DECL boss_temporusAI : public ScriptedAI boss_temporusAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp index 6f1ea7b54..2cacb3384 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp @@ -53,7 +53,7 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI boss_jedogaAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp index 84cc976bc..e779b7adb 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp @@ -101,7 +101,7 @@ struct MANGOS_DLL_DECL boss_nadoxAI : public ScriptedAI boss_nadoxAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp index a30150aa3..d7b6a6298 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp @@ -46,7 +46,7 @@ struct MANGOS_DLL_DECL boss_taldaramAI : public ScriptedAI boss_taldaramAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp index 74bd9f55e..e37e97288 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp @@ -44,7 +44,7 @@ struct MANGOS_DLL_DECL boss_volazjAI : public ScriptedAI boss_volazjAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp index cf32257c9..a3fd6825f 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp @@ -48,7 +48,7 @@ struct MANGOS_DLL_DECL boss_anubarakAI : public ScriptedAI boss_anubarakAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp index beac1a499..0b786995c 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp @@ -38,7 +38,7 @@ struct MANGOS_DLL_DECL boss_hadronoxAI : public ScriptedAI boss_hadronoxAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp index d30c91b2f..a6c072cdd 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp @@ -51,7 +51,7 @@ struct MANGOS_DLL_DECL boss_krikthirAI : public ScriptedAI boss_krikthirAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/northrend/draktharon_keep/boss_novos.cpp b/scripts/northrend/draktharon_keep/boss_novos.cpp index d49bd15d9..8a8a4203b 100644 --- a/scripts/northrend/draktharon_keep/boss_novos.cpp +++ b/scripts/northrend/draktharon_keep/boss_novos.cpp @@ -44,7 +44,7 @@ struct MANGOS_DLL_DECL boss_novosAI : public ScriptedAI boss_novosAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/northrend/draktharon_keep/boss_tharonja.cpp b/scripts/northrend/draktharon_keep/boss_tharonja.cpp index 411d5042a..19f4c7ae4 100644 --- a/scripts/northrend/draktharon_keep/boss_tharonja.cpp +++ b/scripts/northrend/draktharon_keep/boss_tharonja.cpp @@ -44,7 +44,7 @@ struct MANGOS_DLL_DECL boss_tharonjaAI : public ScriptedAI boss_tharonjaAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/northrend/draktharon_keep/boss_trollgore.cpp b/scripts/northrend/draktharon_keep/boss_trollgore.cpp index 156f1982e..9f1a0c762 100644 --- a/scripts/northrend/draktharon_keep/boss_trollgore.cpp +++ b/scripts/northrend/draktharon_keep/boss_trollgore.cpp @@ -41,7 +41,7 @@ struct MANGOS_DLL_DECL boss_trollgoreAI : public ScriptedAI boss_trollgoreAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/northrend/gundrak/boss_colossus.cpp b/scripts/northrend/gundrak/boss_colossus.cpp index df4137a11..8bf6bfbbd 100644 --- a/scripts/northrend/gundrak/boss_colossus.cpp +++ b/scripts/northrend/gundrak/boss_colossus.cpp @@ -39,7 +39,7 @@ struct MANGOS_DLL_DECL boss_colossusAI : public ScriptedAI boss_colossusAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/northrend/gundrak/boss_galdarah.cpp b/scripts/northrend/gundrak/boss_galdarah.cpp index d8be7e5d8..45c71dbd2 100644 --- a/scripts/northrend/gundrak/boss_galdarah.cpp +++ b/scripts/northrend/gundrak/boss_galdarah.cpp @@ -46,7 +46,7 @@ struct MANGOS_DLL_DECL boss_galdarahAI : public ScriptedAI boss_galdarahAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/northrend/gundrak/boss_moorabi.cpp b/scripts/northrend/gundrak/boss_moorabi.cpp index cce6aa8a8..5c0719e3b 100644 --- a/scripts/northrend/gundrak/boss_moorabi.cpp +++ b/scripts/northrend/gundrak/boss_moorabi.cpp @@ -46,7 +46,7 @@ struct MANGOS_DLL_DECL boss_moorabiAI : public ScriptedAI boss_moorabiAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/northrend/gundrak/boss_sladran.cpp b/scripts/northrend/gundrak/boss_sladran.cpp index 354e246fe..a07e10496 100644 --- a/scripts/northrend/gundrak/boss_sladran.cpp +++ b/scripts/northrend/gundrak/boss_sladran.cpp @@ -44,7 +44,7 @@ struct MANGOS_DLL_DECL boss_sladranAI : public ScriptedAI boss_sladranAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/northrend/gundrak/instance_gundrak.cpp b/scripts/northrend/gundrak/instance_gundrak.cpp index 9bd369f84..6b0407f71 100644 --- a/scripts/northrend/gundrak/instance_gundrak.cpp +++ b/scripts/northrend/gundrak/instance_gundrak.cpp @@ -98,7 +98,7 @@ struct MANGOS_DLL_DECL instance_gundrak : public ScriptedInstance { case GO_ECK_DOOR: m_uiEckDoorGUID = pGo->GetGUID(); - if ((m_auiEncounter[1] == DONE) && instance->IsHeroic()) + if ((m_auiEncounter[1] == DONE) && instance->IsRaidOrHeroicDungeon()) DoUseDoorOrButton(m_uiEckDoorGUID); break; case GO_ECK_UNDERWATER_DOOR: @@ -174,7 +174,7 @@ struct MANGOS_DLL_DECL instance_gundrak : public ScriptedInstance m_auiEncounter[1] = uiData; if (uiData == DONE) { - if (instance->IsHeroic()) + if (instance->IsRaidOrHeroicDungeon()) DoUseDoorOrButton(m_uiEckDoorGUID); if (GameObject* pGo = instance->GetGameObject(m_uiAltarOfMoorabiGUID)) pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); diff --git a/scripts/northrend/naxxramas/boss_anubrekhan.cpp b/scripts/northrend/naxxramas/boss_anubrekhan.cpp index 04e80423e..4a49b66e8 100644 --- a/scripts/northrend/naxxramas/boss_anubrekhan.cpp +++ b/scripts/northrend/naxxramas/boss_anubrekhan.cpp @@ -67,7 +67,7 @@ struct MANGOS_DLL_DECL boss_anubrekhanAI : public ScriptedAI boss_anubrekhanAI(Creature *c) : ScriptedAI(c) { pInstance = ((ScriptedInstance*)c->GetInstanceData()); - Heroic = c->GetMap()->GetSpawnMode() > 0; + Heroic = c->GetMap()->IsRaidOrHeroicDungeon(); for (int i = 0; i < MAX_CRYPT_GUARDS; i++) guidCryptGuards[i] = 0; diff --git a/scripts/northrend/naxxramas/boss_four_horsemen.cpp b/scripts/northrend/naxxramas/boss_four_horsemen.cpp index 510a38fda..c4d5511c4 100644 --- a/scripts/northrend/naxxramas/boss_four_horsemen.cpp +++ b/scripts/northrend/naxxramas/boss_four_horsemen.cpp @@ -50,7 +50,7 @@ struct MANGOS_DLL_DECL boss_lady_blaumeuxAI : public ScriptedAI { boss_lady_blaumeuxAI(Creature* pCreature) : ScriptedAI(pCreature) { - Heroic = pCreature->GetMap()->GetSpawnMode() > 0; + Heroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Reset(); } @@ -169,7 +169,7 @@ struct MANGOS_DLL_DECL boss_rivendare_naxxAI : public ScriptedAI { boss_rivendare_naxxAI(Creature* pCreature) : ScriptedAI(pCreature) { - Heroic = pCreature->GetMap()->GetSpawnMode() > 0; + Heroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Reset(); } @@ -279,7 +279,7 @@ struct MANGOS_DLL_DECL boss_thane_korthazzAI : public ScriptedAI { boss_thane_korthazzAI(Creature* pCreature) : ScriptedAI(pCreature) { - Heroic = pCreature->GetMap()->GetSpawnMode() > 0; + Heroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Reset(); } @@ -386,7 +386,7 @@ struct MANGOS_DLL_DECL boss_sir_zeliekAI : public ScriptedAI { boss_sir_zeliekAI(Creature* pCreature) : ScriptedAI(pCreature) { - Heroic = pCreature->GetMap()->GetSpawnMode() > 0; + Heroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Reset(); } diff --git a/scripts/northrend/naxxramas/boss_gluth.cpp b/scripts/northrend/naxxramas/boss_gluth.cpp index df343919b..e2fe6d139 100644 --- a/scripts/northrend/naxxramas/boss_gluth.cpp +++ b/scripts/northrend/naxxramas/boss_gluth.cpp @@ -78,7 +78,7 @@ struct MANGOS_DLL_DECL boss_gluthAI : public ScriptedAI boss_gluthAI(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Heroic = m_creature->GetMap()->GetSpawnMode() > 0; + Heroic = m_creature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/northrend/naxxramas/boss_gothik.cpp b/scripts/northrend/naxxramas/boss_gothik.cpp index 9ecf10a75..3c4b29b9d 100644 --- a/scripts/northrend/naxxramas/boss_gothik.cpp +++ b/scripts/northrend/naxxramas/boss_gothik.cpp @@ -87,7 +87,7 @@ struct MANGOS_DLL_DECL boss_gothikAI : public ScriptedAI boss_gothikAI(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Heroic = pCreature->GetMap()->GetSpawnMode() > 0; + Heroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); trainees = Heroic ? 3 : 2; @@ -279,7 +279,7 @@ struct MANGOS_DLL_DECL mob_gothik_trainee_addAI : public ScriptedAI { mob_gothik_trainee_addAI(Creature* pCreature) : ScriptedAI(pCreature) { - Heroic = pCreature->GetMap()->GetSpawnMode() > 0; + Heroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } @@ -410,7 +410,7 @@ struct MANGOS_DLL_DECL mob_gothik_rider_addAI : public ScriptedAI { mob_gothik_rider_addAI(Creature* pCreature) : ScriptedAI(pCreature) { - Heroic = pCreature->GetMap()->GetSpawnMode() > 0; + Heroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/northrend/naxxramas/boss_kelthuzad.cpp b/scripts/northrend/naxxramas/boss_kelthuzad.cpp index 1eea6e870..3382205ca 100644 --- a/scripts/northrend/naxxramas/boss_kelthuzad.cpp +++ b/scripts/northrend/naxxramas/boss_kelthuzad.cpp @@ -51,7 +51,7 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI boss_kelthuzadAI(Creature* c) : ScriptedAI(c) { pInstance = (ScriptedInstance*)c->GetInstanceData(); - Heroic = m_creature->GetMap()->GetSpawnMode() > 0; + Heroic = m_creature->GetMap()->IsRaidOrHeroicDungeon(); MaxGuardians = Heroic ? 4 : 2; Reset(); } diff --git a/scripts/northrend/naxxramas/boss_maexxna.cpp b/scripts/northrend/naxxramas/boss_maexxna.cpp index 9f3125a91..cbfa12cbc 100644 --- a/scripts/northrend/naxxramas/boss_maexxna.cpp +++ b/scripts/northrend/naxxramas/boss_maexxna.cpp @@ -93,7 +93,7 @@ struct MANGOS_DLL_DECL boss_maexxnaAI : public ScriptedAI boss_maexxnaAI(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); - Heroic = pCreature->GetMap()->GetSpawnMode() > 0; + Heroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/northrend/naxxramas/boss_noth.cpp b/scripts/northrend/naxxramas/boss_noth.cpp index 7010534f9..a91b62cd9 100644 --- a/scripts/northrend/naxxramas/boss_noth.cpp +++ b/scripts/northrend/naxxramas/boss_noth.cpp @@ -58,7 +58,7 @@ struct MANGOS_DLL_DECL boss_nothAI : public ScriptedAI boss_nothAI(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Heroic = pCreature->GetMap()->GetSpawnMode() > 0; + Heroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); AddsCount = Heroic ? 3 : 2; //normal phase BalconyAddsCount = Heroic ? 4 : 2; //balcony phase Reset(); diff --git a/scripts/northrend/naxxramas/boss_patchwerk.cpp b/scripts/northrend/naxxramas/boss_patchwerk.cpp index 9955d09ab..90d7924bb 100644 --- a/scripts/northrend/naxxramas/boss_patchwerk.cpp +++ b/scripts/northrend/naxxramas/boss_patchwerk.cpp @@ -41,7 +41,7 @@ struct MANGOS_DLL_DECL boss_patchwerkAI : public ScriptedAI { boss_patchwerkAI(Creature* pCreature) : ScriptedAI(pCreature) { - Heroic = pCreature->GetMap()->GetSpawnMode() > 0; + Heroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/northrend/naxxramas/boss_razuvious.cpp b/scripts/northrend/naxxramas/boss_razuvious.cpp index adf478490..b66c60b73 100644 --- a/scripts/northrend/naxxramas/boss_razuvious.cpp +++ b/scripts/northrend/naxxramas/boss_razuvious.cpp @@ -49,7 +49,7 @@ struct MANGOS_DLL_DECL boss_razuviousAI : public ScriptedAI boss_razuviousAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->GetSpawnMode() > 0; + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/northrend/naxxramas/boss_sapphiron.cpp b/scripts/northrend/naxxramas/boss_sapphiron.cpp index 1e00762de..acc554904 100644 --- a/scripts/northrend/naxxramas/boss_sapphiron.cpp +++ b/scripts/northrend/naxxramas/boss_sapphiron.cpp @@ -43,7 +43,7 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI { boss_sapphironAI(Creature* pCreature) : ScriptedAI(pCreature) { - Heroic = pCreature->GetMap()->GetSpawnMode() > 0; + Heroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/northrend/nexus/nexus/boss_anomalus.cpp b/scripts/northrend/nexus/nexus/boss_anomalus.cpp index a6c51a79a..e79d41f5f 100644 --- a/scripts/northrend/nexus/nexus/boss_anomalus.cpp +++ b/scripts/northrend/nexus/nexus/boss_anomalus.cpp @@ -65,7 +65,7 @@ struct MANGOS_DLL_DECL boss_anomalusAI : public ScriptedAI boss_anomalusAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/northrend/nexus/nexus/boss_keristrasza.cpp b/scripts/northrend/nexus/nexus/boss_keristrasza.cpp index f647ee431..983976649 100644 --- a/scripts/northrend/nexus/nexus/boss_keristrasza.cpp +++ b/scripts/northrend/nexus/nexus/boss_keristrasza.cpp @@ -54,7 +54,7 @@ struct MANGOS_DLL_DECL boss_keristraszaAI : public ScriptedAI boss_keristraszaAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/northrend/nexus/nexus/boss_ormorok.cpp b/scripts/northrend/nexus/nexus/boss_ormorok.cpp index b1c6c3897..3051fafbd 100644 --- a/scripts/northrend/nexus/nexus/boss_ormorok.cpp +++ b/scripts/northrend/nexus/nexus/boss_ormorok.cpp @@ -57,7 +57,7 @@ struct MANGOS_DLL_DECL boss_ormorokAI : public ScriptedAI boss_ormorokAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/northrend/nexus/nexus/boss_telestra.cpp b/scripts/northrend/nexus/nexus/boss_telestra.cpp index 5bed1e86b..a57664d9f 100644 --- a/scripts/northrend/nexus/nexus/boss_telestra.cpp +++ b/scripts/northrend/nexus/nexus/boss_telestra.cpp @@ -70,7 +70,7 @@ struct MANGOS_DLL_DECL boss_telestraAI : public ScriptedAI boss_telestraAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp index f39a5b020..849ce69b8 100644 --- a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp +++ b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp @@ -165,7 +165,7 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI boss_sartharionAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); - m_bIsHeroic = pCreature->GetMap()->IsHeroic(); + m_bIsHeroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } @@ -520,7 +520,7 @@ struct MANGOS_DLL_DECL dummy_dragonAI : public ScriptedAI dummy_dragonAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); - m_bIsHeroic = pCreature->GetMap()->IsHeroic(); + m_bIsHeroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp index b44535368..6bab8e9eb 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp @@ -84,7 +84,7 @@ struct MANGOS_DLL_DECL boss_bjarngrimAI : public ScriptedAI boss_bjarngrimAI(Creature *pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroic = pCreature->GetMap()->IsHeroic(); + m_bIsHeroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); m_uiStance = STANCE_DEFENSIVE; memset(&m_auiStormforgedLieutenantGUID, 0, sizeof(m_auiStormforgedLieutenantGUID)); Reset(); @@ -356,7 +356,7 @@ struct MANGOS_DLL_DECL mob_stormforged_lieutenantAI : public ScriptedAI mob_stormforged_lieutenantAI(Creature *pCreature) : ScriptedAI(pCreature) { m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); - m_bIsHeroic = pCreature->GetMap()->IsHeroic(); + m_bIsHeroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp index 181b2e856..1b93c8229 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp @@ -62,7 +62,7 @@ struct MANGOS_DLL_DECL boss_ionarAI : public ScriptedAI boss_ionarAI(Creature *pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroic = pCreature->GetMap()->IsHeroic(); + m_bIsHeroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp index 32732cc33..f1fb5790e 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp @@ -59,7 +59,7 @@ struct MANGOS_DLL_DECL boss_lokenAI : public ScriptedAI boss_lokenAI(Creature *pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroic = pCreature->GetMap()->IsHeroic(); + m_bIsHeroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp index 88aeb6f57..df553a808 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp @@ -75,7 +75,7 @@ struct MANGOS_DLL_DECL boss_volkhanAI : public ScriptedAI boss_volkhanAI(Creature *pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroic = pCreature->GetMap()->IsHeroic(); + m_bIsHeroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } @@ -357,7 +357,7 @@ struct MANGOS_DLL_DECL mob_molten_golemAI : public ScriptedAI mob_molten_golemAI(Creature *pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroic = pCreature->GetMap()->IsHeroic(); + m_bIsHeroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp index 70c5ab2f4..42011e7d8 100644 --- a/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp @@ -43,7 +43,7 @@ struct MANGOS_DLL_DECL boss_maiden_of_griefAI : public ScriptedAI boss_maiden_of_griefAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp index b49f6f944..7d2e150c3 100644 --- a/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp @@ -42,7 +42,7 @@ struct MANGOS_DLL_DECL boss_sjonnirAI : public ScriptedAI boss_sjonnirAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp index 3f4342185..6e2a9ff8e 100644 --- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp @@ -105,7 +105,7 @@ struct MANGOS_DLL_DECL npc_brann_hosAI : public npc_escortAI npc_brann_hosAI(Creature* pCreature) : npc_escortAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp index 3b0173447..b2cd13151 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp @@ -81,7 +81,7 @@ struct MANGOS_DLL_DECL boss_ingvarAI : public ScriptedAI boss_ingvarAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } @@ -199,7 +199,7 @@ struct MANGOS_DLL_DECL npc_annhyldeAI : public ScriptedAI npc_annhyldeAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp index e0b0048a0..3e046f7d2 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp @@ -62,7 +62,7 @@ struct MANGOS_DLL_DECL mob_vrykul_skeletonAI : public ScriptedAI mob_vrykul_skeletonAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); - m_bIsHeroicMode = m_creature->GetMap()->IsHeroic(); + m_bIsHeroicMode = m_creature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } @@ -191,7 +191,7 @@ struct MANGOS_DLL_DECL boss_kelesethAI : public ScriptedAI boss_kelesethAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } @@ -208,6 +208,8 @@ struct MANGOS_DLL_DECL boss_kelesethAI : public ScriptedAI m_uiFrostTombTimer = 20000; m_uiSummonTimer = 5000 ; m_uiShadowboltTimer = 0; + + DespawnAdds(); } void AttackStart(Unit* pWho) @@ -233,6 +235,16 @@ struct MANGOS_DLL_DECL boss_kelesethAI : public ScriptedAI m_creature->SummonCreature(NPC_VRYKUL_SKELETON, fAddPosition[0]+rand()%7, fAddPosition[1]+rand()%7, fAddPosition[2], fAddPosition[3], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, MINUTE*IN_MILISECONDS); } + void DespawnAdds() + { + std::list lAddsList; + GetCreatureListWithEntryInGrid(lAddsList, m_creature, NPC_VRYKUL_SKELETON, 100.0f); + + if (!lAddsList.empty()) + for(std::list::iterator itr = lAddsList.begin(); itr != lAddsList.end(); ++itr) + (*itr)->ForcedDespawn(); + } + void JustSummoned(Creature* pSummoned) { if (pSummoned->GetEntry() == NPC_VRYKUL_SKELETON) diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp index 439d94cfd..f57bb8622 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp @@ -79,7 +79,7 @@ struct MANGOS_DLL_DECL boss_s_and_d_dummyAI : public ScriptedAI boss_s_and_d_dummyAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); m_uiGhostGUID = 0; Reset(); } diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp index 025592d8d..d0c285d58 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp @@ -46,7 +46,7 @@ struct MANGOS_DLL_DECL mob_dragonflayer_forge_masterAI : public ScriptedAI mob_dragonflayer_forge_masterAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); m_uiForgeEncounterId = 0; Reset(); } diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp index 68c614d01..d4338d3fa 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp @@ -40,7 +40,7 @@ struct MANGOS_DLL_DECL boss_gortokAI : public ScriptedAI boss_gortokAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp index c230564fb..a15b13cba 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp @@ -48,7 +48,7 @@ struct MANGOS_DLL_DECL boss_skadiAI : public ScriptedAI boss_skadiAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp index 016c38961..850ca3dc8 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp @@ -68,7 +68,7 @@ struct MANGOS_DLL_DECL boss_svalaAI : public ScriptedAI boss_svalaAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); m_bIsIntroDone = false; Reset(); } diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp index b9e42741b..e65c9140c 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp @@ -46,7 +46,7 @@ struct MANGOS_DLL_DECL boss_ymironAI : public ScriptedAI boss_ymironAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp b/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp index 9770eee42..f25576f14 100644 --- a/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp +++ b/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp @@ -195,7 +195,7 @@ struct MANGOS_DLL_DECL mob_ethereal_beaconAI : public ScriptedAI { mob_ethereal_beaconAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp b/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp index fd13a668c..a0069a115 100644 --- a/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp +++ b/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp @@ -43,7 +43,7 @@ struct MANGOS_DLL_DECL boss_pandemoniusAI : public ScriptedAI { boss_pandemoniusAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_tailonking_ikiss.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_tailonking_ikiss.cpp index 30deecb41..ac527f7b7 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_tailonking_ikiss.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_tailonking_ikiss.cpp @@ -53,7 +53,7 @@ struct MANGOS_DLL_DECL boss_talon_king_ikissAI : public ScriptedAI boss_talon_king_ikissAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp index ad3a1512d..d2e03b301 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp @@ -48,7 +48,7 @@ struct MANGOS_DLL_DECL boss_ambassador_hellmawAI : public npc_escortAI boss_ambassador_hellmawAI(Creature* pCreature) : npc_escortAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp index a5e80829c..0091d4ff2 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp @@ -58,7 +58,7 @@ struct MANGOS_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI boss_grandmaster_vorpilAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Intro = false; Reset(); } diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp index b76bc62db..e3f247327 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp @@ -42,7 +42,7 @@ struct MANGOS_DLL_DECL boss_murmurAI : public ScriptedAI { SetCombatMovement(false); m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp index ee9811638..eae145d82 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp @@ -46,7 +46,7 @@ struct MANGOS_DLL_DECL boss_thespiaAI : public ScriptedAI boss_thespiaAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } @@ -141,7 +141,7 @@ struct MANGOS_DLL_DECL mob_coilfang_waterelementalAI : public ScriptedAI { mob_coilfang_waterelementalAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp index f3dd9fbaa..f80b9f9c3 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp @@ -51,7 +51,7 @@ struct MANGOS_DLL_DECL boss_mekgineer_steamriggerAI : public ScriptedAI boss_mekgineer_steamriggerAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } @@ -202,7 +202,7 @@ struct MANGOS_DLL_DECL mob_steamrigger_mechanicAI : public ScriptedAI mob_steamrigger_mechanicAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp b/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp index 013acf671..5dfe0ef88 100644 --- a/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp +++ b/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp @@ -30,7 +30,7 @@ struct MANGOS_DLL_DECL boss_hungarfenAI : public ScriptedAI { boss_hungarfenAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp b/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp index 92e357032..e86e2d306 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp @@ -57,7 +57,7 @@ struct MANGOS_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI boss_kelidan_the_breakerAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } @@ -174,7 +174,7 @@ struct MANGOS_DLL_DECL mob_shadowmoon_channelerAI : public ScriptedAI mob_shadowmoon_channelerAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp index 8e32b229b..1f07e1c8e 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp @@ -66,7 +66,7 @@ struct MANGOS_DLL_DECL boss_vazrudenAI : public ScriptedAI boss_vazrudenAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } @@ -147,7 +147,7 @@ struct MANGOS_DLL_DECL boss_vazruden_heraldAI : public ScriptedAI { pCreature->SetActiveObjectState(true); m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp index 2a79e5d4b..33051a3cd 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp @@ -46,7 +46,7 @@ struct MANGOS_DLL_DECL boss_omor_the_unscarredAI : public ScriptedAI boss_omor_the_unscarredAI(Creature* pCreature) : ScriptedAI(pCreature) { SetCombatMovement(false); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp index a31291df3..d112e24e1 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp @@ -42,7 +42,7 @@ struct MANGOS_DLL_DECL boss_watchkeeper_gargolmarAI : public ScriptedAI { boss_watchkeeper_gargolmarAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp index 8a7978a75..68eec50ad 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp @@ -67,7 +67,7 @@ struct MANGOS_DLL_DECL instance_ramparts : public ScriptedInstance { case TYPE_VAZRUDEN: if (uiData == DONE && m_auiEncounter[1] == DONE) - DoRespawnGameObject(instance->IsHeroic() ? m_uiChestHGUID : m_uiChestNGUID, HOUR*IN_MILISECONDS); + DoRespawnGameObject(instance->IsRaidOrHeroicDungeon() ? m_uiChestHGUID : m_uiChestNGUID, HOUR*IN_MILISECONDS); m_auiEncounter[0] = uiData; break; case TYPE_NAZAN: @@ -80,7 +80,7 @@ struct MANGOS_DLL_DECL instance_ramparts : public ScriptedInstance } if (uiData == DONE && m_auiEncounter[0] == DONE) { - DoRespawnGameObject(instance->IsHeroic() ? m_uiChestHGUID : m_uiChestNGUID, HOUR*IN_MILISECONDS); + DoRespawnGameObject(instance->IsRaidOrHeroicDungeon() ? m_uiChestHGUID : m_uiChestNGUID, HOUR*IN_MILISECONDS); m_auiEncounter[1] = uiData; } if (uiData == IN_PROGRESS) diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp index 28bdb68e7..48999d5b8 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp @@ -78,7 +78,7 @@ struct MANGOS_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI boss_grand_warlock_nethekurseAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp index 528d1fb60..8d6bad4cb 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp @@ -137,7 +137,7 @@ struct MANGOS_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI m_uiLeftHeadGUID = 0; m_uiRightHeadGUID = 0; m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp index dbec2f7e4..65c18259c 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp @@ -53,7 +53,7 @@ struct MANGOS_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI boss_warchief_kargath_bladefistAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp b/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp index 9195acb9c..c8258bb9b 100644 --- a/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp +++ b/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp @@ -58,7 +58,7 @@ struct MANGOS_DLL_DECL boss_harbinger_skyrissAI : public ScriptedAI boss_harbinger_skyrissAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Intro = false; Reset(); } @@ -260,7 +260,7 @@ struct MANGOS_DLL_DECL boss_harbinger_skyriss_illusionAI : public ScriptedAI boss_harbinger_skyriss_illusionAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp index 2b70c560d..cf0c9c60a 100644 --- a/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp @@ -43,7 +43,7 @@ struct MANGOS_DLL_DECL boss_gatewatcher_iron_handAI : public ScriptedAI boss_gatewatcher_iron_handAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp index c3cdd9ec4..e6ce7203b 100644 --- a/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp @@ -45,7 +45,7 @@ struct MANGOS_DLL_DECL boss_nethermancer_sepethreaAI : public ScriptedAI boss_nethermancer_sepethreaAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } @@ -157,7 +157,7 @@ struct MANGOS_DLL_DECL mob_ragin_flamesAI : public ScriptedAI mob_ragin_flamesAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp index c0735faac..ba2353be2 100644 --- a/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp @@ -52,7 +52,7 @@ struct MANGOS_DLL_DECL boss_pathaleon_the_calculatorAI : public ScriptedAI { boss_pathaleon_the_calculatorAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_bIsHeroicMode = pCreature->GetMap()->IsHeroic(); + m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); Reset(); } diff --git a/sql/Updates/Makefile.am b/sql/Updates/Makefile.am index cabde121f..90d8fbfb2 100644 --- a/sql/Updates/Makefile.am +++ b/sql/Updates/Makefile.am @@ -47,4 +47,5 @@ pkgdata_DATA = \ r1496_mangos.sql \ r1498_mangos.sql \ r1500_mangos.sql \ - r1502_mangos.sql + r1502_mangos.sql \ + r1503_scriptdev2.sql diff --git a/sql/Updates/r1503_scriptdev2.sql b/sql/Updates/r1503_scriptdev2.sql new file mode 100644 index 000000000..bf94ee64d --- /dev/null +++ b/sql/Updates/r1503_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 8828+) '; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 9fb49512b..850e67d7e 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3,7 +3,7 @@ -- DELETE FROM sd2_db_version; -INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for MaNGOS 8759+) '); +INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for MaNGOS 8828+) '); -- -- Below contains data for table `script_texts` mainly used in C++ parts. From 16a6a96c0aca05d64f03a4d2caac3ba6277f86e9 Mon Sep 17 00:00:00 2001 From: Insider Date: Thu, 19 Nov 2009 18:36:34 +0700 Subject: [PATCH 042/405] [patch 10] Added support for spell Dancing Rune Weapon. Requires core with [patch 219] --- addition/10_mangos_dancing_rune_weapon.sql | 1 + scripts/world/npcs_special.cpp | 43 ++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 addition/10_mangos_dancing_rune_weapon.sql diff --git a/addition/10_mangos_dancing_rune_weapon.sql b/addition/10_mangos_dancing_rune_weapon.sql new file mode 100644 index 000000000..0374687a3 --- /dev/null +++ b/addition/10_mangos_dancing_rune_weapon.sql @@ -0,0 +1 @@ +update `creature_template` set `ScriptName`='npc_runeblade' where `entry`=27893; diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index 360183195..8cd0b0aa2 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -1658,6 +1658,44 @@ bool GossipSelect_npc_tabard_vendor(Player* pPlayer, Creature* pCreature, uint32 return true; } +struct MANGOS_DLL_DECL npc_rune_blade : public ScriptedAI +{ + npc_rune_blade(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + void Reset() + { + Unit * owner = m_creature->GetOwner(); + if (!owner || owner->GetTypeId() != TYPEID_PLAYER) + return; + + // Cannot be Selected or Attacked + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + // Add visible weapon + if (Item const * item = ((Player *)owner)->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND)) + m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, item->GetProto()->ItemId); + + // Add stats scaling + int32 damageDone=owner->CalculateDamage(BASE_ATTACK, true); // might be average damage instead ? + int32 meleeSpeed=owner->m_modAttackSpeedPct[BASE_ATTACK]; + m_creature->CastCustomSpell(m_creature, 51906, &damageDone, &meleeSpeed, NULL, true); + + // Visual Glow + m_creature->CastSpell(m_creature, 53160, true); + + // Start Chasing victim + if (uint64 guid = ((Player*)owner)->GetSelection()) + if (Unit *target = m_creature->GetUnit(*owner,guid)) + if (!target->IsFriendlyTo(owner)) + m_creature->Attack(target,true); + + } +}; +CreatureAI* GetAI_npc_rune_blade(Creature* pCreature) +{ + return new npc_rune_blade(pCreature); +} + void AddSC_npcs_special() { Script* newscript; @@ -1747,4 +1785,9 @@ void AddSC_npcs_special() newscript->pGossipHello = &GossipHello_npc_experience_eliminator; newscript->pGossipSelect = &GossipSelect_npc_experience_eliminator; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_runeblade"; + newscript->GetAI = &GetAI_npc_rune_blade; + newscript->RegisterSelf(); } From 669567ba953e3466faaf4e89ca9ab2b1c840b502 Mon Sep 17 00:00:00 2001 From: Insider Date: Thu, 19 Nov 2009 19:04:14 +0700 Subject: [PATCH 043/405] Fixed compilation error for [patch 7] after [8828]. Fixed compilation error for [patch 10] after core [patch 117] --- scripts/northrend/ulduar/ulduar/instance_ulduar.cpp | 2 +- scripts/world/npcs_special.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index b628ef088..37b67b199 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -12,7 +12,7 @@ struct MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance { instance_ulduar(Map* pMap) : ScriptedInstance(pMap) { - Heroic = pMap->IsHeroic(); + Heroic = pMap->IsRaidOrHeroicDungeon(); Initialize(); } diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index 8cd0b0aa2..a0051ab68 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -1676,7 +1676,7 @@ struct MANGOS_DLL_DECL npc_rune_blade : public ScriptedAI m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, item->GetProto()->ItemId); // Add stats scaling - int32 damageDone=owner->CalculateDamage(BASE_ATTACK, true); // might be average damage instead ? + int32 damageDone=owner->CalculateDamage(BASE_ATTACK, true, true); // might be average damage instead ? int32 meleeSpeed=owner->m_modAttackSpeedPct[BASE_ATTACK]; m_creature->CastCustomSpell(m_creature, 51906, &damageDone, &meleeSpeed, NULL, true); From acb3bac6b84936de00add0ce16dbe2fd22da8ed3 Mon Sep 17 00:00:00 2001 From: Insider Date: Fri, 20 Nov 2009 20:29:09 +0700 Subject: [PATCH 044/405] SD2 updated to 1504. Fixed compilation with [patch 1]. Fixed compilation with [patch 7]. Fixed SQL file for [patch 7] --- .../boss_felblood_kaelthas.cpp | 8 ++--- .../boss_priestess_delrissa.cpp | 8 ++--- .../boss_selin_fireheart.cpp | 12 +++---- .../magisters_terrace/boss_vexallus.cpp | 16 ++++----- .../magisters_terrace/magisters_terrace.cpp | 2 +- .../dark_portal/boss_aeonus.cpp | 6 ++-- .../dark_portal/boss_chrono_lord_deja.cpp | 10 +++--- .../dark_portal/boss_temporus.cpp | 8 ++--- .../azjol-nerub/ahnkahet/boss_jedoga.cpp | 4 +-- .../azjol-nerub/ahnkahet/boss_nadox.cpp | 8 ++--- .../azjol-nerub/ahnkahet/boss_taldaram.cpp | 4 +-- .../azjol-nerub/ahnkahet/boss_volazj.cpp | 4 +-- .../azjol-nerub/azjol-nerub/boss_anubarak.cpp | 4 +-- .../azjol-nerub/azjol-nerub/boss_hadronox.cpp | 4 +-- .../azjol-nerub/azjol-nerub/boss_krikthir.cpp | 4 +-- .../northrend/draktharon_keep/boss_novos.cpp | 4 +-- .../draktharon_keep/boss_tharonja.cpp | 4 +-- .../draktharon_keep/boss_trollgore.cpp | 4 +-- scripts/northrend/gundrak/boss_colossus.cpp | 4 +-- scripts/northrend/gundrak/boss_galdarah.cpp | 4 +-- scripts/northrend/gundrak/boss_moorabi.cpp | 4 +-- scripts/northrend/gundrak/boss_sladran.cpp | 4 +-- .../northrend/gundrak/instance_gundrak.cpp | 4 +-- .../northrend/naxxramas/boss_anubrekhan.cpp | 10 +++--- .../naxxramas/boss_four_horsemen.cpp | 28 +++++++-------- scripts/northrend/naxxramas/boss_gluth.cpp | 8 ++--- scripts/northrend/naxxramas/boss_gothik.cpp | 32 ++++++++--------- .../northrend/naxxramas/boss_kelthuzad.cpp | 14 ++++---- scripts/northrend/naxxramas/boss_maexxna.cpp | 12 +++---- scripts/northrend/naxxramas/boss_noth.cpp | 10 +++--- .../northrend/naxxramas/boss_patchwerk.cpp | 6 ++-- .../northrend/naxxramas/boss_razuvious.cpp | 6 ++-- .../northrend/naxxramas/boss_sapphiron.cpp | 12 +++---- .../naxxramas/instance_naxxramas.cpp | 8 ++--- .../northrend/nexus/nexus/boss_anomalus.cpp | 6 ++-- .../nexus/nexus/boss_keristrasza.cpp | 4 +-- .../northrend/nexus/nexus/boss_ormorok.cpp | 10 +++--- .../northrend/nexus/nexus/boss_telestra.cpp | 4 +-- .../obsidian_sanctum/boss_sartharion.cpp | 30 ++++++++-------- .../halls_of_lightning/boss_bjarngrim.cpp | 10 +++--- .../ulduar/halls_of_lightning/boss_ionar.cpp | 10 +++--- .../ulduar/halls_of_lightning/boss_loken.cpp | 16 ++++----- .../halls_of_lightning/boss_volkhan.cpp | 16 ++++----- .../halls_of_stone/boss_maiden_of_grief.cpp | 4 +-- .../ulduar/halls_of_stone/boss_sjonnir.cpp | 4 +-- .../ulduar/halls_of_stone/halls_of_stone.cpp | 4 +-- .../northrend/ulduar/ulduar/boss_algalon.cpp | 6 ++-- .../northrend/ulduar/ulduar/boss_auriaya.cpp | 6 ++-- .../northrend/ulduar/ulduar/boss_freya.cpp | 8 ++--- .../northrend/ulduar/ulduar/boss_hodir.cpp | 6 ++-- .../northrend/ulduar/ulduar/boss_ignis.cpp | 10 +++--- .../ulduar/ulduar/boss_iron_council.cpp | 14 ++++---- .../northrend/ulduar/ulduar/boss_kologarn.cpp | 18 +++++----- .../ulduar/ulduar/boss_leviathan.cpp | 6 ++-- .../northrend/ulduar/ulduar/boss_mimiron.cpp | 4 +-- .../ulduar/ulduar/boss_razorscale.cpp | 12 +++---- .../northrend/ulduar/ulduar/boss_thorim.cpp | 4 +-- .../northrend/ulduar/ulduar/boss_vezax.cpp | 4 +-- .../northrend/ulduar/ulduar/boss_xt_002.cpp | 16 ++++----- .../ulduar/ulduar/boss_yogg_saron.cpp | 4 +-- .../ulduar/ulduar/instance_ulduar.cpp | 36 +++++++++---------- .../utgarde_keep/utgarde_keep/boss_ingvar.cpp | 14 ++++---- .../utgarde_keep/boss_keleseth.cpp | 16 ++++----- .../boss_skarvald_and_dalronn.cpp | 10 +++--- .../utgarde_keep/utgarde_keep.cpp | 6 ++-- .../utgarde_pinnacle/boss_gortok.cpp | 4 +-- .../utgarde_pinnacle/boss_skadi.cpp | 4 +-- .../utgarde_pinnacle/boss_svala.cpp | 4 +-- .../utgarde_pinnacle/boss_ymiron.cpp | 4 +-- .../mana_tombs/boss_nexusprince_shaffar.cpp | 10 +++--- .../mana_tombs/boss_pandemonius.cpp | 8 ++--- .../sethekk_halls/boss_tailonking_ikiss.cpp | 14 ++++---- .../boss_ambassador_hellmaw.cpp | 6 ++-- .../boss_grandmaster_vorpil.cpp | 8 ++--- .../shadow_labyrinth/boss_murmur.cpp | 8 ++--- .../steam_vault/boss_hydromancer_thespia.cpp | 14 ++++---- .../boss_mekgineer_steamrigger.cpp | 10 +++--- .../underbog/boss_hungarfen.cpp | 4 +-- .../boss_kelidan_the_breaker.cpp | 18 +++++----- .../boss_nazan_and_vazruden.cpp | 8 ++--- .../boss_omor_the_unscarred.cpp | 8 ++--- .../boss_watchkeeper_gargolmar.cpp | 6 ++-- .../instance_hellfire_ramparts.cpp | 4 +-- .../shattered_halls/boss_nethekurse.cpp | 6 ++-- .../boss_warbringer_omrogg.cpp | 6 ++-- .../boss_warchief_kargath_bladefist.cpp | 6 ++-- .../arcatraz/boss_harbinger_skyriss.cpp | 18 +++++----- .../boss_gatewatcher_ironhand.cpp | 8 ++--- .../boss_nethermancer_sepethrea.cpp | 12 +++---- .../boss_pathaleon_the_calculator.cpp | 6 ++-- sql/Updates/Makefile.am | 3 +- sql/Updates/r1504_scriptdev2.sql | 1 + sql/scriptdev2_script_full.sql | 2 +- 93 files changed, 405 insertions(+), 403 deletions(-) create mode 100644 sql/Updates/r1504_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp index fac55721e..99eb53e98 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp @@ -79,12 +79,12 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI boss_felblood_kaelthasAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; uint32 FireballTimer; uint32 PhoenixTimer; @@ -277,7 +277,7 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI case 0: { // *Heroic mode only: - if (m_bIsHeroicMode) + if (!m_bIsRegularMode) { if (PyroblastTimer < diff) { @@ -291,7 +291,7 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI if (FireballTimer < diff) { - DoCast(m_creature->getVictim(), m_bIsHeroicMode ? SPELL_FIREBALL_HEROIC : SPELL_FIREBALL_NORMAL); + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_FIREBALL_NORMAL : SPELL_FIREBALL_HEROIC); FireballTimer = urand(2000, 6000); }else FireballTimer -= diff; diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp index 892582f3e..8e852678a 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp @@ -90,14 +90,14 @@ struct MANGOS_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI boss_priestess_delrissaAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); memset(&m_auiLackeyGUID, 0, sizeof(m_auiLackeyGUID)); LackeyEntryList.clear(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; std::vector LackeyEntryList; uint64 m_auiLackeyGUID[MAX_ACTIVE_LACKEY]; @@ -261,7 +261,7 @@ struct MANGOS_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI } } - DoCast(target, m_bIsHeroicMode ? SPELL_RENEW_HEROIC : SPELL_RENEW_NORMAL); + DoCast(target, m_bIsRegularMode ? SPELL_RENEW_NORMAL : SPELL_RENEW_HEROIC); RenewTimer = 5000; }else RenewTimer -= diff; @@ -314,7 +314,7 @@ struct MANGOS_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI if (SWPainTimer < diff) { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, m_bIsHeroicMode ? SPELL_SW_PAIN_HEROIC : SPELL_SW_PAIN_NORMAL); + DoCast(pTarget, m_bIsRegularMode ? SPELL_SW_PAIN_NORMAL : SPELL_SW_PAIN_HEROIC); SWPainTimer = 10000; }else SWPainTimer -= diff; diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp index 0de1f4047..5d30ed4f0 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp @@ -54,7 +54,7 @@ struct MANGOS_DLL_DECL boss_selin_fireheartAI : public ScriptedAI boss_selin_fireheartAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Crystals.clear(); //GUIDs per instance is static, so we only need to load them once. @@ -72,7 +72,7 @@ struct MANGOS_DLL_DECL boss_selin_fireheartAI : public ScriptedAI } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; std::list Crystals; @@ -258,7 +258,7 @@ struct MANGOS_DLL_DECL boss_selin_fireheartAI : public ScriptedAI }else DrainLifeTimer -= diff; // Heroic only - if (m_bIsHeroicMode) + if (!m_bIsRegularMode) { if (DrainManaTimer < diff) { @@ -285,10 +285,10 @@ struct MANGOS_DLL_DECL boss_selin_fireheartAI : public ScriptedAI { SelectNearestCrystal(); - if (m_bIsHeroicMode) - DrainCrystalTimer = urand(10000, 15000); - else + if (m_bIsRegularMode) DrainCrystalTimer = urand(20000, 25000); + else + DrainCrystalTimer = urand(10000, 15000); }else DrainCrystalTimer -= diff; } diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp index 299458b57..d853d28ae 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp @@ -62,12 +62,12 @@ struct MANGOS_DLL_DECL boss_vexallusAI : public ScriptedAI boss_vexallusAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; uint32 ChainLightningTimer; uint32 ArcaneShockTimer; @@ -138,25 +138,25 @@ struct MANGOS_DLL_DECL boss_vexallusAI : public ScriptedAI DoScriptText(SAY_ENERGY, m_creature); DoScriptText(EMOTE_DISCHARGE_ENERGY, m_creature); - if (m_bIsHeroicMode) + if (m_bIsRegularMode) + m_creature->CastSpell(m_creature,SPELL_SUMMON_PURE_ENERGY,false); + else { m_creature->CastSpell(m_creature,H_SPELL_SUMMON_PURE_ENERGY1,false); m_creature->CastSpell(m_creature,H_SPELL_SUMMON_PURE_ENERGY2,false); } - else - m_creature->CastSpell(m_creature,SPELL_SUMMON_PURE_ENERGY,false); //below are workaround summons, remove when summoning spells w/implicitTarget 73 implemented in Mangos m_creature->SummonCreature(NPC_PURE_ENERGY, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0); - if (m_bIsHeroicMode) + if (!m_bIsRegularMode) m_creature->SummonCreature(NPC_PURE_ENERGY, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0); } if (ChainLightningTimer < diff) { if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(target, m_bIsHeroicMode ? SPELL_H_CHAIN_LIGHTNING : SPELL_CHAIN_LIGHTNING); + DoCast(target, m_bIsRegularMode ? SPELL_CHAIN_LIGHTNING : SPELL_H_CHAIN_LIGHTNING); ChainLightningTimer = 8000; }else ChainLightningTimer -= diff; @@ -164,7 +164,7 @@ struct MANGOS_DLL_DECL boss_vexallusAI : public ScriptedAI if (ArcaneShockTimer < diff) { if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(target, m_bIsHeroicMode ? SPELL_H_ARCANE_SHOCK : SPELL_ARCANE_SHOCK); + DoCast(target, m_bIsRegularMode ? SPELL_ARCANE_SHOCK : SPELL_H_ARCANE_SHOCK); ArcaneShockTimer = 8000; }else ArcaneShockTimer -= diff; diff --git a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp index 5cf922f4d..8a605d8b8 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp @@ -78,7 +78,7 @@ struct MANGOS_DLL_DECL npc_kalecgosAI : public ScriptedAI { Map* pMap = m_creature->GetMap(); - if (!pMap || pMap->IsRaidOrHeroicDungeon()) + if (!pMap || !pMap->IsRegularDifficulty()) return; Map::PlayerList const &lList = pMap->GetPlayers(); diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp index b6d1204d8..24c48e90f 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp @@ -46,12 +46,12 @@ struct MANGOS_DLL_DECL boss_aeonusAI : public ScriptedAI boss_aeonusAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; uint32 SandBreath_Timer; uint32 TimeStop_Timer; @@ -106,7 +106,7 @@ struct MANGOS_DLL_DECL boss_aeonusAI : public ScriptedAI //Sand Breath if (SandBreath_Timer < diff) { - DoCast(m_creature->getVictim(), m_bIsHeroicMode ? H_SPELL_SAND_BREATH : SPELL_SAND_BREATH); + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_SAND_BREATH : H_SPELL_SAND_BREATH); SandBreath_Timer = urand(15000, 25000); }else SandBreath_Timer -= diff; diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp index cd7c993a3..c889bcc1f 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp @@ -43,12 +43,12 @@ struct MANGOS_DLL_DECL boss_chrono_lord_dejaAI : public ScriptedAI boss_chrono_lord_dejaAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; uint32 ArcaneBlast_Timer; uint32 TimeLapse_Timer; @@ -105,7 +105,7 @@ struct MANGOS_DLL_DECL boss_chrono_lord_dejaAI : public ScriptedAI //Arcane Blast if (ArcaneBlast_Timer < diff) { - DoCast(m_creature->getVictim(), m_bIsHeroicMode ? H_SPELL_ARCANE_BLAST : SPELL_ARCANE_BLAST); + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_ARCANE_BLAST : H_SPELL_ARCANE_BLAST); ArcaneBlast_Timer = urand(15000, 25000); }else ArcaneBlast_Timer -= diff; @@ -113,7 +113,7 @@ struct MANGOS_DLL_DECL boss_chrono_lord_dejaAI : public ScriptedAI if (ArcaneDischarge_Timer < diff) { Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0); - DoCast(target, m_bIsHeroicMode ? H_SPELL_ARCANE_DISCHARGE : SPELL_ARCANE_DISCHARGE); + DoCast(target, m_bIsRegularMode ? SPELL_ARCANE_DISCHARGE : H_SPELL_ARCANE_DISCHARGE); ArcaneDischarge_Timer = urand(20000, 30000); }else ArcaneDischarge_Timer -= diff; @@ -125,7 +125,7 @@ struct MANGOS_DLL_DECL boss_chrono_lord_dejaAI : public ScriptedAI TimeLapse_Timer = urand(15000, 25000); }else TimeLapse_Timer -= diff; - if (m_bIsHeroicMode) + if (!m_bIsRegularMode) { if (Attraction_Timer < diff) { diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp index 559ea56ba..a84bded5c 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp @@ -42,12 +42,12 @@ struct MANGOS_DLL_DECL boss_temporusAI : public ScriptedAI boss_temporusAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; uint32 Haste_Timer; uint32 SpellReflection_Timer; @@ -118,11 +118,11 @@ struct MANGOS_DLL_DECL boss_temporusAI : public ScriptedAI //Wing ruffet if (WingBuffet_Timer < diff) { - DoCast(m_creature, m_bIsHeroicMode ? H_SPELL_WING_BUFFET : SPELL_WING_BUFFET); + DoCast(m_creature, m_bIsRegularMode ? SPELL_WING_BUFFET : H_SPELL_WING_BUFFET); WingBuffet_Timer = urand(20000, 30000); }else WingBuffet_Timer -= diff; - if (m_bIsHeroicMode) + if (!m_bIsRegularMode) { if (SpellReflection_Timer < diff) { diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp index 2cacb3384..3ff6d2d1a 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp @@ -53,12 +53,12 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI boss_jedogaAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; void Reset() { diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp index e779b7adb..dd1ddc161 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp @@ -101,12 +101,12 @@ struct MANGOS_DLL_DECL boss_nadoxAI : public ScriptedAI boss_nadoxAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; bool m_bBerserk; uint8 m_uiGuardianCount; @@ -193,14 +193,14 @@ struct MANGOS_DLL_DECL boss_nadoxAI : public ScriptedAI if (m_uiBroodPlagueTimer < uiDiff) { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, m_bIsHeroicMode?SPELL_BROOD_PLAGUE_H:SPELL_BROOD_PLAGUE); + DoCast(pTarget, m_bIsRegularMode ? SPELL_BROOD_PLAGUE : SPELL_BROOD_PLAGUE_H); m_uiBroodPlagueTimer = 20000; } else m_uiBroodPlagueTimer -= uiDiff; - if(m_bIsHeroicMode) + if(!m_bIsRegularMode) { if (m_uiBroodRageTimer < uiDiff) { diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp index d7b6a6298..ed31cd06c 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp @@ -46,12 +46,12 @@ struct MANGOS_DLL_DECL boss_taldaramAI : public ScriptedAI boss_taldaramAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; void Reset() { diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp index e37e97288..a2dd6cdcb 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp @@ -44,12 +44,12 @@ struct MANGOS_DLL_DECL boss_volazjAI : public ScriptedAI boss_volazjAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; void Reset() { diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp index a3fd6825f..3d4b58749 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp @@ -48,12 +48,12 @@ struct MANGOS_DLL_DECL boss_anubarakAI : public ScriptedAI boss_anubarakAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; void Reset() { diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp index 0b786995c..e15b797c0 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp @@ -38,12 +38,12 @@ struct MANGOS_DLL_DECL boss_hadronoxAI : public ScriptedAI boss_hadronoxAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; void Reset() { diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp index a6c072cdd..b99a1183d 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp @@ -51,12 +51,12 @@ struct MANGOS_DLL_DECL boss_krikthirAI : public ScriptedAI boss_krikthirAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; void Reset() { diff --git a/scripts/northrend/draktharon_keep/boss_novos.cpp b/scripts/northrend/draktharon_keep/boss_novos.cpp index 8a8a4203b..ca3a213ad 100644 --- a/scripts/northrend/draktharon_keep/boss_novos.cpp +++ b/scripts/northrend/draktharon_keep/boss_novos.cpp @@ -44,12 +44,12 @@ struct MANGOS_DLL_DECL boss_novosAI : public ScriptedAI boss_novosAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; void Reset() { diff --git a/scripts/northrend/draktharon_keep/boss_tharonja.cpp b/scripts/northrend/draktharon_keep/boss_tharonja.cpp index 19f4c7ae4..ca22ce26c 100644 --- a/scripts/northrend/draktharon_keep/boss_tharonja.cpp +++ b/scripts/northrend/draktharon_keep/boss_tharonja.cpp @@ -44,12 +44,12 @@ struct MANGOS_DLL_DECL boss_tharonjaAI : public ScriptedAI boss_tharonjaAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; void Reset() { diff --git a/scripts/northrend/draktharon_keep/boss_trollgore.cpp b/scripts/northrend/draktharon_keep/boss_trollgore.cpp index 9f1a0c762..e65c716fa 100644 --- a/scripts/northrend/draktharon_keep/boss_trollgore.cpp +++ b/scripts/northrend/draktharon_keep/boss_trollgore.cpp @@ -41,12 +41,12 @@ struct MANGOS_DLL_DECL boss_trollgoreAI : public ScriptedAI boss_trollgoreAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; void Reset() { diff --git a/scripts/northrend/gundrak/boss_colossus.cpp b/scripts/northrend/gundrak/boss_colossus.cpp index 8bf6bfbbd..796be767b 100644 --- a/scripts/northrend/gundrak/boss_colossus.cpp +++ b/scripts/northrend/gundrak/boss_colossus.cpp @@ -39,12 +39,12 @@ struct MANGOS_DLL_DECL boss_colossusAI : public ScriptedAI boss_colossusAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; void Reset() { diff --git a/scripts/northrend/gundrak/boss_galdarah.cpp b/scripts/northrend/gundrak/boss_galdarah.cpp index 45c71dbd2..8558187ff 100644 --- a/scripts/northrend/gundrak/boss_galdarah.cpp +++ b/scripts/northrend/gundrak/boss_galdarah.cpp @@ -46,12 +46,12 @@ struct MANGOS_DLL_DECL boss_galdarahAI : public ScriptedAI boss_galdarahAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; void Reset() { diff --git a/scripts/northrend/gundrak/boss_moorabi.cpp b/scripts/northrend/gundrak/boss_moorabi.cpp index 5c0719e3b..be72a1391 100644 --- a/scripts/northrend/gundrak/boss_moorabi.cpp +++ b/scripts/northrend/gundrak/boss_moorabi.cpp @@ -46,12 +46,12 @@ struct MANGOS_DLL_DECL boss_moorabiAI : public ScriptedAI boss_moorabiAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; void Reset() { diff --git a/scripts/northrend/gundrak/boss_sladran.cpp b/scripts/northrend/gundrak/boss_sladran.cpp index a07e10496..521ef1908 100644 --- a/scripts/northrend/gundrak/boss_sladran.cpp +++ b/scripts/northrend/gundrak/boss_sladran.cpp @@ -44,12 +44,12 @@ struct MANGOS_DLL_DECL boss_sladranAI : public ScriptedAI boss_sladranAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; void Reset() { diff --git a/scripts/northrend/gundrak/instance_gundrak.cpp b/scripts/northrend/gundrak/instance_gundrak.cpp index 6b0407f71..bb5f0e22d 100644 --- a/scripts/northrend/gundrak/instance_gundrak.cpp +++ b/scripts/northrend/gundrak/instance_gundrak.cpp @@ -98,7 +98,7 @@ struct MANGOS_DLL_DECL instance_gundrak : public ScriptedInstance { case GO_ECK_DOOR: m_uiEckDoorGUID = pGo->GetGUID(); - if ((m_auiEncounter[1] == DONE) && instance->IsRaidOrHeroicDungeon()) + if ((m_auiEncounter[1] == DONE) && !instance->IsRegularDifficulty()) DoUseDoorOrButton(m_uiEckDoorGUID); break; case GO_ECK_UNDERWATER_DOOR: @@ -174,7 +174,7 @@ struct MANGOS_DLL_DECL instance_gundrak : public ScriptedInstance m_auiEncounter[1] = uiData; if (uiData == DONE) { - if (instance->IsRaidOrHeroicDungeon()) + if (!instance->IsRegularDifficulty()) DoUseDoorOrButton(m_uiEckDoorGUID); if (GameObject* pGo = instance->GetGameObject(m_uiAltarOfMoorabiGUID)) pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); diff --git a/scripts/northrend/naxxramas/boss_anubrekhan.cpp b/scripts/northrend/naxxramas/boss_anubrekhan.cpp index 4a49b66e8..cbebb1751 100644 --- a/scripts/northrend/naxxramas/boss_anubrekhan.cpp +++ b/scripts/northrend/naxxramas/boss_anubrekhan.cpp @@ -67,7 +67,7 @@ struct MANGOS_DLL_DECL boss_anubrekhanAI : public ScriptedAI boss_anubrekhanAI(Creature *c) : ScriptedAI(c) { pInstance = ((ScriptedInstance*)c->GetInstanceData()); - Heroic = c->GetMap()->IsRaidOrHeroicDungeon(); + Regular = c->GetMap()->IsRegularDifficulty(); for (int i = 0; i < MAX_CRYPT_GUARDS; i++) guidCryptGuards[i] = 0; @@ -76,7 +76,7 @@ struct MANGOS_DLL_DECL boss_anubrekhanAI : public ScriptedAI } ScriptedInstance *pInstance; - bool Heroic; + bool Regular; uint32 Impale_Timer; uint32 LocustSwarm_Timer; @@ -260,9 +260,9 @@ struct MANGOS_DLL_DECL boss_anubrekhanAI : public ScriptedAI { //Cast Impale on a random target //Do NOT cast it when we are afflicted by locust swarm - if (!m_creature->HasAura(Heroic ? H_SPELL_LOCUSTSWARM : SPELL_LOCUSTSWARM, 1)) + if (!m_creature->HasAura(Regular ? H_SPELL_LOCUSTSWARM : SPELL_LOCUSTSWARM, 1)) if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1)) - DoCast(target,Heroic ? H_SPELL_IMPALE : SPELL_IMPALE); + DoCast(target,Regular ? H_SPELL_IMPALE : SPELL_IMPALE); Impale_Timer = 15000; }else Impale_Timer -= diff; @@ -270,7 +270,7 @@ struct MANGOS_DLL_DECL boss_anubrekhanAI : public ScriptedAI if (LocustSwarm_Timer < diff) { //Cast Locust Swarm buff on ourselves - DoCast(m_creature, Heroic ? H_SPELL_LOCUSTSWARM : SPELL_LOCUSTSWARM); + DoCast(m_creature, Regular ? H_SPELL_LOCUSTSWARM : SPELL_LOCUSTSWARM); swarm = true; //Summon Crypt Guard immidietly after Locust Swarm if (CryptGuard_count < MAX_CRYPT_GUARDS) diff --git a/scripts/northrend/naxxramas/boss_four_horsemen.cpp b/scripts/northrend/naxxramas/boss_four_horsemen.cpp index c4d5511c4..708351177 100644 --- a/scripts/northrend/naxxramas/boss_four_horsemen.cpp +++ b/scripts/northrend/naxxramas/boss_four_horsemen.cpp @@ -50,12 +50,12 @@ struct MANGOS_DLL_DECL boss_lady_blaumeuxAI : public ScriptedAI { boss_lady_blaumeuxAI(Creature* pCreature) : ScriptedAI(pCreature) { - Heroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + Regular = pCreature->GetMap()->IsRegularDifficulty(); pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Reset(); } - bool Heroic; + bool Regular; ScriptedInstance *pInstance; uint32 Mark_Timer; uint32 VoidZone_Timer; @@ -126,14 +126,14 @@ struct MANGOS_DLL_DECL boss_lady_blaumeuxAI : public ScriptedAI if(VoidZone_Timer < diff) { Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); - if(target) DoCast(target, Heroic ? H_SPELL_VOIDZONE : SPELL_VOIDZONE); + if(target) DoCast(target, Regular ? H_SPELL_VOIDZONE : SPELL_VOIDZONE); VoidZone_Timer = 12000; } else VoidZone_Timer -= diff; if(ShadowboltTimer < diff) { - DoCast(m_creature->getVictim(), Heroic ? H_SPELL_SHADOW_BOLT : SPELL_SHADOW_BOLT); + DoCast(m_creature->getVictim(), Regular ? H_SPELL_SHADOW_BOLT : SPELL_SHADOW_BOLT); ShadowboltTimer = 3000; } else ShadowboltTimer -= diff; @@ -169,12 +169,12 @@ struct MANGOS_DLL_DECL boss_rivendare_naxxAI : public ScriptedAI { boss_rivendare_naxxAI(Creature* pCreature) : ScriptedAI(pCreature) { - Heroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + Regular = pCreature->GetMap()->IsRegularDifficulty(); pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Reset(); } - bool Heroic; + bool Regular; ScriptedInstance *pInstance; uint32 UnholyShadowTimer; uint32 Mark_Timer; @@ -246,7 +246,7 @@ struct MANGOS_DLL_DECL boss_rivendare_naxxAI : public ScriptedAI //Unholy Shadow if(UnholyShadowTimer < diff) { - DoCast(m_creature->getVictim(), Heroic ? H_SPELL_UNHOLY_SHADOW : SPELL_UNHOLY_SHADOW); + DoCast(m_creature->getVictim(), Regular ? H_SPELL_UNHOLY_SHADOW : SPELL_UNHOLY_SHADOW); UnholyShadowTimer = 15000; } else UnholyShadowTimer -= diff; @@ -279,12 +279,12 @@ struct MANGOS_DLL_DECL boss_thane_korthazzAI : public ScriptedAI { boss_thane_korthazzAI(Creature* pCreature) : ScriptedAI(pCreature) { - Heroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + Regular = pCreature->GetMap()->IsRegularDifficulty(); pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Reset(); } - bool Heroic; + bool Regular; ScriptedInstance *pInstance; uint32 Mark_Timer; uint32 Meteor_Timer; @@ -351,7 +351,7 @@ struct MANGOS_DLL_DECL boss_thane_korthazzAI : public ScriptedAI // Meteor if (Meteor_Timer < diff) { - DoCast(m_creature->getVictim(), Heroic ? H_SPELL_METEOR : SPELL_METEOR); + DoCast(m_creature->getVictim(), Regular ? H_SPELL_METEOR : SPELL_METEOR); Meteor_Timer = 25000; } else Meteor_Timer -= diff; @@ -386,12 +386,12 @@ struct MANGOS_DLL_DECL boss_sir_zeliekAI : public ScriptedAI { boss_sir_zeliekAI(Creature* pCreature) : ScriptedAI(pCreature) { - Heroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + Regular = pCreature->GetMap()->IsRegularDifficulty(); pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Reset(); } - bool Heroic; + bool Regular; ScriptedInstance *pInstance; uint32 Mark_Timer; uint32 HolyWrath_Timer; @@ -461,14 +461,14 @@ struct MANGOS_DLL_DECL boss_sir_zeliekAI : public ScriptedAI // Holy Wrath if(HolyWrath_Timer < diff) { - DoCast(m_creature->getVictim(),Heroic ? H_SPELL_HOLY_WRATH : SPELL_HOLY_WRATH); + DoCast(m_creature->getVictim(),Regular ? H_SPELL_HOLY_WRATH : SPELL_HOLY_WRATH); HolyWrath_Timer = 12000; } else HolyWrath_Timer -= diff; if(HolyBoltTimer < diff) { - DoCast(m_creature->getVictim(), Heroic ? H_SPELL_HOLY_BOLT : SPELL_HOLY_BOLT); + DoCast(m_creature->getVictim(), Regular ? H_SPELL_HOLY_BOLT : SPELL_HOLY_BOLT); HolyBoltTimer = 3000; } else HolyBoltTimer -= diff; diff --git a/scripts/northrend/naxxramas/boss_gluth.cpp b/scripts/northrend/naxxramas/boss_gluth.cpp index e2fe6d139..84032fb44 100644 --- a/scripts/northrend/naxxramas/boss_gluth.cpp +++ b/scripts/northrend/naxxramas/boss_gluth.cpp @@ -78,14 +78,14 @@ struct MANGOS_DLL_DECL boss_gluthAI : public ScriptedAI boss_gluthAI(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Heroic = m_creature->GetMap()->IsRaidOrHeroicDungeon(); + Regular = m_creature->GetMap()->IsRegularDifficulty(); Reset(); } std::vector addsGuid; ScriptedInstance* pInstance; - bool Heroic; + bool Regular; uint32 MortalWound_Timer; uint32 Decimate_Timer; @@ -147,7 +147,7 @@ struct MANGOS_DLL_DECL boss_gluthAI : public ScriptedAI //Enrage_Timer if (Enrage_Timer < diff) { - DoCast(m_creature, Heroic ? SPELL_ENRAGE_H : SPELL_ENRAGE); + DoCast(m_creature, Regular ? SPELL_ENRAGE_H : SPELL_ENRAGE); Enrage_Timer = 60000; }else Enrage_Timer -= diff; @@ -161,7 +161,7 @@ struct MANGOS_DLL_DECL boss_gluthAI : public ScriptedAI addsGuid.push_back(pZombie->GetGUID()); } - if (Heroic) + if (Regular) { if (Creature* pZombie = m_creature->SummonCreature(NPC_ZOMBIE_CHOW,ADD_1X,ADD_1Y,ADD_1Z,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000)) { diff --git a/scripts/northrend/naxxramas/boss_gothik.cpp b/scripts/northrend/naxxramas/boss_gothik.cpp index 3c4b29b9d..72d9cee8c 100644 --- a/scripts/northrend/naxxramas/boss_gothik.cpp +++ b/scripts/northrend/naxxramas/boss_gothik.cpp @@ -87,9 +87,9 @@ struct MANGOS_DLL_DECL boss_gothikAI : public ScriptedAI boss_gothikAI(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Heroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + Regular = pCreature->GetMap()->IsRegularDifficulty(); - trainees = Heroic ? 3 : 2; + trainees = Regular ? 3 : 2; LiveX[0]=2669.430176; LiveY[0]=-3430.828613; LiveZ[0]=268.563049; LiveX[1]=2692.187988; LiveY[1]=-3431.384277; LiveZ[1]=268.563538; @@ -103,7 +103,7 @@ struct MANGOS_DLL_DECL boss_gothikAI : public ScriptedAI float LiveY[3]; float LiveZ[3]; - bool Heroic; + bool Regular; uint32 phase; uint32 Phase_Timer; uint32 Shadowbolt_Timer; @@ -244,7 +244,7 @@ struct MANGOS_DLL_DECL boss_gothikAI : public ScriptedAI //cast shadowbolts if(Shadowbolt_Timer < diff) { - DoCast(m_creature->getVictim(), Heroic ? H_SP_SHADOWBOLT : SP_SHADOWBOLT); + DoCast(m_creature->getVictim(), Regular ? H_SP_SHADOWBOLT : SP_SHADOWBOLT); Shadowbolt_Timer = 1200; } else Shadowbolt_Timer -= diff; @@ -262,7 +262,7 @@ struct MANGOS_DLL_DECL boss_gothikAI : public ScriptedAI { if(Shadowbolt_Timer < diff) { - DoCast(m_creature->getVictim(), Heroic ? H_SP_SHADOWBOLT : SP_SHADOWBOLT); + DoCast(m_creature->getVictim(), Regular ? H_SP_SHADOWBOLT : SP_SHADOWBOLT); Shadowbolt_Timer = 1200; } else Shadowbolt_Timer -= diff; @@ -279,11 +279,11 @@ struct MANGOS_DLL_DECL mob_gothik_trainee_addAI : public ScriptedAI { mob_gothik_trainee_addAI(Creature* pCreature) : ScriptedAI(pCreature) { - Heroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + Regular = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - bool Heroic; + bool Regular; float UndeadX[5]; float UndeadY[5]; float UndeadZ[5]; @@ -306,7 +306,7 @@ struct MANGOS_DLL_DECL mob_gothik_trainee_addAI : public ScriptedAI void JustDied(Unit *killer) { //if unrelenting trainee then spawn spectral trainee - if(m_creature->GetEntry()==CR_UN_TRAINEE) //maybe need check heroic entry too + if(m_creature->GetEntry()==CR_UN_TRAINEE) //maybe need check Regular entry too { int i = irand(0,5); Unit *mob = m_creature->SummonCreature(CR_SP_TRAINEE, UndeadX[i], UndeadY[i], UndeadZ[i], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); @@ -323,7 +323,7 @@ struct MANGOS_DLL_DECL mob_gothik_trainee_addAI : public ScriptedAI { if(PlagueTimer < diff) { - DoCast(m_creature->getVictim(), Heroic ? H_SP_DEATH_PLAGUE : SP_DEATH_PLAGUE); + DoCast(m_creature->getVictim(), Regular ? H_SP_DEATH_PLAGUE : SP_DEATH_PLAGUE); PlagueTimer = 3500; } PlagueTimer -= diff; @@ -332,7 +332,7 @@ struct MANGOS_DLL_DECL mob_gothik_trainee_addAI : public ScriptedAI { if(ExplosionTimer < diff) { - DoCast(m_creature, Heroic ? H_SP_EXPLOSION : SP_EXPLOSION); + DoCast(m_creature, Regular ? H_SP_EXPLOSION : SP_EXPLOSION); ExplosionTimer = 5000+rand()%10000; } ExplosionTimer -= diff; @@ -410,11 +410,11 @@ struct MANGOS_DLL_DECL mob_gothik_rider_addAI : public ScriptedAI { mob_gothik_rider_addAI(Creature* pCreature) : ScriptedAI(pCreature) { - Heroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + Regular = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - bool Heroic; + bool Regular; uint32 VolleyTimer; uint32 DrainTimer; //uint32 FrenzyTimer; @@ -442,7 +442,7 @@ struct MANGOS_DLL_DECL mob_gothik_rider_addAI : public ScriptedAI void JustDied(Unit *killer) { //if unrelenting rider then spawn spectral rider - if(m_creature->GetEntry()==CR_UN_RIDER) //maybe need check heroic entry too + if(m_creature->GetEntry()==CR_UN_RIDER) //maybe need check Regular entry too { int i = irand(0,5); Unit *mob = m_creature->SummonCreature(CR_SP_RIDER, UndeadX[i], UndeadY[i], UndeadZ[i], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); @@ -466,9 +466,9 @@ struct MANGOS_DLL_DECL mob_gothik_rider_addAI : public ScriptedAI { target = Unit::GetUnit((*m_creature),(*i)->getUnitGuid()); if(target && target->isAlive() && target->HasAura(SP_SHADOW_MARK)) - DoCast(target, Heroic ? H_SP_SHADOW_VOLLEY : SP_SHADOW_VOLLEY); + DoCast(target, Regular ? H_SP_SHADOW_VOLLEY : SP_SHADOW_VOLLEY); }*/ - DoCast(m_creature->getVictim(), Heroic ? H_SP_SHADOW_VOLLEY : SP_SHADOW_VOLLEY); + DoCast(m_creature->getVictim(), Regular ? H_SP_SHADOW_VOLLEY : SP_SHADOW_VOLLEY); VolleyTimer = 10000+rand()%10000; } else VolleyTimer -= diff; @@ -478,7 +478,7 @@ struct MANGOS_DLL_DECL mob_gothik_rider_addAI : public ScriptedAI if(DrainTimer < diff) { Unit *target = SelectUnit(SELECT_TARGET_TOPAGGRO, 0); - if(target) DoCast(target, Heroic ? H_SP_DRAIN_LIFE : SP_DRAIN_LIFE); + if(target) DoCast(target, Regular ? H_SP_DRAIN_LIFE : SP_DRAIN_LIFE); DrainTimer = 10000+rand()%10000; } else DrainTimer -= diff; diff --git a/scripts/northrend/naxxramas/boss_kelthuzad.cpp b/scripts/northrend/naxxramas/boss_kelthuzad.cpp index 3382205ca..388536023 100644 --- a/scripts/northrend/naxxramas/boss_kelthuzad.cpp +++ b/scripts/northrend/naxxramas/boss_kelthuzad.cpp @@ -51,14 +51,14 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI boss_kelthuzadAI(Creature* c) : ScriptedAI(c) { pInstance = (ScriptedInstance*)c->GetInstanceData(); - Heroic = m_creature->GetMap()->IsRaidOrHeroicDungeon(); - MaxGuardians = Heroic ? 4 : 2; + Regular = m_creature->GetMap()->IsRegularDifficulty(); + MaxGuardians = Regular ? 4 : 2; Reset(); } //Variables ScriptedInstance* pInstance; - bool Heroic; + bool Regular; uint32 phase; uint32 Phase1_Timer; // @@ -182,7 +182,7 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0); mob->AddThreat(target, 1.0f); mob->GetMotionMaster()->MoveChase(target); - Abomination_Timer = Heroic ? (30000+rand()%15000) : (40000+rand()%15000); + Abomination_Timer = Regular ? (30000+rand()%15000) : (40000+rand()%15000); } else Abomination_Timer -= diff; @@ -193,7 +193,7 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0); mob->AddThreat(target, 1.0f); mob->GetMotionMaster()->MoveChase(target); - Banshee_Timer = Heroic ? (17000+rand()%10000) : (20000+rand()%15000); + Banshee_Timer = Regular ? (17000+rand()%10000) : (20000+rand()%15000); } else Banshee_Timer -= diff; } @@ -203,7 +203,7 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI //Frostbolt Volley if(FrostboltV_Timer < diff) { - DoCast(m_creature->getVictim(), Heroic ? H_SP_FROSTBOLT_VOLLEY : SP_FROSTBOLT_VOLLEY); + DoCast(m_creature->getVictim(), Regular ? H_SP_FROSTBOLT_VOLLEY : SP_FROSTBOLT_VOLLEY); FrostboltV_Timer = 15000 + rand()%5000; } else FrostboltV_Timer -= diff; @@ -237,7 +237,7 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI //Frostbolt if(Frostbolt_Timer < diff) { - DoCast(m_creature->getVictim(), Heroic ? H_SP_FROSTBOLT : SP_FROSTBOLT); + DoCast(m_creature->getVictim(), Regular ? H_SP_FROSTBOLT : SP_FROSTBOLT); Frostbolt_Timer = 5000 + rand()%10000; } else Frostbolt_Timer -= diff; diff --git a/scripts/northrend/naxxramas/boss_maexxna.cpp b/scripts/northrend/naxxramas/boss_maexxna.cpp index cbfa12cbc..d4a213aa4 100644 --- a/scripts/northrend/naxxramas/boss_maexxna.cpp +++ b/scripts/northrend/naxxramas/boss_maexxna.cpp @@ -93,12 +93,12 @@ struct MANGOS_DLL_DECL boss_maexxnaAI : public ScriptedAI boss_maexxnaAI(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); - Heroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + Regular = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance *pInstance; - bool Heroic; + bool Regular; uint32 WebTrap_Timer; uint32 WebSpray_Timer; uint32 PoisonShock_Timer; @@ -196,21 +196,21 @@ struct MANGOS_DLL_DECL boss_maexxnaAI : public ScriptedAI //WebSpray_Timer if (WebSpray_Timer < diff) { - DoCast(m_creature->getVictim(), Heroic ? H_SPELL_WEBSPRAY : SPELL_WEBSPRAY); + DoCast(m_creature->getVictim(), Regular ? H_SPELL_WEBSPRAY : SPELL_WEBSPRAY); WebSpray_Timer = 40000; }else WebSpray_Timer -= diff; //PoisonShock_Timer if (PoisonShock_Timer < diff) { - DoCast(m_creature->getVictim(), Heroic ? H_SPELL_POISONSHOCK : SPELL_POISONSHOCK); + DoCast(m_creature->getVictim(), Regular ? H_SPELL_POISONSHOCK : SPELL_POISONSHOCK); PoisonShock_Timer = 20000; }else PoisonShock_Timer -= diff; //NecroticPoison_Timer if (NecroticPoison_Timer < diff) { - DoCast(m_creature->getVictim(), Heroic ? H_SPELL_NECROTICPOISON : SPELL_NECROTICPOISON); + DoCast(m_creature->getVictim(), Regular ? H_SPELL_NECROTICPOISON : SPELL_NECROTICPOISON); NecroticPoison_Timer = 30000; }else NecroticPoison_Timer -= diff; @@ -224,7 +224,7 @@ struct MANGOS_DLL_DECL boss_maexxnaAI : public ScriptedAI //Enrage if not already enraged and below 30% if (!Enraged && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 30) { - DoCast(m_creature, Heroic ? H_SPELL_FRENZY : SPELL_FRENZY); + DoCast(m_creature, Regular ? H_SPELL_FRENZY : SPELL_FRENZY); Enraged = true; } diff --git a/scripts/northrend/naxxramas/boss_noth.cpp b/scripts/northrend/naxxramas/boss_noth.cpp index a91b62cd9..d11644975 100644 --- a/scripts/northrend/naxxramas/boss_noth.cpp +++ b/scripts/northrend/naxxramas/boss_noth.cpp @@ -58,14 +58,14 @@ struct MANGOS_DLL_DECL boss_nothAI : public ScriptedAI boss_nothAI(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Heroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); - AddsCount = Heroic ? 3 : 2; //normal phase - BalconyAddsCount = Heroic ? 4 : 2; //balcony phase + Regular = pCreature->GetMap()->IsRegularDifficulty(); + AddsCount = Regular ? 3 : 2; //normal phase + BalconyAddsCount = Regular ? 4 : 2; //balcony phase Reset(); } ScriptedInstance* pInstance; - bool Heroic; + bool Regular; uint32 BlinkTimer; uint32 CurseTimer; @@ -170,7 +170,7 @@ struct MANGOS_DLL_DECL boss_nothAI : public ScriptedAI if (BlinkTimer < diff) { DoCast(m_creature->getVictim(),SPELL_CRIPPLE); - if(Heroic) + if(Regular) { DoCast(m_creature, SPELL_BLINK); DoResetThreat(); diff --git a/scripts/northrend/naxxramas/boss_patchwerk.cpp b/scripts/northrend/naxxramas/boss_patchwerk.cpp index 90d7924bb..ce9e78b56 100644 --- a/scripts/northrend/naxxramas/boss_patchwerk.cpp +++ b/scripts/northrend/naxxramas/boss_patchwerk.cpp @@ -41,11 +41,11 @@ struct MANGOS_DLL_DECL boss_patchwerkAI : public ScriptedAI { boss_patchwerkAI(Creature* pCreature) : ScriptedAI(pCreature) { - Heroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + Regular = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - bool Heroic; + bool Regular; uint32 HatefullStrike_Timer; uint32 Enrage_Timer; uint32 Slimebolt_Timer; @@ -106,7 +106,7 @@ struct MANGOS_DLL_DECL boss_patchwerkAI : public ScriptedAI } if (pMostHPTarget) - DoCast(pMostHPTarget, Heroic ? H_SPELL_HATEFULSTRIKE : SPELL_HATEFULSTRIKE); + DoCast(pMostHPTarget, Regular ? H_SPELL_HATEFULSTRIKE : SPELL_HATEFULSTRIKE); HatefullStrike_Timer = 1200; }else HatefullStrike_Timer -= diff; diff --git a/scripts/northrend/naxxramas/boss_razuvious.cpp b/scripts/northrend/naxxramas/boss_razuvious.cpp index b66c60b73..79e6f6735 100644 --- a/scripts/northrend/naxxramas/boss_razuvious.cpp +++ b/scripts/northrend/naxxramas/boss_razuvious.cpp @@ -49,12 +49,12 @@ struct MANGOS_DLL_DECL boss_razuviousAI : public ScriptedAI boss_razuviousAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; uint32 m_uiUnbalancingStrikeTimer; uint32 m_uiDisruptingShoutTimer; @@ -119,7 +119,7 @@ struct MANGOS_DLL_DECL boss_razuviousAI : public ScriptedAI // Disrupting Shout if (m_uiDisruptingShoutTimer < uiDiff) { - DoCast(m_creature->getVictim(), m_bIsHeroicMode ? SPELL_DISRUPTING_SHOUT_H : SPELL_DISRUPTING_SHOUT); + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_DISRUPTING_SHOUT_H : SPELL_DISRUPTING_SHOUT); m_uiDisruptingShoutTimer = 25000; } else diff --git a/scripts/northrend/naxxramas/boss_sapphiron.cpp b/scripts/northrend/naxxramas/boss_sapphiron.cpp index acc554904..82d94e596 100644 --- a/scripts/northrend/naxxramas/boss_sapphiron.cpp +++ b/scripts/northrend/naxxramas/boss_sapphiron.cpp @@ -43,11 +43,11 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI { boss_sapphironAI(Creature* pCreature) : ScriptedAI(pCreature) { - Heroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + Regular = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - bool Heroic; + bool Regular; uint32 Icebolt_Count; uint32 Icebolt_Timer; @@ -91,7 +91,7 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI { if (FrostAura_Timer < diff) { - DoCast(m_creature->getVictim(), Heroic ? H_SPELL_FROST_AURA : SPELL_FROST_AURA); + DoCast(m_creature->getVictim(), Regular ? H_SPELL_FROST_AURA : SPELL_FROST_AURA); FrostAura_Timer = 5000; } else FrostAura_Timer -= diff; @@ -99,7 +99,7 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI if (LifeDrain_Timer < diff) { if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(target, Heroic ? H_SPELL_LIFE_DRAIN : SPELL_LIFE_DRAIN); + DoCast(target, Regular ? H_SPELL_LIFE_DRAIN : SPELL_LIFE_DRAIN); LifeDrain_Timer = 24000; } @@ -108,7 +108,7 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI if (Blizzard_Timer < diff) { if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(target, Heroic ? H_SPELL_BLIZZARD : SPELL_BLIZZARD); + DoCast(target, Regular ? H_SPELL_BLIZZARD : SPELL_BLIZZARD); Blizzard_Timer = 20000; } @@ -116,7 +116,7 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI if(TailSweep_Timer < diff) { - DoCast(m_creature->getVictim(), Heroic ? H_SPELL_TAIL_SWEEP : SPELL_TAIL_SWEEP); + DoCast(m_creature->getVictim(), Regular ? H_SPELL_TAIL_SWEEP : SPELL_TAIL_SWEEP); TailSweep_Timer = 10000 + rand()%10000; } else TailSweep_Timer -= diff; diff --git a/scripts/northrend/naxxramas/instance_naxxramas.cpp b/scripts/northrend/naxxramas/instance_naxxramas.cpp index c6ac2fb03..16a543388 100644 --- a/scripts/northrend/naxxramas/instance_naxxramas.cpp +++ b/scripts/northrend/naxxramas/instance_naxxramas.cpp @@ -24,7 +24,7 @@ struct MANGOS_DLL_DECL instance_naxxramas : public ScriptedInstance { instance_naxxramas(Map *Map) : ScriptedInstance(Map) { - Heroic = Map->GetSpawnMode() > 0; + Regular = Map->IsRegularDifficulty(); Initialize(); }; @@ -33,7 +33,7 @@ struct MANGOS_DLL_DECL instance_naxxramas : public ScriptedInstance uint32 mEncounter[ENCOUNTERS]; uint32 mHorsemen[4]; - bool Heroic; + bool Regular; //Bosses and other NPC's uint64 mFaerlinaGUID; //Doors and other GO's @@ -117,8 +117,8 @@ struct MANGOS_DLL_DECL instance_naxxramas : public ScriptedInstance case GO_MILI_GOTH_EXIT_GATE: mGothikExitDoorGUID = pGo->GetGUID(); break; case GO_MILI_GOTH_COMBAT_GATE: mGothikCombatDoorGUID = pGo->GetGUID(); break; case GO_CONS_GLUT_EXIT_DOOR: mGluthDoorGUID = pGo->GetGUID(); break; - case GO_CHEST_HORSEMEN_NORM: if(!Heroic) mHorsemenChestGUID = pGo->GetGUID(); break; - case GO_CHEST_HORSEMEN_HERO: if(Heroic) mHorsemenChestGUID = pGo->GetGUID(); break; + case GO_CHEST_HORSEMEN_NORM: if(!Regular) mHorsemenChestGUID = pGo->GetGUID(); break; + case GO_CHEST_HORSEMEN_HERO: if(Regular) mHorsemenChestGUID = pGo->GetGUID(); break; case GO_MILI_HORSEMEN_DOOR: mHorsemenDoorGUID = pGo->GetGUID(); break; } } diff --git a/scripts/northrend/nexus/nexus/boss_anomalus.cpp b/scripts/northrend/nexus/nexus/boss_anomalus.cpp index e79d41f5f..d8b0011f8 100644 --- a/scripts/northrend/nexus/nexus/boss_anomalus.cpp +++ b/scripts/northrend/nexus/nexus/boss_anomalus.cpp @@ -65,12 +65,12 @@ struct MANGOS_DLL_DECL boss_anomalusAI : public ScriptedAI boss_anomalusAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; uint32 m_uiSparkTimer; uint32 m_uiCreateRiftTimer; @@ -172,7 +172,7 @@ struct MANGOS_DLL_DECL boss_anomalusAI : public ScriptedAI if (m_uiSparkTimer < uiDiff) { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, m_bIsHeroicMode?SPELL_SPARK_H:SPELL_SPARK); + DoCast(pTarget, m_bIsRegularMode ? SPELL_SPARK : SPELL_SPARK_H); m_uiSparkTimer = 5000; } diff --git a/scripts/northrend/nexus/nexus/boss_keristrasza.cpp b/scripts/northrend/nexus/nexus/boss_keristrasza.cpp index 983976649..082d01a10 100644 --- a/scripts/northrend/nexus/nexus/boss_keristrasza.cpp +++ b/scripts/northrend/nexus/nexus/boss_keristrasza.cpp @@ -54,12 +54,12 @@ struct MANGOS_DLL_DECL boss_keristraszaAI : public ScriptedAI boss_keristraszaAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; void Reset() { diff --git a/scripts/northrend/nexus/nexus/boss_ormorok.cpp b/scripts/northrend/nexus/nexus/boss_ormorok.cpp index 3051fafbd..238e080b6 100644 --- a/scripts/northrend/nexus/nexus/boss_ormorok.cpp +++ b/scripts/northrend/nexus/nexus/boss_ormorok.cpp @@ -57,12 +57,12 @@ struct MANGOS_DLL_DECL boss_ormorokAI : public ScriptedAI boss_ormorokAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; bool m_bIsEnraged; @@ -117,13 +117,13 @@ struct MANGOS_DLL_DECL boss_ormorokAI : public ScriptedAI { m_bIsEnraged = true; DoScriptText(EMOTE_BOSS_GENERIC_FRENZY, m_creature); - DoCast(m_creature, m_bIsHeroicMode ? SPELL_FRENZY_H : SPELL_FRENZY); + DoCast(m_creature, m_bIsRegularMode ? SPELL_FRENZY : SPELL_FRENZY_H); } } if (m_uiTrampleTimer < uiDiff) { - DoCast(m_creature, m_bIsHeroicMode ? SPELL_TRAMPLE_H : SPELL_TRAMPLE); + DoCast(m_creature, m_bIsRegularMode ? SPELL_TRAMPLE : SPELL_TRAMPLE_H); m_uiTrampleTimer = urand(10000, 35000); } else @@ -146,7 +146,7 @@ struct MANGOS_DLL_DECL boss_ormorokAI : public ScriptedAI else m_uiCrystalSpikeTimer -= uiDiff; - if (m_bIsHeroicMode) + if (!m_bIsRegularMode) { if (m_uiTanglerTimer < uiDiff) { diff --git a/scripts/northrend/nexus/nexus/boss_telestra.cpp b/scripts/northrend/nexus/nexus/boss_telestra.cpp index a57664d9f..63596540e 100644 --- a/scripts/northrend/nexus/nexus/boss_telestra.cpp +++ b/scripts/northrend/nexus/nexus/boss_telestra.cpp @@ -70,12 +70,12 @@ struct MANGOS_DLL_DECL boss_telestraAI : public ScriptedAI boss_telestraAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; void Reset() { diff --git a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp index 849ce69b8..d938b96af 100644 --- a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp +++ b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp @@ -165,12 +165,12 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI boss_sartharionAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); - m_bIsHeroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroic; + bool m_bIsRegularMode; bool m_bIsBerserk; bool m_bIsSoftEnraged; @@ -345,7 +345,7 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) { if (i->getSource()->isAlive()) - DoScriptText(WHISPER_LAVA_CHURN,m_creature,i->getSource()); + DoScriptText(WHISPER_LAVA_CHURN, m_creature,i->getSource()); } } } @@ -360,8 +360,8 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI //spell will target dragons, if they are still alive at 35% if (!m_bIsBerserk && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) <= 35) { - DoScriptText(SAY_SARTHARION_BERSERK,m_creature); - DoCast(m_creature,SPELL_BERSERK); + DoScriptText(SAY_SARTHARION_BERSERK, m_creature); + DoCast(m_creature, SPELL_BERSERK); m_bIsBerserk = true; } @@ -397,7 +397,7 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI if (m_uiFlameBreathTimer < uiDiff) { DoScriptText(SAY_SARTHARION_BREATH, m_creature); - DoCast(m_creature->getVictim(), m_bIsHeroic ? SPELL_FLAME_BREATH_H : SPELL_FLAME_BREATH); + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_FLAME_BREATH : SPELL_FLAME_BREATH_H); m_uiFlameBreathTimer = urand(25000, 35000); } else @@ -406,7 +406,7 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI // Tail Sweep if (m_uiTailSweepTimer < uiDiff) { - DoCast(m_creature->getVictim(), m_bIsHeroic ? SPELL_TAIL_LASH_H : SPELL_TAIL_LASH); + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_TAIL_LASH : SPELL_TAIL_LASH_H); m_uiTailSweepTimer = urand(15000, 20000); } else @@ -520,12 +520,12 @@ struct MANGOS_DLL_DECL dummy_dragonAI : public ScriptedAI dummy_dragonAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); - m_bIsHeroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroic; + bool m_bIsRegularMode; uint32 m_uiWaypointId; uint32 m_uiMoveNextTimer; @@ -755,7 +755,7 @@ struct MANGOS_DLL_DECL mob_tenebronAI : public dummy_dragonAI if (m_uiShadowFissureTimer < uiDiff) { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, m_bIsHeroic ? SPELL_SHADOW_FISSURE_H : SPELL_SHADOW_FISSURE); + DoCast(pTarget, m_bIsRegularMode ? SPELL_SHADOW_FISSURE : SPELL_SHADOW_FISSURE_H); m_uiShadowFissureTimer = urand(15000, 20000); } @@ -766,7 +766,7 @@ struct MANGOS_DLL_DECL mob_tenebronAI : public dummy_dragonAI if (m_uiShadowBreathTimer < uiDiff) { DoScriptText(SAY_TENEBRON_BREATH, m_creature); - DoCast(m_creature->getVictim(), m_bIsHeroic ? SPELL_SHADOW_BREATH_H : SPELL_SHADOW_BREATH); + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_SHADOW_BREATH : SPELL_SHADOW_BREATH_H); m_uiShadowBreathTimer = urand(20000, 25000); } else @@ -830,7 +830,7 @@ struct MANGOS_DLL_DECL mob_shadronAI : public dummy_dragonAI if (m_uiShadowFissureTimer < uiDiff) { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, m_bIsHeroic ? SPELL_SHADOW_FISSURE_H : SPELL_SHADOW_FISSURE); + DoCast(pTarget, m_bIsRegularMode ? SPELL_SHADOW_FISSURE : SPELL_SHADOW_FISSURE_H); m_uiShadowFissureTimer = urand(15000, 20000); } @@ -841,7 +841,7 @@ struct MANGOS_DLL_DECL mob_shadronAI : public dummy_dragonAI if (m_uiShadowBreathTimer < uiDiff) { DoScriptText(SAY_SHADRON_BREATH, m_creature); - DoCast(m_creature->getVictim(), m_bIsHeroic ? SPELL_SHADOW_BREATH_H : SPELL_SHADOW_BREATH); + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_SHADOW_BREATH : SPELL_SHADOW_BREATH_H); m_uiShadowBreathTimer = urand(20000, 25000); } else @@ -899,7 +899,7 @@ struct MANGOS_DLL_DECL mob_vesperonAI : public dummy_dragonAI if (m_uiShadowFissureTimer < uiDiff) { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, m_bIsHeroic ? SPELL_SHADOW_FISSURE_H : SPELL_SHADOW_FISSURE); + DoCast(pTarget, m_bIsRegularMode ? SPELL_SHADOW_FISSURE : SPELL_SHADOW_FISSURE_H); m_uiShadowFissureTimer = urand(15000, 20000); } @@ -910,7 +910,7 @@ struct MANGOS_DLL_DECL mob_vesperonAI : public dummy_dragonAI if (m_uiShadowBreathTimer < uiDiff) { DoScriptText(SAY_VESPERON_BREATH, m_creature); - DoCast(m_creature->getVictim(), m_bIsHeroic ? SPELL_SHADOW_BREATH_H : SPELL_SHADOW_BREATH); + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_SHADOW_BREATH : SPELL_SHADOW_BREATH_H); m_uiShadowBreathTimer = urand(20000, 25000); } else diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp index 6bab8e9eb..d6b23bae4 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp @@ -84,7 +84,7 @@ struct MANGOS_DLL_DECL boss_bjarngrimAI : public ScriptedAI boss_bjarngrimAI(Creature *pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); m_uiStance = STANCE_DEFENSIVE; memset(&m_auiStormforgedLieutenantGUID, 0, sizeof(m_auiStormforgedLieutenantGUID)); Reset(); @@ -92,7 +92,7 @@ struct MANGOS_DLL_DECL boss_bjarngrimAI : public ScriptedAI ScriptedInstance* m_pInstance; - bool m_bIsHeroic; + bool m_bIsRegularMode; bool m_bIsChangingStance; uint8 m_uiChargingStatus; @@ -356,12 +356,12 @@ struct MANGOS_DLL_DECL mob_stormforged_lieutenantAI : public ScriptedAI mob_stormforged_lieutenantAI(Creature *pCreature) : ScriptedAI(pCreature) { m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); - m_bIsHeroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroic; + bool m_bIsRegularMode; uint32 m_uiArcWeld_Timer; uint32 m_uiRenewSteel_Timer; @@ -405,7 +405,7 @@ struct MANGOS_DLL_DECL mob_stormforged_lieutenantAI : public ScriptedAI if (Creature* pBjarngrim = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_BJARNGRIM))) { if (pBjarngrim->isAlive()) - DoCast(pBjarngrim, m_bIsHeroic ? SPELL_RENEW_STEEL_H : SPELL_RENEW_STEEL_N); + DoCast(pBjarngrim, m_bIsRegularMode ? SPELL_RENEW_STEEL_N : SPELL_RENEW_STEEL_H); } } m_uiRenewSteel_Timer = urand(10000, 14000); diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp index 1b93c8229..e82e4837e 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp @@ -62,7 +62,7 @@ struct MANGOS_DLL_DECL boss_ionarAI : public ScriptedAI boss_ionarAI(Creature *pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } @@ -70,7 +70,7 @@ struct MANGOS_DLL_DECL boss_ionarAI : public ScriptedAI std::list m_lSparkGUIDList; - bool m_bIsHeroic; + bool m_bIsRegularMode; bool m_bIsSplitPhase; uint32 m_uiSplit_Timer; @@ -204,7 +204,7 @@ struct MANGOS_DLL_DECL boss_ionarAI : public ScriptedAI { if (pSummoned->GetEntry() == NPC_SPARK_OF_IONAR) { - pSummoned->CastSpell(pSummoned, m_bIsHeroic ? SPELL_SPARK_VISUAL_TRIGGER_H : SPELL_SPARK_VISUAL_TRIGGER_N, true); + pSummoned->CastSpell(pSummoned, m_bIsRegularMode ? SPELL_SPARK_VISUAL_TRIGGER_N : SPELL_SPARK_VISUAL_TRIGGER_H, true); Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); @@ -268,7 +268,7 @@ struct MANGOS_DLL_DECL boss_ionarAI : public ScriptedAI if (m_uiStaticOverload_Timer < uiDiff) { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, m_bIsHeroic ? SPELL_STATIC_OVERLOAD_H : SPELL_STATIC_OVERLOAD_N); + DoCast(pTarget, m_bIsRegularMode ? SPELL_STATIC_OVERLOAD_N : SPELL_STATIC_OVERLOAD_H); m_uiStaticOverload_Timer = urand(5000, 6000); } @@ -277,7 +277,7 @@ struct MANGOS_DLL_DECL boss_ionarAI : public ScriptedAI if (m_uiBallLightning_Timer < uiDiff) { - DoCast(m_creature->getVictim(), m_bIsHeroic ? SPELL_BALL_LIGHTNING_H : SPELL_BALL_LIGHTNING_N); + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_BALL_LIGHTNING_N : SPELL_BALL_LIGHTNING_H); m_uiBallLightning_Timer = urand(10000, 11000); } else diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp index f1fb5790e..6a36ba9d3 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp @@ -59,13 +59,13 @@ struct MANGOS_DLL_DECL boss_lokenAI : public ScriptedAI boss_lokenAI(Creature *pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroic; + bool m_bIsRegularMode; bool m_bIsAura; uint32 m_uiArcLightning_Timer; @@ -142,11 +142,11 @@ struct MANGOS_DLL_DECL boss_lokenAI : public ScriptedAI float m_fDist = m_creature->GetDistance(i->getSource()); if (m_fDist <= 1.0f) // Less than 1 yard - dmg = (m_bIsHeroic ? 850 : 800); // need to correct damage + dmg = (m_bIsRegularMode ? 800 : 850); // need to correct damage else // Further from 1 yard - dmg = round((m_bIsHeroic ? 250 : 200) * m_fDist) + (m_bIsHeroic ? 850 : 800); // need to correct damage + dmg = round((m_bIsRegularMode ? 200 : 250) * m_fDist) + (m_bIsRegularMode ? 800 : 850); // need to correct damage - m_creature->CastCustomSpell(i->getSource(), (m_bIsHeroic ? 59837 : 52942), &dmg, 0, 0, false); + m_creature->CastCustomSpell(i->getSource(), (m_bIsRegularMode ? 52942 : 59837), &dmg, 0, 0, false); } } m_uiPulsingShockwave_Timer = 2000; @@ -159,7 +159,7 @@ struct MANGOS_DLL_DECL boss_lokenAI : public ScriptedAI //breaks at movement, can we assume when it's time, this spell is casted and also must stop movement? //m_creature->CastSpell(m_creature, SPELL_PULSING_SHOCKWAVE_AURA, true); - //DoCast(m_creature, m_bIsHeroic ? SPELL_PULSING_SHOCKWAVE_H : SPELL_PULSING_SHOCKWAVE_N); // need core support + //DoCast(m_creature, m_bIsRegularMode ? SPELL_PULSING_SHOCKWAVE_N : SPELL_PULSING_SHOCKWAVE_H); // need core support m_bIsAura = true; m_uiResumePulsingShockwave_Timer = 0; } @@ -186,10 +186,10 @@ struct MANGOS_DLL_DECL boss_lokenAI : public ScriptedAI case 2: DoScriptText(SAY_NOVA_3, m_creature);break; } - DoCast(m_creature, m_bIsHeroic ? SPELL_LIGHTNING_NOVA_H : SPELL_LIGHTNING_NOVA_N); + DoCast(m_creature, m_bIsRegularMode ? SPELL_LIGHTNING_NOVA_N : SPELL_LIGHTNING_NOVA_H); m_bIsAura = false; - m_uiResumePulsingShockwave_Timer = (m_bIsHeroic ? 4000 : 5000); // Pause Pulsing Shockwave aura + m_uiResumePulsingShockwave_Timer = (m_bIsRegularMode ? 5000 : 4000); // Pause Pulsing Shockwave aura m_uiLightningNova_Timer = urand(20000, 21000); } else diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp index df553a808..1d1cc61b1 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp @@ -75,7 +75,7 @@ struct MANGOS_DLL_DECL boss_volkhanAI : public ScriptedAI boss_volkhanAI(Creature *pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } @@ -83,7 +83,7 @@ struct MANGOS_DLL_DECL boss_volkhanAI : public ScriptedAI std::list m_lGolemGUIDList; - bool m_bIsHeroic; + bool m_bIsRegularMode; bool m_bHasTemper; bool m_bIsStriking; bool m_bCanShatterGolem; @@ -181,7 +181,7 @@ struct MANGOS_DLL_DECL boss_volkhanAI : public ScriptedAI { // only shatter brittle golems if (pTemp->isAlive() && pTemp->GetEntry() == NPC_BRITTLE_GOLEM) - pTemp->CastSpell(pTemp, m_bIsHeroic ? SPELL_SHATTER_H : SPELL_SHATTER_N, false); + pTemp->CastSpell(pTemp, m_bIsRegularMode ? SPELL_SHATTER_N : SPELL_SHATTER_H, false); } } } @@ -202,7 +202,7 @@ struct MANGOS_DLL_DECL boss_volkhanAI : public ScriptedAI pSummoned->AI()->AttackStart(pTarget); //why healing when just summoned? - pSummoned->CastSpell(pSummoned, m_bIsHeroic ? SPELL_HEAT_H : SPELL_HEAT_N, false, NULL, NULL, m_creature->GetGUID()); + pSummoned->CastSpell(pSummoned, m_bIsRegularMode ? SPELL_HEAT_N : SPELL_HEAT_H, false, NULL, NULL, m_creature->GetGUID()); } } @@ -241,7 +241,7 @@ struct MANGOS_DLL_DECL boss_volkhanAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_STOMP_1 : SAY_STOMP_2, m_creature); - DoCast(m_creature, m_bIsHeroic ? SPELL_SHATTERING_STOMP_H : SPELL_SHATTERING_STOMP_N); + DoCast(m_creature, m_bIsRegularMode ? SPELL_SHATTERING_STOMP_N : SPELL_SHATTERING_STOMP_H); DoScriptText(EMOTE_SHATTER, m_creature); @@ -357,13 +357,13 @@ struct MANGOS_DLL_DECL mob_molten_golemAI : public ScriptedAI mob_molten_golemAI(Creature *pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroic; + bool m_bIsRegularMode; bool m_bIsFrozen; uint32 m_uiBlast_Timer; @@ -447,7 +447,7 @@ struct MANGOS_DLL_DECL mob_molten_golemAI : public ScriptedAI if (m_uiImmolation_Timer < uiDiff) { - DoCast(m_creature->getVictim(), m_bIsHeroic ? SPELL_IMMOLATION_STRIKE_H : SPELL_IMMOLATION_STRIKE_N); + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_IMMOLATION_STRIKE_N : SPELL_IMMOLATION_STRIKE_H); m_uiImmolation_Timer = 5000; } else diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp index 42011e7d8..679f3f120 100644 --- a/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp @@ -43,12 +43,12 @@ struct MANGOS_DLL_DECL boss_maiden_of_griefAI : public ScriptedAI boss_maiden_of_griefAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; void Reset() { diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp index 7d2e150c3..76dc06d08 100644 --- a/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp @@ -42,12 +42,12 @@ struct MANGOS_DLL_DECL boss_sjonnirAI : public ScriptedAI boss_sjonnirAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; void Reset() { diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp index 6e2a9ff8e..741cbbb5d 100644 --- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp @@ -105,12 +105,12 @@ struct MANGOS_DLL_DECL npc_brann_hosAI : public npc_escortAI npc_brann_hosAI(Creature* pCreature) : npc_escortAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; void Reset() { diff --git a/scripts/northrend/ulduar/ulduar/boss_algalon.cpp b/scripts/northrend/ulduar/ulduar/boss_algalon.cpp index e28824873..b4b9bc4d1 100644 --- a/scripts/northrend/ulduar/ulduar/boss_algalon.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_algalon.cpp @@ -14,11 +14,11 @@ struct MANGOS_DLL_DECL boss_algalonAI : public ScriptedAI boss_algalonAI(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Heroic = pCreature->GetMap()->GetSpawnMode() > 0; + Regular = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - bool Heroic; + bool Regular; ScriptedInstance *pInstance; uint32 QuantumStrikeTimer; uint32 EnrageTimer; @@ -47,7 +47,7 @@ struct MANGOS_DLL_DECL boss_algalonAI : public ScriptedAI if(QuantumStrikeTimer < diff) { - DoCast(m_creature->getVictim(), Heroic ? H_SP_QUANTUM_STRIKE : SP_QUANTUM_STRIKE); + DoCast(m_creature->getVictim(), Regular ? H_SP_QUANTUM_STRIKE : SP_QUANTUM_STRIKE); QuantumStrikeTimer = 4000 + rand()%10000; } else QuantumStrikeTimer -= diff; diff --git a/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp b/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp index 8b7e50a62..3b9f4ecd4 100644 --- a/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp @@ -19,12 +19,12 @@ struct MANGOS_DLL_DECL boss_auriayaAI : public ScriptedAI boss_auriayaAI(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Heroic = pCreature->GetMap()->GetSpawnMode() > 0; + Regular = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance *pInstance; - bool Heroic; + bool Regular; uint32 EnrageTimer; uint32 ScreechTimer; uint32 TerrifyTimer; @@ -69,7 +69,7 @@ struct MANGOS_DLL_DECL boss_auriayaAI : public ScriptedAI if (ScreechTimer < diff) { - DoCast(m_creature, Heroic ? H_SP_SONIC_SCREECH : SP_SONIC_SCREECH); + DoCast(m_creature, Regular ? H_SP_SONIC_SCREECH : SP_SONIC_SCREECH); ScreechTimer = 25000 + rand()%15000; } else ScreechTimer -= diff; diff --git a/scripts/northrend/ulduar/ulduar/boss_freya.cpp b/scripts/northrend/ulduar/ulduar/boss_freya.cpp index 900723218..3b5ca2012 100644 --- a/scripts/northrend/ulduar/ulduar/boss_freya.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_freya.cpp @@ -28,7 +28,7 @@ struct MANGOS_DLL_DECL boss_freyaAI : public ScriptedAI boss_freyaAI(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Heroic = pCreature->GetMap()->GetSpawnMode() > 0; + Regular = pCreature->GetMap()->IsRegularDifficulty(); sp = (SpellEntry *)GetSpellStore()->LookupEntry(SP_ATTUNED_TO_NATURE); bp = 8; if(!pCreature->HasAura(SP_ATTUNED_TO_NATURE, 0)) @@ -44,7 +44,7 @@ struct MANGOS_DLL_DECL boss_freyaAI : public ScriptedAI uint32 SunbeamTimer; uint32 EnrageTimer; - bool Heroic; + bool Regular; ScriptedInstance *pInstance; SpellEntry const *sp; int32 bp; @@ -71,7 +71,7 @@ struct MANGOS_DLL_DECL boss_freyaAI : public ScriptedAI m_creature->AddAura(new AttunedToNatureAura(sp, 0, &bp, m_creature, m_creature)); m_creature->GetAura(SP_ATTUNED_TO_NATURE, 0)->SetStackAmount(150); - DoCast(m_creature, Heroic ? H_SP_TOUCH_OF_EONAR : SP_TOUCH_OF_EONAR); + DoCast(m_creature, Regular ? H_SP_TOUCH_OF_EONAR : SP_TOUCH_OF_EONAR); if(pInstance) pInstance->SetData(TYPE_FREYA, IN_PROGRESS); } @@ -177,7 +177,7 @@ struct MANGOS_DLL_DECL boss_freyaAI : public ScriptedAI if(SunbeamTimer < diff) { if( Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(target, Heroic ? H_SP_SUNBEAM : SP_SUNBEAM); + DoCast(target, Regular ? H_SP_SUNBEAM : SP_SUNBEAM); SunbeamTimer = 6000 + rand()%10000; } else SunbeamTimer -= diff; diff --git a/scripts/northrend/ulduar/ulduar/boss_hodir.cpp b/scripts/northrend/ulduar/ulduar/boss_hodir.cpp index 942afa5fb..7d1280a8d 100644 --- a/scripts/northrend/ulduar/ulduar/boss_hodir.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_hodir.cpp @@ -21,11 +21,11 @@ struct MANGOS_DLL_DECL boss_hodirAI : public ScriptedAI boss_hodirAI(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Heroic = pCreature->GetMap()->GetSpawnMode() > 0; + Regular = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - bool Heroic; + bool Regular; ScriptedInstance *pInstance; uint64 SpeedKillTimer; @@ -89,7 +89,7 @@ struct MANGOS_DLL_DECL boss_hodirAI : public ScriptedAI if(FrozenBlowsTimer < diff) { DoPlaySoundToSet(m_creature, SOUND_FROZEN_BLOWS); - DoCast(m_creature, Heroic ? H_SP_FROZEN_BLOWS : SP_FROZEN_BLOWS); + DoCast(m_creature, Regular ? H_SP_FROZEN_BLOWS : SP_FROZEN_BLOWS); FrozenBlowsTimer = 60000; } else FrozenBlowsTimer -= diff; diff --git a/scripts/northrend/ulduar/ulduar/boss_ignis.cpp b/scripts/northrend/ulduar/ulduar/boss_ignis.cpp index 5e397eecd..920f89232 100644 --- a/scripts/northrend/ulduar/ulduar/boss_ignis.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_ignis.cpp @@ -19,12 +19,12 @@ struct MANGOS_DLL_DECL boss_ignisAI : public ScriptedAI boss_ignisAI(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Heroic = pCreature->GetMap()->GetSpawnMode() > 0; + Regular = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance *pInstance; - bool Heroic; + bool Regular; //Timers uint32 ScorchTimer; uint32 SlagPotTimer; @@ -58,14 +58,14 @@ struct MANGOS_DLL_DECL boss_ignisAI : public ScriptedAI if (ScorchTimer < diff) { - DoCast(m_creature->getVictim(), Heroic ? H_SP_SCORCH : SP_SCORCH); + DoCast(m_creature->getVictim(), Regular ? H_SP_SCORCH : SP_SCORCH); ScorchTimer = 25000; } else ScorchTimer -= diff; if (FlameJetsTimer < diff) { - DoCast(m_creature->getVictim(), Heroic ? H_SP_FLAME_JETS : SP_FLAME_JETS); + DoCast(m_creature->getVictim(), Regular ? H_SP_FLAME_JETS : SP_FLAME_JETS); FlameJetsTimer = 20000+rand()%10000; } else FlameJetsTimer -= diff; @@ -74,7 +74,7 @@ struct MANGOS_DLL_DECL boss_ignisAI : public ScriptedAI { Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); if(target && target->isAlive()) - DoCast(target, Heroic ? H_SP_SLAG_POT : SP_SLAG_POT); + DoCast(target, Regular ? H_SP_SLAG_POT : SP_SLAG_POT); SlagPotTimer = 15000; } else SlagPotTimer -= diff;*/ diff --git a/scripts/northrend/ulduar/ulduar/boss_iron_council.cpp b/scripts/northrend/ulduar/ulduar/boss_iron_council.cpp index 7a2f432eb..aa98ecf19 100644 --- a/scripts/northrend/ulduar/ulduar/boss_iron_council.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_iron_council.cpp @@ -32,12 +32,12 @@ struct MANGOS_DLL_DECL iron_councilAI : public ScriptedAI iron_councilAI(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Heroic = pCreature->GetMap()->GetSpawnMode() > 0; + Regular = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance *pInstance; - bool Heroic; + bool Regular; int CouncilAlive; void Reset() @@ -122,7 +122,7 @@ struct MANGOS_DLL_DECL boss_steelbreakerAI : public iron_councilAI void Aggro(Unit *who) { - DoCast(m_creature, Heroic ? H_SP_HIGH_VOLTAGE : SP_HIGH_VOLTAGE); + DoCast(m_creature, Regular ? H_SP_HIGH_VOLTAGE : SP_HIGH_VOLTAGE); } void UpdateAI(const uint32 diff) @@ -132,7 +132,7 @@ struct MANGOS_DLL_DECL boss_steelbreakerAI : public iron_councilAI if(PunchTimer < diff) { - DoCast(m_creature->getVictim(), Heroic ? H_SP_FUSION_PUNCH : SP_FUSION_PUNCH); + DoCast(m_creature->getVictim(), Regular ? H_SP_FUSION_PUNCH : SP_FUSION_PUNCH); PunchTimer = 30000; } else PunchTimer -= diff; @@ -172,7 +172,7 @@ struct MANGOS_DLL_DECL boss_brundirAI : public iron_councilAI if(OverloadTimer < diff) { - DoCast(m_creature->getVictim(), Heroic ? H_SP_OVERLOAD : SP_OVERLOAD); + DoCast(m_creature->getVictim(), Regular ? H_SP_OVERLOAD : SP_OVERLOAD); OverloadTimer = 60000; } else OverloadTimer -= diff; @@ -181,7 +181,7 @@ struct MANGOS_DLL_DECL boss_brundirAI : public iron_councilAI { Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); if(target && target->isAlive()) - DoCast(target, Heroic ? H_SP_CHAIN_LIGHTNING : SP_CHAIN_LIGHTNING); + DoCast(target, Regular ? H_SP_CHAIN_LIGHTNING : SP_CHAIN_LIGHTNING); LightningTimer = 5000 + rand()%5000; } else LightningTimer -= diff; @@ -235,7 +235,7 @@ struct MANGOS_DLL_DECL boss_molgeimAI : public iron_councilAI if(DeathRuneTimer < diff) { Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); - if(target) DoCast(target, Heroic ? H_SP_RUNE_OF_DEATH : SP_RUNE_OF_DEATH); + if(target) DoCast(target, Regular ? H_SP_RUNE_OF_DEATH : SP_RUNE_OF_DEATH); } } diff --git a/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp b/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp index aaddc1621..51108be00 100644 --- a/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp @@ -29,12 +29,12 @@ struct MANGOS_DLL_DECL boss_kologarnAI : public Scripted_NoMovementAI boss_kologarnAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Heroic = pCreature->GetMap()->GetSpawnMode() > 0; + Regular = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance *pInstance; - bool Heroic; + bool Regular; uint32 BreathTimer; uint32 SmashTimer; uint32 EnrageTimer; @@ -92,7 +92,7 @@ struct MANGOS_DLL_DECL boss_kologarnAI : public Scripted_NoMovementAI if(BreathTimer < diff) { if(!m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE)) - DoCast(m_creature->getVictim(), Heroic ? H_SP_PETRIFYING_BREATH : SP_PETRIFYING_BREATH); + DoCast(m_creature->getVictim(), Regular ? H_SP_PETRIFYING_BREATH : SP_PETRIFYING_BREATH); BreathTimer = 5000; } else BreathTimer -= diff; @@ -147,12 +147,12 @@ struct MANGOS_DLL_DECL boss_kologarn_left_armAI : public Scripted_NoMovementAI boss_kologarn_left_armAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Heroic = pCreature->GetMap()->GetSpawnMode() > 0; + Regular = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance *pInstance; - bool Heroic; + bool Regular; uint32 ShockwaveTimer; void Reset() @@ -191,12 +191,12 @@ struct MANGOS_DLL_DECL boss_kologarn_right_armAI : public Scripted_NoMovementAI boss_kologarn_right_armAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Heroic = pCreature->GetMap()->GetSpawnMode() > 0; + Regular = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance *pInstance; - bool Heroic; + bool Regular; uint32 GripThreshold; uint32 GripTimer; Unit *GrippedPlayer; @@ -207,7 +207,7 @@ struct MANGOS_DLL_DECL boss_kologarn_right_armAI : public Scripted_NoMovementAI GrippedPlayer = NULL; Gripped = false; GripTimer = 10000 + rand()%10000; - GripThreshold = Heroic ? 480000 : 100000; + GripThreshold = Regular ? 480000 : 100000; } void Aggro(Unit *who) {} @@ -252,7 +252,7 @@ struct MANGOS_DLL_DECL boss_kologarn_right_armAI : public Scripted_NoMovementAI GrippedPlayer = NULL; GripTimer = 10000 + rand()%10000; Gripped = false; - GripThreshold = Heroic ? 400000 : 100000; + GripThreshold = Regular ? 400000 : 100000; } } else diff --git a/scripts/northrend/ulduar/ulduar/boss_leviathan.cpp b/scripts/northrend/ulduar/ulduar/boss_leviathan.cpp index bebcb29d1..60a34f53d 100644 --- a/scripts/northrend/ulduar/ulduar/boss_leviathan.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_leviathan.cpp @@ -21,12 +21,12 @@ struct MANGOS_DLL_DECL boss_flame_leviathan : public ScriptedAI boss_flame_leviathan(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Heroic = pCreature->GetMap()->GetSpawnMode() > 0; + Regular = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance *pInstance; - bool Heroic; + bool Regular; uint32 BatteringRamTimer; uint32 FlameVentsTimer; @@ -88,7 +88,7 @@ struct MANGOS_DLL_DECL boss_flame_leviathan : public ScriptedAI if(RocketTimer < diff) { Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); - int32 dmg = Heroic ? (3000 + rand()%2000) : (2000 + rand()%1200); + int32 dmg = Regular ? (3000 + rand()%2000) : (2000 + rand()%1200); if(target && target->isAlive()) m_creature->CastCustomSpell(target, SP_ROCKET, &dmg, 0, 0, false); RocketTimer = 3000 + rand()%2000; diff --git a/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp b/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp index 712c71844..27d776e34 100644 --- a/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_mimiron.cpp @@ -7,11 +7,11 @@ struct MANGOS_DLL_DECL boss_mimironAI : public ScriptedAI boss_mimironAI(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Heroic = pCreature->GetMap()->GetSpawnMode() > 0; + Regular = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - bool Heroic; + bool Regular; ScriptedInstance *pInstance; void Reset() diff --git a/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp b/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp index e2a435456..f77a7b691 100644 --- a/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp @@ -25,12 +25,12 @@ struct MANGOS_DLL_DECL boss_razorscaleAI : public ScriptedAI boss_razorscaleAI(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Heroic = pCreature->GetMap()->GetSpawnMode() > 0; + Regular = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance *pInstance; - bool Heroic; + bool Regular; //Timers uint32 BerserkTimer; uint32 DevouringFlameTimer; @@ -87,21 +87,21 @@ struct MANGOS_DLL_DECL boss_razorscaleAI : public ScriptedAI { Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); if(target && target->isAlive()) - DoCast(target, Heroic ? H_SP_DEVOURING_FLAME : SP_DEVOURING_FLAME); + DoCast(target, Regular ? H_SP_DEVOURING_FLAME : SP_DEVOURING_FLAME); DevouringFlameTimer = 9000+rand()%3000; } else DevouringFlameTimer -= diff; if (FlameBreathTimer < diff) { - DoCast(m_creature->getVictim(), Heroic ? H_SP_FLAME_BREATH : SP_FLAME_BREATH); + DoCast(m_creature->getVictim(), Regular ? H_SP_FLAME_BREATH : SP_FLAME_BREATH); FlameBreathTimer = 15000 + rand()%5000; } else FlameBreathTimer -= diff; if (FlameBuffetTimer < diff) { - DoCast(m_creature, Heroic ? H_SP_FLAME_BUFFET : SP_FLAME_BUFFET, true); + DoCast(m_creature, Regular ? H_SP_FLAME_BUFFET : SP_FLAME_BUFFET, true); FlameBuffetTimer = 20000 + rand()%15000; } else FlameBuffetTimer -= diff; @@ -110,7 +110,7 @@ struct MANGOS_DLL_DECL boss_razorscaleAI : public ScriptedAI { Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); if(target && target->isAlive()) - DoCast(target, Heroic ? H_SP_FIREBALL : SP_FIREBALL); + DoCast(target, Regular ? H_SP_FIREBALL : SP_FIREBALL); FireballTimer = 4000 + rand()%4000; } else FireballTimer -= diff; diff --git a/scripts/northrend/ulduar/ulduar/boss_thorim.cpp b/scripts/northrend/ulduar/ulduar/boss_thorim.cpp index ff872f2bb..ea299e46d 100644 --- a/scripts/northrend/ulduar/ulduar/boss_thorim.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_thorim.cpp @@ -7,11 +7,11 @@ struct MANGOS_DLL_DECL boss_thorimAI : public ScriptedAI boss_thorimAI(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Heroic = pCreature->GetMap()->GetSpawnMode() > 0; + Regular = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - bool Heroic; + bool Regular; ScriptedInstance *pInstance; void Reset() diff --git a/scripts/northrend/ulduar/ulduar/boss_vezax.cpp b/scripts/northrend/ulduar/ulduar/boss_vezax.cpp index dbdb741b8..8ae7816cc 100644 --- a/scripts/northrend/ulduar/ulduar/boss_vezax.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_vezax.cpp @@ -16,11 +16,11 @@ struct MANGOS_DLL_DECL boss_vezaxAI : public ScriptedAI boss_vezaxAI(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Heroic = pCreature->GetMap()->GetSpawnMode() > 0; + Regular = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - bool Heroic; + bool Regular; ScriptedInstance *pInstance; uint32 EnrageTimer; diff --git a/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp b/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp index 33888033b..0b669a56a 100644 --- a/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp @@ -42,10 +42,10 @@ struct MANGOS_DLL_DECL boss_xt002 : public ScriptedAI boss_xt002(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Heroic = pCreature->GetMap()->GetSpawnMode() > 0; - //PummelerCount = Heroic ? 2 : 1; - ScrapbotCount = Heroic ? 6 : 4; - BoombotCount = Heroic ? 4 : 2; + Regular = pCreature->GetMap()->IsRegularDifficulty(); + //PummelerCount = Regular ? 2 : 1; + ScrapbotCount = Regular ? 6 : 4; + BoombotCount = Regular ? 4 : 2; AddX[0] = 792.706; AddY[0] = 64.033; AddZ[0] = 413.632; AddX[1] = 879.750; AddY[1] = 64.815; AddZ[1] = 409.804; AddX[2] = 896.488; AddY[2] = -93.018; AddZ[2] = 411.731; @@ -54,7 +54,7 @@ struct MANGOS_DLL_DECL boss_xt002 : public ScriptedAI } ScriptedInstance *pInstance; - bool Heroic; + bool Regular; uint32 AddsPhaseTimer; bool addsPhase; @@ -142,7 +142,7 @@ struct MANGOS_DLL_DECL boss_xt002 : public ScriptedAI int i; Creature *add; Unit *target; - if(Heroic || (AddsPhaseTimer > 15000)) + if(Regular || (AddsPhaseTimer > 15000)) { add = m_creature->SummonCreature(CR_PUMMELER, AddX[rnd], AddY[rnd], AddZ[rnd], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); add->SetActiveObjectState(true); @@ -198,7 +198,7 @@ struct MANGOS_DLL_DECL boss_xt002 : public ScriptedAI { Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); if(target && target->isAlive()) - DoCast(target, Heroic ? H_SP_SEARING_LIGHT : SP_SEARING_LIGHT); + DoCast(target, Regular ? H_SP_SEARING_LIGHT : SP_SEARING_LIGHT); LightTimer = 10000; } else LightTimer -= diff; @@ -207,7 +207,7 @@ struct MANGOS_DLL_DECL boss_xt002 : public ScriptedAI { Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); if(target && target->isAlive()) - DoCast(target, Heroic ? H_SP_GRAVITY : SP_GRAVITY); + DoCast(target, Regular ? H_SP_GRAVITY : SP_GRAVITY); GravityTimer = 15000 + rand()%5000; } else GravityTimer -= diff; diff --git a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp index a07b4bf08..4db143483 100644 --- a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp @@ -10,11 +10,11 @@ struct MANGOS_DLL_DECL boss_yogg_saronAI : public ScriptedAI boss_yogg_saronAI(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Heroic = pCreature->GetMap()->GetSpawnMode() > 0; + Regular = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - bool Heroic; + bool Regular; ScriptedInstance *pInstance; void Reset() diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 37b67b199..989109ced 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -12,11 +12,11 @@ struct MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance { instance_ulduar(Map* pMap) : ScriptedInstance(pMap) { - Heroic = pMap->IsRaidOrHeroicDungeon(); + Regular = pMap->IsRegularDifficulty(); Initialize(); } - bool Heroic; + bool Regular; //Creatures GUID uint64 mKologarnGUID; uint64 mKologarnLeftArmGUID; @@ -120,30 +120,30 @@ struct MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance { //LOOT CACHES: //Cache of Living Stone (Kologarn) - case 195046: if(!Heroic) mKologarnCacheGUID = pGo->GetGUID(); break; - case 195047: if(Heroic) mKologarnCacheGUID = pGo->GetGUID(); break; + case 195046: if(!Regular) mKologarnCacheGUID = pGo->GetGUID(); break; + case 195047: if(Regular) mKologarnCacheGUID = pGo->GetGUID(); break; //Cache of Winter (Hodir) - case 194307: if(!Heroic) mHodirCacheGUID = pGo->GetGUID(); break; - case 194308: if(Heroic) mHodirCacheGUID = pGo->GetGUID(); break; + case 194307: if(!Regular) mHodirCacheGUID = pGo->GetGUID(); break; + case 194308: if(Regular) mHodirCacheGUID = pGo->GetGUID(); break; //Rare Cache of Winter (Hodir hard) - case 194200: if(!Heroic) mHodirRareCacheGUID = pGo->GetGUID(); break; - case 194201: if(Heroic) mHodirRareCacheGUID = pGo->GetGUID(); break; + case 194200: if(!Regular) mHodirRareCacheGUID = pGo->GetGUID(); break; + case 194201: if(Regular) mHodirRareCacheGUID = pGo->GetGUID(); break; //Thorim's cache - case 194312: if(!Heroic) mThorimCacheGUID = pGo->GetGUID(); break; - case 194314: if(Heroic) mThorimCacheGUID = pGo->GetGUID(); break; + case 194312: if(!Regular) mThorimCacheGUID = pGo->GetGUID(); break; + case 194314: if(Regular) mThorimCacheGUID = pGo->GetGUID(); break; //Thorim's cache (hard) - case 194313: if(!Heroic) mThorimHardCacheGUID = pGo->GetGUID(); break; - case 194315: if(Heroic) mThorimHardCacheGUID = pGo->GetGUID(); break; + case 194313: if(!Regular) mThorimHardCacheGUID = pGo->GetGUID(); break; + case 194315: if(Regular) mThorimHardCacheGUID = pGo->GetGUID(); break; //Cache of Innovation (Mimiron) - case 194789: if(!Heroic) mMimironCacheGUID = pGo->GetGUID(); break; - case 194956: if(Heroic) mMimironCacheGUID = pGo->GetGUID(); break; + case 194789: if(!Regular) mMimironCacheGUID = pGo->GetGUID(); break; + case 194956: if(Regular) mMimironCacheGUID = pGo->GetGUID(); break; //Cache of Innovation (Mimiron hard) //Gift of Freya - case 194324: if(!Heroic) mFreyaCacheGUID = pGo->GetGUID(); break; - case 194328: if(Heroic) mFreyaCacheGUID = pGo->GetGUID(); break; + case 194324: if(!Regular) mFreyaCacheGUID = pGo->GetGUID(); break; + case 194328: if(Regular) mFreyaCacheGUID = pGo->GetGUID(); break; //Gift of the Observer - case 194822: if(!Heroic) mAlgalonCacheGUID = pGo->GetGUID(); break; - case 194823: if(Heroic) mAlgalonCacheGUID = pGo->GetGUID(); break; + case 194822: if(!Regular) mAlgalonCacheGUID = pGo->GetGUID(); break; + case 194823: if(Regular) mAlgalonCacheGUID = pGo->GetGUID(); break; //DOORS: case 194631: mXT002DoorGUID = pGo->GetGUID(); break; diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp index b2cd13151..fd1e349a4 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp @@ -81,12 +81,12 @@ struct MANGOS_DLL_DECL boss_ingvarAI : public ScriptedAI boss_ingvarAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; bool m_bIsResurrected; @@ -157,7 +157,7 @@ struct MANGOS_DLL_DECL boss_ingvarAI : public ScriptedAI if (m_uiSmashTimer < uiDiff) { - DoCast(m_creature, m_bIsHeroicMode ? SPELL_SMASH_H : SPELL_SMASH); + DoCast(m_creature, m_bIsRegularMode ? SPELL_SMASH : SPELL_SMASH_H); m_uiSmashTimer = urand(8000, 15000); } else @@ -166,7 +166,7 @@ struct MANGOS_DLL_DECL boss_ingvarAI : public ScriptedAI if (m_uiStaggeringRoarTimer < uiDiff) { DoScriptText(EMOTE_ROAR, m_creature); - DoCast(m_creature, m_bIsHeroicMode ? SPELL_STAGGERING_ROAR_H : SPELL_STAGGERING_ROAR); + DoCast(m_creature, m_bIsRegularMode ? SPELL_STAGGERING_ROAR : SPELL_STAGGERING_ROAR_H); m_uiStaggeringRoarTimer = urand(15000, 30000); } else @@ -174,7 +174,7 @@ struct MANGOS_DLL_DECL boss_ingvarAI : public ScriptedAI if (m_uiEnrageTimer < uiDiff) { - DoCast(m_creature, m_bIsHeroicMode ? SPELL_ENRAGE_H : SPELL_ENRAGE); + DoCast(m_creature, m_bIsRegularMode ? SPELL_ENRAGE : SPELL_ENRAGE_H); m_uiEnrageTimer = urand(10000, 20000); } else @@ -199,12 +199,12 @@ struct MANGOS_DLL_DECL npc_annhyldeAI : public ScriptedAI npc_annhyldeAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; void Reset() { diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp index 3e046f7d2..7cd91de69 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp @@ -62,12 +62,12 @@ struct MANGOS_DLL_DECL mob_vrykul_skeletonAI : public ScriptedAI mob_vrykul_skeletonAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); - m_bIsHeroicMode = m_creature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = m_creature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; Creature* m_pKeleseth; uint32 m_uiCastTimer; @@ -158,15 +158,15 @@ struct MANGOS_DLL_DECL mob_vrykul_skeletonAI : public ScriptedAI if (m_uiCastTimer < uiDiff) { - if (m_bIsHeroicMode) + if (m_bIsRegularMode) + DoCast(m_creature->getVictim(), SPELL_DECREPIFY); + else { if (urand(0, 3)) DoCast(m_creature->getVictim(), SPELL_DECREPIFY_H); else if (m_pKeleseth && m_pKeleseth->isAlive()) DoCast(m_pKeleseth, SPELL_BONE_ARMOR); } - else - DoCast(m_creature->getVictim(), SPELL_DECREPIFY); m_uiCastTimer = urand(5000, 15000); } @@ -191,12 +191,12 @@ struct MANGOS_DLL_DECL boss_kelesethAI : public ScriptedAI boss_kelesethAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; uint32 m_uiFrostTombTimer; uint32 m_uiSummonTimer; @@ -282,7 +282,7 @@ struct MANGOS_DLL_DECL boss_kelesethAI : public ScriptedAI if (m_uiShadowboltTimer < uiDiff) { - DoCast(m_creature->getVictim(), m_bIsHeroicMode ? SPELL_SHADOWBOLT_H : SPELL_SHADOWBOLT); + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_SHADOWBOLT : SPELL_SHADOWBOLT_H); m_uiShadowboltTimer = 3000; } else diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp index f57bb8622..2ef91a128 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp @@ -79,13 +79,13 @@ struct MANGOS_DLL_DECL boss_s_and_d_dummyAI : public ScriptedAI boss_s_and_d_dummyAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); m_uiGhostGUID = 0; Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; uint64 m_uiGhostGUID; Creature* GetBuddy() @@ -265,7 +265,7 @@ struct MANGOS_DLL_DECL boss_dalronnAI : public boss_s_and_d_dummyAI if (m_uiDebilitateTimer < uiDiff) { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, m_bIsHeroicMode ? SPELL_DEBILITATE_H : SPELL_DEBILITATE); + DoCast(pTarget, m_bIsRegularMode ? SPELL_DEBILITATE : SPELL_DEBILITATE_H); m_uiDebilitateTimer = urand(12000, 20000); } @@ -275,14 +275,14 @@ struct MANGOS_DLL_DECL boss_dalronnAI : public boss_s_and_d_dummyAI if (m_uiShadowBoltTimer < uiDiff) { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, m_bIsHeroicMode ? SPELL_SHADOW_BOLT_H : SPELL_SHADOW_BOLT); + DoCast(pTarget, m_bIsRegularMode ? SPELL_SHADOW_BOLT : SPELL_SHADOW_BOLT_H); m_uiShadowBoltTimer = urand(3000, 6000); } else m_uiShadowBoltTimer -= uiDiff; - if (m_bIsHeroicMode) + if (!m_bIsRegularMode) { if (m_uiSkeletonTimer < uiDiff) { diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp index d0c285d58..104ca349d 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp @@ -46,13 +46,13 @@ struct MANGOS_DLL_DECL mob_dragonflayer_forge_masterAI : public ScriptedAI mob_dragonflayer_forge_masterAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); m_uiForgeEncounterId = 0; Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; uint32 m_uiForgeEncounterId; uint32 m_uiBurningBrandTimer; @@ -135,7 +135,7 @@ struct MANGOS_DLL_DECL mob_dragonflayer_forge_masterAI : public ScriptedAI if (m_uiBurningBrandTimer < uiDiff) { - DoCast(m_creature->getVictim(), m_bIsHeroicMode ? SPELL_BURNING_BRAND_H : SPELL_BURNING_BRAND); + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_BURNING_BRAND : SPELL_BURNING_BRAND_H); m_uiBurningBrandTimer = 15000; } else m_uiBurningBrandTimer -= uiDiff; diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp index d4338d3fa..6cb10ff73 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp @@ -40,12 +40,12 @@ struct MANGOS_DLL_DECL boss_gortokAI : public ScriptedAI boss_gortokAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; void Reset() { diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp index a15b13cba..d53f576e9 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp @@ -48,12 +48,12 @@ struct MANGOS_DLL_DECL boss_skadiAI : public ScriptedAI boss_skadiAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; void Reset() { diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp index 850ca3dc8..35b41dc4d 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp @@ -68,13 +68,13 @@ struct MANGOS_DLL_DECL boss_svalaAI : public ScriptedAI boss_svalaAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); m_bIsIntroDone = false; Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; Creature* pArthas; diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp index e65c9140c..b691f0409 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp @@ -46,12 +46,12 @@ struct MANGOS_DLL_DECL boss_ymironAI : public ScriptedAI boss_ymironAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; void Reset() { diff --git a/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp b/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp index f25576f14..9f52892cd 100644 --- a/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp +++ b/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp @@ -195,18 +195,18 @@ struct MANGOS_DLL_DECL mob_ethereal_beaconAI : public ScriptedAI { mob_ethereal_beaconAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - bool m_bIsHeroicMode; + bool m_bIsRegularMode; uint32 m_uiApprentice_Timer; uint32 m_uiArcaneBolt_Timer; void Reset() { - m_uiApprentice_Timer = m_bIsHeroicMode ? 10000 : 20000; + m_uiApprentice_Timer = m_bIsRegularMode ? 20000 : 10000; m_uiArcaneBolt_Timer = 1000; } @@ -223,7 +223,7 @@ struct MANGOS_DLL_DECL mob_ethereal_beaconAI : public ScriptedAI if (m_uiArcaneBolt_Timer < uiDiff) { - DoCast(m_creature->getVictim(),SPELL_ARCANE_BOLT); + DoCast(m_creature->getVictim(), SPELL_ARCANE_BOLT); m_uiArcaneBolt_Timer = urand(2000, 4500); }else m_uiArcaneBolt_Timer -= uiDiff; @@ -232,7 +232,7 @@ struct MANGOS_DLL_DECL mob_ethereal_beaconAI : public ScriptedAI if (m_creature->IsNonMeleeSpellCasted(false)) m_creature->InterruptNonMeleeSpells(true); - m_creature->CastSpell(m_creature,SPELL_ETHEREAL_APPRENTICE,true); + m_creature->CastSpell(m_creature, SPELL_ETHEREAL_APPRENTICE, true); m_creature->ForcedDespawn(); return; diff --git a/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp b/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp index a0069a115..d7b6c9a99 100644 --- a/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp +++ b/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp @@ -43,11 +43,11 @@ struct MANGOS_DLL_DECL boss_pandemoniusAI : public ScriptedAI { boss_pandemoniusAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - bool m_bIsHeroicMode; + bool m_bIsRegularMode; uint32 VoidBlast_Timer; uint32 DarkShell_Timer; uint32 VoidBlast_Counter; @@ -89,7 +89,7 @@ struct MANGOS_DLL_DECL boss_pandemoniusAI : public ScriptedAI { if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0)) { - DoCast(target, m_bIsHeroicMode ? H_SPELL_VOID_BLAST : SPELL_VOID_BLAST); + DoCast(target, m_bIsRegularMode ? SPELL_VOID_BLAST : H_SPELL_VOID_BLAST); VoidBlast_Timer = 500; ++VoidBlast_Counter; } @@ -110,7 +110,7 @@ struct MANGOS_DLL_DECL boss_pandemoniusAI : public ScriptedAI DoScriptText(EMOTE_DARK_SHELL, m_creature); - DoCast(m_creature, m_bIsHeroicMode ? H_SPELL_DARK_SHELL : SPELL_DARK_SHELL); + DoCast(m_creature, m_bIsRegularMode ? SPELL_DARK_SHELL : H_SPELL_DARK_SHELL); DarkShell_Timer = 20000; }else DarkShell_Timer -= diff; } diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_tailonking_ikiss.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_tailonking_ikiss.cpp index ac527f7b7..d142c3730 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_tailonking_ikiss.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_tailonking_ikiss.cpp @@ -53,12 +53,12 @@ struct MANGOS_DLL_DECL boss_talon_king_ikissAI : public ScriptedAI boss_talon_king_ikissAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; uint32 ArcaneVolley_Timer; uint32 Sheep_Timer; @@ -132,14 +132,14 @@ struct MANGOS_DLL_DECL boss_talon_king_ikissAI : public ScriptedAI if (Blink) { - DoCast(m_creature, m_bIsHeroicMode ? H_SPELL_ARCANE_EXPLOSION : SPELL_ARCANE_EXPLOSION); + DoCast(m_creature, m_bIsRegularMode ? SPELL_ARCANE_EXPLOSION : H_SPELL_ARCANE_EXPLOSION); m_creature->CastSpell(m_creature,SPELL_ARCANE_BUBBLE,true); Blink = false; } if (ArcaneVolley_Timer < diff) { - DoCast(m_creature, m_bIsHeroicMode ? H_SPELL_ARCANE_VOLLEY : SPELL_ARCANE_VOLLEY); + DoCast(m_creature, m_bIsRegularMode ? SPELL_ARCANE_VOLLEY : H_SPELL_ARCANE_VOLLEY); ArcaneVolley_Timer = urand(7000, 12000); }else ArcaneVolley_Timer -= diff; @@ -147,8 +147,8 @@ struct MANGOS_DLL_DECL boss_talon_king_ikissAI : public ScriptedAI { //second top aggro target in normal, random target in heroic correct? Unit *target = NULL; - if (m_bIsHeroicMode ? target = SelectUnit(SELECT_TARGET_RANDOM,0) : target = SelectUnit(SELECT_TARGET_TOPAGGRO,1)) - DoCast(target, m_bIsHeroicMode ? H_SPELL_POLYMORPH : SPELL_POLYMORPH); + if (m_bIsRegularMode ? target = SelectUnit(SELECT_TARGET_TOPAGGRO, 1) : target = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(target, m_bIsRegularMode ? SPELL_POLYMORPH : H_SPELL_POLYMORPH); Sheep_Timer = urand(15000, 17500); }else Sheep_Timer -= diff; @@ -159,7 +159,7 @@ struct MANGOS_DLL_DECL boss_talon_king_ikissAI : public ScriptedAI ManaShield = true; } - if (m_bIsHeroicMode) + if (!m_bIsRegularMode) { if (Slow_Timer < diff) { diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp index d2e03b301..b728b1916 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp @@ -48,12 +48,12 @@ struct MANGOS_DLL_DECL boss_ambassador_hellmawAI : public npc_escortAI boss_ambassador_hellmawAI(Creature* pCreature) : npc_escortAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; uint32 EventCheck_Timer; uint32 CorrosiveAcid_Timer; @@ -180,7 +180,7 @@ struct MANGOS_DLL_DECL boss_ambassador_hellmawAI : public npc_escortAI Fear_Timer = urand(20000, 35000); }else Fear_Timer -= diff; - if (m_bIsHeroicMode) + if (!m_bIsRegularMode) { if (!Enraged && Enrage_Timer < diff) { diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp index 0091d4ff2..1a9b0dd5a 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp @@ -58,13 +58,13 @@ struct MANGOS_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI boss_grandmaster_vorpilAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Intro = false; Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; uint32 ShadowBoltVolley_Timer; uint32 DrawShadows_Timer; @@ -172,7 +172,7 @@ struct MANGOS_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI } Teleport = false; - DoCast(m_creature->getVictim(), m_bIsHeroicMode ? H_SPELL_RAIN_OF_FIRE : SPELL_RAIN_OF_FIRE); + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_RAIN_OF_FIRE : H_SPELL_RAIN_OF_FIRE); Teleport_Timer = 1000; }else Teleport_Timer -= diff; @@ -207,7 +207,7 @@ struct MANGOS_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI VoidTraveler_Timer = 35000; }else VoidTraveler_Timer -= diff; - if (m_bIsHeroicMode) + if (!m_bIsRegularMode) { if (Banish_Timer < diff) { diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp index e3f247327..d3dfa7904 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp @@ -42,12 +42,12 @@ struct MANGOS_DLL_DECL boss_murmurAI : public ScriptedAI { SetCombatMovement(false); m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; uint32 SonicBoom_Timer; uint32 MurmursTouch_Timer; @@ -138,11 +138,11 @@ struct MANGOS_DLL_DECL boss_murmurAI : public ScriptedAI if (Resonance_Timer < diff) { DoCast(m_creature->getVictim(), SPELL_RESONANCE); - Resonance_Timer = m_bIsHeroicMode ? 3000 : 5000; + Resonance_Timer = m_bIsRegularMode ? 5000 : 3000; }else Resonance_Timer -= diff; } - if (m_bIsHeroicMode) + if (!m_bIsRegularMode) { if (SonicShock_Timer < diff) { diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp index eae145d82..6e2dcd412 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp @@ -46,12 +46,12 @@ struct MANGOS_DLL_DECL boss_thespiaAI : public ScriptedAI boss_thespiaAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; uint32 LightningCloud_Timer; uint32 LungBurst_Timer; @@ -104,7 +104,7 @@ struct MANGOS_DLL_DECL boss_thespiaAI : public ScriptedAI //cast twice in Heroic mode if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) DoCast(target, SPELL_LIGHTNING_CLOUD); - if (m_bIsHeroicMode) + if (!m_bIsRegularMode) if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) DoCast(target, SPELL_LIGHTNING_CLOUD); LightningCloud_Timer = urand(15000, 25000); @@ -124,7 +124,7 @@ struct MANGOS_DLL_DECL boss_thespiaAI : public ScriptedAI //cast twice in Heroic mode if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) DoCast(target, SPELL_ENVELOPING_WINDS); - if (m_bIsHeroicMode) + if (!m_bIsRegularMode) if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) DoCast(target, SPELL_ENVELOPING_WINDS); EnvelopingWinds_Timer = urand(10000, 15000); @@ -141,11 +141,11 @@ struct MANGOS_DLL_DECL mob_coilfang_waterelementalAI : public ScriptedAI { mob_coilfang_waterelementalAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - bool m_bIsHeroicMode; + bool m_bIsRegularMode; uint32 WaterBoltVolley_Timer; void Reset() @@ -160,7 +160,7 @@ struct MANGOS_DLL_DECL mob_coilfang_waterelementalAI : public ScriptedAI if (WaterBoltVolley_Timer < diff) { - DoCast(m_creature, m_bIsHeroicMode ? H_SPELL_WATER_BOLT_VOLLEY : SPELL_WATER_BOLT_VOLLEY); + DoCast(m_creature, m_bIsRegularMode ? SPELL_WATER_BOLT_VOLLEY : H_SPELL_WATER_BOLT_VOLLEY); WaterBoltVolley_Timer = urand(7000, 12000); }else WaterBoltVolley_Timer -= diff; diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp index f80b9f9c3..1bf6da88a 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp @@ -51,12 +51,12 @@ struct MANGOS_DLL_DECL boss_mekgineer_steamriggerAI : public ScriptedAI boss_mekgineer_steamriggerAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; uint32 Shrink_Timer; uint32 Saw_Blade_Timer; @@ -202,12 +202,12 @@ struct MANGOS_DLL_DECL mob_steamrigger_mechanicAI : public ScriptedAI mob_steamrigger_mechanicAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; uint32 Repair_Timer; @@ -238,7 +238,7 @@ struct MANGOS_DLL_DECL mob_steamrigger_mechanicAI : public ScriptedAI //m_creature->GetMotionMaster()->MovementExpired(); //m_creature->GetMotionMaster()->MoveIdle(); - DoCast(m_creature, m_bIsHeroicMode ? H_SPELL_REPAIR : SPELL_REPAIR, true); + DoCast(m_creature, m_bIsRegularMode ? SPELL_REPAIR : H_SPELL_REPAIR, true); } Repair_Timer = 5000; } diff --git a/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp b/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp index 5dfe0ef88..8b684221d 100644 --- a/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp +++ b/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp @@ -30,11 +30,11 @@ struct MANGOS_DLL_DECL boss_hungarfenAI : public ScriptedAI { boss_hungarfenAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - bool m_bIsHeroicMode; + bool m_bIsRegularMode; bool Root; uint32 Mushroom_Timer; uint32 AcidGeyser_Timer; diff --git a/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp b/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp index e86e2d306..f1c358e19 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp @@ -57,13 +57,13 @@ struct MANGOS_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI boss_kelidan_the_breakerAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; uint32 ShadowVolley_Timer; uint32 BurningNova_Timer; @@ -109,7 +109,7 @@ struct MANGOS_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI { if (Firenova_Timer < diff) { - DoCast(m_creature, m_bIsHeroicMode ? H_SPELL_FIRE_NOVA : SPELL_FIRE_NOVA); + DoCast(m_creature, m_bIsRegularMode ? SPELL_FIRE_NOVA : H_SPELL_FIRE_NOVA); Firenova = false; ShadowVolley_Timer = 2000; }else Firenova_Timer -=diff; @@ -119,7 +119,7 @@ struct MANGOS_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI if (ShadowVolley_Timer < diff) { - DoCast(m_creature, m_bIsHeroicMode ? H_SPELL_SHADOW_BOLT_VOLLEY : SPELL_SHADOW_BOLT_VOLLEY); + DoCast(m_creature, m_bIsRegularMode ? SPELL_SHADOW_BOLT_VOLLEY : H_SPELL_SHADOW_BOLT_VOLLEY); ShadowVolley_Timer = urand(5000, 13000); }else ShadowVolley_Timer -=diff; @@ -136,8 +136,8 @@ struct MANGOS_DLL_DECL boss_kelidan_the_breakerAI : public ScriptedAI DoScriptText(SAY_NOVA, m_creature); - if (m_bIsHeroicMode) - DoCast(m_creature,SPELL_VORTEX); + if (!m_bIsRegularMode) + DoCast(m_creature, SPELL_VORTEX); DoCast(m_creature,SPELL_BURNING_NOVA); @@ -174,12 +174,12 @@ struct MANGOS_DLL_DECL mob_shadowmoon_channelerAI : public ScriptedAI mob_shadowmoon_channelerAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; uint32 ShadowBolt_Timer; uint32 MarkOfShadow_Timer; @@ -209,7 +209,7 @@ struct MANGOS_DLL_DECL mob_shadowmoon_channelerAI : public ScriptedAI if (ShadowBolt_Timer < diff) { - DoCast(m_creature->getVictim(), m_bIsHeroicMode ? H_SPELL_SHADOW_BOLT : SPELL_SHADOW_BOLT); + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_SHADOW_BOLT : H_SPELL_SHADOW_BOLT); ShadowBolt_Timer = urand(5000, 6000); }else ShadowBolt_Timer -=diff; diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp index 1f07e1c8e..1b7fd2274 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp @@ -66,12 +66,12 @@ struct MANGOS_DLL_DECL boss_vazrudenAI : public ScriptedAI boss_vazrudenAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; bool m_bHealthBelow; @@ -147,12 +147,12 @@ struct MANGOS_DLL_DECL boss_vazruden_heraldAI : public ScriptedAI { pCreature->SetActiveObjectState(true); m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; uint32 m_uiMovementTimer; diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp index 33051a3cd..73de6a475 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp @@ -46,11 +46,11 @@ struct MANGOS_DLL_DECL boss_omor_the_unscarredAI : public ScriptedAI boss_omor_the_unscarredAI(Creature* pCreature) : ScriptedAI(pCreature) { SetCombatMovement(false); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - bool m_bIsHeroicMode; + bool m_bIsRegularMode; uint32 OrbitalStrike_Timer; uint32 ShadowWhip_Timer; @@ -177,7 +177,7 @@ struct MANGOS_DLL_DECL boss_omor_the_unscarredAI : public ScriptedAI if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) { - DoCast(target, m_bIsHeroicMode ? H_SPELL_BANE_OF_TREACHERY : SPELL_TREACHEROUS_AURA); + DoCast(target, m_bIsRegularMode ? SPELL_TREACHEROUS_AURA : H_SPELL_BANE_OF_TREACHERY); Aura_Timer = urand(8000, 16000); } }else Aura_Timer -= diff; @@ -189,7 +189,7 @@ struct MANGOS_DLL_DECL boss_omor_the_unscarredAI : public ScriptedAI if (target) target = m_creature->getVictim(); - DoCast(target, m_bIsHeroicMode ? H_SPELL_SHADOW_BOLT : SPELL_SHADOW_BOLT); + DoCast(target, m_bIsRegularMode ? SPELL_SHADOW_BOLT : H_SPELL_SHADOW_BOLT); Shadowbolt_Timer = urand(4000, 6500); } }else Shadowbolt_Timer -= diff; diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp index d112e24e1..63eab7e1f 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp @@ -42,11 +42,11 @@ struct MANGOS_DLL_DECL boss_watchkeeper_gargolmarAI : public ScriptedAI { boss_watchkeeper_gargolmarAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - bool m_bIsHeroicMode; + bool m_bIsRegularMode; uint32 Surge_Timer; uint32 MortalWound_Timer; @@ -113,7 +113,7 @@ struct MANGOS_DLL_DECL boss_watchkeeper_gargolmarAI : public ScriptedAI if (MortalWound_Timer < diff) { - DoCast(m_creature->getVictim(), m_bIsHeroicMode ? H_SPELL_MORTAL_WOUND : SPELL_MORTAL_WOUND); + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_MORTAL_WOUND : H_SPELL_MORTAL_WOUND); MortalWound_Timer = urand(5000, 13000); }else MortalWound_Timer -= diff; diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp index 68eec50ad..1546d1959 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp @@ -67,7 +67,7 @@ struct MANGOS_DLL_DECL instance_ramparts : public ScriptedInstance { case TYPE_VAZRUDEN: if (uiData == DONE && m_auiEncounter[1] == DONE) - DoRespawnGameObject(instance->IsRaidOrHeroicDungeon() ? m_uiChestHGUID : m_uiChestNGUID, HOUR*IN_MILISECONDS); + DoRespawnGameObject(instance->IsRegularDifficulty() ? m_uiChestNGUID : m_uiChestHGUID, HOUR*IN_MILISECONDS); m_auiEncounter[0] = uiData; break; case TYPE_NAZAN: @@ -80,7 +80,7 @@ struct MANGOS_DLL_DECL instance_ramparts : public ScriptedInstance } if (uiData == DONE && m_auiEncounter[0] == DONE) { - DoRespawnGameObject(instance->IsRaidOrHeroicDungeon() ? m_uiChestHGUID : m_uiChestNGUID, HOUR*IN_MILISECONDS); + DoRespawnGameObject(instance->IsRegularDifficulty() ? m_uiChestNGUID : m_uiChestHGUID, HOUR*IN_MILISECONDS); m_auiEncounter[1] = uiData; } if (uiData == IN_PROGRESS) diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp index 48999d5b8..271f5088e 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp @@ -78,12 +78,12 @@ struct MANGOS_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI boss_grand_warlock_nethekurseAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; bool IntroOnce; bool IsIntroEvent; @@ -275,7 +275,7 @@ struct MANGOS_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI if (Cleave_Timer < diff) { - DoCast(m_creature->getVictim(), m_bIsHeroicMode ? H_SPELL_SHADOW_SLAM : SPELL_SHADOW_CLEAVE); + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_SHADOW_CLEAVE : H_SPELL_SHADOW_SLAM); Cleave_Timer = urand(6000, 8500); }else Cleave_Timer -= diff; } diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp index 8d6bad4cb..c25041046 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp @@ -137,12 +137,12 @@ struct MANGOS_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI m_uiLeftHeadGUID = 0; m_uiRightHeadGUID = 0; m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; uint64 m_uiLeftHeadGUID; uint64 m_uiRightHeadGUID; @@ -348,7 +348,7 @@ struct MANGOS_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI if (m_uiBurningMaul_Timer < uiDiff) { DoScriptText(EMOTE_ENRAGE, m_creature); - DoCast(m_creature, m_bIsHeroicMode ? H_SPELL_BURNING_MAUL : SPELL_BURNING_MAUL); + DoCast(m_creature, m_bIsRegularMode ? SPELL_BURNING_MAUL : H_SPELL_BURNING_MAUL); m_uiBurningMaul_Timer = 40000; m_uiBlastWave_Timer = 16000; m_uiBlastCount = 1; diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp index 65c18259c..f9cc04772 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp @@ -53,12 +53,12 @@ struct MANGOS_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI boss_warchief_kargath_bladefistAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; std::vector adds; std::vector assassins; @@ -204,7 +204,7 @@ struct MANGOS_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI m_creature->SetSpeed(MOVE_RUN,2); (*m_creature).GetMotionMaster()->MoveChase(m_creature->getVictim()); Wait_Timer = 0; - if (m_bIsHeroicMode) + if (!m_bIsRegularMode) Charge_timer = 5000; } else diff --git a/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp b/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp index c8258bb9b..dcfe76a37 100644 --- a/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp +++ b/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp @@ -58,13 +58,13 @@ struct MANGOS_DLL_DECL boss_harbinger_skyrissAI : public ScriptedAI boss_harbinger_skyrissAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Intro = false; Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; bool Intro; bool IsImage33; @@ -192,9 +192,9 @@ struct MANGOS_DLL_DECL boss_harbinger_skyrissAI : public ScriptedAI if (MindRend_Timer < diff) { if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1)) - DoCast(target, m_bIsHeroicMode ? H_SPELL_MIND_REND : SPELL_MIND_REND); + DoCast(target, m_bIsRegularMode ? SPELL_MIND_REND : H_SPELL_MIND_REND); else - DoCast(m_creature->getVictim(), m_bIsHeroicMode ? H_SPELL_MIND_REND : SPELL_MIND_REND); + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_MIND_REND : H_SPELL_MIND_REND); MindRend_Timer = 8000; }else MindRend_Timer -=diff; @@ -222,14 +222,14 @@ struct MANGOS_DLL_DECL boss_harbinger_skyrissAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_MIND_1 : SAY_MIND_2, m_creature); if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1)) - DoCast(target, m_bIsHeroicMode ? H_SPELL_DOMINATION : SPELL_DOMINATION); + DoCast(target, m_bIsRegularMode ? SPELL_DOMINATION : H_SPELL_DOMINATION); else - DoCast(m_creature->getVictim(), m_bIsHeroicMode ? H_SPELL_DOMINATION : SPELL_DOMINATION); + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_DOMINATION : H_SPELL_DOMINATION); Domination_Timer = urand(16000, 32000); }else Domination_Timer -=diff; - if (m_bIsHeroicMode) + if (!m_bIsRegularMode) { if (ManaBurn_Timer < diff) { @@ -260,12 +260,12 @@ struct MANGOS_DLL_DECL boss_harbinger_skyriss_illusionAI : public ScriptedAI boss_harbinger_skyriss_illusionAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; void Reset() { } }; diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp index cf0c9c60a..fb5bea813 100644 --- a/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp @@ -43,12 +43,12 @@ struct MANGOS_DLL_DECL boss_gatewatcher_iron_handAI : public ScriptedAI boss_gatewatcher_iron_handAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; uint32 Shadow_Power_Timer; uint32 Jackhammer_Timer; @@ -93,7 +93,7 @@ struct MANGOS_DLL_DECL boss_gatewatcher_iron_handAI : public ScriptedAI //Shadow Power if (Shadow_Power_Timer < diff) { - DoCast(m_creature, m_bIsHeroicMode ? H_SPELL_SHADOW_POWER : SPELL_SHADOW_POWER); + DoCast(m_creature, m_bIsRegularMode ? SPELL_SHADOW_POWER : H_SPELL_SHADOW_POWER); Shadow_Power_Timer = urand(20000, 28000); }else Shadow_Power_Timer -= diff; @@ -102,7 +102,7 @@ struct MANGOS_DLL_DECL boss_gatewatcher_iron_handAI : public ScriptedAI { //TODO: expect cast this about 5 times in a row (?), announce it by emote only once DoScriptText(EMOTE_HAMMER, m_creature); - DoCast(m_creature->getVictim(), m_bIsHeroicMode ? H_SPELL_JACKHAMMER : SPELL_JACKHAMMER); + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_JACKHAMMER : H_SPELL_JACKHAMMER); //chance to yell, but not same time as emote (after spell in fact casted) if (urand(0, 4)) diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp index e6ce7203b..7bfa8f9ba 100644 --- a/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp @@ -45,12 +45,12 @@ struct MANGOS_DLL_DECL boss_nethermancer_sepethreaAI : public ScriptedAI boss_nethermancer_sepethreaAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; uint32 frost_attack_Timer; uint32 arcane_blast_Timer; @@ -72,7 +72,7 @@ struct MANGOS_DLL_DECL boss_nethermancer_sepethreaAI : public ScriptedAI DoScriptText(SAY_AGGRO, m_creature); //Summon two guards, three in heroic - uint8 am = (m_bIsHeroicMode ? 1 : 2); + uint8 am = (m_bIsRegularMode ? 2 : 1); for(int i = 0; i < am; ++i) { DoCast(who,SPELL_SUMMON_RAGIN_FLAMES); @@ -157,12 +157,12 @@ struct MANGOS_DLL_DECL mob_ragin_flamesAI : public ScriptedAI mob_ragin_flamesAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; uint32 inferno_Timer; uint32 flame_timer; @@ -194,7 +194,7 @@ struct MANGOS_DLL_DECL mob_ragin_flamesAI : public ScriptedAI if (inferno_Timer < diff) { - DoCast(m_creature->getVictim(), m_bIsHeroicMode ? H_SPELL_INFERNO : SPELL_INFERNO); + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_INFERNO : H_SPELL_INFERNO); m_creature->TauntApply(m_creature->getVictim()); diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp index ba2353be2..7a9b25cd4 100644 --- a/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp @@ -52,11 +52,11 @@ struct MANGOS_DLL_DECL boss_pathaleon_the_calculatorAI : public ScriptedAI { boss_pathaleon_the_calculatorAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_bIsHeroicMode = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - bool m_bIsHeroicMode; + bool m_bIsRegularMode; uint32 Summon_Timer; uint32 ManaTap_Timer; @@ -140,7 +140,7 @@ struct MANGOS_DLL_DECL boss_pathaleon_the_calculatorAI : public ScriptedAI }else Domination_Timer -= diff; //Only casting if Heroic Mode is used - if (m_bIsHeroicMode) + if (!m_bIsRegularMode) { if (ArcaneExplosion_Timer < diff) { diff --git a/sql/Updates/Makefile.am b/sql/Updates/Makefile.am index 90d8fbfb2..a6518ec70 100644 --- a/sql/Updates/Makefile.am +++ b/sql/Updates/Makefile.am @@ -48,4 +48,5 @@ pkgdata_DATA = \ r1498_mangos.sql \ r1500_mangos.sql \ r1502_mangos.sql \ - r1503_scriptdev2.sql + r1503_scriptdev2.sql \ + r1504_scriptdev2.sql diff --git a/sql/Updates/r1504_scriptdev2.sql b/sql/Updates/r1504_scriptdev2.sql new file mode 100644 index 000000000..1c404fb89 --- /dev/null +++ b/sql/Updates/r1504_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 8831+) '; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 850e67d7e..3aa6717df 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3,7 +3,7 @@ -- DELETE FROM sd2_db_version; -INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for MaNGOS 8828+) '); +INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for MaNGOS 8831+) '); -- -- Below contains data for table `script_texts` mainly used in C++ parts. From 9dea4624d694040ceba2b6d5f9210ebea3ba5c12 Mon Sep 17 00:00:00 2001 From: Insider Date: Sat, 21 Nov 2009 02:19:30 +0700 Subject: [PATCH 045/405] Fixed SQL file for [patch 7] --- addition/7_mangos_ulduar.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addition/7_mangos_ulduar.sql b/addition/7_mangos_ulduar.sql index 57bc228e8..c70d38012 100644 --- a/addition/7_mangos_ulduar.sql +++ b/addition/7_mangos_ulduar.sql @@ -18,7 +18,7 @@ UPDATE `creature_template` SET `ScriptName`='boss_yogg_saron' WHERE `entry`=3328 UPDATE `creature_template` SET `ScriptName`='boss_algalon' WHERE `entry`=32871; UPDATE `instance_template` SET `script`='instance_ulduar' WHERE `map`=603; -replace into `creature_template` values ('99005','0','0','0','22448','0','22448','0','Ulduar teleporter','',NULL,'80','80','64200','64200','12300','12300','31200','35','35','1','1.48','0.5','0','3170','6182','0','33235','1','1400','1900','0','0','0','0','0','0','0','0','0','0','100','7','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','1','3','1','1','0','0','0','0','0','0','0','0','1','99003','0','0','ulduar_teleporter'); +replace into `creature_template` values ('99005','0','0','0','0','0','22448','0','22448','0','Ulduar teleporter','',NULL,'80','80','64200','64200','12300','12300','31200','35','35','1','1.48','0.5','0','3170','6182','0','33235','1','1400','1900','0','0','0','0','0','0','0','0','0','0','100','7','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','1','3','1','1','0','0','0','0','0','0','0','0','1','0','0','0','ulduar_teleporter'); replace into `creature_template_addon` values ('99005','0','0','0','0','0','48143 0'); replace into `locales_creature` values ('99005','','','','','','','',' ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,''); /*replace into `creature` values From 6f462220a0486dccd985324802efd59ddbae4c17 Mon Sep 17 00:00:00 2001 From: Insider Date: Sat, 21 Nov 2009 17:01:49 +0700 Subject: [PATCH 046/405] Restored compilation with [patch 10] after removing [patch 117] from the core. --- scripts/world/npcs_special.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index a0051ab68..8cd0b0aa2 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -1676,7 +1676,7 @@ struct MANGOS_DLL_DECL npc_rune_blade : public ScriptedAI m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, item->GetProto()->ItemId); // Add stats scaling - int32 damageDone=owner->CalculateDamage(BASE_ATTACK, true, true); // might be average damage instead ? + int32 damageDone=owner->CalculateDamage(BASE_ATTACK, true); // might be average damage instead ? int32 meleeSpeed=owner->m_modAttackSpeedPct[BASE_ATTACK]; m_creature->CastCustomSpell(m_creature, 51906, &damageDone, &meleeSpeed, NULL, true); From 2076d6d38cfd467b50082d15f313e35aaa9fc5ab Mon Sep 17 00:00:00 2001 From: Insider Date: Sun, 22 Nov 2009 21:29:42 +0700 Subject: [PATCH 047/405] Reverted [patch 10] --- addition/10_mangos_dancing_rune_weapon.sql | 1 - scripts/world/npcs_special.cpp | 43 ---------------------- 2 files changed, 44 deletions(-) delete mode 100644 addition/10_mangos_dancing_rune_weapon.sql diff --git a/addition/10_mangos_dancing_rune_weapon.sql b/addition/10_mangos_dancing_rune_weapon.sql deleted file mode 100644 index 0374687a3..000000000 --- a/addition/10_mangos_dancing_rune_weapon.sql +++ /dev/null @@ -1 +0,0 @@ -update `creature_template` set `ScriptName`='npc_runeblade' where `entry`=27893; diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index 8cd0b0aa2..360183195 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -1658,44 +1658,6 @@ bool GossipSelect_npc_tabard_vendor(Player* pPlayer, Creature* pCreature, uint32 return true; } -struct MANGOS_DLL_DECL npc_rune_blade : public ScriptedAI -{ - npc_rune_blade(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - void Reset() - { - Unit * owner = m_creature->GetOwner(); - if (!owner || owner->GetTypeId() != TYPEID_PLAYER) - return; - - // Cannot be Selected or Attacked - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - - // Add visible weapon - if (Item const * item = ((Player *)owner)->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND)) - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, item->GetProto()->ItemId); - - // Add stats scaling - int32 damageDone=owner->CalculateDamage(BASE_ATTACK, true); // might be average damage instead ? - int32 meleeSpeed=owner->m_modAttackSpeedPct[BASE_ATTACK]; - m_creature->CastCustomSpell(m_creature, 51906, &damageDone, &meleeSpeed, NULL, true); - - // Visual Glow - m_creature->CastSpell(m_creature, 53160, true); - - // Start Chasing victim - if (uint64 guid = ((Player*)owner)->GetSelection()) - if (Unit *target = m_creature->GetUnit(*owner,guid)) - if (!target->IsFriendlyTo(owner)) - m_creature->Attack(target,true); - - } -}; -CreatureAI* GetAI_npc_rune_blade(Creature* pCreature) -{ - return new npc_rune_blade(pCreature); -} - void AddSC_npcs_special() { Script* newscript; @@ -1785,9 +1747,4 @@ void AddSC_npcs_special() newscript->pGossipHello = &GossipHello_npc_experience_eliminator; newscript->pGossipSelect = &GossipSelect_npc_experience_eliminator; newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_runeblade"; - newscript->GetAI = &GetAI_npc_rune_blade; - newscript->RegisterSelf(); } From 25104cc795a8eead51cc933cd05dea579fa8718f Mon Sep 17 00:00:00 2001 From: Insider Date: Sun, 22 Nov 2009 23:28:04 +0700 Subject: [PATCH 048/405] Fixed instance mode detection for [patch 2] --- .../vault_of_archavon/boss_archavon.cpp | 12 +++++----- .../vault_of_archavon/boss_emalon.cpp | 8 +++---- .../vault_of_archavon/boss_koralon.cpp | 22 +++++++++---------- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/scripts/northrend/vault_of_archavon/boss_archavon.cpp b/scripts/northrend/vault_of_archavon/boss_archavon.cpp index 5067c9841..3a77464c0 100644 --- a/scripts/northrend/vault_of_archavon/boss_archavon.cpp +++ b/scripts/northrend/vault_of_archavon/boss_archavon.cpp @@ -45,13 +45,13 @@ struct MANGOS_DLL_DECL boss_archavonAI : public ScriptedAI boss_archavonAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->GetSpawnMode() > 0; + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); m_fDefaultMoveSpeed = pCreature->GetSpeedRate(MOVE_RUN); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; float m_fDefaultMoveSpeed; uint32 m_uiEvadeCheckCooldown; @@ -125,7 +125,7 @@ struct MANGOS_DLL_DECL boss_archavonAI : public ScriptedAI { if (Unit* pTarget = m_creature->getVictim()) { - DoCast(pTarget, m_bIsHeroicMode ? SPELL_IMPALE_DMG_H : SPELL_IMPALE_DMG_N); + DoCast(pTarget, m_bIsRegularMode ? SPELL_IMPALE_DMG_N : SPELL_IMPALE_DMG_H); pTarget->CastSpell(pTarget, SPELL_IMPALE_STUN, true); } m_bImpaleInProgress = false; @@ -156,7 +156,7 @@ struct MANGOS_DLL_DECL boss_archavonAI : public ScriptedAI { m_creature->getThreatManager().addThreat(m_pCrushingLeapTarget, -100000000.0f); m_creature->SetSpeed(MOVE_RUN, m_fDefaultMoveSpeed); - DoCast(m_pCrushingLeapTarget, m_bIsHeroicMode ? SPELL_CRUSHING_LEAP_H : SPELL_CRUSHING_LEAP_N, true); + DoCast(m_pCrushingLeapTarget, m_bIsRegularMode ? SPELL_CRUSHING_LEAP_N : SPELL_CRUSHING_LEAP_H, true); m_bCrushingLeapInProgress = false; } else @@ -181,7 +181,7 @@ struct MANGOS_DLL_DECL boss_archavonAI : public ScriptedAI { if (m_pRockShardsTarget) { - DoCast(m_pRockShardsTarget, m_bIsHeroicMode ? (m_bRLRockShard ? SPELL_ROCK_SHARDS_LEFT_H : SPELL_ROCK_SHARDS_RIGHT_H) : (m_bRLRockShard ? SPELL_ROCK_SHARDS_LEFT_N : SPELL_ROCK_SHARDS_RIGHT_N)); + DoCast(m_pRockShardsTarget, m_bIsRegularMode ? (m_bRLRockShard ? SPELL_ROCK_SHARDS_LEFT_N : SPELL_ROCK_SHARDS_RIGHT_N) : (m_bRLRockShard ? SPELL_ROCK_SHARDS_LEFT_H : SPELL_ROCK_SHARDS_RIGHT_H)); m_bRLRockShard = !m_bRLRockShard; } m_uiRockShardTimer = 100; @@ -239,7 +239,7 @@ struct MANGOS_DLL_DECL boss_archavonAI : public ScriptedAI if (m_uiStompTimer < uiDiff) { - DoCast(m_creature, m_bIsHeroicMode ? SPELL_STOMP_H : SPELL_STOMP_N); + DoCast(m_creature, m_bIsRegularMode ? SPELL_STOMP_N : SPELL_STOMP_H); m_uiImpaleAfterStompTimer = 1000; m_bImpaleInProgress = true; m_uiStompTimer = 45000+rand()%15000; diff --git a/scripts/northrend/vault_of_archavon/boss_emalon.cpp b/scripts/northrend/vault_of_archavon/boss_emalon.cpp index c28f16308..bff426efd 100644 --- a/scripts/northrend/vault_of_archavon/boss_emalon.cpp +++ b/scripts/northrend/vault_of_archavon/boss_emalon.cpp @@ -206,12 +206,12 @@ struct MANGOS_DLL_DECL boss_emalonAI : public ScriptedAI boss_emalonAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroicMode = pCreature->GetMap()->GetSpawnMode() > 0; + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsHeroicMode; + bool m_bIsRegularMode; uint32 m_uiEvadeCheckCooldown; uint64 m_auiTempestMinionGUID[4]; @@ -310,7 +310,7 @@ struct MANGOS_DLL_DECL boss_emalonAI : public ScriptedAI if (m_uiChainLightningTimer < uiDiff) { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, m_bIsHeroicMode ? SPELL_CHAIN_LIGHTNING_H : SPELL_CHAIN_LIGHTNING_N); + DoCast(pTarget, m_bIsRegularMode ? SPELL_CHAIN_LIGHTNING_N : SPELL_CHAIN_LIGHTNING_H); m_uiChainLightningTimer = 10000 + rand()%15000; } else @@ -318,7 +318,7 @@ struct MANGOS_DLL_DECL boss_emalonAI : public ScriptedAI if (m_uiLightningNovaTimer < uiDiff) { - DoCast(m_creature, m_bIsHeroicMode ? SPELL_LIGHTNING_NOVA_H : SPELL_LIGHTNING_NOVA_N); + DoCast(m_creature, m_bIsRegularMode ? SPELL_LIGHTNING_NOVA_N : SPELL_LIGHTNING_NOVA_H); m_uiLightningNovaTimer = 45000; } else diff --git a/scripts/northrend/vault_of_archavon/boss_koralon.cpp b/scripts/northrend/vault_of_archavon/boss_koralon.cpp index e64e422d7..34756124d 100644 --- a/scripts/northrend/vault_of_archavon/boss_koralon.cpp +++ b/scripts/northrend/vault_of_archavon/boss_koralon.cpp @@ -25,12 +25,12 @@ struct MANGOS_DLL_DECL boss_koralonAI : public ScriptedAI boss_koralonAI(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Heroic = pCreature->GetMap()->GetSpawnMode() > 0; + Regular = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* pInstance; - bool Heroic; + bool Regular; uint32 BurningBreathTimer; uint32 MeteorFistsTimer; uint32 FlamesTimer; @@ -69,7 +69,7 @@ struct MANGOS_DLL_DECL boss_koralonAI : public ScriptedAI if(BurningBreathTimer < diff) { - DoCast(m_creature, Heroic ? H_SP_BURNING_BREATH : SP_BURNING_BREATH); + DoCast(m_creature, Regular ? SP_BURNING_BREATH : H_SP_BURNING_BREATH); BurningBreathTimer = 45000; BB = true; @@ -82,7 +82,7 @@ struct MANGOS_DLL_DECL boss_koralonAI : public ScriptedAI { if(BBTickTimer < diff) { - DoCast(NULL, Heroic ? H_SP_BB_EFFECT : SP_BB_EFFECT, true); + DoCast(NULL, Regular ? SP_BB_EFFECT : H_SP_BB_EFFECT, true); BBTickTimer = 1000; ++BBTicks; if(BBTicks > 2) BB = false; @@ -92,13 +92,13 @@ struct MANGOS_DLL_DECL boss_koralonAI : public ScriptedAI if(FlamesTimer < diff) { - int flames = Heroic ? 5 : 3; - int i; - for(i=0; i< flames; ++i) - { - Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); - if(target) DoCast(target, Heroic ? H_SP_CINDER : SP_CINDER); - } + int flames = Regular ? 3 : 5; + int i; + for(i=0; i< flames; ++i) + { + Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + if(target) DoCast(target, Regular ? SP_CINDER : H_SP_CINDER); + } FlamesTimer = 20000; } else FlamesTimer -= diff; From 1c90867051d32ab6ced88ab951c73e74c80ea03b Mon Sep 17 00:00:00 2001 From: Insider Date: Sun, 22 Nov 2009 23:42:05 +0700 Subject: [PATCH 049/405] Fixed instance mode detection for [patch 1] --- .../northrend/naxxramas/boss_anubrekhan.cpp | 6 +- scripts/northrend/naxxramas/boss_faerlina.cpp | 68 +++++++++---------- .../naxxramas/boss_four_horsemen.cpp | 12 ++-- scripts/northrend/naxxramas/boss_gluth.cpp | 4 +- scripts/northrend/naxxramas/boss_gothik.cpp | 16 ++--- .../northrend/naxxramas/boss_grobbulus.cpp | 24 +++---- .../northrend/naxxramas/boss_kelthuzad.cpp | 10 +-- scripts/northrend/naxxramas/boss_loatheb.cpp | 24 +++---- scripts/northrend/naxxramas/boss_maexxna.cpp | 8 +-- scripts/northrend/naxxramas/boss_noth.cpp | 6 +- .../northrend/naxxramas/boss_patchwerk.cpp | 2 +- .../northrend/naxxramas/boss_razuvious.cpp | 2 +- .../northrend/naxxramas/boss_sapphiron.cpp | 8 +-- .../naxxramas/instance_naxxramas.cpp | 4 +- 14 files changed, 97 insertions(+), 97 deletions(-) diff --git a/scripts/northrend/naxxramas/boss_anubrekhan.cpp b/scripts/northrend/naxxramas/boss_anubrekhan.cpp index cbebb1751..d2c1cbed6 100644 --- a/scripts/northrend/naxxramas/boss_anubrekhan.cpp +++ b/scripts/northrend/naxxramas/boss_anubrekhan.cpp @@ -260,9 +260,9 @@ struct MANGOS_DLL_DECL boss_anubrekhanAI : public ScriptedAI { //Cast Impale on a random target //Do NOT cast it when we are afflicted by locust swarm - if (!m_creature->HasAura(Regular ? H_SPELL_LOCUSTSWARM : SPELL_LOCUSTSWARM, 1)) + if (!m_creature->HasAura(Regular ? SPELL_LOCUSTSWARM : H_SPELL_LOCUSTSWARM, 1)) if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1)) - DoCast(target,Regular ? H_SPELL_IMPALE : SPELL_IMPALE); + DoCast(target,Regular ? SPELL_IMPALE : H_SPELL_IMPALE); Impale_Timer = 15000; }else Impale_Timer -= diff; @@ -270,7 +270,7 @@ struct MANGOS_DLL_DECL boss_anubrekhanAI : public ScriptedAI if (LocustSwarm_Timer < diff) { //Cast Locust Swarm buff on ourselves - DoCast(m_creature, Regular ? H_SPELL_LOCUSTSWARM : SPELL_LOCUSTSWARM); + DoCast(m_creature, Regular ? SPELL_LOCUSTSWARM : H_SPELL_LOCUSTSWARM); swarm = true; //Summon Crypt Guard immidietly after Locust Swarm if (CryptGuard_count < MAX_CRYPT_GUARDS) diff --git a/scripts/northrend/naxxramas/boss_faerlina.cpp b/scripts/northrend/naxxramas/boss_faerlina.cpp index f979affef..9b7be8276 100644 --- a/scripts/northrend/naxxramas/boss_faerlina.cpp +++ b/scripts/northrend/naxxramas/boss_faerlina.cpp @@ -43,21 +43,21 @@ enum SPELL_ENRAGE = 28798, SPELL_RAINOFFIRE = 39024, //Not sure if targeted AoEs work if casted directly upon a player - SPELL_WIDOWS_EMBRACE = 28732, //We will use it, but the real thing will be another + SPELL_WIDOWS_EMBRACE = 28732, //We will use it, but the real thing will be another SPELL_FIREBALL = 54095 }; struct MANGOS_DLL_DECL boss_faerlinaAI : public ScriptedAI { boss_faerlinaAI(Creature *c) : ScriptedAI(c) - { - pInstance = ((ScriptedInstance*)c->GetInstanceData()); - Reset(); - } + { + pInstance = ((ScriptedInstance*)c->GetInstanceData()); + Reset(); + } - ScriptedInstance *pInstance; + ScriptedInstance *pInstance; - uint32 PoisonBoltVolley_Timer; + uint32 PoisonBoltVolley_Timer; uint32 RainOfFire_Timer; uint32 Enrage_Timer; bool HasTaunted; @@ -70,15 +70,15 @@ struct MANGOS_DLL_DECL boss_faerlinaAI : public ScriptedAI HasTaunted = false; if(pInstance && m_creature->isAlive()) - pInstance->SetData(TYPE_FAERLINA, NOT_STARTED); + pInstance->SetData(TYPE_FAERLINA, NOT_STARTED); } void Aggro(Unit *who) { - //Close the room for boss fight - if(pInstance) pInstance->SetData(TYPE_FAERLINA, IN_PROGRESS); + //Close the room for boss fight + if(pInstance) pInstance->SetData(TYPE_FAERLINA, IN_PROGRESS); - DoScriptText(SAY_AGGRO, m_creature); + DoScriptText(SAY_AGGRO, m_creature); } void MoveInLineOfSight(Unit *who) @@ -99,9 +99,9 @@ struct MANGOS_DLL_DECL boss_faerlinaAI : public ScriptedAI void JustDied(Unit* Killer) { - if(pInstance) pInstance->SetData(TYPE_FAERLINA, DONE); + if(pInstance) pInstance->SetData(TYPE_FAERLINA, DONE); - DoScriptText(SAY_DEATH, m_creature); + DoScriptText(SAY_DEATH, m_creature); } void UpdateAI(const uint32 diff) @@ -127,12 +127,12 @@ struct MANGOS_DLL_DECL boss_faerlinaAI : public ScriptedAI //Enrage_Timer if (Enrage_Timer < diff) { - switch (rand()%3) - { - case 0: DoScriptText(SAY_ENRAGE1, m_creature); break; - case 1: DoScriptText(SAY_ENRAGE2, m_creature); break; - case 2: DoScriptText(SAY_ENRAGE3, m_creature); break; - } + switch (rand()%3) + { + case 0: DoScriptText(SAY_ENRAGE1, m_creature); break; + case 1: DoScriptText(SAY_ENRAGE2, m_creature); break; + case 2: DoScriptText(SAY_ENRAGE3, m_creature); break; + } DoCast(m_creature,SPELL_ENRAGE); Enrage_Timer = 61000; }else Enrage_Timer -= diff; @@ -149,18 +149,18 @@ CreatureAI* GetAI_boss_faerlina(Creature *_Creature) struct MANGOS_DLL_DECL mob_faerlina_worshipperAI : public ScriptedAI { mob_faerlina_worshipperAI(Creature *c) : ScriptedAI(c) - { - pInstance = ((ScriptedInstance*)c->GetInstanceData()); - Reset(); - } + { + pInstance = ((ScriptedInstance*)c->GetInstanceData()); + Reset(); + } - ScriptedInstance *pInstance; - uint32 fireball_timer; + ScriptedInstance *pInstance; + uint32 fireball_timer; - void Reset() - { - fireball_timer = 0; - } + void Reset() + { + fireball_timer = 0; + } void Aggro(Unit *who){} @@ -169,9 +169,9 @@ struct MANGOS_DLL_DECL mob_faerlina_worshipperAI : public ScriptedAI #ifndef SPELL_28732_NOT_YET_IMPLEMENTED DoCast(m_creature,SPELL_WIDOWS_EMBRACE,true); #else - Unit* Faerlina = Unit::GetUnit((*m_creature), pInstance->GetData64(GUID_FAERLINA)); - if(Faerlina && m_creature->GetDistance2d(Faerlina) < 15.0f) - Faerlina->RemoveAurasByCasterSpell(SPELL_ENRAGE,pInstance->GetData64(GUID_FAERLINA)); + Unit* Faerlina = Unit::GetUnit((*m_creature), pInstance->GetData64(GUID_FAERLINA)); + if(Faerlina && m_creature->GetDistance2d(Faerlina) < 15.0f) + Faerlina->RemoveAurasByCasterSpell(SPELL_ENRAGE,pInstance->GetData64(GUID_FAERLINA)); #endif } @@ -181,7 +181,7 @@ struct MANGOS_DLL_DECL mob_faerlina_worshipperAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //PoisonBoltVolley_Timer + //PoisonBoltVolley_Timer if (fireball_timer < diff) { DoCast(m_creature->getVictim(),SPELL_FIREBALL); @@ -204,7 +204,7 @@ void AddSC_boss_faerlina() newscript->GetAI = &GetAI_boss_faerlina; newscript->RegisterSelf(); - newscript = new Script; + newscript = new Script; newscript->Name = "mob_faerlina_worshipper"; newscript->GetAI = &GetAI_mob_faerlina_worshipper; newscript->RegisterSelf(); diff --git a/scripts/northrend/naxxramas/boss_four_horsemen.cpp b/scripts/northrend/naxxramas/boss_four_horsemen.cpp index 708351177..8337fe3d4 100644 --- a/scripts/northrend/naxxramas/boss_four_horsemen.cpp +++ b/scripts/northrend/naxxramas/boss_four_horsemen.cpp @@ -126,14 +126,14 @@ struct MANGOS_DLL_DECL boss_lady_blaumeuxAI : public ScriptedAI if(VoidZone_Timer < diff) { Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); - if(target) DoCast(target, Regular ? H_SPELL_VOIDZONE : SPELL_VOIDZONE); + if(target) DoCast(target, Regular ? SPELL_VOIDZONE : H_SPELL_VOIDZONE); VoidZone_Timer = 12000; } else VoidZone_Timer -= diff; if(ShadowboltTimer < diff) { - DoCast(m_creature->getVictim(), Regular ? H_SPELL_SHADOW_BOLT : SPELL_SHADOW_BOLT); + DoCast(m_creature->getVictim(), Regular ? SPELL_SHADOW_BOLT : H_SPELL_SHADOW_BOLT); ShadowboltTimer = 3000; } else ShadowboltTimer -= diff; @@ -246,7 +246,7 @@ struct MANGOS_DLL_DECL boss_rivendare_naxxAI : public ScriptedAI //Unholy Shadow if(UnholyShadowTimer < diff) { - DoCast(m_creature->getVictim(), Regular ? H_SPELL_UNHOLY_SHADOW : SPELL_UNHOLY_SHADOW); + DoCast(m_creature->getVictim(), Regular ? SPELL_UNHOLY_SHADOW : H_SPELL_UNHOLY_SHADOW); UnholyShadowTimer = 15000; } else UnholyShadowTimer -= diff; @@ -351,7 +351,7 @@ struct MANGOS_DLL_DECL boss_thane_korthazzAI : public ScriptedAI // Meteor if (Meteor_Timer < diff) { - DoCast(m_creature->getVictim(), Regular ? H_SPELL_METEOR : SPELL_METEOR); + DoCast(m_creature->getVictim(), Regular ? SPELL_METEOR : H_SPELL_METEOR); Meteor_Timer = 25000; } else Meteor_Timer -= diff; @@ -461,14 +461,14 @@ struct MANGOS_DLL_DECL boss_sir_zeliekAI : public ScriptedAI // Holy Wrath if(HolyWrath_Timer < diff) { - DoCast(m_creature->getVictim(),Regular ? H_SPELL_HOLY_WRATH : SPELL_HOLY_WRATH); + DoCast(m_creature->getVictim(),Regular ? SPELL_HOLY_WRATH : H_SPELL_HOLY_WRATH); HolyWrath_Timer = 12000; } else HolyWrath_Timer -= diff; if(HolyBoltTimer < diff) { - DoCast(m_creature->getVictim(), Regular ? H_SPELL_HOLY_BOLT : SPELL_HOLY_BOLT); + DoCast(m_creature->getVictim(), Regular ? SPELL_HOLY_BOLT : H_SPELL_HOLY_BOLT); HolyBoltTimer = 3000; } else HolyBoltTimer -= diff; diff --git a/scripts/northrend/naxxramas/boss_gluth.cpp b/scripts/northrend/naxxramas/boss_gluth.cpp index 84032fb44..7ed8e6646 100644 --- a/scripts/northrend/naxxramas/boss_gluth.cpp +++ b/scripts/northrend/naxxramas/boss_gluth.cpp @@ -147,7 +147,7 @@ struct MANGOS_DLL_DECL boss_gluthAI : public ScriptedAI //Enrage_Timer if (Enrage_Timer < diff) { - DoCast(m_creature, Regular ? SPELL_ENRAGE_H : SPELL_ENRAGE); + DoCast(m_creature, Regular ? SPELL_ENRAGE : SPELL_ENRAGE_H); Enrage_Timer = 60000; }else Enrage_Timer -= diff; @@ -161,7 +161,7 @@ struct MANGOS_DLL_DECL boss_gluthAI : public ScriptedAI addsGuid.push_back(pZombie->GetGUID()); } - if (Regular) + if (!Regular) { if (Creature* pZombie = m_creature->SummonCreature(NPC_ZOMBIE_CHOW,ADD_1X,ADD_1Y,ADD_1Z,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000)) { diff --git a/scripts/northrend/naxxramas/boss_gothik.cpp b/scripts/northrend/naxxramas/boss_gothik.cpp index 72d9cee8c..397481e27 100644 --- a/scripts/northrend/naxxramas/boss_gothik.cpp +++ b/scripts/northrend/naxxramas/boss_gothik.cpp @@ -89,7 +89,7 @@ struct MANGOS_DLL_DECL boss_gothikAI : public ScriptedAI pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Regular = pCreature->GetMap()->IsRegularDifficulty(); - trainees = Regular ? 3 : 2; + trainees = Regular ? 2 : 3; LiveX[0]=2669.430176; LiveY[0]=-3430.828613; LiveZ[0]=268.563049; LiveX[1]=2692.187988; LiveY[1]=-3431.384277; LiveZ[1]=268.563538; @@ -244,7 +244,7 @@ struct MANGOS_DLL_DECL boss_gothikAI : public ScriptedAI //cast shadowbolts if(Shadowbolt_Timer < diff) { - DoCast(m_creature->getVictim(), Regular ? H_SP_SHADOWBOLT : SP_SHADOWBOLT); + DoCast(m_creature->getVictim(), Regular ? SP_SHADOWBOLT : H_SP_SHADOWBOLT); Shadowbolt_Timer = 1200; } else Shadowbolt_Timer -= diff; @@ -262,7 +262,7 @@ struct MANGOS_DLL_DECL boss_gothikAI : public ScriptedAI { if(Shadowbolt_Timer < diff) { - DoCast(m_creature->getVictim(), Regular ? H_SP_SHADOWBOLT : SP_SHADOWBOLT); + DoCast(m_creature->getVictim(), Regular ? SP_SHADOWBOLT : H_SP_SHADOWBOLT); Shadowbolt_Timer = 1200; } else Shadowbolt_Timer -= diff; @@ -323,7 +323,7 @@ struct MANGOS_DLL_DECL mob_gothik_trainee_addAI : public ScriptedAI { if(PlagueTimer < diff) { - DoCast(m_creature->getVictim(), Regular ? H_SP_DEATH_PLAGUE : SP_DEATH_PLAGUE); + DoCast(m_creature->getVictim(), Regular ? SP_DEATH_PLAGUE : H_SP_DEATH_PLAGUE); PlagueTimer = 3500; } PlagueTimer -= diff; @@ -332,7 +332,7 @@ struct MANGOS_DLL_DECL mob_gothik_trainee_addAI : public ScriptedAI { if(ExplosionTimer < diff) { - DoCast(m_creature, Regular ? H_SP_EXPLOSION : SP_EXPLOSION); + DoCast(m_creature, Regular ? SP_EXPLOSION : H_SP_EXPLOSION); ExplosionTimer = 5000+rand()%10000; } ExplosionTimer -= diff; @@ -466,9 +466,9 @@ struct MANGOS_DLL_DECL mob_gothik_rider_addAI : public ScriptedAI { target = Unit::GetUnit((*m_creature),(*i)->getUnitGuid()); if(target && target->isAlive() && target->HasAura(SP_SHADOW_MARK)) - DoCast(target, Regular ? H_SP_SHADOW_VOLLEY : SP_SHADOW_VOLLEY); + DoCast(target, Regular ? SP_SHADOW_VOLLEY : H_SP_SHADOW_VOLLEY); }*/ - DoCast(m_creature->getVictim(), Regular ? H_SP_SHADOW_VOLLEY : SP_SHADOW_VOLLEY); + DoCast(m_creature->getVictim(), Regular ? SP_SHADOW_VOLLEY : H_SP_SHADOW_VOLLEY); VolleyTimer = 10000+rand()%10000; } else VolleyTimer -= diff; @@ -478,7 +478,7 @@ struct MANGOS_DLL_DECL mob_gothik_rider_addAI : public ScriptedAI if(DrainTimer < diff) { Unit *target = SelectUnit(SELECT_TARGET_TOPAGGRO, 0); - if(target) DoCast(target, Regular ? H_SP_DRAIN_LIFE : SP_DRAIN_LIFE); + if(target) DoCast(target, Regular ? SP_DRAIN_LIFE : H_SP_DRAIN_LIFE); DrainTimer = 10000+rand()%10000; } else DrainTimer -= diff; diff --git a/scripts/northrend/naxxramas/boss_grobbulus.cpp b/scripts/northrend/naxxramas/boss_grobbulus.cpp index 84bebdba3..7b8416745 100644 --- a/scripts/northrend/naxxramas/boss_grobbulus.cpp +++ b/scripts/northrend/naxxramas/boss_grobbulus.cpp @@ -29,15 +29,15 @@ Enrages 26527*/ struct MANGOS_DLL_DECL boss_grobbulusAI : public ScriptedAI { - boss_grobbulusAI(Creature *pCreature) : ScriptedAI(pCreature) + boss_grobbulusAI(Creature *pCreature) : ScriptedAI(pCreature) { Reset(); } uint32 EnrageTimer; - uint32 MutatingInjectionTimer; - uint32 PoisonCloudTimer; - uint32 SlimeSprayTimer; + uint32 MutatingInjectionTimer; + uint32 PoisonCloudTimer; + uint32 SlimeSprayTimer; void Reset() { @@ -49,8 +49,8 @@ struct MANGOS_DLL_DECL boss_grobbulusAI : public ScriptedAI void Aggro(Unit *who) {} void UpdateAI(const uint32 diff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; if(SlimeSprayTimer < diff) @@ -69,13 +69,13 @@ struct MANGOS_DLL_DECL boss_grobbulusAI : public ScriptedAI else MutatingInjectionTimer -= diff; if(EnrageTimer < diff) - { - DoCast(m_creature, SP_ENRAGE); - EnrageTimer = 120000; - } - else EnrageTimer -= diff; + { + DoCast(m_creature, SP_ENRAGE); + EnrageTimer = 120000; + } + else EnrageTimer -= diff; - DoMeleeAttackIfReady(); + DoMeleeAttackIfReady(); } }; diff --git a/scripts/northrend/naxxramas/boss_kelthuzad.cpp b/scripts/northrend/naxxramas/boss_kelthuzad.cpp index 388536023..b914db05b 100644 --- a/scripts/northrend/naxxramas/boss_kelthuzad.cpp +++ b/scripts/northrend/naxxramas/boss_kelthuzad.cpp @@ -52,7 +52,7 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI { pInstance = (ScriptedInstance*)c->GetInstanceData(); Regular = m_creature->GetMap()->IsRegularDifficulty(); - MaxGuardians = Regular ? 4 : 2; + MaxGuardians = Regular ? 2 : 4; Reset(); } @@ -182,7 +182,7 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0); mob->AddThreat(target, 1.0f); mob->GetMotionMaster()->MoveChase(target); - Abomination_Timer = Regular ? (30000+rand()%15000) : (40000+rand()%15000); + Abomination_Timer = Regular ? (40000+rand()%15000) : (30000+rand()%15000); } else Abomination_Timer -= diff; @@ -193,7 +193,7 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0); mob->AddThreat(target, 1.0f); mob->GetMotionMaster()->MoveChase(target); - Banshee_Timer = Regular ? (17000+rand()%10000) : (20000+rand()%15000); + Banshee_Timer = Regular ? (20000+rand()%15000) : (17000+rand()%10000); } else Banshee_Timer -= diff; } @@ -203,7 +203,7 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI //Frostbolt Volley if(FrostboltV_Timer < diff) { - DoCast(m_creature->getVictim(), Regular ? H_SP_FROSTBOLT_VOLLEY : SP_FROSTBOLT_VOLLEY); + DoCast(m_creature->getVictim(), Regular ? SP_FROSTBOLT_VOLLEY : H_SP_FROSTBOLT_VOLLEY); FrostboltV_Timer = 15000 + rand()%5000; } else FrostboltV_Timer -= diff; @@ -237,7 +237,7 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI //Frostbolt if(Frostbolt_Timer < diff) { - DoCast(m_creature->getVictim(), Regular ? H_SP_FROSTBOLT : SP_FROSTBOLT); + DoCast(m_creature->getVictim(), Regular ? SP_FROSTBOLT : H_SP_FROSTBOLT); Frostbolt_Timer = 5000 + rand()%10000; } else Frostbolt_Timer -= diff; diff --git a/scripts/northrend/naxxramas/boss_loatheb.cpp b/scripts/northrend/naxxramas/boss_loatheb.cpp index d0ae4f147..182597f21 100644 --- a/scripts/northrend/naxxramas/boss_loatheb.cpp +++ b/scripts/northrend/naxxramas/boss_loatheb.cpp @@ -35,7 +35,7 @@ update creature_template set ScriptName="boss_loatheb" where entry=16011 #define SPELL_INEVITABLE_DOOM 29204 //Mob Loatheb Spore and his spell -#define MOB_LOATHEB_SPORE 16286 +#define MOB_LOATHEB_SPORE 16286 #define SPELL_FUNGAL_CREEP 29232 //Loatheb Spore spawn places @@ -53,7 +53,7 @@ update creature_template set ScriptName="boss_loatheb" where entry=16011 struct MANGOS_DLL_DECL boss_loathebAI : public ScriptedAI { - boss_loathebAI(Creature *c) : ScriptedAI(c) + boss_loathebAI(Creature *c) : ScriptedAI(c) { pInstance = (ScriptedInstance*)c->GetInstanceData(); Reset(); @@ -74,13 +74,13 @@ struct MANGOS_DLL_DECL boss_loathebAI : public ScriptedAI InevitableDoom_Cooldown = 40000; //This is cooldown for Doom spell. 40000 means 30sec //cooldown + 10sec spelltime, so next doom will be cast 30 sec - //after first ends. cooldown decreases by 5 sec after each doom + //after first ends. cooldown decreases by 5 sec after each doom Summon_Timer = 8000; if(pInstance) pInstance->SetData(TYPE_LOATHEB, NOT_STARTED); - } + } - void Aggro(Unit *who) + void Aggro(Unit *who) { if(pInstance) pInstance->SetData(TYPE_LOATHEB, IN_PROGRESS); } @@ -114,8 +114,8 @@ struct MANGOS_DLL_DECL boss_loathebAI : public ScriptedAI { DoCast(m_creature->getVictim(),SPELL_INEVITABLE_DOOM); InevitableDoom_Timer = InevitableDoom_Cooldown; - if (InevitableDoom_Cooldown > 15000) - InevitableDoom_Cooldown -= 5000; + if (InevitableDoom_Cooldown > 15000) + InevitableDoom_Cooldown -= 5000; }else InevitableDoom_Timer -= diff; //Summon_Timer @@ -129,13 +129,13 @@ struct MANGOS_DLL_DECL boss_loathebAI : public ScriptedAI break; case 1: SummonedSpores = m_creature->SummonCreature(16286,ADD_2X,ADD_2Y,ADD_2Z,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000); - break; + break; case 2: SummonedSpores = m_creature->SummonCreature(16286,ADD_3X,ADD_3Y,ADD_3Z,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000); - break; - }; + break; + }; if (SummonedSpores) - SummonedSpores->AddThreat(m_creature->getVictim(), 1.0f); + SummonedSpores->AddThreat(m_creature->getVictim(), 1.0f); Summon_Timer = 24000; } else Summon_Timer -= diff; @@ -176,7 +176,7 @@ CreatureAI* GetAI_mob_loatheb_spores(Creature *_Creature) void AddSC_boss_loatheb() { - Script *newscript; + Script *newscript; newscript = new Script; newscript->Name = "boss_loatheb"; newscript->GetAI = &GetAI_boss_loatheb; diff --git a/scripts/northrend/naxxramas/boss_maexxna.cpp b/scripts/northrend/naxxramas/boss_maexxna.cpp index d4a213aa4..3899b0abc 100644 --- a/scripts/northrend/naxxramas/boss_maexxna.cpp +++ b/scripts/northrend/naxxramas/boss_maexxna.cpp @@ -196,21 +196,21 @@ struct MANGOS_DLL_DECL boss_maexxnaAI : public ScriptedAI //WebSpray_Timer if (WebSpray_Timer < diff) { - DoCast(m_creature->getVictim(), Regular ? H_SPELL_WEBSPRAY : SPELL_WEBSPRAY); + DoCast(m_creature->getVictim(), Regular ? SPELL_WEBSPRAY : H_SPELL_WEBSPRAY); WebSpray_Timer = 40000; }else WebSpray_Timer -= diff; //PoisonShock_Timer if (PoisonShock_Timer < diff) { - DoCast(m_creature->getVictim(), Regular ? H_SPELL_POISONSHOCK : SPELL_POISONSHOCK); + DoCast(m_creature->getVictim(), Regular ? SPELL_POISONSHOCK : H_SPELL_POISONSHOCK); PoisonShock_Timer = 20000; }else PoisonShock_Timer -= diff; //NecroticPoison_Timer if (NecroticPoison_Timer < diff) { - DoCast(m_creature->getVictim(), Regular ? H_SPELL_NECROTICPOISON : SPELL_NECROTICPOISON); + DoCast(m_creature->getVictim(), Regular ? SPELL_NECROTICPOISON : H_SPELL_NECROTICPOISON); NecroticPoison_Timer = 30000; }else NecroticPoison_Timer -= diff; @@ -224,7 +224,7 @@ struct MANGOS_DLL_DECL boss_maexxnaAI : public ScriptedAI //Enrage if not already enraged and below 30% if (!Enraged && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 30) { - DoCast(m_creature, Regular ? H_SPELL_FRENZY : SPELL_FRENZY); + DoCast(m_creature, Regular ? SPELL_FRENZY : H_SPELL_FRENZY); Enraged = true; } diff --git a/scripts/northrend/naxxramas/boss_noth.cpp b/scripts/northrend/naxxramas/boss_noth.cpp index d11644975..3920e8dc6 100644 --- a/scripts/northrend/naxxramas/boss_noth.cpp +++ b/scripts/northrend/naxxramas/boss_noth.cpp @@ -59,8 +59,8 @@ struct MANGOS_DLL_DECL boss_nothAI : public ScriptedAI { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Regular = pCreature->GetMap()->IsRegularDifficulty(); - AddsCount = Regular ? 3 : 2; //normal phase - BalconyAddsCount = Regular ? 4 : 2; //balcony phase + AddsCount = Regular ? 2 : 3; //normal phase + BalconyAddsCount = Regular ? 2 : 4; //balcony phase Reset(); } @@ -170,7 +170,7 @@ struct MANGOS_DLL_DECL boss_nothAI : public ScriptedAI if (BlinkTimer < diff) { DoCast(m_creature->getVictim(),SPELL_CRIPPLE); - if(Regular) + if(!Regular) { DoCast(m_creature, SPELL_BLINK); DoResetThreat(); diff --git a/scripts/northrend/naxxramas/boss_patchwerk.cpp b/scripts/northrend/naxxramas/boss_patchwerk.cpp index ce9e78b56..94584b02a 100644 --- a/scripts/northrend/naxxramas/boss_patchwerk.cpp +++ b/scripts/northrend/naxxramas/boss_patchwerk.cpp @@ -106,7 +106,7 @@ struct MANGOS_DLL_DECL boss_patchwerkAI : public ScriptedAI } if (pMostHPTarget) - DoCast(pMostHPTarget, Regular ? H_SPELL_HATEFULSTRIKE : SPELL_HATEFULSTRIKE); + DoCast(pMostHPTarget, Regular ? SPELL_HATEFULSTRIKE : H_SPELL_HATEFULSTRIKE); HatefullStrike_Timer = 1200; }else HatefullStrike_Timer -= diff; diff --git a/scripts/northrend/naxxramas/boss_razuvious.cpp b/scripts/northrend/naxxramas/boss_razuvious.cpp index 79e6f6735..00f268111 100644 --- a/scripts/northrend/naxxramas/boss_razuvious.cpp +++ b/scripts/northrend/naxxramas/boss_razuvious.cpp @@ -119,7 +119,7 @@ struct MANGOS_DLL_DECL boss_razuviousAI : public ScriptedAI // Disrupting Shout if (m_uiDisruptingShoutTimer < uiDiff) { - DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_DISRUPTING_SHOUT_H : SPELL_DISRUPTING_SHOUT); + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_DISRUPTING_SHOUT : SPELL_DISRUPTING_SHOUT_H); m_uiDisruptingShoutTimer = 25000; } else diff --git a/scripts/northrend/naxxramas/boss_sapphiron.cpp b/scripts/northrend/naxxramas/boss_sapphiron.cpp index 82d94e596..76bd475d2 100644 --- a/scripts/northrend/naxxramas/boss_sapphiron.cpp +++ b/scripts/northrend/naxxramas/boss_sapphiron.cpp @@ -91,7 +91,7 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI { if (FrostAura_Timer < diff) { - DoCast(m_creature->getVictim(), Regular ? H_SPELL_FROST_AURA : SPELL_FROST_AURA); + DoCast(m_creature->getVictim(), Regular ? SPELL_FROST_AURA : H_SPELL_FROST_AURA); FrostAura_Timer = 5000; } else FrostAura_Timer -= diff; @@ -99,7 +99,7 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI if (LifeDrain_Timer < diff) { if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(target, Regular ? H_SPELL_LIFE_DRAIN : SPELL_LIFE_DRAIN); + DoCast(target, Regular ? SPELL_LIFE_DRAIN : H_SPELL_LIFE_DRAIN); LifeDrain_Timer = 24000; } @@ -108,7 +108,7 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI if (Blizzard_Timer < diff) { if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(target, Regular ? H_SPELL_BLIZZARD : SPELL_BLIZZARD); + DoCast(target, Regular ? SPELL_BLIZZARD : H_SPELL_BLIZZARD); Blizzard_Timer = 20000; } @@ -116,7 +116,7 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI if(TailSweep_Timer < diff) { - DoCast(m_creature->getVictim(), Regular ? H_SPELL_TAIL_SWEEP : SPELL_TAIL_SWEEP); + DoCast(m_creature->getVictim(), Regular ? SPELL_TAIL_SWEEP : H_SPELL_TAIL_SWEEP); TailSweep_Timer = 10000 + rand()%10000; } else TailSweep_Timer -= diff; diff --git a/scripts/northrend/naxxramas/instance_naxxramas.cpp b/scripts/northrend/naxxramas/instance_naxxramas.cpp index 16a543388..52703f44c 100644 --- a/scripts/northrend/naxxramas/instance_naxxramas.cpp +++ b/scripts/northrend/naxxramas/instance_naxxramas.cpp @@ -117,8 +117,8 @@ struct MANGOS_DLL_DECL instance_naxxramas : public ScriptedInstance case GO_MILI_GOTH_EXIT_GATE: mGothikExitDoorGUID = pGo->GetGUID(); break; case GO_MILI_GOTH_COMBAT_GATE: mGothikCombatDoorGUID = pGo->GetGUID(); break; case GO_CONS_GLUT_EXIT_DOOR: mGluthDoorGUID = pGo->GetGUID(); break; - case GO_CHEST_HORSEMEN_NORM: if(!Regular) mHorsemenChestGUID = pGo->GetGUID(); break; - case GO_CHEST_HORSEMEN_HERO: if(Regular) mHorsemenChestGUID = pGo->GetGUID(); break; + case GO_CHEST_HORSEMEN_NORM: if(Regular) mHorsemenChestGUID = pGo->GetGUID(); break; + case GO_CHEST_HORSEMEN_HERO: if(!Regular) mHorsemenChestGUID = pGo->GetGUID(); break; case GO_MILI_HORSEMEN_DOOR: mHorsemenDoorGUID = pGo->GetGUID(); break; } } From 4e71b65bd858a2bd8d7d5df2523b6dcfba84b235 Mon Sep 17 00:00:00 2001 From: Insider Date: Mon, 23 Nov 2009 00:00:09 +0700 Subject: [PATCH 050/405] Fixed instance mode detection for [patch 7] --- .../northrend/ulduar/ulduar/boss_algalon.cpp | 2 +- .../northrend/ulduar/ulduar/boss_auriaya.cpp | 2 +- .../northrend/ulduar/ulduar/boss_freya.cpp | 4 +-- .../northrend/ulduar/ulduar/boss_hodir.cpp | 2 +- .../northrend/ulduar/ulduar/boss_ignis.cpp | 6 ++-- .../ulduar/ulduar/boss_iron_council.cpp | 10 +++--- .../northrend/ulduar/ulduar/boss_kologarn.cpp | 6 ++-- .../ulduar/ulduar/boss_razorscale.cpp | 8 ++--- .../northrend/ulduar/ulduar/boss_xt_002.cpp | 12 +++---- .../ulduar/ulduar/instance_ulduar.cpp | 32 +++++++++---------- 10 files changed, 42 insertions(+), 42 deletions(-) diff --git a/scripts/northrend/ulduar/ulduar/boss_algalon.cpp b/scripts/northrend/ulduar/ulduar/boss_algalon.cpp index b4b9bc4d1..e74792f8c 100644 --- a/scripts/northrend/ulduar/ulduar/boss_algalon.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_algalon.cpp @@ -47,7 +47,7 @@ struct MANGOS_DLL_DECL boss_algalonAI : public ScriptedAI if(QuantumStrikeTimer < diff) { - DoCast(m_creature->getVictim(), Regular ? H_SP_QUANTUM_STRIKE : SP_QUANTUM_STRIKE); + DoCast(m_creature->getVictim(), Regular ? SP_QUANTUM_STRIKE : H_SP_QUANTUM_STRIKE); QuantumStrikeTimer = 4000 + rand()%10000; } else QuantumStrikeTimer -= diff; diff --git a/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp b/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp index 3b9f4ecd4..49503eba0 100644 --- a/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp @@ -69,7 +69,7 @@ struct MANGOS_DLL_DECL boss_auriayaAI : public ScriptedAI if (ScreechTimer < diff) { - DoCast(m_creature, Regular ? H_SP_SONIC_SCREECH : SP_SONIC_SCREECH); + DoCast(m_creature, Regular ? SP_SONIC_SCREECH : H_SP_SONIC_SCREECH); ScreechTimer = 25000 + rand()%15000; } else ScreechTimer -= diff; diff --git a/scripts/northrend/ulduar/ulduar/boss_freya.cpp b/scripts/northrend/ulduar/ulduar/boss_freya.cpp index 3b5ca2012..99e8a7e86 100644 --- a/scripts/northrend/ulduar/ulduar/boss_freya.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_freya.cpp @@ -71,7 +71,7 @@ struct MANGOS_DLL_DECL boss_freyaAI : public ScriptedAI m_creature->AddAura(new AttunedToNatureAura(sp, 0, &bp, m_creature, m_creature)); m_creature->GetAura(SP_ATTUNED_TO_NATURE, 0)->SetStackAmount(150); - DoCast(m_creature, Regular ? H_SP_TOUCH_OF_EONAR : SP_TOUCH_OF_EONAR); + DoCast(m_creature, Regular ? SP_TOUCH_OF_EONAR : H_SP_TOUCH_OF_EONAR); if(pInstance) pInstance->SetData(TYPE_FREYA, IN_PROGRESS); } @@ -177,7 +177,7 @@ struct MANGOS_DLL_DECL boss_freyaAI : public ScriptedAI if(SunbeamTimer < diff) { if( Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(target, Regular ? H_SP_SUNBEAM : SP_SUNBEAM); + DoCast(target, Regular ? SP_SUNBEAM : H_SP_SUNBEAM); SunbeamTimer = 6000 + rand()%10000; } else SunbeamTimer -= diff; diff --git a/scripts/northrend/ulduar/ulduar/boss_hodir.cpp b/scripts/northrend/ulduar/ulduar/boss_hodir.cpp index 7d1280a8d..24d721381 100644 --- a/scripts/northrend/ulduar/ulduar/boss_hodir.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_hodir.cpp @@ -89,7 +89,7 @@ struct MANGOS_DLL_DECL boss_hodirAI : public ScriptedAI if(FrozenBlowsTimer < diff) { DoPlaySoundToSet(m_creature, SOUND_FROZEN_BLOWS); - DoCast(m_creature, Regular ? H_SP_FROZEN_BLOWS : SP_FROZEN_BLOWS); + DoCast(m_creature, Regular ? SP_FROZEN_BLOWS : H_SP_FROZEN_BLOWS); FrozenBlowsTimer = 60000; } else FrozenBlowsTimer -= diff; diff --git a/scripts/northrend/ulduar/ulduar/boss_ignis.cpp b/scripts/northrend/ulduar/ulduar/boss_ignis.cpp index 920f89232..bbcb9f368 100644 --- a/scripts/northrend/ulduar/ulduar/boss_ignis.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_ignis.cpp @@ -58,14 +58,14 @@ struct MANGOS_DLL_DECL boss_ignisAI : public ScriptedAI if (ScorchTimer < diff) { - DoCast(m_creature->getVictim(), Regular ? H_SP_SCORCH : SP_SCORCH); + DoCast(m_creature->getVictim(), Regular ? SP_SCORCH : H_SP_SCORCH); ScorchTimer = 25000; } else ScorchTimer -= diff; if (FlameJetsTimer < diff) { - DoCast(m_creature->getVictim(), Regular ? H_SP_FLAME_JETS : SP_FLAME_JETS); + DoCast(m_creature->getVictim(), Regular ? SP_FLAME_JETS : H_SP_FLAME_JETS); FlameJetsTimer = 20000+rand()%10000; } else FlameJetsTimer -= diff; @@ -74,7 +74,7 @@ struct MANGOS_DLL_DECL boss_ignisAI : public ScriptedAI { Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); if(target && target->isAlive()) - DoCast(target, Regular ? H_SP_SLAG_POT : SP_SLAG_POT); + DoCast(target, Regular ? SP_SLAG_POT : H_SP_SLAG_POT); SlagPotTimer = 15000; } else SlagPotTimer -= diff;*/ diff --git a/scripts/northrend/ulduar/ulduar/boss_iron_council.cpp b/scripts/northrend/ulduar/ulduar/boss_iron_council.cpp index aa98ecf19..03914fb57 100644 --- a/scripts/northrend/ulduar/ulduar/boss_iron_council.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_iron_council.cpp @@ -122,7 +122,7 @@ struct MANGOS_DLL_DECL boss_steelbreakerAI : public iron_councilAI void Aggro(Unit *who) { - DoCast(m_creature, Regular ? H_SP_HIGH_VOLTAGE : SP_HIGH_VOLTAGE); + DoCast(m_creature, Regular ? SP_HIGH_VOLTAGE : H_SP_HIGH_VOLTAGE); } void UpdateAI(const uint32 diff) @@ -132,7 +132,7 @@ struct MANGOS_DLL_DECL boss_steelbreakerAI : public iron_councilAI if(PunchTimer < diff) { - DoCast(m_creature->getVictim(), Regular ? H_SP_FUSION_PUNCH : SP_FUSION_PUNCH); + DoCast(m_creature->getVictim(), Regular ? SP_FUSION_PUNCH : H_SP_FUSION_PUNCH); PunchTimer = 30000; } else PunchTimer -= diff; @@ -172,7 +172,7 @@ struct MANGOS_DLL_DECL boss_brundirAI : public iron_councilAI if(OverloadTimer < diff) { - DoCast(m_creature->getVictim(), Regular ? H_SP_OVERLOAD : SP_OVERLOAD); + DoCast(m_creature->getVictim(), Regular ? SP_OVERLOAD : H_SP_OVERLOAD); OverloadTimer = 60000; } else OverloadTimer -= diff; @@ -181,7 +181,7 @@ struct MANGOS_DLL_DECL boss_brundirAI : public iron_councilAI { Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); if(target && target->isAlive()) - DoCast(target, Regular ? H_SP_CHAIN_LIGHTNING : SP_CHAIN_LIGHTNING); + DoCast(target, Regular ? SP_CHAIN_LIGHTNING : H_SP_CHAIN_LIGHTNING); LightningTimer = 5000 + rand()%5000; } else LightningTimer -= diff; @@ -235,7 +235,7 @@ struct MANGOS_DLL_DECL boss_molgeimAI : public iron_councilAI if(DeathRuneTimer < diff) { Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); - if(target) DoCast(target, Regular ? H_SP_RUNE_OF_DEATH : SP_RUNE_OF_DEATH); + if(target) DoCast(target, Regular ? SP_RUNE_OF_DEATH : H_SP_RUNE_OF_DEATH); } } diff --git a/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp b/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp index 51108be00..8f8a89fc4 100644 --- a/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp @@ -92,7 +92,7 @@ struct MANGOS_DLL_DECL boss_kologarnAI : public Scripted_NoMovementAI if(BreathTimer < diff) { if(!m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE)) - DoCast(m_creature->getVictim(), Regular ? H_SP_PETRIFYING_BREATH : SP_PETRIFYING_BREATH); + DoCast(m_creature->getVictim(), Regular ? SP_PETRIFYING_BREATH : H_SP_PETRIFYING_BREATH); BreathTimer = 5000; } else BreathTimer -= diff; @@ -207,7 +207,7 @@ struct MANGOS_DLL_DECL boss_kologarn_right_armAI : public Scripted_NoMovementAI GrippedPlayer = NULL; Gripped = false; GripTimer = 10000 + rand()%10000; - GripThreshold = Regular ? 480000 : 100000; + GripThreshold = Regular ? 100000 : 480000; } void Aggro(Unit *who) {} @@ -252,7 +252,7 @@ struct MANGOS_DLL_DECL boss_kologarn_right_armAI : public Scripted_NoMovementAI GrippedPlayer = NULL; GripTimer = 10000 + rand()%10000; Gripped = false; - GripThreshold = Regular ? 400000 : 100000; + GripThreshold = Regular ? 100000 : 400000; } } else diff --git a/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp b/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp index f77a7b691..872a7f395 100644 --- a/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp @@ -87,21 +87,21 @@ struct MANGOS_DLL_DECL boss_razorscaleAI : public ScriptedAI { Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); if(target && target->isAlive()) - DoCast(target, Regular ? H_SP_DEVOURING_FLAME : SP_DEVOURING_FLAME); + DoCast(target, Regular ? SP_DEVOURING_FLAME : H_SP_DEVOURING_FLAME); DevouringFlameTimer = 9000+rand()%3000; } else DevouringFlameTimer -= diff; if (FlameBreathTimer < diff) { - DoCast(m_creature->getVictim(), Regular ? H_SP_FLAME_BREATH : SP_FLAME_BREATH); + DoCast(m_creature->getVictim(), Regular ? SP_FLAME_BREATH : H_SP_FLAME_BREATH); FlameBreathTimer = 15000 + rand()%5000; } else FlameBreathTimer -= diff; if (FlameBuffetTimer < diff) { - DoCast(m_creature, Regular ? H_SP_FLAME_BUFFET : SP_FLAME_BUFFET, true); + DoCast(m_creature, Regular ? SP_FLAME_BUFFET : H_SP_FLAME_BUFFET, true); FlameBuffetTimer = 20000 + rand()%15000; } else FlameBuffetTimer -= diff; @@ -110,7 +110,7 @@ struct MANGOS_DLL_DECL boss_razorscaleAI : public ScriptedAI { Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); if(target && target->isAlive()) - DoCast(target, Regular ? H_SP_FIREBALL : SP_FIREBALL); + DoCast(target, Regular ? SP_FIREBALL : H_SP_FIREBALL); FireballTimer = 4000 + rand()%4000; } else FireballTimer -= diff; diff --git a/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp b/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp index 0b669a56a..9c9488818 100644 --- a/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp @@ -43,9 +43,9 @@ struct MANGOS_DLL_DECL boss_xt002 : public ScriptedAI { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Regular = pCreature->GetMap()->IsRegularDifficulty(); - //PummelerCount = Regular ? 2 : 1; - ScrapbotCount = Regular ? 6 : 4; - BoombotCount = Regular ? 4 : 2; + //PummelerCount = Regular ? 1 : 2; + ScrapbotCount = Regular ? 4 : 6; + BoombotCount = Regular ? 2 : 4; AddX[0] = 792.706; AddY[0] = 64.033; AddZ[0] = 413.632; AddX[1] = 879.750; AddY[1] = 64.815; AddZ[1] = 409.804; AddX[2] = 896.488; AddY[2] = -93.018; AddZ[2] = 411.731; @@ -142,7 +142,7 @@ struct MANGOS_DLL_DECL boss_xt002 : public ScriptedAI int i; Creature *add; Unit *target; - if(Regular || (AddsPhaseTimer > 15000)) + if(!Regular || (AddsPhaseTimer > 15000)) { add = m_creature->SummonCreature(CR_PUMMELER, AddX[rnd], AddY[rnd], AddZ[rnd], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); add->SetActiveObjectState(true); @@ -198,7 +198,7 @@ struct MANGOS_DLL_DECL boss_xt002 : public ScriptedAI { Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); if(target && target->isAlive()) - DoCast(target, Regular ? H_SP_SEARING_LIGHT : SP_SEARING_LIGHT); + DoCast(target, Regular ? SP_SEARING_LIGHT : H_SP_SEARING_LIGHT); LightTimer = 10000; } else LightTimer -= diff; @@ -207,7 +207,7 @@ struct MANGOS_DLL_DECL boss_xt002 : public ScriptedAI { Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); if(target && target->isAlive()) - DoCast(target, Regular ? H_SP_GRAVITY : SP_GRAVITY); + DoCast(target, Regular ? SP_GRAVITY : H_SP_GRAVITY); GravityTimer = 15000 + rand()%5000; } else GravityTimer -= diff; diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 989109ced..924f6f1bb 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -120,30 +120,30 @@ struct MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance { //LOOT CACHES: //Cache of Living Stone (Kologarn) - case 195046: if(!Regular) mKologarnCacheGUID = pGo->GetGUID(); break; - case 195047: if(Regular) mKologarnCacheGUID = pGo->GetGUID(); break; + case 195046: if(Regular) mKologarnCacheGUID = pGo->GetGUID(); break; + case 195047: if(!Regular) mKologarnCacheGUID = pGo->GetGUID(); break; //Cache of Winter (Hodir) - case 194307: if(!Regular) mHodirCacheGUID = pGo->GetGUID(); break; - case 194308: if(Regular) mHodirCacheGUID = pGo->GetGUID(); break; + case 194307: if(Regular) mHodirCacheGUID = pGo->GetGUID(); break; + case 194308: if(!Regular) mHodirCacheGUID = pGo->GetGUID(); break; //Rare Cache of Winter (Hodir hard) - case 194200: if(!Regular) mHodirRareCacheGUID = pGo->GetGUID(); break; - case 194201: if(Regular) mHodirRareCacheGUID = pGo->GetGUID(); break; + case 194200: if(Regular) mHodirRareCacheGUID = pGo->GetGUID(); break; + case 194201: if(!Regular) mHodirRareCacheGUID = pGo->GetGUID(); break; //Thorim's cache - case 194312: if(!Regular) mThorimCacheGUID = pGo->GetGUID(); break; - case 194314: if(Regular) mThorimCacheGUID = pGo->GetGUID(); break; + case 194312: if(Regular) mThorimCacheGUID = pGo->GetGUID(); break; + case 194314: if(!Regular) mThorimCacheGUID = pGo->GetGUID(); break; //Thorim's cache (hard) - case 194313: if(!Regular) mThorimHardCacheGUID = pGo->GetGUID(); break; - case 194315: if(Regular) mThorimHardCacheGUID = pGo->GetGUID(); break; + case 194313: if(Regular) mThorimHardCacheGUID = pGo->GetGUID(); break; + case 194315: if(!Regular) mThorimHardCacheGUID = pGo->GetGUID(); break; //Cache of Innovation (Mimiron) - case 194789: if(!Regular) mMimironCacheGUID = pGo->GetGUID(); break; - case 194956: if(Regular) mMimironCacheGUID = pGo->GetGUID(); break; + case 194789: if(Regular) mMimironCacheGUID = pGo->GetGUID(); break; + case 194956: if(!Regular) mMimironCacheGUID = pGo->GetGUID(); break; //Cache of Innovation (Mimiron hard) //Gift of Freya - case 194324: if(!Regular) mFreyaCacheGUID = pGo->GetGUID(); break; - case 194328: if(Regular) mFreyaCacheGUID = pGo->GetGUID(); break; + case 194324: if(Regular) mFreyaCacheGUID = pGo->GetGUID(); break; + case 194328: if(!Regular) mFreyaCacheGUID = pGo->GetGUID(); break; //Gift of the Observer - case 194822: if(!Regular) mAlgalonCacheGUID = pGo->GetGUID(); break; - case 194823: if(Regular) mAlgalonCacheGUID = pGo->GetGUID(); break; + case 194822: if(Regular) mAlgalonCacheGUID = pGo->GetGUID(); break; + case 194823: if(!Regular) mAlgalonCacheGUID = pGo->GetGUID(); break; //DOORS: case 194631: mXT002DoorGUID = pGo->GetGUID(); break; From 3cd47ae2786ef4e1e150de44133acf9e7763815e Mon Sep 17 00:00:00 2001 From: Insider Date: Mon, 23 Nov 2009 01:06:55 +0700 Subject: [PATCH 051/405] Fixed SQL file for [patch 3] --- addition/3_mangos_teleguy.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addition/3_mangos_teleguy.sql b/addition/3_mangos_teleguy.sql index 949322e06..6d2263234 100644 --- a/addition/3_mangos_teleguy.sql +++ b/addition/3_mangos_teleguy.sql @@ -1,2 +1,2 @@ DELETE FROM `creature_template` WHERE `entry`=99001; -INSERT INTO `creature_template` VALUES ('99001','0','0','0','18','0','18','0','Slappy McFry','The Teleport Guy',NULL,'59','61','6700','24000','5598','5875','20','35','35','1','1.48','0','0','181','189','0','158','1','1400','1900','0','0','0','0','0','0','0','0','0','0','100','7','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','1','3','1','1','0','0','0','0','0','0','0','0','1','0','0','0','teleguy'); +INSERT INTO `creature_template` VALUES ('99001','0','0','0','0','0','18','0','18','0','Slappy McFry','The Teleport Guy',NULL,'59','61','6700','24000','5598','5875','20','35','35','1','1.48','0','0','181','189','0','158','1','1400','1900','0','0','0','0','0','0','0','0','0','0','100','7','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','1','3','1','1','0','0','0','0','0','0','0','0','1','0','0','0','teleguy'); From 089a1f0d39bc123c4d5d6c517d391d86546d2d76 Mon Sep 17 00:00:00 2001 From: Insider Date: Mon, 23 Nov 2009 01:09:19 +0700 Subject: [PATCH 052/405] Fixed SQL file for [patch 4] --- addition/4_mangos_arena_honor.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addition/4_mangos_arena_honor.sql b/addition/4_mangos_arena_honor.sql index e56e848e9..a2ff34aab 100644 --- a/addition/4_mangos_arena_honor.sql +++ b/addition/4_mangos_arena_honor.sql @@ -1,2 +1,2 @@ DELETE FROM `creature_template` WHERE `entry`=7; -INSERT INTO `creature_template` VALUES ('7','0','0','0','17858','0','17858','0','Besdoban Durnoye','Arena-Honor Exchange',NULL,'59','61','6700','24000','5598','5875','20','35','35','1','1.48','0','0','170','182','0','1235','1','1400','1900','0','0','0','0','0','0','0','0','0','0','100','7','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','1','3','0','1','0','0','0','0','0','0','0','0','1','0','0','0','npc_arena_honor'); +INSERT INTO `creature_template` VALUES ('7','0','0','0','0','0','17858','0','17858','0','Besdoban Durnoye','Arena-Honor Exchange',NULL,'59','61','6700','24000','5598','5875','20','35','35','1','1.48','0','0','170','182','0','1235','1','1400','1900','0','0','0','0','0','0','0','0','0','0','100','7','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','1','3','0','1','0','0','0','0','0','0','0','0','1','0','0','0','npc_arena_honor'); From bcc34fcd4ffc89a6ff6ad6d8bfc07b3b1ff940d4 Mon Sep 17 00:00:00 2001 From: Insider Date: Mon, 23 Nov 2009 16:26:21 +0700 Subject: [PATCH 053/405] SD2 updated to 1505 --- include/sc_creature.cpp | 41 +++++++++---------- .../blackwing_lair/boss_chromaggus.cpp | 5 +-- .../karazhan/boss_maiden_of_virtue.cpp | 5 ++- .../karazhan/boss_midnight.cpp | 5 ++- .../eastern_kingdoms/karazhan/boss_moroes.cpp | 9 ++-- .../karazhan/boss_prince_malchezaar.cpp | 8 ++-- .../karazhan/boss_shade_of_aran.cpp | 6 +-- .../boss_felblood_kaelthas.cpp | 21 +++++----- .../boss_priestess_delrissa.cpp | 8 ++-- .../eastern_kingdoms/zulaman/boss_janalai.cpp | 5 +-- .../zulaman/boss_malacrass.cpp | 5 +-- .../zulgurub/boss_mandokir.cpp | 4 +- scripts/kalimdor/boss_azuregos.cpp | 5 +-- .../caverns_of_time/hyjal/boss_archimonde.cpp | 8 ++-- .../temple_of_ahnqiraj/boss_cthun.cpp | 4 +- .../temple_of_ahnqiraj/boss_twinemperors.cpp | 11 +++-- .../mob_anubisath_sentinel.cpp | 4 +- scripts/northrend/naxxramas/boss_maexxna.cpp | 8 ++-- .../boss_blackheart_the_inciter.cpp | 4 +- .../boss_grandmaster_vorpil.cpp | 4 +- .../shadow_labyrinth/boss_murmur.cpp | 4 +- .../outland/black_temple/boss_bloodboil.cpp | 7 ++-- scripts/outland/black_temple/boss_illidan.cpp | 15 ++++--- .../black_temple/boss_reliquary_of_souls.cpp | 13 +++--- .../outland/black_temple/boss_supremus.cpp | 5 +-- .../black_temple/boss_teron_gorefiend.cpp | 13 +++--- .../serpent_shrine/boss_lady_vashj.cpp | 4 +- scripts/outland/gruuls_lair/boss_gruul.cpp | 6 +-- .../gruuls_lair/boss_high_king_maulgar.cpp | 4 +- .../tempest_keep/the_eye/boss_kaelthas.cpp | 22 ++++++---- .../tempest_keep/the_eye/boss_void_reaver.cpp | 5 ++- 31 files changed, 133 insertions(+), 135 deletions(-) diff --git a/include/sc_creature.cpp b/include/sc_creature.cpp index 80aa42fa1..027667a7e 100644 --- a/include/sc_creature.cpp +++ b/include/sc_creature.cpp @@ -192,29 +192,29 @@ Creature* ScriptedAI::DoSpawnCreature(uint32 uiId, float fX, float fY, float fZ, Unit* ScriptedAI::SelectUnit(SelectAggroTarget target, uint32 uiPosition) { //ThreatList m_threatlist; - std::list& threatlist = m_creature->getThreatManager().getThreatList(); - std::list::iterator itr = threatlist.begin(); - std::list::reverse_iterator ritr = threatlist.rbegin(); + ThreatList const& threatlist = m_creature->getThreatManager().getThreatList(); + ThreatList::const_iterator itr = threatlist.begin(); + ThreatList::const_reverse_iterator ritr = threatlist.rbegin(); - if (uiPosition >= threatlist.size() || !threatlist.size()) + if (uiPosition >= threatlist.size() || threatlist.empty()) return NULL; switch (target) { - case SELECT_TARGET_RANDOM: - advance(itr, uiPosition + (rand() % (threatlist.size() - uiPosition))); - return Unit::GetUnit((*m_creature),(*itr)->getUnitGuid()); - break; - - case SELECT_TARGET_TOPAGGRO: - advance(itr, uiPosition); - return Unit::GetUnit((*m_creature),(*itr)->getUnitGuid()); - break; - - case SELECT_TARGET_BOTTOMAGGRO: - advance(ritr, uiPosition); - return Unit::GetUnit((*m_creature),(*ritr)->getUnitGuid()); - break; + case SELECT_TARGET_RANDOM: + advance(itr, uiPosition + (rand() % (threatlist.size() - uiPosition))); + return Unit::GetUnit((*m_creature),(*itr)->getUnitGuid()); + break; + + case SELECT_TARGET_TOPAGGRO: + advance(itr, uiPosition); + return Unit::GetUnit((*m_creature),(*itr)->getUnitGuid()); + break; + + case SELECT_TARGET_BOTTOMAGGRO: + advance(ritr, uiPosition); + return Unit::GetUnit((*m_creature),(*ritr)->getUnitGuid()); + break; } return NULL; @@ -426,9 +426,8 @@ void ScriptedAI::DoResetThreat() return; } - std::list& threatlist = m_creature->getThreatManager().getThreatList(); - - for(std::list::iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr) + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator itr = tList.begin();itr != tList.end(); ++itr) { Unit* pUnit = Unit::GetUnit((*m_creature), (*itr)->getUnitGuid()); diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp index b67398a19..8204c9567 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp @@ -244,9 +244,8 @@ struct MANGOS_DLL_DECL boss_chromaggusAI : public ScriptedAI case 4: SpellAfflict = SPELL_BROODAF_GREEN; break; } - std::list::iterator i; - - for (i = m_creature->getThreatManager().getThreatList().begin();i != m_creature->getThreatManager().getThreatList().end(); ++i) + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator i = tList.begin();i != tList.end(); ++i) { Unit* pUnit = NULL; pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid()); diff --git a/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp b/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp index fcec464b9..f1994a960 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp @@ -103,9 +103,10 @@ struct MANGOS_DLL_DECL boss_maiden_of_virtueAI : public ScriptedAI { //Time for an omgwtfpwn code to make maiden cast holy fire only on units outside the holy ground's 18 yard range Unit* pTarget = NULL; - std::list t_list = m_creature->getThreatManager().getThreatList(); std::vector target_list; - for(std::list::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) + + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator itr = tList.begin();itr != tList.end(); ++itr) { pTarget = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()); if (pTarget && !pTarget->IsWithinDist(m_creature, 12.0f, false)) diff --git a/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp b/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp index f23c2b796..843cba809 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp @@ -281,9 +281,10 @@ struct MANGOS_DLL_DECL boss_attumenAI : public ScriptedAI if (m_uiChargeTimer < uiDiff) { Unit *target; - std::list t_list = m_creature->getThreatManager().getThreatList(); std::vector target_list; - for(std::list::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) + + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator itr = tList.begin();itr != tList.end(); ++itr) { target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()); if (target && !target->IsWithinDist(m_creature, ATTACK_DISTANCE, false)) diff --git a/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp b/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp index b2b77fac0..76a0a05cc 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp @@ -328,19 +328,20 @@ struct MANGOS_DLL_DECL boss_moroesAI : public ScriptedAI if (Blind_Timer < diff) { Unit* target = NULL; - std::list t_list = m_creature->getThreatManager().getThreatList(); - if (t_list.empty()) + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + if (tList.empty()) return; std::vector target_list; - for (std::list::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) + + for (ThreatList::const_iterator itr = tList.begin();itr != tList.end(); ++itr) { target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()); if (target && target->IsWithinDist(m_creature, ATTACK_DISTANCE, false)) target_list.push_back(target); } - if (target_list.size()) + if (!target_list.empty()) target = *(target_list.begin()+rand()%target_list.size()); if (target) diff --git a/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp b/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp index 57618ee61..2b68aeca5 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp @@ -284,16 +284,16 @@ struct MANGOS_DLL_DECL boss_malchezaarAI : public ScriptedAI if (!info) return; - std::list t_list = m_creature->getThreatManager().getThreatList(); + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); std::vector targets; - if (!t_list.size()) + if (tList.empty()) return; //begin + 1 , so we don't target the one with the highest threat - std::list::iterator itr = t_list.begin(); + ThreatList::const_iterator itr = tList.begin(); std::advance(itr, 1); - for(; itr!= t_list.end(); ++itr) //store the threat list in a different container + for(; itr!= tList.end(); ++itr) //store the threat list in a different container { Unit *target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()); //only on alive players diff --git a/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp b/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp index bf1ef3629..f4e8959eb 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp @@ -188,13 +188,13 @@ struct MANGOS_DLL_DECL boss_aranAI : public ScriptedAI void FlameWreathEffect() { std::vector targets; - std::list t_list = m_creature->getThreatManager().getThreatList(); - if (!t_list.size()) + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + if (tList.empty()) return; //store the threat list in a different container - for(std::list::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) + for (ThreatList::const_iterator itr = tList.begin();itr != tList.end(); ++itr) { Unit* pTarget = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()); //only on alive players diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp index 99eb53e98..a189a2c23 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp @@ -186,9 +186,8 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI if (!SummonedUnit) return; - std::list& m_threatlist = m_creature->getThreatManager().getThreatList(); - std::list::iterator i = m_threatlist.begin(); - for(i = m_threatlist.begin(); i != m_threatlist.end(); ++i) + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator i = tList.begin();i != tList.end(); ++i) { Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid()); if (pUnit && pUnit->isAlive()) @@ -205,8 +204,8 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI float y = KaelLocations[0][1]; m_creature->GetMap()->CreatureRelocation(m_creature, x, y, LOCATION_Z, 0.0f); //m_creature->SendMonsterMove(x, y, LOCATION_Z, 0, 0, 0); // causes some issues... - std::list::iterator i = m_creature->getThreatManager().getThreatList().begin(); - for (i = m_creature->getThreatManager().getThreatList().begin(); i!= m_creature->getThreatManager().getThreatList().end();++i) + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator i = tList.begin();i != tList.end(); ++i) { Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid()); if (pUnit && (pUnit->GetTypeId() == TYPEID_PLAYER)) @@ -217,8 +216,8 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI void CastGravityLapseKnockUp() { - std::list::iterator i = m_creature->getThreatManager().getThreatList().begin(); - for (i = m_creature->getThreatManager().getThreatList().begin(); i!= m_creature->getThreatManager().getThreatList().end();++i) + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator i = tList.begin();i != tList.end(); ++i) { Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid()); if (pUnit && (pUnit->GetTypeId() == TYPEID_PLAYER)) @@ -229,8 +228,8 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI void CastGravityLapseFly() // Use Fly Packet hack for now as players can't cast "fly" spells unless in map 530. Has to be done a while after they get knocked into the air... { - std::list::iterator i = m_creature->getThreatManager().getThreatList().begin(); - for (i = m_creature->getThreatManager().getThreatList().begin(); i!= m_creature->getThreatManager().getThreatList().end();++i) + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator i = tList.begin();i != tList.end(); ++i) { Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid()); if (pUnit && (pUnit->GetTypeId() == TYPEID_PLAYER)) @@ -249,8 +248,8 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI void RemoveGravityLapse() { - std::list::iterator i = m_creature->getThreatManager().getThreatList().begin(); - for (i = m_creature->getThreatManager().getThreatList().begin(); i!= m_creature->getThreatManager().getThreatList().end();++i) + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator i = tList.begin();i != tList.end(); ++i) { Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid()); if (pUnit && (pUnit->GetTypeId() == TYPEID_PLAYER)) diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp index 8e852678a..67b676d1f 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp @@ -800,8 +800,8 @@ struct MANGOS_DLL_DECL boss_yazzaiAI : public boss_priestess_lackey_commonAI if (Blink_Timer < diff) { bool InMeleeRange = false; - std::list& t_list = m_creature->getThreatManager().getThreatList(); - for(std::list::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator itr = tList.begin();itr != tList.end(); ++itr) { if (Unit* target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid())) { @@ -880,8 +880,8 @@ struct MANGOS_DLL_DECL boss_warlord_salarisAI : public boss_priestess_lackey_com if (Intercept_Stun_Timer < diff) { bool InMeleeRange = false; - std::list& t_list = m_creature->getThreatManager().getThreatList(); - for(std::list::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator itr = tList.begin();itr != tList.end(); ++itr) { if (Unit* target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid())) { diff --git a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp index 1ed28cece..4c6fee687 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp @@ -317,9 +317,8 @@ struct MANGOS_DLL_DECL boss_janalaiAI : public ScriptedAI //Teleport every player into the middle if more than 20 yards away (possibly what spell 43096 should do) void TeleportPlayersOutOfRange() { - std::list::iterator i = m_creature->getThreatManager().getThreatList().begin(); - - for (; i != m_creature->getThreatManager().getThreatList().end(); ++i) + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator i = tList.begin();i != tList.end(); ++i) { Unit* pTemp = Unit::GetUnit((*m_creature),(*i)->getUnitGuid()); diff --git a/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp b/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp index 74600f685..83f205971 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp @@ -336,9 +336,8 @@ struct MANGOS_DLL_DECL boss_malacrass_addAI : public ScriptedAI if (!pSpellRange) return false; - std::list& lThreatList = m_creature->getThreatManager().getThreatList(); - - for(std::list::iterator iter = lThreatList.begin(); iter != lThreatList.end(); ++iter) + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator iter = tList.begin();iter != tList.end(); ++iter) { Unit* pTarget = Unit::GetUnit((*m_creature), (*iter)->getUnitGuid()); diff --git a/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp b/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp index b43178a2b..737c20c75 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp @@ -280,8 +280,8 @@ struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI { uint8 uiTargetInRangeCount = 0; - std::list::iterator i = m_creature->getThreatManager().getThreatList().begin(); - for(; i != m_creature->getThreatManager().getThreatList().end(); ++i) + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator i = tList.begin();i != tList.end(); ++i) { Unit* pTarget = Unit::GetUnit(*m_creature, (*i)->getUnitGuid()); diff --git a/scripts/kalimdor/boss_azuregos.cpp b/scripts/kalimdor/boss_azuregos.cpp index fdbf964b0..5a6a6477d 100644 --- a/scripts/kalimdor/boss_azuregos.cpp +++ b/scripts/kalimdor/boss_azuregos.cpp @@ -70,9 +70,8 @@ struct MANGOS_DLL_DECL boss_azuregosAI : public ScriptedAI { DoScriptText(SAY_TELEPORT, m_creature); - std::list& m_threatlist = m_creature->getThreatManager().getThreatList(); - std::list::iterator i = m_threatlist.begin(); - for (i = m_threatlist.begin(); i!= m_threatlist.end();++i) + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator i = tList.begin();i != tList.end(); ++i) { Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid()); if (pUnit && (pUnit->GetTypeId() == TYPEID_PLAYER)) diff --git a/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp b/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp index 46a557dd2..b125dfb01 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp @@ -301,13 +301,13 @@ struct MANGOS_DLL_DECL boss_archimondeAI : public ScriptedAI if (victim && m_creature->IsWithinDistInMap(victim, m_creature->GetAttackDistance(victim))) return false; - std::list& m_threatlist = m_creature->getThreatManager().getThreatList(); - if (m_threatlist.empty()) + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + if (tList.empty()) return false; std::list targets; - std::list::iterator itr = m_threatlist.begin(); - for(; itr != m_threatlist.end(); ++itr) + + for (ThreatList::const_iterator itr = tList.begin();itr != tList.end(); ++itr) { Unit* pUnit = Unit::GetUnit((*m_creature), (*itr)->getUnitGuid()); if (pUnit && pUnit->isAlive()) diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp index 3e64f5001..8d84ade47 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp @@ -622,8 +622,8 @@ struct MANGOS_DLL_DECL cthunAI : public ScriptedAI //Place all units in threat list on outside of stomach Stomach_Map.clear(); - std::list::iterator i = m_creature->getThreatManager().getThreatList().begin(); - for (; i != m_creature->getThreatManager().getThreatList().end(); ++i) + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator i = tList.begin();i != tList.end(); ++i) { //Outside stomach Stomach_Map[(*i)->getUnitGuid()] = false; diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp index d715e8337..269830e21 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp @@ -207,10 +207,10 @@ struct MANGOS_DLL_DECL boss_twinemperorsAI : public ScriptedAI Unit *GetAnyoneCloseEnough(float dist, bool totallyRandom) { int cnt = 0; - std::list::iterator i; std::list candidates; - for (i = m_creature->getThreatManager().getThreatList().begin();i != m_creature->getThreatManager().getThreatList().end(); ++i) + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator i = tList.begin();i != tList.end(); ++i) { Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid()); if (m_creature->IsWithinDistInMap(pUnit, dist)) @@ -226,8 +226,7 @@ struct MANGOS_DLL_DECL boss_twinemperorsAI : public ScriptedAI for (int randomi = rand() % cnt; randomi > 0; randomi --) candidates.pop_front(); - i = candidates.begin(); - Unit *ret = Unit::GetUnit((*m_creature), (*i)->getUnitGuid()); + Unit *ret = Unit::GetUnit((*m_creature), candidates.front()->getUnitGuid()); candidates.clear(); return ret; } @@ -236,8 +235,8 @@ struct MANGOS_DLL_DECL boss_twinemperorsAI : public ScriptedAI { Unit *nearp = NULL; float neardist = 0.0f; - std::list::iterator i; - for (i = m_creature->getThreatManager().getThreatList().begin();i != m_creature->getThreatManager().getThreatList().end(); ++i) + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator i = tList.begin();i != tList.end(); ++i) { Unit* pUnit = NULL; pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid()); diff --git a/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp b/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp index e7a634dc0..8437a8070 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp @@ -262,8 +262,8 @@ struct MANGOS_DLL_DECL aqsentinelAI : public ScriptedAI Unit *GetHatedManaUser() { - std::list::iterator i; - for (i = m_creature->getThreatManager().getThreatList().begin();i != m_creature->getThreatManager().getThreatList().end(); ++i) + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator i = tList.begin();i != tList.end(); ++i) { Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid()); if (pUnit->getPowerType()==POWER_MANA) diff --git a/scripts/northrend/naxxramas/boss_maexxna.cpp b/scripts/northrend/naxxramas/boss_maexxna.cpp index 3899b0abc..7819cb3a1 100644 --- a/scripts/northrend/naxxramas/boss_maexxna.cpp +++ b/scripts/northrend/naxxramas/boss_maexxna.cpp @@ -130,19 +130,19 @@ struct MANGOS_DLL_DECL boss_maexxnaAI : public ScriptedAI void DoCastWebWrap() { - std::list t_list = m_creature->getThreatManager().getThreatList(); + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); std::vector targets; //This spell doesn't work if we only have 1 player on threat list - if (t_list.size() < 2) + if (tList.size() < 2) return; //begin + 1 , so we don't target the one with the highest threat - std::list::iterator itr = t_list.begin(); + ThreatList::const_iterator itr = tList.begin(); std::advance(itr, 1); //store the threat list in a different container - for(; itr!= t_list.end(); ++itr) + for (;itr != tList.end(); ++itr) { Unit* target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()); diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp index c6aaf779e..e9d6492bd 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp @@ -126,8 +126,8 @@ struct MANGOS_DLL_DECL boss_blackheart_the_inciterAI : public ScriptedAI { DoCast(m_creature, SPELL_INCITE_CHAOS); - std::list t_list = m_creature->getThreatManager().getThreatList(); - for(std::list::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator itr = tList.begin();itr != tList.end(); ++itr) { Unit* target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()); if (target && target->GetTypeId() == TYPEID_PLAYER) diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp index 1a9b0dd5a..7ca74eece 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp @@ -160,8 +160,8 @@ struct MANGOS_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI float ranY = LOCY; float ranZ = LOCZ; - std::list t_list = m_creature->getThreatManager().getThreatList(); - for(std::list::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator itr = tList.begin();itr != tList.end(); ++itr) { Unit* target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()); if (target && target->GetTypeId() == TYPEID_PLAYER) diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp index d3dfa7904..d20822a34 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp @@ -79,8 +79,8 @@ struct MANGOS_DLL_DECL boss_murmurAI : public ScriptedAI void SonicBoomEffect() { - std::list t_list = m_creature->getThreatManager().getThreatList(); - for(std::list::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator itr = tList.begin();itr != tList.end(); ++itr) { Unit* target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()); if (target && target->GetTypeId() == TYPEID_PLAYER) diff --git a/scripts/outland/black_temple/boss_bloodboil.cpp b/scripts/outland/black_temple/boss_bloodboil.cpp index 69795701b..07ccc10dc 100644 --- a/scripts/outland/black_temple/boss_bloodboil.cpp +++ b/scripts/outland/black_temple/boss_bloodboil.cpp @@ -131,17 +131,16 @@ struct MANGOS_DLL_DECL boss_gurtogg_bloodboilAI : public ScriptedAI void CastBloodboil() { // Get the Threat List - std::list m_threatlist = m_creature->getThreatManager().getThreatList(); + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); // He doesn't have anyone in his threatlist, useless to continue - if (!m_threatlist.size()) + if (tList.empty()) return; std::list targets; - std::list::iterator itr = m_threatlist.begin(); //store the threat list in a different container - for(; itr!= m_threatlist.end(); ++itr) + for (ThreatList::const_iterator itr = tList.begin();itr != tList.end(); ++itr) { Unit *target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()); //only on alive players diff --git a/scripts/outland/black_temple/boss_illidan.cpp b/scripts/outland/black_temple/boss_illidan.cpp index 815fc87d0..48e0147b0 100644 --- a/scripts/outland/black_temple/boss_illidan.cpp +++ b/scripts/outland/black_temple/boss_illidan.cpp @@ -464,8 +464,8 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public ScriptedAI void KillAllElites() { - std::list::iterator itr; - for(itr = m_creature->getThreatManager().getThreatList().begin(); itr != m_creature->getThreatManager().getThreatList().end(); ++itr) + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator itr = tList.begin();itr != tList.end(); ++itr) { Unit* pUnit = Unit::GetUnit((*m_creature), (*itr)->getUnitGuid()); if (pUnit && (pUnit->GetTypeId() == TYPEID_UNIT) && (pUnit->GetEntry() == ILLIDARI_ELITE)) @@ -610,8 +610,8 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public ScriptedAI if (!Illidan) return; - std::list::iterator itr = Illidan->getThreatManager().getThreatList().begin(); - for(; itr != Illidan->getThreatManager().getThreatList().end(); ++itr) + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator itr = tList.begin();itr != tList.end(); ++itr) { // Loop through threatlist till our GUID is found in it. if ((*itr)->getUnitGuid() == m_creature->GetGUID()) @@ -2133,17 +2133,16 @@ struct MANGOS_DLL_DECL flame_of_azzinothAI : public ScriptedAI void Charge() { // Get the Threat List - std::list& m_threatlist = m_creature->getThreatManager().getThreatList(); + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); // He doesn't have anyone in his threatlist, useless to continue - if (!m_threatlist.size()) + if (tList.empty()) return; std::list targets; - std::list::iterator itr = m_threatlist.begin(); //store the threat list in a different container - for(; itr!= m_threatlist.end(); ++itr) + for (ThreatList::const_iterator itr = tList.begin();itr != tList.end(); ++itr) { Unit *target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()); //only on alive players diff --git a/scripts/outland/black_temple/boss_reliquary_of_souls.cpp b/scripts/outland/black_temple/boss_reliquary_of_souls.cpp index 11f9eac1d..2a41aefc1 100644 --- a/scripts/outland/black_temple/boss_reliquary_of_souls.cpp +++ b/scripts/outland/black_temple/boss_reliquary_of_souls.cpp @@ -249,9 +249,8 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI if (!target) return; - std::list& m_threatlist = target->getThreatManager().getThreatList(); - std::list::iterator itr = m_threatlist.begin(); - for(; itr != m_threatlist.end(); ++itr) + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator itr = tList.begin();itr != tList.end(); ++itr) { Unit* pUnit = Unit::GetUnit((*m_creature), (*itr)->getUnitGuid()); if (pUnit) @@ -608,13 +607,13 @@ struct MANGOS_DLL_DECL boss_essence_of_sufferingAI : public ScriptedAI void CastFixate() { - std::list& m_threatlist = m_creature->getThreatManager().getThreatList(); - if (m_threatlist.empty()) + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + if (tList.empty()) return; // No point continuing if empty threatlist. std::list targets; - std::list::iterator itr = m_threatlist.begin(); - for(; itr != m_threatlist.end(); ++itr) + + for (ThreatList::const_iterator itr = tList.begin();itr != tList.end(); ++itr) { Unit* pUnit = Unit::GetUnit((*m_creature), (*itr)->getUnitGuid()); // Only alive players diff --git a/scripts/outland/black_temple/boss_supremus.cpp b/scripts/outland/black_temple/boss_supremus.cpp index 01b27b1ff..c2dbb4ea3 100644 --- a/scripts/outland/black_temple/boss_supremus.cpp +++ b/scripts/outland/black_temple/boss_supremus.cpp @@ -234,9 +234,8 @@ struct MANGOS_DLL_DECL boss_supremusAI : public ScriptedAI uint32 health = 0; Unit* target = NULL; - std::list& m_threatlist = m_creature->getThreatManager().getThreatList(); - std::list::iterator i = m_threatlist.begin(); - for (i = m_threatlist.begin(); i!= m_threatlist.end();++i) + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator i = tList.begin();i != tList.end(); ++i) { Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid()); if (pUnit && m_creature->IsWithinDistInMap(pUnit, ATTACK_DISTANCE)) diff --git a/scripts/outland/black_temple/boss_teron_gorefiend.cpp b/scripts/outland/black_temple/boss_teron_gorefiend.cpp index a6adac354..c75e3f20a 100644 --- a/scripts/outland/black_temple/boss_teron_gorefiend.cpp +++ b/scripts/outland/black_temple/boss_teron_gorefiend.cpp @@ -141,13 +141,13 @@ struct MANGOS_DLL_DECL mob_shadowy_constructAI : public ScriptedAI void CheckPlayers() { - std::list& m_threatlist = m_creature->getThreatManager().getThreatList(); - if (m_threatlist.empty()) + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + if (tList.empty()) return; // No threat list. Don't continue. - std::list::iterator itr = m_threatlist.begin(); std::list targets; - for(; itr != m_threatlist.end(); ++itr) + + for (ThreatList::const_iterator itr = tList.begin();itr != tList.end(); ++itr) { Unit* pUnit = Unit::GetUnit((*m_creature), (*itr)->getUnitGuid()); if (pUnit && pUnit->isAlive()) @@ -287,9 +287,8 @@ struct MANGOS_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI if (!Blossom) return; - std::list& m_threatlist = m_creature->getThreatManager().getThreatList(); - std::list::iterator i = m_threatlist.begin(); - for(i = m_threatlist.begin(); i != m_threatlist.end(); ++i) + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator i = tList.begin();i != tList.end(); ++i) { Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid()); if (pUnit && pUnit->isAlive()) diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp index 8f93675db..fd03a0a25 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp @@ -373,8 +373,8 @@ struct MANGOS_DLL_DECL boss_lady_vashjAI : public ScriptedAI if (m_uiCheck_Timer < uiDiff) { bool bInMeleeRange = false; - std::list t_list = m_creature->getThreatManager().getThreatList(); - for(std::list::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator itr = tList.begin();itr != tList.end(); ++itr) { Unit* pTarget = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()); diff --git a/scripts/outland/gruuls_lair/boss_gruul.cpp b/scripts/outland/gruuls_lair/boss_gruul.cpp index 636bc3df8..5f0a51a31 100644 --- a/scripts/outland/gruuls_lair/boss_gruul.cpp +++ b/scripts/outland/gruuls_lair/boss_gruul.cpp @@ -198,10 +198,10 @@ struct MANGOS_DLL_DECL boss_gruulAI : public ScriptedAI { // Find 2nd-aggro target within melee range. Unit *pTarget = NULL; - std::list t_list = m_creature->getThreatManager().getThreatList(); - std::list::iterator itr = t_list.begin(); + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + ThreatList::const_iterator itr = tList.begin(); std::advance(itr, 1); - for(; itr!= t_list.end(); ++itr) + for (;itr != tList.end(); ++itr) { pTarget = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()); // exclude pets, totems & player out of melee range diff --git a/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp b/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp index 52df71274..98aaec89b 100644 --- a/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp +++ b/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp @@ -584,8 +584,8 @@ struct MANGOS_DLL_DECL boss_krosh_firehandAI : public Council_Base_AI bool bInRange = false; Unit* pTarget = NULL; - std::list& threatlist = m_creature->getThreatManager().getThreatList(); - for (std::list::iterator i = threatlist.begin(); i!= threatlist.end(); ++i) + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator i = tList.begin();i != tList.end(); ++i) { Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid()); if (pUnit && pUnit->IsWithinDistInMap(m_creature, 15.0f)) diff --git a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp index 9bee806f3..070f9f388 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp @@ -914,10 +914,10 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI //m_uiGravityLapse_Timer if (m_uiGravityLapse_Timer < uiDiff) { - std::list::iterator i = m_creature->getThreatManager().getThreatList().begin(); switch(m_uiGravityLapse_Phase) { case 0: + { m_creature->StopMoving(); m_creature->GetMotionMaster()->Clear(); m_creature->GetMotionMaster()->MoveIdle(); @@ -925,7 +925,8 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI m_creature->SendMonsterMove(afGravityPos[0], afGravityPos[1], afGravityPos[2], 0, MONSTER_MOVE_NONE, 0); // 1) Kael'thas will portal the whole raid right into his body - for (i = m_creature->getThreatManager().getThreatList().begin(); i!= m_creature->getThreatManager().getThreatList().end();++i) + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator i = tList.begin();i != tList.end(); ++i) { Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid()); if (pUnit && (pUnit->GetTypeId() == TYPEID_PLAYER)) @@ -941,12 +942,14 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI m_uiShockBarrier_Timer = 1000; m_uiNetherBeam_Timer = 5000; break; - + } case 1: + { DoScriptText(urand(0, 1) ? SAY_GRAVITYLAPSE1 : SAY_GRAVITYLAPSE2, m_creature); // 2) At that point he will put a Gravity Lapse debuff on everyone - for (i = m_creature->getThreatManager().getThreatList().begin(); i!= m_creature->getThreatManager().getThreatList().end(); ++i) + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator i = tList.begin();i != tList.end(); ++i) { if (Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid())) { @@ -967,7 +970,7 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI m_uiGravityLapse_Timer = 10000; ++m_uiGravityLapse_Phase; break; - + } case 2: //Cast nether vapor aura on self m_creature->InterruptNonMeleeSpells(false); @@ -978,8 +981,10 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI break; case 3: + { //Remove flight - for (i = m_creature->getThreatManager().getThreatList().begin(); i!= m_creature->getThreatManager().getThreatList().end(); ++i) + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator i = tList.begin();i != tList.end(); ++i) { if (Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid())) { @@ -998,6 +1003,7 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI m_uiGravityLapse_Phase = 0; AttackStart(m_creature->getVictim()); break; + } } } else @@ -1269,8 +1275,8 @@ struct MANGOS_DLL_DECL boss_grand_astromancer_capernianAI : public advisorbase_a { bool m_bInMeleeRange = false; Unit* pTarget = NULL; - std::list& m_threatlist = m_creature->getThreatManager().getThreatList(); - for (std::list::iterator i = m_threatlist.begin(); i!= m_threatlist.end();++i) + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator i = tList.begin();i != tList.end(); ++i) { Unit* pUnit = Unit::GetUnit((*m_creature), (*i)->getUnitGuid()); diff --git a/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp b/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp index b5f6184c7..db85981be 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp @@ -111,9 +111,10 @@ struct MANGOS_DLL_DECL boss_void_reaverAI : public ScriptedAI if (ArcaneOrb_Timer < diff) { Unit *target = NULL; - std::list t_list = m_creature->getThreatManager().getThreatList(); std::vector target_list; - for(std::list::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr) + + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator itr = tList.begin();itr != tList.end(); ++itr) { target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()); From c777ef4ee6c40f58f74ec79070901b4428c8ad48 Mon Sep 17 00:00:00 2001 From: Insider Date: Mon, 23 Nov 2009 17:45:52 +0700 Subject: [PATCH 054/405] Fixed compilation error with [patch 1] after [8860] --- scripts/northrend/naxxramas/boss_gothik.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/northrend/naxxramas/boss_gothik.cpp b/scripts/northrend/naxxramas/boss_gothik.cpp index 397481e27..3a7aa7050 100644 --- a/scripts/northrend/naxxramas/boss_gothik.cpp +++ b/scripts/northrend/naxxramas/boss_gothik.cpp @@ -223,12 +223,12 @@ struct MANGOS_DLL_DECL boss_gothikAI : public ScriptedAI { //cast Harvest Soul (-10% stats to the raid) Unit* target = NULL; - std::list::iterator i = m_creature->getThreatManager().getThreatList().begin(); - for (i = m_creature->getThreatManager().getThreatList().begin(); i!=m_creature->getThreatManager().getThreatList().end(); ++i) + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator itr = tList.begin();itr != tList.end(); ++itr) { - target = Unit::GetUnit((*m_creature),(*i)->getUnitGuid()); - if(target && target->isAlive()) - DoCast(target, SP_HARVEST_SOUL, true); + if (Unit* target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid())) + if(target->isAlive()) + DoCast(target, SP_HARVEST_SOUL, true); } //teleport gothik to the other side if(phase==3) From 08850a9a5ef1bb076db734c0105bcd248313a825 Mon Sep 17 00:00:00 2001 From: Insider Date: Mon, 23 Nov 2009 18:37:04 +0700 Subject: [PATCH 055/405] Fixed compilation errors with [patch 1] and [patch 2] after [8860] --- scripts/northrend/naxxramas/boss_patchwerk.cpp | 6 +++--- scripts/northrend/vault_of_archavon/boss_archavon.cpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/northrend/naxxramas/boss_patchwerk.cpp b/scripts/northrend/naxxramas/boss_patchwerk.cpp index 94584b02a..1700ba929 100644 --- a/scripts/northrend/naxxramas/boss_patchwerk.cpp +++ b/scripts/northrend/naxxramas/boss_patchwerk.cpp @@ -93,11 +93,11 @@ struct MANGOS_DLL_DECL boss_patchwerkAI : public ScriptedAI uint32 MostHP = 0; Unit* pMostHPTarget = NULL; Unit* pTemp = NULL; - std::list::iterator i = m_creature->getThreatManager().getThreatList().begin(); + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); - for (i = m_creature->getThreatManager().getThreatList().begin(); i!=m_creature->getThreatManager().getThreatList().end(); ++i) + for (ThreatList::const_iterator i = tList.begin();i != tList.end(); ++i) { - pTemp = Unit::GetUnit((*m_creature),(*i)->getUnitGuid()); + Unit* pTemp = Unit::GetUnit((*m_creature),(*i)->getUnitGuid()); if (pTemp && pTemp->isAlive() && pTemp->GetHealth() > MostHP && m_creature->IsWithinDist(pTemp, 5.0f, false)) { MostHP = pTemp->GetHealth(); diff --git a/scripts/northrend/vault_of_archavon/boss_archavon.cpp b/scripts/northrend/vault_of_archavon/boss_archavon.cpp index 3a77464c0..41ea19d62 100644 --- a/scripts/northrend/vault_of_archavon/boss_archavon.cpp +++ b/scripts/northrend/vault_of_archavon/boss_archavon.cpp @@ -208,11 +208,11 @@ struct MANGOS_DLL_DECL boss_archavonAI : public ScriptedAI if (m_uiCrushingLeapTimer < uiDiff) { - std::list::iterator i = m_creature->getThreatManager().getThreatList().begin(); + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); std::list lTargets; - for (; i != m_creature->getThreatManager().getThreatList().end(); ++i) + for (ThreatList::const_iterator itr = tList.begin();itr != tList.end(); ++itr) { - Unit* pTemp = Unit::GetUnit((*m_creature),(*i)->getUnitGuid()); + Unit *pTemp = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()); if (pTemp && pTemp->GetTypeId() == TYPEID_PLAYER && !m_creature->IsWithinDist(pTemp, 10.0f) && m_creature->IsWithinDist(pTemp, 80.0f)) lTargets.push_back(pTemp); } From 6c09e8143d150477c8f4880b6f62d3a86e534f09 Mon Sep 17 00:00:00 2001 From: Insider Date: Tue, 24 Nov 2009 17:56:51 +0700 Subject: [PATCH 056/405] SD2 updated to 1507 --- .../sunwell_plateau/boss_kalecgos.cpp | 16 ++++-- scripts/outland/shadowmoon_valley.cpp | 54 +++++-------------- sql/Updates/Makefile.am | 3 +- sql/Updates/r1506_scriptdev2.sql | 1 + sql/scriptdev2_script_full.sql | 2 +- 5 files changed, 29 insertions(+), 47 deletions(-) create mode 100644 sql/Updates/r1506_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp index 051172167..46254d811 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp @@ -58,7 +58,7 @@ enum KalecgosEncounter SPELL_REVITALIZE = 45027, SPELL_TAIL_LASH = 45122, SPELL_TRANSFORM_KALEC = 45027, - SPELL_CRAZED_RAGE = 44806, + SPELL_CRAZED_RAGE = 44806, // this should be 44807 instead //Sathrovarr SPELL_SPECTRAL_INVIS = 44801, @@ -252,9 +252,12 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI if (!m_bEnraged && ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 10)) { if (Unit* pSathrovarr = Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_SATHROVARR))) - pSathrovarr->CastSpell(pSathrovarr, SPELL_CRAZED_RAGE, true); + { + if (pSathrovarr->isAlive()) + pSathrovarr->CastSpell(pSathrovarr, SPELL_CRAZED_RAGE, true); + } - DoCast(m_creature, SPELL_CRAZED_RAGE, true); + m_creature->CastSpell(m_creature, SPELL_CRAZED_RAGE, true); m_bEnraged = true; } @@ -413,9 +416,12 @@ struct MANGOS_DLL_DECL boss_sathrovarrAI : public ScriptedAI if (!m_bEnraged && ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) <= 10)) { if (Unit* pKalecgos = Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_KALECGOS_DRAGON))) - pKalecgos->CastSpell(pKalecgos, SPELL_CRAZED_RAGE, true); + { + if (pKalecgos->isAlive()) + pKalecgos->CastSpell(pKalecgos, SPELL_CRAZED_RAGE, true); + } - DoCast(m_creature, SPELL_CRAZED_RAGE, true); + m_creature->CastSpell(m_creature, SPELL_CRAZED_RAGE, true); m_bEnraged = true; } diff --git a/scripts/outland/shadowmoon_valley.cpp b/scripts/outland/shadowmoon_valley.cpp index c7e549bf2..0b3a3034e 100644 --- a/scripts/outland/shadowmoon_valley.cpp +++ b/scripts/outland/shadowmoon_valley.cpp @@ -177,8 +177,7 @@ enum QUEST_FORCE_OF_NELT = 10854, NPC_DRAGONMAW_SUBJUGATOR = 21718, - NPC_ESCAPE_DUMMY = 22317, - NPC_ENSLAVED_DRAKE_KILL_CREDIT = 22316 + NPC_ESCAPE_DUMMY = 21348 }; struct MANGOS_DLL_DECL mob_enslaved_netherwing_drakeAI : public ScriptedAI @@ -199,31 +198,23 @@ struct MANGOS_DLL_DECL mob_enslaved_netherwing_drakeAI : public ScriptedAI if (!Tapped) m_creature->setFaction(FACTION_DEFAULT); - FlyTimer = 10000; + FlyTimer = 2500; } - void SpellHit(Unit* caster, const SpellEntry* spell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) { - if (!caster) - return; - - if (caster->GetTypeId() == TYPEID_PLAYER && spell->Id == SPELL_HIT_FORCE_OF_NELTHARAKU && !Tapped) + if (pSpell->Id == SPELL_HIT_FORCE_OF_NELTHARAKU && !Tapped) { - Tapped = true; - PlayerGUID = caster->GetGUID(); + if (Player* pPlayer = pCaster->GetCharmerOrOwnerPlayerOrPlayerItself()) + { + Tapped = true; + PlayerGUID = pPlayer->GetGUID(); - m_creature->setFaction(FACTION_FRIENDLY); - DoCast(caster, SPELL_FORCE_OF_NELTHARAKU, true); + m_creature->setFaction(FACTION_FRIENDLY); - if (Creature* Dragonmaw = GetClosestCreatureWithEntry(m_creature, NPC_DRAGONMAW_SUBJUGATOR, 50.0f)) - { - m_creature->AddThreat(Dragonmaw, 100000.0f); - AttackStart(Dragonmaw); + if (Creature* pDragonmaw = GetClosestCreatureWithEntry(m_creature, NPC_DRAGONMAW_SUBJUGATOR, 50.0f)) + AttackStart(pDragonmaw); } - - HostileReference* ref = m_creature->getThreatManager().getOnlineContainer().getReferenceByTarget(caster); - if (ref) - ref->removeReference(); } } @@ -233,18 +224,7 @@ struct MANGOS_DLL_DECL mob_enslaved_netherwing_drakeAI : public ScriptedAI return; if (id == 1) - { - if (PlayerGUID) - { - Unit* plr = Unit::GetUnit((*m_creature), PlayerGUID); - if (plr) - DoCast(plr, SPELL_FORCE_OF_NELTHARAKU, true); - - PlayerGUID = 0; - } - m_creature->ForcedDespawn(); - } } void UpdateAI(const uint32 diff) @@ -256,19 +236,13 @@ struct MANGOS_DLL_DECL mob_enslaved_netherwing_drakeAI : public ScriptedAI if (FlyTimer <= diff) { Tapped = false; + if (Player* pPlayer = (Player*)Unit::GetUnit(*m_creature, PlayerGUID)) { if (pPlayer->GetQuestStatus(QUEST_FORCE_OF_NELT) == QUEST_STATUS_INCOMPLETE) { - pPlayer->KilledMonsterCredit(NPC_ENSLAVED_DRAKE_KILL_CREDIT, m_creature->GetGUID()); - - /* - float x,y,z; - m_creature->GetPosition(x,y,z); - - float dx,dy,dz; - m_creature->GetRandomPoint(x, y, z, 20, dx, dy, dz); - dz += 20; // so it's in the air, not ground*/ + DoCast(pPlayer, SPELL_FORCE_OF_NELTHARAKU, true); + PlayerGUID = 0; float dx, dy, dz; diff --git a/sql/Updates/Makefile.am b/sql/Updates/Makefile.am index a6518ec70..fd8e9bfe4 100644 --- a/sql/Updates/Makefile.am +++ b/sql/Updates/Makefile.am @@ -49,4 +49,5 @@ pkgdata_DATA = \ r1500_mangos.sql \ r1502_mangos.sql \ r1503_scriptdev2.sql \ - r1504_scriptdev2.sql + r1504_scriptdev2.sql \ + r1506_scriptdev2.sql diff --git a/sql/Updates/r1506_scriptdev2.sql b/sql/Updates/r1506_scriptdev2.sql new file mode 100644 index 000000000..3f07883e9 --- /dev/null +++ b/sql/Updates/r1506_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 8868+) '; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 3aa6717df..fd68d0461 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3,7 +3,7 @@ -- DELETE FROM sd2_db_version; -INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for MaNGOS 8831+) '); +INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for MaNGOS 8868+) '); -- -- Below contains data for table `script_texts` mainly used in C++ parts. From 09277dbafb276773eecd61fcb7cb22be6ede8d30 Mon Sep 17 00:00:00 2001 From: Insider Date: Thu, 26 Nov 2009 12:22:48 +0700 Subject: [PATCH 057/405] SD2 updated to 1508 --- scripts/world/npcs_special.cpp | 125 ++++++++++++++++++++++++++++++++- sql/Updates/Makefile.am | 3 +- sql/Updates/r1508_mangos.sql | 1 + sql/mangos_scriptname_full.sql | 1 + 4 files changed, 128 insertions(+), 2 deletions(-) create mode 100644 sql/Updates/r1508_mangos.sql diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index 360183195..2aacde821 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -42,6 +42,7 @@ npc_mount_vendor 100% Regular mount vendors all over the world. Displa npc_rogue_trainer 80% Scripted trainers, so they are able to offer item 17126 for class quest 6681 npc_sayge 100% Darkmoon event fortune teller, buff player based on answers given npc_tabard_vendor 50% allow recovering quest related tabards, achievement related ones need core support +npc_locksmith 75% list of keys needs to be confirmed EndContentData */ /*######## @@ -1611,7 +1612,7 @@ bool GossipHello_npc_tabard_vendor(Player* pPlayer, Creature* pCreature) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_TABARD_OF_SUMMER_FLAMES, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+7); } - pPlayer->SEND_GOSSIP_MENU(13583, pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); } else pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); @@ -1658,6 +1659,122 @@ bool GossipSelect_npc_tabard_vendor(Player* pPlayer, Creature* pCreature, uint32 return true; } +/*###### +## npc_locksmith +######*/ + +enum +{ + QUEST_HOW_TO_BRAKE_IN_TO_THE_ARCATRAZ = 10704, + QUEST_DARK_IRON_LEGACY = 3802, + QUEST_THE_KEY_TO_SCHOLOMANCE_A = 5505, + QUEST_THE_KEY_TO_SCHOLOMANCE_H = 5511, + QUEST_HOTTER_THAN_HELL_A = 10758, + QUEST_HOTTER_THAN_HELL_H = 10764, + QUEST_RETURN_TO_KHAGDAR = 9837, + QUEST_SCEPTER_OF_CELEBRAS = 7046, + QUEST_CONTAINMENT = 13159, + + ITEM_ARCATRAZ_KEY = 31084, + ITEM_SHADOWFORGE_KEY = 11000, + ITEM_SKELETON_KEY = 13704, + ITEM_SHATTERED_HALLS_KEY = 28395, + ITEM_THE_MASTERS_KEY = 24490, + ITEM_SCEPTER_OF_CELEBRAS = 17191, + ITEM_VIOLET_HOLD_KEY = 42482, + + SPELL_ARCATRAZ_KEY = 54881, + SPELL_SHADOWFORGE_KEY = 54882, + SPELL_SKELETON_KEY = 54883, + SPELL_SHATTERED_HALLS_KEY = 54884, + SPELL_THE_MASTERS_KEY = 54885, + SPELL_SCEPTER_OF_CELEBRAS = 56211, + SPELL_VIOLET_HOLD_KEY = 67253 +}; + +#define GOSSIP_LOST_ARCATRAZ_KEY "I've lost my key to the Arcatraz." +#define GOSSIP_LOST_SHADOWFORGE_KEY "I've lost my key to the Blackrock Depths." +#define GOSSIP_LOST_SKELETON_KEY "I've lost my key to the Scholomance." +#define GOSSIP_LOST_SHATTERED_HALLS_KEY "I've lost my key to the Shattered Halls." +#define GOSSIP_LOST_THE_MASTERS_KEY "I've lost my key to the Karazhan." +#define GOSSIP_LOST_SCEPTER "I've lost my Scepter of Celebras" +#define GOSSIP_LOST_VIOLET_HOLD_KEY "I've lost my key to the Violet Hold." + + +bool GossipHello_npc_locksmith(Player* pPlayer, Creature* pCreature) +{ + + // Arcatraz Key + if (pPlayer->GetQuestRewardStatus(QUEST_HOW_TO_BRAKE_IN_TO_THE_ARCATRAZ) && !pPlayer->HasItemCount(ITEM_ARCATRAZ_KEY, 1, true)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_ARCATRAZ_KEY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF +1); + + // Shadowforge Key + if (pPlayer->GetQuestRewardStatus(QUEST_DARK_IRON_LEGACY) && !pPlayer->HasItemCount(ITEM_SHADOWFORGE_KEY, 1, true)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_SHADOWFORGE_KEY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF +2); + + // Skeleton Key + if ((pPlayer->GetQuestRewardStatus(QUEST_THE_KEY_TO_SCHOLOMANCE_A) || pPlayer->GetQuestRewardStatus(QUEST_THE_KEY_TO_SCHOLOMANCE_H)) && + !pPlayer->HasItemCount(ITEM_SKELETON_KEY, 1, true)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_SKELETON_KEY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF +3); + + // Shatered Halls Key + if ((pPlayer->GetQuestRewardStatus(QUEST_HOTTER_THAN_HELL_A) || pPlayer->GetQuestRewardStatus(QUEST_HOTTER_THAN_HELL_H)) && + !pPlayer->HasItemCount(ITEM_SHATTERED_HALLS_KEY, 1, true)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_SHATTERED_HALLS_KEY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF +4); + + // Master's Key + if (pPlayer->GetQuestRewardStatus(QUEST_RETURN_TO_KHAGDAR) && !pPlayer->HasItemCount(ITEM_THE_MASTERS_KEY, 1, true)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_THE_MASTERS_KEY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF +5); + + // Scepter of Celebras + if (pPlayer->GetQuestRewardStatus(QUEST_SCEPTER_OF_CELEBRAS) && !pPlayer->HasItemCount(ITEM_SCEPTER_OF_CELEBRAS, 1, true)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_SCEPTER, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF +6); + + // Violet Hold Key + if (pPlayer->GetQuestRewardStatus(QUEST_CONTAINMENT) && !pPlayer->HasItemCount(ITEM_VIOLET_HOLD_KEY, 1, true)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_VIOLET_HOLD_KEY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF +7); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_locksmith(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->CastSpell(pPlayer, SPELL_ARCATRAZ_KEY, false); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->CastSpell(pPlayer, SPELL_SHADOWFORGE_KEY, false); + break; + case GOSSIP_ACTION_INFO_DEF+3: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->CastSpell(pPlayer, SPELL_SKELETON_KEY, false); + break; + case GOSSIP_ACTION_INFO_DEF+4: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->CastSpell(pPlayer, SPELL_SHATTERED_HALLS_KEY, false); + break; + case GOSSIP_ACTION_INFO_DEF+5: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->CastSpell(pPlayer, SPELL_THE_MASTERS_KEY, false); + break; + case GOSSIP_ACTION_INFO_DEF+6: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->CastSpell(pPlayer, SPELL_SCEPTER_OF_CELEBRAS, false); + break; + case GOSSIP_ACTION_INFO_DEF+7: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->CastSpell(pPlayer, SPELL_VIOLET_HOLD_KEY, false); + break; + } + return true; +} + void AddSC_npcs_special() { Script* newscript; @@ -1747,4 +1864,10 @@ void AddSC_npcs_special() newscript->pGossipHello = &GossipHello_npc_experience_eliminator; newscript->pGossipSelect = &GossipSelect_npc_experience_eliminator; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_locksmith"; + newscript->pGossipHello = &GossipHello_npc_locksmith; + newscript->pGossipSelect = &GossipSelect_npc_locksmith; + newscript->RegisterSelf(); } diff --git a/sql/Updates/Makefile.am b/sql/Updates/Makefile.am index fd8e9bfe4..8752fe0e5 100644 --- a/sql/Updates/Makefile.am +++ b/sql/Updates/Makefile.am @@ -50,4 +50,5 @@ pkgdata_DATA = \ r1502_mangos.sql \ r1503_scriptdev2.sql \ r1504_scriptdev2.sql \ - r1506_scriptdev2.sql + r1506_scriptdev2.sql \ + r1508_mangos.sql diff --git a/sql/Updates/r1508_mangos.sql b/sql/Updates/r1508_mangos.sql new file mode 100644 index 000000000..190c34857 --- /dev/null +++ b/sql/Updates/r1508_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_locksmith' WHERE entry IN (29665,29725,29728); diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 4ca79104c..184f2249e 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -99,6 +99,7 @@ UPDATE creature_template SET ScriptName='npc_prof_tailor' WHERE entry IN (22208, UPDATE creature_template SET ScriptName='npc_rogue_trainer' WHERE entry IN (918,4163,3328,4583,5165,5167,13283,16684); UPDATE creature_template SET ScriptName='npc_sayge' WHERE entry=14822; UPDATE creature_template SET ScriptName='npc_tabard_vendor' WHERE entry=28776; +UPDATE creature_template SET ScriptName='npc_locksmith' WHERE entry IN (29665,29725,29728); /* */ /* ZONE */ From ad4cb242c60c4076994b651a694c2cf99dc731e3 Mon Sep 17 00:00:00 2001 From: Insider Date: Sun, 29 Nov 2009 19:03:10 +0700 Subject: [PATCH 058/405] Fixed crash caused by [patch 2] --- scripts/northrend/vault_of_archavon/boss_archavon.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/northrend/vault_of_archavon/boss_archavon.cpp b/scripts/northrend/vault_of_archavon/boss_archavon.cpp index 41ea19d62..99ad8944a 100644 --- a/scripts/northrend/vault_of_archavon/boss_archavon.cpp +++ b/scripts/northrend/vault_of_archavon/boss_archavon.cpp @@ -179,7 +179,7 @@ struct MANGOS_DLL_DECL boss_archavonAI : public ScriptedAI if (m_uiRockShardTimer < uiDiff) { - if (m_pRockShardsTarget) + if (m_pRockShardsTarget && m_pRockShardsTarget->isAlive()) { DoCast(m_pRockShardsTarget, m_bIsRegularMode ? (m_bRLRockShard ? SPELL_ROCK_SHARDS_LEFT_N : SPELL_ROCK_SHARDS_RIGHT_N) : (m_bRLRockShard ? SPELL_ROCK_SHARDS_LEFT_H : SPELL_ROCK_SHARDS_RIGHT_H)); m_bRLRockShard = !m_bRLRockShard; From 4908d19de2fa830d768fc776e88b07a13a3beb93 Mon Sep 17 00:00:00 2001 From: Insider Date: Sun, 29 Nov 2009 20:19:11 +0700 Subject: [PATCH 059/405] SD2 updated to 1510 --- .../boss_mograine_and_whitemane.cpp | 65 ++++++++++++------- scripts/northrend/gundrak/gundrak.h | 2 +- 2 files changed, 44 insertions(+), 23 deletions(-) diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp index a1ec49c9f..3c5a84edc 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp @@ -70,9 +70,6 @@ struct MANGOS_DLL_DECL boss_scarlet_commander_mograineAI : public ScriptedAI void Reset() { - Unit* Whitemane = Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_WHITEMANE)); - if(Whitemane && !Whitemane->isAlive()) - ((Creature*)Whitemane)->Respawn(); m_uiCrusaderStrike_Timer = 10000; m_uiHammerOfJustice_Timer = 10000; @@ -84,6 +81,15 @@ struct MANGOS_DLL_DECL boss_scarlet_commander_mograineAI : public ScriptedAI m_bHasDied = false; m_bHeal = false; m_bFakeDeath = false; + + if (!m_pInstance) + return; + + if (Creature* pWhitemane = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_WHITEMANE))) + { + if (m_creature->isAlive() && !pWhitemane->isAlive()) + pWhitemane->Respawn(); + } } void Aggro(Unit* pWho) @@ -108,12 +114,11 @@ struct MANGOS_DLL_DECL boss_scarlet_commander_mograineAI : public ScriptedAI return; //On first death, fake death and open door, as well as initiate whitemane if exist - if (Unit* Whitemane = Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_WHITEMANE))) + if (Creature* pWhitemane = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_WHITEMANE))) { m_pInstance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, IN_PROGRESS); - Whitemane->GetMotionMaster()->MovePoint(1,1163.113370,1398.856812,32.527786); - ((Creature*)Whitemane)->AI()->AttackStart(pDoneBy); + pWhitemane->GetMotionMaster()->MovePoint(1,1163.113370,1398.856812,32.527786); m_creature->GetMotionMaster()->MovementExpired(); m_creature->GetMotionMaster()->MoveIdle(); @@ -158,11 +163,11 @@ struct MANGOS_DLL_DECL boss_scarlet_commander_mograineAI : public ScriptedAI if (m_bHasDied && !m_bHeal && m_pInstance && m_pInstance->GetData(TYPE_MOGRAINE_AND_WHITE_EVENT) == SPECIAL) { //On ressurection, stop fake death and heal whitemane and resume fight - if (Unit* Whitemane = Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_WHITEMANE))) + if (Creature* pWhitemane = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_WHITEMANE))) { m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->SetStandState(UNIT_STAND_STATE_STAND); - DoCast(Whitemane, SPELL_LAYONHANDS); + DoCast(pWhitemane, SPELL_LAYONHANDS); m_uiCrusaderStrike_Timer = 10000; m_uiHammerOfJustice_Timer = 10000; @@ -183,14 +188,18 @@ struct MANGOS_DLL_DECL boss_scarlet_commander_mograineAI : public ScriptedAI { DoCast(m_creature->getVictim(),SPELL_CRUSADERSTRIKE); m_uiCrusaderStrike_Timer = 10000; - }else m_uiCrusaderStrike_Timer -= uiDiff; + } + else + m_uiCrusaderStrike_Timer -= uiDiff; //m_uiHammerOfJustice_Timer if (m_uiHammerOfJustice_Timer < uiDiff) { DoCast(m_creature->getVictim(),SPELL_HAMMEROFJUSTICE); m_uiHammerOfJustice_Timer = 60000; - }else m_uiHammerOfJustice_Timer -= uiDiff; + } + else + m_uiHammerOfJustice_Timer -= uiDiff; DoMeleeAttackIfReady(); } @@ -216,9 +225,6 @@ struct MANGOS_DLL_DECL boss_high_inquisitor_whitemaneAI : public ScriptedAI void Reset() { - Unit* Mograine = Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_MOGRAINE)); - if(Mograine && !Mograine->isAlive()) - ((Creature*)Mograine)->Respawn(); m_uiWait_Timer = 7000; m_uiHeal_Timer = 10000; m_uiPowerWordShield_Timer = 15000; @@ -226,12 +232,20 @@ struct MANGOS_DLL_DECL boss_high_inquisitor_whitemaneAI : public ScriptedAI m_bCanResurrectCheck = false; m_bCanResurrect = false; + + if (!m_pInstance) + return; + + if (Creature* pMograine = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_MOGRAINE))) + { + if (m_creature->isAlive() && !pMograine->isAlive()) + pMograine->Respawn(); + } } void JustReachedHome() { - if (m_pInstance) { if (!(m_pInstance->GetData(TYPE_MOGRAINE_AND_WHITE_EVENT) == NOT_STARTED) || !(m_pInstance->GetData(TYPE_MOGRAINE_AND_WHITE_EVENT) == FAIL)) @@ -249,7 +263,7 @@ struct MANGOS_DLL_DECL boss_high_inquisitor_whitemaneAI : public ScriptedAI if (uiDamage < m_creature->GetHealth()) return; - if(!m_bCanResurrectCheck || m_bCanResurrect) + if (!m_bCanResurrectCheck || m_bCanResurrect) { // prevent killing blow before rezzing commander m_creature->SetHealth(uiDamage+1); @@ -284,14 +298,15 @@ struct MANGOS_DLL_DECL boss_high_inquisitor_whitemaneAI : public ScriptedAI //When casting resuruction make sure to delay so on rez when reinstate battle deepsleep runs out if (m_pInstance && m_uiWait_Timer < uiDiff) { - if (Unit* Mograine = Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_MOGRAINE))) + if (Creature* pMograine = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_MOGRAINE))) { - DoCast(Mograine, SPELL_SCARLETRESURRECTION); + DoCast(pMograine, SPELL_SCARLETRESURRECTION); DoScriptText(SAY_WH_RESSURECT, m_creature); m_bCanResurrect = false; } } - else m_uiWait_Timer -= uiDiff; + else + m_uiWait_Timer -= uiDiff; } //Cast Deep sleep when health is less than 50% @@ -320,7 +335,7 @@ struct MANGOS_DLL_DECL boss_high_inquisitor_whitemaneAI : public ScriptedAI if (m_pInstance) { - if (Creature* pMograine = (Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_MOGRAINE))) + if (Creature* pMograine = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_MOGRAINE))) { if (pMograine->isAlive() && pMograine->GetHealth() <= pMograine->GetMaxHealth()*0.75f) pTarget = pMograine; @@ -331,21 +346,27 @@ struct MANGOS_DLL_DECL boss_high_inquisitor_whitemaneAI : public ScriptedAI DoCast(pTarget, SPELL_HEAL); m_uiHeal_Timer = 13000; - }else m_uiHeal_Timer -= uiDiff; + } + else + m_uiHeal_Timer -= uiDiff; //m_uiPowerWordShield_Timer if (m_uiPowerWordShield_Timer < uiDiff) { DoCast(m_creature,SPELL_POWERWORDSHIELD); m_uiPowerWordShield_Timer = 15000; - }else m_uiPowerWordShield_Timer -= uiDiff; + } + else + m_uiPowerWordShield_Timer -= uiDiff; //m_uiHolySmite_Timer if (m_uiHolySmite_Timer < uiDiff) { DoCast(m_creature->getVictim(),SPELL_HOLYSMITE); m_uiHolySmite_Timer = 6000; - }else m_uiHolySmite_Timer -= uiDiff; + } + else + m_uiHolySmite_Timer -= uiDiff; DoMeleeAttackIfReady(); } diff --git a/scripts/northrend/gundrak/gundrak.h b/scripts/northrend/gundrak/gundrak.h index 5b6792098..cddc03e87 100644 --- a/scripts/northrend/gundrak/gundrak.h +++ b/scripts/northrend/gundrak/gundrak.h @@ -31,7 +31,7 @@ enum GO_ECK_UNDERWATER_DOOR = 192569, GO_GALDARAH_DOOR = 192568, GO_EXIT_DOOR_L = 193208, - GO_EXIT_DOOR_R = 193207, + GO_EXIT_DOOR_R = 193209, GO_ALTAR_OF_SLADRAN = 192518, GO_ALTAR_OF_MOORABI = 192519, From 9d37c1e1e1b4912516d73f6fc39c00fcfff13b79 Mon Sep 17 00:00:00 2001 From: Insider Date: Wed, 2 Dec 2009 17:05:44 +0700 Subject: [PATCH 060/405] SD2 updated to 1513 --- .../blackrock_depths/boss_tomb_of_seven.cpp | 2 +- scripts/eastern_kingdoms/blasted_lands.cpp | 4 +- .../eastern_kingdoms/eastern_plaguelands.cpp | 4 +- scripts/eastern_kingdoms/ghostlands.cpp | 4 +- scripts/eastern_kingdoms/ironforge.cpp | 2 +- .../eastern_kingdoms/isle_of_queldanas.cpp | 4 +- .../eastern_kingdoms/karazhan/karazhan.cpp | 2 +- scripts/eastern_kingdoms/loch_modan.cpp | 2 +- scripts/eastern_kingdoms/searing_gorge.cpp | 4 +- .../shadowfang_keep/shadowfang_keep.cpp | 2 +- scripts/eastern_kingdoms/stormwind_city.cpp | 2 +- .../eastern_kingdoms/western_plaguelands.cpp | 4 +- scripts/eastern_kingdoms/zulaman/zulaman.cpp | 2 +- .../eastern_kingdoms/zulgurub/boss_marli.cpp | 8 -- .../zulgurub/boss_venoxis.cpp | 5 - .../zulgurub/instance_zulgurub.cpp | 113 ++++++++++++++++-- scripts/examples/example_escort.cpp | 4 +- scripts/kalimdor/azshara.cpp | 4 +- scripts/kalimdor/azuremyst_isle.cpp | 4 +- .../old_hillsbrad/old_hillsbrad.cpp | 2 +- scripts/kalimdor/darkshore.cpp | 2 +- scripts/kalimdor/desolace.cpp | 2 +- scripts/kalimdor/dustwallow_marsh.cpp | 6 +- scripts/kalimdor/felwood.cpp | 2 +- scripts/kalimdor/orgrimmar.cpp | 2 +- .../razorfen_downs/razorfen_downs.cpp | 2 +- scripts/kalimdor/silithus.cpp | 2 +- scripts/kalimdor/tanaris.cpp | 2 +- scripts/kalimdor/the_barrens.cpp | 2 +- scripts/kalimdor/winterspring.cpp | 4 +- scripts/northrend/borean_tundra.cpp | 10 +- scripts/northrend/dalaran.cpp | 2 +- scripts/northrend/dragonblight.cpp | 8 +- scripts/northrend/grizzly_hills.cpp | 2 +- scripts/northrend/howling_fjord.cpp | 8 +- scripts/northrend/icecrown.cpp | 2 +- scripts/northrend/sholazar_basin.cpp | 2 +- scripts/northrend/storm_peaks.cpp | 8 +- scripts/outland/black_temple/black_temple.cpp | 2 +- scripts/outland/blades_edge_mountains.cpp | 2 +- scripts/outland/hellfire_peninsula.cpp | 14 +-- scripts/outland/nagrand.cpp | 28 ++--- scripts/outland/netherstorm.cpp | 4 +- scripts/outland/shadowmoon_valley.cpp | 6 +- scripts/outland/shattrath_city.cpp | 8 +- scripts/outland/terokkar_forest.cpp | 2 +- scripts/outland/zangarmarsh.cpp | 6 +- scripts/world/npc_professions.cpp | 56 ++++----- scripts/world/npcs_special.cpp | 14 +-- sql/Updates/Makefile.am | 3 +- sql/Updates/r1513_scriptdev2.sql | 1 + sql/scriptdev2_script_full.sql | 2 +- 52 files changed, 235 insertions(+), 159 deletions(-) create mode 100644 sql/Updates/r1513_scriptdev2.sql diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_tomb_of_seven.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_tomb_of_seven.cpp index 6980c52f3..15bc909c9 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_tomb_of_seven.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_tomb_of_seven.cpp @@ -55,7 +55,7 @@ bool GossipHello_boss_gloomrel(Player* pPlayer, Creature* pCreature) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TRIBUTE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); } } - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } diff --git a/scripts/eastern_kingdoms/blasted_lands.cpp b/scripts/eastern_kingdoms/blasted_lands.cpp index 619f63a09..aa0e6a63b 100644 --- a/scripts/eastern_kingdoms/blasted_lands.cpp +++ b/scripts/eastern_kingdoms/blasted_lands.cpp @@ -43,7 +43,7 @@ bool GossipHello_npc_deathly_usher(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(3628) == QUEST_STATUS_INCOMPLETE && pPlayer->HasItemCount(10757, 1)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_USHER, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } @@ -85,7 +85,7 @@ bool GossipHello_npc_fallen_hero_of_horde(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(2801) == QUEST_STATUS_INCOMPLETE && pPlayer->GetTeam() == ALLIANCE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Why are you here?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } diff --git a/scripts/eastern_kingdoms/eastern_plaguelands.cpp b/scripts/eastern_kingdoms/eastern_plaguelands.cpp index 69cf1099e..2681c97da 100644 --- a/scripts/eastern_kingdoms/eastern_plaguelands.cpp +++ b/scripts/eastern_kingdoms/eastern_plaguelands.cpp @@ -65,7 +65,7 @@ bool GossipHello_npc_augustus_the_touched(Player* pPlayer, Creature* pCreature) if (pCreature->isVendor() && pPlayer->GetQuestRewardStatus(6164)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } @@ -118,7 +118,7 @@ bool GossipHello_npc_tirion_fordring(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(5742) == QUEST_STATUS_INCOMPLETE && pPlayer->getStandState() == UNIT_STAND_STATE_SIT) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I am ready to hear your tale, Tirion.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } diff --git a/scripts/eastern_kingdoms/ghostlands.cpp b/scripts/eastern_kingdoms/ghostlands.cpp index a400bf9b0..b9883bd50 100644 --- a/scripts/eastern_kingdoms/ghostlands.cpp +++ b/scripts/eastern_kingdoms/ghostlands.cpp @@ -42,7 +42,7 @@ bool GossipHello_npc_blood_knight_dawnstar(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(9692) == QUEST_STATUS_INCOMPLETE && !pPlayer->HasItemCount(24226,1,true)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,GOSSIP_ITEM_INSIGNIA,GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } @@ -76,7 +76,7 @@ bool GossipHello_npc_budd_nedreck(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(11166) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,GOSSIP_ITEM_DISGUISE,GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } diff --git a/scripts/eastern_kingdoms/ironforge.cpp b/scripts/eastern_kingdoms/ironforge.cpp index e4653b0a4..e6dac07b0 100644 --- a/scripts/eastern_kingdoms/ironforge.cpp +++ b/scripts/eastern_kingdoms/ironforge.cpp @@ -48,7 +48,7 @@ bool GossipHello_npc_royal_historian_archesonus(Player* pPlayer, Creature* pCrea pPlayer->SEND_GOSSIP_MENU(2235, pCreature->GetGUID()); } else - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } diff --git a/scripts/eastern_kingdoms/isle_of_queldanas.cpp b/scripts/eastern_kingdoms/isle_of_queldanas.cpp index 25f1ac66e..295ec933e 100644 --- a/scripts/eastern_kingdoms/isle_of_queldanas.cpp +++ b/scripts/eastern_kingdoms/isle_of_queldanas.cpp @@ -41,7 +41,7 @@ bool GossipHello_npc_ayren_cloudbreaker(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(11542) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(11543) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,"I need to intercept the Dawnblade reinforcements.",GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } @@ -120,7 +120,7 @@ bool GossipHello_npc_unrestrained_dragonhawk(Player* pPlayer, Creature* pCreatur if (pPlayer->GetQuestStatus(11542) == QUEST_STATUS_COMPLETE || pPlayer->GetQuestStatus(11543) == QUEST_STATUS_COMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,"",GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.cpp b/scripts/eastern_kingdoms/karazhan/karazhan.cpp index 8de4e4c83..cf1bcf62c 100644 --- a/scripts/eastern_kingdoms/karazhan/karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/karazhan.cpp @@ -401,7 +401,7 @@ bool GossipHello_npc_berthold(Player* pPlayer, Creature* pCreature) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TELEPORT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); } - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } diff --git a/scripts/eastern_kingdoms/loch_modan.cpp b/scripts/eastern_kingdoms/loch_modan.cpp index c0375382d..b4fc234ec 100644 --- a/scripts/eastern_kingdoms/loch_modan.cpp +++ b/scripts/eastern_kingdoms/loch_modan.cpp @@ -39,7 +39,7 @@ bool GossipHello_npc_mountaineer_pebblebitty(Player* pPlayer, Creature* pCreatur if (!pPlayer->GetQuestRewardStatus(3181) == 1) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Open the gate please, i need to get to Searing Gorge", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } diff --git a/scripts/eastern_kingdoms/searing_gorge.cpp b/scripts/eastern_kingdoms/searing_gorge.cpp index df8732ad2..510add172 100644 --- a/scripts/eastern_kingdoms/searing_gorge.cpp +++ b/scripts/eastern_kingdoms/searing_gorge.cpp @@ -41,7 +41,7 @@ bool GossipHello_npc_kalaran_windblade(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(3441) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Tell me what drives this vengance?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } @@ -78,7 +78,7 @@ bool GossipHello_npc_lothos_riftwaker(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestRewardStatus(7487) || pPlayer->GetQuestRewardStatus(7848)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport me to the Molten Core", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } diff --git a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp index 13817cf44..09f16556b 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp +++ b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp @@ -112,7 +112,7 @@ bool GossipHello_npc_shadowfang_prisoner(Player* pPlayer, Creature* pCreature) if (pInstance && pInstance->GetData(TYPE_FREE_NPC) != DONE && pInstance->GetData(TYPE_RETHILGORE) == DONE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DOOR, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } diff --git a/scripts/eastern_kingdoms/stormwind_city.cpp b/scripts/eastern_kingdoms/stormwind_city.cpp index 4d2b52ce5..0349efd03 100644 --- a/scripts/eastern_kingdoms/stormwind_city.cpp +++ b/scripts/eastern_kingdoms/stormwind_city.cpp @@ -44,7 +44,7 @@ bool GossipHello_npc_archmage_malin(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(11223) == QUEST_STATUS_COMPLETE && !pPlayer->GetQuestRewardStatus(11223)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_MALIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } diff --git a/scripts/eastern_kingdoms/western_plaguelands.cpp b/scripts/eastern_kingdoms/western_plaguelands.cpp index 87e696b8a..c96ea3f44 100644 --- a/scripts/eastern_kingdoms/western_plaguelands.cpp +++ b/scripts/eastern_kingdoms/western_plaguelands.cpp @@ -48,7 +48,7 @@ bool GossipHello_npcs_dithers_and_arbington(Player* pPlayer, Creature* pCreature pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What does the Gahrron's Withering Cauldron need?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); pPlayer->SEND_GOSSIP_MENU(3985, pCreature->GetGUID()); }else - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } @@ -110,7 +110,7 @@ bool GossipHello_npc_myranda_the_hag(Player* pPlayer, Creature* pCreature) return true; } else - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } diff --git a/scripts/eastern_kingdoms/zulaman/zulaman.cpp b/scripts/eastern_kingdoms/zulaman/zulaman.cpp index 31fb14e21..60a69f5e1 100644 --- a/scripts/eastern_kingdoms/zulaman/zulaman.cpp +++ b/scripts/eastern_kingdoms/zulaman/zulaman.cpp @@ -181,7 +181,7 @@ bool GossipHello_npc_harrison_jones_za(Player* pPlayer, Creature* pCreature) if (pInstance && pInstance->GetData(TYPE_EVENT_RUN) == NOT_STARTED) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BEGIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } diff --git a/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp b/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp index c77cef50a..dc98ef5fc 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp @@ -163,15 +163,7 @@ struct MANGOS_DLL_DECL boss_marliAI : public ScriptedAI DoScriptText(SAY_DEATH, m_creature); if (m_pInstance) - { m_pInstance->SetData(TYPE_MARLI, DONE); - - if (Creature* pHakkar = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_HAKKAR))) - { - if (pHakkar->isAlive()) - pHakkar->SetMaxHealth(pHakkar->GetMaxHealth() - 60000); - } - } } void UpdateAI(const uint32 uiDiff) diff --git a/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp b/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp index 656e3ecf4..afe8e7256 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp @@ -114,12 +114,7 @@ struct MANGOS_DLL_DECL boss_venoxisAI : public ScriptedAI DoScriptText(SAY_DEATH, m_creature); if (m_pInstance) - { m_pInstance->SetData(TYPE_VENOXIS, DONE); - - if (Unit* pHakkar = Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_HAKKAR))) - pHakkar->SetMaxHealth(pHakkar->GetMaxHealth() - 60000); - } } void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) diff --git a/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp b/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp index 41ed7542a..296e9a583 100644 --- a/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp +++ b/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp @@ -28,10 +28,11 @@ struct MANGOS_DLL_DECL instance_zulgurub : public ScriptedInstance { instance_zulgurub(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; - //If all High Priest bosses were killed. Lorkhan, Zath and Ohgan are added too. + std::string strInstData; + // If all High Priest bosses were killed. Lorkhan, Zath and Ohgan are added too. uint32 m_auiEncounter[MAX_ENCOUNTER]; - //Storing Lorkhan, Zath and Thekal because we need to cast on them later. Jindo is needed for healfunction too. + // Storing Lorkhan, Zath and Thekal because we need to cast on them later. Jindo is needed for heal function too. uint64 m_uiLorKhanGUID; uint64 m_uiZathGUID; uint64 m_uiThekalGUID; @@ -43,10 +44,23 @@ struct MANGOS_DLL_DECL instance_zulgurub : public ScriptedInstance memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); m_uiLorKhanGUID = 0; - m_uiZathGUID = 0; - m_uiThekalGUID = 0; - m_uiJindoGUID = 0; - m_uiHakkarGUID = 0; + m_uiZathGUID = 0; + m_uiThekalGUID = 0; + m_uiJindoGUID = 0; + m_uiHakkarGUID = 0; + } + + // each time High Priest dies lower Hakkar's HP + void LowerHakkarHitPoints() + { + if (Creature* pHakkar = instance->GetCreature(m_uiHakkarGUID)) + { + if (pHakkar->isAlive()) + { + pHakkar->SetMaxHealth(pHakkar->GetMaxHealth() - 60000); + pHakkar->SetHealth(pHakkar->GetHealth() - 60000); + } + } } bool IsEncounterInProgress() const @@ -59,11 +73,31 @@ struct MANGOS_DLL_DECL instance_zulgurub : public ScriptedInstance { switch(pCreature->GetEntry()) { - case NPC_LORKHAN: m_uiLorKhanGUID = pCreature->GetGUID(); break; - case NPC_ZATH: m_uiZathGUID = pCreature->GetGUID(); break; - case NPC_THEKAL: m_uiThekalGUID = pCreature->GetGUID(); break; - case NPC_JINDO: m_uiJindoGUID = pCreature->GetGUID(); break; - case NPC_HAKKAR: m_uiHakkarGUID = pCreature->GetGUID(); break; + case NPC_LORKHAN: + m_uiLorKhanGUID = pCreature->GetGUID(); + break; + case NPC_ZATH: + m_uiZathGUID = pCreature->GetGUID(); + break; + case NPC_THEKAL: + m_uiThekalGUID = pCreature->GetGUID(); + break; + case NPC_JINDO: + m_uiJindoGUID = pCreature->GetGUID(); + break; + case NPC_HAKKAR: + m_uiHakkarGUID = pCreature->GetGUID(); + if (m_auiEncounter[0] == DONE) + LowerHakkarHitPoints(); + if (m_auiEncounter[1] == DONE) + LowerHakkarHitPoints(); + if (m_auiEncounter[2] == DONE) + LowerHakkarHitPoints(); + if (m_auiEncounter[3] == DONE) + LowerHakkarHitPoints(); + if (m_auiEncounter[4] == DONE) + LowerHakkarHitPoints(); + break; } } @@ -73,18 +107,28 @@ struct MANGOS_DLL_DECL instance_zulgurub : public ScriptedInstance { case TYPE_ARLOKK: m_auiEncounter[0] = uiData; + if (uiData == DONE) + LowerHakkarHitPoints(); break; case TYPE_JEKLIK: m_auiEncounter[1] = uiData; + if (uiData == DONE) + LowerHakkarHitPoints(); break; case TYPE_VENOXIS: m_auiEncounter[2] = uiData; + if (uiData == DONE) + LowerHakkarHitPoints(); break; case TYPE_MARLI: m_auiEncounter[3] = uiData; + if (uiData == DONE) + LowerHakkarHitPoints(); break; case TYPE_THEKAL: m_auiEncounter[4] = uiData; + if (uiData == DONE) + LowerHakkarHitPoints(); break; case TYPE_LORKHAN: m_auiEncounter[5] = uiData; @@ -99,6 +143,50 @@ struct MANGOS_DLL_DECL instance_zulgurub : public ScriptedInstance m_auiEncounter[8] = uiData; break; } + + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " + << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " + << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8]; + + strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } + } + + const char* Save() + { + return strInstData.c_str(); + } + + void Load(const char* chrIn) + { + if (!chrIn) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(chrIn); + + std::istringstream loadStream(chrIn); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] + >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] + >> m_auiEncounter[8]; + + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; + } + + OUT_LOAD_INST_DATA_COMPLETE; } uint32 GetData(uint32 uiType) @@ -124,7 +212,6 @@ struct MANGOS_DLL_DECL instance_zulgurub : public ScriptedInstance case TYPE_HAKKAR: return m_auiEncounter[8]; } - return 0; } @@ -154,7 +241,7 @@ InstanceData* GetInstanceData_instance_zulgurub(Map* pMap) void AddSC_instance_zulgurub() { - Script *newscript; + Script* newscript; newscript = new Script; newscript->Name = "instance_zulgurub"; newscript->GetInstanceData = &GetInstanceData_instance_zulgurub; diff --git a/scripts/examples/example_escort.cpp b/scripts/examples/example_escort.cpp index 4698d9d54..1ecaac9d4 100644 --- a/scripts/examples/example_escort.cpp +++ b/scripts/examples/example_escort.cpp @@ -176,13 +176,13 @@ CreatureAI* GetAI_example_escort(Creature* pCreature) bool GossipHello_example_escort(Player* pPlayer, Creature* pCreature) { pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetGUID()); - pCreature->prepareGossipMenu(pPlayer, 0); + pPlayer->PrepareGossipMenu(pCreature, 0); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); - pCreature->sendPreparedGossip(pPlayer); + pPlayer->SendPreparedGossip(pCreature); return true; } diff --git a/scripts/kalimdor/azshara.cpp b/scripts/kalimdor/azshara.cpp index 354f5a801..587d393ba 100644 --- a/scripts/kalimdor/azshara.cpp +++ b/scripts/kalimdor/azshara.cpp @@ -188,7 +188,7 @@ bool GossipHello_npc_rizzle_sprysprocket(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(QUEST_MOONSTONE) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_MOONSTONE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } @@ -314,7 +314,7 @@ bool GossipHello_npc_loramus_thalipedes(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(3141) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Tell me your story", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } diff --git a/scripts/kalimdor/azuremyst_isle.cpp b/scripts/kalimdor/azuremyst_isle.cpp index f83239d2b..936e534ba 100644 --- a/scripts/kalimdor/azuremyst_isle.cpp +++ b/scripts/kalimdor/azuremyst_isle.cpp @@ -270,7 +270,7 @@ bool GossipHello_npc_engineer_spark_overgrind(Player* pPlayer, Creature* pCreatu if (pPlayer->GetQuestStatus(QUEST_GNOMERCY) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_FIGHT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } @@ -477,7 +477,7 @@ bool GossipHello_npc_susurrus(Player* pPlayer, Creature* pCreature) if (pPlayer->HasItemCount(ITEM_WHORL_OF_AIR,1,true)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_READY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp index b8b8d1c1b..2c0046d9b 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp @@ -52,7 +52,7 @@ enum bool GossipHello_npc_brazen(Player* pPlayer, Creature* pCreature) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_READY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } diff --git a/scripts/kalimdor/darkshore.cpp b/scripts/kalimdor/darkshore.cpp index 0ed182682..6883af571 100644 --- a/scripts/kalimdor/darkshore.cpp +++ b/scripts/kalimdor/darkshore.cpp @@ -360,7 +360,7 @@ bool GossipHello_npc_threshwackonator(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(QUEST_GYROMAST_REV) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_INSERT_KEY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } diff --git a/scripts/kalimdor/desolace.cpp b/scripts/kalimdor/desolace.cpp index 9b322b4ce..4b3c563a0 100644 --- a/scripts/kalimdor/desolace.cpp +++ b/scripts/kalimdor/desolace.cpp @@ -157,7 +157,7 @@ bool GossipHello_npc_aged_dying_ancient_kodo(Player* pPlayer, Creature* pCreatur pCreature->GetMotionMaster()->MoveIdle(); } - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } diff --git a/scripts/kalimdor/dustwallow_marsh.cpp b/scripts/kalimdor/dustwallow_marsh.cpp index e2dd7767a..5025ea926 100644 --- a/scripts/kalimdor/dustwallow_marsh.cpp +++ b/scripts/kalimdor/dustwallow_marsh.cpp @@ -214,7 +214,7 @@ bool GossipHello_npc_deserter_agitator(Player* pPlayer, Creature* pCreature) pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetGUID()); } else - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } @@ -239,7 +239,7 @@ bool GossipHello_npc_lady_jaina_proudmoore(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(QUEST_JAINAS_AUTOGRAPH) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_JAINA, GOSSIP_SENDER_MAIN, GOSSIP_SENDER_INFO); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } @@ -795,7 +795,7 @@ bool GossipHello_npc_cassa_crimsonwing(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(QUEST_SURVEY_ALCAZ) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_RIDE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } diff --git a/scripts/kalimdor/felwood.cpp b/scripts/kalimdor/felwood.cpp index 1c7a8e949..a4b2b0231 100644 --- a/scripts/kalimdor/felwood.cpp +++ b/scripts/kalimdor/felwood.cpp @@ -139,7 +139,7 @@ bool GossipHello_npc_corrupt_saber(Player* pPlayer, Creature* pCreature) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_RELEASE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); } - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } diff --git a/scripts/kalimdor/orgrimmar.cpp b/scripts/kalimdor/orgrimmar.cpp index 2b2c412c1..9a889e8db 100644 --- a/scripts/kalimdor/orgrimmar.cpp +++ b/scripts/kalimdor/orgrimmar.cpp @@ -206,7 +206,7 @@ bool GossipHello_npc_thrall_warchief(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(QUEST_6566) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Please share your wisdom with me, Warchief.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } diff --git a/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp b/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp index 8abb2d61e..d13f8620f 100644 --- a/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp +++ b/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp @@ -52,7 +52,7 @@ bool GossipHello_npc_henry_stern (Player* pPlayer, Creature* pCreature) if (pPlayer->GetBaseSkillValue(SKILL_ALCHEMY) >= 180 && !pPlayer->HasSpell(SPELL_MIGHT_TROLLS_BLOOD_POTION)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_POTION, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } diff --git a/scripts/kalimdor/silithus.cpp b/scripts/kalimdor/silithus.cpp index 4e6e274ce..e122a4ee8 100644 --- a/scripts/kalimdor/silithus.cpp +++ b/scripts/kalimdor/silithus.cpp @@ -64,7 +64,7 @@ bool GossipHello_npc_highlord_demitrian(Player* pPlayer, Creature* pCreature) (pPlayer->HasItemCount(ITEM_BINDINGS_WINDSEEKER_LEFT,1,false) || pPlayer->HasItemCount(ITEM_BINDINGS_WINDSEEKER_RIGHT,1,false))) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DEMITRIAN1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } diff --git a/scripts/kalimdor/tanaris.cpp b/scripts/kalimdor/tanaris.cpp index fc55cfc09..a6b9a526b 100644 --- a/scripts/kalimdor/tanaris.cpp +++ b/scripts/kalimdor/tanaris.cpp @@ -224,7 +224,7 @@ bool GossipHello_npc_marin_noggenfogger(Player* pPlayer, Creature* pCreature) if (pCreature->isVendor() && pPlayer->GetQuestRewardStatus(2662)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } diff --git a/scripts/kalimdor/the_barrens.cpp b/scripts/kalimdor/the_barrens.cpp index 77b06243f..e877468b9 100644 --- a/scripts/kalimdor/the_barrens.cpp +++ b/scripts/kalimdor/the_barrens.cpp @@ -175,7 +175,7 @@ bool GossipHello_npc_sputtervalve(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(6981) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,"Can you tell me about this shard?",GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } diff --git a/scripts/kalimdor/winterspring.cpp b/scripts/kalimdor/winterspring.cpp index ccae94e9a..03cdc23a7 100644 --- a/scripts/kalimdor/winterspring.cpp +++ b/scripts/kalimdor/winterspring.cpp @@ -41,7 +41,7 @@ bool GossipHello_npc_lorax(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(5126) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Talk to me", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } @@ -90,7 +90,7 @@ bool GossipHello_npc_rivern_frostwind(Player* pPlayer, Creature* pCreature) if (pCreature->isVendor() && pPlayer->GetReputationRank(589) == REP_EXALTED) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } diff --git a/scripts/northrend/borean_tundra.cpp b/scripts/northrend/borean_tundra.cpp index 702fb5049..05dfff8f6 100644 --- a/scripts/northrend/borean_tundra.cpp +++ b/scripts/northrend/borean_tundra.cpp @@ -61,7 +61,7 @@ bool GossipHello_npc_fizzcrank_fullthrottle(Player* pPlayer, Creature* pCreature if (pPlayer->GetQuestStatus(QUEST_THE_MECHAGNOMES) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TELL_ME, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } @@ -126,7 +126,7 @@ bool GossipHello_npc_iruk(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(QUEST_SPIRITS_WATCH_OVER_US) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_IRUK, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } @@ -162,7 +162,7 @@ bool GossipHello_npc_kara_thricestar(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(QUEST_CHECK_IN_WITH_BIXIE) == QUEST_STATUS_COMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_THRICESTAR2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } @@ -205,7 +205,7 @@ bool GossipHello_npc_surristrasz(Player* pPlayer, Creature* pCreature) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, GOSSIP_ITEM_FLIGHT, GOSSIP_SENDER_MAIN, GOSSIP_OPTION_TAXIVENDOR); } - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } @@ -239,7 +239,7 @@ enum bool GossipHello_npc_tiare(Player* pPlayer, Creature* pCreature) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TELEPORT, GOSSIP_SENDER_MAIN, GOSSIP_OPTION_GOSSIP); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } diff --git a/scripts/northrend/dalaran.cpp b/scripts/northrend/dalaran.cpp index 7e912db24..fd669310a 100644 --- a/scripts/northrend/dalaran.cpp +++ b/scripts/northrend/dalaran.cpp @@ -44,7 +44,7 @@ bool GossipHello_npc_zidormi(Player* pPlayer, Creature* pCreature) if (pPlayer->getLevel() >= 65) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ZIDORMI1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); } else pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ZIDORMI1, pCreature->GetGUID()); diff --git a/scripts/northrend/dragonblight.cpp b/scripts/northrend/dragonblight.cpp index 8f627a8ba..f611e52fe 100644 --- a/scripts/northrend/dragonblight.cpp +++ b/scripts/northrend/dragonblight.cpp @@ -51,7 +51,7 @@ bool GossipHello_npc_afrasastrasz(Player* pPlayer, Creature* pCreature) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TAXI_MIDDLE_DOWN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TAXI_MIDDLE_TOP, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } @@ -91,7 +91,7 @@ bool GossipHello_npc_alexstrasza_wr_gate(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestRewardStatus(QUEST_RETURN_TO_AG_A) || pPlayer->GetQuestRewardStatus(QUEST_RETURN_TO_AG_H)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_WHAT_HAPPENED, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } @@ -129,7 +129,7 @@ bool GossipHello_npc_tariolstrasz(Player* pPlayer, Creature* pCreature) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TAXI_BOTTOM_TOP, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TAXI_BOTTOM_MIDDLE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } @@ -169,7 +169,7 @@ bool GossipHello_npc_torastrasza(Player* pPlayer, Creature* pCreature) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TAXI_TOP_MIDDLE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TAXI_TOP_BOTTOM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } diff --git a/scripts/northrend/grizzly_hills.cpp b/scripts/northrend/grizzly_hills.cpp index 5ffc450f7..38f8b949c 100644 --- a/scripts/northrend/grizzly_hills.cpp +++ b/scripts/northrend/grizzly_hills.cpp @@ -80,7 +80,7 @@ bool GossipHello_npc_orsonn_and_kodian(Player* pPlayer, Creature* pCreature) } } - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } diff --git a/scripts/northrend/howling_fjord.cpp b/scripts/northrend/howling_fjord.cpp index 243f33887..06317a1e4 100644 --- a/scripts/northrend/howling_fjord.cpp +++ b/scripts/northrend/howling_fjord.cpp @@ -48,7 +48,7 @@ bool GossipHello_npc_deathstalker_razael(Player* pPlayer, Creature* pCreature) pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DEATHSTALKER_RAZAEL1, pCreature->GetGUID()); } else - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } @@ -90,7 +90,7 @@ bool GossipHello_npc_dark_ranger_lyana(Player* pPlayer, Creature* pCreature) pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_DARK_RANGER_LYANA1, pCreature->GetGUID()); } else - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } @@ -132,7 +132,7 @@ bool GossipHello_npc_mcgoyver(Player* pPlayer, Creature* pCreature) if (!pPlayer->HasItemCount(ITEM_DARK_IRON_INGOTS, 1, true)) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_MCGOYVER1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); } else { @@ -148,7 +148,7 @@ bool GossipHello_npc_mcgoyver(Player* pPlayer, Creature* pCreature) break; } default: - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); } return true; diff --git a/scripts/northrend/icecrown.cpp b/scripts/northrend/icecrown.cpp index 971cb4540..f31ddd027 100644 --- a/scripts/northrend/icecrown.cpp +++ b/scripts/northrend/icecrown.cpp @@ -64,7 +64,7 @@ bool GossipHello_npc_arete(Player* pPlayer, Creature* pCreature) return true; } - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } diff --git a/scripts/northrend/sholazar_basin.cpp b/scripts/northrend/sholazar_basin.cpp index c8ad5d63d..45dbbb5ba 100644 --- a/scripts/northrend/sholazar_basin.cpp +++ b/scripts/northrend/sholazar_basin.cpp @@ -58,7 +58,7 @@ bool GossipHello_npc_vekjik(Player* pPlayer, Creature* pCreature) return true; } - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } diff --git a/scripts/northrend/storm_peaks.cpp b/scripts/northrend/storm_peaks.cpp index 953768f10..7ff424688 100644 --- a/scripts/northrend/storm_peaks.cpp +++ b/scripts/northrend/storm_peaks.cpp @@ -57,7 +57,7 @@ bool GossipHello_npc_frostborn_scout(Player* pPlayer, Creature* pCreature) return true; } - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } @@ -114,7 +114,7 @@ bool GossipHello_npc_loklira_the_crone(Player* pPlayer, Creature* pCreature) return true; } - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } @@ -173,7 +173,7 @@ bool GossipHello_npc_thorim(Player* pPlayer, Creature* pCreature) pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_THORIM1, pCreature->GetGUID()); } else - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } @@ -226,7 +226,7 @@ bool GossipHello_npc_roxi_ramrocket(Player* pPlayer, Creature* pCreature) } } - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } diff --git a/scripts/outland/black_temple/black_temple.cpp b/scripts/outland/black_temple/black_temple.cpp index 209d9bcc8..05bb0c94e 100644 --- a/scripts/outland/black_temple/black_temple.cpp +++ b/scripts/outland/black_temple/black_temple.cpp @@ -42,7 +42,7 @@ bool GossipHello_npc_spirit_of_olum(Player* pPlayer, Creature* pCreature) if (pInstance && (pInstance->GetData(TYPE_SUPREMUS) >= DONE) && (pInstance->GetData(TYPE_NAJENTUS) >= DONE)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_OLUM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } diff --git a/scripts/outland/blades_edge_mountains.cpp b/scripts/outland/blades_edge_mountains.cpp index cb3a8daad..d005e7783 100644 --- a/scripts/outland/blades_edge_mountains.cpp +++ b/scripts/outland/blades_edge_mountains.cpp @@ -333,7 +333,7 @@ bool GossipHello_npc_skyguard_handler_irena(Player* pPlayer, Creature* pCreature if (pPlayer->GetReputationRank(1031) >= REP_HONORED) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SKYGUARD, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } diff --git a/scripts/outland/hellfire_peninsula.cpp b/scripts/outland/hellfire_peninsula.cpp index 19b09eef5..52f76782e 100644 --- a/scripts/outland/hellfire_peninsula.cpp +++ b/scripts/outland/hellfire_peninsula.cpp @@ -403,7 +403,7 @@ bool GossipHello_npc_gryphoneer_windbellow(Player* pPlayer, Creature* pCreature) pPlayer->GetQuestRewardStatus(QUEST_TO_THE_FRONT)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM2_WIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } @@ -441,7 +441,7 @@ bool GossipHello_npc_naladu(Player* pPlayer, Creature* pCreature) pPlayer->PrepareQuestMenu(pCreature->GetGUID()); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_NALADU_ITEM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } @@ -478,7 +478,7 @@ bool GossipHello_npc_tracy_proudwell(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(QUEST_DIGGING_FOR_PRAYER_BEADS) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TRACY_PROUDWELL_ITEM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } @@ -491,7 +491,7 @@ bool GossipSelect_npc_tracy_proudwell(Player* pPlayer, Creature* pCreature, uint pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_TRACY_PROUDWELL1, pCreature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF+2: - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); break; case GOSSIP_ACTION_TRADE: pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); @@ -523,7 +523,7 @@ bool GossipHello_npc_trollbane(Player* pPlayer, Creature* pCreature) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TROLLBANE_ITEM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TROLLBANE_ITEM3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } @@ -575,7 +575,7 @@ bool GossipHello_npc_wing_commander_dabiree(Player* pPlayer, Creature* pCreature pPlayer->GetQuestRewardStatus(QUEST_SHATTER_POINT)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM2_DAB, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } @@ -634,7 +634,7 @@ bool GossipHello_npc_wing_commander_brack(Player* pPlayer, Creature* pCreature) pPlayer->GetQuestRewardStatus(QUEST_SPINEBREAKER)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM3_BRA, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } diff --git a/scripts/outland/nagrand.cpp b/scripts/outland/nagrand.cpp index 172007c0f..74b0963fb 100644 --- a/scripts/outland/nagrand.cpp +++ b/scripts/outland/nagrand.cpp @@ -345,16 +345,16 @@ bool GossipHello_npc_greatmother_geyah(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(10044) == QUEST_STATUS_INCOMPLETE) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Hello, Greatmother. Garrosh told me that you wanted to speak with me.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); } else if (pPlayer->GetQuestStatus(10172) == QUEST_STATUS_INCOMPLETE) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Garrosh is beyond redemption, Greatmother. I fear that in helping the Mag'har, I have convinced Garrosh that he is unfit to lead.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); } else - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } @@ -365,27 +365,27 @@ bool GossipSelect_npc_greatmother_geyah(Player* pPlayer, Creature* pCreature, ui { case GOSSIP_ACTION_INFO_DEF + 1: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "You raised all of the orcs here, Greatmother?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 2: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Do you believe that?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 3: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What can be done? I have tried many different things. I have done my best to help the people of Nagrand. Each time I have approached Garrosh, he has dismissed me.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 4: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Left? How can you choose to leave?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 5: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What is this duty?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 6: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Is there anything I can do for you, Greatmother?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 7: pPlayer->AreaExploredOrEventHappens(10044); @@ -394,23 +394,23 @@ bool GossipSelect_npc_greatmother_geyah(Player* pPlayer, Creature* pCreature, ui case GOSSIP_ACTION_INFO_DEF + 10: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I have done all that I could, Greatmother. I thank you for your kind words.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 11: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Greatmother, you are the mother of Durotan?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 12); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 12: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Greatmother, I never had the honor. Durotan died long before my time, but his heroics are known to all on my world. The orcs of Azeroth reside in a place known as Durotar, named after your son. And ... (You take a moment to breathe and think through what you are about to tell the Greatmother.)", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 13); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 13: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "It is my Warchief, Greatmother. The leader of my people. From my world. He ... He is the son of Durotan. He is your grandchild.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 14); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 14: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I will return to Azeroth at once, Greatmother.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 15); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF + 15: pPlayer->AreaExploredOrEventHappens(10172); diff --git a/scripts/outland/netherstorm.cpp b/scripts/outland/netherstorm.cpp index 5affb6f13..e5cee2ed0 100644 --- a/scripts/outland/netherstorm.cpp +++ b/scripts/outland/netherstorm.cpp @@ -640,7 +640,7 @@ bool GossipHello_npc_protectorate_nether_drake(Player* pPlayer, Creature* pCreat if (pPlayer->GetQuestStatus(QUEST_NETHER_WINGS) == QUEST_STATUS_INCOMPLETE && pPlayer->HasItemCount(ITEM_PH_DISRUPTOR, 1)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FLY_ULTRIS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } @@ -675,7 +675,7 @@ bool GossipHello_npc_veronia(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(QUEST_BEHIND_ENEMY_LINES) && !pPlayer->GetQuestRewardStatus(QUEST_BEHIND_ENEMY_LINES)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FLY_CORUU, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } diff --git a/scripts/outland/shadowmoon_valley.cpp b/scripts/outland/shadowmoon_valley.cpp index 0b3a3034e..e555ac98c 100644 --- a/scripts/outland/shadowmoon_valley.cpp +++ b/scripts/outland/shadowmoon_valley.cpp @@ -361,7 +361,7 @@ bool GossipHello_npc_drake_dealer_hurlunk(Player* pPlayer, Creature* pCreature) if (pCreature->isVendor() && pPlayer->GetReputationRank(1015) == REP_EXALTED) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } @@ -385,7 +385,7 @@ bool GossipHello_npcs_flanis_swiftwing_and_kagrosh(Player* pPlayer, Creature* pC if (pPlayer->GetQuestStatus(10601) == QUEST_STATUS_INCOMPLETE && !pPlayer->HasItemCount(30659,1,true)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Take Kagrosh's Pack", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } @@ -534,7 +534,7 @@ bool GossipHello_npc_oronok_tornheart(Player* pPlayer, Creature* pCreature) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ORONOK1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); pPlayer->SEND_GOSSIP_MENU(10312, pCreature->GetGUID()); }else - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } diff --git a/scripts/outland/shattrath_city.cpp b/scripts/outland/shattrath_city.cpp index 3cbd809a2..78e3dacbb 100644 --- a/scripts/outland/shattrath_city.cpp +++ b/scripts/outland/shattrath_city.cpp @@ -225,7 +225,7 @@ bool GossipHello_npc_dirty_larry(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestStatus(QUEST_WHAT_BOOK) == QUEST_STATUS_INCOMPLETE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BOOK, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } @@ -261,7 +261,7 @@ bool GossipHello_npc_ishanah(Player* pPlayer, Creature* pCreature) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ISHANAH_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ISHANAH_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } @@ -764,7 +764,7 @@ bool GossipHello_npc_salsalabim(Player* pPlayer, Creature* pCreature) { if (pCreature->isQuestGiver()) pPlayer->PrepareQuestMenu(pCreature->GetGUID()); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); } return true; } @@ -830,7 +830,7 @@ bool GossipHello_npc_zephyr(Player* pPlayer, Creature* pCreature) if (pPlayer->GetReputationRank(989) >= REP_REVERED) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Take me to the Caverns of Time.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } diff --git a/scripts/outland/terokkar_forest.cpp b/scripts/outland/terokkar_forest.cpp index 962aad07e..ddb847b3c 100644 --- a/scripts/outland/terokkar_forest.cpp +++ b/scripts/outland/terokkar_forest.cpp @@ -459,7 +459,7 @@ bool GossipHello_npc_skyguard_handler_deesak(Player* pPlayer, Creature* pCreatur if (pPlayer->GetReputationRank(1031) >= REP_HONORED) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SKYGUARD, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } diff --git a/scripts/outland/zangarmarsh.cpp b/scripts/outland/zangarmarsh.cpp index 7bf66d073..262adbfdc 100644 --- a/scripts/outland/zangarmarsh.cpp +++ b/scripts/outland/zangarmarsh.cpp @@ -53,7 +53,7 @@ bool GossipHello_npcs_ashyen_and_keleth(Player* pPlayer, Creature* pCreature) if (pCreature->GetEntry() == 17901) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_BLESS_KEL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); } - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } @@ -314,7 +314,7 @@ bool GossipHello_npc_mortog_steamhead(Player* pPlayer, Creature* pCreature) if (pCreature->isVendor() && pPlayer->GetReputationRank(942) == REP_EXALTED) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } @@ -349,7 +349,7 @@ bool GossipHello_npc_timothy_daniels(Player* pPlayer, Creature* pCreature) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_POISONS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TIMOTHY_DANIELS_ITEM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } diff --git a/scripts/world/npc_professions.cpp b/scripts/world/npc_professions.cpp index daa32768a..640438af8 100644 --- a/scripts/world/npc_professions.cpp +++ b/scripts/world/npc_professions.cpp @@ -389,7 +389,7 @@ bool GossipHello_npc_prof_alchemy(Player* pPlayer, Creature* pCreature) } } - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } @@ -472,17 +472,17 @@ void SendConfirmLearn_npc_prof_alchemy(Player* pPlayer, Creature* pCreature, uin case 22427: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_TRANSMUTE, GOSSIP_SENDER_CHECK, uiAction); //unknown textID () - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); break; case 19052: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_ELIXIR, GOSSIP_SENDER_CHECK, uiAction); //unknown textID () - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); break; case 17909: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_POTION, GOSSIP_SENDER_CHECK, uiAction); //unknown textID () - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); break; } } @@ -498,17 +498,17 @@ void SendConfirmUnlearn_npc_prof_alchemy(Player* pPlayer, Creature* pCreature, u case 22427: //Zarevhi pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_TRANSMUTE, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_ALCHEMY_SPEC, DoHighUnlearnCost(pPlayer),false); //unknown textID () - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); break; case 19052: //Lorokeem pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_ELIXIR, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_ALCHEMY_SPEC, DoHighUnlearnCost(pPlayer),false); //unknown textID () - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); break; case 17909: //Lauranna Thar'well pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_POTION, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_ALCHEMY_SPEC, DoHighUnlearnCost(pPlayer),false); //unknown textID () - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); break; } } @@ -597,7 +597,7 @@ bool GossipHello_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature) } } - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } @@ -633,7 +633,7 @@ void SendActionMenu_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature, ui if (HasWeaponSub(pPlayer)) { //unknown textID (TALK_MUST_UNLEARN_WEAPON) - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); } else if (EquippedOk(pPlayer,S_UNLEARN_WEAPON)) { @@ -737,17 +737,17 @@ void SendConfirmLearn_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature, case 11191: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_HAMMER, GOSSIP_SENDER_CHECK, uiAction); //unknown textID (TALK_HAMMER_LEARN) - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); break; case 11192: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_AXE, GOSSIP_SENDER_CHECK, uiAction); //unknown textID (TALK_AXE_LEARN) - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); break; case 11193: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_SWORD, GOSSIP_SENDER_CHECK, uiAction); //unknown textID (TALK_SWORD_LEARN) - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); break; } } @@ -766,23 +766,23 @@ void SendConfirmUnlearn_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature case 11177: //Okothos Ironrager pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_SMITH_SPEC, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_ARMORORWEAPON, DoLowUnlearnCost(pPlayer),false); //unknown textID (TALK_UNLEARN_AXEORWEAPON) - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); break; case 11191: pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_HAMMER, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_WEAPON_SPEC, DoMedUnlearnCost(pPlayer),false); //unknown textID (TALK_HAMMER_UNLEARN) - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); break; case 11192: pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_AXE, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_WEAPON_SPEC, DoMedUnlearnCost(pPlayer),false); //unknown textID (TALK_AXE_UNLEARN) - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); break; case 11193: pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_SWORD, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_WEAPON_SPEC, DoMedUnlearnCost(pPlayer),false); //unknown textID (TALK_SWORD_UNLEARN) - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); break; } } @@ -912,7 +912,7 @@ bool GossipHello_npc_engineering_tele_trinket(Player* pPlayer, Creature* pCreatu pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, strGossipItem, pCreature->GetEntry(), GOSSIP_ACTION_INFO_DEF+1); } - pPlayer->SEND_GOSSIP_MENU(uiNpcTextId ? uiNpcTextId : pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(uiNpcTextId ? uiNpcTextId : pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } @@ -980,7 +980,7 @@ bool GossipHello_npc_prof_leather(Player* pPlayer, Creature* pCreature) } } - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } @@ -1051,19 +1051,19 @@ void SendConfirmUnlearn_npc_prof_leather(Player* pPlayer, Creature* pCreature, u case 7867: //Thorkaf Dragoneye pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_DRAGON, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_LEATHER_SPEC, DoMedUnlearnCost(pPlayer),false); //unknown textID () - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); break; case 7868: //Sarah Tanner case 7869: //Brumn Winterhoof pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_ELEMENTAL, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_LEATHER_SPEC, DoMedUnlearnCost(pPlayer),false); //unknown textID () - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); break; case 7870: //Caryssia Moonhunter case 7871: //Se'Jib pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_TRIBAL, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_LEATHER_SPEC, DoMedUnlearnCost(pPlayer),false); //unknown textID () - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); break; } } @@ -1130,7 +1130,7 @@ bool GossipHello_npc_prof_tailor(Player* pPlayer, Creature* pCreature) } } - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } @@ -1228,17 +1228,17 @@ void SendConfirmLearn_npc_prof_tailor(Player* pPlayer, Creature* pCreature, uint case 22213: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_SPELLFIRE, GOSSIP_SENDER_CHECK, uiAction); //unknown textID () - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); break; case 22208: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_MOONCLOTH, GOSSIP_SENDER_CHECK, uiAction); //unknown textID () - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); break; case 22212: pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LEARN_SHADOWEAVE, GOSSIP_SENDER_CHECK, uiAction); //unknown textID () - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); break; } } @@ -1254,17 +1254,17 @@ void SendConfirmUnlearn_npc_prof_tailor(Player* pPlayer, Creature* pCreature, ui case 22213: //Gidge Spellweaver pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_SPELLFIRE, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_TAILOR_SPEC, DoHighUnlearnCost(pPlayer),false); //unknown textID () - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); break; case 22208: //Nasmara Moonsong pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_MOONCLOTH, GOSSIP_SENDER_CHECK, uiAction, BOX_UNLEARN_TAILOR_SPEC, DoHighUnlearnCost(pPlayer),false); //unknown textID () - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); break; case 22212: //Andrion Darkspinner pPlayer->ADD_GOSSIP_ITEM_EXTENDED(0, GOSSIP_UNLEARN_SHADOWEAVE, GOSSIP_SENDER_CHECK, uiAction,BOX_UNLEARN_TAILOR_SPEC, DoHighUnlearnCost(pPlayer),false); //unknown textID () - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); break; } } diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index 2aacde821..6f3565c0d 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -1044,7 +1044,7 @@ enum bool GossipHello_npc_innkeeper(Player* pPlayer, Creature* pCreature) { - pCreature->prepareGossipMenu(pPlayer); + pPlayer->PrepareGossipMenu(pCreature); if (IsHolidayActive(HOLIDAY_HALLOWS_END) && !pPlayer->HasAura(SPELL_TRICK_OR_TREATED,0)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TRICK_OR_TREAT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); @@ -1057,7 +1057,7 @@ bool GossipHello_npc_innkeeper(Player* pPlayer, Creature* pCreature) } pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetGUID()); - pCreature->sendPreparedGossip(pPlayer); + pPlayer->SendPreparedGossip(pCreature); return true; } @@ -1139,7 +1139,7 @@ bool GossipHello_npc_kingdom_of_dalaran_quests(Player* pPlayer, Creature* pCreat !pPlayer->GetQuestRewardStatus(QUEST_MAGICAL_KINGDOM_H) || !pPlayer->GetQuestRewardStatus(QUEST_MAGICAL_KINGDOM_N))) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TELEPORT_TO, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } @@ -1309,7 +1309,7 @@ bool GossipHello_npc_mount_vendor(Player* pPlayer, Creature* pCreature) { if (pCreature->isVendor()) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); } return true; } @@ -1342,7 +1342,7 @@ bool GossipHello_npc_rogue_trainer(Player* pPlayer, Creature* pCreature) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); pPlayer->SEND_GOSSIP_MENU(5996, pCreature->GetGUID()); } else - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } @@ -1612,7 +1612,7 @@ bool GossipHello_npc_tabard_vendor(Player* pPlayer, Creature* pCreature) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_TABARD_OF_SUMMER_FLAMES, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+7); } - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); } else pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); @@ -1734,7 +1734,7 @@ bool GossipHello_npc_locksmith(Player* pPlayer, Creature* pCreature) if (pPlayer->GetQuestRewardStatus(QUEST_CONTAINMENT) && !pPlayer->HasItemCount(ITEM_VIOLET_HOLD_KEY, 1, true)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_VIOLET_HOLD_KEY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF +7); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } diff --git a/sql/Updates/Makefile.am b/sql/Updates/Makefile.am index 8752fe0e5..df4094764 100644 --- a/sql/Updates/Makefile.am +++ b/sql/Updates/Makefile.am @@ -51,4 +51,5 @@ pkgdata_DATA = \ r1503_scriptdev2.sql \ r1504_scriptdev2.sql \ r1506_scriptdev2.sql \ - r1508_mangos.sql + r1508_mangos.sql \ + r1513_scriptdev2.sql diff --git a/sql/Updates/r1513_scriptdev2.sql b/sql/Updates/r1513_scriptdev2.sql new file mode 100644 index 000000000..1082359b8 --- /dev/null +++ b/sql/Updates/r1513_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 8900+) '; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index fd68d0461..378b38b65 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3,7 +3,7 @@ -- DELETE FROM sd2_db_version; -INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for MaNGOS 8868+) '); +INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for MaNGOS 8900+) '); -- -- Below contains data for table `script_texts` mainly used in C++ parts. From c8d377c45d397058e6c315d2ddbe6c5686c9e3ab Mon Sep 17 00:00:00 2001 From: Insider Date: Wed, 2 Dec 2009 17:06:46 +0700 Subject: [PATCH 061/405] Fixed compilation error with [patch 8] --- scripts/world/npcs_special.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index 6f3565c0d..663aa8dfd 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -1174,7 +1174,7 @@ bool GossipHello_npc_experience_eliminator(Player* pPlayer, Creature* pCreature) false ); - pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } From e4e9be5a13fa55d6d380d129e7af88a049c7ca50 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Mon, 7 Dec 2009 18:42:24 +0300 Subject: [PATCH 062/405] Ulduar patches by rsa --- .../ulduar/halls_of_lightning/boss_ionar.cpp | 4 +- .../ulduar/halls_of_lightning/boss_loken.cpp | 4 +- .../ulduar/halls_of_stone/boss_sjonnir.cpp | 62 ++++++++++++++++++- 3 files changed, 65 insertions(+), 5 deletions(-) diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp index e82e4837e..32303c228 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp @@ -49,7 +49,7 @@ enum NPC_SPARK_OF_IONAR = 28926, - MAX_SPARKS = 5, + MAX_SPARKS = 6, POINT_CALLBACK = 0 }; @@ -237,7 +237,7 @@ struct MANGOS_DLL_DECL boss_ionarAI : public ScriptedAI m_bIsSplitPhase = false; } // Lightning effect and restore Ionar - else if (m_uiSparkAtHomeCount == MAX_SPARKS) + else { m_creature->SetVisibility(VISIBILITY_ON); m_creature->CastSpell(m_creature, SPELL_SPARK_DESPAWN, false); diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp index 6a36ba9d3..64c225f9b 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp @@ -125,7 +125,7 @@ struct MANGOS_DLL_DECL boss_lokenAI : public ScriptedAI if (m_bIsAura) { // workaround for PULSING_SHOCKWAVE - /*if (m_uiPulsingShockwave_Timer < uiDiff) + if (m_uiPulsingShockwave_Timer < uiDiff) { Map *map = m_creature->GetMap(); if (map->IsDungeon()) @@ -150,7 +150,7 @@ struct MANGOS_DLL_DECL boss_lokenAI : public ScriptedAI } } m_uiPulsingShockwave_Timer = 2000; - }else m_uiPulsingShockwave_Timer -= uiDiff;*/ + }else m_uiPulsingShockwave_Timer -= uiDiff; } else { diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp index 76dc06d08..ab97a6dac 100644 --- a/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp @@ -30,7 +30,20 @@ enum SAY_SLAY_2 = -1599002, SAY_SLAY_3 = -1599003, SAY_DEATH = -1599004, - EMOTE_GENERIC_FRENZY = -1000002 + EMOTE_GENERIC_FRENZY = -1000002, + + SPELL_BERSERK = 28747, + SPELL_RING_LIGHTNING_H = 59848, + SPELL_STATIC_OVERLOAD_H = 59846, + SPELL_CHAIN_LIGHTING_H = 59844, + + SPELL_RING_LIGHTNING_N = 50840, + SPELL_STATIC_OVERLOAD_N = 50834, + SPELL_CHAIN_LIGHTING_N = 50830, + + BERSERK_TIME_H = 180000, + BERSERK_TIME_N = 300000 + }; /*###### @@ -49,8 +62,17 @@ struct MANGOS_DLL_DECL boss_sjonnirAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsRegularMode; + uint32 m_uiStaticOverload_Timer; + uint32 m_uiRingLightning_Timer; + uint32 m_uiChainLightning_Timer; + uint32 m_uiBerserk_Timer; + void Reset() { + m_uiStaticOverload_Timer = urand(5000, 6000); + m_uiRingLightning_Timer = urand(10000, 11000); + m_uiChainLightning_Timer = urand(15000, 17000); + m_uiBerserk_Timer = m_bIsRegularMode ? BERSERK_TIME_N : BERSERK_TIME_H ; } void Aggro(Unit* pWho) @@ -77,7 +99,45 @@ struct MANGOS_DLL_DECL boss_sjonnirAI : public ScriptedAI { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; +////////// + if (m_uiStaticOverload_Timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, m_bIsRegularMode ? SPELL_STATIC_OVERLOAD_N : SPELL_STATIC_OVERLOAD_H ); + + m_uiStaticOverload_Timer = urand(50000, 75000); + } + else + m_uiStaticOverload_Timer -= uiDiff; + +if (m_uiRingLightning_Timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, m_bIsRegularMode ? SPELL_RING_LIGHTNING_N : SPELL_RING_LIGHTNING_H); + m_uiRingLightning_Timer = urand(30000, 45000); + } + else + m_uiRingLightning_Timer -= uiDiff; + +if (m_uiChainLightning_Timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, m_bIsRegularMode ? SPELL_CHAIN_LIGHTING_N :SPELL_CHAIN_LIGHTING_H); + + m_uiChainLightning_Timer = urand(11000, 15000); + } + else + m_uiChainLightning_Timer -= uiDiff; + +if (m_uiBerserk_Timer < uiDiff) + { + DoCast(m_creature, SPELL_BERSERK); + m_uiBerserk_Timer = m_bIsRegularMode ? BERSERK_TIME_N : BERSERK_TIME_H ; + } + else + m_uiBerserk_Timer -= uiDiff; +///////////////// DoMeleeAttackIfReady(); } }; From 7477380e6bc14b01a3f3a4f3c0b1b011b8a836b3 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Tue, 8 Dec 2009 19:12:58 +0300 Subject: [PATCH 063/405] Small change for ulduar bosses --- .../halls_of_stone/boss_maiden_of_grief.cpp | 77 ++++++++++++++++++- .../ulduar/halls_of_stone/boss_sjonnir.cpp | 16 ++-- 2 files changed, 84 insertions(+), 9 deletions(-) diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp index 679f3f120..2d38ca1b5 100644 --- a/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp @@ -31,7 +31,22 @@ enum SAY_SLAY_3 = -1599008, SAY_SLAY_4 = -1599009, SAY_STUN = -1599010, - SAY_DEATH = -1599011 + SAY_DEATH = -1599011, + + SPELL_BERSERK = 28747, + SPELL_SHOCK_N = 50760, // not worked + SPELL_STOLP_N = 50761, + SPELL_STORM_N = 50752, // not worked + SPELL_MANABURN_N = 59723, // not worked + + SPELL_SHOCK_H = 50726, // not worked +// SPELL_STOLP_H = 50727, // not worked + SPELL_STOLP_H = 50761, + SPELL_STORM_H = 50772, // not worked + SPELL_MANABURN_H = 59723, // not worked + + BERSERK_TIME_H = 180000, + BERSERK_TIME_N = 300000 }; /*###### @@ -49,9 +64,20 @@ struct MANGOS_DLL_DECL boss_maiden_of_griefAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsRegularMode; + uint32 m_uiStorm_Timer; + uint32 m_uiShock_Timer; + uint32 m_uiStolp_Timer; + uint32 m_uiManaburn_Timer; + uint32 m_uiBerserk_Timer; void Reset() { + m_uiStorm_Timer = urand(25000, 40000); + m_uiShock_Timer = urand(10000, 15000); + m_uiStolp_Timer = urand(15000, 25000); + m_uiManaburn_Timer = urand(30000, 60000); + m_uiBerserk_Timer = m_bIsRegularMode ? BERSERK_TIME_N : BERSERK_TIME_H ; + } void Aggro(Unit* pWho) @@ -79,6 +105,55 @@ struct MANGOS_DLL_DECL boss_maiden_of_griefAI : public ScriptedAI { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; +//// + if (m_uiStorm_Timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, m_bIsRegularMode ? SPELL_STORM_N : SPELL_STORM_H ); +// DoScriptText(SAY_SLAY_1, m_creature); + m_uiStorm_Timer = urand(25000, 40000); + } + else + m_uiStorm_Timer -= uiDiff; + + if (m_uiShock_Timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, m_bIsRegularMode ? SPELL_SHOCK_N : SPELL_SHOCK_H ); +// DoScriptText(SAY_SLAY_2, m_creature); + m_uiShock_Timer = urand(10000, 15000); + } + else + m_uiShock_Timer -= uiDiff; + + if (m_uiStolp_Timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, m_bIsRegularMode ? SPELL_STOLP_N : SPELL_STOLP_H ); + DoScriptText(SAY_SLAY_3, m_creature); + m_uiStolp_Timer = urand(15000, 25000); + } + else + m_uiStolp_Timer -= uiDiff; + + if (m_uiManaburn_Timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, m_bIsRegularMode ? SPELL_MANABURN_N : SPELL_MANABURN_H ); + DoScriptText(SAY_STUN, m_creature); + m_uiStorm_Timer = urand(30000, 60000); + } + else + m_uiStorm_Timer -= uiDiff; + +if (m_uiBerserk_Timer < uiDiff) + { + DoCast(m_creature, SPELL_BERSERK); + m_uiBerserk_Timer = m_bIsRegularMode ? BERSERK_TIME_N : BERSERK_TIME_H ; + DoScriptText(SAY_SLAY_4, m_creature); + } + else + m_uiBerserk_Timer -= uiDiff; DoMeleeAttackIfReady(); } diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp index ab97a6dac..19403bfe9 100644 --- a/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Sjonnir -SD%Complete: 20% -SDComment: +SD%Complete: 50% +SDComment: Need adding summons and correct casting time SDCategory: Halls of Stone EndScriptData */ @@ -70,7 +70,7 @@ struct MANGOS_DLL_DECL boss_sjonnirAI : public ScriptedAI void Reset() { m_uiStaticOverload_Timer = urand(5000, 6000); - m_uiRingLightning_Timer = urand(10000, 11000); + m_uiRingLightning_Timer = urand(30000, 45000); m_uiChainLightning_Timer = urand(15000, 17000); m_uiBerserk_Timer = m_bIsRegularMode ? BERSERK_TIME_N : BERSERK_TIME_H ; } @@ -104,8 +104,8 @@ struct MANGOS_DLL_DECL boss_sjonnirAI : public ScriptedAI { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) DoCast(pTarget, m_bIsRegularMode ? SPELL_STATIC_OVERLOAD_N : SPELL_STATIC_OVERLOAD_H ); - - m_uiStaticOverload_Timer = urand(50000, 75000); +// DoScriptText(SAY_SLAY_1, m_creature); + m_uiStaticOverload_Timer = urand(20000, 30000); } else m_uiStaticOverload_Timer -= uiDiff; @@ -114,8 +114,8 @@ if (m_uiRingLightning_Timer < uiDiff) { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) DoCast(pTarget, m_bIsRegularMode ? SPELL_RING_LIGHTNING_N : SPELL_RING_LIGHTNING_H); - - m_uiRingLightning_Timer = urand(30000, 45000); + DoScriptText(SAY_SLAY_2, m_creature); + m_uiRingLightning_Timer = urand(40000, 45000); } else m_uiRingLightning_Timer -= uiDiff; @@ -124,7 +124,7 @@ if (m_uiChainLightning_Timer < uiDiff) { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) DoCast(pTarget, m_bIsRegularMode ? SPELL_CHAIN_LIGHTING_N :SPELL_CHAIN_LIGHTING_H); - + DoScriptText(SAY_SLAY_3, m_creature); m_uiChainLightning_Timer = urand(11000, 15000); } else From 2bfd0d1981d02f53cd355a1312ad5039c411506f Mon Sep 17 00:00:00 2001 From: Insider Date: Thu, 10 Dec 2009 18:49:06 +0700 Subject: [PATCH 064/405] Reverted [patch 8] --- addition/8_mangos_exp_eliminator.sql | 1 - scripts/world/npcs_special.cpp | 53 ---------------------------- 2 files changed, 54 deletions(-) delete mode 100644 addition/8_mangos_exp_eliminator.sql diff --git a/addition/8_mangos_exp_eliminator.sql b/addition/8_mangos_exp_eliminator.sql deleted file mode 100644 index 3e2f44002..000000000 --- a/addition/8_mangos_exp_eliminator.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE `creature_template` SET `ScriptName`='npc_experience_eliminator' WHERE `entry` IN (35365,35364); diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index 663aa8dfd..92422371d 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -1153,53 +1153,6 @@ bool GossipSelect_npc_kingdom_of_dalaran_quests(Player* pPlayer, Creature* pCrea return true; } -/*###### -## npc_experience_eliminator -######*/ - -#define GOSSIP_ITEM_STOP_XP_GAIN "I don't want to gain experience anymore." -#define GOSSIP_CONFIRM_STOP_XP_GAIN "Are you sure you want to stop gaining experience?" -#define GOSSIP_ITEM_START_XP_GAIN "I want to be able to gain experience again." -#define GOSSIP_CONFIRM_START_XP_GAIN "Are you sure you want to be able to gain experience once again?" - -bool GossipHello_npc_experience_eliminator(Player* pPlayer, Creature* pCreature) -{ - pPlayer->ADD_GOSSIP_ITEM_EXTENDED( - GOSSIP_ICON_CHAT, - pPlayer->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_NO_XP_GAIN) ? GOSSIP_ITEM_START_XP_GAIN : GOSSIP_ITEM_STOP_XP_GAIN, - GOSSIP_SENDER_MAIN, - GOSSIP_ACTION_INFO_DEF+1, - pPlayer->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_NO_XP_GAIN) ? GOSSIP_CONFIRM_START_XP_GAIN : GOSSIP_CONFIRM_STOP_XP_GAIN, - 100000, - false - ); - - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); - return true; -} - -bool GossipSelect_npc_experience_eliminator(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if(uiAction == GOSSIP_ACTION_INFO_DEF+1) - { - // cheater(?) passed through client limitations - if(pPlayer->GetMoney() < 100000) - return true; - - pPlayer->ModifyMoney(-100000); - - if(pPlayer->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_NO_XP_GAIN)) - pPlayer->RemoveFlag(PLAYER_FLAGS, PLAYER_FLAGS_NO_XP_GAIN); - else - pPlayer->SetFlag(PLAYER_FLAGS, PLAYER_FLAGS_NO_XP_GAIN); - - pPlayer->CLOSE_GOSSIP_MENU(); - return true; - } - pPlayer->CLOSE_GOSSIP_MENU(); - return true; -} - /*###### ## npc_lunaclaw_spirit ######*/ @@ -1859,12 +1812,6 @@ void AddSC_npcs_special() newscript->pGossipSelect = &GossipSelect_npc_tabard_vendor; newscript->RegisterSelf(); - newscript = new Script; - newscript->Name = "npc_experience_eliminator"; - newscript->pGossipHello = &GossipHello_npc_experience_eliminator; - newscript->pGossipSelect = &GossipSelect_npc_experience_eliminator; - newscript->RegisterSelf(); - newscript = new Script; newscript->Name = "npc_locksmith"; newscript->pGossipHello = &GossipHello_npc_locksmith; From c9dbde04ffe23ba790ad6161cecff56a19fd2d40 Mon Sep 17 00:00:00 2001 From: Insider Date: Fri, 11 Dec 2009 14:14:00 +0700 Subject: [PATCH 065/405] SD2 updated to 1514 --- .../sethekk_halls/boss_darkweaver_syth.cpp | 69 +++++++++++++------ .../boss_morogrim_tidewalker.cpp | 8 +-- .../blood_furnace/boss_broggok.cpp | 8 ++- .../blood_furnace/boss_the_maker.cpp | 21 +++--- 4 files changed, 69 insertions(+), 37 deletions(-) diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp index 1f5a41d6c..a764c252a 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Boss_Darkweaver_Syth SD%Complete: 85 -SDComment: Shock spells/times need more work. Heroic not implemented. +SDComment: Shock spells/times need more work. SDCategory: Auchindoun, Sethekk Halls EndScriptData */ @@ -57,8 +57,13 @@ EndScriptData */ struct MANGOS_DLL_DECL boss_darkweaver_sythAI : public ScriptedAI { - boss_darkweaver_sythAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + boss_darkweaver_sythAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + bool m_bIsRegularMode; uint32 flameshock_timer; uint32 arcaneshock_timer; uint32 frostshock_timer; @@ -150,7 +155,7 @@ struct MANGOS_DLL_DECL boss_darkweaver_sythAI : public ScriptedAI if (flameshock_timer < diff) { if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(target,SPELL_FLAME_SHOCK); + DoCast(target, SPELL_FLAME_SHOCK); flameshock_timer = urand(10000, 15000); } else flameshock_timer -= diff; @@ -200,11 +205,17 @@ CreatureAI* GetAI_boss_darkweaver_syth(Creature* pCreature) struct MANGOS_DLL_DECL mob_syth_fireAI : public ScriptedAI { - mob_syth_fireAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - + mob_syth_fireAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + bool m_bIsRegularMode; uint32 flameshock_timer; uint32 flamebuffet_timer; + void Reset() { m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, true); @@ -220,7 +231,7 @@ struct MANGOS_DLL_DECL mob_syth_fireAI : public ScriptedAI if (flameshock_timer < diff) { if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(target,SPELL_FLAME_SHOCK); + DoCast(target, SPELL_FLAME_SHOCK); flameshock_timer = 5000; }else flameshock_timer -= diff; @@ -228,9 +239,10 @@ struct MANGOS_DLL_DECL mob_syth_fireAI : public ScriptedAI if (flamebuffet_timer < diff) { if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(target,SPELL_FLAME_BUFFET); + DoCast(target, m_bIsRegularMode ? H_SPELL_FLAME_BUFFET : SPELL_FLAME_BUFFET); flamebuffet_timer = 5000; + }else flamebuffet_timer -= diff; DoMeleeAttackIfReady(); @@ -244,8 +256,13 @@ CreatureAI* GetAI_mob_syth_fire(Creature* pCreature) struct MANGOS_DLL_DECL mob_syth_arcaneAI : public ScriptedAI { - mob_syth_arcaneAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - + mob_syth_arcaneAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + bool m_bIsRegularMode; uint32 arcaneshock_timer; uint32 arcanebuffet_timer; @@ -264,7 +281,7 @@ struct MANGOS_DLL_DECL mob_syth_arcaneAI : public ScriptedAI if (arcaneshock_timer < diff) { if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(target,SPELL_ARCANE_SHOCK); + DoCast(target, SPELL_ARCANE_SHOCK); arcaneshock_timer = 5000; }else arcaneshock_timer -= diff; @@ -272,7 +289,7 @@ struct MANGOS_DLL_DECL mob_syth_arcaneAI : public ScriptedAI if (arcanebuffet_timer < diff) { if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(target,SPELL_ARCANE_BUFFET); + DoCast(target, m_bIsRegularMode ? H_SPELL_ARCANE_BUFFET : SPELL_ARCANE_BUFFET); arcanebuffet_timer = 5000; }else arcanebuffet_timer -= diff; @@ -288,8 +305,13 @@ CreatureAI* GetAI_mob_syth_arcane(Creature* pCreature) struct MANGOS_DLL_DECL mob_syth_frostAI : public ScriptedAI { - mob_syth_frostAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - + mob_syth_frostAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + bool m_bIsRegularMode; uint32 frostshock_timer; uint32 frostbuffet_timer; @@ -308,7 +330,7 @@ struct MANGOS_DLL_DECL mob_syth_frostAI : public ScriptedAI if (frostshock_timer < diff) { if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(target,SPELL_FROST_SHOCK); + DoCast(target, SPELL_FROST_SHOCK); frostshock_timer = 5000; }else frostshock_timer -= diff; @@ -316,7 +338,7 @@ struct MANGOS_DLL_DECL mob_syth_frostAI : public ScriptedAI if (frostbuffet_timer < diff) { if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(target,SPELL_FROST_BUFFET); + DoCast(target, m_bIsRegularMode ? H_SPELL_FROST_BUFFET : SPELL_FROST_BUFFET); frostbuffet_timer = 5000; }else frostbuffet_timer -= diff; @@ -332,8 +354,13 @@ CreatureAI* GetAI_mob_syth_frost(Creature* pCreature) struct MANGOS_DLL_DECL mob_syth_shadowAI : public ScriptedAI { - mob_syth_shadowAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - + mob_syth_shadowAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + bool m_bIsRegularMode; uint32 shadowshock_timer; uint32 shadowbuffet_timer; @@ -352,7 +379,7 @@ struct MANGOS_DLL_DECL mob_syth_shadowAI : public ScriptedAI if (shadowshock_timer < diff) { if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(target,SPELL_SHADOW_SHOCK); + DoCast(target, SPELL_SHADOW_SHOCK); shadowshock_timer = 5000; }else shadowshock_timer -= diff; @@ -360,7 +387,7 @@ struct MANGOS_DLL_DECL mob_syth_shadowAI : public ScriptedAI if (shadowbuffet_timer < diff) { if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(target,SPELL_SHADOW_BUFFET); + DoCast(target, m_bIsRegularMode ? H_SPELL_SHADOW_BUFFET : SPELL_SHADOW_BUFFET); shadowbuffet_timer = 5000; }else shadowbuffet_timer -= diff; @@ -384,7 +411,7 @@ void AddSC_boss_darkweaver_syth() newscript = new Script; newscript->Name = "mob_syth_fire"; - newscript->GetAI = &GetAI_mob_syth_arcane; + newscript->GetAI = &GetAI_mob_syth_fire; newscript->RegisterSelf(); newscript = new Script; @@ -401,4 +428,4 @@ void AddSC_boss_darkweaver_syth() newscript->Name = "mob_syth_shadow"; newscript->GetAI = &GetAI_mob_syth_shadow; newscript->RegisterSelf(); -} +} \ No newline at end of file diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp index 9517930d2..ead685df9 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp @@ -204,10 +204,10 @@ struct MANGOS_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI { switch(i) { - case 0: m_creature->CastSpell(pTarget,SPELL_WATERY_GRAVE_1,false); break; - case 1: m_creature->CastSpell(pTarget,SPELL_WATERY_GRAVE_2,false); break; - case 2: m_creature->CastSpell(pTarget,SPELL_WATERY_GRAVE_3,false); break; - case 3: m_creature->CastSpell(pTarget,SPELL_WATERY_GRAVE_4,false); break; + case 0: pTarget->CastSpell(pTarget,SPELL_WATERY_GRAVE_1,false); break; + case 1: pTarget->CastSpell(pTarget,SPELL_WATERY_GRAVE_2,false); break; + case 2: pTarget->CastSpell(pTarget,SPELL_WATERY_GRAVE_3,false); break; + case 3: pTarget->CastSpell(pTarget,SPELL_WATERY_GRAVE_4,false); break; } } } diff --git a/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp b/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp index 011687d86..9a0a31276 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp @@ -29,8 +29,10 @@ enum SAY_AGGRO = -1542008, SPELL_SLIME_SPRAY = 30913, + H_SPELL_SLIME_SPRAY = 38458, SPELL_POISON_CLOUD = 30916, SPELL_POISON_BOLT = 30917, + H_SPELL_POISON_BOLT = 38459, SPELL_POISON = 30914 }; @@ -40,10 +42,12 @@ struct MANGOS_DLL_DECL boss_broggokAI : public ScriptedAI boss_broggokAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; uint32 AcidSpray_Timer; uint32 PoisonSpawn_Timer; @@ -91,13 +95,13 @@ struct MANGOS_DLL_DECL boss_broggokAI : public ScriptedAI if (AcidSpray_Timer < diff) { - DoCast(m_creature->getVictim(),SPELL_SLIME_SPRAY); + DoCast(m_creature->getVictim(), m_bIsRegularMode ? H_SPELL_SLIME_SPRAY : SPELL_SLIME_SPRAY); AcidSpray_Timer = urand(4000, 12000); }else AcidSpray_Timer -=diff; if (PoisonBolt_Timer < diff) { - DoCast(m_creature->getVictim(),SPELL_POISON_BOLT); + DoCast(m_creature->getVictim(), m_bIsRegularMode ? H_SPELL_POISON_BOLT : SPELL_POISON_BOLT); PoisonBolt_Timer = urand(4000, 12000); }else PoisonBolt_Timer -=diff; diff --git a/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp b/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp index e022f82b9..5184e27f0 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp @@ -35,6 +35,7 @@ enum SPELL_ACID_SPRAY = 38153, // heroic 38973 ??? 38153 SPELL_EXPLODING_BREAKER = 30925, + H_SPELL_EXPLODING_BREAKER = 40059, SPELL_KNOCKDOWN = 20276, SPELL_DOMINATION = 25772 // ??? }; @@ -44,10 +45,12 @@ struct MANGOS_DLL_DECL boss_the_makerAI : public ScriptedAI boss_the_makerAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; uint32 AcidSpray_Timer; uint32 ExplodingBreaker_Timer; @@ -58,7 +61,7 @@ struct MANGOS_DLL_DECL boss_the_makerAI : public ScriptedAI { AcidSpray_Timer = 15000; ExplodingBreaker_Timer = 6000; - Domination_Timer = 120000; + Domination_Timer = 20000; Knockdown_Timer = 10000; } @@ -108,21 +111,19 @@ struct MANGOS_DLL_DECL boss_the_makerAI : public ScriptedAI if (ExplodingBreaker_Timer < diff) { if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(target,SPELL_EXPLODING_BREAKER); + DoCast(target, m_bIsRegularMode ? H_SPELL_EXPLODING_BREAKER : SPELL_EXPLODING_BREAKER); ExplodingBreaker_Timer = urand(4000, 12000); }else ExplodingBreaker_Timer -=diff; - /* // Disabled until Core Support for mind control - if (domination_timer_timer < diff) + if (Domination_Timer < diff) { - Unit* target; - target = SelectUnit(SELECT_TARGET_RANDOM,0); + Unit* target; + target = SelectUnit(SELECT_TARGET_RANDOM,0); - DoCast(target,SPELL_DOMINATION); + DoCast(target,SPELL_DOMINATION); - domination_timer = 120000; - }else domination_timer -=diff; - */ + Domination_Timer = 15000+rand()%10000; + }else Domination_Timer -=diff; if (Knockdown_Timer < diff) { From 7c74602e07c5c27b051a205503564dfd932d5951 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Fri, 11 Dec 2009 17:25:16 +0300 Subject: [PATCH 066/405] Ahn-quirai 2 bosses patch --- scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp index 26cbf261d..eee36cf3c 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp @@ -50,6 +50,7 @@ struct MANGOS_DLL_DECL boss_moamAI : public ScriptedAI pTarget = NULL; TRAMPLE_Timer = 30000; DRAINMANA_Timer = 30000; + SUMMONMANA_Timer = 10000; } void Aggro(Unit *who) @@ -64,14 +65,14 @@ struct MANGOS_DLL_DECL boss_moamAI : public ScriptedAI return; //If we are 100%MANA cast Arcane Erruption - //if (j==1 && m_creature->GetMana()*100 / m_creature->GetMaxMana() == 100 && !m_creature->IsNonMeleeSpellCasted(false)) + if (j==1 && m_creature->GetPower(m_creature->getPowerType())*100 / m_creature->GetMaxPower(m_creature->getPowerType()) >= 75 && !m_creature->IsNonMeleeSpellCasted(false)) { DoCast(m_creature->getVictim(),SPELL_ARCANEERUPTION); DoScriptText(EMOTE_MANA_FULL, m_creature); } //If we are <50%HP cast MANA FIEND (Summon Mana) and Sleep - //if (i==0 && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 50 && !m_creature->IsNonMeleeSpellCasted(false)) + if (i==0 && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 50 && !m_creature->IsNonMeleeSpellCasted(false)) { i=1; DoCast(m_creature->getVictim(),SPELL_SUMMONMANA); From 2eaa017da210dbfe3a09d7790c8d4ff4d670a77e Mon Sep 17 00:00:00 2001 From: Insider Date: Mon, 14 Dec 2009 16:37:29 +0700 Subject: [PATCH 067/405] SD2 updated to 1515 --- .../zulgurub/instance_zulgurub.cpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp b/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp index 296e9a583..e493dbc67 100644 --- a/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp +++ b/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp @@ -87,16 +87,11 @@ struct MANGOS_DLL_DECL instance_zulgurub : public ScriptedInstance break; case NPC_HAKKAR: m_uiHakkarGUID = pCreature->GetGUID(); - if (m_auiEncounter[0] == DONE) - LowerHakkarHitPoints(); - if (m_auiEncounter[1] == DONE) - LowerHakkarHitPoints(); - if (m_auiEncounter[2] == DONE) - LowerHakkarHitPoints(); - if (m_auiEncounter[3] == DONE) - LowerHakkarHitPoints(); - if (m_auiEncounter[4] == DONE) - LowerHakkarHitPoints(); + for(uint8 i = 0; i < 5; ++i) + { + if (m_auiEncounter[i] == DONE) + LowerHakkarHitPoints(); + } break; } } From ba41f15f385f4a073c5873608280e82aa99ea590 Mon Sep 17 00:00:00 2001 From: Insider Date: Wed, 16 Dec 2009 12:05:20 +0700 Subject: [PATCH 068/405] SD2 updated to 1516 --- scripts/northrend/gundrak/boss_sladran.cpp | 168 ++++++++++++++++-- .../northrend/gundrak/instance_gundrak.cpp | 26 +-- sql/Updates/Makefile.am | 4 +- sql/Updates/r1516_mangos.sql | 1 + sql/Updates/r1516_scriptdev2.sql | 2 + sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 2 +- 7 files changed, 178 insertions(+), 26 deletions(-) create mode 100644 sql/Updates/r1516_mangos.sql create mode 100644 sql/Updates/r1516_scriptdev2.sql diff --git a/scripts/northrend/gundrak/boss_sladran.cpp b/scripts/northrend/gundrak/boss_sladran.cpp index 521ef1908..997746dd3 100644 --- a/scripts/northrend/gundrak/boss_sladran.cpp +++ b/scripts/northrend/gundrak/boss_sladran.cpp @@ -16,29 +16,87 @@ /* ScriptData SDName: Boss_Sladran -SD%Complete: 20% +SD%Complete: 75% SDComment: SDCategory: Gundrak EndScriptData */ #include "precompiled.h" +#include "gundrak.h" enum { - SAY_AGGRO = -1604000, - SAY_SUMMON_SNAKE = -1604001, - SAY_SUMMON_CONSTRICT = -1604002, - SAY_SLAY_1 = -1604003, - SAY_SLAY_2 = -1604004, - SAY_SLAY_3 = -1604005, - SAY_DEATH = -1604006, - EMOTE_NOVA = -1604007 + SAY_AGGRO = -1604000, + SAY_SUMMON_SNAKE = -1604001, + SAY_SUMMON_CONSTRICTOR = -1604002, + SAY_SLAY_1 = -1604003, + SAY_SLAY_2 = -1604004, + SAY_SLAY_3 = -1604005, + SAY_DEATH = -1604006, + EMOTE_NOVA = -1604007, + + // Slad'Ran spells + SPELL_POISON_NOVA = 55081, + SPELL_POISON_NOVA_H = 59842, + SPELL_POWERFUL_BITE = 48287, + SPELL_POWERFUL_BITE_H = 59840, + SPELL_VENOM_BOLT = 54970, + SPELL_VENOM_BOLT_H = 59839, + + // Summon spells + SPELL_SUMMON_VIPER = 55060, + SPELL_SUMMON_CONSTRICTOR = 54969, + + SPELL_GRIP_OF_SLADRAN = 55093, + SPELL_GRIP_OF_SLADRAN_H = 61474, + + NPC_SLADRAN_CONSTRICTOR = 29713, + NPC_SLADRAN_VIPER = 29680, + NPC_SNAKE_WRAP = 29742, + NPC_SLADRAN_SUMMON_TARGET = 29682 }; /*###### -## boss_sladran +## mob_sladran_summon_target ######*/ +struct MANGOS_DLL_DECL mob_sladran_summon_targetAI : public ScriptedAI +{ + mob_sladran_summon_targetAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + void Reset() {} + void MoveInLineOfSight(Unit* pWho) {} + void AttackStart(Unit* pWho) {} + + void JustSummoned(Creature* pSummoned) + { + if (!m_pInstance) + return; + + if (Creature* pSladran = ((Creature*)Unit::GetUnit(*m_creature, m_pInstance->GetData64(NPC_SLADRAN)))) + { + float fPosX, fPosY, fPosZ; + pSladran->GetPosition(fPosX, fPosY, fPosZ); + pSummoned->GetMotionMaster()->MovePoint(0, fPosX, fPosY, fPosZ); + } + } + + void UpdateAI(const uint32 diff) {} +}; + +CreatureAI* GetAI_mob_sladran_summon_target(Creature* pCreature) +{ + return new mob_sladran_summon_targetAI(pCreature); +} +/*###### +## boss_sladran +######*/ struct MANGOS_DLL_DECL boss_sladranAI : public ScriptedAI { boss_sladranAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -51,13 +109,25 @@ struct MANGOS_DLL_DECL boss_sladranAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsRegularMode; + uint32 m_uiSummonTimer; + uint32 m_uiPoisonNovaTimer; + uint32 m_uiPowerfulBiteTimer; + uint32 m_uiVenomBoltTimer; + void Reset() { + m_uiSummonTimer = m_bIsRegularMode ? 5000 : 3000; + m_uiPoisonNovaTimer = 22000; + m_uiPowerfulBiteTimer = 10000; + m_uiVenomBoltTimer = 15000; } void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_SLADRAN, IN_PROGRESS); } void KilledUnit(Unit* pVictim) @@ -73,6 +143,23 @@ struct MANGOS_DLL_DECL boss_sladranAI : public ScriptedAI void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_SLADRAN, DONE); + } + + Creature* SelectRandomCreatureOfEntryInRange(uint32 uiEntry, float fRange) + { + std::list lCreatureList; + GetCreatureListWithEntryInGrid(lCreatureList, m_creature, uiEntry, fRange); + + if (lCreatureList.empty()) + return NULL; + + std::list::iterator iter = lCreatureList.begin(); + advance(iter, urand(0, lCreatureList.size()-1)); + + return *iter; } void UpdateAI(const uint32 uiDiff) @@ -80,6 +167,60 @@ struct MANGOS_DLL_DECL boss_sladranAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (m_uiPoisonNovaTimer < uiDiff) + { + DoScriptText(EMOTE_NOVA, m_creature); + DoCast(m_creature->getVictim(),m_bIsRegularMode ? SPELL_POISON_NOVA : SPELL_POISON_NOVA_H); + m_uiPoisonNovaTimer = 22000; + } + else + m_uiPoisonNovaTimer -= uiDiff; + + if (m_uiSummonTimer < uiDiff) + { + if (Creature* pSummonTarget = SelectRandomCreatureOfEntryInRange(NPC_SLADRAN_SUMMON_TARGET, 75.0f)) + { + if (urand(0, 3)) + { + // we don't want to get spammed + if(!urand(0, 4)) + DoScriptText(SAY_SUMMON_CONSTRICTOR, m_creature); + + pSummonTarget->CastSpell(pSummonTarget, SPELL_SUMMON_CONSTRICTOR, false); + } + else + { + // we don't want to get spammed + if(!urand(0, 4)) + DoScriptText(SAY_SUMMON_SNAKE, m_creature); + + pSummonTarget->CastSpell(pSummonTarget, SPELL_SUMMON_VIPER, false); + } + } + + m_uiSummonTimer = m_bIsRegularMode ? 5000 : 3000; + } + else + m_uiSummonTimer -= uiDiff; + + if (m_uiPowerfulBiteTimer < uiDiff) + { + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_POWERFUL_BITE : SPELL_POWERFUL_BITE_H); + m_uiPowerfulBiteTimer = 10000; + } + else + m_uiPowerfulBiteTimer -= uiDiff; + + if (m_uiVenomBoltTimer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, m_bIsRegularMode ? SPELL_VENOM_BOLT : SPELL_VENOM_BOLT_H); + + m_uiVenomBoltTimer = 15000; + } + else + m_uiVenomBoltTimer -= uiDiff; + DoMeleeAttackIfReady(); } }; @@ -91,10 +232,15 @@ CreatureAI* GetAI_boss_sladran(Creature* pCreature) void AddSC_boss_sladran() { - Script *newscript; + Script* newscript; newscript = new Script; newscript->Name = "boss_sladran"; newscript->GetAI = &GetAI_boss_sladran; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_sladran_summon_target"; + newscript->GetAI = &GetAI_mob_sladran_summon_target; + newscript->RegisterSelf(); } diff --git a/scripts/northrend/gundrak/instance_gundrak.cpp b/scripts/northrend/gundrak/instance_gundrak.cpp index bb5f0e22d..968918b16 100644 --- a/scripts/northrend/gundrak/instance_gundrak.cpp +++ b/scripts/northrend/gundrak/instance_gundrak.cpp @@ -68,20 +68,20 @@ struct MANGOS_DLL_DECL instance_gundrak : public ScriptedInstance { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - m_uiEckDoorGUID = 0; + m_uiEckDoorGUID = 0; m_uiEckUnderwaterDoorGUID = 0; - m_uiGaldarahDoorGUID = 0; - m_uiExitDoorLeftGUID = 0; - m_uiExitDoorRightGUID = 0; - m_uiAltarOfSladranGUID = 0; - m_uiAltarOfMoorabiGUID = 0; - m_uiAltarOfColossusGUID = 0; - m_uiSnakeKeyGUID = 0; - m_uiTrollKeyGUID = 0; - m_uiMammothKeyGUID = 0; - m_uiBridgeGUID = 0; - - m_uiSladranGUID = 0; + m_uiGaldarahDoorGUID = 0; + m_uiExitDoorLeftGUID = 0; + m_uiExitDoorRightGUID = 0; + m_uiAltarOfSladranGUID = 0; + m_uiAltarOfMoorabiGUID = 0; + m_uiAltarOfColossusGUID = 0; + m_uiSnakeKeyGUID = 0; + m_uiTrollKeyGUID = 0; + m_uiMammothKeyGUID = 0; + m_uiBridgeGUID = 0; + + m_uiSladranGUID = 0; } void OnCreatureCreate(Creature* pCreature) diff --git a/sql/Updates/Makefile.am b/sql/Updates/Makefile.am index df4094764..51984cbe8 100644 --- a/sql/Updates/Makefile.am +++ b/sql/Updates/Makefile.am @@ -52,4 +52,6 @@ pkgdata_DATA = \ r1504_scriptdev2.sql \ r1506_scriptdev2.sql \ r1508_mangos.sql \ - r1513_scriptdev2.sql + r1513_scriptdev2.sql \ + r1516_mangos.sql \ + r1516_scriptdev2.sql diff --git a/sql/Updates/r1516_mangos.sql b/sql/Updates/r1516_mangos.sql new file mode 100644 index 000000000..bd442c455 --- /dev/null +++ b/sql/Updates/r1516_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='mob_sladran_summon_target' WHERE entry=29682; diff --git a/sql/Updates/r1516_scriptdev2.sql b/sql/Updates/r1516_scriptdev2.sql new file mode 100644 index 000000000..9ec1cf2ab --- /dev/null +++ b/sql/Updates/r1516_scriptdev2.sql @@ -0,0 +1,2 @@ +UPDATE script_texts SET comment='sladran SAY_SUMMON_CONSTRICTOR' WHERE entry=-1604002; + \ No newline at end of file diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 184f2249e..e738202a5 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -514,6 +514,7 @@ UPDATE creature_template SET ScriptName='boss_colossus' WHERE entry=29307; UPDATE creature_template SET ScriptName='boss_galdarah' WHERE entry=29306; UPDATE creature_template SET ScriptName='boss_moorabi' WHERE entry=29305; UPDATE creature_template SET ScriptName='boss_sladran' WHERE entry=29304; +UPDATE creature_template SET ScriptName='mob_sladran_summon_target' WHERE entry=29682; UPDATE gameobject_template SET ScriptName='go_gundrak_altar' WHERE entry IN (192518, 192519, 192520); UPDATE instance_template SET script='instance_gundrak' WHERE map=604; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 378b38b65..9b476c5ed 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -2354,7 +2354,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES (-1604000,'Drakkari gonna kill anybody who trespass on these lands!',14443,1,0,0,'sladran SAY_AGGRO'), (-1604001,'Minions of the scale, heed my call!',14444,1,0,0,'sladran SAY_SUMMON_SNAKE'), -(-1604002,'Our thousand fangs gonna rend your flesh! ',14445,1,0,0,'sladran SAY_SUMMON_CONSTRICT'), +(-1604002,'Our thousand fangs gonna rend your flesh! ',14445,1,0,0,'sladran SAY_SUMMON_CONSTRICTOR'), (-1604003,'Ye not breathin\'! Good.',14446,1,0,0,'sladran SAY_SLAY_1'), (-1604004,'You scared now?',14447,1,0,0,'sladran SAY_SLAY_2'), (-1604005,'I\'ll eat you next, mon!',14448,1,0,0,'sladran SAY_SLAY_3'), From f08400c9727592a413edeedfad8ec9fad24c2ed8 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 17 Dec 2009 13:03:45 +0300 Subject: [PATCH 069/405] Grobullus & Krystallus added --- Makefile.am | 1 + VC80/80ScriptDev2.vcproj | 4 ++ VC90/90ScriptDev2.vcproj | 4 ++ .../northrend/naxxramas/boss_grobbulus.cpp | 39 +++++++++++++++---- system/ScriptLoader.cpp | 5 +++ 5 files changed, 46 insertions(+), 7 deletions(-) diff --git a/Makefile.am b/Makefile.am index 3c0c44730..d782ede1d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -356,6 +356,7 @@ scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h \ scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp \ scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp \ scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp \ +scripts/northrend/ulduar/halls_of_stone/boss_krystallus.cpp \ scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp \ scripts/northrend/ulduar/ulduar/boss_algalon.cpp \ scripts/northrend/ulduar/ulduar/boss_auriaya.cpp \ diff --git a/VC80/80ScriptDev2.vcproj b/VC80/80ScriptDev2.vcproj index 4fbab4c4b..8703037df 100644 --- a/VC80/80ScriptDev2.vcproj +++ b/VC80/80ScriptDev2.vcproj @@ -1854,6 +1854,10 @@ RelativePath="..\scripts\northrend\ulduar\halls_of_stone\boss_maiden_of_grief.cpp" > + + diff --git a/VC90/90ScriptDev2.vcproj b/VC90/90ScriptDev2.vcproj index b3dab93cf..f5ae4fd8a 100644 --- a/VC90/90ScriptDev2.vcproj +++ b/VC90/90ScriptDev2.vcproj @@ -1853,6 +1853,10 @@ RelativePath="..\scripts\northrend\ulduar\halls_of_stone\boss_maiden_of_grief.cpp" > + + diff --git a/scripts/northrend/naxxramas/boss_grobbulus.cpp b/scripts/northrend/naxxramas/boss_grobbulus.cpp index 7b8416745..092101f5b 100644 --- a/scripts/northrend/naxxramas/boss_grobbulus.cpp +++ b/scripts/northrend/naxxramas/boss_grobbulus.cpp @@ -22,29 +22,38 @@ Mutating Injection 28169 Enrages 26527*/ #include "precompiled.h" +#include "naxxramas.h" #define SP_ENRAGE 26662 #define SP_SLIME_SPRAY 28157 #define SP_INJECTION 28169 +#define SP_FSPLIME 28218 +#define SP_PCLOUD 26590 struct MANGOS_DLL_DECL boss_grobbulusAI : public ScriptedAI { - boss_grobbulusAI(Creature *pCreature) : ScriptedAI(pCreature) + boss_grobbulusAI(Creature* pCreature) : ScriptedAI(pCreature) { + Regular = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } + bool Regular; + uint32 EnrageTimer; uint32 MutatingInjectionTimer; - uint32 PoisonCloudTimer; +// uint32 PoisonCloudTimer; - not worked uint32 SlimeSprayTimer; + uint32 FalloutSplimeTimer; void Reset() { EnrageTimer = 720000; SlimeSprayTimer = 15000 + rand()%10000; - MutatingInjectionTimer = 10000; - }; + MutatingInjectionTimer = 10000 + rand()%10000; +// PoisonCloudTimer = 60000; + FalloutSplimeTimer = 45000 + rand()%5000; + } void Aggro(Unit *who) {} @@ -64,10 +73,26 @@ struct MANGOS_DLL_DECL boss_grobbulusAI : public ScriptedAI { Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); if(target) DoCast(target, SP_INJECTION); - MutatingInjectionTimer = 10000; + MutatingInjectionTimer = 10000 + rand()%10000; } else MutatingInjectionTimer -= diff; +// if(PoisonCloudTimer < diff) +// { +// Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); +// if(target) DoCast(target, SP_PCLOUD); +// PoisonCloudTimer = 60000; +// } +// else PoisonCloudTimer -= diff; + + if(FalloutSplimeTimer < diff) + { + Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + if(target) DoCast(target, SP_FSPLIME); + FalloutSplimeTimer = 45000 + rand()%5000; + } + else FalloutSplimeTimer -= diff; + if(EnrageTimer < diff) { DoCast(m_creature, SP_ENRAGE); @@ -79,7 +104,7 @@ struct MANGOS_DLL_DECL boss_grobbulusAI : public ScriptedAI } }; -CreatureAI* GetAI_boss_grobbulus(Creature* pCreature) +CreatureAI* GetAI_boss_grobbulus(Creature *pCreature) { return new boss_grobbulusAI(pCreature); } @@ -91,4 +116,4 @@ void AddSC_boss_grobbulus() newscript->Name = "boss_grobbulus"; newscript->GetAI = &GetAI_boss_grobbulus; newscript->RegisterSelf(); -}; +} diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index 4252fe56e..f32212bcf 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -267,6 +267,7 @@ extern void AddSC_instance_gundrak(); extern void AddSC_boss_anubrekhan(); //naxxramas extern void AddSC_boss_four_horsemen(); extern void AddSC_boss_faerlina(); +extern void AddSC_boss_grobbulus(); extern void AddSC_boss_gluth(); extern void AddSC_boss_gothik(); extern void AddSC_boss_kelthuzad(); @@ -295,6 +296,7 @@ extern void AddSC_boss_volkhan(); extern void AddSC_instance_halls_of_lightning(); extern void AddSC_boss_maiden_of_grief(); //Ulduar, halls_of_stone extern void AddSC_boss_sjonnir(); +extern void AddSC_boss_krystallus(); extern void AddSC_halls_of_stone(); extern void AddSC_boss_leviathan(); //ulduar extern void AddSC_boss_ignis(); @@ -400,6 +402,7 @@ extern void AddSC_boss_nethermancer_sepethrea(); extern void AddSC_boss_pathaleon_the_calculator(); extern void AddSC_instance_mechanar(); + extern void AddSC_blades_edge_mountains(); extern void AddSC_boss_doomlordkazzak(); extern void AddSC_boss_doomwalker(); @@ -682,6 +685,7 @@ void AddScripts() AddSC_boss_loatheb(); AddSC_boss_maexxna(); AddSC_boss_noth(); + AddSC_boss_grobbulus(); AddSC_boss_patchwerk(); AddSC_boss_razuvious(); AddSC_boss_sapphiron(); @@ -704,6 +708,7 @@ void AddScripts() AddSC_instance_halls_of_lightning(); AddSC_boss_maiden_of_grief(); //Ulduar, halls_of_stone AddSC_boss_sjonnir(); + AddSC_boss_krystallus(); AddSC_halls_of_stone(); AddSC_boss_leviathan(); //ulduar AddSC_boss_ignis(); From 81eb84985109401b2bb38e91f534357d30af9fa0 Mon Sep 17 00:00:00 2001 From: Insider Date: Thu, 17 Dec 2009 17:53:33 +0700 Subject: [PATCH 070/405] SD2 updated to 1517 --- scripts/northrend/gundrak/boss_moorabi.cpp | 92 +++++++++++++++++++++- sql/Updates/Makefile.am | 3 +- sql/Updates/r1517_scriptdev2.sql | 2 + sql/scriptdev2_script_full.sql | 4 +- 4 files changed, 96 insertions(+), 5 deletions(-) create mode 100644 sql/Updates/r1517_scriptdev2.sql diff --git a/scripts/northrend/gundrak/boss_moorabi.cpp b/scripts/northrend/gundrak/boss_moorabi.cpp index be72a1391..888d0226e 100644 --- a/scripts/northrend/gundrak/boss_moorabi.cpp +++ b/scripts/northrend/gundrak/boss_moorabi.cpp @@ -22,6 +22,7 @@ SDCategory: Gundrak EndScriptData */ #include "precompiled.h" +#include "gundrak.h" enum { @@ -33,8 +34,20 @@ enum SAY_SLAY_3 = -1604016, SAY_DEATH = -1604017, EMOTE_TRANSFORM = -1604018, - - SOUND_ID_TRANSFORMED = 14724 + EMOTE_TRANSFORMED = -1604029, + + // Troll form + SPELL_DETERMINED_STAB = 55104, + SPELL_MOJO_FRENZY = 55163, + SPELL_GROUND_TREMOR = 55142, + SPELL_NUMBING_SHOUT = 55106, + SPELL_TRANSFORMATION = 55098, + + // Mammoth + SPELL_DETERMINED_GORE = 55102, + SPELL_DETERMINED_GORE_H = 59444, + SPELL_QUAKE = 55101, + SPELL_NUMBING_ROAR = 55100, }; /*###### @@ -53,13 +66,33 @@ struct MANGOS_DLL_DECL boss_moorabiAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsRegularMode; + + uint32 m_uiStabTimer; // used for stab and gore + uint32 m_uiQuakeTimer; // used for quake and ground tremor + uint32 m_uiRoarTimer; // both roars on it + uint32 m_uiTransformationTimer; + uint32 m_uiPreviousTimer; + + bool m_bMammothPhase; + void Reset() { + m_bMammothPhase = false; + + m_uiStabTimer = 8000; + m_uiQuakeTimer = 1000; + m_uiRoarTimer = 7000; + m_uiTransformationTimer = 10000; + m_uiPreviousTimer = 10000; } void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); + DoCast(m_creature, SPELL_MOJO_FRENZY); + + if (m_pInstance) + m_pInstance->SetData(TYPE_MOORABI, IN_PROGRESS); } void KilledUnit(Unit* pVictim) @@ -75,6 +108,9 @@ struct MANGOS_DLL_DECL boss_moorabiAI : public ScriptedAI void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_MOORABI, DONE); } void UpdateAI(const uint32 uiDiff) @@ -82,6 +118,56 @@ struct MANGOS_DLL_DECL boss_moorabiAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (m_creature->HasAura(SPELL_TRANSFORMATION) && !m_bMammothPhase) + { + DoScriptText(EMOTE_TRANSFORMED, m_creature); + m_bMammothPhase = true; + } + + if (m_uiRoarTimer < uiDiff) + { + DoCast(m_creature->getVictim(), m_bMammothPhase ? SPELL_NUMBING_ROAR : SPELL_NUMBING_SHOUT); + m_uiRoarTimer = 20000; + } + else + m_uiRoarTimer -= uiDiff; + + if (m_uiQuakeTimer < uiDiff) + { + DoScriptText(SAY_QUAKE, m_creature); + DoCast(m_creature->getVictim(), m_bMammothPhase ? SPELL_QUAKE : SPELL_GROUND_TREMOR); + m_uiQuakeTimer = m_bMammothPhase ? 13000 : 18000; + } + else + m_uiQuakeTimer -= uiDiff; + + if (m_uiStabTimer < uiDiff) + { + if (m_bMammothPhase) + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_DETERMINED_GORE : SPELL_DETERMINED_GORE_H); + else + DoCast(m_creature->getVictim(), SPELL_DETERMINED_STAB); + + m_uiStabTimer = 7000; + } + else + m_uiStabTimer -= uiDiff; + + // check only in troll phase + if (!m_bMammothPhase) + { + if (m_uiTransformationTimer < uiDiff) + { + DoScriptText(SAY_TRANSFORM, m_creature); + DoScriptText(EMOTE_TRANSFORM, m_creature); + DoCast(m_creature, SPELL_TRANSFORMATION); + m_uiPreviousTimer *= 0.8; + m_uiTransformationTimer = m_uiPreviousTimer; + } + else + m_uiTransformationTimer -= uiDiff; + } + DoMeleeAttackIfReady(); } }; @@ -93,7 +179,7 @@ CreatureAI* GetAI_boss_moorabi(Creature* pCreature) void AddSC_boss_moorabi() { - Script *newscript; + Script* newscript; newscript = new Script; newscript->Name = "boss_moorabi"; diff --git a/sql/Updates/Makefile.am b/sql/Updates/Makefile.am index 51984cbe8..47cb7b8ce 100644 --- a/sql/Updates/Makefile.am +++ b/sql/Updates/Makefile.am @@ -54,4 +54,5 @@ pkgdata_DATA = \ r1508_mangos.sql \ r1513_scriptdev2.sql \ r1516_mangos.sql \ - r1516_scriptdev2.sql + r1516_scriptdev2.sql \ + r1517_scriptdev2.sql diff --git a/sql/Updates/r1517_scriptdev2.sql b/sql/Updates/r1517_scriptdev2.sql new file mode 100644 index 000000000..795778a9a --- /dev/null +++ b/sql/Updates/r1517_scriptdev2.sql @@ -0,0 +1,2 @@ +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1604029,'%s transforms into a Mammoth!',14724,2,0,0,'moorabi EMOTE_TRANSFORMED'); diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 9b476c5ed..afdee90b1 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -1975,7 +1975,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1568079,'Suit yourself. At least five of you must assist me if we\'re to get inside. Follow me.',0,1,0,0,'harrison SAY_START'), (-1568080,'According to my calculations, if enough of us bang the gong at once the seal on these doors will break and we can enter.',0,1,0,0,'harrison SAY_AT_GONG'), -(-1568081,'I\'ve researched this site extensively and i won\'t allow any dim-witted treasure hunters to swoop in and steal what belongs to in a museum. I\'ll lead this charge.',0,1,0,0,'harrison SAY_OPEN_ENTRANCE'); +(-1568081,'I\'ve researched this site extensively and I won\'t allow any dim-witted treasure hunters to swoop in and steal what belongs to in a museum. I\'ll lead this charge.',0,1,0,0,'harrison SAY_OPEN_ENTRANCE'); -- -1 574 000 UTGARDE KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -2385,6 +2385,8 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1604027,'I told ya so!',14438,1,0,0,'galdarah SAY_SLAY_3'), (-1604028,'Even the mighty... can fall.',14439,1,0,0,'galdarah SAY_DEATH'); +(-1604029,'%s transforms into a Mammoth!',14724,2,0,0,'moorabi EMOTE_TRANSFORMED'), + -- -1 608 000 VIOLET HOLD -- -1 609 000 EBON HOLD (DK START) From 40d1820197099fc5a49f52bf4662af4eebe8530a Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 17 Dec 2009 20:59:12 +0300 Subject: [PATCH 071/405] Ulduar teleporter patch --- .../ulduar/ulduar/ulduar_teleport.cpp | 77 +++++++++++-------- 1 file changed, 46 insertions(+), 31 deletions(-) diff --git a/scripts/northrend/ulduar/ulduar/ulduar_teleport.cpp b/scripts/northrend/ulduar/ulduar/ulduar_teleport.cpp index 246a5369c..0433e7ad8 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar_teleport.cpp +++ b/scripts/northrend/ulduar/ulduar/ulduar_teleport.cpp @@ -28,42 +28,57 @@ The teleporter appears to be active and stable. bool GossipHello_ulduar_teleporter(Player *player, Creature *creature) { + +uint16 i; +i=0; + ScriptedInstance *pInstance = (ScriptedInstance *) creature->GetInstanceData(); + if(!pInstance) return true; - player->ADD_GOSSIP_ITEM(0, "Teleport to the Expedition Base Camp", GOSSIP_SENDER_MAIN, BASE_CAMP); + player->ADD_GOSSIP_ITEM(i, "Teleport to the Expedition Base Camp", GOSSIP_SENDER_MAIN, BASE_CAMP); + i++; if(pInstance->GetData(TYPE_LEVIATHAN_TP)) { - player->ADD_GOSSIP_ITEM(0, "Teleport to the Formation Grounds", GOSSIP_SENDER_MAIN, GROUNDS); - if(pInstance->GetData(TYPE_FLAME_LEVIATHAN) == DONE) - { - player->ADD_GOSSIP_ITEM(0, "Teleport to the Colossal Forge", GOSSIP_SENDER_MAIN, FORGE); - if(pInstance->GetData(TYPE_XT002_TP)) - { - player->ADD_GOSSIP_ITEM(0, "Teleport to the Scrapyard", GOSSIP_SENDER_MAIN, SCRAPYARD); - if(pInstance->GetData(TYPE_XT002) == DONE) - { - player->ADD_GOSSIP_ITEM(0, "Teleport to the Antechamber of Ulduar", GOSSIP_SENDER_MAIN, ANTECHAMBER); - if(pInstance->GetData(TYPE_KOLOGARN) == DONE) - { - player->ADD_GOSSIP_ITEM(0, "Teleport to the Shattered Walkway", GOSSIP_SENDER_MAIN, WALKWAY); - if(pInstance->GetData(TYPE_AURIAYA) == DONE) - { - player->ADD_GOSSIP_ITEM(0, "Teleport to the Conservatory of Life", GOSSIP_SENDER_MAIN, CONSERVATORY); - if(pInstance->GetData(TYPE_MIMIRON_TP)) - { - player->ADD_GOSSIP_ITEM(0, "Teleport to the Spark of Imagination", GOSSIP_SENDER_MAIN, SPARK); - if(pInstance->GetData(TYPE_VEZAX) == DONE) - player->ADD_GOSSIP_ITEM(0, "Teleport to the Prison of Yogg-Saron", GOSSIP_SENDER_MAIN, PRISON); - } - } - } - } - } - } - } + player->ADD_GOSSIP_ITEM(i, "Teleport to the Formation Grounds", GOSSIP_SENDER_MAIN, GROUNDS); + i++; + }; + if(pInstance->GetData(TYPE_FLAME_LEVIATHAN) == DONE) + { + player->ADD_GOSSIP_ITEM(i, "Teleport to the Colossal Forge", GOSSIP_SENDER_MAIN, FORGE); + i++; + }; + if(pInstance->GetData(TYPE_XT002_TP)) + { + player->ADD_GOSSIP_ITEM(i, "Teleport to the Scrapyard", GOSSIP_SENDER_MAIN, SCRAPYARD); + i++; + }; + if(pInstance->GetData(TYPE_XT002) == DONE) + { + player->ADD_GOSSIP_ITEM(i, "Teleport to the Antechamber of Ulduar", GOSSIP_SENDER_MAIN, ANTECHAMBER); + i++; + }; + if(pInstance->GetData(TYPE_KOLOGARN) == DONE) + { + player->ADD_GOSSIP_ITEM(i, "Teleport to the Shattered Walkway", GOSSIP_SENDER_MAIN, WALKWAY); + i++; + }; + if(pInstance->GetData(TYPE_AURIAYA) == DONE) + { + player->ADD_GOSSIP_ITEM(i, "Teleport to the Conservatory of Life", GOSSIP_SENDER_MAIN, CONSERVATORY); + i++; + }; + if(pInstance->GetData(TYPE_MIMIRON_TP)) + { + player->ADD_GOSSIP_ITEM(i, "Teleport to the Spark of Imagination", GOSSIP_SENDER_MAIN, SPARK); + i++; + }; + if(pInstance->GetData(TYPE_VEZAX) == DONE) + { + player->ADD_GOSSIP_ITEM(i, "Teleport to the Prison of Yogg-Saron", GOSSIP_SENDER_MAIN, PRISON); + i++; + }; player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, creature->GetGUID()); - return true; } @@ -99,7 +114,7 @@ bool GossipSelect_ulduar_teleporter(Player *player, Creature *creature, uint32 s player->TeleportTo(603, 2536.87, 2569.15, 412.304, 0); player->CLOSE_GOSSIP_MENU(); break; case PRISON: - //player->TeleportTo(603, 2536.87, 2569.15, 412.304, 0); + player->TeleportTo(603, 2536.87, 2569.15, 412.304, 0); player->CLOSE_GOSSIP_MENU(); break; } From 3d4ba79cc0c72144256a8df48ad7bbef76bfdc9e Mon Sep 17 00:00:00 2001 From: Insider Date: Fri, 18 Dec 2009 13:52:37 +0700 Subject: [PATCH 072/405] SD2 updated to 1520 --- Makefile.am | 1 + VC80/80ScriptDev2.vcproj | 6 +- VC90/90ScriptDev2.vcproj | 6 +- .../ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp | 170 ++++++++++++++++++ .../northrend/nexus/nexus/boss_anomalus.cpp | 6 - .../nexus/nexus/boss_keristrasza.cpp | 9 + .../northrend/nexus/nexus/boss_telestra.cpp | 4 + .../northrend/nexus/nexus/instance_nexus.cpp | 15 +- scripts/northrend/nexus/nexus/nexus.h | 4 +- sql/Updates/Makefile.am | 3 +- sql/Updates/r1519_mangos.sql | 1 + sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 4 +- system/ScriptLoader.cpp | 2 + 14 files changed, 218 insertions(+), 14 deletions(-) create mode 100644 scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp create mode 100644 sql/Updates/r1519_mangos.sql diff --git a/Makefile.am b/Makefile.am index 3c0c44730..d48db41f1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -278,6 +278,7 @@ scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp \ scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp \ scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp \ scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp \ +scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp \ scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h \ scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp \ scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp \ diff --git a/VC80/80ScriptDev2.vcproj b/VC80/80ScriptDev2.vcproj index 4fbab4c4b..d81b856b4 100644 --- a/VC80/80ScriptDev2.vcproj +++ b/VC80/80ScriptDev2.vcproj @@ -1459,12 +1459,16 @@ RelativePath="..\scripts\kalimdor\ruins_of_ahnqiraj\boss_rajaxx.cpp" > + + diff --git a/VC90/90ScriptDev2.vcproj b/VC90/90ScriptDev2.vcproj index b3dab93cf..5e1c84237 100644 --- a/VC90/90ScriptDev2.vcproj +++ b/VC90/90ScriptDev2.vcproj @@ -1458,12 +1458,16 @@ RelativePath="..\scripts\kalimdor\ruins_of_ahnqiraj\boss_rajaxx.cpp" > + + diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp new file mode 100644 index 000000000..fe2a8a7dd --- /dev/null +++ b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp @@ -0,0 +1,170 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Ruins of Ahn'Qiraj +SD%Complete: 40 +SDComment: +SDCategory: Ruins of Ahn'Qiraj +EndScriptData */ + +/* ContentData +mob_anubisath_guardian +EndContentData */ + +#include "precompiled.h" + +/*###### +## mob_anubisath_guardian +######*/ +enum +{ + SPELL_METEOR = 24340, + SPELL_PLAGUE = 22997, + SPELL_SHADOW_STORM = 26546, + SPELL_THUNDER_CLAP = 26554, + SPELL_REFLECT_ARFR = 13022, + SPELL_REFLECT_FSSH = 19595, + SPELL_ENRAGE = 8559, + SPELL_EXPLODE = 25698, + + SPELL_SUMMON_ANUB_SWARMGUARD = 17430, + SPELL_SUMMON_ANUB_WARRIOR = 17431, + + EMOTE_FRENZY = -1000002, + + NPC_ANUB_WARRIOR = 15537, + NPC_ANUB_SWARM = 15538 +}; + +struct MANGOS_DLL_DECL mob_anubisath_guardianAI : public ScriptedAI +{ + mob_anubisath_guardianAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 m_uiSpell1; + uint32 m_uiSpell2; + uint32 m_uiSpell3; + uint32 m_uiSpell4; + uint32 m_uiSpell5; + + uint32 m_uiSpell1Timer; + uint32 m_uiSpell2Timer; + uint32 m_uiSpell5Timer; + + uint8 m_uiSummonCount; + + bool m_bIsEnraged; + + void Reset() + { + m_uiSpell1 = urand(0,1) ? SPELL_METEOR : SPELL_PLAGUE; + m_uiSpell2 = urand(0,1) ? SPELL_SHADOW_STORM : SPELL_THUNDER_CLAP; + m_uiSpell3 = urand(0,1) ? SPELL_REFLECT_ARFR : SPELL_REFLECT_FSSH; + m_uiSpell4 = urand(0,1) ? SPELL_ENRAGE : SPELL_EXPLODE; + m_uiSpell5 = urand(0,1) ? SPELL_SUMMON_ANUB_SWARMGUARD : SPELL_SUMMON_ANUB_WARRIOR; + + m_uiSpell1Timer = 10000; + m_uiSpell2Timer = 20000; + m_uiSpell5Timer = 10000; + m_uiSummonCount = 0; + m_bIsEnraged = false; + } + + void Aggro(Unit* pWho) + { + // spell reflection + DoCast(m_creature, m_uiSpell3); + } + + void JustSummoned(Creature* pSummoned) + { + pSummoned->AI()->AttackStart(m_creature->getVictim()); + ++m_uiSummonCount; + } + + void SummonedCreatureDespawn(Creature* pDespawned) + { + --m_uiSummonCount; + } + + void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + { + // when we reach 10% of HP explode or enrage + if (!m_bIsEnraged && m_creature->GetHealth()*10 < m_creature->GetMaxHealth()) + { + if (m_uiSpell4 == SPELL_ENRAGE) + { + DoScriptText(EMOTE_FRENZY, m_creature); + DoCast(m_creature, m_uiSpell4); + m_bIsEnraged = true; + } + else + DoCast(m_creature->getVictim(), m_uiSpell4); + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + // Meteor or Plague + if (m_uiSpell1Timer < uiDiff) + { + DoCast(m_creature->getVictim(), m_uiSpell1); + m_uiSpell1Timer = 15000; + } + else + m_uiSpell1Timer -= uiDiff; + + // Shadow Storm or Thunder Clap + if (m_uiSpell2Timer < uiDiff) + { + DoCast(m_creature->getVictim(), m_uiSpell2); + m_uiSpell2Timer = 15000; + } + else + m_uiSpell2Timer -= uiDiff; + + // summon Anubisath Swarmguard or Anubisath Warrior + if (m_uiSpell5Timer < uiDiff) + { + // change for summon spell + if (m_uiSummonCount < 4) + DoCast(m_creature->getVictim(), m_uiSpell5); + + m_uiSpell5Timer = 15000; + } + else + m_uiSpell5Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_anubisath_guardian(Creature* pCreature) +{ + return new mob_anubisath_guardianAI(pCreature); +} + +void AddSC_ruins_of_ahnqiraj() +{ + Script* newscript; + newscript = new Script; + newscript->Name = "mob_anubisath_guardian"; + newscript->GetAI = &GetAI_mob_anubisath_guardian; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/nexus/nexus/boss_anomalus.cpp b/scripts/northrend/nexus/nexus/boss_anomalus.cpp index d8b0011f8..e9fd00295 100644 --- a/scripts/northrend/nexus/nexus/boss_anomalus.cpp +++ b/scripts/northrend/nexus/nexus/boss_anomalus.cpp @@ -83,17 +83,11 @@ struct MANGOS_DLL_DECL boss_anomalusAI : public ScriptedAI m_uiCreateRiftTimer = 25000; m_uiChaoticRiftGUID = 0; m_uiShieldCount = 3; - - if (m_pInstance) - m_pInstance->SetData(TYPE_ANOMALUS, NOT_STARTED); } void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); - - if (m_pInstance) - m_pInstance->SetData(TYPE_ANOMALUS, IN_PROGRESS); } void JustDied(Unit* pKiller) diff --git a/scripts/northrend/nexus/nexus/boss_keristrasza.cpp b/scripts/northrend/nexus/nexus/boss_keristrasza.cpp index 082d01a10..f778b40a1 100644 --- a/scripts/northrend/nexus/nexus/boss_keristrasza.cpp +++ b/scripts/northrend/nexus/nexus/boss_keristrasza.cpp @@ -22,6 +22,7 @@ SDCategory: Nexus EndScriptData */ #include "precompiled.h" +#include "nexus.h" enum { @@ -63,6 +64,11 @@ struct MANGOS_DLL_DECL boss_keristraszaAI : public ScriptedAI void Reset() { + if (!m_pInstance) + return; + + if (m_creature->isAlive() && m_pInstance->GetData(TYPE_KERISTRASZA) != SPECIAL) + m_creature->CastSpell(m_creature, SPELL_FROZEN_PRISON, true); } void Aggro(Unit* pWho) @@ -73,6 +79,9 @@ struct MANGOS_DLL_DECL boss_keristraszaAI : public ScriptedAI void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_KERISTRASZA, DONE); } void KilledUnit(Unit* pVictim) diff --git a/scripts/northrend/nexus/nexus/boss_telestra.cpp b/scripts/northrend/nexus/nexus/boss_telestra.cpp index 63596540e..b5ec743ed 100644 --- a/scripts/northrend/nexus/nexus/boss_telestra.cpp +++ b/scripts/northrend/nexus/nexus/boss_telestra.cpp @@ -22,6 +22,7 @@ SDCategory: Nexus EndScriptData */ #include "precompiled.h" +#include "nexus.h" enum { @@ -89,6 +90,9 @@ struct MANGOS_DLL_DECL boss_telestraAI : public ScriptedAI void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_TELESTRA, DONE); } void KilledUnit(Unit* pVictim) diff --git a/scripts/northrend/nexus/nexus/instance_nexus.cpp b/scripts/northrend/nexus/nexus/instance_nexus.cpp index d5bb5021c..29868a71f 100644 --- a/scripts/northrend/nexus/nexus/instance_nexus.cpp +++ b/scripts/northrend/nexus/nexus/instance_nexus.cpp @@ -39,8 +39,7 @@ bool GOHello_go_containment_sphere(Player* pPlayer, GameObject* pGo) } pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); - pGo->SetGoState(GO_STATE_ACTIVE); - return true; + return false; } struct MANGOS_DLL_DECL instance_nexus : public ScriptedInstance @@ -51,6 +50,7 @@ struct MANGOS_DLL_DECL instance_nexus : public ScriptedInstance std::string strInstData; uint64 m_uiAnomalusGUID; + uint64 m_uiKeristrazaGUID; uint64 m_uiTelestrasContainmentSphereGUID; uint64 m_uiAnomalusContainmentSphereGUID; @@ -61,6 +61,7 @@ struct MANGOS_DLL_DECL instance_nexus : public ScriptedInstance memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); m_uiAnomalusGUID = 0; + m_uiKeristrazaGUID = 0; m_uiTelestrasContainmentSphereGUID = 0; m_uiAnomalusContainmentSphereGUID = 0; @@ -107,6 +108,9 @@ struct MANGOS_DLL_DECL instance_nexus : public ScriptedInstance case NPC_ANOMALUS: m_uiAnomalusGUID = pCreature->GetGUID(); break; + case NPC_KERISTRASZA: + m_uiKeristrazaGUID = pCreature->GetGUID(); + break; } } @@ -179,6 +183,13 @@ struct MANGOS_DLL_DECL instance_nexus : public ScriptedInstance if (m_auiEncounter[0] == SPECIAL && m_auiEncounter[1] == SPECIAL && m_auiEncounter[2] == SPECIAL) { // release Keristrasza from her prison here + m_auiEncounter[3] = SPECIAL; + + if (Creature* pCreature = instance->GetCreature(m_uiKeristrazaGUID)) + { + if (pCreature->isAlive()) + pCreature->RemoveAurasDueToSpell(SPELL_FROZEN_PRISON); + } } if (uiData == DONE) diff --git a/scripts/northrend/nexus/nexus/nexus.h b/scripts/northrend/nexus/nexus/nexus.h index ac475a6c8..cea656b25 100644 --- a/scripts/northrend/nexus/nexus/nexus.h +++ b/scripts/northrend/nexus/nexus/nexus.h @@ -21,6 +21,8 @@ enum GO_CONTAINMENT_SPHERE_TELESTRA = 188526, GO_CONTAINMENT_SPHERE_ANOMALUS = 188527, - GO_CONTAINMENT_SPHERE_ORMOROK = 188528 + GO_CONTAINMENT_SPHERE_ORMOROK = 188528, + + SPELL_FROZEN_PRISON = 47854 // may not be correct spell }; #endif diff --git a/sql/Updates/Makefile.am b/sql/Updates/Makefile.am index 47cb7b8ce..ddcb12b19 100644 --- a/sql/Updates/Makefile.am +++ b/sql/Updates/Makefile.am @@ -55,4 +55,5 @@ pkgdata_DATA = \ r1513_scriptdev2.sql \ r1516_mangos.sql \ r1516_scriptdev2.sql \ - r1517_scriptdev2.sql + r1517_scriptdev2.sql \ + r1519_mangos.sql diff --git a/sql/Updates/r1519_mangos.sql b/sql/Updates/r1519_mangos.sql new file mode 100644 index 000000000..eba3ca408 --- /dev/null +++ b/sql/Updates/r1519_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='mob_anubisath_guardian' WHERE entry=15355; diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index e738202a5..e570e5d1b 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -781,6 +781,7 @@ UPDATE creature_template SET ScriptName='npc_henry_stern' WHERE entry=8696; /* RUINS OF AHN'QIRAJ */ UPDATE instance_template SET script='instance_ruins_of_ahnqiraj' WHERE map=509; +UPDATE creature_template SET ScriptName='mob_anubisath_guardian' WHERE entry=15355; /* SCARLET MONASTERY */ UPDATE instance_template SET script='instance_scarlet_monastery' WHERE map=189; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index afdee90b1..c5b896c43 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -2383,9 +2383,9 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1604025,'What a rush!',14436,1,0,0,'galdarah SAY_SLAY_1'), (-1604026,'Who needs gods, when WE ARE GODS!',14437,1,0,0,'galdarah SAY_SLAY_2'), (-1604027,'I told ya so!',14438,1,0,0,'galdarah SAY_SLAY_3'), -(-1604028,'Even the mighty... can fall.',14439,1,0,0,'galdarah SAY_DEATH'); +(-1604028,'Even the mighty... can fall.',14439,1,0,0,'galdarah SAY_DEATH'), -(-1604029,'%s transforms into a Mammoth!',14724,2,0,0,'moorabi EMOTE_TRANSFORMED'), +(-1604029,'%s transforms into a Mammoth!',14724,2,0,0,'moorabi EMOTE_TRANSFORMED'); -- -1 608 000 VIOLET HOLD diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index 4252fe56e..73f535cf0 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -212,6 +212,7 @@ extern void AddSC_razorfen_downs(); extern void AddSC_boss_ayamiss(); //ruins_of_ahnqiraj extern void AddSC_boss_kurinnaxx(); extern void AddSC_boss_moam(); +extern void AddSC_ruins_of_ahnqiraj(); extern void AddSC_boss_cthun(); //temple_of_ahnqiraj extern void AddSC_boss_fankriss(); extern void AddSC_boss_huhuran(); @@ -621,6 +622,7 @@ void AddScripts() AddSC_boss_ayamiss(); //ruins_of_ahnqiraj AddSC_boss_kurinnaxx(); AddSC_boss_moam(); + AddSC_ruins_of_ahnqiraj(); AddSC_boss_cthun(); //temple_of_ahnqiraj AddSC_boss_fankriss(); AddSC_boss_huhuran(); From 15d746235335c64ee4aabaa67957308d1f6e2a2a Mon Sep 17 00:00:00 2001 From: Insider Date: Mon, 21 Dec 2009 11:03:25 +0700 Subject: [PATCH 073/405] SD2 updated to 1523 --- Makefile.am | 2 + VC80/80ScriptDev2.vcproj | 8 ++ VC90/90ScriptDev2.vcproj | 8 ++ .../sunken_temple/instance_sunken_temple.cpp | 113 ++++++++++++++++ .../sunken_temple/sunken_temple.h | 30 +++++ .../nexus/nexus/boss_keristrasza.cpp | 123 +++++++++++++++++- .../northrend/nexus/nexus/boss_telestra.cpp | 84 +++++++++++- sql/Updates/Makefile.am | 3 +- sql/Updates/r1523_mangos.sql | 1 + sql/mangos_scriptname_full.sql | 2 +- 10 files changed, 362 insertions(+), 12 deletions(-) create mode 100644 scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp create mode 100644 scripts/eastern_kingdoms/sunken_temple/sunken_temple.h create mode 100644 sql/Updates/r1523_mangos.sql diff --git a/Makefile.am b/Makefile.am index d48db41f1..0a01f711d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -188,6 +188,8 @@ scripts/eastern_kingdoms/stratholme/boss_timmy_the_cruel.cpp \ scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp \ scripts/eastern_kingdoms/stratholme/stratholme.cpp \ scripts/eastern_kingdoms/stratholme/stratholme.h \ +scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp \ +scripts/eastern_kingdoms/sunken_temple/sunken_temple.h \ scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp \ scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp \ scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp \ diff --git a/VC80/80ScriptDev2.vcproj b/VC80/80ScriptDev2.vcproj index d81b856b4..7f4346f46 100644 --- a/VC80/80ScriptDev2.vcproj +++ b/VC80/80ScriptDev2.vcproj @@ -1027,6 +1027,14 @@ + + + + + + + + + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: instance_sunken_temple +SD%Complete: 20 +SDComment: +SDCategory: Sunken Temple +EndScriptData */ + +#include "precompiled.h" +#include "sunken_temple.h" + +struct MANGOS_DLL_DECL instance_sunken_temple : public ScriptedInstance +{ + instance_sunken_temple(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string strInstData; + + void Initialize() + { + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + } + + void SetData(uint32 uiType, uint32 uiData) + { + debug_log("SD2: Instance Sunken Temple: SetData received for type %u with data %u", uiType, uiData); + + switch(uiType) + { + case TYPE_ATALARION: + m_auiEncounter[0] = uiData; + break; + case TYPE_DEFENDERS: + m_auiEncounter[1] = uiData; + break; + case TYPE_JAMMALAIN: + m_auiEncounter[2] = uiData; + break; + case TYPE_MALFURION: + m_auiEncounter[3] = uiData; + break; + } + + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3]; + + strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } + } + + const char* Save() + { + return strInstData.c_str(); + } + + void Load(const char* chrIn) + { + if (!chrIn) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(chrIn); + + std::istringstream loadStream(chrIn); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3]; + + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; + } + + OUT_LOAD_INST_DATA_COMPLETE; + } +}; + +InstanceData* GetInstanceData_instance_sunken_temple(Map* pMap) +{ + return new instance_sunken_temple(pMap); +} + +void AddSC_instance_sunken_temple() +{ + Script* newscript; + newscript = new Script; + newscript->Name = "instance_sunken_temple"; + newscript->GetInstanceData = &GetInstanceData_instance_sunken_temple; + newscript->RegisterSelf(); +} diff --git a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h new file mode 100644 index 000000000..21112a916 --- /dev/null +++ b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h @@ -0,0 +1,30 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +enum +{ + MAX_ENCOUNTER = 4, + + TYPE_ATALARION = 1, + TYPE_DEFENDERS = 2, + TYPE_JAMMALAIN = 3, + TYPE_MALFURION = 4, + + NPC_ATALARION = 8580, + NPC_DREAMSCYTH = 5721, + NPC_WEAVER = 5720, + NPC_AVATAR_OF_HAKKAR = 8443, + NPC_SHADE_OF_ERANIKUS = 5709, + + NPC_MALFURION = 15362, + + GO_ALTAR_OF_HAKKAR = 148836, + + GO_ATALAI_STATUE_1 = 148830, + GO_ATALAI_STATUE_2 = 148831, + GO_ATALAI_STATUE_3 = 148832, + GO_ATALAI_STATUE_4 = 148833, + GO_ATALAI_STATUE_5 = 148834, + GO_ATALAI_STATUE_6 = 148835 +}; diff --git a/scripts/northrend/nexus/nexus/boss_keristrasza.cpp b/scripts/northrend/nexus/nexus/boss_keristrasza.cpp index f778b40a1..37b66c840 100644 --- a/scripts/northrend/nexus/nexus/boss_keristrasza.cpp +++ b/scripts/northrend/nexus/nexus/boss_keristrasza.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Keristrasza -SD%Complete: 10% -SDComment: +SD%Complete: 65% +SDComment: timers tuning, add achievement SDCategory: Nexus EndScriptData */ @@ -32,16 +32,16 @@ enum SAY_KILL = -1576019, SAY_DEATH = -1576020, + SPELL_INTENSE_COLD = 48094, + SPELL_CRYSTALFIRE_BREATH = 48096, SPELL_CRYSTALFIRE_BREATH_H = 57091, SPELL_CRYSTALLIZE = 48179, SPELL_CRYSTAL_CHAINS = 50997, - SPELL_CRYSTAL_CHAINS_H = 57050, SPELL_TAIL_SWEEP = 50155, - SPELL_INTENSE_COLD = 48094, SPELL_ENRAGE = 8599 }; @@ -62,18 +62,37 @@ struct MANGOS_DLL_DECL boss_keristraszaAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsRegularMode; + uint32 uiCrystalChainTimer; + uint32 uiTailSweepTimer; + uint32 uiCrystalfireBreathTimer; + uint32 uiCrystallizeTimer; + + bool m_bIsEnraged; + void Reset() { + uiCrystalChainTimer = 30000; + uiTailSweepTimer = urand(5000, 7500); + uiCrystalfireBreathTimer = urand(10000, 20000); + uiCrystallizeTimer = urand(20000, 30000); + + m_bIsEnraged = false; + if (!m_pInstance) return; - if (m_creature->isAlive() && m_pInstance->GetData(TYPE_KERISTRASZA) != SPECIAL) - m_creature->CastSpell(m_creature, SPELL_FROZEN_PRISON, true); + if (m_creature->isAlive()) + { + if (m_pInstance->GetData(TYPE_KERISTRASZA) != SPECIAL) + m_creature->CastSpell(m_creature, SPELL_FROZEN_PRISON, true); + } } void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); + + m_creature->CastSpell(m_creature, SPELL_INTENSE_COLD, true); } void JustDied(Unit* pKiller) @@ -95,6 +114,98 @@ struct MANGOS_DLL_DECL boss_keristraszaAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (!m_bIsEnraged && m_creature->GetHealth()*100 < m_creature->GetMaxHealth()*25) + { + if (!m_creature->IsNonMeleeSpellCasted(false)) + { + m_bIsEnraged = true; + DoScriptText(SAY_ENRAGE, m_creature); + DoCast(m_creature, SPELL_ENRAGE); + } + } + + if (uiCrystalChainTimer < uiDiff) + { + if (!m_creature->IsNonMeleeSpellCasted(false)) + { + if (m_bIsRegularMode) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1)) + { + if (Player* pPlayer = pTarget->GetCharmerOrOwnerPlayerOrPlayerItself()) + DoCast(pPlayer, SPELL_CRYSTAL_CHAINS); + + uiCrystalChainTimer = 30000; + } + } + else + { + if (Unit* pSource = m_creature->getVictim()) + { + uiCrystalChainTimer = 15000; + + Player* pPlayer = pSource->GetCharmerOrOwnerPlayerOrPlayerItself(); + + if (!pPlayer) + return; + + if (Group* pGroup = pPlayer->GetGroup()) + { + for(GroupReference* pRef = pGroup->GetFirstMember(); pRef != NULL; pRef = pRef->next()) + { + if (Player* pMember = pRef->getSource()) + { + if (pMember->isAlive() && pMember->IsWithinDistInMap(m_creature, 50.0f)) + m_creature->CastSpell(pMember, SPELL_CRYSTAL_CHAINS, true); + } + } + } + else + m_creature->CastSpell(pPlayer, SPELL_CRYSTAL_CHAINS, false); + } + } + } + } + else + uiCrystalChainTimer -= uiDiff; + + if (uiTailSweepTimer < uiDiff) + { + if (!m_creature->IsNonMeleeSpellCasted(false)) + { + DoCast(m_creature, SPELL_TAIL_SWEEP); + uiTailSweepTimer = urand(2500, 7500); + } + } + else + uiCrystalChainTimer -= uiDiff; + + if (uiCrystalfireBreathTimer < uiDiff) + { + if (!m_creature->IsNonMeleeSpellCasted(false)) + { + DoCast(m_creature, m_bIsRegularMode ? SPELL_CRYSTALFIRE_BREATH : SPELL_CRYSTALFIRE_BREATH_H); + uiCrystalfireBreathTimer = urand(15000, 20000); + } + } + else + uiCrystalfireBreathTimer -= uiDiff; + + if (!m_bIsRegularMode) + { + if (uiCrystallizeTimer < uiDiff) + { + if (!m_creature->IsNonMeleeSpellCasted(false)) + { + DoScriptText(SAY_CRYSTAL_NOVA, m_creature); + DoCast(m_creature, SPELL_CRYSTALLIZE); + uiCrystallizeTimer = urand(15000, 25000); + } + } + else + uiCrystallizeTimer -= uiDiff; + } + DoMeleeAttackIfReady(); } }; diff --git a/scripts/northrend/nexus/nexus/boss_telestra.cpp b/scripts/northrend/nexus/nexus/boss_telestra.cpp index b5ec743ed..99e398b89 100644 --- a/scripts/northrend/nexus/nexus/boss_telestra.cpp +++ b/scripts/northrend/nexus/nexus/boss_telestra.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Telestra -SD%Complete: 10% -SDComment: +SD%Complete: 30% +SDComment: phase 2 and 3 todo SDCategory: Nexus EndScriptData */ @@ -59,7 +59,11 @@ enum NPC_TELEST_FIRE = 26928, NPC_TELEST_ARCANE = 26929, - NPC_TELEST_FROST = 26930 + NPC_TELEST_FROST = 26930, + + PHASE_1 = 1, + PHASE_2 = 2, + PHASE_3 = 3 }; /*###### @@ -78,8 +82,31 @@ struct MANGOS_DLL_DECL boss_telestraAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsRegularMode; + uint8 m_uiPhase; + + uint32 m_uiFirebombTimer; + uint32 m_uiIceNovaTimer; + uint32 m_uiGravityWellTimer; + void Reset() { + m_uiPhase = PHASE_1; + + m_uiFirebombTimer = urand(3000, 5000); + m_uiIceNovaTimer = urand(6000, 12000); + m_uiGravityWellTimer = urand(15000, 25000); + } + + void AttackStart(Unit* pWho) + { + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + + m_creature->GetMotionMaster()->MoveChase(pWho, 20.0f); + } } void Aggro(Unit* pWho) @@ -106,7 +133,56 @@ struct MANGOS_DLL_DECL boss_telestraAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - DoMeleeAttackIfReady(); + switch(m_uiPhase) + { + case PHASE_1: + { + if (m_uiGravityWellTimer < uiDiff) + { + if (!m_creature->IsNonMeleeSpellCasted(false)) + { + DoCast(m_creature, SPELL_GRAVITY_WELL); + m_uiGravityWellTimer = urand(15000, 30000); + } + } + else + m_uiGravityWellTimer -= uiDiff; + + if (m_uiFirebombTimer < uiDiff) + { + if (!m_creature->IsNonMeleeSpellCasted(false)) + { + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_FIREBOMB : SPELL_FIREBOMB_H); + m_uiFirebombTimer = urand(3000, 5000); + } + } + else + m_uiFirebombTimer -= uiDiff; + + if (m_uiIceNovaTimer < uiDiff) + { + if (!m_creature->IsNonMeleeSpellCasted(false)) + { + DoCast(m_creature, m_bIsRegularMode ? SPELL_ICE_NOVA : SPELL_ICE_NOVA_H); + m_uiIceNovaTimer = urand(10000, 15000); + } + } + else + m_uiIceNovaTimer -= uiDiff; + + DoMeleeAttackIfReady(); + break; + } + case PHASE_2: + { + break; + } + case PHASE_3: + { + DoMeleeAttackIfReady(); + break; + } + } } }; diff --git a/sql/Updates/Makefile.am b/sql/Updates/Makefile.am index ddcb12b19..f936d8c57 100644 --- a/sql/Updates/Makefile.am +++ b/sql/Updates/Makefile.am @@ -56,4 +56,5 @@ pkgdata_DATA = \ r1516_mangos.sql \ r1516_scriptdev2.sql \ r1517_scriptdev2.sql \ - r1519_mangos.sql + r1519_mangos.sql \ + r1523_mangos.sql diff --git a/sql/Updates/r1523_mangos.sql b/sql/Updates/r1523_mangos.sql new file mode 100644 index 000000000..18e38847a --- /dev/null +++ b/sql/Updates/r1523_mangos.sql @@ -0,0 +1 @@ +UPDATE instance_template SET script='instance_sunken_temple' WHERE map=109; diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index e570e5d1b..967507c12 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -902,7 +902,7 @@ UPDATE creature_template SET ScriptName='mob_freed_soul' WHERE entry=11136; UPDATE gameobject_template SET ScriptName='go_gauntlet_gate' WHERE entry=175357; /* SUNKEN TEMPLE */ - +UPDATE instance_template SET script='instance_sunken_temple' WHERE map=109; /* SUNWELL PLATEAU */ UPDATE instance_template SET script='instance_sunwell_plateau' WHERE map=580; From a0c732ceef02a6a387c2b90b624240939ecbd699 Mon Sep 17 00:00:00 2001 From: Insider Date: Tue, 22 Dec 2009 17:36:48 +0700 Subject: [PATCH 074/405] [patch 11] Added support for heroic mode and other small improvements for boss Onyxia in raid instance Onyxia's Lair --- scripts/kalimdor/onyxias_lair/boss_onyxia.cpp | 69 ++++++++++++------- 1 file changed, 46 insertions(+), 23 deletions(-) diff --git a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp index f8ec8e5fb..35b23e9d1 100644 --- a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp +++ b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp @@ -32,14 +32,18 @@ enum EMOTE_BREATH = -1249004, SPELL_WINGBUFFET = 18500, + H_SPELL_WINGBUFFET = 69293, SPELL_FLAMEBREATH = 18435, - SPELL_CLEAVE = 19983, - SPELL_TAILSWEEP = 15847, + H_SPELL_FLAMEBREATH = 68970, + SPELL_CLEAVE = 68868, + SPELL_TAILSWEEP = 68867, + H_SPELL_TAILSWEEP = 69286, SPELL_KNOCK_AWAY = 19633, SPELL_ENGULFINGFLAMES = 20019, SPELL_DEEPBREATH = 23461, SPELL_FIREBALL = 18392, + H_SPELL_FIREBALL = 68926, //Not much choise about these. We have to make own defintion on the direction/start-end point //SPELL_BREATH_NORTH_TO_SOUTH = 17086, // 20x in "array" @@ -56,11 +60,12 @@ enum //SPELL_BREATH = 21131, // 8x in "array", different initial cast than the other arrays SPELL_BELLOWINGROAR = 18431, - SPELL_HEATED_GROUND = 22191, + SPELL_HEATED_GROUND = 22191, // make server crash SPELL_SUMMONWHELP = 17646, + SPELL_SUMMONGUARD = 68968, NPC_WHELP = 11262, - MAX_WHELP = 16, + NPC_GUARD = 36561, PHASE_START = 1, PHASE_BREATH = 2, @@ -87,16 +92,23 @@ static sOnyxMove aMoveData[]= //{7, 6, SPELL_BREATH_NORTH_TO_SOUTH, 22.8763f, -217.152f, -60.0548f},//north }; -static float afSpawnLocations[2][3]= +static float SpawnLocs[4][3]= { - {-30.127, -254.463, -89.440}, - {-30.817, -177.106, -89.258} + {-30.127, -254.463, -89.440}, //whelps + {-30.817, -177.106, -89.258}, //whelps + {-126.57, -214.609, -71.446}, //guardians + {-22.347, -214.571, -89.104} //Onyxia }; struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI { - boss_onyxiaAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + boss_onyxiaAI(Creature* pCreature) : ScriptedAI(pCreature) + { + Regular = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + bool Regular; uint32 m_uiPhase; uint32 m_uiFlameBreathTimer; @@ -112,8 +124,10 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI uint32 m_uiSummonWhelpsTimer; uint32 m_uiBellowingRoarTimer; uint32 m_uiWhelpTimer; + uint32 SummonGuardTimer; uint8 m_uiSummonCount; + uint8 m_uiMaxWhelps; bool m_bIsSummoningWhelps; void Reset() @@ -133,11 +147,13 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI m_pPointData = GetMoveData(); m_uiEngulfingFlamesTimer = 15000; - m_uiSummonWhelpsTimer = 45000; + m_uiSummonWhelpsTimer = 15000; m_uiBellowingRoarTimer = 30000; m_uiWhelpTimer = 1000; + SummonGuardTimer = 35000; m_uiSummonCount = 0; + m_uiMaxWhelps = Regular ? 20 : 40; m_bIsSummoningWhelps = false; } @@ -149,10 +165,8 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI void JustSummoned(Creature *pSummoned) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) - pSummoned->AI()->AttackStart(pTarget); - - ++m_uiSummonCount; + pSummoned->GetMotionMaster()->MovePoint(0, SpawnLocs[3][0], SpawnLocs[3][1], SpawnLocs[3][2]); + pSummoned->SetInCombatWithZone(); } void KilledUnit(Unit* pVictim) @@ -211,7 +225,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI { if (m_uiFlameBreathTimer < uiDiff) { - DoCast(m_creature->getVictim(), SPELL_FLAMEBREATH); + DoCast(m_creature->getVictim(), Regular ? SPELL_FLAMEBREATH : H_SPELL_FLAMEBREATH); m_uiFlameBreathTimer = urand(10000, 20000); } else @@ -219,7 +233,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI if (m_uiTailSweepTimer < uiDiff) { - DoCast(m_creature, SPELL_TAILSWEEP); + DoCast(m_creature, Regular ? SPELL_TAILSWEEP : H_SPELL_TAILSWEEP); m_uiTailSweepTimer = urand(15000, 20000); } else @@ -235,7 +249,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI if (m_uiWingBuffetTimer < uiDiff) { - DoCast(m_creature->getVictim(), SPELL_WINGBUFFET); + DoCast(m_creature->getVictim(), Regular ? SPELL_WINGBUFFET : H_SPELL_WINGBUFFET); m_uiWingBuffetTimer = urand(15000, 30000); } else @@ -253,7 +267,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI } else { - if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 60) + if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 65) { m_uiPhase = PHASE_BREATH; @@ -319,7 +333,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != POINT_MOTION_TYPE) { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, SPELL_FIREBALL); + DoCast(pTarget, Regular ? SPELL_FIREBALL : H_SPELL_FIREBALL); m_uiEngulfingFlamesTimer = 8000; } @@ -329,13 +343,14 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI if (m_bIsSummoningWhelps) { - if (m_uiSummonCount < MAX_WHELP) + if (m_uiSummonCount < m_uiMaxWhelps) { if (m_uiWhelpTimer < uiDiff) { - m_creature->SummonCreature(NPC_WHELP, afSpawnLocations[0][0], afSpawnLocations[0][1], afSpawnLocations[0][2], 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000); - m_creature->SummonCreature(NPC_WHELP, afSpawnLocations[1][0], afSpawnLocations[1][1], afSpawnLocations[1][2], 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000); - m_uiWhelpTimer = 1000; + m_creature->SummonCreature(NPC_WHELP, SpawnLocs[0][0], SpawnLocs[0][1], SpawnLocs[0][2], 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000); + m_creature->SummonCreature(NPC_WHELP, SpawnLocs[1][0], SpawnLocs[1][1], SpawnLocs[1][2], 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000); + m_uiSummonCount += 2; + m_uiWhelpTimer = 500; } else m_uiWhelpTimer -= uiDiff; @@ -344,7 +359,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI { m_bIsSummoningWhelps = false; m_uiSummonCount = 0; - m_uiSummonWhelpsTimer = 30000; + m_uiSummonWhelpsTimer = 85000; } } else @@ -354,6 +369,14 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI else m_uiSummonWhelpsTimer -= uiDiff; } + + if(SummonGuardTimer < uiDiff) + { + m_creature->SummonCreature(NPC_GUARD, SpawnLocs[2][0], SpawnLocs[2][1], SpawnLocs[2][2], 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000); + SummonGuardTimer = 30000; + } + else + SummonGuardTimer -= uiDiff; } } }; From 7a2ef0b75517247759f8fac90945d040771a82a7 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Tue, 22 Dec 2009 19:03:54 +0300 Subject: [PATCH 075/405] Ulduar teleport patch --- addition/7_mangos_ulduar.sql | 26 ++++++++----- .../ulduar/ulduar/ulduar_teleport.cpp | 38 +++++++------------ 2 files changed, 29 insertions(+), 35 deletions(-) diff --git a/addition/7_mangos_ulduar.sql b/addition/7_mangos_ulduar.sql index c70d38012..1f93a045a 100644 --- a/addition/7_mangos_ulduar.sql +++ b/addition/7_mangos_ulduar.sql @@ -18,13 +18,19 @@ UPDATE `creature_template` SET `ScriptName`='boss_yogg_saron' WHERE `entry`=3328 UPDATE `creature_template` SET `ScriptName`='boss_algalon' WHERE `entry`=32871; UPDATE `instance_template` SET `script`='instance_ulduar' WHERE `map`=603; -replace into `creature_template` values ('99005','0','0','0','0','0','22448','0','22448','0','Ulduar teleporter','',NULL,'80','80','64200','64200','12300','12300','31200','35','35','1','1.48','0.5','0','3170','6182','0','33235','1','1400','1900','0','0','0','0','0','0','0','0','0','0','100','7','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','1','3','1','1','0','0','0','0','0','0','0','0','1','0','0','0','ulduar_teleporter'); -replace into `creature_template_addon` values ('99005','0','0','0','0','0','48143 0'); -replace into `locales_creature` values ('99005','','','','','','','',' ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,''); -/*replace into `creature` values -('500000','99005','571','1','1','0','99003','9025.76','-1179.12','1060.18','4.59386','25','0','0','64200','12300','0','0'), -('500001','99005','603','2','1','0','99003','1497.84','-23.9801','421.367','5.0242','25','0','0','64200','12300','0','0'), -('500002','99005','603','2','1','0','99003','131.248','-35.3802','410.204','0','25','0','0','64200','12300','0','0'), -('500003','99005','603','2','1','0','99003','553.233','-12.3247','410.079','0','25','0','0','64200','12300','0','0'), -('500004','99005','603','2','1','0','99003','926.292','-11.4635','418.995','0','25','0','0','64200','12300','0','0'), -('500005','99005','603','2','1','0','99003','2086.17','-24.3111','421.639','3.11803','25','0','0','64200','12300','0','0');*/ +REPLACE INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) +VALUES (99005, 0, 0, 0, 0, 0, 22448, 0, 22448, 0, 'Ulduar teleporter', '', NULL, 0, 80, 80, 64200, 64200, 12300, 12300, 9730, 35, 35, 1, 1.48, 0.5, 0, 294, 441, 0, 110, 1.4, 1400, 1400, 0, 0, 0, 0, 0, 0, 0, 0, 235, 353, 88, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 1, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 'ulduar_teleporter'); +REPLACE INTO `creature_template_addon` (`entry`, `mount`, `bytes1`, `bytes2`, `emote`, `moveflags`, `auras`) VALUES +(99005, 0, 0, 0, 0, 0, '48143 0'); +REPLACE INTO `locales_creature` values ('99005','Ulduar teleporter','','','','','','','Телепортер Ульдуара',NULL,NULL,NULL,NULL,NULL,NULL,NULL,''); +DELETE FROM `creature` WHERE `guid` IN (500000,500001,500002,500003,500004,500005,500006,500007,500008); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES +(500000, 99005, 571, 1, 1, 0, 0, 9025.76, -1179.12, 1060.18, 4.59386, 3600, 0, 0, 64200, 12300, 0, 0), +(500001, 99005, 603, 1, 1, 0, 0, 1497.84, -23.9801, 421.367, 5.0242, 3600, 0, 0, 64200, 12300, 0, 0), +(500002, 99005, 603, 1, 1, 0, 0, 131.248, -35.3802, 410.204, 0, 3600, 0, 0, 64200, 12300, 0, 0), +(500003, 99005, 603, 1, 1, 0, 0, 553.233, -12.3247, 410.079, 0, 3600, 0, 0, 64200, 12300, 0, 0), +(500004, 99005, 603, 1, 1, 0, 0, 926.292, -11.4635, 418.995, 0, 3600, 0, 0, 64200, 12300, 0, 0), +(500005, 99005, 603, 1, 1, 0, 0, 2086.17, -24.3111, 421.639, 3.11803, 3600, 0, 0, 64200, 12300, 0, 0), +(500006, 99005, 603, 1, 1, 0, 0, -705.304, -92.5391, 429.879, 4.87217, 3600, 0, 0, 64200, 12300, 0, 0), +(500007, 99005, 603, 1, 1, 0, 0, 2516.96, 2568.03, 412.4, 0.672303, 3600, 0, 0, 64200, 12300, 0, 0), +(500008, 99005, 603, 1, 1, 0, 0, 1854.2975, -11.0173, 334.3998, 0, 3600, 0, 0, 64200, 12300, 0, 0); \ No newline at end of file diff --git a/scripts/northrend/ulduar/ulduar/ulduar_teleport.cpp b/scripts/northrend/ulduar/ulduar/ulduar_teleport.cpp index 0433e7ad8..bd6596b6e 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar_teleport.cpp +++ b/scripts/northrend/ulduar/ulduar/ulduar_teleport.cpp @@ -29,54 +29,42 @@ The teleporter appears to be active and stable. bool GossipHello_ulduar_teleporter(Player *player, Creature *creature) { -uint16 i; -i=0; - ScriptedInstance *pInstance = (ScriptedInstance *) creature->GetInstanceData(); if(!pInstance) return true; - player->ADD_GOSSIP_ITEM(i, "Teleport to the Expedition Base Camp", GOSSIP_SENDER_MAIN, BASE_CAMP); - i++; - if(pInstance->GetData(TYPE_LEVIATHAN_TP)) + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, "Teleport to the Expedition Base Camp", GOSSIP_SENDER_MAIN, BASE_CAMP); + if(pInstance->GetData(TYPE_LEVIATHAN_TP) == IN_PROGRESS) { - player->ADD_GOSSIP_ITEM(i, "Teleport to the Formation Grounds", GOSSIP_SENDER_MAIN, GROUNDS); - i++; + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, "Teleport to the Formation Grounds", GOSSIP_SENDER_MAIN, GROUNDS); }; if(pInstance->GetData(TYPE_FLAME_LEVIATHAN) == DONE) { - player->ADD_GOSSIP_ITEM(i, "Teleport to the Colossal Forge", GOSSIP_SENDER_MAIN, FORGE); - i++; + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, "Teleport to the Colossal Forge", GOSSIP_SENDER_MAIN, FORGE); }; - if(pInstance->GetData(TYPE_XT002_TP)) + if(pInstance->GetData(TYPE_XT002_TP) == IN_PROGRESS) { - player->ADD_GOSSIP_ITEM(i, "Teleport to the Scrapyard", GOSSIP_SENDER_MAIN, SCRAPYARD); - i++; + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, "Teleport to the Scrapyard", GOSSIP_SENDER_MAIN, SCRAPYARD); }; if(pInstance->GetData(TYPE_XT002) == DONE) { - player->ADD_GOSSIP_ITEM(i, "Teleport to the Antechamber of Ulduar", GOSSIP_SENDER_MAIN, ANTECHAMBER); - i++; + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, "Teleport to the Antechamber of Ulduar", GOSSIP_SENDER_MAIN, ANTECHAMBER); }; if(pInstance->GetData(TYPE_KOLOGARN) == DONE) { - player->ADD_GOSSIP_ITEM(i, "Teleport to the Shattered Walkway", GOSSIP_SENDER_MAIN, WALKWAY); - i++; + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, "Teleport to the Shattered Walkway", GOSSIP_SENDER_MAIN, WALKWAY); }; if(pInstance->GetData(TYPE_AURIAYA) == DONE) { - player->ADD_GOSSIP_ITEM(i, "Teleport to the Conservatory of Life", GOSSIP_SENDER_MAIN, CONSERVATORY); - i++; + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, "Teleport to the Conservatory of Life", GOSSIP_SENDER_MAIN, CONSERVATORY); }; - if(pInstance->GetData(TYPE_MIMIRON_TP)) + if(pInstance->GetData(TYPE_MIMIRON_TP) == IN_PROGRESS) { - player->ADD_GOSSIP_ITEM(i, "Teleport to the Spark of Imagination", GOSSIP_SENDER_MAIN, SPARK); - i++; + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, "Teleport to the Spark of Imagination", GOSSIP_SENDER_MAIN, SPARK); }; if(pInstance->GetData(TYPE_VEZAX) == DONE) { - player->ADD_GOSSIP_ITEM(i, "Teleport to the Prison of Yogg-Saron", GOSSIP_SENDER_MAIN, PRISON); - i++; + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, "Teleport to the Prison of Yogg-Saron", GOSSIP_SENDER_MAIN, PRISON); }; player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, creature->GetGUID()); return true; @@ -114,7 +102,7 @@ bool GossipSelect_ulduar_teleporter(Player *player, Creature *creature, uint32 s player->TeleportTo(603, 2536.87, 2569.15, 412.304, 0); player->CLOSE_GOSSIP_MENU(); break; case PRISON: - player->TeleportTo(603, 2536.87, 2569.15, 412.304, 0); + player->TeleportTo(603, 1854.297, -11.0173, 334.4, 0); player->CLOSE_GOSSIP_MENU(); break; } From b0ccaa68f9ff58c8ae50fc5118c2c682a682e054 Mon Sep 17 00:00:00 2001 From: Insider Date: Wed, 23 Dec 2009 17:45:41 +0700 Subject: [PATCH 076/405] Fixed SQL files for [patch 3] and [patch 7] --- addition/3_mangos_teleguy.sql | 2 +- addition/7_mangos_ulduar.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addition/3_mangos_teleguy.sql b/addition/3_mangos_teleguy.sql index 6d2263234..b44be87ac 100644 --- a/addition/3_mangos_teleguy.sql +++ b/addition/3_mangos_teleguy.sql @@ -1,2 +1,2 @@ DELETE FROM `creature_template` WHERE `entry`=99001; -INSERT INTO `creature_template` VALUES ('99001','0','0','0','0','0','18','0','18','0','Slappy McFry','The Teleport Guy',NULL,'59','61','6700','24000','5598','5875','20','35','35','1','1.48','0','0','181','189','0','158','1','1400','1900','0','0','0','0','0','0','0','0','0','0','100','7','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','1','3','1','1','0','0','0','0','0','0','0','0','1','0','0','0','teleguy'); +insert into `creature_template` values ('99001','0','0','0','0','0','18','0','18','0','Slappy McFry','The Teleport Guy',NULL,'0','59','61','6700','24000','5598','5875','20','35','35','1','1.48','0','0','181','189','0','158','1','1400','1900','0','0','0','0','0','0','0','0','0','0','100','7','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','1','3','1','1','0','0','0','0','0','0','0','0','1','0','0','0','teleguy'); diff --git a/addition/7_mangos_ulduar.sql b/addition/7_mangos_ulduar.sql index c70d38012..386721b82 100644 --- a/addition/7_mangos_ulduar.sql +++ b/addition/7_mangos_ulduar.sql @@ -18,7 +18,7 @@ UPDATE `creature_template` SET `ScriptName`='boss_yogg_saron' WHERE `entry`=3328 UPDATE `creature_template` SET `ScriptName`='boss_algalon' WHERE `entry`=32871; UPDATE `instance_template` SET `script`='instance_ulduar' WHERE `map`=603; -replace into `creature_template` values ('99005','0','0','0','0','0','22448','0','22448','0','Ulduar teleporter','',NULL,'80','80','64200','64200','12300','12300','31200','35','35','1','1.48','0.5','0','3170','6182','0','33235','1','1400','1900','0','0','0','0','0','0','0','0','0','0','100','7','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','1','3','1','1','0','0','0','0','0','0','0','0','1','0','0','0','ulduar_teleporter'); +insert into `creature_template` values ('99005','0','0','0','0','0','22448','0','22448','0','Ulduar teleporter','',NULL,'0','80','80','64200','64200','12300','12300','31200','35','35','1','1.48','0.5','0','3170','6182','0','33235','1','1400','1900','0','0','0','0','0','0','0','0','0','0','100','7','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','1','3','1','1','0','0','0','0','0','0','0','0','1','99003','0','0','ulduar_teleporter'); replace into `creature_template_addon` values ('99005','0','0','0','0','0','48143 0'); replace into `locales_creature` values ('99005','','','','','','','',' ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,''); /*replace into `creature` values From b8371c944660b5eec23d4009d7f42fa950c9fc19 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 24 Dec 2009 18:49:21 +0300 Subject: [PATCH 077/405] Added trial of crusader --- Makefile.am | 6 + VC90/90ScriptDev2.vcproj | 24 + addition/711_ruinsAQ_bosses_mangos.sql | 2 + addition/712_boss_krystallus_mangos.sql | 16 + addition/713_boss_grobbulus_mangos.sql | 1 + ...715_clear_trial_of_the_champion_mangos.sql | 14 + addition/715_trial_of_the_champion_mangos.sql | 21 + .../boss_argent_challenge.cpp | 558 +++++++++++ .../boss_black_knight.cpp | 315 ++++++ .../boss_grand_champions.cpp | 943 ++++++++++++++++++ .../instance_trial_of_the_champion.cpp | 516 ++++++++++ .../trial_of_the_champion.cpp | 267 +++++ .../trial_of_the_champion.h | 81 ++ .../ulduar/halls_of_stone/boss_krystallus.cpp | 171 ++++ system/ScriptLoader.cpp | 12 +- 15 files changed, 2946 insertions(+), 1 deletion(-) create mode 100644 addition/711_ruinsAQ_bosses_mangos.sql create mode 100644 addition/712_boss_krystallus_mangos.sql create mode 100644 addition/713_boss_grobbulus_mangos.sql create mode 100644 addition/715_clear_trial_of_the_champion_mangos.sql create mode 100644 addition/715_trial_of_the_champion_mangos.sql create mode 100644 scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp create mode 100644 scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp create mode 100644 scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp create mode 100644 scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp create mode 100644 scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp create mode 100644 scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h create mode 100644 scripts/northrend/ulduar/halls_of_stone/boss_krystallus.cpp diff --git a/Makefile.am b/Makefile.am index f89745810..5e4b4e4de 100644 --- a/Makefile.am +++ b/Makefile.am @@ -484,6 +484,12 @@ scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp \ scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp \ scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp \ scripts/outland/tempest_keep/the_mechanar/mechanar.h \ +scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp \ +scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp \ +scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp \ +scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp \ +scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp \ +scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h \ scripts/world/areatrigger_scripts.cpp \ scripts/world/boss_emeriss.cpp \ scripts/world/boss_lethon.cpp \ diff --git a/VC90/90ScriptDev2.vcproj b/VC90/90ScriptDev2.vcproj index 9831a06ed..dc6fa7577 100644 --- a/VC90/90ScriptDev2.vcproj +++ b/VC90/90ScriptDev2.vcproj @@ -1649,6 +1649,30 @@ + + + + + + + + + + + + +* 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_argent_challenge +SD%Complete: 92% +SDComment: missing yells. radiance is "wrong" +SDCategory: Trial Of the Champion +EndScriptData */ + +#include "precompiled.h" +#include "trial_of_the_champion.h" + +enum +{ + //yells + + //eadric + SPELL_VENGEANCE = 66889, + SPELL_RADIANCE = 66862, + SPELL_RADIANCE_H = 67681, + SPELL_HAMMER_OF_JUSTICE = 66940, + SPELL_HAMMER = 67680, + //paletress + SPELL_SMITE = 66536, + SPELL_SMITE_H = 67674, + SPELL_HOLY_FIRE = 66538, + SPELL_HOLY_FIRE_H = 67676, + SPELL_RENEW = 66537, + SPELL_RENEW_H = 67675, + SPELL_HOLY_NOVA = 66546, + SPELL_SHIELD = 66515, + SPELL_CONFESS = 66547, + //memory + SPELL_FEAR = 66552, + SPELL_FEAR_H = 67677, + SPELL_SHADOWS = 66619, + SPELL_SHADOWS_H = 67678, + SPELL_OLD_WOUNDS = 66620, + SPELL_OLD_WOUNDS_H = 67679, +}; + +// Eadric The Pure +struct MANGOS_DLL_DECL boss_eadricAI : public ScriptedAI +{ + boss_eadricAI(Creature* pCreature) : ScriptedAI(pCreature) + { + Reset(); + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + + uint32 Vengeance_Timer; + uint32 Radiance_Timer; + uint32 Hammer_Timer; + uint32 Hammer_Dmg_Timer; + + uint64 HammerTarget; + + void Reset() + { + m_creature->SetRespawnDelay(999999999); + Vengeance_Timer = 1000; + Radiance_Timer = 15000; + Hammer_Timer = 40000; + Hammer_Dmg_Timer = 45000; + HammerTarget = 0; + } + + void EnterEvadeMode() + { + Vengeance_Timer = 1000; + Radiance_Timer = 15000; + Hammer_Timer = 40000; + Hammer_Dmg_Timer = 45000; + HammerTarget = 0; + m_creature->RemoveArenaAuras(true); + m_creature->SendMonsterMove(746.864441, 660.918762, 411.695465, 4.698700, m_creature->GetMonsterMoveFlags(), 1); + m_creature->GetMap()->CreatureRelocation(m_creature, 754.360779, 660.816162, 412.395996, 4.698700); + m_creature->SetHealth(m_creature->GetMaxHealth()); + } + + void Aggro(Unit* pWho) + { + if (!m_pInstance) + return; + if (m_pInstance->GetData(TYPE_ARGENT_CHALLENGE) == DONE) + m_creature->ForcedDespawn(); + else + m_pInstance->SetData(TYPE_ARGENT_CHALLENGE, IN_PROGRESS); + } + + void JustDied(Unit* pKiller) + { + if (!m_pInstance) + return; + m_creature->ForcedDespawn(); + m_pInstance->SetData(TYPE_ARGENT_CHALLENGE, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (Vengeance_Timer < diff) + { + DoCast(m_creature, SPELL_VENGEANCE); + Vengeance_Timer = 12000; + }else Vengeance_Timer -= diff; + + if (Radiance_Timer < diff) + { + DoCast(m_creature, m_bIsRegularMode ? SPELL_RADIANCE : SPELL_RADIANCE_H); + Radiance_Timer = 20000; + }else Radiance_Timer -= diff; + + if (Hammer_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + { + DoCast(target, SPELL_HAMMER_OF_JUSTICE); + HammerTarget = target->GetGUID(); + } + Hammer_Timer = 50000; + }else Hammer_Timer -= diff; + + if (Hammer_Dmg_Timer < diff) + { + if (Unit* pHammerTarget = Unit::GetUnit(*m_creature, HammerTarget)) + DoCast(pHammerTarget, SPELL_HAMMER); + Hammer_Dmg_Timer = 50000; + } + else Hammer_Dmg_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_eadric(Creature* pCreature) +{ + return new boss_eadricAI(pCreature); +} + +// Argent Confessor Paletress +struct MANGOS_DLL_DECL boss_paletressAI : public ScriptedAI +{ + boss_paletressAI(Creature* pCreature) : ScriptedAI(pCreature) + { + Reset(); + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + + uint32 Smite_Timer; + uint32 Holy_Fire_Timer; + uint32 Renew_Timer; + uint32 Shield_Delay; + uint32 Shield_Check; + + bool summoned; + bool shielded; + + void Reset() + { + m_creature->SetRespawnDelay(999999999); + m_creature->RemoveAurasDueToSpell(SPELL_SHIELD); + Smite_Timer = 5000; + Holy_Fire_Timer = 10000; + Renew_Timer = 7000; + Shield_Delay = 0; + Shield_Check = 1000; + summoned = false; + shielded = false; + } + + void EnterEvadeMode() + { + m_creature->RemoveAurasDueToSpell(SPELL_SHIELD); + Smite_Timer = 5000; + Holy_Fire_Timer = 10000; + Renew_Timer = 7000; + Shield_Delay = 0; + Shield_Check = 1000; + summoned = false; + shielded = false; + m_creature->RemoveArenaAuras(true); + m_creature->SendMonsterMove(746.864441, 660.918762, 411.695465, 4.698700, m_creature->GetMonsterMoveFlags(), 1); + m_creature->GetMap()->CreatureRelocation(m_creature, 754.360779, 660.816162, 412.395996, 4.698700); + m_creature->SetHealth(m_creature->GetMaxHealth()); + } + + void Aggro(Unit* pWho) + { + if (!m_pInstance) + return; + if (m_pInstance->GetData(TYPE_ARGENT_CHALLENGE) == DONE) + m_creature->ForcedDespawn(); + else + m_pInstance->SetData(TYPE_ARGENT_CHALLENGE, IN_PROGRESS); + } + + void JustDied(Unit* pKiller) + { + if (!m_pInstance) + return; + m_creature->ForcedDespawn(); + m_pInstance->SetData(TYPE_ARGENT_CHALLENGE, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (Smite_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, m_bIsRegularMode ? SPELL_SMITE : SPELL_SMITE_H); + Smite_Timer = 2000; + }else Smite_Timer -= diff; + + if (Holy_Fire_Timer < diff) + { + m_creature->CastStop(m_bIsRegularMode ? SPELL_SMITE : SPELL_SMITE_H); + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, m_bIsRegularMode ? SPELL_HOLY_FIRE : SPELL_HOLY_FIRE_H); + Holy_Fire_Timer = 10000; + }else Holy_Fire_Timer -= diff; + + if (Renew_Timer < diff) + { + m_creature->CastStop(m_bIsRegularMode ? SPELL_SMITE : SPELL_SMITE_H); + m_creature->CastStop(m_bIsRegularMode ? SPELL_HOLY_FIRE : SPELL_HOLY_FIRE_H); + switch(urand(0, 1)) + { + case 0: + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_MEMORY)))) + if (pTemp->isAlive()) + DoCast(pTemp, m_bIsRegularMode ? SPELL_RENEW : SPELL_RENEW_H); + else + DoCast(pTemp, m_bIsRegularMode ? SPELL_RENEW : SPELL_RENEW_H); + break; + case 1: + DoCast(m_creature, m_bIsRegularMode ? SPELL_RENEW : SPELL_RENEW_H); + break; + } + Renew_Timer = 25000; + }else Renew_Timer -= diff; + + if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 35 && !summoned) + { + m_creature->CastStop(m_bIsRegularMode ? SPELL_SMITE : SPELL_SMITE_H); + m_creature->CastStop(m_bIsRegularMode ? SPELL_HOLY_FIRE : SPELL_HOLY_FIRE_H); + DoCast(m_creature, SPELL_HOLY_NOVA); + switch(urand(0, 24)) + { + case 0: + if (Creature* pTemp = m_creature->SummonCreature(MEMORY_ALGALON, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) + { + pTemp->AddThreat(m_creature->getVictim(),1000.0f); + pTemp->AI()->AttackStart(m_creature->getVictim()); + } + break; + case 1: + if (Creature* pTemp = m_creature->SummonCreature(MEMORY_CHROMAGGUS, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) + { + pTemp->AddThreat(m_creature->getVictim(),1000.0f); + pTemp->AI()->AttackStart(m_creature->getVictim()); + } + break; + case 2: + if (Creature* pTemp = m_creature->SummonCreature(MEMORY_CYANIGOSA, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) + { + pTemp->AddThreat(m_creature->getVictim(),1000.0f); + pTemp->AI()->AttackStart(m_creature->getVictim()); + } + break; + case 3: + if (Creature* pTemp = m_creature->SummonCreature(MEMORY_DELRISSA, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) + { + pTemp->AddThreat(m_creature->getVictim(),1000.0f); + pTemp->AI()->AttackStart(m_creature->getVictim()); + } + break; + case 4: + if (Creature* pTemp = m_creature->SummonCreature(MEMORY_ECK, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) + { + pTemp->AddThreat(m_creature->getVictim(),1000.0f); + pTemp->AI()->AttackStart(m_creature->getVictim()); + } + break; + case 5: + if (Creature* pTemp = m_creature->SummonCreature(MEMORY_ENTROPIUS, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) + { + pTemp->AddThreat(m_creature->getVictim(),1000.0f); + pTemp->AI()->AttackStart(m_creature->getVictim()); + } + break; + case 6: + if (Creature* pTemp = m_creature->SummonCreature(MEMORY_GRUUL, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) + { + pTemp->AddThreat(m_creature->getVictim(),1000.0f); + pTemp->AI()->AttackStart(m_creature->getVictim()); + } + break; + case 7: + if (Creature* pTemp = m_creature->SummonCreature(MEMORY_HAKKAR, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) + { + pTemp->AddThreat(m_creature->getVictim(),1000.0f); + pTemp->AI()->AttackStart(m_creature->getVictim()); + } + break; + case 8: + if (Creature* pTemp = m_creature->SummonCreature(MEMORY_HEIGAN, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) + { + pTemp->AddThreat(m_creature->getVictim(),1000.0f); + pTemp->AI()->AttackStart(m_creature->getVictim()); + } + break; + case 9: + if (Creature* pTemp = m_creature->SummonCreature(MEMORY_HEROD, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) + { + pTemp->AddThreat(m_creature->getVictim(),1000.0f); + pTemp->AI()->AttackStart(m_creature->getVictim()); + } + break; + case 10: + if (Creature* pTemp = m_creature->SummonCreature(MEMORY_HOGGER, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) + { + pTemp->AddThreat(m_creature->getVictim(),1000.0f); + pTemp->AI()->AttackStart(m_creature->getVictim()); + } + break; + case 11: + if (Creature* pTemp = m_creature->SummonCreature(MEMORY_IGNIS, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) + { + pTemp->AddThreat(m_creature->getVictim(),1000.0f); + pTemp->AI()->AttackStart(m_creature->getVictim()); + } + break; + case 12: + if (Creature* pTemp = m_creature->SummonCreature(MEMORY_ILLIDAN, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) + { + pTemp->AddThreat(m_creature->getVictim(),1000.0f); + pTemp->AI()->AttackStart(m_creature->getVictim()); + } + break; + case 13: + if (Creature* pTemp = m_creature->SummonCreature(MEMORY_INGVAR, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) + { + pTemp->AddThreat(m_creature->getVictim(),1000.0f); + pTemp->AI()->AttackStart(m_creature->getVictim()); + } + break; + case 14: + if (Creature* pTemp = m_creature->SummonCreature(MEMORY_KALITHRESH, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) + { + pTemp->AddThreat(m_creature->getVictim(),1000.0f); + pTemp->AI()->AttackStart(m_creature->getVictim()); + } + break; + case 15: + if (Creature* pTemp = m_creature->SummonCreature(MEMORY_LUCIFRON, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) + { + pTemp->AddThreat(m_creature->getVictim(),1000.0f); + pTemp->AI()->AttackStart(m_creature->getVictim()); + } + break; + case 16: + if (Creature* pTemp = m_creature->SummonCreature(MEMORY_MALCHEZAAR, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) + { + pTemp->AddThreat(m_creature->getVictim(),1000.0f); + pTemp->AI()->AttackStart(m_creature->getVictim()); + } + break; + case 17: + if (Creature* pTemp = m_creature->SummonCreature(MEMORY_MUTANUS, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) + { + pTemp->AddThreat(m_creature->getVictim(),1000.0f); + pTemp->AI()->AttackStart(m_creature->getVictim()); + } + break; + case 18: + if (Creature* pTemp = m_creature->SummonCreature(MEMORY_ONYXIA, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) + { + pTemp->AddThreat(m_creature->getVictim(),1000.0f); + pTemp->AI()->AttackStart(m_creature->getVictim()); + } + break; + case 19: + if (Creature* pTemp = m_creature->SummonCreature(MEMORY_THUNDERAAN, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) + { + pTemp->AddThreat(m_creature->getVictim(),1000.0f); + pTemp->AI()->AttackStart(m_creature->getVictim()); + } + break; + case 20: + if (Creature* pTemp = m_creature->SummonCreature(MEMORY_VANCLEEF, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) + { + pTemp->AddThreat(m_creature->getVictim(),1000.0f); + pTemp->AI()->AttackStart(m_creature->getVictim()); + } + break; + case 21: + if (Creature* pTemp = m_creature->SummonCreature(MEMORY_VASHJ, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) + { + pTemp->AddThreat(m_creature->getVictim(),1000.0f); + pTemp->AI()->AttackStart(m_creature->getVictim()); + } + break; + case 22: + if (Creature* pTemp = m_creature->SummonCreature(MEMORY_VEKNILASH, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) + { + pTemp->AddThreat(m_creature->getVictim(),1000.0f); + pTemp->AI()->AttackStart(m_creature->getVictim()); + } + break; + case 23: + if (Creature* pTemp = m_creature->SummonCreature(MEMORY_VEZAX, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) + { + pTemp->AddThreat(m_creature->getVictim(),1000.0f); + pTemp->AI()->AttackStart(m_creature->getVictim()); + } + break; + case 24: + if (Creature* pTemp = m_creature->SummonCreature(MEMORY_ARCHIMONDE, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) + { + pTemp->AddThreat(m_creature->getVictim(),1000.0f); + pTemp->AI()->AttackStart(m_creature->getVictim()); + } + break; + } + summoned = true; + Shield_Delay = 1000; + } + + if (Shield_Delay < diff && !shielded && summoned) + { + m_creature->CastStop(m_bIsRegularMode ? SPELL_SMITE : SPELL_SMITE_H); + m_creature->CastStop(m_bIsRegularMode ? SPELL_HOLY_FIRE : SPELL_HOLY_FIRE_H); + DoCast(m_creature, SPELL_SHIELD); + shielded = true; + Shield_Check = 1000; + }else Shield_Delay -= diff; + + if (Shield_Check < diff && shielded) + { + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_MEMORY)))) + if (!pTemp->isAlive()) + { + m_creature->RemoveAurasDueToSpell(SPELL_SHIELD); + shielded = false; + }else Shield_Check = 1000; + }else Shield_Check -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_paletress(Creature* pCreature) +{ + return new boss_paletressAI(pCreature); +} + +// Summoned Memory +struct MANGOS_DLL_DECL mob_toc5_memoryAI : public ScriptedAI +{ + mob_toc5_memoryAI(Creature* pCreature) : ScriptedAI(pCreature) + { + Reset(); + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + + uint32 Old_Wounds_Timer; + uint32 Shadows_Timer; + uint32 Fear_Timer; + + void Reset() + { + Old_Wounds_Timer = 5000; + Shadows_Timer = 8000; + Fear_Timer = 13000; + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (Old_Wounds_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, m_bIsRegularMode ? SPELL_OLD_WOUNDS : SPELL_OLD_WOUNDS_H); + Old_Wounds_Timer = 10000; + }else Old_Wounds_Timer -= diff; + + if (Fear_Timer < diff) + { + DoCast(m_creature, m_bIsRegularMode ? SPELL_FEAR : SPELL_FEAR_H); + Fear_Timer = 40000; + }else Fear_Timer -= diff; + + if (Shadows_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1)) + DoCast(target, m_bIsRegularMode ? SPELL_SHADOWS : SPELL_SHADOWS_H); + Shadows_Timer = 10000; + }else Shadows_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_toc5_memory(Creature* pCreature) +{ + return new mob_toc5_memoryAI(pCreature); +} + +void AddSC_boss_argent_challenge() +{ + Script* NewScript; + + NewScript = new Script; + NewScript->Name = "boss_eadric"; + NewScript->GetAI = &GetAI_boss_eadric; + NewScript->RegisterSelf(); + + NewScript = new Script; + NewScript->Name = "boss_paletress"; + NewScript->GetAI = &GetAI_boss_paletress; + NewScript->RegisterSelf(); + + NewScript = new Script; + NewScript->Name = "mob_toc5_memory"; + NewScript->GetAI = &GetAI_mob_toc5_memory; + NewScript->RegisterSelf(); +} \ No newline at end of file diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp new file mode 100644 index 000000000..6ca04d69e --- /dev/null +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp @@ -0,0 +1,315 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 +* 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_black_knight +SD%Complete: 92% +SDComment: missing yells. not sure about timers. +SDCategory: Trial Of the Champion +EndScriptData */ + +#include "precompiled.h" +#include "trial_of_the_champion.h" + +enum +{ + //yells + + //undead + SPELL_PLAGUE_STRIKE = 67724, + SPELL_PLAGUE_STRIKE_H = 67884, + SPELL_ICY_TOUCH = 67718, + SPELL_ICY_TOUCH_H = 67881, + SPELL_OBLITERATE = 67725, + SPELL_OBLITERATE_H = 67883, + SPELL_CHOKE = 68306, + //skeleton + SPELL_ARMY = 42650, //replacing original one, since that one spawns millions of ghouls!! + //ghost + SPELL_DEATH = 67808, + SPELL_DEATH_H = 67875, + SPELL_MARK = 67823, + + //risen ghoul + SPELL_CLAW = 67879, + SPELL_EXPLODE = 67729, + SPELL_EXPLODE_H = 67886, + SPELL_LEAP = 67749, + SPELL_LEAP_H = 67880, + + //sword ID + EQUIP_SWORD = 40343 +}; + +// Risen Ghoul +struct MANGOS_DLL_DECL mob_toc5_risen_ghoulAI : public ScriptedAI +{ + mob_toc5_risen_ghoulAI(Creature* pCreature) : ScriptedAI(pCreature) + { + Reset(); + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + + uint32 Attack; + + void Reset() + { + Attack = 2500; + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (Attack < diff) + { + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_BLACK_KNIGHT)))) + if (pTemp->isAlive()) + if ((pTemp->GetHealth()*100 / pTemp->GetMaxHealth()) < 25) + DoCast(m_creature, m_bIsRegularMode ? SPELL_EXPLODE : SPELL_EXPLODE_H); + if (m_creature->IsWithinDistInMap(m_creature->getVictim(), 4)) + { + DoCast(m_creature->getVictim(), SPELL_CLAW); + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1)) + m_creature->AI()->AttackStart(target); + Attack = 2500; + }else + if (m_creature->IsWithinDistInMap(m_creature->getVictim(), 30)) + { + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_LEAP : SPELL_LEAP_H); + Attack = 2500; + } + }else Attack -= diff; + + if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 25) + DoCast(m_creature, m_bIsRegularMode ? SPELL_EXPLODE : SPELL_EXPLODE_H); + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_toc5_risen_ghoul(Creature* pCreature) +{ + return new mob_toc5_risen_ghoulAI(pCreature); +} + +// The Black Knight +struct MANGOS_DLL_DECL boss_black_knightAI : public ScriptedAI +{ + boss_black_knightAI(Creature* pCreature) : ScriptedAI(pCreature) + { + Reset(); + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + + uint32 Plague_Strike_Timer; + uint32 Icy_Touch_Timer; + uint32 Obliterate_Timer; + uint32 Choke_Timer; + uint32 Death_Timer; + uint32 Mark_Timer; + uint32 Phase_Delay; + uint32 Summon_Ghoul; + + bool phase1; + bool phase2; + bool phase3; + bool ghoul; + + void Reset() + { + m_creature->SetRespawnDelay(999999999); + m_creature->SetDisplayId(29837); + SetEquipmentSlots(false, EQUIP_SWORD, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE); + Plague_Strike_Timer = 5000; + Icy_Touch_Timer = 10000; + Obliterate_Timer = 16000; + Choke_Timer = 15000; + Summon_Ghoul = 4000; + phase1 = true; + phase2 = false; + phase3 = false; + ghoul = false; + } + + void EnterEvadeMode() + { + m_creature->SetDisplayId(29837); + Plague_Strike_Timer = 5000; + Icy_Touch_Timer = 10000; + Obliterate_Timer = 16000; + Choke_Timer = 15000; + Summon_Ghoul = 4000; + phase1 = true; + phase2 = false; + phase3 = false; + ghoul = false; + m_creature->RemoveArenaAuras(true); + m_creature->SendMonsterMove(746.864441, 660.918762, 411.695465, 4.698700, m_creature->GetMonsterMoveFlags(), 1); + m_creature->GetMap()->CreatureRelocation(m_creature, 754.360779, 660.816162, 412.395996, 4.698700); + m_creature->SetHealth(m_creature->GetMaxHealth()); + } + + void Aggro(Unit* pWho) + { + if (!m_pInstance) + return; + if (m_pInstance->GetData(TYPE_BLACK_KNIGHT) == DONE) + m_creature->ForcedDespawn(); + else + m_pInstance->SetData(TYPE_BLACK_KNIGHT, IN_PROGRESS); + } + + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) + { + if (uiDamage > m_creature->GetHealth() && !phase3){ + uiDamage = 0; + if (phase2) + StartPhase3(); + if (phase1) + StartPhase2(); + } + } + + void JustDied(Unit* pKiller) + { + if (!m_pInstance) + return; + if (phase3) + { + m_pInstance->SetData(TYPE_BLACK_KNIGHT, DONE); + } + if (phase2) + if (!m_creature->isAlive()) + { + m_creature->Respawn(); + StartPhase3(); + } + if (phase1) + if (!m_creature->isAlive()) + { + m_creature->Respawn(); + StartPhase2(); + } + } + + void StartPhase2() + { + m_creature->SetHealth(m_creature->GetMaxHealth()); + m_creature->SetDisplayId(27550); + phase1 = false; + phase2 = true; + phase3 = false; + DoCast(m_creature, SPELL_ARMY); + Plague_Strike_Timer = 14000; + Icy_Touch_Timer = 12000; + Obliterate_Timer = 18000; + } + + void StartPhase3() + { + m_creature->SetHealth(m_creature->GetMaxHealth()); + m_creature->SetDisplayId(14560); + SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE); + phase1 = false; + phase2 = false; + phase3 = true; + Death_Timer = 5000; + Mark_Timer = 9000; + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (Plague_Strike_Timer < diff && !phase3) + { + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_PLAGUE_STRIKE : SPELL_PLAGUE_STRIKE_H); + Plague_Strike_Timer = 10500; + }else Plague_Strike_Timer -= diff; + + if (Icy_Touch_Timer < diff && !phase3) + { + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_ICY_TOUCH : SPELL_ICY_TOUCH_H); + Icy_Touch_Timer = 10000; + }else Icy_Touch_Timer -= diff; + + if (Obliterate_Timer < diff && !phase3) + { + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_OBLITERATE : SPELL_OBLITERATE_H); + Obliterate_Timer = 11000; + }else Obliterate_Timer -= diff; + + if (Choke_Timer < diff && phase1) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1)) + DoCast(m_creature->getVictim(), SPELL_CHOKE); + Choke_Timer = 15000; + }else Choke_Timer -= diff; + + if (Summon_Ghoul < diff && phase1 && !ghoul) + { + if (m_pInstance->GetData(DATA_TOC5_ANNOUNCER) == m_pInstance->GetData(DATA_JAEREN)) + m_creature->SummonCreature(NPC_RISEN_JAEREN, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + else + m_creature->SummonCreature(NPC_RISEN_ARELAS, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + ghoul = true; + }else Summon_Ghoul -= diff; + + if (Mark_Timer < diff && phase3) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1)) + DoCast(target, SPELL_MARK); + Mark_Timer = 15000; + }else Mark_Timer -= diff; + + if (Death_Timer < diff && phase3) + { + DoCast(m_creature, m_bIsRegularMode ? SPELL_DEATH : SPELL_DEATH_H); + Death_Timer = 3500; + }else Death_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_black_knight(Creature* pCreature) +{ + return new boss_black_knightAI(pCreature); +} + +void AddSC_boss_black_knight() +{ + Script* NewScript; + + NewScript = new Script; + NewScript->Name = "mob_toc5_risen_ghoul"; + NewScript->GetAI = &GetAI_mob_toc5_risen_ghoul; + NewScript->RegisterSelf(); + + NewScript = new Script; + NewScript->Name = "boss_black_knight"; + NewScript->GetAI = &GetAI_boss_black_knight; + NewScript->RegisterSelf(); +} \ No newline at end of file diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp new file mode 100644 index 000000000..22a9d5860 --- /dev/null +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp @@ -0,0 +1,943 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 +* 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_grand_champions +SD%Complete: 92% +SDComment: missing yells. hunter AI sucks. no pvp diminuishing returns(is it DB related?) +SDCategory: Trial Of the Champion +EndScriptData */ + +#include "precompiled.h" +#include "trial_of_the_champion.h" + +enum +{ + //yells + + //warrior + SPELL_MORTAL_STRIKE = 68783, + SPELL_MORTAL_STRIKE_H = 68784, + SPELL_BLADESTORM = 63784, + SPELL_INTERCEPT = 67540, + SPELL_ROLLING_THROW = 47115, //need core support for spell 67546, using 47115 instead + //mage + SPELL_FIREBALL = 66042, + SPELL_FIREBALL_H = 68310, + SPELL_BLAST_WAVE = 66044, + SPELL_BLAST_WAVE_H = 68312, + SPELL_HASTE = 66045, + SPELL_POLYMORPH = 66043, + SPELL_POLYMORPH_H = 68311, + //shaman + SPELL_CHAIN_LIGHTNING = 67529, + SPELL_CHAIN_LIGHTNING_H = 68319, + SPELL_EARTH_SHIELD = 67530, + SPELL_HEALING_WAVE = 67528, + SPELL_HEALING_WAVE_H = 68318, + SPELL_HEX_OF_MENDING = 67534, + //hunter + SPELL_DISENGAGE = 68340, + SPELL_LIGHTNING_ARROWS = 66083, + SPELL_MULTI_SHOT = 66081, + SPELL_SHOOT = 66079, + //rogue + SPELL_EVISCERATE = 67709, + SPELL_EVISCERATE_H = 68317, + SPELL_FAN_OF_KNIVES = 67706, + SPELL_POISON_BOTTLE = 67701 +}; + +// Warrior +struct MANGOS_DLL_DECL mob_toc5_warriorAI : public ScriptedAI +{ + mob_toc5_warriorAI(Creature* pCreature) : ScriptedAI(pCreature) + { + Reset(); + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + + uint32 Mortal_Strike_Timer; + uint32 Bladestorm_Timer; + uint32 Rolling_Throw_Timer; + uint32 Intercept_Cooldown; + uint32 intercept_check; + + void Reset() + { + m_creature->SetRespawnDelay(999999999); + Mortal_Strike_Timer = 6000; + Bladestorm_Timer = 20000; + Rolling_Throw_Timer = 30000; + Intercept_Cooldown = 0; + intercept_check = 1000; + } + + void EnterEvadeMode() + { + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) + if (!pTemp->isAlive()) + { + pTemp->Respawn(); + pTemp->SendMonsterMove(738.665771, 661.031433, 412.394623, 4.698702, pTemp->GetMonsterMoveFlags(), 1); + pTemp->GetMap()->CreatureRelocation(pTemp, 738.665771, 661.031433, 412.394623, 4.698702); + } + else + { + pTemp->RemoveArenaAuras(true); + pTemp->SetHealth(pTemp->GetMaxHealth()); + pTemp->SendMonsterMove(738.665771, 661.031433, 412.394623, 4.698702, pTemp->GetMonsterMoveFlags(), 1); + pTemp->GetMap()->CreatureRelocation(pTemp, 738.665771, 661.031433, 412.394623, 4.698702); + } + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) + if (!pTemp->isAlive()) + { + pTemp->Respawn(); + pTemp->SendMonsterMove(746.864441, 660.918762, 411.695465, 4.698700, pTemp->GetMonsterMoveFlags(), 1); + pTemp->GetMap()->CreatureRelocation(pTemp, 746.864441, 660.918762, 411.695465, 4.698700); + } + else + { + pTemp->RemoveArenaAuras(true); + pTemp->SetHealth(pTemp->GetMaxHealth()); + pTemp->SendMonsterMove(746.864441, 660.918762, 411.695465, 4.698700, pTemp->GetMonsterMoveFlags(), 1); + pTemp->GetMap()->CreatureRelocation(pTemp, 746.864441, 660.918762, 411.695465, 4.698700); + } + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) + if (!pTemp->isAlive()) + { + pTemp->Respawn(); + pTemp->SendMonsterMove(754.360779, 660.816162, 412.395996, 4.698700, pTemp->GetMonsterMoveFlags(), 1); + pTemp->GetMap()->CreatureRelocation(pTemp, 754.360779, 660.816162, 412.395996, 4.698700); + } + else + { + pTemp->RemoveArenaAuras(true); + pTemp->SetHealth(pTemp->GetMaxHealth()); + pTemp->SendMonsterMove(754.360779, 660.816162, 412.395996, 4.698700, pTemp->GetMonsterMoveFlags(), 1); + pTemp->GetMap()->CreatureRelocation(pTemp, 754.360779, 660.816162, 412.395996, 4.698700); + } + } + + void Aggro(Unit* pWho) + { + if (!m_pInstance) + return; + if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == DONE) + m_creature->ForcedDespawn(); + else + { + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) + if (pTemp->isAlive()) + pTemp->SetInCombatWithZone(); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) + if (pTemp->isAlive()) + pTemp->SetInCombatWithZone(); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) + if (pTemp->isAlive()) + pTemp->SetInCombatWithZone(); + m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, IN_PROGRESS); + } + } + + void JustDied(Unit* pKiller) + { + if (!m_pInstance) + return; + if (Creature* pTemp0 = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) + if (!pTemp0->isAlive()) + if (Creature* pTemp1 = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) + if (!pTemp1->isAlive()) + if (Creature* pTemp2 = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) + if (!pTemp2->isAlive()) + { + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData(DATA_TOC5_ANNOUNCER)))) + pTemp->SetVisibility(VISIBILITY_ON); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) + pTemp->ForcedDespawn(); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) + pTemp->ForcedDespawn(); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) + pTemp->ForcedDespawn(); + m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, DONE); + } + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (Mortal_Strike_Timer < diff) + { + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_MORTAL_STRIKE : SPELL_MORTAL_STRIKE_H); + Mortal_Strike_Timer = 6000; + }else Mortal_Strike_Timer -= diff; + + if (Rolling_Throw_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_ROLLING_THROW); + Rolling_Throw_Timer = 30000; + }else Rolling_Throw_Timer -= diff; + + if (Bladestorm_Timer < diff) + { + DoCast(m_creature, SPELL_BLADESTORM); + Bladestorm_Timer = 90000; + }else Bladestorm_Timer -= diff; + + if (intercept_check < diff) + { + if (!m_creature->IsWithinDistInMap(m_creature->getVictim(), 8) && m_creature->IsWithinDistInMap(m_creature->getVictim(), 25) && Intercept_Cooldown < diff) + { + DoCast(m_creature->getVictim(), SPELL_INTERCEPT); + Intercept_Cooldown = 15000; + } + intercept_check = 1000; + } + else + { + intercept_check -= diff; + Intercept_Cooldown -= diff; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_toc5_warrior(Creature* pCreature) +{ + return new mob_toc5_warriorAI(pCreature); +} + +// Mage +struct MANGOS_DLL_DECL mob_toc5_mageAI : public ScriptedAI +{ + mob_toc5_mageAI(Creature* pCreature) : ScriptedAI(pCreature) + { + Reset(); + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + + uint32 Fireball_Timer; + uint32 Blast_Wave_Timer; + uint32 Haste_Timer; + uint32 Polymorph_Timer; + + void Reset() + { + m_creature->SetRespawnDelay(999999999); + Fireball_Timer = 0; + Blast_Wave_Timer = 20000; + Haste_Timer = 9000; + Polymorph_Timer = 15000; + } + + void EnterEvadeMode() + { + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) + if (!pTemp->isAlive()) + { + pTemp->Respawn(); + pTemp->SendMonsterMove(738.665771, 661.031433, 412.394623, 4.698702, pTemp->GetMonsterMoveFlags(), 1); + pTemp->GetMap()->CreatureRelocation(pTemp, 738.665771, 661.031433, 412.394623, 4.698702); + } + else + { + pTemp->RemoveArenaAuras(true); + pTemp->SetHealth(pTemp->GetMaxHealth()); + pTemp->SendMonsterMove(738.665771, 661.031433, 412.394623, 4.698702, pTemp->GetMonsterMoveFlags(), 1); + pTemp->GetMap()->CreatureRelocation(pTemp, 738.665771, 661.031433, 412.394623, 4.698702); + } + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) + if (!pTemp->isAlive()) + { + pTemp->Respawn(); + pTemp->SendMonsterMove(746.864441, 660.918762, 411.695465, 4.698700, pTemp->GetMonsterMoveFlags(), 1); + pTemp->GetMap()->CreatureRelocation(pTemp, 746.864441, 660.918762, 411.695465, 4.698700); + } + else + { + pTemp->RemoveArenaAuras(true); + pTemp->SetHealth(pTemp->GetMaxHealth()); + pTemp->SendMonsterMove(746.864441, 660.918762, 411.695465, 4.698700, pTemp->GetMonsterMoveFlags(), 1); + pTemp->GetMap()->CreatureRelocation(pTemp, 746.864441, 660.918762, 411.695465, 4.698700); + } + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) + if (!pTemp->isAlive()) + { + pTemp->Respawn(); + pTemp->SendMonsterMove(754.360779, 660.816162, 412.395996, 4.698700, pTemp->GetMonsterMoveFlags(), 1); + pTemp->GetMap()->CreatureRelocation(pTemp, 754.360779, 660.816162, 412.395996, 4.698700); + } + else + { + pTemp->RemoveArenaAuras(true); + pTemp->SetHealth(pTemp->GetMaxHealth()); + pTemp->SendMonsterMove(754.360779, 660.816162, 412.395996, 4.698700, pTemp->GetMonsterMoveFlags(), 1); + pTemp->GetMap()->CreatureRelocation(pTemp, 754.360779, 660.816162, 412.395996, 4.698700); + } + } + + void Aggro(Unit* pWho) + { + if (!m_pInstance) + return; + if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == DONE) + m_creature->ForcedDespawn(); + else + { + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) + if (pTemp->isAlive()) + pTemp->SetInCombatWithZone(); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) + if (pTemp->isAlive()) + pTemp->SetInCombatWithZone(); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) + if (pTemp->isAlive()) + pTemp->SetInCombatWithZone(); + m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, IN_PROGRESS); + } + } + + void JustDied(Unit* pKiller) + { + if (!m_pInstance) + return; + if (Creature* pTemp0 = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) + if (!pTemp0->isAlive()) + if (Creature* pTemp1 = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) + if (!pTemp1->isAlive()) + if (Creature* pTemp2 = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) + if (!pTemp2->isAlive()) + { + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData(DATA_TOC5_ANNOUNCER)))) + pTemp->SetVisibility(VISIBILITY_ON); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) + pTemp->ForcedDespawn(); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) + pTemp->ForcedDespawn(); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) + pTemp->ForcedDespawn(); + m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, DONE); + } + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (Fireball_Timer < diff) + { + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_FIREBALL : SPELL_FIREBALL_H); + Fireball_Timer = 3000; + }else Fireball_Timer -= diff; + + if (Blast_Wave_Timer < diff) + { + DoCast(m_creature, m_bIsRegularMode ? SPELL_BLAST_WAVE : SPELL_BLAST_WAVE_H); + Blast_Wave_Timer = 20000; + }else Blast_Wave_Timer -= diff; + + if (Haste_Timer < diff) + { + DoCast(m_creature, SPELL_HASTE); + Haste_Timer = 10000; + }else Haste_Timer -= diff; + + if (Polymorph_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1)) + DoCast(target, m_bIsRegularMode ? SPELL_POLYMORPH : SPELL_POLYMORPH_H); + Polymorph_Timer = 15000; + }else Polymorph_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_toc5_mage(Creature* pCreature) +{ + return new mob_toc5_mageAI(pCreature); +} + +// Shaman +struct MANGOS_DLL_DECL mob_toc5_shamanAI : public ScriptedAI +{ + mob_toc5_shamanAI(Creature* pCreature) : ScriptedAI(pCreature) + { + Reset(); + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + + uint32 Chain_Lightning_Timer; + uint32 Earth_Shield_Timer; + uint32 Healing_Wave_Timer; + uint32 Hex_Timer; + + float mob1_health; + float mob2_health; + float mob3_health; + + void Reset() + { + m_creature->SetRespawnDelay(999999999); + Chain_Lightning_Timer = 1000; + Earth_Shield_Timer = 5000; + Healing_Wave_Timer = 13000; + Hex_Timer = 10000; + } + + void EnterEvadeMode() + { + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) + if (!pTemp->isAlive()) + { + pTemp->Respawn(); + pTemp->SendMonsterMove(738.665771, 661.031433, 412.394623, 4.698702, pTemp->GetMonsterMoveFlags(), 1); + pTemp->GetMap()->CreatureRelocation(pTemp, 738.665771, 661.031433, 412.394623, 4.698702); + } + else + { + pTemp->RemoveArenaAuras(true); + pTemp->SetHealth(pTemp->GetMaxHealth()); + pTemp->SendMonsterMove(738.665771, 661.031433, 412.394623, 4.698702, pTemp->GetMonsterMoveFlags(), 1); + pTemp->GetMap()->CreatureRelocation(pTemp, 738.665771, 661.031433, 412.394623, 4.698702); + } + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) + if (!pTemp->isAlive()) + { + pTemp->Respawn(); + pTemp->SendMonsterMove(746.864441, 660.918762, 411.695465, 4.698700, pTemp->GetMonsterMoveFlags(), 1); + pTemp->GetMap()->CreatureRelocation(pTemp, 746.864441, 660.918762, 411.695465, 4.698700); + } + else + { + pTemp->RemoveArenaAuras(true); + pTemp->SetHealth(pTemp->GetMaxHealth()); + pTemp->SendMonsterMove(746.864441, 660.918762, 411.695465, 4.698700, pTemp->GetMonsterMoveFlags(), 1); + pTemp->GetMap()->CreatureRelocation(pTemp, 746.864441, 660.918762, 411.695465, 4.698700); + } + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) + if (!pTemp->isAlive()) + { + pTemp->Respawn(); + pTemp->SendMonsterMove(754.360779, 660.816162, 412.395996, 4.698700, pTemp->GetMonsterMoveFlags(), 1); + pTemp->GetMap()->CreatureRelocation(pTemp, 754.360779, 660.816162, 412.395996, 4.698700); + } + else + { + pTemp->RemoveArenaAuras(true); + pTemp->SetHealth(pTemp->GetMaxHealth()); + pTemp->SendMonsterMove(754.360779, 660.816162, 412.395996, 4.698700, pTemp->GetMonsterMoveFlags(), 1); + pTemp->GetMap()->CreatureRelocation(pTemp, 754.360779, 660.816162, 412.395996, 4.698700); + } + } + + void Aggro(Unit* pWho) + { + if (!m_pInstance) + return; + if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == DONE) + m_creature->ForcedDespawn(); + else + { + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) + if (pTemp->isAlive()) + pTemp->SetInCombatWithZone(); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) + if (pTemp->isAlive()) + pTemp->SetInCombatWithZone(); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) + if (pTemp->isAlive()) + pTemp->SetInCombatWithZone(); + m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, IN_PROGRESS); + } + } + + void JustDied(Unit* pKiller) + { + if (!m_pInstance) + return; + if (Creature* pTemp0 = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) + if (!pTemp0->isAlive()) + if (Creature* pTemp1 = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) + if (!pTemp1->isAlive()) + if (Creature* pTemp2 = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) + if (!pTemp2->isAlive()) + { + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData(DATA_TOC5_ANNOUNCER)))) + pTemp->SetVisibility(VISIBILITY_ON); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) + pTemp->ForcedDespawn(); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) + pTemp->ForcedDespawn(); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) + pTemp->ForcedDespawn(); + m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, DONE); + } + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (Chain_Lightning_Timer < diff) + { + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_CHAIN_LIGHTNING : SPELL_CHAIN_LIGHTNING_H); + Chain_Lightning_Timer = 10000; + }else Chain_Lightning_Timer -= diff; + + if (Hex_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_HEX_OF_MENDING); + Hex_Timer = 20000; + }else Hex_Timer -= diff; + + if (Healing_Wave_Timer < diff) + { + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) + if (pTemp->isAlive()) + mob1_health = pTemp->GetHealth()*100 / pTemp->GetMaxHealth(); + else + mob1_health = 100; + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) + if (pTemp->isAlive()) + mob2_health = pTemp->GetHealth()*100 / pTemp->GetMaxHealth(); + else + mob2_health = 100; + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) + if (pTemp->isAlive()) + mob3_health = pTemp->GetHealth()*100 / pTemp->GetMaxHealth(); + else + mob3_health = 100; + if (mob1_health < mob2_health && mob1_health < mob3_health && mob1_health < 70) + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) + DoCast(pTemp, m_bIsRegularMode ? SPELL_HEALING_WAVE : SPELL_HEALING_WAVE_H); + if (mob1_health > mob2_health && mob2_health < mob3_health && mob2_health < 70) + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) + DoCast(pTemp, m_bIsRegularMode ? SPELL_HEALING_WAVE : SPELL_HEALING_WAVE_H); + if (mob3_health < mob2_health && mob1_health > mob3_health && mob3_health < 70) + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) + DoCast(pTemp, m_bIsRegularMode ? SPELL_HEALING_WAVE : SPELL_HEALING_WAVE_H); + Healing_Wave_Timer = 8000; + }else Healing_Wave_Timer -= diff; + + if (Earth_Shield_Timer < diff) + { + switch(urand(0, 2)) + { + case 0: + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) + if (pTemp->isAlive()) + DoCast(pTemp, SPELL_EARTH_SHIELD); + else + DoCast(m_creature, SPELL_EARTH_SHIELD); + break; + case 1: + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) + if (pTemp->isAlive()) + DoCast(pTemp, SPELL_EARTH_SHIELD); + else + DoCast(m_creature, SPELL_EARTH_SHIELD); + break; + case 2: + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) + if (pTemp->isAlive()) + DoCast(pTemp, SPELL_EARTH_SHIELD); + else + DoCast(m_creature, SPELL_EARTH_SHIELD); + break; + } + Earth_Shield_Timer = 25000; + }else Earth_Shield_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_toc5_shaman(Creature* pCreature) +{ + return new mob_toc5_shamanAI(pCreature); +} + +// Hunter +struct MANGOS_DLL_DECL mob_toc5_hunterAI : public ScriptedAI +{ + mob_toc5_hunterAI(Creature* pCreature) : ScriptedAI(pCreature) + { + Reset(); + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + + uint32 Shoot_Timer; + uint32 Lightning_Arrows_Timer; + uint32 Multi_Shot_Timer; + uint32 Disengage_Cooldown; + uint32 enemy_check; + uint32 disengage_check; + + void Reset() + { + m_creature->SetRespawnDelay(999999999); + Shoot_Timer = 0; + Lightning_Arrows_Timer = 13000; + Multi_Shot_Timer = 10000; + Disengage_Cooldown = 0; + enemy_check = 1000; + disengage_check; + } + + void EnterEvadeMode() + { + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) + if (!pTemp->isAlive()) + { + pTemp->Respawn(); + pTemp->SendMonsterMove(738.665771, 661.031433, 412.394623, 4.698702, pTemp->GetMonsterMoveFlags(), 1); + pTemp->GetMap()->CreatureRelocation(pTemp, 738.665771, 661.031433, 412.394623, 4.698702); + } + else + { + pTemp->RemoveArenaAuras(true); + pTemp->SetHealth(pTemp->GetMaxHealth()); + pTemp->SendMonsterMove(738.665771, 661.031433, 412.394623, 4.698702, pTemp->GetMonsterMoveFlags(), 1); + pTemp->GetMap()->CreatureRelocation(pTemp, 738.665771, 661.031433, 412.394623, 4.698702); + } + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) + if (!pTemp->isAlive()) + { + pTemp->Respawn(); + pTemp->SendMonsterMove(746.864441, 660.918762, 411.695465, 4.698700, pTemp->GetMonsterMoveFlags(), 1); + pTemp->GetMap()->CreatureRelocation(pTemp, 746.864441, 660.918762, 411.695465, 4.698700); + } + else + { + pTemp->RemoveArenaAuras(true); + pTemp->SetHealth(pTemp->GetMaxHealth()); + pTemp->SendMonsterMove(746.864441, 660.918762, 411.695465, 4.698700, pTemp->GetMonsterMoveFlags(), 1); + pTemp->GetMap()->CreatureRelocation(pTemp, 746.864441, 660.918762, 411.695465, 4.698700); + } + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) + if (!pTemp->isAlive()) + { + pTemp->Respawn(); + pTemp->SendMonsterMove(754.360779, 660.816162, 412.395996, 4.698700, pTemp->GetMonsterMoveFlags(), 1); + pTemp->GetMap()->CreatureRelocation(pTemp, 754.360779, 660.816162, 412.395996, 4.698700); + } + else + { + pTemp->RemoveArenaAuras(true); + pTemp->SetHealth(pTemp->GetMaxHealth()); + pTemp->SendMonsterMove(754.360779, 660.816162, 412.395996, 4.698700, pTemp->GetMonsterMoveFlags(), 1); + pTemp->GetMap()->CreatureRelocation(pTemp, 754.360779, 660.816162, 412.395996, 4.698700); + } + } + + void Aggro(Unit* pWho) + { + if (!m_pInstance) + return; + if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == DONE) + m_creature->ForcedDespawn(); + else + { + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) + if (pTemp->isAlive()) + pTemp->SetInCombatWithZone(); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) + if (pTemp->isAlive()) + pTemp->SetInCombatWithZone(); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) + if (pTemp->isAlive()) + pTemp->SetInCombatWithZone(); + m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, IN_PROGRESS); + } + } + + void JustDied(Unit* pKiller) + { + if (!m_pInstance) + return; + if (Creature* pTemp0 = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) + if (!pTemp0->isAlive()) + if (Creature* pTemp1 = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) + if (!pTemp1->isAlive()) + if (Creature* pTemp2 = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) + if (!pTemp2->isAlive()) + { + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData(DATA_TOC5_ANNOUNCER)))) + pTemp->SetVisibility(VISIBILITY_ON); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) + pTemp->ForcedDespawn(); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) + pTemp->ForcedDespawn(); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) + pTemp->ForcedDespawn(); + m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, DONE); + } + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (enemy_check < diff) + { + if (!m_creature->IsWithinDistInMap(m_creature->getVictim(), 8) && m_creature->IsWithinDistInMap(m_creature->getVictim(), 30)) + { + m_creature->SetSpeed(MOVE_RUN, 0.0001); + } + else + { + m_creature->SetSpeed(MOVE_RUN, 1); + } + enemy_check = 100; + }else enemy_check -= diff; + + if (Disengage_Cooldown>0) + Disengage_Cooldown -= diff; + + if (Shoot_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_SHOOT); + Shoot_Timer = 3000; + }else Shoot_Timer -= diff; + + if (Multi_Shot_Timer < diff) + { + m_creature->CastStop(SPELL_SHOOT); + DoCast(m_creature->getVictim(), SPELL_MULTI_SHOT); + Multi_Shot_Timer = 10000; + }else Multi_Shot_Timer -= diff; + + if (Lightning_Arrows_Timer < diff) + { + m_creature->CastStop(SPELL_SHOOT); + DoCast(m_creature, SPELL_LIGHTNING_ARROWS); + Lightning_Arrows_Timer = 25000; + }else Lightning_Arrows_Timer -= diff; + + if (disengage_check < diff) + { + if (m_creature->IsWithinDistInMap(m_creature->getVictim(), 5) && Disengage_Cooldown == 0) + { + DoCast(m_creature, SPELL_DISENGAGE); + Disengage_Cooldown = 15000; + } + disengage_check = 1000; + }else disengage_check -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_toc5_hunter(Creature* pCreature) +{ + return new mob_toc5_hunterAI(pCreature); +} + +// Rogue +struct MANGOS_DLL_DECL mob_toc5_rogueAI : public ScriptedAI +{ + mob_toc5_rogueAI(Creature* pCreature) : ScriptedAI(pCreature) + { + Reset(); + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + + uint32 Eviscerate_Timer; + uint32 FoK_Timer; + uint32 Poison_Timer; + + void Reset() + { + m_creature->SetRespawnDelay(999999999); + Eviscerate_Timer = 15000; + FoK_Timer = 10000; + Poison_Timer = 7000; + } + + void EnterEvadeMode() + { + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) + if (!pTemp->isAlive()) + { + pTemp->Respawn(); + pTemp->SendMonsterMove(738.665771, 661.031433, 412.394623, 4.698702, pTemp->GetMonsterMoveFlags(), 1); + pTemp->GetMap()->CreatureRelocation(pTemp, 738.665771, 661.031433, 412.394623, 4.698702); + } + else + { + pTemp->RemoveArenaAuras(true); + pTemp->SetHealth(pTemp->GetMaxHealth()); + pTemp->SendMonsterMove(738.665771, 661.031433, 412.394623, 4.698702, pTemp->GetMonsterMoveFlags(), 1); + pTemp->GetMap()->CreatureRelocation(pTemp, 738.665771, 661.031433, 412.394623, 4.698702); + } + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) + if (!pTemp->isAlive()) + { + pTemp->Respawn(); + pTemp->SendMonsterMove(746.864441, 660.918762, 411.695465, 4.698700, pTemp->GetMonsterMoveFlags(), 1); + pTemp->GetMap()->CreatureRelocation(pTemp, 746.864441, 660.918762, 411.695465, 4.698700); + } + else + { + pTemp->RemoveArenaAuras(true); + pTemp->SetHealth(pTemp->GetMaxHealth()); + pTemp->SendMonsterMove(746.864441, 660.918762, 411.695465, 4.698700, pTemp->GetMonsterMoveFlags(), 1); + pTemp->GetMap()->CreatureRelocation(pTemp, 746.864441, 660.918762, 411.695465, 4.698700); + } + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) + if (!pTemp->isAlive()) + { + pTemp->Respawn(); + pTemp->SendMonsterMove(754.360779, 660.816162, 412.395996, 4.698700, pTemp->GetMonsterMoveFlags(), 1); + pTemp->GetMap()->CreatureRelocation(pTemp, 754.360779, 660.816162, 412.395996, 4.698700); + } + else + { + pTemp->RemoveArenaAuras(true); + pTemp->SetHealth(pTemp->GetMaxHealth()); + pTemp->SendMonsterMove(754.360779, 660.816162, 412.395996, 4.698700, pTemp->GetMonsterMoveFlags(), 1); + pTemp->GetMap()->CreatureRelocation(pTemp, 754.360779, 660.816162, 412.395996, 4.698700); + } + } + + void Aggro(Unit* pWho) + { + if (!m_pInstance) + return; + if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == DONE) + m_creature->ForcedDespawn(); + else + { + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) + if (pTemp->isAlive()) + pTemp->SetInCombatWithZone(); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) + if (pTemp->isAlive()) + pTemp->SetInCombatWithZone(); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) + if (pTemp->isAlive()) + pTemp->SetInCombatWithZone(); + m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, IN_PROGRESS); + } + } + + void JustDied(Unit* pKiller) + { + if (!m_pInstance) + return; + if (Creature* pTemp0 = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) + if (!pTemp0->isAlive()) + if (Creature* pTemp1 = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) + if (!pTemp1->isAlive()) + if (Creature* pTemp2 = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) + if (!pTemp2->isAlive()) + { + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData(DATA_TOC5_ANNOUNCER)))) + pTemp->SetVisibility(VISIBILITY_ON); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) + pTemp->ForcedDespawn(); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) + pTemp->ForcedDespawn(); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) + pTemp->ForcedDespawn(); + m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, DONE); + } + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (Eviscerate_Timer < diff) + { + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_EVISCERATE : SPELL_EVISCERATE_H); + Eviscerate_Timer = 10000; + }else Eviscerate_Timer -= diff; + + if (FoK_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_FAN_OF_KNIVES); + FoK_Timer = 7000; + }else FoK_Timer -= diff; + + if (Poison_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(m_creature, SPELL_POISON_BOTTLE); + Poison_Timer = 6000; + }else Poison_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_toc5_rogue(Creature* pCreature) +{ + return new mob_toc5_rogueAI(pCreature); +} + +void AddSC_boss_grand_champions() +{ + Script* NewScript; + + NewScript = new Script; + NewScript->Name = "mob_toc5_warrior"; + NewScript->GetAI = &GetAI_mob_toc5_warrior; + NewScript->RegisterSelf(); + + NewScript = new Script; + NewScript->Name = "mob_toc5_mage"; + NewScript->GetAI = &GetAI_mob_toc5_mage; + NewScript->RegisterSelf(); + + NewScript = new Script; + NewScript->Name = "mob_toc5_shaman"; + NewScript->GetAI = &GetAI_mob_toc5_shaman; + NewScript->RegisterSelf(); + + NewScript = new Script; + NewScript->Name = "mob_toc5_hunter"; + NewScript->GetAI = &GetAI_mob_toc5_hunter; + NewScript->RegisterSelf(); + + NewScript = new Script; + NewScript->Name = "mob_toc5_rogue"; + NewScript->GetAI = &GetAI_mob_toc5_rogue; + NewScript->RegisterSelf(); +} \ No newline at end of file diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp new file mode 100644 index 000000000..65360ad09 --- /dev/null +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp @@ -0,0 +1,516 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 +* 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, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +/* ScriptData +SDName: Instance_Trial_Of_the_Champion +SD%Complete: 100 +SDComment: +SDCategory: Trial Of the Champion +EndScriptData */ + +#include "precompiled.h" +#include "trial_of_the_champion.h" + +struct MANGOS_DLL_DECL instance_trial_of_the_champion : public ScriptedInstance +{ + instance_trial_of_the_champion(Map* pMap) : ScriptedInstance(pMap) { Initialize(); } + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string m_strInstData; + + uint64 m_uiJacobGUID; + uint64 m_uiAmbroseGUID; + uint64 m_uiColososGUID; + uint64 m_uiJaelyneGUID; + uint64 m_uiLanaGUID; + uint64 m_uiMokraGUID; + uint64 m_uiEresseaGUID; + uint64 m_uiRunokGUID; + uint64 m_uiZultoreGUID; + uint64 m_uiVisceriGUID; + uint64 m_uiChampionsLootGUID; + uint64 m_uiEadricGUID; + uint64 m_uiEadricLootGUID; + uint64 m_uiPaletressGUID; + uint64 m_uiPaletressLootGUID; + uint64 m_uiBlackKnightGUID; + uint64 m_uiJaerenGUID; + uint64 m_uiArelasGUID; + uint64 m_uiAnnouncerGUID; + uint32 m_uiChampionId1; + uint32 m_uiChampionId2; + uint32 m_uiChampionId3; + uint64 m_uiChampion1; + uint64 m_uiChampion2; + uint64 m_uiChampion3; + uint64 m_uiBlackKnightMinionGUID; + uint64 m_uiArgentChallenger; + uint64 m_uiArgentChallengerID; + uint64 m_uiMemoryGUID; + + void Initialize() + { + m_uiJacobGUID = 0; + m_uiAmbroseGUID = 0; + m_uiColososGUID = 0; + m_uiJaelyneGUID = 0; + m_uiLanaGUID = 0; + m_uiMokraGUID = 0; + m_uiEresseaGUID = 0; + m_uiRunokGUID = 0; + m_uiZultoreGUID = 0; + m_uiVisceriGUID = 0; + m_uiChampionsLootGUID = 0; + m_uiEadricGUID = 0; + m_uiEadricLootGUID = 0; + m_uiPaletressGUID = 0; + m_uiPaletressLootGUID = 0; + m_uiBlackKnightGUID = 0; + m_uiJaerenGUID = 0; + m_uiArelasGUID = 0; + m_uiAnnouncerGUID = 0; + m_uiBlackKnightMinionGUID = 0; + m_uiChampionId1 = 0; + m_uiChampionId2 = 0; + m_uiChampionId3 = 0; + m_uiChampion1 = 0; + m_uiChampion2 = 0; + m_uiChampion3 = 0; + m_uiArgentChallenger = 0; + m_uiMemoryGUID = 0; + m_uiArgentChallengerID = 0; + + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + } + + bool IsEncounterInProgress() const + { + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + return true; + } + + return false; + } + + void OnCreatureCreate(Creature* pCreature) + { + switch(pCreature->GetEntry()) + { + // Champions of the Alliance + case NPC_JACOB: + m_uiJacobGUID = pCreature->GetGUID(); + if (m_uiChampion1 == 0) + m_uiChampion1 = pCreature->GetGUID(); + else + if (m_uiChampion2 == 0) + m_uiChampion2 = pCreature->GetGUID(); + else + if (m_uiChampion3 == 0) + m_uiChampion3 = pCreature->GetGUID(); + break; + case NPC_AMBROSE: + m_uiAmbroseGUID = pCreature->GetGUID(); + if (m_uiChampion1 == 0) + m_uiChampion1 = pCreature->GetGUID(); + else + if (m_uiChampion2 == 0) + m_uiChampion2 = pCreature->GetGUID(); + else + if (m_uiChampion3 == 0) + m_uiChampion3 = pCreature->GetGUID(); + break; + case NPC_COLOSOS: + m_uiColososGUID = pCreature->GetGUID(); + if (m_uiChampion1 == 0) + m_uiChampion1 = pCreature->GetGUID(); + else + if (m_uiChampion2 == 0) + m_uiChampion2 = pCreature->GetGUID(); + else + if (m_uiChampion3 == 0) + m_uiChampion3 = pCreature->GetGUID(); + break; + case NPC_JAELYNE: + m_uiJaelyneGUID = pCreature->GetGUID(); + if (m_uiChampion1 == 0) + m_uiChampion1 = pCreature->GetGUID(); + else + if (m_uiChampion2 == 0) + m_uiChampion2 = pCreature->GetGUID(); + else + if (m_uiChampion3 == 0) + m_uiChampion3 = pCreature->GetGUID(); + break; + case NPC_LANA: + m_uiLanaGUID = pCreature->GetGUID(); + if (m_uiChampion1 == 0) + m_uiChampion1 = pCreature->GetGUID(); + else + if (m_uiChampion2 == 0) + m_uiChampion2 = pCreature->GetGUID(); + else + if (m_uiChampion3 == 0) + m_uiChampion3 = pCreature->GetGUID(); + break; + + // Champions of the Horde + case NPC_MOKRA: + m_uiMokraGUID = pCreature->GetGUID(); + if (m_uiChampion1 == 0) + m_uiChampion1 = pCreature->GetGUID(); + else + if (m_uiChampion2 == 0) + m_uiChampion2 = pCreature->GetGUID(); + else + if (m_uiChampion3 == 0) + m_uiChampion3 = pCreature->GetGUID(); + break; + case NPC_ERESSEA: + m_uiEresseaGUID = pCreature->GetGUID(); + if (m_uiChampion1 == 0) + m_uiChampion1 = pCreature->GetGUID(); + else + if (m_uiChampion2 == 0) + m_uiChampion2 = pCreature->GetGUID(); + else + if (m_uiChampion3 == 0) + m_uiChampion3 = pCreature->GetGUID(); + break; + case NPC_RUNOK: + m_uiRunokGUID = pCreature->GetGUID(); + if (m_uiChampion1 == 0) + m_uiChampion1 = pCreature->GetGUID(); + else + if (m_uiChampion2 == 0) + m_uiChampion2 = pCreature->GetGUID(); + else + if (m_uiChampion3 == 0) + m_uiChampion3 = pCreature->GetGUID(); + break; + case NPC_ZULTORE: + m_uiZultoreGUID = pCreature->GetGUID(); + if (m_uiChampion1 == 0) + m_uiChampion1 = pCreature->GetGUID(); + else + if (m_uiChampion2 == 0) + m_uiChampion2 = pCreature->GetGUID(); + else + if (m_uiChampion3 == 0) + m_uiChampion3 = pCreature->GetGUID(); + break; + case NPC_VISCERI: + m_uiVisceriGUID = pCreature->GetGUID(); + if (m_uiChampion1 == 0) + m_uiChampion1 = pCreature->GetGUID(); + else + if (m_uiChampion2 == 0) + m_uiChampion2 = pCreature->GetGUID(); + else + if (m_uiChampion3 == 0) + m_uiChampion3 = pCreature->GetGUID(); + break; + + // Argent Challenge + case NPC_EADRIC: + m_uiEadricGUID = pCreature->GetGUID(); + m_uiArgentChallenger = pCreature->GetGUID(); + break; + case NPC_PALETRESS: + m_uiPaletressGUID = pCreature->GetGUID(); + m_uiArgentChallenger = pCreature->GetGUID(); + break; + + // Black Knight + case NPC_BLACK_KNIGHT: + m_uiBlackKnightGUID = pCreature->GetGUID(); + break; + case NPC_RISEN_JAEREN: + m_uiBlackKnightMinionGUID = pCreature->GetGUID(); + break; + case NPC_RISEN_ARELAS: + m_uiBlackKnightMinionGUID = pCreature->GetGUID(); + break; + + // Coliseum Announcers + case NPC_JAEREN: + m_uiJaerenGUID = pCreature->GetGUID(); + break; + case NPC_ARELAS: + m_uiArelasGUID = pCreature->GetGUID(); + break; + + // memories + case MEMORY_ALGALON: + m_uiMemoryGUID = pCreature->GetGUID(); + break; + case MEMORY_ARCHIMONDE: + m_uiMemoryGUID = pCreature->GetGUID(); + break; + case MEMORY_CHROMAGGUS: + m_uiMemoryGUID = pCreature->GetGUID(); + break; + case MEMORY_CYANIGOSA: + m_uiMemoryGUID = pCreature->GetGUID(); + break; + case MEMORY_DELRISSA: + m_uiMemoryGUID = pCreature->GetGUID(); + break; + case MEMORY_ECK: + m_uiMemoryGUID = pCreature->GetGUID(); + break; + case MEMORY_ENTROPIUS: + m_uiMemoryGUID = pCreature->GetGUID(); + break; + case MEMORY_GRUUL: + m_uiMemoryGUID = pCreature->GetGUID(); + break; + case MEMORY_HAKKAR: + m_uiMemoryGUID = pCreature->GetGUID(); + break; + case MEMORY_HEIGAN: + m_uiMemoryGUID = pCreature->GetGUID(); + break; + case MEMORY_HEROD: + m_uiMemoryGUID = pCreature->GetGUID(); + break; + case MEMORY_HOGGER: + m_uiMemoryGUID = pCreature->GetGUID(); + break; + case MEMORY_IGNIS: + m_uiMemoryGUID = pCreature->GetGUID(); + break; + case MEMORY_ILLIDAN: + m_uiMemoryGUID = pCreature->GetGUID(); + break; + case MEMORY_INGVAR: + m_uiMemoryGUID = pCreature->GetGUID(); + break; + case MEMORY_KALITHRESH: + m_uiMemoryGUID = pCreature->GetGUID(); + break; + case MEMORY_LUCIFRON: + m_uiMemoryGUID = pCreature->GetGUID(); + break; + case MEMORY_MALCHEZAAR: + m_uiMemoryGUID = pCreature->GetGUID(); + break; + case MEMORY_MUTANUS: + m_uiMemoryGUID = pCreature->GetGUID(); + break; + case MEMORY_ONYXIA: + m_uiMemoryGUID = pCreature->GetGUID(); + break; + case MEMORY_THUNDERAAN: + m_uiMemoryGUID = pCreature->GetGUID(); + break; + case MEMORY_VANCLEEF: + m_uiMemoryGUID = pCreature->GetGUID(); + break; + case MEMORY_VASHJ: + m_uiMemoryGUID = pCreature->GetGUID(); + break; + case MEMORY_VEKNILASH: + m_uiMemoryGUID = pCreature->GetGUID(); + break; + case MEMORY_VEZAX: + m_uiMemoryGUID = pCreature->GetGUID(); + break; + } + } + + void OnObjectCreate(GameObject *pGo) + { + switch(pGo->GetEntry()) + { + case GO_CHAMPIONS_LOOT: + m_uiChampionsLootGUID = pGo->GetGUID(); + break; + case GO_EADRIC_LOOT: + m_uiEadricLootGUID = pGo->GetGUID(); + break; + case GO_PALETRESS_LOOT: + m_uiPaletressLootGUID = pGo->GetGUID(); + break; + case GO_CHAMPIONS_LOOT_H: + m_uiChampionsLootGUID = pGo->GetGUID(); + break; + case GO_EADRIC_LOOT_H: + m_uiEadricLootGUID = pGo->GetGUID(); + break; + case GO_PALETRESS_LOOT_H: + m_uiPaletressLootGUID = pGo->GetGUID(); + break; + } + } + + void SetData(uint32 uiType, uint32 uiData) + { + switch(uiType) + { + case DATA_TOC5_ANNOUNCER: + m_uiAnnouncerGUID = uiData; + break; + case DATA_CHAMPIONID_1: + m_uiChampionId1 = uiData; + break; + case DATA_CHAMPIONID_2: + m_uiChampionId2 = uiData; + break; + case DATA_CHAMPIONID_3: + m_uiChampionId3 = uiData; + break; + case DATA_ARGENT_CHALLENGER: + m_uiArgentChallengerID = uiData; + break; + case DATA_BLACK_KNIGHT_MINION: + m_uiBlackKnightMinionGUID = uiData; + break; + case TYPE_GRAND_CHAMPIONS: + m_auiEncounter[0] = uiData; + if (uiData == DONE) + { + if (GameObject* pChest = instance->GetGameObject(m_uiChampionsLootGUID)) + if (pChest && !pChest->isSpawned()) + pChest->SetRespawnTime(350000000); + } + break; + case TYPE_ARGENT_CHALLENGE: + m_auiEncounter[1] = uiData; + if (uiData == DONE) + { + if (m_uiArgentChallenger == m_uiEadricGUID) + if (GameObject* pChest = instance->GetGameObject(m_uiEadricLootGUID)) + if (pChest && !pChest->isSpawned()) + pChest->SetRespawnTime(350000000); + if (m_uiArgentChallenger == m_uiPaletressGUID) + if (GameObject* pChest = instance->GetGameObject(m_uiPaletressLootGUID)) + if (pChest && !pChest->isSpawned()) + pChest->SetRespawnTime(350000000); + } + break; + case TYPE_BLACK_KNIGHT: + m_auiEncounter[2] = uiData; + break; + } + + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + saveStream << m_auiEncounter[i] << " "; + + m_strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } + } + + uint64 GetData64(uint32 uiData) + { + switch(uiData) + { + case DATA_CHAMPION_1: + return m_uiChampion1; + case DATA_CHAMPION_2: + return m_uiChampion2; + case DATA_CHAMPION_3: + return m_uiChampion3; + case DATA_MEMORY: + return m_uiMemoryGUID; + case DATA_BLACK_KNIGHT: + return m_uiBlackKnightGUID; + } + + return 0; + } + + uint32 GetData(uint32 uiType) + { + switch(uiType) + { + case DATA_CHAMPIONID_1: + return m_uiChampionId1; + case DATA_CHAMPIONID_2: + return m_uiChampionId2; + case DATA_CHAMPIONID_3: + return m_uiChampionId3; + case DATA_ARGENT_CHALLENGER: + return m_uiArgentChallengerID; + case DATA_BLACK_KNIGHT_MINION: + return m_uiBlackKnightMinionGUID; + case DATA_TOC5_ANNOUNCER: + return m_uiAnnouncerGUID; + case DATA_JAEREN: + return m_uiJaerenGUID; + case DATA_ARELAS: + return m_uiArelasGUID; + case TYPE_GRAND_CHAMPIONS: + case TYPE_ARGENT_CHALLENGE: + case TYPE_BLACK_KNIGHT: + return m_auiEncounter[uiType]; + } + + return 0; + } + + const char* Save() + { + return m_strInstData.c_str(); + } + + void Load(const char* strIn) + { + if (!strIn) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(strIn); + + std::istringstream loadStream(strIn); + + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + loadStream >> m_auiEncounter[i]; + + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; + } + + OUT_LOAD_INST_DATA_COMPLETE; + } +}; + +InstanceData* GetInstanceData_instance_trial_of_the_champion(Map* pMap) +{ + return new instance_trial_of_the_champion(pMap); +} + +void AddSC_instance_trial_of_the_champion() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "instance_trial_of_the_champion"; + newscript->GetInstanceData = &GetInstanceData_instance_trial_of_the_champion; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp new file mode 100644 index 000000000..e7261435c --- /dev/null +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp @@ -0,0 +1,267 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Trial Of the Champion +SD%Complete: 80% +SDComment: event script +SDCategory: trial_of_the_champion +EndScriptData */ + +/* ContentData +npc_toc5_announcer +EndContentData */ + +#include "precompiled.h" +#include "trial_of_the_champion.h" + +#define GOSSIP_START_EVENT "Im ready for the next challenge." + +/*###### +## npc_toc5_announcer +######*/ + +struct MANGOS_DLL_DECL npc_toc5_announcerAI : public ScriptedAI +{ + npc_toc5_announcerAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + void Reset() + { + } + + void StartEvent(Player* pPlayer) + { + if (!m_pInstance) + return; + if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == NOT_STARTED) + { + m_pInstance->SetData(DATA_TOC5_ANNOUNCER, m_creature->GetGUID()); + if (m_pInstance->GetData(DATA_TOC5_ANNOUNCER) == m_pInstance->GetData(DATA_ARELAS)) + { + m_pInstance->SetData(DATA_BLACK_KNIGHT_MINION, 35564); + switch(urand(0, 4)) + { + case 0: + m_pInstance->SetData(DATA_CHAMPIONID_1, 35572); + break; + case 1: + m_pInstance->SetData(DATA_CHAMPIONID_1, 35569); + break; + case 2: + m_pInstance->SetData(DATA_CHAMPIONID_1, 35571); + break; + case 3: + m_pInstance->SetData(DATA_CHAMPIONID_1, 35570); + break; + case 4: + m_pInstance->SetData(DATA_CHAMPIONID_1, 35617); + break; + } + do{ + switch(urand(0, 4)) + { + case 0: + m_pInstance->SetData(DATA_CHAMPIONID_2, 35572); + break; + case 1: + m_pInstance->SetData(DATA_CHAMPIONID_2, 35569); + break; + case 2: + m_pInstance->SetData(DATA_CHAMPIONID_2, 35571); + break; + case 3: + m_pInstance->SetData(DATA_CHAMPIONID_2, 35570); + break; + case 4: + m_pInstance->SetData(DATA_CHAMPIONID_2, 35617); + break; + } + } while(m_pInstance->GetData(DATA_CHAMPIONID_1) == m_pInstance->GetData(DATA_CHAMPIONID_2)); + do{ + switch(urand(0, 4)) + { + case 0: + m_pInstance->SetData(DATA_CHAMPIONID_3, 35572); + break; + case 1: + m_pInstance->SetData(DATA_CHAMPIONID_3, 35569); + break; + case 2: + m_pInstance->SetData(DATA_CHAMPIONID_3, 35571); + break; + case 3: + m_pInstance->SetData(DATA_CHAMPIONID_3, 35570); + break; + case 4: + m_pInstance->SetData(DATA_CHAMPIONID_3, 35617); + break; + } + } while(m_pInstance->GetData(DATA_CHAMPIONID_1) == m_pInstance->GetData(DATA_CHAMPIONID_3) || m_pInstance->GetData(DATA_CHAMPIONID_2) == m_pInstance->GetData(DATA_CHAMPIONID_3)); + } + if (m_pInstance->GetData(DATA_TOC5_ANNOUNCER) == m_pInstance->GetData(DATA_JAEREN)) + { + m_pInstance->SetData(DATA_BLACK_KNIGHT_MINION, 123); + switch(urand(0, 4)) + { + case 0: + m_pInstance->SetData(DATA_CHAMPIONID_1, 34705); + break; + case 1: + m_pInstance->SetData(DATA_CHAMPIONID_1, 34702); + break; + case 2: + m_pInstance->SetData(DATA_CHAMPIONID_1, 34701); + break; + case 3: + m_pInstance->SetData(DATA_CHAMPIONID_1, 34657); + break; + case 4: + m_pInstance->SetData(DATA_CHAMPIONID_1, 34703); + break; + } + do{ + switch(urand(0, 4)) + { + case 0: + m_pInstance->SetData(DATA_CHAMPIONID_2, 34705); + break; + case 1: + m_pInstance->SetData(DATA_CHAMPIONID_2, 34702); + break; + case 2: + m_pInstance->SetData(DATA_CHAMPIONID_2, 34701); + break; + case 3: + m_pInstance->SetData(DATA_CHAMPIONID_2, 34657); + break; + case 4: + m_pInstance->SetData(DATA_CHAMPIONID_2, 34703); + break; + } + } while(m_pInstance->GetData(DATA_CHAMPIONID_1) == m_pInstance->GetData(DATA_CHAMPIONID_2)); + do{ + switch(urand(0, 4)) + { + case 0: + m_pInstance->SetData(DATA_CHAMPIONID_3, 34705); + break; + case 1: + m_pInstance->SetData(DATA_CHAMPIONID_3, 34702); + break; + case 2: + m_pInstance->SetData(DATA_CHAMPIONID_3, 34701); + break; + case 3: + m_pInstance->SetData(DATA_CHAMPIONID_3, 34657); + break; + case 4: + m_pInstance->SetData(DATA_CHAMPIONID_3, 34703); + break; + } + } while(m_pInstance->GetData(DATA_CHAMPIONID_1) == m_pInstance->GetData(DATA_CHAMPIONID_3) || m_pInstance->GetData(DATA_CHAMPIONID_2) == m_pInstance->GetData(DATA_CHAMPIONID_3)); + } + m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, FAIL); + } + if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == FAIL) + { + m_creature->SummonCreature(m_pInstance->GetData(DATA_CHAMPIONID_1), 738.665771, 661.031433, 412.394623, 4.698702, TEMPSUMMON_MANUAL_DESPAWN, 0); + m_creature->SummonCreature(m_pInstance->GetData(DATA_CHAMPIONID_2), 746.864441, 660.918762, 411.695465, 4.698700, TEMPSUMMON_MANUAL_DESPAWN, 0); + m_creature->SummonCreature(m_pInstance->GetData(DATA_CHAMPIONID_3), 754.360779, 660.816162, 412.395996, 4.698700, TEMPSUMMON_MANUAL_DESPAWN, 0); + m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, IN_PROGRESS); + } + if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == DONE) + { + if (m_pInstance->GetData(TYPE_ARGENT_CHALLENGE) == NOT_STARTED) + { + switch(urand(0, 1)) + { + case 0: + m_pInstance->SetData(DATA_ARGENT_CHALLENGER, 35119); + break; + case 1: + m_pInstance->SetData(DATA_ARGENT_CHALLENGER, 34928); + break; + } + m_pInstance->SetData(TYPE_ARGENT_CHALLENGE, FAIL); + } + if (m_pInstance->GetData(TYPE_ARGENT_CHALLENGE) == FAIL) + { + m_creature->SummonCreature(m_pInstance->GetData(DATA_ARGENT_CHALLENGER), 746.864441, 660.918762, 411.695465, 4.698700, TEMPSUMMON_MANUAL_DESPAWN, 0); + m_pInstance->SetData(TYPE_ARGENT_CHALLENGE, IN_PROGRESS); + } + if (m_pInstance->GetData(TYPE_ARGENT_CHALLENGE) == DONE) + { + if (m_pInstance->GetData(TYPE_BLACK_KNIGHT) == DONE) + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + else + { + m_creature->SummonCreature(35451, 746.864441, 660.918762, 411.695465, 4.698700, TEMPSUMMON_MANUAL_DESPAWN, 0); + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + } + } + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + + if (!m_pInstance) + return; + } +}; + +CreatureAI* GetAI_npc_toc5_announcer(Creature* pCreature) +{ + return new npc_toc5_announcerAI(pCreature); +} + +bool GossipHello_npc_toc5_announcer(Player* pPlayer, Creature* pCreature) +{ + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_START_EVENT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_toc5_announcer(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + pPlayer->CLOSE_GOSSIP_MENU(); + ((npc_toc5_announcerAI*)pCreature->AI())->StartEvent(pPlayer); + } + + return true; +} + +void AddSC_trial_of_the_champion() +{ + Script* NewScript; + + NewScript = new Script; + NewScript->Name = "npc_toc5_announcer"; + NewScript->GetAI = &GetAI_npc_toc5_announcer; + NewScript->pGossipHello = &GossipHello_npc_toc5_announcer; + NewScript->pGossipSelect = &GossipSelect_npc_toc5_announcer; + NewScript->RegisterSelf(); +} \ No newline at end of file diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h new file mode 100644 index 000000000..0e21691e6 --- /dev/null +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h @@ -0,0 +1,81 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 +* This program is free software licensed under GPL version 2 +* Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_TOC_H +#define DEF_TOC_H + +enum +{ + MAX_ENCOUNTER = 3, + + TYPE_GRAND_CHAMPIONS = 0, + TYPE_ARGENT_CHALLENGE = 1, + TYPE_BLACK_KNIGHT = 2, + + DATA_CHAMPION_1 = 3, + DATA_CHAMPION_2 = 4, + DATA_CHAMPION_3 = 5, + DATA_BLACK_KNIGHT = 6, + DATA_BLACK_KNIGHT_MINION = 7, + DATA_TOC5_ANNOUNCER = 8, + DATA_JAEREN = 9, + DATA_ARELAS = 10, + DATA_CHAMPIONID_1 = 11, + DATA_CHAMPIONID_2 = 12, + DATA_CHAMPIONID_3 = 13, + DATA_MEMORY = 14, + DATA_ARGENT_CHALLENGER = 15, + + NPC_JACOB = 34705, + NPC_AMBROSE = 34702, + NPC_COLOSOS = 34701, + NPC_JAELYNE = 34657, + NPC_LANA = 34703, + NPC_MOKRA = 35572, + NPC_ERESSEA = 35569, + NPC_RUNOK = 35571, + NPC_ZULTORE = 35570, + NPC_VISCERI = 35617, + NPC_EADRIC = 35119, + NPC_PALETRESS = 34928, + NPC_BLACK_KNIGHT = 35451, + NPC_RISEN_JAEREN = 35545, + NPC_RISEN_ARELAS = 35564, + NPC_JAEREN = 35004, + NPC_ARELAS = 35005, + MEMORY_ALGALON = 35052, + MEMORY_ARCHIMONDE = 35041, + MEMORY_CHROMAGGUS = 35033, + MEMORY_CYANIGOSA = 35046, + MEMORY_DELRISSA = 35043, + MEMORY_ECK = 35047, + MEMORY_ENTROPIUS = 35044, + MEMORY_GRUUL = 35039, + MEMORY_HAKKAR = 35034, + MEMORY_HEIGAN = 35049, + MEMORY_HEROD = 35030, + MEMORY_HOGGER = 34942, + MEMORY_IGNIS = 35050, + MEMORY_ILLIDAN = 35042, + MEMORY_INGVAR = 35045, + MEMORY_KALITHRESH = 35037, + MEMORY_LUCIFRON = 35031, + MEMORY_MALCHEZAAR = 35038, + MEMORY_MUTANUS = 35029, + MEMORY_ONYXIA = 35048, + MEMORY_THUNDERAAN = 35032, + MEMORY_VANCLEEF = 35028, + MEMORY_VASHJ = 35040, + MEMORY_VEKNILASH = 35036, + MEMORY_VEZAX = 35051, + + GO_CHAMPIONS_LOOT = 195709, + GO_CHAMPIONS_LOOT_H = 195710, + GO_EADRIC_LOOT = 195374, + GO_EADRIC_LOOT_H = 195375, + GO_PALETRESS_LOOT = 195323, + GO_PALETRESS_LOOT_H = 195324 +}; + +#endif \ No newline at end of file diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_krystallus.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_krystallus.cpp new file mode 100644 index 000000000..b6e46d458 --- /dev/null +++ b/scripts/northrend/ulduar/halls_of_stone/boss_krystallus.cpp @@ -0,0 +1,171 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Krystallus +SD%Complete: 40% +SDComment: Need adding summons and correct casting time(s), add boss texts +SDCategory: Halls of Stone +EndScriptData */ + +#include "precompiled.h" + +enum +{ + SAY_AGGRO = -1712001, + SAY_SLAY_1 = -1712002, + SAY_SLAY_2 = -1712003, + SAY_SLAY_3 = -1712004, + SAY_SLAY_4 = -1712005, + SAY_KILL = -1712006, + SAY_DEATH = -1712007, + SAY_BERSERK = -1712008, + + + SPELL_BOMB_N = 50843, + SPELL_SPIKE_N = 59750, + SPELL_ICE_N = 61546, + SPELL_TOPOT_N = 50868, + + SPELL_BOMB_H = 59742, + SPELL_SPIKE_H = 59750, + SPELL_ICE_H = 61546, + SPELL_TOPOT_H = 59744, + + SPELL_BERSERK = 28747, + BERSERK_TIME_H = 180000, + BERSERK_TIME_N = 300000 + +}; + +/*###### +## boss_krystallus +######*/ + +struct MANGOS_DLL_DECL boss_krystallusAI : public ScriptedAI +{ + boss_krystallusAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + + uint32 m_uiBomb_Timer; + uint32 m_uiSpike_Timer; + uint32 m_uiIce_Timer; + uint32 m_uiTopot_Timer; + uint32 m_uiBerserk_Timer; + + void Reset() + { + m_uiBomb_Timer = urand(10000, 20000); + m_uiSpike_Timer = urand(20000, 30000); + m_uiIce_Timer = urand(25000, 35000); + m_uiTopot_Timer = urand(35000, 45000); + m_uiBerserk_Timer = m_bIsRegularMode ? BERSERK_TIME_N : BERSERK_TIME_H ; + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(SAY_KILL, m_creature); + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; +////////// + if (m_uiBomb_Timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, m_bIsRegularMode ? SPELL_BOMB_N : SPELL_BOMB_H ); + m_uiBomb_Timer = urand(10000, 20000); + DoScriptText(SAY_SLAY_1, m_creature); + } + else + m_uiBomb_Timer -= uiDiff; + +if (m_uiSpike_Timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, m_bIsRegularMode ? SPELL_SPIKE_N : SPELL_SPIKE_H); + m_uiSpike_Timer = urand(20000, 30000); + DoScriptText(SAY_SLAY_3, m_creature); + } + else + m_uiSpike_Timer -= uiDiff; + +if (m_uiIce_Timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, m_bIsRegularMode ? SPELL_ICE_N : SPELL_ICE_H); + DoScriptText(SAY_SLAY_2, m_creature); + m_uiIce_Timer = urand(25000, 35000); + } + else + m_uiIce_Timer -= uiDiff; + +if (m_uiTopot_Timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, m_bIsRegularMode ? SPELL_TOPOT_N : SPELL_TOPOT_H); + m_uiTopot_Timer = urand(20000, 45000); + DoScriptText(SAY_SLAY_4, m_creature); + } + else + m_uiTopot_Timer -= uiDiff; + +if (m_uiBerserk_Timer < uiDiff) + { + DoCast(m_creature, SPELL_BERSERK); + m_uiBerserk_Timer = m_bIsRegularMode ? BERSERK_TIME_N : BERSERK_TIME_H ; + DoScriptText(SAY_BERSERK, m_creature); + } + else + m_uiBerserk_Timer -= uiDiff; +///////////////// + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_krystallus(Creature* pCreature) +{ + return new boss_krystallusAI(pCreature); +} + +void AddSC_boss_krystallus() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_krystallus"; + newscript->GetAI = &GetAI_boss_krystallus; + newscript->RegisterSelf(); +} diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index 58b69c5d2..5272ac6b4 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -248,6 +248,11 @@ extern void AddSC_ungoro_crater(); extern void AddSC_winterspring(); //northrend +extern void AddSC_trial_of_the_champion(); //trial_of_the_champion +extern void AddSC_boss_argent_challenge(); +extern void AddSC_boss_black_knight(); +extern void AddSC_boss_grand_champions(); +extern void AddSC_instance_trial_of_the_champion(); extern void AddSC_boss_jedoga(); //ahnkahet extern void AddSC_boss_nadox(); extern void AddSC_boss_taldaram(); @@ -661,7 +666,12 @@ void AddScripts() AddSC_winterspring(); //northrend - AddSC_boss_jedoga(); //ahnkahet + AddSC_trial_of_the_champion(); //trial_of_the_champion + AddSC_boss_argent_challenge(); + AddSC_boss_black_knight(); + AddSC_boss_grand_champions(); + AddSC_instance_trial_of_the_champion(); + AddSC_boss_jedoga(); //ahnkahet AddSC_boss_nadox(); AddSC_boss_taldaram(); AddSC_boss_volazj(); From 7b1abb61c8b756c3f073ac7e8b5b1777752ad67b Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 24 Dec 2009 18:50:57 +0300 Subject: [PATCH 078/405] Violet hold added --- Makefile.am | 10 + addition/716_the_violet_hold_mangos.sql | 48 +++ .../716_the_violet_hold_scriptdev2_text.sql | 52 +++ .../northrend/violet_hold/boss_cyanigosa.cpp | 169 ++++++++ scripts/northrend/violet_hold/boss_erekem.cpp | 325 ++++++++++++++ .../northrend/violet_hold/boss_ichoron.cpp | 335 +++++++++++++++ .../northrend/violet_hold/boss_lavanthor.cpp | 149 +++++++ scripts/northrend/violet_hold/boss_moragg.cpp | 139 ++++++ scripts/northrend/violet_hold/boss_xevozz.cpp | 276 ++++++++++++ .../northrend/violet_hold/boss_zuramat.cpp | 227 ++++++++++ .../northrend/violet_hold/def_violet_hold.h | 76 ++++ .../violet_hold/instance_violet_hold.cpp | 316 ++++++++++++++ scripts/northrend/violet_hold/violet_hold.cpp | 395 ++++++++++++++++++ system/ScriptLoader.cpp | 20 + 14 files changed, 2537 insertions(+) create mode 100644 addition/716_the_violet_hold_mangos.sql create mode 100644 addition/716_the_violet_hold_scriptdev2_text.sql create mode 100644 scripts/northrend/violet_hold/boss_cyanigosa.cpp create mode 100644 scripts/northrend/violet_hold/boss_erekem.cpp create mode 100644 scripts/northrend/violet_hold/boss_ichoron.cpp create mode 100644 scripts/northrend/violet_hold/boss_lavanthor.cpp create mode 100644 scripts/northrend/violet_hold/boss_moragg.cpp create mode 100644 scripts/northrend/violet_hold/boss_xevozz.cpp create mode 100644 scripts/northrend/violet_hold/boss_zuramat.cpp create mode 100644 scripts/northrend/violet_hold/def_violet_hold.h create mode 100644 scripts/northrend/violet_hold/instance_violet_hold.cpp create mode 100644 scripts/northrend/violet_hold/violet_hold.cpp diff --git a/Makefile.am b/Makefile.am index 5e4b4e4de..06afe64cb 100644 --- a/Makefile.am +++ b/Makefile.am @@ -490,6 +490,16 @@ scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions. scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp \ scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp \ scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h \ +scripts/northrend/violet_hold/def_violet_hold.h \ +scripts/northrend/violet_hold/violet_hold.cpp \ +scripts/northrend/violet_hold/boss_cyanigosa.cpp \ +scripts/northrend/violet_hold/boss_moragg.cpp \ +scripts/northrend/violet_hold/instance_violet_hold.cpp \ +scripts/northrend/violet_hold/boss_erekem.cpp \ +scripts/northrend/violet_hold/boss_xevozz.cpp \ +scripts/northrend/violet_hold/boss_ichoron.cpp \ +scripts/northrend/violet_hold/boss_zuramat.cpp \ +scripts/northrend/violet_hold/boss_lavanthor.cpp \ scripts/world/areatrigger_scripts.cpp \ scripts/world/boss_emeriss.cpp \ scripts/world/boss_lethon.cpp \ diff --git a/addition/716_the_violet_hold_mangos.sql b/addition/716_the_violet_hold_mangos.sql new file mode 100644 index 000000000..f250f7066 --- /dev/null +++ b/addition/716_the_violet_hold_mangos.sql @@ -0,0 +1,48 @@ +/* VIOLET HOLD */ +UPDATE `instance_template` SET `script`='instance_violet_hold' WHERE `map`=608; +UPDATE `creature_template` SET `ScriptName`='npc_sinclari', `npcflag`='1',`minhealth`='403200', `maxhealth`='403200', `attackpower`='1460' WHERE `entry`='30658'; -- 64 +UPDATE `creature_template` SET `ScriptName`='npc_azure_saboteur' WHERE `entry`='31079'; +UPDATE `creature_template` SET `ScriptName`='boss_cyanigosa' WHERE `entry`='31134'; +UPDATE `creature_template` SET `ScriptName`='boss_erekem' WHERE `entry`='29315'; +UPDATE `creature_template` SET `ScriptName`='mob_erekem_guard' WHERE `entry`='29395'; +UPDATE `creature_template` SET `ScriptName`='boss_ichoron' WHERE `entry`='29313'; +UPDATE `creature_template` SET `ScriptName`='mob_ichor_globule',`modelid_A`=5492, `modelid_H`=5492 WHERE `entry`='29321'; +UPDATE `creature_template` SET `modelid_A`=5492, `modelid_H`=5492 WHERE `entry`='31515'; -- heroic +UPDATE `creature_template` SET `ScriptName`='boss_lavanthor' WHERE `entry`='29312'; +UPDATE `creature_template` SET `ScriptName`='boss_moragg' WHERE `entry`='29316'; +UPDATE `creature_template` SET `ScriptName`='boss_xevozz' WHERE `entry`='29266'; +UPDATE `creature_template` SET `ScriptName`='mob_ethereal_sphere' WHERE `entry`='29271'; +UPDATE `creature_template` SET `ScriptName`='boss_zuramat' WHERE `entry`='29314'; +UPDATE `creature_template` SET `ScriptName`='mob_zuramat_sentry' WHERE `entry`='29364'; +UPDATE `creature_template` SET `ScriptName`='npc_violet_portal' WHERE `entry`='31011'; + +# UPDATE `creature_template` SET `npcflag`='1' WHERE `entry`='30659'; + +DELETE FROM `creature` WHERE map = 608 AND `id`='31011'; +DELETE FROM `creature` WHERE map = 608 AND `id`='31134'; -- cyanigosa should not spawn +UPDATE `gameobject_template` SET `flags`=`flags`|4 WHERE `entry` IN (191723,191564,191563,191562,191606,191722,191556,191566,191565); -- door untargetable + +UPDATE `creature_template` SET AIName='EventAI',`ScriptName`='' WHERE `entry` IN ('30660','30695','30666','30668','30667','32191'); +DELETE FROM `creature_ai_scripts` WHERE creature_id IN ('30660','30695','30666','30668','30667','32191'); +INSERT INTO `creature_ai_scripts` VALUES +('3066001', '30660', '0', '0', '100', '1', '5000', '10000', '30000', '32000', '11', '58504', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Agonizing Strike'), +('3066002', '30660', '0', '0', '100', '1', '12000', '15000', '24000', '30000', '11', '58508', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Side Swipe'), +('3069501', '30695', '0', '0', '100', '3', '5000', '10000', '30000', '32000', '11', '58531', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Arcane Missiles'), +('3069502', '30695', '0', '0', '100', '1', '12000', '15000', '24000', '30000', '11', '58534', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Deep Freeze'), +('3069503', '30695', '0', '0', '100', '3', '12000', '15000', '24000', '30000', '11', '58532', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Frostbolt Volley'), +('3069504', '30695', '0', '0', '100', '5', '5000', '10000', '30000', '32000', '11', '61593', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Arcane Missiles'), +('3069505', '30695', '0', '0', '100', '5', '12000', '15000', '24000', '30000', '11', '61594', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Frostbolt Volley'), +('3066601', '30666', '0', '0', '100', '1', '12000', '15000', '24000', '30000', '11', '32736', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Mortal Strike'), +('3066602', '30666', '0', '0', '100', '3', '12000', '15000', '24000', '30000', '11', '41057', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Whirlwind'), +('3066603', '30666', '0', '0', '100', '5', '5000', '10000', '30000', '32000', '11', '41056', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Whirlwind'), +('3066801', '30668', '0', '0', '100', '1', '12000', '15000', '24000', '30000', '11', '60158', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Magic Reflection'), +('3066802', '30668', '0', '0', '100', '1', '12000', '15000', '24000', '30000', '11', '52719', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Concussion Blow'), +('3066701', '30667', '0', '0', '100', '3', '5000', '10000', '30000', '32000', '11', '60181', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Arcane Stream'), +('3066702', '30667', '0', '0', '100', '3', '12000', '15000', '24000', '30000', '11', '60182', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Mana Detonation'), +('3066703', '30667', '0', '0', '100', '5', '5000', '10000', '30000', '32000', '11', '60204', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Arcane Stream'), +('3066704', '30667', '0', '0', '100', '5', '12000', '15000', '24000', '30000', '11', '60205', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Mana Detonation'), +('3219101', '32191', '0', '0', '100', '1', '11000', '11000', '15000', '15000', '11', '58471', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Backstab'), +('3219102', '32191', '0', '0', '100', '1', '10000', '10000', '15000', '15000', '11', '58470', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Tactical Blink'); +DELETE FROM `spell_script_target` WHERE `entry` in (54160,59474); +insert into `spell_script_target` values (54160, 1, 29266); +insert into `spell_script_target` values (59474, 1, 29266); \ No newline at end of file diff --git a/addition/716_the_violet_hold_scriptdev2_text.sql b/addition/716_the_violet_hold_scriptdev2_text.sql new file mode 100644 index 000000000..98d2fae23 --- /dev/null +++ b/addition/716_the_violet_hold_scriptdev2_text.sql @@ -0,0 +1,52 @@ +-- -1 608 000 VIOLET HOLD +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +-- Cyanigosa + (-1608000, 'We finish this now, champions of Kirin Tor!', 13947, 1, 0, 'cyanigosa SAY_AGGRO'), + (-1608001, 'I will end the Kirin Tor!', 13952, 1, 0, 'cyanigosa SAY_SLAY_1'), + (-1608002, 'Dalaran will fall!', 13953, 1, 0, 'cyanigosa SAY_SLAY_2'), + (-1608003, 'So ends your defiance of the Spell-Weaver!', 13954, 1, 0, 'cyanigosa SAY_SLAY_3'), + (-1608004, 'Perhaps... we have... underestimated... you.', 13955, 1, 0, 'cyanigosa SAY_DEATH'), + (-1608005, 'A valiant defense, but this city must be razed. I will fulfill Malygos\'s wishes myself!', 13946, 1, 0, 'cyanigosa SAY_SPAWN'), + (-1608006, 'Am I interrupting?', 13951, 1, 0, 'cyanigosa SAY_DISRUPTION'), + (-1608007, 'Shiver and die!', 13948, 1, 0, 'cyanigosa SAY_BREATH_ATTACK'), + (-1608008, 'The world has forgotten what true magic is! Let this be a reminder!', 13949, 1, 0, 'cyanigosa SAY_SPECIAL_ATTACK_1'), + (-1608009, 'Who among you can withstand my power?', 13950, 1, 0, 'cyanigosa SAY_SPECIAL_ATTACK_2'), +-- Erekem + (-1608010, 'Notcawwget in way ofrrak-rrakflee!', 14219, 1, 0, 'erekem SAY_AGGRO'), + (-1608011, '...', 14222, 1, 0, 'erekem SAY_SLAY_1'), + (-1608012, 'Precious life ... wasted.', 14223, 1, 0, 'erekem SAY_SLAY_2'), + (-1608013, 'Only strong ... survive.', 14224, 1, 0, 'erekem SAY_SLAY_3'), + (-1608014, 'Nokaw, kawflee...', 14225, 1, 0, 'erekem SAY_DEATH'), + (-1608015, 'Free tommfly onw. Ra-aak... Not find usekh-ekh! Escape!', 14218, 1, 0, 'erekem SAY_SPAWN'), + (-1608016, 'My-raaakfavorite! Awk awk awk! Raa-kaa!', 14220, 1, 0, 'erekem SAY_ADD_KILLED'), + (-1608017, 'Nasty little...A-ak, kaw! Kill! Yes, kill you!', 14221, 1, 0, 'erekem SAY_BOTH_ADDS_KILLED'), +-- Ichoron + (-1608018, 'Stand aside, mortals!', 14230, 1, 0, 'ichoron SAY_AGGRO'), + (-1608019, 'I am a force of nature!', 14234, 1, 0, 'ichoron SAY_SLAY_1'), + (-1608020, 'I shall pass!', 14235, 1, 0, 'ichoron SAY_SLAY_2'), + (-1608021, 'You can not stop the tide!', 14236, 1, 0, 'ichoron SAY_SLAY_3'), + (-1608022, 'I... recede.', 14237, 1, 0, 'ichoron SAY_DEATH'), + (-1608023, 'I... am fury... unrestrained!', 14239, 1, 0, 'ichoron SAY_SPAWN'), + (-1608024, 'I shall consume, decimate, devastate, and destroy! Yield now to the wrath of the pounding sea!', 14231, 1, 0, 'ichoron SAY_ENRAGE'), + (-1608025, 'I will not be contained! Ngyah!!', 14233, 1, 0, 'ichoron SAY_SHATTER'), + (-1608026, 'Water can hold any form, take any shape... overcome any obstacle.', 14232, 1, 0, 'ichoron SAY_BUBBLE'), +-- Xevozz + (-1608027, 'It seems my freedom must be bought with blood...', 14499, 1, 0, 'xevozz SAY_AGGRO'), + (-1608028, 'Nothing personal.', 14504, 1, 0, 'xevozz SAY_SLAY_1'), + (-1608029, 'Business concluded.', 14505, 1, 0, 'xevozz SAY_SLAY_2'), + (-1608030, 'Profit!', 14506, 1, 0, 'xevozz SAY_SLAY_3'), + (-1608031, 'This is an... unrecoverable... loss.', 14507, 1, 0, 'xevozz SAY_DEATH'), + (-1608032, 'Back in business! Now to execute an exit strategy.', 14498, 1, 0, 'xevozz SAY_SPAWNED'), + (-1608033, 'It would seem that a renegotiation is in order.', 14503, 1, 0, 'xevozz SAY_CHARGED'), + (-1608034, 'The air teems with latent energy... quite the harvest!', 14501, 1, 0, 'xevozz SAY_REPEAT_SUMMON_1'), + (-1608035, 'Plentiful, exploitable resources... primed for acquisition!', 14502, 1, 0, 'xevozz SAY_REPEAT_SUMMON_2'), + (-1608036, 'Intriguing... a high quantity of arcane energy is near. Time for some prospecting...', 14500, 1, 0, 'xevozz SAY_SUMMON_ENERGY'), +-- Zuramat + (-1608037, 'Eradicate.', 13996, 1, 0, 'zuramat SAY_AGGRO'), + (-1608038, 'More... energy.', 13999, 1, 0, 'zuramat SAY_SLAY_1'), + (-1608039, 'Relinquish.', 14000, 1, 0, 'zuramat SAY_SLAY_2'), + (-1608040, 'Fall... to shadow.', 14001, 1, 0, 'zuramat SAY_SLAY_3'), + (-1608041, 'Disperse.', 14002, 1, 0, 'zuramat SAY_DEATH'), + (-1608042, 'I am... renewed.', 13995, 1, 0, 'zuramat SAY_SPAWN'), + (-1608043, 'Know... my... pain.', 13997, 1, 0, 'zuramat SAY_SHIELD'), + (-1608044, 'Gaze... into the void.', 13998, 1, 0, 'zuramat SAY_WHISPER'); diff --git a/scripts/northrend/violet_hold/boss_cyanigosa.cpp b/scripts/northrend/violet_hold/boss_cyanigosa.cpp new file mode 100644 index 000000000..5edfee165 --- /dev/null +++ b/scripts/northrend/violet_hold/boss_cyanigosa.cpp @@ -0,0 +1,169 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_cyanigosa +SDAuthor: ckegg +SD%Complete: 0 +SDComment: +SDCategory: The Violet Hold +EndScriptData */ + +#include "precompiled.h" +#include "def_violet_hold.h" + +enum +{ + 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, + + SPELL_ARCANE_VACUM = 58694, + SPELL_BLIZZARD = 58693, + SPELL_BLIZZARD_H = 59369, + SPELL_MANA_DESTRUCTION = 59374, + SPELL_TAIL_SWEEP = 58690, + SPELL_TAIL_SWEEP_H = 59283, + SPELL_UNCONTROLLABLE_ENERGY = 58688, + SPELL_UNCONTROLLABLE_ENERGY_H = 59281, + SPELL_CYANIGOSA_TRANSFORM = 58668, +}; + +struct MANGOS_DLL_DECL boss_cyanigosaAI : public ScriptedAI +{ + boss_cyanigosaAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + ScriptedInstance *m_pInstance; + + bool m_bIsRegularMode; + + uint32 m_uiTailSweep_Timer; + uint32 m_uiManaDestruction_Timer; + uint32 m_uiBlizzard_Timer; + uint32 m_uiUncontrollableEnergy_Timer; + uint32 m_uiArcaneVacuum_Timer; + + void Reset() + { + m_uiUncontrollableEnergy_Timer = urand(15000, 16000); + m_uiManaDestruction_Timer = urand(5000, 6000); + m_uiBlizzard_Timer = urand(20000, 25000); + m_uiTailSweep_Timer = urand(10000, 11000); + m_uiArcaneVacuum_Timer = urand(28000, 33000); + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + DoCast(m_creature, SPELL_CYANIGOSA_TRANSFORM); + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiUncontrollableEnergy_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_UNCONTROLLABLE_ENERGY_H : SPELL_UNCONTROLLABLE_ENERGY); + m_uiUncontrollableEnergy_Timer = urand(15000, 16000); + } + else + m_uiUncontrollableEnergy_Timer -= uiDiff; + + if (m_uiManaDestruction_Timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, SPELL_MANA_DESTRUCTION); + m_uiManaDestruction_Timer = urand(8000, 13000); + } + else + m_uiManaDestruction_Timer -= uiDiff; + + if (m_uiBlizzard_Timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, m_bIsRegularMode ? SPELL_BLIZZARD_H : SPELL_BLIZZARD); + m_uiBlizzard_Timer = urand(20000, 25000); + } + else + m_uiBlizzard_Timer -= uiDiff; + + if (m_uiArcaneVacuum_Timer < uiDiff) + { + DoCast(m_creature, SPELL_ARCANE_VACUM); + DoResetThreat(); + m_uiArcaneVacuum_Timer = urand(28000, 33000); + } + else + m_uiArcaneVacuum_Timer -= uiDiff; + + if (m_uiTailSweep_Timer < uiDiff) + { + DoCast(m_creature, m_bIsRegularMode ? SPELL_TAIL_SWEEP_H : SPELL_TAIL_SWEEP); + m_uiTailSweep_Timer = urand(10000, 11000); + } + else + m_uiTailSweep_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_RIFT, DONE); + } + + void KilledUnit(Unit* pVictim) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_SLAY_1, m_creature);break; + case 1: DoScriptText(SAY_SLAY_2, m_creature);break; + case 2: DoScriptText(SAY_SLAY_3, m_creature);break; + } + } +}; + +CreatureAI* GetAI_boss_cyanigosa(Creature* pCreature) +{ + return new boss_cyanigosaAI (pCreature); +} + +void AddSC_boss_cyanigosa() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_cyanigosa"; + newscript->GetAI = &GetAI_boss_cyanigosa; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/violet_hold/boss_erekem.cpp b/scripts/northrend/violet_hold/boss_erekem.cpp new file mode 100644 index 000000000..2e89efb62 --- /dev/null +++ b/scripts/northrend/violet_hold/boss_erekem.cpp @@ -0,0 +1,325 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_erekem +SDAuthor: ckegg +SD%Complete: 0 +SDComment: +SDCategory: The Violet Hold +EndScriptData */ + +#include "precompiled.h" +#include "def_violet_hold.h" + +enum +{ + SAY_AGGRO = -1608010, + SAY_SLAY_1 = -1608011, + SAY_SLAY_2 = -1608012, + SAY_SLAY_3 = -1608013, + SAY_DEATH = -1608014, + SAY_SPAWN = -1608015, + SAY_ADD_KILED = -1608016, + SAY_BOTH_ADDS_KILED = -1608017, + + SPELL_BLOODLUST = 54516, + SPELL_BREAK_BONDS = 59463, + SPELL_CHAIN_HEAL = 54481, + SPELL_CHAIN_HEAL_H = 59473, + SPELL_EARTH_SHIELD = 54479, + SPELL_EARTH_SHIELD_H = 59471, + SPELL_EARTH_SHOCK = 54511, + SPELL_LIGHTNING_BOLT = 53044, + SPELL_STORMSTRIKE = 51876, + + SPELL_GUSHING_WOUND = 39215, + SPELL_HOWLING_SCREECH = 54462, + SPELL_STRIKE = 14516, +}; + +struct MANGOS_DLL_DECL boss_erekemAI : public ScriptedAI +{ + boss_erekemAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + ScriptedInstance *m_pInstance; + + bool m_bIsRegularMode; + bool m_bIsAddDead; + + uint32 m_uiBloodlust_Timer; + uint32 m_uiBreakBonds_Timer; + uint32 m_uiChainHeal_Timer; + uint32 m_uiEarthShield_Timer; + uint32 m_uiEarthShock_Timer; + uint32 m_uiLightningBolt_Timer; + uint32 m_uiStormstrike_Timer; + + void Reset() + { + m_bIsAddDead = false; + m_uiLightningBolt_Timer = 2000; + m_uiEarthShield_Timer = urand(15000, 20000); + m_uiEarthShock_Timer = urand(12000, 17000); + m_uiChainHeal_Timer = urand(5000, 25000); + m_uiBreakBonds_Timer = urand(25000, 30000); + m_uiBloodlust_Timer = urand(60000, 65000); + m_uiStormstrike_Timer = urand(1000, 2000); + + std::list lUnitList; + GetCreatureListWithEntryInGrid(lUnitList, m_creature, NPC_EREKEM_GUARD, 100.0f); + if (!lUnitList.empty()) + for(std::list::iterator iter = lUnitList.begin(); iter != lUnitList.end(); ++iter) + if ((*iter)) + if ((*iter)->isDead()) + (*iter)->Respawn(); + + if (m_pInstance) + m_pInstance->SetData(TYPE_EREKEM, NOT_STARTED); + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_EREKEM, IN_PROGRESS); + } + + void AttackStart(Unit* pWho) + { + if (!m_pInstance) + return; + + if (m_pInstance->GetData(TYPE_EREKEM) != SPECIAL) + return; + + if (!pWho || pWho == m_creature) + return; + + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho, 0.0f); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + DoStartMovement(pWho); + + std::list lUnitList; + GetCreatureListWithEntryInGrid(lUnitList, m_creature, NPC_EREKEM_GUARD, 100.0f); + if (!lUnitList.empty()) + for(std::list::iterator iter = lUnitList.begin(); iter != lUnitList.end(); ++iter) + if (*iter) + if ((*iter)->isAlive()) + { + (*iter)->AddThreat(pWho, 0.0f); + (*iter)->AI()->AttackStart(pWho); + } + } + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiEarthShield_Timer < uiDiff) + { + m_creature->InterruptNonMeleeSpells(false); + DoCast(m_creature, m_bIsRegularMode ? SPELL_EARTH_SHIELD_H : SPELL_EARTH_SHIELD); + m_uiEarthShield_Timer = urand(15000, 20000); + } + else m_uiEarthShield_Timer -= uiDiff; + + if (m_uiEarthShock_Timer < uiDiff) + { + m_creature->InterruptNonMeleeSpells(false); + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, SPELL_EARTH_SHOCK); + m_uiEarthShock_Timer = urand(12000, 17000); + } + else m_uiEarthShock_Timer -= uiDiff; + + if (m_uiChainHeal_Timer < uiDiff) + { + //m_creature->InterruptNonMeleeSpells(false); + DoCast(m_creature, m_bIsRegularMode ? SPELL_CHAIN_HEAL_H : SPELL_CHAIN_HEAL); + m_uiChainHeal_Timer = urand(5000, 25000); + } + else m_uiChainHeal_Timer -= uiDiff; + + if (m_uiBreakBonds_Timer < uiDiff) + { + m_creature->InterruptNonMeleeSpells(false); + DoCast(m_creature, SPELL_BREAK_BONDS); + m_uiBreakBonds_Timer = urand(25000, 30000); + } + else m_uiBreakBonds_Timer -= uiDiff; + + if (!m_bIsAddDead) + { + if (m_uiLightningBolt_Timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, SPELL_LIGHTNING_BOLT); + m_uiLightningBolt_Timer = 2000; + } + else m_uiLightningBolt_Timer -= uiDiff; + } + else + { + if (m_uiStormstrike_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_STORMSTRIKE); + m_uiStormstrike_Timer = 1000; + } + else m_uiStormstrike_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_EREKEM, DONE); + } + + void KilledUnit(Unit* pVictim) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_SLAY_1, m_creature);break; + case 1: DoScriptText(SAY_SLAY_2, m_creature);break; + case 2: DoScriptText(SAY_SLAY_3, m_creature);break; + } + } +}; + +struct MANGOS_DLL_DECL mob_erekem_guardAI : public ScriptedAI +{ + mob_erekem_guardAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + Reset(); + } + ScriptedInstance *m_pInstance; + + uint32 m_uiGushingWound_Timer; + uint32 m_uiHowlingScreech_Timer; + uint32 m_uiStrike_Timer; + + void Reset() + { + m_uiGushingWound_Timer = urand(5000, 10000); + m_uiHowlingScreech_Timer = urand(12000, 15000); + m_uiStrike_Timer = urand(10000, 11000); + } + + void AttackStart(Unit* pWho) + { + if (!m_pInstance) + return; + + if (m_pInstance->GetData(TYPE_EREKEM) != SPECIAL) + return; + + if (!pWho || pWho == m_creature) + return; + + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho, 0.0f); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + DoStartMovement(pWho); + } + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiGushingWound_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_GUSHING_WOUND); + m_uiGushingWound_Timer = urand(30000, 32000); + } + else m_uiGushingWound_Timer -= uiDiff; + + if (m_uiHowlingScreech_Timer < uiDiff) + { + DoCast(m_creature, SPELL_HOWLING_SCREECH); + m_uiHowlingScreech_Timer = urand(24000, 30000); + } + else m_uiHowlingScreech_Timer -= uiDiff; + + if (m_uiStrike_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_STRIKE); + m_uiStrike_Timer = urand(15000, 16000); + } + else m_uiStrike_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } + + void JustDied(Unit* pKiller) + { + if (m_pInstance) + if (Creature* pErekem = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_EREKEM)))) + if (pErekem->isAlive()) + { + DoScriptText(SAY_ADD_KILED, pErekem); + pErekem->InterruptNonMeleeSpells(false); + pErekem->CastSpell(pErekem, SPELL_BLOODLUST, false); + ((boss_erekemAI*)pErekem->AI())->m_bIsAddDead = true; + } + } +}; + +CreatureAI* GetAI_boss_erekem(Creature* pCreature) +{ + return new boss_erekemAI (pCreature); +} + +CreatureAI* GetAI_mob_erekem_guard(Creature* pCreature) +{ + return new mob_erekem_guardAI (pCreature); +} + +void AddSC_boss_erekem() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_erekem"; + newscript->GetAI = &GetAI_boss_erekem; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_erekem_guard"; + newscript->GetAI = &GetAI_mob_erekem_guard; + newscript->RegisterSelf(); +} \ No newline at end of file diff --git a/scripts/northrend/violet_hold/boss_ichoron.cpp b/scripts/northrend/violet_hold/boss_ichoron.cpp new file mode 100644 index 000000000..6085dca42 --- /dev/null +++ b/scripts/northrend/violet_hold/boss_ichoron.cpp @@ -0,0 +1,335 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_ichoron +SDAuthor: ckegg +SD%Complete: 0 +SDComment: +SDCategory: The Violet Hold +EndScriptData */ + +#include "precompiled.h" +#include "def_violet_hold.h" + + +struct Locations +{ + float x, y, z; + uint32 id; +}; + +static Locations PortalLoc[]= +{ + {1857.125, 763.295, 38.654}, + {1925.480, 849.981, 47.174}, + {1892.737, 744.589, 47.666}, + {1878.198, 850.005, 43.333}, + {1909.381, 806.796, 38.645}, + {1936.101, 802.950, 52.417}, +}; + +enum +{ + 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, + + SPELL_DRAINED = 59820, + SPELL_FRENZY = 54312, + SPELL_FRENZY_H = 59522, + SPELL_PROTECTIVE_BUBBLE = 54306, + SPELL_WATER_BLAST = 54237, + SPELL_WATER_BLAST_H = 59520, + SPELL_WATER_BOLT_VOLLEY = 54241, + SPELL_WATER_BOLT_VOLLEY_H = 59521, + + NPC_ICHOR_GLOBULE = 29321, + SPELL_SPLASH = 59516, +}; + +struct MANGOS_DLL_DECL boss_ichoronAI : public ScriptedAI +{ + boss_ichoronAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + ScriptedInstance *m_pInstance; + std::list m_lWaterElementsGUIDList; + + bool m_bIsRegularMode; + bool m_bIsExploded; + bool m_bIsFrenzy; + + uint32 m_uiBuubleChecker_Timer; + uint32 m_uiWaterBoltVolley_Timer; + uint32 m_uiShowup_Counter; + + void Reset() + { + m_bIsExploded = false; + m_bIsFrenzy = false; + m_uiBuubleChecker_Timer = 1000; + m_uiWaterBoltVolley_Timer = urand(10000, 15000); + m_uiShowup_Counter = 0; + + m_creature->SetVisibility(VISIBILITY_ON); + DespawnWaterElements(); + + if (m_pInstance) + m_pInstance->SetData(TYPE_ICHORON, NOT_STARTED); + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_ICHORON, IN_PROGRESS); + } + + void AttackStart(Unit* pWho) + { + if (!m_pInstance) + return; + + if (m_pInstance->GetData(TYPE_ICHORON) != SPECIAL) + return; + + if (!pWho || pWho == m_creature) + return; + + if (m_creature->Attack(pWho, true)) + { + DoCast(m_creature, SPELL_PROTECTIVE_BUBBLE); + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + DoStartMovement(pWho); + } + } + + void WaterElementHit() + { + m_creature->SetHealth(m_creature->GetHealth() + m_creature->GetMaxHealth() * 0.01); + if (m_bIsExploded) + { + DoCast(m_creature, SPELL_PROTECTIVE_BUBBLE); + m_bIsExploded = false; + m_creature->SetVisibility(VISIBILITY_ON); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + } + } + + void JustSummoned(Creature* pSummoned) + { + pSummoned->SetSpeed(MOVE_RUN, 0.2f); + pSummoned->GetMotionMaster()->MoveFollow(m_creature, 0, 0); + m_lWaterElementsGUIDList.push_back(pSummoned->GetGUID()); + } + + void DespawnWaterElements() + { + if (m_lWaterElementsGUIDList.empty()) + return; + + for(std::list::iterator itr = m_lWaterElementsGUIDList.begin(); itr != m_lWaterElementsGUIDList.end(); ++itr) + { + if (Creature* pTemp = (Creature*)Unit::GetUnit(*m_creature, *itr)) + { + if (pTemp->isAlive()) + //pTemp->ForcedDespawn(); + pTemp->DealDamage(pTemp, pTemp->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + } + + m_lWaterElementsGUIDList.clear(); + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (!m_bIsFrenzy) + { + if (m_uiBuubleChecker_Timer < uiDiff) + { + if (!m_bIsExploded) + { + if (!m_creature->HasAura(SPELL_PROTECTIVE_BUBBLE, 0)) + { + DoCast(m_creature, m_bIsRegularMode ? SPELL_WATER_BLAST_H : SPELL_WATER_BLAST); + //DoCast(m_creature, SPELL_DRAINED); + m_bIsExploded = true; + m_uiShowup_Counter = 0; + m_creature->AttackStop(); + m_creature->SetVisibility(VISIBILITY_OFF); + for(uint8 i = 0; i < 10; i++) + { + //int tmp = urand(0, 5); + //m_creature->SummonCreature(NPC_ICHOR_GLOBULE, PortalLoc[tmp].x, PortalLoc[tmp].y, PortalLoc[tmp].z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); + m_creature->SummonCreature(NPC_ICHOR_GLOBULE, m_creature->GetPositionX()-10+rand()%20, m_creature->GetPositionY()-10+rand()%20, m_creature->GetPositionZ(), 0, TEMPSUMMON_CORPSE_DESPAWN, 0); + } + } + m_uiBuubleChecker_Timer = 3000; + } + else + { + bool bIsWaterElementsAlive = false; + ++m_uiShowup_Counter; + if (!m_lWaterElementsGUIDList.empty()) + { + for(std::list::iterator itr = m_lWaterElementsGUIDList.begin(); itr != m_lWaterElementsGUIDList.end(); ++itr) + if (Creature* pTemp = (Creature*)Unit::GetUnit(*m_creature, *itr)) + if (pTemp->isAlive()) + bIsWaterElementsAlive = true; + } + if (!bIsWaterElementsAlive || m_uiShowup_Counter > 20) + { + DoCast(m_creature, SPELL_PROTECTIVE_BUBBLE); + m_bIsExploded = false; + m_uiShowup_Counter = 0; + m_creature->SetVisibility(VISIBILITY_ON); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + } + m_uiBuubleChecker_Timer = 1000; + } + } + else m_uiBuubleChecker_Timer -= uiDiff; + } + + if (!m_bIsExploded) + { + if (m_uiWaterBoltVolley_Timer < uiDiff) + { + DoCast(m_creature, m_bIsRegularMode ? SPELL_WATER_BOLT_VOLLEY_H : SPELL_WATER_BOLT_VOLLEY); + m_uiWaterBoltVolley_Timer = urand(10000, 15000); + } + else m_uiWaterBoltVolley_Timer -= uiDiff; + + if (!m_bIsFrenzy && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 25) + { + DoCast(m_creature, m_bIsRegularMode ? SPELL_FRENZY_H : SPELL_FRENZY); + m_bIsFrenzy = true; + } + + DoMeleeAttackIfReady(); + } + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + DespawnWaterElements(); + + if (m_pInstance) + m_pInstance->SetData(TYPE_ICHORON, DONE); + } + + void KilledUnit(Unit* pVictim) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_SLAY_1, m_creature);break; + case 1: DoScriptText(SAY_SLAY_2, m_creature);break; + case 2: DoScriptText(SAY_SLAY_3, m_creature);break; + } + } +}; + + +struct MANGOS_DLL_DECL mob_ichor_globuleAI : public ScriptedAI +{ + mob_ichor_globuleAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + Reset(); + } + ScriptedInstance *m_pInstance; + + uint32 m_uiRangeCheck_Timer; + + void Reset() + { + m_uiRangeCheck_Timer = 1000; + } + + void AttackStart(Unit* pWho) + { + return; + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_uiRangeCheck_Timer < uiDiff) + { + if (m_pInstance) + { + if (Creature* pIchoron = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_ICHORON)))) + { + float fDistance = m_creature->GetDistance2d(pIchoron); + if (fDistance <= 2) + { + ((boss_ichoronAI*)pIchoron->AI())->WaterElementHit(); + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + } + } + m_uiRangeCheck_Timer = 1000; + } + else m_uiRangeCheck_Timer -= uiDiff; + } + + void JustDied(Unit* pKiller) + { + DoCast(m_creature, SPELL_SPLASH); + } +}; + +CreatureAI* GetAI_boss_ichoron(Creature* pCreature) +{ + return new boss_ichoronAI (pCreature); +} + +CreatureAI* GetAI_mob_ichor_globule(Creature* pCreature) +{ + return new mob_ichor_globuleAI (pCreature); +} + +void AddSC_boss_ichoron() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_ichoron"; + newscript->GetAI = &GetAI_boss_ichoron; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_ichor_globule"; + newscript->GetAI = &GetAI_mob_ichor_globule; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/violet_hold/boss_lavanthor.cpp b/scripts/northrend/violet_hold/boss_lavanthor.cpp new file mode 100644 index 000000000..f9e669e9e --- /dev/null +++ b/scripts/northrend/violet_hold/boss_lavanthor.cpp @@ -0,0 +1,149 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_lavanthor +SDAuthor: ckegg +SD%Complete: 0 +SDComment: +SDCategory: The Violet Hold +EndScriptData */ + +#include "precompiled.h" +#include "def_violet_hold.h" + +enum +{ + SPELL_CAUTERIZING_FLAMES = 59466, + SPELL_FIREBOLT = 54235, + SPELL_FIREBOLT_H = 59468, + SPELL_FLAME_BREATH = 54282, + SPELL_FLAME_BREATH_H = 59469, + SPELL_LAVA_BURN = 54249, + SPELL_LAVA_BURN_H = 59594, +}; + +struct MANGOS_DLL_DECL boss_lavanthorAI : public ScriptedAI +{ + boss_lavanthorAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + ScriptedInstance *m_pInstance; + + bool m_bIsRegularMode; + + uint32 m_uiCauterizingFlames_Timer; + uint32 m_uiFlameBreath_Timer; + uint32 m_uiFirebolt_Timer; + + void Reset() + { + m_uiCauterizingFlames_Timer = urand(40000, 41000); + m_uiFlameBreath_Timer = urand(15000, 16000); + m_uiFirebolt_Timer = urand(10000, 11000); + + if (m_pInstance) + m_pInstance->SetData(TYPE_LAVANTHOR, NOT_STARTED); + } + + void Aggro(Unit* pWho) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_LAVANTHOR, IN_PROGRESS); + } + + void AttackStart(Unit* pWho) + { + if (!m_pInstance) + return; + + if (m_pInstance->GetData(TYPE_LAVANTHOR) != SPECIAL) + return; + + if (!pWho || pWho == m_creature) + return; + + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + DoStartMovement(pWho); + } + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiCauterizingFlames_Timer < uiDiff) + { + DoCast(m_creature, SPELL_CAUTERIZING_FLAMES); + m_uiCauterizingFlames_Timer = urand(40000, 41000); + } + else m_uiCauterizingFlames_Timer -= uiDiff; + + if (m_uiFirebolt_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_FIREBOLT_H : SPELL_FIREBOLT); + m_uiFirebolt_Timer = urand(10000, 11000); + } + else m_uiFirebolt_Timer -= uiDiff; + + if (m_uiFlameBreath_Timer < uiDiff) + { + switch (urand(0, 1)) + { + case 0: + DoCast(m_creature, m_bIsRegularMode ? SPELL_FLAME_BREATH_H : SPELL_FLAME_BREATH); + break; + case 1: + DoCast(m_creature, m_bIsRegularMode ? SPELL_LAVA_BURN_H : SPELL_LAVA_BURN); + break; + } + m_uiFlameBreath_Timer = urand(15000, 16000); + } + else m_uiFlameBreath_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } + + void JustDied(Unit* pKiller) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_LAVANTHOR, DONE); + } +}; + +CreatureAI* GetAI_boss_lavanthor(Creature* pCreature) +{ + return new boss_lavanthorAI (pCreature); +} + +void AddSC_boss_lavanthor() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_lavanthor"; + newscript->GetAI = &GetAI_boss_lavanthor; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/violet_hold/boss_moragg.cpp b/scripts/northrend/violet_hold/boss_moragg.cpp new file mode 100644 index 000000000..9d9816770 --- /dev/null +++ b/scripts/northrend/violet_hold/boss_moragg.cpp @@ -0,0 +1,139 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_moragg +SDAuthor: ckegg +SD%Complete: 0 +SDComment: +SDCategory: The Violet Hold +EndScriptData */ + +#include "precompiled.h" +#include "def_violet_hold.h" + +enum +{ + SPELL_CORROSICE_SALIVA = 54527, + SPELL_OPTIC_LINK = 54396, + SPELL_RAY_PAIN = 59525, + SPELL_RAY_SUFFERING = 54417, +}; + +struct MANGOS_DLL_DECL boss_moraggAI : public ScriptedAI +{ + boss_moraggAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + ScriptedInstance *m_pInstance; + + bool m_bIsRegularMode; + uint32 m_uiCorrosiveSaliva_Timer; + uint32 m_uiOpticLink_Timer; + uint32 m_uiRay_Timer; + + void Reset() + { + m_uiCorrosiveSaliva_Timer = urand(10000, 11000); + m_uiOpticLink_Timer = urand(25000, 30000); + m_uiRay_Timer = urand(2000, 7000); + + if (m_pInstance) + m_pInstance->SetData(TYPE_MORAGG, NOT_STARTED); + } + + void Aggro(Unit* pWho) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_MORAGG, IN_PROGRESS); + } + + void AttackStart(Unit* pWho) + { + if (!m_pInstance) + return; + + if (m_pInstance->GetData(TYPE_MORAGG) != SPECIAL) + return; + + if (!pWho || pWho == m_creature) + return; + + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + DoStartMovement(pWho); + } + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiCorrosiveSaliva_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_CORROSICE_SALIVA); + m_uiCorrosiveSaliva_Timer = urand(10000, 11000); + } + else m_uiCorrosiveSaliva_Timer -= uiDiff; + + if (m_uiOpticLink_Timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, SPELL_OPTIC_LINK); + m_uiOpticLink_Timer = urand(25000, 30000); + } + else m_uiOpticLink_Timer -= uiDiff; + + if (m_uiRay_Timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, urand(0, 1) ? SPELL_RAY_PAIN : SPELL_RAY_SUFFERING); + m_uiRay_Timer = urand(2000, 7000); + } + else m_uiRay_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } + + void JustDied(Unit* pKiller) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_MORAGG, DONE); + } +}; + +CreatureAI* GetAI_boss_moragg(Creature* pCreature) +{ + return new boss_moraggAI (pCreature); +} + +void AddSC_boss_moragg() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_moragg"; + newscript->GetAI = &GetAI_boss_moragg; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/violet_hold/boss_xevozz.cpp b/scripts/northrend/violet_hold/boss_xevozz.cpp new file mode 100644 index 000000000..c9cb5655d --- /dev/null +++ b/scripts/northrend/violet_hold/boss_xevozz.cpp @@ -0,0 +1,276 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_xevozz +SDAuthor: ckegg +SD%Complete: 0 +SDComment: +SDCategory: The Violet Hold +EndScriptData */ + +#include "precompiled.h" +#include "def_violet_hold.h" + +enum +{ + 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, + + 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, + + NPC_ETHEREAL_SPHERE = 29271, + //NPC_ETHEREAL_SPHERE2 = 32582, // heroic only? + SPELL_ARCANE_POWER = 54160, + SPELL_ARCANE_POWER_H = 59474, + SPELL_SUMMON_PLAYERS = 54164, +}; + +struct MANGOS_DLL_DECL boss_xevozzAI : public ScriptedAI +{ + boss_xevozzAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + ScriptedInstance *m_pInstance; + + bool m_bIsRegularMode; + + uint32 m_uiSummonEtherealSphere_Timer; + uint32 m_uiArcaneBarrageVolley_Timer; + uint32 m_uiArcaneBuffet_Timer; + + void Reset() + { + m_uiSummonEtherealSphere_Timer = urand(10000, 12000); + m_uiArcaneBarrageVolley_Timer = urand(20000, 22000); + m_uiArcaneBuffet_Timer = m_uiSummonEtherealSphere_Timer + urand(5000, 6000); + DespawnSphere(); + + if (m_pInstance) + m_pInstance->SetData(TYPE_XEVOZZ, NOT_STARTED); + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_XEVOZZ, IN_PROGRESS); + } + + void AttackStart(Unit* pWho) + { + if (!m_pInstance) + return; + + if (m_pInstance->GetData(TYPE_XEVOZZ) != SPECIAL) + return; + + if (!pWho || pWho == m_creature) + return; + + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + DoStartMovement(pWho); + } + } + + void DespawnSphere() + { + std::list assistList; + GetCreatureListWithEntryInGrid(assistList,m_creature, NPC_ETHEREAL_SPHERE ,150.0f); + + if (assistList.empty()) + return; + + for(std::list::iterator iter = assistList.begin(); iter != assistList.end(); ++iter) + (*iter)->DealDamage((*iter), (*iter)->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + + void JustSummoned(Creature* pSummoned) + { + pSummoned->SetSpeed(MOVE_RUN, 0.5f); + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + { + pSummoned->AddThreat(pTarget); + pSummoned->AI()->AttackStart(pTarget); + } + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiArcaneBarrageVolley_Timer < uiDiff) + { + DoCast(m_creature, m_bIsRegularMode ? SPELL_ARCANE_BARRAGE_VOLLEY_H : SPELL_ARCANE_BARRAGE_VOLLEY); + m_uiArcaneBarrageVolley_Timer = urand(20000, 22000); + } + else m_uiArcaneBarrageVolley_Timer -= uiDiff; + + if (m_uiArcaneBuffet_Timer) + if (m_uiArcaneBuffet_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_ARCANE_BUFFET_H : SPELL_ARCANE_BUFFET); + m_uiArcaneBuffet_Timer = 0; + } + else m_uiArcaneBuffet_Timer -= uiDiff; + + if (m_uiSummonEtherealSphere_Timer < uiDiff) + { + DoScriptText(SAY_SPAWN, m_creature); + DoCast(m_creature, SPELL_SUMMON_ETHEREAL_SPHERE_1); + if (m_bIsRegularMode) // extra one for heroic + m_creature->SummonCreature(NPC_ETHEREAL_SPHERE, m_creature->GetPositionX()-5+rand()%10, m_creature->GetPositionY()-5+rand()%10, m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 40000); + + m_uiSummonEtherealSphere_Timer = urand(45000, 47000); + m_uiArcaneBuffet_Timer = urand(5000, 6000); + } + else m_uiSummonEtherealSphere_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + DespawnSphere(); + + if (m_pInstance) + m_pInstance->SetData(TYPE_XEVOZZ, DONE); + } + + void KilledUnit(Unit* pVictim) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_SLAY_1, m_creature);break; + case 1: DoScriptText(SAY_SLAY_2, m_creature);break; + case 2: DoScriptText(SAY_SLAY_3, m_creature);break; + } + } +}; + +struct MANGOS_DLL_DECL mob_ethereal_sphereAI : public ScriptedAI +{ + mob_ethereal_sphereAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + ScriptedInstance *m_pInstance; + bool m_bIsRegularMode; + + uint32 m_uiSummonPlayers_Timer; + uint32 m_uiRangeCheck_Timer; + + void Reset() + { + m_uiSummonPlayers_Timer = urand(33000, 35000); + m_uiRangeCheck_Timer = 1000; + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiRangeCheck_Timer < uiDiff) + { + if (m_pInstance) + { + if (Creature* pXevozz = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_XEVOZZ)))) + { + float fDistance = m_creature->GetDistance2d(pXevozz); + if (fDistance <= 3) + DoCast(pXevozz, m_bIsRegularMode ? SPELL_ARCANE_POWER_H : SPELL_ARCANE_POWER); + else + DoCast(m_creature, 35845); + } + } + m_uiRangeCheck_Timer = 1000; + } + else m_uiRangeCheck_Timer -= uiDiff; + + if (m_uiSummonPlayers_Timer < uiDiff) + { + DoCast(m_creature, SPELL_SUMMON_PLAYERS); // not working right + + Map* pMap = m_creature->GetMap(); + if (pMap && pMap->IsDungeon()) + { + Map::PlayerList const &PlayerList = pMap->GetPlayers(); + + if (!PlayerList.isEmpty()) + for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) + if (i->getSource()->isAlive()) + DoTeleportPlayer(i->getSource(), m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), i->getSource()->GetOrientation()); + } + + m_uiSummonPlayers_Timer = urand(33000, 35000); + } + else m_uiSummonPlayers_Timer -= uiDiff; + } +}; + +CreatureAI* GetAI_boss_xevozz(Creature* pCreature) +{ + return new boss_xevozzAI (pCreature); +} + +CreatureAI* GetAI_mob_ethereal_sphere(Creature* pCreature) +{ + return new mob_ethereal_sphereAI (pCreature); +} + +void AddSC_boss_xevozz() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_xevozz"; + newscript->GetAI = &GetAI_boss_xevozz; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_ethereal_sphere"; + newscript->GetAI = &GetAI_mob_ethereal_sphere; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/violet_hold/boss_zuramat.cpp b/scripts/northrend/violet_hold/boss_zuramat.cpp new file mode 100644 index 000000000..637eef321 --- /dev/null +++ b/scripts/northrend/violet_hold/boss_zuramat.cpp @@ -0,0 +1,227 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_zuramat +SDAuthor: ckegg +SD%Complete: 0 +SDComment: +SDCategory: The Violet Hold +EndScriptData */ + +#include "precompiled.h" +#include "def_violet_hold.h" + +enum +{ + 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, + + SPELL_SHROUD_OF_DARKNESS = 54524, + SPELL_SHROUD_OF_DARKNESS_H = 59745, + SPELL_SUMMON_VOID_SENTRY = 54369, + SPELL_VOID_SHIFT = 54361, + SPELL_VOID_SHIFT_H = 59743, + + NPC_VOID_SENTRY = 29364, + SPELL_VOID_SENTRY_AURA = 54341, + SPELL_VOID_SENTRY_AURA_H = 54351, + SPELL_SHADOW_BOLT_VOLLEY = 54358, // 54342? 54358? + SPELL_SHADOW_BOLT_VOLLEY_H = 59747, +}; + +struct MANGOS_DLL_DECL boss_zuramatAI : public ScriptedAI +{ + boss_zuramatAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + ScriptedInstance *m_pInstance; + + bool m_bIsRegularMode; + std::list m_lSentryGUIDList; + + uint32 m_uiShroudDarkness_Timer; + uint32 m_uiVoidShift_Timer; + uint32 m_uiSummonVoidSentry_Timer; + + void Reset() + { + m_uiShroudDarkness_Timer = urand(8000, 9000); + m_uiSummonVoidSentry_Timer = urand(5000, 10000); + m_uiVoidShift_Timer = 10000; + + if (m_pInstance) + m_pInstance->SetData(TYPE_ZURAMAT, NOT_STARTED); + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_ZURAMAT, IN_PROGRESS); + } + + void AttackStart(Unit* pWho) + { + if (!m_pInstance) + return; + + if (m_pInstance->GetData(TYPE_ZURAMAT) != SPECIAL) + return; + + if (!pWho || pWho == m_creature) + return; + + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + DoStartMovement(pWho); + } + } + + void JustSummoned(Creature* pSummoned) + { + m_lSentryGUIDList.push_back(pSummoned->GetGUID()); + //pSummoned->AddThreat(m_creature); + //pSummoned->AI()->AttackStart(m_creature); + } + + void DespawnSentry() + { + if (m_lSentryGUIDList.empty()) + return; + + for(std::list::iterator itr = m_lSentryGUIDList.begin(); itr != m_lSentryGUIDList.end(); ++itr) + { + if (Creature* pTemp = (Creature*)Unit::GetUnit(*m_creature, *itr)) + { + if (pTemp->isAlive()) + //pTemp->ForcedDespawn(); + pTemp->DealDamage(pTemp, pTemp->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + } + + m_lSentryGUIDList.clear(); + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiShroudDarkness_Timer < uiDiff) + { + DoCast(m_creature, m_bIsRegularMode ? SPELL_SHROUD_OF_DARKNESS_H : SPELL_SHROUD_OF_DARKNESS); + m_uiShroudDarkness_Timer = urand(7000, 8000); + } + else m_uiShroudDarkness_Timer -= uiDiff; + + if (m_uiVoidShift_Timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, m_bIsRegularMode ? SPELL_VOID_SHIFT_H : SPELL_VOID_SHIFT); + m_uiVoidShift_Timer = urand(10000, 11000); + } + else m_uiVoidShift_Timer -= uiDiff; + + if (m_uiSummonVoidSentry_Timer < uiDiff) + { + m_creature->SummonCreature(NPC_VOID_SENTRY, m_creature->GetPositionX()-10+rand()%20, m_creature->GetPositionY()-10+rand()%20, m_creature->GetPositionZ(), 0, TEMPSUMMON_CORPSE_DESPAWN, 0); + m_uiSummonVoidSentry_Timer = urand(10000, 11000); + } + else m_uiSummonVoidSentry_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + DespawnSentry(); + + if (m_pInstance) + m_pInstance->SetData(TYPE_ZURAMAT, DONE); + } + + void KilledUnit(Unit* pVictim) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_SLAY_1, m_creature);break; + case 1: DoScriptText(SAY_SLAY_2, m_creature);break; + case 2: DoScriptText(SAY_SLAY_3, m_creature);break; + } + } +}; + +struct MANGOS_DLL_DECL mob_zuramat_sentryAI : public ScriptedAI +{ + mob_zuramat_sentryAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + SetCombatMovement(false); + Reset(); + } + ScriptedInstance *m_pInstance; + bool m_bIsRegularMode; + + void Reset() + { + //DoCast(m_creature, m_bIsRegularMode ? SPELL_VOID_SENTRY_AURA_H : SPELL_VOID_SENTRY_AURA); ?? + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + DoCast(m_creature, m_bIsRegularMode ? SPELL_SHADOW_BOLT_VOLLEY_H : SPELL_SHADOW_BOLT_VOLLEY); + } +}; + +CreatureAI* GetAI_boss_zuramat(Creature* pCreature) +{ + return new boss_zuramatAI (pCreature); +} + +CreatureAI* GetAI_mob_zuramat_sentry(Creature* pCreature) +{ + return new mob_zuramat_sentryAI (pCreature); +} + +void AddSC_boss_zuramat() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_zuramat"; + newscript->GetAI = &GetAI_boss_zuramat; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_zuramat_sentry"; + newscript->GetAI = &GetAI_mob_zuramat_sentry; + newscript->RegisterSelf(); + +} diff --git a/scripts/northrend/violet_hold/def_violet_hold.h b/scripts/northrend/violet_hold/def_violet_hold.h new file mode 100644 index 000000000..26e6198ab --- /dev/null +++ b/scripts/northrend/violet_hold/def_violet_hold.h @@ -0,0 +1,76 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_VIOLET_HOLD_H +#define DEF_VIOLET_HOLD_H + +enum +{ + MAX_ENCOUNTER = 2, + + WORLD_STATE_VH = 3816, + //WORLD_STATE_VH_RIFT = 2784, + + TYPE_EREKEM = 11, + TYPE_MORAGG = 12, + TYPE_ICHORON = 13, + TYPE_XEVOZZ = 14, + TYPE_LAVANTHOR = 15, + TYPE_ZURAMAT = 16, + TYPE_CYANIGOSA = 17, + TYPE_RIFT = 18, + TYPE_LASTBOSS = 19, + + DATA_EREKEM = 20, + DATA_MORAGG = 21, + DATA_ICHORON = 22, + DATA_XEVOZZ = 23, + DATA_LAVANTHOR = 24, + DATA_ZURAMAT = 25, + DATA_SINCLARI = 26, + DATA_BOSSTIME = 27, + + DATA_SEAL_DOOR = 30, + DATA_EREKEM_DOOR = 31, + DATA_MORAGG_DOOR = 32, + DATA_ICHORON_DOOR = 33, + DATA_XEVOZZ_DOOR = 34, + DATA_LAVANTHOR_DOOR = 35, + DATA_ZURAMAT_DOOR = 36, + + NPC_EREKEM = 29315, + NPC_EREKEM_GUARD = 29395, + NPC_MORAGG = 29316, + NPC_ICHORON = 29313, + NPC_XEVOZZ = 29266, + NPC_LAVANTHOR = 29312, + NPC_ZURAMAT = 29314, + NPC_CYANIGOSA = 31134, + + NPC_AZURE_SABOTEUR = 31079, + NPC_AZURE_CAPTAIN = 30666, // 3 for 1-11, 4 for 13-17 + NPC_AZURE_RAIDER = 30668, + NPC_AZURE_SORCEROR = 30667, + NPC_AZURE_STALKER = 32191, + NPC_GUARDIAN = 30660, + NPC_KEEPER = 30695, + + NPC_SINCLARI = 30658, + NPC_GUARD = 30659, + NPC_PORTAL = 31011, + + GO_DOOR_SEAL = 191723, + GO_DOOR_EREKEM = 191564, + GO_DOOR_EREKEM_RIGHT = 191563, + GO_DOOR_EREKEM_LEFT = 191562, + GO_DOOR_MORAGG = 191606, + GO_DOOR_ICHORON = 191722, + GO_DOOR_XEVOZZ = 191556, + GO_DOOR_LAVANTHOR = 191566, + GO_DOOR_ZURAMAT = 191565, + + SPELL_PORTAL_CHANNEL = 58012, +}; + +#endif diff --git a/scripts/northrend/violet_hold/instance_violet_hold.cpp b/scripts/northrend/violet_hold/instance_violet_hold.cpp new file mode 100644 index 000000000..e6881f567 --- /dev/null +++ b/scripts/northrend/violet_hold/instance_violet_hold.cpp @@ -0,0 +1,316 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance The Violet Hold +SD%Complete: 0% +SDComment: +SDCategory: The Violet Hold +EndScriptData */ + +#include "precompiled.h" +#include "def_violet_hold.h" + +/* The Violet Hold encounters: +0 Unused +1 Rift +2 Erekem +3 Moragg +4 Ichoron +5 Xevozz +6 Lavanthor +7 Zuramat +*/ +//inline uint32 RandRiftBoss() { return ((rand()%2) ? NPC_GUARDIAN : NPC_KEEPER); } + +struct Locations +{ + float x, y, z; + uint32 id; +}; + +static Locations PortalLoc[]= +{ + {1888.271, 810.781, 38.441}, // 0 center + {1857.125, 763.295, 38.654}, // 1 Lavanthor + {1925.480, 849.981, 47.174}, // 2 Zuramat + {1892.737, 744.589, 47.666}, // 3 Moragg + {1878.198, 850.005, 43.333}, // 4 Portal in front of Erekem + {1909.381, 806.796, 38.645}, // 5 Portal outside of Ichoron + {1936.101, 802.950, 52.417}, // 6 at the highest platform + + {1876.100, 857.079, 43.333}, // 7 Erekem + {1908.863, 785.647, 37.435}, // 8 Ichoron + {1905.364, 840.607, 38.670}, // 9 Xevozz +}; + +struct MANGOS_DLL_DECL instance_violet_hold : public ScriptedInstance +{ + instance_violet_hold(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + + bool bIsInBoss; + + uint8 m_uiLastBossID; + uint8 m_uiRiftPortalCount; + + uint64 m_uiSinclariGUID; + + uint64 m_uiErekemGUID; + uint64 m_uiMoraggGUID; + uint64 m_uiIchoronGUID; + uint64 m_uiXevozzGUID; + uint64 m_uiLavanthorGUID; + uint64 m_uiZuramatGUID; + + uint64 m_uiSealDoorGUID; + uint64 m_uiErekemDoorGUID; + uint64 m_uiErekemDoorLeftGUID; + uint64 m_uiErekemDoorRightGUID; + uint64 m_uiMoraggDoorGUID; + uint64 m_uiIchoronDoorGUID; + uint64 m_uiXevozzDoorGUID; + uint64 m_uiLavanthorDoorGUID; + uint64 m_uiZuramatDoorGUID; + + void Initialize() + { + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + + bIsInBoss = false; + + m_uiLastBossID = 0; + m_uiRiftPortalCount = 0; + + m_uiSinclariGUID = 0; + + m_uiErekemGUID = 0; + m_uiMoraggGUID = 0; + m_uiIchoronGUID = 0; + m_uiXevozzGUID = 0; + m_uiLavanthorGUID = 0; + m_uiZuramatGUID = 0; + + m_uiSealDoorGUID = 0; + m_uiErekemDoorGUID = 0; + m_uiErekemDoorLeftGUID = 0; + m_uiErekemDoorRightGUID = 0; + m_uiMoraggDoorGUID = 0; + m_uiIchoronDoorGUID = 0; + m_uiXevozzDoorGUID = 0; + m_uiLavanthorDoorGUID = 0; + m_uiZuramatDoorGUID = 0; + } + + bool IsEncounterInProgress() const + { + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) + if (m_auiEncounter[i] == IN_PROGRESS) + return true; + + return false; + } + + void OnCreatureCreate(Creature* pCreature) + { + switch(pCreature->GetEntry()) + { + case NPC_SINCLARI: + m_uiSinclariGUID = pCreature->GetGUID(); + break; + case NPC_EREKEM: + m_uiErekemGUID = pCreature->GetGUID(); + break; + case NPC_MORAGG: + m_uiMoraggGUID = pCreature->GetGUID(); + break; + case NPC_ICHORON: + m_uiIchoronGUID = pCreature->GetGUID(); + break; + case NPC_XEVOZZ: + m_uiXevozzGUID = pCreature->GetGUID(); + break; + case NPC_LAVANTHOR: + m_uiLavanthorGUID = pCreature->GetGUID(); + break; + case NPC_ZURAMAT: + m_uiZuramatGUID = pCreature->GetGUID(); + break; + } + } + + void OnObjectCreate(GameObject* pGo) + { + switch(pGo->GetEntry()) + { + case GO_DOOR_SEAL: + m_uiSealDoorGUID = pGo->GetGUID(); + break; + case GO_DOOR_EREKEM: + m_uiErekemDoorGUID = pGo->GetGUID(); + break; + case GO_DOOR_EREKEM_LEFT: + m_uiErekemDoorLeftGUID = pGo->GetGUID(); + break; + case GO_DOOR_EREKEM_RIGHT: + m_uiErekemDoorRightGUID = pGo->GetGUID(); + break; + case GO_DOOR_MORAGG: + m_uiMoraggDoorGUID = pGo->GetGUID(); + break; + case GO_DOOR_ICHORON: + m_uiIchoronDoorGUID = pGo->GetGUID(); + break; + case GO_DOOR_XEVOZZ: + m_uiXevozzDoorGUID = pGo->GetGUID(); + break; + case GO_DOOR_LAVANTHOR: + m_uiLavanthorDoorGUID = pGo->GetGUID(); + break; + case GO_DOOR_ZURAMAT: + m_uiZuramatDoorGUID = pGo->GetGUID(); + break; + } + } + + void SetData(uint32 uiType, uint32 uiData) + { + switch(uiType) + { + case TYPE_EREKEM: + m_auiEncounter[2] = uiData; + break; + case TYPE_MORAGG: + m_auiEncounter[3] = uiData; + break; + case TYPE_ICHORON: + m_auiEncounter[4] = uiData; + break; + case TYPE_XEVOZZ: + m_auiEncounter[5] = uiData; + break; + case TYPE_LAVANTHOR: + m_auiEncounter[6] = uiData; + break; + case TYPE_ZURAMAT: + m_auiEncounter[7] = uiData; + break; + + case TYPE_RIFT: + if (uiData == SPECIAL) + ++m_uiRiftPortalCount; + else if (uiData == IN_PROGRESS) + bIsInBoss = true; + else + DoUseDoorOrButton(m_uiSealDoorGUID); + + m_auiEncounter[1] = uiData; + break; + } + if (uiData == DONE) + bIsInBoss = false; + } + + uint32 GetData(uint32 uiType) + { + switch(uiType) + { + case TYPE_EREKEM: + return m_auiEncounter[2]; + case TYPE_MORAGG: + return m_auiEncounter[3]; + case TYPE_ICHORON: + return m_auiEncounter[4]; + case TYPE_XEVOZZ: + return m_auiEncounter[5]; + case TYPE_LAVANTHOR: + return m_auiEncounter[6]; + case TYPE_ZURAMAT: + return m_auiEncounter[7]; + case TYPE_RIFT: + return m_uiRiftPortalCount; + case TYPE_LASTBOSS: + { + if (!m_uiLastBossID) + m_uiLastBossID = urand(1, 5); + else + { + uint8 uiBossID = urand(1, 5); + if (uiBossID == m_uiLastBossID) + --m_uiLastBossID; + else + m_uiLastBossID = uiBossID; + } + + return m_uiLastBossID; + } + case DATA_BOSSTIME: + return bIsInBoss; + } + return 0; + } + + uint64 GetData64(uint32 uiData) + { + switch(uiData) + { + case DATA_EREKEM: + return m_uiErekemGUID; + case DATA_MORAGG: + return m_uiMoraggGUID; + case DATA_ICHORON: + return m_uiIchoronGUID; + case DATA_XEVOZZ: + return m_uiXevozzGUID; + case DATA_LAVANTHOR: + return m_uiLavanthorGUID; + case DATA_ZURAMAT: + return m_uiZuramatGUID; + case DATA_SINCLARI: + return m_uiSinclariGUID; + case DATA_SEAL_DOOR: + return m_uiSealDoorGUID; + case DATA_EREKEM_DOOR: + return m_uiErekemDoorGUID; + case DATA_MORAGG_DOOR: + return m_uiMoraggDoorGUID; + case DATA_ICHORON_DOOR: + return m_uiIchoronDoorGUID; + case DATA_XEVOZZ_DOOR: + return m_uiXevozzDoorGUID; + case DATA_LAVANTHOR_DOOR: + return m_uiLavanthorDoorGUID; + case DATA_ZURAMAT_DOOR: + return m_uiZuramatDoorGUID; + } + return 0; + } +}; + +InstanceData* GetInstanceData_instance_violet_hold(Map* pMap) +{ + return new instance_violet_hold(pMap); +} + +void AddSC_instance_violet_hold() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "instance_violet_hold"; + newscript->GetInstanceData = &GetInstanceData_instance_violet_hold; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/violet_hold/violet_hold.cpp b/scripts/northrend/violet_hold/violet_hold.cpp new file mode 100644 index 000000000..0fb50e789 --- /dev/null +++ b/scripts/northrend/violet_hold/violet_hold.cpp @@ -0,0 +1,395 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: violet_hold +SDAuthor: ckegg +SD%Complete: 0 +SDComment: +SDCategory: The Violet Hold +EndScriptData */ + +#include "precompiled.h" +#include "def_violet_hold.h" + +struct Locations +{ + float x, y, z; + uint32 id; +}; + +static Locations BossLoc[]= +{ + {1857.125, 763.295, 38.654}, // Lavanthor + {1925.480, 849.981, 47.174}, // Zuramat + {1892.737, 744.589, 47.666}, // Moragg + {1876.100, 857.079, 43.333}, // Erekem + {1908.863, 785.647, 37.435}, // Ichoron + {1905.364, 840.607, 38.670}, // Xevozz +}; + +static Locations PortalLoc[]= +{ + {1888.271, 810.781, 38.441}, // 0 center + {1857.125, 763.295, 38.654}, // 1 Lavanthor + {1925.480, 849.981, 47.174}, // 2 Zuramat + {1892.737, 744.589, 47.666}, // 3 Moragg + {1878.198, 850.005, 43.333}, // 4 Portal in front of Erekem + {1909.381, 806.796, 38.645}, // 5 Portal outside of Ichoron + {1936.101, 802.950, 52.417}, // 6 at the highest platform +}; + +enum +{ + SPELL_SHIELD_DISRUPTION = 58291, +}; + +struct MANGOS_DLL_DECL npc_azure_saboteurAI : public ScriptedAI +{ + npc_azure_saboteurAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + Reset(); + } + ScriptedInstance *m_pInstance; + + bool m_bIsActiving; + + uint32 m_uiDisruption_Timer; + uint32 m_uiDisruptionCounter; + + uint8 m_uiBossID; + uint32 m_uiBossType; + uint64 m_uiBossGUID; + uint64 m_uiDoorGUID; + + void AttackStart(Unit* pWho) + { + return; + } + + void Reset() + { + m_bIsActiving = false; + + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + m_uiDisruptionCounter = 0; + m_uiDisruption_Timer = 1000; + + if (m_pInstance) + { + m_uiBossID = m_pInstance->GetData(TYPE_LASTBOSS); + + switch (m_uiBossID) + { + case 0: // Lavanthor + m_uiBossType = TYPE_LAVANTHOR; + m_uiBossGUID = m_pInstance->GetData64(DATA_LAVANTHOR); + m_uiDoorGUID = m_pInstance->GetData64(DATA_LAVANTHOR_DOOR); + break; + case 1: // Zuramat + m_uiBossType = TYPE_ZURAMAT; + m_uiBossGUID = m_pInstance->GetData64(DATA_ZURAMAT); + m_uiDoorGUID = m_pInstance->GetData64(DATA_ZURAMAT_DOOR); + break; + case 2: // Moragg + m_uiBossType = TYPE_MORAGG; + m_uiBossGUID = m_pInstance->GetData64(DATA_MORAGG); + m_uiDoorGUID = m_pInstance->GetData64(DATA_MORAGG_DOOR); + break; + case 3: // Erekem + m_uiBossType = TYPE_EREKEM; + m_uiBossGUID = m_pInstance->GetData64(DATA_EREKEM); + m_uiDoorGUID = m_pInstance->GetData64(DATA_EREKEM_DOOR); + break; + case 4: // Ichoron + m_uiBossType = TYPE_ICHORON; + m_uiBossGUID = m_pInstance->GetData64(DATA_ICHORON); + m_uiDoorGUID = m_pInstance->GetData64(DATA_ICHORON_DOOR); + break; + case 5: // Xevozz + m_uiBossType = TYPE_XEVOZZ; + m_uiBossGUID = m_pInstance->GetData64(DATA_XEVOZZ); + m_uiDoorGUID = m_pInstance->GetData64(DATA_XEVOZZ_DOOR); + break; + } + m_creature->GetMotionMaster()->MovePoint(0, BossLoc[m_uiBossID].x, BossLoc[m_uiBossID].y, BossLoc[m_uiBossID].z); + } + } + + void MovementInform(uint32 uiType, uint32 uiPointId) + { + if(uiType != POINT_MOTION_TYPE) + return; + + switch(uiPointId) + { + case 0: + m_bIsActiving = true; + break; + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_bIsActiving) + if (m_uiDisruption_Timer < uiDiff) + { + if (m_uiDisruptionCounter < 3) + DoCast(m_creature, SPELL_SHIELD_DISRUPTION); + else if (m_uiDisruptionCounter == 3) + { + m_pInstance->DoUseDoorOrButton(m_uiDoorGUID); + m_pInstance->SetData(m_uiBossType, SPECIAL); + } + else + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + + ++m_uiDisruptionCounter; + m_uiDisruption_Timer = 1000; + } + else m_uiDisruption_Timer -= uiDiff; + } +}; + +struct MANGOS_DLL_DECL npc_sinclariAI : public ScriptedAI +{ + npc_sinclariAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + Reset(); + } + ScriptedInstance *m_pInstance; + + uint8 m_uiRiftPortalCount; + uint32 m_uiNextPortal_Timer; + uint32 m_uiBossCheck_Timer; + + void Reset() + { + m_uiRiftPortalCount = 0; + m_uiNextPortal_Timer = 0; + m_uiBossCheck_Timer = 0; + } + + void SetEvent() + { + m_creature->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE); + m_uiNextPortal_Timer = 5000; + if (m_pInstance) + m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(DATA_SEAL_DOOR)); + } + + void DoSpawnPortal() + { + int tmp = urand(1, 6); + if (Creature* pTemp = m_creature->SummonCreature(NPC_PORTAL, PortalLoc[tmp].x, PortalLoc[tmp].y, PortalLoc[tmp].z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0)) + { + pTemp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + pTemp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + uint32 entry = urand(0, 1) ? NPC_GUARDIAN : NPC_KEEPER; + if (Creature* pSummoned = pTemp->SummonCreature(entry, PortalLoc[tmp].x, PortalLoc[tmp].y, PortalLoc[tmp].z, pTemp->GetOrientation(), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000)) + { + pSummoned->AddThreat(pTemp); + pTemp->CastSpell(pSummoned, SPELL_PORTAL_CHANNEL,false); + } + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_uiNextPortal_Timer) + { + if (m_uiNextPortal_Timer <= uiDiff) + { + ++m_uiRiftPortalCount; + if (m_pInstance) + { + m_pInstance->DoUpdateWorldState(WORLD_STATE_VH, m_uiRiftPortalCount); + m_pInstance->SetData(TYPE_RIFT, SPECIAL); + } + + if (m_uiRiftPortalCount != 6 && m_uiRiftPortalCount != 12 && m_uiRiftPortalCount != 18) + { + DoSpawnPortal(); + if (m_uiRiftPortalCount < 12) + m_uiNextPortal_Timer = 140000; + else + m_uiNextPortal_Timer = 120000; + } + else if (m_uiRiftPortalCount == 6 || m_uiRiftPortalCount == 12) + { + if (Creature* pTemp = m_creature->SummonCreature(NPC_PORTAL, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z, 0, TEMPSUMMON_TIMED_DESPAWN, 1500)) + { + Creature* pSummoned = m_creature->SummonCreature(NPC_AZURE_SABOTEUR, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); + + pSummoned->AddThreat(pTemp); + pTemp->CastSpell(pSummoned, SPELL_PORTAL_CHANNEL, false); + } + m_pInstance->SetData(TYPE_RIFT, IN_PROGRESS); + m_uiBossCheck_Timer = 1000; + m_uiNextPortal_Timer = 0; + } + else if (m_uiRiftPortalCount == 18) + { + m_creature->SummonCreature(NPC_CYANIGOSA, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 180000); + m_pInstance->SetData(TYPE_RIFT, IN_PROGRESS); + m_uiNextPortal_Timer = 0; + } + } + else + m_uiNextPortal_Timer -= uiDiff; + + return; + } + + if (m_uiBossCheck_Timer) + { + if (m_uiBossCheck_Timer <= uiDiff) + { + if (!m_pInstance->GetData(DATA_BOSSTIME)) + m_uiNextPortal_Timer = 30000; + + m_uiBossCheck_Timer = 1000; + } + else + m_uiBossCheck_Timer -= uiDiff; + + return; + } + } +}; + +bool GossipHello_npc_sinclari(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu( pCreature->GetGUID() ); + + pPlayer->ADD_GOSSIP_ITEM( 0, "I am ready.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_sinclari(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch (uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->CLOSE_GOSSIP_MENU(); + ((npc_sinclariAI*)pCreature->AI())->SetEvent(); + break; + } + return true; +} + +struct MANGOS_DLL_DECL npc_violet_portalAI : public ScriptedAI +{ + npc_violet_portalAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + + uint32 TimeRiftWave_Timer; + + void Reset() + { + TimeRiftWave_Timer = 30000; + } + + void UpdateAI(const uint32 diff) + { + if (!m_pInstance) + return; + + if (TimeRiftWave_Timer < diff) + { + uint8 uiSpawnCount = (m_pInstance->GetData(TYPE_RIFT) < 12) ? 3 : 4; + for(uint8 i = 0; i < uiSpawnCount; i++) + { + uint32 uiSpawnEntry = 0; + switch (urand(0, 3)) + { + case 0: uiSpawnEntry = NPC_AZURE_CAPTAIN; break; + case 1: uiSpawnEntry = NPC_AZURE_RAIDER; break; + case 2: uiSpawnEntry = NPC_AZURE_SORCEROR; break; + case 3: uiSpawnEntry = NPC_AZURE_STALKER; break; + } + if (Creature* pTemp = m_creature->SummonCreature(uiSpawnEntry, m_creature->GetPositionX()-5+rand()%10, m_creature->GetPositionY()-5+rand()%10, m_creature->GetPositionZ(), 0, TEMPSUMMON_CORPSE_DESPAWN, 0)) + { + if (Creature* pTarget = GetClosestCreatureWithEntry(m_creature, NPC_SINCLARI, 150.0f)) + { + pTemp->AddThreat(pTarget); + pTemp->AI()->AttackStart(pTarget); + } + } + } + + TimeRiftWave_Timer = 30000; + }else TimeRiftWave_Timer -= diff; + + if (m_creature->IsNonMeleeSpellCasted(false)) + return; + + debug_log("SD2: npc_time_rift: not casting anylonger, i need to die."); + m_creature->setDeathState(JUST_DIED); + } +}; + +CreatureAI* GetAI_npc_sinclari(Creature* pCreature) +{ + return new npc_sinclariAI (pCreature); +} + +CreatureAI* GetAI_npc_azure_saboteur(Creature* pCreature) +{ + return new npc_azure_saboteurAI (pCreature); +} + +CreatureAI* GetAI_npc_violet_portal(Creature* pCreature) +{ + return new npc_violet_portalAI (pCreature); +} + +void AddSC_violet_hold() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_sinclari"; + newscript->GetAI = &GetAI_npc_sinclari; + newscript->pGossipHello = &GossipHello_npc_sinclari; + newscript->pGossipSelect = &GossipSelect_npc_sinclari; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_azure_saboteur"; + newscript->GetAI = &GetAI_npc_azure_saboteur; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_violet_portal"; + newscript->GetAI = &GetAI_npc_violet_portal; + newscript->RegisterSelf(); + +} diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index 5272ac6b4..008fba07c 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -341,6 +341,16 @@ extern void AddSC_sholazar_basin(); extern void AddSC_storm_peaks(); extern void AddSC_zuldrak(); +extern void AddSC_instance_violet_hold(); +extern void AddSC_violet_hold(); +extern void AddSC_boss_cyanigosa(); +extern void AddSC_boss_moragg(); +extern void AddSC_boss_erekem(); +extern void AddSC_boss_xevozz(); +extern void AddSC_boss_ichoron(); +extern void AddSC_boss_zuramat(); +extern void AddSC_boss_lavanthor(); + //outland extern void AddSC_boss_exarch_maladaar(); //auchindoun, auchenai_crypts extern void AddSC_boss_nexusprince_shaffar(); //auchindoun, mana_tombs @@ -759,6 +769,16 @@ void AddScripts() AddSC_storm_peaks(); AddSC_zuldrak(); + AddSC_instance_violet_hold(); + AddSC_boss_cyanigosa(); + AddSC_boss_moragg(); + AddSC_boss_erekem(); + AddSC_boss_xevozz(); + AddSC_boss_ichoron(); + AddSC_boss_zuramat(); + AddSC_boss_lavanthor(); + AddSC_violet_hold(); + //outland AddSC_boss_exarch_maladaar(); //auchindoun, auchenai_crypts AddSC_boss_nexusprince_shaffar(); //auchindoun, mana_tombs From 3bb38d0713afbf519833c9817600dfee55896bed Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 24 Dec 2009 18:52:14 +0300 Subject: [PATCH 079/405] Culling of stratholme added --- Makefile.am | 7 + addition/717_culling_of_stratholme_mangos.sql | 42 + .../717_culling_of_stratholme_scriptdev2.sql | 155 +++ .../culling_of_stratholme/boss_lord_epoch.cpp | 156 +++ .../culling_of_stratholme/boss_malganis.cpp | 304 +++++ .../culling_of_stratholme/boss_meathook.cpp | 110 ++ .../culling_of_stratholme/boss_salramm.cpp | 147 +++ .../culling_of_stratholme.cpp | 1046 +++++++++++++++++ .../def_culling_of_stratholme.h | 16 + .../instance_culling_of_stratholme.cpp | 93 ++ system/ScriptLoader.cpp | 15 +- 11 files changed, 2090 insertions(+), 1 deletion(-) create mode 100644 addition/717_culling_of_stratholme_mangos.sql create mode 100644 addition/717_culling_of_stratholme_scriptdev2.sql create mode 100644 scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_lord_epoch.cpp create mode 100644 scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_malganis.cpp create mode 100644 scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_meathook.cpp create mode 100644 scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_salramm.cpp create mode 100644 scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp create mode 100644 scripts/kalimdor/caverns_of_time/culling_of_stratholme/def_culling_of_stratholme.h create mode 100644 scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp diff --git a/Makefile.am b/Makefile.am index 06afe64cb..2f7a8ceed 100644 --- a/Makefile.am +++ b/Makefile.am @@ -500,6 +500,13 @@ scripts/northrend/violet_hold/boss_xevozz.cpp \ scripts/northrend/violet_hold/boss_ichoron.cpp \ scripts/northrend/violet_hold/boss_zuramat.cpp \ scripts/northrend/violet_hold/boss_lavanthor.cpp \ +scripts/kalimdor/caverns_of_time/culling_of_stratholme/def_culling_of_stratholme.h \ +scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_lord_epoch.cpp \ +scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp \ +scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_malganis.cpp \ +scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_meathook.cpp \ +scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp \ +scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_salramm.cpp \ scripts/world/areatrigger_scripts.cpp \ scripts/world/boss_emeriss.cpp \ scripts/world/boss_lethon.cpp \ diff --git a/addition/717_culling_of_stratholme_mangos.sql b/addition/717_culling_of_stratholme_mangos.sql new file mode 100644 index 000000000..7b8079c7f --- /dev/null +++ b/addition/717_culling_of_stratholme_mangos.sql @@ -0,0 +1,42 @@ +update `creature_template` set `minhealth`='8600', `maxhealth`='8600' where `entry` in (31127, 31126, 28167, 28169); +update `creature_template` set `minhealth`='8600', `maxhealth`='8600' where `entry` in (10002, 10003, 10004, 10005); +update `creature_template` set `faction_A`='35', `faction_H`='35' where `entry` in (31127, 31126, 28167, 28169); +update `creature_template` set `faction_A`='35', `faction_H`='35' where `entry` in (10002, 10003, 10004, 10005); +update `creature_template` set `minhealth`='15000', `maxhealth`='15000' where `entry` in (27737); +update `creature_template` set `minhealth`='25000', `maxhealth`='25000' where `entry` in (31208); + +DELETE FROM `creature` WHERE (`id`=27744); +DELETE FROM `creature` WHERE (`id`=26530); +DELETE FROM `creature` WHERE (`id`=26529); +DELETE FROM `creature` WHERE (`id`=26532); +DELETE FROM `creature` WHERE (`id`=26533); + +update `creature_template` set `npcflag` = '1', `AIName`='', `Scriptname`='npc_arthas' where `entry` in (26499); +update `creature_template` set `AIName`='', `Scriptname`='dark_conversion' where `entry` in (31127, 31126, 28167, 28169); +update `creature_template` set `AIName`='', `Scriptname`='npc_patricia' where `entry` in (31028); +update `creature_template` set `AIName`='', `Scriptname`='npc_time_riftCS' where `entry` in (28409); +update `creature_template` set `AIName`='', `Scriptname`='boss_salramm' where `entry` in (26530); +update `creature_template` set `AIName`='', `Scriptname`='boss_meathook' where `entry` in (26529); +update `creature_template` set `AIName`='', `Scriptname`='boss_lord_epoch' where `entry` in (26532); +update `creature_template` set `AIName`='', `Scriptname`='boss_malganis' where `entry` in (26533); +update `instance_template` set `script` = 'instance_culling_of_stratholme' WHERE map=595; + +update `creature` set `spawntimesecs`='3600' where `id` in (31127, 31126, 28167, 28169); + +DELETE FROM `creature` WHERE (`guid`=4456649); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (4456649, 26499, 595, 1, 0, 0, 1920.87, 1287.12, 142.935, 6.25562, 25, 0, 0, 44100, 7988, 0, 0); + +DELETE FROM `creature` WHERE (`guid`=4456653); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (4456653, 26497, 595, 1, 0, 0, 1895.48, 1292.66, 143.706, 0.023475, 25, 0, 0, 100800, 88140, 0, 0); + +DELETE FROM `gameobject_template` WHERE (`entry`=188686); +INSERT INTO `gameobject_template` (`entry`, `type`, `displayId`, `name`, `castBarCaption`, `faction`, `flags`, `size`, `data0`, `data1`, `data2`, `data3`, `data4`, `data5`, `data6`, `data7`, `data8`, `data9`, `data10`, `data11`, `data12`, `data13`, `data14`, `data15`, `data16`, `data17`, `data18`, `data19`, `data20`, `data21`, `data22`, `data23`, `ScriptName`) VALUES (188686, 0, 7831, 'Doodad_LD_hidden_door_room01', '', 1375, 6553632, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ''); + +DELETE FROM `gameobject_template` WHERE (`entry`=187711); +INSERT INTO `gameobject_template` (`entry`, `type`, `displayId`, `name`, `castBarCaption`, `faction`, `flags`, `size`, `data0`, `data1`, `data2`, `data3`, `data4`, `data5`, `data6`, `data7`, `data8`, `data9`, `data10`, `data11`, `data12`, `data13`, `data14`, `data15`, `data16`, `data17`, `data18`, `data19`, `data20`, `data21`, `data22`, `data23`, `ScriptName`) VALUES (187711, 0, 3631, 'Crusaders\' Square Gate', '', 1375, 6553632, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ''); + +DELETE FROM `gameobject_template` WHERE (`entry`=187723); +INSERT INTO `gameobject_template` (`entry`, `type`, `displayId`, `name`, `castBarCaption`, `faction`, `flags`, `size`, `data0`, `data1`, `data2`, `data3`, `data4`, `data5`, `data6`, `data7`, `data8`, `data9`, `data10`, `data11`, `data12`, `data13`, `data14`, `data15`, `data16`, `data17`, `data18`, `data19`, `data20`, `data21`, `data22`, `data23`, `ScriptName`) VALUES (187723, 0, 3631, 'Crusaders\' Square Gate', '', 1375, 6553632, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ''); + +update `gameobject` set `state` = '1' where `id` in (187711); +update `gameobject` set `spawntimesecs` = '-604800', `state` = '0' where `id` in (190663); \ No newline at end of file diff --git a/addition/717_culling_of_stratholme_scriptdev2.sql b/addition/717_culling_of_stratholme_scriptdev2.sql new file mode 100644 index 000000000..fc2feb777 --- /dev/null +++ b/addition/717_culling_of_stratholme_scriptdev2.sql @@ -0,0 +1,155 @@ +DELETE FROM `script_texts` WHERE `comment` = 26499; +insert into `script_texts` (`entry`,`content_default`,`content_loc8`,`sound`,`type`,`language`,`emote`,`comment`) VALUES +(-1594071, 'g', 'Я рад, что ты пришел! Утер.', 12828,0,0,1, '26499'), +(-1594072, 'g', 'Следи за своим тоном, юноша. Хоть ты и принц, но как паладин ты все еще находишься под моим командыванием.', 12839,0,0,25, '26499'), +(-1594073, 'g', 'Как будто я не помню. Послушай Утер я должен рассказать тебе кое что про чуму.', 12829,0,0,0, '26499'), +(-1594074, 'g', 'О нет... Мы опоздали... Все эти люди заражены чумой. Сейчас это еще не заметно, но скоро все они превратяся в нежить.', 12830,0,0,1, '26499'), +(-1594075, 'g', 'Что?', 12840,0,0,5, '26499'), +(-1594076, 'g', 'Весь город должен быть очищен.', 12831,0,0,1, '26499'), +(-1594077, 'g', 'Как ты мог даже подумать об этом? Должен быть какой то другой путь?', 12841,0,0,1, '26499'), +(-1594078, 'g', 'Проклятие Утер! Как будущий король я приказываю тебе очистить этот город.', 12832,1,0,5, '26499'), +(-1594079, 'g', 'Пока ты еще не король юноша. Но этот приказ я не выполнил бы будь ты хоть трижды королем!', 12842,1,0,22, '26499'), +(-1594080, 'g', 'Тогда я буду расценивать это как измену.', 12833,0,0,0, '26499'), +(-1594081, 'g', 'Измену? Ты совсем лишился рассудка Артас?', 12843,0,0,5, '26499'), +(-1594082, 'g', 'Неужели? Лорд Утер. Властью данной мне по праву наследования, я отстраняю вас от командования, и освобождаю от службы ваших паладинов. ', 12834,0,0,1, '26499'), +(-1594083, 'g', 'Артас? Ты не можешь так просто...', 12837,0,0,1, '26499'), +(-1594084, 'g', 'Это уже сделано! Те из вас кто действительно хочет спасти эту землю за мной, остальные прочь с глаз моих.', 12835,0,0,0, '26499'), +(-1594085, 'g', 'Ты пересек опасную черту, артас.', 12844,0,0,25, '26499'), +(-1594086, 'g', 'Джайна?', 12836,0,0,1, '26499'), +(-1594087, 'g', 'Прости Артас, но я не могу смотреть на это.', 12838,0,0,1, '26499'), +(-1594088, 'g', 'Обустройте позицию тут, а я пока поведу небольшой отряд в стратхольм и начну очищение. Мы должны изолировать и уничтожить зараженных жителей ради всего Лордерона.', 14327,0,0,1, '26499'), +(-1594089, 'g', 'Похоже все готовы! Помните эти люди заражены чумой и скоро умрут. Мы должны очистить Стратхольм и защитить Лордерон от Плети. Вперед.', 14293,0,0,1, '26499'), +(-1594090, 'g', 'Приветствую вас милорд. Чем мы вам можем помочь?', 0,0,0,1, '26499'), +(-1594091, 'g', 'Я могу помочь вам, лишь быстрой смертью.', 14294,0,0,0, '26499'), +(-1594092, 'g', 'Помогите наш принц сошел с ума...', 0,0,0,0, '26499'), +(-1594093, 'g', 'Это только начало..', 14295,0,0,1, '26499'), +(-1594094, 'g', 'Да. Это начало! Я ждал тебя юнный принц. Я Малганус.', 14410,0,0,1, '26499'), +(-1594095, 'g', 'Как видишь твои люди отныне принадлежат мне. Дом за домом я порабощу этот город и огонь жизни угаснет здесь на всегда..',14411,0,0,1, '26499'), +(-1594096, 'g', 'Я не допущу этого Малганис. Лудше эти люди погибнут от моей руки, чем станут твоими рабами после смерти.',14296,0,0,5, '26499'), +(-1594097, 'g', 'Малганис отправит своих прислужников из плети навстречу нам. Опытные воины и маги ступайте и уничтожте врагов. Я возглавлю оставшиеся войска в деле очищения стратхольма от заразы.',14885,0,0,1, '26499'), +(-1594098, 'g', 'Герои поспешите вcтретимся у городской ратуши. Мы должны сразиться с Малганисом на его территории!',14297,0,0,1, '26499'), +(-1594099, 'g', 'Идите за мной я знаю дорогу.',14298,0,0,1, '26499'), +(-1594100, 'g', 'Успокойтесь граждане. Все нормально. Расходитесь по домам... Аааааа... Что это?',0,0,0,1, '26499'), +(-1594101, 'g', 'Помогите...',0,0,0,0, '26499'), +(-1594102, 'g', 'Принц Артас, что вы делаете?',0,0,0,0, '26499'), +(-1594103, 'g', 'Ненадо... Вы же наш принц, вы же защитник Лордерона....',0,0,0,0, '26499'), +(-1594104, 'g', 'Пощады Милорд...',0,0,0,0, '26499'), +(-1594105, 'g', 'Что мы вам сделали?',0,0,0,0, '26499'), +(-1594106, 'g', '<Плач>',9676,0,0,18, '26499'), +(-1594107, 'g', 'Королевские войска напали на нас, спасайся кто может...',0,1,0,0, '26499'), +(-1594108, 'g', 'Что вы наделали? Что здесь происходит?',0,0,0,0, '26499'), +(-1594109, 'g', 'За что?',0,0,0,0, '26499'), +(-1594110, 'g', 'Поиграем?',13428,0,0,0, '26499'), -- Meathook -- +(-1594111, 'g', 'Новые игрушки.',13429,1,0,0, '26499'), +(-1594112, 'g', 'Это... Не... Смешно...',13433,1,0,0, '26499'), +(-1594113, 'g', 'Скучно...',13430,1,0,0, '26499'), +(-1594114, 'g', 'Почему ты не двигаться?',13431,1,0,0, '26499'), +(-1594115, 'g', 'Вставай я не закончил...',13432,1,0,0, '26499'), +(-1594116, 'g', 'Принц Артас Менетил, в этот самый день могущественное зло поглотило твою душу. Смерть которую ты должен был принести другим, сегодня придет за тобой.',13408,0,0,0, '26499'), +(-1594117, 'g', 'Я делаю для Лордерона то, что должен, и никакие слова и поступки меня не остановят.',14309,0,0,5, '26499'), +(-1594118, 'g', 'Ну что ж посмотрим юный принц...',13409,0,0,0, '26499'), +(-1594119, 'g', 'Аааааааа......',13416,0,0,0, '26499'), +(-1594120, 'g', 'У тебя нет будущего...',13413,1,0,0, '26499'), +(-1594121, 'g', 'Пробил час нашего величайшего триумфа..',13414,1,0,0, '26499'), +(-1594122, 'g', 'Тебе было суждено потерпеть поражение...',13415,1,0,0, '26499'), +(-1594123, 'g', 'Тик - так... Тик - так...',13410,1,0,0, '26499'), +(-1594124, 'g', 'Слишком медленно...',13411,1,0,0, '26499'), +(-1594125, 'g', 'Пора заканчивать...',13412,1,0,0, '26499'), +(-1594126, 'g', 'Не трогайте меня...',0,1,0,0, '26499'), +(-1594127, 'g', 'Вы чудовище, а не Принц...',0,1,0,0, '26499'), +(-1594128, 'g', 'Бежим.....',0,1,0,0, '26499'), +(-1594129, 'g', 'Cлишком поздно герои Лордерона! Пришло время мертвых...',0,1,0,0, '26499'), +(-1594130, 'g', 'Аааааа развлечемся....',0,1,0,0, '26499'), +(-1594131, 'g', 'Вы всего лишь часть плана хозяина...',0,1,0,0, '26499'), +(-1594132, 'g', 'Веселье только начинается!',0,1,0,0, '26499'), +(-1594133, 'g', 'Аааа качественный материал...',0,1,0,0, '26499'), +(-1594134, 'g', 'Не волнуйся я найду куда тебя приспособить...',0,1,0,0, '26499'), +(-1594135, 'g', 'Мне нужен образец!',0,1,0,0, '26499'), +(-1594136, 'g', 'Столько силы... Она будет моей....',0,1,0,0, '26499'), +(-1594137, 'g', 'Твоя плоть придает тебя!',0,1,0,0, '26499'), +(-1594138, 'g', 'Познакомтесь с моими друзьями...',0,1,0,0, '26499'), +(-1594139, 'g', 'Жители Стратхольма встречайте ваших спасителей...',0,1,0,0, '26499'), +(-1594140, 'g', 'Бум... Ха-ха-ха-ха...',0,1,0,0, '26499'), +(-1594141, 'g', 'Кровь... Разрушение... Восхитительно...',0,1,0,0, '26499'), +(-1594142, 'g', 'Да! Я рад, что я смог добраться сюда раньше чумы!',14299,0,0,1, '26499'), +(-1594143, 'g', 'Что это за магия?',14300,0,0,0, '26499'), +(-1594144, 'g', 'Кажется, что у Малганиса в распорежении есть еще кое что кроме Плети. Давайте поспешим.',14301,0,0,0, '26499'), +(-1594145, 'g', 'Снова черная магия будьте готовы ко всему.',14302,0,0,0, '26499'), +(-1594146, 'g', 'Идем дальше.',14303,0,0,0, '26499'), +(-1594147, 'g', 'Будьте начеку наc окружили...',14304,0,0,0, '26499'), +(-1594148, 'g', 'Малганис не собирается облегчить нам жизнь...',14305,0,0,0, '26499'), +(-1594149, 'g', 'Они упрямы.',14306,0,0,0, '26499'), +(-1594150, 'g', 'Что еще он поставит у меня на пути?',14307,0,0,0, '26499'), +(-1594151, 'g', 'Кратчайший путь к Малганису находится за тем Шкафом.',14308,0,0,0, '26499'), +(-1594152, 'g', 'Это займет совсем не много времени.',14310,0,0,0, '26499'), +(-1594153, 'g', 'Слава свету, что потайной ход еще работает!',14311,0,0,0, '26499'), +(-1594154, 'g', 'Давайте пройдем этот участок как можно быстрее. Если мы не погибнем от нежити, то можем погибнуть от этого огня.',14312,0,0,0, '26499'), +(-1594155, 'g', 'Отдышитесь немного, но имейте ввиду нам скоро снова в путь.',14313,0,0,0, '26499'), +(-1594156, 'g', 'Отдых окончен надо идти, Малганис ждет.',14314,0,0,0, '26499'), +(-1594157, 'g', 'Наконец нам хоть как то повезло! Огонь еще не добрался до торгового ряда. Малганис должен быть на площади рыцарей, которая находится не далеко от сюда. Скажите мне как будете готовы идти дальше.',14315,0,0,0, '26499'), +(-1594158, 'g', 'Да свершится правосудие.',14316,0,0,0, '26499'), +(-1594159, 'g', 'Это будет достойное испытание Принц артас!',14413,1,0,0, '26499'), +(-1594160, 'g', 'Слишком просто...',14416,1,0,0, '26499'), +(-1594161, 'g', 'Темный повелитель не доволен твоим вмешательством...',144107,1,0,0, '26499'), +(-1594162, 'g', 'Мне нужен Принц Артас, а не ты...',14418,1,0,0, '26499'), +(-1594163, 'g', 'Анак Кири...',14422,1,0,0, '26499'), +(-1594164, 'g', 'Мой натиск сметет силы короля - лича...',14423,1,0,0, '26499'), +(-1594165, 'g', 'Твоя смерть была напрасна насекомое...',14424,1,0,0, '26499'), +(-1594166, 'g', 'Твое время вышло...',14425,1,0,0, '26499'), +(-1594167, 'g', 'Аррррхххх... Я и так провел слишком много времени в этой слабой оболочке...',14426,1,0,0, '26499'), +(-1594168, 'g', 'Ирл Нарат... Я малганис.... Я вечен...',14427,1,0,0, '26499'), +(-1594169, 'g', 'Тебе никогда не победить короля - лича без моих войск! Я отомщу и тебе и ему...',14429,1,0,0, '26499'), +(-1594170, 'g', 'Мы покончим с этим сейчас же Малганис. Один на один...',14317,0,0,0, '26499'), +(-1594171, 'g', 'Твое путешествие начинается юный принц. Собирай свои войска и отправляйся в царство вечных снегов, Нордскол! Там мы уладим все наши дела, там ты узнаешь свою судьбу.',14412,0,0,0, '26499'), +(-1594172, 'g', 'Я отыщу тебя на краю земли... Ты слышешь меня? На краю земли...',14318,1,0,5, '26499'), +(-1594173, 'g', 'Вы славно сражались сегодня! Все что Малганис оставил тут ваша награда. А мне нужно начинать готовиться к экспедиции в нордскол.',14319,0,0,5, '26499'), +(-1594174, 'g', 'Отдохни!',14414,1,0,0, '26499'), +(-1594175, 'g', 'Ты выглядишь усталым!',14415,1,0,0, '26499'), +(-1594176, 'g', 'Я лишь зря трачу тут свое время. Мне нужно собраться силами в моем родном мире.',14428,1,0,0, '26499'); + +DELETE FROM `script_waypoint` WHERE entry=26499; +INSERT INTO `script_waypoint` VALUES + (26499, 0, 2099.876,1280.21,138.55, 0, 'WP1'), + (26499, 1, 2120.757,1286.97,136.343, 0, 'Summon Zombie'), + (26499, 2, 2165.073,1279.338,133.40, 18000, 'Battle for Boss 1'), + (26499, 3, 2186.441,1234.445,136.524, 5000, 'Open The Gate 01'), + (26499, 4, 2210.385,1207.550,136.259, 0, 'WP2'), + (26499, 5, 2243.594,1177.705,137.144, 0, 'WP3'), + (26499, 6, 2286.883,1177.262,137.631, 0, 'Summon Zombie and Meathook'), + (26499, 7, 2320.374,1179.954,133.926, 0, 'WP4 Meathook Order'), + (26499, 8, 2354.626,1192.099,130.535, 15000, 'Battle For Boss 2 and Summon Zombie'), + (26499, 9, 2390.256,1204.235,134.125, 0, 'House WP1'), + (26499, 10, 2442.023,1219.205,133.999, 0, 'House WP2'), + (26499, 11, 2446.945,1192.559,149.076, 0, 'House WP3'), + (26499, 12, 2431.264,1189.590,149.076, 0, 'House WP4'), + (26499, 13, 2418.487,1196.059,148.076, 0, 'House WP5'), + (26499, 14, 2401.221,1191.705,148.076, 0, 'House WP6'), + (26499, 15, 2417.584,1121.026,148.082, 0, 'House WP7'), + (26499, 16, 2426.099,1107.088,148.076, 0, 'House WP8 and Summon Boss 3'), + (26499, 17, 2427.063,1107.298,148.076, 20000, 'House WP9 Cinematic'), + (26499, 18, 2428.013,1107.508,148.076, 6000, 'House WP10 Arthas Dialog'), + (26499, 19, 2444.682,1111.705,148.076, 15000, 'Battle For Boss 3'), + (26499, 20, 2457.133,1120.941,150.008, 0, 'House WP11'), + (26499, 21, 2459.694,1127.012,150.008, 0, 'House WP12'), + (26499, 22, 2469.617,1122.274,150.008, 0, 'House WP13'), + (26499, 23, 2470.437,1122.794,150.008, 3000, 'Open Shkaf'), + (26499, 24, 2471.662,1123.077,150.035, 3000, 'Shkaf Dialog'), + (26499, 25, 2483.183,1125.042,149.905, 0, 'Secret WP1'), + (26499, 26, 2487.867,1099.760,144.858, 0, 'Secret WP2'), + (26499, 27, 2498.270,1101.929,144.599, 0, 'Secret WP3'), + (26499, 28, 2492.114,1128.238,139.967, 0, 'Secret WP4'), + (26499, 29, 2500.286,1130.183,139.982, 0, 'Room WP1'), + (26499, 30, 2503.010,1119.241,139.978, 0, 'Room WP2'), + (26499, 31, 2517.820,1122.645,132.066, 0, 'Room WP3'), + (26499, 32, 2540.479,1129.061,130.868, 7000, 'Fire Street WP1'), + (26499, 33, 2568.619,1157.794,126.906, 0, 'Fire Street WP2'), + (26499, 34, 2556.074,1222.058,125.412, 20000, 'Fire Street WP3'), + (26499, 35, 2521.531,1295.209,130.573, 0, 'Fire Street WP4'), + (26499, 36, 2504.362,1348.667,132.944, 0, 'Fire Street WP5'), + (26499, 37, 2450.594,1431.544,131.361, 0, 'Fire Street WP6'), + (26499, 38, 2353.485,1404.839,128.531, 0, 'Knights Street WP1'), + (26499, 39, 2329.882,1406.273,128.013, 0, 'Knights Street WP2'), + (26499, 40, 2329.882,1406.273,128.013, 12000, 'Knights Street WP3'), + (26499, 41, 2327.391,1412.475,127.692, 180000000, 'Knights Street WP4'), + (26499, 42, 2329.882,1406.273,128.013, 0, 'Knights Street WP2'); -- Pustishka -- + \ No newline at end of file diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_lord_epoch.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_lord_epoch.cpp new file mode 100644 index 000000000..0ad739ed3 --- /dev/null +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_lord_epoch.cpp @@ -0,0 +1,156 @@ +#include "precompiled.h" +#include "def_culling_of_stratholme.h" + +enum +{ + SPELL_COURSE = 52772, + SPELL_TIME_STOP = 58848, + SPELL_TIME_WARP = 52766, + SPELL_SPIKE_N = 52771, + SPELL_SPIKE_H = 58830, + + SAY_EPOCH_INTRO = -1594116, + SAY_EPOCH_AGGRO = -1594118, + SAY_EPOCH_DEATH = -1594119, + SAY_EPOCH_SLAY01 = -1594120, + SAY_EPOCH_SLAY02 = -1594121, + SAY_EPOCH_SLAY03 = -1594122, + SAY_EPOCH_WARP01 = -1594123, + SAY_EPOCH_WARP02 = -1594124, + SAY_EPOCH_WARP03 = -1594125 +}; + +struct MANGOS_DLL_DECL boss_lord_epochAI : public ScriptedAI +{ + boss_lord_epochAI(Creature *c) : ScriptedAI(c) + { + m_bIsHeroic = !c->GetMap()->IsRegularDifficulty(); + Reset(); + } + +uint32 Step; +uint32 Steptim; +uint32 Intro; +bool m_bIsHeroic; +uint32 Spike_Timer; +uint32 Warp_Timer; +uint32 Stop_Timer; +uint32 Course_Timer; + + void Reset() + { + Intro = 0; + Step = 1; + Steptim = 26000; + Course_Timer = 9300; + Stop_Timer = 21300; + Warp_Timer = 25300; + Spike_Timer = 5300; + } + + void Aggro(Unit* who) +{ + DoScriptText(SAY_EPOCH_AGGRO, m_creature); +} + + void JustDied(Unit *killer) + { + DoScriptText(SAY_EPOCH_DEATH, m_creature); + } + + void KilledUnit(Unit* pVictim) + { + switch(rand()%3) + { + case 0: DoScriptText(SAY_EPOCH_SLAY01, m_creature); break; + case 1: DoScriptText(SAY_EPOCH_SLAY02, m_creature); break; + case 2: DoScriptText(SAY_EPOCH_SLAY03, m_creature); break; + } + } + + void UpdateAI(const uint32 diff) + { + if(Intro == 0) + { + switch(Step) + { + case 1: + DoScriptText(SAY_EPOCH_INTRO, m_creature); + ++Step; + Steptim = 26000; + break; + case 3: + m_creature->setFaction(14); + ++Step; + Steptim = 1000; + break; + } + }else return; + + if (Steptim <= diff) + { + ++Step; + Steptim = 330000; + } Steptim -= diff; + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + +DoMeleeAttackIfReady(); + +if (Course_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, SPELL_COURSE); + + Course_Timer = 9300; + }else Course_Timer -= diff; + +if (Spike_Timer < diff) + { + + DoCast(m_creature->getVictim(),m_bIsHeroic ? SPELL_SPIKE_H : SPELL_SPIKE_N); + + Spike_Timer = 5300; + }else Spike_Timer -= diff; + +if (Stop_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, SPELL_TIME_STOP); + + Stop_Timer = 21300; + }else Stop_Timer -= diff; + +if (Warp_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, SPELL_TIME_WARP); + switch(rand()%3) + { + case 0: DoScriptText(SAY_EPOCH_WARP01, m_creature); break; + case 1: DoScriptText(SAY_EPOCH_WARP02, m_creature); break; + case 2: DoScriptText(SAY_EPOCH_WARP03, m_creature); break; + } + + Warp_Timer = 25300; + }else Warp_Timer -= diff; + + } +}; + +CreatureAI* GetAI_boss_lord_epoch(Creature *_Creature) +{ + boss_lord_epochAI* lord_epochAI = new boss_lord_epochAI(_Creature); + return (CreatureAI*)lord_epochAI; +}; + +void AddSC_boss_lord_epoch() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_lord_epoch"; + newscript->GetAI = &GetAI_boss_lord_epoch; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_malganis.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_malganis.cpp new file mode 100644 index 000000000..79e03578f --- /dev/null +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_malganis.cpp @@ -0,0 +1,304 @@ +#include "precompiled.h" +#include "def_culling_of_stratholme.h" + +enum +{ + SAY_MALGANIS_AGGRO = -1594159, + SAY_MALGANIS_ESCAPE02 = -1594169, + SAY_MALGANIS_ESCAPE01 =-1594176, + SAY_MALGANIS_SLAY01 = -1594160, + SAY_MALGANIS_SLAY02 = -1594161, + SAY_MALGANIS_SLAY03 = -1594162, + SAY_MALGANIS_SLAY04 = -1594163, + SAY_MALGANIS_SLAY05 = -1594164, + SAY_MALGANIS_SLAY06 = -1594165, + SAY_MALGANIS_SLAY07 = -1594166, + SAY_MALGANIS_SLEEP01 = -1594174, + SAY_MALGANIS_SLEEP02 = -1594175, + SAY_MALGANIS_Sleep = -1594167, + SAY_MALGANIS_15HP = -1594168, + SAY_MALGANIS_OUTRO = -1594171, + SAY_ARTHAS_OUTRO01 = -1594170, + SAY_ARTHAS_OUTRO02 = -1594172, + SAY_ARTHAS_OUTRO03 = -1594173, + + SPELL_SWAMP_N = 52720, + SPELL_SWAMP_H = 58852, + SPELL_MIND_BLAST_N = 52722, + SPELL_MIND_BLAST_H = 58850, + SPELL_SLEEP_N = 52721, + SPELL_SLEEP_H = 58849, + SPELL_VAMPIRE = 52723, + + NPC_ARTHAS = 26499 +}; + +struct MANGOS_DLL_DECL boss_malganisAI : public ScriptedAI +{ + boss_malganisAI(Creature *c) : ScriptedAI(c) + { + m_pInstance = (ScriptedInstance*)c->GetInstanceData(); + m_bIsHeroic = !c->GetMap()->IsRegularDifficulty(); + Reset(); + } + +ScriptedInstance* m_pInstance; + +Unit* pTarget; +bool Finish; +bool Sleep; +bool Vampire; +uint32 Phase; +Creature* Malganis; +Creature* Arthas; +bool Outro; +bool m_bIsHeroic; +uint32 Step; +uint32 Steptim; +uint32 Motion; +uint32 Swamp_Timer; +uint32 MindBlast_Timer; +uint32 Sleep_Timer; +uint32 Vampire_Timer; + + void Reset() + { + Sleep = false; + Vampire = false; + Phase = 1; + Outro = false; + Step = 1; + Steptim = 7000; + Motion = 0; + Swamp_Timer = 6300; + MindBlast_Timer = 11300; + Sleep_Timer = 17300; + Vampire_Timer = 30000; + if(Finish == true) + { }else Finish = false; + } + + void Aggro(Unit* who) +{ + DoScriptText(SAY_MALGANIS_AGGRO, m_creature); + if (Creature* pArthas = GetClosestCreatureWithEntry(m_creature, NPC_ARTHAS, 150.0f)) + Arthas = pArthas; + + if (m_pInstance) + { + GameObject* pGate = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GO_MAL_GATE2)); + if (pGate && !pGate->GetGoState()) + { + pGate->SetGoState(GO_STATE_READY); + } + } + +} + + void KilledUnit(Unit* pVictim) + { + switch(rand()%7) + { + case 0: DoScriptText(SAY_MALGANIS_SLAY01, m_creature); break; + case 1: DoScriptText(SAY_MALGANIS_SLAY02, m_creature); break; + case 2: DoScriptText(SAY_MALGANIS_SLAY03, m_creature); break; + case 3: DoScriptText(SAY_MALGANIS_SLAY04, m_creature); break; + case 4: DoScriptText(SAY_MALGANIS_SLAY05, m_creature); break; + case 5: DoScriptText(SAY_MALGANIS_SLAY06, m_creature); break; + case 6: DoScriptText(SAY_MALGANIS_SLAY07, m_creature); break; + } + } + + void UpdateAI(const uint32 diff) + { + +if(Outro == false) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + + if (Swamp_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, m_bIsHeroic ? SPELL_SWAMP_H : SPELL_SWAMP_N); + + Swamp_Timer = 7300; + }else Swamp_Timer -= diff; + + if (MindBlast_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, m_bIsHeroic ? SPELL_MIND_BLAST_H : SPELL_MIND_BLAST_N); + + MindBlast_Timer = 11300; + }else MindBlast_Timer -= diff; + + if(m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 40) + { + if(Sleep == false) + { + Sleep = true; + DoScriptText(SAY_MALGANIS_Sleep, m_creature); + } + + if (Sleep_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, m_bIsHeroic ? SPELL_SLEEP_H : SPELL_SLEEP_N); + switch(rand()%2) + { + case 0: DoScriptText(SAY_MALGANIS_SLEEP01, m_creature); break; + case 1: DoScriptText(SAY_MALGANIS_SLEEP02, m_creature); break; + } + + Sleep_Timer = 17300; + }else Sleep_Timer -= diff; + } + + if(m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 25) + { + if(Vampire == false) + { + Vampire = true; + DoScriptText(SAY_MALGANIS_15HP, m_creature); + DoCast(m_creature, SPELL_VAMPIRE); + } + if (Vampire_Timer < diff) + { + DoCast(m_creature, SPELL_VAMPIRE); + + Vampire_Timer = 30000; + }else Vampire_Timer -= diff; + + } + + if(m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 5) + { + Finish = true; + } + + if(Arthas) + { + if(Arthas->isDead()) + { + + m_creature->setFaction(35); + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->InterruptNonMeleeSpells(false); + m_creature->SetVisibility(VISIBILITY_OFF); + } + } + } + + if(Finish == true) + { + switch(Step) + { + case 1: + Outro = true; + Malganis = m_creature; + DoScriptText(SAY_MALGANIS_ESCAPE01, Malganis); + if (Creature* pArthas = GetClosestCreatureWithEntry(m_creature, NPC_ARTHAS, 150.0f)) + Arthas = pArthas; + Arthas->setFaction(35); + Arthas->RemoveAllAuras(); + Arthas->DeleteThreatList(); + Arthas->CombatStop(true); + Arthas->InterruptNonMeleeSpells(false); + Malganis->setFaction(35); + Malganis->RemoveAllAuras(); + Malganis->DeleteThreatList(); + Malganis->CombatStop(true); + Malganis->InterruptNonMeleeSpells(false); + Malganis->GetMotionMaster()->MovePoint(0, 2286.963f, 1484.449f, 127.850f); + Arthas->GetMotionMaster()->MovePoint(0, 2299.289f, 1491.944f, 128.362f); + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Malganis->GetGUID()); + Malganis->SetUInt64Value(UNIT_FIELD_TARGET, Arthas->GetGUID()); + ++Step; + Steptim = 10000; + break; + case 3: + DoScriptText(SAY_MALGANIS_ESCAPE02, Malganis); + ++Step; + Steptim = 10000; + break; + case 5: + DoScriptText(SAY_ARTHAS_OUTRO01, Arthas); + ++Step; + Steptim = 5000; + break; + case 7: + DoScriptText(SAY_MALGANIS_OUTRO, Malganis); + ++Step; + Steptim = 20000; + break; + case 9: + Malganis->SetVisibility(VISIBILITY_OFF); + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, 0); + Arthas->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + Arthas->GetMotionMaster()->MovePoint(0, Malganis->GetPositionX(), Malganis->GetPositionY(), Malganis->GetPositionZ()); + ++Step; + Steptim = 3000; + break; + case 11: + DoScriptText(SAY_ARTHAS_OUTRO02, Arthas); + ++Step; + Steptim = 6000; + break; + case 13: + DoScriptText(SAY_ARTHAS_OUTRO03, Arthas); + if (m_pInstance) + { + GameObject* pChest = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GO_MAL_CHEST)); + if (pChest && !pChest->isSpawned()) + { + pChest->SetRespawnTime(180000); + } + } + ++Step; + Steptim =11000; + break; + case 15: + if (m_pInstance) + m_pInstance->SetData(TYPE_ARTHAS_EVENT, DONE); + Arthas->GetMotionMaster()->MovePoint(0, 2243.311f, 1476.025f, 132.352f); + ++Step; + Steptim =11000; + break; + case 17: + Arthas->SetVisibility(VISIBILITY_OFF); + Outro = false; + ++Step; + Steptim =11000; + break; + } + } else return; + + if (Steptim <= diff) + { + ++Step; + Steptim = 330000; + } Steptim -= diff; + } +}; + +CreatureAI* GetAI_boss_malganis(Creature *_Creature) +{ + boss_malganisAI* malganisAI = new boss_malganisAI(_Creature); + return (CreatureAI*)malganisAI; +}; + +void AddSC_boss_malganis() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_malganis"; + newscript->GetAI = &GetAI_boss_malganis; + newscript->RegisterSelf(); + +} \ No newline at end of file diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_meathook.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_meathook.cpp new file mode 100644 index 000000000..15514b2e1 --- /dev/null +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_meathook.cpp @@ -0,0 +1,110 @@ +#include "precompiled.h" +#include "def_culling_of_stratholme.h" + +enum +{ + SPELL_CHAIN_N = 52696, + SPELL_CHAIN_H = 58823, + SPELL_EXPLODED_N = 52666, + SPELL_EXPLODED_H = 58821, + SPELL_FRENZY = 58841, + + SAY_MEATHOOK_SPAWN = -1594110, + SAY_MEATHOOK_AGGRO = -1594111, + SAY_MEATHOOK_DEATH = -1594112, + SAY_MEATHOOK_SLAY01 = -1594113, + SAY_MEATHOOK_SLAY02 = -1594114, + SAY_MEATHOOK_SLAY03 = -1594115 +}; + +struct MANGOS_DLL_DECL boss_meathookAI : public ScriptedAI +{ + boss_meathookAI(Creature *c) : ScriptedAI(c) + { + m_bIsHeroic = !c->GetMap()->IsRegularDifficulty(); + Reset(); + } + +bool m_bIsHeroic; +uint32 phaseArthas; +uint32 Chain_Timer; +uint32 Exploded_Timer; +uint32 Frenzy_Timer; + + void Reset() + { + phaseArthas = 0; + Chain_Timer = 6300; + Exploded_Timer = 9300; + Frenzy_Timer = 23300; + } + + void Aggro(Unit* who) +{ + DoScriptText(SAY_MEATHOOK_AGGRO, m_creature); +} + + void JustDied(Unit *killer) + { + DoScriptText(SAY_MEATHOOK_DEATH, m_creature); + } + + void KilledUnit(Unit* pVictim) + { + switch(rand()%3) + { + case 0: DoScriptText(SAY_MEATHOOK_SLAY01, m_creature); break; + case 1: DoScriptText(SAY_MEATHOOK_SLAY02, m_creature); break; + case 2: DoScriptText(SAY_MEATHOOK_SLAY03, m_creature); break; + } + } + + void UpdateAI(const uint32 diff) + { + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + +DoMeleeAttackIfReady(); + +if (Chain_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, m_bIsHeroic ? SPELL_CHAIN_H : SPELL_CHAIN_N); + + Chain_Timer = 6300; + }else Chain_Timer -= diff; + +if (Exploded_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, m_bIsHeroic ? SPELL_EXPLODED_H : SPELL_EXPLODED_N); + + Exploded_Timer = 9300; + }else Exploded_Timer -= diff; + +if (Frenzy_Timer < diff) + { + DoCast(m_creature,SPELL_FRENZY); + + Frenzy_Timer = 23300; + }else Frenzy_Timer -= diff; + + } +}; + +CreatureAI* GetAI_boss_meathook(Creature *_Creature) +{ + boss_meathookAI* meathookAI = new boss_meathookAI(_Creature); + return (CreatureAI*)meathookAI; +}; + +void AddSC_boss_meathook() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_meathook"; + newscript->GetAI = &GetAI_boss_meathook; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_salramm.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_salramm.cpp new file mode 100644 index 000000000..e4e91377c --- /dev/null +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_salramm.cpp @@ -0,0 +1,147 @@ +#include "precompiled.h" +#include "def_culling_of_stratholme.h" + +enum +{ + SAY_SALRAMM_SPAWN = -1594129, + SAY_SALRAMM_AGGRO = -1594130, + SAY_SALRAMM_DEATH = -1594131, + SAY_SALRAMM_SLAY01 = -1594132, + SAY_SALRAMM_SLAY02 = -1594133, + SAY_SALRAMM_SLAY03 = -1594134, + SAY_SALRAMM_STEAL01 = -1594135, + SAY_SALRAMM_STEAL02 = -1594136, + SAY_SALRAMM_STEAL03 = -1594137, + + SPELL_SB_N = 57725, + SPELL_SB_H = 58827, + SPELL_FLESH = 58845, + SPELL_STEAL = 52708 +}; + +struct MANGOS_DLL_DECL boss_salrammAI : public ScriptedAI +{ + boss_salrammAI(Creature *c) : ScriptedAI(c) + { + m_bIsHeroic = !c->GetMap()->IsRegularDifficulty(); + Reset(); + } + +bool m_bIsHeroic; +uint32 Step; +uint32 Steptim; +uint32 Motion; +uint32 ShadowBolt_Timer; +uint32 Flesh_Timer; +uint32 Steal_Timer; + + void Reset() + { + Step = 1; + Steptim = 7000; + Motion = 0; + ShadowBolt_Timer = 5300; + Flesh_Timer = 7300; + Steal_Timer = 17300; + } + + void Aggro(Unit* who) +{ + DoScriptText(SAY_SALRAMM_AGGRO, m_creature); + m_creature->GetMotionMaster()->Clear(false); +} + + void JustDied(Unit *killer) + { + DoScriptText(SAY_SALRAMM_DEATH, m_creature); + } + + void KilledUnit(Unit* pVictim) + { + switch(rand()%3) + { + case 0: DoScriptText(SAY_SALRAMM_SLAY01, m_creature); break; + case 1: DoScriptText(SAY_SALRAMM_SLAY02, m_creature); break; + case 2: DoScriptText(SAY_SALRAMM_SLAY03, m_creature); break; + } + } + + void UpdateAI(const uint32 diff) + { + DoMeleeAttackIfReady(); + + if(Motion == 0) + { + switch(Step) + { + case 1: + DoScriptText(SAY_SALRAMM_SPAWN, m_creature); + ++Step; + Steptim = 7000; + break; + case 3: + m_creature->GetMotionMaster()->MovePoint(0, 2165.073f,1279.338f,133.40f); + ++Step; + Steptim = 7000; + break; + } + } else return; + + if (Steptim <= diff) + { + ++Step; + Steptim = 330000; + } Steptim -= diff; + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + +if (ShadowBolt_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, m_bIsHeroic ? SPELL_SB_H : SPELL_SB_N); + + ShadowBolt_Timer = 5300; + }else ShadowBolt_Timer -= diff; + +if (Flesh_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_FLESH); + + Flesh_Timer = 7300; + }else Flesh_Timer -= diff; + +if (Steal_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_STEAL); + switch(rand()%3) + { + case 0: DoScriptText(SAY_SALRAMM_STEAL01, m_creature); break; + case 1: DoScriptText(SAY_SALRAMM_STEAL02, m_creature); break; + case 2: DoScriptText(SAY_SALRAMM_STEAL03, m_creature); break; + } + + Steal_Timer = 17300; + }else Steal_Timer -= diff; + + } +}; + +CreatureAI* GetAI_boss_salramm(Creature *_Creature) +{ + boss_salrammAI* salrammAI = new boss_salrammAI(_Creature); + return (CreatureAI*)salrammAI; +}; + +void AddSC_boss_salramm() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_salramm"; + newscript->GetAI = &GetAI_boss_salramm; + newscript->RegisterSelf(); + +} \ No newline at end of file diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp new file mode 100644 index 000000000..aa07fe464 --- /dev/null +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp @@ -0,0 +1,1046 @@ +#include "precompiled.h" +#include "def_culling_of_stratholme.h" +#include "escort_ai.h" + +enum +{ + SAY_INTRO01 = -1594071, //Arthas + SAY_INTRO02 = -1594072, //Uther + SAY_INTRO03 = -1594073, //Arthas + SAY_INTRO04 = -1594074, //Arthas + SAY_INTRO05 = -1594075, //Uther + SAY_INTRO06 = -1594076, //Arthas + SAY_INTRO07 = -1594077, //Uther + SAY_INTRO08 = -1594078, //Arthas + SAY_INTRO09 = -1594079, //Arthas + SAY_INTRO10 = -1594080, //Uther + SAY_INTRO11 = -1594081, //Arthas + SAY_INTRO12 = -1594082, //Uther + SAY_INTRO13 = -1594083, //Jaina + SAY_INTRO14 = -1594084, //Arthas + SAY_INTRO15 = -1594085, //Uther + SAY_INTRO16 = -1594086, //Arthas + SAY_INTRO17 = -1594087, //Jaina + SAY_INTRO18 = -1594088, //Arthas + SAY_ENTER01 = -1594089, //Arthas + SAY_ENTER02 = -1594090, //Cityman + SAY_ENTER03 = -1594091, //Arthas + SAY_ENTER04 = -1594092, //Crazyman + SAY_ENTER05 = -1594093, //Arthas + SAY_ENTER06 = -1594094, //Malganis + SAY_ENTER07 = -1594095, //Malganis + SAY_ENTER08 = -1594096, //Arthas + SAY_ENTER09 = -1594097, //Arthas + SAY_PHASE501 = -1594098, //Arthas + SAY_PHASE502 = -1594099, //Arthas + SAY_PEOPLE05 = -1594100, //Patricia + SAY_PEOPLE06 = -1594101, //Patricia + SAY_PEOPLE07 = -1594103, //Patricia + SAY_PEOPLE08 = -1594105, //Patricia + SAY_PEOPLE09 = -1594106, //Patricia + SAY_EPOCH = -1594117, //Arthas Dialog for Epoch + SAY_MEATHOOK_SPAWN = -1594110, + SAY_PEOPLE01 = -1594107, //People Run + SAY_PEOPLE02 = -1594108, //People Run + SAY_PEOPLE03 = -1594109, //People Run + SAY_PEOPLE04 = -1594104, //People Run + SAY_PEOPLE10 = -1594102, //People Run + SAY_PEOPLE11 = -1594126, //People Run + SAY_PEOPLE12 = -1594127, //People Run + SAY_PEOPLE13 = -1594128, //People Run + SAY_PHASE503 = -1594152, //Arthas Shkaf 01 + SAY_PHASE504 = -1594153, //Arthas Shkaf 02 + SAY_PHASE505 = -1594142, //Arthas Glore + SAY_PHASE506 = -1594143, //Arthas That is it + SAY_PHASE507 = -1594144, //Arthas + SAY_PHASE508 = -1594145, //Arthas This Magic Again + SAY_PHASE509 = -1594147, //Arthas We are Close in trap + SAY_PHASE510 = -1594146, //Arthas Lets go + SAY_PHASE511 = -1594151, //Arthas Shkaff tam + SAY_PHASE601 = -1594154, //Arthas Fire + SAY_PHASE602 = -1594155, //Arthas Picnic + SAY_PHASE603 = -1594156, //Arthas Picnic End + SAY_PHASE604 = -1594157, //Arthas Stop Escort ska on ne virybaetsa + SAY_PHASE605 = -1594158, //Arthas Pipec Malganisy + + NPC_MALGANIS = 26533, + NPC_SCARED_MAN_2 = 31127, + NPC_DRAKONIAN = 27744, + NPC_TIME_RIFT = 28409, + NPC_TIME_RIFT_2 = 28439, + NPC_PATRICIA = 31028, + NPC_SCARED_MAN = 31126, + NPC_KNIGHT_ESCORT = 27745, + NPC_PRIEST_ESCORT = 27747, + NPC_JAINA = 26497, + NPC_ARTHAS = 26499, + NPC_UTHER = 26528, + NPC_CITY_MAN = 28167, + NPC_CRAZY_MAN = 28169, + NPC_ZOMBIE = 27737, + + SPELL_FEAR = 39176, + SPELL_CHAIN_N = 52696, + SPELL_CHAIN_H = 58823, + SPELL_EXPLODED_N = 52666, + SPELL_EXPLODED_H = 58821, + SPELL_FRENZY = 58841, + SPELL_ARTHAS_AURA = 52442, + SPELL_EXORCISM_N = 52445, + SPELL_EXORCISM_H = 58822, + SPELL_HOLY_LIGHT = 52444, + + ENCOUNTER_ZOMBIE_NUMBER = 4, + ENCOUNTER_ZOMBIE_NUMBER2 = 8 +}; + +struct MANGOS_DLL_DECL npc_arthasAI : public npc_escortAI +{ + npc_arthasAI(Creature *pCreature) : npc_escortAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroic = !pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + +ScriptedInstance* m_pInstance; + +bool m_bIsHeroic; +uint32 Exorcism_Timer; +uint32 FinalFight; +bool PhaseC; +uint32 arthas_event; +Unit* culling_faction; +Creature* Patricia; +Creature* StalkerM; +Creature* Crazyman; +Creature* Cityman; +Creature* Stalker; +Creature* TempZombie; +Creature* Salramm; +Creature* Meathook; +Creature* Epoch; +Creature* Malganis; +Creature* TempMalganis; +Creature* Arthas; +Creature* Jaina; +Creature* Uther; +uint32 phase; +uint32 phaseAI; +uint32 phasetim; +uint64 uiZombieGUID[ENCOUNTER_ZOMBIE_NUMBER]; +uint32 uiZombie_counter; +uint32 PatriciaEvent; + + void Reset() + { + if(arthas_event == 2) + { } else arthas_event = 0; + FinalFight = 0; + phase = 1; + phasetim = 20000; + Exorcism_Timer = 7300; + } + + void Aggro(Unit* who) +{ + DoCast(m_creature, SPELL_ARTHAS_AURA); +} + + void MoveInLineOfSight(Unit* pWho) + { + if (!pWho) + return; + + if (!m_creature->hasUnitState(UNIT_STAT_STUNNED) && pWho->isTargetableForAttack() && + m_creature->IsHostileTo(pWho) && pWho->isInAccessablePlaceFor(m_creature)) + { + if (!m_creature->canFly() && m_creature->GetDistanceZ(pWho) > CREATURE_Z_ATTACK_RANGE) + return; + + float attackRadius = m_creature->GetAttackDistance(pWho); + if (m_creature->IsWithinDistInMap(pWho, attackRadius) && m_creature->IsWithinLOSInMap(pWho)) + { + if (!m_creature->getVictim()) + { + AttackStart(pWho); + pWho->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); + } + else if (m_creature->GetMap()->IsDungeon()) + { + pWho->SetInCombatWith(m_creature); + m_creature->AddThreat(pWho, 0.0f); + } + } + } +} + + void JustDied(Unit *killer) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_ARTHAS_EVENT, DONE); + } + + void AttackStart(Unit* pWho) +{ + if (!pWho) + return; + + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho, 0.0f); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == POINT_MOTION_TYPE) + m_creature->GetMotionMaster()->MovementExpired(); + + if (IsCombatMovement()) + m_creature->GetMotionMaster()->MoveChase(pWho); + } +} + + void WaypointReached(uint32 uiPointId) + { + switch(uiPointId) + { + case 1: + DoScriptText(SAY_PHASE501, Arthas); + Salramm = Arthas->SummonCreature(26530,2232.19f,1331.933f,126.662f,3.15f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,900000); + Salramm->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + Salramm->GetMotionMaster()->MovePoint(0, 2194.110f,1332.00f,130.00f); + break; + case 2: + DoScriptText(SAY_PHASE502, Arthas); + break; + case 3: + Arthas->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + DoScriptText(SAY_PHASE505, Arthas); + break; + case 4: + DoScriptText(SAY_PHASE506, Arthas); + Arthas->SummonCreature(NPC_TIME_RIFT,2225.388f,1178.470f,136.289f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); + break; + case 5: + DoScriptText(SAY_PHASE507, Arthas); + Arthas->SummonCreature(NPC_TIME_RIFT,2264.253f,1162.153f,137.919f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); + Arthas->SummonCreature(NPC_TIME_RIFT,2286.946f,1182.064f,137.986f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); + break; + case 6: + break; + case 7: + break; + case 8: + break; + case 9: + DoScriptText(SAY_PHASE509, Arthas); + Arthas->SummonCreature(NPC_TIME_RIFT,2410.561f,1187.790f,133.933f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); + Arthas->SummonCreature(NPC_TIME_RIFT,2388.574f,1214.650f,134.239f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); + Arthas->SummonCreature(NPC_TIME_RIFT,2430.593f,1212.919f,134.124f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); + break; + case 10: + DoScriptText(SAY_PHASE510, Arthas); + break; + case 11: + Arthas->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + break; + case 13: + DoScriptText(SAY_PHASE508,Arthas); + Arthas->SummonCreature(NPC_TIME_RIFT,2393.985f,1190.519f,148.076f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); + Arthas->SummonCreature(NPC_TIME_RIFT,2436.202f,1200.540f,148.077f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); + break; + case 15: + DoScriptText(SAY_PHASE511,Arthas); + Arthas->SummonCreature(NPC_TIME_RIFT_2,2445.629f,1111.500f,148.076f,3.229f,TEMPSUMMON_TIMED_DESPAWN,9000); + break; + case 16: + Epoch = Arthas->SummonCreature(26532,2445.629f,1111.500f,148.076f,3.229f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,900000); + Epoch->setFaction(35); + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Epoch->GetGUID()); + break; + case 18: + DoScriptText(SAY_EPOCH, Arthas); + break; + case 19: + break; + case 20: + Arthas->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + break; + case 23: + DoScriptText(SAY_PHASE503,Arthas); + break; + case 24: + if (m_pInstance) + { + GameObject* pGate = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GO_SHKAF_GATE)); + pGate->SetGoState(GO_STATE_ACTIVE); + } + DoScriptText(SAY_PHASE504,Arthas); + break; + case 32: + DoScriptText(SAY_PHASE601,Arthas); + Arthas->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + break; + case 34: + Arthas->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + DoScriptText(SAY_PHASE602,Arthas); + break; + case 35: + Arthas->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + DoScriptText(SAY_PHASE603,Arthas); + break; + case 40: + DoScriptText(SAY_PHASE604,Arthas); + break; + case 41: + FinalFight = 1; + Arthas->setFaction(35); + phaseAI = 95; + Arthas->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + Arthas->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + break; + + } + } + + void UpdateAI(const uint32 diff) + { + npc_escortAI::UpdateAI(diff); + + DoMeleeAttackIfReady(); + + if(FinalFight == 2) + { + switch(phaseAI) + { + case 95: + Arthas->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + Arthas->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + DoScriptText(SAY_PHASE605, Arthas); + Malganis = Arthas->SummonCreature(NPC_MALGANIS,2296.665f,1502.362f,128.362f,4.961f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,900000); + if (m_pInstance) + { + GameObject* pGate = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GO_MAL_GATE1)); + pGate->SetGoState(GO_STATE_ACTIVE); + } + ++phaseAI; + phasetim = 3000; + break; + case 97: + Arthas->GetMotionMaster()->MovePoint(0, 2303.016f, 1480.070f, 128.139f); + ++phaseAI; + phasetim = 3000; + break; + case 99: + Arthas->setFaction(culling_faction->getFaction()); + ++phaseAI; + phasetim = 3000; + break; + } + } + + if(FinalFight == 2) + { + if (phasetim <= diff) + { + ++phaseAI; + phasetim = 330000; + } phasetim -= diff; + } + + if(arthas_event == 2) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (Exorcism_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, m_bIsHeroic ? SPELL_EXORCISM_H : SPELL_EXORCISM_N); + + Exorcism_Timer = 7300; + }else Exorcism_Timer -= diff; + + if(m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 40) + { + DoCast(m_creature, SPELL_HOLY_LIGHT); + } + } + + if(arthas_event == 1) + { + switch(phase) + { + case 1: + Arthas = m_creature; + Arthas->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + Arthas->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + Arthas->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + Uther = Arthas->SummonCreature(26528,1794.357f,1272.183f,140.558f,1.37f,TEMPSUMMON_TIMED_DESPAWN,180000); + if (Creature* pJaina = GetClosestCreatureWithEntry(Arthas, NPC_JAINA, 50.0f)) + Jaina = pJaina; + Uther->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + Arthas->GetMotionMaster()->MovePoint(0, 1903.167f, 1291.573f, 143.32f); + Uther->GetMotionMaster()->MovePoint(0, 1897.018f, 1287.487f, 143.481f); + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Uther->GetGUID()); + Uther->SetUInt64Value(UNIT_FIELD_TARGET, Arthas->GetGUID()); + ++phase; + phasetim = 17000; + break; + case 3: + DoScriptText(SAY_INTRO01, Arthas); + ++phase; + phasetim = 2000; + break; + case 5: + DoScriptText(SAY_INTRO02, Uther); + ++phase; + phasetim = 8000; + break; + case 7: + Arthas->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + DoScriptText(SAY_INTRO03, Arthas); + Arthas->GetMotionMaster()->MovePoint(0, 1911.087f, 1314.263f, 150.026f); + ++phase; + phasetim = 9000; + break; + case 9: + Jaina->SetUInt64Value(UNIT_FIELD_TARGET, Arthas->GetGUID()); + DoScriptText(SAY_INTRO04, Arthas); + ++phase; + phasetim = 10000; + break; + case 11: + DoScriptText(SAY_INTRO05, Uther); + ++phase; + phasetim = 1000; + break; + case 13: + DoScriptText(SAY_INTRO06, Arthas); + ++phase; + phasetim = 4000; + break; + case 15: + DoScriptText(SAY_INTRO07, Uther); + ++phase; + phasetim = 6000; + break; + case 17: + DoScriptText(SAY_INTRO08, Arthas); + ++phase; + phasetim = 4000; + break; + case 19: + DoScriptText(SAY_INTRO09, Uther); + ++phase; + phasetim = 8000; + break; + case 21: + DoScriptText(SAY_INTRO10, Arthas); + ++phase; + phasetim = 4000; + break; + case 23: + DoScriptText(SAY_INTRO11, Uther); + ++phase; + phasetim = 4000; + break; + case 25: + DoScriptText(SAY_INTRO12, Arthas); + ++phase; + phasetim = 11000; + break; + case 27: + DoScriptText(SAY_INTRO13, Jaina); + ++phase; + phasetim = 3000; + break; + case 29: + DoScriptText(SAY_INTRO14, Arthas); + ++phase; + phasetim = 9000; + break; + case 31: + DoScriptText(SAY_INTRO15, Uther); + ++phase; + phasetim = 4000; + break; + case 33: + Uther->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + Uther->GetMotionMaster()->MovePoint(0, 1794.357f,1272.183f,140.558f); + ++phase; + phasetim = 1000; + break; + case 35: + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Jaina->GetGUID()); + Jaina->GetMotionMaster()->MovePoint(0, 1794.357f,1272.183f,140.558f); + ++phase; + phasetim = 1000; + break; + case 37: + DoScriptText(SAY_INTRO16, Arthas); + ++phase; + phasetim = 1000; + break; + case 39: + DoScriptText(SAY_INTRO17, Jaina); + ++phase; + phasetim = 3000; + break; + case 41: + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, 0); + Arthas->GetMotionMaster()->MovePoint(0, 1902.959f,1295.127f,143.388f); + ++phase; + phasetim = 10000; + break; + case 43: + Arthas->GetMotionMaster()->MovePoint(0, 1913.726f,1287.407f,141.927f); + ++phase; + phasetim = 6000; + break; + case 45: + DoScriptText(SAY_INTRO18, Arthas); + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Jaina->GetGUID()); + ++phase; + phasetim = 10000; + break; + case 47: + Arthas->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, 0); + Jaina->SetVisibility(VISIBILITY_OFF); + Uther->SetVisibility(VISIBILITY_OFF); + Arthas->GetMotionMaster()->MovePoint(0, 1990.833f,1293.391f,145.467f); + ++phase; + phasetim = 12000; + break; + case 49: + Arthas->GetMotionMaster()->MovePoint(0, 1997.003f,1317.776f,142.963f); + ++phase; + phasetim = 5000; + break; + case 51: + Arthas->GetMotionMaster()->MovePoint(0, 2019.631f,1326.084f,142.929f); + ++phase; + phasetim = 4000; + break; + case 53: + Arthas->GetMotionMaster()->MovePoint(0, 2026.469f,1287.088f,143.596f); + ++phase; + phasetim = 6000; + break; + case 55: + Cityman = Arthas->SummonCreature(NPC_CITY_MAN,2091.977f,1275.021f,140.757f,0.558f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,60000); + Crazyman = Arthas->SummonCreature(NPC_CRAZY_MAN,2093.514f,1275.842f,140.408f,3.801f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,60000); + Arthas->GetMotionMaster()->MovePoint(0, 2050.660f,1287.333f,142.671f); + ++phase; + phasetim = 6000; + break; + case 57: + Stalker = Arthas->SummonCreature(20562,2026.469f,1287.088f,143.596f,1.37f,TEMPSUMMON_TIMED_DESPAWN,14000); + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Stalker->GetGUID()); + ++phase; + phasetim = 1000; + break; + case 59: + DoScriptText(SAY_ENTER01, Arthas); + ++phase; + phasetim = 12000; + break; + case 61: + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, 0); + Arthas->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + Arthas->GetMotionMaster()->MovePoint(0, 2081.447f,1287.770f,141.3241f); + ++phase; + phasetim = 15000; + break; + case 63: + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Cityman->GetGUID()); + Cityman->SetUInt64Value(UNIT_FIELD_TARGET, Arthas->GetGUID()); + Cityman->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + Cityman->GetMotionMaster()->MovePoint(0, 2088.625f,1279.191f,140.743f); + ++phase; + phasetim = 2000; + break; + case 65: + DoScriptText(SAY_ENTER02, Cityman); + ++phase; + phasetim = 4000; + break; + case 67: + Arthas->GetMotionMaster()->MovePoint(0, 2087.689f,1280.344f,140.73f); + DoScriptText(SAY_ENTER03, Arthas); + ++phase; + phasetim = 3000; + break; + case 69: + Arthas->HandleEmoteCommand(37); + ++phase; + phasetim = 1000; + break; + case 71: + DoScriptText(SAY_ENTER04, Crazyman); + Crazyman->SetUInt64Value(UNIT_FIELD_TARGET, Arthas->GetGUID()); + Cityman->DealDamage(Cityman, Cityman->GetMaxHealth(),NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Crazyman->GetGUID()); + Arthas->GetMotionMaster()->MovePoint(0, 2092.154f,1276.645f,140.52f); + ++phase; + phasetim = 3000; + break; + case 73: + Arthas->HandleEmoteCommand(37); + ++phase; + phasetim = 1000; + break; + case 75: + Crazyman->DealDamage(Crazyman, Crazyman->GetMaxHealth(),NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + ++phase; + phasetim = 1000; + break; + case 77: + Stalker = Arthas->SummonCreature(20562,2081.447f,1287.770f,141.3241f,1.37f,TEMPSUMMON_TIMED_DESPAWN,70000); + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Stalker->GetGUID()); + DoScriptText(SAY_ENTER05, Arthas); + ++phase; + phasetim = 3000; + break; + case 79: + StalkerM = Arthas->SummonCreature(20562,2117.349f,1288.624f,136.271f,1.37f,TEMPSUMMON_TIMED_DESPAWN,60000); + StalkerM->CastSpell(StalkerM,63793,false); + ++phase; + phasetim = 1000; + break; + case 81: + TempMalganis = Arthas->SummonCreature(26533,2117.349f,1288.624f,136.271f,1.37f,TEMPSUMMON_TIMED_DESPAWN,29000); + DoScriptText(SAY_ENTER06, TempMalganis); + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, TempMalganis->GetGUID()); + TempMalganis->SetUInt64Value(UNIT_FIELD_TARGET, Arthas->GetGUID()); + TempMalganis->setFaction(35); + ++phase; + phasetim = 11000; + break; + case 83: + phasetim = 500; + if (uiZombie_counter < ENCOUNTER_ZOMBIE_NUMBER) + { + if (Creature* TempZombie = GetClosestCreatureWithEntry(StalkerM, NPC_CITY_MAN, 100.0f)) + { + TempZombie->UpdateEntry(NPC_ZOMBIE, 0); + uiZombie_counter++; + } + } + else + { + uiZombie_counter = 0; + ++phase; + } + break; + case 85: + phasetim = 500; + if (uiZombie_counter < ENCOUNTER_ZOMBIE_NUMBER) + { + if (Creature* TempZombie = GetClosestCreatureWithEntry(StalkerM, NPC_CRAZY_MAN, 100.0f)) + { + TempZombie->UpdateEntry(NPC_ZOMBIE, 0); + uiZombie_counter++; + } + } + else + { + uiZombie_counter = 0; + ++phase; + } + break; + case 87: + DoScriptText(SAY_ENTER07, TempMalganis); + Arthas->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + ++phase; + phasetim = 17000; + break; + case 89: + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, StalkerM->GetGUID()); + DoScriptText(SAY_ENTER08, Arthas); + ++phase; + phasetim = 7000; + break; + case 91: + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Stalker->GetGUID()); + DoScriptText(SAY_ENTER09, Arthas); + ++phase; + phasetim = 12000; + break; + case 93: + phaseAI = 95; + if (m_pInstance) + m_pInstance->SetData(TYPE_ARTHAS_EVENT, IN_PROGRESS); + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, 0); + if(npc_arthasAI* pEscortAI = dynamic_cast(Arthas->AI())) + pEscortAI->Start(false, false, culling_faction->GetGUID(), NULL, false, false); + Arthas->setFaction(culling_faction->getFaction()); + arthas_event = 2; + ++phase; + phasetim = 1000; + break; + + } + } else return; + + if(arthas_event == 1) + { + if (phasetim <= diff) + { + ++phase; + phasetim = 330000; + } phasetim -= diff; + } + + } +}; + +CreatureAI* GetAI_npc_arthas(Creature* pCreature) +{ + return new npc_arthasAI(pCreature); +} + +bool GossipHello_npc_arthas(Player *player, Creature *mCreature) +{ + if (mCreature->isQuestGiver()) + player->PrepareQuestMenu( mCreature->GetGUID()); + + if(((npc_arthasAI*)mCreature->AI())->arthas_event == 0) + player->ADD_GOSSIP_ITEM(0, "I\'m ready start culling of stratholme", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + + if(((npc_arthasAI*)mCreature->AI())->FinalFight == 1) + player->ADD_GOSSIP_ITEM(0, "We are ready to Final Combat!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + + player->PlayerTalkClass->SendGossipMenu(907,mCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_arthas(Player *player, Creature *mCreature, uint32 sender, uint32 action ) +{ + if(action == GOSSIP_ACTION_INFO_DEF+2) + { + if(((npc_arthasAI*)mCreature->AI())->arthas_event == 0) + { + ((npc_arthasAI*)mCreature->AI())->arthas_event = 1; + } + + if(((npc_arthasAI*)mCreature->AI())->FinalFight == 1) + { + ((npc_arthasAI*)mCreature->AI())->FinalFight = 2; + } + + ((npc_arthasAI*)mCreature->AI())->culling_faction = player; + + player->CLOSE_GOSSIP_MENU(); + + } + return true; +} + +struct MANGOS_DLL_DECL npc_patriciaAI : public ScriptedAI +{ + npc_patriciaAI(Creature *c) : ScriptedAI(c) +{ + m_pInstance = (ScriptedInstance*)c->GetInstanceData(); + Reset(); +} + +ScriptedInstance* m_pInstance; + +Unit* Target; +Creature* Arthas; +Creature* Meathook; +Creature* Patricia; +uint32 Step; +uint32 Steptim; +bool Event; +bool Event2; +bool Event2Com; + + void Reset() + { + Event = false; + Event2 = true; + Event2Com = false; + Step = 1; + Steptim = 20000; + if(Event == true) + {}else Event = false; + } + + void MoveInLineOfSight(Unit *who) + { + if (Event2 == false && m_creature->IsWithinDistInMap(who, 20.0f)) + { + Target = who; + Event2Com = true; + } + + if (Event == false && m_creature->IsWithinDistInMap(who, 20.0f)) + { + if (m_pInstance->GetData(TYPE_ARTHAS_EVENT) == IN_PROGRESS) + { + Event = true; + } + } + ScriptedAI::MoveInLineOfSight(who); + } + + void UpdateAI(const uint32 diff) + { +DoMeleeAttackIfReady(); + + if(Event == true) + { + switch(Step) + { + case 1: + Patricia = m_creature; + DoScriptText(SAY_PEOPLE05, Patricia); + ++Step; + Steptim = 5000; + break; + case 3: + Meathook = Patricia->SummonCreature(26529,2349.901f,1225.278f,130.063f,3.15f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,900000); + Meathook->GetMotionMaster()->MovePoint(0, 2354.626f,1192.099f,130.535f); + DoScriptText(SAY_MEATHOOK_SPAWN, Meathook); + Patricia->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + DoScriptText(SAY_PEOPLE06, Patricia); + Patricia->GetMotionMaster()->MovePoint(0, 2395.487f,1203.199f,134.125f); + ++Step; + Steptim = 13000; + break; + case 5: + Patricia->GetMotionMaster()->MovePoint(0, 2431.674f,1211.797f,134.124f); + ++Step; + Steptim = 7000; + break; + case 7: + Patricia->GetMotionMaster()->MovePoint(0, 2438.028f,1206.680f,133.935f); + ++Step; + Steptim = 3000; + break; + case 9: + Patricia->GetMotionMaster()->MovePoint(0, 2437.524f,1206.971f,133.935f); + Event2 = false; + ++Step; + Steptim = 3000; + break; + case 11: + if(Event2Com == false) return; + Patricia->SetUInt64Value(UNIT_FIELD_TARGET, Target->GetGUID()); + ++Step; + Steptim = 1000; + break; + case 13: + DoScriptText(SAY_PEOPLE07, m_creature); + ++Step; + Steptim = 4000; + break; + case 15: + DoScriptText(SAY_PEOPLE08, m_creature); + ++Step; + Steptim = 4000; + break; + case 17: + DoScriptText(SAY_PEOPLE09, m_creature); + ++Step; + Steptim = 9000; + break; + case 19: + m_creature->UpdateEntry(NPC_ZOMBIE, 0); + Event = 0; + ++Step; + Steptim = 7000; + break; + } + } else return; + + if (Steptim <= diff) + { + ++Step; + Steptim = 330000; + } Steptim -= diff; + + } +}; + +CreatureAI* GetAI_npc_patricia(Creature* pCreature) +{ + return new npc_patriciaAI(pCreature); +} + +struct MANGOS_DLL_DECL dark_conversionAI : public ScriptedAI +{ + dark_conversionAI(Creature *c) : ScriptedAI(c) +{ + m_pInstance = (ScriptedInstance*)c->GetInstanceData(); + Reset(); +} + +ScriptedInstance* m_pInstance; + +Unit* Target; +Creature* Arthas; +bool Conversion; +uint32 Step; +uint32 Steptim; + + void Reset() + { + m_creature->setFaction(35); + Conversion = false; + Step = 1; + Steptim = 500; + } + + void MoveInLineOfSight(Unit *who) + { + if (Conversion == false && m_creature->IsWithinDistInMap(who, 30.0f)) + { + if (m_pInstance->GetData(TYPE_ARTHAS_EVENT) == IN_PROGRESS) + { + Target = who; + Conversion = true; + } + + } + ScriptedAI::MoveInLineOfSight(who); + } + + void UpdateAI(const uint32 diff) + { + + DoMeleeAttackIfReady(); + + if(Conversion == true) + { + switch(Step) + { + case 1: + m_creature->setFaction(14); //2078 + m_creature->CastSpell(m_creature,SPELL_FEAR,false); + switch(rand()%12) + { + case 0: DoScriptText(SAY_PEOPLE01, m_creature); break; + case 1: DoScriptText(SAY_PEOPLE02, m_creature); break; + case 2: DoScriptText(SAY_PEOPLE03, m_creature); break; + case 3: DoScriptText(SAY_PEOPLE04, m_creature); break; + case 4: DoScriptText(SAY_PEOPLE10, m_creature); break; + case 5: DoScriptText(SAY_PEOPLE11, m_creature); break; + case 6: DoScriptText(SAY_PEOPLE12, m_creature); break; + case 7: DoScriptText(SAY_PEOPLE13, m_creature); break; + } + ++Step; + Steptim = 5000 + rand()%5000; + break; + case 3: + m_creature->UpdateEntry(NPC_ZOMBIE, 0); + m_creature->GetMotionMaster()->MovePoint(0, Target->GetPositionX(), Target->GetPositionY(), Target->GetPositionZ()); + ++Step; + Steptim = 1000; + break; + } + }else return; + + if (Steptim <= diff) + { + ++Step; + Steptim = 330000; + } Steptim -= diff; + + } +}; + +CreatureAI* GetAI_dark_conversion(Creature* pCreature) +{ + return new dark_conversionAI(pCreature); +} + +struct MANGOS_DLL_DECL npc_time_riftCSAI : public ScriptedAI +{ + npc_time_riftCSAI(Creature *c) : ScriptedAI(c) {Reset(); +} + +Creature* Drakonian01; +Creature* Drakonian02; +Creature* Drakonian03; +Creature* Arthas; +bool Conversion; +uint32 Step; +uint32 Steptim; + + void Reset() + { + Conversion = false; + Step = 1; + Steptim = 500; + } + + void UpdateAI(const uint32 diff) + { + switch(Step) + { + case 1: + if (Creature* pArthas = GetClosestCreatureWithEntry(m_creature, NPC_ARTHAS, 180.0f)) + Arthas = pArthas; + Drakonian01 = m_creature->SummonCreature(NPC_DRAKONIAN,m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ()+1,3.229f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,900000); + Drakonian01->GetMotionMaster()->MovePoint(0, Arthas->GetPositionX(), Arthas->GetPositionY(), Arthas->GetPositionZ()); + ++Step; + Steptim = 3000; + break; + case 3: + Drakonian02 = m_creature->SummonCreature(NPC_DRAKONIAN,m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ()+1,3.229f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,900000); + Drakonian02->GetMotionMaster()->MovePoint(0, Arthas->GetPositionX(), Arthas->GetPositionY(), Arthas->GetPositionZ()); + ++Step; + Steptim = 3000; + break; + case 5: + Drakonian03 = m_creature->SummonCreature(NPC_DRAKONIAN,m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ()+1,3.229f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,900000); + Drakonian03->GetMotionMaster()->MovePoint(0, Arthas->GetPositionX(), Arthas->GetPositionY(), Arthas->GetPositionZ()); + ++Step; + Steptim = 3000; + break; + } + + if (Steptim <= diff) + { + ++Step; + Steptim = 330000; + } Steptim -= diff; + + } +}; + +CreatureAI* GetAI_npc_time_riftCS(Creature* pCreature) +{ + return new npc_time_riftCSAI(pCreature); +} + +void AddSC_culling_of_stratholme() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_arthas"; + newscript->GetAI = &GetAI_npc_arthas; + newscript->pGossipHello = &GossipHello_npc_arthas; + newscript->pGossipSelect = &GossipSelect_npc_arthas; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "dark_conversion"; + newscript->GetAI = &GetAI_dark_conversion; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_patricia"; + newscript->GetAI = &GetAI_npc_patricia; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_time_riftCS"; + newscript->GetAI = &GetAI_npc_time_riftCS; + newscript->RegisterSelf(); +} \ No newline at end of file diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/def_culling_of_stratholme.h b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/def_culling_of_stratholme.h new file mode 100644 index 000000000..a69bcf572 --- /dev/null +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/def_culling_of_stratholme.h @@ -0,0 +1,16 @@ + +#ifndef DEF_CULLING_OF_STRATHOLME_H +#define DEF_CULLING_OF_STRATHOLME_H + +enum Data +{ + TYPE_ARTHAS_EVENT = 1, + DATA_GO_SHKAF_GATE = 2, + DATA_GO_MAL_GATE1 = 3, + DATA_GO_MAL_GATE2 = 4, + DATA_GO_MAL_CHEST = 5 +}; + +#endif + + diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp new file mode 100644 index 000000000..24c1a7fea --- /dev/null +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp @@ -0,0 +1,93 @@ +#include "precompiled.h" +#include "def_culling_of_stratholme.h" + +#define GO_SHKAF_GATE 188686 +#define GO_MALGANIS_GATE1 187711 +#define GO_MALGANIS_GATE2 187723 +#define GO_MALGANIS_CHEST 190663 + +struct MANGOS_DLL_DECL instance_culling_of_stratholme : public ScriptedInstance +{ + instance_culling_of_stratholme(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + + uint32 m_auiEncounter[1]; + std::string strInstData; + + uint64 m_uiShkafGateGUID; + uint64 m_uiMalGate1GUID; + uint64 m_uiMalGate2GUID; + uint64 m_uiMalChestGUID; + + void Initialize() + { + m_uiShkafGateGUID = 0; + m_uiMalGate1GUID = 0; + m_uiMalGate2GUID = 0; + m_uiMalChestGUID = 0; + } + + void OnObjectCreate(GameObject* pGo) + { + if (pGo->GetEntry() == GO_SHKAF_GATE) + m_uiShkafGateGUID = pGo->GetGUID(); + + if (pGo->GetEntry() == GO_MALGANIS_GATE1) + m_uiMalGate1GUID = pGo->GetGUID(); + + if (pGo->GetEntry() == GO_MALGANIS_GATE2) + m_uiMalGate2GUID = pGo->GetGUID(); + + if (pGo->GetEntry() == GO_MALGANIS_CHEST) + m_uiMalChestGUID = pGo->GetGUID(); + } + + void SetData(uint32 uiType, uint32 uiData) + { + switch(uiType) + { + case TYPE_ARTHAS_EVENT: + m_auiEncounter[0] = uiData; + break; + + } + } + + uint32 GetData(uint32 uiType) + { + switch(uiType) + { + case TYPE_ARTHAS_EVENT: + return m_auiEncounter[0]; + + } + return 0; + } + + uint64 GetData64(uint32 uiData) + { + switch(uiData) + { + case DATA_GO_SHKAF_GATE: return m_uiShkafGateGUID; + case DATA_GO_MAL_GATE1: return m_uiMalGate1GUID; + case DATA_GO_MAL_GATE2: return m_uiMalGate2GUID; + case DATA_GO_MAL_CHEST: return m_uiMalChestGUID; + } + + return 0; + } + +}; + +InstanceData* GetInstanceData_instance_culling_of_stratholme(Map* pMap) +{ + return new instance_culling_of_stratholme(pMap); +} + +void AddSC_instance_culling_of_stratholme() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "instance_culling_of_stratholme"; + newscript->GetInstanceData = &GetInstanceData_instance_culling_of_stratholme; + newscript->RegisterSelf(); +} diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index 008fba07c..799af42b4 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -223,6 +223,13 @@ extern void AddSC_boss_twinemperors(); extern void AddSC_mob_anubisath_sentinel(); extern void AddSC_instance_temple_of_ahnqiraj(); extern void AddSC_zulfarrak(); //zulfarrak +// culling of stratholme +extern void AddSC_boss_lord_epoch(); +extern void AddSC_culling_of_stratholme(); +extern void AddSC_boss_malganis(); +extern void AddSC_boss_meathook(); +extern void AddSC_instance_culling_of_stratholme(); +extern void AddSC_boss_salramm(); extern void AddSC_ashenvale(); extern void AddSC_azshara(); @@ -418,7 +425,6 @@ extern void AddSC_boss_nethermancer_sepethrea(); extern void AddSC_boss_pathaleon_the_calculator(); extern void AddSC_instance_mechanar(); - extern void AddSC_blades_edge_mountains(); extern void AddSC_boss_doomlordkazzak(); extern void AddSC_boss_doomwalker(); @@ -845,6 +851,13 @@ void AddScripts() AddSC_boss_nethermancer_sepethrea(); AddSC_boss_pathaleon_the_calculator(); AddSC_instance_mechanar(); + //culling of stratholme + AddSC_boss_lord_epoch(); + AddSC_culling_of_stratholme(); + AddSC_boss_malganis(); + AddSC_boss_meathook(); + AddSC_instance_culling_of_stratholme(); + AddSC_boss_salramm(); AddSC_blades_edge_mountains(); AddSC_boss_doomlordkazzak(); From e413fdc6f77679bfa3d8d3e8cb0f7bc10243b878 Mon Sep 17 00:00:00 2001 From: Insider Date: Sat, 26 Dec 2009 16:08:30 +0700 Subject: [PATCH 080/405] SD2 updated to 1524 --- sql/Updates/r1524_scriptdev2.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 sql/Updates/r1524_scriptdev2.sql diff --git a/sql/Updates/r1524_scriptdev2.sql b/sql/Updates/r1524_scriptdev2.sql new file mode 100644 index 000000000..cde51ac87 --- /dev/null +++ b/sql/Updates/r1524_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 9062+) '; From 6c42ba59d26d9e9cabb556be7b24ba2b582307f5 Mon Sep 17 00:00:00 2001 From: Insider Date: Sun, 27 Dec 2009 15:48:25 +0700 Subject: [PATCH 081/405] SD2 updated to 1525 --- Makefile.am | 1 + VC80/80ScriptDev2.vcproj | 4 + VC90/90ScriptDev2.vcproj | 4 + .../sunken_temple/sunken_temple.cpp | 148 ++++++++++++++++++ .../northrend/nexus/nexus/boss_telestra.cpp | 45 +++--- sql/Updates/Makefile.am | 5 +- sql/Updates/r1517_scriptdev2.sql | 3 +- sql/Updates/r1525_mangos.sql | 3 + sql/Updates/r1525_scriptdev2.sql | 7 + sql/mangos_scriptname_full.sql | 3 + sql/scriptdev2_script_full.sql | 8 +- 11 files changed, 203 insertions(+), 28 deletions(-) create mode 100644 scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp create mode 100644 sql/Updates/r1525_mangos.sql create mode 100644 sql/Updates/r1525_scriptdev2.sql diff --git a/Makefile.am b/Makefile.am index 0a01f711d..ad8a1c7f3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -190,6 +190,7 @@ scripts/eastern_kingdoms/stratholme/stratholme.cpp \ scripts/eastern_kingdoms/stratholme/stratholme.h \ scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp \ scripts/eastern_kingdoms/sunken_temple/sunken_temple.h \ +scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp \ scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp \ scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp \ scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp \ diff --git a/VC80/80ScriptDev2.vcproj b/VC80/80ScriptDev2.vcproj index 7f4346f46..2928fe30c 100644 --- a/VC80/80ScriptDev2.vcproj +++ b/VC80/80ScriptDev2.vcproj @@ -1035,6 +1035,10 @@ RelativePath="..\scripts\eastern_kingdoms\sunken_temple\sunken_temple.h" > + + + + + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Sunken_Temple +SD%Complete: 100 +SDComment: Quest support: 8733 +SDCategory: Sunken Temple +EndScriptData */ + +/* ContentData +at_shade_of_eranikus +npc_malfurion_stormrage +EndContentData */ + +#include "precompiled.h" +#include "sunken_temple.h" + +enum +{ + QUEST_THE_CHARGE_OF_DRAGONFLIGHTS = 8555, + QUEST_ERANIKUS_TYRANT_OF_DREAMS = 8733 +}; + +bool AreaTrigger_at_shade_of_eranikus(Player* pPlayer, AreaTriggerEntry *pAt) +{ + if (ScriptedInstance* pInstance = (ScriptedInstance*)pPlayer->GetInstanceData()) + { + //Only do stuff, if the player has finished the PreQuest + if (pPlayer->GetQuestRewardStatus(QUEST_THE_CHARGE_OF_DRAGONFLIGHTS) && + !pPlayer->GetQuestRewardStatus(QUEST_ERANIKUS_TYRANT_OF_DREAMS) && + pPlayer->GetQuestStatus(QUEST_ERANIKUS_TYRANT_OF_DREAMS) != QUEST_STATUS_COMPLETE) + { + if (pInstance->GetData(TYPE_MALFURION) != DONE) + { + pPlayer->SummonCreature(NPC_MALFURION, -639.378723, -4.238533, -90.835098, 2.724664, TEMPSUMMON_DEAD_DESPAWN, 0); + pInstance->SetData(TYPE_MALFURION, DONE); + } + } + } + return false; +} + +/*###### +## npc_malfurion_stormrage +######*/ +enum +{ + EMOTE_MALFURION1 = -1109000, + SAY_MALFURION1 = -1109001, + SAY_MALFURION2 = -1109002, + SAY_MALFURION3 = -1109003, + SAY_MALFURION4 = -1109004, + + MAX_MALFURION_TEMPLE_SPEECHES = 6 +}; + +struct MANGOS_DLL_DECL npc_malfurionAI : public ScriptedAI +{ + npc_malfurionAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_uiSpeech = 0; + m_uiSayTimer = 0; + m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + } + + uint32 m_uiSayTimer; + uint32 m_uiSpeech; + + void Reset() {} + void UpdateAI(const uint32 uiDiff) + { + // we are in Sunken Temple + if (m_creature->GetMap()->IsDungeon()) + { + if (m_uiSpeech < MAX_MALFURION_TEMPLE_SPEECHES) + { + if (m_uiSayTimer <= uiDiff) + { + switch (m_uiSpeech) + { + case 0: + DoScriptText(EMOTE_MALFURION1, m_creature); + m_uiSayTimer = 1500; + break; + case 1: + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_BOW); + m_uiSayTimer = 2000; + break; + case 2: + DoScriptText(SAY_MALFURION1, m_creature); + m_uiSayTimer = 1000; + break; + case 3: + DoScriptText(SAY_MALFURION2, m_creature); + m_uiSayTimer = 1000; + break; + case 4: + DoScriptText(SAY_MALFURION3, m_creature); + m_uiSayTimer = 2000; + break; + case 5: + DoScriptText(SAY_MALFURION4, m_creature); + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + break; + } + + ++m_uiSpeech; + } + else + m_uiSayTimer -= uiDiff; + } + } + } +}; + +CreatureAI* GetAI_npc_malfurion(Creature* pCreature) +{ + return new npc_malfurionAI(pCreature); +} + +void AddSC_sunken_temple() +{ + Script* newscript; + + newscript = new Script; + newscript->Name = "at_shade_of_eranikus"; + newscript->pAreaTrigger = &AreaTrigger_at_shade_of_eranikus; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_malfurion_stormrage"; + newscript->GetAI = &GetAI_npc_malfurion; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/nexus/nexus/boss_telestra.cpp b/scripts/northrend/nexus/nexus/boss_telestra.cpp index 99e398b89..fd4df7efa 100644 --- a/scripts/northrend/nexus/nexus/boss_telestra.cpp +++ b/scripts/northrend/nexus/nexus/boss_telestra.cpp @@ -92,8 +92,8 @@ struct MANGOS_DLL_DECL boss_telestraAI : public ScriptedAI { m_uiPhase = PHASE_1; - m_uiFirebombTimer = urand(3000, 5000); - m_uiIceNovaTimer = urand(6000, 12000); + m_uiFirebombTimer = urand(2000, 4000); + m_uiIceNovaTimer = urand(8000, 12000); m_uiGravityWellTimer = urand(15000, 25000); } @@ -105,7 +105,7 @@ struct MANGOS_DLL_DECL boss_telestraAI : public ScriptedAI m_creature->SetInCombatWith(pWho); pWho->SetInCombatWith(m_creature); - m_creature->GetMotionMaster()->MoveChase(pWho, 20.0f); + m_creature->GetMotionMaster()->MoveChase(pWho, 15.0f); } } @@ -137,40 +137,35 @@ struct MANGOS_DLL_DECL boss_telestraAI : public ScriptedAI { case PHASE_1: { - if (m_uiGravityWellTimer < uiDiff) + if (!m_creature->GetCurrentSpell(CURRENT_CHANNELED_SPELL)) { - if (!m_creature->IsNonMeleeSpellCasted(false)) + if (m_uiFirebombTimer < uiDiff) { - DoCast(m_creature, SPELL_GRAVITY_WELL); - m_uiGravityWellTimer = urand(15000, 30000); + if (DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_FIREBOMB : SPELL_FIREBOMB_H) == CAST_OK) + m_uiFirebombTimer = urand(4000, 6000); } - } - else - m_uiGravityWellTimer -= uiDiff; + else + m_uiFirebombTimer -= uiDiff; - if (m_uiFirebombTimer < uiDiff) - { - if (!m_creature->IsNonMeleeSpellCasted(false)) + if (m_uiIceNovaTimer < uiDiff) { - DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_FIREBOMB : SPELL_FIREBOMB_H); - m_uiFirebombTimer = urand(3000, 5000); + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_ICE_NOVA : SPELL_ICE_NOVA_H, CAST_INTURRUPT_PREVIOUS) == CAST_OK) + m_uiIceNovaTimer = urand(10000, 15000); } + else + m_uiIceNovaTimer -= uiDiff; + + DoMeleeAttackIfReady(); } - else - m_uiFirebombTimer -= uiDiff; - if (m_uiIceNovaTimer < uiDiff) + if (m_uiGravityWellTimer < uiDiff) { - if (!m_creature->IsNonMeleeSpellCasted(false)) - { - DoCast(m_creature, m_bIsRegularMode ? SPELL_ICE_NOVA : SPELL_ICE_NOVA_H); - m_uiIceNovaTimer = urand(10000, 15000); - } + if (DoCastSpellIfCan(m_creature, SPELL_GRAVITY_WELL) == CAST_OK) + m_uiGravityWellTimer = urand(15000, 30000); } else - m_uiIceNovaTimer -= uiDiff; + m_uiGravityWellTimer -= uiDiff; - DoMeleeAttackIfReady(); break; } case PHASE_2: diff --git a/sql/Updates/Makefile.am b/sql/Updates/Makefile.am index f936d8c57..2892ff152 100644 --- a/sql/Updates/Makefile.am +++ b/sql/Updates/Makefile.am @@ -57,4 +57,7 @@ pkgdata_DATA = \ r1516_scriptdev2.sql \ r1517_scriptdev2.sql \ r1519_mangos.sql \ - r1523_mangos.sql + r1523_mangos.sql \ + r1524_scriptdev2.sql \ + r1525_mangos.sql \ + r1525_scriptdev2.sql diff --git a/sql/Updates/r1517_scriptdev2.sql b/sql/Updates/r1517_scriptdev2.sql index 795778a9a..13fd41dde 100644 --- a/sql/Updates/r1517_scriptdev2.sql +++ b/sql/Updates/r1517_scriptdev2.sql @@ -1,2 +1,3 @@ -INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +DELETE FROM script_texts WHERE entry=-1604029; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES (-1604029,'%s transforms into a Mammoth!',14724,2,0,0,'moorabi EMOTE_TRANSFORMED'); diff --git a/sql/Updates/r1525_mangos.sql b/sql/Updates/r1525_mangos.sql new file mode 100644 index 000000000..2ef83787f --- /dev/null +++ b/sql/Updates/r1525_mangos.sql @@ -0,0 +1,3 @@ +DELETE FROM areatrigger_scripts WHERE entry=4016; +INSERT INTO areatrigger_scripts VALUES (4016,'at_shade_of_eranikus'); +UPDATE creature_template SET ScriptName='npc_malfurion_stormrage' WHERE entry=15362; diff --git a/sql/Updates/r1525_scriptdev2.sql b/sql/Updates/r1525_scriptdev2.sql new file mode 100644 index 000000000..73b997c92 --- /dev/null +++ b/sql/Updates/r1525_scriptdev2.sql @@ -0,0 +1,7 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1109004 AND -11090000; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1109000,'The walls of the chamber tremble. Something is happening...',0,2,0,0,'malfurion stormrage EMOTE_MALFURION'), +(-1109001,'Be steadfast, champion. I know why it is that you are here and I know what it is that you seek. Eranikus will not give up the shard freely. He has been twisted... twisted by the same force that you seek to destroy.',0,0,0,0,'malfurion stormrge SAY_MALFURION1'), +(-1109002,'Are you really surprised? Is it hard to believe that the power of an Old God could reach even inside the Dream? It is true - Eranikus, Tyrant of the Dream, wages a battle against us all. The Nightmare follows in his wake of destruction.',0,0,0,0,'malfurion stormrge SAY_MALFURION2'), +(-1109003,'Understand this, Eranikus wants nothing more than to be brought to Azeroth from the Dream. Once he is out, he will stop at nothing to destroy my physical manifestation. This, however, is the only way in which you could recover the scepter shard.',0,0,0,0,'malfurion stormrge SAY_MAFLURION3'), +(-1109004,'You will bring him back into this world, champion.',0,0,0,0,'malfurion Stormrge SAY_MALFURION4'); diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 967507c12..cbaf10892 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -903,6 +903,9 @@ UPDATE gameobject_template SET ScriptName='go_gauntlet_gate' WHERE entry=175357; /* SUNKEN TEMPLE */ UPDATE instance_template SET script='instance_sunken_temple' WHERE map=109; +DELETE FROM areatrigger_scripts WHERE entry=4016; +INSERT INTO areatrigger_scripts VALUES (4016,'at_shade_of_eranikus'); +UPDATE creature_template SET ScriptName='npc_malfurion_stormrage' WHERE entry=15362; /* SUNWELL PLATEAU */ UPDATE instance_template SET script='instance_sunwell_plateau' WHERE map=580; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index c5b896c43..c2146d44b 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3,7 +3,7 @@ -- DELETE FROM sd2_db_version; -INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for MaNGOS 8900+) '); +INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for MaNGOS 9062+) '); -- -- Below contains data for table `script_texts` mainly used in C++ parts. @@ -604,6 +604,12 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen -- -1 090 000 GNOMEREGAN -- -1 109 000 SUNKEN TEMPLE +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1109000,'The walls of the chamber tremble. Something is happening...',0,2,0,0,'malfurion stormrage EMOTE_MALFURION'), +(-1109001,'Be steadfast, champion. I know why it is that you are here and I know what it is that you seek. Eranikus will not give up the shard freely. He has been twisted... twisted by the same force that you seek to destroy.',0,0,0,0,'malfurion stormrge SAY_MALFURION1'), +(-1109002,'Are you really surprised? Is it hard to believe that the power of an Old God could reach even inside the Dream? It is true - Eranikus, Tyrant of the Dream, wages a battle against us all. The Nightmare follows in his wake of destruction.',0,0,0,0,'malfurion stormrge SAY_MALFURION2'), +(-1109003,'Understand this, Eranikus wants nothing more than to be brought to Azeroth from the Dream. Once he is out, he will stop at nothing to destroy my physical manifestation. This, however, is the only way in which you could recover the scepter shard.',0,0,0,0,'malfurion stormrge SAY_MAFLURION3'), +(-1109004,'You will bring him back into this world, champion.',0,0,0,0,'malfurion Stormrge SAY_MALFURION4'); -- -1 129 000 RAZORFEN DOWNS INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES From 21108ad367376be589485ce1e27dfd0ef64dd43e Mon Sep 17 00:00:00 2001 From: Insider Date: Mon, 28 Dec 2009 15:53:34 +0700 Subject: [PATCH 082/405] SD2 updated to 1528 --- .../nexus/nexus/boss_keristrasza.cpp | 15 +--- .../northrend/nexus/nexus/boss_telestra.cpp | 83 ++++++++++++++++--- .../halls_of_stone/boss_maiden_of_grief.cpp | 13 ++- .../ulduar/halls_of_stone/boss_sjonnir.cpp | 39 +++++++-- 4 files changed, 122 insertions(+), 28 deletions(-) diff --git a/scripts/northrend/nexus/nexus/boss_keristrasza.cpp b/scripts/northrend/nexus/nexus/boss_keristrasza.cpp index 37b66c840..e400d9640 100644 --- a/scripts/northrend/nexus/nexus/boss_keristrasza.cpp +++ b/scripts/northrend/nexus/nexus/boss_keristrasza.cpp @@ -171,22 +171,16 @@ struct MANGOS_DLL_DECL boss_keristraszaAI : public ScriptedAI if (uiTailSweepTimer < uiDiff) { - if (!m_creature->IsNonMeleeSpellCasted(false)) - { - DoCast(m_creature, SPELL_TAIL_SWEEP); + if (DoCastSpellIfCan(m_creature, SPELL_TAIL_SWEEP) == CAST_OK) uiTailSweepTimer = urand(2500, 7500); - } } else uiCrystalChainTimer -= uiDiff; if (uiCrystalfireBreathTimer < uiDiff) { - if (!m_creature->IsNonMeleeSpellCasted(false)) - { - DoCast(m_creature, m_bIsRegularMode ? SPELL_CRYSTALFIRE_BREATH : SPELL_CRYSTALFIRE_BREATH_H); + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_CRYSTALFIRE_BREATH : SPELL_CRYSTALFIRE_BREATH_H) == CAST_OK) uiCrystalfireBreathTimer = urand(15000, 20000); - } } else uiCrystalfireBreathTimer -= uiDiff; @@ -195,11 +189,10 @@ struct MANGOS_DLL_DECL boss_keristraszaAI : public ScriptedAI { if (uiCrystallizeTimer < uiDiff) { - if (!m_creature->IsNonMeleeSpellCasted(false)) + if (DoCastSpellIfCan(m_creature, SPELL_CRYSTALLIZE) == CAST_OK) { - DoScriptText(SAY_CRYSTAL_NOVA, m_creature); - DoCast(m_creature, SPELL_CRYSTALLIZE); uiCrystallizeTimer = urand(15000, 25000); + DoScriptText(SAY_CRYSTAL_NOVA, m_creature); } } else diff --git a/scripts/northrend/nexus/nexus/boss_telestra.cpp b/scripts/northrend/nexus/nexus/boss_telestra.cpp index fd4df7efa..7b9facf68 100644 --- a/scripts/northrend/nexus/nexus/boss_telestra.cpp +++ b/scripts/northrend/nexus/nexus/boss_telestra.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Telestra -SD%Complete: 30% -SDComment: phase 2 and 3 todo +SD%Complete: 80% +SDComment: script depend on database spell support and eventAi for clones. transition to phase 2 also not fully implemented SDCategory: Nexus EndScriptData */ @@ -51,7 +51,7 @@ enum SPELL_SUMMON_ARCANE = 47708, SPELL_SUMMON_FROST = 47709, - SPELL_FIRE_DIES = 47711, + SPELL_FIRE_DIES = 47711, // cast by clones at their death SPELL_ARCANE_DIES = 47713, SPELL_FROST_DIES = 47712, @@ -63,7 +63,8 @@ enum PHASE_1 = 1, PHASE_2 = 2, - PHASE_3 = 3 + PHASE_3 = 3, + PHASE_4 = 4 }; /*###### @@ -83,6 +84,7 @@ struct MANGOS_DLL_DECL boss_telestraAI : public ScriptedAI bool m_bIsRegularMode; uint8 m_uiPhase; + uint8 m_uiCloneDeadCount; uint32 m_uiFirebombTimer; uint32 m_uiIceNovaTimer; @@ -91,12 +93,18 @@ struct MANGOS_DLL_DECL boss_telestraAI : public ScriptedAI void Reset() { m_uiPhase = PHASE_1; + m_uiCloneDeadCount = 0; m_uiFirebombTimer = urand(2000, 4000); m_uiIceNovaTimer = urand(8000, 12000); m_uiGravityWellTimer = urand(15000, 25000); } + void JustReachedHome() + { + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + } + void AttackStart(Unit* pWho) { if (m_creature->Attack(pWho, true)) @@ -128,6 +136,46 @@ struct MANGOS_DLL_DECL boss_telestraAI : public ScriptedAI DoScriptText(SAY_KILL, m_creature); } + void SpellHit(Unit* pCaster, const SpellEntry *pSpell) + { + switch(pSpell->Id) + { + // eventAi must make sure clones cast spells when each of them die + case SPELL_FIRE_DIES: + case SPELL_ARCANE_DIES: + case SPELL_FROST_DIES: + { + ++m_uiCloneDeadCount; + + if (m_uiCloneDeadCount == 3 || m_uiCloneDeadCount == 6) + { + m_creature->RemoveAurasDueToSpell(SPELL_SUMMON_CLONES); + m_creature->CastSpell(m_creature, SPELL_SPAWN_BACK_IN, false); + + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + + DoScriptText(SAY_MERGE, m_creature); + + m_uiPhase = m_uiCloneDeadCount == 3 ? PHASE_3 : PHASE_4; + } + break; + } + case SPELL_SUMMON_CLONES: + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + break; + } + } + + void JustSummoned(Creature* pSummoned) + { + switch(pSummoned->GetEntry()) + { + case NPC_TELEST_FIRE: pSummoned->CastSpell(pSummoned, SPELL_FIRE_VISUAL, true); break; + case NPC_TELEST_ARCANE: pSummoned->CastSpell(pSummoned, SPELL_ARCANE_VISUAL, true); break; + case NPC_TELEST_FROST: pSummoned->CastSpell(pSummoned, SPELL_FROST_VISUAL, true); break; + } + } + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -136,6 +184,8 @@ struct MANGOS_DLL_DECL boss_telestraAI : public ScriptedAI switch(m_uiPhase) { case PHASE_1: + case PHASE_3: + case PHASE_4: { if (!m_creature->GetCurrentSpell(CURRENT_CHANNELED_SPELL)) { @@ -149,12 +199,30 @@ struct MANGOS_DLL_DECL boss_telestraAI : public ScriptedAI if (m_uiIceNovaTimer < uiDiff) { - if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_ICE_NOVA : SPELL_ICE_NOVA_H, CAST_INTURRUPT_PREVIOUS) == CAST_OK) + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_ICE_NOVA : SPELL_ICE_NOVA_H) == CAST_OK) m_uiIceNovaTimer = urand(10000, 15000); } else m_uiIceNovaTimer -= uiDiff; + if (m_uiPhase == PHASE_1 && m_creature->GetHealth()*100 < m_creature->GetMaxHealth()*50) + { + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_CLONES, CAST_INTURRUPT_PREVIOUS) == CAST_OK) + { + DoScriptText(urand(0, 1) ? SAY_SPLIT_1 : SAY_SPLIT_2, m_creature); + m_uiPhase = PHASE_2; + } + } + + if (m_uiPhase == PHASE_3 && !m_bIsRegularMode && m_creature->GetHealth()*100 < m_creature->GetMaxHealth()*15) + { + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_CLONES, CAST_INTURRUPT_PREVIOUS) == CAST_OK) + { + DoScriptText(urand(0, 1) ? SAY_SPLIT_1 : SAY_SPLIT_2, m_creature); + m_uiPhase = PHASE_2; + } + } + DoMeleeAttackIfReady(); } @@ -172,11 +240,6 @@ struct MANGOS_DLL_DECL boss_telestraAI : public ScriptedAI { break; } - case PHASE_3: - { - DoMeleeAttackIfReady(); - break; - } } } }; diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp index 679f3f120..c90eff14b 100644 --- a/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp @@ -31,7 +31,18 @@ enum SAY_SLAY_3 = -1599008, SAY_SLAY_4 = -1599009, SAY_STUN = -1599010, - SAY_DEATH = -1599011 + SAY_DEATH = -1599011, + + SPELL_STORM_OF_GRIEF = 50752, + SPELL_STORM_OF_GRIEF_H = 59772, + + SPELL_SHOCK_OF_SORROW = 50760, + SPELL_SHOCK_OF_SORROW_H = 59726, + + SPELL_PILLAR_OF_WOE = 50761, + SPELL_PILLAR_OF_WOE_H = 59727, + + SPELL_PARTING_SORROW = 59723 }; /*###### diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp index 76dc06d08..78ac5b09e 100644 --- a/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp @@ -25,12 +25,39 @@ EndScriptData */ enum { - SAY_AGGRO = -1599000, - SAY_SLAY_1 = -1599001, - SAY_SLAY_2 = -1599002, - SAY_SLAY_3 = -1599003, - SAY_DEATH = -1599004, - EMOTE_GENERIC_FRENZY = -1000002 + SAY_AGGRO = -1599000, + SAY_SLAY_1 = -1599001, + SAY_SLAY_2 = -1599002, + SAY_SLAY_3 = -1599003, + SAY_DEATH = -1599004, + EMOTE_GENERIC_FRENZY = -1000002, + + SPELL_FRENZY = 28747, + + SPELL_CHAIN_LIGHTNING = 50830, + SPELL_CHAIN_LIGHTNING_H = 59844, + + SPELL_STATIC_CHARGE = 50834, + SPELL_STATIC_CHARGE_H = 59846, + + SPELL_LIGHTNING_SHIELD = 50831, + SPELL_LIGHTNING_SHIELD_H = 59845, + + SPELL_LIGHTNING_RING = 50840, + SPELL_LIGHTNING_RING_H = 59848, + + SPELL_SUMMON_IRON_TROGG = 50792, // periodic dummy aura, tick each 10sec or each 7sec in heroic + SPELL_SUMMON_IRON_TROGG_H = 59859, // left/right 50790,50791 + + SPELL_SUMMON_MALFORMED_OOZE = 50801, // periodic dummy aura, tick each 5sec or each 3sec in heroic + SPELL_SUMMON_MALFORMED_OOZE_H = 59858, // left/right 50802,50803 + + SPELL_SUMMON_IRON_SLUDGE = 50747, // instakill TARGET_SCRIPT + SPELL_IRON_SLUDGE_SPAWN_VISUAL = 50777, + + NPC_IRON_TROGG = 27979, + NPC_MALFORMED_OOZE = 27981, + NPC_IRON_SLUDGE = 28165 }; /*###### From 8a4e832a0e81495db96482079e2f34ec5e590556 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Mon, 28 Dec 2009 20:40:42 +0300 Subject: [PATCH 083/405] Small change for preview merge --- scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp index 6a70e97be..eeee4c46f 100644 --- a/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp @@ -25,7 +25,6 @@ EndScriptData */ enum { -<<<<<<< HEAD:scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp SAY_AGGRO = -1599000, SAY_SLAY_1 = -1599001, SAY_SLAY_2 = -1599002, From ae6edf8128b9ffbe7b23a7fab52345539e2b70bf Mon Sep 17 00:00:00 2001 From: Insider Date: Tue, 29 Dec 2009 15:26:52 +0700 Subject: [PATCH 084/405] SD2 updated to 1529 --- sql/Updates/r1525_scriptdev2.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/Updates/r1525_scriptdev2.sql b/sql/Updates/r1525_scriptdev2.sql index 73b997c92..1568e4c9a 100644 --- a/sql/Updates/r1525_scriptdev2.sql +++ b/sql/Updates/r1525_scriptdev2.sql @@ -1,4 +1,4 @@ -DELETE FROM script_texts WHERE entry BETWEEN -1109004 AND -11090000; +DELETE FROM script_texts WHERE entry BETWEEN -1109004 AND -1109000; INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES (-1109000,'The walls of the chamber tremble. Something is happening...',0,2,0,0,'malfurion stormrage EMOTE_MALFURION'), (-1109001,'Be steadfast, champion. I know why it is that you are here and I know what it is that you seek. Eranikus will not give up the shard freely. He has been twisted... twisted by the same force that you seek to destroy.',0,0,0,0,'malfurion stormrge SAY_MALFURION1'), From 44b0b1ab883b0c27fc15dfea0815679d02e3764d Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Tue, 29 Dec 2009 18:47:47 +0300 Subject: [PATCH 085/405] Trial of the champion rewrite --- addition/715_trial_of_the_champion_mangos.sql | 8 +- .../boss_argent_challenge.cpp | 241 +++++------------- .../boss_black_knight.cpp | 18 +- .../boss_grand_champions.cpp | 233 +++++++---------- .../instance_trial_of_the_champion.cpp | 17 +- .../trial_of_the_champion.cpp | 12 +- .../trial_of_the_champion.h | 24 +- 7 files changed, 202 insertions(+), 351 deletions(-) diff --git a/addition/715_trial_of_the_champion_mangos.sql b/addition/715_trial_of_the_champion_mangos.sql index 1017f19e3..3c2230c56 100644 --- a/addition/715_trial_of_the_champion_mangos.sql +++ b/addition/715_trial_of_the_champion_mangos.sql @@ -18,4 +18,10 @@ UPDATE creature_template SET scriptname='mob_toc5_memory' WHERE entry IN (35052, -- black knight UPDATE creature_template SET faction_a=14, faction_h=14, scriptname='mob_toc5_risen_ghoul' WHERE entry IN (35545, 35564); -UPDATE creature_template SET scriptname='boss_black_knight' WHERE entry=35451; \ No newline at end of file +UPDATE creature_template SET scriptname='boss_black_knight' WHERE entry=35451; + +-- free spells for creatures +UPDATE `mangos`.`creature_template` SET `spell1` = '0',`spell2` = '0',`spell3` = '0',`spell4` = '0' WHERE `creature_template`.`entry` IN +(34705,34702,34701,34657,34703,35572,35569,35571,35570,35617,35119,34928,35451,35545,35564,35004,35005,35052,35041,35033,35046,35043,35047,35044,35039,35034,35049,35030,34942,35050,35042,35045,35037,35031,35038,35029,35048,35032,35028,35040,35036,35051); +UPDATE `mangos`.`creature_template` SET `spell1` = '0',`spell2` = '0',`spell3` = '0',`spell4` = '0' WHERE `creature_template`.`entry` IN +(12002,12001,12000,12003,12004,12010,12484,12485,12447,12454,12441,12438,12453,12443,12437,12445,12725,12452,12486,12442,12482,12440,12483,12451,12456,12449,12455,12450,12487,12446,12011,12012,12436,12005,12007,12006,12009,12008); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp index 39002ce38..fa28ef453 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp @@ -60,10 +60,11 @@ struct MANGOS_DLL_DECL boss_eadricAI : public ScriptedAI { Reset(); m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); } ScriptedInstance* m_pInstance; - bool m_bIsRegularMode; + bool m_bIsRegularMode; uint32 Vengeance_Timer; uint32 Radiance_Timer; @@ -109,7 +110,7 @@ struct MANGOS_DLL_DECL boss_eadricAI : public ScriptedAI { if (!m_pInstance) return; - m_creature->ForcedDespawn(); +// m_creature->ForcedDespawn(); m_pInstance->SetData(TYPE_ARGENT_CHALLENGE, DONE); } @@ -164,10 +165,11 @@ struct MANGOS_DLL_DECL boss_paletressAI : public ScriptedAI { Reset(); m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); } ScriptedInstance* m_pInstance; - bool m_bIsRegularMode; + bool m_bIsRegularMode; uint32 Smite_Timer; uint32 Holy_Fire_Timer; @@ -191,6 +193,13 @@ struct MANGOS_DLL_DECL boss_paletressAI : public ScriptedAI shielded = false; } + void JustSummoned(Creature* _summoned) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + _summoned->AddThreat(target); + summoned = true; + } + void EnterEvadeMode() { m_creature->RemoveAurasDueToSpell(SPELL_SHIELD); @@ -221,7 +230,6 @@ struct MANGOS_DLL_DECL boss_paletressAI : public ScriptedAI { if (!m_pInstance) return; - m_creature->ForcedDespawn(); m_pInstance->SetData(TYPE_ARGENT_CHALLENGE, DONE); } @@ -250,225 +258,99 @@ struct MANGOS_DLL_DECL boss_paletressAI : public ScriptedAI m_creature->CastStop(m_bIsRegularMode ? SPELL_SMITE : SPELL_SMITE_H); m_creature->CastStop(m_bIsRegularMode ? SPELL_HOLY_FIRE : SPELL_HOLY_FIRE_H); switch(urand(0, 1)) - { + { case 0: if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_MEMORY)))) if (pTemp->isAlive()) DoCast(pTemp, m_bIsRegularMode ? SPELL_RENEW : SPELL_RENEW_H); else - DoCast(pTemp, m_bIsRegularMode ? SPELL_RENEW : SPELL_RENEW_H); + DoCast(m_creature, m_bIsRegularMode ? SPELL_RENEW : SPELL_RENEW_H); break; - case 1: + case 1: DoCast(m_creature, m_bIsRegularMode ? SPELL_RENEW : SPELL_RENEW_H); break; } Renew_Timer = 25000; }else Renew_Timer -= diff; - if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 35 && !summoned) - { + if (((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 35 ) && !summoned ) + { m_creature->CastStop(m_bIsRegularMode ? SPELL_SMITE : SPELL_SMITE_H); m_creature->CastStop(m_bIsRegularMode ? SPELL_HOLY_FIRE : SPELL_HOLY_FIRE_H); DoCast(m_creature, SPELL_HOLY_NOVA); switch(urand(0, 24)) - { - case 0: - if (Creature* pTemp = m_creature->SummonCreature(MEMORY_ALGALON, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) - { - pTemp->AddThreat(m_creature->getVictim(),1000.0f); - pTemp->AI()->AttackStart(m_creature->getVictim()); - } - break; - case 1: - if (Creature* pTemp = m_creature->SummonCreature(MEMORY_CHROMAGGUS, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) - { - pTemp->AddThreat(m_creature->getVictim(),1000.0f); - pTemp->AI()->AttackStart(m_creature->getVictim()); - } + { + case 0: m_creature->SummonCreature(MEMORY_ALGALON, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + break; + case 1: m_creature->SummonCreature(MEMORY_CHROMAGGUS, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; - case 2: - if (Creature* pTemp = m_creature->SummonCreature(MEMORY_CYANIGOSA, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) - { - pTemp->AddThreat(m_creature->getVictim(),1000.0f); - pTemp->AI()->AttackStart(m_creature->getVictim()); - } + case 2: m_creature->SummonCreature(MEMORY_CYANIGOSA, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; - case 3: - if (Creature* pTemp = m_creature->SummonCreature(MEMORY_DELRISSA, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) - { - pTemp->AddThreat(m_creature->getVictim(),1000.0f); - pTemp->AI()->AttackStart(m_creature->getVictim()); - } + case 3: m_creature->SummonCreature(MEMORY_DELRISSA, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; - case 4: - if (Creature* pTemp = m_creature->SummonCreature(MEMORY_ECK, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) - { - pTemp->AddThreat(m_creature->getVictim(),1000.0f); - pTemp->AI()->AttackStart(m_creature->getVictim()); - } + case 4: m_creature->SummonCreature(MEMORY_ECK, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; - case 5: - if (Creature* pTemp = m_creature->SummonCreature(MEMORY_ENTROPIUS, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) - { - pTemp->AddThreat(m_creature->getVictim(),1000.0f); - pTemp->AI()->AttackStart(m_creature->getVictim()); - } + case 5: m_creature->SummonCreature(MEMORY_ENTROPIUS, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; - case 6: - if (Creature* pTemp = m_creature->SummonCreature(MEMORY_GRUUL, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) - { - pTemp->AddThreat(m_creature->getVictim(),1000.0f); - pTemp->AI()->AttackStart(m_creature->getVictim()); - } + case 6: m_creature->SummonCreature(MEMORY_GRUUL, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; - case 7: - if (Creature* pTemp = m_creature->SummonCreature(MEMORY_HAKKAR, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) - { - pTemp->AddThreat(m_creature->getVictim(),1000.0f); - pTemp->AI()->AttackStart(m_creature->getVictim()); - } + case 7: m_creature->SummonCreature(MEMORY_HAKKAR, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; - case 8: - if (Creature* pTemp = m_creature->SummonCreature(MEMORY_HEIGAN, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) - { - pTemp->AddThreat(m_creature->getVictim(),1000.0f); - pTemp->AI()->AttackStart(m_creature->getVictim()); - } + case 8: m_creature->SummonCreature(MEMORY_HEIGAN, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; - case 9: - if (Creature* pTemp = m_creature->SummonCreature(MEMORY_HEROD, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) - { - pTemp->AddThreat(m_creature->getVictim(),1000.0f); - pTemp->AI()->AttackStart(m_creature->getVictim()); - } + case 9: m_creature->SummonCreature(MEMORY_HEROD, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; - case 10: - if (Creature* pTemp = m_creature->SummonCreature(MEMORY_HOGGER, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) - { - pTemp->AddThreat(m_creature->getVictim(),1000.0f); - pTemp->AI()->AttackStart(m_creature->getVictim()); - } + case 10: m_creature->SummonCreature(MEMORY_HOGGER, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; - case 11: - if (Creature* pTemp = m_creature->SummonCreature(MEMORY_IGNIS, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) - { - pTemp->AddThreat(m_creature->getVictim(),1000.0f); - pTemp->AI()->AttackStart(m_creature->getVictim()); - } + case 11: m_creature->SummonCreature(MEMORY_IGNIS, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; - case 12: - if (Creature* pTemp = m_creature->SummonCreature(MEMORY_ILLIDAN, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) - { - pTemp->AddThreat(m_creature->getVictim(),1000.0f); - pTemp->AI()->AttackStart(m_creature->getVictim()); - } + case 12: m_creature->SummonCreature(MEMORY_ILLIDAN, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; - case 13: - if (Creature* pTemp = m_creature->SummonCreature(MEMORY_INGVAR, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) - { - pTemp->AddThreat(m_creature->getVictim(),1000.0f); - pTemp->AI()->AttackStart(m_creature->getVictim()); - } + case 13: m_creature->SummonCreature(MEMORY_INGVAR, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; - case 14: - if (Creature* pTemp = m_creature->SummonCreature(MEMORY_KALITHRESH, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) - { - pTemp->AddThreat(m_creature->getVictim(),1000.0f); - pTemp->AI()->AttackStart(m_creature->getVictim()); - } + case 14: m_creature->SummonCreature(MEMORY_KALITHRESH, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; - case 15: - if (Creature* pTemp = m_creature->SummonCreature(MEMORY_LUCIFRON, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) - { - pTemp->AddThreat(m_creature->getVictim(),1000.0f); - pTemp->AI()->AttackStart(m_creature->getVictim()); - } + case 15: m_creature->SummonCreature(MEMORY_LUCIFRON, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; - case 16: - if (Creature* pTemp = m_creature->SummonCreature(MEMORY_MALCHEZAAR, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) - { - pTemp->AddThreat(m_creature->getVictim(),1000.0f); - pTemp->AI()->AttackStart(m_creature->getVictim()); - } + case 16: m_creature->SummonCreature(MEMORY_MALCHEZAAR, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; - case 17: - if (Creature* pTemp = m_creature->SummonCreature(MEMORY_MUTANUS, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) - { - pTemp->AddThreat(m_creature->getVictim(),1000.0f); - pTemp->AI()->AttackStart(m_creature->getVictim()); - } + case 17: m_creature->SummonCreature(MEMORY_MUTANUS, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; - case 18: - if (Creature* pTemp = m_creature->SummonCreature(MEMORY_ONYXIA, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) - { - pTemp->AddThreat(m_creature->getVictim(),1000.0f); - pTemp->AI()->AttackStart(m_creature->getVictim()); - } + case 18: m_creature->SummonCreature(MEMORY_ONYXIA, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; - case 19: - if (Creature* pTemp = m_creature->SummonCreature(MEMORY_THUNDERAAN, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) - { - pTemp->AddThreat(m_creature->getVictim(),1000.0f); - pTemp->AI()->AttackStart(m_creature->getVictim()); - } + case 19: m_creature->SummonCreature(MEMORY_THUNDERAAN, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; - case 20: - if (Creature* pTemp = m_creature->SummonCreature(MEMORY_VANCLEEF, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) - { - pTemp->AddThreat(m_creature->getVictim(),1000.0f); - pTemp->AI()->AttackStart(m_creature->getVictim()); - } + case 20: m_creature->SummonCreature(MEMORY_VANCLEEF, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; - case 21: - if (Creature* pTemp = m_creature->SummonCreature(MEMORY_VASHJ, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) - { - pTemp->AddThreat(m_creature->getVictim(),1000.0f); - pTemp->AI()->AttackStart(m_creature->getVictim()); - } + case 21: m_creature->SummonCreature(MEMORY_VASHJ, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; - case 22: - if (Creature* pTemp = m_creature->SummonCreature(MEMORY_VEKNILASH, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) - { - pTemp->AddThreat(m_creature->getVictim(),1000.0f); - pTemp->AI()->AttackStart(m_creature->getVictim()); - } + case 22: m_creature->SummonCreature(MEMORY_VEKNILASH, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; - case 23: - if (Creature* pTemp = m_creature->SummonCreature(MEMORY_VEZAX, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) - { - pTemp->AddThreat(m_creature->getVictim(),1000.0f); - pTemp->AI()->AttackStart(m_creature->getVictim()); - } + case 23: m_creature->SummonCreature(MEMORY_VEZAX, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; - case 24: - if (Creature* pTemp = m_creature->SummonCreature(MEMORY_ARCHIMONDE, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000)) - { - pTemp->AddThreat(m_creature->getVictim(),1000.0f); - pTemp->AI()->AttackStart(m_creature->getVictim()); - } + case 24: m_creature->SummonCreature(MEMORY_ARCHIMONDE, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; - } - summoned = true; - Shield_Delay = 1000; - } - + + } + Shield_Delay = 1000; + }; if (Shield_Delay < diff && !shielded && summoned) { m_creature->CastStop(m_bIsRegularMode ? SPELL_SMITE : SPELL_SMITE_H); m_creature->CastStop(m_bIsRegularMode ? SPELL_HOLY_FIRE : SPELL_HOLY_FIRE_H); DoCast(m_creature, SPELL_SHIELD); - shielded = true; - Shield_Check = 1000; + shielded = true; + Shield_Check = m_bIsRegularMode ? 3000 : 5000; }else Shield_Delay -= diff; if (Shield_Check < diff && shielded) { - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_MEMORY)))) + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_MEMORY)))) if (!pTemp->isAlive()) { m_creature->RemoveAurasDueToSpell(SPELL_SHIELD); shielded = false; - }else Shield_Check = 1000; + } else Shield_Check = 1000; }else Shield_Check -= diff; DoMeleeAttackIfReady(); @@ -487,10 +369,11 @@ struct MANGOS_DLL_DECL mob_toc5_memoryAI : public ScriptedAI { Reset(); m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); } ScriptedInstance* m_pInstance; - bool m_bIsRegularMode; + bool m_bIsRegularMode; uint32 Old_Wounds_Timer; uint32 Shadows_Timer; @@ -503,6 +386,12 @@ struct MANGOS_DLL_DECL mob_toc5_memoryAI : public ScriptedAI Fear_Timer = 13000; } + void JustDied(Unit* pKiller) + { + if (!m_pInstance) + return; + } + void UpdateAI(const uint32 diff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -543,16 +432,16 @@ void AddSC_boss_argent_challenge() NewScript = new Script; NewScript->Name = "boss_eadric"; - NewScript->GetAI = &GetAI_boss_eadric; + NewScript->GetAI = &GetAI_boss_eadric; NewScript->RegisterSelf(); - NewScript = new Script; + NewScript = new Script; NewScript->Name = "boss_paletress"; - NewScript->GetAI = &GetAI_boss_paletress; + NewScript->GetAI = &GetAI_boss_paletress; NewScript->RegisterSelf(); - NewScript = new Script; + NewScript = new Script; NewScript->Name = "mob_toc5_memory"; - NewScript->GetAI = &GetAI_mob_toc5_memory; + NewScript->GetAI = &GetAI_mob_toc5_memory; NewScript->RegisterSelf(); } \ No newline at end of file diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp index 6ca04d69e..920fcc298 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp @@ -61,10 +61,11 @@ struct MANGOS_DLL_DECL mob_toc5_risen_ghoulAI : public ScriptedAI { Reset(); m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); } ScriptedInstance* m_pInstance; - bool m_bIsRegularMode; + bool m_bIsRegularMode; uint32 Attack; @@ -99,7 +100,7 @@ struct MANGOS_DLL_DECL mob_toc5_risen_ghoulAI : public ScriptedAI }else Attack -= diff; if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 25) - DoCast(m_creature, m_bIsRegularMode ? SPELL_EXPLODE : SPELL_EXPLODE_H); + DoCast(m_creature, m_bIsRegularMode ? SPELL_EXPLODE : SPELL_EXPLODE_H); DoMeleeAttackIfReady(); } @@ -117,10 +118,11 @@ struct MANGOS_DLL_DECL boss_black_knightAI : public ScriptedAI { Reset(); m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); } ScriptedInstance* m_pInstance; - bool m_bIsRegularMode; + bool m_bIsRegularMode; uint32 Plague_Strike_Timer; uint32 Icy_Touch_Timer; @@ -271,9 +273,9 @@ struct MANGOS_DLL_DECL boss_black_knightAI : public ScriptedAI if (Summon_Ghoul < diff && phase1 && !ghoul) { if (m_pInstance->GetData(DATA_TOC5_ANNOUNCER) == m_pInstance->GetData(DATA_JAEREN)) - m_creature->SummonCreature(NPC_RISEN_JAEREN, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + m_creature->SummonCreature(NPC_RISEN_JAEREN, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); else - m_creature->SummonCreature(NPC_RISEN_ARELAS, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + m_creature->SummonCreature(NPC_RISEN_ARELAS, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); ghoul = true; }else Summon_Ghoul -= diff; @@ -305,11 +307,11 @@ void AddSC_boss_black_knight() NewScript = new Script; NewScript->Name = "mob_toc5_risen_ghoul"; - NewScript->GetAI = &GetAI_mob_toc5_risen_ghoul; + NewScript->GetAI = &GetAI_mob_toc5_risen_ghoul; NewScript->RegisterSelf(); - NewScript = new Script; + NewScript = new Script; NewScript->Name = "boss_black_knight"; - NewScript->GetAI = &GetAI_boss_black_knight; + NewScript->GetAI = &GetAI_boss_black_knight; NewScript->RegisterSelf(); } \ No newline at end of file diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp index 22a9d5860..dc9111889 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp @@ -30,7 +30,7 @@ enum //warrior SPELL_MORTAL_STRIKE = 68783, - SPELL_MORTAL_STRIKE_H = 68784, + SPELL_MORTAL_STRIKE_H = 68784, SPELL_BLADESTORM = 63784, SPELL_INTERCEPT = 67540, SPELL_ROLLING_THROW = 47115, //need core support for spell 67546, using 47115 instead @@ -39,21 +39,21 @@ enum SPELL_FIREBALL_H = 68310, SPELL_BLAST_WAVE = 66044, SPELL_BLAST_WAVE_H = 68312, - SPELL_HASTE = 66045, + SPELL_HASTE = 66045, SPELL_POLYMORPH = 66043, SPELL_POLYMORPH_H = 68311, //shaman - SPELL_CHAIN_LIGHTNING = 67529, - SPELL_CHAIN_LIGHTNING_H = 68319, + SPELL_CHAIN_LIGHTNING = 67529, + SPELL_CHAIN_LIGHTNING_H = 68319, SPELL_EARTH_SHIELD = 67530, SPELL_HEALING_WAVE = 67528, - SPELL_HEALING_WAVE_H = 68318, - SPELL_HEX_OF_MENDING = 67534, + SPELL_HEALING_WAVE_H = 68318, + SPELL_HEX_OF_MENDING = 67534, //hunter SPELL_DISENGAGE = 68340, - SPELL_LIGHTNING_ARROWS = 66083, + SPELL_LIGHTNING_ARROWS = 66083, SPELL_MULTI_SHOT = 66081, - SPELL_SHOOT = 66079, + SPELL_SHOOT = 66079, //rogue SPELL_EVISCERATE = 67709, SPELL_EVISCERATE_H = 68317, @@ -68,6 +68,7 @@ struct MANGOS_DLL_DECL mob_toc5_warriorAI : public ScriptedAI { Reset(); m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); } ScriptedInstance* m_pInstance; @@ -82,16 +83,16 @@ struct MANGOS_DLL_DECL mob_toc5_warriorAI : public ScriptedAI void Reset() { m_creature->SetRespawnDelay(999999999); - Mortal_Strike_Timer = 6000; - Bladestorm_Timer = 20000; - Rolling_Throw_Timer = 30000; + Mortal_Strike_Timer = m_bIsRegularMode ? 9000 : 6000; + Bladestorm_Timer = m_bIsRegularMode ? 30000 : 20000; + Rolling_Throw_Timer = m_bIsRegularMode ? 45000 : 30000; Intercept_Cooldown = 0; intercept_check = 1000; } void EnterEvadeMode() { - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) +/* if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) if (!pTemp->isAlive()) { pTemp->Respawn(); @@ -132,7 +133,7 @@ struct MANGOS_DLL_DECL mob_toc5_warriorAI : public ScriptedAI pTemp->SetHealth(pTemp->GetMaxHealth()); pTemp->SendMonsterMove(754.360779, 660.816162, 412.395996, 4.698700, pTemp->GetMonsterMoveFlags(), 1); pTemp->GetMap()->CreatureRelocation(pTemp, 754.360779, 660.816162, 412.395996, 4.698700); - } + }*/ } void Aggro(Unit* pWho) @@ -157,26 +158,14 @@ struct MANGOS_DLL_DECL mob_toc5_warriorAI : public ScriptedAI } void JustDied(Unit* pKiller) - { + { if (!m_pInstance) return; - if (Creature* pTemp0 = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) - if (!pTemp0->isAlive()) - if (Creature* pTemp1 = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) - if (!pTemp1->isAlive()) - if (Creature* pTemp2 = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) - if (!pTemp2->isAlive()) - { - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData(DATA_TOC5_ANNOUNCER)))) - pTemp->SetVisibility(VISIBILITY_ON); - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) - pTemp->ForcedDespawn(); - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) - pTemp->ForcedDespawn(); - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) - pTemp->ForcedDespawn(); - m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, DONE); - } + + m_pInstance->SetData(DATA_CHAMPIONS_COUNT, m_pInstance->GetData(DATA_CHAMPIONS_COUNT) - 1); + + if (m_pInstance->GetData(DATA_CHAMPIONS_COUNT) < 1) + m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, DONE); } void UpdateAI(const uint32 diff) @@ -187,19 +176,19 @@ struct MANGOS_DLL_DECL mob_toc5_warriorAI : public ScriptedAI if (Mortal_Strike_Timer < diff) { DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_MORTAL_STRIKE : SPELL_MORTAL_STRIKE_H); - Mortal_Strike_Timer = 6000; + Mortal_Strike_Timer = m_bIsRegularMode ? 9000 : 6000; }else Mortal_Strike_Timer -= diff; if (Rolling_Throw_Timer < diff) { DoCast(m_creature->getVictim(), SPELL_ROLLING_THROW); - Rolling_Throw_Timer = 30000; + Rolling_Throw_Timer = m_bIsRegularMode ? 45000 : 30000; }else Rolling_Throw_Timer -= diff; if (Bladestorm_Timer < diff) { DoCast(m_creature, SPELL_BLADESTORM); - Bladestorm_Timer = 90000; + Bladestorm_Timer = m_bIsRegularMode ? 90000 : 60000; }else Bladestorm_Timer -= diff; if (intercept_check < diff) @@ -233,6 +222,7 @@ struct MANGOS_DLL_DECL mob_toc5_mageAI : public ScriptedAI { Reset(); m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); } ScriptedInstance* m_pInstance; @@ -247,14 +237,14 @@ struct MANGOS_DLL_DECL mob_toc5_mageAI : public ScriptedAI { m_creature->SetRespawnDelay(999999999); Fireball_Timer = 0; - Blast_Wave_Timer = 20000; - Haste_Timer = 9000; - Polymorph_Timer = 15000; + Blast_Wave_Timer = m_bIsRegularMode ? 30000 : 20000; + Haste_Timer = m_bIsRegularMode ? 12000 : 9000; + Polymorph_Timer = m_bIsRegularMode ? 20000 : 15000; } void EnterEvadeMode() { - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) +/* if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) if (!pTemp->isAlive()) { pTemp->Respawn(); @@ -295,7 +285,7 @@ struct MANGOS_DLL_DECL mob_toc5_mageAI : public ScriptedAI pTemp->SetHealth(pTemp->GetMaxHealth()); pTemp->SendMonsterMove(754.360779, 660.816162, 412.395996, 4.698700, pTemp->GetMonsterMoveFlags(), 1); pTemp->GetMap()->CreatureRelocation(pTemp, 754.360779, 660.816162, 412.395996, 4.698700); - } + }*/ } void Aggro(Unit* pWho) @@ -320,26 +310,14 @@ struct MANGOS_DLL_DECL mob_toc5_mageAI : public ScriptedAI } void JustDied(Unit* pKiller) - { + { if (!m_pInstance) return; - if (Creature* pTemp0 = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) - if (!pTemp0->isAlive()) - if (Creature* pTemp1 = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) - if (!pTemp1->isAlive()) - if (Creature* pTemp2 = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) - if (!pTemp2->isAlive()) - { - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData(DATA_TOC5_ANNOUNCER)))) - pTemp->SetVisibility(VISIBILITY_ON); - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) - pTemp->ForcedDespawn(); - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) - pTemp->ForcedDespawn(); - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) - pTemp->ForcedDespawn(); - m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, DONE); - } + + m_pInstance->SetData(DATA_CHAMPIONS_COUNT, m_pInstance->GetData(DATA_CHAMPIONS_COUNT) - 1); + + if (m_pInstance->GetData(DATA_CHAMPIONS_COUNT) < 1) + m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, DONE); } void UpdateAI(const uint32 diff) @@ -350,26 +328,26 @@ struct MANGOS_DLL_DECL mob_toc5_mageAI : public ScriptedAI if (Fireball_Timer < diff) { DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_FIREBALL : SPELL_FIREBALL_H); - Fireball_Timer = 3000; + Fireball_Timer = m_bIsRegularMode ? 5000 : 3000; }else Fireball_Timer -= diff; if (Blast_Wave_Timer < diff) { DoCast(m_creature, m_bIsRegularMode ? SPELL_BLAST_WAVE : SPELL_BLAST_WAVE_H); - Blast_Wave_Timer = 20000; + Blast_Wave_Timer = m_bIsRegularMode ? 30000 : 20000; }else Blast_Wave_Timer -= diff; if (Haste_Timer < diff) { DoCast(m_creature, SPELL_HASTE); - Haste_Timer = 10000; + Haste_Timer = m_bIsRegularMode ? 15000 : 10000; }else Haste_Timer -= diff; if (Polymorph_Timer < diff) { if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1)) DoCast(target, m_bIsRegularMode ? SPELL_POLYMORPH : SPELL_POLYMORPH_H); - Polymorph_Timer = 15000; + Polymorph_Timer = m_bIsRegularMode ? 20000 : 15000; }else Polymorph_Timer -= diff; DoMeleeAttackIfReady(); @@ -388,10 +366,11 @@ struct MANGOS_DLL_DECL mob_toc5_shamanAI : public ScriptedAI { Reset(); m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); } ScriptedInstance* m_pInstance; - bool m_bIsRegularMode; + bool m_bIsRegularMode; uint32 Chain_Lightning_Timer; uint32 Earth_Shield_Timer; @@ -405,15 +384,15 @@ struct MANGOS_DLL_DECL mob_toc5_shamanAI : public ScriptedAI void Reset() { m_creature->SetRespawnDelay(999999999); - Chain_Lightning_Timer = 1000; - Earth_Shield_Timer = 5000; - Healing_Wave_Timer = 13000; - Hex_Timer = 10000; + Chain_Lightning_Timer = m_bIsRegularMode ? 2000 : 1000; + Earth_Shield_Timer = m_bIsRegularMode ? 10000 : 5000; + Healing_Wave_Timer = m_bIsRegularMode ? 20000 : 13000; + Hex_Timer = m_bIsRegularMode ? 15000 : 10000; } void EnterEvadeMode() { - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) +/* if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) if (!pTemp->isAlive()) { pTemp->Respawn(); @@ -454,7 +433,7 @@ struct MANGOS_DLL_DECL mob_toc5_shamanAI : public ScriptedAI pTemp->SetHealth(pTemp->GetMaxHealth()); pTemp->SendMonsterMove(754.360779, 660.816162, 412.395996, 4.698700, pTemp->GetMonsterMoveFlags(), 1); pTemp->GetMap()->CreatureRelocation(pTemp, 754.360779, 660.816162, 412.395996, 4.698700); - } + }*/ } void Aggro(Unit* pWho) @@ -479,26 +458,14 @@ struct MANGOS_DLL_DECL mob_toc5_shamanAI : public ScriptedAI } void JustDied(Unit* pKiller) - { + { if (!m_pInstance) return; - if (Creature* pTemp0 = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) - if (!pTemp0->isAlive()) - if (Creature* pTemp1 = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) - if (!pTemp1->isAlive()) - if (Creature* pTemp2 = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) - if (!pTemp2->isAlive()) - { - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData(DATA_TOC5_ANNOUNCER)))) - pTemp->SetVisibility(VISIBILITY_ON); - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) - pTemp->ForcedDespawn(); - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) - pTemp->ForcedDespawn(); - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) - pTemp->ForcedDespawn(); - m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, DONE); - } + + m_pInstance->SetData(DATA_CHAMPIONS_COUNT, m_pInstance->GetData(DATA_CHAMPIONS_COUNT) - 1); + + if (m_pInstance->GetData(DATA_CHAMPIONS_COUNT) < 1) + m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, DONE); } void UpdateAI(const uint32 diff) @@ -509,13 +476,13 @@ struct MANGOS_DLL_DECL mob_toc5_shamanAI : public ScriptedAI if (Chain_Lightning_Timer < diff) { DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_CHAIN_LIGHTNING : SPELL_CHAIN_LIGHTNING_H); - Chain_Lightning_Timer = 10000; + Chain_Lightning_Timer = m_bIsRegularMode ? 15000 : 10000; }else Chain_Lightning_Timer -= diff; if (Hex_Timer < diff) { DoCast(m_creature->getVictim(), SPELL_HEX_OF_MENDING); - Hex_Timer = 20000; + Hex_Timer = m_bIsRegularMode ? 30000 : 20000; }else Hex_Timer -= diff; if (Healing_Wave_Timer < diff) @@ -558,14 +525,14 @@ struct MANGOS_DLL_DECL mob_toc5_shamanAI : public ScriptedAI else DoCast(m_creature, SPELL_EARTH_SHIELD); break; - case 1: + case 1: if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) if (pTemp->isAlive()) DoCast(pTemp, SPELL_EARTH_SHIELD); else DoCast(m_creature, SPELL_EARTH_SHIELD); break; - case 2: + case 2: if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) if (pTemp->isAlive()) DoCast(pTemp, SPELL_EARTH_SHIELD); @@ -573,7 +540,7 @@ struct MANGOS_DLL_DECL mob_toc5_shamanAI : public ScriptedAI DoCast(m_creature, SPELL_EARTH_SHIELD); break; } - Earth_Shield_Timer = 25000; + Earth_Shield_Timer = m_bIsRegularMode ? 35000 : 25000; }else Earth_Shield_Timer -= diff; DoMeleeAttackIfReady(); @@ -592,10 +559,11 @@ struct MANGOS_DLL_DECL mob_toc5_hunterAI : public ScriptedAI { Reset(); m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); } ScriptedInstance* m_pInstance; - bool m_bIsRegularMode; + bool m_bIsRegularMode; uint32 Shoot_Timer; uint32 Lightning_Arrows_Timer; @@ -608,8 +576,8 @@ struct MANGOS_DLL_DECL mob_toc5_hunterAI : public ScriptedAI { m_creature->SetRespawnDelay(999999999); Shoot_Timer = 0; - Lightning_Arrows_Timer = 13000; - Multi_Shot_Timer = 10000; + Lightning_Arrows_Timer = m_bIsRegularMode ? 18000 : 13000; + Multi_Shot_Timer = m_bIsRegularMode ? 15000 : 10000; Disengage_Cooldown = 0; enemy_check = 1000; disengage_check; @@ -617,7 +585,7 @@ struct MANGOS_DLL_DECL mob_toc5_hunterAI : public ScriptedAI void EnterEvadeMode() { - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) +/* if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) if (!pTemp->isAlive()) { pTemp->Respawn(); @@ -658,7 +626,7 @@ struct MANGOS_DLL_DECL mob_toc5_hunterAI : public ScriptedAI pTemp->SetHealth(pTemp->GetMaxHealth()); pTemp->SendMonsterMove(754.360779, 660.816162, 412.395996, 4.698700, pTemp->GetMonsterMoveFlags(), 1); pTemp->GetMap()->CreatureRelocation(pTemp, 754.360779, 660.816162, 412.395996, 4.698700); - } + }*/ } void Aggro(Unit* pWho) @@ -683,26 +651,14 @@ struct MANGOS_DLL_DECL mob_toc5_hunterAI : public ScriptedAI } void JustDied(Unit* pKiller) - { + { if (!m_pInstance) return; - if (Creature* pTemp0 = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) - if (!pTemp0->isAlive()) - if (Creature* pTemp1 = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) - if (!pTemp1->isAlive()) - if (Creature* pTemp2 = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) - if (!pTemp2->isAlive()) - { - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData(DATA_TOC5_ANNOUNCER)))) - pTemp->SetVisibility(VISIBILITY_ON); - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) - pTemp->ForcedDespawn(); - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) - pTemp->ForcedDespawn(); - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) - pTemp->ForcedDespawn(); - m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, DONE); - } + + m_pInstance->SetData(DATA_CHAMPIONS_COUNT, m_pInstance->GetData(DATA_CHAMPIONS_COUNT) - 1); + + if (m_pInstance->GetData(DATA_CHAMPIONS_COUNT) < 1) + m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, DONE); } void UpdateAI(const uint32 diff) @@ -729,21 +685,21 @@ struct MANGOS_DLL_DECL mob_toc5_hunterAI : public ScriptedAI if (Shoot_Timer < diff) { DoCast(m_creature->getVictim(), SPELL_SHOOT); - Shoot_Timer = 3000; + Shoot_Timer = m_bIsRegularMode ? 5000 : 3000; }else Shoot_Timer -= diff; if (Multi_Shot_Timer < diff) { m_creature->CastStop(SPELL_SHOOT); DoCast(m_creature->getVictim(), SPELL_MULTI_SHOT); - Multi_Shot_Timer = 10000; + Multi_Shot_Timer = m_bIsRegularMode ? 15000 : 10000; }else Multi_Shot_Timer -= diff; if (Lightning_Arrows_Timer < diff) { m_creature->CastStop(SPELL_SHOOT); DoCast(m_creature, SPELL_LIGHTNING_ARROWS); - Lightning_Arrows_Timer = 25000; + Lightning_Arrows_Timer = m_bIsRegularMode ? 30000 : 25000; }else Lightning_Arrows_Timer -= diff; if (disengage_check < diff) @@ -772,10 +728,11 @@ struct MANGOS_DLL_DECL mob_toc5_rogueAI : public ScriptedAI { Reset(); m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); } ScriptedInstance* m_pInstance; - bool m_bIsRegularMode; + bool m_bIsRegularMode; uint32 Eviscerate_Timer; uint32 FoK_Timer; @@ -784,14 +741,14 @@ struct MANGOS_DLL_DECL mob_toc5_rogueAI : public ScriptedAI void Reset() { m_creature->SetRespawnDelay(999999999); - Eviscerate_Timer = 15000; - FoK_Timer = 10000; - Poison_Timer = 7000; + Eviscerate_Timer = m_bIsRegularMode ? 20000 : 15000; + FoK_Timer = m_bIsRegularMode ? 15000 : 10000; + Poison_Timer = m_bIsRegularMode ? 12000 : 7000; } void EnterEvadeMode() { - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) +/* if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) if (!pTemp->isAlive()) { pTemp->Respawn(); @@ -832,7 +789,7 @@ struct MANGOS_DLL_DECL mob_toc5_rogueAI : public ScriptedAI pTemp->SetHealth(pTemp->GetMaxHealth()); pTemp->SendMonsterMove(754.360779, 660.816162, 412.395996, 4.698700, pTemp->GetMonsterMoveFlags(), 1); pTemp->GetMap()->CreatureRelocation(pTemp, 754.360779, 660.816162, 412.395996, 4.698700); - } + }*/ } void Aggro(Unit* pWho) @@ -857,26 +814,14 @@ struct MANGOS_DLL_DECL mob_toc5_rogueAI : public ScriptedAI } void JustDied(Unit* pKiller) - { + { if (!m_pInstance) return; - if (Creature* pTemp0 = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) - if (!pTemp0->isAlive()) - if (Creature* pTemp1 = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) - if (!pTemp1->isAlive()) - if (Creature* pTemp2 = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) - if (!pTemp2->isAlive()) - { - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData(DATA_TOC5_ANNOUNCER)))) - pTemp->SetVisibility(VISIBILITY_ON); - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) - pTemp->ForcedDespawn(); - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) - pTemp->ForcedDespawn(); - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) - pTemp->ForcedDespawn(); - m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, DONE); - } + + m_pInstance->SetData(DATA_CHAMPIONS_COUNT, m_pInstance->GetData(DATA_CHAMPIONS_COUNT) - 1); + + if (m_pInstance->GetData(DATA_CHAMPIONS_COUNT) < 1) + m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, DONE); } void UpdateAI(const uint32 diff) @@ -887,20 +832,20 @@ struct MANGOS_DLL_DECL mob_toc5_rogueAI : public ScriptedAI if (Eviscerate_Timer < diff) { DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_EVISCERATE : SPELL_EVISCERATE_H); - Eviscerate_Timer = 10000; + Eviscerate_Timer = m_bIsRegularMode ? 15000 : 10000; }else Eviscerate_Timer -= diff; if (FoK_Timer < diff) { DoCast(m_creature->getVictim(), SPELL_FAN_OF_KNIVES); - FoK_Timer = 7000; + FoK_Timer = m_bIsRegularMode ? 12000 : 7000; }else FoK_Timer -= diff; if (Poison_Timer < diff) { if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) DoCast(m_creature, SPELL_POISON_BOTTLE); - Poison_Timer = 6000; + Poison_Timer = m_bIsRegularMode ? 9000 : 6000; }else Poison_Timer -= diff; DoMeleeAttackIfReady(); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp index 65360ad09..0412394d0 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp @@ -53,6 +53,7 @@ struct MANGOS_DLL_DECL instance_trial_of_the_champion : public ScriptedInstance uint32 m_uiChampionId1; uint32 m_uiChampionId2; uint32 m_uiChampionId3; + uint32 m_uiChampionsCount; uint64 m_uiChampion1; uint64 m_uiChampion2; uint64 m_uiChampion3; @@ -89,9 +90,10 @@ struct MANGOS_DLL_DECL instance_trial_of_the_champion : public ScriptedInstance m_uiChampion1 = 0; m_uiChampion2 = 0; m_uiChampion3 = 0; - m_uiArgentChallenger = 0; + m_uiChampionsCount = 3; + m_uiArgentChallenger = 0; m_uiMemoryGUID = 0; - m_uiArgentChallengerID = 0; + m_uiArgentChallengerID = 0; memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); } @@ -374,13 +376,16 @@ struct MANGOS_DLL_DECL instance_trial_of_the_champion : public ScriptedInstance case DATA_CHAMPIONID_3: m_uiChampionId3 = uiData; break; + case DATA_CHAMPIONS_COUNT: + m_uiChampionsCount = uiData; + break; case DATA_ARGENT_CHALLENGER: m_uiArgentChallengerID = uiData; break; case DATA_BLACK_KNIGHT_MINION: m_uiBlackKnightMinionGUID = uiData; break; - case TYPE_GRAND_CHAMPIONS: + case TYPE_GRAND_CHAMPIONS: m_auiEncounter[0] = uiData; if (uiData == DONE) { @@ -428,7 +433,7 @@ struct MANGOS_DLL_DECL instance_trial_of_the_champion : public ScriptedInstance { switch(uiData) { - case DATA_CHAMPION_1: + case DATA_CHAMPION_1: return m_uiChampion1; case DATA_CHAMPION_2: return m_uiChampion2; @@ -437,7 +442,7 @@ struct MANGOS_DLL_DECL instance_trial_of_the_champion : public ScriptedInstance case DATA_MEMORY: return m_uiMemoryGUID; case DATA_BLACK_KNIGHT: - return m_uiBlackKnightGUID; + return m_uiBlackKnightGUID; } return 0; @@ -453,6 +458,8 @@ struct MANGOS_DLL_DECL instance_trial_of_the_champion : public ScriptedInstance return m_uiChampionId2; case DATA_CHAMPIONID_3: return m_uiChampionId3; + case DATA_CHAMPIONS_COUNT: + return m_uiChampionsCount; case DATA_ARGENT_CHALLENGER: return m_uiArgentChallengerID; case DATA_BLACK_KNIGHT_MINION: diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp index e7261435c..bd2d14f72 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp @@ -211,11 +211,11 @@ struct MANGOS_DLL_DECL npc_toc5_announcerAI : public ScriptedAI if (m_pInstance->GetData(TYPE_ARGENT_CHALLENGE) == DONE) { if (m_pInstance->GetData(TYPE_BLACK_KNIGHT) == DONE) - m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); else { - m_creature->SummonCreature(35451, 746.864441, 660.918762, 411.695465, 4.698700, TEMPSUMMON_MANUAL_DESPAWN, 0); - m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + m_creature->SummonCreature(35451, 746.864441, 660.918762, 411.695465, 4.698700, TEMPSUMMON_MANUAL_DESPAWN, 0); + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); } } } @@ -237,7 +237,7 @@ CreatureAI* GetAI_npc_toc5_announcer(Creature* pCreature) bool GossipHello_npc_toc5_announcer(Player* pPlayer, Creature* pCreature) { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_START_EVENT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_START_EVENT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; @@ -248,7 +248,7 @@ bool GossipSelect_npc_toc5_announcer(Player* pPlayer, Creature* pCreature, uint3 if (uiAction == GOSSIP_ACTION_INFO_DEF+1) { pPlayer->CLOSE_GOSSIP_MENU(); - ((npc_toc5_announcerAI*)pCreature->AI())->StartEvent(pPlayer); + ((npc_toc5_announcerAI*)pCreature->AI())->StartEvent(pPlayer); } return true; @@ -260,7 +260,7 @@ void AddSC_trial_of_the_champion() NewScript = new Script; NewScript->Name = "npc_toc5_announcer"; - NewScript->GetAI = &GetAI_npc_toc5_announcer; + NewScript->GetAI = &GetAI_npc_toc5_announcer; NewScript->pGossipHello = &GossipHello_npc_toc5_announcer; NewScript->pGossipSelect = &GossipSelect_npc_toc5_announcer; NewScript->RegisterSelf(); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h index 0e21691e6..11257be97 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h @@ -13,19 +13,20 @@ enum TYPE_ARGENT_CHALLENGE = 1, TYPE_BLACK_KNIGHT = 2, - DATA_CHAMPION_1 = 3, + DATA_CHAMPION_1 = 3, DATA_CHAMPION_2 = 4, DATA_CHAMPION_3 = 5, DATA_BLACK_KNIGHT = 6, DATA_BLACK_KNIGHT_MINION = 7, - DATA_TOC5_ANNOUNCER = 8, - DATA_JAEREN = 9, - DATA_ARELAS = 10, - DATA_CHAMPIONID_1 = 11, + DATA_TOC5_ANNOUNCER = 8, + DATA_JAEREN = 9, + DATA_ARELAS = 10, + DATA_CHAMPIONID_1 = 11, DATA_CHAMPIONID_2 = 12, DATA_CHAMPIONID_3 = 13, - DATA_MEMORY = 14, - DATA_ARGENT_CHALLENGER = 15, + DATA_MEMORY = 14, + DATA_ARGENT_CHALLENGER = 15, + DATA_CHAMPIONS_COUNT = 16, NPC_JACOB = 34705, NPC_AMBROSE = 34702, @@ -43,13 +44,14 @@ enum NPC_RISEN_JAEREN = 35545, NPC_RISEN_ARELAS = 35564, NPC_JAEREN = 35004, + NPC_ARELAS = 35005, MEMORY_ALGALON = 35052, MEMORY_ARCHIMONDE = 35041, MEMORY_CHROMAGGUS = 35033, MEMORY_CYANIGOSA = 35046, MEMORY_DELRISSA = 35043, - MEMORY_ECK = 35047, + MEMORY_ECK = 35047, MEMORY_ENTROPIUS = 35044, MEMORY_GRUUL = 35039, MEMORY_HAKKAR = 35034, @@ -71,11 +73,11 @@ enum MEMORY_VEZAX = 35051, GO_CHAMPIONS_LOOT = 195709, - GO_CHAMPIONS_LOOT_H = 195710, + GO_CHAMPIONS_LOOT_H = 195710, GO_EADRIC_LOOT = 195374, - GO_EADRIC_LOOT_H = 195375, + GO_EADRIC_LOOT_H = 195375, GO_PALETRESS_LOOT = 195323, - GO_PALETRESS_LOOT_H = 195324 + GO_PALETRESS_LOOT_H = 195324 }; #endif \ No newline at end of file From 38152142f4c456da3522aa3b8c30be1295aba58b Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 30 Dec 2009 13:16:44 +0300 Subject: [PATCH 086/405] TOC patch part 3 --- .../boss_argent_challenge.cpp | 13 ++++----- .../boss_black_knight.cpp | 4 +-- .../trial_of_the_champion.cpp | 29 +++++++++++++++---- 3 files changed, 31 insertions(+), 15 deletions(-) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp index fa28ef453..17a6de1f3 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp @@ -85,6 +85,7 @@ struct MANGOS_DLL_DECL boss_eadricAI : public ScriptedAI void EnterEvadeMode() { + if (m_creature->isAlive()) { Vengeance_Timer = 1000; Radiance_Timer = 15000; Hammer_Timer = 40000; @@ -94,15 +95,14 @@ struct MANGOS_DLL_DECL boss_eadricAI : public ScriptedAI m_creature->SendMonsterMove(746.864441, 660.918762, 411.695465, 4.698700, m_creature->GetMonsterMoveFlags(), 1); m_creature->GetMap()->CreatureRelocation(m_creature, 754.360779, 660.816162, 412.395996, 4.698700); m_creature->SetHealth(m_creature->GetMaxHealth()); + } } void Aggro(Unit* pWho) { if (!m_pInstance) return; - if (m_pInstance->GetData(TYPE_ARGENT_CHALLENGE) == DONE) - m_creature->ForcedDespawn(); - else + if (m_pInstance->GetData(TYPE_ARGENT_CHALLENGE) != DONE) m_pInstance->SetData(TYPE_ARGENT_CHALLENGE, IN_PROGRESS); } @@ -110,7 +110,6 @@ struct MANGOS_DLL_DECL boss_eadricAI : public ScriptedAI { if (!m_pInstance) return; -// m_creature->ForcedDespawn(); m_pInstance->SetData(TYPE_ARGENT_CHALLENGE, DONE); } @@ -202,6 +201,7 @@ struct MANGOS_DLL_DECL boss_paletressAI : public ScriptedAI void EnterEvadeMode() { + if (m_creature->isAlive()) { m_creature->RemoveAurasDueToSpell(SPELL_SHIELD); Smite_Timer = 5000; Holy_Fire_Timer = 10000; @@ -214,15 +214,14 @@ struct MANGOS_DLL_DECL boss_paletressAI : public ScriptedAI m_creature->SendMonsterMove(746.864441, 660.918762, 411.695465, 4.698700, m_creature->GetMonsterMoveFlags(), 1); m_creature->GetMap()->CreatureRelocation(m_creature, 754.360779, 660.816162, 412.395996, 4.698700); m_creature->SetHealth(m_creature->GetMaxHealth()); + } } void Aggro(Unit* pWho) { if (!m_pInstance) return; - if (m_pInstance->GetData(TYPE_ARGENT_CHALLENGE) == DONE) - m_creature->ForcedDespawn(); - else + if (m_pInstance->GetData(TYPE_ARGENT_CHALLENGE) != DONE) m_pInstance->SetData(TYPE_ARGENT_CHALLENGE, IN_PROGRESS); } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp index 920fcc298..2f85eb71c 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp @@ -176,9 +176,7 @@ struct MANGOS_DLL_DECL boss_black_knightAI : public ScriptedAI { if (!m_pInstance) return; - if (m_pInstance->GetData(TYPE_BLACK_KNIGHT) == DONE) - m_creature->ForcedDespawn(); - else + if (m_pInstance->GetData(TYPE_BLACK_KNIGHT) != DONE) m_pInstance->SetData(TYPE_BLACK_KNIGHT, IN_PROGRESS); } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp index bd2d14f72..9c865b7ea 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp @@ -183,9 +183,9 @@ struct MANGOS_DLL_DECL npc_toc5_announcerAI : public ScriptedAI } if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == FAIL) { - m_creature->SummonCreature(m_pInstance->GetData(DATA_CHAMPIONID_1), 738.665771, 661.031433, 412.394623, 4.698702, TEMPSUMMON_MANUAL_DESPAWN, 0); - m_creature->SummonCreature(m_pInstance->GetData(DATA_CHAMPIONID_2), 746.864441, 660.918762, 411.695465, 4.698700, TEMPSUMMON_MANUAL_DESPAWN, 0); - m_creature->SummonCreature(m_pInstance->GetData(DATA_CHAMPIONID_3), 754.360779, 660.816162, 412.395996, 4.698700, TEMPSUMMON_MANUAL_DESPAWN, 0); + m_creature->SummonCreature(m_pInstance->GetData(DATA_CHAMPIONID_1), 738.665771, 661.031433, 412.394623, 4.698702, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 180000); + m_creature->SummonCreature(m_pInstance->GetData(DATA_CHAMPIONID_2), 746.864441, 660.918762, 411.695465, 4.698700, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 180000); + m_creature->SummonCreature(m_pInstance->GetData(DATA_CHAMPIONID_3), 754.360779, 660.816162, 412.395996, 4.698700, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 180000); m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, IN_PROGRESS); } if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == DONE) @@ -205,16 +205,35 @@ struct MANGOS_DLL_DECL npc_toc5_announcerAI : public ScriptedAI } if (m_pInstance->GetData(TYPE_ARGENT_CHALLENGE) == FAIL) { - m_creature->SummonCreature(m_pInstance->GetData(DATA_ARGENT_CHALLENGER), 746.864441, 660.918762, 411.695465, 4.698700, TEMPSUMMON_MANUAL_DESPAWN, 0); + + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPIONID_1)))) { + pTemp->RemoveCorpse(); + pTemp->RemoveFromWorld(); + } + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPIONID_2)))) { + pTemp->RemoveCorpse(); + pTemp->RemoveFromWorld(); + } + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPIONID_3)))) { + pTemp->RemoveCorpse(); + pTemp->RemoveFromWorld(); + } + + m_creature->SummonCreature(m_pInstance->GetData(DATA_ARGENT_CHALLENGER), 746.864441, 660.918762, 411.695465, 4.698700, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 180000); m_pInstance->SetData(TYPE_ARGENT_CHALLENGE, IN_PROGRESS); } if (m_pInstance->GetData(TYPE_ARGENT_CHALLENGE) == DONE) { + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_ARGENT_CHALLENGER)))) { + pTemp->RemoveCorpse(); + pTemp->RemoveFromWorld(); + } + if (m_pInstance->GetData(TYPE_BLACK_KNIGHT) == DONE) m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); else { - m_creature->SummonCreature(35451, 746.864441, 660.918762, 411.695465, 4.698700, TEMPSUMMON_MANUAL_DESPAWN, 0); + m_creature->SummonCreature(35451, 746.864441, 660.918762, 411.695465, 4.698700, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 180000); m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); } } From ec371210bb6439bdcf47ca59690e066a9bf8939a Mon Sep 17 00:00:00 2001 From: Insider Date: Thu, 31 Dec 2009 03:13:19 +0700 Subject: [PATCH 087/405] SD2 updated to 1532 --- Makefile.am | 4 +- VC80/80ScriptDev2.vcproj | 8 + VC90/90ScriptDev2.vcproj | 8 + .../halls_of_stone/boss_maiden_of_grief.cpp | 43 +++- .../ulduar/halls_of_stone/boss_sjonnir.cpp | 25 ++- .../ulduar/halls_of_stone/halls_of_stone.cpp | 1 + .../ulduar/halls_of_stone/halls_of_stone.h | 39 ++++ .../instance_halls_of_stone.cpp | 207 ++++++++++++++++++ sql/Updates/Makefile.am | 3 +- sql/Updates/r1531_mangos.sql | 1 + sql/mangos_scriptname_full.sql | 1 + system/ScriptLoader.cpp | 6 +- 12 files changed, 341 insertions(+), 5 deletions(-) create mode 100644 scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h create mode 100644 scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp create mode 100644 sql/Updates/r1531_mangos.sql diff --git a/Makefile.am b/Makefile.am index ad8a1c7f3..2d264eba7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -361,6 +361,8 @@ scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp \ scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp \ scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp \ scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp \ +scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h \ +scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp \ scripts/northrend/ulduar/ulduar/boss_algalon.cpp \ scripts/northrend/ulduar/ulduar/boss_auriaya.cpp \ scripts/northrend/ulduar/ulduar/boss_freya.cpp \ @@ -547,4 +549,4 @@ install-data-hook: done clean-local: - rm -f $(sysconf_DATA) + rm -f $(sysconf_DATA) \ No newline at end of file diff --git a/VC80/80ScriptDev2.vcproj b/VC80/80ScriptDev2.vcproj index 2928fe30c..bcfe14677 100644 --- a/VC80/80ScriptDev2.vcproj +++ b/VC80/80ScriptDev2.vcproj @@ -1878,6 +1878,14 @@ RelativePath="..\scripts\northrend\ulduar\halls_of_stone\halls_of_stone.cpp" > + + + + + + + + SetData(TYPE_MAIDEN, DONE); } void UpdateAI(const uint32 uiDiff) @@ -91,6 +102,36 @@ struct MANGOS_DLL_DECL boss_maiden_of_griefAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (m_uiStormTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_STORM_OF_GRIEF : SPELL_STORM_OF_GRIEF_H) == CAST_OK) + m_uiStormTimer = 20000; + } + else + m_uiStormTimer -= uiDiff; + + if (m_uiPillarTimer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_PILLAR_OF_WOE : SPELL_PILLAR_OF_WOE_H) == CAST_OK) + m_uiPillarTimer = 10000; + } + } + else + m_uiPillarTimer -= uiDiff; + + if (m_uiShockTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_SHOCK_OF_SORROW : SPELL_SHOCK_OF_SORROW_H) == CAST_OK) + { + DoScriptText(SAY_STUN, m_creature); + m_uiShockTimer = 35000; + } + } + else + m_uiShockTimer -= uiDiff; + DoMeleeAttackIfReady(); } }; diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp index 78ac5b09e..50b657c59 100644 --- a/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp @@ -22,6 +22,7 @@ SDCategory: Halls of Stone EndScriptData */ #include "precompiled.h" +#include "halls_of_stone.h" enum { @@ -46,8 +47,11 @@ enum SPELL_LIGHTNING_RING = 50840, SPELL_LIGHTNING_RING_H = 59848, + SPELL_SUMMON_IRON_DWARF = 50789, // periodic dummy aura, tick each 30sec or each 20sec in heroic + SPELL_SUMMON_IRON_DWARF_H = 59860, // left/right 50790,50791 + SPELL_SUMMON_IRON_TROGG = 50792, // periodic dummy aura, tick each 10sec or each 7sec in heroic - SPELL_SUMMON_IRON_TROGG_H = 59859, // left/right 50790,50791 + SPELL_SUMMON_IRON_TROGG_H = 59859, // left/right 50793,50794 SPELL_SUMMON_MALFORMED_OOZE = 50801, // periodic dummy aura, tick each 5sec or each 3sec in heroic SPELL_SUMMON_MALFORMED_OOZE_H = 59858, // left/right 50802,50803 @@ -56,6 +60,7 @@ enum SPELL_IRON_SLUDGE_SPAWN_VISUAL = 50777, NPC_IRON_TROGG = 27979, + NPC_IRON_DWARF = 27982, NPC_MALFORMED_OOZE = 27981, NPC_IRON_SLUDGE = 28165 }; @@ -78,11 +83,29 @@ struct MANGOS_DLL_DECL boss_sjonnirAI : public ScriptedAI void Reset() { + if (m_creature->isAlive()) + m_creature->CastSpell(m_creature, m_bIsRegularMode ? SPELL_LIGHTNING_SHIELD : SPELL_LIGHTNING_SHIELD_H, false); } void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); + + m_creature->CastSpell(m_creature, m_bIsRegularMode ? SPELL_SUMMON_IRON_DWARF : SPELL_SUMMON_IRON_DWARF_H, true); + m_creature->CastSpell(m_creature, m_bIsRegularMode ? SPELL_SUMMON_IRON_TROGG : SPELL_SUMMON_IRON_TROGG_H, true); + } + + + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_IRON_TROGG || pSummoned->GetEntry() == NPC_IRON_DWARF || pSummoned->GetEntry() == NPC_MALFORMED_OOZE) + { + float fX, fY, fZ; + pSummoned->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 10.0f, fX, fY, fZ); + + pSummoned->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + pSummoned->GetMotionMaster()->MovePoint(0, fX, fY, fZ); + } } void KilledUnit(Unit* pVictim) diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp index 741cbbb5d..5ab7d1807 100644 --- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp @@ -22,6 +22,7 @@ SDCategory: Halls of Stone EndScriptData */ #include "precompiled.h" +#include "halls_of_stone.h" #include "escort_ai.h" enum diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h new file mode 100644 index 000000000..47b4b8892 --- /dev/null +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h @@ -0,0 +1,39 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_HALLS_OF_STONE_H +#define DEF_HALLS_OF_STONE_H + +enum +{ + MAX_ENCOUNTER = 4, + + TYPE_TRIBUNAL = 0, + TYPE_MAIDEN = 1, + TYPE_KRYSTALLUS = 2, + TYPE_SJONNIR = 3, + + NPC_BRANN = 28070, + + NPC_KADDRAK = 30898, + NPC_ABEDNEUM = 30899, + NPC_MARNAK = 30897, + + GO_DOOR_SJONNIR = 191296, + GO_DOOR_TRIBUNAL = 191294, // possibly closed during event? + + GO_TRIBUNAL_CHEST = 190586, + GO_TRIBUNAL_CHEST_H = 193996, + + GO_TRIBUNAL_HEAD_RIGHT = 191670, // marnak + GO_TRIBUNAL_HEAD_CENTER = 191669, // abedneum + GO_TRIBUNAL_HEAD_LEFT = 191671, // kaddrak + + GO_TRIBUNAL_CONSOLE = 193907, + GO_TRIBUNAL_FLOOR = 191527, + + GO_SJONNIR_CONSOLE = 193906 +}; + +#endif diff --git a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp new file mode 100644 index 000000000..1e65e8997 --- /dev/null +++ b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp @@ -0,0 +1,207 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance_Halls_of_Stone +SD%Complete: 10% +SDComment: +SDCategory: Halls of Stone +EndScriptData */ + +#include "precompiled.h" +#include "halls_of_stone.h" + +struct MANGOS_DLL_DECL instance_halls_of_stone : public ScriptedInstance +{ + instance_halls_of_stone(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + + uint64 m_uiBrannGUID; + uint64 m_uiKaddrakGUID; + uint64 m_uiAbedneumGUID; + uint64 m_uiMarnakGUID; + + uint64 m_uiSjonnirDoorGUID; + uint64 m_uiTribunalDoorGUID; + uint64 m_uiTribunalChestGUID; + uint64 m_uiTribunalHeadRightGUID; + uint64 m_uiTribunalHeadCenterGUID; + uint64 m_uiTribunalHeadLeftGUID; + uint64 m_uiTribunalConsoleGUID; + uint64 m_uiTribunalFloorGUID; + uint64 m_uiSjonnirConsoleGUID; + + void Initialize() + { + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + + m_uiBrannGUID = 0; + m_uiKaddrakGUID = 0; + m_uiAbedneumGUID = 0; + m_uiMarnakGUID = 0; + + m_uiSjonnirDoorGUID = 0; + m_uiTribunalDoorGUID = 0; + m_uiTribunalChestGUID = 0; + m_uiTribunalHeadRightGUID = 0; + m_uiTribunalHeadCenterGUID = 0; + m_uiTribunalHeadLeftGUID = 0; + m_uiTribunalConsoleGUID = 0; + m_uiTribunalFloorGUID = 0; + m_uiSjonnirConsoleGUID = 0; + } + + void OnCreatureCreate(Creature* pCreature) + { + switch(pCreature->GetEntry()) + { + case NPC_BRANN: + m_uiBrannGUID = pCreature->GetGUID(); + break; + case NPC_KADDRAK: + m_uiKaddrakGUID = pCreature->GetGUID(); + break; + case NPC_ABEDNEUM: + m_uiAbedneumGUID = pCreature->GetGUID(); + break; + case NPC_MARNAK: + m_uiMarnakGUID = pCreature->GetGUID(); + break; + } + } + + void OnObjectCreate(GameObject* pGo) + { + switch(pGo->GetEntry()) + { + case GO_DOOR_SJONNIR: + m_uiSjonnirDoorGUID = pGo->GetGUID(); + break; + case GO_DOOR_TRIBUNAL: + m_uiTribunalDoorGUID = pGo->GetGUID(); + break; + case GO_TRIBUNAL_CHEST: + case GO_TRIBUNAL_CHEST_H: + m_uiTribunalChestGUID = pGo->GetGUID(); + break; + case GO_TRIBUNAL_HEAD_RIGHT: + m_uiTribunalHeadRightGUID = pGo->GetGUID(); + break; + case GO_TRIBUNAL_HEAD_CENTER: + m_uiTribunalHeadCenterGUID = pGo->GetGUID(); + break; + case GO_TRIBUNAL_HEAD_LEFT: + m_uiTribunalHeadLeftGUID = pGo->GetGUID(); + break; + case GO_TRIBUNAL_CONSOLE: + m_uiTribunalConsoleGUID = pGo->GetGUID(); + break; + case GO_TRIBUNAL_FLOOR: + m_uiTribunalFloorGUID = pGo->GetGUID(); + break; + case GO_SJONNIR_CONSOLE: + m_uiSjonnirConsoleGUID = pGo->GetGUID(); + break; + } + } + + void SetData(uint32 uiType, uint32 uiData) + { + switch(uiType) + { + case TYPE_TRIBUNAL: + m_auiEncounter[0] = uiData; + if (uiData == DONE) + DoRespawnGameObject(m_uiTribunalChestGUID); + break; + case TYPE_MAIDEN: + m_auiEncounter[1] = uiData; + break; + case TYPE_KRYSTALLUS: + m_auiEncounter[2] = uiData; + break; + case TYPE_SJONNIR: + m_auiEncounter[3] = uiData; + break; + } + } + + uint32 GetData(uint32 uiType) + { + switch(uiType) + { + case TYPE_TRIBUNAL: + return m_auiEncounter[0]; + case TYPE_MAIDEN: + return m_auiEncounter[1]; + case TYPE_KRYSTALLUS: + return m_auiEncounter[2]; + case TYPE_SJONNIR: + return m_auiEncounter[3]; + } + return 0; + } + + uint64 GetData64(uint32 uiData) + { + switch(uiData) + { + case NPC_BRANN: + return m_uiBrannGUID; + case NPC_KADDRAK: + return m_uiKaddrakGUID; + case NPC_ABEDNEUM: + return m_uiAbedneumGUID; + case NPC_MARNAK: + return m_uiMarnakGUID; + case GO_DOOR_SJONNIR: + return m_uiSjonnirDoorGUID; + case GO_DOOR_TRIBUNAL: + return m_uiTribunalDoorGUID; + case GO_TRIBUNAL_CHEST: + case GO_TRIBUNAL_CHEST_H: + return m_uiTribunalChestGUID; + case GO_TRIBUNAL_HEAD_RIGHT: + return m_uiTribunalHeadRightGUID; + case GO_TRIBUNAL_HEAD_CENTER: + return m_uiTribunalHeadCenterGUID; + case GO_TRIBUNAL_HEAD_LEFT: + return m_uiTribunalHeadLeftGUID; + case GO_TRIBUNAL_CONSOLE: + return m_uiTribunalConsoleGUID; + case GO_TRIBUNAL_FLOOR: + return m_uiTribunalFloorGUID; + case GO_SJONNIR_CONSOLE: + return m_uiSjonnirConsoleGUID; + } + return 0; + } +}; + +InstanceData* GetInstanceData_instance_halls_of_stone(Map* pMap) +{ + return new instance_halls_of_stone(pMap); +} + +void AddSC_instance_halls_of_stone() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "instance_halls_of_stone"; + newscript->GetInstanceData = &GetInstanceData_instance_halls_of_stone; + newscript->RegisterSelf(); +} diff --git a/sql/Updates/Makefile.am b/sql/Updates/Makefile.am index 2892ff152..27874f5e7 100644 --- a/sql/Updates/Makefile.am +++ b/sql/Updates/Makefile.am @@ -60,4 +60,5 @@ pkgdata_DATA = \ r1523_mangos.sql \ r1524_scriptdev2.sql \ r1525_mangos.sql \ - r1525_scriptdev2.sql + r1525_scriptdev2.sql \ + r1531_mangos.sql diff --git a/sql/Updates/r1531_mangos.sql b/sql/Updates/r1531_mangos.sql new file mode 100644 index 000000000..2d76c33b3 --- /dev/null +++ b/sql/Updates/r1531_mangos.sql @@ -0,0 +1 @@ +UPDATE instance_template SET script='instance_halls_of_stone' WHERE map=599; diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index cbaf10892..462c031fc 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1048,6 +1048,7 @@ UPDATE creature_template SET ScriptName='mob_spark_of_ionar' WHERE entry=28926; UPDATE creature_template SET ScriptName='boss_loken' WHERE entry=28923; /* HALLS OF STONE */ +UPDATE instance_template SET script='instance_halls_of_stone' WHERE map=599; UPDATE creature_template SET ScriptName='boss_maiden_of_grief' WHERE entry=27975; UPDATE creature_template SET ScriptName='boss_sjonnir' WHERE entry=27978; UPDATE creature_template SET ScriptName='npc_brann_hos' WHERE entry=28070; diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index 73f535cf0..caa54e731 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -297,6 +297,8 @@ extern void AddSC_instance_halls_of_lightning(); extern void AddSC_boss_maiden_of_grief(); //Ulduar, halls_of_stone extern void AddSC_boss_sjonnir(); extern void AddSC_halls_of_stone(); +extern void AddSC_instance_halls_of_stone(); + extern void AddSC_boss_leviathan(); //ulduar extern void AddSC_boss_ignis(); extern void AddSC_boss_razorscale(); @@ -707,6 +709,8 @@ void AddScripts() AddSC_boss_maiden_of_grief(); //Ulduar, halls_of_stone AddSC_boss_sjonnir(); AddSC_halls_of_stone(); + AddSC_instance_halls_of_stone(); + AddSC_boss_leviathan(); //ulduar AddSC_boss_ignis(); AddSC_boss_razorscale(); @@ -821,4 +825,4 @@ void AddScripts() AddSC_shattrath_city(); AddSC_terokkar_forest(); AddSC_zangarmarsh(); -} +} \ No newline at end of file From a6ffd40ebf121a075af3910abd0072a5b79c8715 Mon Sep 17 00:00:00 2001 From: Insider Date: Thu, 31 Dec 2009 16:54:30 +0700 Subject: [PATCH 088/405] SD2 updated to 1533 --- .../northrend/ulduar/halls_of_lightning/boss_ionar.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp index e82e4837e..8dac9fbe5 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp @@ -220,7 +220,7 @@ struct MANGOS_DLL_DECL boss_ionarAI : public ScriptedAI // Splitted if (m_creature->GetVisibility() == VISIBILITY_OFF) { - if (!m_creature->getVictim()) + if (!m_creature->isInCombat()) { Reset(); return; @@ -261,7 +261,6 @@ struct MANGOS_DLL_DECL boss_ionarAI : public ScriptedAI return; } - //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -314,13 +313,8 @@ bool EffectDummyCreature_boss_ionar(Unit* pCaster, uint32 uiSpellId, uint32 uiEf return true; for(uint8 i = 0; i < MAX_SPARKS; ++i) - { pCreatureTarget->CastSpell(pCreatureTarget, SPELL_SUMMON_SPARK, true); - //TODO: remove this line of hack when summon implemented - pCreatureTarget->SummonCreature(NPC_SPARK_OF_IONAR, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); - } - pCreatureTarget->AttackStop(); pCreatureTarget->SetVisibility(VISIBILITY_OFF); From 45e2e7ab25b96f3889b9be88a88e4de739435be5 Mon Sep 17 00:00:00 2001 From: Insider Date: Fri, 1 Jan 2010 16:32:38 +0700 Subject: [PATCH 089/405] SD2 updated to 1536 --- .../utgarde_pinnacle/boss_gortok.cpp | 22 ++++-- .../utgarde_pinnacle/boss_skadi.cpp | 70 +++++++++++++++---- .../utgarde_pinnacle/boss_svala.cpp | 3 + .../instance_utgarde_pinnacle.cpp | 45 ++++++++---- .../utgarde_pinnacle/utgarde_pinnacle.h | 10 ++- sql/Updates/Makefile.am | 3 +- sql/Updates/r1536_mangos.sql | 2 + sql/mangos_scriptname_full.sql | 2 + 8 files changed, 126 insertions(+), 31 deletions(-) create mode 100644 sql/Updates/r1536_mangos.sql diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp index 6cb10ff73..d2d8fa72f 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp @@ -22,13 +22,24 @@ SDCategory: Utgarde Pinnacle EndScriptData */ #include "precompiled.h" +#include "utgarde_pinnacle.h" enum { - SAY_AGGRO = -1575015, - SAY_SLAY_1 = -1575016, - SAY_SLAY_2 = -1575017, - SAY_DEATH = -1575018 + SAY_AGGRO = -1575015, + SAY_SLAY_1 = -1575016, + SAY_SLAY_2 = -1575017, + SAY_DEATH = -1575018, + + SPELL_FREEZE_ANIM = 16245, + + SPELL_IMPALE = 48261, + SPELL_IMPALE_H = 59268, + + SPELL_WITHERING_ROAR = 48256, + SPELL_WITHERING_ROAR_H = 59267, + + SPELL_ARCING_SMASH = 48260 }; /*###### @@ -64,6 +75,9 @@ struct MANGOS_DLL_DECL boss_gortokAI : public ScriptedAI void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_GORTOK, DONE); } void UpdateAI(const uint32 uiDiff) diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp index d53f576e9..26eca1bbc 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp @@ -17,26 +17,45 @@ /* ScriptData SDName: Boss_Skadi SD%Complete: 20% -SDComment: +SDComment: starts at trigger 4991 SDCategory: Utgarde Pinnacle EndScriptData */ #include "precompiled.h" +#include "utgarde_pinnacle.h" enum { - SAY_AGGRO = -1575019, - SAY_DRAKEBREATH_1 = -1575020, - SAY_DRAKEBREATH_2 = -1575021, - SAY_DRAKEBREATH_3 = -1575022, - SAY_DRAKE_HARPOON_1 = -1575023, - SAY_DRAKE_HARPOON_2 = -1575024, - SAY_KILL_1 = -1575025, - SAY_KILL_2 = -1575026, - SAY_KILL_3 = -1575027, - SAY_DEATH = -1575028, - SAY_DRAKE_DEATH = -1575029, - EMOTE_HARPOON_RANGE = -1575030 + SAY_AGGRO = -1575019, + SAY_DRAKEBREATH_1 = -1575020, + SAY_DRAKEBREATH_2 = -1575021, + SAY_DRAKEBREATH_3 = -1575022, + SAY_DRAKE_HARPOON_1 = -1575023, + SAY_DRAKE_HARPOON_2 = -1575024, + SAY_KILL_1 = -1575025, + SAY_KILL_2 = -1575026, + SAY_KILL_3 = -1575027, + SAY_DEATH = -1575028, + SAY_DRAKE_DEATH = -1575029, + EMOTE_HARPOON_RANGE = -1575030, + + SPELL_CRUSH = 50234, + SPELL_CRUSH_H = 59330, + + SPELL_WHIRLWIND = 50228, + SPELL_WHIRLWIND_H = 59322, + + SPELL_POISONED_SPEAR = 50255, + SPELL_POISONED_SPEAR_H = 59331, + + // casted with base of creature 22515 (World Trigger), so we must make sure + // to use the close one by the door leading further in to instance. + SPELL_SUMMON_GAUNTLET_MOBS = 48630, // tick every 30 sec + SPELL_SUMMON_GAUNTLET_MOBS_H = 59275, // tick every 25 sec + + SPELL_GAUNTLET_PERIODIC = 47546, // what is this? Unknown use/effect, but probably related + + SPELL_LAUNCH_HARPOON = 48642, // this spell hit drake to reduce HP (force triggered from 48641) }; /*###### @@ -59,6 +78,12 @@ struct MANGOS_DLL_DECL boss_skadiAI : public ScriptedAI { } + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_SKADI, NOT_STARTED); + } + void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); @@ -77,6 +102,9 @@ struct MANGOS_DLL_DECL boss_skadiAI : public ScriptedAI void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_SKADI, DONE); } void UpdateAI(const uint32 uiDiff) @@ -93,6 +121,17 @@ CreatureAI* GetAI_boss_skadi(Creature* pCreature) return new boss_skadiAI(pCreature); } +bool AreaTrigger_at_skadi(Player* pPlayer, AreaTriggerEntry* pAt) +{ + if (ScriptedInstance* pInstance = (ScriptedInstance*)pPlayer->GetInstanceData()) + { + if (pInstance->GetData(TYPE_SKADI) == NOT_STARTED) + pInstance->SetData(TYPE_SKADI, SPECIAL); + } + + return false; +} + void AddSC_boss_skadi() { Script *newscript; @@ -101,4 +140,9 @@ void AddSC_boss_skadi() newscript->Name = "boss_skadi"; newscript->GetAI = &GetAI_boss_skadi; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "at_skadi"; + newscript->pAreaTrigger = &AreaTrigger_at_skadi; + newscript->RegisterSelf(); } diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp index 35b41dc4d..dfee89151 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp @@ -174,6 +174,9 @@ struct MANGOS_DLL_DECL boss_svalaAI : public ScriptedAI void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_SVALA, DONE); } void DoMoveToPosition() diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp index ca3e188de..e109c2bce 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp @@ -31,26 +31,27 @@ struct MANGOS_DLL_DECL instance_pinnacle : public ScriptedInstance uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string strInstData; + uint64 m_uiSkadiDoorGUID; + void Initialize() { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + + m_uiSkadiDoorGUID = 0; } - uint32 GetData(uint32 uiType) + void OnObjectCreate(GameObject* pGo) { - switch(uiType) + switch(pGo->GetEntry()) { - case TYPE_SVALA: - return m_auiEncounter[0]; - case TYPE_GORTOK: - return m_auiEncounter[1]; - case TYPE_SKADI: - return m_auiEncounter[2]; - case TYPE_YMIRON: - return m_auiEncounter[3]; - } + case GO_DOOR_SKADI: + m_uiSkadiDoorGUID = pGo->GetGUID(); - return 0; + if (m_auiEncounter[2] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + + break; + } } void SetData(uint32 uiType, uint32 uiData) @@ -66,6 +67,9 @@ struct MANGOS_DLL_DECL instance_pinnacle : public ScriptedInstance m_auiEncounter[1] = uiData; break; case TYPE_SKADI: + if (uiData == DONE) + DoUseDoorOrButton(m_uiSkadiDoorGUID); + m_auiEncounter[2] = uiData; break; case TYPE_YMIRON: @@ -91,6 +95,23 @@ struct MANGOS_DLL_DECL instance_pinnacle : public ScriptedInstance } } + uint32 GetData(uint32 uiType) + { + switch(uiType) + { + case TYPE_SVALA: + return m_auiEncounter[0]; + case TYPE_GORTOK: + return m_auiEncounter[1]; + case TYPE_SKADI: + return m_auiEncounter[2]; + case TYPE_YMIRON: + return m_auiEncounter[3]; + } + + return 0; + } + const char* Save() { return strInstData.c_str(); diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h b/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h index 84a52948f..b4c1d682d 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h @@ -12,7 +12,15 @@ enum TYPE_SVALA = 0, TYPE_GORTOK = 1, TYPE_SKADI = 2, - TYPE_YMIRON = 3 + TYPE_YMIRON = 3, + + GO_STASIS_GENERATOR = 188593, + GO_DOOR_SKADI = 192173, + + NPC_FURBOLG = 26684, + NPC_WORGEN = 26683, + NPC_JORMUNGAR = 26685, + NPC_RHINO = 26686 }; #endif diff --git a/sql/Updates/Makefile.am b/sql/Updates/Makefile.am index 27874f5e7..35f8402a6 100644 --- a/sql/Updates/Makefile.am +++ b/sql/Updates/Makefile.am @@ -61,4 +61,5 @@ pkgdata_DATA = \ r1524_scriptdev2.sql \ r1525_mangos.sql \ r1525_scriptdev2.sql \ - r1531_mangos.sql + r1531_mangos.sql \ + r1536_mangos.sql diff --git a/sql/Updates/r1536_mangos.sql b/sql/Updates/r1536_mangos.sql new file mode 100644 index 000000000..54ba2d54b --- /dev/null +++ b/sql/Updates/r1536_mangos.sql @@ -0,0 +1,2 @@ +DELETE FROM areatrigger_scripts WHERE entry=4991; +INSERT INTO areatrigger_scripts VALUES (4991,'at_skadi'); diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 462c031fc..9bfedcee9 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -1081,6 +1081,8 @@ UPDATE creature_template SET ScriptName='mob_vrykul_skeleton' WHERE entry=23970; /* UTGARDE PINNACLE */ UPDATE creature_template SET ScriptName='boss_gortok' WHERE entry=26687; +DELETE FROM areatrigger_scripts WHERE entry=4991; +INSERT INTO areatrigger_scripts VALUES (4991,'at_skadi'); UPDATE creature_template SET ScriptName='boss_skadi' WHERE entry=26693; UPDATE creature_template SET ScriptName='boss_svala' WHERE entry=29281; DELETE FROM areatrigger_scripts WHERE entry=5140; From 3163c29014e03f067ecac9910a296d8a3889e3b4 Mon Sep 17 00:00:00 2001 From: Insider Date: Sat, 2 Jan 2010 16:30:19 +0700 Subject: [PATCH 090/405] SD2 updated to 1537 --- ScriptMgr.cpp | 2 +- ScriptMgr.h | 2 +- base/escort_ai.cpp | 2 +- base/escort_ai.h | 2 +- base/follower_ai.cpp | 2 +- base/follower_ai.h | 2 +- base/guard_ai.cpp | 2 +- base/guard_ai.h | 2 +- base/simple_ai.cpp | 2 +- base/simple_ai.h | 2 +- include/precompiled.cpp | 2 +- include/precompiled.h | 2 +- include/sc_creature.cpp | 2 +- include/sc_creature.h | 2 +- include/sc_gossip.h | 2 +- include/sc_grid_searchers.cpp | 2 +- include/sc_grid_searchers.h | 2 +- include/sc_instance.cpp | 2 +- include/sc_instance.h | 2 +- scripts/battlegrounds/battleground.cpp | 2 +- scripts/eastern_kingdoms/alterac_mountains.cpp | 2 +- scripts/eastern_kingdoms/arathi_highlands.cpp | 2 +- .../blackrock_depths/blackrock_depths.cpp | 2 +- .../blackrock_depths/blackrock_depths.h | 2 +- .../boss_ambassador_flamelash.cpp | 2 +- .../blackrock_depths/boss_anubshiah.cpp | 2 +- .../boss_emperor_dagran_thaurissan.cpp | 2 +- .../boss_general_angerforge.cpp | 2 +- .../boss_gorosh_the_dervish.cpp | 2 +- .../blackrock_depths/boss_grizzle.cpp | 2 +- .../boss_high_interrogator_gerstahn.cpp | 2 +- .../blackrock_depths/boss_magmus.cpp | 2 +- .../blackrock_depths/boss_tomb_of_seven.cpp | 2 +- .../instance_blackrock_depths.cpp | 2 +- .../blackrock_spire/boss_drakkisath.cpp | 2 +- .../blackrock_spire/boss_gyth.cpp | 2 +- .../blackrock_spire/boss_halycon.cpp | 2 +- .../blackrock_spire/boss_highlord_omokk.cpp | 2 +- .../blackrock_spire/boss_mother_smolderweb.cpp | 2 +- .../boss_overlord_wyrmthalak.cpp | 2 +- .../boss_pyroguard_emberseer.cpp | 2 +- .../boss_quartermaster_zigris.cpp | 2 +- .../blackrock_spire/boss_rend_blackhand.cpp | 2 +- .../boss_shadow_hunter_voshgajin.cpp | 2 +- .../blackrock_spire/boss_the_beast.cpp | 2 +- .../blackrock_spire/boss_warmaster_voone.cpp | 2 +- .../blackwing_lair/boss_broodlord_lashlayer.cpp | 2 +- .../blackwing_lair/boss_chromaggus.cpp | 2 +- .../blackwing_lair/boss_ebonroc.cpp | 2 +- .../blackwing_lair/boss_firemaw.cpp | 2 +- .../blackwing_lair/boss_flamegor.cpp | 2 +- .../blackwing_lair/boss_nefarian.cpp | 2 +- .../blackwing_lair/boss_razorgore.cpp | 2 +- .../blackwing_lair/boss_vaelastrasz.cpp | 2 +- .../blackwing_lair/boss_victor_nefarius.cpp | 2 +- .../blackwing_lair/instance_blackwing_lair.cpp | 2 +- scripts/eastern_kingdoms/blasted_lands.cpp | 2 +- scripts/eastern_kingdoms/boss_kruul.cpp | 2 +- scripts/eastern_kingdoms/burning_steppes.cpp | 2 +- .../eastern_kingdoms/deadmines/deadmines.cpp | 2 +- scripts/eastern_kingdoms/deadmines/deadmines.h | 2 +- .../deadmines/instance_deadmines.cpp | 2 +- scripts/eastern_kingdoms/dun_morogh.cpp | 2 +- .../eastern_kingdoms/eastern_plaguelands.cpp | 2 +- scripts/eastern_kingdoms/elwynn_forest.cpp | 2 +- scripts/eastern_kingdoms/eversong_woods.cpp | 2 +- scripts/eastern_kingdoms/ghostlands.cpp | 2 +- scripts/eastern_kingdoms/hinterlands.cpp | 2 +- scripts/eastern_kingdoms/ironforge.cpp | 2 +- scripts/eastern_kingdoms/isle_of_queldanas.cpp | 2 +- .../eastern_kingdoms/karazhan/boss_curator.cpp | 2 +- .../karazhan/boss_maiden_of_virtue.cpp | 2 +- .../eastern_kingdoms/karazhan/boss_midnight.cpp | 2 +- .../eastern_kingdoms/karazhan/boss_moroes.cpp | 2 +- .../karazhan/boss_netherspite.cpp | 2 +- .../karazhan/boss_nightbane.cpp | 2 +- .../karazhan/boss_prince_malchezaar.cpp | 2 +- .../karazhan/boss_shade_of_aran.cpp | 2 +- .../karazhan/boss_terestian_illhoof.cpp | 2 +- .../eastern_kingdoms/karazhan/bosses_opera.cpp | 2 +- .../karazhan/instance_karazhan.cpp | 2 +- scripts/eastern_kingdoms/karazhan/karazhan.cpp | 2 +- scripts/eastern_kingdoms/karazhan/karazhan.h | 2 +- scripts/eastern_kingdoms/loch_modan.cpp | 2 +- .../boss_felblood_kaelthas.cpp | 2 +- .../boss_priestess_delrissa.cpp | 2 +- .../magisters_terrace/boss_selin_fireheart.cpp | 2 +- .../magisters_terrace/boss_vexallus.cpp | 2 +- .../instance_magisters_terrace.cpp | 2 +- .../magisters_terrace/magisters_terrace.cpp | 2 +- .../magisters_terrace/magisters_terrace.h | 2 +- .../molten_core/boss_baron_geddon.cpp | 2 +- .../eastern_kingdoms/molten_core/boss_garr.cpp | 2 +- .../molten_core/boss_gehennas.cpp | 2 +- .../molten_core/boss_golemagg.cpp | 2 +- .../molten_core/boss_lucifron.cpp | 2 +- .../molten_core/boss_magmadar.cpp | 2 +- .../molten_core/boss_majordomo_executus.cpp | 2 +- .../molten_core/boss_ragnaros.cpp | 2 +- .../molten_core/boss_shazzrah.cpp | 2 +- .../molten_core/boss_sulfuron_harbinger.cpp | 2 +- .../molten_core/instance_molten_core.cpp | 2 +- .../molten_core/molten_core.cpp | 2 +- .../eastern_kingdoms/molten_core/molten_core.h | 2 +- .../scarlet_enclave/ebon_hold.cpp | 2 +- .../scarlet_monastery/boss_arcanist_doan.cpp | 2 +- .../boss_azshir_the_sleepless.cpp | 2 +- .../boss_bloodmage_thalnos.cpp | 2 +- .../boss_headless_horseman.cpp | 2 +- .../scarlet_monastery/boss_herod.cpp | 2 +- .../boss_high_inquisitor_fairbanks.cpp | 2 +- .../boss_houndmaster_loksey.cpp | 2 +- .../boss_interrogator_vishas.cpp | 2 +- .../boss_mograine_and_whitemane.cpp | 2 +- .../scarlet_monastery/boss_scorn.cpp | 2 +- .../instance_scarlet_monastery.cpp | 2 +- .../scarlet_monastery/scarlet_monastery.h | 2 +- .../scholomance/boss_darkmaster_gandling.cpp | 2 +- .../boss_death_knight_darkreaver.cpp | 2 +- .../boss_doctor_theolen_krastinov.cpp | 2 +- .../scholomance/boss_illucia_barov.cpp | 2 +- .../scholomance/boss_instructor_malicia.cpp | 2 +- .../scholomance/boss_jandice_barov.cpp | 2 +- .../scholomance/boss_kormok.cpp | 2 +- .../scholomance/boss_lord_alexei_barov.cpp | 2 +- .../scholomance/boss_lorekeeper_polkelt.cpp | 2 +- .../scholomance/boss_ras_frostwhisper.cpp | 2 +- .../scholomance/boss_the_ravenian.cpp | 2 +- .../scholomance/boss_vectus.cpp | 2 +- .../scholomance/instance_scholomance.cpp | 2 +- .../eastern_kingdoms/scholomance/scholomance.h | 2 +- scripts/eastern_kingdoms/searing_gorge.cpp | 2 +- .../instance_shadowfang_keep.cpp | 2 +- .../shadowfang_keep/shadowfang_keep.cpp | 2 +- .../shadowfang_keep/shadowfang_keep.h | 2 +- scripts/eastern_kingdoms/silvermoon_city.cpp | 2 +- scripts/eastern_kingdoms/silverpine_forest.cpp | 2 +- scripts/eastern_kingdoms/stormwind_city.cpp | 2 +- scripts/eastern_kingdoms/stranglethorn_vale.cpp | 2 +- .../stratholme/boss_baron_rivendare.cpp | 2 +- .../stratholme/boss_baroness_anastari.cpp | 2 +- .../stratholme/boss_cannon_master_willey.cpp | 2 +- .../stratholme/boss_dathrohan_balnazzar.cpp | 2 +- .../stratholme/boss_magistrate_barthilas.cpp | 2 +- .../stratholme/boss_maleki_the_pallid.cpp | 2 +- .../stratholme/boss_nerubenkan.cpp | 2 +- .../stratholme/boss_order_of_silver_hand.cpp | 2 +- .../stratholme/boss_postmaster_malown.cpp | 2 +- .../stratholme/boss_ramstein_the_gorger.cpp | 2 +- .../stratholme/boss_timmy_the_cruel.cpp | 2 +- .../stratholme/instance_stratholme.cpp | 2 +- .../eastern_kingdoms/stratholme/stratholme.cpp | 2 +- .../eastern_kingdoms/stratholme/stratholme.h | 2 +- .../sunken_temple/instance_sunken_temple.cpp | 2 +- .../sunken_temple/sunken_temple.cpp | 2 +- .../sunken_temple/sunken_temple.h | 2 +- .../sunwell_plateau/boss_brutallus.cpp | 2 +- .../sunwell_plateau/boss_kalecgos.cpp | 2 +- .../instance_sunwell_plateau.cpp | 2 +- .../sunwell_plateau/sunwell_plateau.h | 2 +- scripts/eastern_kingdoms/tirisfal_glades.cpp | 2 +- .../eastern_kingdoms/uldaman/boss_ironaya.cpp | 2 +- scripts/eastern_kingdoms/uldaman/uldaman.cpp | 2 +- scripts/eastern_kingdoms/undercity.cpp | 2 +- .../eastern_kingdoms/western_plaguelands.cpp | 2 +- scripts/eastern_kingdoms/westfall.cpp | 2 +- scripts/eastern_kingdoms/wetlands.cpp | 2 +- .../eastern_kingdoms/zulaman/boss_akilzon.cpp | 2 +- .../eastern_kingdoms/zulaman/boss_halazzi.cpp | 2 +- .../eastern_kingdoms/zulaman/boss_janalai.cpp | 2 +- .../eastern_kingdoms/zulaman/boss_malacrass.cpp | 2 +- .../eastern_kingdoms/zulaman/boss_nalorakk.cpp | 2 +- .../eastern_kingdoms/zulaman/boss_zuljin.cpp | 2 +- .../zulaman/instance_zulaman.cpp | 2 +- scripts/eastern_kingdoms/zulaman/zulaman.cpp | 2 +- scripts/eastern_kingdoms/zulaman/zulaman.h | 2 +- .../eastern_kingdoms/zulgurub/boss_arlokk.cpp | 2 +- .../zulgurub/boss_gahzranka.cpp | 2 +- .../eastern_kingdoms/zulgurub/boss_grilek.cpp | 2 +- .../eastern_kingdoms/zulgurub/boss_hakkar.cpp | 2 +- .../eastern_kingdoms/zulgurub/boss_hazzarah.cpp | 2 +- .../eastern_kingdoms/zulgurub/boss_jeklik.cpp | 2 +- .../eastern_kingdoms/zulgurub/boss_jindo.cpp | 2 +- .../eastern_kingdoms/zulgurub/boss_mandokir.cpp | 2 +- .../eastern_kingdoms/zulgurub/boss_marli.cpp | 2 +- .../eastern_kingdoms/zulgurub/boss_renataki.cpp | 2 +- .../eastern_kingdoms/zulgurub/boss_thekal.cpp | 2 +- .../eastern_kingdoms/zulgurub/boss_venoxis.cpp | 2 +- .../zulgurub/boss_wushoolay.cpp | 2 +- .../zulgurub/instance_zulgurub.cpp | 2 +- scripts/eastern_kingdoms/zulgurub/zulgurub.h | 2 +- scripts/examples/example_creature.cpp | 2 +- scripts/examples/example_escort.cpp | 2 +- scripts/examples/example_gossip_codebox.cpp | 2 +- scripts/examples/example_misc.cpp | 2 +- scripts/kalimdor/ashenvale.cpp | 2 +- scripts/kalimdor/azshara.cpp | 2 +- scripts/kalimdor/azuremyst_isle.cpp | 2 +- .../blackfathom_deeps/blackfathom_deeps.h | 2 +- .../instance_blackfathom_deeps.cpp | 2 +- scripts/kalimdor/bloodmyst_isle.cpp | 2 +- scripts/kalimdor/boss_azuregos.cpp | 2 +- .../caverns_of_time/dark_portal/boss_aeonus.cpp | 2 +- .../dark_portal/boss_chrono_lord_deja.cpp | 2 +- .../dark_portal/boss_temporus.cpp | 2 +- .../caverns_of_time/dark_portal/dark_portal.cpp | 2 +- .../caverns_of_time/dark_portal/dark_portal.h | 2 +- .../dark_portal/instance_dark_portal.cpp | 2 +- .../caverns_of_time/hyjal/boss_archimonde.cpp | 2 +- .../kalimdor/caverns_of_time/hyjal/hyjal.cpp | 2 +- scripts/kalimdor/caverns_of_time/hyjal/hyjal.h | 2 +- .../kalimdor/caverns_of_time/hyjal/hyjalAI.cpp | 2 +- .../kalimdor/caverns_of_time/hyjal/hyjalAI.h | 2 +- .../caverns_of_time/hyjal/instance_hyjal.cpp | 2 +- .../old_hillsbrad/boss_captain_skarloc.cpp | 2 +- .../old_hillsbrad/boss_epoch_hunter.cpp | 2 +- .../old_hillsbrad/boss_leutenant_drake.cpp | 2 +- .../old_hillsbrad/instance_old_hillsbrad.cpp | 2 +- .../old_hillsbrad/old_hillsbrad.cpp | 2 +- .../old_hillsbrad/old_hillsbrad.h | 2 +- scripts/kalimdor/darkshore.cpp | 2 +- scripts/kalimdor/desolace.cpp | 2 +- scripts/kalimdor/dustwallow_marsh.cpp | 2 +- scripts/kalimdor/felwood.cpp | 2 +- scripts/kalimdor/feralas.cpp | 2 +- .../maraudon/boss_celebras_the_cursed.cpp | 2 +- scripts/kalimdor/maraudon/boss_landslide.cpp | 2 +- scripts/kalimdor/maraudon/boss_noxxion.cpp | 2 +- .../maraudon/boss_princess_theradras.cpp | 2 +- scripts/kalimdor/moonglade.cpp | 2 +- scripts/kalimdor/mulgore.cpp | 2 +- scripts/kalimdor/onyxias_lair/boss_onyxia.cpp | 2 +- scripts/kalimdor/orgrimmar.cpp | 2 +- .../boss_amnennar_the_coldbringer.cpp | 2 +- .../kalimdor/razorfen_downs/razorfen_downs.cpp | 2 +- .../kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp | 2 +- .../kalimdor/ruins_of_ahnqiraj/boss_buru.cpp | 2 +- .../ruins_of_ahnqiraj/boss_kurinnaxx.cpp | 2 +- .../kalimdor/ruins_of_ahnqiraj/boss_moam.cpp | 2 +- .../ruins_of_ahnqiraj/boss_ossirian.cpp | 2 +- .../kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp | 2 +- .../instance_ruins_of_ahnqiraj.cpp | 2 +- .../ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp | 2 +- .../ruins_of_ahnqiraj/ruins_of_ahnqiraj.h | 2 +- scripts/kalimdor/silithus.cpp | 2 +- scripts/kalimdor/stonetalon_mountains.cpp | 2 +- scripts/kalimdor/tanaris.cpp | 2 +- scripts/kalimdor/teldrassil.cpp | 2 +- .../temple_of_ahnqiraj/boss_bug_trio.cpp | 2 +- .../kalimdor/temple_of_ahnqiraj/boss_cthun.cpp | 2 +- .../temple_of_ahnqiraj/boss_fankriss.cpp | 2 +- .../temple_of_ahnqiraj/boss_huhuran.cpp | 2 +- .../kalimdor/temple_of_ahnqiraj/boss_ouro.cpp | 2 +- .../temple_of_ahnqiraj/boss_sartura.cpp | 2 +- .../kalimdor/temple_of_ahnqiraj/boss_skeram.cpp | 2 +- .../temple_of_ahnqiraj/boss_twinemperors.cpp | 2 +- .../temple_of_ahnqiraj/boss_viscidus.cpp | 2 +- .../instance_temple_of_ahnqiraj.cpp | 2 +- .../mob_anubisath_sentinel.cpp | 2 +- .../temple_of_ahnqiraj/temple_of_ahnqiraj.h | 2 +- scripts/kalimdor/the_barrens.cpp | 2 +- scripts/kalimdor/thousand_needles.cpp | 2 +- scripts/kalimdor/thunder_bluff.cpp | 2 +- scripts/kalimdor/ungoro_crater.cpp | 2 +- .../instance_wailing_caverns.cpp | 2 +- scripts/kalimdor/winterspring.cpp | 2 +- scripts/kalimdor/zulfarrak/zulfarrak.cpp | 2 +- .../northrend/azjol-nerub/ahnkahet/ahnkahet.h | 2 +- .../azjol-nerub/ahnkahet/boss_jedoga.cpp | 2 +- .../azjol-nerub/ahnkahet/boss_nadox.cpp | 2 +- .../azjol-nerub/ahnkahet/boss_taldaram.cpp | 2 +- .../azjol-nerub/ahnkahet/boss_volazj.cpp | 2 +- .../azjol-nerub/ahnkahet/instance_ahnkahet.cpp | 2 +- .../azjol-nerub/azjol-nerub/azjol-nerub.h | 2 +- .../azjol-nerub/azjol-nerub/boss_anubarak.cpp | 2 +- .../azjol-nerub/azjol-nerub/boss_hadronox.cpp | 2 +- .../azjol-nerub/azjol-nerub/boss_krikthir.cpp | 2 +- .../azjol-nerub/instance_azjol-nerub.cpp | 2 +- scripts/northrend/borean_tundra.cpp | 2 +- scripts/northrend/dalaran.cpp | 2 +- scripts/northrend/dragonblight.cpp | 2 +- .../northrend/draktharon_keep/boss_novos.cpp | 2 +- .../northrend/draktharon_keep/boss_tharonja.cpp | 2 +- .../draktharon_keep/boss_trollgore.cpp | 2 +- scripts/northrend/grizzly_hills.cpp | 2 +- scripts/northrend/gundrak/boss_colossus.cpp | 2 +- scripts/northrend/gundrak/boss_galdarah.cpp | 2 +- scripts/northrend/gundrak/boss_moorabi.cpp | 2 +- scripts/northrend/gundrak/boss_sladran.cpp | 2 +- scripts/northrend/gundrak/gundrak.h | 2 +- scripts/northrend/gundrak/instance_gundrak.cpp | 2 +- scripts/northrend/howling_fjord.cpp | 2 +- scripts/northrend/icecrown.cpp | 2 +- scripts/northrend/naxxramas/boss_anubrekhan.cpp | 2 +- scripts/northrend/naxxramas/boss_faerlina.cpp | 2 +- .../northrend/naxxramas/boss_four_horsemen.cpp | 2 +- scripts/northrend/naxxramas/boss_gluth.cpp | 2 +- scripts/northrend/naxxramas/boss_gothik.cpp | 2 +- scripts/northrend/naxxramas/boss_grobbulus.cpp | 2 +- scripts/northrend/naxxramas/boss_heigan.cpp | 2 +- scripts/northrend/naxxramas/boss_kelthuzad.cpp | 2 +- scripts/northrend/naxxramas/boss_loatheb.cpp | 2 +- scripts/northrend/naxxramas/boss_maexxna.cpp | 2 +- scripts/northrend/naxxramas/boss_noth.cpp | 2 +- scripts/northrend/naxxramas/boss_patchwerk.cpp | 2 +- scripts/northrend/naxxramas/boss_razuvious.cpp | 2 +- scripts/northrend/naxxramas/boss_sapphiron.cpp | 2 +- scripts/northrend/naxxramas/boss_thaddius.cpp | 2 +- .../northrend/naxxramas/instance_naxxramas.cpp | 2 +- scripts/northrend/naxxramas/naxxramas.h | 2 +- scripts/northrend/nexus/nexus/boss_anomalus.cpp | 2 +- .../northrend/nexus/nexus/boss_keristrasza.cpp | 2 +- scripts/northrend/nexus/nexus/boss_ormorok.cpp | 2 +- scripts/northrend/nexus/nexus/boss_telestra.cpp | 2 +- .../northrend/nexus/nexus/instance_nexus.cpp | 2 +- scripts/northrend/nexus/nexus/nexus.h | 2 +- .../obsidian_sanctum/boss_sartharion.cpp | 2 +- .../instance_obsidian_sanctum.cpp | 2 +- .../obsidian_sanctum/obsidian_sanctum.h | 2 +- scripts/northrend/sholazar_basin.cpp | 2 +- scripts/northrend/storm_peaks.cpp | 2 +- .../halls_of_lightning/boss_bjarngrim.cpp | 2 +- .../ulduar/halls_of_lightning/boss_ionar.cpp | 2 +- .../ulduar/halls_of_lightning/boss_loken.cpp | 2 +- .../ulduar/halls_of_lightning/boss_volkhan.cpp | 2 +- .../halls_of_lightning/halls_of_lightning.h | 2 +- .../instance_halls_of_lightning.cpp | 2 +- .../halls_of_stone/boss_maiden_of_grief.cpp | 2 +- .../ulduar/halls_of_stone/boss_sjonnir.cpp | 2 +- .../ulduar/halls_of_stone/halls_of_stone.cpp | 2 +- .../ulduar/halls_of_stone/halls_of_stone.h | 2 +- .../halls_of_stone/instance_halls_of_stone.cpp | 2 +- .../northrend/ulduar/ulduar/instance_ulduar.cpp | 17 ++++++++++++++++- .../utgarde_keep/utgarde_keep/boss_ingvar.cpp | 2 +- .../utgarde_keep/utgarde_keep/boss_keleseth.cpp | 2 +- .../utgarde_keep/boss_skarvald_and_dalronn.cpp | 2 +- .../utgarde_keep/instance_utgarde_keep.cpp | 2 +- .../utgarde_keep/utgarde_keep/utgarde_keep.cpp | 2 +- .../utgarde_keep/utgarde_keep/utgarde_keep.h | 2 +- .../utgarde_pinnacle/boss_gortok.cpp | 2 +- .../utgarde_pinnacle/boss_skadi.cpp | 2 +- .../utgarde_pinnacle/boss_svala.cpp | 2 +- .../utgarde_pinnacle/boss_ymiron.cpp | 2 +- .../instance_utgarde_pinnacle.cpp | 2 +- .../utgarde_pinnacle/utgarde_pinnacle.h | 2 +- scripts/northrend/zuldrak.cpp | 2 +- .../auchenai_crypts/boss_exarch_maladaar.cpp | 2 +- .../mana_tombs/boss_nexusprince_shaffar.cpp | 2 +- .../auchindoun/mana_tombs/boss_pandemonius.cpp | 2 +- .../sethekk_halls/boss_darkweaver_syth.cpp | 2 +- .../sethekk_halls/boss_tailonking_ikiss.cpp | 2 +- .../sethekk_halls/instance_sethekk_halls.cpp | 2 +- .../auchindoun/sethekk_halls/sethekk_halls.h | 2 +- .../boss_ambassador_hellmaw.cpp | 2 +- .../boss_blackheart_the_inciter.cpp | 2 +- .../boss_grandmaster_vorpil.cpp | 2 +- .../auchindoun/shadow_labyrinth/boss_murmur.cpp | 2 +- .../instance_shadow_labyrinth.cpp | 2 +- .../shadow_labyrinth/shadow_labyrinth.h | 2 +- scripts/outland/black_temple/black_temple.cpp | 2 +- scripts/outland/black_temple/black_temple.h | 2 +- scripts/outland/black_temple/boss_bloodboil.cpp | 2 +- scripts/outland/black_temple/boss_illidan.cpp | 2 +- .../black_temple/boss_mother_shahraz.cpp | 2 +- .../black_temple/boss_reliquary_of_souls.cpp | 2 +- .../black_temple/boss_shade_of_akama.cpp | 2 +- scripts/outland/black_temple/boss_supremus.cpp | 2 +- .../black_temple/boss_teron_gorefiend.cpp | 2 +- .../black_temple/boss_warlord_najentus.cpp | 2 +- .../outland/black_temple/illidari_council.cpp | 2 +- .../black_temple/instance_black_temple.cpp | 2 +- scripts/outland/blades_edge_mountains.cpp | 2 +- scripts/outland/boss_doomlord_kazzak.cpp | 2 +- scripts/outland/boss_doomwalker.cpp | 2 +- .../boss_fathomlord_karathress.cpp | 2 +- .../boss_hydross_the_unstable.cpp | 2 +- .../serpent_shrine/boss_lady_vashj.cpp | 2 +- .../serpent_shrine/boss_leotheras_the_blind.cpp | 2 +- .../serpent_shrine/boss_morogrim_tidewalker.cpp | 2 +- .../serpent_shrine/instance_serpent_shrine.cpp | 2 +- .../serpent_shrine/serpent_shrine.h | 2 +- .../slave_pens/boss_rokmar.cpp | 2 +- .../steam_vault/boss_hydromancer_thespia.cpp | 2 +- .../steam_vault/boss_mekgineer_steamrigger.cpp | 2 +- .../steam_vault/boss_warlord_kalithresh.cpp | 2 +- .../steam_vault/instance_steam_vault.cpp | 2 +- .../steam_vault/steam_vault.h | 2 +- .../underbog/boss_hungarfen.cpp | 2 +- scripts/outland/gruuls_lair/boss_gruul.cpp | 2 +- .../gruuls_lair/boss_high_king_maulgar.cpp | 2 +- scripts/outland/gruuls_lair/gruuls_lair.h | 2 +- .../gruuls_lair/instance_gruuls_lair.cpp | 2 +- .../blood_furnace/blood_furnace.h | 2 +- .../blood_furnace/boss_broggok.cpp | 2 +- .../blood_furnace/boss_kelidan_the_breaker.cpp | 2 +- .../blood_furnace/boss_the_maker.cpp | 2 +- .../blood_furnace/instance_blood_furnace.cpp | 2 +- .../boss_nazan_and_vazruden.cpp | 2 +- .../boss_omor_the_unscarred.cpp | 2 +- .../boss_watchkeeper_gargolmar.cpp | 2 +- .../hellfire_ramparts/hellfire_ramparts.h | 2 +- .../instance_hellfire_ramparts.cpp | 2 +- .../magtheridons_lair/boss_magtheridon.cpp | 2 +- .../instance_magtheridons_lair.cpp | 2 +- .../magtheridons_lair/magtheridons_lair.h | 2 +- .../shattered_halls/boss_nethekurse.cpp | 2 +- .../shattered_halls/boss_warbringer_omrogg.cpp | 2 +- .../boss_warchief_kargath_bladefist.cpp | 2 +- .../instance_shattered_halls.cpp | 2 +- .../shattered_halls/shattered_halls.h | 2 +- scripts/outland/hellfire_peninsula.cpp | 2 +- scripts/outland/nagrand.cpp | 2 +- scripts/outland/netherstorm.cpp | 2 +- scripts/outland/shadowmoon_valley.cpp | 2 +- scripts/outland/shattrath_city.cpp | 2 +- .../outland/tempest_keep/arcatraz/arcatraz.cpp | 2 +- .../outland/tempest_keep/arcatraz/arcatraz.h | 2 +- .../arcatraz/boss_harbinger_skyriss.cpp | 2 +- .../tempest_keep/arcatraz/instance_arcatraz.cpp | 2 +- .../botanica/boss_high_botanist_freywinn.cpp | 2 +- .../outland/tempest_keep/botanica/boss_laj.cpp | 2 +- .../botanica/boss_warp_splinter.cpp | 2 +- .../tempest_keep/the_eye/boss_astromancer.cpp | 2 +- .../tempest_keep/the_eye/boss_kaelthas.cpp | 2 +- .../tempest_keep/the_eye/boss_void_reaver.cpp | 2 +- .../tempest_keep/the_eye/instance_the_eye.cpp | 2 +- .../outland/tempest_keep/the_eye/the_eye.cpp | 2 +- scripts/outland/tempest_keep/the_eye/the_eye.h | 2 +- .../the_mechanar/boss_gatewatcher_gyrokill.cpp | 2 +- .../the_mechanar/boss_gatewatcher_ironhand.cpp | 2 +- .../boss_nethermancer_sepethrea.cpp | 2 +- .../boss_pathaleon_the_calculator.cpp | 2 +- .../the_mechanar/instance_mechanar.cpp | 2 +- .../tempest_keep/the_mechanar/mechanar.h | 2 +- scripts/outland/terokkar_forest.cpp | 2 +- scripts/outland/zangarmarsh.cpp | 2 +- scripts/world/areatrigger_scripts.cpp | 2 +- scripts/world/boss_emeriss.cpp | 2 +- scripts/world/boss_lethon.cpp | 2 +- scripts/world/boss_taerar.cpp | 2 +- scripts/world/boss_ysondre.cpp | 2 +- scripts/world/go_scripts.cpp | 2 +- scripts/world/guards.cpp | 2 +- scripts/world/item_scripts.cpp | 2 +- scripts/world/mob_generic_creature.cpp | 2 +- scripts/world/npc_professions.cpp | 2 +- scripts/world/npcs_special.cpp | 2 +- system/ScriptLoader.cpp | 2 +- system/ScriptLoader.h | 2 +- system/system.cpp | 2 +- system/system.h | 2 +- 451 files changed, 466 insertions(+), 451 deletions(-) diff --git a/ScriptMgr.cpp b/ScriptMgr.cpp index eb8c2dfb3..98f00ec77 100644 --- a/ScriptMgr.cpp +++ b/ScriptMgr.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/ScriptMgr.h b/ScriptMgr.h index 1962add43..a595d731d 100644 --- a/ScriptMgr.h +++ b/ScriptMgr.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/base/escort_ai.cpp b/base/escort_ai.cpp index 11bb5de22..0da132197 100644 --- a/base/escort_ai.cpp +++ b/base/escort_ai.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/base/escort_ai.h b/base/escort_ai.h index 07df53f74..b2bfcfcd3 100644 --- a/base/escort_ai.h +++ b/base/escort_ai.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/base/follower_ai.cpp b/base/follower_ai.cpp index 252594d07..364a93405 100644 --- a/base/follower_ai.cpp +++ b/base/follower_ai.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/base/follower_ai.h b/base/follower_ai.h index 66677fa7e..8cc70f42d 100644 --- a/base/follower_ai.h +++ b/base/follower_ai.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/base/guard_ai.cpp b/base/guard_ai.cpp index 3938e9183..7c409bede 100644 --- a/base/guard_ai.cpp +++ b/base/guard_ai.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/base/guard_ai.h b/base/guard_ai.h index cd677cfc0..51fbd1ed2 100644 --- a/base/guard_ai.h +++ b/base/guard_ai.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/base/simple_ai.cpp b/base/simple_ai.cpp index b83a8905a..a6277ec48 100644 --- a/base/simple_ai.cpp +++ b/base/simple_ai.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/base/simple_ai.h b/base/simple_ai.h index f9a5765e0..10c688420 100644 --- a/base/simple_ai.h +++ b/base/simple_ai.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/include/precompiled.cpp b/include/precompiled.cpp index faeca72cd..b4ce73fb1 100644 --- a/include/precompiled.cpp +++ b/include/precompiled.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/include/precompiled.h b/include/precompiled.h index d22cadbdf..41946925b 100644 --- a/include/precompiled.h +++ b/include/precompiled.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/include/sc_creature.cpp b/include/sc_creature.cpp index 027667a7e..c1641cbfa 100644 --- a/include/sc_creature.cpp +++ b/include/sc_creature.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/include/sc_creature.h b/include/sc_creature.h index 444e12a59..5edf5e9f1 100644 --- a/include/sc_creature.h +++ b/include/sc_creature.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/include/sc_gossip.h b/include/sc_gossip.h index 67e478eb0..ac730be95 100644 --- a/include/sc_gossip.h +++ b/include/sc_gossip.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/include/sc_grid_searchers.cpp b/include/sc_grid_searchers.cpp index 32ed719de..11b028246 100644 --- a/include/sc_grid_searchers.cpp +++ b/include/sc_grid_searchers.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/include/sc_grid_searchers.h b/include/sc_grid_searchers.h index f46be7288..8a3d3a020 100644 --- a/include/sc_grid_searchers.h +++ b/include/sc_grid_searchers.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/include/sc_instance.cpp b/include/sc_instance.cpp index 872d6fa4a..d5ac922d4 100644 --- a/include/sc_instance.cpp +++ b/include/sc_instance.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/include/sc_instance.h b/include/sc_instance.h index 5fd66ba8f..8faacc1a7 100644 --- a/include/sc_instance.h +++ b/include/sc_instance.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/battlegrounds/battleground.cpp b/scripts/battlegrounds/battleground.cpp index 507b9832e..0e8daef14 100644 --- a/scripts/battlegrounds/battleground.cpp +++ b/scripts/battlegrounds/battleground.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/alterac_mountains.cpp b/scripts/eastern_kingdoms/alterac_mountains.cpp index 802d2dbdf..e8f95e14e 100644 --- a/scripts/eastern_kingdoms/alterac_mountains.cpp +++ b/scripts/eastern_kingdoms/alterac_mountains.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/arathi_highlands.cpp b/scripts/eastern_kingdoms/arathi_highlands.cpp index 1158849ea..e55699bb4 100644 --- a/scripts/eastern_kingdoms/arathi_highlands.cpp +++ b/scripts/eastern_kingdoms/arathi_highlands.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp index e653704b6..5a7994a88 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h index 90add2fb2..439b97b3f 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp index 2d6b930dc..14fdb31de 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_anubshiah.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_anubshiah.cpp index 1cbb57ac5..42b5357a3 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_anubshiah.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_anubshiah.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp index a0c919521..a9304beea 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp index ffc4f53dc..58dba22e1 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_gorosh_the_dervish.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_gorosh_the_dervish.cpp index d17f4e00a..40214bc23 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_gorosh_the_dervish.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_gorosh_the_dervish.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_grizzle.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_grizzle.cpp index b712608a1..42b12db4a 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_grizzle.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_grizzle.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_high_interrogator_gerstahn.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_high_interrogator_gerstahn.cpp index ba42298e9..f40709cb0 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_high_interrogator_gerstahn.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_high_interrogator_gerstahn.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_magmus.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_magmus.cpp index 2230d6b47..b39be858a 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_magmus.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_magmus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_tomb_of_seven.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_tomb_of_seven.cpp index 15bc909c9..678eb32f6 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_tomb_of_seven.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_tomb_of_seven.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp index b1b048306..6407c3dc5 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_drakkisath.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_drakkisath.cpp index 7d819338c..8cf8d3e05 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_drakkisath.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_drakkisath.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp index 1c35d6a78..c09ee2275 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_halycon.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_halycon.cpp index 9fd21866a..e81b836e4 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_halycon.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_halycon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_highlord_omokk.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_highlord_omokk.cpp index 5a9a23d51..9f6aa2daa 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_highlord_omokk.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_highlord_omokk.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_mother_smolderweb.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_mother_smolderweb.cpp index 5e17448d8..9c5e027f7 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_mother_smolderweb.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_mother_smolderweb.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_overlord_wyrmthalak.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_overlord_wyrmthalak.cpp index c2d25a09a..3f1896ced 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_overlord_wyrmthalak.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_overlord_wyrmthalak.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp index b6e20ceae..bad73f9d6 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_quartermaster_zigris.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_quartermaster_zigris.cpp index 3b6748c28..aa7d824cc 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_quartermaster_zigris.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_quartermaster_zigris.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_rend_blackhand.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_rend_blackhand.cpp index ca400ceab..a78f00984 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_rend_blackhand.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_rend_blackhand.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_shadow_hunter_voshgajin.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_shadow_hunter_voshgajin.cpp index 61934f499..82ad5ecee 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_shadow_hunter_voshgajin.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_shadow_hunter_voshgajin.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_the_beast.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_the_beast.cpp index 687d22764..e60822075 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_the_beast.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_the_beast.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_warmaster_voone.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_warmaster_voone.cpp index 3c6755f0a..fa1adf021 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_warmaster_voone.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_warmaster_voone.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_broodlord_lashlayer.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_broodlord_lashlayer.cpp index d97ca71ba..812e45fef 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_broodlord_lashlayer.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_broodlord_lashlayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp index 8204c9567..3e8678afa 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp index 56152218f..0c56fdd50 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp index 213f8b069..9eda4fa20 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp index 9792e5fba..161ee4f6d 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp index 0d544ff4a..d1431e96b 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp index f850ab561..16822fb00 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp index 2cbaeb3a1..26d012c14 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp index becffee59..c5d2c9ee2 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp b/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp index 619319c51..cdea07be0 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/blasted_lands.cpp b/scripts/eastern_kingdoms/blasted_lands.cpp index aa0e6a63b..c641d2d22 100644 --- a/scripts/eastern_kingdoms/blasted_lands.cpp +++ b/scripts/eastern_kingdoms/blasted_lands.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/boss_kruul.cpp b/scripts/eastern_kingdoms/boss_kruul.cpp index 01ab563ad..f786befae 100644 --- a/scripts/eastern_kingdoms/boss_kruul.cpp +++ b/scripts/eastern_kingdoms/boss_kruul.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/burning_steppes.cpp b/scripts/eastern_kingdoms/burning_steppes.cpp index 24e6b5209..b1c7c3c6e 100644 --- a/scripts/eastern_kingdoms/burning_steppes.cpp +++ b/scripts/eastern_kingdoms/burning_steppes.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/deadmines/deadmines.cpp b/scripts/eastern_kingdoms/deadmines/deadmines.cpp index 902e86959..0cb977fb3 100644 --- a/scripts/eastern_kingdoms/deadmines/deadmines.cpp +++ b/scripts/eastern_kingdoms/deadmines/deadmines.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/deadmines/deadmines.h b/scripts/eastern_kingdoms/deadmines/deadmines.h index f5838291d..df5b91d19 100644 --- a/scripts/eastern_kingdoms/deadmines/deadmines.h +++ b/scripts/eastern_kingdoms/deadmines/deadmines.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp b/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp index 623c1fdcf..28d6e941e 100644 --- a/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp +++ b/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/dun_morogh.cpp b/scripts/eastern_kingdoms/dun_morogh.cpp index 9318c7ac0..ea9dbb9a4 100644 --- a/scripts/eastern_kingdoms/dun_morogh.cpp +++ b/scripts/eastern_kingdoms/dun_morogh.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/eastern_plaguelands.cpp b/scripts/eastern_kingdoms/eastern_plaguelands.cpp index 2681c97da..3ba7ce460 100644 --- a/scripts/eastern_kingdoms/eastern_plaguelands.cpp +++ b/scripts/eastern_kingdoms/eastern_plaguelands.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/elwynn_forest.cpp b/scripts/eastern_kingdoms/elwynn_forest.cpp index 842003838..704431397 100644 --- a/scripts/eastern_kingdoms/elwynn_forest.cpp +++ b/scripts/eastern_kingdoms/elwynn_forest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/eversong_woods.cpp b/scripts/eastern_kingdoms/eversong_woods.cpp index 2e5c06eff..0a59781c7 100644 --- a/scripts/eastern_kingdoms/eversong_woods.cpp +++ b/scripts/eastern_kingdoms/eversong_woods.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/ghostlands.cpp b/scripts/eastern_kingdoms/ghostlands.cpp index b9883bd50..17c54397e 100644 --- a/scripts/eastern_kingdoms/ghostlands.cpp +++ b/scripts/eastern_kingdoms/ghostlands.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/hinterlands.cpp b/scripts/eastern_kingdoms/hinterlands.cpp index 27bcc91e9..d083009fd 100644 --- a/scripts/eastern_kingdoms/hinterlands.cpp +++ b/scripts/eastern_kingdoms/hinterlands.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/ironforge.cpp b/scripts/eastern_kingdoms/ironforge.cpp index e6dac07b0..4c54ccd17 100644 --- a/scripts/eastern_kingdoms/ironforge.cpp +++ b/scripts/eastern_kingdoms/ironforge.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/isle_of_queldanas.cpp b/scripts/eastern_kingdoms/isle_of_queldanas.cpp index 295ec933e..abf6e3099 100644 --- a/scripts/eastern_kingdoms/isle_of_queldanas.cpp +++ b/scripts/eastern_kingdoms/isle_of_queldanas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/karazhan/boss_curator.cpp b/scripts/eastern_kingdoms/karazhan/boss_curator.cpp index 4ba952309..19f519111 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_curator.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_curator.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp b/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp index f1994a960..e2dcd63d7 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp b/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp index 843cba809..08d39485a 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp b/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp index 76a0a05cc..706b7c1af 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp b/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp index 9edce38bf..abb969a7d 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp b/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp index 5ecef3848..2adc3364e 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp b/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp index 2b68aeca5..b57108f48 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp b/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp index f4e8959eb..9bdd26fd6 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp b/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp index 16dfec21f..67092a7ac 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp b/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp index 755624a88..f8c46fe8d 100644 --- a/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp +++ b/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp index 05b7452f7..49aadf54b 100644 --- a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.cpp b/scripts/eastern_kingdoms/karazhan/karazhan.cpp index cf1bcf62c..fe4ddd658 100644 --- a/scripts/eastern_kingdoms/karazhan/karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/karazhan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.h b/scripts/eastern_kingdoms/karazhan/karazhan.h index d4cd108cf..022b13f8b 100644 --- a/scripts/eastern_kingdoms/karazhan/karazhan.h +++ b/scripts/eastern_kingdoms/karazhan/karazhan.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/loch_modan.cpp b/scripts/eastern_kingdoms/loch_modan.cpp index b4fc234ec..db14b892a 100644 --- a/scripts/eastern_kingdoms/loch_modan.cpp +++ b/scripts/eastern_kingdoms/loch_modan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp index a189a2c23..04a1d1319 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp index 67b676d1f..dcf494981 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp index 5d30ed4f0..31fdc4b8d 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp index d853d28ae..d8e1ab0ee 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp b/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp index bb965cbcb..111c2ecf6 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp index 8a605d8b8..93827f24f 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h index bf28e6369..b97628757 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h +++ b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp b/scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp index 61e986567..c691b30d7 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/molten_core/boss_garr.cpp b/scripts/eastern_kingdoms/molten_core/boss_garr.cpp index 3b16edca8..0bde89109 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_garr.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_garr.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp b/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp index 7316a7575..27f45236f 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp b/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp index aead1e08c..e6772a978 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp b/scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp index ba470f2fa..b6346d668 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/molten_core/boss_magmadar.cpp b/scripts/eastern_kingdoms/molten_core/boss_magmadar.cpp index dac6350d2..62ab0b3b5 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_magmadar.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_magmadar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp b/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp index 0bddfd9c3..2653319d2 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp b/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp index ef61d860e..5a5128148 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp b/scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp index 99b5ae51b..e998744d4 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp b/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp index da46ea14c..962a3b3be 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp b/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp index 313b0a11b..70b9fa60a 100644 --- a/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp +++ b/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/molten_core/molten_core.cpp b/scripts/eastern_kingdoms/molten_core/molten_core.cpp index 1d8fb1381..3f192a41b 100644 --- a/scripts/eastern_kingdoms/molten_core/molten_core.cpp +++ b/scripts/eastern_kingdoms/molten_core/molten_core.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/molten_core/molten_core.h b/scripts/eastern_kingdoms/molten_core/molten_core.h index af1172b15..f7ed5e9a2 100644 --- a/scripts/eastern_kingdoms/molten_core/molten_core.h +++ b/scripts/eastern_kingdoms/molten_core/molten_core.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp index aeb289b29..028b76436 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp +++ b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp index 763bd6dc5..0e160da74 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_azshir_the_sleepless.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_azshir_the_sleepless.cpp index dc3d7ed17..1901ddcef 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_azshir_the_sleepless.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_azshir_the_sleepless.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_bloodmage_thalnos.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_bloodmage_thalnos.cpp index 1d1112a20..42f40465d 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_bloodmage_thalnos.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_bloodmage_thalnos.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp index c0b5988c4..dbb941ed0 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp index 3926b8a2e..523c3cad0 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_high_inquisitor_fairbanks.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_high_inquisitor_fairbanks.cpp index 89608ae79..02c7d0c95 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_high_inquisitor_fairbanks.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_high_inquisitor_fairbanks.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_houndmaster_loksey.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_houndmaster_loksey.cpp index dd9772834..e39ab4416 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_houndmaster_loksey.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_houndmaster_loksey.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_interrogator_vishas.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_interrogator_vishas.cpp index a4dd3fa69..afab974c9 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_interrogator_vishas.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_interrogator_vishas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp index 3c5a84edc..c3b1057a9 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_scorn.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_scorn.cpp index 1c194b91d..8c61ca695 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_scorn.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_scorn.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp b/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp index 411d7d7d4..38b1fe051 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h b/scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h index c3c1cebb5..62e3443ce 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h +++ b/scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp b/scripts/eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp index fd6d1a29b..05aac63e4 100644 --- a/scripts/eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp +++ b/scripts/eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scholomance/boss_death_knight_darkreaver.cpp b/scripts/eastern_kingdoms/scholomance/boss_death_knight_darkreaver.cpp index e2b30131b..64a206839 100644 --- a/scripts/eastern_kingdoms/scholomance/boss_death_knight_darkreaver.cpp +++ b/scripts/eastern_kingdoms/scholomance/boss_death_knight_darkreaver.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scholomance/boss_doctor_theolen_krastinov.cpp b/scripts/eastern_kingdoms/scholomance/boss_doctor_theolen_krastinov.cpp index e81b9118d..88e4600cc 100644 --- a/scripts/eastern_kingdoms/scholomance/boss_doctor_theolen_krastinov.cpp +++ b/scripts/eastern_kingdoms/scholomance/boss_doctor_theolen_krastinov.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scholomance/boss_illucia_barov.cpp b/scripts/eastern_kingdoms/scholomance/boss_illucia_barov.cpp index 219af9ba9..2ac71d1e6 100644 --- a/scripts/eastern_kingdoms/scholomance/boss_illucia_barov.cpp +++ b/scripts/eastern_kingdoms/scholomance/boss_illucia_barov.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scholomance/boss_instructor_malicia.cpp b/scripts/eastern_kingdoms/scholomance/boss_instructor_malicia.cpp index 6e72c97d3..3a955ff1b 100644 --- a/scripts/eastern_kingdoms/scholomance/boss_instructor_malicia.cpp +++ b/scripts/eastern_kingdoms/scholomance/boss_instructor_malicia.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp b/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp index f88792978..0f6166073 100644 --- a/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp +++ b/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scholomance/boss_kormok.cpp b/scripts/eastern_kingdoms/scholomance/boss_kormok.cpp index fb9f56eb8..173a73217 100644 --- a/scripts/eastern_kingdoms/scholomance/boss_kormok.cpp +++ b/scripts/eastern_kingdoms/scholomance/boss_kormok.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scholomance/boss_lord_alexei_barov.cpp b/scripts/eastern_kingdoms/scholomance/boss_lord_alexei_barov.cpp index 4efb5d60a..9a868cfb7 100644 --- a/scripts/eastern_kingdoms/scholomance/boss_lord_alexei_barov.cpp +++ b/scripts/eastern_kingdoms/scholomance/boss_lord_alexei_barov.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scholomance/boss_lorekeeper_polkelt.cpp b/scripts/eastern_kingdoms/scholomance/boss_lorekeeper_polkelt.cpp index 855e7f921..a49962aa5 100644 --- a/scripts/eastern_kingdoms/scholomance/boss_lorekeeper_polkelt.cpp +++ b/scripts/eastern_kingdoms/scholomance/boss_lorekeeper_polkelt.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scholomance/boss_ras_frostwhisper.cpp b/scripts/eastern_kingdoms/scholomance/boss_ras_frostwhisper.cpp index dd9305300..62bb38b45 100644 --- a/scripts/eastern_kingdoms/scholomance/boss_ras_frostwhisper.cpp +++ b/scripts/eastern_kingdoms/scholomance/boss_ras_frostwhisper.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scholomance/boss_the_ravenian.cpp b/scripts/eastern_kingdoms/scholomance/boss_the_ravenian.cpp index 37e1cdf57..b19fc6b92 100644 --- a/scripts/eastern_kingdoms/scholomance/boss_the_ravenian.cpp +++ b/scripts/eastern_kingdoms/scholomance/boss_the_ravenian.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scholomance/boss_vectus.cpp b/scripts/eastern_kingdoms/scholomance/boss_vectus.cpp index 30f9c5b26..1840bf193 100644 --- a/scripts/eastern_kingdoms/scholomance/boss_vectus.cpp +++ b/scripts/eastern_kingdoms/scholomance/boss_vectus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp b/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp index de0fe55fe..2a14e4d93 100644 --- a/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp +++ b/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/scholomance/scholomance.h b/scripts/eastern_kingdoms/scholomance/scholomance.h index b3674a064..34e759bf5 100644 --- a/scripts/eastern_kingdoms/scholomance/scholomance.h +++ b/scripts/eastern_kingdoms/scholomance/scholomance.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/searing_gorge.cpp b/scripts/eastern_kingdoms/searing_gorge.cpp index 510add172..21a5d6ab4 100644 --- a/scripts/eastern_kingdoms/searing_gorge.cpp +++ b/scripts/eastern_kingdoms/searing_gorge.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp b/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp index e451f43f5..3fd0ae234 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp +++ b/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp index 09f16556b..49dea438b 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp +++ b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h index 16b096b7d..e1f878669 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h +++ b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/silvermoon_city.cpp b/scripts/eastern_kingdoms/silvermoon_city.cpp index 3d871d080..ac6975232 100644 --- a/scripts/eastern_kingdoms/silvermoon_city.cpp +++ b/scripts/eastern_kingdoms/silvermoon_city.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/silverpine_forest.cpp b/scripts/eastern_kingdoms/silverpine_forest.cpp index 30f7857f8..25cd5e811 100644 --- a/scripts/eastern_kingdoms/silverpine_forest.cpp +++ b/scripts/eastern_kingdoms/silverpine_forest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/stormwind_city.cpp b/scripts/eastern_kingdoms/stormwind_city.cpp index 0349efd03..ec52b5de1 100644 --- a/scripts/eastern_kingdoms/stormwind_city.cpp +++ b/scripts/eastern_kingdoms/stormwind_city.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/stranglethorn_vale.cpp b/scripts/eastern_kingdoms/stranglethorn_vale.cpp index ee2a8bc84..51f226dd2 100644 --- a/scripts/eastern_kingdoms/stranglethorn_vale.cpp +++ b/scripts/eastern_kingdoms/stranglethorn_vale.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/stratholme/boss_baron_rivendare.cpp b/scripts/eastern_kingdoms/stratholme/boss_baron_rivendare.cpp index 6fa792610..95a7626a4 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_baron_rivendare.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_baron_rivendare.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/stratholme/boss_baroness_anastari.cpp b/scripts/eastern_kingdoms/stratholme/boss_baroness_anastari.cpp index dbf4ae70f..f0ef64339 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_baroness_anastari.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_baroness_anastari.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp b/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp index 6398e2d87..cbf3b02b0 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp b/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp index 7c1e965d9..d96ca2280 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/stratholme/boss_magistrate_barthilas.cpp b/scripts/eastern_kingdoms/stratholme/boss_magistrate_barthilas.cpp index a47d3d46b..07d5ce931 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_magistrate_barthilas.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_magistrate_barthilas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/stratholme/boss_maleki_the_pallid.cpp b/scripts/eastern_kingdoms/stratholme/boss_maleki_the_pallid.cpp index a84fd04be..6c8db5f02 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_maleki_the_pallid.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_maleki_the_pallid.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/stratholme/boss_nerubenkan.cpp b/scripts/eastern_kingdoms/stratholme/boss_nerubenkan.cpp index 293441f47..2d29df49a 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_nerubenkan.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_nerubenkan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp b/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp index 56ebe6c26..696324428 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/stratholme/boss_postmaster_malown.cpp b/scripts/eastern_kingdoms/stratholme/boss_postmaster_malown.cpp index c57a5374a..58a683045 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_postmaster_malown.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_postmaster_malown.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/stratholme/boss_ramstein_the_gorger.cpp b/scripts/eastern_kingdoms/stratholme/boss_ramstein_the_gorger.cpp index 7b2cc6165..4e56ce554 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_ramstein_the_gorger.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_ramstein_the_gorger.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/stratholme/boss_timmy_the_cruel.cpp b/scripts/eastern_kingdoms/stratholme/boss_timmy_the_cruel.cpp index 2585d95e1..61e71c454 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_timmy_the_cruel.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_timmy_the_cruel.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp b/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp index 36e2dde00..05be1e095 100644 --- a/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp +++ b/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/stratholme/stratholme.cpp b/scripts/eastern_kingdoms/stratholme/stratholme.cpp index 8c07cd436..c0230e490 100644 --- a/scripts/eastern_kingdoms/stratholme/stratholme.cpp +++ b/scripts/eastern_kingdoms/stratholme/stratholme.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/stratholme/stratholme.h b/scripts/eastern_kingdoms/stratholme/stratholme.h index 3684ab9c9..568f34d36 100644 --- a/scripts/eastern_kingdoms/stratholme/stratholme.h +++ b/scripts/eastern_kingdoms/stratholme/stratholme.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp b/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp index 2c7c33528..465094ce5 100644 --- a/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp +++ b/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp index 01a55d4c2..9ba797439 100644 --- a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp +++ b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h index 21112a916..517d0ba4e 100644 --- a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h +++ b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp index e6e6ee644..069b9ad9d 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp index 46254d811..077ae5466 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp index 3ebcdc53f..ecad826ce 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h index dc59ec839..a71dea42f 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h +++ b/scripts/eastern_kingdoms/sunwell_plateau/sunwell_plateau.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/tirisfal_glades.cpp b/scripts/eastern_kingdoms/tirisfal_glades.cpp index cbf3039d2..27db6c432 100644 --- a/scripts/eastern_kingdoms/tirisfal_glades.cpp +++ b/scripts/eastern_kingdoms/tirisfal_glades.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/uldaman/boss_ironaya.cpp b/scripts/eastern_kingdoms/uldaman/boss_ironaya.cpp index 2425fe244..529d0d68a 100644 --- a/scripts/eastern_kingdoms/uldaman/boss_ironaya.cpp +++ b/scripts/eastern_kingdoms/uldaman/boss_ironaya.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/uldaman/uldaman.cpp b/scripts/eastern_kingdoms/uldaman/uldaman.cpp index 33b43f3f1..24a8c3e8c 100644 --- a/scripts/eastern_kingdoms/uldaman/uldaman.cpp +++ b/scripts/eastern_kingdoms/uldaman/uldaman.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/undercity.cpp b/scripts/eastern_kingdoms/undercity.cpp index 1b3f2b42a..5063a4d05 100644 --- a/scripts/eastern_kingdoms/undercity.cpp +++ b/scripts/eastern_kingdoms/undercity.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/western_plaguelands.cpp b/scripts/eastern_kingdoms/western_plaguelands.cpp index c96ea3f44..bc5f1c2a4 100644 --- a/scripts/eastern_kingdoms/western_plaguelands.cpp +++ b/scripts/eastern_kingdoms/western_plaguelands.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/westfall.cpp b/scripts/eastern_kingdoms/westfall.cpp index 3848907a0..370f5ac9a 100644 --- a/scripts/eastern_kingdoms/westfall.cpp +++ b/scripts/eastern_kingdoms/westfall.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/wetlands.cpp b/scripts/eastern_kingdoms/wetlands.cpp index 54b39e262..dfd13fcbb 100644 --- a/scripts/eastern_kingdoms/wetlands.cpp +++ b/scripts/eastern_kingdoms/wetlands.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp b/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp index 3cfb31942..194c88e95 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp b/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp index 513569bd6..b260edc92 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp index 4c6fee687..fd6a70bc2 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp b/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp index 83f205971..506cc0f28 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp b/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp index 77548f44c..8cc797d98 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp b/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp index 16cb0cd69..4a5e02d47 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_zuljin.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp index 38508678d..0425b2522 100644 --- a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp +++ b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulaman/zulaman.cpp b/scripts/eastern_kingdoms/zulaman/zulaman.cpp index 60a69f5e1..6dab0d8c9 100644 --- a/scripts/eastern_kingdoms/zulaman/zulaman.cpp +++ b/scripts/eastern_kingdoms/zulaman/zulaman.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulaman/zulaman.h b/scripts/eastern_kingdoms/zulaman/zulaman.h index 32f44b7b4..cc85875f1 100644 --- a/scripts/eastern_kingdoms/zulaman/zulaman.h +++ b/scripts/eastern_kingdoms/zulaman/zulaman.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp b/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp index 6ba07fd0d..8191c8df5 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/boss_gahzranka.cpp b/scripts/eastern_kingdoms/zulgurub/boss_gahzranka.cpp index 719cc1ff1..d7881b9d9 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_gahzranka.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_gahzranka.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/boss_grilek.cpp b/scripts/eastern_kingdoms/zulgurub/boss_grilek.cpp index 57d38bfe3..b250023cf 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_grilek.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_grilek.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp b/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp index ab86cc2d1..7a654649c 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp b/scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp index 5ae86c7a3..aeed514bd 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp b/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp index b6c848771..e2d2726bb 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp b/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp index c1f399c68..fbda9ace3 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp b/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp index 737c20c75..364a67ee7 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp b/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp index dc98ef5fc..5cb72ca32 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp b/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp index 1d5ca979f..5a75d37aa 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp b/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp index 396a7f4bd..d0e665e43 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp b/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp index afe8e7256..f839bae7c 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/boss_wushoolay.cpp b/scripts/eastern_kingdoms/zulgurub/boss_wushoolay.cpp index 5fedded62..04165374f 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_wushoolay.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_wushoolay.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp b/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp index e493dbc67..c0818ae3f 100644 --- a/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp +++ b/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/eastern_kingdoms/zulgurub/zulgurub.h b/scripts/eastern_kingdoms/zulgurub/zulgurub.h index e5290db57..bab1e24b3 100644 --- a/scripts/eastern_kingdoms/zulgurub/zulgurub.h +++ b/scripts/eastern_kingdoms/zulgurub/zulgurub.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/examples/example_creature.cpp b/scripts/examples/example_creature.cpp index 98a9f6b72..cff649357 100644 --- a/scripts/examples/example_creature.cpp +++ b/scripts/examples/example_creature.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/examples/example_escort.cpp b/scripts/examples/example_escort.cpp index 1ecaac9d4..25febf927 100644 --- a/scripts/examples/example_escort.cpp +++ b/scripts/examples/example_escort.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/examples/example_gossip_codebox.cpp b/scripts/examples/example_gossip_codebox.cpp index 50ddf9d32..2f67397f4 100644 --- a/scripts/examples/example_gossip_codebox.cpp +++ b/scripts/examples/example_gossip_codebox.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/examples/example_misc.cpp b/scripts/examples/example_misc.cpp index 1bb1a7a0b..f02a0dfad 100644 --- a/scripts/examples/example_misc.cpp +++ b/scripts/examples/example_misc.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/ashenvale.cpp b/scripts/kalimdor/ashenvale.cpp index 9cbf78c49..33f75073c 100644 --- a/scripts/kalimdor/ashenvale.cpp +++ b/scripts/kalimdor/ashenvale.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/azshara.cpp b/scripts/kalimdor/azshara.cpp index 587d393ba..bbb98a8d8 100644 --- a/scripts/kalimdor/azshara.cpp +++ b/scripts/kalimdor/azshara.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/azuremyst_isle.cpp b/scripts/kalimdor/azuremyst_isle.cpp index 936e534ba..1b0b0e771 100644 --- a/scripts/kalimdor/azuremyst_isle.cpp +++ b/scripts/kalimdor/azuremyst_isle.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h b/scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h index 24d0e7455..b8620b52a 100644 --- a/scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h +++ b/scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp b/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp index a4efe36b6..19b31f841 100644 --- a/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp +++ b/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/bloodmyst_isle.cpp b/scripts/kalimdor/bloodmyst_isle.cpp index cc2580841..59e175e9a 100644 --- a/scripts/kalimdor/bloodmyst_isle.cpp +++ b/scripts/kalimdor/bloodmyst_isle.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/boss_azuregos.cpp b/scripts/kalimdor/boss_azuregos.cpp index 5a6a6477d..83fd8c8d4 100644 --- a/scripts/kalimdor/boss_azuregos.cpp +++ b/scripts/kalimdor/boss_azuregos.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp index 24c48e90f..b166e8633 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp index c889bcc1f..cbc244d56 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp index a84bded5c..f3552c526 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp index 587b55279..beada5a46 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h index 2fb20dd45..34c9f66dd 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h +++ b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp index cbefd3be6..75dd1cf98 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/instance_dark_portal.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp b/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp index b125dfb01..55101d7d5 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp index 672fe36f9..a06a1530b 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h index be0e004c7..851936027 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp index 50ece378b..7ef16fb45 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h index 5bfba4876..d188213d9 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp b/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp index 63cdb7ad1..fadb76312 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_captain_skarloc.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_captain_skarloc.cpp index 2897390d8..c1cdba846 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_captain_skarloc.cpp +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_captain_skarloc.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_epoch_hunter.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_epoch_hunter.cpp index 560ea32c3..4e1c65e71 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_epoch_hunter.cpp +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_epoch_hunter.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_leutenant_drake.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_leutenant_drake.cpp index de123c708..64f0e1ec6 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_leutenant_drake.cpp +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_leutenant_drake.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp index f49a5d30e..4c216a97b 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp index 2c0046d9b..147717020 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h index 650ad23f3..86eacb2d3 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/darkshore.cpp b/scripts/kalimdor/darkshore.cpp index 6883af571..c544de6c3 100644 --- a/scripts/kalimdor/darkshore.cpp +++ b/scripts/kalimdor/darkshore.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/desolace.cpp b/scripts/kalimdor/desolace.cpp index 4b3c563a0..3f0a967dc 100644 --- a/scripts/kalimdor/desolace.cpp +++ b/scripts/kalimdor/desolace.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/dustwallow_marsh.cpp b/scripts/kalimdor/dustwallow_marsh.cpp index 5025ea926..743c6d10d 100644 --- a/scripts/kalimdor/dustwallow_marsh.cpp +++ b/scripts/kalimdor/dustwallow_marsh.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/felwood.cpp b/scripts/kalimdor/felwood.cpp index a4b2b0231..7514a6d4a 100644 --- a/scripts/kalimdor/felwood.cpp +++ b/scripts/kalimdor/felwood.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/feralas.cpp b/scripts/kalimdor/feralas.cpp index 6ec5f20e7..6224e2793 100644 --- a/scripts/kalimdor/feralas.cpp +++ b/scripts/kalimdor/feralas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/maraudon/boss_celebras_the_cursed.cpp b/scripts/kalimdor/maraudon/boss_celebras_the_cursed.cpp index 6af4f6a96..3021bbadf 100644 --- a/scripts/kalimdor/maraudon/boss_celebras_the_cursed.cpp +++ b/scripts/kalimdor/maraudon/boss_celebras_the_cursed.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/maraudon/boss_landslide.cpp b/scripts/kalimdor/maraudon/boss_landslide.cpp index 16648b028..0aa0f41ec 100644 --- a/scripts/kalimdor/maraudon/boss_landslide.cpp +++ b/scripts/kalimdor/maraudon/boss_landslide.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/maraudon/boss_noxxion.cpp b/scripts/kalimdor/maraudon/boss_noxxion.cpp index e238683a1..86f178fe8 100644 --- a/scripts/kalimdor/maraudon/boss_noxxion.cpp +++ b/scripts/kalimdor/maraudon/boss_noxxion.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/maraudon/boss_princess_theradras.cpp b/scripts/kalimdor/maraudon/boss_princess_theradras.cpp index b277d1fee..1ec114a96 100644 --- a/scripts/kalimdor/maraudon/boss_princess_theradras.cpp +++ b/scripts/kalimdor/maraudon/boss_princess_theradras.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/moonglade.cpp b/scripts/kalimdor/moonglade.cpp index a8c636343..29e50b8fa 100644 --- a/scripts/kalimdor/moonglade.cpp +++ b/scripts/kalimdor/moonglade.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/mulgore.cpp b/scripts/kalimdor/mulgore.cpp index 8639fab2b..b2854d663 100644 --- a/scripts/kalimdor/mulgore.cpp +++ b/scripts/kalimdor/mulgore.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp index 35b23e9d1..fd38be381 100644 --- a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp +++ b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/orgrimmar.cpp b/scripts/kalimdor/orgrimmar.cpp index 9a889e8db..82515ccfa 100644 --- a/scripts/kalimdor/orgrimmar.cpp +++ b/scripts/kalimdor/orgrimmar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/razorfen_downs/boss_amnennar_the_coldbringer.cpp b/scripts/kalimdor/razorfen_downs/boss_amnennar_the_coldbringer.cpp index 14d694184..f7bd40337 100644 --- a/scripts/kalimdor/razorfen_downs/boss_amnennar_the_coldbringer.cpp +++ b/scripts/kalimdor/razorfen_downs/boss_amnennar_the_coldbringer.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp b/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp index d13f8620f..b854a0bf6 100644 --- a/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp +++ b/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp index ff72c2262..fa746f6ae 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp index 51dde4d6f..2eddb5e49 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp index 8757e13ba..5188dddc6 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp index 26cbf261d..5bb8d0d65 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp index 5948fca01..e176b7cc1 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp index 8b755e333..3abfe4d42 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp index 43176ae0f..768da00d3 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp index fe2a8a7dd..712c94850 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h index 49b326d69..60dfa9c66 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h +++ b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/silithus.cpp b/scripts/kalimdor/silithus.cpp index e122a4ee8..f2dafbf15 100644 --- a/scripts/kalimdor/silithus.cpp +++ b/scripts/kalimdor/silithus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/stonetalon_mountains.cpp b/scripts/kalimdor/stonetalon_mountains.cpp index b9bb35e4d..e3fdaef67 100644 --- a/scripts/kalimdor/stonetalon_mountains.cpp +++ b/scripts/kalimdor/stonetalon_mountains.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/tanaris.cpp b/scripts/kalimdor/tanaris.cpp index a6b9a526b..cd145cef4 100644 --- a/scripts/kalimdor/tanaris.cpp +++ b/scripts/kalimdor/tanaris.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/teldrassil.cpp b/scripts/kalimdor/teldrassil.cpp index c124ed0b8..3a8efbbfa 100644 --- a/scripts/kalimdor/teldrassil.cpp +++ b/scripts/kalimdor/teldrassil.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp index daeb7ebfd..789bd445a 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp index 8d84ade47..eccbac4f2 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp index 1494657b1..c96c5a3e1 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp index eac462596..2ada83797 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp index e74e44f59..72fc32723 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp index 3348b78a4..6603ed85e 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp index 9b4cd7409..86bd67526 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp index 269830e21..1a27a4dd8 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp index 395283fec..d2e27e609 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp b/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp index 4e31dac82..12c43e956 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp b/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp index 8437a8070..b11929dd2 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h b/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h index 29b630166..c9c93e1c9 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h +++ b/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/the_barrens.cpp b/scripts/kalimdor/the_barrens.cpp index e877468b9..7aa60116f 100644 --- a/scripts/kalimdor/the_barrens.cpp +++ b/scripts/kalimdor/the_barrens.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/thousand_needles.cpp b/scripts/kalimdor/thousand_needles.cpp index a10c3a5e6..50dbb2737 100644 --- a/scripts/kalimdor/thousand_needles.cpp +++ b/scripts/kalimdor/thousand_needles.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/thunder_bluff.cpp b/scripts/kalimdor/thunder_bluff.cpp index 738cba213..f15e5b07d 100644 --- a/scripts/kalimdor/thunder_bluff.cpp +++ b/scripts/kalimdor/thunder_bluff.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/ungoro_crater.cpp b/scripts/kalimdor/ungoro_crater.cpp index cfee0c79e..c4df181d8 100644 --- a/scripts/kalimdor/ungoro_crater.cpp +++ b/scripts/kalimdor/ungoro_crater.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp b/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp index fc3aa646e..2cad516a4 100644 --- a/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp +++ b/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/winterspring.cpp b/scripts/kalimdor/winterspring.cpp index 03cdc23a7..56cf8c4b1 100644 --- a/scripts/kalimdor/winterspring.cpp +++ b/scripts/kalimdor/winterspring.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/kalimdor/zulfarrak/zulfarrak.cpp b/scripts/kalimdor/zulfarrak/zulfarrak.cpp index e9fd49a38..3bf76b860 100644 --- a/scripts/kalimdor/zulfarrak/zulfarrak.cpp +++ b/scripts/kalimdor/zulfarrak/zulfarrak.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h b/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h index 66c52b1cb..23f326c9c 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h +++ b/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp index 3ff6d2d1a..9870291fe 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp index dd1ddc161..a1ca2be20 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp index ed31cd06c..2b2c6b58b 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp index a2dd6cdcb..9d934720c 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp index 1988bd028..5dee80b57 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h b/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h index 56d4eec81..bc62506b9 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h +++ b/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp index 3d4b58749..a1198c98c 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp index e15b797c0..22074a7a2 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp index b99a1183d..0433ebff0 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp index c8c3b9a77..ca8839bad 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/borean_tundra.cpp b/scripts/northrend/borean_tundra.cpp index 05dfff8f6..bcbd04adc 100644 --- a/scripts/northrend/borean_tundra.cpp +++ b/scripts/northrend/borean_tundra.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/dalaran.cpp b/scripts/northrend/dalaran.cpp index fd669310a..070df8673 100644 --- a/scripts/northrend/dalaran.cpp +++ b/scripts/northrend/dalaran.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/dragonblight.cpp b/scripts/northrend/dragonblight.cpp index f611e52fe..8e91ba44a 100644 --- a/scripts/northrend/dragonblight.cpp +++ b/scripts/northrend/dragonblight.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/draktharon_keep/boss_novos.cpp b/scripts/northrend/draktharon_keep/boss_novos.cpp index ca3a213ad..9485dfb00 100644 --- a/scripts/northrend/draktharon_keep/boss_novos.cpp +++ b/scripts/northrend/draktharon_keep/boss_novos.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/draktharon_keep/boss_tharonja.cpp b/scripts/northrend/draktharon_keep/boss_tharonja.cpp index ca22ce26c..4ab7b8a45 100644 --- a/scripts/northrend/draktharon_keep/boss_tharonja.cpp +++ b/scripts/northrend/draktharon_keep/boss_tharonja.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/draktharon_keep/boss_trollgore.cpp b/scripts/northrend/draktharon_keep/boss_trollgore.cpp index e65c716fa..ff65e4ec3 100644 --- a/scripts/northrend/draktharon_keep/boss_trollgore.cpp +++ b/scripts/northrend/draktharon_keep/boss_trollgore.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/grizzly_hills.cpp b/scripts/northrend/grizzly_hills.cpp index 38f8b949c..7f409ff16 100644 --- a/scripts/northrend/grizzly_hills.cpp +++ b/scripts/northrend/grizzly_hills.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/gundrak/boss_colossus.cpp b/scripts/northrend/gundrak/boss_colossus.cpp index 796be767b..36acff32c 100644 --- a/scripts/northrend/gundrak/boss_colossus.cpp +++ b/scripts/northrend/gundrak/boss_colossus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/gundrak/boss_galdarah.cpp b/scripts/northrend/gundrak/boss_galdarah.cpp index 8558187ff..2c440d6e5 100644 --- a/scripts/northrend/gundrak/boss_galdarah.cpp +++ b/scripts/northrend/gundrak/boss_galdarah.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/gundrak/boss_moorabi.cpp b/scripts/northrend/gundrak/boss_moorabi.cpp index 888d0226e..cb4cd6262 100644 --- a/scripts/northrend/gundrak/boss_moorabi.cpp +++ b/scripts/northrend/gundrak/boss_moorabi.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/gundrak/boss_sladran.cpp b/scripts/northrend/gundrak/boss_sladran.cpp index 997746dd3..58a730c6b 100644 --- a/scripts/northrend/gundrak/boss_sladran.cpp +++ b/scripts/northrend/gundrak/boss_sladran.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/gundrak/gundrak.h b/scripts/northrend/gundrak/gundrak.h index cddc03e87..54119eefb 100644 --- a/scripts/northrend/gundrak/gundrak.h +++ b/scripts/northrend/gundrak/gundrak.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/gundrak/instance_gundrak.cpp b/scripts/northrend/gundrak/instance_gundrak.cpp index 968918b16..669eca8ba 100644 --- a/scripts/northrend/gundrak/instance_gundrak.cpp +++ b/scripts/northrend/gundrak/instance_gundrak.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/howling_fjord.cpp b/scripts/northrend/howling_fjord.cpp index 06317a1e4..333bf2fb9 100644 --- a/scripts/northrend/howling_fjord.cpp +++ b/scripts/northrend/howling_fjord.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/icecrown.cpp b/scripts/northrend/icecrown.cpp index f31ddd027..bd485b7a2 100644 --- a/scripts/northrend/icecrown.cpp +++ b/scripts/northrend/icecrown.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/boss_anubrekhan.cpp b/scripts/northrend/naxxramas/boss_anubrekhan.cpp index d2c1cbed6..8e6b04ae8 100644 --- a/scripts/northrend/naxxramas/boss_anubrekhan.cpp +++ b/scripts/northrend/naxxramas/boss_anubrekhan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/boss_faerlina.cpp b/scripts/northrend/naxxramas/boss_faerlina.cpp index 9b7be8276..f84739e45 100644 --- a/scripts/northrend/naxxramas/boss_faerlina.cpp +++ b/scripts/northrend/naxxramas/boss_faerlina.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/boss_four_horsemen.cpp b/scripts/northrend/naxxramas/boss_four_horsemen.cpp index 8337fe3d4..08b58527b 100644 --- a/scripts/northrend/naxxramas/boss_four_horsemen.cpp +++ b/scripts/northrend/naxxramas/boss_four_horsemen.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/boss_gluth.cpp b/scripts/northrend/naxxramas/boss_gluth.cpp index 7ed8e6646..20ea6dc9a 100644 --- a/scripts/northrend/naxxramas/boss_gluth.cpp +++ b/scripts/northrend/naxxramas/boss_gluth.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/boss_gothik.cpp b/scripts/northrend/naxxramas/boss_gothik.cpp index 3a7aa7050..d8fd5e9da 100644 --- a/scripts/northrend/naxxramas/boss_gothik.cpp +++ b/scripts/northrend/naxxramas/boss_gothik.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/boss_grobbulus.cpp b/scripts/northrend/naxxramas/boss_grobbulus.cpp index 7b8416745..e0fed78d1 100644 --- a/scripts/northrend/naxxramas/boss_grobbulus.cpp +++ b/scripts/northrend/naxxramas/boss_grobbulus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/boss_heigan.cpp b/scripts/northrend/naxxramas/boss_heigan.cpp index 80f3fe57c..e7a18b884 100644 --- a/scripts/northrend/naxxramas/boss_heigan.cpp +++ b/scripts/northrend/naxxramas/boss_heigan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/boss_kelthuzad.cpp b/scripts/northrend/naxxramas/boss_kelthuzad.cpp index b914db05b..f2e79e8e2 100644 --- a/scripts/northrend/naxxramas/boss_kelthuzad.cpp +++ b/scripts/northrend/naxxramas/boss_kelthuzad.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/boss_loatheb.cpp b/scripts/northrend/naxxramas/boss_loatheb.cpp index 182597f21..b835bc1d8 100644 --- a/scripts/northrend/naxxramas/boss_loatheb.cpp +++ b/scripts/northrend/naxxramas/boss_loatheb.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/boss_maexxna.cpp b/scripts/northrend/naxxramas/boss_maexxna.cpp index 7819cb3a1..42bcae3b0 100644 --- a/scripts/northrend/naxxramas/boss_maexxna.cpp +++ b/scripts/northrend/naxxramas/boss_maexxna.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/boss_noth.cpp b/scripts/northrend/naxxramas/boss_noth.cpp index 3920e8dc6..9da610ca4 100644 --- a/scripts/northrend/naxxramas/boss_noth.cpp +++ b/scripts/northrend/naxxramas/boss_noth.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/boss_patchwerk.cpp b/scripts/northrend/naxxramas/boss_patchwerk.cpp index 1700ba929..25e5bddd3 100644 --- a/scripts/northrend/naxxramas/boss_patchwerk.cpp +++ b/scripts/northrend/naxxramas/boss_patchwerk.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/boss_razuvious.cpp b/scripts/northrend/naxxramas/boss_razuvious.cpp index 00f268111..87016913c 100644 --- a/scripts/northrend/naxxramas/boss_razuvious.cpp +++ b/scripts/northrend/naxxramas/boss_razuvious.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/boss_sapphiron.cpp b/scripts/northrend/naxxramas/boss_sapphiron.cpp index 76bd475d2..76630770f 100644 --- a/scripts/northrend/naxxramas/boss_sapphiron.cpp +++ b/scripts/northrend/naxxramas/boss_sapphiron.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/boss_thaddius.cpp b/scripts/northrend/naxxramas/boss_thaddius.cpp index a507ebb64..5c330a183 100644 --- a/scripts/northrend/naxxramas/boss_thaddius.cpp +++ b/scripts/northrend/naxxramas/boss_thaddius.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/instance_naxxramas.cpp b/scripts/northrend/naxxramas/instance_naxxramas.cpp index 52703f44c..9643cae13 100644 --- a/scripts/northrend/naxxramas/instance_naxxramas.cpp +++ b/scripts/northrend/naxxramas/instance_naxxramas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/naxxramas.h b/scripts/northrend/naxxramas/naxxramas.h index a4f9b8c21..fe3918051 100644 --- a/scripts/northrend/naxxramas/naxxramas.h +++ b/scripts/northrend/naxxramas/naxxramas.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/nexus/nexus/boss_anomalus.cpp b/scripts/northrend/nexus/nexus/boss_anomalus.cpp index e9fd00295..da0d8156f 100644 --- a/scripts/northrend/nexus/nexus/boss_anomalus.cpp +++ b/scripts/northrend/nexus/nexus/boss_anomalus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/nexus/nexus/boss_keristrasza.cpp b/scripts/northrend/nexus/nexus/boss_keristrasza.cpp index e400d9640..82c422355 100644 --- a/scripts/northrend/nexus/nexus/boss_keristrasza.cpp +++ b/scripts/northrend/nexus/nexus/boss_keristrasza.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/nexus/nexus/boss_ormorok.cpp b/scripts/northrend/nexus/nexus/boss_ormorok.cpp index 238e080b6..c317c7a95 100644 --- a/scripts/northrend/nexus/nexus/boss_ormorok.cpp +++ b/scripts/northrend/nexus/nexus/boss_ormorok.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/nexus/nexus/boss_telestra.cpp b/scripts/northrend/nexus/nexus/boss_telestra.cpp index 7b9facf68..0c579616a 100644 --- a/scripts/northrend/nexus/nexus/boss_telestra.cpp +++ b/scripts/northrend/nexus/nexus/boss_telestra.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/nexus/nexus/instance_nexus.cpp b/scripts/northrend/nexus/nexus/instance_nexus.cpp index 29868a71f..64c30401b 100644 --- a/scripts/northrend/nexus/nexus/instance_nexus.cpp +++ b/scripts/northrend/nexus/nexus/instance_nexus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/nexus/nexus/nexus.h b/scripts/northrend/nexus/nexus/nexus.h index cea656b25..9aabb9ece 100644 --- a/scripts/northrend/nexus/nexus/nexus.h +++ b/scripts/northrend/nexus/nexus/nexus.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp index d938b96af..25c8a3d32 100644 --- a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp +++ b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp b/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp index 3f2ff18d3..4a149fb12 100644 --- a/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp +++ b/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h b/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h index 518d5a41a..b43ecb090 100644 --- a/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h +++ b/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/sholazar_basin.cpp b/scripts/northrend/sholazar_basin.cpp index 45dbbb5ba..8d060c8f2 100644 --- a/scripts/northrend/sholazar_basin.cpp +++ b/scripts/northrend/sholazar_basin.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/storm_peaks.cpp b/scripts/northrend/storm_peaks.cpp index 7ff424688..1104b2269 100644 --- a/scripts/northrend/storm_peaks.cpp +++ b/scripts/northrend/storm_peaks.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp index d6b23bae4..962be80f4 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp index 8dac9fbe5..cd4f5dce9 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp index 6a36ba9d3..8d14c9ed9 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp index 1d1cc61b1..01d7e403e 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h b/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h index 8790274e5..7c068b79a 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h +++ b/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp b/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp index abaf25231..bc29df92c 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp index 080464b94..51f6aacc5 100644 --- a/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp index 50b657c59..9a8951d9b 100644 --- a/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp index 5ab7d1807..dfe3b73c5 100644 --- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h index 47b4b8892..aca0a7b18 100644 --- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp index 1e65e8997..2274a29e1 100644 --- a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 924f6f1bb..9e439418f 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -1,3 +1,18 @@ +/* Copyright (C) 2006 - 2010 ScriptDev2 +* 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, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ #include "precompiled.h" #include "def_ulduar.h" @@ -379,4 +394,4 @@ void AddSC_instance_ulduar() pNewScript->Name = "instance_ulduar"; pNewScript->GetInstanceData = &GetInstanceData_instance_ulduar; pNewScript->RegisterSelf(); -} +} \ No newline at end of file diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp index fd1e349a4..0a9ab5036 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp index 7cd91de69..c7920f46b 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp index 2ef91a128..e109dca2f 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp index ee2bfdc4e..0f9f9ee5f 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp index 104ca349d..af1b732f7 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h index e9ab8ab09..fb91b7e4b 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h +++ b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp index d2d8fa72f..178782a3b 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp index 26eca1bbc..9a11f84e4 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp index dfee89151..33c7047a0 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp index b691f0409..30613e2b9 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp index e109c2bce..937d472d1 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h b/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h index b4c1d682d..5ab6aa410 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/zuldrak.cpp b/scripts/northrend/zuldrak.cpp index 9bb4cdf42..6b895b578 100644 --- a/scripts/northrend/zuldrak.cpp +++ b/scripts/northrend/zuldrak.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp b/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp index 4e641920a..d7a8a5e64 100644 --- a/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp +++ b/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp b/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp index 9f52892cd..17eb32935 100644 --- a/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp +++ b/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp b/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp index d7b6c9a99..38775f06f 100644 --- a/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp +++ b/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp index a764c252a..5fbb9bb86 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_tailonking_ikiss.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_tailonking_ikiss.cpp index d142c3730..afbf2ae05 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_tailonking_ikiss.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_tailonking_ikiss.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp b/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp index 1bc26ad25..01b22997c 100644 --- a/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h b/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h index 8c4bc5725..c6034a9d3 100644 --- a/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h +++ b/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp index b728b1916..6a16d5394 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp index e9d6492bd..d6f9da478 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp index 7ca74eece..d79b4a91e 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp index d20822a34..1c4173bfe 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp b/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp index ec3aabb1e..f229f688f 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h b/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h index f37d99a91..30f5a3b40 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h +++ b/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/black_temple/black_temple.cpp b/scripts/outland/black_temple/black_temple.cpp index 05bb0c94e..6fdef4571 100644 --- a/scripts/outland/black_temple/black_temple.cpp +++ b/scripts/outland/black_temple/black_temple.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/black_temple/black_temple.h b/scripts/outland/black_temple/black_temple.h index 5838f7188..439c9eb9f 100644 --- a/scripts/outland/black_temple/black_temple.h +++ b/scripts/outland/black_temple/black_temple.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/black_temple/boss_bloodboil.cpp b/scripts/outland/black_temple/boss_bloodboil.cpp index 07ccc10dc..a0883c076 100644 --- a/scripts/outland/black_temple/boss_bloodboil.cpp +++ b/scripts/outland/black_temple/boss_bloodboil.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/black_temple/boss_illidan.cpp b/scripts/outland/black_temple/boss_illidan.cpp index 48e0147b0..18688bfb0 100644 --- a/scripts/outland/black_temple/boss_illidan.cpp +++ b/scripts/outland/black_temple/boss_illidan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/black_temple/boss_mother_shahraz.cpp b/scripts/outland/black_temple/boss_mother_shahraz.cpp index 8b148da8c..bcec4ce5c 100644 --- a/scripts/outland/black_temple/boss_mother_shahraz.cpp +++ b/scripts/outland/black_temple/boss_mother_shahraz.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/black_temple/boss_reliquary_of_souls.cpp b/scripts/outland/black_temple/boss_reliquary_of_souls.cpp index 2a41aefc1..3dcea0ba9 100644 --- a/scripts/outland/black_temple/boss_reliquary_of_souls.cpp +++ b/scripts/outland/black_temple/boss_reliquary_of_souls.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/black_temple/boss_shade_of_akama.cpp b/scripts/outland/black_temple/boss_shade_of_akama.cpp index ff1d3ef9d..dcd25e7c4 100644 --- a/scripts/outland/black_temple/boss_shade_of_akama.cpp +++ b/scripts/outland/black_temple/boss_shade_of_akama.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/black_temple/boss_supremus.cpp b/scripts/outland/black_temple/boss_supremus.cpp index c2dbb4ea3..2e68aaf52 100644 --- a/scripts/outland/black_temple/boss_supremus.cpp +++ b/scripts/outland/black_temple/boss_supremus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/black_temple/boss_teron_gorefiend.cpp b/scripts/outland/black_temple/boss_teron_gorefiend.cpp index c75e3f20a..241a868f6 100644 --- a/scripts/outland/black_temple/boss_teron_gorefiend.cpp +++ b/scripts/outland/black_temple/boss_teron_gorefiend.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/black_temple/boss_warlord_najentus.cpp b/scripts/outland/black_temple/boss_warlord_najentus.cpp index 5830627f6..021e688e8 100644 --- a/scripts/outland/black_temple/boss_warlord_najentus.cpp +++ b/scripts/outland/black_temple/boss_warlord_najentus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/black_temple/illidari_council.cpp b/scripts/outland/black_temple/illidari_council.cpp index fa62ed2d1..29410bb84 100644 --- a/scripts/outland/black_temple/illidari_council.cpp +++ b/scripts/outland/black_temple/illidari_council.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/black_temple/instance_black_temple.cpp b/scripts/outland/black_temple/instance_black_temple.cpp index ebcd88d3b..7d101ef14 100644 --- a/scripts/outland/black_temple/instance_black_temple.cpp +++ b/scripts/outland/black_temple/instance_black_temple.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/blades_edge_mountains.cpp b/scripts/outland/blades_edge_mountains.cpp index d005e7783..525dfd83c 100644 --- a/scripts/outland/blades_edge_mountains.cpp +++ b/scripts/outland/blades_edge_mountains.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/boss_doomlord_kazzak.cpp b/scripts/outland/boss_doomlord_kazzak.cpp index 74fa9837c..2f74aef24 100644 --- a/scripts/outland/boss_doomlord_kazzak.cpp +++ b/scripts/outland/boss_doomlord_kazzak.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/boss_doomwalker.cpp b/scripts/outland/boss_doomwalker.cpp index cdc5942cf..2253fc128 100644 --- a/scripts/outland/boss_doomwalker.cpp +++ b/scripts/outland/boss_doomwalker.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp index 38c6bd5d6..d73c257ef 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp index 73d7e850a..613e5c7ce 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp index fd03a0a25..23eac9df7 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp index cd7f326b4..2615ec131 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp index ead685df9..42a5f8233 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp index 9380404db..737e219ce 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h b/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h index d750d9814..6d2b9f48e 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/coilfang_reservoir/slave_pens/boss_rokmar.cpp b/scripts/outland/coilfang_reservoir/slave_pens/boss_rokmar.cpp index bf32ff5e8..d4c4043e3 100644 --- a/scripts/outland/coilfang_reservoir/slave_pens/boss_rokmar.cpp +++ b/scripts/outland/coilfang_reservoir/slave_pens/boss_rokmar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp index 6e2dcd412..2262545fa 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp index 1bf6da88a..2ac5b9269 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp index 90b1e1d6a..b1f19320b 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp b/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp index a8096c4af..db2492543 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h b/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h index 48127523f..fea0b997e 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h +++ b/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp b/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp index 8b684221d..3df129e38 100644 --- a/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp +++ b/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/gruuls_lair/boss_gruul.cpp b/scripts/outland/gruuls_lair/boss_gruul.cpp index 5f0a51a31..cf2fc847c 100644 --- a/scripts/outland/gruuls_lair/boss_gruul.cpp +++ b/scripts/outland/gruuls_lair/boss_gruul.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp b/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp index 98aaec89b..3b7c1930c 100644 --- a/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp +++ b/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/gruuls_lair/gruuls_lair.h b/scripts/outland/gruuls_lair/gruuls_lair.h index 927b1b774..34cdf2675 100644 --- a/scripts/outland/gruuls_lair/gruuls_lair.h +++ b/scripts/outland/gruuls_lair/gruuls_lair.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp b/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp index ac4e5df49..449a186de 100644 --- a/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp +++ b/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h b/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h index 07c4c72b2..2041214b5 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h +++ b/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp b/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp index 9a0a31276..367db7b92 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp b/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp index f1c358e19..52c4d2ea3 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp b/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp index 5184e27f0..ccc8162e3 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp b/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp index a66e9d94a..70f36a38d 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp index 1b7fd2274..795aebdbe 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp index 73de6a475..4d6fc9965 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp index 63eab7e1f..b6b941df7 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h b/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h index 2b687e465..5c5638f95 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp index 1546d1959..76707fb13 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp b/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp index c2a3dbdea..9bf4c4a3b 100644 --- a/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp b/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp index f0c56dd33..c52acfacf 100644 --- a/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h b/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h index c5183d348..51bd7289d 100644 --- a/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp index 271f5088e..ab946db13 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp index c25041046..7fa3fc9cf 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp index f9cc04772..610f04fb7 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp b/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp index 4c05fff83..b06226340 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h b/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h index 7a9bb2345..b8ed4c41b 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h +++ b/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/hellfire_peninsula.cpp b/scripts/outland/hellfire_peninsula.cpp index 52f76782e..32087a5e4 100644 --- a/scripts/outland/hellfire_peninsula.cpp +++ b/scripts/outland/hellfire_peninsula.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/nagrand.cpp b/scripts/outland/nagrand.cpp index 74b0963fb..cdeab2dc6 100644 --- a/scripts/outland/nagrand.cpp +++ b/scripts/outland/nagrand.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/netherstorm.cpp b/scripts/outland/netherstorm.cpp index e5cee2ed0..0e8b56019 100644 --- a/scripts/outland/netherstorm.cpp +++ b/scripts/outland/netherstorm.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/shadowmoon_valley.cpp b/scripts/outland/shadowmoon_valley.cpp index e555ac98c..acf4e9707 100644 --- a/scripts/outland/shadowmoon_valley.cpp +++ b/scripts/outland/shadowmoon_valley.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/shattrath_city.cpp b/scripts/outland/shattrath_city.cpp index 78e3dacbb..39d3d5b6f 100644 --- a/scripts/outland/shattrath_city.cpp +++ b/scripts/outland/shattrath_city.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp b/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp index e0a471be3..0acb2e86c 100644 --- a/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp +++ b/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/arcatraz/arcatraz.h b/scripts/outland/tempest_keep/arcatraz/arcatraz.h index b2e82af76..c5b73afc4 100644 --- a/scripts/outland/tempest_keep/arcatraz/arcatraz.h +++ b/scripts/outland/tempest_keep/arcatraz/arcatraz.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp b/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp index dcfe76a37..8adf5919c 100644 --- a/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp +++ b/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp b/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp index 5c9bec5b1..d13b44927 100644 --- a/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp +++ b/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp b/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp index 2b8bdc8f6..95b26c0b3 100644 --- a/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp +++ b/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/botanica/boss_laj.cpp b/scripts/outland/tempest_keep/botanica/boss_laj.cpp index 8bfd79de9..0cdc0ae4c 100644 --- a/scripts/outland/tempest_keep/botanica/boss_laj.cpp +++ b/scripts/outland/tempest_keep/botanica/boss_laj.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp b/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp index e73b80e5e..454c5b642 100644 --- a/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp +++ b/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp b/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp index a4aee7fe1..24f16e282 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp index 070f9f388..fb4ed6b91 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp b/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp index db85981be..2af35a4c1 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp b/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp index dd27ee0bd..774bb6bc5 100644 --- a/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp +++ b/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/the_eye/the_eye.cpp b/scripts/outland/tempest_keep/the_eye/the_eye.cpp index 5a29435d1..8cf666b1f 100644 --- a/scripts/outland/tempest_keep/the_eye/the_eye.cpp +++ b/scripts/outland/tempest_keep/the_eye/the_eye.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/the_eye/the_eye.h b/scripts/outland/tempest_keep/the_eye/the_eye.h index 7066e8458..879784122 100644 --- a/scripts/outland/tempest_keep/the_eye/the_eye.h +++ b/scripts/outland/tempest_keep/the_eye/the_eye.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_gyrokill.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_gyrokill.cpp index 09ecf0e52..a898d2797 100644 --- a/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_gyrokill.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_gyrokill.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp index fb5bea813..ac33fe2ab 100644 --- a/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp index 7bfa8f9ba..b610aff31 100644 --- a/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp index 7a9b25cd4..6d489d530 100644 --- a/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp b/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp index 981b08127..68228ee2c 100644 --- a/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/tempest_keep/the_mechanar/mechanar.h b/scripts/outland/tempest_keep/the_mechanar/mechanar.h index 1efa54a9c..434b5bdfe 100644 --- a/scripts/outland/tempest_keep/the_mechanar/mechanar.h +++ b/scripts/outland/tempest_keep/the_mechanar/mechanar.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/terokkar_forest.cpp b/scripts/outland/terokkar_forest.cpp index ddb847b3c..4074d2922 100644 --- a/scripts/outland/terokkar_forest.cpp +++ b/scripts/outland/terokkar_forest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/outland/zangarmarsh.cpp b/scripts/outland/zangarmarsh.cpp index 262adbfdc..f3698dfcd 100644 --- a/scripts/outland/zangarmarsh.cpp +++ b/scripts/outland/zangarmarsh.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/world/areatrigger_scripts.cpp b/scripts/world/areatrigger_scripts.cpp index 87b9bcf8e..f1093e027 100644 --- a/scripts/world/areatrigger_scripts.cpp +++ b/scripts/world/areatrigger_scripts.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/world/boss_emeriss.cpp b/scripts/world/boss_emeriss.cpp index 458961ef2..666619211 100644 --- a/scripts/world/boss_emeriss.cpp +++ b/scripts/world/boss_emeriss.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/world/boss_lethon.cpp b/scripts/world/boss_lethon.cpp index 40fe7e59b..a524dc877 100644 --- a/scripts/world/boss_lethon.cpp +++ b/scripts/world/boss_lethon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/world/boss_taerar.cpp b/scripts/world/boss_taerar.cpp index 8d6cf7d19..9d0f9b613 100644 --- a/scripts/world/boss_taerar.cpp +++ b/scripts/world/boss_taerar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/world/boss_ysondre.cpp b/scripts/world/boss_ysondre.cpp index 20cbdb948..52ad1bf82 100644 --- a/scripts/world/boss_ysondre.cpp +++ b/scripts/world/boss_ysondre.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/world/go_scripts.cpp b/scripts/world/go_scripts.cpp index 846b18a1e..14161ee4c 100644 --- a/scripts/world/go_scripts.cpp +++ b/scripts/world/go_scripts.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/world/guards.cpp b/scripts/world/guards.cpp index 8813ffcfd..7d9799f51 100644 --- a/scripts/world/guards.cpp +++ b/scripts/world/guards.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/world/item_scripts.cpp b/scripts/world/item_scripts.cpp index 33350ce00..9d8327243 100644 --- a/scripts/world/item_scripts.cpp +++ b/scripts/world/item_scripts.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/world/mob_generic_creature.cpp b/scripts/world/mob_generic_creature.cpp index df11b2f24..c4ecf4475 100644 --- a/scripts/world/mob_generic_creature.cpp +++ b/scripts/world/mob_generic_creature.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/world/npc_professions.cpp b/scripts/world/npc_professions.cpp index 640438af8..a1ab6b463 100644 --- a/scripts/world/npc_professions.cpp +++ b/scripts/world/npc_professions.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index 92422371d..fb6318e98 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index caa54e731..16d4d7a50 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/system/ScriptLoader.h b/system/ScriptLoader.h index 57fb7d821..3414f7f83 100644 --- a/system/ScriptLoader.h +++ b/system/ScriptLoader.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/system/system.cpp b/system/system.cpp index 425ea8643..97bea593e 100644 --- a/system/system.cpp +++ b/system/system.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/system/system.h b/system/system.h index ea31a0c9e..c7aab8c7b 100644 --- a/system/system.h +++ b/system/system.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ From 940514f234c3ea0bdec5429c9235c7a50e44ea40 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sat, 2 Jan 2010 18:28:13 +0300 Subject: [PATCH 091/405] 3 instance rewrite --- Makefile.am | 2 + addition/716_the_violet_hold_mangos.sql | 18 +- .../716_the_violet_hold_scriptdev2_text.sql | 102 +- addition/718_draktharon_mangos.sql | 65 + addition/718_draktharon_scriptdev2.sql | 4 + addition/719_ankahet_mangos.sql | 18 + .../northrend/azjol-nerub/ahnkahet/ahnkahet.h | 3 +- .../azjol-nerub/ahnkahet/boss_jedoga.cpp | 484 ++++++- .../azjol-nerub/ahnkahet/boss_taldaram.cpp | 229 +++- .../azjol-nerub/ahnkahet/boss_volazj.cpp | 364 ++++- .../ahnkahet/instance_ahnkahet.cpp | 3 + .../northrend/draktharon_keep/boss_dred.cpp | 198 +++ .../northrend/draktharon_keep/boss_novos.cpp | 265 +++- .../draktharon_keep/boss_tharonja.cpp | 167 ++- .../draktharon_keep/boss_trollgore.cpp | 107 +- .../draktharon_keep/draktharon_keep.h | 35 + .../northrend/violet_hold/boss_cyanigosa.cpp | 341 ++--- scripts/northrend/violet_hold/boss_erekem.cpp | 650 ++++----- .../northrend/violet_hold/boss_ichoron.cpp | 670 +++++----- .../northrend/violet_hold/boss_lavanthor.cpp | 298 ++--- scripts/northrend/violet_hold/boss_moragg.cpp | 278 ++-- scripts/northrend/violet_hold/boss_xevozz.cpp | 552 ++++---- .../northrend/violet_hold/boss_zuramat.cpp | 454 +++---- .../northrend/violet_hold/def_violet_hold.h | 164 +-- .../violet_hold/instance_violet_hold.cpp | 682 +++++----- scripts/northrend/violet_hold/violet_hold.cpp | 1187 ++++++++++++----- system/ScriptLoader.cpp | 4 +- 27 files changed, 4918 insertions(+), 2426 deletions(-) create mode 100644 addition/718_draktharon_mangos.sql create mode 100644 addition/718_draktharon_scriptdev2.sql create mode 100644 addition/719_ankahet_mangos.sql create mode 100644 scripts/northrend/draktharon_keep/boss_dred.cpp create mode 100644 scripts/northrend/draktharon_keep/draktharon_keep.h diff --git a/Makefile.am b/Makefile.am index 49148ba1f..8f028b876 100644 --- a/Makefile.am +++ b/Makefile.am @@ -317,6 +317,8 @@ scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp \ scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp \ scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp \ scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp \ +scripts/northrend/draktharon_keep/draktharon_keep.h \ +scripts/northrend/draktharon_keep/boss_dred.cpp \ scripts/northrend/draktharon_keep/boss_novos.cpp \ scripts/northrend/draktharon_keep/boss_tharonja.cpp \ scripts/northrend/draktharon_keep/boss_trollgore.cpp \ diff --git a/addition/716_the_violet_hold_mangos.sql b/addition/716_the_violet_hold_mangos.sql index f250f7066..b456edfb7 100644 --- a/addition/716_the_violet_hold_mangos.sql +++ b/addition/716_the_violet_hold_mangos.sql @@ -1,6 +1,6 @@ /* VIOLET HOLD */ UPDATE `instance_template` SET `script`='instance_violet_hold' WHERE `map`=608; -UPDATE `creature_template` SET `ScriptName`='npc_sinclari', `npcflag`='1',`minhealth`='403200', `maxhealth`='403200', `attackpower`='1460' WHERE `entry`='30658'; -- 64 +UPDATE `creature_template` SET `ScriptName`='npc_sinclari', npcflag='1',`minhealth`=ROUND(`minhealth`*4), `maxhealth`=ROUND(`maxhealth`*4) WHERE `entry`='30658'; -- 64 UPDATE `creature_template` SET `ScriptName`='npc_azure_saboteur' WHERE `entry`='31079'; UPDATE `creature_template` SET `ScriptName`='boss_cyanigosa' WHERE `entry`='31134'; UPDATE `creature_template` SET `ScriptName`='boss_erekem' WHERE `entry`='29315'; @@ -16,14 +16,12 @@ UPDATE `creature_template` SET `ScriptName`='boss_zuramat' WHERE `entry`='29314' UPDATE `creature_template` SET `ScriptName`='mob_zuramat_sentry' WHERE `entry`='29364'; UPDATE `creature_template` SET `ScriptName`='npc_violet_portal' WHERE `entry`='31011'; -# UPDATE `creature_template` SET `npcflag`='1' WHERE `entry`='30659'; - -DELETE FROM `creature` WHERE map = 608 AND `id`='31011'; +DELETE FROM `creature` WHERE map = 608 AND `id`='31011'; DELETE FROM `creature` WHERE map = 608 AND `id`='31134'; -- cyanigosa should not spawn UPDATE `gameobject_template` SET `flags`=`flags`|4 WHERE `entry` IN (191723,191564,191563,191562,191606,191722,191556,191566,191565); -- door untargetable UPDATE `creature_template` SET AIName='EventAI',`ScriptName`='' WHERE `entry` IN ('30660','30695','30666','30668','30667','32191'); -DELETE FROM `creature_ai_scripts` WHERE creature_id IN ('30660','30695','30666','30668','30667','32191'); +DELETE FROM creature_ai_scripts WHERE creature_id IN ('30660','30695','30666','30668','30667','32191'); INSERT INTO `creature_ai_scripts` VALUES ('3066001', '30660', '0', '0', '100', '1', '5000', '10000', '30000', '32000', '11', '58504', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Agonizing Strike'), ('3066002', '30660', '0', '0', '100', '1', '12000', '15000', '24000', '30000', '11', '58508', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Side Swipe'), @@ -43,6 +41,10 @@ INSERT INTO `creature_ai_scripts` VALUES ('3066704', '30667', '0', '0', '100', '5', '12000', '15000', '24000', '30000', '11', '60205', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Mana Detonation'), ('3219101', '32191', '0', '0', '100', '1', '11000', '11000', '15000', '15000', '11', '58471', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Backstab'), ('3219102', '32191', '0', '0', '100', '1', '10000', '10000', '15000', '15000', '11', '58470', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Tactical Blink'); -DELETE FROM `spell_script_target` WHERE `entry` in (54160,59474); -insert into `spell_script_target` values (54160, 1, 29266); -insert into `spell_script_target` values (59474, 1, 29266); \ No newline at end of file +DELETE FROM `spell_script_target` WHERE `entry` IN (54160,59474); +INSERT INTO spell_script_target VALUES (54160, 1, 29266); +INSERT INTO spell_script_target VALUES (59474, 1, 29266); + +UPDATE creature_template SET ScriptName="npc_door_seal_vh", unit_flags=33816580 WHERE entry=30896; +UPDATE creature_template SET faction_A=35, faction_H=35 WHERE entry=30658; +UPDATE creature_template SET faction_A=1720, faction_H=1720, ScriptName="mob_vh_dragons", minlevel=70,maxlevel=70,minhealth=7000,maxhealth=8000 WHERE entry IN (30660, 30661, 30662, 30663, 30664, 30666, 30667, 30668, 32191, 30695); diff --git a/addition/716_the_violet_hold_scriptdev2_text.sql b/addition/716_the_violet_hold_scriptdev2_text.sql index 98d2fae23..f82deaea0 100644 --- a/addition/716_the_violet_hold_scriptdev2_text.sql +++ b/addition/716_the_violet_hold_scriptdev2_text.sql @@ -1,52 +1,52 @@ -- -1 608 000 VIOLET HOLD -INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES --- Cyanigosa - (-1608000, 'We finish this now, champions of Kirin Tor!', 13947, 1, 0, 'cyanigosa SAY_AGGRO'), - (-1608001, 'I will end the Kirin Tor!', 13952, 1, 0, 'cyanigosa SAY_SLAY_1'), - (-1608002, 'Dalaran will fall!', 13953, 1, 0, 'cyanigosa SAY_SLAY_2'), - (-1608003, 'So ends your defiance of the Spell-Weaver!', 13954, 1, 0, 'cyanigosa SAY_SLAY_3'), - (-1608004, 'Perhaps... we have... underestimated... you.', 13955, 1, 0, 'cyanigosa SAY_DEATH'), - (-1608005, 'A valiant defense, but this city must be razed. I will fulfill Malygos\'s wishes myself!', 13946, 1, 0, 'cyanigosa SAY_SPAWN'), - (-1608006, 'Am I interrupting?', 13951, 1, 0, 'cyanigosa SAY_DISRUPTION'), - (-1608007, 'Shiver and die!', 13948, 1, 0, 'cyanigosa SAY_BREATH_ATTACK'), - (-1608008, 'The world has forgotten what true magic is! Let this be a reminder!', 13949, 1, 0, 'cyanigosa SAY_SPECIAL_ATTACK_1'), - (-1608009, 'Who among you can withstand my power?', 13950, 1, 0, 'cyanigosa SAY_SPECIAL_ATTACK_2'), --- Erekem - (-1608010, 'Notcawwget in way ofrrak-rrakflee!', 14219, 1, 0, 'erekem SAY_AGGRO'), - (-1608011, '...', 14222, 1, 0, 'erekem SAY_SLAY_1'), - (-1608012, 'Precious life ... wasted.', 14223, 1, 0, 'erekem SAY_SLAY_2'), - (-1608013, 'Only strong ... survive.', 14224, 1, 0, 'erekem SAY_SLAY_3'), - (-1608014, 'Nokaw, kawflee...', 14225, 1, 0, 'erekem SAY_DEATH'), - (-1608015, 'Free tommfly onw. Ra-aak... Not find usekh-ekh! Escape!', 14218, 1, 0, 'erekem SAY_SPAWN'), - (-1608016, 'My-raaakfavorite! Awk awk awk! Raa-kaa!', 14220, 1, 0, 'erekem SAY_ADD_KILLED'), - (-1608017, 'Nasty little...A-ak, kaw! Kill! Yes, kill you!', 14221, 1, 0, 'erekem SAY_BOTH_ADDS_KILLED'), --- Ichoron - (-1608018, 'Stand aside, mortals!', 14230, 1, 0, 'ichoron SAY_AGGRO'), - (-1608019, 'I am a force of nature!', 14234, 1, 0, 'ichoron SAY_SLAY_1'), - (-1608020, 'I shall pass!', 14235, 1, 0, 'ichoron SAY_SLAY_2'), - (-1608021, 'You can not stop the tide!', 14236, 1, 0, 'ichoron SAY_SLAY_3'), - (-1608022, 'I... recede.', 14237, 1, 0, 'ichoron SAY_DEATH'), - (-1608023, 'I... am fury... unrestrained!', 14239, 1, 0, 'ichoron SAY_SPAWN'), - (-1608024, 'I shall consume, decimate, devastate, and destroy! Yield now to the wrath of the pounding sea!', 14231, 1, 0, 'ichoron SAY_ENRAGE'), - (-1608025, 'I will not be contained! Ngyah!!', 14233, 1, 0, 'ichoron SAY_SHATTER'), - (-1608026, 'Water can hold any form, take any shape... overcome any obstacle.', 14232, 1, 0, 'ichoron SAY_BUBBLE'), --- Xevozz - (-1608027, 'It seems my freedom must be bought with blood...', 14499, 1, 0, 'xevozz SAY_AGGRO'), - (-1608028, 'Nothing personal.', 14504, 1, 0, 'xevozz SAY_SLAY_1'), - (-1608029, 'Business concluded.', 14505, 1, 0, 'xevozz SAY_SLAY_2'), - (-1608030, 'Profit!', 14506, 1, 0, 'xevozz SAY_SLAY_3'), - (-1608031, 'This is an... unrecoverable... loss.', 14507, 1, 0, 'xevozz SAY_DEATH'), - (-1608032, 'Back in business! Now to execute an exit strategy.', 14498, 1, 0, 'xevozz SAY_SPAWNED'), - (-1608033, 'It would seem that a renegotiation is in order.', 14503, 1, 0, 'xevozz SAY_CHARGED'), - (-1608034, 'The air teems with latent energy... quite the harvest!', 14501, 1, 0, 'xevozz SAY_REPEAT_SUMMON_1'), - (-1608035, 'Plentiful, exploitable resources... primed for acquisition!', 14502, 1, 0, 'xevozz SAY_REPEAT_SUMMON_2'), - (-1608036, 'Intriguing... a high quantity of arcane energy is near. Time for some prospecting...', 14500, 1, 0, 'xevozz SAY_SUMMON_ENERGY'), --- Zuramat - (-1608037, 'Eradicate.', 13996, 1, 0, 'zuramat SAY_AGGRO'), - (-1608038, 'More... energy.', 13999, 1, 0, 'zuramat SAY_SLAY_1'), - (-1608039, 'Relinquish.', 14000, 1, 0, 'zuramat SAY_SLAY_2'), - (-1608040, 'Fall... to shadow.', 14001, 1, 0, 'zuramat SAY_SLAY_3'), - (-1608041, 'Disperse.', 14002, 1, 0, 'zuramat SAY_DEATH'), - (-1608042, 'I am... renewed.', 13995, 1, 0, 'zuramat SAY_SPAWN'), - (-1608043, 'Know... my... pain.', 13997, 1, 0, 'zuramat SAY_SHIELD'), - (-1608044, 'Gaze... into the void.', 13998, 1, 0, 'zuramat SAY_WHISPER'); +INSERT IGNORE INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) VALUES +-- Cyanigosa + (-1608000, 'We finish this now, champions of Kirin Tor!', 13947, 1, 0, 'cyanigosa SAY_AGGRO'), + (-1608001, 'I will end the Kirin Tor!', 13952, 1, 0, 'cyanigosa SAY_SLAY_1'), + (-1608002, 'Dalaran will fall!', 13953, 1, 0, 'cyanigosa SAY_SLAY_2'), + (-1608003, 'So ends your defiance of the Spell-Weaver!', 13954, 1, 0, 'cyanigosa SAY_SLAY_3'), + (-1608004, 'Perhaps... we have... underestimated... you.', 13955, 1, 0, 'cyanigosa SAY_DEATH'), + (-1608005, 'A valiant defense, but this city must be razed. I will fulfill Malygos\'s wishes myself!', 13946, 1, 0, 'cyanigosa SAY_SPAWN'), + (-1608006, 'Am I interrupting?', 13951, 1, 0, 'cyanigosa SAY_DISRUPTION'), + (-1608007, 'Shiver and die!', 13948, 1, 0, 'cyanigosa SAY_BREATH_ATTACK'), + (-1608008, 'The world has forgotten what true magic is! Let this be a reminder!', 13949, 1, 0, 'cyanigosa SAY_SPECIAL_ATTACK_1'), + (-1608009, 'Who among you can withstand my power?', 13950, 1, 0, 'cyanigosa SAY_SPECIAL_ATTACK_2'), +-- Erekem + (-1608010, 'Notcawwget in way ofrrak-rrakflee!', 14219, 1, 0, 'erekem SAY_AGGRO'), + (-1608011, '...', 14222, 1, 0, 'erekem SAY_SLAY_1'), + (-1608012, 'Precious life ... wasted.', 14223, 1, 0, 'erekem SAY_SLAY_2'), + (-1608013, 'Only strong ... survive.', 14224, 1, 0, 'erekem SAY_SLAY_3'), + (-1608014, 'Nokaw, kawflee...', 14225, 1, 0, 'erekem SAY_DEATH'), + (-1608015, 'Free tommfly onw. Ra-aak... Not find usekh-ekh! Escape!', 14218, 1, 0, 'erekem SAY_SPAWN'), + (-1608016, 'My-raaakfavorite! Awk awk awk! Raa-kaa!', 14220, 1, 0, 'erekem SAY_ADD_KILLED'), + (-1608017, 'Nasty little...A-ak, kaw! Kill! Yes, kill you!', 14221, 1, 0, 'erekem SAY_BOTH_ADDS_KILLED'), +-- Ichoron + (-1608018, 'Stand aside, mortals!', 14230, 1, 0, 'ichoron SAY_AGGRO'), + (-1608019, 'I am a force of nature!', 14234, 1, 0, 'ichoron SAY_SLAY_1'), + (-1608020, 'I shall pass!', 14235, 1, 0, 'ichoron SAY_SLAY_2'), + (-1608021, 'You can not stop the tide!', 14236, 1, 0, 'ichoron SAY_SLAY_3'), + (-1608022, 'I... recede.', 14237, 1, 0, 'ichoron SAY_DEATH'), + (-1608023, 'I... am fury... unrestrained!', 14239, 1, 0, 'ichoron SAY_SPAWN'), + (-1608024, 'I shall consume, decimate, devastate, and destroy! Yield now to the wrath of the pounding sea!', 14231, 1, 0, 'ichoron SAY_ENRAGE'), + (-1608025, 'I will not be contained! Ngyah!!', 14233, 1, 0, 'ichoron SAY_SHATTER'), + (-1608026, 'Water can hold any form, take any shape... overcome any obstacle.', 14232, 1, 0, 'ichoron SAY_BUBBLE'), +-- Xevozz + (-1608027, 'It seems my freedom must be bought with blood...', 14499, 1, 0, 'xevozz SAY_AGGRO'), + (-1608028, 'Nothing personal.', 14504, 1, 0, 'xevozz SAY_SLAY_1'), + (-1608029, 'Business concluded.', 14505, 1, 0, 'xevozz SAY_SLAY_2'), + (-1608030, 'Profit!', 14506, 1, 0, 'xevozz SAY_SLAY_3'), + (-1608031, 'This is an... unrecoverable... loss.', 14507, 1, 0, 'xevozz SAY_DEATH'), + (-1608032, 'Back in business! Now to execute an exit strategy.', 14498, 1, 0, 'xevozz SAY_SPAWNED'), + (-1608033, 'It would seem that a renegotiation is in order.', 14503, 1, 0, 'xevozz SAY_CHARGED'), + (-1608034, 'The air teems with latent energy... quite the harvest!', 14501, 1, 0, 'xevozz SAY_REPEAT_SUMMON_1'), + (-1608035, 'Plentiful, exploitable resources... primed for acquisition!', 14502, 1, 0, 'xevozz SAY_REPEAT_SUMMON_2'), + (-1608036, 'Intriguing... a high quantity of arcane energy is near. Time for some prospecting...', 14500, 1, 0, 'xevozz SAY_SUMMON_ENERGY'), +-- Zuramat + (-1608037, 'Eradicate.', 13996, 1, 0, 'zuramat SAY_AGGRO'), + (-1608038, 'More... energy.', 13999, 1, 0, 'zuramat SAY_SLAY_1'), + (-1608039, 'Relinquish.', 14000, 1, 0, 'zuramat SAY_SLAY_2'), + (-1608040, 'Fall... to shadow.', 14001, 1, 0, 'zuramat SAY_SLAY_3'), + (-1608041, 'Disperse.', 14002, 1, 0, 'zuramat SAY_DEATH'), + (-1608042, 'I am... renewed.', 13995, 1, 0, 'zuramat SAY_SPAWN'), + (-1608043, 'Know... my... pain.', 13997, 1, 0, 'zuramat SAY_SHIELD'), + (-1608044, 'Gaze... into the void.', 13998, 1, 0, 'zuramat SAY_WHISPER'); diff --git a/addition/718_draktharon_mangos.sql b/addition/718_draktharon_mangos.sql new file mode 100644 index 000000000..e4ebe3b48 --- /dev/null +++ b/addition/718_draktharon_mangos.sql @@ -0,0 +1,65 @@ +DELETE FROM `creature` WHERE `id`=26712; +INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`DeathState`,`MovementType`) VALUES +(927500, 26712, 600, 3, 1, 17188, 0, -365.477, -724.849, 32.2241, 3.92699, 3600, 5, 0, 4050, 0, 0, 1), +(927501, 26712, 600, 3, 1, 17188, 0, -365.368, -751.128, 32.3213, 2.35619, 3600, 5, 0, 4050, 0, 0, 1), +(927502, 26712, 600, 3, 1, 17188, 0, -392.123, -750.941, 32.2796, 0.680678, 3600, 5, 0, 4050, 0, 0, 1), +(927503, 26712, 600, 3, 1, 17188, 0, -392.455, -724.809, 32.1685, 5.35816, 3600, 5, 0, 4050, 0, 0, 1); + +DELETE FROM `creature_template` WHERE (`entry`=26710); +INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (26710, 0, 0, 0, 0, 0, 2536, 1160, 9829, 14952, 'Channel Target', '', '', 0, 1, 1, 8, 8, 0, 0, 7, 190, 190, 0, 1, 1, 0, 2, 2, 0, 24, 7.5, 2000, 0, 1, 33587200, 0, 0, 0, 0, 0, 0, 1, 1, 100, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 4, 0.2, 1, 0, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, ''); + +DELETE FROM `creature_template` WHERE (`entry`=26712); +INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (26712, 0, 0, 0, 0, 0, 169, 0, 17188, 0, 'Crystal Channel Target', '', '', 0, 70, 70, 4050, 4050, 0, 0, 6719, 16, 16, 0, 1, 1, 0, 252, 357, 0, 304, 1, 2000, 0, 1, 33554436, 0, 0, 0, 0, 0, 0, 215, 320, 44, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 'crystal_channel'); + +DELETE FROM `creature_template` WHERE (`entry`=26714); +INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (26714, 0, 0, 0, 0, 0, 2536, 1160, 9829, 14952, 'Dead Crystal Holder', '', '', 0, 1, 1, 8, 8, 0, 0, 7, 190, 190, 0, 1, 1, 0, 2, 2, 0, 24, 7.5, 2000, 0, 1, 32768, 0, 0, 0, 0, 0, 0, 1, 1, 100, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 4, 0.2, 1, 0, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, ''); + +/*King Dred*/ + +DELETE FROM creature WHERE id in (27709, 27753, 27490); + +DELETE FROM `creature` WHERE `id`=26632; +INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`DeathState`,`MovementType`) VALUES +(152490, 26632, 600, 3, 1, 0, 0, -237.176, -675.768, 131.866, 4.66859, 25, 0, 0, 512278, 4169, 0, 0); + +DELETE FROM `creature_template` WHERE (`entry`=26632); +INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (26632, 31360, 0, 0, 0, 0, 27072, 0, 27072, 0, 'The Prophet Tharon\'ja', '', '', 76, 77, 275025, 275025, 0, 0, 0, 16, 16, 0, 1, 1, 1, 350, 450, 0, 400, 7.5, 2000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 350, 450, 75, 6, 72, 26632, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 25, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 'boss_tharonja'); + +DELETE FROM `creature_template` WHERE (`entry`=31360); +INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (31360, 0, 0, 0, 0, 0, 27072, 0, 27072, 0, 'The Prophet Tharon\'ja (1)', '', '', 82, 82, 512278, 512278, 4169, 4169, 0, 16, 16, 0, 1, 1, 1, 450, 650, 0, 750, 13, 2000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 350, 530, 100, 6, 72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 38, 1, 0, 43670, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, ''); + +insert into spell_script_target values (49555, 2, 27753); + +update creature_template set minhealth = 1885, maxhealth = 1885 where entry = 27753; + +DELETE FROM `creature_template` WHERE (`entry`=26627); +INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (26627, 31344, 0, 0, 0, 0, 24500, 0, 24500, 0, 'Crystal Handler', '', '', 0, 75, 75, 21270, 21270, 0, 0, 0, 15, 15, 0, 1, 1, 1, 500, 1000, 0, 500, 1, 2000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 2.5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 'crystal_handler'); + +DELETE FROM `creature_template` WHERE (`entry`=31344); +INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (31344, 0, 0, 0, 0, 0, 24500, 0, 24500, 0, 'Crystal Handler (1)', '', '', 0, 81, 81, 41704, 41704, 8979, 8979, 0, 15, 15, 0, 1, 1, 1, 1000, 1500, 0, 500, 2, 2000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, ''); + +DELETE FROM `creature_template` WHERE (`entry`=27597); +INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (27597, 31348, 0, 0, 0, 0, 22337, 0, 22337, 0, 'Hulking Corpse', '', '', 0, 74, 74, 12338, 12338, 0, 0, 0, 15, 15, 0, 1, 1, 1, 500, 1000, 0, 500, 1, 2000, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 1.2, 1, 0, 0, 0, 0, 0, 0, 0, 88, 1, 0, 0, 0, ''); + +DELETE FROM `creature_template` WHERE (`entry`=31348); +INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (31348, 0, 0, 0, 0, 0, 22337, 0, 22337, 0, 'Hulking Corpse (1)', '', '', 0, 80, 80, 25200, 25200, 0, 0, 0, 15, 15, 0, 1, 1, 1, 1000, 1500, 0, 500, 2, 2000, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 88, 1, 0, 0, 0, ''); + +DELETE FROM `creature_template` WHERE (`entry`=27598); +INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (27598, 31873, 0, 0, 0, 0, 10978, 0, 10972, 0, 'Fetid Troll Corpse', '', '', 0, 74, 74, 2056, 2056, 0, 0, 0, 15, 15, 0, 1, 1, 0, 200, 400, 0, 500, 1, 2000, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0.2, 1, 0, 0, 0, 0, 0, 0, 0, 73, 1, 0, 0, 0, ''); + +DELETE FROM `creature_template` WHERE (`entry`=31873); +INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (31873, 0, 0, 0, 0, 0, 10978, 0, 10972, 0, 'Fetid Troll Corpse (1)', '', '', 0, 80, 80, 3780, 3780, 0, 0, 0, 15, 15, 0, 1, 1, 0, 500, 1000, 0, 500, 2, 2000, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0.3, 1, 0, 0, 0, 0, 0, 0, 0, 73, 1, 0, 0, 0, ''); + +DELETE FROM `creature_template` WHERE (`entry`=27600); +INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (27600, 31356, 0, 0, 0, 0, 2606, 0, 2606, 0, 'Risen Shadowcaster', '', '', 0, 74, 74, 1645, 1645, 7809, 7809, 0, 15, 15, 0, 1, 1, 0, 200, 400, 0, 500, 1, 2000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'EventAI', 0, 3, 0.2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, ''); + +DELETE FROM `creature_template` WHERE (`entry`=31356); +INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (31356, 0, 0, 0, 0, 0, 2606, 0, 2606, 0, 'Risen Shadowcaster (1)', '', '', 0, 81, 81, 3128, 3128, 8979, 8979, 0, 15, 15, 0, 1, 1, 0, 500, 1000, 0, 500, 2, 2000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0.3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, ''); + +update creature_template set AIName = '', ScriptName = 'boss_trollgore' where entry = 26630; +update creature_template set AIName = '', ScriptName = 'boss_novos' where entry = 26631; +update creature_template set AIName = '', ScriptName = 'crystal_handler' where entry = 26627; +update creature_template set AIName = '', ScriptName = 'crystal_channel' where entry = 26712; +update creature_template set AIName = '', ScriptName = 'risen_shadowcaster' where entry = 27600; +update creature_template set AIName = '', ScriptName = 'boss_dred' where entry = 27483; +update creature_template set AIName = '', ScriptName = 'boss_tharonja' where entry = 26632; \ No newline at end of file diff --git a/addition/718_draktharon_scriptdev2.sql b/addition/718_draktharon_scriptdev2.sql new file mode 100644 index 000000000..5d89cff15 --- /dev/null +++ b/addition/718_draktharon_scriptdev2.sql @@ -0,0 +1,4 @@ +DELETE FROM script_texts WHERE entry in (-1600020, -1600021); +INSERT INTO script_texts (`entry`,`content_default`,`sound`,`type`,`language`,`comment`) values +('-1600020','King Dred raises his talon menacingly!','0','5','0','King Dred Talon'), +('-1600021','King Dred calls for a raptor!','0','5','0','King Dred Call for Raptor'); \ No newline at end of file diff --git a/addition/719_ankahet_mangos.sql b/addition/719_ankahet_mangos.sql new file mode 100644 index 000000000..8f15f7720 --- /dev/null +++ b/addition/719_ankahet_mangos.sql @@ -0,0 +1,18 @@ +DELETE FROM creature_template_addon WHERE entry IN (30385, 31474); +INSERT INTO `creature_template_addon` (`entry`, `mount`, `bytes1`, `bytes2`, `emote`, `moveflags`, `auras`) VALUES +('30385', '0', '8', '1', '0', '0', NULL), +('31474', '0', '8', '1', '0', '0', NULL); + +DELETE FROM creature_template WHERE entry IN (31474, 30385, 29310, 31465); +INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES +(29310, 31465, 0, 0, 0, 0, 26777, 0, 26777, 0, 'Jedoga Shadowseeker', '', '', 0, 75, 75, 212700, 212700, 0, 0, 8204, 16, 16, 0, 1, 1, 1, 339, 481, 0, 370, 7.5, 2000, 0, 2, 0, 0, 0, 0, 0, 0, 0, 293, 436, 53, 7, 0, 29310, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4176, 6960, '', 0, 3, 20, 20, 0, 0, 0, 0, 0, 0, 0, 172, 1, 1575, 0, 0, 'boss_jedoga'), +(30385, 31474, 0, 0, 0, 0, 27382, 27384, 27383, 27385, 'Twilight Volunteer', '', '', 0, 74, 74, 25705, 25705, 0, 0, 0, 16, 16, 0, 0.55, 1, 1, 0, 0, 0, 0, 1, 2000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 2.5, 4, 0, 0, 0, 0, 0, 0, 0, 0, 1, 93, 0, 0, 'npc_twilight_volunteer'), +(31465, 0, 0, 0, 0, 0, 26777, 0, 26777, 0, 'Jedoga Shadowseeker (1)', '', '', 0, 82, 82, 431392, 431392, 0, 0, 10253, 16, 16, 0, 1, 1, 1, 463, 640, 0, 726, 13, 2000, 0, 2, 0, 0, 0, 0, 0, 0, 0, 360, 520, 91, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8352, 13920, '', 0, 3, 32, 20, 0, 0, 0, 0, 0, 0, 0, 172, 1, 0, 0, 1, ''), +(31474, 0, 0, 0, 0, 0, 27382, 27384, 27383, 27385, 'Twilight Volunteer (1)', '', '', 0, 81, 81, 58648, 58648, 0, 0, 0, 16, 16, 0, 0.55, 1, 1, 0, 0, 0, 0, 1, 2000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 4.5, 4, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, ''); + +DELETE FROM creature_addon WHERE guid=131953; +DELETE FROM creature WHERE guid=131953; +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES +(131953, 29310, 619, 3, 1, 26777, 0, 357.353, -692.808, -10.7028, 5.56541, 14400, 5, 0, 212700, 0, 0, 1); + + diff --git a/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h b/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h index 66c52b1cb..ed51ee667 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h +++ b/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h @@ -27,7 +27,8 @@ enum GO_VORTEX = 193564, NPC_ELDER_NADOX = 29309, - NPC_JEDOGA_SHADOWSEEKER = 29310 + NPC_TALDARAM = 29308, + NPC_JEDOGA_SHADOWSEEKER = 29310, }; #endif diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp index 3ff6d2d1a..89aa44cbe 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp @@ -16,15 +16,31 @@ /* ScriptData SDName: Boss_Jedoga -SD%Complete: 20% -SDComment: +SD%Complete: 90% +SDAuthor: Tassadar +SDComment: Correct Timers SDCategory: Ahn'kahet EndScriptData */ #include "precompiled.h" +#include "ahnkahet.h" +struct Locations +{ + float x, y, z, o; + uint32 id; +}; enum { + SPELL_SPHERE_VISUAL = 56075, + SPELL_GIFT_OF_THE_HERALD = 56219, + SPELL_CYCLONE_STRIKE = 60030, + SPELL_CYCLONE_STRIKE_H = 56855, + SPELL_LIGHTNING_BOLT = 56891, + SPELL_LIGHTNING_BOLT_H = 60032, + SPELL_THUNDERSHOCK = 56926, + SPELL_THUNDERSHOCK_H = 60029, + SAY_AGGRO = -1619017, SAY_CALL_SACRIFICE_1 = -1619018, SAY_CALL_SACRIFICE_2 = -1619019, @@ -41,7 +57,162 @@ enum SAY_PREACHING_5 = -1619030, SAY_VOLUNTEER_1 = -1619031, //said by the volunteer image - SAY_VOLUNTEER_2 = -1619032 + SAY_VOLUNTEER_2 = -1619032, + + NPC_TWILIGHT_INITIATE = 30114, + NPC_TWILIGHT_VOLUNTEER = 30385, + + GO_CIRCLE = 194394, // Propably wrong id + + //Jedoga Shadowseeker's phases + PHASE_NOSTART = 0, + PHASE_PREACHING = 1, + PHASE_DESCEND = 2, + SUBPHASE_FLY_DESCEND = 21, + PHASE_FIGHT = 3, + PHASE_SACRIFACE = 4, + SUBPHASE_FLY_UP = 41, + SUBPHASE_CALL_VOLUNTEER = 42, + SUBPHASE_WAIT_FOR_VOLUNTEER = 43, + SUBPHASE_SACRIFACE = 44, + + //Twilight Volunteer's sacriface phases + SACRIFACE_CHOOSEN = 1, + SACRIFACE_DIE = 2, + + VOLUNTEER_COUNT = 29, +}; +#define CENTER_X 367.800 +#define CENTER_Y -704.403 +#define GROUND_Z -16.17 + +#define JEDOGA_X 357.353 +#define JEDOGA_Y -692.807 +#define JEDOGA_Z -11.720 +#define JEDOGA_O 5.565 + +static Locations VolunteerLoc[]= +{ + //29 Volunteers + {365.68, -735.95, -16.17, 1.607}, // Right, first line + {367.12, -736.13, -16.17, 1.607}, + {369.03, -736.06, -16.17, 1.607}, + {371.66, -735.97, -16.17, 1.607}, + {373.47, -735.63, -16.17, 1.607}, + + {365.45, -739.03, -16.00, 1.607}, // Right, second line + {367.56, -738.62, -16.00, 1.607}, + {369.62, -738.22, -16.17, 1.607}, + {371.66, -737.82, -16.06, 1.607}, + {373.75, -737.41, -16.00, 1.607}, + + {400.99, -705.41, -16.00, 2.491}, // Center, from right + {398.07, -710.02, -16.00, 2.491}, + {395.34, -713.76, -16.00, 2.491}, + {393.42, -716.39, -16.00, 2.491}, + {391.48, -718.94, -16.00, 2.491}, + {388.80, -722.46, -16.00, 2.491}, + {386.19, -725.89, -16.00, 2.491}, + {383.61, -729.29, -16.00, 2.491}, + {380.37, -733.55, -16.00, 2.491}, + + {402.72, -700.79, -16.00, 3.046}, // Left, first line + {402.63, -698.86, -16.18, 3.149}, + {402.62, -697.10, -16.17, 3.149}, + {402.61, -695.50, -16.17, 3.059}, + {402.20, -693.39, -16.17, 3.159}, + + {405.31, -701.29, -16.00, 2.924}, // Left, second line + {405.46, -699.25, -16.00, 3.198}, + {405.40, -697.19, -16.00, 3.150}, + {405.35, -695.30, -16.00, 3.150}, + {405.29, -693.26, -16.00, 3.150} +}; + +/*###### +## npc_twilight_volunteer +######*/ +struct MANGOS_DLL_DECL npc_twilight_volunteerAI : public ScriptedAI +{ + npc_twilight_volunteerAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + + uint8 m_uiPhase; + bool m_bIsVulunteerNear; + uint32 m_uiCheckTimer; + void Reset() + { + m_uiPhase = 0; + m_bIsVulunteerNear = false; + m_uiCheckTimer = 1000; + } + void AttackStart(Unit* pWho) + { + return; + } + void MovementInform(uint32 uiType, uint32 uiPointId) + { + if(uiType != POINT_MOTION_TYPE) + return; + + switch(uiPointId) + { + case 0: + m_bIsVulunteerNear = true; + break; + } + } + void Sacriface(uint8 phase) + { + m_uiPhase = phase; + switch(m_uiPhase) + { + case SACRIFACE_CHOOSEN: + switch(urand(0, 1)) + { + case 0: DoScriptText(SAY_VOLUNTEER_1, m_creature); break; + case 1: DoScriptText(SAY_VOLUNTEER_2, m_creature); break; + } + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->GetMotionMaster()->MovePoint(0, CENTER_X, CENTER_Y, GROUND_Z); + break; + case SACRIFACE_DIE: + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + break; + } + } + void UpdateAI(const uint32 uiDiff) + { + //Despawn if no Jedoga or if she is not in combat + // I hope this will not take too CPU time + if (m_uiCheckTimer <= uiDiff) + { + if(Creature *pJedoga = GetClosestCreatureWithEntry(m_creature, NPC_JEDOGA_SHADOWSEEKER, 50.0f)) + { + if(!pJedoga->isAlive()) + m_creature->ForcedDespawn(); + else + { + if(Creature *pInitiate = GetClosestCreatureWithEntry(m_creature, NPC_TWILIGHT_INITIATE, 50.0f)) + { + if(pInitiate->isAlive()) + m_creature->ForcedDespawn(); + } + } + }else m_creature->ForcedDespawn(); + + + m_uiCheckTimer = 4000; + }else m_uiCheckTimer -= uiDiff; + } }; /*###### @@ -59,14 +230,50 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsRegularMode; + bool m_bIsVulunteerNear; + bool m_bVolunteerDied; + uint8 m_uiPhase; + uint8 m_uiSubPhase; + uint8 m_uiPreachingText; + Creature *pVolunteer; + uint8 m_uiLastSacrifaceHP; + + uint32 m_uiPreachingTimer; + uint32 m_uiCheckTimer; + uint32 m_uiSacrifaceTimer; + uint32 m_uiCycloneStrikeTimer; + uint32 m_uiLightningBoltTimer; + uint32 m_uiThundershockTimer; + void Reset() { - } + m_uiPhase = PHASE_PREACHING; + m_uiSubPhase = 0; + m_uiPreachingText = 0; + m_bIsVulunteerNear = false; + m_bVolunteerDied = false; + m_uiLastSacrifaceHP = 0; + m_uiCheckTimer = 1000; + m_uiSacrifaceTimer = 2000; + m_uiPreachingTimer = 0; + m_uiCycloneStrikeTimer = 17000; + m_uiLightningBoltTimer = 3000; + m_uiThundershockTimer = 30000; + + DoCast(m_creature, SPELL_SPHERE_VISUAL); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + if (m_pInstance) + m_pInstance->SetData(TYPE_JEDOGA, NOT_STARTED); + } void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); + AttackStart(pWho); + if (m_pInstance) + m_pInstance->SetData(TYPE_JEDOGA, IN_PROGRESS); } void KilledUnit(Unit* pVictim) @@ -78,26 +285,284 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI case 2: DoScriptText(SAY_SLAY_3, m_creature); break; } } + void EnterEvadeMode() + { + m_uiPhase = PHASE_PREACHING; + SetCombatMovement(false); + m_creature->GetMotionMaster()->MovementExpired(); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->InterruptNonMeleeSpells(true); + DoCast(m_creature, SPELL_SPHERE_VISUAL); + m_creature->GetMap()->CreatureRelocation(m_creature, JEDOGA_X, JEDOGA_Y, JEDOGA_Z, JEDOGA_O); + m_creature->SendMonsterMove(JEDOGA_X, JEDOGA_Y, JEDOGA_Z, JEDOGA_O, MONSTER_MOVE_NONE, 0); + if (m_pInstance) + m_pInstance->SetData(TYPE_JEDOGA, NOT_STARTED); + std::list lInitiates; //respawn Twilight initiates + GetCreatureListWithEntryInGrid(lInitiates, m_creature, NPC_TWILIGHT_INITIATE, DEFAULT_VISIBILITY_INSTANCE); + + if (!lInitiates.empty()) + { + for(std::list::iterator iter = lInitiates.begin(); iter != lInitiates.end(); ++iter) + { + if ((*iter) && !(*iter)->isAlive()) + (*iter)->Respawn(); + } + } + + } void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); + if (m_pInstance) + m_pInstance->SetData(TYPE_JEDOGA, DONE); + } + + Creature* SelectRandomVolunteer(float fRange) + { + std::list lVolunteerList; + GetCreatureListWithEntryInGrid(lVolunteerList, m_creature, NPC_TWILIGHT_VOLUNTEER, fRange); + + //This should not appear! + if (lVolunteerList.empty()){ + EnterEvadeMode(); + debug_log("SD2: AhnKahet: No volunteer to sacriface!"); + return NULL; + } + + + std::list::iterator iter = lVolunteerList.begin(); + advance(iter, urand(0, lVolunteerList.size()-1)); + + return *iter; } void UpdateAI(const uint32 uiDiff) { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + if(m_uiPhase == PHASE_NOSTART) return; + else if(m_uiPhase == PHASE_PREACHING) + { + if(m_uiCheckTimer <= uiDiff) + { + if(Creature *pTemp = GetClosestCreatureWithEntry(m_creature, NPC_TWILIGHT_INITIATE, 150.0f)) + m_uiCheckTimer = 2000; + else + { + m_uiPhase = PHASE_DESCEND; + m_uiSubPhase = SUBPHASE_FLY_DESCEND; + return; + } + }else m_uiCheckTimer -= uiDiff; + + if(m_uiPreachingTimer > uiDiff) + { + m_uiPreachingTimer -= uiDiff; + return; + } + + if(m_pInstance->GetData(TYPE_TALDARAM) != DONE) + return; - DoMeleeAttackIfReady(); + switch(m_uiPreachingText) + { + case 0: + DoScriptText(SAY_PREACHING_1, m_creature); + m_uiPreachingText++; + m_uiPreachingTimer = 9500; + break; + case 1: + DoScriptText(SAY_PREACHING_2, m_creature); + m_uiPreachingText++; + m_uiPreachingTimer = 6500; + break; + case 2: + DoScriptText(SAY_PREACHING_3, m_creature); + m_uiPreachingText++; + m_uiPreachingTimer = 8500; + break; + case 3: + DoScriptText(SAY_PREACHING_4, m_creature); + m_uiPreachingText++; + m_uiPreachingTimer = 7500; + break; + case 4: + DoScriptText(SAY_PREACHING_5, m_creature); + m_uiPreachingText = 0; + m_uiPreachingTimer = 12000; + break; + } + return; + } + else if(m_uiPhase == PHASE_DESCEND) + { + if(m_uiSubPhase == SUBPHASE_FLY_DESCEND) + { + if(GetClosestCreatureWithEntry(m_creature, NPC_TWILIGHT_VOLUNTEER, 150.0f)) + return; + + SetCombatMovement(true); + m_creature->GetMap()->CreatureRelocation(m_creature, CENTER_X, CENTER_Y, GROUND_Z, JEDOGA_O); + m_creature->SendMonsterMove(CENTER_X, CENTER_Y, GROUND_Z, JEDOGA_O, MONSTER_MOVE_NONE, 0); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->RemoveAurasDueToSpell(SPELL_SPHERE_VISUAL); + m_creature->SetInCombatWithZone(); + //Spawn Volunteers + for(int i = 0; i <= 28; i++) + { + if(Creature *pTemp = m_creature->SummonCreature(NPC_TWILIGHT_VOLUNTEER, VolunteerLoc[i].x, VolunteerLoc[i].y, VolunteerLoc[i].z, VolunteerLoc[i].o, TEMPSUMMON_CORPSE_DESPAWN, 0)) + pTemp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + + } + m_uiSubPhase = 0; + m_uiPhase = PHASE_FIGHT; + return; + } + } + else if(m_uiPhase == PHASE_FIGHT) + { + //Evade if no target in this phase + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Spells + //Cyclone Strike + if(m_uiCycloneStrikeTimer <= uiDiff) + { + DoCast(m_creature, m_bIsRegularMode ? SPELL_CYCLONE_STRIKE : SPELL_CYCLONE_STRIKE_H); + m_uiCycloneStrikeTimer = 10000 + rand()%10000; + }else m_uiCycloneStrikeTimer -= uiDiff; + + //Lightning Bolt + if(m_uiLightningBoltTimer <= uiDiff) + { + if(Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(pTarget, m_bIsRegularMode ? SPELL_LIGHTNING_BOLT : SPELL_LIGHTNING_BOLT_H); + m_uiLightningBoltTimer = 3000 + rand()%2000; + }else m_uiLightningBoltTimer -= uiDiff; + + //Thundershock + if(m_uiThundershockTimer <= uiDiff) + { + if(Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(pTarget, m_bIsRegularMode ? SPELL_THUNDERSHOCK : SPELL_THUNDERSHOCK_H); + m_uiThundershockTimer = 20000 + rand()%10000; + }else m_uiThundershockTimer -= uiDiff; + + //Health check + if(m_uiCheckTimer <= uiDiff) + { + uint8 health = m_creature->GetHealth()*100 / m_creature->GetMaxHealth(); + if(m_uiLastSacrifaceHP == 0 && health <= 75) + { + m_uiLastSacrifaceHP = 75; + m_uiPhase = PHASE_SACRIFACE; + m_uiSubPhase = SUBPHASE_FLY_UP; + return; + } + else if(m_uiLastSacrifaceHP == 75 && health <= 50) + { + m_uiLastSacrifaceHP = 50; + m_uiPhase = PHASE_SACRIFACE; + m_uiSubPhase = SUBPHASE_FLY_UP; + return; + } + else if(m_uiLastSacrifaceHP == 50 && health <= 25) + { + m_uiLastSacrifaceHP = 25; + m_uiPhase = PHASE_SACRIFACE; + m_uiSubPhase = SUBPHASE_FLY_UP; + return; + } + m_uiCheckTimer = 1000; + }else m_uiCheckTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } + else if(m_uiPhase == PHASE_SACRIFACE) + { + if(m_uiSubPhase == SUBPHASE_FLY_UP) + { + SetCombatMovement(false); + m_creature->GetMotionMaster()->MovementExpired(); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->InterruptNonMeleeSpells(true); + DoCast(m_creature, SPELL_SPHERE_VISUAL); + m_creature->GetMap()->CreatureRelocation(m_creature, JEDOGA_X, JEDOGA_Y, JEDOGA_Z, JEDOGA_O); + m_creature->SendMonsterMove(JEDOGA_X, JEDOGA_Y, JEDOGA_Z, JEDOGA_O, MONSTER_MOVE_NONE, 0); + m_uiSubPhase = SUBPHASE_CALL_VOLUNTEER; + GameObject* pCircle = GetClosestGameObjectWithEntry(m_creature,GO_CIRCLE,50.0f); + if (pCircle && !pCircle->isSpawned()) + pCircle->SetRespawnTime(10000); + } + else if(m_uiSubPhase == SUBPHASE_CALL_VOLUNTEER) + { + pVolunteer = SelectRandomVolunteer(150.0f); + if(pVolunteer) + { + switch(urand(0, 1)) + { + case 0: DoScriptText(SAY_CALL_SACRIFICE_1, m_creature); break; + case 1: DoScriptText(SAY_CALL_SACRIFICE_2, m_creature); break; + } + ((npc_twilight_volunteerAI*)pVolunteer->AI())->Sacriface(SACRIFACE_CHOOSEN); + m_uiSubPhase = SUBPHASE_WAIT_FOR_VOLUNTEER; + } + } + else if(m_uiSubPhase == SUBPHASE_WAIT_FOR_VOLUNTEER) + { + if(m_uiCheckTimer <= uiDiff) + { + if(pVolunteer && pVolunteer->isAlive()){ + m_bVolunteerDied = false; + if(((npc_twilight_volunteerAI*)pVolunteer->AI())->m_bIsVulunteerNear) + m_uiSubPhase = SUBPHASE_SACRIFACE; + }else{ + m_bIsVulunteerNear = true; + m_bVolunteerDied = true; + m_uiSubPhase = SUBPHASE_SACRIFACE; + } + + m_uiCheckTimer = 1000; + }else m_uiCheckTimer -= uiDiff; + } + else if(m_uiSubPhase == SUBPHASE_SACRIFACE) + { + switch(urand(0, 1)) + { + case 0: DoScriptText(SAY_SACRIFICE_1, m_creature); break; + case 1: DoScriptText(SAY_SACRIFICE_2, m_creature); break; + } + + if(pVolunteer && pVolunteer->isAlive()) + ((npc_twilight_volunteerAI*)pVolunteer->AI())->Sacriface(SACRIFACE_DIE); + + if(!m_bVolunteerDied) + DoCast(m_creature, SPELL_GIFT_OF_THE_HERALD); + m_creature->GetMap()->CreatureRelocation(m_creature, CENTER_X, CENTER_Y, GROUND_Z, JEDOGA_O); + m_creature->SendMonsterMove(CENTER_X, CENTER_Y, GROUND_Z, JEDOGA_O, MONSTER_MOVE_NONE, 0); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->RemoveAurasDueToSpell(SPELL_SPHERE_VISUAL); + SetCombatMovement(true); + m_uiPhase = PHASE_FIGHT; + if(m_creature->getVictim()) + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + } + } } }; - CreatureAI* GetAI_boss_jedoga(Creature* pCreature) { return new boss_jedogaAI(pCreature); } +CreatureAI* GetAI_npc_twilight_volunteer(Creature* pCreature) +{ + return new npc_twilight_volunteerAI(pCreature); +} + void AddSC_boss_jedoga() { Script *newscript; @@ -106,4 +571,9 @@ void AddSC_boss_jedoga() newscript->Name = "boss_jedoga"; newscript->GetAI = &GetAI_boss_jedoga; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_twilight_volunteer"; + newscript->GetAI = &GetAI_npc_twilight_volunteer; + newscript->RegisterSelf(); } diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp index ed31cd06c..164239fe4 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp @@ -16,8 +16,9 @@ /* ScriptData SDName: Boss_Taldaram -SD%Complete: 20% -SDComment: +SD%Complete: 80% +SDAuthor: Tassadar +SDComment: Timers, maybe wrong orb behavior SDCategory: Ahn'kahet EndScriptData */ @@ -26,6 +27,21 @@ EndScriptData */ enum { + SPELL_BEAM_VISUAL = 60342, // Used when taldram levitates before encounter + SPELL_CONJURE_FLAME_ORB = 55931, // Dummy spell, dont do anything except cast + SPELL_BLOODTHIRST = 55968, + SPELL_VANISH = 55964, // Does not work...? + SPELL_EMBRACE_OF_THE_VAMPYR = 55959, + SPELL_EMBRACE_OF_THE_VAMPYR_H = 59513, + + SPELL_FLAME_ORB_SPAWN_EFFECT = 55891, // Orb Grow up + SPELL_FLAME_ORB_VISUAL = 55928, // Flame orb effect + SPELL_FLAME_ORB_DEATH = 55947, // Despawn effect + SPELL_FLAME_ORB = 57750, // Flame orb damage + SPELL_FLAME_ORB_H = 58937, + + NPC_FLAME_ORB = 30702, + SAY_AGGRO = -1619008, SAY_VANISH_1 = -1619009, SAY_VANISH_2 = -1619010, @@ -34,7 +50,21 @@ enum SAY_SLAY_1 = -1619013, SAY_SLAY_2 = -1619014, SAY_SLAY_3 = -1619015, - SAY_DEATH = -1619016 + SAY_DEATH = -1619016, + + FLAME_ORB_Z = 17, + + FLAME_ORB_UP_X = 383, + FLAME_ORB_UP_Y = -984, + + FLAME_ORB_DOWN_X = 632, + FLAME_ORB_DOWN_Y = -684, + + FLAME_ORB_RIGHT_X = 350, + FLAME_ORB_RIGHT_Y = -705, + + FLAME_ORB_LEFT_X = 613, + FLAME_ORB_LEFT_Y = -966, }; /*###### @@ -52,14 +82,35 @@ struct MANGOS_DLL_DECL boss_taldaramAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsRegularMode; + uint8 m_uiVanishPhase; + uint32 m_uiDamageTaken; + Unit* m_uEmbraceTarget; + + uint32 m_uiBloodthirst_Timer; + uint32 m_uiSummonOrb_Timer; + uint32 m_uiVanish_Timer; + uint32 m_uiVanishPhase_Timer; + uint32 m_uiEmbrace_Timer; void Reset() { + m_uiBloodthirst_Timer = 4000; + m_uiSummonOrb_Timer = 13000; + m_uiVanish_Timer = 17000; + m_uiVanishPhase_Timer = 0; + m_uiEmbrace_Timer = 0; + m_uiVanishPhase = 0; + m_uiDamageTaken = 0; + if (m_pInstance) + m_pInstance->SetData(TYPE_TALDARAM, NOT_STARTED); } void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); + m_creature->RemoveAurasDueToSpell(SPELL_BEAM_VISUAL); + if (m_pInstance) + m_pInstance->SetData(TYPE_TALDARAM, IN_PROGRESS); } void KilledUnit(Unit* pVictim) @@ -80,11 +131,96 @@ struct MANGOS_DLL_DECL boss_taldaramAI : public ScriptedAI m_pInstance->SetData(TYPE_TALDARAM, DONE); } + void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + { + if(m_creature->IsNonMeleeSpellCasted(false)) + { + m_uiDamageTaken += uiDamage; + uint32 m_uiMinDamage = m_bIsRegularMode ? 20000 : 40000; + if(m_uiDamageTaken >= m_uiMinDamage) + { + m_uiVanishPhase = 0; + m_creature->InterruptNonMeleeSpells(false); + } + } + } void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if(m_uiVanishPhase != 0) + { + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + + if(m_uiVanishPhase_Timer <= uiDiff) + { + m_creature->InterruptNonMeleeSpells(false); + m_uiVanishPhase = 0; + }else m_uiVanishPhase_Timer -= uiDiff; + + if(m_uiVanishPhase != 1) + return; + + // Embrace of the Vampyr + if(m_uiEmbrace_Timer <= uiDiff) + { + switch(urand(0, 1)) + { + case 0: DoScriptText(SAY_FEED_1, m_creature); break; + case 1: DoScriptText(SAY_FEED_2, m_creature); break; + } + if(m_uEmbraceTarget) + DoCast(m_uEmbraceTarget, m_bIsRegularMode ? SPELL_EMBRACE_OF_THE_VAMPYR : SPELL_EMBRACE_OF_THE_VAMPYR_H); + m_creature->SetVisibility(VISIBILITY_ON); + m_uiDamageTaken = 0; + m_uiVanishPhase = 2; + }else m_uiEmbrace_Timer -= uiDiff; + return; + } + + // Bloodthirst + if(m_uiBloodthirst_Timer <= uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_BLOODTHIRST); + m_uiBloodthirst_Timer = 8000 + rand()%6000; + }else m_uiBloodthirst_Timer -= uiDiff; + + // Summon Flame Orb + if(m_uiSummonOrb_Timer <= uiDiff) + { + for(int i = 0; i <= 3; i++) + { + m_creature->SummonCreature(NPC_FLAME_ORB, m_creature->GetPositionX(), m_creature->GetPositionY(), FLAME_ORB_Z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); + if(m_bIsRegularMode) + break; + } + DoCast(m_creature, SPELL_CONJURE_FLAME_ORB); + m_uiSummonOrb_Timer = 16000 + rand()%10000; + m_uiVanish_Timer = 16000; + }else m_uiSummonOrb_Timer -= uiDiff; + + // Vanish + if(m_uiVanish_Timer <= uiDiff) + { + switch(urand(0, 1)) + { + case 0: DoScriptText(SAY_VANISH_1, m_creature); break; + case 1: DoScriptText(SAY_VANISH_2, m_creature); break; + } + + //DoCast(m_creature, SPELL_VANISH); We dont want to drop aggro + m_uiVanishPhase = 1; + if (m_uEmbraceTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + m_creature->GetMotionMaster()->MoveChase(m_uEmbraceTarget); + + m_creature->SetVisibility(VISIBILITY_OFF); + m_uiVanish_Timer = 10000 + rand()%10000; + m_uiEmbrace_Timer = 3500; + m_uiVanishPhase_Timer = 22500; + return; + }else m_uiVanish_Timer -= uiDiff; + DoMeleeAttackIfReady(); } }; @@ -93,6 +229,88 @@ CreatureAI* GetAI_boss_taldaram(Creature* pCreature) { return new boss_taldaramAI(pCreature); } +/*###### +## mob_flame_orb +######*/ + +struct MANGOS_DLL_DECL mob_flame_orbAI : public ScriptedAI +{ + mob_flame_orbAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + bool m_bIsFlying; + int8 direction; + + uint32 m_uiDespawn_Timer; + uint32 m_uiCast_Timer; + + void Reset() + { + m_uiDespawn_Timer = 13000; + m_uiCast_Timer = 3000; + direction = -1; + m_bIsFlying = false; + DoCast(m_creature, SPELL_FLAME_ORB_VISUAL); + DoCast(m_creature, SPELL_FLAME_ORB_SPAWN_EFFECT); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } + void AttackStart(Unit* pWho) + { + return; + } + void UpdateAI(const uint32 uiDiff) + { + // Despawn Timer + if(m_uiDespawn_Timer <= uiDiff) + { + DoCast(m_creature, SPELL_FLAME_ORB_DEATH); + m_creature->ForcedDespawn(); + }else m_uiDespawn_Timer -= uiDiff; + + // Fly timer + if(m_uiCast_Timer <= uiDiff) + { + if(m_bIsFlying) + return; + + DoCast(m_creature, m_bIsRegularMode ? SPELL_FLAME_ORB : SPELL_FLAME_ORB_H); + direction = rand()%3; + switch(direction) + { + case 0: // Up + m_creature->GetMotionMaster()->MovePoint(0, FLAME_ORB_UP_X, FLAME_ORB_UP_Y, FLAME_ORB_Z); + break; + case 1: // Down + m_creature->GetMotionMaster()->MovePoint(0, FLAME_ORB_DOWN_X, FLAME_ORB_DOWN_Y, FLAME_ORB_Z); + break; + case 2: // Right + m_creature->GetMotionMaster()->MovePoint(0, FLAME_ORB_RIGHT_X, FLAME_ORB_RIGHT_Y, FLAME_ORB_Z); + break; + case 3: // Left + m_creature->GetMotionMaster()->MovePoint(0, FLAME_ORB_LEFT_X, FLAME_ORB_LEFT_Y, FLAME_ORB_Z); + break; + default: + m_creature->GetMotionMaster()->MovePoint(0, FLAME_ORB_UP_X, FLAME_ORB_UP_Y, FLAME_ORB_Z); + break; + + } + m_bIsFlying = true; + m_creature->AddMonsterMoveFlag(MONSTER_MOVE_SPLINE_FLY); + }else m_uiCast_Timer -= uiDiff; + } +}; + +CreatureAI* GetAI_mob_flame_orb(Creature* pCreature) +{ + return new mob_flame_orbAI(pCreature); +} /*###### ## go_nerubian_device @@ -123,4 +341,9 @@ void AddSC_boss_taldaram() newscript->Name = "go_nerubian_device"; newscript->pGOHello = &GOHello_go_nerubian_device; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_flame_orb"; + newscript->GetAI = &GetAI_mob_flame_orb; + newscript->RegisterSelf(); } diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp index a2dd6cdcb..abb112708 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp @@ -22,17 +22,108 @@ SDCategory: Ahn'kahet EndScriptData */ #include "precompiled.h" +#include "ahnkahet.h" //TODO: fill in texts in database. Also need to add text for whisper. enum { + SPELL_MIND_FLAY = 57941, + SPELL_MIND_FLAY_H = 59974, + SPELL_SHADOW_BOLT = 57942, + SPELL_SHADOW_BOLT_H = 59975, + + //Shiver - horrible ability + SPELL_SHIVER = 57949, //Jump Aura + SPELL_SHIVER_H = 59978, + SPELL_SHIVER_DMG = 57952, //Damage + SPELL_SHIVER_DMG_H = 59979, + SPELL_SHIVER_DUMMY = 57951, //What is this? + + //This is little complicated: + //When volajz cast this, on every player is cast different invisibility spell, + //so they dont see together, but they see four Twisted Visages - images of other + //four party members, which cast spell like their class. + SPELL_INSANITY = 57496, //This is what volajz casts, it should trigger Twisted Visage spawn spells + SPELL_INSANITY_PHASE = 57507, //For use in code + SPELL_INSANITY_PHASE_1 = 57508, //invis spells + SPELL_INSANITY_PHASE_2 = 57509, + SPELL_INSANITY_PHASE_3 = 57510, + SPELL_INSANITY_PHASE_4 = 57511, + SPELL_INSANITY_PHASE_5 = 57512, + SPELL_INSANITY_CHANNEL = 57561, //Just for visual, Volazj cast this when players are in insanity + + SPELL_TWISTED_VISAGE_MIRROR = 57507, //Not implented in mangos, but I have patch :) + + /* + http://www.wowhead.com/?spell=57507 Twisted visage visual + http://www.wowhead.com/?spells=0&filter=na=twisted+visage so many spells?! + */ + + NPC_TWISTED_VISAGE = 30621, + //NPC_TWISTED_VISAGE = 20058, //Bloodmaul wolf, for testing + + SAY_AGGRO = -1619033, SAY_INSANITY = -1619034, SAY_SLAY_1 = -1619035, SAY_SLAY_2 = -1619036, SAY_SLAY_3 = -1619037, SAY_DEATH_1 = -1619038, - SAY_DEATH_2 = -1619039 + SAY_DEATH_2 = -1619039, + + PHASE_NOSTART = 0, + PHASE_FIGHT = 1, + PHASE_INSANITY_1 = 2, // Wait five seconds until cast is complete, set unattackable + PHASE_INSANITY_2 = 3, + PHASE_INSANITY_3 = 4, +}; +/*###### +## mob_twisted_visage +######*/ +struct MANGOS_DLL_DECL mob_twisted_visageAI : public ScriptedAI +{ + mob_twisted_visageAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + + uint8 m_uiMyPhase; + Player *m_pAttackPlayer; + Player *m_pMirrorPlayer; + + void Reset() + { + if(m_pMirrorPlayer) + m_creature->CastSpell(m_creature, 57507, false); + + } + void Aggro(Unit *pWho) + { + if(m_pMirrorPlayer) + m_creature->CastSpell(m_creature, 57507, false); + } + void EnterEvadeMode() + { + if (m_creature->IsInEvadeMode() || !m_creature->isAlive()) + return; + } + void JustDied(Unit *pWho) + { + pWho->RemoveAurasDueToSpell(SPELL_INSANITY_PHASE+m_uiMyPhase); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } }; /*###### @@ -50,16 +141,61 @@ struct MANGOS_DLL_DECL boss_volazjAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsRegularMode; + bool m_bIsDebugMode; //if only one player(GM) in instance + uint8 m_uiPhase; + Player *m_pLastShiverTarget; + uint8 m_uiShiverJumpTimer; + uint8 m_uiLastSacrifaceHP; + + uint32 m_uiMindFlayTimer; + uint32 m_uiShadowBoltTimer; + uint32 m_uiShiverTimer; + uint32 m_uiCheckTimer; + + //Insanity + uint32 m_uiInsanityCastTimer; void Reset() { + m_uiPhase = PHASE_NOSTART; + m_bIsDebugMode = false; + m_uiLastSacrifaceHP = 0; + + m_uiMindFlayTimer = 10000; + m_uiShadowBoltTimer = 5000; + m_uiShiverTimer = 18000; + m_uiCheckTimer = 1000; + m_uiShiverJumpTimer = 0; + + + //Insanity + m_uiInsanityCastTimer = 5000; + + if (m_pInstance) + m_pInstance->SetData(TYPE_VOLAZJ, NOT_STARTED); } void Aggro(Unit* pWho) { + m_bIsDebugMode; DoScriptText(SAY_AGGRO, m_creature); + if (m_pInstance) + m_pInstance->SetData(TYPE_VOLAZJ, IN_PROGRESS); + m_uiPhase = PHASE_FIGHT; + + Map* pMap = m_creature->GetMap(); + if(pMap) + { + Map::PlayerList const &lPlayers = pMap->GetPlayers(); + if(lPlayers.getSize() == 1) + m_bIsDebugMode = true; + } + } + void EnterEvadeMode() + { + if(m_uiPhase != PHASE_FIGHT) + return; } - void KilledUnit(Unit* pVictim) { switch(urand(0, 2)) @@ -73,14 +209,221 @@ struct MANGOS_DLL_DECL boss_volazjAI : public ScriptedAI void JustDied(Unit* pKiller) { DoScriptText(urand(0, 1) ? SAY_DEATH_1 : SAY_DEATH_2, m_creature); + if (m_pInstance) + m_pInstance->SetData(TYPE_VOLAZJ, DONE); } + void DoShiver() + { + if(m_pLastShiverTarget && m_pLastShiverTarget->isAlive()) + { + Map* pMap = m_creature->GetMap(); + if(!pMap) + return; + Map::PlayerList const &lPlayers = pMap->GetPlayers(); + if (lPlayers.isEmpty()) + return; + bool hasJumped = false; + + for(Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr) + { + if(m_pLastShiverTarget == itr->getSource()) + continue; + + if(itr->getSource()->IsWithinDist(m_pLastShiverTarget, 20.0f, false)) + { + m_pLastShiverTarget->CastSpell(itr->getSource(), m_bIsRegularMode ? SPELL_SHIVER : SPELL_SHIVER_H, true); + m_pLastShiverTarget = itr->getSource(); + hasJumped = true; + } + } + if(hasJumped == false) + { + if(m_uiShiverJumpTimer == 3) + { + if(Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + { + DoCast(pTarget, m_bIsRegularMode ? SPELL_SHIVER : SPELL_SHIVER_H); + m_pLastShiverTarget = ((Player*)pTarget); + } + m_uiShiverJumpTimer = 0; + }else m_uiShiverJumpTimer++; + } + }else{ + if(Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + { + DoCast(pTarget, m_bIsRegularMode ? SPELL_SHIVER : SPELL_SHIVER_H); + m_pLastShiverTarget = ((Player*)pTarget); + } + } + } void UpdateAI(const uint32 uiDiff) { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + if(m_uiPhase == PHASE_FIGHT) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Spells + //Mind Flay + if(m_uiMindFlayTimer <= uiDiff) + { + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_MIND_FLAY : SPELL_MIND_FLAY_H); + m_uiMindFlayTimer = 10000 + rand()%10000; + }else m_uiMindFlayTimer -= uiDiff; + + //Shadowbolt voley + if(m_uiShadowBoltTimer <= uiDiff) + { + DoCast(m_creature, m_bIsRegularMode ? SPELL_SHADOW_BOLT : SPELL_SHADOW_BOLT_H); + m_uiShadowBoltTimer = 8000 + rand()%5000; + }else m_uiShadowBoltTimer -= uiDiff; + + //Shiver + if(m_uiShiverTimer <= uiDiff) + { + //DoShiver(); + m_uiShiverTimer = 5000; + }else m_uiShiverTimer -= uiDiff; + + //Health check + if(m_uiCheckTimer <= uiDiff) + { + uint8 health = m_creature->GetHealth()*100 / m_creature->GetMaxHealth(); + if(m_uiLastSacrifaceHP == 0 && health <= 66) + { + m_creature->InterruptNonMeleeSpells(true); + SetCombatMovement(false); + m_uiLastSacrifaceHP = 66; + DoCast(m_creature, SPELL_INSANITY, false); + m_uiPhase = PHASE_INSANITY_1; + return; + } + else if(m_uiLastSacrifaceHP == 66 && health <= 33) + { + m_creature->InterruptNonMeleeSpells(true); + SetCombatMovement(false); + DoCast(m_creature, SPELL_INSANITY, false); + m_uiLastSacrifaceHP = 33; + m_uiPhase = PHASE_INSANITY_1; + return; + } + m_uiCheckTimer = 1000; + }else m_uiCheckTimer -= uiDiff; + + DoMeleeAttackIfReady(); + }else if(m_uiPhase == PHASE_INSANITY_1) + { + //Wait until cast is complete + if(m_uiInsanityCastTimer <= uiDiff) + { + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + DoCast(m_creature, SPELL_INSANITY_PHASE_1, true); + DoCast(m_creature, SPELL_INSANITY_CHANNEL); + DoInsanity(); + m_uiInsanityCastTimer = 5000; + m_uiCheckTimer = 5000; + m_uiPhase = PHASE_INSANITY_2; + SetCombatMovement(false); + m_creature->GetMotionMaster()->MovementExpired(false); + }else m_uiInsanityCastTimer -= uiDiff; + }else if(m_uiPhase == PHASE_INSANITY_2) + { + if(m_uiCheckTimer <= uiDiff) + { + if(Creature *pTemp = GetClosestCreatureWithEntry(m_creature, NPC_TWISTED_VISAGE, 150.0f)) + { + if(!pTemp->isAlive()) + m_uiPhase = PHASE_INSANITY_3; + }else m_uiPhase = PHASE_INSANITY_3; + m_uiCheckTimer = 1000; + }else m_uiCheckTimer -= uiDiff; + }else if(m_uiPhase == PHASE_INSANITY_3) + { + m_creature->RemoveAurasDueToSpell(SPELL_INSANITY_CHANNEL); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveAurasDueToSpell(SPELL_INSANITY_PHASE_1); + //RemoveInsanity(); + SetCombatMovement(true); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + m_uiPhase = PHASE_FIGHT; + } + + } + //This do everything which is needed by Insanity spell + void DoInsanity() + { + Map* pMap = m_creature->GetMap(); + if(!pMap) return; + Map::PlayerList const &lPlayers = pMap->GetPlayers(); - DoMeleeAttackIfReady(); + if (lPlayers.isEmpty()) + return; + int i = 1; + for(Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr) + { + if(!itr->getSource()->isAlive()) + continue; + //Phase players, so they dont see together + DoPhasePlayer(i, itr->getSource()); + //Spawn Visages and port them to phases + DoSpawnTwistedVisages(itr->getSource(), i); + i++; + } + //Set mirror image to twisted visages + //DoInitializeVisages(); + } + //Phase players, so they dont see together + void DoPhasePlayer(uint8 count, Player *pPlayer) + { + if(pPlayer) + pPlayer->CastSpell(pPlayer, SPELL_INSANITY_PHASE+count, false); + } + //Spawn Visages and port them to phases + void DoSpawnTwistedVisages(Player *pPlayer, uint8 count) + { + if(!pPlayer) + return; + if(!pPlayer->isAlive()) + return; + float x,y,z; + m_creature->GetPosition(x, y, z); + if(m_bIsDebugMode || count < 1) + { + if(Creature *pTemp = pPlayer->SummonCreature(NPC_TWISTED_VISAGE, x, y, z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0)) + { + if(!pTemp->isAlive()) + return; + + pTemp->CastSpell(pTemp, SPELL_INSANITY_PHASE+1, true); + ((mob_twisted_visageAI*)pTemp->AI())->m_uiMyPhase = 1; + ((mob_twisted_visageAI*)pTemp->AI())->m_pMirrorPlayer = pPlayer; + pTemp->SetUInt32Value(UNIT_CREATED_BY_SPELL, 57500); + pTemp->SetCreatorGUID(pPlayer->GetGUID()); + pPlayer->CastSpell(pTemp, SPELL_TWISTED_VISAGE_MIRROR, true); + } + return; + } + + for(int i = 1; i <= 5; i++) + { + if(i == count) + continue; + + if(Creature *pTemp = pPlayer->SummonCreature(NPC_TWISTED_VISAGE, x, y, z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0)) + { + if(!pTemp->isAlive()) + return; + + pTemp->CastSpell(pTemp, SPELL_INSANITY_PHASE+i, true); + ((mob_twisted_visageAI*)pTemp->AI())->m_uiMyPhase = i; + ((mob_twisted_visageAI*)pTemp->AI())->m_pMirrorPlayer = pPlayer; + pTemp->SetUInt32Value(UNIT_CREATED_BY_SPELL, 57500); + pTemp->SetCreatorGUID(pPlayer->GetGUID()); + pPlayer->CastSpell(pTemp, SPELL_TWISTED_VISAGE_MIRROR, true); + } + } } }; @@ -89,6 +432,11 @@ CreatureAI* GetAI_boss_volazj(Creature* pCreature) return new boss_volazjAI(pCreature); } +CreatureAI* GetAI_mob_twisted_visage(Creature* pCreature) +{ + return new mob_twisted_visageAI(pCreature); +} + void AddSC_boss_volazj() { Script *newscript; @@ -97,4 +445,12 @@ void AddSC_boss_volazj() newscript->Name = "boss_volazj"; newscript->GetAI = &GetAI_boss_volazj; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_twisted_visage"; + newscript->GetAI = &GetAI_mob_twisted_visage; + newscript->RegisterSelf(); } +/* +UPDATE creature_template SET ScriptName = "mob_twisted_visage" WHERE entry =30621; +*/ \ No newline at end of file diff --git a/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp index 1988bd028..ce64e730b 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp @@ -33,6 +33,7 @@ struct MANGOS_DLL_DECL instance_ahnkahet : public ScriptedInstance uint64 m_uiElderNadoxGUID; uint64 m_uiJedogaShadowseekerGUID; + uint64 m_uiTaldaramGUID; uint64 m_uiTaldaramDoorGUID; uint64 m_uiTaldaramVortexGUID; uint8 m_uiDevicesActivated; @@ -43,6 +44,7 @@ struct MANGOS_DLL_DECL instance_ahnkahet : public ScriptedInstance m_uiElderNadoxGUID = 0; m_uiJedogaShadowseekerGUID = 0; + m_uiTaldaramGUID = 0; m_uiTaldaramDoorGUID = 0; m_uiTaldaramVortexGUID = 0; m_uiDevicesActivated = 0; @@ -54,6 +56,7 @@ struct MANGOS_DLL_DECL instance_ahnkahet : public ScriptedInstance { case NPC_ELDER_NADOX: m_uiElderNadoxGUID = pCreature->GetGUID(); break; case NPC_JEDOGA_SHADOWSEEKER: m_uiJedogaShadowseekerGUID = pCreature->GetGUID(); break; + case NPC_TALDARAM: m_uiTaldaramGUID = pCreature->GetGUID(); break; } } diff --git a/scripts/northrend/draktharon_keep/boss_dred.cpp b/scripts/northrend/draktharon_keep/boss_dred.cpp new file mode 100644 index 000000000..7445d828c --- /dev/null +++ b/scripts/northrend/draktharon_keep/boss_dred.cpp @@ -0,0 +1,198 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Tharonja +SD%Complete: 80% +SDComment: Timers +SDCategory: Drak'Tharon Keep +EndScriptData */ + +#include "precompiled.h" +#include "draktharon_keep.h" + +enum +{ + SAY_KING_DRED_TALON = -1600020, + SAY_CALL_FOR_RAPTOR = -1600021, + + SPELL_BELLOWING_ROAR = 22686, + SPELL_FEARSOME_ROAR = 48849, + H_SPELL_FEARSOME_ROAR = 59422, + SPELL_GRIEVOUS_BITE = 48920, + SPELL_MANGLING_SLASH = 48873, + SPELL_PIERCING_SLASH = 48878, + SPELL_RAPTOR_CALL = 59416, //not yet implemented + + NPC_DRAKKARI_GUTRIPPER = 26641, + NPC_DRAKKARI_SCYTHECLAW = 26628 +}; + +const float PosSummon1[3] = {-528.8, -690.58, 30.25}; +/*###### +## boss_dred +######*/ + +struct MANGOS_DLL_DECL boss_dredAI : public ScriptedAI +{ + boss_dredAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + + uint32 FearsomeRoar_Timer; + uint32 ManglingSlash_Timer; + uint32 PiercingSlash_Timer; + uint32 GrievousBite_Timer; + uint32 BellowingRoar_Timer; + uint32 Check_Timer; + uint32 CallForRaptor_Timer; + uint32 CallForRaptorSpawn_Timer; + uint32 CallForRaptorSpawn_Check; + + void Reset() + { + FearsomeRoar_Timer = 15000; + ManglingSlash_Timer = urand(5000, 10000); + PiercingSlash_Timer = urand(10000, 15000); + GrievousBite_Timer = urand (15000, 20000); + BellowingRoar_Timer = 60000; + Check_Timer = 15000; + CallForRaptor_Timer = 25000; + CallForRaptorSpawn_Check = 0; + } + + void Aggro(Unit* pWho) + { + + } + + void KilledUnit(Unit* pVictim) + { + + } + + void JustDied(Unit* pKiller) + { + + } + + void CallForRaptorSpawnCheck() + { + CallForRaptorSpawn_Timer = 1000; + CallForRaptorSpawn_Check = 1; + } + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Fearsome Roar + if (FearsomeRoar_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_FEARSOME_ROAR : H_SPELL_FEARSOME_ROAR, true); + FearsomeRoar_Timer = 15000; + }else FearsomeRoar_Timer -= uiDiff; + + //Piercing Slash + if (PiercingSlash_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_PIERCING_SLASH, true); + PiercingSlash_Timer = urand(20000, 25000); + }else PiercingSlash_Timer -= uiDiff; + + //Mangling Slash + if (ManglingSlash_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_MANGLING_SLASH, true); + ManglingSlash_Timer = urand(20000, 25000); + }else ManglingSlash_Timer -= uiDiff; + + //Mangling Slash + if (GrievousBite_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_GRIEVOUS_BITE, true); + GrievousBite_Timer = urand(20000, 25000); + }else GrievousBite_Timer -= uiDiff; + + //Grievous Bite remove + if (Check_Timer < uiDiff) + { + Unit* pPlayer = m_creature->getVictim(); + if (pPlayer->GetHealth() == pPlayer->GetMaxHealth()) + if (pPlayer->HasAura(SPELL_GRIEVOUS_BITE)) + pPlayer->RemoveAura(SPELL_GRIEVOUS_BITE, 0); + Check_Timer = 1000; + }else Check_Timer -= uiDiff; + + //Bellowing Roar + if (BellowingRoar_Timer < uiDiff) + { + DoCast(m_creature, SPELL_BELLOWING_ROAR); + BellowingRoar_Timer = 60000; + }else BellowingRoar_Timer -= uiDiff; + + //Call For Raptor - spell + if (CallForRaptor_Timer < uiDiff) + { + DoScriptText(SAY_CALL_FOR_RAPTOR, m_creature); + m_creature->CastSpell(m_creature, SAY_CALL_FOR_RAPTOR, true); + CallForRaptor_Timer = 25000; + CallForRaptorSpawnCheck(); + }else CallForRaptor_Timer -= uiDiff; + + //Call For Raptor - spawn + if (CallForRaptorSpawn_Timer < uiDiff && CallForRaptorSpawn_Check == 1) + { + switch(urand(0, 1)) + { + case 0: + { + if (Creature* pRaptor1 = m_creature->SummonCreature(NPC_DRAKKARI_GUTRIPPER, PosSummon1[0], PosSummon1[1], PosSummon1[2], 0 , TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 240000)) + pRaptor1->AI()->AttackStart(m_creature->getVictim()); + } + case 1: + { + if (Creature* pRaptor2 = m_creature->SummonCreature(NPC_DRAKKARI_SCYTHECLAW, PosSummon1[0], PosSummon1[1], PosSummon1[2], 0 , TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 240000)) + pRaptor2->AI()->AttackStart(m_creature->getVictim()); + } + } + CallForRaptorSpawn_Check = 0; + }else CallForRaptorSpawn_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_dred(Creature* pCreature) +{ + return new boss_dredAI(pCreature); +} + +void AddSC_boss_dred() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_dred"; + newscript->GetAI = &GetAI_boss_dred; + newscript->RegisterSelf(); +} \ No newline at end of file diff --git a/scripts/northrend/draktharon_keep/boss_novos.cpp b/scripts/northrend/draktharon_keep/boss_novos.cpp index ca3a213ad..b076c7002 100644 --- a/scripts/northrend/draktharon_keep/boss_novos.cpp +++ b/scripts/northrend/draktharon_keep/boss_novos.cpp @@ -16,12 +16,13 @@ /* ScriptData SDName: Boss_Novos -SD%Complete: 20% -SDComment: +SD%Complete: 80% +SDComment: Timers SDCategory: Drak'Tharon Keep EndScriptData */ #include "precompiled.h" +#include "draktharon_keep.h" enum { @@ -32,9 +33,34 @@ enum SAY_BUBBLE_1 = -1600009, SAY_BUBBLE_2 = -1600010, - EMOTE_ASSISTANCE = -1600011 + EMOTE_ASSISTANCE = -1600011, + + POS = 3, + + SPELL_ARCANE_FIELD = 47346, + SPELL_FROSTBOLT = 49037, + H_SPELL_FROSTBOLT = 59855, + SPELL_ARCANE_BLAST = 49198, + H_SPELL_ARCANE_BLAST = 59909, + SPELL_BLIZZARD = 49034, + H_SPELL_BLIZZARD = 59854, + SPELL_WRATH_OF_MISERY = 50089, + H_SPELL_WRATH_OF_MISERY = 59856, + + SPELL_RITUAL_CRYSTAL_KEY = 51404, + SPELL_EFFECT = 52106, + SPELL_DEAD_EFFECT = 47336, + + SPELL_SHADOW_BOLT = 51363, + H_SPELL_SHADOW_BOLT = 59016 }; +const float PosSummonHandler[POS][3] = +{ + {-337.78, -720.39, 28.58}, + {-379.31, -818.36, 59.70}, + {-412.45, -726.96, 28.58}, +}; /*###### ## boss_novos ######*/ @@ -51,13 +77,32 @@ struct MANGOS_DLL_DECL boss_novosAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsRegularMode; + + bool Phase1; + bool Phase2; + uint32 Start_Check; + uint32 Handler_Spawn; + uint32 Handler_Count; + uint32 Cast_Timer; + uint32 ArcaneBlast_Timer; + uint32 SpecialCast_Timer; + uint32 SummonMinion_Timer; + void Reset() { + Start_Check = 1; + Handler_Spawn = 5000; + Handler_Count = 0; + Phase1 = false; + Phase2 = false; } void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); + + m_creature->SummonCreature(NPC_CRYSTAL_CHANNEL_TARGET, -379.269, -737.728, 39.313, 0 , TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000); + m_creature->CallForHelp(50.0f); } void KilledUnit(Unit* pVictim) @@ -70,20 +115,214 @@ struct MANGOS_DLL_DECL boss_novosAI : public ScriptedAI DoScriptText(SAY_DEATH, m_creature); } + void EnterPhase1() + { + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetInCombatWithZone(); + Phase1 = true; + } + + void EnterPhase2() + { + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->InterruptSpell(CURRENT_CHANNELED_SPELL); + SummonMinion_Timer = urand (15000,20000); + SpecialCast_Timer = urand(15000, 20000); + ArcaneBlast_Timer = urand(25000, 30000); + Cast_Timer = 500; + Phase1 = false; + Phase2 = true; + } + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (Phase2 == true) + { + //Arcane Blast + if (ArcaneBlast_Timer < uiDiff) + { + m_creature->InterruptSpell(CURRENT_GENERIC_SPELL); + m_creature->CastSpell(m_creature, m_bIsRegularMode ? SPELL_ARCANE_BLAST : H_SPELL_ARCANE_BLAST, true); + ArcaneBlast_Timer = urand(25000, 30000); + }else ArcaneBlast_Timer -= uiDiff; + + //Wrath Of Misery or Blizzard + if (SpecialCast_Timer < uiDiff) + { + m_creature->InterruptSpell(CURRENT_GENERIC_SPELL); + switch(urand(0, 1)) + { + case 0: + DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), m_bIsRegularMode ? SPELL_WRATH_OF_MISERY : H_SPELL_WRATH_OF_MISERY); + case 1: + DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), m_bIsRegularMode ? SPELL_BLIZZARD : H_SPELL_BLIZZARD); + } + SpecialCast_Timer = urand(10000, 15000); + }else ArcaneBlast_Timer -= uiDiff; + + //Regual cast - frostbolt + if (Cast_Timer < uiDiff && ArcaneBlast_Timer > uiDiff && SpecialCast_Timer > uiDiff) + { + DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), m_bIsRegularMode ? SPELL_FROSTBOLT : H_SPELL_FROSTBOLT); + Cast_Timer = 1000; + }else Cast_Timer -= uiDiff; + + //Summon Minions (Heroic) + if (SummonMinion_Timer < uiDiff) + { + if(m_bIsRegularMode) + return; - DoMeleeAttackIfReady(); + uint8 SummonLoc = rand()%POS; + if (Creature* pAdd1 = m_creature->SummonCreature(NPC_FETID_TROLL_CORPSE, PosSummonHandler[SummonLoc][0],PosSummonHandler[SummonLoc][1],PosSummonHandler[SummonLoc][2],0, TEMPSUMMON_TIMED_DESPAWN, 120000)) + pAdd1->AI()->AttackStart(m_creature->getVictim()); + if (Creature* pAdd2 = m_creature->SummonCreature(NPC_FETID_TROLL_CORPSE, PosSummonHandler[SummonLoc][0],PosSummonHandler[SummonLoc][1],PosSummonHandler[SummonLoc][2],0, TEMPSUMMON_TIMED_DESPAWN, 120000)) + pAdd2->AI()->AttackStart(m_creature->getVictim()); + if (Creature* pAdd3 = m_creature->SummonCreature(NPC_FETID_TROLL_CORPSE, PosSummonHandler[SummonLoc][0],PosSummonHandler[SummonLoc][1],PosSummonHandler[SummonLoc][2],0, TEMPSUMMON_TIMED_DESPAWN, 120000)) + pAdd3->AI()->AttackStart(m_creature->getVictim()); + if (Creature* pAdd4 = m_creature->SummonCreature(NPC_FETID_TROLL_CORPSE, PosSummonHandler[SummonLoc][0],PosSummonHandler[SummonLoc][1],PosSummonHandler[SummonLoc][2],0, TEMPSUMMON_TIMED_DESPAWN, 120000)) + pAdd4->AI()->AttackStart(m_creature->getVictim()); + if (Creature* pAdd5 = m_creature->SummonCreature(NPC_FETID_TROLL_CORPSE, PosSummonHandler[SummonLoc][0],PosSummonHandler[SummonLoc][1],PosSummonHandler[SummonLoc][2],0, TEMPSUMMON_TIMED_DESPAWN, 120000)) + pAdd5->AI()->AttackStart(m_creature->getVictim()); + SummonMinion_Timer = urand (15000,20000); + }else SummonMinion_Timer -= uiDiff; + + } + + if (m_creature->getVictim() && Start_Check == 1) + { + EnterPhase1(); + DoCast(m_creature, SPELL_ARCANE_FIELD); + Start_Check = 0; + } + + //Phase 1 Waves spawn + if (Handler_Spawn < uiDiff && Phase1 == true) + { + Handler_Count ++; + if(Handler_Count < 5) + { + uint8 SummonLoc = rand()%POS; + m_creature->SummonCreature(NPC_CRYSTAL_HANDLER, PosSummonHandler[SummonLoc][0],PosSummonHandler[SummonLoc][1],PosSummonHandler[SummonLoc][2],0, TEMPSUMMON_TIMED_DESPAWN, 120000); + if (Creature* pAdd1 = m_creature->SummonCreature(NPC_HULKING_CORPSE, PosSummonHandler[SummonLoc][0],PosSummonHandler[SummonLoc][1],PosSummonHandler[SummonLoc][2],0, TEMPSUMMON_TIMED_DESPAWN, 120000)) + pAdd1->AI()->AttackStart(m_creature->getVictim()); + if (Creature* pAdd2 = m_creature->SummonCreature(NPC_RISEN_SHADOWCASTER, PosSummonHandler[SummonLoc][0],PosSummonHandler[SummonLoc][1],PosSummonHandler[SummonLoc][2],0, TEMPSUMMON_TIMED_DESPAWN, 120000)) + pAdd2->AI()->AttackStart(m_creature->getVictim()); + if (Creature* pAdd3 = m_creature->SummonCreature(NPC_FETID_TROLL_CORPSE, PosSummonHandler[SummonLoc][0],PosSummonHandler[SummonLoc][1],PosSummonHandler[SummonLoc][2],0, TEMPSUMMON_TIMED_DESPAWN, 120000)) + pAdd3->AI()->AttackStart(m_creature->getVictim()); + if (Creature* pAdd4 = m_creature->SummonCreature(NPC_FETID_TROLL_CORPSE, PosSummonHandler[SummonLoc][0],PosSummonHandler[SummonLoc][1],PosSummonHandler[SummonLoc][2],0, TEMPSUMMON_TIMED_DESPAWN, 120000)) + pAdd4->AI()->AttackStart(m_creature->getVictim()); + Handler_Spawn = 17500; + } + if(Handler_Count == 5) + { + EnterPhase2(); + if (Creature* pTrigger = GetClosestCreatureWithEntry(m_creature, NPC_CRYSTAL_CHANNEL, 85.0f)) + pTrigger->ForcedDespawn(); + } + }else Handler_Spawn -= uiDiff; } }; + + CreatureAI* GetAI_boss_novos(Creature* pCreature) { return new boss_novosAI(pCreature); } +struct MANGOS_DLL_DECL crystal_handlerAI : public ScriptedAI +{ + crystal_handlerAI(Creature* pCreature) : ScriptedAI(pCreature){Reset();} + void Reset(){} + void MoveInLineOfSight(Unit* who) + { + if (Unit* pNovos = GetClosestCreatureWithEntry(m_creature, NPC_NOVOS, 85.0f)) + m_creature->AI()->AttackStart(pNovos->getVictim()); + } + + void JustDied() + { + if (Creature* pDeadTrigger = m_creature->SummonCreature(NPC_TRIGGER_TARGET,0,0,0,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,10000)) + { + if (Unit* pTarget = GetClosestCreatureWithEntry(m_creature, NPC_CRYSTAL_CHANNEL, 85.0f)) + { + pDeadTrigger->CastSpell(pTarget, SPELL_DEAD_EFFECT, true); + } + } + if (Creature* pTrigger = GetClosestCreatureWithEntry(m_creature, NPC_CRYSTAL_CHANNEL, 85.0f)) + pTrigger->ForcedDespawn(); + } +}; + +CreatureAI* GetAI_crystal_handler(Creature* pCreature) +{ + return new crystal_handlerAI(pCreature); +} + +struct MANGOS_DLL_DECL crystal_channelAI : public ScriptedAI +{ + crystal_channelAI(Creature* pCreature) : ScriptedAI(pCreature){Reset();} + uint32 Check_Timer; + void Reset() + { + Check_Timer = 1000; + } + void AttackStart(Unit *pWho){} + void UpdateAI(const uint32 uiDiff) + { + if (Check_Timer < uiDiff) + { + Creature* pNovos = GetClosestCreatureWithEntry(m_creature, NPC_NOVOS, 85.0f); + if (Creature* pTarget = GetClosestCreatureWithEntry(m_creature, NPC_CRYSTAL_CHANNEL_TARGET , 85.0f)) + if (((boss_novosAI*)pNovos->AI())->Phase1 == true) + DoCast(pTarget, SPELL_EFFECT, true); + else + pTarget->ForcedDespawn(); + Check_Timer = 1000; + }else Check_Timer -= uiDiff; + } +}; + +CreatureAI* GetAI_crystal_channel(Creature* pCreature) +{ + return new crystal_channelAI(pCreature); +} + +struct MANGOS_DLL_DECL risen_shadowcasterAI : public ScriptedAI +{ + risen_shadowcasterAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + + uint32 Check_Timer; + void Reset() + { + Check_Timer = 1000; + } + + void UpdateAI(const uint32 uiDiff) + { + if (Check_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_SHADOW_BOLT : H_SPELL_SHADOW_BOLT); + Check_Timer = 1000; + }else Check_Timer -= uiDiff; + } +}; + +CreatureAI* GetAI_risen_shadowcaster(Creature* pCreature) +{ + return new risen_shadowcasterAI(pCreature); +} void AddSC_boss_novos() { Script *newscript; @@ -92,4 +331,20 @@ void AddSC_boss_novos() newscript->Name = "boss_novos"; newscript->GetAI = &GetAI_boss_novos; newscript->RegisterSelf(); -} + + newscript = new Script; + newscript->Name = "crystal_handler"; + newscript->GetAI = &GetAI_crystal_handler; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "crystal_channel"; + newscript->GetAI = &GetAI_crystal_channel; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "risen_shadowcaster"; + newscript->GetAI = &GetAI_risen_shadowcaster; + newscript->RegisterSelf(); + +} \ No newline at end of file diff --git a/scripts/northrend/draktharon_keep/boss_tharonja.cpp b/scripts/northrend/draktharon_keep/boss_tharonja.cpp index ca22ce26c..f64c93c28 100644 --- a/scripts/northrend/draktharon_keep/boss_tharonja.cpp +++ b/scripts/northrend/draktharon_keep/boss_tharonja.cpp @@ -16,12 +16,13 @@ /* ScriptData SDName: Boss_Tharonja -SD%Complete: 20% -SDComment: +SD%Complete: 80% +SDComment: Timers, end event with drakuru SDCategory: Drak'Tharon Keep EndScriptData */ #include "precompiled.h" +#include "draktharon_keep.h" enum { @@ -32,9 +33,53 @@ enum SAY_FLESH_2 = -1600016, SAY_SKELETON_1 = -1600017, SAY_SKELETON_2 = -1600018, - SAY_DEATH = -1600019 + SAY_DEATH = -1600019, + + //Phase 1 (Skeleton) Spells + SPELL_CURSE_OF_LIFE = 49527, + H_SPELL_CURSE_OF_LIFE = 59972, + + SPELL_SHADOW_VOLLEY = 49528, + H_SPELL_SHADOW_VOLLEY = 59973, + SPELL_RAIN_OF_FIRE = 49518, + H_SPELL_RAIN_OF_FIRE = 59971, + + SPELL_DECAY_FLESH = 49356, //not working + + //Phase 2 (Flesh) Spells + SPELL_GIFT_OF_THARONJA = 52509, + + SPELL_LIGHTNING_BREATH = 49537, + H_SPELL_LIGHTNING_BREATH = 59936, + SPELL_EYE_BEAM = 49544, + H_SPELL_EYE_BEAM = 59965, + + SPELL_POISON_CLOUD = 49548, + H_SPELL_POSION_CLOUD = 59969, + + SPELL_RETURN_FLESH = 53463, //not working + + //achie hacks + ACHIEVEMENT_NORMAL = 482, + ACHIEVEMENT_HEROIC = 493 + }; +//Phasses +enum Phase +{ + PHASE_SKELETON = 0, + PHASE_INTOFLESH = 1, + PHASE_FLESH = 2, + PHASE_INTOSKELETON = 3 +}; + +enum PhaseChangeTimer +{ + PHASE_CHANGE_SKELETON = 12000, + PHASE_CHANGE_REAL = 6000, + PHASE_CHANGE_FLESH = 20000 +}; /*###### ## boss_tharonja ######*/ @@ -50,9 +95,20 @@ struct MANGOS_DLL_DECL boss_tharonjaAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsRegularMode; + + uint32 PhaseChangeTimer; + uint32 Phase; + uint32 CurseOfLife_Timer; + uint32 SkeletonSpells_Timer; + uint32 PoisonCloud_Timer; + uint32 FleshSpells_Timer; void Reset() { + PhaseChangeTimer = PHASE_CHANGE_SKELETON; + Phase = PHASE_SKELETON; + SkeletonSpells_Timer = urand (5000, 10000); + CurseOfLife_Timer = urand (5000, 10000); } void Aggro(Unit* pWho) @@ -68,14 +124,113 @@ struct MANGOS_DLL_DECL boss_tharonjaAI : public ScriptedAI void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); - } + + Map* pMap = m_creature->GetMap(); +/* AchievementEntry const *AchieDraktharon = GetAchievementStore()->LookupEntry(m_bIsRegularMode ? ACHIEVEMENT_NORMAL : ACHIEVEMENT_HEROIC); + if(AchieDraktharon && pMap) + { + Map::PlayerList const &lPlayers = pMap->GetPlayers(); + if (!lPlayers.isEmpty()) + { + for(Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr) + { + if (Player* pPlayer = itr->getSource()) + pPlayer->GetAchievementMgr().CompletedAchievement(AchieDraktharon); + } + } + }*/ + } void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + + if (Phase == PHASE_SKELETON) + { + if (CurseOfLife_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_CURSE_OF_LIFE : H_SPELL_CURSE_OF_LIFE); + CurseOfLife_Timer = urand (5000, 10000); + }else CurseOfLife_Timer -= uiDiff; - DoMeleeAttackIfReady(); + if (SkeletonSpells_Timer < uiDiff) + { + switch(urand(0, 1)) + { + case 0: + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_SHADOW_VOLLEY : H_SPELL_SHADOW_VOLLEY); + case 1: + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_RAIN_OF_FIRE : H_SPELL_RAIN_OF_FIRE); + } + SkeletonSpells_Timer = urand (5000, 10000); + }else SkeletonSpells_Timer -= uiDiff; + + if (PhaseChangeTimer < uiDiff) + { + m_creature->CastSpell(m_creature, SPELL_DECAY_FLESH, true); + PhaseChangeTimer = PHASE_CHANGE_REAL; + Phase = PHASE_INTOFLESH; + }else PhaseChangeTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } + + if (Phase == PHASE_INTOFLESH) + { + if (PhaseChangeTimer < uiDiff) + { + m_creature->CastSpell(m_creature, SPELL_GIFT_OF_THARONJA, true); + m_creature->SetDisplayId(27073); + PhaseChangeTimer = PHASE_CHANGE_FLESH; + Phase = PHASE_FLESH; + FleshSpells_Timer = 1500; + PoisonCloud_Timer = 10000; + }else PhaseChangeTimer -= uiDiff; + } + + if (Phase == PHASE_FLESH) + { + if (PhaseChangeTimer < uiDiff) + { + DoCast(m_creature, SPELL_RETURN_FLESH); + PhaseChangeTimer = PHASE_CHANGE_REAL; + Phase = PHASE_INTOSKELETON; + }else PhaseChangeTimer -= uiDiff; + + if (PoisonCloud_Timer < uiDiff) + { + DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), m_bIsRegularMode ? SPELL_POISON_CLOUD : H_SPELL_POSION_CLOUD); + PoisonCloud_Timer = 10000; + }else PoisonCloud_Timer -= uiDiff; + + if (FleshSpells_Timer < uiDiff) + { + switch(urand(0, 3)) + { + case 0: + case 1: + case 2: + DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), m_bIsRegularMode ? SPELL_LIGHTNING_BREATH : H_SPELL_LIGHTNING_BREATH); + case 3: + DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), m_bIsRegularMode ? SPELL_EYE_BEAM : SPELL_EYE_BEAM); + } + FleshSpells_Timer = 1500; + }else FleshSpells_Timer -= uiDiff; + } + + if (Phase == PHASE_INTOSKELETON) + { + if (PhaseChangeTimer < uiDiff) + { + DoCast(m_creature, SPELL_DECAY_FLESH); + m_creature->SetDisplayId(27072); + PhaseChangeTimer = PHASE_CHANGE_SKELETON; + Phase = PHASE_SKELETON; + SkeletonSpells_Timer = urand (5000, 10000); + CurseOfLife_Timer = urand (5000, 10000); + }else PhaseChangeTimer -= uiDiff; + } } }; @@ -92,4 +247,4 @@ void AddSC_boss_tharonja() newscript->Name = "boss_tharonja"; newscript->GetAI = &GetAI_boss_tharonja; newscript->RegisterSelf(); -} +} \ No newline at end of file diff --git a/scripts/northrend/draktharon_keep/boss_trollgore.cpp b/scripts/northrend/draktharon_keep/boss_trollgore.cpp index e65c716fa..c6bc383e7 100644 --- a/scripts/northrend/draktharon_keep/boss_trollgore.cpp +++ b/scripts/northrend/draktharon_keep/boss_trollgore.cpp @@ -16,12 +16,13 @@ /* ScriptData SDName: Boss_Trollgore -SD%Complete: 20% -SDComment: +SD%Complete: 90% +SDComment: Timers SDCategory: Drak'Tharon Keep EndScriptData */ #include "precompiled.h" +#include "draktharon_keep.h" enum { @@ -29,9 +30,29 @@ enum SAY_CONSUME = -1600001, SAY_DEATH = -1600002, SAY_EXPLODE = -1600003, - SAY_KILL = -1600004 + SAY_KILL = -1600004, + + SPELL_CRUSH = 49639, + SPELL_INFECTED_WOUND = 49367, + SPELL_CORPSE_EXPLODE = 49555, + H_SPELL_CORPSE_EXPLODE = 59087, + SPELL_CONSUME = 49380, + H_SPELL_CONSUME = 59803, + SPELL_CONSUME_BUFF = 49381, + H_SPELL_CONSUME_BUFF = 59805, + + SPELL_CORPSE_EXPLODE_PROC = 49618, + H_SPELL_CORPSE_EXPLODE_PROC = 59809, + + NPC_DRAKKARI_INVADER = 27753, + NPC_TROLLGORE = 26630 }; +const float PosSummon1[3] = {-259.59, -652.49, 26.52}; +const float PosSummon2[3] = {-261.60, -658.71, 26.51}; +const float PosSummon3[3] = {-262.05, -665.71, 26.49}; + + /*###### ## boss_trollgore ######*/ @@ -48,8 +69,19 @@ struct MANGOS_DLL_DECL boss_trollgoreAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsRegularMode; + uint32 Consume_Timer; + uint32 Crush_Timer; + uint32 InfectedWound_Timer; + uint32 Wave_Timer; + uint32 CorpseExplode_Timer; + void Reset() { + CorpseExplode_Timer = 10000; + Consume_Timer = 5000; + Crush_Timer = 10000; + InfectedWound_Timer = 30000; + Wave_Timer = 2000; } void Aggro(Unit* pWho) @@ -68,10 +100,77 @@ struct MANGOS_DLL_DECL boss_trollgoreAI : public ScriptedAI DoScriptText(SAY_DEATH, m_creature); } + void SummonWaves() + { + if (Creature* pInvader1 = m_creature->SummonCreature(NPC_DRAKKARI_INVADER,PosSummon1[0],PosSummon1[1],PosSummon1[2],0, TEMPSUMMON_TIMED_DESPAWN, 15000)) + pInvader1->AI()->AttackStart(m_creature); + if (Creature* pInvader2 = m_creature->SummonCreature(NPC_DRAKKARI_INVADER,PosSummon2[0],PosSummon2[1],PosSummon2[2],0, TEMPSUMMON_TIMED_DESPAWN, 15000)) + pInvader2->AI()->AttackStart(m_creature); + if (Creature* pInvader3 = m_creature->SummonCreature(NPC_DRAKKARI_INVADER,PosSummon3[0],PosSummon3[1],PosSummon3[2],0, TEMPSUMMON_TIMED_DESPAWN, 15000)) + pInvader3->AI()->AttackStart(m_creature); + } + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + + // Crush + if (Crush_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_CRUSH); + Crush_Timer = 10000; + }else Crush_Timer -= uiDiff; + + // Infected Wound + if (InfectedWound_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_CRUSH); + InfectedWound_Timer = 30000; + }else InfectedWound_Timer -= uiDiff; + + // Summon npcs + if (Wave_Timer < uiDiff) + { + SummonWaves(); + Wave_Timer = 15000; + }else Wave_Timer -= uiDiff; + + // Consume + if (Consume_Timer < uiDiff) + { + m_creature->CastSpell(m_creature->getVictim(), m_bIsRegularMode ? SPELL_CONSUME : H_SPELL_CONSUME, true); + m_creature->CastSpell(m_creature, m_bIsRegularMode ? SPELL_CONSUME_BUFF : H_SPELL_CONSUME_BUFF, true); + Consume_Timer = 15000; + }else Consume_Timer -= uiDiff; + + //Corpse Explosion + if (CorpseExplode_Timer < uiDiff) + { + //DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_CORPSE_EXPLODE : H_SPELL_CORPSE_EXPLODE); + + if (Creature* pCorpse = GetClosestCreatureWithEntry(m_creature, NPC_DRAKKARI_INVADER, 85.0f)) + { + if (!pCorpse->isAlive()) + { + Map *map = pCorpse->GetMap(); + if (map->IsDungeon()) + { + Map::PlayerList const &PlayerList = map->GetPlayers(); + + if (PlayerList.isEmpty()) + return; + + for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) + { + if (i->getSource()->isAlive() && pCorpse->GetDistance2d(i->getSource()->GetPositionX(), i->getSource()->GetPositionY()) <= 5) + m_creature->DealDamage(i->getSource(), (m_bIsRegularMode ? urand(3770, 4230) : urand(9425, 10575)), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NATURE, NULL, false); + } + } + } + } + CorpseExplode_Timer = 15000; + }else CorpseExplode_Timer -= uiDiff; DoMeleeAttackIfReady(); } @@ -90,4 +189,4 @@ void AddSC_boss_trollgore() newscript->Name = "boss_trollgore"; newscript->GetAI = &GetAI_boss_trollgore; newscript->RegisterSelf(); -} +} \ No newline at end of file diff --git a/scripts/northrend/draktharon_keep/draktharon_keep.h b/scripts/northrend/draktharon_keep/draktharon_keep.h new file mode 100644 index 000000000..583f910da --- /dev/null +++ b/scripts/northrend/draktharon_keep/draktharon_keep.h @@ -0,0 +1,35 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_DRAKTHARON_H +#define DEF_DRAKTHARON_H + +enum +{ + MAX_ENCOUNTER = 5, + + DATA_TROLLGORE = 1, + DATA_NOVOS = 2, + DATA_DRED = 3, + DATA_THARONJA = 4, + + TYPE_CRYSTAL_1 = 5, + TYPE_CRYSTAL_2 = 6, + TYPE_CRYSTAL_3 = 7, + TYPE_CRYSTAL_4 = 8, + TYPE_NOVOS_PHASE2_CHECK = 9, + TYPE_NOVOS_EVENT = 10, + + NPC_CRYSTAL_CHANNEL_TARGET = 26710, + NPC_CRYSTAL_CHANNEL = 26712, + NPC_TRIGGER_TARGET = 26714, + NPC_NOVOS = 26631, + + NPC_CRYSTAL_HANDLER = 26627, + NPC_HULKING_CORPSE = 27597, + NPC_FETID_TROLL_CORPSE = 27598, + NPC_RISEN_SHADOWCASTER = 27600 +}; + +#endif \ No newline at end of file diff --git a/scripts/northrend/violet_hold/boss_cyanigosa.cpp b/scripts/northrend/violet_hold/boss_cyanigosa.cpp index 5edfee165..9e103b84d 100644 --- a/scripts/northrend/violet_hold/boss_cyanigosa.cpp +++ b/scripts/northrend/violet_hold/boss_cyanigosa.cpp @@ -1,169 +1,172 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 - * 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, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* ScriptData -SDName: boss_cyanigosa -SDAuthor: ckegg -SD%Complete: 0 -SDComment: -SDCategory: The Violet Hold -EndScriptData */ - -#include "precompiled.h" -#include "def_violet_hold.h" - -enum -{ - 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, - - SPELL_ARCANE_VACUM = 58694, - SPELL_BLIZZARD = 58693, - SPELL_BLIZZARD_H = 59369, - SPELL_MANA_DESTRUCTION = 59374, - SPELL_TAIL_SWEEP = 58690, - SPELL_TAIL_SWEEP_H = 59283, - SPELL_UNCONTROLLABLE_ENERGY = 58688, - SPELL_UNCONTROLLABLE_ENERGY_H = 59281, - SPELL_CYANIGOSA_TRANSFORM = 58668, -}; - -struct MANGOS_DLL_DECL boss_cyanigosaAI : public ScriptedAI -{ - boss_cyanigosaAI(Creature *pCreature) : ScriptedAI(pCreature) - { - m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); - m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); - Reset(); - } - ScriptedInstance *m_pInstance; - - bool m_bIsRegularMode; - - uint32 m_uiTailSweep_Timer; - uint32 m_uiManaDestruction_Timer; - uint32 m_uiBlizzard_Timer; - uint32 m_uiUncontrollableEnergy_Timer; - uint32 m_uiArcaneVacuum_Timer; - - void Reset() - { - m_uiUncontrollableEnergy_Timer = urand(15000, 16000); - m_uiManaDestruction_Timer = urand(5000, 6000); - m_uiBlizzard_Timer = urand(20000, 25000); - m_uiTailSweep_Timer = urand(10000, 11000); - m_uiArcaneVacuum_Timer = urand(28000, 33000); - } - - void Aggro(Unit* pWho) - { - DoScriptText(SAY_AGGRO, m_creature); - DoCast(m_creature, SPELL_CYANIGOSA_TRANSFORM); - } - - void UpdateAI(const uint32 uiDiff) - { - //Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (m_uiUncontrollableEnergy_Timer < uiDiff) - { - DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_UNCONTROLLABLE_ENERGY_H : SPELL_UNCONTROLLABLE_ENERGY); - m_uiUncontrollableEnergy_Timer = urand(15000, 16000); - } - else - m_uiUncontrollableEnergy_Timer -= uiDiff; - - if (m_uiManaDestruction_Timer < uiDiff) - { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, SPELL_MANA_DESTRUCTION); - m_uiManaDestruction_Timer = urand(8000, 13000); - } - else - m_uiManaDestruction_Timer -= uiDiff; - - if (m_uiBlizzard_Timer < uiDiff) - { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, m_bIsRegularMode ? SPELL_BLIZZARD_H : SPELL_BLIZZARD); - m_uiBlizzard_Timer = urand(20000, 25000); - } - else - m_uiBlizzard_Timer -= uiDiff; - - if (m_uiArcaneVacuum_Timer < uiDiff) - { - DoCast(m_creature, SPELL_ARCANE_VACUM); - DoResetThreat(); - m_uiArcaneVacuum_Timer = urand(28000, 33000); - } - else - m_uiArcaneVacuum_Timer -= uiDiff; - - if (m_uiTailSweep_Timer < uiDiff) - { - DoCast(m_creature, m_bIsRegularMode ? SPELL_TAIL_SWEEP_H : SPELL_TAIL_SWEEP); - m_uiTailSweep_Timer = urand(10000, 11000); - } - else - m_uiTailSweep_Timer -= uiDiff; - - DoMeleeAttackIfReady(); - } - - void JustDied(Unit* pKiller) - { - DoScriptText(SAY_DEATH, m_creature); - - if (m_pInstance) - m_pInstance->SetData(TYPE_RIFT, DONE); - } - - void KilledUnit(Unit* pVictim) - { - switch(urand(0, 2)) - { - case 0: DoScriptText(SAY_SLAY_1, m_creature);break; - case 1: DoScriptText(SAY_SLAY_2, m_creature);break; - case 2: DoScriptText(SAY_SLAY_3, m_creature);break; - } - } -}; - -CreatureAI* GetAI_boss_cyanigosa(Creature* pCreature) -{ - return new boss_cyanigosaAI (pCreature); -} - -void AddSC_boss_cyanigosa() -{ - Script *newscript; - - newscript = new Script; - newscript->Name = "boss_cyanigosa"; - newscript->GetAI = &GetAI_boss_cyanigosa; - newscript->RegisterSelf(); -} +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_cyanigosa +SDAuthor: ckegg +SD%Complete: 0 +SDComment: +SDCategory: The Violet Hold +EndScriptData */ + +#include "precompiled.h" +#include "def_violet_hold.h" + +enum +{ + 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, + + SPELL_ARCANE_VACUM = 58694, + SPELL_BLIZZARD = 58693, + SPELL_BLIZZARD_H = 59369, + SPELL_MANA_DESTRUCTION = 59374, + SPELL_TAIL_SWEEP = 58690, + SPELL_TAIL_SWEEP_H = 59283, + SPELL_UNCONTROLLABLE_ENERGY = 58688, + SPELL_UNCONTROLLABLE_ENERGY_H = 59281, + SPELL_CYANIGOSA_TRANSFORM = 58668, +}; + +struct MANGOS_DLL_DECL boss_cyanigosaAI : public ScriptedAI +{ + boss_cyanigosaAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + ScriptedInstance *m_pInstance; + + bool m_bIsRegularMode; + + uint32 m_uiTailSweep_Timer; + uint32 m_uiManaDestruction_Timer; + uint32 m_uiBlizzard_Timer; + uint32 m_uiUncontrollableEnergy_Timer; + uint32 m_uiArcaneVacuum_Timer; + + void Reset() + { + m_uiUncontrollableEnergy_Timer = urand(15000, 16000); + m_uiManaDestruction_Timer = urand(5000, 6000); + m_uiBlizzard_Timer = urand(20000, 25000); + m_uiTailSweep_Timer = urand(10000, 11000); + m_uiArcaneVacuum_Timer = urand(28000, 33000); + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + DoCast(m_creature, SPELL_CYANIGOSA_TRANSFORM); + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiUncontrollableEnergy_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_UNCONTROLLABLE_ENERGY_H : SPELL_UNCONTROLLABLE_ENERGY); + m_uiUncontrollableEnergy_Timer = urand(15000, 16000); + } + else + m_uiUncontrollableEnergy_Timer -= uiDiff; + + if (m_uiManaDestruction_Timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, SPELL_MANA_DESTRUCTION); + m_uiManaDestruction_Timer = urand(8000, 13000); + } + else + m_uiManaDestruction_Timer -= uiDiff; + + if (m_uiBlizzard_Timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, m_bIsRegularMode ? SPELL_BLIZZARD_H : SPELL_BLIZZARD); + m_uiBlizzard_Timer = urand(20000, 25000); + } + else + m_uiBlizzard_Timer -= uiDiff; + + if (m_uiArcaneVacuum_Timer < uiDiff) + { + DoCast(m_creature, SPELL_ARCANE_VACUM); + DoResetThreat(); + m_uiArcaneVacuum_Timer = urand(28000, 33000); + } + else + m_uiArcaneVacuum_Timer -= uiDiff; + + if (m_uiTailSweep_Timer < uiDiff) + { + DoCast(m_creature, m_bIsRegularMode ? SPELL_TAIL_SWEEP_H : SPELL_TAIL_SWEEP); + m_uiTailSweep_Timer = urand(10000, 11000); + } + else + m_uiTailSweep_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + { + m_pInstance->SetData(TYPE_RIFT, DONE); + m_pInstance->SetData(TYPE_EVENT, DONE); + } + } + + void KilledUnit(Unit* pVictim) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_SLAY_1, m_creature);break; + case 1: DoScriptText(SAY_SLAY_2, m_creature);break; + case 2: DoScriptText(SAY_SLAY_3, m_creature);break; + } + } +}; + +CreatureAI* GetAI_boss_cyanigosa(Creature* pCreature) +{ + return new boss_cyanigosaAI (pCreature); +} + +void AddSC_boss_cyanigosa() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_cyanigosa"; + newscript->GetAI = &GetAI_boss_cyanigosa; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/violet_hold/boss_erekem.cpp b/scripts/northrend/violet_hold/boss_erekem.cpp index 2e89efb62..4103941dc 100644 --- a/scripts/northrend/violet_hold/boss_erekem.cpp +++ b/scripts/northrend/violet_hold/boss_erekem.cpp @@ -1,325 +1,325 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 - * 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, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* ScriptData -SDName: boss_erekem -SDAuthor: ckegg -SD%Complete: 0 -SDComment: -SDCategory: The Violet Hold -EndScriptData */ - -#include "precompiled.h" -#include "def_violet_hold.h" - -enum -{ - SAY_AGGRO = -1608010, - SAY_SLAY_1 = -1608011, - SAY_SLAY_2 = -1608012, - SAY_SLAY_3 = -1608013, - SAY_DEATH = -1608014, - SAY_SPAWN = -1608015, - SAY_ADD_KILED = -1608016, - SAY_BOTH_ADDS_KILED = -1608017, - - SPELL_BLOODLUST = 54516, - SPELL_BREAK_BONDS = 59463, - SPELL_CHAIN_HEAL = 54481, - SPELL_CHAIN_HEAL_H = 59473, - SPELL_EARTH_SHIELD = 54479, - SPELL_EARTH_SHIELD_H = 59471, - SPELL_EARTH_SHOCK = 54511, - SPELL_LIGHTNING_BOLT = 53044, - SPELL_STORMSTRIKE = 51876, - - SPELL_GUSHING_WOUND = 39215, - SPELL_HOWLING_SCREECH = 54462, - SPELL_STRIKE = 14516, -}; - -struct MANGOS_DLL_DECL boss_erekemAI : public ScriptedAI -{ - boss_erekemAI(Creature *pCreature) : ScriptedAI(pCreature) - { - m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); - m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); - Reset(); - } - ScriptedInstance *m_pInstance; - - bool m_bIsRegularMode; - bool m_bIsAddDead; - - uint32 m_uiBloodlust_Timer; - uint32 m_uiBreakBonds_Timer; - uint32 m_uiChainHeal_Timer; - uint32 m_uiEarthShield_Timer; - uint32 m_uiEarthShock_Timer; - uint32 m_uiLightningBolt_Timer; - uint32 m_uiStormstrike_Timer; - - void Reset() - { - m_bIsAddDead = false; - m_uiLightningBolt_Timer = 2000; - m_uiEarthShield_Timer = urand(15000, 20000); - m_uiEarthShock_Timer = urand(12000, 17000); - m_uiChainHeal_Timer = urand(5000, 25000); - m_uiBreakBonds_Timer = urand(25000, 30000); - m_uiBloodlust_Timer = urand(60000, 65000); - m_uiStormstrike_Timer = urand(1000, 2000); - - std::list lUnitList; - GetCreatureListWithEntryInGrid(lUnitList, m_creature, NPC_EREKEM_GUARD, 100.0f); - if (!lUnitList.empty()) - for(std::list::iterator iter = lUnitList.begin(); iter != lUnitList.end(); ++iter) - if ((*iter)) - if ((*iter)->isDead()) - (*iter)->Respawn(); - - if (m_pInstance) - m_pInstance->SetData(TYPE_EREKEM, NOT_STARTED); - } - - void Aggro(Unit* pWho) - { - DoScriptText(SAY_AGGRO, m_creature); - - if (m_pInstance) - m_pInstance->SetData(TYPE_EREKEM, IN_PROGRESS); - } - - void AttackStart(Unit* pWho) - { - if (!m_pInstance) - return; - - if (m_pInstance->GetData(TYPE_EREKEM) != SPECIAL) - return; - - if (!pWho || pWho == m_creature) - return; - - if (m_creature->Attack(pWho, true)) - { - m_creature->AddThreat(pWho, 0.0f); - m_creature->SetInCombatWith(pWho); - pWho->SetInCombatWith(m_creature); - DoStartMovement(pWho); - - std::list lUnitList; - GetCreatureListWithEntryInGrid(lUnitList, m_creature, NPC_EREKEM_GUARD, 100.0f); - if (!lUnitList.empty()) - for(std::list::iterator iter = lUnitList.begin(); iter != lUnitList.end(); ++iter) - if (*iter) - if ((*iter)->isAlive()) - { - (*iter)->AddThreat(pWho, 0.0f); - (*iter)->AI()->AttackStart(pWho); - } - } - } - - void UpdateAI(const uint32 uiDiff) - { - //Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (m_uiEarthShield_Timer < uiDiff) - { - m_creature->InterruptNonMeleeSpells(false); - DoCast(m_creature, m_bIsRegularMode ? SPELL_EARTH_SHIELD_H : SPELL_EARTH_SHIELD); - m_uiEarthShield_Timer = urand(15000, 20000); - } - else m_uiEarthShield_Timer -= uiDiff; - - if (m_uiEarthShock_Timer < uiDiff) - { - m_creature->InterruptNonMeleeSpells(false); - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, SPELL_EARTH_SHOCK); - m_uiEarthShock_Timer = urand(12000, 17000); - } - else m_uiEarthShock_Timer -= uiDiff; - - if (m_uiChainHeal_Timer < uiDiff) - { - //m_creature->InterruptNonMeleeSpells(false); - DoCast(m_creature, m_bIsRegularMode ? SPELL_CHAIN_HEAL_H : SPELL_CHAIN_HEAL); - m_uiChainHeal_Timer = urand(5000, 25000); - } - else m_uiChainHeal_Timer -= uiDiff; - - if (m_uiBreakBonds_Timer < uiDiff) - { - m_creature->InterruptNonMeleeSpells(false); - DoCast(m_creature, SPELL_BREAK_BONDS); - m_uiBreakBonds_Timer = urand(25000, 30000); - } - else m_uiBreakBonds_Timer -= uiDiff; - - if (!m_bIsAddDead) - { - if (m_uiLightningBolt_Timer < uiDiff) - { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, SPELL_LIGHTNING_BOLT); - m_uiLightningBolt_Timer = 2000; - } - else m_uiLightningBolt_Timer -= uiDiff; - } - else - { - if (m_uiStormstrike_Timer < uiDiff) - { - DoCast(m_creature->getVictim(), SPELL_STORMSTRIKE); - m_uiStormstrike_Timer = 1000; - } - else m_uiStormstrike_Timer -= uiDiff; - - DoMeleeAttackIfReady(); - } - } - - void JustDied(Unit* pKiller) - { - DoScriptText(SAY_DEATH, m_creature); - - if (m_pInstance) - m_pInstance->SetData(TYPE_EREKEM, DONE); - } - - void KilledUnit(Unit* pVictim) - { - switch(urand(0, 2)) - { - case 0: DoScriptText(SAY_SLAY_1, m_creature);break; - case 1: DoScriptText(SAY_SLAY_2, m_creature);break; - case 2: DoScriptText(SAY_SLAY_3, m_creature);break; - } - } -}; - -struct MANGOS_DLL_DECL mob_erekem_guardAI : public ScriptedAI -{ - mob_erekem_guardAI(Creature *pCreature) : ScriptedAI(pCreature) - { - m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); - Reset(); - } - ScriptedInstance *m_pInstance; - - uint32 m_uiGushingWound_Timer; - uint32 m_uiHowlingScreech_Timer; - uint32 m_uiStrike_Timer; - - void Reset() - { - m_uiGushingWound_Timer = urand(5000, 10000); - m_uiHowlingScreech_Timer = urand(12000, 15000); - m_uiStrike_Timer = urand(10000, 11000); - } - - void AttackStart(Unit* pWho) - { - if (!m_pInstance) - return; - - if (m_pInstance->GetData(TYPE_EREKEM) != SPECIAL) - return; - - if (!pWho || pWho == m_creature) - return; - - if (m_creature->Attack(pWho, true)) - { - m_creature->AddThreat(pWho, 0.0f); - m_creature->SetInCombatWith(pWho); - pWho->SetInCombatWith(m_creature); - DoStartMovement(pWho); - } - } - - void UpdateAI(const uint32 uiDiff) - { - //Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (m_uiGushingWound_Timer < uiDiff) - { - DoCast(m_creature->getVictim(), SPELL_GUSHING_WOUND); - m_uiGushingWound_Timer = urand(30000, 32000); - } - else m_uiGushingWound_Timer -= uiDiff; - - if (m_uiHowlingScreech_Timer < uiDiff) - { - DoCast(m_creature, SPELL_HOWLING_SCREECH); - m_uiHowlingScreech_Timer = urand(24000, 30000); - } - else m_uiHowlingScreech_Timer -= uiDiff; - - if (m_uiStrike_Timer < uiDiff) - { - DoCast(m_creature->getVictim(), SPELL_STRIKE); - m_uiStrike_Timer = urand(15000, 16000); - } - else m_uiStrike_Timer -= uiDiff; - - DoMeleeAttackIfReady(); - } - - void JustDied(Unit* pKiller) - { - if (m_pInstance) - if (Creature* pErekem = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_EREKEM)))) - if (pErekem->isAlive()) - { - DoScriptText(SAY_ADD_KILED, pErekem); - pErekem->InterruptNonMeleeSpells(false); - pErekem->CastSpell(pErekem, SPELL_BLOODLUST, false); - ((boss_erekemAI*)pErekem->AI())->m_bIsAddDead = true; - } - } -}; - -CreatureAI* GetAI_boss_erekem(Creature* pCreature) -{ - return new boss_erekemAI (pCreature); -} - -CreatureAI* GetAI_mob_erekem_guard(Creature* pCreature) -{ - return new mob_erekem_guardAI (pCreature); -} - -void AddSC_boss_erekem() -{ - Script *newscript; - - newscript = new Script; - newscript->Name = "boss_erekem"; - newscript->GetAI = &GetAI_boss_erekem; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_erekem_guard"; - newscript->GetAI = &GetAI_mob_erekem_guard; - newscript->RegisterSelf(); -} \ No newline at end of file +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_erekem +SDAuthor: ckegg +SD%Complete: 0 +SDComment: +SDCategory: The Violet Hold +EndScriptData */ + +#include "precompiled.h" +#include "def_violet_hold.h" + +enum +{ + SAY_AGGRO = -1608010, + SAY_SLAY_1 = -1608011, + SAY_SLAY_2 = -1608012, + SAY_SLAY_3 = -1608013, + SAY_DEATH = -1608014, + SAY_SPAWN = -1608015, + SAY_ADD_KILED = -1608016, + SAY_BOTH_ADDS_KILED = -1608017, + + SPELL_BLOODLUST = 54516, + SPELL_BREAK_BONDS = 59463, + SPELL_CHAIN_HEAL = 54481, + SPELL_CHAIN_HEAL_H = 59473, + SPELL_EARTH_SHIELD = 54479, + SPELL_EARTH_SHIELD_H = 59471, + SPELL_EARTH_SHOCK = 54511, + SPELL_LIGHTNING_BOLT = 53044, + SPELL_STORMSTRIKE = 51876, + + SPELL_GUSHING_WOUND = 39215, + SPELL_HOWLING_SCREECH = 54462, + SPELL_STRIKE = 14516, +}; + +struct MANGOS_DLL_DECL boss_erekemAI : public ScriptedAI +{ + boss_erekemAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + ScriptedInstance *m_pInstance; + + bool m_bIsRegularMode; + bool m_bIsAddDead; + + uint32 m_uiBloodlust_Timer; + uint32 m_uiBreakBonds_Timer; + uint32 m_uiChainHeal_Timer; + uint32 m_uiEarthShield_Timer; + uint32 m_uiEarthShock_Timer; + uint32 m_uiLightningBolt_Timer; + uint32 m_uiStormstrike_Timer; + + void Reset() + { + m_bIsAddDead = false; + m_uiLightningBolt_Timer = 2000; + m_uiEarthShield_Timer = urand(15000, 20000); + m_uiEarthShock_Timer = urand(12000, 17000); + m_uiChainHeal_Timer = urand(5000, 25000); + m_uiBreakBonds_Timer = urand(25000, 30000); + m_uiBloodlust_Timer = urand(60000, 65000); + m_uiStormstrike_Timer = urand(1000, 2000); + + std::list lUnitList; + GetCreatureListWithEntryInGrid(lUnitList, m_creature, NPC_EREKEM_GUARD, 100.0f); + if (!lUnitList.empty()) + for(std::list::iterator iter = lUnitList.begin(); iter != lUnitList.end(); ++iter) + if ((*iter)) + if ((*iter)->isDead()) + (*iter)->Respawn(); + + if (m_pInstance) + m_pInstance->SetData(TYPE_EREKEM, NOT_STARTED); + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_EREKEM, IN_PROGRESS); + } + + void AttackStart(Unit* pWho) + { + if (!m_pInstance) + return; + + if (m_pInstance->GetData(TYPE_EREKEM) != SPECIAL) + return; + + if (!pWho || pWho == m_creature) + return; + + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho, 0.0f); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + DoStartMovement(pWho); + + std::list lUnitList; + GetCreatureListWithEntryInGrid(lUnitList, m_creature, NPC_EREKEM_GUARD, 100.0f); + if (!lUnitList.empty()) + for(std::list::iterator iter = lUnitList.begin(); iter != lUnitList.end(); ++iter) + if (*iter) + if ((*iter)->isAlive()) + { + (*iter)->AddThreat(pWho, 0.0f); + (*iter)->AI()->AttackStart(pWho); + } + } + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiEarthShield_Timer < uiDiff) + { + m_creature->InterruptNonMeleeSpells(false); + DoCast(m_creature, m_bIsRegularMode ? SPELL_EARTH_SHIELD_H : SPELL_EARTH_SHIELD); + m_uiEarthShield_Timer = urand(15000, 20000); + } + else m_uiEarthShield_Timer -= uiDiff; + + if (m_uiEarthShock_Timer < uiDiff) + { + m_creature->InterruptNonMeleeSpells(false); + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, SPELL_EARTH_SHOCK); + m_uiEarthShock_Timer = urand(12000, 17000); + } + else m_uiEarthShock_Timer -= uiDiff; + + if (m_uiChainHeal_Timer < uiDiff) + { + //m_creature->InterruptNonMeleeSpells(false); + DoCast(m_creature, m_bIsRegularMode ? SPELL_CHAIN_HEAL_H : SPELL_CHAIN_HEAL); + m_uiChainHeal_Timer = urand(5000, 25000); + } + else m_uiChainHeal_Timer -= uiDiff; + + if (m_uiBreakBonds_Timer < uiDiff) + { + m_creature->InterruptNonMeleeSpells(false); + DoCast(m_creature, SPELL_BREAK_BONDS); + m_uiBreakBonds_Timer = urand(25000, 30000); + } + else m_uiBreakBonds_Timer -= uiDiff; + + if (!m_bIsAddDead) + { + if (m_uiLightningBolt_Timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, SPELL_LIGHTNING_BOLT); + m_uiLightningBolt_Timer = 2000; + } + else m_uiLightningBolt_Timer -= uiDiff; + } + else + { + if (m_uiStormstrike_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_STORMSTRIKE); + m_uiStormstrike_Timer = 1000; + } + else m_uiStormstrike_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_EREKEM, DONE); + } + + void KilledUnit(Unit* pVictim) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_SLAY_1, m_creature);break; + case 1: DoScriptText(SAY_SLAY_2, m_creature);break; + case 2: DoScriptText(SAY_SLAY_3, m_creature);break; + } + } +}; + +struct MANGOS_DLL_DECL mob_erekem_guardAI : public ScriptedAI +{ + mob_erekem_guardAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + Reset(); + } + ScriptedInstance *m_pInstance; + + uint32 m_uiGushingWound_Timer; + uint32 m_uiHowlingScreech_Timer; + uint32 m_uiStrike_Timer; + + void Reset() + { + m_uiGushingWound_Timer = urand(5000, 10000); + m_uiHowlingScreech_Timer = urand(12000, 15000); + m_uiStrike_Timer = urand(10000, 11000); + } + + void AttackStart(Unit* pWho) + { + if (!m_pInstance) + return; + + if (m_pInstance->GetData(TYPE_EREKEM) != SPECIAL) + return; + + if (!pWho || pWho == m_creature) + return; + + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho, 0.0f); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + DoStartMovement(pWho); + } + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiGushingWound_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_GUSHING_WOUND); + m_uiGushingWound_Timer = urand(30000, 32000); + } + else m_uiGushingWound_Timer -= uiDiff; + + if (m_uiHowlingScreech_Timer < uiDiff) + { + DoCast(m_creature, SPELL_HOWLING_SCREECH); + m_uiHowlingScreech_Timer = urand(24000, 30000); + } + else m_uiHowlingScreech_Timer -= uiDiff; + + if (m_uiStrike_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_STRIKE); + m_uiStrike_Timer = urand(15000, 16000); + } + else m_uiStrike_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } + + void JustDied(Unit* pKiller) + { + if (m_pInstance) + if (Creature* pErekem = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_EREKEM)))) + if (pErekem->isAlive()) + { + DoScriptText(SAY_ADD_KILED, pErekem); + pErekem->InterruptNonMeleeSpells(false); + pErekem->CastSpell(pErekem, SPELL_BLOODLUST, false); + ((boss_erekemAI*)pErekem->AI())->m_bIsAddDead = true; + } + } +}; + +CreatureAI* GetAI_boss_erekem(Creature* pCreature) +{ + return new boss_erekemAI (pCreature); +} + +CreatureAI* GetAI_mob_erekem_guard(Creature* pCreature) +{ + return new mob_erekem_guardAI (pCreature); +} + +void AddSC_boss_erekem() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_erekem"; + newscript->GetAI = &GetAI_boss_erekem; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_erekem_guard"; + newscript->GetAI = &GetAI_mob_erekem_guard; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/violet_hold/boss_ichoron.cpp b/scripts/northrend/violet_hold/boss_ichoron.cpp index 6085dca42..cd27bcacb 100644 --- a/scripts/northrend/violet_hold/boss_ichoron.cpp +++ b/scripts/northrend/violet_hold/boss_ichoron.cpp @@ -1,335 +1,335 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 - * 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, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* ScriptData -SDName: boss_ichoron -SDAuthor: ckegg -SD%Complete: 0 -SDComment: -SDCategory: The Violet Hold -EndScriptData */ - -#include "precompiled.h" -#include "def_violet_hold.h" - - -struct Locations -{ - float x, y, z; - uint32 id; -}; - -static Locations PortalLoc[]= -{ - {1857.125, 763.295, 38.654}, - {1925.480, 849.981, 47.174}, - {1892.737, 744.589, 47.666}, - {1878.198, 850.005, 43.333}, - {1909.381, 806.796, 38.645}, - {1936.101, 802.950, 52.417}, -}; - -enum -{ - 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, - - SPELL_DRAINED = 59820, - SPELL_FRENZY = 54312, - SPELL_FRENZY_H = 59522, - SPELL_PROTECTIVE_BUBBLE = 54306, - SPELL_WATER_BLAST = 54237, - SPELL_WATER_BLAST_H = 59520, - SPELL_WATER_BOLT_VOLLEY = 54241, - SPELL_WATER_BOLT_VOLLEY_H = 59521, - - NPC_ICHOR_GLOBULE = 29321, - SPELL_SPLASH = 59516, -}; - -struct MANGOS_DLL_DECL boss_ichoronAI : public ScriptedAI -{ - boss_ichoronAI(Creature *pCreature) : ScriptedAI(pCreature) - { - m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); - m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); - Reset(); - } - ScriptedInstance *m_pInstance; - std::list m_lWaterElementsGUIDList; - - bool m_bIsRegularMode; - bool m_bIsExploded; - bool m_bIsFrenzy; - - uint32 m_uiBuubleChecker_Timer; - uint32 m_uiWaterBoltVolley_Timer; - uint32 m_uiShowup_Counter; - - void Reset() - { - m_bIsExploded = false; - m_bIsFrenzy = false; - m_uiBuubleChecker_Timer = 1000; - m_uiWaterBoltVolley_Timer = urand(10000, 15000); - m_uiShowup_Counter = 0; - - m_creature->SetVisibility(VISIBILITY_ON); - DespawnWaterElements(); - - if (m_pInstance) - m_pInstance->SetData(TYPE_ICHORON, NOT_STARTED); - } - - void Aggro(Unit* pWho) - { - DoScriptText(SAY_AGGRO, m_creature); - - if (m_pInstance) - m_pInstance->SetData(TYPE_ICHORON, IN_PROGRESS); - } - - void AttackStart(Unit* pWho) - { - if (!m_pInstance) - return; - - if (m_pInstance->GetData(TYPE_ICHORON) != SPECIAL) - return; - - if (!pWho || pWho == m_creature) - return; - - if (m_creature->Attack(pWho, true)) - { - DoCast(m_creature, SPELL_PROTECTIVE_BUBBLE); - m_creature->AddThreat(pWho); - m_creature->SetInCombatWith(pWho); - pWho->SetInCombatWith(m_creature); - DoStartMovement(pWho); - } - } - - void WaterElementHit() - { - m_creature->SetHealth(m_creature->GetHealth() + m_creature->GetMaxHealth() * 0.01); - if (m_bIsExploded) - { - DoCast(m_creature, SPELL_PROTECTIVE_BUBBLE); - m_bIsExploded = false; - m_creature->SetVisibility(VISIBILITY_ON); - m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); - } - } - - void JustSummoned(Creature* pSummoned) - { - pSummoned->SetSpeed(MOVE_RUN, 0.2f); - pSummoned->GetMotionMaster()->MoveFollow(m_creature, 0, 0); - m_lWaterElementsGUIDList.push_back(pSummoned->GetGUID()); - } - - void DespawnWaterElements() - { - if (m_lWaterElementsGUIDList.empty()) - return; - - for(std::list::iterator itr = m_lWaterElementsGUIDList.begin(); itr != m_lWaterElementsGUIDList.end(); ++itr) - { - if (Creature* pTemp = (Creature*)Unit::GetUnit(*m_creature, *itr)) - { - if (pTemp->isAlive()) - //pTemp->ForcedDespawn(); - pTemp->DealDamage(pTemp, pTemp->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - } - } - - m_lWaterElementsGUIDList.clear(); - } - - void UpdateAI(const uint32 uiDiff) - { - //Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (!m_bIsFrenzy) - { - if (m_uiBuubleChecker_Timer < uiDiff) - { - if (!m_bIsExploded) - { - if (!m_creature->HasAura(SPELL_PROTECTIVE_BUBBLE, 0)) - { - DoCast(m_creature, m_bIsRegularMode ? SPELL_WATER_BLAST_H : SPELL_WATER_BLAST); - //DoCast(m_creature, SPELL_DRAINED); - m_bIsExploded = true; - m_uiShowup_Counter = 0; - m_creature->AttackStop(); - m_creature->SetVisibility(VISIBILITY_OFF); - for(uint8 i = 0; i < 10; i++) - { - //int tmp = urand(0, 5); - //m_creature->SummonCreature(NPC_ICHOR_GLOBULE, PortalLoc[tmp].x, PortalLoc[tmp].y, PortalLoc[tmp].z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); - m_creature->SummonCreature(NPC_ICHOR_GLOBULE, m_creature->GetPositionX()-10+rand()%20, m_creature->GetPositionY()-10+rand()%20, m_creature->GetPositionZ(), 0, TEMPSUMMON_CORPSE_DESPAWN, 0); - } - } - m_uiBuubleChecker_Timer = 3000; - } - else - { - bool bIsWaterElementsAlive = false; - ++m_uiShowup_Counter; - if (!m_lWaterElementsGUIDList.empty()) - { - for(std::list::iterator itr = m_lWaterElementsGUIDList.begin(); itr != m_lWaterElementsGUIDList.end(); ++itr) - if (Creature* pTemp = (Creature*)Unit::GetUnit(*m_creature, *itr)) - if (pTemp->isAlive()) - bIsWaterElementsAlive = true; - } - if (!bIsWaterElementsAlive || m_uiShowup_Counter > 20) - { - DoCast(m_creature, SPELL_PROTECTIVE_BUBBLE); - m_bIsExploded = false; - m_uiShowup_Counter = 0; - m_creature->SetVisibility(VISIBILITY_ON); - m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); - } - m_uiBuubleChecker_Timer = 1000; - } - } - else m_uiBuubleChecker_Timer -= uiDiff; - } - - if (!m_bIsExploded) - { - if (m_uiWaterBoltVolley_Timer < uiDiff) - { - DoCast(m_creature, m_bIsRegularMode ? SPELL_WATER_BOLT_VOLLEY_H : SPELL_WATER_BOLT_VOLLEY); - m_uiWaterBoltVolley_Timer = urand(10000, 15000); - } - else m_uiWaterBoltVolley_Timer -= uiDiff; - - if (!m_bIsFrenzy && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 25) - { - DoCast(m_creature, m_bIsRegularMode ? SPELL_FRENZY_H : SPELL_FRENZY); - m_bIsFrenzy = true; - } - - DoMeleeAttackIfReady(); - } - } - - void JustDied(Unit* pKiller) - { - DoScriptText(SAY_DEATH, m_creature); - DespawnWaterElements(); - - if (m_pInstance) - m_pInstance->SetData(TYPE_ICHORON, DONE); - } - - void KilledUnit(Unit* pVictim) - { - switch(urand(0, 2)) - { - case 0: DoScriptText(SAY_SLAY_1, m_creature);break; - case 1: DoScriptText(SAY_SLAY_2, m_creature);break; - case 2: DoScriptText(SAY_SLAY_3, m_creature);break; - } - } -}; - - -struct MANGOS_DLL_DECL mob_ichor_globuleAI : public ScriptedAI -{ - mob_ichor_globuleAI(Creature *pCreature) : ScriptedAI(pCreature) - { - m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); - Reset(); - } - ScriptedInstance *m_pInstance; - - uint32 m_uiRangeCheck_Timer; - - void Reset() - { - m_uiRangeCheck_Timer = 1000; - } - - void AttackStart(Unit* pWho) - { - return; - } - - void UpdateAI(const uint32 uiDiff) - { - if (m_uiRangeCheck_Timer < uiDiff) - { - if (m_pInstance) - { - if (Creature* pIchoron = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_ICHORON)))) - { - float fDistance = m_creature->GetDistance2d(pIchoron); - if (fDistance <= 2) - { - ((boss_ichoronAI*)pIchoron->AI())->WaterElementHit(); - m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - } - } - } - m_uiRangeCheck_Timer = 1000; - } - else m_uiRangeCheck_Timer -= uiDiff; - } - - void JustDied(Unit* pKiller) - { - DoCast(m_creature, SPELL_SPLASH); - } -}; - -CreatureAI* GetAI_boss_ichoron(Creature* pCreature) -{ - return new boss_ichoronAI (pCreature); -} - -CreatureAI* GetAI_mob_ichor_globule(Creature* pCreature) -{ - return new mob_ichor_globuleAI (pCreature); -} - -void AddSC_boss_ichoron() -{ - Script *newscript; - - newscript = new Script; - newscript->Name = "boss_ichoron"; - newscript->GetAI = &GetAI_boss_ichoron; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_ichor_globule"; - newscript->GetAI = &GetAI_mob_ichor_globule; - newscript->RegisterSelf(); -} +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_ichoron +SDAuthor: ckegg +SD%Complete: 0 +SDComment: +SDCategory: The Violet Hold +EndScriptData */ + +#include "precompiled.h" +#include "def_violet_hold.h" + + +struct Locations +{ + float x, y, z; + uint32 id; +}; + +static Locations PortalLoc[]= +{ + {1857.125, 763.295, 38.654}, + {1925.480, 849.981, 47.174}, + {1892.737, 744.589, 47.666}, + {1878.198, 850.005, 43.333}, + {1909.381, 806.796, 38.645}, + {1936.101, 802.950, 52.417}, +}; + +enum +{ + 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, + + SPELL_DRAINED = 59820, + SPELL_FRENZY = 54312, + SPELL_FRENZY_H = 59522, + SPELL_PROTECTIVE_BUBBLE = 54306, + SPELL_WATER_BLAST = 54237, + SPELL_WATER_BLAST_H = 59520, + SPELL_WATER_BOLT_VOLLEY = 54241, + SPELL_WATER_BOLT_VOLLEY_H = 59521, + + NPC_ICHOR_GLOBULE = 29321, + SPELL_SPLASH = 59516, +}; + +struct MANGOS_DLL_DECL boss_ichoronAI : public ScriptedAI +{ + boss_ichoronAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + ScriptedInstance *m_pInstance; + std::list m_lWaterElementsGUIDList; + + bool m_bIsRegularMode; + bool m_bIsExploded; + bool m_bIsFrenzy; + + uint32 m_uiBuubleChecker_Timer; + uint32 m_uiWaterBoltVolley_Timer; + uint32 m_uiShowup_Counter; + + void Reset() + { + m_bIsExploded = false; + m_bIsFrenzy = false; + m_uiBuubleChecker_Timer = 1000; + m_uiWaterBoltVolley_Timer = urand(10000, 15000); + m_uiShowup_Counter = 0; + + m_creature->SetVisibility(VISIBILITY_ON); + DespawnWaterElements(); + + if (m_pInstance) + m_pInstance->SetData(TYPE_ICHORON, NOT_STARTED); + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_ICHORON, IN_PROGRESS); + } + + void AttackStart(Unit* pWho) + { + if (!m_pInstance) + return; + + if (m_pInstance->GetData(TYPE_ICHORON) != SPECIAL) + return; + + if (!pWho || pWho == m_creature) + return; + + if (m_creature->Attack(pWho, true)) + { + DoCast(m_creature, SPELL_PROTECTIVE_BUBBLE); + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + DoStartMovement(pWho); + } + } + + void WaterElementHit() + { + m_creature->SetHealth(m_creature->GetHealth() + m_creature->GetMaxHealth() * 0.01); + if (m_bIsExploded) + { + DoCast(m_creature, SPELL_PROTECTIVE_BUBBLE); + m_bIsExploded = false; + m_creature->SetVisibility(VISIBILITY_ON); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + } + } + + void JustSummoned(Creature* pSummoned) + { + pSummoned->SetSpeed(MOVE_RUN, 0.2f); + pSummoned->GetMotionMaster()->MoveFollow(m_creature, 0, 0); + m_lWaterElementsGUIDList.push_back(pSummoned->GetGUID()); + } + + void DespawnWaterElements() + { + if (m_lWaterElementsGUIDList.empty()) + return; + + for(std::list::iterator itr = m_lWaterElementsGUIDList.begin(); itr != m_lWaterElementsGUIDList.end(); ++itr) + { + if (Creature* pTemp = (Creature*)Unit::GetUnit(*m_creature, *itr)) + { + if (pTemp->isAlive()) + //pTemp->ForcedDespawn(); + pTemp->DealDamage(pTemp, pTemp->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + } + + m_lWaterElementsGUIDList.clear(); + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (!m_bIsFrenzy) + { + if (m_uiBuubleChecker_Timer < uiDiff) + { + if (!m_bIsExploded) + { + if (!m_creature->HasAura(SPELL_PROTECTIVE_BUBBLE, 0)) + { + DoCast(m_creature, m_bIsRegularMode ? SPELL_WATER_BLAST_H : SPELL_WATER_BLAST); + //DoCast(m_creature, SPELL_DRAINED); + m_bIsExploded = true; + m_uiShowup_Counter = 0; + m_creature->AttackStop(); + m_creature->SetVisibility(VISIBILITY_OFF); + for(uint8 i = 0; i < 10; i++) + { + //int tmp = urand(0, 5); + //m_creature->SummonCreature(NPC_ICHOR_GLOBULE, PortalLoc[tmp].x, PortalLoc[tmp].y, PortalLoc[tmp].z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); + m_creature->SummonCreature(NPC_ICHOR_GLOBULE, m_creature->GetPositionX()-10+rand()%20, m_creature->GetPositionY()-10+rand()%20, m_creature->GetPositionZ(), 0, TEMPSUMMON_CORPSE_DESPAWN, 0); + } + } + m_uiBuubleChecker_Timer = 3000; + } + else + { + bool bIsWaterElementsAlive = false; + ++m_uiShowup_Counter; + if (!m_lWaterElementsGUIDList.empty()) + { + for(std::list::iterator itr = m_lWaterElementsGUIDList.begin(); itr != m_lWaterElementsGUIDList.end(); ++itr) + if (Creature* pTemp = (Creature*)Unit::GetUnit(*m_creature, *itr)) + if (pTemp->isAlive()) + bIsWaterElementsAlive = true; + } + if (!bIsWaterElementsAlive || m_uiShowup_Counter > 20) + { + DoCast(m_creature, SPELL_PROTECTIVE_BUBBLE); + m_bIsExploded = false; + m_uiShowup_Counter = 0; + m_creature->SetVisibility(VISIBILITY_ON); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + } + m_uiBuubleChecker_Timer = 1000; + } + } + else m_uiBuubleChecker_Timer -= uiDiff; + } + + if (!m_bIsExploded) + { + if (m_uiWaterBoltVolley_Timer < uiDiff) + { + DoCast(m_creature, m_bIsRegularMode ? SPELL_WATER_BOLT_VOLLEY_H : SPELL_WATER_BOLT_VOLLEY); + m_uiWaterBoltVolley_Timer = urand(10000, 15000); + } + else m_uiWaterBoltVolley_Timer -= uiDiff; + + if (!m_bIsFrenzy && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 25) + { + DoCast(m_creature, m_bIsRegularMode ? SPELL_FRENZY_H : SPELL_FRENZY); + m_bIsFrenzy = true; + } + + DoMeleeAttackIfReady(); + } + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + DespawnWaterElements(); + + if (m_pInstance) + m_pInstance->SetData(TYPE_ICHORON, DONE); + } + + void KilledUnit(Unit* pVictim) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_SLAY_1, m_creature);break; + case 1: DoScriptText(SAY_SLAY_2, m_creature);break; + case 2: DoScriptText(SAY_SLAY_3, m_creature);break; + } + } +}; + + +struct MANGOS_DLL_DECL mob_ichor_globuleAI : public ScriptedAI +{ + mob_ichor_globuleAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + Reset(); + } + ScriptedInstance *m_pInstance; + + uint32 m_uiRangeCheck_Timer; + + void Reset() + { + m_uiRangeCheck_Timer = 1000; + } + + void AttackStart(Unit* pWho) + { + return; + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_uiRangeCheck_Timer < uiDiff) + { + if (m_pInstance) + { + if (Creature* pIchoron = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_ICHORON)))) + { + float fDistance = m_creature->GetDistance2d(pIchoron); + if (fDistance <= 2) + { + ((boss_ichoronAI*)pIchoron->AI())->WaterElementHit(); + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + } + } + m_uiRangeCheck_Timer = 1000; + } + else m_uiRangeCheck_Timer -= uiDiff; + } + + void JustDied(Unit* pKiller) + { + DoCast(m_creature, SPELL_SPLASH); + } +}; + +CreatureAI* GetAI_boss_ichoron(Creature* pCreature) +{ + return new boss_ichoronAI (pCreature); +} + +CreatureAI* GetAI_mob_ichor_globule(Creature* pCreature) +{ + return new mob_ichor_globuleAI (pCreature); +} + +void AddSC_boss_ichoron() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_ichoron"; + newscript->GetAI = &GetAI_boss_ichoron; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_ichor_globule"; + newscript->GetAI = &GetAI_mob_ichor_globule; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/violet_hold/boss_lavanthor.cpp b/scripts/northrend/violet_hold/boss_lavanthor.cpp index f9e669e9e..83640080c 100644 --- a/scripts/northrend/violet_hold/boss_lavanthor.cpp +++ b/scripts/northrend/violet_hold/boss_lavanthor.cpp @@ -1,149 +1,149 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 - * 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, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* ScriptData -SDName: boss_lavanthor -SDAuthor: ckegg -SD%Complete: 0 -SDComment: -SDCategory: The Violet Hold -EndScriptData */ - -#include "precompiled.h" -#include "def_violet_hold.h" - -enum -{ - SPELL_CAUTERIZING_FLAMES = 59466, - SPELL_FIREBOLT = 54235, - SPELL_FIREBOLT_H = 59468, - SPELL_FLAME_BREATH = 54282, - SPELL_FLAME_BREATH_H = 59469, - SPELL_LAVA_BURN = 54249, - SPELL_LAVA_BURN_H = 59594, -}; - -struct MANGOS_DLL_DECL boss_lavanthorAI : public ScriptedAI -{ - boss_lavanthorAI(Creature *pCreature) : ScriptedAI(pCreature) - { - m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); - m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); - Reset(); - } - ScriptedInstance *m_pInstance; - - bool m_bIsRegularMode; - - uint32 m_uiCauterizingFlames_Timer; - uint32 m_uiFlameBreath_Timer; - uint32 m_uiFirebolt_Timer; - - void Reset() - { - m_uiCauterizingFlames_Timer = urand(40000, 41000); - m_uiFlameBreath_Timer = urand(15000, 16000); - m_uiFirebolt_Timer = urand(10000, 11000); - - if (m_pInstance) - m_pInstance->SetData(TYPE_LAVANTHOR, NOT_STARTED); - } - - void Aggro(Unit* pWho) - { - if (m_pInstance) - m_pInstance->SetData(TYPE_LAVANTHOR, IN_PROGRESS); - } - - void AttackStart(Unit* pWho) - { - if (!m_pInstance) - return; - - if (m_pInstance->GetData(TYPE_LAVANTHOR) != SPECIAL) - return; - - if (!pWho || pWho == m_creature) - return; - - if (m_creature->Attack(pWho, true)) - { - m_creature->AddThreat(pWho); - m_creature->SetInCombatWith(pWho); - pWho->SetInCombatWith(m_creature); - DoStartMovement(pWho); - } - } - - void UpdateAI(const uint32 uiDiff) - { - //Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (m_uiCauterizingFlames_Timer < uiDiff) - { - DoCast(m_creature, SPELL_CAUTERIZING_FLAMES); - m_uiCauterizingFlames_Timer = urand(40000, 41000); - } - else m_uiCauterizingFlames_Timer -= uiDiff; - - if (m_uiFirebolt_Timer < uiDiff) - { - DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_FIREBOLT_H : SPELL_FIREBOLT); - m_uiFirebolt_Timer = urand(10000, 11000); - } - else m_uiFirebolt_Timer -= uiDiff; - - if (m_uiFlameBreath_Timer < uiDiff) - { - switch (urand(0, 1)) - { - case 0: - DoCast(m_creature, m_bIsRegularMode ? SPELL_FLAME_BREATH_H : SPELL_FLAME_BREATH); - break; - case 1: - DoCast(m_creature, m_bIsRegularMode ? SPELL_LAVA_BURN_H : SPELL_LAVA_BURN); - break; - } - m_uiFlameBreath_Timer = urand(15000, 16000); - } - else m_uiFlameBreath_Timer -= uiDiff; - - DoMeleeAttackIfReady(); - } - - void JustDied(Unit* pKiller) - { - if (m_pInstance) - m_pInstance->SetData(TYPE_LAVANTHOR, DONE); - } -}; - -CreatureAI* GetAI_boss_lavanthor(Creature* pCreature) -{ - return new boss_lavanthorAI (pCreature); -} - -void AddSC_boss_lavanthor() -{ - Script *newscript; - - newscript = new Script; - newscript->Name = "boss_lavanthor"; - newscript->GetAI = &GetAI_boss_lavanthor; - newscript->RegisterSelf(); -} +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_lavanthor +SDAuthor: ckegg +SD%Complete: 0 +SDComment: +SDCategory: The Violet Hold +EndScriptData */ + +#include "precompiled.h" +#include "def_violet_hold.h" + +enum +{ + SPELL_CAUTERIZING_FLAMES = 59466, + SPELL_FIREBOLT = 54235, + SPELL_FIREBOLT_H = 59468, + SPELL_FLAME_BREATH = 54282, + SPELL_FLAME_BREATH_H = 59469, + SPELL_LAVA_BURN = 54249, + SPELL_LAVA_BURN_H = 59594, +}; + +struct MANGOS_DLL_DECL boss_lavanthorAI : public ScriptedAI +{ + boss_lavanthorAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + ScriptedInstance *m_pInstance; + + bool m_bIsRegularMode; + + uint32 m_uiCauterizingFlames_Timer; + uint32 m_uiFlameBreath_Timer; + uint32 m_uiFirebolt_Timer; + + void Reset() + { + m_uiCauterizingFlames_Timer = urand(40000, 41000); + m_uiFlameBreath_Timer = urand(15000, 16000); + m_uiFirebolt_Timer = urand(10000, 11000); + + if (m_pInstance) + m_pInstance->SetData(TYPE_LAVANTHOR, NOT_STARTED); + } + + void Aggro(Unit* pWho) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_LAVANTHOR, IN_PROGRESS); + } + + void AttackStart(Unit* pWho) + { + if (!m_pInstance) + return; + + if (m_pInstance->GetData(TYPE_LAVANTHOR) != SPECIAL) + return; + + if (!pWho || pWho == m_creature) + return; + + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + DoStartMovement(pWho); + } + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiCauterizingFlames_Timer < uiDiff) + { + DoCast(m_creature, SPELL_CAUTERIZING_FLAMES); + m_uiCauterizingFlames_Timer = urand(40000, 41000); + } + else m_uiCauterizingFlames_Timer -= uiDiff; + + if (m_uiFirebolt_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_FIREBOLT_H : SPELL_FIREBOLT); + m_uiFirebolt_Timer = urand(10000, 11000); + } + else m_uiFirebolt_Timer -= uiDiff; + + if (m_uiFlameBreath_Timer < uiDiff) + { + switch (urand(0, 1)) + { + case 0: + DoCast(m_creature, m_bIsRegularMode ? SPELL_FLAME_BREATH_H : SPELL_FLAME_BREATH); + break; + case 1: + DoCast(m_creature, m_bIsRegularMode ? SPELL_LAVA_BURN_H : SPELL_LAVA_BURN); + break; + } + m_uiFlameBreath_Timer = urand(15000, 16000); + } + else m_uiFlameBreath_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } + + void JustDied(Unit* pKiller) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_LAVANTHOR, DONE); + } +}; + +CreatureAI* GetAI_boss_lavanthor(Creature* pCreature) +{ + return new boss_lavanthorAI (pCreature); +} + +void AddSC_boss_lavanthor() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_lavanthor"; + newscript->GetAI = &GetAI_boss_lavanthor; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/violet_hold/boss_moragg.cpp b/scripts/northrend/violet_hold/boss_moragg.cpp index 9d9816770..c2db42ef6 100644 --- a/scripts/northrend/violet_hold/boss_moragg.cpp +++ b/scripts/northrend/violet_hold/boss_moragg.cpp @@ -1,139 +1,139 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 - * 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, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* ScriptData -SDName: boss_moragg -SDAuthor: ckegg -SD%Complete: 0 -SDComment: -SDCategory: The Violet Hold -EndScriptData */ - -#include "precompiled.h" -#include "def_violet_hold.h" - -enum -{ - SPELL_CORROSICE_SALIVA = 54527, - SPELL_OPTIC_LINK = 54396, - SPELL_RAY_PAIN = 59525, - SPELL_RAY_SUFFERING = 54417, -}; - -struct MANGOS_DLL_DECL boss_moraggAI : public ScriptedAI -{ - boss_moraggAI(Creature *pCreature) : ScriptedAI(pCreature) - { - m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); - m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); - Reset(); - } - ScriptedInstance *m_pInstance; - - bool m_bIsRegularMode; - uint32 m_uiCorrosiveSaliva_Timer; - uint32 m_uiOpticLink_Timer; - uint32 m_uiRay_Timer; - - void Reset() - { - m_uiCorrosiveSaliva_Timer = urand(10000, 11000); - m_uiOpticLink_Timer = urand(25000, 30000); - m_uiRay_Timer = urand(2000, 7000); - - if (m_pInstance) - m_pInstance->SetData(TYPE_MORAGG, NOT_STARTED); - } - - void Aggro(Unit* pWho) - { - if (m_pInstance) - m_pInstance->SetData(TYPE_MORAGG, IN_PROGRESS); - } - - void AttackStart(Unit* pWho) - { - if (!m_pInstance) - return; - - if (m_pInstance->GetData(TYPE_MORAGG) != SPECIAL) - return; - - if (!pWho || pWho == m_creature) - return; - - if (m_creature->Attack(pWho, true)) - { - m_creature->AddThreat(pWho); - m_creature->SetInCombatWith(pWho); - pWho->SetInCombatWith(m_creature); - DoStartMovement(pWho); - } - } - - void UpdateAI(const uint32 uiDiff) - { - //Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (m_uiCorrosiveSaliva_Timer < uiDiff) - { - DoCast(m_creature->getVictim(), SPELL_CORROSICE_SALIVA); - m_uiCorrosiveSaliva_Timer = urand(10000, 11000); - } - else m_uiCorrosiveSaliva_Timer -= uiDiff; - - if (m_uiOpticLink_Timer < uiDiff) - { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, SPELL_OPTIC_LINK); - m_uiOpticLink_Timer = urand(25000, 30000); - } - else m_uiOpticLink_Timer -= uiDiff; - - if (m_uiRay_Timer < uiDiff) - { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, urand(0, 1) ? SPELL_RAY_PAIN : SPELL_RAY_SUFFERING); - m_uiRay_Timer = urand(2000, 7000); - } - else m_uiRay_Timer -= uiDiff; - - DoMeleeAttackIfReady(); - } - - void JustDied(Unit* pKiller) - { - if (m_pInstance) - m_pInstance->SetData(TYPE_MORAGG, DONE); - } -}; - -CreatureAI* GetAI_boss_moragg(Creature* pCreature) -{ - return new boss_moraggAI (pCreature); -} - -void AddSC_boss_moragg() -{ - Script *newscript; - - newscript = new Script; - newscript->Name = "boss_moragg"; - newscript->GetAI = &GetAI_boss_moragg; - newscript->RegisterSelf(); -} +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_moragg +SDAuthor: ckegg +SD%Complete: 0 +SDComment: +SDCategory: The Violet Hold +EndScriptData */ + +#include "precompiled.h" +#include "def_violet_hold.h" + +enum +{ + SPELL_CORROSICE_SALIVA = 54527, + SPELL_OPTIC_LINK = 54396, + SPELL_RAY_PAIN = 59525, + SPELL_RAY_SUFFERING = 54417, +}; + +struct MANGOS_DLL_DECL boss_moraggAI : public ScriptedAI +{ + boss_moraggAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + ScriptedInstance *m_pInstance; + + bool m_bIsRegularMode; + uint32 m_uiCorrosiveSaliva_Timer; + uint32 m_uiOpticLink_Timer; + uint32 m_uiRay_Timer; + + void Reset() + { + m_uiCorrosiveSaliva_Timer = urand(10000, 11000); + m_uiOpticLink_Timer = urand(25000, 30000); + m_uiRay_Timer = urand(2000, 7000); + + if (m_pInstance) + m_pInstance->SetData(TYPE_MORAGG, NOT_STARTED); + } + + void Aggro(Unit* pWho) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_MORAGG, IN_PROGRESS); + } + + void AttackStart(Unit* pWho) + { + if (!m_pInstance) + return; + + if (m_pInstance->GetData(TYPE_MORAGG) != SPECIAL) + return; + + if (!pWho || pWho == m_creature) + return; + + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + DoStartMovement(pWho); + } + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiCorrosiveSaliva_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_CORROSICE_SALIVA); + m_uiCorrosiveSaliva_Timer = urand(10000, 11000); + } + else m_uiCorrosiveSaliva_Timer -= uiDiff; + + if (m_uiOpticLink_Timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, SPELL_OPTIC_LINK); + m_uiOpticLink_Timer = urand(25000, 30000); + } + else m_uiOpticLink_Timer -= uiDiff; + + if (m_uiRay_Timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, urand(0, 1) ? SPELL_RAY_PAIN : SPELL_RAY_SUFFERING); + m_uiRay_Timer = urand(2000, 7000); + } + else m_uiRay_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } + + void JustDied(Unit* pKiller) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_MORAGG, DONE); + } +}; + +CreatureAI* GetAI_boss_moragg(Creature* pCreature) +{ + return new boss_moraggAI (pCreature); +} + +void AddSC_boss_moragg() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_moragg"; + newscript->GetAI = &GetAI_boss_moragg; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/violet_hold/boss_xevozz.cpp b/scripts/northrend/violet_hold/boss_xevozz.cpp index c9cb5655d..e3a14a751 100644 --- a/scripts/northrend/violet_hold/boss_xevozz.cpp +++ b/scripts/northrend/violet_hold/boss_xevozz.cpp @@ -1,276 +1,276 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 - * 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, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* ScriptData -SDName: boss_xevozz -SDAuthor: ckegg -SD%Complete: 0 -SDComment: -SDCategory: The Violet Hold -EndScriptData */ - -#include "precompiled.h" -#include "def_violet_hold.h" - -enum -{ - 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, - - 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, - - NPC_ETHEREAL_SPHERE = 29271, - //NPC_ETHEREAL_SPHERE2 = 32582, // heroic only? - SPELL_ARCANE_POWER = 54160, - SPELL_ARCANE_POWER_H = 59474, - SPELL_SUMMON_PLAYERS = 54164, -}; - -struct MANGOS_DLL_DECL boss_xevozzAI : public ScriptedAI -{ - boss_xevozzAI(Creature *pCreature) : ScriptedAI(pCreature) - { - m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); - m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); - Reset(); - } - ScriptedInstance *m_pInstance; - - bool m_bIsRegularMode; - - uint32 m_uiSummonEtherealSphere_Timer; - uint32 m_uiArcaneBarrageVolley_Timer; - uint32 m_uiArcaneBuffet_Timer; - - void Reset() - { - m_uiSummonEtherealSphere_Timer = urand(10000, 12000); - m_uiArcaneBarrageVolley_Timer = urand(20000, 22000); - m_uiArcaneBuffet_Timer = m_uiSummonEtherealSphere_Timer + urand(5000, 6000); - DespawnSphere(); - - if (m_pInstance) - m_pInstance->SetData(TYPE_XEVOZZ, NOT_STARTED); - } - - void Aggro(Unit* pWho) - { - DoScriptText(SAY_AGGRO, m_creature); - - if (m_pInstance) - m_pInstance->SetData(TYPE_XEVOZZ, IN_PROGRESS); - } - - void AttackStart(Unit* pWho) - { - if (!m_pInstance) - return; - - if (m_pInstance->GetData(TYPE_XEVOZZ) != SPECIAL) - return; - - if (!pWho || pWho == m_creature) - return; - - if (m_creature->Attack(pWho, true)) - { - m_creature->AddThreat(pWho); - m_creature->SetInCombatWith(pWho); - pWho->SetInCombatWith(m_creature); - DoStartMovement(pWho); - } - } - - void DespawnSphere() - { - std::list assistList; - GetCreatureListWithEntryInGrid(assistList,m_creature, NPC_ETHEREAL_SPHERE ,150.0f); - - if (assistList.empty()) - return; - - for(std::list::iterator iter = assistList.begin(); iter != assistList.end(); ++iter) - (*iter)->DealDamage((*iter), (*iter)->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - } - - void JustSummoned(Creature* pSummoned) - { - pSummoned->SetSpeed(MOVE_RUN, 0.5f); - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - { - pSummoned->AddThreat(pTarget); - pSummoned->AI()->AttackStart(pTarget); - } - } - - void UpdateAI(const uint32 uiDiff) - { - //Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (m_uiArcaneBarrageVolley_Timer < uiDiff) - { - DoCast(m_creature, m_bIsRegularMode ? SPELL_ARCANE_BARRAGE_VOLLEY_H : SPELL_ARCANE_BARRAGE_VOLLEY); - m_uiArcaneBarrageVolley_Timer = urand(20000, 22000); - } - else m_uiArcaneBarrageVolley_Timer -= uiDiff; - - if (m_uiArcaneBuffet_Timer) - if (m_uiArcaneBuffet_Timer < uiDiff) - { - DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_ARCANE_BUFFET_H : SPELL_ARCANE_BUFFET); - m_uiArcaneBuffet_Timer = 0; - } - else m_uiArcaneBuffet_Timer -= uiDiff; - - if (m_uiSummonEtherealSphere_Timer < uiDiff) - { - DoScriptText(SAY_SPAWN, m_creature); - DoCast(m_creature, SPELL_SUMMON_ETHEREAL_SPHERE_1); - if (m_bIsRegularMode) // extra one for heroic - m_creature->SummonCreature(NPC_ETHEREAL_SPHERE, m_creature->GetPositionX()-5+rand()%10, m_creature->GetPositionY()-5+rand()%10, m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 40000); - - m_uiSummonEtherealSphere_Timer = urand(45000, 47000); - m_uiArcaneBuffet_Timer = urand(5000, 6000); - } - else m_uiSummonEtherealSphere_Timer -= uiDiff; - - DoMeleeAttackIfReady(); - } - - void JustDied(Unit* pKiller) - { - DoScriptText(SAY_DEATH, m_creature); - DespawnSphere(); - - if (m_pInstance) - m_pInstance->SetData(TYPE_XEVOZZ, DONE); - } - - void KilledUnit(Unit* pVictim) - { - switch(urand(0, 2)) - { - case 0: DoScriptText(SAY_SLAY_1, m_creature);break; - case 1: DoScriptText(SAY_SLAY_2, m_creature);break; - case 2: DoScriptText(SAY_SLAY_3, m_creature);break; - } - } -}; - -struct MANGOS_DLL_DECL mob_ethereal_sphereAI : public ScriptedAI -{ - mob_ethereal_sphereAI(Creature *pCreature) : ScriptedAI(pCreature) - { - m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); - m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); - Reset(); - } - ScriptedInstance *m_pInstance; - bool m_bIsRegularMode; - - uint32 m_uiSummonPlayers_Timer; - uint32 m_uiRangeCheck_Timer; - - void Reset() - { - m_uiSummonPlayers_Timer = urand(33000, 35000); - m_uiRangeCheck_Timer = 1000; - } - - void UpdateAI(const uint32 uiDiff) - { - //Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (m_uiRangeCheck_Timer < uiDiff) - { - if (m_pInstance) - { - if (Creature* pXevozz = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_XEVOZZ)))) - { - float fDistance = m_creature->GetDistance2d(pXevozz); - if (fDistance <= 3) - DoCast(pXevozz, m_bIsRegularMode ? SPELL_ARCANE_POWER_H : SPELL_ARCANE_POWER); - else - DoCast(m_creature, 35845); - } - } - m_uiRangeCheck_Timer = 1000; - } - else m_uiRangeCheck_Timer -= uiDiff; - - if (m_uiSummonPlayers_Timer < uiDiff) - { - DoCast(m_creature, SPELL_SUMMON_PLAYERS); // not working right - - Map* pMap = m_creature->GetMap(); - if (pMap && pMap->IsDungeon()) - { - Map::PlayerList const &PlayerList = pMap->GetPlayers(); - - if (!PlayerList.isEmpty()) - for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) - if (i->getSource()->isAlive()) - DoTeleportPlayer(i->getSource(), m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), i->getSource()->GetOrientation()); - } - - m_uiSummonPlayers_Timer = urand(33000, 35000); - } - else m_uiSummonPlayers_Timer -= uiDiff; - } -}; - -CreatureAI* GetAI_boss_xevozz(Creature* pCreature) -{ - return new boss_xevozzAI (pCreature); -} - -CreatureAI* GetAI_mob_ethereal_sphere(Creature* pCreature) -{ - return new mob_ethereal_sphereAI (pCreature); -} - -void AddSC_boss_xevozz() -{ - Script *newscript; - - newscript = new Script; - newscript->Name = "boss_xevozz"; - newscript->GetAI = &GetAI_boss_xevozz; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_ethereal_sphere"; - newscript->GetAI = &GetAI_mob_ethereal_sphere; - newscript->RegisterSelf(); -} +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_xevozz +SDAuthor: ckegg +SD%Complete: 0 +SDComment: +SDCategory: The Violet Hold +EndScriptData */ + +#include "precompiled.h" +#include "def_violet_hold.h" + +enum +{ + 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, + + 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, + + NPC_ETHEREAL_SPHERE = 29271, + //NPC_ETHEREAL_SPHERE2 = 32582, // heroic only? + SPELL_ARCANE_POWER = 54160, + SPELL_ARCANE_POWER_H = 59474, + SPELL_SUMMON_PLAYERS = 54164, +}; + +struct MANGOS_DLL_DECL boss_xevozzAI : public ScriptedAI +{ + boss_xevozzAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + ScriptedInstance *m_pInstance; + + bool m_bIsRegularMode; + + uint32 m_uiSummonEtherealSphere_Timer; + uint32 m_uiArcaneBarrageVolley_Timer; + uint32 m_uiArcaneBuffet_Timer; + + void Reset() + { + m_uiSummonEtherealSphere_Timer = urand(10000, 12000); + m_uiArcaneBarrageVolley_Timer = urand(20000, 22000); + m_uiArcaneBuffet_Timer = m_uiSummonEtherealSphere_Timer + urand(5000, 6000); + DespawnSphere(); + + if (m_pInstance) + m_pInstance->SetData(TYPE_XEVOZZ, NOT_STARTED); + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_XEVOZZ, IN_PROGRESS); + } + + void AttackStart(Unit* pWho) + { + if (!m_pInstance) + return; + + if (m_pInstance->GetData(TYPE_XEVOZZ) != SPECIAL) + return; + + if (!pWho || pWho == m_creature) + return; + + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + DoStartMovement(pWho); + } + } + + void DespawnSphere() + { + std::list assistList; + GetCreatureListWithEntryInGrid(assistList,m_creature, NPC_ETHEREAL_SPHERE ,150.0f); + + if (assistList.empty()) + return; + + for(std::list::iterator iter = assistList.begin(); iter != assistList.end(); ++iter) + (*iter)->DealDamage((*iter), (*iter)->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + + void JustSummoned(Creature* pSummoned) + { + pSummoned->SetSpeed(MOVE_RUN, 0.5f); + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + { + pSummoned->AddThreat(pTarget); + pSummoned->AI()->AttackStart(pTarget); + } + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiArcaneBarrageVolley_Timer < uiDiff) + { + DoCast(m_creature, m_bIsRegularMode ? SPELL_ARCANE_BARRAGE_VOLLEY_H : SPELL_ARCANE_BARRAGE_VOLLEY); + m_uiArcaneBarrageVolley_Timer = urand(20000, 22000); + } + else m_uiArcaneBarrageVolley_Timer -= uiDiff; + + if (m_uiArcaneBuffet_Timer) + if (m_uiArcaneBuffet_Timer < uiDiff) + { + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_ARCANE_BUFFET_H : SPELL_ARCANE_BUFFET); + m_uiArcaneBuffet_Timer = 0; + } + else m_uiArcaneBuffet_Timer -= uiDiff; + + if (m_uiSummonEtherealSphere_Timer < uiDiff) + { + DoScriptText(SAY_SPAWN, m_creature); + DoCast(m_creature, SPELL_SUMMON_ETHEREAL_SPHERE_1); + if (m_bIsRegularMode) // extra one for heroic + m_creature->SummonCreature(NPC_ETHEREAL_SPHERE, m_creature->GetPositionX()-5+rand()%10, m_creature->GetPositionY()-5+rand()%10, m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 40000); + + m_uiSummonEtherealSphere_Timer = urand(45000, 47000); + m_uiArcaneBuffet_Timer = urand(5000, 6000); + } + else m_uiSummonEtherealSphere_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + DespawnSphere(); + + if (m_pInstance) + m_pInstance->SetData(TYPE_XEVOZZ, DONE); + } + + void KilledUnit(Unit* pVictim) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_SLAY_1, m_creature);break; + case 1: DoScriptText(SAY_SLAY_2, m_creature);break; + case 2: DoScriptText(SAY_SLAY_3, m_creature);break; + } + } +}; + +struct MANGOS_DLL_DECL mob_ethereal_sphereAI : public ScriptedAI +{ + mob_ethereal_sphereAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + ScriptedInstance *m_pInstance; + bool m_bIsRegularMode; + + uint32 m_uiSummonPlayers_Timer; + uint32 m_uiRangeCheck_Timer; + + void Reset() + { + m_uiSummonPlayers_Timer = urand(33000, 35000); + m_uiRangeCheck_Timer = 1000; + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiRangeCheck_Timer < uiDiff) + { + if (m_pInstance) + { + if (Creature* pXevozz = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_XEVOZZ)))) + { + float fDistance = m_creature->GetDistance2d(pXevozz); + if (fDistance <= 3) + DoCast(pXevozz, m_bIsRegularMode ? SPELL_ARCANE_POWER_H : SPELL_ARCANE_POWER); + else + DoCast(m_creature, 35845); + } + } + m_uiRangeCheck_Timer = 1000; + } + else m_uiRangeCheck_Timer -= uiDiff; + + if (m_uiSummonPlayers_Timer < uiDiff) + { + DoCast(m_creature, SPELL_SUMMON_PLAYERS); // not working right + + Map* pMap = m_creature->GetMap(); + if (pMap && pMap->IsDungeon()) + { + Map::PlayerList const &PlayerList = pMap->GetPlayers(); + + if (!PlayerList.isEmpty()) + for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) + if (i->getSource()->isAlive()) + DoTeleportPlayer(i->getSource(), m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), i->getSource()->GetOrientation()); + } + + m_uiSummonPlayers_Timer = urand(33000, 35000); + } + else m_uiSummonPlayers_Timer -= uiDiff; + } +}; + +CreatureAI* GetAI_boss_xevozz(Creature* pCreature) +{ + return new boss_xevozzAI (pCreature); +} + +CreatureAI* GetAI_mob_ethereal_sphere(Creature* pCreature) +{ + return new mob_ethereal_sphereAI (pCreature); +} + +void AddSC_boss_xevozz() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_xevozz"; + newscript->GetAI = &GetAI_boss_xevozz; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_ethereal_sphere"; + newscript->GetAI = &GetAI_mob_ethereal_sphere; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/violet_hold/boss_zuramat.cpp b/scripts/northrend/violet_hold/boss_zuramat.cpp index 637eef321..70064a65f 100644 --- a/scripts/northrend/violet_hold/boss_zuramat.cpp +++ b/scripts/northrend/violet_hold/boss_zuramat.cpp @@ -1,227 +1,227 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 - * 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, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* ScriptData -SDName: boss_zuramat -SDAuthor: ckegg -SD%Complete: 0 -SDComment: -SDCategory: The Violet Hold -EndScriptData */ - -#include "precompiled.h" -#include "def_violet_hold.h" - -enum -{ - 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, - - SPELL_SHROUD_OF_DARKNESS = 54524, - SPELL_SHROUD_OF_DARKNESS_H = 59745, - SPELL_SUMMON_VOID_SENTRY = 54369, - SPELL_VOID_SHIFT = 54361, - SPELL_VOID_SHIFT_H = 59743, - - NPC_VOID_SENTRY = 29364, - SPELL_VOID_SENTRY_AURA = 54341, - SPELL_VOID_SENTRY_AURA_H = 54351, - SPELL_SHADOW_BOLT_VOLLEY = 54358, // 54342? 54358? - SPELL_SHADOW_BOLT_VOLLEY_H = 59747, -}; - -struct MANGOS_DLL_DECL boss_zuramatAI : public ScriptedAI -{ - boss_zuramatAI(Creature *pCreature) : ScriptedAI(pCreature) - { - m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); - m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); - Reset(); - } - ScriptedInstance *m_pInstance; - - bool m_bIsRegularMode; - std::list m_lSentryGUIDList; - - uint32 m_uiShroudDarkness_Timer; - uint32 m_uiVoidShift_Timer; - uint32 m_uiSummonVoidSentry_Timer; - - void Reset() - { - m_uiShroudDarkness_Timer = urand(8000, 9000); - m_uiSummonVoidSentry_Timer = urand(5000, 10000); - m_uiVoidShift_Timer = 10000; - - if (m_pInstance) - m_pInstance->SetData(TYPE_ZURAMAT, NOT_STARTED); - } - - void Aggro(Unit* pWho) - { - DoScriptText(SAY_AGGRO, m_creature); - - if (m_pInstance) - m_pInstance->SetData(TYPE_ZURAMAT, IN_PROGRESS); - } - - void AttackStart(Unit* pWho) - { - if (!m_pInstance) - return; - - if (m_pInstance->GetData(TYPE_ZURAMAT) != SPECIAL) - return; - - if (!pWho || pWho == m_creature) - return; - - if (m_creature->Attack(pWho, true)) - { - m_creature->AddThreat(pWho); - m_creature->SetInCombatWith(pWho); - pWho->SetInCombatWith(m_creature); - DoStartMovement(pWho); - } - } - - void JustSummoned(Creature* pSummoned) - { - m_lSentryGUIDList.push_back(pSummoned->GetGUID()); - //pSummoned->AddThreat(m_creature); - //pSummoned->AI()->AttackStart(m_creature); - } - - void DespawnSentry() - { - if (m_lSentryGUIDList.empty()) - return; - - for(std::list::iterator itr = m_lSentryGUIDList.begin(); itr != m_lSentryGUIDList.end(); ++itr) - { - if (Creature* pTemp = (Creature*)Unit::GetUnit(*m_creature, *itr)) - { - if (pTemp->isAlive()) - //pTemp->ForcedDespawn(); - pTemp->DealDamage(pTemp, pTemp->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - } - } - - m_lSentryGUIDList.clear(); - } - - void UpdateAI(const uint32 uiDiff) - { - //Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (m_uiShroudDarkness_Timer < uiDiff) - { - DoCast(m_creature, m_bIsRegularMode ? SPELL_SHROUD_OF_DARKNESS_H : SPELL_SHROUD_OF_DARKNESS); - m_uiShroudDarkness_Timer = urand(7000, 8000); - } - else m_uiShroudDarkness_Timer -= uiDiff; - - if (m_uiVoidShift_Timer < uiDiff) - { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, m_bIsRegularMode ? SPELL_VOID_SHIFT_H : SPELL_VOID_SHIFT); - m_uiVoidShift_Timer = urand(10000, 11000); - } - else m_uiVoidShift_Timer -= uiDiff; - - if (m_uiSummonVoidSentry_Timer < uiDiff) - { - m_creature->SummonCreature(NPC_VOID_SENTRY, m_creature->GetPositionX()-10+rand()%20, m_creature->GetPositionY()-10+rand()%20, m_creature->GetPositionZ(), 0, TEMPSUMMON_CORPSE_DESPAWN, 0); - m_uiSummonVoidSentry_Timer = urand(10000, 11000); - } - else m_uiSummonVoidSentry_Timer -= uiDiff; - - DoMeleeAttackIfReady(); - } - - void JustDied(Unit* pKiller) - { - DoScriptText(SAY_DEATH, m_creature); - DespawnSentry(); - - if (m_pInstance) - m_pInstance->SetData(TYPE_ZURAMAT, DONE); - } - - void KilledUnit(Unit* pVictim) - { - switch(urand(0, 2)) - { - case 0: DoScriptText(SAY_SLAY_1, m_creature);break; - case 1: DoScriptText(SAY_SLAY_2, m_creature);break; - case 2: DoScriptText(SAY_SLAY_3, m_creature);break; - } - } -}; - -struct MANGOS_DLL_DECL mob_zuramat_sentryAI : public ScriptedAI -{ - mob_zuramat_sentryAI(Creature *pCreature) : ScriptedAI(pCreature) - { - m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); - m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); - SetCombatMovement(false); - Reset(); - } - ScriptedInstance *m_pInstance; - bool m_bIsRegularMode; - - void Reset() - { - //DoCast(m_creature, m_bIsRegularMode ? SPELL_VOID_SENTRY_AURA_H : SPELL_VOID_SENTRY_AURA); ?? - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - DoCast(m_creature, m_bIsRegularMode ? SPELL_SHADOW_BOLT_VOLLEY_H : SPELL_SHADOW_BOLT_VOLLEY); - } -}; - -CreatureAI* GetAI_boss_zuramat(Creature* pCreature) -{ - return new boss_zuramatAI (pCreature); -} - -CreatureAI* GetAI_mob_zuramat_sentry(Creature* pCreature) -{ - return new mob_zuramat_sentryAI (pCreature); -} - -void AddSC_boss_zuramat() -{ - Script *newscript; - - newscript = new Script; - newscript->Name = "boss_zuramat"; - newscript->GetAI = &GetAI_boss_zuramat; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_zuramat_sentry"; - newscript->GetAI = &GetAI_mob_zuramat_sentry; - newscript->RegisterSelf(); - -} +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_zuramat +SDAuthor: ckegg +SD%Complete: 0 +SDComment: +SDCategory: The Violet Hold +EndScriptData */ + +#include "precompiled.h" +#include "def_violet_hold.h" + +enum +{ + 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, + + SPELL_SHROUD_OF_DARKNESS = 54524, + SPELL_SHROUD_OF_DARKNESS_H = 59745, + SPELL_SUMMON_VOID_SENTRY = 54369, + SPELL_VOID_SHIFT = 54361, + SPELL_VOID_SHIFT_H = 59743, + + NPC_VOID_SENTRY = 29364, + SPELL_VOID_SENTRY_AURA = 54341, + SPELL_VOID_SENTRY_AURA_H = 54351, + SPELL_SHADOW_BOLT_VOLLEY = 54358, // 54342? 54358? + SPELL_SHADOW_BOLT_VOLLEY_H = 59747, +}; + +struct MANGOS_DLL_DECL boss_zuramatAI : public ScriptedAI +{ + boss_zuramatAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + ScriptedInstance *m_pInstance; + + bool m_bIsRegularMode; + std::list m_lSentryGUIDList; + + uint32 m_uiShroudDarkness_Timer; + uint32 m_uiVoidShift_Timer; + uint32 m_uiSummonVoidSentry_Timer; + + void Reset() + { + m_uiShroudDarkness_Timer = urand(8000, 9000); + m_uiSummonVoidSentry_Timer = urand(5000, 10000); + m_uiVoidShift_Timer = 10000; + + if (m_pInstance) + m_pInstance->SetData(TYPE_ZURAMAT, NOT_STARTED); + } + + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_ZURAMAT, IN_PROGRESS); + } + + void AttackStart(Unit* pWho) + { + if (!m_pInstance) + return; + + if (m_pInstance->GetData(TYPE_ZURAMAT) != SPECIAL) + return; + + if (!pWho || pWho == m_creature) + return; + + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + DoStartMovement(pWho); + } + } + + void JustSummoned(Creature* pSummoned) + { + m_lSentryGUIDList.push_back(pSummoned->GetGUID()); + //pSummoned->AddThreat(m_creature); + //pSummoned->AI()->AttackStart(m_creature); + } + + void DespawnSentry() + { + if (m_lSentryGUIDList.empty()) + return; + + for(std::list::iterator itr = m_lSentryGUIDList.begin(); itr != m_lSentryGUIDList.end(); ++itr) + { + if (Creature* pTemp = (Creature*)Unit::GetUnit(*m_creature, *itr)) + { + if (pTemp->isAlive()) + //pTemp->ForcedDespawn(); + pTemp->DealDamage(pTemp, pTemp->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + } + + m_lSentryGUIDList.clear(); + } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiShroudDarkness_Timer < uiDiff) + { + DoCast(m_creature, m_bIsRegularMode ? SPELL_SHROUD_OF_DARKNESS_H : SPELL_SHROUD_OF_DARKNESS); + m_uiShroudDarkness_Timer = urand(7000, 8000); + } + else m_uiShroudDarkness_Timer -= uiDiff; + + if (m_uiVoidShift_Timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, m_bIsRegularMode ? SPELL_VOID_SHIFT_H : SPELL_VOID_SHIFT); + m_uiVoidShift_Timer = urand(10000, 11000); + } + else m_uiVoidShift_Timer -= uiDiff; + + if (m_uiSummonVoidSentry_Timer < uiDiff) + { + m_creature->SummonCreature(NPC_VOID_SENTRY, m_creature->GetPositionX()-10+rand()%20, m_creature->GetPositionY()-10+rand()%20, m_creature->GetPositionZ(), 0, TEMPSUMMON_CORPSE_DESPAWN, 0); + m_uiSummonVoidSentry_Timer = urand(10000, 11000); + } + else m_uiSummonVoidSentry_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + DespawnSentry(); + + if (m_pInstance) + m_pInstance->SetData(TYPE_ZURAMAT, DONE); + } + + void KilledUnit(Unit* pVictim) + { + switch(urand(0, 2)) + { + case 0: DoScriptText(SAY_SLAY_1, m_creature);break; + case 1: DoScriptText(SAY_SLAY_2, m_creature);break; + case 2: DoScriptText(SAY_SLAY_3, m_creature);break; + } + } +}; + +struct MANGOS_DLL_DECL mob_zuramat_sentryAI : public ScriptedAI +{ + mob_zuramat_sentryAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + SetCombatMovement(false); + Reset(); + } + ScriptedInstance *m_pInstance; + bool m_bIsRegularMode; + + void Reset() + { + //DoCast(m_creature, m_bIsRegularMode ? SPELL_VOID_SENTRY_AURA_H : SPELL_VOID_SENTRY_AURA); ?? + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + DoCast(m_creature, m_bIsRegularMode ? SPELL_SHADOW_BOLT_VOLLEY_H : SPELL_SHADOW_BOLT_VOLLEY); + } +}; + +CreatureAI* GetAI_boss_zuramat(Creature* pCreature) +{ + return new boss_zuramatAI (pCreature); +} + +CreatureAI* GetAI_mob_zuramat_sentry(Creature* pCreature) +{ + return new mob_zuramat_sentryAI (pCreature); +} + +void AddSC_boss_zuramat() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_zuramat"; + newscript->GetAI = &GetAI_boss_zuramat; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_zuramat_sentry"; + newscript->GetAI = &GetAI_mob_zuramat_sentry; + newscript->RegisterSelf(); + +} diff --git a/scripts/northrend/violet_hold/def_violet_hold.h b/scripts/northrend/violet_hold/def_violet_hold.h index 26e6198ab..3b16835b6 100644 --- a/scripts/northrend/violet_hold/def_violet_hold.h +++ b/scripts/northrend/violet_hold/def_violet_hold.h @@ -1,76 +1,88 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 - * This program is free software licensed under GPL version 2 - * Please see the included DOCS/LICENSE.TXT for more information */ - -#ifndef DEF_VIOLET_HOLD_H -#define DEF_VIOLET_HOLD_H - -enum -{ - MAX_ENCOUNTER = 2, - - WORLD_STATE_VH = 3816, - //WORLD_STATE_VH_RIFT = 2784, - - TYPE_EREKEM = 11, - TYPE_MORAGG = 12, - TYPE_ICHORON = 13, - TYPE_XEVOZZ = 14, - TYPE_LAVANTHOR = 15, - TYPE_ZURAMAT = 16, - TYPE_CYANIGOSA = 17, - TYPE_RIFT = 18, - TYPE_LASTBOSS = 19, - - DATA_EREKEM = 20, - DATA_MORAGG = 21, - DATA_ICHORON = 22, - DATA_XEVOZZ = 23, - DATA_LAVANTHOR = 24, - DATA_ZURAMAT = 25, - DATA_SINCLARI = 26, - DATA_BOSSTIME = 27, - - DATA_SEAL_DOOR = 30, - DATA_EREKEM_DOOR = 31, - DATA_MORAGG_DOOR = 32, - DATA_ICHORON_DOOR = 33, - DATA_XEVOZZ_DOOR = 34, - DATA_LAVANTHOR_DOOR = 35, - DATA_ZURAMAT_DOOR = 36, - - NPC_EREKEM = 29315, - NPC_EREKEM_GUARD = 29395, - NPC_MORAGG = 29316, - NPC_ICHORON = 29313, - NPC_XEVOZZ = 29266, - NPC_LAVANTHOR = 29312, - NPC_ZURAMAT = 29314, - NPC_CYANIGOSA = 31134, - - NPC_AZURE_SABOTEUR = 31079, - NPC_AZURE_CAPTAIN = 30666, // 3 for 1-11, 4 for 13-17 - NPC_AZURE_RAIDER = 30668, - NPC_AZURE_SORCEROR = 30667, - NPC_AZURE_STALKER = 32191, - NPC_GUARDIAN = 30660, - NPC_KEEPER = 30695, - - NPC_SINCLARI = 30658, - NPC_GUARD = 30659, - NPC_PORTAL = 31011, - - GO_DOOR_SEAL = 191723, - GO_DOOR_EREKEM = 191564, - GO_DOOR_EREKEM_RIGHT = 191563, - GO_DOOR_EREKEM_LEFT = 191562, - GO_DOOR_MORAGG = 191606, - GO_DOOR_ICHORON = 191722, - GO_DOOR_XEVOZZ = 191556, - GO_DOOR_LAVANTHOR = 191566, - GO_DOOR_ZURAMAT = 191565, - - SPELL_PORTAL_CHANNEL = 58012, -}; - -#endif +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_VIOLET_HOLD_H +#define DEF_VIOLET_HOLD_H + +enum +{ + MAX_ENCOUNTER = 2, + + WORLD_STATE_VH = 3816, + WORLD_STATE_VH_PRISON = 3815, + WORLD_STATE_VH_PORTALS = 3810, + + TYPE_EVENT = 10, + TYPE_EREKEM = 11, + TYPE_MORAGG = 12, + TYPE_ICHORON = 13, + TYPE_XEVOZZ = 14, + TYPE_LAVANTHOR = 15, + TYPE_ZURAMAT = 16, + TYPE_CYANIGOSA = 17, + TYPE_RIFT = 18, + TYPE_LASTBOSS = 19, + TYPE_DOOR = 21, + TYPE_PORTAL_TIME = 22, + + DATA_EREKEM = 23, + DATA_MORAGG = 24, + DATA_ICHORON = 25, + DATA_XEVOZZ = 26, + DATA_LAVANTHOR = 27, + DATA_ZURAMAT = 28, + DATA_SINCLARI = 29, + DATA_BOSSTIME = 30, + DATA_NPC_SEAL_DOOR = 31, + + DATA_SEAL_DOOR = 32, + DATA_EREKEM_DOOR = 33, + DATA_MORAGG_DOOR = 34, + DATA_ICHORON_DOOR = 35, + DATA_XEVOZZ_DOOR = 36, + DATA_LAVANTHOR_DOOR = 37, + DATA_ZURAMAT_DOOR = 38, + + NPC_EREKEM = 29315, + NPC_EREKEM_GUARD = 29395, + NPC_MORAGG = 29316, + NPC_ICHORON = 29313, + NPC_XEVOZZ = 29266, + NPC_LAVANTHOR = 29312, + NPC_ZURAMAT = 29314, + NPC_CYANIGOSA = 31134, + + NPC_AZURE_SABOTEUR = 31079, // Open boss's cell + + NPC_AZURE_CAPTAIN = 30666, //Melee, 40k - 60k hp, 3 for 1-11, 4 for 13-17 + NPC_AZURE_RAIDER = 30668, //Melee, 40k - 60k hp + NPC_AZURE_SORCEROR = 30667, //Caster, 40k - 60k hp + NPC_AZURE_STALKER = 32191, //Melee, 40k - 60k hp + NPC_GUARDIAN = 30660, + NPC_KEEPER = 30695, + NPC_AZURE_BINDER = 30663, //Caster, 7k - 10k hp + NPC_AZURE_INVADER = 30661, //Melee, 8k - 12k hp + NPC_AZURE_MAGE_SLAYER = 30664, //Melee, 10k - 15k hp + NPC_AZURE_SPELLBREAKER = 30662, //Caster, 10k - 15k hp + + NPC_SINCLARI = 30658, + NPC_GUARD = 30659, + NPC_PORTAL = 31011, + NPC_DOOR_SEAL = 30896, + + GO_DOOR_SEAL = 191723, + GO_DOOR_EREKEM = 191564, + GO_DOOR_EREKEM_RIGHT = 191563, + GO_DOOR_EREKEM_LEFT = 191562, + GO_DOOR_MORAGG = 191606, + GO_DOOR_ICHORON = 191722, + GO_DOOR_XEVOZZ = 191556, + GO_DOOR_LAVANTHOR = 191566, + GO_DOOR_ZURAMAT = 191565, + + SPELL_PORTAL_CHANNEL = 58012, + SPELL_CORRUPT = 58040 +}; + +#endif diff --git a/scripts/northrend/violet_hold/instance_violet_hold.cpp b/scripts/northrend/violet_hold/instance_violet_hold.cpp index e6881f567..27affc701 100644 --- a/scripts/northrend/violet_hold/instance_violet_hold.cpp +++ b/scripts/northrend/violet_hold/instance_violet_hold.cpp @@ -1,316 +1,366 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 - * 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, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* ScriptData -SDName: Instance The Violet Hold -SD%Complete: 0% -SDComment: -SDCategory: The Violet Hold -EndScriptData */ - -#include "precompiled.h" -#include "def_violet_hold.h" - -/* The Violet Hold encounters: -0 Unused -1 Rift -2 Erekem -3 Moragg -4 Ichoron -5 Xevozz -6 Lavanthor -7 Zuramat -*/ -//inline uint32 RandRiftBoss() { return ((rand()%2) ? NPC_GUARDIAN : NPC_KEEPER); } - -struct Locations -{ - float x, y, z; - uint32 id; -}; - -static Locations PortalLoc[]= -{ - {1888.271, 810.781, 38.441}, // 0 center - {1857.125, 763.295, 38.654}, // 1 Lavanthor - {1925.480, 849.981, 47.174}, // 2 Zuramat - {1892.737, 744.589, 47.666}, // 3 Moragg - {1878.198, 850.005, 43.333}, // 4 Portal in front of Erekem - {1909.381, 806.796, 38.645}, // 5 Portal outside of Ichoron - {1936.101, 802.950, 52.417}, // 6 at the highest platform - - {1876.100, 857.079, 43.333}, // 7 Erekem - {1908.863, 785.647, 37.435}, // 8 Ichoron - {1905.364, 840.607, 38.670}, // 9 Xevozz -}; - -struct MANGOS_DLL_DECL instance_violet_hold : public ScriptedInstance -{ - instance_violet_hold(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; - - uint32 m_auiEncounter[MAX_ENCOUNTER]; - - bool bIsInBoss; - - uint8 m_uiLastBossID; - uint8 m_uiRiftPortalCount; - - uint64 m_uiSinclariGUID; - - uint64 m_uiErekemGUID; - uint64 m_uiMoraggGUID; - uint64 m_uiIchoronGUID; - uint64 m_uiXevozzGUID; - uint64 m_uiLavanthorGUID; - uint64 m_uiZuramatGUID; - - uint64 m_uiSealDoorGUID; - uint64 m_uiErekemDoorGUID; - uint64 m_uiErekemDoorLeftGUID; - uint64 m_uiErekemDoorRightGUID; - uint64 m_uiMoraggDoorGUID; - uint64 m_uiIchoronDoorGUID; - uint64 m_uiXevozzDoorGUID; - uint64 m_uiLavanthorDoorGUID; - uint64 m_uiZuramatDoorGUID; - - void Initialize() - { - memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - - bIsInBoss = false; - - m_uiLastBossID = 0; - m_uiRiftPortalCount = 0; - - m_uiSinclariGUID = 0; - - m_uiErekemGUID = 0; - m_uiMoraggGUID = 0; - m_uiIchoronGUID = 0; - m_uiXevozzGUID = 0; - m_uiLavanthorGUID = 0; - m_uiZuramatGUID = 0; - - m_uiSealDoorGUID = 0; - m_uiErekemDoorGUID = 0; - m_uiErekemDoorLeftGUID = 0; - m_uiErekemDoorRightGUID = 0; - m_uiMoraggDoorGUID = 0; - m_uiIchoronDoorGUID = 0; - m_uiXevozzDoorGUID = 0; - m_uiLavanthorDoorGUID = 0; - m_uiZuramatDoorGUID = 0; - } - - bool IsEncounterInProgress() const - { - for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) - if (m_auiEncounter[i] == IN_PROGRESS) - return true; - - return false; - } - - void OnCreatureCreate(Creature* pCreature) - { - switch(pCreature->GetEntry()) - { - case NPC_SINCLARI: - m_uiSinclariGUID = pCreature->GetGUID(); - break; - case NPC_EREKEM: - m_uiErekemGUID = pCreature->GetGUID(); - break; - case NPC_MORAGG: - m_uiMoraggGUID = pCreature->GetGUID(); - break; - case NPC_ICHORON: - m_uiIchoronGUID = pCreature->GetGUID(); - break; - case NPC_XEVOZZ: - m_uiXevozzGUID = pCreature->GetGUID(); - break; - case NPC_LAVANTHOR: - m_uiLavanthorGUID = pCreature->GetGUID(); - break; - case NPC_ZURAMAT: - m_uiZuramatGUID = pCreature->GetGUID(); - break; - } - } - - void OnObjectCreate(GameObject* pGo) - { - switch(pGo->GetEntry()) - { - case GO_DOOR_SEAL: - m_uiSealDoorGUID = pGo->GetGUID(); - break; - case GO_DOOR_EREKEM: - m_uiErekemDoorGUID = pGo->GetGUID(); - break; - case GO_DOOR_EREKEM_LEFT: - m_uiErekemDoorLeftGUID = pGo->GetGUID(); - break; - case GO_DOOR_EREKEM_RIGHT: - m_uiErekemDoorRightGUID = pGo->GetGUID(); - break; - case GO_DOOR_MORAGG: - m_uiMoraggDoorGUID = pGo->GetGUID(); - break; - case GO_DOOR_ICHORON: - m_uiIchoronDoorGUID = pGo->GetGUID(); - break; - case GO_DOOR_XEVOZZ: - m_uiXevozzDoorGUID = pGo->GetGUID(); - break; - case GO_DOOR_LAVANTHOR: - m_uiLavanthorDoorGUID = pGo->GetGUID(); - break; - case GO_DOOR_ZURAMAT: - m_uiZuramatDoorGUID = pGo->GetGUID(); - break; - } - } - - void SetData(uint32 uiType, uint32 uiData) - { - switch(uiType) - { - case TYPE_EREKEM: - m_auiEncounter[2] = uiData; - break; - case TYPE_MORAGG: - m_auiEncounter[3] = uiData; - break; - case TYPE_ICHORON: - m_auiEncounter[4] = uiData; - break; - case TYPE_XEVOZZ: - m_auiEncounter[5] = uiData; - break; - case TYPE_LAVANTHOR: - m_auiEncounter[6] = uiData; - break; - case TYPE_ZURAMAT: - m_auiEncounter[7] = uiData; - break; - - case TYPE_RIFT: - if (uiData == SPECIAL) - ++m_uiRiftPortalCount; - else if (uiData == IN_PROGRESS) - bIsInBoss = true; - else - DoUseDoorOrButton(m_uiSealDoorGUID); - - m_auiEncounter[1] = uiData; - break; - } - if (uiData == DONE) - bIsInBoss = false; - } - - uint32 GetData(uint32 uiType) - { - switch(uiType) - { - case TYPE_EREKEM: - return m_auiEncounter[2]; - case TYPE_MORAGG: - return m_auiEncounter[3]; - case TYPE_ICHORON: - return m_auiEncounter[4]; - case TYPE_XEVOZZ: - return m_auiEncounter[5]; - case TYPE_LAVANTHOR: - return m_auiEncounter[6]; - case TYPE_ZURAMAT: - return m_auiEncounter[7]; - case TYPE_RIFT: - return m_uiRiftPortalCount; - case TYPE_LASTBOSS: - { - if (!m_uiLastBossID) - m_uiLastBossID = urand(1, 5); - else - { - uint8 uiBossID = urand(1, 5); - if (uiBossID == m_uiLastBossID) - --m_uiLastBossID; - else - m_uiLastBossID = uiBossID; - } - - return m_uiLastBossID; - } - case DATA_BOSSTIME: - return bIsInBoss; - } - return 0; - } - - uint64 GetData64(uint32 uiData) - { - switch(uiData) - { - case DATA_EREKEM: - return m_uiErekemGUID; - case DATA_MORAGG: - return m_uiMoraggGUID; - case DATA_ICHORON: - return m_uiIchoronGUID; - case DATA_XEVOZZ: - return m_uiXevozzGUID; - case DATA_LAVANTHOR: - return m_uiLavanthorGUID; - case DATA_ZURAMAT: - return m_uiZuramatGUID; - case DATA_SINCLARI: - return m_uiSinclariGUID; - case DATA_SEAL_DOOR: - return m_uiSealDoorGUID; - case DATA_EREKEM_DOOR: - return m_uiErekemDoorGUID; - case DATA_MORAGG_DOOR: - return m_uiMoraggDoorGUID; - case DATA_ICHORON_DOOR: - return m_uiIchoronDoorGUID; - case DATA_XEVOZZ_DOOR: - return m_uiXevozzDoorGUID; - case DATA_LAVANTHOR_DOOR: - return m_uiLavanthorDoorGUID; - case DATA_ZURAMAT_DOOR: - return m_uiZuramatDoorGUID; - } - return 0; - } -}; - -InstanceData* GetInstanceData_instance_violet_hold(Map* pMap) -{ - return new instance_violet_hold(pMap); -} - -void AddSC_instance_violet_hold() -{ - Script *newscript; - newscript = new Script; - newscript->Name = "instance_violet_hold"; - newscript->GetInstanceData = &GetInstanceData_instance_violet_hold; - newscript->RegisterSelf(); -} +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance The Violet Hold +SD%Complete: 0% +SDComment: +SDCategory: The Violet Hold +EndScriptData */ + +#include "precompiled.h" +#include "def_violet_hold.h" + +/* The Violet Hold encounters: +0 Whole Event +1 Rift +2 Erekem +3 Moragg +4 Ichoron +5 Xevozz +6 Lavanthor +7 Zuramat +*/ +//inline uint32 RandRiftBoss() { return ((rand()%2) ? NPC_GUARDIAN : NPC_KEEPER); } + +struct Locations +{ + float x, y, z; + uint32 id; +}; + +static Locations PortalLoc[]= +{ + {1888.271, 810.781, 38.441}, // 0 center + {1857.125, 763.295, 38.654}, // 1 Lavanthor + {1925.480, 849.981, 47.174}, // 2 Zuramat + {1892.737, 744.589, 47.666}, // 3 Moragg + {1878.198, 850.005, 43.333}, // 4 Portal in front of Erekem + {1909.381, 806.796, 38.645}, // 5 Portal outside of Ichoron + {1936.101, 802.950, 52.417}, // 6 at the highest platform + + {1876.100, 857.079, 43.333}, // 7 Erekem + {1908.863, 785.647, 37.435}, // 8 Ichoron + {1905.364, 840.607, 38.670}, // 9 Xevozz +}; + +struct MANGOS_DLL_DECL instance_violet_hold : public ScriptedInstance +{ + instance_violet_hold(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + + bool bIsInBoss; + + uint8 m_uiLastBossID; + uint8 m_uiRiftPortalCount; + uint32 m_uiShieldPercent; + int8 m_uiPortalTime; + + uint64 m_uiSinclariGUID; + uint64 m_uiNPCSealDoorGUID; + + uint64 m_uiErekemGUID; + uint64 m_uiMoraggGUID; + uint64 m_uiIchoronGUID; + uint64 m_uiXevozzGUID; + uint64 m_uiLavanthorGUID; + uint64 m_uiZuramatGUID; + + uint64 m_uiSealDoorGUID; + uint64 m_uiErekemDoorGUID; + uint64 m_uiErekemDoorLeftGUID; + uint64 m_uiErekemDoorRightGUID; + uint64 m_uiMoraggDoorGUID; + uint64 m_uiIchoronDoorGUID; + uint64 m_uiXevozzDoorGUID; + uint64 m_uiLavanthorDoorGUID; + uint64 m_uiZuramatDoorGUID; + + void Initialize() + { + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + + m_uiSinclariGUID = 0; + m_uiNPCSealDoorGUID = 0; + + m_uiErekemGUID = 0; + m_uiMoraggGUID = 0; + m_uiIchoronGUID = 0; + m_uiXevozzGUID = 0; + m_uiLavanthorGUID = 0; + m_uiZuramatGUID = 0; + + m_uiSealDoorGUID = 0; + m_uiErekemDoorGUID = 0; + m_uiErekemDoorLeftGUID = 0; + m_uiErekemDoorRightGUID = 0; + m_uiMoraggDoorGUID = 0; + m_uiIchoronDoorGUID = 0; + m_uiXevozzDoorGUID = 0; + m_uiLavanthorDoorGUID = 0; + m_uiZuramatDoorGUID = 0; + Clear(); + } + + void Clear(){ + bIsInBoss = false; + + m_uiLastBossID = 0; + m_uiRiftPortalCount = 0; + m_uiPortalTime = 0; + m_uiShieldPercent = 100; + } + + void InitWorldState(bool Enable = true) + { + DoUpdateWorldState(WORLD_STATE_VH,Enable ? 1 : 0); + DoUpdateWorldState(WORLD_STATE_VH_PRISON,100); + DoUpdateWorldState(WORLD_STATE_VH_PORTALS,0); + } + + void OnPlayerEnter(Player* pPlayer) + { + if(m_auiEncounter[0] != NOT_STARTED) + pPlayer->SendUpdateWorldState(WORLD_STATE_VH,1); + } + + bool IsEncounterInProgress() const + { + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) + if (m_auiEncounter[i] == IN_PROGRESS) + return true; + + return false; + } + + void OnCreatureCreate(Creature* pCreature) + { + switch(pCreature->GetEntry()) + { + case NPC_SINCLARI: + m_uiSinclariGUID = pCreature->GetGUID(); + break; + case NPC_DOOR_SEAL: + m_uiNPCSealDoorGUID = pCreature->GetGUID(); + break; + case NPC_EREKEM: + m_uiErekemGUID = pCreature->GetGUID(); + break; + case NPC_MORAGG: + m_uiMoraggGUID = pCreature->GetGUID(); + break; + case NPC_ICHORON: + m_uiIchoronGUID = pCreature->GetGUID(); + break; + case NPC_XEVOZZ: + m_uiXevozzGUID = pCreature->GetGUID(); + break; + case NPC_LAVANTHOR: + m_uiLavanthorGUID = pCreature->GetGUID(); + break; + case NPC_ZURAMAT: + m_uiZuramatGUID = pCreature->GetGUID(); + break; + } + } + + void OnObjectCreate(GameObject* pGo) + { + switch(pGo->GetEntry()) + { + case GO_DOOR_SEAL: + m_uiSealDoorGUID = pGo->GetGUID(); + break; + case GO_DOOR_EREKEM: + m_uiErekemDoorGUID = pGo->GetGUID(); + break; + case GO_DOOR_EREKEM_LEFT: + m_uiErekemDoorLeftGUID = pGo->GetGUID(); + break; + case GO_DOOR_EREKEM_RIGHT: + m_uiErekemDoorRightGUID = pGo->GetGUID(); + break; + case GO_DOOR_MORAGG: + m_uiMoraggDoorGUID = pGo->GetGUID(); + break; + case GO_DOOR_ICHORON: + m_uiIchoronDoorGUID = pGo->GetGUID(); + break; + case GO_DOOR_XEVOZZ: + m_uiXevozzDoorGUID = pGo->GetGUID(); + break; + case GO_DOOR_LAVANTHOR: + m_uiLavanthorDoorGUID = pGo->GetGUID(); + break; + case GO_DOOR_ZURAMAT: + m_uiZuramatDoorGUID = pGo->GetGUID(); + break; + } + } + + void SetData(uint32 uiType, uint32 uiData) + { + switch(uiType) + { + case TYPE_EVENT: + if (uiData == IN_PROGRESS) + { + Clear(); + InitWorldState(); + } + else if (uiData == FAIL) + DoUseDoorOrButton(m_uiSealDoorGUID); + m_auiEncounter[0] = uiData; + break; + case TYPE_EREKEM: + m_auiEncounter[2] = uiData; + break; + case TYPE_MORAGG: + m_auiEncounter[3] = uiData; + break; + case TYPE_ICHORON: + m_auiEncounter[4] = uiData; + break; + case TYPE_XEVOZZ: + m_auiEncounter[5] = uiData; + break; + case TYPE_LAVANTHOR: + m_auiEncounter[6] = uiData; + break; + case TYPE_ZURAMAT: + m_auiEncounter[7] = uiData; + break; + case TYPE_RIFT: + if (uiData == SPECIAL){ + ++m_uiRiftPortalCount; + DoUpdateWorldState(WORLD_STATE_VH_PORTALS, m_uiRiftPortalCount); + } + else if (uiData == IN_PROGRESS) + bIsInBoss = true; + else + DoUseDoorOrButton(m_uiSealDoorGUID); + + m_auiEncounter[1] = uiData; + break; + case TYPE_DOOR: + if (uiData == SPECIAL) + { + --m_uiShieldPercent; + if(m_uiShieldPercent > 0) + DoUpdateWorldState(WORLD_STATE_VH_PRISON, m_uiShieldPercent); + else + m_auiEncounter[0] = FAIL; + } + break; + } + if (uiData == DONE) + bIsInBoss = false; + } + + uint32 GetData(uint32 uiType) + { + switch(uiType) + { + case TYPE_EVENT: + return m_auiEncounter[0]; + case TYPE_EREKEM: + return m_auiEncounter[2]; + case TYPE_MORAGG: + return m_auiEncounter[3]; + case TYPE_ICHORON: + return m_auiEncounter[4]; + case TYPE_XEVOZZ: + return m_auiEncounter[5]; + case TYPE_LAVANTHOR: + return m_auiEncounter[6]; + case TYPE_ZURAMAT: + return m_auiEncounter[7]; + case TYPE_RIFT: + return m_uiRiftPortalCount; + case TYPE_LASTBOSS: + { + if (!m_uiLastBossID) + m_uiLastBossID = urand(1, 5); + else + { + uint8 uiBossID = urand(1, 5); + if (uiBossID == m_uiLastBossID) + --m_uiLastBossID; + else + m_uiLastBossID = uiBossID; + } + + return m_uiLastBossID; + } + case DATA_BOSSTIME: + return bIsInBoss; + } + return 0; + } + + uint64 GetData64(uint32 uiData) + { + switch(uiData) + { + case DATA_EREKEM: + return m_uiErekemGUID; + case DATA_MORAGG: + return m_uiMoraggGUID; + case DATA_ICHORON: + return m_uiIchoronGUID; + case DATA_XEVOZZ: + return m_uiXevozzGUID; + case DATA_LAVANTHOR: + return m_uiLavanthorGUID; + case DATA_ZURAMAT: + return m_uiZuramatGUID; + case DATA_SINCLARI: + return m_uiSinclariGUID; + case DATA_NPC_SEAL_DOOR: + return m_uiNPCSealDoorGUID; + case DATA_SEAL_DOOR: + return m_uiSealDoorGUID; + case DATA_EREKEM_DOOR: + return m_uiErekemDoorGUID; + case DATA_MORAGG_DOOR: + return m_uiMoraggDoorGUID; + case DATA_ICHORON_DOOR: + return m_uiIchoronDoorGUID; + case DATA_XEVOZZ_DOOR: + return m_uiXevozzDoorGUID; + case DATA_LAVANTHOR_DOOR: + return m_uiLavanthorDoorGUID; + case DATA_ZURAMAT_DOOR: + return m_uiZuramatDoorGUID; + } + return 0; + } +}; + +InstanceData* GetInstanceData_instance_violet_hold(Map* pMap) +{ + return new instance_violet_hold(pMap); +} + +void AddSC_instance_violet_hold() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "instance_violet_hold"; + newscript->GetInstanceData = &GetInstanceData_instance_violet_hold; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/violet_hold/violet_hold.cpp b/scripts/northrend/violet_hold/violet_hold.cpp index 0fb50e789..df1a023f4 100644 --- a/scripts/northrend/violet_hold/violet_hold.cpp +++ b/scripts/northrend/violet_hold/violet_hold.cpp @@ -1,197 +1,590 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 - * 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, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* ScriptData -SDName: violet_hold -SDAuthor: ckegg -SD%Complete: 0 -SDComment: -SDCategory: The Violet Hold -EndScriptData */ - -#include "precompiled.h" -#include "def_violet_hold.h" - -struct Locations -{ - float x, y, z; - uint32 id; -}; - -static Locations BossLoc[]= -{ - {1857.125, 763.295, 38.654}, // Lavanthor - {1925.480, 849.981, 47.174}, // Zuramat - {1892.737, 744.589, 47.666}, // Moragg - {1876.100, 857.079, 43.333}, // Erekem - {1908.863, 785.647, 37.435}, // Ichoron - {1905.364, 840.607, 38.670}, // Xevozz -}; - -static Locations PortalLoc[]= -{ - {1888.271, 810.781, 38.441}, // 0 center - {1857.125, 763.295, 38.654}, // 1 Lavanthor - {1925.480, 849.981, 47.174}, // 2 Zuramat - {1892.737, 744.589, 47.666}, // 3 Moragg - {1878.198, 850.005, 43.333}, // 4 Portal in front of Erekem - {1909.381, 806.796, 38.645}, // 5 Portal outside of Ichoron - {1936.101, 802.950, 52.417}, // 6 at the highest platform -}; - -enum -{ - SPELL_SHIELD_DISRUPTION = 58291, -}; - -struct MANGOS_DLL_DECL npc_azure_saboteurAI : public ScriptedAI -{ - npc_azure_saboteurAI(Creature *pCreature) : ScriptedAI(pCreature) - { - m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); - Reset(); - } - ScriptedInstance *m_pInstance; - - bool m_bIsActiving; - - uint32 m_uiDisruption_Timer; - uint32 m_uiDisruptionCounter; - - uint8 m_uiBossID; - uint32 m_uiBossType; - uint64 m_uiBossGUID; - uint64 m_uiDoorGUID; - - void AttackStart(Unit* pWho) - { - return; - } - - void Reset() - { - m_bIsActiving = false; - - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - m_creature->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); - m_uiDisruptionCounter = 0; - m_uiDisruption_Timer = 1000; - - if (m_pInstance) - { - m_uiBossID = m_pInstance->GetData(TYPE_LASTBOSS); - - switch (m_uiBossID) - { - case 0: // Lavanthor - m_uiBossType = TYPE_LAVANTHOR; - m_uiBossGUID = m_pInstance->GetData64(DATA_LAVANTHOR); - m_uiDoorGUID = m_pInstance->GetData64(DATA_LAVANTHOR_DOOR); - break; - case 1: // Zuramat - m_uiBossType = TYPE_ZURAMAT; - m_uiBossGUID = m_pInstance->GetData64(DATA_ZURAMAT); - m_uiDoorGUID = m_pInstance->GetData64(DATA_ZURAMAT_DOOR); - break; - case 2: // Moragg - m_uiBossType = TYPE_MORAGG; - m_uiBossGUID = m_pInstance->GetData64(DATA_MORAGG); - m_uiDoorGUID = m_pInstance->GetData64(DATA_MORAGG_DOOR); - break; - case 3: // Erekem - m_uiBossType = TYPE_EREKEM; - m_uiBossGUID = m_pInstance->GetData64(DATA_EREKEM); - m_uiDoorGUID = m_pInstance->GetData64(DATA_EREKEM_DOOR); - break; - case 4: // Ichoron - m_uiBossType = TYPE_ICHORON; - m_uiBossGUID = m_pInstance->GetData64(DATA_ICHORON); - m_uiDoorGUID = m_pInstance->GetData64(DATA_ICHORON_DOOR); - break; - case 5: // Xevozz - m_uiBossType = TYPE_XEVOZZ; - m_uiBossGUID = m_pInstance->GetData64(DATA_XEVOZZ); - m_uiDoorGUID = m_pInstance->GetData64(DATA_XEVOZZ_DOOR); - break; - } - m_creature->GetMotionMaster()->MovePoint(0, BossLoc[m_uiBossID].x, BossLoc[m_uiBossID].y, BossLoc[m_uiBossID].z); - } - } - - void MovementInform(uint32 uiType, uint32 uiPointId) - { - if(uiType != POINT_MOTION_TYPE) - return; - - switch(uiPointId) - { - case 0: - m_bIsActiving = true; - break; - } - } - - void UpdateAI(const uint32 uiDiff) - { - if (m_bIsActiving) - if (m_uiDisruption_Timer < uiDiff) +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: violet_hold +SDAuthor: ckegg +SD%Complete: 0 +SDComment: +SDCategory: The Violet Hold +EndScriptData */ + +#include "precompiled.h" +#include "def_violet_hold.h" + +struct Locations +{ + float x, y, z; + uint32 id; +}; +struct WayPoints +{ + WayPoints(uint32 _id, float _x, float _y, float _z) + { + id = _id; + x = _x; + y = _y; + z = _z; + } + uint32 id; + float x, y, z; +}; + +static Locations PortalLoc[]= +{ + {1888.271, 810.781, 38.441}, // 0 center + {1857.125, 763.295, 38.654}, // 1 Lavanthor + {1925.480, 849.981, 47.174}, // 2 Zuramat + {1892.737, 744.589, 47.666}, // 3 Moragg + {1878.198, 850.005, 43.333}, // 4 Portal in front of Erekem + {1909.381, 806.796, 38.645}, // 5 Portal outside of Ichoron + {1936.101, 802.950, 52.417}, // 6 at the highest platform +}; +static Locations BossLoc[]= +{ + {1857.125, 763.295, 38.654}, // Lavanthor + {1925.480, 849.981, 47.174}, // Zuramat + {1892.737, 744.589, 47.666}, // Moragg + {1876.100, 857.079, 43.333}, // Erekem + {1908.863, 785.647, 37.435}, // Ichoron + {1905.364, 840.607, 38.670}, // Xevozz +}; +static Locations DragonsWP[]= +{ + //center, ichoron + {1869.393, 803.902, 38.768}, // 0 + {1859.843, 804.222, 44.008}, // 1 + {1827.960, 804.208, 44.364}, // 2 + + //From left side (lavanthor) + {1861.016, 789.717, 38.908}, // 3 + {1856.217, 796.705, 44.008}, // 4 + {1827.960, 804.208, 44.364}, // 5 + + //From Zuramat + {1931.446, 826.734, 47.556}, // 6 + {1913.049, 823.930, 38.792}, // 7 + {1827.960, 804.208, 44.364}, // 8 + {1869.393, 803.902, 38.768}, // 9 + {1859.843, 804.222, 44.008}, // 10 + {1827.960, 804.208, 44.364}, // 11 + + //From Morag + {1887.500, 763.096, 47.666}, // 12 + {1880.837, 775.769, 38.796}, // 13 + {1861.016, 789.717, 38.908}, // 14 + {1856.217, 796.705, 44.008}, // 15 + {1827.960, 804.208, 44.364}, // 16 + + //From erekem + {1878.280, 843.267, 43.333}, // 17 + {1872.311, 835.531, 38.780}, // 18 + {1861.997, 818.766, 38.650}, // 19 + {1857.348, 811.230, 44.008}, // 20 + {1827.960, 804.208, 44.364}, // 21 + + //From Highest platform + {1937.298, 824.557, 52.332}, // 22 + {1913.049, 823.930, 38.792}, // 23 + {1869.393, 803.902, 38.768}, // 24 + {1859.843, 804.222, 44.008}, // 25 + {1827.960, 804.208, 44.364}, // 26 + +}; +enum +{ + SPELL_TELEPORT_INSIDE = 62139, + SPELL_SHIELD_DISRUPTION = 58291, + + //DRAGONS SPELLS + //Azure Captain + SPELL_MORTAL_STRIKE = 32736, + SPELL_WHIRLWIND = 41057, + + //Azure Raider + SPELL_CONCUSSION_BLOW = 52719, + SPELL_MAGIC_REFLECTION = 60158, + + //Azure Sorceror + SPELL_ARCANE_STREAM = 60181, + SPELL_ARCANE_STREAM_H = 60204, + SPELL_MANA_DETONATION = 60182, + SPELL_MANA_DETONATION_H = 60205, + + //Azure stalker + SPELL_BACKSTAB = 58471, + SPELL_TACTICAL_BLINK = 58470, +}; + +uint32 m_uiNextPortal_Timer; +/*###### +## mob_vh_dragons +## This script is for ALL mobs which are spawned from portals, +## they have to be scripted in SD2 because in EventAI you cant +## check for distance from door seal :/ +## (Intro not implented yet) +######*/ +struct MANGOS_DLL_DECL mob_vh_dragonsAI : public ScriptedAI +{ + mob_vh_dragonsAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegular = pCreature->GetMap()->IsRegularDifficulty(); + WayPointList.clear(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsRegular; + uint32 creatureEntry; + uint32 motherPortalID; + uint32 WalkTimer; + int8 portalLoc; + bool IsWalking; + bool MovementStarted; + Creature* pDoorSeal; + + std::list WayPointList; + std::list::iterator WayPoint; + + //Azure Captain + uint32 m_uiMortalStrike_Timer; + uint32 m_uiWhirlwind_Timer; + + //Azure Raider + uint32 m_uiConcussionBlow_Timer; + uint32 m_uiMagicReflection_Timer; + + //Azure Sorceror + uint32 m_uiArcaneStream_Timer; + uint32 m_uiManaDetonation_Timer; + + //Azure Stalker + uint32 m_uiBackstab_Timer; + uint32 m_uiBlink_Timer; + + void Reset(){ + creatureEntry = m_creature->GetEntry(); + motherPortalID = 0; + WalkTimer = 200; + portalLoc = -1; + IsWalking = false; + MovementStarted = false; + pDoorSeal = GetClosestCreatureWithEntry(m_creature, NPC_DOOR_SEAL, 150.0f); + + //Azure Captain + m_uiMortalStrike_Timer = 3000; + m_uiWhirlwind_Timer = 5000; + + //Azure Raider + m_uiConcussionBlow_Timer = 3000; + m_uiMagicReflection_Timer = 10000; + + //Azure Sorceror + m_uiArcaneStream_Timer = 5000; + m_uiManaDetonation_Timer = 3000; + + //Azure Stalker + m_uiBackstab_Timer = 7100; + m_uiBlink_Timer = 7000; + } + void StartMovement() + { + if(!WayPointList.empty() || MovementStarted) + return; + + uint8 start = 0; + uint8 end = 0; + switch(portalLoc) + { + case -1: + return; + //center & ichoron + case 0: + case 5: + start = 0; + end = 2; + break; + //From lavanthor + case 1: + start = 3; + end = 5; + break; + // From Zuramat + case 2: + start = 6; + end = 11; + break; + //From Moragg + case 3: + start = 12; + end = 16; + break; + //From Erekem + case 4: + start = 17; + end = 21; + break; + //From highest platform + case 6: + start = 22; + end = 26; + break; + } + uint8 wpId = 0; + for(uint8 i = start; i <= end; ++i){ + error_log("AddWP: %u", i); + AddWaypoint(wpId, DragonsWP[i].x, DragonsWP[i].y, DragonsWP[i].z); + wpId++; + } + + WayPoint = WayPointList.begin(); + m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + IsWalking = true; + MovementStarted = true; + } + void AddWaypoint(uint32 id, float x, float y, float z) + { + WayPoints DWP(id, x, y, z); + WayPointList.push_back(DWP); + } + void MovementInform(uint32 uiType, uint32 uiPointId) + { + if(uiType != POINT_MOTION_TYPE || creatureEntry == NPC_GUARDIAN || creatureEntry == NPC_KEEPER) + return; + + if(WayPoint->id != uiPointId) + return; + + ++WayPoint; + WalkTimer = 200; + } + void UpdateAI(const uint32 uiDiff){ + if(portalLoc != -1) + StartMovement(); + + if (IsWalking && WalkTimer) + { + if (WalkTimer <= uiDiff) { - if (m_uiDisruptionCounter < 3) - DoCast(m_creature, SPELL_SHIELD_DISRUPTION); - else if (m_uiDisruptionCounter == 3) + if (WayPoint != WayPointList.end()) { - m_pInstance->DoUseDoorOrButton(m_uiDoorGUID); - m_pInstance->SetData(m_uiBossType, SPECIAL); + m_creature->GetMotionMaster()->MovePoint(WayPoint->id, WayPoint->x, WayPoint->y,WayPoint->z); + WalkTimer = 0; } - else - m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - - ++m_uiDisruptionCounter; - m_uiDisruption_Timer = 1000; - } - else m_uiDisruption_Timer -= uiDiff; - } -}; - -struct MANGOS_DLL_DECL npc_sinclariAI : public ScriptedAI -{ - npc_sinclariAI(Creature *pCreature) : ScriptedAI(pCreature) - { - m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); - Reset(); - } - ScriptedInstance *m_pInstance; - - uint8 m_uiRiftPortalCount; - uint32 m_uiNextPortal_Timer; - uint32 m_uiBossCheck_Timer; - - void Reset() - { - m_uiRiftPortalCount = 0; - m_uiNextPortal_Timer = 0; - m_uiBossCheck_Timer = 0; - } + }else WalkTimer -= uiDiff; + } + + //Corrupt Seal + if(pDoorSeal){ + if(m_creature->IsWithinDist(pDoorSeal, 20.0f, false) && !m_creature->IsNonMeleeSpellCasted(false)) + { + IsWalking = false; + WayPointList.clear(); + m_creature->GetMotionMaster()->Clear(false); + m_creature->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + DoCast(pDoorSeal, SPELL_CORRUPT); + } + } + + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if(m_creature->getVictim()) + if(m_creature->getVictim()->GetEntry() == NPC_DOOR_SEAL) + return; + switch(creatureEntry) + { + case NPC_AZURE_CAPTAIN: + AzureCaptain_UpdateAI(uiDiff); + break; + case NPC_AZURE_RAIDER: + AzureRaider_UpdateAI(uiDiff); + break; + case NPC_AZURE_SORCEROR: + AzureSorceror_UpdateAI(uiDiff); + break; + case NPC_AZURE_STALKER: + AzureStalker_UpdateAI(uiDiff); + break; + case NPC_GUARDIAN: + case NPC_KEEPER: + case NPC_AZURE_BINDER: + case NPC_AZURE_INVADER: + case NPC_AZURE_MAGE_SLAYER: + case NPC_AZURE_SPELLBREAKER: + break; + default: + debug_log("SD2: The Violet Hold: Unhandled dragon entry %u!", m_creature->GetEntry()); + break; + } + DoMeleeAttackIfReady(); + } + //Azure Captain + void AzureCaptain_UpdateAI(const uint32 uiDiff) + { + //Mortal Strike + if (m_uiMortalStrike_Timer <= uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_MORTAL_STRIKE); + m_uiMortalStrike_Timer = 6000; + }else m_uiMortalStrike_Timer -= uiDiff; + + //Whirlwind + if (m_uiWhirlwind_Timer <= uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_WHIRLWIND); + m_uiWhirlwind_Timer = 15000; + }else m_uiWhirlwind_Timer -= uiDiff; + } + //Azure Raider + void AzureRaider_UpdateAI(const uint32 uiDiff) + { + //Concusion Blow + if (m_uiConcussionBlow_Timer <= uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_CONCUSSION_BLOW); + m_uiMortalStrike_Timer = 7000; + }else m_uiConcussionBlow_Timer -= uiDiff; + + //Magic reflection + if (m_uiMagicReflection_Timer <= uiDiff) + { + DoCast(m_creature, SPELL_MAGIC_REFLECTION); + m_uiMagicReflection_Timer = 30000; + }else m_uiMagicReflection_Timer -= uiDiff; + } + //Azure Sorceror + void AzureSorceror_UpdateAI(const uint32 uiDiff) + { + //Arcane Stream + if (m_uiArcaneStream_Timer <= uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(pTarget, m_bIsRegular ? SPELL_ARCANE_STREAM : SPELL_ARCANE_STREAM_H); + m_uiArcaneStream_Timer = 7000; + }else m_uiArcaneStream_Timer -= uiDiff; + + //Mana Detonation + if (m_uiManaDetonation_Timer <= uiDiff) + { + DoCast(m_creature, m_bIsRegular ? SPELL_MANA_DETONATION : SPELL_MANA_DETONATION_H); + m_uiManaDetonation_Timer = 18000; + }else m_uiManaDetonation_Timer -= uiDiff; + } + //Azure Stalker + void AzureStalker_UpdateAI(const uint32 uiDiff) + { + //Backstab + if (m_uiBackstab_Timer <= uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_BACKSTAB); + m_uiBackstab_Timer = 15100; + }else m_uiBackstab_Timer -= uiDiff; + + //Tactical blink + if (m_uiBlink_Timer <= uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_TACTICAL_BLINK); + m_uiBlink_Timer = 15000; + }else m_uiBlink_Timer -= uiDiff; + } +}; + +/*###### +## npc_violet_portal +######*/ +struct MANGOS_DLL_DECL npc_violet_portalAI : public ScriptedAI +{ + npc_violet_portalAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + bool m_uiGroupSpawned; + uint8 portalType; // 0 = nothing, 1 = Guard & spawns, 2 = Group of elites + uint32 portalID; // To identify portal... + int8 portalLoc; + + uint32 TimeRiftWave_Timer; + uint32 Check_Timer; + + void Reset() + { + m_uiGroupSpawned = false; + portalType = 0; + portalID = 0; + portalLoc = -1; + + TimeRiftWave_Timer = 15000; + Check_Timer = 5000; + } + uint32 SelectRandSummon() + { + uint32 entry = 0; + if(portalType == 1) + { + switch (urand(0, 3)) + { + case 0: entry = NPC_AZURE_BINDER; break; + case 1: entry = NPC_AZURE_INVADER; break; + case 2: entry = NPC_AZURE_MAGE_SLAYER; break; + case 3: entry = NPC_AZURE_SPELLBREAKER; break; + } + }else{ + switch (urand(0, 3)) + { + case 0: entry = NPC_AZURE_CAPTAIN; break; + case 1: entry = NPC_AZURE_RAIDER; break; + case 2: entry = NPC_AZURE_SORCEROR; break; + case 3: entry = NPC_AZURE_STALKER; break; + } + } + return entry; + } + void SpawnGroup() + { + if(portalType == 0) + return; + + uint8 uiSpawnCount = (m_pInstance->GetData(TYPE_RIFT) < 12) ? 3 : 4; + for(uint8 i = 0; i < uiSpawnCount; i++) + { + uint32 uiSpawnEntry = SelectRandSummon(); + if(Creature* pSummoned = m_creature->SummonCreature(uiSpawnEntry, m_creature->GetPositionX()-5+rand()%10, m_creature->GetPositionY()-5+rand()%10, m_creature->GetPositionZ(), 0, TEMPSUMMON_CORPSE_DESPAWN, 0)) + { + error_log("Spawnuje NPC %u, motherPortalID %u, portalLoc %u", uiSpawnEntry, portalID, portalLoc); + ((mob_vh_dragonsAI*)pSummoned->AI())->motherPortalID = portalID; + ((mob_vh_dragonsAI*)pSummoned->AI())->portalLoc = portalLoc; + } + } + } + bool IsThereNearElite(float range) + { + //Azure captain + if(Creature* pTemp = GetClosestCreatureWithEntry(m_creature, NPC_AZURE_CAPTAIN, range)) + { + if(((mob_vh_dragonsAI*)pTemp->AI())->motherPortalID == portalID) + return true; + } + //Azure raider + else if(Creature* pTemp = GetClosestCreatureWithEntry(m_creature, NPC_AZURE_RAIDER, range)) + { + if(((mob_vh_dragonsAI*)pTemp->AI())->motherPortalID == portalID) + return true; + } + //Azure sorceror + else if(Creature* pTemp = GetClosestCreatureWithEntry(m_creature, NPC_AZURE_SORCEROR, range)) + { + if(((mob_vh_dragonsAI*)pTemp->AI())->motherPortalID == portalID) + return true; + } + //Azure Stalker + else if(Creature* pTemp = GetClosestCreatureWithEntry(m_creature, NPC_AZURE_STALKER, range)) + { + if(((mob_vh_dragonsAI*)pTemp->AI())->motherPortalID == portalID) + return true; + } + return false; + } + void UpdateAI(const uint32 diff) + { + if (!m_pInstance) + return; + + if(m_pInstance->GetData(TYPE_EVENT) != IN_PROGRESS) + return; + + switch(portalType) + { + case 0: + return; + case 1: + if (TimeRiftWave_Timer < diff) + { + error_log("SpawnGroup()"); + SpawnGroup(); + TimeRiftWave_Timer = 15000; + }else TimeRiftWave_Timer -= diff; + + if (!m_creature->IsNonMeleeSpellCasted(false)) + { + m_uiNextPortal_Timer = 5000; + debug_log("SD2: npc_time_rift: not casting anylonger, i need to die."); + m_creature->setDeathState(JUST_DIED); + } + break; + case 2: + if(!m_uiGroupSpawned) + { + SpawnGroup(); + m_uiGroupSpawned = true; + } + if (Check_Timer < diff) + { + if(!IsThereNearElite(150.0f)) + { + m_uiNextPortal_Timer = 5000; + debug_log("SD2: npc_time_rift: No elite, i need to die."); + m_creature->setDeathState(JUST_DIED); + } + Check_Timer = 1000; + }else Check_Timer -= diff; + break; + } + } +}; +/*###### +## npc_sinclari +######*/ +struct MANGOS_DLL_DECL npc_sinclariAI : public ScriptedAI +{ + npc_sinclariAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + Reset(); + } + ScriptedInstance *m_pInstance; + + uint8 m_uiRiftPortalCount; + uint32 m_uiBossCheck_Timer; + uint32 m_uiPortalCheck_Timer; + + void Reset() + { + m_uiRiftPortalCount = 0; + m_uiNextPortal_Timer = 0; + m_uiBossCheck_Timer = 0; + m_uiPortalCheck_Timer = 1000; + } void SetEvent() { m_creature->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE); m_uiNextPortal_Timer = 5000; - if (m_pInstance) + m_creature->GetMotionMaster()->MovePoint(0, 1815.571, 800.112, 44.364); + if (m_pInstance){ + m_pInstance->SetData(TYPE_EVENT, IN_PROGRESS); m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(DATA_SEAL_DOOR)); + } } void DoSpawnPortal() @@ -202,42 +595,56 @@ struct MANGOS_DLL_DECL npc_sinclariAI : public ScriptedAI pTemp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); pTemp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - uint32 entry = urand(0, 1) ? NPC_GUARDIAN : NPC_KEEPER; - if (Creature* pSummoned = pTemp->SummonCreature(entry, PortalLoc[tmp].x, PortalLoc[tmp].y, PortalLoc[tmp].z, pTemp->GetOrientation(), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000)) + //set portal type + uint8 portalType = rand()%2+1; + uint32 portalID = rand()%50000; + ((npc_violet_portalAI*)pTemp->AI())->portalType = portalType; + ((npc_violet_portalAI*)pTemp->AI())->portalID = portalID; + ((npc_violet_portalAI*)pTemp->AI())->portalLoc = tmp; + + if(portalType == 1) { - pSummoned->AddThreat(pTemp); - pTemp->CastSpell(pSummoned, SPELL_PORTAL_CHANNEL,false); + uint32 entry = urand(0, 1) ? NPC_GUARDIAN : NPC_KEEPER; + if (Creature* pSummoned = pTemp->SummonCreature(entry, PortalLoc[tmp].x, PortalLoc[tmp].y, PortalLoc[tmp].z, pTemp->GetOrientation(), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000)) + { + pSummoned->AddThreat(pTemp); + pTemp->CastSpell(pSummoned, SPELL_PORTAL_CHANNEL,false); + ((mob_vh_dragonsAI*)pSummoned->AI())->motherPortalID = portalID; + } } } } - void UpdateAI(const uint32 uiDiff) - { - if (m_uiNextPortal_Timer) - { - if (m_uiNextPortal_Timer <= uiDiff) - { - ++m_uiRiftPortalCount; - if (m_pInstance) - { - m_pInstance->DoUpdateWorldState(WORLD_STATE_VH, m_uiRiftPortalCount); - m_pInstance->SetData(TYPE_RIFT, SPECIAL); - } - - if (m_uiRiftPortalCount != 6 && m_uiRiftPortalCount != 12 && m_uiRiftPortalCount != 18) - { + void UpdateAI(const uint32 uiDiff) + { + if(m_pInstance->GetData(TYPE_EVENT) == NOT_STARTED) + return; + + if (m_uiNextPortal_Timer) + { + if (m_uiNextPortal_Timer <= uiDiff) + { + ++m_uiRiftPortalCount; + if (m_pInstance) + { + m_pInstance->DoUpdateWorldState(WORLD_STATE_VH, m_uiRiftPortalCount); + m_pInstance->SetData(TYPE_RIFT, SPECIAL); + } + + if (m_uiRiftPortalCount != 6 && m_uiRiftPortalCount != 12 && m_uiRiftPortalCount != 18) + { DoSpawnPortal(); if (m_uiRiftPortalCount < 12) - m_uiNextPortal_Timer = 140000; - else m_uiNextPortal_Timer = 120000; + else + m_uiNextPortal_Timer = 90000; } else if (m_uiRiftPortalCount == 6 || m_uiRiftPortalCount == 12) { if (Creature* pTemp = m_creature->SummonCreature(NPC_PORTAL, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z, 0, TEMPSUMMON_TIMED_DESPAWN, 1500)) { Creature* pSummoned = m_creature->SummonCreature(NPC_AZURE_SABOTEUR, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); - + pSummoned->AddThreat(pTemp); pTemp->CastSpell(pSummoned, SPELL_PORTAL_CHANNEL, false); } @@ -263,7 +670,7 @@ struct MANGOS_DLL_DECL npc_sinclariAI : public ScriptedAI if (m_uiBossCheck_Timer <= uiDiff) { if (!m_pInstance->GetData(DATA_BOSSTIME)) - m_uiNextPortal_Timer = 30000; + m_uiNextPortal_Timer = 30000; m_uiBossCheck_Timer = 1000; } @@ -275,121 +682,253 @@ struct MANGOS_DLL_DECL npc_sinclariAI : public ScriptedAI } }; -bool GossipHello_npc_sinclari(Player* pPlayer, Creature* pCreature) -{ - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu( pCreature->GetGUID() ); - - pPlayer->ADD_GOSSIP_ITEM( 0, "I am ready.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, pCreature->GetGUID()); - - return true; -} - -bool GossipSelect_npc_sinclari(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - switch (uiAction) - { - case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->CLOSE_GOSSIP_MENU(); - ((npc_sinclariAI*)pCreature->AI())->SetEvent(); - break; - } - return true; -} - -struct MANGOS_DLL_DECL npc_violet_portalAI : public ScriptedAI -{ - npc_violet_portalAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); - Reset(); - } - - ScriptedInstance* m_pInstance; - bool m_bIsRegularMode; - - uint32 TimeRiftWave_Timer; - - void Reset() - { - TimeRiftWave_Timer = 30000; - } - - void UpdateAI(const uint32 diff) - { - if (!m_pInstance) - return; - - if (TimeRiftWave_Timer < diff) - { - uint8 uiSpawnCount = (m_pInstance->GetData(TYPE_RIFT) < 12) ? 3 : 4; - for(uint8 i = 0; i < uiSpawnCount; i++) - { - uint32 uiSpawnEntry = 0; - switch (urand(0, 3)) - { - case 0: uiSpawnEntry = NPC_AZURE_CAPTAIN; break; - case 1: uiSpawnEntry = NPC_AZURE_RAIDER; break; - case 2: uiSpawnEntry = NPC_AZURE_SORCEROR; break; - case 3: uiSpawnEntry = NPC_AZURE_STALKER; break; - } - if (Creature* pTemp = m_creature->SummonCreature(uiSpawnEntry, m_creature->GetPositionX()-5+rand()%10, m_creature->GetPositionY()-5+rand()%10, m_creature->GetPositionZ(), 0, TEMPSUMMON_CORPSE_DESPAWN, 0)) - { - if (Creature* pTarget = GetClosestCreatureWithEntry(m_creature, NPC_SINCLARI, 150.0f)) - { - pTemp->AddThreat(pTarget); - pTemp->AI()->AttackStart(pTarget); - } - } - } - - TimeRiftWave_Timer = 30000; - }else TimeRiftWave_Timer -= diff; - - if (m_creature->IsNonMeleeSpellCasted(false)) - return; - - debug_log("SD2: npc_time_rift: not casting anylonger, i need to die."); - m_creature->setDeathState(JUST_DIED); +#define GOSSIP_ITEM_START_EVENT "Activate the crystals when we get in trouble, right." +#define GOSSIP_ITEM_TELE_IN "I need to go in!" + +bool GossipHello_npc_sinclari(Player* pPlayer, Creature* pCreature) +{ + ScriptedInstance* m_pInstance; + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu( pCreature->GetGUID() ); + + if(m_pInstance->GetData(TYPE_EVENT) == NOT_STARTED){ + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_START_EVENT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + }else{ + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TELE_IN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + } + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_sinclari(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch (uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->CLOSE_GOSSIP_MENU(); + ((npc_sinclariAI*)pCreature->AI())->SetEvent(); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->CastSpell(pPlayer, SPELL_TELEPORT_INSIDE, false); + } + return true; +} +/*###### +## npc_door_seal_vh +######*/ +struct MANGOS_DLL_DECL npc_door_sealAI : public ScriptedAI +{ + npc_door_sealAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 CheckTimer; + uint32 SpellCorrupt_Timer; + uint8 lastPortal; + + void Reset() + { + CheckTimer = 0; + SpellCorrupt_Timer = 0; + lastPortal = 0; +} + void SpellHit(Unit* caster, const SpellEntry* spell) + { + if (SpellCorrupt_Timer) + return; + + if (spell->Id == SPELL_CORRUPT) + SpellCorrupt_Timer = 1000; + } + void JustDied(Unit* pKiller) + { + m_creature->Respawn(); + } + + void UpdateAI(const uint32 diff){ + if (SpellCorrupt_Timer) + { + if (SpellCorrupt_Timer <= diff) + { + m_pInstance->SetData(TYPE_DOOR,SPECIAL); + + if (m_creature->HasAura(SPELL_CORRUPT,0)) + SpellCorrupt_Timer = 1500; + else + SpellCorrupt_Timer = 0; + }else SpellCorrupt_Timer -= diff; + } + } +}; + +/*###### +## npc_azure_saboteur +######*/ +struct MANGOS_DLL_DECL npc_azure_saboteurAI : public ScriptedAI +{ + npc_azure_saboteurAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + Reset(); + } + ScriptedInstance *m_pInstance; + + bool m_bIsActiving; + + uint32 m_uiDisruption_Timer; + uint32 m_uiDisruptionCounter; + + uint8 m_uiBossID; + uint32 m_uiBossType; + uint64 m_uiBossGUID; + uint64 m_uiDoorGUID; + + void AttackStart(Unit* pWho) + { + return; + } + + void Reset() + { + m_bIsActiving = false; + + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + m_uiDisruptionCounter = 0; + m_uiDisruption_Timer = 1000; + + if (m_pInstance) + { + m_uiBossID = m_pInstance->GetData(TYPE_LASTBOSS); + + switch (m_uiBossID) + { + case 0: // Lavanthor + m_uiBossType = TYPE_LAVANTHOR; + m_uiBossGUID = m_pInstance->GetData64(DATA_LAVANTHOR); + m_uiDoorGUID = m_pInstance->GetData64(DATA_LAVANTHOR_DOOR); + break; + case 1: // Zuramat + m_uiBossType = TYPE_ZURAMAT; + m_uiBossGUID = m_pInstance->GetData64(DATA_ZURAMAT); + m_uiDoorGUID = m_pInstance->GetData64(DATA_ZURAMAT_DOOR); + break; + case 2: // Moragg + m_uiBossType = TYPE_MORAGG; + m_uiBossGUID = m_pInstance->GetData64(DATA_MORAGG); + m_uiDoorGUID = m_pInstance->GetData64(DATA_MORAGG_DOOR); + break; + case 3: // Erekem + m_uiBossType = TYPE_EREKEM; + m_uiBossGUID = m_pInstance->GetData64(DATA_EREKEM); + m_uiDoorGUID = m_pInstance->GetData64(DATA_EREKEM_DOOR); + break; + case 4: // Ichoron + m_uiBossType = TYPE_ICHORON; + m_uiBossGUID = m_pInstance->GetData64(DATA_ICHORON); + m_uiDoorGUID = m_pInstance->GetData64(DATA_ICHORON_DOOR); + break; + case 5: // Xevozz + m_uiBossType = TYPE_XEVOZZ; + m_uiBossGUID = m_pInstance->GetData64(DATA_XEVOZZ); + m_uiDoorGUID = m_pInstance->GetData64(DATA_XEVOZZ_DOOR); + break; + } + m_creature->GetMotionMaster()->MovePoint(0, BossLoc[m_uiBossID].x, BossLoc[m_uiBossID].y, BossLoc[m_uiBossID].z); + } + } + + void MovementInform(uint32 uiType, uint32 uiPointId) + { + if(uiType != POINT_MOTION_TYPE) + return; + + switch(uiPointId) + { + case 0: + m_bIsActiving = true; + break; + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_bIsActiving) + if (m_uiDisruption_Timer < uiDiff) + { + if (m_uiDisruptionCounter < 3) + DoCast(m_creature, SPELL_SHIELD_DISRUPTION); + else if (m_uiDisruptionCounter == 3) + { + m_pInstance->DoUseDoorOrButton(m_uiDoorGUID); + m_pInstance->SetData(m_uiBossType, SPECIAL); + } + else + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + + ++m_uiDisruptionCounter; + m_uiDisruption_Timer = 1000; + } + else m_uiDisruption_Timer -= uiDiff; } }; - -CreatureAI* GetAI_npc_sinclari(Creature* pCreature) -{ - return new npc_sinclariAI (pCreature); -} - -CreatureAI* GetAI_npc_azure_saboteur(Creature* pCreature) -{ - return new npc_azure_saboteurAI (pCreature); -} - -CreatureAI* GetAI_npc_violet_portal(Creature* pCreature) -{ - return new npc_violet_portalAI (pCreature); -} - -void AddSC_violet_hold() -{ - Script *newscript; - - newscript = new Script; - newscript->Name = "npc_sinclari"; - newscript->GetAI = &GetAI_npc_sinclari; - newscript->pGossipHello = &GossipHello_npc_sinclari; - newscript->pGossipSelect = &GossipSelect_npc_sinclari; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_azure_saboteur"; - newscript->GetAI = &GetAI_npc_azure_saboteur; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_violet_portal"; - newscript->GetAI = &GetAI_npc_violet_portal; - newscript->RegisterSelf(); - -} + +CreatureAI* GetAI_npc_azure_saboteur(Creature* pCreature) +{ + return new npc_azure_saboteurAI (pCreature); +} +CreatureAI* GetAI_mob_vh_dragons(Creature* pCreature) +{ + return new mob_vh_dragonsAI(pCreature); +} +CreatureAI* GetAI_npc_sinclari(Creature* pCreature) +{ + return new npc_sinclariAI (pCreature); +} +CreatureAI* GetAI_npc_violet_portal(Creature* pCreature) +{ + return new npc_violet_portalAI (pCreature); +} +CreatureAI* GetAI_npc_door_seal(Creature* pCreature) +{ + return new npc_door_sealAI(pCreature); +} +void AddSC_violet_hold() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_sinclari"; + newscript->GetAI = &GetAI_npc_sinclari; + newscript->pGossipHello = &GossipHello_npc_sinclari; + newscript->pGossipSelect = &GossipSelect_npc_sinclari; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_violet_portal"; + newscript->GetAI = &GetAI_npc_violet_portal; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_door_seal_vh"; + newscript->GetAI = &GetAI_npc_door_seal; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_azure_saboteur"; + newscript->GetAI = &GetAI_npc_azure_saboteur; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_vh_dragons"; + newscript->GetAI = &GetAI_mob_vh_dragons; + newscript->RegisterSelf(); +} \ No newline at end of file diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index cc2905cb1..ce878b1d0 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -269,7 +269,8 @@ extern void AddSC_boss_anubarak(); //azjol-nerub extern void AddSC_boss_hadronox(); extern void AddSC_boss_krikthir(); extern void AddSC_instance_azjol_nerub(); -extern void AddSC_boss_novos(); //draktharon_keep +extern void AddSC_boss_dred(); //draktharon_keep +extern void AddSC_boss_novos(); extern void AddSC_boss_tharonja(); extern void AddSC_boss_trollgore(); extern void AddSC_boss_colossus(); //gundrak @@ -699,6 +700,7 @@ void AddScripts() AddSC_boss_krikthir(); AddSC_instance_azjol_nerub(); AddSC_boss_novos(); //draktharon_keep + AddSC_boss_dred(); AddSC_boss_tharonja(); AddSC_boss_trollgore(); AddSC_boss_colossus(); //gundrak From fbfa5327f7c1f75af9c0f7a144d246a570369224 Mon Sep 17 00:00:00 2001 From: Insider Date: Mon, 4 Jan 2010 16:02:05 +0700 Subject: [PATCH 092/405] SD2 updated to 1539 --- scripts/northrend/dragonblight.cpp | 51 ++++++++++++++++++- .../boss_skarvald_and_dalronn.cpp | 15 ++++++ sql/Updates/Makefile.am | 3 +- sql/Updates/r1538_mangos.sql | 1 + sql/mangos_scriptname_full.sql | 1 + 5 files changed, 69 insertions(+), 2 deletions(-) create mode 100644 sql/Updates/r1538_mangos.sql diff --git a/scripts/northrend/dragonblight.cpp b/scripts/northrend/dragonblight.cpp index 8e91ba44a..a0b71526a 100644 --- a/scripts/northrend/dragonblight.cpp +++ b/scripts/northrend/dragonblight.cpp @@ -17,13 +17,14 @@ /* ScriptData SDName: Dragonblight SD%Complete: 100 -SDComment: Quest support: 12499/12500(end sequenze). Taxi paths Wyrmrest temple. +SDComment: Quest support: 12166, 12499/12500(end sequenze). Taxi paths Wyrmrest temple. SDCategory: Dragonblight EndScriptData */ /* ContentData npc_afrasastrasz npc_alexstrasza_wr_gate +npc_liquid_fire_of_elune npc_tariolstrasz npc_torastrasza EndContentData */ @@ -106,6 +107,49 @@ bool GossipSelect_npc_alexstrasza_wr_gate(Player* pPlayer, Creature* pCreature, return true; } +/*###### +## npc_liquid_fire_of_elune (quest 12166) +######*/ + +enum +{ + NPC_ELK = 26616, + NPC_ELK_BUNNY = 27111, + NPC_GRIZZLY = 26643, + NPC_GRIZZLY_BUNNY = 27112, + + SPELL_LIQUID_FIRE = 46770, + SPELL_LIQUID_FIRE_AURA = 47972 +}; + +bool EffectDummyCreature_npc_liquid_fire_of_elune(Unit* pCaster, uint32 uiSpellId, uint32 uiEffIndex, Creature* pCreatureTarget) +{ + //always check spellid and effectindex + if (uiSpellId == SPELL_LIQUID_FIRE && uiEffIndex == 0) + { + if (pCaster->GetTypeId() == TYPEID_PLAYER) + { + if (pCreatureTarget->HasAura(SPELL_LIQUID_FIRE_AURA)) + return true; + + if (pCreatureTarget->GetEntry() == NPC_ELK) + { + pCreatureTarget->CastSpell(pCreatureTarget, SPELL_LIQUID_FIRE_AURA, true); + ((Player*)pCaster)->KilledMonsterCredit(NPC_ELK_BUNNY, 0); + } + else if (pCreatureTarget->GetEntry() == NPC_GRIZZLY) + { + pCreatureTarget->CastSpell(pCreatureTarget, SPELL_LIQUID_FIRE_AURA, true); + ((Player*)pCaster)->KilledMonsterCredit(NPC_GRIZZLY_BUNNY, 0); + } + } + + //always return true when we are handling this spell and effect + return true; + } + return false; +} + /*###### ## npc_tariolstrasz ######*/ @@ -204,6 +248,11 @@ void AddSC_dragonblight() newscript->pGossipSelect = &GossipSelect_npc_alexstrasza_wr_gate; newscript->RegisterSelf(); + newscript = new Script; + newscript->Name = "npc_liquid_fire_of_elune"; + newscript->pEffectDummyCreature = &EffectDummyCreature_npc_liquid_fire_of_elune; + newscript->RegisterSelf(); + newscript = new Script; newscript->Name = "npc_tariolstrasz"; newscript->pGossipHello = &GossipHello_npc_tariolstrasz; diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp index e109dca2f..bf77fc75f 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp @@ -98,6 +98,21 @@ struct MANGOS_DLL_DECL boss_s_and_d_dummyAI : public ScriptedAI void Reset() { } + void JustReachedHome() + { + if (Creature* pBuddy = GetBuddy()) + { + if (pBuddy->isDead()) + pBuddy->Respawn(); + } + + if (Creature* pGhost = (Creature*)Unit::GetUnit(*m_creature, m_uiGhostGUID)) + { + if (pGhost->isAlive()) + pGhost->ForcedDespawn(); + } + } + void EnterCombat(Unit* pWho) { if (!pWho) diff --git a/sql/Updates/Makefile.am b/sql/Updates/Makefile.am index 35f8402a6..ac8186707 100644 --- a/sql/Updates/Makefile.am +++ b/sql/Updates/Makefile.am @@ -62,4 +62,5 @@ pkgdata_DATA = \ r1525_mangos.sql \ r1525_scriptdev2.sql \ r1531_mangos.sql \ - r1536_mangos.sql + r1536_mangos.sql \ + r1538_mangos.sql diff --git a/sql/Updates/r1538_mangos.sql b/sql/Updates/r1538_mangos.sql new file mode 100644 index 000000000..d3affffcf --- /dev/null +++ b/sql/Updates/r1538_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_liquid_fire_of_elune' WHERE entry IN (26616,26643); diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 9bfedcee9..65605e7d5 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -426,6 +426,7 @@ UPDATE creature_template SET ScriptName='npc_aged_dying_ancient_kodo' WHERE entr /* DRAGONBLIGHT */ UPDATE creature_template SET ScriptName='npc_afrasastrasz' WHERE entry=27575; UPDATE creature_template SET ScriptName='npc_alexstrasza_wr_gate' WHERE entry=31333; +UPDATE creature_template SET ScriptName='npc_liquid_fire_of_elune' WHERE entry IN (26616,26643); UPDATE creature_template SET ScriptName='npc_tariolstrasz' WHERE entry=26443; UPDATE creature_template SET ScriptName='npc_torastrasza' WHERE entry=26949; From fc6bffaf03914c45e9bb76c693fd100b72835efd Mon Sep 17 00:00:00 2001 From: Insider Date: Tue, 5 Jan 2010 16:57:50 +0700 Subject: [PATCH 093/405] SD2 updated to 1540 --- scripts/northrend/dragonblight.cpp | 45 ++++++++++++++++++++++++++++++ sql/Updates/Makefile.am | 4 ++- sql/Updates/r1540_mangos.sql | 1 + sql/Updates/r1540_scriptdev2.sql | 4 +++ sql/mangos_scriptname_full.sql | 1 + sql/scriptdev2_script_full.sql | 5 +++- 6 files changed, 58 insertions(+), 2 deletions(-) create mode 100644 sql/Updates/r1540_mangos.sql create mode 100644 sql/Updates/r1540_scriptdev2.sql diff --git a/scripts/northrend/dragonblight.cpp b/scripts/northrend/dragonblight.cpp index a0b71526a..899950bb0 100644 --- a/scripts/northrend/dragonblight.cpp +++ b/scripts/northrend/dragonblight.cpp @@ -232,6 +232,46 @@ bool GossipSelect_npc_torastrasza(Player* pPlayer, Creature* pCreature, uint32 u return true; } +/*###### +## npc_woodlands_walker +######*/ + +enum +{ + SPELL_STRENGTH_ANCIENTS = 47575, + SPELL_CREATE_BARK_WALKERS = 47550, + FACTION_HOSTILE = 16, + + EMOTE_AGGRO = -1000551, + EMOTE_CREATE = -1000552 +}; + +bool EffectDummyCreature_npc_woodlands_walker(Unit* pCaster, uint32 uiSpellId, uint32 uiEffIndex, Creature* pCreatureTarget) +{ + //always check spellid and effectindex + if (uiSpellId == SPELL_STRENGTH_ANCIENTS && uiEffIndex == 0) + { + if (pCaster->GetTypeId() == TYPEID_PLAYER) + { + if (urand(0, 1)) + { + DoScriptText(EMOTE_AGGRO, pCreatureTarget); + pCreatureTarget->setFaction(FACTION_HOSTILE); + pCreatureTarget->AI()->AttackStart(pCaster); + } + else + { + DoScriptText(EMOTE_CREATE, pCreatureTarget); + pCaster->CastSpell(pCaster, SPELL_CREATE_BARK_WALKERS, true); + pCreatureTarget->ForcedDespawn(); + } + } + + //always return true when we are handling this spell and effect + return true; + } + return false; +} void AddSC_dragonblight() { Script *newscript; @@ -264,4 +304,9 @@ void AddSC_dragonblight() newscript->pGossipHello = &GossipHello_npc_torastrasza; newscript->pGossipSelect = &GossipSelect_npc_torastrasza; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_woodlands_walker"; + newscript->pEffectDummyCreature = &EffectDummyCreature_npc_woodlands_walker; + newscript->RegisterSelf(); } diff --git a/sql/Updates/Makefile.am b/sql/Updates/Makefile.am index ac8186707..8765fd65d 100644 --- a/sql/Updates/Makefile.am +++ b/sql/Updates/Makefile.am @@ -63,4 +63,6 @@ pkgdata_DATA = \ r1525_scriptdev2.sql \ r1531_mangos.sql \ r1536_mangos.sql \ - r1538_mangos.sql + r1538_mangos.sql \ + r1540_mangos.sql \ + r1540_scriptdev2.sql diff --git a/sql/Updates/r1540_mangos.sql b/sql/Updates/r1540_mangos.sql new file mode 100644 index 000000000..51168a53c --- /dev/null +++ b/sql/Updates/r1540_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_woodlands_walker' WHERE entry=26421; diff --git a/sql/Updates/r1540_scriptdev2.sql b/sql/Updates/r1540_scriptdev2.sql new file mode 100644 index 000000000..0822a02f7 --- /dev/null +++ b/sql/Updates/r1540_scriptdev2.sql @@ -0,0 +1,4 @@ +DELETE FROM script_texts WHERE entry IN (-1000551,-1000552); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000551,'The %s is angered by your request and attacks!',0,2,0,0,'woodlands EMOTE_AGGRO'), +(-1000552,'Breaking off a piece of its bark, the %s hands it to you before departing.',0,2,0,0,'woodlands EMOTE_CREATE'); diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 65605e7d5..97b159f81 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -429,6 +429,7 @@ UPDATE creature_template SET ScriptName='npc_alexstrasza_wr_gate' WHERE entry=31 UPDATE creature_template SET ScriptName='npc_liquid_fire_of_elune' WHERE entry IN (26616,26643); UPDATE creature_template SET ScriptName='npc_tariolstrasz' WHERE entry=26443; UPDATE creature_template SET ScriptName='npc_torastrasza' WHERE entry=26949; +UPDATE creature_template SET ScriptName='npc_woodlands_walker' WHERE entry=26421; /* DRAK'THARON KEEP */ UPDATE creature_template SET ScriptName='boss_novos' WHERE entry=26631; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index c2146d44b..694a45f35 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -568,7 +568,10 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000547,'It is too late for us, living one. Take yourself and your friend away from here before you both are... claimed...',0,0,0,25,'restless app SAY_RAND_5'), (-1000548,'It is too late for Jarl... its hold is too strong...',0,0,0,25,'restless app SAY_RAND_6'), (-1000549,'Go away, whoever you are! Witch Hill is mine... mine!',0,0,0,25,'restless app SAY_RAND_7'), -(-1000550,'The manor... someone else... will soon be consumed...',0,0,0,25,'restless app SAY_RAND_8'); +(-1000550,'The manor... someone else... will soon be consumed...',0,0,0,25,'restless app SAY_RAND_8'), + +(-1000551,'The %s is angered by your request and attacks!',0,2,0,0,'woodlands EMOTE_AGGRO'), +(-1000552,'Breaking off a piece of its bark, the %s hands it to you before departing.',0,2,0,0,'woodlands EMOTE_CREATE'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES From c77d2f403e00d650b3d87d57da174fd45a3ecce0 Mon Sep 17 00:00:00 2001 From: Insider Date: Wed, 6 Jan 2010 17:34:36 +0700 Subject: [PATCH 094/405] SD2 updated to 1541 --- base/escort_ai.cpp | 2 +- base/follower_ai.cpp | 2 +- include/sc_creature.cpp | 2 +- scripts/eastern_kingdoms/karazhan/karazhan.cpp | 6 +++--- .../magisters_terrace/boss_selin_fireheart.cpp | 2 +- scripts/outland/black_temple/boss_shade_of_akama.cpp | 4 ++-- system/system.cpp | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/base/escort_ai.cpp b/base/escort_ai.cpp index 0da132197..886b14233 100644 --- a/base/escort_ai.cpp +++ b/base/escort_ai.cpp @@ -462,7 +462,7 @@ void npc_escortAI::Start(bool bIsActiveAttacker, bool bRun, uint64 uiPlayerGUID, //disable npcflags m_creature->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE); - debug_log("SD2: EscortAI started with %u waypoints. ActiveAttacker = %d, Run = %d, PlayerGUID = %u", WaypointList.size(), m_bIsActiveAttacker, m_bIsRunning, m_uiPlayerGUID); + debug_log("SD2: EscortAI started with " SIZEFMTD " waypoints. ActiveAttacker = %d, Run = %d, PlayerGUID = " UI64FMTD, WaypointList.size(), m_bIsActiveAttacker, m_bIsRunning, m_uiPlayerGUID); CurrentWP = WaypointList.begin(); diff --git a/base/follower_ai.cpp b/base/follower_ai.cpp index 364a93405..64b9f40ef 100644 --- a/base/follower_ai.cpp +++ b/base/follower_ai.cpp @@ -304,7 +304,7 @@ void FollowerAI::StartFollow(Player* pLeader, uint32 uiFactionForFollower, const m_creature->GetMotionMaster()->MoveFollow(pLeader, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE); - debug_log("SD2: FollowerAI start follow %s (GUID %u)", pLeader->GetName(), m_uiLeaderGUID); + debug_log("SD2: FollowerAI start follow %s (GUID " UI64FMTD ")", pLeader->GetName(), m_uiLeaderGUID); } Player* FollowerAI::GetLeaderForFollower() diff --git a/include/sc_creature.cpp b/include/sc_creature.cpp index c1641cbfa..6fce5b24b 100644 --- a/include/sc_creature.cpp +++ b/include/sc_creature.cpp @@ -441,7 +441,7 @@ void ScriptedAI::DoTeleportPlayer(Unit* pUnit, float fX, float fY, float fZ, flo if (!pUnit || pUnit->GetTypeId() != TYPEID_PLAYER) { if (pUnit) - error_log("SD2: Creature %u (Entry: %u) Tried to teleport non-player unit (Type: %u GUID: %u) to x: %f y:%f z: %f o: %f. Aborted.", m_creature->GetGUID(), m_creature->GetEntry(), pUnit->GetTypeId(), pUnit->GetGUID(), fX, fY, fZ, fO); + error_log("SD2: Creature " UI64FMTD " (Entry: %u) Tried to teleport non-player unit (Type: %u GUID: " UI64FMTD ") to x: %f y:%f z: %f o: %f. Aborted.", m_creature->GetGUID(), m_creature->GetEntry(), pUnit->GetTypeId(), pUnit->GetGUID(), fX, fY, fZ, fO); return; } diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.cpp b/scripts/eastern_kingdoms/karazhan/karazhan.cpp index fe4ddd658..95f311d7d 100644 --- a/scripts/eastern_kingdoms/karazhan/karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/karazhan.cpp @@ -362,19 +362,19 @@ bool GossipSelect_npc_barnes(Player* pPlayer, Creature* pCreature, uint32 uiSend pPlayer->CLOSE_GOSSIP_MENU(); if (pBarnesAI) pBarnesAI->m_uiEventId = EVENT_OZ; - outstring_log("SD2: pPlayer (GUID %i) manually set Opera event to EVENT_OZ",pPlayer->GetGUID()); + outstring_log("SD2: pPlayer (GUID " UI64FMTD ") manually set Opera event to EVENT_OZ", pPlayer->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF+4: pPlayer->CLOSE_GOSSIP_MENU(); if (pBarnesAI) pBarnesAI->m_uiEventId = EVENT_HOOD; - outstring_log("SD2: pPlayer (GUID %i) manually set Opera event to EVENT_HOOD",pPlayer->GetGUID()); + outstring_log("SD2: pPlayer (GUID " UI64FMTD ") manually set Opera event to EVENT_HOOD", pPlayer->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF+5: pPlayer->CLOSE_GOSSIP_MENU(); if (pBarnesAI) pBarnesAI->m_uiEventId = EVENT_RAJ; - outstring_log("SD2: pPlayer (GUID %i) manually set Opera event to EVENT_RAJ",pPlayer->GetGUID()); + outstring_log("SD2: pPlayer (GUID " UI64FMTD ") manually set Opera event to EVENT_RAJ", pPlayer->GetGUID()); break; } diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp index 31fdc4b8d..a188b2401 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp @@ -64,7 +64,7 @@ struct MANGOS_DLL_DECL boss_selin_fireheartAI : public ScriptedAI for(uint8 i = 0; i < size; ++i) { uint64 guid = m_pInstance->GetData64(DATA_FEL_CRYSTAL); - debug_log("SD2: Selin: Adding Fel Crystal %u to list", guid); + debug_log("SD2: Selin: Adding Fel Crystal " UI64FMTD " to list", guid); Crystals.push_back(guid); } } diff --git a/scripts/outland/black_temple/boss_shade_of_akama.cpp b/scripts/outland/black_temple/boss_shade_of_akama.cpp index dcd25e7c4..c4f09a3a6 100644 --- a/scripts/outland/black_temple/boss_shade_of_akama.cpp +++ b/scripts/outland/black_temple/boss_shade_of_akama.cpp @@ -193,7 +193,7 @@ struct MANGOS_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI if (uiGuid) { if (m_lSorcerersGUIDList.empty()) - error_log("SD2: boss_shade_of_akamaAI attempt to remove guid %u from Sorcerers list but list is already empty", uiGuid); + error_log("SD2: boss_shade_of_akamaAI attempt to remove guid " UI64FMTD " from Sorcerers list but list is already empty", uiGuid); else m_lSorcerersGUIDList.remove(uiGuid); } @@ -284,7 +284,7 @@ struct MANGOS_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI for(std::list::iterator itr = lChannelerList.begin(); itr != lChannelerList.end(); ++itr) { m_lChannelersGUIDList.push_back((*itr)->GetGUID()); - debug_log("SD2: boss_shade_of_akamaAI found channeler %u. Adding to list", (*itr)->GetGUID()); + debug_log("SD2: boss_shade_of_akamaAI found channeler " UI64FMTD ". Adding to list", (*itr)->GetGUID()); (*itr)->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } diff --git a/system/system.cpp b/system/system.cpp index 97bea593e..e2f25bafa 100644 --- a/system/system.cpp +++ b/system/system.cpp @@ -189,7 +189,7 @@ void SystemMgr::LoadScriptWaypoints() delete pResult; } - outstring_log("SD2: Loading Script Waypoints for %u creature(s)...", uiCreatureCount); + outstring_log("SD2: Loading Script Waypoints for " UI64FMTD " creature(s)...", uiCreatureCount); pResult = SD2Database.PQuery("SELECT entry, pointid, location_x, location_y, location_z, waittime FROM script_waypoint ORDER BY pointid"); From 0c893ca65eca45b34769b3bbb2219678ecd29116 Mon Sep 17 00:00:00 2001 From: Insider Date: Sun, 10 Jan 2010 15:38:32 +0700 Subject: [PATCH 095/405] SD2 updated to 1542 --- scripts/world/item_scripts.cpp | 34 ++++++++++++++++++++++++++++++++++ sql/Updates/Makefile.am | 3 ++- sql/Updates/r1542_mangos.sql | 1 + sql/mangos_scriptname_full.sql | 1 + 4 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 sql/Updates/r1542_mangos.sql diff --git a/scripts/world/item_scripts.cpp b/scripts/world/item_scripts.cpp index 9d8327243..74975dae1 100644 --- a/scripts/world/item_scripts.cpp +++ b/scripts/world/item_scripts.cpp @@ -150,6 +150,35 @@ bool ItemUse_item_gor_dreks_ointment(Player* pPlayer, Item* pItem, const SpellCa return false; } +/*##### +# item_petrov_cluster_bombs +#####*/ + +enum +{ + SPELL_PETROV_BOMB = 42406, + AREA_ID_SHATTERED_STRAITS = 4064, + ZONE_ID_HOWLING = 495 +}; + +bool ItemUse_item_petrov_cluster_bombs(Player* pPlayer, Item* pItem, const SpellCastTargets &pTargets) +{ + if (pPlayer->GetZoneId() != ZONE_ID_HOWLING) + return false; + + if (!pPlayer->GetTransport() || pPlayer->GetAreaId() != AREA_ID_SHATTERED_STRAITS) + { + pPlayer->SendEquipError(EQUIP_ERR_NONE, pItem, NULL); + + if (const SpellEntry* pSpellInfo = GetSpellStore()->LookupEntry(SPELL_PETROV_BOMB)) + Spell::SendCastResult(pPlayer, pSpellInfo, 1, SPELL_FAILED_NOT_HERE); + + return true; + } + + return false; +} + void AddSC_item_scripts() { Script *newscript; @@ -178,4 +207,9 @@ void AddSC_item_scripts() newscript->Name = "item_gor_dreks_ointment"; newscript->pItemUse = &ItemUse_item_gor_dreks_ointment; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "item_petrov_cluster_bombs"; + newscript->pItemUse = &ItemUse_item_petrov_cluster_bombs; + newscript->RegisterSelf(); } diff --git a/sql/Updates/Makefile.am b/sql/Updates/Makefile.am index 8765fd65d..288e385e0 100644 --- a/sql/Updates/Makefile.am +++ b/sql/Updates/Makefile.am @@ -65,4 +65,5 @@ pkgdata_DATA = \ r1536_mangos.sql \ r1538_mangos.sql \ r1540_mangos.sql \ - r1540_scriptdev2.sql + r1540_scriptdev2.sql \ + r1542_mangos.sql diff --git a/sql/Updates/r1542_mangos.sql b/sql/Updates/r1542_mangos.sql new file mode 100644 index 000000000..83ade3399 --- /dev/null +++ b/sql/Updates/r1542_mangos.sql @@ -0,0 +1 @@ +UPDATE item_template SET ScriptName='item_petrov_cluster_bombs' WHERE entry=33098; diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index 97b159f81..84d106598 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -77,6 +77,7 @@ UPDATE item_template SET ScriptName='item_flying_machine' WHERE entry IN (34060, UPDATE item_template SET ScriptName='item_gor_dreks_ointment' WHERE entry=30175; UPDATE item_template SET ScriptName='item_nether_wraith_beacon' WHERE entry=31742; UPDATE item_template SET ScriptName='item_tainted_core' WHERE entry=31088; +UPDATE item_template SET ScriptName='item_petrov_cluster_bombs' WHERE entry=33098; /* NPC (usually creatures to be found in more than one specific zone) */ UPDATE creature_template SET ScriptName='npc_air_force_bots' WHERE entry IN (2614, 2615, 21974, 21993, 21996, 21997, 21999, 22001, 22002, 22003, 22063, 22065, 22066, 22068, 22069, 22070, 22071, 22078, 22079, 22080, 22086, 22087, 22088, 22090, 22124, 22125, 22126); From f5c9ec1e4bbdc7c931d1def03f7904c6e3cb1b7e Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Mon, 11 Jan 2010 19:10:30 +0300 Subject: [PATCH 096/405] Violet hold boss unattackable --- scripts/northrend/violet_hold/boss_erekem.cpp | 12 ++++++++++++ scripts/northrend/violet_hold/boss_ichoron.cpp | 4 ++++ scripts/northrend/violet_hold/boss_lavanthor.cpp | 3 +++ scripts/northrend/violet_hold/boss_moragg.cpp | 6 ++++++ scripts/northrend/violet_hold/boss_xevozz.cpp | 6 ++++++ scripts/northrend/violet_hold/boss_zuramat.cpp | 6 ++++++ 6 files changed, 37 insertions(+) diff --git a/scripts/northrend/violet_hold/boss_erekem.cpp b/scripts/northrend/violet_hold/boss_erekem.cpp index 4103941dc..d880444d2 100644 --- a/scripts/northrend/violet_hold/boss_erekem.cpp +++ b/scripts/northrend/violet_hold/boss_erekem.cpp @@ -93,6 +93,9 @@ struct MANGOS_DLL_DECL boss_erekemAI : public ScriptedAI if (m_pInstance) m_pInstance->SetData(TYPE_EREKEM, NOT_STARTED); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } void Aggro(Unit* pWho) @@ -101,6 +104,9 @@ struct MANGOS_DLL_DECL boss_erekemAI : public ScriptedAI if (m_pInstance) m_pInstance->SetData(TYPE_EREKEM, IN_PROGRESS); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } void AttackStart(Unit* pWho) @@ -233,6 +239,9 @@ struct MANGOS_DLL_DECL mob_erekem_guardAI : public ScriptedAI m_uiGushingWound_Timer = urand(5000, 10000); m_uiHowlingScreech_Timer = urand(12000, 15000); m_uiStrike_Timer = urand(10000, 11000); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } void AttackStart(Unit* pWho) @@ -242,6 +251,9 @@ struct MANGOS_DLL_DECL mob_erekem_guardAI : public ScriptedAI if (m_pInstance->GetData(TYPE_EREKEM) != SPECIAL) return; + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + if (!pWho || pWho == m_creature) return; diff --git a/scripts/northrend/violet_hold/boss_ichoron.cpp b/scripts/northrend/violet_hold/boss_ichoron.cpp index cd27bcacb..1e29b9e0e 100644 --- a/scripts/northrend/violet_hold/boss_ichoron.cpp +++ b/scripts/northrend/violet_hold/boss_ichoron.cpp @@ -99,6 +99,8 @@ struct MANGOS_DLL_DECL boss_ichoronAI : public ScriptedAI if (m_pInstance) m_pInstance->SetData(TYPE_ICHORON, NOT_STARTED); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } void Aggro(Unit* pWho) @@ -107,6 +109,8 @@ struct MANGOS_DLL_DECL boss_ichoronAI : public ScriptedAI if (m_pInstance) m_pInstance->SetData(TYPE_ICHORON, IN_PROGRESS); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } void AttackStart(Unit* pWho) diff --git a/scripts/northrend/violet_hold/boss_lavanthor.cpp b/scripts/northrend/violet_hold/boss_lavanthor.cpp index 83640080c..adc4192f5 100644 --- a/scripts/northrend/violet_hold/boss_lavanthor.cpp +++ b/scripts/northrend/violet_hold/boss_lavanthor.cpp @@ -66,6 +66,9 @@ struct MANGOS_DLL_DECL boss_lavanthorAI : public ScriptedAI { if (m_pInstance) m_pInstance->SetData(TYPE_LAVANTHOR, IN_PROGRESS); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } void AttackStart(Unit* pWho) diff --git a/scripts/northrend/violet_hold/boss_moragg.cpp b/scripts/northrend/violet_hold/boss_moragg.cpp index c2db42ef6..d6313a6a8 100644 --- a/scripts/northrend/violet_hold/boss_moragg.cpp +++ b/scripts/northrend/violet_hold/boss_moragg.cpp @@ -56,12 +56,18 @@ struct MANGOS_DLL_DECL boss_moraggAI : public ScriptedAI if (m_pInstance) m_pInstance->SetData(TYPE_MORAGG, NOT_STARTED); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } void Aggro(Unit* pWho) { if (m_pInstance) m_pInstance->SetData(TYPE_MORAGG, IN_PROGRESS); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } void AttackStart(Unit* pWho) diff --git a/scripts/northrend/violet_hold/boss_xevozz.cpp b/scripts/northrend/violet_hold/boss_xevozz.cpp index e3a14a751..ec10018cb 100644 --- a/scripts/northrend/violet_hold/boss_xevozz.cpp +++ b/scripts/northrend/violet_hold/boss_xevozz.cpp @@ -78,6 +78,9 @@ struct MANGOS_DLL_DECL boss_xevozzAI : public ScriptedAI if (m_pInstance) m_pInstance->SetData(TYPE_XEVOZZ, NOT_STARTED); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } void Aggro(Unit* pWho) @@ -86,6 +89,9 @@ struct MANGOS_DLL_DECL boss_xevozzAI : public ScriptedAI if (m_pInstance) m_pInstance->SetData(TYPE_XEVOZZ, IN_PROGRESS); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } void AttackStart(Unit* pWho) diff --git a/scripts/northrend/violet_hold/boss_zuramat.cpp b/scripts/northrend/violet_hold/boss_zuramat.cpp index 70064a65f..ea7b89d3f 100644 --- a/scripts/northrend/violet_hold/boss_zuramat.cpp +++ b/scripts/northrend/violet_hold/boss_zuramat.cpp @@ -74,6 +74,9 @@ struct MANGOS_DLL_DECL boss_zuramatAI : public ScriptedAI if (m_pInstance) m_pInstance->SetData(TYPE_ZURAMAT, NOT_STARTED); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } void Aggro(Unit* pWho) @@ -82,6 +85,9 @@ struct MANGOS_DLL_DECL boss_zuramatAI : public ScriptedAI if (m_pInstance) m_pInstance->SetData(TYPE_ZURAMAT, IN_PROGRESS); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } void AttackStart(Unit* pWho) From 6924d5c5564dd55d1b3c23ece564c6d8e0285eea Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Tue, 12 Jan 2010 19:09:43 +0300 Subject: [PATCH 097/405] Many patches --- addition/717_culling_of_stratholme_mangos.sql | 105 +- .../717_culling_of_stratholme_scriptdev2.sql | 237 ++- .../culling_of_stratholme/boss_lord_epoch.cpp | 247 ++- .../culling_of_stratholme/boss_malganis.cpp | 518 +++-- .../culling_of_stratholme/boss_meathook.cpp | 147 +- .../culling_of_stratholme/boss_salramm.cpp | 232 +- .../culling_of_stratholme.cpp | 1867 +++++++++-------- .../def_culling_of_stratholme.h | 54 +- .../instance_culling_of_stratholme.cpp | 212 +- .../ulduar/ulduar/boss_iron_council.cpp | 8 +- .../northrend/ulduar/ulduar/boss_kologarn.cpp | 567 +++-- scripts/northrend/ulduar/ulduar/def_ulduar.h | 67 +- .../ulduar/ulduar/instance_ulduar.cpp | 34 +- 13 files changed, 2537 insertions(+), 1758 deletions(-) diff --git a/addition/717_culling_of_stratholme_mangos.sql b/addition/717_culling_of_stratholme_mangos.sql index 7b8079c7f..4714165fe 100644 --- a/addition/717_culling_of_stratholme_mangos.sql +++ b/addition/717_culling_of_stratholme_mangos.sql @@ -1,42 +1,63 @@ -update `creature_template` set `minhealth`='8600', `maxhealth`='8600' where `entry` in (31127, 31126, 28167, 28169); -update `creature_template` set `minhealth`='8600', `maxhealth`='8600' where `entry` in (10002, 10003, 10004, 10005); -update `creature_template` set `faction_A`='35', `faction_H`='35' where `entry` in (31127, 31126, 28167, 28169); -update `creature_template` set `faction_A`='35', `faction_H`='35' where `entry` in (10002, 10003, 10004, 10005); -update `creature_template` set `minhealth`='15000', `maxhealth`='15000' where `entry` in (27737); -update `creature_template` set `minhealth`='25000', `maxhealth`='25000' where `entry` in (31208); - -DELETE FROM `creature` WHERE (`id`=27744); -DELETE FROM `creature` WHERE (`id`=26530); -DELETE FROM `creature` WHERE (`id`=26529); -DELETE FROM `creature` WHERE (`id`=26532); -DELETE FROM `creature` WHERE (`id`=26533); - -update `creature_template` set `npcflag` = '1', `AIName`='', `Scriptname`='npc_arthas' where `entry` in (26499); -update `creature_template` set `AIName`='', `Scriptname`='dark_conversion' where `entry` in (31127, 31126, 28167, 28169); -update `creature_template` set `AIName`='', `Scriptname`='npc_patricia' where `entry` in (31028); -update `creature_template` set `AIName`='', `Scriptname`='npc_time_riftCS' where `entry` in (28409); -update `creature_template` set `AIName`='', `Scriptname`='boss_salramm' where `entry` in (26530); -update `creature_template` set `AIName`='', `Scriptname`='boss_meathook' where `entry` in (26529); -update `creature_template` set `AIName`='', `Scriptname`='boss_lord_epoch' where `entry` in (26532); -update `creature_template` set `AIName`='', `Scriptname`='boss_malganis' where `entry` in (26533); -update `instance_template` set `script` = 'instance_culling_of_stratholme' WHERE map=595; - -update `creature` set `spawntimesecs`='3600' where `id` in (31127, 31126, 28167, 28169); - -DELETE FROM `creature` WHERE (`guid`=4456649); -INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (4456649, 26499, 595, 1, 0, 0, 1920.87, 1287.12, 142.935, 6.25562, 25, 0, 0, 44100, 7988, 0, 0); - -DELETE FROM `creature` WHERE (`guid`=4456653); -INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (4456653, 26497, 595, 1, 0, 0, 1895.48, 1292.66, 143.706, 0.023475, 25, 0, 0, 100800, 88140, 0, 0); - -DELETE FROM `gameobject_template` WHERE (`entry`=188686); -INSERT INTO `gameobject_template` (`entry`, `type`, `displayId`, `name`, `castBarCaption`, `faction`, `flags`, `size`, `data0`, `data1`, `data2`, `data3`, `data4`, `data5`, `data6`, `data7`, `data8`, `data9`, `data10`, `data11`, `data12`, `data13`, `data14`, `data15`, `data16`, `data17`, `data18`, `data19`, `data20`, `data21`, `data22`, `data23`, `ScriptName`) VALUES (188686, 0, 7831, 'Doodad_LD_hidden_door_room01', '', 1375, 6553632, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ''); - -DELETE FROM `gameobject_template` WHERE (`entry`=187711); -INSERT INTO `gameobject_template` (`entry`, `type`, `displayId`, `name`, `castBarCaption`, `faction`, `flags`, `size`, `data0`, `data1`, `data2`, `data3`, `data4`, `data5`, `data6`, `data7`, `data8`, `data9`, `data10`, `data11`, `data12`, `data13`, `data14`, `data15`, `data16`, `data17`, `data18`, `data19`, `data20`, `data21`, `data22`, `data23`, `ScriptName`) VALUES (187711, 0, 3631, 'Crusaders\' Square Gate', '', 1375, 6553632, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ''); - -DELETE FROM `gameobject_template` WHERE (`entry`=187723); -INSERT INTO `gameobject_template` (`entry`, `type`, `displayId`, `name`, `castBarCaption`, `faction`, `flags`, `size`, `data0`, `data1`, `data2`, `data3`, `data4`, `data5`, `data6`, `data7`, `data8`, `data9`, `data10`, `data11`, `data12`, `data13`, `data14`, `data15`, `data16`, `data17`, `data18`, `data19`, `data20`, `data21`, `data22`, `data23`, `ScriptName`) VALUES (187723, 0, 3631, 'Crusaders\' Square Gate', '', 1375, 6553632, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ''); - -update `gameobject` set `state` = '1' where `id` in (187711); -update `gameobject` set `spawntimesecs` = '-604800', `state` = '0' where `id` in (190663); \ No newline at end of file +update `creature_template` set `minhealth`='8600', `maxhealth`='8600' where `entry` in (31127, 31126, 28167, 28169); +update `creature_template` set `minhealth`='8600', `maxhealth`='8600' where `entry` in (10002, 10003, 10004, 10005); +update `creature_template` set `faction_A`='35', `faction_H`='35' where `entry` in (31127, 31126, 28167, 28169); +update `creature_template` set `faction_A`='35', `faction_H`='35' where `entry` in (10002, 10003, 10004, 10005); +update `creature_template` set `minhealth`='15000', `maxhealth`='15000' where `entry` in (27737); +update `creature_template` set `minhealth`='25000', `maxhealth`='25000' where `entry` in (31208); + +DELETE FROM `creature` WHERE (`id`=27744); +DELETE FROM `creature` WHERE (`id`=26530); +DELETE FROM `creature` WHERE (`id`=26529); +DELETE FROM `creature` WHERE (`id`=26532); +DELETE FROM `creature` WHERE (`id`=26533); + +update `creature_template` set `AIName`='', `Scriptname`='npc_arthas' where `entry` in (26499); +update `creature_template` set `AIName`='', `Scriptname`='dark_conversion' where `entry` in (31127, 31126, 28167, 28169); +update `creature_template` set `AIName`='', `Scriptname`='npc_patricia' where `entry` in (31028); +update `creature_template` set `AIName`='', `Scriptname`='npc_time_riftCS' where `entry` in (28409); +update `creature_template` set `AIName`='', `Scriptname`='boss_salramm' where `entry` in (26530); +update `creature_template` set `AIName`='', `Scriptname`='boss_meathook' where `entry` in (26529); +update `creature_template` set `AIName`='', `Scriptname`='boss_lord_epoch' where `entry` in (26532); +update `creature_template` set `AIName`='', `Scriptname`='boss_malganis' where `entry` in (26533); +update `instance_template` set `script` = 'instance_culling_of_stratholme' WHERE map=595; +-- Spawning Salramm in the instance -- +INSERT INTO creature VALUES (4458725,26530,595,1,1,0,0,2174.32,1307.32,131.866,4.32264,25,0,0,337025,62535,0,0); +-- heroic version -- +INSERT INTO creature VALUES (4458725,26530,595,2,1,0,0,2178.93,1307.89,131.526,4.12069,25,0,0,421281,62535,0,0); +-- Spawning Meathook in the instance -- +INSERT INTO creature VALUES (4458739,26529,595,1,1,0,0,2351.43,1218.03,130.078,4.64621,25,0,0,337025,0,0,0); +-- heroic version -- +INSERT INTO creature VALUES (4458739,26529,595,2,1,0,0,2350.42,1215.31,130.23,4.76314,25,0,0,421281,0,0,0); +-- Spawning Lord Epoch in the instance -- +INSERT INTO creature VALUES (4458741,26532,595,1,1,0,1820,2446.25,1111.97,148.077,3.37779,25,0,0,337025,41690,0,0); +-- heroic version -- +INSERT INTO creature VALUES (4458741,26532,595,2,1,0,1820,2446.17,1111.64,148.076,3.25517,25,0,0,421281,41690,0,0); +-- Spawning Malganis in the instance +INSERT INTO creature VALUES (4459981,26533,595,1,1,0,0,2298.33,1501.03,128.362,5.11213,25,0,0,404430,41690,0,0); +-- heroic version -- +INSERT INTO creature VALUES (4459615,26533,595,2,1,0,0,2298.9,1502.32,128.361,5.21301,25,0,0,505538,41690,0,0); +update `creature` set `spawntimesecs`='3600' where `id` in (31127, 31126, 28167, 28169); + +DELETE FROM `creature` WHERE (`guid`=4456649); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (4456649, 26499, 595, 1, 0, 0, 1920.87, 1287.12, 142.935, 6.25562, 25, 0, 0, 44100, 7988, 0, 0); + +DELETE FROM `creature` WHERE (`guid`=4456653); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (4456653, 26497, 595, 1, 0, 0, 1895.48, 1292.66, 143.706, 0.023475, 25, 0, 0, 100800, 88140, 0, 0); + +DELETE FROM `gameobject_template` WHERE (`entry`=188686); +INSERT INTO `gameobject_template` (`entry`, `type`, `displayId`, `name`, `castBarCaption`, `faction`, `flags`, `size`, `data0`, `data1`, `data2`, `data3`, `data4`, `data5`, `data6`, `data7`, `data8`, `data9`, `data10`, `data11`, `data12`, `data13`, `data14`, `data15`, `data16`, `data17`, `data18`, `data19`, `data20`, `data21`, `data22`, `data23`, `ScriptName`) VALUES (188686, 0, 7831, 'Doodad_LD_hidden_door_room01', '', 1375, 6553632, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ''); + +DELETE FROM `gameobject_template` WHERE (`entry`=187711); +INSERT INTO `gameobject_template` (`entry`, `type`, `displayId`, `name`, `castBarCaption`, `faction`, `flags`, `size`, `data0`, `data1`, `data2`, `data3`, `data4`, `data5`, `data6`, `data7`, `data8`, `data9`, `data10`, `data11`, `data12`, `data13`, `data14`, `data15`, `data16`, `data17`, `data18`, `data19`, `data20`, `data21`, `data22`, `data23`, `ScriptName`) VALUES (187711, 0, 3631, 'Crusaders\' Square Gate', '', 1375, 6553632, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ''); + +DELETE FROM `gameobject_template` WHERE (`entry`=187723); +INSERT INTO `gameobject_template` (`entry`, `type`, `displayId`, `name`, `castBarCaption`, `faction`, `flags`, `size`, `data0`, `data1`, `data2`, `data3`, `data4`, `data5`, `data6`, `data7`, `data8`, `data9`, `data10`, `data11`, `data12`, `data13`, `data14`, `data15`, `data16`, `data17`, `data18`, `data19`, `data20`, `data21`, `data22`, `data23`, `ScriptName`) VALUES (187723, 0, 3631, 'Crusaders\' Square Gate', '', 1375, 6553632, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ''); + +update `gameobject` set `state` = '1' where `id` in (187711); +update `gameobject` set `spawntimesecs` = '-604800', `state` = '0', `faction` = '0' where `id` in (190663); + +UPDATE `creature` set `curhealth` = '8600' where `id`=28167; +UPDATE `creature` set `curhealth` = '8600' where `id`=28169; +UPDATE `creature` set `curhealth` = '15000' where `id`=27737; +UPDATE `quest_template` set `SpecialFlags` = '1' where `entry`=13151; + diff --git a/addition/717_culling_of_stratholme_scriptdev2.sql b/addition/717_culling_of_stratholme_scriptdev2.sql index fc2feb777..1e7496c69 100644 --- a/addition/717_culling_of_stratholme_scriptdev2.sql +++ b/addition/717_culling_of_stratholme_scriptdev2.sql @@ -1,116 +1,127 @@ DELETE FROM `script_texts` WHERE `comment` = 26499; -insert into `script_texts` (`entry`,`content_default`,`content_loc8`,`sound`,`type`,`language`,`emote`,`comment`) VALUES -(-1594071, 'g', 'Я рад, что ты пришел! Утер.', 12828,0,0,1, '26499'), -(-1594072, 'g', 'Следи за своим тоном, юноша. Хоть ты и принц, но как паладин ты все еще находишься под моим командыванием.', 12839,0,0,25, '26499'), -(-1594073, 'g', 'Как будто я не помню. Послушай Утер я должен рассказать тебе кое что про чуму.', 12829,0,0,0, '26499'), -(-1594074, 'g', 'О нет... Мы опоздали... Все эти люди заражены чумой. Сейчас это еще не заметно, но скоро все они превратяся в нежить.', 12830,0,0,1, '26499'), -(-1594075, 'g', 'Что?', 12840,0,0,5, '26499'), -(-1594076, 'g', 'Весь город должен быть очищен.', 12831,0,0,1, '26499'), -(-1594077, 'g', 'Как ты мог даже подумать об этом? Должен быть какой то другой путь?', 12841,0,0,1, '26499'), -(-1594078, 'g', 'Проклятие Утер! Как будущий король я приказываю тебе очистить этот город.', 12832,1,0,5, '26499'), -(-1594079, 'g', 'Пока ты еще не король юноша. Но этот приказ я не выполнил бы будь ты хоть трижды королем!', 12842,1,0,22, '26499'), -(-1594080, 'g', 'Тогда я буду расценивать это как измену.', 12833,0,0,0, '26499'), -(-1594081, 'g', 'Измену? Ты совсем лишился рассудка Артас?', 12843,0,0,5, '26499'), -(-1594082, 'g', 'Неужели? Лорд Утер. Властью данной мне по праву наследования, я отстраняю вас от командования, и освобождаю от службы ваших паладинов. ', 12834,0,0,1, '26499'), -(-1594083, 'g', 'Артас? Ты не можешь так просто...', 12837,0,0,1, '26499'), -(-1594084, 'g', 'Это уже сделано! Те из вас кто действительно хочет спасти эту землю за мной, остальные прочь с глаз моих.', 12835,0,0,0, '26499'), -(-1594085, 'g', 'Ты пересек опасную черту, артас.', 12844,0,0,25, '26499'), -(-1594086, 'g', 'Джайна?', 12836,0,0,1, '26499'), -(-1594087, 'g', 'Прости Артас, но я не могу смотреть на это.', 12838,0,0,1, '26499'), -(-1594088, 'g', 'Обустройте позицию тут, а я пока поведу небольшой отряд в стратхольм и начну очищение. Мы должны изолировать и уничтожить зараженных жителей ради всего Лордерона.', 14327,0,0,1, '26499'), -(-1594089, 'g', 'Похоже все готовы! Помните эти люди заражены чумой и скоро умрут. Мы должны очистить Стратхольм и защитить Лордерон от Плети. Вперед.', 14293,0,0,1, '26499'), -(-1594090, 'g', 'Приветствую вас милорд. Чем мы вам можем помочь?', 0,0,0,1, '26499'), -(-1594091, 'g', 'Я могу помочь вам, лишь быстрой смертью.', 14294,0,0,0, '26499'), -(-1594092, 'g', 'Помогите наш принц сошел с ума...', 0,0,0,0, '26499'), -(-1594093, 'g', 'Это только начало..', 14295,0,0,1, '26499'), -(-1594094, 'g', 'Да. Это начало! Я ждал тебя юнный принц. Я Малганус.', 14410,0,0,1, '26499'), -(-1594095, 'g', 'Как видишь твои люди отныне принадлежат мне. Дом за домом я порабощу этот город и огонь жизни угаснет здесь на всегда..',14411,0,0,1, '26499'), -(-1594096, 'g', 'Я не допущу этого Малганис. Лудше эти люди погибнут от моей руки, чем станут твоими рабами после смерти.',14296,0,0,5, '26499'), -(-1594097, 'g', 'Малганис отправит своих прислужников из плети навстречу нам. Опытные воины и маги ступайте и уничтожте врагов. Я возглавлю оставшиеся войска в деле очищения стратхольма от заразы.',14885,0,0,1, '26499'), -(-1594098, 'g', 'Герои поспешите вcтретимся у городской ратуши. Мы должны сразиться с Малганисом на его территории!',14297,0,0,1, '26499'), -(-1594099, 'g', 'Идите за мной я знаю дорогу.',14298,0,0,1, '26499'), -(-1594100, 'g', 'Успокойтесь граждане. Все нормально. Расходитесь по домам... Аааааа... Что это?',0,0,0,1, '26499'), -(-1594101, 'g', 'Помогите...',0,0,0,0, '26499'), -(-1594102, 'g', 'Принц Артас, что вы делаете?',0,0,0,0, '26499'), -(-1594103, 'g', 'Ненадо... Вы же наш принц, вы же защитник Лордерона....',0,0,0,0, '26499'), -(-1594104, 'g', 'Пощады Милорд...',0,0,0,0, '26499'), -(-1594105, 'g', 'Что мы вам сделали?',0,0,0,0, '26499'), -(-1594106, 'g', '<Плач>',9676,0,0,18, '26499'), -(-1594107, 'g', 'Королевские войска напали на нас, спасайся кто может...',0,1,0,0, '26499'), -(-1594108, 'g', 'Что вы наделали? Что здесь происходит?',0,0,0,0, '26499'), -(-1594109, 'g', 'За что?',0,0,0,0, '26499'), -(-1594110, 'g', 'Поиграем?',13428,0,0,0, '26499'), -- Meathook -- -(-1594111, 'g', 'Новые игрушки.',13429,1,0,0, '26499'), -(-1594112, 'g', 'Это... Не... Смешно...',13433,1,0,0, '26499'), -(-1594113, 'g', 'Скучно...',13430,1,0,0, '26499'), -(-1594114, 'g', 'Почему ты не двигаться?',13431,1,0,0, '26499'), -(-1594115, 'g', 'Вставай я не закончил...',13432,1,0,0, '26499'), -(-1594116, 'g', 'Принц Артас Менетил, в этот самый день могущественное зло поглотило твою душу. Смерть которую ты должен был принести другим, сегодня придет за тобой.',13408,0,0,0, '26499'), -(-1594117, 'g', 'Я делаю для Лордерона то, что должен, и никакие слова и поступки меня не остановят.',14309,0,0,5, '26499'), -(-1594118, 'g', 'Ну что ж посмотрим юный принц...',13409,0,0,0, '26499'), -(-1594119, 'g', 'Аааааааа......',13416,0,0,0, '26499'), -(-1594120, 'g', 'У тебя нет будущего...',13413,1,0,0, '26499'), -(-1594121, 'g', 'Пробил час нашего величайшего триумфа..',13414,1,0,0, '26499'), -(-1594122, 'g', 'Тебе было суждено потерпеть поражение...',13415,1,0,0, '26499'), -(-1594123, 'g', 'Тик - так... Тик - так...',13410,1,0,0, '26499'), -(-1594124, 'g', 'Слишком медленно...',13411,1,0,0, '26499'), -(-1594125, 'g', 'Пора заканчивать...',13412,1,0,0, '26499'), -(-1594126, 'g', 'Не трогайте меня...',0,1,0,0, '26499'), -(-1594127, 'g', 'Вы чудовище, а не Принц...',0,1,0,0, '26499'), -(-1594128, 'g', 'Бежим.....',0,1,0,0, '26499'), -(-1594129, 'g', 'Cлишком поздно герои Лордерона! Пришло время мертвых...',0,1,0,0, '26499'), -(-1594130, 'g', 'Аааааа развлечемся....',0,1,0,0, '26499'), -(-1594131, 'g', 'Вы всего лишь часть плана хозяина...',0,1,0,0, '26499'), -(-1594132, 'g', 'Веселье только начинается!',0,1,0,0, '26499'), -(-1594133, 'g', 'Аааа качественный материал...',0,1,0,0, '26499'), -(-1594134, 'g', 'Не волнуйся я найду куда тебя приспособить...',0,1,0,0, '26499'), -(-1594135, 'g', 'Мне нужен образец!',0,1,0,0, '26499'), -(-1594136, 'g', 'Столько силы... Она будет моей....',0,1,0,0, '26499'), -(-1594137, 'g', 'Твоя плоть придает тебя!',0,1,0,0, '26499'), -(-1594138, 'g', 'Познакомтесь с моими друзьями...',0,1,0,0, '26499'), -(-1594139, 'g', 'Жители Стратхольма встречайте ваших спасителей...',0,1,0,0, '26499'), -(-1594140, 'g', 'Бум... Ха-ха-ха-ха...',0,1,0,0, '26499'), -(-1594141, 'g', 'Кровь... Разрушение... Восхитительно...',0,1,0,0, '26499'), -(-1594142, 'g', 'Да! Я рад, что я смог добраться сюда раньше чумы!',14299,0,0,1, '26499'), -(-1594143, 'g', 'Что это за магия?',14300,0,0,0, '26499'), -(-1594144, 'g', 'Кажется, что у Малганиса в распорежении есть еще кое что кроме Плети. Давайте поспешим.',14301,0,0,0, '26499'), -(-1594145, 'g', 'Снова черная магия будьте готовы ко всему.',14302,0,0,0, '26499'), -(-1594146, 'g', 'Идем дальше.',14303,0,0,0, '26499'), -(-1594147, 'g', 'Будьте начеку наc окружили...',14304,0,0,0, '26499'), -(-1594148, 'g', 'Малганис не собирается облегчить нам жизнь...',14305,0,0,0, '26499'), -(-1594149, 'g', 'Они упрямы.',14306,0,0,0, '26499'), -(-1594150, 'g', 'Что еще он поставит у меня на пути?',14307,0,0,0, '26499'), -(-1594151, 'g', 'Кратчайший путь к Малганису находится за тем Шкафом.',14308,0,0,0, '26499'), -(-1594152, 'g', 'Это займет совсем не много времени.',14310,0,0,0, '26499'), -(-1594153, 'g', 'Слава свету, что потайной ход еще работает!',14311,0,0,0, '26499'), -(-1594154, 'g', 'Давайте пройдем этот участок как можно быстрее. Если мы не погибнем от нежити, то можем погибнуть от этого огня.',14312,0,0,0, '26499'), -(-1594155, 'g', 'Отдышитесь немного, но имейте ввиду нам скоро снова в путь.',14313,0,0,0, '26499'), -(-1594156, 'g', 'Отдых окончен надо идти, Малганис ждет.',14314,0,0,0, '26499'), -(-1594157, 'g', 'Наконец нам хоть как то повезло! Огонь еще не добрался до торгового ряда. Малганис должен быть на площади рыцарей, которая находится не далеко от сюда. Скажите мне как будете готовы идти дальше.',14315,0,0,0, '26499'), -(-1594158, 'g', 'Да свершится правосудие.',14316,0,0,0, '26499'), -(-1594159, 'g', 'Это будет достойное испытание Принц артас!',14413,1,0,0, '26499'), -(-1594160, 'g', 'Слишком просто...',14416,1,0,0, '26499'), -(-1594161, 'g', 'Темный повелитель не доволен твоим вмешательством...',144107,1,0,0, '26499'), -(-1594162, 'g', 'Мне нужен Принц Артас, а не ты...',14418,1,0,0, '26499'), -(-1594163, 'g', 'Анак Кири...',14422,1,0,0, '26499'), -(-1594164, 'g', 'Мой натиск сметет силы короля - лича...',14423,1,0,0, '26499'), -(-1594165, 'g', 'Твоя смерть была напрасна насекомое...',14424,1,0,0, '26499'), -(-1594166, 'g', 'Твое время вышло...',14425,1,0,0, '26499'), -(-1594167, 'g', 'Аррррхххх... Я и так провел слишком много времени в этой слабой оболочке...',14426,1,0,0, '26499'), -(-1594168, 'g', 'Ирл Нарат... Я малганис.... Я вечен...',14427,1,0,0, '26499'), -(-1594169, 'g', 'Тебе никогда не победить короля - лича без моих войск! Я отомщу и тебе и ему...',14429,1,0,0, '26499'), -(-1594170, 'g', 'Мы покончим с этим сейчас же Малганис. Один на один...',14317,0,0,0, '26499'), -(-1594171, 'g', 'Твое путешествие начинается юный принц. Собирай свои войска и отправляйся в царство вечных снегов, Нордскол! Там мы уладим все наши дела, там ты узнаешь свою судьбу.',14412,0,0,0, '26499'), -(-1594172, 'g', 'Я отыщу тебя на краю земли... Ты слышешь меня? На краю земли...',14318,1,0,5, '26499'), -(-1594173, 'g', 'Вы славно сражались сегодня! Все что Малганис оставил тут ваша награда. А мне нужно начинать готовиться к экспедиции в нордскол.',14319,0,0,5, '26499'), -(-1594174, 'g', 'Отдохни!',14414,1,0,0, '26499'), -(-1594175, 'g', 'Ты выглядишь усталым!',14415,1,0,0, '26499'), -(-1594176, 'g', 'Я лишь зря трачу тут свое время. Мне нужно собраться силами в моем родном мире.',14428,1,0,0, '26499'); - -DELETE FROM `script_waypoint` WHERE entry=26499; -INSERT INTO `script_waypoint` VALUES - (26499, 0, 2099.876,1280.21,138.55, 0, 'WP1'), - (26499, 1, 2120.757,1286.97,136.343, 0, 'Summon Zombie'), +DELETE FROM `script_texts` WHERE `entry` IN ('-1594071','-1594072','-1594073','-1594074','-1594075','-1594076','-1594077','-1594078','-1594079','-1594080','-1594081','-1594082','-1594083'); +DELETE FROM `script_texts` WHERE `entry` IN ('-1594084','-1594085','-1594086','-1594087','-1594088,','-1594089','-1594090','-1594091','-1594092','-1594093','-1594094','-1594095','-1594096'); +DELETE FROM `script_texts` WHERE `entry` IN ('-1594097','-1594098','-1594099','-1594100','-1594101','-1594102','-1594103','-1594104','-1594105','-1594106','-1594107','-1594108','-1594109'); +DELETE FROM `script_texts` WHERE `entry` IN ('-1594110','-1594111','-1594112','-1594113','-1594114','-1594115','-1594116','-1594117','-1594118','-1594119','-1594120','-1594121','-1594122'); +DELETE FROM `script_texts` WHERE `entry` IN ('-1594123','-1594124','-1594125','-1594126','-1594127','-1594128','-1594129','-1594130','-1594131','-1594132','-1594133','-1594134','-1594135'); +DELETE FROM `script_texts` WHERE `entry` IN ('-1594136','-1594137','-1594138','-1594139','-1594140','-1594141','-1594142','-1594143','-1594144','-1594145','-1594146','-1594147','-1594148'); +DELETE FROM `script_texts` WHERE `entry` IN ('-1594149','-1594150','-1594151','-1594152','-1594153','-1594154','-1594155','-1594156','-1594157','-1594158','-1594159','-1594160','-1594161'); +DELETE FROM `script_texts` WHERE `entry` IN ('-1594162','-1594163','-1594164','-1594165','-1594166','-1594167','-1594168','-1594169','-1594170','-1594171','-1594172','-1594173','-1594174'); +DELETE FROM `script_texts` WHERE `entry` IN ('-1594175','-1594176'); + +INSERT INTO `script_texts` (`entry`,`content_default`,`content_loc8`,`sound`,`type`,`language`,`emote`,`comment`) VALUES +(-1594071, 'I\'m glad you could make it! Uther.','Я рад, что ты пришел! Утер.', 12828,0,0,1, '26499'), +(-1594072, 'Watch your tone, Boy. You may be the prince, but I\'m still your superrior as a paladin.','Следи за своим тоном, юноша. Хоть ты и принц, но как паладин ты все еще находишься под моим командованием.', 12839,0,0,25, '26499'), +(-1594073, 'As I could forget. Listen Uther, There is somthing about the plague you should know.','Как будто я не помню. Послушай Утер я должен рассказать тебе кое что про чуму.',12829,0,0,0, '26499'), +(-1594074, 'Oh no ... We are too late ... These people have ben infected. They may look fine now, but this is just mater of time before they will turn into the undead.','О нет... Мы опоздали... Все эти люди заражены чумой. Сейчас это еще не заметно, но скоро все они превратяся в нежить.', 12830,0,0,1, '26499'), +(-1594075, 'What?','Что?', 12840,0,0,5, '26499'), +(-1594076, 'This entire city must be purged.','Весь город должен быть очищен.', 12831,0,0,1, '26499'), +(-1594077, 'How can you even consider that? There got be some other way?','Как ты мог даже подумать об этом? Должен быть какой то другой путь?', 12841,0,0,1, '26499'), +(-1594078, 'Damn it Uther! As your future king, I order you to purge this city.','Проклятие Утер! Как будущий король я приказываю тебе очистить этот город.',12832,1,0,5, '26499'), +(-1594079, 'You are not my king yet boy.You know I whould obey that command ,even if you were!','Пока ты еще не король юноша. Но этот приказ я не выполнил бы будь ты хоть трижды королем!',12842,1,0,22, '26499'), +(-1594080, 'Then I consider this as an act of treason.','Тогда я буду расценивать это как измену.', 12833,0,0,0, '26499'), +(-1594081, 'Treason? You lost your mind Arthas?','Измену? Ты совсем лишился рассудка Артас?', 12843,0,0,5, '26499'), +(-1594082, 'Have I? Lord Uther. By my right of succession and suvenerity of my crown, I\'m here to releave you from command, and susspend your paladins from the service.','Неужели? Лорд Утер. Властью данной мне по праву наследования, я отстраняю вас от командования, и освобождаю от службы ваших паладинов.', 12834,0,0,1, '26499'), +(-1594083, 'Arthas? You can not just ...','Артас? Ты не можешь так просто...', 12837,0,0,1, '26499'), +(-1594084, 'It\'s done! Those of you who have will to save this land follow me!, the rest of you get out of my sight.!','Это уже сделано! Те из вас, кто действительно хочет спасти эту землю - за мной, остальные прочь с глаз моих.', 12835,0,0,0, '26499'), +(-1594085, 'You have crossed terible treshold, Arthas.','Ты пересек опасную черту, Артас.', 12844,0,0,25, '26499'), +(-1594086, 'Jaina?','Джайна?', 12836,0,0,1, '26499'), +(-1594087, 'I\'m sorry,Arthas , I can\'t watch you do this.','Прости Артас, но я не могу смотреть на это.', 12838,0,0,1, '26499'), +(-1594088, 'Take position here, I\'ll will lead a small force in stratholm and start the culling. We must contain and purge the infected people for the sake all of Lordaeron.','Обустройте позицию тут, а я пока поведу небольшой отряд в стратхольм и начну очищение. Мы должны изолировать и уничтожить зараженных жителей ради всего Лордаэрона.', 14327,0,0,1, '26499'), +(-1594089, 'Everyone looks ready! Remember these people are all infected with the plague, and they will die soon. We need to purge Stratholm and protect the remain of Lordaeron from the Scourge. Let\'s go.','Похоже все готовы! Помните эти люди заражены чумой и скоро умрут. Мы должны очистить Стратхольм и защитить Лордаэрон от Плети. Вперед.', 14293,0,0,1, '26499'), +(-1594090, 'Greetings to you my lord. How we can help?','Приветствую вас милорд. Чем вы можете помочь?', 0,0,0,1, '26499'), +(-1594091, 'I can help you, only with a clean death.','Я могу помочь вам лишь быстрой смертью.', 14294,0,0,0, '26499'), +(-1594092, 'Help our prince has gone mad ...','Помогите наш принц сошел с ума...', 0,0,0,0, '26499'), +(-1594093, 'This is only the beginning ..','Это только начало...', 14295,0,0,1, '26499'), +(-1594094, 'Yes. This is the beginning! I have ben waiting for you young Prince. Ahh, I\'m Mal\'Ganis.','Да. Это начало! Я ждал тебя юнный принц. Я Малганис.', 14410,0,0,1, '26499'), +(-1594095, 'As you can see your people are now my people.I will now turn the city Household by household, Until the flame of life has ben snufed out ,forever ..','Как видишь, твои люди отныне принадлежат мне. Дом за домом я порабощу этот город и огонь жизни угаснет здесь навсегда...',14411,0,0,1, '26499'), +(-1594096, 'I won\'t allow it Mal\'Ganis. Beter these people die by my hand, than they become your slaves and serv you after death.','Я не допущу этого Малганис. Лудше эти люди погибнут от моей руки, чем станут твоими рабами после смерти.',14296,0,0,5, '26499'), +(-1594097, 'Mal\'Ganis will send some of his scourge minions to interfer with us. Those with you with strong stell and magic should go forward and destroy them. I will lead the remaining forces for purging stratholme of the infected.','Малганис отправит своих прислужников из плети навстречу нам. Опытные воины и маги ступайте и уничтожте врагов. Я возглавлю оставшиеся войска в деле очищения стратхольма от заразы.',14885,0,0,1, '26499'), +(-1594098, 'Champions meet me at the Town Hall at once. We must take the fight with Mal\'Ganis !','Герои поспешите вcтретимся у городской ратуши. Мы должны сразиться с Малганисом на его территории!',14297,0,0,1, '26499'), +(-1594099, 'Follow me, I know the way through.','Идите за мной, я знаю дорогу.',14298,0,0,1, '26499'), +(-1594100, 'Calm citizens. Everything is normal. To go home ... Aaaaaa ... What is it?','Успокойтесь граждане. Все нормально. Расходитесь по домам... Аааааа... Что это?',0,0,0,1, '26499'), +(-1594101, 'Help...','Помогите...',0,0,0,0, '26499'), +(-1594102, 'Prince Arthas, what are you doing?','Принц Артас, что вы делаете?',0,0,0,0, '26499'), +(-1594103, 'Nenad ... You our prince, you\'re a defender of Lordaeron ....','Не надо! Вы же наш принц, вы же защитник Лордаэрона...',0,0,0,0, '26499'), +(-1594104, 'Paschady Milord ...','Пощады, милорд!',0,0,0,0, '26499'), +(-1594105, 'What we have done to you?','Что мы вам сделали?',0,0,0,0, '26499'), +(-1594106, '','<Плач>',9676,0,0,18, '26499'), +(-1594107, 'Royal troops attacked us, who can escape ...','Королевские войска напали на нас, спасайся кто может...',0,1,0,0, '26499'), +(-1594108, 'What have you done? What is happening here?','Что вы наделали? Что здесь происходит?',0,0,0,0, '26499'), +(-1594109, 'For what?','За что?',0,0,0,0, '26499'), +(-1594110, 'Let\'s play?',13428,'Поиграем?',0,0,0, '26499'), +(-1594111, 'New toys.','Новые игрушки.',13429,1,0,0, '26499'), +(-1594112, 'This ... Not ... Fun ...','Это... Не... Смешно...',13433,1,0,0, '26499'), +(-1594113, 'Boring ...','Скучно...',13430,1,0,0, '26499'), +(-1594114, 'Why do not you move?','Почему ты не идешь?',13431,1,0,0, '26499'), +(-1594115, 'Come on, I did not finish ...','Вставай я не закончил...',13432,1,0,0, '26499'), +(-1594116, 'Prince Arthas Menethil, On this day, a powerful darknes has taken hold of your soul. The death that you had destined on others by visiting others,On this day will be your own.','Принц Артас Менетил, в этот самый день могущественное зло поглотило твою душу. Смерть которую ты должен был принести другим, сегодня придет за тобой.',13408,0,0,0, '26499'), +(-1594117, 'I\'m doing what i have to , to save Lordaeron niether your words or actions will stop me.','Я делаю для Лордаэрона то, что должен, и никакие слова и поступки меня не остановят.',14309,0,0,5, '26499'), +(-1594118, 'We\'ll see about that young prince ...','Ну что ж, посмотрим, юный принц...',13409,0,0,0, '26499'), +(-1594119, '???????? ......','Аааааааа......',13416,0,0,0, '26499'), +(-1594120, 'You have no future ...','У тебя нет будущего...',13413,1,0,0, '26499'), +(-1594121, 'The hour of our greatest triumph ..','Пробил час нашего величайшего триумфа...',13414,1,0,0, '26499'), +(-1594122, 'You were destined to be defeated ...','Тебе было суждено потерпеть поражение...',13415,1,0,0, '26499'), +(-1594123, 'Tic,tac,tic,tac...','Тик - так... Тик - так...',13410,1,0,0, '26499'), +(-1594124, 'Too slow ...','Слишком медленно...',13411,1,0,0, '26499'), +(-1594125, 'It\'s time to end ...','Пора заканчивать...',13412,1,0,0, '26499'), +(-1594126, 'Do not touch me ...','Не трогайте меня...',0,1,0,0, '26499'), +(-1594127, 'You are a monster, not the prince ...','Вы чудовище, а не Принц...',0,1,0,0, '26499'), +(-1594128, 'Run .....','Бежим...',0,1,0,0, '26499'), +(-1594129, 'Remarcable late heroes of Lordaeron! It\'s time the dead ...','Cлишком поздно, герои Лордаэрона! Пришло время мертвых...',0,1,0,0, '26499'), +(-1594130, 'Aaaaaa fun ....','Аааааа развлечемся...',0,1,0,0, '26499'), +(-1594131, 'You are just a part of the master plan ...','Вы всего лишь часть плана хозяина...',0,1,0,0, '26499'), +(-1594132, 'The fun is just beginning!','Веселье только начинается!',0,1,0,0, '26499'), +(-1594133, 'Aaaa quality material ...','Аааа качественный материал...',0,1,0,0, '26499'), +(-1594134, 'Do not worry I\'ll find where you adapt ...','Не волнуйся, я найду куда тебя приспособить...',0,1,0,0, '26499'), +(-1594135, 'I need a sample!','Мне нужен образец!',0,1,0,0, '26499'), +(-1594136, 'So much power ... It will be my ....','Столько силы... Она будет моей...',0,1,0,0, '26499'), +(-1594137, 'Your flesh attached to you!','Твоя плоть предает тебя!',0,1,0,0, '26499'), +(-1594138, 'Familiarize yourself with my friends ...','Познакомтесь с моими друзьями...',0,1,0,0, '26499'), +(-1594139, 'Living Stratholm Meet your savior ...','Жители Стратхольма, встречайте ваших спасителей...',0,1,0,0, '26499'), +(-1594140, 'Boom ... Ha-ha-ha-ha ...','Бум... Ха-ха-ха-ха...',0,1,0,0, '26499'), +(-1594141, 'Blood ... Destruction ... Marvelous ...','Кровь... Разрушение... Восхитительно...',0,1,0,0, '26499'), +(-1594142, 'Yes! I am glad that I could get you through before the plague!','Да! Я рад, что я смог добраться сюда раньше чумы!',14299,0,0,1, '26499'), +(-1594143, 'What is this sorrcery?','Что это за колдовство?',14300,0,0,0, '26499'), +(-1594144, 'Mal\'Ganis it apers to have more thans scourge on his arsenal.We should do haste.','Кажется, что у Малганиса в распорежении есть еще кое что кроме Плети. Давайте поспешим.',14301,0,0,0, '26499'), +(-1594145, 'Again, that sorrcery, be prepared for anything.','Снова черная магия. Будьте готовы ко всему.',14302,0,0,0, '26499'), +(-1594146, 'Let\'s move on!.','Идем дальше.',14303,0,0,0, '26499'), +(-1594147, 'Watch your backs they surrounded Us in this hole...','Будьте начеку наc окружили в этой дыре...',14304,0,0,0, '26499'), +(-1594148, 'Mal\'Ganis is not making this easy ...','Малганис не собирается облегчить нам жизнь...',14305,0,0,0, '26499'), +(-1594149, 'They are very persistent','Они упрямы.',14306,0,0,0, '26499'), +(-1594150, 'What\'s more, he put me on the way?','Что еще он поставит у меня на пути?',14307,0,0,0, '26499'), +(-1594151, 'The quickest way to Mal\'Ganis lays behind those bookshelf ahead','Кратчайший путь к Малганису находится за тем шкафом.',14308,0,0,0, '26499'), +(-1594152, 'This will take only a moment.','Это займет совсем не много времени.',14310,0,0,0, '26499'), +(-1594153, 'I\' relieved that secret passage still works!','Слава свету, что потайной ход еще работает!',14311,0,0,0, '26499'), +(-1594154, 'Let\'s go through this place as quick as possible. If the undead won\'t gonna kill us the fire might','Давайте пройдем этот участок как можно быстрее. Если мы не погибнем от нежити, то можем погибнуть от этого огня.',14312,0,0,0, '26499'), +(-1594155, 'Rest a moment here clean your luns, but be ready we must go soon again.','Отдышитесь немного, но имейте ввиду - нам скоро снова в путь.',14313,0,0,0, '26499'), +(-1594156, 'That\'s enough we have to move again , Mal\'Ganis awaits.','Отдых окончен, надо идти. Малганис ждет.',14314,0,0,0, '26499'), +(-1594157,'Atlast , some luck! it looks like that Market Row not go cut by the fire. Mal\'Ganis it\'s supoused to be in Crussaders of squire, which is just ahead. Tell me whe you\'re ready to move forward.','Наконец нам хоть как то повезло! Огонь еще не добрался до торгового ряда. Малганис должен быть на площади рыцарей, которая находится не далеко от сюда. Скажите мне как будете готовы идти дальше.',14315,0,0,0, '26499'), +(-1594158, 'Yes, Justice will be done.','Да свершится правосудие.',14316,0,0,0, '26499'), +(-1594159, 'It will be a worthy test of Prince Arthas!','Это будет достойное испытание Принц Артас!',14413,1,0,0, '26499'), +(-1594160, 'Too easy ...','Слишком просто...',14416,1,0,0, '26499'), +(-1594161, 'The dark lord is not happy with your intervention ...','Темный повелитель не доволен твоим вторжением...',144107,1,0,0, '26499'), +(-1594162, 'I want Prince Arthas, not you ...','Мне нужен Принц Артас, а не ты...',14418,1,0,0, '26499'), +(-1594163, 'Anak Kiri ...','Анак Кири...',14422,1,0,0, '26499'), +(-1594164, 'My pressure will sweep away the forces of King - Lich ...','Мой натиск сметет силы короля - лича...',14423,1,0,0, '26499'), +(-1594165, 'Your death was in vain tiny mortal ...','Твоя смерть была напрасна, насекомое...',14424,1,0,0, '26499'), +(-1594166, 'Your time has came to an end ...','Твое время вышло...',14425,1,0,0, '26499'), +(-1594167, 'Arrrrhhhh ... I spent too much time in this weak litle shell ...','Аррррхххх... Я и так провел слишком много времени в этой слабой оболочке...',14426,1,0,0, '26499'), +(-1594168, 'Earl Narath ... I Mal\'Ganis .... I am eternal ...','Ирл Нарат... Я малганис.... Я вечен...',14427,1,0,0, '26499'), +(-1594169, 'You will never defeat the Lich - King without my forces! I will have my revenge on him , and you...','Тебе никогда не победить короля - лича без моих войск! Я отомщу и тебе и ему...',14429,1,0,0, '26499'), +(-1594170, 'We are going to finish this right now Mal\'Ganis. Just you and me ...','Мы покончим с этим сейчас же Малганис. Один на один...',14317,0,0,0, '26499'), +(-1594171, 'Your journey just begins young prince. Gather your forces and and meet me at the arctic land of, Northrend! It is there, we\'ll we shall setup the score beetwen us, It is there where your true destiny will unfold.','Твое путешествие начинается юный принц. Собирай свои войска и отправляйся в царство вечных снегов, Нордскол! Там мы уладим все наши дела, там ты узнаешь свою судьбу.',14412,0,0,0, '26499'), +(-1594172, 'I will hunt you till the end of the earth if I have to... Did you heard me? To the end of erth!...','Я отыщу тебя на краю земли... Ты слышешь меня? На краю земли...',14318,1,0,5, '26499'), +(-1594173, 'You performed well on this day! Anything that Mal\'Ganis left behind is yours take it as your reward. Now I need to begin some plans for an expedition into Northrend.','Вы славно сражались сегодня! Все что Малганис оставил тут ваша награда. А мне нужно начинать готовиться к экспедиции в Нордскол.',14319,0,0,5, '26499'), +(-1594174, 'Relax!','Отдохни!',14414,1,0,0, '26499'), +(-1594175, 'You seam tired!','Ты выглядишь усталым!',14415,1,0,0, '26499'), +(-1594176, 'Enogh I have ben waisted my time here . I need to come by in my own world.','Я лишь зря трачу тут свое время. Мне нужно собраться силами в моем родном мире.',14428,1,0,0, '26499'); + + +DELETE FROM script_waypoint WHERE entry=26499; +INSERT INTO script_waypoint VALUES + (26499, 0, 2099.876,1280.21,138.55, 0, 'WP1'), + (26499, 1, 2120.757,1286.97,136.343, 0, 'Summon Zombie'), (26499, 2, 2165.073,1279.338,133.40, 18000, 'Battle for Boss 1'), (26499, 3, 2186.441,1234.445,136.524, 5000, 'Open The Gate 01'), (26499, 4, 2210.385,1207.550,136.259, 0, 'WP2'), @@ -152,4 +163,4 @@ INSERT INTO `script_waypoint` VALUES (26499, 40, 2329.882,1406.273,128.013, 12000, 'Knights Street WP3'), (26499, 41, 2327.391,1412.475,127.692, 180000000, 'Knights Street WP4'), (26499, 42, 2329.882,1406.273,128.013, 0, 'Knights Street WP2'); -- Pustishka -- - \ No newline at end of file + \ No newline at end of file diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_lord_epoch.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_lord_epoch.cpp index 0ad739ed3..dbe6fea9d 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_lord_epoch.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_lord_epoch.cpp @@ -1,63 +1,112 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + +/* ScriptData +SDName: instance_culling_of_stratholme +SD%Complete: ?% +SDComment: +SDCategory: Culling of Stratholme +EndScriptData */ + + #include "precompiled.h" #include "def_culling_of_stratholme.h" enum { SPELL_COURSE = 52772, - SPELL_TIME_STOP = 58848, - SPELL_TIME_WARP = 52766, - SPELL_SPIKE_N = 52771, - SPELL_SPIKE_H = 58830, - - SAY_EPOCH_INTRO = -1594116, - SAY_EPOCH_AGGRO = -1594118, - SAY_EPOCH_DEATH = -1594119, - SAY_EPOCH_SLAY01 = -1594120, - SAY_EPOCH_SLAY02 = -1594121, - SAY_EPOCH_SLAY03 = -1594122, - SAY_EPOCH_WARP01 = -1594123, - SAY_EPOCH_WARP02 = -1594124, - SAY_EPOCH_WARP03 = -1594125 + SPELL_TIME_STOP = 58848, + SPELL_TIME_WARP = 52766, + SPELL_SPIKE_N = 52771, + SPELL_SPIKE_H = 58830, + + SAY_EPOCH_INTRO = -1594116, + SAY_EPOCH_AGGRO = -1594118, + SAY_EPOCH_DEATH = -1594119, + SAY_EPOCH_SLAY01 = -1594120, + SAY_EPOCH_SLAY02 = -1594121, + SAY_EPOCH_SLAY03 = -1594122, + SAY_EPOCH_WARP01 = -1594123, + SAY_EPOCH_WARP02 = -1594124, + SAY_EPOCH_WARP03 = -1594125 }; + + +/*###### +## boss_lord_epoch +######*/ struct MANGOS_DLL_DECL boss_lord_epochAI : public ScriptedAI { - boss_lord_epochAI(Creature *c) : ScriptedAI(c) - { - m_bIsHeroic = !c->GetMap()->IsRegularDifficulty(); + boss_lord_epochAI(Creature *c) : ScriptedAI(c) + { + m_pInstance = (ScriptedInstance*)c->GetInstanceData(); + m_bIsHeroic = c->GetMap()->IsRegularDifficulty(); Reset(); - } - -uint32 Step; -uint32 Steptim; -uint32 Intro; -bool m_bIsHeroic; -uint32 Spike_Timer; -uint32 Warp_Timer; -uint32 Stop_Timer; -uint32 Course_Timer; - - void Reset() - { - Intro = 0; - Step = 1; - Steptim = 26000; - Course_Timer = 9300; - Stop_Timer = 21300; - Warp_Timer = 25300; - Spike_Timer = 5300; - } - - void Aggro(Unit* who) -{ - DoScriptText(SAY_EPOCH_AGGRO, m_creature); -} - - void JustDied(Unit *killer) + } + + ScriptedInstance* m_pInstance; + + uint32 Step; + uint32 Steptim; + uint32 Intro; + bool m_bIsHeroic; + uint32 Spike_Timer; + uint32 Warp_Timer; + uint32 Stop_Timer; + uint32 Course_Timer; + + void Reset() + { + Step = 1; + Steptim = 26000; + Course_Timer = 9300; + Stop_Timer = 21300; + Warp_Timer = 25300; + Spike_Timer = 5300; + } + + void MoveInLineOfSight(Unit *who) { - DoScriptText(SAY_EPOCH_DEATH, m_creature); + if (m_creature->IsWithinDistInMap(who, 10.0f)) + { + if (m_pInstance->GetData(TYPE_ARTHAS_EVENT) == IN_PROGRESS) + Intro = 0; + } + + ScriptedAI::MoveInLineOfSight(who); } + void Aggro(Unit* who) + { + DoScriptText(SAY_EPOCH_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_EPOCH_EVENT, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + DoScriptText(SAY_EPOCH_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_EPOCH_EVENT, DONE); + } + void KilledUnit(Unit* pVictim) { switch(rand()%3) @@ -67,76 +116,92 @@ uint32 Course_Timer; case 2: DoScriptText(SAY_EPOCH_SLAY03, m_creature); break; } } - - void UpdateAI(const uint32 diff) - { - if(Intro == 0) - { - switch(Step) - { - case 1: - DoScriptText(SAY_EPOCH_INTRO, m_creature); - ++Step; - Steptim = 26000; - break; - case 3: - m_creature->setFaction(14); - ++Step; - Steptim = 1000; - break; - } - }else return; - - if (Steptim <= diff) - { - ++Step; - Steptim = 330000; - } Steptim -= diff; + + void UpdateAI(const uint32 diff) + { + if(Intro == 0) + { + switch(Step) + { + case 1: + ++Step; + Steptim = 5000; + break; + case 3: + DoScriptText(SAY_EPOCH_INTRO, m_creature); + ++Step; + Steptim = 26000; + break; + case 5: + m_creature->setFaction(14); + ++Step; + Steptim = 1000; + break; + } + } + else + return; + + if (Steptim <= diff) + { + ++Step; + Steptim = 330000; + } + Steptim -= diff; if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; -DoMeleeAttackIfReady(); + DoMeleeAttackIfReady(); -if (Course_Timer < diff) + if (Course_Timer < diff) { if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) DoCast(target, SPELL_COURSE); Course_Timer = 9300; - }else Course_Timer -= diff; + } + else + Course_Timer -= diff; -if (Spike_Timer < diff) + if (Spike_Timer < diff) { DoCast(m_creature->getVictim(),m_bIsHeroic ? SPELL_SPIKE_H : SPELL_SPIKE_N); Spike_Timer = 5300; - }else Spike_Timer -= diff; + } + else + Spike_Timer -= diff; -if (Stop_Timer < diff) + if (Stop_Timer < diff) { - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) DoCast(target, SPELL_TIME_STOP); - Stop_Timer = 21300; - }else Stop_Timer -= diff; + Stop_Timer = 21300; + } + else + Stop_Timer -= diff; -if (Warp_Timer < diff) + if (Warp_Timer < diff) { - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(target, SPELL_TIME_WARP); - switch(rand()%3) - { - case 0: DoScriptText(SAY_EPOCH_WARP01, m_creature); break; - case 1: DoScriptText(SAY_EPOCH_WARP02, m_creature); break; - case 2: DoScriptText(SAY_EPOCH_WARP03, m_creature); break; - } + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, SPELL_TIME_WARP); + + switch(rand()%3) + { + case 0: DoScriptText(SAY_EPOCH_WARP01, m_creature); break; + case 1: DoScriptText(SAY_EPOCH_WARP02, m_creature); break; + case 2: DoScriptText(SAY_EPOCH_WARP03, m_creature); break; + } Warp_Timer = 25300; - }else Warp_Timer -= diff; + } + else + Warp_Timer -= diff; - } + } }; CreatureAI* GetAI_boss_lord_epoch(Creature *_Creature) diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_malganis.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_malganis.cpp index 79e03578f..8e4055969 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_malganis.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_malganis.cpp @@ -1,99 +1,132 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + +/* ScriptData +SDName: instance_culling_of_stratholme +SD%Complete: ?% +SDComment: +SDCategory: Culling of Stratholme +EndScriptData */ + + #include "precompiled.h" #include "def_culling_of_stratholme.h" enum { - SAY_MALGANIS_AGGRO = -1594159, - SAY_MALGANIS_ESCAPE02 = -1594169, - SAY_MALGANIS_ESCAPE01 =-1594176, - SAY_MALGANIS_SLAY01 = -1594160, - SAY_MALGANIS_SLAY02 = -1594161, - SAY_MALGANIS_SLAY03 = -1594162, - SAY_MALGANIS_SLAY04 = -1594163, - SAY_MALGANIS_SLAY05 = -1594164, - SAY_MALGANIS_SLAY06 = -1594165, - SAY_MALGANIS_SLAY07 = -1594166, - SAY_MALGANIS_SLEEP01 = -1594174, - SAY_MALGANIS_SLEEP02 = -1594175, - SAY_MALGANIS_Sleep = -1594167, - SAY_MALGANIS_15HP = -1594168, - SAY_MALGANIS_OUTRO = -1594171, - SAY_ARTHAS_OUTRO01 = -1594170, - SAY_ARTHAS_OUTRO02 = -1594172, - SAY_ARTHAS_OUTRO03 = -1594173, + SAY_MALGANIS_AGGRO = -1594159, + SAY_MALGANIS_ESCAPE02 = -1594169, + SAY_MALGANIS_ESCAPE01 = -1594176, + SAY_MALGANIS_SLAY01 = -1594160, + SAY_MALGANIS_SLAY02 = -1594161, + SAY_MALGANIS_SLAY03 = -1594162, + SAY_MALGANIS_SLAY04 = -1594163, + SAY_MALGANIS_SLAY05 = -1594164, + SAY_MALGANIS_SLAY06 = -1594165, + SAY_MALGANIS_SLAY07 = -1594166, + SAY_MALGANIS_SLEEP01 = -1594174, + SAY_MALGANIS_SLEEP02 = -1594175, + SAY_MALGANIS_Sleep = -1594167, + SAY_MALGANIS_15HP = -1594168, + SAY_MALGANIS_OUTRO = -1594171, + SAY_ARTHAS_OUTRO01 = -1594170, + SAY_ARTHAS_OUTRO02 = -1594172, + SAY_ARTHAS_OUTRO03 = -1594173, SPELL_SWAMP_N = 52720, SPELL_SWAMP_H = 58852, - SPELL_MIND_BLAST_N = 52722, - SPELL_MIND_BLAST_H = 58850, - SPELL_SLEEP_N = 52721, - SPELL_SLEEP_H = 58849, - SPELL_VAMPIRE = 52723, - - NPC_ARTHAS = 26499 + SPELL_MIND_BLAST_N = 52722, + SPELL_MIND_BLAST_H = 58850, + SPELL_SLEEP_N = 52721, + SPELL_SLEEP_H = 58849, + SPELL_VAMPIRE = 52723 }; +/*###### +## boss_malganis +######*/ struct MANGOS_DLL_DECL boss_malganisAI : public ScriptedAI { - boss_malganisAI(Creature *c) : ScriptedAI(c) - { - m_pInstance = (ScriptedInstance*)c->GetInstanceData(); - m_bIsHeroic = !c->GetMap()->IsRegularDifficulty(); + boss_malganisAI(Creature *c) : ScriptedAI(c) + { + m_pInstance = (ScriptedInstance*)c->GetInstanceData(); + m_bIsHeroic = c->GetMap()->IsRegularDifficulty(); Reset(); - } - -ScriptedInstance* m_pInstance; - -Unit* pTarget; -bool Finish; -bool Sleep; -bool Vampire; -uint32 Phase; -Creature* Malganis; -Creature* Arthas; -bool Outro; -bool m_bIsHeroic; -uint32 Step; -uint32 Steptim; -uint32 Motion; -uint32 Swamp_Timer; -uint32 MindBlast_Timer; -uint32 Sleep_Timer; -uint32 Vampire_Timer; - - void Reset() - { - Sleep = false; - Vampire = false; - Phase = 1; - Outro = false; - Step = 1; - Steptim = 7000; - Motion = 0; - Swamp_Timer = 6300; - MindBlast_Timer = 11300; - Sleep_Timer = 17300; - Vampire_Timer = 30000; - if(Finish == true) - { }else Finish = false; - } - - void Aggro(Unit* who) -{ - DoScriptText(SAY_MALGANIS_AGGRO, m_creature); - if (Creature* pArthas = GetClosestCreatureWithEntry(m_creature, NPC_ARTHAS, 150.0f)) - Arthas = pArthas; + } + + ScriptedInstance* m_pInstance; + + Unit* pTarget; + bool Finish; + bool Sleep; + bool Vampire; + uint32 Phase; + Creature* Malganis; + Creature* Arthas; + bool Outro; + bool m_bIsHeroic; + uint32 Step; + uint32 Steptim; + uint32 Motion; + uint32 Swamp_Timer; + uint32 MindBlast_Timer; + uint32 Sleep_Timer; + uint32 Vampire_Timer; + + void Reset() + { + Sleep = false; + Vampire = false; + Phase = 1; + Outro = false; + Step = 1; + Steptim = 7000; + Motion = 0; + Swamp_Timer = 6300; + MindBlast_Timer = 11300; + Sleep_Timer = 17300; + Vampire_Timer = 30000; + + if(Finish == true) {} + else + Finish = false; - if (m_pInstance) - { - GameObject* pGate = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GO_MAL_GATE2)); - if (pGate && !pGate->GetGoState()) - { - pGate->SetGoState(GO_STATE_READY); - } - } + if(m_pInstance->GetData(TYPE_MALGANIS_EVENT) == DONE || m_pInstance->GetData(TYPE_ARTHAS_EVENT) == DONE) + { + m_creature->SetDeadByDefault(true); + } + } -} + void Aggro(Unit* who) + { + DoScriptText(SAY_MALGANIS_AGGRO, m_creature); + if (Creature* pArthas = GetClosestCreatureWithEntry(m_creature, NPC_ARTHAS, 150.0f)) + Arthas = pArthas; + + if (m_pInstance) + { + m_pInstance->SetData(TYPE_MALGANIS_EVENT, IN_PROGRESS); + GameObject* pGate = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GO_MAL_GATE2)); + if (pGate && !pGate->GetGoState()) + { + pGate->SetGoState(GO_STATE_READY); + } + } + } void KilledUnit(Unit* pVictim) { @@ -112,178 +145,197 @@ uint32 Vampire_Timer; void UpdateAI(const uint32 diff) { -if(Outro == false) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; + if(Outro == false) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; - DoMeleeAttackIfReady(); + DoMeleeAttackIfReady(); - if (Swamp_Timer < diff) - { - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(target, m_bIsHeroic ? SPELL_SWAMP_H : SPELL_SWAMP_N); + if (Swamp_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, m_bIsHeroic ? SPELL_SWAMP_H : SPELL_SWAMP_N); - Swamp_Timer = 7300; - }else Swamp_Timer -= diff; + Swamp_Timer = 7300; + } + else + Swamp_Timer -= diff; - if (MindBlast_Timer < diff) - { - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(target, m_bIsHeroic ? SPELL_MIND_BLAST_H : SPELL_MIND_BLAST_N); + if (MindBlast_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, m_bIsHeroic ? SPELL_MIND_BLAST_H : SPELL_MIND_BLAST_N); - MindBlast_Timer = 11300; - }else MindBlast_Timer -= diff; + MindBlast_Timer = 11300; + } + else + MindBlast_Timer -= diff; - if(m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 40) - { - if(Sleep == false) - { - Sleep = true; - DoScriptText(SAY_MALGANIS_Sleep, m_creature); - } + if(m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 40) + { + if(Sleep == false) + { + Sleep = true; + DoScriptText(SAY_MALGANIS_Sleep, m_creature); + } - if (Sleep_Timer < diff) - { - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(target, m_bIsHeroic ? SPELL_SLEEP_H : SPELL_SLEEP_N); - switch(rand()%2) - { - case 0: DoScriptText(SAY_MALGANIS_SLEEP01, m_creature); break; - case 1: DoScriptText(SAY_MALGANIS_SLEEP02, m_creature); break; - } - - Sleep_Timer = 17300; - }else Sleep_Timer -= diff; - } - - if(m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 25) - { - if(Vampire == false) - { - Vampire = true; - DoScriptText(SAY_MALGANIS_15HP, m_creature); - DoCast(m_creature, SPELL_VAMPIRE); - } - if (Vampire_Timer < diff) - { - DoCast(m_creature, SPELL_VAMPIRE); + if (Sleep_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, m_bIsHeroic ? SPELL_SLEEP_H : SPELL_SLEEP_N); + switch(rand()%2) + { + case 0: DoScriptText(SAY_MALGANIS_SLEEP01, m_creature); break; + case 1: DoScriptText(SAY_MALGANIS_SLEEP02, m_creature); break; + } - Vampire_Timer = 30000; - }else Vampire_Timer -= diff; + Sleep_Timer = 17300; + } + else + Sleep_Timer -= diff; + } - } + if(m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 25) + { + if(Vampire == false) + { + Vampire = true; + DoScriptText(SAY_MALGANIS_15HP, m_creature); + DoCast(m_creature, SPELL_VAMPIRE); + } + if (Vampire_Timer < diff) + { + DoCast(m_creature, SPELL_VAMPIRE); + Vampire_Timer = 30000; + } + else + Vampire_Timer -= diff; - if(m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 5) - { - Finish = true; - } + } - if(Arthas) - { - if(Arthas->isDead()) - { - - m_creature->setFaction(35); - m_creature->RemoveAllAuras(); - m_creature->DeleteThreatList(); - m_creature->CombatStop(true); - m_creature->InterruptNonMeleeSpells(false); - m_creature->SetVisibility(VISIBILITY_OFF); - } - } - } - - if(Finish == true) - { - switch(Step) + if(m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 5) + { + // adding kill credit for the players to be able to complete the quest + Map *map = m_creature->GetMap(); + Map::PlayerList const& players = map->GetPlayers(); + if (!players.isEmpty() && map->IsDungeon()) { - case 1: - Outro = true; - Malganis = m_creature; - DoScriptText(SAY_MALGANIS_ESCAPE01, Malganis); - if (Creature* pArthas = GetClosestCreatureWithEntry(m_creature, NPC_ARTHAS, 150.0f)) - Arthas = pArthas; - Arthas->setFaction(35); - Arthas->RemoveAllAuras(); - Arthas->DeleteThreatList(); - Arthas->CombatStop(true); - Arthas->InterruptNonMeleeSpells(false); - Malganis->setFaction(35); - Malganis->RemoveAllAuras(); - Malganis->DeleteThreatList(); - Malganis->CombatStop(true); - Malganis->InterruptNonMeleeSpells(false); - Malganis->GetMotionMaster()->MovePoint(0, 2286.963f, 1484.449f, 127.850f); - Arthas->GetMotionMaster()->MovePoint(0, 2299.289f, 1491.944f, 128.362f); - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Malganis->GetGUID()); - Malganis->SetUInt64Value(UNIT_FIELD_TARGET, Arthas->GetGUID()); - ++Step; - Steptim = 10000; - break; + for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) + { + if (Player* pPlayer = itr->getSource()) + pPlayer->KilledMonsterCredit(NPC_MALGANIS, m_creature->GetGUID()); + } + } + Finish = true; + } + + if(Arthas) + { + if(Arthas->isDead()) + { + m_creature->setFaction(35); + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->InterruptNonMeleeSpells(false); + m_creature->SetVisibility(VISIBILITY_OFF); + } + } + } + + if(Finish == true) + { + switch(Step) + { + case 1: + Outro = true; + Malganis = m_creature; + DoScriptText(SAY_MALGANIS_ESCAPE01, Malganis); + if (Creature* pArthas = GetClosestCreatureWithEntry(m_creature, NPC_ARTHAS, 150.0f)) + Arthas = pArthas; + Arthas->setFaction(35); + Arthas->RemoveAllAuras(); + Arthas->DeleteThreatList(); + Arthas->CombatStop(true); + Arthas->InterruptNonMeleeSpells(false); + Malganis->setFaction(35); + Malganis->RemoveAllAuras(); + Malganis->DeleteThreatList(); + Malganis->CombatStop(true); + Malganis->InterruptNonMeleeSpells(false); + Malganis->GetMotionMaster()->MovePoint(0, 2286.963f, 1484.449f, 127.850f); + Arthas->GetMotionMaster()->MovePoint(0, 2299.289f, 1491.944f, 128.362f); + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Malganis->GetGUID()); + Malganis->SetUInt64Value(UNIT_FIELD_TARGET, Arthas->GetGUID()); + ++Step; + Steptim = 10000; + break; case 3: - DoScriptText(SAY_MALGANIS_ESCAPE02, Malganis); - ++Step; - Steptim = 10000; - break; + DoScriptText(SAY_MALGANIS_ESCAPE02, Malganis); + ++Step; + Steptim = 10000; + break; case 5: - DoScriptText(SAY_ARTHAS_OUTRO01, Arthas); - ++Step; - Steptim = 5000; - break; + DoScriptText(SAY_ARTHAS_OUTRO01, Arthas); + ++Step; + Steptim = 5000; + break; case 7: - DoScriptText(SAY_MALGANIS_OUTRO, Malganis); - ++Step; - Steptim = 20000; - break; + DoScriptText(SAY_MALGANIS_OUTRO, Malganis); + ++Step; + Steptim = 20000; + break; case 9: - Malganis->SetVisibility(VISIBILITY_OFF); - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, 0); - Arthas->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); - Arthas->GetMotionMaster()->MovePoint(0, Malganis->GetPositionX(), Malganis->GetPositionY(), Malganis->GetPositionZ()); - ++Step; - Steptim = 3000; - break; + Malganis->SetVisibility(VISIBILITY_OFF); + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, 0); + Arthas->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + Arthas->GetMotionMaster()->MovePoint(0, Malganis->GetPositionX(), Malganis->GetPositionY(), Malganis->GetPositionZ()); + ++Step; + Steptim = 3000; + break; case 11: - DoScriptText(SAY_ARTHAS_OUTRO02, Arthas); - ++Step; - Steptim = 6000; - break; + DoScriptText(SAY_ARTHAS_OUTRO02, Arthas); + ++Step; + Steptim = 6000; + break; case 13: - DoScriptText(SAY_ARTHAS_OUTRO03, Arthas); - if (m_pInstance) - { - GameObject* pChest = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GO_MAL_CHEST)); - if (pChest && !pChest->isSpawned()) - { - pChest->SetRespawnTime(180000); - } - } - ++Step; - Steptim =11000; - break; + DoScriptText(SAY_ARTHAS_OUTRO03, Arthas); + if (m_pInstance) + { + GameObject* pChest = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GO_MAL_CHEST)); + // this is the npc at who the players can turn in the quest + Arthas->SummonCreature(30997,2296.665f,1502.362f,128.362f,4.961f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,900000); + // those here gonna lock out the instance for the cd time + m_pInstance->SetData(TYPE_ARTHAS_EVENT, DONE); + m_pInstance->SetData(TYPE_MALGANIS_EVENT, DONE); + } + ++Step; + Steptim =11000; + break; case 15: - if (m_pInstance) - m_pInstance->SetData(TYPE_ARTHAS_EVENT, DONE); - Arthas->GetMotionMaster()->MovePoint(0, 2243.311f, 1476.025f, 132.352f); - ++Step; - Steptim =11000; - break; + Arthas->GetMotionMaster()->MovePoint(0, 2243.311f, 1476.025f, 132.352f); + ++Step; + Steptim =11000; + break; case 17: - Arthas->SetVisibility(VISIBILITY_OFF); - Outro = false; - ++Step; - Steptim =11000; - break; - } - } else return; - - if (Steptim <= diff) - { - ++Step; - Steptim = 330000; - } Steptim -= diff; - } + Arthas->SetVisibility(VISIBILITY_OFF); + Outro = false; + ++Step; + Steptim =11000; + break; + } + } + else + return; + + if (Steptim <= diff) + { + ++Step; + Steptim = 330000; + } + Steptim -= diff; + } }; CreatureAI* GetAI_boss_malganis(Creature *_Creature) diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_meathook.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_meathook.cpp index 15514b2e1..370bbca44 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_meathook.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_meathook.cpp @@ -1,3 +1,29 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + +/* ScriptData +SDName: instance_culling_of_stratholme +SD%Complete: ?% +SDComment: +SDCategory: Culling of Stratholme +EndScriptData */ + + + #include "precompiled.h" #include "def_culling_of_stratholme.h" @@ -5,49 +31,62 @@ enum { SPELL_CHAIN_N = 52696, SPELL_CHAIN_H = 58823, - SPELL_EXPLODED_N = 52666, - SPELL_EXPLODED_H = 58821, - SPELL_FRENZY = 58841, - - SAY_MEATHOOK_SPAWN = -1594110, - SAY_MEATHOOK_AGGRO = -1594111, - SAY_MEATHOOK_DEATH = -1594112, - SAY_MEATHOOK_SLAY01 = -1594113, - SAY_MEATHOOK_SLAY02 = -1594114, - SAY_MEATHOOK_SLAY03 = -1594115 + SPELL_EXPLODED_N = 52666, + SPELL_EXPLODED_H = 58821, + SPELL_FRENZY = 58841, + + SAY_MEATHOOK_SPAWN = -1594110, + SAY_MEATHOOK_AGGRO = -1594111, + SAY_MEATHOOK_DEATH = -1594112, + SAY_MEATHOOK_SLAY01 = -1594113, + SAY_MEATHOOK_SLAY02 = -1594114, + SAY_MEATHOOK_SLAY03 = -1594115 }; +/*###### +## boss_meathook +######*/ struct MANGOS_DLL_DECL boss_meathookAI : public ScriptedAI { - boss_meathookAI(Creature *c) : ScriptedAI(c) - { - m_bIsHeroic = !c->GetMap()->IsRegularDifficulty(); + boss_meathookAI(Creature *c) : ScriptedAI(c) + { + m_pInstance = (ScriptedInstance*)c->GetInstanceData(); + m_bIsHeroic = c->GetMap()->IsRegularDifficulty(); Reset(); - } - -bool m_bIsHeroic; -uint32 phaseArthas; -uint32 Chain_Timer; -uint32 Exploded_Timer; -uint32 Frenzy_Timer; - - void Reset() - { - phaseArthas = 0; - Chain_Timer = 6300; - Exploded_Timer = 9300; - Frenzy_Timer = 23300; - } - - void Aggro(Unit* who) -{ - DoScriptText(SAY_MEATHOOK_AGGRO, m_creature); -} - - void JustDied(Unit *killer) - { - DoScriptText(SAY_MEATHOOK_DEATH, m_creature); - } + } + + ScriptedInstance* m_pInstance; + + bool m_bIsHeroic; + uint32 phaseArthas; + uint32 Chain_Timer; + uint32 Exploded_Timer; + uint32 Frenzy_Timer; + + void Reset() + { + phaseArthas = 0; + Chain_Timer = 6300; + Exploded_Timer = 9300; + Frenzy_Timer = 23300; + + } + + void Aggro(Unit* who) + { + DoScriptText(SAY_MEATHOOK_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_MEATHOOK_EVENT, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + DoScriptText(SAY_MEATHOOK_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_MEATHOOK_EVENT, DONE); + } void KilledUnit(Unit* pVictim) { @@ -65,32 +104,38 @@ uint32 Frenzy_Timer; if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; -DoMeleeAttackIfReady(); + DoMeleeAttackIfReady(); -if (Chain_Timer < diff) + if (Chain_Timer < diff) { - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(target, m_bIsHeroic ? SPELL_CHAIN_H : SPELL_CHAIN_N); + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, m_bIsHeroic ? SPELL_CHAIN_H : SPELL_CHAIN_N); Chain_Timer = 6300; - }else Chain_Timer -= diff; + } + else + Chain_Timer -= diff; -if (Exploded_Timer < diff) + if (Exploded_Timer < diff) { - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(target, m_bIsHeroic ? SPELL_EXPLODED_H : SPELL_EXPLODED_N); + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, m_bIsHeroic ? SPELL_EXPLODED_H : SPELL_EXPLODED_N); Exploded_Timer = 9300; - }else Exploded_Timer -= diff; + } + else + Exploded_Timer -= diff; -if (Frenzy_Timer < diff) + if (Frenzy_Timer < diff) { - DoCast(m_creature,SPELL_FRENZY); + DoCast(m_creature,SPELL_FRENZY); Frenzy_Timer = 23300; - }else Frenzy_Timer -= diff; + } + else + Frenzy_Timer -= diff; - } + } }; CreatureAI* GetAI_boss_meathook(Creature *_Creature) diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_salramm.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_salramm.cpp index e4e91377c..3cb457324 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_salramm.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_salramm.cpp @@ -1,59 +1,97 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + +/* ScriptData +SDName: instance_culling_of_stratholme +SD%Complete: ?% +SDComment: +SDCategory: Culling of Stratholme +EndScriptData */ + + + #include "precompiled.h" #include "def_culling_of_stratholme.h" enum { - SAY_SALRAMM_SPAWN = -1594129, - SAY_SALRAMM_AGGRO = -1594130, - SAY_SALRAMM_DEATH = -1594131, - SAY_SALRAMM_SLAY01 = -1594132, - SAY_SALRAMM_SLAY02 = -1594133, - SAY_SALRAMM_SLAY03 = -1594134, - SAY_SALRAMM_STEAL01 = -1594135, - SAY_SALRAMM_STEAL02 = -1594136, - SAY_SALRAMM_STEAL03 = -1594137, - - SPELL_SB_N = 57725, - SPELL_SB_H = 58827, - SPELL_FLESH = 58845, - SPELL_STEAL = 52708 + SAY_SALRAMM_SPAWN = -1594129, + SAY_SALRAMM_AGGRO = -1594130, + SAY_SALRAMM_DEATH = -1594131, + SAY_SALRAMM_SLAY01 = -1594132, + SAY_SALRAMM_SLAY02 = -1594133, + SAY_SALRAMM_SLAY03 = -1594134, + SAY_SALRAMM_STEAL01 = -1594135, + SAY_SALRAMM_STEAL02 = -1594136, + SAY_SALRAMM_STEAL03 = -1594137, + + SPELL_SB_N = 57725, + SPELL_SB_H = 58827, + SPELL_FLESH = 58845, + SPELL_STEAL = 52708 }; +/*###### +## boss_salramm +######*/ struct MANGOS_DLL_DECL boss_salrammAI : public ScriptedAI { - boss_salrammAI(Creature *c) : ScriptedAI(c) - { - m_bIsHeroic = !c->GetMap()->IsRegularDifficulty(); + boss_salrammAI(Creature *c) : ScriptedAI(c) + { + m_pInstance = (ScriptedInstance*)c->GetInstanceData(); + m_bIsHeroic = c->GetMap()->IsRegularDifficulty(); Reset(); - } - -bool m_bIsHeroic; -uint32 Step; -uint32 Steptim; -uint32 Motion; -uint32 ShadowBolt_Timer; -uint32 Flesh_Timer; -uint32 Steal_Timer; - - void Reset() - { - Step = 1; - Steptim = 7000; - Motion = 0; - ShadowBolt_Timer = 5300; - Flesh_Timer = 7300; - Steal_Timer = 17300; - } - - void Aggro(Unit* who) -{ - DoScriptText(SAY_SALRAMM_AGGRO, m_creature); - m_creature->GetMotionMaster()->Clear(false); -} - - void JustDied(Unit *killer) - { - DoScriptText(SAY_SALRAMM_DEATH, m_creature); + } + + ScriptedInstance* m_pInstance; + + bool m_bIsHeroic; + uint32 Step; + uint32 Steptim; + uint32 Motion; + uint32 ShadowBolt_Timer; + uint32 Flesh_Timer; + uint32 Steal_Timer; + + void Reset() + { + Step = 1; + Steptim = 7000; + ShadowBolt_Timer = 5300; + Flesh_Timer = 7300; + Steal_Timer = 17300; + } + + void Aggro(Unit* who) + { + Motion = 0; + DoScriptText(SAY_SALRAMM_AGGRO, m_creature); + m_creature->GetMotionMaster()->Clear(false); + + if (m_pInstance) + m_pInstance->SetData(TYPE_SALRAMM_EVENT, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + DoScriptText(SAY_SALRAMM_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_SALRAMM_EVENT, DONE); } void KilledUnit(Unit* pVictim) @@ -66,67 +104,77 @@ uint32 Steal_Timer; } } - void UpdateAI(const uint32 diff) - { - DoMeleeAttackIfReady(); - - if(Motion == 0) - { - switch(Step) - { - case 1: - DoScriptText(SAY_SALRAMM_SPAWN, m_creature); - ++Step; - Steptim = 7000; - break; - case 3: - m_creature->GetMotionMaster()->MovePoint(0, 2165.073f,1279.338f,133.40f); - ++Step; - Steptim = 7000; - break; - } - } else return; - - if (Steptim <= diff) - { - ++Step; - Steptim = 330000; - } Steptim -= diff; - - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - -if (ShadowBolt_Timer < diff) - { - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(target, m_bIsHeroic ? SPELL_SB_H : SPELL_SB_N); + void UpdateAI(const uint32 diff) + { + DoMeleeAttackIfReady(); + + if(Motion == 0) + { + switch(Step) + { + case 1: + DoScriptText(SAY_SALRAMM_SPAWN, m_creature); + ++Step; + Steptim = 7000; + break; + case 3: + m_creature->GetMotionMaster()->MovePoint(0, 2165.073f,1279.338f,133.40f); + ++Step; + Steptim = 7000; + break; + } + } + else + return; + + if (Steptim <= diff) + { + ++Step; + Steptim = 330000; + } + Steptim -= diff; + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (ShadowBolt_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, m_bIsHeroic ? SPELL_SB_H : SPELL_SB_N); ShadowBolt_Timer = 5300; - }else ShadowBolt_Timer -= diff; + } + else + ShadowBolt_Timer -= diff; -if (Flesh_Timer < diff) + if (Flesh_Timer < diff) { if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) DoCast(target,SPELL_FLESH); Flesh_Timer = 7300; - }else Flesh_Timer -= diff; + } + else + Flesh_Timer -= diff; -if (Steal_Timer < diff) + if (Steal_Timer < diff) { if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) DoCast(target,SPELL_STEAL); - switch(rand()%3) - { - case 0: DoScriptText(SAY_SALRAMM_STEAL01, m_creature); break; - case 1: DoScriptText(SAY_SALRAMM_STEAL02, m_creature); break; - case 2: DoScriptText(SAY_SALRAMM_STEAL03, m_creature); break; - } + + switch(rand()%3) + { + case 0: DoScriptText(SAY_SALRAMM_STEAL01, m_creature); break; + case 1: DoScriptText(SAY_SALRAMM_STEAL02, m_creature); break; + case 2: DoScriptText(SAY_SALRAMM_STEAL03, m_creature); break; + } Steal_Timer = 17300; - }else Steal_Timer -= diff; + } + else + Steal_Timer -= diff; - } + } }; CreatureAI* GetAI_boss_salramm(Creature *_Creature) diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp index aa07fe464..5065cbc05 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp @@ -1,7 +1,33 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + +/* ScriptData +SDName: instance_culling_of_stratholme +SD%Complete: ?% +SDComment: +SDCategory: Culling of Stratholme +EndScriptData */ + + #include "precompiled.h" #include "def_culling_of_stratholme.h" #include "escort_ai.h" + enum { SAY_INTRO01 = -1594071, //Arthas @@ -22,677 +48,744 @@ enum SAY_INTRO16 = -1594086, //Arthas SAY_INTRO17 = -1594087, //Jaina SAY_INTRO18 = -1594088, //Arthas - SAY_ENTER01 = -1594089, //Arthas - SAY_ENTER02 = -1594090, //Cityman - SAY_ENTER03 = -1594091, //Arthas - SAY_ENTER04 = -1594092, //Crazyman - SAY_ENTER05 = -1594093, //Arthas - SAY_ENTER06 = -1594094, //Malganis - SAY_ENTER07 = -1594095, //Malganis - SAY_ENTER08 = -1594096, //Arthas - SAY_ENTER09 = -1594097, //Arthas - SAY_PHASE501 = -1594098, //Arthas - SAY_PHASE502 = -1594099, //Arthas - SAY_PEOPLE05 = -1594100, //Patricia - SAY_PEOPLE06 = -1594101, //Patricia - SAY_PEOPLE07 = -1594103, //Patricia - SAY_PEOPLE08 = -1594105, //Patricia - SAY_PEOPLE09 = -1594106, //Patricia - SAY_EPOCH = -1594117, //Arthas Dialog for Epoch - SAY_MEATHOOK_SPAWN = -1594110, - SAY_PEOPLE01 = -1594107, //People Run - SAY_PEOPLE02 = -1594108, //People Run - SAY_PEOPLE03 = -1594109, //People Run - SAY_PEOPLE04 = -1594104, //People Run - SAY_PEOPLE10 = -1594102, //People Run - SAY_PEOPLE11 = -1594126, //People Run - SAY_PEOPLE12 = -1594127, //People Run - SAY_PEOPLE13 = -1594128, //People Run - SAY_PHASE503 = -1594152, //Arthas Shkaf 01 - SAY_PHASE504 = -1594153, //Arthas Shkaf 02 - SAY_PHASE505 = -1594142, //Arthas Glore - SAY_PHASE506 = -1594143, //Arthas That is it - SAY_PHASE507 = -1594144, //Arthas - SAY_PHASE508 = -1594145, //Arthas This Magic Again - SAY_PHASE509 = -1594147, //Arthas We are Close in trap - SAY_PHASE510 = -1594146, //Arthas Lets go - SAY_PHASE511 = -1594151, //Arthas Shkaff tam - SAY_PHASE601 = -1594154, //Arthas Fire - SAY_PHASE602 = -1594155, //Arthas Picnic - SAY_PHASE603 = -1594156, //Arthas Picnic End - SAY_PHASE604 = -1594157, //Arthas Stop Escort ska on ne virybaetsa - SAY_PHASE605 = -1594158, //Arthas Pipec Malganisy - - NPC_MALGANIS = 26533, - NPC_SCARED_MAN_2 = 31127, - NPC_DRAKONIAN = 27744, - NPC_TIME_RIFT = 28409, - NPC_TIME_RIFT_2 = 28439, - NPC_PATRICIA = 31028, - NPC_SCARED_MAN = 31126, - NPC_KNIGHT_ESCORT = 27745, - NPC_PRIEST_ESCORT = 27747, - NPC_JAINA = 26497, - NPC_ARTHAS = 26499, - NPC_UTHER = 26528, - NPC_CITY_MAN = 28167, - NPC_CRAZY_MAN = 28169, - NPC_ZOMBIE = 27737, - - SPELL_FEAR = 39176, - SPELL_CHAIN_N = 52696, - SPELL_CHAIN_H = 58823, - SPELL_EXPLODED_N = 52666, - SPELL_EXPLODED_H = 58821, - SPELL_FRENZY = 58841, - SPELL_ARTHAS_AURA = 52442, - SPELL_EXORCISM_N = 52445, - SPELL_EXORCISM_H = 58822, - SPELL_HOLY_LIGHT = 52444, - - ENCOUNTER_ZOMBIE_NUMBER = 4, - ENCOUNTER_ZOMBIE_NUMBER2 = 8 + SAY_ENTER01 = -1594089, //Arthas + SAY_ENTER02 = -1594090, //Cityman + SAY_ENTER03 = -1594091, //Arthas + SAY_ENTER04 = -1594092, //Crazyman + SAY_ENTER05 = -1594093, //Arthas + SAY_ENTER06 = -1594094, //Malganis + SAY_ENTER07 = -1594095, //Malganis + SAY_ENTER08 = -1594096, //Arthas + SAY_ENTER09 = -1594097, //Arthas + SAY_PHASE501 = -1594098, //Arthas + SAY_PHASE502 = -1594099, //Arthas + SAY_PEOPLE05 = -1594100, //Patricia + SAY_PEOPLE06 = -1594101, //Patricia + SAY_PEOPLE07 = -1594103, //Patricia + SAY_PEOPLE08 = -1594105, //Patricia + SAY_PEOPLE09 = -1594106, //Patricia + SAY_EPOCH = -1594117, //Arthas Dialog for Epoch + SAY_MEATHOOK_SPAWN = -1594110, + SAY_PEOPLE01 = -1594107, //People Run + SAY_PEOPLE02 = -1594108, //People Run + SAY_PEOPLE03 = -1594109, //People Run + SAY_PEOPLE04 = -1594104, //People Run + SAY_PEOPLE10 = -1594102, //People Run + SAY_PEOPLE11 = -1594126, //People Run + SAY_PEOPLE12 = -1594127, //People Run + SAY_PEOPLE13 = -1594128, //People Run + SAY_PHASE503 = -1594152, //Arthas Shkaf 01 + SAY_PHASE504 = -1594153, //Arthas Shkaf 02 + SAY_PHASE505 = -1594142, //Arthas Glore + SAY_PHASE506 = -1594143, //Arthas That is it + SAY_PHASE507 = -1594144, //Arthas + SAY_PHASE508 = -1594145, //Arthas This Magic Again + SAY_PHASE509 = -1594147, //Arthas We are Close in trap + SAY_PHASE510 = -1594146, //Arthas Lets go + SAY_PHASE511 = -1594151, //Arthas Shkaff tam + SAY_PHASE601 = -1594154, //Arthas Fire + SAY_PHASE602 = -1594155, //Arthas Picnic + SAY_PHASE603 = -1594156, //Arthas Picnic End + SAY_PHASE604 = -1594157, //Arthas Stop Escort ska on ne virybaetsa + SAY_PHASE605 = -1594158, //Arthas Pipec Malganisy + + NPC_SCARED_MAN_2 = 31127, + NPC_DRAKONIAN = 27744, + NPC_TIME_RIFT = 28409, + NPC_TIME_RIFT_2 = 28439, + NPC_PATRICIA = 31028, + NPC_SCARED_MAN = 31126, + NPC_KNIGHT_ESCORT = 27745, + NPC_PRIEST_ESCORT = 27747, + NPC_JAINA = 26497, + NPC_UTHER = 26528, + NPC_CITY_MAN = 28167, + NPC_CRAZY_MAN = 28169, + NPC_ZOMBIE = 27737, + + SPELL_FEAR = 39176, + SPELL_CHAIN_N = 52696, + SPELL_CHAIN_H = 58823, + SPELL_EXPLODED_N = 52666, + SPELL_EXPLODED_H = 58821, + SPELL_FRENZY = 58841, + SPELL_ARTHAS_AURA = 52442, + SPELL_EXORCISM_N = 52445, + SPELL_EXORCISM_H = 58822, + SPELL_HOLY_LIGHT = 52444, + + ENCOUNTER_ZOMBIE_NUMBER = 4, + ENCOUNTER_ZOMBIE_NUMBER2 = 50 }; +/*###### +## npc_arthas +######*/ struct MANGOS_DLL_DECL npc_arthasAI : public npc_escortAI { npc_arthasAI(Creature *pCreature) : npc_escortAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroic = !pCreature->GetMap()->IsRegularDifficulty(); + m_bIsHeroic = pCreature->GetMap()->IsRegularDifficulty(); + ArthasGUID = 0; + SalrammGUID = 0; + PhaseC = false; Reset(); } -ScriptedInstance* m_pInstance; - -bool m_bIsHeroic; -uint32 Exorcism_Timer; -uint32 FinalFight; -bool PhaseC; -uint32 arthas_event; -Unit* culling_faction; -Creature* Patricia; -Creature* StalkerM; -Creature* Crazyman; -Creature* Cityman; -Creature* Stalker; -Creature* TempZombie; -Creature* Salramm; -Creature* Meathook; -Creature* Epoch; -Creature* Malganis; -Creature* TempMalganis; -Creature* Arthas; -Creature* Jaina; -Creature* Uther; -uint32 phase; -uint32 phaseAI; -uint32 phasetim; -uint64 uiZombieGUID[ENCOUNTER_ZOMBIE_NUMBER]; -uint32 uiZombie_counter; -uint32 PatriciaEvent; - - void Reset() - { - if(arthas_event == 2) - { } else arthas_event = 0; - FinalFight = 0; - phase = 1; - phasetim = 20000; - Exorcism_Timer = 7300; - } - - void Aggro(Unit* who) -{ - DoCast(m_creature, SPELL_ARTHAS_AURA); -} + ScriptedInstance* m_pInstance; + + uint64 ArthasGUID; + uint64 SalrammGUID; + uint64 EpochGUID; + + bool m_bIsHeroic; + uint32 Exorcism_Timer; + uint32 FinalFight; + bool PhaseC; + uint32 arthas_event; + Unit* culling_faction; + Creature* Patricia; + Creature* StalkerM; + Creature* Crazyman; + Creature* Cityman; + Creature* Stalker; + Creature* TempZombie; + Creature* Salramm; + Creature* Meathook; + Creature* Epoch; + Creature* Malganis; + Creature* TempMalganis; + Creature* Arthas; + Creature* Jaina; + Creature* Uther; + uint32 phase; + uint32 phaseAI; + uint32 phasetim; + uint64 uiZombieGUID[ENCOUNTER_ZOMBIE_NUMBER]; + uint32 uiZombie_counter; + uint32 tmpZombie; + uint32 PatriciaEvent; + + void Reset() + { + if(arthas_event == 2) { } + else + arthas_event = 0; + FinalFight = 1; + phase = 1; + phasetim = 20000; + Exorcism_Timer = 7300; + Arthas=m_creature; + + if(m_pInstance->GetData(TYPE_ARTHAS_EVENT) == DONE) + Arthas->SetVisibility(VISIBILITY_OFF); + + // this is Arthas's start position in the instance he will give gossip only here and in front of the gate at Mal'Ganis + if(PhaseC == false && m_pInstance->GetData(TYPE_ARTHAS_EVENT) != DONE) + { + Arthas->SetVisibility(VISIBILITY_ON); + Arthas->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + Arthas->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + } + + } + + void Aggro(Unit* who) + { + DoCast(m_creature, SPELL_ARTHAS_AURA); + } void MoveInLineOfSight(Unit* pWho) { if (!pWho) return; - if (!m_creature->hasUnitState(UNIT_STAT_STUNNED) && pWho->isTargetableForAttack() && - m_creature->IsHostileTo(pWho) && pWho->isInAccessablePlaceFor(m_creature)) - { - if (!m_creature->canFly() && m_creature->GetDistanceZ(pWho) > CREATURE_Z_ATTACK_RANGE) - return; - - float attackRadius = m_creature->GetAttackDistance(pWho); - if (m_creature->IsWithinDistInMap(pWho, attackRadius) && m_creature->IsWithinLOSInMap(pWho)) - { - if (!m_creature->getVictim()) - { - AttackStart(pWho); - pWho->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); - } - else if (m_creature->GetMap()->IsDungeon()) - { - pWho->SetInCombatWith(m_creature); - m_creature->AddThreat(pWho, 0.0f); - } - } - } -} - - void JustDied(Unit *killer) + if (!m_creature->hasUnitState(UNIT_STAT_STUNNED) && pWho->isTargetableForAttack() && + m_creature->IsHostileTo(pWho) && pWho->isInAccessablePlaceFor(m_creature)) + { + if (!m_creature->canFly() && m_creature->GetDistanceZ(pWho) > CREATURE_Z_ATTACK_RANGE) + return; + + float attackRadius = m_creature->GetAttackDistance(pWho); + if (m_creature->IsWithinDistInMap(pWho, attackRadius) && m_creature->IsWithinLOSInMap(pWho)) + { + if (!m_creature->getVictim()) + { + AttackStart(pWho); + pWho->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); + } + else if (m_creature->GetMap()->IsDungeon()) + { + pWho->SetInCombatWith(m_creature); + m_creature->AddThreat(pWho, 0.0f); + } + } + } + } + + void JustDied(Unit *killer) { if (m_pInstance) - m_pInstance->SetData(TYPE_ARTHAS_EVENT, DONE); + { + m_pInstance->SetData(TYPE_ARTHAS_EVENT, FAIL); + } } - void AttackStart(Unit* pWho) -{ - if (!pWho) - return; + void AttackStart(Unit* pWho) + { + if (!pWho) + return; - if (m_creature->Attack(pWho, true)) - { - m_creature->AddThreat(pWho, 0.0f); - m_creature->SetInCombatWith(pWho); - pWho->SetInCombatWith(m_creature); + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho, 0.0f); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); - if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == POINT_MOTION_TYPE) - m_creature->GetMotionMaster()->MovementExpired(); + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == POINT_MOTION_TYPE) + m_creature->GetMotionMaster()->MovementExpired(); - if (IsCombatMovement()) - m_creature->GetMotionMaster()->MoveChase(pWho); - } -} + if (IsCombatMovement()) + m_creature->GetMotionMaster()->MoveChase(pWho); + } + } void WaypointReached(uint32 uiPointId) { - switch(uiPointId) + switch(uiPointId) { - case 1: - DoScriptText(SAY_PHASE501, Arthas); - Salramm = Arthas->SummonCreature(26530,2232.19f,1331.933f,126.662f,3.15f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,900000); - Salramm->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); - Salramm->GetMotionMaster()->MovePoint(0, 2194.110f,1332.00f,130.00f); - break; + case 1: + DoScriptText(SAY_PHASE501, Arthas); + break; case 2: - DoScriptText(SAY_PHASE502, Arthas); - break; - case 3: - Arthas->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); - DoScriptText(SAY_PHASE505, Arthas); - break; - case 4: - DoScriptText(SAY_PHASE506, Arthas); - Arthas->SummonCreature(NPC_TIME_RIFT,2225.388f,1178.470f,136.289f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); - break; - case 5: - DoScriptText(SAY_PHASE507, Arthas); - Arthas->SummonCreature(NPC_TIME_RIFT,2264.253f,1162.153f,137.919f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); - Arthas->SummonCreature(NPC_TIME_RIFT,2286.946f,1182.064f,137.986f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); - break; - case 6: - break; - case 7: - break; - case 8: - break; - case 9: - DoScriptText(SAY_PHASE509, Arthas); - Arthas->SummonCreature(NPC_TIME_RIFT,2410.561f,1187.790f,133.933f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); - Arthas->SummonCreature(NPC_TIME_RIFT,2388.574f,1214.650f,134.239f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); - Arthas->SummonCreature(NPC_TIME_RIFT,2430.593f,1212.919f,134.124f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); - break; + DoScriptText(SAY_PHASE502, Arthas); + break; + case 3: + Arthas->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + DoScriptText(SAY_PHASE505, Arthas); + break; + case 4: + DoScriptText(SAY_PHASE506, Arthas); + Arthas->SummonCreature(NPC_TIME_RIFT,2225.388f,1178.470f,136.289f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); + break; + case 5: + DoScriptText(SAY_PHASE507, Arthas); + + Arthas->SummonCreature(NPC_TIME_RIFT,2264.253f,1162.153f,137.919f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); + Arthas->SummonCreature(NPC_TIME_RIFT,2286.946f,1182.064f,137.986f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); + break; + case 9: + DoScriptText(SAY_PHASE509, Arthas); + Arthas->SummonCreature(NPC_TIME_RIFT,2410.561f,1187.790f,133.933f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); + Arthas->SummonCreature(NPC_TIME_RIFT,2388.574f,1214.650f,134.239f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); + Arthas->SummonCreature(NPC_TIME_RIFT,2430.593f,1212.919f,134.124f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); + break; case 10: - DoScriptText(SAY_PHASE510, Arthas); - break; + DoScriptText(SAY_PHASE510, Arthas); + break; case 11: - Arthas->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); - break; - case 13: - DoScriptText(SAY_PHASE508,Arthas); - Arthas->SummonCreature(NPC_TIME_RIFT,2393.985f,1190.519f,148.076f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); - Arthas->SummonCreature(NPC_TIME_RIFT,2436.202f,1200.540f,148.077f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); - break; - case 15: - DoScriptText(SAY_PHASE511,Arthas); - Arthas->SummonCreature(NPC_TIME_RIFT_2,2445.629f,1111.500f,148.076f,3.229f,TEMPSUMMON_TIMED_DESPAWN,9000); - break; - case 16: - Epoch = Arthas->SummonCreature(26532,2445.629f,1111.500f,148.076f,3.229f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,900000); - Epoch->setFaction(35); - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Epoch->GetGUID()); - break; + Arthas->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + break; + case 13: + DoScriptText(SAY_PHASE508,Arthas); + Arthas->SummonCreature(NPC_TIME_RIFT,2393.985f,1190.519f,148.076f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); + Arthas->SummonCreature(NPC_TIME_RIFT,2436.202f,1200.540f,148.077f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); + break; + case 15: + DoScriptText(SAY_PHASE511,Arthas); + Arthas->SummonCreature(NPC_TIME_RIFT_2,2445.629f,1111.500f,148.076f,3.229f,TEMPSUMMON_TIMED_DESPAWN,9000); + if (EpochGUID = m_pInstance->GetData64(DATA_EPOCH)) + { + // check if it has ben killed already + if(m_pInstance->GetData(TYPE_EPOCH_EVENT) != DONE) + { + Epoch = m_pInstance->instance->GetCreature(EpochGUID); + Epoch->SetVisibility(VISIBILITY_ON); + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Epoch->GetGUID()); + } + // already has ben killed as the db says so needs to die + if(m_pInstance->GetData(TYPE_EPOCH_EVENT) == DONE) + { + Epoch = m_pInstance->instance->GetCreature(EpochGUID); + Epoch->SetDeadByDefault(true); + } + } + break; case 18: - DoScriptText(SAY_EPOCH, Arthas); - break; + DoScriptText(SAY_EPOCH, Arthas); + break; case 19: - break; + break; case 20: - Arthas->AddMonsterMoveFlag(MONSTER_MOVE_WALK); - break; + Arthas->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + break; case 23: - DoScriptText(SAY_PHASE503,Arthas); - break; - case 24: - if (m_pInstance) - { - GameObject* pGate = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GO_SHKAF_GATE)); - pGate->SetGoState(GO_STATE_ACTIVE); - } - DoScriptText(SAY_PHASE504,Arthas); - break; + DoScriptText(SAY_PHASE503,Arthas); + break; + case 24: + if (m_pInstance) + { + GameObject* pGate = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GO_SHKAF_GATE)); + pGate->SetGoState(GO_STATE_ACTIVE); + } + DoScriptText(SAY_PHASE504,Arthas); + break; case 32: - DoScriptText(SAY_PHASE601,Arthas); - Arthas->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); - break; - case 34: - Arthas->AddMonsterMoveFlag(MONSTER_MOVE_WALK); - DoScriptText(SAY_PHASE602,Arthas); - break; - case 35: - Arthas->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); - DoScriptText(SAY_PHASE603,Arthas); - break; + DoScriptText(SAY_PHASE601,Arthas); + Arthas->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + break; + case 34: + Arthas->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + DoScriptText(SAY_PHASE602,Arthas); + break; + case 35: + Arthas->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + DoScriptText(SAY_PHASE603,Arthas); + break; case 40: - DoScriptText(SAY_PHASE604,Arthas); - break; - case 41: - FinalFight = 1; - Arthas->setFaction(35); - phaseAI = 95; - Arthas->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); - Arthas->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - break; - - } + DoScriptText(SAY_PHASE604,Arthas); + break; + case 41: + FinalFight = 1; + Arthas->setFaction(35); + phaseAI = 94; + break; + } } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 diff) { npc_escortAI::UpdateAI(diff); - DoMeleeAttackIfReady(); - - if(FinalFight == 2) - { - switch(phaseAI) - { + DoMeleeAttackIfReady(); + if (phaseAI == 94 && FinalFight != 2) + { + Arthas->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + Arthas->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + } + if(FinalFight == 2) + { + Arthas->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + Arthas->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + switch(phaseAI) + { case 95: - Arthas->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); - Arthas->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - DoScriptText(SAY_PHASE605, Arthas); - Malganis = Arthas->SummonCreature(NPC_MALGANIS,2296.665f,1502.362f,128.362f,4.961f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,900000); - if (m_pInstance) - { - GameObject* pGate = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GO_MAL_GATE1)); - pGate->SetGoState(GO_STATE_ACTIVE); - } - ++phaseAI; - phasetim = 3000; - break; - case 97: - Arthas->GetMotionMaster()->MovePoint(0, 2303.016f, 1480.070f, 128.139f); - ++phaseAI; - phasetim = 3000; - break; - case 99: - Arthas->setFaction(culling_faction->getFaction()); - ++phaseAI; - phasetim = 3000; - break; - } - } - - if(FinalFight == 2) - { - if (phasetim <= diff) - { - ++phaseAI; - phasetim = 330000; - } phasetim -= diff; + DoScriptText(SAY_PHASE605, Arthas); + if (m_pInstance) + { + GameObject* pGate = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GO_MAL_GATE1)); + pGate->SetGoState(GO_STATE_ACTIVE); + } + ++phaseAI; + phasetim = 3000; + break; + case 97: + Arthas->GetMotionMaster()->MovePoint(0, 2303.016f, 1480.070f, 128.139f); + ++phaseAI; + phasetim = 3000; + break; + case 99: + Arthas->setFaction(culling_faction->getFaction()); + ++phaseAI; + phasetim = 3000; + break; } + } - if(arthas_event == 2) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; + if(FinalFight == 2) + { + if (phasetim <= diff) + { + ++phaseAI; + phasetim = 330000; + } + phasetim -= diff; + } + + if(arthas_event == 2) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; - if (Exorcism_Timer < diff) + if (Exorcism_Timer < diff) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, m_bIsHeroic ? SPELL_EXORCISM_H : SPELL_EXORCISM_N); + + Exorcism_Timer = 7300; + } + else + Exorcism_Timer -= diff; + + if(m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 40) + DoCast(m_creature, SPELL_HOLY_LIGHT); + } + + if(arthas_event == 1) { - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(target, m_bIsHeroic ? SPELL_EXORCISM_H : SPELL_EXORCISM_N); + Arthas->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + Arthas->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + switch(phase) + { + case 1: + PhaseC = true; + Arthas = m_creature; + Arthas->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + Uther = Arthas->SummonCreature(26528,1794.357f,1272.183f,140.558f,1.37f,TEMPSUMMON_TIMED_DESPAWN,180000); - Exorcism_Timer = 7300; - }else Exorcism_Timer -= diff; + if (Creature* pJaina = GetClosestCreatureWithEntry(Arthas, NPC_JAINA, 50.0f)) + Jaina = pJaina; - if(m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 40) - { - DoCast(m_creature, SPELL_HOLY_LIGHT); - } - } - - if(arthas_event == 1) - { - switch(phase) - { - case 1: - Arthas = m_creature; - Arthas->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); - Arthas->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); - Arthas->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - Uther = Arthas->SummonCreature(26528,1794.357f,1272.183f,140.558f,1.37f,TEMPSUMMON_TIMED_DESPAWN,180000); - if (Creature* pJaina = GetClosestCreatureWithEntry(Arthas, NPC_JAINA, 50.0f)) - Jaina = pJaina; - Uther->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); - Arthas->GetMotionMaster()->MovePoint(0, 1903.167f, 1291.573f, 143.32f); - Uther->GetMotionMaster()->MovePoint(0, 1897.018f, 1287.487f, 143.481f); - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Uther->GetGUID()); - Uther->SetUInt64Value(UNIT_FIELD_TARGET, Arthas->GetGUID()); - ++phase; - phasetim = 17000; - break; - case 3: - DoScriptText(SAY_INTRO01, Arthas); - ++phase; - phasetim = 2000; - break; - case 5: - DoScriptText(SAY_INTRO02, Uther); - ++phase; - phasetim = 8000; - break; - case 7: - Arthas->AddMonsterMoveFlag(MONSTER_MOVE_WALK); - DoScriptText(SAY_INTRO03, Arthas); - Arthas->GetMotionMaster()->MovePoint(0, 1911.087f, 1314.263f, 150.026f); - ++phase; - phasetim = 9000; - break; - case 9: - Jaina->SetUInt64Value(UNIT_FIELD_TARGET, Arthas->GetGUID()); - DoScriptText(SAY_INTRO04, Arthas); - ++phase; - phasetim = 10000; - break; - case 11: - DoScriptText(SAY_INTRO05, Uther); - ++phase; - phasetim = 1000; - break; - case 13: - DoScriptText(SAY_INTRO06, Arthas); - ++phase; - phasetim = 4000; - break; - case 15: - DoScriptText(SAY_INTRO07, Uther); - ++phase; - phasetim = 6000; - break; - case 17: - DoScriptText(SAY_INTRO08, Arthas); - ++phase; - phasetim = 4000; - break; - case 19: - DoScriptText(SAY_INTRO09, Uther); - ++phase; - phasetim = 8000; - break; - case 21: - DoScriptText(SAY_INTRO10, Arthas); - ++phase; - phasetim = 4000; - break; - case 23: - DoScriptText(SAY_INTRO11, Uther); - ++phase; - phasetim = 4000; - break; - case 25: - DoScriptText(SAY_INTRO12, Arthas); - ++phase; - phasetim = 11000; - break; - case 27: - DoScriptText(SAY_INTRO13, Jaina); - ++phase; - phasetim = 3000; - break; - case 29: - DoScriptText(SAY_INTRO14, Arthas); - ++phase; - phasetim = 9000; - break; - case 31: - DoScriptText(SAY_INTRO15, Uther); - ++phase; - phasetim = 4000; - break; - case 33: - Uther->AddMonsterMoveFlag(MONSTER_MOVE_WALK); - Uther->GetMotionMaster()->MovePoint(0, 1794.357f,1272.183f,140.558f); - ++phase; - phasetim = 1000; - break; - case 35: - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Jaina->GetGUID()); - Jaina->GetMotionMaster()->MovePoint(0, 1794.357f,1272.183f,140.558f); - ++phase; - phasetim = 1000; - break; - case 37: - DoScriptText(SAY_INTRO16, Arthas); - ++phase; - phasetim = 1000; - break; - case 39: - DoScriptText(SAY_INTRO17, Jaina); - ++phase; - phasetim = 3000; - break; - case 41: - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, 0); - Arthas->GetMotionMaster()->MovePoint(0, 1902.959f,1295.127f,143.388f); - ++phase; - phasetim = 10000; - break; - case 43: - Arthas->GetMotionMaster()->MovePoint(0, 1913.726f,1287.407f,141.927f); - ++phase; - phasetim = 6000; - break; - case 45: - DoScriptText(SAY_INTRO18, Arthas); - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Jaina->GetGUID()); - ++phase; - phasetim = 10000; - break; - case 47: - Arthas->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, 0); - Jaina->SetVisibility(VISIBILITY_OFF); - Uther->SetVisibility(VISIBILITY_OFF); - Arthas->GetMotionMaster()->MovePoint(0, 1990.833f,1293.391f,145.467f); - ++phase; - phasetim = 12000; - break; - case 49: - Arthas->GetMotionMaster()->MovePoint(0, 1997.003f,1317.776f,142.963f); - ++phase; - phasetim = 5000; - break; - case 51: - Arthas->GetMotionMaster()->MovePoint(0, 2019.631f,1326.084f,142.929f); - ++phase; - phasetim = 4000; - break; - case 53: - Arthas->GetMotionMaster()->MovePoint(0, 2026.469f,1287.088f,143.596f); - ++phase; - phasetim = 6000; - break; - case 55: - Cityman = Arthas->SummonCreature(NPC_CITY_MAN,2091.977f,1275.021f,140.757f,0.558f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,60000); - Crazyman = Arthas->SummonCreature(NPC_CRAZY_MAN,2093.514f,1275.842f,140.408f,3.801f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,60000); - Arthas->GetMotionMaster()->MovePoint(0, 2050.660f,1287.333f,142.671f); - ++phase; - phasetim = 6000; - break; - case 57: - Stalker = Arthas->SummonCreature(20562,2026.469f,1287.088f,143.596f,1.37f,TEMPSUMMON_TIMED_DESPAWN,14000); - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Stalker->GetGUID()); - ++phase; - phasetim = 1000; - break; - case 59: - DoScriptText(SAY_ENTER01, Arthas); - ++phase; - phasetim = 12000; - break; - case 61: - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, 0); - Arthas->AddMonsterMoveFlag(MONSTER_MOVE_WALK); - Arthas->GetMotionMaster()->MovePoint(0, 2081.447f,1287.770f,141.3241f); - ++phase; - phasetim = 15000; - break; - case 63: - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Cityman->GetGUID()); - Cityman->SetUInt64Value(UNIT_FIELD_TARGET, Arthas->GetGUID()); - Cityman->AddMonsterMoveFlag(MONSTER_MOVE_WALK); - Cityman->GetMotionMaster()->MovePoint(0, 2088.625f,1279.191f,140.743f); - ++phase; - phasetim = 2000; - break; - case 65: - DoScriptText(SAY_ENTER02, Cityman); - ++phase; - phasetim = 4000; - break; - case 67: - Arthas->GetMotionMaster()->MovePoint(0, 2087.689f,1280.344f,140.73f); - DoScriptText(SAY_ENTER03, Arthas); - ++phase; - phasetim = 3000; - break; - case 69: - Arthas->HandleEmoteCommand(37); - ++phase; - phasetim = 1000; - break; - case 71: - DoScriptText(SAY_ENTER04, Crazyman); - Crazyman->SetUInt64Value(UNIT_FIELD_TARGET, Arthas->GetGUID()); - Cityman->DealDamage(Cityman, Cityman->GetMaxHealth(),NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Crazyman->GetGUID()); - Arthas->GetMotionMaster()->MovePoint(0, 2092.154f,1276.645f,140.52f); - ++phase; - phasetim = 3000; - break; - case 73: - Arthas->HandleEmoteCommand(37); - ++phase; - phasetim = 1000; - break; - case 75: - Crazyman->DealDamage(Crazyman, Crazyman->GetMaxHealth(),NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - ++phase; - phasetim = 1000; - break; - case 77: - Stalker = Arthas->SummonCreature(20562,2081.447f,1287.770f,141.3241f,1.37f,TEMPSUMMON_TIMED_DESPAWN,70000); - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Stalker->GetGUID()); - DoScriptText(SAY_ENTER05, Arthas); - ++phase; - phasetim = 3000; - break; - case 79: - StalkerM = Arthas->SummonCreature(20562,2117.349f,1288.624f,136.271f,1.37f,TEMPSUMMON_TIMED_DESPAWN,60000); - StalkerM->CastSpell(StalkerM,63793,false); - ++phase; - phasetim = 1000; - break; - case 81: - TempMalganis = Arthas->SummonCreature(26533,2117.349f,1288.624f,136.271f,1.37f,TEMPSUMMON_TIMED_DESPAWN,29000); - DoScriptText(SAY_ENTER06, TempMalganis); - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, TempMalganis->GetGUID()); - TempMalganis->SetUInt64Value(UNIT_FIELD_TARGET, Arthas->GetGUID()); - TempMalganis->setFaction(35); - ++phase; - phasetim = 11000; - break; - case 83: - phasetim = 500; - if (uiZombie_counter < ENCOUNTER_ZOMBIE_NUMBER) - { - if (Creature* TempZombie = GetClosestCreatureWithEntry(StalkerM, NPC_CITY_MAN, 100.0f)) - { - TempZombie->UpdateEntry(NPC_ZOMBIE, 0); - uiZombie_counter++; - } - } - else - { - uiZombie_counter = 0; - ++phase; - } - break; - case 85: - phasetim = 500; - if (uiZombie_counter < ENCOUNTER_ZOMBIE_NUMBER) + if (m_pInstance) + m_pInstance->SetData(TYPE_ARTHAS_EVENT, NOT_STARTED); + + Uther->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + Arthas->GetMotionMaster()->MovePoint(0, 1903.167f, 1291.573f, 143.32f); + Uther->GetMotionMaster()->MovePoint(0, 1897.018f, 1287.487f, 143.481f); + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Uther->GetGUID()); + Uther->SetUInt64Value(UNIT_FIELD_TARGET, Arthas->GetGUID()); + ++phase; + phasetim = 17000; + break; + case 3: + DoScriptText(SAY_INTRO01, Arthas); + ++phase; + phasetim = 2000; + break; + case 5: + DoScriptText(SAY_INTRO02, Uther); + ++phase; + phasetim = 8000; + break; + case 7: + Arthas->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + DoScriptText(SAY_INTRO03, Arthas); + Arthas->GetMotionMaster()->MovePoint(0, 1911.087f, 1314.263f, 150.026f); + ++phase; + phasetim = 9000; + break; + case 9: + Jaina = Arthas->SummonCreature(26497, 1895.48f, 1292.66f, 143.706f, 0.023475f,TEMPSUMMON_TIMED_DESPAWN,180000); + Jaina->SetUInt64Value(UNIT_FIELD_TARGET, Arthas->GetGUID()); + DoScriptText(SAY_INTRO04, Arthas); + ++phase; + phasetim = 10000; + break; + case 11: + DoScriptText(SAY_INTRO05, Uther); + ++phase; + phasetim = 1000; + break; + case 13: + DoScriptText(SAY_INTRO06, Arthas); + ++phase; + phasetim = 4000; + break; + case 15: + DoScriptText(SAY_INTRO07, Uther); + ++phase; + phasetim = 6000; + break; + case 17: + DoScriptText(SAY_INTRO08, Arthas); + ++phase; + phasetim = 4000; + break; + case 19: + DoScriptText(SAY_INTRO09, Uther); + ++phase; + phasetim = 8000; + break; + case 21: + DoScriptText(SAY_INTRO10, Arthas); + ++phase; + phasetim = 4000; + break; + case 23: + DoScriptText(SAY_INTRO11, Uther); + ++phase; + phasetim = 4000; + break; + case 25: + DoScriptText(SAY_INTRO12, Arthas); + ++phase; + phasetim = 11000; + break; + case 27: + DoScriptText(SAY_INTRO13, Jaina); + ++phase; + phasetim = 3000; + break; + case 29: + DoScriptText(SAY_INTRO14, Arthas); + ++phase; + phasetim = 9000; + break; + case 31: + DoScriptText(SAY_INTRO15, Uther); + ++phase; + phasetim = 4000; + break; + case 33: + Uther->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + Uther->GetMotionMaster()->MovePoint(0, 1794.357f,1272.183f,140.558f); + ++phase; + phasetim = 1000; + break; + case 35: + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Jaina->GetGUID()); + Jaina->GetMotionMaster()->MovePoint(0, 1794.357f,1272.183f,140.558f); + ++phase; + phasetim = 1000; + break; + case 37: + DoScriptText(SAY_INTRO16, Arthas); + ++phase; + phasetim = 1000; + break; + case 39: + DoScriptText(SAY_INTRO17, Jaina); + ++phase; + phasetim = 3000; + break; + case 41: + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, 0); + Arthas->GetMotionMaster()->MovePoint(0, 1902.959f,1295.127f,143.388f); + ++phase; + phasetim = 10000; + break; + case 43: + Arthas->GetMotionMaster()->MovePoint(0, 1913.726f,1287.407f,141.927f); + ++phase; + phasetim = 6000; + break; + case 45: + DoScriptText(SAY_INTRO18, Arthas); + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Jaina->GetGUID()); + ++phase; + phasetim = 10000; + break; + case 47: + Arthas->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, 0); + Jaina->SetVisibility(VISIBILITY_OFF); + Uther->SetVisibility(VISIBILITY_OFF); + Arthas->GetMotionMaster()->MovePoint(0, 1990.833f,1293.391f,145.467f); + ++phase; + phasetim = 12000; + break; + case 49: + Arthas->GetMotionMaster()->MovePoint(0, 1997.003f,1317.776f,142.963f); + ++phase; + phasetim = 5000; + break; + case 51: + Arthas->GetMotionMaster()->MovePoint(0, 2019.631f,1326.084f,142.929f); + ++phase; + phasetim = 4000; + break; + case 53: + Arthas->GetMotionMaster()->MovePoint(0, 2026.469f,1287.088f,143.596f); + ++phase; + phasetim = 6000; + break; + case 55: + Cityman = Arthas->SummonCreature(NPC_CITY_MAN,2091.977f,1275.021f,140.757f,0.558f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,60000); + Crazyman = Arthas->SummonCreature(NPC_CRAZY_MAN,2093.514f,1275.842f,140.408f,3.801f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,60000); + Arthas->GetMotionMaster()->MovePoint(0, 2050.660f,1287.333f,142.671f); + ++phase; + phasetim = 6000; + break; + case 57: + Stalker = Arthas->SummonCreature(20562,2026.469f,1287.088f,143.596f,1.37f,TEMPSUMMON_TIMED_DESPAWN,14000); + Stalker->SetVisibility(VISIBILITY_OFF); + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Stalker->GetGUID()); + ++phase; + phasetim = 1000; + break; + case 59: + DoScriptText(SAY_ENTER01, Arthas); + ++phase; + phasetim = 12000; + break; + case 61: + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, 0); + Arthas->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + Arthas->GetMotionMaster()->MovePoint(0, 2081.447f,1287.770f,141.3241f); + ++phase; + phasetim = 15000; + break; + case 63: + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Cityman->GetGUID()); + Cityman->SetUInt64Value(UNIT_FIELD_TARGET, Arthas->GetGUID()); + Cityman->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + Cityman->GetMotionMaster()->MovePoint(0, 2088.625f,1279.191f,140.743f); + ++phase; + phasetim = 2000; + break; + case 65: + DoScriptText(SAY_ENTER02, Cityman); + ++phase; + phasetim = 4000; + break; + case 67: + Arthas->GetMotionMaster()->MovePoint(0, 2087.689f,1280.344f,140.73f); + DoScriptText(SAY_ENTER03, Arthas); + ++phase; + phasetim = 3000; + break; + case 69: + Arthas->HandleEmoteCommand(37); + ++phase; + phasetim = 1000; + break; + case 71: + DoScriptText(SAY_ENTER04, Crazyman); + Crazyman->SetUInt64Value(UNIT_FIELD_TARGET, Arthas->GetGUID()); + Cityman->DealDamage(Cityman, Cityman->GetMaxHealth(),NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Crazyman->GetGUID()); + Arthas->GetMotionMaster()->MovePoint(0, 2092.154f,1276.645f,140.52f); + ++phase; + phasetim = 3000; + break; + case 73: + Arthas->HandleEmoteCommand(37); + ++phase; + phasetim = 1000; + break; + case 75: + Crazyman->DealDamage(Crazyman, Crazyman->GetMaxHealth(),NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + ++phase; + phasetim = 1000; + break; + case 77: + Stalker = Arthas->SummonCreature(20562,2081.447f,1287.770f,141.3241f,1.37f,TEMPSUMMON_TIMED_DESPAWN,70000); + Stalker->SetVisibility(VISIBILITY_OFF); + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Stalker->GetGUID()); + DoScriptText(SAY_ENTER05, Arthas); + ++phase; + phasetim = 3000; + break; + case 79: + StalkerM = Arthas->SummonCreature(20562,2117.349f,1288.624f,136.271f,1.37f,TEMPSUMMON_TIMED_DESPAWN,60000); + StalkerM->SetVisibility(VISIBILITY_OFF); + StalkerM->CastSpell(StalkerM,63793,false); + ++phase; + phasetim = 1000; + break; + case 81: + TempMalganis = Arthas->SummonCreature(26533,2117.349f,1288.624f,136.271f,1.37f,TEMPSUMMON_TIMED_DESPAWN,29000); + DoScriptText(SAY_ENTER06, TempMalganis); + TempMalganis->SetVisibility(VISIBILITY_ON); + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, TempMalganis->GetGUID()); + TempMalganis->SetUInt64Value(UNIT_FIELD_TARGET, Arthas->GetGUID()); + TempMalganis->setFaction(35); + ++phase; + phasetim = 11000; + break; + case 83: + phasetim = 500; + if (uiZombie_counter < ENCOUNTER_ZOMBIE_NUMBER) + { + if (Creature* TempZombie = GetClosestCreatureWithEntry(StalkerM, NPC_CITY_MAN, 100.0f)) { - if (Creature* TempZombie = GetClosestCreatureWithEntry(StalkerM, NPC_CRAZY_MAN, 100.0f)) - { - TempZombie->UpdateEntry(NPC_ZOMBIE, 0); - uiZombie_counter++; - } - } - else + TempZombie->UpdateEntry(NPC_ZOMBIE, 0); + uiZombie_counter++; + ++phase; + tmpZombie = 4; + } + } + else + { + uiZombie_counter = 0; + ++phase; + } + break; + case 85: + phasetim = 500; + if (uiZombie_counter < ENCOUNTER_ZOMBIE_NUMBER) + { + if (Creature* TempZombie = GetClosestCreatureWithEntry(StalkerM, NPC_CRAZY_MAN, 100.0f)) { - uiZombie_counter = 0; - ++phase; - } - break; - case 87: - DoScriptText(SAY_ENTER07, TempMalganis); - Arthas->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); - ++phase; - phasetim = 17000; - break; - case 89: - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, StalkerM->GetGUID()); - DoScriptText(SAY_ENTER08, Arthas); - ++phase; - phasetim = 7000; - break; - case 91: - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Stalker->GetGUID()); - DoScriptText(SAY_ENTER09, Arthas); - ++phase; - phasetim = 12000; - break; - case 93: - phaseAI = 95; - if (m_pInstance) - m_pInstance->SetData(TYPE_ARTHAS_EVENT, IN_PROGRESS); - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, 0); - if(npc_arthasAI* pEscortAI = dynamic_cast(Arthas->AI())) - pEscortAI->Start(false, false, culling_faction->GetGUID(), NULL, false, false); - Arthas->setFaction(culling_faction->getFaction()); - arthas_event = 2; + TempZombie->UpdateEntry(NPC_ZOMBIE, 0); + uiZombie_counter++; + } + } + else + { + uiZombie_counter = 0; ++phase; - phasetim = 1000; - break; - - } - } else return; - - if(arthas_event == 1) - { - if (phasetim <= diff) - { - ++phase; - phasetim = 330000; - } phasetim -= diff; - } + } + break; + case 87: + DoScriptText(SAY_ENTER07, TempMalganis); + Arthas->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + ++phase; + phasetim = 17000; + if (SalrammGUID = m_pInstance->GetData64(DATA_SALRAMM)) + { + // check if it has ben killed already + if(m_pInstance->GetData(TYPE_SALRAMM_EVENT) != DONE) + { + Salramm = m_pInstance->instance->GetCreature(SalrammGUID); + // set his flags back to be atackable if there is no cd on this boss + Salramm->SetVisibility(VISIBILITY_ON); + Salramm->setFaction(14); + Salramm->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + Salramm->GetMotionMaster()->MovePoint(0, 2165.110f,1284.64f,133.29f); + } + // already has ben killed as the db says so needs to die or just leave him with invisible flag + if(m_pInstance->GetData(TYPE_SALRAMM_EVENT) == DONE) + { + Salramm = m_pInstance->instance->GetCreature(SalrammGUID); + Salramm->SetDeadByDefault(true); + } + } + break; + case 89: + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, StalkerM->GetGUID()); + DoScriptText(SAY_ENTER08, Arthas); + ++phase; + phasetim = 7000; + break; + case 91: + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Stalker->GetGUID()); + DoScriptText(SAY_ENTER09, Arthas); + ++phase; + phasetim = 12000; + break; + case 93: + phaseAI = 95; + + if (m_pInstance) + m_pInstance->SetData(TYPE_ARTHAS_EVENT, IN_PROGRESS); + + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, 0); + + if (npc_arthasAI* pEscortAI = dynamic_cast(Arthas->AI())) + pEscortAI->Start(false, false, culling_faction->GetGUID(), NULL, false, false); + + Arthas->setFaction(culling_faction->getFaction()); + arthas_event = 2; + ++phase; + phasetim = 1000; + break; + } + } + else + return; + + if(arthas_event == 1) + { + if (phasetim <= diff) + { + ++phase; + phasetim = 330000; + } + phasetim -= diff; + } } }; @@ -703,165 +796,204 @@ CreatureAI* GetAI_npc_arthas(Creature* pCreature) bool GossipHello_npc_arthas(Player *player, Creature *mCreature) { - if (mCreature->isQuestGiver()) - player->PrepareQuestMenu( mCreature->GetGUID()); - - if(((npc_arthasAI*)mCreature->AI())->arthas_event == 0) - player->ADD_GOSSIP_ITEM(0, "I\'m ready start culling of stratholme", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - - if(((npc_arthasAI*)mCreature->AI())->FinalFight == 1) - player->ADD_GOSSIP_ITEM(0, "We are ready to Final Combat!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - - player->PlayerTalkClass->SendGossipMenu(907,mCreature->GetGUID()); - return true; + if (mCreature->isQuestGiver()) + player->PrepareQuestMenu(mCreature->GetGUID()); + + if(((npc_arthasAI*)mCreature->AI())->arthas_event == 0) + { + if (player->FindQuestSlot(13151)>=25) + { + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "You don't have the Quest for this instance", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + player->SEND_GOSSIP_MENU(player->GetGossipTextId(mCreature), mCreature->GetGUID()); + return true; + } + if (player->FindQuestSlot(13151)<=25) + { + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I\'m ready start culling of stratholme", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + player->SEND_GOSSIP_MENU(player->GetGossipTextId(mCreature), mCreature->GetGUID()); + return true; + } + } + if(((npc_arthasAI*)mCreature->AI())->FinalFight == 1) + { + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "We are ready to Final Combat!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); + player->SEND_GOSSIP_MENU(player->GetGossipTextId(mCreature), mCreature->GetGUID()); + player->hasQuest(13151); + return true; + } + return true; } -bool GossipSelect_npc_arthas(Player *player, Creature *mCreature, uint32 sender, uint32 action ) +bool GossipSelect_npc_arthas(Player *player, Creature *mCreature, uint32 sender, uint32 uiAction ) { - if(action == GOSSIP_ACTION_INFO_DEF+2) - { - if(((npc_arthasAI*)mCreature->AI())->arthas_event == 0) - { - ((npc_arthasAI*)mCreature->AI())->arthas_event = 1; - } - - if(((npc_arthasAI*)mCreature->AI())->FinalFight == 1) - { - ((npc_arthasAI*)mCreature->AI())->FinalFight = 2; - } - - ((npc_arthasAI*)mCreature->AI())->culling_faction = player; - - player->CLOSE_GOSSIP_MENU(); - - } - return true; + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + player->CLOSE_GOSSIP_MENU(); + ((npc_arthasAI*)mCreature->AI())->arthas_event = 1; + break; + case GOSSIP_ACTION_INFO_DEF+2: + player->CLOSE_GOSSIP_MENU(); + break; + case GOSSIP_ACTION_INFO_DEF+3: + player->CLOSE_GOSSIP_MENU(); + ((npc_arthasAI*)mCreature->AI())->FinalFight = 2; + } + ((npc_arthasAI*)mCreature->AI())->culling_faction = player; + + return true; } +/*###### +## npc_patricia +######*/ struct MANGOS_DLL_DECL npc_patriciaAI : public ScriptedAI { npc_patriciaAI(Creature *c) : ScriptedAI(c) -{ - m_pInstance = (ScriptedInstance*)c->GetInstanceData(); - Reset(); -} - -ScriptedInstance* m_pInstance; - -Unit* Target; -Creature* Arthas; -Creature* Meathook; -Creature* Patricia; -uint32 Step; -uint32 Steptim; -bool Event; -bool Event2; -bool Event2Com; - - void Reset() - { - Event = false; - Event2 = true; - Event2Com = false; - Step = 1; - Steptim = 20000; - if(Event == true) - {}else Event = false; + { + m_pInstance = (ScriptedInstance*)c->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + Unit* Target; + Creature* Arthas; + Creature* Meathook; + Creature* Patricia; + + uint32 Step; + uint32 Steptim; + uint64 MeathookGUID; + bool Event; + bool Event2; + bool Event2Com; + + void Reset() + { + Event = false; + Event2 = true; + Event2Com = false; + Step = 1; + Steptim = 20000; + if(Event == true){} + else + Event = false; + } + + void MoveInLineOfSight(Unit *who) + { + + if (Event2 == false) + { + Target = who; + Event2Com = true; + } + + if (Event == false && m_creature->IsWithinDistInMap(who, 20.0f)) + { + if (m_pInstance->GetData(TYPE_ARTHAS_EVENT) == IN_PROGRESS) + { + Event = true; + } + } + ScriptedAI::MoveInLineOfSight(who); } - void MoveInLineOfSight(Unit *who) - { - if (Event2 == false && m_creature->IsWithinDistInMap(who, 20.0f)) - { - Target = who; - Event2Com = true; - } - - if (Event == false && m_creature->IsWithinDistInMap(who, 20.0f)) - { - if (m_pInstance->GetData(TYPE_ARTHAS_EVENT) == IN_PROGRESS) - { - Event = true; - } - } - ScriptedAI::MoveInLineOfSight(who); - } - void UpdateAI(const uint32 diff) - { -DoMeleeAttackIfReady(); - - if(Event == true) - { - switch(Step) - { - case 1: - Patricia = m_creature; - DoScriptText(SAY_PEOPLE05, Patricia); - ++Step; - Steptim = 5000; - break; - case 3: - Meathook = Patricia->SummonCreature(26529,2349.901f,1225.278f,130.063f,3.15f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,900000); - Meathook->GetMotionMaster()->MovePoint(0, 2354.626f,1192.099f,130.535f); - DoScriptText(SAY_MEATHOOK_SPAWN, Meathook); - Patricia->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); - DoScriptText(SAY_PEOPLE06, Patricia); - Patricia->GetMotionMaster()->MovePoint(0, 2395.487f,1203.199f,134.125f); - ++Step; - Steptim = 13000; - break; + { + DoMeleeAttackIfReady(); + + if(Event == true) + { + switch(Step) + { + case 1: + Patricia = m_creature; + DoScriptText(SAY_PEOPLE05, Patricia); + ++Step; + Steptim = 5000; + break; + case 3: + if (MeathookGUID = m_pInstance->GetData64(DATA_MEATHOOK)) + { + // check if it has ben killed already + if (m_pInstance->GetData(TYPE_MEATHOOK_EVENT) != DONE) + { + Meathook = m_pInstance->instance->GetCreature(MeathookGUID); + Meathook->SetVisibility(VISIBILITY_ON); + Meathook->setFaction(14); + Meathook->GetMotionMaster()->MovePoint(0, 2354.626f,1192.099f,130.535f); + DoScriptText(SAY_MEATHOOK_SPAWN, Meathook); + } + // If is on cooldown kill it + if(m_pInstance->GetData(TYPE_MEATHOOK_EVENT) == DONE) + { + Meathook = m_pInstance->instance->GetCreature(MeathookGUID); + Meathook->SetDeadByDefault(true); + } + } + Patricia->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + DoScriptText(SAY_PEOPLE06, Patricia); + Patricia->GetMotionMaster()->MovePoint(0, 2395.487f,1203.199f,134.125f); + ++Step; + Steptim = 13000; + break; case 5: - Patricia->GetMotionMaster()->MovePoint(0, 2431.674f,1211.797f,134.124f); - ++Step; - Steptim = 7000; - break; + Patricia->GetMotionMaster()->MovePoint(0, 2431.674f,1211.797f,134.124f); + ++Step; + Steptim = 7000; + break; case 7: - Patricia->GetMotionMaster()->MovePoint(0, 2438.028f,1206.680f,133.935f); - ++Step; - Steptim = 3000; - break; - case 9: - Patricia->GetMotionMaster()->MovePoint(0, 2437.524f,1206.971f,133.935f); - Event2 = false; - ++Step; - Steptim = 3000; - break; - case 11: - if(Event2Com == false) return; - Patricia->SetUInt64Value(UNIT_FIELD_TARGET, Target->GetGUID()); - ++Step; - Steptim = 1000; - break; - case 13: - DoScriptText(SAY_PEOPLE07, m_creature); - ++Step; - Steptim = 4000; - break; - case 15: - DoScriptText(SAY_PEOPLE08, m_creature); - ++Step; - Steptim = 4000; - break; - case 17: - DoScriptText(SAY_PEOPLE09, m_creature); - ++Step; - Steptim = 9000; - break; - case 19: - m_creature->UpdateEntry(NPC_ZOMBIE, 0); - Event = 0; - ++Step; - Steptim = 7000; - break; - } - } else return; - - if (Steptim <= diff) - { + Patricia->GetMotionMaster()->MovePoint(0, 2438.028f,1206.680f,133.935f); + ++Step; + Steptim = 3000; + break; + case 9: + Patricia->GetMotionMaster()->MovePoint(0, 2437.524f,1206.971f,133.935f); + Event2 = false; + ++Step; + Steptim = 3000; + break; + case 11: + if(Event2Com == false) + return; + Patricia->SetUInt64Value(UNIT_FIELD_TARGET, Target->GetGUID()); + ++Step; + Steptim = 1000; + break; + case 13: + DoScriptText(SAY_PEOPLE07, m_creature); + ++Step; + Steptim = 4000; + break; + case 15: + DoScriptText(SAY_PEOPLE08, m_creature); + ++Step; + Steptim = 4000; + break; + case 17: + DoScriptText(SAY_PEOPLE09, m_creature); + ++Step; + Steptim = 9000; + break; + case 19: + m_creature->UpdateEntry(NPC_ZOMBIE, 0); + Event = 0; + ++Step; + Steptim = 7000; + break; + } + } + else + return; + + if (Steptim <= diff) + { ++Step; Steptim = 330000; - } Steptim -= diff; + } + Steptim -= diff; } }; @@ -871,84 +1003,89 @@ CreatureAI* GetAI_npc_patricia(Creature* pCreature) return new npc_patriciaAI(pCreature); } +/*###### +## dark_conversion_AI +######*/ struct MANGOS_DLL_DECL dark_conversionAI : public ScriptedAI { dark_conversionAI(Creature *c) : ScriptedAI(c) -{ - m_pInstance = (ScriptedInstance*)c->GetInstanceData(); - Reset(); -} + { + m_pInstance = (ScriptedInstance*)c->GetInstanceData(); + Reset(); + } -ScriptedInstance* m_pInstance; + ScriptedInstance* m_pInstance; -Unit* Target; -Creature* Arthas; -bool Conversion; -uint32 Step; -uint32 Steptim; + Unit* Target; + Creature* Arthas; + bool Conversion; + uint32 Step; + uint32 Steptim; - void Reset() - { + void Reset() + { m_creature->setFaction(35); Conversion = false; Step = 1; Steptim = 500; - } + } - void MoveInLineOfSight(Unit *who) + void MoveInLineOfSight(Unit *who) { - if (Conversion == false && m_creature->IsWithinDistInMap(who, 30.0f)) - { - if (m_pInstance->GetData(TYPE_ARTHAS_EVENT) == IN_PROGRESS) - { - Target = who; - Conversion = true; - } - - } - ScriptedAI::MoveInLineOfSight(who); + if (Conversion == false && m_creature->IsWithinDistInMap(who, 30.0f)) + { + if (m_pInstance->GetData(TYPE_ARTHAS_EVENT) == IN_PROGRESS) + { + Target = who; + Conversion = true; + } + } + ScriptedAI::MoveInLineOfSight(who); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 diff) { - DoMeleeAttackIfReady(); + DoMeleeAttackIfReady(); - if(Conversion == true) + if(Conversion == true) { - switch(Step) - { - case 1: + switch(Step) + { + case 1: m_creature->setFaction(14); //2078 m_creature->CastSpell(m_creature,SPELL_FEAR,false); - switch(rand()%12) - { - case 0: DoScriptText(SAY_PEOPLE01, m_creature); break; - case 1: DoScriptText(SAY_PEOPLE02, m_creature); break; - case 2: DoScriptText(SAY_PEOPLE03, m_creature); break; - case 3: DoScriptText(SAY_PEOPLE04, m_creature); break; - case 4: DoScriptText(SAY_PEOPLE10, m_creature); break; - case 5: DoScriptText(SAY_PEOPLE11, m_creature); break; - case 6: DoScriptText(SAY_PEOPLE12, m_creature); break; - case 7: DoScriptText(SAY_PEOPLE13, m_creature); break; - } - ++Step; - Steptim = 5000 + rand()%5000; - break; - case 3: + switch(rand()%12) + { + case 0: DoScriptText(SAY_PEOPLE01, m_creature); break; + case 1: DoScriptText(SAY_PEOPLE02, m_creature); break; + case 2: DoScriptText(SAY_PEOPLE03, m_creature); break; + case 3: DoScriptText(SAY_PEOPLE04, m_creature); break; + case 4: DoScriptText(SAY_PEOPLE10, m_creature); break; + case 5: DoScriptText(SAY_PEOPLE11, m_creature); break; + case 6: DoScriptText(SAY_PEOPLE12, m_creature); break; + case 7: DoScriptText(SAY_PEOPLE13, m_creature); break; + } + ++Step; + Steptim = 5000 + rand()%5000; + break; + case 3: m_creature->UpdateEntry(NPC_ZOMBIE, 0); m_creature->GetMotionMaster()->MovePoint(0, Target->GetPositionX(), Target->GetPositionY(), Target->GetPositionZ()); ++Step; Steptim = 1000; break; - } - }else return; + } + } + else + return; - if (Steptim <= diff) - { + if (Steptim <= diff) + { ++Step; Steptim = 330000; - } Steptim -= diff; + } + Steptim -= diff; } }; @@ -958,59 +1095,63 @@ CreatureAI* GetAI_dark_conversion(Creature* pCreature) return new dark_conversionAI(pCreature); } +/*###### +## npc_time_riftCSAI +######*/ struct MANGOS_DLL_DECL npc_time_riftCSAI : public ScriptedAI { - npc_time_riftCSAI(Creature *c) : ScriptedAI(c) {Reset(); -} - -Creature* Drakonian01; -Creature* Drakonian02; -Creature* Drakonian03; -Creature* Arthas; -bool Conversion; -uint32 Step; -uint32 Steptim; - - void Reset() - { - Conversion = false; - Step = 1; - Steptim = 500; - } - - void UpdateAI(const uint32 diff) + npc_time_riftCSAI(Creature *c) : ScriptedAI(c) + { + Reset(); + } + + Creature* Drakonian01; + Creature* Drakonian02; + Creature* Drakonian03; + Creature* Arthas; + bool Conversion; + uint32 Step; + uint32 Steptim; + + void Reset() + { + Conversion = false; + Step = 1; + Steptim = 500; + } + void UpdateAI(const uint32 diff) { - switch(Step) - { - case 1: - if (Creature* pArthas = GetClosestCreatureWithEntry(m_creature, NPC_ARTHAS, 180.0f)) - Arthas = pArthas; - Drakonian01 = m_creature->SummonCreature(NPC_DRAKONIAN,m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ()+1,3.229f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,900000); - Drakonian01->GetMotionMaster()->MovePoint(0, Arthas->GetPositionX(), Arthas->GetPositionY(), Arthas->GetPositionZ()); - ++Step; - Steptim = 3000; - break; - case 3: - Drakonian02 = m_creature->SummonCreature(NPC_DRAKONIAN,m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ()+1,3.229f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,900000); - Drakonian02->GetMotionMaster()->MovePoint(0, Arthas->GetPositionX(), Arthas->GetPositionY(), Arthas->GetPositionZ()); - ++Step; - Steptim = 3000; - break; - case 5: - Drakonian03 = m_creature->SummonCreature(NPC_DRAKONIAN,m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ()+1,3.229f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,900000); - Drakonian03->GetMotionMaster()->MovePoint(0, Arthas->GetPositionX(), Arthas->GetPositionY(), Arthas->GetPositionZ()); - ++Step; - Steptim = 3000; - break; - } - - if (Steptim <= diff) - { - ++Step; - Steptim = 330000; - } Steptim -= diff; - - } + switch(Step) + { + case 1: + if (Creature* pArthas = GetClosestCreatureWithEntry(m_creature, NPC_ARTHAS, 180.0f)) + Arthas = pArthas; + Drakonian01 = m_creature->SummonCreature(NPC_DRAKONIAN,m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ()+1,3.229f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,900000); + Drakonian01->GetMotionMaster()->MovePoint(0, Arthas->GetPositionX(), Arthas->GetPositionY(), Arthas->GetPositionZ()); + ++Step; + Steptim = 3000; + break; + case 3: + Drakonian02 = m_creature->SummonCreature(NPC_DRAKONIAN,m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ()+1,3.229f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,900000); + Drakonian02->GetMotionMaster()->MovePoint(0, Arthas->GetPositionX(), Arthas->GetPositionY(), Arthas->GetPositionZ()); + ++Step; + Steptim = 3000; + break; + case 5: + Drakonian03 = m_creature->SummonCreature(NPC_DRAKONIAN,m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ()+1,3.229f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,900000); + Drakonian03->GetMotionMaster()->MovePoint(0, Arthas->GetPositionX(), Arthas->GetPositionY(), Arthas->GetPositionZ()); + ++Step; + Steptim = 3000; + break; + } + + if (Steptim <= diff) + { + ++Step; + Steptim = 330000; + } + Steptim -= diff; + } }; CreatureAI* GetAI_npc_time_riftCS(Creature* pCreature) diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/def_culling_of_stratholme.h b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/def_culling_of_stratholme.h index a69bcf572..59c88c65b 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/def_culling_of_stratholme.h +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/def_culling_of_stratholme.h @@ -1,14 +1,58 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + +/* ScriptData +SDName: instance_culling_of_stratholme +SD%Complete: ?% +SDComment: +SDCategory: Culling of Stratholme +EndScriptData */ + + + #ifndef DEF_CULLING_OF_STRATHOLME_H #define DEF_CULLING_OF_STRATHOLME_H enum Data { - TYPE_ARTHAS_EVENT = 1, - DATA_GO_SHKAF_GATE = 2, - DATA_GO_MAL_GATE1 = 3, - DATA_GO_MAL_GATE2 = 4, - DATA_GO_MAL_CHEST = 5 + MAX_ENCOUNTER = 5, + TYPE_ARTHAS_EVENT = 0, + TYPE_SALRAMM_EVENT = 1, + TYPE_MEATHOOK_EVENT = 2, + TYPE_EPOCH_EVENT = 3, + TYPE_MALGANIS_EVENT = 4, + + DATA_GO_SHKAF_GATE = 8, + DATA_GO_MAL_GATE1 = 9, + DATA_GO_MAL_GATE2 = 10, + DATA_GO_MAL_CHEST = 11, + DATA_ARTHAS = 12, + DATA_SALRAMM = 13, + DATA_MEATHOOK = 14, + DATA_EPOCH = 15, + DATA_MALGANIS = 16, + + + NPC_ARTHAS = 26499, // Arthas + NPC_MEATHOOK = 26529, // Meathook + NPC_SALRAMM = 26530, // Salramm + NPC_EPOCH = 26532, // Lord Epoch + NPC_MALGANIS = 26533 // Mal'Ganis }; #endif diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp index 24c1a7fea..ea54fb334 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp @@ -1,16 +1,45 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + +/* ScriptData +SDName: instance_culling_of_stratholme +SD%Complete: ?% +SDComment: +SDCategory: Culling of Stratholme +EndScriptData */ + + + #include "precompiled.h" #include "def_culling_of_stratholme.h" -#define GO_SHKAF_GATE 188686 +#define GO_SHKAF_GATE 188686 #define GO_MALGANIS_GATE1 187711 #define GO_MALGANIS_GATE2 187723 #define GO_MALGANIS_CHEST 190663 struct MANGOS_DLL_DECL instance_culling_of_stratholme : public ScriptedInstance { - instance_culling_of_stratholme(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + instance_culling_of_stratholme(Map* pMap) : ScriptedInstance(pMap) + { + Initialize(); + }; - uint32 m_auiEncounter[1]; + uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string strInstData; uint64 m_uiShkafGateGUID; @@ -18,15 +47,76 @@ struct MANGOS_DLL_DECL instance_culling_of_stratholme : public ScriptedInstance uint64 m_uiMalGate2GUID; uint64 m_uiMalChestGUID; + uint64 m_uilordEpochGUID; + uint64 m_uiMeathookGUID; + uint64 m_uiSalrammGUID; + uint64 m_uiMalganisGUID; + uint64 m_uiArthasGUID; + void Initialize() { m_uiShkafGateGUID = 0; m_uiMalGate1GUID = 0; m_uiMalGate2GUID = 0; m_uiMalChestGUID = 0; + + m_uilordEpochGUID = 0; + m_uiMeathookGUID = 0; + m_uiSalrammGUID = 0; + m_uiMalganisGUID = 0; + m_uiArthasGUID = 0; + } + + bool IsEncounterInProgress() const + { + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + return true; + } + + return false; + } + + void OnCreatureCreate(Creature* pCreature) + { + switch(pCreature->GetEntry()) + { + case NPC_ARTHAS: + { + m_uiArthasGUID = pCreature->GetGUID(); + break; + } + case NPC_SALRAMM: + { + m_uiSalrammGUID = pCreature->GetGUID(); + pCreature->SetVisibility(VISIBILITY_OFF); + pCreature->setFaction(35); + break; + } + case NPC_MEATHOOK: + { + m_uiMeathookGUID = pCreature->GetGUID(); + pCreature->SetVisibility(VISIBILITY_OFF); + pCreature->setFaction(35); + break; + } + case NPC_EPOCH: + { + m_uilordEpochGUID = pCreature->GetGUID(); + pCreature->SetVisibility(VISIBILITY_OFF); + pCreature->setFaction(35); + break; + } + case NPC_MALGANIS: + { + m_uiMalganisGUID = pCreature->GetGUID(); + break; + } + } } - void OnObjectCreate(GameObject* pGo) + void OnObjectCreate(GameObject* pGo) { if (pGo->GetEntry() == GO_SHKAF_GATE) m_uiShkafGateGUID = pGo->GetGUID(); @@ -41,41 +131,131 @@ struct MANGOS_DLL_DECL instance_culling_of_stratholme : public ScriptedInstance m_uiMalChestGUID = pGo->GetGUID(); } - void SetData(uint32 uiType, uint32 uiData) + uint64 GetData64(uint32 uiData) + { + switch(uiData) + { + case DATA_ARTHAS: return m_uiArthasGUID; + case DATA_SALRAMM: return m_uiSalrammGUID; + case DATA_MEATHOOK: return m_uiMeathookGUID; + case DATA_EPOCH: return m_uilordEpochGUID; + case DATA_MALGANIS: return m_uiMalganisGUID; + case DATA_GO_SHKAF_GATE: return m_uiShkafGateGUID; + case DATA_GO_MAL_GATE1: return m_uiMalGate1GUID; + case DATA_GO_MAL_GATE2: return m_uiMalGate2GUID; + case DATA_GO_MAL_CHEST: return m_uiMalChestGUID; + } + + return 0; + } + + void SetData(uint32 uiType, uint32 uiData) { + bool needSave = false; switch(uiType) { case TYPE_ARTHAS_EVENT: - m_auiEncounter[0] = uiData; + { + if (m_auiEncounter[0] == IN_PROGRESS) + needSave = true; + + m_auiEncounter[0] = uiData; + break; + } + case TYPE_SALRAMM_EVENT: + { + if (m_auiEncounter[1] == DONE) + needSave = true; + + m_auiEncounter[1] = uiData; + break; + } + case TYPE_MEATHOOK_EVENT: + { + if (m_auiEncounter[2] == DONE) + needSave = true; + + m_auiEncounter[2] = uiData; break; + } + case TYPE_EPOCH_EVENT: + { + if (m_auiEncounter[3] == DONE) + needSave = true; + m_auiEncounter[3] = uiData; + break; + } + case TYPE_MALGANIS_EVENT: + { + if (m_auiEncounter[4] == DONE) + { + needSave = true; + DoRespawnGameObject(m_uiMalChestGUID,86400); //respawn time for the chest 1 day + } + m_auiEncounter[4] = uiData; + break; + } + } + if (uiData == DONE || needSave) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3] << " " << m_auiEncounter[4]; + + strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; } } - uint32 GetData(uint32 uiType) + uint32 GetData(uint32 uiType) { switch(uiType) { case TYPE_ARTHAS_EVENT: return m_auiEncounter[0]; - + case TYPE_SALRAMM_EVENT: + return m_auiEncounter[1]; + case TYPE_MEATHOOK_EVENT: + return m_auiEncounter[2]; + case TYPE_EPOCH_EVENT: + return m_auiEncounter[3]; + case TYPE_MALGANIS_EVENT: + return m_auiEncounter[4]; } + return 0; } - uint64 GetData64(uint32 uiData) + const char* Save() { - switch(uiData) + return strInstData.c_str(); + } + + void Load(const char* chrIn) + { + if (!chrIn) { - case DATA_GO_SHKAF_GATE: return m_uiShkafGateGUID; - case DATA_GO_MAL_GATE1: return m_uiMalGate1GUID; - case DATA_GO_MAL_GATE2: return m_uiMalGate2GUID; - case DATA_GO_MAL_CHEST: return m_uiMalChestGUID; + OUT_LOAD_INST_DATA_FAIL; + return; } - return 0; - } + OUT_LOAD_INST_DATA(chrIn); + + std::istringstream loadStream(chrIn); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] >> m_auiEncounter[4]; + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; + } + + OUT_LOAD_INST_DATA_COMPLETE; + } }; InstanceData* GetInstanceData_instance_culling_of_stratholme(Map* pMap) diff --git a/scripts/northrend/ulduar/ulduar/boss_iron_council.cpp b/scripts/northrend/ulduar/ulduar/boss_iron_council.cpp index 03914fb57..f4cb91c5a 100644 --- a/scripts/northrend/ulduar/ulduar/boss_iron_council.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_iron_council.cpp @@ -39,7 +39,7 @@ struct MANGOS_DLL_DECL iron_councilAI : public ScriptedAI ScriptedInstance *pInstance; bool Regular; int CouncilAlive; - + void Reset() { if(pInstance) @@ -49,15 +49,15 @@ struct MANGOS_DLL_DECL iron_councilAI : public ScriptedAI pInstance->SetData(TYPE_IRON_COUNCIL, NOT_STARTED); } } - + void EnterCombat(Unit *who) { if(!who) return; if(!pInstance) return; - + uint32 entry = m_creature->GetEntry(); Creature *council; - + if(entry!=CR_STEELBREAKER) { council = pInstance->instance->GetCreature(pInstance->GetData64(NPC_STEELBREAKER)); diff --git a/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp b/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp index 8f8a89fc4..3b6df2117 100644 --- a/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp @@ -1,87 +1,178 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 +* 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_kologarn +SD%Complete: 85% +SDComment: missing yells and stone grip +SDCategory: Ulduar +EndScriptData */ #include "precompiled.h" #include "def_ulduar.h" +#define DATA_LEFT_ARM NPC_KOLOGARN_LEFT_ARM +#define DATA_RIGHT_ARM NPC_KOLOGARN_RIGHT_ARM +#define DATA_KOLOGARN NPC_KOLOGARN -#define SP_OVERHEAD_SMASH_2H 63356 //64710 -#define SP_OVERHEAD_SMASH_1H 63573 //64715 -#define SP_STONE_SHOUT 64004 -#define SP_PETRIFYING_BREATH 62030 -#define H_SP_PETRIFYING_BREATH 63980 -#define SP_FOCUSED_EYEBEAM 63346 -#define H_SP_FOCUSED_EYEBEAM 63976 - -#define SP_BERSERK 64238 +enum +{ + //yells + + //kologarn + SPELL_OVERHEAD_SMASH = 63356, + SPELL_OVERHEAD_SMASH_H = 64003, + SPELL_ONE_ARMED_SMASH = 63573, + SPELL_ONE_ARMED_SMASH_H = 64006, + SPELL_STONE_SHOUT = 63716, + SPELL_STONE_SHOUT_H = 64005, + SPELL_PETRIFYING_BREATH = 62030, + SPELL_PETRIFYING_BREATH_H = 63980, + //left arm + SPELL_SHOCKWAVE = 63783, + SPELL_SHOCKWAVE_H = 63982, + //right arm + SPELL_STONE_GRIP = 62166, + SPELL_STONE_GRIP_H = 63981, + //both + SPELL_ARM_VISUAL = 64753, + //rubble + SPELL_RUMBLE = 63818, + SPELL_STONE_NOVA = 63978, + //NPC ids + MOB_RUBBLE = 33768 +}; -#define SP_SHOCKWAVE 63783 -#define H_SP_SHOCKWAVE 63982 +float LeftArmX; +float LeftArmY; +float LeftArmZ; +float RightArmX; +float RightArmY; +float RightArmZ; -#define SP_STONE_GRIP 62056 -#define H_SP_STONE_GRIP 63985 +// Rubble +struct MANGOS_DLL_DECL mob_ulduar_rubbleAI : public ScriptedAI +{ + mob_ulduar_rubbleAI(Creature* pCreature) : ScriptedAI(pCreature) + { + Reset(); + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + } -#define CR_RUBBLE 33768 + ScriptedInstance* m_pInstance; -#define LEFT 0x01 //01 -#define RIGHT 0x02 //10 + uint32 Stone_Nova_Timer; + uint32 Death_Timer; + bool die; -struct MANGOS_DLL_DECL boss_kologarnAI : public Scripted_NoMovementAI -{ - boss_kologarnAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) + void Reset() { - pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Regular = pCreature->GetMap()->IsRegularDifficulty(); - Reset(); + die = false; + Stone_Nova_Timer = urand(8000, 12000); } - ScriptedInstance *pInstance; - bool Regular; - uint32 BreathTimer; - uint32 SmashTimer; - uint32 EnrageTimer; - uint8 arms; - uint32 LeftArmRespawn; - uint32 RightArmRespawn; + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) + { + if (uiDamage > m_creature->GetHealth()) + if (!die) + { + uiDamage = 0; + DoCast(m_creature, SPELL_RUMBLE); + Death_Timer = 500; + die = true; + } + } - void Reset() + void UpdateAI(const uint32 diff) { - BreathTimer = 5000; - SmashTimer = 10000+rand()%5000; - EnrageTimer = 600000; - arms = LEFT & RIGHT; - if(pInstance) + if (Death_Timer < diff && die) { - pInstance->SetData(TYPE_KOLOGARN, NOT_STARTED); - Creature *arm = NULL; - arm = (Creature *) Unit::GetUnit((*m_creature), pInstance->GetData64(NPC_KOLOGARN_LEFT_ARM)); - if(arm) arm->Respawn(); - arm = (Creature *) Unit::GetUnit((*m_creature), pInstance->GetData64(NPC_KOLOGARN_RIGHT_ARM)); - if(arm) arm->Respawn(); - } - LeftArmRespawn = 30000; - RightArmRespawn = 30000; + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + }else Death_Timer -= diff; + + if (Stone_Nova_Timer < diff && !die) + { + DoCast(m_creature, SPELL_STONE_NOVA); + Stone_Nova_Timer = urand(7000, 9000); + }else Stone_Nova_Timer -= diff; + + if (!die) + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_ulduar_rubble(Creature* pCreature) +{ + return new mob_ulduar_rubbleAI(pCreature); +} + +// Left Arm +struct MANGOS_DLL_DECL boss_kologarn_left_armAI : public ScriptedAI +{ + boss_kologarn_left_armAI(Creature* pCreature) : ScriptedAI(pCreature) + { + Reset(); + SetCombatMovement(false); + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + LeftArmX = 1777.636841; LeftArmY = -47.970596; LeftArmZ = 448.805908; } - void ArmDied(int arm) + bool m_bIsRegularMode; + ScriptedInstance* m_pInstance; + + uint32 Shockwave_Timer; + uint32 Addcount; + + void Reset() { - arms = arms & !arm; + Shockwave_Timer = 30000; + Addcount = 0; + DoCast(m_creature, SPELL_ARM_VISUAL); } - void Aggro(Unit *who) + void Aggro(Unit* pWho) { - if(pInstance) + if (m_pInstance) { - pInstance->SetData(TYPE_KOLOGARN, IN_PROGRESS); - /*Creature *arm = NULL; - arm = (Creature *) Unit::GetUnit((*m_creature), pInstance->GetData64(NPC_KOLOGARN_LEFT_ARM)); - if(arm) arm->Respawn(); - arm = (Creature *) Unit::GetUnit((*m_creature), pInstance->GetData64(NPC_KOLOGARN_RIGHT_ARM)); - if(arm) arm->Respawn();*/ + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_RIGHT_ARM)))) + if (pTemp->isAlive()) + pTemp->SetInCombatWithZone(); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_KOLOGARN)))) + if (pTemp->isAlive()) + pTemp->SetInCombatWithZone(); } } - void JustDied(Unit *killer) + void JustDied(Unit* pKiller) { - if(pInstance) pInstance->SetData(TYPE_KOLOGARN, DONE); + if (!m_pInstance) + return; + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_KOLOGARN)))) + if (pTemp->isAlive()) + pTemp->DealDamage(pTemp, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + do{ + if (Creature* pTemp = m_creature->SummonCreature(MOB_RUBBLE, LeftArmX, LeftArmY, LeftArmZ, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000)) + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + { + pTemp->AddThreat(pTarget,0.0f); + pTemp->AI()->AttackStart(pTarget); + } + Addcount++; + } while(Addcount<5); } void UpdateAI(const uint32 diff) @@ -89,153 +180,201 @@ struct MANGOS_DLL_DECL boss_kologarnAI : public Scripted_NoMovementAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if(BreathTimer < diff) - { - if(!m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE)) - DoCast(m_creature->getVictim(), Regular ? SP_PETRIFYING_BREATH : H_SP_PETRIFYING_BREATH); - BreathTimer = 5000; - } - else BreathTimer -= diff; - - if(pInstance) - { - if((arms & LEFT) != LEFT) - { - if(LeftArmRespawn < diff) - { - Creature *arm = NULL; - arm = (Creature *) Unit::GetUnit((*m_creature), pInstance->GetData64(NPC_KOLOGARN_LEFT_ARM)); - if(arm) arm->Respawn(); - } - else LeftArmRespawn -= diff; - } - - if((arms & RIGHT) != RIGHT) - { - if(RightArmRespawn < diff) - { - Creature *arm = NULL; - arm = (Creature *) Unit::GetUnit((*m_creature), pInstance->GetData64(NPC_KOLOGARN_RIGHT_ARM)); - if(arm) arm->Respawn(); - } - else RightArmRespawn -= diff; - } - } - - if(SmashTimer < diff) - { - if(arms== (LEFT & RIGHT)) DoCast(m_creature->getVictim(), SP_OVERHEAD_SMASH_2H); - if(arms==LEFT || arms==RIGHT) DoCast(m_creature->getVictim(), SP_OVERHEAD_SMASH_1H); - //if(arms==0) DoCast(m_creature->getVictim(), SP_STONE_SHOUT); - SmashTimer = 10000 + rand()%5000; - } - else SmashTimer -= diff; - - if(EnrageTimer < diff) + if (Shockwave_Timer < diff) { - DoCast(m_creature, SP_BERSERK); - EnrageTimer = 30000; - } - else EnrageTimer -= diff; - - DoMeleeAttackIfReady(); + DoCast(m_creature, m_bIsRegularMode ? SPELL_SHOCKWAVE : SPELL_SHOCKWAVE_H); + Shockwave_Timer = 30000; + }else Shockwave_Timer -= diff; } }; -struct MANGOS_DLL_DECL boss_kologarn_left_armAI : public Scripted_NoMovementAI +CreatureAI* GetAI_boss_kologarn_left_arm(Creature* pCreature) { - boss_kologarn_left_armAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) + return new boss_kologarn_left_armAI(pCreature); +} + +// Right Arm +struct MANGOS_DLL_DECL boss_kologarn_right_armAI : public ScriptedAI +{ + boss_kologarn_right_armAI(Creature* pCreature) : ScriptedAI(pCreature) { - pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Regular = pCreature->GetMap()->IsRegularDifficulty(); Reset(); + SetCombatMovement(false); + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + RightArmX = 1779.671753; RightArmY = 1.514701; RightArmZ = 448.810577; } - ScriptedInstance *pInstance; - bool Regular; - uint32 ShockwaveTimer; + bool m_bIsRegularMode; + ScriptedInstance* m_pInstance; + + uint32 Stone_Grip_Timer; + uint32 Addcount; + uint32 gripdmg; + uint32 freedmg; + uint64 GripTarget; + + bool grip; void Reset() { - ShockwaveTimer = 20000 + rand()%10000; + Stone_Grip_Timer = 20000; + Addcount = 0; + GripTarget = 0; + gripdmg = 0; + freedmg = 0; + grip = false; + DoCast(m_creature, SPELL_ARM_VISUAL); } - void Aggro(Unit *who) {} + void Aggro(Unit* pWho) + { + if (m_pInstance) + { + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_LEFT_ARM)))) + if (pTemp->isAlive()) + pTemp->SetInCombatWithZone(); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_KOLOGARN)))) + if (pTemp->isAlive()) + pTemp->SetInCombatWithZone(); + } + } - void JustDied(Unit *killer) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) { - Creature *kologarn = (Creature *) Unit::GetUnit((*m_creature), pInstance->GetData64(NPC_KOLOGARN)); - if(kologarn && kologarn->isAlive()) + if (grip) { - kologarn->DealDamage(kologarn, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - ((boss_kologarnAI *)kologarn->AI())->ArmDied(LEFT); + gripdmg += uiDamage; + freedmg = m_bIsRegularMode ? 100000 : 480000; + if (gripdmg > freedmg || uiDamage > m_creature->GetHealth()) + { + if (Unit* pGripTarget = Unit::GetUnit(*m_creature, GripTarget)){ + if (pGripTarget->HasAura(SPELL_STONE_GRIP)) + pGripTarget->RemoveAurasDueToSpell(SPELL_STONE_GRIP); + if (pGripTarget->HasAura(SPELL_STONE_GRIP_H)) + pGripTarget->RemoveAurasDueToSpell(SPELL_STONE_GRIP_H); + } + grip = false; + gripdmg = 0; + } } } + void JustDied(Unit* pKiller) + { + if (!m_pInstance) + return; + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_KOLOGARN)))) + if (pTemp->isAlive()) + pTemp->DealDamage(pTemp, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + do{ + if (Creature* pTemp = m_creature->SummonCreature(MOB_RUBBLE, RightArmX, RightArmY, RightArmZ, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000)) + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + { + pTemp->AddThreat(pTarget,0.0f); + pTemp->AI()->AttackStart(pTarget); + } + Addcount++; + } while(Addcount<5); + } + void UpdateAI(const uint32 diff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if(ShockwaveTimer < diff) + if (Stone_Grip_Timer < diff) { - DoCast(m_creature->getVictim(), SP_SHOCKWAVE); - ShockwaveTimer = 20000 + rand()%10000; - } - else ShockwaveTimer -= diff; + //stone grip emote + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)){ + //DoCast(target, m_bIsRegularMode ? SPELL_STONE_GRIP : SPELL_STONE_GRIP_H); + GripTarget = target->GetGUID(); + grip = true; + gripdmg = 0; + } + Stone_Grip_Timer = 30000; + }else Stone_Grip_Timer -= diff; } }; -struct MANGOS_DLL_DECL boss_kologarn_right_armAI : public Scripted_NoMovementAI +CreatureAI* GetAI_boss_kologarn_right_arm(Creature* pCreature) +{ + return new boss_kologarn_right_armAI(pCreature); +} + +// Kologarn +struct MANGOS_DLL_DECL boss_kologarnAI : public ScriptedAI { - boss_kologarn_right_armAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) + boss_kologarnAI(Creature* pCreature) : ScriptedAI(pCreature) { - pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Regular = pCreature->GetMap()->IsRegularDifficulty(); + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + SetCombatMovement(false); Reset(); } - ScriptedInstance *pInstance; - bool Regular; - uint32 GripThreshold; - uint32 GripTimer; - Unit *GrippedPlayer; - bool Gripped; + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + + uint32 Spell_Timer; + uint32 Check_Timer; + uint32 respawnright; + uint32 respawnleft; + + bool right; + bool left; void Reset() { - GrippedPlayer = NULL; - Gripped = false; - GripTimer = 10000 + rand()%10000; - GripThreshold = Regular ? 100000 : 480000; + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + Spell_Timer = 10000; + Check_Timer = 6300; + right = true; + left = true; } - void Aggro(Unit *who) {} - - void JustDied(Unit *killer) + void JustDied(Unit* pKiller) { - Creature *kologarn = (Creature *) Unit::GetUnit((*m_creature), pInstance->GetData64(NPC_KOLOGARN)); - if(kologarn && kologarn->isAlive()) + //death yell + if (m_pInstance) { - kologarn->DealDamage(kologarn, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - ((boss_kologarnAI *)kologarn->AI())->ArmDied(RIGHT); + m_pInstance->SetData(TYPE_KOLOGARN, DONE); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_LEFT_ARM)))) + if (pTemp->isAlive()) + pTemp->DealDamage(pTemp, pTemp->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_RIGHT_ARM)))) + if (pTemp->isAlive()) + pTemp->DealDamage(pTemp, pTemp->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); } + } - //summon rubbles - Creature *rubble; - Unit *target; - for(int i=0; i<5; i++) + void Aggro(Unit* pWho) + { + if (m_pInstance) { - rubble = DoSpawnCreature(CR_RUBBLE, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); - target = SelectUnit(SELECT_TARGET_RANDOM, 0); - if(rubble && target && target->isAlive()) - rubble->AddThreat(target, 1.0f); + m_pInstance->SetData(TYPE_KOLOGARN, IN_PROGRESS); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_LEFT_ARM)))) + if (pTemp->isAlive()) + pTemp->SetInCombatWithZone(); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_RIGHT_ARM)))) + if (pTemp->isAlive()) + pTemp->SetInCombatWithZone(); } + //aggro yell } - void DamageTaken(Unit *done_by, uint32 &dmg) + void JustReachedHome() { - if(Gripped) GripThreshold -= dmg; + if (m_pInstance) + { + m_pInstance->SetData(TYPE_KOLOGARN, FAIL); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_LEFT_ARM)))) + if (!pTemp->isAlive()) + pTemp->Respawn(); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_RIGHT_ARM)))) + if (!pTemp->isAlive()) + pTemp->Respawn(); + } } void UpdateAI(const uint32 diff) @@ -243,33 +382,54 @@ struct MANGOS_DLL_DECL boss_kologarn_right_armAI : public Scripted_NoMovementAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if(Gripped) + if (Spell_Timer < diff) { - if(!GrippedPlayer || GrippedPlayer->isDead() || GripThreshold < 0) - { - //release gripped player - //GrippedPlayer->RemoveAurasDueToSpell(SP_STONE_GRIP); - GrippedPlayer = NULL; - GripTimer = 10000 + rand()%10000; - Gripped = false; - GripThreshold = Regular ? 100000 : 400000; - } - } - else + if (right && left) + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_OVERHEAD_SMASH : SPELL_OVERHEAD_SMASH_H); + else + if (!right && !left) + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_STONE_SHOUT : SPELL_STONE_SHOUT_H); + else + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_ONE_ARMED_SMASH : SPELL_ONE_ARMED_SMASH_H); + Spell_Timer = 20000; + }else Spell_Timer -= diff; + + if (respawnleft < diff && !left) { - if(GripTimer < diff) - { - GrippedPlayer = SelectUnit(SELECT_TARGET_RANDOM, 0); - if(GrippedPlayer && GrippedPlayer->isAlive()) + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_LEFT_ARM)))) + if (!pTemp->isAlive()) + pTemp->Respawn(); + left = true; + }else respawnleft -= diff; + + if (respawnright < diff && !right) + { + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_RIGHT_ARM)))) + if (!pTemp->isAlive()) + pTemp->Respawn(); + right = true; + }else respawnright -= diff; + + if (Check_Timer < diff) + { + if (Creature* lArm = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_LEFT_ARM)))) + if (!lArm->isAlive() && left) { - //grip player - //DoCast(GrippedPlayer, SP_STONE_GRIP); - Gripped = true; + left = false; + respawnleft = 60000; } - else GripTimer = 5000; - } - else GripTimer -= diff; - } + if (Creature* rArm = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_RIGHT_ARM)))) + if (!rArm->isAlive() && right) + { + right = false; + respawnright = 60000; + } + if (!m_creature->IsWithinDistInMap(m_creature->getVictim(), 10)) + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_PETRIFYING_BREATH : SPELL_PETRIFYING_BREATH_H); + Check_Timer = 500; + }else Check_Timer -= diff; + + DoMeleeAttackIfReady(); } }; @@ -278,32 +438,27 @@ CreatureAI* GetAI_boss_kologarn(Creature* pCreature) return new boss_kologarnAI(pCreature); } -CreatureAI* GetAI_boss_kologarn_left_arm(Creature* pCreature) -{ - return new boss_kologarn_left_armAI(pCreature); -} - -CreatureAI* GetAI_boss_kologarn_right_arm(Creature* pCreature) -{ - return new boss_kologarn_right_armAI(pCreature); -} - void AddSC_boss_kologarn() { - Script *newscript; - - newscript = new Script; - newscript->Name = "boss_kologarn"; - newscript->GetAI = &GetAI_boss_kologarn; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_kologarn_left_arm"; - newscript->GetAI = &GetAI_boss_kologarn_left_arm; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_kologarn_right_arm"; - newscript->GetAI = &GetAI_boss_kologarn_right_arm; - newscript->RegisterSelf(); -} + Script* NewScript; + + NewScript = new Script; + NewScript->Name = "boss_kologarn"; + NewScript->GetAI = GetAI_boss_kologarn; + NewScript->RegisterSelf(); + + NewScript = new Script; + NewScript->Name = "mob_ulduar_rubble"; + NewScript->GetAI = &GetAI_mob_ulduar_rubble; + NewScript->RegisterSelf(); + + NewScript = new Script; + NewScript->Name = "boss_kologarn_left_arm"; + NewScript->GetAI = &GetAI_boss_kologarn_left_arm; + NewScript->RegisterSelf(); + + NewScript = new Script; + NewScript->Name = "boss_kologarn_right_arm"; + NewScript->GetAI = &GetAI_boss_kologarn_right_arm; + NewScript->RegisterSelf(); +} \ No newline at end of file diff --git a/scripts/northrend/ulduar/ulduar/def_ulduar.h b/scripts/northrend/ulduar/ulduar/def_ulduar.h index a70d0e76d..c06148ddb 100644 --- a/scripts/northrend/ulduar/ulduar/def_ulduar.h +++ b/scripts/northrend/ulduar/ulduar/def_ulduar.h @@ -5,37 +5,46 @@ enum { TYPE_FLAME_LEVIATHAN = 1, - TYPE_IGNIS, - TYPE_RAZORSCALE, - TYPE_XT002, - TYPE_IRON_COUNCIL, - TYPE_KOLOGARN, - TYPE_AURIAYA, - TYPE_HODIR, - TYPE_FREYA, - TYPE_THORIM, - TYPE_MIMIRON, - TYPE_VEZAX, - TYPE_YOGG_SARON, - TYPE_ALGALON, + TYPE_IGNIS = 2, + TYPE_RAZORSCALE = 3, + TYPE_XT002 = 4, + TYPE_IRON_COUNCIL = 5, + TYPE_KOLOGARN = 6, + TYPE_AURIAYA = 7, + TYPE_HODIR = 8, + TYPE_FREYA = 9, + TYPE_THORIM = 10, + TYPE_MIMIRON = 11, + TYPE_VEZAX = 12, + TYPE_YOGG_SARON = 13, + TYPE_ALGALON = 14, //Hardmodes etc. - TYPE_HODIR_HARD, - TYPE_MIMIRON_HARD, - TYPE_THORIM_HARD, - - TYPE_LEVIATHAN_TP, - TYPE_XT002_TP, - TYPE_MIMIRON_TP, - - TYPE_KEEPERS, - - NPC_KOLOGARN = 100, - NPC_KOLOGARN_RIGHT_ARM, - NPC_KOLOGARN_LEFT_ARM, - NPC_STEELBREAKER, - NPC_MOLGEIM, - NPC_BRUNDIR, + TYPE_HODIR_HARD = 15, + TYPE_MIMIRON_HARD = 16, + TYPE_THORIM_HARD = 17, + + TYPE_LEVIATHAN_TP = 18, + TYPE_XT002_TP = 19, + TYPE_MIMIRON_TP = 20, + + + + NPC_STEELBREAKER = 21, + NPC_MOLGEIM = 22, + NPC_BRUNDIR = 23, + + TYPE_KEEPERS = 24, + + NPC_KOLOGARN = 25, + NPC_KOLOGARN_RIGHT_ARM = 26, + NPC_KOLOGARN_LEFT_ARM = 27, + + GO_KOLOGARN_BRIDGE = 194232, + GO_KOLOGARN_LOOT = 195046, + GO_KOLOGARN_LOOT_H = 195047, + GO_LEVIATHAN_GATE = 194630 + }; diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 9e439418f..e5cad7495 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -41,6 +41,7 @@ struct MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance uint64 mBrundirGUID; //GO Guid (Caches) uint64 mKologarnCacheGUID; + uint64 mHodirCacheGUID; uint64 mHodirRareCacheGUID; uint64 mThorimCacheGUID; @@ -56,6 +57,7 @@ struct MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance uint64 mXT002DoorGUID; uint64 mHodirFrozenDoorGUID; uint64 mAncientGateGUID; + uint64 m_uiKologarnBridgeGUID; // uint32 mEncounter[ENCOUNTERS]; uint32 mLeviathanReached; @@ -93,6 +95,7 @@ struct MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance mBrundirGUID = 0; mKologarnCacheGUID = 0; + m_uiKologarnBridgeGUID = 0; mHodirCacheGUID = 0; mHodirRareCacheGUID = 0; mThorimCacheGUID = 0; @@ -120,12 +123,12 @@ struct MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance { switch(pCreature->GetEntry()) { - case 32930: mKologarnGUID = pCreature->GetGUID(); - case 32933: mKologarnLeftArmGUID = pCreature->GetGUID(); - case 32934: mKologarnRightArmGUID = pCreature->GetGUID(); - case 32867: mSteelbreakerGUID = pCreature->GetGUID(); - case 32927: mMolgeimGUID = pCreature->GetGUID(); - case 32857: mBrundirGUID = pCreature->GetGUID(); + case 32930: mKologarnGUID = pCreature->GetGUID();break; + case 32933: mKologarnLeftArmGUID = pCreature->GetGUID();break; + case 32934: mKologarnRightArmGUID = pCreature->GetGUID();break; + case 32867: mSteelbreakerGUID = pCreature->GetGUID();break; + case 32927: mMolgeimGUID = pCreature->GetGUID();break; + case 32857: mBrundirGUID = pCreature->GetGUID();break; } } @@ -164,6 +167,9 @@ struct MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance case 194631: mXT002DoorGUID = pGo->GetGUID(); break; case 194441: mHodirFrozenDoorGUID = pGo->GetGUID(); break; case 194255: mAncientGateGUID = pGo->GetGUID(); break; + case GO_KOLOGARN_BRIDGE: m_uiKologarnBridgeGUID = pGo->GetGUID(); + pGo->SetGoState(GO_STATE_ACTIVE); + break; } } @@ -180,9 +186,9 @@ struct MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance } mEncounter[0] = uiData; break; - case TYPE_IGNIS: + case TYPE_IGNIS: mEncounter[1] = uiData; break; - case TYPE_RAZORSCALE: + case TYPE_RAZORSCALE: mEncounter[2] = uiData; break; case TYPE_XT002: if(uiData == IN_PROGRESS) @@ -197,11 +203,13 @@ struct MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance } mEncounter[3] = uiData; break; - case TYPE_IRON_COUNCIL: + case TYPE_IRON_COUNCIL: mEncounter[4] = uiData; break; case TYPE_KOLOGARN: if(uiData == DONE) DoRespawnGameObject(mKologarnCacheGUID, DAY); - mEncounter[5] = uiData; + if (GameObject* pBridge = instance->GetGameObject(m_uiKologarnBridgeGUID)) + pBridge->SetGoState(GO_STATE_READY); + mEncounter[5] = uiData; break; case TYPE_AURIAYA: mEncounter[6] = uiData; break; @@ -337,12 +345,12 @@ struct MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance { switch(uiData) { - case NPC_KOLOGARN: return mKologarnGUID; - case NPC_KOLOGARN_LEFT_ARM: return mKologarnLeftArmGUID; - case NPC_KOLOGARN_RIGHT_ARM: return mKologarnRightArmGUID; case NPC_STEELBREAKER: return mSteelbreakerGUID; case NPC_MOLGEIM: return mMolgeimGUID; case NPC_BRUNDIR: return mBrundirGUID; + case NPC_KOLOGARN: return mKologarnGUID; + case NPC_KOLOGARN_LEFT_ARM: return mKologarnLeftArmGUID; + case NPC_KOLOGARN_RIGHT_ARM: return mKologarnRightArmGUID; } return 0; } From 47fad18a4d1d1d502b9cab8db0c0b512193d7065 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Tue, 12 Jan 2010 21:21:49 +0300 Subject: [PATCH 098/405] Small sql fixes --- addition/717_culling_of_stratholme_mangos.sql | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addition/717_culling_of_stratholme_mangos.sql b/addition/717_culling_of_stratholme_mangos.sql index 4714165fe..88229396f 100644 --- a/addition/717_culling_of_stratholme_mangos.sql +++ b/addition/717_culling_of_stratholme_mangos.sql @@ -21,15 +21,15 @@ update `creature_template` set `AIName`='', `Scriptname`='boss_lord_epoch' where update `creature_template` set `AIName`='', `Scriptname`='boss_malganis' where `entry` in (26533); update `instance_template` set `script` = 'instance_culling_of_stratholme' WHERE map=595; -- Spawning Salramm in the instance -- -INSERT INTO creature VALUES (4458725,26530,595,1,1,0,0,2174.32,1307.32,131.866,4.32264,25,0,0,337025,62535,0,0); +INSERT INTO creature VALUES (4458724,26530,595,1,1,0,0,2174.32,1307.32,131.866,4.32264,25,0,0,337025,62535,0,0); -- heroic version -- INSERT INTO creature VALUES (4458725,26530,595,2,1,0,0,2178.93,1307.89,131.526,4.12069,25,0,0,421281,62535,0,0); -- Spawning Meathook in the instance -- -INSERT INTO creature VALUES (4458739,26529,595,1,1,0,0,2351.43,1218.03,130.078,4.64621,25,0,0,337025,0,0,0); +INSERT INTO creature VALUES (4458738,26529,595,1,1,0,0,2351.43,1218.03,130.078,4.64621,25,0,0,337025,0,0,0); -- heroic version -- INSERT INTO creature VALUES (4458739,26529,595,2,1,0,0,2350.42,1215.31,130.23,4.76314,25,0,0,421281,0,0,0); -- Spawning Lord Epoch in the instance -- -INSERT INTO creature VALUES (4458741,26532,595,1,1,0,1820,2446.25,1111.97,148.077,3.37779,25,0,0,337025,41690,0,0); +INSERT INTO creature VALUES (4458740,26532,595,1,1,0,1820,2446.25,1111.97,148.077,3.37779,25,0,0,337025,41690,0,0); -- heroic version -- INSERT INTO creature VALUES (4458741,26532,595,2,1,0,1820,2446.17,1111.64,148.076,3.25517,25,0,0,421281,41690,0,0); -- Spawning Malganis in the instance @@ -54,7 +54,7 @@ DELETE FROM `gameobject_template` WHERE (`entry`=187723); INSERT INTO `gameobject_template` (`entry`, `type`, `displayId`, `name`, `castBarCaption`, `faction`, `flags`, `size`, `data0`, `data1`, `data2`, `data3`, `data4`, `data5`, `data6`, `data7`, `data8`, `data9`, `data10`, `data11`, `data12`, `data13`, `data14`, `data15`, `data16`, `data17`, `data18`, `data19`, `data20`, `data21`, `data22`, `data23`, `ScriptName`) VALUES (187723, 0, 3631, 'Crusaders\' Square Gate', '', 1375, 6553632, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ''); update `gameobject` set `state` = '1' where `id` in (187711); -update `gameobject` set `spawntimesecs` = '-604800', `state` = '0', `faction` = '0' where `id` in (190663); +update `gameobject` set `spawntimesecs` = '-604800', `state` = '0' where `id` in (190663); UPDATE `creature` set `curhealth` = '8600' where `id`=28167; UPDATE `creature` set `curhealth` = '8600' where `id`=28169; From 1e3f2c2b7b62bf3245e6cc5d4710d46504697144 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 14 Jan 2010 00:55:33 +0300 Subject: [PATCH 099/405] Small change --- scripts/world/item_scripts.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/world/item_scripts.cpp b/scripts/world/item_scripts.cpp index 74975dae1..24a05df49 100644 --- a/scripts/world/item_scripts.cpp +++ b/scripts/world/item_scripts.cpp @@ -121,7 +121,7 @@ bool ItemUse_item_flying_machine(Player* pPlayer, Item* pItem, const SpellCastTa return false; debug_log("SD2: Player attempt to use item %u, but did not meet riding requirement",itemId); - pPlayer->SendEquipError(EQUIP_ERR_ERR_CANT_EQUIP_SKILL, pItem, NULL); + pPlayer->SendEquipError(EQUIP_ERR_CANT_EQUIP_SKILL, pItem, NULL); return true; } From 12e0e06fec7314ab81b1d10029ec47c0cee57d6c Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Fri, 15 Jan 2010 13:26:19 +0300 Subject: [PATCH 100/405] Added change for ulduar --- addition/720_mangos_ulduar.sql | 30 +++++++++++++++++++ addition/7_mangos_ulduar.sql | 18 +++++------ .../northrend/ulduar/ulduar/boss_algalon.cpp | 3 ++ .../northrend/ulduar/ulduar/boss_ignis.cpp | 4 +-- 4 files changed, 44 insertions(+), 11 deletions(-) create mode 100644 addition/720_mangos_ulduar.sql diff --git a/addition/720_mangos_ulduar.sql b/addition/720_mangos_ulduar.sql new file mode 100644 index 000000000..77552337f --- /dev/null +++ b/addition/720_mangos_ulduar.sql @@ -0,0 +1,30 @@ +-- iron council +#UPDATE creature_template SET scriptname='mob_ulduar_lightning_elemental' WHERE entry=32958; +#UPDATE creature_template SET scriptname='mob_rune_of_power' WHERE entry=33705; +#UPDATE creature_template SET scriptname='mob_rune_of_summoning' WHERE entry=33051; +#UPDATE creature_template SET mechanic_immune_mask=619395071, scriptname='boss_brundir' WHERE entry=32857; +#UPDATE creature_template SET mechanic_immune_mask=617299803, scriptname='boss_molgeim' WHERE entry=32927; +#UPDATE creature_template SET mechanic_immune_mask=617299803, scriptname='boss_steelbreaker' WHERE entry=32867; + +-- kologarn +DELETE FROM creature WHERE id IN (32933, 32934); +INSERT INTO creature (guid, id, map, spawnMask, phaseMask, modelid, equipment_id, position_x, position_y, position_z, orientation, spawntimesecs, spawndist, currentwaypoint, curhealth, curmana, DeathState, MovementType) VALUES (9327991, 232933, 603, 3, 65535, 0, 0, 1799.68, -24.3599, 452.227, 3.14747, 604800, 0, 0, 543855, 0, 0, 0); +INSERT INTO creature (guid, id, map, spawnMask, phaseMask, modelid, equipment_id, position_x, position_y, position_z, orientation, spawntimesecs, spawndist, currentwaypoint, curhealth, curmana, DeathState, MovementType) VALUES (9327992, 32934, 603, 3, 65535, 0, 0, 1799.68, -24.3599, 452.227, 3.14747, 604800, 0, 0, 543855, 0, 0, 0); +UPDATE creature_model_info SET bounding_radius=15, combat_reach=15 WHERE modelid IN (28638, 28822, 28821); +UPDATE creature_template SET mechanic_immune_mask=652951551, scriptname='boss_kologarn_right_arm' WHERE entry=32934; +UPDATE creature_template SET mechanic_immune_mask=652951551, scriptname='boss_kologarn_left_arm' WHERE entry=32933; +UPDATE creature_template SET scriptname='mob_ulduar_rubble' WHERE entry=33768; +UPDATE creature_template SET mechanic_immune_mask=617299803, scriptname='boss_kologarn' WHERE entry=32930; + +-- razorscale +#UPDATE creature_template SET mechanic_immune_mask=617299803, scriptname='boss_razorscale' WHERE entry=33186; +#UPDATE creature_template SET scriptname='mob_devouring_flame_target' WHERE entry=34188; +#UPDATE creature_template SET scriptname='mob_dark_rune_watcher' WHERE entry=33453; +#UPDATE creature_template SET scriptname='mob_dark_rune_sentinel' WHERE entry=33846; +#UPDATE creature_template SET scriptname='mob_dark_rune_guardian' WHERE entry=33388; +#UPDATE creature_template SET scriptname='npc_expedition_commander' WHERE entry=33210; + +-- ignis +#UPDATE creature_template SET mechanic_immune_mask=617299803, scriptname='boss_ignis' WHERE entry=33118; +#UPDATE creature_template SET minlevel=80, maxlevel=80, faction_h=1925, faction_a=1925, scale=0.5, scriptname='mob_scorch_target' WHERE entry=33221; +#UPDATE creature_template SET scriptname='mob_iron_construct' WHERE entry=33121; diff --git a/addition/7_mangos_ulduar.sql b/addition/7_mangos_ulduar.sql index 8ca36d63d..a3ccfe05b 100644 --- a/addition/7_mangos_ulduar.sql +++ b/addition/7_mangos_ulduar.sql @@ -25,12 +25,12 @@ REPLACE INTO `creature_template_addon` (`entry`, `mount`, `bytes1`, `bytes2`, `e REPLACE INTO `locales_creature` values ('99005','Ulduar teleporter','','','','','','','Телепортер Ульдуара',NULL,NULL,NULL,NULL,NULL,NULL,NULL,''); DELETE FROM `creature` WHERE `guid` IN (500000,500001,500002,500003,500004,500005,500006,500007,500008); INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES -(500000, 99005, 571, 1, 1, 0, 0, 9025.76, -1179.12, 1060.18, 4.59386, 3600, 0, 0, 64200, 12300, 0, 0), -(500001, 99005, 603, 1, 1, 0, 0, 1497.84, -23.9801, 421.367, 5.0242, 3600, 0, 0, 64200, 12300, 0, 0), -(500002, 99005, 603, 1, 1, 0, 0, 131.248, -35.3802, 410.204, 0, 3600, 0, 0, 64200, 12300, 0, 0), -(500003, 99005, 603, 1, 1, 0, 0, 553.233, -12.3247, 410.079, 0, 3600, 0, 0, 64200, 12300, 0, 0), -(500004, 99005, 603, 1, 1, 0, 0, 926.292, -11.4635, 418.995, 0, 3600, 0, 0, 64200, 12300, 0, 0), -(500005, 99005, 603, 1, 1, 0, 0, 2086.17, -24.3111, 421.639, 3.11803, 3600, 0, 0, 64200, 12300, 0, 0), -(500006, 99005, 603, 1, 1, 0, 0, -705.304, -92.5391, 429.879, 4.87217, 3600, 0, 0, 64200, 12300, 0, 0), -(500007, 99005, 603, 1, 1, 0, 0, 2516.96, 2568.03, 412.4, 0.672303, 3600, 0, 0, 64200, 12300, 0, 0), -(500008, 99005, 603, 1, 1, 0, 0, 1854.2975, -11.0173, 334.3998, 0, 3600, 0, 0, 64200, 12300, 0, 0); +(500000, 99005, 571, 3, 1, 0, 0, 9025.76, -1179.12, 1060.18, 4.59386, 3600, 0, 0, 64200, 12300, 0, 0), +(500001, 99005, 603, 3, 1, 0, 0, 1497.84, -23.9801, 421.367, 5.0242, 3600, 0, 0, 64200, 12300, 0, 0), +(500002, 99005, 603, 3, 1, 0, 0, 131.248, -35.3802, 410.204, 0, 3600, 0, 0, 64200, 12300, 0, 0), +(500003, 99005, 603, 3, 1, 0, 0, 553.233, -12.3247, 410.079, 0, 3600, 0, 0, 64200, 12300, 0, 0), +(500004, 99005, 603, 3, 1, 0, 0, 926.292, -11.4635, 418.995, 0, 3600, 0, 0, 64200, 12300, 0, 0), +(500005, 99005, 603, 3, 1, 0, 0, 2086.17, -24.3111, 421.639, 3.11803, 3600, 0, 0, 64200, 12300, 0, 0), +(500006, 99005, 603, 3, 1, 0, 0, -705.304, -92.5391, 429.879, 4.87217, 3600, 0, 0, 64200, 12300, 0, 0), +(500007, 99005, 603, 3, 1, 0, 0, 2516.96, 2568.03, 412.4, 0.672303, 3600, 0, 0, 64200, 12300, 0, 0), +(500008, 99005, 603, 3, 1, 0, 0, 1854.2975, -11.0173, 334.3998, 0, 3600, 0, 0, 64200, 12300, 0, 0); diff --git a/scripts/northrend/ulduar/ulduar/boss_algalon.cpp b/scripts/northrend/ulduar/ulduar/boss_algalon.cpp index e74792f8c..55023cac0 100644 --- a/scripts/northrend/ulduar/ulduar/boss_algalon.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_algalon.cpp @@ -60,6 +60,9 @@ struct MANGOS_DLL_DECL boss_algalonAI : public ScriptedAI else EnrageTimer -= diff; DoMeleeAttackIfReady(); + + EnterEvadeIfOutOfCombatArea(diff); + } }; diff --git a/scripts/northrend/ulduar/ulduar/boss_ignis.cpp b/scripts/northrend/ulduar/ulduar/boss_ignis.cpp index bbcb9f368..54ee0cec0 100644 --- a/scripts/northrend/ulduar/ulduar/boss_ignis.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_ignis.cpp @@ -70,14 +70,14 @@ struct MANGOS_DLL_DECL boss_ignisAI : public ScriptedAI } else FlameJetsTimer -= diff; - /*if (SlagPotTimer < diff) + if (SlagPotTimer < diff) { Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); if(target && target->isAlive()) DoCast(target, Regular ? SP_SLAG_POT : H_SP_SLAG_POT); SlagPotTimer = 15000; } - else SlagPotTimer -= diff;*/ + else SlagPotTimer -= diff; if (SummonTimer < diff) { From 8eb01937c4868da11f0b47b3a7a4176f71127f2e Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sat, 16 Jan 2010 16:32:03 +0300 Subject: [PATCH 101/405] Test modify ulduar --- .../ulduar/ulduar/instance_ulduar.cpp | 43 ++++++++++--------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index e5cad7495..1d27cb4cb 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -168,7 +168,7 @@ struct MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance case 194441: mHodirFrozenDoorGUID = pGo->GetGUID(); break; case 194255: mAncientGateGUID = pGo->GetGUID(); break; case GO_KOLOGARN_BRIDGE: m_uiKologarnBridgeGUID = pGo->GetGUID(); - pGo->SetGoState(GO_STATE_ACTIVE); + pGo->SetGoState(GO_STATE_READY); break; } } @@ -184,12 +184,12 @@ struct MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance mLeviathanReached = 1; needSave = true; } - mEncounter[0] = uiData; + if(uiData == DONE) mEncounter[0] = uiData; break; case TYPE_IGNIS: - mEncounter[1] = uiData; break; + if(uiData == DONE) mEncounter[1] = uiData; break; case TYPE_RAZORSCALE: - mEncounter[2] = uiData; break; + if(uiData == DONE) mEncounter[2] = uiData; break; case TYPE_XT002: if(uiData == IN_PROGRESS) { @@ -200,19 +200,20 @@ struct MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance else { OpenDoor(mXT002DoorGUID); - } - mEncounter[3] = uiData; + mEncounter[3] = uiData; + } break; case TYPE_IRON_COUNCIL: - mEncounter[4] = uiData; break; + if(uiData == DONE) mEncounter[4] = uiData; break; case TYPE_KOLOGARN: - if(uiData == DONE) DoRespawnGameObject(mKologarnCacheGUID, DAY); + if(uiData == DONE) { DoRespawnGameObject(mKologarnCacheGUID, DAY); if (GameObject* pBridge = instance->GetGameObject(m_uiKologarnBridgeGUID)) - pBridge->SetGoState(GO_STATE_READY); + pBridge->SetGoState(GO_STATE_ACTIVE); mEncounter[5] = uiData; + } break; case TYPE_AURIAYA: - mEncounter[6] = uiData; break; + if(uiData == DONE) mEncounter[6] = uiData; break; case TYPE_HODIR: if(uiData == DONE) { @@ -223,8 +224,8 @@ struct MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance //TODO: onscreen notification KeepersKilled = mEncounter[7]==DONE && mEncounter[8]==DONE && mEncounter[9]==DONE && mEncounter[10]==DONE; if(KeepersKilled) OpenDoor(mAncientGateGUID); + mEncounter[7] = uiData; } - mEncounter[7] = uiData; break; case TYPE_FREYA: if(uiData == DONE) @@ -234,8 +235,8 @@ struct MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance //TODO: onscreen notification KeepersKilled = mEncounter[7]==DONE && mEncounter[8]==DONE && mEncounter[9]==DONE && mEncounter[10]==DONE; if(KeepersKilled) OpenDoor(mAncientGateGUID);; - } - mEncounter[8] = uiData; + mEncounter[8] = uiData; + } break; case TYPE_THORIM: if(uiData == DONE) @@ -245,8 +246,8 @@ struct MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance //TODO: onscreen notification KeepersKilled = mEncounter[7]==DONE && mEncounter[8]==DONE && mEncounter[9]==DONE && mEncounter[10]==DONE; if(KeepersKilled) OpenDoor(mAncientGateGUID); - } mEncounter[9] = uiData; + } break; case TYPE_MIMIRON: if(uiData == IN_PROGRESS) @@ -261,16 +262,16 @@ struct MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance //TODO: onscreen notification KeepersKilled = mEncounter[7]==DONE && mEncounter[8]==DONE && mEncounter[9]==DONE && mEncounter[10]==DONE; if(KeepersKilled) OpenDoor(mAncientGateGUID); + mEncounter[10] = uiData; } - mEncounter[10] = uiData; break; case TYPE_VEZAX: - mEncounter[11] = uiData; break; + if(uiData == DONE) mEncounter[11] = uiData; break; case TYPE_YOGG_SARON: - mEncounter[12] = uiData; break; + if(uiData == DONE) mEncounter[12] = uiData; break; case TYPE_ALGALON: - if(uiData == DONE) DoRespawnGameObject(mAlgalonCacheGUID, DAY); - mEncounter[13] = uiData; + if(uiData == DONE) {DoRespawnGameObject(mAlgalonCacheGUID, DAY); + mEncounter[13] = uiData;} break; //Hard Modes @@ -284,8 +285,8 @@ struct MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance } break; case TYPE_THORIM_HARD: - if(uiData == DONE) DoRespawnGameObject(mThorimHardCacheGUID, DAY); - mEncounter[9] = uiData; + if(uiData == DONE) { DoRespawnGameObject(mThorimHardCacheGUID, DAY); + mEncounter[9] = uiData;} break; } From 8ee4b2ce9565fb84a3f6574a578a18b04b5bcd22 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sat, 16 Jan 2010 20:57:12 +0300 Subject: [PATCH 102/405] Ulduar keepers change --- .../ulduar/ulduar/instance_ulduar.cpp | 27 +++++++++++-------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 1d27cb4cb..bc2266494 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -222,8 +222,8 @@ struct MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance //Unlock Ancient Gate of the Keepers //TODO: onscreen notification - KeepersKilled = mEncounter[7]==DONE && mEncounter[8]==DONE && mEncounter[9]==DONE && mEncounter[10]==DONE; - if(KeepersKilled) OpenDoor(mAncientGateGUID); + ++KeepersKilled; + if(KeepersKilled > 3) OpenDoor(mAncientGateGUID); mEncounter[7] = uiData; } break; @@ -233,8 +233,8 @@ struct MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance DoRespawnGameObject(mFreyaCacheGUID, DAY); //Unlock Ancient Gate of the Keepers //TODO: onscreen notification - KeepersKilled = mEncounter[7]==DONE && mEncounter[8]==DONE && mEncounter[9]==DONE && mEncounter[10]==DONE; - if(KeepersKilled) OpenDoor(mAncientGateGUID);; + ++KeepersKilled; + if (KeepersKilled > 3 ) OpenDoor(mAncientGateGUID);; mEncounter[8] = uiData; } break; @@ -244,8 +244,8 @@ struct MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance DoRespawnGameObject(mThorimCacheGUID, DAY); //Unlock Ancient Gate of the Keepers //TODO: onscreen notification - KeepersKilled = mEncounter[7]==DONE && mEncounter[8]==DONE && mEncounter[9]==DONE && mEncounter[10]==DONE; - if(KeepersKilled) OpenDoor(mAncientGateGUID); + ++KeepersKilled; + if(KeepersKilled >3 ) OpenDoor(mAncientGateGUID); mEncounter[9] = uiData; } break; @@ -260,8 +260,8 @@ struct MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance DoRespawnGameObject(mMimironCacheGUID, DAY); //Unlock Ancient Gate of the Keepers //TODO: onscreen notification - KeepersKilled = mEncounter[7]==DONE && mEncounter[8]==DONE && mEncounter[9]==DONE && mEncounter[10]==DONE; - if(KeepersKilled) OpenDoor(mAncientGateGUID); + ++KeepersKilled; + if(KeepersKilled > 3) OpenDoor(mAncientGateGUID); mEncounter[10] = uiData; } break; @@ -281,11 +281,15 @@ struct MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance DoRespawnGameObject(mHodirRareCacheGUID, DAY); DoRespawnGameObject(mHodirCacheGUID, DAY); OpenDoor(mHodirFrozenDoorGUID); + ++KeepersKilled; + if(KeepersKilled > 3) OpenDoor(mAncientGateGUID); mEncounter[7] = uiData; } break; case TYPE_THORIM_HARD: if(uiData == DONE) { DoRespawnGameObject(mThorimHardCacheGUID, DAY); + ++KeepersKilled; + if(KeepersKilled > 3) OpenDoor(mAncientGateGUID); mEncounter[9] = uiData;} break; } @@ -300,7 +304,8 @@ struct MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance << mEncounter[6] << " " << mEncounter[7] << " " << mEncounter[8] << " " << mEncounter[9] << " " << mEncounter[10] << " " << mEncounter[11] << " " << mEncounter[12] << " " << mEncounter[13] << " " << mEncounter[14] << " " - << mLeviathanReached << " " << mXT002Reached << " " << mMimironReached; + << mLeviathanReached << " " << mXT002Reached << " " << mMimironReached << " " + << KeepersKilled; strSaveData = saveStream.str(); @@ -337,7 +342,7 @@ struct MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance case TYPE_XT002_TP: return mXT002Reached; case TYPE_MIMIRON_TP: return mMimironReached; - case TYPE_KEEPERS: return KeepersKilled ? 1 : 0; + case TYPE_KEEPERS: return KeepersKilled; } return 0; } @@ -372,7 +377,7 @@ struct MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance >> mEncounter[4] >> mEncounter[5] >> mEncounter[6] >> mEncounter[7] >> mEncounter[8] >> mEncounter[9] >> mEncounter[10] >> mEncounter[11] >> mEncounter[12] >> mEncounter[13] >> mEncounter[14] >> mLeviathanReached - >> mXT002Reached >> mMimironReached; + >> mXT002Reached >> mMimironReached >> KeepersKilled; for(uint8 i = 0; i < ENCOUNTERS; ++i) if (mEncounter[i] == IN_PROGRESS) From b88455a75d8220b8683cfcaa274e25fe55d1ef02 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sun, 17 Jan 2010 16:38:13 +0300 Subject: [PATCH 103/405] TARGETED_MOTION_TYPE change --- base/escort_ai.cpp | 4 ++-- base/follower_ai.cpp | 4 ++-- base/guard_ai.cpp | 2 +- scripts/eastern_kingdoms/zulaman/boss_janalai.cpp | 2 +- scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp | 4 ++-- scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp | 6 +++--- .../northrend/ulduar/halls_of_lightning/boss_volkhan.cpp | 6 +++--- .../auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp | 2 +- .../coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp | 4 ++-- .../serpent_shrine/boss_leotheras_the_blind.cpp | 6 +++--- scripts/outland/gruuls_lair/boss_gruul.cpp | 2 +- 11 files changed, 21 insertions(+), 21 deletions(-) diff --git a/base/escort_ai.cpp b/base/escort_ai.cpp index 886b14233..18c305d86 100644 --- a/base/escort_ai.cpp +++ b/base/escort_ai.cpp @@ -192,7 +192,7 @@ void npc_escortAI::EnterEvadeMode() { debug_log("SD2: EscortAI has left combat and is now returning to CombatStartPosition."); - if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE) + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE) { AddEscortState(STATE_ESCORT_RETURNING); @@ -203,7 +203,7 @@ void npc_escortAI::EnterEvadeMode() } else { - if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE) + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE) m_creature->GetMotionMaster()->MoveTargetedHome(); } diff --git a/base/follower_ai.cpp b/base/follower_ai.cpp index 64b9f40ef..48656019c 100644 --- a/base/follower_ai.cpp +++ b/base/follower_ai.cpp @@ -166,7 +166,7 @@ void FollowerAI::EnterEvadeMode() { debug_log("SD2: FollowerAI left combat, returning to CombatStartPosition."); - if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE) + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE) { float fPosX, fPosY, fPosZ; m_creature->GetCombatStartPosition(fPosX, fPosY, fPosZ); @@ -175,7 +175,7 @@ void FollowerAI::EnterEvadeMode() } else { - if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE) + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE) m_creature->GetMotionMaster()->MoveTargetedHome(); } diff --git a/base/guard_ai.cpp b/base/guard_ai.cpp index 7c409bede..307efa3a6 100644 --- a/base/guard_ai.cpp +++ b/base/guard_ai.cpp @@ -164,7 +164,7 @@ void guardAI::UpdateAI(const uint32 diff) GlobalCooldown = GENERIC_CREATURE_COOLDOWN; } //If no spells available and we arn't moving run to target - else if ((*m_creature).GetMotionMaster()->GetCurrentMovementGeneratorType()!=TARGETED_MOTION_TYPE) + else if ((*m_creature).GetMotionMaster()->GetCurrentMovementGeneratorType()!=CHASE_MOTION_TYPE) { //Cancel our current spell and then mutate new movement generator m_creature->InterruptNonMeleeSpells(false); diff --git a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp index fd6a70bc2..f42354f3b 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp @@ -401,7 +401,7 @@ struct MANGOS_DLL_DECL boss_janalaiAI : public ScriptedAI DoScriptText(SAY_FIRE_BOMBS, m_creature); //first clear movement - if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE) + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE) m_creature->GetMotionMaster()->MovementExpired(); //then teleport self diff --git a/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp b/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp index 506cc0f28..55f901c61 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_malacrass.cpp @@ -476,13 +476,13 @@ struct MANGOS_DLL_DECL mob_alyson_antilleAI : public boss_malacrass_addAI DoCast(pTarget, SPELL_FLASH_HEAL); //if not already chasing, start chase - if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != TARGETED_MOTION_TYPE) + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != CHASE_MOTION_TYPE) m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim(), 20.0f); } else { //if chasing, start follow target instead - if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE) + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE) { m_creature->GetMotionMaster()->MovementExpired(); m_creature->GetMotionMaster()->MoveFollow(pTarget, 20.0f, 0.0f); diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp index 63381cdfc..952dc06fe 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp @@ -185,7 +185,7 @@ struct MANGOS_DLL_DECL boss_ionarAI : public ScriptedAI { if (pSpark->isAlive()) { - if (pSpark->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE) + if (pSpark->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE) pSpark->GetMotionMaster()->MovementExpired(); pSpark->SetSpeed(MOVE_RUN, pSpark->GetCreatureInfo()->speed * 2); @@ -248,7 +248,7 @@ struct MANGOS_DLL_DECL boss_ionarAI : public ScriptedAI m_uiSplit_Timer = 25000; m_bIsSplitPhase = true; - if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != TARGETED_MOTION_TYPE) + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != CHASE_MOTION_TYPE) { if (m_creature->getVictim()) m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); @@ -318,7 +318,7 @@ bool EffectDummyCreature_boss_ionar(Unit* pCaster, uint32 uiSpellId, uint32 uiEf pCreatureTarget->AttackStop(); pCreatureTarget->SetVisibility(VISIBILITY_OFF); - if (pCreatureTarget->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE) + if (pCreatureTarget->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE) pCreatureTarget->GetMotionMaster()->MovementExpired(); //always return true when we are handling this spell and effect diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp index 01d7e403e..d47364989 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp @@ -216,7 +216,7 @@ struct MANGOS_DLL_DECL boss_volkhanAI : public ScriptedAI { if (m_uiPause_Timer < uiDiff) { - if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != TARGETED_MOTION_TYPE) + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != CHASE_MOTION_TYPE) { if (m_creature->getVictim()) m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); @@ -333,7 +333,7 @@ bool EffectDummyCreature_npc_volkhan_anvil(Unit* pCaster, uint32 uiSpellId, uint pCaster->AttackStop(); - if (pCaster->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE) + if (pCaster->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE) pCaster->GetMotionMaster()->MovementExpired(); ((Creature*)pCaster)->GetMap()->CreatureRelocation((Creature*)pCaster, fX, fY, fZ, pCreatureTarget->GetOrientation()); @@ -411,7 +411,7 @@ struct MANGOS_DLL_DECL mob_molten_golemAI : public ScriptedAI m_creature->RemoveAllAuras(); m_creature->AttackStop(); - if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE) + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE) m_creature->GetMotionMaster()->MovementExpired(); uiDamage = m_creature->GetHealth()-1; diff --git a/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp b/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp index 17eb32935..73a31c9a7 100644 --- a/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp +++ b/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp @@ -156,7 +156,7 @@ struct MANGOS_DLL_DECL boss_nexusprince_shaffarAI : public ScriptedAI //expire movement, will prevent from running right back to victim after cast //(but should MoveChase be used again at a certain time or should he not move?) - if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE) + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE) m_creature->GetMotionMaster()->MovementExpired(); DoCast(m_creature,SPELL_BLINK); diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp index 23eac9df7..72ed6c03b 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp @@ -335,7 +335,7 @@ struct MANGOS_DLL_DECL boss_lady_vashjAI : public ScriptedAI { DoScriptText(SAY_PHASE2, m_creature); - if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE) + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE) { //set false, so MoveChase is not triggered in AttackStart SetCombatMovement(false); @@ -478,7 +478,7 @@ struct MANGOS_DLL_DECL boss_lady_vashjAI : public ScriptedAI SetCombatMovement(true); //return to chase top aggro - if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != TARGETED_MOTION_TYPE) + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != CHASE_MOTION_TYPE) m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); m_uiPhase = PHASE_3; diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp index 2615ec131..90bae9479 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp @@ -169,7 +169,7 @@ struct MANGOS_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI { DoScriptText(SAY_SWITCH_TO_DEMON, m_creature); - if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE) + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE) { //set false, so MoveChase is not triggered in AttackStart SetCombatMovement(false); @@ -217,7 +217,7 @@ struct MANGOS_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI //switch to nightelf form m_creature->SetDisplayId(MODEL_NIGHTELF); - if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != TARGETED_MOTION_TYPE) + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != CHASE_MOTION_TYPE) m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); //set true @@ -246,7 +246,7 @@ struct MANGOS_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI //switch to nightelf form m_creature->SetDisplayId(MODEL_NIGHTELF); - if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != TARGETED_MOTION_TYPE) + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != CHASE_MOTION_TYPE) m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); //set true diff --git a/scripts/outland/gruuls_lair/boss_gruul.cpp b/scripts/outland/gruuls_lair/boss_gruul.cpp index cf2fc847c..b98ac12c3 100644 --- a/scripts/outland/gruuls_lair/boss_gruul.cpp +++ b/scripts/outland/gruuls_lair/boss_gruul.cpp @@ -149,7 +149,7 @@ struct MANGOS_DLL_DECL boss_gruulAI : public ScriptedAI m_bPerformingGroundSlam = false; //and correct movement, if not already - if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != TARGETED_MOTION_TYPE) + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != CHASE_MOTION_TYPE) { if (m_creature->getVictim()) m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); From 2956dec9d7500d839962c4b904a8b9c4a176e076 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sun, 17 Jan 2010 17:50:18 +0300 Subject: [PATCH 104/405] Cleanup code from preview merge --- .../azjol-nerub/ahnkahet/boss_volazj.cpp | 9 ++- scripts/northrend/naxxramas/boss_heigan.cpp | 22 ----- scripts/northrend/naxxramas/boss_thaddius.cpp | 46 ----------- scripts/northrend/naxxramas/naxxramas.h | 2 +- scripts/northrend/ulduar/ulduar/def_ulduar.h | 8 +- system/ScriptLoader.cpp | 80 ++----------------- 6 files changed, 19 insertions(+), 148 deletions(-) diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp index 0cc9ac9d5..3252032d3 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp @@ -61,15 +61,20 @@ enum NPC_TWISTED_VISAGE = 30621, //NPC_TWISTED_VISAGE = 20058, //Bloodmaul wolf, for testing - + SAY_AGGRO = -1619033, + SAY_INSANITY = -1619034, + SAY_SLAY_1 = -1619035, + SAY_SLAY_2 = -1619036, + SAY_SLAY_3 = -1619037, + SAY_DEATH_1 = -1619038, SAY_DEATH_2 = -1619039, PHASE_NOSTART = 0, PHASE_FIGHT = 1, PHASE_INSANITY_1 = 2, // Wait five seconds until cast is complete, set unattackable PHASE_INSANITY_2 = 3, - PHASE_INSANITY_3 = 4, + PHASE_INSANITY_3 = 4 }; /*###### ## mob_twisted_visage diff --git a/scripts/northrend/naxxramas/boss_heigan.cpp b/scripts/northrend/naxxramas/boss_heigan.cpp index e9492e638..762d10aef 100644 --- a/scripts/northrend/naxxramas/boss_heigan.cpp +++ b/scripts/northrend/naxxramas/boss_heigan.cpp @@ -22,28 +22,6 @@ SDCategory: Naxxramas EndScriptData */ #include "precompiled.h" -<<<<<<< HEAD:scripts/northrend/naxxramas/boss_heigan.cpp - -#define SAY_AGGRO1 -1533109 -#define SAY_AGGRO2 -1533110 -#define SAY_AGGRO3 -1533111 -#define SAY_SLAY -1533112 -#define SAY_TAUNT1 -1533113 -#define SAY_TAUNT2 -1533114 -#define SAY_TAUNT3 -1533115 -#define SAY_TAUNT4 -1533116 -#define SAY_TAUNT5 -1533117 -#define SAY_DEATH -1533118 - -//Spell used by floor peices to cause damage to players -#define SPELL_ERUPTION 29371 - -//Spells by boss -#define SPELL_WILT 23772 -#define SPELL_FEAVER 29998 - -//Spell by eye stalks -#define SPELL_MIND_FLAY 26143 #include "naxxramas.h" enum diff --git a/scripts/northrend/naxxramas/boss_thaddius.cpp b/scripts/northrend/naxxramas/boss_thaddius.cpp index 1713947ac..3c31172c5 100644 --- a/scripts/northrend/naxxramas/boss_thaddius.cpp +++ b/scripts/northrend/naxxramas/boss_thaddius.cpp @@ -22,52 +22,6 @@ SDCategory: Naxxramas EndScriptData */ #include "precompiled.h" - -//Stalagg -#define SAY_STAL_AGGRO -1533023 -#define SAY_STAL_SLAY -1533024 -#define SAY_STAL_DEATH -1533025 - -#define SPELL_POWERSURGE 28134 - -//Feugen -#define SAY_FEUG_AGGRO -1533026 -#define SAY_FEUG_SLAY -1533027 -#define SAY_FEUG_DEATH -1533028 - -#define SPELL_MANABURN 28135 - -//both -#define SPELL_WARSTOMP 28125 - -//Thaddus -#define SAY_GREET -1533029 -#define SAY_AGGRO1 -1533030 -#define SAY_AGGRO2 -1533031 -#define SAY_AGGRO3 -1533032 -#define SAY_SLAY -1533033 -#define SAY_ELECT -1533034 -#define SAY_DEATH -1533035 -#define SAY_SCREAM1 -1533036 -#define SAY_SCREAM2 -1533037 -#define SAY_SCREAM3 -1533038 -#define SAY_SCREAM4 -1533039 - -#define SPELL_BALL_LIGHTNING 28299 - -#define SPELL_CHARGE_POSITIVE_DMGBUFF 29659 -#define SPELL_CHARGE_POSITIVE_NEARDMG 28059 - -#define SPELL_CHARGE_NEGATIVE_DMGBUFF 29660 -#define SPELL_CHARGE_NEGATIVE_NEARDMG 28084 - -#define SPELL_CHAIN_LIGHTNING 28167 -#define H_SPELL_CHAIN_LIGHTNING 54531 - -#define SPELL_BESERK 26662 - -//generic -#define C_TESLA_COIL 16218 //the coils (emotes "Tesla Coil overloads!") #include "naxxramas.h" enum diff --git a/scripts/northrend/naxxramas/naxxramas.h b/scripts/northrend/naxxramas/naxxramas.h index 7f78db6c6..934ab3761 100644 --- a/scripts/northrend/naxxramas/naxxramas.h +++ b/scripts/northrend/naxxramas/naxxramas.h @@ -93,7 +93,7 @@ enum GO_ARAC_PORTAL = 181575, GO_PLAG_PORTAL = 181577, GO_MILI_PORTAL = 181578, - GO_CONS_PORTAL = 181576 + GO_CONS_PORTAL = 181576, AREATRIGGER_FROSTWYRM = 4120 //not needed here, but AT to be scripted }; diff --git a/scripts/northrend/ulduar/ulduar/def_ulduar.h b/scripts/northrend/ulduar/ulduar/def_ulduar.h index 8ffd4f4a1..ab9a767b0 100644 --- a/scripts/northrend/ulduar/ulduar/def_ulduar.h +++ b/scripts/northrend/ulduar/ulduar/def_ulduar.h @@ -30,13 +30,13 @@ enum -# NPC_STEELBREAKER = 21, -# NPC_MOLGEIM = 22, -# NPC_BRUNDIR = 23, +// NPC_STEELBREAKER = 21, +// NPC_MOLGEIM = 22, +// NPC_BRUNDIR = 23, TYPE_KEEPERS = 24, -# NPC_KOLOGARN = 25, +// NPC_KOLOGARN = 25, NPC_KOLOGARN_RIGHT_ARM = 26, NPC_KOLOGARN_LEFT_ARM = 27, diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index b818bfe5a..21a9201d3 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -8,11 +8,8 @@ extern void AddSC_battleground(); //custom -<<<<<<< HEAD:system/ScriptLoader.cpp extern void AddSC_npc_arena_honor(); extern void AddSC_teleguy(); -======= ->>>>>>> 330:system/ScriptLoader.cpp //examples extern void AddSC_example_creature(); @@ -226,7 +223,6 @@ extern void AddSC_boss_twinemperors(); extern void AddSC_mob_anubisath_sentinel(); extern void AddSC_instance_temple_of_ahnqiraj(); extern void AddSC_zulfarrak(); //zulfarrak -<<<<<<< HEAD:system/ScriptLoader.cpp // culling of stratholme extern void AddSC_boss_lord_epoch(); extern void AddSC_culling_of_stratholme(); @@ -234,8 +230,6 @@ extern void AddSC_boss_malganis(); extern void AddSC_boss_meathook(); extern void AddSC_instance_culling_of_stratholme(); extern void AddSC_boss_salramm(); -======= ->>>>>>> 330:system/ScriptLoader.cpp extern void AddSC_ashenvale(); extern void AddSC_azshara(); @@ -261,14 +255,11 @@ extern void AddSC_ungoro_crater(); extern void AddSC_winterspring(); //northrend -<<<<<<< HEAD:system/ScriptLoader.cpp extern void AddSC_trial_of_the_champion(); //trial_of_the_champion extern void AddSC_boss_argent_challenge(); extern void AddSC_boss_black_knight(); extern void AddSC_boss_grand_champions(); extern void AddSC_instance_trial_of_the_champion(); -======= ->>>>>>> 330:system/ScriptLoader.cpp extern void AddSC_boss_jedoga(); //ahnkahet extern void AddSC_boss_nadox(); extern void AddSC_boss_taldaram(); @@ -278,12 +269,8 @@ extern void AddSC_boss_anubarak(); //azjol-nerub extern void AddSC_boss_hadronox(); extern void AddSC_boss_krikthir(); extern void AddSC_instance_azjol_nerub(); -<<<<<<< HEAD:system/ScriptLoader.cpp extern void AddSC_boss_dred(); //draktharon_keep extern void AddSC_boss_novos(); -======= -extern void AddSC_boss_novos(); //draktharon_keep ->>>>>>> 330:system/ScriptLoader.cpp extern void AddSC_boss_tharonja(); extern void AddSC_boss_trollgore(); extern void AddSC_boss_colossus(); //gundrak @@ -294,14 +281,9 @@ extern void AddSC_instance_gundrak(); extern void AddSC_boss_anubrekhan(); //naxxramas extern void AddSC_boss_four_horsemen(); extern void AddSC_boss_faerlina(); -<<<<<<< HEAD:system/ScriptLoader.cpp extern void AddSC_boss_grobbulus(); extern void AddSC_boss_gluth(); extern void AddSC_boss_gothik(); -======= -extern void AddSC_boss_gluth(); -extern void AddSC_howling_fjord(); ->>>>>>> 330:system/ScriptLoader.cpp extern void AddSC_boss_kelthuzad(); extern void AddSC_boss_loatheb(); extern void AddSC_boss_maexxna(); @@ -317,13 +299,10 @@ extern void AddSC_boss_telestra(); extern void AddSC_instance_nexus(); extern void AddSC_boss_sartharion(); //obsidian_sanctum extern void AddSC_instance_obsidian_sanctum(); -<<<<<<< HEAD:system/ScriptLoader.cpp extern void AddSC_instance_vault_of_archavon(); //vault_of_archavon extern void AddSC_boss_koralon(); extern void AddSC_boss_emalon(); extern void AddSC_boss_archavon(); -======= ->>>>>>> 330:system/ScriptLoader.cpp extern void AddSC_boss_bjarngrim(); //Ulduar, halls_of_lightning extern void AddSC_boss_ionar(); extern void AddSC_boss_loken(); @@ -331,7 +310,6 @@ extern void AddSC_boss_volkhan(); extern void AddSC_instance_halls_of_lightning(); extern void AddSC_boss_maiden_of_grief(); //Ulduar, halls_of_stone extern void AddSC_boss_sjonnir(); -<<<<<<< HEAD:system/ScriptLoader.cpp extern void AddSC_boss_krystallus(); extern void AddSC_halls_of_stone(); extern void AddSC_instance_halls_of_stone(); @@ -352,11 +330,7 @@ extern void AddSC_boss_yogg_saron(); extern void AddSC_boss_algalon(); extern void AddSC_ulduar_teleport(); extern void AddSC_instance_ulduar(); -======= -extern void AddSC_halls_of_stone(); -extern void AddSC_instance_halls_of_stone(); -extern void AddSC_instance_ulduar(); //ulduar ->>>>>>> 330:system/ScriptLoader.cpp + extern void AddSC_boss_ingvar(); //utgarde_keep extern void AddSC_boss_keleseth(); extern void AddSC_boss_skarvald_and_dalronn(); @@ -372,16 +346,14 @@ extern void AddSC_borean_tundra(); extern void AddSC_dalaran(); extern void AddSC_dragonblight(); extern void AddSC_grizzly_hills(); -<<<<<<< HEAD:system/ScriptLoader.cpp + extern void AddSC_howling_fjord(); -======= ->>>>>>> 330:system/ScriptLoader.cpp + extern void AddSC_icecrown(); extern void AddSC_sholazar_basin(); extern void AddSC_storm_peaks(); extern void AddSC_zuldrak(); -<<<<<<< HEAD:system/ScriptLoader.cpp extern void AddSC_instance_violet_hold(); extern void AddSC_violet_hold(); extern void AddSC_boss_cyanigosa(); @@ -392,8 +364,6 @@ extern void AddSC_boss_ichoron(); extern void AddSC_boss_zuramat(); extern void AddSC_boss_lavanthor(); -======= ->>>>>>> 330:system/ScriptLoader.cpp //outland extern void AddSC_boss_exarch_maladaar(); //auchindoun, auchenai_crypts extern void AddSC_boss_nexusprince_shaffar(); //auchindoun, mana_tombs @@ -478,11 +448,8 @@ void AddScripts() AddSC_battleground(); //custom -<<<<<<< HEAD:system/ScriptLoader.cpp AddSC_npc_arena_honor(); - AddSC_teleguy(); -======= ->>>>>>> 330:system/ScriptLoader.cpp + AddSC_teleguy(); //examples AddSC_example_creature(); @@ -721,16 +688,13 @@ void AddScripts() AddSC_winterspring(); //northrend -<<<<<<< HEAD:system/ScriptLoader.cpp AddSC_trial_of_the_champion(); //trial_of_the_champion AddSC_boss_argent_challenge(); AddSC_boss_black_knight(); AddSC_boss_grand_champions(); AddSC_instance_trial_of_the_champion(); - AddSC_boss_jedoga(); //ahnkahet -======= + AddSC_boss_jedoga(); //ahnkahet ->>>>>>> 330:system/ScriptLoader.cpp AddSC_boss_nadox(); AddSC_boss_taldaram(); AddSC_boss_volazj(); @@ -740,10 +704,7 @@ void AddScripts() AddSC_boss_krikthir(); AddSC_instance_azjol_nerub(); AddSC_boss_novos(); //draktharon_keep -<<<<<<< HEAD:system/ScriptLoader.cpp AddSC_boss_dred(); -======= ->>>>>>> 330:system/ScriptLoader.cpp AddSC_boss_tharonja(); AddSC_boss_trollgore(); AddSC_boss_colossus(); //gundrak @@ -755,19 +716,12 @@ void AddScripts() AddSC_boss_four_horsemen(); AddSC_boss_faerlina(); AddSC_boss_gluth(); -<<<<<<< HEAD:system/ScriptLoader.cpp AddSC_boss_gothik(); -======= - AddSC_howling_fjord(); ->>>>>>> 330:system/ScriptLoader.cpp AddSC_boss_kelthuzad(); AddSC_boss_loatheb(); AddSC_boss_maexxna(); AddSC_boss_noth(); -<<<<<<< HEAD:system/ScriptLoader.cpp AddSC_boss_grobbulus(); -======= ->>>>>>> 330:system/ScriptLoader.cpp AddSC_boss_patchwerk(); AddSC_boss_razuvious(); AddSC_boss_sapphiron(); @@ -779,13 +733,10 @@ void AddScripts() AddSC_instance_nexus(); AddSC_boss_sartharion(); //obsidian_sanctum AddSC_instance_obsidian_sanctum(); -<<<<<<< HEAD:system/ScriptLoader.cpp AddSC_instance_vault_of_archavon(); //vault_of_archavon AddSC_boss_koralon(); AddSC_boss_emalon(); AddSC_boss_archavon(); -======= ->>>>>>> 330:system/ScriptLoader.cpp AddSC_boss_bjarngrim(); //Ulduar, halls_of_lightning AddSC_boss_ionar(); AddSC_boss_loken(); @@ -793,7 +744,7 @@ void AddScripts() AddSC_instance_halls_of_lightning(); AddSC_boss_maiden_of_grief(); //Ulduar, halls_of_stone AddSC_boss_sjonnir(); -<<<<<<< HEAD:system/ScriptLoader.cpp + AddSC_boss_krystallus(); AddSC_halls_of_stone(); AddSC_instance_halls_of_stone(); @@ -814,11 +765,7 @@ void AddScripts() AddSC_boss_algalon(); AddSC_ulduar_teleport(); AddSC_instance_ulduar(); -======= - AddSC_halls_of_stone(); - AddSC_instance_halls_of_stone(); - AddSC_instance_ulduar(); //ulduar ->>>>>>> 330:system/ScriptLoader.cpp + AddSC_boss_ingvar(); //utgarde_keep AddSC_boss_keleseth(); AddSC_boss_skarvald_and_dalronn(); @@ -834,16 +781,12 @@ void AddScripts() AddSC_dalaran(); AddSC_dragonblight(); AddSC_grizzly_hills(); -<<<<<<< HEAD:system/ScriptLoader.cpp AddSC_howling_fjord(); -======= ->>>>>>> 330:system/ScriptLoader.cpp AddSC_icecrown(); AddSC_sholazar_basin(); AddSC_storm_peaks(); AddSC_zuldrak(); -<<<<<<< HEAD:system/ScriptLoader.cpp AddSC_instance_violet_hold(); AddSC_boss_cyanigosa(); AddSC_boss_moragg(); @@ -854,8 +797,6 @@ void AddScripts() AddSC_boss_lavanthor(); AddSC_violet_hold(); -======= ->>>>>>> 330:system/ScriptLoader.cpp //outland AddSC_boss_exarch_maladaar(); //auchindoun, auchenai_crypts AddSC_boss_nexusprince_shaffar(); //auchindoun, mana_tombs @@ -922,7 +863,6 @@ void AddScripts() AddSC_boss_nethermancer_sepethrea(); AddSC_boss_pathaleon_the_calculator(); AddSC_instance_mechanar(); -<<<<<<< HEAD:system/ScriptLoader.cpp //culling of stratholme AddSC_boss_lord_epoch(); AddSC_culling_of_stratholme(); @@ -930,8 +870,6 @@ void AddScripts() AddSC_boss_meathook(); AddSC_instance_culling_of_stratholme(); AddSC_boss_salramm(); -======= ->>>>>>> 330:system/ScriptLoader.cpp AddSC_blades_edge_mountains(); AddSC_boss_doomlordkazzak(); @@ -943,8 +881,4 @@ void AddScripts() AddSC_shattrath_city(); AddSC_terokkar_forest(); AddSC_zangarmarsh(); -<<<<<<< HEAD:system/ScriptLoader.cpp -} -======= } ->>>>>>> 330:system/ScriptLoader.cpp From 2de417f48d2751e7e89fe380a4cb996eb2bd11db Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 20 Jan 2010 18:33:19 +0300 Subject: [PATCH 105/405] Violet hold redesign --- scripts/northrend/violet_hold/boss_erekem.cpp | 4 +- .../northrend/violet_hold/boss_ichoron.cpp | 15 ++-- .../northrend/violet_hold/boss_lavanthor.cpp | 7 +- scripts/northrend/violet_hold/boss_moragg.cpp | 58 ++++++++++++++- scripts/northrend/violet_hold/boss_xevozz.cpp | 7 +- .../northrend/violet_hold/boss_zuramat.cpp | 2 +- .../northrend/violet_hold/def_violet_hold.h | 20 +++++ .../violet_hold/instance_violet_hold.cpp | 52 ++++++++----- scripts/northrend/violet_hold/violet_hold.cpp | 74 ++++++++++--------- 9 files changed, 174 insertions(+), 65 deletions(-) diff --git a/scripts/northrend/violet_hold/boss_erekem.cpp b/scripts/northrend/violet_hold/boss_erekem.cpp index d880444d2..715fa5832 100644 --- a/scripts/northrend/violet_hold/boss_erekem.cpp +++ b/scripts/northrend/violet_hold/boss_erekem.cpp @@ -114,7 +114,7 @@ struct MANGOS_DLL_DECL boss_erekemAI : public ScriptedAI if (!m_pInstance) return; - if (m_pInstance->GetData(TYPE_EREKEM) != SPECIAL) + if (m_pInstance->GetData(TYPE_EREKEM) != SPECIAL && m_pInstance->GetData(TYPE_EREKEM) != IN_PROGRESS) return; if (!pWho || pWho == m_creature) @@ -249,7 +249,7 @@ struct MANGOS_DLL_DECL mob_erekem_guardAI : public ScriptedAI if (!m_pInstance) return; - if (m_pInstance->GetData(TYPE_EREKEM) != SPECIAL) + if (m_pInstance->GetData(TYPE_EREKEM) != SPECIAL && m_pInstance->GetData(TYPE_EREKEM) != IN_PROGRESS) return; m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); diff --git a/scripts/northrend/violet_hold/boss_ichoron.cpp b/scripts/northrend/violet_hold/boss_ichoron.cpp index 1e29b9e0e..b957bcee6 100644 --- a/scripts/northrend/violet_hold/boss_ichoron.cpp +++ b/scripts/northrend/violet_hold/boss_ichoron.cpp @@ -26,12 +26,6 @@ EndScriptData */ #include "def_violet_hold.h" -struct Locations -{ - float x, y, z; - uint32 id; -}; - static Locations PortalLoc[]= { {1857.125, 763.295, 38.654}, @@ -118,12 +112,14 @@ struct MANGOS_DLL_DECL boss_ichoronAI : public ScriptedAI if (!m_pInstance) return; - if (m_pInstance->GetData(TYPE_ICHORON) != SPECIAL) + if (m_pInstance->GetData(TYPE_ICHORON) != SPECIAL && m_pInstance->GetData(TYPE_ICHORON) != IN_PROGRESS) return; + if (!pWho || pWho == m_creature) return; + if (m_creature->Attack(pWho, true)) { DoCast(m_creature, SPELL_PROTECTIVE_BUBBLE); @@ -173,6 +169,11 @@ struct MANGOS_DLL_DECL boss_ichoronAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { +// if (m_pInstance->GetData(TYPE_ICHORON) == SPECIAL) { +// if (Unit* pTemp = SelectUnit(SELECT_TARGET_RANDOM,0)) +// m_creature->GetMotionMaster()->MoveChase(pTemp); +// }; + //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/violet_hold/boss_lavanthor.cpp b/scripts/northrend/violet_hold/boss_lavanthor.cpp index adc4192f5..f957a8857 100644 --- a/scripts/northrend/violet_hold/boss_lavanthor.cpp +++ b/scripts/northrend/violet_hold/boss_lavanthor.cpp @@ -76,7 +76,7 @@ struct MANGOS_DLL_DECL boss_lavanthorAI : public ScriptedAI if (!m_pInstance) return; - if (m_pInstance->GetData(TYPE_LAVANTHOR) != SPECIAL) + if (m_pInstance->GetData(TYPE_LAVANTHOR) != SPECIAL && m_pInstance->GetData(TYPE_LAVANTHOR) != IN_PROGRESS) return; if (!pWho || pWho == m_creature) @@ -93,6 +93,11 @@ struct MANGOS_DLL_DECL boss_lavanthorAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { +// if (m_pInstance->GetData(TYPE_LAVANTHOR) == SPECIAL) { +// if (Unit* pTemp = SelectUnit(SELECT_TARGET_RANDOM,0)) +// m_creature->GetMotionMaster()->MoveChase(pTemp); +// }; + //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/violet_hold/boss_moragg.cpp b/scripts/northrend/violet_hold/boss_moragg.cpp index d6313a6a8..6cd120618 100644 --- a/scripts/northrend/violet_hold/boss_moragg.cpp +++ b/scripts/northrend/violet_hold/boss_moragg.cpp @@ -25,6 +25,16 @@ EndScriptData */ #include "precompiled.h" #include "def_violet_hold.h" +static Locations BossWP[]= +{ + //From Morag + {1887.500, 763.096, 47.666}, // 12 + {1880.837, 775.769, 38.796}, // 13 + {1861.016, 789.717, 38.908}, // 14 + {1856.217, 796.705, 44.008}, // 15 + {1827.960, 804.208, 44.364}, // 16 +}; + enum { SPELL_CORROSICE_SALIVA = 54527, @@ -47,6 +57,12 @@ struct MANGOS_DLL_DECL boss_moraggAI : public ScriptedAI uint32 m_uiCorrosiveSaliva_Timer; uint32 m_uiOpticLink_Timer; uint32 m_uiRay_Timer; + + uint32 WalkTimer; + bool IsWalking; + bool MovementStarted; + std::list WayPointList; + std::list::iterator WayPoint; void Reset() { @@ -69,13 +85,51 @@ struct MANGOS_DLL_DECL boss_moraggAI : public ScriptedAI m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } +/* + void StartMovement() + { + if(!WayPointList.empty() || MovementStarted) + return; + uint8 start = 0; + uint8 end = 4; + uint8 wpId = 0; + + for(uint8 i = start; i <= end; ++i){ + error_log("AddWP: %u", i); + AddWaypoint(wpId, BossWP[i].x, BossWP[i].y, BossWP[i].z); + wpId++; + } + + WayPoint = WayPointList.begin(); + m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + IsWalking = true; + MovementStarted = true; + } + + void AddWaypoint(uint32 id, float x, float y, float z) + { + WayPoints DWP(id, x, y, z); + WayPointList.push_back(DWP); + } + + void MovementInform(uint32 uiType, uint32 uiPointId) + { + if(uiType != POINT_MOTION_TYPE ) + return; + if(WayPoint->id != uiPointId) + return; + ++WayPoint; + WalkTimer = 200; + } + +*/ void AttackStart(Unit* pWho) { if (!m_pInstance) return; - if (m_pInstance->GetData(TYPE_MORAGG) != SPECIAL) + if (m_pInstance->GetData(TYPE_MORAGG) != SPECIAL && m_pInstance->GetData(TYPE_MORAGG) != IN_PROGRESS) return; if (!pWho || pWho == m_creature) @@ -92,6 +146,8 @@ struct MANGOS_DLL_DECL boss_moraggAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { +// if (m_pInstance->GetData(TYPE_MORAGG) == SPECIAL) StartMovement(); + //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/violet_hold/boss_xevozz.cpp b/scripts/northrend/violet_hold/boss_xevozz.cpp index ec10018cb..d552dd070 100644 --- a/scripts/northrend/violet_hold/boss_xevozz.cpp +++ b/scripts/northrend/violet_hold/boss_xevozz.cpp @@ -99,7 +99,7 @@ struct MANGOS_DLL_DECL boss_xevozzAI : public ScriptedAI if (!m_pInstance) return; - if (m_pInstance->GetData(TYPE_XEVOZZ) != SPECIAL) + if (m_pInstance->GetData(TYPE_XEVOZZ) != SPECIAL && m_pInstance->GetData(TYPE_XEVOZZ) != IN_PROGRESS) return; if (!pWho || pWho == m_creature) @@ -138,6 +138,11 @@ struct MANGOS_DLL_DECL boss_xevozzAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { +// if (m_pInstance->GetData(TYPE_XEVOZZ) == SPECIAL) { +// if (Unit* pTemp = SelectUnit(SELECT_TARGET_RANDOM,0)) +// m_creature->GetMotionMaster()->MoveChase(pTemp); +// }; + //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/violet_hold/boss_zuramat.cpp b/scripts/northrend/violet_hold/boss_zuramat.cpp index ea7b89d3f..e09399b29 100644 --- a/scripts/northrend/violet_hold/boss_zuramat.cpp +++ b/scripts/northrend/violet_hold/boss_zuramat.cpp @@ -95,7 +95,7 @@ struct MANGOS_DLL_DECL boss_zuramatAI : public ScriptedAI if (!m_pInstance) return; - if (m_pInstance->GetData(TYPE_ZURAMAT) != SPECIAL) + if (m_pInstance->GetData(TYPE_ZURAMAT) != SPECIAL && m_pInstance->GetData(TYPE_ZURAMAT) != IN_PROGRESS) return; if (!pWho || pWho == m_creature) diff --git a/scripts/northrend/violet_hold/def_violet_hold.h b/scripts/northrend/violet_hold/def_violet_hold.h index 3b16835b6..b3ebec626 100644 --- a/scripts/northrend/violet_hold/def_violet_hold.h +++ b/scripts/northrend/violet_hold/def_violet_hold.h @@ -26,6 +26,9 @@ enum TYPE_DOOR = 21, TYPE_PORTAL_TIME = 22, + TYPE_DISRUPTIONS = 101, + TYPE_LASTBOSS_ID = 102, + DATA_EREKEM = 23, DATA_MORAGG = 24, DATA_ICHORON = 25, @@ -85,4 +88,21 @@ enum SPELL_CORRUPT = 58040 }; +struct Locations +{ + float x, y, z; + uint32 id; +}; +struct WayPoints +{ + WayPoints(uint32 _id, float _x, float _y, float _z) + { + id = _id; + x = _x; + y = _y; + z = _z; + } + uint32 id; + float x, y, z; +}; #endif diff --git a/scripts/northrend/violet_hold/instance_violet_hold.cpp b/scripts/northrend/violet_hold/instance_violet_hold.cpp index 27affc701..c6ba909b2 100644 --- a/scripts/northrend/violet_hold/instance_violet_hold.cpp +++ b/scripts/northrend/violet_hold/instance_violet_hold.cpp @@ -36,12 +36,6 @@ EndScriptData */ */ //inline uint32 RandRiftBoss() { return ((rand()%2) ? NPC_GUARDIAN : NPC_KEEPER); } -struct Locations -{ - float x, y, z; - uint32 id; -}; - static Locations PortalLoc[]= { {1888.271, 810.781, 38.441}, // 0 center @@ -66,8 +60,10 @@ struct MANGOS_DLL_DECL instance_violet_hold : public ScriptedInstance bool bIsInBoss; uint8 m_uiLastBossID; + uint8 m_uiLastBossIDConst; uint8 m_uiRiftPortalCount; uint32 m_uiShieldPercent; + uint32 m_uiDisruptions; int8 m_uiPortalTime; uint64 m_uiSinclariGUID; @@ -96,6 +92,7 @@ struct MANGOS_DLL_DECL instance_violet_hold : public ScriptedInstance m_uiSinclariGUID = 0; m_uiNPCSealDoorGUID = 0; + m_uiLastBossIDConst = 0; m_uiErekemGUID = 0; m_uiMoraggGUID = 0; @@ -103,6 +100,8 @@ struct MANGOS_DLL_DECL instance_violet_hold : public ScriptedInstance m_uiXevozzGUID = 0; m_uiLavanthorGUID = 0; m_uiZuramatGUID = 0; + + m_uiDisruptions = 0; m_uiSealDoorGUID = 0; m_uiErekemDoorGUID = 0; @@ -228,32 +227,35 @@ struct MANGOS_DLL_DECL instance_violet_hold : public ScriptedInstance break; case TYPE_EREKEM: m_auiEncounter[2] = uiData; + if (uiData == IN_PROGRESS) bIsInBoss = true; break; case TYPE_MORAGG: m_auiEncounter[3] = uiData; + if (uiData == IN_PROGRESS) bIsInBoss = true; break; case TYPE_ICHORON: m_auiEncounter[4] = uiData; + if (uiData == IN_PROGRESS) bIsInBoss = true; break; case TYPE_XEVOZZ: m_auiEncounter[5] = uiData; + if (uiData == IN_PROGRESS) bIsInBoss = true; break; case TYPE_LAVANTHOR: m_auiEncounter[6] = uiData; + if (uiData == IN_PROGRESS) bIsInBoss = true; break; case TYPE_ZURAMAT: m_auiEncounter[7] = uiData; + if (uiData == IN_PROGRESS) bIsInBoss = true; break; case TYPE_RIFT: if (uiData == SPECIAL){ ++m_uiRiftPortalCount; DoUpdateWorldState(WORLD_STATE_VH_PORTALS, m_uiRiftPortalCount); } - else if (uiData == IN_PROGRESS) - bIsInBoss = true; - else + else if (uiData == FAIL) DoUseDoorOrButton(m_uiSealDoorGUID); - m_auiEncounter[1] = uiData; break; case TYPE_DOOR: @@ -266,6 +268,14 @@ struct MANGOS_DLL_DECL instance_violet_hold : public ScriptedInstance m_auiEncounter[0] = FAIL; } break; + case TYPE_DISRUPTIONS: + m_uiDisruptions = uiData; + DoUpdateWorldState(WORLD_STATE_VH_PRISON, 100-m_uiDisruptions*5); + break; + case TYPE_LASTBOSS_ID: + m_uiLastBossIDConst = uiData; + break; + } if (uiData == DONE) bIsInBoss = false; @@ -291,23 +301,29 @@ struct MANGOS_DLL_DECL instance_violet_hold : public ScriptedInstance return m_auiEncounter[7]; case TYPE_RIFT: return m_uiRiftPortalCount; + case TYPE_LASTBOSS_ID: + return m_uiLastBossIDConst; case TYPE_LASTBOSS: { - if (!m_uiLastBossID) - m_uiLastBossID = urand(1, 5); + if (m_uiLastBossID == 0) + m_uiLastBossID = urand(2, 7); +// m_uiLastBossID = 3; else { - uint8 uiBossID = urand(1, 5); - if (uiBossID == m_uiLastBossID) - --m_uiLastBossID; - else - m_uiLastBossID = uiBossID; + m_uiLastBossID = urand(2, 7); + while ( m_auiEncounter[m_uiLastBossID] == DONE + || m_auiEncounter[m_uiLastBossID] == IN_PROGRESS + || m_auiEncounter[m_uiLastBossID] == SPECIAL ) + { + m_uiLastBossID = urand(2, 7); + } } - return m_uiLastBossID; } case DATA_BOSSTIME: return bIsInBoss; + case TYPE_DISRUPTIONS: + return m_uiDisruptions; } return 0; } diff --git a/scripts/northrend/violet_hold/violet_hold.cpp b/scripts/northrend/violet_hold/violet_hold.cpp index df1a023f4..cc26662e5 100644 --- a/scripts/northrend/violet_hold/violet_hold.cpp +++ b/scripts/northrend/violet_hold/violet_hold.cpp @@ -25,24 +25,6 @@ EndScriptData */ #include "precompiled.h" #include "def_violet_hold.h" -struct Locations -{ - float x, y, z; - uint32 id; -}; -struct WayPoints -{ - WayPoints(uint32 _id, float _x, float _y, float _z) - { - id = _id; - x = _x; - y = _y; - z = _z; - } - uint32 id; - float x, y, z; -}; - static Locations PortalLoc[]= { {1888.271, 810.781, 38.441}, // 0 center @@ -55,12 +37,14 @@ static Locations PortalLoc[]= }; static Locations BossLoc[]= { - {1857.125, 763.295, 38.654}, // Lavanthor - {1925.480, 849.981, 47.174}, // Zuramat - {1892.737, 744.589, 47.666}, // Moragg + {0,0,0}, + {0,0,0}, {1876.100, 857.079, 43.333}, // Erekem + {1892.737, 744.589, 47.666}, // Moragg {1908.863, 785.647, 37.435}, // Ichoron {1905.364, 840.607, 38.670}, // Xevozz + {1857.125, 763.295, 38.654}, // Lavanthor + {1925.480, 849.981, 47.174}, // Zuramat }; static Locations DragonsWP[]= { @@ -565,6 +549,7 @@ struct MANGOS_DLL_DECL npc_sinclariAI : public ScriptedAI ScriptedInstance *m_pInstance; uint8 m_uiRiftPortalCount; + uint8 m_bIsRegular; uint32 m_uiBossCheck_Timer; uint32 m_uiPortalCheck_Timer; @@ -574,6 +559,7 @@ struct MANGOS_DLL_DECL npc_sinclariAI : public ScriptedAI m_uiNextPortal_Timer = 0; m_uiBossCheck_Timer = 0; m_uiPortalCheck_Timer = 1000; + m_bIsRegular = m_creature->GetMap()->IsRegularDifficulty(); } void SetEvent() @@ -582,7 +568,7 @@ struct MANGOS_DLL_DECL npc_sinclariAI : public ScriptedAI m_uiNextPortal_Timer = 5000; m_creature->GetMotionMaster()->MovePoint(0, 1815.571, 800.112, 44.364); if (m_pInstance){ - m_pInstance->SetData(TYPE_EVENT, IN_PROGRESS); + m_pInstance->SetData(TYPE_EVENT, IN_PROGRESS); m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(DATA_SEAL_DOOR)); } } @@ -627,11 +613,17 @@ struct MANGOS_DLL_DECL npc_sinclariAI : public ScriptedAI ++m_uiRiftPortalCount; if (m_pInstance) { - m_pInstance->DoUpdateWorldState(WORLD_STATE_VH, m_uiRiftPortalCount); + if ( m_uiRiftPortalCount < 19) m_pInstance->DoUpdateWorldState(WORLD_STATE_VH, m_uiRiftPortalCount); m_pInstance->SetData(TYPE_RIFT, SPECIAL); } - if (m_uiRiftPortalCount != 6 && m_uiRiftPortalCount != 12 && m_uiRiftPortalCount != 18) + if ( m_uiRiftPortalCount != 3 + && m_uiRiftPortalCount != 6 + && m_uiRiftPortalCount != 9 + && m_uiRiftPortalCount != 12 + && m_uiRiftPortalCount != 15 + && m_uiRiftPortalCount != 18 + && m_uiRiftPortalCount != 19 ) { DoSpawnPortal(); if (m_uiRiftPortalCount < 12) @@ -639,7 +631,12 @@ struct MANGOS_DLL_DECL npc_sinclariAI : public ScriptedAI else m_uiNextPortal_Timer = 90000; } - else if (m_uiRiftPortalCount == 6 || m_uiRiftPortalCount == 12) + else if ( m_uiRiftPortalCount == 3 + || m_uiRiftPortalCount == 6 + || m_uiRiftPortalCount == 9 + || m_uiRiftPortalCount == 12 + || m_uiRiftPortalCount == 15 + || m_uiRiftPortalCount == 18 ) { if (Creature* pTemp = m_creature->SummonCreature(NPC_PORTAL, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z, 0, TEMPSUMMON_TIMED_DESPAWN, 1500)) { @@ -648,14 +645,16 @@ struct MANGOS_DLL_DECL npc_sinclariAI : public ScriptedAI pSummoned->AddThreat(pTemp); pTemp->CastSpell(pSummoned, SPELL_PORTAL_CHANNEL, false); } + m_pInstance->DoUpdateWorldState(WORLD_STATE_VH, m_uiRiftPortalCount); m_pInstance->SetData(TYPE_RIFT, IN_PROGRESS); m_uiBossCheck_Timer = 1000; - m_uiNextPortal_Timer = 0; + m_uiNextPortal_Timer = m_bIsRegular ? 180000 : 120000; } - else if (m_uiRiftPortalCount == 18) + else if (m_uiRiftPortalCount == 19) { m_creature->SummonCreature(NPC_CYANIGOSA, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 180000); m_pInstance->SetData(TYPE_RIFT, IN_PROGRESS); + m_pInstance->SetData(TYPE_DISRUPTIONS, 20); m_uiNextPortal_Timer = 0; } } @@ -785,8 +784,10 @@ struct MANGOS_DLL_DECL npc_azure_saboteurAI : public ScriptedAI uint32 m_uiDisruption_Timer; uint32 m_uiDisruptionCounter; + uint32 m_uiDisruptionsCount; uint8 m_uiBossID; + uint8 m_bIsRegular; uint32 m_uiBossType; uint64 m_uiBossGUID; uint64 m_uiDoorGUID; @@ -803,30 +804,32 @@ struct MANGOS_DLL_DECL npc_azure_saboteurAI : public ScriptedAI m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); m_uiDisruptionCounter = 0; + m_uiDisruptionsCount = 0; m_uiDisruption_Timer = 1000; +// m_bIsRegular = m_creature->GetMap()->IsRegularDifficulty(); if (m_pInstance) { m_uiBossID = m_pInstance->GetData(TYPE_LASTBOSS); - + m_uiDisruptionsCount = m_pInstance->GetData(TYPE_DISRUPTIONS); switch (m_uiBossID) { - case 0: // Lavanthor + case 6: // Lavanthor m_uiBossType = TYPE_LAVANTHOR; m_uiBossGUID = m_pInstance->GetData64(DATA_LAVANTHOR); m_uiDoorGUID = m_pInstance->GetData64(DATA_LAVANTHOR_DOOR); break; - case 1: // Zuramat + case 7: // Zuramat m_uiBossType = TYPE_ZURAMAT; m_uiBossGUID = m_pInstance->GetData64(DATA_ZURAMAT); m_uiDoorGUID = m_pInstance->GetData64(DATA_ZURAMAT_DOOR); break; - case 2: // Moragg + case 3: // Moragg m_uiBossType = TYPE_MORAGG; m_uiBossGUID = m_pInstance->GetData64(DATA_MORAGG); m_uiDoorGUID = m_pInstance->GetData64(DATA_MORAGG_DOOR); break; - case 3: // Erekem + case 2: // Erekem m_uiBossType = TYPE_EREKEM; m_uiBossGUID = m_pInstance->GetData64(DATA_EREKEM); m_uiDoorGUID = m_pInstance->GetData64(DATA_EREKEM_DOOR); @@ -842,6 +845,7 @@ struct MANGOS_DLL_DECL npc_azure_saboteurAI : public ScriptedAI m_uiDoorGUID = m_pInstance->GetData64(DATA_XEVOZZ_DOOR); break; } + m_pInstance->SetData(TYPE_LASTBOSS_ID, m_uiBossType); m_creature->GetMotionMaster()->MovePoint(0, BossLoc[m_uiBossID].x, BossLoc[m_uiBossID].y, BossLoc[m_uiBossID].z); } } @@ -864,12 +868,14 @@ struct MANGOS_DLL_DECL npc_azure_saboteurAI : public ScriptedAI if (m_bIsActiving) if (m_uiDisruption_Timer < uiDiff) { - if (m_uiDisruptionCounter < 3) + if (m_uiDisruptionCounter < 3) { DoCast(m_creature, SPELL_SHIELD_DISRUPTION); + ++m_uiDisruptionsCount; + m_pInstance->SetData(TYPE_DISRUPTIONS, m_uiDisruptionsCount);} else if (m_uiDisruptionCounter == 3) { m_pInstance->DoUseDoorOrButton(m_uiDoorGUID); - m_pInstance->SetData(m_uiBossType, SPECIAL); + m_pInstance->SetData(m_pInstance->GetData(TYPE_LASTBOSS_ID), SPECIAL); } else m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); From 67a2d437a88c586159c91236de28e49bf0798f0d Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 20 Jan 2010 20:47:31 +0300 Subject: [PATCH 106/405] Remove setspeed() from Archavon script --- scripts/northrend/vault_of_archavon/boss_archavon.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/northrend/vault_of_archavon/boss_archavon.cpp b/scripts/northrend/vault_of_archavon/boss_archavon.cpp index 99ad8944a..a02d9242e 100644 --- a/scripts/northrend/vault_of_archavon/boss_archavon.cpp +++ b/scripts/northrend/vault_of_archavon/boss_archavon.cpp @@ -73,7 +73,7 @@ struct MANGOS_DLL_DECL boss_archavonAI : public ScriptedAI void Reset() { m_uiEvadeCheckCooldown = 2000; - m_creature->SetSpeed(MOVE_RUN, m_fDefaultMoveSpeed); +// m_creature->SetSpeed(MOVE_RUN, m_fDefaultMoveSpeed); m_uiBerserkTimer = 300000; m_uiRockShardsTimer = 15000; m_bRockShardsInProgress = false; @@ -155,7 +155,7 @@ struct MANGOS_DLL_DECL boss_archavonAI : public ScriptedAI if ((m_uiCrushingLeapSecureTimer < uiDiff) || (m_pCrushingLeapTarget && m_creature->IsWithinDist(m_pCrushingLeapTarget, 5.0f))) { m_creature->getThreatManager().addThreat(m_pCrushingLeapTarget, -100000000.0f); - m_creature->SetSpeed(MOVE_RUN, m_fDefaultMoveSpeed); +// m_creature->SetSpeed(MOVE_RUN, m_fDefaultMoveSpeed); DoCast(m_pCrushingLeapTarget, m_bIsRegularMode ? SPELL_CRUSHING_LEAP_N : SPELL_CRUSHING_LEAP_H, true); m_bCrushingLeapInProgress = false; } @@ -226,7 +226,7 @@ struct MANGOS_DLL_DECL boss_archavonAI : public ScriptedAI { m_creature->MonsterSay(m_pCrushingLeapTarget->GetName(), LANG_UNIVERSAL, NULL); m_creature->getThreatManager().addThreat(m_pCrushingLeapTarget, 100000000.0f); - m_creature->SetSpeed(MOVE_RUN, m_fDefaultMoveSpeed*10.0f); +// m_creature->SetSpeed(MOVE_RUN, m_fDefaultMoveSpeed*10.0f); m_bCrushingLeapInProgress = true; m_uiCrushingLeapSecureTimer = 2000; } From 74edde47c26bfca9d226143775a7d6d82bc50f24 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 20 Jan 2010 21:06:41 +0300 Subject: [PATCH 107/405] Preview commit add --- .../boss_grand_champions.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp index dc9111889..221ff8938 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp @@ -668,14 +668,14 @@ struct MANGOS_DLL_DECL mob_toc5_hunterAI : public ScriptedAI if (enemy_check < diff) { - if (!m_creature->IsWithinDistInMap(m_creature->getVictim(), 8) && m_creature->IsWithinDistInMap(m_creature->getVictim(), 30)) - { - m_creature->SetSpeed(MOVE_RUN, 0.0001); - } - else - { - m_creature->SetSpeed(MOVE_RUN, 1); - } +// if (!m_creature->IsWithinDistInMap(m_creature->getVictim(), 8) && m_creature->IsWithinDistInMap(m_creature->getVictim(), 30)) +// { +// m_creature->SetSpeed(MOVE_RUN, 0.0001); +// } +// else +// { +// m_creature->SetSpeed(MOVE_RUN, 1); +// } enemy_check = 100; }else enemy_check -= diff; From b1f764ebaf3580c39cc7c5e7cf106b9fe1d2d687 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 20 Jan 2010 22:08:22 +0300 Subject: [PATCH 108/405] 3 change for setspeed() --- scripts/northrend/violet_hold/boss_ichoron.cpp | 2 +- scripts/northrend/violet_hold/boss_xevozz.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/northrend/violet_hold/boss_ichoron.cpp b/scripts/northrend/violet_hold/boss_ichoron.cpp index b957bcee6..a1bb1bd16 100644 --- a/scripts/northrend/violet_hold/boss_ichoron.cpp +++ b/scripts/northrend/violet_hold/boss_ichoron.cpp @@ -144,7 +144,7 @@ struct MANGOS_DLL_DECL boss_ichoronAI : public ScriptedAI void JustSummoned(Creature* pSummoned) { - pSummoned->SetSpeed(MOVE_RUN, 0.2f); +// pSummoned->SetSpeed(MOVE_RUN, 0.2f); pSummoned->GetMotionMaster()->MoveFollow(m_creature, 0, 0); m_lWaterElementsGUIDList.push_back(pSummoned->GetGUID()); } diff --git a/scripts/northrend/violet_hold/boss_xevozz.cpp b/scripts/northrend/violet_hold/boss_xevozz.cpp index d552dd070..789eabfec 100644 --- a/scripts/northrend/violet_hold/boss_xevozz.cpp +++ b/scripts/northrend/violet_hold/boss_xevozz.cpp @@ -128,7 +128,7 @@ struct MANGOS_DLL_DECL boss_xevozzAI : public ScriptedAI void JustSummoned(Creature* pSummoned) { - pSummoned->SetSpeed(MOVE_RUN, 0.5f); +// pSummoned->SetSpeed(MOVE_RUN, 0.5f); if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) { pSummoned->AddThreat(pTarget); From 4cbd1bfd7ac634e9ffdd6e6be9de10d34e82af55 Mon Sep 17 00:00:00 2001 From: mangos Date: Thu, 21 Jan 2010 19:10:13 +0300 Subject: [PATCH 109/405] Patch for instances --- .../boss_argent_challenge.cpp | 4 ++ .../boss_black_knight.cpp | 3 + .../boss_grand_champions.cpp | 59 ++++++++++------ .../vault_of_archavon/boss_archavon.cpp | 6 +- .../northrend/violet_hold/boss_cyanigosa.cpp | 2 + scripts/northrend/violet_hold/boss_erekem.cpp | 16 +++++ .../northrend/violet_hold/boss_ichoron.cpp | 26 +++---- .../northrend/violet_hold/boss_lavanthor.cpp | 12 ++-- scripts/northrend/violet_hold/boss_moragg.cpp | 59 ++-------------- scripts/northrend/violet_hold/boss_xevozz.cpp | 13 ++-- .../northrend/violet_hold/boss_zuramat.cpp | 8 +++ .../northrend/violet_hold/def_violet_hold.h | 65 +++++++++++++++++ .../violet_hold/instance_violet_hold.cpp | 15 ---- scripts/northrend/violet_hold/violet_hold.cpp | 70 +------------------ 14 files changed, 170 insertions(+), 188 deletions(-) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp index 17a6de1f3..8665dd193 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp @@ -81,6 +81,8 @@ struct MANGOS_DLL_DECL boss_eadricAI : public ScriptedAI Hammer_Timer = 40000; Hammer_Dmg_Timer = 45000; HammerTarget = 0; + m_creature->GetMotionMaster()->MovePoint(0, 746, 614, m_creature->GetPositionZ()); + m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); } void EnterEvadeMode() @@ -190,6 +192,8 @@ struct MANGOS_DLL_DECL boss_paletressAI : public ScriptedAI Shield_Check = 1000; summoned = false; shielded = false; + m_creature->GetMotionMaster()->MovePoint(0, 746, 614, m_creature->GetPositionZ()); + m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); } void JustSummoned(Creature* _summoned) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp index 2f85eb71c..00e77e16e 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp @@ -152,6 +152,9 @@ struct MANGOS_DLL_DECL boss_black_knightAI : public ScriptedAI phase2 = false; phase3 = false; ghoul = false; + m_creature->GetMotionMaster()->MovePoint(0, 746, 614, m_creature->GetPositionZ()); + m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + } void EnterEvadeMode() diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp index 221ff8938..7717576b2 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp @@ -88,11 +88,14 @@ struct MANGOS_DLL_DECL mob_toc5_warriorAI : public ScriptedAI Rolling_Throw_Timer = m_bIsRegularMode ? 45000 : 30000; Intercept_Cooldown = 0; intercept_check = 1000; + m_creature->GetMotionMaster()->MovePoint(0, 746, 614, m_creature->GetPositionZ()); + m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + } void EnterEvadeMode() { -/* if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) if (!pTemp->isAlive()) { pTemp->Respawn(); @@ -133,7 +136,7 @@ struct MANGOS_DLL_DECL mob_toc5_warriorAI : public ScriptedAI pTemp->SetHealth(pTemp->GetMaxHealth()); pTemp->SendMonsterMove(754.360779, 660.816162, 412.395996, 4.698700, pTemp->GetMonsterMoveFlags(), 1); pTemp->GetMap()->CreatureRelocation(pTemp, 754.360779, 660.816162, 412.395996, 4.698700); - }*/ + } } void Aggro(Unit* pWho) @@ -153,7 +156,7 @@ struct MANGOS_DLL_DECL mob_toc5_warriorAI : public ScriptedAI if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) if (pTemp->isAlive()) pTemp->SetInCombatWithZone(); - m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, IN_PROGRESS); +// m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, IN_PROGRESS); } } @@ -240,11 +243,13 @@ struct MANGOS_DLL_DECL mob_toc5_mageAI : public ScriptedAI Blast_Wave_Timer = m_bIsRegularMode ? 30000 : 20000; Haste_Timer = m_bIsRegularMode ? 12000 : 9000; Polymorph_Timer = m_bIsRegularMode ? 20000 : 15000; + m_creature->GetMotionMaster()->MovePoint(0, 746, 614, m_creature->GetPositionZ()); + m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); } void EnterEvadeMode() { -/* if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) if (!pTemp->isAlive()) { pTemp->Respawn(); @@ -285,7 +290,7 @@ struct MANGOS_DLL_DECL mob_toc5_mageAI : public ScriptedAI pTemp->SetHealth(pTemp->GetMaxHealth()); pTemp->SendMonsterMove(754.360779, 660.816162, 412.395996, 4.698700, pTemp->GetMonsterMoveFlags(), 1); pTemp->GetMap()->CreatureRelocation(pTemp, 754.360779, 660.816162, 412.395996, 4.698700); - }*/ + } } void Aggro(Unit* pWho) @@ -305,7 +310,7 @@ struct MANGOS_DLL_DECL mob_toc5_mageAI : public ScriptedAI if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) if (pTemp->isAlive()) pTemp->SetInCombatWithZone(); - m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, IN_PROGRESS); +// m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, IN_PROGRESS); } } @@ -388,11 +393,14 @@ struct MANGOS_DLL_DECL mob_toc5_shamanAI : public ScriptedAI Earth_Shield_Timer = m_bIsRegularMode ? 10000 : 5000; Healing_Wave_Timer = m_bIsRegularMode ? 20000 : 13000; Hex_Timer = m_bIsRegularMode ? 15000 : 10000; + m_creature->GetMotionMaster()->MovePoint(0, 746, 614, m_creature->GetPositionZ()); + m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + } void EnterEvadeMode() { -/* if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) if (!pTemp->isAlive()) { pTemp->Respawn(); @@ -433,7 +441,7 @@ struct MANGOS_DLL_DECL mob_toc5_shamanAI : public ScriptedAI pTemp->SetHealth(pTemp->GetMaxHealth()); pTemp->SendMonsterMove(754.360779, 660.816162, 412.395996, 4.698700, pTemp->GetMonsterMoveFlags(), 1); pTemp->GetMap()->CreatureRelocation(pTemp, 754.360779, 660.816162, 412.395996, 4.698700); - }*/ + } } void Aggro(Unit* pWho) @@ -453,7 +461,7 @@ struct MANGOS_DLL_DECL mob_toc5_shamanAI : public ScriptedAI if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) if (pTemp->isAlive()) pTemp->SetInCombatWithZone(); - m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, IN_PROGRESS); +// m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, IN_PROGRESS); } } @@ -581,11 +589,14 @@ struct MANGOS_DLL_DECL mob_toc5_hunterAI : public ScriptedAI Disengage_Cooldown = 0; enemy_check = 1000; disengage_check; + m_creature->GetMotionMaster()->MovePoint(0, 746, 614, m_creature->GetPositionZ()); + m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + } void EnterEvadeMode() { -/* if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) if (!pTemp->isAlive()) { pTemp->Respawn(); @@ -626,7 +637,7 @@ struct MANGOS_DLL_DECL mob_toc5_hunterAI : public ScriptedAI pTemp->SetHealth(pTemp->GetMaxHealth()); pTemp->SendMonsterMove(754.360779, 660.816162, 412.395996, 4.698700, pTemp->GetMonsterMoveFlags(), 1); pTemp->GetMap()->CreatureRelocation(pTemp, 754.360779, 660.816162, 412.395996, 4.698700); - }*/ + } } void Aggro(Unit* pWho) @@ -646,7 +657,7 @@ struct MANGOS_DLL_DECL mob_toc5_hunterAI : public ScriptedAI if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) if (pTemp->isAlive()) pTemp->SetInCombatWithZone(); - m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, IN_PROGRESS); +// m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, IN_PROGRESS); } } @@ -668,14 +679,14 @@ struct MANGOS_DLL_DECL mob_toc5_hunterAI : public ScriptedAI if (enemy_check < diff) { -// if (!m_creature->IsWithinDistInMap(m_creature->getVictim(), 8) && m_creature->IsWithinDistInMap(m_creature->getVictim(), 30)) -// { -// m_creature->SetSpeed(MOVE_RUN, 0.0001); -// } -// else -// { -// m_creature->SetSpeed(MOVE_RUN, 1); -// } + if (!m_creature->IsWithinDistInMap(m_creature->getVictim(), 8) && m_creature->IsWithinDistInMap(m_creature->getVictim(), 30)) + { + m_creature->SetSpeedRate(MOVE_RUN, 0.0001); + } + else + { + m_creature->SetSpeedRate(MOVE_RUN, 1); + } enemy_check = 100; }else enemy_check -= diff; @@ -744,11 +755,13 @@ struct MANGOS_DLL_DECL mob_toc5_rogueAI : public ScriptedAI Eviscerate_Timer = m_bIsRegularMode ? 20000 : 15000; FoK_Timer = m_bIsRegularMode ? 15000 : 10000; Poison_Timer = m_bIsRegularMode ? 12000 : 7000; + m_creature->GetMotionMaster()->MovePoint(0, 746, 614, m_creature->GetPositionZ()); + m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); } void EnterEvadeMode() { -/* if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) if (!pTemp->isAlive()) { pTemp->Respawn(); @@ -789,7 +802,7 @@ struct MANGOS_DLL_DECL mob_toc5_rogueAI : public ScriptedAI pTemp->SetHealth(pTemp->GetMaxHealth()); pTemp->SendMonsterMove(754.360779, 660.816162, 412.395996, 4.698700, pTemp->GetMonsterMoveFlags(), 1); pTemp->GetMap()->CreatureRelocation(pTemp, 754.360779, 660.816162, 412.395996, 4.698700); - }*/ + } } void Aggro(Unit* pWho) @@ -809,7 +822,7 @@ struct MANGOS_DLL_DECL mob_toc5_rogueAI : public ScriptedAI if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) if (pTemp->isAlive()) pTemp->SetInCombatWithZone(); - m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, IN_PROGRESS); +// m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, IN_PROGRESS); } } diff --git a/scripts/northrend/vault_of_archavon/boss_archavon.cpp b/scripts/northrend/vault_of_archavon/boss_archavon.cpp index a02d9242e..4c3e499d8 100644 --- a/scripts/northrend/vault_of_archavon/boss_archavon.cpp +++ b/scripts/northrend/vault_of_archavon/boss_archavon.cpp @@ -73,7 +73,7 @@ struct MANGOS_DLL_DECL boss_archavonAI : public ScriptedAI void Reset() { m_uiEvadeCheckCooldown = 2000; -// m_creature->SetSpeed(MOVE_RUN, m_fDefaultMoveSpeed); + m_creature->SetSpeedRate(MOVE_RUN, m_fDefaultMoveSpeed); m_uiBerserkTimer = 300000; m_uiRockShardsTimer = 15000; m_bRockShardsInProgress = false; @@ -155,7 +155,7 @@ struct MANGOS_DLL_DECL boss_archavonAI : public ScriptedAI if ((m_uiCrushingLeapSecureTimer < uiDiff) || (m_pCrushingLeapTarget && m_creature->IsWithinDist(m_pCrushingLeapTarget, 5.0f))) { m_creature->getThreatManager().addThreat(m_pCrushingLeapTarget, -100000000.0f); -// m_creature->SetSpeed(MOVE_RUN, m_fDefaultMoveSpeed); + m_creature->SetSpeedRate(MOVE_RUN, m_fDefaultMoveSpeed); DoCast(m_pCrushingLeapTarget, m_bIsRegularMode ? SPELL_CRUSHING_LEAP_N : SPELL_CRUSHING_LEAP_H, true); m_bCrushingLeapInProgress = false; } @@ -226,7 +226,7 @@ struct MANGOS_DLL_DECL boss_archavonAI : public ScriptedAI { m_creature->MonsterSay(m_pCrushingLeapTarget->GetName(), LANG_UNIVERSAL, NULL); m_creature->getThreatManager().addThreat(m_pCrushingLeapTarget, 100000000.0f); -// m_creature->SetSpeed(MOVE_RUN, m_fDefaultMoveSpeed*10.0f); + m_creature->SetSpeedRate(MOVE_RUN, m_fDefaultMoveSpeed*10.0f); m_bCrushingLeapInProgress = true; m_uiCrushingLeapSecureTimer = 2000; } diff --git a/scripts/northrend/violet_hold/boss_cyanigosa.cpp b/scripts/northrend/violet_hold/boss_cyanigosa.cpp index 9e103b84d..f4891e750 100644 --- a/scripts/northrend/violet_hold/boss_cyanigosa.cpp +++ b/scripts/northrend/violet_hold/boss_cyanigosa.cpp @@ -66,6 +66,7 @@ struct MANGOS_DLL_DECL boss_cyanigosaAI : public ScriptedAI uint32 m_uiBlizzard_Timer; uint32 m_uiUncontrollableEnergy_Timer; uint32 m_uiArcaneVacuum_Timer; + bool MovementStarted; void Reset() { @@ -74,6 +75,7 @@ struct MANGOS_DLL_DECL boss_cyanigosaAI : public ScriptedAI m_uiBlizzard_Timer = urand(20000, 25000); m_uiTailSweep_Timer = urand(10000, 11000); m_uiArcaneVacuum_Timer = urand(28000, 33000); + MovementStarted = false; } void Aggro(Unit* pWho) diff --git a/scripts/northrend/violet_hold/boss_erekem.cpp b/scripts/northrend/violet_hold/boss_erekem.cpp index 715fa5832..e34c51c74 100644 --- a/scripts/northrend/violet_hold/boss_erekem.cpp +++ b/scripts/northrend/violet_hold/boss_erekem.cpp @@ -63,6 +63,7 @@ struct MANGOS_DLL_DECL boss_erekemAI : public ScriptedAI bool m_bIsRegularMode; bool m_bIsAddDead; + bool MovementStarted; uint32 m_uiBloodlust_Timer; uint32 m_uiBreakBonds_Timer; @@ -75,6 +76,7 @@ struct MANGOS_DLL_DECL boss_erekemAI : public ScriptedAI void Reset() { m_bIsAddDead = false; + MovementStarted = false; m_uiLightningBolt_Timer = 2000; m_uiEarthShield_Timer = urand(15000, 20000); m_uiEarthShock_Timer = urand(12000, 17000); @@ -142,6 +144,12 @@ struct MANGOS_DLL_DECL boss_erekemAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { + if (m_pInstance->GetData(TYPE_EREKEM) == SPECIAL && !MovementStarted) { + m_creature->GetMotionMaster()->MovePoint(0, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z); + m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + MovementStarted = true; + } + //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -233,6 +241,7 @@ struct MANGOS_DLL_DECL mob_erekem_guardAI : public ScriptedAI uint32 m_uiGushingWound_Timer; uint32 m_uiHowlingScreech_Timer; uint32 m_uiStrike_Timer; + bool MovementStarted; void Reset() { @@ -241,6 +250,7 @@ struct MANGOS_DLL_DECL mob_erekem_guardAI : public ScriptedAI m_uiStrike_Timer = urand(10000, 11000); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + MovementStarted = false; } @@ -269,6 +279,12 @@ struct MANGOS_DLL_DECL mob_erekem_guardAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { + if (m_pInstance->GetData(TYPE_EREKEM) == SPECIAL && !MovementStarted) { + m_creature->GetMotionMaster()->MovePoint(0, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z); + m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + MovementStarted = true; + } + //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/violet_hold/boss_ichoron.cpp b/scripts/northrend/violet_hold/boss_ichoron.cpp index a1bb1bd16..362ab6f05 100644 --- a/scripts/northrend/violet_hold/boss_ichoron.cpp +++ b/scripts/northrend/violet_hold/boss_ichoron.cpp @@ -26,16 +26,6 @@ EndScriptData */ #include "def_violet_hold.h" -static Locations PortalLoc[]= -{ - {1857.125, 763.295, 38.654}, - {1925.480, 849.981, 47.174}, - {1892.737, 744.589, 47.666}, - {1878.198, 850.005, 43.333}, - {1909.381, 806.796, 38.645}, - {1936.101, 802.950, 52.417}, -}; - enum { SAY_AGGRO = -1608018, @@ -75,6 +65,7 @@ struct MANGOS_DLL_DECL boss_ichoronAI : public ScriptedAI bool m_bIsRegularMode; bool m_bIsExploded; bool m_bIsFrenzy; + bool MovementStarted; uint32 m_uiBuubleChecker_Timer; uint32 m_uiWaterBoltVolley_Timer; @@ -84,6 +75,7 @@ struct MANGOS_DLL_DECL boss_ichoronAI : public ScriptedAI { m_bIsExploded = false; m_bIsFrenzy = false; + MovementStarted = false; m_uiBuubleChecker_Timer = 1000; m_uiWaterBoltVolley_Timer = urand(10000, 15000); m_uiShowup_Counter = 0; @@ -144,7 +136,7 @@ struct MANGOS_DLL_DECL boss_ichoronAI : public ScriptedAI void JustSummoned(Creature* pSummoned) { -// pSummoned->SetSpeed(MOVE_RUN, 0.2f); + pSummoned->SetSpeedRate(MOVE_RUN, 0.2f); pSummoned->GetMotionMaster()->MoveFollow(m_creature, 0, 0); m_lWaterElementsGUIDList.push_back(pSummoned->GetGUID()); } @@ -169,10 +161,11 @@ struct MANGOS_DLL_DECL boss_ichoronAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { -// if (m_pInstance->GetData(TYPE_ICHORON) == SPECIAL) { -// if (Unit* pTemp = SelectUnit(SELECT_TARGET_RANDOM,0)) -// m_creature->GetMotionMaster()->MoveChase(pTemp); -// }; + if (m_pInstance->GetData(TYPE_ICHORON) == SPECIAL && !MovementStarted) { + m_creature->GetMotionMaster()->MovePoint(0, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z); + m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + MovementStarted = true; + } //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -240,9 +233,8 @@ struct MANGOS_DLL_DECL boss_ichoronAI : public ScriptedAI DoCast(m_creature, m_bIsRegularMode ? SPELL_FRENZY_H : SPELL_FRENZY); m_bIsFrenzy = true; } - - DoMeleeAttackIfReady(); } + DoMeleeAttackIfReady(); } void JustDied(Unit* pKiller) diff --git a/scripts/northrend/violet_hold/boss_lavanthor.cpp b/scripts/northrend/violet_hold/boss_lavanthor.cpp index f957a8857..e30f1a94a 100644 --- a/scripts/northrend/violet_hold/boss_lavanthor.cpp +++ b/scripts/northrend/violet_hold/boss_lavanthor.cpp @@ -47,6 +47,7 @@ struct MANGOS_DLL_DECL boss_lavanthorAI : public ScriptedAI ScriptedInstance *m_pInstance; bool m_bIsRegularMode; + bool MovementStarted; uint32 m_uiCauterizingFlames_Timer; uint32 m_uiFlameBreath_Timer; @@ -57,6 +58,7 @@ struct MANGOS_DLL_DECL boss_lavanthorAI : public ScriptedAI m_uiCauterizingFlames_Timer = urand(40000, 41000); m_uiFlameBreath_Timer = urand(15000, 16000); m_uiFirebolt_Timer = urand(10000, 11000); + MovementStarted = false; if (m_pInstance) m_pInstance->SetData(TYPE_LAVANTHOR, NOT_STARTED); @@ -93,11 +95,11 @@ struct MANGOS_DLL_DECL boss_lavanthorAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { -// if (m_pInstance->GetData(TYPE_LAVANTHOR) == SPECIAL) { -// if (Unit* pTemp = SelectUnit(SELECT_TARGET_RANDOM,0)) -// m_creature->GetMotionMaster()->MoveChase(pTemp); -// }; - + if (m_pInstance->GetData(TYPE_LAVANTHOR) == SPECIAL && !MovementStarted) { + m_creature->GetMotionMaster()->MovePoint(0, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z); + m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + MovementStarted = true; + } //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/violet_hold/boss_moragg.cpp b/scripts/northrend/violet_hold/boss_moragg.cpp index 6cd120618..feb12e203 100644 --- a/scripts/northrend/violet_hold/boss_moragg.cpp +++ b/scripts/northrend/violet_hold/boss_moragg.cpp @@ -25,16 +25,6 @@ EndScriptData */ #include "precompiled.h" #include "def_violet_hold.h" -static Locations BossWP[]= -{ - //From Morag - {1887.500, 763.096, 47.666}, // 12 - {1880.837, 775.769, 38.796}, // 13 - {1861.016, 789.717, 38.908}, // 14 - {1856.217, 796.705, 44.008}, // 15 - {1827.960, 804.208, 44.364}, // 16 -}; - enum { SPELL_CORROSICE_SALIVA = 54527, @@ -58,14 +48,11 @@ struct MANGOS_DLL_DECL boss_moraggAI : public ScriptedAI uint32 m_uiOpticLink_Timer; uint32 m_uiRay_Timer; - uint32 WalkTimer; - bool IsWalking; bool MovementStarted; - std::list WayPointList; - std::list::iterator WayPoint; void Reset() { + MovementStarted = false; m_uiCorrosiveSaliva_Timer = urand(10000, 11000); m_uiOpticLink_Timer = urand(25000, 30000); m_uiRay_Timer = urand(2000, 7000); @@ -85,45 +72,7 @@ struct MANGOS_DLL_DECL boss_moraggAI : public ScriptedAI m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } -/* - void StartMovement() - { - if(!WayPointList.empty() || MovementStarted) - return; - uint8 start = 0; - uint8 end = 4; - uint8 wpId = 0; - - for(uint8 i = start; i <= end; ++i){ - error_log("AddWP: %u", i); - AddWaypoint(wpId, BossWP[i].x, BossWP[i].y, BossWP[i].z); - wpId++; - } - WayPoint = WayPointList.begin(); - m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); - IsWalking = true; - MovementStarted = true; - } - - void AddWaypoint(uint32 id, float x, float y, float z) - { - WayPoints DWP(id, x, y, z); - WayPointList.push_back(DWP); - } - - void MovementInform(uint32 uiType, uint32 uiPointId) - { - if(uiType != POINT_MOTION_TYPE ) - return; - - if(WayPoint->id != uiPointId) - return; - ++WayPoint; - WalkTimer = 200; - } - -*/ void AttackStart(Unit* pWho) { if (!m_pInstance) @@ -146,7 +95,11 @@ struct MANGOS_DLL_DECL boss_moraggAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { -// if (m_pInstance->GetData(TYPE_MORAGG) == SPECIAL) StartMovement(); + if (m_pInstance->GetData(TYPE_MORAGG) == SPECIAL && !MovementStarted) { + m_creature->GetMotionMaster()->MovePoint(0, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z); + m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + MovementStarted = true; + } //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/scripts/northrend/violet_hold/boss_xevozz.cpp b/scripts/northrend/violet_hold/boss_xevozz.cpp index 789eabfec..0527eaf93 100644 --- a/scripts/northrend/violet_hold/boss_xevozz.cpp +++ b/scripts/northrend/violet_hold/boss_xevozz.cpp @@ -64,6 +64,7 @@ struct MANGOS_DLL_DECL boss_xevozzAI : public ScriptedAI ScriptedInstance *m_pInstance; bool m_bIsRegularMode; + bool MovementStarted; uint32 m_uiSummonEtherealSphere_Timer; uint32 m_uiArcaneBarrageVolley_Timer; @@ -75,6 +76,7 @@ struct MANGOS_DLL_DECL boss_xevozzAI : public ScriptedAI m_uiArcaneBarrageVolley_Timer = urand(20000, 22000); m_uiArcaneBuffet_Timer = m_uiSummonEtherealSphere_Timer + urand(5000, 6000); DespawnSphere(); + MovementStarted = false; if (m_pInstance) m_pInstance->SetData(TYPE_XEVOZZ, NOT_STARTED); @@ -128,7 +130,7 @@ struct MANGOS_DLL_DECL boss_xevozzAI : public ScriptedAI void JustSummoned(Creature* pSummoned) { -// pSummoned->SetSpeed(MOVE_RUN, 0.5f); + pSummoned->SetSpeedRate(MOVE_RUN, 0.5f); if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) { pSummoned->AddThreat(pTarget); @@ -138,10 +140,11 @@ struct MANGOS_DLL_DECL boss_xevozzAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { -// if (m_pInstance->GetData(TYPE_XEVOZZ) == SPECIAL) { -// if (Unit* pTemp = SelectUnit(SELECT_TARGET_RANDOM,0)) -// m_creature->GetMotionMaster()->MoveChase(pTemp); -// }; + if (m_pInstance->GetData(TYPE_XEVOZZ) == SPECIAL && !MovementStarted) { + m_creature->GetMotionMaster()->MovePoint(0, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z); + m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + MovementStarted = true; + } //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/scripts/northrend/violet_hold/boss_zuramat.cpp b/scripts/northrend/violet_hold/boss_zuramat.cpp index e09399b29..bf0dec673 100644 --- a/scripts/northrend/violet_hold/boss_zuramat.cpp +++ b/scripts/northrend/violet_hold/boss_zuramat.cpp @@ -60,6 +60,7 @@ struct MANGOS_DLL_DECL boss_zuramatAI : public ScriptedAI ScriptedInstance *m_pInstance; bool m_bIsRegularMode; + bool MovementStarted; std::list m_lSentryGUIDList; uint32 m_uiShroudDarkness_Timer; @@ -71,6 +72,7 @@ struct MANGOS_DLL_DECL boss_zuramatAI : public ScriptedAI m_uiShroudDarkness_Timer = urand(8000, 9000); m_uiSummonVoidSentry_Timer = urand(5000, 10000); m_uiVoidShift_Timer = 10000; + MovementStarted = false; if (m_pInstance) m_pInstance->SetData(TYPE_ZURAMAT, NOT_STARTED); @@ -137,6 +139,12 @@ struct MANGOS_DLL_DECL boss_zuramatAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { + if (m_pInstance->GetData(TYPE_ZURAMAT) == SPECIAL && !MovementStarted) { + m_creature->GetMotionMaster()->MovePoint(0, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z); + m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + MovementStarted = true; + } + //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/violet_hold/def_violet_hold.h b/scripts/northrend/violet_hold/def_violet_hold.h index b3ebec626..d8f77dd00 100644 --- a/scripts/northrend/violet_hold/def_violet_hold.h +++ b/scripts/northrend/violet_hold/def_violet_hold.h @@ -105,4 +105,69 @@ struct WayPoints uint32 id; float x, y, z; }; + +static Locations PortalLoc[]= +{ + {1888.271, 810.781, 38.441}, // 0 center + {1857.125, 763.295, 38.654}, // 1 Lavanthor + {1925.480, 849.981, 47.174}, // 2 Zuramat + {1892.737, 744.589, 47.666}, // 3 Moragg + {1878.198, 850.005, 43.333}, // 4 Portal in front of Erekem + {1909.381, 806.796, 38.645}, // 5 Portal outside of Ichoron + {1936.101, 802.950, 52.417}, // 6 at the highest platform +}; + +static Locations BossLoc[]= +{ + {0,0,0}, + {0,0,0}, + {1876.100, 857.079, 43.333}, // Erekem + {1892.737, 744.589, 47.666}, // Moragg + {1908.863, 785.647, 37.435}, // Ichoron + {1905.364, 840.607, 38.670}, // Xevozz + {1857.125, 763.295, 38.654}, // Lavanthor + {1925.480, 849.981, 47.174}, // Zuramat +}; +static Locations DragonsWP[]= +{ + //center, ichoron + {1869.393, 803.902, 38.768}, // 0 + {1859.843, 804.222, 44.008}, // 1 + {1827.960, 804.208, 44.364}, // 2 + + //From left side (lavanthor) + {1861.016, 789.717, 38.908}, // 3 + {1856.217, 796.705, 44.008}, // 4 + {1827.960, 804.208, 44.364}, // 5 + + //From Zuramat + {1931.446, 826.734, 47.556}, // 6 + {1913.049, 823.930, 38.792}, // 7 + {1827.960, 804.208, 44.364}, // 8 + {1869.393, 803.902, 38.768}, // 9 + {1859.843, 804.222, 44.008}, // 10 + {1827.960, 804.208, 44.364}, // 11 + + //From Morag + {1887.500, 763.096, 47.666}, // 12 + {1880.837, 775.769, 38.796}, // 13 + {1861.016, 789.717, 38.908}, // 14 + {1856.217, 796.705, 44.008}, // 15 + {1827.960, 804.208, 44.364}, // 16 + + //From erekem + {1878.280, 843.267, 43.333}, // 17 + {1872.311, 835.531, 38.780}, // 18 + {1861.997, 818.766, 38.650}, // 19 + {1857.348, 811.230, 44.008}, // 20 + {1827.960, 804.208, 44.364}, // 21 + + //From Highest platform + {1937.298, 824.557, 52.332}, // 22 + {1913.049, 823.930, 38.792}, // 23 + {1869.393, 803.902, 38.768}, // 24 + {1859.843, 804.222, 44.008}, // 25 + {1827.960, 804.208, 44.364}, // 26 +}; + #endif diff --git a/scripts/northrend/violet_hold/instance_violet_hold.cpp b/scripts/northrend/violet_hold/instance_violet_hold.cpp index c6ba909b2..3a0f654ab 100644 --- a/scripts/northrend/violet_hold/instance_violet_hold.cpp +++ b/scripts/northrend/violet_hold/instance_violet_hold.cpp @@ -36,21 +36,6 @@ EndScriptData */ */ //inline uint32 RandRiftBoss() { return ((rand()%2) ? NPC_GUARDIAN : NPC_KEEPER); } -static Locations PortalLoc[]= -{ - {1888.271, 810.781, 38.441}, // 0 center - {1857.125, 763.295, 38.654}, // 1 Lavanthor - {1925.480, 849.981, 47.174}, // 2 Zuramat - {1892.737, 744.589, 47.666}, // 3 Moragg - {1878.198, 850.005, 43.333}, // 4 Portal in front of Erekem - {1909.381, 806.796, 38.645}, // 5 Portal outside of Ichoron - {1936.101, 802.950, 52.417}, // 6 at the highest platform - - {1876.100, 857.079, 43.333}, // 7 Erekem - {1908.863, 785.647, 37.435}, // 8 Ichoron - {1905.364, 840.607, 38.670}, // 9 Xevozz -}; - struct MANGOS_DLL_DECL instance_violet_hold : public ScriptedInstance { instance_violet_hold(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; diff --git a/scripts/northrend/violet_hold/violet_hold.cpp b/scripts/northrend/violet_hold/violet_hold.cpp index cc26662e5..44c5a411a 100644 --- a/scripts/northrend/violet_hold/violet_hold.cpp +++ b/scripts/northrend/violet_hold/violet_hold.cpp @@ -24,70 +24,6 @@ EndScriptData */ #include "precompiled.h" #include "def_violet_hold.h" - -static Locations PortalLoc[]= -{ - {1888.271, 810.781, 38.441}, // 0 center - {1857.125, 763.295, 38.654}, // 1 Lavanthor - {1925.480, 849.981, 47.174}, // 2 Zuramat - {1892.737, 744.589, 47.666}, // 3 Moragg - {1878.198, 850.005, 43.333}, // 4 Portal in front of Erekem - {1909.381, 806.796, 38.645}, // 5 Portal outside of Ichoron - {1936.101, 802.950, 52.417}, // 6 at the highest platform -}; -static Locations BossLoc[]= -{ - {0,0,0}, - {0,0,0}, - {1876.100, 857.079, 43.333}, // Erekem - {1892.737, 744.589, 47.666}, // Moragg - {1908.863, 785.647, 37.435}, // Ichoron - {1905.364, 840.607, 38.670}, // Xevozz - {1857.125, 763.295, 38.654}, // Lavanthor - {1925.480, 849.981, 47.174}, // Zuramat -}; -static Locations DragonsWP[]= -{ - //center, ichoron - {1869.393, 803.902, 38.768}, // 0 - {1859.843, 804.222, 44.008}, // 1 - {1827.960, 804.208, 44.364}, // 2 - - //From left side (lavanthor) - {1861.016, 789.717, 38.908}, // 3 - {1856.217, 796.705, 44.008}, // 4 - {1827.960, 804.208, 44.364}, // 5 - - //From Zuramat - {1931.446, 826.734, 47.556}, // 6 - {1913.049, 823.930, 38.792}, // 7 - {1827.960, 804.208, 44.364}, // 8 - {1869.393, 803.902, 38.768}, // 9 - {1859.843, 804.222, 44.008}, // 10 - {1827.960, 804.208, 44.364}, // 11 - - //From Morag - {1887.500, 763.096, 47.666}, // 12 - {1880.837, 775.769, 38.796}, // 13 - {1861.016, 789.717, 38.908}, // 14 - {1856.217, 796.705, 44.008}, // 15 - {1827.960, 804.208, 44.364}, // 16 - - //From erekem - {1878.280, 843.267, 43.333}, // 17 - {1872.311, 835.531, 38.780}, // 18 - {1861.997, 818.766, 38.650}, // 19 - {1857.348, 811.230, 44.008}, // 20 - {1827.960, 804.208, 44.364}, // 21 - - //From Highest platform - {1937.298, 824.557, 52.332}, // 22 - {1913.049, 823.930, 38.792}, // 23 - {1869.393, 803.902, 38.768}, // 24 - {1859.843, 804.222, 44.008}, // 25 - {1827.960, 804.208, 44.364}, // 26 - -}; enum { SPELL_TELEPORT_INSIDE = 62139, @@ -611,7 +547,7 @@ struct MANGOS_DLL_DECL npc_sinclariAI : public ScriptedAI if (m_uiNextPortal_Timer <= uiDiff) { ++m_uiRiftPortalCount; - if (m_pInstance) + if (m_pInstance && m_uiRiftPortalCount < 19) { if ( m_uiRiftPortalCount < 19) m_pInstance->DoUpdateWorldState(WORLD_STATE_VH, m_uiRiftPortalCount); m_pInstance->SetData(TYPE_RIFT, SPECIAL); @@ -650,10 +586,10 @@ struct MANGOS_DLL_DECL npc_sinclariAI : public ScriptedAI m_uiBossCheck_Timer = 1000; m_uiNextPortal_Timer = m_bIsRegular ? 180000 : 120000; } - else if (m_uiRiftPortalCount == 19) + else if (m_uiRiftPortalCount == 19 && m_pInstance->GetData(TYPE_RIFT) != DONE) { m_creature->SummonCreature(NPC_CYANIGOSA, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 180000); - m_pInstance->SetData(TYPE_RIFT, IN_PROGRESS); + m_pInstance->SetData(TYPE_RIFT, DONE); m_pInstance->SetData(TYPE_DISRUPTIONS, 20); m_uiNextPortal_Timer = 0; } From ae2899b4d78869646003a74545ac50ddb6821210 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Fri, 22 Jan 2010 13:23:14 +0300 Subject: [PATCH 110/405] Violet hold redesign part 6 --- scripts/northrend/violet_hold/boss_erekem.cpp | 13 +++++----- .../northrend/violet_hold/boss_ichoron.cpp | 4 +-- .../northrend/violet_hold/boss_lavanthor.cpp | 10 ++++--- scripts/northrend/violet_hold/boss_moragg.cpp | 4 +-- scripts/northrend/violet_hold/boss_xevozz.cpp | 4 +-- .../northrend/violet_hold/boss_zuramat.cpp | 4 +-- .../northrend/violet_hold/def_violet_hold.h | 24 ++++++++++------- .../violet_hold/instance_violet_hold.cpp | 23 +++++++++------- scripts/northrend/violet_hold/violet_hold.cpp | 26 ++++++++++++------- 9 files changed, 64 insertions(+), 48 deletions(-) diff --git a/scripts/northrend/violet_hold/boss_erekem.cpp b/scripts/northrend/violet_hold/boss_erekem.cpp index e34c51c74..9905a0c9c 100644 --- a/scripts/northrend/violet_hold/boss_erekem.cpp +++ b/scripts/northrend/violet_hold/boss_erekem.cpp @@ -106,8 +106,6 @@ struct MANGOS_DLL_DECL boss_erekemAI : public ScriptedAI if (m_pInstance) m_pInstance->SetData(TYPE_EREKEM, IN_PROGRESS); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } @@ -147,6 +145,8 @@ struct MANGOS_DLL_DECL boss_erekemAI : public ScriptedAI if (m_pInstance->GetData(TYPE_EREKEM) == SPECIAL && !MovementStarted) { m_creature->GetMotionMaster()->MovePoint(0, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z); m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); MovementStarted = true; } @@ -214,8 +214,7 @@ struct MANGOS_DLL_DECL boss_erekemAI : public ScriptedAI { DoScriptText(SAY_DEATH, m_creature); - if (m_pInstance) - m_pInstance->SetData(TYPE_EREKEM, DONE); + if (m_pInstance) m_pInstance->SetData(TYPE_EREKEM, DONE); } void KilledUnit(Unit* pVictim) @@ -261,8 +260,6 @@ struct MANGOS_DLL_DECL mob_erekem_guardAI : public ScriptedAI if (m_pInstance->GetData(TYPE_EREKEM) != SPECIAL && m_pInstance->GetData(TYPE_EREKEM) != IN_PROGRESS) return; - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); if (!pWho || pWho == m_creature) @@ -280,8 +277,10 @@ struct MANGOS_DLL_DECL mob_erekem_guardAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { if (m_pInstance->GetData(TYPE_EREKEM) == SPECIAL && !MovementStarted) { - m_creature->GetMotionMaster()->MovePoint(0, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z); + m_creature->GetMotionMaster()->MovePoint(0, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z); m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); MovementStarted = true; } diff --git a/scripts/northrend/violet_hold/boss_ichoron.cpp b/scripts/northrend/violet_hold/boss_ichoron.cpp index 362ab6f05..dbcd71109 100644 --- a/scripts/northrend/violet_hold/boss_ichoron.cpp +++ b/scripts/northrend/violet_hold/boss_ichoron.cpp @@ -95,8 +95,6 @@ struct MANGOS_DLL_DECL boss_ichoronAI : public ScriptedAI if (m_pInstance) m_pInstance->SetData(TYPE_ICHORON, IN_PROGRESS); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } void AttackStart(Unit* pWho) @@ -164,6 +162,8 @@ struct MANGOS_DLL_DECL boss_ichoronAI : public ScriptedAI if (m_pInstance->GetData(TYPE_ICHORON) == SPECIAL && !MovementStarted) { m_creature->GetMotionMaster()->MovePoint(0, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z); m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); MovementStarted = true; } diff --git a/scripts/northrend/violet_hold/boss_lavanthor.cpp b/scripts/northrend/violet_hold/boss_lavanthor.cpp index e30f1a94a..399b1bd4d 100644 --- a/scripts/northrend/violet_hold/boss_lavanthor.cpp +++ b/scripts/northrend/violet_hold/boss_lavanthor.cpp @@ -62,15 +62,15 @@ struct MANGOS_DLL_DECL boss_lavanthorAI : public ScriptedAI if (m_pInstance) m_pInstance->SetData(TYPE_LAVANTHOR, NOT_STARTED); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } void Aggro(Unit* pWho) { if (m_pInstance) m_pInstance->SetData(TYPE_LAVANTHOR, IN_PROGRESS); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - } void AttackStart(Unit* pWho) @@ -96,8 +96,10 @@ struct MANGOS_DLL_DECL boss_lavanthorAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { if (m_pInstance->GetData(TYPE_LAVANTHOR) == SPECIAL && !MovementStarted) { - m_creature->GetMotionMaster()->MovePoint(0, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z); + m_creature->GetMotionMaster()->MovePoint(0, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z); m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); MovementStarted = true; } //Return since we have no target diff --git a/scripts/northrend/violet_hold/boss_moragg.cpp b/scripts/northrend/violet_hold/boss_moragg.cpp index feb12e203..ee5744f59 100644 --- a/scripts/northrend/violet_hold/boss_moragg.cpp +++ b/scripts/northrend/violet_hold/boss_moragg.cpp @@ -68,8 +68,6 @@ struct MANGOS_DLL_DECL boss_moraggAI : public ScriptedAI { if (m_pInstance) m_pInstance->SetData(TYPE_MORAGG, IN_PROGRESS); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } @@ -98,6 +96,8 @@ struct MANGOS_DLL_DECL boss_moraggAI : public ScriptedAI if (m_pInstance->GetData(TYPE_MORAGG) == SPECIAL && !MovementStarted) { m_creature->GetMotionMaster()->MovePoint(0, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z); m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); MovementStarted = true; } diff --git a/scripts/northrend/violet_hold/boss_xevozz.cpp b/scripts/northrend/violet_hold/boss_xevozz.cpp index 0527eaf93..85d213289 100644 --- a/scripts/northrend/violet_hold/boss_xevozz.cpp +++ b/scripts/northrend/violet_hold/boss_xevozz.cpp @@ -91,8 +91,6 @@ struct MANGOS_DLL_DECL boss_xevozzAI : public ScriptedAI if (m_pInstance) m_pInstance->SetData(TYPE_XEVOZZ, IN_PROGRESS); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } @@ -143,6 +141,8 @@ struct MANGOS_DLL_DECL boss_xevozzAI : public ScriptedAI if (m_pInstance->GetData(TYPE_XEVOZZ) == SPECIAL && !MovementStarted) { m_creature->GetMotionMaster()->MovePoint(0, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z); m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); MovementStarted = true; } diff --git a/scripts/northrend/violet_hold/boss_zuramat.cpp b/scripts/northrend/violet_hold/boss_zuramat.cpp index bf0dec673..0d82026cf 100644 --- a/scripts/northrend/violet_hold/boss_zuramat.cpp +++ b/scripts/northrend/violet_hold/boss_zuramat.cpp @@ -87,8 +87,6 @@ struct MANGOS_DLL_DECL boss_zuramatAI : public ScriptedAI if (m_pInstance) m_pInstance->SetData(TYPE_ZURAMAT, IN_PROGRESS); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } @@ -142,6 +140,8 @@ struct MANGOS_DLL_DECL boss_zuramatAI : public ScriptedAI if (m_pInstance->GetData(TYPE_ZURAMAT) == SPECIAL && !MovementStarted) { m_creature->GetMotionMaster()->MovePoint(0, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z); m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); MovementStarted = true; } diff --git a/scripts/northrend/violet_hold/def_violet_hold.h b/scripts/northrend/violet_hold/def_violet_hold.h index d8f77dd00..7f34571dc 100644 --- a/scripts/northrend/violet_hold/def_violet_hold.h +++ b/scripts/northrend/violet_hold/def_violet_hold.h @@ -7,21 +7,23 @@ enum { - MAX_ENCOUNTER = 2, + MAX_ENCOUNTER = 9, + + TYPE_EVENT = 0, + TYPE_RIFT = 1, + TYPE_EREKEM = 2, + TYPE_MORAGG = 3, + TYPE_ICHORON = 4, + TYPE_XEVOZZ = 5, + TYPE_LAVANTHOR = 6, + TYPE_ZURAMAT = 7, + TYPE_CYANIGOSA = 8, + WORLD_STATE_VH = 3816, WORLD_STATE_VH_PRISON = 3815, WORLD_STATE_VH_PORTALS = 3810, - TYPE_EVENT = 10, - TYPE_EREKEM = 11, - TYPE_MORAGG = 12, - TYPE_ICHORON = 13, - TYPE_XEVOZZ = 14, - TYPE_LAVANTHOR = 15, - TYPE_ZURAMAT = 16, - TYPE_CYANIGOSA = 17, - TYPE_RIFT = 18, TYPE_LASTBOSS = 19, TYPE_DOOR = 21, TYPE_PORTAL_TIME = 22, @@ -46,6 +48,8 @@ enum DATA_XEVOZZ_DOOR = 36, DATA_LAVANTHOR_DOOR = 37, DATA_ZURAMAT_DOOR = 38, + DATA_EREKEM_DOOR_L = 39, + DATA_EREKEM_DOOR_R = 40, NPC_EREKEM = 29315, NPC_EREKEM_GUARD = 29395, diff --git a/scripts/northrend/violet_hold/instance_violet_hold.cpp b/scripts/northrend/violet_hold/instance_violet_hold.cpp index 3a0f654ab..1c4ae2246 100644 --- a/scripts/northrend/violet_hold/instance_violet_hold.cpp +++ b/scripts/northrend/violet_hold/instance_violet_hold.cpp @@ -73,7 +73,9 @@ struct MANGOS_DLL_DECL instance_violet_hold : public ScriptedInstance void Initialize() { - memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); +// memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) + m_auiEncounter[i] = NOT_STARTED; m_uiSinclariGUID = 0; m_uiNPCSealDoorGUID = 0; @@ -206,8 +208,12 @@ struct MANGOS_DLL_DECL instance_violet_hold : public ScriptedInstance Clear(); InitWorldState(); } - else if (uiData == FAIL) - DoUseDoorOrButton(m_uiSealDoorGUID); + else if (uiData == FAIL) DoUseDoorOrButton(m_uiSealDoorGUID); + else if (uiData == DONE) + { + DoUpdateWorldState(WORLD_STATE_VH, 0); + DoUseDoorOrButton(m_uiSealDoorGUID); + } m_auiEncounter[0] = uiData; break; case TYPE_EREKEM: @@ -235,12 +241,7 @@ struct MANGOS_DLL_DECL instance_violet_hold : public ScriptedInstance if (uiData == IN_PROGRESS) bIsInBoss = true; break; case TYPE_RIFT: - if (uiData == SPECIAL){ - ++m_uiRiftPortalCount; - DoUpdateWorldState(WORLD_STATE_VH_PORTALS, m_uiRiftPortalCount); - } - else if (uiData == FAIL) - DoUseDoorOrButton(m_uiSealDoorGUID); + if (uiData == FAIL) DoUseDoorOrButton(m_uiSealDoorGUID); m_auiEncounter[1] = uiData; break; case TYPE_DOOR: @@ -337,6 +338,10 @@ struct MANGOS_DLL_DECL instance_violet_hold : public ScriptedInstance return m_uiSealDoorGUID; case DATA_EREKEM_DOOR: return m_uiErekemDoorGUID; + case DATA_EREKEM_DOOR_L: + return m_uiErekemDoorLeftGUID; + case DATA_EREKEM_DOOR_R: + return m_uiErekemDoorRightGUID; case DATA_MORAGG_DOOR: return m_uiMoraggDoorGUID; case DATA_ICHORON_DOOR: diff --git a/scripts/northrend/violet_hold/violet_hold.cpp b/scripts/northrend/violet_hold/violet_hold.cpp index 44c5a411a..fbae35a40 100644 --- a/scripts/northrend/violet_hold/violet_hold.cpp +++ b/scripts/northrend/violet_hold/violet_hold.cpp @@ -217,6 +217,8 @@ struct MANGOS_DLL_DECL mob_vh_dragonsAI : public ScriptedAI m_creature->GetMotionMaster()->Clear(false); m_creature->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); DoCast(pDoorSeal, SPELL_CORRUPT); + if (Unit* m_uEmbraceTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + m_creature->GetMotionMaster()->MoveChase(m_uEmbraceTarget); } } @@ -539,17 +541,17 @@ struct MANGOS_DLL_DECL npc_sinclariAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { - if(m_pInstance->GetData(TYPE_EVENT) == NOT_STARTED) + if(m_pInstance->GetData(TYPE_EVENT) != IN_PROGRESS) return; - if (m_uiNextPortal_Timer) + if (m_uiNextPortal_Timer && m_pInstance->GetData(TYPE_RIFT) != DONE) { if (m_uiNextPortal_Timer <= uiDiff) { ++m_uiRiftPortalCount; - if (m_pInstance && m_uiRiftPortalCount < 19) + if (m_pInstance && m_uiRiftPortalCount < 19) { - if ( m_uiRiftPortalCount < 19) m_pInstance->DoUpdateWorldState(WORLD_STATE_VH, m_uiRiftPortalCount); + m_pInstance->DoUpdateWorldState(WORLD_STATE_VH_PORTALS, m_uiRiftPortalCount); m_pInstance->SetData(TYPE_RIFT, SPECIAL); } @@ -559,7 +561,7 @@ struct MANGOS_DLL_DECL npc_sinclariAI : public ScriptedAI && m_uiRiftPortalCount != 12 && m_uiRiftPortalCount != 15 && m_uiRiftPortalCount != 18 - && m_uiRiftPortalCount != 19 ) + && m_uiRiftPortalCount < 19 ) { DoSpawnPortal(); if (m_uiRiftPortalCount < 12) @@ -581,7 +583,6 @@ struct MANGOS_DLL_DECL npc_sinclariAI : public ScriptedAI pSummoned->AddThreat(pTemp); pTemp->CastSpell(pSummoned, SPELL_PORTAL_CHANNEL, false); } - m_pInstance->DoUpdateWorldState(WORLD_STATE_VH, m_uiRiftPortalCount); m_pInstance->SetData(TYPE_RIFT, IN_PROGRESS); m_uiBossCheck_Timer = 1000; m_uiNextPortal_Timer = m_bIsRegular ? 180000 : 120000; @@ -605,8 +606,7 @@ struct MANGOS_DLL_DECL npc_sinclariAI : public ScriptedAI if (m_uiBossCheck_Timer <= uiDiff) { if (!m_pInstance->GetData(DATA_BOSSTIME)) - m_uiNextPortal_Timer = 30000; - + m_uiNextPortal_Timer = 10000; m_uiBossCheck_Timer = 1000; } else @@ -811,10 +811,16 @@ struct MANGOS_DLL_DECL npc_azure_saboteurAI : public ScriptedAI else if (m_uiDisruptionCounter == 3) { m_pInstance->DoUseDoorOrButton(m_uiDoorGUID); - m_pInstance->SetData(m_pInstance->GetData(TYPE_LASTBOSS_ID), SPECIAL); + if (m_uiBossType == TYPE_EREKEM) { + m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(DATA_EREKEM_DOOR_L)); + m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(DATA_EREKEM_DOOR_R)); + } } - else + else { m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + m_pInstance->SetData(m_pInstance->GetData(TYPE_LASTBOSS_ID), SPECIAL); + m_bIsActiving = false; + } ++m_uiDisruptionCounter; m_uiDisruption_Timer = 1000; From 067940056e08f5dda4098b6940fafba8942c9608 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Fri, 22 Jan 2010 17:19:24 +0300 Subject: [PATCH 111/405] Violet hold rewrite part 7 --- .../violet_hold/instance_violet_hold.cpp | 59 +++++++++++++++++-- scripts/northrend/violet_hold/violet_hold.cpp | 29 ++++++--- 2 files changed, 75 insertions(+), 13 deletions(-) diff --git a/scripts/northrend/violet_hold/instance_violet_hold.cpp b/scripts/northrend/violet_hold/instance_violet_hold.cpp index 1c4ae2246..1ed974231 100644 --- a/scripts/northrend/violet_hold/instance_violet_hold.cpp +++ b/scripts/northrend/violet_hold/instance_violet_hold.cpp @@ -41,6 +41,7 @@ struct MANGOS_DLL_DECL instance_violet_hold : public ScriptedInstance instance_violet_hold(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string m_strInstData; bool bIsInBoss; @@ -208,8 +209,7 @@ struct MANGOS_DLL_DECL instance_violet_hold : public ScriptedInstance Clear(); InitWorldState(); } - else if (uiData == FAIL) DoUseDoorOrButton(m_uiSealDoorGUID); - else if (uiData == DONE) + else if (uiData == FAIL || uiData == DONE) { DoUpdateWorldState(WORLD_STATE_VH, 0); DoUseDoorOrButton(m_uiSealDoorGUID); @@ -247,16 +247,19 @@ struct MANGOS_DLL_DECL instance_violet_hold : public ScriptedInstance case TYPE_DOOR: if (uiData == SPECIAL) { - --m_uiShieldPercent; + m_uiShieldPercent = m_uiShieldPercent - 5; if(m_uiShieldPercent > 0) DoUpdateWorldState(WORLD_STATE_VH_PRISON, m_uiShieldPercent); else + { DoUpdateWorldState(WORLD_STATE_VH, 0); + DoUseDoorOrButton(m_uiSealDoorGUID); m_auiEncounter[0] = FAIL; + } } break; case TYPE_DISRUPTIONS: m_uiDisruptions = uiData; - DoUpdateWorldState(WORLD_STATE_VH_PRISON, 100-m_uiDisruptions*5); +// DoUpdateWorldState(WORLD_STATE_VH_PRISON, 100-m_uiDisruptions*5); break; case TYPE_LASTBOSS_ID: m_uiLastBossIDConst = uiData; @@ -264,7 +267,21 @@ struct MANGOS_DLL_DECL instance_violet_hold : public ScriptedInstance } if (uiData == DONE) + { bIsInBoss = false; + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + saveStream << m_auiEncounter[i] << " "; + + m_strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } + } uint32 GetData(uint32 uiType) @@ -297,6 +314,12 @@ struct MANGOS_DLL_DECL instance_violet_hold : public ScriptedInstance else { m_uiLastBossID = urand(2, 7); + if ( m_auiEncounter[2] == DONE && + m_auiEncounter[3] == DONE && + m_auiEncounter[4] == DONE && + m_auiEncounter[5] == DONE && + m_auiEncounter[6] == DONE && + m_auiEncounter[7] == DONE) return 0; while ( m_auiEncounter[m_uiLastBossID] == DONE || m_auiEncounter[m_uiLastBossID] == IN_PROGRESS || m_auiEncounter[m_uiLastBossID] == SPECIAL ) @@ -355,6 +378,34 @@ struct MANGOS_DLL_DECL instance_violet_hold : public ScriptedInstance } return 0; } + +const char* Save() + { + return m_strInstData.c_str(); + } + +void Load(const char* strIn) + { + if (!strIn) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(strIn); + + std::istringstream loadStream(strIn); + + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + loadStream >> m_auiEncounter[i]; + + if (m_auiEncounter[i] == IN_PROGRESS && i != 1) + m_auiEncounter[i] = NOT_STARTED; + } + + OUT_LOAD_INST_DATA_COMPLETE; + } }; InstanceData* GetInstanceData_instance_violet_hold(Map* pMap) diff --git a/scripts/northrend/violet_hold/violet_hold.cpp b/scripts/northrend/violet_hold/violet_hold.cpp index fbae35a40..0f59aa156 100644 --- a/scripts/northrend/violet_hold/violet_hold.cpp +++ b/scripts/northrend/violet_hold/violet_hold.cpp @@ -74,6 +74,7 @@ struct MANGOS_DLL_DECL mob_vh_dragonsAI : public ScriptedAI uint32 WalkTimer; int8 portalLoc; bool IsWalking; + bool IsInCombat; bool MovementStarted; Creature* pDoorSeal; @@ -102,6 +103,7 @@ struct MANGOS_DLL_DECL mob_vh_dragonsAI : public ScriptedAI WalkTimer = 200; portalLoc = -1; IsWalking = false; + IsInCombat = false; MovementStarted = false; pDoorSeal = GetClosestCreatureWithEntry(m_creature, NPC_DOOR_SEAL, 150.0f); @@ -209,18 +211,24 @@ struct MANGOS_DLL_DECL mob_vh_dragonsAI : public ScriptedAI } //Corrupt Seal - if(pDoorSeal){ - if(m_creature->IsWithinDist(pDoorSeal, 20.0f, false) && !m_creature->IsNonMeleeSpellCasted(false)) + if(pDoorSeal && !IsInCombat){ + if(m_creature->IsWithinDist(pDoorSeal, 27.0f, false)) { IsWalking = false; WayPointList.clear(); m_creature->GetMotionMaster()->Clear(false); m_creature->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); DoCast(pDoorSeal, SPELL_CORRUPT); - if (Unit* m_uEmbraceTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) - m_creature->GetMotionMaster()->MoveChase(m_uEmbraceTarget); + m_pInstance->SetData(TYPE_DOOR,SPECIAL); } } + if(!IsWalking && !IsInCombat) { + if (Unit* m_uEmbraceTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + m_creature->GetMotionMaster()->MoveChase(m_uEmbraceTarget); + m_creature->SetInCombatWithZone(); + IsInCombat = true; + } + //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -680,8 +688,9 @@ struct MANGOS_DLL_DECL npc_door_sealAI : public ScriptedAI if (SpellCorrupt_Timer) return; - if (spell->Id == SPELL_CORRUPT) + if (spell->Id == SPELL_CORRUPT) { SpellCorrupt_Timer = 1000; + } } void JustDied(Unit* pKiller) { @@ -693,8 +702,6 @@ struct MANGOS_DLL_DECL npc_door_sealAI : public ScriptedAI { if (SpellCorrupt_Timer <= diff) { - m_pInstance->SetData(TYPE_DOOR,SPECIAL); - if (m_creature->HasAura(SPELL_CORRUPT,0)) SpellCorrupt_Timer = 1500; else @@ -780,9 +787,13 @@ struct MANGOS_DLL_DECL npc_azure_saboteurAI : public ScriptedAI m_uiBossGUID = m_pInstance->GetData64(DATA_XEVOZZ); m_uiDoorGUID = m_pInstance->GetData64(DATA_XEVOZZ_DOOR); break; + case 0: // No boss + m_uiBossType = 0; + break; } m_pInstance->SetData(TYPE_LASTBOSS_ID, m_uiBossType); - m_creature->GetMotionMaster()->MovePoint(0, BossLoc[m_uiBossID].x, BossLoc[m_uiBossID].y, BossLoc[m_uiBossID].z); + if (m_uiBossType != 0) m_creature->GetMotionMaster()->MovePoint(0, BossLoc[m_uiBossID].x, BossLoc[m_uiBossID].y, BossLoc[m_uiBossID].z); + else m_creature->GetMotionMaster()->MovePoint(0, 1827.960, 804.208, 44.364); } } @@ -818,7 +829,7 @@ struct MANGOS_DLL_DECL npc_azure_saboteurAI : public ScriptedAI } else { m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - m_pInstance->SetData(m_pInstance->GetData(TYPE_LASTBOSS_ID), SPECIAL); + if (m_pInstance->GetData(TYPE_LASTBOSS_ID) != 0) m_pInstance->SetData(m_pInstance->GetData(TYPE_LASTBOSS_ID), SPECIAL); m_bIsActiving = false; } From 12c94eb0d30cb3925d9af31a74ce2c3c8ceb4120 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sat, 23 Jan 2010 20:31:38 +0300 Subject: [PATCH 112/405] Array sizes limit rewrite --- scripts/northrend/ulduar/ulduar/instance_ulduar.cpp | 2 +- scripts/northrend/violet_hold/instance_violet_hold.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 72360e7c1..a1453ae21 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -59,7 +59,7 @@ struct MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance uint64 mAncientGateGUID; uint64 m_uiKologarnBridgeGUID; // - uint32 mEncounter[ENCOUNTERS]; + uint32 mEncounter[ENCOUNTERS+1]; uint32 mLeviathanReached; uint32 mXT002Reached; uint32 mMimironReached; diff --git a/scripts/northrend/violet_hold/instance_violet_hold.cpp b/scripts/northrend/violet_hold/instance_violet_hold.cpp index 1ed974231..ee6493b37 100644 --- a/scripts/northrend/violet_hold/instance_violet_hold.cpp +++ b/scripts/northrend/violet_hold/instance_violet_hold.cpp @@ -40,7 +40,7 @@ struct MANGOS_DLL_DECL instance_violet_hold : public ScriptedInstance { instance_violet_hold(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; - uint32 m_auiEncounter[MAX_ENCOUNTER]; + uint32 m_auiEncounter[MAX_ENCOUNTER+1]; std::string m_strInstData; bool bIsInBoss; From aa7a167caabee671c74c009eb7246df87dd1cff6 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sun, 24 Jan 2010 15:45:26 +0300 Subject: [PATCH 113/405] Merge fix add --- Makefile.am | 6 - .../violet_hold/instance_violet_hold.cpp | 136 +----------------- 2 files changed, 1 insertion(+), 141 deletions(-) diff --git a/Makefile.am b/Makefile.am index a4bfb9868..38a4e0cab 100644 --- a/Makefile.am +++ b/Makefile.am @@ -395,17 +395,11 @@ scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp \ scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp \ scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp \ scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h \ -<<<<<<< HEAD:Makefile.am scripts/northrend/vault_of_archavon/boss_emalon.cpp \ scripts/northrend/vault_of_archavon/boss_koralon.cpp \ scripts/northrend/vault_of_archavon/boss_archavon.cpp \ scripts/northrend/vault_of_archavon/instance_vault_of_archavon.cpp \ scripts/northrend/vault_of_archavon/vault_of_archavon.h \ -======= -scripts/northrend/violet_hold/instance_violet_hold.cpp \ -scripts/northrend/violet_hold/violet_hold.cpp \ -scripts/northrend/violet_hold/violet_hold.h \ ->>>>>>> 34f04f48e097cdb62d2bdece85864948aca5ada8:Makefile.am scripts/outland/blades_edge_mountains.cpp \ scripts/outland/boss_doomlord_kazzak.cpp \ scripts/outland/boss_doomwalker.cpp \ diff --git a/scripts/northrend/violet_hold/instance_violet_hold.cpp b/scripts/northrend/violet_hold/instance_violet_hold.cpp index 22fe8d328..c8b284844 100644 --- a/scripts/northrend/violet_hold/instance_violet_hold.cpp +++ b/scripts/northrend/violet_hold/instance_violet_hold.cpp @@ -1,8 +1,4 @@ -<<<<<<< HEAD:scripts/northrend/violet_hold/instance_violet_hold.cpp -/* Copyright (C) 2006 - 2009 ScriptDev2 -======= /* Copyright (C) 2006 - 2010 ScriptDev2 ->>>>>>> 34f04f48e097cdb62d2bdece85864948aca5ada8:scripts/northrend/violet_hold/instance_violet_hold.cpp * 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 @@ -19,9 +15,8 @@ */ /* ScriptData -<<<<<<< HEAD:scripts/northrend/violet_hold/instance_violet_hold.cpp SDName: Instance The Violet Hold -SD%Complete: 0% +SD%Complete: 60% SDComment: SDCategory: The Violet Hold EndScriptData */ @@ -412,131 +407,6 @@ void Load(const char* strIn) OUT_LOAD_INST_DATA_COMPLETE; } }; -======= -SDName: Instance_Violet_Hold -SD%Complete: 25 -SDComment: "experimental" use of header/source object -SDCategory: Violet Hold -EndScriptData */ - -#include "precompiled.h" -#include "violet_hold.h" - -instance_violet_hold::instance_violet_hold(Map* pMap) : ScriptedInstance(pMap), - m_uiSinclariGUID(0), - m_uiErekemGUID(0), - m_uiMoraggGUID(0), - m_uiIchoronGUID(0), - m_uiXevozzGUID(0), - m_uiLavanthorGUID(0), - m_uiZuramatGUID(0), - - m_uiCellErekemGuard_LGUID(0), - m_uiCellErekemGuard_RGUID(0), - m_uiIntroCrystalGUID(0), - - m_uiWorldState(0), - m_uiWorldStateSealCount(100), - m_uiWorldStatePortalCount(0) -{ - Initialize(); -} - -void instance_violet_hold::Initialize() -{ - memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); -} - -void instance_violet_hold::OnCreatureCreate(Creature* pCreature) -{ - switch(pCreature->GetEntry()) - { - case NPC_SINCLARI: m_uiSinclariGUID = pCreature->GetGUID(); break; - case NPC_DOOR_SEAL: m_uiDoorSealGUID = pCreature->GetGUID(); break; - case NPC_EREKEM: m_uiErekemGUID = pCreature->GetGUID(); break; - case NPC_MORAGG: m_uiMoraggGUID = pCreature->GetGUID(); break; - case NPC_ICHORON: m_uiIchoronGUID = pCreature->GetGUID(); break; - case NPC_XEVOZZ: m_uiXevozzGUID = pCreature->GetGUID(); break; - case NPC_LAVANTHOR: m_uiLavanthorGUID = pCreature->GetGUID(); break; - case NPC_ZURAMAT: m_uiZuramatGUID = pCreature->GetGUID(); break; - } -} - -void instance_violet_hold::OnObjectCreate(GameObject* pGo) -{ - switch(pGo->GetEntry()) - { - case GO_CELL_LAVANTHOR: - m_mBossToCellMap.insert(BossToCellMap::value_type(NPC_LAVANTHOR, pGo->GetGUID())); - break; - case GO_CELL_MORAGG: - m_mBossToCellMap.insert(BossToCellMap::value_type(NPC_MORAGG, pGo->GetGUID())); - break; - case GO_CELL_ZURAMAT: - m_mBossToCellMap.insert(BossToCellMap::value_type(NPC_ZURAMAT, pGo->GetGUID())); - break; - case GO_CELL_XEVOZZ: - m_mBossToCellMap.insert(BossToCellMap::value_type(NPC_XEVOZZ, pGo->GetGUID())); - break; - case GO_CELL_ICHORON: - m_mBossToCellMap.insert(BossToCellMap::value_type(NPC_ICHORON, pGo->GetGUID())); - break; - case GO_CELL_EREKEM: - m_mBossToCellMap.insert(BossToCellMap::value_type(NPC_EREKEM, pGo->GetGUID())); - break; - case GO_CELL_EREKEM_GUARD_L: - m_mBossToCellMap.insert(BossToCellMap::value_type(NPC_EREKEM, pGo->GetGUID())); - break; - case GO_CELL_EREKEM_GUARD_R: - m_mBossToCellMap.insert(BossToCellMap::value_type(NPC_EREKEM, pGo->GetGUID())); - break; - - case GO_INTRO_CRYSTAL: - m_uiIntroCrystalGUID = pGo->GetGUID(); - break; - case GO_PRISON_SEAL_DOOR: - m_uiDoorSealGUID = pGo->GetGUID(); - break; - } -} - -void instance_violet_hold::SetCellForBoss(uint32 uiBossEntry) -{ - BossToCellMap::const_iterator itrCellLower = m_mBossToCellMap.lower_bound(uiBossEntry); - BossToCellMap::const_iterator itrCellUpper = m_mBossToCellMap.upper_bound(uiBossEntry); - - if (itrCellLower == itrCellUpper) - return; - - for(BossToCellMap::const_iterator itr = itrCellLower; itr != itrCellUpper; ++itr) - DoUseDoorOrButton(itr->second); -} - -void instance_violet_hold::SetWorldState(bool bEnable) -{ - if (bEnable) - m_uiWorldState = 1; - else - m_uiWorldState = 0; - - DoUpdateWorldState(WORLD_STATE_ID, m_uiWorldState); - DoUpdateWorldState(WORLD_STATE_SEAL, m_uiWorldStateSealCount); - DoUpdateWorldState(WORLD_STATE_PORTALS, m_uiWorldStatePortalCount); -} - -void instance_violet_hold::SetData(uint32 uiType, uint32 uiData) -{ - switch(uiType) - { - case TYPE_MAIN: - m_auiEncounter[0] = uiData; - break; - case TYPE_SEAL: - m_auiEncounter[1] = uiData; - break; - } -} ->>>>>>> 34f04f48e097cdb62d2bdece85864948aca5ada8:scripts/northrend/violet_hold/instance_violet_hold.cpp InstanceData* GetInstanceData_instance_violet_hold(Map* pMap) { @@ -548,10 +418,6 @@ void AddSC_instance_violet_hold() Script *newscript; newscript = new Script; newscript->Name = "instance_violet_hold"; -<<<<<<< HEAD:scripts/northrend/violet_hold/instance_violet_hold.cpp newscript->GetInstanceData = &GetInstanceData_instance_violet_hold; -======= - newscript->GetInstanceData = GetInstanceData_instance_violet_hold; ->>>>>>> 34f04f48e097cdb62d2bdece85864948aca5ada8:scripts/northrend/violet_hold/instance_violet_hold.cpp newscript->RegisterSelf(); } From 855380ec3cab6d6b948d5e46e4b3886141c3f671 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sun, 24 Jan 2010 17:24:10 +0300 Subject: [PATCH 114/405] nubRekan grid lock delete --- scripts/northrend/naxxramas/boss_anubrekhan.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/northrend/naxxramas/boss_anubrekhan.cpp b/scripts/northrend/naxxramas/boss_anubrekhan.cpp index 8e6b04ae8..ab4e5330d 100644 --- a/scripts/northrend/naxxramas/boss_anubrekhan.cpp +++ b/scripts/northrend/naxxramas/boss_anubrekhan.cpp @@ -176,8 +176,8 @@ struct MANGOS_DLL_DECL boss_anubrekhanAI : public ScriptedAI MaNGOS::CreatureListSearcher searcher(m_creature, creatureList, check); TypeContainerVisitor, GridTypeMapContainer> visitor(searcher); - CellLock cell_lock(cell, pair); - cell_lock->Visit(cell_lock, visitor, *(m_creature->GetMap())); +// CellLock cell_lock(cell, pair); +// cell_lock->Visit(cell_lock, visitor, *(m_creature->GetMap())); return creatureList; } From 5ce150ca3d72cb35e3758940f78177f351de8553 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Mon, 25 Jan 2010 19:10:36 +0300 Subject: [PATCH 115/405] Anub'rekhan change --- scripts/northrend/naxxramas/boss_anubrekhan.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/northrend/naxxramas/boss_anubrekhan.cpp b/scripts/northrend/naxxramas/boss_anubrekhan.cpp index ab4e5330d..2bc030184 100644 --- a/scripts/northrend/naxxramas/boss_anubrekhan.cpp +++ b/scripts/northrend/naxxramas/boss_anubrekhan.cpp @@ -176,8 +176,7 @@ struct MANGOS_DLL_DECL boss_anubrekhanAI : public ScriptedAI MaNGOS::CreatureListSearcher searcher(m_creature, creatureList, check); TypeContainerVisitor, GridTypeMapContainer> visitor(searcher); -// CellLock cell_lock(cell, pair); -// cell_lock->Visit(cell_lock, visitor, *(m_creature->GetMap())); + cell.Visit(pair, visitor, *(m_creature->GetMap()),*m_creature, 100); return creatureList; } From 802da0724f24063c1ad2e2722800cb61d5564060 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Mon, 25 Jan 2010 19:12:30 +0300 Subject: [PATCH 116/405] Violet hold SQL patch --- addition/716_the_violet_hold_mangos.sql | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/addition/716_the_violet_hold_mangos.sql b/addition/716_the_violet_hold_mangos.sql index b456edfb7..bfe19ce5f 100644 --- a/addition/716_the_violet_hold_mangos.sql +++ b/addition/716_the_violet_hold_mangos.sql @@ -45,6 +45,7 @@ DELETE FROM `spell_script_target` WHERE `entry` IN (54160,59474); INSERT INTO spell_script_target VALUES (54160, 1, 29266); INSERT INTO spell_script_target VALUES (59474, 1, 29266); -UPDATE creature_template SET ScriptName="npc_door_seal_vh", unit_flags=33816580 WHERE entry=30896; -UPDATE creature_template SET faction_A=35, faction_H=35 WHERE entry=30658; -UPDATE creature_template SET faction_A=1720, faction_H=1720, ScriptName="mob_vh_dragons", minlevel=70,maxlevel=70,minhealth=7000,maxhealth=8000 WHERE entry IN (30660, 30661, 30662, 30663, 30664, 30666, 30667, 30668, 32191, 30695); +UPDATE `creature_template` SET `ScriptName`='npc_door_seal_vh', unit_flags=33816580 WHERE entry=30896; +UPDATE `creature_template` SET `faction_A`=35, faction_H=35 WHERE entry=30658; +UPDATE `creature_template` SET `faction_A`=1720, faction_H=1720, ScriptName='mob_vh_dragons', minlevel=70,maxlevel=70,minhealth=7000,maxhealth=8000 WHERE entry IN (30660, 30661, 30662, 30663, 30664, 30666, 30667, 30668, 32191, 30695); + From dd2f9857b74bf52d6cefde7eae95be5d31257ce4 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 27 Jan 2010 20:48:19 +0300 Subject: [PATCH 117/405] Added pattern for new scripts --- addition/4_mangos_arena_honor.sql | 2 +- .../boss_grand_champions.cpp | 15 +++ .../northrend/violet_hold/boss_ichoron.cpp | 15 ++- scripts/northrend/violet_hold/violet_hold.cpp | 8 +- scripts/northrend/violet_hold/violet_hold.h | 126 ------------------ 5 files changed, 28 insertions(+), 138 deletions(-) delete mode 100644 scripts/northrend/violet_hold/violet_hold.h diff --git a/addition/4_mangos_arena_honor.sql b/addition/4_mangos_arena_honor.sql index a2ff34aab..9c08ee744 100644 --- a/addition/4_mangos_arena_honor.sql +++ b/addition/4_mangos_arena_honor.sql @@ -1,2 +1,2 @@ DELETE FROM `creature_template` WHERE `entry`=7; -INSERT INTO `creature_template` VALUES ('7','0','0','0','0','0','17858','0','17858','0','Besdoban Durnoye','Arena-Honor Exchange',NULL,'59','61','6700','24000','5598','5875','20','35','35','1','1.48','0','0','170','182','0','1235','1','1400','1900','0','0','0','0','0','0','0','0','0','0','100','7','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','1','3','0','1','0','0','0','0','0','0','0','0','1','0','0','0','npc_arena_honor'); +INSERT INTO `creature_template` VALUES ('7','0','0','0','0','0','17858','0','17858','0','Besdoban Durnoye','Arena-Honor Exchange',NULL,'0','59','61','6700','24000','5598','5875','20','35','35','1','1.48','0','0','170','182','0','1235','1','1400','1900','0','0','0','0','0','0','0','0','0','0','100','7','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','1','3','0','1','0','0','0','0','0','0','0','0','1','0','0','0','npc_arena_honor'); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp index 7717576b2..dd9708b18 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp @@ -95,6 +95,8 @@ struct MANGOS_DLL_DECL mob_toc5_warriorAI : public ScriptedAI void EnterEvadeMode() { + if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == IN_PROGRESS) + { if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) if (!pTemp->isAlive()) { @@ -137,6 +139,7 @@ struct MANGOS_DLL_DECL mob_toc5_warriorAI : public ScriptedAI pTemp->SendMonsterMove(754.360779, 660.816162, 412.395996, 4.698700, pTemp->GetMonsterMoveFlags(), 1); pTemp->GetMap()->CreatureRelocation(pTemp, 754.360779, 660.816162, 412.395996, 4.698700); } + } } void Aggro(Unit* pWho) @@ -249,6 +252,8 @@ struct MANGOS_DLL_DECL mob_toc5_mageAI : public ScriptedAI void EnterEvadeMode() { + if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == IN_PROGRESS) + { if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) if (!pTemp->isAlive()) { @@ -291,6 +296,7 @@ struct MANGOS_DLL_DECL mob_toc5_mageAI : public ScriptedAI pTemp->SendMonsterMove(754.360779, 660.816162, 412.395996, 4.698700, pTemp->GetMonsterMoveFlags(), 1); pTemp->GetMap()->CreatureRelocation(pTemp, 754.360779, 660.816162, 412.395996, 4.698700); } + } } void Aggro(Unit* pWho) @@ -400,6 +406,8 @@ struct MANGOS_DLL_DECL mob_toc5_shamanAI : public ScriptedAI void EnterEvadeMode() { + if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == IN_PROGRESS) + { if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) if (!pTemp->isAlive()) { @@ -442,6 +450,7 @@ struct MANGOS_DLL_DECL mob_toc5_shamanAI : public ScriptedAI pTemp->SendMonsterMove(754.360779, 660.816162, 412.395996, 4.698700, pTemp->GetMonsterMoveFlags(), 1); pTemp->GetMap()->CreatureRelocation(pTemp, 754.360779, 660.816162, 412.395996, 4.698700); } + } } void Aggro(Unit* pWho) @@ -596,6 +605,8 @@ struct MANGOS_DLL_DECL mob_toc5_hunterAI : public ScriptedAI void EnterEvadeMode() { + if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == IN_PROGRESS) + { if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) if (!pTemp->isAlive()) { @@ -638,6 +649,7 @@ struct MANGOS_DLL_DECL mob_toc5_hunterAI : public ScriptedAI pTemp->SendMonsterMove(754.360779, 660.816162, 412.395996, 4.698700, pTemp->GetMonsterMoveFlags(), 1); pTemp->GetMap()->CreatureRelocation(pTemp, 754.360779, 660.816162, 412.395996, 4.698700); } + } } void Aggro(Unit* pWho) @@ -761,6 +773,8 @@ struct MANGOS_DLL_DECL mob_toc5_rogueAI : public ScriptedAI void EnterEvadeMode() { + if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == IN_PROGRESS) + { if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) if (!pTemp->isAlive()) { @@ -803,6 +817,7 @@ struct MANGOS_DLL_DECL mob_toc5_rogueAI : public ScriptedAI pTemp->SendMonsterMove(754.360779, 660.816162, 412.395996, 4.698700, pTemp->GetMonsterMoveFlags(), 1); pTemp->GetMap()->CreatureRelocation(pTemp, 754.360779, 660.816162, 412.395996, 4.698700); } + } } void Aggro(Unit* pWho) diff --git a/scripts/northrend/violet_hold/boss_ichoron.cpp b/scripts/northrend/violet_hold/boss_ichoron.cpp index dbcd71109..dd6c3c648 100644 --- a/scripts/northrend/violet_hold/boss_ichoron.cpp +++ b/scripts/northrend/violet_hold/boss_ichoron.cpp @@ -112,7 +112,7 @@ struct MANGOS_DLL_DECL boss_ichoronAI : public ScriptedAI if (m_creature->Attack(pWho, true)) { - DoCast(m_creature, SPELL_PROTECTIVE_BUBBLE); +// DoCast(m_creature, SPELL_PROTECTIVE_BUBBLE); m_creature->AddThreat(pWho); m_creature->SetInCombatWith(pWho); pWho->SetInCombatWith(m_creature); @@ -183,13 +183,14 @@ struct MANGOS_DLL_DECL boss_ichoronAI : public ScriptedAI //DoCast(m_creature, SPELL_DRAINED); m_bIsExploded = true; m_uiShowup_Counter = 0; + DoCast(m_creature, SPELL_PROTECTIVE_BUBBLE); m_creature->AttackStop(); - m_creature->SetVisibility(VISIBILITY_OFF); +// m_creature->SetVisibility(VISIBILITY_OFF); for(uint8 i = 0; i < 10; i++) { - //int tmp = urand(0, 5); - //m_creature->SummonCreature(NPC_ICHOR_GLOBULE, PortalLoc[tmp].x, PortalLoc[tmp].y, PortalLoc[tmp].z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); - m_creature->SummonCreature(NPC_ICHOR_GLOBULE, m_creature->GetPositionX()-10+rand()%20, m_creature->GetPositionY()-10+rand()%20, m_creature->GetPositionZ(), 0, TEMPSUMMON_CORPSE_DESPAWN, 0); + int tmp = urand(0, 5); + m_creature->SummonCreature(NPC_ICHOR_GLOBULE, PortalLoc[tmp].x, PortalLoc[tmp].y, PortalLoc[tmp].z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); + //m_creature->SummonCreature(NPC_ICHOR_GLOBULE, m_creature->GetPositionX()-10+rand()%20, m_creature->GetPositionY()-10+rand()%20, m_creature->GetPositionZ(), 0, TEMPSUMMON_CORPSE_DESPAWN, 0); } } m_uiBuubleChecker_Timer = 3000; @@ -207,10 +208,10 @@ struct MANGOS_DLL_DECL boss_ichoronAI : public ScriptedAI } if (!bIsWaterElementsAlive || m_uiShowup_Counter > 20) { - DoCast(m_creature, SPELL_PROTECTIVE_BUBBLE); m_bIsExploded = false; m_uiShowup_Counter = 0; - m_creature->SetVisibility(VISIBILITY_ON); +// m_creature->SetVisibility(VISIBILITY_ON); + m_creature->SetInCombatWithZone(); m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); } m_uiBuubleChecker_Timer = 1000; diff --git a/scripts/northrend/violet_hold/violet_hold.cpp b/scripts/northrend/violet_hold/violet_hold.cpp index 99f6dff1b..823db4e03 100644 --- a/scripts/northrend/violet_hold/violet_hold.cpp +++ b/scripts/northrend/violet_hold/violet_hold.cpp @@ -168,7 +168,7 @@ struct MANGOS_DLL_DECL mob_vh_dragonsAI : public ScriptedAI } uint8 wpId = 0; for(uint8 i = start; i <= end; ++i){ - error_log("AddWP: %u", i); + debug_log("AddWP: %u", i); AddWaypoint(wpId, DragonsWP[i].x, DragonsWP[i].y, DragonsWP[i].z); wpId++; } @@ -401,9 +401,9 @@ struct MANGOS_DLL_DECL npc_violet_portalAI : public ScriptedAI uint32 uiSpawnEntry = SelectRandSummon(); if(Creature* pSummoned = m_creature->SummonCreature(uiSpawnEntry, m_creature->GetPositionX()-5+rand()%10, m_creature->GetPositionY()-5+rand()%10, m_creature->GetPositionZ(), 0, TEMPSUMMON_CORPSE_DESPAWN, 0)) { - error_log("Spawnuje NPC %u, motherPortalID %u, portalLoc %u", uiSpawnEntry, portalID, portalLoc); + debug_log("Spawn NPC %u, motherPortalID %u, portalLoc %u", uiSpawnEntry, portalID, portalLoc); ((mob_vh_dragonsAI*)pSummoned->AI())->motherPortalID = portalID; - ((mob_vh_dragonsAI*)pSummoned->AI())->portalLoc = portalLoc; + ((mob_vh_dragonsAI*)pSummoned->AI())->portalLoc = portalLoc; } } } @@ -450,7 +450,7 @@ struct MANGOS_DLL_DECL npc_violet_portalAI : public ScriptedAI case 1: if (TimeRiftWave_Timer < diff) { - error_log("SpawnGroup()"); + debug_log("SpawnGroup()"); SpawnGroup(); TimeRiftWave_Timer = 15000; }else TimeRiftWave_Timer -= diff; diff --git a/scripts/northrend/violet_hold/violet_hold.h b/scripts/northrend/violet_hold/violet_hold.h deleted file mode 100644 index 9483e162c..000000000 --- a/scripts/northrend/violet_hold/violet_hold.h +++ /dev/null @@ -1,126 +0,0 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 - * This program is free software licensed under GPL version 2 - * Please see the included DOCS/LICENSE.TXT for more information */ - -#ifndef DEF_VIOLET_H -#define DEF_VIOLET_H - -enum -{ - MAX_ENCOUNTER = 2, - - TYPE_MAIN = 1, - TYPE_SEAL = 2, - - WORLD_STATE_ID = 3816, - WORLD_STATE_SEAL = 3815, - WORLD_STATE_PORTALS = 3810, - - GO_INTRO_CRYSTAL = 193615, - GO_PRISON_SEAL_DOOR = 191723, - - GO_CELL_LAVANTHOR = 191566, - GO_CELL_MORAGG = 191606, - GO_CELL_ZURAMAT = 191565, - GO_CELL_EREKEM = 191564, - GO_CELL_EREKEM_GUARD_L = 191563, - GO_CELL_EREKEM_GUARD_R = 191562, - GO_CELL_XEVOZZ = 191556, - GO_CELL_ICHORON = 191722, - - NPC_PORTAL_INTRO = 31011, - NPC_PORTAL_EVENT = 30679, // two exist, 32174 in addition (elite) - NPC_DOOR_SEAL = 30896, - - NPC_SINCLARI = 30658, // entry 32204, who is he? Possibly yeller for seal weakening. - NPC_HOLD_GUARD = 30659, - - NPC_EREKEM = 29315, - NPC_EREKEM_GUARD = 29395, - NPC_MORAGG = 29316, - NPC_ICHORON = 29313, - NPC_XEVOZZ = 29266, - NPC_LAVANTHOR = 29312, - NPC_ZURAMAT = 29314, - NPC_CYANIGOSA = 31134, - - NPC_PORTAL_GUARDIAN = 30660, - NPC_PORTAL_KEEPER = 30695, - - NPC_AZURE_INVADER = 30661, - NPC_AZURE_SPELLBREAKER = 30662, - NPC_AZURE_BINDER = 30663, - NPC_AZURE_MAGE_SLAYER = 30664, - NPC_MAGE_HUNTER = 30665, - NPC_AZURE_CAPTAIN = 30666, - NPC_AZURE_SORCEROR = 30667, - NPC_AZURE_RAIDER = 30668, - - // used for intro - NPC_AZURE_BINDER_INTRO = 31007, - NPC_AZURE_INVADER_INTRO = 31008, - NPC_AZURE_SPELLBREAKER_INTRO= 31009, - NPC_AZURE_MAGE_SLAYER_INTRO = 31010, - - NPC_AZURE_SABOTEUR = 31079, - - NPC_DEFENSE_SYSTEM = 30837, - NPC_DEFENSE_DUMMY_TARGET = 30857, - - SPELL_DEFENSE_SYSTEM_VISUAL = 57887, - SPELL_DEFENSE_SYSTEM_SPAWN = 57886, - - SPELL_DESTROY_DOOR_SEAL = 58040, // spell periodic cast by misc - - SAY_SEAL_75 = -1608002, - SAY_SEAL_50 = -1608003, - SAY_SEAL_5 = -1608004, - - EMOTE_GUARDIAN_PORTAL = -1608005, - EMOTE_DRAGONFLIGHT_PORTAL = -1608006, - EMOTE_KEEPER_PORTAL = -1608007, -}; - -class MANGOS_DLL_DECL instance_violet_hold : public ScriptedInstance -{ - public: - instance_violet_hold(Map* pMap); - - void Initialize(); - - void OnCreatureCreate(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); - - void SetCellForBoss(uint32 uiEntry); - void SetWorldState(bool bEnable = true); - - void SetData(uint32 uiType, uint32 uiData); - - typedef std::multimap BossToCellMap; - - protected: - - uint32 m_auiEncounter[MAX_ENCOUNTER]; - std::string strInstData; - - uint64 m_uiSinclariGUID; - uint64 m_uiErekemGUID; - uint64 m_uiMoraggGUID; - uint64 m_uiIchoronGUID; - uint64 m_uiXevozzGUID; - uint64 m_uiLavanthorGUID; - uint64 m_uiZuramatGUID; - - uint64 m_uiCellErekemGuard_LGUID; - uint64 m_uiCellErekemGuard_RGUID; - uint64 m_uiIntroCrystalGUID; - uint64 m_uiDoorSealGUID; - - uint32 m_uiWorldState; - uint32 m_uiWorldStateSealCount; - uint32 m_uiWorldStatePortalCount; - - BossToCellMap m_mBossToCellMap; -}; - -#endif From 79a59f2852a0fe9bcfcca70154f13b4b97e67ec1 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 27 Jan 2010 20:58:53 +0300 Subject: [PATCH 118/405] Merge and change --- addition/721_icecrown_mangos.sql | 4 + addition/722_malygos_mangos.sql | 4 + .../trial_of_the_crusader/def_crusader.h | 10 ++ .../forge_of_souls/def_forge.h | 17 +++ .../halls_of_reflection/def_halls.h | 17 +++ .../icecrown_citadel/pit_of_saron/def_pit.h | 17 +++ .../icecrown_citadel/spire/def_spire.h | 17 +++ .../spire/icecrown_teleport.cpp | 48 +++++++ .../spire/instance_icecrown_spire.cpp | 28 +++++ .../nexus/eye_of_eternity/boss_malygos.cpp | 119 ++++++++++++++++++ .../nexus/eye_of_eternity/eye_of_eternity.h | 13 ++ .../instance_eye_of_eternity.cpp | 109 ++++++++++++++++ 12 files changed, 403 insertions(+) create mode 100644 addition/721_icecrown_mangos.sql create mode 100644 addition/722_malygos_mangos.sql create mode 100644 scripts/northrend/crusaders_coliseum/trial_of_the_crusader/def_crusader.h create mode 100644 scripts/northrend/icecrown_citadel/forge_of_souls/def_forge.h create mode 100644 scripts/northrend/icecrown_citadel/halls_of_reflection/def_halls.h create mode 100644 scripts/northrend/icecrown_citadel/pit_of_saron/def_pit.h create mode 100644 scripts/northrend/icecrown_citadel/spire/def_spire.h create mode 100644 scripts/northrend/icecrown_citadel/spire/icecrown_teleport.cpp create mode 100644 scripts/northrend/icecrown_citadel/spire/instance_icecrown_spire.cpp create mode 100644 scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp create mode 100644 scripts/northrend/nexus/eye_of_eternity/eye_of_eternity.h create mode 100644 scripts/northrend/nexus/eye_of_eternity/instance_eye_of_eternity.cpp diff --git a/addition/721_icecrown_mangos.sql b/addition/721_icecrown_mangos.sql new file mode 100644 index 000000000..c2080d1f4 --- /dev/null +++ b/addition/721_icecrown_mangos.sql @@ -0,0 +1,4 @@ +DELETE FROM `gameobject` WHERE `guid` = 913334; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(913334, 202244, 631, 3, 1, -210.223, 2217.72, 199.97, 3.07661, 0, 0, 0.999472, 0.0324833, 0, 0, 1); +UPDATE `gameobject_template` SET ScriptName = 'icecrown_teleporter' WHERE `entry` IN (202242,202243,202244,202245); diff --git a/addition/722_malygos_mangos.sql b/addition/722_malygos_mangos.sql new file mode 100644 index 000000000..346e3965d --- /dev/null +++ b/addition/722_malygos_mangos.sql @@ -0,0 +1,4 @@ +update `creature_template` set `ScriptName` = 'boss_malygos' where `entry` = 28859; +update `instance_template` set `script` = 'instance_eye_of_eternity' where `map` = '616'; +update `gameobject` set `phaseMask`=65536, `spawntimesecs`='-604800' where id in(193905,193967); +update `gameobject_template` set `faction`=0 where entry in (193905,193967); \ No newline at end of file diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/def_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/def_crusader.h new file mode 100644 index 000000000..f74024642 --- /dev/null +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/def_crusader.h @@ -0,0 +1,10 @@ + +#ifndef DEF_CRUSADER_H +#define DEF_CRUSADER_H + +enum +{ + MAX_ENCOUNTERS = 15; + +}; +#endif diff --git a/scripts/northrend/icecrown_citadel/forge_of_souls/def_forge.h b/scripts/northrend/icecrown_citadel/forge_of_souls/def_forge.h new file mode 100644 index 000000000..c3c39feaa --- /dev/null +++ b/scripts/northrend/icecrown_citadel/forge_of_souls/def_forge.h @@ -0,0 +1,17 @@ + +#ifndef DEF_ICECROWN_FORGE_H +#define DEF_ICECROWN_FORGE_H + +enum +{ + MAX_ENCOUNTERS = 15; + + TYPE_BOSS_1 = 1, + + NPC_BOSS1 = 33113, + + GO_1 = 194232 + +}; + +#endif diff --git a/scripts/northrend/icecrown_citadel/halls_of_reflection/def_halls.h b/scripts/northrend/icecrown_citadel/halls_of_reflection/def_halls.h new file mode 100644 index 000000000..114da206c --- /dev/null +++ b/scripts/northrend/icecrown_citadel/halls_of_reflection/def_halls.h @@ -0,0 +1,17 @@ + +#ifndef DEF_ICECROWN_SPIRE_H +#define DEF_ICECROWN_SPIRE_H + +enum +{ + MAX_ENCOUNTERS = 15; + + TYPE_BOSS_1 = 1, + + NPC_BOSS1 = 33113, + + GO_1 = 194232 + +}; + +#endif diff --git a/scripts/northrend/icecrown_citadel/pit_of_saron/def_pit.h b/scripts/northrend/icecrown_citadel/pit_of_saron/def_pit.h new file mode 100644 index 000000000..114da206c --- /dev/null +++ b/scripts/northrend/icecrown_citadel/pit_of_saron/def_pit.h @@ -0,0 +1,17 @@ + +#ifndef DEF_ICECROWN_SPIRE_H +#define DEF_ICECROWN_SPIRE_H + +enum +{ + MAX_ENCOUNTERS = 15; + + TYPE_BOSS_1 = 1, + + NPC_BOSS1 = 33113, + + GO_1 = 194232 + +}; + +#endif diff --git a/scripts/northrend/icecrown_citadel/spire/def_spire.h b/scripts/northrend/icecrown_citadel/spire/def_spire.h new file mode 100644 index 000000000..d49bc1ca0 --- /dev/null +++ b/scripts/northrend/icecrown_citadel/spire/def_spire.h @@ -0,0 +1,17 @@ + +#ifndef DEF_ICECROWN_SPIRE_H +#define DEF_ICECROWN_SPIRE_H + +enum +{ + MAP_NUM = 631, + MAX_ENCOUNTERS = 15, + + TYPE_BOSS_1 = 1, + + BASE_CAMP = 1000, + + NPC_BOSS1 = 33113 +}; + +#endif diff --git a/scripts/northrend/icecrown_citadel/spire/icecrown_teleport.cpp b/scripts/northrend/icecrown_citadel/spire/icecrown_teleport.cpp new file mode 100644 index 000000000..a94004e01 --- /dev/null +++ b/scripts/northrend/icecrown_citadel/spire/icecrown_teleport.cpp @@ -0,0 +1,48 @@ +#include "precompiled.h" +#include "def_spire.h" + +static Locations PortalLoc[]= +{ +{-503.62, 2211.47, 62.8235}, // +{-17.1928, 2211.44, 30.1158}, // +{-549.131, 2211.29, 539.291}, // +{-615.145, 2211.47, 199.972}, // +{-210.223, 2217.72, 199.97}, +}; + +bool GOHello_icecrown_teleporter(Player *player, GameObject* pGo) +{ + + ScriptedInstance *pInstance = (ScriptedInstance *) creature->GetInstanceData(); + bool m_bIsRegularMode = pGo->GetMap()->IsRegularDifficulty(); + + if(!pInstance) return true; + + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, "Teleport to the 1", GOSSIP_SENDER_MAIN, BASE_CAMP); + + return true; +} + +bool GOSelect_icecrown_teleporter(Player *player, GameObject* pGo, uint32 sender, uint32 action) +{ + if(sender != GOSSIP_SENDER_MAIN) return true; + if(!player->getAttackers().empty()) return true; + + switch(action) + { + case BASE_CAMP: + player->TeleportTo(MAP_NUM, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z, 0); + player->CLOSE_GOSSIP_MENU(); break; + } + return true; +} + +void AddSC_icecrown_teleporter() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "icecrown_teleporter"; + newscript->pGOHello = &GOHello_icecrown_teleporter; + newscript->pGOSelect = &GOSelect_icecrown_teleporter; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/icecrown_citadel/spire/instance_icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/spire/instance_icecrown_spire.cpp new file mode 100644 index 000000000..35b7b9526 --- /dev/null +++ b/scripts/northrend/icecrown_citadel/spire/instance_icecrown_spire.cpp @@ -0,0 +1,28 @@ +/* Copyright (C) 2006 - 2010 ScriptDev2 +* 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, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "precompiled.h" +#include "def_spire.h" + + +void AddSC_instance_icecrown_spire() +{ + Script* pNewScript; + pNewScript = new Script; + pNewScript->Name = "instance_icecrown_spire"; + pNewScript->GetInstanceData = &GetInstanceData_instance_icecrown_spire; + pNewScript->RegisterSelf(); +} diff --git a/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp b/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp new file mode 100644 index 000000000..fec875cf1 --- /dev/null +++ b/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp @@ -0,0 +1,119 @@ +/* +SDName: Boss malygos +SDAuthor: Easy +SD%Complete: +SDComment: +SDCategory: +Script Data End */ + +#include "precompiled.h" +#include "eye_of_eternity.h" + +#define SPELL_ARCANE_BREATH_N 56272 +#define SPELL_ARCANE_BREATH_H 60072 +#define SPELL_ARCANE_PULSE 57432 +#define SPELL_ARCANE_STORM_1 57459 +#define SPELL_ARCANE_STORM_2 61693 +#define SPELL_ARCANE_STORM_3 61694 + +#define SAY_DEATH -1616007 +#define SAY_PHASE1 -1616013 +#define SAY_PHASE2 -1616018 +#define SAY_PHASE3 -1616024 + +struct MANGOS_DLL_DECL boss_malygosAI : public ScriptedAI +{ + boss_malygosAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + + uint32 phase; + uint32 SPELL_ARCANE_BREATH_Timer; + uint32 SPELL_ARCANE_STORM_Timer; + uint32 SPELL_ARCANE_PULSE_Timer; + + void Reset() + { + phase = 0; + SPELL_ARCANE_BREATH_Timer = 3000; + SPELL_ARCANE_STORM_Timer = 1000; + SPELL_ARCANE_PULSE_Timer = 1500; + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) <= 10){ + if (phase != 3) + DoScriptText(SAY_PHASE3, m_creature); + phase = 3; + }else if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) <= 50){ + if (phase != 2) + DoScriptText(SAY_PHASE2, m_creature); + phase = 2; + }else{ + if (phase != 1) + DoScriptText(SAY_PHASE1, m_creature); + phase = 1; + } + + if (SPELL_ARCANE_BREATH_Timer <= uiDiff) + { + DoCast(m_creature, m_bIsRegularMode ? SPELL_ARCANE_BREATH_N : SPELL_ARCANE_BREATH_H); + SPELL_ARCANE_BREATH_Timer = 50000; + } else SPELL_ARCANE_BREATH_Timer -= uiDiff; + + if (SPELL_ARCANE_PULSE_Timer <= uiDiff && phase > 1) + { + DoCast(m_creature, SPELL_ARCANE_PULSE); + SPELL_ARCANE_PULSE_Timer = 20000; + } else SPELL_ARCANE_PULSE_Timer -= uiDiff; + + if (SPELL_ARCANE_STORM_Timer <= uiDiff) + { + switch (phase) + { + case 1: DoCast(m_creature, SPELL_ARCANE_STORM_1); break; + case 2: DoCast(m_creature, SPELL_ARCANE_STORM_1); break; + case 3: DoCast(m_creature, SPELL_ARCANE_STORM_1); break; + } + SPELL_ARCANE_STORM_Timer = 3000; + } else SPELL_ARCANE_STORM_Timer -= uiDiff; + + DoMeleeAttackIfReady(); + } + void JustDied(Unit* killer) + { + DoScriptText(SAY_DEATH, m_creature); + if (m_pInstance) + m_pInstance->SetData(TYPE_MALYGOS, DONE); + } + void KilledUnit(Unit *victim) + { + if (victim == m_creature) + return; + } +}; + +CreatureAI* GetAI_boss_malygos(Creature* pCreature) +{ + return new boss_malygosAI (pCreature); +} + +void AddSC_boss_malygos() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_malygos"; + newscript->GetAI = &GetAI_boss_malygos; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/nexus/eye_of_eternity/eye_of_eternity.h b/scripts/northrend/nexus/eye_of_eternity/eye_of_eternity.h new file mode 100644 index 000000000..b1b422b1e --- /dev/null +++ b/scripts/northrend/nexus/eye_of_eternity/eye_of_eternity.h @@ -0,0 +1,13 @@ +#ifndef DEF_EYE_OF_ETERNITY_H +#define DEF_EYE_OF_ETERNITY_H + +enum eTypes +{ + MAX_ENCOUNTER = 1, + + TYPE_MALYGOS = 0, + DATA_MALIGOS = 10, + NPC_MALYGOS = 28859 +}; + +#endif diff --git a/scripts/northrend/nexus/eye_of_eternity/instance_eye_of_eternity.cpp b/scripts/northrend/nexus/eye_of_eternity/instance_eye_of_eternity.cpp new file mode 100644 index 000000000..d3a1d8bff --- /dev/null +++ b/scripts/northrend/nexus/eye_of_eternity/instance_eye_of_eternity.cpp @@ -0,0 +1,109 @@ +#include "precompiled.h" +#include "eye_of_eternity.h" + +enum eGameObjects +{ + GO_Malygos_CHEST_HERO = 193967, + GO_Malygos_CHEST = 193905 +}; + +struct MANGOS_DLL_DECL instance_eye_of_eternity : public ScriptedInstance +{ + instance_eye_of_eternity(Map* pMap) : ScriptedInstance(pMap), MalygosChest(NULL) { Initialize(); }; + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + + uint64 m_uiMalygosGUID; + + uint64 MalygosChest; + + void Initialize() + { + m_uiMalygosGUID = 0; + MalygosChest = 0; + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + } + + void OnCreatureCreate(Creature* pCreature) + { + switch(pCreature->GetEntry()) + { + case NPC_MALYGOS: + m_uiMalygosGUID = pCreature->GetGUID(); + break; + } + + } + + void OnObjectCreate(GameObject* pGo) + { + switch(pGo->GetEntry()) + { + case GO_Malygos_CHEST_HERO: + MalygosChest = pGo->GetGUID(); + if (m_auiEncounter[TYPE_MALYGOS] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_Malygos_CHEST: + MalygosChest = pGo->GetGUID(); + if (m_auiEncounter[TYPE_MALYGOS] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + } + } + + void SetData(uint32 type, uint32 data) + { + switch(type) + { + case TYPE_MALYGOS: + m_auiEncounter[TYPE_MALYGOS] = data; + if (data == DONE && MalygosChest) + DoRespawnGameObject(MalygosChest, 30*MINUTE); + break; + } + + if (data == DONE) + { + OUT_SAVE_INST_DATA; + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } + } + + uint64 GetData64(uint32 data) + { + switch(data) + { + case TYPE_MALYGOS: + return m_uiMalygosGUID; + } + + return 0; + } + + uint32 GetData(uint32 type) + { + switch(type) + { + case TYPE_MALYGOS: + return m_auiEncounter[type]; + } + + return 0; + } +}; + +InstanceData* GetInstanceData_instance_eye_of_eternity(Map* pMap) +{ + return new instance_eye_of_eternity(pMap); +} + +void AddSC_instance_eye_of_eternity() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "instance_eye_of_eternity"; + newscript->GetInstanceData = &GetInstanceData_instance_eye_of_eternity; + newscript->RegisterSelf(); +} From 6727f3288cc349848f5425669cb7c01b022b1fac Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 27 Jan 2010 22:48:32 +0300 Subject: [PATCH 119/405] Restore my version of violet hold --- scripts/northrend/violet_hold/violet_hold.cpp | 196 --------------- scripts/northrend/violet_hold/violet_hold.h | 229 ------------------ 2 files changed, 425 deletions(-) delete mode 100644 scripts/northrend/violet_hold/violet_hold.h diff --git a/scripts/northrend/violet_hold/violet_hold.cpp b/scripts/northrend/violet_hold/violet_hold.cpp index f1214420b..823db4e03 100644 --- a/scripts/northrend/violet_hold/violet_hold.cpp +++ b/scripts/northrend/violet_hold/violet_hold.cpp @@ -22,13 +22,6 @@ SD%Complete: 60 SDCategory: The Violet Hold EndScriptData */ -/* ContentData -go_activation_crystal -npc_door_seal -npc_sinclari -npc_teleportation_portal -EndContentData */ - #include "precompiled.h" #include "def_violet_hold.h" enum @@ -63,7 +56,6 @@ uint32 m_uiNextPortal_Timer; ## they have to be scripted in SD2 because in EventAI you cant ## check for distance from door seal :/ ## (Intro not implented yet) -## go_activation_crystal ######*/ struct MANGOS_DLL_DECL mob_vh_dragonsAI : public ScriptedAI { @@ -869,194 +861,6 @@ CreatureAI* GetAI_npc_door_seal(Creature* pCreature) return new npc_door_sealAI(pCreature); } -/*###### -## npc_teleportation_portal -######*/ - -struct MANGOS_DLL_DECL npc_teleportation_portalAI : public ScriptedAI -{ - npc_teleportation_portalAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_pInstance = (instance_violet_hold*)pCreature->GetInstanceData(); - m_uiMyPortalNumber = 0; - Reset(); - } - - instance_violet_hold* m_pInstance; - - std::set m_lMobSet; - - bool m_bNeedInvisible; - bool m_bIntro; - uint32 m_uiIntroTimer; - uint32 m_uiMyPortalNumber; - - void Reset() - { - m_bNeedInvisible = false; - m_bIntro = false; - m_uiIntroTimer = 10000; - - if (m_pInstance) - m_uiMyPortalNumber = m_pInstance->GetCurrentPortalNumber(); - } - - void DoSummon() - { - if (m_creature->GetEntry() == NPC_PORTAL_INTRO) - { - //not made yet - return; - } - else if (m_creature->GetEntry() == NPC_PORTAL) - { - m_creature->SummonCreature(m_pInstance->GetRandomPortalEliteEntry(), 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600*IN_MILISECONDS); - m_creature->CastSpell(m_creature, SPELL_PORTAL_PERIODIC, true); - } - else if (m_pInstance->IsCurrentPortalForTrash()) - { - for(uint8 i = 0; i < 4; ++i) - { - uint32 uiSummonId; - - switch(i) - { - case 0: uiSummonId = NPC_AZURE_CAPTAIN; break; - case 1: uiSummonId = NPC_AZURE_RAIDER; break; - case 2: uiSummonId = NPC_AZURE_SORCEROR; break; - case 3: uiSummonId = NPC_AZURE_STALKER; break; - } - - m_creature->SummonCreature(uiSummonId, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600*IN_MILISECONDS); - } - - m_bNeedInvisible = true; - } - else - { - m_creature->SummonCreature(NPC_AZURE_SABOTEUR, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600*IN_MILISECONDS); - m_bNeedInvisible = true; - } - } - - void JustSummoned(Creature* pSummoned) - { - switch(pSummoned->GetEntry()) - { - case NPC_PORTAL_GUARDIAN: - DoScriptText(EMOTE_GUARDIAN_PORTAL, pSummoned); - m_creature->CastSpell(pSummoned, SPELL_PORTAL_CHANNEL, false); - break; - case NPC_PORTAL_KEEPER: - DoScriptText(EMOTE_KEEPER_PORTAL, pSummoned); - m_creature->CastSpell(pSummoned, SPELL_PORTAL_CHANNEL, false); - break; - case NPC_AZURE_CAPTAIN: - DoScriptText(EMOTE_DRAGONFLIGHT_PORTAL, pSummoned); - m_lMobSet.insert(pSummoned->GetGUID()); - break; - case NPC_AZURE_RAIDER: - case NPC_AZURE_SORCEROR: - case NPC_AZURE_STALKER: - m_lMobSet.insert(pSummoned->GetGUID()); - return; - default: - return; - } - - if (m_pInstance) - m_pInstance->SetData(TYPE_PORTAL, SPECIAL); - } - - void SummonedCreatureJustDied(Creature* pSummoned) - { - switch(pSummoned->GetEntry()) - { - case NPC_PORTAL_GUARDIAN: - case NPC_PORTAL_KEEPER: - break; - case NPC_AZURE_CAPTAIN: - case NPC_AZURE_RAIDER: - case NPC_AZURE_SORCEROR: - case NPC_AZURE_STALKER: - { - m_lMobSet.erase(pSummoned->GetGUID()); - - if (!m_lMobSet.empty()) - return; - - break; - } - default: - return; - } - - if (m_pInstance) - { - // no need if a new portal was made while this was in progress - if (m_uiMyPortalNumber == m_pInstance->GetCurrentPortalNumber()) - m_pInstance->SetData(TYPE_PORTAL, DONE); - } - - m_creature->ForcedDespawn(); - } - - void UpdateAI(const uint32 uiDiff) - { - if (m_uiIntroTimer) - { - if (m_uiIntroTimer <= uiDiff) - { - if (!m_pInstance) - { - m_creature->ForcedDespawn(); - return; - } - - m_uiIntroTimer = 0; - } - else - { - m_uiIntroTimer -= uiDiff; - return; - } - } - - if (!m_bIntro) - { - DoSummon(); - m_bIntro = true; - } - - if (m_bNeedInvisible) - { - // hack; find a better way - m_creature->SetVisibility(VISIBILITY_OFF); - m_bNeedInvisible = false; - } - } -}; - -CreatureAI* GetAI_npc_teleportation_portal(Creature* pCreature) -{ - return new npc_teleportation_portalAI(pCreature); -} - -bool EffectDummyCreature_npc_teleportation_portal(Unit* pCaster, uint32 uiSpellId, uint32 uiEffIndex, Creature* pCreatureTarget) -{ - //always check spellid and effectindex - if (uiSpellId == SPELL_PORTAL_PERIODIC && uiEffIndex == 0) - { - if (instance_violet_hold* pInstance = (instance_violet_hold*)pCreatureTarget->GetInstanceData()) - pCreatureTarget->SummonCreature(pInstance->GetRandomMobForNormalPortal(), 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600*IN_MILISECONDS); - - //always return true when we are handling this spell and effect - return true; - } - - return false; -} - void AddSC_violet_hold() { Script *newscript; diff --git a/scripts/northrend/violet_hold/violet_hold.h b/scripts/northrend/violet_hold/violet_hold.h deleted file mode 100644 index 0def59e32..000000000 --- a/scripts/northrend/violet_hold/violet_hold.h +++ /dev/null @@ -1,229 +0,0 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 - * This program is free software licensed under GPL version 2 - * Please see the included DOCS/LICENSE.TXT for more information */ - -#ifndef DEF_VIOLET_H -#define DEF_VIOLET_H - -enum -{ - MAX_ENCOUNTER = 3, - - TYPE_MAIN = 1, - TYPE_SEAL = 2, - TYPE_PORTAL = 3, - - WORLD_STATE_ID = 3816, - WORLD_STATE_SEAL = 3815, - WORLD_STATE_PORTALS = 3810, - - GO_INTRO_CRYSTAL = 193615, - GO_PRISON_SEAL_DOOR = 191723, - - GO_CELL_LAVANTHOR = 191566, - GO_CELL_MORAGG = 191606, - GO_CELL_ZURAMAT = 191565, - GO_CELL_EREKEM = 191564, - GO_CELL_EREKEM_GUARD_L = 191563, - GO_CELL_EREKEM_GUARD_R = 191562, - GO_CELL_XEVOZZ = 191556, - GO_CELL_ICHORON = 191722, - - NPC_EVENT_CONTROLLER = 30883, - NPC_PORTAL_INTRO = 31011, - NPC_PORTAL = 30679, - NPC_PORTAL_ELITE = 32174, - NPC_DOOR_SEAL = 30896, - - NPC_SINCLARI = 30658, - NPC_SINCLARI_ALT = 32204, // yeller for seal weakening and summoner for portals - NPC_HOLD_GUARD = 30659, - - NPC_EREKEM = 29315, - NPC_EREKEM_GUARD = 29395, - NPC_MORAGG = 29316, - NPC_ICHORON = 29313, - NPC_XEVOZZ = 29266, - NPC_LAVANTHOR = 29312, - NPC_ZURAMAT = 29314, - NPC_CYANIGOSA = 31134, - - NPC_PORTAL_GUARDIAN = 30660, - NPC_PORTAL_KEEPER = 30695, - - NPC_AZURE_INVADER = 30661, - NPC_AZURE_SPELLBREAKER = 30662, - NPC_AZURE_BINDER = 30663, - NPC_AZURE_MAGE_SLAYER = 30664, - NPC_MAGE_HUNTER = 30665, - NPC_AZURE_CAPTAIN = 30666, - NPC_AZURE_SORCEROR = 30667, - NPC_AZURE_RAIDER = 30668, - NPC_AZURE_STALKER = 32191, - - // used for intro - NPC_AZURE_BINDER_INTRO = 31007, - NPC_AZURE_INVADER_INTRO = 31008, - NPC_AZURE_SPELLBREAKER_INTRO= 31009, - NPC_AZURE_MAGE_SLAYER_INTRO = 31010, - - NPC_AZURE_SABOTEUR = 31079, - - NPC_DEFENSE_SYSTEM = 30837, - NPC_DEFENSE_DUMMY_TARGET = 30857, - - NPC_ARAKKOA = 32226, - NPC_VOID_LORD = 32230, - NPC_ETHERAL = 32231, - NPC_SWIRLING = 32234, - NPC_WATCHER = 32235, - NPC_LAVA_HOUND = 32237, - - SPELL_DEFENSE_SYSTEM_VISUAL = 57887, - SPELL_DEFENSE_SYSTEM_SPAWN = 57886, - - SPELL_DESTROY_DOOR_SEAL = 58040, // spell periodic cast by misc - SPELL_TELEPORTATION_PORTAL = 57687, // visual aura, but possibly not used? creature_template model for portals are same - - SPELL_SHIELD_DISRUPTION = 58291, // dummy when opening a cell - - SPELL_PORTAL_PERIODIC = 58008, // most likely the tick for each summon (tick each 15 seconds) - SPELL_PORTAL_CHANNEL = 58012, // the blue "stream" between portal and guardian/keeper - SPELL_PORTAL_BEAM = 56046, // large beam, unsure if really used here (or possible for something different) - - SPELL_PORTAL_VISUAL_1 = 57872, // no idea, but is possibly related based on it's visual appearence - SPELL_PORTAL_VISUAL_2 = 57630, - - SAY_SEAL_75 = -1608002, - SAY_SEAL_50 = -1608003, - SAY_SEAL_5 = -1608004, - - EMOTE_GUARDIAN_PORTAL = -1608005, - EMOTE_DRAGONFLIGHT_PORTAL = -1608006, - EMOTE_KEEPER_PORTAL = -1608007, - - MAX_NORMAL_PORTAL = 8 -}; - -static float fDefenseSystemLoc[3] = {1890.746460, 803.311096, 61.745369}; - -enum ePortalType -{ - PORTAL_TYPE_NORM = 0, - PORTAL_TYPE_SQUAD, - PORTAL_TYPE_BOSS, -}; - -struct sPortalData -{ - ePortalType pPortalType; - float fX, fY, fZ, fOrient; -}; - -static sPortalData afPortalLocation[]= -{ - {PORTAL_TYPE_NORM, 1936.07, 803.198, 53.3749, 3.1241}, //balcony - {PORTAL_TYPE_NORM, 1877.51, 850.104, 44.6599, 4.7822}, //erekem - {PORTAL_TYPE_NORM, 1890.64, 753.471, 48.7224, 1.7104}, //moragg - {PORTAL_TYPE_SQUAD, 1911.06, 802.103, 38.6465, 2.8908}, //below balcony - {PORTAL_TYPE_SQUAD, 1928.06, 763.256, 51.3167, 2.3905}, //bridge - {PORTAL_TYPE_SQUAD, 1924.26, 847.661, 47.1591, 4.0202}, //zuramat - {PORTAL_TYPE_NORM, 1914.16, 832.527, 38.6441, 3.5160}, //xevozz - {PORTAL_TYPE_NORM, 1857.30, 764.145, 38.6543, 0.8339}, //lavanthor - {PORTAL_TYPE_BOSS, 1890.73, 803.309, 38.4001, 2.4139}, //center -}; - -class MANGOS_DLL_DECL instance_violet_hold : public ScriptedInstance -{ - public: - instance_violet_hold(Map* pMap); - ~instance_violet_hold() {} - - void Initialize(); - void ResetAll(); - void ResetVariables(); - - void OnCreatureCreate(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); - - void UpdateCellForBoss(uint32 uiBossEntry); - void UpdateWorldState(bool bEnable = true); - - void SetIntroPortals(bool bDeactivate); - void SpawnPortal(); - - void SetPortalId(); - - void CallGuards(bool bRespawn); - - uint32 GetRandomPortalEliteEntry(); - uint32 GetRandomMobForNormalPortal(); - - uint32 GetCurrentPortalNumber() { return m_uiWorldStatePortalCount; } - - sPortalData const* GetPortalData() { return &afPortalLocation[m_uiPortalId]; } - - bool IsCurrentPortalForTrash() - { - if (m_uiWorldStatePortalCount % 6) - return true; - - return false; - } - - bool IsNextPortalForTrash() - { - if ((m_uiWorldStatePortalCount+1) % 6) - return true; - - return false; - } - - void ProcessActivationCrystal(Unit* pUser, bool bIsIntro = false); - - void SetRandomBosses(); - - void OnPlayerEnter(Player* pPlayer); - - void SetData(uint32 uiType, uint32 uiData); - uint64 GetData64(uint32 uiData); - - void Update(uint32 uiDiff); - - typedef std::multimap BossToCellMap; - - protected: - - uint32 m_auiEncounter[MAX_ENCOUNTER]; - std::string strInstData; - - uint64 m_uiSinclariGUID; - uint64 m_uiSinclariAltGUID; - uint64 m_uiErekemGUID; - uint64 m_uiMoraggGUID; - uint64 m_uiIchoronGUID; - uint64 m_uiXevozzGUID; - uint64 m_uiLavanthorGUID; - uint64 m_uiZuramatGUID; - - uint64 m_uiCellErekemGuard_LGUID; - uint64 m_uiCellErekemGuard_RGUID; - uint64 m_uiIntroCrystalGUID; - uint64 m_uiDoorSealGUID; - - uint32 m_uiWorldState; - uint32 m_uiWorldStateSealCount; - uint32 m_uiWorldStatePortalCount; - - uint8 m_uiPortalId; - uint32 m_uiPortalTimer; - uint32 m_uiMaxCountPortalLoc; - - BossToCellMap m_mBossToCellMap; - - std::list m_lIntroPortalList; - std::list m_lGuardsList; - std::list m_lRandomBossList; -}; - -#endif From 74bb9285917a054d1e115330a82589c8d331557b Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 28 Jan 2010 18:49:49 +0300 Subject: [PATCH 120/405] Added teleport to IceCrown spire instance --- Makefile.am | 1 + addition/721_icecrown_mangos.sql | 35 ++++++++- .../icecrown_citadel/spire/def_spire.h | 14 +++- .../spire/icecrown_teleport.cpp | 75 +++++++++++++------ system/ScriptLoader.cpp | 4 + 5 files changed, 103 insertions(+), 26 deletions(-) diff --git a/Makefile.am b/Makefile.am index 38a4e0cab..6ba25998f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -512,6 +512,7 @@ scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_malganis.cpp \ scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_meathook.cpp \ scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp \ scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_salramm.cpp \ +scripts/northrend/icecrown_citadel/spire/icecrown_teleport.cpp \ scripts/world/areatrigger_scripts.cpp \ scripts/world/boss_emeriss.cpp \ scripts/world/boss_lethon.cpp \ diff --git a/addition/721_icecrown_mangos.sql b/addition/721_icecrown_mangos.sql index c2080d1f4..37ceb109a 100644 --- a/addition/721_icecrown_mangos.sql +++ b/addition/721_icecrown_mangos.sql @@ -1,4 +1,35 @@ DELETE FROM `gameobject` WHERE `guid` = 913334; + INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES -(913334, 202244, 631, 3, 1, -210.223, 2217.72, 199.97, 3.07661, 0, 0, 0.999472, 0.0324833, 0, 0, 1); -UPDATE `gameobject_template` SET ScriptName = 'icecrown_teleporter' WHERE `entry` IN (202242,202243,202244,202245); +(913334, 202244, 631, 3, 1, -209.5, 2211.91, 199.97, 3.07661, 0, 0, 0.999472, 0.0324833, 0, 0, 1); + +UPDATE `gameobject_template` SET ScriptName = 'go_icecrown_teleporter' WHERE `entry` IN (202242,202243,202244,202245); + +DELETE FROM `creature_template` WHERE `entry` = 99322; +INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES +(99322, 0, 0, 0, 0, 0, 22448, 0, 22448, 0, 'IceCrown teleporter', '', NULL, 0, 80, 80, 64200, 64200, 12300, 12300, 9730, 35, 35, 1, 1.48, 0.5, 0, 294, 441, 0, 110, 1.4, 1400, 1400, 0, 0, 0, 0, 0, 0, 0, 0, 235, 353, 88, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 1, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 'icecrown_teleporter'); +REPLACE INTO `locales_creature` values ('99322','IceCrown teleporter','','','','','','','Телепортер цитадели Ледяной короны',NULL,NULL,NULL,NULL,NULL,NULL,NULL,''); + +DELETE FROM `creature` WHERE `guid` IN (599322,599323,599324,599325,599326); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES +(599322, 99322, 631, 3, 1, 0, 0, -209.5, 2211.91, 199.97, 0, 3600, 0, 0, 64200, 12300, 0, 0), +(599323, 99322, 631, 3, 1, 0, 0, -503.62, 2211.47, 62.8235, 0, 3600, 0, 0, 64200, 12300, 0, 0), +(599324, 99322, 631, 3, 1, 0, 0, -17.1928, 2211.44, 30.1158, 0, 3600, 0, 0, 64200, 12300, 0, 0), +(599325, 99322, 631, 3, 1, 0, 0, -549.131, 2211.29, 539.291, 0, 3600, 0, 0, 64200, 12300, 0, 0), +(599326, 99322, 631, 3, 1, 0, 0, -615.145, 2211.47, 199.972, 0, 3600, 0, 0, 64200, 12300, 0, 0); + +DELETE FROM `locales_npc_text` WHERE `entry` = 99322; +INSERT INTO `locales_npc_text` (`entry`, `Text0_0_loc1`, `Text0_0_loc2`, `Text0_0_loc3`, `Text0_0_loc4`, `Text0_0_loc5`, `Text0_0_loc6`, `Text0_0_loc7`, `Text0_0_loc8`, `Text0_1_loc1`, `Text0_1_loc2`, `Text0_1_loc3`, `Text0_1_loc4`, `Text0_1_loc5`, `Text0_1_loc6`, `Text0_1_loc7`, `Text0_1_loc8`, `Text1_0_loc1`, `Text1_0_loc2`, `Text1_0_loc3`, `Text1_0_loc4`, `Text1_0_loc5`, `Text1_0_loc6`, `Text1_0_loc7`, `Text1_0_loc8`, `Text1_1_loc1`, `Text1_1_loc2`, `Text1_1_loc3`, `Text1_1_loc4`, `Text1_1_loc5`, `Text1_1_loc6`, `Text1_1_loc7`, `Text1_1_loc8`, `Text2_0_loc1`, `Text2_0_loc2`, `Text2_0_loc3`, `Text2_0_loc4`, `Text2_0_loc5`, `Text2_0_loc6`, `Text2_0_loc7`, `Text2_0_loc8`, `Text2_1_loc1`, `Text2_1_loc2`, `Text2_1_loc3`, `Text2_1_loc4`, `Text2_1_loc5`, `Text2_1_loc6`, `Text2_1_loc7`, `Text2_1_loc8`, `Text3_0_loc1`, `Text3_0_loc2`, `Text3_0_loc3`, `Text3_0_loc4`, `Text3_0_loc5`, `Text3_0_loc6`, `Text3_0_loc7`, `Text3_0_loc8`, `Text3_1_loc1`, `Text3_1_loc2`, `Text3_1_loc3`, `Text3_1_loc4`, `Text3_1_loc5`, `Text3_1_loc6`, `Text3_1_loc7`, `Text3_1_loc8`, `Text4_0_loc1`, `Text4_0_loc2`, `Text4_0_loc3`, `Text4_0_loc4`, `Text4_0_loc5`, `Text4_0_loc6`, `Text4_0_loc7`, `Text4_0_loc8`, `Text4_1_loc1`, `Text4_1_loc2`, `Text4_1_loc3`, `Text4_1_loc4`, `Text4_1_loc5`, `Text4_1_loc6`, `Text4_1_loc7`, `Text4_1_loc8`, `Text5_0_loc1`, `Text5_0_loc2`, `Text5_0_loc3`, `Text5_0_loc4`, `Text5_0_loc5`, `Text5_0_loc6`, `Text5_0_loc7`, `Text5_0_loc8`, `Text5_1_loc1`, `Text5_1_loc2`, `Text5_1_loc3`, `Text5_1_loc4`, `Text5_1_loc5`, `Text5_1_loc6`, `Text5_1_loc7`, `Text5_1_loc8`, `Text6_0_loc1`, `Text6_0_loc2`, `Text6_0_loc3`, `Text6_0_loc4`, `Text6_0_loc5`, `Text6_0_loc6`, `Text6_0_loc7`, `Text6_0_loc8`, `Text6_1_loc1`, `Text6_1_loc2`, `Text6_1_loc3`, `Text6_1_loc4`, `Text6_1_loc5`, `Text6_1_loc6`, `Text6_1_loc7`, `Text6_1_loc8`, `Text7_0_loc1`, `Text7_0_loc2`, `Text7_0_loc3`, `Text7_0_loc4`, `Text7_0_loc5`, `Text7_0_loc6`, `Text7_0_loc7`, `Text7_0_loc8`, `Text7_1_loc1`, `Text7_1_loc2`, `Text7_1_loc3`, `Text7_1_loc4`, `Text7_1_loc5`, `Text7_1_loc6`, `Text7_1_loc7`, `Text7_1_loc8`) VALUES +(99322, 'Teleporter is functional. Player $N can teleport to:', NULL, NULL, NULL, NULL, NULL, NULL, 'Приветствую $N! Телепортер функционирует нормально. Вы можете переместиться в следущие места:', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Приветствую $N', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, ''); + +DELETE FROM `npc_text` WHERE `ID` = 99322; +INSERT INTO `npc_text` (`ID`, `text0_0`, `text0_1`, `lang0`, `prob0`, `em0_0`, `em0_1`, `em0_2`, `em0_3`, `em0_4`, `em0_5`, `text1_0`, `text1_1`, `lang1`, `prob1`, `em1_0`, `em1_1`, `em1_2`, `em1_3`, `em1_4`, `em1_5`, `text2_0`, `text2_1`, `lang2`, `prob2`, `em2_0`, `em2_1`, `em2_2`, `em2_3`, `em2_4`, `em2_5`, `text3_0`, `text3_1`, `lang3`, `prob3`, `em3_0`, `em3_1`, `em3_2`, `em3_3`, `em3_4`, `em3_5`, `text4_0`, `text4_1`, `lang4`, `prob4`, `em4_0`, `em4_1`, `em4_2`, `em4_3`, `em4_4`, `em4_5`, `text5_0`, `text5_1`, `lang5`, `prob5`, `em5_0`, `em5_1`, `em5_2`, `em5_3`, `em5_4`, `em5_5`, `text6_0`, `text6_1`, `lang6`, `prob6`, `em6_0`, `em6_1`, `em6_2`, `em6_3`, `em6_4`, `em6_5`, `text7_0`, `text7_1`, `lang7`, `prob7`, `em7_0`, `em7_1`, `em7_2`, `em7_3`, `em7_4`, `em7_5`) VALUES +(99322, 'Teleporter is functional. Player $N can teleport to:', 'Teleporter is functional. Player $N can teleport to:', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0); + +DELETE FROM `locales_npc_text` WHERE `entry` = 99323; +INSERT INTO `locales_npc_text` (`entry`, `Text0_0_loc1`, `Text0_0_loc2`, `Text0_0_loc3`, `Text0_0_loc4`, `Text0_0_loc5`, `Text0_0_loc6`, `Text0_0_loc7`, `Text0_0_loc8`, `Text0_1_loc1`, `Text0_1_loc2`, `Text0_1_loc3`, `Text0_1_loc4`, `Text0_1_loc5`, `Text0_1_loc6`, `Text0_1_loc7`, `Text0_1_loc8`, `Text1_0_loc1`, `Text1_0_loc2`, `Text1_0_loc3`, `Text1_0_loc4`, `Text1_0_loc5`, `Text1_0_loc6`, `Text1_0_loc7`, `Text1_0_loc8`, `Text1_1_loc1`, `Text1_1_loc2`, `Text1_1_loc3`, `Text1_1_loc4`, `Text1_1_loc5`, `Text1_1_loc6`, `Text1_1_loc7`, `Text1_1_loc8`, `Text2_0_loc1`, `Text2_0_loc2`, `Text2_0_loc3`, `Text2_0_loc4`, `Text2_0_loc5`, `Text2_0_loc6`, `Text2_0_loc7`, `Text2_0_loc8`, `Text2_1_loc1`, `Text2_1_loc2`, `Text2_1_loc3`, `Text2_1_loc4`, `Text2_1_loc5`, `Text2_1_loc6`, `Text2_1_loc7`, `Text2_1_loc8`, `Text3_0_loc1`, `Text3_0_loc2`, `Text3_0_loc3`, `Text3_0_loc4`, `Text3_0_loc5`, `Text3_0_loc6`, `Text3_0_loc7`, `Text3_0_loc8`, `Text3_1_loc1`, `Text3_1_loc2`, `Text3_1_loc3`, `Text3_1_loc4`, `Text3_1_loc5`, `Text3_1_loc6`, `Text3_1_loc7`, `Text3_1_loc8`, `Text4_0_loc1`, `Text4_0_loc2`, `Text4_0_loc3`, `Text4_0_loc4`, `Text4_0_loc5`, `Text4_0_loc6`, `Text4_0_loc7`, `Text4_0_loc8`, `Text4_1_loc1`, `Text4_1_loc2`, `Text4_1_loc3`, `Text4_1_loc4`, `Text4_1_loc5`, `Text4_1_loc6`, `Text4_1_loc7`, `Text4_1_loc8`, `Text5_0_loc1`, `Text5_0_loc2`, `Text5_0_loc3`, `Text5_0_loc4`, `Text5_0_loc5`, `Text5_0_loc6`, `Text5_0_loc7`, `Text5_0_loc8`, `Text5_1_loc1`, `Text5_1_loc2`, `Text5_1_loc3`, `Text5_1_loc4`, `Text5_1_loc5`, `Text5_1_loc6`, `Text5_1_loc7`, `Text5_1_loc8`, `Text6_0_loc1`, `Text6_0_loc2`, `Text6_0_loc3`, `Text6_0_loc4`, `Text6_0_loc5`, `Text6_0_loc6`, `Text6_0_loc7`, `Text6_0_loc8`, `Text6_1_loc1`, `Text6_1_loc2`, `Text6_1_loc3`, `Text6_1_loc4`, `Text6_1_loc5`, `Text6_1_loc6`, `Text6_1_loc7`, `Text6_1_loc8`, `Text7_0_loc1`, `Text7_0_loc2`, `Text7_0_loc3`, `Text7_0_loc4`, `Text7_0_loc5`, `Text7_0_loc6`, `Text7_0_loc7`, `Text7_0_loc8`, `Text7_1_loc1`, `Text7_1_loc2`, `Text7_1_loc3`, `Text7_1_loc4`, `Text7_1_loc5`, `Text7_1_loc6`, `Text7_1_loc7`, `Text7_1_loc8`) VALUES +(99323, 'Teleporter is functional. Select control panel to teleport.', NULL, NULL, NULL, NULL, NULL, NULL, 'Телепортер функционирует нормально. Выберите место назначения на контрольной панели.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Приветствую $N', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, ''); + +DELETE FROM `npc_text` WHERE `ID` = 99323; +INSERT INTO `npc_text` (`ID`, `text0_0`, `text0_1`, `lang0`, `prob0`, `em0_0`, `em0_1`, `em0_2`, `em0_3`, `em0_4`, `em0_5`, `text1_0`, `text1_1`, `lang1`, `prob1`, `em1_0`, `em1_1`, `em1_2`, `em1_3`, `em1_4`, `em1_5`, `text2_0`, `text2_1`, `lang2`, `prob2`, `em2_0`, `em2_1`, `em2_2`, `em2_3`, `em2_4`, `em2_5`, `text3_0`, `text3_1`, `lang3`, `prob3`, `em3_0`, `em3_1`, `em3_2`, `em3_3`, `em3_4`, `em3_5`, `text4_0`, `text4_1`, `lang4`, `prob4`, `em4_0`, `em4_1`, `em4_2`, `em4_3`, `em4_4`, `em4_5`, `text5_0`, `text5_1`, `lang5`, `prob5`, `em5_0`, `em5_1`, `em5_2`, `em5_3`, `em5_4`, `em5_5`, `text6_0`, `text6_1`, `lang6`, `prob6`, `em6_0`, `em6_1`, `em6_2`, `em6_3`, `em6_4`, `em6_5`, `text7_0`, `text7_1`, `lang7`, `prob7`, `em7_0`, `em7_1`, `em7_2`, `em7_3`, `em7_4`, `em7_5`) VALUES +(99323, 'Teleporter is functional. Select control panel to teleport.', 'Teleporter is functional. Select control panel to teleport.', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0); diff --git a/scripts/northrend/icecrown_citadel/spire/def_spire.h b/scripts/northrend/icecrown_citadel/spire/def_spire.h index d49bc1ca0..6ef69d4b0 100644 --- a/scripts/northrend/icecrown_citadel/spire/def_spire.h +++ b/scripts/northrend/icecrown_citadel/spire/def_spire.h @@ -7,11 +7,21 @@ enum MAP_NUM = 631, MAX_ENCOUNTERS = 15, - TYPE_BOSS_1 = 1, + TYPE_MARROGWAR = 1, + TYPE_DEATHWISPER = 2, + TYPE_SKULLS_PLATO = 3, + TYPE_FLIGHT_WAR = 4, + TYPE_SAURFANG = 5, BASE_CAMP = 1000, + + NPC_LORD_MARROGWAR = 36612, + NPC_LADY_DEATHWISPER = 36855, + NPC_DEATHBRINGER_SAURFANG = 37813, + + GO_TELEPORT_GOSSIP_MESSAGE = 99323, + TELEPORT_GOSSIP_MESSAGE = 99322 - NPC_BOSS1 = 33113 }; #endif diff --git a/scripts/northrend/icecrown_citadel/spire/icecrown_teleport.cpp b/scripts/northrend/icecrown_citadel/spire/icecrown_teleport.cpp index a94004e01..7c5e60e9b 100644 --- a/scripts/northrend/icecrown_citadel/spire/icecrown_teleport.cpp +++ b/scripts/northrend/icecrown_citadel/spire/icecrown_teleport.cpp @@ -1,48 +1,79 @@ #include "precompiled.h" #include "def_spire.h" +enum +{ +PORTALS_COUNT = 5 +}; -static Locations PortalLoc[]= +struct Locations { -{-503.62, 2211.47, 62.8235}, // -{-17.1928, 2211.44, 30.1158}, // -{-549.131, 2211.29, 539.291}, // -{-615.145, 2211.47, 199.972}, // -{-210.223, 2217.72, 199.97}, + char const* name; + float x, y, z; + uint32 id; + bool state; }; -bool GOHello_icecrown_teleporter(Player *player, GameObject* pGo) +static Locations PortalLoc[]= { +{"Молот света",-17.1928, 2211.44, 30.1158,1,true}, // +{"Шпиль",-503.62, 2211.47, 62.8235,0,true}, // +{"Черепной вал",-615.145, 2211.47, 199.972,3,true}, // +{"Воздушное сражение",-209.5, 2211.91, 199.97,4,true}, // +{"Подъем смертоносного",-549.131, 2211.29, 539.291,2,true}, // +}; - ScriptedInstance *pInstance = (ScriptedInstance *) creature->GetInstanceData(); - bool m_bIsRegularMode = pGo->GetMap()->IsRegularDifficulty(); +bool GossipSelect_icecrown_teleporter(Player *player, Creature* pCreature, uint32 sender, uint32 action) +{ + if(sender != GOSSIP_SENDER_MAIN) return true; + if(!player->getAttackers().empty()) return true; + if(action >= 0 && action <= PORTALS_COUNT) + player->TeleportTo(MAP_NUM, PortalLoc[action].x, PortalLoc[action].y, PortalLoc[action].z, 0); + player->CLOSE_GOSSIP_MENU(); + return true; +} - if(!pInstance) return true; +bool GossipHello_icecrown_teleporter(Player *player, Creature* pCreature) +{ +// ScriptedInstance *pInstance = (ScriptedInstance *) pCreature->GetInstanceData(); + bool m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, "Teleport to the 1", GOSSIP_SENDER_MAIN, BASE_CAMP); +// if(!pInstance) return true; + for(uint8 i = 0; i < PORTALS_COUNT; i++) { + if (PortalLoc[i].state == true) + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, PortalLoc[i].name, GOSSIP_SENDER_MAIN, i); + }; + player->SEND_GOSSIP_MENU(TELEPORT_GOSSIP_MESSAGE, pCreature->GetGUID()); return true; } -bool GOSelect_icecrown_teleporter(Player *player, GameObject* pGo, uint32 sender, uint32 action) + +bool GOHello_go_icecrown_teleporter(Player *player, GameObject* pGo) { - if(sender != GOSSIP_SENDER_MAIN) return true; - if(!player->getAttackers().empty()) return true; - switch(action) - { - case BASE_CAMP: - player->TeleportTo(MAP_NUM, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z, 0); - player->CLOSE_GOSSIP_MENU(); break; - } +// ScriptedInstance *pInstance = (ScriptedInstance *) pGo->GetInstanceData(); + bool m_bIsRegularMode = pGo->GetMap()->IsRegularDifficulty(); + +// if(!pInstance) return true; + + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, "Teleport to the 1", GOSSIP_SENDER_MAIN, BASE_CAMP); + player->SEND_GOSSIP_MENU(GO_TELEPORT_GOSSIP_MESSAGE, pGo->GetGUID()); return true; } + void AddSC_icecrown_teleporter() { Script *newscript; + newscript = new Script; newscript->Name = "icecrown_teleporter"; - newscript->pGOHello = &GOHello_icecrown_teleporter; - newscript->pGOSelect = &GOSelect_icecrown_teleporter; + newscript->pGossipHello = &GossipHello_icecrown_teleporter; + newscript->pGossipSelect = &GossipSelect_icecrown_teleporter; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "go_icecrown_teleporter"; + newscript->pGOHello = &GOHello_go_icecrown_teleporter; newscript->RegisterSelf(); } diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index 2be477558..9ecf62828 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -365,6 +365,8 @@ extern void AddSC_boss_xevozz(); extern void AddSC_boss_ichoron(); extern void AddSC_boss_zuramat(); extern void AddSC_boss_lavanthor(); +//IceCrown Citadel +extern void AddSC_icecrown_teleporter(); //outland extern void AddSC_boss_exarch_maladaar(); //auchindoun, auchenai_crypts @@ -801,6 +803,8 @@ void AddScripts() AddSC_boss_lavanthor(); AddSC_violet_hold(); + AddSC_icecrown_teleporter(); + //outland AddSC_boss_exarch_maladaar(); //auchindoun, auchenai_crypts AddSC_boss_nexusprince_shaffar(); //auchindoun, mana_tombs From 98f7ddac0f41a2808f86fe0f18e3ba216a9e949e Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Fri, 29 Jan 2010 17:51:08 +0300 Subject: [PATCH 121/405] IceCrown an Halls of stone --- Makefile.am | 6 +- ...ngos.sql => 712_halls_of_stone_mangos.sql} | 15 +- addition/721_icecrown_mangos.sql | 14 +- .../boss_argent_challenge.cpp | 4 + .../boss_black_knight.cpp | 2 + .../spire/boss_deathbringer_saurfang.cpp | 52 ++ .../spire/boss_lady_deathwhisper.cpp | 52 ++ .../spire/boss_lord_marrogwar.cpp | 52 ++ .../icecrown_citadel/spire/def_spire.h | 4 +- .../spire/icecrown_teleport.cpp | 14 +- .../spire/instance_icecrown_spire.cpp | 158 +++++ .../ulduar/halls_of_stone/boss_krystallus.cpp | 142 ++-- .../halls_of_stone/boss_maiden_of_grief.cpp | 140 ++-- .../ulduar/halls_of_stone/boss_sjonnir.cpp | 216 ++++--- .../halls_of_stone/def_halls_of_stone.h | 55 ++ .../ulduar/halls_of_stone/halls_of_stone.cpp | 606 +++++++++++++++++- .../ulduar/halls_of_stone/halls_of_stone.h | 39 -- .../instance_halls_of_stone.cpp | 274 +++++--- system/ScriptLoader.cpp | 8 + 19 files changed, 1454 insertions(+), 399 deletions(-) rename addition/{712_boss_krystallus_mangos.sql => 712_halls_of_stone_mangos.sql} (70%) create mode 100644 scripts/northrend/icecrown_citadel/spire/boss_deathbringer_saurfang.cpp create mode 100644 scripts/northrend/icecrown_citadel/spire/boss_lady_deathwhisper.cpp create mode 100644 scripts/northrend/icecrown_citadel/spire/boss_lord_marrogwar.cpp create mode 100644 scripts/northrend/ulduar/halls_of_stone/def_halls_of_stone.h delete mode 100644 scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h diff --git a/Makefile.am b/Makefile.am index 6ba25998f..ca7b315f0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -364,7 +364,7 @@ scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp \ scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp \ scripts/northrend/ulduar/halls_of_stone/boss_krystallus.cpp \ scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp \ -scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h \ +scripts/northrend/ulduar/halls_of_stone/def_halls_of_stone.h \ scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp \ scripts/northrend/ulduar/ulduar/boss_algalon.cpp \ scripts/northrend/ulduar/ulduar/boss_auriaya.cpp \ @@ -513,6 +513,10 @@ scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_meathook.cpp \ scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp \ scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_salramm.cpp \ scripts/northrend/icecrown_citadel/spire/icecrown_teleport.cpp \ +scripts/northrend/icecrown_citadel/spire/instance_icecrown_spire.cpp \ +scripts/northrend/icecrown_citadel/spire/boss_deathbringer_saurfang.cpp \ +scripts/northrend/icecrown_citadel/spire/boss_lady_deathwhisper.cpp \ +scripts/northrend/icecrown_citadel/spire/boss_lord_marrogwar.cpp \ scripts/world/areatrigger_scripts.cpp \ scripts/world/boss_emeriss.cpp \ scripts/world/boss_lethon.cpp \ diff --git a/addition/712_boss_krystallus_mangos.sql b/addition/712_halls_of_stone_mangos.sql similarity index 70% rename from addition/712_boss_krystallus_mangos.sql rename to addition/712_halls_of_stone_mangos.sql index 1a81ed1b9..f8414fa9a 100644 --- a/addition/712_boss_krystallus_mangos.sql +++ b/addition/712_halls_of_stone_mangos.sql @@ -1,9 +1,9 @@ UPDATE `mangos`.`creature_template` SET `ScriptName` = 'boss_krystallus' WHERE `creature_template`.`entry` =27977 LIMIT 1 ; DELETE FROM `scriptdev2`.`script_texts` WHERE `entry` IN -('-1712001','-1712002','-1712003','-1712004','-1712005','-1712006'); +('-1712001','-1712002','-1712003','-1712004','-1712005','-1712006','-1712007','-1712008'); -INSERT INTO `scriptdev2`.`script_texts` +INSERT IGNORE INTO `scriptdev2`.`script_texts` (`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`, `sound`, `type`, `language`, `emote`, `comment`) VALUES ('-1712001', 'Soft meat! Come to me!', 'Soft meat! Come to me!', NULL, NULL, NULL, NULL, NULL, NULL, 'Мягкие пришли! Заходите!', '0', '0', '0', '0', NULL), @@ -14,3 +14,14 @@ VALUES ('-1712006', 'It is cool!', 'It is cool!', NULL, NULL, NULL, NULL, NULL, NULL, 'Что, съел?', '0', '0', '0', '0', NULL), ('-1712007', 'O, no...', 'O, no...', NULL, NULL, NULL, NULL, NULL, NULL, 'Не может быть...', '0', '0', '0', '0', NULL), ('-1712008', 'Enrage!', 'Enrage!', NULL, NULL, NULL, NULL, NULL, NULL, 'Ну все, вы меня достали...', '0', '0', '0', '0', NULL); + +UPDATE `mangos`.`gameobject` SET `state` = '1' WHERE `gameobject`.`guid` =53556; +UPDATE `mangos`.`gameobject` SET `state` = '1' WHERE `gameobject`.`guid` =53560; + +UPDATE `mangos`.`gameobject_template` SET `faction` = '114',`data0` = '0' WHERE `gameobject_template`.`entry` =191293; +UPDATE `mangos`.`gameobject_template` SET `faction` = '0', `flags` = '0' WHERE `gameobject_template`.`entry` IN (193996,190586); +UPDATE `mangos`.`gameobject` SET `phaseMask` = '65535' WHERE `gameobject`.`guid` =37577; +UPDATE `mangos`.`gameobject` SET `phaseMask` = '65535' WHERE `gameobject`.`guid` =37583; + + + diff --git a/addition/721_icecrown_mangos.sql b/addition/721_icecrown_mangos.sql index 37ceb109a..0d69078b4 100644 --- a/addition/721_icecrown_mangos.sql +++ b/addition/721_icecrown_mangos.sql @@ -3,20 +3,21 @@ DELETE FROM `gameobject` WHERE `guid` = 913334; INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES (913334, 202244, 631, 3, 1, -209.5, 2211.91, 199.97, 3.07661, 0, 0, 0.999472, 0.0324833, 0, 0, 1); -UPDATE `gameobject_template` SET ScriptName = 'go_icecrown_teleporter' WHERE `entry` IN (202242,202243,202244,202245); +UPDATE `gameobject_template` SET ScriptName = 'go_icecrown_teleporter' WHERE `entry` IN (202242,202243,202244,202245,202235); DELETE FROM `creature_template` WHERE `entry` = 99322; INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (99322, 0, 0, 0, 0, 0, 22448, 0, 22448, 0, 'IceCrown teleporter', '', NULL, 0, 80, 80, 64200, 64200, 12300, 12300, 9730, 35, 35, 1, 1.48, 0.5, 0, 294, 441, 0, 110, 1.4, 1400, 1400, 0, 0, 0, 0, 0, 0, 0, 0, 235, 353, 88, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 1, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 'icecrown_teleporter'); REPLACE INTO `locales_creature` values ('99322','IceCrown teleporter','','','','','','','Телепортер цитадели Ледяной короны',NULL,NULL,NULL,NULL,NULL,NULL,NULL,''); -DELETE FROM `creature` WHERE `guid` IN (599322,599323,599324,599325,599326); +DELETE FROM `creature` WHERE `guid` IN (599322,599323,599324,599325,599326,599327); INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (599322, 99322, 631, 3, 1, 0, 0, -209.5, 2211.91, 199.97, 0, 3600, 0, 0, 64200, 12300, 0, 0), (599323, 99322, 631, 3, 1, 0, 0, -503.62, 2211.47, 62.8235, 0, 3600, 0, 0, 64200, 12300, 0, 0), (599324, 99322, 631, 3, 1, 0, 0, -17.1928, 2211.44, 30.1158, 0, 3600, 0, 0, 64200, 12300, 0, 0), (599325, 99322, 631, 3, 1, 0, 0, -549.131, 2211.29, 539.291, 0, 3600, 0, 0, 64200, 12300, 0, 0), -(599326, 99322, 631, 3, 1, 0, 0, -615.145, 2211.47, 199.972, 0, 3600, 0, 0, 64200, 12300, 0, 0); +(599326, 99322, 631, 3, 1, 0, 0, -615.145, 2211.47, 199.972, 0, 3600, 0, 0, 64200, 12300, 0, 0), +(599327, 99322, 631, 3, 1, 0, 0, 4198.42, 2769.22, 351.065, 0, 3600, 0, 0, 64200, 12300, 0, 0); DELETE FROM `locales_npc_text` WHERE `entry` = 99322; INSERT INTO `locales_npc_text` (`entry`, `Text0_0_loc1`, `Text0_0_loc2`, `Text0_0_loc3`, `Text0_0_loc4`, `Text0_0_loc5`, `Text0_0_loc6`, `Text0_0_loc7`, `Text0_0_loc8`, `Text0_1_loc1`, `Text0_1_loc2`, `Text0_1_loc3`, `Text0_1_loc4`, `Text0_1_loc5`, `Text0_1_loc6`, `Text0_1_loc7`, `Text0_1_loc8`, `Text1_0_loc1`, `Text1_0_loc2`, `Text1_0_loc3`, `Text1_0_loc4`, `Text1_0_loc5`, `Text1_0_loc6`, `Text1_0_loc7`, `Text1_0_loc8`, `Text1_1_loc1`, `Text1_1_loc2`, `Text1_1_loc3`, `Text1_1_loc4`, `Text1_1_loc5`, `Text1_1_loc6`, `Text1_1_loc7`, `Text1_1_loc8`, `Text2_0_loc1`, `Text2_0_loc2`, `Text2_0_loc3`, `Text2_0_loc4`, `Text2_0_loc5`, `Text2_0_loc6`, `Text2_0_loc7`, `Text2_0_loc8`, `Text2_1_loc1`, `Text2_1_loc2`, `Text2_1_loc3`, `Text2_1_loc4`, `Text2_1_loc5`, `Text2_1_loc6`, `Text2_1_loc7`, `Text2_1_loc8`, `Text3_0_loc1`, `Text3_0_loc2`, `Text3_0_loc3`, `Text3_0_loc4`, `Text3_0_loc5`, `Text3_0_loc6`, `Text3_0_loc7`, `Text3_0_loc8`, `Text3_1_loc1`, `Text3_1_loc2`, `Text3_1_loc3`, `Text3_1_loc4`, `Text3_1_loc5`, `Text3_1_loc6`, `Text3_1_loc7`, `Text3_1_loc8`, `Text4_0_loc1`, `Text4_0_loc2`, `Text4_0_loc3`, `Text4_0_loc4`, `Text4_0_loc5`, `Text4_0_loc6`, `Text4_0_loc7`, `Text4_0_loc8`, `Text4_1_loc1`, `Text4_1_loc2`, `Text4_1_loc3`, `Text4_1_loc4`, `Text4_1_loc5`, `Text4_1_loc6`, `Text4_1_loc7`, `Text4_1_loc8`, `Text5_0_loc1`, `Text5_0_loc2`, `Text5_0_loc3`, `Text5_0_loc4`, `Text5_0_loc5`, `Text5_0_loc6`, `Text5_0_loc7`, `Text5_0_loc8`, `Text5_1_loc1`, `Text5_1_loc2`, `Text5_1_loc3`, `Text5_1_loc4`, `Text5_1_loc5`, `Text5_1_loc6`, `Text5_1_loc7`, `Text5_1_loc8`, `Text6_0_loc1`, `Text6_0_loc2`, `Text6_0_loc3`, `Text6_0_loc4`, `Text6_0_loc5`, `Text6_0_loc6`, `Text6_0_loc7`, `Text6_0_loc8`, `Text6_1_loc1`, `Text6_1_loc2`, `Text6_1_loc3`, `Text6_1_loc4`, `Text6_1_loc5`, `Text6_1_loc6`, `Text6_1_loc7`, `Text6_1_loc8`, `Text7_0_loc1`, `Text7_0_loc2`, `Text7_0_loc3`, `Text7_0_loc4`, `Text7_0_loc5`, `Text7_0_loc6`, `Text7_0_loc7`, `Text7_0_loc8`, `Text7_1_loc1`, `Text7_1_loc2`, `Text7_1_loc3`, `Text7_1_loc4`, `Text7_1_loc5`, `Text7_1_loc6`, `Text7_1_loc7`, `Text7_1_loc8`) VALUES @@ -33,3 +34,10 @@ INSERT INTO `locales_npc_text` (`entry`, `Text0_0_loc1`, `Text0_0_loc2`, `Text0_ DELETE FROM `npc_text` WHERE `ID` = 99323; INSERT INTO `npc_text` (`ID`, `text0_0`, `text0_1`, `lang0`, `prob0`, `em0_0`, `em0_1`, `em0_2`, `em0_3`, `em0_4`, `em0_5`, `text1_0`, `text1_1`, `lang1`, `prob1`, `em1_0`, `em1_1`, `em1_2`, `em1_3`, `em1_4`, `em1_5`, `text2_0`, `text2_1`, `lang2`, `prob2`, `em2_0`, `em2_1`, `em2_2`, `em2_3`, `em2_4`, `em2_5`, `text3_0`, `text3_1`, `lang3`, `prob3`, `em3_0`, `em3_1`, `em3_2`, `em3_3`, `em3_4`, `em3_5`, `text4_0`, `text4_1`, `lang4`, `prob4`, `em4_0`, `em4_1`, `em4_2`, `em4_3`, `em4_4`, `em4_5`, `text5_0`, `text5_1`, `lang5`, `prob5`, `em5_0`, `em5_1`, `em5_2`, `em5_3`, `em5_4`, `em5_5`, `text6_0`, `text6_1`, `lang6`, `prob6`, `em6_0`, `em6_1`, `em6_2`, `em6_3`, `em6_4`, `em6_5`, `text7_0`, `text7_1`, `lang7`, `prob7`, `em7_0`, `em7_1`, `em7_2`, `em7_3`, `em7_4`, `em7_5`) VALUES (99323, 'Teleporter is functional. Select control panel to teleport.', 'Teleporter is functional. Select control panel to teleport.', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0); + +UPDATE `instance_template` SET `script`='instance_icecrown_spire' WHERE `map`=631; + +-- UPDATE `creature_template` SET `ScriptName`='boss_lady_deathwhisper' WHERE `entry`=36855; +-- UPDATE `creature_template` SET `ScriptName`='boss_deathbringer_saurfang' WHERE `entry`=37813; +-- UPDATE `creature_template` SET `ScriptName`='boss_lord_marrogwar' WHERE `entry`=36612; + diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp index 8665dd193..00abb11b9 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp @@ -87,6 +87,7 @@ struct MANGOS_DLL_DECL boss_eadricAI : public ScriptedAI void EnterEvadeMode() { + if (m_pInstance->GetData(TYPE_ARGENT_CHALLENGE) == IN_PROGRESS) { if (m_creature->isAlive()) { Vengeance_Timer = 1000; Radiance_Timer = 15000; @@ -98,6 +99,7 @@ struct MANGOS_DLL_DECL boss_eadricAI : public ScriptedAI m_creature->GetMap()->CreatureRelocation(m_creature, 754.360779, 660.816162, 412.395996, 4.698700); m_creature->SetHealth(m_creature->GetMaxHealth()); } + } } void Aggro(Unit* pWho) @@ -205,6 +207,7 @@ struct MANGOS_DLL_DECL boss_paletressAI : public ScriptedAI void EnterEvadeMode() { + if (m_pInstance->GetData(TYPE_ARGENT_CHALLENGE) == IN_PROGRESS) { if (m_creature->isAlive()) { m_creature->RemoveAurasDueToSpell(SPELL_SHIELD); Smite_Timer = 5000; @@ -219,6 +222,7 @@ struct MANGOS_DLL_DECL boss_paletressAI : public ScriptedAI m_creature->GetMap()->CreatureRelocation(m_creature, 754.360779, 660.816162, 412.395996, 4.698700); m_creature->SetHealth(m_creature->GetMaxHealth()); } + } } void Aggro(Unit* pWho) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp index 00e77e16e..91319aae8 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp @@ -159,6 +159,7 @@ struct MANGOS_DLL_DECL boss_black_knightAI : public ScriptedAI void EnterEvadeMode() { + if (m_pInstance->GetData(TYPE_BLACK_KNIGHT) == IN_PROGRESS) { m_creature->SetDisplayId(29837); Plague_Strike_Timer = 5000; Icy_Touch_Timer = 10000; @@ -173,6 +174,7 @@ struct MANGOS_DLL_DECL boss_black_knightAI : public ScriptedAI m_creature->SendMonsterMove(746.864441, 660.918762, 411.695465, 4.698700, m_creature->GetMonsterMoveFlags(), 1); m_creature->GetMap()->CreatureRelocation(m_creature, 754.360779, 660.816162, 412.395996, 4.698700); m_creature->SetHealth(m_creature->GetMaxHealth()); + } } void Aggro(Unit* pWho) diff --git a/scripts/northrend/icecrown_citadel/spire/boss_deathbringer_saurfang.cpp b/scripts/northrend/icecrown_citadel/spire/boss_deathbringer_saurfang.cpp new file mode 100644 index 000000000..a031819e4 --- /dev/null +++ b/scripts/northrend/icecrown_citadel/spire/boss_deathbringer_saurfang.cpp @@ -0,0 +1,52 @@ +#include "precompiled.h" +#include "def_spire.h" + +struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI +{ + boss_deathbringer_saurfangAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Regular = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + bool Regular; + ScriptedInstance *pInstance; + + void Reset() + { + if(pInstance) pInstance->SetData(TYPE_SAURFANG, NOT_STARTED); + } + + void Aggro(Unit *who) + { + if(pInstance) pInstance->SetData(TYPE_SAURFANG, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_SAURFANG, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_deathbringer_saurfang(Creature* pCreature) +{ + return new boss_deathbringer_saurfangAI(pCreature); +} + +void AddSC_boss_deathbringer_saurfang() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_deathbringer_saurfang"; + newscript->GetAI = &GetAI_boss_deathbringer_saurfang; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/icecrown_citadel/spire/boss_lady_deathwhisper.cpp b/scripts/northrend/icecrown_citadel/spire/boss_lady_deathwhisper.cpp new file mode 100644 index 000000000..5a11a4072 --- /dev/null +++ b/scripts/northrend/icecrown_citadel/spire/boss_lady_deathwhisper.cpp @@ -0,0 +1,52 @@ +#include "precompiled.h" +#include "def_spire.h" + +struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI +{ + boss_lady_deathwhisperAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Regular = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + bool Regular; + ScriptedInstance *pInstance; + + void Reset() + { + if(pInstance) pInstance->SetData(TYPE_DEATHWHISPER, NOT_STARTED); + } + + void Aggro(Unit *who) + { + if(pInstance) pInstance->SetData(TYPE_DEATHWHISPER, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_DEATHWHISPER, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_lady_deathwhisper(Creature* pCreature) +{ + return new boss_lady_deathwhisperAI(pCreature); +} + +void AddSC_boss_lady_deathwhisper() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_lady_deathwhisper"; + newscript->GetAI = &GetAI_boss_lady_deathwhisper; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/icecrown_citadel/spire/boss_lord_marrogwar.cpp b/scripts/northrend/icecrown_citadel/spire/boss_lord_marrogwar.cpp new file mode 100644 index 000000000..7c97309df --- /dev/null +++ b/scripts/northrend/icecrown_citadel/spire/boss_lord_marrogwar.cpp @@ -0,0 +1,52 @@ +#include "precompiled.h" +#include "def_spire.h" + +struct MANGOS_DLL_DECL boss_lord_marrogwarAI : public ScriptedAI +{ + boss_lord_marrogwarAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Regular = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + bool Regular; + ScriptedInstance *pInstance; + + void Reset() + { + if(pInstance) pInstance->SetData(TYPE_MARROGWAR, NOT_STARTED); + } + + void Aggro(Unit *who) + { + if(pInstance) pInstance->SetData(TYPE_MARROGWAR, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_MARROGWAR, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_lord_marrogwar(Creature* pCreature) +{ + return new boss_lord_marrogwarAI(pCreature); +} + +void AddSC_boss_lord_marrogwar() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_lord_marrogwar"; + newscript->GetAI = &GetAI_boss_lord_marrogwar; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/icecrown_citadel/spire/def_spire.h b/scripts/northrend/icecrown_citadel/spire/def_spire.h index 6ef69d4b0..f4b56abf0 100644 --- a/scripts/northrend/icecrown_citadel/spire/def_spire.h +++ b/scripts/northrend/icecrown_citadel/spire/def_spire.h @@ -8,7 +8,7 @@ enum MAX_ENCOUNTERS = 15, TYPE_MARROGWAR = 1, - TYPE_DEATHWISPER = 2, + TYPE_DEATHWHISPER = 2, TYPE_SKULLS_PLATO = 3, TYPE_FLIGHT_WAR = 4, TYPE_SAURFANG = 5, @@ -16,7 +16,7 @@ enum BASE_CAMP = 1000, NPC_LORD_MARROGWAR = 36612, - NPC_LADY_DEATHWISPER = 36855, + NPC_LADY_DEATHWHISPER = 36855, NPC_DEATHBRINGER_SAURFANG = 37813, GO_TELEPORT_GOSSIP_MESSAGE = 99323, diff --git a/scripts/northrend/icecrown_citadel/spire/icecrown_teleport.cpp b/scripts/northrend/icecrown_citadel/spire/icecrown_teleport.cpp index 7c5e60e9b..309f24ed1 100644 --- a/scripts/northrend/icecrown_citadel/spire/icecrown_teleport.cpp +++ b/scripts/northrend/icecrown_citadel/spire/icecrown_teleport.cpp @@ -2,7 +2,7 @@ #include "def_spire.h" enum { -PORTALS_COUNT = 5 +PORTALS_COUNT = 6 }; struct Locations @@ -20,6 +20,7 @@ static Locations PortalLoc[]= {"Черепной вал",-615.145, 2211.47, 199.972,3,true}, // {"Воздушное сражение",-209.5, 2211.91, 199.97,4,true}, // {"Подъем смертоносного",-549.131, 2211.29, 539.291,2,true}, // +{"Цитадель ледяной короны",4198.42, 2769.22, 351.065,5,true}, // }; bool GossipSelect_icecrown_teleporter(Player *player, Creature* pCreature, uint32 sender, uint32 action) @@ -34,11 +35,10 @@ bool GossipSelect_icecrown_teleporter(Player *player, Creature* pCreature, uint3 bool GossipHello_icecrown_teleporter(Player *player, Creature* pCreature) { -// ScriptedInstance *pInstance = (ScriptedInstance *) pCreature->GetInstanceData(); + ScriptedInstance *pInstance = (ScriptedInstance *) pCreature->GetInstanceData(); + if(!pInstance) return true; bool m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); -// if(!pInstance) return true; - for(uint8 i = 0; i < PORTALS_COUNT; i++) { if (PortalLoc[i].state == true) player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, PortalLoc[i].name, GOSSIP_SENDER_MAIN, i); @@ -51,11 +51,11 @@ bool GossipHello_icecrown_teleporter(Player *player, Creature* pCreature) bool GOHello_go_icecrown_teleporter(Player *player, GameObject* pGo) { -// ScriptedInstance *pInstance = (ScriptedInstance *) pGo->GetInstanceData(); + ScriptedInstance *pInstance = (ScriptedInstance *) pGo->GetInstanceData(); + if(!pInstance) return true; + bool m_bIsRegularMode = pGo->GetMap()->IsRegularDifficulty(); -// if(!pInstance) return true; - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, "Teleport to the 1", GOSSIP_SENDER_MAIN, BASE_CAMP); player->SEND_GOSSIP_MENU(GO_TELEPORT_GOSSIP_MESSAGE, pGo->GetGUID()); return true; diff --git a/scripts/northrend/icecrown_citadel/spire/instance_icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/spire/instance_icecrown_spire.cpp index 35b7b9526..84dce72ec 100644 --- a/scripts/northrend/icecrown_citadel/spire/instance_icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/spire/instance_icecrown_spire.cpp @@ -17,6 +17,164 @@ #include "precompiled.h" #include "def_spire.h" +struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance +{ + instance_icecrown_spire(Map* pMap) : ScriptedInstance(pMap) + { + Regular = pMap->IsRegularDifficulty(); + Initialize(); + } + + bool Regular; + bool needSave; + std::string strSaveData; + + //Creatures GUID + uint32 m_auiEncounter[MAX_ENCOUNTERS+1]; + uint64 m_uiMarrogwarGUID; + uint64 m_uiDeathWhisperGUID; + uint64 m_uiSaurfangGUID; + + void OpenDoor(uint64 guid) + { + if(!guid) return; + GameObject* pGo = instance->GetGameObject(guid); + if(pGo) pGo->SetGoState(GO_STATE_ACTIVE); + } + + void CloseDoor(uint64 guid) + { + if(!guid) return; + GameObject* pGo = instance->GetGameObject(guid); + if(pGo) pGo->SetGoState(GO_STATE_READY); + } + + void Initialize() + { + for (uint8 i = 0; i < MAX_ENCOUNTERS; ++i) + m_auiEncounter[i] = NOT_STARTED; + m_uiMarrogwarGUID =0; + m_uiDeathWhisperGUID =0; + m_uiSaurfangGUID =0; + } + + void OnCreatureCreate(Creature* pCreature) + { + switch(pCreature->GetEntry()) + { + case NPC_LORD_MARROGWAR: + m_uiMarrogwarGUID = pCreature->GetGUID(); + break; + case NPC_LADY_DEATHWHISPER: + m_uiDeathWhisperGUID = pCreature->GetGUID(); + break; + case NPC_DEATHBRINGER_SAURFANG: + m_uiSaurfangGUID = pCreature->GetGUID(); + break; + } + } + + void OnObjectCreate(GameObject* pGo) + { + switch(pGo->GetEntry()) + { + } + } + void SetData(uint32 uiType, uint32 uiData) + { + switch(uiType) + { + case TYPE_MARROGWAR: + if(uiData == IN_PROGRESS) + { + needSave = true; + } + if(uiData == DONE) m_auiEncounter[0] = uiData; + break; + case TYPE_DEATHWHISPER: + case TYPE_SKULLS_PLATO: + case TYPE_FLIGHT_WAR: + case TYPE_SAURFANG: + break; + } + + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + + for(uint8 i = 0; i < MAX_ENCOUNTERS; ++i) + saveStream << m_auiEncounter[i] << " "; + + strSaveData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } + } + + const char* Save() + { + return strSaveData.c_str(); + } + + uint32 GetData(uint32 uiType) + { + switch(uiType) + { + case TYPE_MARROGWAR: return m_auiEncounter[0]; + case TYPE_DEATHWHISPER: return m_auiEncounter[1]; + case TYPE_SKULLS_PLATO: return m_auiEncounter[2]; + case TYPE_FLIGHT_WAR: return m_auiEncounter[3]; + case TYPE_SAURFANG: return m_auiEncounter[4]; + } + return 0; + } + + uint64 GetData64(uint32 uiData) + { + switch(uiData) + { + case NPC_LORD_MARROGWAR: + return m_uiMarrogwarGUID; + case NPC_LADY_DEATHWHISPER: + return m_uiDeathWhisperGUID; + case NPC_DEATHBRINGER_SAURFANG: + return m_uiSaurfangGUID; + } + return 0; + } + + void Load(const char* chrIn) + { + if (!chrIn) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(chrIn); + + std::istringstream loadStream(chrIn); + + for(uint8 i = 0; i < MAX_ENCOUNTERS; ++i) + { + loadStream >> m_auiEncounter[i]; + + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; + } + + OUT_LOAD_INST_DATA_COMPLETE; + } +}; + +InstanceData* GetInstanceData_instance_icecrown_spire(Map* pMap) +{ + return new instance_icecrown_spire(pMap); +} + void AddSC_instance_icecrown_spire() { diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_krystallus.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_krystallus.cpp index b6e46d458..caa3682e4 100644 --- a/scripts/northrend/ulduar/halls_of_stone/boss_krystallus.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/boss_krystallus.cpp @@ -15,39 +15,31 @@ */ /* ScriptData -SDName: Boss_Krystallus -SD%Complete: 40% -SDComment: Need adding summons and correct casting time(s), add boss texts +SDName: Boss Krystallus +SDAuthor: ckegg +SD%Complete: 0% +SDComment: SDCategory: Halls of Stone EndScriptData */ #include "precompiled.h" +#include "def_halls_of_stone.h" enum { - SAY_AGGRO = -1712001, - SAY_SLAY_1 = -1712002, - SAY_SLAY_2 = -1712003, - SAY_SLAY_3 = -1712004, - SAY_SLAY_4 = -1712005, - SAY_KILL = -1712006, - SAY_DEATH = -1712007, - SAY_BERSERK = -1712008, - - - SPELL_BOMB_N = 50843, - SPELL_SPIKE_N = 59750, - SPELL_ICE_N = 61546, - SPELL_TOPOT_N = 50868, - - SPELL_BOMB_H = 59742, - SPELL_SPIKE_H = 59750, - SPELL_ICE_H = 61546, - SPELL_TOPOT_H = 59744, - - SPELL_BERSERK = 28747, - BERSERK_TIME_H = 180000, - BERSERK_TIME_N = 300000 + SAY_AGGRO = -1599000, + SAY_KILL = -1599001, + SAY_DEATH = -1599002, + SAY_SHATTER = -1599003, + + SPELL_BOULDER_TOSS = 50843, + SPELL_BOULDER_TOSS_H = 59742, + SPELL_GROUND_SPIKE = 59750, + SPELL_GROUND_SLAM = 50827, + SPELL_SHATTER = 50810, + SPELL_SHATTER_H = 61546, + SPELL_STOMP = 50868, + SPELL_STOMP_H = 59744, }; @@ -57,7 +49,7 @@ enum struct MANGOS_DLL_DECL boss_krystallusAI : public ScriptedAI { - boss_krystallusAI(Creature* pCreature) : ScriptedAI(pCreature) + boss_krystallusAI(Creature *pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); @@ -65,99 +57,111 @@ struct MANGOS_DLL_DECL boss_krystallusAI : public ScriptedAI } ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + bool m_bIsSlam; - uint32 m_uiBomb_Timer; + uint32 m_uiToss_Timer; uint32 m_uiSpike_Timer; - uint32 m_uiIce_Timer; - uint32 m_uiTopot_Timer; - uint32 m_uiBerserk_Timer; + uint32 m_uiSlam_Timer; + uint32 m_uiShatter_Timer; + uint32 m_uiStomp_Timer; void Reset() { - m_uiBomb_Timer = urand(10000, 20000); - m_uiSpike_Timer = urand(20000, 30000); - m_uiIce_Timer = urand(25000, 35000); - m_uiTopot_Timer = urand(35000, 45000); - m_uiBerserk_Timer = m_bIsRegularMode ? BERSERK_TIME_N : BERSERK_TIME_H ; + m_bIsSlam = false; + m_uiToss_Timer = 3000 + rand()%6000; + m_uiSpike_Timer = 9000 + rand()%5000; + m_uiSlam_Timer = 15000 + rand()%3000; + m_uiStomp_Timer = 20000 + rand()%9000; + m_uiShatter_Timer = 0; + + if(m_pInstance) + m_pInstance->SetData(TYPE_KRYSTALLUS, NOT_STARTED); } - void Aggro(Unit* pWho) + void EnterCombat(Unit* pWho) { - DoScriptText(SAY_AGGRO, m_creature); + DoScriptText(SAY_AGGRO,m_creature); + + if(m_pInstance) + m_pInstance->SetData(TYPE_KRYSTALLUS, IN_PROGRESS); } void KilledUnit(Unit* pVictim) { - DoScriptText(SAY_KILL, m_creature); + DoScriptText(SAY_KILL, m_creature); } void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_KRYSTALLUS, DONE); } void UpdateAI(const uint32 uiDiff) { + //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; -////////// - if (m_uiBomb_Timer < uiDiff) + + if (m_uiToss_Timer < uiDiff) { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, m_bIsRegularMode ? SPELL_BOMB_N : SPELL_BOMB_H ); - m_uiBomb_Timer = urand(10000, 20000); - DoScriptText(SAY_SLAY_1, m_creature); + DoCast(pTarget, m_bIsRegularMode ? SPELL_BOULDER_TOSS_H : SPELL_BOULDER_TOSS); + m_uiToss_Timer = 9000 + rand()%6000; } else - m_uiBomb_Timer -= uiDiff; + m_uiToss_Timer -= uiDiff; -if (m_uiSpike_Timer < uiDiff) + if (m_uiSpike_Timer < uiDiff) { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, m_bIsRegularMode ? SPELL_SPIKE_N : SPELL_SPIKE_H); - m_uiSpike_Timer = urand(20000, 30000); - DoScriptText(SAY_SLAY_3, m_creature); + DoCast(pTarget, SPELL_GROUND_SPIKE); + m_uiSpike_Timer = 12000 + rand()%5000; } else m_uiSpike_Timer -= uiDiff; -if (m_uiIce_Timer < uiDiff) + if (m_uiStomp_Timer < uiDiff) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, m_bIsRegularMode ? SPELL_ICE_N : SPELL_ICE_H); - DoScriptText(SAY_SLAY_2, m_creature); - m_uiIce_Timer = urand(25000, 35000); + DoCast(m_creature, m_bIsRegularMode ? SPELL_STOMP_H : SPELL_STOMP); + m_uiStomp_Timer = 20000 + rand()%9000; } else - m_uiIce_Timer -= uiDiff; + m_uiStomp_Timer -= uiDiff; -if (m_uiTopot_Timer < uiDiff) + if (m_uiSlam_Timer < uiDiff) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, m_bIsRegularMode ? SPELL_TOPOT_N : SPELL_TOPOT_H); - m_uiTopot_Timer = urand(20000, 45000); - DoScriptText(SAY_SLAY_4, m_creature); + DoCast(m_creature, SPELL_GROUND_SLAM); + m_bIsSlam = true; + m_uiShatter_Timer = 10000; + m_uiSlam_Timer = 15000 + rand()%3000; } else - m_uiTopot_Timer -= uiDiff; + m_uiSlam_Timer -= uiDiff; -if (m_uiBerserk_Timer < uiDiff) + if (m_bIsSlam) { - DoCast(m_creature, SPELL_BERSERK); - m_uiBerserk_Timer = m_bIsRegularMode ? BERSERK_TIME_N : BERSERK_TIME_H ; - DoScriptText(SAY_BERSERK, m_creature); + if (m_uiShatter_Timer < uiDiff) + { + DoCast(m_creature, m_bIsRegularMode ? SPELL_SHATTER_H : SPELL_SHATTER); + m_bIsSlam = false; + m_uiShatter_Timer = 0; + } + else + m_uiShatter_Timer -= uiDiff; } - else - m_uiBerserk_Timer -= uiDiff; -///////////////// + DoMeleeAttackIfReady(); } }; CreatureAI* GetAI_boss_krystallus(Creature* pCreature) { - return new boss_krystallusAI(pCreature); + return new boss_krystallusAI (pCreature); } void AddSC_boss_krystallus() diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp index c782ffed2..2da523ec2 100644 --- a/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 +/* Copyright (C) 2006 - 2009 ScriptDev2 * 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 @@ -16,13 +16,13 @@ /* ScriptData SDName: Boss_Maiden_of_Grief -SD%Complete: 60% +SD%Complete: 20% SDComment: SDCategory: Halls of Stone EndScriptData */ #include "precompiled.h" -#include "halls_of_stone.h" +#include "def_halls_of_stone.h" enum { @@ -34,31 +34,13 @@ enum SAY_STUN = -1599010, SAY_DEATH = -1599011, - SPELL_BERSERK = 28747, - SPELL_SHOCK_N = 50760, // not worked - SPELL_STOLP_N = 50761, - SPELL_STORM_N = 50752, // not worked - SPELL_MANABURN_N = 59723, // not worked - - SPELL_SHOCK_H = 50726, // not worked -// SPELL_STOLP_H = 50727, // not worked - SPELL_STOLP_H = 50761, - SPELL_STORM_H = 50772, // not worked - SPELL_MANABURN_H = 59723, // not worked - - BERSERK_TIME_H = 180000, - BERSERK_TIME_N = 300000, - - SPELL_STORM_OF_GRIEF = 50752, - SPELL_STORM_OF_GRIEF_H = 59772, - - SPELL_SHOCK_OF_SORROW = 50760, - SPELL_SHOCK_OF_SORROW_H = 59726, - + SPELL_PARTING_SORROW = 59723, SPELL_PILLAR_OF_WOE = 50761, SPELL_PILLAR_OF_WOE_H = 59727, - - SPELL_PARTING_SORROW = 59723 + SPELL_SHOCK_OF_SORROW = 50760, + SPELL_SHOCK_OF_SORROW_H = 59726, + SPELL_STORM_OF_GRIEF = 50752, + SPELL_STORM_OF_GRIEF_H = 59772, }; /*###### @@ -76,30 +58,34 @@ struct MANGOS_DLL_DECL boss_maiden_of_griefAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsRegularMode; - uint32 m_uiManaburn_Timer; - uint32 m_uiBerserk_Timer; - uint32 m_uiStormTimer; - uint32 m_uiShockTimer; - uint32 m_uiPillarTimer; + uint32 m_uiPartingSorrow_Timer; + uint32 m_uiPillarWoe_Timer; + uint32 m_uiShockSorrow_Timer; + uint32 m_uiStorm_Timer; void Reset() { - m_uiManaburn_Timer = urand(30000, 60000); - m_uiBerserk_Timer = m_bIsRegularMode ? BERSERK_TIME_N : BERSERK_TIME_H ; - m_uiStormTimer = 5000; - m_uiShockTimer = 10000; - m_uiPillarTimer = 15000; + m_uiPartingSorrow_Timer = 9000 + rand()%5000; + m_uiPillarWoe_Timer = 3000 + rand()%4000; + m_uiStorm_Timer = 10000 + rand()%5000; + m_uiShockSorrow_Timer = 20000 + rand()%5000; + + if(m_pInstance) + m_pInstance->SetData(TYPE_GRIEF, NOT_STARTED); } void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); + + if(m_pInstance) + m_pInstance->SetData(TYPE_GRIEF, IN_PROGRESS); } void KilledUnit(Unit* pVictim) { - switch(urand(0, 3)) + switch(rand()%4) { case 0: DoScriptText(SAY_SLAY_1, m_creature); break; case 1: DoScriptText(SAY_SLAY_2, m_creature); break; @@ -113,92 +99,48 @@ struct MANGOS_DLL_DECL boss_maiden_of_griefAI : public ScriptedAI DoScriptText(SAY_DEATH, m_creature); if (m_pInstance) - m_pInstance->SetData(TYPE_MAIDEN, DONE); + m_pInstance->SetData(TYPE_GRIEF, DONE); } void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; -//// - if (m_uiStormTimer < uiDiff) - { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, m_bIsRegularMode ? SPELL_STORM_N : SPELL_STORM_H ); -// DoScriptText(SAY_SLAY_1, m_creature); - m_uiStormTimer = urand(25000, 40000); - } - else - m_uiStormTimer -= uiDiff; - if (m_uiShockTimer < uiDiff) + if (m_uiPartingSorrow_Timer < uiDiff) { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, m_bIsRegularMode ? SPELL_SHOCK_N : SPELL_SHOCK_H ); -// DoScriptText(SAY_SLAY_2, m_creature); - m_uiShockTimer = urand(10000, 15000); + DoCast(pTarget, SPELL_PARTING_SORROW); + m_uiPartingSorrow_Timer = 12000 + rand()%5000; } else - m_uiShockTimer -= uiDiff; + m_uiPartingSorrow_Timer -= uiDiff; - if (m_uiPillarTimer < uiDiff) + if (m_uiPillarWoe_Timer < uiDiff) { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, m_bIsRegularMode ? SPELL_STOLP_N : SPELL_STOLP_H ); - DoScriptText(SAY_SLAY_3, m_creature); - m_uiPillarTimer = urand(15000, 25000); + DoCast(pTarget, m_bIsRegularMode ? SPELL_PILLAR_OF_WOE_H : SPELL_PILLAR_OF_WOE); + m_uiPillarWoe_Timer = 9000 + rand()%4000; } else - m_uiPillarTimer -= uiDiff; + m_uiPillarWoe_Timer -= uiDiff; - if (m_uiManaburn_Timer < uiDiff) + if (m_uiStorm_Timer < uiDiff) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, m_bIsRegularMode ? SPELL_MANABURN_N : SPELL_MANABURN_H ); - DoScriptText(SAY_STUN, m_creature); - m_uiManaburn_Timer = urand(30000, 60000); - } - else - m_uiManaburn_Timer -= uiDiff; - -if (m_uiBerserk_Timer < uiDiff) - { - DoCast(m_creature, SPELL_BERSERK); - m_uiBerserk_Timer = m_bIsRegularMode ? BERSERK_TIME_N : BERSERK_TIME_H ; - DoScriptText(SAY_SLAY_4, m_creature); - } - else - m_uiBerserk_Timer -= uiDiff; - - if (m_uiStormTimer < uiDiff) - { - if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_STORM_OF_GRIEF : SPELL_STORM_OF_GRIEF_H) == CAST_OK) - m_uiStormTimer = 20000; - } - else - m_uiStormTimer -= uiDiff; - - if (m_uiPillarTimer < uiDiff) - { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - { - if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_PILLAR_OF_WOE : SPELL_PILLAR_OF_WOE_H) == CAST_OK) - m_uiPillarTimer = 10000; - } + DoCast(m_creature, m_bIsRegularMode ? SPELL_STORM_OF_GRIEF_H : SPELL_STORM_OF_GRIEF); + m_uiStorm_Timer = 20000 + rand()%5000; } else - m_uiPillarTimer -= uiDiff; + m_uiStorm_Timer -= uiDiff; - if (m_uiShockTimer < uiDiff) + if (m_uiShockSorrow_Timer < uiDiff) { - if (DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_SHOCK_OF_SORROW : SPELL_SHOCK_OF_SORROW_H) == CAST_OK) - { - DoScriptText(SAY_STUN, m_creature); - m_uiShockTimer = 35000; - } + DoScriptText(SAY_STUN, m_creature); + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_SHOCK_OF_SORROW_H : SPELL_SHOCK_OF_SORROW); + m_uiShockSorrow_Timer = 20000 + rand()%5000; } else - m_uiShockTimer -= uiDiff; + m_uiShockSorrow_Timer -= uiDiff; DoMeleeAttackIfReady(); } diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp index 4ce556f99..ce65ac6df 100644 --- a/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 +/* Copyright (C) 2006 - 2009 ScriptDev2 * 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 @@ -16,18 +16,13 @@ /* ScriptData SDName: Boss_Sjonnir -<<<<<<< HEAD:scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp -SD%Complete: 50% -SDComment: Need adding summons and correct casting time -======= SD%Complete: 20% SDComment: ->>>>>>> 330:scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp SDCategory: Halls of Stone EndScriptData */ #include "precompiled.h" -#include "halls_of_stone.h" +#include "def_halls_of_stone.h" enum { @@ -38,48 +33,34 @@ enum SAY_DEATH = -1599004, EMOTE_GENERIC_FRENZY = -1000002, - SPELL_BERSERK = 28747, - SPELL_RING_LIGHTNING_H = 59848, - SPELL_STATIC_OVERLOAD_H = 59846, - - SPELL_RING_LIGHTNING_N = 50840, - SPELL_STATIC_OVERLOAD_N = 50834, - SPELL_CHAIN_LIGHTING_N = 50830, - SPELL_CHAIN_LIGHTING_H = 59844, - - BERSERK_TIME_H = 180000, - BERSERK_TIME_N = 300000, - - SPELL_FRENZY = 28747, - - SPELL_CHAIN_LIGHTNING = 50830, - SPELL_CHAIN_LIGHTNING_H = 59844, - - SPELL_STATIC_CHARGE = 50834, - SPELL_STATIC_CHARGE_H = 59846, - - SPELL_LIGHTNING_SHIELD = 50831, - SPELL_LIGHTNING_SHIELD_H = 59845, - - SPELL_LIGHTNING_RING = 50840, - SPELL_LIGHTNING_RING_H = 59848, - - SPELL_SUMMON_IRON_DWARF = 50789, // periodic dummy aura, tick each 30sec or each 20sec in heroic - SPELL_SUMMON_IRON_DWARF_H = 59860, // left/right 50790,50791 - - SPELL_SUMMON_IRON_TROGG = 50792, // periodic dummy aura, tick each 10sec or each 7sec in heroic - SPELL_SUMMON_IRON_TROGG_H = 59859, // left/right 50793,50794 - - SPELL_SUMMON_MALFORMED_OOZE = 50801, // periodic dummy aura, tick each 5sec or each 3sec in heroic - SPELL_SUMMON_MALFORMED_OOZE_H = 59858, // left/right 50802,50803 + SPELL_CHAIN_LIGHTING = 50830, + SPELL_CHAIN_LIGHTING_H = 59844, + SPELL_FRENZY = 28747, + SPELL_LIGHTING_SHIELD = 50831, + SPELL_LIGHTING_SHIELD_H = 59845, + SPELL_STATIC_CHARGE = 50834, //Periodic Trigger 2s interval, spell =50835 + SPELL_STATIC_CHARGE_H = 59846, //Periodic Trigger 2s interval, spell =50847 + + SPELL_LIGHTING_RING = 51849, + SPELL_LIGHTING_RING_H = 59861, + SPELL_LIGHTING_RING1 = 50840, + SPELL_LIGHTING_RING1_H = 59848, + + NPC_FORGED_IRON_TROGG = 27979, + NPC_MALFORMED_OOZE = 27981, + NPC_FORGED_IRON_DWARF = 27982, +}; - SPELL_SUMMON_IRON_SLUDGE = 50747, // instakill TARGET_SCRIPT - SPELL_IRON_SLUDGE_SPAWN_VISUAL = 50777, +struct Locations +{ + float x, y, z; + uint32 id; +}; - NPC_IRON_TROGG = 27979, - NPC_IRON_DWARF = 27982, - NPC_MALFORMED_OOZE = 27981, - NPC_IRON_SLUDGE = 28165 +static Locations PipeLoc[]= +{ + {1295.44, 734.07, 200.3}, // left + {1297.7, 595.6, 199.9}, // right }; /*###### @@ -97,47 +78,44 @@ struct MANGOS_DLL_DECL boss_sjonnirAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsRegularMode; + bool m_bIsFrenzy; - uint32 m_uiStaticOverload_Timer; - uint32 m_uiRingLightning_Timer; + std::list m_lDwarfGUIDList; uint32 m_uiChainLightning_Timer; - uint32 m_uiBerserk_Timer; + uint32 m_uiLightningShield_Timer; + uint32 m_uiStaticCharge_Timer; + uint32 m_uiLightningRing_Timer; + uint32 m_uiSummon_Timer; + uint32 m_uiFrenzy_Timer; void Reset() { - m_uiStaticOverload_Timer = urand(5000, 6000); - m_uiRingLightning_Timer = urand(30000, 45000); - m_uiChainLightning_Timer = urand(15000, 17000); - m_uiBerserk_Timer = m_bIsRegularMode ? BERSERK_TIME_N : BERSERK_TIME_H ; + m_bIsFrenzy = false; - if (m_creature->isAlive()) - m_creature->CastSpell(m_creature, m_bIsRegularMode ? SPELL_LIGHTNING_SHIELD : SPELL_LIGHTNING_SHIELD_H, false); - } + m_uiChainLightning_Timer = 3000 + rand()%5000; + m_uiLightningShield_Timer = 20000 + rand()%5000; + m_uiStaticCharge_Timer = 20000 + rand()%5000; + m_uiLightningRing_Timer = 30000 + rand()%5000; + m_uiSummon_Timer = 5000; + m_uiFrenzy_Timer = 300000; - void Aggro(Unit* pWho) - { - DoScriptText(SAY_AGGRO, m_creature); + DespawnDwarf(); - m_creature->CastSpell(m_creature, m_bIsRegularMode ? SPELL_SUMMON_IRON_DWARF : SPELL_SUMMON_IRON_DWARF_H, true); - m_creature->CastSpell(m_creature, m_bIsRegularMode ? SPELL_SUMMON_IRON_TROGG : SPELL_SUMMON_IRON_TROGG_H, true); + if(m_pInstance) + m_pInstance->SetData(TYPE_GRIEF, NOT_STARTED); } - - void JustSummoned(Creature* pSummoned) + void Aggro(Unit* pWho) { - if (pSummoned->GetEntry() == NPC_IRON_TROGG || pSummoned->GetEntry() == NPC_IRON_DWARF || pSummoned->GetEntry() == NPC_MALFORMED_OOZE) - { - float fX, fY, fZ; - pSummoned->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 10.0f, fX, fY, fZ); + DoScriptText(SAY_AGGRO, m_creature); - pSummoned->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); - pSummoned->GetMotionMaster()->MovePoint(0, fX, fY, fZ); - } + if(m_pInstance) + m_pInstance->SetData(TYPE_GRIEF, IN_PROGRESS); } void KilledUnit(Unit* pVictim) { - switch(urand(0, 2)) + switch(rand()%3) { case 0: DoScriptText(SAY_SLAY_1, m_creature); break; case 1: DoScriptText(SAY_SLAY_2, m_creature); break; @@ -148,6 +126,37 @@ struct MANGOS_DLL_DECL boss_sjonnirAI : public ScriptedAI void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_GRIEF, DONE); + } + + void DespawnDwarf() + { + if (m_lDwarfGUIDList.empty()) + return; + + for(std::list::iterator itr = m_lDwarfGUIDList.begin(); itr != m_lDwarfGUIDList.end(); ++itr) + { + if (Creature* pTemp = (Creature*)Unit::GetUnit(*m_creature, *itr)) + { + if (pTemp->isAlive()) + pTemp->ForcedDespawn(); + } + } + + m_lDwarfGUIDList.clear(); + } + + void JustSummoned(Creature* pSummoned) + { + m_lDwarfGUIDList.push_back(pSummoned->GetGUID()); + + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + { + pSummoned->AddThreat(pTarget, 0.0f); + pSummoned->AI()->AttackStart(pTarget); + } } void UpdateAI(const uint32 uiDiff) @@ -155,42 +164,65 @@ struct MANGOS_DLL_DECL boss_sjonnirAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (m_uiStaticOverload_Timer < uiDiff) + if (m_uiChainLightning_Timer < uiDiff) { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, m_bIsRegularMode ? SPELL_STATIC_OVERLOAD_N : SPELL_STATIC_OVERLOAD_H ); - m_uiStaticOverload_Timer = urand(20000, 30000); + DoCast(pTarget, m_bIsRegularMode ? SPELL_CHAIN_LIGHTING_H : SPELL_CHAIN_LIGHTING); + m_uiChainLightning_Timer = 10000 + rand()%5000; } else - m_uiStaticOverload_Timer -= uiDiff; + m_uiChainLightning_Timer -= uiDiff; -if (m_uiRingLightning_Timer < uiDiff) + if (m_uiLightningShield_Timer < uiDiff) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, m_bIsRegularMode ? SPELL_RING_LIGHTNING_N : SPELL_RING_LIGHTNING_H); - DoScriptText(SAY_SLAY_2, m_creature); - m_uiRingLightning_Timer = urand(40000, 45000); + DoCast(m_creature, m_bIsRegularMode ? SPELL_LIGHTING_SHIELD_H : SPELL_LIGHTING_SHIELD); + m_uiLightningShield_Timer = 20000 + rand()%5000; } else - m_uiRingLightning_Timer -= uiDiff; + m_uiLightningShield_Timer -= uiDiff; -if (m_uiChainLightning_Timer < uiDiff) + if (m_uiStaticCharge_Timer < uiDiff) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, m_bIsRegularMode ? SPELL_CHAIN_LIGHTING_N :SPELL_CHAIN_LIGHTING_H); - DoScriptText(SAY_SLAY_3, m_creature); - m_uiChainLightning_Timer = urand(11000, 15000); + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_STATIC_CHARGE_H : SPELL_STATIC_CHARGE); + m_uiStaticCharge_Timer = 20000 + rand()%5000; } else - m_uiChainLightning_Timer -= uiDiff; + m_uiStaticCharge_Timer -= uiDiff; + + if (m_uiLightningRing_Timer < uiDiff) + { + if (m_creature->IsNonMeleeSpellCasted(false)) + m_creature->InterruptNonMeleeSpells(false); + DoCast(m_creature, m_bIsRegularMode ? SPELL_LIGHTING_RING_H : SPELL_LIGHTING_RING); + m_uiLightningRing_Timer = 30000 + rand()%5000; + } + else + m_uiLightningRing_Timer -= uiDiff; + + if (m_uiSummon_Timer < uiDiff) + { + uint32 SummonPipe = rand()%2; + uint32 SummonEntry = 0; + switch(rand()%3) + { + case 0: SummonEntry = NPC_FORGED_IRON_TROGG; break; + case 1: SummonEntry = NPC_MALFORMED_OOZE; break; + case 2: SummonEntry = NPC_FORGED_IRON_DWARF; break; + } + m_creature->SummonCreature(SummonEntry, PipeLoc[SummonPipe].x, PipeLoc[SummonPipe].y, PipeLoc[SummonPipe].z, 0.0f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000); + m_uiSummon_Timer = 20000; + } + else + m_uiSummon_Timer -= uiDiff; -if (m_uiBerserk_Timer < uiDiff) + if (!m_bIsFrenzy && m_uiFrenzy_Timer < uiDiff) { - DoCast(m_creature, SPELL_BERSERK); - m_uiBerserk_Timer = m_bIsRegularMode ? BERSERK_TIME_N : BERSERK_TIME_H ; + DoCast(m_creature, SPELL_FRENZY); + m_bIsFrenzy = true; + m_uiFrenzy_Timer = 0; } else - m_uiBerserk_Timer -= uiDiff; + m_uiFrenzy_Timer -= uiDiff; DoMeleeAttackIfReady(); } diff --git a/scripts/northrend/ulduar/halls_of_stone/def_halls_of_stone.h b/scripts/northrend/ulduar/halls_of_stone/def_halls_of_stone.h new file mode 100644 index 000000000..a13ce6247 --- /dev/null +++ b/scripts/northrend/ulduar/halls_of_stone/def_halls_of_stone.h @@ -0,0 +1,55 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_HALLS_OF_STONE_H +#define DEF_HALLS_OF_STONE_H + +enum +{ + MAX_ENCOUNTER = 4, + + DATA_KRYSTALLUS = 1, + DATA_GRIEF = 2, + DATA_BRANN = 3, + DATA_SJONNIR = 4, + + DATA_KADDRAK = 5, + DATA_ABEDNEUM = 6, + DATA_MARNAK = 7, + + DATA_GO_TRIBUNAL_CONSOLE = 8, + DATA_GO_SKY_FLOOR = 9, + DATA_GO_KADDRAK = 10, + DATA_GO_ABEDNEUM = 11, + DATA_GO_MARNAK = 12, + + TYPE_KRYSTALLUS = 20, + TYPE_GRIEF = 21, + TYPE_BRANN = 22, + TYPE_SJONNIR = 23, + + NPC_KRYSTALLUS = 27977, + NPC_GRIEF = 27975, + NPC_BRANN = 28070, + NPC_SJONNIR = 27978, + + NPC_KADDRAK = 30898, // left + NPC_ABEDNEUM = 30899, // middle + NPC_MARNAK = 30897, // right + + GO_GRIEF_DOOR = 191292, + GO_BRANN_DOOR = 191293, + GO_SJONNIR_DOOR = 191296, + + GO_KADDRAK = 191671, // left + GO_ABEDNEUM = 191669, // middle + GO_MARNAK = 191670, // right + + GO_TRIBUNAL_CONSOLE = 193907, + GO_TRIBUNAL_CHEST = 190586, + GO_TRIBUNAL_CHEST_H = 193996, + GO_TRIBUNAL_SKY_FLOOR = 191527, +}; + +#endif diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp index dfe3b73c5..4073f049f 100644 --- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 +/* Copyright (C) 2006 - 2009 ScriptDev2 * 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 @@ -22,8 +22,8 @@ SDCategory: Halls of Stone EndScriptData */ #include "precompiled.h" -#include "halls_of_stone.h" #include "escort_ai.h" +#include "def_halls_of_stone.h" enum { @@ -91,12 +91,175 @@ enum SAY_ENTRANCE_MEET = -1599064, TEXT_ID_START = 13100, - TEXT_ID_PROGRESS = 13101 + TEXT_ID_PROGRESS = 13101, + + NPC_TRIBUNAL_OF_THE_AGES = 28234, + NPC_BRANN_BRONZEBEARD = 28070, + SPELL_STEALTH = 58506, + + // KADDRAK + SPELL_GLARE_OF_THE_TRIBUNAL = 50988, + SPELL_GLARE_OF_THE_TRIBUNAL_H = 59870, + + // MARNAK + SPELL_DARK_MATTER = 51012, + SPELL_DARK_MATTER_H = 59868, + NPC_DARK_MATTER_TARGET = 28237, + + // ABEDNEUM + SPELL_SEARING_GAZE = 51136, + SPELL_SEARING_GAZE_H = 59867, + NPC_SEARING_GAZE_TARGET = 28265, + + NPC_DARK_RUNE_PROTECTOR = 27983, + NPC_DARK_RUNE_STORMCALLER = 27984, + NPC_IRON_GOLEM_CUSTODIAN = 27985, + + QUEST_HALLS_OF_STONE = 13207, }; #define GOSSIP_ITEM_START "Brann, it would be our honor!" #define GOSSIP_ITEM_PROGRESS "Let's move Brann, enough of the history lessons!" +struct Locations +{ + float x, y, z; + uint32 id; +}; + +static Locations SpawnLoc[]= +{ + {946.992, 397.016, 208.374}, + {960.748, 382.944, 208.374}, +}; + + +/*###### +## mob_tribuna_controller +######*/ + +struct MANGOS_DLL_DECL mob_tribuna_controllerAI : public ScriptedAI +{ + mob_tribuna_controllerAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + SetCombatMovement(false); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + + std::list m_lKaddrakGUIDList; + //std::list m_lMarnakGUIDList; + //std::list m_lAbedneumGUIDList; + + bool m_bIsActivateKaddrak; + bool m_bIsActivateMarnak; + bool m_bIsActivateAbedneum; + + uint32 m_uiKaddrak_Encounter_timer; + uint32 m_uiMarnak_Encounter_timer; + uint32 m_uiAbedneum_Encounter_timer; + + void Reset() + { + m_bIsActivateKaddrak = false; + m_bIsActivateMarnak = false; + m_bIsActivateAbedneum = false; + + m_uiKaddrak_Encounter_timer = 1500; + m_uiMarnak_Encounter_timer = 10000; + m_uiAbedneum_Encounter_timer = 10000; + + m_lKaddrakGUIDList.clear(); + //m_lMarnakGUIDList.clear(); + //m_lAbedneumGUIDList.clear(); + } + + void UpdateFacesList() + { + GetCreatureListWithEntryInGrid(m_lKaddrakGUIDList, m_creature, NPC_KADDRAK, 50.0f); + if (!m_lKaddrakGUIDList.empty()) + { + uint32 uiPositionCounter = 0; + for(std::list::iterator itr = m_lKaddrakGUIDList.begin(); itr != m_lKaddrakGUIDList.end(); ++itr) + { + if ((*itr)->isAlive()) + { + if (uiPositionCounter == 0) + { + (*itr)->GetMap()->CreatureRelocation((*itr), 927.265, 333.200, 218.780, (*itr)->GetOrientation()); + (*itr)->SendMonsterMove(927.265, 333.200, 218.780, 0, (*itr)->GetMonsterMoveFlags(), 1); + } + else + { + (*itr)->GetMap()->CreatureRelocation((*itr), 921.745, 328.076, 218.780, (*itr)->GetOrientation()); + (*itr)->SendMonsterMove(921.745, 328.076, 218.780, 0, (*itr)->GetMonsterMoveFlags(), 1); + } + } + ++uiPositionCounter; + } + } + //GetCreatureListWithEntryInGrid(m_lMarnakGUIDList, m_creature, NPC_MARNAK, 50.0f); + //GetCreatureListWithEntryInGrid(m_lAbedneumGUIDList, m_creature, NPC_ABEDNEUM, 50.0f); + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_bIsActivateKaddrak) + { + if (m_uiKaddrak_Encounter_timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + if (!m_lKaddrakGUIDList.empty()) + for(std::list::iterator itr = m_lKaddrakGUIDList.begin(); itr != m_lKaddrakGUIDList.end(); ++itr) + if ((*itr)->isAlive()) + (*itr)->CastSpell(pTarget, m_bIsRegularMode ? SPELL_GLARE_OF_THE_TRIBUNAL_H : SPELL_GLARE_OF_THE_TRIBUNAL, true); + + m_uiKaddrak_Encounter_timer = 1500; + } + else + m_uiKaddrak_Encounter_timer -= uiDiff; + } + if (m_bIsActivateMarnak) + { + if (m_uiMarnak_Encounter_timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + if (Creature* pTemp = m_creature->SummonCreature(NPC_DARK_MATTER_TARGET, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN, 1000)) + { + pTemp->SetDisplayId(11686); + pTemp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + pTemp->CastSpell(pTarget, m_bIsRegularMode ? SPELL_DARK_MATTER_H : SPELL_DARK_MATTER, true); + } + + m_uiMarnak_Encounter_timer = 30000 + rand()%1000; + } + else + m_uiMarnak_Encounter_timer -= uiDiff; + } + if (m_bIsActivateAbedneum) + { + if (m_uiAbedneum_Encounter_timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + if (Creature* pTemp = m_creature->SummonCreature(NPC_SEARING_GAZE_TARGET, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN, 10000)) + { + pTemp->SetDisplayId(11686); + pTemp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + pTemp->CastSpell(pTemp, m_bIsRegularMode ? SPELL_SEARING_GAZE_H : SPELL_SEARING_GAZE, true); + } + + m_uiAbedneum_Encounter_timer = 30000 + rand()%1000; + } + else + m_uiAbedneum_Encounter_timer -= uiDiff; + } + } +}; + /*###### ## npc_brann_hos ######*/ @@ -112,18 +275,87 @@ struct MANGOS_DLL_DECL npc_brann_hosAI : public npc_escortAI ScriptedInstance* m_pInstance; bool m_bIsRegularMode; + bool m_bIsBattle; + bool m_bIsLowHP; + + uint32 m_uiStep; + uint32 m_uiPhase_timer; + + uint64 m_uiControllerGUID; + std::list m_lDwarfGUIDList; void Reset() { + if (!HasEscortState(STATE_ESCORT_ESCORTING)) + { + m_bIsLowHP = false; + m_bIsBattle = false; + + m_uiStep = 0; + m_uiPhase_timer = 0; + + m_uiControllerGUID = 0; + + DespawnDwarf(); + + if(m_pInstance) + m_pInstance->SetData(TYPE_BRANN, NOT_STARTED); + } + } + + void AttackStart(Unit* pWho) + { + if (!pWho) + return; + + if (!m_bIsBattle) + return; + + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho, 0.0f); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + DoStartMovement(pWho); + } } void WaypointReached(uint32 uiPointId) { + switch(uiPointId) + { + case 7: + if (Creature* pCreature = GetClosestCreatureWithEntry(m_creature, NPC_TRIBUNAL_OF_THE_AGES, 100.0f)) + { + if (!pCreature->isAlive()) + pCreature->Respawn(); + ((mob_tribuna_controllerAI*)pCreature->AI())->UpdateFacesList(); + m_uiControllerGUID = pCreature->GetGUID(); + } + break; + case 13: + DoScriptText(SAY_EVENT_INTRO_1, m_creature); + SetEscortPaused(true); + SetRun(true); + JumpToNextStep(20000); + break; + case 17: + DoScriptText(SAY_EVENT_INTRO_2, m_creature); + if (m_pInstance) + m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(DATA_GO_TRIBUNAL_CONSOLE)); + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + SetEscortPaused(true); + JumpToNextStep(8500); + break; + case 18: + SetEscortPaused(true); + break; + } } void KilledUnit(Unit* pVictim) { - switch(urand(0, 2)) + switch(rand()%3) { case 0: DoScriptText(SAY_KILL_1, m_creature); break; case 1: DoScriptText(SAY_KILL_2, m_creature); break; @@ -136,23 +368,367 @@ struct MANGOS_DLL_DECL npc_brann_hosAI : public npc_escortAI DoScriptText(SAY_DEATH, m_creature); } - void UpdateEscortAI(const uint32 uiDiff) + void DespawnDwarf() { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + if (m_lDwarfGUIDList.empty()) return; - DoMeleeAttackIfReady(); + for(std::list::iterator itr = m_lDwarfGUIDList.begin(); itr != m_lDwarfGUIDList.end(); ++itr) + { + if (Creature* pTemp = (Creature*)Unit::GetUnit(*m_creature, *itr)) + { + if (pTemp->isAlive()) + pTemp->ForcedDespawn(); + } + } + + m_lDwarfGUIDList.clear(); + } + + void SpawnDwarf(uint32 uiType) + { + switch(uiType) + { + case 1: + { + uint32 uiSpawnNumber = (m_bIsRegularMode ? 3 : 2); + for (uint8 i = 0; i < uiSpawnNumber; ++i) + m_creature->SummonCreature(NPC_DARK_RUNE_PROTECTOR, SpawnLoc[0].x, SpawnLoc[0].y, SpawnLoc[0].z, 0.0f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000); + m_creature->SummonCreature(NPC_DARK_RUNE_STORMCALLER, SpawnLoc[0].x, SpawnLoc[0].y, SpawnLoc[0].z, 0.0f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000); + break; + } + case 2: + for (uint8 i = 0; i < 2; ++i) + m_creature->SummonCreature(NPC_DARK_RUNE_STORMCALLER, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z, 0.0f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000); + break; + case 3: + m_creature->SummonCreature(NPC_IRON_GOLEM_CUSTODIAN, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z, 0.0f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000); + break; + } + } + + void JustSummoned(Creature* pSummoned) + { + m_lDwarfGUIDList.push_back(pSummoned->GetGUID()); + pSummoned->AddThreat(m_creature, 0.0f); + pSummoned->AI()->AttackStart(m_creature); + } + + void JumpToNextStep(uint32 uiTimer) + { + m_uiPhase_timer = uiTimer; + m_uiStep++; + } + + void UpdateEscortAI(const uint32 uiDiff) + { + if (m_uiPhase_timer < uiDiff) + { + switch(m_uiStep) + { + case 0: // unused + break; + case 1: + if (m_pInstance) + { + if (m_pInstance->GetData(TYPE_BRANN) != NOT_STARTED) + return; + + m_pInstance->SetData(TYPE_BRANN, IN_PROGRESS); + } + m_bIsBattle = false; + DoScriptText(SAY_ESCORT_START, m_creature); + JumpToNextStep(0); + break; + case 3: + SetEscortPaused(false); + JumpToNextStep(0); + break; + case 5: + if (m_pInstance) + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_ABEDNEUM)))) + DoScriptText(SAY_EVENT_INTRO_3_ABED, pTemp); + JumpToNextStep(8500); + break; + case 6: + DoScriptText(SAY_EVENT_A_1, m_creature); + JumpToNextStep(6500); + break; + case 7: + if (m_pInstance) + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_KADDRAK)))) + DoScriptText(SAY_EVENT_A_2_KADD, pTemp); + JumpToNextStep(12500); + break; + case 8: + DoScriptText(SAY_EVENT_A_3, m_creature); + if (m_pInstance) + m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(DATA_GO_KADDRAK)); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_uiControllerGUID))) + ((mob_tribuna_controllerAI*)pTemp->AI())->m_bIsActivateKaddrak = true; + JumpToNextStep(5000); + break; + case 9: + SpawnDwarf(1); + JumpToNextStep(20000); + break; + case 10: + DoScriptText(SAY_EVENT_B_1, m_creature); + JumpToNextStep(6000); + break; + case 11: + if (m_pInstance) + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_MARNAK)))) + DoScriptText(SAY_EVENT_B_2_MARN, pTemp); + SpawnDwarf(1); + JumpToNextStep(20000); + break; + case 12: + DoScriptText(SAY_EVENT_B_3, m_creature); + if (m_pInstance) + m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(DATA_GO_MARNAK)); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_uiControllerGUID))) + ((mob_tribuna_controllerAI*)pTemp->AI())->m_bIsActivateMarnak = true; + JumpToNextStep(10000); + break; + case 13: + SpawnDwarf(1); + JumpToNextStep(10000); + break; + case 14: + SpawnDwarf(2); + JumpToNextStep(20000); + break; + case 15: + DoScriptText(SAY_EVENT_C_1, m_creature); + SpawnDwarf(1); + JumpToNextStep(10000); + break; + case 16: + SpawnDwarf(2); + JumpToNextStep(20000); + break; + case 17: + if (m_pInstance) + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_ABEDNEUM)))) + DoScriptText(SAY_EVENT_C_2_ABED, pTemp); + SpawnDwarf(1); + JumpToNextStep(20000); + break; + case 18: + DoScriptText(SAY_EVENT_C_3, m_creature); + if (m_pInstance) + m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(DATA_GO_ABEDNEUM)); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_uiControllerGUID))) + ((mob_tribuna_controllerAI*)pTemp->AI())->m_bIsActivateAbedneum = true; + JumpToNextStep(5000); + break; + case 19: + SpawnDwarf(2); + JumpToNextStep(10000); + break; + case 20: + SpawnDwarf(1); + JumpToNextStep(15000); + break; + case 21: + DoScriptText(SAY_EVENT_D_1, m_creature); + SpawnDwarf(3); + JumpToNextStep(20000); + break; + case 22: + if (m_pInstance) + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_ABEDNEUM)))) + DoScriptText(SAY_EVENT_D_2_ABED, pTemp); + SpawnDwarf(1); + JumpToNextStep(5000); + break; + case 23: + SpawnDwarf(2); + JumpToNextStep(15000); + break; + case 24: + DoScriptText(SAY_EVENT_D_3, m_creature); + SpawnDwarf(3); + JumpToNextStep(5000); + break; + case 25: + SpawnDwarf(1); + JumpToNextStep(5000); + break; + case 26: + SpawnDwarf(2); + JumpToNextStep(10000); + break; + case 27: + if (m_pInstance) + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_ABEDNEUM)))) + DoScriptText(SAY_EVENT_D_4_ABED, pTemp); + SpawnDwarf(1); + JumpToNextStep(10000); + break; + case 28: + DoScriptText(SAY_EVENT_END_01, m_creature); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + if (m_pInstance) + m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(DATA_GO_SKY_FLOOR)); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_uiControllerGUID))) + pTemp->DealDamage(pTemp, pTemp->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + m_bIsBattle = true; + SetEscortPaused(false); + JumpToNextStep(3500); + break; + case 29: + DoScriptText(SAY_EVENT_END_02, m_creature); + JumpToNextStep(3500); + break; + case 30: + if (m_pInstance) + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_ABEDNEUM)))) + DoScriptText(SAY_EVENT_END_03_ABED, pTemp); + JumpToNextStep(4500); + break; + case 31: + DoScriptText(SAY_EVENT_END_04, m_creature); + JumpToNextStep(6500); + break; + case 32: + if (m_pInstance) + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_ABEDNEUM)))) + DoScriptText(SAY_EVENT_END_05_ABED, pTemp); + JumpToNextStep(6500); + break; + case 33: + DoScriptText(SAY_EVENT_END_06, m_creature); + JumpToNextStep(2500); + break; + case 34: + if (m_pInstance) + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_ABEDNEUM)))) + DoScriptText(SAY_EVENT_END_07_ABED, pTemp); + JumpToNextStep(10500); + break; + case 35: + DoScriptText(SAY_EVENT_END_08, m_creature); + JumpToNextStep(4500); + break; + case 36: + if (m_pInstance) + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_KADDRAK)))) + DoScriptText(SAY_EVENT_END_09_KADD, pTemp); + JumpToNextStep(7500); + break; + case 37: + DoScriptText(SAY_EVENT_END_10, m_creature); + JumpToNextStep(2500); + break; + case 38: + if (m_pInstance) + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_KADDRAK)))) + DoScriptText(SAY_EVENT_END_11_KADD, pTemp); + JumpToNextStep(10500); + break; + case 39: + DoScriptText(SAY_EVENT_END_12, m_creature); + JumpToNextStep(2500); + break; + case 40: + if (m_pInstance) + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_KADDRAK)))) + DoScriptText(SAY_EVENT_END_13_KADD, pTemp); + JumpToNextStep(9500); + break; + case 41: + DoScriptText(SAY_EVENT_END_14, m_creature); + JumpToNextStep(5500); + break; + case 42: + if (m_pInstance) + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_MARNAK)))) + DoScriptText(SAY_EVENT_END_15_MARN, pTemp); + JumpToNextStep(3500); + break; + case 43: + DoScriptText(SAY_EVENT_END_16, m_creature); + JumpToNextStep(3500); + break; + case 44: + if (m_pInstance) + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_MARNAK)))) + DoScriptText(SAY_EVENT_END_17_MARN, pTemp); + JumpToNextStep(11500); + break; + case 45: + DoScriptText(SAY_EVENT_END_18, m_creature); + JumpToNextStep(10500); + break; + case 46: + if (m_pInstance) + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_MARNAK)))) + DoScriptText(SAY_EVENT_END_19_MARN, pTemp); + JumpToNextStep(2500); + break; + case 47: + DoScriptText(SAY_EVENT_END_20, m_creature); + JumpToNextStep(4500); + break; + case 48: + if (m_pInstance) + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_ABEDNEUM)))) + DoScriptText(SAY_EVENT_END_21_ABED, pTemp); + JumpToNextStep(3500); + break; + case 49: + { + if (m_pInstance) + { + m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(DATA_GO_KADDRAK)); + m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(DATA_GO_MARNAK)); + m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(DATA_GO_ABEDNEUM)); + m_pInstance->DoUseDoorOrButton(m_pInstance->GetData64(DATA_GO_SKY_FLOOR)); + m_pInstance->SetData(TYPE_BRANN, DONE); + } + + Player* pPlayer = GetPlayerForEscort(); + if (pPlayer) + pPlayer->GroupEventHappens(QUEST_HALLS_OF_STONE, m_creature); + + m_creature->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + m_creature->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + + JumpToNextStep(180000); + break; + } + case 50: + SetEscortPaused(false); + break; + } + } + else m_uiPhase_timer -= uiDiff; + + if (!m_bIsLowHP && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) <= 30) + { + DoScriptText(SAY_LOW_HEALTH, m_creature); + m_bIsLowHP = true; + } + else if (m_bIsLowHP && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) > 30) + m_bIsLowHP = false; } }; bool GossipHello_npc_brann_hos(Player* pPlayer, Creature* pCreature) { + ScriptedInstance* m_pInstance; + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + if (pCreature->isQuestGiver()) pPlayer->PrepareQuestMenu(pCreature->GetGUID()); - pPlayer->SEND_GOSSIP_MENU(TEXT_ID_START, pCreature->GetGUID()); +if (m_pInstance->GetData(TYPE_BRANN) != DONE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_START, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_START, pCreature->GetGUID()); + //pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_PROGRESS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); //pPlayer->SEND_GOSSIP_MENU(TEXT_ID_PROGRESS, pCreature->GetGUID()); return true; @@ -161,7 +737,11 @@ bool GossipHello_npc_brann_hos(Player* pPlayer, Creature* pCreature) bool GossipSelect_npc_brann_hos(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_INFO_DEF+1 || uiAction == GOSSIP_ACTION_INFO_DEF+2) + { pPlayer->CLOSE_GOSSIP_MENU(); + ((npc_brann_hosAI*)pCreature->AI())->m_uiStep = 1; + ((npc_brann_hosAI*)pCreature->AI())->Start(true, false, pPlayer->GetGUID()); + } return true; } @@ -171,6 +751,11 @@ CreatureAI* GetAI_npc_brann_hos(Creature* pCreature) return new npc_brann_hosAI(pCreature); } +CreatureAI* GetAI_mob_tribuna_controller(Creature* pCreature) +{ + return new mob_tribuna_controllerAI (pCreature); +} + void AddSC_halls_of_stone() { Script *newscript; @@ -181,4 +766,9 @@ void AddSC_halls_of_stone() newscript->pGossipHello = &GossipHello_npc_brann_hos; newscript->pGossipSelect = &GossipSelect_npc_brann_hos; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_tribuna_controller"; + newscript->GetAI = &GetAI_mob_tribuna_controller; + newscript->RegisterSelf(); } diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h deleted file mode 100644 index aca0a7b18..000000000 --- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 - * This program is free software licensed under GPL version 2 - * Please see the included DOCS/LICENSE.TXT for more information */ - -#ifndef DEF_HALLS_OF_STONE_H -#define DEF_HALLS_OF_STONE_H - -enum -{ - MAX_ENCOUNTER = 4, - - TYPE_TRIBUNAL = 0, - TYPE_MAIDEN = 1, - TYPE_KRYSTALLUS = 2, - TYPE_SJONNIR = 3, - - NPC_BRANN = 28070, - - NPC_KADDRAK = 30898, - NPC_ABEDNEUM = 30899, - NPC_MARNAK = 30897, - - GO_DOOR_SJONNIR = 191296, - GO_DOOR_TRIBUNAL = 191294, // possibly closed during event? - - GO_TRIBUNAL_CHEST = 190586, - GO_TRIBUNAL_CHEST_H = 193996, - - GO_TRIBUNAL_HEAD_RIGHT = 191670, // marnak - GO_TRIBUNAL_HEAD_CENTER = 191669, // abedneum - GO_TRIBUNAL_HEAD_LEFT = 191671, // kaddrak - - GO_TRIBUNAL_CONSOLE = 193907, - GO_TRIBUNAL_FLOOR = 191527, - - GO_SJONNIR_CONSOLE = 193906 -}; - -#endif diff --git a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp index 2274a29e1..d71ccd6a3 100644 --- a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 +/* Copyright (C) 2006 - 2009 ScriptDev2 * 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 @@ -16,62 +16,108 @@ /* ScriptData SDName: Instance_Halls_of_Stone -SD%Complete: 10% +SD%Complete: 0% SDComment: SDCategory: Halls of Stone EndScriptData */ #include "precompiled.h" -#include "halls_of_stone.h" +#include "def_halls_of_stone.h" + +/* Halls of Lightning encounters: +0 - Krystallus +1 - Maiden of Grief +2 - Brann Bronzebeard +3 - Sjonnir The Ironshaper +*/ struct MANGOS_DLL_DECL instance_halls_of_stone : public ScriptedInstance { - instance_halls_of_stone(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + instance_halls_of_stone(Map* pMap) : ScriptedInstance(pMap) { + Regular = pMap->IsRegularDifficulty(); + Initialize(); + }; uint32 m_auiEncounter[MAX_ENCOUNTER]; + bool Regular; + std::string strSaveData; + uint64 m_uiKrystallusGUID; + uint64 m_uiGriefGUID; uint64 m_uiBrannGUID; + uint64 m_uiSjonnirGUID; + uint64 m_uiKaddrakGUID; uint64 m_uiAbedneumGUID; uint64 m_uiMarnakGUID; + uint64 m_uiGriefDoorGUID; + uint64 m_uiBrannDoorGUID; uint64 m_uiSjonnirDoorGUID; - uint64 m_uiTribunalDoorGUID; - uint64 m_uiTribunalChestGUID; - uint64 m_uiTribunalHeadRightGUID; - uint64 m_uiTribunalHeadCenterGUID; - uint64 m_uiTribunalHeadLeftGUID; - uint64 m_uiTribunalConsoleGUID; - uint64 m_uiTribunalFloorGUID; - uint64 m_uiSjonnirConsoleGUID; + + uint64 m_uiGoTribunalConsoleGUID; + uint64 m_uiGoTribunalChestGUID; + uint64 m_uiGoTribunalSkyFloorGUID; + uint64 m_uiGoKaddrakGUID; + uint64 m_uiGoAbedneumGUID; + uint64 m_uiGoMarnakGUID; + + void OpenDoor(uint64 guid) + { + if(!guid) return; + GameObject* pGo = instance->GetGameObject(guid); + if(pGo) pGo->SetGoState(GO_STATE_ACTIVE); + } + + void CloseDoor(uint64 guid) + { + if(!guid) return; + GameObject* pGo = instance->GetGameObject(guid); + if(pGo) pGo->SetGoState(GO_STATE_READY); + } void Initialize() { - memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - - m_uiBrannGUID = 0; - m_uiKaddrakGUID = 0; - m_uiAbedneumGUID = 0; - m_uiMarnakGUID = 0; - - m_uiSjonnirDoorGUID = 0; - m_uiTribunalDoorGUID = 0; - m_uiTribunalChestGUID = 0; - m_uiTribunalHeadRightGUID = 0; - m_uiTribunalHeadCenterGUID = 0; - m_uiTribunalHeadLeftGUID = 0; - m_uiTribunalConsoleGUID = 0; - m_uiTribunalFloorGUID = 0; - m_uiSjonnirConsoleGUID = 0; + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + m_auiEncounter[i]=NOT_STARTED; + + m_uiKrystallusGUID = 0; + m_uiGriefGUID = 0; + m_uiBrannGUID = 0; + m_uiSjonnirGUID = 0; + + m_uiKaddrakGUID = 0; + m_uiAbedneumGUID = 0; + m_uiMarnakGUID = 0; + + m_uiGriefDoorGUID = 0; + m_uiBrannDoorGUID = 0; + m_uiSjonnirDoorGUID = 0; + + m_uiGoTribunalConsoleGUID = 0; + m_uiGoTribunalChestGUID = 0; + m_uiGoTribunalSkyFloorGUID = 0; + m_uiGoKaddrakGUID = 0; + m_uiGoAbedneumGUID = 0; + m_uiGoMarnakGUID = 0; } void OnCreatureCreate(Creature* pCreature) { switch(pCreature->GetEntry()) { + case NPC_KRYSTALLUS: + m_uiKrystallusGUID = pCreature->GetGUID(); + break; + case NPC_GRIEF: + m_uiGriefGUID = pCreature->GetGUID(); + break; case NPC_BRANN: m_uiBrannGUID = pCreature->GetGUID(); break; + case NPC_SJONNIR: + m_uiSjonnirGUID = pCreature->GetGUID(); + break; case NPC_KADDRAK: m_uiKaddrakGUID = pCreature->GetGUID(); break; @@ -88,67 +134,114 @@ struct MANGOS_DLL_DECL instance_halls_of_stone : public ScriptedInstance { switch(pGo->GetEntry()) { - case GO_DOOR_SJONNIR: + case GO_GRIEF_DOOR: + m_uiGriefDoorGUID = pGo->GetGUID(); + if (m_auiEncounter[0] != DONE) + CloseDoor(m_uiGriefDoorGUID); + else OpenDoor(m_uiGriefDoorGUID); + break; + case GO_BRANN_DOOR: + m_uiBrannDoorGUID = pGo->GetGUID(); + if (m_auiEncounter[1] != DONE) + CloseDoor(m_uiBrannDoorGUID); + else OpenDoor(m_uiBrannDoorGUID); + break; + case GO_SJONNIR_DOOR: m_uiSjonnirDoorGUID = pGo->GetGUID(); + if (m_auiEncounter[2] != DONE) + CloseDoor(m_uiSjonnirDoorGUID); + else OpenDoor(m_uiSjonnirDoorGUID); break; - case GO_DOOR_TRIBUNAL: - m_uiTribunalDoorGUID = pGo->GetGUID(); + case GO_TRIBUNAL_CONSOLE: + m_uiGoTribunalConsoleGUID = pGo->GetGUID(); break; case GO_TRIBUNAL_CHEST: - case GO_TRIBUNAL_CHEST_H: - m_uiTribunalChestGUID = pGo->GetGUID(); - break; - case GO_TRIBUNAL_HEAD_RIGHT: - m_uiTribunalHeadRightGUID = pGo->GetGUID(); + if (Regular) m_uiGoTribunalChestGUID = pGo->GetGUID(); break; - case GO_TRIBUNAL_HEAD_CENTER: - m_uiTribunalHeadCenterGUID = pGo->GetGUID(); + case GO_TRIBUNAL_CHEST_H: + if (!Regular) m_uiGoTribunalChestGUID = pGo->GetGUID(); break; - case GO_TRIBUNAL_HEAD_LEFT: - m_uiTribunalHeadLeftGUID = pGo->GetGUID(); + case GO_TRIBUNAL_SKY_FLOOR: + m_uiGoTribunalSkyFloorGUID = pGo->GetGUID(); break; - case GO_TRIBUNAL_CONSOLE: - m_uiTribunalConsoleGUID = pGo->GetGUID(); + case GO_KADDRAK: + m_uiGoKaddrakGUID = pGo->GetGUID(); break; - case GO_TRIBUNAL_FLOOR: - m_uiTribunalFloorGUID = pGo->GetGUID(); + case GO_ABEDNEUM: + m_uiGoAbedneumGUID = pGo->GetGUID(); break; - case GO_SJONNIR_CONSOLE: - m_uiSjonnirConsoleGUID = pGo->GetGUID(); + case GO_MARNAK: + m_uiGoMarnakGUID = pGo->GetGUID(); break; } } + void OnPlayerEnter(Unit* pPlayer) + { + if (m_auiEncounter[0] != DONE) + CloseDoor(m_uiGriefDoorGUID); + else OpenDoor(m_uiGriefDoorGUID); + if (m_auiEncounter[1] != DONE) + CloseDoor(m_uiBrannDoorGUID); + else OpenDoor(m_uiBrannDoorGUID); + if (m_auiEncounter[2] != DONE) + CloseDoor(m_uiSjonnirDoorGUID); + else OpenDoor(m_uiSjonnirDoorGUID); + } + void SetData(uint32 uiType, uint32 uiData) { switch(uiType) { - case TYPE_TRIBUNAL: - m_auiEncounter[0] = uiData; + case TYPE_KRYSTALLUS: if (uiData == DONE) - DoRespawnGameObject(m_uiTribunalChestGUID); + OpenDoor(m_uiGriefDoorGUID); + m_auiEncounter[0] = uiData; break; - case TYPE_MAIDEN: + case TYPE_GRIEF: + if (uiData == DONE) + OpenDoor(m_uiBrannDoorGUID); m_auiEncounter[1] = uiData; break; - case TYPE_KRYSTALLUS: + case TYPE_BRANN: + if (uiData == DONE) + { + OpenDoor(m_uiSjonnirDoorGUID); + DoRespawnGameObject(m_uiGoTribunalChestGUID); + OpenDoor(m_uiGoTribunalChestGUID); + } m_auiEncounter[2] = uiData; break; case TYPE_SJONNIR: m_auiEncounter[3] = uiData; break; } + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + saveStream << m_auiEncounter[i] << " "; + + strSaveData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } + } uint32 GetData(uint32 uiType) { switch(uiType) { - case TYPE_TRIBUNAL: + case TYPE_KRYSTALLUS: return m_auiEncounter[0]; - case TYPE_MAIDEN: + case TYPE_GRIEF: return m_auiEncounter[1]; - case TYPE_KRYSTALLUS: + case TYPE_BRANN: return m_auiEncounter[2]; case TYPE_SJONNIR: return m_auiEncounter[3]; @@ -160,36 +253,62 @@ struct MANGOS_DLL_DECL instance_halls_of_stone : public ScriptedInstance { switch(uiData) { - case NPC_BRANN: + case DATA_KRYSTALLUS: + return m_uiKrystallusGUID; + case DATA_GRIEF: + return m_uiGriefGUID; + case DATA_BRANN: return m_uiBrannGUID; - case NPC_KADDRAK: + case DATA_SJONNIR: + return m_uiSjonnirGUID; + case DATA_KADDRAK: return m_uiKaddrakGUID; - case NPC_ABEDNEUM: + case DATA_ABEDNEUM: return m_uiAbedneumGUID; - case NPC_MARNAK: + case DATA_MARNAK: return m_uiMarnakGUID; - case GO_DOOR_SJONNIR: - return m_uiSjonnirDoorGUID; - case GO_DOOR_TRIBUNAL: - return m_uiTribunalDoorGUID; - case GO_TRIBUNAL_CHEST: - case GO_TRIBUNAL_CHEST_H: - return m_uiTribunalChestGUID; - case GO_TRIBUNAL_HEAD_RIGHT: - return m_uiTribunalHeadRightGUID; - case GO_TRIBUNAL_HEAD_CENTER: - return m_uiTribunalHeadCenterGUID; - case GO_TRIBUNAL_HEAD_LEFT: - return m_uiTribunalHeadLeftGUID; - case GO_TRIBUNAL_CONSOLE: - return m_uiTribunalConsoleGUID; - case GO_TRIBUNAL_FLOOR: - return m_uiTribunalFloorGUID; - case GO_SJONNIR_CONSOLE: - return m_uiSjonnirConsoleGUID; + case DATA_GO_TRIBUNAL_CONSOLE: + return m_uiGoTribunalConsoleGUID; + case DATA_GO_SKY_FLOOR: + return m_uiGoTribunalSkyFloorGUID; + case DATA_GO_KADDRAK: + return m_uiGoKaddrakGUID; + case DATA_GO_ABEDNEUM: + return m_uiGoAbedneumGUID; + case DATA_GO_MARNAK: + return m_uiGoMarnakGUID; } return 0; } + + const char* Save() + { + return strSaveData.c_str(); + } + + void Load(const char* chrIn) + { + if (!chrIn) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(chrIn); + + std::istringstream loadStream(chrIn); + + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + loadStream >> m_auiEncounter[i]; + + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; + } + + OUT_LOAD_INST_DATA_COMPLETE; + } + }; InstanceData* GetInstanceData_instance_halls_of_stone(Map* pMap) @@ -205,3 +324,4 @@ void AddSC_instance_halls_of_stone() newscript->GetInstanceData = &GetInstanceData_instance_halls_of_stone; newscript->RegisterSelf(); } + diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index 9ecf62828..e8c12341c 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -366,7 +366,11 @@ extern void AddSC_boss_ichoron(); extern void AddSC_boss_zuramat(); extern void AddSC_boss_lavanthor(); //IceCrown Citadel +extern void AddSC_instance_icecrown_spire(); extern void AddSC_icecrown_teleporter(); +extern void AddSC_boss_lord_marrogwar(); +extern void AddSC_boss_lady_deathwhisper(); +extern void AddSC_boss_deathbringer_saurfang(); //outland extern void AddSC_boss_exarch_maladaar(); //auchindoun, auchenai_crypts @@ -803,7 +807,11 @@ void AddScripts() AddSC_boss_lavanthor(); AddSC_violet_hold(); + AddSC_instance_icecrown_spire(); AddSC_icecrown_teleporter(); + AddSC_boss_lord_marrogwar(); + AddSC_boss_lady_deathwhisper(); + AddSC_boss_deathbringer_saurfang(); //outland AddSC_boss_exarch_maladaar(); //auchindoun, auchenai_crypts From e41f1bca226c64cb98f999944fd3ba87c5a62bae Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Mon, 1 Feb 2010 18:57:18 +0300 Subject: [PATCH 122/405] Trial of crusader rewrite part 8 --- .../boss_argent_challenge.cpp | 24 +- .../boss_black_knight.cpp | 20 +- .../boss_grand_champions.cpp | 74 ++-- .../instance_trial_of_the_champion.cpp | 25 +- .../trial_of_the_champion.cpp | 354 ++++++++---------- .../trial_of_the_champion.h | 1 + 6 files changed, 226 insertions(+), 272 deletions(-) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp index 00abb11b9..81cd61928 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp @@ -77,9 +77,9 @@ struct MANGOS_DLL_DECL boss_eadricAI : public ScriptedAI { m_creature->SetRespawnDelay(999999999); Vengeance_Timer = 1000; - Radiance_Timer = 15000; - Hammer_Timer = 40000; - Hammer_Dmg_Timer = 45000; + Radiance_Timer = m_bIsRegularMode ? 15000 : 8000; + Hammer_Timer = m_bIsRegularMode ? 40000 : 10000; + Hammer_Dmg_Timer = m_bIsRegularMode ? 45000 : 20000; HammerTarget = 0; m_creature->GetMotionMaster()->MovePoint(0, 746, 614, m_creature->GetPositionZ()); m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); @@ -125,13 +125,13 @@ struct MANGOS_DLL_DECL boss_eadricAI : public ScriptedAI if (Vengeance_Timer < diff) { DoCast(m_creature, SPELL_VENGEANCE); - Vengeance_Timer = 12000; + Vengeance_Timer = m_bIsRegularMode ? 12000 : 8000; }else Vengeance_Timer -= diff; if (Radiance_Timer < diff) { DoCast(m_creature, m_bIsRegularMode ? SPELL_RADIANCE : SPELL_RADIANCE_H); - Radiance_Timer = 20000; + Radiance_Timer = m_bIsRegularMode ? 20000 : 12000; }else Radiance_Timer -= diff; if (Hammer_Timer < diff) @@ -141,14 +141,14 @@ struct MANGOS_DLL_DECL boss_eadricAI : public ScriptedAI DoCast(target, SPELL_HAMMER_OF_JUSTICE); HammerTarget = target->GetGUID(); } - Hammer_Timer = 50000; + Hammer_Timer = m_bIsRegularMode ? 40000 : 15000; }else Hammer_Timer -= diff; if (Hammer_Dmg_Timer < diff) { if (Unit* pHammerTarget = Unit::GetUnit(*m_creature, HammerTarget)) DoCast(pHammerTarget, SPELL_HAMMER); - Hammer_Dmg_Timer = 50000; + Hammer_Dmg_Timer = m_bIsRegularMode ? 50000 : 15000; } else Hammer_Dmg_Timer -= diff; @@ -188,8 +188,8 @@ struct MANGOS_DLL_DECL boss_paletressAI : public ScriptedAI m_creature->SetRespawnDelay(999999999); m_creature->RemoveAurasDueToSpell(SPELL_SHIELD); Smite_Timer = 5000; - Holy_Fire_Timer = 10000; - Renew_Timer = 7000; + Holy_Fire_Timer = m_bIsRegularMode ? 10000 : 8000; + Renew_Timer = m_bIsRegularMode ? 7000 : 5000; Shield_Delay = 0; Shield_Check = 1000; summoned = false; @@ -211,8 +211,8 @@ struct MANGOS_DLL_DECL boss_paletressAI : public ScriptedAI if (m_creature->isAlive()) { m_creature->RemoveAurasDueToSpell(SPELL_SHIELD); Smite_Timer = 5000; - Holy_Fire_Timer = 10000; - Renew_Timer = 7000; + Holy_Fire_Timer = m_bIsRegularMode ? 10000 : 5000; + Renew_Timer = m_bIsRegularMode ? 7000 : 5000; Shield_Delay = 0; Shield_Check = 1000; summoned = false; @@ -257,7 +257,7 @@ struct MANGOS_DLL_DECL boss_paletressAI : public ScriptedAI m_creature->CastStop(m_bIsRegularMode ? SPELL_SMITE : SPELL_SMITE_H); if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) DoCast(target, m_bIsRegularMode ? SPELL_HOLY_FIRE : SPELL_HOLY_FIRE_H); - Holy_Fire_Timer = 10000; + Holy_Fire_Timer = m_bIsRegularMode ? 10000 : 7000; }else Holy_Fire_Timer -= diff; if (Renew_Timer < diff) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp index 91319aae8..9d7c8a267 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp @@ -226,9 +226,9 @@ struct MANGOS_DLL_DECL boss_black_knightAI : public ScriptedAI phase2 = true; phase3 = false; DoCast(m_creature, SPELL_ARMY); - Plague_Strike_Timer = 14000; - Icy_Touch_Timer = 12000; - Obliterate_Timer = 18000; + Plague_Strike_Timer = m_bIsRegularMode ? 14000 : 8000; + Icy_Touch_Timer = m_bIsRegularMode ? 12000 : 7000; + Obliterate_Timer = m_bIsRegularMode ? 18000 : 10000; } void StartPhase3() @@ -239,8 +239,8 @@ struct MANGOS_DLL_DECL boss_black_knightAI : public ScriptedAI phase1 = false; phase2 = false; phase3 = true; - Death_Timer = 5000; - Mark_Timer = 9000; + Death_Timer = m_bIsRegularMode ? 5000 : 3000; + Mark_Timer = m_bIsRegularMode ? 9000 : 7000; } void UpdateAI(const uint32 diff) @@ -251,26 +251,26 @@ struct MANGOS_DLL_DECL boss_black_knightAI : public ScriptedAI if (Plague_Strike_Timer < diff && !phase3) { DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_PLAGUE_STRIKE : SPELL_PLAGUE_STRIKE_H); - Plague_Strike_Timer = 10500; + Plague_Strike_Timer = m_bIsRegularMode ? 10500 : 7000; }else Plague_Strike_Timer -= diff; if (Icy_Touch_Timer < diff && !phase3) { DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_ICY_TOUCH : SPELL_ICY_TOUCH_H); - Icy_Touch_Timer = 10000; + Icy_Touch_Timer = m_bIsRegularMode ? 10000 : 8000; }else Icy_Touch_Timer -= diff; if (Obliterate_Timer < diff && !phase3) { DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_OBLITERATE : SPELL_OBLITERATE_H); - Obliterate_Timer = 11000; + Obliterate_Timer = m_bIsRegularMode ? 11000 : 8000; }else Obliterate_Timer -= diff; if (Choke_Timer < diff && phase1) { if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1)) DoCast(m_creature->getVictim(), SPELL_CHOKE); - Choke_Timer = 15000; + Choke_Timer = m_bIsRegularMode ? 15000 : 10000; }else Choke_Timer -= diff; if (Summon_Ghoul < diff && phase1 && !ghoul) @@ -286,7 +286,7 @@ struct MANGOS_DLL_DECL boss_black_knightAI : public ScriptedAI { if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1)) DoCast(target, SPELL_MARK); - Mark_Timer = 15000; + Mark_Timer = m_bIsRegularMode ? 15000 : 10000; }else Mark_Timer -= diff; if (Death_Timer < diff && phase3) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp index dd9708b18..7bb783244 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp @@ -182,19 +182,19 @@ struct MANGOS_DLL_DECL mob_toc5_warriorAI : public ScriptedAI if (Mortal_Strike_Timer < diff) { DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_MORTAL_STRIKE : SPELL_MORTAL_STRIKE_H); - Mortal_Strike_Timer = m_bIsRegularMode ? 9000 : 6000; + Mortal_Strike_Timer = m_bIsRegularMode ? 6000 : 4000; }else Mortal_Strike_Timer -= diff; if (Rolling_Throw_Timer < diff) { DoCast(m_creature->getVictim(), SPELL_ROLLING_THROW); - Rolling_Throw_Timer = m_bIsRegularMode ? 45000 : 30000; + Rolling_Throw_Timer = m_bIsRegularMode ? 30000 : 15000; }else Rolling_Throw_Timer -= diff; if (Bladestorm_Timer < diff) { DoCast(m_creature, SPELL_BLADESTORM); - Bladestorm_Timer = m_bIsRegularMode ? 90000 : 60000; + Bladestorm_Timer = m_bIsRegularMode ? 60000 : 20000; }else Bladestorm_Timer -= diff; if (intercept_check < diff) @@ -202,7 +202,7 @@ struct MANGOS_DLL_DECL mob_toc5_warriorAI : public ScriptedAI if (!m_creature->IsWithinDistInMap(m_creature->getVictim(), 8) && m_creature->IsWithinDistInMap(m_creature->getVictim(), 25) && Intercept_Cooldown < diff) { DoCast(m_creature->getVictim(), SPELL_INTERCEPT); - Intercept_Cooldown = 15000; + Intercept_Cooldown = m_bIsRegularMode ? 15000 : 10000; } intercept_check = 1000; } @@ -243,9 +243,9 @@ struct MANGOS_DLL_DECL mob_toc5_mageAI : public ScriptedAI { m_creature->SetRespawnDelay(999999999); Fireball_Timer = 0; - Blast_Wave_Timer = m_bIsRegularMode ? 30000 : 20000; + Blast_Wave_Timer = m_bIsRegularMode ? 20000 : 12000; Haste_Timer = m_bIsRegularMode ? 12000 : 9000; - Polymorph_Timer = m_bIsRegularMode ? 20000 : 15000; + Polymorph_Timer = m_bIsRegularMode ? 12000 : 10000; m_creature->GetMotionMaster()->MovePoint(0, 746, 614, m_creature->GetPositionZ()); m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); } @@ -336,28 +336,28 @@ struct MANGOS_DLL_DECL mob_toc5_mageAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (Fireball_Timer < diff) + if (Fireball_Timer < diff) { - DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_FIREBALL : SPELL_FIREBALL_H); + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_FIREBALL : SPELL_FIREBALL_H); Fireball_Timer = m_bIsRegularMode ? 5000 : 3000; - }else Fireball_Timer -= diff; + }else Fireball_Timer -= diff; - if (Blast_Wave_Timer < diff) + if (Blast_Wave_Timer < diff) { - DoCast(m_creature, m_bIsRegularMode ? SPELL_BLAST_WAVE : SPELL_BLAST_WAVE_H); - Blast_Wave_Timer = m_bIsRegularMode ? 30000 : 20000; + DoCast(m_creature, m_bIsRegularMode ? SPELL_BLAST_WAVE : SPELL_BLAST_WAVE_H); + Blast_Wave_Timer = m_bIsRegularMode ? 20000 : 12000; }else Blast_Wave_Timer -= diff; - if (Haste_Timer < diff) + if (Haste_Timer < diff) { - DoCast(m_creature, SPELL_HASTE); - Haste_Timer = m_bIsRegularMode ? 15000 : 10000; + DoCast(m_creature, SPELL_HASTE); + Haste_Timer = m_bIsRegularMode ? 10000 : 8000; }else Haste_Timer -= diff; - if (Polymorph_Timer < diff) + if (Polymorph_Timer < diff) { - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1)) - DoCast(target, m_bIsRegularMode ? SPELL_POLYMORPH : SPELL_POLYMORPH_H); + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, m_bIsRegularMode ? SPELL_POLYMORPH : SPELL_POLYMORPH_H); Polymorph_Timer = m_bIsRegularMode ? 20000 : 15000; }else Polymorph_Timer -= diff; @@ -397,7 +397,7 @@ struct MANGOS_DLL_DECL mob_toc5_shamanAI : public ScriptedAI m_creature->SetRespawnDelay(999999999); Chain_Lightning_Timer = m_bIsRegularMode ? 2000 : 1000; Earth_Shield_Timer = m_bIsRegularMode ? 10000 : 5000; - Healing_Wave_Timer = m_bIsRegularMode ? 20000 : 13000; + Healing_Wave_Timer = m_bIsRegularMode ? 20000 : 12000; Hex_Timer = m_bIsRegularMode ? 15000 : 10000; m_creature->GetMotionMaster()->MovePoint(0, 746, 614, m_creature->GetPositionZ()); m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); @@ -493,7 +493,7 @@ struct MANGOS_DLL_DECL mob_toc5_shamanAI : public ScriptedAI if (Chain_Lightning_Timer < diff) { DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_CHAIN_LIGHTNING : SPELL_CHAIN_LIGHTNING_H); - Chain_Lightning_Timer = m_bIsRegularMode ? 15000 : 10000; + Chain_Lightning_Timer = m_bIsRegularMode ? 12000 : 8000; }else Chain_Lightning_Timer -= diff; if (Hex_Timer < diff) @@ -528,7 +528,7 @@ struct MANGOS_DLL_DECL mob_toc5_shamanAI : public ScriptedAI if (mob3_health < mob2_health && mob1_health > mob3_health && mob3_health < 70) if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) DoCast(pTemp, m_bIsRegularMode ? SPELL_HEALING_WAVE : SPELL_HEALING_WAVE_H); - Healing_Wave_Timer = 8000; + Healing_Wave_Timer = m_bIsRegularMode ? 8000 : 6000; }else Healing_Wave_Timer -= diff; if (Earth_Shield_Timer < diff) @@ -593,8 +593,8 @@ struct MANGOS_DLL_DECL mob_toc5_hunterAI : public ScriptedAI { m_creature->SetRespawnDelay(999999999); Shoot_Timer = 0; - Lightning_Arrows_Timer = m_bIsRegularMode ? 18000 : 13000; - Multi_Shot_Timer = m_bIsRegularMode ? 15000 : 10000; + Lightning_Arrows_Timer = m_bIsRegularMode ? 18000 : 10000; + Multi_Shot_Timer = m_bIsRegularMode ? 15000 : 8000; Disengage_Cooldown = 0; enemy_check = 1000; disengage_check; @@ -697,7 +697,7 @@ struct MANGOS_DLL_DECL mob_toc5_hunterAI : public ScriptedAI } else { - m_creature->SetSpeedRate(MOVE_RUN, 1); + m_creature->SetSpeedRate(MOVE_RUN, 1.2); } enemy_check = 100; }else enemy_check -= diff; @@ -715,14 +715,14 @@ struct MANGOS_DLL_DECL mob_toc5_hunterAI : public ScriptedAI { m_creature->CastStop(SPELL_SHOOT); DoCast(m_creature->getVictim(), SPELL_MULTI_SHOT); - Multi_Shot_Timer = m_bIsRegularMode ? 15000 : 10000; + Multi_Shot_Timer = m_bIsRegularMode ? 10000 : 5000; }else Multi_Shot_Timer -= diff; if (Lightning_Arrows_Timer < diff) { m_creature->CastStop(SPELL_SHOOT); DoCast(m_creature, SPELL_LIGHTNING_ARROWS); - Lightning_Arrows_Timer = m_bIsRegularMode ? 30000 : 25000; + Lightning_Arrows_Timer = m_bIsRegularMode ? 15000 : 8000; }else Lightning_Arrows_Timer -= diff; if (disengage_check < diff) @@ -730,7 +730,7 @@ struct MANGOS_DLL_DECL mob_toc5_hunterAI : public ScriptedAI if (m_creature->IsWithinDistInMap(m_creature->getVictim(), 5) && Disengage_Cooldown == 0) { DoCast(m_creature, SPELL_DISENGAGE); - Disengage_Cooldown = 15000; + Disengage_Cooldown = m_bIsRegularMode ? 15000 : 10000; } disengage_check = 1000; }else disengage_check -= diff; @@ -764,9 +764,9 @@ struct MANGOS_DLL_DECL mob_toc5_rogueAI : public ScriptedAI void Reset() { m_creature->SetRespawnDelay(999999999); - Eviscerate_Timer = m_bIsRegularMode ? 20000 : 15000; + Eviscerate_Timer = m_bIsRegularMode ? 20000 : 10000; FoK_Timer = m_bIsRegularMode ? 15000 : 10000; - Poison_Timer = m_bIsRegularMode ? 12000 : 7000; + Poison_Timer = m_bIsRegularMode ? 12000 : 5000; m_creature->GetMotionMaster()->MovePoint(0, 746, 614, m_creature->GetPositionZ()); m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); } @@ -857,23 +857,23 @@ struct MANGOS_DLL_DECL mob_toc5_rogueAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (Eviscerate_Timer < diff) + if (Eviscerate_Timer < diff) { - DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_EVISCERATE : SPELL_EVISCERATE_H); + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_EVISCERATE : SPELL_EVISCERATE_H); Eviscerate_Timer = m_bIsRegularMode ? 15000 : 10000; }else Eviscerate_Timer -= diff; - if (FoK_Timer < diff) + if (FoK_Timer < diff) { - DoCast(m_creature->getVictim(), SPELL_FAN_OF_KNIVES); - FoK_Timer = m_bIsRegularMode ? 12000 : 7000; + DoCast(m_creature->getVictim(), SPELL_FAN_OF_KNIVES); + FoK_Timer = m_bIsRegularMode ? 12000 : 7000; }else FoK_Timer -= diff; - if (Poison_Timer < diff) + if (Poison_Timer < diff) { - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) DoCast(m_creature, SPELL_POISON_BOTTLE); - Poison_Timer = m_bIsRegularMode ? 9000 : 6000; + Poison_Timer = m_bIsRegularMode ? 10000 : 5000; }else Poison_Timer -= diff; DoMeleeAttackIfReady(); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp index 0412394d0..cd8f14c6c 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp @@ -28,7 +28,8 @@ struct MANGOS_DLL_DECL instance_trial_of_the_champion : public ScriptedInstance { instance_trial_of_the_champion(Map* pMap) : ScriptedInstance(pMap) { Initialize(); } - uint32 m_auiEncounter[MAX_ENCOUNTER]; + uint32 m_auiEncounter[MAX_ENCOUNTER+1]; + std::string m_strInstData; uint64 m_uiJacobGUID; @@ -95,18 +96,8 @@ struct MANGOS_DLL_DECL instance_trial_of_the_champion : public ScriptedInstance m_uiMemoryGUID = 0; m_uiArgentChallengerID = 0; - memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - } - - bool IsEncounterInProgress() const - { - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) - { - if (m_auiEncounter[i] == IN_PROGRESS) - return true; - } - - return false; + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) + m_auiEncounter[i] = NOT_STARTED; } void OnCreatureCreate(Creature* pCreature) @@ -470,10 +461,10 @@ struct MANGOS_DLL_DECL instance_trial_of_the_champion : public ScriptedInstance return m_uiJaerenGUID; case DATA_ARELAS: return m_uiArelasGUID; - case TYPE_GRAND_CHAMPIONS: - case TYPE_ARGENT_CHALLENGE: - case TYPE_BLACK_KNIGHT: - return m_auiEncounter[uiType]; + case TYPE_GRAND_CHAMPIONS: return m_auiEncounter[0]; + case TYPE_ARGENT_CHALLENGE: return m_auiEncounter[1]; + case TYPE_BLACK_KNIGHT: return m_auiEncounter[2]; + } return 0; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp index 9c865b7ea..207ed76a9 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp @@ -33,6 +33,20 @@ EndContentData */ /*###### ## npc_toc5_announcer ######*/ +struct _Messages +{ + char const* name; + uint32 id; + bool state; +}; + +static _Messages _GossipMessage[]= +{ +{"Вы готовы драться с чемпионами противоположной фракции?",0,true}, // +{"Вы готовы драться с чемпионом Серебряного Рассвета?",1,true}, // +{"Вы готовы драться с Черным рыцарем?",2,true}, // +{"Не надо сюда тыкать. На сегодня арена закрыта.",3,true}, // +}; struct MANGOS_DLL_DECL npc_toc5_announcerAI : public ScriptedAI { @@ -48,204 +62,125 @@ struct MANGOS_DLL_DECL npc_toc5_announcerAI : public ScriptedAI { } - void StartEvent(Player* pPlayer) + void StartEvent(Player* pPlayer) { - if (!m_pInstance) - return; - if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == NOT_STARTED) - { - m_pInstance->SetData(DATA_TOC5_ANNOUNCER, m_creature->GetGUID()); - if (m_pInstance->GetData(DATA_TOC5_ANNOUNCER) == m_pInstance->GetData(DATA_ARELAS)) - { - m_pInstance->SetData(DATA_BLACK_KNIGHT_MINION, 35564); - switch(urand(0, 4)) - { - case 0: - m_pInstance->SetData(DATA_CHAMPIONID_1, 35572); - break; - case 1: - m_pInstance->SetData(DATA_CHAMPIONID_1, 35569); - break; - case 2: - m_pInstance->SetData(DATA_CHAMPIONID_1, 35571); - break; - case 3: - m_pInstance->SetData(DATA_CHAMPIONID_1, 35570); - break; - case 4: - m_pInstance->SetData(DATA_CHAMPIONID_1, 35617); - break; - } - do{ - switch(urand(0, 4)) - { - case 0: - m_pInstance->SetData(DATA_CHAMPIONID_2, 35572); - break; - case 1: - m_pInstance->SetData(DATA_CHAMPIONID_2, 35569); - break; - case 2: - m_pInstance->SetData(DATA_CHAMPIONID_2, 35571); - break; - case 3: - m_pInstance->SetData(DATA_CHAMPIONID_2, 35570); - break; - case 4: - m_pInstance->SetData(DATA_CHAMPIONID_2, 35617); - break; - } - } while(m_pInstance->GetData(DATA_CHAMPIONID_1) == m_pInstance->GetData(DATA_CHAMPIONID_2)); - do{ - switch(urand(0, 4)) - { - case 0: - m_pInstance->SetData(DATA_CHAMPIONID_3, 35572); - break; - case 1: - m_pInstance->SetData(DATA_CHAMPIONID_3, 35569); - break; - case 2: - m_pInstance->SetData(DATA_CHAMPIONID_3, 35571); - break; - case 3: - m_pInstance->SetData(DATA_CHAMPIONID_3, 35570); - break; - case 4: - m_pInstance->SetData(DATA_CHAMPIONID_3, 35617); - break; - } - } while(m_pInstance->GetData(DATA_CHAMPIONID_1) == m_pInstance->GetData(DATA_CHAMPIONID_3) || m_pInstance->GetData(DATA_CHAMPIONID_2) == m_pInstance->GetData(DATA_CHAMPIONID_3)); - } - if (m_pInstance->GetData(DATA_TOC5_ANNOUNCER) == m_pInstance->GetData(DATA_JAEREN)) - { - m_pInstance->SetData(DATA_BLACK_KNIGHT_MINION, 123); - switch(urand(0, 4)) - { - case 0: - m_pInstance->SetData(DATA_CHAMPIONID_1, 34705); - break; - case 1: - m_pInstance->SetData(DATA_CHAMPIONID_1, 34702); - break; - case 2: - m_pInstance->SetData(DATA_CHAMPIONID_1, 34701); - break; - case 3: - m_pInstance->SetData(DATA_CHAMPIONID_1, 34657); - break; - case 4: - m_pInstance->SetData(DATA_CHAMPIONID_1, 34703); - break; - } - do{ - switch(urand(0, 4)) - { - case 0: - m_pInstance->SetData(DATA_CHAMPIONID_2, 34705); - break; - case 1: - m_pInstance->SetData(DATA_CHAMPIONID_2, 34702); - break; - case 2: - m_pInstance->SetData(DATA_CHAMPIONID_2, 34701); - break; - case 3: - m_pInstance->SetData(DATA_CHAMPIONID_2, 34657); - break; - case 4: - m_pInstance->SetData(DATA_CHAMPIONID_2, 34703); - break; - } - } while(m_pInstance->GetData(DATA_CHAMPIONID_1) == m_pInstance->GetData(DATA_CHAMPIONID_2)); - do{ - switch(urand(0, 4)) - { - case 0: - m_pInstance->SetData(DATA_CHAMPIONID_3, 34705); - break; - case 1: - m_pInstance->SetData(DATA_CHAMPIONID_3, 34702); - break; - case 2: - m_pInstance->SetData(DATA_CHAMPIONID_3, 34701); - break; - case 3: - m_pInstance->SetData(DATA_CHAMPIONID_3, 34657); - break; - case 4: - m_pInstance->SetData(DATA_CHAMPIONID_3, 34703); - break; - } - } while(m_pInstance->GetData(DATA_CHAMPIONID_1) == m_pInstance->GetData(DATA_CHAMPIONID_3) || m_pInstance->GetData(DATA_CHAMPIONID_2) == m_pInstance->GetData(DATA_CHAMPIONID_3)); - } - m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, FAIL); - } - if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == FAIL) - { - m_creature->SummonCreature(m_pInstance->GetData(DATA_CHAMPIONID_1), 738.665771, 661.031433, 412.394623, 4.698702, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 180000); - m_creature->SummonCreature(m_pInstance->GetData(DATA_CHAMPIONID_2), 746.864441, 660.918762, 411.695465, 4.698700, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 180000); - m_creature->SummonCreature(m_pInstance->GetData(DATA_CHAMPIONID_3), 754.360779, 660.816162, 412.395996, 4.698700, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 180000); - m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, IN_PROGRESS); - } - if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == DONE) - { - if (m_pInstance->GetData(TYPE_ARGENT_CHALLENGE) == NOT_STARTED) - { - switch(urand(0, 1)) - { - case 0: - m_pInstance->SetData(DATA_ARGENT_CHALLENGER, 35119); - break; - case 1: - m_pInstance->SetData(DATA_ARGENT_CHALLENGER, 34928); - break; - } - m_pInstance->SetData(TYPE_ARGENT_CHALLENGE, FAIL); - } - if (m_pInstance->GetData(TYPE_ARGENT_CHALLENGE) == FAIL) - { - - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPIONID_1)))) { - pTemp->RemoveCorpse(); - pTemp->RemoveFromWorld(); - } - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPIONID_2)))) { - pTemp->RemoveCorpse(); - pTemp->RemoveFromWorld(); - } - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPIONID_3)))) { - pTemp->RemoveCorpse(); - pTemp->RemoveFromWorld(); - } - - m_creature->SummonCreature(m_pInstance->GetData(DATA_ARGENT_CHALLENGER), 746.864441, 660.918762, 411.695465, 4.698700, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 180000); - m_pInstance->SetData(TYPE_ARGENT_CHALLENGE, IN_PROGRESS); - } - if (m_pInstance->GetData(TYPE_ARGENT_CHALLENGE) == DONE) - { - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_ARGENT_CHALLENGER)))) { - pTemp->RemoveCorpse(); - pTemp->RemoveFromWorld(); - } - - if (m_pInstance->GetData(TYPE_BLACK_KNIGHT) == DONE) - m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - else - { - m_creature->SummonCreature(35451, 746.864441, 660.918762, 411.695465, 4.698700, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 180000); - m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - } - } - } + if (!m_pInstance) return; + + if (m_pInstance->GetData(DATA_TOC5_ANNOUNCER) == 0) { + m_pInstance->SetData(DATA_TOC5_ANNOUNCER, m_creature->GetGUID()); + + if (m_pInstance->GetData(DATA_TOC5_ANNOUNCER) == m_pInstance->GetData(DATA_ARELAS)) + { + m_pInstance->SetData(DATA_BLACK_KNIGHT_MINION, 35564); + switch(urand(0, 4)) + { + case 0: m_pInstance->SetData(DATA_CHAMPIONID_1, 35572); break; + case 1: m_pInstance->SetData(DATA_CHAMPIONID_1, 35569); break; + case 2: m_pInstance->SetData(DATA_CHAMPIONID_1, 35571); break; + case 3: m_pInstance->SetData(DATA_CHAMPIONID_1, 35570); break; + case 4: m_pInstance->SetData(DATA_CHAMPIONID_1, 35617); break; + }; + do{ + switch(urand(0, 4)) + { + case 0: m_pInstance->SetData(DATA_CHAMPIONID_2, 35572); break; + case 1: m_pInstance->SetData(DATA_CHAMPIONID_2, 35569); break; + case 2: m_pInstance->SetData(DATA_CHAMPIONID_2, 35571); break; + case 3: m_pInstance->SetData(DATA_CHAMPIONID_2, 35570); break; + case 4: m_pInstance->SetData(DATA_CHAMPIONID_2, 35617); break; + } + } while(m_pInstance->GetData(DATA_CHAMPIONID_1) == m_pInstance->GetData(DATA_CHAMPIONID_2)); + do{ + switch(urand(0, 4)) + { + case 0: m_pInstance->SetData(DATA_CHAMPIONID_3, 35572); break; + case 1: m_pInstance->SetData(DATA_CHAMPIONID_3, 35569); break; + case 2: m_pInstance->SetData(DATA_CHAMPIONID_3, 35571); break; + case 3: m_pInstance->SetData(DATA_CHAMPIONID_3, 35570); break; + case 4: m_pInstance->SetData(DATA_CHAMPIONID_3, 35617); break; + } + } while(m_pInstance->GetData(DATA_CHAMPIONID_1) == m_pInstance->GetData(DATA_CHAMPIONID_3) || m_pInstance->GetData(DATA_CHAMPIONID_2) == m_pInstance->GetData(DATA_CHAMPIONID_3)); + }; + + if (m_pInstance->GetData(DATA_TOC5_ANNOUNCER) == m_pInstance->GetData(DATA_JAEREN)) + { + m_pInstance->SetData(DATA_BLACK_KNIGHT_MINION, 123); + + switch(urand(0, 4)) + { + case 0: m_pInstance->SetData(DATA_CHAMPIONID_1, 34705); break; + case 1: m_pInstance->SetData(DATA_CHAMPIONID_1, 34702); break; + case 2: m_pInstance->SetData(DATA_CHAMPIONID_1, 34701); break; + case 3: m_pInstance->SetData(DATA_CHAMPIONID_1, 34657); break; + case 4: m_pInstance->SetData(DATA_CHAMPIONID_1, 34703); break; + } + do{ + switch(urand(0, 4)) + { + case 0: m_pInstance->SetData(DATA_CHAMPIONID_2, 34705); break; + case 1: m_pInstance->SetData(DATA_CHAMPIONID_2, 34702); break; + case 2: m_pInstance->SetData(DATA_CHAMPIONID_2, 34701); break; + case 3: m_pInstance->SetData(DATA_CHAMPIONID_2, 34657); break; + case 4: m_pInstance->SetData(DATA_CHAMPIONID_2, 34703); break; + } + } while(m_pInstance->GetData(DATA_CHAMPIONID_1) == m_pInstance->GetData(DATA_CHAMPIONID_2)); + do{ + switch(urand(0, 4)) + { + case 0: m_pInstance->SetData(DATA_CHAMPIONID_3, 34705); break; + case 1: m_pInstance->SetData(DATA_CHAMPIONID_3, 34702); break; + case 2: m_pInstance->SetData(DATA_CHAMPIONID_3, 34701); break; + case 3: m_pInstance->SetData(DATA_CHAMPIONID_3, 34657); break; + case 4: m_pInstance->SetData(DATA_CHAMPIONID_3, 34703); break; + } + } while(m_pInstance->GetData(DATA_CHAMPIONID_1) == m_pInstance->GetData(DATA_CHAMPIONID_3) || m_pInstance->GetData(DATA_CHAMPIONID_2) == m_pInstance->GetData(DATA_CHAMPIONID_3)); + + }; + + switch(urand(0, 1)) + { + case 0: m_pInstance->SetData(DATA_ARGENT_CHALLENGER, 35119); break; + case 1: m_pInstance->SetData(DATA_ARGENT_CHALLENGER, 34928); break; + }; + } +// else if (m_pInstance->GetData(DATA_TOC5_ANNOUNCER) != m_creature->GetGUID()) return; + + if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == NOT_STARTED) + { + m_creature->SummonCreature(m_pInstance->GetData(DATA_CHAMPIONID_1), 738.665771, 661.031433, 412.394623, 4.698702, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 180000); + m_creature->SummonCreature(m_pInstance->GetData(DATA_CHAMPIONID_2), 746.864441, 660.918762, 411.695465, 4.698700, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 180000); + m_creature->SummonCreature(m_pInstance->GetData(DATA_CHAMPIONID_3), 754.360779, 660.816162, 412.395996, 4.698700, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 180000); + m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, IN_PROGRESS); + return; + }; + + if (m_pInstance->GetData(TYPE_ARGENT_CHALLENGE) == NOT_STARTED) + { + m_creature->SummonCreature(m_pInstance->GetData(DATA_ARGENT_CHALLENGER), 746.864441, 660.918762, 411.695465, 4.698700, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 180000); + m_pInstance->SetData(TYPE_ARGENT_CHALLENGE, IN_PROGRESS); + return; + }; + + if (m_pInstance->GetData(TYPE_BLACK_KNIGHT) == NOT_STARTED) + { + m_creature->SummonCreature(35451, 746.864441, 660.918762, 411.695465, 4.698700, TEMPSUMMON_MANUAL_DESPAWN, 0); + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + m_pInstance->SetData(TYPE_BLACK_KNIGHT, IN_PROGRESS); + return; + }; + + if (m_pInstance->GetData(TYPE_BLACK_KNIGHT) == DONE) { + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + return; + }; + } void UpdateAI(const uint32 diff) { + if (!m_pInstance) return; + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - - if (!m_pInstance) - return; } }; @@ -256,19 +191,46 @@ CreatureAI* GetAI_npc_toc5_announcer(Creature* pCreature) bool GossipHello_npc_toc5_announcer(Player* pPlayer, Creature* pCreature) { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_START_EVENT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + ScriptedInstance* m_pInstance; + + if (!m_pInstance) return false; + + if(!pPlayer->getAttackers().empty()) return true; + +// if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == NOT_STARTED) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, _GossipMessage[0].name, GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+1); + +// if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == DONE +// && m_pInstance->GetData(TYPE_ARGENT_CHALLENGE) == NOT_STARTED) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, _GossipMessage[1].name, GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+2); + +// if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == DONE +// && m_pInstance->GetData(TYPE_ARGENT_CHALLENGE) == DONE +// && m_pInstance->GetData(TYPE_BLACK_KNIGHT) == NOT_STARTED) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, _GossipMessage[2].name, GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+3); + +// if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == DONE +// && m_pInstance->GetData(TYPE_ARGENT_CHALLENGE) == DONE +// && m_pInstance->GetData(TYPE_BLACK_KNIGHT) == DONE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, _GossipMessage[3].name, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); + + pPlayer->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, pCreature->GetGUID()); + return true; } bool GossipSelect_npc_toc5_announcer(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + if (uiAction == GOSSIP_ACTION_INFO_DEF+1 || + uiAction == GOSSIP_ACTION_INFO_DEF+2 || + uiAction == GOSSIP_ACTION_INFO_DEF+3 || + uiAction == GOSSIP_ACTION_INFO_DEF+4) { - pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->CLOSE_GOSSIP_MENU(); ((npc_toc5_announcerAI*)pCreature->AI())->StartEvent(pPlayer); } + else pPlayer->CLOSE_GOSSIP_MENU(); return true; } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h index 11257be97..bf20111fc 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h @@ -78,6 +78,7 @@ enum GO_EADRIC_LOOT_H = 195375, GO_PALETRESS_LOOT = 195323, GO_PALETRESS_LOOT_H = 195324 + }; #endif \ No newline at end of file From 67030fe5149e21fde573f6321013adf08cdf2514 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Tue, 2 Feb 2010 19:53:15 +0300 Subject: [PATCH 123/405] Trial of crusader final rewrite --- .../boss_argent_challenge.cpp | 74 ++-- .../boss_black_knight.cpp | 20 +- .../boss_grand_champions.cpp | 348 +++++------------- .../instance_trial_of_the_champion.cpp | 21 +- .../trial_of_the_champion.cpp | 157 ++++---- 5 files changed, 243 insertions(+), 377 deletions(-) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp index 81cd61928..00062b36c 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp @@ -26,6 +26,7 @@ EndScriptData */ enum { + SPELL_BERSERK = 47008, //yells //eadric @@ -70,7 +71,7 @@ struct MANGOS_DLL_DECL boss_eadricAI : public ScriptedAI uint32 Radiance_Timer; uint32 Hammer_Timer; uint32 Hammer_Dmg_Timer; - + uint32 m_uiBerserk_Timer; uint64 HammerTarget; void Reset() @@ -80,28 +81,18 @@ struct MANGOS_DLL_DECL boss_eadricAI : public ScriptedAI Radiance_Timer = m_bIsRegularMode ? 15000 : 8000; Hammer_Timer = m_bIsRegularMode ? 40000 : 10000; Hammer_Dmg_Timer = m_bIsRegularMode ? 45000 : 20000; + m_uiBerserk_Timer = m_bIsRegularMode ? 300000 : 180000; HammerTarget = 0; m_creature->GetMotionMaster()->MovePoint(0, 746, 614, m_creature->GetPositionZ()); m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); } - void EnterEvadeMode() - { - if (m_pInstance->GetData(TYPE_ARGENT_CHALLENGE) == IN_PROGRESS) { - if (m_creature->isAlive()) { - Vengeance_Timer = 1000; - Radiance_Timer = 15000; - Hammer_Timer = 40000; - Hammer_Dmg_Timer = 45000; - HammerTarget = 0; - m_creature->RemoveArenaAuras(true); - m_creature->SendMonsterMove(746.864441, 660.918762, 411.695465, 4.698700, m_creature->GetMonsterMoveFlags(), 1); - m_creature->GetMap()->CreatureRelocation(m_creature, 754.360779, 660.816162, 412.395996, 4.698700); - m_creature->SetHealth(m_creature->GetMaxHealth()); - } - } - } - + void EnterEvadeMode() + { + m_pInstance->SetData(TYPE_ARGENT_CHALLENGE, FAIL); + m_creature->ForcedDespawn(); + } + void Aggro(Unit* pWho) { if (!m_pInstance) @@ -151,7 +142,14 @@ struct MANGOS_DLL_DECL boss_eadricAI : public ScriptedAI Hammer_Dmg_Timer = m_bIsRegularMode ? 50000 : 15000; } else Hammer_Dmg_Timer -= diff; - + + if (m_uiBerserk_Timer < diff) + { + DoCast(m_creature, SPELL_BERSERK); + m_uiBerserk_Timer = m_bIsRegularMode ? 300000 : 180000; + } + else m_uiBerserk_Timer -= diff; + DoMeleeAttackIfReady(); } }; @@ -179,7 +177,7 @@ struct MANGOS_DLL_DECL boss_paletressAI : public ScriptedAI uint32 Renew_Timer; uint32 Shield_Delay; uint32 Shield_Check; - + uint32 m_uiBerserk_Timer; bool summoned; bool shielded; @@ -192,6 +190,7 @@ struct MANGOS_DLL_DECL boss_paletressAI : public ScriptedAI Renew_Timer = m_bIsRegularMode ? 7000 : 5000; Shield_Delay = 0; Shield_Check = 1000; + m_uiBerserk_Timer = m_bIsRegularMode ? 300000 : 180000; summoned = false; shielded = false; m_creature->GetMotionMaster()->MovePoint(0, 746, 614, m_creature->GetPositionZ()); @@ -205,26 +204,12 @@ struct MANGOS_DLL_DECL boss_paletressAI : public ScriptedAI summoned = true; } - void EnterEvadeMode() - { - if (m_pInstance->GetData(TYPE_ARGENT_CHALLENGE) == IN_PROGRESS) { - if (m_creature->isAlive()) { - m_creature->RemoveAurasDueToSpell(SPELL_SHIELD); - Smite_Timer = 5000; - Holy_Fire_Timer = m_bIsRegularMode ? 10000 : 5000; - Renew_Timer = m_bIsRegularMode ? 7000 : 5000; - Shield_Delay = 0; - Shield_Check = 1000; - summoned = false; - shielded = false; - m_creature->RemoveArenaAuras(true); - m_creature->SendMonsterMove(746.864441, 660.918762, 411.695465, 4.698700, m_creature->GetMonsterMoveFlags(), 1); - m_creature->GetMap()->CreatureRelocation(m_creature, 754.360779, 660.816162, 412.395996, 4.698700); - m_creature->SetHealth(m_creature->GetMaxHealth()); - } - } - } - + void EnterEvadeMode() + { + m_pInstance->SetData(TYPE_ARGENT_CHALLENGE, FAIL); + m_creature->ForcedDespawn(); + } + void Aggro(Unit* pWho) { if (!m_pInstance) @@ -359,7 +344,14 @@ struct MANGOS_DLL_DECL boss_paletressAI : public ScriptedAI shielded = false; } else Shield_Check = 1000; }else Shield_Check -= diff; - + + if (m_uiBerserk_Timer < diff) + { + DoCast(m_creature, SPELL_BERSERK); + m_uiBerserk_Timer = m_bIsRegularMode ? 300000 : 180000; + } + else m_uiBerserk_Timer -= diff; + DoMeleeAttackIfReady(); } }; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp index 9d7c8a267..ccd4dd7c2 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp @@ -26,6 +26,7 @@ EndScriptData */ enum { + SPELL_BERSERK = 47008, //yells //undead @@ -132,7 +133,7 @@ struct MANGOS_DLL_DECL boss_black_knightAI : public ScriptedAI uint32 Mark_Timer; uint32 Phase_Delay; uint32 Summon_Ghoul; - + uint32 m_uiBerserk_Timer; bool phase1; bool phase2; bool phase3; @@ -143,18 +144,18 @@ struct MANGOS_DLL_DECL boss_black_knightAI : public ScriptedAI m_creature->SetRespawnDelay(999999999); m_creature->SetDisplayId(29837); SetEquipmentSlots(false, EQUIP_SWORD, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE); - Plague_Strike_Timer = 5000; - Icy_Touch_Timer = 10000; - Obliterate_Timer = 16000; + Plague_Strike_Timer = m_bIsRegularMode ? 5000 : 4000; + Icy_Touch_Timer = m_bIsRegularMode ? 10000 : 7000; + Obliterate_Timer = m_bIsRegularMode ? 16000 : 10000; Choke_Timer = 15000; Summon_Ghoul = 4000; + m_uiBerserk_Timer = m_bIsRegularMode ? 300000 : 180000; phase1 = true; phase2 = false; phase3 = false; ghoul = false; m_creature->GetMotionMaster()->MovePoint(0, 746, 614, m_creature->GetPositionZ()); m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); - } void EnterEvadeMode() @@ -294,7 +295,14 @@ struct MANGOS_DLL_DECL boss_black_knightAI : public ScriptedAI DoCast(m_creature, m_bIsRegularMode ? SPELL_DEATH : SPELL_DEATH_H); Death_Timer = 3500; }else Death_Timer -= diff; - + + if (m_uiBerserk_Timer < diff) + { + DoCast(m_creature, SPELL_BERSERK); + m_uiBerserk_Timer = m_bIsRegularMode ? 300000 : 180000; + } + else m_uiBerserk_Timer -= diff; + DoMeleeAttackIfReady(); } }; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp index 7bb783244..a8d82e519 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp @@ -26,8 +26,9 @@ EndScriptData */ enum { + //common + SPELL_BERSERK = 47008, //yells - //warrior SPELL_MORTAL_STRIKE = 68783, SPELL_MORTAL_STRIKE_H = 68784, @@ -79,6 +80,7 @@ struct MANGOS_DLL_DECL mob_toc5_warriorAI : public ScriptedAI uint32 Rolling_Throw_Timer; uint32 Intercept_Cooldown; uint32 intercept_check; + uint32 m_uiBerserk_Timer; void Reset() { @@ -86,6 +88,7 @@ struct MANGOS_DLL_DECL mob_toc5_warriorAI : public ScriptedAI Mortal_Strike_Timer = m_bIsRegularMode ? 9000 : 6000; Bladestorm_Timer = m_bIsRegularMode ? 30000 : 20000; Rolling_Throw_Timer = m_bIsRegularMode ? 45000 : 30000; + m_uiBerserk_Timer = m_bIsRegularMode ? 300000 : 180000; Intercept_Cooldown = 0; intercept_check = 1000; m_creature->GetMotionMaster()->MovePoint(0, 746, 614, m_creature->GetPositionZ()); @@ -93,54 +96,16 @@ struct MANGOS_DLL_DECL mob_toc5_warriorAI : public ScriptedAI } - void EnterEvadeMode() - { - if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == IN_PROGRESS) - { - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) - if (!pTemp->isAlive()) - { - pTemp->Respawn(); - pTemp->SendMonsterMove(738.665771, 661.031433, 412.394623, 4.698702, pTemp->GetMonsterMoveFlags(), 1); - pTemp->GetMap()->CreatureRelocation(pTemp, 738.665771, 661.031433, 412.394623, 4.698702); - } - else - { - pTemp->RemoveArenaAuras(true); - pTemp->SetHealth(pTemp->GetMaxHealth()); - pTemp->SendMonsterMove(738.665771, 661.031433, 412.394623, 4.698702, pTemp->GetMonsterMoveFlags(), 1); - pTemp->GetMap()->CreatureRelocation(pTemp, 738.665771, 661.031433, 412.394623, 4.698702); - } - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) - if (!pTemp->isAlive()) - { - pTemp->Respawn(); - pTemp->SendMonsterMove(746.864441, 660.918762, 411.695465, 4.698700, pTemp->GetMonsterMoveFlags(), 1); - pTemp->GetMap()->CreatureRelocation(pTemp, 746.864441, 660.918762, 411.695465, 4.698700); - } - else - { - pTemp->RemoveArenaAuras(true); - pTemp->SetHealth(pTemp->GetMaxHealth()); - pTemp->SendMonsterMove(746.864441, 660.918762, 411.695465, 4.698700, pTemp->GetMonsterMoveFlags(), 1); - pTemp->GetMap()->CreatureRelocation(pTemp, 746.864441, 660.918762, 411.695465, 4.698700); - } - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) - if (!pTemp->isAlive()) - { - pTemp->Respawn(); - pTemp->SendMonsterMove(754.360779, 660.816162, 412.395996, 4.698700, pTemp->GetMonsterMoveFlags(), 1); - pTemp->GetMap()->CreatureRelocation(pTemp, 754.360779, 660.816162, 412.395996, 4.698700); - } - else - { - pTemp->RemoveArenaAuras(true); - pTemp->SetHealth(pTemp->GetMaxHealth()); - pTemp->SendMonsterMove(754.360779, 660.816162, 412.395996, 4.698700, pTemp->GetMonsterMoveFlags(), 1); - pTemp->GetMap()->CreatureRelocation(pTemp, 754.360779, 660.816162, 412.395996, 4.698700); - } - } - } + void EnterEvadeMode() + { + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) + pTemp->ForcedDespawn(); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) + pTemp->ForcedDespawn(); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) + pTemp->ForcedDespawn(); + m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, FAIL); + } void Aggro(Unit* pWho) { @@ -211,7 +176,13 @@ struct MANGOS_DLL_DECL mob_toc5_warriorAI : public ScriptedAI intercept_check -= diff; Intercept_Cooldown -= diff; } - + if (m_uiBerserk_Timer < diff) + { + DoCast(m_creature, SPELL_BERSERK); + m_uiBerserk_Timer = m_bIsRegularMode ? 300000 : 180000; + } + else m_uiBerserk_Timer -= diff; + DoMeleeAttackIfReady(); } }; @@ -238,6 +209,7 @@ struct MANGOS_DLL_DECL mob_toc5_mageAI : public ScriptedAI uint32 Blast_Wave_Timer; uint32 Haste_Timer; uint32 Polymorph_Timer; + uint32 m_uiBerserk_Timer; void Reset() { @@ -245,59 +217,22 @@ struct MANGOS_DLL_DECL mob_toc5_mageAI : public ScriptedAI Fireball_Timer = 0; Blast_Wave_Timer = m_bIsRegularMode ? 20000 : 12000; Haste_Timer = m_bIsRegularMode ? 12000 : 9000; + m_uiBerserk_Timer = m_bIsRegularMode ? 300000 : 180000; Polymorph_Timer = m_bIsRegularMode ? 12000 : 10000; m_creature->GetMotionMaster()->MovePoint(0, 746, 614, m_creature->GetPositionZ()); m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); } - void EnterEvadeMode() - { - if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == IN_PROGRESS) - { - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) - if (!pTemp->isAlive()) - { - pTemp->Respawn(); - pTemp->SendMonsterMove(738.665771, 661.031433, 412.394623, 4.698702, pTemp->GetMonsterMoveFlags(), 1); - pTemp->GetMap()->CreatureRelocation(pTemp, 738.665771, 661.031433, 412.394623, 4.698702); - } - else - { - pTemp->RemoveArenaAuras(true); - pTemp->SetHealth(pTemp->GetMaxHealth()); - pTemp->SendMonsterMove(738.665771, 661.031433, 412.394623, 4.698702, pTemp->GetMonsterMoveFlags(), 1); - pTemp->GetMap()->CreatureRelocation(pTemp, 738.665771, 661.031433, 412.394623, 4.698702); - } - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) - if (!pTemp->isAlive()) - { - pTemp->Respawn(); - pTemp->SendMonsterMove(746.864441, 660.918762, 411.695465, 4.698700, pTemp->GetMonsterMoveFlags(), 1); - pTemp->GetMap()->CreatureRelocation(pTemp, 746.864441, 660.918762, 411.695465, 4.698700); - } - else - { - pTemp->RemoveArenaAuras(true); - pTemp->SetHealth(pTemp->GetMaxHealth()); - pTemp->SendMonsterMove(746.864441, 660.918762, 411.695465, 4.698700, pTemp->GetMonsterMoveFlags(), 1); - pTemp->GetMap()->CreatureRelocation(pTemp, 746.864441, 660.918762, 411.695465, 4.698700); - } - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) - if (!pTemp->isAlive()) - { - pTemp->Respawn(); - pTemp->SendMonsterMove(754.360779, 660.816162, 412.395996, 4.698700, pTemp->GetMonsterMoveFlags(), 1); - pTemp->GetMap()->CreatureRelocation(pTemp, 754.360779, 660.816162, 412.395996, 4.698700); - } - else - { - pTemp->RemoveArenaAuras(true); - pTemp->SetHealth(pTemp->GetMaxHealth()); - pTemp->SendMonsterMove(754.360779, 660.816162, 412.395996, 4.698700, pTemp->GetMonsterMoveFlags(), 1); - pTemp->GetMap()->CreatureRelocation(pTemp, 754.360779, 660.816162, 412.395996, 4.698700); - } - } - } + void EnterEvadeMode() + { + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) + pTemp->ForcedDespawn(); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) + pTemp->ForcedDespawn(); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) + pTemp->ForcedDespawn(); + m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, FAIL); + } void Aggro(Unit* pWho) { @@ -360,7 +295,14 @@ struct MANGOS_DLL_DECL mob_toc5_mageAI : public ScriptedAI DoCast(target, m_bIsRegularMode ? SPELL_POLYMORPH : SPELL_POLYMORPH_H); Polymorph_Timer = m_bIsRegularMode ? 20000 : 15000; }else Polymorph_Timer -= diff; - + + if (m_uiBerserk_Timer < diff) + { + DoCast(m_creature, SPELL_BERSERK); + m_uiBerserk_Timer = m_bIsRegularMode ? 300000 : 180000; + } + else m_uiBerserk_Timer -= diff; + DoMeleeAttackIfReady(); } }; @@ -391,6 +333,7 @@ struct MANGOS_DLL_DECL mob_toc5_shamanAI : public ScriptedAI float mob1_health; float mob2_health; float mob3_health; + uint32 m_uiBerserk_Timer; void Reset() { @@ -398,60 +341,23 @@ struct MANGOS_DLL_DECL mob_toc5_shamanAI : public ScriptedAI Chain_Lightning_Timer = m_bIsRegularMode ? 2000 : 1000; Earth_Shield_Timer = m_bIsRegularMode ? 10000 : 5000; Healing_Wave_Timer = m_bIsRegularMode ? 20000 : 12000; + m_uiBerserk_Timer = m_bIsRegularMode ? 300000 : 180000; Hex_Timer = m_bIsRegularMode ? 15000 : 10000; m_creature->GetMotionMaster()->MovePoint(0, 746, 614, m_creature->GetPositionZ()); m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); } - void EnterEvadeMode() - { - if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == IN_PROGRESS) - { - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) - if (!pTemp->isAlive()) - { - pTemp->Respawn(); - pTemp->SendMonsterMove(738.665771, 661.031433, 412.394623, 4.698702, pTemp->GetMonsterMoveFlags(), 1); - pTemp->GetMap()->CreatureRelocation(pTemp, 738.665771, 661.031433, 412.394623, 4.698702); - } - else - { - pTemp->RemoveArenaAuras(true); - pTemp->SetHealth(pTemp->GetMaxHealth()); - pTemp->SendMonsterMove(738.665771, 661.031433, 412.394623, 4.698702, pTemp->GetMonsterMoveFlags(), 1); - pTemp->GetMap()->CreatureRelocation(pTemp, 738.665771, 661.031433, 412.394623, 4.698702); - } - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) - if (!pTemp->isAlive()) - { - pTemp->Respawn(); - pTemp->SendMonsterMove(746.864441, 660.918762, 411.695465, 4.698700, pTemp->GetMonsterMoveFlags(), 1); - pTemp->GetMap()->CreatureRelocation(pTemp, 746.864441, 660.918762, 411.695465, 4.698700); - } - else - { - pTemp->RemoveArenaAuras(true); - pTemp->SetHealth(pTemp->GetMaxHealth()); - pTemp->SendMonsterMove(746.864441, 660.918762, 411.695465, 4.698700, pTemp->GetMonsterMoveFlags(), 1); - pTemp->GetMap()->CreatureRelocation(pTemp, 746.864441, 660.918762, 411.695465, 4.698700); - } - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) - if (!pTemp->isAlive()) - { - pTemp->Respawn(); - pTemp->SendMonsterMove(754.360779, 660.816162, 412.395996, 4.698700, pTemp->GetMonsterMoveFlags(), 1); - pTemp->GetMap()->CreatureRelocation(pTemp, 754.360779, 660.816162, 412.395996, 4.698700); - } - else - { - pTemp->RemoveArenaAuras(true); - pTemp->SetHealth(pTemp->GetMaxHealth()); - pTemp->SendMonsterMove(754.360779, 660.816162, 412.395996, 4.698700, pTemp->GetMonsterMoveFlags(), 1); - pTemp->GetMap()->CreatureRelocation(pTemp, 754.360779, 660.816162, 412.395996, 4.698700); - } - } - } + void EnterEvadeMode() + { + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) + pTemp->ForcedDespawn(); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) + pTemp->ForcedDespawn(); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) + pTemp->ForcedDespawn(); + m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, FAIL); + } void Aggro(Unit* pWho) { @@ -559,7 +465,14 @@ struct MANGOS_DLL_DECL mob_toc5_shamanAI : public ScriptedAI } Earth_Shield_Timer = m_bIsRegularMode ? 35000 : 25000; }else Earth_Shield_Timer -= diff; - + + if (m_uiBerserk_Timer < diff) + { + DoCast(m_creature, SPELL_BERSERK); + m_uiBerserk_Timer = m_bIsRegularMode ? 300000 : 180000; + } + else m_uiBerserk_Timer -= diff; + DoMeleeAttackIfReady(); } }; @@ -588,12 +501,14 @@ struct MANGOS_DLL_DECL mob_toc5_hunterAI : public ScriptedAI uint32 Disengage_Cooldown; uint32 enemy_check; uint32 disengage_check; + uint32 m_uiBerserk_Timer; void Reset() { m_creature->SetRespawnDelay(999999999); Shoot_Timer = 0; Lightning_Arrows_Timer = m_bIsRegularMode ? 18000 : 10000; + m_uiBerserk_Timer = m_bIsRegularMode ? 300000 : 180000; Multi_Shot_Timer = m_bIsRegularMode ? 15000 : 8000; Disengage_Cooldown = 0; enemy_check = 1000; @@ -603,54 +518,16 @@ struct MANGOS_DLL_DECL mob_toc5_hunterAI : public ScriptedAI } - void EnterEvadeMode() - { - if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == IN_PROGRESS) - { - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) - if (!pTemp->isAlive()) - { - pTemp->Respawn(); - pTemp->SendMonsterMove(738.665771, 661.031433, 412.394623, 4.698702, pTemp->GetMonsterMoveFlags(), 1); - pTemp->GetMap()->CreatureRelocation(pTemp, 738.665771, 661.031433, 412.394623, 4.698702); - } - else - { - pTemp->RemoveArenaAuras(true); - pTemp->SetHealth(pTemp->GetMaxHealth()); - pTemp->SendMonsterMove(738.665771, 661.031433, 412.394623, 4.698702, pTemp->GetMonsterMoveFlags(), 1); - pTemp->GetMap()->CreatureRelocation(pTemp, 738.665771, 661.031433, 412.394623, 4.698702); - } - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) - if (!pTemp->isAlive()) - { - pTemp->Respawn(); - pTemp->SendMonsterMove(746.864441, 660.918762, 411.695465, 4.698700, pTemp->GetMonsterMoveFlags(), 1); - pTemp->GetMap()->CreatureRelocation(pTemp, 746.864441, 660.918762, 411.695465, 4.698700); - } - else - { - pTemp->RemoveArenaAuras(true); - pTemp->SetHealth(pTemp->GetMaxHealth()); - pTemp->SendMonsterMove(746.864441, 660.918762, 411.695465, 4.698700, pTemp->GetMonsterMoveFlags(), 1); - pTemp->GetMap()->CreatureRelocation(pTemp, 746.864441, 660.918762, 411.695465, 4.698700); - } - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) - if (!pTemp->isAlive()) - { - pTemp->Respawn(); - pTemp->SendMonsterMove(754.360779, 660.816162, 412.395996, 4.698700, pTemp->GetMonsterMoveFlags(), 1); - pTemp->GetMap()->CreatureRelocation(pTemp, 754.360779, 660.816162, 412.395996, 4.698700); - } - else - { - pTemp->RemoveArenaAuras(true); - pTemp->SetHealth(pTemp->GetMaxHealth()); - pTemp->SendMonsterMove(754.360779, 660.816162, 412.395996, 4.698700, pTemp->GetMonsterMoveFlags(), 1); - pTemp->GetMap()->CreatureRelocation(pTemp, 754.360779, 660.816162, 412.395996, 4.698700); - } - } - } + void EnterEvadeMode() + { + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) + pTemp->ForcedDespawn(); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) + pTemp->ForcedDespawn(); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) + pTemp->ForcedDespawn(); + m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, FAIL); + } void Aggro(Unit* pWho) { @@ -734,7 +611,15 @@ struct MANGOS_DLL_DECL mob_toc5_hunterAI : public ScriptedAI } disengage_check = 1000; }else disengage_check -= diff; - + + if (m_uiBerserk_Timer < diff) + { + DoCast(m_creature, SPELL_BERSERK); + m_uiBerserk_Timer = m_bIsRegularMode ? 300000 : 180000; + } + else m_uiBerserk_Timer -= diff; + + DoMeleeAttackIfReady(); } }; @@ -760,65 +645,29 @@ struct MANGOS_DLL_DECL mob_toc5_rogueAI : public ScriptedAI uint32 Eviscerate_Timer; uint32 FoK_Timer; uint32 Poison_Timer; + uint32 m_uiBerserk_Timer; void Reset() { m_creature->SetRespawnDelay(999999999); Eviscerate_Timer = m_bIsRegularMode ? 20000 : 10000; FoK_Timer = m_bIsRegularMode ? 15000 : 10000; + m_uiBerserk_Timer = m_bIsRegularMode ? 300000 : 180000; Poison_Timer = m_bIsRegularMode ? 12000 : 5000; m_creature->GetMotionMaster()->MovePoint(0, 746, 614, m_creature->GetPositionZ()); m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); } - void EnterEvadeMode() - { - if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == IN_PROGRESS) - { - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) - if (!pTemp->isAlive()) - { - pTemp->Respawn(); - pTemp->SendMonsterMove(738.665771, 661.031433, 412.394623, 4.698702, pTemp->GetMonsterMoveFlags(), 1); - pTemp->GetMap()->CreatureRelocation(pTemp, 738.665771, 661.031433, 412.394623, 4.698702); - } - else - { - pTemp->RemoveArenaAuras(true); - pTemp->SetHealth(pTemp->GetMaxHealth()); - pTemp->SendMonsterMove(738.665771, 661.031433, 412.394623, 4.698702, pTemp->GetMonsterMoveFlags(), 1); - pTemp->GetMap()->CreatureRelocation(pTemp, 738.665771, 661.031433, 412.394623, 4.698702); - } - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) - if (!pTemp->isAlive()) - { - pTemp->Respawn(); - pTemp->SendMonsterMove(746.864441, 660.918762, 411.695465, 4.698700, pTemp->GetMonsterMoveFlags(), 1); - pTemp->GetMap()->CreatureRelocation(pTemp, 746.864441, 660.918762, 411.695465, 4.698700); - } - else - { - pTemp->RemoveArenaAuras(true); - pTemp->SetHealth(pTemp->GetMaxHealth()); - pTemp->SendMonsterMove(746.864441, 660.918762, 411.695465, 4.698700, pTemp->GetMonsterMoveFlags(), 1); - pTemp->GetMap()->CreatureRelocation(pTemp, 746.864441, 660.918762, 411.695465, 4.698700); - } - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) - if (!pTemp->isAlive()) - { - pTemp->Respawn(); - pTemp->SendMonsterMove(754.360779, 660.816162, 412.395996, 4.698700, pTemp->GetMonsterMoveFlags(), 1); - pTemp->GetMap()->CreatureRelocation(pTemp, 754.360779, 660.816162, 412.395996, 4.698700); - } - else - { - pTemp->RemoveArenaAuras(true); - pTemp->SetHealth(pTemp->GetMaxHealth()); - pTemp->SendMonsterMove(754.360779, 660.816162, 412.395996, 4.698700, pTemp->GetMonsterMoveFlags(), 1); - pTemp->GetMap()->CreatureRelocation(pTemp, 754.360779, 660.816162, 412.395996, 4.698700); - } - } - } + void EnterEvadeMode() + { + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) + pTemp->ForcedDespawn(); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) + pTemp->ForcedDespawn(); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) + pTemp->ForcedDespawn(); + m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, FAIL); + } void Aggro(Unit* pWho) { @@ -875,7 +724,14 @@ struct MANGOS_DLL_DECL mob_toc5_rogueAI : public ScriptedAI DoCast(m_creature, SPELL_POISON_BOTTLE); Poison_Timer = m_bIsRegularMode ? 10000 : 5000; }else Poison_Timer -= diff; - + + if (m_uiBerserk_Timer < diff) + { + DoCast(m_creature, SPELL_BERSERK); + m_uiBerserk_Timer = m_bIsRegularMode ? 300000 : 180000; + } + else m_uiBerserk_Timer -= diff; + DoMeleeAttackIfReady(); } }; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp index cd8f14c6c..30c2267f2 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp @@ -378,16 +378,20 @@ struct MANGOS_DLL_DECL instance_trial_of_the_champion : public ScriptedInstance break; case TYPE_GRAND_CHAMPIONS: m_auiEncounter[0] = uiData; - if (uiData == DONE) + if (uiData == DONE) { if (GameObject* pChest = instance->GetGameObject(m_uiChampionsLootGUID)) if (pChest && !pChest->isSpawned()) pChest->SetRespawnTime(350000000); } + if (uiData == FAIL) + { + m_auiEncounter[0] = NOT_STARTED; + } break; case TYPE_ARGENT_CHALLENGE: m_auiEncounter[1] = uiData; - if (uiData == DONE) + if (uiData == DONE) { if (m_uiArgentChallenger == m_uiEadricGUID) if (GameObject* pChest = instance->GetGameObject(m_uiEadricLootGUID)) @@ -398,9 +402,17 @@ struct MANGOS_DLL_DECL instance_trial_of_the_champion : public ScriptedInstance if (pChest && !pChest->isSpawned()) pChest->SetRespawnTime(350000000); } + if (uiData == FAIL) + { + m_auiEncounter[1] = NOT_STARTED; + } break; case TYPE_BLACK_KNIGHT: m_auiEncounter[2] = uiData; + if (uiData == FAIL) + { + m_auiEncounter[2] = NOT_STARTED; + } break; } @@ -432,8 +444,10 @@ struct MANGOS_DLL_DECL instance_trial_of_the_champion : public ScriptedInstance return m_uiChampion3; case DATA_MEMORY: return m_uiMemoryGUID; + case DATA_ARGENT_CHALLENGER: + return m_uiArgentChallengerID; case DATA_BLACK_KNIGHT: - return m_uiBlackKnightGUID; + return m_uiBlackKnightGUID; } return 0; @@ -464,7 +478,6 @@ struct MANGOS_DLL_DECL instance_trial_of_the_champion : public ScriptedInstance case TYPE_GRAND_CHAMPIONS: return m_auiEncounter[0]; case TYPE_ARGENT_CHALLENGE: return m_auiEncounter[1]; case TYPE_BLACK_KNIGHT: return m_auiEncounter[2]; - } return 0; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp index 207ed76a9..b5eea599c 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp @@ -38,14 +38,15 @@ struct _Messages char const* name; uint32 id; bool state; + uint32 encounter; }; static _Messages _GossipMessage[]= { -{"Вы готовы драться с чемпионами противоположной фракции?",0,true}, // -{"Вы готовы драться с чемпионом Серебряного Рассвета?",1,true}, // -{"Вы готовы драться с Черным рыцарем?",2,true}, // -{"Не надо сюда тыкать. На сегодня арена закрыта.",3,true}, // +{"Вы готовы драться с чемпионами противоположной фракции?",GOSSIP_ACTION_INFO_DEF+1,false,TYPE_GRAND_CHAMPIONS}, // +{"Вы готовы драться с чемпионом Серебряного Рассвета?",GOSSIP_ACTION_INFO_DEF+2,false,TYPE_ARGENT_CHALLENGE}, // +{"Вы готовы драться с Черным рыцарем?",GOSSIP_ACTION_INFO_DEF+3,false,TYPE_BLACK_KNIGHT}, // +{"Не надо сюда тыкать. На сегодня арена закрыта.",GOSSIP_ACTION_INFO_DEF+4,true,TYPE_BLACK_KNIGHT}, // }; struct MANGOS_DLL_DECL npc_toc5_announcerAI : public ScriptedAI @@ -62,12 +63,53 @@ struct MANGOS_DLL_DECL npc_toc5_announcerAI : public ScriptedAI { } - void StartEvent(Player* pPlayer) + void UpdateAI(const uint32 diff) { - if (!m_pInstance) return; + if (!m_pInstance) return; + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + } +}; + +CreatureAI* GetAI_npc_toc5_announcer(Creature* pCreature) +{ + return new npc_toc5_announcerAI(pCreature); +} + +bool GossipHello_npc_toc5_announcer(Player* pPlayer, Creature* pCreature) +{ + + ScriptedInstance* m_pInstance; + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + + if (!m_pInstance) return false; + + if(!pPlayer->getAttackers().empty()) return true; + + for(uint8 i = 0; i < MAX_ENCOUNTER+1; i++) { + if (!_GossipMessage[i].state && (m_pInstance->GetData(_GossipMessage[i].encounter) == NOT_STARTED || m_pInstance->GetData(_GossipMessage[i].encounter) == IN_PROGRESS)) + {pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, _GossipMessage[i].name, GOSSIP_SENDER_MAIN,_GossipMessage[i].id); + break; + } + if (_GossipMessage[i].state && m_pInstance->GetData(_GossipMessage[i].encounter) == DONE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, _GossipMessage[i].name, GOSSIP_SENDER_MAIN,_GossipMessage[i].id); + }; + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_toc5_announcer(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + ScriptedInstance* m_pInstance; + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + +pPlayer->CLOSE_GOSSIP_MENU(); +switch(uiAction) { + case GOSSIP_ACTION_INFO_DEF+1: { if (m_pInstance->GetData(DATA_TOC5_ANNOUNCER) == 0) { - m_pInstance->SetData(DATA_TOC5_ANNOUNCER, m_creature->GetGUID()); + m_pInstance->SetData(DATA_TOC5_ANNOUNCER, pCreature->GetGUID()); if (m_pInstance->GetData(DATA_TOC5_ANNOUNCER) == m_pInstance->GetData(DATA_ARELAS)) { @@ -142,96 +184,51 @@ struct MANGOS_DLL_DECL npc_toc5_announcerAI : public ScriptedAI case 0: m_pInstance->SetData(DATA_ARGENT_CHALLENGER, 35119); break; case 1: m_pInstance->SetData(DATA_ARGENT_CHALLENGER, 34928); break; }; - } -// else if (m_pInstance->GetData(DATA_TOC5_ANNOUNCER) != m_creature->GetGUID()) return; + }; - if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == NOT_STARTED) + if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == NOT_STARTED || m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == IN_PROGRESS) { - m_creature->SummonCreature(m_pInstance->GetData(DATA_CHAMPIONID_1), 738.665771, 661.031433, 412.394623, 4.698702, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 180000); - m_creature->SummonCreature(m_pInstance->GetData(DATA_CHAMPIONID_2), 746.864441, 660.918762, 411.695465, 4.698700, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 180000); - m_creature->SummonCreature(m_pInstance->GetData(DATA_CHAMPIONID_3), 754.360779, 660.816162, 412.395996, 4.698700, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 180000); + pCreature->SummonCreature(m_pInstance->GetData(DATA_CHAMPIONID_1), 738.665771, 661.031433, 412.394623, 4.698702, TEMPSUMMON_MANUAL_DESPAWN, 0); + pCreature->SummonCreature(m_pInstance->GetData(DATA_CHAMPIONID_2), 746.864441, 660.918762, 411.695465, 4.698700, TEMPSUMMON_MANUAL_DESPAWN, 0); + pCreature->SummonCreature(m_pInstance->GetData(DATA_CHAMPIONID_3), 754.360779, 660.816162, 412.395996, 4.698700, TEMPSUMMON_MANUAL_DESPAWN, 0); m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, IN_PROGRESS); - return; }; + }; - if (m_pInstance->GetData(TYPE_ARGENT_CHALLENGE) == NOT_STARTED) + case GOSSIP_ACTION_INFO_DEF+2: { + if ((m_pInstance->GetData(TYPE_ARGENT_CHALLENGE) == NOT_STARTED || m_pInstance->GetData(TYPE_ARGENT_CHALLENGE) == IN_PROGRESS) && m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == DONE) { - m_creature->SummonCreature(m_pInstance->GetData(DATA_ARGENT_CHALLENGER), 746.864441, 660.918762, 411.695465, 4.698700, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 180000); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*pCreature), m_pInstance->GetData64(DATA_CHAMPION_1)))) + pTemp->ForcedDespawn(); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*pCreature), m_pInstance->GetData64(DATA_CHAMPION_2)))) + pTemp->ForcedDespawn(); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*pCreature), m_pInstance->GetData64(DATA_CHAMPION_3)))) + pTemp->ForcedDespawn(); + + pCreature->SummonCreature(m_pInstance->GetData(DATA_ARGENT_CHALLENGER), 746.864441, 660.918762, 411.695465, 4.698700, TEMPSUMMON_MANUAL_DESPAWN, 0); m_pInstance->SetData(TYPE_ARGENT_CHALLENGE, IN_PROGRESS); - return; }; - if (m_pInstance->GetData(TYPE_BLACK_KNIGHT) == NOT_STARTED) + }; + + case GOSSIP_ACTION_INFO_DEF+3: { + if ((m_pInstance->GetData(TYPE_BLACK_KNIGHT) == NOT_STARTED || m_pInstance->GetData(TYPE_BLACK_KNIGHT) == IN_PROGRESS) && m_pInstance->GetData(TYPE_ARGENT_CHALLENGE) == DONE) { - m_creature->SummonCreature(35451, 746.864441, 660.918762, 411.695465, 4.698700, TEMPSUMMON_MANUAL_DESPAWN, 0); - m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*pCreature), m_pInstance->GetData64(DATA_ARGENT_CHALLENGER)))) + pTemp->ForcedDespawn(); + pCreature->SummonCreature(35451, 746.864441, 660.918762, 411.695465, 4.698700, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000); + pCreature->DealDamage(pCreature, pCreature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); m_pInstance->SetData(TYPE_BLACK_KNIGHT, IN_PROGRESS); - return; }; + }; + case GOSSIP_ACTION_INFO_DEF+4: { if (m_pInstance->GetData(TYPE_BLACK_KNIGHT) == DONE) { - m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - return; + pCreature->DealDamage(pCreature, pCreature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); }; - - } - - void UpdateAI(const uint32 diff) - { - if (!m_pInstance) return; - - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - } + }; }; -CreatureAI* GetAI_npc_toc5_announcer(Creature* pCreature) -{ - return new npc_toc5_announcerAI(pCreature); -} - -bool GossipHello_npc_toc5_announcer(Player* pPlayer, Creature* pCreature) -{ - - ScriptedInstance* m_pInstance; - - if (!m_pInstance) return false; - - if(!pPlayer->getAttackers().empty()) return true; - -// if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == NOT_STARTED) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, _GossipMessage[0].name, GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+1); - -// if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == DONE -// && m_pInstance->GetData(TYPE_ARGENT_CHALLENGE) == NOT_STARTED) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, _GossipMessage[1].name, GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+2); - -// if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == DONE -// && m_pInstance->GetData(TYPE_ARGENT_CHALLENGE) == DONE -// && m_pInstance->GetData(TYPE_BLACK_KNIGHT) == NOT_STARTED) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, _GossipMessage[2].name, GOSSIP_SENDER_MAIN,GOSSIP_ACTION_INFO_DEF+3); - -// if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == DONE -// && m_pInstance->GetData(TYPE_ARGENT_CHALLENGE) == DONE -// && m_pInstance->GetData(TYPE_BLACK_KNIGHT) == DONE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, _GossipMessage[3].name, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); - - pPlayer->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, pCreature->GetGUID()); - - return true; -} - -bool GossipSelect_npc_toc5_announcer(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_INFO_DEF+1 || - uiAction == GOSSIP_ACTION_INFO_DEF+2 || - uiAction == GOSSIP_ACTION_INFO_DEF+3 || - uiAction == GOSSIP_ACTION_INFO_DEF+4) - { - pPlayer->CLOSE_GOSSIP_MENU(); - ((npc_toc5_announcerAI*)pCreature->AI())->StartEvent(pPlayer); - } - else pPlayer->CLOSE_GOSSIP_MENU(); - return true; } From cdd0b29a25a35db7b815e85cf778fb46a423fbdb Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Tue, 2 Feb 2010 20:03:27 +0300 Subject: [PATCH 124/405] Trial of crusader new() --- .../trial_of_the_crusader/def_crusader.h | 10 - .../instance_trial_of_the_crusader.cpp | 174 +++++++++++++ .../trial_of_the_crusader.cpp | 239 ++++++++++++++++++ .../trial_of_the_crusader.h | 44 ++++ 4 files changed, 457 insertions(+), 10 deletions(-) delete mode 100644 scripts/northrend/crusaders_coliseum/trial_of_the_crusader/def_crusader.h create mode 100644 scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp create mode 100644 scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp create mode 100644 scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/def_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/def_crusader.h deleted file mode 100644 index f74024642..000000000 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/def_crusader.h +++ /dev/null @@ -1,10 +0,0 @@ - -#ifndef DEF_CRUSADER_H -#define DEF_CRUSADER_H - -enum -{ - MAX_ENCOUNTERS = 15; - -}; -#endif diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp new file mode 100644 index 000000000..96476bcfd --- /dev/null +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -0,0 +1,174 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 +* 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, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +/* ScriptData +SDName: Instance_Trial_Of_the_crusader +SD%Complete: 10% +SDComment: +SDCategory: Trial Of the crusader +EndScriptData */ + +#include "precompiled.h" +#include "trial_of_the_crusader.h" + +struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance +{ + instance_trial_of_the_crusader(Map* pMap) : ScriptedInstance(pMap) { Initialize(); } + + uint32 m_auiEncounter[MAX_ENCOUNTER+1]; + + std::string m_strInstData; + + uint64 m_uiJacobGUID; + uint64 m_uiAmbroseGUID; + uint64 m_uiColososGUID; + uint64 m_uiJaelyneGUID; + uint64 m_uiLanaGUID; + uint64 m_uiMokraGUID; + uint64 m_uiEresseaGUID; + uint64 m_uiRunokGUID; + uint64 m_uiZultoreGUID; + uint64 m_uiVisceriGUID; + uint64 m_uicrusadersLootGUID; + uint64 m_uiEadricGUID; + uint64 m_uiEadricLootGUID; + uint64 m_uiPaletressGUID; + uint64 m_uiPaletressLootGUID; + uint64 m_uiBlackKnightGUID; + + void Initialize() + { + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) + m_auiEncounter[i] = NOT_STARTED; + } + + void OnCreatureCreate(Creature* pCreature) + { + switch(pCreature->GetEntry()) + { + case NPC_JACOB: + m_uiJacobGUID = pCreature->GetGUID(); + break; + } + } + + void OnObjectCreate(GameObject *pGo) + { + switch(pGo->GetEntry()) + { + case GO_crusaderS_LOOT: m_uicrusadersLootGUID = pGo->GetGUID(); break; + } + } + + void SetData(uint32 uiType, uint32 uiData) + { + switch(uiType) + { + case DATA_TOC_ANNOUNCER: m_uiAnnouncerGUID = uiData; break; + case TYPE_GRAND_crusaderS: m_auiEncounter[0] = uiData; + if (uiData == DONE) + { + if (GameObject* pChest = instance->GetGameObject(m_uicrusadersLootGUID)) + if (pChest && !pChest->isSpawned()) + pChest->SetRespawnTime(350000000); + } + if (uiData == FAIL) + { + m_auiEncounter[0] = NOT_STARTED; + } + break; + } + + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + saveStream << m_auiEncounter[i] << " "; + + m_strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } + } + + uint64 GetData64(uint32 uiData) + { + switch(uiData) + { + case DATA_crusader_1: return m_uicrusader1; + } + return 0; + } + + uint32 GetData(uint32 uiType) + { + switch(uiType) + { + case DATA_crusaderID_1: return m_uicrusaderId1; + case TYPE_GRAND_crusaderS: return m_auiEncounter[0]; + case TYPE_ARGENT_CHALLENGE: return m_auiEncounter[1]; + case TYPE_BLACK_KNIGHT: return m_auiEncounter[2]; + } + + return 0; + } + + const char* Save() + { + return m_strInstData.c_str(); + } + + void Load(const char* strIn) + { + if (!strIn) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(strIn); + + std::istringstream loadStream(strIn); + + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + loadStream >> m_auiEncounter[i]; + + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; + } + + OUT_LOAD_INST_DATA_COMPLETE; + } +}; + +InstanceData* GetInstanceData_instance_trial_of_the_crusader(Map* pMap) +{ + return new instance_trial_of_the_crusader(pMap); +} + +void AddSC_instance_trial_of_the_crusader() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "instance_trial_of_the_crusader"; + newscript->GetInstanceData = &GetInstanceData_instance_trial_of_the_crusader; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp new file mode 100644 index 000000000..684794f6f --- /dev/null +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -0,0 +1,239 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Trial Of the crusader +SD%Complete: 10% +SDComment: event script +SDCategory: trial_of_the_crusader +EndScriptData */ + +#include "precompiled.h" +#include "trial_of_the_crusader.h" + +struct _Messages +{ + char const* name; + uint32 id; + bool state; + uint32 encounter; +}; + +static _Messages _GossipMessage[]= +{ +{"Вы готовы драться с бестиями Нортренда?",GOSSIP_ACTION_INFO_DEF+1,false,TYPE_BEASTS}, // +{"Вы готовы драться с лордом Джараксусом?",GOSSIP_ACTION_INFO_DEF+2,false,TYPE_JARAXXUS}, // +{"Вы готовы драться с крестоносцами фракций?",GOSSIP_ACTION_INFO_DEF+3,false,TYPE_CRUSADERS}, // +{"Вы готовы драться с Близнецами?",GOSSIP_ACTION_INFO_DEF+4,false,TYPE_FROJA}, // +{"Вы готовы драться с Ануб`Араком?",GOSSIP_ACTION_INFO_DEF+5,false,TYPE_ANUBARAK}, // +{"Не надо сюда тыкать. На сегодня арена закрыта.",GOSSIP_ACTION_INFO_DEF+6,true,TYPE_ANUBARAK}, // +}; +#define NUM_MERSSAGES 6 + +struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI +{ + npc_toc5_announcerAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + void Reset() + { + } + + void UpdateAI(const uint32 diff) + { + if (!m_pInstance) return; + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + + } +}; + +CreatureAI* GetAI_npc_toc_announcer(Creature* pCreature) +{ + return new npc_toc_announcerAI(pCreature); +} + +bool GossipHello_npc_toc_announcer(Player* pPlayer, Creature* pCreature) +{ + + ScriptedInstance* m_pInstance; + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + + if (!m_pInstance) return false; + + if(!pPlayer->getAttackers().empty()) return true; + + for(uint8 i = 0; i < NUM_MESSAGES; i++) { + if (!_GossipMessage[i].state && (m_pInstance->GetData(_GossipMessage[i].encounter) == NOT_STARTED || m_pInstance->GetData(_GossipMessage[i].encounter) == IN_PROGRESS)) + {pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, _GossipMessage[i].name, GOSSIP_SENDER_MAIN,_GossipMessage[i].id); + break; + } + if (_GossipMessage[i].state && m_pInstance->GetData(_GossipMessage[i].encounter) == DONE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, _GossipMessage[i].name, GOSSIP_SENDER_MAIN,_GossipMessage[i].id); + }; + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_toc5_announcer(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + ScriptedInstance* m_pInstance; + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + +pPlayer->CLOSE_GOSSIP_MENU(); + +switch(uiAction) { + case GOSSIP_ACTION_INFO_DEF+1: { + if (m_pInstance->GetData(DATA_TOC5_ANNOUNCER) == 0) { + m_pInstance->SetData(DATA_TOC5_ANNOUNCER, pCreature->GetGUID()); + + if (m_pInstance->GetData(DATA_TOC5_ANNOUNCER) == m_pInstance->GetData(DATA_ARELAS)) + { + m_pInstance->SetData(DATA_BLACK_KNIGHT_MINION, 35564); + switch(urand(0, 4)) + { + case 0: m_pInstance->SetData(DATA_CHAMPIONID_1, 35572); break; + case 1: m_pInstance->SetData(DATA_CHAMPIONID_1, 35569); break; + case 2: m_pInstance->SetData(DATA_CHAMPIONID_1, 35571); break; + case 3: m_pInstance->SetData(DATA_CHAMPIONID_1, 35570); break; + case 4: m_pInstance->SetData(DATA_CHAMPIONID_1, 35617); break; + }; + do{ + switch(urand(0, 4)) + { + case 0: m_pInstance->SetData(DATA_CHAMPIONID_2, 35572); break; + case 1: m_pInstance->SetData(DATA_CHAMPIONID_2, 35569); break; + case 2: m_pInstance->SetData(DATA_CHAMPIONID_2, 35571); break; + case 3: m_pInstance->SetData(DATA_CHAMPIONID_2, 35570); break; + case 4: m_pInstance->SetData(DATA_CHAMPIONID_2, 35617); break; + } + } while(m_pInstance->GetData(DATA_CHAMPIONID_1) == m_pInstance->GetData(DATA_CHAMPIONID_2)); + do{ + switch(urand(0, 4)) + { + case 0: m_pInstance->SetData(DATA_CHAMPIONID_3, 35572); break; + case 1: m_pInstance->SetData(DATA_CHAMPIONID_3, 35569); break; + case 2: m_pInstance->SetData(DATA_CHAMPIONID_3, 35571); break; + case 3: m_pInstance->SetData(DATA_CHAMPIONID_3, 35570); break; + case 4: m_pInstance->SetData(DATA_CHAMPIONID_3, 35617); break; + } + } while(m_pInstance->GetData(DATA_CHAMPIONID_1) == m_pInstance->GetData(DATA_CHAMPIONID_3) || m_pInstance->GetData(DATA_CHAMPIONID_2) == m_pInstance->GetData(DATA_CHAMPIONID_3)); + }; + + if (m_pInstance->GetData(DATA_TOC5_ANNOUNCER) == m_pInstance->GetData(DATA_JAEREN)) + { + m_pInstance->SetData(DATA_BLACK_KNIGHT_MINION, 123); + + switch(urand(0, 4)) + { + case 0: m_pInstance->SetData(DATA_CHAMPIONID_1, 34705); break; + case 1: m_pInstance->SetData(DATA_CHAMPIONID_1, 34702); break; + case 2: m_pInstance->SetData(DATA_CHAMPIONID_1, 34701); break; + case 3: m_pInstance->SetData(DATA_CHAMPIONID_1, 34657); break; + case 4: m_pInstance->SetData(DATA_CHAMPIONID_1, 34703); break; + } + do{ + switch(urand(0, 4)) + { + case 0: m_pInstance->SetData(DATA_CHAMPIONID_2, 34705); break; + case 1: m_pInstance->SetData(DATA_CHAMPIONID_2, 34702); break; + case 2: m_pInstance->SetData(DATA_CHAMPIONID_2, 34701); break; + case 3: m_pInstance->SetData(DATA_CHAMPIONID_2, 34657); break; + case 4: m_pInstance->SetData(DATA_CHAMPIONID_2, 34703); break; + } + } while(m_pInstance->GetData(DATA_CHAMPIONID_1) == m_pInstance->GetData(DATA_CHAMPIONID_2)); + do{ + switch(urand(0, 4)) + { + case 0: m_pInstance->SetData(DATA_CHAMPIONID_3, 34705); break; + case 1: m_pInstance->SetData(DATA_CHAMPIONID_3, 34702); break; + case 2: m_pInstance->SetData(DATA_CHAMPIONID_3, 34701); break; + case 3: m_pInstance->SetData(DATA_CHAMPIONID_3, 34657); break; + case 4: m_pInstance->SetData(DATA_CHAMPIONID_3, 34703); break; + } + } while(m_pInstance->GetData(DATA_CHAMPIONID_1) == m_pInstance->GetData(DATA_CHAMPIONID_3) || m_pInstance->GetData(DATA_CHAMPIONID_2) == m_pInstance->GetData(DATA_CHAMPIONID_3)); + + }; + + switch(urand(0, 1)) + { + case 0: m_pInstance->SetData(DATA_ARGENT_CHALLENGER, 35119); break; + case 1: m_pInstance->SetData(DATA_ARGENT_CHALLENGER, 34928); break; + }; + }; + + if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == NOT_STARTED || m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == IN_PROGRESS) + { + pCreature->SummonCreature(m_pInstance->GetData(DATA_CHAMPIONID_1), 738.665771, 661.031433, 412.394623, 4.698702, TEMPSUMMON_MANUAL_DESPAWN, 0); + pCreature->SummonCreature(m_pInstance->GetData(DATA_CHAMPIONID_2), 746.864441, 660.918762, 411.695465, 4.698700, TEMPSUMMON_MANUAL_DESPAWN, 0); + pCreature->SummonCreature(m_pInstance->GetData(DATA_CHAMPIONID_3), 754.360779, 660.816162, 412.395996, 4.698700, TEMPSUMMON_MANUAL_DESPAWN, 0); + m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, IN_PROGRESS); + }; + }; + + case GOSSIP_ACTION_INFO_DEF+2: { + if ((m_pInstance->GetData(TYPE_ARGENT_CHALLENGE) == NOT_STARTED || m_pInstance->GetData(TYPE_ARGENT_CHALLENGE) == IN_PROGRESS) && m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == DONE) + { + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*pCreature), m_pInstance->GetData64(DATA_CHAMPION_1)))) + pTemp->ForcedDespawn(); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*pCreature), m_pInstance->GetData64(DATA_CHAMPION_2)))) + pTemp->ForcedDespawn(); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*pCreature), m_pInstance->GetData64(DATA_CHAMPION_3)))) + pTemp->ForcedDespawn(); + + pCreature->SummonCreature(m_pInstance->GetData(DATA_ARGENT_CHALLENGER), 746.864441, 660.918762, 411.695465, 4.698700, TEMPSUMMON_MANUAL_DESPAWN, 0); + m_pInstance->SetData(TYPE_ARGENT_CHALLENGE, IN_PROGRESS); + }; + + }; + + case GOSSIP_ACTION_INFO_DEF+3: { + if ((m_pInstance->GetData(TYPE_BLACK_KNIGHT) == NOT_STARTED || m_pInstance->GetData(TYPE_BLACK_KNIGHT) == IN_PROGRESS) && m_pInstance->GetData(TYPE_ARGENT_CHALLENGE) == DONE) + { + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*pCreature), m_pInstance->GetData64(DATA_ARGENT_CHALLENGER)))) + pTemp->ForcedDespawn(); + pCreature->SummonCreature(35451, 746.864441, 660.918762, 411.695465, 4.698700, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000); + pCreature->DealDamage(pCreature, pCreature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + m_pInstance->SetData(TYPE_BLACK_KNIGHT, IN_PROGRESS); + }; + }; + + case GOSSIP_ACTION_INFO_DEF+4: { + if (m_pInstance->GetData(TYPE_BLACK_KNIGHT) == DONE) { + pCreature->DealDamage(pCreature, pCreature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + }; + }; +}; + + return true; +} + +void AddSC_trial_of_the_crusader() +{ + Script* NewScript; + + NewScript = new Script; + NewScript->Name = "npc_toc_announcer"; + NewScript->GetAI = &GetAI_npc_toc_announcer; + NewScript->pGossipHello = &GossipHello_npc_toc_announcer; + NewScript->pGossipSelect = &GossipSelect_npc_toc_announcer; + NewScript->RegisterSelf(); +} \ No newline at end of file diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h new file mode 100644 index 000000000..f73e27ce4 --- /dev/null +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -0,0 +1,44 @@ + +#ifndef DEF_CRUSADER_H +#define DEF_CRUSADER_H + +enum +{ + MAX_ENCOUNTERS = 15, + NPC_BARRENT = 34816, + + NPC_ICEHOWL = 34797, + NPC_GORMOK = 35469, + NPC_L1 = 34797, + NPC_L2 = 34797, + + NPC_JARAXXUS = 34780, + + NPC_CRUSADER_1_1 = 34460, + NPC_CRUSADER_1_2 = 34463, + NPC_CRUSADER_1_3 = 34461, + NPC_CRUSADER_1_4 = 34471, + NPC_CRUSADER_1_5 = 34475, + NPC_CRUSADER_1_6 = 34472, + + NPC_CRUSADER_2_1 = 34453, + NPC_CRUSADER_2_2 = 34455, + NPC_CRUSADER_2_3 = 34458, + NPC_CRUSADER_2_4 = 34454, + NPC_CRUSADER_2_5 = 34451, + NPC_CRUSADER_2_6 = 34456, + + + NPC_LIGHTBANE = 34497, + NPC_DARKBANE = 34496, + + NPC_ANUBARAK = 34564, + + TYPE_BEASTS = 1, + TYPE_JARAXXUS = 2, + TYPE_CRUSADERS = 3, + TYPE_FROJA = 4, + TYPE_ANUBARAK = 5 + +}; +#endif From 80ae8581dc32c43c958dda441f651176025d077e Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 3 Feb 2010 00:04:29 +0300 Subject: [PATCH 125/405] Small changes --- scripts/outland/black_temple/boss_reliquary_of_souls.cpp | 4 ++-- .../hellfire_ramparts/boss_omor_the_unscarred.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/outland/black_temple/boss_reliquary_of_souls.cpp b/scripts/outland/black_temple/boss_reliquary_of_souls.cpp index 3dcea0ba9..7beae261a 100644 --- a/scripts/outland/black_temple/boss_reliquary_of_souls.cpp +++ b/scripts/outland/black_temple/boss_reliquary_of_souls.cpp @@ -79,12 +79,12 @@ EndScriptData */ #define CREATURE_ENSLAVED_SOUL 23469 -struct Position +struct _Position { float x,y; }; -static Position Coords[]= +static _Position Coords[]= { {450.4, 212.3}, {542.1, 212.3}, diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp index 4d6fc9965..265e665c9 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp @@ -133,7 +133,7 @@ struct MANGOS_DLL_DECL boss_omor_the_unscarredAI : public ScriptedAI if (Player* pPlayer = (Player*)Unit::GetUnit(*m_creature,playerGUID)) { //if unit dosen't have this flag, then no pulling back (script will attempt cast, even if orbital strike was resisted) - if (pPlayer->HasMovementFlag(MOVEMENTFLAG_FALLING)) + if (pPlayer->HasMovementFlag(MOVEFLAG_FALLING)) { m_creature->InterruptNonMeleeSpells(false); DoCast(pPlayer,SPELL_SHADOW_WHIP); From 69a94b178bc96b64b739947f7106862ba0d7cf04 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 3 Feb 2010 21:19:44 +0300 Subject: [PATCH 126/405] New instance pattern added --- Makefile.am | 7 + addition/723_icecrown_down_mangos.sql | 10 + .../instance_trial_of_the_crusader.cpp | 100 ++++++---- .../trial_of_the_crusader.cpp | 113 +----------- .../trial_of_the_crusader.h | 21 ++- .../forge_of_souls/boss_bronjahm.cpp | 128 +++++++++++++ .../forge_of_souls/boss_devourer_of_souls.cpp | 64 +++++++ .../forge_of_souls/def_forge.h | 10 +- .../instance_forge_of_souls.cpp | 164 +++++++++++++++++ .../halls_of_reflection/def_halls.h | 6 +- .../instance_halls_of_reflection.cpp | 164 +++++++++++++++++ .../boss_forgemaster_garfrost.cpp | 64 +++++++ .../pit_of_saron/boss_ick_and_krick.cpp | 108 +++++++++++ .../boss_scourgelord_tirannus.cpp | 64 +++++++ .../icecrown_citadel/pit_of_saron/def_pit.h | 18 +- .../pit_of_saron/instance_pit_of_saron.cpp | 172 ++++++++++++++++++ system/ScriptLoader.cpp | 18 ++ 17 files changed, 1060 insertions(+), 171 deletions(-) create mode 100644 addition/723_icecrown_down_mangos.sql create mode 100644 scripts/northrend/icecrown_citadel/forge_of_souls/boss_bronjahm.cpp create mode 100644 scripts/northrend/icecrown_citadel/forge_of_souls/boss_devourer_of_souls.cpp create mode 100644 scripts/northrend/icecrown_citadel/forge_of_souls/instance_forge_of_souls.cpp create mode 100644 scripts/northrend/icecrown_citadel/halls_of_reflection/instance_halls_of_reflection.cpp create mode 100644 scripts/northrend/icecrown_citadel/pit_of_saron/boss_forgemaster_garfrost.cpp create mode 100644 scripts/northrend/icecrown_citadel/pit_of_saron/boss_ick_and_krick.cpp create mode 100644 scripts/northrend/icecrown_citadel/pit_of_saron/boss_scourgelord_tirannus.cpp create mode 100644 scripts/northrend/icecrown_citadel/pit_of_saron/instance_pit_of_saron.cpp diff --git a/Makefile.am b/Makefile.am index ca7b315f0..434a794fe 100644 --- a/Makefile.am +++ b/Makefile.am @@ -517,6 +517,13 @@ scripts/northrend/icecrown_citadel/spire/instance_icecrown_spire.cpp \ scripts/northrend/icecrown_citadel/spire/boss_deathbringer_saurfang.cpp \ scripts/northrend/icecrown_citadel/spire/boss_lady_deathwhisper.cpp \ scripts/northrend/icecrown_citadel/spire/boss_lord_marrogwar.cpp \ +scripts/northrend/icecrown_citadel/forge_of_souls/instance_forge_of_souls.cpp \ +scripts/northrend/icecrown_citadel/forge_of_souls/boss_devourer_of_souls.cpp \ +scripts/northrend/icecrown_citadel/forge_of_souls/boss_bronjahm.cpp \ +scripts/northrend/icecrown_citadel/pit_of_saron/instance_pit_of_saron.cpp \ +scripts/northrend/icecrown_citadel/pit_of_saron/boss_forgemaster_garfrost.cpp \ +scripts/northrend/icecrown_citadel/pit_of_saron/boss_ick_and_krick.cpp \ +scripts/northrend/icecrown_citadel/pit_of_saron/boss_scourgelord_tirannus.cpp \ scripts/world/areatrigger_scripts.cpp \ scripts/world/boss_emeriss.cpp \ scripts/world/boss_lethon.cpp \ diff --git a/addition/723_icecrown_down_mangos.sql b/addition/723_icecrown_down_mangos.sql new file mode 100644 index 000000000..aa97f5cdc --- /dev/null +++ b/addition/723_icecrown_down_mangos.sql @@ -0,0 +1,10 @@ +-- UPDATE `instance_template` SET `script`='instance_forge_of_souls' WHERE `map`=632; + +-- UPDATE `creature_template` SET `ScriptName`='boss_bronjahm' WHERE `entry`=36497; +-- UPDATE `creature_template` SET `ScriptName`='boss_devourer' WHERE `entry`=33113; + + +-- UPDATE `instance_template` SET `script`='instance_pit_of_saron' WHERE `map`=658; + + +-- UPDATE `instance_template` SET `script`='instance_halls_of_reflection' WHERE `map`=668; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index 96476bcfd..f75ff54d4 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -26,28 +26,26 @@ EndScriptData */ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance { - instance_trial_of_the_crusader(Map* pMap) : ScriptedInstance(pMap) { Initialize(); } + instance_trial_of_the_crusader(Map* pMap) : ScriptedInstance(pMap) { + Difficulty = pMap->GetDifficulty(); + Initialize(); + } uint32 m_auiEncounter[MAX_ENCOUNTER+1]; - + uint8 Difficulty; std::string m_strInstData; - uint64 m_uiJacobGUID; - uint64 m_uiAmbroseGUID; - uint64 m_uiColososGUID; - uint64 m_uiJaelyneGUID; - uint64 m_uiLanaGUID; - uint64 m_uiMokraGUID; - uint64 m_uiEresseaGUID; - uint64 m_uiRunokGUID; - uint64 m_uiZultoreGUID; - uint64 m_uiVisceriGUID; - uint64 m_uicrusadersLootGUID; - uint64 m_uiEadricGUID; - uint64 m_uiEadricLootGUID; - uint64 m_uiPaletressGUID; - uint64 m_uiPaletressLootGUID; - uint64 m_uiBlackKnightGUID; + uint64 m_uiBarrentGUID; + + uint64 m_uiGormokGUID; + uint64 m_uiAcidmawGUID; + uint64 m_uiDreadscaleGUID; + uint64 m_uiIcehowlGUID; + uint64 m_uiJaraxxusGUID; + uint64 m_uiDarkbaneGUID; + uint64 m_uiLightbaneGUID; + + uint64 m_uiCrusadersCacheGUID; void Initialize() { @@ -59,9 +57,15 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance { switch(pCreature->GetEntry()) { - case NPC_JACOB: - m_uiJacobGUID = pCreature->GetGUID(); - break; + case NPC_BARRENT: m_uiBarrentGUID = pCreature->GetGUID(); break; + case NPC_GORMOK: m_uiGormokGUID = pCreature->GetGUID(); break; + case NPC_ACIDMAW: m_uiAcidmawGUID = pCreature->GetGUID(); break; + case NPC_DREADSCALE: m_uiDreascaleGUID = pCreature->GetGUID(); break; + case NPC_ICEHOWL: m_uiIcehowlGUID = pCreature->GetGUID(); break; + case NPC_JARAXXUS: m_uiJaraxxusGUID = pCreature->GetGUID(); break; + case NPC_DARKBANE: m_uiDarkbaneGUID = pCreature->GetGUID(); break; + case NPC_LIGHTBANE: m_uiLightbaneGUID = pCreature->GetGUID(); break; + case NPC_ANUBARAK: m_uiBarrentGUID = pCreature->GetGUID(); break; } } @@ -69,7 +73,22 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance { switch(pGo->GetEntry()) { - case GO_crusaderS_LOOT: m_uicrusadersLootGUID = pGo->GetGUID(); break; + case GO_CRUSADERS_CACHE_10: + if(Difficulty == RAID_DIFFICULTY_10MAN_NORMAL) + m_uiCrusadersCacheGUID = pGo->GetGUID(); + break; + case GO_CRUSADERS_CACHE_25: + if(Difficulty == RAID_DIFFICULTY_25MAN_NORMAL) + m_uiCrusadersCacheGUID = pGo->GetGUID(); + break; + case GO_CRUSADERS_CACHE_10H: + if(Difficulty == RAID_DIFFICULTY_10MAN_HEROIC) + m_uiCrusadersCacheGUID = pGo->GetGUID(); + break; + case GO_CRUSADERS_CACHE_25H: + if(Difficulty == RAID_DIFFICULTY_25MAN_HEROIC) + m_uiCrusadersCacheGUID = pGo->GetGUID(); + break; } } @@ -77,19 +96,11 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance { switch(uiType) { - case DATA_TOC_ANNOUNCER: m_uiAnnouncerGUID = uiData; break; - case TYPE_GRAND_crusaderS: m_auiEncounter[0] = uiData; - if (uiData == DONE) - { - if (GameObject* pChest = instance->GetGameObject(m_uicrusadersLootGUID)) - if (pChest && !pChest->isSpawned()) - pChest->SetRespawnTime(350000000); - } - if (uiData == FAIL) - { - m_auiEncounter[0] = NOT_STARTED; - } - break; + case TYPE_BEASTS: m_auiEncounter[0] = uiData; break; + case TYPE_JARAXXUS: m_auiEncounter[1] = uiData; break; + case TYPE_CRUSADERS: m_auiEncounter[2] = uiData; break; + case TYPE_FROJA: m_auiEncounter[3] = uiData; break; + case TYPE_ANUBARAK: m_auiEncounter[4] = uiData; break; } if (uiData == DONE) @@ -112,7 +123,15 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance { switch(uiData) { - case DATA_crusader_1: return m_uicrusader1; + case NPC_BARRENT: return m_uiBarrentGUID; + case NPC_GORMOK: return m_uiGormokGUID; + case NPC_ACIDMAW: return m_uiAcidmawGUID; + case NPC_DREADSCALE: return m_uiDreascaleGUID; + case NPC_ICEHOWL: return m_uiIcehowlGUID; + case NPC_JARAXXUS: return m_uiJaraxxusGUID; + case NPC_DARKBANE: return m_uiDarkbaneGUID; + case NPC_LIGHTBANE: return m_uiLightbaneGUID; + case NPC_ANUBARAK: return m_uiBarrentGUID; } return 0; } @@ -121,10 +140,11 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance { switch(uiType) { - case DATA_crusaderID_1: return m_uicrusaderId1; - case TYPE_GRAND_crusaderS: return m_auiEncounter[0]; - case TYPE_ARGENT_CHALLENGE: return m_auiEncounter[1]; - case TYPE_BLACK_KNIGHT: return m_auiEncounter[2]; + case TYPE_BEASTS: return m_auiEncounter[0]; + case TYPE_JARAXXUS: return m_auiEncounter[1]; + case TYPE_CRUSADERS: return m_auiEncounter[2]; + case TYPE_FROJA: return m_auiEncounter[3]; + case TYPE_ANUBARAK: return m_auiEncounter[4]; } return 0; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index 684794f6f..9bbfd238d 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Trial Of the crusader SD%Complete: 10% -SDComment: event script +SDComment: event script by /dev/rsa SDCategory: trial_of_the_crusader EndScriptData */ @@ -102,124 +102,19 @@ pPlayer->CLOSE_GOSSIP_MENU(); switch(uiAction) { case GOSSIP_ACTION_INFO_DEF+1: { - if (m_pInstance->GetData(DATA_TOC5_ANNOUNCER) == 0) { - m_pInstance->SetData(DATA_TOC5_ANNOUNCER, pCreature->GetGUID()); - - if (m_pInstance->GetData(DATA_TOC5_ANNOUNCER) == m_pInstance->GetData(DATA_ARELAS)) - { - m_pInstance->SetData(DATA_BLACK_KNIGHT_MINION, 35564); - switch(urand(0, 4)) - { - case 0: m_pInstance->SetData(DATA_CHAMPIONID_1, 35572); break; - case 1: m_pInstance->SetData(DATA_CHAMPIONID_1, 35569); break; - case 2: m_pInstance->SetData(DATA_CHAMPIONID_1, 35571); break; - case 3: m_pInstance->SetData(DATA_CHAMPIONID_1, 35570); break; - case 4: m_pInstance->SetData(DATA_CHAMPIONID_1, 35617); break; - }; - do{ - switch(urand(0, 4)) - { - case 0: m_pInstance->SetData(DATA_CHAMPIONID_2, 35572); break; - case 1: m_pInstance->SetData(DATA_CHAMPIONID_2, 35569); break; - case 2: m_pInstance->SetData(DATA_CHAMPIONID_2, 35571); break; - case 3: m_pInstance->SetData(DATA_CHAMPIONID_2, 35570); break; - case 4: m_pInstance->SetData(DATA_CHAMPIONID_2, 35617); break; - } - } while(m_pInstance->GetData(DATA_CHAMPIONID_1) == m_pInstance->GetData(DATA_CHAMPIONID_2)); - do{ - switch(urand(0, 4)) - { - case 0: m_pInstance->SetData(DATA_CHAMPIONID_3, 35572); break; - case 1: m_pInstance->SetData(DATA_CHAMPIONID_3, 35569); break; - case 2: m_pInstance->SetData(DATA_CHAMPIONID_3, 35571); break; - case 3: m_pInstance->SetData(DATA_CHAMPIONID_3, 35570); break; - case 4: m_pInstance->SetData(DATA_CHAMPIONID_3, 35617); break; - } - } while(m_pInstance->GetData(DATA_CHAMPIONID_1) == m_pInstance->GetData(DATA_CHAMPIONID_3) || m_pInstance->GetData(DATA_CHAMPIONID_2) == m_pInstance->GetData(DATA_CHAMPIONID_3)); - }; - - if (m_pInstance->GetData(DATA_TOC5_ANNOUNCER) == m_pInstance->GetData(DATA_JAEREN)) - { - m_pInstance->SetData(DATA_BLACK_KNIGHT_MINION, 123); - - switch(urand(0, 4)) - { - case 0: m_pInstance->SetData(DATA_CHAMPIONID_1, 34705); break; - case 1: m_pInstance->SetData(DATA_CHAMPIONID_1, 34702); break; - case 2: m_pInstance->SetData(DATA_CHAMPIONID_1, 34701); break; - case 3: m_pInstance->SetData(DATA_CHAMPIONID_1, 34657); break; - case 4: m_pInstance->SetData(DATA_CHAMPIONID_1, 34703); break; - } - do{ - switch(urand(0, 4)) - { - case 0: m_pInstance->SetData(DATA_CHAMPIONID_2, 34705); break; - case 1: m_pInstance->SetData(DATA_CHAMPIONID_2, 34702); break; - case 2: m_pInstance->SetData(DATA_CHAMPIONID_2, 34701); break; - case 3: m_pInstance->SetData(DATA_CHAMPIONID_2, 34657); break; - case 4: m_pInstance->SetData(DATA_CHAMPIONID_2, 34703); break; - } - } while(m_pInstance->GetData(DATA_CHAMPIONID_1) == m_pInstance->GetData(DATA_CHAMPIONID_2)); - do{ - switch(urand(0, 4)) - { - case 0: m_pInstance->SetData(DATA_CHAMPIONID_3, 34705); break; - case 1: m_pInstance->SetData(DATA_CHAMPIONID_3, 34702); break; - case 2: m_pInstance->SetData(DATA_CHAMPIONID_3, 34701); break; - case 3: m_pInstance->SetData(DATA_CHAMPIONID_3, 34657); break; - case 4: m_pInstance->SetData(DATA_CHAMPIONID_3, 34703); break; - } - } while(m_pInstance->GetData(DATA_CHAMPIONID_1) == m_pInstance->GetData(DATA_CHAMPIONID_3) || m_pInstance->GetData(DATA_CHAMPIONID_2) == m_pInstance->GetData(DATA_CHAMPIONID_3)); - - }; - - switch(urand(0, 1)) - { - case 0: m_pInstance->SetData(DATA_ARGENT_CHALLENGER, 35119); break; - case 1: m_pInstance->SetData(DATA_ARGENT_CHALLENGER, 34928); break; - }; - }; - - if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == NOT_STARTED || m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == IN_PROGRESS) - { - pCreature->SummonCreature(m_pInstance->GetData(DATA_CHAMPIONID_1), 738.665771, 661.031433, 412.394623, 4.698702, TEMPSUMMON_MANUAL_DESPAWN, 0); - pCreature->SummonCreature(m_pInstance->GetData(DATA_CHAMPIONID_2), 746.864441, 660.918762, 411.695465, 4.698700, TEMPSUMMON_MANUAL_DESPAWN, 0); - pCreature->SummonCreature(m_pInstance->GetData(DATA_CHAMPIONID_3), 754.360779, 660.816162, 412.395996, 4.698700, TEMPSUMMON_MANUAL_DESPAWN, 0); - m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, IN_PROGRESS); - }; }; case GOSSIP_ACTION_INFO_DEF+2: { - if ((m_pInstance->GetData(TYPE_ARGENT_CHALLENGE) == NOT_STARTED || m_pInstance->GetData(TYPE_ARGENT_CHALLENGE) == IN_PROGRESS) && m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == DONE) - { - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*pCreature), m_pInstance->GetData64(DATA_CHAMPION_1)))) - pTemp->ForcedDespawn(); - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*pCreature), m_pInstance->GetData64(DATA_CHAMPION_2)))) - pTemp->ForcedDespawn(); - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*pCreature), m_pInstance->GetData64(DATA_CHAMPION_3)))) - pTemp->ForcedDespawn(); - - pCreature->SummonCreature(m_pInstance->GetData(DATA_ARGENT_CHALLENGER), 746.864441, 660.918762, 411.695465, 4.698700, TEMPSUMMON_MANUAL_DESPAWN, 0); - m_pInstance->SetData(TYPE_ARGENT_CHALLENGE, IN_PROGRESS); - }; }; case GOSSIP_ACTION_INFO_DEF+3: { - if ((m_pInstance->GetData(TYPE_BLACK_KNIGHT) == NOT_STARTED || m_pInstance->GetData(TYPE_BLACK_KNIGHT) == IN_PROGRESS) && m_pInstance->GetData(TYPE_ARGENT_CHALLENGE) == DONE) - { - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*pCreature), m_pInstance->GetData64(DATA_ARGENT_CHALLENGER)))) - pTemp->ForcedDespawn(); - pCreature->SummonCreature(35451, 746.864441, 660.918762, 411.695465, 4.698700, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000); - pCreature->DealDamage(pCreature, pCreature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - m_pInstance->SetData(TYPE_BLACK_KNIGHT, IN_PROGRESS); - }; }; case GOSSIP_ACTION_INFO_DEF+4: { - if (m_pInstance->GetData(TYPE_BLACK_KNIGHT) == DONE) { - pCreature->DealDamage(pCreature, pCreature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - }; + }; + + case GOSSIP_ACTION_INFO_DEF+5: { }; }; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index f73e27ce4..f2855f08c 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -4,13 +4,13 @@ enum { - MAX_ENCOUNTERS = 15, + MAX_ENCOUNTERS = 5, NPC_BARRENT = 34816, NPC_ICEHOWL = 34797, NPC_GORMOK = 35469, - NPC_L1 = 34797, - NPC_L2 = 34797, + NPC_DREADSCALE = 34799, + NPC_ACIDMAW = 35144, NPC_JARAXXUS = 34780, @@ -34,11 +34,16 @@ enum NPC_ANUBARAK = 34564, - TYPE_BEASTS = 1, - TYPE_JARAXXUS = 2, - TYPE_CRUSADERS = 3, - TYPE_FROJA = 4, - TYPE_ANUBARAK = 5 + GO_CHAMPIONS_CACHE_10 = 73111, + GO_CHAMPIONS_CACHE_25 = 73112, + GO_CHAMPIONS_CACHE_10_H = 73113, + GO_CHAMPIONS_CACHE_25_H = 73114, + + TYPE_BEASTS = 0, + TYPE_JARAXXUS = 1, + TYPE_CRUSADERS = 2, + TYPE_FROJA = 3, + TYPE_ANUBARAK = 4 }; #endif diff --git a/scripts/northrend/icecrown_citadel/forge_of_souls/boss_bronjahm.cpp b/scripts/northrend/icecrown_citadel/forge_of_souls/boss_bronjahm.cpp new file mode 100644 index 000000000..427e383b1 --- /dev/null +++ b/scripts/northrend/icecrown_citadel/forge_of_souls/boss_bronjahm.cpp @@ -0,0 +1,128 @@ +#include "precompiled.h" +#include "def_forge.h" +enum +{ + //common + SPELL_BERSERK = 47008, + //yells + //summons + NPC_SOUL_FRAGMENT = 36535, + //Abilities + SPELL_MAGIC_BLANE_N = 68793, + SPELL_CORRUPT_SOUL_N = 68839, + SPELL_CONSUME_SOUL_N = 68858, + SPELL_TELEPORT_N = 68988, + SPELL_SOULSTORM_N = 68872, + SPELL_SOULSTORM2_N = 68921, + SPELL_FEAR = 68950 +}; + +struct MANGOS_DLL_DECL boss_bronjahmAI : public ScriptedAI +{ + boss_bronjahmAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Regular = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + bool Regular; + ScriptedInstance *pInstance; + + void Reset() + { + if(pInstance) pInstance->SetData(TYPE_BRONJAHM, NOT_STARTED); + } + + void Aggro(Unit *who) + { + if(pInstance) pInstance->SetData(TYPE_BRONJAHM, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_BRONJAHM, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +struct MANGOS_DLL_DECL mob_soul_fragmentAI : public ScriptedAI +{ + mob_soul_fragmentAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + Reset(); + } + + ScriptedInstance *m_pInstance; + uint32 m_uiRangeCheck_Timer; + + void Reset() + { + m_uiRangeCheck_Timer = 1000; + } + + void AttackStart(Unit* pWho) + { + return; + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_uiRangeCheck_Timer < uiDiff) + { + if (m_pInstance) + { + if (Creature* pBronjahm = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(NPC_BRONJAHM)))) + { + float fDistance = m_creature->GetDistance2d(pBronjahm); + if (fDistance <= 2) + { +// ((boss_bronjahmAI*)pBronjahm->AI())->SoulFragmentHit(); + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + } + } + m_uiRangeCheck_Timer = 1000; + } + else m_uiRangeCheck_Timer -= uiDiff; + } + + void JustDied(Unit* pKiller) + { +// DoCast(m_creature, SPELL_SPLASH); + } +}; + +CreatureAI* GetAI_boss_bronjahm(Creature* pCreature) +{ + return new boss_bronjahmAI(pCreature); +} + +CreatureAI* GetAI_mob_soul_fragment(Creature* pCreature) +{ + return new mob_soul_fragmentAI (pCreature); +} + + +void AddSC_boss_bronjahm() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_bronjahm"; + newscript->GetAI = &GetAI_boss_bronjahm; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_soul_fragment"; + newscript->GetAI = &GetAI_mob_soul_fragment; + newscript->RegisterSelf(); + +} diff --git a/scripts/northrend/icecrown_citadel/forge_of_souls/boss_devourer_of_souls.cpp b/scripts/northrend/icecrown_citadel/forge_of_souls/boss_devourer_of_souls.cpp new file mode 100644 index 000000000..ab0936d70 --- /dev/null +++ b/scripts/northrend/icecrown_citadel/forge_of_souls/boss_devourer_of_souls.cpp @@ -0,0 +1,64 @@ +#include "precompiled.h" +#include "def_forge.h" +enum +{ + //common + SPELL_BERSERK = 47008, + //yells + //Abilities + SPELL_PHANTOM_BLAST_N = 68982, + SPELL_MIRRORED_SOUL_N = 69051, + SPELL_WELL_OF_SOULS_N = 68820, + SPELL_UNLEASHED_SOULS_N = 68939, + SPELL_WAILING_SOULS_N = 68873 +}; + +struct MANGOS_DLL_DECL boss_devourer_of_soulsAI : public ScriptedAI +{ + boss_devourer_of_soulsAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Regular = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + bool Regular; + ScriptedInstance *pInstance; + + void Reset() + { + if(pInstance) pInstance->SetData(TYPE_DEVOURER, NOT_STARTED); + } + + void Aggro(Unit *who) + { + if(pInstance) pInstance->SetData(TYPE_DEVOURER, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_DEVOURER, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_devourer_of_souls(Creature* pCreature) +{ + return new boss_devourer_of_soulsAI(pCreature); +} + +void AddSC_boss_devourer_of_souls() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_devourer_of_souls"; + newscript->GetAI = &GetAI_boss_devourer_of_souls; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/icecrown_citadel/forge_of_souls/def_forge.h b/scripts/northrend/icecrown_citadel/forge_of_souls/def_forge.h index c3c39feaa..906c66512 100644 --- a/scripts/northrend/icecrown_citadel/forge_of_souls/def_forge.h +++ b/scripts/northrend/icecrown_citadel/forge_of_souls/def_forge.h @@ -4,13 +4,13 @@ enum { - MAX_ENCOUNTERS = 15; + MAX_ENCOUNTERS = 2, - TYPE_BOSS_1 = 1, + TYPE_BRONJAHM = 0, + TYPE_DEVOURER = 1, - NPC_BOSS1 = 33113, - - GO_1 = 194232 + NPC_BRONJAHM = 36497, + NPC_DEVOURER = 33113 }; diff --git a/scripts/northrend/icecrown_citadel/forge_of_souls/instance_forge_of_souls.cpp b/scripts/northrend/icecrown_citadel/forge_of_souls/instance_forge_of_souls.cpp new file mode 100644 index 000000000..f287a8ddb --- /dev/null +++ b/scripts/northrend/icecrown_citadel/forge_of_souls/instance_forge_of_souls.cpp @@ -0,0 +1,164 @@ +/* Copyright (C) 2006 - 2010 ScriptDev2 +* 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, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "precompiled.h" +#include "def_forge.h" + +struct MANGOS_DLL_DECL instance_forge_of_souls : public ScriptedInstance +{ + instance_forge_of_souls(Map* pMap) : ScriptedInstance(pMap) + { + Regular = pMap->IsRegularDifficulty(); + Initialize(); + } + + bool Regular; + bool needSave; + std::string strSaveData; + + //Creatures GUID + uint32 m_auiEncounter[MAX_ENCOUNTERS+1]; + uint64 m_uiBronjahmGUID; + uint64 m_uiDevourerGUID; + + void OpenDoor(uint64 guid) + { + if(!guid) return; + GameObject* pGo = instance->GetGameObject(guid); + if(pGo) pGo->SetGoState(GO_STATE_ACTIVE); + } + + void CloseDoor(uint64 guid) + { + if(!guid) return; + GameObject* pGo = instance->GetGameObject(guid); + if(pGo) pGo->SetGoState(GO_STATE_READY); + } + + void Initialize() + { + for (uint8 i = 0; i < MAX_ENCOUNTERS; ++i) + m_auiEncounter[i] = NOT_STARTED; + m_uiBronjahmGUID =0; + m_uiDevourerGUID =0; + } + + void OnCreatureCreate(Creature* pCreature) + { + switch(pCreature->GetEntry()) + { + case NPC_DEVOURER: + m_uiDevourerGUID = pCreature->GetGUID(); + break; + case NPC_BRONJAHM: + m_uiBronjahmGUID = pCreature->GetGUID(); + break; + } + } + + void OnObjectCreate(GameObject* pGo) + { + switch(pGo->GetEntry()) + { + } + } + void SetData(uint32 uiType, uint32 uiData) + { + switch(uiType) + { + case TYPE_BRONJAHM: m_auiEncounter[0] = uiData; break; + case TYPE_DEVOURER: m_auiEncounter[1] = uiData; break; + } + + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + + for(uint8 i = 0; i < MAX_ENCOUNTERS; ++i) + saveStream << m_auiEncounter[i] << " "; + + strSaveData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } + } + + const char* Save() + { + return strSaveData.c_str(); + } + + uint32 GetData(uint32 uiType) + { + switch(uiType) + { + case TYPE_BRONJAHM: return m_auiEncounter[0]; + case TYPE_DEVOURER: return m_auiEncounter[1]; + } + return 0; + } + + uint64 GetData64(uint32 uiData) + { + switch(uiData) + { + case NPC_BRONJAHM: return m_uiBronjahmGUID; + case NPC_DEVOURER: return m_uiDevourerGUID; + } + return 0; + } + + void Load(const char* chrIn) + { + if (!chrIn) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(chrIn); + + std::istringstream loadStream(chrIn); + + for(uint8 i = 0; i < MAX_ENCOUNTERS; ++i) + { + loadStream >> m_auiEncounter[i]; + + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; + } + + OUT_LOAD_INST_DATA_COMPLETE; + } +}; + +InstanceData* GetInstanceData_instance_forge_of_souls(Map* pMap) +{ + return new instance_forge_of_souls(pMap); +} + + +void AddSC_instance_forge_of_souls() +{ + Script* pNewScript; + pNewScript = new Script; + pNewScript->Name = "instance_forge_of_souls"; + pNewScript->GetInstanceData = &GetInstanceData_instance_forge_of_souls; + pNewScript->RegisterSelf(); +} diff --git a/scripts/northrend/icecrown_citadel/halls_of_reflection/def_halls.h b/scripts/northrend/icecrown_citadel/halls_of_reflection/def_halls.h index 114da206c..2c85f3c30 100644 --- a/scripts/northrend/icecrown_citadel/halls_of_reflection/def_halls.h +++ b/scripts/northrend/icecrown_citadel/halls_of_reflection/def_halls.h @@ -1,10 +1,10 @@ -#ifndef DEF_ICECROWN_SPIRE_H -#define DEF_ICECROWN_SPIRE_H +#ifndef DEF_ICECROWN_HALLS_H +#define DEF_ICECROWN_HALLS_H enum { - MAX_ENCOUNTERS = 15; + MAX_ENCOUNTERS = 2; TYPE_BOSS_1 = 1, diff --git a/scripts/northrend/icecrown_citadel/halls_of_reflection/instance_halls_of_reflection.cpp b/scripts/northrend/icecrown_citadel/halls_of_reflection/instance_halls_of_reflection.cpp new file mode 100644 index 000000000..a8444ddc7 --- /dev/null +++ b/scripts/northrend/icecrown_citadel/halls_of_reflection/instance_halls_of_reflection.cpp @@ -0,0 +1,164 @@ +/* Copyright (C) 2006 - 2010 ScriptDev2 +* 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, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "precompiled.h" +#include "def_halls.h" + +struct MANGOS_DLL_DECL instance_halls_of_reflection : public ScriptedInstance +{ + instance_halls_of_reflection(Map* pMap) : ScriptedInstance(pMap) + { + Regular = pMap->IsRegularDifficulty(); + Initialize(); + } + + bool Regular; + bool needSave; + std::string strSaveData; + + //Creatures GUID + uint32 m_auiEncounter[MAX_ENCOUNTERS+1]; + uint64 m_uiBronjahmGUID; + uint64 m_uiDevourerGUID; + + void OpenDoor(uint64 guid) + { + if(!guid) return; + GameObject* pGo = instance->GetGameObject(guid); + if(pGo) pGo->SetGoState(GO_STATE_ACTIVE); + } + + void CloseDoor(uint64 guid) + { + if(!guid) return; + GameObject* pGo = instance->GetGameObject(guid); + if(pGo) pGo->SetGoState(GO_STATE_READY); + } + + void Initialize() + { + for (uint8 i = 0; i < MAX_ENCOUNTERS; ++i) + m_auiEncounter[i] = NOT_STARTED; + m_uiBronjahmGUID =0; + m_uiDevourerGUID =0; + } + + void OnCreatureCreate(Creature* pCreature) + { + switch(pCreature->GetEntry()) + { + case NPC_DEVOURER: + m_uiDevourerGUID = pCreature->GetGUID(); + break; + case NPC_BRONJAHM: + m_uiBronjahmGUID = pCreature->GetGUID(); + break; + } + } + + void OnObjectCreate(GameObject* pGo) + { + switch(pGo->GetEntry()) + { + } + } + void SetData(uint32 uiType, uint32 uiData) + { + switch(uiType) + { + case TYPE_BRONJAHM: m_auiEncounter[0] = uiData; break; + case TYPE_DEVOURER: m_auiEncounter[1] = uiData; break; + } + + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + + for(uint8 i = 0; i < MAX_ENCOUNTERS; ++i) + saveStream << m_auiEncounter[i] << " "; + + strSaveData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } + } + + const char* Save() + { + return strSaveData.c_str(); + } + + uint32 GetData(uint32 uiType) + { + switch(uiType) + { + case TYPE_BRONJAHM: return m_auiEncounter[0]; + case TYPE_DEVOURER: return m_auiEncounter[1]; + } + return 0; + } + + uint64 GetData64(uint32 uiData) + { + switch(uiData) + { + case NPC_BRONJAHM: return m_uiBronjahmGUID; + case NPC_DEVOURER: return m_uiDevourerGUID; + } + return 0; + } + + void Load(const char* chrIn) + { + if (!chrIn) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(chrIn); + + std::istringstream loadStream(chrIn); + + for(uint8 i = 0; i < MAX_ENCOUNTERS; ++i) + { + loadStream >> m_auiEncounter[i]; + + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; + } + + OUT_LOAD_INST_DATA_COMPLETE; + } +}; + +InstanceData* GetInstanceData_instance_halls_of_reflection(Map* pMap) +{ + return new instance_halls_of_reflection(pMap); +} + + +void AddSC_instance_halls_of_reflection() +{ + Script* pNewScript; + pNewScript = new Script; + pNewScript->Name = "instance_halls_of_reflection"; + pNewScript->GetInstanceData = &GetInstanceData_instance_halls_of_reflection; + pNewScript->RegisterSelf(); +} diff --git a/scripts/northrend/icecrown_citadel/pit_of_saron/boss_forgemaster_garfrost.cpp b/scripts/northrend/icecrown_citadel/pit_of_saron/boss_forgemaster_garfrost.cpp new file mode 100644 index 000000000..4ded260cb --- /dev/null +++ b/scripts/northrend/icecrown_citadel/pit_of_saron/boss_forgemaster_garfrost.cpp @@ -0,0 +1,64 @@ +#include "precompiled.h" +#include "def_pit.h" +enum +{ + //common + SPELL_BERSERK = 47008, + //yells + //summons + //Abilities + SPELL_FEAR = 68950 +}; + +struct MANGOS_DLL_DECL boss_forgemaster_garfrostAI : public ScriptedAI +{ + boss_forgemaster_garfrostAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Regular = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + bool Regular; + ScriptedInstance *pInstance; + + void Reset() + { + if(pInstance) pInstance->SetData(TYPE_GARFROST, NOT_STARTED); + } + + void Aggro(Unit *who) + { + if(pInstance) pInstance->SetData(TYPE_GARFROST, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_GARFROST, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + + +CreatureAI* GetAI_boss_forgemaster_garfrost(Creature* pCreature) +{ + return new boss_forgemaster_garfrostAI(pCreature); +} + + +void AddSC_boss_forgemaster_garfrost() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_forgemaster_garfrost"; + newscript->GetAI = &GetAI_boss_forgemaster_garfrost; + newscript->RegisterSelf(); + +} diff --git a/scripts/northrend/icecrown_citadel/pit_of_saron/boss_ick_and_krick.cpp b/scripts/northrend/icecrown_citadel/pit_of_saron/boss_ick_and_krick.cpp new file mode 100644 index 000000000..c4dfc79aa --- /dev/null +++ b/scripts/northrend/icecrown_citadel/pit_of_saron/boss_ick_and_krick.cpp @@ -0,0 +1,108 @@ +#include "precompiled.h" +#include "def_pit.h" +enum +{ + //common + SPELL_BERSERK = 47008, + //yells + //summons + //Abilities + SPELL_FEAR = 68950 +}; + +struct MANGOS_DLL_DECL boss_krickAI : public ScriptedAI +{ + boss_krickAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Regular = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + bool Regular; + ScriptedInstance *pInstance; + + void Reset() + { + if(pInstance) pInstance->SetData(TYPE_KRICK, NOT_STARTED); + } + + void Aggro(Unit *who) + { + if(pInstance) pInstance->SetData(TYPE_KRICK, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_KRICK, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +struct MANGOS_DLL_DECL boss_ickAI : public ScriptedAI +{ + boss_ickAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Regular = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + bool Regular; + ScriptedInstance *pInstance; + + void Reset() + { + if(pInstance) pInstance->SetData(TYPE_ICK, NOT_STARTED); + } + + void Aggro(Unit *who) + { + if(pInstance) pInstance->SetData(TYPE_ICK, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_ICK, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_krick(Creature* pCreature) +{ + return new boss_krickAI(pCreature); +} + +CreatureAI* GetAI_boss_ick(Creature* pCreature) +{ + return new boss_ickAI(pCreature); +} + + +void AddSC_boss_krick() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_krick"; + newscript->GetAI = &GetAI_boss_krick; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_ick"; + newscript->GetAI = &GetAI_boss_ick; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/icecrown_citadel/pit_of_saron/boss_scourgelord_tirannus.cpp b/scripts/northrend/icecrown_citadel/pit_of_saron/boss_scourgelord_tirannus.cpp new file mode 100644 index 000000000..f921c2177 --- /dev/null +++ b/scripts/northrend/icecrown_citadel/pit_of_saron/boss_scourgelord_tirannus.cpp @@ -0,0 +1,64 @@ +#include "precompiled.h" +#include "def_pit.h" +enum +{ + //common + SPELL_BERSERK = 47008, + //yells + //summons + //Abilities + SPELL_FEAR = 68950 +}; + +struct MANGOS_DLL_DECL boss_scourgelord_tirannusAI : public ScriptedAI +{ + boss_scourgelord_tirannusAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Regular = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + bool Regular; + ScriptedInstance *pInstance; + + void Reset() + { + if(pInstance) pInstance->SetData(TYPE_TIRANNUS, NOT_STARTED); + } + + void Aggro(Unit *who) + { + if(pInstance) pInstance->SetData(TYPE_TIRANNUS, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_TIRANNUS, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + + +CreatureAI* GetAI_boss_scourgelord_tirannus(Creature* pCreature) +{ + return new boss_scourgelord_tirannusAI(pCreature); +} + + +void AddSC_boss_scourgelord_tirannus() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_scourgelord_tirannus"; + newscript->GetAI = &GetAI_boss_scourgelord_tirannus; + newscript->RegisterSelf(); + +} diff --git a/scripts/northrend/icecrown_citadel/pit_of_saron/def_pit.h b/scripts/northrend/icecrown_citadel/pit_of_saron/def_pit.h index 114da206c..a882b9a60 100644 --- a/scripts/northrend/icecrown_citadel/pit_of_saron/def_pit.h +++ b/scripts/northrend/icecrown_citadel/pit_of_saron/def_pit.h @@ -1,16 +1,22 @@ -#ifndef DEF_ICECROWN_SPIRE_H -#define DEF_ICECROWN_SPIRE_H +#ifndef DEF_ICECROWN_PIT_H +#define DEF_ICECROWN_PIT_H enum { - MAX_ENCOUNTERS = 15; + MAX_ENCOUNTERS = 4, - TYPE_BOSS_1 = 1, + TYPE_GARFROST = 0, + TYPE_KRICK = 1, + TYPE_ICK = 2, + TYPE_TIRANNUS = 3, - NPC_BOSS1 = 33113, + NPC_GARFROST = 36494, + NPC_KRICK = 36477, + NPC_ICK = 36476, + NPC_TIRANNUS = 36658 - GO_1 = 194232 +// GO_1 = 194232 }; diff --git a/scripts/northrend/icecrown_citadel/pit_of_saron/instance_pit_of_saron.cpp b/scripts/northrend/icecrown_citadel/pit_of_saron/instance_pit_of_saron.cpp new file mode 100644 index 000000000..67313012e --- /dev/null +++ b/scripts/northrend/icecrown_citadel/pit_of_saron/instance_pit_of_saron.cpp @@ -0,0 +1,172 @@ +/* Copyright (C) 2006 - 2010 ScriptDev2 +* 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, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "precompiled.h" +#include "def_pit.h" + +struct MANGOS_DLL_DECL instance_pit_of_saron : public ScriptedInstance +{ + instance_pit_of_saron(Map* pMap) : ScriptedInstance(pMap) + { + Regular = pMap->IsRegularDifficulty(); + Initialize(); + } + + bool Regular; + bool needSave; + std::string strSaveData; + + //Creatures GUID + uint32 m_auiEncounter[MAX_ENCOUNTERS+1]; + uint64 m_uiGarfrostGUID; + uint64 m_uiKrickGUID; + uint64 m_uiIckGUID; + uint64 m_uiTirannusGUID; + + void OpenDoor(uint64 guid) + { + if(!guid) return; + GameObject* pGo = instance->GetGameObject(guid); + if(pGo) pGo->SetGoState(GO_STATE_ACTIVE); + } + + void CloseDoor(uint64 guid) + { + if(!guid) return; + GameObject* pGo = instance->GetGameObject(guid); + if(pGo) pGo->SetGoState(GO_STATE_READY); + } + + void Initialize() + { + for (uint8 i = 0; i < MAX_ENCOUNTERS; ++i) + m_auiEncounter[i] = NOT_STARTED; + m_uiGarfrostGUID =0; + m_uiKrickGUID =0; + m_uiIckGUID =0; + m_uiTirannusGUID =0; + } + + void OnCreatureCreate(Creature* pCreature) + { + switch(pCreature->GetEntry()) + { + case NPC_GARFROST: m_uiGarfrostGUID = pCreature->GetGUID(); break; + case NPC_KRICK: m_uiKrickGUID = pCreature->GetGUID(); break; + case NPC_ICK: m_uiIckGUID = pCreature->GetGUID(); break; + case NPC_TIRANNUS: m_uiTirannusGUID = pCreature->GetGUID(); break; + } + } + + void OnObjectCreate(GameObject* pGo) + { + switch(pGo->GetEntry()) + { + } + } + void SetData(uint32 uiType, uint32 uiData) + { + switch(uiType) + { + case TYPE_GARFROST: m_auiEncounter[0] = uiData; break; + case TYPE_KRICK: m_auiEncounter[1] = uiData; break; + case TYPE_ICK: m_auiEncounter[2] = uiData; break; + case TYPE_TIRANNUS: m_auiEncounter[3] = uiData; break; + } + + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + + for(uint8 i = 0; i < MAX_ENCOUNTERS; ++i) + saveStream << m_auiEncounter[i] << " "; + + strSaveData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } + } + + const char* Save() + { + return strSaveData.c_str(); + } + + uint32 GetData(uint32 uiType) + { + switch(uiType) + { + case TYPE_GARFROST: return m_auiEncounter[0]; + case TYPE_KRICK: return m_auiEncounter[1]; + case TYPE_ICK: return m_auiEncounter[2]; + case TYPE_TIRANNUS: return m_auiEncounter[3]; + } + return 0; + } + + uint64 GetData64(uint32 uiData) + { + switch(uiData) + { + case NPC_GARFROST: return m_uiGarfrostGUID; + case NPC_KRICK: return m_uiKrickGUID; + case NPC_ICK: return m_uiIckGUID; + case NPC_TIRANNUS: return m_uiTirannusGUID; + } + return 0; + } + + void Load(const char* chrIn) + { + if (!chrIn) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(chrIn); + + std::istringstream loadStream(chrIn); + + for(uint8 i = 0; i < MAX_ENCOUNTERS; ++i) + { + loadStream >> m_auiEncounter[i]; + + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; + } + + OUT_LOAD_INST_DATA_COMPLETE; + } +}; + +InstanceData* GetInstanceData_instance_pit_of_saron(Map* pMap) +{ + return new instance_pit_of_saron(pMap); +} + + +void AddSC_instance_pit_of_saron() +{ + Script* pNewScript; + pNewScript = new Script; + pNewScript->Name = "instance_pit_of_saron"; + pNewScript->GetInstanceData = &GetInstanceData_instance_pit_of_saron; + pNewScript->RegisterSelf(); +} diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index e8c12341c..d70302cfc 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -372,6 +372,15 @@ extern void AddSC_boss_lord_marrogwar(); extern void AddSC_boss_lady_deathwhisper(); extern void AddSC_boss_deathbringer_saurfang(); +extern void AddSC_instance_forge_of_souls(); +extern void AddSC_boss_devourer_of_souls(); +extern void AddSC_boss_bronjahm(); + +extern void AddSC_instance_pit_of_saron(); +extern void AddSC_boss_forgemaster_garfrost(); +extern void AddSC_boss_krick(); +extern void AddSC_boss_scourgelord_tirannus(); + //outland extern void AddSC_boss_exarch_maladaar(); //auchindoun, auchenai_crypts extern void AddSC_boss_nexusprince_shaffar(); //auchindoun, mana_tombs @@ -813,6 +822,15 @@ void AddScripts() AddSC_boss_lady_deathwhisper(); AddSC_boss_deathbringer_saurfang(); + AddSC_instance_forge_of_souls(); + AddSC_boss_devourer_of_souls(); + AddSC_boss_bronjahm(); + + AddSC_instance_pit_of_saron(); + AddSC_boss_forgemaster_garfrost(); + AddSC_boss_krick(); + AddSC_boss_scourgelord_tirannus(); + //outland AddSC_boss_exarch_maladaar(); //auchindoun, auchenai_crypts AddSC_boss_nexusprince_shaffar(); //auchindoun, mana_tombs From 33ce7a81247006a959281598c80c67e6727b59eb Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 4 Feb 2010 13:25:07 +0300 Subject: [PATCH 127/405] Trial of champions rewrite :( --- .../boss_argent_challenge.cpp | 12 -- .../boss_black_knight.cpp | 19 -- .../boss_grand_champions.cpp | 204 ++++++++---------- .../trial_of_the_champion.cpp | 34 +-- .../trial_of_the_champion.h | 4 +- 5 files changed, 112 insertions(+), 161 deletions(-) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp index 00062b36c..7e0ff86bc 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp @@ -87,12 +87,6 @@ struct MANGOS_DLL_DECL boss_eadricAI : public ScriptedAI m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); } - void EnterEvadeMode() - { - m_pInstance->SetData(TYPE_ARGENT_CHALLENGE, FAIL); - m_creature->ForcedDespawn(); - } - void Aggro(Unit* pWho) { if (!m_pInstance) @@ -204,12 +198,6 @@ struct MANGOS_DLL_DECL boss_paletressAI : public ScriptedAI summoned = true; } - void EnterEvadeMode() - { - m_pInstance->SetData(TYPE_ARGENT_CHALLENGE, FAIL); - m_creature->ForcedDespawn(); - } - void Aggro(Unit* pWho) { if (!m_pInstance) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp index ccd4dd7c2..c3a1e9d46 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp @@ -158,25 +158,6 @@ struct MANGOS_DLL_DECL boss_black_knightAI : public ScriptedAI m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); } - void EnterEvadeMode() - { - if (m_pInstance->GetData(TYPE_BLACK_KNIGHT) == IN_PROGRESS) { - m_creature->SetDisplayId(29837); - Plague_Strike_Timer = 5000; - Icy_Touch_Timer = 10000; - Obliterate_Timer = 16000; - Choke_Timer = 15000; - Summon_Ghoul = 4000; - phase1 = true; - phase2 = false; - phase3 = false; - ghoul = false; - m_creature->RemoveArenaAuras(true); - m_creature->SendMonsterMove(746.864441, 660.918762, 411.695465, 4.698700, m_creature->GetMonsterMoveFlags(), 1); - m_creature->GetMap()->CreatureRelocation(m_creature, 754.360779, 660.816162, 412.395996, 4.698700); - m_creature->SetHealth(m_creature->GetMaxHealth()); - } - } void Aggro(Unit* pWho) { diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp index a8d82e519..72271f343 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp @@ -96,23 +96,11 @@ struct MANGOS_DLL_DECL mob_toc5_warriorAI : public ScriptedAI } - void EnterEvadeMode() - { - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) - pTemp->ForcedDespawn(); - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) - pTemp->ForcedDespawn(); - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) - pTemp->ForcedDespawn(); - m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, FAIL); - } void Aggro(Unit* pWho) { if (!m_pInstance) return; - if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == DONE) - m_creature->ForcedDespawn(); else { if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) @@ -128,16 +116,24 @@ struct MANGOS_DLL_DECL mob_toc5_warriorAI : public ScriptedAI } } - void JustDied(Unit* pKiller) - { - if (!m_pInstance) - return; - - m_pInstance->SetData(DATA_CHAMPIONS_COUNT, m_pInstance->GetData(DATA_CHAMPIONS_COUNT) - 1); - - if (m_pInstance->GetData(DATA_CHAMPIONS_COUNT) < 1) - m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, DONE); - } + void JustDied(Unit* pKiller) + { + if (!m_pInstance) + return; + + m_pInstance->SetData(DATA_CHAMPIONS_COUNT, m_pInstance->GetData(DATA_CHAMPIONS_COUNT) - 1); + m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + + if (m_pInstance->GetData(DATA_CHAMPIONS_COUNT) < 1) { + m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, DONE); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) + pTemp->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) + pTemp->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) + pTemp->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + } + } void UpdateAI(const uint32 diff) { @@ -223,23 +219,10 @@ struct MANGOS_DLL_DECL mob_toc5_mageAI : public ScriptedAI m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); } - void EnterEvadeMode() - { - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) - pTemp->ForcedDespawn(); - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) - pTemp->ForcedDespawn(); - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) - pTemp->ForcedDespawn(); - m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, FAIL); - } - void Aggro(Unit* pWho) { if (!m_pInstance) return; - if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == DONE) - m_creature->ForcedDespawn(); else { if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) @@ -255,16 +238,24 @@ struct MANGOS_DLL_DECL mob_toc5_mageAI : public ScriptedAI } } - void JustDied(Unit* pKiller) - { - if (!m_pInstance) - return; - - m_pInstance->SetData(DATA_CHAMPIONS_COUNT, m_pInstance->GetData(DATA_CHAMPIONS_COUNT) - 1); - - if (m_pInstance->GetData(DATA_CHAMPIONS_COUNT) < 1) - m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, DONE); - } + void JustDied(Unit* pKiller) + { + if (!m_pInstance) + return; + + m_pInstance->SetData(DATA_CHAMPIONS_COUNT, m_pInstance->GetData(DATA_CHAMPIONS_COUNT) - 1); + m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + + if (m_pInstance->GetData(DATA_CHAMPIONS_COUNT) < 1) { + m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, DONE); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) + pTemp->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) + pTemp->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) + pTemp->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + } + } void UpdateAI(const uint32 diff) { @@ -346,25 +337,12 @@ struct MANGOS_DLL_DECL mob_toc5_shamanAI : public ScriptedAI m_creature->GetMotionMaster()->MovePoint(0, 746, 614, m_creature->GetPositionZ()); m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); - } - - void EnterEvadeMode() - { - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) - pTemp->ForcedDespawn(); - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) - pTemp->ForcedDespawn(); - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) - pTemp->ForcedDespawn(); - m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, FAIL); } void Aggro(Unit* pWho) { if (!m_pInstance) return; - if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == DONE) - m_creature->ForcedDespawn(); else { if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) @@ -380,16 +358,24 @@ struct MANGOS_DLL_DECL mob_toc5_shamanAI : public ScriptedAI } } - void JustDied(Unit* pKiller) - { - if (!m_pInstance) - return; - - m_pInstance->SetData(DATA_CHAMPIONS_COUNT, m_pInstance->GetData(DATA_CHAMPIONS_COUNT) - 1); - - if (m_pInstance->GetData(DATA_CHAMPIONS_COUNT) < 1) - m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, DONE); - } + void JustDied(Unit* pKiller) + { + if (!m_pInstance) + return; + + m_pInstance->SetData(DATA_CHAMPIONS_COUNT, m_pInstance->GetData(DATA_CHAMPIONS_COUNT) - 1); + m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + + if (m_pInstance->GetData(DATA_CHAMPIONS_COUNT) < 1) { + m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, DONE); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) + pTemp->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) + pTemp->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) + pTemp->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + } + } void UpdateAI(const uint32 diff) { @@ -516,25 +502,12 @@ struct MANGOS_DLL_DECL mob_toc5_hunterAI : public ScriptedAI m_creature->GetMotionMaster()->MovePoint(0, 746, 614, m_creature->GetPositionZ()); m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); - } - - void EnterEvadeMode() - { - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) - pTemp->ForcedDespawn(); - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) - pTemp->ForcedDespawn(); - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) - pTemp->ForcedDespawn(); - m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, FAIL); } void Aggro(Unit* pWho) { if (!m_pInstance) return; - if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == DONE) - m_creature->ForcedDespawn(); else { if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) @@ -550,16 +523,24 @@ struct MANGOS_DLL_DECL mob_toc5_hunterAI : public ScriptedAI } } - void JustDied(Unit* pKiller) - { - if (!m_pInstance) - return; - - m_pInstance->SetData(DATA_CHAMPIONS_COUNT, m_pInstance->GetData(DATA_CHAMPIONS_COUNT) - 1); - - if (m_pInstance->GetData(DATA_CHAMPIONS_COUNT) < 1) - m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, DONE); - } + void JustDied(Unit* pKiller) + { + if (!m_pInstance) + return; + + m_pInstance->SetData(DATA_CHAMPIONS_COUNT, m_pInstance->GetData(DATA_CHAMPIONS_COUNT) - 1); + m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + + if (m_pInstance->GetData(DATA_CHAMPIONS_COUNT) < 1) { + m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, DONE); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) + pTemp->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) + pTemp->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) + pTemp->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + } + } void UpdateAI(const uint32 diff) { @@ -658,23 +639,10 @@ struct MANGOS_DLL_DECL mob_toc5_rogueAI : public ScriptedAI m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); } - void EnterEvadeMode() - { - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) - pTemp->ForcedDespawn(); - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) - pTemp->ForcedDespawn(); - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) - pTemp->ForcedDespawn(); - m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, FAIL); - } - void Aggro(Unit* pWho) { if (!m_pInstance) return; - if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == DONE) - m_creature->ForcedDespawn(); else { if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) @@ -690,16 +658,24 @@ struct MANGOS_DLL_DECL mob_toc5_rogueAI : public ScriptedAI } } - void JustDied(Unit* pKiller) - { - if (!m_pInstance) - return; - - m_pInstance->SetData(DATA_CHAMPIONS_COUNT, m_pInstance->GetData(DATA_CHAMPIONS_COUNT) - 1); - - if (m_pInstance->GetData(DATA_CHAMPIONS_COUNT) < 1) - m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, DONE); - } + void JustDied(Unit* pKiller) + { + if (!m_pInstance) + return; + + m_pInstance->SetData(DATA_CHAMPIONS_COUNT, m_pInstance->GetData(DATA_CHAMPIONS_COUNT) - 1); + m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + + if (m_pInstance->GetData(DATA_CHAMPIONS_COUNT) < 1) { + m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, DONE); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_1)))) + pTemp->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_2)))) + pTemp->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + if (Creature* pTemp = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_CHAMPION_3)))) + pTemp->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + } + } void UpdateAI(const uint32 diff) { diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp index b5eea599c..054f5b814 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp @@ -188,9 +188,19 @@ switch(uiAction) { if (m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == NOT_STARTED || m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == IN_PROGRESS) { - pCreature->SummonCreature(m_pInstance->GetData(DATA_CHAMPIONID_1), 738.665771, 661.031433, 412.394623, 4.698702, TEMPSUMMON_MANUAL_DESPAWN, 0); - pCreature->SummonCreature(m_pInstance->GetData(DATA_CHAMPIONID_2), 746.864441, 660.918762, 411.695465, 4.698700, TEMPSUMMON_MANUAL_DESPAWN, 0); - pCreature->SummonCreature(m_pInstance->GetData(DATA_CHAMPIONID_3), 754.360779, 660.816162, 412.395996, 4.698700, TEMPSUMMON_MANUAL_DESPAWN, 0); + m_pInstance->SetData(DATA_CHAMPIONS_COUNT, 3); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(DATA_CHAMPION_1))) + pTemp->Respawn(); + else + pCreature->SummonCreature(m_pInstance->GetData(DATA_CHAMPIONID_1), 738.665771, 661.031433, 412.394623, 4.698702, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(DATA_CHAMPION_2))) + pTemp->Respawn(); + else + pCreature->SummonCreature(m_pInstance->GetData(DATA_CHAMPIONID_2), 746.864441, 660.918762, 411.695465, 4.698700, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(DATA_CHAMPION_3))) + pTemp->Respawn(); + else + pCreature->SummonCreature(m_pInstance->GetData(DATA_CHAMPIONID_3), 754.360779, 660.816162, 412.395996, 4.698700, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); m_pInstance->SetData(TYPE_GRAND_CHAMPIONS, IN_PROGRESS); }; }; @@ -198,15 +208,11 @@ switch(uiAction) { case GOSSIP_ACTION_INFO_DEF+2: { if ((m_pInstance->GetData(TYPE_ARGENT_CHALLENGE) == NOT_STARTED || m_pInstance->GetData(TYPE_ARGENT_CHALLENGE) == IN_PROGRESS) && m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == DONE) { - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*pCreature), m_pInstance->GetData64(DATA_CHAMPION_1)))) - pTemp->ForcedDespawn(); - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*pCreature), m_pInstance->GetData64(DATA_CHAMPION_2)))) - pTemp->ForcedDespawn(); - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*pCreature), m_pInstance->GetData64(DATA_CHAMPION_3)))) - pTemp->ForcedDespawn(); - - pCreature->SummonCreature(m_pInstance->GetData(DATA_ARGENT_CHALLENGER), 746.864441, 660.918762, 411.695465, 4.698700, TEMPSUMMON_MANUAL_DESPAWN, 0); - m_pInstance->SetData(TYPE_ARGENT_CHALLENGE, IN_PROGRESS); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData(DATA_ARGENT_CHALLENGER))) + pTemp->Respawn(); + else + pCreature->SummonCreature(m_pInstance->GetData(DATA_ARGENT_CHALLENGER), 746.864441, 660.918762, 411.695465, 4.698700, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + m_pInstance->SetData(TYPE_ARGENT_CHALLENGE, IN_PROGRESS); }; }; @@ -214,9 +220,7 @@ switch(uiAction) { case GOSSIP_ACTION_INFO_DEF+3: { if ((m_pInstance->GetData(TYPE_BLACK_KNIGHT) == NOT_STARTED || m_pInstance->GetData(TYPE_BLACK_KNIGHT) == IN_PROGRESS) && m_pInstance->GetData(TYPE_ARGENT_CHALLENGE) == DONE) { - if (Creature* pTemp = ((Creature*)Unit::GetUnit((*pCreature), m_pInstance->GetData64(DATA_ARGENT_CHALLENGER)))) - pTemp->ForcedDespawn(); - pCreature->SummonCreature(35451, 746.864441, 660.918762, 411.695465, 4.698700, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000); + pCreature->SummonCreature(35451, 746.864441, 660.918762, 411.695465, 4.698700, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); pCreature->DealDamage(pCreature, pCreature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); m_pInstance->SetData(TYPE_BLACK_KNIGHT, IN_PROGRESS); }; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h index bf20111fc..ec238c894 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h @@ -77,7 +77,9 @@ enum GO_EADRIC_LOOT = 195374, GO_EADRIC_LOOT_H = 195375, GO_PALETRESS_LOOT = 195323, - GO_PALETRESS_LOOT_H = 195324 + GO_PALETRESS_LOOT_H = 195324, + + DESPAWN_TIME = 300000 }; From 0ab7ed3dac20b7d636e51e8cf3748b706bdfb47e Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 4 Feb 2010 18:31:28 +0300 Subject: [PATCH 128/405] Trial of crusader first probe --- Makefile.am | 3 + addition/724_trial_of_crusader_mangos.sql | 23 ++ .../instance_trial_of_the_crusader.cpp | 143 ++++++-- .../trial_of_the_crusader.cpp | 329 +++++++++++++++++- .../trial_of_the_crusader.h | 56 ++- system/ScriptLoader.cpp | 16 +- 6 files changed, 513 insertions(+), 57 deletions(-) create mode 100644 addition/724_trial_of_crusader_mangos.sql diff --git a/Makefile.am b/Makefile.am index 434a794fe..58e95311d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -495,6 +495,9 @@ scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions. scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp \ scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp \ scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h \ +scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp \ +scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp \ +scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h \ scripts/northrend/violet_hold/def_violet_hold.h \ scripts/northrend/violet_hold/violet_hold.cpp \ scripts/northrend/violet_hold/boss_cyanigosa.cpp \ diff --git a/addition/724_trial_of_crusader_mangos.sql b/addition/724_trial_of_crusader_mangos.sql new file mode 100644 index 000000000..ca25c4f31 --- /dev/null +++ b/addition/724_trial_of_crusader_mangos.sql @@ -0,0 +1,23 @@ +-- instance +UPDATE `instance_template` SET `script`='instance_trial_of_the_crusader' WHERE `map`=649; + +-- announcers +UPDATE `creature_template` SET `npcflag`=1, `scriptname`='npc_toc_announcer' WHERE `entry`=34816; + +DELETE FROM `creature` WHERE `map` = 649 AND `id` IN +(34797,34796,34799,35144,34780,34460,34463,34461,34471,34475,34472,34453,34455,34458,34454,34451,34456,34497,34496,34564,34467,35465,34468,35610,34473,34474,34441,34449,34448,34450); + + +-- grand crusaders +-- UPDATE `creature_template` SET `scriptname`='mob_toc_warrior' WHERE entry IN (34705, 35572); +-- UPDATE `creature_template` SET `scriptname`='mob_toc5_mage' WHERE entry IN (34702, 35569); +-- UPDATE `creature_template` SET `scriptname`='mob_toc5_shaman' WHERE entry IN (34701, 35571); +-- UPDATE `creature_template` SET `scriptname`='mob_toc5_hunter' WHERE entry IN (34657, 35570); +-- UPDATE `creature_template` SET `scriptname`='mob_toc5_rogue' WHERE entry IN (34703, 35617); + +-- Nortrend beasts +-- UPDATE creature_template SET scriptname='boss_eadric' WHERE entry=35119; + +-- Jaraxxus +-- UPDATE creature_template SET scriptname='boss_black_knight' WHERE entry=35451; + diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index f75ff54d4..07e57c24e 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -31,7 +31,7 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance Initialize(); } - uint32 m_auiEncounter[MAX_ENCOUNTER+1]; + uint32 m_auiEncounter[MAX_ENCOUNTERS+1]; uint8 Difficulty; std::string m_strInstData; @@ -44,12 +44,39 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance uint64 m_uiJaraxxusGUID; uint64 m_uiDarkbaneGUID; uint64 m_uiLightbaneGUID; + uint64 m_uiAnubarakGUID; + + uint64 m_uiCusader11Guid; + uint64 m_uiCusader12Guid; + uint64 m_uiCusader13Guid; + uint64 m_uiCusader14Guid; + uint64 m_uiCusader15Guid; + uint64 m_uiCusader16Guid; + uint64 m_uiCusader17Guid; + uint64 m_uiCusader18Guid; + uint64 m_uiCusader19Guid; + uint64 m_uiCusader1aGuid; + + uint64 m_uiCusader21Guid; + uint64 m_uiCusader22Guid; + uint64 m_uiCusader23Guid; + uint64 m_uiCusader24Guid; + uint64 m_uiCusader25Guid; + uint64 m_uiCusader26Guid; + uint64 m_uiCusader27Guid; + uint64 m_uiCusader28Guid; + uint64 m_uiCusader29Guid; + uint64 m_uiCusader2aGuid; + + uint64 m_uiCusader01Guid; + uint64 m_uiCusader02Guid; + uint64 m_uiCrusadersCacheGUID; void Initialize() { - for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTERS; ++i) m_auiEncounter[i] = NOT_STARTED; } @@ -57,15 +84,40 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance { switch(pCreature->GetEntry()) { - case NPC_BARRENT: m_uiBarrentGUID = pCreature->GetGUID(); break; - case NPC_GORMOK: m_uiGormokGUID = pCreature->GetGUID(); break; - case NPC_ACIDMAW: m_uiAcidmawGUID = pCreature->GetGUID(); break; - case NPC_DREADSCALE: m_uiDreascaleGUID = pCreature->GetGUID(); break; - case NPC_ICEHOWL: m_uiIcehowlGUID = pCreature->GetGUID(); break; - case NPC_JARAXXUS: m_uiJaraxxusGUID = pCreature->GetGUID(); break; - case NPC_DARKBANE: m_uiDarkbaneGUID = pCreature->GetGUID(); break; - case NPC_LIGHTBANE: m_uiLightbaneGUID = pCreature->GetGUID(); break; - case NPC_ANUBARAK: m_uiBarrentGUID = pCreature->GetGUID(); break; + case NPC_BARRENT: m_uiBarrentGUID = pCreature->GetGUID(); break; + case NPC_GORMOK: m_uiGormokGUID = pCreature->GetGUID(); break; + case NPC_ACIDMAW: m_uiAcidmawGUID = pCreature->GetGUID(); break; + case NPC_DREADSCALE: m_uiDreadscaleGUID = pCreature->GetGUID(); break; + case NPC_ICEHOWL: m_uiIcehowlGUID = pCreature->GetGUID(); break; + case NPC_JARAXXUS: m_uiJaraxxusGUID = pCreature->GetGUID(); break; + case NPC_DARKBANE: m_uiDarkbaneGUID = pCreature->GetGUID(); break; + case NPC_LIGHTBANE: m_uiLightbaneGUID = pCreature->GetGUID(); break; + case NPC_ANUBARAK: m_uiAnubarakGUID = pCreature->GetGUID(); break; + + case NPC_CRUSADER_1_1: m_uiCusader11Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_1_2: m_uiCusader12Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_1_3: m_uiCusader13Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_1_4: m_uiCusader14Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_1_5: m_uiCusader15Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_1_6: m_uiCusader16Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_1_7: m_uiCusader17Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_1_8: m_uiCusader18Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_1_9: m_uiCusader19Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_1_10: m_uiCusader1aGuid = pCreature->GetGUID(); break; + + case NPC_CRUSADER_2_1: m_uiCusader21Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_2_2: m_uiCusader22Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_2_3: m_uiCusader23Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_2_4: m_uiCusader24Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_2_5: m_uiCusader25Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_2_6: m_uiCusader26Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_2_7: m_uiCusader27Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_2_8: m_uiCusader28Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_2_9: m_uiCusader29Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_2_10: m_uiCusader2aGuid = pCreature->GetGUID(); break; + + case NPC_CRUSADER_0_1: m_uiCusader01Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_0_2: m_uiCusader02Guid = pCreature->GetGUID(); break; } } @@ -81,11 +133,11 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance if(Difficulty == RAID_DIFFICULTY_25MAN_NORMAL) m_uiCrusadersCacheGUID = pGo->GetGUID(); break; - case GO_CRUSADERS_CACHE_10H: + case GO_CRUSADERS_CACHE_10_H: if(Difficulty == RAID_DIFFICULTY_10MAN_HEROIC) m_uiCrusadersCacheGUID = pGo->GetGUID(); break; - case GO_CRUSADERS_CACHE_25H: + case GO_CRUSADERS_CACHE_25_H: if(Difficulty == RAID_DIFFICULTY_25MAN_HEROIC) m_uiCrusadersCacheGUID = pGo->GetGUID(); break; @@ -96,11 +148,20 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance { switch(uiType) { - case TYPE_BEASTS: m_auiEncounter[0] = uiData; break; - case TYPE_JARAXXUS: m_auiEncounter[1] = uiData; break; - case TYPE_CRUSADERS: m_auiEncounter[2] = uiData; break; - case TYPE_FROJA: m_auiEncounter[3] = uiData; break; - case TYPE_ANUBARAK: m_auiEncounter[4] = uiData; break; + case TYPE_STAGE: m_auiEncounter[0] = uiData; break; + case TYPE_BEASTS: m_auiEncounter[1] = uiData; break; + case TYPE_JARAXXUS: m_auiEncounter[2] = uiData; break; + case TYPE_CRUSADERS: m_auiEncounter[3] = uiData; + if (uiData == DONE) { + if (GameObject* pChest = instance->GetGameObject(m_uiCrusadersCacheGUID)) + if (pChest && !pChest->isSpawned()) { + pChest->SetRespawnTime(DAY); + pChest->SetGoState(GO_STATE_ACTIVE); + }; + }; + break; + case TYPE_FROJA: m_auiEncounter[4] = uiData; break; + case TYPE_ANUBARAK: m_auiEncounter[5] = uiData; break; } if (uiData == DONE) @@ -109,7 +170,7 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance std::ostringstream saveStream; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for(uint8 i = 0; i < MAX_ENCOUNTERS; ++i) saveStream << m_auiEncounter[i] << " "; m_strInstData = saveStream.str(); @@ -126,12 +187,38 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance case NPC_BARRENT: return m_uiBarrentGUID; case NPC_GORMOK: return m_uiGormokGUID; case NPC_ACIDMAW: return m_uiAcidmawGUID; - case NPC_DREADSCALE: return m_uiDreascaleGUID; + case NPC_DREADSCALE: return m_uiDreadscaleGUID; case NPC_ICEHOWL: return m_uiIcehowlGUID; case NPC_JARAXXUS: return m_uiJaraxxusGUID; case NPC_DARKBANE: return m_uiDarkbaneGUID; case NPC_LIGHTBANE: return m_uiLightbaneGUID; - case NPC_ANUBARAK: return m_uiBarrentGUID; + case NPC_ANUBARAK: return m_uiAnubarakGUID; + + case NPC_CRUSADER_1_1: return m_uiCusader11Guid; + case NPC_CRUSADER_1_2: return m_uiCusader12Guid; + case NPC_CRUSADER_1_3: return m_uiCusader13Guid; + case NPC_CRUSADER_1_4: return m_uiCusader14Guid; + case NPC_CRUSADER_1_5: return m_uiCusader15Guid; + case NPC_CRUSADER_1_6: return m_uiCusader16Guid; + case NPC_CRUSADER_1_7: return m_uiCusader17Guid; + case NPC_CRUSADER_1_8: return m_uiCusader18Guid; + case NPC_CRUSADER_1_9: return m_uiCusader19Guid; + case NPC_CRUSADER_1_10: return m_uiCusader1aGuid; + + case NPC_CRUSADER_2_1: return m_uiCusader21Guid; + case NPC_CRUSADER_2_2: return m_uiCusader22Guid; + case NPC_CRUSADER_2_3: return m_uiCusader23Guid; + case NPC_CRUSADER_2_4: return m_uiCusader24Guid; + case NPC_CRUSADER_2_5: return m_uiCusader25Guid; + case NPC_CRUSADER_2_6: return m_uiCusader26Guid; + case NPC_CRUSADER_2_7: return m_uiCusader27Guid; + case NPC_CRUSADER_2_8: return m_uiCusader28Guid; + case NPC_CRUSADER_2_9: return m_uiCusader29Guid; + case NPC_CRUSADER_2_10: return m_uiCusader2aGuid; + + case NPC_CRUSADER_0_1: return m_uiCusader01Guid; + case NPC_CRUSADER_0_2: return m_uiCusader02Guid; + } return 0; } @@ -140,11 +227,12 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance { switch(uiType) { - case TYPE_BEASTS: return m_auiEncounter[0]; - case TYPE_JARAXXUS: return m_auiEncounter[1]; - case TYPE_CRUSADERS: return m_auiEncounter[2]; - case TYPE_FROJA: return m_auiEncounter[3]; - case TYPE_ANUBARAK: return m_auiEncounter[4]; + case TYPE_STAGE: return m_auiEncounter[0]; + case TYPE_BEASTS: return m_auiEncounter[1]; + case TYPE_JARAXXUS: return m_auiEncounter[2]; + case TYPE_CRUSADERS: return m_auiEncounter[3]; + case TYPE_FROJA: return m_auiEncounter[4]; + case TYPE_ANUBARAK: return m_auiEncounter[5]; } return 0; @@ -167,13 +255,14 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance std::istringstream loadStream(strIn); - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for(uint8 i = 0; i < MAX_ENCOUNTERS; ++i) { loadStream >> m_auiEncounter[i]; if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; } + m_auiEncounter[0] = 0; OUT_LOAD_INST_DATA_COMPLETE; } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index 9bbfd238d..d81efb3ea 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -36,16 +36,21 @@ static _Messages _GossipMessage[]= { {"Вы готовы драться с бестиями Нортренда?",GOSSIP_ACTION_INFO_DEF+1,false,TYPE_BEASTS}, // {"Вы готовы драться с лордом Джараксусом?",GOSSIP_ACTION_INFO_DEF+2,false,TYPE_JARAXXUS}, // -{"Вы готовы драться с крестоносцами фракций?",GOSSIP_ACTION_INFO_DEF+3,false,TYPE_CRUSADERS}, // -{"Вы готовы драться с Близнецами?",GOSSIP_ACTION_INFO_DEF+4,false,TYPE_FROJA}, // -{"Вы готовы драться с Ануб`Араком?",GOSSIP_ACTION_INFO_DEF+5,false,TYPE_ANUBARAK}, // -{"Не надо сюда тыкать. На сегодня арена закрыта.",GOSSIP_ACTION_INFO_DEF+6,true,TYPE_ANUBARAK}, // +{"Вы готовы драться с крестоносцами альянса?",GOSSIP_ACTION_INFO_DEF+3,false,TYPE_CRUSADERS}, // +{"Вы готовы драться с крестоносцами орды?",GOSSIP_ACTION_INFO_DEF+4,false,TYPE_CRUSADERS}, // +{"Вы готовы драться с Близнецами?",GOSSIP_ACTION_INFO_DEF+5,false,TYPE_FROJA}, // +{"Вы готовы драться с Анубараком?",GOSSIP_ACTION_INFO_DEF+6,false,TYPE_ANUBARAK}, // +{"Не надо сюда тыкать. На сегодня арена закрыта.",GOSSIP_ACTION_INFO_DEF+7,true,TYPE_ANUBARAK}, // }; -#define NUM_MERSSAGES 6 +enum +{ + NUM_MESSAGES = 7, +}; + struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI { - npc_toc5_announcerAI(Creature* pCreature) : ScriptedAI(pCreature) + npc_toc_announcerAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Reset(); @@ -55,13 +60,128 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI void Reset() { + m_pInstance->SetData(TYPE_STAGE,0); } void UpdateAI(const uint32 diff) { if (!m_pInstance) return; - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + switch (m_pInstance->GetData(TYPE_STAGE)) { + case 0: break; + case 1: { + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_GORMOK))) + if (!pTemp->isAlive()) m_pInstance->SetData(TYPE_STAGE,2); + break; + }; + case 2: { + Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_DREADSCALE)); + Creature* pTemp1 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_ACIDMAW)); + if (pTemp && pTemp1){ + if (!pTemp->isAlive() && !pTemp1->isAlive()) m_pInstance->SetData(TYPE_STAGE,3); + } + else { + m_creature->SummonCreature(NPC_DREADSCALE, SpawnLoc[3].x, SpawnLoc[3].y, SpawnLoc[3].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + m_creature->SummonCreature(NPC_ACIDMAW, SpawnLoc[4].x, SpawnLoc[4].y, SpawnLoc[4].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_DREADSCALE))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + } + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_ACIDMAW))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + } + } + break; + } + case 3: { + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_ICEHOWL))) { + if (!pTemp->isAlive()) { + m_pInstance->SetData(TYPE_STAGE,0); + m_pInstance->SetData(TYPE_BEASTS,DONE); + } + } + else { + m_creature->SummonCreature(NPC_ICEHOWL, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_ICEHOWL))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + } + } + break; + }; + case 4: { + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_JARAXXUS))) { + if (!pTemp->isAlive()) { + m_pInstance->SetData(TYPE_STAGE,0); + m_pInstance->SetData(TYPE_JARAXXUS,DONE); + } + } + else { + m_creature->SummonCreature(NPC_JARAXXUS, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_JARAXXUS))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + } + } + break; + }; + + case 5: { + Creature* pTemp1 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_1_1)); + Creature* pTemp2 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_1_2)); + Creature* pTemp3 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_1_3)); + Creature* pTemp4 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_1_4)); + Creature* pTemp5 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_1_5)); + Creature* pTemp6 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_1_6)); + if (pTemp1 && pTemp2 && pTemp3 && pTemp4 && pTemp5 && pTemp6) { + if (!pTemp1->isAlive() && !pTemp2->isAlive() && !pTemp3->isAlive() && !pTemp4->isAlive() && !pTemp5->isAlive() && !pTemp6->isAlive()) { + m_pInstance->SetData(TYPE_STAGE,0); + m_pInstance->SetData(TYPE_CRUSADERS,DONE); + } + }; + break; + }; + + case 6: { + Creature* pTemp1 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_2_1)); + Creature* pTemp2 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_2_2)); + Creature* pTemp3 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_2_3)); + Creature* pTemp4 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_2_4)); + Creature* pTemp5 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_2_5)); + Creature* pTemp6 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_2_6)); + if (pTemp1 && pTemp2 && pTemp3 && pTemp4 && pTemp5 && pTemp6) { + if (!pTemp1->isAlive() && !pTemp2->isAlive() && !pTemp3->isAlive() && !pTemp4->isAlive() && !pTemp5->isAlive() && !pTemp6->isAlive()) { + m_pInstance->SetData(TYPE_STAGE,0); + m_pInstance->SetData(TYPE_CRUSADERS,DONE); + } + }; + break; + }; + + case 7: { + Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_DARKBANE)); + Creature* pTemp1 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_LIGHTBANE)); + if (pTemp && pTemp1){ + if (!pTemp->isAlive() && !pTemp1->isAlive()) { + m_pInstance->SetData(TYPE_STAGE,0); + m_pInstance->SetData(TYPE_FROJA,DONE); + } + } + break; + }; + case 8: { + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_ANUBARAK))) + if (!pTemp->isAlive()) { + m_pInstance->SetData(TYPE_STAGE,0); + m_pInstance->SetData(TYPE_ANUBARAK,DONE); + } + break; + }; + + } + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; } }; @@ -81,19 +201,20 @@ bool GossipHello_npc_toc_announcer(Player* pPlayer, Creature* pCreature) if(!pPlayer->getAttackers().empty()) return true; for(uint8 i = 0; i < NUM_MESSAGES; i++) { - if (!_GossipMessage[i].state && (m_pInstance->GetData(_GossipMessage[i].encounter) == NOT_STARTED || m_pInstance->GetData(_GossipMessage[i].encounter) == IN_PROGRESS)) - {pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, _GossipMessage[i].name, GOSSIP_SENDER_MAIN,_GossipMessage[i].id); + if (!_GossipMessage[i].state && (m_pInstance->GetData(_GossipMessage[i].encounter) == NOT_STARTED || m_pInstance->GetData(_GossipMessage[i].encounter) == IN_PROGRESS)) { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, _GossipMessage[i].name, GOSSIP_SENDER_MAIN,_GossipMessage[i].id); + if (_GossipMessage[i].encounter == TYPE_CRUSADERS) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, _GossipMessage[3].name, GOSSIP_SENDER_MAIN,_GossipMessage[3].id); break; } if (_GossipMessage[i].state && m_pInstance->GetData(_GossipMessage[i].encounter) == DONE) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, _GossipMessage[i].name, GOSSIP_SENDER_MAIN,_GossipMessage[i].id); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, _GossipMessage[i].name, GOSSIP_SENDER_MAIN,_GossipMessage[i].id); }; pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); return true; } -bool GossipSelect_npc_toc5_announcer(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_toc_announcer(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { ScriptedInstance* m_pInstance; m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); @@ -102,23 +223,203 @@ pPlayer->CLOSE_GOSSIP_MENU(); switch(uiAction) { case GOSSIP_ACTION_INFO_DEF+1: { + if (m_pInstance->GetData(TYPE_BEASTS) == NOT_STARTED) m_pInstance->SetData(TYPE_STAGE,1); + m_pInstance->SetData(TYPE_BEASTS,IN_PROGRESS); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_GORMOK))) + { if(!pTemp->isAlive()) pTemp->Respawn(); } + else { + pCreature->SummonCreature(NPC_GORMOK, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_GORMOK))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + } + } + break; }; case GOSSIP_ACTION_INFO_DEF+2: { - + m_pInstance->SetData(TYPE_STAGE,4); + m_pInstance->SetData(TYPE_JARAXXUS,IN_PROGRESS); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_JARAXXUS))) + pTemp->Respawn(); + else { + pCreature->SummonCreature(NPC_JARAXXUS, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_JARAXXUS))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + } + } + break; }; case GOSSIP_ACTION_INFO_DEF+3: { + m_pInstance->SetData(TYPE_STAGE,5); + m_pInstance->SetData(TYPE_CRUSADERS,IN_PROGRESS); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_1))) + pTemp->Respawn(); + else { + pCreature->SummonCreature(NPC_CRUSADER_1_1, SpawnLoc[3].x, SpawnLoc[3].y, SpawnLoc[3].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_1))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + } + } + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_2))) + pTemp->Respawn(); + else { + pCreature->SummonCreature(NPC_CRUSADER_1_2, SpawnLoc[4].x, SpawnLoc[4].y, SpawnLoc[4].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_2))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + } + } + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_3))) + pTemp->Respawn(); + else { + pCreature->SummonCreature(NPC_CRUSADER_1_3, SpawnLoc[5].x, SpawnLoc[5].y, SpawnLoc[5].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_3))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + } + } + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_4))) + pTemp->Respawn(); + else { + pCreature->SummonCreature(NPC_CRUSADER_1_4, SpawnLoc[6].x, SpawnLoc[6].y, SpawnLoc[6].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_4))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + } + } + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_5))) + pTemp->Respawn(); + else { + pCreature->SummonCreature(NPC_CRUSADER_1_5, SpawnLoc[7].x, SpawnLoc[7].y, SpawnLoc[7].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_5))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + } + } + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_6))) + pTemp->Respawn(); + else { + pCreature->SummonCreature(NPC_CRUSADER_1_6, SpawnLoc[8].x, SpawnLoc[8].y, SpawnLoc[8].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_6))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + } + } + break; }; case GOSSIP_ACTION_INFO_DEF+4: { + m_pInstance->SetData(TYPE_STAGE,6); + m_pInstance->SetData(TYPE_CRUSADERS,IN_PROGRESS); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_1))) + pTemp->Respawn(); + else { + pCreature->SummonCreature(NPC_CRUSADER_2_1, SpawnLoc[3].x, SpawnLoc[3].y, SpawnLoc[3].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_1))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + } + } + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_2))) + pTemp->Respawn(); + else { + pCreature->SummonCreature(NPC_CRUSADER_2_2, SpawnLoc[4].x, SpawnLoc[4].y, SpawnLoc[4].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_2))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + } + } + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_3))) + pTemp->Respawn(); + else { + pCreature->SummonCreature(NPC_CRUSADER_2_3, SpawnLoc[5].x, SpawnLoc[5].y, SpawnLoc[5].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_3))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + } + } + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_4))) + pTemp->Respawn(); + else { + pCreature->SummonCreature(NPC_CRUSADER_2_4, SpawnLoc[6].x, SpawnLoc[6].y, SpawnLoc[6].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_4))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + } + } + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_5))) + pTemp->Respawn(); + else { + pCreature->SummonCreature(NPC_CRUSADER_2_5, SpawnLoc[7].x, SpawnLoc[7].y, SpawnLoc[7].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_5))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + } + } + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_6))) + pTemp->Respawn(); + else { + pCreature->SummonCreature(NPC_CRUSADER_2_6, SpawnLoc[8].x, SpawnLoc[8].y, SpawnLoc[8].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_6))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + } + } + break; }; case GOSSIP_ACTION_INFO_DEF+5: { + m_pInstance->SetData(TYPE_STAGE,7); + m_pInstance->SetData(TYPE_FROJA,IN_PROGRESS); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_LIGHTBANE))) + { if(!pTemp->isAlive()) pTemp->Respawn(); } + else { + pCreature->SummonCreature(NPC_LIGHTBANE, SpawnLoc[3].x, SpawnLoc[3].y, SpawnLoc[3].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_LIGHTBANE))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + } + } + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_DARKBANE))) + { if(!pTemp->isAlive()) pTemp->Respawn(); } + else { + pCreature->SummonCreature(NPC_DARKBANE, SpawnLoc[4].x, SpawnLoc[4].y, SpawnLoc[4].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_DARKBANE))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + } + } + break; }; -}; - return true; + case GOSSIP_ACTION_INFO_DEF+6: { + m_pInstance->SetData(TYPE_STAGE,8); + m_pInstance->SetData(TYPE_ANUBARAK,IN_PROGRESS); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_ANUBARAK))) + pTemp->Respawn(); + else { + pCreature->SummonCreature(NPC_ANUBARAK, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_ANUBARAK))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + } + } + break; + }; + + case GOSSIP_ACTION_INFO_DEF+7: { + m_pInstance->SetData(TYPE_STAGE,9); + + break; + }; + + }; + +return true; } void AddSC_trial_of_the_crusader() diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index f2855f08c..024ad88e7 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -4,11 +4,11 @@ enum { - MAX_ENCOUNTERS = 5, + MAX_ENCOUNTERS = 6, NPC_BARRENT = 34816, NPC_ICEHOWL = 34797, - NPC_GORMOK = 35469, + NPC_GORMOK = 34796, NPC_DREADSCALE = 34799, NPC_ACIDMAW = 35144, @@ -20,6 +20,10 @@ enum NPC_CRUSADER_1_4 = 34471, NPC_CRUSADER_1_5 = 34475, NPC_CRUSADER_1_6 = 34472, + NPC_CRUSADER_1_7 = 34467, + NPC_CRUSADER_1_8 = 34468, + NPC_CRUSADER_1_9 = 34473, + NPC_CRUSADER_1_10 = 34474, NPC_CRUSADER_2_1 = 34453, NPC_CRUSADER_2_2 = 34455, @@ -27,6 +31,13 @@ enum NPC_CRUSADER_2_4 = 34454, NPC_CRUSADER_2_5 = 34451, NPC_CRUSADER_2_6 = 34456, + NPC_CRUSADER_2_7 = 34441, + NPC_CRUSADER_2_8 = 34449, + NPC_CRUSADER_2_9 = 34448, + NPC_CRUSADER_2_10 = 34450, + + NPC_CRUSADER_0_1 = 35465, + NPC_CRUSADER_0_2 = 35610, NPC_LIGHTBANE = 34497, @@ -34,16 +45,39 @@ enum NPC_ANUBARAK = 34564, - GO_CHAMPIONS_CACHE_10 = 73111, - GO_CHAMPIONS_CACHE_25 = 73112, - GO_CHAMPIONS_CACHE_10_H = 73113, - GO_CHAMPIONS_CACHE_25_H = 73114, + GO_CRUSADERS_CACHE_10 = 73111, + GO_CRUSADERS_CACHE_25 = 73112, + GO_CRUSADERS_CACHE_10_H = 73113, + GO_CRUSADERS_CACHE_25_H = 73114, + + TYPE_STAGE = 0, + TYPE_BEASTS = 1, + TYPE_JARAXXUS = 2, + TYPE_CRUSADERS = 3, + TYPE_FROJA = 4, + TYPE_ANUBARAK = 5, - TYPE_BEASTS = 0, - TYPE_JARAXXUS = 1, - TYPE_CRUSADERS = 2, - TYPE_FROJA = 3, - TYPE_ANUBARAK = 4 + DESPAWN_TIME = 300000 }; + +struct Locations +{ + float x, y, z; + uint32 id; +}; + +static Locations SpawnLoc[]= +{ + {559.257996, 90.266197, 395.122986}, // 0 Barrent + {563.672974, 139.571, 393.837006}, // 1 Center + {563.833008, 187.244995, 394.5}, // 2 Backdoor + {583.336182, 181.737717, 395.135956}, // 3 + {545.914185, 180.859543, 395.137909}, // 4 + {599.042358, 179.260727, 395.137146}, // 5 + {532.248901, 180.331955, 395.132658}, // 6 + {516.633972, 159.391708, 395.137543}, // 7 + {612.816956, 161.477921, 395.136810}, // 8 +}; + #endif diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index d70302cfc..8c6f892d4 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -255,6 +255,9 @@ extern void AddSC_ungoro_crater(); extern void AddSC_winterspring(); //northrend +extern void AddSC_trial_of_the_crusader(); //trial_of_the_crusader +extern void AddSC_instance_trial_of_the_crusader(); + extern void AddSC_trial_of_the_champion(); //trial_of_the_champion extern void AddSC_boss_argent_challenge(); extern void AddSC_boss_black_knight(); @@ -705,11 +708,14 @@ void AddScripts() AddSC_winterspring(); //northrend - AddSC_trial_of_the_champion(); //trial_of_the_champion - AddSC_boss_argent_challenge(); - AddSC_boss_black_knight(); - AddSC_boss_grand_champions(); - AddSC_instance_trial_of_the_champion(); + AddSC_trial_of_the_crusader(); //trial_of_the_crusader + AddSC_instance_trial_of_the_crusader(); + + AddSC_trial_of_the_champion(); //trial_of_the_champion + AddSC_boss_argent_challenge(); + AddSC_boss_black_knight(); + AddSC_boss_grand_champions(); + AddSC_instance_trial_of_the_champion(); AddSC_boss_jedoga(); //ahnkahet AddSC_boss_nadox(); From 493a4f469f67a47878e09e55d58b66029bc03094 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Fri, 5 Feb 2010 13:23:39 +0300 Subject: [PATCH 129/405] Crusaders change --- addition/724_trial_of_crusader_mangos.sql | 40 +++- .../instance_trial_of_the_crusader.cpp | 149 ++++++++------- .../trial_of_the_crusader.cpp | 179 +++++++++++++++++- .../trial_of_the_crusader.h | 28 ++- 4 files changed, 305 insertions(+), 91 deletions(-) diff --git a/addition/724_trial_of_crusader_mangos.sql b/addition/724_trial_of_crusader_mangos.sql index ca25c4f31..2171eab0e 100644 --- a/addition/724_trial_of_crusader_mangos.sql +++ b/addition/724_trial_of_crusader_mangos.sql @@ -7,17 +7,43 @@ UPDATE `creature_template` SET `npcflag`=1, `scriptname`='npc_toc_announcer' WHE DELETE FROM `creature` WHERE `map` = 649 AND `id` IN (34797,34796,34799,35144,34780,34460,34463,34461,34471,34475,34472,34453,34455,34458,34454,34451,34456,34497,34496,34564,34467,35465,34468,35610,34473,34474,34441,34449,34448,34450); +UPDATE `creature_template` SET `lootid`= 0 WHERE `entry` IN +(34797,34796,34799,35144,34780,34460,34463,34461,34471,34475,34472,34453,34455,34458,34454,34451,34456,34497,34496,34564,34467,35465,34468,35610,34473,34474,34441,34449,34448,34450); + +DELETE FROM `creature_loot_template` WHERE `entry` IN +(34797,34796,34799,35144,34780,34460,34463,34461,34471,34475,34472,34453,34455,34458,34454,34451,34456,34497,34496,34564,34467,35465,34468,35610,34473,34474,34441,34449,34448,34450); + + -- grand crusaders --- UPDATE `creature_template` SET `scriptname`='mob_toc_warrior' WHERE entry IN (34705, 35572); --- UPDATE `creature_template` SET `scriptname`='mob_toc5_mage' WHERE entry IN (34702, 35569); --- UPDATE `creature_template` SET `scriptname`='mob_toc5_shaman' WHERE entry IN (34701, 35571); --- UPDATE `creature_template` SET `scriptname`='mob_toc5_hunter' WHERE entry IN (34657, 35570); --- UPDATE `creature_template` SET `scriptname`='mob_toc5_rogue' WHERE entry IN (34703, 35617); +-- UPDATE `creature_template` SET `scriptname`='mob_toc_warrior' WHERE entry IN (); +-- UPDATE `creature_template` SET `scriptname`='mob_toc_mage' WHERE entry IN (); +-- UPDATE `creature_template` SET `scriptname`='mob_toc_shaman' WHERE entry IN (); +-- UPDATE `creature_template` SET `scriptname`='mob_toc_hunter' WHERE entry IN (); +-- UPDATE `creature_template` SET `scriptname`='mob_toc_rogue' WHERE entry IN (); +-- UPDATE `creature_template` SET `scriptname`='mob_toc_priest' WHERE entry IN (); +-- UPDATE `creature_template` SET `scriptname`='mob_toc_dk' WHERE entry IN (); +-- UPDATE `creature_template` SET `scriptname`='mob_toc_paladin' WHERE entry IN (); +-- UPDATE `creature_template` SET `scriptname`='mob_toc_druid' WHERE entry IN (); +-- UPDATE `creature_template` SET `scriptname`='mob_toc_warlock' WHERE entry IN (); + +-- UPDATE `creature_template` SET `scriptname`='mob_toc_pet_cat' WHERE `entry` = 35465; +-- UPDATE `creature_template` SET `scriptname`='mob_toc_pet_dog' WHERE `entry` = 35610; -- Nortrend beasts --- UPDATE creature_template SET scriptname='boss_eadric' WHERE entry=35119; +-- UPDATE creature_template SET scriptname='boss_gormok' WHERE entry=34796; +-- UPDATE creature_template SET scriptname='boss_dreadscale' WHERE entry=34799; +-- UPDATE creature_template SET scriptname='boss_acidmaw' WHERE entry=35144; +-- UPDATE creature_template SET scriptname='boss_icehowl' WHERE entry=34797; -- Jaraxxus --- UPDATE creature_template SET scriptname='boss_black_knight' WHERE entry=35451; +-- UPDATE creature_template SET scriptname='boss_jaraxxus' WHERE entry=34780; + +-- Froja's +-- UPDATE creature_template SET scriptname='boss_lightbane' WHERE entry=34497; +-- UPDATE creature_template SET scriptname='boss_darkbane' WHERE entry=34496; + +-- Anub'arak +-- UPDATE creature_template SET scriptname='boss_anubarak' WHERE entry=34564; + diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index 07e57c24e..c157234e6 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -46,30 +46,30 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance uint64 m_uiLightbaneGUID; uint64 m_uiAnubarakGUID; - uint64 m_uiCusader11Guid; - uint64 m_uiCusader12Guid; - uint64 m_uiCusader13Guid; - uint64 m_uiCusader14Guid; - uint64 m_uiCusader15Guid; - uint64 m_uiCusader16Guid; - uint64 m_uiCusader17Guid; - uint64 m_uiCusader18Guid; - uint64 m_uiCusader19Guid; - uint64 m_uiCusader1aGuid; - - uint64 m_uiCusader21Guid; - uint64 m_uiCusader22Guid; - uint64 m_uiCusader23Guid; - uint64 m_uiCusader24Guid; - uint64 m_uiCusader25Guid; - uint64 m_uiCusader26Guid; - uint64 m_uiCusader27Guid; - uint64 m_uiCusader28Guid; - uint64 m_uiCusader29Guid; - uint64 m_uiCusader2aGuid; - - uint64 m_uiCusader01Guid; - uint64 m_uiCusader02Guid; + uint64 m_uiCrusader11Guid; + uint64 m_uiCrusader12Guid; + uint64 m_uiCrusader13Guid; + uint64 m_uiCrusader14Guid; + uint64 m_uiCrusader15Guid; + uint64 m_uiCrusader16Guid; + uint64 m_uiCrusader17Guid; + uint64 m_uiCrusader18Guid; + uint64 m_uiCrusader19Guid; + uint64 m_uiCrusader1aGuid; + + uint64 m_uiCrusader21Guid; + uint64 m_uiCrusader22Guid; + uint64 m_uiCrusader23Guid; + uint64 m_uiCrusader24Guid; + uint64 m_uiCrusader25Guid; + uint64 m_uiCrusader26Guid; + uint64 m_uiCrusader27Guid; + uint64 m_uiCrusader28Guid; + uint64 m_uiCrusader29Guid; + uint64 m_uiCrusader2aGuid; + + uint64 m_uiCrusader01Guid; + uint64 m_uiCrusader02Guid; uint64 m_uiCrusadersCacheGUID; @@ -94,30 +94,30 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance case NPC_LIGHTBANE: m_uiLightbaneGUID = pCreature->GetGUID(); break; case NPC_ANUBARAK: m_uiAnubarakGUID = pCreature->GetGUID(); break; - case NPC_CRUSADER_1_1: m_uiCusader11Guid = pCreature->GetGUID(); break; - case NPC_CRUSADER_1_2: m_uiCusader12Guid = pCreature->GetGUID(); break; - case NPC_CRUSADER_1_3: m_uiCusader13Guid = pCreature->GetGUID(); break; - case NPC_CRUSADER_1_4: m_uiCusader14Guid = pCreature->GetGUID(); break; - case NPC_CRUSADER_1_5: m_uiCusader15Guid = pCreature->GetGUID(); break; - case NPC_CRUSADER_1_6: m_uiCusader16Guid = pCreature->GetGUID(); break; - case NPC_CRUSADER_1_7: m_uiCusader17Guid = pCreature->GetGUID(); break; - case NPC_CRUSADER_1_8: m_uiCusader18Guid = pCreature->GetGUID(); break; - case NPC_CRUSADER_1_9: m_uiCusader19Guid = pCreature->GetGUID(); break; - case NPC_CRUSADER_1_10: m_uiCusader1aGuid = pCreature->GetGUID(); break; - - case NPC_CRUSADER_2_1: m_uiCusader21Guid = pCreature->GetGUID(); break; - case NPC_CRUSADER_2_2: m_uiCusader22Guid = pCreature->GetGUID(); break; - case NPC_CRUSADER_2_3: m_uiCusader23Guid = pCreature->GetGUID(); break; - case NPC_CRUSADER_2_4: m_uiCusader24Guid = pCreature->GetGUID(); break; - case NPC_CRUSADER_2_5: m_uiCusader25Guid = pCreature->GetGUID(); break; - case NPC_CRUSADER_2_6: m_uiCusader26Guid = pCreature->GetGUID(); break; - case NPC_CRUSADER_2_7: m_uiCusader27Guid = pCreature->GetGUID(); break; - case NPC_CRUSADER_2_8: m_uiCusader28Guid = pCreature->GetGUID(); break; - case NPC_CRUSADER_2_9: m_uiCusader29Guid = pCreature->GetGUID(); break; - case NPC_CRUSADER_2_10: m_uiCusader2aGuid = pCreature->GetGUID(); break; - - case NPC_CRUSADER_0_1: m_uiCusader01Guid = pCreature->GetGUID(); break; - case NPC_CRUSADER_0_2: m_uiCusader02Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_1_1: m_uiCrusader11Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_1_2: m_uiCrusader12Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_1_3: m_uiCrusader13Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_1_4: m_uiCrusader14Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_1_5: m_uiCrusader15Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_1_6: m_uiCrusader16Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_1_7: m_uiCrusader17Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_1_8: m_uiCrusader18Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_1_9: m_uiCrusader19Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_1_10: m_uiCrusader1aGuid = pCreature->GetGUID(); break; + + case NPC_CRUSADER_2_1: m_uiCrusader21Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_2_2: m_uiCrusader22Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_2_3: m_uiCrusader23Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_2_4: m_uiCrusader24Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_2_5: m_uiCrusader25Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_2_6: m_uiCrusader26Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_2_7: m_uiCrusader27Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_2_8: m_uiCrusader28Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_2_9: m_uiCrusader29Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_2_10: m_uiCrusader2aGuid = pCreature->GetGUID(); break; + + case NPC_CRUSADER_0_1: m_uiCrusader01Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_0_2: m_uiCrusader02Guid = pCreature->GetGUID(); break; } } @@ -156,7 +156,7 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance if (GameObject* pChest = instance->GetGameObject(m_uiCrusadersCacheGUID)) if (pChest && !pChest->isSpawned()) { pChest->SetRespawnTime(DAY); - pChest->SetGoState(GO_STATE_ACTIVE); +// pChest->SetGoState(GO_STATE_ACTIVE); }; }; break; @@ -194,30 +194,30 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance case NPC_LIGHTBANE: return m_uiLightbaneGUID; case NPC_ANUBARAK: return m_uiAnubarakGUID; - case NPC_CRUSADER_1_1: return m_uiCusader11Guid; - case NPC_CRUSADER_1_2: return m_uiCusader12Guid; - case NPC_CRUSADER_1_3: return m_uiCusader13Guid; - case NPC_CRUSADER_1_4: return m_uiCusader14Guid; - case NPC_CRUSADER_1_5: return m_uiCusader15Guid; - case NPC_CRUSADER_1_6: return m_uiCusader16Guid; - case NPC_CRUSADER_1_7: return m_uiCusader17Guid; - case NPC_CRUSADER_1_8: return m_uiCusader18Guid; - case NPC_CRUSADER_1_9: return m_uiCusader19Guid; - case NPC_CRUSADER_1_10: return m_uiCusader1aGuid; - - case NPC_CRUSADER_2_1: return m_uiCusader21Guid; - case NPC_CRUSADER_2_2: return m_uiCusader22Guid; - case NPC_CRUSADER_2_3: return m_uiCusader23Guid; - case NPC_CRUSADER_2_4: return m_uiCusader24Guid; - case NPC_CRUSADER_2_5: return m_uiCusader25Guid; - case NPC_CRUSADER_2_6: return m_uiCusader26Guid; - case NPC_CRUSADER_2_7: return m_uiCusader27Guid; - case NPC_CRUSADER_2_8: return m_uiCusader28Guid; - case NPC_CRUSADER_2_9: return m_uiCusader29Guid; - case NPC_CRUSADER_2_10: return m_uiCusader2aGuid; - - case NPC_CRUSADER_0_1: return m_uiCusader01Guid; - case NPC_CRUSADER_0_2: return m_uiCusader02Guid; + case NPC_CRUSADER_1_1: return m_uiCrusader11Guid; + case NPC_CRUSADER_1_2: return m_uiCrusader12Guid; + case NPC_CRUSADER_1_3: return m_uiCrusader13Guid; + case NPC_CRUSADER_1_4: return m_uiCrusader14Guid; + case NPC_CRUSADER_1_5: return m_uiCrusader15Guid; + case NPC_CRUSADER_1_6: return m_uiCrusader16Guid; + case NPC_CRUSADER_1_7: return m_uiCrusader17Guid; + case NPC_CRUSADER_1_8: return m_uiCrusader18Guid; + case NPC_CRUSADER_1_9: return m_uiCrusader19Guid; + case NPC_CRUSADER_1_10: return m_uiCrusader1aGuid; + + case NPC_CRUSADER_2_1: return m_uiCrusader21Guid; + case NPC_CRUSADER_2_2: return m_uiCrusader22Guid; + case NPC_CRUSADER_2_3: return m_uiCrusader23Guid; + case NPC_CRUSADER_2_4: return m_uiCrusader24Guid; + case NPC_CRUSADER_2_5: return m_uiCrusader25Guid; + case NPC_CRUSADER_2_6: return m_uiCrusader26Guid; + case NPC_CRUSADER_2_7: return m_uiCrusader27Guid; + case NPC_CRUSADER_2_8: return m_uiCrusader28Guid; + case NPC_CRUSADER_2_9: return m_uiCrusader29Guid; + case NPC_CRUSADER_2_10: return m_uiCrusader2aGuid; + + case NPC_CRUSADER_0_1: return m_uiCrusader01Guid; + case NPC_CRUSADER_0_2: return m_uiCrusader02Guid; } return 0; @@ -233,6 +233,9 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance case TYPE_CRUSADERS: return m_auiEncounter[3]; case TYPE_FROJA: return m_auiEncounter[4]; case TYPE_ANUBARAK: return m_auiEncounter[5]; + case TYPE_DIFFICULTY: + if (Difficulty == RAID_DIFFICULTY_25MAN_NORMAL || Difficulty == RAID_DIFFICULTY_25MAN_HEROIC) return 25; + else return 10; } return 0; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index d81efb3ea..80309be7d 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -57,10 +57,12 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI } ScriptedInstance* m_pInstance; + bool flag25; void Reset() { m_pInstance->SetData(TYPE_STAGE,0); + flag25 = true; } void UpdateAI(const uint32 diff) @@ -87,10 +89,12 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_DREADSCALE))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->SetInCombatWithZone(); } if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_ACIDMAW))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->SetInCombatWithZone(); } } break; @@ -107,6 +111,7 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_ICEHOWL))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->SetInCombatWithZone(); } } break; @@ -123,6 +128,7 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_JARAXXUS))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->SetInCombatWithZone(); } } break; @@ -135,8 +141,22 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI Creature* pTemp4 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_1_4)); Creature* pTemp5 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_1_5)); Creature* pTemp6 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_1_6)); + if (m_pInstance->GetData(TYPE_DIFFICULTY) == 25) { + Creature* pTemp7 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_1_7)); + Creature* pTemp8 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_1_8)); + Creature* pTemp9 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_1_9)); + Creature* pTemp10 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_1_10)); + Creature* pTemp11 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_0_1)); + Creature* pTemp12 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_0_1)); + if (pTemp7 && pTemp8 && pTemp9 && pTemp10 && pTemp11 && pTemp12) { + if (!pTemp7->isAlive() && !pTemp8->isAlive() && !pTemp9->isAlive() && !pTemp10->isAlive() && !pTemp11->isAlive() && !pTemp12->isAlive()) + flag25 = true; + else flag25 = false; + } + } else flag25 = true; + if (pTemp1 && pTemp2 && pTemp3 && pTemp4 && pTemp5 && pTemp6) { - if (!pTemp1->isAlive() && !pTemp2->isAlive() && !pTemp3->isAlive() && !pTemp4->isAlive() && !pTemp5->isAlive() && !pTemp6->isAlive()) { + if (!pTemp1->isAlive() && !pTemp2->isAlive() && !pTemp3->isAlive() && !pTemp4->isAlive() && !pTemp5->isAlive() && !pTemp6->isAlive() && flag25) { m_pInstance->SetData(TYPE_STAGE,0); m_pInstance->SetData(TYPE_CRUSADERS,DONE); } @@ -151,8 +171,22 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI Creature* pTemp4 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_2_4)); Creature* pTemp5 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_2_5)); Creature* pTemp6 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_2_6)); + if (m_pInstance->GetData(TYPE_DIFFICULTY) == 25) { + Creature* pTemp7 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_2_7)); + Creature* pTemp8 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_2_8)); + Creature* pTemp9 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_2_9)); + Creature* pTemp10 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_2_10)); + Creature* pTemp11 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_0_1)); + Creature* pTemp12 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_0_1)); + if (pTemp7 && pTemp8 && pTemp9 && pTemp10 && pTemp11 && pTemp12) { + if (!pTemp7->isAlive() && !pTemp8->isAlive() && !pTemp9->isAlive() && !pTemp10->isAlive() && !pTemp11->isAlive() && !pTemp12->isAlive()) + flag25 = true; + else flag25 = false; + } + } else flag25 = true; + if (pTemp1 && pTemp2 && pTemp3 && pTemp4 && pTemp5 && pTemp6) { - if (!pTemp1->isAlive() && !pTemp2->isAlive() && !pTemp3->isAlive() && !pTemp4->isAlive() && !pTemp5->isAlive() && !pTemp6->isAlive()) { + if (!pTemp1->isAlive() && !pTemp2->isAlive() && !pTemp3->isAlive() && !pTemp4->isAlive() && !pTemp5->isAlive() && !pTemp6->isAlive() && flag25) { m_pInstance->SetData(TYPE_STAGE,0); m_pInstance->SetData(TYPE_CRUSADERS,DONE); } @@ -232,6 +266,7 @@ switch(uiAction) { if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_GORMOK))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->SetInCombatWithZone(); } } break; @@ -247,6 +282,7 @@ switch(uiAction) { if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_JARAXXUS))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->SetInCombatWithZone(); } } break; @@ -262,6 +298,7 @@ switch(uiAction) { if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_1))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->SetInCombatWithZone(); } } if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_2))) @@ -271,6 +308,7 @@ switch(uiAction) { if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_2))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->SetInCombatWithZone(); } } if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_3))) @@ -280,6 +318,7 @@ switch(uiAction) { if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_3))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->SetInCombatWithZone(); } } if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_4))) @@ -289,6 +328,7 @@ switch(uiAction) { if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_4))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->SetInCombatWithZone(); } } if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_5))) @@ -298,6 +338,7 @@ switch(uiAction) { if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_5))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->SetInCombatWithZone(); } } if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_6))) @@ -307,8 +348,71 @@ switch(uiAction) { if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_6))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->SetInCombatWithZone(); } } + if (m_pInstance->GetData(TYPE_DIFFICULTY) == 25) { + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_7))) + pTemp->Respawn(); + else { + pCreature->SummonCreature(NPC_CRUSADER_1_7, SpawnLoc[9].x, SpawnLoc[9].y, SpawnLoc[9].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_7))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->SetInCombatWithZone(); + } + } + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_8))) + pTemp->Respawn(); + else { + pCreature->SummonCreature(NPC_CRUSADER_1_8, SpawnLoc[10].x, SpawnLoc[10].y, SpawnLoc[10].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_8))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->SetInCombatWithZone(); + } + } + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_9))) + pTemp->Respawn(); + else { + pCreature->SummonCreature(NPC_CRUSADER_1_9, SpawnLoc[11].x, SpawnLoc[11].y, SpawnLoc[11].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_9))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->SetInCombatWithZone(); + } + } + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_10))) + pTemp->Respawn(); + else { + pCreature->SummonCreature(NPC_CRUSADER_1_10, SpawnLoc[12].x, SpawnLoc[12].y, SpawnLoc[12].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_10))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->SetInCombatWithZone(); + } + } + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_0_1))) + pTemp->Respawn(); + else { + pCreature->SummonCreature(NPC_CRUSADER_0_1, SpawnLoc[13].x, SpawnLoc[13].y, SpawnLoc[13].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_0_1))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->SetInCombatWithZone(); + } + } + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_0_2))) + pTemp->Respawn(); + else { + pCreature->SummonCreature(NPC_CRUSADER_0_2, SpawnLoc[14].x, SpawnLoc[14].y, SpawnLoc[14].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_0_2))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->SetInCombatWithZone(); + } + } + } break; }; @@ -322,6 +426,7 @@ switch(uiAction) { if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_1))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->SetInCombatWithZone(); } } if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_2))) @@ -331,6 +436,7 @@ switch(uiAction) { if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_2))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->SetInCombatWithZone(); } } if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_3))) @@ -340,6 +446,7 @@ switch(uiAction) { if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_3))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->SetInCombatWithZone(); } } if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_4))) @@ -349,6 +456,7 @@ switch(uiAction) { if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_4))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->SetInCombatWithZone(); } } if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_5))) @@ -358,6 +466,7 @@ switch(uiAction) { if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_5))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->SetInCombatWithZone(); } } if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_6))) @@ -367,8 +476,71 @@ switch(uiAction) { if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_6))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->SetInCombatWithZone(); } } + if (m_pInstance->GetData(TYPE_DIFFICULTY) == 25) { + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_7))) + pTemp->Respawn(); + else { + pCreature->SummonCreature(NPC_CRUSADER_2_7, SpawnLoc[9].x, SpawnLoc[9].y, SpawnLoc[9].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_7))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->SetInCombatWithZone(); + } + } + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_8))) + pTemp->Respawn(); + else { + pCreature->SummonCreature(NPC_CRUSADER_2_8, SpawnLoc[10].x, SpawnLoc[10].y, SpawnLoc[10].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_8))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->SetInCombatWithZone(); + } + } + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_9))) + pTemp->Respawn(); + else { + pCreature->SummonCreature(NPC_CRUSADER_2_9, SpawnLoc[11].x, SpawnLoc[11].y, SpawnLoc[11].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_9))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->SetInCombatWithZone(); + } + } + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_10))) + pTemp->Respawn(); + else { + pCreature->SummonCreature(NPC_CRUSADER_2_10, SpawnLoc[12].x, SpawnLoc[12].y, SpawnLoc[12].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_10))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->SetInCombatWithZone(); + } + } + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_0_1))) + pTemp->Respawn(); + else { + pCreature->SummonCreature(NPC_CRUSADER_0_1, SpawnLoc[13].x, SpawnLoc[13].y, SpawnLoc[13].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_0_1))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->SetInCombatWithZone(); + } + } + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_0_2))) + pTemp->Respawn(); + else { + pCreature->SummonCreature(NPC_CRUSADER_0_2, SpawnLoc[14].x, SpawnLoc[14].y, SpawnLoc[14].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_0_2))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->SetInCombatWithZone(); + } + } + } break; }; @@ -382,6 +554,7 @@ switch(uiAction) { if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_LIGHTBANE))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->SetInCombatWithZone(); } } if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_DARKBANE))) @@ -391,6 +564,7 @@ switch(uiAction) { if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_DARKBANE))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->SetInCombatWithZone(); } } break; @@ -406,6 +580,7 @@ switch(uiAction) { if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_ANUBARAK))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->SetInCombatWithZone(); } } break; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index 024ad88e7..d36e3bae6 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -44,19 +44,21 @@ enum NPC_DARKBANE = 34496, NPC_ANUBARAK = 34564, - - GO_CRUSADERS_CACHE_10 = 73111, - GO_CRUSADERS_CACHE_25 = 73112, - GO_CRUSADERS_CACHE_10_H = 73113, - GO_CRUSADERS_CACHE_25_H = 73114, - + + GO_CRUSADERS_CACHE_10 = 195631, + GO_CRUSADERS_CACHE_25 = 195632, + GO_CRUSADERS_CACHE_10_H = 195633, + GO_CRUSADERS_CACHE_25_H = 195635, + TYPE_STAGE = 0, TYPE_BEASTS = 1, TYPE_JARAXXUS = 2, TYPE_CRUSADERS = 3, TYPE_FROJA = 4, TYPE_ANUBARAK = 5, - + + TYPE_DIFFICULTY = 101, + DESPAWN_TIME = 300000 }; @@ -76,8 +78,16 @@ static Locations SpawnLoc[]= {545.914185, 180.859543, 395.137909}, // 4 {599.042358, 179.260727, 395.137146}, // 5 {532.248901, 180.331955, 395.132658}, // 6 - {516.633972, 159.391708, 395.137543}, // 7 - {612.816956, 161.477921, 395.136810}, // 8 + {586.342285, 181.515823, 395.135956}, // 7 + {539.239929, 181.825577, 395.137909}, // 8 + {599.042358, 179.260727, 395.137146}, // 9 + {588.720581, 183.015472, 395.132658}, // 10 + {551.534119, 184.214478, 395.139526}, // 11 + {576.231201, 183.941071, 395.139526}, // 12 + {552.811610, 171.985779, 394.671661}, // 13 + {575.641724, 170.351501, 394.659943}, // 14 + {516.633972, 159.391708, 395.137543}, // 15 + {612.816956, 161.477921, 395.136810}, // 16 }; #endif From ab33a4d8a59f9f5421be8ab8ce5b5da178fd209f Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Fri, 5 Feb 2010 17:17:18 +0300 Subject: [PATCH 130/405] Trial of crusader part 4 --- Makefile.am | 2 +- addition/721_icecrown_mangos.sql | 2 +- addition/724_trial_of_crusader_mangos.sql | 171 ++++++++++++++++-- .../spire/boss_lord_marrogwar.cpp | 52 ------ .../spire/boss_lord_marrowgar.cpp | 125 +++++++++++++ .../icecrown_citadel/spire/def_spire.h | 4 +- .../spire/instance_icecrown_spire.cpp | 8 +- system/ScriptLoader.cpp | 4 +- 8 files changed, 293 insertions(+), 75 deletions(-) delete mode 100644 scripts/northrend/icecrown_citadel/spire/boss_lord_marrogwar.cpp create mode 100644 scripts/northrend/icecrown_citadel/spire/boss_lord_marrowgar.cpp diff --git a/Makefile.am b/Makefile.am index 58e95311d..f5aac18c9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -519,7 +519,7 @@ scripts/northrend/icecrown_citadel/spire/icecrown_teleport.cpp \ scripts/northrend/icecrown_citadel/spire/instance_icecrown_spire.cpp \ scripts/northrend/icecrown_citadel/spire/boss_deathbringer_saurfang.cpp \ scripts/northrend/icecrown_citadel/spire/boss_lady_deathwhisper.cpp \ -scripts/northrend/icecrown_citadel/spire/boss_lord_marrogwar.cpp \ +scripts/northrend/icecrown_citadel/spire/boss_lord_marrowgar.cpp \ scripts/northrend/icecrown_citadel/forge_of_souls/instance_forge_of_souls.cpp \ scripts/northrend/icecrown_citadel/forge_of_souls/boss_devourer_of_souls.cpp \ scripts/northrend/icecrown_citadel/forge_of_souls/boss_bronjahm.cpp \ diff --git a/addition/721_icecrown_mangos.sql b/addition/721_icecrown_mangos.sql index 0d69078b4..7073a5396 100644 --- a/addition/721_icecrown_mangos.sql +++ b/addition/721_icecrown_mangos.sql @@ -39,5 +39,5 @@ UPDATE `instance_template` SET `script`='instance_icecrown_spire' WHERE `map`=63 -- UPDATE `creature_template` SET `ScriptName`='boss_lady_deathwhisper' WHERE `entry`=36855; -- UPDATE `creature_template` SET `ScriptName`='boss_deathbringer_saurfang' WHERE `entry`=37813; --- UPDATE `creature_template` SET `ScriptName`='boss_lord_marrogwar' WHERE `entry`=36612; +UPDATE `creature_template` SET `ScriptName`='boss_lord_marrowgar' WHERE `entry`= 36612; diff --git a/addition/724_trial_of_crusader_mangos.sql b/addition/724_trial_of_crusader_mangos.sql index 2171eab0e..8bc9ac403 100644 --- a/addition/724_trial_of_crusader_mangos.sql +++ b/addition/724_trial_of_crusader_mangos.sql @@ -1,19 +1,11 @@ + -- instance UPDATE `instance_template` SET `script`='instance_trial_of_the_crusader' WHERE `map`=649; - --- announcers -UPDATE `creature_template` SET `npcflag`=1, `scriptname`='npc_toc_announcer' WHERE `entry`=34816; - DELETE FROM `creature` WHERE `map` = 649 AND `id` IN (34797,34796,34799,35144,34780,34460,34463,34461,34471,34475,34472,34453,34455,34458,34454,34451,34456,34497,34496,34564,34467,35465,34468,35610,34473,34474,34441,34449,34448,34450); -UPDATE `creature_template` SET `lootid`= 0 WHERE `entry` IN -(34797,34796,34799,35144,34780,34460,34463,34461,34471,34475,34472,34453,34455,34458,34454,34451,34456,34497,34496,34564,34467,35465,34468,35610,34473,34474,34441,34449,34448,34450); - -DELETE FROM `creature_loot_template` WHERE `entry` IN -(34797,34796,34799,35144,34780,34460,34463,34461,34471,34475,34472,34453,34455,34458,34454,34451,34456,34497,34496,34564,34467,35465,34468,35610,34473,34474,34441,34449,34448,34450); - - +-- announcers +UPDATE `creature_template` SET `npcflag`=1, `scriptname`='npc_toc_announcer' WHERE `entry`=34816; -- grand crusaders -- UPDATE `creature_template` SET `scriptname`='mob_toc_warrior' WHERE entry IN (); @@ -30,20 +22,173 @@ DELETE FROM `creature_loot_template` WHERE `entry` IN -- UPDATE `creature_template` SET `scriptname`='mob_toc_pet_cat' WHERE `entry` = 35465; -- UPDATE `creature_template` SET `scriptname`='mob_toc_pet_dog' WHERE `entry` = 35610; +UPDATE `creature_template` SET `lootid`= 0 WHERE `entry` IN +(34460,34463,34461,34471,34475,34472,34453,34455,34458,34454,34451,34456,34467,35465,34468,35610,34473,34474,34441,34449,34448,34450); +UPDATE `creature_template` SET `lootid`= 0 WHERE `entry` IN +(12266,12209,12212,12281,12190,12284,12269,12272,12229,12187,12091,12088,12169,12103,12106,12112,12166,12163,12175,12183,12303,12300); +UPDATE `creature_template` SET `lootid`= 0 WHERE `entry` IN +(12267,12210,12213,12282,12191,12285,12270,12273,12230,12188,12092,12089,12170,12104,12107,12113,12167,12164,12181,12184,12304,12301); +UPDATE `creature_template` SET `lootid`= 0 WHERE `entry` IN +(12268,12211,12214,12283,12192,12286,12271,12274,12231,12189,12093,12090,12171,12105,12108,12114,12168,12165,12182,12185,12305,12302); + +-- N10 +DELETE FROM `creature_loot_template` WHERE `entry` IN +(34460,34463,34461,34471,34475,34472,34453,34455,34458,34454,34451,34456,34467,35465,34468,35610,34473,34474,34441,34449,34448,34450); +-- H10 +DELETE FROM `creature_loot_template` WHERE `entry` IN +(12266,12209,12212,12281,12190,12284,12269,12272,12229,12187,12091,12088,12169,12103,12106,12112,12166,12163,12175,12183,12303,12300); +-- N25 +DELETE FROM `creature_loot_template` WHERE `entry` IN +(12267,12210,12213,12282,12191,12285,12270,12273,12230,12188,12092,12089,12170,12104,12107,12113,12167,12164,12181,12184,12304,12301); +-- H25 +DELETE FROM `creature_loot_template` WHERE `entry` IN +(12268,12211,12214,12283,12192,12286,12271,12274,12231,12189,12093,12090,12171,12105,12108,12114,12168,12165,12182,12185,12305,12302); + -- Nortrend beasts -- UPDATE creature_template SET scriptname='boss_gormok' WHERE entry=34796; -- UPDATE creature_template SET scriptname='boss_dreadscale' WHERE entry=34799; -- UPDATE creature_template SET scriptname='boss_acidmaw' WHERE entry=35144; -- UPDATE creature_template SET scriptname='boss_icehowl' WHERE entry=34797; +UPDATE `creature_template` SET `lootid`= 0 WHERE `entry` IN +(34796,34799,35144); +DELETE FROM `creature_loot_template` WHERE `entry` IN +(34796,34799,35144); + +INSERT IGNORE INTO `creature_loot_template` (`entry`, `item`, `ChanceOrQuestChance`, `groupid`, `mincountOrRef`, `maxcount`, `lootcondition`, `condition_value1`, `condition_value2`) VALUES +(34797, 47241, 100, 0, 3, 3, 0, 0, 0), +(34797, 47578, 0, 2, 1, 1, 6, 469, 0), +(34797, 47607, 0, 2, 1, 1, 6, 469, 0), +(34797, 47608, 0, 2, 1, 1, 6, 469, 0), +(34797, 47609, 0, 1, 1, 1, 6, 469, 0), +(34797, 47611, 0, 1, 1, 1, 6, 469, 0), +(34797, 47612, 0, 1, 1, 1, 6, 469, 0), +(34797, 47613, 0, 2, 1, 1, 6, 469, 0), +(34797, 47614, 0, 1, 1, 1, 6, 469, 0), +(34797, 47615, 0, 1, 1, 1, 6, 469, 0), +(34797, 47616, 0, 2, 1, 1, 6, 469, 0), +(34797, 47617, 0, 2, 1, 1, 6, 469, 0), +(34797, 47849, 0, 4, 1, 1, 6, 67, 0), +(34797, 47850, 0, 3, 1, 1, 6, 67, 0), +(34797, 47851, 0, 3, 1, 1, 6, 67, 0), +(34797, 47852, 0, 3, 1, 1, 6, 67, 0), +(34797, 47853, 0, 4, 1, 1, 6, 67, 0), +(34797, 47854, 0, 4, 1, 1, 6, 67, 0), +(34797, 47855, 0, 4, 1, 1, 6, 67, 0), +(34797, 47856, 0, 3, 1, 1, 6, 67, 0), +(34797, 47857, 0, 4, 1, 1, 6, 67, 0), +(34797, 47858, 0, 3, 1, 1, 6, 67, 0), +(34797, 47859, 0, 3, 1, 1, 6, 67, 0), +(34797, 47860, 0, 4, 1, 1, 6, 67, 0); +UPDATE `creature_template` SET `lootid` = 34797 WHERE `entry` = 34797; + -- Jaraxxus -- UPDATE creature_template SET scriptname='boss_jaraxxus' WHERE entry=34780; +INSERT IGNORE INTO `creature_loot_template` (`entry`, `item`, `ChanceOrQuestChance`, `groupid`, `mincountOrRef`, `maxcount`, `lootcondition`, `condition_value1`, `condition_value2`) VALUES +(34780, 47241, 100, 0, 3, 3, 0, 0, 0), +(34780, 47618, 0, 2, 1, 1, 6, 469, 0), +(34780, 47619, 0, 2, 1, 1, 6, 469, 0), +(34780, 47620, 0, 2, 1, 1, 6, 469, 0), +(34780, 47621, 0, 1, 1, 1, 6, 469, 0), +(34780, 47663, 0, 2, 1, 1, 6, 469, 0), +(34780, 47669, 0, 2, 1, 1, 6, 469, 0), +(34780, 47676, 0, 1, 1, 1, 6, 469, 0), +(34780, 47679, 0, 2, 1, 1, 6, 469, 0), +(34780, 47680, 0, 1, 1, 1, 6, 469, 0), +(34780, 47683, 0, 1, 1, 1, 6, 469, 0), +(34780, 47703, 0, 2, 1, 1, 6, 469, 0), +(34780, 47711, 0, 1, 1, 1, 6, 469, 0), +(34780, 47861, 0, 4, 1, 1, 6, 67, 0), +(34780, 47862, 0, 4, 1, 1, 6, 67, 0), +(34780, 47863, 0, 4, 1, 1, 6, 67, 0), +(34780, 47864, 0, 4, 1, 1, 6, 67, 0), +(34780, 47865, 0, 4, 1, 1, 6, 67, 0), +(34780, 47866, 0, 3, 1, 1, 6, 67, 0), +(34780, 47867, 0, 3, 1, 1, 6, 67, 0), +(34780, 47868, 0, 4, 1, 1, 6, 67, 0), +(34780, 47869, 0, 3, 1, 1, 6, 67, 0), +(34780, 47870, 0, 3, 1, 1, 6, 67, 0), +(34780, 47871, 0, 3, 1, 1, 6, 67, 0), +(34780, 47872, 0, 4, 1, 1, 6, 67, 0), +(34780, 49235, 0, 1, 1, 1, 6, 469, 0), +(34780, 49236, 0, 3, 1, 1, 6, 67, 0); +UPDATE `creature_template` SET `lootid` = 34780 WHERE `entry` = 34780; + -- Froja's -- UPDATE creature_template SET scriptname='boss_lightbane' WHERE entry=34497; -- UPDATE creature_template SET scriptname='boss_darkbane' WHERE entry=34496; +INSERT IGNORE INTO `creature_loot_template` (`entry`, `item`, `ChanceOrQuestChance`, `groupid`, `mincountOrRef`, `maxcount`, `lootcondition`, `condition_value1`, `condition_value2`) VALUES +(34497, 47241, 100, 0, 3, 3, 0, 0, 0), +(34497, 47700, 0, 1, 1, 1, 6, 469, 0), +(34497, 47736, 0, 1, 1, 1, 6, 469, 0), +(34497, 47737, 0, 1, 1, 1, 6, 469, 0), +(34497, 47738, 0, 2, 1, 1, 6, 67, 0), +(34497, 47739, 0, 1, 1, 1, 6, 469, 0), +(34497, 47740, 0, 1, 1, 1, 6, 469, 0), +(34497, 47883, 0, 2, 1, 1, 6, 67, 0), +(34497, 47884, 0, 2, 1, 1, 6, 67, 0), +(34497, 47885, 0, 1, 1, 1, 6, 469, 0), +(34497, 47886, 0, 2, 1, 1, 6, 67, 0), +(34497, 47887, 0, 2, 1, 1, 6, 67, 0), +(34497, 47888, 0, 2, 1, 1, 6, 67, 0); +UPDATE `creature_template` SET `lootid` = 34497 WHERE `entry` = 34497; + +INSERT IGNORE INTO `creature_loot_template` (`entry`, `item`, `ChanceOrQuestChance`, `groupid`, `mincountOrRef`, `maxcount`, `lootcondition`, `condition_value1`, `condition_value2`) VALUES +(34496, 47241, 100, 0, 3, 3, 0, 0, 0), +(34496, 47742, 0, 1, 1, 1, 6, 469, 0), +(34496, 47743, 0, 1, 1, 1, 6, 469, 0), +(34496, 47744, 0, 1, 1, 1, 6, 469, 0), +(34496, 47745, 0, 2, 1, 1, 6, 67, 0), +(34496, 47746, 0, 1, 1, 1, 6, 469, 0), +(34496, 47747, 0, 1, 1, 1, 6, 469, 0), +(34496, 47889, 0, 1, 1, 1, 6, 469, 0), +(34496, 47890, 0, 2, 1, 1, 6, 67, 0), +(34496, 47891, 0, 2, 1, 1, 6, 67, 0), +(34496, 47892, 0, 2, 1, 1, 6, 67, 0), +(34496, 47893, 0, 2, 1, 1, 6, 67, 0), +(34496, 49231, 0, 2, 1, 1, 6, 67, 0), +(34496, 49232, 0, 1, 1, 1, 6, 469, 0); +UPDATE `creature_template` SET `lootid` = 34496 WHERE `entry` = 34496; -- Anub'arak -- UPDATE creature_template SET scriptname='boss_anubarak' WHERE entry=34564; - - +INSERT IGNORE INTO `creature_loot_template` (`entry`, `item`, `ChanceOrQuestChance`, `groupid`, `mincountOrRef`, `maxcount`, `lootcondition`, `condition_value1`, `condition_value2`) VALUES +(34564, 47241, 100, 0, 3, 3, 0, 0, 0), +(34564, 47741, 0, 1, 1, 1, 6, 469, 0), +(34564, 47808, 0, 1, 1, 1, 6, 469, 0), +(34564, 47809, 0, 1, 1, 1, 6, 469, 0), +(34564, 47810, 0, 2, 1, 1, 6, 469, 0), +(34564, 47811, 0, 3, 1, 1, 6, 469, 0), +(34564, 47812, 0, 1, 1, 1, 6, 469, 0), +(34564, 47813, 0, 3, 1, 1, 6, 469, 0), +(34564, 47814, 0, 2, 1, 1, 6, 469, 0), +(34564, 47815, 0, 2, 1, 1, 6, 469, 0), +(34564, 47816, 0, 1, 1, 1, 6, 469, 0), +(34564, 47829, 0, 3, 1, 1, 6, 469, 0), +(34564, 47830, 0, 2, 1, 1, 6, 469, 0), +(34564, 47832, 0, 3, 1, 1, 6, 469, 0), +(34564, 47834, 0, 1, 1, 1, 6, 469, 0), +(34564, 47835, 0, 2, 1, 1, 6, 469, 0), +(34564, 47836, 0, 2, 1, 1, 6, 469, 0), +(34564, 47837, 0, 3, 1, 1, 6, 469, 0), +(34564, 47838, 0, 3, 1, 1, 6, 469, 0), +(34564, 47894, 0, 4, 1, 1, 6, 67, 0), +(34564, 47895, 0, 4, 1, 1, 6, 67, 0), +(34564, 47896, 0, 6, 1, 1, 6, 67, 0), +(34564, 47897, 0, 6, 1, 1, 6, 67, 0), +(34564, 47898, 0, 4, 1, 1, 6, 67, 0), +(34564, 47899, 0, 5, 1, 1, 6, 67, 0), +(34564, 47900, 0, 5, 1, 1, 6, 67, 0), +(34564, 47901, 0, 6, 1, 1, 6, 67, 0), +(34564, 47902, 0, 5, 1, 1, 6, 67, 0), +(34564, 47903, 0, 5, 1, 1, 6, 67, 0), +(34564, 47904, 0, 6, 1, 1, 6, 67, 0), +(34564, 47905, 0, 4, 1, 1, 6, 67, 0), +(34564, 47906, 0, 6, 1, 1, 6, 67, 0), +(34564, 47907, 0, 4, 1, 1, 6, 67, 0), +(34564, 47908, 0, 5, 1, 1, 6, 67, 0), +(34564, 47909, 0, 6, 1, 1, 6, 67, 0), +(34564, 47910, 0, 5, 1, 1, 6, 67, 0), +(34564, 47911, 0, 4, 1, 1, 6, 67, 0); +UPDATE `creature_template` SET `lootid` = 34564 WHERE `entry` = 34564; diff --git a/scripts/northrend/icecrown_citadel/spire/boss_lord_marrogwar.cpp b/scripts/northrend/icecrown_citadel/spire/boss_lord_marrogwar.cpp deleted file mode 100644 index 7c97309df..000000000 --- a/scripts/northrend/icecrown_citadel/spire/boss_lord_marrogwar.cpp +++ /dev/null @@ -1,52 +0,0 @@ -#include "precompiled.h" -#include "def_spire.h" - -struct MANGOS_DLL_DECL boss_lord_marrogwarAI : public ScriptedAI -{ - boss_lord_marrogwarAI(Creature* pCreature) : ScriptedAI(pCreature) - { - pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Regular = pCreature->GetMap()->IsRegularDifficulty(); - Reset(); - } - - bool Regular; - ScriptedInstance *pInstance; - - void Reset() - { - if(pInstance) pInstance->SetData(TYPE_MARROGWAR, NOT_STARTED); - } - - void Aggro(Unit *who) - { - if(pInstance) pInstance->SetData(TYPE_MARROGWAR, IN_PROGRESS); - } - - void JustDied(Unit *killer) - { - if(pInstance) pInstance->SetData(TYPE_MARROGWAR, DONE); - } - - void UpdateAI(const uint32 diff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_boss_lord_marrogwar(Creature* pCreature) -{ - return new boss_lord_marrogwarAI(pCreature); -} - -void AddSC_boss_lord_marrogwar() -{ - Script *newscript; - newscript = new Script; - newscript->Name = "boss_lord_marrogwar"; - newscript->GetAI = &GetAI_boss_lord_marrogwar; - newscript->RegisterSelf(); -} diff --git a/scripts/northrend/icecrown_citadel/spire/boss_lord_marrowgar.cpp b/scripts/northrend/icecrown_citadel/spire/boss_lord_marrowgar.cpp new file mode 100644 index 000000000..7d3fa15a9 --- /dev/null +++ b/scripts/northrend/icecrown_citadel/spire/boss_lord_marrowgar.cpp @@ -0,0 +1,125 @@ +#include "precompiled.h" +#include "def_spire.h" +enum +{ + //common + SPELL_BERSERK = 47008, + //yells + //summons + //Abilities + SPELL_SABER_LASH_N = 71021, + SPELL_COLD_FLAME_N = 69146, + SPELL_BONE_STRIKE_N = 69057, + SPELL_BONE_STORM_N = 69076, + + SPELL_SABER_LASH_H = 70814, + SPELL_COLD_FLAME_H = 70825, + SPELL_BONE_STRIKE_H = 69057, + SPELL_BONE_STORM_H = 69076, +}; + +struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI +{ + boss_lord_marrowgarAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Regular = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + bool Regular; + ScriptedInstance *pInstance; + uint8 stage; + uint32 m_uiSaberLash_Timer; + uint32 m_uiColdFlame_Timer; + uint32 m_uiBoneStrike_Timer; + bool m_uiBoneStorm_Timer; + uint32 m_uiBerserk_Timer; + uint8 health; + + void Reset() + { + stage = 0; + health = 100; + m_uiSaberLash_Timer = 10000; + m_uiColdFlame_Timer = 25000; + m_uiBoneStrike_Timer = urand(17000,29000); + m_uiBoneStorm_Timer = false; + m_uiBerserk_Timer = 600000; + + if(pInstance) pInstance->SetData(TYPE_MARROWGAR, NOT_STARTED); + } + + void Aggro(Unit *who) + { + if(pInstance) pInstance->SetData(TYPE_MARROWGAR, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_MARROWGAR, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + switch(stage) + { + case 0: { + if (m_uiBoneStrike_Timer < diff) + { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, Regular ? SPELL_BONE_STRIKE_N :SPELL_BONE_STRIKE_H); + m_uiBoneStrike_Timer=urand(17000,29000); + } else m_uiSaberLash_Timer -= diff; + break;} + + case 1: { + if (!m_uiBoneStorm_Timer) + {if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, Regular ? SPELL_BONE_STORM_N :SPELL_BONE_STORM_H); + m_uiBoneStorm_Timer = true; + } + break;} + } + + if (m_uiSaberLash_Timer < diff) + {DoCast(m_creature->getVictim(), Regular ? SPELL_SABER_LASH_N :SPELL_SABER_LASH_H); + m_uiSaberLash_Timer=urand(10000,15000); + } else m_uiSaberLash_Timer -= diff; + + if (m_uiColdFlame_Timer < diff) + {if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, Regular ? SPELL_COLD_FLAME_N :SPELL_COLD_FLAME_H); + m_uiColdFlame_Timer=urand(25000,35000); + } else m_uiColdFlame_Timer -= diff; + + health = m_creature->GetHealth()*100 / m_creature->GetMaxHealth(); + if (health <= 50) stage = 1; + + if (m_uiBerserk_Timer < diff) + { + DoCast(m_creature, SPELL_BERSERK); +// m_uiBerserk_Timer = m_bIsRegularMode ? 300000 : 180000; + } + else m_uiBerserk_Timer -= diff; + + DoMeleeAttackIfReady(); + + } +}; + +CreatureAI* GetAI_boss_lord_marrowgar(Creature* pCreature) +{ + return new boss_lord_marrowgarAI(pCreature); +} + +void AddSC_boss_lord_marrowgar() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_lord_marrowgar"; + newscript->GetAI = &GetAI_boss_lord_marrowgar; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/icecrown_citadel/spire/def_spire.h b/scripts/northrend/icecrown_citadel/spire/def_spire.h index f4b56abf0..c8da54e6f 100644 --- a/scripts/northrend/icecrown_citadel/spire/def_spire.h +++ b/scripts/northrend/icecrown_citadel/spire/def_spire.h @@ -7,7 +7,7 @@ enum MAP_NUM = 631, MAX_ENCOUNTERS = 15, - TYPE_MARROGWAR = 1, + TYPE_MARROWGAR = 1, TYPE_DEATHWHISPER = 2, TYPE_SKULLS_PLATO = 3, TYPE_FLIGHT_WAR = 4, @@ -15,7 +15,7 @@ enum BASE_CAMP = 1000, - NPC_LORD_MARROGWAR = 36612, + NPC_LORD_MARROWGAR = 36612, NPC_LADY_DEATHWHISPER = 36855, NPC_DEATHBRINGER_SAURFANG = 37813, diff --git a/scripts/northrend/icecrown_citadel/spire/instance_icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/spire/instance_icecrown_spire.cpp index 84dce72ec..674783fbc 100644 --- a/scripts/northrend/icecrown_citadel/spire/instance_icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/spire/instance_icecrown_spire.cpp @@ -62,7 +62,7 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance { switch(pCreature->GetEntry()) { - case NPC_LORD_MARROGWAR: + case NPC_LORD_MARROWGAR: m_uiMarrogwarGUID = pCreature->GetGUID(); break; case NPC_LADY_DEATHWHISPER: @@ -84,7 +84,7 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance { switch(uiType) { - case TYPE_MARROGWAR: + case TYPE_MARROWGAR: if(uiData == IN_PROGRESS) { needSave = true; @@ -123,7 +123,7 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance { switch(uiType) { - case TYPE_MARROGWAR: return m_auiEncounter[0]; + case TYPE_MARROWGAR: return m_auiEncounter[0]; case TYPE_DEATHWHISPER: return m_auiEncounter[1]; case TYPE_SKULLS_PLATO: return m_auiEncounter[2]; case TYPE_FLIGHT_WAR: return m_auiEncounter[3]; @@ -136,7 +136,7 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance { switch(uiData) { - case NPC_LORD_MARROGWAR: + case NPC_LORD_MARROWGAR: return m_uiMarrogwarGUID; case NPC_LADY_DEATHWHISPER: return m_uiDeathWhisperGUID; diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index 8c6f892d4..faac87f93 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -371,7 +371,7 @@ extern void AddSC_boss_lavanthor(); //IceCrown Citadel extern void AddSC_instance_icecrown_spire(); extern void AddSC_icecrown_teleporter(); -extern void AddSC_boss_lord_marrogwar(); +extern void AddSC_boss_lord_marrowgar(); extern void AddSC_boss_lady_deathwhisper(); extern void AddSC_boss_deathbringer_saurfang(); @@ -824,7 +824,7 @@ void AddScripts() AddSC_instance_icecrown_spire(); AddSC_icecrown_teleporter(); - AddSC_boss_lord_marrogwar(); + AddSC_boss_lord_marrowgar(); AddSC_boss_lady_deathwhisper(); AddSC_boss_deathbringer_saurfang(); From 3e0412691df2c79c15d8799a44387a29eb9832e9 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sun, 7 Feb 2010 17:57:34 +0300 Subject: [PATCH 131/405] 3.3.2 changes --- scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp index 86bd67526..993076859 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp @@ -249,7 +249,7 @@ struct MANGOS_DLL_DECL boss_skeramAI : public ScriptedAI for (int ici = 0; ici < TARGETICONCOUNT; ++ici) { //if (grp ->m_targetIcons[ici] == m_creature->GetGUID()) -- private member:( - grp->SetTargetIcon(ici, 0); + //grp->SetTargetIcon(ici, 0); } } break; From 41a6db0c2ec8f256a9ebc37ce23bd8d1bbfa26b9 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Mon, 8 Feb 2010 19:08:03 +0300 Subject: [PATCH 132/405] IceCron spire bosses change (not finished) --- addition/721_icecrown_mangos.sql | 6 +- .../spire/boss_lady_deathwhisper.cpp | 91 +++++++++++++++++++ .../icecrown_citadel/spire/def_spire.h | 11 ++- .../spire/icecrown_teleport.cpp | 46 ++++++++-- .../spire/instance_icecrown_spire.cpp | 36 ++++++-- 5 files changed, 168 insertions(+), 22 deletions(-) diff --git a/addition/721_icecrown_mangos.sql b/addition/721_icecrown_mangos.sql index 7073a5396..6615e0ba6 100644 --- a/addition/721_icecrown_mangos.sql +++ b/addition/721_icecrown_mangos.sql @@ -37,7 +37,11 @@ INSERT INTO `npc_text` (`ID`, `text0_0`, `text0_1`, `lang0`, `prob0`, `em0_0`, ` UPDATE `instance_template` SET `script`='instance_icecrown_spire' WHERE `map`=631; --- UPDATE `creature_template` SET `ScriptName`='boss_lady_deathwhisper' WHERE `entry`=36855; -- UPDATE `creature_template` SET `ScriptName`='boss_deathbringer_saurfang' WHERE `entry`=37813; + +UPDATE `creature_template` SET `ScriptName`='boss_lady_deathwhisper' WHERE `entry`=36855; + UPDATE `creature_template` SET `ScriptName`='boss_lord_marrowgar' WHERE `entry`= 36612; +UPDATE `gameobject_template` SET `faction` = '114',`data0` = '0' WHERE `gameobject_template`.`entry` IN (201910,201911); +UPDATE `gameobject` SET `state` = '1' WHERE `guid` IN (72526,72525); diff --git a/scripts/northrend/icecrown_citadel/spire/boss_lady_deathwhisper.cpp b/scripts/northrend/icecrown_citadel/spire/boss_lady_deathwhisper.cpp index 5a11a4072..5cf5087d1 100644 --- a/scripts/northrend/icecrown_citadel/spire/boss_lady_deathwhisper.cpp +++ b/scripts/northrend/icecrown_citadel/spire/boss_lady_deathwhisper.cpp @@ -1,5 +1,24 @@ #include "precompiled.h" #include "def_spire.h" +enum +{ + //common + SPELL_BERSERK = 47008, + //yells + //summons + //Abilities + SPELL_MANA_BARRIER_N = 70842, + SPELL_SHADOW_BOLT_N = 41254, + SPELL_DEATH_AND_DECAY_N = 71001, + SPELL_DARK_EMPOWERMENT_N = 70901, + SPELL_FROSTBOLT_N = 71420, + SPELL_INSIGNIFICANCE_N = 71204, + + SPELL_SHADOW_BOLT_H = 72008, + SPELL_FROSTBOLT_H = 72007, + SPELL_DOMINATE_MIND_H = 71289, + +}; struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI { @@ -12,10 +31,30 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI bool Regular; ScriptedInstance *pInstance; + uint8 stage; + uint32 m_uiManaBarrier_Timer; + uint32 m_uiShadowBolt_Timer; + uint32 m_uiDeathAndDecay_Timer; + uint32 m_uiDarkEmpowerment_Timer; + uint32 m_uiFrostBolt_Timer; + uint32 m_uiInsignificance_Timer; + uint32 m_uiDominateMind_Timer; + uint32 m_uiBerserk_Timer; + uint8 health; void Reset() { if(pInstance) pInstance->SetData(TYPE_DEATHWHISPER, NOT_STARTED); + m_uiManaBarrier_Timer = 30000; + m_uiShadowBolt_Timer = urand(8000,10000); + m_uiDeathAndDecay_Timer = urand(10000,20000); + m_uiDarkEmpowerment_Timer = 45000; + m_uiFrostBolt_Timer = urand(10000,15000); + m_uiInsignificance_Timer = 40000; + m_uiDominateMind_Timer = 30000; + m_uiBerserk_Timer = 600000; + stage = 0; + } void Aggro(Unit *who) @@ -33,6 +72,58 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + switch(stage) + { + case 0: { + if (m_uiShadowBolt_Timer < diff) + { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, Regular ? SPELL_SHADOW_BOLT_N : SPELL_SHADOW_BOLT_H ); + m_uiDeathAndDecay_Timer=urand(8000,10000); + } else m_uiShadowBolt_Timer -= diff; + +/* if (m_uiDarkEmpowerment_Timer < diff) + { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, DARK_EMPOWERMENT_N); + m_uiDarkEmpowerment_Timer=urand(20000,40000); + } else m_uiDarkEmpowerment_Timer -= diff; +*/ + break;} + + case 1: { + if (m_uiFrostBolt_Timer < diff) + {if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, Regular ? SPELL_FROSTBOLT_N : SPELL_FROSTBOLT_H); + m_uiFrostBolt_Timer=urand(8000,15000); + } else m_uiFrostBolt_Timer -= diff; + + if (m_uiInsignificance_Timer < diff) { + DoCast(m_creature->getVictim(), SPELL_INSIGNIFICANCE_N); + m_uiInsignificance_Timer=urand(20000,40000); + } else m_uiInsignificance_Timer -= diff; + + break;} + } + + if (m_uiDeathAndDecay_Timer < diff) + {DoCast(m_creature->getVictim(), SPELL_DEATH_AND_DECAY_N); + m_uiDeathAndDecay_Timer=urand(10000,15000); + } else m_uiDeathAndDecay_Timer -= diff; + + if (m_uiDominateMind_Timer < diff) + {if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, SPELL_DOMINATE_MIND_H); + m_uiDominateMind_Timer=urand(25000,35000); + } else m_uiDominateMind_Timer -= diff; + + health = m_creature->GetHealth()*100 / m_creature->GetMaxHealth(); + if (health <= 50) stage = 1; + + if (m_uiBerserk_Timer < diff) + { + DoCast(m_creature, SPELL_BERSERK); + m_uiBerserk_Timer = 600000; + } else m_uiBerserk_Timer -= diff; + DoMeleeAttackIfReady(); } }; diff --git a/scripts/northrend/icecrown_citadel/spire/def_spire.h b/scripts/northrend/icecrown_citadel/spire/def_spire.h index c8da54e6f..ec8f607f8 100644 --- a/scripts/northrend/icecrown_citadel/spire/def_spire.h +++ b/scripts/northrend/icecrown_citadel/spire/def_spire.h @@ -7,8 +7,9 @@ enum MAP_NUM = 631, MAX_ENCOUNTERS = 15, + TYPE_START = 0, TYPE_MARROWGAR = 1, - TYPE_DEATHWHISPER = 2, + TYPE_DEATHWHISPER = 2, TYPE_SKULLS_PLATO = 3, TYPE_FLIGHT_WAR = 4, TYPE_SAURFANG = 5, @@ -20,8 +21,12 @@ enum NPC_DEATHBRINGER_SAURFANG = 37813, GO_TELEPORT_GOSSIP_MESSAGE = 99323, - TELEPORT_GOSSIP_MESSAGE = 99322 - + TELEPORT_GOSSIP_MESSAGE = 99322, + + GO_ICEWALL_1 = 201911, + GO_ICEWALL_2 = 201910, + GO_ORATORY_DOOR = 201563 + }; #endif diff --git a/scripts/northrend/icecrown_citadel/spire/icecrown_teleport.cpp b/scripts/northrend/icecrown_citadel/spire/icecrown_teleport.cpp index 309f24ed1..d7e004e8b 100644 --- a/scripts/northrend/icecrown_citadel/spire/icecrown_teleport.cpp +++ b/scripts/northrend/icecrown_citadel/spire/icecrown_teleport.cpp @@ -11,18 +11,47 @@ struct Locations float x, y, z; uint32 id; bool state; + bool active; + uint32 encounter; }; static Locations PortalLoc[]= { -{"Молот света",-17.1928, 2211.44, 30.1158,1,true}, // -{"Шпиль",-503.62, 2211.47, 62.8235,0,true}, // -{"Черепной вал",-615.145, 2211.47, 199.972,3,true}, // -{"Воздушное сражение",-209.5, 2211.91, 199.97,4,true}, // -{"Подъем смертоносного",-549.131, 2211.29, 539.291,2,true}, // -{"Цитадель ледяной короны",4198.42, 2769.22, 351.065,5,true}, // +{"Молот света",-17.1928, 2211.44, 30.1158,1,true,true,TYPE_START}, // +{"Шпиль",-503.62, 2211.47, 62.8235,0,false,true,TYPE_MARROWGAR}, // +{"Черепной вал",-615.145, 2211.47, 199.972,3,false,true,TYPE_DEATHWHISPER}, // +{"Воздушное сражение",-209.5, 2211.91, 199.97,4,false,true,TYPE_SKULLS_PLATO}, // +{"Подъем смертоносного",-549.131, 2211.29, 539.291,2,false,true,TYPE_FLIGHT_WAR}, // +{"Цитадель ледяной короны",4198.42, 2769.22, 351.065,5,false,false,TYPE_SAURFANG}, // }; +struct MANGOS_DLL_DECL icecrown_teleporterAI : public ScriptedAI +{ + + icecrown_teleporterAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + void Reset() + { + m_pInstance->SetData(TYPE_START,DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_pInstance) return; + } +}; + +CreatureAI* GetAI_icecrown_teleporter(Creature* pCreature) +{ + return new icecrown_teleporterAI(pCreature); +} + bool GossipSelect_icecrown_teleporter(Player *player, Creature* pCreature, uint32 sender, uint32 action) { if(sender != GOSSIP_SENDER_MAIN) return true; @@ -40,8 +69,8 @@ bool GossipHello_icecrown_teleporter(Player *player, Creature* pCreature) bool m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); for(uint8 i = 0; i < PORTALS_COUNT; i++) { - if (PortalLoc[i].state == true) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, PortalLoc[i].name, GOSSIP_SENDER_MAIN, i); + if (PortalLoc[i].active == true && (PortalLoc[i].state == true || pInstance->GetData(PortalLoc[i].encounter) == DONE)) + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, PortalLoc[i].name, GOSSIP_SENDER_MAIN, i); }; player->SEND_GOSSIP_MENU(TELEPORT_GOSSIP_MESSAGE, pCreature->GetGUID()); return true; @@ -68,6 +97,7 @@ void AddSC_icecrown_teleporter() newscript = new Script; newscript->Name = "icecrown_teleporter"; + newscript->GetAI = &GetAI_icecrown_teleporter; newscript->pGossipHello = &GossipHello_icecrown_teleporter; newscript->pGossipSelect = &GossipSelect_icecrown_teleporter; newscript->RegisterSelf(); diff --git a/scripts/northrend/icecrown_citadel/spire/instance_icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/spire/instance_icecrown_spire.cpp index 674783fbc..58c619b58 100644 --- a/scripts/northrend/icecrown_citadel/spire/instance_icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/spire/instance_icecrown_spire.cpp @@ -35,6 +35,9 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance uint64 m_uiDeathWhisperGUID; uint64 m_uiSaurfangGUID; + uint64 m_uiIcewall1GUID; + uint64 m_uiIcewall2GUID; + void OpenDoor(uint64 guid) { if(!guid) return; @@ -78,6 +81,12 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance { switch(pGo->GetEntry()) { + case GO_ICEWALL_1: + m_uiIcewall1GUID = pGo->GetGUID(); + break; + case GO_ICEWALL_2: + m_uiIcewall2GUID = pGo->GetGUID(); + break; } } void SetData(uint32 uiType, uint32 uiData) @@ -85,17 +94,24 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance switch(uiType) { case TYPE_MARROWGAR: - if(uiData == IN_PROGRESS) - { - needSave = true; + m_auiEncounter[1] = uiData; + if (uiData == DONE) { + OpenDoor(m_uiIcewall1GUID); + OpenDoor(m_uiIcewall1GUID); } - if(uiData == DONE) m_auiEncounter[0] = uiData; break; case TYPE_DEATHWHISPER: + m_auiEncounter[2] = uiData; + break; case TYPE_SKULLS_PLATO: + m_auiEncounter[3] = uiData; + break; case TYPE_FLIGHT_WAR: + m_auiEncounter[4] = uiData; + break; case TYPE_SAURFANG: - break; + m_auiEncounter[5] = uiData; + break; } if (uiData == DONE) @@ -123,11 +139,11 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance { switch(uiType) { - case TYPE_MARROWGAR: return m_auiEncounter[0]; - case TYPE_DEATHWHISPER: return m_auiEncounter[1]; - case TYPE_SKULLS_PLATO: return m_auiEncounter[2]; - case TYPE_FLIGHT_WAR: return m_auiEncounter[3]; - case TYPE_SAURFANG: return m_auiEncounter[4]; + case TYPE_MARROWGAR: return m_auiEncounter[1]; + case TYPE_DEATHWHISPER: return m_auiEncounter[2]; + case TYPE_SKULLS_PLATO: return m_auiEncounter[3]; + case TYPE_FLIGHT_WAR: return m_auiEncounter[4]; + case TYPE_SAURFANG: return m_auiEncounter[5]; } return 0; } From 43b9e2bb30e5834be17bf38872ffef71a2b600d7 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Mon, 8 Feb 2010 20:08:01 +0300 Subject: [PATCH 133/405] Reset instanse directrory to default --- Makefile.am | 31 ++-- .../forge_of_souls/boss_bronjahm.cpp | 128 -------------- .../forge_of_souls/boss_devourer_of_souls.cpp | 64 ------- .../forge_of_souls/boss_bronjahm.cpp | 150 +++++++++++++--- .../forge_of_souls/boss_devourer_of_souls.cpp | 86 ++++++--- .../forge_of_souls/def_forge.h | 0 .../instance_forge_of_souls.cpp | 0 .../halls_of_reflection/def_halls.h | 0 .../instance_halls_of_reflection.cpp | 0 .../pit_of_saron/boss_forgemaster_gafrost.cpp | 86 ++++++--- .../pit_of_saron/boss_krick_and_ick.cpp | 130 +++++++++++--- .../boss_scourgelord_tirannus.cpp | 0 .../{ => frozen_halls}/pit_of_saron/def_pit.h | 0 .../pit_of_saron/instance_pit_of_saron.cpp | 0 .../boss_deathbringer_saurfang.cpp | 74 +++++--- .../boss_lady_deathwhisper.cpp | 165 +++++++++++++++--- .../icecrown_citadel/boss_lord_marrowgar.cpp | 147 +++++++++++++--- .../{spire => icecrown_citadel}/def_spire.h | 0 .../icecrown_teleport.cpp | 0 .../instance_icecrown_spire.cpp | 0 .../boss_forgemaster_garfrost.cpp | 64 ------- .../pit_of_saron/boss_ick_and_krick.cpp | 108 ------------ .../spire/boss_deathbringer_saurfang.cpp | 52 ------ .../spire/boss_lady_deathwhisper.cpp | 143 --------------- .../spire/boss_lord_marrowgar.cpp | 125 ------------- 25 files changed, 689 insertions(+), 864 deletions(-) delete mode 100644 scripts/northrend/icecrown_citadel/forge_of_souls/boss_bronjahm.cpp delete mode 100644 scripts/northrend/icecrown_citadel/forge_of_souls/boss_devourer_of_souls.cpp rename scripts/northrend/icecrown_citadel/{ => frozen_halls}/forge_of_souls/def_forge.h (100%) rename scripts/northrend/icecrown_citadel/{ => frozen_halls}/forge_of_souls/instance_forge_of_souls.cpp (100%) rename scripts/northrend/icecrown_citadel/{ => frozen_halls}/halls_of_reflection/def_halls.h (100%) rename scripts/northrend/icecrown_citadel/{ => frozen_halls}/halls_of_reflection/instance_halls_of_reflection.cpp (100%) rename scripts/northrend/icecrown_citadel/{ => frozen_halls}/pit_of_saron/boss_scourgelord_tirannus.cpp (100%) rename scripts/northrend/icecrown_citadel/{ => frozen_halls}/pit_of_saron/def_pit.h (100%) rename scripts/northrend/icecrown_citadel/{ => frozen_halls}/pit_of_saron/instance_pit_of_saron.cpp (100%) rename scripts/northrend/icecrown_citadel/{spire => icecrown_citadel}/def_spire.h (100%) rename scripts/northrend/icecrown_citadel/{spire => icecrown_citadel}/icecrown_teleport.cpp (100%) rename scripts/northrend/icecrown_citadel/{spire => icecrown_citadel}/instance_icecrown_spire.cpp (100%) delete mode 100644 scripts/northrend/icecrown_citadel/pit_of_saron/boss_forgemaster_garfrost.cpp delete mode 100644 scripts/northrend/icecrown_citadel/pit_of_saron/boss_ick_and_krick.cpp delete mode 100644 scripts/northrend/icecrown_citadel/spire/boss_deathbringer_saurfang.cpp delete mode 100644 scripts/northrend/icecrown_citadel/spire/boss_lady_deathwhisper.cpp delete mode 100644 scripts/northrend/icecrown_citadel/spire/boss_lord_marrowgar.cpp diff --git a/Makefile.am b/Makefile.am index 5cb4a6204..78559112e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -328,20 +328,25 @@ scripts/northrend/gundrak/boss_moorabi.cpp \ scripts/northrend/gundrak/boss_sladran.cpp \ scripts/northrend/gundrak/gundrak.h \ scripts/northrend/gundrak/instance_gundrak.cpp \ +scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp \ +scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp \ +scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp \ +scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp \ +scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_gafrost.cpp \ +scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tirannus.cpp \ +scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp \ scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falryn.cpp \ scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_lich_king.cpp \ scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_marwyn.cpp \ -scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_gafrost.cpp \ -scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp \ -scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp \ -scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp \ -scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp \ +scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp \ +scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp \ +scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp \ +scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp \ +scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp \ scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp \ scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp \ scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp \ scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp \ -scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp \ -scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp \ scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp \ scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp \ scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp \ @@ -535,18 +540,6 @@ scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_malganis.cpp \ scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_meathook.cpp \ scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp \ scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_salramm.cpp \ -scripts/northrend/icecrown_citadel/spire/icecrown_teleport.cpp \ -scripts/northrend/icecrown_citadel/spire/instance_icecrown_spire.cpp \ -scripts/northrend/icecrown_citadel/spire/boss_deathbringer_saurfang.cpp \ -scripts/northrend/icecrown_citadel/spire/boss_lady_deathwhisper.cpp \ -scripts/northrend/icecrown_citadel/spire/boss_lord_marrowgar.cpp \ -scripts/northrend/icecrown_citadel/forge_of_souls/instance_forge_of_souls.cpp \ -scripts/northrend/icecrown_citadel/forge_of_souls/boss_devourer_of_souls.cpp \ -scripts/northrend/icecrown_citadel/forge_of_souls/boss_bronjahm.cpp \ -scripts/northrend/icecrown_citadel/pit_of_saron/instance_pit_of_saron.cpp \ -scripts/northrend/icecrown_citadel/pit_of_saron/boss_forgemaster_garfrost.cpp \ -scripts/northrend/icecrown_citadel/pit_of_saron/boss_ick_and_krick.cpp \ -scripts/northrend/icecrown_citadel/pit_of_saron/boss_scourgelord_tirannus.cpp \ scripts/world/areatrigger_scripts.cpp \ scripts/world/boss_emeriss.cpp \ scripts/world/boss_lethon.cpp \ diff --git a/scripts/northrend/icecrown_citadel/forge_of_souls/boss_bronjahm.cpp b/scripts/northrend/icecrown_citadel/forge_of_souls/boss_bronjahm.cpp deleted file mode 100644 index 427e383b1..000000000 --- a/scripts/northrend/icecrown_citadel/forge_of_souls/boss_bronjahm.cpp +++ /dev/null @@ -1,128 +0,0 @@ -#include "precompiled.h" -#include "def_forge.h" -enum -{ - //common - SPELL_BERSERK = 47008, - //yells - //summons - NPC_SOUL_FRAGMENT = 36535, - //Abilities - SPELL_MAGIC_BLANE_N = 68793, - SPELL_CORRUPT_SOUL_N = 68839, - SPELL_CONSUME_SOUL_N = 68858, - SPELL_TELEPORT_N = 68988, - SPELL_SOULSTORM_N = 68872, - SPELL_SOULSTORM2_N = 68921, - SPELL_FEAR = 68950 -}; - -struct MANGOS_DLL_DECL boss_bronjahmAI : public ScriptedAI -{ - boss_bronjahmAI(Creature* pCreature) : ScriptedAI(pCreature) - { - pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Regular = pCreature->GetMap()->IsRegularDifficulty(); - Reset(); - } - - bool Regular; - ScriptedInstance *pInstance; - - void Reset() - { - if(pInstance) pInstance->SetData(TYPE_BRONJAHM, NOT_STARTED); - } - - void Aggro(Unit *who) - { - if(pInstance) pInstance->SetData(TYPE_BRONJAHM, IN_PROGRESS); - } - - void JustDied(Unit *killer) - { - if(pInstance) pInstance->SetData(TYPE_BRONJAHM, DONE); - } - - void UpdateAI(const uint32 diff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - DoMeleeAttackIfReady(); - } -}; - -struct MANGOS_DLL_DECL mob_soul_fragmentAI : public ScriptedAI -{ - mob_soul_fragmentAI(Creature *pCreature) : ScriptedAI(pCreature) - { - m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); - Reset(); - } - - ScriptedInstance *m_pInstance; - uint32 m_uiRangeCheck_Timer; - - void Reset() - { - m_uiRangeCheck_Timer = 1000; - } - - void AttackStart(Unit* pWho) - { - return; - } - - void UpdateAI(const uint32 uiDiff) - { - if (m_uiRangeCheck_Timer < uiDiff) - { - if (m_pInstance) - { - if (Creature* pBronjahm = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(NPC_BRONJAHM)))) - { - float fDistance = m_creature->GetDistance2d(pBronjahm); - if (fDistance <= 2) - { -// ((boss_bronjahmAI*)pBronjahm->AI())->SoulFragmentHit(); - m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - } - } - } - m_uiRangeCheck_Timer = 1000; - } - else m_uiRangeCheck_Timer -= uiDiff; - } - - void JustDied(Unit* pKiller) - { -// DoCast(m_creature, SPELL_SPLASH); - } -}; - -CreatureAI* GetAI_boss_bronjahm(Creature* pCreature) -{ - return new boss_bronjahmAI(pCreature); -} - -CreatureAI* GetAI_mob_soul_fragment(Creature* pCreature) -{ - return new mob_soul_fragmentAI (pCreature); -} - - -void AddSC_boss_bronjahm() -{ - Script *newscript; - newscript = new Script; - newscript->Name = "boss_bronjahm"; - newscript->GetAI = &GetAI_boss_bronjahm; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_soul_fragment"; - newscript->GetAI = &GetAI_mob_soul_fragment; - newscript->RegisterSelf(); - -} diff --git a/scripts/northrend/icecrown_citadel/forge_of_souls/boss_devourer_of_souls.cpp b/scripts/northrend/icecrown_citadel/forge_of_souls/boss_devourer_of_souls.cpp deleted file mode 100644 index ab0936d70..000000000 --- a/scripts/northrend/icecrown_citadel/forge_of_souls/boss_devourer_of_souls.cpp +++ /dev/null @@ -1,64 +0,0 @@ -#include "precompiled.h" -#include "def_forge.h" -enum -{ - //common - SPELL_BERSERK = 47008, - //yells - //Abilities - SPELL_PHANTOM_BLAST_N = 68982, - SPELL_MIRRORED_SOUL_N = 69051, - SPELL_WELL_OF_SOULS_N = 68820, - SPELL_UNLEASHED_SOULS_N = 68939, - SPELL_WAILING_SOULS_N = 68873 -}; - -struct MANGOS_DLL_DECL boss_devourer_of_soulsAI : public ScriptedAI -{ - boss_devourer_of_soulsAI(Creature* pCreature) : ScriptedAI(pCreature) - { - pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Regular = pCreature->GetMap()->IsRegularDifficulty(); - Reset(); - } - - bool Regular; - ScriptedInstance *pInstance; - - void Reset() - { - if(pInstance) pInstance->SetData(TYPE_DEVOURER, NOT_STARTED); - } - - void Aggro(Unit *who) - { - if(pInstance) pInstance->SetData(TYPE_DEVOURER, IN_PROGRESS); - } - - void JustDied(Unit *killer) - { - if(pInstance) pInstance->SetData(TYPE_DEVOURER, DONE); - } - - void UpdateAI(const uint32 diff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_boss_devourer_of_souls(Creature* pCreature) -{ - return new boss_devourer_of_soulsAI(pCreature); -} - -void AddSC_boss_devourer_of_souls() -{ - Script *newscript; - newscript = new Script; - newscript->Name = "boss_devourer_of_souls"; - newscript->GetAI = &GetAI_boss_devourer_of_souls; - newscript->RegisterSelf(); -} diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp index 17a047b19..427e383b1 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp @@ -1,24 +1,128 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 - * 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, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* ScriptData -SDName: boss_bronjahm -SD%Complete: 0% -SDComment: -SDCategory: The Forge of Souls -EndScriptData */ - #include "precompiled.h" +#include "def_forge.h" +enum +{ + //common + SPELL_BERSERK = 47008, + //yells + //summons + NPC_SOUL_FRAGMENT = 36535, + //Abilities + SPELL_MAGIC_BLANE_N = 68793, + SPELL_CORRUPT_SOUL_N = 68839, + SPELL_CONSUME_SOUL_N = 68858, + SPELL_TELEPORT_N = 68988, + SPELL_SOULSTORM_N = 68872, + SPELL_SOULSTORM2_N = 68921, + SPELL_FEAR = 68950 +}; + +struct MANGOS_DLL_DECL boss_bronjahmAI : public ScriptedAI +{ + boss_bronjahmAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Regular = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + bool Regular; + ScriptedInstance *pInstance; + + void Reset() + { + if(pInstance) pInstance->SetData(TYPE_BRONJAHM, NOT_STARTED); + } + + void Aggro(Unit *who) + { + if(pInstance) pInstance->SetData(TYPE_BRONJAHM, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_BRONJAHM, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +struct MANGOS_DLL_DECL mob_soul_fragmentAI : public ScriptedAI +{ + mob_soul_fragmentAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + Reset(); + } + + ScriptedInstance *m_pInstance; + uint32 m_uiRangeCheck_Timer; + + void Reset() + { + m_uiRangeCheck_Timer = 1000; + } + + void AttackStart(Unit* pWho) + { + return; + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_uiRangeCheck_Timer < uiDiff) + { + if (m_pInstance) + { + if (Creature* pBronjahm = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(NPC_BRONJAHM)))) + { + float fDistance = m_creature->GetDistance2d(pBronjahm); + if (fDistance <= 2) + { +// ((boss_bronjahmAI*)pBronjahm->AI())->SoulFragmentHit(); + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + } + } + m_uiRangeCheck_Timer = 1000; + } + else m_uiRangeCheck_Timer -= uiDiff; + } + + void JustDied(Unit* pKiller) + { +// DoCast(m_creature, SPELL_SPLASH); + } +}; + +CreatureAI* GetAI_boss_bronjahm(Creature* pCreature) +{ + return new boss_bronjahmAI(pCreature); +} + +CreatureAI* GetAI_mob_soul_fragment(Creature* pCreature) +{ + return new mob_soul_fragmentAI (pCreature); +} + + +void AddSC_boss_bronjahm() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_bronjahm"; + newscript->GetAI = &GetAI_boss_bronjahm; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_soul_fragment"; + newscript->GetAI = &GetAI_mob_soul_fragment; + newscript->RegisterSelf(); + +} diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp index 1e430527f..ab0936d70 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp @@ -1,24 +1,64 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 - * 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, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* ScriptData -SDName: boss_devourer_of_souls -SD%Complete: 0% -SDComment: -SDCategory: The Forge of Souls -EndScriptData */ - #include "precompiled.h" +#include "def_forge.h" +enum +{ + //common + SPELL_BERSERK = 47008, + //yells + //Abilities + SPELL_PHANTOM_BLAST_N = 68982, + SPELL_MIRRORED_SOUL_N = 69051, + SPELL_WELL_OF_SOULS_N = 68820, + SPELL_UNLEASHED_SOULS_N = 68939, + SPELL_WAILING_SOULS_N = 68873 +}; + +struct MANGOS_DLL_DECL boss_devourer_of_soulsAI : public ScriptedAI +{ + boss_devourer_of_soulsAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Regular = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + bool Regular; + ScriptedInstance *pInstance; + + void Reset() + { + if(pInstance) pInstance->SetData(TYPE_DEVOURER, NOT_STARTED); + } + + void Aggro(Unit *who) + { + if(pInstance) pInstance->SetData(TYPE_DEVOURER, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_DEVOURER, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_devourer_of_souls(Creature* pCreature) +{ + return new boss_devourer_of_soulsAI(pCreature); +} + +void AddSC_boss_devourer_of_souls() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_devourer_of_souls"; + newscript->GetAI = &GetAI_boss_devourer_of_souls; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/icecrown_citadel/forge_of_souls/def_forge.h b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/def_forge.h similarity index 100% rename from scripts/northrend/icecrown_citadel/forge_of_souls/def_forge.h rename to scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/def_forge.h diff --git a/scripts/northrend/icecrown_citadel/forge_of_souls/instance_forge_of_souls.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp similarity index 100% rename from scripts/northrend/icecrown_citadel/forge_of_souls/instance_forge_of_souls.cpp rename to scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp diff --git a/scripts/northrend/icecrown_citadel/halls_of_reflection/def_halls.h b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/def_halls.h similarity index 100% rename from scripts/northrend/icecrown_citadel/halls_of_reflection/def_halls.h rename to scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/def_halls.h diff --git a/scripts/northrend/icecrown_citadel/halls_of_reflection/instance_halls_of_reflection.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp similarity index 100% rename from scripts/northrend/icecrown_citadel/halls_of_reflection/instance_halls_of_reflection.cpp rename to scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_gafrost.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_gafrost.cpp index 73fbae7a2..0df035e53 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_gafrost.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_gafrost.cpp @@ -1,24 +1,64 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 - * 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, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* ScriptData -SDName: boss_forgemaster_gafrost -SD%Complete: 0% -SDComment: -SDCategory: Pit of Saron -EndScriptData */ - #include "precompiled.h" +#include "def_pit.h" +enum +{ + //common + SPELL_BERSERK = 47008, + //yells + //summons + //Abilities + SPELL_FEAR = 68950 +}; + +struct MANGOS_DLL_DECL boss_forgemaster_gafrostAI : public ScriptedAI +{ + boss_forgemaster_gafrostAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Regular = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + bool Regular; + ScriptedInstance *pInstance; + + void Reset() + { + if(pInstance) pInstance->SetData(TYPE_GAFROST, NOT_STARTED); + } + + void Aggro(Unit *who) + { + if(pInstance) pInstance->SetData(TYPE_GAFROST, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_GAFROST, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + + +CreatureAI* GetAI_boss_forgemaster_gafrost(Creature* pCreature) +{ + return new boss_forgemaster_gafrostAI(pCreature); +} + + +void AddSC_boss_forgemaster_gafrost() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_forgemaster_gafrost"; + newscript->GetAI = &GetAI_boss_forgemaster_gafrost; + newscript->RegisterSelf(); + +} diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp index 7be678bd1..c4dfc79aa 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp @@ -1,24 +1,108 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 - * 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, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* ScriptData -SDName: boss_krick_and_ick -SD%Complete: 0% -SDComment: -SDCategory: Pit of Saron -EndScriptData */ - #include "precompiled.h" +#include "def_pit.h" +enum +{ + //common + SPELL_BERSERK = 47008, + //yells + //summons + //Abilities + SPELL_FEAR = 68950 +}; + +struct MANGOS_DLL_DECL boss_krickAI : public ScriptedAI +{ + boss_krickAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Regular = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + bool Regular; + ScriptedInstance *pInstance; + + void Reset() + { + if(pInstance) pInstance->SetData(TYPE_KRICK, NOT_STARTED); + } + + void Aggro(Unit *who) + { + if(pInstance) pInstance->SetData(TYPE_KRICK, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_KRICK, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +struct MANGOS_DLL_DECL boss_ickAI : public ScriptedAI +{ + boss_ickAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Regular = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + bool Regular; + ScriptedInstance *pInstance; + + void Reset() + { + if(pInstance) pInstance->SetData(TYPE_ICK, NOT_STARTED); + } + + void Aggro(Unit *who) + { + if(pInstance) pInstance->SetData(TYPE_ICK, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_ICK, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_krick(Creature* pCreature) +{ + return new boss_krickAI(pCreature); +} + +CreatureAI* GetAI_boss_ick(Creature* pCreature) +{ + return new boss_ickAI(pCreature); +} + + +void AddSC_boss_krick() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_krick"; + newscript->GetAI = &GetAI_boss_krick; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_ick"; + newscript->GetAI = &GetAI_boss_ick; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/icecrown_citadel/pit_of_saron/boss_scourgelord_tirannus.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tirannus.cpp similarity index 100% rename from scripts/northrend/icecrown_citadel/pit_of_saron/boss_scourgelord_tirannus.cpp rename to scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tirannus.cpp diff --git a/scripts/northrend/icecrown_citadel/pit_of_saron/def_pit.h b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/def_pit.h similarity index 100% rename from scripts/northrend/icecrown_citadel/pit_of_saron/def_pit.h rename to scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/def_pit.h diff --git a/scripts/northrend/icecrown_citadel/pit_of_saron/instance_pit_of_saron.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp similarity index 100% rename from scripts/northrend/icecrown_citadel/pit_of_saron/instance_pit_of_saron.cpp rename to scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp index 6faff7ab3..a031819e4 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp @@ -1,24 +1,52 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 - * 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, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* ScriptData -SDName: boss_deathbringer_saurfang -SD%Complete: 0% -SDComment: -SDCategory: Icecrown Citadel -EndScriptData */ - #include "precompiled.h" +#include "def_spire.h" + +struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI +{ + boss_deathbringer_saurfangAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Regular = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + bool Regular; + ScriptedInstance *pInstance; + + void Reset() + { + if(pInstance) pInstance->SetData(TYPE_SAURFANG, NOT_STARTED); + } + + void Aggro(Unit *who) + { + if(pInstance) pInstance->SetData(TYPE_SAURFANG, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_SAURFANG, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_deathbringer_saurfang(Creature* pCreature) +{ + return new boss_deathbringer_saurfangAI(pCreature); +} + +void AddSC_boss_deathbringer_saurfang() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_deathbringer_saurfang"; + newscript->GetAI = &GetAI_boss_deathbringer_saurfang; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp index e74986488..5cf5087d1 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp @@ -1,24 +1,143 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 - * 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, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* ScriptData -SDName: boss_lady_deathwhisper -SD%Complete: 0% -SDComment: -SDCategory: Icecrown Citadel -EndScriptData */ - #include "precompiled.h" +#include "def_spire.h" +enum +{ + //common + SPELL_BERSERK = 47008, + //yells + //summons + //Abilities + SPELL_MANA_BARRIER_N = 70842, + SPELL_SHADOW_BOLT_N = 41254, + SPELL_DEATH_AND_DECAY_N = 71001, + SPELL_DARK_EMPOWERMENT_N = 70901, + SPELL_FROSTBOLT_N = 71420, + SPELL_INSIGNIFICANCE_N = 71204, + + SPELL_SHADOW_BOLT_H = 72008, + SPELL_FROSTBOLT_H = 72007, + SPELL_DOMINATE_MIND_H = 71289, + +}; + +struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI +{ + boss_lady_deathwhisperAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Regular = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + bool Regular; + ScriptedInstance *pInstance; + uint8 stage; + uint32 m_uiManaBarrier_Timer; + uint32 m_uiShadowBolt_Timer; + uint32 m_uiDeathAndDecay_Timer; + uint32 m_uiDarkEmpowerment_Timer; + uint32 m_uiFrostBolt_Timer; + uint32 m_uiInsignificance_Timer; + uint32 m_uiDominateMind_Timer; + uint32 m_uiBerserk_Timer; + uint8 health; + + void Reset() + { + if(pInstance) pInstance->SetData(TYPE_DEATHWHISPER, NOT_STARTED); + m_uiManaBarrier_Timer = 30000; + m_uiShadowBolt_Timer = urand(8000,10000); + m_uiDeathAndDecay_Timer = urand(10000,20000); + m_uiDarkEmpowerment_Timer = 45000; + m_uiFrostBolt_Timer = urand(10000,15000); + m_uiInsignificance_Timer = 40000; + m_uiDominateMind_Timer = 30000; + m_uiBerserk_Timer = 600000; + stage = 0; + + } + + void Aggro(Unit *who) + { + if(pInstance) pInstance->SetData(TYPE_DEATHWHISPER, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_DEATHWHISPER, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + switch(stage) + { + case 0: { + if (m_uiShadowBolt_Timer < diff) + { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, Regular ? SPELL_SHADOW_BOLT_N : SPELL_SHADOW_BOLT_H ); + m_uiDeathAndDecay_Timer=urand(8000,10000); + } else m_uiShadowBolt_Timer -= diff; + +/* if (m_uiDarkEmpowerment_Timer < diff) + { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, DARK_EMPOWERMENT_N); + m_uiDarkEmpowerment_Timer=urand(20000,40000); + } else m_uiDarkEmpowerment_Timer -= diff; +*/ + break;} + + case 1: { + if (m_uiFrostBolt_Timer < diff) + {if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, Regular ? SPELL_FROSTBOLT_N : SPELL_FROSTBOLT_H); + m_uiFrostBolt_Timer=urand(8000,15000); + } else m_uiFrostBolt_Timer -= diff; + + if (m_uiInsignificance_Timer < diff) { + DoCast(m_creature->getVictim(), SPELL_INSIGNIFICANCE_N); + m_uiInsignificance_Timer=urand(20000,40000); + } else m_uiInsignificance_Timer -= diff; + + break;} + } + + if (m_uiDeathAndDecay_Timer < diff) + {DoCast(m_creature->getVictim(), SPELL_DEATH_AND_DECAY_N); + m_uiDeathAndDecay_Timer=urand(10000,15000); + } else m_uiDeathAndDecay_Timer -= diff; + + if (m_uiDominateMind_Timer < diff) + {if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, SPELL_DOMINATE_MIND_H); + m_uiDominateMind_Timer=urand(25000,35000); + } else m_uiDominateMind_Timer -= diff; + + health = m_creature->GetHealth()*100 / m_creature->GetMaxHealth(); + if (health <= 50) stage = 1; + + if (m_uiBerserk_Timer < diff) + { + DoCast(m_creature, SPELL_BERSERK); + m_uiBerserk_Timer = 600000; + } else m_uiBerserk_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_lady_deathwhisper(Creature* pCreature) +{ + return new boss_lady_deathwhisperAI(pCreature); +} + +void AddSC_boss_lady_deathwhisper() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_lady_deathwhisper"; + newscript->GetAI = &GetAI_boss_lady_deathwhisper; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp index b2a30aee9..7d3fa15a9 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp @@ -1,24 +1,125 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 - * 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, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* ScriptData -SDName: boss_lord_marrowgar -SD%Complete: 0% -SDComment: -SDCategory: Icecrown Citadel -EndScriptData */ - #include "precompiled.h" +#include "def_spire.h" +enum +{ + //common + SPELL_BERSERK = 47008, + //yells + //summons + //Abilities + SPELL_SABER_LASH_N = 71021, + SPELL_COLD_FLAME_N = 69146, + SPELL_BONE_STRIKE_N = 69057, + SPELL_BONE_STORM_N = 69076, + + SPELL_SABER_LASH_H = 70814, + SPELL_COLD_FLAME_H = 70825, + SPELL_BONE_STRIKE_H = 69057, + SPELL_BONE_STORM_H = 69076, +}; + +struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI +{ + boss_lord_marrowgarAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Regular = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + bool Regular; + ScriptedInstance *pInstance; + uint8 stage; + uint32 m_uiSaberLash_Timer; + uint32 m_uiColdFlame_Timer; + uint32 m_uiBoneStrike_Timer; + bool m_uiBoneStorm_Timer; + uint32 m_uiBerserk_Timer; + uint8 health; + + void Reset() + { + stage = 0; + health = 100; + m_uiSaberLash_Timer = 10000; + m_uiColdFlame_Timer = 25000; + m_uiBoneStrike_Timer = urand(17000,29000); + m_uiBoneStorm_Timer = false; + m_uiBerserk_Timer = 600000; + + if(pInstance) pInstance->SetData(TYPE_MARROWGAR, NOT_STARTED); + } + + void Aggro(Unit *who) + { + if(pInstance) pInstance->SetData(TYPE_MARROWGAR, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_MARROWGAR, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + switch(stage) + { + case 0: { + if (m_uiBoneStrike_Timer < diff) + { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, Regular ? SPELL_BONE_STRIKE_N :SPELL_BONE_STRIKE_H); + m_uiBoneStrike_Timer=urand(17000,29000); + } else m_uiSaberLash_Timer -= diff; + break;} + + case 1: { + if (!m_uiBoneStorm_Timer) + {if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, Regular ? SPELL_BONE_STORM_N :SPELL_BONE_STORM_H); + m_uiBoneStorm_Timer = true; + } + break;} + } + + if (m_uiSaberLash_Timer < diff) + {DoCast(m_creature->getVictim(), Regular ? SPELL_SABER_LASH_N :SPELL_SABER_LASH_H); + m_uiSaberLash_Timer=urand(10000,15000); + } else m_uiSaberLash_Timer -= diff; + + if (m_uiColdFlame_Timer < diff) + {if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, Regular ? SPELL_COLD_FLAME_N :SPELL_COLD_FLAME_H); + m_uiColdFlame_Timer=urand(25000,35000); + } else m_uiColdFlame_Timer -= diff; + + health = m_creature->GetHealth()*100 / m_creature->GetMaxHealth(); + if (health <= 50) stage = 1; + + if (m_uiBerserk_Timer < diff) + { + DoCast(m_creature, SPELL_BERSERK); +// m_uiBerserk_Timer = m_bIsRegularMode ? 300000 : 180000; + } + else m_uiBerserk_Timer -= diff; + + DoMeleeAttackIfReady(); + + } +}; + +CreatureAI* GetAI_boss_lord_marrowgar(Creature* pCreature) +{ + return new boss_lord_marrowgarAI(pCreature); +} + +void AddSC_boss_lord_marrowgar() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_lord_marrowgar"; + newscript->GetAI = &GetAI_boss_lord_marrowgar; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/icecrown_citadel/spire/def_spire.h b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h similarity index 100% rename from scripts/northrend/icecrown_citadel/spire/def_spire.h rename to scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h diff --git a/scripts/northrend/icecrown_citadel/spire/icecrown_teleport.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp similarity index 100% rename from scripts/northrend/icecrown_citadel/spire/icecrown_teleport.cpp rename to scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp diff --git a/scripts/northrend/icecrown_citadel/spire/instance_icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp similarity index 100% rename from scripts/northrend/icecrown_citadel/spire/instance_icecrown_spire.cpp rename to scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp diff --git a/scripts/northrend/icecrown_citadel/pit_of_saron/boss_forgemaster_garfrost.cpp b/scripts/northrend/icecrown_citadel/pit_of_saron/boss_forgemaster_garfrost.cpp deleted file mode 100644 index 4ded260cb..000000000 --- a/scripts/northrend/icecrown_citadel/pit_of_saron/boss_forgemaster_garfrost.cpp +++ /dev/null @@ -1,64 +0,0 @@ -#include "precompiled.h" -#include "def_pit.h" -enum -{ - //common - SPELL_BERSERK = 47008, - //yells - //summons - //Abilities - SPELL_FEAR = 68950 -}; - -struct MANGOS_DLL_DECL boss_forgemaster_garfrostAI : public ScriptedAI -{ - boss_forgemaster_garfrostAI(Creature* pCreature) : ScriptedAI(pCreature) - { - pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Regular = pCreature->GetMap()->IsRegularDifficulty(); - Reset(); - } - - bool Regular; - ScriptedInstance *pInstance; - - void Reset() - { - if(pInstance) pInstance->SetData(TYPE_GARFROST, NOT_STARTED); - } - - void Aggro(Unit *who) - { - if(pInstance) pInstance->SetData(TYPE_GARFROST, IN_PROGRESS); - } - - void JustDied(Unit *killer) - { - if(pInstance) pInstance->SetData(TYPE_GARFROST, DONE); - } - - void UpdateAI(const uint32 diff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - DoMeleeAttackIfReady(); - } -}; - - -CreatureAI* GetAI_boss_forgemaster_garfrost(Creature* pCreature) -{ - return new boss_forgemaster_garfrostAI(pCreature); -} - - -void AddSC_boss_forgemaster_garfrost() -{ - Script *newscript; - newscript = new Script; - newscript->Name = "boss_forgemaster_garfrost"; - newscript->GetAI = &GetAI_boss_forgemaster_garfrost; - newscript->RegisterSelf(); - -} diff --git a/scripts/northrend/icecrown_citadel/pit_of_saron/boss_ick_and_krick.cpp b/scripts/northrend/icecrown_citadel/pit_of_saron/boss_ick_and_krick.cpp deleted file mode 100644 index c4dfc79aa..000000000 --- a/scripts/northrend/icecrown_citadel/pit_of_saron/boss_ick_and_krick.cpp +++ /dev/null @@ -1,108 +0,0 @@ -#include "precompiled.h" -#include "def_pit.h" -enum -{ - //common - SPELL_BERSERK = 47008, - //yells - //summons - //Abilities - SPELL_FEAR = 68950 -}; - -struct MANGOS_DLL_DECL boss_krickAI : public ScriptedAI -{ - boss_krickAI(Creature* pCreature) : ScriptedAI(pCreature) - { - pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Regular = pCreature->GetMap()->IsRegularDifficulty(); - Reset(); - } - - bool Regular; - ScriptedInstance *pInstance; - - void Reset() - { - if(pInstance) pInstance->SetData(TYPE_KRICK, NOT_STARTED); - } - - void Aggro(Unit *who) - { - if(pInstance) pInstance->SetData(TYPE_KRICK, IN_PROGRESS); - } - - void JustDied(Unit *killer) - { - if(pInstance) pInstance->SetData(TYPE_KRICK, DONE); - } - - void UpdateAI(const uint32 diff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - DoMeleeAttackIfReady(); - } -}; - -struct MANGOS_DLL_DECL boss_ickAI : public ScriptedAI -{ - boss_ickAI(Creature* pCreature) : ScriptedAI(pCreature) - { - pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Regular = pCreature->GetMap()->IsRegularDifficulty(); - Reset(); - } - - bool Regular; - ScriptedInstance *pInstance; - - void Reset() - { - if(pInstance) pInstance->SetData(TYPE_ICK, NOT_STARTED); - } - - void Aggro(Unit *who) - { - if(pInstance) pInstance->SetData(TYPE_ICK, IN_PROGRESS); - } - - void JustDied(Unit *killer) - { - if(pInstance) pInstance->SetData(TYPE_ICK, DONE); - } - - void UpdateAI(const uint32 diff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_boss_krick(Creature* pCreature) -{ - return new boss_krickAI(pCreature); -} - -CreatureAI* GetAI_boss_ick(Creature* pCreature) -{ - return new boss_ickAI(pCreature); -} - - -void AddSC_boss_krick() -{ - Script *newscript; - newscript = new Script; - newscript->Name = "boss_krick"; - newscript->GetAI = &GetAI_boss_krick; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_ick"; - newscript->GetAI = &GetAI_boss_ick; - newscript->RegisterSelf(); -} diff --git a/scripts/northrend/icecrown_citadel/spire/boss_deathbringer_saurfang.cpp b/scripts/northrend/icecrown_citadel/spire/boss_deathbringer_saurfang.cpp deleted file mode 100644 index a031819e4..000000000 --- a/scripts/northrend/icecrown_citadel/spire/boss_deathbringer_saurfang.cpp +++ /dev/null @@ -1,52 +0,0 @@ -#include "precompiled.h" -#include "def_spire.h" - -struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI -{ - boss_deathbringer_saurfangAI(Creature* pCreature) : ScriptedAI(pCreature) - { - pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Regular = pCreature->GetMap()->IsRegularDifficulty(); - Reset(); - } - - bool Regular; - ScriptedInstance *pInstance; - - void Reset() - { - if(pInstance) pInstance->SetData(TYPE_SAURFANG, NOT_STARTED); - } - - void Aggro(Unit *who) - { - if(pInstance) pInstance->SetData(TYPE_SAURFANG, IN_PROGRESS); - } - - void JustDied(Unit *killer) - { - if(pInstance) pInstance->SetData(TYPE_SAURFANG, DONE); - } - - void UpdateAI(const uint32 diff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_boss_deathbringer_saurfang(Creature* pCreature) -{ - return new boss_deathbringer_saurfangAI(pCreature); -} - -void AddSC_boss_deathbringer_saurfang() -{ - Script *newscript; - newscript = new Script; - newscript->Name = "boss_deathbringer_saurfang"; - newscript->GetAI = &GetAI_boss_deathbringer_saurfang; - newscript->RegisterSelf(); -} diff --git a/scripts/northrend/icecrown_citadel/spire/boss_lady_deathwhisper.cpp b/scripts/northrend/icecrown_citadel/spire/boss_lady_deathwhisper.cpp deleted file mode 100644 index 5cf5087d1..000000000 --- a/scripts/northrend/icecrown_citadel/spire/boss_lady_deathwhisper.cpp +++ /dev/null @@ -1,143 +0,0 @@ -#include "precompiled.h" -#include "def_spire.h" -enum -{ - //common - SPELL_BERSERK = 47008, - //yells - //summons - //Abilities - SPELL_MANA_BARRIER_N = 70842, - SPELL_SHADOW_BOLT_N = 41254, - SPELL_DEATH_AND_DECAY_N = 71001, - SPELL_DARK_EMPOWERMENT_N = 70901, - SPELL_FROSTBOLT_N = 71420, - SPELL_INSIGNIFICANCE_N = 71204, - - SPELL_SHADOW_BOLT_H = 72008, - SPELL_FROSTBOLT_H = 72007, - SPELL_DOMINATE_MIND_H = 71289, - -}; - -struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI -{ - boss_lady_deathwhisperAI(Creature* pCreature) : ScriptedAI(pCreature) - { - pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Regular = pCreature->GetMap()->IsRegularDifficulty(); - Reset(); - } - - bool Regular; - ScriptedInstance *pInstance; - uint8 stage; - uint32 m_uiManaBarrier_Timer; - uint32 m_uiShadowBolt_Timer; - uint32 m_uiDeathAndDecay_Timer; - uint32 m_uiDarkEmpowerment_Timer; - uint32 m_uiFrostBolt_Timer; - uint32 m_uiInsignificance_Timer; - uint32 m_uiDominateMind_Timer; - uint32 m_uiBerserk_Timer; - uint8 health; - - void Reset() - { - if(pInstance) pInstance->SetData(TYPE_DEATHWHISPER, NOT_STARTED); - m_uiManaBarrier_Timer = 30000; - m_uiShadowBolt_Timer = urand(8000,10000); - m_uiDeathAndDecay_Timer = urand(10000,20000); - m_uiDarkEmpowerment_Timer = 45000; - m_uiFrostBolt_Timer = urand(10000,15000); - m_uiInsignificance_Timer = 40000; - m_uiDominateMind_Timer = 30000; - m_uiBerserk_Timer = 600000; - stage = 0; - - } - - void Aggro(Unit *who) - { - if(pInstance) pInstance->SetData(TYPE_DEATHWHISPER, IN_PROGRESS); - } - - void JustDied(Unit *killer) - { - if(pInstance) pInstance->SetData(TYPE_DEATHWHISPER, DONE); - } - - void UpdateAI(const uint32 diff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - switch(stage) - { - case 0: { - if (m_uiShadowBolt_Timer < diff) - { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, Regular ? SPELL_SHADOW_BOLT_N : SPELL_SHADOW_BOLT_H ); - m_uiDeathAndDecay_Timer=urand(8000,10000); - } else m_uiShadowBolt_Timer -= diff; - -/* if (m_uiDarkEmpowerment_Timer < diff) - { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, DARK_EMPOWERMENT_N); - m_uiDarkEmpowerment_Timer=urand(20000,40000); - } else m_uiDarkEmpowerment_Timer -= diff; -*/ - break;} - - case 1: { - if (m_uiFrostBolt_Timer < diff) - {if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, Regular ? SPELL_FROSTBOLT_N : SPELL_FROSTBOLT_H); - m_uiFrostBolt_Timer=urand(8000,15000); - } else m_uiFrostBolt_Timer -= diff; - - if (m_uiInsignificance_Timer < diff) { - DoCast(m_creature->getVictim(), SPELL_INSIGNIFICANCE_N); - m_uiInsignificance_Timer=urand(20000,40000); - } else m_uiInsignificance_Timer -= diff; - - break;} - } - - if (m_uiDeathAndDecay_Timer < diff) - {DoCast(m_creature->getVictim(), SPELL_DEATH_AND_DECAY_N); - m_uiDeathAndDecay_Timer=urand(10000,15000); - } else m_uiDeathAndDecay_Timer -= diff; - - if (m_uiDominateMind_Timer < diff) - {if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, SPELL_DOMINATE_MIND_H); - m_uiDominateMind_Timer=urand(25000,35000); - } else m_uiDominateMind_Timer -= diff; - - health = m_creature->GetHealth()*100 / m_creature->GetMaxHealth(); - if (health <= 50) stage = 1; - - if (m_uiBerserk_Timer < diff) - { - DoCast(m_creature, SPELL_BERSERK); - m_uiBerserk_Timer = 600000; - } else m_uiBerserk_Timer -= diff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_boss_lady_deathwhisper(Creature* pCreature) -{ - return new boss_lady_deathwhisperAI(pCreature); -} - -void AddSC_boss_lady_deathwhisper() -{ - Script *newscript; - newscript = new Script; - newscript->Name = "boss_lady_deathwhisper"; - newscript->GetAI = &GetAI_boss_lady_deathwhisper; - newscript->RegisterSelf(); -} diff --git a/scripts/northrend/icecrown_citadel/spire/boss_lord_marrowgar.cpp b/scripts/northrend/icecrown_citadel/spire/boss_lord_marrowgar.cpp deleted file mode 100644 index 7d3fa15a9..000000000 --- a/scripts/northrend/icecrown_citadel/spire/boss_lord_marrowgar.cpp +++ /dev/null @@ -1,125 +0,0 @@ -#include "precompiled.h" -#include "def_spire.h" -enum -{ - //common - SPELL_BERSERK = 47008, - //yells - //summons - //Abilities - SPELL_SABER_LASH_N = 71021, - SPELL_COLD_FLAME_N = 69146, - SPELL_BONE_STRIKE_N = 69057, - SPELL_BONE_STORM_N = 69076, - - SPELL_SABER_LASH_H = 70814, - SPELL_COLD_FLAME_H = 70825, - SPELL_BONE_STRIKE_H = 69057, - SPELL_BONE_STORM_H = 69076, -}; - -struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI -{ - boss_lord_marrowgarAI(Creature* pCreature) : ScriptedAI(pCreature) - { - pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Regular = pCreature->GetMap()->IsRegularDifficulty(); - Reset(); - } - - bool Regular; - ScriptedInstance *pInstance; - uint8 stage; - uint32 m_uiSaberLash_Timer; - uint32 m_uiColdFlame_Timer; - uint32 m_uiBoneStrike_Timer; - bool m_uiBoneStorm_Timer; - uint32 m_uiBerserk_Timer; - uint8 health; - - void Reset() - { - stage = 0; - health = 100; - m_uiSaberLash_Timer = 10000; - m_uiColdFlame_Timer = 25000; - m_uiBoneStrike_Timer = urand(17000,29000); - m_uiBoneStorm_Timer = false; - m_uiBerserk_Timer = 600000; - - if(pInstance) pInstance->SetData(TYPE_MARROWGAR, NOT_STARTED); - } - - void Aggro(Unit *who) - { - if(pInstance) pInstance->SetData(TYPE_MARROWGAR, IN_PROGRESS); - } - - void JustDied(Unit *killer) - { - if(pInstance) pInstance->SetData(TYPE_MARROWGAR, DONE); - } - - void UpdateAI(const uint32 diff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - switch(stage) - { - case 0: { - if (m_uiBoneStrike_Timer < diff) - { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, Regular ? SPELL_BONE_STRIKE_N :SPELL_BONE_STRIKE_H); - m_uiBoneStrike_Timer=urand(17000,29000); - } else m_uiSaberLash_Timer -= diff; - break;} - - case 1: { - if (!m_uiBoneStorm_Timer) - {if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, Regular ? SPELL_BONE_STORM_N :SPELL_BONE_STORM_H); - m_uiBoneStorm_Timer = true; - } - break;} - } - - if (m_uiSaberLash_Timer < diff) - {DoCast(m_creature->getVictim(), Regular ? SPELL_SABER_LASH_N :SPELL_SABER_LASH_H); - m_uiSaberLash_Timer=urand(10000,15000); - } else m_uiSaberLash_Timer -= diff; - - if (m_uiColdFlame_Timer < diff) - {if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, Regular ? SPELL_COLD_FLAME_N :SPELL_COLD_FLAME_H); - m_uiColdFlame_Timer=urand(25000,35000); - } else m_uiColdFlame_Timer -= diff; - - health = m_creature->GetHealth()*100 / m_creature->GetMaxHealth(); - if (health <= 50) stage = 1; - - if (m_uiBerserk_Timer < diff) - { - DoCast(m_creature, SPELL_BERSERK); -// m_uiBerserk_Timer = m_bIsRegularMode ? 300000 : 180000; - } - else m_uiBerserk_Timer -= diff; - - DoMeleeAttackIfReady(); - - } -}; - -CreatureAI* GetAI_boss_lord_marrowgar(Creature* pCreature) -{ - return new boss_lord_marrowgarAI(pCreature); -} - -void AddSC_boss_lord_marrowgar() -{ - Script *newscript; - newscript = new Script; - newscript->Name = "boss_lord_marrowgar"; - newscript->GetAI = &GetAI_boss_lord_marrowgar; - newscript->RegisterSelf(); -} From f43fdb5598db0ed8c4fca0793c340a9be43450fd Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Mon, 8 Feb 2010 22:20:54 +0300 Subject: [PATCH 134/405] Restore compile after merge --- Makefile.am | 1 - .../culling_of_stratholme/boss_malganis.cpp | 2 +- .../culling_of_stratholme.cpp | 32 ++++----- scripts/kalimdor/onyxias_lair/boss_onyxia.cpp | 24 ++----- .../azjol-nerub/ahnkahet/boss_jedoga.cpp | 8 +-- .../azjol-nerub/ahnkahet/boss_taldaram.cpp | 2 +- .../boss_argent_challenge.cpp | 4 +- .../boss_black_knight.cpp | 2 +- .../boss_grand_champions.cpp | 10 +-- .../trial_of_the_crusader.cpp | 66 +++++++++---------- .../frozen_halls/pit_of_saron/def_pit.h | 4 +- .../pit_of_saron/instance_pit_of_saron.cpp | 12 ++-- .../northrend/naxxramas/boss_anubrekhan.cpp | 55 ++++++++-------- .../ulduar/halls_of_stone/halls_of_stone.cpp | 4 +- scripts/northrend/violet_hold/boss_erekem.cpp | 4 +- .../northrend/violet_hold/boss_ichoron.cpp | 2 +- .../northrend/violet_hold/boss_lavanthor.cpp | 2 +- scripts/northrend/violet_hold/boss_moragg.cpp | 2 +- scripts/northrend/violet_hold/boss_xevozz.cpp | 2 +- .../northrend/violet_hold/boss_zuramat.cpp | 2 +- scripts/northrend/violet_hold/violet_hold.cpp | 6 +- system/ScriptLoader.cpp | 4 +- 22 files changed, 117 insertions(+), 133 deletions(-) diff --git a/Makefile.am b/Makefile.am index 78559112e..d5ce6ddfa 100644 --- a/Makefile.am +++ b/Makefile.am @@ -345,7 +345,6 @@ scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp \ scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp \ scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp \ scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp \ -scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp \ scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp \ scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp \ scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp \ diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_malganis.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_malganis.cpp index 8e4055969..f88eae62e 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_malganis.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_malganis.cpp @@ -289,7 +289,7 @@ struct MANGOS_DLL_DECL boss_malganisAI : public ScriptedAI case 9: Malganis->SetVisibility(VISIBILITY_OFF); Arthas->SetUInt64Value(UNIT_FIELD_TARGET, 0); - Arthas->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + Arthas->RemoveSplineFlag(SPLINEFLAG_WALKMODE); Arthas->GetMotionMaster()->MovePoint(0, Malganis->GetPositionX(), Malganis->GetPositionY(), Malganis->GetPositionZ()); ++Step; Steptim = 3000; diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp index 5065cbc05..99339172e 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp @@ -262,7 +262,7 @@ struct MANGOS_DLL_DECL npc_arthasAI : public npc_escortAI DoScriptText(SAY_PHASE502, Arthas); break; case 3: - Arthas->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + Arthas->RemoveSplineFlag(SPLINEFLAG_WALKMODE); DoScriptText(SAY_PHASE505, Arthas); break; case 4: @@ -285,7 +285,7 @@ struct MANGOS_DLL_DECL npc_arthasAI : public npc_escortAI DoScriptText(SAY_PHASE510, Arthas); break; case 11: - Arthas->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + Arthas->RemoveSplineFlag(SPLINEFLAG_WALKMODE); break; case 13: DoScriptText(SAY_PHASE508,Arthas); @@ -318,7 +318,7 @@ struct MANGOS_DLL_DECL npc_arthasAI : public npc_escortAI case 19: break; case 20: - Arthas->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + Arthas->AddSplineFlag(SPLINEFLAG_WALKMODE); break; case 23: DoScriptText(SAY_PHASE503,Arthas); @@ -333,14 +333,14 @@ struct MANGOS_DLL_DECL npc_arthasAI : public npc_escortAI break; case 32: DoScriptText(SAY_PHASE601,Arthas); - Arthas->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + Arthas->RemoveSplineFlag(SPLINEFLAG_WALKMODE); break; case 34: - Arthas->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + Arthas->AddSplineFlag(SPLINEFLAG_WALKMODE); DoScriptText(SAY_PHASE602,Arthas); break; case 35: - Arthas->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + Arthas->RemoveSplineFlag(SPLINEFLAG_WALKMODE); DoScriptText(SAY_PHASE603,Arthas); break; case 40: @@ -431,7 +431,7 @@ struct MANGOS_DLL_DECL npc_arthasAI : public npc_escortAI case 1: PhaseC = true; Arthas = m_creature; - Arthas->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + Arthas->RemoveSplineFlag(SPLINEFLAG_WALKMODE); Uther = Arthas->SummonCreature(26528,1794.357f,1272.183f,140.558f,1.37f,TEMPSUMMON_TIMED_DESPAWN,180000); if (Creature* pJaina = GetClosestCreatureWithEntry(Arthas, NPC_JAINA, 50.0f)) @@ -440,7 +440,7 @@ struct MANGOS_DLL_DECL npc_arthasAI : public npc_escortAI if (m_pInstance) m_pInstance->SetData(TYPE_ARTHAS_EVENT, NOT_STARTED); - Uther->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + Uther->RemoveSplineFlag(SPLINEFLAG_WALKMODE); Arthas->GetMotionMaster()->MovePoint(0, 1903.167f, 1291.573f, 143.32f); Uther->GetMotionMaster()->MovePoint(0, 1897.018f, 1287.487f, 143.481f); Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Uther->GetGUID()); @@ -459,7 +459,7 @@ struct MANGOS_DLL_DECL npc_arthasAI : public npc_escortAI phasetim = 8000; break; case 7: - Arthas->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + Arthas->AddSplineFlag(SPLINEFLAG_WALKMODE); DoScriptText(SAY_INTRO03, Arthas); Arthas->GetMotionMaster()->MovePoint(0, 1911.087f, 1314.263f, 150.026f); ++phase; @@ -528,7 +528,7 @@ struct MANGOS_DLL_DECL npc_arthasAI : public npc_escortAI phasetim = 4000; break; case 33: - Uther->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + Uther->AddSplineFlag(SPLINEFLAG_WALKMODE); Uther->GetMotionMaster()->MovePoint(0, 1794.357f,1272.183f,140.558f); ++phase; phasetim = 1000; @@ -567,7 +567,7 @@ struct MANGOS_DLL_DECL npc_arthasAI : public npc_escortAI phasetim = 10000; break; case 47: - Arthas->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + Arthas->RemoveSplineFlag(SPLINEFLAG_WALKMODE); Arthas->SetUInt64Value(UNIT_FIELD_TARGET, 0); Jaina->SetVisibility(VISIBILITY_OFF); Uther->SetVisibility(VISIBILITY_OFF); @@ -611,7 +611,7 @@ struct MANGOS_DLL_DECL npc_arthasAI : public npc_escortAI break; case 61: Arthas->SetUInt64Value(UNIT_FIELD_TARGET, 0); - Arthas->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + Arthas->AddSplineFlag(SPLINEFLAG_WALKMODE); Arthas->GetMotionMaster()->MovePoint(0, 2081.447f,1287.770f,141.3241f); ++phase; phasetim = 15000; @@ -619,7 +619,7 @@ struct MANGOS_DLL_DECL npc_arthasAI : public npc_escortAI case 63: Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Cityman->GetGUID()); Cityman->SetUInt64Value(UNIT_FIELD_TARGET, Arthas->GetGUID()); - Cityman->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + Cityman->AddSplineFlag(SPLINEFLAG_WALKMODE); Cityman->GetMotionMaster()->MovePoint(0, 2088.625f,1279.191f,140.743f); ++phase; phasetim = 2000; @@ -720,7 +720,7 @@ struct MANGOS_DLL_DECL npc_arthasAI : public npc_escortAI break; case 87: DoScriptText(SAY_ENTER07, TempMalganis); - Arthas->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + Arthas->RemoveSplineFlag(SPLINEFLAG_WALKMODE); ++phase; phasetim = 17000; if (SalrammGUID = m_pInstance->GetData64(DATA_SALRAMM)) @@ -732,7 +732,7 @@ struct MANGOS_DLL_DECL npc_arthasAI : public npc_escortAI // set his flags back to be atackable if there is no cd on this boss Salramm->SetVisibility(VISIBILITY_ON); Salramm->setFaction(14); - Salramm->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + Salramm->RemoveSplineFlag(SPLINEFLAG_WALKMODE); Salramm->GetMotionMaster()->MovePoint(0, 2165.110f,1284.64f,133.29f); } // already has ben killed as the db says so needs to die or just leave him with invisible flag @@ -933,7 +933,7 @@ struct MANGOS_DLL_DECL npc_patriciaAI : public ScriptedAI Meathook->SetDeadByDefault(true); } } - Patricia->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + Patricia->RemoveSplineFlag(SPLINEFLAG_WALKMODE); DoScriptText(SAY_PEOPLE06, Patricia); Patricia->GetMotionMaster()->MovePoint(0, 2395.487f,1203.199f,134.125f); ++Step; diff --git a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp index dfcdeac8d..a5c95b6b8 100644 --- a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp +++ b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp @@ -225,11 +225,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI { if (m_uiFlameBreathTimer < uiDiff) { -<<<<<<< HEAD:scripts/kalimdor/onyxias_lair/boss_onyxia.cpp - DoCast(m_creature->getVictim(), Regular ? SPELL_FLAMEBREATH : H_SPELL_FLAMEBREATH); -======= - DoCastSpellIfCan(m_creature->getVictim(), SPELL_FLAMEBREATH); ->>>>>>> a148fdc669ed8c26c4e76995c3924d2e9a775bbf:scripts/kalimdor/onyxias_lair/boss_onyxia.cpp + DoCastSpellIfCan(m_creature->getVictim(), Regular ? SPELL_FLAMEBREATH : H_SPELL_FLAMEBREATH); m_uiFlameBreathTimer = urand(10000, 20000); } else @@ -237,11 +233,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI if (m_uiTailSweepTimer < uiDiff) { -<<<<<<< HEAD:scripts/kalimdor/onyxias_lair/boss_onyxia.cpp - DoCast(m_creature, Regular ? SPELL_TAILSWEEP : H_SPELL_TAILSWEEP); -======= - DoCastSpellIfCan(m_creature, SPELL_TAILSWEEP); ->>>>>>> a148fdc669ed8c26c4e76995c3924d2e9a775bbf:scripts/kalimdor/onyxias_lair/boss_onyxia.cpp + DoCastSpellIfCan(m_creature, Regular ? SPELL_TAILSWEEP : H_SPELL_TAILSWEEP); m_uiTailSweepTimer = urand(15000, 20000); } else @@ -257,11 +249,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI if (m_uiWingBuffetTimer < uiDiff) { -<<<<<<< HEAD:scripts/kalimdor/onyxias_lair/boss_onyxia.cpp - DoCast(m_creature->getVictim(), Regular ? SPELL_WINGBUFFET : H_SPELL_WINGBUFFET); -======= - DoCastSpellIfCan(m_creature->getVictim(), SPELL_WINGBUFFET); ->>>>>>> a148fdc669ed8c26c4e76995c3924d2e9a775bbf:scripts/kalimdor/onyxias_lair/boss_onyxia.cpp + DoCastSpellIfCan(m_creature->getVictim(), Regular ? SPELL_WINGBUFFET : H_SPELL_WINGBUFFET); m_uiWingBuffetTimer = urand(15000, 30000); } else @@ -345,11 +333,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != POINT_MOTION_TYPE) { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) -<<<<<<< HEAD:scripts/kalimdor/onyxias_lair/boss_onyxia.cpp - DoCast(pTarget, Regular ? SPELL_FIREBALL : H_SPELL_FIREBALL); -======= - DoCastSpellIfCan(pTarget, SPELL_FIREBALL); ->>>>>>> a148fdc669ed8c26c4e76995c3924d2e9a775bbf:scripts/kalimdor/onyxias_lair/boss_onyxia.cpp + DoCastSpellIfCan(pTarget, Regular ? SPELL_FIREBALL : H_SPELL_FIREBALL); m_uiEngulfingFlamesTimer = 8000; } diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp index e3f592721..ec9c2049a 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp @@ -294,7 +294,7 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI m_creature->InterruptNonMeleeSpells(true); DoCast(m_creature, SPELL_SPHERE_VISUAL); m_creature->GetMap()->CreatureRelocation(m_creature, JEDOGA_X, JEDOGA_Y, JEDOGA_Z, JEDOGA_O); - m_creature->SendMonsterMove(JEDOGA_X, JEDOGA_Y, JEDOGA_Z, JEDOGA_O, MONSTER_MOVE_NONE, 0); + m_creature->SendMonsterMove(JEDOGA_X, JEDOGA_Y, JEDOGA_Z, JEDOGA_O, SPLINEFLAG_NONE, 0); if (m_pInstance) m_pInstance->SetData(TYPE_JEDOGA, NOT_STARTED); @@ -403,7 +403,7 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI SetCombatMovement(true); m_creature->GetMap()->CreatureRelocation(m_creature, CENTER_X, CENTER_Y, GROUND_Z, JEDOGA_O); - m_creature->SendMonsterMove(CENTER_X, CENTER_Y, GROUND_Z, JEDOGA_O, MONSTER_MOVE_NONE, 0); + m_creature->SendMonsterMove(CENTER_X, CENTER_Y, GROUND_Z, JEDOGA_O, SPLINEFLAG_NONE, 0); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); m_creature->RemoveAurasDueToSpell(SPELL_SPHERE_VISUAL); @@ -490,7 +490,7 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI m_creature->InterruptNonMeleeSpells(true); DoCast(m_creature, SPELL_SPHERE_VISUAL); m_creature->GetMap()->CreatureRelocation(m_creature, JEDOGA_X, JEDOGA_Y, JEDOGA_Z, JEDOGA_O); - m_creature->SendMonsterMove(JEDOGA_X, JEDOGA_Y, JEDOGA_Z, JEDOGA_O, MONSTER_MOVE_NONE, 0); + m_creature->SendMonsterMove(JEDOGA_X, JEDOGA_Y, JEDOGA_Z, JEDOGA_O, SPLINEFLAG_NONE, 0); m_uiSubPhase = SUBPHASE_CALL_VOLUNTEER; GameObject* pCircle = GetClosestGameObjectWithEntry(m_creature,GO_CIRCLE,50.0f); if (pCircle && !pCircle->isSpawned()) @@ -541,7 +541,7 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI if(!m_bVolunteerDied) DoCast(m_creature, SPELL_GIFT_OF_THE_HERALD); m_creature->GetMap()->CreatureRelocation(m_creature, CENTER_X, CENTER_Y, GROUND_Z, JEDOGA_O); - m_creature->SendMonsterMove(CENTER_X, CENTER_Y, GROUND_Z, JEDOGA_O, MONSTER_MOVE_NONE, 0); + m_creature->SendMonsterMove(CENTER_X, CENTER_Y, GROUND_Z, JEDOGA_O, SPLINEFLAG_NONE, 0); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); m_creature->RemoveAurasDueToSpell(SPELL_SPHERE_VISUAL); diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp index 4c5a70d4b..6b95781e1 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp @@ -302,7 +302,7 @@ struct MANGOS_DLL_DECL mob_flame_orbAI : public ScriptedAI } m_bIsFlying = true; - m_creature->AddMonsterMoveFlag(MONSTER_MOVE_SPLINE_FLY); + m_creature->AddSplineFlag(SPLINEFLAG_FLYING); }else m_uiCast_Timer -= uiDiff; } }; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp index 7e0ff86bc..53bab0d6f 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp @@ -84,7 +84,7 @@ struct MANGOS_DLL_DECL boss_eadricAI : public ScriptedAI m_uiBerserk_Timer = m_bIsRegularMode ? 300000 : 180000; HammerTarget = 0; m_creature->GetMotionMaster()->MovePoint(0, 746, 614, m_creature->GetPositionZ()); - m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); } void Aggro(Unit* pWho) @@ -188,7 +188,7 @@ struct MANGOS_DLL_DECL boss_paletressAI : public ScriptedAI summoned = false; shielded = false; m_creature->GetMotionMaster()->MovePoint(0, 746, 614, m_creature->GetPositionZ()); - m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); } void JustSummoned(Creature* _summoned) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp index c3a1e9d46..c1b400aa6 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp @@ -155,7 +155,7 @@ struct MANGOS_DLL_DECL boss_black_knightAI : public ScriptedAI phase3 = false; ghoul = false; m_creature->GetMotionMaster()->MovePoint(0, 746, 614, m_creature->GetPositionZ()); - m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp index 72271f343..12b0718b1 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp @@ -92,7 +92,7 @@ struct MANGOS_DLL_DECL mob_toc5_warriorAI : public ScriptedAI Intercept_Cooldown = 0; intercept_check = 1000; m_creature->GetMotionMaster()->MovePoint(0, 746, 614, m_creature->GetPositionZ()); - m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); } @@ -216,7 +216,7 @@ struct MANGOS_DLL_DECL mob_toc5_mageAI : public ScriptedAI m_uiBerserk_Timer = m_bIsRegularMode ? 300000 : 180000; Polymorph_Timer = m_bIsRegularMode ? 12000 : 10000; m_creature->GetMotionMaster()->MovePoint(0, 746, 614, m_creature->GetPositionZ()); - m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); } void Aggro(Unit* pWho) @@ -335,7 +335,7 @@ struct MANGOS_DLL_DECL mob_toc5_shamanAI : public ScriptedAI m_uiBerserk_Timer = m_bIsRegularMode ? 300000 : 180000; Hex_Timer = m_bIsRegularMode ? 15000 : 10000; m_creature->GetMotionMaster()->MovePoint(0, 746, 614, m_creature->GetPositionZ()); - m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); } @@ -500,7 +500,7 @@ struct MANGOS_DLL_DECL mob_toc5_hunterAI : public ScriptedAI enemy_check = 1000; disengage_check; m_creature->GetMotionMaster()->MovePoint(0, 746, 614, m_creature->GetPositionZ()); - m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); } @@ -636,7 +636,7 @@ struct MANGOS_DLL_DECL mob_toc5_rogueAI : public ScriptedAI m_uiBerserk_Timer = m_bIsRegularMode ? 300000 : 180000; Poison_Timer = m_bIsRegularMode ? 12000 : 5000; m_creature->GetMotionMaster()->MovePoint(0, 746, 614, m_creature->GetPositionZ()); - m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); } void Aggro(Unit* pWho) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index 80309be7d..752378f0e 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -88,12 +88,12 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_DREADSCALE))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_ACIDMAW))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } @@ -110,7 +110,7 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI m_creature->SummonCreature(NPC_ICEHOWL, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_ICEHOWL))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } @@ -127,7 +127,7 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI m_creature->SummonCreature(NPC_JARAXXUS, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_JARAXXUS))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } @@ -265,7 +265,7 @@ switch(uiAction) { pCreature->SummonCreature(NPC_GORMOK, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_GORMOK))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } @@ -281,7 +281,7 @@ switch(uiAction) { pCreature->SummonCreature(NPC_JARAXXUS, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_JARAXXUS))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } @@ -297,7 +297,7 @@ switch(uiAction) { pCreature->SummonCreature(NPC_CRUSADER_1_1, SpawnLoc[3].x, SpawnLoc[3].y, SpawnLoc[3].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_1))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } @@ -307,7 +307,7 @@ switch(uiAction) { pCreature->SummonCreature(NPC_CRUSADER_1_2, SpawnLoc[4].x, SpawnLoc[4].y, SpawnLoc[4].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_2))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } @@ -317,7 +317,7 @@ switch(uiAction) { pCreature->SummonCreature(NPC_CRUSADER_1_3, SpawnLoc[5].x, SpawnLoc[5].y, SpawnLoc[5].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_3))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } @@ -327,7 +327,7 @@ switch(uiAction) { pCreature->SummonCreature(NPC_CRUSADER_1_4, SpawnLoc[6].x, SpawnLoc[6].y, SpawnLoc[6].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_4))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } @@ -337,7 +337,7 @@ switch(uiAction) { pCreature->SummonCreature(NPC_CRUSADER_1_5, SpawnLoc[7].x, SpawnLoc[7].y, SpawnLoc[7].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_5))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } @@ -347,7 +347,7 @@ switch(uiAction) { pCreature->SummonCreature(NPC_CRUSADER_1_6, SpawnLoc[8].x, SpawnLoc[8].y, SpawnLoc[8].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_6))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } @@ -358,7 +358,7 @@ switch(uiAction) { pCreature->SummonCreature(NPC_CRUSADER_1_7, SpawnLoc[9].x, SpawnLoc[9].y, SpawnLoc[9].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_7))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } @@ -368,7 +368,7 @@ switch(uiAction) { pCreature->SummonCreature(NPC_CRUSADER_1_8, SpawnLoc[10].x, SpawnLoc[10].y, SpawnLoc[10].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_8))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } @@ -378,7 +378,7 @@ switch(uiAction) { pCreature->SummonCreature(NPC_CRUSADER_1_9, SpawnLoc[11].x, SpawnLoc[11].y, SpawnLoc[11].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_9))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } @@ -388,7 +388,7 @@ switch(uiAction) { pCreature->SummonCreature(NPC_CRUSADER_1_10, SpawnLoc[12].x, SpawnLoc[12].y, SpawnLoc[12].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_10))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } @@ -398,7 +398,7 @@ switch(uiAction) { pCreature->SummonCreature(NPC_CRUSADER_0_1, SpawnLoc[13].x, SpawnLoc[13].y, SpawnLoc[13].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_0_1))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } @@ -408,7 +408,7 @@ switch(uiAction) { pCreature->SummonCreature(NPC_CRUSADER_0_2, SpawnLoc[14].x, SpawnLoc[14].y, SpawnLoc[14].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_0_2))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } @@ -425,7 +425,7 @@ switch(uiAction) { pCreature->SummonCreature(NPC_CRUSADER_2_1, SpawnLoc[3].x, SpawnLoc[3].y, SpawnLoc[3].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_1))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } @@ -435,7 +435,7 @@ switch(uiAction) { pCreature->SummonCreature(NPC_CRUSADER_2_2, SpawnLoc[4].x, SpawnLoc[4].y, SpawnLoc[4].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_2))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } @@ -445,7 +445,7 @@ switch(uiAction) { pCreature->SummonCreature(NPC_CRUSADER_2_3, SpawnLoc[5].x, SpawnLoc[5].y, SpawnLoc[5].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_3))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } @@ -455,7 +455,7 @@ switch(uiAction) { pCreature->SummonCreature(NPC_CRUSADER_2_4, SpawnLoc[6].x, SpawnLoc[6].y, SpawnLoc[6].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_4))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } @@ -465,7 +465,7 @@ switch(uiAction) { pCreature->SummonCreature(NPC_CRUSADER_2_5, SpawnLoc[7].x, SpawnLoc[7].y, SpawnLoc[7].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_5))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } @@ -475,7 +475,7 @@ switch(uiAction) { pCreature->SummonCreature(NPC_CRUSADER_2_6, SpawnLoc[8].x, SpawnLoc[8].y, SpawnLoc[8].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_6))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } @@ -486,7 +486,7 @@ switch(uiAction) { pCreature->SummonCreature(NPC_CRUSADER_2_7, SpawnLoc[9].x, SpawnLoc[9].y, SpawnLoc[9].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_7))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } @@ -496,7 +496,7 @@ switch(uiAction) { pCreature->SummonCreature(NPC_CRUSADER_2_8, SpawnLoc[10].x, SpawnLoc[10].y, SpawnLoc[10].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_8))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } @@ -506,7 +506,7 @@ switch(uiAction) { pCreature->SummonCreature(NPC_CRUSADER_2_9, SpawnLoc[11].x, SpawnLoc[11].y, SpawnLoc[11].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_9))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } @@ -516,7 +516,7 @@ switch(uiAction) { pCreature->SummonCreature(NPC_CRUSADER_2_10, SpawnLoc[12].x, SpawnLoc[12].y, SpawnLoc[12].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_10))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } @@ -526,7 +526,7 @@ switch(uiAction) { pCreature->SummonCreature(NPC_CRUSADER_0_1, SpawnLoc[13].x, SpawnLoc[13].y, SpawnLoc[13].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_0_1))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } @@ -536,7 +536,7 @@ switch(uiAction) { pCreature->SummonCreature(NPC_CRUSADER_0_2, SpawnLoc[14].x, SpawnLoc[14].y, SpawnLoc[14].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_0_2))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } @@ -553,7 +553,7 @@ switch(uiAction) { pCreature->SummonCreature(NPC_LIGHTBANE, SpawnLoc[3].x, SpawnLoc[3].y, SpawnLoc[3].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_LIGHTBANE))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } @@ -563,7 +563,7 @@ switch(uiAction) { pCreature->SummonCreature(NPC_DARKBANE, SpawnLoc[4].x, SpawnLoc[4].y, SpawnLoc[4].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_DARKBANE))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } @@ -579,7 +579,7 @@ switch(uiAction) { pCreature->SummonCreature(NPC_ANUBARAK, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_ANUBARAK))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/def_pit.h b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/def_pit.h index a882b9a60..da0b141dc 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/def_pit.h +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/def_pit.h @@ -6,12 +6,12 @@ enum { MAX_ENCOUNTERS = 4, - TYPE_GARFROST = 0, + TYPE_GAFROST = 0, TYPE_KRICK = 1, TYPE_ICK = 2, TYPE_TIRANNUS = 3, - NPC_GARFROST = 36494, + NPC_GAFROST = 36494, NPC_KRICK = 36477, NPC_ICK = 36476, NPC_TIRANNUS = 36658 diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp index 67313012e..d833bf357 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp @@ -31,7 +31,7 @@ struct MANGOS_DLL_DECL instance_pit_of_saron : public ScriptedInstance //Creatures GUID uint32 m_auiEncounter[MAX_ENCOUNTERS+1]; - uint64 m_uiGarfrostGUID; + uint64 m_uiGafrostGUID; uint64 m_uiKrickGUID; uint64 m_uiIckGUID; uint64 m_uiTirannusGUID; @@ -54,7 +54,7 @@ struct MANGOS_DLL_DECL instance_pit_of_saron : public ScriptedInstance { for (uint8 i = 0; i < MAX_ENCOUNTERS; ++i) m_auiEncounter[i] = NOT_STARTED; - m_uiGarfrostGUID =0; + m_uiGafrostGUID =0; m_uiKrickGUID =0; m_uiIckGUID =0; m_uiTirannusGUID =0; @@ -64,7 +64,7 @@ struct MANGOS_DLL_DECL instance_pit_of_saron : public ScriptedInstance { switch(pCreature->GetEntry()) { - case NPC_GARFROST: m_uiGarfrostGUID = pCreature->GetGUID(); break; + case NPC_GAFROST: m_uiGafrostGUID = pCreature->GetGUID(); break; case NPC_KRICK: m_uiKrickGUID = pCreature->GetGUID(); break; case NPC_ICK: m_uiIckGUID = pCreature->GetGUID(); break; case NPC_TIRANNUS: m_uiTirannusGUID = pCreature->GetGUID(); break; @@ -81,7 +81,7 @@ struct MANGOS_DLL_DECL instance_pit_of_saron : public ScriptedInstance { switch(uiType) { - case TYPE_GARFROST: m_auiEncounter[0] = uiData; break; + case TYPE_GAFROST: m_auiEncounter[0] = uiData; break; case TYPE_KRICK: m_auiEncounter[1] = uiData; break; case TYPE_ICK: m_auiEncounter[2] = uiData; break; case TYPE_TIRANNUS: m_auiEncounter[3] = uiData; break; @@ -112,7 +112,7 @@ struct MANGOS_DLL_DECL instance_pit_of_saron : public ScriptedInstance { switch(uiType) { - case TYPE_GARFROST: return m_auiEncounter[0]; + case TYPE_GAFROST: return m_auiEncounter[0]; case TYPE_KRICK: return m_auiEncounter[1]; case TYPE_ICK: return m_auiEncounter[2]; case TYPE_TIRANNUS: return m_auiEncounter[3]; @@ -124,7 +124,7 @@ struct MANGOS_DLL_DECL instance_pit_of_saron : public ScriptedInstance { switch(uiData) { - case NPC_GARFROST: return m_uiGarfrostGUID; + case NPC_GAFROST: return m_uiGafrostGUID; case NPC_KRICK: return m_uiKrickGUID; case NPC_ICK: return m_uiIckGUID; case NPC_TIRANNUS: return m_uiTirannusGUID; diff --git a/scripts/northrend/naxxramas/boss_anubrekhan.cpp b/scripts/northrend/naxxramas/boss_anubrekhan.cpp index 5706a0654..4cd80b730 100644 --- a/scripts/northrend/naxxramas/boss_anubrekhan.cpp +++ b/scripts/northrend/naxxramas/boss_anubrekhan.cpp @@ -215,21 +215,21 @@ struct MANGOS_DLL_DECL boss_anubrekhanAI : public ScriptedAI Berserk_Timer = 300000; //Cast Impale on a random target //Do NOT cast it when we are afflicted by locust swarm - if (!m_creature->HasAura(SPELL_LOCUSTSWARM) || !m_creature->HasAura(SPELL_LOCUSTSWARM_H)) + if (!m_creature->HasAura(SPELL_LOCUSTSWARM) || !m_creature->HasAura(H_SPELL_LOCUSTSWARM)) { if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCastSpellIfCan(target, m_bIsRegularMode ? SPELL_IMPALE : SPELL_IMPALE_H); + DoCastSpellIfCan(target, Regular ? SPELL_IMPALE : H_SPELL_IMPALE); } }else Berserk_Timer -= diff; //SumonFirstCryptGuard_Timer -// if (SummonFirst_Timer < diff) -// { -// if (CryptGuard_count < MAX_CRYPT_GUARDS) -// DoSpawnCreature(MOB_CRYPT_GUARD,0,0,0,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,10000); -// SummonFirst_Timer = 2000000; -// }else SummonFirst_Timer -= diff; + if (SummonFirst_Timer < diff) + { + if (CryptGuard_count < MAX_CRYPT_GUARDS) + DoSpawnCreature(MOB_CRYPT_GUARD,0,0,0,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,10000); + SummonFirst_Timer = 2000000; + }else SummonFirst_Timer -= diff; RiseFromCorpse_Timer = 60000 + (rand()%10000); std::list CryptGuards = GetCreaturesByEntry(MOB_CRYPT_GUARD); @@ -255,18 +255,19 @@ struct MANGOS_DLL_DECL boss_anubrekhanAI : public ScriptedAI pPlayer->CastSpell(pPlayer,SPELL_SELF_SPAWN_5,true); } CryptGuards.clear(); - }else RiseFromCorpse_Timer -= diff; - DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_LOCUSTSWARM :SPELL_LOCUSTSWARM_H); - m_uiLocustSwarmTimer = 90000; - } - else - m_uiLocustSwarmTimer -= uiDiff; + +// }else RiseFromCorpse_Timer -= diff; +// DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_LOCUSTSWARM :SPELL_LOCUSTSWARM_H); +// m_uiLocustSwarmTimer = 90000; +// } +// else +// m_uiLocustSwarmTimer -= uiDiff; //Impale_Timer if (Impale_Timer < diff) { //Cast Impale on a random target //Do NOT cast it when we are afflicted by locust swarm - if (!m_creature->HasAura(Regular ? SPELL_LOCUSTSWARM : H_SPELL_LOCUSTSWARM, 1)) +// if (!m_creature->HasAura(Regular ? SPELL_LOCUSTSWARM : H_SPELL_LOCUSTSWARM, 1)) if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1)) DoCast(target,Regular ? SPELL_IMPALE : H_SPELL_IMPALE); Impale_Timer = 15000; @@ -283,22 +284,22 @@ struct MANGOS_DLL_DECL boss_anubrekhanAI : public ScriptedAI DoSpawnCreature(MOB_CRYPT_GUARD,0,0,0,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,10000); LocustSwarm_Timer = 20000; }else LocustSwarm_Timer -= diff; - DoCastSpellIfCan(m_creature, SPELL_SUMMONGUARD); - Summon_Timer = 45000; - } - else - { - if (LocustSwarm_Timer < diff) - { - swarm = false; - LocustSwarm_Timer = 60000 + rand()%20000; - }else LocustSwarm_Timer -= diff; - } +// DoCastSpellIfCan(m_creature, SPELL_SUMMONGUARD); +// Summon_Timer = 45000; + +// else +// { +// if (LocustSwarm_Timer < diff) +// { +// swarm = false; +// LocustSwarm_Timer = 60000 + rand()%20000; +// }else LocustSwarm_Timer -= diff; DoMeleeAttackIfReady(); - } + } }; + CreatureAI* GetAI_boss_anubrekhan(Creature *_Creature) { return new boss_anubrekhanAI (_Creature); diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp index 4073f049f..355a954e2 100644 --- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp @@ -191,12 +191,12 @@ struct MANGOS_DLL_DECL mob_tribuna_controllerAI : public ScriptedAI if (uiPositionCounter == 0) { (*itr)->GetMap()->CreatureRelocation((*itr), 927.265, 333.200, 218.780, (*itr)->GetOrientation()); - (*itr)->SendMonsterMove(927.265, 333.200, 218.780, 0, (*itr)->GetMonsterMoveFlags(), 1); + (*itr)->SendMonsterMove(927.265, 333.200, 218.780, 0, (*itr)->GetSplineFlags(), 1); } else { (*itr)->GetMap()->CreatureRelocation((*itr), 921.745, 328.076, 218.780, (*itr)->GetOrientation()); - (*itr)->SendMonsterMove(921.745, 328.076, 218.780, 0, (*itr)->GetMonsterMoveFlags(), 1); + (*itr)->SendMonsterMove(921.745, 328.076, 218.780, 0, (*itr)->GetSplineFlags(), 1); } } ++uiPositionCounter; diff --git a/scripts/northrend/violet_hold/boss_erekem.cpp b/scripts/northrend/violet_hold/boss_erekem.cpp index 9905a0c9c..cc845f009 100644 --- a/scripts/northrend/violet_hold/boss_erekem.cpp +++ b/scripts/northrend/violet_hold/boss_erekem.cpp @@ -144,7 +144,7 @@ struct MANGOS_DLL_DECL boss_erekemAI : public ScriptedAI { if (m_pInstance->GetData(TYPE_EREKEM) == SPECIAL && !MovementStarted) { m_creature->GetMotionMaster()->MovePoint(0, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z); - m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); MovementStarted = true; @@ -278,7 +278,7 @@ struct MANGOS_DLL_DECL mob_erekem_guardAI : public ScriptedAI { if (m_pInstance->GetData(TYPE_EREKEM) == SPECIAL && !MovementStarted) { m_creature->GetMotionMaster()->MovePoint(0, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z); - m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); MovementStarted = true; diff --git a/scripts/northrend/violet_hold/boss_ichoron.cpp b/scripts/northrend/violet_hold/boss_ichoron.cpp index dd6c3c648..75fdadd16 100644 --- a/scripts/northrend/violet_hold/boss_ichoron.cpp +++ b/scripts/northrend/violet_hold/boss_ichoron.cpp @@ -161,7 +161,7 @@ struct MANGOS_DLL_DECL boss_ichoronAI : public ScriptedAI { if (m_pInstance->GetData(TYPE_ICHORON) == SPECIAL && !MovementStarted) { m_creature->GetMotionMaster()->MovePoint(0, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z); - m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); MovementStarted = true; diff --git a/scripts/northrend/violet_hold/boss_lavanthor.cpp b/scripts/northrend/violet_hold/boss_lavanthor.cpp index 399b1bd4d..8c101da94 100644 --- a/scripts/northrend/violet_hold/boss_lavanthor.cpp +++ b/scripts/northrend/violet_hold/boss_lavanthor.cpp @@ -97,7 +97,7 @@ struct MANGOS_DLL_DECL boss_lavanthorAI : public ScriptedAI { if (m_pInstance->GetData(TYPE_LAVANTHOR) == SPECIAL && !MovementStarted) { m_creature->GetMotionMaster()->MovePoint(0, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z); - m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); MovementStarted = true; diff --git a/scripts/northrend/violet_hold/boss_moragg.cpp b/scripts/northrend/violet_hold/boss_moragg.cpp index ee5744f59..6aa6196df 100644 --- a/scripts/northrend/violet_hold/boss_moragg.cpp +++ b/scripts/northrend/violet_hold/boss_moragg.cpp @@ -95,7 +95,7 @@ struct MANGOS_DLL_DECL boss_moraggAI : public ScriptedAI { if (m_pInstance->GetData(TYPE_MORAGG) == SPECIAL && !MovementStarted) { m_creature->GetMotionMaster()->MovePoint(0, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z); - m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); MovementStarted = true; diff --git a/scripts/northrend/violet_hold/boss_xevozz.cpp b/scripts/northrend/violet_hold/boss_xevozz.cpp index 85d213289..53211287a 100644 --- a/scripts/northrend/violet_hold/boss_xevozz.cpp +++ b/scripts/northrend/violet_hold/boss_xevozz.cpp @@ -140,7 +140,7 @@ struct MANGOS_DLL_DECL boss_xevozzAI : public ScriptedAI { if (m_pInstance->GetData(TYPE_XEVOZZ) == SPECIAL && !MovementStarted) { m_creature->GetMotionMaster()->MovePoint(0, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z); - m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); MovementStarted = true; diff --git a/scripts/northrend/violet_hold/boss_zuramat.cpp b/scripts/northrend/violet_hold/boss_zuramat.cpp index 0d82026cf..27a26da39 100644 --- a/scripts/northrend/violet_hold/boss_zuramat.cpp +++ b/scripts/northrend/violet_hold/boss_zuramat.cpp @@ -139,7 +139,7 @@ struct MANGOS_DLL_DECL boss_zuramatAI : public ScriptedAI { if (m_pInstance->GetData(TYPE_ZURAMAT) == SPECIAL && !MovementStarted) { m_creature->GetMotionMaster()->MovePoint(0, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z); - m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); MovementStarted = true; diff --git a/scripts/northrend/violet_hold/violet_hold.cpp b/scripts/northrend/violet_hold/violet_hold.cpp index 823db4e03..ff5b19c76 100644 --- a/scripts/northrend/violet_hold/violet_hold.cpp +++ b/scripts/northrend/violet_hold/violet_hold.cpp @@ -174,7 +174,7 @@ struct MANGOS_DLL_DECL mob_vh_dragonsAI : public ScriptedAI } WayPoint = WayPointList.begin(); - m_creature->AddMonsterMoveFlag(MONSTER_MOVE_WALK); + m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); IsWalking = true; MovementStarted = true; } @@ -217,7 +217,7 @@ struct MANGOS_DLL_DECL mob_vh_dragonsAI : public ScriptedAI IsWalking = false; WayPointList.clear(); m_creature->GetMotionMaster()->Clear(false); - m_creature->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); DoCast(pDoorSeal, SPELL_CORRUPT); m_pInstance->SetData(TYPE_DOOR,SPECIAL); } @@ -745,7 +745,7 @@ struct MANGOS_DLL_DECL npc_azure_saboteurAI : public ScriptedAI m_bIsActiving = false; m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - m_creature->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK); + m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); m_uiDisruptionCounter = 0; m_uiDisruptionsCount = 0; m_uiDisruption_Timer = 1000; diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index faac87f93..665917b3b 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -380,7 +380,7 @@ extern void AddSC_boss_devourer_of_souls(); extern void AddSC_boss_bronjahm(); extern void AddSC_instance_pit_of_saron(); -extern void AddSC_boss_forgemaster_garfrost(); +extern void AddSC_boss_forgemaster_gafrost(); extern void AddSC_boss_krick(); extern void AddSC_boss_scourgelord_tirannus(); @@ -833,7 +833,7 @@ void AddScripts() AddSC_boss_bronjahm(); AddSC_instance_pit_of_saron(); - AddSC_boss_forgemaster_garfrost(); + AddSC_boss_forgemaster_gafrost(); AddSC_boss_krick(); AddSC_boss_scourgelord_tirannus(); From 4217c854b49caa8d1c7d8639a01b31ba7f55eb6b Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Tue, 9 Feb 2010 20:56:36 +0300 Subject: [PATCH 135/405] Icecrown bosses added --- addition/721_icecrown_mangos.sql | 26 +++- .../boss_deathbringer_saurfang.cpp | 130 +++++++++++++++++- .../boss_lady_deathwhisper.cpp | 106 ++++++++++++-- .../icecrown_citadel/boss_lord_marrowgar.cpp | 57 ++++++-- .../icecrown_citadel/def_spire.h | 13 +- .../icecrown_citadel/icecrown_teleport.cpp | 15 +- .../instance_icecrown_spire.cpp | 41 +++++- 7 files changed, 347 insertions(+), 41 deletions(-) diff --git a/addition/721_icecrown_mangos.sql b/addition/721_icecrown_mangos.sql index 6615e0ba6..918ee0132 100644 --- a/addition/721_icecrown_mangos.sql +++ b/addition/721_icecrown_mangos.sql @@ -12,12 +12,12 @@ REPLACE INTO `locales_creature` values ('99322','IceCrown teleporter','','','',' DELETE FROM `creature` WHERE `guid` IN (599322,599323,599324,599325,599326,599327); INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES -(599322, 99322, 631, 3, 1, 0, 0, -209.5, 2211.91, 199.97, 0, 3600, 0, 0, 64200, 12300, 0, 0), -(599323, 99322, 631, 3, 1, 0, 0, -503.62, 2211.47, 62.8235, 0, 3600, 0, 0, 64200, 12300, 0, 0), -(599324, 99322, 631, 3, 1, 0, 0, -17.1928, 2211.44, 30.1158, 0, 3600, 0, 0, 64200, 12300, 0, 0), -(599325, 99322, 631, 3, 1, 0, 0, -549.131, 2211.29, 539.291, 0, 3600, 0, 0, 64200, 12300, 0, 0), -(599326, 99322, 631, 3, 1, 0, 0, -615.145, 2211.47, 199.972, 0, 3600, 0, 0, 64200, 12300, 0, 0), -(599327, 99322, 631, 3, 1, 0, 0, 4198.42, 2769.22, 351.065, 0, 3600, 0, 0, 64200, 12300, 0, 0); +(599322, 99322, 631, 15, 1, 0, 0, -209.5, 2211.91, 199.97, 0, 3600, 0, 0, 64200, 12300, 0, 0), +(599323, 99322, 631, 15, 1, 0, 0, -503.62, 2211.47, 62.8235, 0, 3600, 0, 0, 64200, 12300, 0, 0), +(599324, 99322, 631, 15, 1, 0, 0, -17.1928, 2211.44, 30.1158, 0, 3600, 0, 0, 64200, 12300, 0, 0), +(599325, 99322, 631, 15, 1, 0, 0, -549.131, 2211.29, 539.291, 0, 3600, 0, 0, 64200, 12300, 0, 0), +(599326, 99322, 631, 15, 1, 0, 0, -615.145, 2211.47, 199.972, 0, 3600, 0, 0, 64200, 12300, 0, 0), +(599327, 99322, 631, 15, 1, 0, 0, 4198.42, 2769.22, 351.065, 0, 3600, 0, 0, 64200, 12300, 0, 0); DELETE FROM `locales_npc_text` WHERE `entry` = 99322; INSERT INTO `locales_npc_text` (`entry`, `Text0_0_loc1`, `Text0_0_loc2`, `Text0_0_loc3`, `Text0_0_loc4`, `Text0_0_loc5`, `Text0_0_loc6`, `Text0_0_loc7`, `Text0_0_loc8`, `Text0_1_loc1`, `Text0_1_loc2`, `Text0_1_loc3`, `Text0_1_loc4`, `Text0_1_loc5`, `Text0_1_loc6`, `Text0_1_loc7`, `Text0_1_loc8`, `Text1_0_loc1`, `Text1_0_loc2`, `Text1_0_loc3`, `Text1_0_loc4`, `Text1_0_loc5`, `Text1_0_loc6`, `Text1_0_loc7`, `Text1_0_loc8`, `Text1_1_loc1`, `Text1_1_loc2`, `Text1_1_loc3`, `Text1_1_loc4`, `Text1_1_loc5`, `Text1_1_loc6`, `Text1_1_loc7`, `Text1_1_loc8`, `Text2_0_loc1`, `Text2_0_loc2`, `Text2_0_loc3`, `Text2_0_loc4`, `Text2_0_loc5`, `Text2_0_loc6`, `Text2_0_loc7`, `Text2_0_loc8`, `Text2_1_loc1`, `Text2_1_loc2`, `Text2_1_loc3`, `Text2_1_loc4`, `Text2_1_loc5`, `Text2_1_loc6`, `Text2_1_loc7`, `Text2_1_loc8`, `Text3_0_loc1`, `Text3_0_loc2`, `Text3_0_loc3`, `Text3_0_loc4`, `Text3_0_loc5`, `Text3_0_loc6`, `Text3_0_loc7`, `Text3_0_loc8`, `Text3_1_loc1`, `Text3_1_loc2`, `Text3_1_loc3`, `Text3_1_loc4`, `Text3_1_loc5`, `Text3_1_loc6`, `Text3_1_loc7`, `Text3_1_loc8`, `Text4_0_loc1`, `Text4_0_loc2`, `Text4_0_loc3`, `Text4_0_loc4`, `Text4_0_loc5`, `Text4_0_loc6`, `Text4_0_loc7`, `Text4_0_loc8`, `Text4_1_loc1`, `Text4_1_loc2`, `Text4_1_loc3`, `Text4_1_loc4`, `Text4_1_loc5`, `Text4_1_loc6`, `Text4_1_loc7`, `Text4_1_loc8`, `Text5_0_loc1`, `Text5_0_loc2`, `Text5_0_loc3`, `Text5_0_loc4`, `Text5_0_loc5`, `Text5_0_loc6`, `Text5_0_loc7`, `Text5_0_loc8`, `Text5_1_loc1`, `Text5_1_loc2`, `Text5_1_loc3`, `Text5_1_loc4`, `Text5_1_loc5`, `Text5_1_loc6`, `Text5_1_loc7`, `Text5_1_loc8`, `Text6_0_loc1`, `Text6_0_loc2`, `Text6_0_loc3`, `Text6_0_loc4`, `Text6_0_loc5`, `Text6_0_loc6`, `Text6_0_loc7`, `Text6_0_loc8`, `Text6_1_loc1`, `Text6_1_loc2`, `Text6_1_loc3`, `Text6_1_loc4`, `Text6_1_loc5`, `Text6_1_loc6`, `Text6_1_loc7`, `Text6_1_loc8`, `Text7_0_loc1`, `Text7_0_loc2`, `Text7_0_loc3`, `Text7_0_loc4`, `Text7_0_loc5`, `Text7_0_loc6`, `Text7_0_loc7`, `Text7_0_loc8`, `Text7_1_loc1`, `Text7_1_loc2`, `Text7_1_loc3`, `Text7_1_loc4`, `Text7_1_loc5`, `Text7_1_loc6`, `Text7_1_loc7`, `Text7_1_loc8`) VALUES @@ -37,7 +37,7 @@ INSERT INTO `npc_text` (`ID`, `text0_0`, `text0_1`, `lang0`, `prob0`, `em0_0`, ` UPDATE `instance_template` SET `script`='instance_icecrown_spire' WHERE `map`=631; --- UPDATE `creature_template` SET `ScriptName`='boss_deathbringer_saurfang' WHERE `entry`=37813; +UPDATE `creature_template` SET `ScriptName`='boss_deathbringer_saurfang' WHERE `entry`=37813; UPDATE `creature_template` SET `ScriptName`='boss_lady_deathwhisper' WHERE `entry`=36855; @@ -45,3 +45,15 @@ UPDATE `creature_template` SET `ScriptName`='boss_lord_marrowgar' WHERE `entry`= UPDATE `gameobject_template` SET `faction` = '114',`data0` = '0' WHERE `gameobject_template`.`entry` IN (201910,201911); UPDATE `gameobject` SET `state` = '1' WHERE `guid` IN (72526,72525); + +DELETE FROM `creature` WHERE `guid` IN (81531, 83459, 78383, 78385, 81170, 81535, 81165, 81168, 124864); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES +(81531, 37230, 631, 15, 1, 0, 0, -541.262, 2287.1, 199.97, 2.73098, 300, 0, 0, 1078480, 41690, 0, 0), +(83459, 37230, 631, 15, 1, 0, 0, -536.326, 2125.85, 199.97, 2.86921, 300, 0, 0, 1078480, 41690, 0, 0), +(78383, 37230, 631, 15, 1, 0, 0, -436.712, 2078.51, 191.254, 3.82738, 300, 0, 0, 1078480, 41690, 0, 0), +(78385, 37230, 631, 15, 1, 0, 0, -436.977, 2345.78, 191.254, 3.53716, 300, 0, 0, 1078480, 41690, 0, 0), +(81170, 37230, 631, 15, 1, 0, 0, -302.465, 2229.49, 199.982, 2.04961, 300, 0, 0, 1078480, 41690, 0, 0), +(81535, 37230, 631, 15, 1, 0, 0, -223.486, 2200.9, 199.97, 3.07063, 300, 0, 0, 1078480, 41690, 0, 0), +(81165, 37230, 631, 15, 1, 0, 0, -505.65, 2320, 199.969, 0.369649, 300, 0, 0, 1078480, 41690, 0, 0), +(81168, 37230, 631, 15, 1, 0, 0, -298.341, 2203.06, 199.983, 4.17647, 300, 0, 0, 1078480, 41690, 0, 0), +(124864, 37230, 631, 15, 1, 0, 0, -222.214, 2220.68, 199.97, 3.1586, 300, 0, 0, 1078480, 41690, 0, 0); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp index a031819e4..4253902c2 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp @@ -1,6 +1,55 @@ +/* Copyright (C) 2006 - 2010 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_deathbringer_saurfang +SD%Complete: 10% +SDComment: by /dev/rsa +SDCategory: Icecrown Citadel +EndScriptData */ + #include "precompiled.h" #include "def_spire.h" +enum +{ + //common + SPELL_BERSERK = 47008, + //yells + //summons + NPC_BLOOD_BEASTS = 38508, + //Abilities + SPELL_BLOOD_LINK = 72178, + SPELL_BLOOD_POWER = 72371, + SPELL_MARK_N = 72293, + SPELL_FRENZY = 72737, + SPELL_BOILING_BLOOD_N = 72385, + SPELL_BLOOD_NOVA_N = 72380, + SPELL_RUNE_OF_BLOOD_N = 72408, + SPELL_CALL_BLOOD_BEASTS = 72173, + SPELL_SCENT_OF_BLOOD = 72769, + SPELL_RESISTANT_SKIN = 72723, + + SPELL_MARK_H = 72444, + SPELL_BOILING_BLOOD_H = 72442, + SPELL_BLOOD_NOVA_H = 72438, + SPELL_RUNE_OF_BLOOD_H = 72448, + +}; + struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI { boss_deathbringer_saurfangAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -11,11 +60,39 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI } bool Regular; + bool m_uiIsFrenzy; ScriptedInstance *pInstance; + uint32 m_uiBerserk_Timer; + uint32 m_uiBloodLink_Timer; + uint32 m_uiBloodNova_Timer; + uint32 m_uiBoilingBlood_Timer; + uint32 m_uiSummon_Timer; + + uint8 health; + uint8 stage; void Reset() { - if(pInstance) pInstance->SetData(TYPE_SAURFANG, NOT_STARTED); + if(pInstance) pInstance->SetData(TYPE_SAURFANG, NOT_STARTED); + m_uiBerserk_Timer = 480000; + m_uiIsFrenzy = false; + stage = 0; + + uint32 m_uiBloodLink_Timer = 10000; + uint32 m_uiBloodNova_Timer = 30000; + uint32 m_uiBoilingBlood_Timer = 30000; + uint32 m_uiSummon_Timer =40000; + + } + uint64 CallGuard(uint64 npctype,TempSummonType type, uint32 _summontime ) + { + float fPosX, fPosY, fPosZ; + m_creature->GetPosition(fPosX, fPosY, fPosZ); + m_creature->GetRandomPoint(fPosX, fPosY, fPosZ, urand(15, 25), fPosX, fPosY, fPosZ); + Creature* pSummon = m_creature->SummonCreature(npctype, fPosX, fPosY, fPosZ, 0, type, _summontime); + if(pSummon) pSummon->SetInCombatWithZone(); +// DoScriptText(EMOTE_SUMMON, m_creature); + return pSummon ? pSummon->GetGUID() : 0; } void Aggro(Unit *who) @@ -33,6 +110,57 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + switch(stage) + { + case 0: { + break;} + case 1: { + if (!m_uiIsFrenzy) { + DoCastSpellIfCan(m_creature, SPELL_FRENZY); + m_uiIsFrenzy = true; + stage = 2; + } + break;} + + case 2: { + break;} + } + + if (m_uiBloodLink_Timer < diff) { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCastSpellIfCan(pTarget, SPELL_BLOOD_LINK); + m_uiBloodLink_Timer=urand(8000,15000); + } else m_uiBloodLink_Timer -= diff; + + if (m_uiBloodNova_Timer < diff) { + DoCastSpellIfCan(m_creature->getVictim(), Regular ? SPELL_BLOOD_NOVA_N : SPELL_BLOOD_NOVA_H); + m_uiBloodNova_Timer=urand(30000,35000); + } else m_uiBloodNova_Timer -= diff; + + if (m_uiBoilingBlood_Timer < diff) { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCastSpellIfCan(pTarget, Regular ? SPELL_BOILING_BLOOD_N : SPELL_BOILING_BLOOD_H); + m_uiBoilingBlood_Timer=urand(20000,40000); + } else m_uiBoilingBlood_Timer -= diff; + + if (m_uiSummon_Timer < diff) + { + CallGuard(NPC_BLOOD_BEASTS, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5000); + CallGuard(NPC_BLOOD_BEASTS, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5000); + if(!Regular) CallGuard(NPC_BLOOD_BEASTS, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5000); + if(!Regular) CallGuard(NPC_BLOOD_BEASTS, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5000); + m_uiSummon_Timer=40000; + } else m_uiSummon_Timer -= diff; + + health = m_creature->GetHealth()*100 / m_creature->GetMaxHealth(); + if (health <= 30 && stage == 0) stage = 1; + + if (m_uiBerserk_Timer < diff) + { + DoCastSpellIfCan(m_creature, SPELL_BERSERK); + m_uiBerserk_Timer = 600000; + } else m_uiBerserk_Timer -= diff; + DoMeleeAttackIfReady(); } }; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp index 5cf5087d1..2f208d9a5 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp @@ -1,3 +1,26 @@ +/* Copyright (C) 2006 - 2010 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_lady_deathwhisper +SD%Complete: 10% +SDComment: by /dev/rsa +SDCategory: Icecrown Citadel +EndScriptData */ + #include "precompiled.h" #include "def_spire.h" enum @@ -6,9 +29,12 @@ enum SPELL_BERSERK = 47008, //yells //summons + NPC_VENGEFUL_SHADE = 38222, + NPC_FANATIC = 38009, + NPC_ADHERENT = 38010, //Abilities - SPELL_MANA_BARRIER_N = 70842, - SPELL_SHADOW_BOLT_N = 41254, + SPELL_MANA_BARRIER = 70842, + SPELL_SHADOW_BOLT_N = 71254, SPELL_DEATH_AND_DECAY_N = 71001, SPELL_DARK_EMPOWERMENT_N = 70901, SPELL_FROSTBOLT_N = 71420, @@ -40,12 +66,15 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI uint32 m_uiInsignificance_Timer; uint32 m_uiDominateMind_Timer; uint32 m_uiBerserk_Timer; + uint32 m_uiSummon_Timer; + bool isManaBarrier; uint8 health; void Reset() { if(pInstance) pInstance->SetData(TYPE_DEATHWHISPER, NOT_STARTED); m_uiManaBarrier_Timer = 30000; + m_uiSummon_Timer = 30000; m_uiShadowBolt_Timer = urand(8000,10000); m_uiDeathAndDecay_Timer = urand(10000,20000); m_uiDarkEmpowerment_Timer = 45000; @@ -54,12 +83,26 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI m_uiDominateMind_Timer = 30000; m_uiBerserk_Timer = 600000; stage = 0; - + isManaBarrier = false; + } + + uint64 CallGuard(uint64 npctype,TempSummonType type, uint32 _summontime ) + { + float fPosX, fPosY, fPosZ; + m_creature->GetPosition(fPosX, fPosY, fPosZ); + m_creature->GetRandomPoint(fPosX, fPosY, fPosZ, urand(15, 25), fPosX, fPosY, fPosZ); + Creature* pSummon = m_creature->SummonCreature(npctype, fPosX, fPosY, fPosZ, 0, type, _summontime); + if(pSummon) pSummon->SetInCombatWithZone(); +// DoScriptText(EMOTE_SUMMON, m_creature); + return pSummon ? pSummon->GetGUID() : 0; } + void Aggro(Unit *who) { if(pInstance) pInstance->SetData(TYPE_DEATHWHISPER, IN_PROGRESS); + DoCastSpellIfCan(m_creature, SPELL_MANA_BARRIER ); + isManaBarrier = true; } void JustDied(Unit *killer) @@ -67,6 +110,24 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI if(pInstance) pInstance->SetData(TYPE_DEATHWHISPER, DONE); } + void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + { + if (!m_creature || !m_creature->isAlive()) + return; + if (isManaBarrier) { + m_creature->SetPower(POWER_MANA,m_creature->GetPower(POWER_MANA)-uiDamage*4); + uiDamage = 0; + if(m_creature->GetHealth() <= m_creature->GetMaxHealth()) { + m_creature->SetPower(POWER_MANA,m_creature->GetPower(POWER_MANA)-(m_creature->GetMaxHealth()- m_creature->GetHealth())*4); + m_creature->SetHealth(m_creature->GetMaxHealth()); + }; + if(m_creature->GetPower(POWER_MANA) <= m_creature->GetMaxPower(POWER_MANA)/10 ) { + m_creature->RemoveAurasDueToSpell(SPELL_MANA_BARRIER); + isManaBarrier = false; + }; + } else return; + } + void UpdateAI(const uint32 diff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -77,13 +138,24 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI case 0: { if (m_uiShadowBolt_Timer < diff) { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, Regular ? SPELL_SHADOW_BOLT_N : SPELL_SHADOW_BOLT_H ); - m_uiDeathAndDecay_Timer=urand(8000,10000); + DoCastSpellIfCan(pTarget, Regular ? SPELL_SHADOW_BOLT_N : SPELL_SHADOW_BOLT_H ); + m_uiShadowBolt_Timer=urand(8000,10000); } else m_uiShadowBolt_Timer -= diff; + if (m_uiSummon_Timer < diff) + { +// CallGuard(NPC_FANATIC, TEMPSUMMON_TIMED_DESPAWN, 30000); +// CallGuard(NPC_ADHERENT, TEMPSUMMON_TIMED_DESPAWN, 30000); + if(!Regular){ +// CallGuard(NPC_FANATIC, TEMPSUMMON_TIMED_DESPAWN, 30000); +// CallGuard(NPC_ADHERENT, TEMPSUMMON_TIMED_DESPAWN, 30000); + }; + m_uiSummon_Timer=20000; + } else m_uiSummon_Timer -= diff; + /* if (m_uiDarkEmpowerment_Timer < diff) { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, DARK_EMPOWERMENT_N); + DoCastSpellIfCan(pTarget, DARK_EMPOWERMENT_N); m_uiDarkEmpowerment_Timer=urand(20000,40000); } else m_uiDarkEmpowerment_Timer -= diff; */ @@ -92,35 +164,43 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI case 1: { if (m_uiFrostBolt_Timer < diff) {if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, Regular ? SPELL_FROSTBOLT_N : SPELL_FROSTBOLT_H); + DoCastSpellIfCan(pTarget, Regular ? SPELL_FROSTBOLT_N : SPELL_FROSTBOLT_H); m_uiFrostBolt_Timer=urand(8000,15000); } else m_uiFrostBolt_Timer -= diff; if (m_uiInsignificance_Timer < diff) { - DoCast(m_creature->getVictim(), SPELL_INSIGNIFICANCE_N); + DoCastSpellIfCan(m_creature->getVictim(), SPELL_INSIGNIFICANCE_N); m_uiInsignificance_Timer=urand(20000,40000); } else m_uiInsignificance_Timer -= diff; + if (m_uiSummon_Timer < diff) + { + CallGuard(NPC_VENGEFUL_SHADE, TEMPSUMMON_TIMED_DESPAWN, 30000); + if(!Regular) CallGuard(NPC_VENGEFUL_SHADE, TEMPSUMMON_TIMED_DESPAWN, 30000); + m_uiSummon_Timer=20000; + } else m_uiSummon_Timer -= diff; + + break;} } if (m_uiDeathAndDecay_Timer < diff) - {DoCast(m_creature->getVictim(), SPELL_DEATH_AND_DECAY_N); + {DoCastSpellIfCan(m_creature->getVictim(), SPELL_DEATH_AND_DECAY_N); m_uiDeathAndDecay_Timer=urand(10000,15000); } else m_uiDeathAndDecay_Timer -= diff; if (m_uiDominateMind_Timer < diff) {if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, SPELL_DOMINATE_MIND_H); + DoCastSpellIfCan(pTarget, SPELL_DOMINATE_MIND_H); m_uiDominateMind_Timer=urand(25000,35000); } else m_uiDominateMind_Timer -= diff; - health = m_creature->GetHealth()*100 / m_creature->GetMaxHealth(); - if (health <= 50) stage = 1; + health = m_creature->GetHealth()*100 / m_creature->GetMaxHealth(); + if (!isManaBarrier && stage == 0) stage = 1; if (m_uiBerserk_Timer < diff) { - DoCast(m_creature, SPELL_BERSERK); + DoCastSpellIfCan(m_creature, SPELL_BERSERK); m_uiBerserk_Timer = 600000; } else m_uiBerserk_Timer -= diff; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp index 7d3fa15a9..599b03c2a 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp @@ -1,3 +1,26 @@ +/* Copyright (C) 2006 - 2010 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_lord_marrowgar +SD%Complete: 10% +SDComment: by /dev/rsa +SDCategory: Icecrown Citadel +EndScriptData */ + #include "precompiled.h" #include "def_spire.h" enum @@ -33,6 +56,7 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI uint32 m_uiSaberLash_Timer; uint32 m_uiColdFlame_Timer; uint32 m_uiBoneStrike_Timer; + bool m_uiBoneStorm; bool m_uiBoneStorm_Timer; uint32 m_uiBerserk_Timer; uint8 health; @@ -44,7 +68,8 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI m_uiSaberLash_Timer = 10000; m_uiColdFlame_Timer = 25000; m_uiBoneStrike_Timer = urand(17000,29000); - m_uiBoneStorm_Timer = false; + m_uiBoneStorm = false; + m_uiBoneStorm_Timer = 40000; m_uiBerserk_Timer = 600000; if(pInstance) pInstance->SetData(TYPE_MARROWGAR, NOT_STARTED); @@ -70,37 +95,47 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI case 0: { if (m_uiBoneStrike_Timer < diff) { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, Regular ? SPELL_BONE_STRIKE_N :SPELL_BONE_STRIKE_H); + DoCastSpellIfCan(pTarget, Regular ? SPELL_BONE_STRIKE_N :SPELL_BONE_STRIKE_H); m_uiBoneStrike_Timer=urand(17000,29000); - } else m_uiSaberLash_Timer -= diff; + } else m_uiBoneStrike_Timer -= diff; break;} case 1: { - if (!m_uiBoneStorm_Timer) + if (!m_uiBoneStorm) {if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, Regular ? SPELL_BONE_STORM_N :SPELL_BONE_STORM_H); - m_uiBoneStorm_Timer = true; + DoCastSpellIfCan(pTarget, Regular ? SPELL_BONE_STORM_N : SPELL_BONE_STORM_H); + m_uiBoneStorm = true; + stage = 2; } break;} - } + case 2: { + if (m_uiBoneStorm_Timer < diff) + { + m_creature->RemoveAurasDueToSpell(Regular ? SPELL_BONE_STORM_N : SPELL_BONE_STORM_H); + m_creature->SetInCombatWithZone(); + stage = 3; + } else m_uiBoneStorm_Timer -= diff; + break;} + case 3: break; + } if (m_uiSaberLash_Timer < diff) - {DoCast(m_creature->getVictim(), Regular ? SPELL_SABER_LASH_N :SPELL_SABER_LASH_H); + {DoCastSpellIfCan(m_creature->getVictim(), Regular ? SPELL_SABER_LASH_N :SPELL_SABER_LASH_H); m_uiSaberLash_Timer=urand(10000,15000); } else m_uiSaberLash_Timer -= diff; if (m_uiColdFlame_Timer < diff) {if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, Regular ? SPELL_COLD_FLAME_N :SPELL_COLD_FLAME_H); + DoCastSpellIfCan(pTarget, Regular ? SPELL_COLD_FLAME_N :SPELL_COLD_FLAME_H); m_uiColdFlame_Timer=urand(25000,35000); } else m_uiColdFlame_Timer -= diff; health = m_creature->GetHealth()*100 / m_creature->GetMaxHealth(); - if (health <= 50) stage = 1; + if (health <= 50 && stage == 0) stage = 1; if (m_uiBerserk_Timer < diff) { - DoCast(m_creature, SPELL_BERSERK); + DoCastSpellIfCan(m_creature, SPELL_BERSERK); // m_uiBerserk_Timer = m_bIsRegularMode ? 300000 : 180000; } else m_uiBerserk_Timer -= diff; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h index ec8f607f8..d7f083ec7 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h @@ -7,7 +7,7 @@ enum MAP_NUM = 631, MAX_ENCOUNTERS = 15, - TYPE_START = 0, + TYPE_TELEPORT = 0, TYPE_MARROWGAR = 1, TYPE_DEATHWHISPER = 2, TYPE_SKULLS_PLATO = 3, @@ -15,17 +15,24 @@ enum TYPE_SAURFANG = 5, BASE_CAMP = 1000, + FLIGHT_WAR_1 = 1001, + FLIGHT_WAR_2 = 1002, NPC_LORD_MARROWGAR = 36612, - NPC_LADY_DEATHWHISPER = 36855, + NPC_LADY_DEATHWHISPER = 36855, NPC_DEATHBRINGER_SAURFANG = 37813, + NPC_FROSTWYRM1_GUID = 124864, + NPC_FROSTWYRM2_GUID = 81535, + GO_TELEPORT_GOSSIP_MESSAGE = 99323, TELEPORT_GOSSIP_MESSAGE = 99322, GO_ICEWALL_1 = 201911, GO_ICEWALL_2 = 201910, - GO_ORATORY_DOOR = 201563 + GO_ORATORY_DOOR = 201563, + GO_SAURFANG_DOOR = 201825, + }; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp index d7e004e8b..aeee48014 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp @@ -17,7 +17,7 @@ struct Locations static Locations PortalLoc[]= { -{"Молот света",-17.1928, 2211.44, 30.1158,1,true,true,TYPE_START}, // +{"Молот света",-17.1928, 2211.44, 30.1158,1,true,true,TYPE_TELEPORT}, // {"Шпиль",-503.62, 2211.47, 62.8235,0,false,true,TYPE_MARROWGAR}, // {"Черепной вал",-615.145, 2211.47, 199.972,3,false,true,TYPE_DEATHWHISPER}, // {"Воздушное сражение",-209.5, 2211.91, 199.97,4,false,true,TYPE_SKULLS_PLATO}, // @@ -38,12 +38,21 @@ struct MANGOS_DLL_DECL icecrown_teleporterAI : public ScriptedAI void Reset() { - m_pInstance->SetData(TYPE_START,DONE); + m_pInstance->SetData(TYPE_TELEPORT,0); } void UpdateAI(const uint32 diff) { if (!m_pInstance) return; + + Creature* pTemp1 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(FLIGHT_WAR_1)); + Creature* pTemp2 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(FLIGHT_WAR_2)); + if (pTemp1 && pTemp2) { + if (!pTemp1->isAlive() && !pTemp2->isAlive()) { + m_pInstance->SetData(TYPE_FLIGHT_WAR,DONE); + } + }; + } }; @@ -69,7 +78,7 @@ bool GossipHello_icecrown_teleporter(Player *player, Creature* pCreature) bool m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); for(uint8 i = 0; i < PORTALS_COUNT; i++) { - if (PortalLoc[i].active == true && (PortalLoc[i].state == true || pInstance->GetData(PortalLoc[i].encounter) == DONE)) + if (PortalLoc[i].active == true && (PortalLoc[i].state == true || pInstance->GetData(TYPE_TELEPORT) >= PortalLoc[i].encounter)) player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, PortalLoc[i].name, GOSSIP_SENDER_MAIN, i); }; player->SEND_GOSSIP_MENU(TELEPORT_GOSSIP_MESSAGE, pCreature->GetGUID()); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp index 58c619b58..d566f91f4 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp @@ -37,6 +37,10 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance uint64 m_uiIcewall1GUID; uint64 m_uiIcewall2GUID; + uint64 m_uiSaurfangDoorGUID; + + uint64 m_uiFrostwyrm1GUID; + uint64 m_uiFrostwyrm2GUID; void OpenDoor(uint64 guid) { @@ -56,9 +60,15 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance { for (uint8 i = 0; i < MAX_ENCOUNTERS; ++i) m_auiEncounter[i] = NOT_STARTED; + + m_auiEncounter[0] = 0; + m_uiMarrogwarGUID =0; m_uiDeathWhisperGUID =0; - m_uiSaurfangGUID =0; + m_uiSaurfangGUID = 0; + m_uiFrostwyrm1GUID = NPC_FROSTWYRM1_GUID; + m_uiFrostwyrm2GUID = NPC_FROSTWYRM2_GUID; + } void OnCreatureCreate(Creature* pCreature) @@ -87,30 +97,50 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance case GO_ICEWALL_2: m_uiIcewall2GUID = pGo->GetGUID(); break; + case GO_SAURFANG_DOOR: + m_uiSaurfangDoorGUID = pGo->GetGUID(); + break; } } void SetData(uint32 uiType, uint32 uiData) { switch(uiType) { + case TYPE_TELEPORT: + if (uiData > m_auiEncounter[0]) m_auiEncounter[0] = uiData; + uiData = NOT_STARTED; + break; case TYPE_MARROWGAR: m_auiEncounter[1] = uiData; if (uiData == DONE) { OpenDoor(m_uiIcewall1GUID); OpenDoor(m_uiIcewall1GUID); + m_auiEncounter[0] = TYPE_MARROWGAR; } break; case TYPE_DEATHWHISPER: m_auiEncounter[2] = uiData; + if (uiData == DONE) { + m_auiEncounter[0] = TYPE_DEATHWHISPER; + } break; case TYPE_SKULLS_PLATO: m_auiEncounter[3] = uiData; + if (uiData == DONE) { + m_auiEncounter[0] = TYPE_SKULLS_PLATO; + } break; case TYPE_FLIGHT_WAR: m_auiEncounter[4] = uiData; + if (uiData == DONE) { + m_auiEncounter[0] = TYPE_FLIGHT_WAR; + } break; case TYPE_SAURFANG: m_auiEncounter[5] = uiData; + if (uiData == DONE) { + m_auiEncounter[0] = TYPE_SAURFANG; + } break; } @@ -139,8 +169,9 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance { switch(uiType) { + case TYPE_TELEPORT: return m_auiEncounter[0]; case TYPE_MARROWGAR: return m_auiEncounter[1]; - case TYPE_DEATHWHISPER: return m_auiEncounter[2]; + case TYPE_DEATHWHISPER: return m_auiEncounter[2]; case TYPE_SKULLS_PLATO: return m_auiEncounter[3]; case TYPE_FLIGHT_WAR: return m_auiEncounter[4]; case TYPE_SAURFANG: return m_auiEncounter[5]; @@ -158,6 +189,10 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance return m_uiDeathWhisperGUID; case NPC_DEATHBRINGER_SAURFANG: return m_uiSaurfangGUID; + case FLIGHT_WAR_1: + return m_uiFrostwyrm1GUID; + case FLIGHT_WAR_2: + return m_uiFrostwyrm2GUID; } return 0; } @@ -178,7 +213,7 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance { loadStream >> m_auiEncounter[i]; - if (m_auiEncounter[i] == IN_PROGRESS) + if (m_auiEncounter[i] == IN_PROGRESS && i >= 1) m_auiEncounter[i] = NOT_STARTED; } From a4635c0763191d2f0477af264545c8bc7b16ff3b Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 10 Feb 2010 13:28:46 +0300 Subject: [PATCH 136/405] Icecrown change 4 --- Makefile.am | 1 + addition/721_icecrown_mangos.sql | 3 + .../boss_lady_deathwhisper.cpp | 78 +++++++- .../icecrown_citadel/def_spire.h | 16 +- .../icecrown_citadel/icecrown_spire.cpp | 183 ++++++++++++++++++ .../icecrown_citadel/icecrown_teleport.cpp | 63 +++--- .../instance_icecrown_spire.cpp | 55 ++++-- system/ScriptLoader.cpp | 2 + 8 files changed, 337 insertions(+), 64 deletions(-) create mode 100644 scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp diff --git a/Makefile.am b/Makefile.am index d5ce6ddfa..ea7070104 100644 --- a/Makefile.am +++ b/Makefile.am @@ -352,6 +352,7 @@ scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp \ scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp \ scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp \ scripts/northrend/icecrown_citadel/icecrown_citadel/gunship_battle.cpp \ +scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp \ scripts/northrend/naxxramas/boss_anubrekhan.cpp \ scripts/northrend/naxxramas/boss_faerlina.cpp \ scripts/northrend/naxxramas/boss_four_horsemen.cpp \ diff --git a/addition/721_icecrown_mangos.sql b/addition/721_icecrown_mangos.sql index 918ee0132..267079522 100644 --- a/addition/721_icecrown_mangos.sql +++ b/addition/721_icecrown_mangos.sql @@ -40,12 +40,15 @@ UPDATE `instance_template` SET `script`='instance_icecrown_spire' WHERE `map`=63 UPDATE `creature_template` SET `ScriptName`='boss_deathbringer_saurfang' WHERE `entry`=37813; UPDATE `creature_template` SET `ScriptName`='boss_lady_deathwhisper' WHERE `entry`=36855; +UPDATE `creature_template` SET `ScriptName`='mob_vengeful_shade', `AIName`='' WHERE `entry`= 38222; UPDATE `creature_template` SET `ScriptName`='boss_lord_marrowgar' WHERE `entry`= 36612; UPDATE `gameobject_template` SET `faction` = '114',`data0` = '0' WHERE `gameobject_template`.`entry` IN (201910,201911); UPDATE `gameobject` SET `state` = '1' WHERE `guid` IN (72526,72525); +UPDATE `creature_template` SET `ScriptName`='mob_spire_frostwyrm', `AIName`='' WHERE `entry`= 37230; + DELETE FROM `creature` WHERE `guid` IN (81531, 83459, 78383, 78385, 81170, 81535, 81165, 81168, 124864); INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (81531, 37230, 631, 15, 1, 0, 0, -541.262, 2287.1, 199.97, 2.73098, 300, 0, 0, 1078480, 41690, 0, 0), diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp index 2f208d9a5..856536bab 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp @@ -30,8 +30,10 @@ enum //yells //summons NPC_VENGEFUL_SHADE = 38222, - NPC_FANATIC = 38009, - NPC_ADHERENT = 38010, + NPC_FANATIC = 37890, + NPC_REANIMATED_FANATIC = 38009, + NPC_ADHERENT = 37949, + NPC_REANIMATED_ADHERENT = 38010, //Abilities SPELL_MANA_BARRIER = 70842, SPELL_SHADOW_BOLT_N = 71254, @@ -44,6 +46,8 @@ enum SPELL_FROSTBOLT_H = 72007, SPELL_DOMINATE_MIND_H = 71289, + SPELL_VENGEFUL_BLAST_N = 72011, + SPELL_VENGEFUL_BLAST_H = 72012, }; struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI @@ -144,21 +148,24 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI if (m_uiSummon_Timer < diff) { -// CallGuard(NPC_FANATIC, TEMPSUMMON_TIMED_DESPAWN, 30000); -// CallGuard(NPC_ADHERENT, TEMPSUMMON_TIMED_DESPAWN, 30000); + CallGuard(NPC_FANATIC, TEMPSUMMON_TIMED_DESPAWN, 30000); + CallGuard(NPC_ADHERENT, TEMPSUMMON_TIMED_DESPAWN, 30000); if(!Regular){ -// CallGuard(NPC_FANATIC, TEMPSUMMON_TIMED_DESPAWN, 30000); -// CallGuard(NPC_ADHERENT, TEMPSUMMON_TIMED_DESPAWN, 30000); + CallGuard(NPC_FANATIC, TEMPSUMMON_TIMED_DESPAWN, 30000); + CallGuard(NPC_ADHERENT, TEMPSUMMON_TIMED_DESPAWN, 30000); }; m_uiSummon_Timer=20000; } else m_uiSummon_Timer -= diff; -/* if (m_uiDarkEmpowerment_Timer < diff) - { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, DARK_EMPOWERMENT_N); + if (m_uiDarkEmpowerment_Timer < diff) + { + if(Creature *pGuard = GetClosestCreatureWithEntry(m_creature, NPC_FANATIC, 30.0f)) + DoCastSpellIfCan(pGuard, SPELL_DARK_EMPOWERMENT_N); + else if(Creature *pGuard = GetClosestCreatureWithEntry(m_creature, NPC_ADHERENT, 30.0f)) + DoCastSpellIfCan(pGuard, SPELL_DARK_EMPOWERMENT_N); m_uiDarkEmpowerment_Timer=urand(20000,40000); } else m_uiDarkEmpowerment_Timer -= diff; -*/ + break;} case 1: { @@ -208,6 +215,57 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI } }; +struct MANGOS_DLL_DECL mob_vengeful_shadeAI : public ScriptedAI +{ + mob_vengeful_shadeAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + Regular = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + ScriptedInstance *m_pInstance; + + uint32 m_uiRangeCheck_Timer; + bool Regular; + + void Reset() + { + m_uiRangeCheck_Timer = 1000; + m_creature->SetSpeedRate(MOVE_RUN, 0.8); + } + + void AttackStart(Unit* pWho) + { + return; + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_uiRangeCheck_Timer < uiDiff) + { + if (m_pInstance) + { + if (Unit* pTarget = m_creature->getVictim()) + { + float fDistance = m_creature->GetDistance2d(pTarget); + if (fDistance <= 2) + { + DoCastSpellIfCan(pTarget, Regular ? SPELL_VENGEFUL_BLAST_N : SPELL_VENGEFUL_BLAST_H); + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + } + } + m_uiRangeCheck_Timer = 1000; + } + else m_uiRangeCheck_Timer -= uiDiff; + } + + void JustDied(Unit* pKiller) + { + } +}; + + CreatureAI* GetAI_boss_lady_deathwhisper(Creature* pCreature) { return new boss_lady_deathwhisperAI(pCreature); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h index d7f083ec7..9d166539d 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h @@ -5,7 +5,7 @@ enum { MAP_NUM = 631, - MAX_ENCOUNTERS = 15, + MAX_ENCOUNTERS = 16, TYPE_TELEPORT = 0, TYPE_MARROWGAR = 1, @@ -13,6 +13,7 @@ enum TYPE_SKULLS_PLATO = 3, TYPE_FLIGHT_WAR = 4, TYPE_SAURFANG = 5, + TYPE_FROSTWIRM_COUNT = 15, BASE_CAMP = 1000, FLIGHT_WAR_1 = 1001, @@ -22,9 +23,6 @@ enum NPC_LADY_DEATHWHISPER = 36855, NPC_DEATHBRINGER_SAURFANG = 37813, - NPC_FROSTWYRM1_GUID = 124864, - NPC_FROSTWYRM2_GUID = 81535, - GO_TELEPORT_GOSSIP_MESSAGE = 99323, TELEPORT_GOSSIP_MESSAGE = 99322, @@ -32,8 +30,16 @@ enum GO_ICEWALL_2 = 201910, GO_ORATORY_DOOR = 201563, GO_SAURFANG_DOOR = 201825, - + GO_SAURFANG_CACHE_10 = 202239, + GO_SAURFANG_CACHE_10_H = 202240, + GO_SAURFANG_CACHE_25 = 202241, //need correct! not in DB + GO_SAURFANG_CACHE_25_H = 202242, //need correct! not in DB + + GO_GUNSHIP_ARMORY_10 = 201873, + GO_GUNSHIP_ARMORY_10_H = 201874, + GO_GUNSHIP_ARMORY_25 = 202178, + GO_GUNSHIP_ARMORY_25_H = 202180, }; #endif diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp new file mode 100644 index 000000000..1d134547f --- /dev/null +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp @@ -0,0 +1,183 @@ +/* Copyright (C) 2006 - 2010 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: icecrown_spire +SD%Complete: 10% +SDComment: by /dev/rsa +SDCategory: Icecrown Citadel - mobs +EndScriptData */ + +#include "precompiled.h" +#include "def_spire.h" +enum +{ + //common + SPELL_BERSERK = 47008, + //yells + //summons + //Abilities + SPELL_FROST_BREATH_N = 70116, + SPELL_BLIZZARD_N = 70362, + SPELL_SOUL_FEAST = 71203, + SPELL_CLEAVE = 70361, + + SPELL_FROST_BREATH_H = 72641, + SPELL_BLIZZARD_H = 71118, + +}; + +struct MANGOS_DLL_DECL mob_spire_frostwyrmAI : public ScriptedAI +{ + mob_spire_frostwyrmAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Regular = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + bool Regular; + ScriptedInstance *pInstance; + uint8 stage; + uint32 m_uiFrostBreath_Timer; + uint32 m_uiBlizzard_Timer; + uint32 m_uiSoulFeast_Timer; + uint32 m_uiCleave_Timer; + uint32 m_uiBerserk_Timer; + uint8 health; + uint8 wirmsdied; + + void Reset() + { + stage = 0; + health = 100; + m_uiFrostBreath_Timer=urand(10000,15000); + m_uiBlizzard_Timer=urand(20000,25000); + m_uiSoulFeast_Timer = 7000; + m_uiCleave_Timer = 5000; + m_uiBerserk_Timer = 120000; + wirmsdied=pInstance->GetData(TYPE_FROSTWIRM_COUNT); + } + + void Aggro(Unit *who) + { + if(pInstance) pInstance->SetData(TYPE_SKULLS_PLATO, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + if(pInstance) { + pInstance->SetData(TYPE_FLIGHT_WAR, DONE); + wirmsdied=pInstance->GetData(TYPE_FROSTWIRM_COUNT); + ++wirmsdied; + pInstance->SetData(TYPE_FROSTWIRM_COUNT,wirmsdied); + if (wirmsdied >= 8 ) pInstance->SetData(TYPE_FLIGHT_WAR,DONE); + } + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + switch(stage) + { + case 0: { + if (m_uiSoulFeast_Timer < diff) + { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCastSpellIfCan(pTarget, SPELL_SOUL_FEAST); + m_uiSoulFeast_Timer=urand(5000,7000); + } else m_uiSoulFeast_Timer -= diff; + + if (m_uiCleave_Timer < diff) { + DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE); + m_uiCleave_Timer=urand(5000,7000); + } else m_uiCleave_Timer -= diff; + break;} + + case 1: { + if (m_uiSoulFeast_Timer < diff) + { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCastSpellIfCan(pTarget, SPELL_SOUL_FEAST); + m_uiSoulFeast_Timer=urand(4000,6000); + } else m_uiSoulFeast_Timer -= diff; + + if (m_uiCleave_Timer < diff) { + DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE); + m_uiCleave_Timer=urand(3000,5000); + } else m_uiCleave_Timer -= diff; + break;} + case 2: { + DoCastSpellIfCan(m_creature, SPELL_BERSERK); + m_uiBlizzard_Timer=urand(1000,2000); + m_uiFrostBreath_Timer=urand(1000,3000); + stage = 3; + break;} + case 3: { + if (m_uiSoulFeast_Timer < diff) + { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCastSpellIfCan(pTarget, SPELL_SOUL_FEAST); + m_uiSoulFeast_Timer=urand(2000,4000); + } else m_uiSoulFeast_Timer -= diff; + + if (m_uiCleave_Timer < diff) { + DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE); + m_uiCleave_Timer=urand(2000,4000); + } else m_uiCleave_Timer -= diff; + break;} + } + + if (m_uiBlizzard_Timer < diff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCastSpellIfCan(pTarget, Regular ? SPELL_BLIZZARD_N : SPELL_BLIZZARD_H); + m_uiBlizzard_Timer=urand(20000,25000); + } else m_uiBlizzard_Timer -= diff; + + if (m_uiFrostBreath_Timer < diff) + {if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCastSpellIfCan(pTarget, Regular ? SPELL_FROST_BREATH_N :SPELL_FROST_BREATH_H); + m_uiFrostBreath_Timer=urand(10000,15000); + } else m_uiFrostBreath_Timer -= diff; + + health = m_creature->GetHealth()*100 / m_creature->GetMaxHealth(); + if (health <= 50 && stage == 0) stage = 1; + if (health <= 10 && stage == 1) stage = 2; + + if (m_uiBerserk_Timer < diff) + { + DoCastSpellIfCan(m_creature, SPELL_BERSERK); + } + else m_uiBerserk_Timer -= diff; + + DoMeleeAttackIfReady(); + + } +}; + +CreatureAI* GetAI_mob_spire_frostwyrm(Creature* pCreature) +{ + return new mob_spire_frostwyrmAI(pCreature); +} + +void AddSC_icecrown_spire() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "mob_spire_frostwyrm"; + newscript->GetAI = &GetAI_mob_spire_frostwyrm; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp index aeee48014..ff0b354b9 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp @@ -1,5 +1,28 @@ +/* Copyright (C) 2006 - 2010 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: icecrown_teleport +SD%Complete: 30% +SDComment: by /dev/rsa +SDCategory: Icecrown Citadel +EndScriptData */ #include "precompiled.h" #include "def_spire.h" + enum { PORTALS_COUNT = 6 @@ -25,41 +48,6 @@ static Locations PortalLoc[]= {"Цитадель ледяной короны",4198.42, 2769.22, 351.065,5,false,false,TYPE_SAURFANG}, // }; -struct MANGOS_DLL_DECL icecrown_teleporterAI : public ScriptedAI -{ - - icecrown_teleporterAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Reset(); - } - - ScriptedInstance* m_pInstance; - - void Reset() - { - m_pInstance->SetData(TYPE_TELEPORT,0); - } - - void UpdateAI(const uint32 diff) - { - if (!m_pInstance) return; - - Creature* pTemp1 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(FLIGHT_WAR_1)); - Creature* pTemp2 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(FLIGHT_WAR_2)); - if (pTemp1 && pTemp2) { - if (!pTemp1->isAlive() && !pTemp2->isAlive()) { - m_pInstance->SetData(TYPE_FLIGHT_WAR,DONE); - } - }; - - } -}; - -CreatureAI* GetAI_icecrown_teleporter(Creature* pCreature) -{ - return new icecrown_teleporterAI(pCreature); -} bool GossipSelect_icecrown_teleporter(Player *player, Creature* pCreature, uint32 sender, uint32 action) { @@ -91,10 +79,10 @@ bool GOHello_go_icecrown_teleporter(Player *player, GameObject* pGo) ScriptedInstance *pInstance = (ScriptedInstance *) pGo->GetInstanceData(); if(!pInstance) return true; - + bool m_bIsRegularMode = pGo->GetMap()->IsRegularDifficulty(); - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, "Teleport to the 1", GOSSIP_SENDER_MAIN, BASE_CAMP); + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, "No message", GOSSIP_SENDER_MAIN, BASE_CAMP); player->SEND_GOSSIP_MENU(GO_TELEPORT_GOSSIP_MESSAGE, pGo->GetGUID()); return true; } @@ -106,7 +94,6 @@ void AddSC_icecrown_teleporter() newscript = new Script; newscript->Name = "icecrown_teleporter"; - newscript->GetAI = &GetAI_icecrown_teleporter; newscript->pGossipHello = &GossipHello_icecrown_teleporter; newscript->pGossipSelect = &GossipSelect_icecrown_teleporter; newscript->RegisterSelf(); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp index d566f91f4..725f97573 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp @@ -21,11 +21,11 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance { instance_icecrown_spire(Map* pMap) : ScriptedInstance(pMap) { - Regular = pMap->IsRegularDifficulty(); + Difficulty = pMap->GetDifficulty(); Initialize(); } - bool Regular; + uint8 Difficulty; bool needSave; std::string strSaveData; @@ -38,9 +38,8 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance uint64 m_uiIcewall1GUID; uint64 m_uiIcewall2GUID; uint64 m_uiSaurfangDoorGUID; - - uint64 m_uiFrostwyrm1GUID; - uint64 m_uiFrostwyrm2GUID; + uint64 m_uiSaurfangCacheGUID; + uint64 m_uiGunshipArmoryGUID; void OpenDoor(uint64 guid) { @@ -66,8 +65,8 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance m_uiMarrogwarGUID =0; m_uiDeathWhisperGUID =0; m_uiSaurfangGUID = 0; - m_uiFrostwyrm1GUID = NPC_FROSTWYRM1_GUID; - m_uiFrostwyrm2GUID = NPC_FROSTWYRM2_GUID; + m_uiSaurfangCacheGUID = 0; + m_uiGunshipArmoryGUID = 0; } @@ -100,6 +99,38 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance case GO_SAURFANG_DOOR: m_uiSaurfangDoorGUID = pGo->GetGUID(); break; + case GO_SAURFANG_CACHE_10: + if(Difficulty == RAID_DIFFICULTY_10MAN_NORMAL) + m_uiSaurfangCacheGUID = pGo->GetGUID(); + break; + case GO_SAURFANG_CACHE_25: + if(Difficulty == RAID_DIFFICULTY_25MAN_NORMAL) + m_uiSaurfangCacheGUID = pGo->GetGUID(); + break; + case GO_SAURFANG_CACHE_10_H: + if(Difficulty == RAID_DIFFICULTY_10MAN_HEROIC) + m_uiSaurfangCacheGUID = pGo->GetGUID(); + break; + case GO_SAURFANG_CACHE_25_H: + if(Difficulty == RAID_DIFFICULTY_25MAN_HEROIC) + m_uiSaurfangCacheGUID = pGo->GetGUID(); + break; + case GO_GUNSHIP_ARMORY_10: + if(Difficulty == RAID_DIFFICULTY_10MAN_NORMAL) + m_uiGunshipArmoryGUID = pGo->GetGUID(); + break; + case GO_GUNSHIP_ARMORY_25: + if(Difficulty == RAID_DIFFICULTY_25MAN_NORMAL) + m_uiGunshipArmoryGUID = pGo->GetGUID(); + break; + case GO_GUNSHIP_ARMORY_10_H: + if(Difficulty == RAID_DIFFICULTY_10MAN_HEROIC) + m_uiGunshipArmoryGUID = pGo->GetGUID(); + break; + case GO_GUNSHIP_ARMORY_25_H: + if(Difficulty == RAID_DIFFICULTY_25MAN_HEROIC) + m_uiGunshipArmoryGUID = pGo->GetGUID(); + break; } } void SetData(uint32 uiType, uint32 uiData) @@ -136,9 +167,14 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance m_auiEncounter[0] = TYPE_FLIGHT_WAR; } break; + case TYPE_FROSTWIRM_COUNT: + m_auiEncounter[15] = uiData; + uiData = NOT_STARTED; + break; case TYPE_SAURFANG: m_auiEncounter[5] = uiData; if (uiData == DONE) { + OpenDoor(m_uiSaurfangDoorGUID); m_auiEncounter[0] = TYPE_SAURFANG; } break; @@ -175,6 +211,7 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance case TYPE_SKULLS_PLATO: return m_auiEncounter[3]; case TYPE_FLIGHT_WAR: return m_auiEncounter[4]; case TYPE_SAURFANG: return m_auiEncounter[5]; + case TYPE_FROSTWIRM_COUNT: return m_auiEncounter[15]; } return 0; } @@ -189,10 +226,6 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance return m_uiDeathWhisperGUID; case NPC_DEATHBRINGER_SAURFANG: return m_uiSaurfangGUID; - case FLIGHT_WAR_1: - return m_uiFrostwyrm1GUID; - case FLIGHT_WAR_2: - return m_uiFrostwyrm2GUID; } return 0; } diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index 665917b3b..ab6f6c1e2 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -370,6 +370,7 @@ extern void AddSC_boss_zuramat(); extern void AddSC_boss_lavanthor(); //IceCrown Citadel extern void AddSC_instance_icecrown_spire(); +extern void AddSC_icecrown_spire(); extern void AddSC_icecrown_teleporter(); extern void AddSC_boss_lord_marrowgar(); extern void AddSC_boss_lady_deathwhisper(); @@ -823,6 +824,7 @@ void AddScripts() AddSC_violet_hold(); AddSC_instance_icecrown_spire(); + AddSC_icecrown_spire(); AddSC_icecrown_teleporter(); AddSC_boss_lord_marrowgar(); AddSC_boss_lady_deathwhisper(); From a269dabb55c7a94e7d49028ce9137350a8e4baca Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 10 Feb 2010 19:33:34 +0300 Subject: [PATCH 137/405] Icecrow bosses change part 7 --- addition/721_icecrown_mangos.sql | 21 +++++- .../boss_lady_deathwhisper.cpp | 65 ++++++++++++------- .../icecrown_citadel/icecrown_spire.cpp | 4 +- 3 files changed, 64 insertions(+), 26 deletions(-) diff --git a/addition/721_icecrown_mangos.sql b/addition/721_icecrown_mangos.sql index 267079522..08487dd89 100644 --- a/addition/721_icecrown_mangos.sql +++ b/addition/721_icecrown_mangos.sql @@ -37,16 +37,23 @@ INSERT INTO `npc_text` (`ID`, `text0_0`, `text0_1`, `lang0`, `prob0`, `em0_0`, ` UPDATE `instance_template` SET `script`='instance_icecrown_spire' WHERE `map`=631; +-- Saurfang UPDATE `creature_template` SET `ScriptName`='boss_deathbringer_saurfang' WHERE `entry`=37813; +DELETE FROM `gameobject` WHERE `id` IN (202239,202240); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(913383, 202239, 631, 1, 64, -498.363, 2230.69, 539.284, 3.70944, 0, 0, 0.959963, -0.280126, 25, 0, 1), +(913385, 202240, 631, 1, 64, -498.363, 2230.69, 539.284, 3.70944, 0, 0, 0.959963, -0.280126, 25, 0, 1); +-- Deathwhisper UPDATE `creature_template` SET `ScriptName`='boss_lady_deathwhisper' WHERE `entry`=36855; -UPDATE `creature_template` SET `ScriptName`='mob_vengeful_shade', `AIName`='' WHERE `entry`= 38222; +UPDATE `creature_template` SET `faction_A`=14, `faction_H`=14,`ScriptName`='mob_vengeful_shade', `AIName`='' WHERE `entry`= 38222; +-- Marrowgar UPDATE `creature_template` SET `ScriptName`='boss_lord_marrowgar' WHERE `entry`= 36612; - UPDATE `gameobject_template` SET `faction` = '114',`data0` = '0' WHERE `gameobject_template`.`entry` IN (201910,201911); UPDATE `gameobject` SET `state` = '1' WHERE `guid` IN (72526,72525); +-- Gunship battle UPDATE `creature_template` SET `ScriptName`='mob_spire_frostwyrm', `AIName`='' WHERE `entry`= 37230; DELETE FROM `creature` WHERE `guid` IN (81531, 83459, 78383, 78385, 81170, 81535, 81165, 81168, 124864); @@ -60,3 +67,13 @@ INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid` (81165, 37230, 631, 15, 1, 0, 0, -505.65, 2320, 199.969, 0.369649, 300, 0, 0, 1078480, 41690, 0, 0), (81168, 37230, 631, 15, 1, 0, 0, -298.341, 2203.06, 199.983, 4.17647, 300, 0, 0, 1078480, 41690, 0, 0), (124864, 37230, 631, 15, 1, 0, 0, -222.214, 2220.68, 199.97, 3.1586, 300, 0, 0, 1078480, 41690, 0, 0); + +DELETE FROM `gameobject` WHERE `id` IN (201873,201874,202178,202180); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(913387, 201873, 631, 1, 64, -558.932, 2211.48, 539.287, 0.0149338, 0, 0, 0.00746682, 0.999972, 25, 0, 1), +(913389, 201874, 631, 1, 64, -558.932, 2211.48, 539.287, 0.0149338, 0, 0, 0.00746682, 0.999972, 25, 0, 1), +(913391, 202178, 631, 1, 64, -558.932, 2211.48, 539.287, 0.0149338, 0, 0, 0.00746682, 0.999972, 25, 0, 1), +(913393, 202180, 631, 1, 64, -558.932, 2211.48, 539.287, 0.0149338, 0, 0, 0.00746682, 0.999972, 25, 0, 1); + +-- Entrance +UPDATE `areatrigger_teleport` SET `required_level` = '80' WHERE `areatrigger_teleport`.`id` =5670; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp index 856536bab..62b7a7cd6 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp @@ -73,7 +73,8 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI uint32 m_uiSummon_Timer; bool isManaBarrier; uint8 health; - + uint64 m_uiMana; + void Reset() { if(pInstance) pInstance->SetData(TYPE_DEATHWHISPER, NOT_STARTED); @@ -86,6 +87,7 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI m_uiInsignificance_Timer = 40000; m_uiDominateMind_Timer = 30000; m_uiBerserk_Timer = 600000; + stage = 0; isManaBarrier = false; } @@ -94,7 +96,7 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI { float fPosX, fPosY, fPosZ; m_creature->GetPosition(fPosX, fPosY, fPosZ); - m_creature->GetRandomPoint(fPosX, fPosY, fPosZ, urand(15, 25), fPosX, fPosY, fPosZ); + m_creature->GetRandomPoint(fPosX, fPosY, fPosZ, urand(75, 100), fPosX, fPosY, fPosZ); Creature* pSummon = m_creature->SummonCreature(npctype, fPosX, fPosY, fPosZ, 0, type, _summontime); if(pSummon) pSummon->SetInCombatWithZone(); // DoScriptText(EMOTE_SUMMON, m_creature); @@ -122,7 +124,9 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI m_creature->SetPower(POWER_MANA,m_creature->GetPower(POWER_MANA)-uiDamage*4); uiDamage = 0; if(m_creature->GetHealth() <= m_creature->GetMaxHealth()) { - m_creature->SetPower(POWER_MANA,m_creature->GetPower(POWER_MANA)-(m_creature->GetMaxHealth()- m_creature->GetHealth())*4); + m_uiMana = m_creature->GetPower(POWER_MANA)-(m_creature->GetMaxHealth()- m_creature->GetHealth())*2; + if (m_uiMana <= 0) m_uiMana =0; + m_creature->SetPower(POWER_MANA,m_uiMana); m_creature->SetHealth(m_creature->GetMaxHealth()); }; if(m_creature->GetPower(POWER_MANA) <= m_creature->GetMaxPower(POWER_MANA)/10 ) { @@ -148,11 +152,11 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI if (m_uiSummon_Timer < diff) { - CallGuard(NPC_FANATIC, TEMPSUMMON_TIMED_DESPAWN, 30000); - CallGuard(NPC_ADHERENT, TEMPSUMMON_TIMED_DESPAWN, 30000); + CallGuard(NPC_FANATIC, TEMPSUMMON_TIMED_DESPAWN, 60000); + CallGuard(NPC_ADHERENT, TEMPSUMMON_TIMED_DESPAWN, 60000); if(!Regular){ - CallGuard(NPC_FANATIC, TEMPSUMMON_TIMED_DESPAWN, 30000); - CallGuard(NPC_ADHERENT, TEMPSUMMON_TIMED_DESPAWN, 30000); + CallGuard(NPC_FANATIC, TEMPSUMMON_TIMED_DESPAWN, 60000); + CallGuard(NPC_ADHERENT, TEMPSUMMON_TIMED_DESPAWN, 60000); }; m_uiSummon_Timer=20000; } else m_uiSummon_Timer -= diff; @@ -223,48 +227,60 @@ struct MANGOS_DLL_DECL mob_vengeful_shadeAI : public ScriptedAI Regular = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - ScriptedInstance *m_pInstance; + ScriptedInstance *m_pInstance; uint32 m_uiRangeCheck_Timer; bool Regular; + void Reset() { m_uiRangeCheck_Timer = 1000; - m_creature->SetSpeedRate(MOVE_RUN, 0.8); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetInCombatWithZone(); + if (Unit* pTarget= SelectUnit(SELECT_TARGET_RANDOM, 0) ) { + m_creature->GetMotionMaster()->MoveChase(pTarget); + m_creature->SetSpeedRate(MOVE_RUN, 0.8); + } else + if (Unit* pTarget = Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_LADY_DEATHWHISPER))) { + m_creature->GetMotionMaster()->MoveChase(pTarget); + m_creature->SetSpeedRate(MOVE_RUN, 0.8); + } } - void AttackStart(Unit* pWho) - { - return; - } void UpdateAI(const uint32 uiDiff) { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + if (m_uiRangeCheck_Timer < uiDiff) { if (m_pInstance) { - if (Unit* pTarget = m_creature->getVictim()) - { - float fDistance = m_creature->GetDistance2d(pTarget); - if (fDistance <= 2) + if (m_creature->IsWithinDist(m_creature->getVictim(), 2.0f, false)) { - DoCastSpellIfCan(pTarget, Regular ? SPELL_VENGEFUL_BLAST_N : SPELL_VENGEFUL_BLAST_H); + DoCast(m_creature->getVictim(), Regular ? SPELL_VENGEFUL_BLAST_N : SPELL_VENGEFUL_BLAST_H); m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); } - } } m_uiRangeCheck_Timer = 1000; + if (m_creature->getVictim()) { + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + m_creature->SetSpeedRate(MOVE_RUN, 0.8); + } } else m_uiRangeCheck_Timer -= uiDiff; } - void JustDied(Unit* pKiller) - { - } }; +CreatureAI* GetAI_mob_vengeful_shade(Creature* pCreature) +{ + return new mob_vengeful_shadeAI(pCreature); +} + CreatureAI* GetAI_boss_lady_deathwhisper(Creature* pCreature) { @@ -278,4 +294,9 @@ void AddSC_boss_lady_deathwhisper() newscript->Name = "boss_lady_deathwhisper"; newscript->GetAI = &GetAI_boss_lady_deathwhisper; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_vengeful_shade"; + newscript->GetAI = &GetAI_mob_vengeful_shade; + newscript->RegisterSelf(); } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp index 1d134547f..093a2e0c1 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp @@ -80,11 +80,11 @@ struct MANGOS_DLL_DECL mob_spire_frostwyrmAI : public ScriptedAI void JustDied(Unit *killer) { if(pInstance) { - pInstance->SetData(TYPE_FLIGHT_WAR, DONE); + pInstance->SetData(TYPE_SKULLS_PLATO, DONE); wirmsdied=pInstance->GetData(TYPE_FROSTWIRM_COUNT); ++wirmsdied; pInstance->SetData(TYPE_FROSTWIRM_COUNT,wirmsdied); - if (wirmsdied >= 8 ) pInstance->SetData(TYPE_FLIGHT_WAR,DONE); + if (pInstance->GetData(TYPE_FROSTWIRM_COUNT) >= 8 ) pInstance->SetData(TYPE_FLIGHT_WAR,DONE); } } From b673b3f21899f38dbd6955c9e4c04e12a29a06ac Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 10 Feb 2010 19:34:22 +0300 Subject: [PATCH 138/405] Trial of champion change --- .../trial_of_the_champion/boss_argent_challenge.cpp | 2 -- .../trial_of_the_champion/boss_black_knight.cpp | 1 - .../trial_of_the_champion/boss_grand_champions.cpp | 5 ----- .../instance_trial_of_the_champion.cpp | 6 +++--- 4 files changed, 3 insertions(+), 11 deletions(-) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp index 53bab0d6f..cc84e6477 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp @@ -76,7 +76,6 @@ struct MANGOS_DLL_DECL boss_eadricAI : public ScriptedAI void Reset() { - m_creature->SetRespawnDelay(999999999); Vengeance_Timer = 1000; Radiance_Timer = m_bIsRegularMode ? 15000 : 8000; Hammer_Timer = m_bIsRegularMode ? 40000 : 10000; @@ -177,7 +176,6 @@ struct MANGOS_DLL_DECL boss_paletressAI : public ScriptedAI void Reset() { - m_creature->SetRespawnDelay(999999999); m_creature->RemoveAurasDueToSpell(SPELL_SHIELD); Smite_Timer = 5000; Holy_Fire_Timer = m_bIsRegularMode ? 10000 : 8000; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp index c1b400aa6..c9e268474 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp @@ -141,7 +141,6 @@ struct MANGOS_DLL_DECL boss_black_knightAI : public ScriptedAI void Reset() { - m_creature->SetRespawnDelay(999999999); m_creature->SetDisplayId(29837); SetEquipmentSlots(false, EQUIP_SWORD, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE); Plague_Strike_Timer = m_bIsRegularMode ? 5000 : 4000; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp index 12b0718b1..f88b5bae6 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp @@ -84,7 +84,6 @@ struct MANGOS_DLL_DECL mob_toc5_warriorAI : public ScriptedAI void Reset() { - m_creature->SetRespawnDelay(999999999); Mortal_Strike_Timer = m_bIsRegularMode ? 9000 : 6000; Bladestorm_Timer = m_bIsRegularMode ? 30000 : 20000; Rolling_Throw_Timer = m_bIsRegularMode ? 45000 : 30000; @@ -209,7 +208,6 @@ struct MANGOS_DLL_DECL mob_toc5_mageAI : public ScriptedAI void Reset() { - m_creature->SetRespawnDelay(999999999); Fireball_Timer = 0; Blast_Wave_Timer = m_bIsRegularMode ? 20000 : 12000; Haste_Timer = m_bIsRegularMode ? 12000 : 9000; @@ -328,7 +326,6 @@ struct MANGOS_DLL_DECL mob_toc5_shamanAI : public ScriptedAI void Reset() { - m_creature->SetRespawnDelay(999999999); Chain_Lightning_Timer = m_bIsRegularMode ? 2000 : 1000; Earth_Shield_Timer = m_bIsRegularMode ? 10000 : 5000; Healing_Wave_Timer = m_bIsRegularMode ? 20000 : 12000; @@ -491,7 +488,6 @@ struct MANGOS_DLL_DECL mob_toc5_hunterAI : public ScriptedAI void Reset() { - m_creature->SetRespawnDelay(999999999); Shoot_Timer = 0; Lightning_Arrows_Timer = m_bIsRegularMode ? 18000 : 10000; m_uiBerserk_Timer = m_bIsRegularMode ? 300000 : 180000; @@ -630,7 +626,6 @@ struct MANGOS_DLL_DECL mob_toc5_rogueAI : public ScriptedAI void Reset() { - m_creature->SetRespawnDelay(999999999); Eviscerate_Timer = m_bIsRegularMode ? 20000 : 10000; FoK_Timer = m_bIsRegularMode ? 15000 : 10000; m_uiBerserk_Timer = m_bIsRegularMode ? 300000 : 180000; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp index 30c2267f2..3c8b8ead3 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp @@ -382,7 +382,7 @@ struct MANGOS_DLL_DECL instance_trial_of_the_champion : public ScriptedInstance { if (GameObject* pChest = instance->GetGameObject(m_uiChampionsLootGUID)) if (pChest && !pChest->isSpawned()) - pChest->SetRespawnTime(350000000); + pChest->SetRespawnTime(DAY); } if (uiData == FAIL) { @@ -396,11 +396,11 @@ struct MANGOS_DLL_DECL instance_trial_of_the_champion : public ScriptedInstance if (m_uiArgentChallenger == m_uiEadricGUID) if (GameObject* pChest = instance->GetGameObject(m_uiEadricLootGUID)) if (pChest && !pChest->isSpawned()) - pChest->SetRespawnTime(350000000); + pChest->SetRespawnTime(DAY); if (m_uiArgentChallenger == m_uiPaletressGUID) if (GameObject* pChest = instance->GetGameObject(m_uiPaletressLootGUID)) if (pChest && !pChest->isSpawned()) - pChest->SetRespawnTime(350000000); + pChest->SetRespawnTime(DAY); } if (uiData == FAIL) { From b422aa80b703cdd5cfcbd4c33e3de394a3758075 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 11 Feb 2010 13:20:49 +0300 Subject: [PATCH 139/405] Trial of champion change && sql correct --- addition/718_draktharon_mangos.sql | 19 +++++----- addition/720_mangos_ulduar.sql | 8 +++-- .../boss_argent_challenge.cpp | 2 ++ .../boss_black_knight.cpp | 35 ++++++++++--------- .../boss_grand_champions.cpp | 5 +++ .../instance_trial_of_the_champion.cpp | 2 +- .../trial_of_the_champion.cpp | 4 +-- 7 files changed, 44 insertions(+), 31 deletions(-) diff --git a/addition/718_draktharon_mangos.sql b/addition/718_draktharon_mangos.sql index e4ebe3b48..24ac6f6e1 100644 --- a/addition/718_draktharon_mangos.sql +++ b/addition/718_draktharon_mangos.sql @@ -28,9 +28,10 @@ INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entr DELETE FROM `creature_template` WHERE (`entry`=31360); INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (31360, 0, 0, 0, 0, 0, 27072, 0, 27072, 0, 'The Prophet Tharon\'ja (1)', '', '', 82, 82, 512278, 512278, 4169, 4169, 0, 16, 16, 0, 1, 1, 1, 450, 650, 0, 750, 13, 2000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 350, 530, 100, 6, 72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 38, 1, 0, 43670, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, ''); -insert into spell_script_target values (49555, 2, 27753); +DELETE FROM `spell_script_target` WHERE `entry` = 49555; +INSERT INTO `spell_script_target` VALUES (49555, 2, 27753); -update creature_template set minhealth = 1885, maxhealth = 1885 where entry = 27753; +UPDATE `creature_template` SET minhealth = 1885, maxhealth = 1885 WHERE entry = 27753; DELETE FROM `creature_template` WHERE (`entry`=26627); INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (26627, 31344, 0, 0, 0, 0, 24500, 0, 24500, 0, 'Crystal Handler', '', '', 0, 75, 75, 21270, 21270, 0, 0, 0, 15, 15, 0, 1, 1, 1, 500, 1000, 0, 500, 1, 2000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 2.5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 'crystal_handler'); @@ -56,10 +57,10 @@ INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entr DELETE FROM `creature_template` WHERE (`entry`=31356); INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (31356, 0, 0, 0, 0, 0, 2606, 0, 2606, 0, 'Risen Shadowcaster (1)', '', '', 0, 81, 81, 3128, 3128, 8979, 8979, 0, 15, 15, 0, 1, 1, 0, 500, 1000, 0, 500, 2, 2000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0.3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, ''); -update creature_template set AIName = '', ScriptName = 'boss_trollgore' where entry = 26630; -update creature_template set AIName = '', ScriptName = 'boss_novos' where entry = 26631; -update creature_template set AIName = '', ScriptName = 'crystal_handler' where entry = 26627; -update creature_template set AIName = '', ScriptName = 'crystal_channel' where entry = 26712; -update creature_template set AIName = '', ScriptName = 'risen_shadowcaster' where entry = 27600; -update creature_template set AIName = '', ScriptName = 'boss_dred' where entry = 27483; -update creature_template set AIName = '', ScriptName = 'boss_tharonja' where entry = 26632; \ No newline at end of file +UPDATE `creature_template` set AIName = '', ScriptName = 'boss_trollgore' where entry = 26630; +UPDATE `creature_template` set AIName = '', ScriptName = 'boss_novos' where entry = 26631; +UPDATE `creature_template` set AIName = '', ScriptName = 'crystal_handler' where entry = 26627; +UPDATE `creature_template` set AIName = '', ScriptName = 'crystal_channel' where entry = 26712; +UPDATE `creature_template` set AIName = '', ScriptName = 'risen_shadowcaster' where entry = 27600; +UPDATE `creature_template` set AIName = '', ScriptName = 'boss_dred' where entry = 27483; +UPDATE `creature_template` set AIName = '', ScriptName = 'boss_tharonja' where entry = 26632; \ No newline at end of file diff --git a/addition/720_mangos_ulduar.sql b/addition/720_mangos_ulduar.sql index 77552337f..8662b2b98 100644 --- a/addition/720_mangos_ulduar.sql +++ b/addition/720_mangos_ulduar.sql @@ -7,9 +7,11 @@ #UPDATE creature_template SET mechanic_immune_mask=617299803, scriptname='boss_steelbreaker' WHERE entry=32867; -- kologarn -DELETE FROM creature WHERE id IN (32933, 32934); -INSERT INTO creature (guid, id, map, spawnMask, phaseMask, modelid, equipment_id, position_x, position_y, position_z, orientation, spawntimesecs, spawndist, currentwaypoint, curhealth, curmana, DeathState, MovementType) VALUES (9327991, 232933, 603, 3, 65535, 0, 0, 1799.68, -24.3599, 452.227, 3.14747, 604800, 0, 0, 543855, 0, 0, 0); -INSERT INTO creature (guid, id, map, spawnMask, phaseMask, modelid, equipment_id, position_x, position_y, position_z, orientation, spawntimesecs, spawndist, currentwaypoint, curhealth, curmana, DeathState, MovementType) VALUES (9327992, 32934, 603, 3, 65535, 0, 0, 1799.68, -24.3599, 452.227, 3.14747, 604800, 0, 0, 543855, 0, 0, 0); +DELETE FROM creature WHERE id IN (32933, 32934, 232933); +INSERT INTO creature (guid, id, map, spawnMask, phaseMask, modelid, equipment_id, position_x, position_y, position_z, orientation, spawntimesecs, spawndist, currentwaypoint, curhealth, curmana, DeathState, MovementType) +VALUES (9327991, 32933, 603, 3, 65535, 0, 0, 1799.68, -24.3599, 452.227, 3.14747, 604800, 0, 0, 543855, 0, 0, 0); +INSERT INTO creature (guid, id, map, spawnMask, phaseMask, modelid, equipment_id, position_x, position_y, position_z, orientation, spawntimesecs, spawndist, currentwaypoint, curhealth, curmana, DeathState, MovementType) +VALUES (9327992, 32934, 603, 3, 65535, 0, 0, 1799.68, -24.3599, 452.227, 3.14747, 604800, 0, 0, 543855, 0, 0, 0); UPDATE creature_model_info SET bounding_radius=15, combat_reach=15 WHERE modelid IN (28638, 28822, 28821); UPDATE creature_template SET mechanic_immune_mask=652951551, scriptname='boss_kologarn_right_arm' WHERE entry=32934; UPDATE creature_template SET mechanic_immune_mask=652951551, scriptname='boss_kologarn_left_arm' WHERE entry=32933; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp index cc84e6477..52f6eb38a 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp @@ -76,6 +76,7 @@ struct MANGOS_DLL_DECL boss_eadricAI : public ScriptedAI void Reset() { + m_creature->SetRespawnDelay(DAY); Vengeance_Timer = 1000; Radiance_Timer = m_bIsRegularMode ? 15000 : 8000; Hammer_Timer = m_bIsRegularMode ? 40000 : 10000; @@ -176,6 +177,7 @@ struct MANGOS_DLL_DECL boss_paletressAI : public ScriptedAI void Reset() { + m_creature->SetRespawnDelay(DAY); m_creature->RemoveAurasDueToSpell(SPELL_SHIELD); Smite_Timer = 5000; Holy_Fire_Timer = m_bIsRegularMode ? 10000 : 8000; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp index c9e268474..f0e6e663e 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp @@ -36,13 +36,13 @@ enum SPELL_ICY_TOUCH_H = 67881, SPELL_OBLITERATE = 67725, SPELL_OBLITERATE_H = 67883, - SPELL_CHOKE = 68306, + SPELL_CHOKE = 68306, //skeleton - SPELL_ARMY = 42650, //replacing original one, since that one spawns millions of ghouls!! + SPELL_ARMY = 42650, //replacing original one, since that one spawns millions of ghouls!! //ghost SPELL_DEATH = 67808, SPELL_DEATH_H = 67875, - SPELL_MARK = 67823, + SPELL_MARK = 67823, //risen ghoul SPELL_CLAW = 67879, @@ -141,6 +141,7 @@ struct MANGOS_DLL_DECL boss_black_knightAI : public ScriptedAI void Reset() { + m_creature->SetRespawnDelay(DAY); m_creature->SetDisplayId(29837); SetEquipmentSlots(false, EQUIP_SWORD, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE); Plague_Strike_Timer = m_bIsRegularMode ? 5000 : 4000; @@ -166,37 +167,39 @@ struct MANGOS_DLL_DECL boss_black_knightAI : public ScriptedAI m_pInstance->SetData(TYPE_BLACK_KNIGHT, IN_PROGRESS); } - void DamageTaken(Unit* pDoneBy, uint32& uiDamage) + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) { - if (uiDamage > m_creature->GetHealth() && !phase3){ - uiDamage = 0; - if (phase2) - StartPhase3(); - if (phase1) - StartPhase2(); - } + if ((uiDamage > m_creature->GetHealth() || + m_creature->GetHealth()/m_creature->GetHealth() <= 0.1 ) && !phase3){ + uiDamage = 0; + if (phase2) + StartPhase3(); + if (phase1) + StartPhase2(); + } } - void JustDied(Unit* pKiller) + + void JustDied(Unit* pKiller) { if (!m_pInstance) return; - if (phase3) + if (phase3 && !phase1 && !phase2) { m_pInstance->SetData(TYPE_BLACK_KNIGHT, DONE); } - if (phase2) +/* if (phase2 && !phase1 && !phase3) if (!m_creature->isAlive()) { m_creature->Respawn(); StartPhase3(); } - if (phase1) + if (phase1 && !phase2 && !phase3) if (!m_creature->isAlive()) { m_creature->Respawn(); StartPhase2(); - } + }*/ } void StartPhase2() diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp index f88b5bae6..b48828d44 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp @@ -84,6 +84,7 @@ struct MANGOS_DLL_DECL mob_toc5_warriorAI : public ScriptedAI void Reset() { + m_creature->SetRespawnDelay(DAY); Mortal_Strike_Timer = m_bIsRegularMode ? 9000 : 6000; Bladestorm_Timer = m_bIsRegularMode ? 30000 : 20000; Rolling_Throw_Timer = m_bIsRegularMode ? 45000 : 30000; @@ -208,6 +209,7 @@ struct MANGOS_DLL_DECL mob_toc5_mageAI : public ScriptedAI void Reset() { + m_creature->SetRespawnDelay(DAY); Fireball_Timer = 0; Blast_Wave_Timer = m_bIsRegularMode ? 20000 : 12000; Haste_Timer = m_bIsRegularMode ? 12000 : 9000; @@ -326,6 +328,7 @@ struct MANGOS_DLL_DECL mob_toc5_shamanAI : public ScriptedAI void Reset() { + m_creature->SetRespawnDelay(DAY); Chain_Lightning_Timer = m_bIsRegularMode ? 2000 : 1000; Earth_Shield_Timer = m_bIsRegularMode ? 10000 : 5000; Healing_Wave_Timer = m_bIsRegularMode ? 20000 : 12000; @@ -488,6 +491,7 @@ struct MANGOS_DLL_DECL mob_toc5_hunterAI : public ScriptedAI void Reset() { + m_creature->SetRespawnDelay(DAY); Shoot_Timer = 0; Lightning_Arrows_Timer = m_bIsRegularMode ? 18000 : 10000; m_uiBerserk_Timer = m_bIsRegularMode ? 300000 : 180000; @@ -626,6 +630,7 @@ struct MANGOS_DLL_DECL mob_toc5_rogueAI : public ScriptedAI void Reset() { + m_creature->SetRespawnDelay(DAY); Eviscerate_Timer = m_bIsRegularMode ? 20000 : 10000; FoK_Timer = m_bIsRegularMode ? 15000 : 10000; m_uiBerserk_Timer = m_bIsRegularMode ? 300000 : 180000; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp index 3c8b8ead3..d92e66f3b 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp @@ -445,7 +445,7 @@ struct MANGOS_DLL_DECL instance_trial_of_the_champion : public ScriptedInstance case DATA_MEMORY: return m_uiMemoryGUID; case DATA_ARGENT_CHALLENGER: - return m_uiArgentChallengerID; + return m_uiArgentChallenger; case DATA_BLACK_KNIGHT: return m_uiBlackKnightGUID; } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp index 054f5b814..0c7737209 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp @@ -208,7 +208,7 @@ switch(uiAction) { case GOSSIP_ACTION_INFO_DEF+2: { if ((m_pInstance->GetData(TYPE_ARGENT_CHALLENGE) == NOT_STARTED || m_pInstance->GetData(TYPE_ARGENT_CHALLENGE) == IN_PROGRESS) && m_pInstance->GetData(TYPE_GRAND_CHAMPIONS) == DONE) { - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData(DATA_ARGENT_CHALLENGER))) + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(DATA_ARGENT_CHALLENGER))) pTemp->Respawn(); else pCreature->SummonCreature(m_pInstance->GetData(DATA_ARGENT_CHALLENGER), 746.864441, 660.918762, 411.695465, 4.698700, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); @@ -220,7 +220,7 @@ switch(uiAction) { case GOSSIP_ACTION_INFO_DEF+3: { if ((m_pInstance->GetData(TYPE_BLACK_KNIGHT) == NOT_STARTED || m_pInstance->GetData(TYPE_BLACK_KNIGHT) == IN_PROGRESS) && m_pInstance->GetData(TYPE_ARGENT_CHALLENGE) == DONE) { - pCreature->SummonCreature(35451, 746.864441, 660.918762, 411.695465, 4.698700, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + pCreature->SummonCreature(NPC_BLACK_KNIGHT, 746.864441, 660.918762, 411.695465, 4.698700, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); pCreature->DealDamage(pCreature, pCreature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); m_pInstance->SetData(TYPE_BLACK_KNIGHT, IN_PROGRESS); }; From 07d37a52fa82b9b443834397d781418ba63c1ba4 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 11 Feb 2010 17:59:09 +0300 Subject: [PATCH 140/405] Icecrown change part 7 --- addition/721_icecrown_mangos.sql | 11 -- addition/icecrown_loot_mangos.sql | 166 ++++++++++++++++++ .../icecrown_citadel/def_spire.h | 10 +- .../instance_icecrown_spire.cpp | 24 ++- 4 files changed, 188 insertions(+), 23 deletions(-) create mode 100644 addition/icecrown_loot_mangos.sql diff --git a/addition/721_icecrown_mangos.sql b/addition/721_icecrown_mangos.sql index 08487dd89..30103165d 100644 --- a/addition/721_icecrown_mangos.sql +++ b/addition/721_icecrown_mangos.sql @@ -39,10 +39,6 @@ UPDATE `instance_template` SET `script`='instance_icecrown_spire' WHERE `map`=63 -- Saurfang UPDATE `creature_template` SET `ScriptName`='boss_deathbringer_saurfang' WHERE `entry`=37813; -DELETE FROM `gameobject` WHERE `id` IN (202239,202240); -INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES -(913383, 202239, 631, 1, 64, -498.363, 2230.69, 539.284, 3.70944, 0, 0, 0.959963, -0.280126, 25, 0, 1), -(913385, 202240, 631, 1, 64, -498.363, 2230.69, 539.284, 3.70944, 0, 0, 0.959963, -0.280126, 25, 0, 1); -- Deathwhisper UPDATE `creature_template` SET `ScriptName`='boss_lady_deathwhisper' WHERE `entry`=36855; @@ -68,12 +64,5 @@ INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid` (81168, 37230, 631, 15, 1, 0, 0, -298.341, 2203.06, 199.983, 4.17647, 300, 0, 0, 1078480, 41690, 0, 0), (124864, 37230, 631, 15, 1, 0, 0, -222.214, 2220.68, 199.97, 3.1586, 300, 0, 0, 1078480, 41690, 0, 0); -DELETE FROM `gameobject` WHERE `id` IN (201873,201874,202178,202180); -INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES -(913387, 201873, 631, 1, 64, -558.932, 2211.48, 539.287, 0.0149338, 0, 0, 0.00746682, 0.999972, 25, 0, 1), -(913389, 201874, 631, 1, 64, -558.932, 2211.48, 539.287, 0.0149338, 0, 0, 0.00746682, 0.999972, 25, 0, 1), -(913391, 202178, 631, 1, 64, -558.932, 2211.48, 539.287, 0.0149338, 0, 0, 0.00746682, 0.999972, 25, 0, 1), -(913393, 202180, 631, 1, 64, -558.932, 2211.48, 539.287, 0.0149338, 0, 0, 0.00746682, 0.999972, 25, 0, 1); - -- Entrance UPDATE `areatrigger_teleport` SET `required_level` = '80' WHERE `areatrigger_teleport`.`id` =5670; diff --git a/addition/icecrown_loot_mangos.sql b/addition/icecrown_loot_mangos.sql new file mode 100644 index 000000000..98a243511 --- /dev/null +++ b/addition/icecrown_loot_mangos.sql @@ -0,0 +1,166 @@ +-- Deathbringer Saurfang's cache +DELETE FROM `gameobject_template` WHERE `entry` IN (202239,202240,902241,902242); +INSERT INTO `gameobject_template` +(`entry`, `type`, `displayId`, `name`, `IconName`, `castBarCaption`, `unk1`, `faction`, `flags`, `size`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `data0`, `data1`, `data2`, `data3`, `data4`, `data5`, `data6`, `data7`, `data8`, `data9`, `data10`, `data11`, `data12`, `data13`, `data14`, `data15`, `data16`, `data17`, `data18`, `data19`, `data20`, `data21`, `data22`, `data23`, `ScriptName`) VALUES +(202239, 3, 9233, 'Deathbringer''s Cache', '', '', '', 0, 0, 2.5, 0, 0, 0, 0, 0, 0, 1634, 202239, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, ''), +(202240, 3, 9233, 'Deathbringer''s Cache', '', '', '', 0, 0, 2.5, 0, 0, 0, 0, 0, 0, 1634, 202240, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, ''), +(902241, 3, 9233, 'Deathbringer''s Cache', '', '', '', 0, 0, 2.5, 0, 0, 0, 0, 0, 0, 1634, 902241, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, ''), +(902242, 3, 9233, 'Deathbringer''s Cache', '', '', '', 0, 0, 2.5, 0, 0, 0, 0, 0, 0, 1634, 902242, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, ''); + +DELETE FROM `gameobject` WHERE `id` IN (202239,202240,902241,902242); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(913383, 202239, 631, 1, 64, -498.363, 2230.69, 539.284, 3.70944, 0, 0, 0.959963, -0.280126, -604800, 100, 1), +(913385, 202240, 631, 2, 64, -498.363, 2230.69, 539.284, 3.70944, 0, 0, 0.959963, -0.280126, -604800, 100, 1), +(913395, 902241, 631, 4, 64, -498.363, 2230.69, 539.284, 3.70944, 0, 0, 0.959963, -0.280126, -604800, 100, 1), +(913397, 902242, 631, 8, 64, -498.363, 2230.69, 539.284, 3.70944, 0, 0, 0.959963, -0.280126, -604800, 100, 1); + +DELETE FROM `gameobject_loot_template` WHERE `entry` = 202239; +INSERT INTO `gameobject_loot_template` VALUES +(202239, 50798, 0, 1, 1, 1, 6, 469, 0), +(202239, 50805, 0, 1, 1, 1, 6, 469, 0), +(202239, 50809, 0, 1, 1, 1, 6, 469, 0), +(202239, 50803, 0, 1, 1, 1, 6, 469, 0), +(202239, 50804, 0, 2, 1, 1, 6, 469, 0), +(202239, 50800, 0, 2, 1, 1, 6, 469, 0), +(202239, 50799, 0, 2, 1, 1, 6, 469, 0), +(202239, 50801, 0, 2, 1, 1, 6, 469, 0), +(202239, 50807, 0, 3, 1, 1, 0, 469, 0), +(202239, 50808, 0, 3, 1, 1, 0, 469, 0), +(202239, 50806, 0, 3, 1, 1, 0, 469, 0), +(202239, 50802, 0, 3, 1, 1, 0, 469, 0); + +DELETE FROM `gameobject_loot_template` WHERE `entry` = 202240; +INSERT INTO `gameobject_loot_template` VALUES +(202240, 52025, 0, 1, 1, 1, 6, 67, 0), +(202240, 52027, 0, 1, 1, 1, 6, 67, 0), +(202240, 52026, 0, 1, 1, 1, 6, 67, 0), +(202240, 50362, 0, 2, 1, 1, 6, 469, 0), +(202240, 50333, 0, 3, 1, 1, 6, 469, 0), +(202240, 49908, 18, 0, 1, 1, 0, 0, 0), +(202240, 50014, 0, 0, 1, 1, 6, 469, 0), +(202240, 50412, 0, 2, 1, 1, 6, 469, 0), +(202240, 50807, 0, 3, 1, 1, 6, 469, 0), +(202240, 50015, 0, 3, 1, 1, 6, 469, 0), +(202240, 50274, 0.1, 0, 1, 1, 0, 0, 0); + +DELETE FROM `gameobject_loot_template` WHERE `entry` = 902241; +INSERT INTO `gameobject_loot_template` VALUES +(902241, 51902, 0, 2, 1, 1, 6, 469, 0), +(902241, 52027, 0, 1, 1, 1, 6, 67, 0), +(902241, 51895, 0, 4, 1, 1, 6, 469, 0), +(902241, 51901, 0, 2, 1, 1, 6, 469, 0), +(902241, 51903, 0, 2, 1, 1, 6, 469, 0), +(902241, 51899, 0, 4, 1, 1, 6, 469, 0), +(902241, 51897, 0, 4, 1, 1, 6, 469, 0), +(902241, 51898, 0, 3, 1, 1, 6, 469, 0), +(902241, 52026, 0, 1, 1, 1, 6, 67, 0), +(902241, 51905, 0, 3, 1, 1, 6, 469, 0), +(902241, 51900, 0, 3, 1, 1, 6, 469, 0), +(902241, 51904, 0, 2, 1, 1, 6, 469, 0), +(902241, 51894, 0, 3, 1, 1, 6, 469, 0), +(902241, 51896, 0, 4, 1, 1, 6, 469, 0), +(902241, 52025, 0, 1, 1, 1, 6, 67, 0), +(902241, 49908, 18, 0, 1, 1, 0, 0, 0); + +DELETE FROM `gameobject_loot_template` WHERE `entry` = 902242; +INSERT INTO `gameobject_loot_template` VALUES +(902242, 52027, 0, 1, 1, 1, 6, 67, 0), +(902242, 52026, 0, 1, 1, 1, 6, 67, 0), +(902242, 52025, 0, 1, 1, 1, 6, 67, 0), +(902242, 52030, 0, 2, 1, 1, 6, 67, 0), +(902242, 52029, 0, 2, 1, 1, 6, 67, 0), +(902242, 52028, 0, 2, 1, 1, 6, 67, 0), +(902242, 50671, 0, 3, 1, 1, 6, 469, 0), +(902242, 50672, 0, 4, 1, 1, 6, 469, 0), +(902242, 50363, 0, 4, 1, 1, 6, 469, 0), +(902242, 50668, 0, 3, 1, 1, 6, 469, 0), +(902242, 50670, 0, 3, 1, 1, 6, 469, 0), +(902242, 49908, 18, 0, 1, 1, 0, 0, 0), +(902242, 50274, 0.1, 0, 1, 1, 0, 0, 0); + + +-- Gunship battle cache +DELETE FROM `gameobject_template` WHERE `entry` IN (201873,201874,202178,202180); +INSERT INTO `gameobject_template` +(`entry`, `type`, `displayId`, `name`, `IconName`, `castBarCaption`, `unk1`, `faction`, `flags`, `size`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `data0`, `data1`, `data2`, `data3`, `data4`, `data5`, `data6`, `data7`, `data8`, `data9`, `data10`, `data11`, `data12`, `data13`, `data14`, `data15`, `data16`, `data17`, `data18`, `data19`, `data20`, `data21`, `data22`, `data23`, `ScriptName`) VALUES +(201873, 3, 9280, 'Gunship Armory', '', '', '', 0, 0, 2.5, 0, 0, 0, 0, 0, 0, 1634, 201873, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, ''), +(201874, 3, 9280, 'Gunship Armory', '', '', '', 0, 0, 2.5, 0, 0, 0, 0, 0, 0, 1634, 201874, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, ''), +(202178, 3, 9281, 'Gunship Armory', '', '', '', 0, 0, 2.5, 0, 0, 0, 0, 0, 0, 1634, 202178, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, ''), +(202180, 3, 9281, 'Gunship Armory', '', '', '', 0, 0, 2.5, 0, 0, 0, 0, 0, 0, 1634, 202180, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, ''); + +DELETE FROM `gameobject` WHERE `id` IN (201873,201874,202178,202180); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(913387, 201873, 631, 1, 64, -558.932, 2211.48, 539.287, 0.0149338, 0, 0, 0.00746682, 0.999972, -604800, 100, 1), +(913389, 201874, 631, 2, 64, -558.932, 2211.48, 539.287, 0.0149338, 0, 0, 0.00746682, 0.999972, -604800, 100, 1), +(913391, 202178, 631, 4, 64, -558.932, 2211.48, 539.287, 0.0149338, 0, 0, 0.00746682, 0.999972, -604800, 100, 1), +(913393, 202180, 631, 8, 64, -558.932, 2211.48, 539.287, 0.0149338, 0, 0, 0.00746682, 0.999972, -604800, 100, 1); + +DELETE FROM `gameobject_loot_template` WHERE `entry` = 201873; +INSERT INTO `gameobject_loot_template` VALUES +(201873, 50793, 0, 1, 1, 1, 6, 469, 0), +(201873, 50787, 0, 1, 1, 1, 6, 469, 0), +(201873, 50340, 0, 2, 1, 1, 6, 469, 0), +(201873, 50794, 0, 1, 1, 1, 6, 469, 0), +(201873, 50789, 0, 3, 1, 1, 6, 469, 0), +(201873, 50791, 0, 2, 1, 1, 6, 469, 0), +(201873, 50788, 0, 3, 1, 1, 6, 469, 0), +(201873, 50792, 0, 3, 1, 1, 6, 469, 0), +(201873, 50796, 0, 3, 1, 1, 6, 469, 0), +(201873, 50795, 0, 3, 1, 1, 6, 469, 0), +(201873, 50790, 0, 2, 1, 1, 6, 469, 0), +(201873, 50797, 0, 3, 1, 1, 6, 469, 0); + +DELETE FROM `gameobject_loot_template` WHERE `entry` = 201874; +INSERT INTO `gameobject_loot_template` VALUES +(201874, 50008, 0, 1, 1, 1, 6, 469, 0), +(201874, 49998, 0, 2, 1, 1, 6, 469, 0), +(201874, 50005, 0, 2, 1, 1, 6, 469, 0), +(201874, 50352, 0, 1, 1, 1, 6, 469, 0), +(201874, 50011, 0, 3, 1, 1, 6, 469, 0), +(201874, 50359, 0, 1, 1, 1, 6, 469, 0), +(201874, 50001, 0, 3, 1, 1, 6, 469, 0), +(201874, 50000, 0, 3, 1, 1, 6, 469, 0), +(201874, 50002, 0, 3, 1, 1, 6, 469, 0), +(201874, 50006, 0, 3, 1, 1, 6, 469, 0), +(201874, 49999, 0, 1, 1, 1, 6, 469, 0), +(201874, 50010, 0, 3, 1, 1, 6, 469, 0), +(201874, 50003, 0, 3, 1, 1, 6, 469, 0), +(201874, 50411, 0, 2, 1, 1, 6, 469, 0), +(201874, 50009, 0, 3, 1, 1, 6, 469, 0), +(201874, 50274, 0.1, 0, 1, 1, 0, 0, 0); + +DELETE FROM `gameobject_loot_template` WHERE `entry` = 202178; +INSERT INTO `gameobject_loot_template` VALUES +(202178, 51913, 0, 1, 1, 1, 6, 469, 0), +(202178, 51915, 0, 2, 1, 1, 6, 469, 0), +(202178, 51907, 0, 3, 1, 1, 6, 469, 0), +(202178, 51908, 0, 3, 1, 1, 6, 469, 0), +(202178, 51916, 0, 1, 1, 1, 6, 469, 0), +(202178, 51906, 0, 2, 1, 1, 6, 469, 0), +(202178, 51914, 0, 3, 1, 1, 6, 469, 0), +(202178, 51910, 0, 1, 1, 1, 6, 469, 0), +(202178, 50345, 0, 3, 1, 1, 6, 469, 0), +(202178, 51909, 0, 1, 1, 1, 6, 469, 0), +(202178, 51911, 0, 2, 1, 1, 6, 469, 0), +(202178, 51912, 0, 1, 1, 1, 6, 469, 0), +(202178, 49908, 18, 0, 1, 1, 0, 0, 0); + +DELETE FROM `gameobject_loot_template` WHERE `entry` = 202180; +INSERT INTO `gameobject_loot_template` VALUES +(202180, 50366, 0, 1, 1, 1, 6, 469, 0), +(202180, 50658, 0, 4, 1, 1, 6, 469, 0), +(202180, 50660, 0, 2, 1, 1, 6, 469, 0), +(202180, 50665, 0, 3, 1, 1, 6, 469, 0), +(202180, 50661, 0, 3, 1, 1, 6, 469, 0), +(202180, 50349, 0, 1, 1, 1, 6, 469, 0), +(202180, 50663, 0, 2, 1, 1, 6, 469, 0), +(202180, 50656, 0, 2, 1, 1, 6, 469, 0), +(202180, 50659, 0, 3, 1, 1, 6, 469, 0), +(202180, 50664, 0, 1, 1, 1, 6, 469, 0), +(202180, 50655, 0, 3, 1, 1, 6, 469, 0), +(202180, 50654, 0, 4, 1, 1, 6, 469, 0), +(202180, 50653, 0, 4, 1, 1, 6, 469, 0), +(202180, 50657, 0, 1, 1, 1, 6, 469, 0), +(202180, 50667, 0, 4, 1, 1, 6, 469, 0), +(202180, 50274, 0.1, 0, 1, 1, 0, 0, 0), +(202180, 49908, 18, 0, 1, 1, 0, 0, 0); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h index 9d166539d..702ad6d31 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h @@ -32,13 +32,13 @@ enum GO_SAURFANG_DOOR = 201825, GO_SAURFANG_CACHE_10 = 202239, - GO_SAURFANG_CACHE_10_H = 202240, - GO_SAURFANG_CACHE_25 = 202241, //need correct! not in DB - GO_SAURFANG_CACHE_25_H = 202242, //need correct! not in DB + GO_SAURFANG_CACHE_25 = 202240, + GO_SAURFANG_CACHE_10_H = 902241, //need correct! not in YTDB 533 + GO_SAURFANG_CACHE_25_H = 902242, //need correct! not in YTDB 533 GO_GUNSHIP_ARMORY_10 = 201873, - GO_GUNSHIP_ARMORY_10_H = 201874, - GO_GUNSHIP_ARMORY_25 = 202178, + GO_GUNSHIP_ARMORY_25 = 201874, + GO_GUNSHIP_ARMORY_10_H = 202178, GO_GUNSHIP_ARMORY_25_H = 202180, }; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp index 725f97573..8c3c7314c 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp @@ -105,15 +105,15 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance break; case GO_SAURFANG_CACHE_25: if(Difficulty == RAID_DIFFICULTY_25MAN_NORMAL) - m_uiSaurfangCacheGUID = pGo->GetGUID(); + m_uiSaurfangCacheGUID = pGo->GetGUID(); break; case GO_SAURFANG_CACHE_10_H: if(Difficulty == RAID_DIFFICULTY_10MAN_HEROIC) - m_uiSaurfangCacheGUID = pGo->GetGUID(); + m_uiSaurfangCacheGUID = pGo->GetGUID(); break; case GO_SAURFANG_CACHE_25_H: if(Difficulty == RAID_DIFFICULTY_25MAN_HEROIC) - m_uiSaurfangCacheGUID = pGo->GetGUID(); + m_uiSaurfangCacheGUID = pGo->GetGUID(); break; case GO_GUNSHIP_ARMORY_10: if(Difficulty == RAID_DIFFICULTY_10MAN_NORMAL) @@ -164,8 +164,13 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance case TYPE_FLIGHT_WAR: m_auiEncounter[4] = uiData; if (uiData == DONE) { + if (GameObject* pChest = instance->GetGameObject(m_uiGunshipArmoryGUID)) + if (pChest && !pChest->isSpawned()) { + pChest->SetRespawnTime(DAY); +// pChest->SetGoState(GO_STATE_ACTIVE); + }; + }; m_auiEncounter[0] = TYPE_FLIGHT_WAR; - } break; case TYPE_FROSTWIRM_COUNT: m_auiEncounter[15] = uiData; @@ -174,9 +179,14 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance case TYPE_SAURFANG: m_auiEncounter[5] = uiData; if (uiData == DONE) { - OpenDoor(m_uiSaurfangDoorGUID); - m_auiEncounter[0] = TYPE_SAURFANG; - } +// OpenDoor(m_uiSaurfangDoorGUID); + if (GameObject* pChest = instance->GetGameObject(m_uiSaurfangCacheGUID)) + if (pChest && !pChest->isSpawned()) { + pChest->SetRespawnTime(DAY); +// pChest->SetGoState(GO_STATE_ACTIVE); + }; + }; +// m_auiEncounter[0] = TYPE_SAURFANG; break; } From c5150138ad117b61759ffac9222c957e864d9a2d Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Fri, 12 Feb 2010 17:29:15 +0300 Subject: [PATCH 141/405] Loot for bosses CLK --- addition/icecrown_loot_mangos.sql | 153 ++++++++++++++++++++++++++++++ 1 file changed, 153 insertions(+) diff --git a/addition/icecrown_loot_mangos.sql b/addition/icecrown_loot_mangos.sql index 98a243511..0dd21dde0 100644 --- a/addition/icecrown_loot_mangos.sql +++ b/addition/icecrown_loot_mangos.sql @@ -164,3 +164,156 @@ INSERT INTO `gameobject_loot_template` VALUES (202180, 50667, 0, 4, 1, 1, 6, 469, 0), (202180, 50274, 0.1, 0, 1, 1, 0, 0, 0), (202180, 49908, 18, 0, 1, 1, 0, 0, 0); + +-- Lord Marrowgar +UPDATE `creature_template` SET `lootid` = 36612 WHERE `entry` = 36612; +DELETE FROM `creature_loot_template` WHERE `entry` = 36612; +INSERT INTO `creature_loot_template` VALUES +(36612, 50761, 0, 1, 1, 1, 6, 469, 0), +(36612, 50771, 0, 1, 1, 1, 6, 469, 0), +(36612, 50339, 0, 1, 1, 1, 6, 469, 0), +(36612, 50764, 0, 1, 1, 1, 6, 469, 0), +(36612, 50772, 0, 2, 1, 1, 6, 469, 0), +(36612, 50759, 0, 1, 1, 1, 6, 469, 0), +(36612, 50760, 0, 1, 1, 1, 6, 469, 0), +(36612, 50774, 0, 2, 1, 1, 6, 469, 0), +(36612, 50773, 0, 2, 1, 1, 6, 469, 0), +(36612, 50775, 0, 2, 1, 1, 6, 469, 0), +(36612, 50762, 0, 2, 1, 1, 6, 469, 0), +(36612, 50763, 0, 1, 1, 1, 6, 469, 0); + +UPDATE `creature_template` SET `lootid` = 13100 WHERE `entry` = 13100; +DELETE FROM `creature_loot_template` WHERE `entry` = 13100; +INSERT INTO `creature_loot_template` VALUES +(13100, 49968, 0, 1, 1, 1, 6, 469, 0), +(13100, 50415, 0, 1, 1, 1, 6, 469, 0), +(13100, 49977, 0, 3, 1, 1, 6, 469, 0), +(13100, 49975, 0, 3, 1, 1, 6, 469, 0), +(13100, 49978, 0, 2, 1, 1, 6, 469, 0), +(13100, 49949, 0, 1, 1, 1, 6, 469, 0), +(13100, 49976, 0, 1, 1, 1, 6, 469, 0), +(13100, 49951, 0, 2, 1, 1, 6, 469, 0), +(13100, 49967, 0, 3, 1, 1, 6, 469, 0), +(13100, 49960, 0, 2, 1, 1, 6, 469, 0), +(13100, 49950, 0, 2, 1, 1, 6, 469, 0), +(13100, 49979, 0, 2, 1, 1, 6, 469, 0), +(13100, 49952, 0, 2, 1, 1, 6, 469, 0), +(13100, 49980, 0, 2, 1, 1, 6, 469, 0), +(13100, 49964, 0, 2, 1, 1, 6, 469, 0), +(13100, 49908, 20, 0, 1, 1, 0, 0, 0), +(13100, 50274, 0.1, 0, 1, 1, 0, 0, 0); + +UPDATE `creature_template` SET `lootid` = 13101 WHERE `entry` = 13101; +DELETE FROM `creature_loot_template` WHERE `entry` = 13101; +INSERT INTO `creature_loot_template` VALUES +(13101, 51931, 0, 1, 1, 1, 6, 469, 0), +(13101, 51938, 0, 2, 1, 1, 6, 469, 0), +(13101, 51937, 0, 2, 1, 1, 6, 469, 0), +(13101, 51936, 0, 2, 1, 1, 6, 469, 0), +(13101, 51929, 0, 1, 1, 1, 6, 469, 0), +(13101, 51930, 0, 1, 1, 1, 6, 469, 0), +(13101, 51928, 0, 1, 1, 1, 6, 469, 0), +(13101, 51932, 0, 2, 1, 1, 6, 469, 0), +(13101, 51935, 0, 1, 1, 1, 6, 469, 0), +(13101, 51934, 0, 2, 1, 1, 6, 469, 0), +(13101, 51933, 0, 1, 1, 1, 6, 469, 0), +(13101, 50346, 0, 2, 1, 1, 6, 469, 0); + + +UPDATE `creature_template` SET `lootid` = 13102 WHERE `entry` = 13102; +DELETE FROM `creature_loot_template` WHERE `entry` = 13102; +INSERT INTO `creature_loot_template` VALUES +(13102, 50604, 0, 1, 1, 1, 6, 469, 0), +(13102, 50609, 0, 1, 1, 1, 6, 469, 0), +(13102, 50611, 0, 2, 1, 1, 6, 469, 0), +(13102, 50709, 0, 3, 1, 1, 6, 469, 0), +(13102, 50616, 0, 3, 1, 1, 6, 469, 0), +(13102, 50613, 0, 2, 1, 1, 6, 469, 0), +(13102, 50607, 0, 2, 1, 1, 6, 469, 0), +(13102, 50608, 0, 3, 1, 1, 6, 469, 0), +(13102, 50606, 0, 2, 1, 1, 6, 469, 0), +(13102, 50615, 0, 2, 1, 1, 6, 469, 0), +(13102, 50612, 0, 1, 1, 1, 6, 469, 0), +(13102, 50614, 0, 1, 1, 1, 6, 469, 0), +(13102, 50610, 0, 1, 1, 1, 6, 469, 0), +(13102, 50617, 0, 2, 1, 1, 6, 469, 0), +(13102, 50605, 0, 2, 1, 1, 6, 469, 0), +(13102, 49908, 20, 0, 1, 1, 0, 0, 0), +(13102, 50274, 0.1, 0, 1, 1, 0, 0, 0); + + +-- Lady Deathwhisper +UPDATE `creature_template` SET `lootid` = 36855 WHERE `entry` = 36855; +DELETE FROM `creature_loot_template` WHERE `entry` = 36855; +INSERT INTO `creature_loot_template` VALUES +(36855, 50781, 0, 1, 1, 1, 6, 469, 0), +(36855, 50776, 0, 1, 1, 1, 6, 469, 0), +(36855, 50782, 0, 2, 1, 1, 6, 469, 0), +(36855, 50342, 0, 3, 1, 1, 6, 469, 0), +(36855, 50780, 0, 1, 1, 1, 6, 469, 0), +(36855, 50784, 0, 2, 1, 1, 6, 469, 0), +(36855, 50779, 0, 2, 1, 1, 6, 469, 0), +(36855, 50777, 0, 3, 1, 1, 6, 469, 0), +(36855, 50778, 0, 3, 1, 1, 6, 469, 0), +(36855, 50783, 0, 3, 1, 1, 6, 469, 0), +(36855, 50785, 0, 2, 1, 1, 6, 469, 0), +(36855, 50786, 0, 2, 1, 1, 6, 469, 0); + + +UPDATE `creature_template` SET `lootid` = 13103 WHERE `entry` = 13103; +DELETE FROM `creature_loot_template` WHERE `entry` = 13103; +INSERT INTO `creature_loot_template` VALUES +(13103, 49992, 0, 1, 1, 1, 6, 469, 0), +(13103, 50034, 0, 1, 1, 1, 6, 469, 0), +(13103, 49994, 0, 2, 1, 1, 6, 469, 0), +(13103, 49983, 0, 2, 1, 1, 6, 469, 0), +(13103, 49987, 0, 3, 1, 1, 6, 469, 0), +(13103, 49982, 0, 1, 1, 1, 6, 469, 0), +(13103, 49990, 0, 1, 1, 1, 6, 469, 0), +(13103, 49991, 0, 2, 1, 1, 6, 469, 0), +(13103, 49989, 0, 1, 1, 1, 6, 469, 0), +(13103, 49988, 0, 3, 1, 1, 6, 469, 0), +(13103, 49996, 0, 3, 1, 1, 6, 469, 0), +(13103, 49995, 0, 2, 1, 1, 6, 469, 0), +(13103, 49993, 0, 3, 1, 1, 6, 469, 0), +(13103, 49986, 0, 2, 1, 1, 6, 469, 0), +(13103, 49985, 0, 1, 1, 1, 6, 469, 0), +(13103, 49908, 21, 0, 1, 1, 0, 0, 0), +(13103, 50274, 0.1, 0, 1, 1, 0, 0, 0); + +UPDATE `creature_template` SET `lootid` = 13104 WHERE `entry` = 13104; +DELETE FROM `creature_loot_template` WHERE `entry` = 13104; +INSERT INTO `creature_loot_template` VALUES +(13104, 51920, 0, 1, 1, 1, 6, 469, 0), +(13104, 51918, 0, 2, 1, 1, 6, 469, 0), +(13104, 51923, 0, 2, 1, 1, 6, 469, 0), +(13104, 51919, 0, 1, 1, 1, 6, 469, 0), +(13104, 51924, 0, 2, 1, 1, 6, 469, 0), +(13104, 51917, 0, 1, 1, 1, 6, 469, 0), +(13104, 51926, 0, 1, 1, 1, 6, 469, 0), +(13104, 51927, 0, 3, 1, 1, 6, 469, 0), +(13104, 51922, 0, 3, 1, 1, 6, 469, 0), +(13104, 51921, 0, 2, 1, 1, 6, 469, 0), +(13104, 51925, 0, 1, 1, 1, 6, 469, 0), +(13104, 50343, 0, 3, 1, 1, 6, 469, 0); + +UPDATE `creature_template` SET `lootid` = 13105 WHERE `entry` = 13105; +DELETE FROM `creature_loot_template` WHERE `entry` = 13105; +INSERT INTO `creature_loot_template` VALUES +(13105, 50647, 0, 1, 1, 1, 6, 469, 0), +(13105, 50639, 0, 2, 1, 1, 6, 469, 0), +(13105, 50640, 0, 3, 1, 1, 6, 469, 0), +(13105, 50646, 0, 3, 1, 1, 6, 469, 0), +(13105, 50649, 0, 2, 1, 1, 6, 469, 0), +(13105, 50650, 0, 3, 1, 1, 6, 469, 0), +(13105, 50641, 0, 1, 1, 1, 6, 469, 0), +(13105, 50642, 0, 1, 1, 1, 6, 469, 0), +(13105, 50645, 0, 3, 1, 1, 6, 469, 0), +(13105, 50652, 0, 2, 1, 1, 6, 469, 0), +(13105, 50648, 0, 1, 1, 1, 6, 469, 0), +(13105, 50644, 0, 1, 1, 1, 6, 469, 0), +(13105, 50643, 0, 3, 1, 1, 6, 469, 0), +(13105, 50651, 0, 2, 1, 1, 6, 469, 0), +(13105, 50638, 0, 1, 1, 1, 6, 469, 0), +(13105, 49908, 21, 0, 1, 1, 0, 0, 0), +(13105, 50274, 0.1, 0, 1, 1, 0, 0, 0); From 8d369210a25fc98cbe4500477b3a6550b09d3d31 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sat, 13 Feb 2010 16:44:30 +0300 Subject: [PATCH 142/405] Marrogwar change --- .../icecrown_citadel/boss_lord_marrowgar.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp index 599b03c2a..19e9ae426 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp @@ -103,7 +103,7 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI case 1: { if (!m_uiBoneStorm) {if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, Regular ? SPELL_BONE_STORM_N : SPELL_BONE_STORM_H); + DoCast(pTarget, Regular ? SPELL_BONE_STORM_N : SPELL_BONE_STORM_H); m_uiBoneStorm = true; stage = 2; } @@ -111,7 +111,7 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI case 2: { if (m_uiBoneStorm_Timer < diff) { - m_creature->RemoveAurasDueToSpell(Regular ? SPELL_BONE_STORM_N : SPELL_BONE_STORM_H); +// m_creature->RemoveAurasDueToSpell(Regular ? SPELL_BONE_STORM_N : SPELL_BONE_STORM_H); m_creature->SetInCombatWithZone(); stage = 3; } else m_uiBoneStorm_Timer -= diff; @@ -121,21 +121,21 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI if (m_uiSaberLash_Timer < diff) {DoCastSpellIfCan(m_creature->getVictim(), Regular ? SPELL_SABER_LASH_N :SPELL_SABER_LASH_H); - m_uiSaberLash_Timer=urand(10000,15000); + m_uiSaberLash_Timer=urand(8000,12000); } else m_uiSaberLash_Timer -= diff; if (m_uiColdFlame_Timer < diff) {if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) DoCastSpellIfCan(pTarget, Regular ? SPELL_COLD_FLAME_N :SPELL_COLD_FLAME_H); - m_uiColdFlame_Timer=urand(25000,35000); + m_uiColdFlame_Timer=urand(15000,25000); } else m_uiColdFlame_Timer -= diff; health = m_creature->GetHealth()*100 / m_creature->GetMaxHealth(); - if (health <= 50 && stage == 0) stage = 1; + if (health <= 30 && stage == 0) stage = 1; if (m_uiBerserk_Timer < diff) { - DoCastSpellIfCan(m_creature, SPELL_BERSERK); + DoCast(m_creature, SPELL_BERSERK); // m_uiBerserk_Timer = m_bIsRegularMode ? 300000 : 180000; } else m_uiBerserk_Timer -= diff; From 5699d0eb773cd7f3c5f5d54606812e3774a1d040 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sat, 13 Feb 2010 17:04:51 +0300 Subject: [PATCH 143/405] Iecrown change --- addition/icecrown_loot_mangos.sql | 16 +++++++-------- .../boss_deathbringer_saurfang.cpp | 20 +++++++++---------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/addition/icecrown_loot_mangos.sql b/addition/icecrown_loot_mangos.sql index 0dd21dde0..6ccaabb53 100644 --- a/addition/icecrown_loot_mangos.sql +++ b/addition/icecrown_loot_mangos.sql @@ -9,10 +9,10 @@ INSERT INTO `gameobject_template` DELETE FROM `gameobject` WHERE `id` IN (202239,202240,902241,902242); INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES -(913383, 202239, 631, 1, 64, -498.363, 2230.69, 539.284, 3.70944, 0, 0, 0.959963, -0.280126, -604800, 100, 1), -(913385, 202240, 631, 2, 64, -498.363, 2230.69, 539.284, 3.70944, 0, 0, 0.959963, -0.280126, -604800, 100, 1), -(913395, 902241, 631, 4, 64, -498.363, 2230.69, 539.284, 3.70944, 0, 0, 0.959963, -0.280126, -604800, 100, 1), -(913397, 902242, 631, 8, 64, -498.363, 2230.69, 539.284, 3.70944, 0, 0, 0.959963, -0.280126, -604800, 100, 1); +(913383, 202239, 631, 1, 65535, -498.363, 2230.69, 539.284, 3.70944, 0, 0, 0.959963, -0.280126, -604800, 100, 1), +(913385, 202240, 631, 2, 65535, -498.363, 2230.69, 539.284, 3.70944, 0, 0, 0.959963, -0.280126, -604800, 100, 1), +(913395, 902241, 631, 4, 65535, -498.363, 2230.69, 539.284, 3.70944, 0, 0, 0.959963, -0.280126, -604800, 100, 1), +(913397, 902242, 631, 8, 65535, -498.363, 2230.69, 539.284, 3.70944, 0, 0, 0.959963, -0.280126, -604800, 100, 1); DELETE FROM `gameobject_loot_template` WHERE `entry` = 202239; INSERT INTO `gameobject_loot_template` VALUES @@ -90,10 +90,10 @@ INSERT INTO `gameobject_template` DELETE FROM `gameobject` WHERE `id` IN (201873,201874,202178,202180); INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES -(913387, 201873, 631, 1, 64, -558.932, 2211.48, 539.287, 0.0149338, 0, 0, 0.00746682, 0.999972, -604800, 100, 1), -(913389, 201874, 631, 2, 64, -558.932, 2211.48, 539.287, 0.0149338, 0, 0, 0.00746682, 0.999972, -604800, 100, 1), -(913391, 202178, 631, 4, 64, -558.932, 2211.48, 539.287, 0.0149338, 0, 0, 0.00746682, 0.999972, -604800, 100, 1), -(913393, 202180, 631, 8, 64, -558.932, 2211.48, 539.287, 0.0149338, 0, 0, 0.00746682, 0.999972, -604800, 100, 1); +(913387, 201873, 631, 1, 65535, -558.932, 2211.48, 539.287, 0.0149338, 0, 0, 0.00746682, 0.999972, -604800, 100, 1), +(913389, 201874, 631, 2, 65535, -558.932, 2211.48, 539.287, 0.0149338, 0, 0, 0.00746682, 0.999972, -604800, 100, 1), +(913391, 202178, 631, 4, 65535, -558.932, 2211.48, 539.287, 0.0149338, 0, 0, 0.00746682, 0.999972, -604800, 100, 1), +(913393, 202180, 631, 8, 65535, -558.932, 2211.48, 539.287, 0.0149338, 0, 0, 0.00746682, 0.999972, -604800, 100, 1); DELETE FROM `gameobject_loot_template` WHERE `entry` = 201873; INSERT INTO `gameobject_loot_template` VALUES diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp index 4253902c2..3f3aaed74 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp @@ -79,9 +79,9 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI stage = 0; uint32 m_uiBloodLink_Timer = 10000; - uint32 m_uiBloodNova_Timer = 30000; - uint32 m_uiBoilingBlood_Timer = 30000; - uint32 m_uiSummon_Timer =40000; + uint32 m_uiBloodNova_Timer = 20000; + uint32 m_uiBoilingBlood_Timer = 25000; + uint32 m_uiSummon_Timer =30000; } uint64 CallGuard(uint64 npctype,TempSummonType type, uint32 _summontime ) @@ -116,7 +116,7 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI break;} case 1: { if (!m_uiIsFrenzy) { - DoCastSpellIfCan(m_creature, SPELL_FRENZY); + DoCast(m_creature, SPELL_FRENZY); m_uiIsFrenzy = true; stage = 2; } @@ -128,18 +128,18 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI if (m_uiBloodLink_Timer < diff) { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, SPELL_BLOOD_LINK); + DoCast(pTarget, SPELL_BLOOD_LINK); m_uiBloodLink_Timer=urand(8000,15000); } else m_uiBloodLink_Timer -= diff; if (m_uiBloodNova_Timer < diff) { - DoCastSpellIfCan(m_creature->getVictim(), Regular ? SPELL_BLOOD_NOVA_N : SPELL_BLOOD_NOVA_H); - m_uiBloodNova_Timer=urand(30000,35000); + DoCast(m_creature->getVictim(), Regular ? SPELL_BLOOD_NOVA_N : SPELL_BLOOD_NOVA_H); + m_uiBloodNova_Timer=urand(25000,30000); } else m_uiBloodNova_Timer -= diff; if (m_uiBoilingBlood_Timer < diff) { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, Regular ? SPELL_BOILING_BLOOD_N : SPELL_BOILING_BLOOD_H); + DoCast(pTarget, Regular ? SPELL_BOILING_BLOOD_N : SPELL_BOILING_BLOOD_H); m_uiBoilingBlood_Timer=urand(20000,40000); } else m_uiBoilingBlood_Timer -= diff; @@ -149,7 +149,7 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI CallGuard(NPC_BLOOD_BEASTS, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5000); if(!Regular) CallGuard(NPC_BLOOD_BEASTS, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5000); if(!Regular) CallGuard(NPC_BLOOD_BEASTS, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5000); - m_uiSummon_Timer=40000; + m_uiSummon_Timer=30000; } else m_uiSummon_Timer -= diff; health = m_creature->GetHealth()*100 / m_creature->GetMaxHealth(); @@ -157,7 +157,7 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI if (m_uiBerserk_Timer < diff) { - DoCastSpellIfCan(m_creature, SPELL_BERSERK); + DoCast(m_creature, SPELL_BERSERK); m_uiBerserk_Timer = 600000; } else m_uiBerserk_Timer -= diff; From e599d02eefe6c7149bc2c1aaaf856c7a003f1272 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sun, 14 Feb 2010 13:49:13 +0300 Subject: [PATCH 144/405] Icecrown bosses change --- .../boss_deathbringer_saurfang.cpp | 2 +- .../boss_lady_deathwhisper.cpp | 32 ++++++++++--------- .../icecrown_citadel/boss_lord_marrowgar.cpp | 4 +-- 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp index 3f3aaed74..41e614e20 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp @@ -149,7 +149,7 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI CallGuard(NPC_BLOOD_BEASTS, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5000); if(!Regular) CallGuard(NPC_BLOOD_BEASTS, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5000); if(!Regular) CallGuard(NPC_BLOOD_BEASTS, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5000); - m_uiSummon_Timer=30000; + m_uiSummon_Timer=60000; } else m_uiSummon_Timer -= diff; health = m_creature->GetHealth()*100 / m_creature->GetMaxHealth(); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp index 62b7a7cd6..17dddc7f4 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp @@ -71,6 +71,7 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI uint32 m_uiDominateMind_Timer; uint32 m_uiBerserk_Timer; uint32 m_uiSummon_Timer; + uint32 m_uiSummon2_Timer; bool isManaBarrier; uint8 health; uint64 m_uiMana; @@ -79,11 +80,12 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI { if(pInstance) pInstance->SetData(TYPE_DEATHWHISPER, NOT_STARTED); m_uiManaBarrier_Timer = 30000; - m_uiSummon_Timer = 30000; + m_uiSummon_Timer = 60000; + m_uiSummon2_Timer = 20000; m_uiShadowBolt_Timer = urand(8000,10000); - m_uiDeathAndDecay_Timer = urand(10000,20000); + m_uiDeathAndDecay_Timer = urand(40000,60000); m_uiDarkEmpowerment_Timer = 45000; - m_uiFrostBolt_Timer = urand(10000,15000); + m_uiFrostBolt_Timer = urand(20000,25000); m_uiInsignificance_Timer = 40000; m_uiDominateMind_Timer = 30000; m_uiBerserk_Timer = 600000; @@ -158,15 +160,15 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI CallGuard(NPC_FANATIC, TEMPSUMMON_TIMED_DESPAWN, 60000); CallGuard(NPC_ADHERENT, TEMPSUMMON_TIMED_DESPAWN, 60000); }; - m_uiSummon_Timer=20000; + m_uiSummon_Timer=60000; } else m_uiSummon_Timer -= diff; if (m_uiDarkEmpowerment_Timer < diff) { if(Creature *pGuard = GetClosestCreatureWithEntry(m_creature, NPC_FANATIC, 30.0f)) - DoCastSpellIfCan(pGuard, SPELL_DARK_EMPOWERMENT_N); + DoCast(pGuard, SPELL_DARK_EMPOWERMENT_N); else if(Creature *pGuard = GetClosestCreatureWithEntry(m_creature, NPC_ADHERENT, 30.0f)) - DoCastSpellIfCan(pGuard, SPELL_DARK_EMPOWERMENT_N); + DoCast(pGuard, SPELL_DARK_EMPOWERMENT_N); m_uiDarkEmpowerment_Timer=urand(20000,40000); } else m_uiDarkEmpowerment_Timer -= diff; @@ -184,27 +186,27 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI m_uiInsignificance_Timer=urand(20000,40000); } else m_uiInsignificance_Timer -= diff; - if (m_uiSummon_Timer < diff) + if (m_uiSummon2_Timer < diff) { CallGuard(NPC_VENGEFUL_SHADE, TEMPSUMMON_TIMED_DESPAWN, 30000); if(!Regular) CallGuard(NPC_VENGEFUL_SHADE, TEMPSUMMON_TIMED_DESPAWN, 30000); - m_uiSummon_Timer=20000; - } else m_uiSummon_Timer -= diff; + m_uiSummon2_Timer=20000; + } else m_uiSummon2_Timer -= diff; + if (m_uiDominateMind_Timer < diff) + {if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCastSpellIfCan(pTarget, SPELL_DOMINATE_MIND_H); + m_uiDominateMind_Timer=urand(15000,25000); + } else m_uiDominateMind_Timer -= diff; break;} } if (m_uiDeathAndDecay_Timer < diff) {DoCastSpellIfCan(m_creature->getVictim(), SPELL_DEATH_AND_DECAY_N); - m_uiDeathAndDecay_Timer=urand(10000,15000); + m_uiDeathAndDecay_Timer=urand(30000,45000); } else m_uiDeathAndDecay_Timer -= diff; - if (m_uiDominateMind_Timer < diff) - {if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, SPELL_DOMINATE_MIND_H); - m_uiDominateMind_Timer=urand(25000,35000); - } else m_uiDominateMind_Timer -= diff; health = m_creature->GetHealth()*100 / m_creature->GetMaxHealth(); if (!isManaBarrier && stage == 0) stage = 1; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp index 19e9ae426..6c1e499a1 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp @@ -35,8 +35,8 @@ enum SPELL_BONE_STRIKE_N = 69057, SPELL_BONE_STORM_N = 69076, - SPELL_SABER_LASH_H = 70814, - SPELL_COLD_FLAME_H = 70825, + SPELL_SABER_LASH_H = 71021, + SPELL_COLD_FLAME_H = 70824, SPELL_BONE_STRIKE_H = 69057, SPELL_BONE_STORM_H = 69076, }; From 454c5eb9ba28cf7bdd15854fe39442ed65244ee7 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Mon, 15 Feb 2010 11:55:05 +0300 Subject: [PATCH 145/405] Loot change --- addition/icecrown_loot_mangos.sql | 418 +++++++++++++++--------------- 1 file changed, 209 insertions(+), 209 deletions(-) diff --git a/addition/icecrown_loot_mangos.sql b/addition/icecrown_loot_mangos.sql index 6ccaabb53..93523ba8c 100644 --- a/addition/icecrown_loot_mangos.sql +++ b/addition/icecrown_loot_mangos.sql @@ -16,65 +16,65 @@ INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `positi DELETE FROM `gameobject_loot_template` WHERE `entry` = 202239; INSERT INTO `gameobject_loot_template` VALUES -(202239, 50798, 0, 1, 1, 1, 6, 469, 0), -(202239, 50805, 0, 1, 1, 1, 6, 469, 0), -(202239, 50809, 0, 1, 1, 1, 6, 469, 0), -(202239, 50803, 0, 1, 1, 1, 6, 469, 0), -(202239, 50804, 0, 2, 1, 1, 6, 469, 0), -(202239, 50800, 0, 2, 1, 1, 6, 469, 0), -(202239, 50799, 0, 2, 1, 1, 6, 469, 0), -(202239, 50801, 0, 2, 1, 1, 6, 469, 0), -(202239, 50807, 0, 3, 1, 1, 0, 469, 0), -(202239, 50808, 0, 3, 1, 1, 0, 469, 0), -(202239, 50806, 0, 3, 1, 1, 0, 469, 0), -(202239, 50802, 0, 3, 1, 1, 0, 469, 0); +(202239, 50798, 0, 1, 1, 1, 0, 0, 0), +(202239, 50805, 0, 1, 1, 1, 0, 0, 0), +(202239, 50809, 0, 1, 1, 1, 0, 0, 0), +(202239, 50803, 0, 1, 1, 1, 0, 0, 0), +(202239, 50804, 0, 2, 1, 1, 0, 0, 0), +(202239, 50800, 0, 2, 1, 1, 0, 0, 0), +(202239, 50799, 0, 2, 1, 1, 0, 0, 0), +(202239, 50801, 0, 2, 1, 1, 0, 0, 0), +(202239, 50807, 0, 3, 1, 1, 0, 0, 0), +(202239, 50808, 0, 3, 1, 1, 0, 0, 0), +(202239, 50806, 0, 3, 1, 1, 0, 0, 0), +(202239, 50802, 0, 3, 1, 1, 0, 0, 0); DELETE FROM `gameobject_loot_template` WHERE `entry` = 202240; INSERT INTO `gameobject_loot_template` VALUES -(202240, 52025, 0, 1, 1, 1, 6, 67, 0), -(202240, 52027, 0, 1, 1, 1, 6, 67, 0), -(202240, 52026, 0, 1, 1, 1, 6, 67, 0), -(202240, 50362, 0, 2, 1, 1, 6, 469, 0), -(202240, 50333, 0, 3, 1, 1, 6, 469, 0), +(202240, 52025, 0, 1, 1, 1, 0, 0, 0), +(202240, 52027, 0, 1, 1, 1, 0, 0, 0), +(202240, 52026, 0, 1, 1, 1, 0, 0, 0), +(202240, 50362, 0, 2, 1, 1, 0, 0, 0), +(202240, 50333, 0, 3, 1, 1, 0, 0, 0), (202240, 49908, 18, 0, 1, 1, 0, 0, 0), -(202240, 50014, 0, 0, 1, 1, 6, 469, 0), -(202240, 50412, 0, 2, 1, 1, 6, 469, 0), -(202240, 50807, 0, 3, 1, 1, 6, 469, 0), -(202240, 50015, 0, 3, 1, 1, 6, 469, 0), +(202240, 50014, 0, 0, 1, 1, 0, 0, 0), +(202240, 50412, 0, 2, 1, 1, 0, 0, 0), +(202240, 50807, 0, 3, 1, 1, 0, 0, 0), +(202240, 50015, 0, 3, 1, 1, 0, 0, 0), (202240, 50274, 0.1, 0, 1, 1, 0, 0, 0); DELETE FROM `gameobject_loot_template` WHERE `entry` = 902241; INSERT INTO `gameobject_loot_template` VALUES -(902241, 51902, 0, 2, 1, 1, 6, 469, 0), -(902241, 52027, 0, 1, 1, 1, 6, 67, 0), -(902241, 51895, 0, 4, 1, 1, 6, 469, 0), -(902241, 51901, 0, 2, 1, 1, 6, 469, 0), -(902241, 51903, 0, 2, 1, 1, 6, 469, 0), -(902241, 51899, 0, 4, 1, 1, 6, 469, 0), -(902241, 51897, 0, 4, 1, 1, 6, 469, 0), -(902241, 51898, 0, 3, 1, 1, 6, 469, 0), -(902241, 52026, 0, 1, 1, 1, 6, 67, 0), -(902241, 51905, 0, 3, 1, 1, 6, 469, 0), -(902241, 51900, 0, 3, 1, 1, 6, 469, 0), -(902241, 51904, 0, 2, 1, 1, 6, 469, 0), -(902241, 51894, 0, 3, 1, 1, 6, 469, 0), -(902241, 51896, 0, 4, 1, 1, 6, 469, 0), -(902241, 52025, 0, 1, 1, 1, 6, 67, 0), +(902241, 51902, 0, 2, 1, 1, 0, 0, 0), +(902241, 52027, 0, 1, 1, 1, 0, 0, 0), +(902241, 51895, 0, 4, 1, 1, 0, 0, 0), +(902241, 51901, 0, 2, 1, 1, 0, 0, 0), +(902241, 51903, 0, 2, 1, 1, 0, 0, 0), +(902241, 51899, 0, 4, 1, 1, 0, 0, 0), +(902241, 51897, 0, 4, 1, 1, 0, 0, 0), +(902241, 51898, 0, 3, 1, 1, 0, 0, 0), +(902241, 52026, 0, 1, 1, 1, 0, 0, 0), +(902241, 51905, 0, 3, 1, 1, 0, 0, 0), +(902241, 51900, 0, 3, 1, 1, 0, 0, 0), +(902241, 51904, 0, 2, 1, 1, 0, 0, 0), +(902241, 51894, 0, 3, 1, 1, 0, 0, 0), +(902241, 51896, 0, 4, 1, 1, 0, 0, 0), +(902241, 52025, 0, 1, 1, 1, 0, 0, 0), (902241, 49908, 18, 0, 1, 1, 0, 0, 0); DELETE FROM `gameobject_loot_template` WHERE `entry` = 902242; INSERT INTO `gameobject_loot_template` VALUES -(902242, 52027, 0, 1, 1, 1, 6, 67, 0), -(902242, 52026, 0, 1, 1, 1, 6, 67, 0), -(902242, 52025, 0, 1, 1, 1, 6, 67, 0), -(902242, 52030, 0, 2, 1, 1, 6, 67, 0), -(902242, 52029, 0, 2, 1, 1, 6, 67, 0), -(902242, 52028, 0, 2, 1, 1, 6, 67, 0), -(902242, 50671, 0, 3, 1, 1, 6, 469, 0), -(902242, 50672, 0, 4, 1, 1, 6, 469, 0), -(902242, 50363, 0, 4, 1, 1, 6, 469, 0), -(902242, 50668, 0, 3, 1, 1, 6, 469, 0), -(902242, 50670, 0, 3, 1, 1, 6, 469, 0), +(902242, 52027, 0, 1, 1, 1, 0, 0, 0), +(902242, 52026, 0, 1, 1, 1, 0, 0, 0), +(902242, 52025, 0, 1, 1, 1, 0, 0, 0), +(902242, 52030, 0, 2, 1, 1, 0, 0, 0), +(902242, 52029, 0, 2, 1, 1, 0, 0, 0), +(902242, 52028, 0, 2, 1, 1, 0, 0, 0), +(902242, 50671, 0, 3, 1, 1, 0, 0, 0), +(902242, 50672, 0, 4, 1, 1, 0, 0, 0), +(902242, 50363, 0, 4, 1, 1, 0, 0, 0), +(902242, 50668, 0, 3, 1, 1, 0, 0, 0), +(902242, 50670, 0, 3, 1, 1, 0, 0, 0), (902242, 49908, 18, 0, 1, 1, 0, 0, 0), (902242, 50274, 0.1, 0, 1, 1, 0, 0, 0); @@ -97,71 +97,71 @@ INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `positi DELETE FROM `gameobject_loot_template` WHERE `entry` = 201873; INSERT INTO `gameobject_loot_template` VALUES -(201873, 50793, 0, 1, 1, 1, 6, 469, 0), -(201873, 50787, 0, 1, 1, 1, 6, 469, 0), -(201873, 50340, 0, 2, 1, 1, 6, 469, 0), -(201873, 50794, 0, 1, 1, 1, 6, 469, 0), -(201873, 50789, 0, 3, 1, 1, 6, 469, 0), -(201873, 50791, 0, 2, 1, 1, 6, 469, 0), -(201873, 50788, 0, 3, 1, 1, 6, 469, 0), -(201873, 50792, 0, 3, 1, 1, 6, 469, 0), -(201873, 50796, 0, 3, 1, 1, 6, 469, 0), -(201873, 50795, 0, 3, 1, 1, 6, 469, 0), -(201873, 50790, 0, 2, 1, 1, 6, 469, 0), -(201873, 50797, 0, 3, 1, 1, 6, 469, 0); +(201873, 50793, 0, 1, 1, 1, 0, 0, 0), +(201873, 50787, 0, 1, 1, 1, 0, 0, 0), +(201873, 50340, 0, 2, 1, 1, 0, 0, 0), +(201873, 50794, 0, 1, 1, 1, 0, 0, 0), +(201873, 50789, 0, 3, 1, 1, 0, 0, 0), +(201873, 50791, 0, 2, 1, 1, 0, 0, 0), +(201873, 50788, 0, 3, 1, 1, 0, 0, 0), +(201873, 50792, 0, 3, 1, 1, 0, 0, 0), +(201873, 50796, 0, 3, 1, 1, 0, 0, 0), +(201873, 50795, 0, 3, 1, 1, 0, 0, 0), +(201873, 50790, 0, 2, 1, 1, 0, 0, 0), +(201873, 50797, 0, 3, 1, 1, 0, 0, 0); DELETE FROM `gameobject_loot_template` WHERE `entry` = 201874; INSERT INTO `gameobject_loot_template` VALUES -(201874, 50008, 0, 1, 1, 1, 6, 469, 0), -(201874, 49998, 0, 2, 1, 1, 6, 469, 0), -(201874, 50005, 0, 2, 1, 1, 6, 469, 0), -(201874, 50352, 0, 1, 1, 1, 6, 469, 0), -(201874, 50011, 0, 3, 1, 1, 6, 469, 0), -(201874, 50359, 0, 1, 1, 1, 6, 469, 0), -(201874, 50001, 0, 3, 1, 1, 6, 469, 0), -(201874, 50000, 0, 3, 1, 1, 6, 469, 0), -(201874, 50002, 0, 3, 1, 1, 6, 469, 0), -(201874, 50006, 0, 3, 1, 1, 6, 469, 0), -(201874, 49999, 0, 1, 1, 1, 6, 469, 0), -(201874, 50010, 0, 3, 1, 1, 6, 469, 0), -(201874, 50003, 0, 3, 1, 1, 6, 469, 0), -(201874, 50411, 0, 2, 1, 1, 6, 469, 0), -(201874, 50009, 0, 3, 1, 1, 6, 469, 0), +(201874, 50008, 0, 1, 1, 1, 0, 0, 0), +(201874, 49998, 0, 2, 1, 1, 0, 0, 0), +(201874, 50005, 0, 2, 1, 1, 0, 0, 0), +(201874, 50352, 0, 1, 1, 1, 0, 0, 0), +(201874, 50011, 0, 3, 1, 1, 0, 0, 0), +(201874, 50359, 0, 1, 1, 1, 0, 0, 0), +(201874, 50001, 0, 3, 1, 1, 0, 0, 0), +(201874, 50000, 0, 3, 1, 1, 0, 0, 0), +(201874, 50002, 0, 3, 1, 1, 0, 0, 0), +(201874, 50006, 0, 3, 1, 1, 0, 0, 0), +(201874, 49999, 0, 1, 1, 1, 0, 0, 0), +(201874, 50010, 0, 3, 1, 1, 0, 0, 0), +(201874, 50003, 0, 3, 1, 1, 0, 0, 0), +(201874, 50411, 0, 2, 1, 1, 0, 0, 0), +(201874, 50009, 0, 3, 1, 1, 0, 0, 0), (201874, 50274, 0.1, 0, 1, 1, 0, 0, 0); DELETE FROM `gameobject_loot_template` WHERE `entry` = 202178; INSERT INTO `gameobject_loot_template` VALUES -(202178, 51913, 0, 1, 1, 1, 6, 469, 0), -(202178, 51915, 0, 2, 1, 1, 6, 469, 0), -(202178, 51907, 0, 3, 1, 1, 6, 469, 0), -(202178, 51908, 0, 3, 1, 1, 6, 469, 0), -(202178, 51916, 0, 1, 1, 1, 6, 469, 0), -(202178, 51906, 0, 2, 1, 1, 6, 469, 0), -(202178, 51914, 0, 3, 1, 1, 6, 469, 0), -(202178, 51910, 0, 1, 1, 1, 6, 469, 0), -(202178, 50345, 0, 3, 1, 1, 6, 469, 0), -(202178, 51909, 0, 1, 1, 1, 6, 469, 0), -(202178, 51911, 0, 2, 1, 1, 6, 469, 0), -(202178, 51912, 0, 1, 1, 1, 6, 469, 0), +(202178, 51913, 0, 1, 1, 1, 0, 0, 0), +(202178, 51915, 0, 2, 1, 1, 0, 0, 0), +(202178, 51907, 0, 3, 1, 1, 0, 0, 0), +(202178, 51908, 0, 3, 1, 1, 0, 0, 0), +(202178, 51916, 0, 1, 1, 1, 0, 0, 0), +(202178, 51906, 0, 2, 1, 1, 0, 0, 0), +(202178, 51914, 0, 3, 1, 1, 0, 0, 0), +(202178, 51910, 0, 1, 1, 1, 0, 0, 0), +(202178, 50345, 0, 3, 1, 1, 0, 0, 0), +(202178, 51909, 0, 1, 1, 1, 0, 0, 0), +(202178, 51911, 0, 2, 1, 1, 0, 0, 0), +(202178, 51912, 0, 1, 1, 1, 0, 0, 0), (202178, 49908, 18, 0, 1, 1, 0, 0, 0); DELETE FROM `gameobject_loot_template` WHERE `entry` = 202180; INSERT INTO `gameobject_loot_template` VALUES -(202180, 50366, 0, 1, 1, 1, 6, 469, 0), -(202180, 50658, 0, 4, 1, 1, 6, 469, 0), -(202180, 50660, 0, 2, 1, 1, 6, 469, 0), -(202180, 50665, 0, 3, 1, 1, 6, 469, 0), -(202180, 50661, 0, 3, 1, 1, 6, 469, 0), -(202180, 50349, 0, 1, 1, 1, 6, 469, 0), -(202180, 50663, 0, 2, 1, 1, 6, 469, 0), -(202180, 50656, 0, 2, 1, 1, 6, 469, 0), -(202180, 50659, 0, 3, 1, 1, 6, 469, 0), -(202180, 50664, 0, 1, 1, 1, 6, 469, 0), -(202180, 50655, 0, 3, 1, 1, 6, 469, 0), -(202180, 50654, 0, 4, 1, 1, 6, 469, 0), -(202180, 50653, 0, 4, 1, 1, 6, 469, 0), -(202180, 50657, 0, 1, 1, 1, 6, 469, 0), -(202180, 50667, 0, 4, 1, 1, 6, 469, 0), +(202180, 50366, 0, 1, 1, 1, 0, 0, 0), +(202180, 50658, 0, 4, 1, 1, 0, 0, 0), +(202180, 50660, 0, 2, 1, 1, 0, 0, 0), +(202180, 50665, 0, 3, 1, 1, 0, 0, 0), +(202180, 50661, 0, 3, 1, 1, 0, 0, 0), +(202180, 50349, 0, 1, 1, 1, 0, 0, 0), +(202180, 50663, 0, 2, 1, 1, 0, 0, 0), +(202180, 50656, 0, 2, 1, 1, 0, 0, 0), +(202180, 50659, 0, 3, 1, 1, 0, 0, 0), +(202180, 50664, 0, 1, 1, 1, 0, 0, 0), +(202180, 50655, 0, 3, 1, 1, 0, 0, 0), +(202180, 50654, 0, 4, 1, 1, 0, 0, 0), +(202180, 50653, 0, 4, 1, 1, 0, 0, 0), +(202180, 50657, 0, 1, 1, 1, 0, 0, 0), +(202180, 50667, 0, 4, 1, 1, 0, 0, 0), (202180, 50274, 0.1, 0, 1, 1, 0, 0, 0), (202180, 49908, 18, 0, 1, 1, 0, 0, 0); @@ -169,75 +169,75 @@ INSERT INTO `gameobject_loot_template` VALUES UPDATE `creature_template` SET `lootid` = 36612 WHERE `entry` = 36612; DELETE FROM `creature_loot_template` WHERE `entry` = 36612; INSERT INTO `creature_loot_template` VALUES -(36612, 50761, 0, 1, 1, 1, 6, 469, 0), -(36612, 50771, 0, 1, 1, 1, 6, 469, 0), -(36612, 50339, 0, 1, 1, 1, 6, 469, 0), -(36612, 50764, 0, 1, 1, 1, 6, 469, 0), -(36612, 50772, 0, 2, 1, 1, 6, 469, 0), -(36612, 50759, 0, 1, 1, 1, 6, 469, 0), -(36612, 50760, 0, 1, 1, 1, 6, 469, 0), -(36612, 50774, 0, 2, 1, 1, 6, 469, 0), -(36612, 50773, 0, 2, 1, 1, 6, 469, 0), -(36612, 50775, 0, 2, 1, 1, 6, 469, 0), -(36612, 50762, 0, 2, 1, 1, 6, 469, 0), -(36612, 50763, 0, 1, 1, 1, 6, 469, 0); +(36612, 50761, 0, 1, 1, 1, 0, 0, 0), +(36612, 50771, 0, 1, 1, 1, 0, 0, 0), +(36612, 50339, 0, 1, 1, 1, 0, 0, 0), +(36612, 50764, 0, 1, 1, 1, 0, 0, 0), +(36612, 50772, 0, 2, 1, 1, 0, 0, 0), +(36612, 50759, 0, 1, 1, 1, 0, 0, 0), +(36612, 50760, 0, 1, 1, 1, 0, 0, 0), +(36612, 50774, 0, 2, 1, 1, 0, 0, 0), +(36612, 50773, 0, 2, 1, 1, 0, 0, 0), +(36612, 50775, 0, 2, 1, 1, 0, 0, 0), +(36612, 50762, 0, 2, 1, 1, 0, 0, 0), +(36612, 50763, 0, 1, 1, 1, 0, 0, 0); UPDATE `creature_template` SET `lootid` = 13100 WHERE `entry` = 13100; DELETE FROM `creature_loot_template` WHERE `entry` = 13100; INSERT INTO `creature_loot_template` VALUES -(13100, 49968, 0, 1, 1, 1, 6, 469, 0), -(13100, 50415, 0, 1, 1, 1, 6, 469, 0), -(13100, 49977, 0, 3, 1, 1, 6, 469, 0), -(13100, 49975, 0, 3, 1, 1, 6, 469, 0), -(13100, 49978, 0, 2, 1, 1, 6, 469, 0), -(13100, 49949, 0, 1, 1, 1, 6, 469, 0), -(13100, 49976, 0, 1, 1, 1, 6, 469, 0), -(13100, 49951, 0, 2, 1, 1, 6, 469, 0), -(13100, 49967, 0, 3, 1, 1, 6, 469, 0), -(13100, 49960, 0, 2, 1, 1, 6, 469, 0), -(13100, 49950, 0, 2, 1, 1, 6, 469, 0), -(13100, 49979, 0, 2, 1, 1, 6, 469, 0), -(13100, 49952, 0, 2, 1, 1, 6, 469, 0), -(13100, 49980, 0, 2, 1, 1, 6, 469, 0), -(13100, 49964, 0, 2, 1, 1, 6, 469, 0), +(13100, 49968, 0, 1, 1, 1, 0, 0, 0), +(13100, 50415, 0, 1, 1, 1, 0, 0, 0), +(13100, 49977, 0, 3, 1, 1, 0, 0, 0), +(13100, 49975, 0, 3, 1, 1, 0, 0, 0), +(13100, 49978, 0, 2, 1, 1, 0, 0, 0), +(13100, 49949, 0, 1, 1, 1, 0, 0, 0), +(13100, 49976, 0, 1, 1, 1, 0, 0, 0), +(13100, 49951, 0, 2, 1, 1, 0, 0, 0), +(13100, 49967, 0, 3, 1, 1, 0, 0, 0), +(13100, 49960, 0, 2, 1, 1, 0, 0, 0), +(13100, 49950, 0, 2, 1, 1, 0, 0, 0), +(13100, 49979, 0, 2, 1, 1, 0, 0, 0), +(13100, 49952, 0, 2, 1, 1, 0, 0, 0), +(13100, 49980, 0, 2, 1, 1, 0, 0, 0), +(13100, 49964, 0, 2, 1, 1, 0, 0, 0), (13100, 49908, 20, 0, 1, 1, 0, 0, 0), (13100, 50274, 0.1, 0, 1, 1, 0, 0, 0); UPDATE `creature_template` SET `lootid` = 13101 WHERE `entry` = 13101; DELETE FROM `creature_loot_template` WHERE `entry` = 13101; INSERT INTO `creature_loot_template` VALUES -(13101, 51931, 0, 1, 1, 1, 6, 469, 0), -(13101, 51938, 0, 2, 1, 1, 6, 469, 0), -(13101, 51937, 0, 2, 1, 1, 6, 469, 0), -(13101, 51936, 0, 2, 1, 1, 6, 469, 0), -(13101, 51929, 0, 1, 1, 1, 6, 469, 0), -(13101, 51930, 0, 1, 1, 1, 6, 469, 0), -(13101, 51928, 0, 1, 1, 1, 6, 469, 0), -(13101, 51932, 0, 2, 1, 1, 6, 469, 0), -(13101, 51935, 0, 1, 1, 1, 6, 469, 0), -(13101, 51934, 0, 2, 1, 1, 6, 469, 0), -(13101, 51933, 0, 1, 1, 1, 6, 469, 0), -(13101, 50346, 0, 2, 1, 1, 6, 469, 0); +(13101, 51931, 0, 1, 1, 1, 0, 0, 0), +(13101, 51938, 0, 2, 1, 1, 0, 0, 0), +(13101, 51937, 0, 2, 1, 1, 0, 0, 0), +(13101, 51936, 0, 2, 1, 1, 0, 0, 0), +(13101, 51929, 0, 1, 1, 1, 0, 0, 0), +(13101, 51930, 0, 1, 1, 1, 0, 0, 0), +(13101, 51928, 0, 1, 1, 1, 0, 0, 0), +(13101, 51932, 0, 2, 1, 1, 0, 0, 0), +(13101, 51935, 0, 1, 1, 1, 0, 0, 0), +(13101, 51934, 0, 2, 1, 1, 0, 0, 0), +(13101, 51933, 0, 1, 1, 1, 0, 0, 0), +(13101, 50346, 0, 2, 1, 1, 0, 0, 0); UPDATE `creature_template` SET `lootid` = 13102 WHERE `entry` = 13102; DELETE FROM `creature_loot_template` WHERE `entry` = 13102; INSERT INTO `creature_loot_template` VALUES -(13102, 50604, 0, 1, 1, 1, 6, 469, 0), -(13102, 50609, 0, 1, 1, 1, 6, 469, 0), -(13102, 50611, 0, 2, 1, 1, 6, 469, 0), -(13102, 50709, 0, 3, 1, 1, 6, 469, 0), -(13102, 50616, 0, 3, 1, 1, 6, 469, 0), -(13102, 50613, 0, 2, 1, 1, 6, 469, 0), -(13102, 50607, 0, 2, 1, 1, 6, 469, 0), -(13102, 50608, 0, 3, 1, 1, 6, 469, 0), -(13102, 50606, 0, 2, 1, 1, 6, 469, 0), -(13102, 50615, 0, 2, 1, 1, 6, 469, 0), -(13102, 50612, 0, 1, 1, 1, 6, 469, 0), -(13102, 50614, 0, 1, 1, 1, 6, 469, 0), -(13102, 50610, 0, 1, 1, 1, 6, 469, 0), -(13102, 50617, 0, 2, 1, 1, 6, 469, 0), -(13102, 50605, 0, 2, 1, 1, 6, 469, 0), +(13102, 50604, 0, 1, 1, 1, 0, 0, 0), +(13102, 50609, 0, 1, 1, 1, 0, 0, 0), +(13102, 50611, 0, 2, 1, 1, 0, 0, 0), +(13102, 50709, 0, 3, 1, 1, 0, 0, 0), +(13102, 50616, 0, 3, 1, 1, 0, 0, 0), +(13102, 50613, 0, 2, 1, 1, 0, 0, 0), +(13102, 50607, 0, 2, 1, 1, 0, 0, 0), +(13102, 50608, 0, 3, 1, 1, 0, 0, 0), +(13102, 50606, 0, 2, 1, 1, 0, 0, 0), +(13102, 50615, 0, 2, 1, 1, 0, 0, 0), +(13102, 50612, 0, 1, 1, 1, 0, 0, 0), +(13102, 50614, 0, 1, 1, 1, 0, 0, 0), +(13102, 50610, 0, 1, 1, 1, 0, 0, 0), +(13102, 50617, 0, 2, 1, 1, 0, 0, 0), +(13102, 50605, 0, 2, 1, 1, 0, 0, 0), (13102, 49908, 20, 0, 1, 1, 0, 0, 0), (13102, 50274, 0.1, 0, 1, 1, 0, 0, 0); @@ -246,74 +246,74 @@ INSERT INTO `creature_loot_template` VALUES UPDATE `creature_template` SET `lootid` = 36855 WHERE `entry` = 36855; DELETE FROM `creature_loot_template` WHERE `entry` = 36855; INSERT INTO `creature_loot_template` VALUES -(36855, 50781, 0, 1, 1, 1, 6, 469, 0), -(36855, 50776, 0, 1, 1, 1, 6, 469, 0), -(36855, 50782, 0, 2, 1, 1, 6, 469, 0), -(36855, 50342, 0, 3, 1, 1, 6, 469, 0), -(36855, 50780, 0, 1, 1, 1, 6, 469, 0), -(36855, 50784, 0, 2, 1, 1, 6, 469, 0), -(36855, 50779, 0, 2, 1, 1, 6, 469, 0), -(36855, 50777, 0, 3, 1, 1, 6, 469, 0), -(36855, 50778, 0, 3, 1, 1, 6, 469, 0), -(36855, 50783, 0, 3, 1, 1, 6, 469, 0), -(36855, 50785, 0, 2, 1, 1, 6, 469, 0), -(36855, 50786, 0, 2, 1, 1, 6, 469, 0); +(36855, 50781, 0, 1, 1, 1, 0, 0, 0), +(36855, 50776, 0, 1, 1, 1, 0, 0, 0), +(36855, 50782, 0, 2, 1, 1, 0, 0, 0), +(36855, 50342, 0, 3, 1, 1, 0, 0, 0), +(36855, 50780, 0, 1, 1, 1, 0, 0, 0), +(36855, 50784, 0, 2, 1, 1, 0, 0, 0), +(36855, 50779, 0, 2, 1, 1, 0, 0, 0), +(36855, 50777, 0, 3, 1, 1, 0, 0, 0), +(36855, 50778, 0, 3, 1, 1, 0, 0, 0), +(36855, 50783, 0, 3, 1, 1, 0, 0, 0), +(36855, 50785, 0, 2, 1, 1, 0, 0, 0), +(36855, 50786, 0, 2, 1, 1, 0, 0, 0); UPDATE `creature_template` SET `lootid` = 13103 WHERE `entry` = 13103; DELETE FROM `creature_loot_template` WHERE `entry` = 13103; INSERT INTO `creature_loot_template` VALUES -(13103, 49992, 0, 1, 1, 1, 6, 469, 0), -(13103, 50034, 0, 1, 1, 1, 6, 469, 0), -(13103, 49994, 0, 2, 1, 1, 6, 469, 0), -(13103, 49983, 0, 2, 1, 1, 6, 469, 0), -(13103, 49987, 0, 3, 1, 1, 6, 469, 0), -(13103, 49982, 0, 1, 1, 1, 6, 469, 0), -(13103, 49990, 0, 1, 1, 1, 6, 469, 0), -(13103, 49991, 0, 2, 1, 1, 6, 469, 0), -(13103, 49989, 0, 1, 1, 1, 6, 469, 0), -(13103, 49988, 0, 3, 1, 1, 6, 469, 0), -(13103, 49996, 0, 3, 1, 1, 6, 469, 0), -(13103, 49995, 0, 2, 1, 1, 6, 469, 0), -(13103, 49993, 0, 3, 1, 1, 6, 469, 0), -(13103, 49986, 0, 2, 1, 1, 6, 469, 0), -(13103, 49985, 0, 1, 1, 1, 6, 469, 0), +(13103, 49992, 0, 1, 1, 1, 0, 0, 0), +(13103, 50034, 0, 1, 1, 1, 0, 0, 0), +(13103, 49994, 0, 2, 1, 1, 0, 0, 0), +(13103, 49983, 0, 2, 1, 1, 0, 0, 0), +(13103, 49987, 0, 3, 1, 1, 0, 0, 0), +(13103, 49982, 0, 1, 1, 1, 0, 0, 0), +(13103, 49990, 0, 1, 1, 1, 0, 0, 0), +(13103, 49991, 0, 2, 1, 1, 0, 0, 0), +(13103, 49989, 0, 1, 1, 1, 0, 0, 0), +(13103, 49988, 0, 3, 1, 1, 0, 0, 0), +(13103, 49996, 0, 3, 1, 1, 0, 0, 0), +(13103, 49995, 0, 2, 1, 1, 0, 0, 0), +(13103, 49993, 0, 3, 1, 1, 0, 0, 0), +(13103, 49986, 0, 2, 1, 1, 0, 0, 0), +(13103, 49985, 0, 1, 1, 1, 0, 0, 0), (13103, 49908, 21, 0, 1, 1, 0, 0, 0), (13103, 50274, 0.1, 0, 1, 1, 0, 0, 0); UPDATE `creature_template` SET `lootid` = 13104 WHERE `entry` = 13104; DELETE FROM `creature_loot_template` WHERE `entry` = 13104; INSERT INTO `creature_loot_template` VALUES -(13104, 51920, 0, 1, 1, 1, 6, 469, 0), -(13104, 51918, 0, 2, 1, 1, 6, 469, 0), -(13104, 51923, 0, 2, 1, 1, 6, 469, 0), -(13104, 51919, 0, 1, 1, 1, 6, 469, 0), -(13104, 51924, 0, 2, 1, 1, 6, 469, 0), -(13104, 51917, 0, 1, 1, 1, 6, 469, 0), -(13104, 51926, 0, 1, 1, 1, 6, 469, 0), -(13104, 51927, 0, 3, 1, 1, 6, 469, 0), -(13104, 51922, 0, 3, 1, 1, 6, 469, 0), -(13104, 51921, 0, 2, 1, 1, 6, 469, 0), -(13104, 51925, 0, 1, 1, 1, 6, 469, 0), -(13104, 50343, 0, 3, 1, 1, 6, 469, 0); +(13104, 51920, 0, 1, 1, 1, 0, 0, 0), +(13104, 51918, 0, 2, 1, 1, 0, 0, 0), +(13104, 51923, 0, 2, 1, 1, 0, 0, 0), +(13104, 51919, 0, 1, 1, 1, 0, 0, 0), +(13104, 51924, 0, 2, 1, 1, 0, 0, 0), +(13104, 51917, 0, 1, 1, 1, 0, 0, 0), +(13104, 51926, 0, 1, 1, 1, 0, 0, 0), +(13104, 51927, 0, 3, 1, 1, 0, 0, 0), +(13104, 51922, 0, 3, 1, 1, 0, 0, 0), +(13104, 51921, 0, 2, 1, 1, 0, 0, 0), +(13104, 51925, 0, 1, 1, 1, 0, 0, 0), +(13104, 50343, 0, 3, 1, 1, 0, 0, 0); UPDATE `creature_template` SET `lootid` = 13105 WHERE `entry` = 13105; DELETE FROM `creature_loot_template` WHERE `entry` = 13105; INSERT INTO `creature_loot_template` VALUES -(13105, 50647, 0, 1, 1, 1, 6, 469, 0), -(13105, 50639, 0, 2, 1, 1, 6, 469, 0), -(13105, 50640, 0, 3, 1, 1, 6, 469, 0), -(13105, 50646, 0, 3, 1, 1, 6, 469, 0), -(13105, 50649, 0, 2, 1, 1, 6, 469, 0), -(13105, 50650, 0, 3, 1, 1, 6, 469, 0), -(13105, 50641, 0, 1, 1, 1, 6, 469, 0), -(13105, 50642, 0, 1, 1, 1, 6, 469, 0), -(13105, 50645, 0, 3, 1, 1, 6, 469, 0), -(13105, 50652, 0, 2, 1, 1, 6, 469, 0), -(13105, 50648, 0, 1, 1, 1, 6, 469, 0), -(13105, 50644, 0, 1, 1, 1, 6, 469, 0), -(13105, 50643, 0, 3, 1, 1, 6, 469, 0), -(13105, 50651, 0, 2, 1, 1, 6, 469, 0), -(13105, 50638, 0, 1, 1, 1, 6, 469, 0), +(13105, 50647, 0, 1, 1, 1, 0, 0, 0), +(13105, 50639, 0, 2, 1, 1, 0, 0, 0), +(13105, 50640, 0, 3, 1, 1, 0, 0, 0), +(13105, 50646, 0, 3, 1, 1, 0, 0, 0), +(13105, 50649, 0, 2, 1, 1, 0, 0, 0), +(13105, 50650, 0, 3, 1, 1, 0, 0, 0), +(13105, 50641, 0, 1, 1, 1, 0, 0, 0), +(13105, 50642, 0, 1, 1, 1, 0, 0, 0), +(13105, 50645, 0, 3, 1, 1, 0, 0, 0), +(13105, 50652, 0, 2, 1, 1, 0, 0, 0), +(13105, 50648, 0, 1, 1, 1, 0, 0, 0), +(13105, 50644, 0, 1, 1, 1, 0, 0, 0), +(13105, 50643, 0, 3, 1, 1, 0, 0, 0), +(13105, 50651, 0, 2, 1, 1, 0, 0, 0), +(13105, 50638, 0, 1, 1, 1, 0, 0, 0), (13105, 49908, 21, 0, 1, 1, 0, 0, 0), (13105, 50274, 0.1, 0, 1, 1, 0, 0, 0); From 48a87d38205038fb151b46ac4b22fa39e057e514 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Tue, 16 Feb 2010 18:30:18 +0300 Subject: [PATCH 146/405] Icecrown halls of reflection work start --- Makefile.am | 1 + addition/725_halls_of_reflection_mangos.sql | 4 + .../halls_of_reflection/boss_falryn.cpp | 106 +++++++++++++++++ .../halls_of_reflection/boss_lich_king.cpp | 1 + .../halls_of_reflection/boss_marwyn.cpp | 107 ++++++++++++++++++ .../halls_of_reflection/def_halls.h | 56 ++++++++- .../instance_halls_of_reflection.cpp | 74 +++++++++--- .../boss_deathbringer_saurfang.cpp | 12 ++ system/ScriptLoader.cpp | 10 ++ 9 files changed, 353 insertions(+), 18 deletions(-) create mode 100644 addition/725_halls_of_reflection_mangos.sql diff --git a/Makefile.am b/Makefile.am index ea7070104..cd4877865 100644 --- a/Makefile.am +++ b/Makefile.am @@ -335,6 +335,7 @@ scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_sar scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_gafrost.cpp \ scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tirannus.cpp \ scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp \ +scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp \ scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falryn.cpp \ scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_lich_king.cpp \ scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_marwyn.cpp \ diff --git a/addition/725_halls_of_reflection_mangos.sql b/addition/725_halls_of_reflection_mangos.sql new file mode 100644 index 000000000..35d150bfc --- /dev/null +++ b/addition/725_halls_of_reflection_mangos.sql @@ -0,0 +1,4 @@ +-- UPDATE `instance_template` SET `script`='instance_halls_of_reflection' WHERE `map`=668; +-- UPDATE `creature_template` SET `ScriptName`='boss_falryn' WHERE `entry`=33112; +-- UPDATE `creature_template` SET `ScriptName`='boss_marwyn' WHERE `entry`=38113; +-- UPDATE `creature_template` SET `ScriptName`='boss_lich_king_fh' WHERE `entry`=37226; diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falryn.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falryn.cpp index b7c8771cb..a157c94aa 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falryn.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falryn.cpp @@ -22,3 +22,109 @@ SDCategory: Halls of Reflection EndScriptData */ #include "precompiled.h" +#include "def_halls.h" + +enum +{ + //common + SPELL_BERSERK = 47008, + //yells + //summons + //Abilities + SPELL_HOPELESSNESS = 72395, + SPELL_IMPENDING_DESPAIR = 72426, + SPELL_DEFILING_HORROR_N = 72435, + SPELL_QUIVERING_STRIKE_N = 72422, + + SPELL_DEFILING_HORROR_H = 72452, + SPELL_QUIVERING_STRIKE_H = 72453, + +}; + +struct MANGOS_DLL_DECL boss_falrynAI : public ScriptedAI +{ + boss_falrynAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Regular = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + bool Regular; + bool m_uiIsFrenzy; + ScriptedInstance *pInstance; + uint32 m_uiBerserk_Timer; + + uint8 health; + uint8 stage; + + void Reset() + { + if(pInstance) pInstance->SetData(TYPE_FALRYN, NOT_STARTED); + m_uiBerserk_Timer = 180000; + stage = 0; + + + } + uint64 CallGuard(uint64 npctype,TempSummonType type, uint32 _summontime ) + { + float fPosX, fPosY, fPosZ; + m_creature->GetPosition(fPosX, fPosY, fPosZ); + m_creature->GetRandomPoint(fPosX, fPosY, fPosZ, urand(15, 25), fPosX, fPosY, fPosZ); + Creature* pSummon = m_creature->SummonCreature(npctype, fPosX, fPosY, fPosZ, 0, type, _summontime); + if(pSummon) pSummon->SetInCombatWithZone(); +// DoScriptText(EMOTE_SUMMON, m_creature); + return pSummon ? pSummon->GetGUID() : 0; + } + + void Aggro(Unit *who) + { + if(pInstance) pInstance->SetData(TYPE_FALRYN, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_FALRYN, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + switch(stage) + { + case 0: { + break;} + case 1: { + break;} + case 2: { + break;} + } + + health = m_creature->GetHealth()*100 / m_creature->GetMaxHealth(); + if (health <= 30 && stage == 0) stage = 1; + + if (m_uiBerserk_Timer < diff) + { + DoCast(m_creature, SPELL_BERSERK); + m_uiBerserk_Timer = 600000; + } else m_uiBerserk_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_falryn(Creature* pCreature) +{ + return new boss_falrynAI(pCreature); +} + +void AddSC_boss_falryn() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_falryn"; + newscript->GetAI = &GetAI_boss_falryn; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_lich_king.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_lich_king.cpp index 78d6d649c..49402876a 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_lich_king.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_lich_king.cpp @@ -22,3 +22,4 @@ SDCategory: Halls of Reflection EndScriptData */ #include "precompiled.h" +#include "def_halls.h" \ No newline at end of file diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_marwyn.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_marwyn.cpp index 9bc11a1fd..42bb32332 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_marwyn.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_marwyn.cpp @@ -22,3 +22,110 @@ SDCategory: Halls of Reflection EndScriptData */ #include "precompiled.h" +#include "def_halls.h" + +enum +{ + //common + SPELL_BERSERK = 47008, + //yells + //summons + //Abilities + SPELL_OBLITERATE_N = 72360, + SPELL_SHARED_SUFFERING_N = 72368, + SPELL_WELL_OF_CORRUPTION = 72362, + SPELL_CORRUPTED_FLESH_N = 72363, + + SPELL_OBLITERATE_H = 72434, + SPELL_SHARED_SUFFERING_H = 72369, + SPELL_CORRUPTED_FLESH_H = 72436, + +}; + +struct MANGOS_DLL_DECL boss_marwynAI : public ScriptedAI +{ + boss_marwynAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Regular = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + bool Regular; + bool m_uiIsFrenzy; + ScriptedInstance *pInstance; + uint32 m_uiBerserk_Timer; + + uint8 health; + uint8 stage; + + void Reset() + { + if(pInstance) pInstance->SetData(TYPE_FALRYN, NOT_STARTED); + m_uiBerserk_Timer = 180000; + stage = 0; + + + } + uint64 CallGuard(uint64 npctype,TempSummonType type, uint32 _summontime ) + { + float fPosX, fPosY, fPosZ; + m_creature->GetPosition(fPosX, fPosY, fPosZ); + m_creature->GetRandomPoint(fPosX, fPosY, fPosZ, urand(15, 25), fPosX, fPosY, fPosZ); + Creature* pSummon = m_creature->SummonCreature(npctype, fPosX, fPosY, fPosZ, 0, type, _summontime); + if(pSummon) pSummon->SetInCombatWithZone(); +// DoScriptText(EMOTE_SUMMON, m_creature); + return pSummon ? pSummon->GetGUID() : 0; + } + + void Aggro(Unit *who) + { + if(pInstance) pInstance->SetData(TYPE_MARWYN, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_MARWYN, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + switch(stage) + { + case 0: { + break;} + case 1: { + break;} + case 2: { + break;} + } + + health = m_creature->GetHealth()*100 / m_creature->GetMaxHealth(); + if (health <= 30 && stage == 0) stage = 1; + + if (m_uiBerserk_Timer < diff) + { + DoCast(m_creature, SPELL_BERSERK); + m_uiBerserk_Timer = 600000; + } else m_uiBerserk_Timer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_marwyn(Creature* pCreature) +{ + return new boss_marwynAI(pCreature); +} + +void AddSC_boss_marwyn() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_marwyn"; + newscript->GetAI = &GetAI_boss_marwyn; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/def_halls.h b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/def_halls.h index 2c85f3c30..84284c994 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/def_halls.h +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/def_halls.h @@ -4,14 +4,62 @@ enum { - MAX_ENCOUNTERS = 2; + MAX_ENCOUNTERS = 8, - TYPE_BOSS_1 = 1, + TYPE_START_EVENT = 0, + TYPE_MOBS_WAVE_1 = 1, + TYPE_FALRYN = 2, + TYPE_MOBS_WAVE_2 = 3, + TYPE_MARWYN = 4, + TYPE_LICH_KING_1 = 5, + TYPE_FROST_GENERAL = 6, + TYPE_LICH_KING_BATTLE = 7, + TYPE_ESCAPE = 8, - NPC_BOSS1 = 33113, + NPC_FALRYN = 33112, + NPC_MARWYN = 38113, + NPC_LICH_KING = 37226, - GO_1 = 194232 + NPC_PRAUDMUR_0 = 37221, + NPC_PRAUDMUR_1 = 36955, + NPC_PRAUDMUR_2 = 36955, + NPC_SYLVANA_0 = 37223, + NPC_SYLVANA_1 = 37554, + NPC_SYLVANA_2 = 37554, + NPC_DARK_1 = 38177, + NPC_DARK_2 = 38176, + NPC_DARK_3 = 38173, + NPC_DARK_4 = 38172, + NPC_DARK_5 = 38567, + NPC_DARK_6 = 38175, + + NPC_FROST_GENERAL = 36723, + + + GO_ICECROWN_DOOR = 201976, //72802 + GO_IMPENETRABLE_DOOR = 197341, //72801 + GO_FROSTMOURNE_ALTAR = 202236, //3551 + GO_FROSTMOURNE = 202302, //364 + + GO_CAPTAIN_CHEST_1 = 202212, //3145 + GO_CAPTAIN_CHEST_2 = 201710, //30357 + GO_CAPTAIN_CHEST_3 = 202337, //3246 + GO_CAPTAIN_CHEST_4 = 202336, //3333 + +}; + +struct Locations +{ + float x, y, z; + uint32 id; +}; + +static Locations SpawnLoc[]= +{ + {5325.330078, 1976.609985, 707.695007}, // 0 Марвин + {5274.630859, 2040.283813, 709.319824}, // 1 Фалрик + {5346.934570, 2044.740234, 707.695801}, // 2 Выход }; #endif diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp index a8444ddc7..a4004d2e3 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp @@ -31,8 +31,15 @@ struct MANGOS_DLL_DECL instance_halls_of_reflection : public ScriptedInstance //Creatures GUID uint32 m_auiEncounter[MAX_ENCOUNTERS+1]; - uint64 m_uiBronjahmGUID; - uint64 m_uiDevourerGUID; + uint64 m_uiFalrynGUID; + uint64 m_uiMarwynGUID; + uint64 m_uiLichKingGUID; + uint64 m_uiFrostGeneralGUID; + uint64 m_uiCaptainsChestGUID; + uint64 m_uiIcecrownDoorGUID; + uint64 m_uiImpenetrableDoorGUID; + uint64 m_uiFrostmourneGUID; + uint64 m_uiFrostmourneAltarGUID; void OpenDoor(uint64 guid) { @@ -52,19 +59,23 @@ struct MANGOS_DLL_DECL instance_halls_of_reflection : public ScriptedInstance { for (uint8 i = 0; i < MAX_ENCOUNTERS; ++i) m_auiEncounter[i] = NOT_STARTED; - m_uiBronjahmGUID =0; - m_uiDevourerGUID =0; } void OnCreatureCreate(Creature* pCreature) { switch(pCreature->GetEntry()) { - case NPC_DEVOURER: - m_uiDevourerGUID = pCreature->GetGUID(); + case NPC_FALRYN: + m_uiMarwynGUID = pCreature->GetGUID(); break; - case NPC_BRONJAHM: - m_uiBronjahmGUID = pCreature->GetGUID(); + case NPC_MARWYN: + m_uiMarwynGUID = pCreature->GetGUID(); + break; + case NPC_LICH_KING: + m_uiLichKingGUID = pCreature->GetGUID(); + break; + case NPC_FROST_GENERAL: + m_uiFrostGeneralGUID = pCreature->GetGUID(); break; } } @@ -73,14 +84,40 @@ struct MANGOS_DLL_DECL instance_halls_of_reflection : public ScriptedInstance { switch(pGo->GetEntry()) { + case GO_CAPTAIN_CHEST_1: + if(Regular) m_uiCaptainsChestGUID = pGo->GetGUID(); + break; + case GO_CAPTAIN_CHEST_2: + if(Regular) m_uiCaptainsChestGUID = pGo->GetGUID(); + break; + case GO_CAPTAIN_CHEST_3: + if(!Regular) m_uiCaptainsChestGUID = pGo->GetGUID(); + break; + case GO_CAPTAIN_CHEST_4: + if(!Regular) m_uiCaptainsChestGUID = pGo->GetGUID(); + break; + case GO_ICECROWN_DOOR: m_uiIcecrownDoorGUID = pGo->GetGUID(); break; + case GO_IMPENETRABLE_DOOR: m_uiImpenetrableDoorGUID = pGo->GetGUID(); break; + case GO_FROSTMOURNE: m_uiFrostmourneGUID = pGo->GetGUID(); break; + case GO_FROSTMOURNE_ALTAR: m_uiFrostmourneAltarGUID = pGo->GetGUID(); break; } } void SetData(uint32 uiType, uint32 uiData) { switch(uiType) { - case TYPE_BRONJAHM: m_auiEncounter[0] = uiData; break; - case TYPE_DEVOURER: m_auiEncounter[1] = uiData; break; + case TYPE_START_EVENT: m_auiEncounter[0] = uiData; break; + case TYPE_MOBS_WAVE_1: m_auiEncounter[1] = uiData; break; + case TYPE_FALRYN: m_auiEncounter[2] = uiData; break; + case TYPE_MOBS_WAVE_2: m_auiEncounter[3] = uiData; break; + case TYPE_MARWYN: m_auiEncounter[4] = uiData; + if (uiData == DONE) { + OpenDoor(m_uiImpenetrableDoorGUID); + }; break; + case TYPE_LICH_KING_1: m_auiEncounter[5] = uiData; break; + case TYPE_FROST_GENERAL: m_auiEncounter[6] = uiData; break; + case TYPE_LICH_KING_BATTLE: m_auiEncounter[7] = uiData; break; + case TYPE_ESCAPE: m_auiEncounter[8] = uiData; break; } if (uiData == DONE) @@ -108,8 +145,15 @@ struct MANGOS_DLL_DECL instance_halls_of_reflection : public ScriptedInstance { switch(uiType) { - case TYPE_BRONJAHM: return m_auiEncounter[0]; - case TYPE_DEVOURER: return m_auiEncounter[1]; + case TYPE_START_EVENT: return m_auiEncounter[0]; + case TYPE_MOBS_WAVE_1: return m_auiEncounter[1]; + case TYPE_FALRYN: return m_auiEncounter[2]; + case TYPE_MOBS_WAVE_2: return m_auiEncounter[3]; + case TYPE_MARWYN: return m_auiEncounter[4]; + case TYPE_LICH_KING_1: return m_auiEncounter[5]; + case TYPE_FROST_GENERAL: return m_auiEncounter[6]; + case TYPE_LICH_KING_BATTLE: return m_auiEncounter[7]; + case TYPE_ESCAPE: return m_auiEncounter[8]; } return 0; } @@ -118,8 +162,10 @@ struct MANGOS_DLL_DECL instance_halls_of_reflection : public ScriptedInstance { switch(uiData) { - case NPC_BRONJAHM: return m_uiBronjahmGUID; - case NPC_DEVOURER: return m_uiDevourerGUID; + case NPC_FALRYN: return m_uiFalrynGUID; + case NPC_MARWYN: return m_uiMarwynGUID; + case NPC_LICH_KING: return m_uiLichKingGUID; + case NPC_FROST_GENERAL: return m_uiFrostGeneralGUID; } return 0; } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp index 41e614e20..7965742ad 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp @@ -48,6 +48,10 @@ enum SPELL_BLOOD_NOVA_H = 72438, SPELL_RUNE_OF_BLOOD_H = 72448, + SPELL_BEAST_1 = 72176, + SPELL_BEAST_2 = 72723, + SPELL_BEAST_3 = 21150, + }; struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI @@ -66,6 +70,7 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI uint32 m_uiBloodLink_Timer; uint32 m_uiBloodNova_Timer; uint32 m_uiBoilingBlood_Timer; + uint32 m_uiRuneOfBlood_Timer; uint32 m_uiSummon_Timer; uint8 health; @@ -81,6 +86,7 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI uint32 m_uiBloodLink_Timer = 10000; uint32 m_uiBloodNova_Timer = 20000; uint32 m_uiBoilingBlood_Timer = 25000; + uint32 m_uiRuneOfBlood_Timer = 35000; uint32 m_uiSummon_Timer =30000; } @@ -143,6 +149,12 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI m_uiBoilingBlood_Timer=urand(20000,40000); } else m_uiBoilingBlood_Timer -= diff; + if (m_uiRuneOfBlood_Timer < diff) { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, Regular ? SPELL_RUNE_OF_BLOOD_N : SPELL_RUNE_OF_BLOOD_H); + m_uiRuneOfBlood_Timer=urand(20000,40000); + } else m_uiRuneOfBlood_Timer -= diff; + if (m_uiSummon_Timer < diff) { CallGuard(NPC_BLOOD_BEASTS, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5000); diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index ab6f6c1e2..ffcc139a2 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -385,6 +385,11 @@ extern void AddSC_boss_forgemaster_gafrost(); extern void AddSC_boss_krick(); extern void AddSC_boss_scourgelord_tirannus(); +extern void AddSC_instance_halls_of_reflection(); +//extern void AddSC_boss_falryn(); +//extern void AddSC_boss_marwyn(); +//extern void AddSC_boss_lich_king_fh(); + //outland extern void AddSC_boss_exarch_maladaar(); //auchindoun, auchenai_crypts extern void AddSC_boss_nexusprince_shaffar(); //auchindoun, mana_tombs @@ -839,6 +844,11 @@ void AddScripts() AddSC_boss_krick(); AddSC_boss_scourgelord_tirannus(); + AddSC_instance_halls_of_reflection(); +// AddSC_boss_falryn(); +// AddSC_boss_marwyn(); +// AddSC_boss_lich_king_fh(); + //outland AddSC_boss_exarch_maladaar(); //auchindoun, auchenai_crypts AddSC_boss_nexusprince_shaffar(); //auchindoun, mana_tombs From f260b6893dce29cce6f0200b736cd2920694ab39 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Tue, 16 Feb 2010 21:35:43 +0300 Subject: [PATCH 147/405] Chest respawn --- .../icecrown_citadel/instance_icecrown_spire.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp index 8c3c7314c..c30b4b3b0 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp @@ -166,7 +166,7 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance if (uiData == DONE) { if (GameObject* pChest = instance->GetGameObject(m_uiGunshipArmoryGUID)) if (pChest && !pChest->isSpawned()) { - pChest->SetRespawnTime(DAY); + pChest->SetRespawnTime(WEEK); // pChest->SetGoState(GO_STATE_ACTIVE); }; }; @@ -182,7 +182,7 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance // OpenDoor(m_uiSaurfangDoorGUID); if (GameObject* pChest = instance->GetGameObject(m_uiSaurfangCacheGUID)) if (pChest && !pChest->isSpawned()) { - pChest->SetRespawnTime(DAY); + pChest->SetRespawnTime(WEEK); // pChest->SetGoState(GO_STATE_ACTIVE); }; }; From 2d330a236309f6311a7ab987b1dba17ef4613808 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 17 Feb 2010 00:19:38 +0300 Subject: [PATCH 148/405] Spawn time --- .../icecrown_citadel/instance_icecrown_spire.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp index c30b4b3b0..6277d6ee2 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp @@ -166,7 +166,7 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance if (uiData == DONE) { if (GameObject* pChest = instance->GetGameObject(m_uiGunshipArmoryGUID)) if (pChest && !pChest->isSpawned()) { - pChest->SetRespawnTime(WEEK); + pChest->SetRespawnTime(7*DAY); // pChest->SetGoState(GO_STATE_ACTIVE); }; }; @@ -182,7 +182,7 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance // OpenDoor(m_uiSaurfangDoorGUID); if (GameObject* pChest = instance->GetGameObject(m_uiSaurfangCacheGUID)) if (pChest && !pChest->isSpawned()) { - pChest->SetRespawnTime(WEEK); + pChest->SetRespawnTime(7*DAY); // pChest->SetGoState(GO_STATE_ACTIVE); }; }; From b7728a3363e161d719dfad796baa8e000b36467f Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 17 Feb 2010 18:34:51 +0300 Subject: [PATCH 149/405] TOC chest spawn time change --- .../trial_of_the_crusader/instance_trial_of_the_crusader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index c157234e6..66c19b310 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -155,7 +155,7 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance if (uiData == DONE) { if (GameObject* pChest = instance->GetGameObject(m_uiCrusadersCacheGUID)) if (pChest && !pChest->isSpawned()) { - pChest->SetRespawnTime(DAY); + pChest->SetRespawnTime(7*DAY); // pChest->SetGoState(GO_STATE_ACTIVE); }; }; From 4a07a47b8ec41749f051cd9ea575ca24cf535327 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 17 Feb 2010 21:25:25 +0300 Subject: [PATCH 150/405] SendMonsterMove() to MonstaerMove() change --- .../blackwing_lair/boss_victor_nefarius.cpp | 3 +-- .../magisters_terrace/boss_felblood_kaelthas.cpp | 3 +-- .../eastern_kingdoms/molten_core/boss_shazzrah.cpp | 3 +-- .../sunwell_plateau/boss_kalecgos.cpp | 3 +-- scripts/eastern_kingdoms/undercity.cpp | 3 +-- scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp | 2 +- scripts/kalimdor/onyxias_lair/boss_onyxia.cpp | 3 +-- scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp | 3 +-- .../northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp | 11 ++++------- .../ulduar/halls_of_lightning/boss_volkhan.cpp | 3 +-- .../ulduar/halls_of_stone/halls_of_stone.cpp | 4 ++-- .../sethekk_halls/boss_tailonking_ikiss.cpp | 3 +-- .../shadow_labyrinth/boss_grandmaster_vorpil.cpp | 2 +- scripts/outland/black_temple/boss_illidan.cpp | 2 +- .../outland/tempest_keep/the_eye/boss_kaelthas.cpp | 4 ++-- 15 files changed, 20 insertions(+), 32 deletions(-) diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp index 92fe60f85..a617801ad 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp @@ -302,8 +302,7 @@ struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI DoCastSpellIfCan(m_creature,8149); //Teleport self to a hiding spot (this causes errors in the mangos log but no real issues) - m_creature->GetMap()->CreatureRelocation(m_creature, HIDE_X, HIDE_Y, HIDE_Z, 0.0f); - m_creature->SendMonsterMove(HIDE_X, HIDE_Y, HIDE_Z, 0, SPLINEFLAG_NONE, 0); + m_creature->MonsterMove(HIDE_X, HIDE_Y, HIDE_Z,0); //Spawn nef and have him attack a random target Creature* Nefarian = m_creature->SummonCreature(CREATURE_NEFARIAN,NEF_X,NEF_Y,NEF_Z,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,120000); diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp index 7b47fc3bd..149ad72a2 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp @@ -202,8 +202,7 @@ struct MANGOS_DLL_DECL boss_felblood_kaelthasAI : public ScriptedAI { float x = KaelLocations[0][0]; float y = KaelLocations[0][1]; - m_creature->GetMap()->CreatureRelocation(m_creature, x, y, LOCATION_Z, 0.0f); - //m_creature->SendMonsterMove(x, y, LOCATION_Z, 0, 0, 0); // causes some issues... + m_creature->MonsterMove(x, y, LOCATION_Z, 0); ThreatList const& tList = m_creature->getThreatManager().getThreatList(); for (ThreatList::const_iterator i = tList.begin();i != tList.end(); ++i) { diff --git a/scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp b/scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp index 9e839895f..92da5dae1 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp @@ -91,8 +91,7 @@ struct MANGOS_DLL_DECL boss_shazzrahAI : public ScriptedAI Unit* target = NULL; target = SelectUnit(SELECT_TARGET_RANDOM,0); - m_creature->GetMap()->CreatureRelocation(m_creature, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0.0f); - m_creature->SendMonsterMove(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, SPLINEFLAG_WALKMODE, 1); + m_creature->MonsterMove(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 1); DoCastSpellIfCan(target,SPELL_ARCANEEXPLOSION); DoResetThreat(); diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp index d54c38f1e..b4527e985 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp @@ -213,8 +213,7 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI { pSathrovarr->DealDamage(pSathrovarr, pSathrovarr->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - pSathrovarr->GetMap()->CreatureRelocation(pSathrovarr, KALECGOS_ARENA[0], KALECGOS_ARENA[1], KALECGOS_ARENA[2], 0.0f); - pSathrovarr->SendMonsterMove(KALECGOS_ARENA[0], KALECGOS_ARENA[1], KALECGOS_ARENA[2], 0, SPLINEFLAG_NONE, 0); + pSathrovarr->MonsterMove(KALECGOS_ARENA[0], KALECGOS_ARENA[1], KALECGOS_ARENA[2], 0); } if (Creature* pKalec = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_KALECGOS_HUMAN))) diff --git a/scripts/eastern_kingdoms/undercity.cpp b/scripts/eastern_kingdoms/undercity.cpp index 13343bae9..c29a48f22 100644 --- a/scripts/eastern_kingdoms/undercity.cpp +++ b/scripts/eastern_kingdoms/undercity.cpp @@ -83,8 +83,7 @@ struct MANGOS_DLL_DECL npc_lady_sylvanas_windrunnerAI : public ScriptedAI { if (Creature* pBunny = (Creature*)Unit::GetUnit(*summoned,targetGUID)) { - pBunny->SendMonsterMove(pBunny->GetPositionX(), pBunny->GetPositionY(), myZ+15.0f, 0, SPLINEFLAG_NONE, 0); - pBunny->GetMap()->CreatureRelocation(pBunny, pBunny->GetPositionX(), pBunny->GetPositionY(), myZ+15.0f, 0); + pBunny->MonsterMove(pBunny->GetPositionX(), pBunny->GetPositionY(), myZ+15.0f, 0); summoned->CastSpell(pBunny,SPELL_RIBBON_OF_SOULS,false); } diff --git a/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp b/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp index 1d247272b..9c8847771 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp @@ -80,7 +80,7 @@ struct MANGOS_DLL_DECL boss_renatakiAI : public ScriptedAI if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) { m_creature->GetMap()->CreatureRelocation(m_creature, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0.0f); - m_creature->SendMonsterMove(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, SPLINEFLAG_WALKMODE, 1); + m_creature->MonsterMove(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 1); DoCastSpellIfCan(target,SPELL_AMBUSH); } diff --git a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp index a5c95b6b8..f454887aa 100644 --- a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp +++ b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp @@ -185,8 +185,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI { if (m_pPointData) { - m_creature->GetMap()->CreatureRelocation(m_creature, m_pPointData->fX, m_pPointData->fY, m_pPointData->fZ, 0.0f); - m_creature->SendMonsterMove(m_pPointData->fX, m_pPointData->fY, m_pPointData->fZ, 0, m_creature->GetSplineFlags(), 1); + m_creature->MonsterMove(m_pPointData->fX, m_pPointData->fY, m_pPointData->fZ, 1); } } } diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp index 05c180aae..87d46becb 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp @@ -101,8 +101,7 @@ struct MANGOS_DLL_DECL boss_ouroAI : public ScriptedAI { if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) { - m_creature->GetMap()->CreatureRelocation(m_creature, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0.0f); - m_creature->SendMonsterMove(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, SPLINEFLAG_WALKMODE, 1); + m_creature->MonsterMove(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 1); } ChangeTarget_Timer = urand(10000, 20000); diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp index ec9c2049a..a3c43c0c8 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp @@ -293,8 +293,7 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->InterruptNonMeleeSpells(true); DoCast(m_creature, SPELL_SPHERE_VISUAL); - m_creature->GetMap()->CreatureRelocation(m_creature, JEDOGA_X, JEDOGA_Y, JEDOGA_Z, JEDOGA_O); - m_creature->SendMonsterMove(JEDOGA_X, JEDOGA_Y, JEDOGA_Z, JEDOGA_O, SPLINEFLAG_NONE, 0); + m_creature->MonsterMove(JEDOGA_X, JEDOGA_Y, JEDOGA_Z, 0); if (m_pInstance) m_pInstance->SetData(TYPE_JEDOGA, NOT_STARTED); @@ -402,8 +401,7 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI return; SetCombatMovement(true); - m_creature->GetMap()->CreatureRelocation(m_creature, CENTER_X, CENTER_Y, GROUND_Z, JEDOGA_O); - m_creature->SendMonsterMove(CENTER_X, CENTER_Y, GROUND_Z, JEDOGA_O, SPLINEFLAG_NONE, 0); + m_creature->MonsterMove(CENTER_X, CENTER_Y, GROUND_Z, 0); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); m_creature->RemoveAurasDueToSpell(SPELL_SPHERE_VISUAL); @@ -489,8 +487,7 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->InterruptNonMeleeSpells(true); DoCast(m_creature, SPELL_SPHERE_VISUAL); - m_creature->GetMap()->CreatureRelocation(m_creature, JEDOGA_X, JEDOGA_Y, JEDOGA_Z, JEDOGA_O); - m_creature->SendMonsterMove(JEDOGA_X, JEDOGA_Y, JEDOGA_Z, JEDOGA_O, SPLINEFLAG_NONE, 0); + m_creature->MonsterMove(JEDOGA_X, JEDOGA_Y, JEDOGA_Z, 0); m_uiSubPhase = SUBPHASE_CALL_VOLUNTEER; GameObject* pCircle = GetClosestGameObjectWithEntry(m_creature,GO_CIRCLE,50.0f); if (pCircle && !pCircle->isSpawned()) @@ -541,7 +538,7 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI if(!m_bVolunteerDied) DoCast(m_creature, SPELL_GIFT_OF_THE_HERALD); m_creature->GetMap()->CreatureRelocation(m_creature, CENTER_X, CENTER_Y, GROUND_Z, JEDOGA_O); - m_creature->SendMonsterMove(CENTER_X, CENTER_Y, GROUND_Z, JEDOGA_O, SPLINEFLAG_NONE, 0); + m_creature->MonsterMove(CENTER_X, CENTER_Y, GROUND_Z, 0); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); m_creature->RemoveAurasDueToSpell(SPELL_SPHERE_VISUAL); diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp index f8c5ca0a1..4cb9f075e 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp @@ -336,8 +336,7 @@ bool EffectDummyCreature_npc_volkhan_anvil(Unit* pCaster, uint32 uiSpellId, uint if (pCaster->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE) pCaster->GetMotionMaster()->MovementExpired(); - ((Creature*)pCaster)->GetMap()->CreatureRelocation((Creature*)pCaster, fX, fY, fZ, pCreatureTarget->GetOrientation()); - ((Creature*)pCaster)->SendMonsterMove(fX, fY, fZ, 0, ((Creature*)pCaster)->GetSplineFlags(), 1); + ((Creature*)pCaster)->MonsterMove(fX, fY, fZ, 1); pCreatureTarget->CastSpell(pCaster, SPELL_TEMPER_DUMMY, false); diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp index 355a954e2..dcba90ab2 100644 --- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp @@ -191,12 +191,12 @@ struct MANGOS_DLL_DECL mob_tribuna_controllerAI : public ScriptedAI if (uiPositionCounter == 0) { (*itr)->GetMap()->CreatureRelocation((*itr), 927.265, 333.200, 218.780, (*itr)->GetOrientation()); - (*itr)->SendMonsterMove(927.265, 333.200, 218.780, 0, (*itr)->GetSplineFlags(), 1); + (*itr)->MonsterMove(927.265, 333.200, 218.780, 1); } else { (*itr)->GetMap()->CreatureRelocation((*itr), 921.745, 328.076, 218.780, (*itr)->GetOrientation()); - (*itr)->SendMonsterMove(921.745, 328.076, 218.780, 0, (*itr)->GetSplineFlags(), 1); + (*itr)->MonsterMove(921.745, 328.076, 218.780, 1); } } ++uiPositionCounter; diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_tailonking_ikiss.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_tailonking_ikiss.cpp index eda4620cd..fa33e9823 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_tailonking_ikiss.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_tailonking_ikiss.cpp @@ -184,8 +184,7 @@ struct MANGOS_DLL_DECL boss_talon_king_ikissAI : public ScriptedAI float Y = target->GetPositionY(); float Z = target->GetPositionZ(); - m_creature->GetMap()->CreatureRelocation(m_creature,X,Y,Z,0.0f); - m_creature->SendMonsterMove(X, Y, Z, 0, SPLINEFLAG_WALKMODE, 1); + m_creature->MonsterMove(X, Y, Z, 1); DoCastSpellIfCan(target,SPELL_BLINK_TELEPORT); Blink = true; diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp index b04b65f4b..03b9eb3da 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp @@ -151,7 +151,7 @@ struct MANGOS_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI if (Teleport_Timer <= diff) { m_creature->GetMap()->CreatureRelocation(m_creature, LOCX, LOCY, LOCZ, 0.0f); - m_creature->SendMonsterMove(LOCX, LOCY, LOCZ, 0, SPLINEFLAG_WALKMODE, 0); + m_creature->MonsterMove(LOCX, LOCY, LOCZ, 0); float ranX = LOCX; float ranY = LOCY; diff --git a/scripts/outland/black_temple/boss_illidan.cpp b/scripts/outland/black_temple/boss_illidan.cpp index 03ea2aa30..32803a3af 100644 --- a/scripts/outland/black_temple/boss_illidan.cpp +++ b/scripts/outland/black_temple/boss_illidan.cpp @@ -1413,7 +1413,7 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI float dy = m_creature->GetPositionY() + (distance*sin(m_creature->GetOrientation())); Maiev->GetMap()->CreatureRelocation(m_creature, dx, dy, Maiev->GetPositionZ(), 0.0f); - Maiev->SendMonsterMove(dx, dy, Maiev->GetPositionZ(), 0, SPLINEFLAG_NONE, 0); + Maiev->MonsterMove(dx, dy, Maiev->GetPositionZ(), 0); Maiev->CastSpell(Maiev, SPELL_TELEPORT_VISUAL, true); Maiev->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->GetGUID()); diff --git a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp index 23295cae0..080ab5899 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp @@ -855,7 +855,7 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI m_creature->GetMotionMaster()->MoveIdle(); m_creature->GetMap()->CreatureRelocation(m_creature, afGravityPos[0], afGravityPos[1], afGravityPos[2], 0.0f); - m_creature->SendMonsterMove(afGravityPos[0], afGravityPos[1], afGravityPos[2], 0, SPLINEFLAG_NONE, 0); + m_creature->MonsterMove(afGravityPos[0], afGravityPos[1], afGravityPos[2],0); m_creature->InterruptNonMeleeSpells(false); DoCastSpellIfCan(m_creature, SPELL_FULLPOWER); @@ -922,7 +922,7 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI m_creature->GetMotionMaster()->Clear(); m_creature->GetMotionMaster()->MoveIdle(); m_creature->GetMap()->CreatureRelocation(m_creature, afGravityPos[0], afGravityPos[1], afGravityPos[2], 0.0f); - m_creature->SendMonsterMove(afGravityPos[0], afGravityPos[1], afGravityPos[2], 0, SPLINEFLAG_NONE, 0); + m_creature->MonsterMove(afGravityPos[0], afGravityPos[1], afGravityPos[2], 0); // 1) Kael'thas will portal the whole raid right into his body ThreatList const& tList = m_creature->getThreatManager().getThreatList(); From 312fa62f76bacf64d624120e22471976793c8aca Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 18 Feb 2010 00:00:43 +0300 Subject: [PATCH 151/405] Icecrown loot change --- .../icecrown_citadel/icecrown_citadel/icecrown_spire.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp index 093a2e0c1..1121ff430 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp @@ -84,7 +84,7 @@ struct MANGOS_DLL_DECL mob_spire_frostwyrmAI : public ScriptedAI wirmsdied=pInstance->GetData(TYPE_FROSTWIRM_COUNT); ++wirmsdied; pInstance->SetData(TYPE_FROSTWIRM_COUNT,wirmsdied); - if (pInstance->GetData(TYPE_FROSTWIRM_COUNT) >= 8 ) pInstance->SetData(TYPE_FLIGHT_WAR,DONE); + if (pInstance->GetData(TYPE_FROSTWIRM_COUNT) == 8 ) pInstance->SetData(TYPE_FLIGHT_WAR,DONE); } } From 6453e7c8b5b7df581366b9d3adfec9d320177b93 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 18 Feb 2010 19:39:08 +0300 Subject: [PATCH 152/405] Naxxramas from Valhalla (Tasssadar) --- .../northrend/naxxramas/boss_anubrekhan.cpp | 443 +++++----- scripts/northrend/naxxramas/boss_faerlina.cpp | 317 ++++--- .../naxxramas/boss_four_horsemen.cpp | 621 +++++++++----- scripts/northrend/naxxramas/boss_gluth.cpp | 309 ++++--- scripts/northrend/naxxramas/boss_gothik.cpp | 659 +++++---------- .../northrend/naxxramas/boss_grobbulus.cpp | 182 ++-- scripts/northrend/naxxramas/boss_heigan.cpp | 514 +++++++++++- .../northrend/naxxramas/boss_kelthuzad.cpp | 701 ++++++++++------ scripts/northrend/naxxramas/boss_loatheb.cpp | 195 +++-- scripts/northrend/naxxramas/boss_maexxna.cpp | 294 ++++--- scripts/northrend/naxxramas/boss_noth.cpp | 257 +++--- .../northrend/naxxramas/boss_patchwerk.cpp | 12 +- .../northrend/naxxramas/boss_razuvious.cpp | 184 ++-- .../northrend/naxxramas/boss_sapphiron.cpp | 255 ++++-- scripts/northrend/naxxramas/boss_thaddius.cpp | 2 +- .../naxxramas/instance_naxxramas.cpp | 786 +++++++++++++----- scripts/northrend/naxxramas/naxxramas.h | 110 ++- 17 files changed, 3722 insertions(+), 2119 deletions(-) diff --git a/scripts/northrend/naxxramas/boss_anubrekhan.cpp b/scripts/northrend/naxxramas/boss_anubrekhan.cpp index 4cd80b730..d0cb5b78c 100644 --- a/scripts/northrend/naxxramas/boss_anubrekhan.cpp +++ b/scripts/northrend/naxxramas/boss_anubrekhan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 +/* Copyright (C) 2006 - 2009 ScriptDev2 * 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 @@ -16,190 +16,249 @@ /* ScriptData SDName: Boss_Anubrekhan -SD%Complete: 90 -SDComment: timers may be not offi +SD%Complete: 70 +SDComment: SDCategory: Naxxramas EndScriptData */ #include "precompiled.h" #include "naxxramas.h" -//Anub'Rekhan speech -enum Speech -{ - SAY_GREET = -1533000, - SAY_AGGRO1 = -1533001, - SAY_AGGRO2 = -1533002, - SAY_AGGRO3 = -1533003, - SAY_TAUNT1 = -1533004, - SAY_TAUNT2 = -1533005, - SAY_TAUNT3 = -1533006, - SAY_TAUNT4 = -1533007, - SAY_SLAY = -1533008 -}; - enum { -//Anub'Rekhan spels - SPELL_IMPALE = 28783, //May be wrong spell id. Causes more dmg than I expect - H_SPELL_IMPALE = 56090, - SPELL_LOCUSTSWARM = 28785, //This is a self buff that triggers the dmg debuff - H_SPELL_LOCUSTSWARM = 54021, - SPELL_BERSERK = 46587, - SPELL_SELF_SPAWN_5 = 29105, //This spawns 5 corpse scarabs ontop of us (most likely the player casts this on death) - -// Adds - MOB_CRYPT_GUARD = 16573, - MOB_CORPSE_SCARAB = 16698, - -//Crypt Guard spells - SPELL_CG_ACID_SPIT = 28969, - SPELL_CG_CLEAVE = 40504, - SPELL_CG_FRENZY = 8269, - SPELL_SELF_SPAWN_10 = 28864 //This spawns 10 corpse scarabs. This is used by the crypt guards when they die + SAY_GREET = -1533000, + SAY_AGGRO1 = -1533001, + SAY_AGGRO2 = -1533002, + SAY_AGGRO3 = -1533003, + SAY_TAUNT1 = -1533004, + SAY_TAUNT2 = -1533005, + SAY_TAUNT3 = -1533006, + SAY_TAUNT4 = -1533007, + SAY_SLAY = -1533008, + + SPELL_IMPALE = 28783, //May be wrong spell id. Causes more dmg than I expect + SPELL_IMPALE_H = 56090, + SPELL_LOCUSTSWARM = 28785, //This is a self buff that triggers the dmg debuff + SPELL_LOCUSTSWARM_H = 54021, + + //spellId invalid + SPELL_SUMMONGUARD = 29508, //Summons 1 crypt guard at targeted location + + SPELL_SELF_SPAWN_5 = 29105, //This spawns 5 corpse scarabs ontop of us (most likely the pPlayer casts this on death) + SPELL_SELF_SPAWN_10 = 28864, //This is used by the crypt guards when they die + + SPELL_ACID_SPIT = 28969, + SPELL_ACID_SPIT_H = 56098, + SPELL_CLEAVE = 40504, + SPELL_FRENZY = 8269, + + NPC_CRYPT_GUARD = 16573, + NPC_SMALL_SPAWN = 16698 }; -static const uint32 MAX_CRYPT_GUARDS = 8; - -//Anub'Rekhan AI struct MANGOS_DLL_DECL boss_anubrekhanAI : public ScriptedAI { - boss_anubrekhanAI(Creature *c) : ScriptedAI(c) + boss_anubrekhanAI(Creature* pCreature) : ScriptedAI(pCreature) { - pInstance = ((ScriptedInstance*)c->GetInstanceData()); - Regular = c->GetMap()->IsRegularDifficulty(); - - for (int i = 0; i < MAX_CRYPT_GUARDS; i++) - guidCryptGuards[i] = 0; - HasTaunted = false; + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + m_bHasTaunted = false; Reset(); } - ScriptedInstance *pInstance; - bool Regular; - - uint32 Impale_Timer; - uint32 LocustSwarm_Timer; - uint32 SummonFirst_Timer; - uint32 Berserk_Timer; - uint32 RiseFromCorpse_Timer; - - uint64 guidCryptGuards[MAX_CRYPT_GUARDS]; - uint32 CryptGuard_count; + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; - bool HasTaunted; //in fact says we entered the room with big beetle - bool swarm; //is active spell LocustSwarm or not, when active he cannot use other spels + uint32 m_uiImpaleTimer; + uint32 m_uiLocustSwarmTimer; + uint32 m_uiSummonTimer; + bool m_bHasTaunted; void Reset() { - Impale_Timer = 15000; //15 seconds - LocustSwarm_Timer = urand(80000, 120000); //Random time between 80 seconds and 2 minutes for initial cast - SummonFirst_Timer = 20000; //45 seconds after initial locust swarm - Berserk_Timer = 600000; - RiseFromCorpse_Timer = 20000 + (rand()%20000); - swarm = false; - CryptGuard_count = 0; - - // Remove all Crypt Guards - for (int i = 0; i < MAX_CRYPT_GUARDS; i++) - { - //delete creature - Unit* pUnit = Unit::GetUnit((*m_creature), guidCryptGuards[i]); - if (pUnit) - pUnit->AddObjectToRemoveList(); - guidCryptGuards[i] = 0; - } - - //Remove all corpse scarabs - std::list CorpseScarabs = GetCreaturesByEntry(MOB_CORPSE_SCARAB); - if (!CorpseScarabs.empty()) - for(std::list::iterator itr = CorpseScarabs.begin(); itr != CorpseScarabs.end(); ++itr) - (*itr)->AddObjectToRemoveList(); - - //if anubrekhan is alive -> this must be first time we entered Arachnid Quarter -> close all other doors - if(pInstance && m_creature->isAlive()) - pInstance->SetData(TYPE_ANUBREKHAN, NOT_STARTED); + m_uiImpaleTimer = 15000; // 15 seconds + m_uiLocustSwarmTimer = urand(80000, 120000); // Random time between 80 seconds and 2 minutes for initial cast + m_uiSummonTimer = 25000; // 15 seconds after initial locust swarm + Despawnall(); + StartSummonGuard(); } - void JustDied(Unit*) + void KilledUnit(Unit* pVictim) { - //Anubrekhan is slayed -> open all doors to Faerlina - if(pInstance) - pInstance->SetData(TYPE_ANUBREKHAN, DONE); - } + //Force the player to spawn corpse scarabs via spell + if (pVictim->GetTypeId() == TYPEID_PLAYER) + pVictim->CastSpell(pVictim, SPELL_SELF_SPAWN_5, true); + + if (urand(0, 4)) + return; - void KilledUnit(Unit* Victim) - { DoScriptText(SAY_SLAY, m_creature); } - void Aggro(Unit *who) + void Aggro(Unit* pWho) { - if(pInstance) pInstance->SetData(TYPE_ANUBREKHAN, IN_PROGRESS); - - switch(rand()%3) + switch(urand(0, 2)) { case 0: DoScriptText(SAY_AGGRO1, m_creature); break; case 1: DoScriptText(SAY_AGGRO2, m_creature); break; case 2: DoScriptText(SAY_AGGRO3, m_creature); break; } + + if (m_pInstance) + m_pInstance->SetData(TYPE_ANUB_REKHAN, IN_PROGRESS); + + m_creature->CallForHelp(50.0f); } - - bool IsVisible(Unit* who) const + + void JustDied(Unit* pKiller) { - if (!who) - return false; - return m_creature->IsWithinDistInMap(who, 100.0f); + if (m_pInstance) + m_pInstance->SetData(TYPE_ANUB_REKHAN, DONE); + Despawnall(); } - void MoveInLineOfSight(Unit *who) + void JustReachedHome() { - if (!HasTaunted) + if (m_pInstance) + m_pInstance->SetData(TYPE_ANUB_REKHAN, FAIL); + } + + void MoveInLineOfSight(Unit* pWho) + { + if (!m_bHasTaunted && m_creature->IsWithinDistInMap(pWho, 60.0f)) { - DoScriptText(SAY_GREET, m_creature); - HasTaunted = true; + switch(urand(0, 4)) + { + case 0: DoScriptText(SAY_GREET, m_creature); break; + case 1: DoScriptText(SAY_TAUNT1, m_creature); break; + case 2: DoScriptText(SAY_TAUNT2, m_creature); break; + case 3: DoScriptText(SAY_TAUNT3, m_creature); break; + case 4: DoScriptText(SAY_TAUNT4, m_creature); break; + } + m_bHasTaunted = true; } - - ScriptedAI::MoveInLineOfSight(who); + + ScriptedAI::MoveInLineOfSight(pWho); } - - std::list GetCreaturesByEntry(uint32 entry) - { - CellPair pair(MaNGOS::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY())); - Cell cell(pair); - cell.data.Part.reserved = ALL_DISTRICT; - cell.SetNoCreate(); - std::list creatureList; + void Despawnall() + { + std::list m_pSmall; + GetCreatureListWithEntryInGrid(m_pSmall, m_creature, NPC_SMALL_SPAWN, DEFAULT_VISIBILITY_INSTANCE); - AllCreaturesOfEntryInRange check(m_creature, entry, 100); - MaNGOS::CreatureListSearcher searcher(m_creature, creatureList, check); - TypeContainerVisitor, GridTypeMapContainer> visitor(searcher); + if (!m_pSmall.empty()) + for(std::list::iterator itr = m_pSmall.begin(); itr != m_pSmall.end(); ++itr) + { + (*itr)->ForcedDespawn(); + } - cell.Visit(pair, visitor, *(m_creature->GetMap()),*m_creature, 100); + std::list m_pGuard; + GetCreatureListWithEntryInGrid(m_pGuard, m_creature, NPC_CRYPT_GUARD, DEFAULT_VISIBILITY_INSTANCE); - return creatureList; + if (!m_pGuard.empty()) + for(std::list::iterator iter = m_pGuard.begin(); iter != m_pGuard.end(); ++iter) + { + (*iter)->ForcedDespawn(); + } + } + void StartSummonGuard() + { + m_creature->SummonCreature(NPC_CRYPT_GUARD, 3307, -3465, 287, 3.5, TEMPSUMMON_CORPSE_DESPAWN, 0); + if(!m_bIsRegularMode) + m_creature->SummonCreature(NPC_CRYPT_GUARD, 3304, -3490, 287, 2.5, TEMPSUMMON_CORPSE_DESPAWN, 0); + + } + + void SummonGuard() + { + //DoCast(m_creature, SPELL_SUMMONGUARD); + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + m_creature->SummonCreature(NPC_CRYPT_GUARD, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000); } - void JustSummoned(Creature* temp) + void UpdateAI(const uint32 uiDiff) { - if (!temp) + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //Summoned Crypt Guard will target random player - guidCryptGuards[CryptGuard_count++] = temp->GetGUID(); - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + // Impale + if (m_uiImpaleTimer < uiDiff) { - temp->AddThreat(target); - m_creature->SetInCombatWithZone(); + //Cast Impale on a random target + //Do NOT cast it when we are afflicted by locust swarm + if (!m_creature->HasAura(SPELL_LOCUSTSWARM) || !m_creature->HasAura(SPELL_LOCUSTSWARM_H)) + { + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, m_bIsRegularMode ? SPELL_IMPALE : SPELL_IMPALE_H); + } + + m_uiImpaleTimer = 15000; + } + else + m_uiImpaleTimer -= uiDiff; + + // Locust Swarm + if (m_uiLocustSwarmTimer < uiDiff) + { + DoCast(m_creature, m_bIsRegularMode?SPELL_LOCUSTSWARM_H:SPELL_LOCUSTSWARM); + m_uiLocustSwarmTimer = 90000; + m_uiSummonTimer = 15000; } + else + m_uiLocustSwarmTimer -= uiDiff; + + if (m_uiSummonTimer < uiDiff) + { + SummonGuard(); + m_uiSummonTimer = 240000; + }else m_uiSummonTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +struct MANGOS_DLL_DECL mob_crypt_guardAI : public ScriptedAI +{ + mob_crypt_guardAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + + uint32 AcidSpit_Timer; + uint32 Cleave_Timer; + uint32 Berserk_Timer; + + void Reset() + { + AcidSpit_Timer = 10000 + rand()%1000; + Cleave_Timer = 5000 + rand()%5000; + Berserk_Timer = 120000; + } + + void KilledUnit(Unit* pVictim) + { + //Force the player to spawn corpse scarabs via spell + if (pVictim->GetTypeId() == TYPEID_PLAYER) + pVictim->CastSpell(pVictim, SPELL_SELF_SPAWN_5, true); + } - switch (rand()%4) + void JustDied(Unit* Killer) + { + m_creature->CastSpell(m_creature, SPELL_SELF_SPAWN_10, true); + } + + void Aggro(Unit *who) + { + if (m_pInstance) { - case 0: DoScriptText(SAY_TAUNT1, m_creature); break; - case 1: DoScriptText(SAY_TAUNT2, m_creature); break; - case 2: DoScriptText(SAY_TAUNT3, m_creature); break; - case 3: DoScriptText(SAY_TAUNT4, m_creature); break; + if (Creature* pAnubRekhan = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_ANUB_REKHAN)))) + if (pAnubRekhan->isAlive() && !pAnubRekhan->getVictim()) + pAnubRekhan->AI()->AttackStart(who); } } @@ -208,108 +267,48 @@ struct MANGOS_DLL_DECL boss_anubrekhanAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //Berserk_Timer - if (Berserk_Timer < diff) - { - DoCast(m_creature,SPELL_BERSERK); - Berserk_Timer = 300000; - //Cast Impale on a random target - //Do NOT cast it when we are afflicted by locust swarm - if (!m_creature->HasAura(SPELL_LOCUSTSWARM) || !m_creature->HasAura(H_SPELL_LOCUSTSWARM)) + if (Berserk_Timer) + if (Berserk_Timer < diff) { - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCastSpellIfCan(target, Regular ? SPELL_IMPALE : H_SPELL_IMPALE); - } - }else Berserk_Timer -= diff; + DoCast(m_creature, SPELL_FRENZY); + Berserk_Timer = 0; + }else Berserk_Timer -= diff; + if (AcidSpit_Timer < diff) + { + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_ACID_SPIT : SPELL_ACID_SPIT_H); + AcidSpit_Timer = 10000 + rand()%1000; + }else AcidSpit_Timer -= diff; - //SumonFirstCryptGuard_Timer - if (SummonFirst_Timer < diff) + if (Cleave_Timer < diff) { - if (CryptGuard_count < MAX_CRYPT_GUARDS) - DoSpawnCreature(MOB_CRYPT_GUARD,0,0,0,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,10000); - SummonFirst_Timer = 2000000; - }else SummonFirst_Timer -= diff; - - RiseFromCorpse_Timer = 60000 + (rand()%10000); - std::list CryptGuards = GetCreaturesByEntry(MOB_CRYPT_GUARD); - if (!CryptGuards.empty()) - for(std::list::iterator itr = CryptGuards.begin(); itr != CryptGuards.end(); ++itr) - if ((*itr)->isDead()) - { - (*itr)->CastSpell((*itr),SPELL_SELF_SPAWN_10,true); - (*itr)->AddObjectToRemoveList(); - } - - const Map::PlayerList &players = m_creature->GetMap()->GetPlayers(); - if (players.isEmpty()) - return; - - for(Map::PlayerList::const_iterator i = players.begin(); i != players.end(); ++i) - if (Player* pPlayer = i->getSource()) - { - if (pPlayer->isGameMaster()) - continue; - - if (pPlayer->isDead()) - pPlayer->CastSpell(pPlayer,SPELL_SELF_SPAWN_5,true); - } - CryptGuards.clear(); - -// }else RiseFromCorpse_Timer -= diff; -// DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_LOCUSTSWARM :SPELL_LOCUSTSWARM_H); -// m_uiLocustSwarmTimer = 90000; -// } -// else -// m_uiLocustSwarmTimer -= uiDiff; - //Impale_Timer - if (Impale_Timer < diff) - { - //Cast Impale on a random target - //Do NOT cast it when we are afflicted by locust swarm -// if (!m_creature->HasAura(Regular ? SPELL_LOCUSTSWARM : H_SPELL_LOCUSTSWARM, 1)) - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1)) - DoCast(target,Regular ? SPELL_IMPALE : H_SPELL_IMPALE); - Impale_Timer = 15000; - }else Impale_Timer -= diff; - - //LocustSwarm_Timer - if (LocustSwarm_Timer < diff) - { - //Cast Locust Swarm buff on ourselves - DoCast(m_creature, Regular ? SPELL_LOCUSTSWARM : H_SPELL_LOCUSTSWARM); - swarm = true; - //Summon Crypt Guard immidietly after Locust Swarm - if (CryptGuard_count < MAX_CRYPT_GUARDS) - DoSpawnCreature(MOB_CRYPT_GUARD,0,0,0,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,10000); - LocustSwarm_Timer = 20000; - }else LocustSwarm_Timer -= diff; -// DoCastSpellIfCan(m_creature, SPELL_SUMMONGUARD); -// Summon_Timer = 45000; - -// else -// { -// if (LocustSwarm_Timer < diff) -// { -// swarm = false; -// LocustSwarm_Timer = 60000 + rand()%20000; -// }else LocustSwarm_Timer -= diff; + DoCast(m_creature->getVictim(), SPELL_CLEAVE); + Cleave_Timer = 5000 + rand()%5000; + }else Cleave_Timer -= diff; DoMeleeAttackIfReady(); - } + } }; - -CreatureAI* GetAI_boss_anubrekhan(Creature *_Creature) +CreatureAI* GetAI_boss_anubrekhan(Creature* pCreature) { - return new boss_anubrekhanAI (_Creature); + return new boss_anubrekhanAI(pCreature); } +CreatureAI* GetAI_mob_crypt_guard(Creature* pCreature) +{ + return new mob_crypt_guardAI(pCreature); +} void AddSC_boss_anubrekhan() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_anubrekhan"; - newscript->GetAI = &GetAI_boss_anubrekhan; - newscript->RegisterSelf(); + Script* NewScript; + NewScript = new Script; + NewScript->Name = "boss_anubrekhan"; + NewScript->GetAI = &GetAI_boss_anubrekhan; + NewScript->RegisterSelf(); + + NewScript = new Script; + NewScript->Name = "mob_crypt_guard"; + NewScript->GetAI = &GetAI_mob_crypt_guard; + NewScript->RegisterSelf(); } diff --git a/scripts/northrend/naxxramas/boss_faerlina.cpp b/scripts/northrend/naxxramas/boss_faerlina.cpp index f84739e45..c82b1c762 100644 --- a/scripts/northrend/naxxramas/boss_faerlina.cpp +++ b/scripts/northrend/naxxramas/boss_faerlina.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 +/* Copyright (C) 2006 - 2009 ScriptDev2 * 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 @@ -16,196 +16,285 @@ /* ScriptData SDName: Boss_Faerlina -SD%Complete: 80 -SDComment: Need core support: spell 28732 +SD%Complete: 50 +SDComment: SDCategory: Naxxramas EndScriptData */ #include "precompiled.h" #include "naxxramas.h" -#define SPELL_28732_NOT_YET_IMPLEMENTED - enum { - SAY_GREET = -1533009, - SAY_AGGRO = -1533010, - SAY_ENRAGE1 = -1533011, - SAY_ENRAGE2 = -1533012, - SAY_ENRAGE3 = -1533013, - SAY_SLAY1 = -1533014, - SAY_SLAY2 = -1533015, - SAY_DEATH = -1533016 -}; -enum -{ - SPELL_POSIONBOLT_VOLLEY = 28796, - SPELL_ENRAGE = 28798, - SPELL_RAINOFFIRE = 39024, //Not sure if targeted AoEs work if casted directly upon a player + SAY_GREET = -1533009, + SAY_AGGRO1 = -1533010, + SAY_AGGRO2 = -1533011, + SAY_AGGRO3 = -1533012, + SAY_AGGRO4 = -1533013, + SAY_SLAY1 = -1533014, + SAY_SLAY2 = -1533015, + SAY_DEATH = -1533016, - SPELL_WIDOWS_EMBRACE = 28732, //We will use it, but the real thing will be another - SPELL_FIREBALL = 54095 -}; + //SOUND_RANDOM_AGGRO = 8955, //soundId containing the 4 aggro sounds, we not using this + SPELL_POSIONBOLT_VOLLEY = 28796, + H_SPELL_POSIONBOLT_VOLLEY = 54098, + SPELL_ENRAGE = 28798, + H_SPELL_ENRAGE = 54100, + + SPELL_FIREBALL = 54095, + SPELL_FIREBALL_H = 54096, + SPELL_WIDOWS_EMBRACE = 28732, + + SPELL_RAINOFFIRE = 28794, //Not sure if targeted AoEs work if casted directly upon a pPlayer + + NPC_WORSHIPPER = 16506, + NPC_FOLLOWER = 16505, +}; struct MANGOS_DLL_DECL boss_faerlinaAI : public ScriptedAI { - boss_faerlinaAI(Creature *c) : ScriptedAI(c) + boss_faerlinaAI(Creature* pCreature) : ScriptedAI(pCreature) { - pInstance = ((ScriptedInstance*)c->GetInstanceData()); + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + m_bHasTaunted = false; Reset(); } - ScriptedInstance *pInstance; + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; - uint32 PoisonBoltVolley_Timer; - uint32 RainOfFire_Timer; - uint32 Enrage_Timer; - bool HasTaunted; + uint32 m_uiPoisonBoltVolleyTimer; + uint32 m_uiRainOfFireTimer; + uint32 m_uiEnrageTimer; + bool m_bHasTaunted; void Reset() { - PoisonBoltVolley_Timer = 8000; - RainOfFire_Timer = 16000; - Enrage_Timer = 60000; - HasTaunted = false; - - if(pInstance && m_creature->isAlive()) - pInstance->SetData(TYPE_FAERLINA, NOT_STARTED); + m_uiPoisonBoltVolleyTimer = 8000; + m_uiRainOfFireTimer = 16000; + m_uiEnrageTimer = 60000; + + DespawnAdds(); + SummonAdds(); } - void Aggro(Unit *who) + void Aggro(Unit* pWho) { - //Close the room for boss fight - if(pInstance) pInstance->SetData(TYPE_FAERLINA, IN_PROGRESS); + switch(urand(0, 3)) + { + case 0: DoScriptText(SAY_AGGRO1, m_creature); break; + case 1: DoScriptText(SAY_AGGRO2, m_creature); break; + case 2: DoScriptText(SAY_AGGRO3, m_creature); break; + case 3: DoScriptText(SAY_AGGRO4, m_creature); break; + } - DoScriptText(SAY_AGGRO, m_creature); + if (m_pInstance) + m_pInstance->SetData(TYPE_FAERLINA, IN_PROGRESS); } - void MoveInLineOfSight(Unit *who) + void MoveInLineOfSight(Unit* pWho) { - if (!HasTaunted && m_creature->IsWithinDistInMap(who, 100.0f)) + if (!m_bHasTaunted && m_creature->IsWithinDistInMap(pWho, 60.0f)) { DoScriptText(SAY_GREET, m_creature); - HasTaunted = true; + m_bHasTaunted = true; } - ScriptedAI::MoveInLineOfSight(who); + ScriptedAI::MoveInLineOfSight(pWho); } - void KilledUnit(Unit* victim) + void KilledUnit(Unit* pVictim) { - DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); + DoScriptText(urand(0, 1)?SAY_SLAY1:SAY_SLAY2, m_creature); } - void JustDied(Unit* Killer) + void JustDied(Unit* pKiller) { - if(pInstance) pInstance->SetData(TYPE_FAERLINA, DONE); - DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_FAERLINA, DONE); + + DespawnAdds(); } - void UpdateAI(const uint32 diff) + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_FAERLINA, FAIL); + } + + void SummonAdds() + { + m_creature->SummonCreature(NPC_WORSHIPPER, 3362.66, -3620.97, 261.08, 4.57276, TEMPSUMMON_CORPSE_DESPAWN, 0); + m_creature->SummonCreature(NPC_WORSHIPPER, 3344.3, -3618.31, 261.08, 4.69494, TEMPSUMMON_CORPSE_DESPAWN, 0); + m_creature->SummonCreature(NPC_WORSHIPPER, 3356.71, -3620.05, 261.08, 4.57276, TEMPSUMMON_CORPSE_DESPAWN, 0); + m_creature->SummonCreature(NPC_WORSHIPPER, 3350.26, -3619.11, 261.08, 4.67748, TEMPSUMMON_CORPSE_DESPAWN, 0); + if(!m_bIsRegularMode) + { + m_creature->SummonCreature(NPC_FOLLOWER, 3359.8, -3620.47, 260.996, 4.59711, TEMPSUMMON_CORPSE_DESPAWN, 0); + m_creature->SummonCreature(NPC_FOLLOWER, 3347.17, -3618.95, 260.997, 4.6678, TEMPSUMMON_CORPSE_DESPAWN, 0); + } + } + + void DespawnAdds() + { + std::list pWorshippers; + GetCreatureListWithEntryInGrid(pWorshippers, m_creature, NPC_WORSHIPPER, DEFAULT_VISIBILITY_INSTANCE); + + if (!pWorshippers.empty()) + for(std::list::iterator itr = pWorshippers.begin(); itr != pWorshippers.end(); ++itr) + { + (*itr)->ForcedDespawn(); + } + + std::list pFollower; + GetCreatureListWithEntryInGrid(pFollower, m_creature, NPC_FOLLOWER, DEFAULT_VISIBILITY_INSTANCE); + + if (!pFollower.empty()) + for(std::list::iterator iter = pFollower.begin(); iter != pFollower.end(); ++iter) + { + (*iter)->ForcedDespawn(); + } + } + + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //PoisonBoltVolley_Timer - if (PoisonBoltVolley_Timer < diff) + // Poison Bolt Volley + if (m_uiPoisonBoltVolleyTimer < uiDiff) { - DoCast(m_creature->getVictim(),SPELL_POSIONBOLT_VOLLEY); - PoisonBoltVolley_Timer = 11000; - }else PoisonBoltVolley_Timer -= diff; + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_POSIONBOLT_VOLLEY : H_SPELL_POSIONBOLT_VOLLEY); + m_uiPoisonBoltVolleyTimer = 11000; + } + else + m_uiPoisonBoltVolleyTimer -= uiDiff; - //RainOfFire_Timer - if (RainOfFire_Timer < diff) + // Rain Of Fire + if (m_uiRainOfFireTimer < uiDiff) { - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(target,SPELL_RAINOFFIRE); - RainOfFire_Timer = 16000; - }else RainOfFire_Timer -= diff; + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, SPELL_RAINOFFIRE); + + m_uiRainOfFireTimer = 16000; + } + else + m_uiRainOfFireTimer -= uiDiff; //Enrage_Timer - if (Enrage_Timer < diff) + if (m_uiEnrageTimer < uiDiff) { - switch (rand()%3) - { - case 0: DoScriptText(SAY_ENRAGE1, m_creature); break; - case 1: DoScriptText(SAY_ENRAGE2, m_creature); break; - case 2: DoScriptText(SAY_ENRAGE3, m_creature); break; - } - DoCast(m_creature,SPELL_ENRAGE); - Enrage_Timer = 61000; - }else Enrage_Timer -= diff; + DoCast(m_creature, m_bIsRegularMode ? SPELL_ENRAGE : H_SPELL_ENRAGE ); + m_uiEnrageTimer = 61000; + } + else + m_uiEnrageTimer -= uiDiff; DoMeleeAttackIfReady(); } }; -CreatureAI* GetAI_boss_faerlina(Creature *_Creature) +struct MANGOS_DLL_DECL mob_worshippersAI : public ScriptedAI { - return new boss_faerlinaAI (_Creature); -} - -struct MANGOS_DLL_DECL mob_faerlina_worshipperAI : public ScriptedAI -{ - mob_faerlina_worshipperAI(Creature *c) : ScriptedAI(c) + mob_worshippersAI(Creature* pCreature) : ScriptedAI(pCreature) { - pInstance = ((ScriptedInstance*)c->GetInstanceData()); + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - ScriptedInstance *pInstance; - uint32 fireball_timer; + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + bool m_bIsDead; + + uint32 m_uiFireball_Timer; + uint32 m_uiDeathDelay_Timer; void Reset() { - fireball_timer = 0; + m_bIsDead = false; + m_uiFireball_Timer = 0; + m_uiDeathDelay_Timer = 0; } - - void Aggro(Unit *who){} - - void JustDied(Unit* Killer) + void JustDied(Unit* pWho) { -#ifndef SPELL_28732_NOT_YET_IMPLEMENTED - DoCast(m_creature,SPELL_WIDOWS_EMBRACE,true); -#else - Unit* Faerlina = Unit::GetUnit((*m_creature), pInstance->GetData64(GUID_FAERLINA)); - if(Faerlina && m_creature->GetDistance2d(Faerlina) < 15.0f) - Faerlina->RemoveAurasByCasterSpell(SPELL_ENRAGE,pInstance->GetData64(GUID_FAERLINA)); -#endif + if (Unit* pFaerlina = Unit::GetUnit((*m_creature), m_pInstance->GetData64(NPC_FAERLINA))) + { + pFaerlina->RemoveAurasDueToSpell(m_bIsRegularMode ? SPELL_ENRAGE : H_SPELL_ENRAGE); + } } + void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + { + if (m_bIsDead) + { + uiDamage = 0; + return; + } + + if (uiDamage > m_creature->GetHealth()) + { + if (m_creature->IsNonMeleeSpellCasted(false)) + m_creature->InterruptNonMeleeSpells(false); - void UpdateAI(const uint32 diff) + m_creature->RemoveAllAuras(); + m_creature->AttackStop(); + + DoCast(m_creature, SPELL_WIDOWS_EMBRACE); + m_bIsDead = true; + m_uiDeathDelay_Timer = 500; + + uiDamage = 0; + return; + } + } + + void UpdateAI(const uint32 uiDiff) { - //Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + if (m_uiDeathDelay_Timer) + if (m_uiDeathDelay_Timer < uiDiff) + { + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + m_uiDeathDelay_Timer = 0; + } + else m_uiDeathDelay_Timer -= uiDiff; + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim() || m_bIsDead) return; - //PoisonBoltVolley_Timer - if (fireball_timer < diff) + if (m_uiFireball_Timer < uiDiff) { - DoCast(m_creature->getVictim(),SPELL_FIREBALL); - fireball_timer = 3000; - }else fireball_timer -= diff; + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_FIREBALL : SPELL_FIREBALL_H); + m_uiFireball_Timer = 7000 + rand()%4000; + } + else m_uiFireball_Timer -= uiDiff; DoMeleeAttackIfReady(); } -}; -CreatureAI* GetAI_mob_faerlina_worshipper(Creature *_Creature) +}; + +CreatureAI* GetAI_mob_worshippers(Creature* pCreature) { - return new mob_faerlina_worshipperAI (_Creature); + return new mob_worshippersAI(pCreature); +} + +CreatureAI* GetAI_boss_faerlina(Creature* pCreature) +{ + return new boss_faerlinaAI(pCreature); } void AddSC_boss_faerlina() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_faerlina"; - newscript->GetAI = &GetAI_boss_faerlina; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_faerlina_worshipper"; - newscript->GetAI = &GetAI_mob_faerlina_worshipper; - newscript->RegisterSelf(); + Script* NewScript; + NewScript = new Script; + NewScript->Name = "boss_faerlina"; + NewScript->GetAI = &GetAI_boss_faerlina; + NewScript->RegisterSelf(); + + NewScript = new Script; + NewScript->Name = "mob_worshippers"; + NewScript->GetAI = &GetAI_mob_worshippers; + NewScript->RegisterSelf(); } diff --git a/scripts/northrend/naxxramas/boss_four_horsemen.cpp b/scripts/northrend/naxxramas/boss_four_horsemen.cpp index 6a7399ea4..9da12d3ff 100644 --- a/scripts/northrend/naxxramas/boss_four_horsemen.cpp +++ b/scripts/northrend/naxxramas/boss_four_horsemen.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 +/* Copyright (C) 2006 - 2009 ScriptDev2 * 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 @@ -24,42 +24,116 @@ EndScriptData */ #include "precompiled.h" #include "naxxramas.h" -//all horsemen -#define SPELL_SHIELDWALL 29061 -#define SPELL_BESERK 26662 +enum +{ + //all horsemen + SPELL_SHIELDWALL = 29061, + SPELL_BESERK = 26662, + + //lady blaumeux + SAY_BLAU_AGGRO = -1533044, + SAY_BLAU_TAUNT1 = -1533045, + SAY_BLAU_TAUNT2 = -1533046, + SAY_BLAU_TAUNT3 = -1533047, + SAY_BLAU_SPECIAL = -1533048, + SAY_BLAU_SLAY = -1533049, + SAY_BLAU_DEATH = -1533050, + + SPELL_MARK_OF_BLAUMEUX = 28833, + SPELL_UNYILDING_PAIN = 57381, + SPELL_VOIDZONE = 28863, + H_SPELL_VOIDZONE = 57463, + SPELL_SHADOW_BOLT = 57374, + H_SPELL_SHADOW_BOLT = 57464, + + //baron rivendare + SAY_RIVE_AGGRO1 = -1533065, + SAY_RIVE_AGGRO2 = -1533066, + SAY_RIVE_AGGRO3 = -1533067, + SAY_RIVE_SLAY1 = -1533068, + SAY_RIVE_SLAY2 = -1533069, + SAY_RIVE_SPECIAL = -1533070, + SAY_RIVE_TAUNT1 = -1533071, + SAY_RIVE_TAUNT2 = -1533072, + SAY_RIVE_TAUNT3 = -1533073, + SAY_RIVE_DEATH = -1533074, + + SPELL_MARK_OF_RIVENDARE = 28834, + SPELL_UNHOLY_SHADOW = 28882, + H_SPELL_UNHOLY_SHADOW = 57369, + + //thane korthazz + SAY_KORT_AGGRO = -1533051, + SAY_KORT_TAUNT1 = -1533052, + SAY_KORT_TAUNT2 = -1533053, + SAY_KORT_TAUNT3 = -1533054, + SAY_KORT_SPECIAL = -1533055, + SAY_KORT_SLAY = -1533056, + SAY_KORT_DEATH = -1533057, + + SPELL_MARK_OF_KORTHAZZ = 28832, + SPELL_METEOR = 26558, // m_creature->getVictim() auto-area spell but with a core problem + + //sir zeliek + SAY_ZELI_AGGRO = -1533058, + SAY_ZELI_TAUNT1 = -1533059, + SAY_ZELI_TAUNT2 = -1533060, + SAY_ZELI_TAUNT3 = -1533061, + SAY_ZELI_SPECIAL = -1533062, + SAY_ZELI_SLAY = -1533063, + SAY_ZELI_DEATH = -1533064, + + SPELL_MARK_OF_ZELIEK = 28835, + SPELL_HOLY_WRATH = 28883, + H_SPELL_HOLY_WRATH = 57466, + SPELL_HOLY_BOLT = 57376, + H_SPELL_HOLY_BOLT = 57465, + SPELL_CONDEMNATION = 57377, + + // horseman spirits + NPC_SPIRIT_OF_BLAUMEUX = 16776, + NPC_SPIRIT_OF_RIVENDARE = 0, //creature entry not known yet + NPC_SPIRIT_OF_KORTHAZZ = 16778, + NPC_SPIRIT_OF_ZELIREK = 16777, +}; -//lady blaumeux -#define SAY_BLAU_AGGRO -1533044 -#define SAY_BLAU_TAUNT1 -1533045 -#define SAY_BLAU_TAUNT2 -1533046 -#define SAY_BLAU_TAUNT3 -1533047 -#define SAY_BLAU_SPECIAL -1533048 -#define SAY_BLAU_SLAY -1533049 -#define SAY_BLAU_DEATH -1533050 +/*walk coords*/ +#define WALKX_BLAU 2462.112 +#define WALKY_BLAU -2956.598 +#define WALKZ_BLAU 241.276 -#define SPELL_MARK_OF_BLAUMEUX 28833 -#define SPELL_UNYILDING_PAIN 57381 -#define SPELL_VOIDZONE 28863 -#define H_SPELL_VOIDZONE 57463 -#define SPELL_SHADOW_BOLT 57374 -#define H_SPELL_SHADOW_BOLT 57464 +#define WALKX_RIVE 2579.571 +#define WALKY_RIVE -2960.945 +#define WALKZ_RIVE 241.32 -#define C_SPIRIT_OF_BLAUMEUX 16776 +#define WALKX_KORT 2529.108 +#define WALKY_KORT -3015.303 +#define WALKZ_KORT 241.32 + +#define WALKX_ZELI 2521.039 +#define WALKY_ZELI -2891.633 +#define WALKZ_ZELI 241.276 + +#define HIGH_THREAT 50.0f struct MANGOS_DLL_DECL boss_lady_blaumeuxAI : public ScriptedAI { boss_lady_blaumeuxAI(Creature* pCreature) : ScriptedAI(pCreature) { - Regular = pCreature->GetMap()->IsRegularDifficulty(); - pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - bool Regular; - ScriptedInstance *pInstance; + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + uint32 Mark_Timer; uint32 VoidZone_Timer; - uint32 ShadowboltTimer; + uint32 Cast_Timer; + bool Move_Check; + bool Chase; + bool ShieldWall1; bool ShieldWall2; @@ -67,17 +141,23 @@ struct MANGOS_DLL_DECL boss_lady_blaumeuxAI : public ScriptedAI { Mark_Timer = 20000; // First Horsemen Mark is applied at 20 sec. VoidZone_Timer = 12000; // right + Cast_Timer = 9000; + Move_Check = true; + Chase = true; + ShieldWall1 = true; ShieldWall2 = true; - ShadowboltTimer = 3000; - if(pInstance) pInstance->SetData(TYPE_BLAUMEAUX, NOT_STARTED); } void Aggro(Unit *who) { DoScriptText(SAY_BLAU_AGGRO, m_creature); - if(pInstance) pInstance->SetData(TYPE_FOURHORSEMEN, IN_PROGRESS); - if(pInstance) pInstance->SetData(TYPE_BLAUMEAUX, IN_PROGRESS); + + if (m_pInstance) + m_pInstance->SetData(TYPE_BLAUMEUX, IN_PROGRESS); + + m_creature->AddThreat(who, HIGH_THREAT); + m_creature->CallForHelp(50.0f); } void KilledUnit(Unit* Victim) @@ -85,60 +165,121 @@ struct MANGOS_DLL_DECL boss_lady_blaumeuxAI : public ScriptedAI DoScriptText(SAY_BLAU_SLAY, m_creature); } + void AttackStart(Unit* pWho) + { + if (!pWho) + return; + + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + if(Chase) + { + m_creature->GetMotionMaster()->MoveChase(pWho); + Chase = false; + } + } + } + + Unit *PickNearestPlayer() + { + Unit *nearp = NULL; + float neardist = 0.0f; + Map* pMap = m_creature->GetMap(); + Map::PlayerList const &lPlayers = pMap->GetPlayers(); + for(Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr) + { + Player* pPlayer = itr->getSource(); + if (!pPlayer) + continue; + float pudist = pPlayer->GetDistance((const Creature *)m_creature); + if (!nearp || (neardist > pudist)) + { + nearp = pPlayer; + neardist = pudist; + } + } + return nearp; + } + + + void Cast(Unit* pWho) + { + if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + + if (!pWho) + return; + + AttackStart(pWho); + if(pWho->IsWithinDist(m_creature, 40)) + DoCast(pWho, m_bIsRegularMode ? SPELL_SHADOW_BOLT : H_SPELL_SHADOW_BOLT); + else + DoCast(pWho, SPELL_UNYILDING_PAIN); + Cast_Timer = 2050; + } + void JustDied(Unit* Killer) { DoScriptText(SAY_BLAU_DEATH, m_creature); - if(pInstance) pInstance->SetData(TYPE_BLAUMEAUX, DONE); + + if (m_pInstance) + m_pInstance->SetData(TYPE_BLAUMEUX, DONE); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + + //run on aggro + if (m_creature->getVictim() && Move_Check) + { + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->GetMotionMaster()->MovePoint(0, WALKX_BLAU, WALKY_BLAU, WALKZ_BLAU); + Move_Check = false; + } + + // Cast + if (Cast_Timer < uiDiff) + { + Unit *nearu = PickNearestPlayer(); + Cast(nearu); + }else Cast_Timer -= uiDiff; // Mark of Blaumeux - if(Mark_Timer < diff) + if (Mark_Timer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_MARK_OF_BLAUMEUX); + DoCast(m_creature->getVictim(),SPELL_MARK_OF_BLAUMEUX); Mark_Timer = 12000; - } - else Mark_Timer -= diff; + }else Mark_Timer -= uiDiff; // Shield Wall - All 4 horsemen will shield wall at 50% hp and 20% hp for 20 seconds - if(ShieldWall1 && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 50) + if (ShieldWall1 && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 50) { - if(ShieldWall1) + if (ShieldWall1) { - DoCastSpellIfCan(m_creature,SPELL_SHIELDWALL); + DoCast(m_creature,SPELL_SHIELDWALL); ShieldWall1 = false; } } - if(ShieldWall2 && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 20) + if (ShieldWall2 && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 20) { - if(ShieldWall2) + if (ShieldWall2) { - DoCastSpellIfCan(m_creature,SPELL_SHIELDWALL); + DoCast(m_creature,SPELL_SHIELDWALL); ShieldWall2 = false; } } // Void Zone - if(VoidZone_Timer < diff) + if (VoidZone_Timer < uiDiff) { - Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); - if(target) DoCast(target, Regular ? SPELL_VOIDZONE : H_SPELL_VOIDZONE); + DoCast(m_creature->getVictim(),SPELL_VOIDZONE); VoidZone_Timer = 12000; - } - else VoidZone_Timer -= diff; - - if(ShadowboltTimer < diff) - { - DoCast(m_creature->getVictim(), Regular ? SPELL_SHADOW_BOLT : H_SPELL_SHADOW_BOLT); - ShadowboltTimer = 3000; - } - else ShadowboltTimer -= diff; - - DoMeleeAttackIfReady(); + }else VoidZone_Timer -= uiDiff; } }; @@ -147,70 +288,70 @@ CreatureAI* GetAI_boss_lady_blaumeux(Creature* pCreature) return new boss_lady_blaumeuxAI(pCreature); } -//baron rivendare -#define SAY_RIVE_AGGRO1 -1533065 -#define SAY_RIVE_AGGRO2 -1533066 -#define SAY_RIVE_AGGRO3 -1533067 -#define SAY_RIVE_SLAY1 -1533068 -#define SAY_RIVE_SLAY2 -1533069 -#define SAY_RIVE_SPECIAL -1533070 -#define SAY_RIVE_TAUNT1 -1533071 -#define SAY_RIVE_TAUNT2 -1533072 -#define SAY_RIVE_TAUNT3 -1533073 -#define SAY_RIVE_DEATH -1533074 - -#define SPELL_MARK_OF_RIVENDARE 28834 -#define SPELL_UNHOLY_SHADOW 28882 -#define H_SPELL_UNHOLY_SHADOW 57369 - -#define C_SPIRIT_OF_RIVENDARE 0 //creature entry not known yet - struct MANGOS_DLL_DECL boss_rivendare_naxxAI : public ScriptedAI { boss_rivendare_naxxAI(Creature* pCreature) : ScriptedAI(pCreature) { - Regular = pCreature->GetMap()->IsRegularDifficulty(); - pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - - bool Regular; - ScriptedInstance *pInstance; - uint32 UnholyShadowTimer; + + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + uint32 Mark_Timer; + uint32 UnholyShadow_Timer; + bool Move_Check; + bool Attack_Check; bool ShieldWall1; bool ShieldWall2; void Reset() { - if(pInstance) pInstance->SetData(TYPE_RIVENDARE, NOT_STARTED); - UnholyShadowTimer = 15000; + Mark_Timer = 20000; + UnholyShadow_Timer = 15000; + Move_Check = true; + Attack_Check = true; ShieldWall1 = true; ShieldWall2 = true; - Mark_Timer = 20000; + + if (m_pInstance) + m_pInstance->SetData(TYPE_FOUR_HORSEMEN, NOT_STARTED); } void Aggro(Unit *who) { - switch(urand(0, 2)) + switch(rand()%3) { case 0: DoScriptText(SAY_RIVE_AGGRO1, m_creature); break; case 1: DoScriptText(SAY_RIVE_AGGRO2, m_creature); break; case 2: DoScriptText(SAY_RIVE_AGGRO3, m_creature); break; } - if(pInstance) pInstance->SetData(TYPE_FOURHORSEMEN, IN_PROGRESS); - if(pInstance) pInstance->SetData(TYPE_RIVENDARE, IN_PROGRESS); + + if (m_pInstance) + m_pInstance->SetData(TYPE_FOUR_HORSEMEN, IN_PROGRESS); + m_pInstance->SetData(TYPE_RIVENDARE, IN_PROGRESS); + + m_creature->AddThreat(who, HIGH_THREAT); + m_creature->CallForHelp(50.0f); } void KilledUnit(Unit* Victim) { - DoScriptText(urand(0, 1) ? SAY_RIVE_SLAY1 : SAY_RIVE_SLAY2, m_creature); + switch(rand()%2) + { + case 0: DoScriptText(SAY_RIVE_SLAY1, m_creature); break; + case 1: DoScriptText(SAY_RIVE_SLAY2, m_creature); break; + } } void JustDied(Unit* Killer) { DoScriptText(SAY_RIVE_DEATH, m_creature); - if(pInstance) pInstance->SetData(TYPE_RIVENDARE, DONE); + + if (m_pInstance) + m_pInstance->SetData(TYPE_RIVENDARE, DONE); } void UpdateAI(const uint32 diff) @@ -218,11 +359,27 @@ struct MANGOS_DLL_DECL boss_rivendare_naxxAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + //run on aggro + if (m_creature->getVictim() && Move_Check) + { + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->GetMotionMaster()->MovePoint(0, WALKX_RIVE, WALKY_RIVE, WALKZ_RIVE); + Move_Check = false; + } + + //when reach position, set possible to attack + if (m_creature->GetDistance2d(WALKX_RIVE, WALKY_RIVE) <= 2 && Attack_Check) + { + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + Attack_Check = false; + } + // Mark of Rivendare if (Mark_Timer < diff) { DoCast(m_creature->getVictim(),SPELL_MARK_OF_RIVENDARE); - Mark_Timer = 12000; + Mark_Timer = 15000; }else Mark_Timer -= diff; // Shield Wall - All 4 horsemen will shield wall at 50% hp and 20% hp for 20 seconds @@ -243,13 +400,11 @@ struct MANGOS_DLL_DECL boss_rivendare_naxxAI : public ScriptedAI } } - //Unholy Shadow - if(UnholyShadowTimer < diff) + if (UnholyShadow_Timer < diff) { - DoCast(m_creature->getVictim(), Regular ? SPELL_UNHOLY_SHADOW : H_SPELL_UNHOLY_SHADOW); - UnholyShadowTimer = 15000; - } - else UnholyShadowTimer -= diff; + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_UNHOLY_SHADOW : H_SPELL_UNHOLY_SHADOW); + UnholyShadow_Timer = 15000; + }else UnholyShadow_Timer -= diff; DoMeleeAttackIfReady(); } @@ -260,34 +415,23 @@ CreatureAI* GetAI_boss_rivendare_naxx(Creature* pCreature) return new boss_rivendare_naxxAI(pCreature); } -//thane korthazz -#define SAY_KORT_AGGRO -1533051 -#define SAY_KORT_TAUNT1 -1533052 -#define SAY_KORT_TAUNT2 -1533053 -#define SAY_KORT_TAUNT3 -1533054 -#define SAY_KORT_SPECIAL -1533055 -#define SAY_KORT_SLAY -1533056 -#define SAY_KORT_DEATH -1533057 - -#define SPELL_MARK_OF_KORTHAZZ 28832 -#define SPELL_METEOR 26558 // m_creature->getVictim() auto-area spell but with a core problem -#define H_SPELL_METEOR 57467 - -#define C_SPIRIT_OF_KORTHAZZ 16778 - struct MANGOS_DLL_DECL boss_thane_korthazzAI : public ScriptedAI { boss_thane_korthazzAI(Creature* pCreature) : ScriptedAI(pCreature) { - Regular = pCreature->GetMap()->IsRegularDifficulty(); - pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - bool Regular; - ScriptedInstance *pInstance; + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + uint32 Mark_Timer; uint32 Meteor_Timer; + bool Move_Check; + bool Attack_Check; + bool ShieldWall1; bool ShieldWall2; @@ -295,47 +439,71 @@ struct MANGOS_DLL_DECL boss_thane_korthazzAI : public ScriptedAI { Mark_Timer = 20000; // First Horsemen Mark is applied at 20 sec. Meteor_Timer = 30000; // wrong + + Move_Check = true; + Attack_Check = true; ShieldWall1 = true; ShieldWall2 = true; - if(pInstance) pInstance->SetData(TYPE_KORTHAZZ, NOT_STARTED); } - void Aggro(Unit *who) + void KilledUnit(Unit* Victim) { - DoScriptText(SAY_KORT_AGGRO, m_creature); - if(pInstance) pInstance->SetData(TYPE_FOURHORSEMEN, IN_PROGRESS); - if(pInstance) pInstance->SetData(TYPE_KORTHAZZ, IN_PROGRESS); + DoScriptText(SAY_KORT_SLAY, m_creature); } - void KilledUnit(Unit* Victim) + void Aggro(Unit *who) { - DoScriptText(SAY_KORT_SLAY, m_creature); + DoScriptText(SAY_KORT_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_KORTHAZZ, IN_PROGRESS); + + m_creature->AddThreat(who, HIGH_THREAT); + m_creature->CallForHelp(50.0f); } void JustDied(Unit* Killer) { DoScriptText(SAY_KORT_DEATH, m_creature); - if(pInstance) pInstance->SetData(TYPE_KORTHAZZ, DONE); + + if (m_pInstance) + m_pInstance->SetData(TYPE_KORTHAZZ, DONE); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + //run on aggro + if (m_creature->getVictim() && Move_Check) + { + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->GetMotionMaster()->MovePoint(0, WALKX_KORT, WALKY_KORT, WALKZ_KORT); + Move_Check = false; + } + + //when reach position, set possible to attack + if (m_creature->GetDistance2d(WALKX_KORT, WALKY_KORT) <= 2 && Attack_Check) + { + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + Attack_Check = false; + } + // Mark of Korthazz - if (Mark_Timer < diff) + if (Mark_Timer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_MARK_OF_KORTHAZZ); + DoCast(m_creature->getVictim(),SPELL_MARK_OF_KORTHAZZ); Mark_Timer = 12000; - }else Mark_Timer -= diff; + }else Mark_Timer -= uiDiff; // Shield Wall - All 4 horsemen will shield wall at 50% hp and 20% hp for 20 seconds if (ShieldWall1 && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 50) { if (ShieldWall1) { - DoCastSpellIfCan(m_creature,SPELL_SHIELDWALL); + DoCast(m_creature,SPELL_SHIELDWALL); ShieldWall1 = false; } } @@ -343,18 +511,17 @@ struct MANGOS_DLL_DECL boss_thane_korthazzAI : public ScriptedAI { if (ShieldWall2) { - DoCastSpellIfCan(m_creature,SPELL_SHIELDWALL); + DoCast(m_creature,SPELL_SHIELDWALL); ShieldWall2 = false; } } // Meteor - if (Meteor_Timer < diff) + if (Meteor_Timer < uiDiff) { - DoCast(m_creature->getVictim(), Regular ? SPELL_METEOR : H_SPELL_METEOR); - Meteor_Timer = 25000; - } - else Meteor_Timer -= diff; + DoCast(m_creature->getVictim(),SPELL_METEOR); + Meteor_Timer = 20000; // wrong + }else Meteor_Timer -= uiDiff; DoMeleeAttackIfReady(); } @@ -365,55 +532,100 @@ CreatureAI* GetAI_boss_thane_korthazz(Creature* pCreature) return new boss_thane_korthazzAI(pCreature); } -//sir zeliek -#define SAY_ZELI_AGGRO -1533058 -#define SAY_ZELI_TAUNT1 -1533059 -#define SAY_ZELI_TAUNT2 -1533060 -#define SAY_ZELI_TAUNT3 -1533061 -#define SAY_ZELI_SPECIAL -1533062 -#define SAY_ZELI_SLAY -1533063 -#define SAY_ZELI_DEATH -1533064 - -#define SPELL_MARK_OF_ZELIEK 28835 -#define SPELL_HOLY_WRATH 28883 -#define H_SPELL_HOLY_WRATH 57466 -#define SPELL_HOLY_BOLT 57376 -#define H_SPELL_HOLY_BOLT 57465 - -#define C_SPIRIT_OF_ZELIREK 16777 - struct MANGOS_DLL_DECL boss_sir_zeliekAI : public ScriptedAI { boss_sir_zeliekAI(Creature* pCreature) : ScriptedAI(pCreature) { - Regular = pCreature->GetMap()->IsRegularDifficulty(); - pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - bool Regular; - ScriptedInstance *pInstance; + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + + uint32 Cast_Timer; uint32 Mark_Timer; uint32 HolyWrath_Timer; - uint32 HolyBoltTimer; + bool Move_Check; + bool Chase; + bool ShieldWall1; bool ShieldWall2; void Reset() { - Mark_Timer = 20000; // First Horsemen Mark is applied at 20 sec. - HolyWrath_Timer = 12000; // right - HolyBoltTimer = 3000; + Mark_Timer = 20000; // First Horsemen Mark is applied at 20 sec. + HolyWrath_Timer = 12000; // right + Cast_Timer = 9000; + Move_Check = true; + Chase = true; + ShieldWall1 = true; ShieldWall2 = true; - if(pInstance) pInstance->SetData(TYPE_ZELIEK, NOT_STARTED); } void Aggro(Unit *who) { DoScriptText(SAY_ZELI_AGGRO, m_creature); - if(pInstance) pInstance->SetData(TYPE_FOURHORSEMEN, IN_PROGRESS); - if(pInstance) pInstance->SetData(TYPE_ZELIEK, IN_PROGRESS); + + if (m_pInstance) + m_pInstance->SetData(TYPE_ZELIEK, IN_PROGRESS); + + m_creature->AddThreat(who, HIGH_THREAT); + m_creature->CallForHelp(50.0f); + } + + Unit *PickNearestPlayer() + { + Unit *nearp = NULL; + float neardist = 0.0f; + Map* pMap = m_creature->GetMap(); + Map::PlayerList const &lPlayers = pMap->GetPlayers(); + for(Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr) + { + Player* pPlayer = itr->getSource(); + if (!pPlayer) + continue; + float pudist = pPlayer->GetDistance((const Creature *)m_creature); + if (!nearp || (neardist > pudist)) + { + nearp = pPlayer; + neardist = pudist; + } + } + return nearp; + } + + void Cast(Unit* pWho) + { + if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + + AttackStart(pWho); + if(pWho->IsWithinDist(m_creature, 40)) + DoCast(pWho, m_bIsRegularMode ? SPELL_HOLY_BOLT : H_SPELL_HOLY_BOLT); + else + DoCast(pWho, SPELL_CONDEMNATION); + Cast_Timer = 2050; + } + + void AttackStart(Unit* pWho) + { + if (!pWho) + return; + + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + if(Chase) + { + m_creature->GetMotionMaster()->MoveChase(pWho); + Chase = false; + } + } } void KilledUnit(Unit* Victim) @@ -424,28 +636,45 @@ struct MANGOS_DLL_DECL boss_sir_zeliekAI : public ScriptedAI void JustDied(Unit* Killer) { DoScriptText(SAY_ZELI_DEATH, m_creature); - if(pInstance) pInstance->SetData(TYPE_ZELIEK, DONE); + + if (m_pInstance) + m_pInstance->SetData(TYPE_ZELIEK, DONE); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + //run on aggro + if (m_creature->getVictim() && Move_Check) + { + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->GetMotionMaster()->MovePoint(0, WALKX_ZELI, WALKY_ZELI, WALKZ_ZELI); + Move_Check = false; + } + + // Cast + if (Cast_Timer < uiDiff) + { + Unit *nearu = PickNearestPlayer(); + Cast(nearu); + }else Cast_Timer -= uiDiff; + // Mark of Zeliek - if (Mark_Timer < diff) + if (Mark_Timer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_MARK_OF_ZELIEK); + DoCast(m_creature->getVictim(),SPELL_MARK_OF_ZELIEK); Mark_Timer = 12000; - }else Mark_Timer -= diff; + }else Mark_Timer -= uiDiff; // Shield Wall - All 4 horsemen will shield wall at 50% hp and 20% hp for 20 seconds if (ShieldWall1 && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 50) { if (ShieldWall1) { - DoCastSpellIfCan(m_creature,SPELL_SHIELDWALL); + DoCast(m_creature,SPELL_SHIELDWALL); ShieldWall1 = false; } } @@ -453,27 +682,17 @@ struct MANGOS_DLL_DECL boss_sir_zeliekAI : public ScriptedAI { if (ShieldWall2) { - DoCastSpellIfCan(m_creature,SPELL_SHIELDWALL); + DoCast(m_creature,SPELL_SHIELDWALL); ShieldWall2 = false; } } // Holy Wrath - if(HolyWrath_Timer < diff) + if (HolyWrath_Timer < uiDiff) { - DoCast(m_creature->getVictim(),Regular ? SPELL_HOLY_WRATH : H_SPELL_HOLY_WRATH); + DoCast(m_creature->getVictim(),SPELL_HOLY_WRATH); HolyWrath_Timer = 12000; - } - else HolyWrath_Timer -= diff; - - if(HolyBoltTimer < diff) - { - DoCast(m_creature->getVictim(), Regular ? SPELL_HOLY_BOLT : H_SPELL_HOLY_BOLT); - HolyBoltTimer = 3000; - } - else HolyBoltTimer -= diff; - - DoMeleeAttackIfReady(); + }else HolyWrath_Timer -= uiDiff; } }; @@ -484,25 +703,25 @@ CreatureAI* GetAI_boss_sir_zeliek(Creature* pCreature) void AddSC_boss_four_horsemen() { - Script *newscript; - - newscript = new Script; - newscript->Name = "boss_lady_blaumeux"; - newscript->GetAI = &GetAI_boss_lady_blaumeux; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_rivendare_naxx"; - newscript->GetAI = &GetAI_boss_rivendare_naxx; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_thane_korthazz"; - newscript->GetAI = &GetAI_boss_thane_korthazz; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_sir_zeliek"; - newscript->GetAI = &GetAI_boss_sir_zeliek; - newscript->RegisterSelf(); -} + Script* NewScript; + + NewScript = new Script; + NewScript->Name = "boss_lady_blaumeux"; + NewScript->GetAI = &GetAI_boss_lady_blaumeux; + NewScript->RegisterSelf(); + + NewScript = new Script; + NewScript->Name = "boss_rivendare_naxx"; + NewScript->GetAI = &GetAI_boss_rivendare_naxx; + NewScript->RegisterSelf(); + + NewScript = new Script; + NewScript->Name = "boss_thane_korthazz"; + NewScript->GetAI = &GetAI_boss_thane_korthazz; + NewScript->RegisterSelf(); + + NewScript = new Script; + NewScript->Name = "boss_sir_zeliek"; + NewScript->GetAI = &GetAI_boss_sir_zeliek; + NewScript->RegisterSelf(); +} \ No newline at end of file diff --git a/scripts/northrend/naxxramas/boss_gluth.cpp b/scripts/northrend/naxxramas/boss_gluth.cpp index 269a423da..add44af29 100644 --- a/scripts/northrend/naxxramas/boss_gluth.cpp +++ b/scripts/northrend/naxxramas/boss_gluth.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 +/* Copyright (C) 2006 - 2009 ScriptDev2 * 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 @@ -26,160 +26,259 @@ EndScriptData */ enum { - EMOTE_ZOMBIE = -1533119, + EMOTE_ZOMBIE = -1533119, - SPELL_MORTALWOUND = 25646, - SPELL_DECIMATE = 28374, - SPELL_ENRAGE = 28371, - SPELL_ENRAGE_H = 54427, - SPELL_BERSERK = 26662, + SPELL_MORTALWOUND = 25646, + SPELL_DECIMATE = 28374, + SPELL_ENRAGE = 28371, + SPELL_ENRAGE_H = 54427, + SPELL_BERSERK = 26662, - NPC_ZOMBIE_CHOW = 16360, + NPC_ZOMBIE_CHOW = 16360, + SPELL_INFECTED_WOUND = 29306 }; -#define ADD_1X 3269.590f -#define ADD_1Y -3161.287f -#define ADD_1Z 297.423f +#define ADD_1X 3269.590 +#define ADD_1Y -3161.287 +#define ADD_1Z 297.423 -#define ADD_2X 3277.797f -#define ADD_2Y -3170.352f -#define ADD_2Z 297.423f +#define ADD_2X 3277.797 +#define ADD_2Y -3170.352 +#define ADD_2Z 297.423 -#define ADD_3X 3267.049f -#define ADD_3Y -3172.820f -#define ADD_3Z 297.423f +#define ADD_3X 3267.049 +#define ADD_3Y -3172.820 +#define ADD_3Z 297.423 -#define ADD_4X 3252.157f -#define ADD_4Y -3132.135f -#define ADD_4Z 297.423f +#define ADD_4X 3252.157 +#define ADD_4Y -3132.135 +#define ADD_4Z 297.423 -#define ADD_5X 3259.990f -#define ADD_5Y -3126.590f -#define ADD_5Z 297.423f +#define ADD_5X 3259.990 +#define ADD_5Y -3126.590 +#define ADD_5Z 297.423 -#define ADD_6X 3259.815f -#define ADD_6Y -3137.576f -#define ADD_6Z 297.423f +#define ADD_6X 3259.815 +#define ADD_6Y -3137.576 +#define ADD_6Z 297.423 -#define ADD_7X 3308.030f -#define ADD_7Y -3132.135f -#define ADD_7Z 297.423f +#define ADD_7X 3308.030 +#define ADD_7Y -3132.135 +#define ADD_7Z 297.423 -#define ADD_8X 3303.046f -#define ADD_8Y -3180.682f -#define ADD_8Z 297.423f +#define ADD_8X 3303.046 +#define ADD_8Y -3180.682 +#define ADD_8Z 297.423 -#define ADD_9X 3313.283f -#define ADD_9Y -3180.766f -#define ADD_9Z 297.423f +#define ADD_9X 3313.283 +#define ADD_9Y -3180.766 +#define ADD_9Z 297.423 + +struct MANGOS_DLL_DECL mob_zombie_chowsAI : public ScriptedAI +{ + mob_zombie_chowsAI(Creature* pCreature) : ScriptedAI(pCreature) + { + Reset(); + } + + bool bIsForceMove; + + void Reset() + { + bIsForceMove = false; + } + void JustDied(Unit* Killer) {} + + void DoMeleeAttackIfReady() + { + //If we are within range melee the target + if (m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE)) + { + //Make sure our attack is ready and we aren't currently casting + if (m_creature->isAttackReady() && !m_creature->IsNonMeleeSpellCasted(false)) + { + DoCast(m_creature->getVictim(), SPELL_INFECTED_WOUND, true); + m_creature->AttackerStateUpdate(m_creature->getVictim()); + m_creature->resetAttackTimer(); + } + } + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim() || bIsForceMove) + return; + + DoMeleeAttackIfReady(); + } +}; struct MANGOS_DLL_DECL boss_gluthAI : public ScriptedAI { boss_gluthAI(Creature* pCreature) : ScriptedAI(pCreature) { - pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Regular = m_creature->GetMap()->IsRegularDifficulty(); + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - std::vector addsGuid; + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; - ScriptedInstance* pInstance; - bool Regular; - - uint32 MortalWound_Timer; - uint32 Decimate_Timer; - uint32 Enrage_Timer; + uint32 m_uiMortalWoundTimer; + uint32 m_uiDecimateTimer; + uint32 m_uiEnrageTimer; uint32 Summon_Timer; uint32 m_uiBerserkTimer; + uint32 RangeCheck_Timer; + std::list m_lZombieGUIDList; + void Reset() { - MortalWound_Timer = 8000; - Decimate_Timer = 100000; - Enrage_Timer = 60000; + m_uiMortalWoundTimer = 8000; + m_uiDecimateTimer = 100000; + m_uiEnrageTimer = 60000; Summon_Timer = 10000; m_uiBerserkTimer = MINUTE*8*IN_MILISECONDS; - addsGuid.clear(); - if(pInstance) pInstance->SetData(TYPE_GLUTH, NOT_STARTED); + RangeCheck_Timer = 1000; + m_lZombieGUIDList.clear(); } - void JustDied(Unit *killer) + void JustDied(Unit* pKiller) { - std::vector::iterator itr; - for(itr=addsGuid.begin(); itr!=addsGuid.end(); itr++) - { - Unit* zombie = Unit::GetUnit((*m_creature), (*itr)); - if(zombie && zombie->isAlive()) - zombie->DealDamage(zombie, zombie->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - } - addsGuid.clear(); - if(pInstance) pInstance->SetData(TYPE_GLUTH, DONE); + if (m_pInstance) + m_pInstance->SetData(TYPE_GLUTH, DONE); + + std::list pZombies; + GetCreatureListWithEntryInGrid(pZombies, m_creature, NPC_ZOMBIE_CHOW, DEFAULT_VISIBILITY_INSTANCE); + + if (!pZombies.empty()) + for(std::list::iterator itr = pZombies.begin(); itr != pZombies.end(); ++itr) + { + (*itr)->ForcedDespawn(); + } } - void Aggro(Unit *who) + void Aggro(Unit* pWho) { - if(pInstance) pInstance->SetData(TYPE_GLUTH, IN_PROGRESS); + if (m_pInstance) + m_pInstance->SetData(TYPE_GLUTH, IN_PROGRESS); } - void UpdateAI(const uint32 diff) + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_GLUTH, FAIL); + } + + void JustSummoned(Creature* summoned) + { + summoned->SetSpeedRate(MOVE_RUN, 0.8f); + } + + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //MortalWound_Timer - if (MortalWound_Timer < diff) + // Mortal Wound + if (m_uiMortalWoundTimer < uiDiff) { - DoCast(m_creature->getVictim(),SPELL_MORTALWOUND); - MortalWound_Timer = 10000; - }else MortalWound_Timer -= diff; + DoCast(m_creature->getVictim(), SPELL_MORTALWOUND); + m_uiMortalWoundTimer = 10000; + } + else + m_uiMortalWoundTimer -= uiDiff; - //Decimate_Timer - if (Decimate_Timer < diff) + //Decimate_Timer + if (m_uiDecimateTimer < uiDiff) { - DoCast(m_creature->getVictim(),SPELL_DECIMATE); - Decimate_Timer = 100000; - }else Decimate_Timer -= diff; + DoCast(m_creature->getVictim(),SPELL_DECIMATE); // need core support + + // workaround below + std::list t_list = m_creature->getThreatManager().getThreatList(); + if (t_list.size()) + { + //begin + 1 , so we don't target the one with the highest threat + std::list::iterator itr = t_list.begin(); + std::advance(itr, 1); + for(; itr!= t_list.end(); ++itr) + { + Unit *target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()); + if (target && target->isAlive() && target->GetTypeId() == TYPEID_PLAYER && + (target->GetHealth() > target->GetMaxHealth() * 0.05)) + target->SetHealth(target->GetMaxHealth() * 0.05); + } + } + // Move Zombies + if (!m_lZombieGUIDList.empty()) + { + for(std::list::iterator itr = m_lZombieGUIDList.begin(); itr != m_lZombieGUIDList.end(); ++itr) + if (Creature* pTemp = (Creature*)Unit::GetUnit(*m_creature, *itr)) + if (pTemp->isAlive()) + { + ((mob_zombie_chowsAI*)pTemp->AI())->bIsForceMove = true; + if (m_creature->GetHealth() > m_creature->GetMaxHealth() * 0.05) // remove when SPELL_DECIMATE is working + pTemp->SetHealth(pTemp->GetMaxHealth() * 0.02); + pTemp->AddThreat(m_creature, 1000000000.0f); // force move toward to Gluth + } + } + m_uiDecimateTimer = (m_bIsRegularMode ? 100000 : 120000); + }else m_uiDecimateTimer -= uiDiff; - //Enrage_Timer - if (Enrage_Timer < diff) + // Enrage + if (m_uiEnrageTimer < uiDiff) { - DoCast(m_creature, Regular ? SPELL_ENRAGE : SPELL_ENRAGE_H); - Enrage_Timer = 60000; - }else Enrage_Timer -= diff; + DoCast(m_creature, m_bIsRegularMode ? SPELL_ENRAGE : SPELL_ENRAGE_H); + m_uiEnrageTimer = 60000; + } + else m_uiEnrageTimer -= uiDiff; - //Summon_Timer - if (Summon_Timer < diff) + if (RangeCheck_Timer < uiDiff) { - if (Creature* pZombie = m_creature->SummonCreature(NPC_ZOMBIE_CHOW,ADD_1X,ADD_1Y,ADD_1Z,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000)) + if (!m_lZombieGUIDList.empty()) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) - pZombie->AddThreat(pTarget); - addsGuid.push_back(pZombie->GetGUID()); + for(std::list::iterator itr = m_lZombieGUIDList.begin(); itr != m_lZombieGUIDList.end(); ++itr) + if (Creature* pTemp = (Creature*)Unit::GetUnit(*m_creature, *itr)) + if (pTemp->isAlive() && m_creature->IsWithinDistInMap(pTemp, ATTACK_DISTANCE)) + { + DoScriptText(EMOTE_ZOMBIE, m_creature); + m_creature->SetHealth(m_creature->GetHealth() + m_creature->GetMaxHealth() * 0.05); + pTemp->ForcedDespawn(); + } } + RangeCheck_Timer = 1000; + }else RangeCheck_Timer -= uiDiff; - if (!Regular) + //Summon_Timer + if (Summon_Timer < uiDiff) + { + for(uint8 i = 0; i < (m_bIsRegularMode ? 1 : 2); i++) { - if (Creature* pZombie = m_creature->SummonCreature(NPC_ZOMBIE_CHOW,ADD_1X,ADD_1Y,ADD_1Z,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000)) + if (Creature* pZombie = m_creature->SummonCreature(NPC_ZOMBIE_CHOW,ADD_1X,ADD_1Y,ADD_1Z,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000)) { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) - pZombie->AddThreat(pTarget); - addsGuid.push_back(pZombie->GetGUID()); + { + pZombie->AI()->AttackStart(pTarget); + m_lZombieGUIDList.push_back(pZombie->GetGUID()); + } } } + Summon_Timer = 10000; + } else Summon_Timer -= uiDiff; - Summon_Timer = 20000; - } else Summon_Timer -= diff; - - //m_uiBerserkTimer - if (m_uiBerserkTimer < diff) + // Berserk + if (m_uiBerserkTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_BERSERK, CAST_TRIGGERED); + DoCast(m_creature, SPELL_BERSERK, true); m_uiBerserkTimer = MINUTE*5*IN_MILISECONDS; - }else m_uiBerserkTimer -= diff; + } + else + m_uiBerserkTimer -= uiDiff; DoMeleeAttackIfReady(); } @@ -190,11 +289,21 @@ CreatureAI* GetAI_boss_gluth(Creature* pCreature) return new boss_gluthAI(pCreature); } -void AddSC_boss_gluth() +CreatureAI* GetAI_mob_zombie_chows(Creature* pCreature) { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_gluth"; - newscript->GetAI = &GetAI_boss_gluth; - newscript->RegisterSelf(); + return new mob_zombie_chowsAI(pCreature); } + +void AddSC_boss_gluth() +{ + Script* NewScript; + NewScript = new Script; + NewScript->Name = "boss_gluth"; + NewScript->GetAI = &GetAI_boss_gluth; + NewScript->RegisterSelf(); + + NewScript = new Script; + NewScript->Name = "mob_zombie_chows"; + NewScript->GetAI = &GetAI_mob_zombie_chows; + NewScript->RegisterSelf(); +} \ No newline at end of file diff --git a/scripts/northrend/naxxramas/boss_gothik.cpp b/scripts/northrend/naxxramas/boss_gothik.cpp index d8fd5e9da..d3bce746b 100644 --- a/scripts/northrend/naxxramas/boss_gothik.cpp +++ b/scripts/northrend/naxxramas/boss_gothik.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 +/* Copyright (C) 2006 - 2009 ScriptDev2 * 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 @@ -14,440 +14,193 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +/* ScriptData +SDName: Boss_Gothik +SD%Complete: 0 +SDComment: Placeholder +SDCategory: Naxxramas +EndScriptData */ + #include "precompiled.h" #include "naxxramas.h" -//GO: the door -#define GO_GOTHIK_GATE 181170 - -//creatures id -//Gothik - 16060 -#define CR_UN_TRAINEE 16124 -#define CR_UN_DEATHKNIGHT 16125 -#define CR_UN_RIDER 16126 -#define CR_SP_TRAINEE 16127 -#define CR_SP_DEATHKNIGHT 16148 -#define CR_SP_RIDER 16150 - -//SPELLS -//Gothik the Harvester -#define SP_HARVEST_SOUL 28679 -#define SP_SHADOWBOLT 29317 -#define H_SP_SHADOWBOLT 56405 -//Unrelenting Trainee -#define SP_DEATH_PLAGUE 55604 -#define H_SP_DEATH_PLAGUE 55645 -//Unrelenting Death Knight -#define SP_SHADOW_MARK 27825 -//Unrelenting Rider -#define SP_SHADOW_VOLLEY 27831 -#define H_SP_SHADOW_VOLLEY 55638 -//Spectral Trainee -#define SP_EXPLOSION 27989 -#define H_SP_EXPLOSION 56407 -//Spectral Death Knight -#define SP_WHIRLWIND 56408 -//Spectral Rider -#define SP_UNHOLY_AURA 55606 -#define H_SP_UNHOLY_AURA 55608 -#define SP_UNHOLY_FRENZY 55648 -#define H_SP_UNHOLY_FRENZY 27995 -#define SP_DRAIN_LIFE 27994 -#define H_SP_DRAIN_LIFE 55646 - - -//Gothik Teleport Coordinates -#define LIVE_X 2691.991699 -#define LIVE_Y -3422.510742 -#define LIVE_Z 267.689362 -#define UNDEAD_X 2693.844238 -#define UNDEAD_Y -3298.302490 -#define UNDEAD_Z 267.683167 -//Mobs summon coords -//Live: -//Undead: - - -/* - 1 (3:30 ) - , - 2 (60 ) - , - 3 (15 ) - 1, - 4 (15 ) - 2, - 5 ( 30% ) - , -*/ - - -struct MANGOS_DLL_DECL boss_gothikAI : public ScriptedAI -{ - boss_gothikAI(Creature* pCreature) : ScriptedAI(pCreature) - { - pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Regular = pCreature->GetMap()->IsRegularDifficulty(); - - trainees = Regular ? 2 : 3; - - LiveX[0]=2669.430176; LiveY[0]=-3430.828613; LiveZ[0]=268.563049; - LiveX[1]=2692.187988; LiveY[1]=-3431.384277; LiveZ[1]=268.563538; - LiveX[2]=2714.282959; LiveY[2]=-3431.556152; LiveZ[2]=268.563538; - - Reset(); - } +#define SAY_SPEECH -1533040 +#define SAY_KILL -1533041 +#define SAY_DEATH -1533042 +#define SAY_TELEPORT -1533043 - //summon coordinates - float LiveX[3]; - float LiveY[3]; - float LiveZ[3]; - - bool Regular; - uint32 phase; - uint32 Phase_Timer; - uint32 Shadowbolt_Timer; - - //summon timers - uint32 Trainee_Timer; - uint32 DeathKnight_Timer; - uint32 Rider_Timer; - - int trainees; - - ScriptedInstance* pInstance; - - void Reset() - { - phase = 1; - Phase_Timer = 210000; - Shadowbolt_Timer = 1200; - - Trainee_Timer = 12000; - DeathKnight_Timer = 20000; - Rider_Timer = 60000; - - SetCombatMovement(false); - - if(pInstance) pInstance->SetData(TYPE_GOTHIK, NOT_STARTED); - } - - void DamageTaken(Unit *done_by, uint32 &damage) - { - if(phase==1 || phase==2) damage=0; - } - - void Aggro(Unit *who) - { - if(pInstance) pInstance->SetData(TYPE_GOTHIK, IN_PROGRESS); - } +//Gothik +#define SPELL_HARVESTSOUL 28679 +#define SPELL_SHADOWBOLT 29317 +#define H_SPELL_SHADOWBOLT 56405 - void JustDied(Unit *killer) - { - if(pInstance) pInstance->SetData(TYPE_GOTHIK, DONE); - } - - void UpdateAI(const uint32 diff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - int i; - - //PHASE 1 - if(phase==1) - { - if(Phase_Timer < diff) - { - phase = 2; - Phase_Timer = 60000; //phase 2 lasts 60 seconds - } - else Phase_Timer -= diff; +//Unrelenting Trainee +#define SPELL_EAGLECLAW 30285 +#define SPELL_KNOCKDOWN_PASSIVE 6961 - //summon trainees - if(Trainee_Timer < diff) - { - for(i=0; iSummonCreature(CR_UN_TRAINEE, LiveX[i], LiveY[i], LiveZ[i], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); - Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); - if(mob && target) mob->AddThreat(target, 1.0f); - } - Trainee_Timer = 15000; - } - else Trainee_Timer -= diff; +//Unrelenting Deathknight +#define SPELL_CHARGE 22120 +#define SPELL_SHADOW_MARK 27825 - //summon death knights - if(DeathKnight_Timer < diff) - { - i = irand(0,2); - Unit *mob = m_creature->SummonCreature(CR_UN_DEATHKNIGHT, LiveX[i], LiveY[i], LiveZ[i], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); - Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); - if(mob && target) mob->AddThreat(target, 1.0f); - DeathKnight_Timer = 30000; - } - else DeathKnight_Timer -= diff; +//Unrelenting Rider +#define SPELL_UNHOLY_AURA 55606 +#define H_SPELL_UNHOLY_AURA 55608 +#define SPELL_SHADOWBOLT_VOLLEY 27831 //Search thru targets and find those who have the SHADOW_MARK to cast this on +#define H_SPELL_SHADOWBOLT_VOLLEY 55638 - //summon rider - if(Rider_Timer < diff) - { - i = irand(0,2); - Unit *mob = m_creature->SummonCreature(CR_UN_RIDER, LiveX[i], LiveY[i], LiveZ[i], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); - Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); - if(mob && target) mob->AddThreat(target, 1.0f); - Rider_Timer = 45000; - } - else Rider_Timer -= diff; - } +//Spectral Trainee +#define SPELL_ARCANE_EXPLOSION 27989 - //PHASE 2 - if(phase==2) - { - if(Phase_Timer < diff) - { - //teleport gothik down - m_creature->NearTeleportTo(UNDEAD_X, UNDEAD_Y, UNDEAD_Z, 0); - Phase_Timer = 15000; - phase = 3; +//Spectral Deathknight +#define SPELL_WHIRLWIND 28334 +#define SPELL_SUNDER_ARMOR 25051 //cannot find sunder that reduces armor by 2950 +#define SPELL_CLEAVE 20677 +#define SPELL_MANA_BURN 17631 - SetCombatMovement(true); - m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); - } - else Phase_Timer -= diff; - } +//Spectral Rider +#define SPELL_LIFEDRAIN 24300 +//USES SAME UNHOLY AURA AS UNRELENTING RIDER - //PHASE 3,4 - if(phase==3 || phase==4) - { - if(Phase_Timer < diff) - { - //cast Harvest Soul (-10% stats to the raid) - Unit* target = NULL; - ThreatList const& tList = m_creature->getThreatManager().getThreatList(); - for (ThreatList::const_iterator itr = tList.begin();itr != tList.end(); ++itr) - { - if (Unit* target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid())) - if(target->isAlive()) - DoCast(target, SP_HARVEST_SOUL, true); - } - //teleport gothik to the other side - if(phase==3) - m_creature->NearTeleportTo(LIVE_X, LIVE_Y, LIVE_Z, 0); - else - m_creature->NearTeleportTo(UNDEAD_X, UNDEAD_Y, UNDEAD_Z, 0); +//Spectral Horse +#define SPELL_STOMP 27993 - Phase_Timer = 15000; - phase = (phase==3) ? 4 : 3; - } - else Phase_Timer -= diff; +#define MOB_LIVE_TRAINEE 16124 +#define MOB_LIVE_KNIGHT 16125 +#define MOB_LIVE_RIDER 16126 +#define MOB_DEAD_TRAINEE 16127 +#define MOB_DEAD_KNIGHT 16148 +#define MOB_DEAD_RIDER 16150 +#define MOB_DEAD_HORSE 16149 - //cast shadowbolts - if(Shadowbolt_Timer < diff) - { - DoCast(m_creature->getVictim(), Regular ? SP_SHADOWBOLT : H_SP_SHADOWBOLT); - Shadowbolt_Timer = 1200; - } - else Shadowbolt_Timer -= diff; +#define POS_LIVE 3 +#define POS_DEAD 5 - //if 30% left, stop teleporting - if ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() <= 30) - { - phase=5; - if(pInstance) pInstance->SetData(TYPE_GOTHIK, SPECIAL); - } - } +const struct Waves { uint32 entry, number, time; } +waves[] = +{ + {MOB_LIVE_TRAINEE, 2, 20000}, + {MOB_LIVE_TRAINEE, 2, 20000}, + {MOB_LIVE_TRAINEE, 2, 10000}, + {MOB_LIVE_KNIGHT, 1, 10000}, // 60 + {MOB_LIVE_TRAINEE, 2, 15000}, + {MOB_LIVE_KNIGHT, 1, 10000}, + {MOB_LIVE_TRAINEE, 2, 15000}, + {MOB_LIVE_TRAINEE, 2, 0}, + {MOB_LIVE_KNIGHT, 1, 10000}, + {MOB_LIVE_RIDER, 1, 10000}, // 120 + {MOB_LIVE_TRAINEE, 2, 5000}, + {MOB_LIVE_KNIGHT, 1, 15000}, + {MOB_LIVE_TRAINEE, 2, 0}, + {MOB_LIVE_RIDER, 1, 10000}, + {MOB_LIVE_KNIGHT, 1, 10000}, + {MOB_LIVE_TRAINEE, 2, 10000}, + {MOB_LIVE_RIDER, 1, 5000}, + {MOB_LIVE_KNIGHT, 1, 5000}, // 180 + {MOB_LIVE_TRAINEE, 2, 20000}, + {MOB_LIVE_TRAINEE, 2, 0}, + {MOB_LIVE_KNIGHT, 1, 0}, + {MOB_LIVE_RIDER, 1, 15000}, + {MOB_LIVE_TRAINEE, 2, 29000}, // 244 + {0, 0, 0}, +}; - //PHASE 5 - if(phase==5) - { - if(Shadowbolt_Timer < diff) - { - DoCast(m_creature->getVictim(), Regular ? SP_SHADOWBOLT : H_SP_SHADOWBOLT); - Shadowbolt_Timer = 1200; - } - else Shadowbolt_Timer -= diff; - } - } +const float PosSummonLive[POS_LIVE][3] = +{ + {2669.7, -3430.9, 268.56}, + {2692.0, -3430.9, 268.56}, + {2714.1, -3430.9, 268.56}, }; +const float PosSummonDead[POS_DEAD][3] = +{ + {2725.1, -3310.0, 268.85}, + {2699.3, -3322.8, 268.60}, + {2733.1, -3348.5, 268.84}, + {2682.8, -3304.2, 268.85}, + {2664.8, -3340.7, 268.23}, +}; -/*******************************************************************/ -// UNRELENTING / SPECTRAL TRAINEE AI // -/*******************************************************************/ +const float PosPlatform[4] = {2640.5, -3360.6, 285.26, 0}; +const float PosGroundLive[4] = {2692.174, -3400.963, 267.680, 1.7}; +const float PosGroundDeath[4] = {2690.378, -3328.279, 267.681, 1.7}; -struct MANGOS_DLL_DECL mob_gothik_trainee_addAI : public ScriptedAI +struct MANGOS_DLL_DECL boss_gothikAI : public Scripted_NoMovementAI { - mob_gothik_trainee_addAI(Creature* pCreature) : ScriptedAI(pCreature) + boss_gothikAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { - Regular = pCreature->GetMap()->IsRegularDifficulty(); + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - bool Regular; - float UndeadX[5]; - float UndeadY[5]; - float UndeadZ[5]; - uint32 PlagueTimer; - uint32 ExplosionTimer; + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + bool SummonPhase; + bool BlinkPhase; - void Reset() - { - UndeadX[0]=2733.049561; UndeadY[0]=-3349.463135; UndeadZ[0]=268.113251; - UndeadX[1]=2725.951416; UndeadY[1]=-3310.180664; UndeadZ[1]=269.058899; - UndeadX[2]=2700.589111; UndeadY[2]=-3322.897949; UndeadZ[2]=269.107666; - UndeadX[3]=2683.933350; UndeadY[3]=-3304.313232; UndeadZ[3]=269.135010; - UndeadX[4]=2665.220459; UndeadY[4]=-3339.860840; UndeadZ[4]=268.846222; - PlagueTimer = 3000; - ExplosionTimer = 3000+rand()%8000; - } + std::list SummonsList; - void Aggro(Unit *who) {} + uint32 waveCount; + uint32 Summon_Timer; + uint32 SummonDeathCheck_Timer; + uint32 HarvestSoul_Timer; + uint32 ShadowBolt_Timer; + uint32 Blink_Timer; - void JustDied(Unit *killer) + void Reset() { - //if unrelenting trainee then spawn spectral trainee - if(m_creature->GetEntry()==CR_UN_TRAINEE) //maybe need check Regular entry too - { - int i = irand(0,5); - Unit *mob = m_creature->SummonCreature(CR_SP_TRAINEE, UndeadX[i], UndeadY[i], UndeadZ[i], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); - if(mob) mob->AddThreat(killer, 1.0f); - } - } + SummonPhase = false; + BlinkPhase = false; - void UpdateAI(const uint32 diff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if(m_creature->GetEntry()==CR_UN_TRAINEE) - { - if(PlagueTimer < diff) - { - DoCast(m_creature->getVictim(), Regular ? SP_DEATH_PLAGUE : H_SP_DEATH_PLAGUE); - PlagueTimer = 3500; - } - PlagueTimer -= diff; - } - else - { - if(ExplosionTimer < diff) - { - DoCast(m_creature, Regular ? SP_EXPLOSION : H_SP_EXPLOSION); - ExplosionTimer = 5000+rand()%10000; - } - ExplosionTimer -= diff; - } + SummonsList.clear(); - DoMeleeAttackIfReady(); - } -}; + waveCount = 0; + Summon_Timer = 10000; + SummonDeathCheck_Timer = 1000; + HarvestSoul_Timer = 15000; + ShadowBolt_Timer = 1000; + Blink_Timer = 30000; -/*******************************************************************/ -// UNRELENTING / SPECTRAL DEATH KNIGHT AI // -/*******************************************************************/ + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); -struct MANGOS_DLL_DECL mob_gothik_dk_addAI : public ScriptedAI -{ - mob_gothik_dk_addAI(Creature* pCreature) : ScriptedAI(pCreature) - { - Reset(); + if (m_pInstance) + m_pInstance->SetData(TYPE_GOTHIK, NOT_STARTED); } - float UndeadX[5]; - float UndeadY[5]; - float UndeadZ[5]; - uint32 SpellTimer; - - void Reset() + void EnterCombat(Unit *who) { - UndeadX[0]=2733.049561; UndeadY[0]=-3349.463135; UndeadZ[0]=268.113251; - UndeadX[1]=2725.951416; UndeadY[1]=-3310.180664; UndeadZ[1]=269.058899; - UndeadX[2]=2700.589111; UndeadY[2]=-3322.897949; UndeadZ[2]=269.107666; - UndeadX[3]=2683.933350; UndeadY[3]=-3304.313232; UndeadZ[3]=269.135010; - UndeadX[4]=2665.220459; UndeadY[4]=-3339.860840; UndeadZ[4]=268.846222; - SpellTimer = 8000+rand()%8000; //Shadow Mark and Whirlwind - } + DoScriptText(SAY_SPEECH, m_creature); - void Aggro(Unit *who) {} + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->GetMap()->CreatureRelocation(m_creature, PosPlatform[0], PosPlatform[1], PosPlatform[2], PosPlatform[3]); + m_creature->SetInCombatWithZone(); - void JustDied(Unit *killer) - { - //if unrelenting DK then spawn spectral DK - if(m_creature->GetEntry()==CR_UN_DEATHKNIGHT) + if (m_pInstance) { - int i = irand(0,5); - Unit *mob = m_creature->SummonCreature(CR_SP_DEATHKNIGHT, UndeadX[i], UndeadY[i], UndeadZ[i], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); - if(mob) mob->AddThreat(killer, 1.0f); - } - } - - void UpdateAI(const uint32 diff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; + m_pInstance->SetData(TYPE_GOTHIK, IN_PROGRESS); - if(SpellTimer < diff) - { - if(m_creature->GetEntry()==CR_UN_DEATHKNIGHT) - DoCast(m_creature->getVictim(), SP_SHADOW_MARK); - else //Spectral DK - DoCast(m_creature->getVictim(), SP_WHIRLWIND); - SpellTimer = 8000+rand()%8000; + if (GameObject* pGate = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GOTHIK_GATE))) + pGate->SetGoState(GO_STATE_READY); } - else SpellTimer -= diff; - - DoMeleeAttackIfReady(); } -}; - - -/*******************************************************************/ -// UNRELENTING / SPECTRAL RIDER AI // -/*******************************************************************/ - -struct MANGOS_DLL_DECL mob_gothik_rider_addAI : public ScriptedAI -{ - mob_gothik_rider_addAI(Creature* pCreature) : ScriptedAI(pCreature) + void KilledUnit(Unit* victim) { - Regular = pCreature->GetMap()->IsRegularDifficulty(); - Reset(); + if(!(rand()%5)) + DoScriptText(SAY_KILL, m_creature); } - bool Regular; - uint32 VolleyTimer; - uint32 DrainTimer; - //uint32 FrenzyTimer; - float UndeadX[5]; - float UndeadY[5]; - float UndeadZ[5]; - - void Reset() + void JustDied(Unit* Killer) { - UndeadX[0]=2733.049561; UndeadY[0]=-3349.463135; UndeadZ[0]=268.113251; - UndeadX[1]=2725.951416; UndeadY[1]=-3310.180664; UndeadZ[1]=269.058899; - UndeadX[2]=2700.589111; UndeadY[2]=-3322.897949; UndeadZ[2]=269.107666; - UndeadX[3]=2683.933350; UndeadY[3]=-3304.313232; UndeadZ[3]=269.135010; - UndeadX[4]=2665.220459; UndeadY[4]=-3339.860840; UndeadZ[4]=268.846222; - VolleyTimer = 5000+rand()%10000; - DrainTimer = 8000+rand()%10000; - //FrenzyTimer = 2000; - } + DoScriptText(SAY_DEATH, m_creature); - void Aggro(Unit *who) - { - DoCast(m_creature, SP_UNHOLY_AURA); + if (m_pInstance) + m_pInstance->SetData(TYPE_GOTHIK, DONE); } - void JustDied(Unit *killer) + void JustSummoned(Creature* pSummon) { - //if unrelenting rider then spawn spectral rider - if(m_creature->GetEntry()==CR_UN_RIDER) //maybe need check Regular entry too - { - int i = irand(0,5); - Unit *mob = m_creature->SummonCreature(CR_SP_RIDER, UndeadX[i], UndeadY[i], UndeadZ[i], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); - if(mob) mob->AddThreat(killer, 1.0f); - } + pSummon->AI()->AttackStart(SelectUnit(SELECT_TARGET_RANDOM,0)); } void UpdateAI(const uint32 diff) @@ -455,61 +208,98 @@ struct MANGOS_DLL_DECL mob_gothik_rider_addAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if(m_creature->GetEntry()==CR_UN_RIDER) + if (SummonPhase) { - if(VolleyTimer < diff) + if (HarvestSoul_Timer < diff) { - //hit only targets with shadow mark - /*Unit* target = NULL; - std::list::iterator i = m_creature->getThreatManager().getThreatList().begin(); - for (i = m_creature->getThreatManager().getThreatList().begin(); i!=m_creature->getThreatManager().getThreatList().end(); ++i) + DoCast(m_creature, SPELL_HARVESTSOUL); + HarvestSoul_Timer = 15000 + rand()%1000; + }else HarvestSoul_Timer -= diff; + + if (ShadowBolt_Timer < diff) + { + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_SHADOWBOLT : H_SPELL_SHADOWBOLT); + ShadowBolt_Timer = 1000 + rand()%500; + }else ShadowBolt_Timer -= diff; + + if (Blink_Timer < diff) + { + if (BlinkPhase) { - target = Unit::GetUnit((*m_creature),(*i)->getUnitGuid()); - if(target && target->isAlive() && target->HasAura(SP_SHADOW_MARK)) - DoCast(target, Regular ? SP_SHADOW_VOLLEY : H_SP_SHADOW_VOLLEY); - }*/ - DoCast(m_creature->getVictim(), Regular ? SP_SHADOW_VOLLEY : H_SP_SHADOW_VOLLEY); - VolleyTimer = 10000+rand()%10000; - } - else VolleyTimer -= diff; + m_creature->GetMap()->CreatureRelocation(m_creature, PosGroundLive[0], PosGroundLive[1], PosGroundLive[2], 0.0f); + BlinkPhase = false; + } + else + { + m_creature->GetMap()->CreatureRelocation(m_creature, PosGroundDeath[0], PosGroundDeath[1], PosGroundDeath[2], 0.0f); + BlinkPhase = true; + } + DoResetThreat(); + Blink_Timer = 15000; + }else Blink_Timer -= diff; } else { - if(DrainTimer < diff) + if (Summon_Timer < diff) { - Unit *target = SelectUnit(SELECT_TARGET_TOPAGGRO, 0); - if(target) DoCast(target, Regular ? SP_DRAIN_LIFE : H_SP_DRAIN_LIFE); - DrainTimer = 10000+rand()%10000; - } - else DrainTimer -= diff; + if(waves[waveCount].entry) + { + for(uint32 i = 0; i < waves[waveCount].number; ++i) + { + uint8 SummonLoc = rand()%POS_LIVE; + if (Creature* pTemp = m_creature->SummonCreature(waves[waveCount].entry, PosSummonLive[SummonLoc][0], PosSummonLive[SummonLoc][1], PosSummonLive[SummonLoc][2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000)) + SummonsList.push_back(pTemp->GetGUID()); + } + Summon_Timer = waves[waveCount].time; + ++waveCount; + } + else + { + DoScriptText(SAY_TELEPORT, m_creature); + uint8 SummonLoc = rand()%POS_LIVE; + m_creature->GetMap()->CreatureRelocation(m_creature, PosSummonLive[SummonLoc][0], PosSummonLive[SummonLoc][1], PosSummonLive[SummonLoc][2], 0.0f); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - /*if(FrenzyTimer < diff) - { - FrenzyTimer = 30000; - } - else FrenzyTimer -= diff;*/ + SummonPhase = true; + } + }else Summon_Timer -= diff; } - DoMeleeAttackIfReady(); + if (SummonDeathCheck_Timer < diff) + { + if (!SummonsList.empty()) + { + for(std::list::iterator itr = SummonsList.begin(); itr != SummonsList.end(); ++itr) + { + if (Creature* pTemp = ((Creature*)Unit::GetUnit(*m_creature, *itr))) + { + if (!pTemp->isAlive()) + { + uint8 SummonLoc = rand()%POS_DEAD; + if (pTemp->GetEntry() == MOB_LIVE_TRAINEE) + m_creature->SummonCreature(MOB_DEAD_TRAINEE, PosSummonDead[SummonLoc][0], PosSummonDead[SummonLoc][1], PosSummonDead[SummonLoc][2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + else if (pTemp->GetEntry() == MOB_LIVE_KNIGHT) + m_creature->SummonCreature(MOB_DEAD_KNIGHT, PosSummonDead[SummonLoc][0], PosSummonDead[SummonLoc][1], PosSummonDead[SummonLoc][2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + else if (pTemp->GetEntry() == MOB_LIVE_RIDER) + { + m_creature->SummonCreature(MOB_DEAD_RIDER, PosSummonDead[SummonLoc][0], PosSummonDead[SummonLoc][1], PosSummonDead[SummonLoc][2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + m_creature->SummonCreature(MOB_DEAD_HORSE, PosSummonDead[SummonLoc][0], PosSummonDead[SummonLoc][1], PosSummonDead[SummonLoc][2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + } + + if (m_pInstance) + if (GameObject* pGate = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GOTHIK_GATE))) + pGate->SetGoState(GO_STATE_ACTIVE); + SummonsList.remove(pTemp->GetGUID()); + break; + } + } + } + } + SummonDeathCheck_Timer = 1000; + }else SummonDeathCheck_Timer -= diff; } }; - -CreatureAI* GetAI_mob_gothik_trainee_addAI(Creature* pCreature) -{ - return new mob_gothik_trainee_addAI(pCreature); -} - -CreatureAI* GetAI_mob_gothik_dk_addAI(Creature* pCreature) -{ - return new mob_gothik_dk_addAI(pCreature); -} - -CreatureAI* GetAI_mob_gothik_rider_addAI(Creature* pCreature) -{ - return new mob_gothik_rider_addAI(pCreature); -} - CreatureAI* GetAI_boss_gothik(Creature* pCreature) { return new boss_gothikAI(pCreature); @@ -522,19 +312,6 @@ void AddSC_boss_gothik() newscript->Name = "boss_gothik"; newscript->GetAI = &GetAI_boss_gothik; newscript->RegisterSelf(); +} - newscript = new Script; - newscript->Name = "mob_gothik_trainee"; - newscript->GetAI = &GetAI_mob_gothik_trainee_addAI; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_gothik_dk"; - newscript->GetAI = &GetAI_mob_gothik_dk_addAI; - newscript->RegisterSelf(); - newscript = new Script; - newscript->Name = "mob_gothik_rider"; - newscript->GetAI = &GetAI_mob_gothik_rider_addAI; - newscript->RegisterSelf(); -} diff --git a/scripts/northrend/naxxramas/boss_grobbulus.cpp b/scripts/northrend/naxxramas/boss_grobbulus.cpp index cd6ac4502..3e3dd563d 100644 --- a/scripts/northrend/naxxramas/boss_grobbulus.cpp +++ b/scripts/northrend/naxxramas/boss_grobbulus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 +/* Copyright (C) 2006 - 2009 ScriptDev2 * 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 @@ -16,105 +16,172 @@ /* ScriptData SDName: Boss_Grobbulus +SDAuthor: ckegg SD%Complete: 0 SDComment: Place holder SDCategory: Naxxramas EndScriptData */ -/*Poison Cloud 26590 -Slime Spray 28157 -Fallout slime 28218 -Mutating Injection 28169 -Enrages 26527*/ - #include "precompiled.h" #include "naxxramas.h" -#define SP_ENRAGE 26662 -#define SP_SLIME_SPRAY 28157 -#define SP_INJECTION 28169 -#define SP_FSPLIME 28218 -#define SP_PCLOUD 26590 +#define SPELL_BOMBARD_SLIME 28280 + +#define SPELL_POISON_CLOUD 28240 +#define SPELL_MUTATING_INJECTION 28169 +#define SPELL_SLIME_SPRAY 28157 +#define H_SPELL_SLIME_SPRAY 54364 +#define SPELL_BERSERK 26662 + +#define MOB_FALLOUT_SLIME 16290 +#define MOB_GROBBOLUS_CLOUD 16363 struct MANGOS_DLL_DECL boss_grobbulusAI : public ScriptedAI { boss_grobbulusAI(Creature* pCreature) : ScriptedAI(pCreature) { - Regular = pCreature->GetMap()->IsRegularDifficulty(); + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - bool Regular; + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; - uint32 EnrageTimer; - uint32 MutatingInjectionTimer; -// uint32 PoisonCloudTimer; - not worked - uint32 SlimeSprayTimer; - uint32 FalloutSplimeTimer; + uint32 PoisonCloud_Timer; + uint32 MutatingInjection_Timer; + uint32 SlimeSpary_Timer; + uint32 Enrage_Timer; void Reset() { - EnrageTimer = 720000; - SlimeSprayTimer = 15000 + rand()%10000; - MutatingInjectionTimer = 10000 + rand()%10000; -// PoisonCloudTimer = 60000; - FalloutSplimeTimer = 45000 + rand()%5000; + PoisonCloud_Timer = 15000; + MutatingInjection_Timer = 20000; + SlimeSpary_Timer = 15000+rand()%15000; + Enrage_Timer = 720000; + + Despawnall(); + if (m_pInstance) + m_pInstance->SetData(TYPE_GROBBULUS, NOT_STARTED); } - void Aggro(Unit *who) {} + void JustDied(Unit* Killer) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_GROBBULUS, DONE); + Despawnall(); + } + + void Despawnall() + { + /* std::list m_pCloud; + GetCreatureListWithEntryInGrid(m_pCloud, m_creature, MOB_GROBBOLUS_CLOUD, DEFAULT_VISIBILITY_INSTANCE); + + if (!m_pCloud.empty()) + for(std::list::iterator itr = m_pCloud.begin(); itr != m_pCloud.end(); ++itr) + { + (*itr)->ForcedDespawn(); + } + + std::list m_pSpray; + GetCreatureListWithEntryInGrid(m_pSpray, m_creature, MOB_FALLOUT_SLIME, DEFAULT_VISIBILITY_INSTANCE); + + if (!m_pSpray.empty()) + for(std::list::iterator iter = m_pSpray.begin(); iter != m_pSpray.end(); ++iter) + { + (*iter)->ForcedDespawn(); + } */ + } + + void Aggro(Unit *who) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_GROBBULUS, IN_PROGRESS); + } + + void SpellHitTarget(Unit *target, const SpellEntry *spell) + { + if(spell->Id == SPELL_SLIME_SPRAY || spell->Id == H_SPELL_SLIME_SPRAY) + { + if (Creature* pTemp = m_creature->SummonCreature(MOB_FALLOUT_SLIME, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000)) + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + { + pTemp->AddThreat(pTarget,0.0f); + pTemp->AI()->AttackStart(pTarget); + } + } + } void UpdateAI(const uint32 diff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if(SlimeSprayTimer < diff) + if (PoisonCloud_Timer < diff) { - DoCast(m_creature, SP_SLIME_SPRAY); - SlimeSprayTimer = 15000 + rand()%10000; - } - else SlimeSprayTimer -= diff; + DoCast(m_creature, SPELL_POISON_CLOUD); + PoisonCloud_Timer = 15000; + }else PoisonCloud_Timer -= diff; - if(MutatingInjectionTimer < diff) + if (MutatingInjection_Timer < diff) { - Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); - if(target) DoCast(target, SP_INJECTION); - MutatingInjectionTimer = 10000 + rand()%10000; - } - else MutatingInjectionTimer -= diff; + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, SPELL_MUTATING_INJECTION); -// if(PoisonCloudTimer < diff) -// { -// Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); -// if(target) DoCast(target, SP_PCLOUD); -// PoisonCloudTimer = 60000; -// } -// else PoisonCloudTimer -= diff; + MutatingInjection_Timer = 20000; + }else MutatingInjection_Timer -= diff; - if(FalloutSplimeTimer < diff) + if (SlimeSpary_Timer < diff) { - Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); - if(target) DoCast(target, SP_FSPLIME); - FalloutSplimeTimer = 45000 + rand()%5000; - } - else FalloutSplimeTimer -= diff; + DoCast(m_creature, m_bIsRegularMode ? SPELL_SLIME_SPRAY : H_SPELL_SLIME_SPRAY); + SlimeSpary_Timer = 15000+rand()%15000; + }else SlimeSpary_Timer -= diff; - if(EnrageTimer < diff) + if (Enrage_Timer < diff) { - DoCast(m_creature, SP_ENRAGE); - EnrageTimer = 120000; - } - else EnrageTimer -= diff; + DoCast(m_creature, SPELL_BERSERK); + Enrage_Timer = 300000; + }else Enrage_Timer -= diff; DoMeleeAttackIfReady(); } }; -CreatureAI* GetAI_boss_grobbulus(Creature *pCreature) +struct MANGOS_DLL_DECL npc_grobbulus_poison_cloudAI : public Scripted_NoMovementAI +{ + npc_grobbulus_poison_cloudAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) + { + Reset(); + } + + uint32 Cloud_Timer; + + void Reset() + { + Cloud_Timer = 1000; + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + } + + void UpdateAI(const uint32 diff) + { + if (Cloud_Timer < diff) + { + DoCast(m_creature, 59116); + Cloud_Timer = 10000; + }else Cloud_Timer -= diff; + } +}; + +CreatureAI* GetAI_boss_grobbulus(Creature* pCreature) { return new boss_grobbulusAI(pCreature); } +CreatureAI* GetAI_npc_grobbulus_poison_cloud(Creature* pCreature) +{ + return new npc_grobbulus_poison_cloudAI(pCreature); +} + void AddSC_boss_grobbulus() { Script *newscript; @@ -122,4 +189,9 @@ void AddSC_boss_grobbulus() newscript->Name = "boss_grobbulus"; newscript->GetAI = &GetAI_boss_grobbulus; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_grobbulus_poison_cloud"; + newscript->GetAI = &GetAI_npc_grobbulus_poison_cloud; + newscript->RegisterSelf(); } diff --git a/scripts/northrend/naxxramas/boss_heigan.cpp b/scripts/northrend/naxxramas/boss_heigan.cpp index 762d10aef..80d08755a 100644 --- a/scripts/northrend/naxxramas/boss_heigan.cpp +++ b/scripts/northrend/naxxramas/boss_heigan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 +/* Copyright (C) 2006 - 2009 ScriptDev2 * 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 @@ -24,26 +24,496 @@ EndScriptData */ #include "precompiled.h" #include "naxxramas.h" -enum +#define SAY_AGGRO1 -1533109 +#define SAY_AGGRO2 -1533110 +#define SAY_AGGRO3 -1533111 +#define SAY_SLAY -1533112 +#define SAY_TAUNT1 -1533113 +#define SAY_TAUNT2 -1533114 +#define SAY_TAUNT3 -1533115 +#define SAY_TAUNT4 -1533116 +#define SAY_TAUNT5 -1533117 +#define SAY_DEATH -1533118 + +//Spell used by floor peices to cause damage to players +#define SPELL_ERUPTION 29371 + +//Spells by boss +#define SPELL_DISRUPTION 29310 +#define SPELL_FEAVER 29998 +#define H_SPELL_FEAVER 55011 +#define SPELL_PLAGUED_CLOUD 29350 + +//Spell by eye stalks +#define SPELL_MIND_FLAY 26143 + +#define POS_X 2793.86 +#define POS_Y -3707.38 +#define POS_Z 276.627 +#define POS_O 0.593 + +#define TRIGGER_X 2769 +#define TRIGGER_Y -3671 +#define TRIGGER_Z 273.667 +#define TRIGGER_O 0 + +struct MANGOS_DLL_DECL boss_heiganAI : public ScriptedAI { - SAY_AGGRO1 = -1533109, - SAY_AGGRO2 = -1533110, - SAY_AGGRO3 = -1533111, - SAY_SLAY = -1533112, - SAY_TAUNT1 = -1533113, - SAY_TAUNT2 = -1533114, - SAY_TAUNT3 = -1533115, - SAY_TAUNT4 = -1533116, - SAY_TAUNT5 = -1533117, - SAY_DEATH = -1533118, - - //Spell used by floor peices to cause damage to players - SPELL_ERUPTION = 29371, - - //Spells by boss - SPELL_WILT = 23772, - SPELL_FEAVER = 29998, - - //Spell by eye stalks - SPELL_MIND_FLAY = 26143 + boss_heiganAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + + uint32 Disruption_Timer; + uint32 Feaver_Timer; + uint32 Erupt_Timer; + uint32 Phase_Timer; + + uint32 eruptSection; + bool eruptDirection; + + uint8 phase; + + void Reset() + { + if(m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + phase = 0; + + if(m_pInstance) + m_pInstance->SetData(TYPE_HEIGAN, NOT_STARTED); + } + + void AttackStart(Unit* pWho) + { + if (!pWho) + return; + + if(phase != 1) + return; + + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho, 0.0f); + DoStartMovement(pWho); + } + + } + void SetPhase(uint8 tPhase) + { + if(tPhase == 0) + { + if(phase == 1) + { + phase++; + } + else if(phase == 2) + { + phase--; + } + else phase = 1; + }else phase = tPhase; + + eruptSection = rand()%4; + + if(phase == 1) + { + m_creature->InterruptNonMeleeSpells(false); + Feaver_Timer = 20000; + Phase_Timer = 85000; + Erupt_Timer = 10000; + Disruption_Timer = 5000+rand()%10000; + if(m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + DoStartMovement(m_creature->getVictim()); + }else if(phase == 2) + { + m_creature->InterruptNonMeleeSpells(true); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->StopMoving(); + m_creature->GetMotionMaster()->Clear(false); + m_creature->GetMotionMaster()->MoveIdle(); + m_creature->MonsterMove(POS_X, POS_Y, POS_Z, 0); + + Erupt_Timer = 5000; + Phase_Timer = 45000; + DoCast(m_creature, SPELL_PLAGUED_CLOUD); + } + } + void Aggro(Unit *who) + { + m_creature->SummonCreature(15384, TRIGGER_X, TRIGGER_Y, TRIGGER_Z, TRIGGER_O, TEMPSUMMON_DEAD_DESPAWN, 0); + SetPhase(1); + switch (rand()%3) + { + case 0: DoScriptText(SAY_AGGRO1, m_creature); break; + case 1: DoScriptText(SAY_AGGRO2, m_creature); break; + case 2: DoScriptText(SAY_AGGRO3, m_creature); break; + } + + if(m_pInstance) + m_pInstance->SetData(TYPE_HEIGAN, IN_PROGRESS); + } + + void KilledUnit(Unit* victim) + { + DoScriptText(SAY_SLAY, m_creature); + } + + void JustDied(Unit* Killer) + { + DoScriptText(SAY_DEATH, m_creature); + + if(m_pInstance) + m_pInstance->SetData(TYPE_HEIGAN, DONE); + } + + void UpdateAI(const uint32 diff) + { + if(phase == 0) + return; + + if (Phase_Timer < diff) + { + SetPhase(0); + }else Phase_Timer -= diff; + + /* if (Erupt_Timer < diff) + { + m_pInstance->SetData(DATA_HEIGAN_ERUPT, eruptSection); + + if (eruptSection == 0) + eruptDirection = true; + else if (eruptSection == 3) + eruptDirection = false; + + eruptDirection ? ++eruptSection : --eruptSection; + if(phase == 1) + { + Erupt_Timer = 10000; + }else Erupt_Timer = 3000; + }else Erupt_Timer -= diff; */ + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim() || phase != 1) + return; + + if (Disruption_Timer < diff) + { + DoCast(m_creature->getVictim(), SPELL_DISRUPTION); + Disruption_Timer = 5000+rand()%10000; + }else Disruption_Timer -= diff; + + if (Feaver_Timer < diff) + { + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_FEAVER : H_SPELL_FEAVER); + Feaver_Timer = 30000+rand()%10000; + }else Feaver_Timer -= diff; + + DoMeleeAttackIfReady(); + } }; + +struct MANGOS_DLL_DECL npc_heigan_eruptionAI : public ScriptedAI +{ + npc_heigan_eruptionAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + Reset(); + } + ScriptedInstance* pInstance; + + uint32 phase; + uint32 safeSpot; + uint32 fastTimer; + uint32 phaseTimer; + uint32 slowTimer; + bool forward; + std::list GetGameObjectsByEntry(uint32 entry) + { + CellPair pair(MaNGOS::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY())); + Cell cell(pair); + cell.data.Part.reserved = ALL_DISTRICT; + cell.SetNoCreate(); + + std::list gameobjectList; + + AllGameObjectsWithEntryInRange check(m_creature, entry, 100); + MaNGOS::GameObjectListSearcher searcher(m_creature, gameobjectList, check); + TypeContainerVisitor, GridTypeMapContainer> visitor(searcher); + + cell.Visit(pair, visitor, *(m_creature->GetMap())); + + return gameobjectList; + } + //Let's Dance! + void DoErupt(uint32 safePlace) + { + uint64 heiganGUID = pInstance->GetData64(NPC_HEIGAN); + Map::PlayerList const &PlList = pInstance->instance->GetPlayers(); + if (PlList.isEmpty()) + return; + + if(safePlace != 1) + { + std::list eruptGOs = GetGameObjectsByEntry(181678); + //Visual part of eruption + for (int32 i = 181510; i <= 181526; i++) + { + if (i == 181513 || i == 181512 || i == 181511 || i == 181525 || i == 181514 || i == 181515 || i == 181516) + continue; + std::list visualGO = GetGameObjectsByEntry(i); + for (std::list::iterator itr = visualGO.begin(); itr != visualGO.end(); ++itr) + { + if((*itr)) + //Required GO Custom Animation Patch for this + { + WorldPacket data(SMSG_GAMEOBJECT_CUSTOM_ANIM,8+4); + data << (*itr)->GetGUID(); + data << 0; + (*itr)->SendMessageToSet(&data,true); + } + } + } + //Damage part of eruption + for (std::list::iterator itr = eruptGOs.begin(); itr != eruptGOs.end(); ++itr) + { + if(!(*itr)) + continue; + for(Map::PlayerList::const_iterator i = PlList.begin(); i != PlList.end(); ++i) + { + if (Player* pPlayer = i->getSource()) + { + if (pPlayer->isGameMaster()) + continue; + + if (pPlayer->isAlive()) + { + if(pPlayer->GetDistance((*itr)) <= 4.0f) + //We use originalCaster for deal damage by Plague Fissure + DoCast(pPlayer, SPELL_ERUPTION, true); + } + } + } + } + } + //Change direction of dance + else forward = true; + if(safePlace != 2) + { + std::list eruptGOs = GetGameObjectsByEntry(181676); + for (int32 i = 181511; i <= 181531; i++) + { + if ((i > 181516 && i < 181525) || (i == 181526)) + continue; + std::list visualGO = GetGameObjectsByEntry(i); + for (std::list::iterator itr = visualGO.begin(); itr != visualGO.end(); ++itr) + { + if((*itr)) + { + WorldPacket data(SMSG_GAMEOBJECT_CUSTOM_ANIM,8+4); + data << (*itr)->GetGUID(); + data << 0; + (*itr)->SendMessageToSet(&data,true); + } + } + } + for (std::list::iterator itr = eruptGOs.begin(); itr != eruptGOs.end(); ++itr) + { + if(!(*itr)) + continue; + for(Map::PlayerList::const_iterator i = PlList.begin(); i != PlList.end(); ++i) + { + if (Player* pPlayer = i->getSource()) + { + if (pPlayer->isGameMaster()) + continue; + + if (pPlayer->isAlive()) + { + if(pPlayer->GetDistance((*itr)) <= 4.0f) + DoCast(pPlayer, SPELL_ERUPTION, true); + } + } + } + } + } + if(safePlace != 3) + { + std::list eruptGOs = GetGameObjectsByEntry(181677); + for (int32 i = 181532; i <= 181545; i++) + { + if (i >= 181537 && i <= 181539) + continue; + std::list visualGO = GetGameObjectsByEntry(i); + for (std::list::iterator itr = visualGO.begin(); itr != visualGO.end(); ++itr) + { + if((*itr)) + { + WorldPacket data(SMSG_GAMEOBJECT_CUSTOM_ANIM,8+4); + data << (*itr)->GetGUID(); + data << 0; + (*itr)->SendMessageToSet(&data,true); + } + } + } + for (std::list::iterator itr = eruptGOs.begin(); itr != eruptGOs.end(); ++itr) + { + if(!(*itr)) + continue; + for(Map::PlayerList::const_iterator i = PlList.begin(); i != PlList.end(); ++i) + { + if (Player* pPlayer = i->getSource()) + { + if (pPlayer->isGameMaster()) + continue; + + if (pPlayer->isAlive()) + { + if(pPlayer->GetDistance((*itr)) <= 4.0f) + DoCast(pPlayer, SPELL_ERUPTION, true); + } + } + } + } + } + if(safePlace != 4) + { + std::list eruptGOs = GetGameObjectsByEntry(181695); + for (int32 i = 181537; i <= 181552; i++) + { + if (i > 181539 && i < 181545) + continue; + std::list visualGO = GetGameObjectsByEntry(i); + for (std::list::iterator itr = visualGO.begin(); itr != visualGO.end(); ++itr) + { + if((*itr)) + { + WorldPacket data(SMSG_GAMEOBJECT_CUSTOM_ANIM,8+4); + data << (*itr)->GetGUID(); + data << 0; + (*itr)->SendMessageToSet(&data,true); + } + } + } + for (std::list::iterator itr = eruptGOs.begin(); itr != eruptGOs.end(); ++itr) + { + if(!(*itr)) + continue; + for(Map::PlayerList::const_iterator i = PlList.begin(); i != PlList.end(); ++i) + { + if (Player* pPlayer = i->getSource()) + { + if (pPlayer->isGameMaster()) + continue; + + if (pPlayer->isAlive()) + { + if(pPlayer->GetDistance((*itr)) <= 4.0f) + DoCast(pPlayer, SPELL_ERUPTION, true); + } + } + } + } + //Let's dance back! + }else forward=false; + } + + void Reset() + { + phase = 1; + safeSpot = 1; + fastTimer = 3500; + slowTimer = 10500; + phaseTimer = 90000; + } + void Aggro(Unit* who) + { + //This is just for dance. It doesn't attack anybody. + DoStopAttack(); + SetCombatMovement(false); + } + void JustDied(Unit* who) + { + //If dance mob was somehow killed - respawn him. + m_creature->Respawn(); + } + void UpdateAI(const uint32 diff) + { + if(m_creature->GetMapId() != 533) + return; + + if(pInstance->GetData(TYPE_HEIGAN) != IN_PROGRESS) + { + m_creature->ForcedDespawn(); + } + + if (phase == 1) + { + if(phaseTimer < diff) + { + // Let's fast dance + phase = 2; + phaseTimer = 45000; + safeSpot = 1; + }else phaseTimer-=diff; + if(slowTimer < diff) + { + DoErupt(safeSpot); + if(forward) + safeSpot++; + else + safeSpot--; + slowTimer = 10500; + }else slowTimer-=diff; + } + else if(phase == 2) + { + if(phaseTimer < diff) + { + // Slow dance again + phase = 1; + AttackStart(m_creature->getVictim()); + phaseTimer = 90000; + safeSpot = 1; + }else phaseTimer-=diff; + if(fastTimer < diff) + { + DoErupt(safeSpot); + if(forward) + safeSpot++; + else + safeSpot--; + fastTimer = 3500; + }else fastTimer-=diff; + } + } +}; + +CreatureAI* GetAI_boss_heigan(Creature* pCreature) +{ + return new boss_heiganAI(pCreature); +} + +CreatureAI* GetAI_npc_heigan_eruptionAI(Creature* pCreature) +{ + return new npc_heigan_eruptionAI(pCreature); +} + +void AddSC_boss_heigan() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_heigan"; + newscript->GetAI = &GetAI_boss_heigan; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_heigan_eruption"; + newscript->GetAI = &GetAI_npc_heigan_eruptionAI; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/naxxramas/boss_kelthuzad.cpp b/scripts/northrend/naxxramas/boss_kelthuzad.cpp index 45ec6ec5c..89140f795 100644 --- a/scripts/northrend/naxxramas/boss_kelthuzad.cpp +++ b/scripts/northrend/naxxramas/boss_kelthuzad.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 +/* Copyright (C) 2006 - 2009 ScriptDev2 * 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 @@ -14,331 +14,519 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +/* ScriptData +SDName: Boss_KelThuzud +SD%Complete: 0 +SDComment: VERIFY SCRIPT +SDCategory: Naxxramas +EndScriptData */ + #include "precompiled.h" #include "naxxramas.h" +enum +{ + //when shappiron dies. dialog between kel and lich king (in this order) + SAY_SAPP_DIALOG1 = -1533084, + SAY_SAPP_DIALOG2_LICH = -1533085, + SAY_SAPP_DIALOG3 = -1533086, + SAY_SAPP_DIALOG4_LICH = -1533087, + SAY_SAPP_DIALOG5 = -1533088, + + //when cat dies + SAY_CAT_DIED = -1533089, + + //when each of the 4 wing bosses dies + SAY_TAUNT1 = -1533090, + SAY_TAUNT2 = -1533091, + SAY_TAUNT3 = -1533092, + SAY_TAUNT4 = -1533093, + + SAY_SUMMON_MINIONS = -1533105, //start of phase 1 + + SAY_AGGRO1 = -1533094, //start of phase 2 + SAY_AGGRO2 = -1533095, + SAY_AGGRO3 = -1533096, + + SAY_SLAY1 = -1533097, + SAY_SLAY2 = -1533098, + + SAY_DEATH = -1533099, + + SAY_CHAIN1 = -1533100, + SAY_CHAIN2 = -1533101, + SAY_FROST_BLAST = -1533102, -//emotes -#define SAY_SUMMON_MINIONS -1533105 + SAY_REQUEST_AID = -1533103, //start of phase 3 + SAY_ANSWER_REQUEST = -1533104, //lich king answer -#define SAY_REQUEST_AID -1533103 -#define SAY_ANSWER_REQUEST -1533104 + SAY_SPECIAL1_MANA_DET = -1533106, + SAY_SPECIAL3_MANA_DET = -1533107, + SAY_SPECIAL2_DISPELL = -1533108, -#define SAY_AGGRO1 -1533094 -#define SAY_AGGRO2 -1533095 -#define SAY_AGGRO3 -1533096 + //spells to be casted + SPELL_FROST_BOLT = 28478, + H_SPELL_FROST_BOLT = 55802, + SPELL_FROST_BOLT_VOLLEY = 28479, + H_SPELL_FROST_BOLT_VOLLEY = 55807, -#define SAY_DEATH -1533099 + SPELL_CHAINS_OF_KELTHUZAD = 28410, //casted spell should be 28408. Also as of 303, heroic only + SPELL_MANA_DETONATION = 27819, + SPELL_SHADOW_FISURE = 27810, + SPELL_FROST_BLAST = 27808, -//summoned creatures -#define CR_SKELETON 16427 -#define CR_BANSHEE 16429 -#define CR_ABOMINATION 16428 -#define CR_GUARDIAN 16441 + NPC_SOLDIERS_FROZEN_WASTES = 16427, + NPC_UNSTOPPABLE_ABOMINATIONS= 16428, + NPC_SOUL_WEAVERS = 16429, -//Kel'Thuzad spells -#define SP_FROSTBOLT 28478 -#define H_SP_FROSTBOLT 55802 -#define SP_FROSTBOLT_VOLLEY 28479 -#define H_SP_FROSTBOLT_VOLLEY 55807 -#define SP_FROST_BLAST 27808 -#define SP_DETONATE_MANA 27819 -#define SP_SHADOW_FISSURE 27810 + NPC_GUARDIAN = 16441, +}; //Positional defines -#define ADDX_LEFT_FAR 3783.272705f -#define ADDY_LEFT_FAR -5062.697266f -#define ADDZ_LEFT_FAR 143.711203f -#define ADDO_LEFT_FAR 3.617599f - -#define ADDX_LEFT_MIDDLE 3730.291260f -#define ADDY_LEFT_MIDDLE -5027.239258f -#define ADDZ_LEFT_MIDDLE 143.956909f -#define ADDO_LEFT_MIDDLE 4.461900f - -#define ADDX_LEFT_NEAR 3683.868652f -#define ADDY_LEFT_NEAR -5057.281250f -#define ADDZ_LEFT_NEAR 143.183884f -#define ADDO_LEFT_NEAR 5.237086f - -#define ADDX_RIGHT_FAR 3759.355225f -#define ADDY_RIGHT_FAR -5174.128418f -#define ADDZ_RIGHT_FAR 143.802383f -#define ADDO_RIGHT_FAR 2.170104f - -#define ADDX_RIGHT_MIDDLE 370.724365f -#define ADDY_RIGHT_MIDDLE -5185.123047f -#define ADDZ_RIGHT_MIDDLE 143.928024f -#define ADDO_RIGHT_MIDDLE 1.309310f - -#define ADDX_RIGHT_NEAR 3665.121094f -#define ADDY_RIGHT_NEAR -5138.679199f -#define ADDZ_RIGHT_NEAR 143.183212f -#define ADDO_RIGHT_NEAR 0.604023f - -#define WALKX_LEFT_FAR 3754.431396f -#define WALKY_LEFT_FAR -5080.727734f -#define WALKZ_LEFT_FAR 142.036316f -#define WALKO_LEFT_FAR 3.736189f - -#define WALKX_LEFT_MIDDLE 3724.396484f -#define WALKY_LEFT_MIDDLE -5061.330566f -#define WALKZ_LEFT_MIDDLE 142.032700f -#define WALKO_LEFT_MIDDLE 4.564785f - -#define WALKX_LEFT_NEAR 3687.158424f -#define WALKY_LEFT_NEAR -5076.834473f -#define WALKZ_LEFT_NEAR 142.017319f -#define WALKO_LEFT_NEAR 5.237086f - -#define WALKX_RIGHT_FAR 3687.571777f -#define WALKY_RIGHT_FAR -5126.831055f -#define WALKZ_RIGHT_FAR 142.017807f -#define WALKO_RIGHT_FAR 0.604023f - -#define WALKX_RIGHT_MIDDLE 3707.990733f -#define WALKY_RIGHT_MIDDLE -5151.450195f -#define WALKZ_RIGHT_MIDDLE 142.032562f -#define WALKO_RIGHT_MIDDLE 1.376855f - -#define WALKX_RIGHT_NEAR 3739.500000f -#define WALKY_RIGHT_NEAR -5141.883989f -#define WALKZ_RIGHT_NEAR 142.0141130f -#define WALKO_RIGHT_NEAR 2.121412f +const float AddPos[6][4] = +{ + {3769.2, -5071.6, 143.7, 3.6}, + {3729.3, -5044.24, 143.96, 4.5}, + {3683.87, -5057.28, 143.18, 5.2}, + {3749.35, -5158.12, 143.8, 2.2}, + {3703.73, -5169.12, 143.93, 1.3}, + {3665.12, -5138.68, 143.18, 0.6}, +}; + +const float MovePos[6][4] = +{ + {3754.4, -5080.73, 142.03, 3.7}, + {3724.39, -5061.33, 142.03, 4.6}, + {3687.16, -5076.83, 142.02, 5.2}, + {3687.57, -5126.83, 142.01, 0.6}, + {3707.99, -5151.45, 142.03, 1.4}, + {3739.5, -5141.88, 142.01, 2.1}, +}; + +const float Middle[3] = {3716.384, -5106.453, 142}; +const float Home[2] = {3748, -5113}; struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI { - boss_kelthuzadAI(Creature* c) : ScriptedAI(c) + boss_kelthuzadAI(Creature* pCreature) : ScriptedAI(pCreature) { - pInstance = (ScriptedInstance*)c->GetInstanceData(); - Regular = m_creature->GetMap()->IsRegularDifficulty(); - MaxGuardians = Regular ? 2 : 4; + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - - //Variables - ScriptedInstance* pInstance; - bool Regular; - uint32 phase; - uint32 Phase1_Timer; - // - uint32 Skeleton_Timer; - uint32 Abomination_Timer; - uint32 Banshee_Timer; - // - uint32 Frostbolt_Timer; - uint32 FrostboltV_Timer; + ScriptedInstance *m_pInstance; + bool m_bIsRegularMode; + + std::list m_lSummonsGUIDList; + std::list::iterator m_uiSendSummon; + + uint32 GuardiansOfIcecrown_Timer; + uint32 GuardiansOfIcecrown_Count; + uint32 GuardiansOfIcecrown_Max; + uint32 FrostBolt_Timer; + uint32 FrostBoltVolley_Timer; + uint32 ChainsOfKelthuzad_Timer; + uint32 ManaDetonation_Timer; + uint32 ShadowFisure_Timer; uint32 FrostBlast_Timer; - uint32 DetonateMana_Timer; - uint32 ShadowFissure_Timer; - // - uint64 Guardians[4]; - uint32 Guardian_Count; - uint32 MaxGuardians; - uint32 Guardian_Timer; - //adds coords - float AddX[6]; - float AddY[6]; - float AddZ[6]; + uint32 ChainsOfKelthuzad_Targets; + uint32 Phase1_Timer; + uint32 Phase1Encounter_Timer; + uint32 DropChains_Timer; + bool SendSummon; + bool Phase1; + bool Phase2; + bool PhaseGuardian; + bool DropChains_Check; void Reset() { - phase = 1; - Phase1_Timer = 220000; // 3m 40s - - AddX[0] = 3783.272705; AddY[0] = -5062.697266; AddZ[0] = 143.711203; //left far - AddX[1] = 3759.355225; AddY[1] = -5174.128418; AddZ[1] = 143.802383; //right far - AddX[2] = 3730.291260; AddY[2] = -5027.239258; AddZ[2] = 143.956909; //left middle - AddX[3] = 3700.724365; AddY[3] = -5185.123047; AddZ[3] = 143.928024; //right middle - AddX[4] = 3683.868652; AddY[4] = -5057.281250; AddZ[4] = 143.183884; //left near - AddX[5] = 3665.121094; AddY[5] = -5138.679199; AddZ[5] = 143.183212; //right near - - Skeleton_Timer = 5000; - Abomination_Timer = 30000; - Banshee_Timer = 15000; - - Frostbolt_Timer = 5000 + rand()%10000; - FrostboltV_Timer = 15000 + rand()%5000; - FrostBlast_Timer = 30000 + rand()%30000; - DetonateMana_Timer = 30000 + rand()%30000; - ShadowFissure_Timer = 15000 + rand()%25000; - - Guardian_Timer = 8000; - Guardian_Count = 0; - Guardians[0] = 0; - Guardians[1] = 0; - Guardians[2] = 0; - Guardians[3] = 0; - - SetCombatMovement(false); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - - if(pInstance) pInstance->SetData(TYPE_KELTHUZAD, NOT_STARTED); + FrostBolt_Timer = urand(20000, 25000); //Frostbolt casted every 20-25 sec + FrostBoltVolley_Timer = 15000; //Frostbolt Volley casted every 15 sec + ChainsOfKelthuzad_Timer = urand(40000, 50000); //Posses casted every 40-50 sec + ManaDetonation_Timer = 20000; //Mana Detionation casted every 20 sec + ShadowFisure_Timer = 25000; //Shadow Fissure spawned every 25 sec + FrostBlast_Timer = (rand()%30+30)*1000; //Random time between 30-60 seconds + GuardiansOfIcecrown_Timer = 5000; //5 seconds for summoning each Guardian of Icecrown in phase 3 + GuardiansOfIcecrown_Max = m_bIsRegularMode ? 2 : 4; + GuardiansOfIcecrown_Count = 0; + Phase1 = false; + Phase2 = false; + PhaseGuardian = false; + DropChains_Check = false; + + DespawnSummons(); + + Phase1_Timer = 228000; //Phase 1 lasts 3 minutes and 48 seconds + Phase1Encounter_Timer = 3000; + SendSummon = false; + + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + + if (m_pInstance) + m_pInstance->SetData(TYPE_KELTHUZAD, NOT_STARTED); } - void Aggro(Unit *unit) + void KilledUnit() { - DoScriptText(SAY_SUMMON_MINIONS, m_creature); - - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - - if(pInstance) pInstance->SetData(TYPE_KELTHUZAD, IN_PROGRESS); + if (rand()%2) + DoScriptText(SAY_SLAY1, m_creature); + else + DoScriptText(SAY_SLAY2, m_creature); } - void JustDied(Unit* Killer) //despawn guardians here + void JustDied(Unit* Killer) { DoScriptText(SAY_DEATH, m_creature); - if(pInstance) pInstance->SetData(TYPE_KELTHUZAD, DONE); - for(int i=0; i<4; i++) + + if (m_pInstance) + m_pInstance->SetData(TYPE_KELTHUZAD, DONE); + + DespawnSummons(); + } + + void MoveInLineOfSight(Unit* who) + { + if (!who) + return; + + if (Phase1 || Phase2) + return; + + if (who->isTargetableForAttack() && who->GetTypeId() == TYPEID_PLAYER && m_creature->GetDistance2d(who) <= 50) { - if(Guardians[i]) + m_creature->AddThreat(who, 0.0f); + m_creature->SetInCombatWith(who); + + for(uint8 i = 0; i <= 80; ++i) { - Unit* guard = Unit::GetUnit((*m_creature), Guardians[i]); - if(guard && guard->isAlive()) - guard->DealDamage(guard, guard->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + if (i == 5 || i == 15 || i == 25 || i == 35 || i == 45 || i == 55 || i == 65 || i == 75) + DoSpawnAdds(NPC_SOUL_WEAVERS); + else if (i == 10 || i == 20 || i == 30 || i == 40 || i == 50 || i == 60 || i == 70 || i == 80) + DoSpawnAdds(NPC_UNSTOPPABLE_ABOMINATIONS); + else + DoSpawnAdds(NPC_SOLDIERS_FROZEN_WASTES); } + if (!m_lSummonsGUIDList.empty()) + { + m_uiSendSummon = m_lSummonsGUIDList.begin(); + SendSummon = true; + } + Phase1 = true; } } - void UpdateAI(const uint32 diff) + void Aggro(Unit* who) { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + switch(rand()%3) + { + case 0: DoScriptText(SAY_AGGRO1, m_creature); break; + case 1: DoScriptText(SAY_AGGRO2, m_creature); break; + case 2: DoScriptText(SAY_AGGRO3, m_creature); break; + } + + if (m_pInstance) + m_pInstance->SetData(TYPE_KELTHUZAD, IN_PROGRESS); + } + + void AttackStart(Unit* pWho) + { + if (!pWho) + return; + + if (Phase1) return; - if(phase==1) + if (m_creature->Attack(pWho, true)) { - if(Phase1_Timer < diff) - { - switch(rand()%3) - { - case 0: DoScriptText(SAY_AGGRO1, m_creature); break; - case 1: DoScriptText(SAY_AGGRO2, m_creature); break; - case 2: DoScriptText(SAY_AGGRO3, m_creature); break; - } - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - SetCombatMovement(true); - phase = 2; - } - else Phase1_Timer -= diff; + m_creature->AddThreat(pWho, 0.0f); + m_creature->SetInCombatWithZone(); + DoStartMovement(pWho); + } + } - if(Skeleton_Timer < diff) - { - int i = irand(0,5); - Unit *mob = m_creature->SummonCreature(CR_SKELETON, AddX[i], AddY[i], AddZ[i], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); - Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0); - mob->AddThreat(target, 1.0f); - mob->GetMotionMaster()->MoveChase(target); - Skeleton_Timer = 5000; - } - else Skeleton_Timer -= diff; + void DoSpawnAdds(uint32 uiEntry) + { + int8 Pos = rand()%6; + if (Creature* pTemp = m_creature->SummonCreature(uiEntry, AddPos[Pos][0]-5 + rand()%10, AddPos[Pos][1]-5 + rand()%10, AddPos[Pos][2], 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000)) + m_lSummonsGUIDList.push_back(pTemp->GetGUID()); + } + + void DespawnSummons() + { + if (m_lSummonsGUIDList.empty()) + return; - if(Abomination_Timer < diff) + for(std::list::iterator itr = m_lSummonsGUIDList.begin(); itr != m_lSummonsGUIDList.end(); ++itr) + { + if (Creature* pTemp = (Creature*)Unit::GetUnit(*m_creature, *itr)) + if (pTemp->isAlive()) + pTemp->ForcedDespawn(); + } + + m_lSummonsGUIDList.clear(); + + std::list m_pGuardian; + GetCreatureListWithEntryInGrid(m_pGuardian, m_creature, NPC_GUARDIAN, DEFAULT_VISIBILITY_INSTANCE); + + if (!m_pGuardian.empty()) + for(std::list::iterator itr = m_pGuardian.begin(); itr != m_pGuardian.end(); ++itr) { - int i = irand(0,5); - Unit *mob = m_creature->SummonCreature(CR_ABOMINATION, AddX[i], AddY[i], AddZ[i], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); - Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0); - mob->AddThreat(target, 1.0f); - mob->GetMotionMaster()->MoveChase(target); - Abomination_Timer = Regular ? (40000+rand()%15000) : (30000+rand()%15000); + (*itr)->ForcedDespawn(); } - else Abomination_Timer -= diff; + } - if(Banshee_Timer < diff) + void Possess() + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,1)) + { + pTarget->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED); + pTarget->setFaction(pTarget->getFaction()); + } + } + + void UpdateAI(const uint32 diff) + { + // First Phase + if (Phase1) + { + if (SendSummon) { - int i = irand(0,5); - Unit *mob = m_creature->SummonCreature(CR_BANSHEE, AddX[i], AddY[i], AddZ[i], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); - Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0); - mob->AddThreat(target, 1.0f); - mob->GetMotionMaster()->MoveChase(target); - Banshee_Timer = Regular ? (20000+rand()%15000) : (17000+rand()%10000); + if (Phase1Encounter_Timer < diff) + { + if (m_lSummonsGUIDList.empty()) + return; + + if (m_uiSendSummon != m_lSummonsGUIDList.end()) + { + if (Creature* pTemp = (Creature*)Unit::GetUnit(*m_creature, *m_uiSendSummon)) + if (pTemp->isAlive() && !pTemp->getVictim()) + pTemp->GetMotionMaster()->MovePoint(0, Middle[0], Middle[1], Middle[2]); + ++m_uiSendSummon; + Phase1Encounter_Timer = 3000; + } + else + SendSummon = false; + + }else Phase1Encounter_Timer -= diff; } - else Banshee_Timer -= diff; + + if (Phase1_Timer < diff) + { + if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + AttackStart(m_creature->getVictim()); + Phase1 = false; + Phase2 = true; + }else Phase1_Timer -= diff; + return; } - if(phase==2 || phase==3) + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + //Spell casting for second and third Phase + if(Phase2) { - //Frostbolt Volley - if(FrostboltV_Timer < diff) + //start phase 3 when we are 40% health + if (!PhaseGuardian && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 40) { - DoCast(m_creature->getVictim(), Regular ? SP_FROSTBOLT_VOLLEY : H_SP_FROSTBOLT_VOLLEY); - FrostboltV_Timer = 15000 + rand()%5000; + PhaseGuardian = true; + DoScriptText(SAY_REQUEST_AID, m_creature); + //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, m_creature); } - else FrostboltV_Timer -= diff; - //Frost Blast - if(FrostBlast_Timer < diff) + //Check for Frost Bolt + if (FrostBolt_Timer < diff) { - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(target, SP_FROST_BLAST); - FrostBlast_Timer = 40000 + rand()%20000; - } - else FrostBlast_Timer -= diff; + m_creature->CastSpell(m_creature->getVictim(), m_bIsRegularMode ? SPELL_FROST_BOLT : H_SPELL_FROST_BOLT, true); + FrostBolt_Timer = urand(20000, 25000); + }else FrostBolt_Timer -= diff; - if(ShadowFissure_Timer < diff) + //Check for Frost Bolt Volley + if (FrostBoltVolley_Timer < diff) { - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(target, SP_SHADOW_FISSURE); - ShadowFissure_Timer = 15000 + rand()%25000; - } - else ShadowFissure_Timer -= diff; + m_creature->CastSpell(m_creature, m_bIsRegularMode ? SPELL_FROST_BOLT_VOLLEY : H_SPELL_FROST_BOLT_VOLLEY, true); + FrostBoltVolley_Timer = 15000; + }else FrostBoltVolley_Timer -= diff; - //Detonate Mana - if(DetonateMana_Timer < diff) + //Check for Chains Of Kelthuzad + if (ChainsOfKelthuzad_Timer < diff && !m_bIsRegularMode) { - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(target, SP_DETONATE_MANA); - DetonateMana_Timer = 30000 + rand()%30000; - } - else DetonateMana_Timer -= diff; + //DoCast(m_creature->getVictim(),SPELL_CHAINS_OF_KELTHUZAD); + Possess(); + Possess(); + Possess(); + + if (rand()%2) + DoScriptText(SAY_CHAIN1, m_creature); + else + DoScriptText(SAY_CHAIN2, m_creature); + + ChainsOfKelthuzad_Timer = (rand()%30+30)*1000; + DropChains_Timer = 20000; + DropChains_Check = true; + }else ChainsOfKelthuzad_Timer -= diff; + + //Restore faction + if (DropChains_Timer < diff && DropChains_Check) + { + Map* pMap = m_creature->GetMap(); + Map::PlayerList const &lPlayers = pMap->GetPlayers(); + if (!lPlayers.isEmpty()) + for(Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr) + { + if (Player* pPlayer = itr->getSource()) + { + pPlayer->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED); + pPlayer->setFactionForRace(pPlayer->getRace()); + } + } + DropChains_Check = false; + }else DropChains_Timer -= diff; - //Frostbolt - if(Frostbolt_Timer < diff) + //Check for Mana Detonation + if (ManaDetonation_Timer < diff) { - DoCast(m_creature->getVictim(), Regular ? SP_FROSTBOLT : H_SP_FROSTBOLT); - Frostbolt_Timer = 5000 + rand()%10000; - } - else Frostbolt_Timer -= diff; - } + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,1)) + if (pTarget->getPowerType() == POWER_MANA) + { + int32 curPower = pTarget->GetPower(POWER_MANA); + if (curPower < (m_bIsRegularMode ? 4000 : 5500)) + return; + + m_creature->CastSpell(pTarget,SPELL_MANA_DETONATION, true); + int32 manareduction = m_bIsRegularMode ? urand(2500,4000) : urand(3500,5500); + int32 mana = curPower - manareduction; + pTarget->SetPower(POWER_MANA, mana); + + Map *map = m_creature->GetMap(); + if (map->IsDungeon()) + { + Map::PlayerList const &PlayerList = map->GetPlayers(); + + if (!PlayerList.isEmpty()) + + for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) + { + if (i->getSource()->isAlive() && pTarget->GetDistance2d(i->getSource()->GetPositionX(), i->getSource()->GetPositionY()) < 15) + i->getSource()->DealDamage(i->getSource(), manareduction, NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, true); + } + } + } + + if (rand()%2) + DoScriptText(SAY_SPECIAL1_MANA_DET, m_creature); + + ManaDetonation_Timer = 15000; + }else ManaDetonation_Timer -= diff; + + //Check for Shadow Fissure + if (ShadowFisure_Timer < diff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,1)) + DoCast(pTarget,SPELL_SHADOW_FISURE); + + if (rand()%2) + DoScriptText(SAY_SPECIAL3_MANA_DET, m_creature); + + ShadowFisure_Timer = 25000; + }else ShadowFisure_Timer -= diff; + + //Check for Frost Blast + if (FrostBlast_Timer < diff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,1)) + m_creature->CastSpell(pTarget,SPELL_FROST_BLAST,true); + + if (rand()%2) + DoScriptText(SAY_FROST_BLAST, m_creature); - if (phase!=3 && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 40) + FrostBlast_Timer = urand(40000,50000); + }else FrostBlast_Timer -= diff; + } + + //Guardian Summoning + if (PhaseGuardian && (GuardiansOfIcecrown_Count < GuardiansOfIcecrown_Max)) { - //DoScriptText(SAY_REQUEST_AID, m_creature); - DoScriptText(SAY_ANSWER_REQUEST, m_creature); - phase=3; + if (GuardiansOfIcecrown_Timer < diff) + { + int8 Pos = rand()%6; + if( Creature* pGuardian = m_creature->SummonCreature(NPC_GUARDIAN, AddPos[Pos][0], AddPos[Pos][1], AddPos[Pos][2], AddPos[Pos][3], TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000)) + { + pGuardian->Attack(m_creature->getVictim(),true); + pGuardian->GetMotionMaster()->MoveChase(m_creature->getVictim()); + } + + ++GuardiansOfIcecrown_Count; + //5 seconds until summoning next guardian + GuardiansOfIcecrown_Timer = 5000; + }else GuardiansOfIcecrown_Timer -= diff; } - if(phase==3) - { - if(Guardian_Count < MaxGuardians) + if (m_creature->GetDistance2d(Home[0], Home[1]) > 80) + EnterEvadeMode(); + + DoMeleeAttackIfReady(); + } +}; + + +/*###### +## Mob Shadow Issure +######*/ + +struct MANGOS_DLL_DECL mob_shadow_issureAI : public ScriptedAI +{ + mob_shadow_issureAI(Creature *pCreature) : ScriptedAI(pCreature) + { + Reset(); + } + + uint32 m_uiShadowIssure_Timer; + + void AttackStart(){} + void Reset() + { + m_uiShadowIssure_Timer = 4000; + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_uiShadowIssure_Timer) + if (m_uiShadowIssure_Timer < uiDiff) { - if(Guardian_Timer < diff) + Map *map = m_creature->GetMap(); + if (map->IsDungeon()) { - Unit *guard = NULL; - guard = DoSpawnCreature(CR_GUARDIAN, 40, 0, 5, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); - if(guard) + Map::PlayerList const &PlayerList = map->GetPlayers(); + + if (PlayerList.isEmpty()) + return; + + for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) { - Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0); - guard->AddThreat(target, 1.0f); - guard->GetMotionMaster()->MoveChase(m_creature); - Guardians[Guardian_Count] = guard->GetGUID(); - Guardian_Count++; + if (i->getSource()->isAlive() && m_creature->GetDistance2d(i->getSource()->GetPositionX(), i->getSource()->GetPositionY()) < 2) + i->getSource()->DealDamage(i->getSource(), i->getSource()->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); } - Guardian_Timer = 8000; } - else Guardian_Timer -= diff; + m_creature->ForcedDespawn(); } - } - - if(phase!=1) DoMeleeAttackIfReady(); + else m_uiShadowIssure_Timer -= uiDiff; } }; -CreatureAI* GetAI_boss_kelthuzadAI(Creature *_Creature) +CreatureAI* GetAI_boss_kelthuzadAI(Creature* pCreature) +{ + return new boss_kelthuzadAI(pCreature); +} + +CreatureAI* GetAI_mob_shadow_issureAI(Creature* pCreature) { - return new boss_kelthuzadAI (_Creature); + return new mob_shadow_issureAI(pCreature); } void AddSC_boss_kelthuzad() @@ -348,4 +536,9 @@ void AddSC_boss_kelthuzad() newscript->Name = "boss_kelthuzad"; newscript->GetAI = &GetAI_boss_kelthuzadAI; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_shadow_issure"; + newscript->GetAI = &GetAI_mob_shadow_issureAI; + newscript->RegisterSelf(); } diff --git a/scripts/northrend/naxxramas/boss_loatheb.cpp b/scripts/northrend/naxxramas/boss_loatheb.cpp index 796cc43c8..57651bd0c 100644 --- a/scripts/northrend/naxxramas/boss_loatheb.cpp +++ b/scripts/northrend/naxxramas/boss_loatheb.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 +/* Copyright (C) 2006 - 2009 ScriptDev2 * 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 @@ -26,23 +26,28 @@ EndScriptData */ enum { - SPELL_CORRUPTED_MIND = 29198, - SPELL_POISON_AURA = 29865, - SPELL_INEVITABLE_DOOM = 29204, - SPELL_REMOVE_CURSE = 30281 + SAY_NECROTIC_AURA_FADE = -1533130, + + SPELL_DEATHBLOOM = 29865, + H_SPELL_DEATHBLOOM = 55053, + SPELL_INEVITABLE_DOOM = 29204, + H_SPELL_INEVITABLE_DOOM = 55052, + SPELL_NECROTIC_AURA = 55593, + + SPELL_FUNGAL_CREEP = 29232 }; -#define ADD_1X 2957.040f -#define ADD_1Y -3997.590f -#define ADD_1Z 274.280f +#define ADD_1X 2957.040 +#define ADD_1Y -3997.590 +#define ADD_1Z 274.280 -#define ADD_2X 2909.130f -#define ADD_2Y -4042.970f -#define ADD_2Z 274.280f +#define ADD_2X 2909.130 +#define ADD_2Y -4042.970 +#define ADD_2Z 274.280 -#define ADD_3X 2861.102f -#define ADD_3Y -3997.901f -#define ADD_3Z 274.280f +#define ADD_3X 2861.102 +#define ADD_3Y -3997.901 +#define ADD_3Z 274.280 struct MANGOS_DLL_DECL boss_loathebAI : public ScriptedAI { @@ -56,21 +61,25 @@ struct MANGOS_DLL_DECL boss_loathebAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsRegularMode; - uint32 m_uiCorruptedMindTimer; - uint32 m_uiPoisonAuraTimer; - uint32 m_uiInevitableDoomTimer; - uint32 m_uiInevitableDoom5minsTimer; - uint32 m_uiRemoveCurseTimer; - uint32 m_uiSummonTimer; + uint32 DeathbloomTimer; + uint32 InevitableDoomTimer; + uint32 IDoomTimeShortage; + uint32 IDoomCount; + uint32 IDoom7minsTimer; + uint32 SummonTimer; + uint32 NecroticAuraTimer; + uint32 NecroticAuraFadeWarning; void Reset() { - m_uiCorruptedMindTimer = 4000; - m_uiPoisonAuraTimer = 2500; - m_uiInevitableDoomTimer = 120000; - m_uiInevitableDoom5minsTimer = 300000; - m_uiRemoveCurseTimer = 30000; - m_uiSummonTimer = 8000; + DeathbloomTimer = 2500; + InevitableDoomTimer = 120000; + IDoomTimeShortage = 15000; + IDoomCount = 1; + IDoom7minsTimer = 300000; + SummonTimer = 8000; + NecroticAuraTimer = 1000; + NecroticAuraFadeWarning = 15000; } void Aggro(Unit* pWho) @@ -91,74 +100,117 @@ struct MANGOS_DLL_DECL boss_loathebAI : public ScriptedAI m_pInstance->SetData(TYPE_LOATHEB, FAIL); } + void JustSummoned(Creature* summoned) + { + if (Unit* target = SelectUnit(SELECT_TARGET_TOPAGGRO,0)) + summoned->AI()->AttackStart(target); + } + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - // Corrupted Mind - if (m_uiCorruptedMindTimer < uiDiff) + // Necrotic Aura + if ( NecroticAuraTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_CORRUPTED_MIND); - m_uiCorruptedMindTimer = 62000; - } - else - m_uiCorruptedMindTimer -= uiDiff; + DoCast(m_creature->getVictim(),SPELL_NECROTIC_AURA); + NecroticAuraTimer = 20000; + }else NecroticAuraTimer -= uiDiff; - // Poison Aura - if (m_uiPoisonAuraTimer < uiDiff) + // Necrotic Aura fade warning + if ( NecroticAuraFadeWarning < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_POISON_AURA); - m_uiPoisonAuraTimer = 60000; - } - else - m_uiPoisonAuraTimer -= uiDiff; + DoScriptText(SAY_NECROTIC_AURA_FADE, m_creature); + NecroticAuraFadeWarning = 20000; + }else NecroticAuraFadeWarning -= uiDiff; - // Inevitable Doom - if (m_uiInevitableDoomTimer < uiDiff) + // Deathbloom + if ( DeathbloomTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_INEVITABLE_DOOM); - m_uiInevitableDoomTimer = 120000; - } - else - m_uiInevitableDoomTimer -= uiDiff; + DoCast(m_creature, m_bIsRegularMode ? SPELL_DEATHBLOOM: H_SPELL_DEATHBLOOM); + DeathbloomTimer = 30000; + }else DeathbloomTimer -= uiDiff; - // Inevitable Doom 5mins - if (m_uiInevitableDoom5minsTimer < uiDiff) + // Inevitable Doom + if ( InevitableDoomTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_INEVITABLE_DOOM); - m_uiInevitableDoom5minsTimer = 15000; - } - else - m_uiInevitableDoom5minsTimer -= uiDiff; + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_INEVITABLE_DOOM : H_SPELL_INEVITABLE_DOOM); + InevitableDoomTimer = 120000 - ( IDoomCount* IDoomTimeShortage); + IDoomCount ++; + }else InevitableDoomTimer -= uiDiff; - // Remove Curse - if (m_uiRemoveCurseTimer < uiDiff) + // Inevitable Doom 7mins + if ( IDoom7minsTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_REMOVE_CURSE); - m_uiRemoveCurseTimer = 30000; - } - else - m_uiRemoveCurseTimer -= uiDiff; + DoCast(m_creature->getVictim(), SPELL_INEVITABLE_DOOM); + IDoom7minsTimer = 15000; + }else IDoom7minsTimer -= uiDiff; // Summon - if (m_uiSummonTimer < uiDiff) + if ( SummonTimer < uiDiff) { Unit* pSummonedSpores = NULL; - pSummonedSpores = m_creature->SummonCreature(16286, ADD_1X, ADD_1Y, ADD_1Z, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000); - pSummonedSpores = m_creature->SummonCreature(16286, ADD_2X, ADD_2Y, ADD_2Z, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000); - pSummonedSpores = m_creature->SummonCreature(16286, ADD_3X, ADD_3Y, ADD_3Z, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000); + pSummonedSpores = m_creature->SummonCreature(16286,ADD_1X,ADD_1Y,ADD_1Z,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000); + pSummonedSpores = m_creature->SummonCreature(16286,ADD_2X,ADD_2Y,ADD_2Z,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000); + pSummonedSpores = m_creature->SummonCreature(16286,ADD_3X,ADD_3Y,ADD_3Z,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000); if (pSummonedSpores) { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) pSummonedSpores->AddThreat(pTarget); } - m_uiSummonTimer = 28000; + SummonTimer = 28000; } else - m_uiSummonTimer -= uiDiff; + SummonTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +struct MANGOS_DLL_DECL npc_loatheb_sporesAI : public ScriptedAI +{ + npc_loatheb_sporesAI(Creature* pCreature) : ScriptedAI(pCreature) + { + Reset(); + } + + uint32 DieDelay_Timer; + + void Reset() + { + DieDelay_Timer = 0; + } + + void DamageTaken(Unit* done_by, uint32 &damage) + { + if (damage > m_creature->GetHealth() && !DieDelay_Timer) + { + m_creature->CastSpell(m_creature, SPELL_FUNGAL_CREEP, true); + DieDelay_Timer = 500; + } + if (DieDelay_Timer) + { + damage = 0; + return; + } + } + + void JustDied(Unit* Killer) {} + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (DieDelay_Timer) + if (DieDelay_Timer < diff) + { + m_creature->ForcedDespawn(); + DieDelay_Timer = 0; + }else DieDelay_Timer -= diff; DoMeleeAttackIfReady(); } @@ -167,6 +219,10 @@ CreatureAI* GetAI_boss_loatheb(Creature* pCreature) { return new boss_loathebAI(pCreature); } +CreatureAI* GetAI_npc_loatheb_spores(Creature* pCreature) +{ + return new npc_loatheb_sporesAI(pCreature); +} void AddSC_boss_loatheb() { @@ -175,4 +231,9 @@ void AddSC_boss_loatheb() NewScript->Name = "boss_loatheb"; NewScript->GetAI = &GetAI_boss_loatheb; NewScript->RegisterSelf(); + + NewScript = new Script; + NewScript->Name = "npc_loatheb_spores"; + NewScript->GetAI = &GetAI_npc_loatheb_spores; + NewScript->RegisterSelf(); } diff --git a/scripts/northrend/naxxramas/boss_maexxna.cpp b/scripts/northrend/naxxramas/boss_maexxna.cpp index 58f8faa17..964ad3824 100644 --- a/scripts/northrend/naxxramas/boss_maexxna.cpp +++ b/scripts/northrend/naxxramas/boss_maexxna.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 +/* Copyright (C) 2006 - 2009 ScriptDev2 * 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 @@ -24,208 +24,232 @@ EndScriptData */ #include "precompiled.h" #include "naxxramas.h" -#define SPELL_WEBTRAP 28622 //Spell is normally used by the webtrap on the wall NOT by Maexxna - -#define SPELL_WEBSPRAY 29484 -#define H_SPELL_WEBSPRAY 54125 -#define SPELL_POISONSHOCK 28741 -#define H_SPELL_POISONSHOCK 54122 -#define SPELL_NECROTICPOISON 28776 -#define H_SPELL_NECROTICPOISON 54121 -#define SPELL_FRENZY 54123 -#define H_SPELL_FRENZY 54124 - -//spellId invalid -#define SPELL_SUMMON_SPIDERLING 29434 +enum +{ + SPELL_WEBWRAP = 28622, //Spell is normally used by the webtrap on the wall NOT by Maexxna + + SPELL_WEBSPRAY = 29484, + H_SPELL_WEBSPRAY = 54125, + SPELL_POISONSHOCK = 28741, + H_SPELL_POISONSHOCK = 54122, + SPELL_NECROTICPOISON = 28776, + H_SPELL_NECROTICPOISON = 54121, + SPELL_FRENZY = 54123, + H_SPELL_FRENZY = 54124, + + //spellId invalid + SPELL_SUMMON_SPIDERLING = 29434, + NPC_SPIDERLING = 17055 +}; -#define LOC_X1 3546.796f -#define LOC_Y1 -3869.082f -#define LOC_Z1 296.450f +#define LOC_X1 3546.796 +#define LOC_Y1 -3869.082 +#define LOC_Z1 296.450 -#define LOC_X2 3531.271f -#define LOC_Y2 -3847.424f -#define LOC_Z2 299.450f +#define LOC_X2 3531.271 +#define LOC_Y2 -3847.424 +#define LOC_Z2 299.450 -#define LOC_X3 3497.067f -#define LOC_Y3 -3843.384f -#define LOC_Z3 302.384f +#define LOC_X3 3497.067 +#define LOC_Y3 -3843.384 +#define LOC_Z3 302.384 struct MANGOS_DLL_DECL mob_webwrapAI : public ScriptedAI { mob_webwrapAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - uint64 victimGUID; + uint64 m_uiVictimGUID; void Reset() { - victimGUID = 0; + m_uiVictimGUID = 0; } - void SetVictim(Unit* victim) + void SetVictim(uint64 victim) { if (victim) { - victimGUID = victim->GetGUID(); - victim->CastSpell(victim, SPELL_WEBTRAP, true); + m_uiVictimGUID = victim; + if (Unit* pVictim = Unit::GetUnit((*m_creature), m_uiVictimGUID)) + pVictim->CastSpell(pVictim, SPELL_WEBWRAP, true); } } - void DamageTaken(Unit *done_by, uint32 &damage) + void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) { - if (damage > m_creature->GetHealth()) + if (uiDamage > m_creature->GetHealth()) { - if (victimGUID) + if (m_uiVictimGUID) { - Unit* victim = NULL; - victim = Unit::GetUnit((*m_creature), victimGUID); - if (victim) - victim->RemoveAurasDueToSpell(SPELL_WEBTRAP); + if (Unit* pVictim = Unit::GetUnit((*m_creature), m_uiVictimGUID)) + pVictim->RemoveAurasDueToSpell(SPELL_WEBWRAP); } } } + void JustDied(Unit* Killer) + { + if (Unit* pVictim = Unit::GetUnit((*m_creature), m_uiVictimGUID)) + pVictim->RemoveAurasDueToSpell(SPELL_WEBWRAP); + } - void MoveInLineOfSight(Unit *who) { } - void UpdateAI(const uint32 diff) { } + void MoveInLineOfSight(Unit* pWho) { } + void UpdateAI(const uint32 uiDiff) { } }; struct MANGOS_DLL_DECL boss_maexxnaAI : public ScriptedAI { boss_maexxnaAI(Creature* pCreature) : ScriptedAI(pCreature) { - pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); - Regular = pCreature->GetMap()->IsRegularDifficulty(); + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - ScriptedInstance *pInstance; - bool Regular; - uint32 WebTrap_Timer; - uint32 WebSpray_Timer; - uint32 PoisonShock_Timer; - uint32 NecroticPoison_Timer; - uint32 SummonSpiderling_Timer; - bool Enraged; + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + + uint32 m_uiWebWrapTimer; + uint32 m_uiWebSprayTimer; + uint32 m_uiPoisonShockTimer; + uint32 m_uiNecroticPoisonTimer; + uint32 m_uiSummonSpiderlingTimer; + bool m_bEnraged; void Reset() { - WebTrap_Timer = 20000; //20 sec init, 40 sec normal - WebSpray_Timer = 40000; //40 seconds - PoisonShock_Timer = 20000; //20 seconds - NecroticPoison_Timer = 30000; //30 seconds - SummonSpiderling_Timer = 30000; //30 sec init, 40 sec normal - Enraged = false; - - if(pInstance) pInstance->SetData(TYPE_MAEXXNA, NOT_STARTED); + m_uiWebWrapTimer = 20000; //20 sec init, 40 sec normal + m_uiWebSprayTimer = 40000; //40 seconds + m_uiPoisonShockTimer = 20000; //20 seconds + m_uiNecroticPoisonTimer = 30000; //30 seconds + m_uiSummonSpiderlingTimer = 30000; //30 sec init, 40 sec normal + m_bEnraged = false; } - void Aggro(Unit *who) + void Aggro(Unit* pWho) { - if(pInstance) pInstance->SetData(TYPE_MAEXXNA, IN_PROGRESS); + if (m_pInstance) + m_pInstance->SetData(TYPE_MAEXXNA, IN_PROGRESS); } - void JustDied(Unit *killer) + void JustDied(Unit* pKiller) { - if(pInstance) pInstance->SetData(TYPE_MAEXXNA, DONE); + if (m_pInstance) + m_pInstance->SetData(TYPE_MAEXXNA, DONE); } - void DoCastWebWrap() + void JustReachedHome() { - ThreatList const& tList = m_creature->getThreatManager().getThreatList(); - std::vector targets; - - //This spell doesn't work if we only have 1 player on threat list - if (tList.size() < 2) - return; - - //begin + 1 , so we don't target the one with the highest threat - ThreatList::const_iterator itr = tList.begin(); - std::advance(itr, 1); - - //store the threat list in a different container - for (;itr != tList.end(); ++itr) - { - Unit* target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()); - - //only on alive players - if (target && target->isAlive() && target->GetTypeId() == TYPEID_PLAYER) - targets.push_back(target); - } - - //cut down to size if we have more than 3 targets - while(targets.size() > 3) - targets.erase(targets.begin()+rand()%targets.size()); - - int i = 0; + if (m_pInstance) + m_pInstance->SetData(TYPE_MAEXXNA, FAIL); + } - for(std::vector::iterator iter = targets.begin(); iter!= targets.end(); ++iter, ++i) + void DoCastWebWrap() + { + Unit* pWrapped = NULL; + for(uint8 i = 0; i < 1; ++i) { - // Teleport the 3 targets to a location on the wall and summon a Web Wrap on them - switch(i) + float LocX, LocY, LocZ; + switch(rand()%3) { case 0: - DoTeleportPlayer((*iter), LOC_X1, LOC_Y1, LOC_Z1, (*iter)->GetOrientation()); - if (Creature* pWrap = m_creature->SummonCreature(16486, LOC_X1, LOC_Y1, LOC_Z1, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 120000)) - ((mob_webwrapAI*)pWrap->AI())->SetVictim((*iter)); + LocX = LOC_X1 + rand()%5; LocY = LOC_Y1 + rand()%5; LocZ = LOC_Z1 + 1; break; case 1: - DoTeleportPlayer((*iter), LOC_X2, LOC_Y2, LOC_Z2, (*iter)->GetOrientation()); - if (Creature* pWrap = m_creature->SummonCreature(16486, LOC_X2, LOC_Y2, LOC_Z2, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 120000)) - ((mob_webwrapAI*)pWrap->AI())->SetVictim((*iter)); + LocX = LOC_X2 + rand()%5; LocY = LOC_Y2 + rand()%5; LocZ = LOC_Z2 + 1; break; case 2: - DoTeleportPlayer((*iter), LOC_X3, LOC_Y3, LOC_Z3, (*iter)->GetOrientation()); - if (Creature* pWrap = m_creature->SummonCreature(16486, LOC_X3, LOC_Y3, LOC_Z3, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 120000)) - ((mob_webwrapAI*)pWrap->AI())->SetVictim((*iter)); + LocX = LOC_X3 + rand()%5; LocY = LOC_Y3 + rand()%5; LocZ = LOC_Z3 + 1; break; } + + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,1)) + { + if (pWrapped) + if (pTarget == pWrapped) + return; + + DoTeleportPlayer(pTarget, LocX, LocY, LocZ, pTarget->GetOrientation()); + if (Creature* pWrap = m_creature->SummonCreature(16486, LocX, LocY, LocZ, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 120000)) + ((mob_webwrapAI*)pWrap->AI())->SetVictim(pTarget->GetGUID()); + pWrapped = pTarget; + } + } + } + void SummonSpiderling() + { + uint8 number = 9; + float x,y,z; + for(uint8 i = 0; number >= i; i++) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + { + m_creature->GetRandomPoint(m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ(),7.0f,x,y,z); + if(Creature* spiderling = m_creature->SummonCreature(NPC_SPIDERLING, x, y, z,0, TEMPSUMMON_DEAD_DESPAWN, 0)) + { + spiderling->AddThreat(pTarget, 0.0f); + spiderling->AI()->AttackStart(pTarget); + } + } } } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //WebTrap_Timer - if (WebTrap_Timer < diff) + // Web Wrap + if (m_uiWebWrapTimer < uiDiff) { DoCastWebWrap(); - WebTrap_Timer = 40000; - }else WebTrap_Timer -= diff; + if(!m_bIsRegularMode) + DoCastWebWrap(); + m_uiWebWrapTimer = 40000; + } + else + m_uiWebWrapTimer -= uiDiff; - //WebSpray_Timer - if (WebSpray_Timer < diff) + // Web Spray + if (m_uiWebSprayTimer < uiDiff) { - DoCast(m_creature->getVictim(), Regular ? SPELL_WEBSPRAY : H_SPELL_WEBSPRAY); - WebSpray_Timer = 40000; - }else WebSpray_Timer -= diff; + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_WEBSPRAY : H_SPELL_WEBSPRAY); + m_uiWebSprayTimer = 40000; + } + else + m_uiWebSprayTimer -= uiDiff; - //PoisonShock_Timer - if (PoisonShock_Timer < diff) + // Poison Shock + if (m_uiPoisonShockTimer < uiDiff) { - DoCast(m_creature->getVictim(), Regular ? SPELL_POISONSHOCK : H_SPELL_POISONSHOCK); - PoisonShock_Timer = 20000; - }else PoisonShock_Timer -= diff; + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_POISONSHOCK : H_SPELL_POISONSHOCK); + m_uiPoisonShockTimer = 20000; + } + else + m_uiPoisonShockTimer -= uiDiff; - //NecroticPoison_Timer - if (NecroticPoison_Timer < diff) + // Necrotic Poison + if (m_uiNecroticPoisonTimer < uiDiff) { - DoCast(m_creature->getVictim(), Regular ? SPELL_NECROTICPOISON : H_SPELL_NECROTICPOISON); - NecroticPoison_Timer = 30000; - }else NecroticPoison_Timer -= diff; + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_NECROTICPOISON : H_SPELL_NECROTICPOISON); + m_uiNecroticPoisonTimer = 30000; + } + else + m_uiNecroticPoisonTimer -= uiDiff; - //SummonSpiderling_Timer - if (SummonSpiderling_Timer < diff) + // Summon Spiderling + if (m_uiSummonSpiderlingTimer < uiDiff) { - DoCast(m_creature, SPELL_SUMMON_SPIDERLING); - SummonSpiderling_Timer = 40000; - }else SummonSpiderling_Timer -= diff; + SummonSpiderling(); + m_uiSummonSpiderlingTimer = 40000; + } + else + m_uiSummonSpiderlingTimer -= uiDiff; //Enrage if not already enraged and below 30% - if (!Enraged && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 30) + if (!m_bEnraged && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 30) { - DoCast(m_creature, Regular ? SPELL_FRENZY : H_SPELL_FRENZY); - Enraged = true; + DoCast(m_creature, m_bIsRegularMode ? SPELL_FRENZY : H_SPELL_FRENZY); + m_bEnraged = true; } DoMeleeAttackIfReady(); @@ -244,15 +268,15 @@ CreatureAI* GetAI_boss_maexxna(Creature* pCreature) void AddSC_boss_maexxna() { - Script *newscript; + Script* NewScript; - newscript = new Script; - newscript->Name = "boss_maexxna"; - newscript->GetAI = &GetAI_boss_maexxna; - newscript->RegisterSelf(); + NewScript = new Script; + NewScript->Name = "boss_maexxna"; + NewScript->GetAI = &GetAI_boss_maexxna; + NewScript->RegisterSelf(); - newscript = new Script; - newscript->Name = "mob_webwrap"; - newscript->GetAI = &GetAI_mob_webwrap; - newscript->RegisterSelf(); + NewScript = new Script; + NewScript->Name = "mob_webwrap"; + NewScript->GetAI = &GetAI_mob_webwrap; + NewScript->RegisterSelf(); } diff --git a/scripts/northrend/naxxramas/boss_noth.cpp b/scripts/northrend/naxxramas/boss_noth.cpp index a1c6f9fd3..76bdfe0f1 100644 --- a/scripts/northrend/naxxramas/boss_noth.cpp +++ b/scripts/northrend/naxxramas/boss_noth.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 +/* Copyright (C) 2006 - 2009 ScriptDev2 * 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 @@ -44,7 +44,9 @@ enum SPELL_SUMMON_GUARDIAN_AND_CONSTRUCT = 29269, NPC_PLAGUED_WARRIOR = 16984, - NPC_PLAGUED_CHAMPION = 16983 + NPC_PLAGUED_CHAMPIONS = 16983, + NPC_PLAGUED_GUARDIANS = 16981 + }; uint32 m_auiSpellSummonPlaguedWarrior[]= @@ -76,146 +78,199 @@ struct MANGOS_DLL_DECL boss_nothAI : public ScriptedAI { boss_nothAI(Creature* pCreature) : ScriptedAI(pCreature) { - pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Regular = pCreature->GetMap()->IsRegularDifficulty(); - AddsCount = Regular ? 2 : 3; //normal phase - BalconyAddsCount = Regular ? 2 : 4; //balcony phase + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - ScriptedInstance* pInstance; - bool Regular; + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + + bool isTeleported; - uint32 BlinkTimer; - uint32 CurseTimer; - uint32 SummonTimer; - uint32 BalconySummonTimer; + uint8 SecondPhaseCounter; - uint32 AddsCount; - uint32 BalconyAddsCount; + uint32 Blink_Timer; + uint32 Curse_Timer; + uint32 Summon_Timer; + uint32 SecondPhase_Timer; + uint32 Teleport_Timer; - bool BalconyPhase; - uint32 PhaseTimer; + float LastX, LastY, LastZ; void Reset() { - BlinkTimer = 25000; - CurseTimer = 4000; - SummonTimer = 12000; - BalconySummonTimer = 5000; - - BalconyPhase = false; - PhaseTimer = 90000; - - if(pInstance) pInstance->SetData(TYPE_NOTH, NOT_STARTED); + isTeleported = false; + SecondPhaseCounter = 0; + Blink_Timer = 25000; + Curse_Timer = 4000; + Summon_Timer = 30000; + SecondPhase_Timer = 17000; + Teleport_Timer = 120000; + + LastX = 0; + LastY = 0; + LastZ = 0; + + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + + if(m_pInstance) + m_pInstance->SetData(TYPE_NOTH, NOT_STARTED); } void Aggro(Unit *who) { - switch(urand(0, 2)) + switch (rand()%3) { case 0: DoScriptText(SAY_AGGRO1, m_creature); break; case 1: DoScriptText(SAY_AGGRO2, m_creature); break; case 2: DoScriptText(SAY_AGGRO3, m_creature); break; } - if(pInstance) pInstance->SetData(TYPE_NOTH, IN_PROGRESS); + if (!who || m_creature->getVictim()) + return; + + if (who->isTargetableForAttack() && who->isInAccessablePlaceFor(m_creature) && m_creature->IsHostileTo(who)) + AttackStart(who); + + if(m_pInstance) + m_pInstance->SetData(TYPE_NOTH, IN_PROGRESS); + } + + void AttackStart(Unit* who) + { + if (isTeleported) + return; + + if (!who || who == m_creature) + return; + + if (m_creature->Attack(who, true)) + { + m_creature->SetInCombatWithZone(); + DoStartMovement(who); + } } void JustSummoned(Creature* summoned) { if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) - summoned->AddThreat(target); + { + summoned->AddThreat(target,0.0f); + summoned->AI()->AttackStart(target); + } } void KilledUnit(Unit* victim) { - DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); + switch (rand()%2) + { + case 0: DoScriptText(SAY_SLAY1, m_creature); break; + case 1: DoScriptText(SAY_SLAY2, m_creature); break; + } } void JustDied(Unit* Killer) { DoScriptText(SAY_DEATH, m_creature); - if(pInstance) pInstance->SetData(TYPE_NOTH, DONE); + + if(m_pInstance) + m_pInstance->SetData(TYPE_NOTH, DONE); } void UpdateAI(const uint32 diff) { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if(PhaseTimer < diff) + if (isTeleported) { - if(!BalconyPhase) + if (Teleport_Timer < diff) { - BalconyPhase = true; - PhaseTimer = 70000; - //teleport to balcony and make inactive - SetCombatMovement(false); - m_creature->GetMotionMaster()->Clear(); - m_creature->GetMotionMaster()->MoveIdle(); - m_creature->NearTeleportTo(TELE_X, TELE_Y, TELE_Z, TELE_O); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - } - else - { - BalconyPhase = false; - PhaseTimer = 110000; - //teleport back and make active - m_creature->NearTeleportTo(2684.804, -3502.517, 261.313, 0); - SetCombatMovement(true); - m_creature->GetMotionMaster()->Clear(); - m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - } - } - else PhaseTimer -= diff; + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->MonsterMove(LastX, LastY, LastZ,0); + DoStartMovement(m_creature->getVictim()); + LastX = 0; + LastY = 0; + LastZ = 0; + isTeleported = false; + Teleport_Timer = 120000; + }else Teleport_Timer -= diff; - if(BalconyPhase) - { - if(BalconySummonTimer < diff) + if (SecondPhase_Timer < diff) { - DoScriptText(SAY_SUMMON, m_creature); - for(uint8 i = 0; i < BalconyAddsCount; ++i) - m_creature->SummonCreature(NPC_PLAGUED_CHAMPION, 2704.65, -3460.58, 262.86, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); - BalconySummonTimer = 35000; - } - else BalconySummonTimer -= diff; - } - else - { - if (BlinkTimer < diff) - { - DoCast(m_creature->getVictim(),SPELL_CRIPPLE); - if(!Regular) + switch (SecondPhaseCounter) { - DoCast(m_creature, SPELL_BLINK); - DoResetThreat(); + case 0: + for(uint8 i = 0; i < (m_bIsRegularMode ? 2 : 4); i++) + m_creature->SummonCreature(NPC_PLAGUED_CHAMPIONS,2684.804,-3502.517,261.313,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000); + break; + case 1: + case 2: + for(uint8 i = 0; i < (m_bIsRegularMode ? 2 : 4) - (m_bIsRegularMode ? 2 : 1); i++) + m_creature->SummonCreature(NPC_PLAGUED_CHAMPIONS,2684.804,-3502.517,261.313,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000); + for(uint8 i = 0; i < (m_bIsRegularMode ? 1 : 2); i++) + m_creature->SummonCreature(NPC_PLAGUED_GUARDIANS,2684.804,-3502.517,261.313,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000); + break; } - BlinkTimer = 25000; - }else BlinkTimer -= diff; + SecondPhaseCounter ++; + SecondPhase_Timer = 22000; + } else SecondPhase_Timer -= diff; + return; + } - if (CurseTimer < diff) - { - DoCast(m_creature->getVictim(),SPELL_CURSE_PLAGUEBRINGER); - CurseTimer = 28000; - } - else CurseTimer -= diff; + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; - //Summon_Timer - if (SummonTimer < diff) - { - DoScriptText(SAY_SUMMON, m_creature); - for(uint8 i = 0; i < AddsCount; ++i) - m_creature->SummonCreature(NPC_PLAGUED_WARRIOR, 2684.804, -3502.517, 261.313, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); - SummonTimer = 30000; - } - else SummonTimer -= diff; - - DoMeleeAttackIfReady(); - } + //Blink_Timer + if (Blink_Timer < diff) + { + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_CRIPPLE : SPELL_CRIPPLE_H); + //DoCast(m_creature, SPELL_BLINK); + m_creature->GetMap()->CreatureRelocation(m_creature, 2670.804 + rand()%30, -3517.517 + rand()%30, 261.313, m_creature->GetOrientation()); + DoResetThreat(); + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + AttackStart(pTarget); + Blink_Timer = 25000; + }else Blink_Timer -= diff; + + //Curse_Timer + if (Curse_Timer < diff) + { + DoCast(m_creature->getVictim(), m_bIsRegularMode? SPELL_CURSE_PLAGUEBRINGER : SPELL_CURSE_PLAGUEBRINGER_H); + Curse_Timer = 28000; + }else Curse_Timer -= diff; + + //Summon_Timer + if (Summon_Timer < diff) + { + DoScriptText(SAY_SUMMON, m_creature); + + for(uint8 i = 0; i < (m_bIsRegularMode ? 2 : 3); ++i) + m_creature->SummonCreature(NPC_PLAGUED_WARRIOR, 2672.804 + rand()%15,-3509.517 + rand()%15, 261.313, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 80000); + + Summon_Timer = 30000; + } else Summon_Timer -= diff; + + if (Teleport_Timer < diff) + { + m_creature->InterruptNonMeleeSpells(true); + LastX = m_creature->GetPositionX(); + LastY = m_creature->GetPositionY(); + LastZ = m_creature->GetPositionZ(); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->StopMoving(); + m_creature->GetMotionMaster()->Clear(false); + m_creature->GetMotionMaster()->MoveIdle(); + m_creature->MonsterMove(TELE_X, TELE_Y, TELE_Z,0); + isTeleported = true; + SecondPhaseCounter = 0; + SecondPhase_Timer = 0; + Teleport_Timer = 70000; + return; + }else Teleport_Timer -= diff; + + DoMeleeAttackIfReady(); } }; @@ -226,9 +281,9 @@ CreatureAI* GetAI_boss_noth(Creature* pCreature) void AddSC_boss_noth() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_noth"; - newscript->GetAI = &GetAI_boss_noth; - newscript->RegisterSelf(); + Script* NewScript; + NewScript = new Script; + NewScript->Name = "boss_noth"; + NewScript->GetAI = &GetAI_boss_noth; + NewScript->RegisterSelf(); } diff --git a/scripts/northrend/naxxramas/boss_patchwerk.cpp b/scripts/northrend/naxxramas/boss_patchwerk.cpp index c6c0796de..e33994db4 100644 --- a/scripts/northrend/naxxramas/boss_patchwerk.cpp +++ b/scripts/northrend/naxxramas/boss_patchwerk.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 +/* Copyright (C) 2006 - 2009 ScriptDev2 * 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 @@ -121,12 +121,10 @@ struct MANGOS_DLL_DECL boss_patchwerkAI : public ScriptedAI pTarget = pTempTarget; } } - --uiTargets; } - if (pTarget) - DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_HATEFULSTRIKE : SPELL_HATEFULSTRIKE_H); + DoCast(pTarget, m_bIsRegularMode ? SPELL_HATEFULSTRIKE : SPELL_HATEFULSTRIKE_H); } void UpdateAI(const uint32 uiDiff) @@ -148,7 +146,7 @@ struct MANGOS_DLL_DECL boss_patchwerkAI : public ScriptedAI { if (m_creature->GetHealth()*20 < m_creature->GetMaxHealth()) { - DoCastSpellIfCan(m_creature, SPELL_ENRAGE); + DoCast(m_creature, SPELL_ENRAGE); DoScriptText(EMOTE_ENRAGE, m_creature); m_bEnraged = true; } @@ -159,7 +157,7 @@ struct MANGOS_DLL_DECL boss_patchwerkAI : public ScriptedAI { if (m_uiBerserkTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_BERSERK); + DoCast(m_creature, SPELL_BERSERK); DoScriptText(EMOTE_BERSERK, m_creature); m_bBerserk = true; } @@ -171,7 +169,7 @@ struct MANGOS_DLL_DECL boss_patchwerkAI : public ScriptedAI // Slimebolt - casted only while Berserking to prevent kiting if (m_uiSlimeboltTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_SLIMEBOLT); + DoCast(m_creature->getVictim(), SPELL_SLIMEBOLT); m_uiSlimeboltTimer = 5000; } else diff --git a/scripts/northrend/naxxramas/boss_razuvious.cpp b/scripts/northrend/naxxramas/boss_razuvious.cpp index 7b454c99d..45c7ca236 100644 --- a/scripts/northrend/naxxramas/boss_razuvious.cpp +++ b/scripts/northrend/naxxramas/boss_razuvious.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 +/* Copyright (C) 2006 - 2009 ScriptDev2 * 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 @@ -41,9 +41,28 @@ enum SPELL_DISRUPTING_SHOUT = 55543, SPELL_DISRUPTING_SHOUT_H = 29107, SPELL_JAGGED_KNIFE = 55550, - SPELL_HOPELESS = 29125 + SPELL_HOPELESS = 29125, + + NPC_DEATH_KNIGHT_UNDERSTUDY = 16803 }; +bool GossipHello_npc_obedience_crystal(Player* pPlayer, Creature* pCreature) +{ + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "To use Mind Control click here !", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + return true; +} +bool GossipSelect_npc_obedience_crystal(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + if (Unit* target = GetClosestCreatureWithEntry(pCreature, NPC_DEATH_KNIGHT_UNDERSTUDY, 100.0f)) + pPlayer->CastSpell(target, 55479, true); + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetGUID()); + } + return true; +} struct MANGOS_DLL_DECL boss_razuviousAI : public ScriptedAI { boss_razuviousAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -56,109 +75,147 @@ struct MANGOS_DLL_DECL boss_razuviousAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsRegularMode; - uint32 m_uiUnbalancingStrikeTimer; - uint32 m_uiDisruptingShoutTimer; - uint32 m_uiJaggedKnifeTimer; - uint32 m_uiCommandSoundTimer; + std::list DeathKnightList; + + uint32 UnbalancingStrike_Timer; + uint32 DisruptingShout_Timer; + uint32 CommandSound_Timer; void Reset() { - m_uiUnbalancingStrikeTimer = 30000; // 30 seconds - m_uiDisruptingShoutTimer = 15000; // 15 seconds - m_uiJaggedKnifeTimer = urand(10000, 15000); - m_uiCommandSoundTimer = 40000; // 40 seconds + UnbalancingStrike_Timer = 30000; //30 seconds + DisruptingShout_Timer = 25000; //25 seconds + CommandSound_Timer = 40000; //40 seconds + + DespawnDeathKnightUnderstudies(); + SpawnDeathKnightUnderstudies(); + + if (m_pInstance) + m_pInstance->SetData(TYPE_RAZUVIOUS, NOT_STARTED); + } void KilledUnit(Unit* Victim) { - if (urand(0, 3)) + if (rand()%3) return; - switch(urand(0, 1)) + switch (rand()%2) { - case 0: DoScriptText(SAY_SLAY1, m_creature); break; - case 1: DoScriptText(SAY_SLAY2, m_creature); break; + case 0: + DoPlaySoundToSet(m_creature, SAY_SLAY1); + break; + case 1: + DoPlaySoundToSet(m_creature, SAY_SLAY2); + break; } } - void JustDied(Unit* pKiller) + void JustDied(Unit* Killer) { - DoScriptText(SAY_DEATH, m_creature); + DoPlaySoundToSet(m_creature, SAY_DEATH); if (m_pInstance) m_pInstance->SetData(TYPE_RAZUVIOUS, DONE); + + std::list m_pDeathKnight; + GetCreatureListWithEntryInGrid(m_pDeathKnight, m_creature, NPC_DEATH_KNIGHT_UNDERSTUDY, 100.0f); + + if (!m_pDeathKnight.empty()) + for(std::list::iterator itr = m_pDeathKnight.begin(); itr != m_pDeathKnight.end(); ++itr) + { + (*itr)->CastSpell((*itr), SPELL_HOPELESS, true); + (*itr)->SetArmor(0); + } } - void Aggro(Unit* pWho) + void Aggro(Unit *who) { - switch(urand(0, 2)) + switch (rand()%3) { - case 0: DoScriptText(SAY_AGGRO1, m_creature); break; - case 1: DoScriptText(SAY_AGGRO2, m_creature); break; - case 2: DoScriptText(SAY_AGGRO3, m_creature); break; + case 0: + DoPlaySoundToSet(m_creature, SAY_AGGRO1); + break; + case 1: + DoPlaySoundToSet(m_creature, SAY_AGGRO2); + break; + case 2: + DoPlaySoundToSet(m_creature, SAY_AGGRO3); + break; } if (m_pInstance) m_pInstance->SetData(TYPE_RAZUVIOUS, IN_PROGRESS); + + m_creature->CallForHelp(20.0f); + } - void JustReachedHome() + void DespawnDeathKnightUnderstudies() { - if (m_pInstance) - m_pInstance->SetData(TYPE_RAZUVIOUS, FAIL); + std::list m_pDeathKnight; + GetCreatureListWithEntryInGrid(m_pDeathKnight, m_creature, NPC_DEATH_KNIGHT_UNDERSTUDY, DEFAULT_VISIBILITY_INSTANCE); + + if (!m_pDeathKnight.empty()) + for(std::list::iterator itr = m_pDeathKnight.begin(); itr != m_pDeathKnight.end(); ++itr) + (*itr)->ForcedDespawn(); } - void UpdateAI(const uint32 uiDiff) + void SpawnDeathKnightUnderstudies() { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - // Unbalancing Strike - if (m_uiUnbalancingStrikeTimer < uiDiff) + m_creature->SummonCreature(NPC_DEATH_KNIGHT_UNDERSTUDY, 2757.48, -3111.52, 267.77, 3.93, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 3000000); + m_creature->SummonCreature(NPC_DEATH_KNIGHT_UNDERSTUDY, 2762.05, -3084.47, 267.77, 2.13, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 3000000); + + if(!m_bIsRegularMode) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_UNBALANCING_STRIKE); - m_uiUnbalancingStrikeTimer = 30000; + m_creature->SummonCreature(NPC_DEATH_KNIGHT_UNDERSTUDY, 2781.99, -3087.81, 267.68, 0.61, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 3000000); + m_creature->SummonCreature(NPC_DEATH_KNIGHT_UNDERSTUDY, 2779.13, -3112.39, 267.68, 5.1, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 3000000); } - else - m_uiUnbalancingStrikeTimer -= uiDiff; + } + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; - // Disrupting Shout - if (m_uiDisruptingShoutTimer < uiDiff) + //UnbalancingStrike_Timer + if (UnbalancingStrike_Timer < diff) { - DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_DISRUPTING_SHOUT : SPELL_DISRUPTING_SHOUT_H); - m_uiDisruptingShoutTimer = 25000; - } - else - m_uiDisruptingShoutTimer -= uiDiff; + DoCast(m_creature->getVictim(),SPELL_UNBALANCING_STRIKE); + UnbalancingStrike_Timer = 30000; + }else UnbalancingStrike_Timer -= diff; - // Jagged Knife - if (m_uiJaggedKnifeTimer < uiDiff) + //DisruptingShout_Timer + if (DisruptingShout_Timer < diff) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, SPELL_JAGGED_KNIFE); - m_uiJaggedKnifeTimer = 10000; - } - else - m_uiJaggedKnifeTimer -= uiDiff; + DoCast(m_creature->getVictim(), m_bIsRegularMode? SPELL_DISRUPTING_SHOUT : SPELL_DISRUPTING_SHOUT_H); + DisruptingShout_Timer = 25000; + }else DisruptingShout_Timer -= diff; - // Random say - if (m_uiCommandSoundTimer < uiDiff) + //CommandSound_Timer + if (CommandSound_Timer < diff) { - switch(urand(0, 3)) + switch (rand()%4) { - case 0: DoScriptText(SAY_COMMAND1, m_creature); break; - case 1: DoScriptText(SAY_COMMAND2, m_creature); break; - case 2: DoScriptText(SAY_COMMAND3, m_creature); break; - case 3: DoScriptText(SAY_COMMAND4, m_creature); break; + case 0: + DoPlaySoundToSet(m_creature, SAY_COMMAND1); + break; + case 1: + DoPlaySoundToSet(m_creature, SAY_COMMAND2); + break; + case 2: + DoPlaySoundToSet(m_creature, SAY_COMMAND3); + break; + case 3: + DoPlaySoundToSet(m_creature, SAY_COMMAND4); + break; } - m_uiCommandSoundTimer = 40000; - } - else - m_uiCommandSoundTimer -= uiDiff; + CommandSound_Timer = 40000; + }else CommandSound_Timer -= diff; DoMeleeAttackIfReady(); } + }; CreatureAI* GetAI_boss_razuvious(Creature* pCreature) { @@ -168,6 +225,13 @@ CreatureAI* GetAI_boss_razuvious(Creature* pCreature) void AddSC_boss_razuvious() { Script* NewScript; + + NewScript = new Script; + NewScript->Name = "npc_obedience_crystal"; + NewScript->pGossipHello = &GossipHello_npc_obedience_crystal; + NewScript->pGossipSelect = &GossipSelect_npc_obedience_crystal; + NewScript->RegisterSelf(); + NewScript = new Script; NewScript->Name = "boss_razuvious"; NewScript->GetAI = &GetAI_boss_razuvious; diff --git a/scripts/northrend/naxxramas/boss_sapphiron.cpp b/scripts/northrend/naxxramas/boss_sapphiron.cpp index 1803f4c1f..c232c2551 100644 --- a/scripts/northrend/naxxramas/boss_sapphiron.cpp +++ b/scripts/northrend/naxxramas/boss_sapphiron.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 +/* Copyright (C) 2006 - 2009 ScriptDev2 * 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 @@ -22,34 +22,43 @@ SDCategory: Naxxramas EndScriptData */ #include "precompiled.h" - -#define EMOTE_BREATH -1533082 -#define EMOTE_ENRAGE -1533083 - -#define SPELL_ICEBOLT 28522 -#define SPELL_FROST_BREATH 29318 //should be 28524 -#define SPELL_FROST_AURA 28531 -#define H_SPELL_FROST_AURA 55799 -#define SPELL_LIFE_DRAIN 28542 -#define H_SPELL_LIFE_DRAIN 55665 -#define SPELL_BLIZZARD 28547 -#define H_SPELL_BLIZZARD 55699 -#define SPELL_TAIL_SWEEP 55697 -#define H_SPELL_TAIL_SWEEP 55696 -#define SPELL_CLEAVE 19983 -#define SPELL_BERSERK 26662 #include "naxxramas.h" +enum +{ + EMOTE_BREATH = -1533082, + EMOTE_ENRAGE = -1533083, + + SPELL_ICEBOLT = 28522, + SPELL_FROST_BREATH = 29318, + SPELL_FROST_BREATH_H = 28524, + SPELL_FROST_AURA = 28531, + SPELL_LIFE_DRAIN = 28542, + SPELL_LIFE_DRAIN_H = 55665, + SPELL_BLIZZARD = 28547, + SPELL_BESERK = 26662, + SPELL_ICEBOLT_VISUAL = 45776, + SPELL_CLEAVE = 19983, + SPELL_TAIL_LASH = 55697, + SPELL_TAIL_LASH_H = 55696, + SPELL_DIES = 29357, + + SAPPHIRON_X = 3522, + SAPPHIRON_Y = -5236, + SAPPHIRON_Z = 137 +}; struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI { boss_sapphironAI(Creature* pCreature) : ScriptedAI(pCreature) { - Regular = pCreature->GetMap()->IsRegularDifficulty(); + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - bool Regular; + ScriptedInstance *m_pInstance; + bool m_bIsRegularMode; uint32 Icebolt_Count; uint32 Icebolt_Timer; @@ -57,33 +66,96 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI uint32 FrostAura_Timer; uint32 LifeDrain_Timer; uint32 Blizzard_Timer; - uint32 TailSweep_Timer; - uint32 Cleave_Timer; uint32 Fly_Timer; - uint32 Berserk_Timer; + uint32 Beserk_Timer; + uint32 m_uiCleaveTimer; + uint32 m_uiTailSweepTimer; uint32 phase; bool landoff; + bool isAtGround; uint32 land_Timer; + std::vector targets; + uint32 land_time; + void Reset() { FrostAura_Timer = 2000; - FrostBreath_Timer = 6000; + FrostBreath_Timer = 2500; LifeDrain_Timer = 24000; Blizzard_Timer = 20000; Fly_Timer = 45000; - TailSweep_Timer = 10000 + rand()%10000; - Cleave_Timer = 10000 + rand()%10000; Icebolt_Timer = 4000; land_Timer = 2000; - Berserk_Timer = 900000; + Beserk_Timer = 900000; + m_uiCleaveTimer = 7000; + m_uiTailSweepTimer = 20000; phase = 1; Icebolt_Count = 0; landoff = false; + isAtGround = true; + targets.clear(); + land_time = 0; + if (m_pInstance) + m_pInstance->SetData(TYPE_SAPPHIRON, NOT_STARTED); //m_creature->ApplySpellMod(SPELL_FROST_AURA, SPELLMOD_DURATION, -1); } + void Aggro(Unit* who) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_SAPPHIRON, IN_PROGRESS); + } + + void SpellHitTarget(Unit *target, const SpellEntry *spell) + { + if(spell->Id == SPELL_ICEBOLT) + { + if (target->isAlive() && target->HasAura(SPELL_ICEBOLT)) + { + target->CastSpell(target, 62766, true); + target->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true); + } + +/* for(std::vector::iterator itr = targets.begin(); itr!= targets.end(); ++itr) + { + if (*itr) + { + if (target->isAlive() && (*itr)->GetGUID() == target->GetGUID() && !((*itr)->HasAura(SPELL_ICEBOLT))) + { + target->CastSpell(target, 62766, true); + target->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true); + } + } + } +*/ + return; + } + + if(spell->Id == SPELL_FROST_BREATH || spell->Id == SPELL_FROST_BREATH_H) + { + if (target->GetTypeId() != TYPEID_PLAYER) + return; + + if (target->HasAura(SPELL_ICEBOLT)) + { + target->RemoveAurasDueToSpell(62766); + target->RemoveAurasDueToSpell(SPELL_ICEBOLT); + target->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, false); + return; + } + } + } + + void JustDied(Unit* pKiller) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_SAPPHIRON, DONE); + + m_creature->CastSpell(m_creature, SPELL_DIES, true); + } + void UpdateAI(const uint32 diff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -93,42 +165,43 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI { if (FrostAura_Timer < diff) { - DoCast(m_creature->getVictim(), Regular ? SPELL_FROST_AURA : H_SPELL_FROST_AURA); + DoCast(m_creature->getVictim(),SPELL_FROST_AURA); FrostAura_Timer = 5000; - } - else FrostAura_Timer -= diff; + }else FrostAura_Timer -= diff; if (LifeDrain_Timer < diff) { if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(target, Regular ? SPELL_LIFE_DRAIN : H_SPELL_LIFE_DRAIN); + DoCast(target, m_bIsRegularMode ? SPELL_LIFE_DRAIN : SPELL_LIFE_DRAIN_H); LifeDrain_Timer = 24000; - } - else LifeDrain_Timer -= diff; + }else LifeDrain_Timer -= diff; if (Blizzard_Timer < diff) { if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(target, Regular ? SPELL_BLIZZARD : H_SPELL_BLIZZARD); + DoCast(target,SPELL_BLIZZARD); Blizzard_Timer = 20000; - } - else Blizzard_Timer -= diff; + }else Blizzard_Timer -= diff; - if(TailSweep_Timer < diff) + // Cleave + if (m_uiCleaveTimer < diff) { - DoCast(m_creature->getVictim(), Regular ? SPELL_TAIL_SWEEP : H_SPELL_TAIL_SWEEP); - TailSweep_Timer = 10000 + rand()%10000; + DoCast(m_creature->getVictim(), SPELL_CLEAVE); + m_uiCleaveTimer = 7000 + rand()%3000; } - else TailSweep_Timer -= diff; + else + m_uiCleaveTimer -= diff; - if(Cleave_Timer < diff) + // Tail Sweep + if (m_uiTailSweepTimer < diff) { - DoCast(m_creature->getVictim(), SPELL_CLEAVE); - Cleave_Timer = 10000 + rand()%10000; + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_TAIL_LASH : SPELL_TAIL_LASH_H); + m_uiTailSweepTimer = 15000 + rand()%5000; } - else Cleave_Timer -= diff; + else + m_uiTailSweepTimer -= diff; if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() > 10) { @@ -136,19 +209,19 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI { phase = 2; m_creature->InterruptNonMeleeSpells(false); + m_creature->StopMoving(); m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF); m_creature->GetMotionMaster()->Clear(false); m_creature->GetMotionMaster()->MoveIdle(); + m_creature->MonsterMove(SAPPHIRON_X, SAPPHIRON_Y, SAPPHIRON_Z + 20, 1); + //DoCast(m_creature,11010); - m_creature->SetHover(true); + //m_creature->SetHover(true); //DoCast(m_creature,18430); -// DoCastSpellIfCan(m_creature,11010); -// DoCastSpellIfCan(m_creature,18430); Icebolt_Timer = 4000; Icebolt_Count = 0; landoff = false; - } - else Fly_Timer -= diff; + }else Fly_Timer -= diff; } } @@ -156,25 +229,50 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI { if (Icebolt_Timer < diff && Icebolt_Count < 5) { - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(target, SPELL_ICEBOLT); + if (Icebolt_Count == 1 || Icebolt_Count == 3) + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + { + DoCast(target, SPELL_ICEBOLT); + targets.push_back(target); + } ++Icebolt_Count; Icebolt_Timer = 4000; - } - else Icebolt_Timer -= diff; + }else Icebolt_Timer -= diff; if (Icebolt_Count == 5 && !landoff) { if (FrostBreath_Timer < diff) { + // apply immune + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator iter = tList.begin();iter != tList.end(); ++iter) + { + Unit* pUnit = Unit::GetUnit((*m_creature), (*iter)->getUnitGuid()); + if (pUnit && (pUnit->GetTypeId() == TYPEID_PLAYER) && pUnit->isAlive()) + { + if (!pUnit->HasAura(SPELL_ICEBOLT)) + { + for(std::vector::iterator itr = targets.begin(); itr!= targets.end(); ++itr) + { + if (*itr) + { + if(!(*itr)->isAlive()) + return; + if (pUnit->GetDistance2d(*itr) <= 5 && (*itr)->HasAura(SPELL_ICEBOLT)) + pUnit->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true); + } + } + } + } + } + DoScriptText(EMOTE_BREATH, m_creature); - DoCastSpellIfCan(m_creature->getVictim(),SPELL_FROST_BREATH); + DoCast(m_creature->getVictim(),m_bIsRegularMode ? SPELL_FROST_BREATH : SPELL_FROST_BREATH_H); land_Timer = 2000; landoff = true; FrostBreath_Timer = 6000; - } - else FrostBreath_Timer -= diff; + }else FrostBreath_Timer -= diff; } if (landoff) @@ -183,24 +281,42 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI { phase = 1; m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LAND); - m_creature->SetHover(false); - m_creature->GetMotionMaster()->Clear(false); - m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + //m_creature->SetHover(false); + //m_creature->GetMotionMaster()->Clear(false); + //m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator iter = tList.begin();iter != tList.end(); ++iter) + { + Unit* pUnit = Unit::GetUnit((*m_creature), (*iter)->getUnitGuid()); + if (pUnit && (pUnit->GetTypeId() == TYPEID_PLAYER)) + pUnit->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, false); + } + + targets.clear(); Fly_Timer = 67000; - } - else land_Timer -= diff; + isAtGround = false; + land_time = 3500; + }else land_Timer -= diff; } } - - if (Berserk_Timer < diff) + if(phase == 1 && isAtGround == false) { - DoScriptText(EMOTE_ENRAGE, m_creature); - DoCast(m_creature, SPELL_BERSERK); - Berserk_Timer = 300000; + if(land_time < diff) + { + isAtGround = true; + DoStartMovement(m_creature->getVictim()); + }else land_time -=diff; } - else Berserk_Timer -= diff; + if (Beserk_Timer < diff) + { + DoScriptText(EMOTE_ENRAGE, m_creature); + DoCast(m_creature,SPELL_BESERK); + Beserk_Timer = 900000; + }else Beserk_Timer -= diff; + - if (phase!=2) + if (phase!=2 && isAtGround == true) DoMeleeAttackIfReady(); } }; @@ -212,11 +328,6 @@ CreatureAI* GetAI_boss_sapphiron(Creature* pCreature) void AddSC_boss_sapphiron() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_sapphiron"; - newscript->GetAI = &GetAI_boss_sapphiron; - newscript->RegisterSelf(); Script* NewScript; NewScript = new Script; NewScript->Name = "boss_sapphiron"; diff --git a/scripts/northrend/naxxramas/boss_thaddius.cpp b/scripts/northrend/naxxramas/boss_thaddius.cpp index 3c31172c5..fd8b55834 100644 --- a/scripts/northrend/naxxramas/boss_thaddius.cpp +++ b/scripts/northrend/naxxramas/boss_thaddius.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 +/* Copyright (C) 2006 - 2009 ScriptDev2 * 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 diff --git a/scripts/northrend/naxxramas/instance_naxxramas.cpp b/scripts/northrend/naxxramas/instance_naxxramas.cpp index e79c2fef3..73b4cbedd 100644 --- a/scripts/northrend/naxxramas/instance_naxxramas.cpp +++ b/scripts/northrend/naxxramas/instance_naxxramas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 +/* Copyright (C) 2006 - 2009 ScriptDev2 * 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 @@ -14,7 +14,6 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* Originally based on BroodWyrm scripts. Modified by danbst. Rewrited by Lutik.*/ /* ScriptData SDName: Instance_Naxxramas SD%Complete: 90% @@ -25,319 +24,662 @@ EndScriptData */ #include "precompiled.h" #include "naxxramas.h" +#define SPELL_ERUPTION 29371 + +const float HeiganPos[2] = {2796, -3707}; +const float HeiganEruptionSlope[3] = +{ + (-3685 - HeiganPos[1]) /(2724 - HeiganPos[0]), + (-3647 - HeiganPos[1]) /(2749 - HeiganPos[0]), + (-3637 - HeiganPos[1]) /(2771 - HeiganPos[0]), +}; + +// 0 H x +// 1 ^ +// 2 | +// 3 y<--o +inline uint32 GetEruptionSection(float x, float y) +{ + y -= HeiganPos[1]; + if (y < 1.0f) + return 0; + + x -= HeiganPos[0]; + if (x > -1.0f) + return 3; + + float slope = y/x; + for (uint32 i = 0; i < 3; ++i) + if (slope > HeiganEruptionSlope[i]) + return i; + return 3; +} struct MANGOS_DLL_DECL instance_naxxramas : public ScriptedInstance { - instance_naxxramas(Map *Map) : ScriptedInstance(Map) - { - Regular = Map->IsRegularDifficulty(); - Initialize(); - }; + instance_naxxramas(Map* pMap) : ScriptedInstance(pMap) {Initialize();} - std::string str_data; + std::string strInstData; + uint32 m_auiEncounter[MAX_ENCOUNTER]; - uint32 mEncounter[ENCOUNTERS]; - uint32 mHorsemen[4]; + std::set HeiganEruption[4]; - bool Regular; - //Bosses and other NPC's - uint64 mFaerlinaGUID; - //Doors and other GO's - uint64 mAnubRoomDoorGUID; - uint64 mNothEnterDoorGUID; - uint64 mNothExitDoorGUID; - uint64 mGothikEnterDoorGUID; - uint64 mGothikCombatDoorGUID; - uint64 mGothikExitDoorGUID; - uint64 mGluthDoorGUID; - uint64 mHorsemenDoorGUID; + uint64 m_uiAracEyeRampGUID; + uint64 m_uiPlagEyeRampGUID; + uint64 m_uiMiliEyeRampGUID; + uint64 m_uiConsEyeRampGUID; - uint64 mHorsemenChestGUID; + uint64 m_uiAracPortalGUID; + uint64 m_uiPlagPortalGUID; + uint64 m_uiMiliPortalGUID; + uint64 m_uiConsPortalGUID; + uint64 m_uiAnubRekhanGUID; + uint64 m_uiFaerlinanGUID; - void OpenDoor(uint64 guid) - { - if(!guid) return; - GameObject* pGo = instance->GetGameObject(guid); - if(pGo) pGo->SetGoState(GO_STATE_ACTIVE); - } + uint64 m_uiZeliekGUID; + uint64 m_uiThaneGUID; + uint64 m_uiBlaumeuxGUID; + uint64 m_uiRivendareGUID; - void CloseDoor(uint64 guid) - { - if(!guid) return; - GameObject* pGo = instance->GetGameObject(guid); - if(pGo) pGo->SetGoState(GO_STATE_READY); - } - - void CheckHorsemen() - { - if(mHorsemen[0]==DONE && mHorsemen[1]==DONE && mHorsemen[2]==DONE && mHorsemen[3]==DONE) - SetData(TYPE_FOURHORSEMEN, DONE); - if(mHorsemen[0]==NOT_STARTED && mHorsemen[1]==NOT_STARTED && mHorsemen[2]==NOT_STARTED && mHorsemen[3]==NOT_STARTED) - SetData(TYPE_FOURHORSEMEN, NOT_STARTED); - } + uint64 m_uiThaddiusGUID; + uint64 m_uiStalaggGUID; + uint64 m_uiFeugenGUID; + uint64 m_uiHeiganGUID; + + uint64 m_uiPathExitDoorGUID; + uint64 m_uiGlutExitDoorGUID; + uint64 m_uiThadDoorGUID; + + uint64 m_uiAnubDoorGUID; + uint64 m_uiAnubGateGUID; + uint64 m_uiFaerDoorGUID; + uint64 m_uiFaerWebGUID; + uint64 m_uiMaexOuterGUID; + uint64 m_uiMaexInnerGUID; + + uint64 m_uiGothCombatGateGUID; + uint64 m_uiGothikEntryDoorGUID; + uint64 m_uiGothikExitDoorGUID; + uint64 m_uiHorsemenDoorGUID; + uint64 m_uiHorsemenChestGUID; + uint64 m_uiHorsemenChestHeroGUID; + + uint64 m_uiNothEntryDoorGUID; + uint64 m_uiNothExitDoorGUID; + uint64 m_uiHeigEntryDoorGUID; + uint64 m_uiHeigExitDoorGUID; + uint64 m_uiLoathebDoorGUID; + + uint64 m_uiKelthuzadDoorGUID; + + bool BlaumeuxDead; + bool RivendareDead; + bool ZeliekDead; + bool KorthazzDead; + + int32 DeadTimer; + uint32 HorsemanDeadCount; + bool UpdateCheck; void Initialize() { - //Bosses and other NPC's - mFaerlinaGUID = 0; - //Doors and other GO's - uint64 mAnubRoomDoorGUID = 0; - mNothEnterDoorGUID = 0; - mNothExitDoorGUID = 0; - mGothikEnterDoorGUID = 0; - mGothikCombatDoorGUID = 0; - mGothikExitDoorGUID = 0; - mGluthDoorGUID = 0; - mHorsemenChestGUID = 0; - mHorsemenDoorGUID = 0; - - for(uint8 i = 0; i < ENCOUNTERS; i++) - mEncounter[i] = NOT_STARTED; - - for(uint8 i = 0; i < 4; i++) - mHorsemen[i] = NOT_STARTED; + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + + m_uiAracEyeRampGUID = 0; + m_uiPlagEyeRampGUID = 0; + m_uiMiliEyeRampGUID = 0; + m_uiConsEyeRampGUID = 0; + + m_uiAracPortalGUID = 0; + m_uiPlagPortalGUID = 0; + m_uiMiliPortalGUID = 0; + m_uiConsPortalGUID = 0; + + m_uiAnubRekhanGUID = 0; + m_uiFaerlinanGUID = 0; + + m_uiZeliekGUID = 0; + m_uiThaneGUID = 0; + m_uiBlaumeuxGUID = 0; + m_uiRivendareGUID = 0; + + m_uiThaddiusGUID = 0; + m_uiStalaggGUID = 0; + m_uiFeugenGUID = 0; + m_uiHeiganGUID = 0; + + m_uiPathExitDoorGUID = 0; + m_uiGlutExitDoorGUID = 0; + m_uiThadDoorGUID = 0; + + m_uiAnubDoorGUID = 0; + m_uiAnubGateGUID = 0; + m_uiFaerDoorGUID = 0; + m_uiFaerWebGUID = 0; + m_uiMaexOuterGUID = 0; + m_uiMaexInnerGUID = 0; + + m_uiGothCombatGateGUID = 0; + m_uiGothikEntryDoorGUID = 0; + m_uiGothikExitDoorGUID = 0; + m_uiHorsemenDoorGUID = 0; + m_uiHorsemenChestGUID = 0; + m_uiHorsemenChestHeroGUID = 0; + + m_uiNothEntryDoorGUID = 0; + m_uiNothExitDoorGUID = 0; + m_uiHeigEntryDoorGUID = 0; + m_uiHeigExitDoorGUID = 0; + m_uiLoathebDoorGUID = 0; + + m_uiKelthuzadDoorGUID = 0; + + BlaumeuxDead = false; + RivendareDead = false; + ZeliekDead = false; + KorthazzDead = false; + + DeadTimer = 0; + UpdateCheck = true; } - void OnCreatureCreate(Creature *pCreature, uint32 entry) + void OnCreatureCreate(Creature* pCreature) { - switch(entry) + switch(pCreature->GetEntry()) { - //Spider Quarter - case 15953: mFaerlinaGUID = pCreature->GetGUID(); - //Military Quarter - //Plague Quarter - //Construct Quarter - //Frostwyrm Lair + case NPC_ANUB_REKHAN: m_uiAnubRekhanGUID = pCreature->GetGUID(); break; + case NPC_FAERLINA: m_uiFaerlinanGUID = pCreature->GetGUID(); break; + case NPC_THADDIUS: m_uiThaddiusGUID = pCreature->GetGUID(); break; + case NPC_STALAGG: m_uiStalaggGUID = pCreature->GetGUID(); break; + case NPC_FEUGEN: m_uiFeugenGUID = pCreature->GetGUID(); break; + case NPC_ZELIEK: m_uiZeliekGUID = pCreature->GetGUID(); break; + case NPC_THANE: m_uiThaneGUID = pCreature->GetGUID(); break; + case NPC_BLAUMEUX: m_uiBlaumeuxGUID = pCreature->GetGUID(); break; + case NPC_RIVENDARE: m_uiRivendareGUID = pCreature->GetGUID(); break; + case NPC_HEIGAN: m_uiHeiganGUID = pCreature->GetGUID(); break; } } - void OnObjectCreate(GameObject *pGo) + void OnObjectCreate(GameObject* pGo) { + if (pGo->GetGOInfo()->displayId == 6785 || pGo->GetGOInfo()->displayId == 1287) + { + uint32 section = GetEruptionSection(pGo->GetPositionX(), pGo->GetPositionY()); + HeiganEruption[section].insert(pGo); + + return; + } + switch(pGo->GetEntry()) { - case GO_ARAC_ANUB_DOOR: mAnubRoomDoorGUID = pGo->GetGUID(); break; - case GO_PLAG_NOTH_ENTRY_DOOR: mNothEnterDoorGUID = pGo->GetGUID(); break; - case GO_PLAG_NOTH_EXIT_DOOR: mNothExitDoorGUID = pGo->GetGUID(); break; - case GO_MILI_GOTH_ENTRY_GATE: mGothikEnterDoorGUID = pGo->GetGUID(); break; - case GO_MILI_GOTH_EXIT_GATE: mGothikExitDoorGUID = pGo->GetGUID(); break; - case GO_MILI_GOTH_COMBAT_GATE: mGothikCombatDoorGUID = pGo->GetGUID(); break; - case GO_CONS_GLUT_EXIT_DOOR: mGluthDoorGUID = pGo->GetGUID(); break; - case GO_CHEST_HORSEMEN_NORM: if(Regular) mHorsemenChestGUID = pGo->GetGUID(); break; - case GO_CHEST_HORSEMEN_HERO: if(!Regular) mHorsemenChestGUID = pGo->GetGUID(); break; - case GO_MILI_HORSEMEN_DOOR: mHorsemenDoorGUID = pGo->GetGUID(); break; + case GO_ARAC_ANUB_DOOR: + m_uiAnubDoorGUID = pGo->GetGUID(); + break; + case GO_ARAC_ANUB_GATE: + m_uiAnubGateGUID = pGo->GetGUID(); + if (m_auiEncounter[0] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_ARAC_FAER_WEB: + m_uiFaerWebGUID = pGo->GetGUID(); + break; + case GO_ARAC_FAER_DOOR: + m_uiFaerDoorGUID = pGo->GetGUID(); + if (m_auiEncounter[1] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_ARAC_MAEX_INNER_DOOR: + m_uiMaexInnerGUID = pGo->GetGUID(); + break; + case GO_ARAC_MAEX_OUTER_DOOR: + m_uiMaexOuterGUID = pGo->GetGUID(); + if (m_auiEncounter[2] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + + case GO_PLAG_NOTH_ENTRY_DOOR: + m_uiNothEntryDoorGUID = pGo->GetGUID(); + break; + case GO_PLAG_NOTH_EXIT_DOOR: + m_uiNothExitDoorGUID = pGo->GetGUID(); + if (m_auiEncounter[3] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_PLAG_HEIG_ENTRY_DOOR: + m_uiHeigEntryDoorGUID = pGo->GetGUID(); + if (m_auiEncounter[3] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_PLAG_HEIG_EXIT_DOOR: + m_uiHeigExitDoorGUID = pGo->GetGUID(); + if (m_auiEncounter[4] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_PLAG_LOAT_DOOR: + m_uiLoathebDoorGUID = pGo->GetGUID(); + break; + + case GO_MILI_GOTH_ENTRY_GATE: + m_uiGothikEntryDoorGUID = pGo->GetGUID(); + break; + case GO_MILI_GOTH_EXIT_GATE: + m_uiGothikExitDoorGUID = pGo->GetGUID(); + if (m_auiEncounter[7] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_MILI_GOTH_COMBAT_GATE: + m_uiGothCombatGateGUID = pGo->GetGUID(); + break; + case GO_MILI_HORSEMEN_DOOR: + m_uiHorsemenDoorGUID = pGo->GetGUID(); + if (m_auiEncounter[7] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + + case GO_CHEST_HORSEMEN_NORM: + m_uiHorsemenChestGUID = pGo->GetGUID(); + break; + + case GO_CHEST_HORSEMEN_HERO: + m_uiHorsemenChestHeroGUID = pGo->GetGUID(); + break; + + case GO_CONS_PATH_EXIT_DOOR: + m_uiPathExitDoorGUID = pGo->GetGUID(); + if (m_auiEncounter[9] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_CONS_GLUT_EXIT_DOOR: + m_uiGlutExitDoorGUID = pGo->GetGUID(); + if (m_auiEncounter[11] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_CONS_THAD_DOOR: + m_uiThadDoorGUID = pGo->GetGUID(); + if (m_auiEncounter[11] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + + case GO_KELTHUZAD_WATERFALL_DOOR: + m_uiKelthuzadDoorGUID = pGo->GetGUID(); + if (m_auiEncounter[13] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + + case GO_ARAC_EYE_RAMP: + m_uiAracEyeRampGUID = pGo->GetGUID(); + if (m_auiEncounter[2] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_PLAG_EYE_RAMP: + m_uiPlagEyeRampGUID = pGo->GetGUID(); + if (m_auiEncounter[5] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_MILI_EYE_RAMP: + m_uiMiliEyeRampGUID = pGo->GetGUID(); + if (m_auiEncounter[8] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_CONS_EYE_RAMP: + m_uiConsEyeRampGUID = pGo->GetGUID(); + if (m_auiEncounter[12] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_ARAC_PORTAL: + m_uiAracPortalGUID = pGo->GetGUID(); + break; + case GO_PLAG_PORTAL: + m_uiPlagPortalGUID = pGo->GetGUID(); + break; + case GO_MILI_PORTAL: + m_uiMiliPortalGUID = pGo->GetGUID(); + break; + case GO_CONS_PORTAL: + m_uiConsPortalGUID = pGo->GetGUID(); + break; } } - uint64 GetData64(uint32 type) + bool IsEncounterInProgress() const { - switch (type) - { - case GUID_FAERLINA: return mFaerlinaGUID; - } - return 0; + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) + if (m_auiEncounter[i] == IN_PROGRESS) + return true; + + return false; } - void SetData(uint32 type, uint32 data) + void SetData(uint32 uiType, uint32 uiData) { - //todo: rewrite door system - switch(type) + switch(uiType) { - //Spider Quarter - case TYPE_ANUBREKHAN: - mEncounter[0] = data; - if(data == IN_PROGRESS) - CloseDoor(mAnubRoomDoorGUID); - else - OpenDoor(mAnubRoomDoorGUID); + /*case DATA_HEIGAN_ERUPT: + HeiganErupt(uiData); */ + case TYPE_ANUB_REKHAN: + m_auiEncounter[0] = uiData; + DoUseDoorOrButton(m_uiAnubDoorGUID); + if (uiData == DONE) + DoUseDoorOrButton(m_uiAnubGateGUID); break; case TYPE_FAERLINA: - mEncounter[1] = data; + m_auiEncounter[1] = uiData; + DoUseDoorOrButton(m_uiFaerWebGUID); + if (uiData == DONE) + { + DoUseDoorOrButton(m_uiFaerDoorGUID); + DoUseDoorOrButton(m_uiMaexOuterGUID); + } break; case TYPE_MAEXXNA: - mEncounter[2] = data; - break; - //Construct Quarter - case TYPE_PATCHWERK: - mEncounter[3] = data; + m_auiEncounter[2] = uiData; + DoUseDoorOrButton(m_uiMaexInnerGUID, uiData); + if (uiData == DONE) + { + DoUseDoorOrButton(m_uiAracEyeRampGUID); + DoRespawnGameObject(m_uiAracPortalGUID, 30*MINUTE); + } break; - case TYPE_GROBBULUS: - mEncounter[4] = data; + case TYPE_NOTH: + m_auiEncounter[3] = uiData; + DoUseDoorOrButton(m_uiNothEntryDoorGUID); + if (uiData == DONE) + { + DoUseDoorOrButton(m_uiNothExitDoorGUID); + //DoUseDoorOrButton(m_uiHeigEntryDoorGUID); + } break; - case TYPE_GLUTH: - mEncounter[5] = data; - if(data == IN_PROGRESS) - CloseDoor(mGluthDoorGUID); - else - OpenDoor(mGluthDoorGUID); + case TYPE_HEIGAN: + m_auiEncounter[4] = uiData; + DoUseDoorOrButton(m_uiHeigEntryDoorGUID); + if (uiData == DONE) + DoUseDoorOrButton(m_uiHeigExitDoorGUID); break; - case TYPE_THADDIUS: - mEncounter[6] = data; + case TYPE_LOATHEB: + m_auiEncounter[5] = uiData; + DoUseDoorOrButton(m_uiLoathebDoorGUID); + if (uiData == DONE) + { + DoUseDoorOrButton(m_uiPlagEyeRampGUID); + DoRespawnGameObject(m_uiPlagPortalGUID, 30*MINUTE); + } break; - //Military Quarter case TYPE_RAZUVIOUS: - mEncounter[7] = data; + m_auiEncounter[6] = uiData; + if (uiData == DONE) + DoUseDoorOrButton(m_uiGothikEntryDoorGUID); break; case TYPE_GOTHIK: - mEncounter[8] = data; - if(data == IN_PROGRESS) + m_auiEncounter[7] = uiData; + DoUseDoorOrButton(m_uiGothikEntryDoorGUID); + if (uiData == DONE) { - CloseDoor(mGothikEnterDoorGUID); - CloseDoor(mGothikExitDoorGUID); - CloseDoor(mGothikCombatDoorGUID); + DoUseDoorOrButton(m_uiGothikExitDoorGUID); + DoUseDoorOrButton(m_uiHorsemenDoorGUID); } - else if(data == SPECIAL) + break; + case TYPE_BLAUMEUX: + if (uiData == DONE) + BlaumeuxDead = true; + Horseman(); + break; + case TYPE_RIVENDARE: + if (uiData == DONE) + RivendareDead = true; + Horseman(); + break; + case TYPE_ZELIEK: + if (uiData == DONE) + ZeliekDead = true; + Horseman(); + break; + case TYPE_KORTHAZZ: + if (uiData == DONE) + KorthazzDead = true; + Horseman(); + break; + case TYPE_FOUR_HORSEMEN: + m_auiEncounter[8] = uiData; + if (uiData == DONE) + DoUseDoorOrButton(IN_PROGRESS); + if (uiData == DONE) { - OpenDoor(mGothikCombatDoorGUID); + DoUseDoorOrButton(m_uiMiliEyeRampGUID); + DoRespawnGameObject(m_uiMiliPortalGUID, 30*MINUTE); + DoRespawnGameObject(m_uiHorsemenChestGUID, 30*MINUTE); + DoRespawnGameObject(m_uiHorsemenChestHeroGUID, 30*MINUTE); } - else //DONE, NOT_STARTED - { - OpenDoor(mGothikEnterDoorGUID); - OpenDoor(mGothikExitDoorGUID); - OpenDoor(mGothikCombatDoorGUID); - }; - break; - case TYPE_FOURHORSEMEN: - mEncounter[9] = data; - if(data == DONE) - { - DoRespawnGameObject(mHorsemenChestGUID, DAY); - }; - if(data == IN_PROGRESS) - CloseDoor(mHorsemenDoorGUID); - else - OpenDoor(mHorsemenDoorGUID); - break; - //Plague Quarter - case TYPE_NOTH: - mEncounter[10] = data; - if(data == IN_PROGRESS) + break; + case TYPE_PATCHWERK: + m_auiEncounter[9] = uiData; + if (uiData == DONE) + DoUseDoorOrButton(m_uiPathExitDoorGUID); + break; + case TYPE_GROBBULUS: + m_auiEncounter[10] = uiData; + break; + case TYPE_GLUTH: + m_auiEncounter[11] = uiData; + if (uiData == DONE) { - CloseDoor(mNothEnterDoorGUID); - CloseDoor(mNothExitDoorGUID); + DoUseDoorOrButton(m_uiGlutExitDoorGUID); + DoUseDoorOrButton(m_uiThadDoorGUID); } - else + break; + case TYPE_THADDIUS: + m_auiEncounter[12] = uiData; + DoUseDoorOrButton(m_uiThadDoorGUID, uiData); + if (uiData == DONE) { - OpenDoor(mNothEnterDoorGUID); - OpenDoor(mNothExitDoorGUID); + DoUseDoorOrButton(m_uiConsEyeRampGUID); + DoRespawnGameObject(m_uiConsPortalGUID, 30*MINUTE); } break; - case TYPE_HEIGAN: - mEncounter[11] = data; - break; - case TYPE_LOATHEB: - mEncounter[12] = data; - break; - //Frostwyrm Lair case TYPE_SAPPHIRON: - mEncounter[13] = data; + m_auiEncounter[13] = uiData; + if (uiData == DONE) + DoUseDoorOrButton(m_uiKelthuzadDoorGUID); break; case TYPE_KELTHUZAD: - mEncounter[14] = data; + m_auiEncounter[14] = uiData; break; - - //Four Horsemen Chest - case TYPE_BLAUMEAUX: - mHorsemen[0] = data; CheckHorsemen(); break; - case TYPE_RIVENDARE: - mHorsemen[1] = data; CheckHorsemen(); break; - case TYPE_KORTHAZZ: - mHorsemen[2] = data; CheckHorsemen(); break; - case TYPE_ZELIEK: - mHorsemen[3] = data; CheckHorsemen(); break; - - - - } - if (data == DONE) + if (uiData == DONE) { OUT_SAVE_INST_DATA; std::ostringstream saveStream; - saveStream << mEncounter[0] << " " << mEncounter[1] << " " << mEncounter[2] << " " - << mEncounter[3] << " " << mEncounter[4] << " " << mEncounter[5] << " " - << mEncounter[6] << " " << mEncounter[7] << " " << mEncounter[8] << " " - << mEncounter[9] << " " << mEncounter[10] << " " << mEncounter[11] << " " - << mEncounter[12] << " " << mEncounter[13] << " " << mEncounter[14]; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " + << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " + << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8] << " " + << m_auiEncounter[9] << " " << m_auiEncounter[10] << " " << m_auiEncounter[11] << " " + << m_auiEncounter[12] << " " << m_auiEncounter[13] << " " << m_auiEncounter[14]; - str_data = saveStream.str(); + strInstData = saveStream.str(); SaveToDB(); OUT_SAVE_INST_DATA_COMPLETE; } } - uint32 GetData(uint32 type) + void Horseman() { - switch (type) + if (BlaumeuxDead && RivendareDead && ZeliekDead && KorthazzDead) { - //Arachnid Quarter - case TYPE_ANUBREKHAN: return mEncounter[0]; - case TYPE_FAERLINA: return mEncounter[1]; - case TYPE_MAEXXNA: return mEncounter[2]; - //Construct Quarter - case TYPE_PATCHWERK: return mEncounter[3]; - case TYPE_GROBBULUS: return mEncounter[4]; - case TYPE_GLUTH: return mEncounter[5]; - case TYPE_THADDIUS: return mEncounter[6]; - //Military Quarter - case TYPE_RAZUVIOUS: return mEncounter[7]; - case TYPE_GOTHIK: return mEncounter[8]; - case TYPE_FOURHORSEMEN: return mEncounter[9]; - //Plague Quarter - case TYPE_NOTH: return mEncounter[10]; - case TYPE_HEIGAN: return mEncounter[11]; - case TYPE_LOATHEB: return mEncounter[12]; - //Frostwyrm Lair - case TYPE_SAPPHIRON: return mEncounter[13]; - case TYPE_KELTHUZAD: return mEncounter[14]; + SetData(TYPE_FOUR_HORSEMEN, DONE); + +/* AchievementEntry const *AchievHorsemen = GetAchievementStore()->LookupEntry(instance->IsRegularDifficulty() ? ACHIEVEMENT_HORSEMEN : H_ACHIEVEMENT_HORSEMEN); + if(AchievHorsemen && this) + { + Map::PlayerList const &lPlayers = instance->GetPlayers(); + if (!lPlayers.isEmpty()) + { + for(Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr) + { + if (Player* pPlayer = itr->getSource()) + pPlayer->GetAchievementMgr().CompletedAchievement(AchievHorsemen); + } + } + }*/ } - return 0; } + +/* void HeiganErupt(uint32 section) + { + for (uint32 i = 0; i < 4; ++i) + { + if (i == section) + continue; + + for (std::set::iterator itr = HeiganEruption[i].begin(); itr != HeiganEruption[i].end(); ++itr) + { + + (*itr)->SendCustomAnim(); + //(*itr)->SummonCreature(15384, (*itr)->GetPositionX(), (*itr)->GetPositionY(), (*itr)->GetPositionZ(), 0, TEMPSUMMON_DEAD_DESPAWN, 0); + + } + } + } */ + const char* Save() { - return str_data.c_str(); + return strInstData.c_str(); } - void Load(const char* in) + void Load(const char* chrIn) { - if (!in) + if (!chrIn) { OUT_LOAD_INST_DATA_FAIL; return; } - OUT_LOAD_INST_DATA(in); + OUT_LOAD_INST_DATA(chrIn); + + std::istringstream loadStream(chrIn); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] + >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] + >> m_auiEncounter[8] >> m_auiEncounter[9] >> m_auiEncounter[10] >> m_auiEncounter[11] + >> m_auiEncounter[12] >> m_auiEncounter[13] >> m_auiEncounter[14]; - std::istringstream loadStream(in); - loadStream >> mEncounter[0] >> mEncounter[1] >> mEncounter[2] - >> mEncounter[3] >> mEncounter[4] >> mEncounter[5] - >> mEncounter[6] >> mEncounter[7] >> mEncounter[8] - >> mEncounter[9] >> mEncounter[10] >> mEncounter[11] - >> mEncounter[12] >> mEncounter[13] >> mEncounter[14]; - for(uint32 i = 0; i < ENCOUNTERS; i++) + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) { - if (mEncounter[i] == IN_PROGRESS) // Do not load an encounter as "In Progress" - reset it instead. - mEncounter[i] = NOT_STARTED; - SetData(i,mEncounter[i]); + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; } + OUT_LOAD_INST_DATA_COMPLETE; } + + uint32 GetData(uint32 uiType) + { + switch(uiType) + { + case TYPE_ANUB_REKHAN: + return m_auiEncounter[0]; + case TYPE_FAERLINA: + return m_auiEncounter[1]; + case TYPE_MAEXXNA: + return m_auiEncounter[2]; + case TYPE_NOTH: + return m_auiEncounter[3]; + case TYPE_HEIGAN: + return m_auiEncounter[4]; + case TYPE_LOATHEB: + return m_auiEncounter[5]; + case TYPE_RAZUVIOUS: + return m_auiEncounter[6]; + case TYPE_GOTHIK: + return m_auiEncounter[7]; + case TYPE_FOUR_HORSEMEN: + return m_auiEncounter[8]; + case TYPE_PATCHWERK: + return m_auiEncounter[9]; + case TYPE_GROBBULUS: + return m_auiEncounter[10]; + case TYPE_GLUTH: + return m_auiEncounter[11]; + case TYPE_THADDIUS: + return m_auiEncounter[12]; + case TYPE_SAPPHIRON: + return m_auiEncounter[13]; + case TYPE_KELTHUZAD: + return m_auiEncounter[14]; + } + return 0; + } + + uint64 GetData64(uint32 uiData) + { + switch(uiData) + { + case NPC_ANUB_REKHAN: + return m_uiAnubRekhanGUID; + case NPC_FAERLINA: + return m_uiFaerlinanGUID; + case GO_MILI_GOTH_COMBAT_GATE: + return m_uiGothCombatGateGUID; + case NPC_ZELIEK: + return m_uiZeliekGUID; + case NPC_THANE: + return m_uiThaneGUID; + case NPC_BLAUMEUX: + return m_uiBlaumeuxGUID; + case NPC_RIVENDARE: + return m_uiRivendareGUID; + case NPC_THADDIUS: + return m_uiThaddiusGUID; + case NPC_STALAGG: + return m_uiStalaggGUID; + case NPC_FEUGEN: + return m_uiFeugenGUID; + case NPC_HEIGAN: + return m_uiHeiganGUID; + } + return 0; + } + + void Update(uint32 uiDiff) + { + if (BlaumeuxDead || RivendareDead || ZeliekDead || KorthazzDead) + { + if (DeadTimer < 15000 && UpdateCheck) + { + if (BlaumeuxDead && RivendareDead && ZeliekDead && KorthazzDead) + { +/* AchievementEntry const *AchievHorsemen = GetAchievementStore()->LookupEntry(instance->IsRegularDifficulty() ? ACHIEVEMENT_TOGETHER : H_ACHIEVEMENT_TOGETHER); + if(AchievHorsemen && this) + { + Map::PlayerList const &lPlayers = instance->GetPlayers(); + if (!lPlayers.isEmpty()) + { + for(Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr) + { + if (Player* pPlayer = itr->getSource()) + pPlayer->GetAchievementMgr().CompletedAchievement(AchievHorsemen); + } + } + }*/ + UpdateCheck = false; + } + }else DeadTimer += uiDiff; + } + } }; -InstanceData* GetInstanceData_naxxramas(Map* map) +InstanceData* GetInstanceData_instance_naxxramas(Map* pMap) { - return new instance_naxxramas(map); + return new instance_naxxramas(pMap); } void AddSC_instance_naxxramas() { - Script *newscript; - newscript = new Script; - newscript->Name = "instance_naxxramas"; - newscript->GetInstanceData = &GetInstanceData_naxxramas; - newscript->RegisterSelf(); + Script* pNewScript; + pNewScript = new Script; + pNewScript->Name = "instance_naxxramas"; + pNewScript->GetInstanceData = &GetInstanceData_instance_naxxramas; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/naxxramas/naxxramas.h b/scripts/northrend/naxxramas/naxxramas.h index 934ab3761..e7163313f 100644 --- a/scripts/northrend/naxxramas/naxxramas.h +++ b/scripts/northrend/naxxramas/naxxramas.h @@ -1,55 +1,69 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 +/* Copyright (C) 2006 - 2009 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ -/* Originally based on BroodWyrm scripts. Modified by danbst. Modified by Lutik.*/ - #ifndef DEF_NAXXRAMAS_H #define DEF_NAXXRAMAS_H enum { - //Spider Quarter - TYPE_ANUBREKHAN = 0, - TYPE_FAERLINA = 1, - TYPE_MAEXXNA = 2, - - //Construct Quarter - TYPE_PATCHWERK = 3, - TYPE_GROBBULUS = 4, - TYPE_GLUTH = 5, - TYPE_THADDIUS = 6, - - //Military Quarter - TYPE_RAZUVIOUS = 7, - TYPE_GOTHIK = 8, - TYPE_FOURHORSEMEN = 9, - - //Plague Quarter - TYPE_NOTH = 10, - TYPE_HEIGAN = 11, - TYPE_LOATHEB = 12, - - //Frostwyrm Lair - TYPE_SAPPHIRON = 13, - TYPE_KELTHUZAD = 14, - - //Misc - TYPE_KORTHAZZ, - TYPE_BLAUMEAUX, - TYPE_ZELIEK, - TYPE_RIVENDARE, - - ENCOUNTERS = 15 -}; - -enum -{ - GUID_FAERLINA -}; - -enum -{ + MAX_ENCOUNTER = 15, + + TYPE_ANUB_REKHAN = 1, + TYPE_FAERLINA = 2, + TYPE_MAEXXNA = 3, + + TYPE_NOTH = 4, + TYPE_HEIGAN = 5, + TYPE_LOATHEB = 6, + + TYPE_RAZUVIOUS = 7, + TYPE_GOTHIK = 8, + TYPE_FOUR_HORSEMEN = 9, + + TYPE_PATCHWERK = 10, + TYPE_GROBBULUS = 11, + TYPE_GLUTH = 12, + TYPE_THADDIUS = 13, + TYPE_STALAGG = 14, + TYPE_FEUGEN = 15, + + TYPE_SAPPHIRON = 16, + TYPE_KELTHUZAD = 17, + + TYPE_BLAUMEUX = 18, + TYPE_RIVENDARE = 19, + TYPE_ZELIEK = 20, + TYPE_KORTHAZZ = 21, + + DATA_ANUB_REKHAN = 30, + DATA_FAERLINA = 31, + DATA_GOTHIK_GATE = 32, + + DATA_THADDIUS = 33, + DATA_STALAGG = 34, + DATA_FEUGEN = 35, + + DATA_KORTHAZZ = 36, + DATA_RIVENDARE = 37, + DATA_BLAUMEUX = 38, + DATA_ZELIEK = 39, + DATA_HEIGAN_ERUPT = 40, + + NPC_ANUB_REKHAN = 15956, + NPC_FAERLINA = 15953, + + NPC_THADDIUS = 15928, + NPC_STALAGG = 15929, + NPC_FEUGEN = 15930, + + NPC_ZELIEK = 16063, + NPC_THANE = 16064, + NPC_BLAUMEUX = 16065, + NPC_RIVENDARE = 30549, + NPC_HEIGAN = 15936, + + // Arachnid Quarter GO_ARAC_ANUB_DOOR = 181126, //encounter door GO_ARAC_ANUB_GATE = 181195, //open after boss is dead GO_ARAC_FAER_WEB = 181235, //encounter door @@ -94,7 +108,13 @@ enum GO_PLAG_PORTAL = 181577, GO_MILI_PORTAL = 181578, GO_CONS_PORTAL = 181576, - AREATRIGGER_FROSTWYRM = 4120 //not needed here, but AT to be scripted + + AREATRIGGER_FROSTWYRM = 4120, //not needed here, but AT to be scripted + + ACHIEVEMENT_HORSEMEN = 568, + H_ACHIEVEMENT_HORSEMEN = 569, + ACHIEVEMENT_TOGETHER = 2176, + H_ACHIEVEMENT_TOGETHER = 2177, }; #endif From 168fe5b53bdeef42ff05f74caabc450c0529964d Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 18 Feb 2010 19:41:11 +0300 Subject: [PATCH 153/405] Icecrown change part 4 --- addition/723_icecrown_down_mangos.sql | 5 +- addition/725_halls_of_reflection_mangos.sql | 4 - addition/726_naxxramas_mangos.sql | 110 ++++++++++++++++++ .../halls_of_reflection/boss_falryn.cpp | 62 +++++++--- .../halls_of_reflection/boss_marwyn.cpp | 70 ++++++----- .../instance_halls_of_reflection.cpp | 31 ++++- 6 files changed, 226 insertions(+), 56 deletions(-) delete mode 100644 addition/725_halls_of_reflection_mangos.sql create mode 100644 addition/726_naxxramas_mangos.sql diff --git a/addition/723_icecrown_down_mangos.sql b/addition/723_icecrown_down_mangos.sql index aa97f5cdc..7af4dfee7 100644 --- a/addition/723_icecrown_down_mangos.sql +++ b/addition/723_icecrown_down_mangos.sql @@ -3,8 +3,9 @@ -- UPDATE `creature_template` SET `ScriptName`='boss_bronjahm' WHERE `entry`=36497; -- UPDATE `creature_template` SET `ScriptName`='boss_devourer' WHERE `entry`=33113; - -- UPDATE `instance_template` SET `script`='instance_pit_of_saron' WHERE `map`=658; - -- UPDATE `instance_template` SET `script`='instance_halls_of_reflection' WHERE `map`=668; +-- UPDATE `creature_template` SET `ScriptName`='boss_falryn' WHERE `entry`=33112; +-- UPDATE `creature_template` SET `ScriptName`='boss_marwyn' WHERE `entry`=38113; +-- UPDATE `creature_template` SET `ScriptName`='boss_lich_king_fh' WHERE `entry`=37226; diff --git a/addition/725_halls_of_reflection_mangos.sql b/addition/725_halls_of_reflection_mangos.sql deleted file mode 100644 index 35d150bfc..000000000 --- a/addition/725_halls_of_reflection_mangos.sql +++ /dev/null @@ -1,4 +0,0 @@ --- UPDATE `instance_template` SET `script`='instance_halls_of_reflection' WHERE `map`=668; --- UPDATE `creature_template` SET `ScriptName`='boss_falryn' WHERE `entry`=33112; --- UPDATE `creature_template` SET `ScriptName`='boss_marwyn' WHERE `entry`=38113; --- UPDATE `creature_template` SET `ScriptName`='boss_lich_king_fh' WHERE `entry`=37226; diff --git a/addition/726_naxxramas_mangos.sql b/addition/726_naxxramas_mangos.sql new file mode 100644 index 000000000..c14cf2027 --- /dev/null +++ b/addition/726_naxxramas_mangos.sql @@ -0,0 +1,110 @@ +-- Arachnid Quarter +UPDATE `creature_template` SET `ScriptName`='mob_crypt_guard' WHERE `entry` IN (16573); +UPDATE `creature_template` SET `ScriptName`='mob_worshippers' WHERE `entry`='16506'; +UPDATE `creature_template` SET `ScriptName`='mob_webwrap' WHERE `entry`='16486'; +UPDATE `creature_template` SET `flags_extra` = '2' WHERE `entry` IN ('16486','30183'); +DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (16506); +-- Construct Quarter +UPDATE `creature_template` SET `ScriptName`='boss_grobbulus' WHERE `entry`='15931'; +UPDATE `creature_template` SET `ScriptName`='npc_grobbulus_poison_cloud' WHERE `entry`='16363'; +UPDATE `creature_template` SET `ScriptName`='boss_thaddius', `unit_flags`=0 WHERE `entry`='15928'; +UPDATE `creature_template` SET `ScriptName`='mob_stalagg' WHERE `entry`='15929'; +UPDATE `creature_template` SET `ScriptName`='mob_feugen' WHERE `entry`='15930'; +UPDATE `creature_template` SET `unit_flags`=0 WHERE `entry` = '16027'; +UPDATE `creature_template` SET `ScriptName`='mob_zombie_chows' WHERE `entry` = '16360'; +-- Military Quarter +UPDATE `creature_template` SET `attackpower` = `attackpower`*40 WHERE `entry` IN (16061,29940); -- Instructor Razuvious +UPDATE `creature_template` SET `attackpower` = `attackpower`*12 WHERE `entry` IN (16803,29941); -- Death Knight Understudy +UPDATE `creature_template` SET `spell1`=61696, `spell2`=29060, `spell3`=29061 WHERE `entry` IN (16803); +UPDATE `creature` SET `MovementType`=0, `spawndist`=0 WHERE `id`=16211; +UPDATE `creature_template` SET `ScriptName`='boss_gothik' WHERE `entry`='16060'; +UPDATE `creature_template` SET `flags_extra` = '2' WHERE `entry` IN (16697); +UPDATE `gameobject` SET `spawntimesecs`=-604800 WHERE `id` IN ('181366','193426'); +-- Plague Quarter +UPDATE `creature_template` SET `ScriptName`='boss_heigan' WHERE `entry`='15936'; +UPDATE `creature_template` SET `ScriptName`='npc_loatheb_spores' WHERE `entry`='16286'; +-- Frostwyrm Lair +UPDATE `creature_template` SET `ScriptName`='boss_kelthuzad' WHERE `entry`='15990'; +UPDATE `creature_template` SET `ScriptName`='mob_shadow_issure', `flags_extra` = '2', `faction_A`=16, `faction_H`=16 WHERE `entry`='16129'; +-- Adds +UPDATE `creature_template` SET `AIName`='EventAI' WHERE `entry` IN (16981, 16427, 16429); +DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (16981, 16427, 16429); +INSERT INTO `creature_ai_scripts` VALUES +('1698101', '16981', '0', '0', '100', '3', '10000', '20000', '10000', '20000', '11', '54890', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', ''), +('1698102', '16981', '0', '0', '100', '5', '10000', '20000', '10000', '20000', '11', '54891', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', ''), +('1642701', '16427', '6', '0', '100', '3', '0', '0', '0', '0', '11', '28457', '6', '7', '0', '0', '0', '0', '0', '0', '0', '0', 'Soldiers of the Frozen Wastes - Dark Blast'), +('1642702', '16427', '6', '0', '100', '5', '0', '0', '0', '0', '11', '55714', '6', '7', '0', '0', '0', '0', '0', '0', '0', '0', 'Soldiers of the Frozen Wastes - Dark Blast'), +('1642901', '16429', '0', '0', '100', '3', '10000', '20000', '10000', '20000', '11', '28459', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Soul Weaver - Wail of Souls'), +('1642902', '16429', '0', '0', '100', '5', '10000', '20000', '10000', '20000', '11', '55765', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Soul Weaver - Wail of Souls'); +UPDATE gameobject SET `state`='1' WHERE `map`=533 AND `id` IN (181225,181124); +DELETE FROM `spell_target_position` WHERE `id` IN (28444); +INSERT INTO `spell_target_position` VALUES (28444, 533, 3005.776, -3483.284, 299.551, 1.552); +-- Portal at end +UPDATE `gameobject_template` SET `flags`=0 WHERE `entry` IN ('181575', '181576', '181577', '181578'); -- 16 +DELETE FROM `gameobject` WHERE `id` in ('181575', '181576', '181577', '181578'); +INSERT INTO `gameobject` (`id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(181575, 533, 3, 1, 3521.34, -3942.85, 308.106, 2.12884, 0, 0, 1, 0, -604800, 0, 1), +(181576, 533, 3, 1, 3548.85, -2958.15, 302.688, 3.16206, 0, 0, 1, 0, -604800, 0, 1), +(181577, 533, 3, 1, 2909, -4025.02, 273.475, 3.14159, 0, 0, 1, 0, -604800, 0, 1), +(181578, 533, 3, 1, 2492.16, -2921.66, 241.276, 5.52219, 0, 0, 1, 0, -604800, 0, 1); + +INSERT IGNORE INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) values('2','0','0','0','0','0','0','0','0','0','Erupt trigger','',NULL,'80','80','200','300','20','30','0','21','21','0','1','1','0','0','0','0','0','1','0','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','0','3','1','1','0','0','0','0','0','0','0','0','1','0','0','194',''); +REPLACE INTO `creature_template` (`entry`, `difficulty_entry_1`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (15384, 0, 18783, 0, 11686, 0, 'Plague Fissure', '', '', 83, 83, 4120, 4120, 0, 0, 0, 21, 21, 0, 1.1, 1, 0, 0, 0, 0, 0, 1, 2000, 0, 1, 33555206, 0, 0, 0, 0, 0, 0, 0, 1, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 1, 1.35, 1, 0, 1, 0, 0, 130, 'npc_heigan_eruption'); + +-- Soul Weaver +UPDATE `creature_template` SET `minlevel` = 80, `maxlevel` = 80, `minhealth` = 56700, `maxhealth` = 56700 WHERE `entry` = 16429; +-- Guardian of Icecrown 10 men +UPDATE `creature_template` SET `minlevel` = 80, `maxlevel` = 80, `minhealth` = 2520000, `maxhealth` = 2520000, `dmg_multiplier` = 1.5, mechanic_immune_mask = 1073741823 WHERE entry = 16441; +-- Guardian of Icecrown 25 men +UPDATE `creature_template` SET `minlevel` = 80, `maxlevel` = 80, `minhealth` = 6300000, `maxhealth` = 6300000, `armor` = 7369, dmg_multiplier = 1.8, mechanic_immune_mask = 1073741823 WHERE entry = 30057; +-- Shadow Fissure +UPDATE `creature_template` SET `faction_A` = 35, `faction_H` = 35, `flags_extra` = 130 WHERE `entry` = 16129; + +UPDATE `gameobject_template` SET `flags` = 0 WHERE `entry` = 193426; + +DELETE FROM `gameobject` WHERE `guid`=21640; +INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`, `animprogress`,`state`) VALUES +(21640,193426, 533, 2, 1, 2511.51, -2943.93, 245.552, 5.48707, 0, 0, 0.387631, -0.921815, -604800, 100, 1); + +DELETE FROM `spell_script_target` WHERE `entry`=55479; +INSERT INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES (55479, 1, 16803); + +DELETE FROM `npc_gossip` WHERE `npc_guid` IN (128352, 128353); +DELETE FROM `npc_text` WHERE `ID`=100; +INSERT INTO `npc_gossip` (`npc_guid`, `textid`) VALUES (128352, 100); +INSERT INTO `npc_gossip` (`npc_guid`, `textid`) VALUES (128353, 100); +INSERT INTO `npc_text` (`ID`, `text0_0`, `text0_1`, `lang0`, `prob0`, `em0_0`, `em0_1`, `em0_2`, `em0_3`, `em0_4`, `em0_5`, `text1_0`, `text1_1`, `lang1`, `prob1`, `em1_0`, `em1_1`, `em1_2`, `em1_3`, `em1_4`, `em1_5`, `text2_0`, `text2_1`, `lang2`, `prob2`, `em2_0`, `em2_1`, `em2_2`, `em2_3`, `em2_4`, `em2_5`, `text3_0`, `text3_1`, `lang3`, `prob3`, `em3_0`, `em3_1`, `em3_2`, `em3_3`, `em3_4`, `em3_5`, `text4_0`, `text4_1`, `lang4`, `prob4`, `em4_0`, `em4_1`, `em4_2`, `em4_3`, `em4_4`, `em4_5`, `text5_0`, `text5_1`, `lang5`, `prob5`, `em5_0`, `em5_1`, `em5_2`, `em5_3`, `em5_4`, `em5_5`, `text6_0`, `text6_1`, `lang6`, `prob6`, `em6_0`, `em6_1`, `em6_2`, `em6_3`, `em6_4`, `em6_5`, `text7_0`, `text7_1`, `lang7`, `prob7`, `em7_0`, `em7_1`, `em7_2`, `em7_3`, `em7_4`, `em7_5`) VALUES (100, 'Hi. In front of you is standing a Instructor Razuvious. To defeat this boss, you ll need to use Mind Control. If you don t have any priest in your group, press button below.', '', 0, 1, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0); + +UPDATE `creature` set `spawnMask` = 1 where `id` = 29912; + +DELETE FROM `creature_template` WHERE (`entry`=16803); +INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (16803, 29941, 0, 0, 0, 0, 16539, 0, 16539, 0, 'Death Knight Understudy', '', '', 0, 82, 82, 404430, 404430, 0, 0, 49905, 21, 21, 0, 1, 1, 1, 488, 642, 0, 782, 7.5, 2000, 0, 1, 32832, 0, 0, 0, 0, 0, 0, 363, 521, 121, 7, 72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 61696, 29060, 29061, 0, 0, 0, 0, 'EventAI', 0, 3, 30, 2, 0, 22708, 0, 0, 0, 0, 0, 144, 1, 1728, 0, 0, ''); + +DELETE FROM `creature_template` WHERE (`entry`=29941); +INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (29941, 0, 0, 0, 0, 0, 16539, 0, 16539, 0, 'Death Knight Understudy (1)', '', '', 0, 82, 82, 404430, 404430, 0, 0, 49905, 14, 14, 0, 1.5, 1, 1, 488, 642, 0, 782, 13, 2000, 0, 1, 32832, 0, 0, 0, 0, 0, 0, 363, 521, 121, 7, 72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 30, 2, 0, 22708, 0, 0, 0, 0, 0, 144, 1, 0, 0, 0, ''); + +DELETE FROM `creature_template` WHERE (`entry`=16061); +INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (16061, 29940, 0, 0, 0, 0, 16582, 0, 16582, 0, 'Instructor Razuvious', '', '', 0, 83, 83, 3346800, 3346800, 0, 0, 10673, 21, 21, 0, 1.6, 1, 3, 1000, 1200, 0, 800, 70, 3500, 0, 1, 32832, 0, 0, 0, 0, 0, 0, 371, 535, 135, 6, 76, 16061, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1253602, 1532181, '', 0, 3, 240, 2, 0, 0, 0, 0, 0, 0, 0, 167, 1, 1718, 617299803, 1, 'boss_razuvious'); + +DELETE FROM `creature_template` WHERE (`entry`=29940); +INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (29940, 0, 0, 0, 0, 0, 16582, 0, 16582, 0, 'Instructor Razuvious (1)', '', '', 0, 83, 83, 10110125, 10110125, 0, 0, 10673, 21, 21, 0, 2, 1, 3, 1000, 1200, 0, 800, 70, 3500, 0, 1, 32832, 0, 0, 0, 0, 0, 0, 371, 535, 135, 6, 76, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2507204, 3064362, '', 0, 3, 725, 2, 0, 0, 0, 0, 0, 0, 0, 167, 1, 0, 617299803, 1, ''); + +DELETE FROM `creature_template` WHERE (`entry`=29912); +INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (29912, 0, 0, 0, 0, 0, 26620, 0, 26620, 0, 'Obedience Crystal', '', 'Interact', 0, 80, 80, 12600, 12600, 0, 0, 9729, 35, 35, 1, 1, 1, 0, 422, 586, 0, 642, 1, 2000, 0, 1, 64, 0, 0, 0, 0, 0, 0, 345, 509, 103, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 'npc_obedience_crystal'); + +update `creature` set `id` = 29956 where `guid` = 128353; + +UPDATE `creature` SET `MovementType` = 2 WHERE `guid` = 128312; +DELETE FROM `creature_movement` WHERE id = 128312; +INSERT INTO `creature_movement` (`id`,`POINT`,`position_x`,`position_y`,`position_z`) VALUES +(128312,1,2777.138672,-3110.880859,267.684509), +(128312,2,2781.611328,-3106.903076,267.684509), +(128312,3,2784.291748,-3098.885254,267.684509), +(128312,4,2781.093018,-3090.532959,267.684509), +(128312,5,2773.239014,-3085.609619,267.684509), +(128312,6,2765.775146,-3086.021240,267.684509), +(128312,7,2758.100586,-3091.694824,267.684509), +(128312,8,2755.643555,-3097.803467,267.684509), +(128312,9,2756.769775,-3104.073975,267.684509), +(128312,10,2760.447021,-3109.536621,267.684509), +(128312,11,2766.769531,-3112.940918,267.684509); diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falryn.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falryn.cpp index a157c94aa..553b9405f 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falryn.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falryn.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_falryn -SD%Complete: 0% -SDComment: +SD%Complete: 40% +SDComment: by /dev/rsa SDCategory: Halls of Reflection EndScriptData */ @@ -51,9 +51,11 @@ struct MANGOS_DLL_DECL boss_falrynAI : public ScriptedAI } bool Regular; - bool m_uiIsFrenzy; ScriptedInstance *pInstance; uint32 m_uiBerserk_Timer; + uint32 m_uiDespair_Timer; + uint32 m_uiHorror_Timer; + uint32 m_uiStrike_Timer; uint8 health; uint8 stage; @@ -63,18 +65,9 @@ struct MANGOS_DLL_DECL boss_falrynAI : public ScriptedAI if(pInstance) pInstance->SetData(TYPE_FALRYN, NOT_STARTED); m_uiBerserk_Timer = 180000; stage = 0; - - - } - uint64 CallGuard(uint64 npctype,TempSummonType type, uint32 _summontime ) - { - float fPosX, fPosY, fPosZ; - m_creature->GetPosition(fPosX, fPosY, fPosZ); - m_creature->GetRandomPoint(fPosX, fPosY, fPosZ, urand(15, 25), fPosX, fPosY, fPosZ); - Creature* pSummon = m_creature->SummonCreature(npctype, fPosX, fPosY, fPosZ, 0, type, _summontime); - if(pSummon) pSummon->SetInCombatWithZone(); -// DoScriptText(EMOTE_SUMMON, m_creature); - return pSummon ? pSummon->GetGUID() : 0; + m_uiDespair_Timer = Regular ? 40000 : 30000; + m_uiHorror_Timer = urand(25000,35000); + m_uiStrike_Timer = urand(10000,15000); } void Aggro(Unit *who) @@ -97,18 +90,53 @@ struct MANGOS_DLL_DECL boss_falrynAI : public ScriptedAI case 0: { break;} case 1: { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, SPELL_HOPELESSNESS); + stage = 2; break;} case 2: { break;} + case 3: { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, SPELL_HOPELESSNESS); + stage = 4; + break;} + case 4: { + break;} + case 5: { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, SPELL_HOPELESSNESS); + stage = 6; + break;} + case 6: { + break;} } + if (m_uiDespair_Timer < diff) { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, SPELL_IMPENDING_DESPAIR); + m_uiDespair_Timer= Regular ? 40000 : 30000; + } else m_uiDespair_Timer -= diff; + + if (m_uiStrike_Timer < diff) + {DoCastSpellIfCan(m_creature->getVictim(), Regular ? SPELL_QUIVERING_STRIKE_N : SPELL_QUIVERING_STRIKE_H); + m_uiStrike_Timer=urand(10000,15000); + } else m_uiStrike_Timer -= diff; + + if (m_uiHorror_Timer < diff) { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, Regular ? SPELL_DEFILING_HORROR_N : SPELL_DEFILING_HORROR_H); + m_uiHorror_Timer=urand(25000,35000); + } else m_uiHorror_Timer -= diff; health = m_creature->GetHealth()*100 / m_creature->GetMaxHealth(); - if (health <= 30 && stage == 0) stage = 1; + if (health <= 66 && stage == 0) stage = 1; + if (health <= 33 && stage == 2) stage = 3; + if (health <= 10 && stage == 4) stage = 5; if (m_uiBerserk_Timer < diff) { DoCast(m_creature, SPELL_BERSERK); - m_uiBerserk_Timer = 600000; + m_uiBerserk_Timer = 180000; } else m_uiBerserk_Timer -= diff; DoMeleeAttackIfReady(); diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_marwyn.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_marwyn.cpp index 42bb32332..c3201a95b 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_marwyn.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_marwyn.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_marwyn -SD%Complete: 0% -SDComment: +SD%Complete: 40% +SDComment: by /dev/rsa SDCategory: Halls of Reflection EndScriptData */ @@ -52,9 +52,13 @@ struct MANGOS_DLL_DECL boss_marwynAI : public ScriptedAI } bool Regular; - bool m_uiIsFrenzy; ScriptedInstance *pInstance; uint32 m_uiBerserk_Timer; + uint32 m_uiSharedSuffering_Timer; + uint32 m_uiWell_Timer; + uint32 m_uiTouch_Timer; + uint32 m_uiFlesh_Timer; + uint32 m_uiObliterate_Timer; uint8 health; uint8 stage; @@ -63,19 +67,11 @@ struct MANGOS_DLL_DECL boss_marwynAI : public ScriptedAI { if(pInstance) pInstance->SetData(TYPE_FALRYN, NOT_STARTED); m_uiBerserk_Timer = 180000; - stage = 0; - - - } - uint64 CallGuard(uint64 npctype,TempSummonType type, uint32 _summontime ) - { - float fPosX, fPosY, fPosZ; - m_creature->GetPosition(fPosX, fPosY, fPosZ); - m_creature->GetRandomPoint(fPosX, fPosY, fPosZ, urand(15, 25), fPosX, fPosY, fPosZ); - Creature* pSummon = m_creature->SummonCreature(npctype, fPosX, fPosY, fPosZ, 0, type, _summontime); - if(pSummon) pSummon->SetInCombatWithZone(); -// DoScriptText(EMOTE_SUMMON, m_creature); - return pSummon ? pSummon->GetGUID() : 0; + m_uiSharedSuffering_Timer = 4000; + m_uiWell_Timer = 5000; + m_uiTouch_Timer = 8000; + m_uiFlesh_Timer = 10000; + m_uiObliterate_Timer = 1000; } void Aggro(Unit *who) @@ -93,23 +89,41 @@ struct MANGOS_DLL_DECL boss_marwynAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - switch(stage) - { - case 0: { - break;} - case 1: { - break;} - case 2: { - break;} - } + if (m_uiSharedSuffering_Timer < diff) { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, Regular ? SPELL_SHARED_SUFFERING_N : SPELL_SHARED_SUFFERING_H); + m_uiSharedSuffering_Timer= 20000; + } else m_uiSharedSuffering_Timer -= diff; + + if (m_uiWell_Timer < diff) { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, SPELL_WELL_OF_CORRUPTION); + m_uiWell_Timer= 30000; + } else m_uiWell_Timer -= diff; + +/* if (m_uiTouch_Timer < diff) { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, Regular ? SPELL_WELL_OF_CORRUPTION_N : SPELL_WELL_OF_CORRUPTION_H); + m_uiTouch_Timer= 30000; + } else m_uiTouch_Timer -= diff; +*/ + if (m_uiFlesh_Timer < diff) { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, Regular ? SPELL_CORRUPTED_FLESH_N : SPELL_CORRUPTED_FLESH_H); + m_uiWell_Timer= 10000; + } else m_uiWell_Timer -= diff; + + if (m_uiObliterate_Timer < diff) + {DoCastSpellIfCan(m_creature->getVictim(), Regular ? SPELL_OBLITERATE_N : SPELL_OBLITERATE_H); + m_uiObliterate_Timer=urand(8000,12000); + } else m_uiObliterate_Timer -= diff; + - health = m_creature->GetHealth()*100 / m_creature->GetMaxHealth(); - if (health <= 30 && stage == 0) stage = 1; if (m_uiBerserk_Timer < diff) { DoCast(m_creature, SPELL_BERSERK); - m_uiBerserk_Timer = 600000; + m_uiBerserk_Timer = 180000; } else m_uiBerserk_Timer -= diff; DoMeleeAttackIfReady(); diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp index a4004d2e3..17091a323 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp @@ -200,11 +200,32 @@ InstanceData* GetInstanceData_instance_halls_of_reflection(Map* pMap) } +bool GOHello_go_frostmourne_altar(Player *player, GameObject* pGo) +{ + + ScriptedInstance *pInstance = (ScriptedInstance *) pGo->GetInstanceData(); + if(!pInstance) return false; + + switch(pGo->GetEntry()) + { + case GO_FROSTMOURNE_ALTAR: pInstance->SetData(TYPE_START_EVENT, SPECIAL); break; + } + + pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + return true; +} + void AddSC_instance_halls_of_reflection() { - Script* pNewScript; - pNewScript = new Script; - pNewScript->Name = "instance_halls_of_reflection"; - pNewScript->GetInstanceData = &GetInstanceData_instance_halls_of_reflection; - pNewScript->RegisterSelf(); + Script* newscript; + newscript = new Script; + newscript->Name = "instance_halls_of_reflection"; + newscript->GetInstanceData = &GetInstanceData_instance_halls_of_reflection; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "go_frostmourne_altar"; + newscript->pGOHello = &GOHello_go_frostmourne_altar; + newscript->RegisterSelf(); + } From dd525ad8bcc7074e887f6c91ec3a1c9cf5877d72 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sat, 20 Feb 2010 01:21:59 +0300 Subject: [PATCH 154/405] Restore compile after 9409 --- .../blackwing_lair/boss_chromaggus.cpp | 10 +++---- .../blackwing_lair/boss_ebonroc.cpp | 2 +- .../blackwing_lair/boss_razorgore.cpp | 2 +- scripts/eastern_kingdoms/burning_steppes.cpp | 2 +- .../eastern_kingdoms/karazhan/boss_moroes.cpp | 2 +- .../karazhan/bosses_opera.cpp | 2 +- .../stratholme/stratholme.cpp | 4 +-- .../sunwell_plateau/boss_brutallus.cpp | 2 +- .../sunwell_plateau/boss_kalecgos.cpp | 4 +-- scripts/eastern_kingdoms/undercity.cpp | 4 +-- .../zulaman/boss_nalorakk.cpp | 2 +- scripts/examples/example_escort.cpp | 2 +- scripts/kalimdor/bloodmyst_isle.cpp | 2 +- .../dark_portal/dark_portal.cpp | 12 ++++---- .../caverns_of_time/hyjal/boss_archimonde.cpp | 4 +-- scripts/kalimdor/tanaris.cpp | 2 +- .../temple_of_ahnqiraj/boss_cthun.cpp | 8 ++--- .../temple_of_ahnqiraj/boss_twinemperors.cpp | 14 +++++++-- .../mob_anubisath_sentinel.cpp | 2 +- .../northrend/draktharon_keep/boss_dred.cpp | 2 +- .../northrend/nexus/nexus/boss_telestra.cpp | 4 +-- .../northrend/ulduar/ulduar/boss_freya.cpp | 30 +++++++++---------- .../vault_of_archavon/boss_emalon.cpp | 4 +-- .../northrend/violet_hold/boss_ichoron.cpp | 2 +- scripts/northrend/violet_hold/violet_hold.cpp | 2 +- .../boss_ambassador_hellmaw.cpp | 4 +-- .../shadow_labyrinth/boss_murmur.cpp | 2 +- .../outland/black_temple/boss_bloodboil.cpp | 2 +- scripts/outland/black_temple/boss_illidan.cpp | 20 ++++++------- .../black_temple/boss_mother_shahraz.cpp | 2 +- .../outland/black_temple/boss_supremus.cpp | 2 +- .../black_temple/boss_teron_gorefiend.cpp | 4 +-- .../black_temple/boss_warlord_najentus.cpp | 2 +- scripts/outland/blades_edge_mountains.cpp | 2 +- scripts/outland/boss_doomwalker.cpp | 4 +-- .../magtheridons_lair/boss_magtheridon.cpp | 8 ++--- scripts/outland/nagrand.cpp | 4 +-- scripts/outland/netherstorm.cpp | 2 +- .../botanica/boss_high_botanist_freywinn.cpp | 2 +- scripts/world/npcs_special.cpp | 4 +-- 40 files changed, 99 insertions(+), 91 deletions(-) diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp index ec7dd98f4..a03eb275e 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp @@ -256,11 +256,11 @@ struct MANGOS_DLL_DECL boss_chromaggusAI : public ScriptedAI DoCastSpellIfCan(pUnit, SpellAfflict, CAST_TRIGGERED); //Chromatic mutation if target is effected by all afflictions - if (pUnit->HasAura(SPELL_BROODAF_BLUE,0) - && pUnit->HasAura(SPELL_BROODAF_BLACK,0) - && pUnit->HasAura(SPELL_BROODAF_RED,0) - && pUnit->HasAura(SPELL_BROODAF_BRONZE,0) - && pUnit->HasAura(SPELL_BROODAF_GREEN,0)) + if (pUnit->HasAura(SPELL_BROODAF_BLUE,EFFECT_INDEX_0) + && pUnit->HasAura(SPELL_BROODAF_BLACK,EFFECT_INDEX_0) + && pUnit->HasAura(SPELL_BROODAF_RED,EFFECT_INDEX_0) + && pUnit->HasAura(SPELL_BROODAF_BRONZE,EFFECT_INDEX_0) + && pUnit->HasAura(SPELL_BROODAF_GREEN,EFFECT_INDEX_0)) { //target->RemoveAllAuras(); //DoCastSpellIfCan(target,SPELL_CHROMATIC_MUT_1); diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp index e4640d9c1..dd1a58f34 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp @@ -76,7 +76,7 @@ struct MANGOS_DLL_DECL boss_ebonrocAI : public ScriptedAI ShadowOfEbonroc_Timer = urand(25000, 35000); }else ShadowOfEbonroc_Timer -= diff; - if (m_creature->getVictim()->HasAura(SPELL_SHADOWOFEBONROC,0)) + if (m_creature->getVictim()->HasAura(SPELL_SHADOWOFEBONROC,EFFECT_INDEX_0)) { if (Heal_Timer < diff) { diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp index da87c07a6..065fae14c 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp @@ -101,7 +101,7 @@ struct MANGOS_DLL_DECL boss_razorgoreAI : public ScriptedAI }else Conflagration_Timer -= diff; // Aura Check. If the gamer is affected by confliguration we attack a random gamer. - if (m_creature->getVictim()->HasAura(SPELL_CONFLAGRATION,0)) + if (m_creature->getVictim()->HasAura(SPELL_CONFLAGRATION,EFFECT_INDEX_0)) { Unit* target = NULL; target = SelectUnit(SELECT_TARGET_RANDOM,1); diff --git a/scripts/eastern_kingdoms/burning_steppes.cpp b/scripts/eastern_kingdoms/burning_steppes.cpp index 4c8958640..58f488636 100644 --- a/scripts/eastern_kingdoms/burning_steppes.cpp +++ b/scripts/eastern_kingdoms/burning_steppes.cpp @@ -39,7 +39,7 @@ struct MANGOS_DLL_DECL npc_ragged_johnAI : public ScriptedAI void MoveInLineOfSight(Unit *who) { - if (who->HasAura(16468,0)) + if (who->HasAura(16468,EFFECT_INDEX_0)) { if (who->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(who, 15) && who->isInAccessablePlaceFor(m_creature)) { diff --git a/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp b/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp index 8f2f11ca2..6d113d473 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp @@ -149,7 +149,7 @@ struct MANGOS_DLL_DECL boss_moroesAI : public ScriptedAI for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) { - if (i->getSource()->isAlive() && i->getSource()->HasAura(SPELL_GARROTE,0)) + if (i->getSource()->isAlive() && i->getSource()->HasAura(SPELL_GARROTE,EFFECT_INDEX_0)) i->getSource()->RemoveAurasDueToSpell(SPELL_GARROTE); } } diff --git a/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp b/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp index 7b857a213..953b17fc4 100644 --- a/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp +++ b/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp @@ -658,7 +658,7 @@ struct MANGOS_DLL_DECL mob_cycloneAI : public ScriptedAI void UpdateAI(const uint32 diff) { - if (!m_creature->HasAura(SPELL_KNOCKBACK, 0)) + if (!m_creature->HasAura(SPELL_KNOCKBACK, EFFECT_INDEX_0)) DoCastSpellIfCan(m_creature, SPELL_KNOCKBACK, CAST_TRIGGERED); if (MoveTimer < diff) diff --git a/scripts/eastern_kingdoms/stratholme/stratholme.cpp b/scripts/eastern_kingdoms/stratholme/stratholme.cpp index c0230e490..fda38e5e9 100644 --- a/scripts/eastern_kingdoms/stratholme/stratholme.cpp +++ b/scripts/eastern_kingdoms/stratholme/stratholme.cpp @@ -54,12 +54,12 @@ bool GOHello_go_gauntlet_gate(Player* pPlayer, GameObject* pGo) continue; if (pGroupie->GetQuestStatus(QUEST_DEAD_MAN_PLEA) == QUEST_STATUS_INCOMPLETE && - !pGroupie->HasAura(SPELL_BARON_ULTIMATUM,0) && + !pGroupie->HasAura(SPELL_BARON_ULTIMATUM,EFFECT_INDEX_0) && pGroupie->GetMap() == pGo->GetMap()) pGroupie->CastSpell(pGroupie,SPELL_BARON_ULTIMATUM,true); } } else if (pPlayer->GetQuestStatus(QUEST_DEAD_MAN_PLEA) == QUEST_STATUS_INCOMPLETE && - !pPlayer->HasAura(SPELL_BARON_ULTIMATUM,0) && + !pPlayer->HasAura(SPELL_BARON_ULTIMATUM,EFFECT_INDEX_0) && pPlayer->GetMap() == pGo->GetMap()) pPlayer->CastSpell(pPlayer,SPELL_BARON_ULTIMATUM,true); diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp index 7fdd6d7ae..119b12999 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp @@ -148,7 +148,7 @@ struct MANGOS_DLL_DECL boss_brutallusAI : public ScriptedAI { DoCastSpellIfCan(pTarget,SPELL_STOMP); - if (pTarget->HasAura(SPELL_BURN_AURA_EFFECT,0)) + if (pTarget->HasAura(SPELL_BURN_AURA_EFFECT,EFFECT_INDEX_0)) pTarget->RemoveAurasDueToSpell(SPELL_BURN_AURA_EFFECT); } diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp index 2c12acc6a..30f370037 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp @@ -189,7 +189,7 @@ struct MANGOS_DLL_DECL boss_kalecgosAI : public ScriptedAI if (pTarget->GetTypeId() != TYPEID_PLAYER) return; - if (pTarget->HasAura(SPELL_SPECTRAL_EXHAUSTION,0) || pTarget->HasAura(SPELL_SPECTRAL_REALM)) + if (pTarget->HasAura(SPELL_SPECTRAL_EXHAUSTION,EFFECT_INDEX_0) || pTarget->HasAura(SPELL_SPECTRAL_REALM)) return; if (pTarget == m_creature->getVictim()) @@ -537,7 +537,7 @@ bool GOHello_go_spectral_rift(Player* pPlayer, GameObject* pGo) if (ScriptedInstance* pInstance = (ScriptedInstance*)pPlayer->GetInstanceData()) { - if (pPlayer->HasAura(SPELL_SPECTRAL_EXHAUSTION, 0)) + if (pPlayer->HasAura(SPELL_SPECTRAL_EXHAUSTION, EFFECT_INDEX_0)) return true; // Make them able to see Sathrovarr (he's invisible for some reason). Also, when this buff wears off, they get teleported back to Normal Realm (this is handled by Instance Script) diff --git a/scripts/eastern_kingdoms/undercity.cpp b/scripts/eastern_kingdoms/undercity.cpp index b1b060118..bbb1895b1 100644 --- a/scripts/eastern_kingdoms/undercity.cpp +++ b/scripts/eastern_kingdoms/undercity.cpp @@ -105,7 +105,7 @@ struct MANGOS_DLL_DECL npc_lady_sylvanas_windrunnerAI : public ScriptedAI m_creature->SummonCreature(ENTRY_HIGHBORNE_BUNNY,raX,raY,myZ,0,TEMPSUMMON_TIMED_DESPAWN,3000); LamentEvent_Timer = 2000; - if (!m_creature->HasAura(SPELL_SYLVANAS_CAST,0)) + if (!m_creature->HasAura(SPELL_SYLVANAS_CAST,EFFECT_INDEX_0)) { DoScriptText(SAY_LAMENT_END, m_creature); DoScriptText(EMOTE_LAMENT_END, m_creature); @@ -199,7 +199,7 @@ bool GossipHello_npc_parqual_fintallas(Player* pPlayer, Creature* pCreature) if (pCreature->isQuestGiver()) pPlayer->PrepareQuestMenu(pCreature->GetGUID()); - if (pPlayer->GetQuestStatus(6628) == QUEST_STATUS_INCOMPLETE && !pPlayer->HasAura(SPELL_MARK_OF_SHAME,0)) + if (pPlayer->GetQuestStatus(6628) == QUEST_STATUS_INCOMPLETE && !pPlayer->HasAura(SPELL_MARK_OF_SHAME,EFFECT_INDEX_0)) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Gul'dan", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Kel'Thuzad", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); diff --git a/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp b/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp index 0211ffccd..7f8986a07 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp @@ -136,7 +136,7 @@ struct MANGOS_DLL_DECL boss_nalorakkAI : public ScriptedAI if (ShapeShiftCheck_Timer < diff) { //This will return true if we have bearform aura - inBearForm = m_creature->HasAura(SPELL_BEARFORM, 0); + inBearForm = m_creature->HasAura(SPELL_BEARFORM, EFFECT_INDEX_0); ShapeShiftCheck_Timer = 1000; }else ShapeShiftCheck_Timer -= diff; diff --git a/scripts/examples/example_escort.cpp b/scripts/examples/example_escort.cpp index 25febf927..f4761caf6 100644 --- a/scripts/examples/example_escort.cpp +++ b/scripts/examples/example_escort.cpp @@ -148,7 +148,7 @@ struct MANGOS_DLL_DECL example_escortAI : public npc_escortAI { if (m_uiChatTimer < uiDiff) { - if (m_creature->HasAura(SPELL_ELIXIR_OF_FORTITUDE, 0)) + if (m_creature->HasAura(SPELL_ELIXIR_OF_FORTITUDE, EFFECT_INDEX_0)) { DoScriptText(SAY_RAND_1, m_creature); m_creature->CastSpell(m_creature, SPELL_BLUE_FIREWORK, false); diff --git a/scripts/kalimdor/bloodmyst_isle.cpp b/scripts/kalimdor/bloodmyst_isle.cpp index 59e175e9a..f7ac95c0c 100644 --- a/scripts/kalimdor/bloodmyst_isle.cpp +++ b/scripts/kalimdor/bloodmyst_isle.cpp @@ -77,7 +77,7 @@ CreatureAI* GetAI_mob_webbed_creature(Creature* pCreature) bool GossipHello_npc_captured_sunhawk_agent(Player* pPlayer, Creature* pCreature) { - if (pPlayer->HasAura(31609,1) && pPlayer->GetQuestStatus(9756) == QUEST_STATUS_INCOMPLETE) + if (pPlayer->HasAura(31609,EFFECT_INDEX_1) && pPlayer->GetQuestStatus(9756) == QUEST_STATUS_INCOMPLETE) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "[PH] ", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); pPlayer->SEND_GOSSIP_MENU(9136, pCreature->GetGUID()); diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp index beada5a46..2cfe04ce5 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp @@ -85,8 +85,8 @@ struct MANGOS_DLL_DECL npc_medivh_bmAI : public ScriptedAI if (m_pInstance->GetData(TYPE_MEDIVH) == IN_PROGRESS) m_creature->CastSpell(m_creature,SPELL_CHANNEL,true); - else if (m_creature->HasAura(SPELL_CHANNEL,0)) - m_creature->RemoveAura(SPELL_CHANNEL,0); + else if (m_creature->HasAura(SPELL_CHANNEL,EFFECT_INDEX_0)) + m_creature->RemoveAura(SPELL_CHANNEL,EFFECT_INDEX_0); m_creature->CastSpell(m_creature,SPELL_PORTAL_RUNE,true); } @@ -164,9 +164,9 @@ struct MANGOS_DLL_DECL npc_medivh_bmAI : public ScriptedAI { m_pInstance->SetData(TYPE_MEDIVH,SPECIAL); - if (m_creature->HasAura(SPELL_CORRUPT_AEONUS,0)) + if (m_creature->HasAura(SPELL_CORRUPT_AEONUS,EFFECT_INDEX_0)) SpellCorrupt_Timer = 1000; - else if (m_creature->HasAura(SPELL_CORRUPT,0)) + else if (m_creature->HasAura(SPELL_CORRUPT,EFFECT_INDEX_0)) SpellCorrupt_Timer = 3000; else SpellCorrupt_Timer = 0; @@ -211,8 +211,8 @@ struct MANGOS_DLL_DECL npc_medivh_bmAI : public ScriptedAI DoScriptText(SAY_WIN, m_creature); Check_Timer = 0; - if (m_creature->HasAura(SPELL_CHANNEL,0)) - m_creature->RemoveAura(SPELL_CHANNEL,0); + if (m_creature->HasAura(SPELL_CHANNEL,EFFECT_INDEX_0)) + m_creature->RemoveAura(SPELL_CHANNEL,EFFECT_INDEX_0); //TODO: start the post-event here m_pInstance->SetData(TYPE_MEDIVH,DONE); diff --git a/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp b/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp index 888855b44..20f9cac3b 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/boss_archimonde.cpp @@ -395,9 +395,9 @@ struct MANGOS_DLL_DECL boss_archimondeAI : public ScriptedAI break; } - if (m_creature->HasAura(chargeSpell, 0)) + if (m_creature->HasAura(chargeSpell, EFFECT_INDEX_0)) { - m_creature->RemoveSingleAuraFromStack(chargeSpell, 0); + m_creature->RemoveSingleAuraFromStack(chargeSpell, EFFECT_INDEX_0); DoCastSpellIfCan(m_creature->getVictim(), unleashSpell); HasCast = true; --SoulChargeCount; diff --git a/scripts/kalimdor/tanaris.cpp b/scripts/kalimdor/tanaris.cpp index 132fc5566..aeb641dae 100644 --- a/scripts/kalimdor/tanaris.cpp +++ b/scripts/kalimdor/tanaris.cpp @@ -192,7 +192,7 @@ struct MANGOS_DLL_DECL npc_custodian_of_timeAI : public npc_escortAI if (who->GetTypeId() == TYPEID_PLAYER) { - if (((Player*)who)->HasAura(34877,1) && ((Player*)who)->GetQuestStatus(10277) == QUEST_STATUS_INCOMPLETE) + if (((Player*)who)->HasAura(34877,EFFECT_INDEX_1) && ((Player*)who)->GetQuestStatus(10277) == QUEST_STATUS_INCOMPLETE) { float Radius = 10.0; diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp index 4a249bd31..19731ac21 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp @@ -973,7 +973,7 @@ struct MANGOS_DLL_DECL eye_tentacleAI : public ScriptedAI { Unit* target = NULL; target = SelectUnit(SELECT_TARGET_RANDOM,0); - if (target && !target->HasAura(SPELL_DIGESTIVE_ACID, 0)) + if (target && !target->HasAura(SPELL_DIGESTIVE_ACID, EFFECT_INDEX_0)) DoCastSpellIfCan(target,SPELL_MIND_FLAY); //Mindflay every 10 seconds @@ -1040,7 +1040,7 @@ struct MANGOS_DLL_DECL claw_tentacleAI : public ScriptedAI return; } - if (!target->HasAura(SPELL_DIGESTIVE_ACID, 0)) + if (!target->HasAura(SPELL_DIGESTIVE_ACID, EFFECT_INDEX_0)) { m_creature->GetMap()->CreatureRelocation(m_creature, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0); @@ -1136,7 +1136,7 @@ struct MANGOS_DLL_DECL giant_claw_tentacleAI : public ScriptedAI return; } - if (!target->HasAura(SPELL_DIGESTIVE_ACID, 0)) + if (!target->HasAura(SPELL_DIGESTIVE_ACID, EFFECT_INDEX_0)) { m_creature->GetMap()->CreatureRelocation(m_creature, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0); @@ -1220,7 +1220,7 @@ struct MANGOS_DLL_DECL giant_eye_tentacleAI : public ScriptedAI if (BeamTimer < diff) { Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0); - if (target && !target->HasAura(SPELL_DIGESTIVE_ACID, 0)) + if (target && !target->HasAura(SPELL_DIGESTIVE_ACID, EFFECT_INDEX_0)) DoCastSpellIfCan(target,SPELL_GREEN_BEAM); //Beam every 2 seconds diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp index b46a14eb6..a6e3332ef 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp @@ -431,7 +431,7 @@ struct MANGOS_DLL_DECL boss_twinemperorsAI : public ScriptedAI class MANGOS_DLL_DECL BugAura : public Aura { public: - BugAura(SpellEntry *spell, uint32 eff, int32 *bp, Unit *target, Unit *caster) : Aura(spell, eff, bp, target, caster, NULL) + BugAura(SpellEntry *spell, SpellEffectIndex eff, int32 *bp, Unit *target, Unit *caster) : Aura(spell, eff, bp, target, caster, NULL) {} }; @@ -472,7 +472,11 @@ struct MANGOS_DLL_DECL boss_veknilashAI : public boss_twinemperorsAI { if (!spell->Effect[i]) continue; - target->AddAura(new BugAura(spell, i, NULL, target, target)); + switch (i) { + case 0: target->AddAura(new BugAura(spell, EFFECT_INDEX_0, NULL, target, target)); break; + case 1: target->AddAura(new BugAura(spell, EFFECT_INDEX_1, NULL, target, target)); break; + case 2: target->AddAura(new BugAura(spell, EFFECT_INDEX_2, NULL, target, target)); break; + } } target->SetHealth(target->GetMaxHealth()); } @@ -558,7 +562,11 @@ struct MANGOS_DLL_DECL boss_veklorAI : public boss_twinemperorsAI { if (!spell->Effect[i]) continue; - target->AddAura(new BugAura(spell, i, NULL, target, target)); + switch (i) { + case 0: target->AddAura(new BugAura(spell, EFFECT_INDEX_0, NULL, target, target)); break; + case 1: target->AddAura(new BugAura(spell, EFFECT_INDEX_1, NULL, target, target)); break; + case 2: target->AddAura(new BugAura(spell, EFFECT_INDEX_2, NULL, target, target)); break; + } } target->SetHealth(target->GetMaxHealth()); } diff --git a/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp b/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp index 36cfb85c9..fd286c449 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp @@ -310,7 +310,7 @@ Unit* SentinelAbilityAura::GetTriggerTarget() const } SentinelAbilityAura::SentinelAbilityAura(aqsentinelAI *abilityOwner, SpellEntry *spell, uint32 ability, uint32 eff) -: Aura(spell, eff, NULL, abilityOwner->m_creature, abilityOwner->m_creature, NULL) +: Aura(spell, EFFECT_INDEX_0, NULL, abilityOwner->m_creature, abilityOwner->m_creature, NULL) { aOwner = abilityOwner; abilityId = ability; diff --git a/scripts/northrend/draktharon_keep/boss_dred.cpp b/scripts/northrend/draktharon_keep/boss_dred.cpp index 7445d828c..9f2c40ad1 100644 --- a/scripts/northrend/draktharon_keep/boss_dred.cpp +++ b/scripts/northrend/draktharon_keep/boss_dred.cpp @@ -139,7 +139,7 @@ struct MANGOS_DLL_DECL boss_dredAI : public ScriptedAI Unit* pPlayer = m_creature->getVictim(); if (pPlayer->GetHealth() == pPlayer->GetMaxHealth()) if (pPlayer->HasAura(SPELL_GRIEVOUS_BITE)) - pPlayer->RemoveAura(SPELL_GRIEVOUS_BITE, 0); + pPlayer->RemoveAura(SPELL_GRIEVOUS_BITE, EFFECT_INDEX_0); Check_Timer = 1000; }else Check_Timer -= uiDiff; diff --git a/scripts/northrend/nexus/nexus/boss_telestra.cpp b/scripts/northrend/nexus/nexus/boss_telestra.cpp index 0c579616a..c1bd91646 100644 --- a/scripts/northrend/nexus/nexus/boss_telestra.cpp +++ b/scripts/northrend/nexus/nexus/boss_telestra.cpp @@ -207,7 +207,7 @@ struct MANGOS_DLL_DECL boss_telestraAI : public ScriptedAI if (m_uiPhase == PHASE_1 && m_creature->GetHealth()*100 < m_creature->GetMaxHealth()*50) { - if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_CLONES, CAST_INTURRUPT_PREVIOUS) == CAST_OK) + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_CLONES, CAST_INTERRUPT_PREVIOUS) == CAST_OK) { DoScriptText(urand(0, 1) ? SAY_SPLIT_1 : SAY_SPLIT_2, m_creature); m_uiPhase = PHASE_2; @@ -216,7 +216,7 @@ struct MANGOS_DLL_DECL boss_telestraAI : public ScriptedAI if (m_uiPhase == PHASE_3 && !m_bIsRegularMode && m_creature->GetHealth()*100 < m_creature->GetMaxHealth()*15) { - if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_CLONES, CAST_INTURRUPT_PREVIOUS) == CAST_OK) + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_CLONES, CAST_INTERRUPT_PREVIOUS) == CAST_OK) { DoScriptText(urand(0, 1) ? SAY_SPLIT_1 : SAY_SPLIT_2, m_creature); m_uiPhase = PHASE_2; diff --git a/scripts/northrend/ulduar/ulduar/boss_freya.cpp b/scripts/northrend/ulduar/ulduar/boss_freya.cpp index 99e8a7e86..76d790854 100644 --- a/scripts/northrend/ulduar/ulduar/boss_freya.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_freya.cpp @@ -19,7 +19,7 @@ class MANGOS_DLL_DECL AttunedToNatureAura : public Aura { public: - AttunedToNatureAura(const SpellEntry *spell, uint32 eff, int32 *bp, Unit *target, Unit *caster) : Aura(spell, eff, bp, target, caster, NULL) + AttunedToNatureAura(const SpellEntry *spell, SpellEffectIndex eff, int32 *bp, Unit *target, Unit *caster) : Aura(spell, eff, bp, target, caster, NULL) {} }; @@ -31,9 +31,9 @@ struct MANGOS_DLL_DECL boss_freyaAI : public ScriptedAI Regular = pCreature->GetMap()->IsRegularDifficulty(); sp = (SpellEntry *)GetSpellStore()->LookupEntry(SP_ATTUNED_TO_NATURE); bp = 8; - if(!pCreature->HasAura(SP_ATTUNED_TO_NATURE, 0)) - pCreature->AddAura(new AttunedToNatureAura(sp, 0, &bp, pCreature, pCreature)); - pCreature->GetAura(SP_ATTUNED_TO_NATURE, 0)->SetStackAmount(150); + if(!pCreature->HasAura(SP_ATTUNED_TO_NATURE, EFFECT_INDEX_0)) + pCreature->AddAura(new AttunedToNatureAura(sp, EFFECT_INDEX_0, &bp, pCreature, pCreature)); + pCreature->GetAura(SP_ATTUNED_TO_NATURE, EFFECT_INDEX_0)->SetStackAmount(150); Reset(); } @@ -47,7 +47,7 @@ struct MANGOS_DLL_DECL boss_freyaAI : public ScriptedAI bool Regular; ScriptedInstance *pInstance; SpellEntry const *sp; - int32 bp; + int bp; void Reset() { @@ -58,18 +58,18 @@ struct MANGOS_DLL_DECL boss_freyaAI : public ScriptedAI SunbeamTimer = rand()%10000; EnrageTimer = 600000; //10 minutes - if(!m_creature->HasAura(SP_ATTUNED_TO_NATURE, 0)) - m_creature->AddAura(new AttunedToNatureAura(sp, 0, &bp, m_creature, m_creature)); - m_creature->GetAura(SP_ATTUNED_TO_NATURE, 0)->SetStackAmount(150); + if(!m_creature->HasAura(SP_ATTUNED_TO_NATURE, EFFECT_INDEX_0)) + m_creature->AddAura(new AttunedToNatureAura(sp, EFFECT_INDEX_0, &bp, m_creature, m_creature)); + m_creature->GetAura(SP_ATTUNED_TO_NATURE, EFFECT_INDEX_0)->SetStackAmount(150); if(pInstance) pInstance->SetData(TYPE_FREYA, NOT_STARTED); } void Aggro(Unit *who) { - if(!m_creature->HasAura(SP_ATTUNED_TO_NATURE, 0)) - m_creature->AddAura(new AttunedToNatureAura(sp, 0, &bp, m_creature, m_creature)); - m_creature->GetAura(SP_ATTUNED_TO_NATURE, 0)->SetStackAmount(150); + if(!m_creature->HasAura(SP_ATTUNED_TO_NATURE, EFFECT_INDEX_0)) + m_creature->AddAura(new AttunedToNatureAura(sp, EFFECT_INDEX_0, &bp, m_creature, m_creature)); + m_creature->GetAura(SP_ATTUNED_TO_NATURE, EFFECT_INDEX_0)->SetStackAmount(150); DoCast(m_creature, Regular ? SP_TOUCH_OF_EONAR : H_SP_TOUCH_OF_EONAR); @@ -128,22 +128,22 @@ struct MANGOS_DLL_DECL boss_freyaAI : public ScriptedAI void SummonedCreatureDespawn(Creature* mob) { - if(!m_creature->HasAura(SP_ATTUNED_TO_NATURE, 0)) return; + if(!m_creature->HasAura(SP_ATTUNED_TO_NATURE, EFFECT_INDEX_0)) return; switch(mob->GetEntry()) { case CR_DETONATING_LASHER: - if(m_creature->GetAura(SP_ATTUNED_TO_NATURE, 0)->modStackAmount(-2)) + if(m_creature->GetAura(SP_ATTUNED_TO_NATURE, EFFECT_INDEX_0)->modStackAmount(-2)) m_creature->RemoveAurasDueToSpell(SP_ATTUNED_TO_NATURE); break; case CR_ANCIENT_CONSERVATOR: - if(m_creature->GetAura(SP_ATTUNED_TO_NATURE, 0)->modStackAmount(-25)) + if(m_creature->GetAura(SP_ATTUNED_TO_NATURE, EFFECT_INDEX_0)->modStackAmount(-25)) m_creature->RemoveAurasDueToSpell(SP_ATTUNED_TO_NATURE); break; case CR_SNAPLASHER: case CR_STORM_LASHER: case CR_WATER_SPIRIT: - if(m_creature->GetAura(SP_ATTUNED_TO_NATURE, 0)->modStackAmount(-10)) + if(m_creature->GetAura(SP_ATTUNED_TO_NATURE, EFFECT_INDEX_0)->modStackAmount(-10)) m_creature->RemoveAurasDueToSpell(SP_ATTUNED_TO_NATURE); } diff --git a/scripts/northrend/vault_of_archavon/boss_emalon.cpp b/scripts/northrend/vault_of_archavon/boss_emalon.cpp index bff426efd..600e8cb16 100644 --- a/scripts/northrend/vault_of_archavon/boss_emalon.cpp +++ b/scripts/northrend/vault_of_archavon/boss_emalon.cpp @@ -173,7 +173,7 @@ struct MANGOS_DLL_DECL npc_tempest_minionAI : public ScriptedAI if (m_uiOverchargedStacksCheckTimer < uiDiff) { m_uiOverchargedStacksCheckTimer = 2000; - Aura* pAuraOvercharged = m_creature->GetAura(SPELL_OVERCHARGED, 0); + Aura* pAuraOvercharged = m_creature->GetAura(SPELL_OVERCHARGED, EFFECT_INDEX_0); if(pAuraOvercharged && pAuraOvercharged->GetStackAmount() >= 10) { DoCast(m_creature, SPELL_OVERCHARGED_BLAST); @@ -387,7 +387,7 @@ struct MANGOS_DLL_DECL npc_tempest_warderAI : public ScriptedAI if (m_uiOverchargedStacksCheckTimer < uiDiff) { m_uiOverchargedStacksCheckTimer = 2000; - Aura* pAuraOvercharged = m_creature->GetAura(SPELL_OVERCHARGED, 0); + Aura* pAuraOvercharged = m_creature->GetAura(SPELL_OVERCHARGED,EFFECT_INDEX_0 ); if(pAuraOvercharged && pAuraOvercharged->GetStackAmount() >= 10) { DoCast(m_creature, SPELL_OVERCHARGED_BLAST); diff --git a/scripts/northrend/violet_hold/boss_ichoron.cpp b/scripts/northrend/violet_hold/boss_ichoron.cpp index 75fdadd16..434cccc79 100644 --- a/scripts/northrend/violet_hold/boss_ichoron.cpp +++ b/scripts/northrend/violet_hold/boss_ichoron.cpp @@ -177,7 +177,7 @@ struct MANGOS_DLL_DECL boss_ichoronAI : public ScriptedAI { if (!m_bIsExploded) { - if (!m_creature->HasAura(SPELL_PROTECTIVE_BUBBLE, 0)) + if (!m_creature->HasAura(SPELL_PROTECTIVE_BUBBLE, EFFECT_INDEX_0)) { DoCast(m_creature, m_bIsRegularMode ? SPELL_WATER_BLAST_H : SPELL_WATER_BLAST); //DoCast(m_creature, SPELL_DRAINED); diff --git a/scripts/northrend/violet_hold/violet_hold.cpp b/scripts/northrend/violet_hold/violet_hold.cpp index ff5b19c76..89f8d0fcb 100644 --- a/scripts/northrend/violet_hold/violet_hold.cpp +++ b/scripts/northrend/violet_hold/violet_hold.cpp @@ -702,7 +702,7 @@ struct MANGOS_DLL_DECL npc_door_sealAI : public ScriptedAI { if (SpellCorrupt_Timer <= diff) { - if (m_creature->HasAura(SPELL_CORRUPT,0)) + if (m_creature->HasAura(SPELL_CORRUPT,EFFECT_INDEX_0)) SpellCorrupt_Timer = 1500; else SpellCorrupt_Timer = 0; diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp index 3f2b10f4f..a3714b289 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp @@ -92,7 +92,7 @@ struct MANGOS_DLL_DECL boss_ambassador_hellmawAI : public npc_escortAI void DoIntro() { - if (m_creature->HasAura(SPELL_BANISH,0)) + if (m_creature->HasAura(SPELL_BANISH,EFFECT_INDEX_0)) m_creature->RemoveAurasDueToSpell(SPELL_BANISH); IsBanished = false; @@ -112,7 +112,7 @@ struct MANGOS_DLL_DECL boss_ambassador_hellmawAI : public npc_escortAI void MoveInLineOfSight(Unit *who) { - if (m_creature->HasAura(SPELL_BANISH,0)) + if (m_creature->HasAura(SPELL_BANISH,EFFECT_INDEX_0)) return; npc_escortAI::MoveInLineOfSight(who); diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp index e8a125c8e..d4599594a 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp @@ -86,7 +86,7 @@ struct MANGOS_DLL_DECL boss_murmurAI : public ScriptedAI if (target && target->GetTypeId() == TYPEID_PLAYER) { //Not do anything without aura, spell can be resisted! - if (target->HasAura(SPELL_SONIC_BOOM_CAST,1) && m_creature->IsWithinDistInMap(target, 34.0f)) + if (target->HasAura(SPELL_SONIC_BOOM_CAST,EFFECT_INDEX_1) && m_creature->IsWithinDistInMap(target, 34.0f)) { //This will be wrong calculation. Also, comments suggest it must deal damage target->SetHealth(uint32(target->GetMaxHealth() - target->GetMaxHealth() * 0.8)); diff --git a/scripts/outland/black_temple/boss_bloodboil.cpp b/scripts/outland/black_temple/boss_bloodboil.cpp index a9a23b2f2..66852310f 100644 --- a/scripts/outland/black_temple/boss_bloodboil.cpp +++ b/scripts/outland/black_temple/boss_bloodboil.cpp @@ -206,7 +206,7 @@ struct MANGOS_DLL_DECL boss_gurtogg_bloodboilAI : public ScriptedAI FelAcidTimer = 25000; }else FelAcidTimer -= diff; - if (!m_creature->HasAura(SPELL_BERSERK, 0)) + if (!m_creature->HasAura(SPELL_BERSERK, EFFECT_INDEX_0)) { if (EnrageTimer < diff) { diff --git a/scripts/outland/black_temple/boss_illidan.cpp b/scripts/outland/black_temple/boss_illidan.cpp index 847024104..134d8f0a7 100644 --- a/scripts/outland/black_temple/boss_illidan.cpp +++ b/scripts/outland/black_temple/boss_illidan.cpp @@ -996,7 +996,7 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI void AttackStart(Unit *who) { - if (!who || IsTalking || Phase == 2 || Phase == 4 || Phase == 6 || m_creature->HasAura(SPELL_KNEEL, 0)) + if (!who || IsTalking || Phase == 2 || Phase == 4 || Phase == 6 || m_creature->HasAura(SPELL_KNEEL, EFFECT_INDEX_0)) return; if (who == m_creature) @@ -1254,7 +1254,7 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI else if (count == 4) { DoResetThreat(); - if (!m_creature->HasAura(SPELL_DEMON_FORM, 0)) + if (!m_creature->HasAura(SPELL_DEMON_FORM, EFFECT_INDEX_0)) DoCastSpellIfCan(m_creature, SPELL_DEMON_FORM, CAST_TRIGGERED); } } @@ -1530,7 +1530,7 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI return; // If we are 'caged', then we shouldn't do anything such as cast spells or transform into Demon Form. - if (m_creature->HasAura(SPELL_CAGED, 0)) + if (m_creature->HasAura(SPELL_CAGED, EFFECT_INDEX_0)) { // Just so that he doesn't immediately enrage after he stops being caged. EnrageTimer = 40000; @@ -1539,7 +1539,7 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI } // Berserk Timer - flat 25 minutes - if (!m_creature->HasAura(SPELL_BERSERK, 0) && Phase != PHASE_DEMON_SEQUENCE) + if (!m_creature->HasAura(SPELL_BERSERK, EFFECT_INDEX_0) && Phase != PHASE_DEMON_SEQUENCE) { if (BerserkTimer < diff) { @@ -1607,7 +1607,7 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI { Unit* target = NULL; target = SelectUnit(SELECT_TARGET_RANDOM,1); - if (target && target->isAlive() && !target->HasAura(SPELL_PARASITIC_SHADOWFIEND, 0)) + if (target && target->isAlive() && !target->HasAura(SPELL_PARASITIC_SHADOWFIEND, EFFECT_INDEX_0)) { Cast(target, SPELL_PARASITIC_SHADOWFIEND); ParasiticShadowFiendTimer = 40000; @@ -1843,7 +1843,7 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI ShadowBlastTimer = 4000; GlobalTimer += 1500; } - if (!m_creature->HasAura(SPELL_DEMON_FORM, 0)) + if (!m_creature->HasAura(SPELL_DEMON_FORM, EFFECT_INDEX_0)) DoCastSpellIfCan(m_creature, SPELL_DEMON_FORM, CAST_TRIGGERED); }else ShadowBlastTimer -= diff; @@ -2062,14 +2062,14 @@ struct MANGOS_DLL_DECL cage_trap_triggerAI : public ScriptedAI { if (who->GetEntry() == ILLIDAN_STORMRAGE) // Check if who is Illidan { - if (!IllidanGUID && m_creature->IsWithinDistInMap(who, 3) && !who->HasAura(SPELL_CAGED, 0)) + if (!IllidanGUID && m_creature->IsWithinDistInMap(who, 3) && !who->HasAura(SPELL_CAGED, EFFECT_INDEX_0)) { IllidanGUID = who->GetGUID(); who->CastSpell(who, SPELL_CAGED, true); DespawnTimer = 5000; // Dispel his enrage - if (who->HasAura(SPELL_ENRAGE, 0)) + if (who->HasAura(SPELL_ENRAGE, EFFECT_INDEX_0)) who->RemoveAurasDueToSpell(SPELL_ENRAGE); if (GameObject* pCageTrap = m_creature->GetMap()->GetGameObject(CageTrapGUID)) @@ -2217,7 +2217,7 @@ struct MANGOS_DLL_DECL shadow_demonAI : public ScriptedAI // Only cast the below on players. if (m_creature->getVictim()->GetTypeId() != TYPEID_PLAYER) return; - if (!m_creature->getVictim()->HasAura(SPELL_PARALYZE, 0)) + if (!m_creature->getVictim()->HasAura(SPELL_PARALYZE, EFFECT_INDEX_0)) { TargetGUID = m_creature->getVictim()->GetGUID(); m_creature->AddThreat(m_creature->getVictim(), 10000000.0f); @@ -2283,7 +2283,7 @@ struct MANGOS_DLL_DECL mob_parasitic_shadowfiendAI : public ScriptedAI //Make sure our attack is ready and we aren't currently casting if (m_creature->isAttackReady() && !m_creature->IsNonMeleeSpellCasted(false)) { - if (!m_creature->getVictim()->HasAura(SPELL_PARASITIC_SHADOWFIEND, 0)) + if (!m_creature->getVictim()->HasAura(SPELL_PARASITIC_SHADOWFIEND, EFFECT_INDEX_0)) DoCastSpellIfCan(m_creature->getVictim(), SPELL_PARASITIC_SHADOWFIEND, CAST_TRIGGERED); m_creature->AttackerStateUpdate(m_creature->getVictim()); diff --git a/scripts/outland/black_temple/boss_mother_shahraz.cpp b/scripts/outland/black_temple/boss_mother_shahraz.cpp index b60a18c2e..9a5dc9f9d 100644 --- a/scripts/outland/black_temple/boss_mother_shahraz.cpp +++ b/scripts/outland/black_temple/boss_mother_shahraz.cpp @@ -268,7 +268,7 @@ struct MANGOS_DLL_DECL boss_shahrazAI : public ScriptedAI }else ShriekTimer -= diff; //Enrage - if (!m_creature->HasAura(SPELL_BERSERK, 0)) + if (!m_creature->HasAura(SPELL_BERSERK, EFFECT_INDEX_0)) { if (EnrageTimer < diff) { diff --git a/scripts/outland/black_temple/boss_supremus.cpp b/scripts/outland/black_temple/boss_supremus.cpp index 07795fda1..effd0eaa8 100644 --- a/scripts/outland/black_temple/boss_supremus.cpp +++ b/scripts/outland/black_temple/boss_supremus.cpp @@ -256,7 +256,7 @@ struct MANGOS_DLL_DECL boss_supremusAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (!m_creature->HasAura(SPELL_BERSERK, 0)) + if (!m_creature->HasAura(SPELL_BERSERK, EFFECT_INDEX_0)) { if (BerserkTimer < diff) DoCastSpellIfCan(m_creature, SPELL_BERSERK); diff --git a/scripts/outland/black_temple/boss_teron_gorefiend.cpp b/scripts/outland/black_temple/boss_teron_gorefiend.cpp index fa3f32a23..97ada544f 100644 --- a/scripts/outland/black_temple/boss_teron_gorefiend.cpp +++ b/scripts/outland/black_temple/boss_teron_gorefiend.cpp @@ -313,7 +313,7 @@ struct MANGOS_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI Unit* Ghost = NULL; if (GhostGUID) Ghost = Unit::GetUnit((*m_creature), GhostGUID); - if (Ghost && Ghost->isAlive() && Ghost->HasAura(SPELL_SHADOW_OF_DEATH, 0)) + if (Ghost && Ghost->isAlive() && Ghost->HasAura(SPELL_SHADOW_OF_DEATH, EFFECT_INDEX_0)) { /*float x,y,z; Ghost->GetPosition(x,y,z); @@ -466,7 +466,7 @@ struct MANGOS_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI RandomYellTimer = urand(50000, 100000); }else RandomYellTimer -= diff; - if (!m_creature->HasAura(SPELL_BERSERK, 0)) + if (!m_creature->HasAura(SPELL_BERSERK, EFFECT_INDEX_0)) { if (EnrageTimer < diff) { diff --git a/scripts/outland/black_temple/boss_warlord_najentus.cpp b/scripts/outland/black_temple/boss_warlord_najentus.cpp index 66f402281..05df6da13 100644 --- a/scripts/outland/black_temple/boss_warlord_najentus.cpp +++ b/scripts/outland/black_temple/boss_warlord_najentus.cpp @@ -102,7 +102,7 @@ struct MANGOS_DLL_DECL boss_najentusAI : public ScriptedAI { if (spell->Id == SPELL_HURL_SPINE) { - if (m_creature->HasAura(SPELL_TIDAL_SHIELD, 0)) + if (m_creature->HasAura(SPELL_TIDAL_SHIELD, EFFECT_INDEX_0)) m_creature->RemoveAurasDueToSpell(SPELL_TIDAL_SHIELD); DoCastSpellIfCan(m_creature->getVictim(), SPELL_TIDAL_BURST); diff --git a/scripts/outland/blades_edge_mountains.cpp b/scripts/outland/blades_edge_mountains.cpp index f71fb6af6..d14026aab 100644 --- a/scripts/outland/blades_edge_mountains.cpp +++ b/scripts/outland/blades_edge_mountains.cpp @@ -246,7 +246,7 @@ struct MANGOS_DLL_DECL npc_daranelleAI : public ScriptedAI { if (pWho->GetTypeId() == TYPEID_PLAYER) { - if (pWho->HasAura(SPELL_LASHHAN_CHANNEL,0) && m_creature->IsWithinDistInMap(pWho, 10.0f)) + if (pWho->HasAura(SPELL_LASHHAN_CHANNEL,EFFECT_INDEX_0) && m_creature->IsWithinDistInMap(pWho, 10.0f)) { DoScriptText(SAY_SPELL_INFLUENCE, m_creature, pWho); diff --git a/scripts/outland/boss_doomwalker.cpp b/scripts/outland/boss_doomwalker.cpp index 7b7e42bfd..e93df32c6 100644 --- a/scripts/outland/boss_doomwalker.cpp +++ b/scripts/outland/boss_doomwalker.cpp @@ -96,7 +96,7 @@ struct MANGOS_DLL_DECL boss_doomwalkerAI : public ScriptedAI { if (who && who->GetTypeId() == TYPEID_PLAYER && m_creature->IsHostileTo(who)) { - if (who->HasAura(SPELL_MARK_DEATH,0)) + if (who->HasAura(SPELL_MARK_DEATH,EFFECT_INDEX_0)) { who->CastSpell(who,SPELL_AURA_DEATH,1); } @@ -137,7 +137,7 @@ struct MANGOS_DLL_DECL boss_doomwalkerAI : public ScriptedAI //remove enrage before casting earthquake because enrage + earthquake = 16000dmg over 8sec and all dead if (InEnrage) - m_creature->RemoveAura(SPELL_ENRAGE, 0); + m_creature->RemoveAura(SPELL_ENRAGE, EFFECT_INDEX_0); DoCastSpellIfCan(m_creature,SPELL_EARTHQUAKE); Quake_Timer = urand(30000, 55000); diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp b/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp index 813a0a268..3986b30c1 100644 --- a/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp @@ -282,7 +282,7 @@ struct MANGOS_DLL_DECL boss_magtheridonAI : public ScriptedAI for(CubeMap::iterator i = Cube.begin(); i != Cube.end(); ++i) { Unit *clicker = Unit::GetUnit(*m_creature, (*i).second); - if (!clicker || !clicker->HasAura(SPELL_SHADOW_GRASP, 1)) + if (!clicker || !clicker->HasAura(SPELL_SHADOW_GRASP, EFFECT_INDEX_1)) { DebuffClicker(clicker); (*i).second = 0; @@ -292,14 +292,14 @@ struct MANGOS_DLL_DECL boss_magtheridonAI : public ScriptedAI } // if 5 clickers from other cubes apply shadow cage - if (ClickerNum >= MAX_CLICK && !m_creature->HasAura(SPELL_SHADOW_CAGE, 0) && m_creature->HasAura(SPELL_BLASTNOVA, 0)) + if (ClickerNum >= MAX_CLICK && !m_creature->HasAura(SPELL_SHADOW_CAGE, EFFECT_INDEX_0) && m_creature->HasAura(SPELL_BLASTNOVA, EFFECT_INDEX_0)) { DoScriptText(SAY_BANISH, m_creature); m_creature->CastSpell(m_creature, SPELL_SHADOW_CAGE, true); } else { - if (ClickerNum < MAX_CLICK && m_creature->HasAura(SPELL_SHADOW_CAGE, 0)) + if (ClickerNum < MAX_CLICK && m_creature->HasAura(SPELL_SHADOW_CAGE, EFFECT_INDEX_0)) m_creature->RemoveAurasDueToSpell(SPELL_SHADOW_CAGE); } @@ -643,7 +643,7 @@ bool GOHello_go_manticron_cube(Player* pPlayer, GameObject* pGo) return true; // if exhausted or already channeling return - if (pPlayer->HasAura(SPELL_MIND_EXHAUSTION, 0) || pPlayer->HasAura(SPELL_SHADOW_GRASP, 1)) + if (pPlayer->HasAura(SPELL_MIND_EXHAUSTION, EFFECT_INDEX_0) || pPlayer->HasAura(SPELL_SHADOW_GRASP, EFFECT_INDEX_1)) return true; pPlayer->InterruptNonMeleeSpells(false); diff --git a/scripts/outland/nagrand.cpp b/scripts/outland/nagrand.cpp index 6bcd32d5e..df4a0e1af 100644 --- a/scripts/outland/nagrand.cpp +++ b/scripts/outland/nagrand.cpp @@ -139,8 +139,8 @@ struct MANGOS_DLL_DECL mob_lumpAI : public ScriptedAI void Aggro(Unit *who) { - if (m_creature->HasAura(SPELL_VISUAL_SLEEP,0)) - m_creature->RemoveAura(SPELL_VISUAL_SLEEP,0); + if (m_creature->HasAura(SPELL_VISUAL_SLEEP,EFFECT_INDEX_0)) + m_creature->RemoveAura(SPELL_VISUAL_SLEEP,EFFECT_INDEX_0); if (!m_creature->IsStandState()) m_creature->SetStandState(UNIT_STAND_STATE_STAND); diff --git a/scripts/outland/netherstorm.cpp b/scripts/outland/netherstorm.cpp index 87c01420e..b1a5caa58 100644 --- a/scripts/outland/netherstorm.cpp +++ b/scripts/outland/netherstorm.cpp @@ -600,7 +600,7 @@ CreatureAI* GetAI_npc_commander_dawnforge(Creature* pCreature) bool AreaTrigger_at_commander_dawnforge(Player* pPlayer, AreaTriggerEntry *at) { // if player lost aura or not have at all, we should not try start event. - if (!pPlayer->HasAura(SPELL_SUNFURY_DISGUISE, 0)) + if (!pPlayer->HasAura(SPELL_SUNFURY_DISGUISE, EFFECT_INDEX_0)) return false; if (pPlayer->isAlive() && pPlayer->GetQuestStatus(QUEST_INFO_GATHERING) == QUEST_STATUS_INCOMPLETE) diff --git a/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp b/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp index 2c3103b70..0f4738fb7 100644 --- a/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp +++ b/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp @@ -160,7 +160,7 @@ struct MANGOS_DLL_DECL boss_high_botanist_freywinnAI : public ScriptedAI return; } - /*if (m_creature->HasAura(SPELL_TREE_FORM,0) || m_creature->HasAura(SPELL_TRANQUILITY,0)) + /*if (m_creature->HasAura(SPELL_TREE_FORM,EFFECT_INDEX_0) || m_creature->HasAura(SPELL_TRANQUILITY,EFFECT_INDEX_0)) return;*/ //one random seedling every 5 secs, but not in tree form diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index 276a8e007..19525ba97 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -192,7 +192,7 @@ struct MANGOS_DLL_DECL npc_air_force_botsAI : public ScriptedAI if (!pWho->IsWithinDistInMap(m_creature, RANGE_GUARDS_MARK)) return; - Aura* pMarkAura = pWho->GetAura(SPELL_GUARDS_MARK, 0); + Aura* pMarkAura = pWho->GetAura(SPELL_GUARDS_MARK, EFFECT_INDEX_0); if (pMarkAura) { // the target wasn't able to move out of our range within 25 seconds @@ -1046,7 +1046,7 @@ bool GossipHello_npc_innkeeper(Player* pPlayer, Creature* pCreature) { pPlayer->PrepareGossipMenu(pCreature); - if (IsHolidayActive(HOLIDAY_HALLOWS_END) && !pPlayer->HasAura(SPELL_TRICK_OR_TREATED,0)) + if (IsHolidayActive(HOLIDAY_HALLOWS_END) && !pPlayer->HasAura(SPELL_TRICK_OR_TREATED,EFFECT_INDEX_0)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TRICK_OR_TREAT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); // Should only apply to innkeeper close to start areas. From 904a94186a99415f6c03e6ca433154dde6acfa16 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Mon, 22 Feb 2010 22:49:44 +0300 Subject: [PATCH 155/405] Icecrown teleport change --- .../icecrown_citadel/instance_icecrown_spire.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp index 6277d6ee2..315aab3aa 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp @@ -135,11 +135,10 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance } void SetData(uint32 uiType, uint32 uiData) { + if (uiType > m_auiEncounter[0] && uiData == DONE) m_auiEncounter[0] = uiType; switch(uiType) { case TYPE_TELEPORT: - if (uiData > m_auiEncounter[0]) m_auiEncounter[0] = uiData; - uiData = NOT_STARTED; break; case TYPE_MARROWGAR: m_auiEncounter[1] = uiData; From 108e3c257453bcb287d9fe52937ebcdd5594d6ea Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 24 Feb 2010 18:56:09 +0300 Subject: [PATCH 156/405] Halls of reflection: Falric && Marwyn --- addition/723_icecrown_down_mangos.sql | 10 +- .../halls_of_reflection/boss_falryn.cpp | 89 ++++++++++++++++- .../halls_of_reflection/boss_marwyn.cpp | 99 +++++++++++++++++-- .../halls_of_reflection/def_halls.h | 34 +++---- .../instance_halls_of_reflection.cpp | 88 ++++++++++++----- system/ScriptLoader.cpp | 8 +- 6 files changed, 271 insertions(+), 57 deletions(-) diff --git a/addition/723_icecrown_down_mangos.sql b/addition/723_icecrown_down_mangos.sql index 7af4dfee7..cd9806487 100644 --- a/addition/723_icecrown_down_mangos.sql +++ b/addition/723_icecrown_down_mangos.sql @@ -5,7 +5,11 @@ -- UPDATE `instance_template` SET `script`='instance_pit_of_saron' WHERE `map`=658; --- UPDATE `instance_template` SET `script`='instance_halls_of_reflection' WHERE `map`=668; --- UPDATE `creature_template` SET `ScriptName`='boss_falryn' WHERE `entry`=33112; --- UPDATE `creature_template` SET `ScriptName`='boss_marwyn' WHERE `entry`=38113; +UPDATE `instance_template` SET `script`='instance_halls_of_reflection' WHERE `map`=668; +UPDATE `creature_template` SET `ScriptName`='boss_falryn' WHERE `entry`=38112; +UPDATE `creature_template` SET `ScriptName`='boss_marwyn' WHERE `entry`=38113; -- UPDATE `creature_template` SET `ScriptName`='boss_lich_king_fh' WHERE `entry`=37226; +UPDATE `gameobject_template` SET ScriptName = 'go_frostmourne_altar' WHERE `entry` = 202236; +UPDATE `gameobject_template` SET ScriptName = 'go_frostmourne' WHERE `entry` = 202302; +DELETE FROM `creature` WHERE `map` = 668 AND `id` IN (38177,38176,38173,38172,38567,38175); +UPDATE `creature_template` SET `ScriptName`='generic_creature' WHERE `entry` IN (38177,38176,38173,38172,38567,38175); diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falryn.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falryn.cpp index 553b9405f..90de0da13 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falryn.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falryn.cpp @@ -45,43 +45,122 @@ struct MANGOS_DLL_DECL boss_falrynAI : public ScriptedAI { boss_falrynAI(Creature* pCreature) : ScriptedAI(pCreature) { - pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Regular = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } bool Regular; - ScriptedInstance *pInstance; + ScriptedInstance *m_pInstance; uint32 m_uiBerserk_Timer; uint32 m_uiDespair_Timer; uint32 m_uiHorror_Timer; uint32 m_uiStrike_Timer; + uint32 m_uiSummon_Timer; uint8 health; uint8 stage; + uint8 SummonCount; + uint64 npctype1; + uint64 npctype2; + uint64 npctype3; + void Reset() { - if(pInstance) pInstance->SetData(TYPE_FALRYN, NOT_STARTED); m_uiBerserk_Timer = 180000; stage = 0; + SummonCount = 0; m_uiDespair_Timer = Regular ? 40000 : 30000; m_uiHorror_Timer = urand(25000,35000); m_uiStrike_Timer = urand(10000,15000); + m_uiSummon_Timer = 0; + if (m_pInstance) { + m_pInstance->SetData(TYPE_FALRYN, NOT_STARTED); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetVisibility(VISIBILITY_OFF); + } + } + + bool CallGuards(TempSummonType type, uint32 _summontime ) + { + switch(urand(0,3)) + { + case 0: { + npctype1 = NPC_DARK_1; + npctype2 = NPC_DARK_3; + npctype3 = NPC_DARK_6; + break;} + case 1: { + npctype1 = NPC_DARK_2; + npctype2 = NPC_DARK_3; + npctype3 = NPC_DARK_4; + break;} + case 2: { + npctype1 = NPC_DARK_2; + npctype2 = NPC_DARK_5; + npctype3 = NPC_DARK_6; + break;} + case 3: { + npctype1 = NPC_DARK_1; + npctype2 = NPC_DARK_5; + npctype3 = NPC_DARK_4; + break;} + } + if (Creature* pSummon1 = m_creature->SummonCreature(npctype1, SpawnLoc[0].x, SpawnLoc[0].y, SpawnLoc[0].z, 0, type, _summontime)) + pSummon1->SetInCombatWithZone(); + if (Creature* pSummon2 = m_creature->SummonCreature(npctype2, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z, 0, type, _summontime)) + pSummon2->SetInCombatWithZone(); + if (Creature* pSummon3 = m_creature->SummonCreature(npctype3, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 0, type, _summontime)) + pSummon3->SetInCombatWithZone(); + + return true; } void Aggro(Unit *who) { - if(pInstance) pInstance->SetData(TYPE_FALRYN, IN_PROGRESS); +// if(m_pInstance) m_pInstance->SetData(TYPE_FALRYN, IN_PROGRESS); + } + + void AttackStart(Unit* pWho) + { + if (!m_pInstance) return; + + if (m_pInstance->GetData(TYPE_FALRYN) != IN_PROGRESS) return; + + if (!pWho || pWho == m_creature) return; + + if (m_creature->Attack(pWho, true)) { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + DoStartMovement(pWho); + } } void JustDied(Unit *killer) { - if(pInstance) pInstance->SetData(TYPE_FALRYN, DONE); + if(m_pInstance) m_pInstance->SetData(TYPE_FALRYN, DONE); } void UpdateAI(const uint32 diff) { + if (m_pInstance->GetData(TYPE_FALRYN) == SPECIAL ) { + if (m_uiSummon_Timer < diff) { + ++SummonCount; + if (SummonCount > MOB_WAVES_NUM_1) { + m_pInstance->SetData(TYPE_FALRYN, IN_PROGRESS); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetVisibility(VISIBILITY_ON); + m_creature->SetInCombatWithZone(); + } + else CallGuards(TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5000); + m_uiSummon_Timer = MOB_WAVES_DELAY_1; + } else m_uiSummon_Timer -= diff; + } + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_marwyn.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_marwyn.cpp index c3201a95b..309a1e968 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_marwyn.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_marwyn.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: boss_marwyn -SD%Complete: 40% +SD%Complete: 30% SDComment: by /dev/rsa SDCategory: Halls of Reflection EndScriptData */ @@ -46,49 +46,134 @@ struct MANGOS_DLL_DECL boss_marwynAI : public ScriptedAI { boss_marwynAI(Creature* pCreature) : ScriptedAI(pCreature) { - pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Regular = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } bool Regular; - ScriptedInstance *pInstance; + ScriptedInstance *m_pInstance; uint32 m_uiBerserk_Timer; uint32 m_uiSharedSuffering_Timer; uint32 m_uiWell_Timer; uint32 m_uiTouch_Timer; uint32 m_uiFlesh_Timer; uint32 m_uiObliterate_Timer; + uint32 m_uiSummon_Timer; uint8 health; uint8 stage; + uint8 SummonCount; + + uint64 npctype1; + uint64 npctype2; + uint64 npctype3; void Reset() { - if(pInstance) pInstance->SetData(TYPE_FALRYN, NOT_STARTED); m_uiBerserk_Timer = 180000; m_uiSharedSuffering_Timer = 4000; m_uiWell_Timer = 5000; m_uiTouch_Timer = 8000; m_uiFlesh_Timer = 10000; m_uiObliterate_Timer = 1000; + SummonCount = 0; + stage = 0; + m_uiSummon_Timer = 0; + if (m_pInstance) + m_pInstance->SetData(TYPE_MARWYN, NOT_STARTED); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetVisibility(VISIBILITY_OFF); + } + + bool CallGuards(TempSummonType type, uint32 _summontime ) + { + switch(urand(0,3)) + { + case 0: { + npctype1 = NPC_DARK_1; + npctype2 = NPC_DARK_3; + npctype3 = NPC_DARK_6; + break;} + case 1: { + npctype1 = NPC_DARK_2; + npctype2 = NPC_DARK_3; + npctype3 = NPC_DARK_4; + break;} + case 2: { + npctype1 = NPC_DARK_2; + npctype2 = NPC_DARK_5; + npctype3 = NPC_DARK_6; + break;} + case 3: { + npctype1 = NPC_DARK_1; + npctype2 = NPC_DARK_5; + npctype3 = NPC_DARK_4; + break;} + } + + if (Creature* pSummon1 = m_creature->SummonCreature(npctype1, SpawnLoc[0].x, SpawnLoc[0].y, SpawnLoc[0].z, 0, type, _summontime)) + pSummon1->SetInCombatWithZone(); + if (Creature* pSummon2 = m_creature->SummonCreature(npctype2, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z, 0, type, _summontime)) + pSummon2->SetInCombatWithZone(); + if (Creature* pSummon3 = m_creature->SummonCreature(npctype3, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 0, type, _summontime)) + pSummon3->SetInCombatWithZone(); + + return true; + } + + void AttackStart(Unit* pWho) + { + if (!m_pInstance) return; + + if (m_pInstance->GetData(TYPE_MARWYN) != IN_PROGRESS) return; + + if (!pWho || pWho == m_creature) return; + + if (m_creature->Attack(pWho, true)) { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + DoStartMovement(pWho); + } } void Aggro(Unit *who) { - if(pInstance) pInstance->SetData(TYPE_MARWYN, IN_PROGRESS); +// if(m_pInstance) m_pInstance->SetData(TYPE_MARWYN, IN_PROGRESS); } void JustDied(Unit *killer) { - if(pInstance) pInstance->SetData(TYPE_MARWYN, DONE); + if(m_pInstance) m_pInstance->SetData(TYPE_MARWYN, DONE); } void UpdateAI(const uint32 diff) { + if (m_pInstance->GetData(TYPE_MARWYN) == SPECIAL ) { + if (m_uiSummon_Timer < diff) { + ++SummonCount; + if (SummonCount > MOB_WAVES_NUM_1) { + m_pInstance->SetData(TYPE_MARWYN, IN_PROGRESS); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetVisibility(VISIBILITY_ON); + m_creature->SetInCombatWithZone(); + } + else CallGuards(TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5000); + m_uiSummon_Timer = MOB_WAVES_DELAY_1; + } else m_uiSummon_Timer -= diff; + } + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + switch(stage) + { + case 0: { + break;} + case 1: { if (m_uiSharedSuffering_Timer < diff) { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) DoCast(pTarget, Regular ? SPELL_SHARED_SUFFERING_N : SPELL_SHARED_SUFFERING_H); @@ -117,6 +202,8 @@ struct MANGOS_DLL_DECL boss_marwynAI : public ScriptedAI {DoCastSpellIfCan(m_creature->getVictim(), Regular ? SPELL_OBLITERATE_N : SPELL_OBLITERATE_H); m_uiObliterate_Timer=urand(8000,12000); } else m_uiObliterate_Timer -= diff; + } + } diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/def_halls.h b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/def_halls.h index 84284c994..595b4982b 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/def_halls.h +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/def_halls.h @@ -4,19 +4,17 @@ enum { - MAX_ENCOUNTERS = 8, + MAX_ENCOUNTERS = 7, TYPE_START_EVENT = 0, - TYPE_MOBS_WAVE_1 = 1, - TYPE_FALRYN = 2, - TYPE_MOBS_WAVE_2 = 3, - TYPE_MARWYN = 4, - TYPE_LICH_KING_1 = 5, - TYPE_FROST_GENERAL = 6, - TYPE_LICH_KING_BATTLE = 7, - TYPE_ESCAPE = 8, + TYPE_FALRYN = 1, + TYPE_MARWYN = 2, + TYPE_LICH_KING_1 = 3, + TYPE_FROST_GENERAL = 4, + TYPE_LICH_KING_BATTLE = 5, + TYPE_ESCAPE = 6, - NPC_FALRYN = 33112, + NPC_FALRYN = 38112, NPC_MARWYN = 38113, NPC_LICH_KING = 37226, @@ -27,16 +25,15 @@ enum NPC_SYLVANA_1 = 37554, NPC_SYLVANA_2 = 37554, - NPC_DARK_1 = 38177, - NPC_DARK_2 = 38176, - NPC_DARK_3 = 38173, - NPC_DARK_4 = 38172, - NPC_DARK_5 = 38567, - NPC_DARK_6 = 38175, + NPC_DARK_1 = 38177, //Shadowy Mercenary + NPC_DARK_2 = 38176, //Tortured Rifleman + NPC_DARK_3 = 38173, //Spectral Footman + NPC_DARK_4 = 38172, //Phantom Mage + NPC_DARK_5 = 38567, //Phantom Hallucination + NPC_DARK_6 = 38175, //Ghostly Priest NPC_FROST_GENERAL = 36723, - GO_ICECROWN_DOOR = 201976, //72802 GO_IMPENETRABLE_DOOR = 197341, //72801 GO_FROSTMOURNE_ALTAR = 202236, //3551 @@ -47,6 +44,9 @@ enum GO_CAPTAIN_CHEST_3 = 202337, //3246 GO_CAPTAIN_CHEST_4 = 202336, //3333 + MOB_WAVES_NUM_1 = 4, + MOB_WAVES_DELAY_1 = 30000, //in milliseconds + }; struct Locations diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp index 17091a323..42e676409 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp @@ -66,7 +66,7 @@ struct MANGOS_DLL_DECL instance_halls_of_reflection : public ScriptedInstance switch(pCreature->GetEntry()) { case NPC_FALRYN: - m_uiMarwynGUID = pCreature->GetGUID(); + m_uiFalrynGUID = pCreature->GetGUID(); break; case NPC_MARWYN: m_uiMarwynGUID = pCreature->GetGUID(); @@ -98,26 +98,32 @@ struct MANGOS_DLL_DECL instance_halls_of_reflection : public ScriptedInstance break; case GO_ICECROWN_DOOR: m_uiIcecrownDoorGUID = pGo->GetGUID(); break; case GO_IMPENETRABLE_DOOR: m_uiImpenetrableDoorGUID = pGo->GetGUID(); break; - case GO_FROSTMOURNE: m_uiFrostmourneGUID = pGo->GetGUID(); break; - case GO_FROSTMOURNE_ALTAR: m_uiFrostmourneAltarGUID = pGo->GetGUID(); break; + case GO_FROSTMOURNE: m_uiFrostmourneGUID = pGo->GetGUID(); + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + break; + case GO_FROSTMOURNE_ALTAR: m_uiFrostmourneAltarGUID = pGo->GetGUID(); + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + break; } } void SetData(uint32 uiType, uint32 uiData) { switch(uiType) { - case TYPE_START_EVENT: m_auiEncounter[0] = uiData; break; - case TYPE_MOBS_WAVE_1: m_auiEncounter[1] = uiData; break; - case TYPE_FALRYN: m_auiEncounter[2] = uiData; break; - case TYPE_MOBS_WAVE_2: m_auiEncounter[3] = uiData; break; - case TYPE_MARWYN: m_auiEncounter[4] = uiData; + case TYPE_START_EVENT: m_auiEncounter[0] = uiData; + if (uiData == DONE) { + CloseDoor(m_uiIcecrownDoorGUID); + }; break; + case TYPE_FALRYN: m_auiEncounter[1] = uiData; break; + case TYPE_MARWYN: m_auiEncounter[2] = uiData; if (uiData == DONE) { OpenDoor(m_uiImpenetrableDoorGUID); + OpenDoor(m_uiIcecrownDoorGUID); }; break; - case TYPE_LICH_KING_1: m_auiEncounter[5] = uiData; break; - case TYPE_FROST_GENERAL: m_auiEncounter[6] = uiData; break; - case TYPE_LICH_KING_BATTLE: m_auiEncounter[7] = uiData; break; - case TYPE_ESCAPE: m_auiEncounter[8] = uiData; break; + case TYPE_LICH_KING_1: m_auiEncounter[3] = uiData; break; + case TYPE_FROST_GENERAL: m_auiEncounter[4] = uiData; break; + case TYPE_LICH_KING_BATTLE: m_auiEncounter[5] = uiData; break; + case TYPE_ESCAPE: m_auiEncounter[6] = uiData; break; } if (uiData == DONE) @@ -146,14 +152,12 @@ struct MANGOS_DLL_DECL instance_halls_of_reflection : public ScriptedInstance switch(uiType) { case TYPE_START_EVENT: return m_auiEncounter[0]; - case TYPE_MOBS_WAVE_1: return m_auiEncounter[1]; - case TYPE_FALRYN: return m_auiEncounter[2]; - case TYPE_MOBS_WAVE_2: return m_auiEncounter[3]; - case TYPE_MARWYN: return m_auiEncounter[4]; - case TYPE_LICH_KING_1: return m_auiEncounter[5]; - case TYPE_FROST_GENERAL: return m_auiEncounter[6]; - case TYPE_LICH_KING_BATTLE: return m_auiEncounter[7]; - case TYPE_ESCAPE: return m_auiEncounter[8]; + case TYPE_FALRYN: return m_auiEncounter[1]; + case TYPE_MARWYN: return m_auiEncounter[2]; + case TYPE_LICH_KING_1: return m_auiEncounter[3]; + case TYPE_FROST_GENERAL: return m_auiEncounter[4]; + case TYPE_LICH_KING_BATTLE: return m_auiEncounter[5]; + case TYPE_ESCAPE: return m_auiEncounter[6]; } return 0; } @@ -186,11 +190,12 @@ struct MANGOS_DLL_DECL instance_halls_of_reflection : public ScriptedInstance { loadStream >> m_auiEncounter[i]; - if (m_auiEncounter[i] == IN_PROGRESS) + if (m_auiEncounter[i] != DONE) m_auiEncounter[i] = NOT_STARTED; } OUT_LOAD_INST_DATA_COMPLETE; + OpenDoor(m_uiIcecrownDoorGUID); } }; @@ -208,13 +213,47 @@ bool GOHello_go_frostmourne_altar(Player *player, GameObject* pGo) switch(pGo->GetEntry()) { - case GO_FROSTMOURNE_ALTAR: pInstance->SetData(TYPE_START_EVENT, SPECIAL); break; + case GO_FROSTMOURNE_ALTAR: { + if (pInstance->GetData(TYPE_START_EVENT) != DONE) { + pInstance->SetData(TYPE_START_EVENT, DONE); + pInstance->SetData(TYPE_FALRYN, SPECIAL); + pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + }; + if (pInstance->GetData(TYPE_START_EVENT) == DONE + && pInstance->GetData(TYPE_FALRYN) != DONE) { + pInstance->SetData(TYPE_START_EVENT, DONE); + pInstance->SetData(TYPE_FALRYN, SPECIAL); + pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + }; + } break; } pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); return true; } +bool GOHello_go_frostmourne(Player *player, GameObject* pGo) +{ + + ScriptedInstance *pInstance = (ScriptedInstance *) pGo->GetInstanceData(); + if(!pInstance) return false; + + switch(pGo->GetEntry()) + { + case GO_FROSTMOURNE: { + if (pInstance->GetData(TYPE_START_EVENT) == DONE + && pInstance->GetData(TYPE_FALRYN) == DONE + && pInstance->GetData(TYPE_MARWYN) != DONE) { + pInstance->SetData(TYPE_MARWYN, SPECIAL); + pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + }; + } break; + } + + + return true; +} + void AddSC_instance_halls_of_reflection() { Script* newscript; @@ -228,4 +267,9 @@ void AddSC_instance_halls_of_reflection() newscript->pGOHello = &GOHello_go_frostmourne_altar; newscript->RegisterSelf(); + newscript = new Script; + newscript->Name = "go_frostmourne"; + newscript->pGOHello = &GOHello_go_frostmourne; + newscript->RegisterSelf(); + } diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index 88ecdde93..430ca5553 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -387,8 +387,8 @@ extern void AddSC_boss_krick(); extern void AddSC_boss_scourgelord_tirannus(); extern void AddSC_instance_halls_of_reflection(); -//extern void AddSC_boss_falryn(); -//extern void AddSC_boss_marwyn(); +extern void AddSC_boss_falryn(); +extern void AddSC_boss_marwyn(); //extern void AddSC_boss_lich_king_fh(); //outland @@ -847,8 +847,8 @@ void AddScripts() AddSC_boss_scourgelord_tirannus(); AddSC_instance_halls_of_reflection(); -// AddSC_boss_falryn(); -// AddSC_boss_marwyn(); + AddSC_boss_falryn(); + AddSC_boss_marwyn(); // AddSC_boss_lich_king_fh(); //outland From 494356fc0887994f6f176038c03fae19f553bb5a Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 25 Feb 2010 15:25:47 +0300 Subject: [PATCH 157/405] Icecrown - Marrowgar _TEST_ changes --- addition/721_icecrown_mangos.sql | 2 + .../icecrown_citadel/boss_lord_marrowgar.cpp | 119 ++++++++++++++++-- 2 files changed, 114 insertions(+), 7 deletions(-) diff --git a/addition/721_icecrown_mangos.sql b/addition/721_icecrown_mangos.sql index 30103165d..74a82a563 100644 --- a/addition/721_icecrown_mangos.sql +++ b/addition/721_icecrown_mangos.sql @@ -48,6 +48,8 @@ UPDATE `creature_template` SET `faction_A`=14, `faction_H`=14,`ScriptName`='mob_ UPDATE `creature_template` SET `ScriptName`='boss_lord_marrowgar' WHERE `entry`= 36612; UPDATE `gameobject_template` SET `faction` = '114',`data0` = '0' WHERE `gameobject_template`.`entry` IN (201910,201911); UPDATE `gameobject` SET `state` = '1' WHERE `guid` IN (72526,72525); +UPDATE `creature_template` SET `ScriptName`='mob_coldflame' WHERE `entry`= 36672; +-- UPDATE `creature_template` SET `ScriptName`='mob_bone_spike' WHERE `entry`= 38711; -- Gunship battle UPDATE `creature_template` SET `ScriptName`='mob_spire_frostwyrm', `AIName`='' WHERE `entry`= 37230; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp index 6c1e499a1..a1e825b63 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp @@ -29,16 +29,19 @@ enum SPELL_BERSERK = 47008, //yells //summons + MOB_BONE_SPIKE = 38711, + MOB_COLDFLAME = 36672, //Abilities SPELL_SABER_LASH_N = 71021, SPELL_COLD_FLAME_N = 69146, SPELL_BONE_STRIKE_N = 69057, - SPELL_BONE_STORM_N = 69076, + SPELL_BONE_STORM = 69076, + SPELL_BONE_STORM_STRIKE_N = 69075, SPELL_SABER_LASH_H = 71021, SPELL_COLD_FLAME_H = 70824, SPELL_BONE_STRIKE_H = 69057, - SPELL_BONE_STORM_H = 69076, + SPELL_BONE_STORM_STRIKE_H = 70835, //h25 - 70836 }; struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI @@ -66,7 +69,7 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI stage = 0; health = 100; m_uiSaberLash_Timer = 10000; - m_uiColdFlame_Timer = 25000; + m_uiColdFlame_Timer = 5000; m_uiBoneStrike_Timer = urand(17000,29000); m_uiBoneStorm = false; m_uiBoneStorm_Timer = 40000; @@ -75,6 +78,23 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI if(pInstance) pInstance->SetData(TYPE_MARROWGAR, NOT_STARTED); } + uint64 CallGuard(uint64 npctype,TempSummonType type, uint32 _summontime ) + { + float fPosX, fPosY, fPosZ; + m_creature->GetPosition(fPosX, fPosY, fPosZ); + m_creature->GetRandomPoint(fPosX, fPosY, fPosZ, urand(5, 15), fPosX, fPosY, fPosZ); + Creature* pSummon = m_creature->SummonCreature(npctype, fPosX, fPosY, fPosZ, 0, type, _summontime); + if(pSummon) pSummon->SetInCombatWithZone(); + return pSummon ? pSummon->GetGUID() : 0; + } + + + void JustSummoned(Creature* _summoned) + { + if (Unit* target = SelectUnit(SELECT_TARGET_BOTTOMAGGRO,0)) + _summoned->AddThreat(target); + } + void Aggro(Unit *who) { if(pInstance) pInstance->SetData(TYPE_MARROWGAR, IN_PROGRESS); @@ -103,7 +123,7 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI case 1: { if (!m_uiBoneStorm) {if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, Regular ? SPELL_BONE_STORM_N : SPELL_BONE_STORM_H); + DoCast(pTarget, SPELL_BONE_STORM ); m_uiBoneStorm = true; stage = 2; } @@ -114,7 +134,17 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI // m_creature->RemoveAurasDueToSpell(Regular ? SPELL_BONE_STORM_N : SPELL_BONE_STORM_H); m_creature->SetInCombatWithZone(); stage = 3; - } else m_uiBoneStorm_Timer -= diff; + } else m_uiBoneStorm_Timer -= diff; + + Map* pMap = m_creature->GetMap(); + Map::PlayerList const &lPlayers = pMap->GetPlayers(); + for(Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr) + { + Player* pPlayer = itr->getSource(); + if (!pPlayer) continue; + if (itr->getSource()->isAlive() && itr->getSource()->IsWithinDistInMap(m_creature, 4)) + DoCast(itr->getSource(), Regular ? SPELL_BONE_STRIKE_N : SPELL_BONE_STRIKE_H); + } break;} case 3: break; } @@ -126,8 +156,9 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI if (m_uiColdFlame_Timer < diff) {if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, Regular ? SPELL_COLD_FLAME_N :SPELL_COLD_FLAME_H); - m_uiColdFlame_Timer=urand(15000,25000); +// DoCastSpellIfCan(pTarget, Regular ? SPELL_COLD_FLAME_N :SPELL_COLD_FLAME_H); + CallGuard(MOB_COLDFLAME, TEMPSUMMON_TIMED_DESPAWN, 30000); + m_uiColdFlame_Timer=urand(25000,35000); } else m_uiColdFlame_Timer -= diff; health = m_creature->GetHealth()*100 / m_creature->GetMaxHealth(); @@ -145,6 +176,74 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI } }; +struct MANGOS_DLL_DECL mob_coldflameAI : public ScriptedAI +{ + mob_coldflameAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + Regular = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + ScriptedInstance *m_pInstance; + uint32 m_uiRangeCheck_Timer; + bool Regular; + + void Reset() + { + m_uiRangeCheck_Timer = 1000; + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetSpeedRate(MOVE_RUN, 0.5); + } + + void AttackStart(Unit* pWho) + { + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + m_creature->GetMotionMaster()->MoveChase(pWho); + } + } + + void MoveInLineOfSight(Unit* pWho) + { + if (pWho->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(pWho, 4.0f)) + { + DoCast(pWho, Regular ? SPELL_COLD_FLAME_N : SPELL_COLD_FLAME_H); + } + ScriptedAI::MoveInLineOfSight(pWho); + } + + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiRangeCheck_Timer < uiDiff) + { + if (m_pInstance) + { + if (m_creature->IsWithinDist(m_creature->getVictim(), 4.0f, false)) + { + DoCast(m_creature->getVictim(), Regular ? SPELL_COLD_FLAME_N : SPELL_COLD_FLAME_H); + } + } + m_uiRangeCheck_Timer = 1000; + } + else m_uiRangeCheck_Timer -= uiDiff; + } + +}; + +CreatureAI* GetAI_mob_coldflame(Creature* pCreature) +{ + return new mob_coldflameAI(pCreature); +} + CreatureAI* GetAI_boss_lord_marrowgar(Creature* pCreature) { return new boss_lord_marrowgarAI(pCreature); @@ -157,4 +256,10 @@ void AddSC_boss_lord_marrowgar() newscript->Name = "boss_lord_marrowgar"; newscript->GetAI = &GetAI_boss_lord_marrowgar; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_coldflame"; + newscript->GetAI = &GetAI_mob_coldflame; + newscript->RegisterSelf(); + } From ed918db064a7117e44799a530a610354245f5a49 Mon Sep 17 00:00:00 2001 From: Insider Date: Thu, 25 Feb 2010 20:44:54 +0700 Subject: [PATCH 158/405] Created empty folder for SQL files from patches --- addition/here you can find SQL files from patches.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 addition/here you can find SQL files from patches.txt diff --git a/addition/here you can find SQL files from patches.txt b/addition/here you can find SQL files from patches.txt new file mode 100644 index 000000000..e69de29bb From a35b4134a8c8f9c6f359f82fa113780dadd1b23a Mon Sep 17 00:00:00 2001 From: Insider Date: Thu, 25 Feb 2010 21:18:43 +0700 Subject: [PATCH 159/405] [patch 1] Added scripts for instance Vault of Archavon --- VC80/80ScriptDev2.vcproj | 20 + VC90/90ScriptDev2.vcproj | 20 + addition/1_mangos_vault_of_archavon.sql | 6 + .../vault_of_archavon/boss_archavon.cpp | 274 +++++++++++ .../vault_of_archavon/boss_emalon.cpp | 445 ++++++++++++++++++ .../vault_of_archavon/boss_koralon.cpp | 128 +++++ .../instance_vault_of_archavon.cpp | 204 ++++++++ .../vault_of_archavon/vault_of_archavon.h | 30 ++ system/ScriptLoader.cpp | 8 + 9 files changed, 1135 insertions(+) create mode 100644 addition/1_mangos_vault_of_archavon.sql create mode 100644 scripts/northrend/vault_of_archavon/boss_archavon.cpp create mode 100644 scripts/northrend/vault_of_archavon/boss_emalon.cpp create mode 100644 scripts/northrend/vault_of_archavon/boss_koralon.cpp create mode 100644 scripts/northrend/vault_of_archavon/instance_vault_of_archavon.cpp create mode 100644 scripts/northrend/vault_of_archavon/vault_of_archavon.h diff --git a/VC80/80ScriptDev2.vcproj b/VC80/80ScriptDev2.vcproj index 21b379341..cae46362f 100644 --- a/VC80/80ScriptDev2.vcproj +++ b/VC80/80ScriptDev2.vcproj @@ -2059,6 +2059,26 @@ + + + + + + + + + + + + + + + + + + + + + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Archavon_The_Stone_Watcher +SD%Complete: 0% +SDComment: +SDCategory: Vault of Archavon +EndScriptData */ + +#include "precompiled.h" +#include "vault_of_archavon.h" + +enum +{ + SPELL_ROCK_SHARDS_LEFT_N = 58695, + SPELL_ROCK_SHARDS_LEFT_H = 60883, + SPELL_ROCK_SHARDS_RIGHT_N = 58696, + SPELL_ROCK_SHARDS_RIGHT_H = 60884, + SPELL_CRUSHING_LEAP_N = 58963, + SPELL_CRUSHING_LEAP_H = 60895, + SPELL_STOMP_N = 58663, + SPELL_STOMP_H = 60880, + SPELL_IMPALE_DMG_N = 58666, + SPELL_IMPALE_DMG_H = 60882, + SPELL_IMPALE_STUN = 50839, + SPELL_BERSERK = 47008 +}; + +struct MANGOS_DLL_DECL boss_archavonAI : public ScriptedAI +{ + boss_archavonAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + m_fDefaultMoveSpeed = pCreature->GetSpeedRate(MOVE_RUN); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + float m_fDefaultMoveSpeed; + uint32 m_uiEvadeCheckCooldown; + + uint32 m_uiBerserkTimer; + uint32 m_uiRockShardsTimer; + bool m_bRockShardsInProgress; + uint32 m_uiRockShardsProgressTimer; + uint32 m_uiRockShardTimer; + bool m_bRLRockShard; + Unit* m_pRockShardsTarget; + uint32 m_uiCrushingLeapTimer; + Unit* m_pCrushingLeapTarget; + bool m_bCrushingLeapInProgress; + uint32 m_uiCrushingLeapSecureTimer; + uint32 m_uiStompTimer; + uint32 m_uiImpaleAfterStompTimer; + bool m_bImpaleInProgress; + + void Reset() + { + m_uiEvadeCheckCooldown = 2000; + m_creature->SetSpeedRate(MOVE_RUN, m_fDefaultMoveSpeed); + m_uiBerserkTimer = 300000; + m_uiRockShardsTimer = 15000; + m_bRockShardsInProgress = false; + m_uiRockShardsProgressTimer = 3000; + m_uiRockShardTimer = 0; + m_bRLRockShard = true; + m_pRockShardsTarget = NULL; + m_uiCrushingLeapTimer = 30000; + m_pCrushingLeapTarget = NULL; + m_bCrushingLeapInProgress = false; + m_uiCrushingLeapSecureTimer = 2000; + m_uiStompTimer = 45000; + m_uiImpaleAfterStompTimer = 1000; + m_bImpaleInProgress = false; + + if(m_pInstance) + m_pInstance->SetData(TYPE_ARCHAVON, NOT_STARTED); + } + + void Aggro(Unit *pWho) + { + if(m_pInstance) + m_pInstance->SetData(TYPE_ARCHAVON, IN_PROGRESS); + } + + void JustDied(Unit* pKiller) + { + if(m_pInstance) + m_pInstance->SetData(TYPE_ARCHAVON, DONE); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiEvadeCheckCooldown < uiDiff) + { + if (m_creature->GetDistance2d(-36.287f, -101.09f) > 80.0f) + EnterEvadeMode(); + m_uiEvadeCheckCooldown = 2000; + } + else + m_uiEvadeCheckCooldown -= uiDiff; + + if (m_bImpaleInProgress) + { + if (m_uiImpaleAfterStompTimer < uiDiff) + { + if (Unit* pTarget = m_creature->getVictim()) + { + DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_IMPALE_DMG_N : SPELL_IMPALE_DMG_H); + pTarget->CastSpell(pTarget, SPELL_IMPALE_STUN, true); + } + m_bImpaleInProgress = false; + } + else + { + m_uiImpaleAfterStompTimer -= uiDiff; + return; + } + } + + if (m_bCrushingLeapInProgress) + { + if (m_pCrushingLeapTarget) + { + if (m_pCrushingLeapTarget->isDead() || !m_pCrushingLeapTarget->IsInWorld() && !m_pCrushingLeapTarget->IsInMap(m_creature)) + { + m_bCrushingLeapInProgress = false; + return; + } + } + else + { + m_bCrushingLeapInProgress = false; + return; + } + if ((m_uiCrushingLeapSecureTimer < uiDiff) || (m_pCrushingLeapTarget && m_creature->IsWithinDist(m_pCrushingLeapTarget, 5.0f))) + { + m_creature->getThreatManager().addThreat(m_pCrushingLeapTarget, -100000000.0f); + m_creature->SetSpeedRate(MOVE_RUN, m_fDefaultMoveSpeed); + DoCastSpellIfCan(m_pCrushingLeapTarget, m_bIsRegularMode ? SPELL_CRUSHING_LEAP_N : SPELL_CRUSHING_LEAP_H, true); + m_bCrushingLeapInProgress = false; + } + else + m_uiCrushingLeapSecureTimer -= uiDiff; + + return; + } + + if (m_bRockShardsInProgress) + { + if (m_uiRockShardsProgressTimer < uiDiff) + { + m_bRockShardsInProgress = false; + if (m_pRockShardsTarget) + m_creature->getThreatManager().addThreat(m_pRockShardsTarget, -100000000.0f); + return; + } + else + m_uiRockShardsProgressTimer -= uiDiff; + + if (m_uiRockShardTimer < uiDiff) + { + if (m_pRockShardsTarget && m_pRockShardsTarget->isAlive()) + { + DoCastSpellIfCan(m_pRockShardsTarget, m_bIsRegularMode ? (m_bRLRockShard ? SPELL_ROCK_SHARDS_LEFT_N : SPELL_ROCK_SHARDS_RIGHT_N) : (m_bRLRockShard ? SPELL_ROCK_SHARDS_LEFT_H : SPELL_ROCK_SHARDS_RIGHT_H)); + m_bRLRockShard = !m_bRLRockShard; + } + m_uiRockShardTimer = 100; + } + else + m_uiRockShardsTimer -= uiDiff; + + return; + } + + if (m_uiRockShardsTimer < uiDiff) + { + m_bRockShardsInProgress = true; + m_uiRockShardsProgressTimer = 3000; + m_bRLRockShard = true; + m_pRockShardsTarget = NULL; + if (m_pRockShardsTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + m_creature->getThreatManager().addThreat(m_pRockShardsTarget, 100000000.0f); + m_uiRockShardsTimer = 15000+rand()%15000; + return; + } + else + m_uiRockShardsTimer -= uiDiff; + + if (m_uiCrushingLeapTimer < uiDiff) + { + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + std::list lTargets; + for (ThreatList::const_iterator itr = tList.begin();itr != tList.end(); ++itr) + { + Unit *pTemp = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()); + if (pTemp && pTemp->GetTypeId() == TYPEID_PLAYER && !m_creature->IsWithinDist(pTemp, 10.0f) && m_creature->IsWithinDist(pTemp, 80.0f)) + lTargets.push_back(pTemp); + } + m_pCrushingLeapTarget = NULL; + if (!lTargets.empty()) + { + std::list::iterator pTarget = lTargets.begin(); + advance(pTarget, (rand() % lTargets.size())); + m_pCrushingLeapTarget = *pTarget; + if (m_pCrushingLeapTarget) + { + m_creature->MonsterSay(m_pCrushingLeapTarget->GetName(), LANG_UNIVERSAL, NULL); + m_creature->getThreatManager().addThreat(m_pCrushingLeapTarget, 100000000.0f); + m_creature->SetSpeedRate(MOVE_RUN, m_fDefaultMoveSpeed*10.0f); + m_bCrushingLeapInProgress = true; + m_uiCrushingLeapSecureTimer = 2000; + } + } + m_uiCrushingLeapTimer = 30000+rand()%15000; + return; + } + else + m_uiCrushingLeapTimer -= uiDiff; + + if (m_uiStompTimer < uiDiff) + { + DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_STOMP_N : SPELL_STOMP_H); + m_uiImpaleAfterStompTimer = 1000; + m_bImpaleInProgress = true; + m_uiStompTimer = 45000+rand()%15000; + } + else + m_uiStompTimer -= uiDiff; + + if (m_uiBerserkTimer < uiDiff) + { + DoCastSpellIfCan(m_creature, SPELL_BERSERK); + m_uiBerserkTimer = 60000; + } + else + m_uiBerserkTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_archavon(Creature *pCreature) +{ + return new boss_archavonAI (pCreature); +}; + +void AddSC_boss_archavon() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_archavon"; + newscript->GetAI = &GetAI_boss_archavon; + newscript->RegisterSelf(); +}; diff --git a/scripts/northrend/vault_of_archavon/boss_emalon.cpp b/scripts/northrend/vault_of_archavon/boss_emalon.cpp new file mode 100644 index 000000000..f94886cf4 --- /dev/null +++ b/scripts/northrend/vault_of_archavon/boss_emalon.cpp @@ -0,0 +1,445 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Emalon_The_Storm_Watcher +SD%Complete: 0% +SDComment: +SDCategory: Vault of Archavon +EndScriptData */ + +#include "precompiled.h" +#include "vault_of_archavon.h" + +enum +{ + // Emalon spells + SPELL_CHAIN_LIGHTNING_N = 64213, + SPELL_CHAIN_LIGHTNING_H = 64215, + SPELL_LIGHTNING_NOVA_N = 64216, + SPELL_LIGHTNING_NOVA_H = 65279, + SPELL_OVERCHARGE = 64379, //This spell is used by Time Warder, and temporary by Emalon, because 64218 is bugged + SPELL_BERSERK = 26662, + + // Tempest Minion spells + SPELL_SHOCK = 64363, + SPELL_OVERCHARGED_BLAST = 64219, + SPELL_OVERCHARGED = 64217 +}; + +/*###### +## npc_tempest_minion +######*/ + +struct MANGOS_DLL_DECL npc_tempest_minionAI : public ScriptedAI +{ + npc_tempest_minionAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_fDefaultX = m_creature->GetPositionX(); + m_fDefaultY = m_creature->GetPositionY(); + m_fDefaultZ = m_creature->GetPositionZ(); + m_fDefaultO = m_creature->GetOrientation(); + Reset(); + } + + ScriptedInstance* m_pInstance; + uint32 m_uiEvadeCheckCooldown; + + uint32 m_uiShockTimer; + uint32 m_uiRespawnTimer; + uint32 m_uiOverchargedStacksCheckTimer; + bool m_bDead; + bool m_bTimeToDie; + float m_fDefaultX; + float m_fDefaultY; + float m_fDefaultZ; + float m_fDefaultO; + + void Init() + { + m_uiEvadeCheckCooldown = 2000; + m_uiShockTimer = 8000+rand()%4000; + m_bDead = false; + m_bTimeToDie = false; + m_uiRespawnTimer = 4000; + m_uiOverchargedStacksCheckTimer = 2000; + + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_creature->SetVisibility(VISIBILITY_ON); + } + + void Reset() + { + Init(); + } + + void Aggro(Unit* pWho) + { + m_creature->CallForHelp(80.0f); + } + + void FakeDeath() + { + m_bDead = true; + m_bTimeToDie = false; + m_uiRespawnTimer = 4000; + m_creature->InterruptNonMeleeSpells(false); + m_creature->SetHealth(0); + m_creature->StopMoving(); + m_creature->ClearComboPointHolders(); + m_creature->RemoveAllAurasOnDeath(); + m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, false); + m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->ClearAllReactives(); + m_creature->SetUInt64Value(UNIT_FIELD_TARGET,0); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveIdle(); + m_creature->SetStandState(UNIT_STAND_STATE_DEAD); + m_creature->GetMap()->CreatureRelocation(m_creature, m_fDefaultX, m_fDefaultY, m_fDefaultZ, m_fDefaultO); + } + + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) + { + if (uiDamage < m_creature->GetHealth()) + return; + + if (m_pInstance && (m_pInstance->GetData(TYPE_EMALON) != DONE)) + { + uiDamage = 0; + FakeDeath(); + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiEvadeCheckCooldown < uiDiff) + { + Creature* pEmalon = (Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_EMALON)); + if ((pEmalon && pEmalon->IsInEvadeMode()) || (m_creature->GetDistance2d(-219.119f, -289.037f) > 80.0f)) + { + EnterEvadeMode(); + return; + } + m_uiEvadeCheckCooldown = 2000; + } + else + m_uiEvadeCheckCooldown -= uiDiff; + + if (m_bTimeToDie) + { + FakeDeath(); + return; + } + + if (m_bDead) + { + if (m_uiRespawnTimer < uiDiff) + { + m_creature->SetHealth(m_creature->GetMaxHealth()); + m_creature->SetVisibility(VISIBILITY_OFF); + Init(); + m_creature->MonsterTextEmote("%s appears to defend Emalon!", 0, true); + m_creature->SetInCombatWithZone(); + DoResetThreat(); + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + m_creature->GetMotionMaster()->MoveChase(pTarget); + } + else + m_uiRespawnTimer -= uiDiff; + + return; + } + + if (m_uiOverchargedStacksCheckTimer < uiDiff) + { + m_uiOverchargedStacksCheckTimer = 2000; + Aura* pAuraOvercharged = m_creature->GetAura(SPELL_OVERCHARGED, EFFECT_INDEX_0); + if(pAuraOvercharged && pAuraOvercharged->GetStackAmount() >= 10) + { + DoCastSpellIfCan(m_creature, SPELL_OVERCHARGED_BLAST); + m_bTimeToDie = true; + return; + } + } + else + m_uiOverchargedStacksCheckTimer -= uiDiff; + + if (m_uiShockTimer < uiDiff) + { + DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHOCK); + m_uiShockTimer = 8000+rand()%4000; + } + else + m_uiShockTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +/*###### +## boss_emalon +######*/ + +struct MANGOS_DLL_DECL boss_emalonAI : public ScriptedAI +{ + boss_emalonAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + uint32 m_uiEvadeCheckCooldown; + + uint64 m_auiTempestMinionGUID[4]; + uint32 m_uiChainLightningTimer; + uint32 m_uiChainLightningCount; + uint32 m_uiLightningNovaTimer; + uint32 m_uiOverchargeTimer; + uint32 m_uiEnrageTimer; + + void Reset() + { + m_uiEvadeCheckCooldown = 2000; + memset(&m_auiTempestMinionGUID, 0, sizeof(m_auiTempestMinionGUID)); + m_uiChainLightningTimer = 15000; + m_uiChainLightningCount = 0; + m_uiLightningNovaTimer = 20000; + m_uiOverchargeTimer = 45000; + m_uiEnrageTimer = 360000; + + if (m_pInstance) + { + m_auiTempestMinionGUID[0] = m_pInstance->GetData64(DATA_TEMPEST_MINION_1); + m_auiTempestMinionGUID[1] = m_pInstance->GetData64(DATA_TEMPEST_MINION_2); + m_auiTempestMinionGUID[2] = m_pInstance->GetData64(DATA_TEMPEST_MINION_3); + m_auiTempestMinionGUID[3] = m_pInstance->GetData64(DATA_TEMPEST_MINION_4); + } + + for (uint8 i=0; i<4; ++i) + { + Creature* pMinion = (Creature*)Unit::GetUnit((*m_creature), m_auiTempestMinionGUID[i]); + if (pMinion && pMinion->isDead()) + pMinion->Respawn(); + } + + if (m_pInstance) + m_pInstance->SetData(TYPE_EMALON, NOT_STARTED); + } + + void Aggro(Unit* pWho) + { + if (m_pInstance) + { + m_auiTempestMinionGUID[0] = m_pInstance->GetData64(DATA_TEMPEST_MINION_1); + m_auiTempestMinionGUID[1] = m_pInstance->GetData64(DATA_TEMPEST_MINION_2); + m_auiTempestMinionGUID[2] = m_pInstance->GetData64(DATA_TEMPEST_MINION_3); + m_auiTempestMinionGUID[3] = m_pInstance->GetData64(DATA_TEMPEST_MINION_4); + } + + m_creature->CallForHelp(80.0f); + + if (m_pInstance) + m_pInstance->SetData(TYPE_EMALON, IN_PROGRESS); + } + + void JustDied(Unit* pKiller) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_EMALON, DONE); + for (uint8 i=0; i<4; ++i) + { + Creature *pMinion = (Creature*)Unit::GetUnit((*m_creature), m_auiTempestMinionGUID[i]); + if (pMinion) + pMinion->DealDamage(pMinion, pMinion->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiEvadeCheckCooldown < uiDiff) + { + if (m_creature->GetDistance2d(-219.119f, -289.037f) > 80.0f) + EnterEvadeMode(); + m_creature->CallForHelp(80.0f); + m_uiEvadeCheckCooldown = 2000; + } + else + m_uiEvadeCheckCooldown -= uiDiff; + + if (m_uiOverchargeTimer < uiDiff) + { + Creature* pMinion = (Creature*)Unit::GetUnit((*m_creature), m_auiTempestMinionGUID[rand()%4]); + if(pMinion && pMinion->isAlive()) + { + m_creature->MonsterTextEmote("%s overcharges Tempest Minion!", 0, true); + pMinion->SetHealth(pMinion->GetMaxHealth()); + pMinion->CastSpell(pMinion, SPELL_OVERCHARGE, false); + } + m_uiOverchargeTimer = 45000; + } + else + m_uiOverchargeTimer -= uiDiff; + + if (m_uiChainLightningTimer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_CHAIN_LIGHTNING_N : SPELL_CHAIN_LIGHTNING_H); + m_uiChainLightningTimer = 10000 + rand()%15000; + } + else + m_uiChainLightningTimer -= uiDiff; + + if (m_uiLightningNovaTimer < uiDiff) + { + DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_LIGHTNING_NOVA_N : SPELL_LIGHTNING_NOVA_H); + m_uiLightningNovaTimer = 45000; + } + else + m_uiLightningNovaTimer -= uiDiff; + + if (m_uiEnrageTimer < uiDiff) + { + DoCastSpellIfCan(m_creature, SPELL_BERSERK); + m_uiEnrageTimer = 30000; + } + else + m_uiEnrageTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +/*###### +## npc_tempest_warder +######*/ + +struct MANGOS_DLL_DECL npc_tempest_warderAI : public ScriptedAI +{ + npc_tempest_warderAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 m_uiShockTimer; + bool m_bOvercharged; + uint32 m_uiOverchargedStacksCheckTimer; + bool m_bTimeToDie; + + void Reset() + { + m_uiShockTimer = 8000+rand()%4000; + m_bOvercharged = false; + uint32 m_uiOverchargedStacksCheckTimer = 2000; + m_bTimeToDie = false; + } + + void Aggro(Unit* pWho) {} + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_bTimeToDie) + { + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + return; + } + + if (!m_bOvercharged && ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 37)) + { + DoCastSpellIfCan(m_creature, SPELL_OVERCHARGE); + m_bOvercharged = true; + } + + if (m_bOvercharged) + { + if (m_uiOverchargedStacksCheckTimer < uiDiff) + { + m_uiOverchargedStacksCheckTimer = 2000; + Aura* pAuraOvercharged = m_creature->GetAura(SPELL_OVERCHARGED, EFFECT_INDEX_0); + if(pAuraOvercharged && pAuraOvercharged->GetStackAmount() >= 10) + { + DoCastSpellIfCan(m_creature, SPELL_OVERCHARGED_BLAST); + m_bTimeToDie = true; + return; + } + } + else + m_uiOverchargedStacksCheckTimer -= uiDiff; + } + + if (m_uiShockTimer < uiDiff) + { + DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHOCK); + m_uiShockTimer = 8000+rand()%4000; + } + else + m_uiShockTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_emalonAI(Creature* pCreature) +{ + return new boss_emalonAI(pCreature); +} + +CreatureAI* GetAI_npc_tempest_minionAI(Creature* pCreature) +{ + return new npc_tempest_minionAI(pCreature); +} + +CreatureAI* GetAI_npc_tempest_warderAI(Creature* pCreature) +{ + return new npc_tempest_warderAI(pCreature); +} + +void AddSC_boss_emalon() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_emalon"; + newscript->GetAI = &GetAI_boss_emalonAI; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_tempest_minion"; + newscript->GetAI = &GetAI_npc_tempest_minionAI; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_tempest_warder"; + newscript->GetAI = &GetAI_npc_tempest_warderAI; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/vault_of_archavon/boss_koralon.cpp b/scripts/northrend/vault_of_archavon/boss_koralon.cpp new file mode 100644 index 000000000..b0f99a5fb --- /dev/null +++ b/scripts/northrend/vault_of_archavon/boss_koralon.cpp @@ -0,0 +1,128 @@ +#include "precompiled.h" +#include "vault_of_archavon.h" + +#define SP_BURNING_FURY_AURA 66895 +#define SP_BURNING_FURY_AURA2 68168 +#define SP_BURNING_FURY_EFFECT 66721 + +#define SP_BURNING_BREATH 66665 +#define H_SP_BURNING_BREATH 67328 //DBM +#define SP_BB_EFFECT 66670 +#define H_SP_BB_EFFECT 67329 + +#define SP_METEOR_FISTS 66725 //DBM +#define H_SP_METEOR_FISTS 68161 +#define SP_METEOR_FISTS_EFF 66765 +#define H_SP_METEOR_FISTS_EFF 67333 + +#define SP_CINDER 66684 +#define H_SP_CINDER 67332 + +struct MANGOS_DLL_DECL boss_koralonAI : public ScriptedAI +{ + boss_koralonAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Regular = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + ScriptedInstance* pInstance; + bool Regular; + uint32 BurningBreathTimer; + uint32 MeteorFistsTimer; + uint32 FlamesTimer; + + uint32 BBTickTimer; + uint32 BBTicks; + bool BB; + + void Reset() + { + BurningBreathTimer = 25000; + MeteorFistsTimer = 47000; + FlamesTimer = 15000; + + BB = false; + + if(pInstance) pInstance->SetData(TYPE_KORALON, NOT_STARTED); + } + + void Aggro(Unit *who) + { + DoCastSpellIfCan(m_creature, SP_BURNING_FURY_AURA); + + if(pInstance) pInstance->SetData(TYPE_KORALON, IN_PROGRESS); + }; + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_KORALON, DONE); + }; + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if(BurningBreathTimer < diff) + { + DoCastSpellIfCan(m_creature, Regular ? SP_BURNING_BREATH : H_SP_BURNING_BREATH); + BurningBreathTimer = 45000; + + BB = true; + BBTickTimer = 1000; + BBTicks = 0; + } + else BurningBreathTimer -= diff; + + if(BB) + { + if(BBTickTimer < diff) + { + DoCastSpellIfCan(NULL, Regular ? SP_BB_EFFECT : H_SP_BB_EFFECT, true); + BBTickTimer = 1000; + ++BBTicks; + if(BBTicks > 2) BB = false; + } + else BBTickTimer -= diff; + } + + if(FlamesTimer < diff) + { + int flames = Regular ? 3 : 5; + int i; + for(i=0; i< flames; ++i) + { + Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + if(target) DoCastSpellIfCan(target, Regular ? SP_CINDER : H_SP_CINDER); + } + FlamesTimer = 20000; + } + else FlamesTimer -= diff; + + if(MeteorFistsTimer < diff) + { + DoCastSpellIfCan(m_creature->getVictim(), SP_METEOR_FISTS_EFF); + MeteorFistsTimer = 45000; + } + else MeteorFistsTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_koralonAI(Creature* pCreature) +{ + return new boss_koralonAI(pCreature); +} + +void AddSC_boss_koralon() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_koralon"; + newscript->GetAI = &GetAI_boss_koralonAI; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/vault_of_archavon/instance_vault_of_archavon.cpp b/scripts/northrend/vault_of_archavon/instance_vault_of_archavon.cpp new file mode 100644 index 000000000..70471f9d9 --- /dev/null +++ b/scripts/northrend/vault_of_archavon/instance_vault_of_archavon.cpp @@ -0,0 +1,204 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance_Vault_of_Archavon +SD%Complete: 0 +SDComment: +SDCategory: Vault of Archavon +EndScriptData */ + +#include "precompiled.h" +#include "vault_of_archavon.h" + +struct MANGOS_DLL_DECL instance_vault_of_archavon : public ScriptedInstance +{ + instance_vault_of_archavon(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string strInstData; + + uint64 m_uiArchavonGUID; + uint64 m_uiEmalonGUID; + uint64 m_uiKoralonGUID; + uint64 m_uiTempestMinion1GUID; + uint64 m_uiTempestMinion2GUID; + uint64 m_uiTempestMinion3GUID; + uint64 m_uiTempestMinion4GUID; + uint8 m_uiMinion; + + void Initialize() + { + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + m_uiArchavonGUID = 0; + m_uiEmalonGUID = 0; + m_uiKoralonGUID = 0; + m_uiTempestMinion1GUID = 0; + m_uiTempestMinion2GUID = 0; + m_uiTempestMinion3GUID = 0; + m_uiTempestMinion4GUID = 0; + m_uiMinion = 0; + } + + void OnCreatureCreate(Creature* pCreature) + { + switch (pCreature->GetEntry()) + { + case NPC_ARCHAVON: + m_uiArchavonGUID = pCreature->GetGUID(); + break; + case NPC_EMALON: + m_uiEmalonGUID = pCreature->GetGUID(); + break; + case NPC_KORALON: + m_uiKoralonGUID = pCreature->GetGUID(); + break; + case NPC_TEMPEST_MINION: + ++m_uiMinion; + switch (m_uiMinion) + { + case 1: + m_uiTempestMinion1GUID = pCreature->GetGUID(); + break; + case 2: + m_uiTempestMinion2GUID = pCreature->GetGUID(); + break; + case 3: + m_uiTempestMinion3GUID = pCreature->GetGUID(); + break; + case 4: + m_uiTempestMinion4GUID = pCreature->GetGUID(); + break; + case 5: + m_uiMinion = 0; + break; + } + break; + } + } + + void SetData(uint32 uiType, uint32 uiData) + { + switch (uiType) + { + case TYPE_ARCHAVON: + m_auiEncounter[0] = uiData; + break; + case TYPE_EMALON: + m_auiEncounter[1] = uiData; + break; + case TYPE_KORALON: + m_auiEncounter[2] = uiData; + break; + } + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2]; + + strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } + } + + uint32 GetData(uint32 uiType) + { + switch (uiType) + { + case TYPE_ARCHAVON: + return m_auiEncounter[0]; + case TYPE_EMALON: + return m_auiEncounter[1]; + case TYPE_KORALON: + return m_auiEncounter[2]; + } + return 0; + } + + uint64 GetData64(uint32 uiData) + { + switch (uiData) + { + case DATA_ARCHAVON: + return m_uiArchavonGUID; + case DATA_EMALON: + return m_uiEmalonGUID; + case DATA_KORALON: + return m_uiKoralonGUID; + case DATA_TEMPEST_MINION_1: + return m_uiTempestMinion1GUID; + case DATA_TEMPEST_MINION_2: + return m_uiTempestMinion2GUID; + case DATA_TEMPEST_MINION_3: + return m_uiTempestMinion3GUID; + case DATA_TEMPEST_MINION_4: + return m_uiTempestMinion4GUID; + } + return 0; + } + const char* Save() + { + return strInstData.c_str(); + } + + void Load(const char* in) + { + if (!in) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(in); + + std::istringstream loadStream(in); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1]; + + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; + } + + OUT_LOAD_INST_DATA_COMPLETE; + } + + bool IsEncounterInProgress() const + { + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) + if (m_auiEncounter[i] == IN_PROGRESS) + return true; + return false; + } +}; + +InstanceData* GetInstanceData_instance_vault_of_archavon(Map* pMap) +{ + return new instance_vault_of_archavon(pMap); +} + +void AddSC_instance_vault_of_archavon() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "instance_vault_of_archavon"; + newscript->GetInstanceData = &GetInstanceData_instance_vault_of_archavon; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/vault_of_archavon/vault_of_archavon.h b/scripts/northrend/vault_of_archavon/vault_of_archavon.h new file mode 100644 index 000000000..cd54f28f2 --- /dev/null +++ b/scripts/northrend/vault_of_archavon/vault_of_archavon.h @@ -0,0 +1,30 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_VAULT_OF_ARCHAVON_H +#define DEF_VAULT_OF_ARCHAVON_H + +enum +{ + MAX_ENCOUNTER = 3, + + DATA_ARCHAVON = 1, + DATA_EMALON = 2, + DATA_KORALON = 3, + DATA_TEMPEST_MINION_1 = 4, + DATA_TEMPEST_MINION_2 = 5, + DATA_TEMPEST_MINION_3 = 6, + DATA_TEMPEST_MINION_4 = 7, + + TYPE_ARCHAVON = 8, + TYPE_EMALON = 9, + TYPE_KORALON = 10, + + NPC_ARCHAVON = 31125, + NPC_EMALON = 33993, + NPC_KORALON = 35013, + NPC_TEMPEST_MINION = 33998 +}; + +#endif diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index 60ecec8cc..c0da4884a 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -284,6 +284,10 @@ extern void AddSC_boss_telestra(); extern void AddSC_instance_nexus(); extern void AddSC_boss_sartharion(); //obsidian_sanctum extern void AddSC_instance_obsidian_sanctum(); +extern void AddSC_instance_vault_of_archavon(); //vault_of_archavon +extern void AddSC_boss_koralon(); +extern void AddSC_boss_emalon(); +extern void AddSC_boss_archavon(); extern void AddSC_boss_bjarngrim(); //Ulduar, halls_of_lightning extern void AddSC_boss_ionar(); extern void AddSC_boss_loken(); @@ -676,6 +680,10 @@ void AddScripts() AddSC_instance_nexus(); AddSC_boss_sartharion(); //obsidian_sanctum AddSC_instance_obsidian_sanctum(); + AddSC_instance_vault_of_archavon(); //vault_of_archavon + AddSC_boss_koralon(); + AddSC_boss_emalon(); + AddSC_boss_archavon(); AddSC_boss_bjarngrim(); //Ulduar, halls_of_lightning AddSC_boss_ionar(); AddSC_boss_loken(); From f1d46c22dc89642a14b3c93fc91eca011f14f82a Mon Sep 17 00:00:00 2001 From: Insider Date: Fri, 26 Feb 2010 14:41:26 +0700 Subject: [PATCH 160/405] [patch 1] Added scripts for instance Vault of Archavon --- VC80/80ScriptDev2.vcproj | 20 + VC90/90ScriptDev2.vcproj | 20 + addition/1_mangos_vault_of_archavon.sql | 11 + .../vault_of_archavon/boss_archavon.cpp | 274 +++++++++++ .../vault_of_archavon/boss_emalon.cpp | 445 ++++++++++++++++++ .../vault_of_archavon/boss_koralon.cpp | 140 ++++++ .../instance_vault_of_archavon.cpp | 204 ++++++++ .../vault_of_archavon/vault_of_archavon.h | 30 ++ system/ScriptLoader.cpp | 8 + 9 files changed, 1152 insertions(+) create mode 100644 addition/1_mangos_vault_of_archavon.sql create mode 100644 scripts/northrend/vault_of_archavon/boss_archavon.cpp create mode 100644 scripts/northrend/vault_of_archavon/boss_emalon.cpp create mode 100644 scripts/northrend/vault_of_archavon/boss_koralon.cpp create mode 100644 scripts/northrend/vault_of_archavon/instance_vault_of_archavon.cpp create mode 100644 scripts/northrend/vault_of_archavon/vault_of_archavon.h diff --git a/VC80/80ScriptDev2.vcproj b/VC80/80ScriptDev2.vcproj index 21b379341..cae46362f 100644 --- a/VC80/80ScriptDev2.vcproj +++ b/VC80/80ScriptDev2.vcproj @@ -2059,6 +2059,26 @@ + + + + + + + + + + + + + + + + + + + + + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Archavon_The_Stone_Watcher +SD%Complete: 0% +SDComment: +SDCategory: Vault of Archavon +EndScriptData */ + +#include "precompiled.h" +#include "vault_of_archavon.h" + +enum +{ + SPELL_ROCK_SHARDS_LEFT_N = 58695, + SPELL_ROCK_SHARDS_LEFT_H = 60883, + SPELL_ROCK_SHARDS_RIGHT_N = 58696, + SPELL_ROCK_SHARDS_RIGHT_H = 60884, + SPELL_CRUSHING_LEAP_N = 58963, + SPELL_CRUSHING_LEAP_H = 60895, + SPELL_STOMP_N = 58663, + SPELL_STOMP_H = 60880, + SPELL_IMPALE_DMG_N = 58666, + SPELL_IMPALE_DMG_H = 60882, + SPELL_IMPALE_STUN = 50839, + SPELL_BERSERK = 47008 +}; + +struct MANGOS_DLL_DECL boss_archavonAI : public ScriptedAI +{ + boss_archavonAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + m_fDefaultMoveSpeed = pCreature->GetSpeedRate(MOVE_RUN); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + float m_fDefaultMoveSpeed; + uint32 m_uiEvadeCheckCooldown; + + uint32 m_uiBerserkTimer; + uint32 m_uiRockShardsTimer; + bool m_bRockShardsInProgress; + uint32 m_uiRockShardsProgressTimer; + uint32 m_uiRockShardTimer; + bool m_bRLRockShard; + Unit* m_pRockShardsTarget; + uint32 m_uiCrushingLeapTimer; + Unit* m_pCrushingLeapTarget; + bool m_bCrushingLeapInProgress; + uint32 m_uiCrushingLeapSecureTimer; + uint32 m_uiStompTimer; + uint32 m_uiImpaleAfterStompTimer; + bool m_bImpaleInProgress; + + void Reset() + { + m_uiEvadeCheckCooldown = 2000; + m_creature->SetSpeedRate(MOVE_RUN, m_fDefaultMoveSpeed); + m_uiBerserkTimer = 300000; + m_uiRockShardsTimer = 15000; + m_bRockShardsInProgress = false; + m_uiRockShardsProgressTimer = 3000; + m_uiRockShardTimer = 0; + m_bRLRockShard = true; + m_pRockShardsTarget = NULL; + m_uiCrushingLeapTimer = 30000; + m_pCrushingLeapTarget = NULL; + m_bCrushingLeapInProgress = false; + m_uiCrushingLeapSecureTimer = 2000; + m_uiStompTimer = 45000; + m_uiImpaleAfterStompTimer = 1000; + m_bImpaleInProgress = false; + + if(m_pInstance) + m_pInstance->SetData(TYPE_ARCHAVON, NOT_STARTED); + } + + void Aggro(Unit *pWho) + { + if(m_pInstance) + m_pInstance->SetData(TYPE_ARCHAVON, IN_PROGRESS); + } + + void JustDied(Unit* pKiller) + { + if(m_pInstance) + m_pInstance->SetData(TYPE_ARCHAVON, DONE); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiEvadeCheckCooldown < uiDiff) + { + if (m_creature->GetDistance2d(140.71f, -101.09f) > 80.0f) + EnterEvadeMode(); + m_uiEvadeCheckCooldown = 2000; + } + else + m_uiEvadeCheckCooldown -= uiDiff; + + if (m_bImpaleInProgress) + { + if (m_uiImpaleAfterStompTimer < uiDiff) + { + if (Unit* pTarget = m_creature->getVictim()) + { + DoCast(pTarget, m_bIsRegularMode ? SPELL_IMPALE_DMG_N : SPELL_IMPALE_DMG_H); + pTarget->CastSpell(pTarget, SPELL_IMPALE_STUN, true); + } + m_bImpaleInProgress = false; + } + else + { + m_uiImpaleAfterStompTimer -= uiDiff; + return; + } + } + + if (m_bCrushingLeapInProgress) + { + if (m_pCrushingLeapTarget) + { + if (m_pCrushingLeapTarget->isDead() || !m_pCrushingLeapTarget->IsInWorld() && !m_pCrushingLeapTarget->IsInMap(m_creature)) + { + m_bCrushingLeapInProgress = false; + return; + } + } + else + { + m_bCrushingLeapInProgress = false; + return; + } + if ((m_uiCrushingLeapSecureTimer < uiDiff) || (m_pCrushingLeapTarget && m_creature->IsWithinDist(m_pCrushingLeapTarget, 5.0f))) + { + m_creature->getThreatManager().addThreat(m_pCrushingLeapTarget, -100000000.0f); + m_creature->SetSpeedRate(MOVE_RUN, m_fDefaultMoveSpeed); + DoCast(m_pCrushingLeapTarget, m_bIsRegularMode ? SPELL_CRUSHING_LEAP_N : SPELL_CRUSHING_LEAP_H, true); + m_bCrushingLeapInProgress = false; + } + else + m_uiCrushingLeapSecureTimer -= uiDiff; + + return; + } + + if (m_bRockShardsInProgress) + { + if (m_uiRockShardsProgressTimer < uiDiff) + { + m_bRockShardsInProgress = false; + if (m_pRockShardsTarget) + m_creature->getThreatManager().addThreat(m_pRockShardsTarget, -100000000.0f); + return; + } + else + m_uiRockShardsProgressTimer -= uiDiff; + + if (m_uiRockShardTimer < uiDiff) + { + if (m_pRockShardsTarget && m_pRockShardsTarget->isAlive()) + { + DoCast(m_pRockShardsTarget, m_bIsRegularMode ? (m_bRLRockShard ? SPELL_ROCK_SHARDS_LEFT_N : SPELL_ROCK_SHARDS_RIGHT_N) : (m_bRLRockShard ? SPELL_ROCK_SHARDS_LEFT_H : SPELL_ROCK_SHARDS_RIGHT_H)); + m_bRLRockShard = !m_bRLRockShard; + } + m_uiRockShardTimer = 100; + } + else + m_uiRockShardsTimer -= uiDiff; + + return; + } + + if (m_uiRockShardsTimer < uiDiff) + { + m_bRockShardsInProgress = true; + m_uiRockShardsProgressTimer = 3000; + m_bRLRockShard = true; + m_pRockShardsTarget = NULL; + if (m_pRockShardsTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + m_creature->getThreatManager().addThreat(m_pRockShardsTarget, 100000000.0f); + m_uiRockShardsTimer = 15000+rand()%15000; + return; + } + else + m_uiRockShardsTimer -= uiDiff; + + if (m_uiCrushingLeapTimer < uiDiff) + { + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + std::list lTargets; + for (ThreatList::const_iterator itr = tList.begin();itr != tList.end(); ++itr) + { + Unit *pTemp = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()); + if (pTemp && pTemp->GetTypeId() == TYPEID_PLAYER && !m_creature->IsWithinDist(pTemp, 10.0f) && m_creature->IsWithinDist(pTemp, 80.0f)) + lTargets.push_back(pTemp); + } + m_pCrushingLeapTarget = NULL; + if (!lTargets.empty()) + { + std::list::iterator pTarget = lTargets.begin(); + advance(pTarget, (rand() % lTargets.size())); + m_pCrushingLeapTarget = *pTarget; + if (m_pCrushingLeapTarget) + { + m_creature->MonsterSay(m_pCrushingLeapTarget->GetName(), LANG_UNIVERSAL, NULL); + m_creature->getThreatManager().addThreat(m_pCrushingLeapTarget, 100000000.0f); + m_creature->SetSpeedRate(MOVE_RUN, m_fDefaultMoveSpeed*10.0f); + m_bCrushingLeapInProgress = true; + m_uiCrushingLeapSecureTimer = 2000; + } + } + m_uiCrushingLeapTimer = 30000+rand()%15000; + return; + } + else + m_uiCrushingLeapTimer -= uiDiff; + + if (m_uiStompTimer < uiDiff) + { + DoCast(m_creature, m_bIsRegularMode ? SPELL_STOMP_N : SPELL_STOMP_H); + m_uiImpaleAfterStompTimer = 1000; + m_bImpaleInProgress = true; + m_uiStompTimer = 45000+rand()%15000; + } + else + m_uiStompTimer -= uiDiff; + + if (m_uiBerserkTimer < uiDiff) + { + DoCast(m_creature, SPELL_BERSERK); + m_uiBerserkTimer = 60000; + } + else + m_uiBerserkTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_archavon(Creature *pCreature) +{ + return new boss_archavonAI (pCreature); +}; + +void AddSC_boss_archavon() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_archavon"; + newscript->GetAI = &GetAI_boss_archavon; + newscript->RegisterSelf(); +}; diff --git a/scripts/northrend/vault_of_archavon/boss_emalon.cpp b/scripts/northrend/vault_of_archavon/boss_emalon.cpp new file mode 100644 index 000000000..cdbc68c07 --- /dev/null +++ b/scripts/northrend/vault_of_archavon/boss_emalon.cpp @@ -0,0 +1,445 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Emalon_The_Storm_Watcher +SD%Complete: 0% +SDComment: +SDCategory: Vault of Archavon +EndScriptData */ + +#include "precompiled.h" +#include "vault_of_archavon.h" + +enum +{ + // Emalon spells + SPELL_CHAIN_LIGHTNING_N = 64213, + SPELL_CHAIN_LIGHTNING_H = 64215, + SPELL_LIGHTNING_NOVA_N = 64216, + SPELL_LIGHTNING_NOVA_H = 65279, + SPELL_OVERCHARGE = 64379, //This spell is used by Time Warder, and temporary by Emalon, because 64218 is bugged + SPELL_BERSERK = 26662, + + // Tempest Minion spells + SPELL_SHOCK = 64363, + SPELL_OVERCHARGED_BLAST = 64219, + SPELL_OVERCHARGED = 64217 +}; + +/*###### +## npc_tempest_minion +######*/ + +struct MANGOS_DLL_DECL npc_tempest_minionAI : public ScriptedAI +{ + npc_tempest_minionAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_fDefaultX = m_creature->GetPositionX(); + m_fDefaultY = m_creature->GetPositionY(); + m_fDefaultZ = m_creature->GetPositionZ(); + m_fDefaultO = m_creature->GetOrientation(); + Reset(); + } + + ScriptedInstance* m_pInstance; + uint32 m_uiEvadeCheckCooldown; + + uint32 m_uiShockTimer; + uint32 m_uiRespawnTimer; + uint32 m_uiOverchargedStacksCheckTimer; + bool m_bDead; + bool m_bTimeToDie; + float m_fDefaultX; + float m_fDefaultY; + float m_fDefaultZ; + float m_fDefaultO; + + void Init() + { + m_uiEvadeCheckCooldown = 2000; + m_uiShockTimer = 8000+rand()%4000; + m_bDead = false; + m_bTimeToDie = false; + m_uiRespawnTimer = 4000; + m_uiOverchargedStacksCheckTimer = 2000; + + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_creature->SetVisibility(VISIBILITY_ON); + } + + void Reset() + { + Init(); + } + + void Aggro(Unit* pWho) + { + m_creature->CallForHelp(80.0f); + } + + void FakeDeath() + { + m_bDead = true; + m_bTimeToDie = false; + m_uiRespawnTimer = 4000; + m_creature->InterruptNonMeleeSpells(false); + m_creature->SetHealth(0); + m_creature->StopMoving(); + m_creature->ClearComboPointHolders(); + m_creature->RemoveAllAurasOnDeath(); + m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, false); + m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->ClearAllReactives(); + m_creature->SetUInt64Value(UNIT_FIELD_TARGET,0); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveIdle(); + m_creature->SetStandState(UNIT_STAND_STATE_DEAD); + m_creature->GetMap()->CreatureRelocation(m_creature, m_fDefaultX, m_fDefaultY, m_fDefaultZ, m_fDefaultO); + } + + void DamageTaken(Unit* pDoneBy, uint32& uiDamage) + { + if (uiDamage < m_creature->GetHealth()) + return; + + if (m_pInstance && (m_pInstance->GetData(TYPE_EMALON) != DONE)) + { + uiDamage = 0; + FakeDeath(); + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiEvadeCheckCooldown < uiDiff) + { + Creature* pEmalon = (Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_EMALON)); + if ((pEmalon && pEmalon->IsInEvadeMode()) || (m_creature->GetDistance2d(-219.119f, -289.037f) > 80.0f)) + { + EnterEvadeMode(); + return; + } + m_uiEvadeCheckCooldown = 2000; + } + else + m_uiEvadeCheckCooldown -= uiDiff; + + if (m_bTimeToDie) + { + FakeDeath(); + return; + } + + if (m_bDead) + { + if (m_uiRespawnTimer < uiDiff) + { + m_creature->SetHealth(m_creature->GetMaxHealth()); + m_creature->SetVisibility(VISIBILITY_OFF); + Init(); + m_creature->MonsterTextEmote("%s appears to defend Emalon!", 0, true); + m_creature->SetInCombatWithZone(); + DoResetThreat(); + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + m_creature->GetMotionMaster()->MoveChase(pTarget); + } + else + m_uiRespawnTimer -= uiDiff; + + return; + } + + if (m_uiOverchargedStacksCheckTimer < uiDiff) + { + m_uiOverchargedStacksCheckTimer = 2000; + Aura* pAuraOvercharged = m_creature->GetAura(SPELL_OVERCHARGED, EFFECT_INDEX_0); + if(pAuraOvercharged && pAuraOvercharged->GetStackAmount() >= 10) + { + DoCast(m_creature, SPELL_OVERCHARGED_BLAST); + m_bTimeToDie = true; + return; + } + } + else + m_uiOverchargedStacksCheckTimer -= uiDiff; + + if (m_uiShockTimer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_SHOCK); + m_uiShockTimer = 8000+rand()%4000; + } + else + m_uiShockTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +/*###### +## boss_emalon +######*/ + +struct MANGOS_DLL_DECL boss_emalonAI : public ScriptedAI +{ + boss_emalonAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + uint32 m_uiEvadeCheckCooldown; + + uint64 m_auiTempestMinionGUID[4]; + uint32 m_uiChainLightningTimer; + uint32 m_uiChainLightningCount; + uint32 m_uiLightningNovaTimer; + uint32 m_uiOverchargeTimer; + uint32 m_uiEnrageTimer; + + void Reset() + { + m_uiEvadeCheckCooldown = 2000; + memset(&m_auiTempestMinionGUID, 0, sizeof(m_auiTempestMinionGUID)); + m_uiChainLightningTimer = 15000; + m_uiChainLightningCount = 0; + m_uiLightningNovaTimer = 20000; + m_uiOverchargeTimer = 45000; + m_uiEnrageTimer = 360000; + + if (m_pInstance) + { + m_auiTempestMinionGUID[0] = m_pInstance->GetData64(DATA_TEMPEST_MINION_1); + m_auiTempestMinionGUID[1] = m_pInstance->GetData64(DATA_TEMPEST_MINION_2); + m_auiTempestMinionGUID[2] = m_pInstance->GetData64(DATA_TEMPEST_MINION_3); + m_auiTempestMinionGUID[3] = m_pInstance->GetData64(DATA_TEMPEST_MINION_4); + } + + for (uint8 i=0; i<4; ++i) + { + Creature* pMinion = (Creature*)Unit::GetUnit((*m_creature), m_auiTempestMinionGUID[i]); + if (pMinion && pMinion->isDead()) + pMinion->Respawn(); + } + + if (m_pInstance) + m_pInstance->SetData(TYPE_EMALON, NOT_STARTED); + } + + void Aggro(Unit* pWho) + { + if (m_pInstance) + { + m_auiTempestMinionGUID[0] = m_pInstance->GetData64(DATA_TEMPEST_MINION_1); + m_auiTempestMinionGUID[1] = m_pInstance->GetData64(DATA_TEMPEST_MINION_2); + m_auiTempestMinionGUID[2] = m_pInstance->GetData64(DATA_TEMPEST_MINION_3); + m_auiTempestMinionGUID[3] = m_pInstance->GetData64(DATA_TEMPEST_MINION_4); + } + + m_creature->CallForHelp(80.0f); + + if (m_pInstance) + m_pInstance->SetData(TYPE_EMALON, IN_PROGRESS); + } + + void JustDied(Unit* pKiller) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_EMALON, DONE); + for (uint8 i=0; i<4; ++i) + { + Creature *pMinion = (Creature*)Unit::GetUnit((*m_creature), m_auiTempestMinionGUID[i]); + if (pMinion) + pMinion->DealDamage(pMinion, pMinion->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiEvadeCheckCooldown < uiDiff) + { + if (m_creature->GetDistance2d(-219.119f, -289.037f) > 80.0f) + EnterEvadeMode(); + m_creature->CallForHelp(80.0f); + m_uiEvadeCheckCooldown = 2000; + } + else + m_uiEvadeCheckCooldown -= uiDiff; + + if (m_uiOverchargeTimer < uiDiff) + { + Creature* pMinion = (Creature*)Unit::GetUnit((*m_creature), m_auiTempestMinionGUID[rand()%4]); + if(pMinion && pMinion->isAlive()) + { + m_creature->MonsterTextEmote("%s overcharges Tempest Minion!", 0, true); + pMinion->SetHealth(pMinion->GetMaxHealth()); + pMinion->CastSpell(pMinion, SPELL_OVERCHARGE, false); + } + m_uiOverchargeTimer = 45000; + } + else + m_uiOverchargeTimer -= uiDiff; + + if (m_uiChainLightningTimer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, m_bIsRegularMode ? SPELL_CHAIN_LIGHTNING_N : SPELL_CHAIN_LIGHTNING_H); + m_uiChainLightningTimer = 10000 + rand()%15000; + } + else + m_uiChainLightningTimer -= uiDiff; + + if (m_uiLightningNovaTimer < uiDiff) + { + DoCast(m_creature, m_bIsRegularMode ? SPELL_LIGHTNING_NOVA_N : SPELL_LIGHTNING_NOVA_H); + m_uiLightningNovaTimer = 45000; + } + else + m_uiLightningNovaTimer -= uiDiff; + + if (m_uiEnrageTimer < uiDiff) + { + DoCast(m_creature, SPELL_BERSERK); + m_uiEnrageTimer = 30000; + } + else + m_uiEnrageTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +/*###### +## npc_tempest_warder +######*/ + +struct MANGOS_DLL_DECL npc_tempest_warderAI : public ScriptedAI +{ + npc_tempest_warderAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 m_uiShockTimer; + bool m_bOvercharged; + uint32 m_uiOverchargedStacksCheckTimer; + bool m_bTimeToDie; + + void Reset() + { + m_uiShockTimer = 8000+rand()%4000; + m_bOvercharged = false; + uint32 m_uiOverchargedStacksCheckTimer = 2000; + m_bTimeToDie = false; + } + + void Aggro(Unit* pWho) {} + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_bTimeToDie) + { + m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + return; + } + + if (!m_bOvercharged && ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 37)) + { + DoCast(m_creature, SPELL_OVERCHARGE); + m_bOvercharged = true; + } + + if (m_bOvercharged) + { + if (m_uiOverchargedStacksCheckTimer < uiDiff) + { + m_uiOverchargedStacksCheckTimer = 2000; + Aura* pAuraOvercharged = m_creature->GetAura(SPELL_OVERCHARGED, EFFECT_INDEX_0); + if(pAuraOvercharged && pAuraOvercharged->GetStackAmount() >= 10) + { + DoCast(m_creature, SPELL_OVERCHARGED_BLAST); + m_bTimeToDie = true; + return; + } + } + else + m_uiOverchargedStacksCheckTimer -= uiDiff; + } + + if (m_uiShockTimer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_SHOCK); + m_uiShockTimer = 8000+rand()%4000; + } + else + m_uiShockTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_emalonAI(Creature* pCreature) +{ + return new boss_emalonAI(pCreature); +} + +CreatureAI* GetAI_npc_tempest_minionAI(Creature* pCreature) +{ + return new npc_tempest_minionAI(pCreature); +} + +CreatureAI* GetAI_npc_tempest_warderAI(Creature* pCreature) +{ + return new npc_tempest_warderAI(pCreature); +} + +void AddSC_boss_emalon() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_emalon"; + newscript->GetAI = &GetAI_boss_emalonAI; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_tempest_minion"; + newscript->GetAI = &GetAI_npc_tempest_minionAI; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_tempest_warder"; + newscript->GetAI = &GetAI_npc_tempest_warderAI; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/vault_of_archavon/boss_koralon.cpp b/scripts/northrend/vault_of_archavon/boss_koralon.cpp new file mode 100644 index 000000000..e1e3e6764 --- /dev/null +++ b/scripts/northrend/vault_of_archavon/boss_koralon.cpp @@ -0,0 +1,140 @@ +#include "precompiled.h" +#include "vault_of_archavon.h" + +#define SP_BURNING_FURY_AURA 66895 +#define SP_BURNING_FURY_AURA2 68168 +#define SP_BURNING_FURY_EFFECT 66721 + +#define SP_BURNING_BREATH 66665 +#define H_SP_BURNING_BREATH 67328 //DBM +#define SP_BB_EFFECT 66670 +#define H_SP_BB_EFFECT 67329 + +#define SP_METEOR_FISTS 66725 //DBM +#define H_SP_METEOR_FISTS 68161 +#define SP_METEOR_FISTS_EFF 66765 +#define H_SP_METEOR_FISTS_EFF 67333 + +#define SP_CINDER 66684 +#define H_SP_CINDER 67332 + +struct MANGOS_DLL_DECL boss_koralonAI : public ScriptedAI +{ + boss_koralonAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Regular = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + ScriptedInstance* pInstance; + bool Regular; + uint32 m_uiEvadeCheckCooldown; + + uint32 BurningBreathTimer; + uint32 MeteorFistsTimer; + uint32 FlamesTimer; + + uint32 BBTickTimer; + uint32 BBTicks; + bool BB; + + void Reset() + { + m_uiEvadeCheckCooldown = 2000; + BurningBreathTimer = 25000; + MeteorFistsTimer = 47000; + FlamesTimer = 15000; + + BB = false; + + if(pInstance) pInstance->SetData(TYPE_KORALON, NOT_STARTED); + } + + void Aggro(Unit *who) + { + DoCast(m_creature, SP_BURNING_FURY_AURA); + + if(pInstance) pInstance->SetData(TYPE_KORALON, IN_PROGRESS); + }; + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_KORALON, DONE); + }; + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiEvadeCheckCooldown < diff) + { + if (m_creature->GetDistance2d(-218.95f, 103.41f) > 80.0f) + EnterEvadeMode(); + m_uiEvadeCheckCooldown = 2000; + } + else + m_uiEvadeCheckCooldown -= diff; + + if(BurningBreathTimer < diff) + { + DoCast(m_creature, Regular ? SP_BURNING_BREATH : H_SP_BURNING_BREATH); + BurningBreathTimer = 45000; + + BB = true; + BBTickTimer = 1000; + BBTicks = 0; + } + else BurningBreathTimer -= diff; + + if(BB) + { + if(BBTickTimer < diff) + { + DoCast(NULL, Regular ? SP_BB_EFFECT : H_SP_BB_EFFECT, true); + BBTickTimer = 1000; + ++BBTicks; + if(BBTicks > 2) BB = false; + } + else BBTickTimer -= diff; + } + + if(FlamesTimer < diff) + { + int flames = Regular ? 3 : 5; + int i; + for(i=0; i< flames; ++i) + { + Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + if(target) DoCast(target, Regular ? SP_CINDER : H_SP_CINDER); + } + FlamesTimer = 20000; + } + else FlamesTimer -= diff; + + if(MeteorFistsTimer < diff) + { + DoCast(m_creature->getVictim(), SP_METEOR_FISTS_EFF); + MeteorFistsTimer = 45000; + } + else MeteorFistsTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_koralonAI(Creature* pCreature) +{ + return new boss_koralonAI(pCreature); +} + +void AddSC_boss_koralon() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_koralon"; + newscript->GetAI = &GetAI_boss_koralonAI; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/vault_of_archavon/instance_vault_of_archavon.cpp b/scripts/northrend/vault_of_archavon/instance_vault_of_archavon.cpp new file mode 100644 index 000000000..70471f9d9 --- /dev/null +++ b/scripts/northrend/vault_of_archavon/instance_vault_of_archavon.cpp @@ -0,0 +1,204 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance_Vault_of_Archavon +SD%Complete: 0 +SDComment: +SDCategory: Vault of Archavon +EndScriptData */ + +#include "precompiled.h" +#include "vault_of_archavon.h" + +struct MANGOS_DLL_DECL instance_vault_of_archavon : public ScriptedInstance +{ + instance_vault_of_archavon(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string strInstData; + + uint64 m_uiArchavonGUID; + uint64 m_uiEmalonGUID; + uint64 m_uiKoralonGUID; + uint64 m_uiTempestMinion1GUID; + uint64 m_uiTempestMinion2GUID; + uint64 m_uiTempestMinion3GUID; + uint64 m_uiTempestMinion4GUID; + uint8 m_uiMinion; + + void Initialize() + { + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + m_uiArchavonGUID = 0; + m_uiEmalonGUID = 0; + m_uiKoralonGUID = 0; + m_uiTempestMinion1GUID = 0; + m_uiTempestMinion2GUID = 0; + m_uiTempestMinion3GUID = 0; + m_uiTempestMinion4GUID = 0; + m_uiMinion = 0; + } + + void OnCreatureCreate(Creature* pCreature) + { + switch (pCreature->GetEntry()) + { + case NPC_ARCHAVON: + m_uiArchavonGUID = pCreature->GetGUID(); + break; + case NPC_EMALON: + m_uiEmalonGUID = pCreature->GetGUID(); + break; + case NPC_KORALON: + m_uiKoralonGUID = pCreature->GetGUID(); + break; + case NPC_TEMPEST_MINION: + ++m_uiMinion; + switch (m_uiMinion) + { + case 1: + m_uiTempestMinion1GUID = pCreature->GetGUID(); + break; + case 2: + m_uiTempestMinion2GUID = pCreature->GetGUID(); + break; + case 3: + m_uiTempestMinion3GUID = pCreature->GetGUID(); + break; + case 4: + m_uiTempestMinion4GUID = pCreature->GetGUID(); + break; + case 5: + m_uiMinion = 0; + break; + } + break; + } + } + + void SetData(uint32 uiType, uint32 uiData) + { + switch (uiType) + { + case TYPE_ARCHAVON: + m_auiEncounter[0] = uiData; + break; + case TYPE_EMALON: + m_auiEncounter[1] = uiData; + break; + case TYPE_KORALON: + m_auiEncounter[2] = uiData; + break; + } + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2]; + + strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } + } + + uint32 GetData(uint32 uiType) + { + switch (uiType) + { + case TYPE_ARCHAVON: + return m_auiEncounter[0]; + case TYPE_EMALON: + return m_auiEncounter[1]; + case TYPE_KORALON: + return m_auiEncounter[2]; + } + return 0; + } + + uint64 GetData64(uint32 uiData) + { + switch (uiData) + { + case DATA_ARCHAVON: + return m_uiArchavonGUID; + case DATA_EMALON: + return m_uiEmalonGUID; + case DATA_KORALON: + return m_uiKoralonGUID; + case DATA_TEMPEST_MINION_1: + return m_uiTempestMinion1GUID; + case DATA_TEMPEST_MINION_2: + return m_uiTempestMinion2GUID; + case DATA_TEMPEST_MINION_3: + return m_uiTempestMinion3GUID; + case DATA_TEMPEST_MINION_4: + return m_uiTempestMinion4GUID; + } + return 0; + } + const char* Save() + { + return strInstData.c_str(); + } + + void Load(const char* in) + { + if (!in) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(in); + + std::istringstream loadStream(in); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1]; + + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; + } + + OUT_LOAD_INST_DATA_COMPLETE; + } + + bool IsEncounterInProgress() const + { + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) + if (m_auiEncounter[i] == IN_PROGRESS) + return true; + return false; + } +}; + +InstanceData* GetInstanceData_instance_vault_of_archavon(Map* pMap) +{ + return new instance_vault_of_archavon(pMap); +} + +void AddSC_instance_vault_of_archavon() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "instance_vault_of_archavon"; + newscript->GetInstanceData = &GetInstanceData_instance_vault_of_archavon; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/vault_of_archavon/vault_of_archavon.h b/scripts/northrend/vault_of_archavon/vault_of_archavon.h new file mode 100644 index 000000000..cd54f28f2 --- /dev/null +++ b/scripts/northrend/vault_of_archavon/vault_of_archavon.h @@ -0,0 +1,30 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_VAULT_OF_ARCHAVON_H +#define DEF_VAULT_OF_ARCHAVON_H + +enum +{ + MAX_ENCOUNTER = 3, + + DATA_ARCHAVON = 1, + DATA_EMALON = 2, + DATA_KORALON = 3, + DATA_TEMPEST_MINION_1 = 4, + DATA_TEMPEST_MINION_2 = 5, + DATA_TEMPEST_MINION_3 = 6, + DATA_TEMPEST_MINION_4 = 7, + + TYPE_ARCHAVON = 8, + TYPE_EMALON = 9, + TYPE_KORALON = 10, + + NPC_ARCHAVON = 31125, + NPC_EMALON = 33993, + NPC_KORALON = 35013, + NPC_TEMPEST_MINION = 33998 +}; + +#endif diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index 60ecec8cc..c0da4884a 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -284,6 +284,10 @@ extern void AddSC_boss_telestra(); extern void AddSC_instance_nexus(); extern void AddSC_boss_sartharion(); //obsidian_sanctum extern void AddSC_instance_obsidian_sanctum(); +extern void AddSC_instance_vault_of_archavon(); //vault_of_archavon +extern void AddSC_boss_koralon(); +extern void AddSC_boss_emalon(); +extern void AddSC_boss_archavon(); extern void AddSC_boss_bjarngrim(); //Ulduar, halls_of_lightning extern void AddSC_boss_ionar(); extern void AddSC_boss_loken(); @@ -676,6 +680,10 @@ void AddScripts() AddSC_instance_nexus(); AddSC_boss_sartharion(); //obsidian_sanctum AddSC_instance_obsidian_sanctum(); + AddSC_instance_vault_of_archavon(); //vault_of_archavon + AddSC_boss_koralon(); + AddSC_boss_emalon(); + AddSC_boss_archavon(); AddSC_boss_bjarngrim(); //Ulduar, halls_of_lightning AddSC_boss_ionar(); AddSC_boss_loken(); From 03130711dcc179bef1141047d044af74be850acd Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Fri, 26 Feb 2010 16:48:13 +0300 Subject: [PATCH 161/405] Marrowgar coldflame & bone spike added --- addition/721_icecrown_mangos.sql | 4 +- .../icecrown_citadel/boss_lord_marrowgar.cpp | 154 +++++++++++++----- 2 files changed, 119 insertions(+), 39 deletions(-) diff --git a/addition/721_icecrown_mangos.sql b/addition/721_icecrown_mangos.sql index 74a82a563..797092bd9 100644 --- a/addition/721_icecrown_mangos.sql +++ b/addition/721_icecrown_mangos.sql @@ -48,8 +48,8 @@ UPDATE `creature_template` SET `faction_A`=14, `faction_H`=14,`ScriptName`='mob_ UPDATE `creature_template` SET `ScriptName`='boss_lord_marrowgar' WHERE `entry`= 36612; UPDATE `gameobject_template` SET `faction` = '114',`data0` = '0' WHERE `gameobject_template`.`entry` IN (201910,201911); UPDATE `gameobject` SET `state` = '1' WHERE `guid` IN (72526,72525); -UPDATE `creature_template` SET `ScriptName`='mob_coldflame' WHERE `entry`= 36672; --- UPDATE `creature_template` SET `ScriptName`='mob_bone_spike' WHERE `entry`= 38711; +UPDATE `creature_template` SET `ScriptName`='mob_coldflame', `minlevel` = 80, `maxlevel` = 80, `modelid_A` = 11686, `modelid_A2` = 11686, `modelid_H` = 11686, `modelid_H2` = 11686, `faction_A` = 35, `faction_H` = 35 WHERE `entry`= 36672; +UPDATE `creature_template` SET `ScriptName`='mob_bone_spike' WHERE `entry`= 38711; -- Gunship battle UPDATE `creature_template` SET `ScriptName`='mob_spire_frostwyrm', `AIName`='' WHERE `entry`= 37230; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp index a1e825b63..90af8c4bd 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: boss_lord_marrowgar -SD%Complete: 10% +SD%Complete: 20% SDComment: by /dev/rsa SDCategory: Icecrown Citadel EndScriptData */ @@ -34,13 +34,13 @@ enum //Abilities SPELL_SABER_LASH_N = 71021, SPELL_COLD_FLAME_N = 69146, - SPELL_BONE_STRIKE_N = 69057, + SPELL_BONE_STRIKE = 69057, SPELL_BONE_STORM = 69076, + SPELL_BONE_STRIKE_IMPALE = 69065, SPELL_BONE_STORM_STRIKE_N = 69075, SPELL_SABER_LASH_H = 71021, SPELL_COLD_FLAME_H = 70824, - SPELL_BONE_STRIKE_H = 69057, SPELL_BONE_STORM_STRIKE_H = 70835, //h25 - 70836 }; @@ -62,6 +62,7 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI bool m_uiBoneStorm; bool m_uiBoneStorm_Timer; uint32 m_uiBerserk_Timer; + uint32 m_uiBoneStormStrike_Timer; uint8 health; void Reset() @@ -70,6 +71,7 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI health = 100; m_uiSaberLash_Timer = 10000; m_uiColdFlame_Timer = 5000; + m_uiBoneStormStrike_Timer = 2000; m_uiBoneStrike_Timer = urand(17000,29000); m_uiBoneStorm = false; m_uiBoneStorm_Timer = 40000; @@ -82,19 +84,26 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI { float fPosX, fPosY, fPosZ; m_creature->GetPosition(fPosX, fPosY, fPosZ); - m_creature->GetRandomPoint(fPosX, fPosY, fPosZ, urand(5, 15), fPosX, fPosY, fPosZ); + m_creature->GetRandomPoint(fPosX, fPosY, fPosZ, urand(0, 10), fPosX, fPosY, fPosZ); Creature* pSummon = m_creature->SummonCreature(npctype, fPosX, fPosY, fPosZ, 0, type, _summontime); - if(pSummon) pSummon->SetInCombatWithZone(); return pSummon ? pSummon->GetGUID() : 0; } - + uint64 CallSpike(Unit* pPlayer, uint64 npctype,TempSummonType type, uint32 _summontime ) + { + float fPosX, fPosY, fPosZ; + pPlayer->GetPosition(fPosX, fPosY, fPosZ); + Creature* pSummon = m_creature->SummonCreature(npctype, fPosX, fPosY, fPosZ, 0, type, _summontime); + if (pSummon) pSummon->AddThreat(pPlayer); + return pSummon ? pSummon->GetGUID() : 0; + } +/* void JustSummoned(Creature* _summoned) { - if (Unit* target = SelectUnit(SELECT_TARGET_BOTTOMAGGRO,0)) + if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1)) _summoned->AddThreat(target); } - +*/ void Aggro(Unit *who) { if(pInstance) pInstance->SetData(TYPE_MARROWGAR, IN_PROGRESS); @@ -115,7 +124,8 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI case 0: { if (m_uiBoneStrike_Timer < diff) { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, Regular ? SPELL_BONE_STRIKE_N :SPELL_BONE_STRIKE_H); + if (DoCastSpellIfCan(pTarget, SPELL_BONE_STRIKE)) + CallSpike(pTarget, MOB_BONE_SPIKE, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5000); m_uiBoneStrike_Timer=urand(17000,29000); } else m_uiBoneStrike_Timer -= diff; break;} @@ -131,19 +141,22 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI case 2: { if (m_uiBoneStorm_Timer < diff) { -// m_creature->RemoveAurasDueToSpell(Regular ? SPELL_BONE_STORM_N : SPELL_BONE_STORM_H); + m_creature->RemoveAurasDueToSpell(SPELL_BONE_STORM); m_creature->SetInCombatWithZone(); stage = 3; } else m_uiBoneStorm_Timer -= diff; + if (m_uiBoneStormStrike_Timer < diff) { Map* pMap = m_creature->GetMap(); Map::PlayerList const &lPlayers = pMap->GetPlayers(); for(Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr) { - Player* pPlayer = itr->getSource(); + Unit* pPlayer = itr->getSource(); if (!pPlayer) continue; - if (itr->getSource()->isAlive() && itr->getSource()->IsWithinDistInMap(m_creature, 4)) - DoCast(itr->getSource(), Regular ? SPELL_BONE_STRIKE_N : SPELL_BONE_STRIKE_H); + if (pPlayer->isAlive() && pPlayer->IsWithinDistInMap(m_creature, 5.0f)) + m_creature->CastSpell(pPlayer, Regular ? SPELL_BONE_STORM_STRIKE_N : SPELL_BONE_STORM_STRIKE_H, true); + } + m_uiBoneStormStrike_Timer = 2000; } break;} case 3: break; @@ -154,11 +167,9 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI m_uiSaberLash_Timer=urand(8000,12000); } else m_uiSaberLash_Timer -= diff; - if (m_uiColdFlame_Timer < diff) - {if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) -// DoCastSpellIfCan(pTarget, Regular ? SPELL_COLD_FLAME_N :SPELL_COLD_FLAME_H); + if (m_uiColdFlame_Timer < diff) { CallGuard(MOB_COLDFLAME, TEMPSUMMON_TIMED_DESPAWN, 30000); - m_uiColdFlame_Timer=urand(25000,35000); + m_uiColdFlame_Timer=urand(10000,30000); } else m_uiColdFlame_Timer -= diff; health = m_creature->GetHealth()*100 / m_creature->GetMaxHealth(); @@ -167,7 +178,6 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI if (m_uiBerserk_Timer < diff) { DoCast(m_creature, SPELL_BERSERK); -// m_uiBerserk_Timer = m_bIsRegularMode ? 300000 : 180000; } else m_uiBerserk_Timer -= diff; @@ -188,35 +198,103 @@ struct MANGOS_DLL_DECL mob_coldflameAI : public ScriptedAI ScriptedInstance *m_pInstance; uint32 m_uiRangeCheck_Timer; bool Regular; + uint32 _diff; + float fPosX, fPosY, fPosZ; void Reset() { m_uiRangeCheck_Timer = 1000; m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->SetSpeedRate(MOVE_RUN, 0.5); + m_creature->GetPosition(fPosX, fPosY, fPosZ); + m_creature->GetRandomPoint(fPosX, fPosY, fPosZ, urand(150, 200), fPosX, fPosY, fPosZ); + m_creature->GetMotionMaster()->MovePoint(0, fPosX, fPosY, fPosZ); + m_creature->SetSpeedRate(MOVE_RUN, 0.5f); } - void AttackStart(Unit* pWho) + void UpdateAI(const uint32 uiDiff) { - if (m_creature->Attack(pWho, true)) + _diff = uiDiff; + + if (m_uiRangeCheck_Timer < uiDiff) { - m_creature->AddThreat(pWho); - m_creature->SetInCombatWith(pWho); - pWho->SetInCombatWith(m_creature); - m_creature->GetMotionMaster()->MoveChase(pWho); + m_creature->CastSpell(m_creature, Regular ? SPELL_COLD_FLAME_N : SPELL_COLD_FLAME_H, false); + Map* pMap = m_creature->GetMap(); + Map::PlayerList const &lPlayers = pMap->GetPlayers(); + for(Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr) + { + Unit* pPlayer = itr->getSource(); + if (!pPlayer) continue; + if (pPlayer->isAlive() && pPlayer->IsWithinDistInMap(m_creature, 5.0f)) + if (Creature* pMarrowgar = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(NPC_LORD_MARROWGAR)))) + pMarrowgar->CastSpell(pPlayer, Regular ? SPELL_COLD_FLAME_N : SPELL_COLD_FLAME_H, true); + } + m_uiRangeCheck_Timer = 1000; } + else m_uiRangeCheck_Timer -= uiDiff; + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + } +}; + +struct MANGOS_DLL_DECL mob_bone_spikeAI : public ScriptedAI +{ + mob_bone_spikeAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + Regular = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + ScriptedInstance *m_pInstance; + uint32 m_uiRangeCheck_Timer; + bool Regular; + uint32 _diff; + uint64 m_uiVictimGUID; + + + void Reset() + { + m_uiRangeCheck_Timer = 1000; + m_creature->SetSpeedRate(MOVE_RUN, 5); + _diff = 1000; + m_creature->SetInCombatWithZone(); + } + + void Aggro(Unit* pWho) + { + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + m_creature->GetMotionMaster()->MoveChase(pWho); + DoCast(pWho, SPELL_BONE_STRIKE_IMPALE); + m_uiVictimGUID = pWho->GetGUID(); } - void MoveInLineOfSight(Unit* pWho) + void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) { - if (pWho->GetTypeId() == TYPEID_PLAYER && m_creature->IsWithinDistInMap(pWho, 4.0f)) + if (uiDamage > m_creature->GetHealth()) { - DoCast(pWho, Regular ? SPELL_COLD_FLAME_N : SPELL_COLD_FLAME_H); + if (m_uiVictimGUID) + { + if (Unit* pVictim = Unit::GetUnit((*m_creature), m_uiVictimGUID)) + pVictim->RemoveAurasDueToSpell(SPELL_BONE_STRIKE_IMPALE); + } } - ScriptedAI::MoveInLineOfSight(pWho); } + void KilledUnit(Unit* pVictim) + { + if (pVictim) pVictim->RemoveAurasDueToSpell(SPELL_BONE_STRIKE_IMPALE); + } + + void JustDied(Unit* Killer) + { + if (Unit* pVictim = Unit::GetUnit((*m_creature), m_uiVictimGUID)) + pVictim->RemoveAurasDueToSpell(SPELL_BONE_STRIKE_IMPALE); + if (Killer) + Killer->RemoveAurasDueToSpell(SPELL_BONE_STRIKE_IMPALE); + } void UpdateAI(const uint32 uiDiff) { @@ -225,20 +303,17 @@ struct MANGOS_DLL_DECL mob_coldflameAI : public ScriptedAI if (m_uiRangeCheck_Timer < uiDiff) { - if (m_pInstance) - { - if (m_creature->IsWithinDist(m_creature->getVictim(), 4.0f, false)) - { - DoCast(m_creature->getVictim(), Regular ? SPELL_COLD_FLAME_N : SPELL_COLD_FLAME_H); - } - } - m_uiRangeCheck_Timer = 1000; } else m_uiRangeCheck_Timer -= uiDiff; } }; +CreatureAI* GetAI_mob_bone_spike(Creature* pCreature) +{ + return new mob_bone_spikeAI(pCreature); +} + CreatureAI* GetAI_mob_coldflame(Creature* pCreature) { return new mob_coldflameAI(pCreature); @@ -262,4 +337,9 @@ void AddSC_boss_lord_marrowgar() newscript->GetAI = &GetAI_mob_coldflame; newscript->RegisterSelf(); + newscript = new Script; + newscript->Name = "mob_bone_spike"; + newscript->GetAI = &GetAI_mob_bone_spike; + newscript->RegisterSelf(); + } From 7ceb7c764bdd671634ec94cdb9e78e40b6ace675 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Fri, 26 Feb 2010 17:43:04 +0300 Subject: [PATCH 162/405] Small change to marrowgar --- .../icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp index 90af8c4bd..9a046f206 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp @@ -123,7 +123,7 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI { case 0: { if (m_uiBoneStrike_Timer < diff) - { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1)) if (DoCastSpellIfCan(pTarget, SPELL_BONE_STRIKE)) CallSpike(pTarget, MOB_BONE_SPIKE, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5000); m_uiBoneStrike_Timer=urand(17000,29000); From c2128b5f5ea11461e63a28f041bcb09bb0c6fd96 Mon Sep 17 00:00:00 2001 From: Insider Date: Sat, 27 Feb 2010 16:52:10 +0700 Subject: [PATCH 163/405] Added lost changes for [patch 1] --- Makefile.am | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile.am b/Makefile.am index 5399c1a48..816df4275 100644 --- a/Makefile.am +++ b/Makefile.am @@ -395,6 +395,11 @@ scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp \ scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp \ scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp \ scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h \ +scripts/northrend/vault_of_archavon/boss_archavon.cpp \ +scripts/northrend/vault_of_archavon/boss_emalon.cpp \ +scripts/northrend/vault_of_archavon/boss_koralon.cpp \ +scripts/northrend/vault_of_archavon/instance_vault_of_archavon.cpp \ +scripts/northrend/vault_of_archavon/vault_of_archavon.h \ scripts/northrend/violet_hold/instance_violet_hold.cpp \ scripts/northrend/violet_hold/violet_hold.cpp \ scripts/northrend/violet_hold/violet_hold.h \ From 275150c8cfea544de41767bd4870b39c4e4af5e3 Mon Sep 17 00:00:00 2001 From: Insider Date: Sat, 27 Feb 2010 18:42:13 +0700 Subject: [PATCH 164/405] [patch 2] Improvements in script for raid boss Onyxia --- scripts/kalimdor/onyxias_lair/boss_onyxia.cpp | 86 +++++++++++++------ 1 file changed, 61 insertions(+), 25 deletions(-) diff --git a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp index 497ba4d8b..3dbfb963a 100644 --- a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp +++ b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp @@ -32,14 +32,17 @@ enum EMOTE_BREATH = -1249004, SPELL_WINGBUFFET = 18500, + H_SPELL_WINGBUFFET = 69293, SPELL_FLAMEBREATH = 18435, - SPELL_CLEAVE = 19983, - SPELL_TAILSWEEP = 15847, + H_SPELL_FLAMEBREATH = 68970, + SPELL_CLEAVE = 68868, + SPELL_TAILSWEEP = 68867, + H_SPELL_TAILSWEEP = 69286, SPELL_KNOCK_AWAY = 19633, - - SPELL_ENGULFINGFLAMES = 20019, - SPELL_DEEPBREATH = 23461, SPELL_FIREBALL = 18392, + H_SPELL_FIREBALL = 68926, + SPELL_ERRUPTION = 17731, // does not work + H_SPELL_ERRUPTION = 69294, // does not work //Not much choise about these. We have to make own defintion on the direction/start-end point //SPELL_BREATH_NORTH_TO_SOUTH = 17086, // 20x in "array" @@ -59,8 +62,9 @@ enum SPELL_HEATED_GROUND = 22191, SPELL_SUMMONWHELP = 17646, + SPELL_SUMMONGUARD = 68968, NPC_WHELP = 11262, - MAX_WHELP = 16, + NPC_GUARD = 36561, PHASE_START = 1, PHASE_BREATH = 2, @@ -87,16 +91,24 @@ static sOnyxMove aMoveData[]= //{7, 6, SPELL_BREATH_NORTH_TO_SOUTH, 22.8763f, -217.152f, -60.0548f},//north }; -static float afSpawnLocations[2][3]= +static float SpawnLocs[4][3]= { - {-30.127f, -254.463f, -89.440f}, - {-30.817f, -177.106f, -89.258f} + {-30.127f, -254.463f, -89.440f}, //whelps + {-30.817f, -177.106f, -89.258f}, //whelps + {-126.57f, -214.609f, -71.446f}, //guardians + {-22.347f, -214.571f, -89.104f} //Onyxia }; struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI { - boss_onyxiaAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + boss_onyxiaAI(Creature* pCreature) : ScriptedAI(pCreature) + { + Regular = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + bool Regular; + uint32 m_uiEvadeCheckCooldown; uint32 m_uiPhase; uint32 m_uiFlameBreathTimer; @@ -112,8 +124,10 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI uint32 m_uiSummonWhelpsTimer; uint32 m_uiBellowingRoarTimer; uint32 m_uiWhelpTimer; + uint32 SummonGuardTimer; uint8 m_uiSummonCount; + uint8 m_uiMaxWhelps; bool m_bIsSummoningWhelps; void Reset() @@ -121,6 +135,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI if (!IsCombatMovement()) SetCombatMovement(true); + m_uiEvadeCheckCooldown = 2000; m_uiPhase = PHASE_START; m_uiFlameBreathTimer = urand(10000, 20000); @@ -133,11 +148,13 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI m_pPointData = GetMoveData(); m_uiEngulfingFlamesTimer = 15000; - m_uiSummonWhelpsTimer = 45000; + m_uiSummonWhelpsTimer = 15000; m_uiBellowingRoarTimer = 30000; m_uiWhelpTimer = 1000; + SummonGuardTimer = 35000; m_uiSummonCount = 0; + m_uiMaxWhelps = Regular ? 20 : 40; m_bIsSummoningWhelps = false; } @@ -149,10 +166,8 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI void JustSummoned(Creature *pSummoned) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) - pSummoned->AI()->AttackStart(pTarget); - - ++m_uiSummonCount; + pSummoned->GetMotionMaster()->MovePoint(0, SpawnLocs[3][0], SpawnLocs[3][1], SpawnLocs[3][2]); + pSummoned->SetInCombatWithZone(); } void KilledUnit(Unit* pVictim) @@ -207,11 +222,23 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (m_uiEvadeCheckCooldown < uiDiff) + { + if (m_creature->GetDistance2d(-22.346f, -214.57f) > 100.0f) + { + EnterEvadeMode(); + m_uiPhase = PHASE_START; + } + m_uiEvadeCheckCooldown = 2000; + } + else + m_uiEvadeCheckCooldown -= uiDiff; + if (m_uiPhase == PHASE_START || m_uiPhase == PHASE_END) { if (m_uiFlameBreathTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_FLAMEBREATH); + DoCastSpellIfCan(m_creature->getVictim(), Regular ? SPELL_FLAMEBREATH : H_SPELL_FLAMEBREATH); m_uiFlameBreathTimer = urand(10000, 20000); } else @@ -219,7 +246,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI if (m_uiTailSweepTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_TAILSWEEP); + DoCastSpellIfCan(m_creature, Regular ? SPELL_TAILSWEEP : H_SPELL_TAILSWEEP); m_uiTailSweepTimer = urand(15000, 20000); } else @@ -235,7 +262,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI if (m_uiWingBuffetTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_WINGBUFFET); + DoCastSpellIfCan(m_creature->getVictim(), Regular ? SPELL_WINGBUFFET : H_SPELL_WINGBUFFET); m_uiWingBuffetTimer = urand(15000, 30000); } else @@ -253,7 +280,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI } else { - if (m_creature->GetHealthPercent() < 60.0f) + if (m_creature->GetHealthPercent() < 65.0f) { m_uiPhase = PHASE_BREATH; @@ -319,7 +346,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != POINT_MOTION_TYPE) { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, SPELL_FIREBALL); + DoCastSpellIfCan(pTarget, Regular ? SPELL_FIREBALL : H_SPELL_FIREBALL); m_uiEngulfingFlamesTimer = 8000; } @@ -329,13 +356,14 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI if (m_bIsSummoningWhelps) { - if (m_uiSummonCount < MAX_WHELP) + if (m_uiSummonCount < m_uiMaxWhelps) { if (m_uiWhelpTimer < uiDiff) { - m_creature->SummonCreature(NPC_WHELP, afSpawnLocations[0][0], afSpawnLocations[0][1], afSpawnLocations[0][2], 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000); - m_creature->SummonCreature(NPC_WHELP, afSpawnLocations[1][0], afSpawnLocations[1][1], afSpawnLocations[1][2], 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000); - m_uiWhelpTimer = 1000; + m_creature->SummonCreature(NPC_WHELP, SpawnLocs[0][0], SpawnLocs[0][1], SpawnLocs[0][2], 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000); + m_creature->SummonCreature(NPC_WHELP, SpawnLocs[1][0], SpawnLocs[1][1], SpawnLocs[1][2], 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000); + m_uiSummonCount += 2; + m_uiWhelpTimer = 500; } else m_uiWhelpTimer -= uiDiff; @@ -344,7 +372,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI { m_bIsSummoningWhelps = false; m_uiSummonCount = 0; - m_uiSummonWhelpsTimer = 30000; + m_uiSummonWhelpsTimer = 85000; } } else @@ -354,6 +382,14 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI else m_uiSummonWhelpsTimer -= uiDiff; } + + if(SummonGuardTimer < uiDiff) + { + m_creature->SummonCreature(NPC_GUARD, SpawnLocs[2][0], SpawnLocs[2][1], SpawnLocs[2][2], 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000); + SummonGuardTimer = 30000; + } + else + SummonGuardTimer -= uiDiff; } } }; From e982a3e261e498ccf5a12da30d53c3dfb9c35d06 Mon Sep 17 00:00:00 2001 From: Insider Date: Sat, 27 Feb 2010 18:42:23 +0700 Subject: [PATCH 165/405] Fixed bugged file --- sql/Updates/r1567_scriptdev2.sql | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sql/Updates/r1567_scriptdev2.sql b/sql/Updates/r1567_scriptdev2.sql index 5a8b37667..1c7b09b90 100644 --- a/sql/Updates/r1567_scriptdev2.sql +++ b/sql/Updates/r1567_scriptdev2.sql @@ -1,4 +1,4 @@ -DELETE FROM script_texts WHERE entry IN (-1000553,-1000554); -INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES -(-1000553,'Be ready, $N. I hear the council returning. Prepare to ambush!',0,0,0,0,'deathstalker_faerleia SAY_START'), -(-1000554,'Well done. A blow to Arugal no doubt!',0,0,0,0,'deathstalker_faerleia SAY_END'); +DELETE FROM script_texts WHERE entry IN (-1000553,-1000554); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000553,'Be ready, $N. I hear the council returning. Prepare to ambush!',0,0,0,0,'deathstalker_faerleia SAY_START'), +(-1000554,'Well done. A blow to Arugal no doubt!',0,0,0,0,'deathstalker_faerleia SAY_END'); From 982678ead58d04995eda7fdbae559dda4e9ceec5 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sat, 27 Feb 2010 18:01:38 +0300 Subject: [PATCH 166/405] SQL files cleanup && sunken temple instance restored --- addition/713_boss_grobbulus_mangos.sql | 1 - ...715_clear_trial_of_the_champion_mangos.sql | 14 - addition/icecrown_loot_mangos.sql | 319 ------------------ system/ScriptLoader.cpp | 4 + 4 files changed, 4 insertions(+), 334 deletions(-) delete mode 100644 addition/713_boss_grobbulus_mangos.sql delete mode 100644 addition/715_clear_trial_of_the_champion_mangos.sql delete mode 100644 addition/icecrown_loot_mangos.sql diff --git a/addition/713_boss_grobbulus_mangos.sql b/addition/713_boss_grobbulus_mangos.sql deleted file mode 100644 index 8ffde8e1b..000000000 --- a/addition/713_boss_grobbulus_mangos.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE `mangos`.`creature_template` SET `ScriptName` = 'boss_grobbulus' WHERE `creature_template`.`entry` = 15931; diff --git a/addition/715_clear_trial_of_the_champion_mangos.sql b/addition/715_clear_trial_of_the_champion_mangos.sql deleted file mode 100644 index 606bb7a9f..000000000 --- a/addition/715_clear_trial_of_the_champion_mangos.sql +++ /dev/null @@ -1,14 +0,0 @@ --- instance clear -DELETE FROM `creature` WHERE `guid` IN (9202759, 9202763, 9202761); -DELETE FROM `creature` WHERE `guid` IN (9201755, 9201757, 9201777); -DELETE FROM `creature` WHERE `guid` IN (9202522, 9202520, 9202518); -DELETE FROM `creature` WHERE `guid` IN (9202326, 9202324, 9202322); -DELETE FROM `creature` WHERE `guid` IN (9202530, 9202532, 9202534); -DELETE FROM `creature` WHERE `guid` IN (9202524, 9202526, 9202528); -DELETE FROM `creature` WHERE `guid` IN (9202548, 9202550, 9202552); -DELETE FROM `creature` WHERE `guid` IN (9202538, 9202540, 9202542); -DELETE FROM `creature` WHERE `guid` IN (9202129, 9202127, 9202125); -DELETE FROM `creature` WHERE `guid` IN (9202316, 9202318, 9202320); -DELETE FROM `creature` WHERE `guid` IN (9201942, 9201577, 9201940, 9201938); -# bosses -DELETE FROM `creature` WHERE `guid` IN (9201046, 9201048, 9200508, 9200863, 9200867, 9200514, 9200861, 9200337, 9200510); \ No newline at end of file diff --git a/addition/icecrown_loot_mangos.sql b/addition/icecrown_loot_mangos.sql deleted file mode 100644 index 93523ba8c..000000000 --- a/addition/icecrown_loot_mangos.sql +++ /dev/null @@ -1,319 +0,0 @@ --- Deathbringer Saurfang's cache -DELETE FROM `gameobject_template` WHERE `entry` IN (202239,202240,902241,902242); -INSERT INTO `gameobject_template` -(`entry`, `type`, `displayId`, `name`, `IconName`, `castBarCaption`, `unk1`, `faction`, `flags`, `size`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `data0`, `data1`, `data2`, `data3`, `data4`, `data5`, `data6`, `data7`, `data8`, `data9`, `data10`, `data11`, `data12`, `data13`, `data14`, `data15`, `data16`, `data17`, `data18`, `data19`, `data20`, `data21`, `data22`, `data23`, `ScriptName`) VALUES -(202239, 3, 9233, 'Deathbringer''s Cache', '', '', '', 0, 0, 2.5, 0, 0, 0, 0, 0, 0, 1634, 202239, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, ''), -(202240, 3, 9233, 'Deathbringer''s Cache', '', '', '', 0, 0, 2.5, 0, 0, 0, 0, 0, 0, 1634, 202240, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, ''), -(902241, 3, 9233, 'Deathbringer''s Cache', '', '', '', 0, 0, 2.5, 0, 0, 0, 0, 0, 0, 1634, 902241, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, ''), -(902242, 3, 9233, 'Deathbringer''s Cache', '', '', '', 0, 0, 2.5, 0, 0, 0, 0, 0, 0, 1634, 902242, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, ''); - -DELETE FROM `gameobject` WHERE `id` IN (202239,202240,902241,902242); -INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES -(913383, 202239, 631, 1, 65535, -498.363, 2230.69, 539.284, 3.70944, 0, 0, 0.959963, -0.280126, -604800, 100, 1), -(913385, 202240, 631, 2, 65535, -498.363, 2230.69, 539.284, 3.70944, 0, 0, 0.959963, -0.280126, -604800, 100, 1), -(913395, 902241, 631, 4, 65535, -498.363, 2230.69, 539.284, 3.70944, 0, 0, 0.959963, -0.280126, -604800, 100, 1), -(913397, 902242, 631, 8, 65535, -498.363, 2230.69, 539.284, 3.70944, 0, 0, 0.959963, -0.280126, -604800, 100, 1); - -DELETE FROM `gameobject_loot_template` WHERE `entry` = 202239; -INSERT INTO `gameobject_loot_template` VALUES -(202239, 50798, 0, 1, 1, 1, 0, 0, 0), -(202239, 50805, 0, 1, 1, 1, 0, 0, 0), -(202239, 50809, 0, 1, 1, 1, 0, 0, 0), -(202239, 50803, 0, 1, 1, 1, 0, 0, 0), -(202239, 50804, 0, 2, 1, 1, 0, 0, 0), -(202239, 50800, 0, 2, 1, 1, 0, 0, 0), -(202239, 50799, 0, 2, 1, 1, 0, 0, 0), -(202239, 50801, 0, 2, 1, 1, 0, 0, 0), -(202239, 50807, 0, 3, 1, 1, 0, 0, 0), -(202239, 50808, 0, 3, 1, 1, 0, 0, 0), -(202239, 50806, 0, 3, 1, 1, 0, 0, 0), -(202239, 50802, 0, 3, 1, 1, 0, 0, 0); - -DELETE FROM `gameobject_loot_template` WHERE `entry` = 202240; -INSERT INTO `gameobject_loot_template` VALUES -(202240, 52025, 0, 1, 1, 1, 0, 0, 0), -(202240, 52027, 0, 1, 1, 1, 0, 0, 0), -(202240, 52026, 0, 1, 1, 1, 0, 0, 0), -(202240, 50362, 0, 2, 1, 1, 0, 0, 0), -(202240, 50333, 0, 3, 1, 1, 0, 0, 0), -(202240, 49908, 18, 0, 1, 1, 0, 0, 0), -(202240, 50014, 0, 0, 1, 1, 0, 0, 0), -(202240, 50412, 0, 2, 1, 1, 0, 0, 0), -(202240, 50807, 0, 3, 1, 1, 0, 0, 0), -(202240, 50015, 0, 3, 1, 1, 0, 0, 0), -(202240, 50274, 0.1, 0, 1, 1, 0, 0, 0); - -DELETE FROM `gameobject_loot_template` WHERE `entry` = 902241; -INSERT INTO `gameobject_loot_template` VALUES -(902241, 51902, 0, 2, 1, 1, 0, 0, 0), -(902241, 52027, 0, 1, 1, 1, 0, 0, 0), -(902241, 51895, 0, 4, 1, 1, 0, 0, 0), -(902241, 51901, 0, 2, 1, 1, 0, 0, 0), -(902241, 51903, 0, 2, 1, 1, 0, 0, 0), -(902241, 51899, 0, 4, 1, 1, 0, 0, 0), -(902241, 51897, 0, 4, 1, 1, 0, 0, 0), -(902241, 51898, 0, 3, 1, 1, 0, 0, 0), -(902241, 52026, 0, 1, 1, 1, 0, 0, 0), -(902241, 51905, 0, 3, 1, 1, 0, 0, 0), -(902241, 51900, 0, 3, 1, 1, 0, 0, 0), -(902241, 51904, 0, 2, 1, 1, 0, 0, 0), -(902241, 51894, 0, 3, 1, 1, 0, 0, 0), -(902241, 51896, 0, 4, 1, 1, 0, 0, 0), -(902241, 52025, 0, 1, 1, 1, 0, 0, 0), -(902241, 49908, 18, 0, 1, 1, 0, 0, 0); - -DELETE FROM `gameobject_loot_template` WHERE `entry` = 902242; -INSERT INTO `gameobject_loot_template` VALUES -(902242, 52027, 0, 1, 1, 1, 0, 0, 0), -(902242, 52026, 0, 1, 1, 1, 0, 0, 0), -(902242, 52025, 0, 1, 1, 1, 0, 0, 0), -(902242, 52030, 0, 2, 1, 1, 0, 0, 0), -(902242, 52029, 0, 2, 1, 1, 0, 0, 0), -(902242, 52028, 0, 2, 1, 1, 0, 0, 0), -(902242, 50671, 0, 3, 1, 1, 0, 0, 0), -(902242, 50672, 0, 4, 1, 1, 0, 0, 0), -(902242, 50363, 0, 4, 1, 1, 0, 0, 0), -(902242, 50668, 0, 3, 1, 1, 0, 0, 0), -(902242, 50670, 0, 3, 1, 1, 0, 0, 0), -(902242, 49908, 18, 0, 1, 1, 0, 0, 0), -(902242, 50274, 0.1, 0, 1, 1, 0, 0, 0); - - --- Gunship battle cache -DELETE FROM `gameobject_template` WHERE `entry` IN (201873,201874,202178,202180); -INSERT INTO `gameobject_template` -(`entry`, `type`, `displayId`, `name`, `IconName`, `castBarCaption`, `unk1`, `faction`, `flags`, `size`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `data0`, `data1`, `data2`, `data3`, `data4`, `data5`, `data6`, `data7`, `data8`, `data9`, `data10`, `data11`, `data12`, `data13`, `data14`, `data15`, `data16`, `data17`, `data18`, `data19`, `data20`, `data21`, `data22`, `data23`, `ScriptName`) VALUES -(201873, 3, 9280, 'Gunship Armory', '', '', '', 0, 0, 2.5, 0, 0, 0, 0, 0, 0, 1634, 201873, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, ''), -(201874, 3, 9280, 'Gunship Armory', '', '', '', 0, 0, 2.5, 0, 0, 0, 0, 0, 0, 1634, 201874, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, ''), -(202178, 3, 9281, 'Gunship Armory', '', '', '', 0, 0, 2.5, 0, 0, 0, 0, 0, 0, 1634, 202178, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, ''), -(202180, 3, 9281, 'Gunship Armory', '', '', '', 0, 0, 2.5, 0, 0, 0, 0, 0, 0, 1634, 202180, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, ''); - -DELETE FROM `gameobject` WHERE `id` IN (201873,201874,202178,202180); -INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES -(913387, 201873, 631, 1, 65535, -558.932, 2211.48, 539.287, 0.0149338, 0, 0, 0.00746682, 0.999972, -604800, 100, 1), -(913389, 201874, 631, 2, 65535, -558.932, 2211.48, 539.287, 0.0149338, 0, 0, 0.00746682, 0.999972, -604800, 100, 1), -(913391, 202178, 631, 4, 65535, -558.932, 2211.48, 539.287, 0.0149338, 0, 0, 0.00746682, 0.999972, -604800, 100, 1), -(913393, 202180, 631, 8, 65535, -558.932, 2211.48, 539.287, 0.0149338, 0, 0, 0.00746682, 0.999972, -604800, 100, 1); - -DELETE FROM `gameobject_loot_template` WHERE `entry` = 201873; -INSERT INTO `gameobject_loot_template` VALUES -(201873, 50793, 0, 1, 1, 1, 0, 0, 0), -(201873, 50787, 0, 1, 1, 1, 0, 0, 0), -(201873, 50340, 0, 2, 1, 1, 0, 0, 0), -(201873, 50794, 0, 1, 1, 1, 0, 0, 0), -(201873, 50789, 0, 3, 1, 1, 0, 0, 0), -(201873, 50791, 0, 2, 1, 1, 0, 0, 0), -(201873, 50788, 0, 3, 1, 1, 0, 0, 0), -(201873, 50792, 0, 3, 1, 1, 0, 0, 0), -(201873, 50796, 0, 3, 1, 1, 0, 0, 0), -(201873, 50795, 0, 3, 1, 1, 0, 0, 0), -(201873, 50790, 0, 2, 1, 1, 0, 0, 0), -(201873, 50797, 0, 3, 1, 1, 0, 0, 0); - -DELETE FROM `gameobject_loot_template` WHERE `entry` = 201874; -INSERT INTO `gameobject_loot_template` VALUES -(201874, 50008, 0, 1, 1, 1, 0, 0, 0), -(201874, 49998, 0, 2, 1, 1, 0, 0, 0), -(201874, 50005, 0, 2, 1, 1, 0, 0, 0), -(201874, 50352, 0, 1, 1, 1, 0, 0, 0), -(201874, 50011, 0, 3, 1, 1, 0, 0, 0), -(201874, 50359, 0, 1, 1, 1, 0, 0, 0), -(201874, 50001, 0, 3, 1, 1, 0, 0, 0), -(201874, 50000, 0, 3, 1, 1, 0, 0, 0), -(201874, 50002, 0, 3, 1, 1, 0, 0, 0), -(201874, 50006, 0, 3, 1, 1, 0, 0, 0), -(201874, 49999, 0, 1, 1, 1, 0, 0, 0), -(201874, 50010, 0, 3, 1, 1, 0, 0, 0), -(201874, 50003, 0, 3, 1, 1, 0, 0, 0), -(201874, 50411, 0, 2, 1, 1, 0, 0, 0), -(201874, 50009, 0, 3, 1, 1, 0, 0, 0), -(201874, 50274, 0.1, 0, 1, 1, 0, 0, 0); - -DELETE FROM `gameobject_loot_template` WHERE `entry` = 202178; -INSERT INTO `gameobject_loot_template` VALUES -(202178, 51913, 0, 1, 1, 1, 0, 0, 0), -(202178, 51915, 0, 2, 1, 1, 0, 0, 0), -(202178, 51907, 0, 3, 1, 1, 0, 0, 0), -(202178, 51908, 0, 3, 1, 1, 0, 0, 0), -(202178, 51916, 0, 1, 1, 1, 0, 0, 0), -(202178, 51906, 0, 2, 1, 1, 0, 0, 0), -(202178, 51914, 0, 3, 1, 1, 0, 0, 0), -(202178, 51910, 0, 1, 1, 1, 0, 0, 0), -(202178, 50345, 0, 3, 1, 1, 0, 0, 0), -(202178, 51909, 0, 1, 1, 1, 0, 0, 0), -(202178, 51911, 0, 2, 1, 1, 0, 0, 0), -(202178, 51912, 0, 1, 1, 1, 0, 0, 0), -(202178, 49908, 18, 0, 1, 1, 0, 0, 0); - -DELETE FROM `gameobject_loot_template` WHERE `entry` = 202180; -INSERT INTO `gameobject_loot_template` VALUES -(202180, 50366, 0, 1, 1, 1, 0, 0, 0), -(202180, 50658, 0, 4, 1, 1, 0, 0, 0), -(202180, 50660, 0, 2, 1, 1, 0, 0, 0), -(202180, 50665, 0, 3, 1, 1, 0, 0, 0), -(202180, 50661, 0, 3, 1, 1, 0, 0, 0), -(202180, 50349, 0, 1, 1, 1, 0, 0, 0), -(202180, 50663, 0, 2, 1, 1, 0, 0, 0), -(202180, 50656, 0, 2, 1, 1, 0, 0, 0), -(202180, 50659, 0, 3, 1, 1, 0, 0, 0), -(202180, 50664, 0, 1, 1, 1, 0, 0, 0), -(202180, 50655, 0, 3, 1, 1, 0, 0, 0), -(202180, 50654, 0, 4, 1, 1, 0, 0, 0), -(202180, 50653, 0, 4, 1, 1, 0, 0, 0), -(202180, 50657, 0, 1, 1, 1, 0, 0, 0), -(202180, 50667, 0, 4, 1, 1, 0, 0, 0), -(202180, 50274, 0.1, 0, 1, 1, 0, 0, 0), -(202180, 49908, 18, 0, 1, 1, 0, 0, 0); - --- Lord Marrowgar -UPDATE `creature_template` SET `lootid` = 36612 WHERE `entry` = 36612; -DELETE FROM `creature_loot_template` WHERE `entry` = 36612; -INSERT INTO `creature_loot_template` VALUES -(36612, 50761, 0, 1, 1, 1, 0, 0, 0), -(36612, 50771, 0, 1, 1, 1, 0, 0, 0), -(36612, 50339, 0, 1, 1, 1, 0, 0, 0), -(36612, 50764, 0, 1, 1, 1, 0, 0, 0), -(36612, 50772, 0, 2, 1, 1, 0, 0, 0), -(36612, 50759, 0, 1, 1, 1, 0, 0, 0), -(36612, 50760, 0, 1, 1, 1, 0, 0, 0), -(36612, 50774, 0, 2, 1, 1, 0, 0, 0), -(36612, 50773, 0, 2, 1, 1, 0, 0, 0), -(36612, 50775, 0, 2, 1, 1, 0, 0, 0), -(36612, 50762, 0, 2, 1, 1, 0, 0, 0), -(36612, 50763, 0, 1, 1, 1, 0, 0, 0); - -UPDATE `creature_template` SET `lootid` = 13100 WHERE `entry` = 13100; -DELETE FROM `creature_loot_template` WHERE `entry` = 13100; -INSERT INTO `creature_loot_template` VALUES -(13100, 49968, 0, 1, 1, 1, 0, 0, 0), -(13100, 50415, 0, 1, 1, 1, 0, 0, 0), -(13100, 49977, 0, 3, 1, 1, 0, 0, 0), -(13100, 49975, 0, 3, 1, 1, 0, 0, 0), -(13100, 49978, 0, 2, 1, 1, 0, 0, 0), -(13100, 49949, 0, 1, 1, 1, 0, 0, 0), -(13100, 49976, 0, 1, 1, 1, 0, 0, 0), -(13100, 49951, 0, 2, 1, 1, 0, 0, 0), -(13100, 49967, 0, 3, 1, 1, 0, 0, 0), -(13100, 49960, 0, 2, 1, 1, 0, 0, 0), -(13100, 49950, 0, 2, 1, 1, 0, 0, 0), -(13100, 49979, 0, 2, 1, 1, 0, 0, 0), -(13100, 49952, 0, 2, 1, 1, 0, 0, 0), -(13100, 49980, 0, 2, 1, 1, 0, 0, 0), -(13100, 49964, 0, 2, 1, 1, 0, 0, 0), -(13100, 49908, 20, 0, 1, 1, 0, 0, 0), -(13100, 50274, 0.1, 0, 1, 1, 0, 0, 0); - -UPDATE `creature_template` SET `lootid` = 13101 WHERE `entry` = 13101; -DELETE FROM `creature_loot_template` WHERE `entry` = 13101; -INSERT INTO `creature_loot_template` VALUES -(13101, 51931, 0, 1, 1, 1, 0, 0, 0), -(13101, 51938, 0, 2, 1, 1, 0, 0, 0), -(13101, 51937, 0, 2, 1, 1, 0, 0, 0), -(13101, 51936, 0, 2, 1, 1, 0, 0, 0), -(13101, 51929, 0, 1, 1, 1, 0, 0, 0), -(13101, 51930, 0, 1, 1, 1, 0, 0, 0), -(13101, 51928, 0, 1, 1, 1, 0, 0, 0), -(13101, 51932, 0, 2, 1, 1, 0, 0, 0), -(13101, 51935, 0, 1, 1, 1, 0, 0, 0), -(13101, 51934, 0, 2, 1, 1, 0, 0, 0), -(13101, 51933, 0, 1, 1, 1, 0, 0, 0), -(13101, 50346, 0, 2, 1, 1, 0, 0, 0); - - -UPDATE `creature_template` SET `lootid` = 13102 WHERE `entry` = 13102; -DELETE FROM `creature_loot_template` WHERE `entry` = 13102; -INSERT INTO `creature_loot_template` VALUES -(13102, 50604, 0, 1, 1, 1, 0, 0, 0), -(13102, 50609, 0, 1, 1, 1, 0, 0, 0), -(13102, 50611, 0, 2, 1, 1, 0, 0, 0), -(13102, 50709, 0, 3, 1, 1, 0, 0, 0), -(13102, 50616, 0, 3, 1, 1, 0, 0, 0), -(13102, 50613, 0, 2, 1, 1, 0, 0, 0), -(13102, 50607, 0, 2, 1, 1, 0, 0, 0), -(13102, 50608, 0, 3, 1, 1, 0, 0, 0), -(13102, 50606, 0, 2, 1, 1, 0, 0, 0), -(13102, 50615, 0, 2, 1, 1, 0, 0, 0), -(13102, 50612, 0, 1, 1, 1, 0, 0, 0), -(13102, 50614, 0, 1, 1, 1, 0, 0, 0), -(13102, 50610, 0, 1, 1, 1, 0, 0, 0), -(13102, 50617, 0, 2, 1, 1, 0, 0, 0), -(13102, 50605, 0, 2, 1, 1, 0, 0, 0), -(13102, 49908, 20, 0, 1, 1, 0, 0, 0), -(13102, 50274, 0.1, 0, 1, 1, 0, 0, 0); - - --- Lady Deathwhisper -UPDATE `creature_template` SET `lootid` = 36855 WHERE `entry` = 36855; -DELETE FROM `creature_loot_template` WHERE `entry` = 36855; -INSERT INTO `creature_loot_template` VALUES -(36855, 50781, 0, 1, 1, 1, 0, 0, 0), -(36855, 50776, 0, 1, 1, 1, 0, 0, 0), -(36855, 50782, 0, 2, 1, 1, 0, 0, 0), -(36855, 50342, 0, 3, 1, 1, 0, 0, 0), -(36855, 50780, 0, 1, 1, 1, 0, 0, 0), -(36855, 50784, 0, 2, 1, 1, 0, 0, 0), -(36855, 50779, 0, 2, 1, 1, 0, 0, 0), -(36855, 50777, 0, 3, 1, 1, 0, 0, 0), -(36855, 50778, 0, 3, 1, 1, 0, 0, 0), -(36855, 50783, 0, 3, 1, 1, 0, 0, 0), -(36855, 50785, 0, 2, 1, 1, 0, 0, 0), -(36855, 50786, 0, 2, 1, 1, 0, 0, 0); - - -UPDATE `creature_template` SET `lootid` = 13103 WHERE `entry` = 13103; -DELETE FROM `creature_loot_template` WHERE `entry` = 13103; -INSERT INTO `creature_loot_template` VALUES -(13103, 49992, 0, 1, 1, 1, 0, 0, 0), -(13103, 50034, 0, 1, 1, 1, 0, 0, 0), -(13103, 49994, 0, 2, 1, 1, 0, 0, 0), -(13103, 49983, 0, 2, 1, 1, 0, 0, 0), -(13103, 49987, 0, 3, 1, 1, 0, 0, 0), -(13103, 49982, 0, 1, 1, 1, 0, 0, 0), -(13103, 49990, 0, 1, 1, 1, 0, 0, 0), -(13103, 49991, 0, 2, 1, 1, 0, 0, 0), -(13103, 49989, 0, 1, 1, 1, 0, 0, 0), -(13103, 49988, 0, 3, 1, 1, 0, 0, 0), -(13103, 49996, 0, 3, 1, 1, 0, 0, 0), -(13103, 49995, 0, 2, 1, 1, 0, 0, 0), -(13103, 49993, 0, 3, 1, 1, 0, 0, 0), -(13103, 49986, 0, 2, 1, 1, 0, 0, 0), -(13103, 49985, 0, 1, 1, 1, 0, 0, 0), -(13103, 49908, 21, 0, 1, 1, 0, 0, 0), -(13103, 50274, 0.1, 0, 1, 1, 0, 0, 0); - -UPDATE `creature_template` SET `lootid` = 13104 WHERE `entry` = 13104; -DELETE FROM `creature_loot_template` WHERE `entry` = 13104; -INSERT INTO `creature_loot_template` VALUES -(13104, 51920, 0, 1, 1, 1, 0, 0, 0), -(13104, 51918, 0, 2, 1, 1, 0, 0, 0), -(13104, 51923, 0, 2, 1, 1, 0, 0, 0), -(13104, 51919, 0, 1, 1, 1, 0, 0, 0), -(13104, 51924, 0, 2, 1, 1, 0, 0, 0), -(13104, 51917, 0, 1, 1, 1, 0, 0, 0), -(13104, 51926, 0, 1, 1, 1, 0, 0, 0), -(13104, 51927, 0, 3, 1, 1, 0, 0, 0), -(13104, 51922, 0, 3, 1, 1, 0, 0, 0), -(13104, 51921, 0, 2, 1, 1, 0, 0, 0), -(13104, 51925, 0, 1, 1, 1, 0, 0, 0), -(13104, 50343, 0, 3, 1, 1, 0, 0, 0); - -UPDATE `creature_template` SET `lootid` = 13105 WHERE `entry` = 13105; -DELETE FROM `creature_loot_template` WHERE `entry` = 13105; -INSERT INTO `creature_loot_template` VALUES -(13105, 50647, 0, 1, 1, 1, 0, 0, 0), -(13105, 50639, 0, 2, 1, 1, 0, 0, 0), -(13105, 50640, 0, 3, 1, 1, 0, 0, 0), -(13105, 50646, 0, 3, 1, 1, 0, 0, 0), -(13105, 50649, 0, 2, 1, 1, 0, 0, 0), -(13105, 50650, 0, 3, 1, 1, 0, 0, 0), -(13105, 50641, 0, 1, 1, 1, 0, 0, 0), -(13105, 50642, 0, 1, 1, 1, 0, 0, 0), -(13105, 50645, 0, 3, 1, 1, 0, 0, 0), -(13105, 50652, 0, 2, 1, 1, 0, 0, 0), -(13105, 50648, 0, 1, 1, 1, 0, 0, 0), -(13105, 50644, 0, 1, 1, 1, 0, 0, 0), -(13105, 50643, 0, 3, 1, 1, 0, 0, 0), -(13105, 50651, 0, 2, 1, 1, 0, 0, 0), -(13105, 50638, 0, 1, 1, 1, 0, 0, 0), -(13105, 49908, 21, 0, 1, 1, 0, 0, 0), -(13105, 50274, 0.1, 0, 1, 1, 0, 0, 0); diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index 430ca5553..74d1bcb70 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -134,6 +134,8 @@ extern void AddSC_boss_dathrohan_balnazzar(); extern void AddSC_boss_order_of_silver_hand(); extern void AddSC_instance_stratholme(); extern void AddSC_stratholme(); +extern void AddSC_instance_sunken_temple(); +extern void AddSC_sunken_temple(); extern void AddSC_boss_brutallus(); //sunwell_plateau extern void AddSC_boss_kalecgos(); extern void AddSC_instance_sunwell_plateau(); @@ -601,6 +603,8 @@ void AddScripts() AddSC_boss_order_of_silver_hand(); AddSC_instance_stratholme(); AddSC_stratholme(); + AddSC_instance_sunken_temple(); + AddSC_sunken_temple(); AddSC_boss_brutallus(); //sunwell_plateau AddSC_boss_kalecgos(); AddSC_instance_sunwell_plateau(); From a79f77f337f6ea5a65e3eacaeaf52a8e6a04b3a2 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sat, 27 Feb 2010 18:03:10 +0300 Subject: [PATCH 167/405] Work on 3 floor of Icecrown citadel started + small instance patch --- addition/721_icecrown_mangos.sql | 22 ++++++ .../icecrown_citadel/def_spire.h | 19 +++++ .../icecrown_citadel/icecrown_spire.cpp | 4 +- .../instance_icecrown_spire.cpp | 71 ++++++++++++++++++- 4 files changed, 112 insertions(+), 4 deletions(-) diff --git a/addition/721_icecrown_mangos.sql b/addition/721_icecrown_mangos.sql index 797092bd9..756f68a65 100644 --- a/addition/721_icecrown_mangos.sql +++ b/addition/721_icecrown_mangos.sql @@ -43,6 +43,7 @@ UPDATE `creature_template` SET `ScriptName`='boss_deathbringer_saurfang' WHERE ` -- Deathwhisper UPDATE `creature_template` SET `ScriptName`='boss_lady_deathwhisper' WHERE `entry`=36855; UPDATE `creature_template` SET `faction_A`=14, `faction_H`=14,`ScriptName`='mob_vengeful_shade', `AIName`='' WHERE `entry`= 38222; +#UPDATE `gameobject` SET `spawntimesecs` = -25, `state` = 1 WHERE `id` = 202220; -- Marrowgar UPDATE `creature_template` SET `ScriptName`='boss_lord_marrowgar' WHERE `entry`= 36612; @@ -68,3 +69,24 @@ INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid` -- Entrance UPDATE `areatrigger_teleport` SET `required_level` = '80' WHERE `areatrigger_teleport`.`id` =5670; + +-- Rotface +-- UPDATE `creature_template` SET `ScriptName`='boss_rotface' WHERE `entry`= 36627; +-- Festergut +-- UPDATE `creature_template` SET `ScriptName`='boss_festergut' WHERE `entry`= 36626; +-- Professor putricide +-- UPDATE `creature_template` SET `ScriptName`='boss_professor_putricide' WHERE `entry`= 36678; +-- Taldaram +-- UPDATE `creature_template` SET `ScriptName`='boss_taldaram' WHERE `entry`= 37973; +-- Valanar +-- UPDATE `creature_template` SET `ScriptName`='boss_valanar' WHERE `entry`= 37970; +-- Keleseth +-- UPDATE `creature_template` SET `ScriptName`='boss_keleseth' WHERE `entry`= 37972; +-- Qween Lana'thel +-- UPDATE `creature_template` SET `ScriptName`='boss_lanathel' WHERE `entry`= 37955; +-- Valithria dreamwalker +-- UPDATE `creature_template` SET `ScriptName`='boss_valithria' WHERE `entry`= 36789; +-- Sindragosa +-- UPDATE `creature_template` SET `ScriptName`='boss_sindragosa' WHERE `entry`= 37755; +-- Lich King +-- UPDATE `creature_template` SET `ScriptName`='boss_lich_king' WHERE `entry`= 29983; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h index 702ad6d31..19ad1f1d1 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h @@ -22,6 +22,16 @@ enum NPC_LORD_MARROWGAR = 36612, NPC_LADY_DEATHWHISPER = 36855, NPC_DEATHBRINGER_SAURFANG = 37813, + NPC_FESTERGUT = 36626, + NPC_ROTFACE = 36627, + NPC_PROFESSOR_PUTRICIDE = 36678, + NPC_TALDARAM = 37973, + NPC_VALANAR = 37970, + NPC_KELESETH = 37972, + NPC_LANATHEL = 37955, + NPC_VALITHRIA = 36789, + NPC_SINDRAGOSA = 37755, + NPC_LICH_KING = 29983, GO_TELEPORT_GOSSIP_MESSAGE = 99323, TELEPORT_GOSSIP_MESSAGE = 99322, @@ -30,6 +40,15 @@ enum GO_ICEWALL_2 = 201910, GO_ORATORY_DOOR = 201563, GO_SAURFANG_DOOR = 201825, + GO_DEATHWHISPER_ELEVATOR = 202220, //5653 + GO_ORANGE_PLAGUE = 201371, //72536 + GO_GREEN_PLAGUE = 201370, //72537 + GO_SCIENTIST_DOOR_GREEN = 201614, //72530 + GO_SCIENTIST_DOOR_ORANGE = 201613, //72531 + GO_SCIENTIST_DOOR = 201372, //72541 + GO_CRIMSON_HALL_DOOR = 201376, //72532 + GO_COUNCIL_DOOR_1 = 201377, //72533 + GO_COUNCIL_DOOR_2 = 201378, //72534 GO_SAURFANG_CACHE_10 = 202239, GO_SAURFANG_CACHE_25 = 202240, diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp index 1121ff430..2cab9ba6c 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp @@ -74,12 +74,12 @@ struct MANGOS_DLL_DECL mob_spire_frostwyrmAI : public ScriptedAI void Aggro(Unit *who) { - if(pInstance) pInstance->SetData(TYPE_SKULLS_PLATO, IN_PROGRESS); + if(pInstance && who->GetTypeId() == TYPEID_PLAYER) pInstance->SetData(TYPE_SKULLS_PLATO, IN_PROGRESS); } void JustDied(Unit *killer) { - if(pInstance) { + if(pInstance && killer->GetTypeId() == TYPEID_PLAYER) { pInstance->SetData(TYPE_SKULLS_PLATO, DONE); wirmsdied=pInstance->GetData(TYPE_FROSTWIRM_COUNT); ++wirmsdied; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp index 315aab3aa..04d2fc7fd 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp @@ -34,18 +34,29 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance uint64 m_uiMarrogwarGUID; uint64 m_uiDeathWhisperGUID; uint64 m_uiSaurfangGUID; + uint64 m_uiRotfaceGUID; + uint64 m_uiFestergutGUID; + uint64 m_uiPutricideGUID; + uint64 m_uiTaldaramGUID; + uint64 m_uiValanarGUID; + uint64 m_uiKelesethGUID; + uint64 m_uiLanathelGUID; + uint64 m_uiValithriaGUID; + uint64 m_uiSindragosaGUID; + uint64 m_uiLichKingGUID; uint64 m_uiIcewall1GUID; uint64 m_uiIcewall2GUID; uint64 m_uiSaurfangDoorGUID; uint64 m_uiSaurfangCacheGUID; uint64 m_uiGunshipArmoryGUID; + uint64 m_uiDeathWhisperElevatorGUID; void OpenDoor(uint64 guid) { if(!guid) return; GameObject* pGo = instance->GetGameObject(guid); - if(pGo) pGo->SetGoState(GO_STATE_ACTIVE); + if(pGo) pGo->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE); } void CloseDoor(uint64 guid) @@ -83,6 +94,36 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance case NPC_DEATHBRINGER_SAURFANG: m_uiSaurfangGUID = pCreature->GetGUID(); break; + case NPC_FESTERGUT: + m_uiFestergutGUID = pCreature->GetGUID(); + break; + case NPC_ROTFACE: + m_uiRotfaceGUID = pCreature->GetGUID(); + break; + case NPC_PROFESSOR_PUTRICIDE: + m_uiPutricideGUID = pCreature->GetGUID(); + break; + case NPC_TALDARAM: + m_uiTaldaramGUID = pCreature->GetGUID(); + break; + case NPC_VALANAR: + m_uiValanarGUID = pCreature->GetGUID(); + break; + case NPC_KELESETH: + m_uiKelesethGUID = pCreature->GetGUID(); + break; + case NPC_LANATHEL: + m_uiLanathelGUID = pCreature->GetGUID(); + break; + case NPC_VALITHRIA: + m_uiValithriaGUID = pCreature->GetGUID(); + break; + case NPC_SINDRAGOSA: + m_uiSindragosaGUID = pCreature->GetGUID(); + break; + case NPC_LICH_KING: + m_uiLichKingGUID = pCreature->GetGUID(); + break; } } @@ -99,6 +140,9 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance case GO_SAURFANG_DOOR: m_uiSaurfangDoorGUID = pGo->GetGUID(); break; + case GO_DEATHWHISPER_ELEVATOR: + m_uiDeathWhisperElevatorGUID = pGo->GetGUID(); + break; case GO_SAURFANG_CACHE_10: if(Difficulty == RAID_DIFFICULTY_10MAN_NORMAL) m_uiSaurfangCacheGUID = pGo->GetGUID(); @@ -151,7 +195,9 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance case TYPE_DEATHWHISPER: m_auiEncounter[2] = uiData; if (uiData == DONE) { - m_auiEncounter[0] = TYPE_DEATHWHISPER; + m_auiEncounter[0] = TYPE_DEATHWHISPER; + if (GameObject* pGOTemp = instance->GetGameObject(m_uiDeathWhisperElevatorGUID)) + pGOTemp->SetRespawnTime(25000); } break; case TYPE_SKULLS_PLATO: @@ -235,6 +281,27 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance return m_uiDeathWhisperGUID; case NPC_DEATHBRINGER_SAURFANG: return m_uiSaurfangGUID; + case NPC_FESTERGUT: + return m_uiFestergutGUID; + case NPC_ROTFACE: + return m_uiRotfaceGUID; + case NPC_PROFESSOR_PUTRICIDE: + return m_uiPutricideGUID; + case NPC_TALDARAM: + return m_uiTaldaramGUID; + case NPC_VALANAR: + return m_uiValanarGUID; + case NPC_KELESETH: + return m_uiKelesethGUID; + case NPC_LANATHEL: + return m_uiLanathelGUID; + case NPC_VALITHRIA: + return m_uiValithriaGUID; + case NPC_SINDRAGOSA: + return m_uiSindragosaGUID; + case NPC_LICH_KING: + return m_uiLichKingGUID; + } return 0; } From 9cc3596099bec196a5532543f596b7f41bfc7cb4 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sun, 28 Feb 2010 16:03:41 +0300 Subject: [PATCH 168/405] Fix compile with SOAP implemented in Mangos --- patches/MaNGOS-9439-ScriptDev2.patch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/patches/MaNGOS-9439-ScriptDev2.patch b/patches/MaNGOS-9439-ScriptDev2.patch index 7f6862edc..d82c66918 100644 --- a/patches/MaNGOS-9439-ScriptDev2.patch +++ b/patches/MaNGOS-9439-ScriptDev2.patch @@ -50,11 +50,11 @@ index 25d5d79..f4963aa 100644 ../shared/Database/libmangosdatabase.a \ ../shared/Config/libmangosconfig.a \ @@ -45,7 +45,7 @@ mangos_worldd_LDADD = \ - ../../dep/src/sockets/libmangossockets.a \ - ../../dep/src/g3dlite/libg3dlite.a + ../../dep/src/g3dlite/libg3dlite.a \ + ../../dep/src/gsoap/libgsoap.a --mangos_worldd_LDFLAGS = -L../../dep/src/sockets -L../../dep/src/g3dlite -L../bindings/universal/ -L$(libdir) $(MANGOS_LIBS) -export-dynamic -+mangos_worldd_LDFLAGS = -L../../dep/src/sockets -L../../dep/src/g3dlite -L../bindings/ScriptDev2/ -L$(libdir) $(MANGOS_LIBS) -export-dynamic +-mangos_worldd_LDFLAGS = -L../../dep/src/sockets -L../../dep/src/g3dlite -L../../dep/src/gsoap -L../bindings/universal/ -L$(libdir) $(MANGOS_LIBS) -export-dynamic ++mangos_worldd_LDFLAGS = -L../../dep/src/sockets -L../../dep/src/g3dlite -L../../dep/src/gsoap -L../bindings/ScriptDev2/ -L$(libdir) $(MANGOS_LIBS) -export-dynamic ## Additional files to include when running 'make dist' # Include world daemon configuration From 5efbafe509436cc2cc1be09ea0643e2cd89a76a0 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Mon, 1 Mar 2010 13:29:30 +0300 Subject: [PATCH 169/405] Icecrow citadel floor 4 started --- addition/721_icecrown_mangos.sql | 27 ++++-- .../icecrown_citadel/blood_prince_council.cpp | 3 +- .../icecrown_citadel/boss_festergut.cpp | 3 +- .../boss_lady_deathwhisper.cpp | 2 +- .../icecrown_citadel/boss_lord_marrowgar.cpp | 2 +- .../boss_proffesor_putricide.cpp | 3 +- .../icecrown_citadel/boss_rotface.cpp | 3 +- .../boss_valithria_dreamwalker.cpp | 20 +++- .../icecrown_citadel/def_spire.h | 30 +++++- .../icecrown_citadel/icecrown_spire.cpp | 2 +- .../icecrown_citadel/icecrown_teleport.cpp | 14 +-- .../instance_icecrown_spire.cpp | 97 +++++++++++++++++-- 12 files changed, 173 insertions(+), 33 deletions(-) diff --git a/addition/721_icecrown_mangos.sql b/addition/721_icecrown_mangos.sql index 756f68a65..c46354b0a 100644 --- a/addition/721_icecrown_mangos.sql +++ b/addition/721_icecrown_mangos.sql @@ -1,23 +1,29 @@ +-- Entrance +UPDATE `areatrigger_teleport` SET `required_level` = '80' WHERE `areatrigger_teleport`.`id` =5670; + DELETE FROM `gameobject` WHERE `guid` = 913334; INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES (913334, 202244, 631, 3, 1, -209.5, 2211.91, 199.97, 3.07661, 0, 0, 0.999472, 0.0324833, 0, 0, 1); UPDATE `gameobject_template` SET ScriptName = 'go_icecrown_teleporter' WHERE `entry` IN (202242,202243,202244,202245,202235); - +# 202223 202246 DELETE FROM `creature_template` WHERE `entry` = 99322; INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (99322, 0, 0, 0, 0, 0, 22448, 0, 22448, 0, 'IceCrown teleporter', '', NULL, 0, 80, 80, 64200, 64200, 12300, 12300, 9730, 35, 35, 1, 1.48, 0.5, 0, 294, 441, 0, 110, 1.4, 1400, 1400, 0, 0, 0, 0, 0, 0, 0, 0, 235, 353, 88, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 1, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 'icecrown_teleporter'); REPLACE INTO `locales_creature` values ('99322','IceCrown teleporter','','','','','','','Телепортер цитадели Ледяной короны',NULL,NULL,NULL,NULL,NULL,NULL,NULL,''); -DELETE FROM `creature` WHERE `guid` IN (599322,599323,599324,599325,599326,599327); +DELETE FROM `creature` WHERE `guid` IN (599322,599323,599324,599325,599326,599327,599328,599329,599330); INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (599322, 99322, 631, 15, 1, 0, 0, -209.5, 2211.91, 199.97, 0, 3600, 0, 0, 64200, 12300, 0, 0), (599323, 99322, 631, 15, 1, 0, 0, -503.62, 2211.47, 62.8235, 0, 3600, 0, 0, 64200, 12300, 0, 0), (599324, 99322, 631, 15, 1, 0, 0, -17.1928, 2211.44, 30.1158, 0, 3600, 0, 0, 64200, 12300, 0, 0), (599325, 99322, 631, 15, 1, 0, 0, -549.131, 2211.29, 539.291, 0, 3600, 0, 0, 64200, 12300, 0, 0), (599326, 99322, 631, 15, 1, 0, 0, -615.145, 2211.47, 199.972, 0, 3600, 0, 0, 64200, 12300, 0, 0), -(599327, 99322, 631, 15, 1, 0, 0, 4198.42, 2769.22, 351.065, 0, 3600, 0, 0, 64200, 12300, 0, 0); +(599327, 99322, 631, 15, 1, 0, 0, 4198.42, 2769.22, 351.065, 0, 3600, 0, 0, 64200, 12300, 0, 0), +(599328, 99322, 631, 15, 1, 0, 0, 4490.205566, 2769.275635, 403.983765, 0, 3600, 0, 0, 64200, 12300, 0, 0), +(599329, 99322, 631, 15, 1, 0, 0, 4356.236816, 2402.573242, 220.462540, 0, 3600, 0, 0, 64200, 12300, 0, 0), +(599330, 99322, 631, 15, 1, 0, 0, 4356.236816, 2402.573242, 220.462540, 0, 3600, 0, 0, 64200, 12300, 0, 0); DELETE FROM `locales_npc_text` WHERE `entry` = 99322; INSERT INTO `locales_npc_text` (`entry`, `Text0_0_loc1`, `Text0_0_loc2`, `Text0_0_loc3`, `Text0_0_loc4`, `Text0_0_loc5`, `Text0_0_loc6`, `Text0_0_loc7`, `Text0_0_loc8`, `Text0_1_loc1`, `Text0_1_loc2`, `Text0_1_loc3`, `Text0_1_loc4`, `Text0_1_loc5`, `Text0_1_loc6`, `Text0_1_loc7`, `Text0_1_loc8`, `Text1_0_loc1`, `Text1_0_loc2`, `Text1_0_loc3`, `Text1_0_loc4`, `Text1_0_loc5`, `Text1_0_loc6`, `Text1_0_loc7`, `Text1_0_loc8`, `Text1_1_loc1`, `Text1_1_loc2`, `Text1_1_loc3`, `Text1_1_loc4`, `Text1_1_loc5`, `Text1_1_loc6`, `Text1_1_loc7`, `Text1_1_loc8`, `Text2_0_loc1`, `Text2_0_loc2`, `Text2_0_loc3`, `Text2_0_loc4`, `Text2_0_loc5`, `Text2_0_loc6`, `Text2_0_loc7`, `Text2_0_loc8`, `Text2_1_loc1`, `Text2_1_loc2`, `Text2_1_loc3`, `Text2_1_loc4`, `Text2_1_loc5`, `Text2_1_loc6`, `Text2_1_loc7`, `Text2_1_loc8`, `Text3_0_loc1`, `Text3_0_loc2`, `Text3_0_loc3`, `Text3_0_loc4`, `Text3_0_loc5`, `Text3_0_loc6`, `Text3_0_loc7`, `Text3_0_loc8`, `Text3_1_loc1`, `Text3_1_loc2`, `Text3_1_loc3`, `Text3_1_loc4`, `Text3_1_loc5`, `Text3_1_loc6`, `Text3_1_loc7`, `Text3_1_loc8`, `Text4_0_loc1`, `Text4_0_loc2`, `Text4_0_loc3`, `Text4_0_loc4`, `Text4_0_loc5`, `Text4_0_loc6`, `Text4_0_loc7`, `Text4_0_loc8`, `Text4_1_loc1`, `Text4_1_loc2`, `Text4_1_loc3`, `Text4_1_loc4`, `Text4_1_loc5`, `Text4_1_loc6`, `Text4_1_loc7`, `Text4_1_loc8`, `Text5_0_loc1`, `Text5_0_loc2`, `Text5_0_loc3`, `Text5_0_loc4`, `Text5_0_loc5`, `Text5_0_loc6`, `Text5_0_loc7`, `Text5_0_loc8`, `Text5_1_loc1`, `Text5_1_loc2`, `Text5_1_loc3`, `Text5_1_loc4`, `Text5_1_loc5`, `Text5_1_loc6`, `Text5_1_loc7`, `Text5_1_loc8`, `Text6_0_loc1`, `Text6_0_loc2`, `Text6_0_loc3`, `Text6_0_loc4`, `Text6_0_loc5`, `Text6_0_loc6`, `Text6_0_loc7`, `Text6_0_loc8`, `Text6_1_loc1`, `Text6_1_loc2`, `Text6_1_loc3`, `Text6_1_loc4`, `Text6_1_loc5`, `Text6_1_loc6`, `Text6_1_loc7`, `Text6_1_loc8`, `Text7_0_loc1`, `Text7_0_loc2`, `Text7_0_loc3`, `Text7_0_loc4`, `Text7_0_loc5`, `Text7_0_loc6`, `Text7_0_loc7`, `Text7_0_loc8`, `Text7_1_loc1`, `Text7_1_loc2`, `Text7_1_loc3`, `Text7_1_loc4`, `Text7_1_loc5`, `Text7_1_loc6`, `Text7_1_loc7`, `Text7_1_loc8`) VALUES @@ -67,25 +73,34 @@ INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid` (81168, 37230, 631, 15, 1, 0, 0, -298.341, 2203.06, 199.983, 4.17647, 300, 0, 0, 1078480, 41690, 0, 0), (124864, 37230, 631, 15, 1, 0, 0, -222.214, 2220.68, 199.97, 3.1586, 300, 0, 0, 1078480, 41690, 0, 0); --- Entrance -UPDATE `areatrigger_teleport` SET `required_level` = '80' WHERE `areatrigger_teleport`.`id` =5670; - -- Rotface -- UPDATE `creature_template` SET `ScriptName`='boss_rotface' WHERE `entry`= 36627; -- Festergut -- UPDATE `creature_template` SET `ScriptName`='boss_festergut' WHERE `entry`= 36626; -- Professor putricide -- UPDATE `creature_template` SET `ScriptName`='boss_professor_putricide' WHERE `entry`= 36678; +UPDATE `gameobject_template` SET `faction` = '114',`data0` = '0' WHERE `gameobject_template`.`entry` IN (201371,201370,201372,201614,201613); +UPDATE `gameobject` SET `state` = '1' WHERE `id` IN (201371,201370,201372,201614,201613); + -- Taldaram -- UPDATE `creature_template` SET `ScriptName`='boss_taldaram' WHERE `entry`= 37973; -- Valanar -- UPDATE `creature_template` SET `ScriptName`='boss_valanar' WHERE `entry`= 37970; -- Keleseth -- UPDATE `creature_template` SET `ScriptName`='boss_keleseth' WHERE `entry`= 37972; +UPDATE `gameobject_template` SET `faction` = '114',`data0` = '0' WHERE `gameobject_template`.`entry` IN (201376,201377,201378); +UPDATE `gameobject` SET `state` = '1' WHERE `id` IN (201376,201377,201378); + -- Qween Lana'thel -- UPDATE `creature_template` SET `ScriptName`='boss_lanathel' WHERE `entry`= 37955; + -- Valithria dreamwalker -- UPDATE `creature_template` SET `ScriptName`='boss_valithria' WHERE `entry`= 36789; +UPDATE `gameobject_template` SET `faction` = '114',`data0` = '0' WHERE `gameobject_template`.`entry` IN (201374,201375,201369); +UPDATE `gameobject` SET `state` = '1' WHERE `id` IN (201374,201375,201369); +UPDATE `gameobject_template` SET `faction` = '114',`data0` = '0' WHERE `gameobject_template`.`entry` IN (201380,201381,201382,201383); +UPDATE `gameobject` SET `state` = '1' WHERE `id` IN (201380,201381,201382,201383); + -- Sindragosa -- UPDATE `creature_template` SET `ScriptName`='boss_sindragosa' WHERE `entry`= 37755; -- Lich King diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp index 65b26c3f6..3b3ec10c5 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp @@ -17,8 +17,9 @@ /* ScriptData SDName: blood_prince_council SD%Complete: 0% -SDComment: +SDComment: by /dev/rsa SDCategory: Icecrown Citadel EndScriptData */ #include "precompiled.h" +#include "def_spire.h" \ No newline at end of file diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp index 63c2cd908..291687ab4 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp @@ -17,8 +17,9 @@ /* ScriptData SDName: boss_festergut SD%Complete: 0% -SDComment: +SDComment: by /dev/rsa SDCategory: Icecrown Citadel EndScriptData */ #include "precompiled.h" +#include "def_spire.h" \ No newline at end of file diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp index 17dddc7f4..8714c7f86 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: boss_lady_deathwhisper -SD%Complete: 10% +SD%Complete: 20% SDComment: by /dev/rsa SDCategory: Icecrown Citadel EndScriptData */ diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp index 9a046f206..e618c199b 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: boss_lord_marrowgar -SD%Complete: 20% +SD%Complete: 30% SDComment: by /dev/rsa SDCategory: Icecrown Citadel EndScriptData */ diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp index 405e9896e..51aae74a1 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp @@ -17,8 +17,9 @@ /* ScriptData SDName: boss_proffesor_putricide SD%Complete: 0% -SDComment: +SDComment: by /dev/rsa SDCategory: Icecrown Citadel EndScriptData */ #include "precompiled.h" +#include "def_spire.h" \ No newline at end of file diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp index 58ec9f0c9..37f3cec3c 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp @@ -17,8 +17,9 @@ /* ScriptData SDName: boss_rotface SD%Complete: 0% -SDComment: +SDComment: by /dev/rsa SDCategory: Icecrown Citadel EndScriptData */ #include "precompiled.h" +#include "def_spire.h" \ No newline at end of file diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp index 528905ef0..2106ba4f2 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp @@ -16,9 +16,25 @@ /* ScriptData SDName: boss_valithria -SD%Complete: 0% -SDComment: +SD%Complete: 1% +SDComment: by /dev/rsa SDCategory: Icecrown Citadel EndScriptData */ #include "precompiled.h" +#include "def_spire.h" + +struct Locations +{ + float x, y, z; + uint32 id; +}; + +static Locations SpawnLoc[]= +{ + {4203.470215, 2484.500000, 364.872009}, // 0 Valithria + {4240.688477, 2405.794678, 364.868591}, // Room 1 + {4165.112305, 2405.872559, 364.872925}, // Room 2 + {4166.216797, 2564.197266, 364.873047}, // Room 3 + {4239.579102, 2566.753418, 364.868439}, // Room 4 +}; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h index 19ad1f1d1..41763864c 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h @@ -13,12 +13,16 @@ enum TYPE_SKULLS_PLATO = 3, TYPE_FLIGHT_WAR = 4, TYPE_SAURFANG = 5, + TYPE_FESTERGUT = 6, + TYPE_ROTFACE = 7, + TYPE_PUTRICIDE = 8, + TYPE_BLOOD_COUNCIL = 9, + TYPE_LANATHEL = 10, + TYPE_VALITHRIA = 11, + TYPE_SINDRAGOSA = 12, + TYPE_LICH_KING = 13, TYPE_FROSTWIRM_COUNT = 15, - BASE_CAMP = 1000, - FLIGHT_WAR_1 = 1001, - FLIGHT_WAR_2 = 1002, - NPC_LORD_MARROWGAR = 36612, NPC_LADY_DEATHWHISPER = 36855, NPC_DEATHBRINGER_SAURFANG = 37813, @@ -38,18 +42,34 @@ enum GO_ICEWALL_1 = 201911, GO_ICEWALL_2 = 201910, + GO_ORATORY_DOOR = 201563, - GO_SAURFANG_DOOR = 201825, GO_DEATHWHISPER_ELEVATOR = 202220, //5653 + + GO_SAURFANG_DOOR = 201825, + GO_ORANGE_PLAGUE = 201371, //72536 GO_GREEN_PLAGUE = 201370, //72537 + GO_SCIENTIST_DOOR_GREEN = 201614, //72530 GO_SCIENTIST_DOOR_ORANGE = 201613, //72531 GO_SCIENTIST_DOOR = 201372, //72541 + GO_CRIMSON_HALL_DOOR = 201376, //72532 GO_COUNCIL_DOOR_1 = 201377, //72533 GO_COUNCIL_DOOR_2 = 201378, //72534 + GO_GREEN_DRAGON_DOOR_1 = 201375, //1202 + GO_GREEN_DRAGON_DOOR_2 = 201374, //1200 + GO_VALITHRIA_DOOR_1 = 201380, //1618 + GO_VALITHRIA_DOOR_2 = 201382, //1482 + GO_VALITHRIA_DOOR_3 = 201383, //1335 + GO_VALITHRIA_DOOR_4 = 201381, //1558 + + GO_SINDRAGOSA_DOOR_1 = 201369, //1619 + + GO_FROZENTRONE_TR = 202223, //72061 + GO_SAURFANG_CACHE_10 = 202239, GO_SAURFANG_CACHE_25 = 202240, GO_SAURFANG_CACHE_10_H = 902241, //need correct! not in YTDB 533 diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp index 2cab9ba6c..5aa5a0a0e 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp @@ -84,7 +84,7 @@ struct MANGOS_DLL_DECL mob_spire_frostwyrmAI : public ScriptedAI wirmsdied=pInstance->GetData(TYPE_FROSTWIRM_COUNT); ++wirmsdied; pInstance->SetData(TYPE_FROSTWIRM_COUNT,wirmsdied); - if (pInstance->GetData(TYPE_FROSTWIRM_COUNT) == 8 ) pInstance->SetData(TYPE_FLIGHT_WAR,DONE); + if (pInstance->GetData(TYPE_FROSTWIRM_COUNT) >= 8 ) pInstance->SetData(TYPE_FLIGHT_WAR,DONE); } } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp index ff0b354b9..d931c1349 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp @@ -40,12 +40,14 @@ struct Locations static Locations PortalLoc[]= { -{"Молот света",-17.1928, 2211.44, 30.1158,1,true,true,TYPE_TELEPORT}, // -{"Шпиль",-503.62, 2211.47, 62.8235,0,false,true,TYPE_MARROWGAR}, // -{"Черепной вал",-615.145, 2211.47, 199.972,3,false,true,TYPE_DEATHWHISPER}, // -{"Воздушное сражение",-209.5, 2211.91, 199.97,4,false,true,TYPE_SKULLS_PLATO}, // -{"Подъем смертоносного",-549.131, 2211.29, 539.291,2,false,true,TYPE_FLIGHT_WAR}, // +{"Молот света",-17.1928, 2211.44, 30.1158,0,true,true,TYPE_TELEPORT}, // +{"Шпиль",-503.62, 2211.47, 62.8235,1,false,true,TYPE_MARROWGAR}, // +{"Черепной вал",-615.145, 2211.47, 199.972,2,false,true,TYPE_DEATHWHISPER}, // +{"Воздушное сражение",-209.5, 2211.91, 199.97,3,false,true,TYPE_SKULLS_PLATO}, // +{"Подъем смертоносного",-549.131, 2211.29, 539.291,4,false,true,TYPE_FLIGHT_WAR}, // {"Цитадель ледяной короны",4198.42, 2769.22, 351.065,5,false,false,TYPE_SAURFANG}, // +{"Святилище крови",4490.205566, 2769.275635, 403.983765,6,false,false,TYPE_BLOOD_COUNCIL}, // +{"Логово Королевы льда",4356.236816, 2402.573242, 220.462540,7,false,false,TYPE_VALITHRIA}, // }; @@ -82,7 +84,7 @@ bool GOHello_go_icecrown_teleporter(Player *player, GameObject* pGo) bool m_bIsRegularMode = pGo->GetMap()->IsRegularDifficulty(); - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, "No message", GOSSIP_SENDER_MAIN, BASE_CAMP); + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, "No message", GOSSIP_SENDER_MAIN, 0); player->SEND_GOSSIP_MENU(GO_TELEPORT_GOSSIP_MESSAGE, pGo->GetGUID()); return true; } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp index 04d2fc7fd..819a025f4 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp @@ -48,9 +48,25 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance uint64 m_uiIcewall1GUID; uint64 m_uiIcewall2GUID; uint64 m_uiSaurfangDoorGUID; + uint64 m_uiOratoryDoorGUID; + uint64 m_uiDeathWhisperElevatorGUID; + uint64 m_uiOrangePlagueGUID; + uint64 m_uiGreenPlagueGUID; + uint64 m_uiSDoorGreenGUID; + uint64 m_uiSDoorOrangeGUID; + uint64 m_uiScientistDoorGUID; + uint64 m_uiCrimsonDoorGUID; + uint64 m_uiCounsilDoor1GUID; + uint64 m_uiCounsilDoor2GUID; + uint64 m_uiGreenDragonDoor1GUID; + uint64 m_uiGreenDragonDoor2GUID; + uint64 m_uiValithriaDoor1GUID; + uint64 m_uiValithriaDoor2GUID; + uint64 m_uiValithriaDoor3GUID; + uint64 m_uiValithriaDoor4GUID; + uint64 m_uiSaurfangCacheGUID; uint64 m_uiGunshipArmoryGUID; - uint64 m_uiDeathWhisperElevatorGUID; void OpenDoor(uint64 guid) { @@ -137,12 +153,57 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance case GO_ICEWALL_2: m_uiIcewall2GUID = pGo->GetGUID(); break; - case GO_SAURFANG_DOOR: - m_uiSaurfangDoorGUID = pGo->GetGUID(); + case GO_ORATORY_DOOR: + m_uiOratoryDoorGUID = pGo->GetGUID(); break; case GO_DEATHWHISPER_ELEVATOR: m_uiDeathWhisperElevatorGUID = pGo->GetGUID(); break; + case GO_SAURFANG_DOOR: + m_uiSaurfangDoorGUID = pGo->GetGUID(); + break; + case GO_ORANGE_PLAGUE: + m_uiOrangePlagueGUID = pGo->GetGUID(); + break; + case GO_GREEN_PLAGUE: + m_uiGreenPlagueGUID = pGo->GetGUID(); + break; + case GO_SCIENTIST_DOOR_GREEN: + m_uiSDoorGreenGUID = pGo->GetGUID(); + break; + case GO_SCIENTIST_DOOR_ORANGE: + m_uiSDoorOrangeGUID = pGo->GetGUID(); + break; + case GO_SCIENTIST_DOOR: + m_uiScientistDoorGUID = pGo->GetGUID(); + break; + case GO_CRIMSON_HALL_DOOR: + m_uiCrimsonDoorGUID = pGo->GetGUID(); + break; + case GO_COUNCIL_DOOR_1: + m_uiCounsilDoor1GUID = pGo->GetGUID(); + break; + case GO_COUNCIL_DOOR_2: + m_uiCounsilDoor2GUID = pGo->GetGUID(); + break; + case GO_GREEN_DRAGON_DOOR_1: + m_uiGreenDragonDoor1GUID = pGo->GetGUID(); + break; + case GO_GREEN_DRAGON_DOOR_2: + m_uiGreenDragonDoor2GUID = pGo->GetGUID(); + break; + case GO_VALITHRIA_DOOR_1: + m_uiValithriaDoor1GUID = pGo->GetGUID(); + break; + case GO_VALITHRIA_DOOR_2: + m_uiValithriaDoor2GUID = pGo->GetGUID(); + break; + case GO_VALITHRIA_DOOR_3: + m_uiValithriaDoor3GUID = pGo->GetGUID(); + break; + case GO_VALITHRIA_DOOR_4: + m_uiValithriaDoor4GUID = pGo->GetGUID(); + break; case GO_SAURFANG_CACHE_10: if(Difficulty == RAID_DIFFICULTY_10MAN_NORMAL) m_uiSaurfangCacheGUID = pGo->GetGUID(); @@ -207,15 +268,14 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance } break; case TYPE_FLIGHT_WAR: - m_auiEncounter[4] = uiData; - if (uiData == DONE) { + if (uiData == DONE && m_auiEncounter[4] != DONE ) { if (GameObject* pChest = instance->GetGameObject(m_uiGunshipArmoryGUID)) if (pChest && !pChest->isSpawned()) { pChest->SetRespawnTime(7*DAY); // pChest->SetGoState(GO_STATE_ACTIVE); }; + m_auiEncounter[4] = uiData; }; - m_auiEncounter[0] = TYPE_FLIGHT_WAR; break; case TYPE_FROSTWIRM_COUNT: m_auiEncounter[15] = uiData; @@ -231,7 +291,30 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance // pChest->SetGoState(GO_STATE_ACTIVE); }; }; -// m_auiEncounter[0] = TYPE_SAURFANG; + break; + case TYPE_FESTERGUT: + m_auiEncounter[6] = uiData; + break; + case TYPE_ROTFACE: + m_auiEncounter[7] = uiData; + break; + case TYPE_PUTRICIDE: + m_auiEncounter[8] = uiData; + break; + case TYPE_BLOOD_COUNCIL: + m_auiEncounter[9] = uiData; + break; + case TYPE_LANATHEL: + m_auiEncounter[10] = uiData; + break; + case TYPE_VALITHRIA: + m_auiEncounter[11] = uiData; + break; + case TYPE_SINDRAGOSA: + m_auiEncounter[12] = uiData; + break; + case TYPE_LICH_KING: + m_auiEncounter[13] = uiData; break; } From db9af259cdc71b26e57bc179edf77a2f242ab18b Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Mon, 1 Mar 2010 18:53:32 +0300 Subject: [PATCH 170/405] Next part of icecrown change --- .../icecrown_citadel/boss_festergut.cpp | 151 +++++++++++++++++- .../boss_valithria_dreamwalker.cpp | 6 - .../icecrown_citadel/def_spire.h | 30 ++++ .../icecrown_citadel/icecrown_teleport.cpp | 8 +- .../instance_icecrown_spire.cpp | 1 + 5 files changed, 184 insertions(+), 12 deletions(-) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp index 291687ab4..cfb93f7c1 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp @@ -16,10 +16,157 @@ /* ScriptData SDName: boss_festergut -SD%Complete: 0% +SD%Complete: 1% SDComment: by /dev/rsa SDCategory: Icecrown Citadel EndScriptData */ #include "precompiled.h" -#include "def_spire.h" \ No newline at end of file +#include "def_spire.h" +enum +{ + TYPE_BOSS = TYPE_FESTERGUT, + +}; +enum BossSpells +{ + SPELL_GASEOUS_BLIGHT_0, + SPELL_GASEOUS_BLIGHT_1, + SPELL_GASEOUS_BLIGHT_2, + SPELL_INHALE_BLIGHT, + SPELL_INHALED_BLIGHT, + SPELL_PUNGENT_BLIGHT, + SPELL_GAS_SPORE, + SPELL_INOCULATE, + SPELL_GASTRIC_BLOAT, + SPELL_GASTRIC_EXPLOSION, + SPELL_VILE_GAS, + SPELL_BERSERK, + BOSS_SPELL_COUNT +}; +static SpellTable m_BossSpell[]= +{ +// Name 10 25 10H 25H +{SPELL_GASEOUS_BLIGHT_0, 70138, 70140, 70140, 70137, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, +{SPELL_GASEOUS_BLIGHT_1, 69161, 70139, 70139, 70140, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, +{SPELL_GASEOUS_BLIGHT_2, 70468, 69161, 69161, 70139, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, +{SPELL_INHALE_BLIGHT, 69165, 69165, 69165, 69165, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, +{SPELL_INHALED_BLIGHT, 71912, 71912, 71912, 71912, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, true, false}, +{SPELL_PUNGENT_BLIGHT, 69195, 73031, 71219, 73032, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, +{SPELL_GAS_SPORE, 69279, 69279, 69279, 69279, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, true, false}, +{SPELL_INOCULATE, 72103, 72103, 72103, 72103, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, +{SPELL_GASTRIC_BLOAT, 72219, 72551, 72551, 72553, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, +{SPELL_GASTRIC_EXPLOSION,72227, 72227, 72229, 72230, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, +{SPELL_VILE_GAS, 72272, 72273, 72273, 73020, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, +{SPELL_BERSERK, 47008, 47008, 47008, 47008, 300000, 300000, 300000, 300000, 300000, 300000, 300000, 300000, 65535, CAST_ON_SELF, false, false}, +}; + +struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI +{ + boss_festergutAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + uint8 Difficulty; + ScriptedInstance *pInstance; + uint32 m_uiSpell_Timer[BOSS_SPELL_COUNT]; + uint8 stage; + uint8 substage; + + void Reset() + { + if(!pInstance) return; + Difficulty = pInstance->GetData(DIFFICULTY); + pInstance->SetData(TYPE_BOSS, NOT_STARTED); + if (!Difficulty) Difficulty = 0; + memset(&m_uiSpell_Timer, 0, sizeof(m_uiSpell_Timer)); + } + + bool QuerySpellPeriod(uint32 m_uiSpellIdx, uint32 diff) + { + if(!pInstance) return false; + bool result; + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + if (m_uiSpellIdx != pSpell->id) return false; + if (m_uiSpell_Timer[m_uiSpellIdx] < diff && m_uiSpell_Timer[m_uiSpellIdx] != 0) { + m_uiSpell_Timer[m_uiSpellIdx]=urand(pSpell->m_uiSpellTimerMin[Difficulty],pSpell->m_uiSpellTimerMax[Difficulty]); + result = true; + } else { + m_uiSpell_Timer[m_uiSpellIdx] -= diff; + result = false; + }; + return result; + } + + bool CastBossSpell(uint32 m_uiSpellIdx) + { + if(!pInstance) return false; + Unit* pTarget; + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + // Find spell index - temporary direct insert from spelltable + if (m_uiSpellIdx != pSpell->id) return false; + + switch (pSpell->m_CastTarget) { + case CAST_ON_SUMMONS: + pTarget = m_creature->getVictim(); //CHANGE IT!!! + break; + case CAST_ON_VICTIM: + pTarget = m_creature->getVictim(); + break; + case CAST_ON_RANDOM: + pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); + break; + case CAST_ON_BOTTOMAGGRO: + pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1); + break; + + }; + if (pTarget) DoCastSpellIfCan(pTarget,pSpell->m_uiSpellEntry[Difficulty]); + } + + void Aggro(Unit *who) + { + if(pInstance) pInstance->SetData(TYPE_BOSS, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_BOSS, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + switch(stage) + { + case 0: { + if (QuerySpellPeriod(SPELL_GASEOUS_BLIGHT_0, diff)) + CastBossSpell(SPELL_GASEOUS_BLIGHT_0); + break;} + case 1: { + break;} + } + + DoMeleeAttackIfReady(); + } +}; + + +CreatureAI* GetAI_boss_festergut(Creature* pCreature) +{ + return new boss_festergutAI(pCreature); +} + + +void AddSC_boss_festergut() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_festergut"; + newscript->GetAI = &GetAI_boss_festergut; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp index 2106ba4f2..404198223 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp @@ -24,12 +24,6 @@ EndScriptData */ #include "precompiled.h" #include "def_spire.h" -struct Locations -{ - float x, y, z; - uint32 id; -}; - static Locations SpawnLoc[]= { {4203.470215, 2484.500000, 364.872009}, // 0 Valithria diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h index 41763864c..88f174c61 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h @@ -4,6 +4,7 @@ enum { + DIFFICULTY = 1001, MAP_NUM = 631, MAX_ENCOUNTERS = 16, @@ -81,4 +82,33 @@ enum GO_GUNSHIP_ARMORY_25_H = 202180, }; +struct Locations +{ + float x, y, z; + uint32 id; +}; + +enum SpellTableParameters +{ + DIFFICULTY_LEVELS = 4, + CAST_ON_SELF = 1000, + CAST_ON_SUMMONS, + CAST_ON_VICTIM, + CAST_ON_RANDOM, + CAST_ON_BOTTOMAGGRO, + +}; + +struct SpellTable +{ + uint32 id; + uint32 m_uiSpellEntry[DIFFICULTY_LEVELS]; // Stores spell entry for difficulty levels + uint32 m_uiSpellTimerMin[DIFFICULTY_LEVELS]; // The timer (min) before the next spell casting, in milliseconds + uint32 m_uiSpellTimerMax[DIFFICULTY_LEVELS]; // The timer (max) before the next spell casting + uint32 m_uiStageMask; // The mask of stages where spell is casted + uint32 m_CastTarget; // Target on casting spell + bool m_IsVisualEffect; // Spellcasting is visual effect or real effect + bool m_IsBugged; // Need override for this spell +}; + #endif diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp index d931c1349..dc92856cf 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp @@ -25,10 +25,10 @@ EndScriptData */ enum { -PORTALS_COUNT = 6 +PORTALS_COUNT = 8 }; -struct Locations +struct t_Locations { char const* name; float x, y, z; @@ -38,14 +38,14 @@ struct Locations uint32 encounter; }; -static Locations PortalLoc[]= +static t_Locations PortalLoc[]= { {"Молот света",-17.1928, 2211.44, 30.1158,0,true,true,TYPE_TELEPORT}, // {"Шпиль",-503.62, 2211.47, 62.8235,1,false,true,TYPE_MARROWGAR}, // {"Черепной вал",-615.145, 2211.47, 199.972,2,false,true,TYPE_DEATHWHISPER}, // {"Воздушное сражение",-209.5, 2211.91, 199.97,3,false,true,TYPE_SKULLS_PLATO}, // {"Подъем смертоносного",-549.131, 2211.29, 539.291,4,false,true,TYPE_FLIGHT_WAR}, // -{"Цитадель ледяной короны",4198.42, 2769.22, 351.065,5,false,false,TYPE_SAURFANG}, // +{"Цитадель Ледяной Короны",4198.42, 2769.22, 351.065,5,false,false,TYPE_SAURFANG}, // {"Святилище крови",4490.205566, 2769.275635, 403.983765,6,false,false,TYPE_BLOOD_COUNCIL}, // {"Логово Королевы льда",4356.236816, 2402.573242, 220.462540,7,false,false,TYPE_VALITHRIA}, // }; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp index 819a025f4..5bec84fa1 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp @@ -343,6 +343,7 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance { switch(uiType) { + case DIFFICULTY: return Difficulty; case TYPE_TELEPORT: return m_auiEncounter[0]; case TYPE_MARROWGAR: return m_auiEncounter[1]; case TYPE_DEATHWHISPER: return m_auiEncounter[2]; From 2352535aaa26570c4bf9da2e3c4dc852e669eed9 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 3 Mar 2010 18:57:05 +0300 Subject: [PATCH 171/405] Trial of the crusader dialogs patially added --- addition/724_trial_of_crusader_mangos.sql | 136 +--- addition/724_trial_of_crusader_scriptdev2.sql | 70 ++ .../boss_argent_challenge.cpp | 4 +- .../boss_black_knight.cpp | 4 +- .../boss_grand_champions.cpp | 4 +- .../instance_trial_of_the_champion.cpp | 4 +- .../trial_of_the_champion.cpp | 2 +- .../instance_trial_of_the_crusader.cpp | 121 ++- .../trial_of_the_crusader.cpp | 740 ++++++++++++++---- .../trial_of_the_crusader.h | 54 +- 10 files changed, 812 insertions(+), 327 deletions(-) create mode 100644 addition/724_trial_of_crusader_scriptdev2.sql diff --git a/addition/724_trial_of_crusader_mangos.sql b/addition/724_trial_of_crusader_mangos.sql index 8bc9ac403..e2b9e1562 100644 --- a/addition/724_trial_of_crusader_mangos.sql +++ b/addition/724_trial_of_crusader_mangos.sql @@ -6,6 +6,11 @@ DELETE FROM `creature` WHERE `map` = 649 AND `id` IN -- announcers UPDATE `creature_template` SET `npcflag`=1, `scriptname`='npc_toc_announcer' WHERE `entry`=34816; +UPDATE `creature_template` SET `scriptname`='boss_lich_king_toc' WHERE `entry`=35877; +UPDATE `creature_template` SET `scriptname`='npc_fizzlebang_toc' WHERE `entry`=35458; +UPDATE `creature_template` SET `scriptname`='npc_tirion_toc' WHERE `entry`=34996; +UPDATE `creature_template` SET `scriptname`='npc_garrosh_toc' WHERE `entry`=34995; +UPDATE `creature_template` SET `scriptname`='npc_rinn_toc' WHERE `entry`=34990; -- grand crusaders -- UPDATE `creature_template` SET `scriptname`='mob_toc_warrior' WHERE entry IN (); @@ -54,141 +59,12 @@ UPDATE `creature_template` SET `lootid`= 0 WHERE `entry` IN DELETE FROM `creature_loot_template` WHERE `entry` IN (34796,34799,35144); -INSERT IGNORE INTO `creature_loot_template` (`entry`, `item`, `ChanceOrQuestChance`, `groupid`, `mincountOrRef`, `maxcount`, `lootcondition`, `condition_value1`, `condition_value2`) VALUES -(34797, 47241, 100, 0, 3, 3, 0, 0, 0), -(34797, 47578, 0, 2, 1, 1, 6, 469, 0), -(34797, 47607, 0, 2, 1, 1, 6, 469, 0), -(34797, 47608, 0, 2, 1, 1, 6, 469, 0), -(34797, 47609, 0, 1, 1, 1, 6, 469, 0), -(34797, 47611, 0, 1, 1, 1, 6, 469, 0), -(34797, 47612, 0, 1, 1, 1, 6, 469, 0), -(34797, 47613, 0, 2, 1, 1, 6, 469, 0), -(34797, 47614, 0, 1, 1, 1, 6, 469, 0), -(34797, 47615, 0, 1, 1, 1, 6, 469, 0), -(34797, 47616, 0, 2, 1, 1, 6, 469, 0), -(34797, 47617, 0, 2, 1, 1, 6, 469, 0), -(34797, 47849, 0, 4, 1, 1, 6, 67, 0), -(34797, 47850, 0, 3, 1, 1, 6, 67, 0), -(34797, 47851, 0, 3, 1, 1, 6, 67, 0), -(34797, 47852, 0, 3, 1, 1, 6, 67, 0), -(34797, 47853, 0, 4, 1, 1, 6, 67, 0), -(34797, 47854, 0, 4, 1, 1, 6, 67, 0), -(34797, 47855, 0, 4, 1, 1, 6, 67, 0), -(34797, 47856, 0, 3, 1, 1, 6, 67, 0), -(34797, 47857, 0, 4, 1, 1, 6, 67, 0), -(34797, 47858, 0, 3, 1, 1, 6, 67, 0), -(34797, 47859, 0, 3, 1, 1, 6, 67, 0), -(34797, 47860, 0, 4, 1, 1, 6, 67, 0); -UPDATE `creature_template` SET `lootid` = 34797 WHERE `entry` = 34797; - - -- Jaraxxus -- UPDATE creature_template SET scriptname='boss_jaraxxus' WHERE entry=34780; -INSERT IGNORE INTO `creature_loot_template` (`entry`, `item`, `ChanceOrQuestChance`, `groupid`, `mincountOrRef`, `maxcount`, `lootcondition`, `condition_value1`, `condition_value2`) VALUES -(34780, 47241, 100, 0, 3, 3, 0, 0, 0), -(34780, 47618, 0, 2, 1, 1, 6, 469, 0), -(34780, 47619, 0, 2, 1, 1, 6, 469, 0), -(34780, 47620, 0, 2, 1, 1, 6, 469, 0), -(34780, 47621, 0, 1, 1, 1, 6, 469, 0), -(34780, 47663, 0, 2, 1, 1, 6, 469, 0), -(34780, 47669, 0, 2, 1, 1, 6, 469, 0), -(34780, 47676, 0, 1, 1, 1, 6, 469, 0), -(34780, 47679, 0, 2, 1, 1, 6, 469, 0), -(34780, 47680, 0, 1, 1, 1, 6, 469, 0), -(34780, 47683, 0, 1, 1, 1, 6, 469, 0), -(34780, 47703, 0, 2, 1, 1, 6, 469, 0), -(34780, 47711, 0, 1, 1, 1, 6, 469, 0), -(34780, 47861, 0, 4, 1, 1, 6, 67, 0), -(34780, 47862, 0, 4, 1, 1, 6, 67, 0), -(34780, 47863, 0, 4, 1, 1, 6, 67, 0), -(34780, 47864, 0, 4, 1, 1, 6, 67, 0), -(34780, 47865, 0, 4, 1, 1, 6, 67, 0), -(34780, 47866, 0, 3, 1, 1, 6, 67, 0), -(34780, 47867, 0, 3, 1, 1, 6, 67, 0), -(34780, 47868, 0, 4, 1, 1, 6, 67, 0), -(34780, 47869, 0, 3, 1, 1, 6, 67, 0), -(34780, 47870, 0, 3, 1, 1, 6, 67, 0), -(34780, 47871, 0, 3, 1, 1, 6, 67, 0), -(34780, 47872, 0, 4, 1, 1, 6, 67, 0), -(34780, 49235, 0, 1, 1, 1, 6, 469, 0), -(34780, 49236, 0, 3, 1, 1, 6, 67, 0); -UPDATE `creature_template` SET `lootid` = 34780 WHERE `entry` = 34780; - -- Froja's -- UPDATE creature_template SET scriptname='boss_lightbane' WHERE entry=34497; -- UPDATE creature_template SET scriptname='boss_darkbane' WHERE entry=34496; -INSERT IGNORE INTO `creature_loot_template` (`entry`, `item`, `ChanceOrQuestChance`, `groupid`, `mincountOrRef`, `maxcount`, `lootcondition`, `condition_value1`, `condition_value2`) VALUES -(34497, 47241, 100, 0, 3, 3, 0, 0, 0), -(34497, 47700, 0, 1, 1, 1, 6, 469, 0), -(34497, 47736, 0, 1, 1, 1, 6, 469, 0), -(34497, 47737, 0, 1, 1, 1, 6, 469, 0), -(34497, 47738, 0, 2, 1, 1, 6, 67, 0), -(34497, 47739, 0, 1, 1, 1, 6, 469, 0), -(34497, 47740, 0, 1, 1, 1, 6, 469, 0), -(34497, 47883, 0, 2, 1, 1, 6, 67, 0), -(34497, 47884, 0, 2, 1, 1, 6, 67, 0), -(34497, 47885, 0, 1, 1, 1, 6, 469, 0), -(34497, 47886, 0, 2, 1, 1, 6, 67, 0), -(34497, 47887, 0, 2, 1, 1, 6, 67, 0), -(34497, 47888, 0, 2, 1, 1, 6, 67, 0); -UPDATE `creature_template` SET `lootid` = 34497 WHERE `entry` = 34497; - -INSERT IGNORE INTO `creature_loot_template` (`entry`, `item`, `ChanceOrQuestChance`, `groupid`, `mincountOrRef`, `maxcount`, `lootcondition`, `condition_value1`, `condition_value2`) VALUES -(34496, 47241, 100, 0, 3, 3, 0, 0, 0), -(34496, 47742, 0, 1, 1, 1, 6, 469, 0), -(34496, 47743, 0, 1, 1, 1, 6, 469, 0), -(34496, 47744, 0, 1, 1, 1, 6, 469, 0), -(34496, 47745, 0, 2, 1, 1, 6, 67, 0), -(34496, 47746, 0, 1, 1, 1, 6, 469, 0), -(34496, 47747, 0, 1, 1, 1, 6, 469, 0), -(34496, 47889, 0, 1, 1, 1, 6, 469, 0), -(34496, 47890, 0, 2, 1, 1, 6, 67, 0), -(34496, 47891, 0, 2, 1, 1, 6, 67, 0), -(34496, 47892, 0, 2, 1, 1, 6, 67, 0), -(34496, 47893, 0, 2, 1, 1, 6, 67, 0), -(34496, 49231, 0, 2, 1, 1, 6, 67, 0), -(34496, 49232, 0, 1, 1, 1, 6, 469, 0); -UPDATE `creature_template` SET `lootid` = 34496 WHERE `entry` = 34496; - -- Anub'arak -- UPDATE creature_template SET scriptname='boss_anubarak' WHERE entry=34564; -INSERT IGNORE INTO `creature_loot_template` (`entry`, `item`, `ChanceOrQuestChance`, `groupid`, `mincountOrRef`, `maxcount`, `lootcondition`, `condition_value1`, `condition_value2`) VALUES -(34564, 47241, 100, 0, 3, 3, 0, 0, 0), -(34564, 47741, 0, 1, 1, 1, 6, 469, 0), -(34564, 47808, 0, 1, 1, 1, 6, 469, 0), -(34564, 47809, 0, 1, 1, 1, 6, 469, 0), -(34564, 47810, 0, 2, 1, 1, 6, 469, 0), -(34564, 47811, 0, 3, 1, 1, 6, 469, 0), -(34564, 47812, 0, 1, 1, 1, 6, 469, 0), -(34564, 47813, 0, 3, 1, 1, 6, 469, 0), -(34564, 47814, 0, 2, 1, 1, 6, 469, 0), -(34564, 47815, 0, 2, 1, 1, 6, 469, 0), -(34564, 47816, 0, 1, 1, 1, 6, 469, 0), -(34564, 47829, 0, 3, 1, 1, 6, 469, 0), -(34564, 47830, 0, 2, 1, 1, 6, 469, 0), -(34564, 47832, 0, 3, 1, 1, 6, 469, 0), -(34564, 47834, 0, 1, 1, 1, 6, 469, 0), -(34564, 47835, 0, 2, 1, 1, 6, 469, 0), -(34564, 47836, 0, 2, 1, 1, 6, 469, 0), -(34564, 47837, 0, 3, 1, 1, 6, 469, 0), -(34564, 47838, 0, 3, 1, 1, 6, 469, 0), -(34564, 47894, 0, 4, 1, 1, 6, 67, 0), -(34564, 47895, 0, 4, 1, 1, 6, 67, 0), -(34564, 47896, 0, 6, 1, 1, 6, 67, 0), -(34564, 47897, 0, 6, 1, 1, 6, 67, 0), -(34564, 47898, 0, 4, 1, 1, 6, 67, 0), -(34564, 47899, 0, 5, 1, 1, 6, 67, 0), -(34564, 47900, 0, 5, 1, 1, 6, 67, 0), -(34564, 47901, 0, 6, 1, 1, 6, 67, 0), -(34564, 47902, 0, 5, 1, 1, 6, 67, 0), -(34564, 47903, 0, 5, 1, 1, 6, 67, 0), -(34564, 47904, 0, 6, 1, 1, 6, 67, 0), -(34564, 47905, 0, 4, 1, 1, 6, 67, 0), -(34564, 47906, 0, 6, 1, 1, 6, 67, 0), -(34564, 47907, 0, 4, 1, 1, 6, 67, 0), -(34564, 47908, 0, 5, 1, 1, 6, 67, 0), -(34564, 47909, 0, 6, 1, 1, 6, 67, 0), -(34564, 47910, 0, 5, 1, 1, 6, 67, 0), -(34564, 47911, 0, 4, 1, 1, 6, 67, 0); -UPDATE `creature_template` SET `lootid` = 34564 WHERE `entry` = 34564; + diff --git a/addition/724_trial_of_crusader_scriptdev2.sql b/addition/724_trial_of_crusader_scriptdev2.sql new file mode 100644 index 000000000..44d522fe4 --- /dev/null +++ b/addition/724_trial_of_crusader_scriptdev2.sql @@ -0,0 +1,70 @@ +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1713799 AND -1713499; +INSERT INTO `script_texts` +(`comment`,`sound`, `entry`,`content_loc8`,`type`,`language`,`emote`,`content_default`) VALUES +('34996','16036','-1713500','Добро пожаловать, герои! Вы услышали призыв Серебряного Авангарда и без колебаний откликнулись на него! В этом колизее вам предстоит сразиться с опаснейшими противниками. Те из вас, кто смогут пережить испытания, войдут в ряды Серебряного Авангарда, который направится в Цитадель Ледяной Короны.','0','0','0',''), +('34996','16038','-1713501','Из самых глубоких и темных пещер Грозовой Гряды был призван Гормок Пронзающий Бивень! В бой, герои!','0','0','0',''), +('34990','16069','-1713502','Твои чудовища не чета героям Альянса, Тирион!','0','0','0',''), +('34995','16069','-1713702','Твои чудовища не чета героям Орды, Тирион!','0','0','0',''), +('34996','16039','-1713503','Приготовьтесь к схватке с близнецами-чудовищами, Кислотной Утробой и Жуткой Чешуей!','0','0','0',''), +('34799','0','-1713504','После гибели товарища %s приходит в ярость!','0','0','0',''), +('34996','16040','-1713505','В воздухе повеяло ледяным дыханием следующего бойца: на арену выходит Ледяной Рев! Сражайтесь или погибните, чемпионы!','0','0','0',''), +('34797','0','-1713506','%s глядит на |3-3($n) и испускает гортанный вой!','0','0','0',''), +('34797','0','-1713507','%s врезается в стену Колизея и теряет ориентацию!','0','0','0',''), +('34797','0','-1713508','|3-3(%s) охватывает кипящая ярость, и он растаптывает всех на своем пути!','0','0','0',''), +('34996','16041','-1713509','Все чудовища повержены!','0','0','0',''), +('34996','16043','-1713510','Сейчас великий чернокнижник Вилфред Непопамс призовет вашего нового противника. Готовьтесь к бою!','0','0','0',''), +('35458','16268','-1713511','Благодарю, Верховный лорд. А теперь, смельчаки, я приступаю к ритуалу призыва. Когда я закончу, появится грозный демон!','0','0','0',''), +('35458','16269','-1713512','Готовьтесь к забвению!','0','0','0',''), +('35458','16270','-1713513','АГА! Получилось! Трепещи перед всевластным Вилфредом Непопамсом, мастером призыва! Ты покорен мне, демон!','0','0','0',''), +('34780','16143','-1713514','Ничтожный гном! Тебя погубит твоя самоуверенность!','0','0','0',''), +('35458','16271','-1713515','Тут я главный...','0','0','0',''), +('34996','16044','-1713516','Быстрей, герои, расправьтесь с повелителем демонов, прежде чем он откроет портал в свое темное царство!','0','0','0',''), +('34780','16144','-1713517','Перед вами Джараксус, эредарский повелитель Пылающего Легиона!','0','0','0',''), +('34780','0','-1713518','На вас направлено |cFFFF0000Пламя Легиона!|r','0','0','0',''), +('34780','0','-1713519','%s создает врата Пустоты!','0','0','0',''), +('34780','0','-1713520','%s создает |cFF00FF00Вулкан инферналов!|r','0','0','0',''), +('34780','16150','-1713521','Явись, сестра! Господин зовет!','0','0','0',''), +('34780','0','-1713522','$n $gподвергся:подверглась; |cFF00FFFFИспепелению плоти!|r Исцелите $gего:ее;!','0','0','0',''), +('34780','16149','-1713523','ПЛОТЬ ОТ КОСТИ!','0','0','0',''), +('34780','16151','-1713524','ИНФЕРНАЛ!','0','0','0',''), +('34780','16147','-1713525','Мое место займут другие. Ваш мир обречен...','0','0','0',''), +('34996','16045','-1713526','Гибель Вилфреда Непопамса весьма трагична и должна послужить уроком тем, кто смеет беспечно играть с темной магией. К счастью, вы победили демона, и теперь вас ждет новый противник.','0','0','0',''), +('34995','16021','-1713527','Подлые собаки Альянса! Вы выпустили повелителя демонов на воинов Орды? Ваша смерть будет быстрой!','0','0','0',''), +('34990','16064','-1713528','Альянсу не нужна помощь повелителя демонов, чтобы справиться с ордынским отродьем, пес!','0','0','0',''), +('34996','16046','-1713529','Тише! Успокойтесь! Никакого заговора здесь нет. Чернокнижник заигрался и поплатился за это. Турнир продолжается!','0','0','0',''), +('34996','16047','-1713530','В следующем бою вы встретитесь с могучими рыцарями Серебряного Авангарда! Лишь победив их, вы заслужите достойную награду.','0','0','0',''), +('34995','16023','-1713531','Орда требует справедливости! Мы вызываем Альянс на бой! Позволь нам встать на место твоих рыцарей, паладин. Мы покажем этим псам, как оскорблять Орду!','0','0','0',''), +('34996','16048','-1713532','Хорошо. Да будет так. Сражайтесь с честью!','0','0','0',''), +('34995','16022','-1713533','Не щадите никого, герои Орды! ЛОК-ТАР ОГАР!','0','0','0',''), +('34990','16067','-1713534','СЛАВА АЛЬЯНСУ!','0','0','0',''), +('34996','16049','-1713535','Пустая и горькая победа. После сегодняшних потерь мы стали слабее как целое. Кто еще, кроме Короля-лича, выиграет от подобной глупости? Пали великие воины. И ради чего? Истинная опасность еще впереди - нас ждет битва с Королем-личом.','0','0','0',''), +('34996','16050','-1713536','Лишь сплотившись, вы сможете пройти последнее испытание. Из глубин Ледяной Короны навстречу вам подымаются две могучие воительницы Плети: жуткие валькирии, крылатые вестницы Короля-лича!','0','0','0',''), +('34996','16037','-1713537','Пусть состязания начнутся!','0','0','0',''), +('34497','0','-1713538','%s начинает читать заклинание|cFFFFFFFFСветлая воронка!|r Переключение к |cFFFFFFFFСветлой|r сущности!','0','0','0',''), +('34497','0','-1713539','%s начинает читать заклинание Договор близнецов!','0','0','0',''), +('34496','0','-1713540','%s начинает читать заклинание |cFF9932CDТемная воронка!|r Переключение к |cFF9932CDТемной|r сущности!','0','0','0',''), +('34497','16272','-1713541','Во имя темного повелителя. Во имя Короля-лича. Вы. Умрете.','0','0','0',''), +('34496','16279','-1713542','Да поглотит вас Свет!','0','0','0',''), +('34496','16277','-1713543','Пустое место!','0','0','0',''), +('34497','16276','-1713544','Тебя оценили и признали ничтожеством.','0','0','0',''), +('34497','16274','-1713545','ХАОС!','0','0','0',''), +('34496','16278','-1713546','Да поглотит вас Тьма!','0','0','0',''), +('34496','16275','-1713547','Плеть не остановить...','0','0','0',''), +('34990','16068','-1713548','Против Альянса не выстоять даже самым сильным прислужникам Короля-лича! Все славьте наших героев!','0','0','0',''), +('34996','16051','-1713549','Король-лич понес тяжелую потерю! Вы проявили себя как бесстрашные герои Серебряного Авангарда! Мы вместе нанесем удар по Цитадели Ледяной Короны и разнесем в клочья остатки Плети! Нет такого испытания, которое мы бы не могли пройти сообща!','0','0','0',''), +('16980','16321','-1713550','Будет тебе такое испытание, Фордринг.','0','0','0',''), +('34996','16052','-1713551','Артас! Нас гораздо больше! Сложи Ледяную Скорбь, и я подарю тебе заслуженную смерть.','0','0','0',''), +('35877','16322','-1713552','Нерубианцы воздвигли целую империю под льдами Нордскола. Империю, на которой вы так бездумно построили свои дома. МОЮ ИМПЕРИЮ.','0','0','0',''), +('16980','16323','-1713553','Души твоих павших чемпионов будут принадлежать мне, Фордринг.','0','0','0',''), +('34564','16235','-1713554','А вот и гости заявились, как и обещал господин.','0','0','0',''), +('34564','16234','-1713555','Это место станет вашей могилой!','0','0','0',''), +('34564','16240','-1713556','Ауум на-л ак-к-к-к, ишшш. Вставайте, слуги мои. Время пожирать...','0','0','0',''), +('34564','0','-1713557','%s зарывается в землю!','0','0','0',''), +('34660','0','-1713558','Шипы |3-1(%s) преследуют |3-3($n)!','0','0','0',''), +('34564','0','-1713559','%s вылезает на поверхность!','0','0','0',''), +('34564','16241','-1713560','Стая поглотит вас!','0','0','0',''), +('34564','0','-1713561','%s выпускает рой жуков-трупоедов, чтобы восстановить здоровье!','0','0','0',''), +('34564','16236','-1713562','Ф-лаккх шир!','0','0','0',''), +('34564','16237','-1713563','Еще одна душа накормит хозяина.','0','0','0',''), +('34564','16238','-1713564','Я подвел тебя, господин...','0','0','0',''), +('36095','0','-1713565','Чемпионы, вы прошли испытание великого крестоносца! Знайте, что только самые сильные искатели приключений могли рассчитывать завершить это испытание. Позвольте вручить вам этот сундук в качестве заслуженной награды, и пусть его содержимое послужит вам верой и правдой в походе против Артаса в самом центре Цитадели Ледяной Короны!','0','0','0',''); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp index 52f6eb38a..ed0018f8f 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_argent_challenge -SD%Complete: 92% -SDComment: missing yells. radiance is "wrong" +SD%Complete: 50% +SDComment: missing yells. radiance is "wrong". modified by /dev/rsa SDCategory: Trial Of the Champion EndScriptData */ diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp index f0e6e663e..8c5ec774d 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_black_knight -SD%Complete: 92% -SDComment: missing yells. not sure about timers. +SD%Complete: 70% +SDComment: missing yells. not sure about timers. modified by /dev/rsa SDCategory: Trial Of the Champion EndScriptData */ diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp index b48828d44..51f893fc8 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_grand_champions -SD%Complete: 92% -SDComment: missing yells. hunter AI sucks. no pvp diminuishing returns(is it DB related?) +SD%Complete: 70% +SDComment: missing yells. hunter AI sucks. no pvp diminuishing returns(is it DB related?). modified by /dev/rsa SDCategory: Trial Of the Champion EndScriptData */ diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp index d92e66f3b..c76c01d2d 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: Instance_Trial_Of_the_Champion -SD%Complete: 100 -SDComment: +SD%Complete: 70 +SDComment: modified by /dev/rsa SDCategory: Trial Of the Champion EndScriptData */ diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp index 0c7737209..386d17f7f 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Trial Of the Champion SD%Complete: 80% -SDComment: event script +SDComment: event script. modified by /dev/rsa SDCategory: trial_of_the_champion EndScriptData */ diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index 66c19b310..1d34ca375 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -15,10 +15,10 @@ */ /* ScriptData -SDName: Instance_Trial_Of_the_crusader -SD%Complete: 10% -SDComment: -SDCategory: Trial Of the crusader +SDName: instance_trial_of_the_crusader +SD%Complete: 70% +SDComment: by /dev/rsa +SDCategory: Trial of the Crusader EndScriptData */ #include "precompiled.h" @@ -32,10 +32,17 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance } uint32 m_auiEncounter[MAX_ENCOUNTERS+1]; + uint32 m_auiEventTimer; uint8 Difficulty; std::string m_strInstData; uint64 m_uiBarrentGUID; + uint64 m_uiTirionGUID; + uint64 m_uiFizzlebangGUID; + uint64 m_uiGarroshGUID; + uint64 m_uiRinnGUID; + uint64 m_uiLich0GUID; + uint64 m_uiLich1GUID; uint64 m_uiGormokGUID; uint64 m_uiAcidmawGUID; @@ -73,18 +80,42 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance uint64 m_uiCrusadersCacheGUID; + uint64 m_uiFloorGUID; + + uint64 m_uiTC10h25GUID; + uint64 m_uiTC10h45GUID; + uint64 m_uiTC10h50GUID; + uint64 m_uiTC10h99GUID; + + uint64 m_uiTC25h25GUID; + uint64 m_uiTC25h45GUID; + uint64 m_uiTC25h50GUID; + uint64 m_uiTC25h99GUID; + + uint64 m_uiTributeChestGUID; void Initialize() { for (uint8 i = 0; i < MAX_ENCOUNTERS; ++i) m_auiEncounter[i] = NOT_STARTED; + m_auiEncounter[0] = 0; + m_auiEncounter[8] = 0; + m_uiTributeChestGUID = 0; + m_auiEventTimer = 1000; } void OnCreatureCreate(Creature* pCreature) { switch(pCreature->GetEntry()) { - case NPC_BARRENT: m_uiBarrentGUID = pCreature->GetGUID(); break; + case NPC_BARRENT: m_uiBarrentGUID = pCreature->GetGUID(); break; + case NPC_TIRION: m_uiTirionGUID = pCreature->GetGUID(); break; + case NPC_FIZZLEBANG: m_uiFizzlebangGUID = pCreature->GetGUID(); break; + case NPC_GARROSH: m_uiGarroshGUID = pCreature->GetGUID(); break; + case NPC_RINN: m_uiRinnGUID = pCreature->GetGUID(); break; + case NPC_LICH_KING_0: m_uiLich0GUID = pCreature->GetGUID(); break; + case NPC_LICH_KING_1: m_uiLich1GUID = pCreature->GetGUID(); break; + case NPC_GORMOK: m_uiGormokGUID = pCreature->GetGUID(); break; case NPC_ACIDMAW: m_uiAcidmawGUID = pCreature->GetGUID(); break; case NPC_DREADSCALE: m_uiDreadscaleGUID = pCreature->GetGUID(); break; @@ -141,6 +172,18 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance if(Difficulty == RAID_DIFFICULTY_25MAN_HEROIC) m_uiCrusadersCacheGUID = pGo->GetGUID(); break; + case GO_ARGENT_COLISEUM_FLOOR: + m_uiFloorGUID = pGo->GetGUID(); + break; + case GO_TRIBUTE_CHEST_10H_25: m_uiTC10h25GUID = pGo->GetGUID(); break; + case GO_TRIBUTE_CHEST_10H_45: m_uiTC10h45GUID = pGo->GetGUID(); break; + case GO_TRIBUTE_CHEST_10H_50: m_uiTC10h50GUID = pGo->GetGUID(); break; + case GO_TRIBUTE_CHEST_10H_99: m_uiTC10h99GUID = pGo->GetGUID(); break; + + case GO_TRIBUTE_CHEST_25H_25: m_uiTC25h25GUID = pGo->GetGUID(); break; + case GO_TRIBUTE_CHEST_25H_45: m_uiTC25h45GUID = pGo->GetGUID(); break; + case GO_TRIBUTE_CHEST_25H_50: m_uiTC25h50GUID = pGo->GetGUID(); break; + case GO_TRIBUTE_CHEST_25H_99: m_uiTC25h99GUID = pGo->GetGUID(); break; } } @@ -148,23 +191,44 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance { switch(uiType) { - case TYPE_STAGE: m_auiEncounter[0] = uiData; break; + case TYPE_STAGE: m_auiEncounter[0] = uiData; uiData = NOT_STARTED; break; case TYPE_BEASTS: m_auiEncounter[1] = uiData; break; case TYPE_JARAXXUS: m_auiEncounter[2] = uiData; break; case TYPE_CRUSADERS: m_auiEncounter[3] = uiData; - if (uiData == DONE) { - if (GameObject* pChest = instance->GetGameObject(m_uiCrusadersCacheGUID)) - if (pChest && !pChest->isSpawned()) { - pChest->SetRespawnTime(7*DAY); -// pChest->SetGoState(GO_STATE_ACTIVE); - }; - }; - break; + if (uiData == DONE) { + if (GameObject* pChest = instance->GetGameObject(m_uiCrusadersCacheGUID)) + if (pChest && !pChest->isSpawned()) { + pChest->SetRespawnTime(7*DAY); + }; + }; + break; case TYPE_FROJA: m_auiEncounter[4] = uiData; break; - case TYPE_ANUBARAK: m_auiEncounter[5] = uiData; break; + case TYPE_LICH_KING: m_auiEncounter[5] = uiData; break; + case TYPE_ANUBARAK: m_auiEncounter[6] = uiData; + if (uiData == DONE) { + if(Difficulty == RAID_DIFFICULTY_10MAN_HEROIC){ + if ( m_auiEncounter[7] <= 25) m_uiTributeChestGUID = m_uiTC10h25GUID; + else if ( m_auiEncounter[7] <= 45) m_uiTributeChestGUID = m_uiTC10h45GUID; + else if ( m_auiEncounter[7] <= 50) m_uiTributeChestGUID = m_uiTC10h50GUID; + else m_uiTributeChestGUID = m_uiTC10h99GUID; + } + if(Difficulty == RAID_DIFFICULTY_25MAN_HEROIC){ + if ( m_auiEncounter[7] <= 25) m_uiTributeChestGUID = m_uiTC25h25GUID; + else if ( m_auiEncounter[7] <= 45) m_uiTributeChestGUID = m_uiTC25h45GUID; + else if ( m_auiEncounter[7] <= 50) m_uiTributeChestGUID = m_uiTC25h50GUID; + else m_uiTributeChestGUID = m_uiTC25h99GUID; + } + if (m_uiTributeChestGUID) + if (GameObject* pChest = instance->GetGameObject(m_uiTributeChestGUID)) + if (pChest && !pChest->isSpawned()) pChest->SetRespawnTime(7*DAY); + }; + break; + case TYPE_COUNTER: m_auiEncounter[7] = uiData; uiData = NOT_STARTED; break; + case TYPE_EVENT: m_auiEncounter[8] = uiData; uiData = NOT_STARTED; break; + case TYPE_EVENT_TIMER: m_auiEventTimer = uiData; uiData = NOT_STARTED; break; } - if (uiData == DONE) + if (uiData == DONE && uiType != TYPE_STAGE) { OUT_SAVE_INST_DATA; @@ -184,7 +248,14 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance { switch(uiData) { - case NPC_BARRENT: return m_uiBarrentGUID; + case NPC_BARRENT: return m_uiBarrentGUID; + case NPC_TIRION: return m_uiTirionGUID; + case NPC_FIZZLEBANG: return m_uiFizzlebangGUID; + case NPC_GARROSH: return m_uiGarroshGUID; + case NPC_RINN: return m_uiRinnGUID; + case NPC_LICH_KING_0: return m_uiLich0GUID; + case NPC_LICH_KING_1: return m_uiLich1GUID; + case NPC_GORMOK: return m_uiGormokGUID; case NPC_ACIDMAW: return m_uiAcidmawGUID; case NPC_DREADSCALE: return m_uiDreadscaleGUID; @@ -219,6 +290,7 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance case NPC_CRUSADER_0_1: return m_uiCrusader01Guid; case NPC_CRUSADER_0_2: return m_uiCrusader02Guid; + case GO_ARGENT_COLISEUM_FLOOR: return m_uiFloorGUID; } return 0; } @@ -227,15 +299,19 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance { switch(uiType) { - case TYPE_STAGE: return m_auiEncounter[0]; - case TYPE_BEASTS: return m_auiEncounter[1]; - case TYPE_JARAXXUS: return m_auiEncounter[2]; + case TYPE_STAGE: return m_auiEncounter[0]; + case TYPE_BEASTS: return m_auiEncounter[1]; + case TYPE_JARAXXUS: return m_auiEncounter[2]; case TYPE_CRUSADERS: return m_auiEncounter[3]; - case TYPE_FROJA: return m_auiEncounter[4]; - case TYPE_ANUBARAK: return m_auiEncounter[5]; + case TYPE_FROJA: return m_auiEncounter[4]; + case TYPE_LICH_KING: return m_auiEncounter[5]; + case TYPE_ANUBARAK: return m_auiEncounter[6]; + case TYPE_COUNTER: return m_auiEncounter[7]; + case TYPE_EVENT: return m_auiEncounter[8]; case TYPE_DIFFICULTY: if (Difficulty == RAID_DIFFICULTY_25MAN_NORMAL || Difficulty == RAID_DIFFICULTY_25MAN_HEROIC) return 25; else return 10; + case TYPE_EVENT_TIMER: return m_auiEventTimer; } return 0; @@ -266,6 +342,7 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance m_auiEncounter[i] = NOT_STARTED; } m_auiEncounter[0] = 0; + m_auiEncounter[8] = 0; OUT_LOAD_INST_DATA_COMPLETE; } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index 752378f0e..57a8156f0 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: Trial Of the crusader -SD%Complete: 10% +SD%Complete: 30% SDComment: event script by /dev/rsa SDCategory: trial_of_the_crusader EndScriptData */ @@ -39,7 +39,7 @@ static _Messages _GossipMessage[]= {"Вы готовы драться с крестоносцами альянса?",GOSSIP_ACTION_INFO_DEF+3,false,TYPE_CRUSADERS}, // {"Вы готовы драться с крестоносцами орды?",GOSSIP_ACTION_INFO_DEF+4,false,TYPE_CRUSADERS}, // {"Вы готовы драться с Близнецами?",GOSSIP_ACTION_INFO_DEF+5,false,TYPE_FROJA}, // -{"Вы готовы драться с Анубараком?",GOSSIP_ACTION_INFO_DEF+6,false,TYPE_ANUBARAK}, // +{"Вы готовы драться с Анубараком?",GOSSIP_ACTION_INFO_DEF+6,false,TYPE_LICH_KING}, // {"Не надо сюда тыкать. На сегодня арена закрыта.",GOSSIP_ACTION_INFO_DEF+7,true,TYPE_ANUBARAK}, // }; enum @@ -52,46 +52,56 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI { npc_toc_announcerAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Reset(); } - ScriptedInstance* m_pInstance; + ScriptedInstance* pInstance; bool flag25; + uint32 DelayTimer; + uint32 substage; void Reset() { - m_pInstance->SetData(TYPE_STAGE,0); + pInstance->SetData(TYPE_STAGE,0); flag25 = true; + DelayTimer = 0; } void UpdateAI(const uint32 diff) { - if (!m_pInstance) return; + if (!pInstance) return; - switch (m_pInstance->GetData(TYPE_STAGE)) { + if(DelayTimer < diff) { + switch (pInstance->GetData(TYPE_STAGE)) { case 0: break; case 1: { - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_GORMOK))) - if (!pTemp->isAlive()) m_pInstance->SetData(TYPE_STAGE,2); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_GORMOK))) + if (!pTemp->isAlive()) { + pInstance->SetData(TYPE_STAGE,2); + pInstance->SetData(TYPE_EVENT,20); + } break; }; case 2: { - Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_DREADSCALE)); - Creature* pTemp1 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_ACIDMAW)); + Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_DREADSCALE)); + Creature* pTemp1 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_ACIDMAW)); if (pTemp && pTemp1){ - if (!pTemp->isAlive() && !pTemp1->isAlive()) m_pInstance->SetData(TYPE_STAGE,3); + if (!pTemp->isAlive() && !pTemp1->isAlive()) { + pInstance->SetData(TYPE_STAGE,3); + pInstance->SetData(TYPE_EVENT,30); + } } else { m_creature->SummonCreature(NPC_DREADSCALE, SpawnLoc[3].x, SpawnLoc[3].y, SpawnLoc[3].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); m_creature->SummonCreature(NPC_ACIDMAW, SpawnLoc[4].x, SpawnLoc[4].y, SpawnLoc[4].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_DREADSCALE))) { + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_DREADSCALE))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_ACIDMAW))) { + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_ACIDMAW))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); @@ -100,15 +110,16 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI break; } case 3: { - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_ICEHOWL))) { + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_ICEHOWL))) { if (!pTemp->isAlive()) { - m_pInstance->SetData(TYPE_STAGE,0); - m_pInstance->SetData(TYPE_BEASTS,DONE); + pInstance->SetData(TYPE_STAGE,0); + pInstance->SetData(TYPE_BEASTS,DONE); + pInstance->SetData(TYPE_EVENT,40); } } else { m_creature->SummonCreature(NPC_ICEHOWL, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_ICEHOWL))) { + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_ICEHOWL))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); @@ -117,15 +128,15 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI break; }; case 4: { - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_JARAXXUS))) { + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_JARAXXUS))) { if (!pTemp->isAlive()) { - m_pInstance->SetData(TYPE_STAGE,0); - m_pInstance->SetData(TYPE_JARAXXUS,DONE); + pInstance->SetData(TYPE_STAGE,0); + pInstance->SetData(TYPE_JARAXXUS,DONE); } } else { m_creature->SummonCreature(NPC_JARAXXUS, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_JARAXXUS))) { + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_JARAXXUS))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); @@ -135,19 +146,19 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI }; case 5: { - Creature* pTemp1 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_1_1)); - Creature* pTemp2 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_1_2)); - Creature* pTemp3 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_1_3)); - Creature* pTemp4 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_1_4)); - Creature* pTemp5 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_1_5)); - Creature* pTemp6 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_1_6)); - if (m_pInstance->GetData(TYPE_DIFFICULTY) == 25) { - Creature* pTemp7 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_1_7)); - Creature* pTemp8 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_1_8)); - Creature* pTemp9 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_1_9)); - Creature* pTemp10 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_1_10)); - Creature* pTemp11 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_0_1)); - Creature* pTemp12 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_0_1)); + Creature* pTemp1 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_1)); + Creature* pTemp2 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_2)); + Creature* pTemp3 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_3)); + Creature* pTemp4 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_4)); + Creature* pTemp5 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_5)); + Creature* pTemp6 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_6)); + if (pInstance->GetData(TYPE_DIFFICULTY) == 25) { + Creature* pTemp7 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_7)); + Creature* pTemp8 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_8)); + Creature* pTemp9 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_9)); + Creature* pTemp10 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_10)); + Creature* pTemp11 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_0_1)); + Creature* pTemp12 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_0_1)); if (pTemp7 && pTemp8 && pTemp9 && pTemp10 && pTemp11 && pTemp12) { if (!pTemp7->isAlive() && !pTemp8->isAlive() && !pTemp9->isAlive() && !pTemp10->isAlive() && !pTemp11->isAlive() && !pTemp12->isAlive()) flag25 = true; @@ -157,27 +168,27 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI if (pTemp1 && pTemp2 && pTemp3 && pTemp4 && pTemp5 && pTemp6) { if (!pTemp1->isAlive() && !pTemp2->isAlive() && !pTemp3->isAlive() && !pTemp4->isAlive() && !pTemp5->isAlive() && !pTemp6->isAlive() && flag25) { - m_pInstance->SetData(TYPE_STAGE,0); - m_pInstance->SetData(TYPE_CRUSADERS,DONE); + pInstance->SetData(TYPE_STAGE,0); + pInstance->SetData(TYPE_CRUSADERS,DONE); } }; break; }; case 6: { - Creature* pTemp1 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_2_1)); - Creature* pTemp2 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_2_2)); - Creature* pTemp3 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_2_3)); - Creature* pTemp4 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_2_4)); - Creature* pTemp5 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_2_5)); - Creature* pTemp6 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_2_6)); - if (m_pInstance->GetData(TYPE_DIFFICULTY) == 25) { - Creature* pTemp7 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_2_7)); - Creature* pTemp8 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_2_8)); - Creature* pTemp9 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_2_9)); - Creature* pTemp10 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_2_10)); - Creature* pTemp11 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_0_1)); - Creature* pTemp12 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_CRUSADER_0_1)); + Creature* pTemp1 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_1)); + Creature* pTemp2 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_2)); + Creature* pTemp3 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_3)); + Creature* pTemp4 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_4)); + Creature* pTemp5 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_5)); + Creature* pTemp6 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_6)); + if (pInstance->GetData(TYPE_DIFFICULTY) == 25) { + Creature* pTemp7 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_7)); + Creature* pTemp8 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_8)); + Creature* pTemp9 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_9)); + Creature* pTemp10 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_10)); + Creature* pTemp11 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_0_1)); + Creature* pTemp12 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_0_1)); if (pTemp7 && pTemp8 && pTemp9 && pTemp10 && pTemp11 && pTemp12) { if (!pTemp7->isAlive() && !pTemp8->isAlive() && !pTemp9->isAlive() && !pTemp10->isAlive() && !pTemp11->isAlive() && !pTemp12->isAlive()) flag25 = true; @@ -187,35 +198,53 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI if (pTemp1 && pTemp2 && pTemp3 && pTemp4 && pTemp5 && pTemp6) { if (!pTemp1->isAlive() && !pTemp2->isAlive() && !pTemp3->isAlive() && !pTemp4->isAlive() && !pTemp5->isAlive() && !pTemp6->isAlive() && flag25) { - m_pInstance->SetData(TYPE_STAGE,0); - m_pInstance->SetData(TYPE_CRUSADERS,DONE); + pInstance->SetData(TYPE_STAGE,0); + pInstance->SetData(TYPE_CRUSADERS,DONE); } }; break; }; case 7: { - Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_DARKBANE)); - Creature* pTemp1 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_LIGHTBANE)); + Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_DARKBANE)); + Creature* pTemp1 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_LIGHTBANE)); if (pTemp && pTemp1){ if (!pTemp->isAlive() && !pTemp1->isAlive()) { - m_pInstance->SetData(TYPE_STAGE,0); - m_pInstance->SetData(TYPE_FROJA,DONE); + pInstance->SetData(TYPE_STAGE,0); + pInstance->SetData(TYPE_FROJA,DONE); } } break; }; case 8: { - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_ANUBARAK))) + if (pInstance->GetData(TYPE_LICH_KING) == DONE){ + pInstance->SetData(TYPE_ANUBARAK,IN_PROGRESS); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_ANUBARAK))) + pTemp->Respawn(); + else { + m_creature->SummonCreature(NPC_ANUBARAK, SpawnLoc[19].x, SpawnLoc[19].y, SpawnLoc[19].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_ANUBARAK))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[20].x, SpawnLoc[20].y, SpawnLoc[20].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetInCombatWithZone(); + pInstance->SetData(TYPE_STAGE,9); + m_creature->SetVisibility(VISIBILITY_OFF); + } + } + } + break; + }; + case 9: { + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_ANUBARAK))) if (!pTemp->isAlive()) { - m_pInstance->SetData(TYPE_STAGE,0); - m_pInstance->SetData(TYPE_ANUBARAK,DONE); + pInstance->SetData(TYPE_STAGE,0); + pInstance->SetData(TYPE_ANUBARAK,DONE); } break; }; - } - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + } + } else DelayTimer -= diff; } }; @@ -227,20 +256,20 @@ CreatureAI* GetAI_npc_toc_announcer(Creature* pCreature) bool GossipHello_npc_toc_announcer(Player* pPlayer, Creature* pCreature) { - ScriptedInstance* m_pInstance; - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + ScriptedInstance* pInstance; + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - if (!m_pInstance) return false; + if (!pInstance) return false; if(!pPlayer->getAttackers().empty()) return true; for(uint8 i = 0; i < NUM_MESSAGES; i++) { - if (!_GossipMessage[i].state && (m_pInstance->GetData(_GossipMessage[i].encounter) == NOT_STARTED || m_pInstance->GetData(_GossipMessage[i].encounter) == IN_PROGRESS)) { + if (!_GossipMessage[i].state && (pInstance->GetData(_GossipMessage[i].encounter) == NOT_STARTED || pInstance->GetData(_GossipMessage[i].encounter) == IN_PROGRESS)) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, _GossipMessage[i].name, GOSSIP_SENDER_MAIN,_GossipMessage[i].id); if (_GossipMessage[i].encounter == TYPE_CRUSADERS) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, _GossipMessage[3].name, GOSSIP_SENDER_MAIN,_GossipMessage[3].id); break; } - if (_GossipMessage[i].state && m_pInstance->GetData(_GossipMessage[i].encounter) == DONE) + if (_GossipMessage[i].state && pInstance->GetData(_GossipMessage[i].encounter) == DONE) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, _GossipMessage[i].name, GOSSIP_SENDER_MAIN,_GossipMessage[i].id); }; pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); @@ -250,36 +279,27 @@ bool GossipHello_npc_toc_announcer(Player* pPlayer, Creature* pCreature) bool GossipSelect_npc_toc_announcer(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - ScriptedInstance* m_pInstance; - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + ScriptedInstance* pInstance; + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); pPlayer->CLOSE_GOSSIP_MENU(); switch(uiAction) { case GOSSIP_ACTION_INFO_DEF+1: { - if (m_pInstance->GetData(TYPE_BEASTS) == NOT_STARTED) m_pInstance->SetData(TYPE_STAGE,1); - m_pInstance->SetData(TYPE_BEASTS,IN_PROGRESS); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_GORMOK))) - { if(!pTemp->isAlive()) pTemp->Respawn(); } - else { - pCreature->SummonCreature(NPC_GORMOK, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_GORMOK))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); - } - } + if (pInstance->GetData(TYPE_BEASTS) == NOT_STARTED || + pInstance->GetData(TYPE_BEASTS) == FAIL) + pInstance->SetData(TYPE_EVENT,11); break; }; case GOSSIP_ACTION_INFO_DEF+2: { - m_pInstance->SetData(TYPE_STAGE,4); - m_pInstance->SetData(TYPE_JARAXXUS,IN_PROGRESS); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_JARAXXUS))) + pInstance->SetData(TYPE_STAGE,4); + pInstance->SetData(TYPE_JARAXXUS,IN_PROGRESS); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_JARAXXUS))) pTemp->Respawn(); else { pCreature->SummonCreature(NPC_JARAXXUS, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_JARAXXUS))) { + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_JARAXXUS))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); @@ -289,124 +309,124 @@ switch(uiAction) { }; case GOSSIP_ACTION_INFO_DEF+3: { - m_pInstance->SetData(TYPE_STAGE,5); - m_pInstance->SetData(TYPE_CRUSADERS,IN_PROGRESS); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_1))) + pInstance->SetData(TYPE_STAGE,5); + pInstance->SetData(TYPE_CRUSADERS,IN_PROGRESS); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_1_1))) pTemp->Respawn(); else { pCreature->SummonCreature(NPC_CRUSADER_1_1, SpawnLoc[3].x, SpawnLoc[3].y, SpawnLoc[3].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_1))) { + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_1_1))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_2))) + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_1_2))) pTemp->Respawn(); else { pCreature->SummonCreature(NPC_CRUSADER_1_2, SpawnLoc[4].x, SpawnLoc[4].y, SpawnLoc[4].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_2))) { + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_1_2))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_3))) + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_1_3))) pTemp->Respawn(); else { pCreature->SummonCreature(NPC_CRUSADER_1_3, SpawnLoc[5].x, SpawnLoc[5].y, SpawnLoc[5].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_3))) { + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_1_3))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_4))) + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_1_4))) pTemp->Respawn(); else { pCreature->SummonCreature(NPC_CRUSADER_1_4, SpawnLoc[6].x, SpawnLoc[6].y, SpawnLoc[6].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_4))) { + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_1_4))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_5))) + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_1_5))) pTemp->Respawn(); else { pCreature->SummonCreature(NPC_CRUSADER_1_5, SpawnLoc[7].x, SpawnLoc[7].y, SpawnLoc[7].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_5))) { + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_1_5))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_6))) + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_1_6))) pTemp->Respawn(); else { pCreature->SummonCreature(NPC_CRUSADER_1_6, SpawnLoc[8].x, SpawnLoc[8].y, SpawnLoc[8].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_6))) { + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_1_6))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } - if (m_pInstance->GetData(TYPE_DIFFICULTY) == 25) { - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_7))) + if (pInstance->GetData(TYPE_DIFFICULTY) == 25) { + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_1_7))) pTemp->Respawn(); else { pCreature->SummonCreature(NPC_CRUSADER_1_7, SpawnLoc[9].x, SpawnLoc[9].y, SpawnLoc[9].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_7))) { + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_1_7))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_8))) + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_1_8))) pTemp->Respawn(); else { pCreature->SummonCreature(NPC_CRUSADER_1_8, SpawnLoc[10].x, SpawnLoc[10].y, SpawnLoc[10].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_8))) { + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_1_8))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_9))) + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_1_9))) pTemp->Respawn(); else { pCreature->SummonCreature(NPC_CRUSADER_1_9, SpawnLoc[11].x, SpawnLoc[11].y, SpawnLoc[11].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_9))) { + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_1_9))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_10))) + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_1_10))) pTemp->Respawn(); else { pCreature->SummonCreature(NPC_CRUSADER_1_10, SpawnLoc[12].x, SpawnLoc[12].y, SpawnLoc[12].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_1_10))) { + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_1_10))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_0_1))) + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_0_1))) pTemp->Respawn(); else { pCreature->SummonCreature(NPC_CRUSADER_0_1, SpawnLoc[13].x, SpawnLoc[13].y, SpawnLoc[13].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_0_1))) { + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_0_1))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_0_2))) + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_0_2))) pTemp->Respawn(); else { pCreature->SummonCreature(NPC_CRUSADER_0_2, SpawnLoc[14].x, SpawnLoc[14].y, SpawnLoc[14].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_0_2))) { + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_0_2))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); @@ -417,124 +437,124 @@ switch(uiAction) { }; case GOSSIP_ACTION_INFO_DEF+4: { - m_pInstance->SetData(TYPE_STAGE,6); - m_pInstance->SetData(TYPE_CRUSADERS,IN_PROGRESS); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_1))) + pInstance->SetData(TYPE_STAGE,6); + pInstance->SetData(TYPE_CRUSADERS,IN_PROGRESS); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_2_1))) pTemp->Respawn(); else { pCreature->SummonCreature(NPC_CRUSADER_2_1, SpawnLoc[3].x, SpawnLoc[3].y, SpawnLoc[3].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_1))) { + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_2_1))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_2))) + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_2_2))) pTemp->Respawn(); else { pCreature->SummonCreature(NPC_CRUSADER_2_2, SpawnLoc[4].x, SpawnLoc[4].y, SpawnLoc[4].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_2))) { + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_2_2))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_3))) + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_2_3))) pTemp->Respawn(); else { pCreature->SummonCreature(NPC_CRUSADER_2_3, SpawnLoc[5].x, SpawnLoc[5].y, SpawnLoc[5].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_3))) { + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_2_3))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_4))) + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_2_4))) pTemp->Respawn(); else { pCreature->SummonCreature(NPC_CRUSADER_2_4, SpawnLoc[6].x, SpawnLoc[6].y, SpawnLoc[6].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_4))) { + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_2_4))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_5))) + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_2_5))) pTemp->Respawn(); else { pCreature->SummonCreature(NPC_CRUSADER_2_5, SpawnLoc[7].x, SpawnLoc[7].y, SpawnLoc[7].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_5))) { + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_2_5))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_6))) + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_2_6))) pTemp->Respawn(); else { pCreature->SummonCreature(NPC_CRUSADER_2_6, SpawnLoc[8].x, SpawnLoc[8].y, SpawnLoc[8].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_6))) { + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_2_6))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } - if (m_pInstance->GetData(TYPE_DIFFICULTY) == 25) { - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_7))) + if (pInstance->GetData(TYPE_DIFFICULTY) == 25) { + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_2_7))) pTemp->Respawn(); else { pCreature->SummonCreature(NPC_CRUSADER_2_7, SpawnLoc[9].x, SpawnLoc[9].y, SpawnLoc[9].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_7))) { + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_2_7))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_8))) + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_2_8))) pTemp->Respawn(); else { pCreature->SummonCreature(NPC_CRUSADER_2_8, SpawnLoc[10].x, SpawnLoc[10].y, SpawnLoc[10].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_8))) { + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_2_8))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_9))) + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_2_9))) pTemp->Respawn(); else { pCreature->SummonCreature(NPC_CRUSADER_2_9, SpawnLoc[11].x, SpawnLoc[11].y, SpawnLoc[11].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_9))) { + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_2_9))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_10))) + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_2_10))) pTemp->Respawn(); else { pCreature->SummonCreature(NPC_CRUSADER_2_10, SpawnLoc[12].x, SpawnLoc[12].y, SpawnLoc[12].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_2_10))) { + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_2_10))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_0_1))) + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_0_1))) pTemp->Respawn(); else { pCreature->SummonCreature(NPC_CRUSADER_0_1, SpawnLoc[13].x, SpawnLoc[13].y, SpawnLoc[13].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_0_1))) { + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_0_1))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_0_2))) + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_0_2))) pTemp->Respawn(); else { pCreature->SummonCreature(NPC_CRUSADER_0_2, SpawnLoc[14].x, SpawnLoc[14].y, SpawnLoc[14].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_CRUSADER_0_2))) { + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_0_2))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); @@ -545,23 +565,23 @@ switch(uiAction) { }; case GOSSIP_ACTION_INFO_DEF+5: { - m_pInstance->SetData(TYPE_STAGE,7); - m_pInstance->SetData(TYPE_FROJA,IN_PROGRESS); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_LIGHTBANE))) + pInstance->SetData(TYPE_STAGE,7); + pInstance->SetData(TYPE_FROJA,IN_PROGRESS); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_LIGHTBANE))) { if(!pTemp->isAlive()) pTemp->Respawn(); } else { pCreature->SummonCreature(NPC_LIGHTBANE, SpawnLoc[3].x, SpawnLoc[3].y, SpawnLoc[3].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_LIGHTBANE))) { + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_LIGHTBANE))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_DARKBANE))) + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_DARKBANE))) { if(!pTemp->isAlive()) pTemp->Respawn(); } else { pCreature->SummonCreature(NPC_DARKBANE, SpawnLoc[4].x, SpawnLoc[4].y, SpawnLoc[4].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_DARKBANE))) { + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_DARKBANE))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); @@ -571,23 +591,14 @@ switch(uiAction) { }; case GOSSIP_ACTION_INFO_DEF+6: { - m_pInstance->SetData(TYPE_STAGE,8); - m_pInstance->SetData(TYPE_ANUBARAK,IN_PROGRESS); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_ANUBARAK))) - pTemp->Respawn(); - else { - pCreature->SummonCreature(NPC_ANUBARAK, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),m_pInstance->GetData64(NPC_ANUBARAK))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); - } - } + pInstance->SetData(TYPE_STAGE,8); + pCreature->SummonCreature(NPC_LICH_KING_1, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 5, TEMPSUMMON_MANUAL_DESPAWN, 0); + pInstance->SetData(TYPE_EVENT,500); break; }; - + case GOSSIP_ACTION_INFO_DEF+7: { - m_pInstance->SetData(TYPE_STAGE,9); + pInstance->SetData(TYPE_STAGE,9); break; }; @@ -597,6 +608,394 @@ switch(uiAction) { return true; } +struct MANGOS_DLL_DECL boss_lich_king_tocAI : public ScriptedAI +{ + boss_lich_king_tocAI(Creature *pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + WayPointList.clear(); + JustRespawned(); + } + + ScriptedInstance* pInstance; + uint32 UpdateTimer; + uint32 event_state_lich_king; + bool Event; + bool MovementStarted; + std::list WayPointList; + std::list::iterator WayPoint; + uint32 WalkTimer; + bool IsWalking; + + void Reset() + { + UpdateTimer = 0; + event_state_lich_king = 0; + Event = false; + MovementStarted = false; + } + + void AttackStart(Unit *who) + { + //ignore all attackstart commands + return; + } + + void JustRespawned() + { + Reset(); + } + + void MoveInLineOfSight(Unit *who) + { + } + + void StartMovement() + { + if(!WayPointList.empty() || MovementStarted) + return; + + AddWaypoint(0, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z); + AddWaypoint(1, SpawnLoc[17].x, SpawnLoc[17].y, SpawnLoc[17].z); + AddWaypoint(2, SpawnLoc[18].x, SpawnLoc[18].y, SpawnLoc[18].z); + m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); + WayPoint = WayPointList.begin(); + MovementStarted = true; + IsWalking = true; + WalkTimer = 200; + event_state_lich_king = 1; + UpdateTimer = pInstance->GetData(TYPE_EVENT_TIMER); + } + + void AddWaypoint(uint32 id, float x, float y, float z) + { + WayPoints wp(id, x, y, z); + WayPointList.push_back(wp); + } + + void UpdateAI(const uint32 diff) + { + if (!MovementStarted) StartMovement(); + + if (IsWalking && WalkTimer) + { + if (WalkTimer <= diff) + { + if (WayPoint != WayPointList.end()) + { + m_creature->GetMotionMaster()->MovePoint(WayPoint->id, WayPoint->x, WayPoint->y,WayPoint->z); + WalkTimer = 0; + } + }else WalkTimer -= diff; + } + + if (UpdateTimer <= diff) + { + switch (pInstance->GetData(TYPE_EVENT)) + { + case 501: + DoScriptText(-1713550,m_creature); + pInstance->SetData(TYPE_EVENT_TIMER, 2500); + pInstance->SetData(TYPE_EVENT,502); + break; + case 503: + DoScriptText(-1713552,m_creature); + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_TALK); + pInstance->SetData(TYPE_EVENT_TIMER, 13000); + pInstance->SetData(TYPE_EVENT,504); + break; + case 504: + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE); + pInstance->SetData(TYPE_EVENT_TIMER, 1000); + pInstance->SetData(TYPE_EVENT,505); + break; + case 505: + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION); + pInstance->SetData(TYPE_EVENT_TIMER, 3000); + pInstance->SetData(TYPE_EVENT,506); + break; + case 506: if (Event) { + DoScriptText(-1713553,m_creature); + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_KNEEL); + pInstance->SetData(TYPE_EVENT_TIMER, 1300); + pInstance->SetData(TYPE_EVENT,507); + } + break; + case 507: + m_creature->CastSpell(m_creature,68198,false); + pInstance->SetData(TYPE_EVENT_TIMER, 1300); + pInstance->SetData(TYPE_EVENT,508); + break; + case 508: + if (GameObject* pGoFloor = pInstance->instance->GetGameObject(pInstance->GetData64(GO_ARGENT_COLISEUM_FLOOR))) + { + pGoFloor->SetUInt32Value(GAMEOBJECT_DISPLAYID,9060); + pGoFloor->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK_10 | GO_FLAG_NODESPAWN); + pGoFloor->SetUInt32Value(GAMEOBJECT_BYTES_1,8449); + } + m_creature->CastSpell(m_creature,69016,false); + if(pInstance) pInstance->SetData(TYPE_LICH_KING,DONE); + + Event=false; + m_creature->ForcedDespawn(); + pInstance->SetData(TYPE_EVENT,509); + break; + } + UpdateTimer = pInstance->GetData(TYPE_EVENT_TIMER); + } else UpdateTimer -= diff; + + } + + void MovementInform(uint32 type, uint32 id) + { + if(pInstance) + { + if(id == 2) + { + Event = true; + } + } + if(type != POINT_MOTION_TYPE) return; + if(WayPoint->id != id) return; + ++WayPoint; + WalkTimer = 200; + } +}; + +CreatureAI* GetAI_boss_lich_king_toc(Creature *_Creature) +{ + boss_lich_king_tocAI* newAI = new boss_lich_king_tocAI(_Creature); + return newAI; +} + +struct MANGOS_DLL_DECL npc_fizzlebang_tocAI : public ScriptedAI +{ + npc_fizzlebang_tocAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)m_creature->GetInstanceData(); + Reset(); + } + + InstanceData* pInstance; + uint32 UpdateTimer; + + void Reset() + { + } + + void UpdateAI(const uint32 diff) + { + if(!pInstance) return; + + + if(UpdateTimer <= diff) + { + switch(pInstance->GetData(TYPE_EVENT)) + { + case 111: + pInstance->SetData(TYPE_EVENT, 112); + pInstance->SetData(TYPE_EVENT_TIMER, 11000); + break; + case 112: + DoScriptText(-1999937, m_creature); + pInstance->SetData(TYPE_EVENT, 113); + m_creature->GetMotionMaster()->MovePoint(0, 558.94f, 138.02f, 394.16f); + pInstance->SetData(TYPE_EVENT_TIMER, 18000); + break; + case 113: + DoScriptText(-1999938, m_creature); + pInstance->SetData(TYPE_EVENT, 114); + pInstance->SetData(TYPE_EVENT_TIMER, 12000); + break; + case 114: + DoScriptText(-1999939, m_creature); + pInstance->SetData(TYPE_EVENT, 115); +// Creature* boss = m_creature->SummonCreature(NPC_JARAXXUS, 568.00f, 141.43f, 394.16f, 3.61f); + //boss->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); + pInstance->SetData(TYPE_EVENT_TIMER, 11000); + break; + } + UpdateTimer = pInstance->GetData(TYPE_EVENT_TIMER); + } else UpdateTimer -= diff; + } +}; + +CreatureAI* GetAI_npc_fizzlebang_toc(Creature* pCreature) +{ + return new npc_fizzlebang_tocAI(pCreature); +} + +struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI +{ + npc_tirion_tocAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)m_creature->GetInstanceData(); + Reset(); + } + + InstanceData* pInstance; + uint32 UpdateTimer; + + void Reset() + { + } + + void UpdateAI(const uint32 diff) + { + if (!pInstance) return; + + if (UpdateTimer <= diff) + { + switch (pInstance->GetData(TYPE_EVENT)) + { + case 11: + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_TALK); + DoScriptText(-1713500, m_creature); + pInstance->SetData(TYPE_EVENT_TIMER, 10000); + pInstance->SetData(TYPE_EVENT,12); + break; + case 14: + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_TALK); + DoScriptText(-1713501, m_creature); + pInstance->SetData(TYPE_EVENT_TIMER, 10000); + pInstance->SetData(TYPE_EVENT,15); + break; + case 15: + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE); + if (pInstance->GetData(TYPE_BEASTS) == NOT_STARTED || + pInstance->GetData(TYPE_BEASTS) == FAIL) + pInstance->SetData(TYPE_STAGE,1); + pInstance->SetData(TYPE_BEASTS,IN_PROGRESS); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_GORMOK))) + { if(!pTemp->isAlive()) pTemp->Respawn(); } + else { + m_creature->SummonCreature(NPC_GORMOK, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_GORMOK))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetInCombatWithZone(); + } + } + pInstance->SetData(TYPE_EVENT_TIMER, 10000); + pInstance->SetData(TYPE_EVENT,16); + break; + + case 20: + DoScriptText(-1713503, m_creature); + pInstance->SetData(TYPE_EVENT_TIMER, 10000); + pInstance->SetData(TYPE_EVENT,21); + break; + case 30: + DoScriptText(-1713505, m_creature); + pInstance->SetData(TYPE_EVENT_TIMER, 10000); + pInstance->SetData(TYPE_EVENT,31); + break; + case 40: + DoScriptText(-1713509, m_creature); + pInstance->SetData(TYPE_EVENT_TIMER, 10000); + pInstance->SetData(TYPE_EVENT,41); + break; + + case 500: + DoScriptText(-1713549, m_creature); + pInstance->SetData(TYPE_EVENT_TIMER, 3000); + pInstance->SetData(TYPE_EVENT,501); + break; + case 502: + DoScriptText(-1713551, m_creature); + pInstance->SetData(TYPE_EVENT_TIMER, 10000); + pInstance->SetData(TYPE_EVENT,503); + break; + } + UpdateTimer = pInstance->GetData(TYPE_EVENT_TIMER); + } else UpdateTimer -= diff; + } +}; + +CreatureAI* GetAI_npc_tirion_toc(Creature* pCreature) +{ + return new npc_tirion_tocAI(pCreature); +} + +struct MANGOS_DLL_DECL npc_garrosh_tocAI : public ScriptedAI +{ + npc_garrosh_tocAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)m_creature->GetInstanceData(); + Reset(); + } + + InstanceData* pInstance; + uint32 UpdateTimer; + + void Reset() + { + } + + void UpdateAI(const uint32 diff) + { + if (!pInstance) return; + + if (UpdateTimer <= diff) + { + switch (pInstance->GetData(TYPE_EVENT)) + { + case 12: + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_TALK); + DoScriptText(-1713702, m_creature); + pInstance->SetData(TYPE_EVENT_TIMER, 10000); + pInstance->SetData(TYPE_EVENT,13); + break; + } + UpdateTimer = pInstance->GetData(TYPE_EVENT_TIMER); + } else UpdateTimer -= diff; + } +}; + +CreatureAI* GetAI_npc_garrosh_toc(Creature* pCreature) +{ + return new npc_garrosh_tocAI(pCreature); +}; + +struct MANGOS_DLL_DECL npc_rinn_tocAI : public ScriptedAI +{ + npc_rinn_tocAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)m_creature->GetInstanceData(); + Reset(); + } + + InstanceData* pInstance; + uint32 UpdateTimer; + + void Reset() + { + } + + void UpdateAI(const uint32 diff) + { + if (!pInstance) return; + if (UpdateTimer <= diff) + { + switch (pInstance->GetData(TYPE_EVENT)) + { + case 13: + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_TALK); + DoScriptText(-1713502, m_creature); + pInstance->SetData(TYPE_EVENT_TIMER, 10000); + pInstance->SetData(TYPE_EVENT,14); + break; + } + UpdateTimer = pInstance->GetData(TYPE_EVENT_TIMER); + } else UpdateTimer -= diff; + } +}; + +CreatureAI* GetAI_npc_rinn_toc(Creature* pCreature) +{ + return new npc_rinn_tocAI(pCreature); +}; + void AddSC_trial_of_the_crusader() { Script* NewScript; @@ -607,4 +1006,29 @@ void AddSC_trial_of_the_crusader() NewScript->pGossipHello = &GossipHello_npc_toc_announcer; NewScript->pGossipSelect = &GossipSelect_npc_toc_announcer; NewScript->RegisterSelf(); + + NewScript = new Script; + NewScript->Name = "boss_lich_king_toc"; + NewScript->GetAI = &GetAI_boss_lich_king_toc; + NewScript->RegisterSelf(); + + NewScript = new Script; + NewScript->Name = "npc_fizzlebang_toc"; + NewScript->GetAI = &GetAI_npc_fizzlebang_toc; + NewScript->RegisterSelf(); + + NewScript = new Script; + NewScript->Name = "npc_tirion_toc"; + NewScript->GetAI = &GetAI_npc_tirion_toc; + NewScript->RegisterSelf(); + + NewScript = new Script; + NewScript->Name = "npc_garrosh_toc"; + NewScript->GetAI = &GetAI_npc_garrosh_toc; + NewScript->RegisterSelf(); + + NewScript = new Script; + NewScript->Name = "npc_rinn_toc"; + NewScript->GetAI = &GetAI_npc_rinn_toc; + NewScript->RegisterSelf(); } \ No newline at end of file diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index d36e3bae6..399a5bd1a 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -4,8 +4,24 @@ enum { - MAX_ENCOUNTERS = 6, + TYPE_STAGE = 0, + TYPE_BEASTS = 1, + TYPE_JARAXXUS = 2, + TYPE_CRUSADERS = 3, + TYPE_FROJA = 4, + TYPE_LICH_KING = 5, + TYPE_ANUBARAK = 6, + TYPE_COUNTER = 7, + TYPE_EVENT = 8, + MAX_ENCOUNTERS = 9, + NPC_BARRENT = 34816, + NPC_TIRION = 34996, + NPC_FIZZLEBANG = 35458, + NPC_GARROSH = 34995, + NPC_RINN = 34990, + NPC_LICH_KING_0 = 16980, + NPC_LICH_KING_1 = 35877, NPC_ICEHOWL = 34797, NPC_GORMOK = 34796, @@ -39,7 +55,6 @@ enum NPC_CRUSADER_0_1 = 35465, NPC_CRUSADER_0_2 = 35610, - NPC_LIGHTBANE = 34497, NPC_DARKBANE = 34496, @@ -50,14 +65,20 @@ enum GO_CRUSADERS_CACHE_10_H = 195633, GO_CRUSADERS_CACHE_25_H = 195635, - TYPE_STAGE = 0, - TYPE_BEASTS = 1, - TYPE_JARAXXUS = 2, - TYPE_CRUSADERS = 3, - TYPE_FROJA = 4, - TYPE_ANUBARAK = 5, + GO_TRIBUTE_CHEST_10H_25 = 195665, + GO_TRIBUTE_CHEST_10H_45 = 195666, + GO_TRIBUTE_CHEST_10H_50 = 195667, + GO_TRIBUTE_CHEST_10H_99 = 195668, + + GO_TRIBUTE_CHEST_25H_25 = 195669, + GO_TRIBUTE_CHEST_25H_45 = 195670, + GO_TRIBUTE_CHEST_25H_50 = 195671, + GO_TRIBUTE_CHEST_25H_99 = 195672, + + GO_ARGENT_COLISEUM_FLOOR = 195527, //20943 TYPE_DIFFICULTY = 101, + TYPE_EVENT_TIMER = 102, DESPAWN_TIME = 300000 @@ -88,6 +109,23 @@ static Locations SpawnLoc[]= {575.641724, 170.351501, 394.659943}, // 14 {516.633972, 159.391708, 395.137543}, // 15 {612.816956, 161.477921, 395.136810}, // 16 + {563.549, 152.474, 394.393}, // 17 - Lich king start + {563.547, 141.613, 393.908}, // 18 - Lich king end + {787.932556, 133.28978, 142.612152}, // 19 - Anub'arak start location + {618.157898, 132.640869, 139.559769}, // 20 - Anub'arak move point location +}; + +struct WayPoints +{ + WayPoints(uint32 _id, float _x, float _y, float _z) + { + id = _id; + x = _x; + y = _y; + z = _z; + } + uint32 id; + float x, y, z; }; #endif From bf4d837fbcaae69702ecdf7fe2e96bbf68f68ce5 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 4 Mar 2010 18:31:45 +0300 Subject: [PATCH 172/405] TOC dialogs & summons added --- addition/724_trial_of_crusader_scriptdev2.sql | 135 +-- .../instance_trial_of_the_crusader.cpp | 72 ++ .../trial_of_the_crusader.cpp | 940 +++++++++++------- .../trial_of_the_crusader.h | 2 + 4 files changed, 699 insertions(+), 450 deletions(-) diff --git a/addition/724_trial_of_crusader_scriptdev2.sql b/addition/724_trial_of_crusader_scriptdev2.sql index 44d522fe4..cca119431 100644 --- a/addition/724_trial_of_crusader_scriptdev2.sql +++ b/addition/724_trial_of_crusader_scriptdev2.sql @@ -1,70 +1,71 @@ DELETE FROM `script_texts` WHERE `entry` BETWEEN -1713799 AND -1713499; INSERT INTO `script_texts` (`comment`,`sound`, `entry`,`content_loc8`,`type`,`language`,`emote`,`content_default`) VALUES -('34996','16036','-1713500','Добро пожаловать, герои! Вы услышали призыв Серебряного Авангарда и без колебаний откликнулись на него! В этом колизее вам предстоит сразиться с опаснейшими противниками. Те из вас, кто смогут пережить испытания, войдут в ряды Серебряного Авангарда, который направится в Цитадель Ледяной Короны.','0','0','0',''), -('34996','16038','-1713501','Из самых глубоких и темных пещер Грозовой Гряды был призван Гормок Пронзающий Бивень! В бой, герои!','0','0','0',''), -('34990','16069','-1713502','Твои чудовища не чета героям Альянса, Тирион!','0','0','0',''), -('34995','16069','-1713702','Твои чудовища не чета героям Орды, Тирион!','0','0','0',''), -('34996','16039','-1713503','Приготовьтесь к схватке с близнецами-чудовищами, Кислотной Утробой и Жуткой Чешуей!','0','0','0',''), -('34799','0','-1713504','После гибели товарища %s приходит в ярость!','0','0','0',''), -('34996','16040','-1713505','В воздухе повеяло ледяным дыханием следующего бойца: на арену выходит Ледяной Рев! Сражайтесь или погибните, чемпионы!','0','0','0',''), -('34797','0','-1713506','%s глядит на |3-3($n) и испускает гортанный вой!','0','0','0',''), -('34797','0','-1713507','%s врезается в стену Колизея и теряет ориентацию!','0','0','0',''), -('34797','0','-1713508','|3-3(%s) охватывает кипящая ярость, и он растаптывает всех на своем пути!','0','0','0',''), -('34996','16041','-1713509','Все чудовища повержены!','0','0','0',''), -('34996','16043','-1713510','Сейчас великий чернокнижник Вилфред Непопамс призовет вашего нового противника. Готовьтесь к бою!','0','0','0',''), -('35458','16268','-1713511','Благодарю, Верховный лорд. А теперь, смельчаки, я приступаю к ритуалу призыва. Когда я закончу, появится грозный демон!','0','0','0',''), -('35458','16269','-1713512','Готовьтесь к забвению!','0','0','0',''), -('35458','16270','-1713513','АГА! Получилось! Трепещи перед всевластным Вилфредом Непопамсом, мастером призыва! Ты покорен мне, демон!','0','0','0',''), -('34780','16143','-1713514','Ничтожный гном! Тебя погубит твоя самоуверенность!','0','0','0',''), -('35458','16271','-1713515','Тут я главный...','0','0','0',''), -('34996','16044','-1713516','Быстрей, герои, расправьтесь с повелителем демонов, прежде чем он откроет портал в свое темное царство!','0','0','0',''), -('34780','16144','-1713517','Перед вами Джараксус, эредарский повелитель Пылающего Легиона!','0','0','0',''), -('34780','0','-1713518','На вас направлено |cFFFF0000Пламя Легиона!|r','0','0','0',''), -('34780','0','-1713519','%s создает врата Пустоты!','0','0','0',''), -('34780','0','-1713520','%s создает |cFF00FF00Вулкан инферналов!|r','0','0','0',''), -('34780','16150','-1713521','Явись, сестра! Господин зовет!','0','0','0',''), -('34780','0','-1713522','$n $gподвергся:подверглась; |cFF00FFFFИспепелению плоти!|r Исцелите $gего:ее;!','0','0','0',''), -('34780','16149','-1713523','ПЛОТЬ ОТ КОСТИ!','0','0','0',''), -('34780','16151','-1713524','ИНФЕРНАЛ!','0','0','0',''), -('34780','16147','-1713525','Мое место займут другие. Ваш мир обречен...','0','0','0',''), -('34996','16045','-1713526','Гибель Вилфреда Непопамса весьма трагична и должна послужить уроком тем, кто смеет беспечно играть с темной магией. К счастью, вы победили демона, и теперь вас ждет новый противник.','0','0','0',''), -('34995','16021','-1713527','Подлые собаки Альянса! Вы выпустили повелителя демонов на воинов Орды? Ваша смерть будет быстрой!','0','0','0',''), -('34990','16064','-1713528','Альянсу не нужна помощь повелителя демонов, чтобы справиться с ордынским отродьем, пес!','0','0','0',''), -('34996','16046','-1713529','Тише! Успокойтесь! Никакого заговора здесь нет. Чернокнижник заигрался и поплатился за это. Турнир продолжается!','0','0','0',''), -('34996','16047','-1713530','В следующем бою вы встретитесь с могучими рыцарями Серебряного Авангарда! Лишь победив их, вы заслужите достойную награду.','0','0','0',''), -('34995','16023','-1713531','Орда требует справедливости! Мы вызываем Альянс на бой! Позволь нам встать на место твоих рыцарей, паладин. Мы покажем этим псам, как оскорблять Орду!','0','0','0',''), -('34996','16048','-1713532','Хорошо. Да будет так. Сражайтесь с честью!','0','0','0',''), -('34995','16022','-1713533','Не щадите никого, герои Орды! ЛОК-ТАР ОГАР!','0','0','0',''), -('34990','16067','-1713534','СЛАВА АЛЬЯНСУ!','0','0','0',''), -('34996','16049','-1713535','Пустая и горькая победа. После сегодняшних потерь мы стали слабее как целое. Кто еще, кроме Короля-лича, выиграет от подобной глупости? Пали великие воины. И ради чего? Истинная опасность еще впереди - нас ждет битва с Королем-личом.','0','0','0',''), -('34996','16050','-1713536','Лишь сплотившись, вы сможете пройти последнее испытание. Из глубин Ледяной Короны навстречу вам подымаются две могучие воительницы Плети: жуткие валькирии, крылатые вестницы Короля-лича!','0','0','0',''), -('34996','16037','-1713537','Пусть состязания начнутся!','0','0','0',''), -('34497','0','-1713538','%s начинает читать заклинание|cFFFFFFFFСветлая воронка!|r Переключение к |cFFFFFFFFСветлой|r сущности!','0','0','0',''), -('34497','0','-1713539','%s начинает читать заклинание Договор близнецов!','0','0','0',''), -('34496','0','-1713540','%s начинает читать заклинание |cFF9932CDТемная воронка!|r Переключение к |cFF9932CDТемной|r сущности!','0','0','0',''), -('34497','16272','-1713541','Во имя темного повелителя. Во имя Короля-лича. Вы. Умрете.','0','0','0',''), -('34496','16279','-1713542','Да поглотит вас Свет!','0','0','0',''), -('34496','16277','-1713543','Пустое место!','0','0','0',''), -('34497','16276','-1713544','Тебя оценили и признали ничтожеством.','0','0','0',''), -('34497','16274','-1713545','ХАОС!','0','0','0',''), -('34496','16278','-1713546','Да поглотит вас Тьма!','0','0','0',''), -('34496','16275','-1713547','Плеть не остановить...','0','0','0',''), -('34990','16068','-1713548','Против Альянса не выстоять даже самым сильным прислужникам Короля-лича! Все славьте наших героев!','0','0','0',''), -('34996','16051','-1713549','Король-лич понес тяжелую потерю! Вы проявили себя как бесстрашные герои Серебряного Авангарда! Мы вместе нанесем удар по Цитадели Ледяной Короны и разнесем в клочья остатки Плети! Нет такого испытания, которое мы бы не могли пройти сообща!','0','0','0',''), -('16980','16321','-1713550','Будет тебе такое испытание, Фордринг.','0','0','0',''), -('34996','16052','-1713551','Артас! Нас гораздо больше! Сложи Ледяную Скорбь, и я подарю тебе заслуженную смерть.','0','0','0',''), -('35877','16322','-1713552','Нерубианцы воздвигли целую империю под льдами Нордскола. Империю, на которой вы так бездумно построили свои дома. МОЮ ИМПЕРИЮ.','0','0','0',''), -('16980','16323','-1713553','Души твоих павших чемпионов будут принадлежать мне, Фордринг.','0','0','0',''), -('34564','16235','-1713554','А вот и гости заявились, как и обещал господин.','0','0','0',''), -('34564','16234','-1713555','Это место станет вашей могилой!','0','0','0',''), -('34564','16240','-1713556','Ауум на-л ак-к-к-к, ишшш. Вставайте, слуги мои. Время пожирать...','0','0','0',''), -('34564','0','-1713557','%s зарывается в землю!','0','0','0',''), -('34660','0','-1713558','Шипы |3-1(%s) преследуют |3-3($n)!','0','0','0',''), -('34564','0','-1713559','%s вылезает на поверхность!','0','0','0',''), -('34564','16241','-1713560','Стая поглотит вас!','0','0','0',''), -('34564','0','-1713561','%s выпускает рой жуков-трупоедов, чтобы восстановить здоровье!','0','0','0',''), -('34564','16236','-1713562','Ф-лаккх шир!','0','0','0',''), -('34564','16237','-1713563','Еще одна душа накормит хозяина.','0','0','0',''), -('34564','16238','-1713564','Я подвел тебя, господин...','0','0','0',''), -('36095','0','-1713565','Чемпионы, вы прошли испытание великого крестоносца! Знайте, что только самые сильные искатели приключений могли рассчитывать завершить это испытание. Позвольте вручить вам этот сундук в качестве заслуженной награды, и пусть его содержимое послужит вам верой и правдой в походе против Артаса в самом центре Цитадели Ледяной Короны!','0','0','0',''); +('34996','16036','-1713500','Добро пожаловать, герои! Вы услышали призыв Серебряного Авангарда и без колебаний откликнулись на него! В этом колизее вам предстоит сразиться с опаснейшими противниками. Те из вас, кто смогут пережить испытания, войдут в ряды Серебряного Авангарда, который направится в Цитадель Ледяной Короны.','1','0','0',''), +('34996','16038','-1713501','Из самых глубоких и темных пещер Грозовой Гряды был призван Гормок Пронзающий Бивень! В бой, герои!','1','0','0',''), +('34990','16069','-1713502','Твои чудовища не чета героям Альянса, Тирион!','1','0','0',''), +('34995','16069','-1713702','Твои чудовища не чета героям Орды, Тирион!','1','0','0',''), +('34996','16039','-1713503','Приготовьтесь к схватке с близнецами-чудовищами, Кислотной Утробой и Жуткой Чешуей!','1','0','0',''), +('34799','0','-1713504','После гибели товарища %s приходит в ярость!','1','0','0',''), +('34996','16040','-1713505','В воздухе повеяло ледяным дыханием следующего бойца: на арену выходит Ледяной Рев! Сражайтесь или погибните, чемпионы!','1','0','0',''), +('34797','0','-1713506','%s глядит на |3-3($n) и испускает гортанный вой!','1','0','0',''), +('34797','0','-1713507','%s врезается в стену Колизея и теряет ориентацию!','1','0','0',''), +('34797','0','-1713508','|3-3(%s) охватывает кипящая ярость, и он растаптывает всех на своем пути!','1','0','0',''), +('34996','16041','-1713509','Все чудовища повержены!','1','0','0',''), +('34996','16043','-1713510','Сейчас великий чернокнижник Вилфред Непопамс призовет вашего нового противника. Готовьтесь к бою!','1','0','0',''), +('35458','16268','-1713511','Благодарю, Верховный лорд. А теперь, смельчаки, я приступаю к ритуалу призыва. Когда я закончу, появится грозный демон!','1','0','0',''), +('35458','16269','-1713512','Готовьтесь к забвению!','1','0','0',''), +('35458','16270','-1713513','АГА! Получилось! Трепещи перед всевластным Вилфредом Непопамсом, мастером призыва! Ты покорен мне, демон!','1','0','0',''), +('34780','16143','-1713514','Ничтожный гном! Тебя погубит твоя самоуверенность!','1','0','0',''), +('35458','16271','-1713515','Тут я главный...','1','0','0',''), +('34996','16044','-1713516','Быстрей, герои, расправьтесь с повелителем демонов, прежде чем он откроет портал в свое темное царство!','1','0','0',''), +('34780','16144','-1713517','Перед вами Джараксус, эредарский повелитель Пылающего Легиона!','1','0','0',''), +('34780','0','-1713518','На вас направлено |cFFFF0000Пламя Легиона!|r','1','0','0',''), +('34780','0','-1713519','%s создает врата Пустоты!','1','0','0',''), +('34780','0','-1713520','%s создает |cFF00FF00Вулкан инферналов!|r','1','0','0',''), +('34780','16150','-1713521','Явись, сестра! Господин зовет!','1','0','0',''), +('34780','0','-1713522','$n $gподвергся:подверглась; |cFF00FFFFИспепелению плоти!|r Исцелите $gего:ее;!','1','0','0',''), +('34780','16149','-1713523','ПЛОТЬ ОТ КОСТИ!','1','0','0',''), +('34780','16151','-1713524','ИНФЕРНАЛ!','1','0','0',''), +('34780','16147','-1713525','Мое место займут другие. Ваш мир обречен...','1','0','0',''), +('34996','16045','-1713526','Гибель Вилфреда Непопамса весьма трагична и должна послужить уроком тем, кто смеет беспечно играть с темной магией. К счастью, вы победили демона, и теперь вас ждет новый противник.','1','0','0',''), +('34995','16021','-1713527','Подлые собаки Альянса! Вы выпустили повелителя демонов на воинов Орды? Ваша смерть будет быстрой!','1','0','0',''), +('34990','16064','-1713528','Альянсу не нужна помощь повелителя демонов, чтобы справиться с ордынским отродьем, пес!','1','0','0',''), +('34996','16046','-1713529','Тише! Успокойтесь! Никакого заговора здесь нет. Чернокнижник заигрался и поплатился за это. Турнир продолжается!','1','0','0',''), +('34996','16047','-1713530','В следующем бою вы встретитесь с могучими рыцарями Серебряного Авангарда! Лишь победив их, вы заслужите достойную награду.','1','0','0',''), +('34995','16023','-1713531','Орда требует справедливости! Мы вызываем Альянс на бой! Позволь нам встать на место твоих рыцарей, паладин. Мы покажем этим псам, как оскорблять Орду!','1','0','0',''), +('34996','16048','-1713532','Хорошо. Да будет так. Сражайтесь с честью!','1','0','0',''), +('34995','16022','-1713533','Не щадите никого, герои Орды! ЛОК-ТАР ОГАР!','1','0','0',''), +('34990','16067','-1713534','СЛАВА АЛЬЯНСУ!','1','0','0',''), +('34996','16049','-1713535','Пустая и горькая победа. После сегодняшних потерь мы стали слабее как целое. Кто еще, кроме Короля-лича, выиграет от подобной глупости? Пали великие воины. И ради чего? Истинная опасность еще впереди - нас ждет битва с Королем-личом.','1','0','0',''), +('34996','16050','-1713536','Лишь сплотившись, вы сможете пройти последнее испытание. Из глубин Ледяной Короны навстречу вам подымаются две могучие воительницы Плети: жуткие валькирии, крылатые вестницы Короля-лича!','1','0','0',''), +('34996','16037','-1713537','Пусть состязания начнутся!','1','0','0',''), +('34497','0','-1713538','%s начинает читать заклинание|cFFFFFFFFСветлая воронка!|r Переключение к |cFFFFFFFFСветлой|r сущности!','1','0','0',''), +('34497','0','-1713539','%s начинает читать заклинание Договор близнецов!','1','0','0',''), +('34496','0','-1713540','%s начинает читать заклинание |cFF9932CDТемная воронка!|r Переключение к |cFF9932CDТемной|r сущности!','1','0','0',''), +('34497','16272','-1713541','Во имя темного повелителя. Во имя Короля-лича. Вы. Умрете.','1','0','0',''), +('34496','16279','-1713542','Да поглотит вас Свет!','1','0','0',''), +('34496','16277','-1713543','Пустое место!','1','0','0',''), +('34497','16276','-1713544','Тебя оценили и признали ничтожеством.','1','0','0',''), +('34497','16274','-1713545','ХАОС!','1','0','0',''), +('34496','16278','-1713546','Да поглотит вас Тьма!','1','0','0',''), +('34496','16275','-1713547','Плеть не остановить...','1','0','0',''), +('34990','16068','-1713548','Против Альянса не выстоять даже самым сильным прислужникам Короля-лича! Все славьте наших героев!','1','0','0',''), +('34995','16068','-1713748','Против Орды не выстоять даже самым сильным прислужникам Короля-лича! Все славьте наших героев!','1','0','0',''), +('34996','16051','-1713549','Король-лич понес тяжелую потерю! Вы проявили себя как бесстрашные герои Серебряного Авангарда! Мы вместе нанесем удар по Цитадели Ледяной Короны и разнесем в клочья остатки Плети! Нет такого испытания, которое мы бы не могли пройти сообща!','1','0','0',''), +('16980','16321','-1713550','Будет тебе такое испытание, Фордринг.','1','0','0',''), +('34996','16052','-1713551','Артас! Нас гораздо больше! Сложи Ледяную Скорбь, и я подарю тебе заслуженную смерть.','1','0','0',''), +('35877','16322','-1713552','Нерубианцы воздвигли целую империю под льдами Нордскола. Империю, на которой вы так бездумно построили свои дома. МОЮ ИМПЕРИЮ.','1','0','0',''), +('16980','16323','-1713553','Души твоих павших чемпионов будут принадлежать мне, Фордринг.','1','0','0',''), +('34564','16235','-1713554','А вот и гости заявились, как и обещал господин.','1','0','0',''), +('34564','16234','-1713555','Это место станет вашей могилой!','1','0','0',''), +('34564','16240','-1713556','Ауум на-л ак-к-к-к, ишшш. Вставайте, слуги мои. Время пожирать...','1','0','0',''), +('34564','0','-1713557','%s зарывается в землю!','1','0','0',''), +('34660','0','-1713558','Шипы |3-1(%s) преследуют |3-3($n)!','1','0','0',''), +('34564','0','-1713559','%s вылезает на поверхность!','1','0','0',''), +('34564','16241','-1713560','Стая поглотит вас!','1','0','0',''), +('34564','0','-1713561','%s выпускает рой жуков-трупоедов, чтобы восстановить здоровье!','1','0','0',''), +('34564','16236','-1713562','Ф-лаккх шир!','1','0','0',''), +('34564','16237','-1713563','Еще одна душа накормит хозяина.','1','0','0',''), +('34564','16238','-1713564','Я подвел тебя, господин...','1','0','0',''), +('36095','0','-1713565','Чемпионы, вы прошли испытание великого крестоносца! Знайте, что только самые сильные искатели приключений могли рассчитывать завершить это испытание. Позвольте вручить вам этот сундук в качестве заслуженной награды, и пусть его содержимое послужит вам верой и правдой в походе против Артаса в самом центре Цитадели Ледяной Короны!','1','0','0',''); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index 1d34ca375..7b09637e3 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -33,6 +33,7 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance uint32 m_auiEncounter[MAX_ENCOUNTERS+1]; uint32 m_auiEventTimer; + uint32 m_auiEventNPCId; uint8 Difficulty; std::string m_strInstData; @@ -312,6 +313,77 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance if (Difficulty == RAID_DIFFICULTY_25MAN_NORMAL || Difficulty == RAID_DIFFICULTY_25MAN_HEROIC) return 25; else return 10; case TYPE_EVENT_TIMER: return m_auiEventTimer; + case TYPE_EVENT_NPC: switch (m_auiEncounter[8]) + { + case 110: + case 140: + case 150: + case 200: + case 300: + case 400: + case 1010: + case 2000: + case 2030: + case 3000: + case 3001: + case 3060: + case 3061: + case 3090: + case 3091: + case 3100: + case 3110: + case 4000: + case 4010: + case 4015: + case 4040: + case 4050: + case 5000: + case 5020: + case 6000: + m_auiEventNPCId = NPC_TIRION; + break; + + case 5010: + case 5030: + case 5040: + case 5050: + case 5060: + case 5070: + case 5080: + m_auiEventNPCId = NPC_LICH_KING_1; + break; + + case 130: + case 2020: + case 3080: + case 3081: + case 4020: + m_auiEventNPCId = NPC_RINN; + break; + + case 120: + case 2010: + case 3050: + case 3051: + case 3070: + case 3071: + case 4030: + m_auiEventNPCId = NPC_GARROSH; + break; + + case 1110: + case 1120: + case 1130: + case 1140: + m_auiEventNPCId = NPC_FIZZLEBANG; + break; + + default: + m_auiEventNPCId = NPC_TIRION; + break; + + }; + return m_auiEventNPCId; } return 0; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index 57a8156f0..e95dd92c5 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -34,17 +34,16 @@ struct _Messages static _Messages _GossipMessage[]= { -{"Вы готовы драться с бестиями Нортренда?",GOSSIP_ACTION_INFO_DEF+1,false,TYPE_BEASTS}, // -{"Вы готовы драться с лордом Джараксусом?",GOSSIP_ACTION_INFO_DEF+2,false,TYPE_JARAXXUS}, // +{"Вы готовы пройти Испытание Крестоносца?",GOSSIP_ACTION_INFO_DEF+1,false,TYPE_BEASTS}, // +{"Вы готовы к следующему этапу?",GOSSIP_ACTION_INFO_DEF+2,false,TYPE_JARAXXUS}, // {"Вы готовы драться с крестоносцами альянса?",GOSSIP_ACTION_INFO_DEF+3,false,TYPE_CRUSADERS}, // {"Вы готовы драться с крестоносцами орды?",GOSSIP_ACTION_INFO_DEF+4,false,TYPE_CRUSADERS}, // -{"Вы готовы драться с Близнецами?",GOSSIP_ACTION_INFO_DEF+5,false,TYPE_FROJA}, // -{"Вы готовы драться с Анубараком?",GOSSIP_ACTION_INFO_DEF+6,false,TYPE_LICH_KING}, // +{"Вы готовы к следующему этапу?",GOSSIP_ACTION_INFO_DEF+5,false,TYPE_FROJA}, // {"Не надо сюда тыкать. На сегодня арена закрыта.",GOSSIP_ACTION_INFO_DEF+7,true,TYPE_ANUBARAK}, // }; enum { - NUM_MESSAGES = 7, + NUM_MESSAGES = 6, }; @@ -79,7 +78,7 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_GORMOK))) if (!pTemp->isAlive()) { pInstance->SetData(TYPE_STAGE,2); - pInstance->SetData(TYPE_EVENT,20); + pInstance->SetData(TYPE_EVENT,200); } break; }; @@ -89,7 +88,7 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI if (pTemp && pTemp1){ if (!pTemp->isAlive() && !pTemp1->isAlive()) { pInstance->SetData(TYPE_STAGE,3); - pInstance->SetData(TYPE_EVENT,30); + pInstance->SetData(TYPE_EVENT,300); } } else { @@ -114,7 +113,7 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI if (!pTemp->isAlive()) { pInstance->SetData(TYPE_STAGE,0); pInstance->SetData(TYPE_BEASTS,DONE); - pInstance->SetData(TYPE_EVENT,40); + pInstance->SetData(TYPE_EVENT,400); } } else { @@ -132,6 +131,7 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI if (!pTemp->isAlive()) { pInstance->SetData(TYPE_STAGE,0); pInstance->SetData(TYPE_JARAXXUS,DONE); + pInstance->SetData(TYPE_EVENT,2000); } } else { @@ -170,6 +170,7 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI if (!pTemp1->isAlive() && !pTemp2->isAlive() && !pTemp3->isAlive() && !pTemp4->isAlive() && !pTemp5->isAlive() && !pTemp6->isAlive() && flag25) { pInstance->SetData(TYPE_STAGE,0); pInstance->SetData(TYPE_CRUSADERS,DONE); + pInstance->SetData(TYPE_EVENT,3100); } }; break; @@ -200,6 +201,7 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI if (!pTemp1->isAlive() && !pTemp2->isAlive() && !pTemp3->isAlive() && !pTemp4->isAlive() && !pTemp5->isAlive() && !pTemp6->isAlive() && flag25) { pInstance->SetData(TYPE_STAGE,0); pInstance->SetData(TYPE_CRUSADERS,DONE); + pInstance->SetData(TYPE_EVENT,3100); } }; break; @@ -212,26 +214,12 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI if (!pTemp->isAlive() && !pTemp1->isAlive()) { pInstance->SetData(TYPE_STAGE,0); pInstance->SetData(TYPE_FROJA,DONE); + pInstance->SetData(TYPE_EVENT,4020); } } break; }; case 8: { - if (pInstance->GetData(TYPE_LICH_KING) == DONE){ - pInstance->SetData(TYPE_ANUBARAK,IN_PROGRESS); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_ANUBARAK))) - pTemp->Respawn(); - else { - m_creature->SummonCreature(NPC_ANUBARAK, SpawnLoc[19].x, SpawnLoc[19].y, SpawnLoc[19].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_ANUBARAK))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[20].x, SpawnLoc[20].y, SpawnLoc[20].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); - pInstance->SetData(TYPE_STAGE,9); - m_creature->SetVisibility(VISIBILITY_OFF); - } - } - } break; }; case 9: { @@ -239,6 +227,7 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI if (!pTemp->isAlive()) { pInstance->SetData(TYPE_STAGE,0); pInstance->SetData(TYPE_ANUBARAK,DONE); + pInstance->SetData(TYPE_EVENT,6000); } break; }; @@ -288,318 +277,45 @@ switch(uiAction) { case GOSSIP_ACTION_INFO_DEF+1: { if (pInstance->GetData(TYPE_BEASTS) == NOT_STARTED || pInstance->GetData(TYPE_BEASTS) == FAIL) - pInstance->SetData(TYPE_EVENT,11); + pInstance->SetData(TYPE_EVENT,110); break; }; case GOSSIP_ACTION_INFO_DEF+2: { - pInstance->SetData(TYPE_STAGE,4); - pInstance->SetData(TYPE_JARAXXUS,IN_PROGRESS); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_JARAXXUS))) - pTemp->Respawn(); - else { - pCreature->SummonCreature(NPC_JARAXXUS, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_JARAXXUS))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); - } - } + if (pInstance->GetData(TYPE_JARAXXUS) == NOT_STARTED || + pInstance->GetData(TYPE_JARAXXUS) == FAIL) + pInstance->SetData(TYPE_EVENT,1010); break; }; case GOSSIP_ACTION_INFO_DEF+3: { - pInstance->SetData(TYPE_STAGE,5); - pInstance->SetData(TYPE_CRUSADERS,IN_PROGRESS); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_1_1))) - pTemp->Respawn(); - else { - pCreature->SummonCreature(NPC_CRUSADER_1_1, SpawnLoc[3].x, SpawnLoc[3].y, SpawnLoc[3].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_1_1))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); - } - } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_1_2))) - pTemp->Respawn(); - else { - pCreature->SummonCreature(NPC_CRUSADER_1_2, SpawnLoc[4].x, SpawnLoc[4].y, SpawnLoc[4].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_1_2))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); - } - } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_1_3))) - pTemp->Respawn(); - else { - pCreature->SummonCreature(NPC_CRUSADER_1_3, SpawnLoc[5].x, SpawnLoc[5].y, SpawnLoc[5].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_1_3))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); - } - } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_1_4))) - pTemp->Respawn(); - else { - pCreature->SummonCreature(NPC_CRUSADER_1_4, SpawnLoc[6].x, SpawnLoc[6].y, SpawnLoc[6].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_1_4))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); - } - } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_1_5))) - pTemp->Respawn(); - else { - pCreature->SummonCreature(NPC_CRUSADER_1_5, SpawnLoc[7].x, SpawnLoc[7].y, SpawnLoc[7].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_1_5))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); - } - } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_1_6))) - pTemp->Respawn(); - else { - pCreature->SummonCreature(NPC_CRUSADER_1_6, SpawnLoc[8].x, SpawnLoc[8].y, SpawnLoc[8].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_1_6))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); - } - } - if (pInstance->GetData(TYPE_DIFFICULTY) == 25) { - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_1_7))) - pTemp->Respawn(); - else { - pCreature->SummonCreature(NPC_CRUSADER_1_7, SpawnLoc[9].x, SpawnLoc[9].y, SpawnLoc[9].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_1_7))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); - } - } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_1_8))) - pTemp->Respawn(); - else { - pCreature->SummonCreature(NPC_CRUSADER_1_8, SpawnLoc[10].x, SpawnLoc[10].y, SpawnLoc[10].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_1_8))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); - } - } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_1_9))) - pTemp->Respawn(); - else { - pCreature->SummonCreature(NPC_CRUSADER_1_9, SpawnLoc[11].x, SpawnLoc[11].y, SpawnLoc[11].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_1_9))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); - } - } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_1_10))) - pTemp->Respawn(); - else { - pCreature->SummonCreature(NPC_CRUSADER_1_10, SpawnLoc[12].x, SpawnLoc[12].y, SpawnLoc[12].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_1_10))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); - } - } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_0_1))) - pTemp->Respawn(); - else { - pCreature->SummonCreature(NPC_CRUSADER_0_1, SpawnLoc[13].x, SpawnLoc[13].y, SpawnLoc[13].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_0_1))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); - } - } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_0_2))) - pTemp->Respawn(); - else { - pCreature->SummonCreature(NPC_CRUSADER_0_2, SpawnLoc[14].x, SpawnLoc[14].y, SpawnLoc[14].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_0_2))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); - } - } - } + if (pInstance->GetData(TYPE_CRUSADERS) == NOT_STARTED || + pInstance->GetData(TYPE_CRUSADERS) == FAIL) + pInstance->SetData(TYPE_EVENT,3000); + break; }; case GOSSIP_ACTION_INFO_DEF+4: { - pInstance->SetData(TYPE_STAGE,6); - pInstance->SetData(TYPE_CRUSADERS,IN_PROGRESS); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_2_1))) - pTemp->Respawn(); - else { - pCreature->SummonCreature(NPC_CRUSADER_2_1, SpawnLoc[3].x, SpawnLoc[3].y, SpawnLoc[3].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_2_1))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); - } - } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_2_2))) - pTemp->Respawn(); - else { - pCreature->SummonCreature(NPC_CRUSADER_2_2, SpawnLoc[4].x, SpawnLoc[4].y, SpawnLoc[4].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_2_2))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); - } - } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_2_3))) - pTemp->Respawn(); - else { - pCreature->SummonCreature(NPC_CRUSADER_2_3, SpawnLoc[5].x, SpawnLoc[5].y, SpawnLoc[5].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_2_3))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); - } - } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_2_4))) - pTemp->Respawn(); - else { - pCreature->SummonCreature(NPC_CRUSADER_2_4, SpawnLoc[6].x, SpawnLoc[6].y, SpawnLoc[6].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_2_4))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); - } - } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_2_5))) - pTemp->Respawn(); - else { - pCreature->SummonCreature(NPC_CRUSADER_2_5, SpawnLoc[7].x, SpawnLoc[7].y, SpawnLoc[7].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_2_5))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); - } - } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_2_6))) - pTemp->Respawn(); - else { - pCreature->SummonCreature(NPC_CRUSADER_2_6, SpawnLoc[8].x, SpawnLoc[8].y, SpawnLoc[8].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_2_6))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); - } - } - if (pInstance->GetData(TYPE_DIFFICULTY) == 25) { - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_2_7))) - pTemp->Respawn(); - else { - pCreature->SummonCreature(NPC_CRUSADER_2_7, SpawnLoc[9].x, SpawnLoc[9].y, SpawnLoc[9].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_2_7))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); - } - } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_2_8))) - pTemp->Respawn(); - else { - pCreature->SummonCreature(NPC_CRUSADER_2_8, SpawnLoc[10].x, SpawnLoc[10].y, SpawnLoc[10].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_2_8))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); - } - } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_2_9))) - pTemp->Respawn(); - else { - pCreature->SummonCreature(NPC_CRUSADER_2_9, SpawnLoc[11].x, SpawnLoc[11].y, SpawnLoc[11].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_2_9))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); - } - } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_2_10))) - pTemp->Respawn(); - else { - pCreature->SummonCreature(NPC_CRUSADER_2_10, SpawnLoc[12].x, SpawnLoc[12].y, SpawnLoc[12].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_2_10))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); - } - } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_0_1))) - pTemp->Respawn(); - else { - pCreature->SummonCreature(NPC_CRUSADER_0_1, SpawnLoc[13].x, SpawnLoc[13].y, SpawnLoc[13].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_0_1))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); - } - } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_0_2))) - pTemp->Respawn(); - else { - pCreature->SummonCreature(NPC_CRUSADER_0_2, SpawnLoc[14].x, SpawnLoc[14].y, SpawnLoc[14].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_CRUSADER_0_2))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); - } - } - } + if (pInstance->GetData(TYPE_CRUSADERS) == NOT_STARTED || + pInstance->GetData(TYPE_CRUSADERS) == FAIL) + pInstance->SetData(TYPE_EVENT,3001); break; }; case GOSSIP_ACTION_INFO_DEF+5: { - pInstance->SetData(TYPE_STAGE,7); - pInstance->SetData(TYPE_FROJA,IN_PROGRESS); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_LIGHTBANE))) - { if(!pTemp->isAlive()) pTemp->Respawn(); } - else { - pCreature->SummonCreature(NPC_LIGHTBANE, SpawnLoc[3].x, SpawnLoc[3].y, SpawnLoc[3].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_LIGHTBANE))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); - } - } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_DARKBANE))) - { if(!pTemp->isAlive()) pTemp->Respawn(); } - else { - pCreature->SummonCreature(NPC_DARKBANE, SpawnLoc[4].x, SpawnLoc[4].y, SpawnLoc[4].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_DARKBANE))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); - } - } + if (pInstance->GetData(TYPE_FROJA) == NOT_STARTED || + pInstance->GetData(TYPE_FROJA) == FAIL) + pInstance->SetData(TYPE_EVENT,4000); break; }; case GOSSIP_ACTION_INFO_DEF+6: { - pInstance->SetData(TYPE_STAGE,8); - pCreature->SummonCreature(NPC_LICH_KING_1, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 5, TEMPSUMMON_MANUAL_DESPAWN, 0); - pInstance->SetData(TYPE_EVENT,500); break; }; case GOSSIP_ACTION_INFO_DEF+7: { pInstance->SetData(TYPE_STAGE,9); - break; }; @@ -675,6 +391,9 @@ struct MANGOS_DLL_DECL boss_lich_king_tocAI : public ScriptedAI void UpdateAI(const uint32 diff) { + + if(!pInstance) return; + if (pInstance->GetData(TYPE_EVENT_NPC) != NPC_LICH_KING_1) return; if (!MovementStarted) StartMovement(); if (IsWalking && WalkTimer) @@ -689,44 +408,46 @@ struct MANGOS_DLL_DECL boss_lich_king_tocAI : public ScriptedAI }else WalkTimer -= diff; } + UpdateTimer = pInstance->GetData(TYPE_EVENT_TIMER); + if (UpdateTimer <= diff) { switch (pInstance->GetData(TYPE_EVENT)) { - case 501: + case 5010: DoScriptText(-1713550,m_creature); - pInstance->SetData(TYPE_EVENT_TIMER, 2500); - pInstance->SetData(TYPE_EVENT,502); + UpdateTimer = 1500; + pInstance->SetData(TYPE_EVENT,5020); break; - case 503: + case 5030: DoScriptText(-1713552,m_creature); m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_TALK); - pInstance->SetData(TYPE_EVENT_TIMER, 13000); - pInstance->SetData(TYPE_EVENT,504); + UpdateTimer = 13000; + pInstance->SetData(TYPE_EVENT,5040); break; - case 504: + case 5040: m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE); - pInstance->SetData(TYPE_EVENT_TIMER, 1000); - pInstance->SetData(TYPE_EVENT,505); + UpdateTimer = 1000; + pInstance->SetData(TYPE_EVENT,5050); break; - case 505: + case 5050: m_creature->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION); - pInstance->SetData(TYPE_EVENT_TIMER, 3000); - pInstance->SetData(TYPE_EVENT,506); + UpdateTimer = 3000; + pInstance->SetData(TYPE_EVENT,5060); break; - case 506: if (Event) { + case 5060: if (Event) { DoScriptText(-1713553,m_creature); m_creature->HandleEmoteCommand(EMOTE_ONESHOT_KNEEL); - pInstance->SetData(TYPE_EVENT_TIMER, 1300); - pInstance->SetData(TYPE_EVENT,507); + UpdateTimer = 2300; + pInstance->SetData(TYPE_EVENT,5070); } break; - case 507: + case 5070: m_creature->CastSpell(m_creature,68198,false); - pInstance->SetData(TYPE_EVENT_TIMER, 1300); - pInstance->SetData(TYPE_EVENT,508); + UpdateTimer = 1300; + pInstance->SetData(TYPE_EVENT,5080); break; - case 508: + case 5080: if (GameObject* pGoFloor = pInstance->instance->GetGameObject(pInstance->GetData64(GO_ARGENT_COLISEUM_FLOOR))) { pGoFloor->SetUInt32Value(GAMEOBJECT_DISPLAYID,9060); @@ -736,13 +457,28 @@ struct MANGOS_DLL_DECL boss_lich_king_tocAI : public ScriptedAI m_creature->CastSpell(m_creature,69016,false); if(pInstance) pInstance->SetData(TYPE_LICH_KING,DONE); + pInstance->SetData(TYPE_ANUBARAK,IN_PROGRESS); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_ANUBARAK))) + pTemp->Respawn(); + else { + m_creature->SummonCreature(NPC_ANUBARAK, SpawnLoc[19].x, SpawnLoc[19].y, SpawnLoc[19].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_ANUBARAK))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[20].x, SpawnLoc[20].y, SpawnLoc[20].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetInCombatWithZone(); + pInstance->SetData(TYPE_STAGE,9); + m_creature->SetVisibility(VISIBILITY_OFF); + } + } + Event=false; m_creature->ForcedDespawn(); - pInstance->SetData(TYPE_EVENT,509); + pInstance->SetData(TYPE_EVENT,5090); + UpdateTimer = 1000; break; } - UpdateTimer = pInstance->GetData(TYPE_EVENT_TIMER); } else UpdateTimer -= diff; + pInstance->SetData(TYPE_EVENT_TIMER, UpdateTimer); } @@ -779,6 +515,12 @@ struct MANGOS_DLL_DECL npc_fizzlebang_tocAI : public ScriptedAI InstanceData* pInstance; uint32 UpdateTimer; + void JustDied() + { + DoScriptText(-1713515, m_creature); + pInstance->SetData(TYPE_EVENT, 1160); + } + void Reset() { } @@ -787,36 +529,56 @@ struct MANGOS_DLL_DECL npc_fizzlebang_tocAI : public ScriptedAI { if(!pInstance) return; + if (pInstance->GetData(TYPE_EVENT_NPC) != NPC_FIZZLEBANG) return; + UpdateTimer = pInstance->GetData(TYPE_EVENT_TIMER); if(UpdateTimer <= diff) { switch(pInstance->GetData(TYPE_EVENT)) { - case 111: - pInstance->SetData(TYPE_EVENT, 112); - pInstance->SetData(TYPE_EVENT_TIMER, 11000); + case 1110: + pInstance->SetData(TYPE_EVENT, 1120); + UpdateTimer = 1000; break; - case 112: - DoScriptText(-1999937, m_creature); - pInstance->SetData(TYPE_EVENT, 113); - m_creature->GetMotionMaster()->MovePoint(0, 558.94f, 138.02f, 394.16f); - pInstance->SetData(TYPE_EVENT_TIMER, 18000); + case 1120: + DoScriptText(-1713511, m_creature); + pInstance->SetData(TYPE_EVENT, 1130); + m_creature->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z);; + UpdateTimer = 18000; break; - case 113: - DoScriptText(-1999938, m_creature); - pInstance->SetData(TYPE_EVENT, 114); - pInstance->SetData(TYPE_EVENT_TIMER, 12000); + case 1130: + DoScriptText(-1713512, m_creature); + pInstance->SetData(TYPE_EVENT, 1140); + UpdateTimer = 10000; break; - case 114: - DoScriptText(-1999939, m_creature); - pInstance->SetData(TYPE_EVENT, 115); -// Creature* boss = m_creature->SummonCreature(NPC_JARAXXUS, 568.00f, 141.43f, 394.16f, 3.61f); - //boss->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); - pInstance->SetData(TYPE_EVENT_TIMER, 11000); + case 1140: + DoScriptText(-1713513, m_creature); + pInstance->SetData(TYPE_STAGE,4); + pInstance->SetData(TYPE_JARAXXUS,IN_PROGRESS); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_JARAXXUS))) { + pTemp->Respawn(); + m_creature->SetInCombatWith(pTemp); + pTemp->AddThreat(m_creature, 1000.0f); + pTemp->AI()->AttackStart(m_creature); + } + else { + m_creature->SummonCreature(NPC_JARAXXUS, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_JARAXXUS))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetInCombatWithZone(); + m_creature->SetInCombatWith(pTemp); + pTemp->AddThreat(m_creature, 1000.0f); + pTemp->AI()->AttackStart(m_creature); + } + } + + pInstance->SetData(TYPE_EVENT, 1150); + UpdateTimer = 1000; break; } - UpdateTimer = pInstance->GetData(TYPE_EVENT_TIMER); } else UpdateTimer -= diff; + pInstance->SetData(TYPE_EVENT_TIMER, UpdateTimer); } }; @@ -843,24 +605,27 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI void UpdateAI(const uint32 diff) { if (!pInstance) return; + if (pInstance->GetData(TYPE_EVENT_NPC) != NPC_TIRION) return; + + UpdateTimer = pInstance->GetData(TYPE_EVENT_TIMER); if (UpdateTimer <= diff) { switch (pInstance->GetData(TYPE_EVENT)) { - case 11: + case 110: m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_TALK); DoScriptText(-1713500, m_creature); - pInstance->SetData(TYPE_EVENT_TIMER, 10000); - pInstance->SetData(TYPE_EVENT,12); + UpdateTimer = 10000; + pInstance->SetData(TYPE_EVENT,120); break; - case 14: + case 140: m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_TALK); DoScriptText(-1713501, m_creature); - pInstance->SetData(TYPE_EVENT_TIMER, 10000); - pInstance->SetData(TYPE_EVENT,15); + UpdateTimer = 10000; + pInstance->SetData(TYPE_EVENT,150); break; - case 15: + case 150: m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE); if (pInstance->GetData(TYPE_BEASTS) == NOT_STARTED || pInstance->GetData(TYPE_BEASTS) == FAIL) @@ -876,39 +641,391 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI pTemp->SetInCombatWithZone(); } } - pInstance->SetData(TYPE_EVENT_TIMER, 10000); - pInstance->SetData(TYPE_EVENT,16); + UpdateTimer = 2000; + pInstance->SetData(TYPE_EVENT,160); break; - case 20: + case 200: DoScriptText(-1713503, m_creature); - pInstance->SetData(TYPE_EVENT_TIMER, 10000); - pInstance->SetData(TYPE_EVENT,21); + UpdateTimer = 2000; + pInstance->SetData(TYPE_EVENT,210); break; - case 30: + case 300: DoScriptText(-1713505, m_creature); - pInstance->SetData(TYPE_EVENT_TIMER, 10000); - pInstance->SetData(TYPE_EVENT,31); + UpdateTimer = 2000; + pInstance->SetData(TYPE_EVENT,310); break; - case 40: + case 400: DoScriptText(-1713509, m_creature); - pInstance->SetData(TYPE_EVENT_TIMER, 10000); - pInstance->SetData(TYPE_EVENT,41); + UpdateTimer = 2000; + pInstance->SetData(TYPE_EVENT,410); + break; + + case 1010: + DoScriptText(-1713510, m_creature); + UpdateTimer = 3000; + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_FIZZLEBANG))) + pTemp->Respawn(); + else m_creature->SummonCreature(NPC_FIZZLEBANG, SpawnLoc[21].x, SpawnLoc[21].y, SpawnLoc[21].z, 2, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + pInstance->SetData(TYPE_EVENT,1110); + break; + + case 2000: + DoScriptText(-1713526, m_creature); + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT,2010); + break; + case 2030: + DoScriptText(-1713529, m_creature); + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT,2040); + break; + case 3000: + DoScriptText(-1713530, m_creature); + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT,3050); + break; + case 3001: + DoScriptText(-1713530, m_creature); + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT,3051); + break; + case 3060: + DoScriptText(-1713532, m_creature); + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT,3070); + break; + case 3061: + DoScriptText(-1713532, m_creature); + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT,3071); + break; +//Summoning crusaders + case 3090: + pInstance->SetData(TYPE_STAGE,5); + pInstance->SetData(TYPE_CRUSADERS,IN_PROGRESS); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_1))) + pTemp->Respawn(); + else { + m_creature->SummonCreature(NPC_CRUSADER_1_1, SpawnLoc[3].x, SpawnLoc[3].y, SpawnLoc[3].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_1))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetInCombatWithZone(); + } + } + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_2))) + pTemp->Respawn(); + else { + m_creature->SummonCreature(NPC_CRUSADER_1_2, SpawnLoc[4].x, SpawnLoc[4].y, SpawnLoc[4].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_2))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetInCombatWithZone(); + } + } + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_3))) + pTemp->Respawn(); + else { + m_creature->SummonCreature(NPC_CRUSADER_1_3, SpawnLoc[5].x, SpawnLoc[5].y, SpawnLoc[5].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_3))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetInCombatWithZone(); + } + } + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_4))) + pTemp->Respawn(); + else { + m_creature->SummonCreature(NPC_CRUSADER_1_4, SpawnLoc[6].x, SpawnLoc[6].y, SpawnLoc[6].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_4))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetInCombatWithZone(); + } + } + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_5))) + pTemp->Respawn(); + else { + m_creature->SummonCreature(NPC_CRUSADER_1_5, SpawnLoc[7].x, SpawnLoc[7].y, SpawnLoc[7].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_5))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetInCombatWithZone(); + } + } + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_6))) + pTemp->Respawn(); + else { + m_creature->SummonCreature(NPC_CRUSADER_1_6, SpawnLoc[8].x, SpawnLoc[8].y, SpawnLoc[8].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_6))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetInCombatWithZone(); + } + } + if (pInstance->GetData(TYPE_DIFFICULTY) == 25) { + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_7))) + pTemp->Respawn(); + else { + m_creature->SummonCreature(NPC_CRUSADER_1_7, SpawnLoc[9].x, SpawnLoc[9].y, SpawnLoc[9].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_7))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetInCombatWithZone(); + } + } + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_8))) + pTemp->Respawn(); + else { + m_creature->SummonCreature(NPC_CRUSADER_1_8, SpawnLoc[10].x, SpawnLoc[10].y, SpawnLoc[10].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_8))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetInCombatWithZone(); + } + } + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_9))) + pTemp->Respawn(); + else { + m_creature->SummonCreature(NPC_CRUSADER_1_9, SpawnLoc[11].x, SpawnLoc[11].y, SpawnLoc[11].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_9))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetInCombatWithZone(); + } + } + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_10))) + pTemp->Respawn(); + else { + m_creature->SummonCreature(NPC_CRUSADER_1_10, SpawnLoc[12].x, SpawnLoc[12].y, SpawnLoc[12].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_10))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetInCombatWithZone(); + } + } + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_0_1))) + pTemp->Respawn(); + else { + m_creature->SummonCreature(NPC_CRUSADER_0_1, SpawnLoc[13].x, SpawnLoc[13].y, SpawnLoc[13].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_0_1))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetInCombatWithZone(); + } + } + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_0_2))) + pTemp->Respawn(); + else { + m_creature->SummonCreature(NPC_CRUSADER_0_2, SpawnLoc[14].x, SpawnLoc[14].y, SpawnLoc[14].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_0_2))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetInCombatWithZone(); + } + } + } + case 3091: + pInstance->SetData(TYPE_STAGE,6); + pInstance->SetData(TYPE_CRUSADERS,IN_PROGRESS); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_1))) + pTemp->Respawn(); + else { + m_creature->SummonCreature(NPC_CRUSADER_2_1, SpawnLoc[3].x, SpawnLoc[3].y, SpawnLoc[3].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_1))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetInCombatWithZone(); + } + } + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_2))) + pTemp->Respawn(); + else { + m_creature->SummonCreature(NPC_CRUSADER_2_2, SpawnLoc[4].x, SpawnLoc[4].y, SpawnLoc[4].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_2))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetInCombatWithZone(); + } + } + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_3))) + pTemp->Respawn(); + else { + m_creature->SummonCreature(NPC_CRUSADER_2_3, SpawnLoc[5].x, SpawnLoc[5].y, SpawnLoc[5].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_3))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetInCombatWithZone(); + } + } + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_4))) + pTemp->Respawn(); + else { + m_creature->SummonCreature(NPC_CRUSADER_2_4, SpawnLoc[6].x, SpawnLoc[6].y, SpawnLoc[6].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_4))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetInCombatWithZone(); + } + } + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_5))) + pTemp->Respawn(); + else { + m_creature->SummonCreature(NPC_CRUSADER_2_5, SpawnLoc[7].x, SpawnLoc[7].y, SpawnLoc[7].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_5))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetInCombatWithZone(); + } + } + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_6))) + pTemp->Respawn(); + else { + m_creature->SummonCreature(NPC_CRUSADER_2_6, SpawnLoc[8].x, SpawnLoc[8].y, SpawnLoc[8].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_6))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetInCombatWithZone(); + } + } + if (pInstance->GetData(TYPE_DIFFICULTY) == 25) { + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_7))) + pTemp->Respawn(); + else { + m_creature->SummonCreature(NPC_CRUSADER_2_7, SpawnLoc[9].x, SpawnLoc[9].y, SpawnLoc[9].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_7))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetInCombatWithZone(); + } + } + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_8))) + pTemp->Respawn(); + else { + m_creature->SummonCreature(NPC_CRUSADER_2_8, SpawnLoc[10].x, SpawnLoc[10].y, SpawnLoc[10].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_8))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetInCombatWithZone(); + } + } + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_9))) + pTemp->Respawn(); + else { + m_creature->SummonCreature(NPC_CRUSADER_2_9, SpawnLoc[11].x, SpawnLoc[11].y, SpawnLoc[11].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_9))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetInCombatWithZone(); + } + } + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_10))) + pTemp->Respawn(); + else { + m_creature->SummonCreature(NPC_CRUSADER_2_10, SpawnLoc[12].x, SpawnLoc[12].y, SpawnLoc[12].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_10))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetInCombatWithZone(); + } + } + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_0_1))) + pTemp->Respawn(); + else { + m_creature->SummonCreature(NPC_CRUSADER_0_1, SpawnLoc[13].x, SpawnLoc[13].y, SpawnLoc[13].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_0_1))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetInCombatWithZone(); + } + } + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_0_2))) + pTemp->Respawn(); + else { + m_creature->SummonCreature(NPC_CRUSADER_0_2, SpawnLoc[14].x, SpawnLoc[14].y, SpawnLoc[14].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_0_2))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetInCombatWithZone(); + } + } + } + UpdateTimer = 3000; + pInstance->SetData(TYPE_EVENT,3095); + break; + +//Crusaders battle end + case 3100: + DoScriptText(-1713535, m_creature); + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT,3110); + break; + + case 4000: + DoScriptText(-1713536, m_creature); + UpdateTimer = 3000; + pInstance->SetData(TYPE_EVENT,4010); + break; + case 4010: + DoScriptText(-1713537, m_creature); + UpdateTimer = 10000; + pInstance->SetData(TYPE_EVENT,4015); + break; + + case 4015: + pInstance->SetData(TYPE_STAGE,7); + pInstance->SetData(TYPE_FROJA,IN_PROGRESS); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_LIGHTBANE))) + { if(!pTemp->isAlive()) pTemp->Respawn(); } + else { + m_creature->SummonCreature(NPC_LIGHTBANE, SpawnLoc[3].x, SpawnLoc[3].y, SpawnLoc[3].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_LIGHTBANE))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetInCombatWithZone(); + } + } + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_DARKBANE))) + { if(!pTemp->isAlive()) pTemp->Respawn(); } + else { + m_creature->SummonCreature(NPC_DARKBANE, SpawnLoc[4].x, SpawnLoc[4].y, SpawnLoc[4].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_DARKBANE))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetInCombatWithZone(); + } + } + UpdateTimer = 10000; + pInstance->SetData(TYPE_EVENT,4016); break; - case 500: + case 4040: + UpdateTimer = 30000; + pInstance->SetData(TYPE_EVENT,5000); + break; + + case 5000: DoScriptText(-1713549, m_creature); - pInstance->SetData(TYPE_EVENT_TIMER, 3000); - pInstance->SetData(TYPE_EVENT,501); + UpdateTimer = 2000; + pInstance->SetData(TYPE_EVENT,5010); + pInstance->SetData(TYPE_STAGE,8); + m_creature->SummonCreature(NPC_LICH_KING_1, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 5, TEMPSUMMON_MANUAL_DESPAWN, 0); break; - case 502: + case 5020: DoScriptText(-1713551, m_creature); - pInstance->SetData(TYPE_EVENT_TIMER, 10000); - pInstance->SetData(TYPE_EVENT,503); + UpdateTimer = 10000; + pInstance->SetData(TYPE_EVENT,5030); + break; + case 6000: + DoScriptText(-1713565, m_creature); + UpdateTimer = 10000; + pInstance->SetData(TYPE_EVENT,6010); break; } - UpdateTimer = pInstance->GetData(TYPE_EVENT_TIMER); } else UpdateTimer -= diff; + pInstance->SetData(TYPE_EVENT_TIMER, UpdateTimer); + } }; @@ -935,20 +1052,53 @@ struct MANGOS_DLL_DECL npc_garrosh_tocAI : public ScriptedAI void UpdateAI(const uint32 diff) { if (!pInstance) return; + if (pInstance->GetData(TYPE_EVENT_NPC) != NPC_GARROSH) return; + + UpdateTimer = pInstance->GetData(TYPE_EVENT_TIMER); if (UpdateTimer <= diff) { switch (pInstance->GetData(TYPE_EVENT)) { - case 12: + case 120: m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_TALK); DoScriptText(-1713702, m_creature); - pInstance->SetData(TYPE_EVENT_TIMER, 10000); - pInstance->SetData(TYPE_EVENT,13); + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT,130); + break; + case 2010: + DoScriptText(-1713527, m_creature); + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT,2020); + break; + case 3050: + DoScriptText(-1713531, m_creature); + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT,3060); + break; + case 3051: + DoScriptText(-1713531, m_creature); + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT,3061); + break; + case 3070: + DoScriptText(-1713533, m_creature); + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT,3080); + break; + case 3071: + DoScriptText(-1713533, m_creature); + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT,3081); + break; + case 4030: + DoScriptText(-1713748, m_creature); + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT,4040); break; } - UpdateTimer = pInstance->GetData(TYPE_EVENT_TIMER); } else UpdateTimer -= diff; + pInstance->SetData(TYPE_EVENT_TIMER, UpdateTimer); } }; @@ -975,19 +1125,43 @@ struct MANGOS_DLL_DECL npc_rinn_tocAI : public ScriptedAI void UpdateAI(const uint32 diff) { if (!pInstance) return; + if (pInstance->GetData(TYPE_EVENT_NPC) != NPC_RINN) return; + + UpdateTimer = pInstance->GetData(TYPE_EVENT_TIMER); + if (UpdateTimer <= diff) { switch (pInstance->GetData(TYPE_EVENT)) { - case 13: + case 130: m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_TALK); DoScriptText(-1713502, m_creature); - pInstance->SetData(TYPE_EVENT_TIMER, 10000); - pInstance->SetData(TYPE_EVENT,14); + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT,140); + break; + case 2020: + DoScriptText(-1713528, m_creature); + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT,2030); + break; + case 3080: + DoScriptText(-1713534, m_creature); + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT,3090); + break; + case 3081: + DoScriptText(-1713534, m_creature); + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT,3091); + break; + case 4020: + DoScriptText(-1713548, m_creature); + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT,4030); break; } - UpdateTimer = pInstance->GetData(TYPE_EVENT_TIMER); } else UpdateTimer -= diff; + pInstance->SetData(TYPE_EVENT_TIMER,UpdateTimer); } }; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index 399a5bd1a..cf7971083 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -79,6 +79,7 @@ enum TYPE_DIFFICULTY = 101, TYPE_EVENT_TIMER = 102, + TYPE_EVENT_NPC = 103, DESPAWN_TIME = 300000 @@ -113,6 +114,7 @@ static Locations SpawnLoc[]= {563.547, 141.613, 393.908}, // 18 - Lich king end {787.932556, 133.28978, 142.612152}, // 19 - Anub'arak start location {618.157898, 132.640869, 139.559769}, // 20 - Anub'arak move point location + {508.104767, 138.247345, 395.128052}, // 21 - Fizzlebang start location }; struct WayPoints From 37e3e0a2358b537306dec382850091071cd225c8 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Fri, 5 Mar 2010 16:42:22 +0300 Subject: [PATCH 173/405] Trial of crusader main dialogs finished --- addition/724_trial_of_crusader_mangos.sql | 2 +- addition/724_trial_of_crusader_scriptdev2.sql | 9 +- .../instance_trial_of_the_crusader.cpp | 26 +- .../trial_of_the_crusader.cpp | 231 ++++++++++++------ 4 files changed, 185 insertions(+), 83 deletions(-) diff --git a/addition/724_trial_of_crusader_mangos.sql b/addition/724_trial_of_crusader_mangos.sql index e2b9e1562..d9c4479fb 100644 --- a/addition/724_trial_of_crusader_mangos.sql +++ b/addition/724_trial_of_crusader_mangos.sql @@ -7,7 +7,7 @@ DELETE FROM `creature` WHERE `map` = 649 AND `id` IN -- announcers UPDATE `creature_template` SET `npcflag`=1, `scriptname`='npc_toc_announcer' WHERE `entry`=34816; UPDATE `creature_template` SET `scriptname`='boss_lich_king_toc' WHERE `entry`=35877; -UPDATE `creature_template` SET `scriptname`='npc_fizzlebang_toc' WHERE `entry`=35458; +UPDATE `creature_template` SET `minhealth`= 20000, `maxhealth` = 20000, `faction_A`= 1770, `faction_H` = 1770, `scriptname`='npc_fizzlebang_toc' WHERE `entry`=35458; UPDATE `creature_template` SET `scriptname`='npc_tirion_toc' WHERE `entry`=34996; UPDATE `creature_template` SET `scriptname`='npc_garrosh_toc' WHERE `entry`=34995; UPDATE `creature_template` SET `scriptname`='npc_rinn_toc' WHERE `entry`=34990; diff --git a/addition/724_trial_of_crusader_scriptdev2.sql b/addition/724_trial_of_crusader_scriptdev2.sql index cca119431..dfcd832d0 100644 --- a/addition/724_trial_of_crusader_scriptdev2.sql +++ b/addition/724_trial_of_crusader_scriptdev2.sql @@ -17,7 +17,8 @@ INSERT INTO `script_texts` ('35458','16269','-1713512','Готовьтесь к забвению!','1','0','0',''), ('35458','16270','-1713513','АГА! Получилось! Трепещи перед всевластным Вилфредом Непопамсом, мастером призыва! Ты покорен мне, демон!','1','0','0',''), ('34780','16143','-1713514','Ничтожный гном! Тебя погубит твоя самоуверенность!','1','0','0',''), -('35458','16271','-1713515','Тут я главный...','1','0','0',''), +('35458','16271','-1713515','Тут я главный!','1','0','0',''), +('35458','16271','-1713715','Ну вот, опять я облажался...','1','0','0',''), ('34996','16044','-1713516','Быстрей, герои, расправьтесь с повелителем демонов, прежде чем он откроет портал в свое темное царство!','1','0','0',''), ('34780','16144','-1713517','Перед вами Джараксус, эредарский повелитель Пылающего Легиона!','1','0','0',''), ('34780','0','-1713518','На вас направлено |cFFFF0000Пламя Легиона!|r','1','0','0',''), @@ -34,9 +35,12 @@ INSERT INTO `script_texts` ('34996','16046','-1713529','Тише! Успокойтесь! Никакого заговора здесь нет. Чернокнижник заигрался и поплатился за это. Турнир продолжается!','1','0','0',''), ('34996','16047','-1713530','В следующем бою вы встретитесь с могучими рыцарями Серебряного Авангарда! Лишь победив их, вы заслужите достойную награду.','1','0','0',''), ('34995','16023','-1713531','Орда требует справедливости! Мы вызываем Альянс на бой! Позволь нам встать на место твоих рыцарей, паладин. Мы покажем этим псам, как оскорблять Орду!','1','0','0',''), +('34995','16023','-1713731','Альянс требует справедливости! Мы вызываем Орду на бой! Позволь нам встать на место твоих рыцарей, паладин. Мы покажем этим псам, как оскорблять Альянс!','1','0','0',''), ('34996','16048','-1713532','Хорошо. Да будет так. Сражайтесь с честью!','1','0','0',''), ('34995','16022','-1713533','Не щадите никого, герои Орды! ЛОК-ТАР ОГАР!','1','0','0',''), +('34995','16022','-1713733','Не щадите никого, герои Альянса! За Лордаэрон!','1','0','0',''), ('34990','16067','-1713534','СЛАВА АЛЬЯНСУ!','1','0','0',''), +('34990','16067','-1713734','ЛОК-ТАР ОГАР!','1','0','0',''), ('34996','16049','-1713535','Пустая и горькая победа. После сегодняшних потерь мы стали слабее как целое. Кто еще, кроме Короля-лича, выиграет от подобной глупости? Пали великие воины. И ради чего? Истинная опасность еще впереди - нас ждет битва с Королем-личом.','1','0','0',''), ('34996','16050','-1713536','Лишь сплотившись, вы сможете пройти последнее испытание. Из глубин Ледяной Короны навстречу вам подымаются две могучие воительницы Плети: жуткие валькирии, крылатые вестницы Короля-лича!','1','0','0',''), ('34996','16037','-1713537','Пусть состязания начнутся!','1','0','0',''), @@ -68,4 +72,5 @@ INSERT INTO `script_texts` ('34564','16236','-1713562','Ф-лаккх шир!','1','0','0',''), ('34564','16237','-1713563','Еще одна душа накормит хозяина.','1','0','0',''), ('34564','16238','-1713564','Я подвел тебя, господин...','1','0','0',''), -('36095','0','-1713565','Чемпионы, вы прошли испытание великого крестоносца! Знайте, что только самые сильные искатели приключений могли рассчитывать завершить это испытание. Позвольте вручить вам этот сундук в качестве заслуженной награды, и пусть его содержимое послужит вам верой и правдой в походе против Артаса в самом центре Цитадели Ледяной Короны!','1','0','0',''); +('36095','0','-1713565','Чемпионы, вы прошли испытание великого крестоносца! Знайте, что только самые сильные искатели приключений могли рассчитывать завершить это испытание.','1','0','0',''), +('36095','0','-1713566','Позвольте вручить вам этот сундук в качестве заслуженной награды, и пусть его содержимое послужит вам верой и правдой в походе против Артаса в самом центре Цитадели Ледяной Короны!','1','0','0',''); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index 7b09637e3..1e2351bbd 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -192,7 +192,7 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance { switch(uiType) { - case TYPE_STAGE: m_auiEncounter[0] = uiData; uiData = NOT_STARTED; break; + case TYPE_STAGE: m_auiEncounter[0] = uiData; break; case TYPE_BEASTS: m_auiEncounter[1] = uiData; break; case TYPE_JARAXXUS: m_auiEncounter[2] = uiData; break; case TYPE_CRUSADERS: m_auiEncounter[3] = uiData; @@ -229,7 +229,10 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance case TYPE_EVENT_TIMER: m_auiEventTimer = uiData; uiData = NOT_STARTED; break; } - if (uiData == DONE && uiType != TYPE_STAGE) + if (uiData == DONE && uiType != TYPE_STAGE + && uiType != TYPE_COUNTER + && uiType != TYPE_EVENT + && uiType != TYPE_EVENT_TIMER) { OUT_SAVE_INST_DATA; @@ -309,9 +312,7 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance case TYPE_ANUBARAK: return m_auiEncounter[6]; case TYPE_COUNTER: return m_auiEncounter[7]; case TYPE_EVENT: return m_auiEncounter[8]; - case TYPE_DIFFICULTY: - if (Difficulty == RAID_DIFFICULTY_25MAN_NORMAL || Difficulty == RAID_DIFFICULTY_25MAN_HEROIC) return 25; - else return 10; + case TYPE_DIFFICULTY: return Difficulty; case TYPE_EVENT_TIMER: return m_auiEventTimer; case TYPE_EVENT_NPC: switch (m_auiEncounter[8]) { @@ -319,9 +320,12 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance case 140: case 150: case 200: + case 210: case 300: + case 310: case 400: case 1010: + case 1180: case 2000: case 2030: case 3000: @@ -340,6 +344,8 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance case 5000: case 5020: case 6000: + case 6005: + case 6010: m_auiEventNPCId = NPC_TIRION; break; @@ -354,19 +360,21 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance break; case 130: + case 132: case 2020: case 3080: - case 3081: + case 3051: + case 3071: case 4020: m_auiEventNPCId = NPC_RINN; break; case 120: + case 122: case 2010: case 3050: - case 3051: case 3070: - case 3071: + case 3081: case 4030: m_auiEventNPCId = NPC_GARROSH; break; @@ -375,6 +383,8 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance case 1120: case 1130: case 1140: + case 1150: + case 1160: m_auiEventNPCId = NPC_FIZZLEBANG; break; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index e95dd92c5..f208202f9 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -67,6 +67,12 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI DelayTimer = 0; } + void AttackStart(Unit *who) + { + //ignore all attackstart commands + return; + } + void UpdateAI(const uint32 diff) { if (!pInstance) return; @@ -91,21 +97,6 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI pInstance->SetData(TYPE_EVENT,300); } } - else { - m_creature->SummonCreature(NPC_DREADSCALE, SpawnLoc[3].x, SpawnLoc[3].y, SpawnLoc[3].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - m_creature->SummonCreature(NPC_ACIDMAW, SpawnLoc[4].x, SpawnLoc[4].y, SpawnLoc[4].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_DREADSCALE))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); - } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_ACIDMAW))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); - } - } break; } case 3: { @@ -116,14 +107,6 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI pInstance->SetData(TYPE_EVENT,400); } } - else { - m_creature->SummonCreature(NPC_ICEHOWL, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_ICEHOWL))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); - } - } break; }; case 4: { @@ -152,7 +135,9 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI Creature* pTemp4 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_4)); Creature* pTemp5 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_5)); Creature* pTemp6 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_6)); - if (pInstance->GetData(TYPE_DIFFICULTY) == 25) { + if (pInstance->GetData(TYPE_DIFFICULTY) == RAID_DIFFICULTY_25MAN_NORMAL + || pInstance->GetData(TYPE_DIFFICULTY) == RAID_DIFFICULTY_25MAN_HEROIC) + { Creature* pTemp7 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_7)); Creature* pTemp8 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_8)); Creature* pTemp9 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_9)); @@ -183,7 +168,9 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI Creature* pTemp4 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_4)); Creature* pTemp5 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_5)); Creature* pTemp6 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_6)); - if (pInstance->GetData(TYPE_DIFFICULTY) == 25) { + if (pInstance->GetData(TYPE_DIFFICULTY) == RAID_DIFFICULTY_25MAN_NORMAL + || pInstance->GetData(TYPE_DIFFICULTY) == RAID_DIFFICULTY_25MAN_HEROIC) + { Creature* pTemp7 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_7)); Creature* pTemp8 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_8)); Creature* pTemp9 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_9)); @@ -231,6 +218,10 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI } break; }; + case 10: { +// m_creature->ForcedDespawn(); + break; + }; } } else DelayTimer -= diff; @@ -291,15 +282,15 @@ switch(uiAction) { case GOSSIP_ACTION_INFO_DEF+3: { if (pInstance->GetData(TYPE_CRUSADERS) == NOT_STARTED || pInstance->GetData(TYPE_CRUSADERS) == FAIL) - pInstance->SetData(TYPE_EVENT,3000); - + pInstance->SetData(TYPE_EVENT,3001); + break; }; case GOSSIP_ACTION_INFO_DEF+4: { if (pInstance->GetData(TYPE_CRUSADERS) == NOT_STARTED || pInstance->GetData(TYPE_CRUSADERS) == FAIL) - pInstance->SetData(TYPE_EVENT,3001); + pInstance->SetData(TYPE_EVENT,3000); break; }; @@ -416,13 +407,13 @@ struct MANGOS_DLL_DECL boss_lich_king_tocAI : public ScriptedAI { case 5010: DoScriptText(-1713550,m_creature); - UpdateTimer = 1500; + UpdateTimer = 3000; pInstance->SetData(TYPE_EVENT,5020); break; case 5030: DoScriptText(-1713552,m_creature); m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_TALK); - UpdateTimer = 13000; + UpdateTimer = 10000; pInstance->SetData(TYPE_EVENT,5040); break; case 5040: @@ -438,13 +429,13 @@ struct MANGOS_DLL_DECL boss_lich_king_tocAI : public ScriptedAI case 5060: if (Event) { DoScriptText(-1713553,m_creature); m_creature->HandleEmoteCommand(EMOTE_ONESHOT_KNEEL); - UpdateTimer = 2300; + UpdateTimer = 2500; pInstance->SetData(TYPE_EVENT,5070); } break; case 5070: m_creature->CastSpell(m_creature,68198,false); - UpdateTimer = 1300; + UpdateTimer = 1500; pInstance->SetData(TYPE_EVENT,5080); break; case 5080: @@ -466,15 +457,13 @@ struct MANGOS_DLL_DECL boss_lich_king_tocAI : public ScriptedAI pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[20].x, SpawnLoc[20].y, SpawnLoc[20].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); - pInstance->SetData(TYPE_STAGE,9); - m_creature->SetVisibility(VISIBILITY_OFF); } } - + pInstance->SetData(TYPE_STAGE,9); Event=false; m_creature->ForcedDespawn(); pInstance->SetData(TYPE_EVENT,5090); - UpdateTimer = 1000; + UpdateTimer = 20000; break; } } else UpdateTimer -= diff; @@ -515,10 +504,10 @@ struct MANGOS_DLL_DECL npc_fizzlebang_tocAI : public ScriptedAI InstanceData* pInstance; uint32 UpdateTimer; - void JustDied() + void JustDied(Unit* pKiller) { - DoScriptText(-1713515, m_creature); - pInstance->SetData(TYPE_EVENT, 1160); + DoScriptText(-1713715, m_creature, pKiller); + pInstance->SetData(TYPE_EVENT, 1180); } void Reset() @@ -538,21 +527,20 @@ struct MANGOS_DLL_DECL npc_fizzlebang_tocAI : public ScriptedAI { case 1110: pInstance->SetData(TYPE_EVENT, 1120); - UpdateTimer = 1000; + m_creature->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z);; + UpdateTimer = 7000; break; case 1120: DoScriptText(-1713511, m_creature); pInstance->SetData(TYPE_EVENT, 1130); - m_creature->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z);; - UpdateTimer = 18000; + UpdateTimer = 12000; break; case 1130: DoScriptText(-1713512, m_creature); pInstance->SetData(TYPE_EVENT, 1140); - UpdateTimer = 10000; + UpdateTimer = 8000; break; case 1140: - DoScriptText(-1713513, m_creature); pInstance->SetData(TYPE_STAGE,4); pInstance->SetData(TYPE_JARAXXUS,IN_PROGRESS); if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_JARAXXUS))) { @@ -574,6 +562,16 @@ struct MANGOS_DLL_DECL npc_fizzlebang_tocAI : public ScriptedAI } pInstance->SetData(TYPE_EVENT, 1150); + UpdateTimer = 500; + break; + case 1150: + DoScriptText(-1713513, m_creature); + pInstance->SetData(TYPE_EVENT, 1160); + UpdateTimer = 1000; + break; + case 1160: + DoScriptText(-1713515, m_creature); + pInstance->SetData(TYPE_EVENT, 1170); UpdateTimer = 1000; break; } @@ -602,6 +600,12 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI { } + void AttackStart(Unit *who) + { + //ignore all attackstart commands + return; + } + void UpdateAI(const uint32 diff) { if (!pInstance) return; @@ -641,35 +645,67 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI pTemp->SetInCombatWithZone(); } } - UpdateTimer = 2000; + UpdateTimer = 10000; pInstance->SetData(TYPE_EVENT,160); break; case 200: DoScriptText(-1713503, m_creature); - UpdateTimer = 2000; + UpdateTimer = 10000; pInstance->SetData(TYPE_EVENT,210); break; + case 210: + m_creature->SummonCreature(NPC_DREADSCALE, SpawnLoc[3].x, SpawnLoc[3].y, SpawnLoc[3].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + m_creature->SummonCreature(NPC_ACIDMAW, SpawnLoc[4].x, SpawnLoc[4].y, SpawnLoc[4].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_DREADSCALE))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetInCombatWithZone(); + } + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_ACIDMAW))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetInCombatWithZone(); + } + UpdateTimer = 10000; + pInstance->SetData(TYPE_EVENT,220); + break; case 300: DoScriptText(-1713505, m_creature); - UpdateTimer = 2000; + UpdateTimer = 10000; pInstance->SetData(TYPE_EVENT,310); break; + case 310: + m_creature->SummonCreature(NPC_ICEHOWL, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_ICEHOWL))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetInCombatWithZone(); + } + UpdateTimer = 10000; + pInstance->SetData(TYPE_EVENT,320); + break; case 400: DoScriptText(-1713509, m_creature); - UpdateTimer = 2000; + UpdateTimer = 5000; pInstance->SetData(TYPE_EVENT,410); break; case 1010: DoScriptText(-1713510, m_creature); - UpdateTimer = 3000; + UpdateTimer = 5000; if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_FIZZLEBANG))) pTemp->Respawn(); else m_creature->SummonCreature(NPC_FIZZLEBANG, SpawnLoc[21].x, SpawnLoc[21].y, SpawnLoc[21].z, 2, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); pInstance->SetData(TYPE_EVENT,1110); break; + case 1180: + DoScriptText(-1713516, m_creature); + UpdateTimer = 3000; + pInstance->SetData(TYPE_EVENT,1190); + break; + case 2000: DoScriptText(-1713526, m_creature); UpdateTimer = 5000; @@ -701,7 +737,7 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI pInstance->SetData(TYPE_EVENT,3071); break; //Summoning crusaders - case 3090: + case 3091: pInstance->SetData(TYPE_STAGE,5); pInstance->SetData(TYPE_CRUSADERS,IN_PROGRESS); if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_1))) @@ -764,7 +800,9 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI pTemp->SetInCombatWithZone(); } } - if (pInstance->GetData(TYPE_DIFFICULTY) == 25) { + if (pInstance->GetData(TYPE_DIFFICULTY) == RAID_DIFFICULTY_25MAN_NORMAL + || pInstance->GetData(TYPE_DIFFICULTY) == RAID_DIFFICULTY_25MAN_HEROIC) + { if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_7))) pTemp->Respawn(); else { @@ -826,7 +864,12 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI } } } - case 3091: + UpdateTimer = 3000; + pInstance->SetData(TYPE_EVENT,3095); + break; + +//summoning crusaders + case 3090: pInstance->SetData(TYPE_STAGE,6); pInstance->SetData(TYPE_CRUSADERS,IN_PROGRESS); if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_1))) @@ -889,7 +932,9 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI pTemp->SetInCombatWithZone(); } } - if (pInstance->GetData(TYPE_DIFFICULTY) == 25) { + if (pInstance->GetData(TYPE_DIFFICULTY) == RAID_DIFFICULTY_25MAN_NORMAL + || pInstance->GetData(TYPE_DIFFICULTY) == RAID_DIFFICULTY_25MAN_HEROIC) + { if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_7))) pTemp->Respawn(); else { @@ -950,7 +995,7 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI pTemp->SetInCombatWithZone(); } } - } + } UpdateTimer = 3000; pInstance->SetData(TYPE_EVENT,3095); break; @@ -1010,18 +1055,38 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI UpdateTimer = 2000; pInstance->SetData(TYPE_EVENT,5010); pInstance->SetData(TYPE_STAGE,8); - m_creature->SummonCreature(NPC_LICH_KING_1, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 5, TEMPSUMMON_MANUAL_DESPAWN, 0); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_LICH_KING_1))) + { if(!pTemp->isAlive()) pTemp->Respawn(); } + else m_creature->SummonCreature(NPC_LICH_KING_1, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 5, TEMPSUMMON_MANUAL_DESPAWN, 0); break; case 5020: DoScriptText(-1713551, m_creature); - UpdateTimer = 10000; + UpdateTimer = 8000; pInstance->SetData(TYPE_EVENT,5030); break; case 6000: + m_creature->NearTeleportTo(SpawnLoc[19].x, SpawnLoc[19].y, SpawnLoc[19].z, 4.0f); + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT,6005); + break; + case 6005: DoScriptText(-1713565, m_creature); - UpdateTimer = 10000; + UpdateTimer = 5000; pInstance->SetData(TYPE_EVENT,6010); break; + case 6010: + if (pInstance->GetData(TYPE_DIFFICULTY) == RAID_DIFFICULTY_10MAN_HEROIC + || pInstance->GetData(TYPE_DIFFICULTY) == RAID_DIFFICULTY_25MAN_HEROIC) + DoScriptText(-1713566, m_creature); + UpdateTimer = 20000; + pInstance->SetData(TYPE_EVENT,6020); + break; + case 6020: + pInstance->SetData(TYPE_STAGE,10); + m_creature->ForcedDespawn(); + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT,6030); + break; } } else UpdateTimer -= diff; pInstance->SetData(TYPE_EVENT_TIMER, UpdateTimer); @@ -1049,6 +1114,12 @@ struct MANGOS_DLL_DECL npc_garrosh_tocAI : public ScriptedAI { } + void AttackStart(Unit *who) + { + //ignore all attackstart commands + return; + } + void UpdateAI(const uint32 diff) { if (!pInstance) return; @@ -1063,7 +1134,12 @@ struct MANGOS_DLL_DECL npc_garrosh_tocAI : public ScriptedAI case 120: m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_TALK); DoScriptText(-1713702, m_creature); - UpdateTimer = 5000; + UpdateTimer = 2000; + pInstance->SetData(TYPE_EVENT,122); + break; + case 122: + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE); + UpdateTimer = 3000; pInstance->SetData(TYPE_EVENT,130); break; case 2010: @@ -1076,20 +1152,15 @@ struct MANGOS_DLL_DECL npc_garrosh_tocAI : public ScriptedAI UpdateTimer = 5000; pInstance->SetData(TYPE_EVENT,3060); break; - case 3051: - DoScriptText(-1713531, m_creature); - UpdateTimer = 5000; - pInstance->SetData(TYPE_EVENT,3061); - break; case 3070: DoScriptText(-1713533, m_creature); UpdateTimer = 5000; pInstance->SetData(TYPE_EVENT,3080); break; - case 3071: - DoScriptText(-1713533, m_creature); + case 3081: + DoScriptText(-1713734, m_creature); UpdateTimer = 5000; - pInstance->SetData(TYPE_EVENT,3081); + pInstance->SetData(TYPE_EVENT,3091); break; case 4030: DoScriptText(-1713748, m_creature); @@ -1122,6 +1193,12 @@ struct MANGOS_DLL_DECL npc_rinn_tocAI : public ScriptedAI { } + void AttackStart(Unit *who) + { + //ignore all attackstart commands + return; + } + void UpdateAI(const uint32 diff) { if (!pInstance) return; @@ -1136,7 +1213,12 @@ struct MANGOS_DLL_DECL npc_rinn_tocAI : public ScriptedAI case 130: m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_TALK); DoScriptText(-1713502, m_creature); - UpdateTimer = 5000; + UpdateTimer = 2000; + pInstance->SetData(TYPE_EVENT,132); + break; + case 132: + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE); + UpdateTimer = 3000; pInstance->SetData(TYPE_EVENT,140); break; case 2020: @@ -1144,15 +1226,20 @@ struct MANGOS_DLL_DECL npc_rinn_tocAI : public ScriptedAI UpdateTimer = 5000; pInstance->SetData(TYPE_EVENT,2030); break; - case 3080: - DoScriptText(-1713534, m_creature); + case 3051: + DoScriptText(-1713731, m_creature); UpdateTimer = 5000; - pInstance->SetData(TYPE_EVENT,3090); + pInstance->SetData(TYPE_EVENT,3061); break; - case 3081: + case 3071: + DoScriptText(-1713733, m_creature); + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT,3081); + break; + case 3080: DoScriptText(-1713534, m_creature); UpdateTimer = 5000; - pInstance->SetData(TYPE_EVENT,3091); + pInstance->SetData(TYPE_EVENT,3090); break; case 4020: DoScriptText(-1713548, m_creature); From f4ad5b68a95138dfd6541c21a3927200ec2ec38f Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sat, 6 Mar 2010 01:36:04 +0300 Subject: [PATCH 174/405] Fix compile to VC9 + fix mangos patch --- VC90/90ScriptDev2.vcproj | 5710 +++++++++++++------------- patches/MaNGOS-9483-ScriptDev2.patch | 4 +- 2 files changed, 2857 insertions(+), 2857 deletions(-) diff --git a/VC90/90ScriptDev2.vcproj b/VC90/90ScriptDev2.vcproj index 29d23ed81..814929079 100644 --- a/VC90/90ScriptDev2.vcproj +++ b/VC90/90ScriptDev2.vcproj @@ -1,2855 +1,2855 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/patches/MaNGOS-9483-ScriptDev2.patch b/patches/MaNGOS-9483-ScriptDev2.patch index b75d1df69..843598aca 100644 --- a/patches/MaNGOS-9483-ScriptDev2.patch +++ b/patches/MaNGOS-9483-ScriptDev2.patch @@ -53,8 +53,8 @@ index 4d2b641..7787e6c 100644 ../../dep/src/g3dlite/libg3dlite.a \ ../../dep/src/gsoap/libgsoap.a --mangos_worldd_LDFLAGS = -L../../dep/src/sockets -L../../dep/src/g3dlite -L../../dep/src/gsoap -L../bindings/universal/ -L$(libdir) $(MANGOS_LIBS) -export-dynamic -+mangos_worldd_LDFLAGS = -L../../dep/src/sockets -L../../dep/src/g3dlite -L../../dep/src/gsoap -L../bindings/ScriptDev2/ -L$(libdir) $(MANGOS_LIBS) -export-dynamic +-mangos_worldd_LDFLAGS = -L../../dep/src/g3dlite -L../../dep/src/gsoap -L../bindings/universal/ -L$(libdir) $(MANGOS_LIBS) -export-dynamic ++mangos_worldd_LDFLAGS = -L../../dep/src/g3dlite -L../../dep/src/gsoap -L../bindings/ScriptDev2/ -L$(libdir) $(MANGOS_LIBS) -export-dynamic ## Additional files to include when running 'make dist' # Include world daemon configuration From 52ee0bb1e362444c1bc5332a68dfb0c079c340d1 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sat, 6 Mar 2010 18:06:26 +0300 Subject: [PATCH 175/405] Small change for preview patch. Fucking developers :( --- Makefile.am | 15 ++++------ .../trial_of_the_crusader.h | 1 + sql/Updates/r1632_mangos.sql | 16 +++++----- system/ScriptLoader.cpp | 30 ++++++++----------- 4 files changed, 27 insertions(+), 35 deletions(-) diff --git a/Makefile.am b/Makefile.am index 95316ce1c..6b239bb39 100644 --- a/Makefile.am +++ b/Makefile.am @@ -317,18 +317,8 @@ scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp \ scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp \ scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp \ scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp \ -<<<<<<< HEAD:Makefile.am scripts/northrend/draktharon_keep/draktharon_keep.h \ scripts/northrend/draktharon_keep/boss_dred.cpp \ -======= -scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak.cpp \ -scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp \ -scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp \ -scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp \ -scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp \ -scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp \ -scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h \ ->>>>>>> 502d01c570b503a5c23a524d3caa9065c298a1e3:Makefile.am scripts/northrend/draktharon_keep/boss_novos.cpp \ scripts/northrend/draktharon_keep/boss_tharonja.cpp \ scripts/northrend/draktharon_keep/boss_trollgore.cpp \ @@ -531,6 +521,11 @@ scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions. scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp \ scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp \ scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h \ +scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak.cpp \ +scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp \ +scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp \ +scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp \ +scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp \ scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp \ scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp \ scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h \ diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index cf7971083..939ed74af 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -80,6 +80,7 @@ enum TYPE_DIFFICULTY = 101, TYPE_EVENT_TIMER = 102, TYPE_EVENT_NPC = 103, + TYPE_NORTHREND_BEASTS = 110, DESPAWN_TIME = 300000 diff --git a/sql/Updates/r1632_mangos.sql b/sql/Updates/r1632_mangos.sql index 3fe6ca965..018ddf1a2 100644 --- a/sql/Updates/r1632_mangos.sql +++ b/sql/Updates/r1632_mangos.sql @@ -1,9 +1,9 @@ UPDATE instance_template SET script='instance_trial_of_the_crusader' WHERE map=649; -UPDATE creature_template SET ScriptName='boss_gormok' WHERE entry=34796; -UPDATE creature_template SET ScriptName='boss_acidmaw' WHERE entry=35144; -UPDATE creature_template SET ScriptName='boss_dreadscale' WHERE entry=34799; -UPDATE creature_template SET ScriptName='boss_icehowl' WHERE entry=34797; -UPDATE creature_template SET ScriptName='boss_jaraxxis' WHERE entry=34780; -UPDATE creature_template SET ScriptName='boss_anubarak_trial' WHERE entry=34564; -UPDATE creature_template SET ScriptName='boss_fjola' WHERE entry=34497; -UPDATE creature_template SET ScriptName='boss_eydis' WHERE entry=34496; +-- UPDATE creature_template SET ScriptName='boss_gormok' WHERE entry=34796; +-- UPDATE creature_template SET ScriptName='boss_acidmaw' WHERE entry=35144; +-- UPDATE creature_template SET ScriptName='boss_dreadscale' WHERE entry=34799; +-- UPDATE creature_template SET ScriptName='boss_icehowl' WHERE entry=34797; +-- UPDATE creature_template SET ScriptName='boss_jaraxxis' WHERE entry=34780; +-- UPDATE creature_template SET ScriptName='boss_anubarak_trial' WHERE entry=34564; +-- UPDATE creature_template SET ScriptName='boss_fjola' WHERE entry=34497; +-- UPDATE creature_template SET ScriptName='boss_eydis' WHERE entry=34496; diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index fbf93fcb1..2c80c13bc 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -258,14 +258,19 @@ extern void AddSC_ungoro_crater(); extern void AddSC_winterspring(); //northrend -extern void AddSC_trial_of_the_crusader(); //trial_of_the_crusader +extern void AddSC_northrend_beasts(); //Crusaders' Coliseum, trial_of_the_crusader +extern void AddSC_boss_jaraxxus(); +extern void AddSC_boss_anubarak_trial(); +extern void AddSC_twin_valkyr(); +extern void AddSC_trial_of_the_crusader(); extern void AddSC_instance_trial_of_the_crusader(); -extern void AddSC_trial_of_the_champion(); //trial_of_the_champion +extern void AddSC_trial_of_the_champion(); //trial_of_the_champion extern void AddSC_boss_argent_challenge(); extern void AddSC_boss_black_knight(); extern void AddSC_boss_grand_champions(); extern void AddSC_instance_trial_of_the_champion(); + extern void AddSC_boss_jedoga(); //ahnkahet extern void AddSC_boss_nadox(); extern void AddSC_boss_taldaram(); @@ -275,17 +280,9 @@ extern void AddSC_boss_anubarak(); //azjol-nerub extern void AddSC_boss_hadronox(); extern void AddSC_boss_krikthir(); extern void AddSC_instance_azjol_nerub(); -<<<<<<< HEAD:system/ScriptLoader.cpp extern void AddSC_boss_dred(); //draktharon_keep extern void AddSC_boss_novos(); -======= -extern void AddSC_northrend_beasts(); //Crusaders' Coliseum, trial_of_the_crusader -extern void AddSC_boss_jaraxxus(); -extern void AddSC_boss_anubarak_trial(); -extern void AddSC_twin_valkyr(); -extern void AddSC_instance_trial_of_the_crusader(); extern void AddSC_boss_novos(); //draktharon_keep ->>>>>>> 502d01c570b503a5c23a524d3caa9065c298a1e3:system/ScriptLoader.cpp extern void AddSC_boss_tharonja(); extern void AddSC_boss_trollgore(); extern void AddSC_boss_colossus(); //gundrak @@ -733,6 +730,10 @@ void AddScripts() AddSC_winterspring(); //northrend + AddSC_northrend_beasts(); //Crusaders' Coliseum, trial_of_the_crusader + AddSC_boss_jaraxxus(); + AddSC_boss_anubarak_trial(); + AddSC_twin_valkyr(); AddSC_trial_of_the_crusader(); //trial_of_the_crusader AddSC_instance_trial_of_the_crusader(); @@ -751,11 +752,6 @@ void AddScripts() AddSC_boss_hadronox(); AddSC_boss_krikthir(); AddSC_instance_azjol_nerub(); - AddSC_northrend_beasts(); //Crusaders' Coliseum, trial_of_the_crusader - AddSC_boss_jaraxxus(); - AddSC_boss_anubarak_trial(); - AddSC_twin_valkyr(); - AddSC_instance_trial_of_the_crusader(); AddSC_boss_novos(); //draktharon_keep AddSC_boss_dred(); AddSC_boss_tharonja(); @@ -939,8 +935,8 @@ void AddScripts() AddSC_boss_nethermancer_sepethrea(); AddSC_boss_pathaleon_the_calculator(); AddSC_instance_mechanar(); - //culling of stratholme - AddSC_boss_lord_epoch(); + + AddSC_boss_lord_epoch(); //culling of stratholme AddSC_culling_of_stratholme(); AddSC_boss_malganis(); AddSC_boss_meathook(); From 5169e9d19f779d750b6467ff40f3a6c087feded5 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sat, 6 Mar 2010 18:12:58 +0300 Subject: [PATCH 176/405] Anubarak in TOC renamed. Fucking developers!!! --- Makefile.am | 2 +- .../{boss_anubarak.cpp => boss_anubarak_toc.cpp} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename scripts/northrend/crusaders_coliseum/trial_of_the_crusader/{boss_anubarak.cpp => boss_anubarak_toc.cpp} (100%) diff --git a/Makefile.am b/Makefile.am index 6b239bb39..1c8420614 100644 --- a/Makefile.am +++ b/Makefile.am @@ -521,7 +521,7 @@ scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions. scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp \ scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp \ scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h \ -scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak.cpp \ +scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_toc.cpp \ scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp \ scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp \ scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp \ diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_toc.cpp similarity index 100% rename from scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak.cpp rename to scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_toc.cpp From a77c9601cec037e7268dc161fd73a5567a1cfaf1 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sat, 6 Mar 2010 18:50:44 +0300 Subject: [PATCH 177/405] boss_anubarak corect. fucking developers :( --- .../trial_of_the_crusader/boss_anubarak_toc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_toc.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_toc.cpp index 5556270e9..55fd5d80a 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_toc.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_toc.cpp @@ -73,6 +73,6 @@ void AddSC_boss_anubarak_trial() newscript = new Script; newscript->Name = "boss_anubarak_trial"; - newscript->GetAI = &GetAI_boss_anubarak; + newscript->GetAI = &GetAI_boss_anubarak_trial; newscript->RegisterSelf(); } \ No newline at end of file From 5b30ea5466868f7a78da632b4f2be90a74de0ebd Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sat, 6 Mar 2010 18:54:35 +0300 Subject: [PATCH 178/405] Small change to scriptloader() --- system/ScriptLoader.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index 2c80c13bc..964560131 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -360,13 +360,7 @@ extern void AddSC_borean_tundra(); extern void AddSC_dalaran(); extern void AddSC_dragonblight(); extern void AddSC_grizzly_hills(); -<<<<<<< HEAD:system/ScriptLoader.cpp - -extern void AddSC_howling_fjord(); - -======= extern void AddSC_howling_fjord(); ->>>>>>> 502d01c570b503a5c23a524d3caa9065c298a1e3:system/ScriptLoader.cpp extern void AddSC_icecrown(); extern void AddSC_sholazar_basin(); extern void AddSC_storm_peaks(); From 8d5953379190a1e26c673606da081591a948e15c Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sun, 7 Mar 2010 17:43:53 +0300 Subject: [PATCH 179/405] anubarac rename to SD2 name --- Makefile.am | 2 +- .../{boss_anubarak_toc.cpp => boss_anubarak_trial.cpp} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename scripts/northrend/crusaders_coliseum/trial_of_the_crusader/{boss_anubarak_toc.cpp => boss_anubarak_trial.cpp} (100%) diff --git a/Makefile.am b/Makefile.am index 1c8420614..7187483a7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -521,7 +521,7 @@ scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions. scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp \ scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp \ scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h \ -scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_toc.cpp \ +scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp \ scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp \ scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp \ scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp \ diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_toc.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp similarity index 100% rename from scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_toc.cpp rename to scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp From 9fed2eee68fb9ed6b2d3cfb66dd15fb6cc992c69 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Mon, 8 Mar 2010 23:14:22 +0300 Subject: [PATCH 180/405] Correct Deathbringer cache GUIDs --- addition/721_icecrown_mangos.sql | 2 ++ .../icecrown_citadel/icecrown_citadel/def_spire.h | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/addition/721_icecrown_mangos.sql b/addition/721_icecrown_mangos.sql index c46354b0a..e23febdea 100644 --- a/addition/721_icecrown_mangos.sql +++ b/addition/721_icecrown_mangos.sql @@ -45,6 +45,8 @@ UPDATE `instance_template` SET `script`='instance_icecrown_spire' WHERE `map`=63 -- Saurfang UPDATE `creature_template` SET `ScriptName`='boss_deathbringer_saurfang' WHERE `entry`=37813; +DELETE FROM `gameobject` WHERE `guid` IN (913383, 913385, 913395, 913397); +DELETE FROM `gameobject_template` WHERE `entry` IN (902241,902242); -- Deathwhisper UPDATE `creature_template` SET `ScriptName`='boss_lady_deathwhisper' WHERE `entry`=36855; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h index 88f174c61..9d5ed544e 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h @@ -71,10 +71,10 @@ enum GO_FROZENTRONE_TR = 202223, //72061 - GO_SAURFANG_CACHE_10 = 202239, - GO_SAURFANG_CACHE_25 = 202240, - GO_SAURFANG_CACHE_10_H = 902241, //need correct! not in YTDB 533 - GO_SAURFANG_CACHE_25_H = 902242, //need correct! not in YTDB 533 + GO_SAURFANG_CACHE_10 = 202239, // 2753 + GO_SAURFANG_CACHE_25 = 202240, // 2761 + GO_SAURFANG_CACHE_10_H = 202241, // 2910 + GO_SAURFANG_CACHE_25_H = 202238, // 2724 GO_GUNSHIP_ARMORY_10 = 201873, GO_GUNSHIP_ARMORY_25 = 201874, From cc1eb39652ee77d8171190fd067a15ac409c8802 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Tue, 9 Mar 2010 13:16:30 +0300 Subject: [PATCH 181/405] TOC rewrite part 15 --- addition/724_trial_of_crusader_scriptdev2.sql | 2 +- .../boss_anubarak_trial.cpp | 21 +++++++- .../instance_trial_of_the_crusader.cpp | 48 +++++++++++++------ .../trial_of_the_crusader.cpp | 28 +++++++++-- .../trial_of_the_crusader.h | 22 +++++++++ 5 files changed, 100 insertions(+), 21 deletions(-) diff --git a/addition/724_trial_of_crusader_scriptdev2.sql b/addition/724_trial_of_crusader_scriptdev2.sql index dfcd832d0..318f44b58 100644 --- a/addition/724_trial_of_crusader_scriptdev2.sql +++ b/addition/724_trial_of_crusader_scriptdev2.sql @@ -73,4 +73,4 @@ INSERT INTO `script_texts` ('34564','16237','-1713563','Еще одна душа накормит хозяина.','1','0','0',''), ('34564','16238','-1713564','Я подвел тебя, господин...','1','0','0',''), ('36095','0','-1713565','Чемпионы, вы прошли испытание великого крестоносца! Знайте, что только самые сильные искатели приключений могли рассчитывать завершить это испытание.','1','0','0',''), -('36095','0','-1713566','Позвольте вручить вам этот сундук в качестве заслуженной награды, и пусть его содержимое послужит вам верой и правдой в походе против Артаса в самом центре Цитадели Ледяной Короны!','1','0','0',''); +('36095','0','-1713566','Позвольте вручить вам эти сундуки в качестве заслуженной награды, и пусть его содержимое послужит вам верой и правдой в походе против Артаса в самом центре Цитадели Ледяной Короны!','1','0','0',''); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp index 55fd5d80a..156ee917e 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp @@ -17,13 +17,32 @@ /* ScriptData SDName: boss_anubarak_trial SD%Complete: 0 -SDComment: +SDComment: by /dev/rsa SDCategory: EndScriptData */ #include "precompiled.h" #include "trial_of_the_crusader.h" +enum +{ + TYPE_BOSS = TYPE_ANUBARAK, + NPC_FROST_SPHERE = 34606, + +}; +enum BossSpells +{ + SPELL_0, + SPELL_BERSERK, + BOSS_SPELL_COUNT +}; +static SpellTable m_BossSpell[]= +{ +// Name 10 25 10H 25H +{SPELL_0, 70138, 70140, 70140, 70137, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, +{SPELL_BERSERK, 47008, 47008, 47008, 47008, 300000, 300000, 300000, 300000, 300000, 300000, 300000, 300000, 65535, CAST_ON_SELF, false, false}, +}; + struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI { boss_anubarak_trialAI(Creature* pCreature) : ScriptedAI(pCreature) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index 1e2351bbd..fdefe6b22 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -93,7 +93,10 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance uint64 m_uiTC25h50GUID; uint64 m_uiTC25h99GUID; - uint64 m_uiTributeChestGUID; + uint64 m_uiTributeChest1GUID; + uint64 m_uiTributeChest2GUID; + uint64 m_uiTributeChest3GUID; + uint64 m_uiTributeChest4GUID; void Initialize() { @@ -101,7 +104,10 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance m_auiEncounter[i] = NOT_STARTED; m_auiEncounter[0] = 0; m_auiEncounter[8] = 0; - m_uiTributeChestGUID = 0; + m_uiTributeChest1GUID = 0; + m_uiTributeChest2GUID = 0; + m_uiTributeChest3GUID = 0; + m_uiTributeChest4GUID = 0; m_auiEventTimer = 1000; } @@ -208,20 +214,31 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance case TYPE_ANUBARAK: m_auiEncounter[6] = uiData; if (uiData == DONE) { if(Difficulty == RAID_DIFFICULTY_10MAN_HEROIC){ - if ( m_auiEncounter[7] <= 25) m_uiTributeChestGUID = m_uiTC10h25GUID; - else if ( m_auiEncounter[7] <= 45) m_uiTributeChestGUID = m_uiTC10h45GUID; - else if ( m_auiEncounter[7] <= 50) m_uiTributeChestGUID = m_uiTC10h50GUID; - else m_uiTributeChestGUID = m_uiTC10h99GUID; + if ( m_auiEncounter[7] <= 25) m_uiTributeChest1GUID = m_uiTC10h25GUID; + if ( m_auiEncounter[7] <= 45) m_uiTributeChest2GUID = m_uiTC10h45GUID; + if ( m_auiEncounter[7] <= 50) m_uiTributeChest3GUID = m_uiTC10h50GUID; + m_uiTributeChest4GUID = m_uiTC10h99GUID; } if(Difficulty == RAID_DIFFICULTY_25MAN_HEROIC){ - if ( m_auiEncounter[7] <= 25) m_uiTributeChestGUID = m_uiTC25h25GUID; - else if ( m_auiEncounter[7] <= 45) m_uiTributeChestGUID = m_uiTC25h45GUID; - else if ( m_auiEncounter[7] <= 50) m_uiTributeChestGUID = m_uiTC25h50GUID; - else m_uiTributeChestGUID = m_uiTC25h99GUID; + if ( m_auiEncounter[7] <= 25) m_uiTributeChest1GUID = m_uiTC25h25GUID; + if ( m_auiEncounter[7] <= 45) m_uiTributeChest2GUID = m_uiTC25h45GUID; + if ( m_auiEncounter[7] <= 50) m_uiTributeChest3GUID = m_uiTC25h50GUID; + m_uiTributeChest4GUID = m_uiTC25h99GUID; } - if (m_uiTributeChestGUID) - if (GameObject* pChest = instance->GetGameObject(m_uiTributeChestGUID)) - if (pChest && !pChest->isSpawned()) pChest->SetRespawnTime(7*DAY); + // Attention! It is (may be) not off-like, but spawning all Tribute Chests is real + // reward for clearing TOC instance + if (m_uiTributeChest1GUID) + if (GameObject* pChest1 = instance->GetGameObject(m_uiTributeChest1GUID)) + if (pChest1 && !pChest1->isSpawned()) pChest1->SetRespawnTime(7*DAY); + if (m_uiTributeChest2GUID) + if (GameObject* pChest2 = instance->GetGameObject(m_uiTributeChest2GUID)) + if (pChest2 && !pChest2->isSpawned()) pChest2->SetRespawnTime(7*DAY); + if (m_uiTributeChest3GUID) + if (GameObject* pChest3 = instance->GetGameObject(m_uiTributeChest3GUID)) + if (pChest3 && !pChest3->isSpawned()) pChest3->SetRespawnTime(7*DAY); + if (m_uiTributeChest4GUID) + if (GameObject* pChest4 = instance->GetGameObject(m_uiTributeChest4GUID)) + if (pChest4 && !pChest4->isSpawned()) pChest4->SetRespawnTime(7*DAY); }; break; case TYPE_COUNTER: m_auiEncounter[7] = uiData; uiData = NOT_STARTED; break; @@ -423,10 +440,11 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; } - m_auiEncounter[0] = 0; - m_auiEncounter[8] = 0; + m_auiEncounter[TYPE_EVENT] = 0; + m_auiEncounter[TYPE_STAGE] = 0; OUT_LOAD_INST_DATA_COMPLETE; + } }; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index f208202f9..ba96edf41 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -39,11 +39,12 @@ static _Messages _GossipMessage[]= {"Вы готовы драться с крестоносцами альянса?",GOSSIP_ACTION_INFO_DEF+3,false,TYPE_CRUSADERS}, // {"Вы готовы драться с крестоносцами орды?",GOSSIP_ACTION_INFO_DEF+4,false,TYPE_CRUSADERS}, // {"Вы готовы к следующему этапу?",GOSSIP_ACTION_INFO_DEF+5,false,TYPE_FROJA}, // +{"Вы готовы продолжить бой с Ануб-Араком?",GOSSIP_ACTION_INFO_DEF+6,true,TYPE_LICH_KING}, // {"Не надо сюда тыкать. На сегодня арена закрыта.",GOSSIP_ACTION_INFO_DEF+7,true,TYPE_ANUBARAK}, // }; enum { - NUM_MESSAGES = 6, + NUM_MESSAGES = 7, }; @@ -302,6 +303,26 @@ switch(uiAction) { }; case GOSSIP_ACTION_INFO_DEF+6: { + if (GameObject* pGoFloor = pInstance->instance->GetGameObject(pInstance->GetData64(GO_ARGENT_COLISEUM_FLOOR))) + { + pGoFloor->SetUInt32Value(GAMEOBJECT_DISPLAYID,9060); + pGoFloor->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK_10 | GO_FLAG_NODESPAWN); + pGoFloor->SetUInt32Value(GAMEOBJECT_BYTES_1,8449); + } + pCreature->CastSpell(pCreature,69016,false); + + pInstance->SetData(TYPE_ANUBARAK,IN_PROGRESS); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_ANUBARAK))) + pTemp->Respawn(); + else { + pCreature->SummonCreature(NPC_ANUBARAK, SpawnLoc[19].x, SpawnLoc[19].y, SpawnLoc[19].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_ANUBARAK))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[20].x, SpawnLoc[20].y, SpawnLoc[20].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetInCombatWithZone(); + } + } + pInstance->SetData(TYPE_STAGE,9); break; }; @@ -487,10 +508,9 @@ struct MANGOS_DLL_DECL boss_lich_king_tocAI : public ScriptedAI } }; -CreatureAI* GetAI_boss_lich_king_toc(Creature *_Creature) +CreatureAI* GetAI_boss_lich_king_toc(Creature* pCreature) { - boss_lich_king_tocAI* newAI = new boss_lich_king_tocAI(_Creature); - return newAI; + return new boss_lich_king_tocAI(pCreature); } struct MANGOS_DLL_DECL npc_fizzlebang_tocAI : public ScriptedAI diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index 939ed74af..1ec6bc72e 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -131,4 +131,26 @@ struct WayPoints float x, y, z; }; +enum SpellTableParameters +{ + DIFFICULTY_LEVELS = 4, + CAST_ON_SELF = 1000, + CAST_ON_SUMMONS, + CAST_ON_VICTIM, + CAST_ON_RANDOM, + CAST_ON_BOTTOMAGGRO, +}; + +struct SpellTable +{ + uint32 id; + uint32 m_uiSpellEntry[DIFFICULTY_LEVELS]; // Stores spell entry for difficulty levels + uint32 m_uiSpellTimerMin[DIFFICULTY_LEVELS]; // The timer (min) before the next spell casting, in milliseconds + uint32 m_uiSpellTimerMax[DIFFICULTY_LEVELS]; // The timer (max) before the next spell casting + uint32 m_uiStageMask; // The mask of stages where spell is casted + uint32 m_CastTarget; // Target on casting spell + bool m_IsVisualEffect; // Spellcasting is visual effect or real effect + bool m_IsBugged; // Need override for this spell +}; + #endif From 268e41ea024bea17e59cf811fbde9e8ea516067d Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Tue, 9 Mar 2010 19:47:49 +0300 Subject: [PATCH 182/405] TOC rewrite part 16 && icecrown_spire text&yells --- addition/721_icecrown_scriptdev2.sql | 31 ++++++++++++ .../boss_anubarak_trial.cpp | 25 +++++++--- .../trial_of_the_crusader/boss_jaraxxus.cpp | 33 ++++++++++++- .../boss_northrend_beasts.cpp | 47 ++++++++++++++++++- .../instance_trial_of_the_crusader.cpp | 26 +++++++++- .../trial_of_the_crusader.cpp | 2 +- .../trial_of_the_crusader.h | 6 +++ 7 files changed, 157 insertions(+), 13 deletions(-) create mode 100644 addition/721_icecrown_scriptdev2.sql diff --git a/addition/721_icecrown_scriptdev2.sql b/addition/721_icecrown_scriptdev2.sql new file mode 100644 index 000000000..36bdc0538 --- /dev/null +++ b/addition/721_icecrown_scriptdev2.sql @@ -0,0 +1,31 @@ +INSERT INTO `script_texts` (`entry`,`content_loc8`, `content_default`, `sound`, `type`, `language`, `emote`, `comment`) VALUES +('-1631000','Это начало и конец, смертные. Никто не может войти в Храм!','This is the beginning AND the end, mortals. None may enter the master\'s sanctum!','16950','1','0','0','marrowgar SAY_INTRO'), +('-1631001','Проклятые несут миру смерть и разрушение!','The Scourge will wash over this world as a swarm of death and destruction!','16941','1','0','0','marrowgar SAY_AGGRO'), +('-1631002','Шторм костей!','BONE STORM!','16946','1','0','0','marrowgar SAY_BONESTORM'), +('-1631003','Проткнут костью!','Bound by bone!','16947','1','0','0','marrowgar SAY_BONESPIKE1'), +('-1631004','','Stick Around!','16948','1','0','0','marrowgar SAY_BONESPIKE2'), +('-1631005','Выход - только смерть!','The only escape is death!','16949','1','0','0','marrowgar SAY_BONESPIKE3'), +('-1631006','Больше костей!','More bones for the offering!','16942','1','0','0','marrowgar SAY_KILL1'), +('-1631007','','Languish in damnation!','16943','1','0','0','marrowgar SAY_KILL2'), +('-1631008','ЯРОСТЬ МАСТЕРА ТЕЧЕТ ЧЕРЕЗ МЕНЯ!','THE MASTER\'S RAGE COURSES THROUGH ME!','16945','1','0','0','marrowgar SAY_ENRAGE'), +('-1631009','Я вижу... Только тьму...','I see... only darkness...','16944','1','0','0','marrowgar SAY_DEATH'), +('-1631020','','Fix your eyes upon your crude hands! The sinew, the soft meat, the dark blood coursing within! It is a weakness! A crippling flaw! A joke played by the creators upon their own creations! The sooner you come to accept your condition as a defect, the sooner you will find yourselves in a position to transcend it!','16878','1','0','0','deathwhisper SAY_INTRO1'), +('-1631021','','Through our master all things are possible! His power is without limit, and his will unbending! Those who oppose him will be destroyed utterly! And those who serve, who serve wholly, unquestioningly, with utter devotion of mind and soul? Elevated! To heights beyond your ken!','16879','1','0','0','deathwhisper SAY_INTRO2'), +('-1631022','','You have found your way here, because you are among the few gifted with true vision in a world cursed with blindness! You can see through the fog that hangs over this world like a shroud and grasp where true power lies!','16880','1','0','0','deathwhisper SAY_INTRO3'), +('-1631023','','What is this disturbance?! You dare trespass upon this hallowed ground? This shall be your final resting place.','16868','1','0','0','deathwhisper SAY_AGGRO'), +('-1631024','Однако! Я вижу что пора взять дело в свои руки.','Enough! I see I must take matters into my own hands!','16877','1','0','0','deathwhisper SAY_PHASE2'), +('-1631025','Вы слабы и бессильны против меня!','You are weak, powerless to resist my will!','16876','1','0','0','deathwhisper SAY_DOMINATEMIND'), +('-1631026','','Take this blessing and show these intruders a taste of our master\'s power.','16873','1','0','0','deathwhisper SAY_DARKEMPOWERMENT'), +('-1631027','Мои слуги! Я освобождаю вас от проклятия плоти!','Loyal adherent! I release you from the curse of flesh!','16874','1','0','0','deathwhisper SAY_DARKTRANSFORMATION'), +('-1631028','','Arise and exalt in your pure form!','16875','1','0','0','deathwhisper SAY_ANIMATEDEAD'), +('-1631029','','Do you yet grasp of the futility of your actions?','16869','1','0','0','deathwhisper SAY_KILL1'), +('-1631030','Прими Тьму! Тьма вечна...','Embrace the darkness... Darkness eternal!','16870','1','0','0','deathwhisper SAY_KILL2'), +('-1631031','Это игра продолжается слишком долго!','This charade has gone on long enough.','16872','1','0','0','deathwhisper SAY_BERSERK'), +('-1631032','Все - части плана Мастера! Ваш конец неизбежен...','All part of the masters plan! Your end is... inevitable!','16871','1','0','0','deathwhisper SAY_DEATH'), +('-1631100','Во имя Короля-Лича!','BY THE MIGHT OF THE LICH KING!','16694','1','0','0','saurfang SAY_AGGRO'), +('-1631101','Земля станет красной от вашей крови!','The ground runs red with your blood!','16699','1','0','0','saurfang SAY_FALLENCHAMPION'), +('-1631102','Корм, мои рабы!','Feast, my minions!','16700','1','0','0','saurfang SAY_BLOODBEASTS'), +('-1631103','Ты никто!','You are nothing!','16695','1','0','0','saurfang SAY_KILL1'), +('-1631104','Ваши души не найдут здесь избавления!','Your soul will find no redemption here!','16696','1','0','0','saurfang SAY_KILL2'), +('-1631105','Я вижу приближение смерти!','I have become... death!','16698','1','0','0','saurfang SAY_BERSERK'), +('-1631106','Я... Использован...','I... Am... Released.','16697','1','0','0','saurfang SAY_DEATH'); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp index 156ee917e..81816504d 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: boss_anubarak_trial -SD%Complete: 0 +SD%Complete: 1% SDComment: by /dev/rsa SDCategory: EndScriptData */ @@ -24,23 +24,34 @@ EndScriptData */ #include "precompiled.h" #include "trial_of_the_crusader.h" -enum +enum Summons { - TYPE_BOSS = TYPE_ANUBARAK, NPC_FROST_SPHERE = 34606, - + NPC_GUARDIAN = 34607, + NPC_DATTER = 34605, }; + enum BossSpells { - SPELL_0, + SPELL_COLD, + SPELL_LEECHING_SWARM, + SPELL_IMPALE, + SPELL_POUND, + SPELL_SUBMERGE, + SPELL_SUMMON_BEATLES, SPELL_BERSERK, BOSS_SPELL_COUNT }; static SpellTable m_BossSpell[]= { // Name 10 25 10H 25H -{SPELL_0, 70138, 70140, 70140, 70137, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_BERSERK, 47008, 47008, 47008, 47008, 300000, 300000, 300000, 300000, 300000, 300000, 300000, 300000, 65535, CAST_ON_SELF, false, false}, +{SPELL_COLD, 66013, 67700, 68509, 68510, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, +{SPELL_LEECHING_SWARM, 67630, 68646, 66118, 68647, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, +{SPELL_IMPALE, 65922, 65922, 65922, 65922, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, +{SPELL_POUND, 66013, 67700, 68509, 68510, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, +{SPELL_SUBMERGE, 53421, 53421, 53421, 53421, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, +{SPELL_SUMMON_BEATLES, 66339, 66339, 66339, 66339, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, true, false}, +{SPELL_BERSERK, 26662, 26662, 26662, 26662, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 65535, CAST_ON_SELF, false, false}, }; struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp index e6eb7921a..02d210929 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp @@ -16,14 +16,43 @@ /* ScriptData SDName: trial_of_the_crusader -SD%Complete: 0 -SDComment: +SD%Complete: 1 +SDComment: by /dev/rsa SDCategory: Crusader Coliseum EndScriptData */ #include "precompiled.h" #include "trial_of_the_crusader.h" +enum BossSpells +{ + SPELL_BUFF, + SPELL_INFERNAL, + SPELL_FEL_FIREBALL, + SPELL_FEL_LIGHTING, + SPELL_INCINERATE_FLESH, + SPELL_NETHER, + SPELL_LEGION_FLAME, + SPELL_BERSERK, + BOSS_SPELL_COUNT +}; + +static SpellTable m_BossSpell[]= +{ +// Name 10 25 10H 25H +{SPELL_BUFF, 67108, 67108, 67108, 67108, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, +{SPELL_INFERNAL, 66258, 66258, 66258, 66258, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, true, false}, +{SPELL_FEL_FIREBALL, 66532, 66963, 66964, 66965, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, +{SPELL_FEL_LIGHTING, 66528, 66528, 67029, 67029, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, +{SPELL_INCINERATE_FLESH, 66237, 67049, 67050, 67051, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, +{SPELL_NETHER, 66264, 66264, 68405, 68405, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, true, false}, +{SPELL_LEGION_FLAME, 68124, 68124, 68126, 68126, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, true, false}, +{SPELL_BERSERK, 26662, 26662, 26662, 26662, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 65535, CAST_ON_SELF, false, false}, +}; + + + + /*###### ## boss_jaraxxus ######*/ diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index e9b81d8a0..a1a6808b4 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -16,14 +16,57 @@ /* ScriptData SDName: -SD%Complete: 0 -SDComment: +SD%Complete: 1% +SDComment: by /dev/rsa SDCategory: EndScriptData */ #include "precompiled.h" #include "trial_of_the_crusader.h" +enum BossSpells +{ +SPELL_IMPALE, +SPELL_STAGGERING_STOMP, +SPELL_ACID_SPIT, +SPELL_PARALYTIC_SPRAY, +SPELL_SWEEP_0, +SPELL_SLIME_POOL, +SPELL_FIRE_SPLIT, +SPELL_MOLTEN_SPEW, +SPELL_SWEEP_1, +SPELL_FEROCIOUS_BUTT, +SPELL_MASSIVE_CRASH, +SPELL_WHIRL, +SPELL_ARCTIC_BREATH, +SPELL_TRAMPLE, +SPELL_BERSERK, +SPELL_ENRAGE, +BOSS_SPELL_COUNT +}; + +static SpellTable m_BossSpell[]= +{ +// Name 10 25 10H 25H +{SPELL_IMPALE, 67479, 67478, 67477, 66331, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, +{SPELL_STAGGERING_STOMP, 67648, 67647, 67649, 66630, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, +{SPELL_ACID_SPIT, 67607, 67607, 67607, 67607, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, +{SPELL_PARALYTIC_SPRAY, 67616, 67616, 67616, 66616, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, +{SPELL_SWEEP_0, 66794, 66794, 66794, 66794, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, +{SPELL_SLIME_POOL, 67642, 67642, 67642, 67642, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, +{SPELL_FIRE_SPLIT, 67632, 67632, 67632, 67632, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, +{SPELL_MOLTEN_SPEW, 66821, 66821, 66821, 66821, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, +{SPELL_SWEEP_1, 67646, 67646, 67646, 67646, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, +{SPELL_FEROCIOUS_BUTT, 67655, 67654, 67656, 66770, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, +{SPELL_MASSIVE_CRASH, 66683, 67660, 67661, 67662, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, +{SPELL_WHIRL, 67345, 67663, 67664, 67665, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, +{SPELL_ARCTIC_BREATH, 66689, 66689, 66689, 66689, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, +{SPELL_TRAMPLE, 66734, 66734, 66734, 66734, 10000, 10000, 10000, 10000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, +{SPELL_BERSERK, 26662, 26662, 26662, 26662, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 65535, CAST_ON_SELF, false, false}, +{SPELL_ENRAGE, 68335, 68335, 68335, 68335, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 65535, CAST_ON_SELF, false, false}, +}; + + struct MANGOS_DLL_DECL boss_gormokAI : public ScriptedAI { boss_gormokAI(Creature* pCreature) : ScriptedAI(pCreature) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index fdefe6b22..8aa0d0318 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -111,8 +111,32 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance m_auiEventTimer = 1000; } - void OnCreatureCreate(Creature* pCreature) + void OnPlayerEnter(Player *m_player) { + if (Difficulty == RAID_DIFFICULTY_10MAN_HEROIC || Difficulty == RAID_DIFFICULTY_25MAN_HEROIC) + { + m_player->SendUpdateWorldState(UPDATE_STATE_UI_SHOW,1); + m_player->SendUpdateWorldState(UPDATE_STATE_UI_COUNT, GetData(TYPE_COUNTER)); + } + } + + bool IsRaidWiped() + { + Map::PlayerList const &players = instance->GetPlayers(); + + for (Map::PlayerList::const_iterator i = players.begin(); i != players.end(); ++i) + { + if(Player* pPlayer = i->getSource()) + { + if(pPlayer->isAlive()) + return false; + } + } + return true; + } + + void OnCreatureCreate(Creature* pCreature) + { switch(pCreature->GetEntry()) { case NPC_BARRENT: m_uiBarrentGUID = pCreature->GetGUID(); break; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index ba96edf41..702f65101 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: Trial Of the crusader -SD%Complete: 30% +SD%Complete: 40% SDComment: event script by /dev/rsa SDCategory: trial_of_the_crusader EndScriptData */ diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index 1ec6bc72e..c693af61e 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -153,4 +153,10 @@ struct SpellTable bool m_IsBugged; // Need override for this spell }; +enum uiWorldStates +{ + UPDATE_STATE_UI_SHOW = 4390, + UPDATE_STATE_UI_COUNT = 4389, +}; + #endif From 6c6f42e9352554588b8c11681d0bd0a55be16678 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 10 Mar 2010 18:42:08 +0300 Subject: [PATCH 183/405] TOC - Jaraxxus partially added --- addition/724_trial_of_crusader_mangos.sql | 8 +- .../trial_of_the_crusader/boss_jaraxxus.cpp | 408 +++++++++++++++++- .../instance_trial_of_the_crusader.cpp | 14 +- .../trial_of_the_crusader.cpp | 1 + sql/Updates/r1632_mangos.sql | 8 +- 5 files changed, 422 insertions(+), 17 deletions(-) diff --git a/addition/724_trial_of_crusader_mangos.sql b/addition/724_trial_of_crusader_mangos.sql index d9c4479fb..60eb4474a 100644 --- a/addition/724_trial_of_crusader_mangos.sql +++ b/addition/724_trial_of_crusader_mangos.sql @@ -60,7 +60,13 @@ DELETE FROM `creature_loot_template` WHERE `entry` IN (34796,34799,35144); -- Jaraxxus --- UPDATE creature_template SET scriptname='boss_jaraxxus' WHERE entry=34780; +UPDATE `creature_template` SET `scriptname`='boss_jaraxxus', `AIName` ='' WHERE entry= 34780; +DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (34780, 34784, 34813, 34815, 34825, 34826); +UPDATE `creature_template` SET `scriptname`='mob_legion_flame', `AIName` ='' WHERE entry = 34784; +-- UPDATE `creature_template` SET `scriptname`='mob_infernal_volcano', `AIName` ='' WHERE entry = 34813; +-- UPDATE `creature_template` SET `scriptname`='mob_fel_infernal', `AIName` ='' WHERE entry = 34815; +UPDATE `creature_template` SET `scriptname`='mob_nether_portal', `AIName` ='' WHERE entry = 34825; +-- UPDATE `creature_template` SET `scriptname`='mob_mistress_of_pain', `AIName` ='' WHERE entry = 34826; -- Froja's -- UPDATE creature_template SET scriptname='boss_lightbane' WHERE entry=34497; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp index 02d210929..74c32795b 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp @@ -16,23 +16,40 @@ /* ScriptData SDName: trial_of_the_crusader -SD%Complete: 1 +SD%Complete: 10% SDComment: by /dev/rsa SDCategory: Crusader Coliseum EndScriptData */ #include "precompiled.h" #include "trial_of_the_crusader.h" +enum Default +{ + EQUIP_STAFF = 40343, +}; + +enum Summons +{ + NPC_LEGION_FLAME = 34784, + NPC_INFERNAL_VOLCANO = 34813, + NPC_FEL_INFERNAL = 34815, + NPC_NETHER_PORTAL = 34825, + NPC_MISTRESS = 34826, +}; enum BossSpells { - SPELL_BUFF, + SPELL_NETHER_POWER, SPELL_INFERNAL, + SPELL_INFERNAL_ERUPTION, SPELL_FEL_FIREBALL, SPELL_FEL_LIGHTING, SPELL_INCINERATE_FLESH, - SPELL_NETHER, + SPELL_BURNING_INFERNO, + SPELL_NETHER_PORTAL, SPELL_LEGION_FLAME, + SPELL_SHIVAN_SLASH, + SPELL_SPINNING_STRIKE, SPELL_BERSERK, BOSS_SPELL_COUNT }; @@ -40,13 +57,17 @@ enum BossSpells static SpellTable m_BossSpell[]= { // Name 10 25 10H 25H -{SPELL_BUFF, 67108, 67108, 67108, 67108, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, +{SPELL_NETHER_POWER, 67108, 67108, 67108, 67108, 10000, 10000, 10000, 10000, 15000, 15000, 15000, 15000, 65535, CAST_ON_SELF, false, false}, {SPELL_INFERNAL, 66258, 66258, 66258, 66258, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, true, false}, +{SPELL_INFERNAL_ERUPTION,66255, 66255, 66255, 66255, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, {SPELL_FEL_FIREBALL, 66532, 66963, 66964, 66965, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_FEL_LIGHTING, 66528, 66528, 67029, 67029, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, +{SPELL_FEL_LIGHTING, 66528, 66528, 67029, 67029, 15000, 15000, 15000, 15000, 25000, 25000, 25000, 25000, 65535, CAST_ON_RANDOM, false, false}, {SPELL_INCINERATE_FLESH, 66237, 67049, 67050, 67051, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_NETHER, 66264, 66264, 68405, 68405, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, true, false}, -{SPELL_LEGION_FLAME, 68124, 68124, 68126, 68126, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, true, false}, +{SPELL_BURNING_INFERNO, 66242, 67060, 67060, 67060, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, +{SPELL_NETHER_PORTAL, 66264, 66264, 68405, 68405, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, true, true}, +{SPELL_LEGION_FLAME, 68124, 68124, 68126, 68126, 30000, 30000, 30000, 30000, 45000, 45000, 45000, 45000, 65535, CAST_ON_RANDOM, false, false}, +{SPELL_SHIVAN_SLASH, 67098, 67098, 67098, 67098, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, +{SPELL_SPINNING_STRIKE, 66316, 66316, 66316, 66316, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, {SPELL_BERSERK, 26662, 26662, 26662, 26662, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 65535, CAST_ON_SELF, false, false}, }; @@ -66,13 +87,85 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI } ScriptedInstance* m_pInstance; + uint8 Difficulty; + uint32 m_uiSpell_Timer[BOSS_SPELL_COUNT]; + uint8 stage; + uint8 substage; + uint8 m_portalsCount; + + void Reset() { + if(!m_pInstance) return; + Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); + m_pInstance->SetData(TYPE_JARAXXUS, NOT_STARTED); + memset(&m_uiSpell_Timer, 0, sizeof(m_uiSpell_Timer)); + SetEquipmentSlots(false, EQUIP_STAFF, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE); + m_portalsCount = 0; + } + + bool QuerySpellPeriod(uint32 m_uiSpellIdx, uint32 diff) + { + if(!m_pInstance) return false; + bool result; + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + if (m_uiSpellIdx != pSpell->id) return false; + +// if (m_uiSpell_Timer[m_uiSpellIdx] == DAY) m_uiSpell_Timer[m_uiSpellIdx]=urand(0,pSpell->m_uiSpellTimerMax[Difficulty]); + + if (m_uiSpell_Timer[m_uiSpellIdx] < diff) { + m_uiSpell_Timer[m_uiSpellIdx]=urand(pSpell->m_uiSpellTimerMin[Difficulty],pSpell->m_uiSpellTimerMax[Difficulty]); + result = true; + } else { + m_uiSpell_Timer[m_uiSpellIdx] -= diff; + result = false; + }; + return result; + } + + bool CastBossSpell(uint32 m_uiSpellIdx) + { + if(!m_pInstance) return false; + Unit* pTarget; + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + // Find spell index - temporary direct insert from spelltable + if (m_uiSpellIdx != pSpell->id) return false; + + switch (pSpell->m_CastTarget) { + case CAST_ON_SELF: + pTarget = m_creature; + break; + case CAST_ON_SUMMONS: + pTarget = m_creature->getVictim(); //CHANGE IT!!! + break; + case CAST_ON_VICTIM: + pTarget = m_creature->getVictim(); + break; + case CAST_ON_RANDOM: + pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); + break; + case CAST_ON_BOTTOMAGGRO: + pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1); + break; + + }; + if (pTarget) DoCastSpellIfCan(pTarget,pSpell->m_uiSpellEntry[Difficulty]); + } + + uint64 CallGuard(uint64 npctype, TempSummonType type, uint32 _summontime ) + { + float fPosX, fPosY, fPosZ; + m_creature->GetPosition(fPosX, fPosY, fPosZ); + m_creature->GetRandomPoint(fPosX, fPosY, fPosZ, urand(10, 50), fPosX, fPosY, fPosZ); + Creature* pSummon = m_creature->SummonCreature(npctype, fPosX, fPosY, fPosZ, 0, type, _summontime); + if(pSummon) pSummon->SetInCombatWithZone(); +// DoScriptText(EMOTE_SUMMON, m_creature); + return pSummon ? pSummon->GetGUID() : 0; + } - void Reset() {} void JustReachedHome() { if (m_pInstance) - m_pInstance->SetData(TYPE_JARAXXUS, NOT_STARTED); + m_pInstance->SetData(TYPE_JARAXXUS, FAIL); } void JustDied(Unit* pKiller) @@ -84,6 +177,9 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI void Aggro(Unit* pWho) { m_creature->SetInCombatWithZone(); + m_pInstance->SetData(TYPE_JARAXXUS, IN_PROGRESS); + DoScriptText(-1713514,m_creature); + CastBossSpell(SPELL_NETHER_POWER); } void UpdateAI(const uint32 uiDiff) @@ -91,6 +187,21 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (QuerySpellPeriod(SPELL_FEL_FIREBALL, uiDiff)) + CastBossSpell(SPELL_FEL_FIREBALL); + if (QuerySpellPeriod(SPELL_FEL_LIGHTING, uiDiff)) + CastBossSpell(SPELL_FEL_LIGHTING); + if (QuerySpellPeriod(SPELL_INCINERATE_FLESH, uiDiff)) + CastBossSpell(SPELL_INCINERATE_FLESH); + if (QuerySpellPeriod(SPELL_LEGION_FLAME, uiDiff)) + CastBossSpell(SPELL_LEGION_FLAME); + if (QuerySpellPeriod(SPELL_INFERNAL_ERUPTION, uiDiff)) + CastBossSpell(SPELL_INFERNAL_ERUPTION); + if (QuerySpellPeriod(SPELL_NETHER_PORTAL, uiDiff) && m_portalsCount < 2) { + if (CallGuard(NPC_NETHER_PORTAL, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5000) != 0) + ++m_portalsCount; + }; + DoMeleeAttackIfReady(); } }; @@ -100,6 +211,260 @@ CreatureAI* GetAI_boss_jaraxxus(Creature* pCreature) return new boss_jaraxxusAI(pCreature); } +struct MANGOS_DLL_DECL mob_legion_flameAI : public ScriptedAI +{ + mob_legion_flameAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + uint8 Difficulty; + + void Reset() + { + Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); + } + + void KilledUnit(Unit* pVictim) + { + if (pVictim->GetTypeId() != TYPEID_PLAYER) return; + } + + void JustDied(Unit* Killer) + { + } + + void Aggro(Unit *who) + { + if (!m_pInstance) return; + } + + void UpdateAI(const uint32 diff) + { + if (m_pInstance->GetData(TYPE_JARAXXUS) == DONE) + m_creature->ForcedDespawn(); + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_legion_flame(Creature* pCreature) +{ + return new mob_legion_flameAI(pCreature); +} + +struct MANGOS_DLL_DECL mob_infernal_volcanoAI : public ScriptedAI +{ + mob_infernal_volcanoAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + uint8 Difficulty; + + void Reset() + { + Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); + } + + void KilledUnit(Unit* pVictim) + { + if (pVictim->GetTypeId() != TYPEID_PLAYER) return; + } + + void JustDied(Unit* Killer) + { + } + + void Aggro(Unit *who) + { + if (!m_pInstance) return; + } + + void UpdateAI(const uint32 diff) + { + if (m_pInstance->GetData(TYPE_JARAXXUS) == DONE) + m_creature->ForcedDespawn(); + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_infernal_volcano(Creature* pCreature) +{ + return new mob_infernal_volcanoAI(pCreature); +} + +struct MANGOS_DLL_DECL mob_fel_infernalAI : public ScriptedAI +{ + mob_fel_infernalAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + uint8 Difficulty; + + void Reset() + { + Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); + } + + void KilledUnit(Unit* pVictim) + { + if (pVictim->GetTypeId() != TYPEID_PLAYER) return; + } + + void JustDied(Unit* Killer) + { + } + + void Aggro(Unit *who) + { + if (!m_pInstance) return; + } + + void UpdateAI(const uint32 diff) + { + if (m_pInstance->GetData(TYPE_JARAXXUS) == DONE) + m_creature->ForcedDespawn(); + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_fel_infernal(Creature* pCreature) +{ + return new mob_fel_infernalAI(pCreature); +} + +struct MANGOS_DLL_DECL mob_nether_portalAI : public ScriptedAI +{ + mob_nether_portalAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + uint8 Difficulty; + uint32 m_Timer; + uint8 m_Count; + + void Reset() + { + Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); + m_Timer = 5000; + m_Count = 2; + if (Difficulty != RAID_DIFFICULTY_10MAN_HEROIC && Difficulty != RAID_DIFFICULTY_25MAN_HEROIC) + { + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_Count = 1; + }; + } + + void KilledUnit(Unit* pVictim) + { + if (pVictim->GetTypeId() != TYPEID_PLAYER) return; + } + + void AttackStart(Unit *who) + { + return; + } + + void JustDied(Unit* Killer) + { + } + + void Aggro(Unit *who) + { + if (!m_pInstance) return; + } + + void UpdateAI(const uint32 diff) + { + if (m_pInstance->GetData(TYPE_JARAXXUS) == DONE) + m_creature->ForcedDespawn(); + + if (m_Timer < diff && m_Count > 0) { + DoCastSpellIfCan(m_creature,m_BossSpell[SPELL_NETHER_PORTAL].m_uiSpellEntry[Difficulty]); + m_Timer=urand(m_BossSpell[SPELL_NETHER_PORTAL].m_uiSpellTimerMin[Difficulty],m_BossSpell[SPELL_NETHER_PORTAL].m_uiSpellTimerMax[Difficulty]); + --m_Count; + } else m_Timer -= diff; + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + } +}; + +CreatureAI* GetAI_mob_nether_portal(Creature* pCreature) +{ + return new mob_nether_portalAI(pCreature); +} + +struct MANGOS_DLL_DECL mob_mistress_of_painAI : public ScriptedAI +{ + mob_mistress_of_painAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + uint8 Difficulty; + + void Reset() + { + Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); + } + + void KilledUnit(Unit* pVictim) + { + if (pVictim->GetTypeId() != TYPEID_PLAYER) return; + } + + void JustDied(Unit* Killer) + { + } + + void Aggro(Unit *who) + { + if (!m_pInstance) return; + } + + void UpdateAI(const uint32 diff) + { + if (m_pInstance->GetData(TYPE_JARAXXUS) == DONE) + m_creature->ForcedDespawn(); + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_mistress_of_pain(Creature* pCreature) +{ + return new mob_mistress_of_painAI(pCreature); +} + void AddSC_boss_jaraxxus() { Script* newscript; @@ -108,4 +473,29 @@ void AddSC_boss_jaraxxus() newscript->Name = "boss_jaraxxus"; newscript->GetAI = &GetAI_boss_jaraxxus; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_legion_flame"; + newscript->GetAI = &GetAI_mob_legion_flame; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_infernal_volcano"; + newscript->GetAI = &GetAI_mob_infernal_volcano; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_fel_infernal"; + newscript->GetAI = &GetAI_mob_fel_infernal; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_nether_portal"; + newscript->GetAI = &GetAI_mob_nether_portal; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_mistress_of_pain"; + newscript->GetAI = &GetAI_mob_mistress_of_pain; + newscript->RegisterSelf(); } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index 8aa0d0318..0c2eba001 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -103,6 +103,7 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance for (uint8 i = 0; i < MAX_ENCOUNTERS; ++i) m_auiEncounter[i] = NOT_STARTED; m_auiEncounter[0] = 0; + m_auiEncounter[7] = 1; m_auiEncounter[8] = 0; m_uiTributeChest1GUID = 0; m_uiTributeChest2GUID = 0; @@ -116,7 +117,7 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance if (Difficulty == RAID_DIFFICULTY_10MAN_HEROIC || Difficulty == RAID_DIFFICULTY_25MAN_HEROIC) { m_player->SendUpdateWorldState(UPDATE_STATE_UI_SHOW,1); - m_player->SendUpdateWorldState(UPDATE_STATE_UI_COUNT, GetData(TYPE_COUNTER)); + m_player->SendUpdateWorldState(UPDATE_STATE_UI_COUNT, 100-GetData(TYPE_COUNTER)); } } @@ -265,13 +266,20 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance if (pChest4 && !pChest4->isSpawned()) pChest4->SetRespawnTime(7*DAY); }; break; - case TYPE_COUNTER: m_auiEncounter[7] = uiData; uiData = NOT_STARTED; break; + case TYPE_COUNTER: m_auiEncounter[7] = uiData; uiData = DONE; break; case TYPE_EVENT: m_auiEncounter[8] = uiData; uiData = NOT_STARTED; break; case TYPE_EVENT_TIMER: m_auiEventTimer = uiData; uiData = NOT_STARTED; break; } - if (uiData == DONE && uiType != TYPE_STAGE + if (uiData == FAIL && uiType != TYPE_STAGE + && uiType != TYPE_EVENT && uiType != TYPE_COUNTER + && uiType != TYPE_EVENT_TIMER) + { if (IsRaidWiped()) { ++m_auiEncounter[7]; + uiData = DONE;} + } + + if (uiData == DONE && uiType != TYPE_STAGE && uiType != TYPE_EVENT && uiType != TYPE_EVENT_TIMER) { diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index 702f65101..6d29471e9 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -66,6 +66,7 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI pInstance->SetData(TYPE_STAGE,0); flag25 = true; DelayTimer = 0; + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); } void AttackStart(Unit *who) diff --git a/sql/Updates/r1632_mangos.sql b/sql/Updates/r1632_mangos.sql index 018ddf1a2..a318e0116 100644 --- a/sql/Updates/r1632_mangos.sql +++ b/sql/Updates/r1632_mangos.sql @@ -1,9 +1,9 @@ UPDATE instance_template SET script='instance_trial_of_the_crusader' WHERE map=649; --- UPDATE creature_template SET ScriptName='boss_gormok' WHERE entry=34796; --- UPDATE creature_template SET ScriptName='boss_acidmaw' WHERE entry=35144; --- UPDATE creature_template SET ScriptName='boss_dreadscale' WHERE entry=34799; +UPDATE creature_template SET ScriptName='boss_gormok' WHERE entry=34796; +UPDATE creature_template SET ScriptName='boss_acidmaw' WHERE entry=35144; +UPDATE creature_template SET ScriptName='boss_dreadscale' WHERE entry=34799; -- UPDATE creature_template SET ScriptName='boss_icehowl' WHERE entry=34797; --- UPDATE creature_template SET ScriptName='boss_jaraxxis' WHERE entry=34780; +UPDATE creature_template SET ScriptName='boss_jaraxxus' WHERE entry=34780; -- UPDATE creature_template SET ScriptName='boss_anubarak_trial' WHERE entry=34564; -- UPDATE creature_template SET ScriptName='boss_fjola' WHERE entry=34497; -- UPDATE creature_template SET ScriptName='boss_eydis' WHERE entry=34496; From 062b72ac829e0677af50c96d178d3613b354858c Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 11 Mar 2010 13:18:08 +0300 Subject: [PATCH 184/405] TOC part 18 - Jaraxxus almost complete --- addition/724_trial_of_crusader_mangos.sql | 25 +- .../trial_of_the_crusader/boss_jaraxxus.cpp | 287 +++++++++++++++--- .../instance_trial_of_the_crusader.cpp | 12 +- .../trial_of_the_crusader.cpp | 3 +- 4 files changed, 274 insertions(+), 53 deletions(-) diff --git a/addition/724_trial_of_crusader_mangos.sql b/addition/724_trial_of_crusader_mangos.sql index 60eb4474a..b8079b94f 100644 --- a/addition/724_trial_of_crusader_mangos.sql +++ b/addition/724_trial_of_crusader_mangos.sql @@ -50,10 +50,10 @@ DELETE FROM `creature_loot_template` WHERE `entry` IN (12268,12211,12214,12283,12192,12286,12271,12274,12231,12189,12093,12090,12171,12105,12108,12114,12168,12165,12182,12185,12305,12302); -- Nortrend beasts --- UPDATE creature_template SET scriptname='boss_gormok' WHERE entry=34796; --- UPDATE creature_template SET scriptname='boss_dreadscale' WHERE entry=34799; --- UPDATE creature_template SET scriptname='boss_acidmaw' WHERE entry=35144; --- UPDATE creature_template SET scriptname='boss_icehowl' WHERE entry=34797; +-- UPDATE `creature_template` SET `scriptname`='boss_gormok' WHERE entry=34796; +-- UPDATE `creature_template` SET `scriptname`='boss_dreadscale' WHERE entry=34799; +-- UPDATE `creature_template` SET `scriptname`='boss_acidmaw' WHERE entry=35144; +-- UPDATE `creature_template` SET `scriptname`='boss_icehowl' WHERE entry=34797; UPDATE `creature_template` SET `lootid`= 0 WHERE `entry` IN (34796,34799,35144); DELETE FROM `creature_loot_template` WHERE `entry` IN @@ -62,15 +62,18 @@ DELETE FROM `creature_loot_template` WHERE `entry` IN -- Jaraxxus UPDATE `creature_template` SET `scriptname`='boss_jaraxxus', `AIName` ='' WHERE entry= 34780; DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (34780, 34784, 34813, 34815, 34825, 34826); -UPDATE `creature_template` SET `scriptname`='mob_legion_flame', `AIName` ='' WHERE entry = 34784; --- UPDATE `creature_template` SET `scriptname`='mob_infernal_volcano', `AIName` ='' WHERE entry = 34813; --- UPDATE `creature_template` SET `scriptname`='mob_fel_infernal', `AIName` ='' WHERE entry = 34815; +UPDATE `creature_template` SET `scriptname`='mob_legion_flame', `AIName` ='', `faction_A`= 14, `faction_H` = 14 WHERE entry = 34784; +UPDATE `creature_template` SET `scriptname`='mob_infernal_volcano', `AIName` ='' WHERE entry = 34813; +UPDATE `creature_template` SET `scriptname`='mob_fel_infernal', `AIName` ='' WHERE entry = 34815; UPDATE `creature_template` SET `scriptname`='mob_nether_portal', `AIName` ='' WHERE entry = 34825; --- UPDATE `creature_template` SET `scriptname`='mob_mistress_of_pain', `AIName` ='' WHERE entry = 34826; +UPDATE `creature_template` SET `scriptname`='mob_mistress_of_pain', `AIName` ='' WHERE entry = 34826; -- Froja's --- UPDATE creature_template SET scriptname='boss_lightbane' WHERE entry=34497; --- UPDATE creature_template SET scriptname='boss_darkbane' WHERE entry=34496; +-- UPDATE `creature_template` SET `scriptname`='boss_fjola', `AIName` ='' WHERE entry=34497; +-- UPDATE `creature_template` SET `scriptname`='boss_eydis', `AIName` ='' WHERE entry=34496; +-- UPDATE `creature_template` SET `scriptname`='mob_light_essence', `AIName` ='' WHERE entry = 34568; +-- UPDATE `creature_template` SET `scriptname`='mob_dark_essence', `AIName` ='' WHERE entry = 34567; + -- Anub'arak --- UPDATE creature_template SET scriptname='boss_anubarak' WHERE entry=34564; +-- UPDATE `creature_template` SET `scriptname`='boss_anubarak' WHERE entry=34564; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp index 74c32795b..8282fa812 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp @@ -50,6 +50,8 @@ enum BossSpells SPELL_LEGION_FLAME, SPELL_SHIVAN_SLASH, SPELL_SPINNING_STRIKE, + SPELL_FEL_INFERNO, + SPELL_FEL_STREAK, SPELL_BERSERK, BOSS_SPELL_COUNT }; @@ -57,17 +59,19 @@ enum BossSpells static SpellTable m_BossSpell[]= { // Name 10 25 10H 25H -{SPELL_NETHER_POWER, 67108, 67108, 67108, 67108, 10000, 10000, 10000, 10000, 15000, 15000, 15000, 15000, 65535, CAST_ON_SELF, false, false}, +{SPELL_NETHER_POWER, 67108, 67108, 67108, 67108, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, {SPELL_INFERNAL, 66258, 66258, 66258, 66258, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, true, false}, -{SPELL_INFERNAL_ERUPTION,66255, 66255, 66255, 66255, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, +{SPELL_INFERNAL_ERUPTION,66255, 66255, 66255, 66255, 30000, 30000, 30000, 30000, 45000, 45000, 45000, 45000, 65535, CAST_ON_RANDOM, false, false}, {SPELL_FEL_FIREBALL, 66532, 66963, 66964, 66965, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, {SPELL_FEL_LIGHTING, 66528, 66528, 67029, 67029, 15000, 15000, 15000, 15000, 25000, 25000, 25000, 25000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_INCINERATE_FLESH, 66237, 67049, 67050, 67051, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, +{SPELL_INCINERATE_FLESH, 66237, 67049, 67050, 67051, 30000, 30000, 30000, 30000, 60000, 60000, 60000, 60000, 65535, CAST_ON_RANDOM, false, false}, {SPELL_BURNING_INFERNO, 66242, 67060, 67060, 67060, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_NETHER_PORTAL, 66264, 66264, 68405, 68405, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, true, true}, +{SPELL_NETHER_PORTAL, 66264, 66264, 68405, 68405, 60000, 60000, 60000, 60000, 60000, 60000, 60000, 60000, 65535, CAST_ON_RANDOM, true, true}, {SPELL_LEGION_FLAME, 68124, 68124, 68126, 68126, 30000, 30000, 30000, 30000, 45000, 45000, 45000, 45000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_SHIVAN_SLASH, 67098, 67098, 67098, 67098, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, +{SPELL_SHIVAN_SLASH, 67098, 67098, 67098, 67098, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, {SPELL_SPINNING_STRIKE, 66316, 66316, 66316, 66316, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, +{SPELL_FEL_INFERNO, 67047, 67047, 67047, 67047, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, +{SPELL_FEL_STREAK, 66494, 66494, 66494, 66494, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, {SPELL_BERSERK, 26662, 26662, 26662, 26662, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 65535, CAST_ON_SELF, false, false}, }; @@ -92,6 +96,8 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI uint8 stage; uint8 substage; uint8 m_portalsCount; + uint8 m_volcanoCount; + Unit* currentTarget; void Reset() { if(!m_pInstance) return; @@ -99,7 +105,16 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI m_pInstance->SetData(TYPE_JARAXXUS, NOT_STARTED); memset(&m_uiSpell_Timer, 0, sizeof(m_uiSpell_Timer)); SetEquipmentSlots(false, EQUIP_STAFF, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE); - m_portalsCount = 0; + m_portalsCount = 1; + if (Difficulty == RAID_DIFFICULTY_10MAN_HEROIC || Difficulty == RAID_DIFFICULTY_25MAN_HEROIC) + { + m_portalsCount = 2; + m_volcanoCount = 4; + } else { + m_portalsCount = 1; + m_volcanoCount = 4; + } + DoScriptText(-1713517,m_creature); } bool QuerySpellPeriod(uint32 m_uiSpellIdx, uint32 diff) @@ -109,7 +124,7 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; if (m_uiSpellIdx != pSpell->id) return false; -// if (m_uiSpell_Timer[m_uiSpellIdx] == DAY) m_uiSpell_Timer[m_uiSpellIdx]=urand(0,pSpell->m_uiSpellTimerMax[Difficulty]); + if (m_uiSpell_Timer[m_uiSpellIdx] == 0 ) m_uiSpell_Timer[m_uiSpellIdx]=urand(0,pSpell->m_uiSpellTimerMax[Difficulty]); if (m_uiSpell_Timer[m_uiSpellIdx] < diff) { m_uiSpell_Timer[m_uiSpellIdx]=urand(pSpell->m_uiSpellTimerMin[Difficulty],pSpell->m_uiSpellTimerMax[Difficulty]); @@ -121,13 +136,13 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI return result; } - bool CastBossSpell(uint32 m_uiSpellIdx) + CanCastResult CastBossSpell(uint32 m_uiSpellIdx) { - if(!m_pInstance) return false; + if(!m_pInstance) return CAST_FAIL_OTHER; Unit* pTarget; SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; // Find spell index - temporary direct insert from spelltable - if (m_uiSpellIdx != pSpell->id) return false; + if (m_uiSpellIdx != pSpell->id) return CAST_FAIL_OTHER; switch (pSpell->m_CastTarget) { case CAST_ON_SELF: @@ -147,14 +162,15 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI break; }; - if (pTarget) DoCastSpellIfCan(pTarget,pSpell->m_uiSpellEntry[Difficulty]); + currentTarget = pTarget; + if (pTarget) return DoCastSpellIfCan(pTarget,pSpell->m_uiSpellEntry[Difficulty]); } uint64 CallGuard(uint64 npctype, TempSummonType type, uint32 _summontime ) { float fPosX, fPosY, fPosZ; m_creature->GetPosition(fPosX, fPosY, fPosZ); - m_creature->GetRandomPoint(fPosX, fPosY, fPosZ, urand(10, 50), fPosX, fPosY, fPosZ); + m_creature->GetRandomPoint(fPosX, fPosY, fPosZ, urand(10, 20), fPosX, fPosY, fPosZ); Creature* pSummon = m_creature->SummonCreature(npctype, fPosX, fPosY, fPosZ, 0, type, _summontime); if(pSummon) pSummon->SetInCombatWithZone(); // DoScriptText(EMOTE_SUMMON, m_creature); @@ -170,12 +186,14 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI void JustDied(Unit* pKiller) { - if (m_pInstance) + if (!m_pInstance) return; + DoScriptText(-1713525,m_creature); m_pInstance->SetData(TYPE_JARAXXUS, DONE); } void Aggro(Unit* pWho) { + if (!m_pInstance) return; m_creature->SetInCombatWithZone(); m_pInstance->SetData(TYPE_JARAXXUS, IN_PROGRESS); DoScriptText(-1713514,m_creature); @@ -189,17 +207,35 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI if (QuerySpellPeriod(SPELL_FEL_FIREBALL, uiDiff)) CastBossSpell(SPELL_FEL_FIREBALL); + if (QuerySpellPeriod(SPELL_FEL_LIGHTING, uiDiff)) CastBossSpell(SPELL_FEL_LIGHTING); - if (QuerySpellPeriod(SPELL_INCINERATE_FLESH, uiDiff)) + + if (QuerySpellPeriod(SPELL_INCINERATE_FLESH, uiDiff)) { + DoScriptText(-1713522,m_creature,currentTarget); CastBossSpell(SPELL_INCINERATE_FLESH); - if (QuerySpellPeriod(SPELL_LEGION_FLAME, uiDiff)) + } + + if (QuerySpellPeriod(SPELL_LEGION_FLAME, uiDiff)) { + DoScriptText(-1713518,m_creature,currentTarget); CastBossSpell(SPELL_LEGION_FLAME); - if (QuerySpellPeriod(SPELL_INFERNAL_ERUPTION, uiDiff)) - CastBossSpell(SPELL_INFERNAL_ERUPTION); - if (QuerySpellPeriod(SPELL_NETHER_PORTAL, uiDiff) && m_portalsCount < 2) { - if (CallGuard(NPC_NETHER_PORTAL, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5000) != 0) - ++m_portalsCount; + }; + + if (QuerySpellPeriod(SPELL_INFERNAL_ERUPTION, uiDiff) + && m_volcanoCount > 0) { + DoScriptText(-1713520,m_creature); +// CastBossSpell(SPELL_INFERNAL_ERUPTION); + if (CallGuard(NPC_INFERNAL_VOLCANO, TEMPSUMMON_MANUAL_DESPAWN, 5000)) + --m_volcanoCount; + }; + + if (QuerySpellPeriod(SPELL_NETHER_PORTAL, uiDiff) + && m_portalsCount > 0 + && m_creature->GetHealthPercent() <= 90.0f) + { + DoScriptText(-1713519,m_creature); + if (CallGuard(NPC_NETHER_PORTAL, TEMPSUMMON_MANUAL_DESPAWN, 5000)) + --m_portalsCount; }; DoMeleeAttackIfReady(); @@ -221,10 +257,22 @@ struct MANGOS_DLL_DECL mob_legion_flameAI : public ScriptedAI ScriptedInstance* m_pInstance; uint8 Difficulty; + uint32 m_uiRangeCheck_Timer; void Reset() { Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); + + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetInCombatWithZone(); + m_creature->SetRespawnTime(DAY); + + if (Unit* pTarget= SelectUnit(SELECT_TARGET_RANDOM, 0) ) { + m_creature->GetMotionMaster()->MoveChase(pTarget); + m_creature->SetSpeedRate(MOVE_RUN, 0.5); + } + } void KilledUnit(Unit* pVictim) @@ -241,15 +289,31 @@ struct MANGOS_DLL_DECL mob_legion_flameAI : public ScriptedAI if (!m_pInstance) return; } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - if (m_pInstance->GetData(TYPE_JARAXXUS) == DONE) + if (m_pInstance->GetData(TYPE_JARAXXUS) != IN_PROGRESS) m_creature->ForcedDespawn(); if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - DoMeleeAttackIfReady(); + if (m_uiRangeCheck_Timer < uiDiff) + { + if (m_pInstance) + { + if (m_creature->IsWithinDist(m_creature->getVictim(), 4.0f, false)) + { +// DoCast(m_creature,m_BossSpell[SPELL_LEGION_FLAME].m_uiSpellEntry[Difficulty]); + } + } + m_uiRangeCheck_Timer = 1000; + if (m_creature->getVictim()) { + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + m_creature->SetSpeedRate(MOVE_RUN, 0.5); + } + } + else m_uiRangeCheck_Timer -= uiDiff; + } }; @@ -264,14 +328,35 @@ struct MANGOS_DLL_DECL mob_infernal_volcanoAI : public ScriptedAI { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Reset(); + m_creature->SetRespawnTime(DAY); } ScriptedInstance* m_pInstance; uint8 Difficulty; + uint8 m_Count; + uint32 m_Timer; void Reset() { Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); + m_Timer = 15000; + m_creature->SetRespawnTime(DAY); + if (Difficulty != RAID_DIFFICULTY_10MAN_HEROIC && Difficulty != RAID_DIFFICULTY_25MAN_HEROIC) + { + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_Count = 3; + } else + { + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_Count = 6; + } + + } + + void AttackStart(Unit *who) + { + return; } void KilledUnit(Unit* pVictim) @@ -290,13 +375,19 @@ struct MANGOS_DLL_DECL mob_infernal_volcanoAI : public ScriptedAI void UpdateAI(const uint32 diff) { - if (m_pInstance->GetData(TYPE_JARAXXUS) == DONE) + if (m_pInstance->GetData(TYPE_JARAXXUS) != IN_PROGRESS) m_creature->ForcedDespawn(); + if (m_Timer < diff && m_Count > 0) { + DoCast(m_creature,m_BossSpell[SPELL_INFERNAL_ERUPTION].m_uiSpellEntry[Difficulty]); + m_Timer=urand(m_BossSpell[SPELL_INFERNAL_ERUPTION].m_uiSpellTimerMin[Difficulty],m_BossSpell[SPELL_INFERNAL_ERUPTION].m_uiSpellTimerMax[Difficulty]); + DoScriptText(-1713524,m_creature); + --m_Count; + } else m_Timer -= diff; + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - DoMeleeAttackIfReady(); } }; @@ -315,10 +406,14 @@ struct MANGOS_DLL_DECL mob_fel_infernalAI : public ScriptedAI ScriptedInstance* m_pInstance; uint8 Difficulty; + uint32 m_uiSpell_Timer[BOSS_SPELL_COUNT]; + Unit* currentTarget; void Reset() { Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); + m_creature->SetInCombatWithZone(); + m_creature->SetRespawnTime(DAY); } void KilledUnit(Unit* pVictim) @@ -326,6 +421,55 @@ struct MANGOS_DLL_DECL mob_fel_infernalAI : public ScriptedAI if (pVictim->GetTypeId() != TYPEID_PLAYER) return; } + bool QuerySpellPeriod(uint32 m_uiSpellIdx, uint32 diff) + { + if(!m_pInstance) return false; + bool result; + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + if (m_uiSpellIdx != pSpell->id) return false; + + if (m_uiSpell_Timer[m_uiSpellIdx] == 0 ) m_uiSpell_Timer[m_uiSpellIdx]=urand(0,pSpell->m_uiSpellTimerMax[Difficulty]); + + if (m_uiSpell_Timer[m_uiSpellIdx] < diff) { + m_uiSpell_Timer[m_uiSpellIdx]=urand(pSpell->m_uiSpellTimerMin[Difficulty],pSpell->m_uiSpellTimerMax[Difficulty]); + result = true; + } else { + m_uiSpell_Timer[m_uiSpellIdx] -= diff; + result = false; + }; + return result; + } + + CanCastResult CastBossSpell(uint32 m_uiSpellIdx) + { + if(!m_pInstance) return CAST_FAIL_OTHER; + Unit* pTarget; + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + // Find spell index - temporary direct insert from spelltable + if (m_uiSpellIdx != pSpell->id) return CAST_FAIL_OTHER; + + switch (pSpell->m_CastTarget) { + case CAST_ON_SELF: + pTarget = m_creature; + break; + case CAST_ON_SUMMONS: + pTarget = m_creature->getVictim(); //CHANGE IT!!! + break; + case CAST_ON_VICTIM: + pTarget = m_creature->getVictim(); + break; + case CAST_ON_RANDOM: + pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); + break; + case CAST_ON_BOTTOMAGGRO: + pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1); + break; + + }; + currentTarget = pTarget; + if (pTarget) return DoCastSpellIfCan(pTarget,pSpell->m_uiSpellEntry[Difficulty]); + } + void JustDied(Unit* Killer) { } @@ -335,14 +479,20 @@ struct MANGOS_DLL_DECL mob_fel_infernalAI : public ScriptedAI if (!m_pInstance) return; } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - if (m_pInstance->GetData(TYPE_JARAXXUS) == DONE) + if (m_pInstance->GetData(TYPE_JARAXXUS) != IN_PROGRESS) m_creature->ForcedDespawn(); if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (QuerySpellPeriod(SPELL_FEL_INFERNO, uiDiff)) + CastBossSpell(SPELL_FEL_INFERNO); + + if (QuerySpellPeriod(SPELL_FEL_STREAK, uiDiff)) + CastBossSpell(SPELL_FEL_STREAK); + DoMeleeAttackIfReady(); } }; @@ -369,12 +519,17 @@ struct MANGOS_DLL_DECL mob_nether_portalAI : public ScriptedAI { Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); m_Timer = 5000; - m_Count = 2; + m_creature->SetRespawnTime(DAY); if (Difficulty != RAID_DIFFICULTY_10MAN_HEROIC && Difficulty != RAID_DIFFICULTY_25MAN_HEROIC) { m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_Count = 1; - }; + } else + { + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_Count = 2; + } } void KilledUnit(Unit* pVictim) @@ -384,7 +539,7 @@ struct MANGOS_DLL_DECL mob_nether_portalAI : public ScriptedAI void AttackStart(Unit *who) { - return; + return; } void JustDied(Unit* Killer) @@ -398,13 +553,14 @@ struct MANGOS_DLL_DECL mob_nether_portalAI : public ScriptedAI void UpdateAI(const uint32 diff) { - if (m_pInstance->GetData(TYPE_JARAXXUS) == DONE) + if (m_pInstance->GetData(TYPE_JARAXXUS) != IN_PROGRESS) m_creature->ForcedDespawn(); if (m_Timer < diff && m_Count > 0) { - DoCastSpellIfCan(m_creature,m_BossSpell[SPELL_NETHER_PORTAL].m_uiSpellEntry[Difficulty]); - m_Timer=urand(m_BossSpell[SPELL_NETHER_PORTAL].m_uiSpellTimerMin[Difficulty],m_BossSpell[SPELL_NETHER_PORTAL].m_uiSpellTimerMax[Difficulty]); + DoCast(m_creature,m_BossSpell[SPELL_NETHER_PORTAL].m_uiSpellEntry[Difficulty]); + DoScriptText(-1713521,m_creature); --m_Count; + m_Timer = 60000; } else m_Timer -= diff; if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -428,10 +584,64 @@ struct MANGOS_DLL_DECL mob_mistress_of_painAI : public ScriptedAI ScriptedInstance* m_pInstance; uint8 Difficulty; + uint32 m_uiSpell_Timer[BOSS_SPELL_COUNT]; + Unit* currentTarget; void Reset() { + memset(&m_uiSpell_Timer, 0, sizeof(m_uiSpell_Timer)); Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); + m_creature->SetInCombatWithZone(); + m_creature->SetRespawnTime(DAY); + } + + bool QuerySpellPeriod(uint32 m_uiSpellIdx, uint32 diff) + { + if(!m_pInstance) return false; + bool result; + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + if (m_uiSpellIdx != pSpell->id) return false; + + if (m_uiSpell_Timer[m_uiSpellIdx] == 0 ) m_uiSpell_Timer[m_uiSpellIdx]=urand(0,pSpell->m_uiSpellTimerMax[Difficulty]); + + if (m_uiSpell_Timer[m_uiSpellIdx] < diff) { + m_uiSpell_Timer[m_uiSpellIdx]=urand(pSpell->m_uiSpellTimerMin[Difficulty],pSpell->m_uiSpellTimerMax[Difficulty]); + result = true; + } else { + m_uiSpell_Timer[m_uiSpellIdx] -= diff; + result = false; + }; + return result; + } + + CanCastResult CastBossSpell(uint32 m_uiSpellIdx) + { + if(!m_pInstance) return CAST_FAIL_OTHER; + Unit* pTarget; + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + // Find spell index - temporary direct insert from spelltable + if (m_uiSpellIdx != pSpell->id) return CAST_FAIL_OTHER; + + switch (pSpell->m_CastTarget) { + case CAST_ON_SELF: + pTarget = m_creature; + break; + case CAST_ON_SUMMONS: + pTarget = m_creature->getVictim(); //CHANGE IT!!! + break; + case CAST_ON_VICTIM: + pTarget = m_creature->getVictim(); + break; + case CAST_ON_RANDOM: + pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); + break; + case CAST_ON_BOTTOMAGGRO: + pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1); + break; + + }; + currentTarget = pTarget; + if (pTarget) return DoCastSpellIfCan(pTarget,pSpell->m_uiSpellEntry[Difficulty]); } void KilledUnit(Unit* pVictim) @@ -446,16 +656,23 @@ struct MANGOS_DLL_DECL mob_mistress_of_painAI : public ScriptedAI void Aggro(Unit *who) { if (!m_pInstance) return; + DoScriptText(-1713523,m_creature, who); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - if (m_pInstance->GetData(TYPE_JARAXXUS) == DONE) + if (m_pInstance->GetData(TYPE_JARAXXUS) != IN_PROGRESS) m_creature->ForcedDespawn(); if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (QuerySpellPeriod(SPELL_SHIVAN_SLASH, uiDiff)) + CastBossSpell(SPELL_SHIVAN_SLASH); + + if (QuerySpellPeriod(SPELL_SPINNING_STRIKE, uiDiff)) + CastBossSpell(SPELL_SPINNING_STRIKE); + DoMeleeAttackIfReady(); } }; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index 0c2eba001..83d6d9a9c 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -103,7 +103,7 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance for (uint8 i = 0; i < MAX_ENCOUNTERS; ++i) m_auiEncounter[i] = NOT_STARTED; m_auiEncounter[0] = 0; - m_auiEncounter[7] = 1; + m_auiEncounter[7] = 50; m_auiEncounter[8] = 0; m_uiTributeChest1GUID = 0; m_uiTributeChest2GUID = 0; @@ -117,7 +117,7 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance if (Difficulty == RAID_DIFFICULTY_10MAN_HEROIC || Difficulty == RAID_DIFFICULTY_25MAN_HEROIC) { m_player->SendUpdateWorldState(UPDATE_STATE_UI_SHOW,1); - m_player->SendUpdateWorldState(UPDATE_STATE_UI_COUNT, 100-GetData(TYPE_COUNTER)); + m_player->SendUpdateWorldState(UPDATE_STATE_UI_COUNT, GetData(TYPE_COUNTER)); } } @@ -245,9 +245,9 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance m_uiTributeChest4GUID = m_uiTC10h99GUID; } if(Difficulty == RAID_DIFFICULTY_25MAN_HEROIC){ - if ( m_auiEncounter[7] <= 25) m_uiTributeChest1GUID = m_uiTC25h25GUID; - if ( m_auiEncounter[7] <= 45) m_uiTributeChest2GUID = m_uiTC25h45GUID; - if ( m_auiEncounter[7] <= 50) m_uiTributeChest3GUID = m_uiTC25h50GUID; + if ( m_auiEncounter[7] >= 25) m_uiTributeChest1GUID = m_uiTC25h25GUID; + if ( m_auiEncounter[7] >= 45) m_uiTributeChest2GUID = m_uiTC25h45GUID; + if ( m_auiEncounter[7] >= 49) m_uiTributeChest3GUID = m_uiTC25h50GUID; m_uiTributeChest4GUID = m_uiTC25h99GUID; } // Attention! It is (may be) not off-like, but spawning all Tribute Chests is real @@ -275,7 +275,7 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance && uiType != TYPE_EVENT && uiType != TYPE_COUNTER && uiType != TYPE_EVENT_TIMER) - { if (IsRaidWiped()) { ++m_auiEncounter[7]; + { if (IsRaidWiped()) { --m_auiEncounter[7]; uiData = DONE;} } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index 6d29471e9..436b752f9 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -520,6 +520,7 @@ struct MANGOS_DLL_DECL npc_fizzlebang_tocAI : public ScriptedAI { pInstance = (ScriptedInstance*)m_creature->GetInstanceData(); Reset(); + m_creature->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); } InstanceData* pInstance; @@ -548,7 +549,7 @@ struct MANGOS_DLL_DECL npc_fizzlebang_tocAI : public ScriptedAI { case 1110: pInstance->SetData(TYPE_EVENT, 1120); - m_creature->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z);; + m_creature->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); UpdateTimer = 7000; break; case 1120: From 76a32a4456b6f44710f978c0ae7a0d03d86b6c78 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 11 Mar 2010 18:37:19 +0300 Subject: [PATCH 185/405] TOC part 19 - Jaraxxus finished --- addition/724_trial_of_crusader_mangos.sql | 2 +- .../trial_of_the_crusader/boss_jaraxxus.cpp | 36 +++++++++++-------- .../trial_of_the_crusader.cpp | 20 +++-------- .../trial_of_the_crusader.h | 3 ++ 4 files changed, 30 insertions(+), 31 deletions(-) diff --git a/addition/724_trial_of_crusader_mangos.sql b/addition/724_trial_of_crusader_mangos.sql index b8079b94f..53a9f4b6d 100644 --- a/addition/724_trial_of_crusader_mangos.sql +++ b/addition/724_trial_of_crusader_mangos.sql @@ -62,7 +62,7 @@ DELETE FROM `creature_loot_template` WHERE `entry` IN -- Jaraxxus UPDATE `creature_template` SET `scriptname`='boss_jaraxxus', `AIName` ='' WHERE entry= 34780; DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (34780, 34784, 34813, 34815, 34825, 34826); -UPDATE `creature_template` SET `scriptname`='mob_legion_flame', `AIName` ='', `faction_A`= 14, `faction_H` = 14 WHERE entry = 34784; +UPDATE `creature_template` SET `scriptname`='mob_legion_flame', `minlevel` = 80, `maxlevel` = 80, `modelid_A` = 11686, `modelid_A2` = 11686, `modelid_H` = 11686, `modelid_H2` = 11686, `AIName` ='', `faction_A`= 14, `faction_H` = 14 WHERE entry = 34784; UPDATE `creature_template` SET `scriptname`='mob_infernal_volcano', `AIName` ='' WHERE entry = 34813; UPDATE `creature_template` SET `scriptname`='mob_fel_infernal', `AIName` ='' WHERE entry = 34815; UPDATE `creature_template` SET `scriptname`='mob_nether_portal', `AIName` ='' WHERE entry = 34825; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp index 8282fa812..08e64b43f 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp @@ -23,9 +23,12 @@ EndScriptData */ #include "precompiled.h" #include "trial_of_the_crusader.h" -enum Default +enum Equipment { - EQUIP_STAFF = 40343, + EQUIP_MAIN = 47266, + EQUIP_OFFHAND = 46996, + EQUIP_RANGED = 47267, + EQUIP_DONE = EQUIP_NO_CHANGE, }; enum Summons @@ -47,7 +50,8 @@ enum BossSpells SPELL_INCINERATE_FLESH, SPELL_BURNING_INFERNO, SPELL_NETHER_PORTAL, - SPELL_LEGION_FLAME, + SPELL_LEGION_FLAME_0, + SPELL_LEGION_FLAME_1, SPELL_SHIVAN_SLASH, SPELL_SPINNING_STRIKE, SPELL_FEL_INFERNO, @@ -67,7 +71,8 @@ static SpellTable m_BossSpell[]= {SPELL_INCINERATE_FLESH, 66237, 67049, 67050, 67051, 30000, 30000, 30000, 30000, 60000, 60000, 60000, 60000, 65535, CAST_ON_RANDOM, false, false}, {SPELL_BURNING_INFERNO, 66242, 67060, 67060, 67060, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, {SPELL_NETHER_PORTAL, 66264, 66264, 68405, 68405, 60000, 60000, 60000, 60000, 60000, 60000, 60000, 60000, 65535, CAST_ON_RANDOM, true, true}, -{SPELL_LEGION_FLAME, 68124, 68124, 68126, 68126, 30000, 30000, 30000, 30000, 45000, 45000, 45000, 45000, 65535, CAST_ON_RANDOM, false, false}, +{SPELL_LEGION_FLAME_0, 66199, 68127, 68126, 68128, 30000, 30000, 30000, 30000, 45000, 45000, 45000, 45000, 65535, CAST_ON_RANDOM, false, false}, +{SPELL_LEGION_FLAME_1, 66197, 68123, 68124, 68125, 30000, 30000, 30000, 30000, 45000, 45000, 45000, 45000, 65535, CAST_ON_RANDOM, false, false}, {SPELL_SHIVAN_SLASH, 67098, 67098, 67098, 67098, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, {SPELL_SPINNING_STRIKE, 66316, 66316, 66316, 66316, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, {SPELL_FEL_INFERNO, 67047, 67047, 67047, 67047, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, @@ -104,7 +109,7 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); m_pInstance->SetData(TYPE_JARAXXUS, NOT_STARTED); memset(&m_uiSpell_Timer, 0, sizeof(m_uiSpell_Timer)); - SetEquipmentSlots(false, EQUIP_STAFF, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE); + SetEquipmentSlots(false, EQUIP_MAIN, EQUIP_OFFHAND, EQUIP_RANGED); m_portalsCount = 1; if (Difficulty == RAID_DIFFICULTY_10MAN_HEROIC || Difficulty == RAID_DIFFICULTY_25MAN_HEROIC) { @@ -180,7 +185,7 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI void JustReachedHome() { - if (m_pInstance) + if (!m_pInstance) return; m_pInstance->SetData(TYPE_JARAXXUS, FAIL); } @@ -189,6 +194,8 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI if (!m_pInstance) return; DoScriptText(-1713525,m_creature); m_pInstance->SetData(TYPE_JARAXXUS, DONE); + m_pInstance->SetData(TYPE_EVENT,2000); + m_pInstance->SetData(TYPE_STAGE,0); } void Aggro(Unit* pWho) @@ -216,9 +223,9 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI CastBossSpell(SPELL_INCINERATE_FLESH); } - if (QuerySpellPeriod(SPELL_LEGION_FLAME, uiDiff)) { + if (QuerySpellPeriod(SPELL_LEGION_FLAME_1, uiDiff)) { DoScriptText(-1713518,m_creature,currentTarget); - CastBossSpell(SPELL_LEGION_FLAME); + CastBossSpell(SPELL_LEGION_FLAME_1); }; if (QuerySpellPeriod(SPELL_INFERNAL_ERUPTION, uiDiff) @@ -266,7 +273,7 @@ struct MANGOS_DLL_DECL mob_legion_flameAI : public ScriptedAI m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); m_creature->SetInCombatWithZone(); - m_creature->SetRespawnTime(DAY); + m_creature->SetRespawnDelay(DAY); if (Unit* pTarget= SelectUnit(SELECT_TARGET_RANDOM, 0) ) { m_creature->GetMotionMaster()->MoveChase(pTarget); @@ -303,7 +310,7 @@ struct MANGOS_DLL_DECL mob_legion_flameAI : public ScriptedAI { if (m_creature->IsWithinDist(m_creature->getVictim(), 4.0f, false)) { -// DoCast(m_creature,m_BossSpell[SPELL_LEGION_FLAME].m_uiSpellEntry[Difficulty]); +// DoCast(m_creature,m_BossSpell[SPELL_LEGION_FLAME_0].m_uiSpellEntry[Difficulty]); } } m_uiRangeCheck_Timer = 1000; @@ -328,7 +335,6 @@ struct MANGOS_DLL_DECL mob_infernal_volcanoAI : public ScriptedAI { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Reset(); - m_creature->SetRespawnTime(DAY); } ScriptedInstance* m_pInstance; @@ -340,7 +346,7 @@ struct MANGOS_DLL_DECL mob_infernal_volcanoAI : public ScriptedAI { Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); m_Timer = 15000; - m_creature->SetRespawnTime(DAY); + m_creature->SetRespawnDelay(DAY); if (Difficulty != RAID_DIFFICULTY_10MAN_HEROIC && Difficulty != RAID_DIFFICULTY_25MAN_HEROIC) { m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); @@ -413,7 +419,7 @@ struct MANGOS_DLL_DECL mob_fel_infernalAI : public ScriptedAI { Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); m_creature->SetInCombatWithZone(); - m_creature->SetRespawnTime(DAY); + m_creature->SetRespawnDelay(DAY); } void KilledUnit(Unit* pVictim) @@ -519,7 +525,7 @@ struct MANGOS_DLL_DECL mob_nether_portalAI : public ScriptedAI { Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); m_Timer = 5000; - m_creature->SetRespawnTime(DAY); + m_creature->SetRespawnDelay(DAY); if (Difficulty != RAID_DIFFICULTY_10MAN_HEROIC && Difficulty != RAID_DIFFICULTY_25MAN_HEROIC) { m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); @@ -592,7 +598,7 @@ struct MANGOS_DLL_DECL mob_mistress_of_painAI : public ScriptedAI memset(&m_uiSpell_Timer, 0, sizeof(m_uiSpell_Timer)); Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); m_creature->SetInCombatWithZone(); - m_creature->SetRespawnTime(DAY); + m_creature->SetRespawnDelay(DAY); } bool QuerySpellPeriod(uint32 m_uiSpellIdx, uint32 diff) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index 436b752f9..ceccf92f9 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -67,6 +67,10 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI flag25 = true; DelayTimer = 0; m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + if(Creature *pAlly = GetClosestCreatureWithEntry(m_creature, NPC_THRALL, 200.0f)) + pAlly->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + if(Creature *pAlly = GetClosestCreatureWithEntry(m_creature, NPC_PROUDMOORE, 200.0f)) + pAlly->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); } void AttackStart(Unit *who) @@ -111,22 +115,8 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI } break; }; + case 4: { - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_JARAXXUS))) { - if (!pTemp->isAlive()) { - pInstance->SetData(TYPE_STAGE,0); - pInstance->SetData(TYPE_JARAXXUS,DONE); - pInstance->SetData(TYPE_EVENT,2000); - } - } - else { - m_creature->SummonCreature(NPC_JARAXXUS, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_JARAXXUS))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); - } - } break; }; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index c693af61e..43f17dbcc 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -23,6 +23,9 @@ enum NPC_LICH_KING_0 = 16980, NPC_LICH_KING_1 = 35877, + NPC_THRALL = 34994, + NPC_PROUDMOORE = 34992, + NPC_ICEHOWL = 34797, NPC_GORMOK = 34796, NPC_DREADSCALE = 34799, From f5b7ac0eb93f3d9a9e8aec25992b4406bcec4e00 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 11 Mar 2010 18:38:27 +0300 Subject: [PATCH 186/405] TOC 21 - Valkiries started --- addition/724_trial_of_crusader_mangos.sql | 4 +- .../boss_twin_valkyr.cpp | 94 ++++++++++++++++++- 2 files changed, 95 insertions(+), 3 deletions(-) diff --git a/addition/724_trial_of_crusader_mangos.sql b/addition/724_trial_of_crusader_mangos.sql index 53a9f4b6d..29c9fb7e1 100644 --- a/addition/724_trial_of_crusader_mangos.sql +++ b/addition/724_trial_of_crusader_mangos.sql @@ -71,8 +71,8 @@ UPDATE `creature_template` SET `scriptname`='mob_mistress_of_pain', `AIName` ='' -- Froja's -- UPDATE `creature_template` SET `scriptname`='boss_fjola', `AIName` ='' WHERE entry=34497; -- UPDATE `creature_template` SET `scriptname`='boss_eydis', `AIName` ='' WHERE entry=34496; --- UPDATE `creature_template` SET `scriptname`='mob_light_essence', `AIName` ='' WHERE entry = 34568; --- UPDATE `creature_template` SET `scriptname`='mob_dark_essence', `AIName` ='' WHERE entry = 34567; +UPDATE `creature_template` SET `npcflag`=1, `scriptname`='mob_light_essence', `AIName` ='' WHERE entry = 34568; +UPDATE `creature_template` SET `npcflag`=1, `scriptname`='mob_dark_essence', `AIName` ='' WHERE entry = 34567; -- Anub'arak -- UPDATE `creature_template` SET `scriptname`='boss_anubarak' WHERE entry=34564; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp index 0d384fac2..078b7ec58 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp @@ -17,13 +17,72 @@ /* ScriptData SDName: trial_of_the_crusader SD%Complete: 0 -SDComment: +SDComment: by /dev/rsa SDCategory: Crusader Coliseum EndScriptData */ #include "precompiled.h" #include "trial_of_the_crusader.h" +enum Equipment +{ + EQUIP_MAIN_1 = 47266, + EQUIP_OFFHAND_1 = 47146, + EQUIP_RANGED_1 = 47267, + EQUIP_MAIN_2 = 47266, + EQUIP_OFFHAND_2 = 47470, + EQUIP_RANGED_2 = 47267, + EQUIP_DONE = EQUIP_NO_CHANGE, +}; + +enum Summons +{ + NPC_DARK_ESSENCE = 34567, + NPC_LIGHT_ESSENCE = 34568, +}; + +enum BossSpells +{ + SPELL_TWIN_SPIKE_L, + SPELL_LIGHT_SURGE, + SPELL_SHIELD_LIGHT, + SPELL_TWIN_PACT_L, + SPELL_TWIN_POWER, + SPELL_LIGHT_VORTEX, + SPELL_LIGHT_ESSENCE, + SPELL_LIGHT_TOUCH, + SPELL_TWIN_SPIKE_H, + SPELL_DARK_SURGE, + SPELL_SHIELD_DARK, + SPELL_TWIN_PACT_H, + SPELL_DARK_VORTEX, + SPELL_DARK_ESSENCE, + SPELL_DARK_TOUCH, + SPELL_BERSERK, + BOSS_SPELL_COUNT +}; + +static SpellTable m_BossSpell[]= +{ +// Name 10 25 10H 25H +{SPELL_TWIN_SPIKE_L, 66075, 67312, 67313, 67314, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, +{SPELL_LIGHT_SURGE, 65766, 67270, 67271, 67272, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, +{SPELL_SHIELD_LIGHT, 65858, 67259, 67260, 67261, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, +{SPELL_TWIN_PACT_L, 65876, 67306, 67307, 67308, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, +{SPELL_TWIN_POWER, 65916, 67248, 67249, 67250, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, +{SPELL_LIGHT_VORTEX, 66046, 67206, 67207, 67208, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, +{SPELL_LIGHT_ESSENCE, 65686, 65686, 65686, 65686, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, +{SPELL_LIGHT_TOUCH, 67297, 67297, 67298, 67298, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, +{SPELL_TWIN_SPIKE_H, 66069, 67309, 67310, 67311, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, +{SPELL_DARK_SURGE, 65768, 67262, 67263, 67264, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, +{SPELL_SHIELD_DARK, 65874, 67256, 67257, 67258, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, +{SPELL_TWIN_PACT_H, 65879, 67244, 67245, 67246, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, +{SPELL_DARK_VORTEX, 66058, 67182, 67183, 67184, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, +{SPELL_DARK_ESSENCE, 65684, 65684, 65684, 65684, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, +{SPELL_DARK_TOUCH, 67282, 67282, 67283, 67283, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, +{SPELL_BERSERK, 64238, 64238, 64238, 64238, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 65535, CAST_ON_SELF, false, false}, +}; + /*###### ## boss_fjola ######*/ @@ -84,6 +143,28 @@ CreatureAI* GetAI_boss_eydis(Creature* pCreature) return new boss_eydisAI(pCreature); } +bool GossipHello_mob_light_essence(Player *player, Creature* pCreature) +{ + ScriptedInstance *pInstance = (ScriptedInstance *) pCreature->GetInstanceData(); + if(!pInstance) return true; + uint8 Difficulty = pInstance->GetData(TYPE_DIFFICULTY); + player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, pCreature->GetGUID()); + pCreature->CastSpell(player,m_BossSpell[SPELL_LIGHT_ESSENCE].m_uiSpellEntry[Difficulty],false); + player->CLOSE_GOSSIP_MENU(); + return true; +} + +bool GossipHello_mob_dark_essence(Player *player, Creature* pCreature) +{ + ScriptedInstance *pInstance = (ScriptedInstance *) pCreature->GetInstanceData(); + if(!pInstance) return true; + uint8 Difficulty = pInstance->GetData(TYPE_DIFFICULTY); + player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, pCreature->GetGUID()); + pCreature->CastSpell(player,m_BossSpell[SPELL_DARK_ESSENCE].m_uiSpellEntry[Difficulty],false); + player->CLOSE_GOSSIP_MENU(); + return true; +} + void AddSC_twin_valkyr() { Script* newscript; @@ -97,4 +178,15 @@ void AddSC_twin_valkyr() newscript->Name = "boss_eydis"; newscript->GetAI = &GetAI_boss_fjola; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_light_essence"; + newscript->pGossipHello = &GossipHello_mob_light_essence; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_dark_essence"; + newscript->pGossipHello = &GossipHello_mob_dark_essence; + newscript->RegisterSelf(); + } From 5d3aba5b4ac152501b17d595bcfd85c4b73ebecd Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Fri, 12 Mar 2010 17:39:23 +0300 Subject: [PATCH 187/405] TOC part 22 - valkiries almost finished --- addition/724_trial_of_crusader_mangos.sql | 5 +- addition/724_trial_of_crusader_scriptdev2.sql | 1 + .../boss_twin_valkyr.cpp | 341 ++++++++++++++++-- .../instance_trial_of_the_crusader.cpp | 34 +- .../trial_of_the_crusader.cpp | 18 +- .../trial_of_the_crusader.h | 19 +- sql/Updates/r1632_mangos.sql | 4 +- 7 files changed, 376 insertions(+), 46 deletions(-) diff --git a/addition/724_trial_of_crusader_mangos.sql b/addition/724_trial_of_crusader_mangos.sql index 29c9fb7e1..36b35f98a 100644 --- a/addition/724_trial_of_crusader_mangos.sql +++ b/addition/724_trial_of_crusader_mangos.sql @@ -69,8 +69,9 @@ UPDATE `creature_template` SET `scriptname`='mob_nether_portal', `AIName` ='' WH UPDATE `creature_template` SET `scriptname`='mob_mistress_of_pain', `AIName` ='' WHERE entry = 34826; -- Froja's --- UPDATE `creature_template` SET `scriptname`='boss_fjola', `AIName` ='' WHERE entry=34497; --- UPDATE `creature_template` SET `scriptname`='boss_eydis', `AIName` ='' WHERE entry=34496; +UPDATE `creature_template` SET `scriptname` = 'boss_fjola', `AIName` ='' WHERE entry=34497; +UPDATE `creature_template` SET `scriptname` = 'boss_eydis', `AIName` ='' WHERE entry=34496; +DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (34497, 34496, 34568, 34567); UPDATE `creature_template` SET `npcflag`=1, `scriptname`='mob_light_essence', `AIName` ='' WHERE entry = 34568; UPDATE `creature_template` SET `npcflag`=1, `scriptname`='mob_dark_essence', `AIName` ='' WHERE entry = 34567; diff --git a/addition/724_trial_of_crusader_scriptdev2.sql b/addition/724_trial_of_crusader_scriptdev2.sql index 318f44b58..1ab4b39d6 100644 --- a/addition/724_trial_of_crusader_scriptdev2.sql +++ b/addition/724_trial_of_crusader_scriptdev2.sql @@ -48,6 +48,7 @@ INSERT INTO `script_texts` ('34497','0','-1713539','%s начинает читать заклинание Договор близнецов!','1','0','0',''), ('34496','0','-1713540','%s начинает читать заклинание |cFF9932CDТемная воронка!|r Переключение к |cFF9932CDТемной|r сущности!','1','0','0',''), ('34497','16272','-1713541','Во имя темного повелителя. Во имя Короля-лича. Вы. Умрете.','1','0','0',''), +('34496','16272','-1713741','Во имя светлого повелителя. Во имя Короля-лича. Вы. Умрете.','1','0','0',''), ('34496','16279','-1713542','Да поглотит вас Свет!','1','0','0',''), ('34496','16277','-1713543','Пустое место!','1','0','0',''), ('34497','16276','-1713544','Тебя оценили и признали ничтожеством.','1','0','0',''), diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp index 078b7ec58..f2bdd7d10 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp @@ -26,10 +26,10 @@ EndScriptData */ enum Equipment { - EQUIP_MAIN_1 = 47266, + EQUIP_MAIN_1 = 49303, EQUIP_OFFHAND_1 = 47146, EQUIP_RANGED_1 = 47267, - EQUIP_MAIN_2 = 47266, + EQUIP_MAIN_2 = 45990, EQUIP_OFFHAND_2 = 47470, EQUIP_RANGED_2 = 47267, EQUIP_DONE = EQUIP_NO_CHANGE, @@ -47,17 +47,17 @@ enum BossSpells SPELL_LIGHT_SURGE, SPELL_SHIELD_LIGHT, SPELL_TWIN_PACT_L, - SPELL_TWIN_POWER, SPELL_LIGHT_VORTEX, - SPELL_LIGHT_ESSENCE, SPELL_LIGHT_TOUCH, SPELL_TWIN_SPIKE_H, SPELL_DARK_SURGE, SPELL_SHIELD_DARK, SPELL_TWIN_PACT_H, SPELL_DARK_VORTEX, - SPELL_DARK_ESSENCE, SPELL_DARK_TOUCH, + SPELL_TWIN_POWER, + SPELL_LIGHT_ESSENCE, + SPELL_DARK_ESSENCE, SPELL_BERSERK, BOSS_SPELL_COUNT }; @@ -65,21 +65,21 @@ enum BossSpells static SpellTable m_BossSpell[]= { // Name 10 25 10H 25H -{SPELL_TWIN_SPIKE_L, 66075, 67312, 67313, 67314, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, +{SPELL_TWIN_SPIKE_L, 66075, 67312, 67313, 67314, 10000, 10000, 10000, 10000, 20000, 20000, 20000, 20000, 65535, CAST_ON_VICTIM, false, false}, {SPELL_LIGHT_SURGE, 65766, 67270, 67271, 67272, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, {SPELL_SHIELD_LIGHT, 65858, 67259, 67260, 67261, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, {SPELL_TWIN_PACT_L, 65876, 67306, 67307, 67308, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, -{SPELL_TWIN_POWER, 65916, 67248, 67249, 67250, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, -{SPELL_LIGHT_VORTEX, 66046, 67206, 67207, 67208, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, -{SPELL_LIGHT_ESSENCE, 65686, 65686, 65686, 65686, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, -{SPELL_LIGHT_TOUCH, 67297, 67297, 67298, 67298, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, -{SPELL_TWIN_SPIKE_H, 66069, 67309, 67310, 67311, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, +{SPELL_LIGHT_VORTEX, 66046, 67206, 67207, 67208, 30000, 30000, 30000, 30000, 90000, 90000, 90000, 90000, 65535, CAST_ON_SELF, false, false}, +{SPELL_LIGHT_TOUCH, 67297, 67297, 67298, 67298, 10000, 10000, 10000, 10000, 15000, 15000, 15000, 15000, 65535, CAST_ON_SELF, false, false}, +{SPELL_TWIN_SPIKE_H, 66069, 67309, 67310, 67311, 10000, 10000, 10000, 10000, 20000, 20000, 20000, 20000, 65535, CAST_ON_VICTIM, false, false}, {SPELL_DARK_SURGE, 65768, 67262, 67263, 67264, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, {SPELL_SHIELD_DARK, 65874, 67256, 67257, 67258, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, {SPELL_TWIN_PACT_H, 65879, 67244, 67245, 67246, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, -{SPELL_DARK_VORTEX, 66058, 67182, 67183, 67184, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, +{SPELL_DARK_VORTEX, 66058, 67182, 67183, 67184, 30000, 30000, 30000, 30000, 90000, 90000, 90000, 90000, 65535, CAST_ON_SELF, false, false}, +{SPELL_DARK_TOUCH, 67282, 67282, 67283, 67283, 10000, 10000, 10000, 10000, 15000, 15000, 15000, 15000, 65535, CAST_ON_RANDOM, false, false}, +{SPELL_TWIN_POWER, 65916, 67248, 67249, 67250, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, +{SPELL_LIGHT_ESSENCE, 65686, 65686, 65686, 65686, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, {SPELL_DARK_ESSENCE, 65684, 65684, 65684, 65684, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, -{SPELL_DARK_TOUCH, 67282, 67282, 67283, 67283, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, {SPELL_BERSERK, 64238, 64238, 64238, 64238, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 65535, CAST_ON_SELF, false, false}, }; @@ -89,15 +89,108 @@ static SpellTable m_BossSpell[]= struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI { - boss_fjolaAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + boss_fjolaAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } ScriptedInstance* m_pInstance; + uint8 Difficulty; + uint32 m_uiSpell_Timer[BOSS_SPELL_COUNT]; + uint8 stage; + Unit* currentTarget; + + void Reset() { + if(!m_pInstance) return; + Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); + m_pInstance->SetData(TYPE_VALKIRIES, NOT_STARTED); + memset(&m_uiSpell_Timer, 0, sizeof(m_uiSpell_Timer)); + SetEquipmentSlots(false, EQUIP_MAIN_1, EQUIP_OFFHAND_1, EQUIP_RANGED_1); + if (m_creature->IsAlive()) m_creature->SummonCreature(NPC_LIGHT_ESSENCE, SpawnLoc[24].x, SpawnLoc[24].y, SpawnLoc[24].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); + if (m_creature->IsAlive()) m_creature->SummonCreature(NPC_LIGHT_ESSENCE, SpawnLoc[25].x, SpawnLoc[25].y, SpawnLoc[25].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); + } + + bool QuerySpellPeriod(uint32 m_uiSpellIdx, uint32 diff) + { + if(!m_pInstance) return false; + bool result; + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + if (m_uiSpellIdx != pSpell->id) return false; + + if (m_uiSpell_Timer[m_uiSpellIdx] == 0 ) m_uiSpell_Timer[m_uiSpellIdx]=urand(0,pSpell->m_uiSpellTimerMax[Difficulty]); - void Reset() {} + if (m_uiSpell_Timer[m_uiSpellIdx] < diff) { + m_uiSpell_Timer[m_uiSpellIdx]=urand(pSpell->m_uiSpellTimerMin[Difficulty],pSpell->m_uiSpellTimerMax[Difficulty]); + result = true; + } else { + m_uiSpell_Timer[m_uiSpellIdx] -= diff; + result = false; + }; + return result; + } + + CanCastResult CastBossSpell(uint32 m_uiSpellIdx) + { + if(!m_pInstance) return CAST_FAIL_OTHER; + Unit* pTarget; + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + // Find spell index - temporary direct insert from spelltable + if (m_uiSpellIdx != pSpell->id) return CAST_FAIL_OTHER; + + switch (pSpell->m_CastTarget) { + case CAST_ON_SELF: + pTarget = m_creature; + break; + case CAST_ON_SUMMONS: + pTarget = m_creature->getVictim(); //CHANGE IT!!! + break; + case CAST_ON_VICTIM: + pTarget = m_creature->getVictim(); + break; + case CAST_ON_RANDOM: + pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); + break; + case CAST_ON_BOTTOMAGGRO: + pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1); + break; + + }; + currentTarget = pTarget; + if (pTarget) return DoCastSpellIfCan(pTarget,pSpell->m_uiSpellEntry[Difficulty]); + } + + void JustReachedHome() + { + if (!m_pInstance) return; + m_pInstance->SetData(TYPE_VALKIRIES, FAIL); + } + void JustDied(Unit* pKiller) + { + if (!m_pInstance) return; + DoScriptText(-1713547,m_creature); + m_pInstance->SetData(TYPE_VALKIRIES, DONE); + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(-1713544,pVictim); + } void Aggro(Unit* pWho) { + if (!m_pInstance) return; m_creature->SetInCombatWithZone(); + m_pInstance->SetData(TYPE_VALKIRIES, IN_PROGRESS); + DoScriptText(-1713541,m_creature); + } + + void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + { + if (!m_creature || !m_creature->isAlive()) + return; + m_pInstance->SetData(DATA_DAMAGE_FJOLA, uiDamage); + uiDamage += m_pInstance->GetData(DATA_DAMAGE_EYDIS); } void UpdateAI(const uint32 uiDiff) @@ -105,6 +198,18 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (QuerySpellPeriod(SPELL_LIGHT_SURGE, uiDiff)) + CastBossSpell(SPELL_LIGHT_SURGE); + if (QuerySpellPeriod(SPELL_LIGHT_TOUCH, uiDiff)) + CastBossSpell(SPELL_LIGHT_TOUCH); + if (QuerySpellPeriod(SPELL_LIGHT_VORTEX, uiDiff)) { + if (m_pInstance->GetData(DATA_CASTING_EYDIS) != SPELL_DARK_VORTEX) { + DoScriptText(-1713538,m_creature); + CastBossSpell(SPELL_LIGHT_VORTEX); + m_pInstance->SetData(DATA_CASTING_FJOLA, SPELL_LIGHT_VORTEX); + } else m_pInstance->SetData(DATA_CASTING_EYDIS, 0); + } + DoMeleeAttackIfReady(); } }; @@ -120,13 +225,109 @@ CreatureAI* GetAI_boss_fjola(Creature* pCreature) struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI { - boss_eydisAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + boss_eydisAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } - void Reset() {} + ScriptedInstance* m_pInstance; + uint8 Difficulty; + uint32 m_uiSpell_Timer[BOSS_SPELL_COUNT]; + uint8 stage; + Unit* currentTarget; + + void Reset() + { + if(!m_pInstance) return; + Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); + m_pInstance->SetData(TYPE_VALKIRIES, NOT_STARTED); + memset(&m_uiSpell_Timer, 0, sizeof(m_uiSpell_Timer)); + SetEquipmentSlots(false, EQUIP_MAIN_2, EQUIP_OFFHAND_2, EQUIP_RANGED_2); + if (m_creature->IsAlive()) m_creature->SummonCreature(NPC_DARK_ESSENCE, SpawnLoc[22].x, SpawnLoc[22].y, SpawnLoc[22].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); + if (m_creature->IsAlive()) m_creature->SummonCreature(NPC_DARK_ESSENCE, SpawnLoc[23].x, SpawnLoc[23].y, SpawnLoc[23].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); + } + + bool QuerySpellPeriod(uint32 m_uiSpellIdx, uint32 diff) + { + if(!m_pInstance) return false; + bool result; + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + if (m_uiSpellIdx != pSpell->id) return false; + + if (m_uiSpell_Timer[m_uiSpellIdx] == 0 ) m_uiSpell_Timer[m_uiSpellIdx]=urand(0,pSpell->m_uiSpellTimerMax[Difficulty]); + + if (m_uiSpell_Timer[m_uiSpellIdx] < diff) { + m_uiSpell_Timer[m_uiSpellIdx]=urand(pSpell->m_uiSpellTimerMin[Difficulty],pSpell->m_uiSpellTimerMax[Difficulty]); + result = true; + } else { + m_uiSpell_Timer[m_uiSpellIdx] -= diff; + result = false; + }; + return result; + } + + CanCastResult CastBossSpell(uint32 m_uiSpellIdx) + { + if(!m_pInstance) return CAST_FAIL_OTHER; + Unit* pTarget; + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + // Find spell index - temporary direct insert from spelltable + if (m_uiSpellIdx != pSpell->id) return CAST_FAIL_OTHER; + + switch (pSpell->m_CastTarget) { + case CAST_ON_SELF: + pTarget = m_creature; + break; + case CAST_ON_SUMMONS: + pTarget = m_creature->getVictim(); //CHANGE IT!!! + break; + case CAST_ON_VICTIM: + pTarget = m_creature->getVictim(); + break; + case CAST_ON_RANDOM: + pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); + break; + case CAST_ON_BOTTOMAGGRO: + pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1); + break; + + }; + currentTarget = pTarget; + if (pTarget) return DoCastSpellIfCan(pTarget,pSpell->m_uiSpellEntry[Difficulty]); + } + + void JustReachedHome() + { + if (!m_pInstance) return; + m_pInstance->SetData(TYPE_VALKIRIES, FAIL); + } + void JustDied(Unit* pKiller) + { + if (!m_pInstance) return; + DoScriptText(-1713547,m_creature); + m_pInstance->SetData(TYPE_VALKIRIES, DONE); + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(-1713543,pVictim); + } void Aggro(Unit* pWho) { + if (!m_pInstance) return; m_creature->SetInCombatWithZone(); + m_pInstance->SetData(TYPE_VALKIRIES, IN_PROGRESS); + DoScriptText(-1713741,m_creature); + } + + void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + { + if (!m_creature || !m_creature->isAlive()) + return; + m_pInstance->SetData(DATA_DAMAGE_EYDIS, uiDamage); + uiDamage += m_pInstance->GetData(DATA_DAMAGE_FJOLA); } void UpdateAI(const uint32 uiDiff) @@ -134,6 +335,18 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (QuerySpellPeriod(SPELL_DARK_SURGE, uiDiff)) + CastBossSpell(SPELL_DARK_SURGE); + if (QuerySpellPeriod(SPELL_DARK_TOUCH, uiDiff)) + CastBossSpell(SPELL_DARK_TOUCH); + if (QuerySpellPeriod(SPELL_DARK_VORTEX, uiDiff)) { + if (m_pInstance->GetData(DATA_CASTING_FJOLA) != SPELL_LIGHT_VORTEX) { + DoScriptText(-1713540,m_creature); + CastBossSpell(SPELL_DARK_VORTEX); + m_pInstance->SetData(DATA_CASTING_EYDIS, SPELL_DARK_VORTEX); + } else m_pInstance->SetData(DATA_CASTING_FJOLA, 0); + }; + DoMeleeAttackIfReady(); } }; @@ -143,16 +356,97 @@ CreatureAI* GetAI_boss_eydis(Creature* pCreature) return new boss_eydisAI(pCreature); } +struct MANGOS_DLL_DECL mob_light_essenceAI : public ScriptedAI +{ + mob_light_essenceAI(Creature* pCreature) : ScriptedAI(pCreature) { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + ScriptedInstance* m_pInstance; + uint8 Difficulty; + + void Reset() + { + Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); + m_creature->SetRespawnDelay(DAY); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_pInstance) m_creature->ForcedDespawn(); + if (m_pInstance->GetData(TYPE_VALKIRIES) != IN_PROGRESS) { + Map* pMap = m_creature->GetMap(); + Map::PlayerList const &lPlayers = pMap->GetPlayers(); + for(Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr) + { + Unit* pPlayer = itr->getSource(); + if (!pPlayer) continue; + if (pPlayer->isAlive()) + pPlayer->RemoveAurasDueToSpell(m_BossSpell[SPELL_LIGHT_ESSENCE].m_uiSpellEntry[Difficulty]); + } + + m_creature->ForcedDespawn(); + } + return; + } +}; + +CreatureAI* GetAI_mob_light_essence(Creature* pCreature) +{ + return new mob_light_essenceAI(pCreature); +}; + bool GossipHello_mob_light_essence(Player *player, Creature* pCreature) { ScriptedInstance *pInstance = (ScriptedInstance *) pCreature->GetInstanceData(); if(!pInstance) return true; uint8 Difficulty = pInstance->GetData(TYPE_DIFFICULTY); - player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, pCreature->GetGUID()); - pCreature->CastSpell(player,m_BossSpell[SPELL_LIGHT_ESSENCE].m_uiSpellEntry[Difficulty],false); + player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, pCreature->GetGUID()); + player->RemoveAurasDueToSpell(m_BossSpell[SPELL_DARK_ESSENCE].m_uiSpellEntry[Difficulty]); + player->CastSpell(player,m_BossSpell[SPELL_LIGHT_ESSENCE].m_uiSpellEntry[Difficulty],false); player->CLOSE_GOSSIP_MENU(); return true; -} +}; + +struct MANGOS_DLL_DECL mob_dark_essenceAI : public ScriptedAI +{ + mob_dark_essenceAI(Creature* pCreature) : ScriptedAI(pCreature) { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + ScriptedInstance* m_pInstance; + uint8 Difficulty; + + void Reset() + { + Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); + m_creature->SetRespawnDelay(DAY); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_pInstance) m_creature->ForcedDespawn(); + if (m_pInstance->GetData(TYPE_VALKIRIES) != IN_PROGRESS) { + Map* pMap = m_creature->GetMap(); + Map::PlayerList const &lPlayers = pMap->GetPlayers(); + for(Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr) + { + Unit* pPlayer = itr->getSource(); + if (!pPlayer) continue; + if (pPlayer->isAlive()) + pPlayer->RemoveAurasDueToSpell(m_BossSpell[SPELL_DARK_ESSENCE].m_uiSpellEntry[Difficulty]); + } + + m_creature->ForcedDespawn(); + } + return; + } +}; + +CreatureAI* GetAI_mob_dark_essence(Creature* pCreature) +{ + return new mob_dark_essenceAI(pCreature); +}; bool GossipHello_mob_dark_essence(Player *player, Creature* pCreature) { @@ -160,7 +454,8 @@ bool GossipHello_mob_dark_essence(Player *player, Creature* pCreature) if(!pInstance) return true; uint8 Difficulty = pInstance->GetData(TYPE_DIFFICULTY); player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, pCreature->GetGUID()); - pCreature->CastSpell(player,m_BossSpell[SPELL_DARK_ESSENCE].m_uiSpellEntry[Difficulty],false); + player->RemoveAurasDueToSpell(m_BossSpell[SPELL_LIGHT_ESSENCE].m_uiSpellEntry[Difficulty]); + player->CastSpell(player,m_BossSpell[SPELL_DARK_ESSENCE].m_uiSpellEntry[Difficulty],false); player->CLOSE_GOSSIP_MENU(); return true; } @@ -176,16 +471,18 @@ void AddSC_twin_valkyr() newscript = new Script; newscript->Name = "boss_eydis"; - newscript->GetAI = &GetAI_boss_fjola; + newscript->GetAI = &GetAI_boss_eydis; newscript->RegisterSelf(); newscript = new Script; newscript->Name = "mob_light_essence"; + newscript->GetAI = &GetAI_mob_light_essence; newscript->pGossipHello = &GossipHello_mob_light_essence; newscript->RegisterSelf(); newscript = new Script; newscript->Name = "mob_dark_essence"; + newscript->GetAI = &GetAI_mob_dark_essence; newscript->pGossipHello = &GossipHello_mob_dark_essence; newscript->RegisterSelf(); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index 83d6d9a9c..86892af5d 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -37,6 +37,13 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance uint8 Difficulty; std::string m_strInstData; + uint32 m_uiDataDamageFjola; + uint32 m_uiDataDamageFjola_t; + uint32 m_uiDataDamageEydis; + uint32 m_uiDataDamageEydis_t; + uint32 m_uiFjolaCasting; + uint32 m_uiEydisCasting; + uint64 m_uiBarrentGUID; uint64 m_uiTirionGUID; uint64 m_uiFizzlebangGUID; @@ -102,13 +109,22 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance { for (uint8 i = 0; i < MAX_ENCOUNTERS; ++i) m_auiEncounter[i] = NOT_STARTED; + m_auiEncounter[0] = 0; m_auiEncounter[7] = 50; m_auiEncounter[8] = 0; + m_uiTributeChest1GUID = 0; m_uiTributeChest2GUID = 0; m_uiTributeChest3GUID = 0; m_uiTributeChest4GUID = 0; + m_uiDataDamageFjola = 0; + m_uiDataDamageFjola_t = 0; + m_uiDataDamageEydis = 0; + m_uiDataDamageEydis_t = 0; + m_uiLich0GUID = 0; + m_uiLich1GUID = 0; + m_auiEventTimer = 1000; } @@ -234,7 +250,8 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance }; }; break; - case TYPE_FROJA: m_auiEncounter[4] = uiData; break; + case TYPE_VALKIRIES: if (m_auiEncounter[4] == SPECIAL && uiData == SPECIAL) uiData = DONE; + m_auiEncounter[4] = uiData; break; case TYPE_LICH_KING: m_auiEncounter[5] = uiData; break; case TYPE_ANUBARAK: m_auiEncounter[6] = uiData; if (uiData == DONE) { @@ -269,6 +286,10 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance case TYPE_COUNTER: m_auiEncounter[7] = uiData; uiData = DONE; break; case TYPE_EVENT: m_auiEncounter[8] = uiData; uiData = NOT_STARTED; break; case TYPE_EVENT_TIMER: m_auiEventTimer = uiData; uiData = NOT_STARTED; break; + case DATA_DAMAGE_FJOLA: m_uiDataDamageFjola += uiData; uiData = NOT_STARTED; break; + case DATA_DAMAGE_EYDIS: m_uiDataDamageEydis += uiData; uiData = NOT_STARTED; break; + case DATA_CASTING_FJOLA: m_uiFjolaCasting = uiData; uiData = NOT_STARTED; break; + case DATA_CASTING_EYDIS: m_uiEydisCasting = uiData; uiData = NOT_STARTED; break; } if (uiData == FAIL && uiType != TYPE_STAGE @@ -356,7 +377,7 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance case TYPE_BEASTS: return m_auiEncounter[1]; case TYPE_JARAXXUS: return m_auiEncounter[2]; case TYPE_CRUSADERS: return m_auiEncounter[3]; - case TYPE_FROJA: return m_auiEncounter[4]; + case TYPE_VALKIRIES: return m_auiEncounter[4]; case TYPE_LICH_KING: return m_auiEncounter[5]; case TYPE_ANUBARAK: return m_auiEncounter[6]; case TYPE_COUNTER: return m_auiEncounter[7]; @@ -443,6 +464,15 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance }; return m_auiEventNPCId; + + case DATA_DAMAGE_FJOLA: m_uiDataDamageFjola_t = m_uiDataDamageFjola; + m_uiDataDamageFjola = 0; + return m_uiDataDamageFjola_t; + case DATA_DAMAGE_EYDIS: m_uiDataDamageEydis_t = m_uiDataDamageEydis; + m_uiDataDamageEydis = 0; + return m_uiDataDamageEydis_t; + case DATA_CASTING_FJOLA: return m_uiFjolaCasting; + case DATA_CASTING_EYDIS: return m_uiEydisCasting; } return 0; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index ceccf92f9..62ebd7007 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -38,7 +38,7 @@ static _Messages _GossipMessage[]= {"Вы готовы к следующему этапу?",GOSSIP_ACTION_INFO_DEF+2,false,TYPE_JARAXXUS}, // {"Вы готовы драться с крестоносцами альянса?",GOSSIP_ACTION_INFO_DEF+3,false,TYPE_CRUSADERS}, // {"Вы готовы драться с крестоносцами орды?",GOSSIP_ACTION_INFO_DEF+4,false,TYPE_CRUSADERS}, // -{"Вы готовы к следующему этапу?",GOSSIP_ACTION_INFO_DEF+5,false,TYPE_FROJA}, // +{"Вы готовы к следующему этапу?",GOSSIP_ACTION_INFO_DEF+5,false,TYPE_VALKIRIES}, // {"Вы готовы продолжить бой с Ануб-Араком?",GOSSIP_ACTION_INFO_DEF+6,true,TYPE_LICH_KING}, // {"Не надо сюда тыкать. На сегодня арена закрыта.",GOSSIP_ACTION_INFO_DEF+7,true,TYPE_ANUBARAK}, // }; @@ -187,15 +187,10 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI }; case 7: { - Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_DARKBANE)); - Creature* pTemp1 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_LIGHTBANE)); - if (pTemp && pTemp1){ - if (!pTemp->isAlive() && !pTemp1->isAlive()) { + if (pInstance->GetData(TYPE_VALKIRIES) == DONE) { pInstance->SetData(TYPE_STAGE,0); - pInstance->SetData(TYPE_FROJA,DONE); pInstance->SetData(TYPE_EVENT,4020); } - } break; }; case 8: { @@ -287,8 +282,7 @@ switch(uiAction) { }; case GOSSIP_ACTION_INFO_DEF+5: { - if (pInstance->GetData(TYPE_FROJA) == NOT_STARTED || - pInstance->GetData(TYPE_FROJA) == FAIL) + if (pInstance->GetData(TYPE_VALKIRIES) != DONE) pInstance->SetData(TYPE_EVENT,4000); break; }; @@ -1032,7 +1026,7 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI case 4015: pInstance->SetData(TYPE_STAGE,7); - pInstance->SetData(TYPE_FROJA,IN_PROGRESS); + pInstance->SetData(TYPE_VALKIRIES,IN_PROGRESS); if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_LIGHTBANE))) { if(!pTemp->isAlive()) pTemp->Respawn(); } else { @@ -1067,9 +1061,7 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI UpdateTimer = 2000; pInstance->SetData(TYPE_EVENT,5010); pInstance->SetData(TYPE_STAGE,8); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_LICH_KING_1))) - { if(!pTemp->isAlive()) pTemp->Respawn(); } - else m_creature->SummonCreature(NPC_LICH_KING_1, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 5, TEMPSUMMON_MANUAL_DESPAWN, 0); + m_creature->SummonCreature(NPC_LICH_KING_1, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 5, TEMPSUMMON_MANUAL_DESPAWN, 0); break; case 5020: DoScriptText(-1713551, m_creature); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index 43f17dbcc..1715362f1 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -8,7 +8,7 @@ enum TYPE_BEASTS = 1, TYPE_JARAXXUS = 2, TYPE_CRUSADERS = 3, - TYPE_FROJA = 4, + TYPE_VALKIRIES = 4, TYPE_LICH_KING = 5, TYPE_ANUBARAK = 6, TYPE_COUNTER = 7, @@ -85,6 +85,11 @@ enum TYPE_EVENT_NPC = 103, TYPE_NORTHREND_BEASTS = 110, + DATA_DAMAGE_EYDIS = 201, + DATA_DAMAGE_FJOLA = 202, + DATA_CASTING_EYDIS = 203, + DATA_CASTING_FJOLA = 204, + DESPAWN_TIME = 300000 }; @@ -98,10 +103,10 @@ struct Locations static Locations SpawnLoc[]= { {559.257996, 90.266197, 395.122986}, // 0 Barrent - {563.672974, 139.571, 393.837006}, // 1 Center + {563.672974, 139.571, 394.837006}, // 1 Center {563.833008, 187.244995, 394.5}, // 2 Backdoor - {583.336182, 181.737717, 395.135956}, // 3 - {545.914185, 180.859543, 395.137909}, // 4 + {583.336182, 181.737717, 395.145956}, // 3 + {545.914185, 180.859543, 395.147909}, // 4 {599.042358, 179.260727, 395.137146}, // 5 {532.248901, 180.331955, 395.132658}, // 6 {586.342285, 181.515823, 395.135956}, // 7 @@ -115,10 +120,14 @@ static Locations SpawnLoc[]= {516.633972, 159.391708, 395.137543}, // 15 {612.816956, 161.477921, 395.136810}, // 16 {563.549, 152.474, 394.393}, // 17 - Lich king start - {563.547, 141.613, 393.908}, // 18 - Lich king end + {563.547, 141.613, 394.108}, // 18 - Lich king end {787.932556, 133.28978, 142.612152}, // 19 - Anub'arak start location {618.157898, 132.640869, 139.559769}, // 20 - Anub'arak move point location {508.104767, 138.247345, 395.128052}, // 21 - Fizzlebang start location + {586.060242, 117.514809, 394.314026}, // 22 - Dark essence 1 + {541.602112, 161.879837, 394.587952}, // 23 - Dark essence 2 + {541.021118, 117.262932, 395.314819}, // 24 - Light essence 1 + {586.200562, 162.145523, 394.626129}, // 25 - Light essence 2 }; struct WayPoints diff --git a/sql/Updates/r1632_mangos.sql b/sql/Updates/r1632_mangos.sql index a318e0116..32d39be53 100644 --- a/sql/Updates/r1632_mangos.sql +++ b/sql/Updates/r1632_mangos.sql @@ -5,5 +5,5 @@ UPDATE creature_template SET ScriptName='boss_dreadscale' WHERE entry=34799; -- UPDATE creature_template SET ScriptName='boss_icehowl' WHERE entry=34797; UPDATE creature_template SET ScriptName='boss_jaraxxus' WHERE entry=34780; -- UPDATE creature_template SET ScriptName='boss_anubarak_trial' WHERE entry=34564; --- UPDATE creature_template SET ScriptName='boss_fjola' WHERE entry=34497; --- UPDATE creature_template SET ScriptName='boss_eydis' WHERE entry=34496; +UPDATE creature_template SET ScriptName='boss_fjola' WHERE entry=34497; +UPDATE creature_template SET ScriptName='boss_eydis' WHERE entry=34496; From d6150e629b890976e273560c739e3f48a439bbc1 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Fri, 12 Mar 2010 18:23:44 +0300 Subject: [PATCH 188/405] Small change for TOC-22 --- .../trial_of_the_crusader/boss_twin_valkyr.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp index f2bdd7d10..198a8495d 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp @@ -107,8 +107,8 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI m_pInstance->SetData(TYPE_VALKIRIES, NOT_STARTED); memset(&m_uiSpell_Timer, 0, sizeof(m_uiSpell_Timer)); SetEquipmentSlots(false, EQUIP_MAIN_1, EQUIP_OFFHAND_1, EQUIP_RANGED_1); - if (m_creature->IsAlive()) m_creature->SummonCreature(NPC_LIGHT_ESSENCE, SpawnLoc[24].x, SpawnLoc[24].y, SpawnLoc[24].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); - if (m_creature->IsAlive()) m_creature->SummonCreature(NPC_LIGHT_ESSENCE, SpawnLoc[25].x, SpawnLoc[25].y, SpawnLoc[25].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); + if (m_creature->isAlive()) m_creature->SummonCreature(NPC_LIGHT_ESSENCE, SpawnLoc[24].x, SpawnLoc[24].y, SpawnLoc[24].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); + if (m_creature->isAlive()) m_creature->SummonCreature(NPC_LIGHT_ESSENCE, SpawnLoc[25].x, SpawnLoc[25].y, SpawnLoc[25].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); } bool QuerySpellPeriod(uint32 m_uiSpellIdx, uint32 diff) @@ -244,8 +244,8 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI m_pInstance->SetData(TYPE_VALKIRIES, NOT_STARTED); memset(&m_uiSpell_Timer, 0, sizeof(m_uiSpell_Timer)); SetEquipmentSlots(false, EQUIP_MAIN_2, EQUIP_OFFHAND_2, EQUIP_RANGED_2); - if (m_creature->IsAlive()) m_creature->SummonCreature(NPC_DARK_ESSENCE, SpawnLoc[22].x, SpawnLoc[22].y, SpawnLoc[22].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); - if (m_creature->IsAlive()) m_creature->SummonCreature(NPC_DARK_ESSENCE, SpawnLoc[23].x, SpawnLoc[23].y, SpawnLoc[23].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); + if (m_creature->isAlive()) m_creature->SummonCreature(NPC_DARK_ESSENCE, SpawnLoc[22].x, SpawnLoc[22].y, SpawnLoc[22].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); + if (m_creature->isAlive()) m_creature->SummonCreature(NPC_DARK_ESSENCE, SpawnLoc[23].x, SpawnLoc[23].y, SpawnLoc[23].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); } bool QuerySpellPeriod(uint32 m_uiSpellIdx, uint32 diff) From efdcbd408e2936b00f40ffddd460ac0817e752d5 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Fri, 12 Mar 2010 19:10:59 +0300 Subject: [PATCH 189/405] Revert SpawnPoint changes (TOC 22) --- .../trial_of_the_crusader/trial_of_the_crusader.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index 1715362f1..736b2b60f 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -103,7 +103,7 @@ struct Locations static Locations SpawnLoc[]= { {559.257996, 90.266197, 395.122986}, // 0 Barrent - {563.672974, 139.571, 394.837006}, // 1 Center + {563.672974, 139.571, 393.837006}, // 1 Center {563.833008, 187.244995, 394.5}, // 2 Backdoor {583.336182, 181.737717, 395.145956}, // 3 {545.914185, 180.859543, 395.147909}, // 4 @@ -120,7 +120,7 @@ static Locations SpawnLoc[]= {516.633972, 159.391708, 395.137543}, // 15 {612.816956, 161.477921, 395.136810}, // 16 {563.549, 152.474, 394.393}, // 17 - Lich king start - {563.547, 141.613, 394.108}, // 18 - Lich king end + {563.547, 141.613, 393.908}, // 18 - Lich king end {787.932556, 133.28978, 142.612152}, // 19 - Anub'arak start location {618.157898, 132.640869, 139.559769}, // 20 - Anub'arak move point location {508.104767, 138.247345, 395.128052}, // 21 - Fizzlebang start location From b37e61c86fd2dc814492bc7b68b95a2c6a849e15 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Fri, 12 Mar 2010 23:55:58 +0300 Subject: [PATCH 190/405] TOC 22 test change valkiries. --- .../trial_of_the_crusader/boss_twin_valkyr.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp index 198a8495d..1fc6d40c8 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp @@ -374,7 +374,7 @@ struct MANGOS_DLL_DECL mob_light_essenceAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { if (!m_pInstance) m_creature->ForcedDespawn(); - if (m_pInstance->GetData(TYPE_VALKIRIES) != IN_PROGRESS) { + if (m_pInstance->GetData(TYPE_VALKIRIES) == DONE || m_pInstance->GetData(TYPE_VALKIRIES) == NOT_STARTED) { Map* pMap = m_creature->GetMap(); Map::PlayerList const &lPlayers = pMap->GetPlayers(); for(Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr) @@ -426,7 +426,7 @@ struct MANGOS_DLL_DECL mob_dark_essenceAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { if (!m_pInstance) m_creature->ForcedDespawn(); - if (m_pInstance->GetData(TYPE_VALKIRIES) != IN_PROGRESS) { + if (m_pInstance->GetData(TYPE_VALKIRIES) == DONE || m_pInstance->GetData(TYPE_VALKIRIES) == NOT_STARTED) { Map* pMap = m_creature->GetMap(); Map::PlayerList const &lPlayers = pMap->GetPlayers(); for(Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr) From bbca401b48228d0d5f8063cd870dd5070a27b2c2 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sun, 14 Mar 2010 18:07:58 +0300 Subject: [PATCH 191/405] Anub'Arak draft && instance bugfixes --- addition/724_trial_of_crusader_mangos.sql | 12 +- .../boss_anubarak_trial.cpp | 193 +++++++++++++++++- .../instance_trial_of_the_crusader.cpp | 1 + .../trial_of_the_crusader.cpp | 56 +++-- .../trial_of_the_crusader.h | 2 + 5 files changed, 220 insertions(+), 44 deletions(-) diff --git a/addition/724_trial_of_crusader_mangos.sql b/addition/724_trial_of_crusader_mangos.sql index 36b35f98a..4ad6ebdfb 100644 --- a/addition/724_trial_of_crusader_mangos.sql +++ b/addition/724_trial_of_crusader_mangos.sql @@ -1,8 +1,7 @@ - -- instance UPDATE `instance_template` SET `script`='instance_trial_of_the_crusader' WHERE `map`=649; DELETE FROM `creature` WHERE `map` = 649 AND `id` IN -(34797,34796,34799,35144,34780,34460,34463,34461,34471,34475,34472,34453,34455,34458,34454,34451,34456,34497,34496,34564,34467,35465,34468,35610,34473,34474,34441,34449,34448,34450); +(34797,34796,34799,35144,34780,34460,34463,34461,34471,34475,34472,34453,34455,34458,34454,34451,34456,34497,34496,34564,34467,35465,34468,35610,34473,34474,34441,34449,34448,34450,34606, 34605, 34607, 34564); -- announcers UPDATE `creature_template` SET `npcflag`=1, `scriptname`='npc_toc_announcer' WHERE `entry`=34816; @@ -76,5 +75,12 @@ UPDATE `creature_template` SET `npcflag`=1, `scriptname`='mob_light_essence', `A UPDATE `creature_template` SET `npcflag`=1, `scriptname`='mob_dark_essence', `AIName` ='' WHERE entry = 34567; -- Anub'arak --- UPDATE `creature_template` SET `scriptname`='boss_anubarak' WHERE entry=34564; +UPDATE `creature_template` SET `scriptname`='boss_anubarak_trial' WHERE entry=34564; +UPDATE `creature_template` SET `modelid_A` = 25144, `modelid_A2` = 0, `modelid_H` = 25144, `modelid_H2` = 0, `faction_A` = 16, `faction_H` = 16, `AIName` = 'EventAI', `ScriptName` = '' WHERE `entry` = 34606; +DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (34606, 34605, 34607, 34564); +INSERT INTO `creature_ai_scripts` (`id`, `creature_id`, `event_type`, `event_inverse_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action1_type`, `action1_param1`, `action1_param2`, `action1_param3`, `action2_type`, `action2_param1`, `action2_param2`, `action2_param3`, `action3_type`, `action3_param1`, `action3_param2`, `action3_param3`, `comment`) VALUES +(3460651, 34606, 0, 0, 60, 3, 1000, 15000, 60000, 60000, 11, 66193, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 'Frost Sphere - Permafrost'), +(3460654, 34606, 0, 0, 60, 5, 1000, 15000, 60000, 60000, 11, 67855, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 'Frost Sphere - Permafrost'), +(3460652, 34606, 0, 0, 60, 9, 1000, 15000, 60000, 60000, 11, 67856, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 'Frost Sphere - Permafrost'), +(3460653, 34606, 0, 0, 60, 16, 1000, 15000, 60000, 60000, 11, 67857, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 'Frost Sphere - Permafrost'); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp index 81816504d..ea6c3b77a 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp @@ -27,18 +27,24 @@ EndScriptData */ enum Summons { NPC_FROST_SPHERE = 34606, - NPC_GUARDIAN = 34607, - NPC_DATTER = 34605, + NPC_BURROWER = 34607, + NPC_SCARAB = 34605, }; enum BossSpells { SPELL_COLD, + SPELL_MARK, SPELL_LEECHING_SWARM, SPELL_IMPALE, SPELL_POUND, - SPELL_SUBMERGE, + SPELL_SHOUT, + SPELL_SUBMERGE_0, + SPELL_SUBMERGE_1, SPELL_SUMMON_BEATLES, + SUMMON_SCARAB, + SUMMON_BORROWER, + SUMMON_FROSTSPHERE, SPELL_BERSERK, BOSS_SPELL_COUNT }; @@ -46,11 +52,17 @@ static SpellTable m_BossSpell[]= { // Name 10 25 10H 25H {SPELL_COLD, 66013, 67700, 68509, 68510, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_LEECHING_SWARM, 67630, 68646, 66118, 68647, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, +{SPELL_MARK, 67574, 67574, 67574, 67574, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, +{SPELL_LEECHING_SWARM, 67630, 68646, 66118, 68647, 10000, 10000, 10000, 10000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, {SPELL_IMPALE, 65922, 65922, 65922, 65922, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_POUND, 66013, 67700, 68509, 68510, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_SUBMERGE, 53421, 53421, 53421, 53421, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_SUMMON_BEATLES, 66339, 66339, 66339, 66339, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, true, false}, +{SPELL_POUND, 66012, 66012, 66012, 66012, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, +{SPELL_SHOUT, 67730, 67730, 67730, 67730, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, +{SPELL_SUBMERGE_0, 53421, 53421, 53421, 53421, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, +{SPELL_SUBMERGE_1, 67322, 67322, 67322, 67322, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, +{SPELL_SUMMON_BEATLES, 66339, 66339, 66339, 66339, 5000, 5000, 5000, 5000, 10000, 10000, 10000, 10000, 65535, CAST_ON_RANDOM, true, false}, +{SUMMON_SCARAB, NPC_SCARAB, NPC_SCARAB, NPC_SCARAB, NPC_SCARAB, 90000, 90000, 90000, 90000, 90000, 90000, 90000, 90000, 65535, SUMMON_TEMP, true, false}, +{SUMMON_BORROWER, NPC_BURROWER, NPC_BURROWER, NPC_BURROWER, NPC_BURROWER, 90000, 90000, 90000, 90000, 90000, 90000, 90000, 90000, 65535, SUMMON_TEMP, true, false}, +{SUMMON_FROSTSPHERE, NPC_FROST_SPHERE, NPC_FROST_SPHERE, NPC_FROST_SPHERE, NPC_FROST_SPHERE, 5000, 5000, 5000, 5000, 15000, 15000, 15000, 15000, 65535, SUMMON_INSTANT, true, false}, {SPELL_BERSERK, 26662, 26662, 26662, 26662, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 65535, CAST_ON_SELF, false, false}, }; @@ -63,23 +75,121 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI } ScriptedInstance* m_pInstance; + uint8 Difficulty; + uint32 m_uiSpell_Timer[BOSS_SPELL_COUNT]; + uint8 stage; + uint32 SubmergeTimer; + Unit* currentTarget; + bool intro; - void Reset() {} + void Reset() { + if(!m_pInstance) return; + stage = 0; + intro = true; + Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); + m_pInstance->SetData(TYPE_ANUBARAK, NOT_STARTED); + memset(&m_uiSpell_Timer, 0, sizeof(m_uiSpell_Timer)); + m_uiSpell_Timer[SPELL_BERSERK] = m_BossSpell[SPELL_BERSERK].m_uiSpellTimerMin[Difficulty]; + } + + bool QuerySpellPeriod(uint32 m_uiSpellIdx, uint32 diff) + { + if(!m_pInstance) return false; + bool result; + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + if (m_uiSpellIdx != pSpell->id) return false; + + if (m_uiSpell_Timer[m_uiSpellIdx] == 0 ) m_uiSpell_Timer[m_uiSpellIdx]=urand(0,pSpell->m_uiSpellTimerMax[Difficulty]); + + if (m_uiSpell_Timer[m_uiSpellIdx] < diff) { + m_uiSpell_Timer[m_uiSpellIdx]=urand(pSpell->m_uiSpellTimerMin[Difficulty],pSpell->m_uiSpellTimerMax[Difficulty]); + result = true; + } else { + m_uiSpell_Timer[m_uiSpellIdx] -= diff; + result = false; + }; + return result; + } + + CanCastResult CastBossSpell(uint32 m_uiSpellIdx) + { + if(!m_pInstance) return CAST_FAIL_OTHER; + Unit* pTarget = NULL; + Creature* pSummon = NULL; + bool isSummon = false; + float fPosX, fPosY, fPosZ; + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + // Find spell index - temporary direct insert from spelltable + if (m_uiSpellIdx != pSpell->id) return CAST_FAIL_OTHER; + + switch (pSpell->m_CastTarget) { + case CAST_ON_SELF: + pTarget = m_creature; + break; + case CAST_ON_SUMMONS: + pTarget = m_creature->getVictim(); //CHANGE IT!!! + break; + case CAST_ON_VICTIM: + pTarget = m_creature->getVictim(); + break; + case CAST_ON_RANDOM: + pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); + break; + case CAST_ON_BOTTOMAGGRO: + pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1); + break; + case SUMMON_INSTANT: + isSummon = true; + m_creature->GetPosition(fPosX, fPosY, fPosZ); + m_creature->GetRandomPoint(fPosX, fPosY, fPosZ, urand(50, 120), fPosX, fPosY, fPosZ); + pSummon = m_creature->SummonCreature(pSpell->m_uiSpellEntry[Difficulty], fPosX, fPosY, fPosZ, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); + break; + case SUMMON_TEMP: + isSummon = true; + m_creature->GetPosition(fPosX, fPosY, fPosZ); + m_creature->GetRandomPoint(fPosX, fPosY, fPosZ, urand(50, 120), fPosX, fPosY, fPosZ); + pSummon = m_creature->SummonCreature(pSpell->m_uiSpellEntry[Difficulty], fPosX, fPosY, fPosZ, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000); + if(pSummon) pSummon->SetInCombatWithZone(); + break; + + }; + currentTarget = pTarget; + if (pTarget && !isSummon) return DoCastSpellIfCan(pTarget,pSpell->m_uiSpellEntry[Difficulty]); + else return pSummon ? CAST_OK : CAST_FAIL_OTHER; + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(-1713563,m_creature); + } + + void MoveInLineOfSight(Unit* pWho) + { + if (!intro) return; + DoScriptText(-1713554,m_creature); + intro = false; + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetInCombatWithZone(); + } void JustReachedHome() { if (m_pInstance) - m_pInstance->SetData(TYPE_ANUBARAK, NOT_STARTED); + m_pInstance->SetData(TYPE_ANUBARAK, FAIL); } void JustDied(Unit* pKiller) { - if (m_pInstance) + if (!m_pInstance) return; + DoScriptText(-1713564,m_creature); m_pInstance->SetData(TYPE_ANUBARAK, DONE); } void Aggro(Unit* pWho) { +// CastBossSpell(SPELL_MARK); + DoScriptText(-1713555,m_creature); m_creature->SetInCombatWithZone(); } @@ -88,6 +198,69 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + switch(stage) + { + case 0: { + if (QuerySpellPeriod(SPELL_POUND, uiDiff)) + CastBossSpell(SPELL_POUND); + if (QuerySpellPeriod(SPELL_COLD, uiDiff)) + CastBossSpell(SPELL_COLD); + if (QuerySpellPeriod(SUMMON_BORROWER, uiDiff)) + CastBossSpell(SUMMON_BORROWER); + if (m_creature->GetHealthPercent() < 50.0f) stage = 1; + break;} + case 1: { + CastBossSpell(SPELL_SUBMERGE_0); + stage = 2; + SubmergeTimer = 90000; + DoScriptText(-1713557,m_creature); + break;} + case 2: { + if (SubmergeTimer < uiDiff) { + stage = 3; + DoScriptText(-1713559,m_creature); + m_creature->RemoveAurasDueToSpell(m_BossSpell[SPELL_SUBMERGE_0].m_uiSpellEntry[Difficulty]); + } else SubmergeTimer -= uiDiff; + if (QuerySpellPeriod(SPELL_IMPALE, uiDiff)) + CastBossSpell(SPELL_IMPALE); + if (QuerySpellPeriod(SPELL_SUMMON_BEATLES, uiDiff)) { + CastBossSpell(SPELL_SUMMON_BEATLES); + CastBossSpell(SUMMON_SCARAB); + DoScriptText(-1713560,m_creature); + } + break;} + case 3: { + if (QuerySpellPeriod(SPELL_POUND, uiDiff)) + CastBossSpell(SPELL_POUND); + if (QuerySpellPeriod(SPELL_COLD, uiDiff)) + CastBossSpell(SPELL_COLD); + if (QuerySpellPeriod(SUMMON_BORROWER, uiDiff)) + CastBossSpell(SUMMON_BORROWER); + if (m_creature->GetHealthPercent() < 30.0f) stage = 4; + break;} + case 4: { + if (QuerySpellPeriod(SPELL_POUND, uiDiff)) + CastBossSpell(SPELL_POUND); + if (QuerySpellPeriod(SPELL_COLD, uiDiff)) + CastBossSpell(SPELL_COLD); + if (QuerySpellPeriod(SPELL_LEECHING_SWARM, uiDiff)) { + CastBossSpell(SPELL_LEECHING_SWARM); + CastBossSpell(SUMMON_SCARAB); + CastBossSpell(SUMMON_SCARAB); + DoScriptText(-1713561,m_creature); + } + break;} + + } + if (QuerySpellPeriod(SUMMON_FROSTSPHERE, uiDiff)) + CastBossSpell(SUMMON_FROSTSPHERE); + + if (QuerySpellPeriod(SPELL_BERSERK, uiDiff)) + CastBossSpell(SPELL_BERSERK); + + if (m_creature->GetHealthPercent() < 30.0f && stage == 3) stage = 1; + + DoMeleeAttackIfReady(); } }; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index 86892af5d..907c4b13d 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -455,6 +455,7 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance case 1140: case 1150: case 1160: + case 1170: m_auiEventNPCId = NPC_FIZZLEBANG; break; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index 62ebd7007..fb3967b1f 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -197,10 +197,8 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI break; }; case 9: { - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_ANUBARAK))) - if (!pTemp->isAlive()) { + if (pInstance->GetData(TYPE_ANUBARAK) == DONE) { pInstance->SetData(TYPE_STAGE,0); - pInstance->SetData(TYPE_ANUBARAK,DONE); pInstance->SetData(TYPE_EVENT,6000); } break; @@ -297,17 +295,15 @@ switch(uiAction) { pCreature->CastSpell(pCreature,69016,false); pInstance->SetData(TYPE_ANUBARAK,IN_PROGRESS); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_ANUBARAK))) - pTemp->Respawn(); - else { - pCreature->SummonCreature(NPC_ANUBARAK, SpawnLoc[19].x, SpawnLoc[19].y, SpawnLoc[19].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_ANUBARAK))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[20].x, SpawnLoc[20].y, SpawnLoc[20].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); - } - } + pCreature->SummonCreature(NPC_ANUBARAK, SpawnLoc[19].x, SpawnLoc[19].y, SpawnLoc[19].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_ANUBARAK))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[20].x, SpawnLoc[20].y, SpawnLoc[20].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetInCombatWithZone(); + } pInstance->SetData(TYPE_STAGE,9); + if (pCreature->GetVisibility() == VISIBILITY_ON) + pCreature->SetVisibility(VISIBILITY_OFF); break; }; @@ -455,16 +451,12 @@ struct MANGOS_DLL_DECL boss_lich_king_tocAI : public ScriptedAI if(pInstance) pInstance->SetData(TYPE_LICH_KING,DONE); pInstance->SetData(TYPE_ANUBARAK,IN_PROGRESS); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_ANUBARAK))) - pTemp->Respawn(); - else { - m_creature->SummonCreature(NPC_ANUBARAK, SpawnLoc[19].x, SpawnLoc[19].y, SpawnLoc[19].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_ANUBARAK))) { + m_creature->SummonCreature(NPC_ANUBARAK, SpawnLoc[19].x, SpawnLoc[19].y, SpawnLoc[19].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_ANUBARAK))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[20].x, SpawnLoc[20].y, SpawnLoc[20].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } - } pInstance->SetData(TYPE_STAGE,9); Event=false; m_creature->ForcedDespawn(); @@ -578,6 +570,12 @@ struct MANGOS_DLL_DECL npc_fizzlebang_tocAI : public ScriptedAI case 1160: DoScriptText(-1713515, m_creature); pInstance->SetData(TYPE_EVENT, 1170); + DoCast(m_creature, 58291); + UpdateTimer = 1000; + break; + case 1170: + DoCastSpellIfCan(m_creature, 58291); + pInstance->SetData(TYPE_EVENT, 1175); UpdateTimer = 1000; break; } @@ -856,6 +854,7 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_0_1))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetRespawnDelay(DAY); pTemp->SetInCombatWithZone(); } } @@ -866,6 +865,7 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_0_2))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetRespawnDelay(DAY); pTemp->SetInCombatWithZone(); } } @@ -988,6 +988,7 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_0_1))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetRespawnDelay(DAY); pTemp->SetInCombatWithZone(); } } @@ -998,6 +999,7 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_0_2))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetRespawnDelay(DAY); pTemp->SetInCombatWithZone(); } } @@ -1027,26 +1029,18 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI case 4015: pInstance->SetData(TYPE_STAGE,7); pInstance->SetData(TYPE_VALKIRIES,IN_PROGRESS); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_LIGHTBANE))) - { if(!pTemp->isAlive()) pTemp->Respawn(); } - else { - m_creature->SummonCreature(NPC_LIGHTBANE, SpawnLoc[3].x, SpawnLoc[3].y, SpawnLoc[3].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_LIGHTBANE))) { + m_creature->SummonCreature(NPC_LIGHTBANE, SpawnLoc[3].x, SpawnLoc[3].y, SpawnLoc[3].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_LIGHTBANE))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } - } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_DARKBANE))) - { if(!pTemp->isAlive()) pTemp->Respawn(); } - else { - m_creature->SummonCreature(NPC_DARKBANE, SpawnLoc[4].x, SpawnLoc[4].y, SpawnLoc[4].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_DARKBANE))) { + m_creature->SummonCreature(NPC_DARKBANE, SpawnLoc[4].x, SpawnLoc[4].y, SpawnLoc[4].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_DARKBANE))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } - } UpdateTimer = 10000; pInstance->SetData(TYPE_EVENT,4016); break; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index 736b2b60f..f870a7864 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -151,6 +151,8 @@ enum SpellTableParameters CAST_ON_VICTIM, CAST_ON_RANDOM, CAST_ON_BOTTOMAGGRO, + SUMMON_INSTANT, + SUMMON_TEMP, }; struct SpellTable From a9b5ac1ba5f379f230de3b6b3059f1ca243b405f Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Mon, 15 Mar 2010 13:35:23 +0300 Subject: [PATCH 192/405] TOC 24 - Anub'Arak spells & summons, adds scripting. --- addition/724_trial_of_crusader_mangos.sql | 34 +- .../boss_anubarak_trial.cpp | 319 ++++++++++++++++-- .../trial_of_the_crusader/boss_jaraxxus.cpp | 12 +- .../boss_twin_valkyr.cpp | 12 +- .../trial_of_the_crusader.h | 1 + 5 files changed, 311 insertions(+), 67 deletions(-) diff --git a/addition/724_trial_of_crusader_mangos.sql b/addition/724_trial_of_crusader_mangos.sql index 4ad6ebdfb..a9862e450 100644 --- a/addition/724_trial_of_crusader_mangos.sql +++ b/addition/724_trial_of_crusader_mangos.sql @@ -49,33 +49,32 @@ DELETE FROM `creature_loot_template` WHERE `entry` IN (12268,12211,12214,12283,12192,12286,12271,12274,12231,12189,12093,12090,12171,12105,12108,12114,12168,12165,12182,12185,12305,12302); -- Nortrend beasts --- UPDATE `creature_template` SET `scriptname`='boss_gormok' WHERE entry=34796; --- UPDATE `creature_template` SET `scriptname`='boss_dreadscale' WHERE entry=34799; --- UPDATE `creature_template` SET `scriptname`='boss_acidmaw' WHERE entry=35144; --- UPDATE `creature_template` SET `scriptname`='boss_icehowl' WHERE entry=34797; -UPDATE `creature_template` SET `lootid`= 0 WHERE `entry` IN -(34796,34799,35144); -DELETE FROM `creature_loot_template` WHERE `entry` IN -(34796,34799,35144); +DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (34796, 34799, 35144, 34797); +UPDATE `creature_template` SET `scriptname`='boss_gormok', `AIName` ='' WHERE `entry`=34796; +UPDATE `creature_template` SET `scriptname`='boss_dreadscale', `AIName` ='' WHERE `entry`=34799; +UPDATE `creature_template` SET `scriptname`='boss_acidmaw', `AIName` ='' WHERE `entry`=35144; +UPDATE `creature_template` SET `scriptname`='boss_icehowl', `AIName` ='' WHERE `entry`=34797; +UPDATE `creature_template` SET `lootid`= 0 WHERE `entry` IN (34796,34799,35144); +DELETE FROM `creature_loot_template` WHERE `entry` IN (34796,34799,35144); -- Jaraxxus -UPDATE `creature_template` SET `scriptname`='boss_jaraxxus', `AIName` ='' WHERE entry= 34780; +UPDATE `creature_template` SET `scriptname`='boss_jaraxxus', `AIName` ='' WHERE `entry`= 34780; DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (34780, 34784, 34813, 34815, 34825, 34826); UPDATE `creature_template` SET `scriptname`='mob_legion_flame', `minlevel` = 80, `maxlevel` = 80, `modelid_A` = 11686, `modelid_A2` = 11686, `modelid_H` = 11686, `modelid_H2` = 11686, `AIName` ='', `faction_A`= 14, `faction_H` = 14 WHERE entry = 34784; -UPDATE `creature_template` SET `scriptname`='mob_infernal_volcano', `AIName` ='' WHERE entry = 34813; -UPDATE `creature_template` SET `scriptname`='mob_fel_infernal', `AIName` ='' WHERE entry = 34815; -UPDATE `creature_template` SET `scriptname`='mob_nether_portal', `AIName` ='' WHERE entry = 34825; -UPDATE `creature_template` SET `scriptname`='mob_mistress_of_pain', `AIName` ='' WHERE entry = 34826; +UPDATE `creature_template` SET `scriptname`='mob_infernal_volcano', `AIName` ='' WHERE `entry` = 34813; +UPDATE `creature_template` SET `scriptname`='mob_fel_infernal', `AIName` ='' WHERE `entry` = 34815; +UPDATE `creature_template` SET `scriptname`='mob_nether_portal', `AIName` ='' WHERE `entry` = 34825; +UPDATE `creature_template` SET `scriptname`='mob_mistress_of_pain', `AIName` ='' WHERE `entry` = 34826; -- Froja's -UPDATE `creature_template` SET `scriptname` = 'boss_fjola', `AIName` ='' WHERE entry=34497; -UPDATE `creature_template` SET `scriptname` = 'boss_eydis', `AIName` ='' WHERE entry=34496; +UPDATE `creature_template` SET `scriptname` = 'boss_fjola', `AIName` ='' WHERE `entry`=34497; +UPDATE `creature_template` SET `scriptname` = 'boss_eydis', `AIName` ='' WHERE `entry`=34496; DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (34497, 34496, 34568, 34567); UPDATE `creature_template` SET `npcflag`=1, `scriptname`='mob_light_essence', `AIName` ='' WHERE entry = 34568; UPDATE `creature_template` SET `npcflag`=1, `scriptname`='mob_dark_essence', `AIName` ='' WHERE entry = 34567; -- Anub'arak -UPDATE `creature_template` SET `scriptname`='boss_anubarak_trial' WHERE entry=34564; +UPDATE `creature_template` SET `scriptname`='boss_anubarak_trial', `AIName` ='' WHERE `entry`=34564; UPDATE `creature_template` SET `modelid_A` = 25144, `modelid_A2` = 0, `modelid_H` = 25144, `modelid_H2` = 0, `faction_A` = 16, `faction_H` = 16, `AIName` = 'EventAI', `ScriptName` = '' WHERE `entry` = 34606; DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (34606, 34605, 34607, 34564); @@ -84,3 +83,6 @@ INSERT INTO `creature_ai_scripts` (`id`, `creature_id`, `event_type`, `event_inv (3460654, 34606, 0, 0, 60, 5, 1000, 15000, 60000, 60000, 11, 67855, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 'Frost Sphere - Permafrost'), (3460652, 34606, 0, 0, 60, 9, 1000, 15000, 60000, 60000, 11, 67856, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 'Frost Sphere - Permafrost'), (3460653, 34606, 0, 0, 60, 16, 1000, 15000, 60000, 60000, 11, 67857, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 'Frost Sphere - Permafrost'); + +UPDATE `creature_template` SET `scriptname`='mob_swarm_scarab', `AIName` ='' WHERE `entry`=34605; +UPDATE `creature_template` SET `scriptname`='mob_nerubian_borrower', `AIName` ='' WHERE `entry`=34607; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp index ea6c3b77a..b702d06d4 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp @@ -42,6 +42,10 @@ enum BossSpells SPELL_SUBMERGE_0, SPELL_SUBMERGE_1, SPELL_SUMMON_BEATLES, + SPELL_DETERMINATION, + SPELL_ACID_MANDIBLE, + SPELL_SPIDER_FRENZY, + SPELL_EXPOSE_WEAKNESS, SUMMON_SCARAB, SUMMON_BORROWER, SUMMON_FROSTSPHERE, @@ -52,17 +56,21 @@ static SpellTable m_BossSpell[]= { // Name 10 25 10H 25H {SPELL_COLD, 66013, 67700, 68509, 68510, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_MARK, 67574, 67574, 67574, 67574, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, -{SPELL_LEECHING_SWARM, 67630, 68646, 66118, 68647, 10000, 10000, 10000, 10000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_IMPALE, 65922, 65922, 65922, 65922, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, +{SPELL_MARK, 67574, 67574, 67574, 67574, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_TARGET, false, false}, +{SPELL_LEECHING_SWARM, 67630, 68646, 66118, 68647, 10000, 10000, 10000, 10000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, true}, +{SPELL_IMPALE, 65922, 65922, 65922, 65922, 10000, 10000, 10000, 10000, 15000, 15000, 15000, 15000, 65535, CAST_ON_RANDOM, false, true}, {SPELL_POUND, 66012, 66012, 66012, 66012, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, {SPELL_SHOUT, 67730, 67730, 67730, 67730, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_SUBMERGE_0, 53421, 53421, 53421, 53421, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_SUBMERGE_1, 67322, 67322, 67322, 67322, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_SUMMON_BEATLES, 66339, 66339, 66339, 66339, 5000, 5000, 5000, 5000, 10000, 10000, 10000, 10000, 65535, CAST_ON_RANDOM, true, false}, +{SPELL_SUBMERGE_0, 53421, 53421, 53421, 53421, 45000, 45000, 45000, 45000, 60000, 60000, 60000, 60000, 65535, CAST_ON_SELF, true, false}, +{SPELL_SUBMERGE_1, 67322, 67322, 67322, 67322, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, true, false}, +{SPELL_SUMMON_BEATLES, 66339, 66339, 66339, 66339, 5000, 5000, 5000, 5000, 10000, 10000, 10000, 10000, 65535, CAST_ON_RANDOM, true, false}, +{SPELL_DETERMINATION, 66092, 66092, 66092, 66092, 5000, 5000, 5000, 5000, 20000, 20000, 20000, 20000, 65535, CAST_ON_SELF, false, false}, +{SPELL_ACID_MANDIBLE, 67861, 66092, 66092, 66092, 5000, 5000, 5000, 5000, 20000, 20000, 20000, 20000, 65535, CAST_ON_VICTIM, false, false}, +{SPELL_SPIDER_FRENZY, 66129, 66129, 66129, 66129, 10000, 10000, 10000, 10000, 20000, 20000, 20000, 20000, 65535, CAST_ON_TARGET, false, false}, +{SPELL_EXPOSE_WEAKNESS, 67847, 67847, 67847, 67847, 5000, 5000, 5000, 5000, 20000, 20000, 20000, 20000, 65535, CAST_ON_VICTIM, false, false}, {SUMMON_SCARAB, NPC_SCARAB, NPC_SCARAB, NPC_SCARAB, NPC_SCARAB, 90000, 90000, 90000, 90000, 90000, 90000, 90000, 90000, 65535, SUMMON_TEMP, true, false}, -{SUMMON_BORROWER, NPC_BURROWER, NPC_BURROWER, NPC_BURROWER, NPC_BURROWER, 90000, 90000, 90000, 90000, 90000, 90000, 90000, 90000, 65535, SUMMON_TEMP, true, false}, -{SUMMON_FROSTSPHERE, NPC_FROST_SPHERE, NPC_FROST_SPHERE, NPC_FROST_SPHERE, NPC_FROST_SPHERE, 5000, 5000, 5000, 5000, 15000, 15000, 15000, 15000, 65535, SUMMON_INSTANT, true, false}, +{SUMMON_BORROWER, NPC_BURROWER, NPC_BURROWER, NPC_BURROWER, NPC_BURROWER, 70000, 70000, 70000, 70000, 100000, 100000, 100000, 100000, 65535, SUMMON_TEMP, true, false}, +{SUMMON_FROSTSPHERE, NPC_FROST_SPHERE, NPC_FROST_SPHERE, NPC_FROST_SPHERE, NPC_FROST_SPHERE, 5000, 5000, 5000, 5000, 10000, 10000, 10000, 10000, 65535, SUMMON_INSTANT, true, false}, {SPELL_BERSERK, 26662, 26662, 26662, 26662, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 65535, CAST_ON_SELF, false, false}, }; @@ -87,9 +95,8 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI stage = 0; intro = true; Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); - m_pInstance->SetData(TYPE_ANUBARAK, NOT_STARTED); - memset(&m_uiSpell_Timer, 0, sizeof(m_uiSpell_Timer)); - m_uiSpell_Timer[SPELL_BERSERK] = m_BossSpell[SPELL_BERSERK].m_uiSpellTimerMin[Difficulty]; + for (uint8 i = 0; i < BOSS_SPELL_COUNT; ++i) + m_uiSpell_Timer[i] = urand(m_BossSpell[i].m_uiSpellTimerMin[Difficulty],m_BossSpell[i].m_uiSpellTimerMax[Difficulty]); } bool QuerySpellPeriod(uint32 m_uiSpellIdx, uint32 diff) @@ -99,8 +106,6 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; if (m_uiSpellIdx != pSpell->id) return false; - if (m_uiSpell_Timer[m_uiSpellIdx] == 0 ) m_uiSpell_Timer[m_uiSpellIdx]=urand(0,pSpell->m_uiSpellTimerMax[Difficulty]); - if (m_uiSpell_Timer[m_uiSpellIdx] < diff) { m_uiSpell_Timer[m_uiSpellIdx]=urand(pSpell->m_uiSpellTimerMin[Difficulty],pSpell->m_uiSpellTimerMax[Difficulty]); result = true; @@ -132,6 +137,10 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI case CAST_ON_VICTIM: pTarget = m_creature->getVictim(); break; + case CAST_ON_TARGET: + pTarget = currentTarget; + if (!pTarget) pTarget = m_creature->getVictim(); + break; case CAST_ON_RANDOM: pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); break; @@ -154,8 +163,10 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI }; currentTarget = pTarget; - if (pTarget && !isSummon) return DoCastSpellIfCan(pTarget,pSpell->m_uiSpellEntry[Difficulty]); - else return pSummon ? CAST_OK : CAST_FAIL_OTHER; + if (pTarget && !isSummon && !pSpell->m_IsBugged) return DoCastSpellIfCan(pTarget,pSpell->m_uiSpellEntry[Difficulty]); + else if (pTarget && !isSummon && pSpell->m_IsBugged) {DoCast(pTarget,pSpell->m_uiSpellEntry[Difficulty]); return CAST_OK;} + else if (isSummon) return pSummon ? CAST_OK : CAST_FAIL_OTHER; + return CAST_FAIL_OTHER; } void KilledUnit(Unit* pVictim) @@ -189,8 +200,9 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI void Aggro(Unit* pWho) { // CastBossSpell(SPELL_MARK); - DoScriptText(-1713555,m_creature); + if (!intro) DoScriptText(-1713555,m_creature); m_creature->SetInCombatWithZone(); + m_pInstance->SetData(TYPE_ANUBARAK, IN_PROGRESS); } void UpdateAI(const uint32 uiDiff) @@ -205,38 +217,36 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI CastBossSpell(SPELL_POUND); if (QuerySpellPeriod(SPELL_COLD, uiDiff)) CastBossSpell(SPELL_COLD); - if (QuerySpellPeriod(SUMMON_BORROWER, uiDiff)) + if (QuerySpellPeriod(SUMMON_BORROWER, uiDiff)) { CastBossSpell(SUMMON_BORROWER); - if (m_creature->GetHealthPercent() < 50.0f) stage = 1; + DoScriptText(-1713556,m_creature); + }; + if (QuerySpellPeriod(SPELL_SUBMERGE_0, uiDiff)) stage = 1; break;} case 1: { CastBossSpell(SPELL_SUBMERGE_0); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); stage = 2; - SubmergeTimer = 90000; DoScriptText(-1713557,m_creature); break;} case 2: { - if (SubmergeTimer < uiDiff) { - stage = 3; - DoScriptText(-1713559,m_creature); - m_creature->RemoveAurasDueToSpell(m_BossSpell[SPELL_SUBMERGE_0].m_uiSpellEntry[Difficulty]); - } else SubmergeTimer -= uiDiff; - if (QuerySpellPeriod(SPELL_IMPALE, uiDiff)) + if (QuerySpellPeriod(SPELL_IMPALE, uiDiff)) { CastBossSpell(SPELL_IMPALE); + CastBossSpell(SPELL_MARK); + DoScriptText(-1713558,m_creature,currentTarget); + }; if (QuerySpellPeriod(SPELL_SUMMON_BEATLES, uiDiff)) { CastBossSpell(SPELL_SUMMON_BEATLES); CastBossSpell(SUMMON_SCARAB); DoScriptText(-1713560,m_creature); - } + }; + if (QuerySpellPeriod(SPELL_SUBMERGE_0, uiDiff)) stage = 3; break;} case 3: { - if (QuerySpellPeriod(SPELL_POUND, uiDiff)) - CastBossSpell(SPELL_POUND); - if (QuerySpellPeriod(SPELL_COLD, uiDiff)) - CastBossSpell(SPELL_COLD); - if (QuerySpellPeriod(SUMMON_BORROWER, uiDiff)) - CastBossSpell(SUMMON_BORROWER); - if (m_creature->GetHealthPercent() < 30.0f) stage = 4; + stage = 0; + DoScriptText(-1713559,m_creature); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveAurasDueToSpell(m_BossSpell[SPELL_SUBMERGE_0].m_uiSpellEntry[Difficulty]); break;} case 4: { if (QuerySpellPeriod(SPELL_POUND, uiDiff)) @@ -245,8 +255,6 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI CastBossSpell(SPELL_COLD); if (QuerySpellPeriod(SPELL_LEECHING_SWARM, uiDiff)) { CastBossSpell(SPELL_LEECHING_SWARM); - CastBossSpell(SUMMON_SCARAB); - CastBossSpell(SUMMON_SCARAB); DoScriptText(-1713561,m_creature); } break;} @@ -258,7 +266,7 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI if (QuerySpellPeriod(SPELL_BERSERK, uiDiff)) CastBossSpell(SPELL_BERSERK); - if (m_creature->GetHealthPercent() < 30.0f && stage == 3) stage = 1; + if (m_creature->GetHealthPercent() < 30.0f && stage == 0) stage = 4; DoMeleeAttackIfReady(); @@ -270,6 +278,234 @@ CreatureAI* GetAI_boss_anubarak_trial(Creature* pCreature) return new boss_anubarak_trialAI(pCreature); } +struct MANGOS_DLL_DECL mob_swarm_scarabAI : public ScriptedAI +{ + mob_swarm_scarabAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + uint8 Difficulty; + uint32 m_uiSpell_Timer[BOSS_SPELL_COUNT]; + Unit* currentTarget; + + void Reset() + { + for (uint8 i = 0; i < BOSS_SPELL_COUNT; ++i) + m_uiSpell_Timer[i] = urand(m_BossSpell[i].m_uiSpellTimerMin[Difficulty],m_BossSpell[i].m_uiSpellTimerMax[Difficulty]); + Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); + m_creature->SetInCombatWithZone(); + m_creature->SetRespawnDelay(DAY); + } + + bool QuerySpellPeriod(uint32 m_uiSpellIdx, uint32 diff) + { + if(!m_pInstance) return false; + bool result; + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + if (m_uiSpellIdx != pSpell->id) return false; + + if (m_uiSpell_Timer[m_uiSpellIdx] < diff) { + m_uiSpell_Timer[m_uiSpellIdx]=urand(pSpell->m_uiSpellTimerMin[Difficulty],pSpell->m_uiSpellTimerMax[Difficulty]); + result = true; + } else { + m_uiSpell_Timer[m_uiSpellIdx] -= diff; + result = false; + }; + return result; + } + + CanCastResult CastBossSpell(uint32 m_uiSpellIdx) + { + if(!m_pInstance) return CAST_FAIL_OTHER; + Unit* pTarget; + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + // Find spell index - temporary direct insert from spelltable + if (m_uiSpellIdx != pSpell->id) return CAST_FAIL_OTHER; + + switch (pSpell->m_CastTarget) { + case CAST_ON_SELF: + pTarget = m_creature; + break; + case CAST_ON_VICTIM: + pTarget = m_creature->getVictim(); + break; + case CAST_ON_RANDOM: + pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); + break; + + }; + currentTarget = pTarget; + if (pTarget) return DoCastSpellIfCan(pTarget,pSpell->m_uiSpellEntry[Difficulty]); + } + + void KilledUnit(Unit* pVictim) + { + if (pVictim->GetTypeId() != TYPEID_PLAYER) return; + } + + void JustDied(Unit* Killer) + { + } + + void Aggro(Unit *who) + { + if (!m_pInstance) return; + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_pInstance->GetData(TYPE_ANUBARAK) != IN_PROGRESS) + m_creature->ForcedDespawn(); + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (QuerySpellPeriod(SPELL_DETERMINATION, uiDiff)) + CastBossSpell(SPELL_DETERMINATION); + + if (QuerySpellPeriod(SPELL_ACID_MANDIBLE, uiDiff)) + CastBossSpell(SPELL_ACID_MANDIBLE); + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_swarm_scarab(Creature* pCreature) +{ + return new mob_swarm_scarabAI(pCreature); +} + +struct MANGOS_DLL_DECL mob_nerubian_borrowerAI : public ScriptedAI +{ + mob_nerubian_borrowerAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + uint8 Difficulty; + uint32 m_uiSpell_Timer[BOSS_SPELL_COUNT]; + Unit* currentTarget; + bool submerged; + + void Reset() + { + for (uint8 i = 0; i < BOSS_SPELL_COUNT; ++i) + m_uiSpell_Timer[i] = urand(m_BossSpell[i].m_uiSpellTimerMin[Difficulty],m_BossSpell[i].m_uiSpellTimerMax[Difficulty]); + Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); + m_creature->SetInCombatWithZone(); + m_creature->SetRespawnDelay(DAY); + submerged = false; + } + + bool QuerySpellPeriod(uint32 m_uiSpellIdx, uint32 diff) + { + if(!m_pInstance) return false; + bool result; + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + if (m_uiSpellIdx != pSpell->id) return false; + + if (m_uiSpell_Timer[m_uiSpellIdx] < diff) { + m_uiSpell_Timer[m_uiSpellIdx]=urand(pSpell->m_uiSpellTimerMin[Difficulty],pSpell->m_uiSpellTimerMax[Difficulty]); + result = true; + } else { + m_uiSpell_Timer[m_uiSpellIdx] -= diff; + result = false; + }; + return result; + } + + CanCastResult CastBossSpell(uint32 m_uiSpellIdx) + { + if(!m_pInstance) return CAST_FAIL_OTHER; + Unit* pTarget = NULL; + Creature* pSummon = NULL; + bool isSummon = false; + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + // Find spell index - temporary direct insert from spelltable + if (m_uiSpellIdx != pSpell->id) return CAST_FAIL_OTHER; + + switch (pSpell->m_CastTarget) { + case CAST_ON_SELF: + pTarget = m_creature; + break; + case CAST_ON_VICTIM: + pTarget = m_creature->getVictim(); + break; + case CAST_ON_RANDOM: + pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); + break; + case CAST_ON_TARGET: + pTarget = currentTarget; + if (!pTarget) pTarget = m_creature->getVictim(); + break; + }; + currentTarget = pTarget; + if (pTarget && !isSummon && !pSpell->m_IsBugged) return DoCastSpellIfCan(pTarget,pSpell->m_uiSpellEntry[Difficulty]); + else if (pTarget && !isSummon && pSpell->m_IsBugged) {DoCast(pTarget,pSpell->m_uiSpellEntry[Difficulty]); return CAST_OK;} + else if (isSummon) return pSummon ? CAST_OK : CAST_FAIL_OTHER; + return CAST_FAIL_OTHER; + } + + void KilledUnit(Unit* pVictim) + { + if (pVictim->GetTypeId() != TYPEID_PLAYER) return; + } + + void JustDied(Unit* Killer) + { + } + + void Aggro(Unit *who) + { + if (!m_pInstance) return; + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_pInstance->GetData(TYPE_ANUBARAK) != IN_PROGRESS) + m_creature->ForcedDespawn(); + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (QuerySpellPeriod(SPELL_EXPOSE_WEAKNESS, uiDiff)) + CastBossSpell(SPELL_EXPOSE_WEAKNESS); + + if (QuerySpellPeriod(SPELL_SPIDER_FRENZY, uiDiff)) + if(Creature *pTemp = GetClosestCreatureWithEntry(m_creature, NPC_BURROWER, 50.0f)) + { + currentTarget = pTemp; + CastBossSpell(SPELL_SPIDER_FRENZY); + }; + + if (m_creature->GetHealthPercent() < 20.0f && QuerySpellPeriod(SPELL_SUBMERGE_1, uiDiff) && !submerged) + { + CastBossSpell(SPELL_SUBMERGE_1); + submerged = true; + DoScriptText(-1713557,m_creature); + }; + + if (m_creature->GetHealthPercent() > 50.0f && submerged) + { + m_creature->RemoveAurasDueToSpell(m_BossSpell[SPELL_SUBMERGE_1].m_uiSpellEntry[Difficulty]); + submerged = false; + DoScriptText(-1713559,m_creature); + }; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_nerubian_borrower(Creature* pCreature) +{ + return new mob_nerubian_borrowerAI(pCreature); +} + void AddSC_boss_anubarak_trial() { Script* newscript; @@ -278,4 +514,15 @@ void AddSC_boss_anubarak_trial() newscript->Name = "boss_anubarak_trial"; newscript->GetAI = &GetAI_boss_anubarak_trial; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_swarm_scarab"; + newscript->GetAI = &GetAI_mob_swarm_scarab; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_nerubian_borrower"; + newscript->GetAI = &GetAI_mob_nerubian_borrower; + newscript->RegisterSelf(); + } \ No newline at end of file diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp index 08e64b43f..8b97cd435 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp @@ -68,7 +68,7 @@ static SpellTable m_BossSpell[]= {SPELL_INFERNAL_ERUPTION,66255, 66255, 66255, 66255, 30000, 30000, 30000, 30000, 45000, 45000, 45000, 45000, 65535, CAST_ON_RANDOM, false, false}, {SPELL_FEL_FIREBALL, 66532, 66963, 66964, 66965, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, {SPELL_FEL_LIGHTING, 66528, 66528, 67029, 67029, 15000, 15000, 15000, 15000, 25000, 25000, 25000, 25000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_INCINERATE_FLESH, 66237, 67049, 67050, 67051, 30000, 30000, 30000, 30000, 60000, 60000, 60000, 60000, 65535, CAST_ON_RANDOM, false, false}, +{SPELL_INCINERATE_FLESH, 66237, 67049, 67050, 67051, 40000, 40000, 40000, 40000, 90000, 90000, 40000, 90000, 65535, CAST_ON_RANDOM, false, false}, {SPELL_BURNING_INFERNO, 66242, 67060, 67060, 67060, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, {SPELL_NETHER_PORTAL, 66264, 66264, 68405, 68405, 60000, 60000, 60000, 60000, 60000, 60000, 60000, 60000, 65535, CAST_ON_RANDOM, true, true}, {SPELL_LEGION_FLAME_0, 66199, 68127, 68126, 68128, 30000, 30000, 30000, 30000, 45000, 45000, 45000, 45000, 65535, CAST_ON_RANDOM, false, false}, @@ -108,7 +108,8 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI if(!m_pInstance) return; Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); m_pInstance->SetData(TYPE_JARAXXUS, NOT_STARTED); - memset(&m_uiSpell_Timer, 0, sizeof(m_uiSpell_Timer)); + for (uint8 i = 0; i < BOSS_SPELL_COUNT; ++i) + m_uiSpell_Timer[i] = urand(m_BossSpell[i].m_uiSpellTimerMin[Difficulty],m_BossSpell[i].m_uiSpellTimerMax[Difficulty]); SetEquipmentSlots(false, EQUIP_MAIN, EQUIP_OFFHAND, EQUIP_RANGED); m_portalsCount = 1; if (Difficulty == RAID_DIFFICULTY_10MAN_HEROIC || Difficulty == RAID_DIFFICULTY_25MAN_HEROIC) @@ -129,8 +130,6 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; if (m_uiSpellIdx != pSpell->id) return false; - if (m_uiSpell_Timer[m_uiSpellIdx] == 0 ) m_uiSpell_Timer[m_uiSpellIdx]=urand(0,pSpell->m_uiSpellTimerMax[Difficulty]); - if (m_uiSpell_Timer[m_uiSpellIdx] < diff) { m_uiSpell_Timer[m_uiSpellIdx]=urand(pSpell->m_uiSpellTimerMin[Difficulty],pSpell->m_uiSpellTimerMax[Difficulty]); result = true; @@ -595,7 +594,8 @@ struct MANGOS_DLL_DECL mob_mistress_of_painAI : public ScriptedAI void Reset() { - memset(&m_uiSpell_Timer, 0, sizeof(m_uiSpell_Timer)); + for (uint8 i = 0; i < BOSS_SPELL_COUNT; ++i) + m_uiSpell_Timer[i] = urand(m_BossSpell[i].m_uiSpellTimerMin[Difficulty],m_BossSpell[i].m_uiSpellTimerMax[Difficulty]); Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); m_creature->SetInCombatWithZone(); m_creature->SetRespawnDelay(DAY); @@ -608,8 +608,6 @@ struct MANGOS_DLL_DECL mob_mistress_of_painAI : public ScriptedAI SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; if (m_uiSpellIdx != pSpell->id) return false; - if (m_uiSpell_Timer[m_uiSpellIdx] == 0 ) m_uiSpell_Timer[m_uiSpellIdx]=urand(0,pSpell->m_uiSpellTimerMax[Difficulty]); - if (m_uiSpell_Timer[m_uiSpellIdx] < diff) { m_uiSpell_Timer[m_uiSpellIdx]=urand(pSpell->m_uiSpellTimerMin[Difficulty],pSpell->m_uiSpellTimerMax[Difficulty]); result = true; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp index 1fc6d40c8..dc29d2237 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp @@ -104,8 +104,8 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI void Reset() { if(!m_pInstance) return; Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); - m_pInstance->SetData(TYPE_VALKIRIES, NOT_STARTED); - memset(&m_uiSpell_Timer, 0, sizeof(m_uiSpell_Timer)); + for (uint8 i = 0; i < BOSS_SPELL_COUNT; ++i) + m_uiSpell_Timer[i] = urand(m_BossSpell[i].m_uiSpellTimerMin[Difficulty],m_BossSpell[i].m_uiSpellTimerMax[Difficulty]); SetEquipmentSlots(false, EQUIP_MAIN_1, EQUIP_OFFHAND_1, EQUIP_RANGED_1); if (m_creature->isAlive()) m_creature->SummonCreature(NPC_LIGHT_ESSENCE, SpawnLoc[24].x, SpawnLoc[24].y, SpawnLoc[24].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); if (m_creature->isAlive()) m_creature->SummonCreature(NPC_LIGHT_ESSENCE, SpawnLoc[25].x, SpawnLoc[25].y, SpawnLoc[25].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); @@ -118,8 +118,6 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; if (m_uiSpellIdx != pSpell->id) return false; - if (m_uiSpell_Timer[m_uiSpellIdx] == 0 ) m_uiSpell_Timer[m_uiSpellIdx]=urand(0,pSpell->m_uiSpellTimerMax[Difficulty]); - if (m_uiSpell_Timer[m_uiSpellIdx] < diff) { m_uiSpell_Timer[m_uiSpellIdx]=urand(pSpell->m_uiSpellTimerMin[Difficulty],pSpell->m_uiSpellTimerMax[Difficulty]); result = true; @@ -241,8 +239,8 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI { if(!m_pInstance) return; Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); - m_pInstance->SetData(TYPE_VALKIRIES, NOT_STARTED); - memset(&m_uiSpell_Timer, 0, sizeof(m_uiSpell_Timer)); + for (uint8 i = 0; i < BOSS_SPELL_COUNT; ++i) + m_uiSpell_Timer[i] = urand(m_BossSpell[i].m_uiSpellTimerMin[Difficulty],m_BossSpell[i].m_uiSpellTimerMax[Difficulty]); SetEquipmentSlots(false, EQUIP_MAIN_2, EQUIP_OFFHAND_2, EQUIP_RANGED_2); if (m_creature->isAlive()) m_creature->SummonCreature(NPC_DARK_ESSENCE, SpawnLoc[22].x, SpawnLoc[22].y, SpawnLoc[22].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); if (m_creature->isAlive()) m_creature->SummonCreature(NPC_DARK_ESSENCE, SpawnLoc[23].x, SpawnLoc[23].y, SpawnLoc[23].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); @@ -255,8 +253,6 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; if (m_uiSpellIdx != pSpell->id) return false; - if (m_uiSpell_Timer[m_uiSpellIdx] == 0 ) m_uiSpell_Timer[m_uiSpellIdx]=urand(0,pSpell->m_uiSpellTimerMax[Difficulty]); - if (m_uiSpell_Timer[m_uiSpellIdx] < diff) { m_uiSpell_Timer[m_uiSpellIdx]=urand(pSpell->m_uiSpellTimerMin[Difficulty],pSpell->m_uiSpellTimerMax[Difficulty]); result = true; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index f870a7864..f0f761ea5 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -151,6 +151,7 @@ enum SpellTableParameters CAST_ON_VICTIM, CAST_ON_RANDOM, CAST_ON_BOTTOMAGGRO, + CAST_ON_TARGET, SUMMON_INSTANT, SUMMON_TEMP, }; From 388a8e0bb190bd20f7f6db11dec6871313483baa Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Mon, 15 Mar 2010 18:51:50 +0300 Subject: [PATCH 193/405] TOC part 25 - Gormok & Icehowl draft added --- addition/724_trial_of_crusader_mangos.sql | 2 + addition/724_trial_of_crusader_scriptdev2.sql | 1 + .../boss_anubarak_trial.cpp | 4 +- .../boss_northrend_beasts.cpp | 346 +++++++++++++++++- .../instance_trial_of_the_crusader.cpp | 5 + 5 files changed, 346 insertions(+), 12 deletions(-) diff --git a/addition/724_trial_of_crusader_mangos.sql b/addition/724_trial_of_crusader_mangos.sql index a9862e450..d4ef0568f 100644 --- a/addition/724_trial_of_crusader_mangos.sql +++ b/addition/724_trial_of_crusader_mangos.sql @@ -51,6 +51,8 @@ DELETE FROM `creature_loot_template` WHERE `entry` IN -- Nortrend beasts DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (34796, 34799, 35144, 34797); UPDATE `creature_template` SET `scriptname`='boss_gormok', `AIName` ='' WHERE `entry`=34796; +UPDATE `creature_template` SET `scriptname`='mob_snobold_vassal', `AIName` ='' WHERE `entry`=34800; + UPDATE `creature_template` SET `scriptname`='boss_dreadscale', `AIName` ='' WHERE `entry`=34799; UPDATE `creature_template` SET `scriptname`='boss_acidmaw', `AIName` ='' WHERE `entry`=35144; UPDATE `creature_template` SET `scriptname`='boss_icehowl', `AIName` ='' WHERE `entry`=34797; diff --git a/addition/724_trial_of_crusader_scriptdev2.sql b/addition/724_trial_of_crusader_scriptdev2.sql index 1ab4b39d6..ccd85c604 100644 --- a/addition/724_trial_of_crusader_scriptdev2.sql +++ b/addition/724_trial_of_crusader_scriptdev2.sql @@ -5,6 +5,7 @@ INSERT INTO `script_texts` ('34996','16038','-1713501','Из самых глубоких и темных пещер Грозовой Гряды был призван Гормок Пронзающий Бивень! В бой, герои!','1','0','0',''), ('34990','16069','-1713502','Твои чудовища не чета героям Альянса, Тирион!','1','0','0',''), ('34995','16069','-1713702','Твои чудовища не чета героям Орды, Тирион!','1','0','0',''), +('34796','0','-1713601','Мои рабы! Уничтожьте врага!','1','0','0',''), ('34996','16039','-1713503','Приготовьтесь к схватке с близнецами-чудовищами, Кислотной Утробой и Жуткой Чешуей!','1','0','0',''), ('34799','0','-1713504','После гибели товарища %s приходит в ярость!','1','0','0',''), ('34996','16040','-1713505','В воздухе повеяло ледяным дыханием следующего бойца: на арену выходит Ледяной Рев! Сражайтесь или погибните, чемпионы!','1','0','0',''), diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp index b702d06d4..eebc1c183 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp @@ -56,13 +56,13 @@ static SpellTable m_BossSpell[]= { // Name 10 25 10H 25H {SPELL_COLD, 66013, 67700, 68509, 68510, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_MARK, 67574, 67574, 67574, 67574, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_TARGET, false, false}, +{SPELL_MARK, 67574, 67574, 67574, 67574, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_TARGET, false, true}, {SPELL_LEECHING_SWARM, 67630, 68646, 66118, 68647, 10000, 10000, 10000, 10000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, true}, {SPELL_IMPALE, 65922, 65922, 65922, 65922, 10000, 10000, 10000, 10000, 15000, 15000, 15000, 15000, 65535, CAST_ON_RANDOM, false, true}, {SPELL_POUND, 66012, 66012, 66012, 66012, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, {SPELL_SHOUT, 67730, 67730, 67730, 67730, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, {SPELL_SUBMERGE_0, 53421, 53421, 53421, 53421, 45000, 45000, 45000, 45000, 60000, 60000, 60000, 60000, 65535, CAST_ON_SELF, true, false}, -{SPELL_SUBMERGE_1, 67322, 67322, 67322, 67322, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, true, false}, +{SPELL_SUBMERGE_1, 67322, 67322, 67322, 67322, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, true, true}, {SPELL_SUMMON_BEATLES, 66339, 66339, 66339, 66339, 5000, 5000, 5000, 5000, 10000, 10000, 10000, 10000, 65535, CAST_ON_RANDOM, true, false}, {SPELL_DETERMINATION, 66092, 66092, 66092, 66092, 5000, 5000, 5000, 5000, 20000, 20000, 20000, 20000, 65535, CAST_ON_SELF, false, false}, {SPELL_ACID_MANDIBLE, 67861, 66092, 66092, 66092, 5000, 5000, 5000, 5000, 20000, 20000, 20000, 20000, 65535, CAST_ON_VICTIM, false, false}, diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index a1a6808b4..6c1e83549 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -24,10 +24,24 @@ EndScriptData */ #include "precompiled.h" #include "trial_of_the_crusader.h" +enum Equipment +{ + EQUIP_MAIN = 50760, + EQUIP_OFFHAND = 48040, + EQUIP_RANGED = 47267, + EQUIP_DONE = EQUIP_NO_CHANGE, +}; + +enum Summons +{ + NPC_SNOBOLD_VASSAL = 34800, +}; + enum BossSpells { SPELL_IMPALE, SPELL_STAGGERING_STOMP, +SPELL_RISING_ANGER, SPELL_ACID_SPIT, SPELL_PARALYTIC_SPRAY, SPELL_SWEEP_0, @@ -40,6 +54,11 @@ SPELL_MASSIVE_CRASH, SPELL_WHIRL, SPELL_ARCTIC_BREATH, SPELL_TRAMPLE, +SUMMON_SNOBOLD, +SPELL_SNOBOLLED, +SPELL_BATTER, +SPELL_FIRE_BOMB, +SPELL_HEAD_CRACK, SPELL_BERSERK, SPELL_ENRAGE, BOSS_SPELL_COUNT @@ -48,8 +67,9 @@ BOSS_SPELL_COUNT static SpellTable m_BossSpell[]= { // Name 10 25 10H 25H -{SPELL_IMPALE, 67479, 67478, 67477, 66331, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, -{SPELL_STAGGERING_STOMP, 67648, 67647, 67649, 66630, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, +{SPELL_IMPALE, 66331, 67477, 67478, 67479, 20000, 20000, 20000, 20000, 40000, 40000, 40000, 40000, 65535, CAST_ON_RANDOM, false, false}, +{SPELL_STAGGERING_STOMP, 67648, 67648, 67648, 66648, 15000, 15000, 15000, 15000, 40000, 40000, 40000, 40000, 65535, CAST_ON_SELF, false, false}, +{SPELL_RISING_ANGER, 66636, 66636, 66636, 66636, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, true}, {SPELL_ACID_SPIT, 67607, 67607, 67607, 67607, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, {SPELL_PARALYTIC_SPRAY, 67616, 67616, 67616, 66616, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, {SPELL_SWEEP_0, 66794, 66794, 66794, 66794, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, @@ -57,11 +77,16 @@ static SpellTable m_BossSpell[]= {SPELL_FIRE_SPLIT, 67632, 67632, 67632, 67632, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, {SPELL_MOLTEN_SPEW, 66821, 66821, 66821, 66821, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, {SPELL_SWEEP_1, 67646, 67646, 67646, 67646, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, -{SPELL_FEROCIOUS_BUTT, 67655, 67654, 67656, 66770, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, -{SPELL_MASSIVE_CRASH, 66683, 67660, 67661, 67662, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, +{SPELL_FEROCIOUS_BUTT, 66770, 67654, 67655, 67656, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, +{SPELL_MASSIVE_CRASH, 66683, 67660, 67661, 67662, 15000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, {SPELL_WHIRL, 67345, 67663, 67664, 67665, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, -{SPELL_ARCTIC_BREATH, 66689, 66689, 66689, 66689, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, -{SPELL_TRAMPLE, 66734, 66734, 66734, 66734, 10000, 10000, 10000, 10000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, +{SPELL_ARCTIC_BREATH, 66689, 67650, 67651, 67652, 25000, 25000, 25000, 25000, 40000, 40000, 40000, 40000, 65535, CAST_ON_RANDOM, false, false}, +{SPELL_TRAMPLE, 66734, 66734, 66734, 66734, 30000, 30000, 30000, 30000, 60000, 60000, 60000, 60000, 65535, CAST_ON_RANDOM, false, false}, +{SUMMON_SNOBOLD, NPC_SNOBOLD_VASSAL, NPC_SNOBOLD_VASSAL, NPC_SNOBOLD_VASSAL, NPC_SNOBOLD_VASSAL, 40000, 40000, 40000, 40000, 60000, 60000, 60000, 60000, 65535, SUMMON_TEMP, false, false}, +{SPELL_SNOBOLLED, 66406, 66406, 66406, 66406, 10000, 10000, 10000, 10000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, true}, +{SPELL_BATTER, 66408, 66408, 66408, 66408, 10000, 10000, 10000, 10000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, +{SPELL_FIRE_BOMB, 66313, 66313, 66313, 66313, 10000, 10000, 10000, 10000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, +{SPELL_HEAD_CRACK, 66407, 66407, 66407, 66407, 10000, 10000, 10000, 10000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, {SPELL_BERSERK, 26662, 26662, 26662, 26662, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 65535, CAST_ON_SELF, false, false}, {SPELL_ENRAGE, 68335, 68335, 68335, 68335, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 65535, CAST_ON_SELF, false, false}, }; @@ -76,18 +101,99 @@ struct MANGOS_DLL_DECL boss_gormokAI : public ScriptedAI } ScriptedInstance* m_pInstance; + uint8 Difficulty; + uint32 m_uiSpell_Timer[BOSS_SPELL_COUNT]; + uint8 SnoboldsCount; + Unit* currentTarget; + + void Reset() { + if(!m_pInstance) return; + SnoboldsCount = 4; + Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); + for (uint8 i = 0; i < BOSS_SPELL_COUNT; ++i) + m_uiSpell_Timer[i] = urand(m_BossSpell[i].m_uiSpellTimerMin[Difficulty],m_BossSpell[i].m_uiSpellTimerMax[Difficulty]); + SetEquipmentSlots(false, EQUIP_MAIN, EQUIP_OFFHAND, EQUIP_RANGED); + } - void Reset() {} + bool QuerySpellPeriod(uint32 m_uiSpellIdx, uint32 diff) + { + if(!m_pInstance) return false; + bool result; + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + if (m_uiSpellIdx != pSpell->id) return false; + + if (m_uiSpell_Timer[m_uiSpellIdx] < diff) { + m_uiSpell_Timer[m_uiSpellIdx]=urand(pSpell->m_uiSpellTimerMin[Difficulty],pSpell->m_uiSpellTimerMax[Difficulty]); + result = true; + } else { + m_uiSpell_Timer[m_uiSpellIdx] -= diff; + result = false; + }; + return result; + } + + CanCastResult CastBossSpell(uint32 m_uiSpellIdx) + { + if(!m_pInstance) return CAST_FAIL_OTHER; + Unit* pTarget = NULL; + Creature* pSummon = NULL; + bool isSummon = false; + float fPosX, fPosY, fPosZ; + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + // Find spell index - temporary direct insert from spelltable + if (m_uiSpellIdx != pSpell->id) return CAST_FAIL_OTHER; + + switch (pSpell->m_CastTarget) { + case CAST_ON_SELF: + pTarget = m_creature; + break; + case CAST_ON_SUMMONS: + pTarget = m_creature->getVictim(); //CHANGE IT!!! + break; + case CAST_ON_VICTIM: + pTarget = m_creature->getVictim(); + break; + case CAST_ON_TARGET: + pTarget = currentTarget; + if (!pTarget) pTarget = m_creature->getVictim(); + break; + case CAST_ON_RANDOM: + pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); + break; + case CAST_ON_BOTTOMAGGRO: + pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1); + break; + case SUMMON_TEMP: + isSummon = true; + m_creature->GetPosition(fPosX, fPosY, fPosZ); + m_creature->GetRandomPoint(fPosX, fPosY, fPosZ, urand(30, 60), fPosX, fPosY, fPosZ); + pSummon = m_creature->SummonCreature(pSpell->m_uiSpellEntry[Difficulty], fPosX, fPosY, fPosZ, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000); + if(pSummon) pSummon->SetInCombatWithZone(); + break; + }; + currentTarget = pTarget; + if (pTarget && !isSummon && !pSpell->m_IsBugged) return DoCastSpellIfCan(pTarget,pSpell->m_uiSpellEntry[Difficulty]); + else if (pTarget && !isSummon && pSpell->m_IsBugged) {DoCast(pTarget,pSpell->m_uiSpellEntry[Difficulty]); return CAST_OK;} + else if (isSummon) return pSummon ? CAST_OK : CAST_FAIL_OTHER; + return CAST_FAIL_OTHER; + } + + void JustDied(Unit* pKiller) + { + if (!m_pInstance) return; + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, SPECIAL); + } void JustReachedHome() { if (m_pInstance) - m_pInstance->SetData(TYPE_NORTHREND_BEASTS, NOT_STARTED); + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, FAIL); } void Aggro(Unit* pWho) { m_creature->SetInCombatWithZone(); + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, IN_PROGRESS); } void UpdateAI(const uint32 uiDiff) @@ -95,6 +201,19 @@ struct MANGOS_DLL_DECL boss_gormokAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (QuerySpellPeriod(SPELL_IMPALE, uiDiff)) + CastBossSpell(SPELL_IMPALE); + + if (QuerySpellPeriod(SPELL_STAGGERING_STOMP, uiDiff)) + CastBossSpell(SPELL_STAGGERING_STOMP); + + if (QuerySpellPeriod(SUMMON_SNOBOLD, uiDiff) && SnoboldsCount > 0 ) { + CastBossSpell(SUMMON_SNOBOLD); + CastBossSpell(SPELL_RISING_ANGER); + DoScriptText(-1713601,m_creature); + --SnoboldsCount; + }; + DoMeleeAttackIfReady(); } }; @@ -104,6 +223,110 @@ CreatureAI* GetAI_boss_gormok(Creature* pCreature) return new boss_gormokAI(pCreature); } +struct MANGOS_DLL_DECL mob_snobold_vassalAI : public ScriptedAI +{ + mob_snobold_vassalAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + uint8 Difficulty; + uint32 m_uiSpell_Timer[BOSS_SPELL_COUNT]; + Unit* currentTarget; + + void Reset() + { + for (uint8 i = 0; i < BOSS_SPELL_COUNT; ++i) + m_uiSpell_Timer[i] = urand(m_BossSpell[i].m_uiSpellTimerMin[Difficulty],m_BossSpell[i].m_uiSpellTimerMax[Difficulty]); + Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); + m_creature->SetInCombatWithZone(); + m_creature->SetRespawnDelay(DAY); + } + + bool QuerySpellPeriod(uint32 m_uiSpellIdx, uint32 diff) + { + if(!m_pInstance) return false; + bool result; + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + if (m_uiSpellIdx != pSpell->id) return false; + + if (m_uiSpell_Timer[m_uiSpellIdx] < diff) { + m_uiSpell_Timer[m_uiSpellIdx]=urand(pSpell->m_uiSpellTimerMin[Difficulty],pSpell->m_uiSpellTimerMax[Difficulty]); + result = true; + } else { + m_uiSpell_Timer[m_uiSpellIdx] -= diff; + result = false; + }; + return result; + } + + CanCastResult CastBossSpell(uint32 m_uiSpellIdx) + { + if(!m_pInstance) return CAST_FAIL_OTHER; + Unit* pTarget = NULL; + Creature* pSummon = NULL; + bool isSummon = false; + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + // Find spell index - temporary direct insert from spelltable + if (m_uiSpellIdx != pSpell->id) return CAST_FAIL_OTHER; + + switch (pSpell->m_CastTarget) { + case CAST_ON_SELF: + pTarget = m_creature; + break; + case CAST_ON_VICTIM: + pTarget = m_creature->getVictim(); + break; + case CAST_ON_TARGET: + pTarget = currentTarget; + if (!pTarget) pTarget = m_creature->getVictim(); + break; + case CAST_ON_RANDOM: + pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); + break; + }; + currentTarget = pTarget; + if (pTarget && !isSummon && !pSpell->m_IsBugged) return DoCastSpellIfCan(pTarget,pSpell->m_uiSpellEntry[Difficulty]); + else if (pTarget && !isSummon && pSpell->m_IsBugged) {DoCast(pTarget,pSpell->m_uiSpellEntry[Difficulty]); return CAST_OK;} + else if (isSummon) return pSummon ? CAST_OK : CAST_FAIL_OTHER; + return CAST_FAIL_OTHER; + } + + void Aggro(Unit *who) + { + if (!m_pInstance) return; + currentTarget = who; + CastBossSpell(SPELL_SNOBOLLED); + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) != IN_PROGRESS) + m_creature->ForcedDespawn(); + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (QuerySpellPeriod(SPELL_BATTER, uiDiff)) + CastBossSpell(SPELL_BATTER); + + if (QuerySpellPeriod(SPELL_FIRE_BOMB, uiDiff)) + CastBossSpell(SPELL_FIRE_BOMB); + + if (QuerySpellPeriod(SPELL_HEAD_CRACK, uiDiff)) + CastBossSpell(SPELL_HEAD_CRACK); + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_snobold_vassal(Creature* pCreature) +{ + return new mob_snobold_vassalAI(pCreature); +} + struct MANGOS_DLL_DECL boss_acidmawAI : public ScriptedAI { boss_acidmawAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -187,18 +410,96 @@ struct MANGOS_DLL_DECL boss_icehowlAI : public ScriptedAI } ScriptedInstance* m_pInstance; + uint8 Difficulty; + uint32 m_uiSpell_Timer[BOSS_SPELL_COUNT]; + Unit* currentTarget; + + void Reset() { + if(!m_pInstance) return; + Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); + for (uint8 i = 0; i < BOSS_SPELL_COUNT; ++i) + m_uiSpell_Timer[i] = urand(m_BossSpell[i].m_uiSpellTimerMin[Difficulty],m_BossSpell[i].m_uiSpellTimerMax[Difficulty]); + } - void Reset() {} + bool QuerySpellPeriod(uint32 m_uiSpellIdx, uint32 diff) + { + if(!m_pInstance) return false; + bool result; + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + if (m_uiSpellIdx != pSpell->id) return false; + + if (m_uiSpell_Timer[m_uiSpellIdx] < diff) { + m_uiSpell_Timer[m_uiSpellIdx]=urand(pSpell->m_uiSpellTimerMin[Difficulty],pSpell->m_uiSpellTimerMax[Difficulty]); + result = true; + } else { + m_uiSpell_Timer[m_uiSpellIdx] -= diff; + result = false; + }; + return result; + } + + CanCastResult CastBossSpell(uint32 m_uiSpellIdx) + { + if(!m_pInstance) return CAST_FAIL_OTHER; + Unit* pTarget = NULL; + Creature* pSummon = NULL; + bool isSummon = false; + float fPosX, fPosY, fPosZ; + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + // Find spell index - temporary direct insert from spelltable + if (m_uiSpellIdx != pSpell->id) return CAST_FAIL_OTHER; + + switch (pSpell->m_CastTarget) { + case CAST_ON_SELF: + pTarget = m_creature; + break; + case CAST_ON_SUMMONS: + pTarget = m_creature->getVictim(); //CHANGE IT!!! + break; + case CAST_ON_VICTIM: + pTarget = m_creature->getVictim(); + break; + case CAST_ON_TARGET: + pTarget = currentTarget; + if (!pTarget) pTarget = m_creature->getVictim(); + break; + case CAST_ON_RANDOM: + pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); + break; + case CAST_ON_BOTTOMAGGRO: + pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1); + break; + case SUMMON_TEMP: + isSummon = true; + m_creature->GetPosition(fPosX, fPosY, fPosZ); + m_creature->GetRandomPoint(fPosX, fPosY, fPosZ, urand(30, 60), fPosX, fPosY, fPosZ); + pSummon = m_creature->SummonCreature(pSpell->m_uiSpellEntry[Difficulty], fPosX, fPosY, fPosZ, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000); + if(pSummon) pSummon->SetInCombatWithZone(); + break; + }; + currentTarget = pTarget; + if (pTarget && !isSummon && !pSpell->m_IsBugged) return DoCastSpellIfCan(pTarget,pSpell->m_uiSpellEntry[Difficulty]); + else if (pTarget && !isSummon && pSpell->m_IsBugged) {DoCast(pTarget,pSpell->m_uiSpellEntry[Difficulty]); return CAST_OK;} + else if (isSummon) return pSummon ? CAST_OK : CAST_FAIL_OTHER; + return CAST_FAIL_OTHER; + } + + void JustDied(Unit* pKiller) + { + if (!m_pInstance) return; + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, SPECIAL); + } void JustReachedHome() { if (m_pInstance) - m_pInstance->SetData(TYPE_NORTHREND_BEASTS, NOT_STARTED); + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, FAIL); } void Aggro(Unit* pWho) { m_creature->SetInCombatWithZone(); + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, IN_PROGRESS); } void UpdateAI(const uint32 uiDiff) @@ -206,6 +507,26 @@ struct MANGOS_DLL_DECL boss_icehowlAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (QuerySpellPeriod(SPELL_FEROCIOUS_BUTT, uiDiff)) + CastBossSpell(SPELL_FEROCIOUS_BUTT); + + if (QuerySpellPeriod(SPELL_ARCTIC_BREATH, uiDiff)) + CastBossSpell(SPELL_ARCTIC_BREATH); + + if (QuerySpellPeriod(SPELL_WHIRL, uiDiff)) + CastBossSpell(SPELL_WHIRL); + + if (QuerySpellPeriod(SPELL_MASSIVE_CRASH, uiDiff)) + { + CastBossSpell(SPELL_MASSIVE_CRASH); +// m_uiSpell_Timer[SPELL_TRAMPLE] = 2000; + DoScriptText(-1713506,m_creature,currentTarget); + } + + if (QuerySpellPeriod(SPELL_TRAMPLE, uiDiff)) + if (CastBossSpell(SPELL_TRAMPLE) != CAST_OK) + DoScriptText(-1713507,m_creature); + DoMeleeAttackIfReady(); } }; @@ -239,4 +560,9 @@ void AddSC_northrend_beasts() newscript->GetAI = &GetAI_boss_icehowl; newscript->RegisterSelf(); + newscript = new Script; + newscript->Name = "mob_snobold_vassal"; + newscript->GetAI = &GetAI_mob_snobold_vassal; + newscript->RegisterSelf(); + } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index 907c4b13d..a074b47f3 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -34,6 +34,7 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance uint32 m_auiEncounter[MAX_ENCOUNTERS+1]; uint32 m_auiEventTimer; uint32 m_auiEventNPCId; + uint32 m_auiNorthrendBeasts; uint8 Difficulty; std::string m_strInstData; @@ -125,6 +126,8 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance m_uiLich0GUID = 0; m_uiLich1GUID = 0; + m_auiNorthrendBeasts = NOT_STARTED; + m_auiEventTimer = 1000; } @@ -286,6 +289,7 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance case TYPE_COUNTER: m_auiEncounter[7] = uiData; uiData = DONE; break; case TYPE_EVENT: m_auiEncounter[8] = uiData; uiData = NOT_STARTED; break; case TYPE_EVENT_TIMER: m_auiEventTimer = uiData; uiData = NOT_STARTED; break; + case TYPE_NORTHREND_BEASTS: m_auiNorthrendBeasts = uiData; break; case DATA_DAMAGE_FJOLA: m_uiDataDamageFjola += uiData; uiData = NOT_STARTED; break; case DATA_DAMAGE_EYDIS: m_uiDataDamageEydis += uiData; uiData = NOT_STARTED; break; case DATA_CASTING_FJOLA: m_uiFjolaCasting = uiData; uiData = NOT_STARTED; break; @@ -383,6 +387,7 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance case TYPE_COUNTER: return m_auiEncounter[7]; case TYPE_EVENT: return m_auiEncounter[8]; case TYPE_DIFFICULTY: return Difficulty; + case TYPE_NORTHREND_BEASTS: return m_auiNorthrendBeasts; case TYPE_EVENT_TIMER: return m_auiEventTimer; case TYPE_EVENT_NPC: switch (m_auiEncounter[8]) { From 6e2b64ac8f813f31e92c23229eb5c693ee5867b3 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Tue, 16 Mar 2010 21:22:26 +0300 Subject: [PATCH 194/405] TOC 26 - Snakes draft && subroutine recreate --- include/sc_boss_spell_worker.cpp | 84 ++++ include/sc_boss_spell_worker.h | 61 +++ .../boss_anubarak_trial.cpp | 167 +------- .../trial_of_the_crusader/boss_jaraxxus.cpp | 151 +------ .../boss_northrend_beasts.cpp | 387 +++++++++--------- .../boss_twin_valkyr.cpp | 98 +---- .../instance_trial_of_the_crusader.cpp | 2 +- .../trial_of_the_crusader.cpp | 2 +- .../trial_of_the_crusader.h | 54 +-- sql/Updates/r1632_mangos.sql | 4 +- 10 files changed, 373 insertions(+), 637 deletions(-) create mode 100644 include/sc_boss_spell_worker.cpp create mode 100644 include/sc_boss_spell_worker.h diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp new file mode 100644 index 000000000..90c499f07 --- /dev/null +++ b/include/sc_boss_spell_worker.cpp @@ -0,0 +1,84 @@ +/* Copyright (C) 2009 - 2010 by /dev/rsa for ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifdef DEF_BOSS_SPELL_WORKER_H + + bool QuerySpellPeriod(uint32 m_uiSpellIdx, uint32 diff) + { + if(!m_pInstance) return false; + bool result; + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + if (m_uiSpellIdx != pSpell->id) return false; + + if (m_uiSpell_Timer[m_uiSpellIdx] < diff) { + m_uiSpell_Timer[m_uiSpellIdx]=urand(pSpell->m_uiSpellTimerMin[Difficulty],pSpell->m_uiSpellTimerMax[Difficulty]); + result = true; + } else { + m_uiSpell_Timer[m_uiSpellIdx] -= diff; + result = false; + }; + return result; + } + + CanCastResult CastBossSpell(uint32 m_uiSpellIdx) + { + if(!m_pInstance) return CAST_FAIL_OTHER; + Unit* pTarget = NULL; + Creature* pSummon = NULL; + SpellEntry const *spell; + bool isSummon = false; + float fPosX, fPosY, fPosZ; + int32 bp = 8; + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + // Find spell index - temporary direct insert from spelltable + if (m_uiSpellIdx != pSpell->id) return CAST_FAIL_OTHER; + + switch (pSpell->m_CastTarget) { + case CAST_ON_SELF: + pTarget = m_creature; + break; + case CAST_ON_SUMMONS: + pTarget = m_creature->getVictim(); //CHANGE IT!!! + break; + case CAST_ON_VICTIM: + pTarget = m_creature->getVictim(); + break; + case CAST_ON_TARGET: + pTarget = currentTarget; + if (!pTarget) pTarget = m_creature->getVictim(); + break; + case CAST_ON_RANDOM: + pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); + break; + case CAST_ON_BOTTOMAGGRO: + pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1); + break; + case APPLY_AURA_SELF: + if (spell = (SpellEntry *)GetSpellStore()->LookupEntry(pSpell->m_uiSpellEntry[Difficulty])) + m_creature->AddAura(new BossAura(spell, EFFECT_INDEX_0, &bp, m_creature, m_creature)); + return CAST_OK; + break; + case APPLY_AURA_TARGET: + pTarget = currentTarget; + if (!pTarget) pTarget = m_creature->getVictim(); + if (spell = (SpellEntry *)GetSpellStore()->LookupEntry(pSpell->m_uiSpellEntry[Difficulty])) + m_creature->AddAura(new BossAura(spell, EFFECT_INDEX_0, &bp, m_creature, pTarget)); + return CAST_OK; + break; + case SUMMON_TEMP: + isSummon = true; + m_creature->GetPosition(fPosX, fPosY, fPosZ); + m_creature->GetRandomPoint(fPosX, fPosY, fPosZ, urand(30, 60), fPosX, fPosY, fPosZ); + pSummon = m_creature->SummonCreature(pSpell->m_uiSpellEntry[Difficulty], fPosX, fPosY, fPosZ, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000); + if(pSummon) pSummon->SetInCombatWithZone(); + break; + }; + currentTarget = pTarget; + if (pTarget && !isSummon && !pSpell->m_IsBugged) return DoCastSpellIfCan(pTarget,pSpell->m_uiSpellEntry[Difficulty]); + else if (pTarget && !isSummon && pSpell->m_IsBugged) {DoCast(pTarget,pSpell->m_uiSpellEntry[Difficulty]); return CAST_OK;} + else if (isSummon) return pSummon ? CAST_OK : CAST_FAIL_OTHER; + return CAST_FAIL_OTHER; + } + +#endif \ No newline at end of file diff --git a/include/sc_boss_spell_worker.h b/include/sc_boss_spell_worker.h new file mode 100644 index 000000000..e7151b9e7 --- /dev/null +++ b/include/sc_boss_spell_worker.h @@ -0,0 +1,61 @@ +/* Copyright (C) 2009 - 2010 by /dev/rsa for ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_BOSS_SPELL_WORKER_H +#define DEF_BOSS_SPELL_WORKER_H + +struct Locations +{ + float x, y, z; + uint32 id; +}; + +struct WayPoints +{ + WayPoints(uint32 _id, float _x, float _y, float _z) + { + id = _id; + x = _x; + y = _y; + z = _z; + } + uint32 id; + float x, y, z; +}; + +enum SpellTableParameters +{ + DIFFICULTY_LEVELS = 4, + CAST_ON_SELF = 1000, + CAST_ON_SUMMONS, + CAST_ON_VICTIM, + CAST_ON_RANDOM, + CAST_ON_BOTTOMAGGRO, + CAST_ON_TARGET, + APPLY_AURA_SELF, + APPLY_AURA_TARGET, + SUMMON_INSTANT, + SUMMON_TEMP, +}; + +struct SpellTable +{ + uint32 id; + uint32 m_uiSpellEntry[DIFFICULTY_LEVELS]; // Stores spell entry for difficulty levels + uint32 m_uiSpellTimerMin[DIFFICULTY_LEVELS]; // The timer (min) before the next spell casting, in milliseconds + uint32 m_uiSpellTimerMax[DIFFICULTY_LEVELS]; // The timer (max) before the next spell casting + uint32 m_uiStageMask; // The mask of stages where spell is casted + uint32 m_CastTarget; // Target on casting spell + bool m_IsVisualEffect; // Spellcasting is visual effect or real effect + bool m_IsBugged; // Need override for this spell +}; + +class MANGOS_DLL_DECL BossAura : public Aura +{ + public: + BossAura(const SpellEntry *spell, SpellEffectIndex eff, int32 *bp, Unit *target, Unit *caster) : Aura(spell, eff, bp, target, caster, NULL) + {} +}; + +#endif diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp index eebc1c183..76b5da214 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: boss_anubarak_trial -SD%Complete: 1% +SD%Complete: 40% SDComment: by /dev/rsa SDCategory: EndScriptData */ @@ -90,6 +90,8 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI Unit* currentTarget; bool intro; +#include "sc_boss_spell_worker.cpp" + void Reset() { if(!m_pInstance) return; stage = 0; @@ -99,75 +101,6 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI m_uiSpell_Timer[i] = urand(m_BossSpell[i].m_uiSpellTimerMin[Difficulty],m_BossSpell[i].m_uiSpellTimerMax[Difficulty]); } - bool QuerySpellPeriod(uint32 m_uiSpellIdx, uint32 diff) - { - if(!m_pInstance) return false; - bool result; - SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; - if (m_uiSpellIdx != pSpell->id) return false; - - if (m_uiSpell_Timer[m_uiSpellIdx] < diff) { - m_uiSpell_Timer[m_uiSpellIdx]=urand(pSpell->m_uiSpellTimerMin[Difficulty],pSpell->m_uiSpellTimerMax[Difficulty]); - result = true; - } else { - m_uiSpell_Timer[m_uiSpellIdx] -= diff; - result = false; - }; - return result; - } - - CanCastResult CastBossSpell(uint32 m_uiSpellIdx) - { - if(!m_pInstance) return CAST_FAIL_OTHER; - Unit* pTarget = NULL; - Creature* pSummon = NULL; - bool isSummon = false; - float fPosX, fPosY, fPosZ; - SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; - // Find spell index - temporary direct insert from spelltable - if (m_uiSpellIdx != pSpell->id) return CAST_FAIL_OTHER; - - switch (pSpell->m_CastTarget) { - case CAST_ON_SELF: - pTarget = m_creature; - break; - case CAST_ON_SUMMONS: - pTarget = m_creature->getVictim(); //CHANGE IT!!! - break; - case CAST_ON_VICTIM: - pTarget = m_creature->getVictim(); - break; - case CAST_ON_TARGET: - pTarget = currentTarget; - if (!pTarget) pTarget = m_creature->getVictim(); - break; - case CAST_ON_RANDOM: - pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); - break; - case CAST_ON_BOTTOMAGGRO: - pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1); - break; - case SUMMON_INSTANT: - isSummon = true; - m_creature->GetPosition(fPosX, fPosY, fPosZ); - m_creature->GetRandomPoint(fPosX, fPosY, fPosZ, urand(50, 120), fPosX, fPosY, fPosZ); - pSummon = m_creature->SummonCreature(pSpell->m_uiSpellEntry[Difficulty], fPosX, fPosY, fPosZ, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); - break; - case SUMMON_TEMP: - isSummon = true; - m_creature->GetPosition(fPosX, fPosY, fPosZ); - m_creature->GetRandomPoint(fPosX, fPosY, fPosZ, urand(50, 120), fPosX, fPosY, fPosZ); - pSummon = m_creature->SummonCreature(pSpell->m_uiSpellEntry[Difficulty], fPosX, fPosY, fPosZ, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000); - if(pSummon) pSummon->SetInCombatWithZone(); - break; - - }; - currentTarget = pTarget; - if (pTarget && !isSummon && !pSpell->m_IsBugged) return DoCastSpellIfCan(pTarget,pSpell->m_uiSpellEntry[Difficulty]); - else if (pTarget && !isSummon && pSpell->m_IsBugged) {DoCast(pTarget,pSpell->m_uiSpellEntry[Difficulty]); return CAST_OK;} - else if (isSummon) return pSummon ? CAST_OK : CAST_FAIL_OTHER; - return CAST_FAIL_OTHER; - } void KilledUnit(Unit* pVictim) { @@ -291,6 +224,8 @@ struct MANGOS_DLL_DECL mob_swarm_scarabAI : public ScriptedAI uint32 m_uiSpell_Timer[BOSS_SPELL_COUNT]; Unit* currentTarget; +#include "sc_boss_spell_worker.cpp" + void Reset() { for (uint8 i = 0; i < BOSS_SPELL_COUNT; ++i) @@ -300,47 +235,6 @@ struct MANGOS_DLL_DECL mob_swarm_scarabAI : public ScriptedAI m_creature->SetRespawnDelay(DAY); } - bool QuerySpellPeriod(uint32 m_uiSpellIdx, uint32 diff) - { - if(!m_pInstance) return false; - bool result; - SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; - if (m_uiSpellIdx != pSpell->id) return false; - - if (m_uiSpell_Timer[m_uiSpellIdx] < diff) { - m_uiSpell_Timer[m_uiSpellIdx]=urand(pSpell->m_uiSpellTimerMin[Difficulty],pSpell->m_uiSpellTimerMax[Difficulty]); - result = true; - } else { - m_uiSpell_Timer[m_uiSpellIdx] -= diff; - result = false; - }; - return result; - } - - CanCastResult CastBossSpell(uint32 m_uiSpellIdx) - { - if(!m_pInstance) return CAST_FAIL_OTHER; - Unit* pTarget; - SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; - // Find spell index - temporary direct insert from spelltable - if (m_uiSpellIdx != pSpell->id) return CAST_FAIL_OTHER; - - switch (pSpell->m_CastTarget) { - case CAST_ON_SELF: - pTarget = m_creature; - break; - case CAST_ON_VICTIM: - pTarget = m_creature->getVictim(); - break; - case CAST_ON_RANDOM: - pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); - break; - - }; - currentTarget = pTarget; - if (pTarget) return DoCastSpellIfCan(pTarget,pSpell->m_uiSpellEntry[Difficulty]); - } - void KilledUnit(Unit* pVictim) { if (pVictim->GetTypeId() != TYPEID_PLAYER) return; @@ -392,6 +286,8 @@ struct MANGOS_DLL_DECL mob_nerubian_borrowerAI : public ScriptedAI Unit* currentTarget; bool submerged; +#include "sc_boss_spell_worker.cpp" + void Reset() { for (uint8 i = 0; i < BOSS_SPELL_COUNT; ++i) @@ -402,55 +298,6 @@ struct MANGOS_DLL_DECL mob_nerubian_borrowerAI : public ScriptedAI submerged = false; } - bool QuerySpellPeriod(uint32 m_uiSpellIdx, uint32 diff) - { - if(!m_pInstance) return false; - bool result; - SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; - if (m_uiSpellIdx != pSpell->id) return false; - - if (m_uiSpell_Timer[m_uiSpellIdx] < diff) { - m_uiSpell_Timer[m_uiSpellIdx]=urand(pSpell->m_uiSpellTimerMin[Difficulty],pSpell->m_uiSpellTimerMax[Difficulty]); - result = true; - } else { - m_uiSpell_Timer[m_uiSpellIdx] -= diff; - result = false; - }; - return result; - } - - CanCastResult CastBossSpell(uint32 m_uiSpellIdx) - { - if(!m_pInstance) return CAST_FAIL_OTHER; - Unit* pTarget = NULL; - Creature* pSummon = NULL; - bool isSummon = false; - SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; - // Find spell index - temporary direct insert from spelltable - if (m_uiSpellIdx != pSpell->id) return CAST_FAIL_OTHER; - - switch (pSpell->m_CastTarget) { - case CAST_ON_SELF: - pTarget = m_creature; - break; - case CAST_ON_VICTIM: - pTarget = m_creature->getVictim(); - break; - case CAST_ON_RANDOM: - pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); - break; - case CAST_ON_TARGET: - pTarget = currentTarget; - if (!pTarget) pTarget = m_creature->getVictim(); - break; - }; - currentTarget = pTarget; - if (pTarget && !isSummon && !pSpell->m_IsBugged) return DoCastSpellIfCan(pTarget,pSpell->m_uiSpellEntry[Difficulty]); - else if (pTarget && !isSummon && pSpell->m_IsBugged) {DoCast(pTarget,pSpell->m_uiSpellEntry[Difficulty]); return CAST_OK;} - else if (isSummon) return pSummon ? CAST_OK : CAST_FAIL_OTHER; - return CAST_FAIL_OTHER; - } - void KilledUnit(Unit* pVictim) { if (pVictim->GetTypeId() != TYPEID_PLAYER) return; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp index 8b97cd435..6f026d076 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: trial_of_the_crusader -SD%Complete: 10% +SD%Complete: 70% SDComment: by /dev/rsa SDCategory: Crusader Coliseum EndScriptData */ @@ -104,6 +104,8 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI uint8 m_volcanoCount; Unit* currentTarget; +#include "sc_boss_spell_worker.cpp" + void Reset() { if(!m_pInstance) return; Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); @@ -123,53 +125,6 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI DoScriptText(-1713517,m_creature); } - bool QuerySpellPeriod(uint32 m_uiSpellIdx, uint32 diff) - { - if(!m_pInstance) return false; - bool result; - SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; - if (m_uiSpellIdx != pSpell->id) return false; - - if (m_uiSpell_Timer[m_uiSpellIdx] < diff) { - m_uiSpell_Timer[m_uiSpellIdx]=urand(pSpell->m_uiSpellTimerMin[Difficulty],pSpell->m_uiSpellTimerMax[Difficulty]); - result = true; - } else { - m_uiSpell_Timer[m_uiSpellIdx] -= diff; - result = false; - }; - return result; - } - - CanCastResult CastBossSpell(uint32 m_uiSpellIdx) - { - if(!m_pInstance) return CAST_FAIL_OTHER; - Unit* pTarget; - SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; - // Find spell index - temporary direct insert from spelltable - if (m_uiSpellIdx != pSpell->id) return CAST_FAIL_OTHER; - - switch (pSpell->m_CastTarget) { - case CAST_ON_SELF: - pTarget = m_creature; - break; - case CAST_ON_SUMMONS: - pTarget = m_creature->getVictim(); //CHANGE IT!!! - break; - case CAST_ON_VICTIM: - pTarget = m_creature->getVictim(); - break; - case CAST_ON_RANDOM: - pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); - break; - case CAST_ON_BOTTOMAGGRO: - pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1); - break; - - }; - currentTarget = pTarget; - if (pTarget) return DoCastSpellIfCan(pTarget,pSpell->m_uiSpellEntry[Difficulty]); - } - uint64 CallGuard(uint64 npctype, TempSummonType type, uint32 _summontime ) { float fPosX, fPosY, fPosZ; @@ -414,6 +369,8 @@ struct MANGOS_DLL_DECL mob_fel_infernalAI : public ScriptedAI uint32 m_uiSpell_Timer[BOSS_SPELL_COUNT]; Unit* currentTarget; +#include "sc_boss_spell_worker.cpp" + void Reset() { Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); @@ -426,55 +383,6 @@ struct MANGOS_DLL_DECL mob_fel_infernalAI : public ScriptedAI if (pVictim->GetTypeId() != TYPEID_PLAYER) return; } - bool QuerySpellPeriod(uint32 m_uiSpellIdx, uint32 diff) - { - if(!m_pInstance) return false; - bool result; - SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; - if (m_uiSpellIdx != pSpell->id) return false; - - if (m_uiSpell_Timer[m_uiSpellIdx] == 0 ) m_uiSpell_Timer[m_uiSpellIdx]=urand(0,pSpell->m_uiSpellTimerMax[Difficulty]); - - if (m_uiSpell_Timer[m_uiSpellIdx] < diff) { - m_uiSpell_Timer[m_uiSpellIdx]=urand(pSpell->m_uiSpellTimerMin[Difficulty],pSpell->m_uiSpellTimerMax[Difficulty]); - result = true; - } else { - m_uiSpell_Timer[m_uiSpellIdx] -= diff; - result = false; - }; - return result; - } - - CanCastResult CastBossSpell(uint32 m_uiSpellIdx) - { - if(!m_pInstance) return CAST_FAIL_OTHER; - Unit* pTarget; - SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; - // Find spell index - temporary direct insert from spelltable - if (m_uiSpellIdx != pSpell->id) return CAST_FAIL_OTHER; - - switch (pSpell->m_CastTarget) { - case CAST_ON_SELF: - pTarget = m_creature; - break; - case CAST_ON_SUMMONS: - pTarget = m_creature->getVictim(); //CHANGE IT!!! - break; - case CAST_ON_VICTIM: - pTarget = m_creature->getVictim(); - break; - case CAST_ON_RANDOM: - pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); - break; - case CAST_ON_BOTTOMAGGRO: - pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1); - break; - - }; - currentTarget = pTarget; - if (pTarget) return DoCastSpellIfCan(pTarget,pSpell->m_uiSpellEntry[Difficulty]); - } - void JustDied(Unit* Killer) { } @@ -592,6 +500,8 @@ struct MANGOS_DLL_DECL mob_mistress_of_painAI : public ScriptedAI uint32 m_uiSpell_Timer[BOSS_SPELL_COUNT]; Unit* currentTarget; +#include "sc_boss_spell_worker.cpp" + void Reset() { for (uint8 i = 0; i < BOSS_SPELL_COUNT; ++i) @@ -601,53 +511,6 @@ struct MANGOS_DLL_DECL mob_mistress_of_painAI : public ScriptedAI m_creature->SetRespawnDelay(DAY); } - bool QuerySpellPeriod(uint32 m_uiSpellIdx, uint32 diff) - { - if(!m_pInstance) return false; - bool result; - SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; - if (m_uiSpellIdx != pSpell->id) return false; - - if (m_uiSpell_Timer[m_uiSpellIdx] < diff) { - m_uiSpell_Timer[m_uiSpellIdx]=urand(pSpell->m_uiSpellTimerMin[Difficulty],pSpell->m_uiSpellTimerMax[Difficulty]); - result = true; - } else { - m_uiSpell_Timer[m_uiSpellIdx] -= diff; - result = false; - }; - return result; - } - - CanCastResult CastBossSpell(uint32 m_uiSpellIdx) - { - if(!m_pInstance) return CAST_FAIL_OTHER; - Unit* pTarget; - SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; - // Find spell index - temporary direct insert from spelltable - if (m_uiSpellIdx != pSpell->id) return CAST_FAIL_OTHER; - - switch (pSpell->m_CastTarget) { - case CAST_ON_SELF: - pTarget = m_creature; - break; - case CAST_ON_SUMMONS: - pTarget = m_creature->getVictim(); //CHANGE IT!!! - break; - case CAST_ON_VICTIM: - pTarget = m_creature->getVictim(); - break; - case CAST_ON_RANDOM: - pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); - break; - case CAST_ON_BOTTOMAGGRO: - pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1); - break; - - }; - currentTarget = pTarget; - if (pTarget) return DoCastSpellIfCan(pTarget,pSpell->m_uiSpellEntry[Difficulty]); - } - void KilledUnit(Unit* pVictim) { if (pVictim->GetTypeId() != TYPEID_PLAYER) return; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index 6c1e83549..417c7836b 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -15,8 +15,8 @@ */ /* ScriptData -SDName: -SD%Complete: 1% +SDName: northrend_beasts +SD%Complete: 60% SDComment: by /dev/rsa SDCategory: EndScriptData */ @@ -35,6 +35,7 @@ enum Equipment enum Summons { NPC_SNOBOLD_VASSAL = 34800, + NPC_SLIME_POOL = 35176, }; enum BossSpells @@ -44,10 +45,14 @@ SPELL_STAGGERING_STOMP, SPELL_RISING_ANGER, SPELL_ACID_SPIT, SPELL_PARALYTIC_SPRAY, +SPELL_ACID_SPEW, +SPELL_PARALYTIC_BITE, SPELL_SWEEP_0, SPELL_SLIME_POOL, -SPELL_FIRE_SPLIT, +SPELL_FIRE_SPIT, SPELL_MOLTEN_SPEW, +SPELL_BURNING_BITE, +SPELL_BURNING_SPRAY, SPELL_SWEEP_1, SPELL_FEROCIOUS_BUTT, SPELL_MASSIVE_CRASH, @@ -59,6 +64,7 @@ SPELL_SNOBOLLED, SPELL_BATTER, SPELL_FIRE_BOMB, SPELL_HEAD_CRACK, +SPELL_SUBMERGE_0, SPELL_BERSERK, SPELL_ENRAGE, BOSS_SPELL_COUNT @@ -70,12 +76,16 @@ static SpellTable m_BossSpell[]= {SPELL_IMPALE, 66331, 67477, 67478, 67479, 20000, 20000, 20000, 20000, 40000, 40000, 40000, 40000, 65535, CAST_ON_RANDOM, false, false}, {SPELL_STAGGERING_STOMP, 67648, 67648, 67648, 66648, 15000, 15000, 15000, 15000, 40000, 40000, 40000, 40000, 65535, CAST_ON_SELF, false, false}, {SPELL_RISING_ANGER, 66636, 66636, 66636, 66636, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, true}, -{SPELL_ACID_SPIT, 67607, 67607, 67607, 67607, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, -{SPELL_PARALYTIC_SPRAY, 67616, 67616, 67616, 66616, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, -{SPELL_SWEEP_0, 66794, 66794, 66794, 66794, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, -{SPELL_SLIME_POOL, 67642, 67642, 67642, 67642, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, -{SPELL_FIRE_SPLIT, 67632, 67632, 67632, 67632, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, -{SPELL_MOLTEN_SPEW, 66821, 66821, 66821, 66821, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, +{SPELL_ACID_SPIT, 66880, 67606, 67607, 67608, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, +{SPELL_PARALYTIC_SPRAY, 66901, 67615, 67616, 66617, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, +{SPELL_ACID_SPEW, 66819, 66819, 66819, 66819, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, +{SPELL_PARALYTIC_BITE, 66824, 67612, 67613, 67614, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, +{SPELL_SWEEP_0, 66794, 67644, 67645, 67646, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, true}, +{SPELL_SLIME_POOL, 67642, 67642, 67642, 67642, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, true}, +{SPELL_FIRE_SPIT, 66796, 67632, 67633, 67634, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, +{SPELL_MOLTEN_SPEW, 66821, 66821, 66821, 66821, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, +{SPELL_BURNING_BITE, 66879, 67624, 67625, 67626, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, +{SPELL_BURNING_SPRAY, 66902, 67627, 67628, 67629, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, {SPELL_SWEEP_1, 67646, 67646, 67646, 67646, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, {SPELL_FEROCIOUS_BUTT, 66770, 67654, 67655, 67656, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, {SPELL_MASSIVE_CRASH, 66683, 67660, 67661, 67662, 15000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, @@ -87,6 +97,7 @@ static SpellTable m_BossSpell[]= {SPELL_BATTER, 66408, 66408, 66408, 66408, 10000, 10000, 10000, 10000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, {SPELL_FIRE_BOMB, 66313, 66313, 66313, 66313, 10000, 10000, 10000, 10000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, {SPELL_HEAD_CRACK, 66407, 66407, 66407, 66407, 10000, 10000, 10000, 10000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, +{SPELL_SUBMERGE_0, 53421, 53421, 53421, 53421, 40000, 40000, 40000, 40000, 60000, 60000, 60000, 60000, 65535, CAST_ON_SELF, true, false}, {SPELL_BERSERK, 26662, 26662, 26662, 26662, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 65535, CAST_ON_SELF, false, false}, {SPELL_ENRAGE, 68335, 68335, 68335, 68335, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 65535, CAST_ON_SELF, false, false}, }; @@ -106,6 +117,8 @@ struct MANGOS_DLL_DECL boss_gormokAI : public ScriptedAI uint8 SnoboldsCount; Unit* currentTarget; +#include "sc_boss_spell_worker.cpp" + void Reset() { if(!m_pInstance) return; SnoboldsCount = 4; @@ -115,69 +128,6 @@ struct MANGOS_DLL_DECL boss_gormokAI : public ScriptedAI SetEquipmentSlots(false, EQUIP_MAIN, EQUIP_OFFHAND, EQUIP_RANGED); } - bool QuerySpellPeriod(uint32 m_uiSpellIdx, uint32 diff) - { - if(!m_pInstance) return false; - bool result; - SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; - if (m_uiSpellIdx != pSpell->id) return false; - - if (m_uiSpell_Timer[m_uiSpellIdx] < diff) { - m_uiSpell_Timer[m_uiSpellIdx]=urand(pSpell->m_uiSpellTimerMin[Difficulty],pSpell->m_uiSpellTimerMax[Difficulty]); - result = true; - } else { - m_uiSpell_Timer[m_uiSpellIdx] -= diff; - result = false; - }; - return result; - } - - CanCastResult CastBossSpell(uint32 m_uiSpellIdx) - { - if(!m_pInstance) return CAST_FAIL_OTHER; - Unit* pTarget = NULL; - Creature* pSummon = NULL; - bool isSummon = false; - float fPosX, fPosY, fPosZ; - SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; - // Find spell index - temporary direct insert from spelltable - if (m_uiSpellIdx != pSpell->id) return CAST_FAIL_OTHER; - - switch (pSpell->m_CastTarget) { - case CAST_ON_SELF: - pTarget = m_creature; - break; - case CAST_ON_SUMMONS: - pTarget = m_creature->getVictim(); //CHANGE IT!!! - break; - case CAST_ON_VICTIM: - pTarget = m_creature->getVictim(); - break; - case CAST_ON_TARGET: - pTarget = currentTarget; - if (!pTarget) pTarget = m_creature->getVictim(); - break; - case CAST_ON_RANDOM: - pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); - break; - case CAST_ON_BOTTOMAGGRO: - pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1); - break; - case SUMMON_TEMP: - isSummon = true; - m_creature->GetPosition(fPosX, fPosY, fPosZ); - m_creature->GetRandomPoint(fPosX, fPosY, fPosZ, urand(30, 60), fPosX, fPosY, fPosZ); - pSummon = m_creature->SummonCreature(pSpell->m_uiSpellEntry[Difficulty], fPosX, fPosY, fPosZ, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000); - if(pSummon) pSummon->SetInCombatWithZone(); - break; - }; - currentTarget = pTarget; - if (pTarget && !isSummon && !pSpell->m_IsBugged) return DoCastSpellIfCan(pTarget,pSpell->m_uiSpellEntry[Difficulty]); - else if (pTarget && !isSummon && pSpell->m_IsBugged) {DoCast(pTarget,pSpell->m_uiSpellEntry[Difficulty]); return CAST_OK;} - else if (isSummon) return pSummon ? CAST_OK : CAST_FAIL_OTHER; - return CAST_FAIL_OTHER; - } - void JustDied(Unit* pKiller) { if (!m_pInstance) return; @@ -236,6 +186,8 @@ struct MANGOS_DLL_DECL mob_snobold_vassalAI : public ScriptedAI uint32 m_uiSpell_Timer[BOSS_SPELL_COUNT]; Unit* currentTarget; +#include "sc_boss_spell_worker.cpp" + void Reset() { for (uint8 i = 0; i < BOSS_SPELL_COUNT; ++i) @@ -245,55 +197,6 @@ struct MANGOS_DLL_DECL mob_snobold_vassalAI : public ScriptedAI m_creature->SetRespawnDelay(DAY); } - bool QuerySpellPeriod(uint32 m_uiSpellIdx, uint32 diff) - { - if(!m_pInstance) return false; - bool result; - SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; - if (m_uiSpellIdx != pSpell->id) return false; - - if (m_uiSpell_Timer[m_uiSpellIdx] < diff) { - m_uiSpell_Timer[m_uiSpellIdx]=urand(pSpell->m_uiSpellTimerMin[Difficulty],pSpell->m_uiSpellTimerMax[Difficulty]); - result = true; - } else { - m_uiSpell_Timer[m_uiSpellIdx] -= diff; - result = false; - }; - return result; - } - - CanCastResult CastBossSpell(uint32 m_uiSpellIdx) - { - if(!m_pInstance) return CAST_FAIL_OTHER; - Unit* pTarget = NULL; - Creature* pSummon = NULL; - bool isSummon = false; - SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; - // Find spell index - temporary direct insert from spelltable - if (m_uiSpellIdx != pSpell->id) return CAST_FAIL_OTHER; - - switch (pSpell->m_CastTarget) { - case CAST_ON_SELF: - pTarget = m_creature; - break; - case CAST_ON_VICTIM: - pTarget = m_creature->getVictim(); - break; - case CAST_ON_TARGET: - pTarget = currentTarget; - if (!pTarget) pTarget = m_creature->getVictim(); - break; - case CAST_ON_RANDOM: - pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); - break; - }; - currentTarget = pTarget; - if (pTarget && !isSummon && !pSpell->m_IsBugged) return DoCastSpellIfCan(pTarget,pSpell->m_uiSpellEntry[Difficulty]); - else if (pTarget && !isSummon && pSpell->m_IsBugged) {DoCast(pTarget,pSpell->m_uiSpellEntry[Difficulty]); return CAST_OK;} - else if (isSummon) return pSummon ? CAST_OK : CAST_FAIL_OTHER; - return CAST_FAIL_OTHER; - } - void Aggro(Unit *who) { if (!m_pInstance) return; @@ -336,25 +239,108 @@ struct MANGOS_DLL_DECL boss_acidmawAI : public ScriptedAI } ScriptedInstance* m_pInstance; + uint8 Difficulty; + uint32 m_uiSpell_Timer[BOSS_SPELL_COUNT]; + Unit* currentTarget; + uint8 stage; + bool enraged; - void Reset() {} +#include "sc_boss_spell_worker.cpp" + + void Reset() + { + for (uint8 i = 0; i < BOSS_SPELL_COUNT; ++i) + m_uiSpell_Timer[i] = urand(m_BossSpell[i].m_uiSpellTimerMin[Difficulty],m_BossSpell[i].m_uiSpellTimerMax[Difficulty]); + Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); + stage = 1; + enraged = false; + m_creature->SetInCombatWithZone(); + + } + + void JustDied(Unit* pKiller) + { + if (!m_pInstance) return; + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, SPECIAL); + } void JustReachedHome() { if (m_pInstance) - m_pInstance->SetData(TYPE_NORTHREND_BEASTS, NOT_STARTED); + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, FAIL); } void Aggro(Unit* pWho) { - m_creature->SetInCombatWithZone(); } void UpdateAI(const uint32 uiDiff) { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + + if ((!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + && (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) != ACIDMAW_SUBMERGED)) return; + switch (stage) + { + case 0: { + if (QuerySpellPeriod(SPELL_ACID_SPEW, uiDiff)) + CastBossSpell(SPELL_ACID_SPEW); + + if (QuerySpellPeriod(SPELL_PARALYTIC_BITE, uiDiff)) + CastBossSpell(SPELL_PARALYTIC_BITE); + + if (QuerySpellPeriod(SPELL_SLIME_POOL, uiDiff)) + CastBossSpell(SPELL_SLIME_POOL); + + if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == ACIDMAW_SUBMERGED) + stage = 1; + + break;} + case 1: { + CastBossSpell(SPELL_SUBMERGE_0); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + stage = 2; + DoScriptText(-1713557,m_creature); + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, ACIDMAW_SUBMERGED); + break;} + case 2: { + if (QuerySpellPeriod(SPELL_ACID_SPIT, uiDiff)) + CastBossSpell(SPELL_ACID_SPIT); + + if (QuerySpellPeriod(SPELL_PARALYTIC_SPRAY, uiDiff)) + CastBossSpell(SPELL_PARALYTIC_SPRAY); + + if (QuerySpellPeriod(SPELL_SWEEP_0, uiDiff)) + CastBossSpell(SPELL_SWEEP_0); + + if (QuerySpellPeriod(SPELL_SUBMERGE_0, uiDiff) && m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == ACIDMAW_SUBMERGED) + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, DREADSCALE_SUBMERGED); + + if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) != ACIDMAW_SUBMERGED) + stage = 3; + + break;} + case 3: { + DoScriptText(-1713559,m_creature); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveAurasDueToSpell(m_BossSpell[SPELL_SUBMERGE_0].m_uiSpellEntry[Difficulty]); + stage = 0; + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, DREADSCALE_SUBMERGED); + break;} + } + + if (Creature* pSister = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_DREADSCALE))) + if (!pSister->isAlive() && !enraged) + { + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, IN_PROGRESS); + m_creature->RemoveAurasDueToSpell(m_BossSpell[SPELL_SUBMERGE_0].m_uiSpellEntry[Difficulty]); + CastBossSpell(SPELL_ENRAGE); + enraged = true; + DoScriptText(-1713504,m_creature); + }; + + DoMeleeAttackIfReady(); } }; @@ -373,25 +359,105 @@ struct MANGOS_DLL_DECL boss_dreadscaleAI : public ScriptedAI } ScriptedInstance* m_pInstance; + uint8 Difficulty; + uint32 m_uiSpell_Timer[BOSS_SPELL_COUNT]; + Unit* currentTarget; + uint8 stage; + bool enraged; + +#include "sc_boss_spell_worker.cpp" + + void Reset() + { + for (uint8 i = 0; i < BOSS_SPELL_COUNT; ++i) + m_uiSpell_Timer[i] = urand(m_BossSpell[i].m_uiSpellTimerMin[Difficulty],m_BossSpell[i].m_uiSpellTimerMax[Difficulty]); + Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); + stage = 0; + enraged = false; + m_creature->SetInCombatWithZone(); + } - void Reset() {} + void JustDied(Unit* pKiller) + { + if (!m_pInstance) return; + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, SPECIAL); + } void JustReachedHome() { if (m_pInstance) - m_pInstance->SetData(TYPE_NORTHREND_BEASTS, NOT_STARTED); + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, FAIL); } void Aggro(Unit* pWho) { - m_creature->SetInCombatWithZone(); } void UpdateAI(const uint32 uiDiff) { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + if ((!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + && (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) != DREADSCALE_SUBMERGED)) return; + switch (stage) + { + case 0: { + if (QuerySpellPeriod(SPELL_BURNING_BITE, uiDiff)) + CastBossSpell(SPELL_BURNING_BITE); + + if (QuerySpellPeriod(SPELL_MOLTEN_SPEW, uiDiff)) + CastBossSpell(SPELL_MOLTEN_SPEW); + + if (QuerySpellPeriod(SPELL_SLIME_POOL, uiDiff)) + CastBossSpell(SPELL_SLIME_POOL); + + if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == DREADSCALE_SUBMERGED) + stage = 1; + + break;} + case 1: { + CastBossSpell(SPELL_SUBMERGE_0); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + stage = 2; + DoScriptText(-1713557,m_creature); + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, DREADSCALE_SUBMERGED); + break;} + case 2: { + if (QuerySpellPeriod(SPELL_FIRE_SPIT, uiDiff)) + CastBossSpell(SPELL_FIRE_SPIT); + + if (QuerySpellPeriod(SPELL_BURNING_SPRAY, uiDiff)) + CastBossSpell(SPELL_BURNING_SPRAY); + + if (QuerySpellPeriod(SPELL_SWEEP_0, uiDiff)) + CastBossSpell(SPELL_SWEEP_0); + + if (QuerySpellPeriod(SPELL_SUBMERGE_0, uiDiff) && m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == DREADSCALE_SUBMERGED) + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, ACIDMAW_SUBMERGED); + + if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) != DREADSCALE_SUBMERGED) + stage = 3; + + break;} + case 3: { + DoScriptText(-1713559,m_creature); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveAurasDueToSpell(m_BossSpell[SPELL_SUBMERGE_0].m_uiSpellEntry[Difficulty]); + stage = 0; + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, ACIDMAW_SUBMERGED); + break;} + } + + if (Creature* pSister = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_ACIDMAW))) + if (!pSister->isAlive() && !enraged) + { + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, IN_PROGRESS); + m_creature->RemoveAurasDueToSpell(m_BossSpell[SPELL_SUBMERGE_0].m_uiSpellEntry[Difficulty]); + CastBossSpell(SPELL_ENRAGE); + enraged = true; + DoScriptText(-1713504,m_creature); + }; + DoMeleeAttackIfReady(); } }; @@ -421,68 +487,7 @@ struct MANGOS_DLL_DECL boss_icehowlAI : public ScriptedAI m_uiSpell_Timer[i] = urand(m_BossSpell[i].m_uiSpellTimerMin[Difficulty],m_BossSpell[i].m_uiSpellTimerMax[Difficulty]); } - bool QuerySpellPeriod(uint32 m_uiSpellIdx, uint32 diff) - { - if(!m_pInstance) return false; - bool result; - SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; - if (m_uiSpellIdx != pSpell->id) return false; - - if (m_uiSpell_Timer[m_uiSpellIdx] < diff) { - m_uiSpell_Timer[m_uiSpellIdx]=urand(pSpell->m_uiSpellTimerMin[Difficulty],pSpell->m_uiSpellTimerMax[Difficulty]); - result = true; - } else { - m_uiSpell_Timer[m_uiSpellIdx] -= diff; - result = false; - }; - return result; - } - - CanCastResult CastBossSpell(uint32 m_uiSpellIdx) - { - if(!m_pInstance) return CAST_FAIL_OTHER; - Unit* pTarget = NULL; - Creature* pSummon = NULL; - bool isSummon = false; - float fPosX, fPosY, fPosZ; - SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; - // Find spell index - temporary direct insert from spelltable - if (m_uiSpellIdx != pSpell->id) return CAST_FAIL_OTHER; - - switch (pSpell->m_CastTarget) { - case CAST_ON_SELF: - pTarget = m_creature; - break; - case CAST_ON_SUMMONS: - pTarget = m_creature->getVictim(); //CHANGE IT!!! - break; - case CAST_ON_VICTIM: - pTarget = m_creature->getVictim(); - break; - case CAST_ON_TARGET: - pTarget = currentTarget; - if (!pTarget) pTarget = m_creature->getVictim(); - break; - case CAST_ON_RANDOM: - pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); - break; - case CAST_ON_BOTTOMAGGRO: - pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1); - break; - case SUMMON_TEMP: - isSummon = true; - m_creature->GetPosition(fPosX, fPosY, fPosZ); - m_creature->GetRandomPoint(fPosX, fPosY, fPosZ, urand(30, 60), fPosX, fPosY, fPosZ); - pSummon = m_creature->SummonCreature(pSpell->m_uiSpellEntry[Difficulty], fPosX, fPosY, fPosZ, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000); - if(pSummon) pSummon->SetInCombatWithZone(); - break; - }; - currentTarget = pTarget; - if (pTarget && !isSummon && !pSpell->m_IsBugged) return DoCastSpellIfCan(pTarget,pSpell->m_uiSpellEntry[Difficulty]); - else if (pTarget && !isSummon && pSpell->m_IsBugged) {DoCast(pTarget,pSpell->m_uiSpellEntry[Difficulty]); return CAST_OK;} - else if (isSummon) return pSummon ? CAST_OK : CAST_FAIL_OTHER; - return CAST_FAIL_OTHER; - } +#include "sc_boss_spell_worker.cpp" void JustDied(Unit* pKiller) { diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp index dc29d2237..23be637f2 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp @@ -101,6 +101,8 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI uint8 stage; Unit* currentTarget; +#include "sc_boss_spell_worker.cpp" + void Reset() { if(!m_pInstance) return; Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); @@ -111,53 +113,6 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI if (m_creature->isAlive()) m_creature->SummonCreature(NPC_LIGHT_ESSENCE, SpawnLoc[25].x, SpawnLoc[25].y, SpawnLoc[25].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); } - bool QuerySpellPeriod(uint32 m_uiSpellIdx, uint32 diff) - { - if(!m_pInstance) return false; - bool result; - SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; - if (m_uiSpellIdx != pSpell->id) return false; - - if (m_uiSpell_Timer[m_uiSpellIdx] < diff) { - m_uiSpell_Timer[m_uiSpellIdx]=urand(pSpell->m_uiSpellTimerMin[Difficulty],pSpell->m_uiSpellTimerMax[Difficulty]); - result = true; - } else { - m_uiSpell_Timer[m_uiSpellIdx] -= diff; - result = false; - }; - return result; - } - - CanCastResult CastBossSpell(uint32 m_uiSpellIdx) - { - if(!m_pInstance) return CAST_FAIL_OTHER; - Unit* pTarget; - SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; - // Find spell index - temporary direct insert from spelltable - if (m_uiSpellIdx != pSpell->id) return CAST_FAIL_OTHER; - - switch (pSpell->m_CastTarget) { - case CAST_ON_SELF: - pTarget = m_creature; - break; - case CAST_ON_SUMMONS: - pTarget = m_creature->getVictim(); //CHANGE IT!!! - break; - case CAST_ON_VICTIM: - pTarget = m_creature->getVictim(); - break; - case CAST_ON_RANDOM: - pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); - break; - case CAST_ON_BOTTOMAGGRO: - pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1); - break; - - }; - currentTarget = pTarget; - if (pTarget) return DoCastSpellIfCan(pTarget,pSpell->m_uiSpellEntry[Difficulty]); - } - void JustReachedHome() { if (!m_pInstance) return; @@ -235,6 +190,8 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI uint8 stage; Unit* currentTarget; +#include "sc_boss_spell_worker.cpp" + void Reset() { if(!m_pInstance) return; @@ -246,53 +203,6 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI if (m_creature->isAlive()) m_creature->SummonCreature(NPC_DARK_ESSENCE, SpawnLoc[23].x, SpawnLoc[23].y, SpawnLoc[23].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); } - bool QuerySpellPeriod(uint32 m_uiSpellIdx, uint32 diff) - { - if(!m_pInstance) return false; - bool result; - SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; - if (m_uiSpellIdx != pSpell->id) return false; - - if (m_uiSpell_Timer[m_uiSpellIdx] < diff) { - m_uiSpell_Timer[m_uiSpellIdx]=urand(pSpell->m_uiSpellTimerMin[Difficulty],pSpell->m_uiSpellTimerMax[Difficulty]); - result = true; - } else { - m_uiSpell_Timer[m_uiSpellIdx] -= diff; - result = false; - }; - return result; - } - - CanCastResult CastBossSpell(uint32 m_uiSpellIdx) - { - if(!m_pInstance) return CAST_FAIL_OTHER; - Unit* pTarget; - SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; - // Find spell index - temporary direct insert from spelltable - if (m_uiSpellIdx != pSpell->id) return CAST_FAIL_OTHER; - - switch (pSpell->m_CastTarget) { - case CAST_ON_SELF: - pTarget = m_creature; - break; - case CAST_ON_SUMMONS: - pTarget = m_creature->getVictim(); //CHANGE IT!!! - break; - case CAST_ON_VICTIM: - pTarget = m_creature->getVictim(); - break; - case CAST_ON_RANDOM: - pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); - break; - case CAST_ON_BOTTOMAGGRO: - pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1); - break; - - }; - currentTarget = pTarget; - if (pTarget) return DoCastSpellIfCan(pTarget,pSpell->m_uiSpellEntry[Difficulty]); - } - void JustReachedHome() { if (!m_pInstance) return; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index a074b47f3..3de8e7b55 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: instance_trial_of_the_crusader -SD%Complete: 70% +SD%Complete: 80% SDComment: by /dev/rsa SDCategory: Trial of the Crusader EndScriptData */ diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index fb3967b1f..e4087f48b 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: Trial Of the crusader -SD%Complete: 40% +SD%Complete: 60% SDComment: event script by /dev/rsa SDCategory: trial_of_the_crusader EndScriptData */ diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index f0f761ea5..8f9734ada 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -1,6 +1,10 @@ +/* Copyright (C) 2009 - 2010 by /dev/rsa for ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ #ifndef DEF_CRUSADER_H #define DEF_CRUSADER_H +#include "sc_boss_spell_worker.h" enum { @@ -94,12 +98,6 @@ enum }; -struct Locations -{ - float x, y, z; - uint32 id; -}; - static Locations SpawnLoc[]= { {559.257996, 90.266197, 395.122986}, // 0 Barrent @@ -130,48 +128,16 @@ static Locations SpawnLoc[]= {586.200562, 162.145523, 394.626129}, // 25 - Light essence 2 }; -struct WayPoints -{ - WayPoints(uint32 _id, float _x, float _y, float _z) - { - id = _id; - x = _x; - y = _y; - z = _z; - } - uint32 id; - float x, y, z; -}; - -enum SpellTableParameters -{ - DIFFICULTY_LEVELS = 4, - CAST_ON_SELF = 1000, - CAST_ON_SUMMONS, - CAST_ON_VICTIM, - CAST_ON_RANDOM, - CAST_ON_BOTTOMAGGRO, - CAST_ON_TARGET, - SUMMON_INSTANT, - SUMMON_TEMP, -}; - -struct SpellTable -{ - uint32 id; - uint32 m_uiSpellEntry[DIFFICULTY_LEVELS]; // Stores spell entry for difficulty levels - uint32 m_uiSpellTimerMin[DIFFICULTY_LEVELS]; // The timer (min) before the next spell casting, in milliseconds - uint32 m_uiSpellTimerMax[DIFFICULTY_LEVELS]; // The timer (max) before the next spell casting - uint32 m_uiStageMask; // The mask of stages where spell is casted - uint32 m_CastTarget; // Target on casting spell - bool m_IsVisualEffect; // Spellcasting is visual effect or real effect - bool m_IsBugged; // Need override for this spell -}; - enum uiWorldStates { UPDATE_STATE_UI_SHOW = 4390, UPDATE_STATE_UI_COUNT = 4389, }; +enum NorthrendBeasts +{ + DREADSCALE_SUBMERGED = 2000, + ACIDMAW_SUBMERGED = 2001, +}; + #endif diff --git a/sql/Updates/r1632_mangos.sql b/sql/Updates/r1632_mangos.sql index 32d39be53..4818b1a28 100644 --- a/sql/Updates/r1632_mangos.sql +++ b/sql/Updates/r1632_mangos.sql @@ -2,8 +2,8 @@ UPDATE instance_template SET script='instance_trial_of_the_crusader' WHERE map=6 UPDATE creature_template SET ScriptName='boss_gormok' WHERE entry=34796; UPDATE creature_template SET ScriptName='boss_acidmaw' WHERE entry=35144; UPDATE creature_template SET ScriptName='boss_dreadscale' WHERE entry=34799; --- UPDATE creature_template SET ScriptName='boss_icehowl' WHERE entry=34797; +UPDATE creature_template SET ScriptName='boss_icehowl' WHERE entry=34797; UPDATE creature_template SET ScriptName='boss_jaraxxus' WHERE entry=34780; --- UPDATE creature_template SET ScriptName='boss_anubarak_trial' WHERE entry=34564; +UPDATE creature_template SET ScriptName='boss_anubarak_trial' WHERE entry=34564; UPDATE creature_template SET ScriptName='boss_fjola' WHERE entry=34497; UPDATE creature_template SET ScriptName='boss_eydis' WHERE entry=34496; From 2c2b22aca8508b7e2135383347ab2b29de493226 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 17 Mar 2010 13:24:57 +0300 Subject: [PATCH 195/405] Restore build with 9592 --- scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp index 41562730d..240ccdca8 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp @@ -188,7 +188,7 @@ struct MANGOS_DLL_DECL boss_ionarAI : public ScriptedAI if (pSpark->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE) pSpark->GetMotionMaster()->MovementExpired(); - pSpark->SetSpeedRate(MOVE_RUN, pSpark->GetCreatureInfo()->speed * 2); + pSpark->SetSpeedRate(MOVE_RUN,2); pSpark->GetMotionMaster()->MovePoint(POINT_CALLBACK, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); } } From 0e623c868ac0acf942af2fab143c291b52258721 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 17 Mar 2010 13:25:42 +0300 Subject: [PATCH 196/405] TOC 27 - typo change and Gormok almost complete --- include/sc_boss_spell_worker.cpp | 27 ++++++++++++-- include/sc_boss_spell_worker.h | 23 ++++++++++-- .../boss_anubarak_trial.cpp | 11 ++++-- .../trial_of_the_crusader/boss_jaraxxus.cpp | 4 +- .../boss_northrend_beasts.cpp | 37 ++++++++++++++----- .../boss_twin_valkyr.cpp | 5 +++ .../trial_of_the_crusader.cpp | 23 ++++-------- .../trial_of_the_crusader.h | 4 ++ 8 files changed, 97 insertions(+), 37 deletions(-) diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index 90c499f07..018f28f3f 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -21,7 +21,7 @@ return result; } - CanCastResult CastBossSpell(uint32 m_uiSpellIdx) + CanCastResult CastBossSpell(uint32 m_uiSpellIdx, BossSpellFlag spellfag = CAST_NORMAL) { if(!m_pInstance) return CAST_FAIL_OTHER; Unit* pTarget = NULL; @@ -59,20 +59,41 @@ m_creature->AddAura(new BossAura(spell, EFFECT_INDEX_0, &bp, m_creature, m_creature)); return CAST_OK; break; + case APPLY_AURA_TARGET: pTarget = currentTarget; if (!pTarget) pTarget = m_creature->getVictim(); if (spell = (SpellEntry *)GetSpellStore()->LookupEntry(pSpell->m_uiSpellEntry[Difficulty])) - m_creature->AddAura(new BossAura(spell, EFFECT_INDEX_0, &bp, m_creature, pTarget)); + pTarget->AddAura(new BossAura(spell, EFFECT_INDEX_0, &bp, pTarget, pTarget)); return CAST_OK; break; - case SUMMON_TEMP: + + case SUMMON_NORMAL: isSummon = true; m_creature->GetPosition(fPosX, fPosY, fPosZ); m_creature->GetRandomPoint(fPosX, fPosY, fPosZ, urand(30, 60), fPosX, fPosY, fPosZ); pSummon = m_creature->SummonCreature(pSpell->m_uiSpellEntry[Difficulty], fPosX, fPosY, fPosZ, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000); if(pSummon) pSummon->SetInCombatWithZone(); break; + + case SUMMON_TEMP: + isSummon = true; + m_creature->GetPosition(fPosX, fPosY, fPosZ); + m_creature->GetRandomPoint(fPosX, fPosY, fPosZ, urand(30, 60), fPosX, fPosY, fPosZ); + pSummon = m_creature->SummonCreature(pSpell->m_uiSpellEntry[Difficulty], fPosX, fPosY, fPosZ, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, + urand(pSpell->m_uiSpellTimerMin[Difficulty],pSpell->m_uiSpellTimerMax[Difficulty])); + if(pSummon) pSummon->SetInCombatWithZone(); + break; + + case SUMMON_INSTANT: + isSummon = true; + m_creature->GetPosition(fPosX, fPosY, fPosZ); + m_creature->GetRandomPoint(fPosX, fPosY, fPosZ, urand(30, 60), fPosX, fPosY, fPosZ); + pSummon = m_creature->SummonCreature(pSpell->m_uiSpellEntry[Difficulty], fPosX, fPosY, fPosZ, 0, TEMPSUMMON_MANUAL_DESPAWN,0); + break; + + default: + return CAST_FAIL_OTHER; }; currentTarget = pTarget; if (pTarget && !isSummon && !pSpell->m_IsBugged) return DoCastSpellIfCan(pTarget,pSpell->m_uiSpellEntry[Difficulty]); diff --git a/include/sc_boss_spell_worker.h b/include/sc_boss_spell_worker.h index e7151b9e7..3cfc6dfec 100644 --- a/include/sc_boss_spell_worker.h +++ b/include/sc_boss_spell_worker.h @@ -4,6 +4,10 @@ #ifndef DEF_BOSS_SPELL_WORKER_H #define DEF_BOSS_SPELL_WORKER_H +enum +{ + DIFFICULTY_LEVELS = 4, +}; struct Locations { @@ -24,10 +28,17 @@ struct WayPoints float x, y, z; }; -enum SpellTableParameters +enum BossSpellFlag { - DIFFICULTY_LEVELS = 4, - CAST_ON_SELF = 1000, + CAST_NORMAL, + CAST_REMOVE, + CAST_OVERRIDE, + SPELLFLAG_NUMBER +}; + +enum BossSpellTableParameters +{ + CAST_ON_SELF, CAST_ON_SUMMONS, CAST_ON_VICTIM, CAST_ON_RANDOM, @@ -35,10 +46,14 @@ enum SpellTableParameters CAST_ON_TARGET, APPLY_AURA_SELF, APPLY_AURA_TARGET, + SUMMON_NORMAL, SUMMON_INSTANT, SUMMON_TEMP, + SPELLTABLEPARM_NUMBER }; + + struct SpellTable { uint32 id; @@ -46,7 +61,7 @@ struct SpellTable uint32 m_uiSpellTimerMin[DIFFICULTY_LEVELS]; // The timer (min) before the next spell casting, in milliseconds uint32 m_uiSpellTimerMax[DIFFICULTY_LEVELS]; // The timer (max) before the next spell casting uint32 m_uiStageMask; // The mask of stages where spell is casted - uint32 m_CastTarget; // Target on casting spell + BossSpellTableParameters m_CastTarget; // Target on casting spell bool m_IsVisualEffect; // Spellcasting is visual effect or real effect bool m_IsBugged; // Need override for this spell }; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp index 76b5da214..b55799249 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp @@ -21,6 +21,11 @@ SDComment: by /dev/rsa SDCategory: EndScriptData */ +// Anubarak - underground phase not worked, timers need correct +// Burrower - underground phase not implemented +// Leecheng Swarm spell need override +// Frost Sphere - realised by EventAI + #include "precompiled.h" #include "trial_of_the_crusader.h" @@ -68,9 +73,9 @@ static SpellTable m_BossSpell[]= {SPELL_ACID_MANDIBLE, 67861, 66092, 66092, 66092, 5000, 5000, 5000, 5000, 20000, 20000, 20000, 20000, 65535, CAST_ON_VICTIM, false, false}, {SPELL_SPIDER_FRENZY, 66129, 66129, 66129, 66129, 10000, 10000, 10000, 10000, 20000, 20000, 20000, 20000, 65535, CAST_ON_TARGET, false, false}, {SPELL_EXPOSE_WEAKNESS, 67847, 67847, 67847, 67847, 5000, 5000, 5000, 5000, 20000, 20000, 20000, 20000, 65535, CAST_ON_VICTIM, false, false}, -{SUMMON_SCARAB, NPC_SCARAB, NPC_SCARAB, NPC_SCARAB, NPC_SCARAB, 90000, 90000, 90000, 90000, 90000, 90000, 90000, 90000, 65535, SUMMON_TEMP, true, false}, -{SUMMON_BORROWER, NPC_BURROWER, NPC_BURROWER, NPC_BURROWER, NPC_BURROWER, 70000, 70000, 70000, 70000, 100000, 100000, 100000, 100000, 65535, SUMMON_TEMP, true, false}, -{SUMMON_FROSTSPHERE, NPC_FROST_SPHERE, NPC_FROST_SPHERE, NPC_FROST_SPHERE, NPC_FROST_SPHERE, 5000, 5000, 5000, 5000, 10000, 10000, 10000, 10000, 65535, SUMMON_INSTANT, true, false}, +{SUMMON_SCARAB, NPC_SCARAB, NPC_SCARAB, NPC_SCARAB, NPC_SCARAB, 90000, 90000, 90000, 90000, 90000, 90000, 90000, 90000, 65535, SUMMON_NORMAL, true, false}, +{SUMMON_BORROWER, NPC_BURROWER, NPC_BURROWER, NPC_BURROWER, NPC_BURROWER, 70000, 70000, 70000, 70000, 100000, 100000, 100000, 100000, 65535, SUMMON_NORMAL, true, false}, +{SUMMON_FROSTSPHERE, NPC_FROST_SPHERE, NPC_FROST_SPHERE, NPC_FROST_SPHERE, NPC_FROST_SPHERE, 5000, 5000, 5000, 5000, 10000, 10000, 10000, 10000, 65535, SUMMON_NORMAL, true, false}, {SPELL_BERSERK, 26662, 26662, 26662, 26662, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 65535, CAST_ON_SELF, false, false}, }; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp index 6f026d076..268ce1b8b 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp @@ -13,10 +13,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +// Jaraxxus - Magic aura (from start?) not fully offlike implemented. +// Legion flame visual effect not imlemented /* ScriptData SDName: trial_of_the_crusader -SD%Complete: 70% +SD%Complete: 80% SDComment: by /dev/rsa SDCategory: Crusader Coliseum EndScriptData */ diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index 417c7836b..1aa7b6f4f 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -13,10 +13,13 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +// Gormok - Firebomb not implemented, timers need correct +// Snakes - Underground phase not worked, timers need correct +// Icehowl - Trample&Crash event not implemented, timers need correct /* ScriptData SDName: northrend_beasts -SD%Complete: 60% +SD%Complete: 60% SDComment: by /dev/rsa SDCategory: EndScriptData */ @@ -36,6 +39,7 @@ enum Summons { NPC_SNOBOLD_VASSAL = 34800, NPC_SLIME_POOL = 35176, + NPC_FIRE_BOMB = 34854, }; enum BossSpells @@ -75,7 +79,7 @@ static SpellTable m_BossSpell[]= // Name 10 25 10H 25H {SPELL_IMPALE, 66331, 67477, 67478, 67479, 20000, 20000, 20000, 20000, 40000, 40000, 40000, 40000, 65535, CAST_ON_RANDOM, false, false}, {SPELL_STAGGERING_STOMP, 67648, 67648, 67648, 66648, 15000, 15000, 15000, 15000, 40000, 40000, 40000, 40000, 65535, CAST_ON_SELF, false, false}, -{SPELL_RISING_ANGER, 66636, 66636, 66636, 66636, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, true}, +{SPELL_RISING_ANGER, 66636, 66636, 66636, 66636, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, APPLY_AURA_SELF, false, true}, {SPELL_ACID_SPIT, 66880, 67606, 67607, 67608, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, {SPELL_PARALYTIC_SPRAY, 66901, 67615, 67616, 66617, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, {SPELL_ACID_SPEW, 66819, 66819, 66819, 66819, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, @@ -92,8 +96,8 @@ static SpellTable m_BossSpell[]= {SPELL_WHIRL, 67345, 67663, 67664, 67665, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, {SPELL_ARCTIC_BREATH, 66689, 67650, 67651, 67652, 25000, 25000, 25000, 25000, 40000, 40000, 40000, 40000, 65535, CAST_ON_RANDOM, false, false}, {SPELL_TRAMPLE, 66734, 66734, 66734, 66734, 30000, 30000, 30000, 30000, 60000, 60000, 60000, 60000, 65535, CAST_ON_RANDOM, false, false}, -{SUMMON_SNOBOLD, NPC_SNOBOLD_VASSAL, NPC_SNOBOLD_VASSAL, NPC_SNOBOLD_VASSAL, NPC_SNOBOLD_VASSAL, 40000, 40000, 40000, 40000, 60000, 60000, 60000, 60000, 65535, SUMMON_TEMP, false, false}, -{SPELL_SNOBOLLED, 66406, 66406, 66406, 66406, 10000, 10000, 10000, 10000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, true}, +{SUMMON_SNOBOLD, NPC_SNOBOLD_VASSAL, NPC_SNOBOLD_VASSAL, NPC_SNOBOLD_VASSAL, NPC_SNOBOLD_VASSAL, 40000, 40000, 40000, 40000, 60000, 60000, 60000, 60000, 65535, SUMMON_NORMAL, false, false}, +{SPELL_SNOBOLLED, 66406, 66406, 66406, 66406, 10000, 10000, 10000, 10000, 30000, 30000, 30000, 30000, 65535, APPLY_AURA_TARGET, false, true}, {SPELL_BATTER, 66408, 66408, 66408, 66408, 10000, 10000, 10000, 10000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, {SPELL_FIRE_BOMB, 66313, 66313, 66313, 66313, 10000, 10000, 10000, 10000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, {SPELL_HEAD_CRACK, 66407, 66407, 66407, 66407, 10000, 10000, 10000, 10000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, @@ -131,7 +135,7 @@ struct MANGOS_DLL_DECL boss_gormokAI : public ScriptedAI void JustDied(Unit* pKiller) { if (!m_pInstance) return; - m_pInstance->SetData(TYPE_NORTHREND_BEASTS, SPECIAL); + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, GORMOK_DONE); } void JustReachedHome() @@ -143,7 +147,7 @@ struct MANGOS_DLL_DECL boss_gormokAI : public ScriptedAI void Aggro(Unit* pWho) { m_creature->SetInCombatWithZone(); - m_pInstance->SetData(TYPE_NORTHREND_BEASTS, IN_PROGRESS); + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, GORMOK_IN_PROGRESS); } void UpdateAI(const uint32 uiDiff) @@ -185,6 +189,7 @@ struct MANGOS_DLL_DECL mob_snobold_vassalAI : public ScriptedAI uint8 Difficulty; uint32 m_uiSpell_Timer[BOSS_SPELL_COUNT]; Unit* currentTarget; + Unit* defaultTarget; #include "sc_boss_spell_worker.cpp" @@ -200,14 +205,26 @@ struct MANGOS_DLL_DECL mob_snobold_vassalAI : public ScriptedAI void Aggro(Unit *who) { if (!m_pInstance) return; - currentTarget = who; + defaultTarget = who; CastBossSpell(SPELL_SNOBOLLED); } + void JustDied(Unit* pKiller) + { + if (defaultTarget && defaultTarget->isAlive()) + defaultTarget->RemoveAurasDueToSpell(m_BossSpell[SPELL_SNOBOLLED].m_uiSpellEntry[Difficulty]); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_GORMOK))) + if (pTemp->isAlive() && pTemp->GetAura(m_BossSpell[SPELL_RISING_ANGER].m_uiSpellEntry[Difficulty], EFFECT_INDEX_0)->modStackAmount(-1)) + pTemp->RemoveAurasDueToSpell(m_BossSpell[SPELL_RISING_ANGER].m_uiSpellEntry[Difficulty]); + } + void UpdateAI(const uint32 uiDiff) { - if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) != IN_PROGRESS) + if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) != GORMOK_IN_PROGRESS) { + if (defaultTarget && defaultTarget->isAlive()) + defaultTarget->RemoveAurasDueToSpell(m_BossSpell[SPELL_SNOBOLLED].m_uiSpellEntry[Difficulty]); m_creature->ForcedDespawn(); + } if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -492,7 +509,7 @@ struct MANGOS_DLL_DECL boss_icehowlAI : public ScriptedAI void JustDied(Unit* pKiller) { if (!m_pInstance) return; - m_pInstance->SetData(TYPE_NORTHREND_BEASTS, SPECIAL); + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, ICEHOWL_DONE); } void JustReachedHome() @@ -504,7 +521,7 @@ struct MANGOS_DLL_DECL boss_icehowlAI : public ScriptedAI void Aggro(Unit* pWho) { m_creature->SetInCombatWithZone(); - m_pInstance->SetData(TYPE_NORTHREND_BEASTS, IN_PROGRESS); + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, ICEHOWL_IN_PROGRESS); } void UpdateAI(const uint32 uiDiff) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp index 23be637f2..f4a59fc77 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp @@ -21,6 +21,11 @@ SDComment: by /dev/rsa SDCategory: Crusader Coliseum EndScriptData */ +// Twin pact && shields not implemented +// Shared health not fully correct worked +// timers need correct +// Portals not moving + #include "precompiled.h" #include "trial_of_the_crusader.h" diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index e4087f48b..1f9e7a7d0 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -67,9 +67,9 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI flag25 = true; DelayTimer = 0; m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - if(Creature *pAlly = GetClosestCreatureWithEntry(m_creature, NPC_THRALL, 200.0f)) + if(Creature *pAlly = GetClosestCreatureWithEntry(m_creature, NPC_THRALL, 300.0f)) pAlly->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - if(Creature *pAlly = GetClosestCreatureWithEntry(m_creature, NPC_PROUDMOORE, 200.0f)) + if(Creature *pAlly = GetClosestCreatureWithEntry(m_creature, NPC_PROUDMOORE, 300.0f)) pAlly->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); } @@ -87,8 +87,7 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI switch (pInstance->GetData(TYPE_STAGE)) { case 0: break; case 1: { - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_GORMOK))) - if (!pTemp->isAlive()) { + if (pInstance->GetData(TYPE_NORTHREND_BEASTS) == GORMOK_DONE) { pInstance->SetData(TYPE_STAGE,2); pInstance->SetData(TYPE_EVENT,200); } @@ -106,20 +105,16 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI break; } case 3: { - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_ICEHOWL))) { - if (!pTemp->isAlive()) { + if (pInstance->GetData(TYPE_NORTHREND_BEASTS) == ICEHOWL_DONE) { pInstance->SetData(TYPE_STAGE,0); pInstance->SetData(TYPE_BEASTS,DONE); pInstance->SetData(TYPE_EVENT,400); } - } break; }; - case 4: { break; }; - case 5: { Creature* pTemp1 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_1)); Creature* pTemp2 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_2)); @@ -637,18 +632,14 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE); if (pInstance->GetData(TYPE_BEASTS) == NOT_STARTED || pInstance->GetData(TYPE_BEASTS) == FAIL) - pInstance->SetData(TYPE_STAGE,1); - pInstance->SetData(TYPE_BEASTS,IN_PROGRESS); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_GORMOK))) - { if(!pTemp->isAlive()) pTemp->Respawn(); } - else { - m_creature->SummonCreature(NPC_GORMOK, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + pInstance->SetData(TYPE_STAGE,1); + pInstance->SetData(TYPE_BEASTS,IN_PROGRESS); + m_creature->SummonCreature(NPC_GORMOK, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_GORMOK))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } - } UpdateTimer = 10000; pInstance->SetData(TYPE_EVENT,160); break; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index 8f9734ada..95a67c07f 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -136,8 +136,12 @@ enum uiWorldStates enum NorthrendBeasts { + GORMOK_IN_PROGRESS = 1000, + GORMOK_DONE = 1001, DREADSCALE_SUBMERGED = 2000, ACIDMAW_SUBMERGED = 2001, + ICEHOWL_IN_PROGRESS = 1000, + ICEHOWL_DONE = 1001, }; #endif From 229106e00b424aa3f0223b1dc3e746ffdb9f59c2 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Fri, 19 Mar 2010 18:32:45 +0300 Subject: [PATCH 197/405] Small sql change --- addition/726_naxxramas_mangos.sql | 2 -- 1 file changed, 2 deletions(-) diff --git a/addition/726_naxxramas_mangos.sql b/addition/726_naxxramas_mangos.sql index c14cf2027..2bcba3b08 100644 --- a/addition/726_naxxramas_mangos.sql +++ b/addition/726_naxxramas_mangos.sql @@ -92,8 +92,6 @@ INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entr DELETE FROM `creature_template` WHERE (`entry`=29912); INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (29912, 0, 0, 0, 0, 0, 26620, 0, 26620, 0, 'Obedience Crystal', '', 'Interact', 0, 80, 80, 12600, 12600, 0, 0, 9729, 35, 35, 1, 1, 1, 0, 422, 586, 0, 642, 1, 2000, 0, 1, 64, 0, 0, 0, 0, 0, 0, 345, 509, 103, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 'npc_obedience_crystal'); -update `creature` set `id` = 29956 where `guid` = 128353; - UPDATE `creature` SET `MovementType` = 2 WHERE `guid` = 128312; DELETE FROM `creature_movement` WHERE id = 128312; INSERT INTO `creature_movement` (`id`,`POINT`,`position_x`,`position_y`,`position_z`) VALUES From a5cc045ef59a85d85c2cca8a92b557d64e3f41aa Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sat, 20 Mar 2010 21:30:20 +0300 Subject: [PATCH 198/405] Small change sql --- addition/719_ankahet_mangos.sql | 10 +++++----- addition/721_icecrown_mangos.sql | 4 ++-- addition/7_mangos_ulduar.sql | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/addition/719_ankahet_mangos.sql b/addition/719_ankahet_mangos.sql index 8f15f7720..a02f7c479 100644 --- a/addition/719_ankahet_mangos.sql +++ b/addition/719_ankahet_mangos.sql @@ -4,11 +4,11 @@ INSERT INTO `creature_template_addon` (`entry`, `mount`, `bytes1`, `bytes2`, `em ('31474', '0', '8', '1', '0', '0', NULL); DELETE FROM creature_template WHERE entry IN (31474, 30385, 29310, 31465); -INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES -(29310, 31465, 0, 0, 0, 0, 26777, 0, 26777, 0, 'Jedoga Shadowseeker', '', '', 0, 75, 75, 212700, 212700, 0, 0, 8204, 16, 16, 0, 1, 1, 1, 339, 481, 0, 370, 7.5, 2000, 0, 2, 0, 0, 0, 0, 0, 0, 0, 293, 436, 53, 7, 0, 29310, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4176, 6960, '', 0, 3, 20, 20, 0, 0, 0, 0, 0, 0, 0, 172, 1, 1575, 0, 0, 'boss_jedoga'), -(30385, 31474, 0, 0, 0, 0, 27382, 27384, 27383, 27385, 'Twilight Volunteer', '', '', 0, 74, 74, 25705, 25705, 0, 0, 0, 16, 16, 0, 0.55, 1, 1, 0, 0, 0, 0, 1, 2000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 2.5, 4, 0, 0, 0, 0, 0, 0, 0, 0, 1, 93, 0, 0, 'npc_twilight_volunteer'), -(31465, 0, 0, 0, 0, 0, 26777, 0, 26777, 0, 'Jedoga Shadowseeker (1)', '', '', 0, 82, 82, 431392, 431392, 0, 0, 10253, 16, 16, 0, 1, 1, 1, 463, 640, 0, 726, 13, 2000, 0, 2, 0, 0, 0, 0, 0, 0, 0, 360, 520, 91, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8352, 13920, '', 0, 3, 32, 20, 0, 0, 0, 0, 0, 0, 0, 172, 1, 0, 0, 1, ''), -(31474, 0, 0, 0, 0, 0, 27382, 27384, 27383, 27385, 'Twilight Volunteer (1)', '', '', 0, 81, 81, 58648, 58648, 0, 0, 0, 16, 16, 0, 0.55, 1, 1, 0, 0, 0, 0, 1, 2000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 4.5, 4, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, ''); +INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES +(29310, 31465, 0, 0, 0, 0, 26777, 0, 26777, 0, 'Jedoga Shadowseeker', '', '', 0, 75, 75, 212700, 212700, 0, 0, 8204, 16, 16, 0, 1, 1, 339, 481, 0, 370, 7.5, 2000, 0, 2, 0, 0, 0, 0, 0, 0, 0, 293, 436, 53, 7, 0, 29310, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4176, 6960, '', 0, 3, 20, 20, 0, 0, 0, 0, 0, 0, 0, 172, 1, 1575, 0, 0, 'boss_jedoga'), +(30385, 31474, 0, 0, 0, 0, 27382, 27384, 27383, 27385, 'Twilight Volunteer', '', '', 0, 74, 74, 25705, 25705, 0, 0, 0, 16, 16, 0, 1, 1, 0, 0, 0, 0, 1, 2000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 2.5, 4, 0, 0, 0, 0, 0, 0, 0, 0, 1, 93, 0, 0, 'npc_twilight_volunteer'), +(31465, 0, 0, 0, 0, 0, 26777, 0, 26777, 0, 'Jedoga Shadowseeker (1)', '', '', 0, 82, 82, 431392, 431392, 0, 0, 10253, 16, 16, 0, 1, 1, 463, 640, 0, 726, 13, 2000, 0, 2, 0, 0, 0, 0, 0, 0, 0, 360, 520, 91, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8352, 13920, '', 0, 3, 32, 20, 0, 0, 0, 0, 0, 0, 0, 172, 1, 0, 0, 1, ''), +(31474, 0, 0, 0, 0, 0, 27382, 27384, 27383, 27385, 'Twilight Volunteer (1)', '', '', 0, 81, 81, 58648, 58648, 0, 0, 0, 16, 16, 0, 1, 1, 0, 0, 0, 0, 1, 2000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 4.5, 4, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, ''); DELETE FROM creature_addon WHERE guid=131953; DELETE FROM creature WHERE guid=131953; diff --git a/addition/721_icecrown_mangos.sql b/addition/721_icecrown_mangos.sql index e23febdea..41ccd4123 100644 --- a/addition/721_icecrown_mangos.sql +++ b/addition/721_icecrown_mangos.sql @@ -9,8 +9,8 @@ INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `positi UPDATE `gameobject_template` SET ScriptName = 'go_icecrown_teleporter' WHERE `entry` IN (202242,202243,202244,202245,202235); # 202223 202246 DELETE FROM `creature_template` WHERE `entry` = 99322; -INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES -(99322, 0, 0, 0, 0, 0, 22448, 0, 22448, 0, 'IceCrown teleporter', '', NULL, 0, 80, 80, 64200, 64200, 12300, 12300, 9730, 35, 35, 1, 1.48, 0.5, 0, 294, 441, 0, 110, 1.4, 1400, 1400, 0, 0, 0, 0, 0, 0, 0, 0, 235, 353, 88, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 1, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 'icecrown_teleporter'); +INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES +(99322, 0, 0, 0, 0, 0, 22448, 0, 22448, 0, 'IceCrown teleporter', '', NULL, 0, 80, 80, 64200, 64200, 12300, 12300, 9730, 35, 35, 1, 0.5, 0, 294, 441, 0, 110, 1.4, 1400, 1400, 0, 0, 0, 0, 0, 0, 0, 0, 235, 353, 88, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 1, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 'icecrown_teleporter'); REPLACE INTO `locales_creature` values ('99322','IceCrown teleporter','','','','','','','Телепортер цитадели Ледяной короны',NULL,NULL,NULL,NULL,NULL,NULL,NULL,''); DELETE FROM `creature` WHERE `guid` IN (599322,599323,599324,599325,599326,599327,599328,599329,599330); diff --git a/addition/7_mangos_ulduar.sql b/addition/7_mangos_ulduar.sql index a3ccfe05b..7aa06ae63 100644 --- a/addition/7_mangos_ulduar.sql +++ b/addition/7_mangos_ulduar.sql @@ -18,8 +18,8 @@ UPDATE `creature_template` SET `ScriptName`='boss_yogg_saron' WHERE `entry`=3328 UPDATE `creature_template` SET `ScriptName`='boss_algalon' WHERE `entry`=32871; UPDATE `instance_template` SET `script`='instance_ulduar' WHERE `map`=603; -REPLACE INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) -VALUES (99005, 0, 0, 0, 0, 0, 22448, 0, 22448, 0, 'Ulduar teleporter', '', NULL, 0, 80, 80, 64200, 64200, 12300, 12300, 9730, 35, 35, 1, 1.48, 0.5, 0, 294, 441, 0, 110, 1.4, 1400, 1400, 0, 0, 0, 0, 0, 0, 0, 0, 235, 353, 88, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 1, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 'ulduar_teleporter'); +REPLACE INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) +VALUES (99005, 0, 0, 0, 0, 0, 22448, 0, 22448, 0, 'Ulduar teleporter', '', NULL, 0, 80, 80, 64200, 64200, 12300, 12300, 9730, 35, 35, 1, 0.5, 0, 294, 441, 0, 110, 1.4, 1400, 1400, 0, 0, 0, 0, 0, 0, 0, 0, 235, 353, 88, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 1, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 'ulduar_teleporter'); REPLACE INTO `creature_template_addon` (`entry`, `mount`, `bytes1`, `bytes2`, `emote`, `moveflags`, `auras`) VALUES (99005, 0, 0, 0, 0, 0, '48143 0'); REPLACE INTO `locales_creature` values ('99005','Ulduar teleporter','','','','','','','Телепортер Ульдуара',NULL,NULL,NULL,NULL,NULL,NULL,NULL,''); From 494294c8fd3429b2bc0956c99e8ed82845bcf3cc Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Mon, 22 Mar 2010 19:18:42 +0300 Subject: [PATCH 199/405] Change after rewrite logic of TEMP_SPAWN --- .../frozen_halls/halls_of_reflection/boss_falryn.cpp | 2 +- .../frozen_halls/halls_of_reflection/boss_marwyn.cpp | 2 +- .../icecrown_citadel/boss_deathbringer_saurfang.cpp | 8 ++++---- .../icecrown_citadel/boss_lord_marrowgar.cpp | 8 +++++--- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falryn.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falryn.cpp index 90de0da13..bc7756a95 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falryn.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falryn.cpp @@ -156,7 +156,7 @@ struct MANGOS_DLL_DECL boss_falrynAI : public ScriptedAI m_creature->SetVisibility(VISIBILITY_ON); m_creature->SetInCombatWithZone(); } - else CallGuards(TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5000); + else CallGuards(TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60000); m_uiSummon_Timer = MOB_WAVES_DELAY_1; } else m_uiSummon_Timer -= diff; } diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_marwyn.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_marwyn.cpp index 309a1e968..9abedaa40 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_marwyn.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_marwyn.cpp @@ -161,7 +161,7 @@ struct MANGOS_DLL_DECL boss_marwynAI : public ScriptedAI m_creature->SetVisibility(VISIBILITY_ON); m_creature->SetInCombatWithZone(); } - else CallGuards(TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5000); + else CallGuards(TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60000); m_uiSummon_Timer = MOB_WAVES_DELAY_1; } else m_uiSummon_Timer -= diff; } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp index 7965742ad..47f0afad1 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp @@ -157,10 +157,10 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI if (m_uiSummon_Timer < diff) { - CallGuard(NPC_BLOOD_BEASTS, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5000); - CallGuard(NPC_BLOOD_BEASTS, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5000); - if(!Regular) CallGuard(NPC_BLOOD_BEASTS, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5000); - if(!Regular) CallGuard(NPC_BLOOD_BEASTS, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5000); + CallGuard(NPC_BLOOD_BEASTS, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000); + CallGuard(NPC_BLOOD_BEASTS, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000); + if(!Regular) CallGuard(NPC_BLOOD_BEASTS, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000); + if(!Regular) CallGuard(NPC_BLOOD_BEASTS, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000); m_uiSummon_Timer=60000; } else m_uiSummon_Timer -= diff; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp index e618c199b..d8f594455 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp @@ -125,7 +125,7 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI if (m_uiBoneStrike_Timer < diff) { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1)) if (DoCastSpellIfCan(pTarget, SPELL_BONE_STRIKE)) - CallSpike(pTarget, MOB_BONE_SPIKE, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5000); + CallSpike(pTarget, MOB_BONE_SPIKE, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000); m_uiBoneStrike_Timer=urand(17000,29000); } else m_uiBoneStrike_Timer -= diff; break;} @@ -168,7 +168,7 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI } else m_uiSaberLash_Timer -= diff; if (m_uiColdFlame_Timer < diff) { - CallGuard(MOB_COLDFLAME, TEMPSUMMON_TIMED_DESPAWN, 30000); + CallGuard(MOB_COLDFLAME, TEMPSUMMON_TIMED_DESPAWN, 60000); m_uiColdFlame_Timer=urand(10000,30000); } else m_uiColdFlame_Timer -= diff; @@ -257,7 +257,7 @@ struct MANGOS_DLL_DECL mob_bone_spikeAI : public ScriptedAI void Reset() { m_uiRangeCheck_Timer = 1000; - m_creature->SetSpeedRate(MOVE_RUN, 5); + m_creature->SetSpeedRate(MOVE_RUN, 5.0f); _diff = 1000; m_creature->SetInCombatWithZone(); } @@ -303,6 +303,8 @@ struct MANGOS_DLL_DECL mob_bone_spikeAI : public ScriptedAI if (m_uiRangeCheck_Timer < uiDiff) { + if (m_creature->IsWithinDist(m_creature->getVictim(), 1.0f, false)) + m_creature->SetSpeedRate(MOVE_RUN, 0.0f); } else m_uiRangeCheck_Timer -= uiDiff; } From 0aede99d56c4f6c41a0dc0a9e7fa71b8e37c330b Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 25 Mar 2010 19:05:55 +0300 Subject: [PATCH 200/405] Added new class BossSpellWorker and rewrite TOC instance to this class support For tesing! After test phase be added in master branch. --- Makefile.am | 2 + ScriptMgr.cpp | 8 + ScriptMgr.h | 3 + ...rial_of_crusader_spelltable_scriptdev2.sql | 130 +++++ addition/boss_spell_table_scriptdev2.sql | 33 ++ include/sc_boss_spell_worker.cpp | 469 ++++++++++++++++-- include/sc_boss_spell_worker.h | 172 +++++-- .../boss_anubarak_trial.cpp | 153 +++--- .../trial_of_the_crusader/boss_jaraxxus.cpp | 153 ++---- .../boss_northrend_beasts.cpp | 243 ++++----- .../boss_twin_valkyr.cpp | 106 ++-- .../trial_of_the_crusader.h | 4 +- 12 files changed, 967 insertions(+), 509 deletions(-) create mode 100644 addition/724_trial_of_crusader_spelltable_scriptdev2.sql create mode 100644 addition/boss_spell_table_scriptdev2.sql diff --git a/Makefile.am b/Makefile.am index dba3dccc5..3f86bacc3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -47,6 +47,8 @@ include/sc_grid_searchers.cpp \ include/sc_grid_searchers.h \ include/sc_instance.cpp \ include/sc_instance.h \ +include/sc_boss_spell_worker.cpp \ +include/sc_boss_spell_worker.h \ scripts/battlegrounds/battleground.cpp \ scripts/custom/npc_arena_honor.cpp \ scripts/custom/teleguy.cpp \ diff --git a/ScriptMgr.cpp b/ScriptMgr.cpp index 46d5596ab..5ee844c0c 100644 --- a/ScriptMgr.cpp +++ b/ScriptMgr.cpp @@ -17,11 +17,19 @@ Script *m_scripts[MAX_SCRIPTS]; Config SD2Config; +std::string _strSD2DBinfoString; +std::string strSD2DBinfoString() +{ +return _strSD2DBinfoString; +} + void FillSpellSummary(); void LoadDatabase() { + std::string strSD2DBinfo = SD2Config.GetStringDefault("ScriptDev2DatabaseInfo", ""); + _strSD2DBinfoString = strSD2DBinfo; if (strSD2DBinfo.empty()) { diff --git a/ScriptMgr.h b/ScriptMgr.h index f1884dcc7..1b1c9609b 100644 --- a/ScriptMgr.h +++ b/ScriptMgr.h @@ -73,6 +73,9 @@ struct Script //Generic scripting text function void DoScriptText(int32 textEntry, WorldObject* pSource, Unit* target = NULL); +//DB config string +std::string strSD2DBinfoString(); + #if COMPILER == COMPILER_GNU #define FUNC_PTR(name,callconvention,returntype,parameters) typedef returntype(*name)parameters __attribute__ ((callconvention)); #else diff --git a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql new file mode 100644 index 000000000..e69fe320b --- /dev/null +++ b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql @@ -0,0 +1,130 @@ +-- Trial of the crusader spelltable +DELETE FROM `boss_spell_table` WHERE `entry` IN +(34496,34497,34564,34605,34607,34780,34784,34796,34797,34799, 34800, 34813, 34815, 34826, 35144); + +-- Eydis Darkbane +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34496, 64238, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34496, 65768, 67262, 67263, 67264, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34496, 65874, 67256, 67257, 67258, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34496, 65879, 67244, 67245, 67246, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34496, 65916, 67248, 67249, 67250, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34496, 66058, 67182, 67183, 67184, 30000, 0, 0, 0, 90000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34496, 66069, 67309, 67310, 67311, 10000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), +(34496, 67282, 0, 0, 0, 10000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL); + +-- Fjola Lightbane +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34497, 64238, 64238, 64238, 64238, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34497, 65766, 67270, 67271, 67272, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34497, 65858, 67259, 67260, 67261, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34497, 65876, 67306, 67307, 67308, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34497, 65916, 67248, 67249, 67250, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34497, 66046, 67206, 67207, 67208, 30000, 30000, 30000, 30000, 90000, 90000, 90000, 90000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34497, 66075, 67312, 67313, 67314, 10000, 10000, 10000, 10000, 20000, 20000, 20000, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), +(34497, 67297, 67297, 67298, 67298, 10000, 10000, 10000, 10000, 15000, 15000, 15000, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL); + +-- AnubArak +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34564, 26662, 26662, 26662, 26662, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34564, 34605, 0, 0, 0, 90000, 0, 0, 0, 90000, 0, 0, 0, 0, 0, 0, 0, 20.0, 100.0, 0, 0, 0, 0, 9, 1, 0, 0, NULL), +(34564, 34606, 0, 0, 0, 5000, 0, 0, 0, 10000, 0, 0, 0, 0, 0, 0, 0, 10.0, 100.0, 0, 0, 0, 0, 9, 1, 0, 0, NULL), +(34564, 34607, 0, 0, 0, 70000, 0, 0, 0, 90000, 0, 0, 0, 0, 0, 0, 0, 20.0, 100.0, 0, 0, 0, 0, 9, 1, 0, 0, NULL), +(34564, 53421, 53421, 53421, 53421, 45000, 45000, 45000, 45000, 60000, 60000, 60000, 60000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, NULL), +(34564, 65922, 65922, 65922, 65922, 10000, 10000, 10000, 10000, 15000, 15000, 15000, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 1, 0, NULL), +(34564, 66012, 66012, 66012, 66012, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34564, 66013, 67700, 68509, 68510, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34564, 66339, 66339, 66339, 66339, 5000, 5000, 5000, 5000, 10000, 10000, 10000, 10000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0, 0, NULL), +(34564, 67574, 67574, 67574, 67574, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 1, 0, NULL), +(34564, 67630, 68646, 66118, 68647, 10000, 10000, 10000, 10000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 1, 0, NULL), +(34564, 67730, 0, 0, 0, 20000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL); + +-- Anub'arak scarab +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34605, 66092, 66092, 66092, 66092, 5000, 5000, 5000, 5000, 20000, 20000, 20000, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34605, 67861, 66092, 66092, 66092, 5000, 5000, 5000, 5000, 20000, 20000, 20000, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL); + +-- Nerubian Borrower +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34607, 66129, 66129, 66129, 66129, 10000, 10000, 10000, 10000, 20000, 20000, 20000, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL), +(34607, 67322, 67322, 67322, 67322, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, NULL), +(34607, 67847, 67847, 67847, 67847, 5000, 5000, 5000, 5000, 20000, 20000, 20000, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL); + +-- Jaraxxus +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34780, 26662, 26662, 26662, 26662, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34780, 66197, 68123, 68124, 68125, 30000, 30000, 30000, 30000, 45000, 45000, 45000, 45000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34780, 66237, 67049, 67050, 67051, 40000, 40000, 40000, 40000, 90000, 90000, 40000, 90000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34780, 66242, 67060, 67060, 67060, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34780, 66264, 66264, 68405, 68405, 60000, 60000, 60000, 60000, 60000, 60000, 60000, 60000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 1, 0, NULL), +(34780, 66528, 66528, 67029, 67029, 15000, 15000, 15000, 15000, 25000, 25000, 25000, 25000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34780, 66532, 66963, 66964, 66965, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34780, 67108, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34780, 66255, 0, 0, 0, 30000, 0, 0, 0, 45000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34780, 34825, 0, 0, 0, 60000, 0, 0, 0, 60000, 0, 0, 0, 0, 0, 0, 0, 20.0, 80.0, 0, 0, 0, 0, 10, 0, 0, 0, NULL), +(34780, 34813, 0, 0, 0, 60000, 0, 0, 0, 60000, 0, 0, 0, 0, 0, 0, 0, 20.0, 60.0, 0, 0, 0, 0, 10, 0, 0, 0, NULL); + +-- NPC Legion flame +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34784, 66199, 68127, 68126, 68128, 30000, 30000, 30000, 30000, 45000, 45000, 45000, 45000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL); + +-- Gormok +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34796, 34800, 0, 0, 0, 40000, 0, 0, 0, 60000, 0, 0, 0, 0, 0, 0, 0, 40.0, 80.0, 0, 0, 0, 0, 9, 0, 0, 0, NULL), +(34796, 66331, 67477, 67478, 67479, 20000, 0, 0, 0, 40000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34796, 66636, 0, 0, 0, 15000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 1, 0, NULL), +(34796, 67648, 0, 0, 0, 15000, 0, 0, 0, 40000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL); + +-- Icehowl +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34797, 26662, 26662, 26662, 26662, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34797, 66683, 67660, 67661, 67662, 15000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), +(34797, 66689, 67650, 67651, 67652, 25000, 25000, 25000, 25000, 40000, 40000, 40000, 40000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34797, 66734, 66734, 66734, 66734, 30000, 30000, 30000, 30000, 60000, 60000, 60000, 60000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34797, 66770, 67654, 67655, 67656, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), +(34797, 67345, 67663, 67664, 67665, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL); + +-- Dreadscale +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34799, 53421, 0, 0, 0, 40000, 0, 0, 0, 60000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, NULL), +(34799, 66794, 67644, 67645, 67646, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), +(34799, 66796, 67632, 67633, 67634, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34799, 66821, 66821, 66821, 66821, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34799, 66879, 67624, 67625, 67626, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34799, 66902, 67627, 67628, 67629, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), +(34799, 67642, 67642, 67642, 67642, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), +(34799, 68335, 68335, 68335, 68335, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL); + +-- Snobold vassal +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34800, 66313, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), +(34800, 66406, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 1, 0, NULL), +(34800, 66407, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), +(34800, 66408, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), +(34800, 66636, 0, 0, 0, 15000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 1, 0, NULL); + +-- Infernal volcano +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34813, 66255, 0, 0, 0, 30000, 0, 0, 0, 45000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34813, 66258, 0, 0, 0, 20000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, NULL); + +-- Fel infernal +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34815, 66494, 66494, 66494, 66494, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34815, 67047, 67047, 67047, 67047, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL); + +-- Mistress of pain +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34826, 66316, 66316, 66316, 66316, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34826, 67098, 67098, 67098, 67098, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL); + +-- Acidmaw +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(35144, 53421, 0, 0, 0, 40000, 0, 0, 0, 60000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, NULL), +(35144, 66794, 67644, 67645, 67646, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), +(35144, 66819, 66819, 66819, 66819, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(35144, 66824, 67612, 67613, 67614, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), +(35144, 66880, 67606, 67607, 67608, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(35144, 66901, 67615, 67616, 66617, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(35144, 68335, 68335, 68335, 68335, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL); + diff --git a/addition/boss_spell_table_scriptdev2.sql b/addition/boss_spell_table_scriptdev2.sql new file mode 100644 index 000000000..6ceddc255 --- /dev/null +++ b/addition/boss_spell_table_scriptdev2.sql @@ -0,0 +1,33 @@ +DROP TABLE IF EXISTS `boss_spell_table`; +CREATE TABLE IF NOT EXISTS `boss_spell_table` ( + `entry` mediumint(8) NOT NULL DEFAULT '0' COMMENT 'Creature entry', + `spellID_N10` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Spell ID for 10 normal', + `spellID_N25` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Spell ID for 25 normal', + `spellID_H10` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Spell ID for 10 heroic', + `spellID_H25` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Spell ID for 25 heroic', + `timerMin_N10` mediumint(8) unsigned NOT NULL DEFAULT '15000' COMMENT 'Minimum timer for this spell (in ms.) for 10 normal', + `timerMin_N25` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Minimum timer for this spell (in ms.) for 25 normal', + `timerMin_H10` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Minimum timer for this spell (in ms.) for 10 heroic', + `timerMin_H25` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Minimum timer for this spell (in ms.) for 25 heroic', + `timerMax_N10` mediumint(8) unsigned NOT NULL DEFAULT '30000' COMMENT 'Maximum timer for this spell (in ms.) for 10 normal', + `timerMax_N25` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Maximum timer for this spell (in ms.) for 25 normal', + `timerMax_H10` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Maximum timer for this spell (in ms.) for 10 heroic', + `timerMax_H25` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Maximum timer for this spell (in ms.) for 25 heroic', + `data1` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Various INT data for this spell or summon for 10 normal', + `data2` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Various INT data for this spell for 25 normal', + `data3` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Various INT data for this spell for 10 heroic', + `data4` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Various INT data for this spell for 25 heroic', + `locData_x` float NOT NULL DEFAULT '0' COMMENT 'Location X data for this spell', + `locData_y` float NOT NULL DEFAULT '0' COMMENT 'Location Y data for this spell', + `locData_z` float NOT NULL DEFAULT '0' COMMENT 'Location Z data for this spell', + `varData` mediumint(8) NOT NULL DEFAULT '0' COMMENT 'Special data field for this spell (basepoint for Aura, for example)', + `StageMask_N` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Stage mask for this spell (don\'t used now)', + `StageMask_H` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Stage mask for this spell - heroic mode (don\'t used now)', + `CastType` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Type of cast (by enum BossSpellTableParameters)', + `isVisualEffect` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT 'Is spell is Visual effect only', + `isBugged` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT 'Is spell bugged and need override', + `textEntry` mediumint(8) NOT NULL DEFAULT '0' COMMENT 'Text from script_texts for this spell casting', + `comment` text, + PRIMARY KEY (`entry`,`spellID_N10`,`CastType`), + INDEX `idx_entry`(`entry`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT 'Boss spell table by /dev/rsa'; diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index 018f28f3f..1af1bfc92 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -1,105 +1,472 @@ /* Copyright (C) 2009 - 2010 by /dev/rsa for ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ - +#include "sc_boss_spell_worker.h" #ifdef DEF_BOSS_SPELL_WORKER_H - bool QuerySpellPeriod(uint32 m_uiSpellIdx, uint32 diff) +extern DatabaseType SD2Database; + +BossSpellWorker::BossSpellWorker(ScriptedAI* bossAI) +{ + boss = bossAI->m_creature; + bossID = boss->GetEntry(); + bossSpellCount = 0; + currentTarget = NULL; + currentDifficulty = RAID_DIFFICULTY_10MAN_NORMAL; + memset(&m_uiSpell_Timer, 0, sizeof(m_uiSpell_Timer)); + memset(&m_BossSpell,0,sizeof(m_BossSpell)); + debug_log("BSW: Initializing BossSpellWorker object"); + LoadSpellTable(); +}; + +void BossSpellWorker::Reset(uint8 _Difficulty) +{ + currentDifficulty = setDifficulty(_Difficulty); + for (uint8 i = 0; i < bossSpellCount; ++i) + if (m_BossSpell[i].m_uiSpellTimerMin[currentDifficulty] != m_BossSpell[i].m_uiSpellTimerMax[currentDifficulty]) + m_uiSpell_Timer[i] = urand(0,m_BossSpell[i].m_uiSpellTimerMax[currentDifficulty]); + else m_uiSpell_Timer[i] = m_BossSpell[i].m_uiSpellTimerMin[currentDifficulty]; +}; + +void BossSpellWorker::LoadSpellTable() +{ + DatabaseType SD2Database; + std::string strSD2DBinfo = strSD2DBinfoString(); + + if (strSD2DBinfo.empty()) { - if(!m_pInstance) return false; - bool result; + error_log("BSW: Missing Scriptdev2 database info from configuration file. Load database aborted."); + return; + } + + //Initialize connection to DB + if (SD2Database.Initialize(strSD2DBinfo.c_str())) + { + + debug_log("BSW: Loading table of spells boss %u difficulty %u", bossID , currentDifficulty); +// QueryResult* Result = SD2Database.PQuery("SELECT entry, spellID_N10, spellID_N25, spellID_H10, spellID_H25, timerMin_N10, timerMin_N25, timerMin_H10, timerMin_H25, timerMax_N10, timerMax_N25, timerMax_H10, timerMax_H25, StageMask_N, StageMask_H, CastType, isVisualEffect, isBugged FROM boss_spell_table WHERE entry = '%u'", bossID); + QueryResult* Result = SD2Database.PQuery( "SELECT " + "entry, " + "spellID_N10, " + "spellID_N25, " + "spellID_H10, " + "spellID_H25, " + "timerMin_N10, " + "timerMin_N25, " + "timerMin_H10, " + "timerMin_H25, " + "timerMax_N10, " + "timerMax_N25, " + "timerMax_H10, " + "timerMax_H25, " + "data1, " + "data2, " + "data3, " + "data4, " + "locData_x, " + "locData_y, " + "locData_z, " + "varData, " + "StageMask_N, " + "StageMask_H, " + "CastType, " + "isVisualEffect, " + "isBugged, " + "textEntry " + "FROM boss_spell_table " + "WHERE entry = '%u'", bossID); + if (Result) + { + uint32 uiCount = 0; + do + { + Field* pFields = Result->Fetch(); + + m_BossSpell[uiCount].id = uiCount; + + int32 bossEntry = pFields[0].GetInt32(); + + for (uint8 j = 0; j < DIFFICULTY_LEVELS; ++j) + m_BossSpell[uiCount].m_uiSpellEntry[j] = pFields[1+j].GetUInt32(); + + for (uint8 j = 0; j < DIFFICULTY_LEVELS; ++j) + m_BossSpell[uiCount].m_uiSpellTimerMin[j] = pFields[1+DIFFICULTY_LEVELS+j].GetUInt32(); + + for (uint8 j = 0; j < DIFFICULTY_LEVELS; ++j) + m_BossSpell[uiCount].m_uiSpellTimerMax[j] = pFields[1+DIFFICULTY_LEVELS*2+j].GetUInt32(); + + for (uint8 j = 0; j < DIFFICULTY_LEVELS; ++j) + m_BossSpell[uiCount].m_uiSpellData[j] = pFields[1+DIFFICULTY_LEVELS*3+j].GetUInt32(); + + m_BossSpell[uiCount].LocData.x = pFields[1+DIFFICULTY_LEVELS*4].GetFloat(); + m_BossSpell[uiCount].LocData.y = pFields[2+DIFFICULTY_LEVELS*4].GetFloat(); + m_BossSpell[uiCount].LocData.z = pFields[3+DIFFICULTY_LEVELS*4].GetFloat(); + + m_BossSpell[uiCount].varData = pFields[4+DIFFICULTY_LEVELS*4].GetInt32(); + + m_BossSpell[uiCount].StageMaskN = pFields[5+DIFFICULTY_LEVELS*4].GetUInt32(); + m_BossSpell[uiCount].StageMaskH = pFields[6+DIFFICULTY_LEVELS*4].GetUInt32(); + + m_BossSpell[uiCount].m_CastTarget = getBSWCastType(pFields[7+DIFFICULTY_LEVELS*4].GetUInt8()); + + m_BossSpell[uiCount].m_IsVisualEffect = (pFields[8+DIFFICULTY_LEVELS*4].GetUInt8() == 0) ? true : false ; + + m_BossSpell[uiCount].m_IsBugged = (pFields[9+DIFFICULTY_LEVELS*4].GetUInt8() == 0) ? true : false ; + + m_BossSpell[uiCount].textEntry = pFields[10+DIFFICULTY_LEVELS*4].GetInt32(); + + if (bossEntry != bossID) error_db_log("BSW: Unknown error while load boss_spell_table"); + ++uiCount; + } while (Result->NextRow()); + + bossSpellCount = uiCount; + + delete Result; + _fillEmptyDataField(); + debug_log("BSW: Loaded %u boss spell data records for boss %u", uiCount, bossID); + } + else + { + error_db_log("BSW: Boss spell table for boss %u is empty.", bossID); + bossSpellCount = 0; + } + } + else + { + error_log("BSW: Unable to connect to Database. Load database aborted."); + return; + } + + SD2Database.HaltDelayThread(); +} + +bool BossSpellWorker::_QuerySpellPeriod(uint8 m_uiSpellIdx, uint32 diff) + { + if (bossSpellCount == 0) return false; SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; - if (m_uiSpellIdx != pSpell->id) return false; - if (m_uiSpell_Timer[m_uiSpellIdx] < diff) { - m_uiSpell_Timer[m_uiSpellIdx]=urand(pSpell->m_uiSpellTimerMin[Difficulty],pSpell->m_uiSpellTimerMax[Difficulty]); - result = true; + if (m_uiSpell_Timer[m_uiSpellIdx] < diff) { + m_uiSpell_Timer[m_uiSpellIdx]=urand(pSpell->m_uiSpellTimerMin[currentDifficulty],pSpell->m_uiSpellTimerMax[currentDifficulty]); + return true; } else { m_uiSpell_Timer[m_uiSpellIdx] -= diff; - result = false; + return false; }; - return result; - } + }; - CanCastResult CastBossSpell(uint32 m_uiSpellIdx, BossSpellFlag spellfag = CAST_NORMAL) +CanCastResult BossSpellWorker::_BSWSpellSelector(uint8 m_uiSpellIdx, Unit* pTarget) { - if(!m_pInstance) return CAST_FAIL_OTHER; - Unit* pTarget = NULL; - Creature* pSummon = NULL; + if (bossSpellCount == 0) return CAST_FAIL_OTHER; SpellEntry const *spell; - bool isSummon = false; - float fPosX, fPosY, fPosZ; - int32 bp = 8; SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; - // Find spell index - temporary direct insert from spelltable - if (m_uiSpellIdx != pSpell->id) return CAST_FAIL_OTHER; + Unit* pSummon = NULL; + +// debug_log("BSW: Casting (after select) spell number %u type %u",m_uiSpellIdx, pSpell->m_CastTarget); switch (pSpell->m_CastTarget) { + case CAST_ON_SELF: - pTarget = m_creature; + return _DoCastSpellIfCan(boss, pSpell->m_uiSpellEntry[currentDifficulty]); break; + case CAST_ON_SUMMONS: - pTarget = m_creature->getVictim(); //CHANGE IT!!! + return CAST_FAIL_OTHER; break; + case CAST_ON_VICTIM: - pTarget = m_creature->getVictim(); + pTarget = boss->getVictim(); + if (pTarget) return _DoCastSpellIfCan(boss->getVictim(), pSpell->m_uiSpellEntry[currentDifficulty]); break; + case CAST_ON_TARGET: - pTarget = currentTarget; - if (!pTarget) pTarget = m_creature->getVictim(); + if (!pTarget) pTarget = boss->getVictim(); + if (pTarget) return _DoCastSpellIfCan(pTarget, pSpell->m_uiSpellEntry[currentDifficulty]); break; + case CAST_ON_RANDOM: - pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); + pTarget = SelectUnit(SELECT_TARGET_RANDOM); + if (!pTarget) pTarget = boss->getVictim(); + if (pTarget) return _DoCastSpellIfCan(pTarget, pSpell->m_uiSpellEntry[currentDifficulty]); break; + case CAST_ON_BOTTOMAGGRO: pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1); + if (!pTarget) pTarget = boss->getVictim(); + if (pTarget) return _DoCastSpellIfCan(pTarget, pSpell->m_uiSpellEntry[currentDifficulty]); break; + case APPLY_AURA_SELF: - if (spell = (SpellEntry *)GetSpellStore()->LookupEntry(pSpell->m_uiSpellEntry[Difficulty])) - m_creature->AddAura(new BossAura(spell, EFFECT_INDEX_0, &bp, m_creature, m_creature)); + if (spell = (SpellEntry *)GetSpellStore()->LookupEntry(pSpell->m_uiSpellEntry[currentDifficulty])) + if(boss->AddAura(new BossAura(spell, EFFECT_INDEX_0, &pSpell->varData, boss, boss))) return CAST_OK; + else return CAST_FAIL_OTHER; break; case APPLY_AURA_TARGET: - pTarget = currentTarget; - if (!pTarget) pTarget = m_creature->getVictim(); - if (spell = (SpellEntry *)GetSpellStore()->LookupEntry(pSpell->m_uiSpellEntry[Difficulty])) - pTarget->AddAura(new BossAura(spell, EFFECT_INDEX_0, &bp, pTarget, pTarget)); + if (!pTarget) return CAST_FAIL_OTHER; + if (spell = (SpellEntry *)GetSpellStore()->LookupEntry(pSpell->m_uiSpellEntry[currentDifficulty])) + if (pTarget->AddAura(new BossAura(spell, EFFECT_INDEX_0, &pSpell->varData, pTarget, pTarget))) return CAST_OK; + else return CAST_FAIL_OTHER; break; case SUMMON_NORMAL: - isSummon = true; - m_creature->GetPosition(fPosX, fPosY, fPosZ); - m_creature->GetRandomPoint(fPosX, fPosY, fPosZ, urand(30, 60), fPosX, fPosY, fPosZ); - pSummon = m_creature->SummonCreature(pSpell->m_uiSpellEntry[Difficulty], fPosX, fPosY, fPosZ, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000); - if(pSummon) pSummon->SetInCombatWithZone(); + pSummon = _doSummon(m_uiSpellIdx, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000); + if(pSummon) return CAST_OK; + else return CAST_FAIL_OTHER; break; case SUMMON_TEMP: - isSummon = true; - m_creature->GetPosition(fPosX, fPosY, fPosZ); - m_creature->GetRandomPoint(fPosX, fPosY, fPosZ, urand(30, 60), fPosX, fPosY, fPosZ); - pSummon = m_creature->SummonCreature(pSpell->m_uiSpellEntry[Difficulty], fPosX, fPosY, fPosZ, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, - urand(pSpell->m_uiSpellTimerMin[Difficulty],pSpell->m_uiSpellTimerMax[Difficulty])); - if(pSummon) pSummon->SetInCombatWithZone(); + pSummon = _doSummon(m_uiSpellIdx, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, + urand(pSpell->m_uiSpellTimerMin[currentDifficulty],pSpell->m_uiSpellTimerMax[currentDifficulty])); + if(pSummon) return CAST_OK; + else return CAST_FAIL_OTHER; break; case SUMMON_INSTANT: - isSummon = true; - m_creature->GetPosition(fPosX, fPosY, fPosZ); - m_creature->GetRandomPoint(fPosX, fPosY, fPosZ, urand(30, 60), fPosX, fPosY, fPosZ); - pSummon = m_creature->SummonCreature(pSpell->m_uiSpellEntry[Difficulty], fPosX, fPosY, fPosZ, 0, TEMPSUMMON_MANUAL_DESPAWN,0); + pSummon = _doSummon(m_uiSpellIdx, TEMPSUMMON_MANUAL_DESPAWN,0); + if(pSummon) return CAST_OK; + else return CAST_FAIL_OTHER; break; default: return CAST_FAIL_OTHER; }; - currentTarget = pTarget; - if (pTarget && !isSummon && !pSpell->m_IsBugged) return DoCastSpellIfCan(pTarget,pSpell->m_uiSpellEntry[Difficulty]); - else if (pTarget && !isSummon && pSpell->m_IsBugged) {DoCast(pTarget,pSpell->m_uiSpellEntry[Difficulty]); return CAST_OK;} - else if (isSummon) return pSummon ? CAST_OK : CAST_FAIL_OTHER; + return CAST_FAIL_OTHER; + }; + +bool BossSpellWorker::isSummon(uint8 m_uiSpellIdx) +{ + if (bossSpellCount == 0) return false; + + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + switch (pSpell->m_CastTarget) { + case SUMMON_NORMAL: + case SUMMON_TEMP: + case SUMMON_INSTANT: + return true; + default: return false; + }; +}; + +uint8 BossSpellWorker::FindSpellIDX(uint32 SpellID) +{ + if (bossSpellCount != 0) + for(uint8 i = 0; i < bossSpellCount; ++i) + if (m_BossSpell[i].m_uiSpellEntry[RAID_DIFFICULTY_10MAN_NORMAL] == SpellID) return i; + + error_log("BSW: spell not found in spelltable. Memory error?"); + return SPELL_INDEX_ERROR; +} + +Difficulty BossSpellWorker::setDifficulty(uint8 _Difficulty) +{ +switch (_Difficulty) { + case 0: return RAID_DIFFICULTY_10MAN_NORMAL; + case 1: return RAID_DIFFICULTY_25MAN_NORMAL; + case 2: return RAID_DIFFICULTY_10MAN_HEROIC; + case 3: return RAID_DIFFICULTY_25MAN_HEROIC; + default: return RAID_DIFFICULTY_10MAN_NORMAL; + }; +} + +BossSpellTableParameters BossSpellWorker::getBSWCastType(uint32 pTemp) +{ + switch (pTemp) { + case 0: return DO_NOTHING; + case 1: return CAST_ON_SELF; + case 2: return CAST_ON_SUMMONS; + case 3: return CAST_ON_VICTIM; + case 4: return CAST_ON_RANDOM; + case 5: return CAST_ON_BOTTOMAGGRO; + case 6: return CAST_ON_TARGET; + case 7: return APPLY_AURA_SELF; + case 8: return APPLY_AURA_TARGET; + case 9: return SUMMON_NORMAL; + case 10: return SUMMON_INSTANT; + case 11: return SUMMON_TEMP; + case 12: return SPELLTABLEPARM_NUMBER; + default: return DO_NOTHING; + }; +}; + +CanCastResult BossSpellWorker::_BSWDoCast(uint8 m_uiSpellIdx, Unit* pTarget) +{ + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + boss->CastSpell(pTarget, pSpell->m_uiSpellEntry[currentDifficulty], false); +}; + +void BossSpellWorker::_fillEmptyDataField() +{ + for (uint8 i = 0; i < bossSpellCount; ++i) + for (uint8 j = 1; j < DIFFICULTY_LEVELS; ++j) + { + if (m_BossSpell[i].m_uiSpellEntry[j] == 0) + m_BossSpell[i].m_uiSpellEntry[j] = m_BossSpell[i].m_uiSpellEntry[j-1]; + + if (m_BossSpell[i].m_uiSpellTimerMin[j] == 0) + m_BossSpell[i].m_uiSpellTimerMin[j] = m_BossSpell[i].m_uiSpellTimerMin[j-1]; + + if (m_BossSpell[i].m_uiSpellTimerMax[j] == 0) + m_BossSpell[i].m_uiSpellTimerMax[j] = m_BossSpell[i].m_uiSpellTimerMax[j-1]; + + if (m_BossSpell[i].m_uiSpellData[j] == 0) + m_BossSpell[i].m_uiSpellData[j] = m_BossSpell[i].m_uiSpellData[j-1]; + }; +}; + +Unit* BossSpellWorker::_doSummon(uint8 m_uiSpellIdx, TempSummonType summontype, uint32 delay) +{ + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + + if (pSpell->LocData.z <= 1.0f) { + float fPosX, fPosY, fPosZ; + boss->GetPosition(fPosX, fPosY, fPosZ); + boss->GetRandomPoint(fPosX, fPosY, fPosZ, urand(pSpell->LocData.x, pSpell->LocData.y), fPosX, fPosY, fPosZ); + return boss->SummonCreature(pSpell->m_uiSpellEntry[currentDifficulty], fPosX, fPosY, fPosZ, 0, summontype, delay); + } else return boss->SummonCreature(pSpell->m_uiSpellEntry[currentDifficulty], pSpell->LocData.x, pSpell->LocData.y, pSpell->LocData.z, 0, summontype, delay); +}; + +bool BossSpellWorker::_doRemove(uint8 m_uiSpellIdx, Unit* pTarget) +{ + if (!pTarget) pTarget = boss; + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + + if (pTarget) { + if (pTarget->isAlive()) { + if ( pTarget->HasAura(pSpell->m_uiSpellEntry[currentDifficulty]) && + pTarget->GetAura(pSpell->m_uiSpellEntry[currentDifficulty], EFFECT_INDEX_0)->GetStackAmount() > 1) { + if (pTarget->GetAura(pSpell->m_uiSpellEntry[currentDifficulty], EFFECT_INDEX_0)->modStackAmount(-1)) + return true; + else return false; + } + else pTarget->RemoveAurasDueToSpell(pSpell->m_uiSpellEntry[currentDifficulty]); + } + else pTarget->RemoveAurasDueToSpell(pSpell->m_uiSpellEntry[currentDifficulty]); + } + return true; +}; + +// Copypasting from CreatureAI.cpp. if this called from bossAI-> crashed :( + +CanCastResult BossSpellWorker::_CanCastSpell(Unit* pTarget, const SpellEntry *pSpell, bool isTriggered) +{ + // If not triggered, we check + if (!isTriggered) + { + // State does not allow + if (boss->hasUnitState(UNIT_STAT_CAN_NOT_REACT)) + return CAST_FAIL_STATE; + + if (pSpell->PreventionType == SPELL_PREVENTION_TYPE_SILENCE && boss->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SILENCED)) + return CAST_FAIL_STATE; + + if (pSpell->PreventionType == SPELL_PREVENTION_TYPE_PACIFY && boss->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PACIFIED)) + return CAST_FAIL_STATE; + + // Check for power (also done by Spell::CheckCast()) + if (boss->GetPower((Powers)pSpell->powerType) < pSpell->manaCost) + return CAST_FAIL_POWER; + } + + if (const SpellRangeEntry *pSpellRange = sSpellRangeStore.LookupEntry(pSpell->rangeIndex)) + { + if (pTarget != boss) + { + // pTarget is out of range of this spell (also done by Spell::CheckCast()) + float fDistance = boss->GetCombatDistance(pTarget); + + if (fDistance > (boss->IsHostileTo(pTarget) ? pSpellRange->maxRange : pSpellRange->maxRangeFriendly)) + return CAST_FAIL_TOO_FAR; + + float fMinRange = boss->IsHostileTo(pTarget) ? pSpellRange->minRange : pSpellRange->minRangeFriendly; + + if (fMinRange && fDistance < fMinRange) + return CAST_FAIL_TOO_CLOSE; + } + + return CAST_OK; + } + else + return CAST_FAIL_OTHER; +} + +CanCastResult BossSpellWorker::_DoCastSpellIfCan(Unit* pTarget, uint32 uiSpell, uint32 uiCastFlags, uint64 uiOriginalCasterGUID) +{ + Unit* pCaster = boss; + + if (uiCastFlags & CAST_FORCE_TARGET_SELF) + pCaster = pTarget; + + // Allowed to cast only if not casting (unless we interrupt ourself) or if spell is triggered + if (!pCaster->IsNonMeleeSpellCasted(false) || (uiCastFlags & (CAST_TRIGGERED | CAST_INTERRUPT_PREVIOUS))) + { + if (const SpellEntry* pSpell = sSpellStore.LookupEntry(uiSpell)) + { + // If cast flag CAST_AURA_NOT_PRESENT is active, check if target already has aura on them + if (uiCastFlags & CAST_AURA_NOT_PRESENT) + { + if (pTarget->HasAura(uiSpell)) + return CAST_FAIL_TARGET_AURA; + } + + // Check if cannot cast spell + if (!(uiCastFlags & (CAST_FORCE_TARGET_SELF | CAST_FORCE_CAST))) + { + CanCastResult castResult = _CanCastSpell(pTarget, pSpell, uiCastFlags & CAST_TRIGGERED); + + if (castResult != CAST_OK) + return castResult; + } + + // Interrupt any previous spell + if (uiCastFlags & CAST_INTERRUPT_PREVIOUS && pCaster->IsNonMeleeSpellCasted(false)) + pCaster->InterruptNonMeleeSpells(false); + + pCaster->CastSpell(pTarget, pSpell, uiCastFlags & CAST_TRIGGERED, NULL, NULL, uiOriginalCasterGUID); + return CAST_OK; + } + else + { + sLog.outErrorDb("DoCastSpellIfCan by creature entry %u attempt to cast spell %u but spell does not exist.", boss->GetEntry(), uiSpell); return CAST_FAIL_OTHER; + } + } + else + return CAST_FAIL_IS_CASTING; +} + +// Copypasting from sc_creature.cpp :( Hung if call from bossAI-> + +Unit* BossSpellWorker::_SelectUnit(SelectAggroTarget target, uint32 uiPosition) +{ + //ThreatList m_threatlist; + ThreatList const& threatlist = boss->getThreatManager().getThreatList(); + ThreatList::const_iterator itr = threatlist.begin(); + ThreatList::const_reverse_iterator ritr = threatlist.rbegin(); + + if (uiPosition >= threatlist.size() || threatlist.empty()) + return NULL; + + switch (target) + { + case SELECT_TARGET_RANDOM: + advance(itr, uiPosition + (rand() % (threatlist.size() - uiPosition))); + return Unit::GetUnit((*boss),(*itr)->getUnitGuid()); + break; + + case SELECT_TARGET_TOPAGGRO: + advance(itr, uiPosition); + return Unit::GetUnit((*boss),(*itr)->getUnitGuid()); + break; + + case SELECT_TARGET_BOTTOMAGGRO: + advance(ritr, uiPosition); + return Unit::GetUnit((*boss),(*ritr)->getUnitGuid()); + break; } + return NULL; +} + #endif \ No newline at end of file diff --git a/include/sc_boss_spell_worker.h b/include/sc_boss_spell_worker.h index 3cfc6dfec..cf3a669eb 100644 --- a/include/sc_boss_spell_worker.h +++ b/include/sc_boss_spell_worker.h @@ -2,75 +2,183 @@ * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ +#include "Player.h" +#include "SpellAuras.h" +#include "Unit.h" +#include "precompiled.h" +#include "Database/DatabaseEnv.h" +#include "ScriptMgr.h" + #ifndef DEF_BOSS_SPELL_WORKER_H #define DEF_BOSS_SPELL_WORKER_H + enum { DIFFICULTY_LEVELS = 4, + MAX_BOSS_SPELLS = 16, + SPELL_INDEX_ERROR = 255, +}; + +enum BossSpellFlag +{ + CAST_NORMAL, + CAST_REMOVE, + CAST_OVERRIDE, + SPELLFLAG_NUMBER +}; + +enum BossSpellTableParameters +{ + DO_NOTHING = 0, + CAST_ON_SELF = 1, + CAST_ON_SUMMONS = 2, + CAST_ON_VICTIM = 3, + CAST_ON_RANDOM = 4, + CAST_ON_BOTTOMAGGRO = 5, + CAST_ON_TARGET = 6, + APPLY_AURA_SELF = 7, + APPLY_AURA_TARGET = 8, + SUMMON_NORMAL = 9, + SUMMON_INSTANT = 10, + SUMMON_TEMP = 11, + SPELLTABLEPARM_NUMBER }; struct Locations { float x, y, z; - uint32 id; + int32 id; }; struct WayPoints { - WayPoints(uint32 _id, float _x, float _y, float _z) + WayPoints(int32 _id, float _x, float _y, float _z) { id = _id; x = _x; y = _y; z = _z; } - uint32 id; + int32 id; float x, y, z; }; -enum BossSpellFlag -{ - CAST_NORMAL, - CAST_REMOVE, - CAST_OVERRIDE, - SPELLFLAG_NUMBER -}; - -enum BossSpellTableParameters -{ - CAST_ON_SELF, - CAST_ON_SUMMONS, - CAST_ON_VICTIM, - CAST_ON_RANDOM, - CAST_ON_BOTTOMAGGRO, - CAST_ON_TARGET, - APPLY_AURA_SELF, - APPLY_AURA_TARGET, - SUMMON_NORMAL, - SUMMON_INSTANT, - SUMMON_TEMP, - SPELLTABLEPARM_NUMBER -}; - - - struct SpellTable { uint32 id; uint32 m_uiSpellEntry[DIFFICULTY_LEVELS]; // Stores spell entry for difficulty levels uint32 m_uiSpellTimerMin[DIFFICULTY_LEVELS]; // The timer (min) before the next spell casting, in milliseconds uint32 m_uiSpellTimerMax[DIFFICULTY_LEVELS]; // The timer (max) before the next spell casting - uint32 m_uiStageMask; // The mask of stages where spell is casted + uint32 m_uiSpellData[DIFFICULTY_LEVELS]; // Additional data for spell casting or summon + Locations LocData; // Float data structure for locations + int32 varData; // Additional data for spell + uint32 StageMaskN; // Stage mask for this spell (normal) + uint32 StageMaskH; // Stage mask for this spell (heroic) BossSpellTableParameters m_CastTarget; // Target on casting spell bool m_IsVisualEffect; // Spellcasting is visual effect or real effect bool m_IsBugged; // Need override for this spell + int32 textEntry; // Text entry from script_text for this spell }; class MANGOS_DLL_DECL BossAura : public Aura { public: - BossAura(const SpellEntry *spell, SpellEffectIndex eff, int32 *bp, Unit *target, Unit *caster) : Aura(spell, eff, bp, target, caster, NULL) + BossAura(const SpellEntry *spell, SpellEffectIndex effect, int32 *basepoints, Unit *target, Unit *caster) : Aura(spell, effect, basepoints, target, caster, NULL) {} }; -#endif +class MANGOS_DLL_DECL BossSpellWorker +{ + public: + explicit BossSpellWorker(ScriptedAI* bossAI); + ~BossSpellWorker(); + + Unit* currentTarget; + + void Reset(uint8 _Difficulty = 0); + + bool timedQuery(uint32 SpellID, uint32 diff) + { + return _QuerySpellPeriod(FindSpellIDX(SpellID), diff); + }; + + bool timedCast(uint32 SpellID, uint32 diff) + { + uint8 m_uiSpellIdx = FindSpellIDX(SpellID); + if (!_QuerySpellPeriod(FindSpellIDX(SpellID), diff)) return false; + else _BSWSpellSelector(m_uiSpellIdx); + return true; + }; + + CanCastResult doCast(uint32 SpellID, Unit* pTarget = NULL) + { uint8 m_uiSpellIdx = FindSpellIDX(SpellID); + if ( m_uiSpellIdx != SPELL_INDEX_ERROR) return _BSWSpellSelector(m_uiSpellIdx, pTarget); + else return CAST_FAIL_OTHER; + }; + + bool doRemove(uint32 SpellID, Unit* pTarget = NULL) + { + return _doRemove(FindSpellIDX(SpellID),pTarget); + }; + + Unit* doSummon(uint32 SpellID, TempSummonType type = TEMPSUMMON_CORPSE_TIMED_DESPAWN, uint32 delay = 60000) + { + return _doSummon(FindSpellIDX(SpellID), type, delay); + }; + + CanCastResult BSWSpellSelector(uint32 SpellID, Unit* pTarget = NULL) + { + return _BSWSpellSelector(FindSpellIDX(SpellID), pTarget); + }; + + CanCastResult BSWDoCast(uint32 SpellID, Unit* pTarget) + { + return _BSWDoCast(FindSpellIDX(SpellID), pTarget); + }; + + Unit* SelectUnit(SelectAggroTarget target = SELECT_TARGET_RANDOM, uint32 uiPosition = 0) + { + return _SelectUnit(target, uiPosition); + }; + + private: + + BossSpellTableParameters getBSWCastType(uint pTemp); + + uint8 FindSpellIDX(uint32 SpellID); + + void LoadSpellTable(); + + bool isSummon(uint8 m_uiSpellIdx); + + Unit* _doSummon(uint8 m_uiSpellIdx, TempSummonType type = TEMPSUMMON_CORPSE_TIMED_DESPAWN, uint32 delay = 60000); + + CanCastResult _BSWDoCast(uint8 m_uiSpellIdx, Unit* pTarget); + + CanCastResult _BSWSpellSelector(uint8 m_uiSpellIdx, Unit* pTarget = NULL); + + Difficulty setDifficulty(uint8 _Difficulty = 0); + + bool _QuerySpellPeriod(uint8 m_uiSpellIdx, uint32 diff); + + CanCastResult _DoCastSpellIfCan(Unit* pTarget, uint32 uiSpell, uint32 uiCastFlags = 0, uint64 uiOriginalCasterGUID = 0); + + CanCastResult _CanCastSpell(Unit* pTarget, const SpellEntry *pSpell, bool isTriggered = false); + + Unit* _SelectUnit(SelectAggroTarget target, uint32 uiPosition); + + bool _doRemove(uint8 m_uiSpellIdx, Unit* pTarget = NULL); + + void _fillEmptyDataField(); + +// Constants from CreatureAI() + ScriptedAI* bossAI; + Creature* boss; + uint32 bossID; + uint8 bossSpellCount; + Difficulty currentDifficulty; + uint32 m_uiSpell_Timer[MAX_BOSS_SPELLS]; + SpellTable m_BossSpell[MAX_BOSS_SPELLS]; +}; + +#endif \ No newline at end of file diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp index b55799249..375d21198 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp @@ -38,45 +38,23 @@ enum Summons enum BossSpells { - SPELL_COLD, - SPELL_MARK, - SPELL_LEECHING_SWARM, - SPELL_IMPALE, - SPELL_POUND, - SPELL_SHOUT, - SPELL_SUBMERGE_0, - SPELL_SUBMERGE_1, - SPELL_SUMMON_BEATLES, - SPELL_DETERMINATION, - SPELL_ACID_MANDIBLE, - SPELL_SPIDER_FRENZY, - SPELL_EXPOSE_WEAKNESS, - SUMMON_SCARAB, - SUMMON_BORROWER, - SUMMON_FROSTSPHERE, - SPELL_BERSERK, - BOSS_SPELL_COUNT -}; -static SpellTable m_BossSpell[]= -{ -// Name 10 25 10H 25H -{SPELL_COLD, 66013, 67700, 68509, 68510, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_MARK, 67574, 67574, 67574, 67574, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_TARGET, false, true}, -{SPELL_LEECHING_SWARM, 67630, 68646, 66118, 68647, 10000, 10000, 10000, 10000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, true}, -{SPELL_IMPALE, 65922, 65922, 65922, 65922, 10000, 10000, 10000, 10000, 15000, 15000, 15000, 15000, 65535, CAST_ON_RANDOM, false, true}, -{SPELL_POUND, 66012, 66012, 66012, 66012, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_SHOUT, 67730, 67730, 67730, 67730, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_SUBMERGE_0, 53421, 53421, 53421, 53421, 45000, 45000, 45000, 45000, 60000, 60000, 60000, 60000, 65535, CAST_ON_SELF, true, false}, -{SPELL_SUBMERGE_1, 67322, 67322, 67322, 67322, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, true, true}, -{SPELL_SUMMON_BEATLES, 66339, 66339, 66339, 66339, 5000, 5000, 5000, 5000, 10000, 10000, 10000, 10000, 65535, CAST_ON_RANDOM, true, false}, -{SPELL_DETERMINATION, 66092, 66092, 66092, 66092, 5000, 5000, 5000, 5000, 20000, 20000, 20000, 20000, 65535, CAST_ON_SELF, false, false}, -{SPELL_ACID_MANDIBLE, 67861, 66092, 66092, 66092, 5000, 5000, 5000, 5000, 20000, 20000, 20000, 20000, 65535, CAST_ON_VICTIM, false, false}, -{SPELL_SPIDER_FRENZY, 66129, 66129, 66129, 66129, 10000, 10000, 10000, 10000, 20000, 20000, 20000, 20000, 65535, CAST_ON_TARGET, false, false}, -{SPELL_EXPOSE_WEAKNESS, 67847, 67847, 67847, 67847, 5000, 5000, 5000, 5000, 20000, 20000, 20000, 20000, 65535, CAST_ON_VICTIM, false, false}, -{SUMMON_SCARAB, NPC_SCARAB, NPC_SCARAB, NPC_SCARAB, NPC_SCARAB, 90000, 90000, 90000, 90000, 90000, 90000, 90000, 90000, 65535, SUMMON_NORMAL, true, false}, -{SUMMON_BORROWER, NPC_BURROWER, NPC_BURROWER, NPC_BURROWER, NPC_BURROWER, 70000, 70000, 70000, 70000, 100000, 100000, 100000, 100000, 65535, SUMMON_NORMAL, true, false}, -{SUMMON_FROSTSPHERE, NPC_FROST_SPHERE, NPC_FROST_SPHERE, NPC_FROST_SPHERE, NPC_FROST_SPHERE, 5000, 5000, 5000, 5000, 10000, 10000, 10000, 10000, 65535, SUMMON_NORMAL, true, false}, -{SPELL_BERSERK, 26662, 26662, 26662, 26662, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 65535, CAST_ON_SELF, false, false}, +SPELL_COLD = 66013, +SPELL_MARK = 67574, +SPELL_LEECHING_SWARM = 67630, +SPELL_IMPALE = 65922, +SPELL_POUND = 66012, +SPELL_SHOUT = 67730, +SPELL_SUBMERGE_0 = 53421, +SPELL_SUBMERGE_1 = 67322, +SPELL_SUMMON_BEATLES = 66339, +SPELL_DETERMINATION = 66092, +SPELL_ACID_MANDIBLE = 67861, +SPELL_SPIDER_FRENZY = 66129, +SPELL_EXPOSE_WEAKNESS = 67847, +SUMMON_SCARAB = NPC_SCARAB, +SUMMON_BORROWER = NPC_BURROWER, +SUMMON_FROSTSPHERE = NPC_FROST_SPHERE, +SPELL_BERSERK = 26662, }; struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI @@ -89,21 +67,18 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI ScriptedInstance* m_pInstance; uint8 Difficulty; - uint32 m_uiSpell_Timer[BOSS_SPELL_COUNT]; uint8 stage; uint32 SubmergeTimer; - Unit* currentTarget; bool intro; - -#include "sc_boss_spell_worker.cpp" + BossSpellWorker* bsw; void Reset() { if(!m_pInstance) return; stage = 0; intro = true; Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); - for (uint8 i = 0; i < BOSS_SPELL_COUNT; ++i) - m_uiSpell_Timer[i] = urand(m_BossSpell[i].m_uiSpellTimerMin[Difficulty],m_BossSpell[i].m_uiSpellTimerMax[Difficulty]); + bsw = new BossSpellWorker(this); + bsw->Reset(Difficulty); } @@ -151,62 +126,56 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI switch(stage) { case 0: { - if (QuerySpellPeriod(SPELL_POUND, uiDiff)) - CastBossSpell(SPELL_POUND); - if (QuerySpellPeriod(SPELL_COLD, uiDiff)) - CastBossSpell(SPELL_COLD); - if (QuerySpellPeriod(SUMMON_BORROWER, uiDiff)) { - CastBossSpell(SUMMON_BORROWER); + bsw->timedCast(SPELL_POUND, uiDiff); + bsw->timedCast(SPELL_COLD, uiDiff); + if (bsw->timedQuery(SUMMON_BORROWER, uiDiff)) { + bsw->doCast(SUMMON_BORROWER); DoScriptText(-1713556,m_creature); }; - if (QuerySpellPeriod(SPELL_SUBMERGE_0, uiDiff)) stage = 1; + if (bsw->timedQuery(SPELL_SUBMERGE_0, uiDiff)) stage = 1; + break;} case 1: { - CastBossSpell(SPELL_SUBMERGE_0); + bsw->doCast(SPELL_SUBMERGE_0); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); stage = 2; DoScriptText(-1713557,m_creature); break;} case 2: { - if (QuerySpellPeriod(SPELL_IMPALE, uiDiff)) { - CastBossSpell(SPELL_IMPALE); - CastBossSpell(SPELL_MARK); - DoScriptText(-1713558,m_creature,currentTarget); + if (bsw->timedQuery(SPELL_IMPALE, uiDiff)) { + bsw->doCast(SPELL_IMPALE); + bsw->doCast(SPELL_MARK); + DoScriptText(-1713558,m_creature); }; - if (QuerySpellPeriod(SPELL_SUMMON_BEATLES, uiDiff)) { - CastBossSpell(SPELL_SUMMON_BEATLES); - CastBossSpell(SUMMON_SCARAB); + if (bsw->timedQuery(SPELL_SUMMON_BEATLES, uiDiff)) { + bsw->doCast(SPELL_SUMMON_BEATLES); + bsw->doCast(SUMMON_SCARAB); DoScriptText(-1713560,m_creature); }; - if (QuerySpellPeriod(SPELL_SUBMERGE_0, uiDiff)) stage = 3; + if (bsw->timedQuery(SPELL_SUBMERGE_0, uiDiff)) stage = 3; break;} case 3: { stage = 0; DoScriptText(-1713559,m_creature); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - m_creature->RemoveAurasDueToSpell(m_BossSpell[SPELL_SUBMERGE_0].m_uiSpellEntry[Difficulty]); + bsw->doRemove(SPELL_SUBMERGE_0,m_creature); break;} case 4: { - if (QuerySpellPeriod(SPELL_POUND, uiDiff)) - CastBossSpell(SPELL_POUND); - if (QuerySpellPeriod(SPELL_COLD, uiDiff)) - CastBossSpell(SPELL_COLD); - if (QuerySpellPeriod(SPELL_LEECHING_SWARM, uiDiff)) { - CastBossSpell(SPELL_LEECHING_SWARM); + bsw->timedCast(SPELL_POUND, uiDiff); + bsw->timedCast(SPELL_COLD, uiDiff); + if (bsw->timedQuery(SPELL_LEECHING_SWARM, uiDiff)) { + bsw->doCast(SPELL_LEECHING_SWARM); DoScriptText(-1713561,m_creature); } break;} } - if (QuerySpellPeriod(SUMMON_FROSTSPHERE, uiDiff)) - CastBossSpell(SUMMON_FROSTSPHERE); + bsw->timedCast(SUMMON_FROSTSPHERE, uiDiff); - if (QuerySpellPeriod(SPELL_BERSERK, uiDiff)) - CastBossSpell(SPELL_BERSERK); + bsw->timedCast(SPELL_BERSERK, uiDiff); if (m_creature->GetHealthPercent() < 30.0f && stage == 0) stage = 4; - DoMeleeAttackIfReady(); } }; @@ -226,18 +195,15 @@ struct MANGOS_DLL_DECL mob_swarm_scarabAI : public ScriptedAI ScriptedInstance* m_pInstance; uint8 Difficulty; - uint32 m_uiSpell_Timer[BOSS_SPELL_COUNT]; - Unit* currentTarget; - -#include "sc_boss_spell_worker.cpp" + BossSpellWorker* bsw; void Reset() { - for (uint8 i = 0; i < BOSS_SPELL_COUNT; ++i) - m_uiSpell_Timer[i] = urand(m_BossSpell[i].m_uiSpellTimerMin[Difficulty],m_BossSpell[i].m_uiSpellTimerMax[Difficulty]); Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); m_creature->SetInCombatWithZone(); m_creature->SetRespawnDelay(DAY); + bsw = new BossSpellWorker(this); + bsw->Reset(Difficulty); } void KilledUnit(Unit* pVictim) @@ -262,11 +228,9 @@ struct MANGOS_DLL_DECL mob_swarm_scarabAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (QuerySpellPeriod(SPELL_DETERMINATION, uiDiff)) - CastBossSpell(SPELL_DETERMINATION); + bsw->timedCast(SPELL_DETERMINATION, uiDiff); - if (QuerySpellPeriod(SPELL_ACID_MANDIBLE, uiDiff)) - CastBossSpell(SPELL_ACID_MANDIBLE); + bsw->timedCast(SPELL_ACID_MANDIBLE, uiDiff); DoMeleeAttackIfReady(); } @@ -287,20 +251,18 @@ struct MANGOS_DLL_DECL mob_nerubian_borrowerAI : public ScriptedAI ScriptedInstance* m_pInstance; uint8 Difficulty; - uint32 m_uiSpell_Timer[BOSS_SPELL_COUNT]; - Unit* currentTarget; bool submerged; - -#include "sc_boss_spell_worker.cpp" + BossSpellWorker* bsw; + Unit* currentTarget; void Reset() { - for (uint8 i = 0; i < BOSS_SPELL_COUNT; ++i) - m_uiSpell_Timer[i] = urand(m_BossSpell[i].m_uiSpellTimerMin[Difficulty],m_BossSpell[i].m_uiSpellTimerMax[Difficulty]); Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); m_creature->SetInCombatWithZone(); m_creature->SetRespawnDelay(DAY); submerged = false; + bsw = new BossSpellWorker(this); + bsw->Reset(Difficulty); } void KilledUnit(Unit* pVictim) @@ -325,26 +287,25 @@ struct MANGOS_DLL_DECL mob_nerubian_borrowerAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (QuerySpellPeriod(SPELL_EXPOSE_WEAKNESS, uiDiff)) - CastBossSpell(SPELL_EXPOSE_WEAKNESS); + bsw->timedCast(SPELL_EXPOSE_WEAKNESS, uiDiff); - if (QuerySpellPeriod(SPELL_SPIDER_FRENZY, uiDiff)) + if (bsw->timedQuery(SPELL_SPIDER_FRENZY, uiDiff)) if(Creature *pTemp = GetClosestCreatureWithEntry(m_creature, NPC_BURROWER, 50.0f)) { currentTarget = pTemp; - CastBossSpell(SPELL_SPIDER_FRENZY); + bsw->doCast(SPELL_SPIDER_FRENZY); }; - if (m_creature->GetHealthPercent() < 20.0f && QuerySpellPeriod(SPELL_SUBMERGE_1, uiDiff) && !submerged) + if (m_creature->GetHealthPercent() < 20.0f && bsw->timedQuery(SPELL_SUBMERGE_1, uiDiff) && !submerged) { - CastBossSpell(SPELL_SUBMERGE_1); + bsw->doCast(SPELL_SUBMERGE_1); submerged = true; DoScriptText(-1713557,m_creature); }; if (m_creature->GetHealthPercent() > 50.0f && submerged) { - m_creature->RemoveAurasDueToSpell(m_BossSpell[SPELL_SUBMERGE_1].m_uiSpellEntry[Difficulty]); + bsw->doRemove(SPELL_SUBMERGE_1,m_creature); submerged = false; DoScriptText(-1713559,m_creature); }; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp index 268ce1b8b..e2651f935 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp @@ -44,47 +44,23 @@ enum Summons enum BossSpells { - SPELL_NETHER_POWER, - SPELL_INFERNAL, - SPELL_INFERNAL_ERUPTION, - SPELL_FEL_FIREBALL, - SPELL_FEL_LIGHTING, - SPELL_INCINERATE_FLESH, - SPELL_BURNING_INFERNO, - SPELL_NETHER_PORTAL, - SPELL_LEGION_FLAME_0, - SPELL_LEGION_FLAME_1, - SPELL_SHIVAN_SLASH, - SPELL_SPINNING_STRIKE, - SPELL_FEL_INFERNO, - SPELL_FEL_STREAK, - SPELL_BERSERK, - BOSS_SPELL_COUNT +SPELL_NETHER_POWER = 67108, +SPELL_INFERNAL = 66258, +SPELL_INFERNAL_ERUPTION = 66255, +SPELL_FEL_FIREBALL = 66532, +SPELL_FEL_LIGHTING = 66528, +SPELL_INCINERATE_FLESH = 66237, +SPELL_BURNING_INFERNO = 66242, +SPELL_NETHER_PORTAL = 66264, +SPELL_LEGION_FLAME_0 = 66199, +SPELL_LEGION_FLAME_1 = 66197, +SPELL_SHIVAN_SLASH = 67098, +SPELL_SPINNING_STRIKE = 66316, +SPELL_FEL_INFERNO = 67047, +SPELL_FEL_STREAK = 66494, +SPELL_BERSERK = 26662, }; -static SpellTable m_BossSpell[]= -{ -// Name 10 25 10H 25H -{SPELL_NETHER_POWER, 67108, 67108, 67108, 67108, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, -{SPELL_INFERNAL, 66258, 66258, 66258, 66258, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, true, false}, -{SPELL_INFERNAL_ERUPTION,66255, 66255, 66255, 66255, 30000, 30000, 30000, 30000, 45000, 45000, 45000, 45000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_FEL_FIREBALL, 66532, 66963, 66964, 66965, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_FEL_LIGHTING, 66528, 66528, 67029, 67029, 15000, 15000, 15000, 15000, 25000, 25000, 25000, 25000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_INCINERATE_FLESH, 66237, 67049, 67050, 67051, 40000, 40000, 40000, 40000, 90000, 90000, 40000, 90000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_BURNING_INFERNO, 66242, 67060, 67060, 67060, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_NETHER_PORTAL, 66264, 66264, 68405, 68405, 60000, 60000, 60000, 60000, 60000, 60000, 60000, 60000, 65535, CAST_ON_RANDOM, true, true}, -{SPELL_LEGION_FLAME_0, 66199, 68127, 68126, 68128, 30000, 30000, 30000, 30000, 45000, 45000, 45000, 45000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_LEGION_FLAME_1, 66197, 68123, 68124, 68125, 30000, 30000, 30000, 30000, 45000, 45000, 45000, 45000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_SHIVAN_SLASH, 67098, 67098, 67098, 67098, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, -{SPELL_SPINNING_STRIKE, 66316, 66316, 66316, 66316, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_FEL_INFERNO, 67047, 67047, 67047, 67047, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, -{SPELL_FEL_STREAK, 66494, 66494, 66494, 66494, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_BERSERK, 26662, 26662, 26662, 26662, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 65535, CAST_ON_SELF, false, false}, -}; - - - - /*###### ## boss_jaraxxus ######*/ @@ -99,21 +75,16 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI ScriptedInstance* m_pInstance; uint8 Difficulty; - uint32 m_uiSpell_Timer[BOSS_SPELL_COUNT]; uint8 stage; uint8 substage; uint8 m_portalsCount; uint8 m_volcanoCount; - Unit* currentTarget; - -#include "sc_boss_spell_worker.cpp" + BossSpellWorker* bsw; void Reset() { if(!m_pInstance) return; Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); m_pInstance->SetData(TYPE_JARAXXUS, NOT_STARTED); - for (uint8 i = 0; i < BOSS_SPELL_COUNT; ++i) - m_uiSpell_Timer[i] = urand(m_BossSpell[i].m_uiSpellTimerMin[Difficulty],m_BossSpell[i].m_uiSpellTimerMax[Difficulty]); SetEquipmentSlots(false, EQUIP_MAIN, EQUIP_OFFHAND, EQUIP_RANGED); m_portalsCount = 1; if (Difficulty == RAID_DIFFICULTY_10MAN_HEROIC || Difficulty == RAID_DIFFICULTY_25MAN_HEROIC) @@ -124,21 +95,11 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI m_portalsCount = 1; m_volcanoCount = 4; } + bsw = new BossSpellWorker(this); + bsw->Reset(Difficulty); DoScriptText(-1713517,m_creature); } - uint64 CallGuard(uint64 npctype, TempSummonType type, uint32 _summontime ) - { - float fPosX, fPosY, fPosZ; - m_creature->GetPosition(fPosX, fPosY, fPosZ); - m_creature->GetRandomPoint(fPosX, fPosY, fPosZ, urand(10, 20), fPosX, fPosY, fPosZ); - Creature* pSummon = m_creature->SummonCreature(npctype, fPosX, fPosY, fPosZ, 0, type, _summontime); - if(pSummon) pSummon->SetInCombatWithZone(); -// DoScriptText(EMOTE_SUMMON, m_creature); - return pSummon ? pSummon->GetGUID() : 0; - } - - void JustReachedHome() { if (!m_pInstance) return; @@ -160,7 +121,7 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI m_creature->SetInCombatWithZone(); m_pInstance->SetData(TYPE_JARAXXUS, IN_PROGRESS); DoScriptText(-1713514,m_creature); - CastBossSpell(SPELL_NETHER_POWER); + bsw->doCast(SPELL_NETHER_POWER); } void UpdateAI(const uint32 uiDiff) @@ -168,37 +129,32 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (QuerySpellPeriod(SPELL_FEL_FIREBALL, uiDiff)) - CastBossSpell(SPELL_FEL_FIREBALL); + bsw->timedCast(SPELL_FEL_FIREBALL, uiDiff); - if (QuerySpellPeriod(SPELL_FEL_LIGHTING, uiDiff)) - CastBossSpell(SPELL_FEL_LIGHTING); + bsw->timedCast(SPELL_FEL_LIGHTING, uiDiff); - if (QuerySpellPeriod(SPELL_INCINERATE_FLESH, uiDiff)) { - DoScriptText(-1713522,m_creature,currentTarget); - CastBossSpell(SPELL_INCINERATE_FLESH); + if (bsw->timedQuery(SPELL_INCINERATE_FLESH, uiDiff)) { + DoScriptText(-1713522,m_creature); + bsw->doCast(SPELL_INCINERATE_FLESH); } - if (QuerySpellPeriod(SPELL_LEGION_FLAME_1, uiDiff)) { - DoScriptText(-1713518,m_creature,currentTarget); - CastBossSpell(SPELL_LEGION_FLAME_1); + if (bsw->timedQuery(SPELL_LEGION_FLAME_1, uiDiff)) { + DoScriptText(-1713518,m_creature); + bsw->doCast(SPELL_LEGION_FLAME_1); }; - if (QuerySpellPeriod(SPELL_INFERNAL_ERUPTION, uiDiff) + if (bsw->timedQuery(SPELL_INFERNAL_ERUPTION, uiDiff) && m_volcanoCount > 0) { - DoScriptText(-1713520,m_creature); -// CastBossSpell(SPELL_INFERNAL_ERUPTION); - if (CallGuard(NPC_INFERNAL_VOLCANO, TEMPSUMMON_MANUAL_DESPAWN, 5000)) - --m_volcanoCount; + DoScriptText(-1713520,m_creature); + if (bsw->doCast(NPC_INFERNAL_VOLCANO) == CAST_OK) --m_volcanoCount; }; - if (QuerySpellPeriod(SPELL_NETHER_PORTAL, uiDiff) + if (bsw->timedQuery(SPELL_NETHER_PORTAL, uiDiff) && m_portalsCount > 0 && m_creature->GetHealthPercent() <= 90.0f) { DoScriptText(-1713519,m_creature); - if (CallGuard(NPC_NETHER_PORTAL, TEMPSUMMON_MANUAL_DESPAWN, 5000)) - --m_portalsCount; + if (bsw->doCast(NPC_NETHER_PORTAL) == CAST_OK) --m_portalsCount; }; DoMeleeAttackIfReady(); @@ -266,7 +222,7 @@ struct MANGOS_DLL_DECL mob_legion_flameAI : public ScriptedAI { if (m_creature->IsWithinDist(m_creature->getVictim(), 4.0f, false)) { -// DoCast(m_creature,m_BossSpell[SPELL_LEGION_FLAME_0].m_uiSpellEntry[Difficulty]); + DoCast(m_creature,SPELL_LEGION_FLAME_0); } } m_uiRangeCheck_Timer = 1000; @@ -297,6 +253,7 @@ struct MANGOS_DLL_DECL mob_infernal_volcanoAI : public ScriptedAI uint8 Difficulty; uint8 m_Count; uint32 m_Timer; + BossSpellWorker* bsw; void Reset() { @@ -313,7 +270,8 @@ struct MANGOS_DLL_DECL mob_infernal_volcanoAI : public ScriptedAI m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); m_Count = 6; } - + bsw = new BossSpellWorker(this); + bsw->Reset(Difficulty); } void AttackStart(Unit *who) @@ -340,12 +298,11 @@ struct MANGOS_DLL_DECL mob_infernal_volcanoAI : public ScriptedAI if (m_pInstance->GetData(TYPE_JARAXXUS) != IN_PROGRESS) m_creature->ForcedDespawn(); - if (m_Timer < diff && m_Count > 0) { - DoCast(m_creature,m_BossSpell[SPELL_INFERNAL_ERUPTION].m_uiSpellEntry[Difficulty]); - m_Timer=urand(m_BossSpell[SPELL_INFERNAL_ERUPTION].m_uiSpellTimerMin[Difficulty],m_BossSpell[SPELL_INFERNAL_ERUPTION].m_uiSpellTimerMax[Difficulty]); + if (bsw->timedQuery(SPELL_INFERNAL_ERUPTION,diff) && m_Count > 0) { + bsw->doCast(SPELL_INFERNAL_ERUPTION); DoScriptText(-1713524,m_creature); --m_Count; - } else m_Timer -= diff; + } if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -368,16 +325,15 @@ struct MANGOS_DLL_DECL mob_fel_infernalAI : public ScriptedAI ScriptedInstance* m_pInstance; uint8 Difficulty; - uint32 m_uiSpell_Timer[BOSS_SPELL_COUNT]; - Unit* currentTarget; - -#include "sc_boss_spell_worker.cpp" + BossSpellWorker* bsw; void Reset() { Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); m_creature->SetInCombatWithZone(); m_creature->SetRespawnDelay(DAY); + bsw = new BossSpellWorker(this); + bsw->Reset(Difficulty); } void KilledUnit(Unit* pVictim) @@ -402,11 +358,9 @@ struct MANGOS_DLL_DECL mob_fel_infernalAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (QuerySpellPeriod(SPELL_FEL_INFERNO, uiDiff)) - CastBossSpell(SPELL_FEL_INFERNO); + bsw->timedCast(SPELL_FEL_INFERNO, uiDiff); - if (QuerySpellPeriod(SPELL_FEL_STREAK, uiDiff)) - CastBossSpell(SPELL_FEL_STREAK); + bsw->timedCast(SPELL_FEL_STREAK, uiDiff); DoMeleeAttackIfReady(); } @@ -433,7 +387,7 @@ struct MANGOS_DLL_DECL mob_nether_portalAI : public ScriptedAI void Reset() { Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); - m_Timer = 5000; + m_Timer = 10000; m_creature->SetRespawnDelay(DAY); if (Difficulty != RAID_DIFFICULTY_10MAN_HEROIC && Difficulty != RAID_DIFFICULTY_25MAN_HEROIC) { @@ -472,7 +426,7 @@ struct MANGOS_DLL_DECL mob_nether_portalAI : public ScriptedAI m_creature->ForcedDespawn(); if (m_Timer < diff && m_Count > 0) { - DoCast(m_creature,m_BossSpell[SPELL_NETHER_PORTAL].m_uiSpellEntry[Difficulty]); + DoCast(m_creature,SPELL_NETHER_PORTAL,false); DoScriptText(-1713521,m_creature); --m_Count; m_Timer = 60000; @@ -499,18 +453,15 @@ struct MANGOS_DLL_DECL mob_mistress_of_painAI : public ScriptedAI ScriptedInstance* m_pInstance; uint8 Difficulty; - uint32 m_uiSpell_Timer[BOSS_SPELL_COUNT]; - Unit* currentTarget; - -#include "sc_boss_spell_worker.cpp" + BossSpellWorker* bsw; void Reset() { - for (uint8 i = 0; i < BOSS_SPELL_COUNT; ++i) - m_uiSpell_Timer[i] = urand(m_BossSpell[i].m_uiSpellTimerMin[Difficulty],m_BossSpell[i].m_uiSpellTimerMax[Difficulty]); Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); m_creature->SetInCombatWithZone(); m_creature->SetRespawnDelay(DAY); + bsw = new BossSpellWorker(this); + bsw->Reset(Difficulty); } void KilledUnit(Unit* pVictim) @@ -536,11 +487,9 @@ struct MANGOS_DLL_DECL mob_mistress_of_painAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (QuerySpellPeriod(SPELL_SHIVAN_SLASH, uiDiff)) - CastBossSpell(SPELL_SHIVAN_SLASH); + bsw->timedCast(SPELL_SHIVAN_SLASH, uiDiff); - if (QuerySpellPeriod(SPELL_SPINNING_STRIKE, uiDiff)) - CastBossSpell(SPELL_SPINNING_STRIKE); + bsw->timedCast(SPELL_SPINNING_STRIKE, uiDiff); DoMeleeAttackIfReady(); } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index 1aa7b6f4f..b002b19a0 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -44,69 +44,35 @@ enum Summons enum BossSpells { -SPELL_IMPALE, -SPELL_STAGGERING_STOMP, -SPELL_RISING_ANGER, -SPELL_ACID_SPIT, -SPELL_PARALYTIC_SPRAY, -SPELL_ACID_SPEW, -SPELL_PARALYTIC_BITE, -SPELL_SWEEP_0, -SPELL_SLIME_POOL, -SPELL_FIRE_SPIT, -SPELL_MOLTEN_SPEW, -SPELL_BURNING_BITE, -SPELL_BURNING_SPRAY, -SPELL_SWEEP_1, -SPELL_FEROCIOUS_BUTT, -SPELL_MASSIVE_CRASH, -SPELL_WHIRL, -SPELL_ARCTIC_BREATH, -SPELL_TRAMPLE, -SUMMON_SNOBOLD, -SPELL_SNOBOLLED, -SPELL_BATTER, -SPELL_FIRE_BOMB, -SPELL_HEAD_CRACK, -SPELL_SUBMERGE_0, -SPELL_BERSERK, -SPELL_ENRAGE, -BOSS_SPELL_COUNT +SPELL_IMPALE = 66331, +SPELL_STAGGERING_STOMP = 67648, +SPELL_RISING_ANGER = 66636, +SUMMON_SNOBOLD = NPC_SNOBOLD_VASSAL, +SPELL_ACID_SPIT = 66880, +SPELL_PARALYTIC_SPRAY = 66901, +SPELL_ACID_SPEW = 66819, +SPELL_PARALYTIC_BITE = 66824, +SPELL_SWEEP_0 = 66794, +SPELL_SLIME_POOL = 67642, +SPELL_FIRE_SPIT = 66796, +SPELL_MOLTEN_SPEW = 66821, +SPELL_BURNING_BITE = 66879, +SPELL_BURNING_SPRAY = 66902, +SPELL_SWEEP_1 = 67646, +SPELL_FEROCIOUS_BUTT = 66770, +SPELL_MASSIVE_CRASH = 66683, +SPELL_WHIRL = 67345, +SPELL_ARCTIC_BREATH = 66689, +SPELL_TRAMPLE = 66734, +SPELL_SNOBOLLED = 66406, +SPELL_BATTER = 66408, +SPELL_FIRE_BOMB = 66313, +SPELL_HEAD_CRACK = 66407, +SPELL_SUBMERGE_0 = 53421, +SPELL_BERSERK = 26662, +SPELL_ENRAGE = 68335, }; -static SpellTable m_BossSpell[]= -{ -// Name 10 25 10H 25H -{SPELL_IMPALE, 66331, 67477, 67478, 67479, 20000, 20000, 20000, 20000, 40000, 40000, 40000, 40000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_STAGGERING_STOMP, 67648, 67648, 67648, 66648, 15000, 15000, 15000, 15000, 40000, 40000, 40000, 40000, 65535, CAST_ON_SELF, false, false}, -{SPELL_RISING_ANGER, 66636, 66636, 66636, 66636, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, APPLY_AURA_SELF, false, true}, -{SPELL_ACID_SPIT, 66880, 67606, 67607, 67608, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_PARALYTIC_SPRAY, 66901, 67615, 67616, 66617, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_ACID_SPEW, 66819, 66819, 66819, 66819, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_PARALYTIC_BITE, 66824, 67612, 67613, 67614, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, -{SPELL_SWEEP_0, 66794, 67644, 67645, 67646, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, true}, -{SPELL_SLIME_POOL, 67642, 67642, 67642, 67642, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, true}, -{SPELL_FIRE_SPIT, 66796, 67632, 67633, 67634, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_MOLTEN_SPEW, 66821, 66821, 66821, 66821, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_BURNING_BITE, 66879, 67624, 67625, 67626, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_BURNING_SPRAY, 66902, 67627, 67628, 67629, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, -{SPELL_SWEEP_1, 67646, 67646, 67646, 67646, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, -{SPELL_FEROCIOUS_BUTT, 66770, 67654, 67655, 67656, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, -{SPELL_MASSIVE_CRASH, 66683, 67660, 67661, 67662, 15000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, -{SPELL_WHIRL, 67345, 67663, 67664, 67665, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, -{SPELL_ARCTIC_BREATH, 66689, 67650, 67651, 67652, 25000, 25000, 25000, 25000, 40000, 40000, 40000, 40000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_TRAMPLE, 66734, 66734, 66734, 66734, 30000, 30000, 30000, 30000, 60000, 60000, 60000, 60000, 65535, CAST_ON_RANDOM, false, false}, -{SUMMON_SNOBOLD, NPC_SNOBOLD_VASSAL, NPC_SNOBOLD_VASSAL, NPC_SNOBOLD_VASSAL, NPC_SNOBOLD_VASSAL, 40000, 40000, 40000, 40000, 60000, 60000, 60000, 60000, 65535, SUMMON_NORMAL, false, false}, -{SPELL_SNOBOLLED, 66406, 66406, 66406, 66406, 10000, 10000, 10000, 10000, 30000, 30000, 30000, 30000, 65535, APPLY_AURA_TARGET, false, true}, -{SPELL_BATTER, 66408, 66408, 66408, 66408, 10000, 10000, 10000, 10000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, -{SPELL_FIRE_BOMB, 66313, 66313, 66313, 66313, 10000, 10000, 10000, 10000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, -{SPELL_HEAD_CRACK, 66407, 66407, 66407, 66407, 10000, 10000, 10000, 10000, 30000, 30000, 30000, 30000, 65535, CAST_ON_VICTIM, false, false}, -{SPELL_SUBMERGE_0, 53421, 53421, 53421, 53421, 40000, 40000, 40000, 40000, 60000, 60000, 60000, 60000, 65535, CAST_ON_SELF, true, false}, -{SPELL_BERSERK, 26662, 26662, 26662, 26662, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 65535, CAST_ON_SELF, false, false}, -{SPELL_ENRAGE, 68335, 68335, 68335, 68335, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 65535, CAST_ON_SELF, false, false}, -}; - - struct MANGOS_DLL_DECL boss_gormokAI : public ScriptedAI { boss_gormokAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -117,18 +83,16 @@ struct MANGOS_DLL_DECL boss_gormokAI : public ScriptedAI ScriptedInstance* m_pInstance; uint8 Difficulty; - uint32 m_uiSpell_Timer[BOSS_SPELL_COUNT]; uint8 SnoboldsCount; - Unit* currentTarget; - -#include "sc_boss_spell_worker.cpp" + BossSpellWorker* bsw; void Reset() { + if(!m_pInstance) return; SnoboldsCount = 4; Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); - for (uint8 i = 0; i < BOSS_SPELL_COUNT; ++i) - m_uiSpell_Timer[i] = urand(m_BossSpell[i].m_uiSpellTimerMin[Difficulty],m_BossSpell[i].m_uiSpellTimerMax[Difficulty]); + bsw = new BossSpellWorker(this); + bsw->Reset(Difficulty); SetEquipmentSlots(false, EQUIP_MAIN, EQUIP_OFFHAND, EQUIP_RANGED); } @@ -155,15 +119,12 @@ struct MANGOS_DLL_DECL boss_gormokAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (QuerySpellPeriod(SPELL_IMPALE, uiDiff)) - CastBossSpell(SPELL_IMPALE); + bsw->timedCast(SPELL_IMPALE, uiDiff); - if (QuerySpellPeriod(SPELL_STAGGERING_STOMP, uiDiff)) - CastBossSpell(SPELL_STAGGERING_STOMP); + bsw->timedCast(SPELL_STAGGERING_STOMP, uiDiff); - if (QuerySpellPeriod(SUMMON_SNOBOLD, uiDiff) && SnoboldsCount > 0 ) { - CastBossSpell(SUMMON_SNOBOLD); - CastBossSpell(SPELL_RISING_ANGER); + if (bsw->timedQuery(SUMMON_SNOBOLD, uiDiff) && SnoboldsCount > 0 ) { + bsw->doCast(SUMMON_SNOBOLD); DoScriptText(-1713601,m_creature); --SnoboldsCount; }; @@ -187,56 +148,50 @@ struct MANGOS_DLL_DECL mob_snobold_vassalAI : public ScriptedAI ScriptedInstance* m_pInstance; uint8 Difficulty; - uint32 m_uiSpell_Timer[BOSS_SPELL_COUNT]; - Unit* currentTarget; + BossSpellWorker* bsw; + Unit* pBoss; Unit* defaultTarget; -#include "sc_boss_spell_worker.cpp" - void Reset() { - for (uint8 i = 0; i < BOSS_SPELL_COUNT; ++i) - m_uiSpell_Timer[i] = urand(m_BossSpell[i].m_uiSpellTimerMin[Difficulty],m_BossSpell[i].m_uiSpellTimerMax[Difficulty]); + bsw = new BossSpellWorker(this); Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); + bsw->Reset(Difficulty); m_creature->SetInCombatWithZone(); m_creature->SetRespawnDelay(DAY); + pBoss = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_GORMOK)); + if (pBoss) bsw->doCast(SPELL_RISING_ANGER,pBoss); } void Aggro(Unit *who) { if (!m_pInstance) return; defaultTarget = who; - CastBossSpell(SPELL_SNOBOLLED); + bsw->doCast(SPELL_SNOBOLLED, defaultTarget); } void JustDied(Unit* pKiller) { - if (defaultTarget && defaultTarget->isAlive()) - defaultTarget->RemoveAurasDueToSpell(m_BossSpell[SPELL_SNOBOLLED].m_uiSpellEntry[Difficulty]); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_GORMOK))) - if (pTemp->isAlive() && pTemp->GetAura(m_BossSpell[SPELL_RISING_ANGER].m_uiSpellEntry[Difficulty], EFFECT_INDEX_0)->modStackAmount(-1)) - pTemp->RemoveAurasDueToSpell(m_BossSpell[SPELL_RISING_ANGER].m_uiSpellEntry[Difficulty]); + if (defaultTarget) bsw->doRemove(SPELL_SNOBOLLED, defaultTarget); + if (pBoss && pBoss->isAlive()) bsw->doRemove(SPELL_RISING_ANGER,pBoss); } void UpdateAI(const uint32 uiDiff) { if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) != GORMOK_IN_PROGRESS) { if (defaultTarget && defaultTarget->isAlive()) - defaultTarget->RemoveAurasDueToSpell(m_BossSpell[SPELL_SNOBOLLED].m_uiSpellEntry[Difficulty]); + bsw->doRemove(SPELL_SNOBOLLED, defaultTarget); m_creature->ForcedDespawn(); } if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (QuerySpellPeriod(SPELL_BATTER, uiDiff)) - CastBossSpell(SPELL_BATTER); + bsw->timedCast(SPELL_BATTER, uiDiff); - if (QuerySpellPeriod(SPELL_FIRE_BOMB, uiDiff)) - CastBossSpell(SPELL_FIRE_BOMB); + bsw->timedCast(SPELL_FIRE_BOMB, uiDiff); - if (QuerySpellPeriod(SPELL_HEAD_CRACK, uiDiff)) - CastBossSpell(SPELL_HEAD_CRACK); + bsw->timedCast(SPELL_HEAD_CRACK, uiDiff); DoMeleeAttackIfReady(); } @@ -257,21 +212,18 @@ struct MANGOS_DLL_DECL boss_acidmawAI : public ScriptedAI ScriptedInstance* m_pInstance; uint8 Difficulty; - uint32 m_uiSpell_Timer[BOSS_SPELL_COUNT]; - Unit* currentTarget; + BossSpellWorker* bsw; uint8 stage; bool enraged; -#include "sc_boss_spell_worker.cpp" - void Reset() { - for (uint8 i = 0; i < BOSS_SPELL_COUNT; ++i) - m_uiSpell_Timer[i] = urand(m_BossSpell[i].m_uiSpellTimerMin[Difficulty],m_BossSpell[i].m_uiSpellTimerMax[Difficulty]); Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); stage = 1; enraged = false; m_creature->SetInCombatWithZone(); + bsw = new BossSpellWorker(this); + bsw->Reset(Difficulty); } @@ -301,37 +253,31 @@ struct MANGOS_DLL_DECL boss_acidmawAI : public ScriptedAI switch (stage) { case 0: { - if (QuerySpellPeriod(SPELL_ACID_SPEW, uiDiff)) - CastBossSpell(SPELL_ACID_SPEW); + bsw->timedCast(SPELL_ACID_SPEW, uiDiff); - if (QuerySpellPeriod(SPELL_PARALYTIC_BITE, uiDiff)) - CastBossSpell(SPELL_PARALYTIC_BITE); + bsw->timedCast(SPELL_PARALYTIC_BITE, uiDiff); - if (QuerySpellPeriod(SPELL_SLIME_POOL, uiDiff)) - CastBossSpell(SPELL_SLIME_POOL); + bsw->timedCast(SPELL_SLIME_POOL, uiDiff); if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == ACIDMAW_SUBMERGED) stage = 1; break;} case 1: { - CastBossSpell(SPELL_SUBMERGE_0); + bsw->doCast(SPELL_SUBMERGE_0); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); stage = 2; DoScriptText(-1713557,m_creature); m_pInstance->SetData(TYPE_NORTHREND_BEASTS, ACIDMAW_SUBMERGED); break;} case 2: { - if (QuerySpellPeriod(SPELL_ACID_SPIT, uiDiff)) - CastBossSpell(SPELL_ACID_SPIT); + bsw->timedCast(SPELL_ACID_SPIT, uiDiff); - if (QuerySpellPeriod(SPELL_PARALYTIC_SPRAY, uiDiff)) - CastBossSpell(SPELL_PARALYTIC_SPRAY); + bsw->timedCast(SPELL_PARALYTIC_SPRAY, uiDiff); - if (QuerySpellPeriod(SPELL_SWEEP_0, uiDiff)) - CastBossSpell(SPELL_SWEEP_0); + bsw->timedCast(SPELL_SWEEP_0, uiDiff); - if (QuerySpellPeriod(SPELL_SUBMERGE_0, uiDiff) && m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == ACIDMAW_SUBMERGED) + if (bsw->timedQuery(SPELL_SUBMERGE_0, uiDiff) && m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == ACIDMAW_SUBMERGED) m_pInstance->SetData(TYPE_NORTHREND_BEASTS, DREADSCALE_SUBMERGED); if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) != ACIDMAW_SUBMERGED) @@ -341,7 +287,7 @@ struct MANGOS_DLL_DECL boss_acidmawAI : public ScriptedAI case 3: { DoScriptText(-1713559,m_creature); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - m_creature->RemoveAurasDueToSpell(m_BossSpell[SPELL_SUBMERGE_0].m_uiSpellEntry[Difficulty]); + bsw->doRemove(SPELL_SUBMERGE_0); stage = 0; m_pInstance->SetData(TYPE_NORTHREND_BEASTS, DREADSCALE_SUBMERGED); break;} @@ -351,8 +297,8 @@ struct MANGOS_DLL_DECL boss_acidmawAI : public ScriptedAI if (!pSister->isAlive() && !enraged) { m_pInstance->SetData(TYPE_NORTHREND_BEASTS, IN_PROGRESS); - m_creature->RemoveAurasDueToSpell(m_BossSpell[SPELL_SUBMERGE_0].m_uiSpellEntry[Difficulty]); - CastBossSpell(SPELL_ENRAGE); + bsw->doRemove(SPELL_SUBMERGE_0); + bsw->doCast(SPELL_ENRAGE); enraged = true; DoScriptText(-1713504,m_creature); }; @@ -377,21 +323,18 @@ struct MANGOS_DLL_DECL boss_dreadscaleAI : public ScriptedAI ScriptedInstance* m_pInstance; uint8 Difficulty; - uint32 m_uiSpell_Timer[BOSS_SPELL_COUNT]; - Unit* currentTarget; + BossSpellWorker* bsw; uint8 stage; bool enraged; -#include "sc_boss_spell_worker.cpp" - void Reset() { - for (uint8 i = 0; i < BOSS_SPELL_COUNT; ++i) - m_uiSpell_Timer[i] = urand(m_BossSpell[i].m_uiSpellTimerMin[Difficulty],m_BossSpell[i].m_uiSpellTimerMax[Difficulty]); Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); stage = 0; enraged = false; m_creature->SetInCombatWithZone(); + bsw = new BossSpellWorker(this); + bsw->Reset(Difficulty); } void JustDied(Unit* pKiller) @@ -419,37 +362,31 @@ struct MANGOS_DLL_DECL boss_dreadscaleAI : public ScriptedAI switch (stage) { case 0: { - if (QuerySpellPeriod(SPELL_BURNING_BITE, uiDiff)) - CastBossSpell(SPELL_BURNING_BITE); + bsw->timedCast(SPELL_BURNING_BITE, uiDiff); - if (QuerySpellPeriod(SPELL_MOLTEN_SPEW, uiDiff)) - CastBossSpell(SPELL_MOLTEN_SPEW); + bsw->timedCast(SPELL_MOLTEN_SPEW, uiDiff); - if (QuerySpellPeriod(SPELL_SLIME_POOL, uiDiff)) - CastBossSpell(SPELL_SLIME_POOL); + bsw->timedCast(SPELL_SLIME_POOL, uiDiff); if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == DREADSCALE_SUBMERGED) stage = 1; break;} case 1: { - CastBossSpell(SPELL_SUBMERGE_0); + bsw->doCast(SPELL_SUBMERGE_0); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); stage = 2; DoScriptText(-1713557,m_creature); m_pInstance->SetData(TYPE_NORTHREND_BEASTS, DREADSCALE_SUBMERGED); break;} case 2: { - if (QuerySpellPeriod(SPELL_FIRE_SPIT, uiDiff)) - CastBossSpell(SPELL_FIRE_SPIT); + bsw->timedCast(SPELL_FIRE_SPIT, uiDiff); - if (QuerySpellPeriod(SPELL_BURNING_SPRAY, uiDiff)) - CastBossSpell(SPELL_BURNING_SPRAY); + bsw->timedCast(SPELL_BURNING_SPRAY, uiDiff); - if (QuerySpellPeriod(SPELL_SWEEP_0, uiDiff)) - CastBossSpell(SPELL_SWEEP_0); + bsw->timedCast(SPELL_SWEEP_0, uiDiff); - if (QuerySpellPeriod(SPELL_SUBMERGE_0, uiDiff) && m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == DREADSCALE_SUBMERGED) + if (bsw->timedQuery(SPELL_SUBMERGE_0, uiDiff) && m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == DREADSCALE_SUBMERGED) m_pInstance->SetData(TYPE_NORTHREND_BEASTS, ACIDMAW_SUBMERGED); if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) != DREADSCALE_SUBMERGED) @@ -459,7 +396,7 @@ struct MANGOS_DLL_DECL boss_dreadscaleAI : public ScriptedAI case 3: { DoScriptText(-1713559,m_creature); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - m_creature->RemoveAurasDueToSpell(m_BossSpell[SPELL_SUBMERGE_0].m_uiSpellEntry[Difficulty]); + bsw->doRemove(SPELL_SUBMERGE_0); stage = 0; m_pInstance->SetData(TYPE_NORTHREND_BEASTS, ACIDMAW_SUBMERGED); break;} @@ -469,8 +406,8 @@ struct MANGOS_DLL_DECL boss_dreadscaleAI : public ScriptedAI if (!pSister->isAlive() && !enraged) { m_pInstance->SetData(TYPE_NORTHREND_BEASTS, IN_PROGRESS); - m_creature->RemoveAurasDueToSpell(m_BossSpell[SPELL_SUBMERGE_0].m_uiSpellEntry[Difficulty]); - CastBossSpell(SPELL_ENRAGE); + bsw->doRemove(SPELL_SUBMERGE_0); + bsw->doCast(SPELL_ENRAGE); enraged = true; DoScriptText(-1713504,m_creature); }; @@ -494,18 +431,15 @@ struct MANGOS_DLL_DECL boss_icehowlAI : public ScriptedAI ScriptedInstance* m_pInstance; uint8 Difficulty; - uint32 m_uiSpell_Timer[BOSS_SPELL_COUNT]; - Unit* currentTarget; + BossSpellWorker* bsw; void Reset() { if(!m_pInstance) return; Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); - for (uint8 i = 0; i < BOSS_SPELL_COUNT; ++i) - m_uiSpell_Timer[i] = urand(m_BossSpell[i].m_uiSpellTimerMin[Difficulty],m_BossSpell[i].m_uiSpellTimerMax[Difficulty]); + bsw = new BossSpellWorker(this); + bsw->Reset(Difficulty); } -#include "sc_boss_spell_worker.cpp" - void JustDied(Unit* pKiller) { if (!m_pInstance) return; @@ -529,24 +463,19 @@ struct MANGOS_DLL_DECL boss_icehowlAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (QuerySpellPeriod(SPELL_FEROCIOUS_BUTT, uiDiff)) - CastBossSpell(SPELL_FEROCIOUS_BUTT); + bsw->timedCast(SPELL_FEROCIOUS_BUTT, uiDiff); - if (QuerySpellPeriod(SPELL_ARCTIC_BREATH, uiDiff)) - CastBossSpell(SPELL_ARCTIC_BREATH); + bsw->timedCast(SPELL_ARCTIC_BREATH, uiDiff); - if (QuerySpellPeriod(SPELL_WHIRL, uiDiff)) - CastBossSpell(SPELL_WHIRL); + bsw->timedCast(SPELL_WHIRL, uiDiff); - if (QuerySpellPeriod(SPELL_MASSIVE_CRASH, uiDiff)) + if (bsw->timedQuery(SPELL_MASSIVE_CRASH, uiDiff)) { - CastBossSpell(SPELL_MASSIVE_CRASH); -// m_uiSpell_Timer[SPELL_TRAMPLE] = 2000; - DoScriptText(-1713506,m_creature,currentTarget); + bsw->doCast(SPELL_MASSIVE_CRASH); + DoScriptText(-1713506,m_creature,bsw->currentTarget); } - if (QuerySpellPeriod(SPELL_TRAMPLE, uiDiff)) - if (CastBossSpell(SPELL_TRAMPLE) != CAST_OK) + if (bsw->timedCast(SPELL_TRAMPLE, uiDiff) != CAST_OK) DoScriptText(-1713507,m_creature); DoMeleeAttackIfReady(); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp index f4a59fc77..2739fa768 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp @@ -48,44 +48,22 @@ enum Summons enum BossSpells { - SPELL_TWIN_SPIKE_L, - SPELL_LIGHT_SURGE, - SPELL_SHIELD_LIGHT, - SPELL_TWIN_PACT_L, - SPELL_LIGHT_VORTEX, - SPELL_LIGHT_TOUCH, - SPELL_TWIN_SPIKE_H, - SPELL_DARK_SURGE, - SPELL_SHIELD_DARK, - SPELL_TWIN_PACT_H, - SPELL_DARK_VORTEX, - SPELL_DARK_TOUCH, - SPELL_TWIN_POWER, - SPELL_LIGHT_ESSENCE, - SPELL_DARK_ESSENCE, - SPELL_BERSERK, - BOSS_SPELL_COUNT -}; - -static SpellTable m_BossSpell[]= -{ -// Name 10 25 10H 25H -{SPELL_TWIN_SPIKE_L, 66075, 67312, 67313, 67314, 10000, 10000, 10000, 10000, 20000, 20000, 20000, 20000, 65535, CAST_ON_VICTIM, false, false}, -{SPELL_LIGHT_SURGE, 65766, 67270, 67271, 67272, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_SHIELD_LIGHT, 65858, 67259, 67260, 67261, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, -{SPELL_TWIN_PACT_L, 65876, 67306, 67307, 67308, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, -{SPELL_LIGHT_VORTEX, 66046, 67206, 67207, 67208, 30000, 30000, 30000, 30000, 90000, 90000, 90000, 90000, 65535, CAST_ON_SELF, false, false}, -{SPELL_LIGHT_TOUCH, 67297, 67297, 67298, 67298, 10000, 10000, 10000, 10000, 15000, 15000, 15000, 15000, 65535, CAST_ON_SELF, false, false}, -{SPELL_TWIN_SPIKE_H, 66069, 67309, 67310, 67311, 10000, 10000, 10000, 10000, 20000, 20000, 20000, 20000, 65535, CAST_ON_VICTIM, false, false}, -{SPELL_DARK_SURGE, 65768, 67262, 67263, 67264, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_SHIELD_DARK, 65874, 67256, 67257, 67258, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, -{SPELL_TWIN_PACT_H, 65879, 67244, 67245, 67246, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, -{SPELL_DARK_VORTEX, 66058, 67182, 67183, 67184, 30000, 30000, 30000, 30000, 90000, 90000, 90000, 90000, 65535, CAST_ON_SELF, false, false}, -{SPELL_DARK_TOUCH, 67282, 67282, 67283, 67283, 10000, 10000, 10000, 10000, 15000, 15000, 15000, 15000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_TWIN_POWER, 65916, 67248, 67249, 67250, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, -{SPELL_LIGHT_ESSENCE, 65686, 65686, 65686, 65686, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, -{SPELL_DARK_ESSENCE, 65684, 65684, 65684, 65684, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 65535, CAST_ON_SELF, false, false}, -{SPELL_BERSERK, 64238, 64238, 64238, 64238, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 65535, CAST_ON_SELF, false, false}, + SPELL_TWIN_SPIKE_L = 66075, + SPELL_LIGHT_SURGE = 65766, + SPELL_SHIELD_LIGHT = 65858, + SPELL_TWIN_PACT_L = 65876, + SPELL_LIGHT_VORTEX = 66046, + SPELL_LIGHT_TOUCH = 67297, + SPELL_TWIN_SPIKE_H = 66069, + SPELL_DARK_SURGE = 65768, + SPELL_SHIELD_DARK = 65874, + SPELL_TWIN_PACT_H = 65879, + SPELL_DARK_VORTEX = 66058, + SPELL_DARK_TOUCH = 67282, + SPELL_TWIN_POWER = 65916, + SPELL_LIGHT_ESSENCE = 65686, + SPELL_DARK_ESSENCE = 65684, + SPELL_BERSERK = 64238, }; /*###### @@ -102,20 +80,17 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI ScriptedInstance* m_pInstance; uint8 Difficulty; - uint32 m_uiSpell_Timer[BOSS_SPELL_COUNT]; uint8 stage; - Unit* currentTarget; - -#include "sc_boss_spell_worker.cpp" + BossSpellWorker* bsw; void Reset() { if(!m_pInstance) return; Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); - for (uint8 i = 0; i < BOSS_SPELL_COUNT; ++i) - m_uiSpell_Timer[i] = urand(m_BossSpell[i].m_uiSpellTimerMin[Difficulty],m_BossSpell[i].m_uiSpellTimerMax[Difficulty]); SetEquipmentSlots(false, EQUIP_MAIN_1, EQUIP_OFFHAND_1, EQUIP_RANGED_1); if (m_creature->isAlive()) m_creature->SummonCreature(NPC_LIGHT_ESSENCE, SpawnLoc[24].x, SpawnLoc[24].y, SpawnLoc[24].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); if (m_creature->isAlive()) m_creature->SummonCreature(NPC_LIGHT_ESSENCE, SpawnLoc[25].x, SpawnLoc[25].y, SpawnLoc[25].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); + bsw = new BossSpellWorker(this); + bsw->Reset(Difficulty); } void JustReachedHome() @@ -156,14 +131,12 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (QuerySpellPeriod(SPELL_LIGHT_SURGE, uiDiff)) - CastBossSpell(SPELL_LIGHT_SURGE); - if (QuerySpellPeriod(SPELL_LIGHT_TOUCH, uiDiff)) - CastBossSpell(SPELL_LIGHT_TOUCH); - if (QuerySpellPeriod(SPELL_LIGHT_VORTEX, uiDiff)) { + bsw->timedCast(SPELL_LIGHT_SURGE, uiDiff); + bsw->timedCast(SPELL_LIGHT_TOUCH, uiDiff); + if (bsw->timedQuery(SPELL_LIGHT_VORTEX, uiDiff)) { if (m_pInstance->GetData(DATA_CASTING_EYDIS) != SPELL_DARK_VORTEX) { DoScriptText(-1713538,m_creature); - CastBossSpell(SPELL_LIGHT_VORTEX); + bsw->doCast(SPELL_LIGHT_VORTEX); m_pInstance->SetData(DATA_CASTING_FJOLA, SPELL_LIGHT_VORTEX); } else m_pInstance->SetData(DATA_CASTING_EYDIS, 0); } @@ -191,21 +164,18 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI ScriptedInstance* m_pInstance; uint8 Difficulty; - uint32 m_uiSpell_Timer[BOSS_SPELL_COUNT]; uint8 stage; - Unit* currentTarget; - -#include "sc_boss_spell_worker.cpp" + BossSpellWorker* bsw; void Reset() { if(!m_pInstance) return; Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); - for (uint8 i = 0; i < BOSS_SPELL_COUNT; ++i) - m_uiSpell_Timer[i] = urand(m_BossSpell[i].m_uiSpellTimerMin[Difficulty],m_BossSpell[i].m_uiSpellTimerMax[Difficulty]); SetEquipmentSlots(false, EQUIP_MAIN_2, EQUIP_OFFHAND_2, EQUIP_RANGED_2); if (m_creature->isAlive()) m_creature->SummonCreature(NPC_DARK_ESSENCE, SpawnLoc[22].x, SpawnLoc[22].y, SpawnLoc[22].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); if (m_creature->isAlive()) m_creature->SummonCreature(NPC_DARK_ESSENCE, SpawnLoc[23].x, SpawnLoc[23].y, SpawnLoc[23].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); + bsw = new BossSpellWorker(this); + bsw->Reset(Difficulty); } void JustReachedHome() @@ -213,6 +183,7 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI if (!m_pInstance) return; m_pInstance->SetData(TYPE_VALKIRIES, FAIL); } + void JustDied(Unit* pKiller) { if (!m_pInstance) return; @@ -246,14 +217,12 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (QuerySpellPeriod(SPELL_DARK_SURGE, uiDiff)) - CastBossSpell(SPELL_DARK_SURGE); - if (QuerySpellPeriod(SPELL_DARK_TOUCH, uiDiff)) - CastBossSpell(SPELL_DARK_TOUCH); - if (QuerySpellPeriod(SPELL_DARK_VORTEX, uiDiff)) { + bsw->timedCast(SPELL_DARK_SURGE, uiDiff); + bsw->timedCast(SPELL_DARK_TOUCH, uiDiff); + if (bsw->timedQuery(SPELL_DARK_VORTEX, uiDiff)) { if (m_pInstance->GetData(DATA_CASTING_FJOLA) != SPELL_LIGHT_VORTEX) { DoScriptText(-1713540,m_creature); - CastBossSpell(SPELL_DARK_VORTEX); + bsw->doCast(SPELL_DARK_VORTEX); m_pInstance->SetData(DATA_CASTING_EYDIS, SPELL_DARK_VORTEX); } else m_pInstance->SetData(DATA_CASTING_FJOLA, 0); }; @@ -293,7 +262,7 @@ struct MANGOS_DLL_DECL mob_light_essenceAI : public ScriptedAI Unit* pPlayer = itr->getSource(); if (!pPlayer) continue; if (pPlayer->isAlive()) - pPlayer->RemoveAurasDueToSpell(m_BossSpell[SPELL_LIGHT_ESSENCE].m_uiSpellEntry[Difficulty]); + pPlayer->RemoveAurasDueToSpell(SPELL_LIGHT_ESSENCE); } m_creature->ForcedDespawn(); @@ -313,8 +282,8 @@ bool GossipHello_mob_light_essence(Player *player, Creature* pCreature) if(!pInstance) return true; uint8 Difficulty = pInstance->GetData(TYPE_DIFFICULTY); player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, pCreature->GetGUID()); - player->RemoveAurasDueToSpell(m_BossSpell[SPELL_DARK_ESSENCE].m_uiSpellEntry[Difficulty]); - player->CastSpell(player,m_BossSpell[SPELL_LIGHT_ESSENCE].m_uiSpellEntry[Difficulty],false); + player->RemoveAurasDueToSpell(SPELL_DARK_ESSENCE); + player->CastSpell(player,SPELL_LIGHT_ESSENCE,false); player->CLOSE_GOSSIP_MENU(); return true; }; @@ -345,9 +314,8 @@ struct MANGOS_DLL_DECL mob_dark_essenceAI : public ScriptedAI Unit* pPlayer = itr->getSource(); if (!pPlayer) continue; if (pPlayer->isAlive()) - pPlayer->RemoveAurasDueToSpell(m_BossSpell[SPELL_DARK_ESSENCE].m_uiSpellEntry[Difficulty]); + pPlayer->RemoveAurasDueToSpell(SPELL_DARK_ESSENCE); } - m_creature->ForcedDespawn(); } return; @@ -365,8 +333,8 @@ bool GossipHello_mob_dark_essence(Player *player, Creature* pCreature) if(!pInstance) return true; uint8 Difficulty = pInstance->GetData(TYPE_DIFFICULTY); player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, pCreature->GetGUID()); - player->RemoveAurasDueToSpell(m_BossSpell[SPELL_LIGHT_ESSENCE].m_uiSpellEntry[Difficulty]); - player->CastSpell(player,m_BossSpell[SPELL_DARK_ESSENCE].m_uiSpellEntry[Difficulty],false); + player->RemoveAurasDueToSpell(SPELL_LIGHT_ESSENCE); + player->CastSpell(player,SPELL_DARK_ESSENCE,false); player->CLOSE_GOSSIP_MENU(); return true; } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index 95a67c07f..271b85d00 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -140,8 +140,8 @@ enum NorthrendBeasts GORMOK_DONE = 1001, DREADSCALE_SUBMERGED = 2000, ACIDMAW_SUBMERGED = 2001, - ICEHOWL_IN_PROGRESS = 1000, - ICEHOWL_DONE = 1001, + ICEHOWL_IN_PROGRESS = 3000, + ICEHOWL_DONE = 3001, }; #endif From 630d353cae7222fc7ace06750610cb6a5e0ec323 Mon Sep 17 00:00:00 2001 From: insider42 Date: Fri, 26 Mar 2010 14:56:36 +0700 Subject: [PATCH 201/405] [patch 3] Improvements for boss Loatheb --- addition/3_mangos_loatheb.sql | 5 + addition/3_scriptdev2_loatheb.sql | 4 + scripts/northrend/naxxramas/boss_loatheb.cpp | 135 +++++++++---------- 3 files changed, 75 insertions(+), 69 deletions(-) create mode 100644 addition/3_mangos_loatheb.sql create mode 100644 addition/3_scriptdev2_loatheb.sql diff --git a/addition/3_mangos_loatheb.sql b/addition/3_mangos_loatheb.sql new file mode 100644 index 000000000..65ef18076 --- /dev/null +++ b/addition/3_mangos_loatheb.sql @@ -0,0 +1,5 @@ +UPDATE `creature_template` SET `AIName` = 'EventAI', `ScriptName` = '' WHERE `entry` = 16286; +DELETE FROM `creature_ai_scripts` WHERE `creature_id` = 16286; +INSERT INTO `creature_ai_scripts` VALUES +('1628601','16286','6','0','100','6','0','0','0','0','11','29232','0','7','0','0','0','0','0','0','0','0','Spore - Cast Fungal Creep on Death'), +('1628602','16286','1','0','100','6','1000','1000','0','0','41','0','0','0','0','0','0','0','0','0','0','0','Spore - Despawn when OOC'); diff --git a/addition/3_scriptdev2_loatheb.sql b/addition/3_scriptdev2_loatheb.sql new file mode 100644 index 000000000..083ba6350 --- /dev/null +++ b/addition/3_scriptdev2_loatheb.sql @@ -0,0 +1,4 @@ +INSERT INTO `script_texts` (entry,content_default,sound,type,language,emote,comment) VALUES +(-1533143,'An aura of necrotic energy blocks all healing!',0,3,0,0,'Loatheb EMOTE_AURA_BLOCKING'), +(-1533144,'The power of Necrotic Aura begins to wane!',0,3,0,0,'Loatheb EMOTE_AURA_WANE'), +(-1533145,'The aura fades away, allowing healing once more!',0,3,0,0,'Loatheb EMOTE_AURA_FADING'); diff --git a/scripts/northrend/naxxramas/boss_loatheb.cpp b/scripts/northrend/naxxramas/boss_loatheb.cpp index 579bbaa30..35e54cf4e 100644 --- a/scripts/northrend/naxxramas/boss_loatheb.cpp +++ b/scripts/northrend/naxxramas/boss_loatheb.cpp @@ -26,51 +26,49 @@ EndScriptData */ enum { - SPELL_CORRUPTED_MIND = 29198, - SPELL_POISON_AURA = 29865, - SPELL_INEVITABLE_DOOM = 29204, - SPELL_REMOVE_CURSE = 30281 -}; + SPELL_NECROTIC_AURA = 55593, + SPELL_SUMMON_SPORE = 29234, + + SPELL_DEATHBLOOM = 29865, + H_SPELL_DEATHBLOOM = 55053, -#define ADD_1X 2957.040f -#define ADD_1Y -3997.590f -#define ADD_1Z 274.280f + SPELL_INEVITABLE_DOOM = 29204, + H_SPELL_INEVITABLE_DOOM = 55052, -#define ADD_2X 2909.130f -#define ADD_2Y -4042.970f -#define ADD_2Z 274.280f + SPELL_FUNGAL_CREEP = 29232, -#define ADD_3X 2861.102f -#define ADD_3Y -3997.901f -#define ADD_3Z 274.280f + EMOTE_AURA_BLOCKING = -1533143, + EMOTE_AURA_WANE = -1533144, + EMOTE_AURA_FADING = -1533145, +}; struct MANGOS_DLL_DECL boss_loathebAI : public ScriptedAI { boss_loathebAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (instance_naxxramas*)pCreature->GetInstanceData(); + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - instance_naxxramas* m_pInstance; + ScriptedInstance* m_pInstance; bool m_bIsRegularMode; - uint32 m_uiCorruptedMindTimer; - uint32 m_uiPoisonAuraTimer; + uint32 m_uiNecroticAuraTimer; uint32 m_uiInevitableDoomTimer; - uint32 m_uiInevitableDoom5minsTimer; - uint32 m_uiRemoveCurseTimer; + uint32 m_ui5MinTimer; + uint32 m_uiDeathbloomTimer; uint32 m_uiSummonTimer; + uint32 m_uiNecroticAuraCount; void Reset() { - m_uiCorruptedMindTimer = 4000; - m_uiPoisonAuraTimer = 2500; - m_uiInevitableDoomTimer = 120000; - m_uiInevitableDoom5minsTimer = 300000; - m_uiRemoveCurseTimer = 30000; - m_uiSummonTimer = 8000; + m_uiInevitableDoomTimer = 2*MINUTE*IN_MILISECONDS; + m_ui5MinTimer = 5*MINUTE*IN_MILISECONDS; + m_uiNecroticAuraTimer = 10000; + m_uiDeathbloomTimer = 15000; + m_uiNecroticAuraCount = 0; + m_uiSummonTimer = 10000; } void Aggro(Unit* pWho) @@ -91,71 +89,69 @@ struct MANGOS_DLL_DECL boss_loathebAI : public ScriptedAI m_pInstance->SetData(TYPE_LOATHEB, FAIL); } + void JustSummoned(Creature* pSummoned) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); + } + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - // Corrupted Mind - if (m_uiCorruptedMindTimer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_CORRUPTED_MIND); - m_uiCorruptedMindTimer = 62000; - } - else - m_uiCorruptedMindTimer -= uiDiff; - - // Poison Aura - if (m_uiPoisonAuraTimer < uiDiff) + if (m_uiNecroticAuraTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_POISON_AURA); - m_uiPoisonAuraTimer = 60000; + switch (m_uiNecroticAuraCount % 3) + { + case 0: + DoCastSpellIfCan(m_creature, SPELL_NECROTIC_AURA); + DoScriptText(EMOTE_AURA_BLOCKING, m_creature); + m_uiNecroticAuraTimer = 14000; + break; + case 1: + DoScriptText(EMOTE_AURA_WANE, m_creature); + m_uiNecroticAuraTimer = 3000; + break; + case 2: + DoScriptText(EMOTE_AURA_FADING, m_creature); + m_uiNecroticAuraTimer = 3000; + break; + }; + + m_uiNecroticAuraCount++; } else - m_uiPoisonAuraTimer -= uiDiff; + m_uiNecroticAuraTimer -= uiDiff; - // Inevitable Doom - if (m_uiInevitableDoomTimer < uiDiff) + if (m_uiDeathbloomTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_INEVITABLE_DOOM); - m_uiInevitableDoomTimer = 120000; + DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_DEATHBLOOM : H_SPELL_DEATHBLOOM); + m_uiDeathbloomTimer = 30000; } else - m_uiInevitableDoomTimer -= uiDiff; + m_uiDeathbloomTimer -= uiDiff; - // Inevitable Doom 5mins - if (m_uiInevitableDoom5minsTimer < uiDiff) + if (m_ui5MinTimer) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_INEVITABLE_DOOM); - m_uiInevitableDoom5minsTimer = 15000; + if (m_ui5MinTimer < uiDiff) + m_ui5MinTimer = 0; + else + m_ui5MinTimer -= uiDiff; } - else - m_uiInevitableDoom5minsTimer -= uiDiff; - // Remove Curse - if (m_uiRemoveCurseTimer < uiDiff) + if (m_uiInevitableDoomTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_REMOVE_CURSE); - m_uiRemoveCurseTimer = 30000; + DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_INEVITABLE_DOOM : H_SPELL_INEVITABLE_DOOM); + m_uiInevitableDoomTimer = m_ui5MinTimer ? 30000 : 15000; } else - m_uiRemoveCurseTimer -= uiDiff; + m_uiInevitableDoomTimer -= uiDiff; - // Summon if (m_uiSummonTimer < uiDiff) { - Unit* pSummonedSpores = NULL; - - pSummonedSpores = m_creature->SummonCreature(16286, ADD_1X, ADD_1Y, ADD_1Z, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000); - pSummonedSpores = m_creature->SummonCreature(16286, ADD_2X, ADD_2Y, ADD_2Z, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000); - pSummonedSpores = m_creature->SummonCreature(16286, ADD_3X, ADD_3Y, ADD_3Z, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000); - if (pSummonedSpores) - { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) - pSummonedSpores->AddThreat(pTarget); - } - - m_uiSummonTimer = 28000; + DoCastSpellIfCan(m_creature, SPELL_SUMMON_SPORE); + m_uiSummonTimer = m_bIsRegularMode ? 36000 : 18000; } else m_uiSummonTimer -= uiDiff; @@ -163,6 +159,7 @@ struct MANGOS_DLL_DECL boss_loathebAI : public ScriptedAI DoMeleeAttackIfReady(); } }; + CreatureAI* GetAI_boss_loatheb(Creature* pCreature) { return new boss_loathebAI(pCreature); From 6f7f2aabafdc6fb006c8bb1b5fb3d7cc9570ff02 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sun, 28 Mar 2010 01:08:56 +0300 Subject: [PATCH 202/405] Prevent crash for new core and DB Icecrown teleporter functions. --- addition/721_icecrown_mangos.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addition/721_icecrown_mangos.sql b/addition/721_icecrown_mangos.sql index 41ccd4123..33a905f98 100644 --- a/addition/721_icecrown_mangos.sql +++ b/addition/721_icecrown_mangos.sql @@ -6,7 +6,8 @@ DELETE FROM `gameobject` WHERE `guid` = 913334; INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES (913334, 202244, 631, 3, 1, -209.5, 2211.91, 199.97, 3.07661, 0, 0, 0.999472, 0.0324833, 0, 0, 1); -UPDATE `gameobject_template` SET ScriptName = 'go_icecrown_teleporter' WHERE `entry` IN (202242,202243,202244,202245,202235); +#UPDATE `gameobject_template` SET ScriptName = 'go_icecrown_teleporter' WHERE `entry` IN (202242,202243,202244,202245,202235); +UPDATE `gameobject_template` SET ScriptName = '' WHERE `entry` IN (202242,202243,202244,202245,202235); # 202223 202246 DELETE FROM `creature_template` WHERE `entry` = 99322; INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES From e10a2bb864151ca7c8c8728f78101d760596e8bf Mon Sep 17 00:00:00 2001 From: insider42 Date: Mon, 29 Mar 2010 17:41:49 +0700 Subject: [PATCH 203/405] [patch 3] Improvements for boss Loatheb --- addition/3_mangos_loatheb.sql | 5 + addition/3_scriptdev2_loatheb.sql | 4 + scripts/northrend/naxxramas/boss_loatheb.cpp | 137 +++++++++---------- 3 files changed, 77 insertions(+), 69 deletions(-) create mode 100644 addition/3_mangos_loatheb.sql create mode 100644 addition/3_scriptdev2_loatheb.sql diff --git a/addition/3_mangos_loatheb.sql b/addition/3_mangos_loatheb.sql new file mode 100644 index 000000000..65ef18076 --- /dev/null +++ b/addition/3_mangos_loatheb.sql @@ -0,0 +1,5 @@ +UPDATE `creature_template` SET `AIName` = 'EventAI', `ScriptName` = '' WHERE `entry` = 16286; +DELETE FROM `creature_ai_scripts` WHERE `creature_id` = 16286; +INSERT INTO `creature_ai_scripts` VALUES +('1628601','16286','6','0','100','6','0','0','0','0','11','29232','0','7','0','0','0','0','0','0','0','0','Spore - Cast Fungal Creep on Death'), +('1628602','16286','1','0','100','6','1000','1000','0','0','41','0','0','0','0','0','0','0','0','0','0','0','Spore - Despawn when OOC'); diff --git a/addition/3_scriptdev2_loatheb.sql b/addition/3_scriptdev2_loatheb.sql new file mode 100644 index 000000000..083ba6350 --- /dev/null +++ b/addition/3_scriptdev2_loatheb.sql @@ -0,0 +1,4 @@ +INSERT INTO `script_texts` (entry,content_default,sound,type,language,emote,comment) VALUES +(-1533143,'An aura of necrotic energy blocks all healing!',0,3,0,0,'Loatheb EMOTE_AURA_BLOCKING'), +(-1533144,'The power of Necrotic Aura begins to wane!',0,3,0,0,'Loatheb EMOTE_AURA_WANE'), +(-1533145,'The aura fades away, allowing healing once more!',0,3,0,0,'Loatheb EMOTE_AURA_FADING'); diff --git a/scripts/northrend/naxxramas/boss_loatheb.cpp b/scripts/northrend/naxxramas/boss_loatheb.cpp index 579bbaa30..1523754a2 100644 --- a/scripts/northrend/naxxramas/boss_loatheb.cpp +++ b/scripts/northrend/naxxramas/boss_loatheb.cpp @@ -26,51 +26,49 @@ EndScriptData */ enum { - SPELL_CORRUPTED_MIND = 29198, - SPELL_POISON_AURA = 29865, - SPELL_INEVITABLE_DOOM = 29204, - SPELL_REMOVE_CURSE = 30281 -}; + SPELL_NECROTIC_AURA = 55593, + SPELL_SUMMON_SPORE = 29234, + + SPELL_DEATHBLOOM = 29865, + H_SPELL_DEATHBLOOM = 55053, -#define ADD_1X 2957.040f -#define ADD_1Y -3997.590f -#define ADD_1Z 274.280f + SPELL_INEVITABLE_DOOM = 29204, + H_SPELL_INEVITABLE_DOOM = 55052, -#define ADD_2X 2909.130f -#define ADD_2Y -4042.970f -#define ADD_2Z 274.280f + SPELL_FUNGAL_CREEP = 29232, -#define ADD_3X 2861.102f -#define ADD_3Y -3997.901f -#define ADD_3Z 274.280f + EMOTE_AURA_BLOCKING = -1533143, + EMOTE_AURA_WANE = -1533144, + EMOTE_AURA_FADING = -1533145, +}; struct MANGOS_DLL_DECL boss_loathebAI : public ScriptedAI { boss_loathebAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (instance_naxxramas*)pCreature->GetInstanceData(); + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - instance_naxxramas* m_pInstance; + ScriptedInstance* m_pInstance; bool m_bIsRegularMode; - uint32 m_uiCorruptedMindTimer; - uint32 m_uiPoisonAuraTimer; + uint32 m_uiNecroticAuraTimer; uint32 m_uiInevitableDoomTimer; - uint32 m_uiInevitableDoom5minsTimer; - uint32 m_uiRemoveCurseTimer; + uint32 m_ui5MinTimer; + uint32 m_uiDeathbloomTimer; uint32 m_uiSummonTimer; + uint32 m_uiNecroticAuraCount; void Reset() { - m_uiCorruptedMindTimer = 4000; - m_uiPoisonAuraTimer = 2500; - m_uiInevitableDoomTimer = 120000; - m_uiInevitableDoom5minsTimer = 300000; - m_uiRemoveCurseTimer = 30000; - m_uiSummonTimer = 8000; + m_uiInevitableDoomTimer = 2*MINUTE*IN_MILISECONDS; + m_ui5MinTimer = 5*MINUTE*IN_MILISECONDS; + m_uiNecroticAuraTimer = 10000; + m_uiDeathbloomTimer = 15000; + m_uiNecroticAuraCount = 0; + m_uiSummonTimer = 10000; } void Aggro(Unit* pWho) @@ -91,71 +89,71 @@ struct MANGOS_DLL_DECL boss_loathebAI : public ScriptedAI m_pInstance->SetData(TYPE_LOATHEB, FAIL); } + void JustSummoned(Creature* pSummoned) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); + } + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - // Corrupted Mind - if (m_uiCorruptedMindTimer < uiDiff) - { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_CORRUPTED_MIND); - m_uiCorruptedMindTimer = 62000; - } - else - m_uiCorruptedMindTimer -= uiDiff; - - // Poison Aura - if (m_uiPoisonAuraTimer < uiDiff) + if (m_uiNecroticAuraTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_POISON_AURA); - m_uiPoisonAuraTimer = 60000; + switch (m_uiNecroticAuraCount % 3) + { + case 0: + if (DoCastSpellIfCan(m_creature, SPELL_NECROTIC_AURA) != CAST_OK) + return; + + DoScriptText(EMOTE_AURA_BLOCKING, m_creature); + m_uiNecroticAuraTimer = 14000; + break; + case 1: + DoScriptText(EMOTE_AURA_WANE, m_creature); + m_uiNecroticAuraTimer = 3000; + break; + case 2: + DoScriptText(EMOTE_AURA_FADING, m_creature); + m_uiNecroticAuraTimer = 3000; + break; + }; + + m_uiNecroticAuraCount++; } else - m_uiPoisonAuraTimer -= uiDiff; + m_uiNecroticAuraTimer -= uiDiff; - // Inevitable Doom - if (m_uiInevitableDoomTimer < uiDiff) + if (m_uiDeathbloomTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_INEVITABLE_DOOM); - m_uiInevitableDoomTimer = 120000; + DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_DEATHBLOOM : H_SPELL_DEATHBLOOM); + m_uiDeathbloomTimer = 30000; } else - m_uiInevitableDoomTimer -= uiDiff; + m_uiDeathbloomTimer -= uiDiff; - // Inevitable Doom 5mins - if (m_uiInevitableDoom5minsTimer < uiDiff) + if (m_ui5MinTimer) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_INEVITABLE_DOOM); - m_uiInevitableDoom5minsTimer = 15000; + if (m_ui5MinTimer < uiDiff) + m_ui5MinTimer = 0; + else + m_ui5MinTimer -= uiDiff; } - else - m_uiInevitableDoom5minsTimer -= uiDiff; - // Remove Curse - if (m_uiRemoveCurseTimer < uiDiff) + if (m_uiInevitableDoomTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_REMOVE_CURSE); - m_uiRemoveCurseTimer = 30000; + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_INEVITABLE_DOOM : H_SPELL_INEVITABLE_DOOM) == CAST_OK) + m_uiInevitableDoomTimer = m_ui5MinTimer ? 30000 : 15000; } else - m_uiRemoveCurseTimer -= uiDiff; + m_uiInevitableDoomTimer -= uiDiff; - // Summon if (m_uiSummonTimer < uiDiff) { - Unit* pSummonedSpores = NULL; - - pSummonedSpores = m_creature->SummonCreature(16286, ADD_1X, ADD_1Y, ADD_1Z, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000); - pSummonedSpores = m_creature->SummonCreature(16286, ADD_2X, ADD_2Y, ADD_2Z, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000); - pSummonedSpores = m_creature->SummonCreature(16286, ADD_3X, ADD_3Y, ADD_3Z, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000); - if (pSummonedSpores) - { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) - pSummonedSpores->AddThreat(pTarget); - } - - m_uiSummonTimer = 28000; + DoCastSpellIfCan(m_creature, SPELL_SUMMON_SPORE); + m_uiSummonTimer = m_bIsRegularMode ? 36000 : 18000; } else m_uiSummonTimer -= uiDiff; @@ -163,6 +161,7 @@ struct MANGOS_DLL_DECL boss_loathebAI : public ScriptedAI DoMeleeAttackIfReady(); } }; + CreatureAI* GetAI_boss_loatheb(Creature* pCreature) { return new boss_loathebAI(pCreature); From 141b460966ab6a3860640b8de4b4896d125394ee Mon Sep 17 00:00:00 2001 From: insider42 Date: Mon, 29 Mar 2010 21:18:49 +0700 Subject: [PATCH 204/405] [patch 4] Improvements for boss Sapphiron --- addition/4_scriptdev2_sapphiron.sql | 6 + .../northrend/naxxramas/boss_sapphiron.cpp | 280 ++++++++++++------ 2 files changed, 190 insertions(+), 96 deletions(-) create mode 100644 addition/4_scriptdev2_sapphiron.sql diff --git a/addition/4_scriptdev2_sapphiron.sql b/addition/4_scriptdev2_sapphiron.sql new file mode 100644 index 000000000..5a92ea06c --- /dev/null +++ b/addition/4_scriptdev2_sapphiron.sql @@ -0,0 +1,6 @@ +DELETE FROM `script_texts` where entry in ('-1533082','-1533083'); +INSERT INTO `script_texts` (entry,content_default,sound,type,language,emote,comment) VALUES +(-1533082,'%s takes in a deep breath.',0,3,0,0,'sapphiron EMOTE_BREATH'), +(-1533083,'%s lifts off into the air!',0,3,0,0,'sapphiron EMOTE_FLY'), +(-1533160,'%s resumes hit attacks!',0,3,0,0,'sapphiron EMOTE_GROUND'), +(-1533161,'%s enrages!',0,3,0,0,'sapphiron EMOTE_ENRAGE'); diff --git a/scripts/northrend/naxxramas/boss_sapphiron.cpp b/scripts/northrend/naxxramas/boss_sapphiron.cpp index 27dd9896a..353f1cf73 100644 --- a/scripts/northrend/naxxramas/boss_sapphiron.cpp +++ b/scripts/northrend/naxxramas/boss_sapphiron.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: Boss_Sapphiron -SD%Complete: 0 +SD%Complete: 60 SDComment: Place Holder SDCategory: Naxxramas EndScriptData */ @@ -26,15 +26,30 @@ EndScriptData */ enum { - EMOTE_BREATH = -1533082, - EMOTE_ENRAGE = -1533083, - - SPELL_ICEBOLT = 28522, - SPELL_FROST_BREATH = 29318, - SPELL_FROST_AURA = 28531, - SPELL_LIFE_DRAIN = 28542, - SPELL_BLIZZARD = 28547, - SPELL_BESERK = 26662 + EMOTE_BREATH = -1533082, + EMOTE_FLY = -1533083, + EMOTE_GROUND = -1533160, + EMOTE_ENRAGE = -1533161, + + SPELL_ICEBOLT = 28522, + SPELL_FROST_BREATH = 29318, + + SPELL_FROST_AURA = 28531, + H_SPELL_FROST_AURA = 55799, + + SPELL_LIFE_DRAIN = 28542, + H_SPELL_LIFE_DRAIN = 55665, + + SPELL_TAIL_SWEEP = 55697, + H_SPELL_TAIL_SWEEP = 55696, + + SPELL_BLIZZARD = 28547, + H_SPELL_BLIZZARD = 55699, + + SPELL_CLEAVE = 19983, + SPELL_BESERK = 26662, + + GO_ICE_BLOCK = 181247, // Not sure }; struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI @@ -43,45 +58,67 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI { m_pInstance = (instance_naxxramas*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + m_uiIceboltCountMax = m_bIsRegularMode ? 2 : 3; Reset(); } instance_naxxramas* m_pInstance; bool m_bIsRegularMode; - uint32 Icebolt_Count; - uint32 Icebolt_Timer; - uint32 FrostBreath_Timer; - uint32 FrostAura_Timer; - uint32 LifeDrain_Timer; - uint32 Blizzard_Timer; - uint32 Fly_Timer; - uint32 Beserk_Timer; - uint32 phase; - bool landoff; - uint32 land_Timer; + uint32 m_uiIceboltCount; + uint32 m_uiIceboltCountMax; + uint32 m_uiIceboltTimer; + uint32 m_uiFrostBreathTimer; + uint32 m_uiLifeDrainTimer; + uint32 m_uiBlizzardTimer; + uint32 m_uiTailSweepTimer; + uint32 m_uiCleaveTimer; + uint32 m_uiFlyTimer; + uint32 m_uiBeserkTimer; + uint32 m_uiPhase; + uint32 m_uiLandTimer; + bool m_bLandoff; + std::set m_lIceBlocks; void Reset() { - FrostAura_Timer = 2000; - FrostBreath_Timer = 2500; - LifeDrain_Timer = 24000; - Blizzard_Timer = 20000; - Fly_Timer = 45000; - Icebolt_Timer = 4000; - land_Timer = 2000; - Beserk_Timer = 0; - phase = 1; - Icebolt_Count = 0; - landoff = false; - - //m_creature->ApplySpellMod(SPELL_FROST_AURA, SPELLMOD_DURATION, -1); + m_uiFrostBreathTimer = 7000; + m_uiLifeDrainTimer = 24000; + m_uiBlizzardTimer = 20000; + m_uiTailSweepTimer = 10000; + m_uiCleaveTimer = 10000; + m_uiFlyTimer = 45000; + m_uiIceboltTimer = 4000; + m_uiLandTimer = 2000; + m_uiBeserkTimer = 15*MINUTE*IN_MILISECONDS; + m_uiPhase = 1; + m_uiIceboltCount = 0; + m_bLandoff = false; + + DespawnIceBlocks(); + } + + void DespawnIceBlocks() + { + if (m_pInstance) + { + for (std::set::const_iterator itr = m_lIceBlocks.begin(); itr != m_lIceBlocks.end(); ++itr) + { + if (GameObject* pIceBlock = m_pInstance->instance->GetGameObject(*itr)) + pIceBlock->Delete(); + } + } + + m_lIceBlocks.clear(); } void Aggro(Unit* pWho) { if (m_pInstance) m_pInstance->SetData(TYPE_SAPPHIRON, IN_PROGRESS); + + m_creature->SetInCombatWithZone(); + DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_FROST_AURA : H_SPELL_FROST_AURA); } void JustDied(Unit* pKiller) @@ -96,40 +133,74 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI m_pInstance->SetData(TYPE_SAPPHIRON, FAIL); } + void SpellHitTarget(Unit *target, const SpellEntry *spell) + { + if (spell->Id == SPELL_FROST_BREATH) + if (target->HasAura(SPELL_ICEBOLT)) + target->RemoveAurasDueToSpell(SPELL_ICEBOLT); + } + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (phase == 1) + if (m_uiBeserkTimer < uiDiff) { - if (FrostAura_Timer < uiDiff) + if (DoCastSpellIfCan(m_creature, SPELL_BESERK) == CAST_OK) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_FROST_AURA); - FrostAura_Timer = 5000; - }else FrostAura_Timer -= uiDiff; + m_uiBeserkTimer = 300000; + DoScriptText(EMOTE_ENRAGE, m_creature); + } + } + else + m_uiBeserkTimer -= uiDiff; - if (LifeDrain_Timer < uiDiff) + if (m_uiPhase == 1) + { + if (m_uiLifeDrainTimer < uiDiff) { - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCastSpellIfCan(target,SPELL_LIFE_DRAIN); + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_LIFE_DRAIN : H_SPELL_LIFE_DRAIN) == CAST_OK) + m_uiLifeDrainTimer = 24000; + } + } + else + m_uiLifeDrainTimer -= uiDiff; - LifeDrain_Timer = 24000; - }else LifeDrain_Timer -= uiDiff; + if (m_uiBlizzardTimer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_BLIZZARD : H_SPELL_BLIZZARD) == CAST_OK) + m_uiBlizzardTimer = 20000; + } + } + else + m_uiBlizzardTimer -= uiDiff; - if (Blizzard_Timer < uiDiff) + if (m_uiCleaveTimer < uiDiff) { - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCastSpellIfCan(target,SPELL_BLIZZARD); + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE) == CAST_OK) + m_uiCleaveTimer = urand(7000, 10000); + } + else + m_uiCleaveTimer -= uiDiff; - Blizzard_Timer = 20000; - }else Blizzard_Timer -= uiDiff; + if (m_uiTailSweepTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_TAIL_SWEEP : H_SPELL_TAIL_SWEEP) == CAST_OK) + m_uiTailSweepTimer = urand(10000, 15000); + } + else + m_uiTailSweepTimer -= uiDiff; if (m_creature->GetHealthPercent() > 10.0f) { - if (Fly_Timer < uiDiff) + if (m_uiFlyTimer < uiDiff) { - phase = 2; + m_uiPhase = 2; m_creature->InterruptNonMeleeSpells(false); m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF); m_creature->GetMotionMaster()->Clear(false); @@ -137,62 +208,79 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI DoCastSpellIfCan(m_creature,11010); m_creature->SetHover(true); DoCastSpellIfCan(m_creature,18430); - Icebolt_Timer = 4000; - Icebolt_Count = 0; - landoff = false; - }else Fly_Timer -= uiDiff; + m_uiIceboltTimer = 4000; + m_uiIceboltCount = 0; + m_bLandoff = false; + DoScriptText(EMOTE_FLY, m_creature); + } + else + m_uiFlyTimer -= uiDiff; } - } - if (phase == 2) + DoMeleeAttackIfReady(); + } + else // Phase 2 { - if (Icebolt_Timer < uiDiff && Icebolt_Count < 5) + if (m_uiIceboltCount < m_uiIceboltCountMax) { - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCastSpellIfCan(target,SPELL_ICEBOLT); + if (m_uiIceboltTimer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_ICEBOLT) == CAST_OK) + { + if (pTarget->HasAura(SPELL_ICEBOLT)) + if (GameObject *pIceBlock = pTarget->SummonGameobject(GO_ICE_BLOCK, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), pTarget->GetOrientation(), 0)) + m_lIceBlocks.insert(pIceBlock->GetGUID()); - ++Icebolt_Count; - Icebolt_Timer = 4000; - }else Icebolt_Timer -= uiDiff; + ++m_uiIceboltCount; - if (Icebolt_Count == 5 && !landoff) - { - if (FrostBreath_Timer < uiDiff) - { - DoScriptText(EMOTE_BREATH, m_creature); - DoCastSpellIfCan(m_creature->getVictim(),SPELL_FROST_BREATH); - land_Timer = 2000; - landoff = true; - FrostBreath_Timer = 6000; - }else FrostBreath_Timer -= uiDiff; - } + if (m_uiIceboltCount == m_uiIceboltCountMax) + { + DoScriptText(EMOTE_BREATH, m_creature); + m_uiFrostBreathTimer = 7000; + } - if (landoff) + m_uiIceboltTimer = 4000; + } + } + } + else + m_uiIceboltTimer -= uiDiff; + } + else { - if (land_Timer < uiDiff) + if (m_bLandoff) { - phase = 1; - m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LAND); - m_creature->SetHover(false); - m_creature->GetMotionMaster()->Clear(false); - m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); - Fly_Timer = 67000; - }else land_Timer -= uiDiff; + if (m_uiLandTimer < uiDiff) + { + m_uiPhase = 1; + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LAND); + m_creature->SetHover(false); + m_creature->GetMotionMaster()->Clear(false); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + m_uiFlyTimer = 45000; + DoScriptText(EMOTE_GROUND, m_creature); + } + else + m_uiLandTimer -= uiDiff; + } + else + { + if (m_uiFrostBreathTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_FROST_BREATH) == CAST_OK) + { + DespawnIceBlocks(); + m_uiLandTimer = 4000; + m_bLandoff = true; + } + } + else + m_uiFrostBreathTimer -= uiDiff; + } } } - - if (m_creature->GetHealthPercent() <= 10.0f) - { - if (Beserk_Timer < uiDiff) - { - DoScriptText(EMOTE_ENRAGE, m_creature); - DoCastSpellIfCan(m_creature,SPELL_BESERK); - Beserk_Timer = 300000; - }else Beserk_Timer -= uiDiff; - } - - if (phase!=2) - DoMeleeAttackIfReady(); } }; From c216b53b5e0096c256f4b9e65f3eb14e207fd6a5 Mon Sep 17 00:00:00 2001 From: insider42 Date: Tue, 30 Mar 2010 17:36:56 +0700 Subject: [PATCH 205/405] Removed part of workarounds in [patch 4] --- scripts/northrend/naxxramas/boss_sapphiron.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/northrend/naxxramas/boss_sapphiron.cpp b/scripts/northrend/naxxramas/boss_sapphiron.cpp index 353f1cf73..d401fb407 100644 --- a/scripts/northrend/naxxramas/boss_sapphiron.cpp +++ b/scripts/northrend/naxxramas/boss_sapphiron.cpp @@ -229,9 +229,8 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI { if (DoCastSpellIfCan(pTarget, SPELL_ICEBOLT) == CAST_OK) { - if (pTarget->HasAura(SPELL_ICEBOLT)) - if (GameObject *pIceBlock = pTarget->SummonGameobject(GO_ICE_BLOCK, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), pTarget->GetOrientation(), 0)) - m_lIceBlocks.insert(pIceBlock->GetGUID()); + if (GameObject *pIceBlock = pTarget->SummonGameobject(GO_ICE_BLOCK, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), pTarget->GetOrientation(), 0)) + m_lIceBlocks.insert(pIceBlock->GetGUID()); ++m_uiIceboltCount; From 2edde51ddbcafa723223368456b6fd837b1846f9 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Tue, 30 Mar 2010 19:18:33 +0400 Subject: [PATCH 206/405] TOC part 28 - small fuxes to TOC && ICC, improve BSW class --- include/sc_boss_spell_worker.cpp | 15 ++++-- .../trial_of_the_crusader/boss_jaraxxus.cpp | 1 + .../boss_northrend_beasts.cpp | 8 +++- .../boss_twin_valkyr.cpp | 3 ++ .../instance_trial_of_the_crusader.cpp | 16 +++++-- .../trial_of_the_crusader.cpp | 38 +++++++++------ .../trial_of_the_crusader.h | 2 + .../boss_lady_deathwhisper.cpp | 8 ++-- .../icecrown_citadel/def_spire.h | 14 ++++-- .../instance_icecrown_spire.cpp | 46 +++++++++++++------ 10 files changed, 106 insertions(+), 45 deletions(-) diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index 1af1bfc92..34a0fb43b 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -166,7 +166,8 @@ CanCastResult BossSpellWorker::_BSWSpellSelector(uint8 m_uiSpellIdx, Unit* pTarg switch (pSpell->m_CastTarget) { case CAST_ON_SELF: - return _DoCastSpellIfCan(boss, pSpell->m_uiSpellEntry[currentDifficulty]); + if (!pSpell->m_IsBugged) return _DoCastSpellIfCan(boss, pSpell->m_uiSpellEntry[currentDifficulty]); + else return _BSWDoCast(m_uiSpellIdx, boss); break; case CAST_ON_SUMMONS: @@ -175,24 +176,28 @@ CanCastResult BossSpellWorker::_BSWSpellSelector(uint8 m_uiSpellIdx, Unit* pTarg case CAST_ON_VICTIM: pTarget = boss->getVictim(); - if (pTarget) return _DoCastSpellIfCan(boss->getVictim(), pSpell->m_uiSpellEntry[currentDifficulty]); + if (pTarget && !pSpell->m_IsBugged) return _DoCastSpellIfCan(boss->getVictim(), pSpell->m_uiSpellEntry[currentDifficulty]); + if (pTarget && pSpell->m_IsBugged) return _BSWDoCast(m_uiSpellIdx, boss->getVictim()); break; case CAST_ON_TARGET: if (!pTarget) pTarget = boss->getVictim(); - if (pTarget) return _DoCastSpellIfCan(pTarget, pSpell->m_uiSpellEntry[currentDifficulty]); + if (pTarget && !pSpell->m_IsBugged) return _DoCastSpellIfCan(pTarget, pSpell->m_uiSpellEntry[currentDifficulty]); + if (pTarget && pSpell->m_IsBugged) return _BSWDoCast(m_uiSpellIdx, pTarget); break; case CAST_ON_RANDOM: pTarget = SelectUnit(SELECT_TARGET_RANDOM); if (!pTarget) pTarget = boss->getVictim(); - if (pTarget) return _DoCastSpellIfCan(pTarget, pSpell->m_uiSpellEntry[currentDifficulty]); + if (pTarget && !pSpell->m_IsBugged) return _DoCastSpellIfCan(pTarget, pSpell->m_uiSpellEntry[currentDifficulty]); + if (pTarget && pSpell->m_IsBugged) return _BSWDoCast(m_uiSpellIdx, pTarget); break; case CAST_ON_BOTTOMAGGRO: pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1); if (!pTarget) pTarget = boss->getVictim(); - if (pTarget) return _DoCastSpellIfCan(pTarget, pSpell->m_uiSpellEntry[currentDifficulty]); + if (pTarget && !pSpell->m_IsBugged) return _DoCastSpellIfCan(pTarget, pSpell->m_uiSpellEntry[currentDifficulty]); + if (pTarget && pSpell->m_IsBugged) return _BSWDoCast(m_uiSpellIdx, pTarget); break; case APPLY_AURA_SELF: diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp index e2651f935..e18281f8f 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp @@ -104,6 +104,7 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI { if (!m_pInstance) return; m_pInstance->SetData(TYPE_JARAXXUS, FAIL); + m_creature->ForcedDespawn(); } void JustDied(Unit* pKiller) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index b002b19a0..aac3db693 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -106,6 +106,7 @@ struct MANGOS_DLL_DECL boss_gormokAI : public ScriptedAI { if (m_pInstance) m_pInstance->SetData(TYPE_NORTHREND_BEASTS, FAIL); + m_creature->ForcedDespawn(); } void Aggro(Unit* pWho) @@ -230,13 +231,14 @@ struct MANGOS_DLL_DECL boss_acidmawAI : public ScriptedAI void JustDied(Unit* pKiller) { if (!m_pInstance) return; - m_pInstance->SetData(TYPE_NORTHREND_BEASTS, SPECIAL); + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, SNAKES_SPECIAL); } void JustReachedHome() { if (m_pInstance) m_pInstance->SetData(TYPE_NORTHREND_BEASTS, FAIL); + m_creature->ForcedDespawn(); } void Aggro(Unit* pWho) @@ -340,13 +342,14 @@ struct MANGOS_DLL_DECL boss_dreadscaleAI : public ScriptedAI void JustDied(Unit* pKiller) { if (!m_pInstance) return; - m_pInstance->SetData(TYPE_NORTHREND_BEASTS, SPECIAL); + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, SNAKES_SPECIAL); } void JustReachedHome() { if (m_pInstance) m_pInstance->SetData(TYPE_NORTHREND_BEASTS, FAIL); + m_creature->ForcedDespawn(); } void Aggro(Unit* pWho) @@ -450,6 +453,7 @@ struct MANGOS_DLL_DECL boss_icehowlAI : public ScriptedAI { if (m_pInstance) m_pInstance->SetData(TYPE_NORTHREND_BEASTS, FAIL); + m_creature->ForcedDespawn(); } void Aggro(Unit* pWho) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp index 2739fa768..8529a71e4 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp @@ -97,7 +97,9 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI { if (!m_pInstance) return; m_pInstance->SetData(TYPE_VALKIRIES, FAIL); + m_creature->ForcedDespawn(); } + void JustDied(Unit* pKiller) { if (!m_pInstance) return; @@ -182,6 +184,7 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI { if (!m_pInstance) return; m_pInstance->SetData(TYPE_VALKIRIES, FAIL); + m_creature->ForcedDespawn(); } void JustDied(Unit* pKiller) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index 3de8e7b55..55dbe48d6 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -37,6 +37,7 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance uint32 m_auiNorthrendBeasts; uint8 Difficulty; std::string m_strInstData; + bool needsave; uint32 m_uiDataDamageFjola; uint32 m_uiDataDamageFjola_t; @@ -129,6 +130,8 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance m_auiNorthrendBeasts = NOT_STARTED; m_auiEventTimer = 1000; + + needsave = false; } void OnPlayerEnter(Player *m_player) @@ -289,7 +292,10 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance case TYPE_COUNTER: m_auiEncounter[7] = uiData; uiData = DONE; break; case TYPE_EVENT: m_auiEncounter[8] = uiData; uiData = NOT_STARTED; break; case TYPE_EVENT_TIMER: m_auiEventTimer = uiData; uiData = NOT_STARTED; break; - case TYPE_NORTHREND_BEASTS: m_auiNorthrendBeasts = uiData; break; + case TYPE_NORTHREND_BEASTS: if (m_auiNorthrendBeasts = SNAKES_SPECIAL + && uiData == SNAKES_SPECIAL ) uiData = SNAKES_DONE; + m_auiNorthrendBeasts = uiData; + break; case DATA_DAMAGE_FJOLA: m_uiDataDamageFjola += uiData; uiData = NOT_STARTED; break; case DATA_DAMAGE_EYDIS: m_uiDataDamageEydis += uiData; uiData = NOT_STARTED; break; case DATA_CASTING_FJOLA: m_uiFjolaCasting = uiData; uiData = NOT_STARTED; break; @@ -301,12 +307,15 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance && uiType != TYPE_COUNTER && uiType != TYPE_EVENT_TIMER) { if (IsRaidWiped()) { --m_auiEncounter[7]; - uiData = DONE;} + needsave = true; + } + uiData = NOT_STARTED; } - if (uiData == DONE && uiType != TYPE_STAGE + if ((uiData == DONE && uiType != TYPE_STAGE && uiType != TYPE_EVENT && uiType != TYPE_EVENT_TIMER) + || needsave == true) { OUT_SAVE_INST_DATA; @@ -319,6 +328,7 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance SaveToDB(); OUT_SAVE_INST_DATA_COMPLETE; + needsave = false; } } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index 1f9e7a7d0..41c0c6209 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -35,10 +35,10 @@ struct _Messages static _Messages _GossipMessage[]= { {"Вы готовы пройти Испытание Крестоносца?",GOSSIP_ACTION_INFO_DEF+1,false,TYPE_BEASTS}, // -{"Вы готовы к следующему этапу?",GOSSIP_ACTION_INFO_DEF+2,false,TYPE_JARAXXUS}, // -{"Вы готовы драться с крестоносцами альянса?",GOSSIP_ACTION_INFO_DEF+3,false,TYPE_CRUSADERS}, // -{"Вы готовы драться с крестоносцами орды?",GOSSIP_ACTION_INFO_DEF+4,false,TYPE_CRUSADERS}, // -{"Вы готовы к следующему этапу?",GOSSIP_ACTION_INFO_DEF+5,false,TYPE_VALKIRIES}, // +{"Вы готовы к следующему этапу?",GOSSIP_ACTION_INFO_DEF+2,true,TYPE_BEASTS}, // +{"Вы готовы драться с крестоносцами альянса?",GOSSIP_ACTION_INFO_DEF+3,true,TYPE_JARAXXUS}, // +{"Вы готовы драться с крестоносцами орды?",GOSSIP_ACTION_INFO_DEF+4,true,TYPE_JARAXXUS}, // +{"Вы готовы к следующему этапу?",GOSSIP_ACTION_INFO_DEF+5,true,TYPE_CRUSADERS}, // {"Вы готовы продолжить бой с Ануб-Араком?",GOSSIP_ACTION_INFO_DEF+6,true,TYPE_LICH_KING}, // {"Не надо сюда тыкать. На сегодня арена закрыта.",GOSSIP_ACTION_INFO_DEF+7,true,TYPE_ANUBARAK}, // }; @@ -90,18 +90,24 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI if (pInstance->GetData(TYPE_NORTHREND_BEASTS) == GORMOK_DONE) { pInstance->SetData(TYPE_STAGE,2); pInstance->SetData(TYPE_EVENT,200); - } + }; + if (pInstance->GetData(TYPE_NORTHREND_BEASTS) == FAIL) { + pInstance->SetData(TYPE_STAGE,0); + pInstance->SetData(TYPE_EVENT,0); + pInstance->SetData(TYPE_BEASTS,NOT_STARTED); + }; break; }; case 2: { - Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_DREADSCALE)); - Creature* pTemp1 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_ACIDMAW)); - if (pTemp && pTemp1){ - if (!pTemp->isAlive() && !pTemp1->isAlive()) { + if (pInstance->GetData(TYPE_NORTHREND_BEASTS) == SNAKES_DONE) { pInstance->SetData(TYPE_STAGE,3); pInstance->SetData(TYPE_EVENT,300); - } - } + }; + if (pInstance->GetData(TYPE_NORTHREND_BEASTS) == FAIL) { + pInstance->SetData(TYPE_STAGE,0); + pInstance->SetData(TYPE_EVENT,0); + pInstance->SetData(TYPE_BEASTS,NOT_STARTED); + }; break; } case 3: { @@ -110,6 +116,11 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI pInstance->SetData(TYPE_BEASTS,DONE); pInstance->SetData(TYPE_EVENT,400); } + if (pInstance->GetData(TYPE_NORTHREND_BEASTS) == FAIL) { + pInstance->SetData(TYPE_STAGE,0); + pInstance->SetData(TYPE_EVENT,0); + pInstance->SetData(TYPE_BEASTS,NOT_STARTED); + }; break; }; case 4: { @@ -193,7 +204,7 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI }; case 9: { if (pInstance->GetData(TYPE_ANUBARAK) == DONE) { - pInstance->SetData(TYPE_STAGE,0); + pInstance->SetData(TYPE_STAGE,10); pInstance->SetData(TYPE_EVENT,6000); } break; @@ -224,9 +235,8 @@ bool GossipHello_npc_toc_announcer(Player* pPlayer, Creature* pCreature) if(!pPlayer->getAttackers().empty()) return true; for(uint8 i = 0; i < NUM_MESSAGES; i++) { - if (!_GossipMessage[i].state && (pInstance->GetData(_GossipMessage[i].encounter) == NOT_STARTED || pInstance->GetData(_GossipMessage[i].encounter) == IN_PROGRESS)) { + if (!_GossipMessage[i].state && (pInstance->GetData(_GossipMessage[i].encounter) != DONE )) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, _GossipMessage[i].name, GOSSIP_SENDER_MAIN,_GossipMessage[i].id); - if (_GossipMessage[i].encounter == TYPE_CRUSADERS) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, _GossipMessage[3].name, GOSSIP_SENDER_MAIN,_GossipMessage[3].id); break; } if (_GossipMessage[i].state && pInstance->GetData(_GossipMessage[i].encounter) == DONE) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index 271b85d00..39a2f9616 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -140,6 +140,8 @@ enum NorthrendBeasts GORMOK_DONE = 1001, DREADSCALE_SUBMERGED = 2000, ACIDMAW_SUBMERGED = 2001, + SNAKES_SPECIAL = 2002, + SNAKES_DONE = 2003, ICEHOWL_IN_PROGRESS = 3000, ICEHOWL_DONE = 3001, }; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp index 8714c7f86..71b3c1e61 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp @@ -123,10 +123,10 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI if (!m_creature || !m_creature->isAlive()) return; if (isManaBarrier) { - m_creature->SetPower(POWER_MANA,m_creature->GetPower(POWER_MANA)-uiDamage*4); + m_creature->SetPower(POWER_MANA,m_creature->GetPower(POWER_MANA)-uiDamage); uiDamage = 0; if(m_creature->GetHealth() <= m_creature->GetMaxHealth()) { - m_uiMana = m_creature->GetPower(POWER_MANA)-(m_creature->GetMaxHealth()- m_creature->GetHealth())*2; + m_uiMana = m_creature->GetPower(POWER_MANA)-(m_creature->GetMaxHealth()- m_creature->GetHealth()); if (m_uiMana <= 0) m_uiMana =0; m_creature->SetPower(POWER_MANA,m_uiMana); m_creature->SetHealth(m_creature->GetMaxHealth()); @@ -160,7 +160,7 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI CallGuard(NPC_FANATIC, TEMPSUMMON_TIMED_DESPAWN, 60000); CallGuard(NPC_ADHERENT, TEMPSUMMON_TIMED_DESPAWN, 60000); }; - m_uiSummon_Timer=60000; + m_uiSummon_Timer=40000; } else m_uiSummon_Timer -= diff; if (m_uiDarkEmpowerment_Timer < diff) @@ -190,7 +190,7 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI { CallGuard(NPC_VENGEFUL_SHADE, TEMPSUMMON_TIMED_DESPAWN, 30000); if(!Regular) CallGuard(NPC_VENGEFUL_SHADE, TEMPSUMMON_TIMED_DESPAWN, 30000); - m_uiSummon2_Timer=20000; + m_uiSummon2_Timer=10000; } else m_uiSummon2_Timer -= diff; if (m_uiDominateMind_Timer < diff) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h index 9d5ed544e..26e46c30f 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h @@ -76,10 +76,16 @@ enum GO_SAURFANG_CACHE_10_H = 202241, // 2910 GO_SAURFANG_CACHE_25_H = 202238, // 2724 - GO_GUNSHIP_ARMORY_10 = 201873, - GO_GUNSHIP_ARMORY_25 = 201874, - GO_GUNSHIP_ARMORY_10_H = 202178, - GO_GUNSHIP_ARMORY_25_H = 202180, + + GO_GUNSHIP_ARMORY_A_10 = 201872, // + GO_GUNSHIP_ARMORY_A_25 = 201873, // + GO_GUNSHIP_ARMORY_A_10H = 201874, // + GO_GUNSHIP_ARMORY_A_25H = 201875, // + + GO_GUNSHIP_ARMORY_H_10 = 202177, // + GO_GUNSHIP_ARMORY_H_25 = 202178, // + GO_GUNSHIP_ARMORY_H_10H = 202179, // + GO_GUNSHIP_ARMORY_H_25H = 202180, // }; struct Locations diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp index 5bec84fa1..780a31ae5 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp @@ -66,7 +66,8 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance uint64 m_uiValithriaDoor4GUID; uint64 m_uiSaurfangCacheGUID; - uint64 m_uiGunshipArmoryGUID; + uint64 m_uiGunshipArmoryAGUID; + uint64 m_uiGunshipArmoryHGUID; void OpenDoor(uint64 guid) { @@ -93,7 +94,8 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance m_uiDeathWhisperGUID =0; m_uiSaurfangGUID = 0; m_uiSaurfangCacheGUID = 0; - m_uiGunshipArmoryGUID = 0; + m_uiGunshipArmoryAGUID = 0; + m_uiGunshipArmoryHGUID = 0; } @@ -220,21 +222,37 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance if(Difficulty == RAID_DIFFICULTY_25MAN_HEROIC) m_uiSaurfangCacheGUID = pGo->GetGUID(); break; - case GO_GUNSHIP_ARMORY_10: + case GO_GUNSHIP_ARMORY_A_10: if(Difficulty == RAID_DIFFICULTY_10MAN_NORMAL) - m_uiGunshipArmoryGUID = pGo->GetGUID(); + m_uiGunshipArmoryAGUID = pGo->GetGUID(); break; - case GO_GUNSHIP_ARMORY_25: + case GO_GUNSHIP_ARMORY_A_25: if(Difficulty == RAID_DIFFICULTY_25MAN_NORMAL) - m_uiGunshipArmoryGUID = pGo->GetGUID(); + m_uiGunshipArmoryAGUID = pGo->GetGUID(); break; - case GO_GUNSHIP_ARMORY_10_H: + case GO_GUNSHIP_ARMORY_A_10H: if(Difficulty == RAID_DIFFICULTY_10MAN_HEROIC) - m_uiGunshipArmoryGUID = pGo->GetGUID(); + m_uiGunshipArmoryAGUID = pGo->GetGUID(); break; - case GO_GUNSHIP_ARMORY_25_H: + case GO_GUNSHIP_ARMORY_A_25H: if(Difficulty == RAID_DIFFICULTY_25MAN_HEROIC) - m_uiGunshipArmoryGUID = pGo->GetGUID(); + m_uiGunshipArmoryAGUID = pGo->GetGUID(); + break; + case GO_GUNSHIP_ARMORY_H_10: + if(Difficulty == RAID_DIFFICULTY_10MAN_NORMAL) + m_uiGunshipArmoryHGUID = pGo->GetGUID(); + break; + case GO_GUNSHIP_ARMORY_H_25: + if(Difficulty == RAID_DIFFICULTY_25MAN_NORMAL) + m_uiGunshipArmoryHGUID = pGo->GetGUID(); + break; + case GO_GUNSHIP_ARMORY_H_10H: + if(Difficulty == RAID_DIFFICULTY_10MAN_HEROIC) + m_uiGunshipArmoryHGUID = pGo->GetGUID(); + break; + case GO_GUNSHIP_ARMORY_H_25H: + if(Difficulty == RAID_DIFFICULTY_25MAN_HEROIC) + m_uiGunshipArmoryHGUID = pGo->GetGUID(); break; } } @@ -269,10 +287,13 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance break; case TYPE_FLIGHT_WAR: if (uiData == DONE && m_auiEncounter[4] != DONE ) { - if (GameObject* pChest = instance->GetGameObject(m_uiGunshipArmoryGUID)) + if (GameObject* pChest = instance->GetGameObject(m_uiGunshipArmoryAGUID)) + if (pChest && !pChest->isSpawned()) { + pChest->SetRespawnTime(7*DAY); + }; + if (GameObject* pChest = instance->GetGameObject(m_uiGunshipArmoryHGUID)) if (pChest && !pChest->isSpawned()) { pChest->SetRespawnTime(7*DAY); -// pChest->SetGoState(GO_STATE_ACTIVE); }; m_auiEncounter[4] = uiData; }; @@ -288,7 +309,6 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance if (GameObject* pChest = instance->GetGameObject(m_uiSaurfangCacheGUID)) if (pChest && !pChest->isSpawned()) { pChest->SetRespawnTime(7*DAY); -// pChest->SetGoState(GO_STATE_ACTIVE); }; }; break; From 17cd327f607294232f9d1e86189f632484656a71 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Tue, 30 Mar 2010 21:33:25 +0400 Subject: [PATCH 207/405] Typo change IN_MILISECONDS Mangos commiters is crazy :( --- .../instance_blackrock_depths.cpp | 2 +- .../karazhan/boss_curator.cpp | 2 +- .../karazhan/boss_netherspite.cpp | 8 ++--- .../karazhan/bosses_opera.cpp | 6 ++-- .../eastern_kingdoms/karazhan/karazhan.cpp | 6 ++-- .../magisters_terrace/magisters_terrace.cpp | 2 +- .../molten_core/boss_golemagg.cpp | 16 +++++----- .../stratholme/boss_dathrohan_balnazzar.cpp | 2 +- .../eastern_kingdoms/zulaman/boss_akilzon.cpp | 2 +- .../eastern_kingdoms/zulaman/boss_halazzi.cpp | 32 +++++++++---------- .../eastern_kingdoms/zulaman/boss_janalai.cpp | 6 ++-- .../zulaman/instance_zulaman.cpp | 4 +-- scripts/northrend/naxxramas/boss_gluth.cpp | 4 +-- .../northrend/naxxramas/boss_patchwerk.cpp | 2 +- .../obsidian_sanctum/boss_sartharion.cpp | 2 +- .../utgarde_keep/boss_keleseth.cpp | 2 +- .../sethekk_halls/instance_sethekk_halls.cpp | 2 +- .../black_temple/boss_warlord_najentus.cpp | 4 +-- .../boss_leotheras_the_blind.cpp | 4 +-- .../instance_hellfire_ramparts.cpp | 4 +-- scripts/outland/hellfire_peninsula.cpp | 2 +- scripts/world/spell_scripts.cpp | 2 +- 22 files changed, 58 insertions(+), 58 deletions(-) diff --git a/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp index 6407c3dc5..8576820f7 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp @@ -213,7 +213,7 @@ struct MANGOS_DLL_DECL instance_blackrock_depths : public ScriptedInstance DoUseDoorOrButton(m_uiGoTombEnterGUID); break; case DONE: - DoRespawnGameObject(m_uiSevensChestGUID, HOUR*IN_MILISECONDS); + DoRespawnGameObject(m_uiSevensChestGUID, 3600000); DoUseDoorOrButton(m_uiGoTombExitGUID); DoUseDoorOrButton(m_uiGoTombEnterGUID); break; diff --git a/scripts/eastern_kingdoms/karazhan/boss_curator.cpp b/scripts/eastern_kingdoms/karazhan/boss_curator.cpp index 6eac09060..51fae1fad 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_curator.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_curator.cpp @@ -60,7 +60,7 @@ struct MANGOS_DLL_DECL boss_curatorAI : public ScriptedAI { m_uiFlareTimer = 10000; m_uiHatefulBoltTimer = 15000; // This time may be wrong - m_uiBerserkTimer = 12*MINUTE*IN_MILISECONDS; + m_uiBerserkTimer = 720000; m_bIsBerserk = false; m_bIsEnraged = false; diff --git a/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp b/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp index 269886bab..b049b896b 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp @@ -112,9 +112,9 @@ struct MANGOS_DLL_DECL boss_netherspiteAI : public ScriptedAI m_bIsEnraged = false; m_uiActivePhase = BEAM_PHASE; - m_uiEnrageTimer = MINUTE*9*IN_MILISECONDS; + m_uiEnrageTimer = 540000; m_uiVoidZoneTimer = 15000; - m_uiPhaseSwitchTimer = MINUTE*IN_MILISECONDS; + m_uiPhaseSwitchTimer = 60000; } void Aggro(Unit* pWho) @@ -146,7 +146,7 @@ struct MANGOS_DLL_DECL boss_netherspiteAI : public ScriptedAI DoScriptText(EMOTE_PHASE_BANISH, m_creature); m_uiNetherbreathTimer = 500; - m_uiPhaseSwitchTimer = (MINUTE/2)*IN_MILISECONDS; + m_uiPhaseSwitchTimer = (MINUTE/2)*IN_MILLISECONDS; } else { @@ -154,7 +154,7 @@ struct MANGOS_DLL_DECL boss_netherspiteAI : public ScriptedAI DoScriptText(EMOTE_PHASE_BEAM, m_creature); DoCastSpellIfCan(m_creature, SPELL_NETHERSPITE_ROAR); - m_uiPhaseSwitchTimer = MINUTE*IN_MILISECONDS; + m_uiPhaseSwitchTimer = MINUTE*IN_MILLISECONDS; } //reset threat every phase switch diff --git a/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp b/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp index a0fed8270..11ad00913 100644 --- a/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp +++ b/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp @@ -92,7 +92,7 @@ void SummonCroneIfReady(ScriptedInstance* pInstance, Creature* pCreature) if (pInstance->GetData(DATA_OPERA_OZ_DEATHCOUNT) == 4) { - if (Creature* pCrone = pCreature->SummonCreature(CREATURE_CRONE, -10891.96f, -1755.95f, pCreature->GetPositionZ(), 4.64f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILISECONDS)) + if (Creature* pCrone = pCreature->SummonCreature(CREATURE_CRONE, -10891.96f, -1755.95f, pCreature->GetPositionZ(), 4.64f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILLISECONDS)) { if (pCreature->getVictim()) pCrone->AI()->AttackStart(pCreature->getVictim()); @@ -734,7 +734,7 @@ bool GossipSelect_npc_grandmother(Player* pPlayer, Creature* pCreature, uint32 u { if (uiAction == GOSSIP_ACTION_INFO_DEF) { - if (Creature* pBigBadWolf = pCreature->SummonCreature(CREATURE_BIG_BAD_WOLF, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILISECONDS)) + if (Creature* pBigBadWolf = pCreature->SummonCreature(CREATURE_BIG_BAD_WOLF, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILLISECONDS)) pBigBadWolf->AI()->AttackStart(pPlayer); pCreature->ForcedDespawn(); @@ -1275,7 +1275,7 @@ void boss_julianneAI::UpdateAI(const uint32 diff) { if (SummonRomuloTimer < diff) { - if (Creature* pRomulo = m_creature->SummonCreature(CREATURE_ROMULO, ROMULO_X, ROMULO_Y, m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILISECONDS)) + if (Creature* pRomulo = m_creature->SummonCreature(CREATURE_ROMULO, ROMULO_X, ROMULO_Y, m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILLISECONDS)) { RomuloGUID = pRomulo->GetGUID(); ((boss_romuloAI*)pRomulo->AI())->JulianneGUID = m_creature->GetGUID(); diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.cpp b/scripts/eastern_kingdoms/karazhan/karazhan.cpp index bc02f6c64..a81e31486 100644 --- a/scripts/eastern_kingdoms/karazhan/karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/karazhan.cpp @@ -233,13 +233,13 @@ struct MANGOS_DLL_DECL npc_barnesAI : public npc_escortAI { case EVENT_OZ: for(int i=0; i < 4; ++i) - m_creature->SummonCreature(aSpawns_OZ[i].uiEntry, aSpawns_OZ[i].fPosX, SPAWN_Y, SPAWN_Z, SPAWN_O, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILISECONDS); + m_creature->SummonCreature(aSpawns_OZ[i].uiEntry, aSpawns_OZ[i].fPosX, SPAWN_Y, SPAWN_Z, SPAWN_O, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILLISECONDS); break; case EVENT_HOOD: - m_creature->SummonCreature(Spawn_HOOD.uiEntry, Spawn_HOOD.fPosX, SPAWN_Y, SPAWN_Z, SPAWN_O, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILISECONDS); + m_creature->SummonCreature(Spawn_HOOD.uiEntry, Spawn_HOOD.fPosX, SPAWN_Y, SPAWN_Z, SPAWN_O, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILLISECONDS); break; case EVENT_RAJ: - m_creature->SummonCreature(Spawn_RAJ.uiEntry, Spawn_RAJ.fPosX, SPAWN_Y, SPAWN_Z, SPAWN_O, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILISECONDS); + m_creature->SummonCreature(Spawn_RAJ.uiEntry, Spawn_RAJ.fPosX, SPAWN_Y, SPAWN_Z, SPAWN_O, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILLISECONDS); break; default: error_log("SD2: Barnes Opera Event - Wrong EventId set: %d", m_uiEventId); diff --git a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp index 261876abf..79469509c 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp @@ -70,7 +70,7 @@ struct MANGOS_DLL_DECL npc_kalecgosAI : public ScriptedAI return; if (uiPointId == POINT_ID_LAND) - m_uiTransformTimer = MINUTE*IN_MILISECONDS; + m_uiTransformTimer = MINUTE*IN_MILLISECONDS; } // some targeting issues with the spell, so use this workaround as temporary solution diff --git a/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp b/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp index 22ed77e2b..d71f45c86 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp @@ -54,9 +54,9 @@ struct MANGOS_DLL_DECL boss_golemaggAI : public ScriptedAI void Reset() { - m_uiPyroblastTimer = 7*IN_MILISECONDS; // These timers are probably wrong - m_uiEarthquakeTimer = 3*IN_MILISECONDS; - m_uiBuffTimer = 2.5*IN_MILISECONDS; + m_uiPyroblastTimer = 7*IN_MILLISECONDS; // These timers are probably wrong + m_uiEarthquakeTimer = 3*IN_MILLISECONDS; + m_uiBuffTimer = 2.5*IN_MILLISECONDS; m_bEnraged = false; m_creature->CastSpell(m_creature, SPELL_MAGMASPLASH, true); @@ -79,7 +79,7 @@ struct MANGOS_DLL_DECL boss_golemaggAI : public ScriptedAI if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) DoCastSpellIfCan(pTarget, SPELL_PYROBLAST); - m_uiPyroblastTimer = 7*IN_MILISECONDS; + m_uiPyroblastTimer = 7*IN_MILLISECONDS; } else m_uiPyroblastTimer -= uiDiff; @@ -97,7 +97,7 @@ struct MANGOS_DLL_DECL boss_golemaggAI : public ScriptedAI if (m_uiEarthquakeTimer < uiDiff) { DoCastSpellIfCan(m_creature->getVictim(), SPELL_EARTHQUAKE); - m_uiEarthquakeTimer = 3*IN_MILISECONDS; + m_uiEarthquakeTimer = 3*IN_MILLISECONDS; } else m_uiEarthquakeTimer -= uiDiff; @@ -108,7 +108,7 @@ struct MANGOS_DLL_DECL boss_golemaggAI : public ScriptedAI if (m_uiBuffTimer < uiDiff) { DoCastSpellIfCan(m_creature, SPELL_GOLEMAGG_TRUST); - m_uiBuffTimer = 2.5*IN_MILISECONDS; + m_uiBuffTimer = 2.5*IN_MILLISECONDS; } else m_uiBuffTimer -= uiDiff; @@ -131,7 +131,7 @@ struct MANGOS_DLL_DECL mob_core_ragerAI : public ScriptedAI void Reset() { - m_uiMangleTimer = 7*IN_MILISECONDS; // These times are probably wrong + m_uiMangleTimer = 7*IN_MILLISECONDS; // These times are probably wrong } void DamageTaken(Unit* pDoneBy, uint32& uiDamage) @@ -163,7 +163,7 @@ struct MANGOS_DLL_DECL mob_core_ragerAI : public ScriptedAI if (m_uiMangleTimer < uiDiff) { DoCastSpellIfCan(m_creature->getVictim(), SPELL_MANGLE); - m_uiMangleTimer = 10*IN_MILISECONDS; + m_uiMangleTimer = 10*IN_MILLISECONDS; } else m_uiMangleTimer -= uiDiff; diff --git a/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp b/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp index e0606bf7b..3140266d7 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp @@ -101,7 +101,7 @@ struct MANGOS_DLL_DECL boss_dathrohan_balnazzarAI : public ScriptedAI for (uint8 i=0; iSummonCreature(NPC_ZOMBIE, m_aSummonPoint[i].m_fX, m_aSummonPoint[i].m_fY, m_aSummonPoint[i].m_fZ, m_aSummonPoint[i].m_fOrient, - TEMPSUMMON_TIMED_DESPAWN, HOUR*IN_MILISECONDS); + TEMPSUMMON_TIMED_DESPAWN, HOUR*IN_MILLISECONDS); } void UpdateAI(const uint32 uiDiff) diff --git a/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp b/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp index 52674e0e1..db798e2af 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp @@ -82,7 +82,7 @@ struct MANGOS_DLL_DECL boss_akilzonAI : public ScriptedAI m_uiGustOfWindTimer = urand(20000, 30000); m_uiStormTimer = 50000; m_uiSummonEagleTimer = 65000; - m_uiBerserkTimer = MINUTE*8*IN_MILISECONDS; + m_uiBerserkTimer = MINUTE*8*IN_MILLISECONDS; m_bIsBerserk = false; } diff --git a/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp b/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp index b34191471..674176eb4 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp @@ -95,12 +95,12 @@ struct MANGOS_DLL_DECL boss_halazziAI : public ScriptedAI m_uiPhase = PHASE_SINGLE; // reset phase m_uiPhaseCounter = 3; - m_uiCheckTimer = IN_MILISECONDS; - m_uiFrenzyTimer = 16*IN_MILISECONDS; - m_uiSaberLashTimer = 20*IN_MILISECONDS; - m_uiShockTimer = 10*IN_MILISECONDS; - m_uiTotemTimer = 12*IN_MILISECONDS; - m_uiBerserkTimer = 10*MINUTE*IN_MILISECONDS; + m_uiCheckTimer = IN_MILLISECONDS; + m_uiFrenzyTimer = 16*IN_MILLISECONDS; + m_uiSaberLashTimer = 20*IN_MILLISECONDS; + m_uiShockTimer = 10*IN_MILLISECONDS; + m_uiTotemTimer = 12*IN_MILLISECONDS; + m_uiBerserkTimer = 10*MINUTE*IN_MILLISECONDS; m_bIsBerserk = false; m_creature->SetMaxHealth(m_creature->GetCreatureInfo()->maxhealth); @@ -182,14 +182,14 @@ struct MANGOS_DLL_DECL boss_halazziAI : public ScriptedAI { // final phase m_uiPhase = PHASE_FINAL; - m_uiFrenzyTimer = 16*IN_MILISECONDS; - m_uiSaberLashTimer = 20*IN_MILISECONDS; + m_uiFrenzyTimer = 16*IN_MILLISECONDS; + m_uiSaberLashTimer = 20*IN_MILLISECONDS; } else { m_uiPhase = PHASE_TOTEM; - m_uiShockTimer = 10*IN_MILISECONDS; - m_uiTotemTimer = 12*IN_MILISECONDS; + m_uiShockTimer = 10*IN_MILLISECONDS; + m_uiTotemTimer = 12*IN_MILLISECONDS; DoScriptText(SAY_SPLIT, m_creature); m_creature->CastSpell(m_creature, SPELL_TRANSFIGURE_TO_TROLL, false); @@ -221,8 +221,8 @@ struct MANGOS_DLL_DECL boss_halazziAI : public ScriptedAI if (pSpiritLynx) pSpiritLynx->ForcedDespawn(); - m_uiFrenzyTimer = 16*IN_MILISECONDS; - m_uiSaberLashTimer = 20*IN_MILISECONDS; + m_uiFrenzyTimer = 16*IN_MILLISECONDS; + m_uiSaberLashTimer = 20*IN_MILLISECONDS; } } } @@ -253,7 +253,7 @@ struct MANGOS_DLL_DECL boss_halazziAI : public ScriptedAI else m_uiPhase = PHASE_FINAL; - m_uiCheckTimer = IN_MILISECONDS; + m_uiCheckTimer = IN_MILLISECONDS; } else m_uiCheckTimer -= uiDiff; @@ -264,7 +264,7 @@ struct MANGOS_DLL_DECL boss_halazziAI : public ScriptedAI if (m_uiFrenzyTimer < uiDiff) { DoCastSpellIfCan(m_creature, SPELL_FRENZY); - m_uiFrenzyTimer = 16*IN_MILISECONDS; + m_uiFrenzyTimer = 16*IN_MILLISECONDS; } else m_uiFrenzyTimer -= uiDiff; @@ -274,7 +274,7 @@ struct MANGOS_DLL_DECL boss_halazziAI : public ScriptedAI DoScriptText(urand(0, 1) ? SAY_SABERLASH1 : SAY_SABERLASH2, m_creature); DoCastSpellIfCan(m_creature->getVictim(), SPELL_SABER_LASH); - m_uiSaberLashTimer = 20*IN_MILISECONDS; + m_uiSaberLashTimer = 20*IN_MILLISECONDS; } else m_uiSaberLashTimer -= uiDiff; @@ -285,7 +285,7 @@ struct MANGOS_DLL_DECL boss_halazziAI : public ScriptedAI if (m_uiTotemTimer < uiDiff) { DoCastSpellIfCan(m_creature, SPELL_SUMMON_TOTEM); - m_uiTotemTimer = 20*IN_MILISECONDS; + m_uiTotemTimer = 20*IN_MILLISECONDS; } else m_uiTotemTimer -= uiDiff; diff --git a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp index b6524ebc1..79458958a 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp @@ -200,9 +200,9 @@ struct MANGOS_DLL_DECL boss_janalaiAI : public ScriptedAI m_bCanBlowUpBombs = false; m_bIsEggRemaining = true; - enrage_timer = MINUTE*5*IN_MILISECONDS; + enrage_timer = MINUTE*5*IN_MILLISECONDS; hatchertime = 10000; - wipetimer = MINUTE*10*IN_MILISECONDS; + wipetimer = MINUTE*10*IN_MILLISECONDS; enraged = false; enragetime = false; } @@ -308,7 +308,7 @@ struct MANGOS_DLL_DECL boss_janalaiAI : public ScriptedAI //workaround part //m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), fRadius+(fRadius*i), fX, fY, fZ); - //m_creature->SummonCreature(NPC_FIRE_BOMB, fX, fY, fZ, 0.0f, TEMPSUMMON_TIMED_DESPAWN, MINUTE*IN_MILISECONDS); + //m_creature->SummonCreature(NPC_FIRE_BOMB, fX, fY, fZ, 0.0f, TEMPSUMMON_TIMED_DESPAWN, MINUTE*IN_MILLISECONDS); } ++m_uiBombCounter; diff --git a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp index 0425b2522..f7bbf03c2 100644 --- a/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp +++ b/scripts/eastern_kingdoms/zulaman/instance_zulaman.cpp @@ -59,7 +59,7 @@ struct MANGOS_DLL_DECL instance_zulaman : public ScriptedInstance memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); memset(&m_auiRandVendor, 0, sizeof(m_auiRandVendor)); - m_uiEventTimer = MINUTE*IN_MILISECONDS; + m_uiEventTimer = MINUTE*IN_MILLISECONDS; m_uiEventMinuteStep = MINUTE/3; m_uiGongCount = 0; @@ -341,7 +341,7 @@ struct MANGOS_DLL_DECL instance_zulaman : public ScriptedInstance DoUpdateWorldState(WORLD_STATE_COUNTER, m_uiEventMinuteStep); debug_log("SD2: Instance Zulaman: minute decrease to %u.",m_uiEventMinuteStep); - m_uiEventTimer = MINUTE*IN_MILISECONDS; + m_uiEventTimer = MINUTE*IN_MILLISECONDS; } else m_uiEventTimer -= uiDiff; diff --git a/scripts/northrend/naxxramas/boss_gluth.cpp b/scripts/northrend/naxxramas/boss_gluth.cpp index add44af29..08a238a9d 100644 --- a/scripts/northrend/naxxramas/boss_gluth.cpp +++ b/scripts/northrend/naxxramas/boss_gluth.cpp @@ -142,7 +142,7 @@ struct MANGOS_DLL_DECL boss_gluthAI : public ScriptedAI m_uiEnrageTimer = 60000; Summon_Timer = 10000; - m_uiBerserkTimer = MINUTE*8*IN_MILISECONDS; + m_uiBerserkTimer = MINUTE*8*IN_MILLISECONDS; RangeCheck_Timer = 1000; m_lZombieGUIDList.clear(); @@ -275,7 +275,7 @@ struct MANGOS_DLL_DECL boss_gluthAI : public ScriptedAI if (m_uiBerserkTimer < uiDiff) { DoCast(m_creature, SPELL_BERSERK, true); - m_uiBerserkTimer = MINUTE*5*IN_MILISECONDS; + m_uiBerserkTimer = MINUTE*5*IN_MILLISECONDS; } else m_uiBerserkTimer -= uiDiff; diff --git a/scripts/northrend/naxxramas/boss_patchwerk.cpp b/scripts/northrend/naxxramas/boss_patchwerk.cpp index 12f5e3061..2201b8edb 100644 --- a/scripts/northrend/naxxramas/boss_patchwerk.cpp +++ b/scripts/northrend/naxxramas/boss_patchwerk.cpp @@ -62,7 +62,7 @@ struct MANGOS_DLL_DECL boss_patchwerkAI : public ScriptedAI void Reset() { m_uiHatefulStrikeTimer = 1000; //1 second - m_uiBerserkTimer = MINUTE*6*IN_MILISECONDS; //6 minutes + m_uiBerserkTimer = MINUTE*6*IN_MILLISECONDS; //6 minutes m_uiSlimeboltTimer = 10000; m_bEnraged = false; m_bBerserk = false; diff --git a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp index bd5a7b15d..901ceed03 100644 --- a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp +++ b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp @@ -197,7 +197,7 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI m_bIsBerserk = false; m_bIsSoftEnraged = false; - m_uiEnrageTimer = MINUTE*15*IN_MILISECONDS; + m_uiEnrageTimer = MINUTE*15*IN_MILLISECONDS; m_bIsHardEnraged = false; m_uiTenebronTimer = 30000; diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp index ac9c4ef3f..9221bf053 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp @@ -232,7 +232,7 @@ struct MANGOS_DLL_DECL boss_kelesethAI : public ScriptedAI void SummonAdds() { for (uint8 i=0; i<4; ++i) - m_creature->SummonCreature(NPC_VRYKUL_SKELETON, fAddPosition[0]+rand()%7, fAddPosition[1]+rand()%7, fAddPosition[2], fAddPosition[3], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, MINUTE*IN_MILISECONDS); + m_creature->SummonCreature(NPC_VRYKUL_SKELETON, fAddPosition[0]+rand()%7, fAddPosition[1]+rand()%7, fAddPosition[2], fAddPosition[3], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, MINUTE*IN_MILLISECONDS); } void DespawnAdds() diff --git a/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp b/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp index 01b22997c..6bd4bd43b 100644 --- a/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp @@ -49,7 +49,7 @@ struct MANGOS_DLL_DECL instance_sethekk_halls : public ScriptedInstance { case DATA_IKISSDOOREVENT: if (uiData == DONE) - DoUseDoorOrButton(m_uiIkissDoorGUID,DAY*IN_MILISECONDS); + DoUseDoorOrButton(m_uiIkissDoorGUID,DAY*IN_MILLISECONDS); break; } } diff --git a/scripts/outland/black_temple/boss_warlord_najentus.cpp b/scripts/outland/black_temple/boss_warlord_najentus.cpp index 05df6da13..5599eb9e1 100644 --- a/scripts/outland/black_temple/boss_warlord_najentus.cpp +++ b/scripts/outland/black_temple/boss_warlord_najentus.cpp @@ -71,7 +71,7 @@ struct MANGOS_DLL_DECL boss_najentusAI : public ScriptedAI m_bIsShielded = false; m_uiNeedleSpineTimer = 10000; - m_uiEnrageTimer = MINUTE*8*IN_MILISECONDS; + m_uiEnrageTimer = MINUTE*8*IN_MILLISECONDS; m_uiSpecialYellTimer = urand(45000, 120000); m_uiTidalShieldTimer = 60000; m_uiImpalingSpineTimer = 20000; @@ -133,7 +133,7 @@ struct MANGOS_DLL_DECL boss_najentusAI : public ScriptedAI DoScriptText(SAY_ENRAGE2, m_creature); DoCastSpellIfCan(m_creature, SPELL_BERSERK); - m_uiEnrageTimer = MINUTE*8*IN_MILISECONDS; + m_uiEnrageTimer = MINUTE*8*IN_MILLISECONDS; }else m_uiEnrageTimer -= diff; if (m_bIsShielded) diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp index 0ad9c7480..59c366678 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp @@ -90,7 +90,7 @@ struct MANGOS_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI m_uiWhirlwind_Timer = 18500; m_uiInnerDemon_Timer = 15000; m_uiSwitch_Timer = 45000; - m_uiEnrage_Timer = MINUTE*10*IN_MILISECONDS; + m_uiEnrage_Timer = MINUTE*10*IN_MILLISECONDS; m_bDemonForm = false; m_bIsFinalForm = false; @@ -266,7 +266,7 @@ struct MANGOS_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI m_creature->InterruptNonMeleeSpells(false); DoCastSpellIfCan(m_creature, SPELL_ENRAGE); - m_uiEnrage_Timer = MINUTE*5*IN_MILISECONDS; + m_uiEnrage_Timer = MINUTE*5*IN_MILLISECONDS; }else m_uiEnrage_Timer -= uiDiff; if (!m_bDemonForm) diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp index 76707fb13..579182439 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp @@ -67,7 +67,7 @@ struct MANGOS_DLL_DECL instance_ramparts : public ScriptedInstance { case TYPE_VAZRUDEN: if (uiData == DONE && m_auiEncounter[1] == DONE) - DoRespawnGameObject(instance->IsRegularDifficulty() ? m_uiChestNGUID : m_uiChestHGUID, HOUR*IN_MILISECONDS); + DoRespawnGameObject(instance->IsRegularDifficulty() ? m_uiChestNGUID : m_uiChestHGUID, HOUR*IN_MILLISECONDS); m_auiEncounter[0] = uiData; break; case TYPE_NAZAN: @@ -80,7 +80,7 @@ struct MANGOS_DLL_DECL instance_ramparts : public ScriptedInstance } if (uiData == DONE && m_auiEncounter[0] == DONE) { - DoRespawnGameObject(instance->IsRegularDifficulty() ? m_uiChestNGUID : m_uiChestHGUID, HOUR*IN_MILISECONDS); + DoRespawnGameObject(instance->IsRegularDifficulty() ? m_uiChestNGUID : m_uiChestHGUID, HOUR*IN_MILLISECONDS); m_auiEncounter[1] = uiData; } if (uiData == IN_PROGRESS) diff --git a/scripts/outland/hellfire_peninsula.cpp b/scripts/outland/hellfire_peninsula.cpp index abcf416fb..73cb83032 100644 --- a/scripts/outland/hellfire_peninsula.cpp +++ b/scripts/outland/hellfire_peninsula.cpp @@ -212,7 +212,7 @@ enum NPC_SPAWNER = 22260, //just a dummy, not used MAX_BUTTRESS = 4, - TIME_TOTAL = MINUTE*10*IN_MILISECONDS, + TIME_TOTAL = MINUTE*10*IN_MILLISECONDS, SPELL_SUMMONED_DEMON = 7741, //visual spawn-in for demon SPELL_DEMONIAC_VISITATION = 38708, //create item diff --git a/scripts/world/spell_scripts.cpp b/scripts/world/spell_scripts.cpp index 5cc3d6316..43097bbed 100644 --- a/scripts/world/spell_scripts.cpp +++ b/scripts/world/spell_scripts.cpp @@ -188,7 +188,7 @@ bool EffectAuraDummy_spell_aura_dummy_npc(const Aura* pAura, bool bApply) if (pCreature->getStandState() == UNIT_STAND_STATE_KNEEL) pCreature->SetStandState(UNIT_STAND_STATE_STAND); - pCreature->ForcedDespawn(60*IN_MILISECONDS); + pCreature->ForcedDespawn(60*IN_MILLISECONDS); } return true; From d9ff27183774293d8cd020da5010080013133514 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 31 Mar 2010 18:13:33 +0400 Subject: [PATCH 208/405] TOC part 29 && BSW class improve --- .../spell_comment_from_wowd_scriptdev2.sql | 18 ++++ include/sc_boss_spell_worker.cpp | 94 ++++++++++++++----- .../boss_anubarak_trial.cpp | 1 + .../boss_northrend_beasts.cpp | 24 +++-- .../boss_twin_valkyr.cpp | 2 + .../instance_trial_of_the_crusader.cpp | 9 +- .../trial_of_the_crusader.cpp | 47 ++++------ .../trial_of_the_crusader.h | 10 +- 8 files changed, 140 insertions(+), 65 deletions(-) create mode 100644 addition/spell_comment_from_wowd_scriptdev2.sql diff --git a/addition/spell_comment_from_wowd_scriptdev2.sql b/addition/spell_comment_from_wowd_scriptdev2.sql new file mode 100644 index 000000000..b909eb08c --- /dev/null +++ b/addition/spell_comment_from_wowd_scriptdev2.sql @@ -0,0 +1,18 @@ +-- Insert comments to scriptdev2 boss_spell_table from WOWD database. +-- Change WOWD database name if you use this! + +CREATE ALGORITHM = TEMPTABLE VIEW `commentlist` +(`entry` ,`spell`, `comment`) +AS SELECT `scriptdev2`.`boss_spell_table`.`entry`, +`spellID_N10`, +CONCAT(`mangos`.`creature_template`.`name`, +' : ', +`mangos`.`wowd_spell`.`SpellName`) +FROM `scriptdev2`.`boss_spell_table` +INNER JOIN `mangos`.`creature_template` ON `mangos`.`creature_template`.`entry` = `scriptdev2`.`boss_spell_table`.`entry` +INNER JOIN `mangos`.`wowd_spell` ON `mangos`.`wowd_spell`.`id` = `scriptdev2`.`boss_spell_table`.`spellID_N10`; + +UPDATE `scriptdev2`.`boss_spell_table` SET `comment` = (SELECT DISTINCT `commentlist`.`comment` +FROM `commentlist` WHERE `scriptdev2`.`boss_spell_table`.`entry` = `commentlist`.`entry` +AND `scriptdev2`.`boss_spell_table`.`spellID_N10` = `commentlist`.`spell`); +DROP VIEW `commentlist`; diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index 34a0fb43b..bbbe61e45 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -15,10 +15,15 @@ BossSpellWorker::BossSpellWorker(ScriptedAI* bossAI) currentDifficulty = RAID_DIFFICULTY_10MAN_NORMAL; memset(&m_uiSpell_Timer, 0, sizeof(m_uiSpell_Timer)); memset(&m_BossSpell,0,sizeof(m_BossSpell)); - debug_log("BSW: Initializing BossSpellWorker object"); + debug_log("BSW: Initializing BossSpellWorker object for boss %u",bossID); LoadSpellTable(); }; +BossSpellWorker::~BossSpellWorker() +{ + debug_log("BSW: Removing BossSpellWorker object for boss %u",bossID); +}; + void BossSpellWorker::Reset(uint8 _Difficulty) { currentDifficulty = setDifficulty(_Difficulty); @@ -109,20 +114,24 @@ void BossSpellWorker::LoadSpellTable() m_BossSpell[uiCount].m_CastTarget = getBSWCastType(pFields[7+DIFFICULTY_LEVELS*4].GetUInt8()); - m_BossSpell[uiCount].m_IsVisualEffect = (pFields[8+DIFFICULTY_LEVELS*4].GetUInt8() == 0) ? true : false ; + m_BossSpell[uiCount].m_IsVisualEffect = (pFields[8+DIFFICULTY_LEVELS*4].GetUInt8() == 0) ? false : true ; - m_BossSpell[uiCount].m_IsBugged = (pFields[9+DIFFICULTY_LEVELS*4].GetUInt8() == 0) ? true : false ; + m_BossSpell[uiCount].m_IsBugged = (pFields[9+DIFFICULTY_LEVELS*4].GetUInt8() == 0) ? false : true ; m_BossSpell[uiCount].textEntry = pFields[10+DIFFICULTY_LEVELS*4].GetInt32(); if (bossEntry != bossID) error_db_log("BSW: Unknown error while load boss_spell_table"); + ++uiCount; + } while (Result->NextRow()); bossSpellCount = uiCount; delete Result; + _fillEmptyDataField(); + debug_log("BSW: Loaded %u boss spell data records for boss %u", uiCount, bossID); } else @@ -161,41 +170,46 @@ CanCastResult BossSpellWorker::_BSWSpellSelector(uint8 m_uiSpellIdx, Unit* pTarg SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; Unit* pSummon = NULL; -// debug_log("BSW: Casting (after select) spell number %u type %u",m_uiSpellIdx, pSpell->m_CastTarget); + debug_log("BSW: Casting spell number %u type %u",pSpell->m_uiSpellEntry[currentDifficulty], pSpell->m_CastTarget); switch (pSpell->m_CastTarget) { + case DO_NOTHING: + return CAST_OK; + case CAST_ON_SELF: if (!pSpell->m_IsBugged) return _DoCastSpellIfCan(boss, pSpell->m_uiSpellEntry[currentDifficulty]); else return _BSWDoCast(m_uiSpellIdx, boss); break; case CAST_ON_SUMMONS: - return CAST_FAIL_OTHER; + if (!pTarget) return CAST_FAIL_OTHER; + else return _DoCastSpellIfCan(pTarget, pSpell->m_uiSpellEntry[currentDifficulty]); break; case CAST_ON_VICTIM: pTarget = boss->getVictim(); + if (!pTarget) return CAST_FAIL_OTHER; if (pTarget && !pSpell->m_IsBugged) return _DoCastSpellIfCan(boss->getVictim(), pSpell->m_uiSpellEntry[currentDifficulty]); if (pTarget && pSpell->m_IsBugged) return _BSWDoCast(m_uiSpellIdx, boss->getVictim()); break; - case CAST_ON_TARGET: - if (!pTarget) pTarget = boss->getVictim(); + case CAST_ON_RANDOM: + pTarget = SelectUnit(SELECT_TARGET_RANDOM); + if (!pTarget) return CAST_FAIL_OTHER; if (pTarget && !pSpell->m_IsBugged) return _DoCastSpellIfCan(pTarget, pSpell->m_uiSpellEntry[currentDifficulty]); if (pTarget && pSpell->m_IsBugged) return _BSWDoCast(m_uiSpellIdx, pTarget); break; - case CAST_ON_RANDOM: - pTarget = SelectUnit(SELECT_TARGET_RANDOM); - if (!pTarget) pTarget = boss->getVictim(); + case CAST_ON_BOTTOMAGGRO: + pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); + if (!pTarget) return CAST_FAIL_OTHER; if (pTarget && !pSpell->m_IsBugged) return _DoCastSpellIfCan(pTarget, pSpell->m_uiSpellEntry[currentDifficulty]); if (pTarget && pSpell->m_IsBugged) return _BSWDoCast(m_uiSpellIdx, pTarget); break; - case CAST_ON_BOTTOMAGGRO: - pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1); - if (!pTarget) pTarget = boss->getVictim(); + case CAST_ON_TARGET: + if (!pTarget) return CAST_FAIL_OTHER; if (pTarget && !pSpell->m_IsBugged) return _DoCastSpellIfCan(pTarget, pSpell->m_uiSpellEntry[currentDifficulty]); if (pTarget && pSpell->m_IsBugged) return _BSWDoCast(m_uiSpellIdx, pTarget); break; @@ -260,18 +274,23 @@ uint8 BossSpellWorker::FindSpellIDX(uint32 SpellID) for(uint8 i = 0; i < bossSpellCount; ++i) if (m_BossSpell[i].m_uiSpellEntry[RAID_DIFFICULTY_10MAN_NORMAL] == SpellID) return i; - error_log("BSW: spell not found in spelltable. Memory error?"); + error_log("BSW: spell not found in spelltable. Memory or database error?"); return SPELL_INDEX_ERROR; } Difficulty BossSpellWorker::setDifficulty(uint8 _Difficulty) { switch (_Difficulty) { - case 0: return RAID_DIFFICULTY_10MAN_NORMAL; - case 1: return RAID_DIFFICULTY_25MAN_NORMAL; - case 2: return RAID_DIFFICULTY_10MAN_HEROIC; - case 3: return RAID_DIFFICULTY_25MAN_HEROIC; - default: return RAID_DIFFICULTY_10MAN_NORMAL; + case RAID_DIFFICULTY_10MAN_NORMAL: + return RAID_DIFFICULTY_10MAN_NORMAL; + case RAID_DIFFICULTY_25MAN_NORMAL: + return RAID_DIFFICULTY_25MAN_NORMAL; + case RAID_DIFFICULTY_10MAN_HEROIC: + return RAID_DIFFICULTY_10MAN_HEROIC; + case RAID_DIFFICULTY_25MAN_HEROIC: + return RAID_DIFFICULTY_25MAN_HEROIC; + default: + return RAID_DIFFICULTY_10MAN_NORMAL; }; } @@ -297,8 +316,10 @@ BossSpellTableParameters BossSpellWorker::getBSWCastType(uint32 pTemp) CanCastResult BossSpellWorker::_BSWDoCast(uint8 m_uiSpellIdx, Unit* pTarget) { + if (!pTarget) return CAST_FAIL_OTHER; SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; - boss->CastSpell(pTarget, pSpell->m_uiSpellEntry[currentDifficulty], false); + debug_log("BSW: Casting bugged spell number %u type %u",pSpell->m_uiSpellEntry[currentDifficulty], pSpell->m_CastTarget); + pTarget->CastSpell(pTarget, pSpell->m_uiSpellEntry[currentDifficulty], false); }; void BossSpellWorker::_fillEmptyDataField() @@ -324,6 +345,8 @@ Unit* BossSpellWorker::_doSummon(uint8 m_uiSpellIdx, TempSummonType summontype, { SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + debug_log("BSW: Summoning creature number %u type %u despawn delay %u",pSpell->m_uiSpellEntry[currentDifficulty], pSpell->m_CastTarget, delay); + if (pSpell->LocData.z <= 1.0f) { float fPosX, fPosY, fPosZ; boss->GetPosition(fPosX, fPosY, fPosZ); @@ -334,9 +357,34 @@ Unit* BossSpellWorker::_doSummon(uint8 m_uiSpellIdx, TempSummonType summontype, bool BossSpellWorker::_doRemove(uint8 m_uiSpellIdx, Unit* pTarget) { - if (!pTarget) pTarget = boss; SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + debug_log("BSW: Removing effect of spell %u type %u",pSpell->m_uiSpellEntry[currentDifficulty], pSpell->m_CastTarget); + + switch (pSpell->m_CastTarget) { + case DO_NOTHING: + return true; + case SUMMON_NORMAL: + case SUMMON_TEMP: + case SUMMON_INSTANT: + return false; + + case CAST_ON_SELF: + case APPLY_AURA_SELF: + if (!pTarget) pTarget = boss; + break; + + case CAST_ON_SUMMONS: + case CAST_ON_VICTIM: + case CAST_ON_RANDOM: + case CAST_ON_BOTTOMAGGRO: + case CAST_ON_TARGET: + case APPLY_AURA_TARGET: + if (!pTarget) return false; + break; + + default: return false; + } if (pTarget) { if (pTarget->isAlive()) { if ( pTarget->HasAura(pSpell->m_uiSpellEntry[currentDifficulty]) && @@ -349,13 +397,14 @@ bool BossSpellWorker::_doRemove(uint8 m_uiSpellIdx, Unit* pTarget) } else pTarget->RemoveAurasDueToSpell(pSpell->m_uiSpellEntry[currentDifficulty]); } - return true; + return true; }; // Copypasting from CreatureAI.cpp. if this called from bossAI-> crashed :( CanCastResult BossSpellWorker::_CanCastSpell(Unit* pTarget, const SpellEntry *pSpell, bool isTriggered) { + if (!pTarget) return CAST_FAIL_OTHER; // If not triggered, we check if (!isTriggered) { @@ -399,6 +448,7 @@ CanCastResult BossSpellWorker::_CanCastSpell(Unit* pTarget, const SpellEntry *pS CanCastResult BossSpellWorker::_DoCastSpellIfCan(Unit* pTarget, uint32 uiSpell, uint32 uiCastFlags, uint64 uiOriginalCasterGUID) { Unit* pCaster = boss; + if (!pTarget) return CAST_FAIL_OTHER; if (uiCastFlags & CAST_FORCE_TARGET_SELF) pCaster = pTarget; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp index 375d21198..4e7f12212 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp @@ -79,6 +79,7 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); bsw = new BossSpellWorker(this); bsw->Reset(Difficulty); + m_creature->SetRespawnDelay(DAY); } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index aac3db693..9536622c0 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -94,12 +94,14 @@ struct MANGOS_DLL_DECL boss_gormokAI : public ScriptedAI bsw = new BossSpellWorker(this); bsw->Reset(Difficulty); SetEquipmentSlots(false, EQUIP_MAIN, EQUIP_OFFHAND, EQUIP_RANGED); + m_creature->SetRespawnDelay(DAY); + m_creature->SetInCombatWithZone(); } void JustDied(Unit* pKiller) { if (!m_pInstance) return; - m_pInstance->SetData(TYPE_NORTHREND_BEASTS, GORMOK_DONE); + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, GORMOK_DONE); } void JustReachedHome() @@ -111,7 +113,6 @@ struct MANGOS_DLL_DECL boss_gormokAI : public ScriptedAI void Aggro(Unit* pWho) { - m_creature->SetInCombatWithZone(); m_pInstance->SetData(TYPE_NORTHREND_BEASTS, GORMOK_IN_PROGRESS); } @@ -225,13 +226,15 @@ struct MANGOS_DLL_DECL boss_acidmawAI : public ScriptedAI m_creature->SetInCombatWithZone(); bsw = new BossSpellWorker(this); bsw->Reset(Difficulty); - + m_creature->SetRespawnDelay(DAY); } void JustDied(Unit* pKiller) { if (!m_pInstance) return; - m_pInstance->SetData(TYPE_NORTHREND_BEASTS, SNAKES_SPECIAL); + if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == SNAKES_SPECIAL) + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, SNAKES_DONE); + else m_pInstance->SetData(TYPE_NORTHREND_BEASTS, SNAKES_SPECIAL); } void JustReachedHome() @@ -295,8 +298,7 @@ struct MANGOS_DLL_DECL boss_acidmawAI : public ScriptedAI break;} } - if (Creature* pSister = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_DREADSCALE))) - if (!pSister->isAlive() && !enraged) + if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == SNAKES_SPECIAL && !enraged) { m_pInstance->SetData(TYPE_NORTHREND_BEASTS, IN_PROGRESS); bsw->doRemove(SPELL_SUBMERGE_0); @@ -337,12 +339,15 @@ struct MANGOS_DLL_DECL boss_dreadscaleAI : public ScriptedAI m_creature->SetInCombatWithZone(); bsw = new BossSpellWorker(this); bsw->Reset(Difficulty); + m_creature->SetRespawnDelay(DAY); } void JustDied(Unit* pKiller) { if (!m_pInstance) return; - m_pInstance->SetData(TYPE_NORTHREND_BEASTS, SNAKES_SPECIAL); + if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == SNAKES_SPECIAL) + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, SNAKES_DONE); + else m_pInstance->SetData(TYPE_NORTHREND_BEASTS, SNAKES_SPECIAL); } void JustReachedHome() @@ -405,10 +410,8 @@ struct MANGOS_DLL_DECL boss_dreadscaleAI : public ScriptedAI break;} } - if (Creature* pSister = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_ACIDMAW))) - if (!pSister->isAlive() && !enraged) + if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == SNAKES_SPECIAL && !enraged) { - m_pInstance->SetData(TYPE_NORTHREND_BEASTS, IN_PROGRESS); bsw->doRemove(SPELL_SUBMERGE_0); bsw->doCast(SPELL_ENRAGE); enraged = true; @@ -441,6 +444,7 @@ struct MANGOS_DLL_DECL boss_icehowlAI : public ScriptedAI Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); bsw = new BossSpellWorker(this); bsw->Reset(Difficulty); + m_creature->SetRespawnDelay(DAY); } void JustDied(Unit* pKiller) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp index 8529a71e4..4c6c64236 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp @@ -91,6 +91,7 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI if (m_creature->isAlive()) m_creature->SummonCreature(NPC_LIGHT_ESSENCE, SpawnLoc[25].x, SpawnLoc[25].y, SpawnLoc[25].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); bsw = new BossSpellWorker(this); bsw->Reset(Difficulty); + m_creature->SetRespawnDelay(DAY); } void JustReachedHome() @@ -178,6 +179,7 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI if (m_creature->isAlive()) m_creature->SummonCreature(NPC_DARK_ESSENCE, SpawnLoc[23].x, SpawnLoc[23].y, SpawnLoc[23].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); bsw = new BossSpellWorker(this); bsw->Reset(Difficulty); + m_creature->SetRespawnDelay(DAY); } void JustReachedHome() diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index 55dbe48d6..a3d4ea0ad 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -88,7 +88,6 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance uint64 m_uiCrusader01Guid; uint64 m_uiCrusader02Guid; - uint64 m_uiCrusadersCacheGUID; uint64 m_uiFloorGUID; @@ -107,6 +106,8 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance uint64 m_uiTributeChest3GUID; uint64 m_uiTributeChest4GUID; + uint64 m_uiMainGateDoorGUID; + void Initialize() { for (uint8 i = 0; i < MAX_ENCOUNTERS; ++i) @@ -229,6 +230,10 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance case GO_ARGENT_COLISEUM_FLOOR: m_uiFloorGUID = pGo->GetGUID(); break; + case GO_MAIN_GATE_DOOR: + m_uiMainGateDoorGUID = pGo->GetGUID(); + break; + case GO_TRIBUTE_CHEST_10H_25: m_uiTC10h25GUID = pGo->GetGUID(); break; case GO_TRIBUTE_CHEST_10H_45: m_uiTC10h45GUID = pGo->GetGUID(); break; case GO_TRIBUTE_CHEST_10H_50: m_uiTC10h50GUID = pGo->GetGUID(); break; @@ -379,6 +384,8 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance case NPC_CRUSADER_0_2: return m_uiCrusader02Guid; case GO_ARGENT_COLISEUM_FLOOR: return m_uiFloorGUID; + case GO_MAIN_GATE_DOOR: return m_uiMainGateDoorGUID; + } return 0; } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index 41c0c6209..9f8226a04 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -35,11 +35,11 @@ struct _Messages static _Messages _GossipMessage[]= { {"Вы готовы пройти Испытание Крестоносца?",GOSSIP_ACTION_INFO_DEF+1,false,TYPE_BEASTS}, // -{"Вы готовы к следующему этапу?",GOSSIP_ACTION_INFO_DEF+2,true,TYPE_BEASTS}, // -{"Вы готовы драться с крестоносцами альянса?",GOSSIP_ACTION_INFO_DEF+3,true,TYPE_JARAXXUS}, // -{"Вы готовы драться с крестоносцами орды?",GOSSIP_ACTION_INFO_DEF+4,true,TYPE_JARAXXUS}, // -{"Вы готовы к следующему этапу?",GOSSIP_ACTION_INFO_DEF+5,true,TYPE_CRUSADERS}, // -{"Вы готовы продолжить бой с Ануб-Араком?",GOSSIP_ACTION_INFO_DEF+6,true,TYPE_LICH_KING}, // +{"Вы готовы к следующему этапу?",GOSSIP_ACTION_INFO_DEF+2,false,TYPE_JARAXXUS}, // +{"Вы готовы драться с крестоносцами альянса?",GOSSIP_ACTION_INFO_DEF+3,false,TYPE_CRUSADERS}, // +{"Вы готовы драться с крестоносцами орды?",GOSSIP_ACTION_INFO_DEF+4,false,TYPE_CRUSADERS}, // +{"Вы готовы к следующему этапу?",GOSSIP_ACTION_INFO_DEF+5,false,TYPE_VALKIRIES}, // +{"Вы готовы продолжить бой с Ануб-Араком?",GOSSIP_ACTION_INFO_DEF+6,false,TYPE_LICH_KING}, // {"Не надо сюда тыкать. На сегодня арена закрыта.",GOSSIP_ACTION_INFO_DEF+7,true,TYPE_ANUBARAK}, // }; enum @@ -237,10 +237,13 @@ bool GossipHello_npc_toc_announcer(Player* pPlayer, Creature* pCreature) for(uint8 i = 0; i < NUM_MESSAGES; i++) { if (!_GossipMessage[i].state && (pInstance->GetData(_GossipMessage[i].encounter) != DONE )) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, _GossipMessage[i].name, GOSSIP_SENDER_MAIN,_GossipMessage[i].id); + if ( i==2 ) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, _GossipMessage[i+1].name, GOSSIP_SENDER_MAIN,_GossipMessage[i+1].id); break; } - if (_GossipMessage[i].state && pInstance->GetData(_GossipMessage[i].encounter) == DONE) + if (_GossipMessage[i].state && pInstance->GetData(_GossipMessage[i].encounter) == DONE) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, _GossipMessage[i].name, GOSSIP_SENDER_MAIN,_GossipMessage[i].id); + break; + } }; pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); @@ -256,30 +259,26 @@ pPlayer->CLOSE_GOSSIP_MENU(); switch(uiAction) { case GOSSIP_ACTION_INFO_DEF+1: { - if (pInstance->GetData(TYPE_BEASTS) == NOT_STARTED || - pInstance->GetData(TYPE_BEASTS) == FAIL) + if (pInstance->GetData(TYPE_BEASTS) != DONE) pInstance->SetData(TYPE_EVENT,110); break; }; case GOSSIP_ACTION_INFO_DEF+2: { - if (pInstance->GetData(TYPE_JARAXXUS) == NOT_STARTED || - pInstance->GetData(TYPE_JARAXXUS) == FAIL) + if (pInstance->GetData(TYPE_JARAXXUS) != DONE) pInstance->SetData(TYPE_EVENT,1010); break; }; case GOSSIP_ACTION_INFO_DEF+3: { - if (pInstance->GetData(TYPE_CRUSADERS) == NOT_STARTED || - pInstance->GetData(TYPE_CRUSADERS) == FAIL) + if (pInstance->GetData(TYPE_CRUSADERS) != DONE) pInstance->SetData(TYPE_EVENT,3001); break; }; case GOSSIP_ACTION_INFO_DEF+4: { - if (pInstance->GetData(TYPE_CRUSADERS) == NOT_STARTED || - pInstance->GetData(TYPE_CRUSADERS) == FAIL) + if (pInstance->GetData(TYPE_CRUSADERS) != DONE) pInstance->SetData(TYPE_EVENT,3000); break; }; @@ -546,13 +545,6 @@ struct MANGOS_DLL_DECL npc_fizzlebang_tocAI : public ScriptedAI case 1140: pInstance->SetData(TYPE_STAGE,4); pInstance->SetData(TYPE_JARAXXUS,IN_PROGRESS); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_JARAXXUS))) { - pTemp->Respawn(); - m_creature->SetInCombatWith(pTemp); - pTemp->AddThreat(m_creature, 1000.0f); - pTemp->AI()->AttackStart(m_creature); - } - else { m_creature->SummonCreature(NPC_JARAXXUS, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_JARAXXUS))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); @@ -562,8 +554,6 @@ struct MANGOS_DLL_DECL npc_fizzlebang_tocAI : public ScriptedAI pTemp->AddThreat(m_creature, 1000.0f); pTemp->AI()->AttackStart(m_creature); } - } - pInstance->SetData(TYPE_EVENT, 1150); UpdateTimer = 500; break; @@ -602,7 +592,7 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI Reset(); } - InstanceData* pInstance; + ScriptedInstance* pInstance; uint32 UpdateTimer; void Reset() @@ -635,8 +625,9 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI case 140: m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_TALK); DoScriptText(-1713501, m_creature); - UpdateTimer = 10000; + UpdateTimer = 8000; pInstance->SetData(TYPE_EVENT,150); + pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_MAIN_GATE_DOOR)); break; case 150: m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE); @@ -652,6 +643,7 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI } UpdateTimer = 10000; pInstance->SetData(TYPE_EVENT,160); + pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_MAIN_GATE_DOOR)); break; case 200: @@ -659,6 +651,7 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI UpdateTimer = 10000; pInstance->SetData(TYPE_EVENT,210); break; + case 210: m_creature->SummonCreature(NPC_DREADSCALE, SpawnLoc[3].x, SpawnLoc[3].y, SpawnLoc[3].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); m_creature->SummonCreature(NPC_ACIDMAW, SpawnLoc[4].x, SpawnLoc[4].y, SpawnLoc[4].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); @@ -699,9 +692,7 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI case 1010: DoScriptText(-1713510, m_creature); UpdateTimer = 5000; - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_FIZZLEBANG))) - pTemp->Respawn(); - else m_creature->SummonCreature(NPC_FIZZLEBANG, SpawnLoc[21].x, SpawnLoc[21].y, SpawnLoc[21].z, 2, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + m_creature->SummonCreature(NPC_FIZZLEBANG, SpawnLoc[21].x, SpawnLoc[21].y, SpawnLoc[21].z, 2, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); pInstance->SetData(TYPE_EVENT,1110); break; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index 39a2f9616..962ce86b2 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -83,6 +83,7 @@ enum GO_TRIBUTE_CHEST_25H_99 = 195672, GO_ARGENT_COLISEUM_FLOOR = 195527, //20943 + GO_MAIN_GATE_DOOR = 195647, TYPE_DIFFICULTY = 101, TYPE_EVENT_TIMER = 102, @@ -138,10 +139,11 @@ enum NorthrendBeasts { GORMOK_IN_PROGRESS = 1000, GORMOK_DONE = 1001, - DREADSCALE_SUBMERGED = 2000, - ACIDMAW_SUBMERGED = 2001, - SNAKES_SPECIAL = 2002, - SNAKES_DONE = 2003, + SNAKES_IN_PROGRESS = 2000, + DREADSCALE_SUBMERGED = 2001, + ACIDMAW_SUBMERGED = 2002, + SNAKES_SPECIAL = 2003, + SNAKES_DONE = 2004, ICEHOWL_IN_PROGRESS = 3000, ICEHOWL_DONE = 3001, }; From 064133d7e2f32425cb71adadb4a1a522289c4037 Mon Sep 17 00:00:00 2001 From: insider42 Date: Wed, 31 Mar 2010 21:51:55 +0700 Subject: [PATCH 209/405] Update for [patch 3] and [patch 4] --- scripts/northrend/naxxramas/boss_loatheb.cpp | 4 ++-- scripts/northrend/naxxramas/boss_sapphiron.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/northrend/naxxramas/boss_loatheb.cpp b/scripts/northrend/naxxramas/boss_loatheb.cpp index 1523754a2..d9b0c14f0 100644 --- a/scripts/northrend/naxxramas/boss_loatheb.cpp +++ b/scripts/northrend/naxxramas/boss_loatheb.cpp @@ -63,8 +63,8 @@ struct MANGOS_DLL_DECL boss_loathebAI : public ScriptedAI void Reset() { - m_uiInevitableDoomTimer = 2*MINUTE*IN_MILISECONDS; - m_ui5MinTimer = 5*MINUTE*IN_MILISECONDS; + m_uiInevitableDoomTimer = 2*MINUTE*IN_MILLISECONDS; + m_ui5MinTimer = 5*MINUTE*IN_MILLISECONDS; m_uiNecroticAuraTimer = 10000; m_uiDeathbloomTimer = 15000; m_uiNecroticAuraCount = 0; diff --git a/scripts/northrend/naxxramas/boss_sapphiron.cpp b/scripts/northrend/naxxramas/boss_sapphiron.cpp index d401fb407..9fab96cac 100644 --- a/scripts/northrend/naxxramas/boss_sapphiron.cpp +++ b/scripts/northrend/naxxramas/boss_sapphiron.cpp @@ -90,7 +90,7 @@ struct MANGOS_DLL_DECL boss_sapphironAI : public ScriptedAI m_uiFlyTimer = 45000; m_uiIceboltTimer = 4000; m_uiLandTimer = 2000; - m_uiBeserkTimer = 15*MINUTE*IN_MILISECONDS; + m_uiBeserkTimer = 15*MINUTE*IN_MILLISECONDS; m_uiPhase = 1; m_uiIceboltCount = 0; m_bLandoff = false; From c21eb27c9773436bc76a19333f79e8044c7ba6e9 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 1 Apr 2010 18:43:37 +0400 Subject: [PATCH 210/405] TOC part 30 && BSW class bugfixes --- ...rial_of_crusader_spelltable_scriptdev2.sql | 4 +- .../spell_comment_from_wowd_scriptdev2.sql | 3 +- include/sc_boss_spell_worker.cpp | 2 +- include/sc_boss_spell_worker.h | 7 +- .../trial_of_the_crusader/boss_jaraxxus.cpp | 1 + .../boss_northrend_beasts.cpp | 40 +++++++----- .../boss_twin_valkyr.cpp | 14 +++- .../instance_trial_of_the_crusader.cpp | 17 ++--- .../trial_of_the_crusader.cpp | 64 +++++++++++-------- .../trial_of_the_crusader.h | 4 +- 10 files changed, 92 insertions(+), 64 deletions(-) diff --git a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql index e69fe320b..545b024e3 100644 --- a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql +++ b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql @@ -97,7 +97,9 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ -- Snobold vassal INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES -(34800, 66313, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), +(34800, 66313, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL), +(34800, 66317, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL), +(34800, 66318, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL), (34800, 66406, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 1, 0, NULL), (34800, 66407, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), (34800, 66408, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), diff --git a/addition/spell_comment_from_wowd_scriptdev2.sql b/addition/spell_comment_from_wowd_scriptdev2.sql index b909eb08c..940e3d1f3 100644 --- a/addition/spell_comment_from_wowd_scriptdev2.sql +++ b/addition/spell_comment_from_wowd_scriptdev2.sql @@ -14,5 +14,6 @@ INNER JOIN `mangos`.`wowd_spell` ON `mangos`.`wowd_spell`.`id` = `scriptdev2`.`b UPDATE `scriptdev2`.`boss_spell_table` SET `comment` = (SELECT DISTINCT `commentlist`.`comment` FROM `commentlist` WHERE `scriptdev2`.`boss_spell_table`.`entry` = `commentlist`.`entry` -AND `scriptdev2`.`boss_spell_table`.`spellID_N10` = `commentlist`.`spell`); +AND `scriptdev2`.`boss_spell_table`.`spellID_N10` = `commentlist`.`spell` +AND `scriptdev2`.`boss_spell_table`.`comment` = NULL); DROP VIEW `commentlist`; diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index bbbe61e45..96acc0460 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -350,7 +350,7 @@ Unit* BossSpellWorker::_doSummon(uint8 m_uiSpellIdx, TempSummonType summontype, if (pSpell->LocData.z <= 1.0f) { float fPosX, fPosY, fPosZ; boss->GetPosition(fPosX, fPosY, fPosZ); - boss->GetRandomPoint(fPosX, fPosY, fPosZ, urand(pSpell->LocData.x, pSpell->LocData.y), fPosX, fPosY, fPosZ); + boss->GetRandomPoint(fPosX, fPosY, fPosZ, urand((uint32)pSpell->LocData.x, (uint32)pSpell->LocData.y), fPosX, fPosY, fPosZ); return boss->SummonCreature(pSpell->m_uiSpellEntry[currentDifficulty], fPosX, fPosY, fPosZ, 0, summontype, delay); } else return boss->SummonCreature(pSpell->m_uiSpellEntry[currentDifficulty], pSpell->LocData.x, pSpell->LocData.y, pSpell->LocData.z, 0, summontype, delay); }; diff --git a/include/sc_boss_spell_worker.h b/include/sc_boss_spell_worker.h index cf3a669eb..7a88d0c4b 100644 --- a/include/sc_boss_spell_worker.h +++ b/include/sc_boss_spell_worker.h @@ -102,12 +102,11 @@ class MANGOS_DLL_DECL BossSpellWorker return _QuerySpellPeriod(FindSpellIDX(SpellID), diff); }; - bool timedCast(uint32 SpellID, uint32 diff) + CanCastResult timedCast(uint32 SpellID, uint32 diff, Unit* pTarget = NULL) { uint8 m_uiSpellIdx = FindSpellIDX(SpellID); - if (!_QuerySpellPeriod(FindSpellIDX(SpellID), diff)) return false; - else _BSWSpellSelector(m_uiSpellIdx); - return true; + if (!_QuerySpellPeriod(FindSpellIDX(SpellID), diff)) return CAST_FAIL_STATE; + else return _BSWSpellSelector(m_uiSpellIdx, pTarget); }; CanCastResult doCast(uint32 SpellID, Unit* pTarget = NULL) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp index e18281f8f..1cad12c8f 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp @@ -98,6 +98,7 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI bsw = new BossSpellWorker(this); bsw->Reset(Difficulty); DoScriptText(-1713517,m_creature); + m_creature->SetRespawnDelay(DAY); } void JustReachedHome() diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index 9536622c0..df83577fa 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -67,6 +67,8 @@ SPELL_TRAMPLE = 66734, SPELL_SNOBOLLED = 66406, SPELL_BATTER = 66408, SPELL_FIRE_BOMB = 66313, +SPELL_FIRE_BOMB_1 = 66317, +SPELL_FIRE_BOMB_DOT = 66318, SPELL_HEAD_CRACK = 66407, SPELL_SUBMERGE_0 = 53421, SPELL_BERSERK = 26662, @@ -89,13 +91,13 @@ struct MANGOS_DLL_DECL boss_gormokAI : public ScriptedAI void Reset() { if(!m_pInstance) return; - SnoboldsCount = 4; Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); bsw = new BossSpellWorker(this); bsw->Reset(Difficulty); SetEquipmentSlots(false, EQUIP_MAIN, EQUIP_OFFHAND, EQUIP_RANGED); m_creature->SetRespawnDelay(DAY); m_creature->SetInCombatWithZone(); + SnoboldsCount = 4; } void JustDied(Unit* pKiller) @@ -106,7 +108,7 @@ struct MANGOS_DLL_DECL boss_gormokAI : public ScriptedAI void JustReachedHome() { - if (m_pInstance) + if (!m_pInstance) return; m_pInstance->SetData(TYPE_NORTHREND_BEASTS, FAIL); m_creature->ForcedDespawn(); } @@ -191,7 +193,10 @@ struct MANGOS_DLL_DECL mob_snobold_vassalAI : public ScriptedAI bsw->timedCast(SPELL_BATTER, uiDiff); - bsw->timedCast(SPELL_FIRE_BOMB, uiDiff); + if (bsw->timedCast(SPELL_FIRE_BOMB, uiDiff, m_creature->getVictim()) == CAST_OK) { + bsw->doCast(SPELL_FIRE_BOMB_1, m_creature->getVictim()); + bsw->doCast(SPELL_FIRE_BOMB_DOT, m_creature->getVictim()); + } bsw->timedCast(SPELL_HEAD_CRACK, uiDiff); @@ -232,15 +237,17 @@ struct MANGOS_DLL_DECL boss_acidmawAI : public ScriptedAI void JustDied(Unit* pKiller) { if (!m_pInstance) return; - if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == SNAKES_SPECIAL) - m_pInstance->SetData(TYPE_NORTHREND_BEASTS, SNAKES_DONE); + if (Creature* pSister = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_DREADSCALE))) + if (!pSister->isAlive()) + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, SNAKES_DONE); else m_pInstance->SetData(TYPE_NORTHREND_BEASTS, SNAKES_SPECIAL); } void JustReachedHome() { - if (m_pInstance) - m_pInstance->SetData(TYPE_NORTHREND_BEASTS, FAIL); + if (!m_pInstance) return; + if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) != FAIL) + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, FAIL); m_creature->ForcedDespawn(); } @@ -300,10 +307,10 @@ struct MANGOS_DLL_DECL boss_acidmawAI : public ScriptedAI if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == SNAKES_SPECIAL && !enraged) { - m_pInstance->SetData(TYPE_NORTHREND_BEASTS, IN_PROGRESS); bsw->doRemove(SPELL_SUBMERGE_0); bsw->doCast(SPELL_ENRAGE); enraged = true; + stage = 0; DoScriptText(-1713504,m_creature); }; @@ -345,15 +352,17 @@ struct MANGOS_DLL_DECL boss_dreadscaleAI : public ScriptedAI void JustDied(Unit* pKiller) { if (!m_pInstance) return; - if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == SNAKES_SPECIAL) - m_pInstance->SetData(TYPE_NORTHREND_BEASTS, SNAKES_DONE); + if (Creature* pSister = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_ACIDMAW))) + if (!pSister->isAlive()) + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, SNAKES_DONE); else m_pInstance->SetData(TYPE_NORTHREND_BEASTS, SNAKES_SPECIAL); } void JustReachedHome() { - if (m_pInstance) - m_pInstance->SetData(TYPE_NORTHREND_BEASTS, FAIL); + if (!m_pInstance) return; + if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) != FAIL) + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, FAIL); m_creature->ForcedDespawn(); } @@ -415,6 +424,7 @@ struct MANGOS_DLL_DECL boss_dreadscaleAI : public ScriptedAI bsw->doRemove(SPELL_SUBMERGE_0); bsw->doCast(SPELL_ENRAGE); enraged = true; + stage = 0; DoScriptText(-1713504,m_creature); }; @@ -455,7 +465,7 @@ struct MANGOS_DLL_DECL boss_icehowlAI : public ScriptedAI void JustReachedHome() { - if (m_pInstance) + if (!m_pInstance) return; m_pInstance->SetData(TYPE_NORTHREND_BEASTS, FAIL); m_creature->ForcedDespawn(); } @@ -483,8 +493,8 @@ struct MANGOS_DLL_DECL boss_icehowlAI : public ScriptedAI DoScriptText(-1713506,m_creature,bsw->currentTarget); } - if (bsw->timedCast(SPELL_TRAMPLE, uiDiff) != CAST_OK) - DoScriptText(-1713507,m_creature); +// if (bsw->timedCast(SPELL_TRAMPLE, uiDiff) != CAST_OK) +// DoScriptText(-1713507,m_creature); DoMeleeAttackIfReady(); } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp index 4c6c64236..17ae403e3 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp @@ -105,7 +105,10 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI { if (!m_pInstance) return; DoScriptText(-1713547,m_creature); - m_pInstance->SetData(TYPE_VALKIRIES, DONE); + if (Creature* pSister = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_DARKBANE))) + if (!pSister->isAlive()) + m_pInstance->SetData(TYPE_VALKIRIES, DONE); + else m_pInstance->SetData(TYPE_VALKIRIES, SPECIAL); } void KilledUnit(Unit* pVictim) @@ -193,7 +196,10 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI { if (!m_pInstance) return; DoScriptText(-1713547,m_creature); - m_pInstance->SetData(TYPE_VALKIRIES, DONE); + if (Creature* pSister = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_LIGHTBANE))) + if (!pSister->isAlive()) + m_pInstance->SetData(TYPE_VALKIRIES, DONE); + else m_pInstance->SetData(TYPE_VALKIRIES, SPECIAL); } void KilledUnit(Unit* pVictim) @@ -254,6 +260,8 @@ struct MANGOS_DLL_DECL mob_light_essenceAI : public ScriptedAI { Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); m_creature->SetRespawnDelay(DAY); + m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); + m_creature->GetMotionMaster()->MoveRandom(); } void UpdateAI(const uint32 uiDiff) @@ -306,6 +314,8 @@ struct MANGOS_DLL_DECL mob_dark_essenceAI : public ScriptedAI { Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); m_creature->SetRespawnDelay(DAY); + m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); + m_creature->GetMotionMaster()->MoveRandom(); } void UpdateAI(const uint32 uiDiff) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index a3d4ea0ad..4f7bd1111 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -267,9 +267,9 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance case TYPE_ANUBARAK: m_auiEncounter[6] = uiData; if (uiData == DONE) { if(Difficulty == RAID_DIFFICULTY_10MAN_HEROIC){ - if ( m_auiEncounter[7] <= 25) m_uiTributeChest1GUID = m_uiTC10h25GUID; - if ( m_auiEncounter[7] <= 45) m_uiTributeChest2GUID = m_uiTC10h45GUID; - if ( m_auiEncounter[7] <= 50) m_uiTributeChest3GUID = m_uiTC10h50GUID; + if ( m_auiEncounter[7] >= 25) m_uiTributeChest1GUID = m_uiTC10h25GUID; + if ( m_auiEncounter[7] >= 45) m_uiTributeChest2GUID = m_uiTC10h45GUID; + if ( m_auiEncounter[7] >= 49) m_uiTributeChest3GUID = m_uiTC10h50GUID; m_uiTributeChest4GUID = m_uiTC10h99GUID; } if(Difficulty == RAID_DIFFICULTY_25MAN_HEROIC){ @@ -296,13 +296,10 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance break; case TYPE_COUNTER: m_auiEncounter[7] = uiData; uiData = DONE; break; case TYPE_EVENT: m_auiEncounter[8] = uiData; uiData = NOT_STARTED; break; - case TYPE_EVENT_TIMER: m_auiEventTimer = uiData; uiData = NOT_STARTED; break; - case TYPE_NORTHREND_BEASTS: if (m_auiNorthrendBeasts = SNAKES_SPECIAL - && uiData == SNAKES_SPECIAL ) uiData = SNAKES_DONE; - m_auiNorthrendBeasts = uiData; - break; - case DATA_DAMAGE_FJOLA: m_uiDataDamageFjola += uiData; uiData = NOT_STARTED; break; - case DATA_DAMAGE_EYDIS: m_uiDataDamageEydis += uiData; uiData = NOT_STARTED; break; + case TYPE_EVENT_TIMER: m_auiEventTimer = uiData; uiData = NOT_STARTED; break; + case TYPE_NORTHREND_BEASTS: m_auiNorthrendBeasts = uiData; break; + case DATA_DAMAGE_FJOLA: m_uiDataDamageFjola += uiData; uiData = NOT_STARTED; break; + case DATA_DAMAGE_EYDIS: m_uiDataDamageEydis += uiData; uiData = NOT_STARTED; break; case DATA_CASTING_FJOLA: m_uiFjolaCasting = uiData; uiData = NOT_STARTED; break; case DATA_CASTING_EYDIS: m_uiEydisCasting = uiData; uiData = NOT_STARTED; break; } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index 9f8226a04..44f7c8225 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -36,15 +36,14 @@ static _Messages _GossipMessage[]= { {"Вы готовы пройти Испытание Крестоносца?",GOSSIP_ACTION_INFO_DEF+1,false,TYPE_BEASTS}, // {"Вы готовы к следующему этапу?",GOSSIP_ACTION_INFO_DEF+2,false,TYPE_JARAXXUS}, // -{"Вы готовы драться с крестоносцами альянса?",GOSSIP_ACTION_INFO_DEF+3,false,TYPE_CRUSADERS}, // -{"Вы готовы драться с крестоносцами орды?",GOSSIP_ACTION_INFO_DEF+4,false,TYPE_CRUSADERS}, // -{"Вы готовы к следующему этапу?",GOSSIP_ACTION_INFO_DEF+5,false,TYPE_VALKIRIES}, // -{"Вы готовы продолжить бой с Ануб-Араком?",GOSSIP_ACTION_INFO_DEF+6,false,TYPE_LICH_KING}, // -{"Не надо сюда тыкать. На сегодня арена закрыта.",GOSSIP_ACTION_INFO_DEF+7,true,TYPE_ANUBARAK}, // +{"Вы готовы драться с чемпионами Серебряного авангарда?",GOSSIP_ACTION_INFO_DEF+3,false,TYPE_CRUSADERS}, // +{"Вы готовы к следующему этапу?",GOSSIP_ACTION_INFO_DEF+4,false,TYPE_VALKIRIES}, // +{"Вы готовы продолжить бой с Ануб-Араком?",GOSSIP_ACTION_INFO_DEF+5,false,TYPE_LICH_KING}, // +{"Не надо сюда тыкать. На сегодня арена закрыта.",GOSSIP_ACTION_INFO_DEF+6,true,TYPE_ANUBARAK}, // }; enum { - NUM_MESSAGES = 7, + NUM_MESSAGES = 6, }; @@ -90,6 +89,8 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI if (pInstance->GetData(TYPE_NORTHREND_BEASTS) == GORMOK_DONE) { pInstance->SetData(TYPE_STAGE,2); pInstance->SetData(TYPE_EVENT,200); + pInstance->SetData(TYPE_NORTHREND_BEASTS,IN_PROGRESS); + pInstance->SetData(TYPE_BEASTS,IN_PROGRESS); }; if (pInstance->GetData(TYPE_NORTHREND_BEASTS) == FAIL) { pInstance->SetData(TYPE_STAGE,0); @@ -100,8 +101,10 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI }; case 2: { if (pInstance->GetData(TYPE_NORTHREND_BEASTS) == SNAKES_DONE) { - pInstance->SetData(TYPE_STAGE,3); - pInstance->SetData(TYPE_EVENT,300); + pInstance->SetData(TYPE_STAGE,3); + pInstance->SetData(TYPE_EVENT,300); + pInstance->SetData(TYPE_NORTHREND_BEASTS,IN_PROGRESS); + pInstance->SetData(TYPE_BEASTS,IN_PROGRESS); }; if (pInstance->GetData(TYPE_NORTHREND_BEASTS) == FAIL) { pInstance->SetData(TYPE_STAGE,0); @@ -112,14 +115,16 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI } case 3: { if (pInstance->GetData(TYPE_NORTHREND_BEASTS) == ICEHOWL_DONE) { - pInstance->SetData(TYPE_STAGE,0); - pInstance->SetData(TYPE_BEASTS,DONE); - pInstance->SetData(TYPE_EVENT,400); + pInstance->SetData(TYPE_STAGE,0); + pInstance->SetData(TYPE_BEASTS,DONE); + pInstance->SetData(TYPE_EVENT,400); + pInstance->SetData(TYPE_NORTHREND_BEASTS,DONE); } if (pInstance->GetData(TYPE_NORTHREND_BEASTS) == FAIL) { pInstance->SetData(TYPE_STAGE,0); pInstance->SetData(TYPE_EVENT,0); pInstance->SetData(TYPE_BEASTS,NOT_STARTED); + pInstance->SetData(TYPE_BEASTS,IN_PROGRESS); }; break; }; @@ -237,7 +242,6 @@ bool GossipHello_npc_toc_announcer(Player* pPlayer, Creature* pCreature) for(uint8 i = 0; i < NUM_MESSAGES; i++) { if (!_GossipMessage[i].state && (pInstance->GetData(_GossipMessage[i].encounter) != DONE )) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, _GossipMessage[i].name, GOSSIP_SENDER_MAIN,_GossipMessage[i].id); - if ( i==2 ) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, _GossipMessage[i+1].name, GOSSIP_SENDER_MAIN,_GossipMessage[i+1].id); break; } if (_GossipMessage[i].state && pInstance->GetData(_GossipMessage[i].encounter) == DONE) { @@ -259,8 +263,10 @@ pPlayer->CLOSE_GOSSIP_MENU(); switch(uiAction) { case GOSSIP_ACTION_INFO_DEF+1: { - if (pInstance->GetData(TYPE_BEASTS) != DONE) + if (pInstance->GetData(TYPE_BEASTS) != DONE) { pInstance->SetData(TYPE_EVENT,110); + pInstance->SetData(TYPE_NORTHREND_BEASTS,NOT_STARTED); + }; break; }; @@ -271,25 +277,20 @@ switch(uiAction) { }; case GOSSIP_ACTION_INFO_DEF+3: { - if (pInstance->GetData(TYPE_CRUSADERS) != DONE) - pInstance->SetData(TYPE_EVENT,3001); - + if (pInstance->GetData(TYPE_CRUSADERS) != DONE) { + if (pPlayer->GetTeam() == ALLIANCE) pInstance->SetData(TYPE_EVENT,3000); + else pInstance->SetData(TYPE_EVENT,3001); + }; break; }; case GOSSIP_ACTION_INFO_DEF+4: { - if (pInstance->GetData(TYPE_CRUSADERS) != DONE) - pInstance->SetData(TYPE_EVENT,3000); - break; - }; - - case GOSSIP_ACTION_INFO_DEF+5: { if (pInstance->GetData(TYPE_VALKIRIES) != DONE) pInstance->SetData(TYPE_EVENT,4000); break; }; - case GOSSIP_ACTION_INFO_DEF+6: { + case GOSSIP_ACTION_INFO_DEF+5: { if (GameObject* pGoFloor = pInstance->instance->GetGameObject(pInstance->GetData64(GO_ARGENT_COLISEUM_FLOOR))) { pGoFloor->SetUInt32Value(GAMEOBJECT_DISPLAYID,9060); @@ -311,7 +312,7 @@ switch(uiAction) { break; }; - case GOSSIP_ACTION_INFO_DEF+7: { + case GOSSIP_ACTION_INFO_DEF+6: { pInstance->SetData(TYPE_STAGE,9); break; }; @@ -346,6 +347,7 @@ struct MANGOS_DLL_DECL boss_lich_king_tocAI : public ScriptedAI event_state_lich_king = 0; Event = false; MovementStarted = false; + m_creature->SetRespawnDelay(DAY); } void AttackStart(Unit *who) @@ -514,6 +516,7 @@ struct MANGOS_DLL_DECL npc_fizzlebang_tocAI : public ScriptedAI void Reset() { + m_creature->SetRespawnDelay(DAY); } void UpdateAI(const uint32 diff) @@ -543,6 +546,7 @@ struct MANGOS_DLL_DECL npc_fizzlebang_tocAI : public ScriptedAI UpdateTimer = 8000; break; case 1140: + m_creature->GetMap()->CreatureRelocation(m_creature, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z,0); pInstance->SetData(TYPE_STAGE,4); pInstance->SetData(TYPE_JARAXXUS,IN_PROGRESS); m_creature->SummonCreature(NPC_JARAXXUS, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); @@ -631,19 +635,19 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI break; case 150: m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE); - if (pInstance->GetData(TYPE_BEASTS) == NOT_STARTED || - pInstance->GetData(TYPE_BEASTS) == FAIL) - pInstance->SetData(TYPE_STAGE,1); - pInstance->SetData(TYPE_BEASTS,IN_PROGRESS); + if (pInstance->GetData(TYPE_BEASTS) != DONE) { m_creature->SummonCreature(NPC_GORMOK, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_GORMOK))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } + } UpdateTimer = 10000; pInstance->SetData(TYPE_EVENT,160); pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_MAIN_GATE_DOOR)); + pInstance->SetData(TYPE_STAGE,1); + pInstance->SetData(TYPE_BEASTS,IN_PROGRESS); break; case 200: @@ -653,6 +657,7 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI break; case 210: + if (pInstance->GetData(TYPE_BEASTS) != DONE){ m_creature->SummonCreature(NPC_DREADSCALE, SpawnLoc[3].x, SpawnLoc[3].y, SpawnLoc[3].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); m_creature->SummonCreature(NPC_ACIDMAW, SpawnLoc[4].x, SpawnLoc[4].y, SpawnLoc[4].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_DREADSCALE))) { @@ -665,6 +670,7 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } + } UpdateTimer = 10000; pInstance->SetData(TYPE_EVENT,220); break; @@ -674,12 +680,14 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI pInstance->SetData(TYPE_EVENT,310); break; case 310: + if (pInstance->GetData(TYPE_BEASTS) != DONE) { m_creature->SummonCreature(NPC_ICEHOWL, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_ICEHOWL))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } + } UpdateTimer = 10000; pInstance->SetData(TYPE_EVENT,320); break; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index 962ce86b2..cf9bb470e 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -88,14 +88,14 @@ enum TYPE_DIFFICULTY = 101, TYPE_EVENT_TIMER = 102, TYPE_EVENT_NPC = 103, - TYPE_NORTHREND_BEASTS = 110, + TYPE_NORTHREND_BEASTS = 104, DATA_DAMAGE_EYDIS = 201, DATA_DAMAGE_FJOLA = 202, DATA_CASTING_EYDIS = 203, DATA_CASTING_FJOLA = 204, - DESPAWN_TIME = 300000 + DESPAWN_TIME = 300000, }; From 8f54278cdb4f37f145cf72920a82e0f86290b585 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 1 Apr 2010 19:00:46 +0400 Subject: [PATCH 211/405] Remove duplicates from scriploader, thanks to MadMann --- system/ScriptLoader.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index 41aa049a8..0a01caba6 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -357,8 +357,6 @@ extern void AddSC_boss_skadi(); extern void AddSC_boss_svala(); extern void AddSC_boss_ymiron(); extern void AddSC_instance_pinnacle(); -extern void AddSC_instance_violet_hold(); //violet_hold -extern void AddSC_violet_hold(); extern void AddSC_borean_tundra(); extern void AddSC_dalaran(); @@ -827,8 +825,6 @@ void AddScripts() AddSC_boss_svala(); AddSC_boss_ymiron(); AddSC_instance_pinnacle(); - AddSC_instance_violet_hold(); //violet_hold - AddSC_violet_hold(); AddSC_borean_tundra(); AddSC_dalaran(); From 54a594032153431851ae6ff910a2df32c00230e3 Mon Sep 17 00:00:00 2001 From: insider42 Date: Fri, 2 Apr 2010 00:38:23 +0700 Subject: [PATCH 212/405] Reverted [patch 3] --- addition/3_mangos_loatheb.sql | 5 - addition/3_scriptdev2_loatheb.sql | 4 - scripts/northrend/naxxramas/boss_loatheb.cpp | 137 ++++++++++--------- 3 files changed, 69 insertions(+), 77 deletions(-) delete mode 100644 addition/3_mangos_loatheb.sql delete mode 100644 addition/3_scriptdev2_loatheb.sql diff --git a/addition/3_mangos_loatheb.sql b/addition/3_mangos_loatheb.sql deleted file mode 100644 index 65ef18076..000000000 --- a/addition/3_mangos_loatheb.sql +++ /dev/null @@ -1,5 +0,0 @@ -UPDATE `creature_template` SET `AIName` = 'EventAI', `ScriptName` = '' WHERE `entry` = 16286; -DELETE FROM `creature_ai_scripts` WHERE `creature_id` = 16286; -INSERT INTO `creature_ai_scripts` VALUES -('1628601','16286','6','0','100','6','0','0','0','0','11','29232','0','7','0','0','0','0','0','0','0','0','Spore - Cast Fungal Creep on Death'), -('1628602','16286','1','0','100','6','1000','1000','0','0','41','0','0','0','0','0','0','0','0','0','0','0','Spore - Despawn when OOC'); diff --git a/addition/3_scriptdev2_loatheb.sql b/addition/3_scriptdev2_loatheb.sql deleted file mode 100644 index 083ba6350..000000000 --- a/addition/3_scriptdev2_loatheb.sql +++ /dev/null @@ -1,4 +0,0 @@ -INSERT INTO `script_texts` (entry,content_default,sound,type,language,emote,comment) VALUES -(-1533143,'An aura of necrotic energy blocks all healing!',0,3,0,0,'Loatheb EMOTE_AURA_BLOCKING'), -(-1533144,'The power of Necrotic Aura begins to wane!',0,3,0,0,'Loatheb EMOTE_AURA_WANE'), -(-1533145,'The aura fades away, allowing healing once more!',0,3,0,0,'Loatheb EMOTE_AURA_FADING'); diff --git a/scripts/northrend/naxxramas/boss_loatheb.cpp b/scripts/northrend/naxxramas/boss_loatheb.cpp index d9b0c14f0..579bbaa30 100644 --- a/scripts/northrend/naxxramas/boss_loatheb.cpp +++ b/scripts/northrend/naxxramas/boss_loatheb.cpp @@ -26,49 +26,51 @@ EndScriptData */ enum { - SPELL_NECROTIC_AURA = 55593, - SPELL_SUMMON_SPORE = 29234, - - SPELL_DEATHBLOOM = 29865, - H_SPELL_DEATHBLOOM = 55053, + SPELL_CORRUPTED_MIND = 29198, + SPELL_POISON_AURA = 29865, + SPELL_INEVITABLE_DOOM = 29204, + SPELL_REMOVE_CURSE = 30281 +}; - SPELL_INEVITABLE_DOOM = 29204, - H_SPELL_INEVITABLE_DOOM = 55052, +#define ADD_1X 2957.040f +#define ADD_1Y -3997.590f +#define ADD_1Z 274.280f - SPELL_FUNGAL_CREEP = 29232, +#define ADD_2X 2909.130f +#define ADD_2Y -4042.970f +#define ADD_2Z 274.280f - EMOTE_AURA_BLOCKING = -1533143, - EMOTE_AURA_WANE = -1533144, - EMOTE_AURA_FADING = -1533145, -}; +#define ADD_3X 2861.102f +#define ADD_3Y -3997.901f +#define ADD_3Z 274.280f struct MANGOS_DLL_DECL boss_loathebAI : public ScriptedAI { boss_loathebAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (instance_naxxramas*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - ScriptedInstance* m_pInstance; + instance_naxxramas* m_pInstance; bool m_bIsRegularMode; - uint32 m_uiNecroticAuraTimer; + uint32 m_uiCorruptedMindTimer; + uint32 m_uiPoisonAuraTimer; uint32 m_uiInevitableDoomTimer; - uint32 m_ui5MinTimer; - uint32 m_uiDeathbloomTimer; + uint32 m_uiInevitableDoom5minsTimer; + uint32 m_uiRemoveCurseTimer; uint32 m_uiSummonTimer; - uint32 m_uiNecroticAuraCount; void Reset() { - m_uiInevitableDoomTimer = 2*MINUTE*IN_MILLISECONDS; - m_ui5MinTimer = 5*MINUTE*IN_MILLISECONDS; - m_uiNecroticAuraTimer = 10000; - m_uiDeathbloomTimer = 15000; - m_uiNecroticAuraCount = 0; - m_uiSummonTimer = 10000; + m_uiCorruptedMindTimer = 4000; + m_uiPoisonAuraTimer = 2500; + m_uiInevitableDoomTimer = 120000; + m_uiInevitableDoom5minsTimer = 300000; + m_uiRemoveCurseTimer = 30000; + m_uiSummonTimer = 8000; } void Aggro(Unit* pWho) @@ -89,71 +91,71 @@ struct MANGOS_DLL_DECL boss_loathebAI : public ScriptedAI m_pInstance->SetData(TYPE_LOATHEB, FAIL); } - void JustSummoned(Creature* pSummoned) - { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - pSummoned->AI()->AttackStart(pTarget); - } - void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (m_uiNecroticAuraTimer < uiDiff) + // Corrupted Mind + if (m_uiCorruptedMindTimer < uiDiff) { - switch (m_uiNecroticAuraCount % 3) - { - case 0: - if (DoCastSpellIfCan(m_creature, SPELL_NECROTIC_AURA) != CAST_OK) - return; - - DoScriptText(EMOTE_AURA_BLOCKING, m_creature); - m_uiNecroticAuraTimer = 14000; - break; - case 1: - DoScriptText(EMOTE_AURA_WANE, m_creature); - m_uiNecroticAuraTimer = 3000; - break; - case 2: - DoScriptText(EMOTE_AURA_FADING, m_creature); - m_uiNecroticAuraTimer = 3000; - break; - }; - - m_uiNecroticAuraCount++; + DoCastSpellIfCan(m_creature->getVictim(), SPELL_CORRUPTED_MIND); + m_uiCorruptedMindTimer = 62000; + } + else + m_uiCorruptedMindTimer -= uiDiff; + + // Poison Aura + if (m_uiPoisonAuraTimer < uiDiff) + { + DoCastSpellIfCan(m_creature->getVictim(), SPELL_POISON_AURA); + m_uiPoisonAuraTimer = 60000; } else - m_uiNecroticAuraTimer -= uiDiff; + m_uiPoisonAuraTimer -= uiDiff; - if (m_uiDeathbloomTimer < uiDiff) + // Inevitable Doom + if (m_uiInevitableDoomTimer < uiDiff) { - DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_DEATHBLOOM : H_SPELL_DEATHBLOOM); - m_uiDeathbloomTimer = 30000; + DoCastSpellIfCan(m_creature->getVictim(), SPELL_INEVITABLE_DOOM); + m_uiInevitableDoomTimer = 120000; } else - m_uiDeathbloomTimer -= uiDiff; + m_uiInevitableDoomTimer -= uiDiff; - if (m_ui5MinTimer) + // Inevitable Doom 5mins + if (m_uiInevitableDoom5minsTimer < uiDiff) { - if (m_ui5MinTimer < uiDiff) - m_ui5MinTimer = 0; - else - m_ui5MinTimer -= uiDiff; + DoCastSpellIfCan(m_creature->getVictim(), SPELL_INEVITABLE_DOOM); + m_uiInevitableDoom5minsTimer = 15000; } + else + m_uiInevitableDoom5minsTimer -= uiDiff; - if (m_uiInevitableDoomTimer < uiDiff) + // Remove Curse + if (m_uiRemoveCurseTimer < uiDiff) { - if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_INEVITABLE_DOOM : H_SPELL_INEVITABLE_DOOM) == CAST_OK) - m_uiInevitableDoomTimer = m_ui5MinTimer ? 30000 : 15000; + DoCastSpellIfCan(m_creature, SPELL_REMOVE_CURSE); + m_uiRemoveCurseTimer = 30000; } else - m_uiInevitableDoomTimer -= uiDiff; + m_uiRemoveCurseTimer -= uiDiff; + // Summon if (m_uiSummonTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_SUMMON_SPORE); - m_uiSummonTimer = m_bIsRegularMode ? 36000 : 18000; + Unit* pSummonedSpores = NULL; + + pSummonedSpores = m_creature->SummonCreature(16286, ADD_1X, ADD_1Y, ADD_1Z, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000); + pSummonedSpores = m_creature->SummonCreature(16286, ADD_2X, ADD_2Y, ADD_2Z, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000); + pSummonedSpores = m_creature->SummonCreature(16286, ADD_3X, ADD_3Y, ADD_3Z, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000); + if (pSummonedSpores) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + pSummonedSpores->AddThreat(pTarget); + } + + m_uiSummonTimer = 28000; } else m_uiSummonTimer -= uiDiff; @@ -161,7 +163,6 @@ struct MANGOS_DLL_DECL boss_loathebAI : public ScriptedAI DoMeleeAttackIfReady(); } }; - CreatureAI* GetAI_boss_loatheb(Creature* pCreature) { return new boss_loathebAI(pCreature); From b329460aa2f3152945dea949e7723a2b2783ae84 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Fri, 2 Apr 2010 16:52:07 +0400 Subject: [PATCH 213/405] TOC part 31, Saurfang cache correct spawn && BSW improve --- ...rial_of_crusader_spelltable_scriptdev2.sql | 10 +- include/sc_boss_spell_worker.cpp | 5 +- include/sc_boss_spell_worker.h | 2 +- .../boss_anubarak_trial.cpp | 4 +- .../boss_northrend_beasts.cpp | 126 ++++++++++++++++-- .../boss_twin_valkyr.cpp | 1 - .../icecrown_citadel/def_spire.h | 9 +- 7 files changed, 133 insertions(+), 24 deletions(-) diff --git a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql index 545b024e3..7d3506335 100644 --- a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql +++ b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql @@ -36,7 +36,8 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ (34564, 66013, 67700, 68509, 68510, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), (34564, 66339, 66339, 66339, 66339, 5000, 5000, 5000, 5000, 10000, 10000, 10000, 10000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0, 0, NULL), (34564, 67574, 67574, 67574, 67574, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 1, 0, NULL), -(34564, 67630, 68646, 66118, 68647, 10000, 10000, 10000, 10000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 1, 0, NULL), +(34564, 66118, 67630, 68646, 68647, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 1, 0, NULL), +(34564, 66125, 0, 0, 0, 10000, 0, 0, 0, 10000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), (34564, 67730, 0, 0, 0, 20000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL); -- Anub'arak scarab @@ -77,11 +78,12 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ -- Icehowl INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES -(34797, 26662, 26662, 26662, 26662, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), -(34797, 66683, 67660, 67661, 67662, 15000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), +(34797, 66683, 67660, 67661, 67662, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), (34797, 66689, 67650, 67651, 67652, 25000, 25000, 25000, 25000, 40000, 40000, 40000, 40000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), -(34797, 66734, 66734, 66734, 66734, 30000, 30000, 30000, 30000, 60000, 60000, 60000, 60000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34797, 66734, 0, 0, 0, 1000, 0, 0, 0, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), (34797, 66770, 67654, 67655, 67656, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), +(34797, 66758, 0, 0, 0, 15000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34797, 66759, 0, 0, 0, 300000, 0, 0, 0, 300000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), (34797, 67345, 67663, 67664, 67665, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL); -- Dreadscale diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index 96acc0460..8d3f3b551 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -10,12 +10,13 @@ BossSpellWorker::BossSpellWorker(ScriptedAI* bossAI) { boss = bossAI->m_creature; bossID = boss->GetEntry(); + debug_log("BSW: Initializing BossSpellWorker object for boss %u",bossID); bossSpellCount = 0; currentTarget = NULL; - currentDifficulty = RAID_DIFFICULTY_10MAN_NORMAL; memset(&m_uiSpell_Timer, 0, sizeof(m_uiSpell_Timer)); memset(&m_BossSpell,0,sizeof(m_BossSpell)); - debug_log("BSW: Initializing BossSpellWorker object for boss %u",bossID); + Map* pMap = boss->GetMap(); + currentDifficulty = pMap->GetDifficulty(); LoadSpellTable(); }; diff --git a/include/sc_boss_spell_worker.h b/include/sc_boss_spell_worker.h index 7a88d0c4b..34d2a79e8 100644 --- a/include/sc_boss_spell_worker.h +++ b/include/sc_boss_spell_worker.h @@ -83,7 +83,7 @@ struct SpellTable class MANGOS_DLL_DECL BossAura : public Aura { public: - BossAura(const SpellEntry *spell, SpellEffectIndex effect, int32 *basepoints, Unit *target, Unit *caster) : Aura(spell, effect, basepoints, target, caster, NULL) + BossAura(const SpellEntry *spell, SpellEffectIndex effect, int32 *basepoints, Unit *target, Unit *caster) : Aura(spell, effect, basepoints, target, caster) {} }; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp index 4e7f12212..d6cbad02d 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp @@ -40,7 +40,8 @@ enum BossSpells { SPELL_COLD = 66013, SPELL_MARK = 67574, -SPELL_LEECHING_SWARM = 67630, +SPELL_LEECHING_SWARM = 66118, +SPELL_LEECHING_HEAL = 66125, SPELL_IMPALE = 65922, SPELL_POUND = 66012, SPELL_SHOUT = 67730, @@ -166,6 +167,7 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI bsw->timedCast(SPELL_COLD, uiDiff); if (bsw->timedQuery(SPELL_LEECHING_SWARM, uiDiff)) { bsw->doCast(SPELL_LEECHING_SWARM); + bsw->doCast(SPELL_LEECHING_HEAL); DoScriptText(-1713561,m_creature); } break;} diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index df83577fa..6410b0565 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -71,8 +71,9 @@ SPELL_FIRE_BOMB_1 = 66317, SPELL_FIRE_BOMB_DOT = 66318, SPELL_HEAD_CRACK = 66407, SPELL_SUBMERGE_0 = 53421, -SPELL_BERSERK = 26662, SPELL_ENRAGE = 68335, +SPELL_FROTHING_RAGE = 66759, +SPELL_STAGGERED_DAZE = 66758, }; struct MANGOS_DLL_DECL boss_gormokAI : public ScriptedAI @@ -308,6 +309,7 @@ struct MANGOS_DLL_DECL boss_acidmawAI : public ScriptedAI if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == SNAKES_SPECIAL && !enraged) { bsw->doRemove(SPELL_SUBMERGE_0); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); bsw->doCast(SPELL_ENRAGE); enraged = true; stage = 0; @@ -422,6 +424,7 @@ struct MANGOS_DLL_DECL boss_dreadscaleAI : public ScriptedAI if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == SNAKES_SPECIAL && !enraged) { bsw->doRemove(SPELL_SUBMERGE_0); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); bsw->doCast(SPELL_ENRAGE); enraged = true; stage = 0; @@ -448,6 +451,13 @@ struct MANGOS_DLL_DECL boss_icehowlAI : public ScriptedAI ScriptedInstance* m_pInstance; uint8 Difficulty; BossSpellWorker* bsw; + bool MovementStarted; + bool TrampleCasted; + uint8 stage; + float fPosX, fPosY, fPosZ; + std::list WayPointList; + std::list::iterator WayPoint; + Unit* pTarget; void Reset() { if(!m_pInstance) return; @@ -455,6 +465,8 @@ struct MANGOS_DLL_DECL boss_icehowlAI : public ScriptedAI bsw = new BossSpellWorker(this); bsw->Reset(Difficulty); m_creature->SetRespawnDelay(DAY); + MovementStarted = false; + stage = 0; } void JustDied(Unit* pKiller) @@ -463,6 +475,32 @@ struct MANGOS_DLL_DECL boss_icehowlAI : public ScriptedAI m_pInstance->SetData(TYPE_NORTHREND_BEASTS, ICEHOWL_DONE); } + void MovementInform(uint32 type, uint32 id) + { + if(!m_pInstance) return; + if(type != POINT_MOTION_TYPE) return; + if(WayPoint->id == id) + { + ++WayPoint; + if (WayPoint != WayPointList.end()) + m_creature->GetMotionMaster()->MovePoint(WayPoint->id, WayPoint->x, WayPoint->y,WayPoint->z); + } + } + + void StartMovement() + { + if(!WayPointList.empty() || MovementStarted) return; + WayPoint = WayPointList.begin(); + MovementStarted = true; + m_creature->GetMotionMaster()->MovePoint(WayPoint->id, WayPoint->x, WayPoint->y,WayPoint->z); + } + + void AddWaypoint(uint32 id, float x, float y, float z) + { + WayPoints wp(id, x, y, z); + WayPointList.push_back(wp); + } + void JustReachedHome() { if (!m_pInstance) return; @@ -481,22 +519,90 @@ struct MANGOS_DLL_DECL boss_icehowlAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - bsw->timedCast(SPELL_FEROCIOUS_BUTT, uiDiff); + switch (stage) + { + case 0: { + bsw->timedCast(SPELL_FEROCIOUS_BUTT, uiDiff); - bsw->timedCast(SPELL_ARCTIC_BREATH, uiDiff); + bsw->timedCast(SPELL_ARCTIC_BREATH, uiDiff); - bsw->timedCast(SPELL_WHIRL, uiDiff); + bsw->timedCast(SPELL_WHIRL, uiDiff); - if (bsw->timedQuery(SPELL_MASSIVE_CRASH, uiDiff)) - { + if (bsw->timedQuery(SPELL_MASSIVE_CRASH, uiDiff)) stage = 1; + + bsw->timedCast(SPELL_FROTHING_RAGE, uiDiff); + + DoMeleeAttackIfReady(); + + break; + } + case 1: { bsw->doCast(SPELL_MASSIVE_CRASH); DoScriptText(-1713506,m_creature,bsw->currentTarget); + stage = 2; + break; + } + case 2: { + if (pTarget = bsw->SelectUnit()) { + bsw->doCast(SPELL_MASSIVE_CRASH); + m_creature->GetPosition(fPosX, fPosY, fPosZ); + AddWaypoint(0, fPosX, fPosY, fPosZ); + pTarget->GetPosition(fPosX, fPosY, fPosZ); + AddWaypoint(1, fPosX, fPosY, fPosZ); + TrampleCasted = false; + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + SetCombatMovement(false); +// m_creature->GetMotionMaster()->MovementExpired(true); +// m_creature->GetMotionMaster()->Clear(); +// m_creature->GetMotionMaster()->MoveIdle(); + stage = 3; } + break; + } + case 3: { + if (bsw->timedQuery(SPELL_TRAMPLE,uiDiff)) { + StartMovement(); + DoScriptText(-1713506,m_creature,pTarget); + stage = 4; + } + break; + } + case 4: { + if (WayPoint != WayPointList.end()) + { + Map* pMap = m_creature->GetMap(); + Map::PlayerList const &lPlayers = pMap->GetPlayers(); + for(Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr) + { + Unit* pPlayer = itr->getSource(); + if (!pPlayer) continue; + if (pPlayer->isAlive() && pPlayer->IsWithinDistInMap(m_creature, 5.0f)) { + bsw->timedCast(SPELL_TRAMPLE, uiDiff, pPlayer); + TrampleCasted = true; + } + } + + } else { stage = 5; + MovementStarted = false; + } + if (TrampleCasted) stage = 5; + break; + } + case 5: { + if (!TrampleCasted) { + bsw->doCast(SPELL_STAGGERED_DAZE); + DoScriptText(-1713507,m_creature); + } + WayPointList.clear(); +// m_creature->GetMotionMaster()->Clear(); +// m_creature->GetMotionMaster()->MovementExpired(false); + SetCombatMovement(true); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + stage = 0; + break; + } + } -// if (bsw->timedCast(SPELL_TRAMPLE, uiDiff) != CAST_OK) -// DoScriptText(-1713507,m_creature); - - DoMeleeAttackIfReady(); } }; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp index 17ae403e3..e8e74f57f 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp @@ -24,7 +24,6 @@ EndScriptData */ // Twin pact && shields not implemented // Shared health not fully correct worked // timers need correct -// Portals not moving #include "precompiled.h" #include "trial_of_the_crusader.h" diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h index 26e46c30f..47234c338 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h @@ -71,11 +71,10 @@ enum GO_FROZENTRONE_TR = 202223, //72061 - GO_SAURFANG_CACHE_10 = 202239, // 2753 - GO_SAURFANG_CACHE_25 = 202240, // 2761 - GO_SAURFANG_CACHE_10_H = 202241, // 2910 - GO_SAURFANG_CACHE_25_H = 202238, // 2724 - + GO_SAURFANG_CACHE_10 = 202239, + GO_SAURFANG_CACHE_25 = 202240, + GO_SAURFANG_CACHE_10_H = 202238, + GO_SAURFANG_CACHE_25_H = 202241, GO_GUNSHIP_ARMORY_A_10 = 201872, // GO_GUNSHIP_ARMORY_A_25 = 201873, // From 0f1f6b459062d7abfd483ea0656539cc4e5e4053 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sun, 4 Apr 2010 11:03:47 +0400 Subject: [PATCH 214/405] BSW class small improve. Thanks to boxa --- include/sc_boss_spell_worker.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index 8d3f3b551..500a99b32 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -424,7 +424,7 @@ CanCastResult BossSpellWorker::_CanCastSpell(Unit* pTarget, const SpellEntry *pS return CAST_FAIL_POWER; } - if (const SpellRangeEntry *pSpellRange = sSpellRangeStore.LookupEntry(pSpell->rangeIndex)) + if (const SpellRangeEntry *pSpellRange = GetSpellRangeStore()->LookupEntry(pSpell->rangeIndex)) { if (pTarget != boss) { @@ -457,7 +457,7 @@ CanCastResult BossSpellWorker::_DoCastSpellIfCan(Unit* pTarget, uint32 uiSpell, // Allowed to cast only if not casting (unless we interrupt ourself) or if spell is triggered if (!pCaster->IsNonMeleeSpellCasted(false) || (uiCastFlags & (CAST_TRIGGERED | CAST_INTERRUPT_PREVIOUS))) { - if (const SpellEntry* pSpell = sSpellStore.LookupEntry(uiSpell)) + if (const SpellEntry* pSpell = GetSpellStore()->LookupEntry(uiSpell)) { // If cast flag CAST_AURA_NOT_PRESENT is active, check if target already has aura on them if (uiCastFlags & CAST_AURA_NOT_PRESENT) @@ -484,7 +484,7 @@ CanCastResult BossSpellWorker::_DoCastSpellIfCan(Unit* pTarget, uint32 uiSpell, } else { - sLog.outErrorDb("DoCastSpellIfCan by creature entry %u attempt to cast spell %u but spell does not exist.", boss->GetEntry(), uiSpell); + error_log("bsw->DoCastSpellIfCan by creature entry %u attempt to cast spell %u but spell does not exist.", boss->GetEntry(), uiSpell); return CAST_FAIL_OTHER; } } From 60421b4cbf279de26dad23da1a7e0840756233a3 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sun, 4 Apr 2010 15:14:34 +0400 Subject: [PATCH 215/405] Small change BSW class for windows compilers. Thanks to boxa && gladden --- include/sc_boss_spell_worker.cpp | 13 +++++++++---- include/sc_boss_spell_worker.h | 4 ++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index 500a99b32..fba6c4c54 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -2,6 +2,7 @@ * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ #include "sc_boss_spell_worker.h" +#include "precompiled.h" #ifdef DEF_BOSS_SPELL_WORKER_H extern DatabaseType SD2Database; @@ -10,13 +11,14 @@ BossSpellWorker::BossSpellWorker(ScriptedAI* bossAI) { boss = bossAI->m_creature; bossID = boss->GetEntry(); - debug_log("BSW: Initializing BossSpellWorker object for boss %u",bossID); bossSpellCount = 0; currentTarget = NULL; memset(&m_uiSpell_Timer, 0, sizeof(m_uiSpell_Timer)); memset(&m_BossSpell,0,sizeof(m_BossSpell)); - Map* pMap = boss->GetMap(); - currentDifficulty = pMap->GetDifficulty(); + if (Map* pMap = boss->GetMap()) + currentDifficulty = pMap->GetDifficulty(); + else currentDifficulty = RAID_DIFFICULTY_10MAN_NORMAL; + debug_log("BSW: Initializing BossSpellWorker object for boss %u difficulty %u",bossID,currentDifficulty); LoadSpellTable(); }; @@ -318,9 +320,11 @@ BossSpellTableParameters BossSpellWorker::getBSWCastType(uint32 pTemp) CanCastResult BossSpellWorker::_BSWDoCast(uint8 m_uiSpellIdx, Unit* pTarget) { if (!pTarget) return CAST_FAIL_OTHER; + if (!pTarget->isAlive()) return CAST_FAIL_OTHER; SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; debug_log("BSW: Casting bugged spell number %u type %u",pSpell->m_uiSpellEntry[currentDifficulty], pSpell->m_CastTarget); pTarget->CastSpell(pTarget, pSpell->m_uiSpellEntry[currentDifficulty], false); + return CAST_OK; }; void BossSpellWorker::_fillEmptyDataField() @@ -484,7 +488,7 @@ CanCastResult BossSpellWorker::_DoCastSpellIfCan(Unit* pTarget, uint32 uiSpell, } else { - error_log("bsw->DoCastSpellIfCan by creature entry %u attempt to cast spell %u but spell does not exist.", boss->GetEntry(), uiSpell); + error_log("BSW: DoCastSpellIfCan by creature entry %u attempt to cast spell %u but spell does not exist.", boss->GetEntry(), uiSpell); return CAST_FAIL_OTHER; } } @@ -522,6 +526,7 @@ Unit* BossSpellWorker::_SelectUnit(SelectAggroTarget target, uint32 uiPosition) break; } + error_log("BSW: Cannot find target for spell :("); return NULL; } diff --git a/include/sc_boss_spell_worker.h b/include/sc_boss_spell_worker.h index 34d2a79e8..15050bede 100644 --- a/include/sc_boss_spell_worker.h +++ b/include/sc_boss_spell_worker.h @@ -7,7 +7,7 @@ #include "Unit.h" #include "precompiled.h" #include "Database/DatabaseEnv.h" -#include "ScriptMgr.h" +#include "../ScriptMgr.h" #ifndef DEF_BOSS_SPELL_WORKER_H #define DEF_BOSS_SPELL_WORKER_H @@ -142,7 +142,7 @@ class MANGOS_DLL_DECL BossSpellWorker private: - BossSpellTableParameters getBSWCastType(uint pTemp); + BossSpellTableParameters getBSWCastType(uint32 pTemp); uint8 FindSpellIDX(uint32 SpellID); From 4aa31002ed39c3c97da7820d5b6f9d638749a003 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Mon, 5 Apr 2010 00:40:03 +0400 Subject: [PATCH 216/405] TOC part 32 && small BSW improve --- ..._trial_of_crusader_spelltable_scriptdev2.sql | 3 ++- include/sc_boss_spell_worker.cpp | 16 +++++++++++----- include/sc_boss_spell_worker.h | 13 +++++++++++++ .../boss_northrend_beasts.cpp | 17 ++++++++--------- 4 files changed, 34 insertions(+), 15 deletions(-) diff --git a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql index 7d3506335..fb24828f6 100644 --- a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql +++ b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql @@ -94,7 +94,7 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ (34799, 66821, 66821, 66821, 66821, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), (34799, 66879, 67624, 67625, 67626, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), (34799, 66902, 67627, 67628, 67629, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), -(34799, 67642, 67642, 67642, 67642, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), +(34799, 66883, 67641, 67642, 67643, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), (34799, 68335, 68335, 68335, 68335, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL); -- Snobold vassal @@ -130,5 +130,6 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ (35144, 66824, 67612, 67613, 67614, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), (35144, 66880, 67606, 67607, 67608, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), (35144, 66901, 67615, 67616, 66617, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(35144, 66883, 67641, 67642, 67643, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), (35144, 68335, 68335, 68335, 68335, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL); diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index fba6c4c54..bfba1b568 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -20,6 +20,7 @@ BossSpellWorker::BossSpellWorker(ScriptedAI* bossAI) else currentDifficulty = RAID_DIFFICULTY_10MAN_NORMAL; debug_log("BSW: Initializing BossSpellWorker object for boss %u difficulty %u",bossID,currentDifficulty); LoadSpellTable(); + Reset(currentDifficulty); }; BossSpellWorker::~BossSpellWorker() @@ -30,10 +31,15 @@ BossSpellWorker::~BossSpellWorker() void BossSpellWorker::Reset(uint8 _Difficulty) { currentDifficulty = setDifficulty(_Difficulty); - for (uint8 i = 0; i < bossSpellCount; ++i) - if (m_BossSpell[i].m_uiSpellTimerMin[currentDifficulty] != m_BossSpell[i].m_uiSpellTimerMax[currentDifficulty]) - m_uiSpell_Timer[i] = urand(0,m_BossSpell[i].m_uiSpellTimerMax[currentDifficulty]); - else m_uiSpell_Timer[i] = m_BossSpell[i].m_uiSpellTimerMin[currentDifficulty]; + resetTimers(); +}; + +void BossSpellWorker::_resetTimer(uint8 m_uiSpellIdx) +{ + if (m_uiSpellIdx > bossSpellCount) return; + if (m_BossSpell[m_uiSpellIdx].m_uiSpellTimerMin[currentDifficulty] != m_BossSpell[m_uiSpellIdx].m_uiSpellTimerMax[currentDifficulty]) + m_uiSpell_Timer[m_uiSpellIdx] = urand(0,m_BossSpell[m_uiSpellIdx].m_uiSpellTimerMax[currentDifficulty]); + else m_uiSpell_Timer[m_uiSpellIdx] = m_BossSpell[m_uiSpellIdx].m_uiSpellTimerMin[currentDifficulty]; }; void BossSpellWorker::LoadSpellTable() @@ -277,7 +283,7 @@ uint8 BossSpellWorker::FindSpellIDX(uint32 SpellID) for(uint8 i = 0; i < bossSpellCount; ++i) if (m_BossSpell[i].m_uiSpellEntry[RAID_DIFFICULTY_10MAN_NORMAL] == SpellID) return i; - error_log("BSW: spell not found in spelltable. Memory or database error?"); + error_log("BSW: spell %u not found in boss %u spelltable. Memory or database error?", SpellID, bossID); return SPELL_INDEX_ERROR; } diff --git a/include/sc_boss_spell_worker.h b/include/sc_boss_spell_worker.h index 15050bede..99f41900d 100644 --- a/include/sc_boss_spell_worker.h +++ b/include/sc_boss_spell_worker.h @@ -97,6 +97,17 @@ class MANGOS_DLL_DECL BossSpellWorker void Reset(uint8 _Difficulty = 0); + void resetTimer(uint32 SpellID) + { + return _resetTimer(FindSpellIDX(SpellID)); + }; + + void resetTimers() + { + for (uint8 i = 0; i < bossSpellCount; ++i) + _resetTimer(i); + }; + bool timedQuery(uint32 SpellID, uint32 diff) { return _QuerySpellPeriod(FindSpellIDX(SpellID), diff); @@ -148,6 +159,8 @@ class MANGOS_DLL_DECL BossSpellWorker void LoadSpellTable(); + void _resetTimer(uint8 m_uiSpellIdx); + bool isSummon(uint8 m_uiSpellIdx); Unit* _doSummon(uint8 m_uiSpellIdx, TempSummonType type = TEMPSUMMON_CORPSE_TIMED_DESPAWN, uint32 delay = 60000); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index 6410b0565..92cbc088d 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -53,7 +53,7 @@ SPELL_PARALYTIC_SPRAY = 66901, SPELL_ACID_SPEW = 66819, SPELL_PARALYTIC_BITE = 66824, SPELL_SWEEP_0 = 66794, -SPELL_SLIME_POOL = 67642, +SPELL_SLIME_POOL = 66883, SPELL_FIRE_SPIT = 66796, SPELL_MOLTEN_SPEW = 66821, SPELL_BURNING_BITE = 66879, @@ -277,8 +277,8 @@ struct MANGOS_DLL_DECL boss_acidmawAI : public ScriptedAI break;} case 1: { - bsw->doCast(SPELL_SUBMERGE_0); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + bsw->doCast(SPELL_SUBMERGE_0); stage = 2; DoScriptText(-1713557,m_creature); m_pInstance->SetData(TYPE_NORTHREND_BEASTS, ACIDMAW_SUBMERGED); @@ -299,8 +299,8 @@ struct MANGOS_DLL_DECL boss_acidmawAI : public ScriptedAI break;} case 3: { DoScriptText(-1713559,m_creature); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); bsw->doRemove(SPELL_SUBMERGE_0); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); stage = 0; m_pInstance->SetData(TYPE_NORTHREND_BEASTS, DREADSCALE_SUBMERGED); break;} @@ -392,8 +392,8 @@ struct MANGOS_DLL_DECL boss_dreadscaleAI : public ScriptedAI break;} case 1: { - bsw->doCast(SPELL_SUBMERGE_0); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + bsw->doCast(SPELL_SUBMERGE_0); stage = 2; DoScriptText(-1713557,m_creature); m_pInstance->SetData(TYPE_NORTHREND_BEASTS, DREADSCALE_SUBMERGED); @@ -414,8 +414,8 @@ struct MANGOS_DLL_DECL boss_dreadscaleAI : public ScriptedAI break;} case 3: { DoScriptText(-1713559,m_creature); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); bsw->doRemove(SPELL_SUBMERGE_0); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); stage = 0; m_pInstance->SetData(TYPE_NORTHREND_BEASTS, ACIDMAW_SUBMERGED); break;} @@ -484,6 +484,7 @@ struct MANGOS_DLL_DECL boss_icehowlAI : public ScriptedAI ++WayPoint; if (WayPoint != WayPointList.end()) m_creature->GetMotionMaster()->MovePoint(WayPoint->id, WayPoint->x, WayPoint->y,WayPoint->z); + else MovementStarted = false; } } @@ -568,7 +569,7 @@ struct MANGOS_DLL_DECL boss_icehowlAI : public ScriptedAI break; } case 4: { - if (WayPoint != WayPointList.end()) + if (MovementStarted = true) { Map* pMap = m_creature->GetMap(); Map::PlayerList const &lPlayers = pMap->GetPlayers(); @@ -582,9 +583,7 @@ struct MANGOS_DLL_DECL boss_icehowlAI : public ScriptedAI } } - } else { stage = 5; - MovementStarted = false; - } + } else stage = 5; if (TrampleCasted) stage = 5; break; } From 10a93034c22ef9b62d8b47aee0d589fe1a5ec11d Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Mon, 5 Apr 2010 13:20:53 +0400 Subject: [PATCH 217/405] More correct code for work with sd2database speedup && prevent log spam --- ScriptMgr.cpp | 10 ++---- ScriptMgr.h | 5 +-- include/sc_boss_spell_worker.cpp | 61 +++++--------------------------- 3 files changed, 14 insertions(+), 62 deletions(-) diff --git a/ScriptMgr.cpp b/ScriptMgr.cpp index 5ee844c0c..29f47422a 100644 --- a/ScriptMgr.cpp +++ b/ScriptMgr.cpp @@ -17,10 +17,9 @@ Script *m_scripts[MAX_SCRIPTS]; Config SD2Config; -std::string _strSD2DBinfoString; -std::string strSD2DBinfoString() +QueryResult* strSD2Pquery(char* str) { -return _strSD2DBinfoString; +return SD2Database.Query(str); } void FillSpellSummary(); @@ -29,7 +28,6 @@ void LoadDatabase() { std::string strSD2DBinfo = SD2Config.GetStringDefault("ScriptDev2DatabaseInfo", ""); - _strSD2DBinfoString = strSD2DBinfo; if (strSD2DBinfo.empty()) { @@ -53,9 +51,6 @@ void LoadDatabase() error_log("SD2: Unable to connect to Database. Load database aborted."); return; } - - SD2Database.HaltDelayThread(); - } struct TSpellSummary { @@ -74,6 +69,7 @@ void ScriptsFree() delete m_scripts[i]; num_sc_scripts = 0; + SD2Database.HaltDelayThread(); } MANGOS_DLL_EXPORT diff --git a/ScriptMgr.h b/ScriptMgr.h index 1b1c9609b..c361b4b67 100644 --- a/ScriptMgr.h +++ b/ScriptMgr.h @@ -7,6 +7,7 @@ #include "Common.h" #include "DBCStructure.h" +#include "Database/DatabaseEnv.h" class Player; class Creature; @@ -73,8 +74,8 @@ struct Script //Generic scripting text function void DoScriptText(int32 textEntry, WorldObject* pSource, Unit* target = NULL); -//DB config string -std::string strSD2DBinfoString(); +//DB query +QueryResult* strSD2Pquery(char*); #if COMPILER == COMPILER_GNU #define FUNC_PTR(name,callconvention,returntype,parameters) typedef returntype(*name)parameters __attribute__ ((callconvention)); diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index bfba1b568..7d20fb9cb 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -5,7 +5,7 @@ #include "precompiled.h" #ifdef DEF_BOSS_SPELL_WORKER_H -extern DatabaseType SD2Database; +//extern DatabaseType SD2Database; BossSpellWorker::BossSpellWorker(ScriptedAI* bossAI) { @@ -20,7 +20,7 @@ BossSpellWorker::BossSpellWorker(ScriptedAI* bossAI) else currentDifficulty = RAID_DIFFICULTY_10MAN_NORMAL; debug_log("BSW: Initializing BossSpellWorker object for boss %u difficulty %u",bossID,currentDifficulty); LoadSpellTable(); - Reset(currentDifficulty); + Reset((uint8)currentDifficulty); }; BossSpellWorker::~BossSpellWorker() @@ -44,51 +44,14 @@ void BossSpellWorker::_resetTimer(uint8 m_uiSpellIdx) void BossSpellWorker::LoadSpellTable() { - DatabaseType SD2Database; - std::string strSD2DBinfo = strSD2DBinfoString(); + debug_log("BSW: Loading table of spells boss %u difficulty %u", bossID , currentDifficulty); - if (strSD2DBinfo.empty()) - { - error_log("BSW: Missing Scriptdev2 database info from configuration file. Load database aborted."); - return; - } + char query[MAX_QUERY_LEN]; - //Initialize connection to DB - if (SD2Database.Initialize(strSD2DBinfo.c_str())) - { + sprintf(query, "SELECT entry, spellID_N10, spellID_N25, spellID_H10, spellID_H25, timerMin_N10, timerMin_N25, timerMin_H10, timerMin_H25, timerMax_N10, timerMax_N25, timerMax_H10, timerMax_H25, data1, data2, data3, data4, locData_x, locData_y, locData_z, varData, StageMask_N, StageMask_H, CastType, isVisualEffect, isBugged, textEntry FROM `boss_spell_table` WHERE entry = %u;\r\n", bossID); + + QueryResult* Result = strSD2Pquery(query); - debug_log("BSW: Loading table of spells boss %u difficulty %u", bossID , currentDifficulty); -// QueryResult* Result = SD2Database.PQuery("SELECT entry, spellID_N10, spellID_N25, spellID_H10, spellID_H25, timerMin_N10, timerMin_N25, timerMin_H10, timerMin_H25, timerMax_N10, timerMax_N25, timerMax_H10, timerMax_H25, StageMask_N, StageMask_H, CastType, isVisualEffect, isBugged FROM boss_spell_table WHERE entry = '%u'", bossID); - QueryResult* Result = SD2Database.PQuery( "SELECT " - "entry, " - "spellID_N10, " - "spellID_N25, " - "spellID_H10, " - "spellID_H25, " - "timerMin_N10, " - "timerMin_N25, " - "timerMin_H10, " - "timerMin_H25, " - "timerMax_N10, " - "timerMax_N25, " - "timerMax_H10, " - "timerMax_H25, " - "data1, " - "data2, " - "data3, " - "data4, " - "locData_x, " - "locData_y, " - "locData_z, " - "varData, " - "StageMask_N, " - "StageMask_H, " - "CastType, " - "isVisualEffect, " - "isBugged, " - "textEntry " - "FROM boss_spell_table " - "WHERE entry = '%u'", bossID); if (Result) { uint32 uiCount = 0; @@ -147,15 +110,7 @@ void BossSpellWorker::LoadSpellTable() { error_db_log("BSW: Boss spell table for boss %u is empty.", bossID); bossSpellCount = 0; - } - } - else - { - error_log("BSW: Unable to connect to Database. Load database aborted."); - return; - } - - SD2Database.HaltDelayThread(); + }; } bool BossSpellWorker::_QuerySpellPeriod(uint8 m_uiSpellIdx, uint32 diff) From 7b2f2a810364955654779b70114050e3110916a0 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Mon, 5 Apr 2010 18:48:14 +0400 Subject: [PATCH 218/405] TOC part 33, snakes fix, doors, Icehowl combat movement. --- addition/724_trial_of_crusader_scriptdev2.sql | 150 +++++++++--------- ...rial_of_crusader_spelltable_scriptdev2.sql | 2 +- .../boss_anubarak_trial.cpp | 9 -- .../trial_of_the_crusader/boss_jaraxxus.cpp | 8 - .../boss_northrend_beasts.cpp | 99 ++++-------- .../boss_twin_valkyr.cpp | 12 -- .../trial_of_the_crusader.cpp | 20 ++- .../trial_of_the_crusader.h | 29 ++-- 8 files changed, 139 insertions(+), 190 deletions(-) diff --git a/addition/724_trial_of_crusader_scriptdev2.sql b/addition/724_trial_of_crusader_scriptdev2.sql index ccd85c604..fd86ca5c3 100644 --- a/addition/724_trial_of_crusader_scriptdev2.sql +++ b/addition/724_trial_of_crusader_scriptdev2.sql @@ -1,78 +1,78 @@ DELETE FROM `script_texts` WHERE `entry` BETWEEN -1713799 AND -1713499; INSERT INTO `script_texts` (`comment`,`sound`, `entry`,`content_loc8`,`type`,`language`,`emote`,`content_default`) VALUES -('34996','16036','-1713500','Добро пожаловать, герои! Вы услышали призыв Серебряного Авангарда и без колебаний откликнулись на него! В этом колизее вам предстоит сразиться с опаснейшими противниками. Те из вас, кто смогут пережить испытания, войдут в ряды Серебряного Авангарда, который направится в Цитадель Ледяной Короны.','1','0','0',''), -('34996','16038','-1713501','Из самых глубоких и темных пещер Грозовой Гряды был призван Гормок Пронзающий Бивень! В бой, герои!','1','0','0',''), -('34990','16069','-1713502','Твои чудовища не чета героям Альянса, Тирион!','1','0','0',''), -('34995','16069','-1713702','Твои чудовища не чета героям Орды, Тирион!','1','0','0',''), -('34796','0','-1713601','Мои рабы! Уничтожьте врага!','1','0','0',''), -('34996','16039','-1713503','Приготовьтесь к схватке с близнецами-чудовищами, Кислотной Утробой и Жуткой Чешуей!','1','0','0',''), -('34799','0','-1713504','После гибели товарища %s приходит в ярость!','1','0','0',''), -('34996','16040','-1713505','В воздухе повеяло ледяным дыханием следующего бойца: на арену выходит Ледяной Рев! Сражайтесь или погибните, чемпионы!','1','0','0',''), -('34797','0','-1713506','%s глядит на |3-3($n) и испускает гортанный вой!','1','0','0',''), -('34797','0','-1713507','%s врезается в стену Колизея и теряет ориентацию!','1','0','0',''), -('34797','0','-1713508','|3-3(%s) охватывает кипящая ярость, и он растаптывает всех на своем пути!','1','0','0',''), -('34996','16041','-1713509','Все чудовища повержены!','1','0','0',''), -('34996','16043','-1713510','Сейчас великий чернокнижник Вилфред Непопамс призовет вашего нового противника. Готовьтесь к бою!','1','0','0',''), -('35458','16268','-1713511','Благодарю, Верховный лорд. А теперь, смельчаки, я приступаю к ритуалу призыва. Когда я закончу, появится грозный демон!','1','0','0',''), -('35458','16269','-1713512','Готовьтесь к забвению!','1','0','0',''), -('35458','16270','-1713513','АГА! Получилось! Трепещи перед всевластным Вилфредом Непопамсом, мастером призыва! Ты покорен мне, демон!','1','0','0',''), -('34780','16143','-1713514','Ничтожный гном! Тебя погубит твоя самоуверенность!','1','0','0',''), -('35458','16271','-1713515','Тут я главный!','1','0','0',''), -('35458','16271','-1713715','Ну вот, опять я облажался...','1','0','0',''), -('34996','16044','-1713516','Быстрей, герои, расправьтесь с повелителем демонов, прежде чем он откроет портал в свое темное царство!','1','0','0',''), -('34780','16144','-1713517','Перед вами Джараксус, эредарский повелитель Пылающего Легиона!','1','0','0',''), -('34780','0','-1713518','На вас направлено |cFFFF0000Пламя Легиона!|r','1','0','0',''), -('34780','0','-1713519','%s создает врата Пустоты!','1','0','0',''), -('34780','0','-1713520','%s создает |cFF00FF00Вулкан инферналов!|r','1','0','0',''), -('34780','16150','-1713521','Явись, сестра! Господин зовет!','1','0','0',''), -('34780','0','-1713522','$n $gподвергся:подверглась; |cFF00FFFFИспепелению плоти!|r Исцелите $gего:ее;!','1','0','0',''), -('34780','16149','-1713523','ПЛОТЬ ОТ КОСТИ!','1','0','0',''), -('34780','16151','-1713524','ИНФЕРНАЛ!','1','0','0',''), -('34780','16147','-1713525','Мое место займут другие. Ваш мир обречен...','1','0','0',''), -('34996','16045','-1713526','Гибель Вилфреда Непопамса весьма трагична и должна послужить уроком тем, кто смеет беспечно играть с темной магией. К счастью, вы победили демона, и теперь вас ждет новый противник.','1','0','0',''), -('34995','16021','-1713527','Подлые собаки Альянса! Вы выпустили повелителя демонов на воинов Орды? Ваша смерть будет быстрой!','1','0','0',''), -('34990','16064','-1713528','Альянсу не нужна помощь повелителя демонов, чтобы справиться с ордынским отродьем, пес!','1','0','0',''), -('34996','16046','-1713529','Тише! Успокойтесь! Никакого заговора здесь нет. Чернокнижник заигрался и поплатился за это. Турнир продолжается!','1','0','0',''), -('34996','16047','-1713530','В следующем бою вы встретитесь с могучими рыцарями Серебряного Авангарда! Лишь победив их, вы заслужите достойную награду.','1','0','0',''), -('34995','16023','-1713531','Орда требует справедливости! Мы вызываем Альянс на бой! Позволь нам встать на место твоих рыцарей, паладин. Мы покажем этим псам, как оскорблять Орду!','1','0','0',''), -('34995','16023','-1713731','Альянс требует справедливости! Мы вызываем Орду на бой! Позволь нам встать на место твоих рыцарей, паладин. Мы покажем этим псам, как оскорблять Альянс!','1','0','0',''), -('34996','16048','-1713532','Хорошо. Да будет так. Сражайтесь с честью!','1','0','0',''), -('34995','16022','-1713533','Не щадите никого, герои Орды! ЛОК-ТАР ОГАР!','1','0','0',''), -('34995','16022','-1713733','Не щадите никого, герои Альянса! За Лордаэрон!','1','0','0',''), -('34990','16067','-1713534','СЛАВА АЛЬЯНСУ!','1','0','0',''), -('34990','16067','-1713734','ЛОК-ТАР ОГАР!','1','0','0',''), -('34996','16049','-1713535','Пустая и горькая победа. После сегодняшних потерь мы стали слабее как целое. Кто еще, кроме Короля-лича, выиграет от подобной глупости? Пали великие воины. И ради чего? Истинная опасность еще впереди - нас ждет битва с Королем-личом.','1','0','0',''), -('34996','16050','-1713536','Лишь сплотившись, вы сможете пройти последнее испытание. Из глубин Ледяной Короны навстречу вам подымаются две могучие воительницы Плети: жуткие валькирии, крылатые вестницы Короля-лича!','1','0','0',''), -('34996','16037','-1713537','Пусть состязания начнутся!','1','0','0',''), -('34497','0','-1713538','%s начинает читать заклинание|cFFFFFFFFСветлая воронка!|r Переключение к |cFFFFFFFFСветлой|r сущности!','1','0','0',''), -('34497','0','-1713539','%s начинает читать заклинание Договор близнецов!','1','0','0',''), -('34496','0','-1713540','%s начинает читать заклинание |cFF9932CDТемная воронка!|r Переключение к |cFF9932CDТемной|r сущности!','1','0','0',''), -('34497','16272','-1713541','Во имя темного повелителя. Во имя Короля-лича. Вы. Умрете.','1','0','0',''), -('34496','16272','-1713741','Во имя светлого повелителя. Во имя Короля-лича. Вы. Умрете.','1','0','0',''), -('34496','16279','-1713542','Да поглотит вас Свет!','1','0','0',''), -('34496','16277','-1713543','Пустое место!','1','0','0',''), -('34497','16276','-1713544','Тебя оценили и признали ничтожеством.','1','0','0',''), -('34497','16274','-1713545','ХАОС!','1','0','0',''), -('34496','16278','-1713546','Да поглотит вас Тьма!','1','0','0',''), -('34496','16275','-1713547','Плеть не остановить...','1','0','0',''), -('34990','16068','-1713548','Против Альянса не выстоять даже самым сильным прислужникам Короля-лича! Все славьте наших героев!','1','0','0',''), -('34995','16068','-1713748','Против Орды не выстоять даже самым сильным прислужникам Короля-лича! Все славьте наших героев!','1','0','0',''), -('34996','16051','-1713549','Король-лич понес тяжелую потерю! Вы проявили себя как бесстрашные герои Серебряного Авангарда! Мы вместе нанесем удар по Цитадели Ледяной Короны и разнесем в клочья остатки Плети! Нет такого испытания, которое мы бы не могли пройти сообща!','1','0','0',''), -('16980','16321','-1713550','Будет тебе такое испытание, Фордринг.','1','0','0',''), -('34996','16052','-1713551','Артас! Нас гораздо больше! Сложи Ледяную Скорбь, и я подарю тебе заслуженную смерть.','1','0','0',''), -('35877','16322','-1713552','Нерубианцы воздвигли целую империю под льдами Нордскола. Империю, на которой вы так бездумно построили свои дома. МОЮ ИМПЕРИЮ.','1','0','0',''), -('16980','16323','-1713553','Души твоих павших чемпионов будут принадлежать мне, Фордринг.','1','0','0',''), -('34564','16235','-1713554','А вот и гости заявились, как и обещал господин.','1','0','0',''), -('34564','16234','-1713555','Это место станет вашей могилой!','1','0','0',''), -('34564','16240','-1713556','Ауум на-л ак-к-к-к, ишшш. Вставайте, слуги мои. Время пожирать...','1','0','0',''), -('34564','0','-1713557','%s зарывается в землю!','1','0','0',''), -('34660','0','-1713558','Шипы |3-1(%s) преследуют |3-3($n)!','1','0','0',''), -('34564','0','-1713559','%s вылезает на поверхность!','1','0','0',''), -('34564','16241','-1713560','Стая поглотит вас!','1','0','0',''), -('34564','0','-1713561','%s выпускает рой жуков-трупоедов, чтобы восстановить здоровье!','1','0','0',''), -('34564','16236','-1713562','Ф-лаккх шир!','1','0','0',''), -('34564','16237','-1713563','Еще одна душа накормит хозяина.','1','0','0',''), -('34564','16238','-1713564','Я подвел тебя, господин...','1','0','0',''), -('36095','0','-1713565','Чемпионы, вы прошли испытание великого крестоносца! Знайте, что только самые сильные искатели приключений могли рассчитывать завершить это испытание.','1','0','0',''), -('36095','0','-1713566','Позвольте вручить вам эти сундуки в качестве заслуженной награды, и пусть его содержимое послужит вам верой и правдой в походе против Артаса в самом центре Цитадели Ледяной Короны!','1','0','0',''); +('34996','16036','-1713500','Добро пожаловать, герои! Вы услышали призыв Серебряного Авангарда и без колебаний откликнулись на него! В этом колизее вам предстоит сразиться с опаснейшими противниками. Те из вас, кто смогут пережить испытания, войдут в ряды Серебряного Авангарда, который направится в Цитадель Ледяной Короны.','6','0','0',''), +('34996','16038','-1713501','Из самых глубоких и темных пещер Грозовой Гряды был призван Гормок Пронзающий Бивень! В бой, герои!','6','0','0',''), +('34990','16069','-1713502','Твои чудовища не чета героям Альянса, Тирион!','6','0','0',''), +('34995','16069','-1713702','Твои чудовища не чета героям Орды, Тирион!','6','0','0',''), +('34796','0','-1713601','Мои рабы! Уничтожьте врага!','3','0','0',''), +('34996','16039','-1713503','Приготовьтесь к схватке с близнецами-чудовищами, Кислотной Утробой и Жуткой Чешуей!','6','0','0',''), +('34799','0','-1713504','После гибели товарища %s приходит в ярость!','3','0','0',''), +('34996','16040','-1713505','В воздухе повеяло ледяным дыханием следующего бойца: на арену выходит Ледяной Рев! Сражайтесь или погибните, чемпионы!','6','0','0',''), +('34797','0','-1713506','%s глядит на |3-3($n) и испускает гортанный вой!','3','0','0',''), +('34797','0','-1713507','%s врезается в стену Колизея и теряет ориентацию!','3','0','0',''), +('34797','0','-1713508','|3-3(%s) охватывает кипящая ярость, и он растаптывает всех на своем пути!','3','0','0',''), +('34996','16041','-1713509','Все чудовища повержены!','6','0','0',''), +('34996','16043','-1713510','Сейчас великий чернокнижник Вилфред Непопамс призовет вашего нового противника. Готовьтесь к бою!','6','0','0',''), +('35458','16268','-1713511','Благодарю, Верховный лорд. А теперь, смельчаки, я приступаю к ритуалу призыва. Когда я закончу, появится грозный демон!','6','0','0',''), +('35458','16269','-1713512','Готовьтесь к забвению!','6','0','0',''), +('35458','16270','-1713513','АГА! Получилось! Трепещи перед всевластным Вилфредом Непопамсом, мастером призыва! Ты покорен мне, демон!','6','0','0',''), +('34780','16143','-1713514','Ничтожный гном! Тебя погубит твоя самоуверенность!','3','0','0',''), +('35458','16271','-1713515','Тут я главный!','3','0','0',''), +('35458','16271','-1713715','Ну вот, опять я облажался...','3','0','0',''), +('34996','16044','-1713516','Быстрей, герои, расправьтесь с повелителем демонов, прежде чем он откроет портал в свое темное царство!','6','0','0',''), +('34780','16144','-1713517','Перед вами Джараксус, эредарский повелитель Пылающего Легиона!','6','0','0',''), +('34780','0','-1713518','На вас направлено |cFFFF0000Пламя Легиона!|r','3','0','0',''), +('34780','0','-1713519','%s создает врата Пустоты!','3','0','0',''), +('34780','0','-1713520','%s создает |cFF00FF00Вулкан инферналов!|r','3','0','0',''), +('34780','16150','-1713521','Явись, сестра! Господин зовет!','3','0','0',''), +('34780','0','-1713522','$n $gподвергся:подверглась; |cFF00FFFFИспепелению плоти!|r Исцелите $gего:ее;!','6','0','0',''), +('34780','16149','-1713523','ПЛОТЬ ОТ КОСТИ!','3','0','0',''), +('34780','16151','-1713524','ИНФЕРНАЛ!','3','0','0',''), +('34780','16147','-1713525','Мое место займут другие. Ваш мир обречен...','6','0','0',''), +('34996','16045','-1713526','Гибель Вилфреда Непопамса весьма трагична и должна послужить уроком тем, кто смеет беспечно играть с темной магией. К счастью, вы победили демона, и теперь вас ждет новый противник.','6','0','0',''), +('34995','16021','-1713527','Подлые собаки Альянса! Вы выпустили повелителя демонов на воинов Орды? Ваша смерть будет быстрой!','6','0','0',''), +('34990','16064','-1713528','Альянсу не нужна помощь повелителя демонов, чтобы справиться с ордынским отродьем, пес!','6','0','0',''), +('34996','16046','-1713529','Тише! Успокойтесь! Никакого заговора здесь нет. Чернокнижник заигрался и поплатился за это. Турнир продолжается!','6','0','0',''), +('34996','16047','-1713530','В следующем бою вы встретитесь с могучими рыцарями Серебряного Авангарда! Лишь победив их, вы заслужите достойную награду.','6','0','0',''), +('34995','16023','-1713531','Орда требует справедливости! Мы вызываем Альянс на бой! Позволь нам встать на место твоих рыцарей, паладин. Мы покажем этим псам, как оскорблять Орду!','6','0','0',''), +('34995','16023','-1713731','Альянс требует справедливости! Мы вызываем Орду на бой! Позволь нам встать на место твоих рыцарей, паладин. Мы покажем этим псам, как оскорблять Альянс!','6','0','0',''), +('34996','16048','-1713532','Хорошо. Да будет так. Сражайтесь с честью!','6','0','0',''), +('34995','16022','-1713533','Не щадите никого, герои Орды! ЛОК-ТАР ОГАР!','6','0','0',''), +('34995','16022','-1713733','Не щадите никого, герои Альянса! За Лордаэрон!','6','0','0',''), +('34990','16067','-1713534','СЛАВА АЛЬЯНСУ!','6','0','0',''), +('34990','16067','-1713734','ЛОК-ТАР ОГАР!','6','0','0',''), +('34996','16049','-1713535','Пустая и горькая победа. После сегодняшних потерь мы стали слабее как целое. Кто еще, кроме Короля-лича, выиграет от подобной глупости? Пали великие воины. И ради чего? Истинная опасность еще впереди - нас ждет битва с Королем-личом.','6','0','0',''), +('34996','16050','-1713536','Лишь сплотившись, вы сможете пройти последнее испытание. Из глубин Ледяной Короны навстречу вам подымаются две могучие воительницы Плети: жуткие валькирии, крылатые вестницы Короля-лича!','6','0','0',''), +('34996','16037','-1713537','Пусть состязания начнутся!','6','0','0',''), +('34497','0','-1713538','%s начинает читать заклинание|cFFFFFFFFСветлая воронка!|r Переключение к |cFFFFFFFFСветлой|r сущности!','3','0','0',''), +('34497','0','-1713539','%s начинает читать заклинание Договор близнецов!','3','0','0',''), +('34496','0','-1713540','%s начинает читать заклинание |cFF9932CDТемная воронка!|r Переключение к |cFF9932CDТемной|r сущности!','3','0','0',''), +('34497','16272','-1713541','Во имя темного повелителя. Во имя Короля-лича. Вы. Умрете.','3','0','0',''), +('34496','16272','-1713741','Во имя светлого повелителя. Во имя Короля-лича. Вы. Умрете.','3','0','0',''), +('34496','16279','-1713542','Да поглотит вас Свет!','3','0','0',''), +('34496','16277','-1713543','Пустое место!','3','0','0',''), +('34497','16276','-1713544','Тебя оценили и признали ничтожеством.','3','0','0',''), +('34497','16274','-1713545','ХАОС!','3','0','0',''), +('34496','16278','-1713546','Да поглотит вас Тьма!','3','0','0',''), +('34496','16275','-1713547','Плеть не остановить...','3','0','0',''), +('34990','16068','-1713548','Против Альянса не выстоять даже самым сильным прислужникам Короля-лича! Все славьте наших героев!','6','0','0',''), +('34995','16068','-1713748','Против Орды не выстоять даже самым сильным прислужникам Короля-лича! Все славьте наших героев!','6','0','0',''), +('34996','16051','-1713549','Король-лич понес тяжелую потерю! Вы проявили себя как бесстрашные герои Серебряного Авангарда! Мы вместе нанесем удар по Цитадели Ледяной Короны и разнесем в клочья остатки Плети! Нет такого испытания, которое мы бы не могли пройти сообща!','6','0','0',''), +('16980','16321','-1713550','Будет тебе такое испытание, Фордринг.','6','0','0',''), +('34996','16052','-1713551','Артас! Нас гораздо больше! Сложи Ледяную Скорбь, и я подарю тебе заслуженную смерть.','6','0','0',''), +('35877','16322','-1713552','Нерубианцы воздвигли целую империю под льдами Нордскола. Империю, на которой вы так бездумно построили свои дома. МОЮ ИМПЕРИЮ.','3','0','0',''), +('16980','16323','-1713553','Души твоих павших чемпионов будут принадлежать мне, Фордринг.','3','0','0',''), +('34564','16235','-1713554','А вот и гости заявились, как и обещал господин.','3','0','0',''), +('34564','16234','-1713555','Это место станет вашей могилой!','3','0','0',''), +('34564','16240','-1713556','Ауум на-л ак-к-к-к, ишшш. Вставайте, слуги мои. Время пожирать...','3','0','0',''), +('34564','0','-1713557','%s зарывается в землю!','3','0','0',''), +('34660','0','-1713558','Шипы |3-1(%s) преследуют |3-3($n)!','3','0','0',''), +('34564','0','-1713559','%s вылезает на поверхность!','3','0','0',''), +('34564','16241','-1713560','Стая поглотит вас!','3','0','0',''), +('34564','0','-1713561','%s выпускает рой жуков-трупоедов, чтобы восстановить здоровье!','3','0','0',''), +('34564','16236','-1713562','Ф-лаккх шир!','3','0','0',''), +('34564','16237','-1713563','Еще одна душа накормит хозяина.','3','0','0',''), +('34564','16238','-1713564','Я подвел тебя, господин...','3','0','0',''), +('36095','0','-1713565','Чемпионы, вы прошли испытание великого крестоносца! Знайте, что только самые сильные искатели приключений могли рассчитывать завершить это испытание.','6','0','0',''), +('36095','0','-1713566','Позвольте вручить вам эти сундуки в качестве заслуженной награды, и пусть его содержимое послужит вам верой и правдой в походе против Артаса в самом центре Цитадели Ледяной Короны!','6','0','0',''); diff --git a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql index fb24828f6..546a83d1e 100644 --- a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql +++ b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql @@ -80,7 +80,7 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES (34797, 66683, 67660, 67661, 67662, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), (34797, 66689, 67650, 67651, 67652, 25000, 25000, 25000, 25000, 40000, 40000, 40000, 40000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), -(34797, 66734, 0, 0, 0, 1000, 0, 0, 0, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34797, 66734, 0, 0, 0, 3000, 0, 0, 0, 3000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL), (34797, 66770, 67654, 67655, 67656, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), (34797, 66758, 0, 0, 0, 15000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), (34797, 66759, 0, 0, 0, 300000, 0, 0, 0, 300000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp index d6cbad02d..9cadffb8c 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp @@ -67,7 +67,6 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI } ScriptedInstance* m_pInstance; - uint8 Difficulty; uint8 stage; uint32 SubmergeTimer; bool intro; @@ -77,9 +76,7 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI if(!m_pInstance) return; stage = 0; intro = true; - Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); bsw = new BossSpellWorker(this); - bsw->Reset(Difficulty); m_creature->SetRespawnDelay(DAY); } @@ -197,16 +194,13 @@ struct MANGOS_DLL_DECL mob_swarm_scarabAI : public ScriptedAI } ScriptedInstance* m_pInstance; - uint8 Difficulty; BossSpellWorker* bsw; void Reset() { - Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); m_creature->SetInCombatWithZone(); m_creature->SetRespawnDelay(DAY); bsw = new BossSpellWorker(this); - bsw->Reset(Difficulty); } void KilledUnit(Unit* pVictim) @@ -253,19 +247,16 @@ struct MANGOS_DLL_DECL mob_nerubian_borrowerAI : public ScriptedAI } ScriptedInstance* m_pInstance; - uint8 Difficulty; bool submerged; BossSpellWorker* bsw; Unit* currentTarget; void Reset() { - Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); m_creature->SetInCombatWithZone(); m_creature->SetRespawnDelay(DAY); submerged = false; bsw = new BossSpellWorker(this); - bsw->Reset(Difficulty); } void KilledUnit(Unit* pVictim) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp index 1cad12c8f..f96edfe2d 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp @@ -96,7 +96,6 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI m_volcanoCount = 4; } bsw = new BossSpellWorker(this); - bsw->Reset(Difficulty); DoScriptText(-1713517,m_creature); m_creature->SetRespawnDelay(DAY); } @@ -273,7 +272,6 @@ struct MANGOS_DLL_DECL mob_infernal_volcanoAI : public ScriptedAI m_Count = 6; } bsw = new BossSpellWorker(this); - bsw->Reset(Difficulty); } void AttackStart(Unit *who) @@ -326,16 +324,13 @@ struct MANGOS_DLL_DECL mob_fel_infernalAI : public ScriptedAI } ScriptedInstance* m_pInstance; - uint8 Difficulty; BossSpellWorker* bsw; void Reset() { - Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); m_creature->SetInCombatWithZone(); m_creature->SetRespawnDelay(DAY); bsw = new BossSpellWorker(this); - bsw->Reset(Difficulty); } void KilledUnit(Unit* pVictim) @@ -454,16 +449,13 @@ struct MANGOS_DLL_DECL mob_mistress_of_painAI : public ScriptedAI } ScriptedInstance* m_pInstance; - uint8 Difficulty; BossSpellWorker* bsw; void Reset() { - Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); m_creature->SetInCombatWithZone(); m_creature->SetRespawnDelay(DAY); bsw = new BossSpellWorker(this); - bsw->Reset(Difficulty); } void KilledUnit(Unit* pVictim) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index 92cbc088d..1f6345748 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -85,16 +85,13 @@ struct MANGOS_DLL_DECL boss_gormokAI : public ScriptedAI } ScriptedInstance* m_pInstance; - uint8 Difficulty; uint8 SnoboldsCount; BossSpellWorker* bsw; void Reset() { if(!m_pInstance) return; - Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); bsw = new BossSpellWorker(this); - bsw->Reset(Difficulty); SetEquipmentSlots(false, EQUIP_MAIN, EQUIP_OFFHAND, EQUIP_RANGED); m_creature->SetRespawnDelay(DAY); m_creature->SetInCombatWithZone(); @@ -152,7 +149,6 @@ struct MANGOS_DLL_DECL mob_snobold_vassalAI : public ScriptedAI } ScriptedInstance* m_pInstance; - uint8 Difficulty; BossSpellWorker* bsw; Unit* pBoss; Unit* defaultTarget; @@ -160,8 +156,6 @@ struct MANGOS_DLL_DECL mob_snobold_vassalAI : public ScriptedAI void Reset() { bsw = new BossSpellWorker(this); - Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); - bsw->Reset(Difficulty); m_creature->SetInCombatWithZone(); m_creature->SetRespawnDelay(DAY); pBoss = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_GORMOK)); @@ -219,19 +213,16 @@ struct MANGOS_DLL_DECL boss_acidmawAI : public ScriptedAI } ScriptedInstance* m_pInstance; - uint8 Difficulty; BossSpellWorker* bsw; uint8 stage; bool enraged; void Reset() { - Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); stage = 1; enraged = false; m_creature->SetInCombatWithZone(); bsw = new BossSpellWorker(this); - bsw->Reset(Difficulty); m_creature->SetRespawnDelay(DAY); } @@ -290,12 +281,8 @@ struct MANGOS_DLL_DECL boss_acidmawAI : public ScriptedAI bsw->timedCast(SPELL_SWEEP_0, uiDiff); - if (bsw->timedQuery(SPELL_SUBMERGE_0, uiDiff) && m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == ACIDMAW_SUBMERGED) - m_pInstance->SetData(TYPE_NORTHREND_BEASTS, DREADSCALE_SUBMERGED); - - if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) != ACIDMAW_SUBMERGED) + if (bsw->timedQuery(SPELL_SUBMERGE_0, uiDiff) && m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == ACIDMAW_SUBMERGED) stage = 3; - break;} case 3: { DoScriptText(-1713559,m_creature); @@ -308,6 +295,7 @@ struct MANGOS_DLL_DECL boss_acidmawAI : public ScriptedAI if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == SNAKES_SPECIAL && !enraged) { + DoScriptText(-1713559,m_creature); bsw->doRemove(SPELL_SUBMERGE_0); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); bsw->doCast(SPELL_ENRAGE); @@ -316,7 +304,6 @@ struct MANGOS_DLL_DECL boss_acidmawAI : public ScriptedAI DoScriptText(-1713504,m_creature); }; - DoMeleeAttackIfReady(); } }; @@ -335,19 +322,16 @@ struct MANGOS_DLL_DECL boss_dreadscaleAI : public ScriptedAI } ScriptedInstance* m_pInstance; - uint8 Difficulty; BossSpellWorker* bsw; uint8 stage; bool enraged; void Reset() { - Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); stage = 0; enraged = false; m_creature->SetInCombatWithZone(); bsw = new BossSpellWorker(this); - bsw->Reset(Difficulty); m_creature->SetRespawnDelay(DAY); } @@ -399,6 +383,7 @@ struct MANGOS_DLL_DECL boss_dreadscaleAI : public ScriptedAI m_pInstance->SetData(TYPE_NORTHREND_BEASTS, DREADSCALE_SUBMERGED); break;} case 2: { + bsw->timedCast(SPELL_FIRE_SPIT, uiDiff); bsw->timedCast(SPELL_BURNING_SPRAY, uiDiff); @@ -406,11 +391,7 @@ struct MANGOS_DLL_DECL boss_dreadscaleAI : public ScriptedAI bsw->timedCast(SPELL_SWEEP_0, uiDiff); if (bsw->timedQuery(SPELL_SUBMERGE_0, uiDiff) && m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == DREADSCALE_SUBMERGED) - m_pInstance->SetData(TYPE_NORTHREND_BEASTS, ACIDMAW_SUBMERGED); - - if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) != DREADSCALE_SUBMERGED) - stage = 3; - + stage = 3; break;} case 3: { DoScriptText(-1713559,m_creature); @@ -423,6 +404,7 @@ struct MANGOS_DLL_DECL boss_dreadscaleAI : public ScriptedAI if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == SNAKES_SPECIAL && !enraged) { + DoScriptText(-1713559,m_creature); bsw->doRemove(SPELL_SUBMERGE_0); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); bsw->doCast(SPELL_ENRAGE); @@ -449,21 +431,16 @@ struct MANGOS_DLL_DECL boss_icehowlAI : public ScriptedAI } ScriptedInstance* m_pInstance; - uint8 Difficulty; BossSpellWorker* bsw; bool MovementStarted; bool TrampleCasted; uint8 stage; float fPosX, fPosY, fPosZ; - std::list WayPointList; - std::list::iterator WayPoint; Unit* pTarget; void Reset() { if(!m_pInstance) return; - Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); bsw = new BossSpellWorker(this); - bsw->Reset(Difficulty); m_creature->SetRespawnDelay(DAY); MovementStarted = false; stage = 0; @@ -479,27 +456,16 @@ struct MANGOS_DLL_DECL boss_icehowlAI : public ScriptedAI { if(!m_pInstance) return; if(type != POINT_MOTION_TYPE) return; - if(WayPoint->id == id) + if(id != 1 && MovementStarted) { - ++WayPoint; - if (WayPoint != WayPointList.end()) - m_creature->GetMotionMaster()->MovePoint(WayPoint->id, WayPoint->x, WayPoint->y,WayPoint->z); - else MovementStarted = false; + m_creature->GetMotionMaster()->MovePoint(1, fPosX, fPosY, fPosZ); } - } - - void StartMovement() - { - if(!WayPointList.empty() || MovementStarted) return; - WayPoint = WayPointList.begin(); - MovementStarted = true; - m_creature->GetMotionMaster()->MovePoint(WayPoint->id, WayPoint->x, WayPoint->y,WayPoint->z); - } - - void AddWaypoint(uint32 id, float x, float y, float z) - { - WayPoints wp(id, x, y, z); - WayPointList.push_back(wp); + else { + m_creature->GetMotionMaster()->MovementExpired(); + MovementStarted = false; + SetCombatMovement(true); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + } } void JustReachedHome() @@ -538,38 +504,36 @@ struct MANGOS_DLL_DECL boss_icehowlAI : public ScriptedAI break; } case 1: { - bsw->doCast(SPELL_MASSIVE_CRASH); - DoScriptText(-1713506,m_creature,bsw->currentTarget); - stage = 2; + if (bsw->doCast(SPELL_MASSIVE_CRASH) == CAST_OK); + stage = 2; break; } case 2: { if (pTarget = bsw->SelectUnit()) { - bsw->doCast(SPELL_MASSIVE_CRASH); - m_creature->GetPosition(fPosX, fPosY, fPosZ); - AddWaypoint(0, fPosX, fPosY, fPosZ); - pTarget->GetPosition(fPosX, fPosY, fPosZ); - AddWaypoint(1, fPosX, fPosY, fPosZ); TrampleCasted = false; m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - SetCombatMovement(false); -// m_creature->GetMotionMaster()->MovementExpired(true); -// m_creature->GetMotionMaster()->Clear(); -// m_creature->GetMotionMaster()->MoveIdle(); stage = 3; + bsw->resetTimer(SPELL_TRAMPLE); + DoScriptText(-1713506,m_creature,pTarget); + SetCombatMovement(false); + m_creature->GetMotionMaster()->MoveIdle(); } break; } case 3: { if (bsw->timedQuery(SPELL_TRAMPLE,uiDiff)) { + pTarget->GetPosition(fPosX, fPosY, fPosZ); + TrampleCasted = false; StartMovement(); - DoScriptText(-1713506,m_creature,pTarget); + MovementStarted = true; + m_creature->GetMotionMaster()->MovePoint(1, fPosX, fPosY, fPosZ); + DoScriptText(-1713508,m_creature); stage = 4; } break; } case 4: { - if (MovementStarted = true) + if (MovementStarted) { Map* pMap = m_creature->GetMap(); Map::PlayerList const &lPlayers = pMap->GetPlayers(); @@ -578,9 +542,12 @@ struct MANGOS_DLL_DECL boss_icehowlAI : public ScriptedAI Unit* pPlayer = itr->getSource(); if (!pPlayer) continue; if (pPlayer->isAlive() && pPlayer->IsWithinDistInMap(m_creature, 5.0f)) { - bsw->timedCast(SPELL_TRAMPLE, uiDiff, pPlayer); + bsw->doCast(SPELL_TRAMPLE, pPlayer); TrampleCasted = true; - } + MovementStarted = false; + m_creature->GetMotionMaster()->MovementExpired(); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + } } } else stage = 5; @@ -592,9 +559,9 @@ struct MANGOS_DLL_DECL boss_icehowlAI : public ScriptedAI bsw->doCast(SPELL_STAGGERED_DAZE); DoScriptText(-1713507,m_creature); } - WayPointList.clear(); -// m_creature->GetMotionMaster()->Clear(); -// m_creature->GetMotionMaster()->MovementExpired(false); + MovementStarted = false; + m_creature->GetMotionMaster()->MovementExpired(); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); SetCombatMovement(true); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); stage = 0; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp index e8e74f57f..d17245ca1 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp @@ -78,18 +78,15 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI } ScriptedInstance* m_pInstance; - uint8 Difficulty; uint8 stage; BossSpellWorker* bsw; void Reset() { if(!m_pInstance) return; - Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); SetEquipmentSlots(false, EQUIP_MAIN_1, EQUIP_OFFHAND_1, EQUIP_RANGED_1); if (m_creature->isAlive()) m_creature->SummonCreature(NPC_LIGHT_ESSENCE, SpawnLoc[24].x, SpawnLoc[24].y, SpawnLoc[24].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); if (m_creature->isAlive()) m_creature->SummonCreature(NPC_LIGHT_ESSENCE, SpawnLoc[25].x, SpawnLoc[25].y, SpawnLoc[25].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); bsw = new BossSpellWorker(this); - bsw->Reset(Difficulty); m_creature->SetRespawnDelay(DAY); } @@ -168,19 +165,16 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI } ScriptedInstance* m_pInstance; - uint8 Difficulty; uint8 stage; BossSpellWorker* bsw; void Reset() { if(!m_pInstance) return; - Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); SetEquipmentSlots(false, EQUIP_MAIN_2, EQUIP_OFFHAND_2, EQUIP_RANGED_2); if (m_creature->isAlive()) m_creature->SummonCreature(NPC_DARK_ESSENCE, SpawnLoc[22].x, SpawnLoc[22].y, SpawnLoc[22].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); if (m_creature->isAlive()) m_creature->SummonCreature(NPC_DARK_ESSENCE, SpawnLoc[23].x, SpawnLoc[23].y, SpawnLoc[23].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); bsw = new BossSpellWorker(this); - bsw->Reset(Difficulty); m_creature->SetRespawnDelay(DAY); } @@ -253,11 +247,9 @@ struct MANGOS_DLL_DECL mob_light_essenceAI : public ScriptedAI Reset(); } ScriptedInstance* m_pInstance; - uint8 Difficulty; void Reset() { - Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); m_creature->SetRespawnDelay(DAY); m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); m_creature->GetMotionMaster()->MoveRandom(); @@ -292,7 +284,6 @@ bool GossipHello_mob_light_essence(Player *player, Creature* pCreature) { ScriptedInstance *pInstance = (ScriptedInstance *) pCreature->GetInstanceData(); if(!pInstance) return true; - uint8 Difficulty = pInstance->GetData(TYPE_DIFFICULTY); player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, pCreature->GetGUID()); player->RemoveAurasDueToSpell(SPELL_DARK_ESSENCE); player->CastSpell(player,SPELL_LIGHT_ESSENCE,false); @@ -307,11 +298,9 @@ struct MANGOS_DLL_DECL mob_dark_essenceAI : public ScriptedAI Reset(); } ScriptedInstance* m_pInstance; - uint8 Difficulty; void Reset() { - Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); m_creature->SetRespawnDelay(DAY); m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); m_creature->GetMotionMaster()->MoveRandom(); @@ -345,7 +334,6 @@ bool GossipHello_mob_dark_essence(Player *player, Creature* pCreature) { ScriptedInstance *pInstance = (ScriptedInstance *) pCreature->GetInstanceData(); if(!pInstance) return true; - uint8 Difficulty = pInstance->GetData(TYPE_DIFFICULTY); player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, pCreature->GetGUID()); player->RemoveAurasDueToSpell(SPELL_LIGHT_ESSENCE); player->CastSpell(player,SPELL_DARK_ESSENCE,false); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index 44f7c8225..63c13e474 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -546,7 +546,7 @@ struct MANGOS_DLL_DECL npc_fizzlebang_tocAI : public ScriptedAI UpdateTimer = 8000; break; case 1140: - m_creature->GetMap()->CreatureRelocation(m_creature, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z,0); + m_creature->GetMotionMaster()->MovementExpired(); pInstance->SetData(TYPE_STAGE,4); pInstance->SetData(TYPE_JARAXXUS,IN_PROGRESS); m_creature->SummonCreature(NPC_JARAXXUS, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); @@ -636,7 +636,7 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI case 150: m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE); if (pInstance->GetData(TYPE_BEASTS) != DONE) { - m_creature->SummonCreature(NPC_GORMOK, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + m_creature->SummonCreature(NPC_GORMOK, SpawnLoc[26].x, SpawnLoc[26].y, SpawnLoc[26].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_GORMOK))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); @@ -654,6 +654,7 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI DoScriptText(-1713503, m_creature); UpdateTimer = 10000; pInstance->SetData(TYPE_EVENT,210); + pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_MAIN_GATE_DOOR)); break; case 210: @@ -673,15 +674,17 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI } UpdateTimer = 10000; pInstance->SetData(TYPE_EVENT,220); + pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_MAIN_GATE_DOOR)); break; case 300: DoScriptText(-1713505, m_creature); UpdateTimer = 10000; pInstance->SetData(TYPE_EVENT,310); + pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_MAIN_GATE_DOOR)); break; case 310: if (pInstance->GetData(TYPE_BEASTS) != DONE) { - m_creature->SummonCreature(NPC_ICEHOWL, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + m_creature->SummonCreature(NPC_ICEHOWL, SpawnLoc[26].x, SpawnLoc[26].y, SpawnLoc[26].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_ICEHOWL))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); @@ -690,6 +693,7 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI } UpdateTimer = 10000; pInstance->SetData(TYPE_EVENT,320); + pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_MAIN_GATE_DOOR)); break; case 400: DoScriptText(-1713509, m_creature); @@ -872,6 +876,7 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI } UpdateTimer = 3000; pInstance->SetData(TYPE_EVENT,3095); + pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_MAIN_GATE_DOOR)); break; //summoning crusaders @@ -1006,6 +1011,7 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI } UpdateTimer = 3000; pInstance->SetData(TYPE_EVENT,3095); + pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_MAIN_GATE_DOOR)); break; //Crusaders battle end @@ -1024,6 +1030,7 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI DoScriptText(-1713537, m_creature); UpdateTimer = 10000; pInstance->SetData(TYPE_EVENT,4015); + pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_MAIN_GATE_DOOR)); break; case 4015: @@ -1043,6 +1050,7 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI } UpdateTimer = 10000; pInstance->SetData(TYPE_EVENT,4016); + pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_MAIN_GATE_DOOR)); break; case 4040: @@ -1105,7 +1113,7 @@ struct MANGOS_DLL_DECL npc_garrosh_tocAI : public ScriptedAI Reset(); } - InstanceData* pInstance; + ScriptedInstance* pInstance; uint32 UpdateTimer; void Reset() @@ -1159,6 +1167,7 @@ struct MANGOS_DLL_DECL npc_garrosh_tocAI : public ScriptedAI DoScriptText(-1713734, m_creature); UpdateTimer = 5000; pInstance->SetData(TYPE_EVENT,3091); + pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_MAIN_GATE_DOOR)); break; case 4030: DoScriptText(-1713748, m_creature); @@ -1184,7 +1193,7 @@ struct MANGOS_DLL_DECL npc_rinn_tocAI : public ScriptedAI Reset(); } - InstanceData* pInstance; + ScriptedInstance* pInstance; uint32 UpdateTimer; void Reset() @@ -1238,6 +1247,7 @@ struct MANGOS_DLL_DECL npc_rinn_tocAI : public ScriptedAI DoScriptText(-1713534, m_creature); UpdateTimer = 5000; pInstance->SetData(TYPE_EVENT,3090); + pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_MAIN_GATE_DOOR)); break; case 4020: DoScriptText(-1713548, m_creature); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index cf9bb470e..7c8ff3605 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -104,20 +104,20 @@ static Locations SpawnLoc[]= {559.257996, 90.266197, 395.122986}, // 0 Barrent {563.672974, 139.571, 393.837006}, // 1 Center {563.833008, 187.244995, 394.5}, // 2 Backdoor - {583.336182, 181.737717, 395.145956}, // 3 - {545.914185, 180.859543, 395.147909}, // 4 - {599.042358, 179.260727, 395.137146}, // 5 - {532.248901, 180.331955, 395.132658}, // 6 - {586.342285, 181.515823, 395.135956}, // 7 - {539.239929, 181.825577, 395.137909}, // 8 - {599.042358, 179.260727, 395.137146}, // 9 - {588.720581, 183.015472, 395.132658}, // 10 - {551.534119, 184.214478, 395.139526}, // 11 - {576.231201, 183.941071, 395.139526}, // 12 - {552.811610, 171.985779, 394.671661}, // 13 - {575.641724, 170.351501, 394.659943}, // 14 - {516.633972, 159.391708, 395.137543}, // 15 - {612.816956, 161.477921, 395.136810}, // 16 + {577.347839, 195.338888, 395.14}, // 3 - Right + {550.955933, 195.338888, 395.14}, // 4 - Left + {575.042358, 195.260727, 395.137146}, // 5 + {552.248901, 195.331955, 395.132658}, // 6 + {573.342285, 195.515823, 395.135956}, // 7 + {554.239929, 195.825577, 395.137909}, // 8 + {571.042358, 195.260727, 395.137146}, // 9 + {556.720581, 195.015472, 395.132658}, // 10 + {569.534119, 195.214478, 395.139526}, // 11 + {569.231201, 195.941071, 395.139526}, // 12 + {558.811610, 195.985779, 394.671661}, // 13 + {567.641724, 195.351501, 394.659943}, // 14 + {560.633972, 195.391708, 395.137543}, // 15 + {565.816956, 195.477921, 395.136810}, // 16 {563.549, 152.474, 394.393}, // 17 - Lich king start {563.547, 141.613, 393.908}, // 18 - Lich king end {787.932556, 133.28978, 142.612152}, // 19 - Anub'arak start location @@ -127,6 +127,7 @@ static Locations SpawnLoc[]= {541.602112, 161.879837, 394.587952}, // 23 - Dark essence 2 {541.021118, 117.262932, 395.314819}, // 24 - Light essence 1 {586.200562, 162.145523, 394.626129}, // 25 - Light essence 2 + {563.833008, 195.244995, 394.585561}, // 26 - outdoor }; enum uiWorldStates From 00fd8c67b6446c9fca40f875494dad6a90cab7d6 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Mon, 5 Apr 2010 20:42:08 +0400 Subject: [PATCH 219/405] Small change (thx to morphau) --- .../trial_of_the_crusader/boss_northrend_beasts.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index 1f6345748..360a2d1e8 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -524,7 +524,6 @@ struct MANGOS_DLL_DECL boss_icehowlAI : public ScriptedAI if (bsw->timedQuery(SPELL_TRAMPLE,uiDiff)) { pTarget->GetPosition(fPosX, fPosY, fPosZ); TrampleCasted = false; - StartMovement(); MovementStarted = true; m_creature->GetMotionMaster()->MovePoint(1, fPosX, fPosY, fPosZ); DoScriptText(-1713508,m_creature); From a28d9e77eb65a820c5a8dd78c807db35b37e36ff Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Tue, 6 Apr 2010 13:29:54 +0400 Subject: [PATCH 220/405] TOC part 24 - northrend beasts almost comlepe (maximum available off-like) --- addition/724_trial_of_crusader_mangos.sql | 6 +- ...rial_of_crusader_spelltable_scriptdev2.sql | 15 +++- .../boss_northrend_beasts.cpp | 86 +++++++++++++++---- 3 files changed, 84 insertions(+), 23 deletions(-) diff --git a/addition/724_trial_of_crusader_mangos.sql b/addition/724_trial_of_crusader_mangos.sql index d4ef0568f..8b23ded45 100644 --- a/addition/724_trial_of_crusader_mangos.sql +++ b/addition/724_trial_of_crusader_mangos.sql @@ -55,14 +55,18 @@ UPDATE `creature_template` SET `scriptname`='mob_snobold_vassal', `AIName` ='' W UPDATE `creature_template` SET `scriptname`='boss_dreadscale', `AIName` ='' WHERE `entry`=34799; UPDATE `creature_template` SET `scriptname`='boss_acidmaw', `AIName` ='' WHERE `entry`=35144; +UPDATE `creature_template` SET `scriptname`='mob_slime_pool', `minlevel` = 80, `maxlevel` = 80, `AIName` ='', `faction_A`= 14, `faction_H` = 14, `modelid_A` = 12349, `modelid_H` = 12349 WHERE `entry` = 35176; +-- Model id for slime_pool need change! + UPDATE `creature_template` SET `scriptname`='boss_icehowl', `AIName` ='' WHERE `entry`=34797; + UPDATE `creature_template` SET `lootid`= 0 WHERE `entry` IN (34796,34799,35144); DELETE FROM `creature_loot_template` WHERE `entry` IN (34796,34799,35144); -- Jaraxxus UPDATE `creature_template` SET `scriptname`='boss_jaraxxus', `AIName` ='' WHERE `entry`= 34780; DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (34780, 34784, 34813, 34815, 34825, 34826); -UPDATE `creature_template` SET `scriptname`='mob_legion_flame', `minlevel` = 80, `maxlevel` = 80, `modelid_A` = 11686, `modelid_A2` = 11686, `modelid_H` = 11686, `modelid_H2` = 11686, `AIName` ='', `faction_A`= 14, `faction_H` = 14 WHERE entry = 34784; +UPDATE `creature_template` SET `scriptname`='mob_legion_flame', `minlevel` = 82, `maxlevel` = 82, `modelid_A` = 11686, `modelid_A2` = 11686, `modelid_H` = 11686, `modelid_H2` = 11686, `AIName` ='', `faction_A`= 14, `faction_H` = 14 WHERE `entry` = 34784; UPDATE `creature_template` SET `scriptname`='mob_infernal_volcano', `AIName` ='' WHERE `entry` = 34813; UPDATE `creature_template` SET `scriptname`='mob_fel_infernal', `AIName` ='' WHERE `entry` = 34815; UPDATE `creature_template` SET `scriptname`='mob_nether_portal', `AIName` ='' WHERE `entry` = 34825; diff --git a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql index 546a83d1e..226b587a9 100644 --- a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql +++ b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql @@ -1,6 +1,6 @@ -- Trial of the crusader spelltable DELETE FROM `boss_spell_table` WHERE `entry` IN -(34496,34497,34564,34605,34607,34780,34784,34796,34797,34799, 34800, 34813, 34815, 34826, 35144); +(34496,34497,34564,34605,34607,34780,34784,34796,34797,34799, 34800, 34813, 34815, 34826, 35144, 35176); -- Eydis Darkbane INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES @@ -80,7 +80,7 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES (34797, 66683, 67660, 67661, 67662, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), (34797, 66689, 67650, 67651, 67652, 25000, 25000, 25000, 25000, 40000, 40000, 40000, 40000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), -(34797, 66734, 0, 0, 0, 3000, 0, 0, 0, 3000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL), +(34797, 66734, 0, 0, 0, 4000, 4000, 3000, 3000, 4000, 4000, 3000, 3000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL), (34797, 66770, 67654, 67655, 67656, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), (34797, 66758, 0, 0, 0, 15000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), (34797, 66759, 0, 0, 0, 300000, 0, 0, 0, 300000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), @@ -88,13 +88,14 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ -- Dreadscale INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES -(34799, 53421, 0, 0, 0, 40000, 0, 0, 0, 60000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, NULL), +(34799, 53421, 0, 0, 0, 40000, 0, 0, 0, 60000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), (34799, 66794, 67644, 67645, 67646, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), (34799, 66796, 67632, 67633, 67634, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), (34799, 66821, 66821, 66821, 66821, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), (34799, 66879, 67624, 67625, 67626, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), (34799, 66902, 67627, 67628, 67629, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), (34799, 66883, 67641, 67642, 67643, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), +(34799, 35176, 0, 0, 0, 30000, 30000, 45000, 60000, 30000, 30000, 45000, 60000, 0, 0, 0, 0, 1, 5, 0, 0, 0, 0, 11, 0, 0, 0, NULL), (34799, 68335, 68335, 68335, 68335, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL); -- Snobold vassal @@ -130,6 +131,12 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ (35144, 66824, 67612, 67613, 67614, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), (35144, 66880, 67606, 67607, 67608, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), (35144, 66901, 67615, 67616, 66617, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), -(35144, 66883, 67641, 67642, 67643, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), +(35144, 66883, 67641, 67642, 67643, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), +(35144, 35176, 0, 0, 0, 30000, 30000, 45000, 60000, 30000, 30000, 45000, 60000, 0, 0, 0, 0, 1, 5, 0, 0, 0, 0, 11, 0, 0, 0, NULL), (35144, 68335, 68335, 68335, 68335, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL); +-- Slime pool +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(35176, 66881, 67638, 67639, 67640, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL), +(35176, 66883, 67641, 67642, 67643, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(35176, 66882, 0, 0, 0, 500, 0, 0, 0, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index 360a2d1e8..efedebd3b 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -74,6 +74,8 @@ SPELL_SUBMERGE_0 = 53421, SPELL_ENRAGE = 68335, SPELL_FROTHING_RAGE = 66759, SPELL_STAGGERED_DAZE = 66758, +SPELL_SLIME_POOL_1 = 66881, +SPELL_SLIME_POOL_2 = 66882, }; struct MANGOS_DLL_DECL boss_gormokAI : public ScriptedAI @@ -169,19 +171,20 @@ struct MANGOS_DLL_DECL mob_snobold_vassalAI : public ScriptedAI bsw->doCast(SPELL_SNOBOLLED, defaultTarget); } + void JustReachedHome() + { + if (!m_pInstance) return; + m_creature->ForcedDespawn(); + } + void JustDied(Unit* pKiller) { - if (defaultTarget) bsw->doRemove(SPELL_SNOBOLLED, defaultTarget); + if (defaultTarget && defaultTarget->isAlive()) bsw->doRemove(SPELL_SNOBOLLED, defaultTarget); if (pBoss && pBoss->isAlive()) bsw->doRemove(SPELL_RISING_ANGER,pBoss); } void UpdateAI(const uint32 uiDiff) { - if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) != GORMOK_IN_PROGRESS) { - if (defaultTarget && defaultTarget->isAlive()) - bsw->doRemove(SPELL_SNOBOLLED, defaultTarget); - m_creature->ForcedDespawn(); - } if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -261,7 +264,11 @@ struct MANGOS_DLL_DECL boss_acidmawAI : public ScriptedAI bsw->timedCast(SPELL_PARALYTIC_BITE, uiDiff); - bsw->timedCast(SPELL_SLIME_POOL, uiDiff); + bsw->timedCast(SPELL_ACID_SPIT, uiDiff); + + bsw->timedCast(SPELL_PARALYTIC_SPRAY, uiDiff); + + bsw->timedCast(SPELL_SWEEP_0, uiDiff); if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == ACIDMAW_SUBMERGED) stage = 1; @@ -275,11 +282,8 @@ struct MANGOS_DLL_DECL boss_acidmawAI : public ScriptedAI m_pInstance->SetData(TYPE_NORTHREND_BEASTS, ACIDMAW_SUBMERGED); break;} case 2: { - bsw->timedCast(SPELL_ACID_SPIT, uiDiff); - - bsw->timedCast(SPELL_PARALYTIC_SPRAY, uiDiff); - - bsw->timedCast(SPELL_SWEEP_0, uiDiff); + if (bsw->timedQuery(SPELL_SLIME_POOL, uiDiff)) + bsw->doCast(NPC_SLIME_POOL); if (bsw->timedQuery(SPELL_SUBMERGE_0, uiDiff) && m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == ACIDMAW_SUBMERGED) stage = 3; @@ -369,7 +373,11 @@ struct MANGOS_DLL_DECL boss_dreadscaleAI : public ScriptedAI bsw->timedCast(SPELL_MOLTEN_SPEW, uiDiff); - bsw->timedCast(SPELL_SLIME_POOL, uiDiff); + bsw->timedCast(SPELL_FIRE_SPIT, uiDiff); + + bsw->timedCast(SPELL_BURNING_SPRAY, uiDiff); + + bsw->timedCast(SPELL_SWEEP_0, uiDiff); if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == DREADSCALE_SUBMERGED) stage = 1; @@ -384,11 +392,8 @@ struct MANGOS_DLL_DECL boss_dreadscaleAI : public ScriptedAI break;} case 2: { - bsw->timedCast(SPELL_FIRE_SPIT, uiDiff); - - bsw->timedCast(SPELL_BURNING_SPRAY, uiDiff); - - bsw->timedCast(SPELL_SWEEP_0, uiDiff); + if (bsw->timedQuery(SPELL_SLIME_POOL, uiDiff)) + bsw->doCast(NPC_SLIME_POOL); if (bsw->timedQuery(SPELL_SUBMERGE_0, uiDiff) && m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == DREADSCALE_SUBMERGED) stage = 3; @@ -422,6 +427,46 @@ CreatureAI* GetAI_boss_dreadscale(Creature* pCreature) return new boss_dreadscaleAI(pCreature); } +struct MANGOS_DLL_DECL mob_slime_poolAI : public ScriptedAI +{ + mob_slime_poolAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + Reset(); + } + + ScriptedInstance *m_pInstance; + BossSpellWorker* bsw; + float m_Size; + + void Reset() + { + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetInCombatWithZone(); + m_creature->SetSpeedRate(MOVE_RUN, 0.1); + bsw = new BossSpellWorker(this); + bsw->doCast(SPELL_SLIME_POOL_2); + m_Size = m_creature->GetFloatValue(OBJECT_FIELD_SCALE_X); + } + + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + if (bsw->timedQuery(SPELL_SLIME_POOL_2,uiDiff)) { + m_Size = m_Size*1.025; + m_creature->SetFloatValue(OBJECT_FIELD_SCALE_X, m_Size); + } + } + +}; + +CreatureAI* GetAI_mob_slime_pool(Creature* pCreature) +{ + return new mob_slime_poolAI(pCreature); +} + struct MANGOS_DLL_DECL boss_icehowlAI : public ScriptedAI { boss_icehowlAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -605,4 +650,9 @@ void AddSC_northrend_beasts() newscript->GetAI = &GetAI_mob_snobold_vassal; newscript->RegisterSelf(); + newscript = new Script; + newscript->Name = "mob_slime_pool"; + newscript->GetAI = &GetAI_mob_slime_pool; + newscript->RegisterSelf(); + } From 55e120c369288a0d3c3bf3021af023f363e1e253 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Tue, 6 Apr 2010 18:48:40 +0400 Subject: [PATCH 221/405] TOC part 35 - cosmetics change. --- addition/724_trial_of_crusader_scriptdev2.sql | 8 ++-- ...rial_of_crusader_spelltable_scriptdev2.sql | 3 +- include/sc_boss_spell_worker.cpp | 43 +++++++++++++++++-- include/sc_boss_spell_worker.h | 2 + .../boss_northrend_beasts.cpp | 15 +++++-- .../instance_trial_of_the_crusader.cpp | 1 + .../trial_of_the_crusader.cpp | 25 ++++++----- .../trial_of_the_crusader.h | 2 + 8 files changed, 76 insertions(+), 23 deletions(-) diff --git a/addition/724_trial_of_crusader_scriptdev2.sql b/addition/724_trial_of_crusader_scriptdev2.sql index fd86ca5c3..744bc0080 100644 --- a/addition/724_trial_of_crusader_scriptdev2.sql +++ b/addition/724_trial_of_crusader_scriptdev2.sql @@ -17,16 +17,16 @@ INSERT INTO `script_texts` ('35458','16268','-1713511','Благодарю, Верховный лорд. А теперь, смельчаки, я приступаю к ритуалу призыва. Когда я закончу, появится грозный демон!','6','0','0',''), ('35458','16269','-1713512','Готовьтесь к забвению!','6','0','0',''), ('35458','16270','-1713513','АГА! Получилось! Трепещи перед всевластным Вилфредом Непопамсом, мастером призыва! Ты покорен мне, демон!','6','0','0',''), -('34780','16143','-1713514','Ничтожный гном! Тебя погубит твоя самоуверенность!','3','0','0',''), -('35458','16271','-1713515','Тут я главный!','3','0','0',''), -('35458','16271','-1713715','Ну вот, опять я облажался...','3','0','0',''), +('34780','16143','-1713514','Ничтожный гном! Тебя погубит твоя самоуверенность!','6','0','0',''), +('35458','16271','-1713515','Тут я главный!','6','0','0',''), +('35458','16271','-1713715','Ну вот, опять я облажался...','6','0','0',''), ('34996','16044','-1713516','Быстрей, герои, расправьтесь с повелителем демонов, прежде чем он откроет портал в свое темное царство!','6','0','0',''), ('34780','16144','-1713517','Перед вами Джараксус, эредарский повелитель Пылающего Легиона!','6','0','0',''), ('34780','0','-1713518','На вас направлено |cFFFF0000Пламя Легиона!|r','3','0','0',''), ('34780','0','-1713519','%s создает врата Пустоты!','3','0','0',''), ('34780','0','-1713520','%s создает |cFF00FF00Вулкан инферналов!|r','3','0','0',''), ('34780','16150','-1713521','Явись, сестра! Господин зовет!','3','0','0',''), -('34780','0','-1713522','$n $gподвергся:подверглась; |cFF00FFFFИспепелению плоти!|r Исцелите $gего:ее;!','6','0','0',''), +('34780','0','-1713522','$n подвергся |cFF00FFFFИспепелению плоти!|r Исцелите его!','3','0','0',''), ('34780','16149','-1713523','ПЛОТЬ ОТ КОСТИ!','3','0','0',''), ('34780','16151','-1713524','ИНФЕРНАЛ!','3','0','0',''), ('34780','16147','-1713525','Мое место займут другие. Ваш мир обречен...','6','0','0',''), diff --git a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql index 226b587a9..8f5e7b682 100644 --- a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql +++ b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql @@ -71,7 +71,7 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ -- Gormok INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES -(34796, 34800, 0, 0, 0, 40000, 0, 0, 0, 60000, 0, 0, 0, 0, 0, 0, 0, 40.0, 80.0, 0, 0, 0, 0, 9, 0, 0, 0, NULL), +(34796, 34800, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 20.0, 80.0, 0, 0, 0, 0, 9, 0, 0, 0, NULL), (34796, 66331, 67477, 67478, 67479, 20000, 0, 0, 0, 40000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), (34796, 66636, 0, 0, 0, 15000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 1, 0, NULL), (34796, 67648, 0, 0, 0, 15000, 0, 0, 0, 40000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL); @@ -83,6 +83,7 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ (34797, 66734, 0, 0, 0, 4000, 4000, 3000, 3000, 4000, 4000, 3000, 3000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL), (34797, 66770, 67654, 67655, 67656, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), (34797, 66758, 0, 0, 0, 15000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34797, 68667, 0, 0, 0, 8000, 0, 0, 0, 8000, 0, 0, 0, 0, 0, 0, 0, 200.0, 0, 0, 0, 0, 0, 12, 0, 0, 0, NULL), (34797, 66759, 0, 0, 0, 300000, 0, 0, 0, 300000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), (34797, 67345, 67663, 67664, 67665, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL); diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index 7d20fb9cb..9eb6e64bd 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -15,7 +15,7 @@ BossSpellWorker::BossSpellWorker(ScriptedAI* bossAI) currentTarget = NULL; memset(&m_uiSpell_Timer, 0, sizeof(m_uiSpell_Timer)); memset(&m_BossSpell,0,sizeof(m_BossSpell)); - if (Map* pMap = boss->GetMap()) + if (pMap = boss->GetMap()) currentDifficulty = pMap->GetDifficulty(); else currentDifficulty = RAID_DIFFICULTY_10MAN_NORMAL; debug_log("BSW: Initializing BossSpellWorker object for boss %u difficulty %u",bossID,currentDifficulty); @@ -128,7 +128,7 @@ bool BossSpellWorker::_QuerySpellPeriod(uint8 m_uiSpellIdx, uint32 diff) }; CanCastResult BossSpellWorker::_BSWSpellSelector(uint8 m_uiSpellIdx, Unit* pTarget) - { +{ if (bossSpellCount == 0) return CAST_FAIL_OTHER; SpellEntry const *spell; SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; @@ -212,11 +212,32 @@ CanCastResult BossSpellWorker::_BSWSpellSelector(uint8 m_uiSpellIdx, Unit* pTarg else return CAST_FAIL_OTHER; break; + case CAST_ON_ALLPLAYERS: + { + CanCastResult res1 = CAST_FAIL_OTHER; + Map::PlayerList const& pPlayers = pMap->GetPlayers(); + for (Map::PlayerList::const_iterator itr = pPlayers.begin(); itr != pPlayers.end(); ++itr) + { + pTarget = itr->getSource(); + if (pTarget && pTarget->isAlive() && pTarget->IsWithinDistInMap(boss, pSpell->LocData.x)) + if (!pSpell->m_IsBugged) { + res1 = _DoCastSpellIfCan(pTarget, pSpell->m_uiSpellEntry[currentDifficulty]); + } + else { + _BSWDoCast(m_uiSpellIdx, pTarget); + res1 = CAST_OK; + }; + return res1; + } + break; + } + default: return CAST_FAIL_OTHER; + break; }; return CAST_FAIL_OTHER; - }; +}; bool BossSpellWorker::isSummon(uint8 m_uiSpellIdx) { @@ -273,7 +294,8 @@ BossSpellTableParameters BossSpellWorker::getBSWCastType(uint32 pTemp) case 9: return SUMMON_NORMAL; case 10: return SUMMON_INSTANT; case 11: return SUMMON_TEMP; - case 12: return SPELLTABLEPARM_NUMBER; + case 12: return CAST_ON_ALLPLAYERS; + case 13: return SPELLTABLEPARM_NUMBER; default: return DO_NOTHING; }; }; @@ -349,6 +371,19 @@ bool BossSpellWorker::_doRemove(uint8 m_uiSpellIdx, Unit* pTarget) if (!pTarget) return false; break; + case CAST_ON_ALLPLAYERS: + { + Map::PlayerList const& pPlayers = pMap->GetPlayers(); + for(Map::PlayerList::const_iterator itr = pPlayers.begin(); itr != pPlayers.end(); ++itr) + { + pTarget = itr->getSource(); + if (pTarget && pTarget->isAlive() && pTarget->IsWithinDistInMap(boss, pSpell->LocData.x)) + pTarget->RemoveAurasDueToSpell(pSpell->m_uiSpellEntry[currentDifficulty]); + } + return true; + break; + } + default: return false; } if (pTarget) { diff --git a/include/sc_boss_spell_worker.h b/include/sc_boss_spell_worker.h index 99f41900d..2db32d200 100644 --- a/include/sc_boss_spell_worker.h +++ b/include/sc_boss_spell_worker.h @@ -41,6 +41,7 @@ enum BossSpellTableParameters SUMMON_NORMAL = 9, SUMMON_INSTANT = 10, SUMMON_TEMP = 11, + CAST_ON_ALLPLAYERS = 12, SPELLTABLEPARM_NUMBER }; @@ -191,6 +192,7 @@ class MANGOS_DLL_DECL BossSpellWorker Difficulty currentDifficulty; uint32 m_uiSpell_Timer[MAX_BOSS_SPELLS]; SpellTable m_BossSpell[MAX_BOSS_SPELLS]; + Map* pMap; }; #endif \ No newline at end of file diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index efedebd3b..d2d85375e 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -19,11 +19,16 @@ /* ScriptData SDName: northrend_beasts -SD%Complete: 60% +SD%Complete: 90% SDComment: by /dev/rsa SDCategory: EndScriptData */ +// not implemented: +// snobolds link +// snakes underground cast (not support in core) +// aura 31 (SPELL_ADRENALINE) not applyed by undefined reason + #include "precompiled.h" #include "trial_of_the_crusader.h" @@ -64,6 +69,7 @@ SPELL_MASSIVE_CRASH = 66683, SPELL_WHIRL = 67345, SPELL_ARCTIC_BREATH = 66689, SPELL_TRAMPLE = 66734, +SPELL_ADRENALINE = 68667, SPELL_SNOBOLLED = 66406, SPELL_BATTER = 66408, SPELL_FIRE_BOMB = 66313, @@ -180,7 +186,7 @@ struct MANGOS_DLL_DECL mob_snobold_vassalAI : public ScriptedAI void JustDied(Unit* pKiller) { if (defaultTarget && defaultTarget->isAlive()) bsw->doRemove(SPELL_SNOBOLLED, defaultTarget); - if (pBoss && pBoss->isAlive()) bsw->doRemove(SPELL_RISING_ANGER,pBoss); +// if (pBoss && pBoss->isAlive()) bsw->doRemove(SPELL_RISING_ANGER,pBoss); } void UpdateAI(const uint32 uiDiff) @@ -443,7 +449,7 @@ struct MANGOS_DLL_DECL mob_slime_poolAI : public ScriptedAI { m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->SetInCombatWithZone(); - m_creature->SetSpeedRate(MOVE_RUN, 0.1); + m_creature->SetSpeedRate(MOVE_RUN, 0.08f); bsw = new BossSpellWorker(this); bsw->doCast(SPELL_SLIME_POOL_2); m_Size = m_creature->GetFloatValue(OBJECT_FIELD_SCALE_X); @@ -455,7 +461,7 @@ struct MANGOS_DLL_DECL mob_slime_poolAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; if (bsw->timedQuery(SPELL_SLIME_POOL_2,uiDiff)) { - m_Size = m_Size*1.025; + m_Size = m_Size*1.035; m_creature->SetFloatValue(OBJECT_FIELD_SCALE_X, m_Size); } } @@ -572,6 +578,7 @@ struct MANGOS_DLL_DECL boss_icehowlAI : public ScriptedAI MovementStarted = true; m_creature->GetMotionMaster()->MovePoint(1, fPosX, fPosY, fPosZ); DoScriptText(-1713508,m_creature); + bsw->doCast(SPELL_ADRENALINE); stage = 4; } break; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index 4f7bd1111..8138c69ca 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -471,6 +471,7 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance case 1110: case 1120: case 1130: + case 1135: case 1140: case 1150: case 1160: diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index 63c13e474..37a13dd19 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -502,21 +502,23 @@ struct MANGOS_DLL_DECL npc_fizzlebang_tocAI : public ScriptedAI { pInstance = (ScriptedInstance*)m_creature->GetInstanceData(); Reset(); - m_creature->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); } InstanceData* pInstance; uint32 UpdateTimer; + Creature* pPortal; void JustDied(Unit* pKiller) { DoScriptText(-1713715, m_creature, pKiller); pInstance->SetData(TYPE_EVENT, 1180); + pPortal->ForcedDespawn(); } void Reset() { m_creature->SetRespawnDelay(DAY); + m_creature->GetMotionMaster()->MovePoint(1, SpawnLoc[27].x, SpawnLoc[27].y, SpawnLoc[27].z); } void UpdateAI(const uint32 diff) @@ -532,8 +534,7 @@ struct MANGOS_DLL_DECL npc_fizzlebang_tocAI : public ScriptedAI { case 1110: pInstance->SetData(TYPE_EVENT, 1120); - m_creature->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - UpdateTimer = 7000; + UpdateTimer = 4000; break; case 1120: DoScriptText(-1713511, m_creature); @@ -541,18 +542,24 @@ struct MANGOS_DLL_DECL npc_fizzlebang_tocAI : public ScriptedAI UpdateTimer = 12000; break; case 1130: + m_creature->GetMotionMaster()->MovementExpired(); + pPortal = m_creature->SummonCreature(NPC_PORTAL, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); DoScriptText(-1713512, m_creature); + pInstance->SetData(TYPE_EVENT, 1135); + UpdateTimer = 4000; + break; + case 1135: + m_creature->GetMotionMaster()->MovementExpired(); + pPortal->SetDisplayId(15900); pInstance->SetData(TYPE_EVENT, 1140); - UpdateTimer = 8000; + UpdateTimer = 4000; break; case 1140: - m_creature->GetMotionMaster()->MovementExpired(); + m_creature->CastSpell(pPortal,69016,false); pInstance->SetData(TYPE_STAGE,4); pInstance->SetData(TYPE_JARAXXUS,IN_PROGRESS); - m_creature->SummonCreature(NPC_JARAXXUS, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + m_creature->SummonCreature(NPC_JARAXXUS, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_JARAXXUS))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); m_creature->SetInCombatWith(pTemp); pTemp->AddThreat(m_creature, 1000.0f); @@ -569,11 +576,9 @@ struct MANGOS_DLL_DECL npc_fizzlebang_tocAI : public ScriptedAI case 1160: DoScriptText(-1713515, m_creature); pInstance->SetData(TYPE_EVENT, 1170); - DoCast(m_creature, 58291); UpdateTimer = 1000; break; case 1170: - DoCastSpellIfCan(m_creature, 58291); pInstance->SetData(TYPE_EVENT, 1175); UpdateTimer = 1000; break; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index 7c8ff3605..604b462a9 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -29,6 +29,7 @@ enum NPC_THRALL = 34994, NPC_PROUDMOORE = 34992, + NPC_PORTAL = 19224, NPC_ICEHOWL = 34797, NPC_GORMOK = 34796, @@ -128,6 +129,7 @@ static Locations SpawnLoc[]= {541.021118, 117.262932, 395.314819}, // 24 - Light essence 1 {586.200562, 162.145523, 394.626129}, // 25 - Light essence 2 {563.833008, 195.244995, 394.585561}, // 26 - outdoor + {548.610596, 139.807800, 394.321838}, // 27 - fizzlebang end }; enum uiWorldStates From 8819b1df8b7503209c1fc2bb39020b5f10f5cccb Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 7 Apr 2010 19:21:15 +0400 Subject: [PATCH 222/405] TOC part 25 - valkiries && anubarax correction, visual effects. --- addition/724_trial_of_crusader_scriptdev2.sql | 18 +- ...rial_of_crusader_spelltable_scriptdev2.sql | 22 ++- .../boss_anubarak_trial.cpp | 29 ++-- .../boss_twin_valkyr.cpp | 162 +++++++++++++++--- .../instance_trial_of_the_crusader.cpp | 16 +- .../trial_of_the_crusader.cpp | 5 + .../trial_of_the_crusader.h | 5 +- 7 files changed, 187 insertions(+), 70 deletions(-) diff --git a/addition/724_trial_of_crusader_scriptdev2.sql b/addition/724_trial_of_crusader_scriptdev2.sql index 744bc0080..97feed6c5 100644 --- a/addition/724_trial_of_crusader_scriptdev2.sql +++ b/addition/724_trial_of_crusader_scriptdev2.sql @@ -61,18 +61,18 @@ INSERT INTO `script_texts` ('34996','16051','-1713549','Король-лич понес тяжелую потерю! Вы проявили себя как бесстрашные герои Серебряного Авангарда! Мы вместе нанесем удар по Цитадели Ледяной Короны и разнесем в клочья остатки Плети! Нет такого испытания, которое мы бы не могли пройти сообща!','6','0','0',''), ('16980','16321','-1713550','Будет тебе такое испытание, Фордринг.','6','0','0',''), ('34996','16052','-1713551','Артас! Нас гораздо больше! Сложи Ледяную Скорбь, и я подарю тебе заслуженную смерть.','6','0','0',''), -('35877','16322','-1713552','Нерубианцы воздвигли целую империю под льдами Нордскола. Империю, на которой вы так бездумно построили свои дома. МОЮ ИМПЕРИЮ.','3','0','0',''), -('16980','16323','-1713553','Души твоих павших чемпионов будут принадлежать мне, Фордринг.','3','0','0',''), -('34564','16235','-1713554','А вот и гости заявились, как и обещал господин.','3','0','0',''), -('34564','16234','-1713555','Это место станет вашей могилой!','3','0','0',''), -('34564','16240','-1713556','Ауум на-л ак-к-к-к, ишшш. Вставайте, слуги мои. Время пожирать...','3','0','0',''), +('35877','16322','-1713552','Нерубианцы воздвигли целую империю под льдами Нордскола. Империю, на которой вы так бездумно построили свои дома. МОЮ ИМПЕРИЮ.','6','0','0',''), +('16980','16323','-1713553','Души твоих павших чемпионов будут принадлежать мне, Фордринг.','6','0','0',''), +('34564','16235','-1713554','А вот и гости заявились, как и обещал господин.','6','0','0',''), +('34564','16234','-1713555','Это место станет вашей могилой!','6','0','0',''), +('34564','16240','-1713556','Ауум на-л ак-к-к-к, ишшш. Вставайте, слуги мои. Время пожирать...','6','0','0',''), ('34564','0','-1713557','%s зарывается в землю!','3','0','0',''), ('34660','0','-1713558','Шипы |3-1(%s) преследуют |3-3($n)!','3','0','0',''), ('34564','0','-1713559','%s вылезает на поверхность!','3','0','0',''), -('34564','16241','-1713560','Стая поглотит вас!','3','0','0',''), +('34564','16241','-1713560','Стая поглотит вас!','6','0','0',''), ('34564','0','-1713561','%s выпускает рой жуков-трупоедов, чтобы восстановить здоровье!','3','0','0',''), -('34564','16236','-1713562','Ф-лаккх шир!','3','0','0',''), -('34564','16237','-1713563','Еще одна душа накормит хозяина.','3','0','0',''), -('34564','16238','-1713564','Я подвел тебя, господин...','3','0','0',''), +('34564','16236','-1713562','Ф-лаккх шир!','6','0','0',''), +('34564','16237','-1713563','Еще одна душа накормит хозяина.','6','0','0',''), +('34564','16238','-1713564','Я подвел тебя, господин...','6','0','0',''), ('36095','0','-1713565','Чемпионы, вы прошли испытание великого крестоносца! Знайте, что только самые сильные искатели приключений могли рассчитывать завершить это испытание.','6','0','0',''), ('36095','0','-1713566','Позвольте вручить вам эти сундуки в качестве заслуженной награды, и пусть его содержимое послужит вам верой и правдой в походе против Артаса в самом центре Цитадели Ледяной Короны!','6','0','0',''); diff --git a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql index 8f5e7b682..d217162f1 100644 --- a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql +++ b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql @@ -6,9 +6,10 @@ DELETE FROM `boss_spell_table` WHERE `entry` IN INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES (34496, 64238, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), (34496, 65768, 67262, 67263, 67264, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), -(34496, 65874, 67256, 67257, 67258, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), -(34496, 65879, 67244, 67245, 67246, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), -(34496, 65916, 67248, 67249, 67250, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34496, 65874, 67256, 67257, 67258, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), +(34496, 65876, 67306, 67307, 67308, 120000, 0, 0, 0, 120000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34496, 65879, 67244, 67245, 67246, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), +(34496, 65916, 67248, 67249, 67250, 15000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), (34496, 66058, 67182, 67183, 67184, 30000, 0, 0, 0, 90000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), (34496, 66069, 67309, 67310, 67311, 10000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), (34496, 67282, 0, 0, 0, 10000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL); @@ -17,9 +18,9 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES (34497, 64238, 64238, 64238, 64238, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), (34497, 65766, 67270, 67271, 67272, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), -(34497, 65858, 67259, 67260, 67261, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), -(34497, 65876, 67306, 67307, 67308, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), -(34497, 65916, 67248, 67249, 67250, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34497, 65858, 67259, 67260, 67261, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), +(34497, 65875, 67303, 67304, 67305, 120000, 0, 0, 0, 120000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34497, 65916, 67248, 67249, 67250, 15000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), (34497, 66046, 67206, 67207, 67208, 30000, 30000, 30000, 30000, 90000, 90000, 90000, 90000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), (34497, 66075, 67312, 67313, 67314, 10000, 10000, 10000, 10000, 20000, 20000, 20000, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), (34497, 67297, 67297, 67298, 67298, 10000, 10000, 10000, 10000, 15000, 15000, 15000, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL); @@ -28,16 +29,19 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES (34564, 26662, 26662, 26662, 26662, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), (34564, 34605, 0, 0, 0, 90000, 0, 0, 0, 90000, 0, 0, 0, 0, 0, 0, 0, 20.0, 100.0, 0, 0, 0, 0, 9, 1, 0, 0, NULL), +(34564, 34660, 0, 0, 0, 20000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 0, 5.0, 10.0, 0, 0, 0, 0, 9, 1, 0, 0, NULL), (34564, 34606, 0, 0, 0, 5000, 0, 0, 0, 10000, 0, 0, 0, 0, 0, 0, 0, 10.0, 100.0, 0, 0, 0, 0, 9, 1, 0, 0, NULL), (34564, 34607, 0, 0, 0, 70000, 0, 0, 0, 90000, 0, 0, 0, 0, 0, 0, 0, 20.0, 100.0, 0, 0, 0, 0, 9, 1, 0, 0, NULL), (34564, 53421, 53421, 53421, 53421, 45000, 45000, 45000, 45000, 60000, 60000, 60000, 60000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, NULL), +(34564, 66169, 0, 0, 0, 10000, 10000, 10000, 10000, 15000, 15000, 15000, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 1, 0, NULL), (34564, 65922, 65922, 65922, 65922, 10000, 10000, 10000, 10000, 15000, 15000, 15000, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 1, 0, NULL), (34564, 66012, 66012, 66012, 66012, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), (34564, 66013, 67700, 68509, 68510, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), (34564, 66339, 66339, 66339, 66339, 5000, 5000, 5000, 5000, 10000, 10000, 10000, 10000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0, 0, NULL), -(34564, 67574, 67574, 67574, 67574, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 1, 0, NULL), -(34564, 66118, 67630, 68646, 68647, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 1, 0, NULL), -(34564, 66125, 0, 0, 0, 10000, 0, 0, 0, 10000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), +(34564, 67574, 0, 0, 0, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 1, 0, NULL), +(34564, 66118, 67630, 68646, 68647, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), +(34564, 66240, 0, 0, 0, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), +(34564, 66125, 0, 0, 0, 10000, 0, 0, 0, 10000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), (34564, 67730, 0, 0, 0, 20000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL); -- Anub'arak scarab diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp index 9cadffb8c..058044574 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp @@ -16,14 +16,14 @@ /* ScriptData SDName: boss_anubarak_trial -SD%Complete: 40% +SD%Complete: 70% SDComment: by /dev/rsa SDCategory: EndScriptData */ -// Anubarak - underground phase not worked, timers need correct +// Anubarak - underground phase partially not worked, timers need correct // Burrower - underground phase not implemented -// Leecheng Swarm spell need override +// Leecheng Swarm spell not worked - awaiting core support // Frost Sphere - realised by EventAI #include "precompiled.h" @@ -34,6 +34,7 @@ enum Summons NPC_FROST_SPHERE = 34606, NPC_BURROWER = 34607, NPC_SCARAB = 34605, + NPC_SPIKE = 34660, }; enum BossSpells @@ -42,7 +43,9 @@ SPELL_COLD = 66013, SPELL_MARK = 67574, SPELL_LEECHING_SWARM = 66118, SPELL_LEECHING_HEAL = 66125, +SPELL_LEECHING_DAMAGE = 66240, SPELL_IMPALE = 65922, +SPELL_SPIKE_CALL = 66169, SPELL_POUND = 66012, SPELL_SHOUT = 67730, SPELL_SUBMERGE_0 = 53421, @@ -71,6 +74,7 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI uint32 SubmergeTimer; bool intro; BossSpellWorker* bsw; + Unit* pTarget; void Reset() { if(!m_pInstance) return; @@ -142,9 +146,12 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI break;} case 2: { if (bsw->timedQuery(SPELL_IMPALE, uiDiff)) { - bsw->doCast(SPELL_IMPALE); - bsw->doCast(SPELL_MARK); - DoScriptText(-1713558,m_creature); + pTarget = bsw->SelectUnit(); +// bsw->doCast(SPELL_IMPALE); + bsw->doCast(SPELL_SPIKE_CALL); + bsw->doCast(NPC_SPIKE); + bsw->doCast(SPELL_MARK,pTarget); + DoScriptText(-1713558,pTarget); }; if (bsw->timedQuery(SPELL_SUMMON_BEATLES, uiDiff)) { bsw->doCast(SPELL_SUMMON_BEATLES); @@ -160,13 +167,13 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI bsw->doRemove(SPELL_SUBMERGE_0,m_creature); break;} case 4: { - bsw->timedCast(SPELL_POUND, uiDiff); - bsw->timedCast(SPELL_COLD, uiDiff); - if (bsw->timedQuery(SPELL_LEECHING_SWARM, uiDiff)) { bsw->doCast(SPELL_LEECHING_SWARM); - bsw->doCast(SPELL_LEECHING_HEAL); DoScriptText(-1713561,m_creature); - } + stage = 5; + break;} + case 5: { + bsw->timedCast(SPELL_POUND, uiDiff); + bsw->timedCast(SPELL_COLD, uiDiff); break;} } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp index d17245ca1..377dd9647 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp @@ -21,8 +21,7 @@ SDComment: by /dev/rsa SDCategory: Crusader Coliseum EndScriptData */ -// Twin pact && shields not implemented -// Shared health not fully correct worked +// Twin pact && shields not worked now // timers need correct #include "precompiled.h" @@ -50,19 +49,20 @@ enum BossSpells SPELL_TWIN_SPIKE_L = 66075, SPELL_LIGHT_SURGE = 65766, SPELL_SHIELD_LIGHT = 65858, - SPELL_TWIN_PACT_L = 65876, + SPELL_TWIN_PACT_L = 65875, SPELL_LIGHT_VORTEX = 66046, SPELL_LIGHT_TOUCH = 67297, SPELL_TWIN_SPIKE_H = 66069, SPELL_DARK_SURGE = 65768, SPELL_SHIELD_DARK = 65874, - SPELL_TWIN_PACT_H = 65879, + SPELL_TWIN_PACT_H = 65876, SPELL_DARK_VORTEX = 66058, SPELL_DARK_TOUCH = 67282, SPELL_TWIN_POWER = 65916, SPELL_LIGHT_ESSENCE = 65686, SPELL_DARK_ESSENCE = 65684, SPELL_BERSERK = 64238, + SPELL_NONE = 0, }; /*###### @@ -84,10 +84,9 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI void Reset() { if(!m_pInstance) return; SetEquipmentSlots(false, EQUIP_MAIN_1, EQUIP_OFFHAND_1, EQUIP_RANGED_1); - if (m_creature->isAlive()) m_creature->SummonCreature(NPC_LIGHT_ESSENCE, SpawnLoc[24].x, SpawnLoc[24].y, SpawnLoc[24].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); - if (m_creature->isAlive()) m_creature->SummonCreature(NPC_LIGHT_ESSENCE, SpawnLoc[25].x, SpawnLoc[25].y, SpawnLoc[25].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); bsw = new BossSpellWorker(this); m_creature->SetRespawnDelay(DAY); + stage = 1; } void JustReachedHome() @@ -105,6 +104,7 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI if (!pSister->isAlive()) m_pInstance->SetData(TYPE_VALKIRIES, DONE); else m_pInstance->SetData(TYPE_VALKIRIES, SPECIAL); + m_pInstance->SetData(DATA_HEALTH_FJOLA, 0); } void KilledUnit(Unit* pVictim) @@ -117,31 +117,85 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI if (!m_pInstance) return; m_creature->SetInCombatWithZone(); m_pInstance->SetData(TYPE_VALKIRIES, IN_PROGRESS); + if (m_creature->isAlive()) m_creature->SummonCreature(NPC_LIGHT_ESSENCE, SpawnLoc[24].x, SpawnLoc[24].y, SpawnLoc[24].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); + if (m_creature->isAlive()) m_creature->SummonCreature(NPC_LIGHT_ESSENCE, SpawnLoc[25].x, SpawnLoc[25].y, SpawnLoc[25].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); DoScriptText(-1713541,m_creature); + m_pInstance->SetData(DATA_HEALTH_FJOLA, m_creature->GetHealth()); } void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) { if (!m_creature || !m_creature->isAlive()) return; - m_pInstance->SetData(DATA_DAMAGE_FJOLA, uiDamage); - uiDamage += m_pInstance->GetData(DATA_DAMAGE_EYDIS); + + if(pDoneBy->GetGUID() == m_creature->GetGUID()) return; + + if(pDoneBy->GetTypeId() == TYPEID_PLAYER) + { + if(pDoneBy->HasAura(SPELL_LIGHT_ESSENCE)) + uiDamage /= 2; + else if(pDoneBy->HasAura(SPELL_DARK_ESSENCE)) + uiDamage += uiDamage/2; + } + + uiDamage /= 2; + + m_pInstance->SetData(DATA_HEALTH_FJOLA, m_creature->GetHealth() >= uiDamage ? m_creature->GetHealth() - uiDamage : 0); } void UpdateAI(const uint32 uiDiff) { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - bsw->timedCast(SPELL_LIGHT_SURGE, uiDiff); - bsw->timedCast(SPELL_LIGHT_TOUCH, uiDiff); - if (bsw->timedQuery(SPELL_LIGHT_VORTEX, uiDiff)) { - if (m_pInstance->GetData(DATA_CASTING_EYDIS) != SPELL_DARK_VORTEX) { + if (m_creature->GetHealth() > m_pInstance->GetData(DATA_HEALTH_EYDIS) && + m_pInstance->GetData(DATA_HEALTH_EYDIS) != 0) + m_creature->SetHealth(m_pInstance->GetData(DATA_HEALTH_EYDIS)); + + switch (stage) + { + case 0: + break; + case 1: + if (bsw->timedQuery(SPELL_LIGHT_VORTEX, uiDiff)) { + m_pInstance->SetData(DATA_CASTING_FJOLA, SPELL_LIGHT_VORTEX); DoScriptText(-1713538,m_creature); bsw->doCast(SPELL_LIGHT_VORTEX); - m_pInstance->SetData(DATA_CASTING_FJOLA, SPELL_LIGHT_VORTEX); - } else m_pInstance->SetData(DATA_CASTING_EYDIS, 0); - } + stage = 0; + }; + break; + case 2: + if (bsw->timedQuery(SPELL_TWIN_PACT_L, uiDiff) + && m_creature->GetHealthPercent() <= 30.0f + && bsw->doCast(SPELL_SHIELD_LIGHT) == CAST_OK ) + { + m_pInstance->SetData(DATA_CASTING_FJOLA, SPELL_TWIN_PACT_L); + DoScriptText(-1713539,m_creature); + bsw->doCast(SPELL_TWIN_PACT_L); + stage = 0; + } + break; + default: + break; + } + + if (m_pInstance->GetData(DATA_CASTING_EYDIS) == SPELL_DARK_VORTEX && stage==0 ) + { + m_pInstance->SetData(DATA_CASTING_EYDIS, SPELL_NONE); + stage = 1; + } + + if (m_pInstance->GetData(DATA_CASTING_EYDIS) == SPELL_TWIN_PACT_H && stage== 0) + { + bsw->doCast(SPELL_TWIN_POWER); + m_pInstance->SetData(DATA_CASTING_EYDIS, SPELL_NONE); + stage = 2; + } + + bsw->timedCast(SPELL_LIGHT_SURGE, uiDiff); + + bsw->timedCast(SPELL_LIGHT_TOUCH, uiDiff); DoMeleeAttackIfReady(); } @@ -172,10 +226,9 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI { if(!m_pInstance) return; SetEquipmentSlots(false, EQUIP_MAIN_2, EQUIP_OFFHAND_2, EQUIP_RANGED_2); - if (m_creature->isAlive()) m_creature->SummonCreature(NPC_DARK_ESSENCE, SpawnLoc[22].x, SpawnLoc[22].y, SpawnLoc[22].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); - if (m_creature->isAlive()) m_creature->SummonCreature(NPC_DARK_ESSENCE, SpawnLoc[23].x, SpawnLoc[23].y, SpawnLoc[23].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); bsw = new BossSpellWorker(this); m_creature->SetRespawnDelay(DAY); + stage = 0; } void JustReachedHome() @@ -193,6 +246,7 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI if (!pSister->isAlive()) m_pInstance->SetData(TYPE_VALKIRIES, DONE); else m_pInstance->SetData(TYPE_VALKIRIES, SPECIAL); + m_pInstance->SetData(DATA_HEALTH_EYDIS, 0); } void KilledUnit(Unit* pVictim) @@ -206,14 +260,29 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI m_creature->SetInCombatWithZone(); m_pInstance->SetData(TYPE_VALKIRIES, IN_PROGRESS); DoScriptText(-1713741,m_creature); + if (m_creature->isAlive()) m_creature->SummonCreature(NPC_DARK_ESSENCE, SpawnLoc[22].x, SpawnLoc[22].y, SpawnLoc[22].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); + if (m_creature->isAlive()) m_creature->SummonCreature(NPC_DARK_ESSENCE, SpawnLoc[23].x, SpawnLoc[23].y, SpawnLoc[23].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); + m_pInstance->SetData(DATA_HEALTH_EYDIS, m_creature->GetHealth()); } void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) { if (!m_creature || !m_creature->isAlive()) return; - m_pInstance->SetData(DATA_DAMAGE_EYDIS, uiDamage); - uiDamage += m_pInstance->GetData(DATA_DAMAGE_FJOLA); + + if(pDoneBy->GetGUID() == m_creature->GetGUID()) return; + + if(pDoneBy->GetTypeId() == TYPEID_PLAYER) + { + if(pDoneBy->HasAura(SPELL_DARK_ESSENCE)) + uiDamage /= 2; + else if(pDoneBy->HasAura(SPELL_LIGHT_ESSENCE)) + uiDamage += uiDamage/2; + } + + uiDamage /= 2; + + m_pInstance->SetData(DATA_HEALTH_EYDIS, m_creature->GetHealth() >= uiDamage ? m_creature->GetHealth() - uiDamage : 0); } void UpdateAI(const uint32 uiDiff) @@ -221,15 +290,54 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - bsw->timedCast(SPELL_DARK_SURGE, uiDiff); - bsw->timedCast(SPELL_DARK_TOUCH, uiDiff); - if (bsw->timedQuery(SPELL_DARK_VORTEX, uiDiff)) { - if (m_pInstance->GetData(DATA_CASTING_FJOLA) != SPELL_LIGHT_VORTEX) { + if (m_creature->GetHealth() > m_pInstance->GetData(DATA_HEALTH_FJOLA) && + m_pInstance->GetData(DATA_HEALTH_FJOLA) != 0) + m_creature->SetHealth(m_pInstance->GetData(DATA_HEALTH_FJOLA)); + + switch (stage) + { + case 0: + break; + case 1: + if (bsw->timedQuery(SPELL_DARK_VORTEX, uiDiff)) { + m_pInstance->SetData(DATA_CASTING_EYDIS, SPELL_DARK_VORTEX); DoScriptText(-1713540,m_creature); bsw->doCast(SPELL_DARK_VORTEX); - m_pInstance->SetData(DATA_CASTING_EYDIS, SPELL_DARK_VORTEX); - } else m_pInstance->SetData(DATA_CASTING_FJOLA, 0); + if (m_creature->GetHealthPercent() <= 30.0f) stage == 2; + else stage = 0; }; + break; + case 2: + if (bsw->timedQuery(SPELL_TWIN_PACT_H, uiDiff) + && m_creature->GetHealthPercent() <= 30.0f + && bsw->doCast(SPELL_SHIELD_DARK) == CAST_OK ) + { + m_pInstance->SetData(DATA_CASTING_EYDIS, SPELL_TWIN_PACT_H); + DoScriptText(-1713539,m_creature); + bsw->doCast(SPELL_TWIN_PACT_H); + stage = 0; + } + break; + default: + break; + } + + if (m_pInstance->GetData(DATA_CASTING_FJOLA) == SPELL_LIGHT_VORTEX && stage==0 ) + { + m_pInstance->SetData(DATA_CASTING_FJOLA, SPELL_NONE); + stage = 1; + } + + if (m_pInstance->GetData(DATA_CASTING_FJOLA) == SPELL_TWIN_PACT_L && stage== 0) + { + bsw->doCast(SPELL_TWIN_POWER); + m_pInstance->SetData(DATA_CASTING_FJOLA, SPELL_NONE); + stage = 2; + } + + bsw->timedCast(SPELL_DARK_SURGE, uiDiff); + + bsw->timedCast(SPELL_DARK_TOUCH, uiDiff); DoMeleeAttackIfReady(); } @@ -258,7 +366,7 @@ struct MANGOS_DLL_DECL mob_light_essenceAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { if (!m_pInstance) m_creature->ForcedDespawn(); - if (m_pInstance->GetData(TYPE_VALKIRIES) == DONE || m_pInstance->GetData(TYPE_VALKIRIES) == NOT_STARTED) { + if (m_pInstance->GetData(TYPE_VALKIRIES) != IN_PROGRESS) { Map* pMap = m_creature->GetMap(); Map::PlayerList const &lPlayers = pMap->GetPlayers(); for(Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr) @@ -309,7 +417,7 @@ struct MANGOS_DLL_DECL mob_dark_essenceAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { if (!m_pInstance) m_creature->ForcedDespawn(); - if (m_pInstance->GetData(TYPE_VALKIRIES) == DONE || m_pInstance->GetData(TYPE_VALKIRIES) == NOT_STARTED) { + if (m_pInstance->GetData(TYPE_VALKIRIES) != IN_PROGRESS) { Map* pMap = m_creature->GetMap(); Map::PlayerList const &lPlayers = pMap->GetPlayers(); for(Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index 8138c69ca..cdb751081 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -40,9 +40,7 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance bool needsave; uint32 m_uiDataDamageFjola; - uint32 m_uiDataDamageFjola_t; uint32 m_uiDataDamageEydis; - uint32 m_uiDataDamageEydis_t; uint32 m_uiFjolaCasting; uint32 m_uiEydisCasting; @@ -122,9 +120,7 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance m_uiTributeChest3GUID = 0; m_uiTributeChest4GUID = 0; m_uiDataDamageFjola = 0; - m_uiDataDamageFjola_t = 0; m_uiDataDamageEydis = 0; - m_uiDataDamageEydis_t = 0; m_uiLich0GUID = 0; m_uiLich1GUID = 0; @@ -298,8 +294,8 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance case TYPE_EVENT: m_auiEncounter[8] = uiData; uiData = NOT_STARTED; break; case TYPE_EVENT_TIMER: m_auiEventTimer = uiData; uiData = NOT_STARTED; break; case TYPE_NORTHREND_BEASTS: m_auiNorthrendBeasts = uiData; break; - case DATA_DAMAGE_FJOLA: m_uiDataDamageFjola += uiData; uiData = NOT_STARTED; break; - case DATA_DAMAGE_EYDIS: m_uiDataDamageEydis += uiData; uiData = NOT_STARTED; break; + case DATA_HEALTH_FJOLA: m_uiDataDamageFjola = uiData; uiData = NOT_STARTED; break; + case DATA_HEALTH_EYDIS: m_uiDataDamageEydis = uiData; uiData = NOT_STARTED; break; case DATA_CASTING_FJOLA: m_uiFjolaCasting = uiData; uiData = NOT_STARTED; break; case DATA_CASTING_EYDIS: m_uiEydisCasting = uiData; uiData = NOT_STARTED; break; } @@ -486,12 +482,8 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance }; return m_auiEventNPCId; - case DATA_DAMAGE_FJOLA: m_uiDataDamageFjola_t = m_uiDataDamageFjola; - m_uiDataDamageFjola = 0; - return m_uiDataDamageFjola_t; - case DATA_DAMAGE_EYDIS: m_uiDataDamageEydis_t = m_uiDataDamageEydis; - m_uiDataDamageEydis = 0; - return m_uiDataDamageEydis_t; + case DATA_HEALTH_FJOLA: return m_uiDataDamageFjola; + case DATA_HEALTH_EYDIS: return m_uiDataDamageEydis; case DATA_CASTING_FJOLA: return m_uiFjolaCasting; case DATA_CASTING_EYDIS: return m_uiEydisCasting; } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index 37a13dd19..d183ca4a9 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -340,6 +340,7 @@ struct MANGOS_DLL_DECL boss_lich_king_tocAI : public ScriptedAI std::list::iterator WayPoint; uint32 WalkTimer; bool IsWalking; + Creature* pPortal; void Reset() { @@ -348,6 +349,8 @@ struct MANGOS_DLL_DECL boss_lich_king_tocAI : public ScriptedAI Event = false; MovementStarted = false; m_creature->SetRespawnDelay(DAY); + pPortal = m_creature->SummonCreature(NPC_TRIGGER, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + pPortal->CastSpell(pPortal, 51807, false); } void AttackStart(Unit *who) @@ -466,6 +469,7 @@ struct MANGOS_DLL_DECL boss_lich_king_tocAI : public ScriptedAI pInstance->SetData(TYPE_STAGE,9); Event=false; m_creature->ForcedDespawn(); + pPortal->ForcedDespawn(); pInstance->SetData(TYPE_EVENT,5090); UpdateTimer = 20000; break; @@ -544,6 +548,7 @@ struct MANGOS_DLL_DECL npc_fizzlebang_tocAI : public ScriptedAI case 1130: m_creature->GetMotionMaster()->MovementExpired(); pPortal = m_creature->SummonCreature(NPC_PORTAL, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + pPortal->SetRespawnDelay(DAY); DoScriptText(-1713512, m_creature); pInstance->SetData(TYPE_EVENT, 1135); UpdateTimer = 4000; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index 604b462a9..f3e859ecd 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -30,6 +30,7 @@ enum NPC_THRALL = 34994, NPC_PROUDMOORE = 34992, NPC_PORTAL = 19224, + NPC_TRIGGER = 22517, NPC_ICEHOWL = 34797, NPC_GORMOK = 34796, @@ -91,8 +92,8 @@ enum TYPE_EVENT_NPC = 103, TYPE_NORTHREND_BEASTS = 104, - DATA_DAMAGE_EYDIS = 201, - DATA_DAMAGE_FJOLA = 202, + DATA_HEALTH_EYDIS = 201, + DATA_HEALTH_FJOLA = 202, DATA_CASTING_EYDIS = 203, DATA_CASTING_FJOLA = 204, From 6135a508c9b76f7e4338f12726f1bf0e70c55a85 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 8 Apr 2010 13:17:20 +0400 Subject: [PATCH 223/405] TOC part 37 - Valiries && Anubarak English translation - thanks to Cristy --- addition/724_trial_of_crusader_mangos.sql | 12 +- addition/724_trial_of_crusader_scriptdev2.sql | 152 +++++++++--------- ...rial_of_crusader_spelltable_scriptdev2.sql | 26 +-- .../spell_comment_from_wowd_scriptdev2.sql | 2 +- .../boss_anubarak_trial.cpp | 107 +++++++++++- .../boss_twin_valkyr.cpp | 33 +++- .../trial_of_the_crusader.cpp | 5 +- .../trial_of_the_crusader.h | 2 +- 8 files changed, 226 insertions(+), 113 deletions(-) mode change 100644 => 100755 addition/724_trial_of_crusader_scriptdev2.sql diff --git a/addition/724_trial_of_crusader_mangos.sql b/addition/724_trial_of_crusader_mangos.sql index 8b23ded45..3ede8387f 100644 --- a/addition/724_trial_of_crusader_mangos.sql +++ b/addition/724_trial_of_crusader_mangos.sql @@ -5,6 +5,7 @@ DELETE FROM `creature` WHERE `map` = 649 AND `id` IN -- announcers UPDATE `creature_template` SET `npcflag`=1, `scriptname`='npc_toc_announcer' WHERE `entry`=34816; +DELETE FROM `creature` WHERE `map` = 649 AND `id` = 35766; UPDATE `creature_template` SET `scriptname`='boss_lich_king_toc' WHERE `entry`=35877; UPDATE `creature_template` SET `minhealth`= 20000, `maxhealth` = 20000, `faction_A`= 1770, `faction_H` = 1770, `scriptname`='npc_fizzlebang_toc' WHERE `entry`=35458; UPDATE `creature_template` SET `scriptname`='npc_tirion_toc' WHERE `entry`=34996; @@ -82,13 +83,8 @@ UPDATE `creature_template` SET `npcflag`=1, `scriptname`='mob_dark_essence', `AI -- Anub'arak UPDATE `creature_template` SET `scriptname`='boss_anubarak_trial', `AIName` ='' WHERE `entry`=34564; -UPDATE `creature_template` SET `modelid_A` = 25144, `modelid_A2` = 0, `modelid_H` = 25144, `modelid_H2` = 0, `faction_A` = 16, `faction_H` = 16, `AIName` = 'EventAI', `ScriptName` = '' WHERE `entry` = 34606; -DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (34606, 34605, 34607, 34564); -INSERT INTO `creature_ai_scripts` (`id`, `creature_id`, `event_type`, `event_inverse_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action1_type`, `action1_param1`, `action1_param2`, `action1_param3`, `action2_type`, `action2_param1`, `action2_param2`, `action2_param3`, `action3_type`, `action3_param1`, `action3_param2`, `action3_param3`, `comment`) VALUES -(3460651, 34606, 0, 0, 60, 3, 1000, 15000, 60000, 60000, 11, 66193, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 'Frost Sphere - Permafrost'), -(3460654, 34606, 0, 0, 60, 5, 1000, 15000, 60000, 60000, 11, 67855, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 'Frost Sphere - Permafrost'), -(3460652, 34606, 0, 0, 60, 9, 1000, 15000, 60000, 60000, 11, 67856, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 'Frost Sphere - Permafrost'), -(3460653, 34606, 0, 0, 60, 16, 1000, 15000, 60000, 60000, 11, 67857, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 'Frost Sphere - Permafrost'); - +DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (34606, 34605, 34607, 34564, 34660); +UPDATE `creature_template` SET `modelid_A` = 25144, `modelid_A2` = 0, `modelid_H` = 25144, `modelid_H2` = 0, `faction_A` = 16, `faction_H` = 16, `AIName` = '', `ScriptName` = 'mob_frost_sphere' WHERE `entry` = 34606; UPDATE `creature_template` SET `scriptname`='mob_swarm_scarab', `AIName` ='' WHERE `entry`=34605; UPDATE `creature_template` SET `scriptname`='mob_nerubian_borrower', `AIName` ='' WHERE `entry`=34607; +UPDATE `creature_template` SET `scriptname`='mob_anubarak_spike', `minhealth`= 1, `maxhealth` = 1, `faction_A` = 14, `faction_H` = 14, `modelid_A2` = 0, `minlevel` = 80, `type_flags` =0, `maxlevel` = 80, `AIName` ='' WHERE `entry`=34660; diff --git a/addition/724_trial_of_crusader_scriptdev2.sql b/addition/724_trial_of_crusader_scriptdev2.sql old mode 100644 new mode 100755 index 97feed6c5..a4c713530 --- a/addition/724_trial_of_crusader_scriptdev2.sql +++ b/addition/724_trial_of_crusader_scriptdev2.sql @@ -1,78 +1,78 @@ -DELETE FROM `script_texts` WHERE `entry` BETWEEN -1713799 AND -1713499; +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1713799 AND -1713499; INSERT INTO `script_texts` (`comment`,`sound`, `entry`,`content_loc8`,`type`,`language`,`emote`,`content_default`) VALUES -('34996','16036','-1713500','Добро пожаловать, герои! Вы услышали призыв Серебряного Авангарда и без колебаний откликнулись на него! В этом колизее вам предстоит сразиться с опаснейшими противниками. Те из вас, кто смогут пережить испытания, войдут в ряды Серебряного Авангарда, который направится в Цитадель Ледяной Короны.','6','0','0',''), -('34996','16038','-1713501','Из самых глубоких и темных пещер Грозовой Гряды был призван Гормок Пронзающий Бивень! В бой, герои!','6','0','0',''), -('34990','16069','-1713502','Твои чудовища не чета героям Альянса, Тирион!','6','0','0',''), -('34995','16069','-1713702','Твои чудовища не чета героям Орды, Тирион!','6','0','0',''), -('34796','0','-1713601','Мои рабы! Уничтожьте врага!','3','0','0',''), -('34996','16039','-1713503','Приготовьтесь к схватке с близнецами-чудовищами, Кислотной Утробой и Жуткой Чешуей!','6','0','0',''), -('34799','0','-1713504','После гибели товарища %s приходит в ярость!','3','0','0',''), -('34996','16040','-1713505','В воздухе повеяло ледяным дыханием следующего бойца: на арену выходит Ледяной Рев! Сражайтесь или погибните, чемпионы!','6','0','0',''), -('34797','0','-1713506','%s глядит на |3-3($n) и испускает гортанный вой!','3','0','0',''), -('34797','0','-1713507','%s врезается в стену Колизея и теряет ориентацию!','3','0','0',''), -('34797','0','-1713508','|3-3(%s) охватывает кипящая ярость, и он растаптывает всех на своем пути!','3','0','0',''), -('34996','16041','-1713509','Все чудовища повержены!','6','0','0',''), -('34996','16043','-1713510','Сейчас великий чернокнижник Вилфред Непопамс призовет вашего нового противника. Готовьтесь к бою!','6','0','0',''), -('35458','16268','-1713511','Благодарю, Верховный лорд. А теперь, смельчаки, я приступаю к ритуалу призыва. Когда я закончу, появится грозный демон!','6','0','0',''), -('35458','16269','-1713512','Готовьтесь к забвению!','6','0','0',''), -('35458','16270','-1713513','АГА! Получилось! Трепещи перед всевластным Вилфредом Непопамсом, мастером призыва! Ты покорен мне, демон!','6','0','0',''), -('34780','16143','-1713514','Ничтожный гном! Тебя погубит твоя самоуверенность!','6','0','0',''), -('35458','16271','-1713515','Тут я главный!','6','0','0',''), -('35458','16271','-1713715','Ну вот, опять я облажался...','6','0','0',''), -('34996','16044','-1713516','Быстрей, герои, расправьтесь с повелителем демонов, прежде чем он откроет портал в свое темное царство!','6','0','0',''), -('34780','16144','-1713517','Перед вами Джараксус, эредарский повелитель Пылающего Легиона!','6','0','0',''), -('34780','0','-1713518','На вас направлено |cFFFF0000Пламя Легиона!|r','3','0','0',''), -('34780','0','-1713519','%s создает врата Пустоты!','3','0','0',''), -('34780','0','-1713520','%s создает |cFF00FF00Вулкан инферналов!|r','3','0','0',''), -('34780','16150','-1713521','Явись, сестра! Господин зовет!','3','0','0',''), -('34780','0','-1713522','$n подвергся |cFF00FFFFИспепелению плоти!|r Исцелите его!','3','0','0',''), -('34780','16149','-1713523','ПЛОТЬ ОТ КОСТИ!','3','0','0',''), -('34780','16151','-1713524','ИНФЕРНАЛ!','3','0','0',''), -('34780','16147','-1713525','Мое место займут другие. Ваш мир обречен...','6','0','0',''), -('34996','16045','-1713526','Гибель Вилфреда Непопамса весьма трагична и должна послужить уроком тем, кто смеет беспечно играть с темной магией. К счастью, вы победили демона, и теперь вас ждет новый противник.','6','0','0',''), -('34995','16021','-1713527','Подлые собаки Альянса! Вы выпустили повелителя демонов на воинов Орды? Ваша смерть будет быстрой!','6','0','0',''), -('34990','16064','-1713528','Альянсу не нужна помощь повелителя демонов, чтобы справиться с ордынским отродьем, пес!','6','0','0',''), -('34996','16046','-1713529','Тише! Успокойтесь! Никакого заговора здесь нет. Чернокнижник заигрался и поплатился за это. Турнир продолжается!','6','0','0',''), -('34996','16047','-1713530','В следующем бою вы встретитесь с могучими рыцарями Серебряного Авангарда! Лишь победив их, вы заслужите достойную награду.','6','0','0',''), -('34995','16023','-1713531','Орда требует справедливости! Мы вызываем Альянс на бой! Позволь нам встать на место твоих рыцарей, паладин. Мы покажем этим псам, как оскорблять Орду!','6','0','0',''), -('34995','16023','-1713731','Альянс требует справедливости! Мы вызываем Орду на бой! Позволь нам встать на место твоих рыцарей, паладин. Мы покажем этим псам, как оскорблять Альянс!','6','0','0',''), -('34996','16048','-1713532','Хорошо. Да будет так. Сражайтесь с честью!','6','0','0',''), -('34995','16022','-1713533','Не щадите никого, герои Орды! ЛОК-ТАР ОГАР!','6','0','0',''), -('34995','16022','-1713733','Не щадите никого, герои Альянса! За Лордаэрон!','6','0','0',''), -('34990','16067','-1713534','СЛАВА АЛЬЯНСУ!','6','0','0',''), -('34990','16067','-1713734','ЛОК-ТАР ОГАР!','6','0','0',''), -('34996','16049','-1713535','Пустая и горькая победа. После сегодняшних потерь мы стали слабее как целое. Кто еще, кроме Короля-лича, выиграет от подобной глупости? Пали великие воины. И ради чего? Истинная опасность еще впереди - нас ждет битва с Королем-личом.','6','0','0',''), -('34996','16050','-1713536','Лишь сплотившись, вы сможете пройти последнее испытание. Из глубин Ледяной Короны навстречу вам подымаются две могучие воительницы Плети: жуткие валькирии, крылатые вестницы Короля-лича!','6','0','0',''), -('34996','16037','-1713537','Пусть состязания начнутся!','6','0','0',''), -('34497','0','-1713538','%s начинает читать заклинание|cFFFFFFFFСветлая воронка!|r Переключение к |cFFFFFFFFСветлой|r сущности!','3','0','0',''), -('34497','0','-1713539','%s начинает читать заклинание Договор близнецов!','3','0','0',''), -('34496','0','-1713540','%s начинает читать заклинание |cFF9932CDТемная воронка!|r Переключение к |cFF9932CDТемной|r сущности!','3','0','0',''), -('34497','16272','-1713541','Во имя темного повелителя. Во имя Короля-лича. Вы. Умрете.','3','0','0',''), -('34496','16272','-1713741','Во имя светлого повелителя. Во имя Короля-лича. Вы. Умрете.','3','0','0',''), -('34496','16279','-1713542','Да поглотит вас Свет!','3','0','0',''), -('34496','16277','-1713543','Пустое место!','3','0','0',''), -('34497','16276','-1713544','Тебя оценили и признали ничтожеством.','3','0','0',''), -('34497','16274','-1713545','ХАОС!','3','0','0',''), -('34496','16278','-1713546','Да поглотит вас Тьма!','3','0','0',''), -('34496','16275','-1713547','Плеть не остановить...','3','0','0',''), -('34990','16068','-1713548','Против Альянса не выстоять даже самым сильным прислужникам Короля-лича! Все славьте наших героев!','6','0','0',''), -('34995','16068','-1713748','Против Орды не выстоять даже самым сильным прислужникам Короля-лича! Все славьте наших героев!','6','0','0',''), -('34996','16051','-1713549','Король-лич понес тяжелую потерю! Вы проявили себя как бесстрашные герои Серебряного Авангарда! Мы вместе нанесем удар по Цитадели Ледяной Короны и разнесем в клочья остатки Плети! Нет такого испытания, которое мы бы не могли пройти сообща!','6','0','0',''), -('16980','16321','-1713550','Будет тебе такое испытание, Фордринг.','6','0','0',''), -('34996','16052','-1713551','Артас! Нас гораздо больше! Сложи Ледяную Скорбь, и я подарю тебе заслуженную смерть.','6','0','0',''), -('35877','16322','-1713552','Нерубианцы воздвигли целую империю под льдами Нордскола. Империю, на которой вы так бездумно построили свои дома. МОЮ ИМПЕРИЮ.','6','0','0',''), -('16980','16323','-1713553','Души твоих павших чемпионов будут принадлежать мне, Фордринг.','6','0','0',''), -('34564','16235','-1713554','А вот и гости заявились, как и обещал господин.','6','0','0',''), -('34564','16234','-1713555','Это место станет вашей могилой!','6','0','0',''), -('34564','16240','-1713556','Ауум на-л ак-к-к-к, ишшш. Вставайте, слуги мои. Время пожирать...','6','0','0',''), -('34564','0','-1713557','%s зарывается в землю!','3','0','0',''), -('34660','0','-1713558','Шипы |3-1(%s) преследуют |3-3($n)!','3','0','0',''), -('34564','0','-1713559','%s вылезает на поверхность!','3','0','0',''), -('34564','16241','-1713560','Стая поглотит вас!','6','0','0',''), -('34564','0','-1713561','%s выпускает рой жуков-трупоедов, чтобы восстановить здоровье!','3','0','0',''), -('34564','16236','-1713562','Ф-лаккх шир!','6','0','0',''), -('34564','16237','-1713563','Еще одна душа накормит хозяина.','6','0','0',''), -('34564','16238','-1713564','Я подвел тебя, господин...','6','0','0',''), -('36095','0','-1713565','Чемпионы, вы прошли испытание великого крестоносца! Знайте, что только самые сильные искатели приключений могли рассчитывать завершить это испытание.','6','0','0',''), -('36095','0','-1713566','Позвольте вручить вам эти сундуки в качестве заслуженной награды, и пусть его содержимое послужит вам верой и правдой в походе против Артаса в самом центре Цитадели Ледяной Короны!','6','0','0',''); +('34996','16036','-1713500','Добро пожаловать, герои! Вы услышали призыв Серебряного Авангарда и без колебаний откликнулись на него! В этом колизее вам предстоит сразиться с опаснейшими противниками. Те из вас, кто смогут пережить испытания, войдут в ряды Серебряного Авангарда, который направится в Цитадель Ледяной Короны.','6','0','0','Welcome champions, you have heard the call of the argent crusade and you have boldly answered. It is here in the crusaders coliseum that you will face your greatest challenges. Those of you who survive the rigors of the coliseum will join the Argent Crusade on its marsh to ice crown citadel.'), +('34996','16038','-1713501','Из самых глубоких и темных пещер Грозовой Гряды был призван Гормок Пронзающий Бивень! В бой, герои!','6','0','0','Hailing from the deepest, darkest carverns of the storm peaks, Gormok the Impaler! Battle on, heroes!'), +('34990','16069','-1713502','Твои чудовища не чета героям Альянса, Тирион!','6','0','0','Your beast will be no match for my champions Tirion!'), +('34995','16069','-1713702','Твои чудовища не чета героям Орды, Тирион!','6','0','0','Your beast will be no match for my champions Tirion!'), +('34796','0','-1713601','Мои рабы! Уничтожьте врага!','3','0','0','My slaves! Destroy the enemy!'), +('34996','16039','-1713503','Приготовьтесь к схватке с близнецами-чудовищами, Кислотной Утробой и Жуткой Чешуей!','6','0','0','Steel yourselves, heroes, for the twin terrors Acidmaw and Dreadscale. Enter the arena!'), +('34799','0','-1713504','После гибели товарища %s приходит в ярость!','3','0','0','After the death of sister %s goes berserk!'), +('34996','16040','-1713505','В воздухе повеяло ледяным дыханием следующего бойца: на арену выходит Ледяной Рев! Сражайтесь или погибните, чемпионы!','6','0','0','The air freezes with the introduction of our next combatant, Icehowl! Kill or be killed, champions!'), +('34797','0','-1713506','%s глядит на |3-3($n) и испускает гортанный вой!','3','0','0','%S looks at |3-3($n) and emits a guttural howl!'), +('34797','0','-1713507','%s врезается в стену Колизея и теряет ориентацию!','3','0','0','%S crashes into a wall of the Colosseum and lose focus!'), +('34797','0','-1713508','|3-3(%s) охватывает кипящая ярость, и он растаптывает всех на своем пути!','3','0','0','|3-3(%s) covers boiling rage, and he tramples all in its path!'), +('34996','16041','-1713509','Все чудовища повержены!','6','0','0','All the monsters defeated!'), +('34996','16043','-1713510','Сейчас великий чернокнижник Вилфред Непопамс призовет вашего нового противника. Готовьтесь к бою!','6','0','0','Grand Warlock Wilfred Fizzlebang will summon forth your next challenge. Stand by for his entry!'), +('35458','16268','-1713511','Благодарю, Верховный лорд. А теперь, смельчаки, я приступаю к ритуалу призыва. Когда я закончу, появится грозный демон!','6','0','0','Thank you, Highlord! Now challengers, I will begin the ritual of summoning! When I am done, a fearsome Doomguard will appear!'), +('35458','16269','-1713512','Готовьтесь к забвению!','6','0','0','Prepare for oblivion!'), +('35458','16270','-1713513','АГА! Получилось! Трепещи перед всевластным Вилфредом Непопамсом, мастером призыва! Ты покорен мне, демон!','6','0','0','Ah ha! Behold the absolute power of Wilfred Fizzlebang, master summoner! You are bound to ME, demon!'), +('34780','16143','-1713514','Ничтожный гном! Тебя погубит твоя самоуверенность!','6','0','0','Trifling gnome, your arrogance will be your undoing!'), +('35458','16271','-1713515','Тут я главный!','6','0','0','But I am in charge here-'), +('35458','16271','-1713715','Ну вот, опять я облажался...','6','0','0','Agonized Scream!!!'), +('34996','16044','-1713516','Быстрей, герои, расправьтесь с повелителем демонов, прежде чем он откроет портал в свое темное царство!','6','0','0','Quickly, heroes! Destroy the demon lord before it can open a portal to its twisted demonic realm!'), +('34780','16144','-1713517','Перед вами Джараксус, эредарский повелитель Пылающего Легиона!','6','0','0','You face Jaraxxus, eredar lord of the Burning Legion!'), +('34780','0','-1713518','На вас направлено |cFFFF0000Пламя Легиона!|r','3','0','0','You have been sent |cFFFF0000Plamya Legion!|R'), +('34780','0','-1713519','%s создает врата Пустоты!','3','0','0','%S creates the gates of the Void!'), +('34780','0','-1713520','%s создает |cFF00FF00Вулкан инферналов!|r','3','0','0','%S creates |cFF00FF00Vulkan Infernals!|R'), +('34780','16150','-1713521','Явись, сестра! Господин зовет!','6','0','0','Come forth, sister! Your master calls!'), +('34780','0','-1713522','$n $gподвергся:подверглась; |cFF00FFFFИспепелению плоти!|r Исцелите $gего:ее;!','3','0','0','$N $gpodvergsya:been; |cFF00FFFFIspepeleniyu flesh!|R Heal $gego:it;!'), +('34780','16149','-1713523','ПЛОТЬ ОТ КОСТИ!','3','0','0','FLESH FROM BONE!'), +('34780','16151','-1713524','ИНФЕРНАЛ!','3','0','0','INFERNO!'), +('34780','16147','-1713525','Мое место займут другие. Ваш мир обречен...','6','0','0','Another will take my place. Your world is doomed.'), +('34996','16045','-1713526','Гибель Вилфреда Непопамса весьма трагична и должна послужить уроком тем, кто смеет беспечно играть с темной магией. К счастью, вы победили демона, и теперь вас ждет новый противник.','6','0','0','The loss of Wilfred Fizzlebang, while unfortunate, should be a lesson to those that dare dabble in dark magic. Alas, you are victorious and must now face the next challenge.'), +('34995','16021','-1713527','Подлые собаки Альянса! Вы выпустили повелителя демонов на воинов Орды? Ваша смерть будет быстрой!','6','0','0','Treacherous Alliance dogs! You summon a demon lord against warriors of the Horde!? Your deaths will be swift!'), +('34990','16064','-1713528','Альянсу не нужна помощь повелителя демонов, чтобы справиться с ордынским отродьем, пес!','6','0','0','The Alliance doesnt need the help of a demon lord to deal with Horde filth. Come, pig!'), +('34996','16046','-1713529','Тише! Успокойтесь! Никакого заговора здесь нет. Чернокнижник заигрался и поплатился за это. Турнир продолжается!','6','0','0','Everyone, calm down! Compose yourselves! There is no conspiracy at play here. The warlock acted on his own volition - outside of influences from the Alliance. The tournament must go on!'), +('34996','16047','-1713530','В следующем бою вы встретитесь с могучими рыцарями Серебряного Авангарда! Лишь победив их, вы заслужите достойную награду.','6','0','0','The next battle will be against the Argent Crusades most powerful knights! Only by defeating them will you be deemed worthy...'), +('34995','16023','-1713531','Орда требует справедливости! Мы вызываем Альянс на бой! Позволь нам встать на место твоих рыцарей, паладин. Мы покажем этим псам, как оскорблять Орду!','6','0','0','The Horde demands justice! We challenge the Alliance. Allow us to battle in place of your knights, paladin. We will show these dogs what it means to insult the Horde!'), +('34995','16023','-1713731','Альянс требует справедливости! Мы вызываем Орду на бой! Позволь нам встать на место твоих рыцарей, паладин. Мы покажем этим псам, как оскорблять Альянс!','6','0','0','Our honor has been besmirched! They make wild claims and false accusations against us. I demand justice! Allow my champions to fight in place of your knights, Tirion. We challenge the Horde!'), +('34996','16048','-1713532','Хорошо. Да будет так. Сражайтесь с честью!','','0','0','Very well, I will allow it. Fight with honor!'), +('34995','16022','-1713533','Не щадите никого, герои Орды! ЛОК-ТАР ОГАР!','6','0','0','Show them no mercy, Horde champions! LOK-TAR OGAR!'), +('34995','16022','-1713733','Не щадите никого, герои Альянса! За Лордаэрон!','6','0','0','Fight for the glory of the Alliance, heroes! Honor your king and your people!'), +('34990','16067','-1713534','СЛАВА АЛЬЯНСУ!','6','0','0','GLORY OF THE ALLIANCE!'), +('34990','16067','-1713734','ЛОК-ТАР ОГАР!','6','0','0','LOK-TAR OGAR!'), +('34996','16049','-1713535','Пустая и горькая победа. После сегодняшних потерь мы стали слабее как целое. Кто еще, кроме Короля-лича, выиграет от подобной глупости? Пали великие воины. И ради чего? Истинная опасность еще впереди - нас ждет битва с Королем-личом.','6','0','0','A shallow and tragic victory. We are weaker as a whole from the losses suffered today. Who but the Lich King could benefit from such foolishness? Great warriors have lost their lives. And for what? The true threat looms ahead - the Lich King awaits us all in death.'), +('34996','16050','-1713536','Лишь сплотившись, вы сможете пройти последнее испытание. Из глубин Ледяной Короны навстречу вам подымаются две могучие воительницы Плети: жуткие валькирии, крылатые вестницы Короля-лича!','6','0','0','Only by working together will you overcome the final challenge. From the depths of Icecrown come two of the Scourges most powerful lieutenants: fearsome valkyr, winged harbingers of the Lich King!'), +('34996','16037','-1713537','Пусть состязания начнутся!','6','0','0','Let the games begin!'), +('34497','0','-1713538','%s начинает читать заклинание|cFFFFFFFFСветлая воронка!|r Переключение к |cFFFFFFFFСветлой|r сущности!','3','0','0','%S begins to read a spell |cFFFFFFFFSvetlaya funnel!|R switch to |cFFFFFFFFSvetloy|r essence!'), +('34497','0','-1713539','%s начинает читать заклинание Договор близнецов!','3','0','0','%S begins to read the spell Treaty twins!'), +('34496','0','-1713540','%s начинает читать заклинание |cFF9932CDТемная воронка!|r Переключение к |cFF9932CDТемной|r сущности!','3','0','0','%S begins to read a spell |cFF9932CDTemnaya funnel!|R switch to |cFF9932CDTemnoy|r essence!'), +('34497','16272','-1713541','Во имя темного повелителя. Во имя Короля-лича. Вы. Умрете.','6','0','0','In the name of our dark master. For the Lich King. You. Will. Die.'), +('34496','16272','-1713741','Во имя светлого повелителя. Во имя Короля-лича. Вы. Умрете.','6','0','0','In the name of our dark master. For the Lich King. You. Will. Die.'), +('34496','16279','-1713542','Да поглотит вас Свет!','6','0','0','Let the light consume you!'), +('34496','16277','-1713543','Пустое место!','6','0','0','Empty place!'), +('34497','16276','-1713544','Тебя оценили и признали ничтожеством.','6','0','0','You appreciated and acknowledged nothing.'), +('34497','16274','-1713545','ХАОС!','3','0','0','CHAOS!'), +('34496','16278','-1713546','Да поглотит вас Тьма!','6','0','0','Let the dark consume you!'), +('34496','16275','-1713547','Плеть не остановить...','6','0','0','The Scourge cannot be stopped...'), +('34990','16068','-1713548','Против Альянса не выстоять даже самым сильным прислужникам Короля-лича! Все славьте наших героев!','6','0','0','Against the Alliance can not stand even the most powerful henchmen of the Lich King! All glorify our heroes!'), +('34995','16068','-1713748','Против Орды не выстоять даже самым сильным прислужникам Короля-лича! Все славьте наших героев!','6','0','0','Against the Horde does not withstand even the most powerful henchmen of the Lich King! All glorify our heroes!'), +('34996','16051','-1713549','Король-лич понес тяжелую потерю! Вы проявили себя как бесстрашные герои Серебряного Авангарда! Мы вместе нанесем удар по Цитадели Ледяной Короны и разнесем в клочья остатки Плети! Нет такого испытания, которое мы бы не могли пройти сообща!','6','0','0','A mighty blow has been dealt to the Lich King! You have proven yourselves able bodied champions of the Argent Crusade. Together we will strike at Icecrown Citadel and destroy what remains of the Scourge! There is no challenge that we cannot face united!'), +('16980','16321','-1713550','Будет тебе такое испытание, Фордринг.','6','0','0','You will have your challenge, Fordring.'), +('34996','16052','-1713551','Артас! Нас гораздо больше! Сложи Ледяную Скорбь, и я подарю тебе заслуженную смерть.','6','0','0','Arthas! You are hopelessly outnumbered! Lay down Frostmourne and I will grant you a just death.'), +('35877','16322','-1713552','Нерубианцы воздвигли целую империю под льдами Нордскола. Империю, на которой вы так бездумно построили свои дома. МОЮ ИМПЕРИЮ.','6','0','0','The Nerubians built an empire beneath the frozen wastes of Northrend. An empire that you so foolishly built your structures upon. MY EMPIRE.'), +('16980','16323','-1713553','Души твоих павших чемпионов будут принадлежать мне, Фордринг.','6','0','0','The souls of your fallen champions will be mine, Fordring.'), +('34564','16235','-1713554','А вот и гости заявились, как и обещал господин.','6','0','0','Ahhh... Our guests arrived, just as the master promised.'), +('34564','16234','-1713555','Это место станет вашей могилой!','3','0','0','This place will serve as your tomb!'), +('34564','16240','-1713556','Ауум на-л ак-к-к-к, ишшш. Вставайте, слуги мои. Время пожирать...','6','0','0','Auum na-l ak-k-k-k, isshhh. Rise, minions. Devour...'), +('34564','0','-1713557','%s зарывается в землю!','3','0','0','%S buries itself in the earth!'), +('34660','0','-1713558','Шипы Ануб-Арака преследуют |3-3($s)!','3','0','0','Anub-Arak spikes pursuing |3-3($s)!'), +('34564','0','-1713559','%s вылезает на поверхность!','3','0','0','%S getting out of the ground!'), +('34564','16241','-1713560','Стая поглотит вас!','6','0','0','The swarm shall overtake you!'), +('34564','0','-1713561','%s выпускает рой жуков-трупоедов, чтобы восстановить здоровье!','3','0','0','%S produces a swarm of beetles Peon to restore your health!'), +('34564','16236','-1713562','Ф-лаккх шир!','6','0','0','F-lakkh shir!'), +('34564','16237','-1713563','Еще одна душа накормит хозяина.','6','0','0','Another soul to sate the host.'), +('34564','16238','-1713564','Я подвел тебя, господин...','6','0','0','I have failed you, master...'), +('36095','0','-1713565','Чемпионы, вы прошли испытание великого крестоносца! Знайте, что только самые сильные искатели приключений могли рассчитывать завершить это испытание.','3','0','0','Champions, you are alive! Not only have you defeated every challenge of the Trial of the Crusader, but thwarted Arthas directly! Your skill and cunning will prove to be a powerful weapon against the Scourge. Well done! Allow one of my mages to transport you back to the surface!'), +('36095','0','-1713566','Позвольте вручить вам эти сундуки в качестве заслуженной награды, и пусть его содержимое послужит вам верой и правдой в походе против Артаса в самом центре Цитадели Ледяной Короны!','3','0','0','Let me hand you the chests as a reward, and let its contents will serve you faithfully in the campaign against Arthas in the heart of the Icecrown Citadel!'); diff --git a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql index d217162f1..7c2a3a15d 100644 --- a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql +++ b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql @@ -1,16 +1,16 @@ -- Trial of the crusader spelltable DELETE FROM `boss_spell_table` WHERE `entry` IN -(34496,34497,34564,34605,34607,34780,34784,34796,34797,34799, 34800, 34813, 34815, 34826, 35144, 35176); +(34496,34497,34564,34605,34607,34780,34784,34796,34797,34799, 34800, 34813, 34815, 34826, 35144, 35176, 34606, 34660); -- Eydis Darkbane INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES (34496, 64238, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), (34496, 65768, 67262, 67263, 67264, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), (34496, 65874, 67256, 67257, 67258, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), -(34496, 65876, 67306, 67307, 67308, 120000, 0, 0, 0, 120000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34496, 65876, 67306, 67307, 67308, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), (34496, 65879, 67244, 67245, 67246, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), (34496, 65916, 67248, 67249, 67250, 15000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), -(34496, 66058, 67182, 67183, 67184, 30000, 0, 0, 0, 90000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34496, 66058, 67182, 67183, 67184, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), (34496, 66069, 67309, 67310, 67311, 10000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), (34496, 67282, 0, 0, 0, 10000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL); @@ -19,9 +19,9 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ (34497, 64238, 64238, 64238, 64238, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), (34497, 65766, 67270, 67271, 67272, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), (34497, 65858, 67259, 67260, 67261, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), -(34497, 65875, 67303, 67304, 67305, 120000, 0, 0, 0, 120000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34497, 65875, 67303, 67304, 67305, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), (34497, 65916, 67248, 67249, 67250, 15000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), -(34497, 66046, 67206, 67207, 67208, 30000, 30000, 30000, 30000, 90000, 90000, 90000, 90000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34497, 66046, 67206, 67207, 67208, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), (34497, 66075, 67312, 67313, 67314, 10000, 10000, 10000, 10000, 20000, 20000, 20000, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), (34497, 67297, 67297, 67298, 67298, 10000, 10000, 10000, 10000, 15000, 15000, 15000, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL); @@ -33,8 +33,7 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ (34564, 34606, 0, 0, 0, 5000, 0, 0, 0, 10000, 0, 0, 0, 0, 0, 0, 0, 10.0, 100.0, 0, 0, 0, 0, 9, 1, 0, 0, NULL), (34564, 34607, 0, 0, 0, 70000, 0, 0, 0, 90000, 0, 0, 0, 0, 0, 0, 0, 20.0, 100.0, 0, 0, 0, 0, 9, 1, 0, 0, NULL), (34564, 53421, 53421, 53421, 53421, 45000, 45000, 45000, 45000, 60000, 60000, 60000, 60000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, NULL), -(34564, 66169, 0, 0, 0, 10000, 10000, 10000, 10000, 15000, 15000, 15000, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 1, 0, NULL), -(34564, 65922, 65922, 65922, 65922, 10000, 10000, 10000, 10000, 15000, 15000, 15000, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 1, 0, NULL), +(34564, 66169, 0, 0, 0, 20000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), (34564, 66012, 66012, 66012, 66012, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), (34564, 66013, 67700, 68509, 68510, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), (34564, 66339, 66339, 66339, 66339, 5000, 5000, 5000, 5000, 10000, 10000, 10000, 10000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0, 0, NULL), @@ -49,6 +48,15 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ (34605, 66092, 66092, 66092, 66092, 5000, 5000, 5000, 5000, 20000, 20000, 20000, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), (34605, 67861, 66092, 66092, 66092, 5000, 5000, 5000, 5000, 20000, 20000, 20000, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL); +-- Cold flame +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34606, 66193, 67855, 67856, 67857, 5000, 0, 0, 0, 5000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL); + +-- Anub'arak spike +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34660, 66193, 67855, 67856, 67857, 5000, 0, 0, 0, 5000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34660, 65920, 65921, 65922, 65923, 10000, 10000, 10000, 10000, 15000, 15000, 15000, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL); + -- Nerubian Borrower INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES (34607, 66129, 66129, 66129, 66129, 10000, 10000, 10000, 10000, 20000, 20000, 20000, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL), @@ -93,7 +101,7 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ -- Dreadscale INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES -(34799, 53421, 0, 0, 0, 40000, 0, 0, 0, 60000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), +(34799, 53421, 0, 0, 0, 40000, 0, 0, 0, 40000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), (34799, 66794, 67644, 67645, 67646, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), (34799, 66796, 67632, 67633, 67634, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), (34799, 66821, 66821, 66821, 66821, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), @@ -130,7 +138,7 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ -- Acidmaw INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES -(35144, 53421, 0, 0, 0, 40000, 0, 0, 0, 60000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, NULL), +(35144, 53421, 0, 0, 0, 40000, 0, 0, 0, 40000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, NULL), (35144, 66794, 67644, 67645, 67646, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), (35144, 66819, 66819, 66819, 66819, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), (35144, 66824, 67612, 67613, 67614, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), diff --git a/addition/spell_comment_from_wowd_scriptdev2.sql b/addition/spell_comment_from_wowd_scriptdev2.sql index 940e3d1f3..a5fec77d0 100644 --- a/addition/spell_comment_from_wowd_scriptdev2.sql +++ b/addition/spell_comment_from_wowd_scriptdev2.sql @@ -15,5 +15,5 @@ INNER JOIN `mangos`.`wowd_spell` ON `mangos`.`wowd_spell`.`id` = `scriptdev2`.`b UPDATE `scriptdev2`.`boss_spell_table` SET `comment` = (SELECT DISTINCT `commentlist`.`comment` FROM `commentlist` WHERE `scriptdev2`.`boss_spell_table`.`entry` = `commentlist`.`entry` AND `scriptdev2`.`boss_spell_table`.`spellID_N10` = `commentlist`.`spell` -AND `scriptdev2`.`boss_spell_table`.`comment` = NULL); +AND `scriptdev2`.`boss_spell_table`.`comment` IS NULL); DROP VIEW `commentlist`; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp index 058044574..c0a1028ce 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp @@ -44,7 +44,7 @@ SPELL_MARK = 67574, SPELL_LEECHING_SWARM = 66118, SPELL_LEECHING_HEAL = 66125, SPELL_LEECHING_DAMAGE = 66240, -SPELL_IMPALE = 65922, +SPELL_IMPALE = 65920, SPELL_SPIKE_CALL = 66169, SPELL_POUND = 66012, SPELL_SHOUT = 67730, @@ -59,6 +59,7 @@ SUMMON_SCARAB = NPC_SCARAB, SUMMON_BORROWER = NPC_BURROWER, SUMMON_FROSTSPHERE = NPC_FROST_SPHERE, SPELL_BERSERK = 26662, +SPELL_PERMAFROST = 66193, }; struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI @@ -145,12 +146,12 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI DoScriptText(-1713557,m_creature); break;} case 2: { - if (bsw->timedQuery(SPELL_IMPALE, uiDiff)) { + if (bsw->timedQuery(SPELL_SPIKE_CALL, uiDiff)) { pTarget = bsw->SelectUnit(); -// bsw->doCast(SPELL_IMPALE); bsw->doCast(SPELL_SPIKE_CALL); - bsw->doCast(NPC_SPIKE); bsw->doCast(SPELL_MARK,pTarget); + Unit* spike = bsw->doSummon(NPC_SPIKE,TEMPSUMMON_TIMED_DESPAWN,20000); + spike->AddThreat(pTarget, 1000.0f); DoScriptText(-1713558,pTarget); }; if (bsw->timedQuery(SPELL_SUMMON_BEATLES, uiDiff)) { @@ -226,7 +227,7 @@ struct MANGOS_DLL_DECL mob_swarm_scarabAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { - if (m_pInstance->GetData(TYPE_ANUBARAK) != IN_PROGRESS) + if (m_pInstance && m_pInstance->GetData(TYPE_ANUBARAK) != IN_PROGRESS) m_creature->ForcedDespawn(); if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -243,7 +244,7 @@ struct MANGOS_DLL_DECL mob_swarm_scarabAI : public ScriptedAI CreatureAI* GetAI_mob_swarm_scarab(Creature* pCreature) { return new mob_swarm_scarabAI(pCreature); -} +}; struct MANGOS_DLL_DECL mob_nerubian_borrowerAI : public ScriptedAI { @@ -282,7 +283,7 @@ struct MANGOS_DLL_DECL mob_nerubian_borrowerAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { - if (m_pInstance->GetData(TYPE_ANUBARAK) != IN_PROGRESS) + if (m_pInstance && m_pInstance->GetData(TYPE_ANUBARAK) != IN_PROGRESS) m_creature->ForcedDespawn(); if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -318,7 +319,87 @@ struct MANGOS_DLL_DECL mob_nerubian_borrowerAI : public ScriptedAI CreatureAI* GetAI_mob_nerubian_borrower(Creature* pCreature) { return new mob_nerubian_borrowerAI(pCreature); -} +}; + +struct MANGOS_DLL_DECL mob_frost_sphereAI : public ScriptedAI +{ + mob_frost_sphereAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + BossSpellWorker* bsw; + + void Reset() + { + m_creature->SetRespawnDelay(DAY); + bsw = new BossSpellWorker(this); + m_creature->SetSpeedRate(MOVE_RUN, 0.1f); + m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); + m_creature->GetMotionMaster()->MoveRandom(); + } + + void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + { + if (!m_creature || !m_creature->isAlive()) + return; + if(pDoneBy->GetTypeId() != TYPEID_PLAYER) return; + + uiDamage = m_creature->GetHealth(); + bsw->doCast(SPELL_PERMAFROST); + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_pInstance && m_pInstance->GetData(TYPE_ANUBARAK) != IN_PROGRESS) + m_creature->ForcedDespawn(); + } +}; + +CreatureAI* GetAI_mob_frost_sphere(Creature* pCreature) +{ + return new mob_frost_sphereAI(pCreature); +}; + +struct MANGOS_DLL_DECL mob_anubarak_spikeAI : public ScriptedAI +{ + mob_anubarak_spikeAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + BossSpellWorker* bsw; + + void Reset() + { + m_creature->SetRespawnDelay(DAY); + bsw = new BossSpellWorker(this); + m_creature->SetSpeedRate(MOVE_RUN, 0.5f); + bsw->doCast(SPELL_IMPALE); + } + + void Aggro(Unit *who) + { + if (!m_pInstance) return; + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_pInstance && m_pInstance->GetData(TYPE_ANUBARAK) != IN_PROGRESS) + m_creature->ForcedDespawn(); + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + } +}; + +CreatureAI* GetAI_mob_anubarak_spike(Creature* pCreature) +{ + return new mob_anubarak_spikeAI(pCreature); +}; void AddSC_boss_anubarak_trial() { @@ -339,4 +420,14 @@ void AddSC_boss_anubarak_trial() newscript->GetAI = &GetAI_mob_nerubian_borrower; newscript->RegisterSelf(); + newscript = new Script; + newscript->Name = "mob_anubarak_spike"; + newscript->GetAI = &GetAI_mob_anubarak_spike; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_frost_sphere"; + newscript->GetAI = &GetAI_mob_frost_sphere; + newscript->RegisterSelf(); + } \ No newline at end of file diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp index 377dd9647..407390142 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp @@ -21,7 +21,7 @@ SDComment: by /dev/rsa SDCategory: Crusader Coliseum EndScriptData */ -// Twin pact && shields not worked now +// Twin pact - heal part not worked now by undefined reason. Need override? // timers need correct #include "precompiled.h" @@ -80,6 +80,7 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI ScriptedInstance* m_pInstance; uint8 stage; BossSpellWorker* bsw; + bool TwinPactCasted; void Reset() { if(!m_pInstance) return; @@ -87,6 +88,7 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI bsw = new BossSpellWorker(this); m_creature->SetRespawnDelay(DAY); stage = 1; + TwinPactCasted = false; } void JustReachedHome() @@ -167,13 +169,13 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI break; case 2: if (bsw->timedQuery(SPELL_TWIN_PACT_L, uiDiff) - && m_creature->GetHealthPercent() <= 30.0f && bsw->doCast(SPELL_SHIELD_LIGHT) == CAST_OK ) { m_pInstance->SetData(DATA_CASTING_FJOLA, SPELL_TWIN_PACT_L); DoScriptText(-1713539,m_creature); bsw->doCast(SPELL_TWIN_PACT_L); stage = 0; + TwinPactCasted = true; } break; default: @@ -186,17 +188,25 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI stage = 1; } - if (m_pInstance->GetData(DATA_CASTING_EYDIS) == SPELL_TWIN_PACT_H && stage== 0) + if ( m_creature->GetHealthPercent() <= 50.0f + && stage == 0 + && !TwinPactCasted) { - bsw->doCast(SPELL_TWIN_POWER); - m_pInstance->SetData(DATA_CASTING_EYDIS, SPELL_NONE); stage = 2; } + if (m_pInstance->GetData(DATA_CASTING_EYDIS) == SPELL_TWIN_PACT_H) + { + bsw->doCast(SPELL_TWIN_POWER); + m_pInstance->SetData(DATA_CASTING_EYDIS, SPELL_NONE); + } + bsw->timedCast(SPELL_LIGHT_SURGE, uiDiff); bsw->timedCast(SPELL_LIGHT_TOUCH, uiDiff); + bsw->timedCast(SPELL_BERSERK, uiDiff); + DoMeleeAttackIfReady(); } }; @@ -221,6 +231,7 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI ScriptedInstance* m_pInstance; uint8 stage; BossSpellWorker* bsw; + bool TwinPactCasted; void Reset() { @@ -229,6 +240,7 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI bsw = new BossSpellWorker(this); m_creature->SetRespawnDelay(DAY); stage = 0; + TwinPactCasted = false; } void JustReachedHome() @@ -309,13 +321,13 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI break; case 2: if (bsw->timedQuery(SPELL_TWIN_PACT_H, uiDiff) - && m_creature->GetHealthPercent() <= 30.0f && bsw->doCast(SPELL_SHIELD_DARK) == CAST_OK ) { m_pInstance->SetData(DATA_CASTING_EYDIS, SPELL_TWIN_PACT_H); DoScriptText(-1713539,m_creature); bsw->doCast(SPELL_TWIN_PACT_H); stage = 0; + TwinPactCasted = true; } break; default: @@ -328,17 +340,22 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI stage = 1; } - if (m_pInstance->GetData(DATA_CASTING_FJOLA) == SPELL_TWIN_PACT_L && stage== 0) + if ( m_creature->GetHealthPercent() <= 50.0f + && m_pInstance->GetData(DATA_CASTING_FJOLA) == SPELL_TWIN_PACT_L + && !TwinPactCasted + && stage == 0) { bsw->doCast(SPELL_TWIN_POWER); m_pInstance->SetData(DATA_CASTING_FJOLA, SPELL_NONE); - stage = 2; + stage = 2; } bsw->timedCast(SPELL_DARK_SURGE, uiDiff); bsw->timedCast(SPELL_DARK_TOUCH, uiDiff); + bsw->timedCast(SPELL_BERSERK, uiDiff); + DoMeleeAttackIfReady(); } }; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index d183ca4a9..abd32ae77 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -38,7 +38,7 @@ static _Messages _GossipMessage[]= {"Вы готовы к следующему этапу?",GOSSIP_ACTION_INFO_DEF+2,false,TYPE_JARAXXUS}, // {"Вы готовы драться с чемпионами Серебряного авангарда?",GOSSIP_ACTION_INFO_DEF+3,false,TYPE_CRUSADERS}, // {"Вы готовы к следующему этапу?",GOSSIP_ACTION_INFO_DEF+4,false,TYPE_VALKIRIES}, // -{"Вы готовы продолжить бой с Ануб-Араком?",GOSSIP_ACTION_INFO_DEF+5,false,TYPE_LICH_KING}, // +{"Вы готовы продолжить бой с Ануб-Араком?",GOSSIP_ACTION_INFO_DEF+5,false,TYPE_ANUBARAK}, // {"Не надо сюда тыкать. На сегодня арена закрыта.",GOSSIP_ACTION_INFO_DEF+6,true,TYPE_ANUBARAK}, // }; enum @@ -349,7 +349,8 @@ struct MANGOS_DLL_DECL boss_lich_king_tocAI : public ScriptedAI Event = false; MovementStarted = false; m_creature->SetRespawnDelay(DAY); - pPortal = m_creature->SummonCreature(NPC_TRIGGER, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + pPortal = m_creature->SummonCreature(NPC_TRIGGER, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + pPortal->SetRespawnDelay(DAY); pPortal->CastSpell(pPortal, 51807, false); } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index f3e859ecd..ad5346e9d 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -29,7 +29,7 @@ enum NPC_THRALL = 34994, NPC_PROUDMOORE = 34992, - NPC_PORTAL = 19224, + NPC_PORTAL = 1, NPC_TRIGGER = 22517, NPC_ICEHOWL = 34797, From 616f414b097d123e7476f009f48d6cfd830ec66a Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 8 Apr 2010 19:56:45 +0400 Subject: [PATCH 224/405] TOC part 38 --- addition/724_trial_of_crusader_mangos.sql | 9 +++++- ...rial_of_crusader_spelltable_scriptdev2.sql | 4 +-- include/sc_boss_spell_worker.cpp | 10 +++++++ include/sc_boss_spell_worker.h | 8 ++++++ .../boss_anubarak_trial.cpp | 28 +++++++++++++++---- .../trial_of_the_crusader.cpp | 1 + .../trial_of_the_crusader.h | 2 +- 7 files changed, 52 insertions(+), 10 deletions(-) diff --git a/addition/724_trial_of_crusader_mangos.sql b/addition/724_trial_of_crusader_mangos.sql index 3ede8387f..4373f6c93 100644 --- a/addition/724_trial_of_crusader_mangos.sql +++ b/addition/724_trial_of_crusader_mangos.sql @@ -84,7 +84,14 @@ UPDATE `creature_template` SET `npcflag`=1, `scriptname`='mob_dark_essence', `AI UPDATE `creature_template` SET `scriptname`='boss_anubarak_trial', `AIName` ='' WHERE `entry`=34564; DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (34606, 34605, 34607, 34564, 34660); -UPDATE `creature_template` SET `modelid_A` = 25144, `modelid_A2` = 0, `modelid_H` = 25144, `modelid_H2` = 0, `faction_A` = 16, `faction_H` = 16, `AIName` = '', `ScriptName` = 'mob_frost_sphere' WHERE `entry` = 34606; +-- UPDATE `creature_template` SET `modelid_A` = 25144, `modelid_A2` = 0, `modelid_H` = 25144, `modelid_H2` = 0, `faction_A` = 16, `faction_H` = 16, `AIName` = '', `ScriptName` = 'mob_frost_sphere' WHERE `entry` = 34606; UPDATE `creature_template` SET `scriptname`='mob_swarm_scarab', `AIName` ='' WHERE `entry`=34605; UPDATE `creature_template` SET `scriptname`='mob_nerubian_borrower', `AIName` ='' WHERE `entry`=34607; UPDATE `creature_template` SET `scriptname`='mob_anubarak_spike', `minhealth`= 1, `maxhealth` = 1, `faction_A` = 14, `faction_H` = 14, `modelid_A2` = 0, `minlevel` = 80, `type_flags` =0, `maxlevel` = 80, `AIName` ='' WHERE `entry`=34660; + +UPDATE `creature_template` SET `modelid_A` = 25144, `modelid_A2` = 0, `modelid_H` = 25144, `modelid_H2` = 0, `faction_A` = 16, `faction_H` = 16, `AIName` = 'EventAI', `ScriptName` = '' WHERE `entry` = 34606; +INSERT INTO `creature_ai_scripts` (`id`, `creature_id`, `event_type`, `event_inverse_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action1_type`, `action1_param1`, `action1_param2`, `action1_param3`, `action2_type`, `action2_param1`, `action2_param2`, `action2_param3`, `action3_type`, `action3_param1`, `action3_param2`, `action3_param3`, `comment`) VALUES +(3460651, 34606, 0, 0, 101, 3, 1000, 15000, 60000, 60000, 11, 66193, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 'Frost Sphere - Permafrost'), +(3460654, 34606, 0, 0, 101, 5, 1000, 15000, 60000, 60000, 11, 67855, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 'Frost Sphere - Permafrost'), +(3460652, 34606, 0, 0, 101, 9, 1000, 15000, 60000, 60000, 11, 67856, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 'Frost Sphere - Permafrost'), +(3460653, 34606, 0, 0, 101, 16, 1000, 15000, 60000, 60000, 11, 67857, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 'Frost Sphere - Permafrost'); diff --git a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql index 7c2a3a15d..12081dc1d 100644 --- a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql +++ b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql @@ -48,9 +48,9 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ (34605, 66092, 66092, 66092, 66092, 5000, 5000, 5000, 5000, 20000, 20000, 20000, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), (34605, 67861, 66092, 66092, 66092, 5000, 5000, 5000, 5000, 20000, 20000, 20000, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL); --- Cold flame +-- Cold sphere INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES -(34606, 66193, 67855, 67856, 67857, 5000, 0, 0, 0, 5000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL); +(34606, 66193, 67855, 67856, 67857, 5000, 0, 0, 0, 5000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL); -- Anub'arak spike INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index 9eb6e64bd..940644066 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -253,6 +253,16 @@ bool BossSpellWorker::isSummon(uint8 m_uiSpellIdx) }; }; +bool BossSpellWorker::_hasAura(uint8 m_uiSpellIdx, Unit* pTarget) +{ + if (!pTarget) return false; + + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + + return (pTarget->HasAura(pSpell->m_uiSpellEntry[currentDifficulty])); + +}; + uint8 BossSpellWorker::FindSpellIDX(uint32 SpellID) { if (bossSpellCount != 0) diff --git a/include/sc_boss_spell_worker.h b/include/sc_boss_spell_worker.h index 2db32d200..32e4a9d0a 100644 --- a/include/sc_boss_spell_worker.h +++ b/include/sc_boss_spell_worker.h @@ -132,6 +132,12 @@ class MANGOS_DLL_DECL BossSpellWorker return _doRemove(FindSpellIDX(SpellID),pTarget); }; + bool hasAura(uint32 SpellID, Unit* pTarget = NULL) + { + if (!pTarget) pTarget = boss; + return _hasAura(FindSpellIDX(SpellID),pTarget); + }; + Unit* doSummon(uint32 SpellID, TempSummonType type = TEMPSUMMON_CORPSE_TIMED_DESPAWN, uint32 delay = 60000) { return _doSummon(FindSpellIDX(SpellID), type, delay); @@ -182,6 +188,8 @@ class MANGOS_DLL_DECL BossSpellWorker bool _doRemove(uint8 m_uiSpellIdx, Unit* pTarget = NULL); + bool _hasAura(uint8 m_uiSpellIdx, Unit* pTarget); + void _fillEmptyDataField(); // Constants from CreatureAI() diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp index c0a1028ce..67abf9830 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp @@ -331,6 +331,7 @@ struct MANGOS_DLL_DECL mob_frost_sphereAI : public ScriptedAI ScriptedInstance* m_pInstance; BossSpellWorker* bsw; + bool striked; void Reset() { @@ -339,22 +340,26 @@ struct MANGOS_DLL_DECL mob_frost_sphereAI : public ScriptedAI m_creature->SetSpeedRate(MOVE_RUN, 0.1f); m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); m_creature->GetMotionMaster()->MoveRandom(); + striked = false; } void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) { if (!m_creature || !m_creature->isAlive()) return; - if(pDoneBy->GetTypeId() != TYPEID_PLAYER) return; - - uiDamage = m_creature->GetHealth(); - bsw->doCast(SPELL_PERMAFROST); + striked = true; } void UpdateAI(const uint32 uiDiff) { if (m_pInstance && m_pInstance->GetData(TYPE_ANUBARAK) != IN_PROGRESS) - m_creature->ForcedDespawn(); + m_creature->ForcedDespawn(); + + if (!striked) return; + + bsw->doCast(SPELL_PERMAFROST); +// m_creature->ForcedDespawn(); + } }; @@ -379,7 +384,11 @@ struct MANGOS_DLL_DECL mob_anubarak_spikeAI : public ScriptedAI m_creature->SetRespawnDelay(DAY); bsw = new BossSpellWorker(this); m_creature->SetSpeedRate(MOVE_RUN, 0.5f); - bsw->doCast(SPELL_IMPALE); + m_creature->SetDisplayId(31224); +// m_creature->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.5f); +// bsw->doCast(SPELL_IMPALE); +// m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); +// m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } void Aggro(Unit *who) @@ -391,8 +400,15 @@ struct MANGOS_DLL_DECL mob_anubarak_spikeAI : public ScriptedAI { if (m_pInstance && m_pInstance->GetData(TYPE_ANUBARAK) != IN_PROGRESS) m_creature->ForcedDespawn(); + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + + if (m_creature->IsWithinDist(m_creature->getVictim(), 10.0f) + && !bsw->hasAura(SPELL_PERMAFROST,m_creature->getVictim())) + { + bsw->doCast(SPELL_IMPALE); + } else bsw->doRemove(SPELL_IMPALE); } }; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index abd32ae77..222220669 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -352,6 +352,7 @@ struct MANGOS_DLL_DECL boss_lich_king_tocAI : public ScriptedAI pPortal = m_creature->SummonCreature(NPC_TRIGGER, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); pPortal->SetRespawnDelay(DAY); pPortal->CastSpell(pPortal, 51807, false); + pPortal->SetDisplayId(17612); } void AttackStart(Unit *who) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index ad5346e9d..f3e859ecd 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -29,7 +29,7 @@ enum NPC_THRALL = 34994, NPC_PROUDMOORE = 34992, - NPC_PORTAL = 1, + NPC_PORTAL = 19224, NPC_TRIGGER = 22517, NPC_ICEHOWL = 34797, From 329565c361826086d5f9fcc5018ce0fbf961c2db Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Fri, 9 Apr 2010 17:17:33 +0400 Subject: [PATCH 225/405] TOC part 39 - anubarak finished, small changes --- addition/724_trial_of_crusader_mangos.sql | 10 +---- addition/724_trial_of_crusader_scriptdev2.sql | 6 +-- ...rial_of_crusader_spelltable_scriptdev2.sql | 6 +-- .../boss_anubarak_trial.cpp | 45 ++++++++----------- .../boss_northrend_beasts.cpp | 2 +- .../boss_twin_valkyr.cpp | 3 +- 6 files changed, 28 insertions(+), 44 deletions(-) mode change 100755 => 100644 addition/724_trial_of_crusader_scriptdev2.sql diff --git a/addition/724_trial_of_crusader_mangos.sql b/addition/724_trial_of_crusader_mangos.sql index 4373f6c93..3ddb271ef 100644 --- a/addition/724_trial_of_crusader_mangos.sql +++ b/addition/724_trial_of_crusader_mangos.sql @@ -84,14 +84,8 @@ UPDATE `creature_template` SET `npcflag`=1, `scriptname`='mob_dark_essence', `AI UPDATE `creature_template` SET `scriptname`='boss_anubarak_trial', `AIName` ='' WHERE `entry`=34564; DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (34606, 34605, 34607, 34564, 34660); --- UPDATE `creature_template` SET `modelid_A` = 25144, `modelid_A2` = 0, `modelid_H` = 25144, `modelid_H2` = 0, `faction_A` = 16, `faction_H` = 16, `AIName` = '', `ScriptName` = 'mob_frost_sphere' WHERE `entry` = 34606; +UPDATE `creature_template` SET `modelid_A` = 25144, `modelid_A2` = 0, `modelid_H` = 25144, `modelid_H2` = 0, `faction_A` = 14, `faction_H` = 14, `AIName` = '', `ScriptName` = 'mob_frost_sphere' WHERE `entry` = 34606; UPDATE `creature_template` SET `scriptname`='mob_swarm_scarab', `AIName` ='' WHERE `entry`=34605; UPDATE `creature_template` SET `scriptname`='mob_nerubian_borrower', `AIName` ='' WHERE `entry`=34607; -UPDATE `creature_template` SET `scriptname`='mob_anubarak_spike', `minhealth`= 1, `maxhealth` = 1, `faction_A` = 14, `faction_H` = 14, `modelid_A2` = 0, `minlevel` = 80, `type_flags` =0, `maxlevel` = 80, `AIName` ='' WHERE `entry`=34660; +UPDATE `creature_template` SET `scriptname`='mob_anubarak_spike', `faction_A` = 14, `minlevel` = 80, `maxlevel` = 80,`faction_H` = 14, `AIName` ='' WHERE `entry`=34660; -UPDATE `creature_template` SET `modelid_A` = 25144, `modelid_A2` = 0, `modelid_H` = 25144, `modelid_H2` = 0, `faction_A` = 16, `faction_H` = 16, `AIName` = 'EventAI', `ScriptName` = '' WHERE `entry` = 34606; -INSERT INTO `creature_ai_scripts` (`id`, `creature_id`, `event_type`, `event_inverse_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action1_type`, `action1_param1`, `action1_param2`, `action1_param3`, `action2_type`, `action2_param1`, `action2_param2`, `action2_param3`, `action3_type`, `action3_param1`, `action3_param2`, `action3_param3`, `comment`) VALUES -(3460651, 34606, 0, 0, 101, 3, 1000, 15000, 60000, 60000, 11, 66193, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 'Frost Sphere - Permafrost'), -(3460654, 34606, 0, 0, 101, 5, 1000, 15000, 60000, 60000, 11, 67855, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 'Frost Sphere - Permafrost'), -(3460652, 34606, 0, 0, 101, 9, 1000, 15000, 60000, 60000, 11, 67856, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 'Frost Sphere - Permafrost'), -(3460653, 34606, 0, 0, 101, 16, 1000, 15000, 60000, 60000, 11, 67857, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 'Frost Sphere - Permafrost'); diff --git a/addition/724_trial_of_crusader_scriptdev2.sql b/addition/724_trial_of_crusader_scriptdev2.sql old mode 100755 new mode 100644 index a4c713530..b8c56d41a --- a/addition/724_trial_of_crusader_scriptdev2.sql +++ b/addition/724_trial_of_crusader_scriptdev2.sql @@ -67,12 +67,12 @@ INSERT INTO `script_texts` ('34564','16234','-1713555','Это место станет вашей могилой!','3','0','0','This place will serve as your tomb!'), ('34564','16240','-1713556','Ауум на-л ак-к-к-к, ишшш. Вставайте, слуги мои. Время пожирать...','6','0','0','Auum na-l ak-k-k-k, isshhh. Rise, minions. Devour...'), ('34564','0','-1713557','%s зарывается в землю!','3','0','0','%S buries itself in the earth!'), -('34660','0','-1713558','Шипы Ануб-Арака преследуют |3-3($s)!','3','0','0','Anub-Arak spikes pursuing |3-3($s)!'), +('34660','0','-1713558','Шипы %s преследуют $n!','3','0','0','%s spikes pursuing $n!'), ('34564','0','-1713559','%s вылезает на поверхность!','3','0','0','%S getting out of the ground!'), ('34564','16241','-1713560','Стая поглотит вас!','6','0','0','The swarm shall overtake you!'), ('34564','0','-1713561','%s выпускает рой жуков-трупоедов, чтобы восстановить здоровье!','3','0','0','%S produces a swarm of beetles Peon to restore your health!'), ('34564','16236','-1713562','Ф-лаккх шир!','6','0','0','F-lakkh shir!'), ('34564','16237','-1713563','Еще одна душа накормит хозяина.','6','0','0','Another soul to sate the host.'), ('34564','16238','-1713564','Я подвел тебя, господин...','6','0','0','I have failed you, master...'), -('36095','0','-1713565','Чемпионы, вы прошли испытание великого крестоносца! Знайте, что только самые сильные искатели приключений могли рассчитывать завершить это испытание.','3','0','0','Champions, you are alive! Not only have you defeated every challenge of the Trial of the Crusader, but thwarted Arthas directly! Your skill and cunning will prove to be a powerful weapon against the Scourge. Well done! Allow one of my mages to transport you back to the surface!'), -('36095','0','-1713566','Позвольте вручить вам эти сундуки в качестве заслуженной награды, и пусть его содержимое послужит вам верой и правдой в походе против Артаса в самом центре Цитадели Ледяной Короны!','3','0','0','Let me hand you the chests as a reward, and let its contents will serve you faithfully in the campaign against Arthas in the heart of the Icecrown Citadel!'); +('36095','0','-1713565','Чемпионы, вы прошли испытание великого крестоносца! Знайте, что только самые сильные искатели приключений могли рассчитывать завершить это испытание.','6','0','0','Champions, you are alive! Not only have you defeated every challenge of the Trial of the Crusader, but thwarted Arthas directly! Your skill and cunning will prove to be a powerful weapon against the Scourge. Well done! Allow one of my mages to transport you back to the surface!'), +('36095','0','-1713566','Позвольте вручить вам эти сундуки в качестве заслуженной награды, и пусть его содержимое послужит вам верой и правдой в походе против Артаса в самом центре Цитадели Ледяной Короны!','6','0','0','Let me hand you the chests as a reward, and let its contents will serve you faithfully in the campaign against Arthas in the heart of the Icecrown Citadel!'); diff --git a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql index 12081dc1d..00192a887 100644 --- a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql +++ b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql @@ -50,12 +50,12 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ -- Cold sphere INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES -(34606, 66193, 67855, 67856, 67857, 5000, 0, 0, 0, 5000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL); +(34606, 66193, 67855, 67856, 67857, 5000, 0, 0, 0, 5000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL); -- Anub'arak spike INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES -(34660, 66193, 67855, 67856, 67857, 5000, 0, 0, 0, 5000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), -(34660, 65920, 65921, 65922, 65923, 10000, 10000, 10000, 10000, 15000, 15000, 15000, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL); +(34660, 66193, 67855, 67856, 67857, 1000, 0, 0, 0, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34660, 65920, 65921, 65922, 65923, 1000, 0, 0, 0, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL); -- Nerubian Borrower INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp index 67abf9830..8f71be025 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp @@ -116,8 +116,9 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI void Aggro(Unit* pWho) { -// CastBossSpell(SPELL_MARK); if (!intro) DoScriptText(-1713555,m_creature); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); m_creature->SetInCombatWithZone(); m_pInstance->SetData(TYPE_ANUBARAK, IN_PROGRESS); } @@ -148,11 +149,14 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI case 2: { if (bsw->timedQuery(SPELL_SPIKE_CALL, uiDiff)) { pTarget = bsw->SelectUnit(); - bsw->doCast(SPELL_SPIKE_CALL); - bsw->doCast(SPELL_MARK,pTarget); - Unit* spike = bsw->doSummon(NPC_SPIKE,TEMPSUMMON_TIMED_DESPAWN,20000); - spike->AddThreat(pTarget, 1000.0f); - DoScriptText(-1713558,pTarget); +// bsw->doCast(SPELL_SPIKE_CALL); + Unit* spike = bsw->doSummon(NPC_SPIKE,TEMPSUMMON_TIMED_DESPAWN,60000); +// Creature* spike = GetClosestCreatureWithEntry(m_creature, NPC_SPIKE, 50.0f); + if (spike) { spike->AddThreat(pTarget, 1000.0f); + DoScriptText(-1713558,m_creature,pTarget); + bsw->doCast(SPELL_MARK,pTarget); + spike->GetMotionMaster()->MoveChase(pTarget); + } }; if (bsw->timedQuery(SPELL_SUMMON_BEATLES, uiDiff)) { bsw->doCast(SPELL_SUMMON_BEATLES); @@ -331,7 +335,6 @@ struct MANGOS_DLL_DECL mob_frost_sphereAI : public ScriptedAI ScriptedInstance* m_pInstance; BossSpellWorker* bsw; - bool striked; void Reset() { @@ -340,26 +343,17 @@ struct MANGOS_DLL_DECL mob_frost_sphereAI : public ScriptedAI m_creature->SetSpeedRate(MOVE_RUN, 0.1f); m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); m_creature->GetMotionMaster()->MoveRandom(); - striked = false; } - void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + void EnterCombat(Unit* attacker) { - if (!m_creature || !m_creature->isAlive()) - return; - striked = true; + bsw->doCast(SPELL_PERMAFROST); } void UpdateAI(const uint32 uiDiff) { - if (m_pInstance && m_pInstance->GetData(TYPE_ANUBARAK) != IN_PROGRESS) + if (!m_pInstance || m_pInstance->GetData(TYPE_ANUBARAK) != IN_PROGRESS) m_creature->ForcedDespawn(); - - if (!striked) return; - - bsw->doCast(SPELL_PERMAFROST); -// m_creature->ForcedDespawn(); - } }; @@ -384,16 +378,14 @@ struct MANGOS_DLL_DECL mob_anubarak_spikeAI : public ScriptedAI m_creature->SetRespawnDelay(DAY); bsw = new BossSpellWorker(this); m_creature->SetSpeedRate(MOVE_RUN, 0.5f); - m_creature->SetDisplayId(31224); -// m_creature->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.5f); -// bsw->doCast(SPELL_IMPALE); -// m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); // m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } void Aggro(Unit *who) { if (!m_pInstance) return; + bsw->doCast(SPELL_IMPALE); } void UpdateAI(const uint32 uiDiff) @@ -401,14 +393,13 @@ struct MANGOS_DLL_DECL mob_anubarak_spikeAI : public ScriptedAI if (m_pInstance && m_pInstance->GetData(TYPE_ANUBARAK) != IN_PROGRESS) m_creature->ForcedDespawn(); - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (m_creature->IsWithinDist(m_creature->getVictim(), 10.0f) +/* if (bsw->timedQuery(SPELL_IMPALE,uiDiff)) { + if (m_creature->IsWithinDist(m_creature->getVictim(), 4.0f) && !bsw->hasAura(SPELL_PERMAFROST,m_creature->getVictim())) { bsw->doCast(SPELL_IMPALE); } else bsw->doRemove(SPELL_IMPALE); + }*/ } }; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index d2d85375e..4af34db17 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -555,7 +555,7 @@ struct MANGOS_DLL_DECL boss_icehowlAI : public ScriptedAI break; } case 1: { - if (bsw->doCast(SPELL_MASSIVE_CRASH) == CAST_OK); + if (bsw->doCast(SPELL_MASSIVE_CRASH) == CAST_OK) stage = 2; break; } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp index 407390142..b0dd3c346 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp @@ -315,8 +315,7 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI m_pInstance->SetData(DATA_CASTING_EYDIS, SPELL_DARK_VORTEX); DoScriptText(-1713540,m_creature); bsw->doCast(SPELL_DARK_VORTEX); - if (m_creature->GetHealthPercent() <= 30.0f) stage == 2; - else stage = 0; + stage = 0; }; break; case 2: From c56558a7b2917194073951da4b24e27a8ce6437a Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sat, 10 Apr 2010 18:03:45 +0400 Subject: [PATCH 226/405] Restore sql header --- addition/724_trial_of_crusader_scriptdev2.sql | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/addition/724_trial_of_crusader_scriptdev2.sql b/addition/724_trial_of_crusader_scriptdev2.sql index b8c56d41a..9b8eaa8ce 100644 --- a/addition/724_trial_of_crusader_scriptdev2.sql +++ b/addition/724_trial_of_crusader_scriptdev2.sql @@ -1,4 +1,8 @@ -DELETE FROM `script_texts` WHERE `entry` BETWEEN -1713799 AND -1713499; +-- TOC original texts/sounds (thanks to griffonheart) +-- english translation by Cristy +-- reworked by rsa + +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1713799 AND -1713499; INSERT INTO `script_texts` (`comment`,`sound`, `entry`,`content_loc8`,`type`,`language`,`emote`,`content_default`) VALUES ('34996','16036','-1713500','Добро пожаловать, герои! Вы услышали призыв Серебряного Авангарда и без колебаний откликнулись на него! В этом колизее вам предстоит сразиться с опаснейшими противниками. Те из вас, кто смогут пережить испытания, войдут в ряды Серебряного Авангарда, который направится в Цитадель Ледяной Короны.','6','0','0','Welcome champions, you have heard the call of the argent crusade and you have boldly answered. It is here in the crusaders coliseum that you will face your greatest challenges. Those of you who survive the rigors of the coliseum will join the Argent Crusade on its marsh to ice crown citadel.'), From 19f79503ce21728cfcd23c3024174ac26d55733e Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sun, 11 Apr 2010 12:05:14 +0400 Subject: [PATCH 227/405] Move new BossSpellWorker() in more reliable point. Thanks to Dron01 --- .../trial_of_the_crusader/boss_anubarak_trial.cpp | 10 +++++----- .../trial_of_the_crusader/boss_jaraxxus.cpp | 8 ++++---- .../trial_of_the_crusader/boss_northrend_beasts.cpp | 12 ++++++------ .../trial_of_the_crusader/boss_twin_valkyr.cpp | 4 ++-- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp index 8f71be025..172119a8e 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp @@ -67,6 +67,7 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI boss_anubarak_trialAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); Reset(); } @@ -81,7 +82,6 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI if(!m_pInstance) return; stage = 0; intro = true; - bsw = new BossSpellWorker(this); m_creature->SetRespawnDelay(DAY); } @@ -202,6 +202,7 @@ struct MANGOS_DLL_DECL mob_swarm_scarabAI : public ScriptedAI mob_swarm_scarabAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); Reset(); } @@ -212,7 +213,6 @@ struct MANGOS_DLL_DECL mob_swarm_scarabAI : public ScriptedAI { m_creature->SetInCombatWithZone(); m_creature->SetRespawnDelay(DAY); - bsw = new BossSpellWorker(this); } void KilledUnit(Unit* pVictim) @@ -255,6 +255,7 @@ struct MANGOS_DLL_DECL mob_nerubian_borrowerAI : public ScriptedAI mob_nerubian_borrowerAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); Reset(); } @@ -268,7 +269,6 @@ struct MANGOS_DLL_DECL mob_nerubian_borrowerAI : public ScriptedAI m_creature->SetInCombatWithZone(); m_creature->SetRespawnDelay(DAY); submerged = false; - bsw = new BossSpellWorker(this); } void KilledUnit(Unit* pVictim) @@ -330,6 +330,7 @@ struct MANGOS_DLL_DECL mob_frost_sphereAI : public ScriptedAI mob_frost_sphereAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); Reset(); } @@ -339,7 +340,6 @@ struct MANGOS_DLL_DECL mob_frost_sphereAI : public ScriptedAI void Reset() { m_creature->SetRespawnDelay(DAY); - bsw = new BossSpellWorker(this); m_creature->SetSpeedRate(MOVE_RUN, 0.1f); m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); m_creature->GetMotionMaster()->MoveRandom(); @@ -367,6 +367,7 @@ struct MANGOS_DLL_DECL mob_anubarak_spikeAI : public ScriptedAI mob_anubarak_spikeAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); Reset(); } @@ -376,7 +377,6 @@ struct MANGOS_DLL_DECL mob_anubarak_spikeAI : public ScriptedAI void Reset() { m_creature->SetRespawnDelay(DAY); - bsw = new BossSpellWorker(this); m_creature->SetSpeedRate(MOVE_RUN, 0.5f); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); // m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp index f96edfe2d..0ca4fa929 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp @@ -70,6 +70,7 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI boss_jaraxxusAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); Reset(); } @@ -95,7 +96,6 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI m_portalsCount = 1; m_volcanoCount = 4; } - bsw = new BossSpellWorker(this); DoScriptText(-1713517,m_creature); m_creature->SetRespawnDelay(DAY); } @@ -247,6 +247,7 @@ struct MANGOS_DLL_DECL mob_infernal_volcanoAI : public ScriptedAI mob_infernal_volcanoAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); Reset(); } @@ -271,7 +272,6 @@ struct MANGOS_DLL_DECL mob_infernal_volcanoAI : public ScriptedAI m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); m_Count = 6; } - bsw = new BossSpellWorker(this); } void AttackStart(Unit *who) @@ -320,6 +320,7 @@ struct MANGOS_DLL_DECL mob_fel_infernalAI : public ScriptedAI mob_fel_infernalAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); Reset(); } @@ -330,7 +331,6 @@ struct MANGOS_DLL_DECL mob_fel_infernalAI : public ScriptedAI { m_creature->SetInCombatWithZone(); m_creature->SetRespawnDelay(DAY); - bsw = new BossSpellWorker(this); } void KilledUnit(Unit* pVictim) @@ -445,6 +445,7 @@ struct MANGOS_DLL_DECL mob_mistress_of_painAI : public ScriptedAI mob_mistress_of_painAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); Reset(); } @@ -455,7 +456,6 @@ struct MANGOS_DLL_DECL mob_mistress_of_painAI : public ScriptedAI { m_creature->SetInCombatWithZone(); m_creature->SetRespawnDelay(DAY); - bsw = new BossSpellWorker(this); } void KilledUnit(Unit* pVictim) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index 4af34db17..97f5fd6f9 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -89,6 +89,7 @@ struct MANGOS_DLL_DECL boss_gormokAI : public ScriptedAI boss_gormokAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); Reset(); } @@ -99,7 +100,6 @@ struct MANGOS_DLL_DECL boss_gormokAI : public ScriptedAI void Reset() { if(!m_pInstance) return; - bsw = new BossSpellWorker(this); SetEquipmentSlots(false, EQUIP_MAIN, EQUIP_OFFHAND, EQUIP_RANGED); m_creature->SetRespawnDelay(DAY); m_creature->SetInCombatWithZone(); @@ -153,6 +153,7 @@ struct MANGOS_DLL_DECL mob_snobold_vassalAI : public ScriptedAI mob_snobold_vassalAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); Reset(); } @@ -163,7 +164,6 @@ struct MANGOS_DLL_DECL mob_snobold_vassalAI : public ScriptedAI void Reset() { - bsw = new BossSpellWorker(this); m_creature->SetInCombatWithZone(); m_creature->SetRespawnDelay(DAY); pBoss = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_GORMOK)); @@ -218,6 +218,7 @@ struct MANGOS_DLL_DECL boss_acidmawAI : public ScriptedAI boss_acidmawAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); Reset(); } @@ -231,7 +232,6 @@ struct MANGOS_DLL_DECL boss_acidmawAI : public ScriptedAI stage = 1; enraged = false; m_creature->SetInCombatWithZone(); - bsw = new BossSpellWorker(this); m_creature->SetRespawnDelay(DAY); } @@ -328,6 +328,7 @@ struct MANGOS_DLL_DECL boss_dreadscaleAI : public ScriptedAI boss_dreadscaleAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); Reset(); } @@ -341,7 +342,6 @@ struct MANGOS_DLL_DECL boss_dreadscaleAI : public ScriptedAI stage = 0; enraged = false; m_creature->SetInCombatWithZone(); - bsw = new BossSpellWorker(this); m_creature->SetRespawnDelay(DAY); } @@ -438,6 +438,7 @@ struct MANGOS_DLL_DECL mob_slime_poolAI : public ScriptedAI mob_slime_poolAI(Creature *pCreature) : ScriptedAI(pCreature) { m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + bsw = new BossSpellWorker(this); Reset(); } @@ -450,7 +451,6 @@ struct MANGOS_DLL_DECL mob_slime_poolAI : public ScriptedAI m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->SetInCombatWithZone(); m_creature->SetSpeedRate(MOVE_RUN, 0.08f); - bsw = new BossSpellWorker(this); bsw->doCast(SPELL_SLIME_POOL_2); m_Size = m_creature->GetFloatValue(OBJECT_FIELD_SCALE_X); } @@ -478,6 +478,7 @@ struct MANGOS_DLL_DECL boss_icehowlAI : public ScriptedAI boss_icehowlAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); Reset(); } @@ -491,7 +492,6 @@ struct MANGOS_DLL_DECL boss_icehowlAI : public ScriptedAI void Reset() { if(!m_pInstance) return; - bsw = new BossSpellWorker(this); m_creature->SetRespawnDelay(DAY); MovementStarted = false; stage = 0; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp index b0dd3c346..55f9cda09 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp @@ -74,6 +74,7 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI boss_fjolaAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); Reset(); } @@ -85,7 +86,6 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI void Reset() { if(!m_pInstance) return; SetEquipmentSlots(false, EQUIP_MAIN_1, EQUIP_OFFHAND_1, EQUIP_RANGED_1); - bsw = new BossSpellWorker(this); m_creature->SetRespawnDelay(DAY); stage = 1; TwinPactCasted = false; @@ -225,6 +225,7 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI boss_eydisAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); Reset(); } @@ -237,7 +238,6 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI { if(!m_pInstance) return; SetEquipmentSlots(false, EQUIP_MAIN_2, EQUIP_OFFHAND_2, EQUIP_RANGED_2); - bsw = new BossSpellWorker(this); m_creature->SetRespawnDelay(DAY); stage = 0; TwinPactCasted = false; From 5677b85b2005d13a54197a2bd529d1d1586762b7 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Mon, 12 Apr 2010 19:12:24 +0400 Subject: [PATCH 228/405] TOC part 39 - Champions started (not fully finished!) --- addition/724_trial_of_crusader_mangos.sql | 28 +- ...rial_of_crusader_spelltable_scriptdev2.sql | 89 + include/sc_boss_spell_worker.cpp | 20 + include/sc_boss_spell_worker.h | 4 + .../boss_anubarak_trial.cpp | 3 +- .../boss_faction_champions.cpp | 1641 ++++++++++++++++- .../trial_of_the_crusader.h | 1 + system/ScriptLoader.cpp | 2 + 8 files changed, 1771 insertions(+), 17 deletions(-) diff --git a/addition/724_trial_of_crusader_mangos.sql b/addition/724_trial_of_crusader_mangos.sql index 3ddb271ef..6789774d5 100644 --- a/addition/724_trial_of_crusader_mangos.sql +++ b/addition/724_trial_of_crusader_mangos.sql @@ -13,19 +13,23 @@ UPDATE `creature_template` SET `scriptname`='npc_garrosh_toc' WHERE `entry`=3499 UPDATE `creature_template` SET `scriptname`='npc_rinn_toc' WHERE `entry`=34990; -- grand crusaders --- UPDATE `creature_template` SET `scriptname`='mob_toc_warrior' WHERE entry IN (); --- UPDATE `creature_template` SET `scriptname`='mob_toc_mage' WHERE entry IN (); --- UPDATE `creature_template` SET `scriptname`='mob_toc_shaman' WHERE entry IN (); --- UPDATE `creature_template` SET `scriptname`='mob_toc_hunter' WHERE entry IN (); --- UPDATE `creature_template` SET `scriptname`='mob_toc_rogue' WHERE entry IN (); --- UPDATE `creature_template` SET `scriptname`='mob_toc_priest' WHERE entry IN (); --- UPDATE `creature_template` SET `scriptname`='mob_toc_dk' WHERE entry IN (); --- UPDATE `creature_template` SET `scriptname`='mob_toc_paladin' WHERE entry IN (); --- UPDATE `creature_template` SET `scriptname`='mob_toc_druid' WHERE entry IN (); --- UPDATE `creature_template` SET `scriptname`='mob_toc_warlock' WHERE entry IN (); +-- UPDATE `creature_template` SET `scriptname`='mob_toc_warrior' WHERE `entry` IN (34475,34453); +-- UPDATE `creature_template` SET `scriptname`='mob_toc_mage' WHERE `entry` IN (34468,34449); +-- UPDATE `creature_template` SET `scriptname`='mob_toc_shaman' WHERE `entry` IN (34463,34455); +-- UPDATE `creature_template` SET `scriptname`='mob_toc_enh_shaman' WHERE `entry` IN (34470,34444); +-- UPDATE `creature_template` SET `scriptname`='mob_toc_hunter' WHERE `entry` IN (34467,34448); +-- UPDATE `creature_template` SET `scriptname`='mob_toc_rogue' WHERE `entry` IN (34472,34454); +-- UPDATE `creature_template` SET `scriptname`='mob_toc_priest' WHERE `entry` IN (34466,34456); +-- UPDATE `creature_template` SET `scriptname`='mob_toc_shadow_priest' WHERE `entry` IN (34473,34441); +-- UPDATE `creature_template` SET `scriptname`='mob_toc_dk' WHERE `entry` IN (34461,34458); +-- UPDATE `creature_template` SET `scriptname`='mob_toc_paladin' WHERE `entry` IN (34465,34445); +UPDATE `creature_template` SET `scriptname`='mob_toc_retro_paladin' WHERE `entry` IN (34471,34456); +UPDATE `creature_template` SET `scriptname`='mob_toc_druid' WHERE `entry` IN (34460,34451); +-- UPDATE `creature_template` SET `scriptname`='mob_toc_boomkin' WHERE `entry` IN (34469,34459); +-- UPDATE `creature_template` SET `scriptname`='mob_toc_warlock' WHERE `entry` IN (34474,34450); --- UPDATE `creature_template` SET `scriptname`='mob_toc_pet_cat' WHERE `entry` = 35465; --- UPDATE `creature_template` SET `scriptname`='mob_toc_pet_dog' WHERE `entry` = 35610; +UPDATE `creature_template` SET `scriptname`='mob_toc_pet_warlock' WHERE `entry` IN (35465); +UPDATE `creature_template` SET `scriptname`='mob_toc_pet_hunter' WHERE `entry` IN (35610); UPDATE `creature_template` SET `lootid`= 0 WHERE `entry` IN (34460,34463,34461,34471,34475,34472,34453,34455,34458,34454,34451,34456,34467,35465,34468,35610,34473,34474,34441,34449,34448,34450); diff --git a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql index 00192a887..d2a933288 100644 --- a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql +++ b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql @@ -153,3 +153,92 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ (35176, 66881, 67638, 67639, 67640, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL), (35176, 66883, 67641, 67642, 67643, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), (35176, 66882, 0, 0, 0, 500, 0, 0, 0, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL); + +-- Retro Paladins +DELETE FROM `boss_spell_table` WHERE `entry` IN (34471,34456); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34471, 66011, 0, 180000, 180000, 3), +(34471, 66003, 0, 6000, 18000, 3), +(34471, 66010, 0, 300000, 300000, 1), +(34471, 66006, 0, 10000, 10000, 3), +(34471, 66007, 0, 40000, 40000, 3), +(34471, 66009, 0, 300000, 300000, 1), +(34471, 66005, 68018, 8000, 15000, 3), +(34471, 66008, 0, 60000, 60000, 4), +(34471, 66004, 68021, 10000, 15000, 1); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34456, 66011, 0, 180000, 180000, 3), +(34456, 66003, 0, 6000, 18000, 3), +(34456, 66010, 0, 300000, 300000, 1), +(34456, 66006, 0, 10000, 10000, 3), +(34456, 66007, 0, 40000, 40000, 3), +(34456, 66009, 0, 300000, 300000, 1), +(34456, 66005, 68018, 8000, 15000, 3), +(34456, 66008, 0, 60000, 60000, 4), +(34456, 66004, 68021, 10000, 15000, 1); + +-- Pet's +DELETE FROM `boss_spell_table` WHERE `entry` IN (35465,35610); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(35465, 67518, 0, 15000, 30000, 3), +(35465, 67519, 0, 15000, 30000, 3); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(35610, 67793, 67980, 67981, 67982, 5000, 10000, 3); + +-- Druids +DELETE FROM `boss_spell_table` WHERE `entry` IN (34460,34451); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(35460, 66093, 67957, 10000, 20000, 6), +(35460, 66066, 67965, 10000, 20000, 6), +(35460, 66067, 67968, 10000, 20000, 6), +(35460, 66065, 67971, 10000, 20000, 6), +(35460, 66086, 67974, 40000, 90000, 1), +(35460, 65860, 0, 45000, 90000, 1), +(35460, 66068, 0, 15000, 30000, 6), +(35460, 66071, 0, 40000, 80000, 1); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34451, 66093, 67957, 10000, 20000, 6), +(34451, 66066, 67965, 10000, 20000, 6), +(34451, 66067, 67968, 10000, 20000, 6), +(34451, 66065, 67971, 10000, 20000, 6), +(34451, 66086, 67974, 40000, 90000, 1), +(34451, 65860, 0, 45000, 90000, 1), +(34451, 66068, 0, 15000, 30000, 6), +(34451, 66071, 0, 40000, 80000, 1); + +-- Warriors +DELETE FROM `boss_spell_table` WHERE `entry` IN (34475,34453); + +-- Mage +DELETE FROM `boss_spell_table` WHERE `entry` IN (34468,34449); + +-- Shaman +DELETE FROM `boss_spell_table` WHERE `entry` IN (34463,34455); + +-- Enh shaman +DELETE FROM `boss_spell_table` WHERE `entry` IN (34470,34444); + +-- Hunter +DELETE FROM `boss_spell_table` WHERE `entry` IN (34467,34448); + +-- Rogue +DELETE FROM `boss_spell_table` WHERE `entry` IN (34472,34454); + +-- Priest +DELETE FROM `boss_spell_table` WHERE `entry` IN (34466,34456); + +-- Shadow priest +DELETE FROM `boss_spell_table` WHERE `entry` IN (34473,34441); + +-- Death knight +DELETE FROM `boss_spell_table` WHERE `entry` IN (34461,34458); + +-- Paladin +DELETE FROM `boss_spell_table` WHERE `entry` IN (34465,34445); + +-- Boomkin (druid in moonkin form) +DELETE FROM `boss_spell_table` WHERE `entry` IN (34469,34459); + +-- Warlock +DELETE FROM `boss_spell_table` WHERE `entry` IN (34474,34450); + diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index 940644066..3f35a804e 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -536,4 +536,24 @@ Unit* BossSpellWorker::_SelectUnit(SelectAggroTarget target, uint32 uiPosition) return NULL; } +Unit* BossSpellWorker::SelectLowHPFriendly(float fRange, uint32 uiMinHPDiff) +{ + CellPair p(MaNGOS::ComputeCellPair(boss->GetPositionX(), boss->GetPositionY())); + Cell cell(p); + cell.data.Part.reserved = ALL_DISTRICT; + cell.SetNoCreate(); + + Unit* pUnit = NULL; + + MaNGOS::MostHPMissingInRange u_check(boss, fRange, uiMinHPDiff); + MaNGOS::UnitLastSearcher searcher(boss, pUnit, u_check); + + TypeContainerVisitor, GridTypeMapContainer > grid_unit_searcher(searcher); + + cell.Visit(p, grid_unit_searcher, *(pMap), *boss, fRange); + + return pUnit; +} + + #endif \ No newline at end of file diff --git a/include/sc_boss_spell_worker.h b/include/sc_boss_spell_worker.h index 32e4a9d0a..0f63e6c69 100644 --- a/include/sc_boss_spell_worker.h +++ b/include/sc_boss_spell_worker.h @@ -42,6 +42,8 @@ enum BossSpellTableParameters SUMMON_INSTANT = 10, SUMMON_TEMP = 11, CAST_ON_ALLPLAYERS = 12, + CAST_ON_FRENDLY = 13, + CAST_ON_FRENDLY_LOWHP = 14, SPELLTABLEPARM_NUMBER }; @@ -158,6 +160,8 @@ class MANGOS_DLL_DECL BossSpellWorker return _SelectUnit(target, uiPosition); }; + Unit* SelectLowHPFriendly(float fRange = 50.0f, uint32 uiMinHPDiff = 0); + private: BossSpellTableParameters getBSWCastType(uint32 pTemp); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp index 172119a8e..3a6506b69 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp @@ -105,6 +105,7 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI { if (m_pInstance) m_pInstance->SetData(TYPE_ANUBARAK, FAIL); + m_creature->ForcedDespawn(); } void JustDied(Unit* pKiller) @@ -296,7 +297,7 @@ struct MANGOS_DLL_DECL mob_nerubian_borrowerAI : public ScriptedAI bsw->timedCast(SPELL_EXPOSE_WEAKNESS, uiDiff); if (bsw->timedQuery(SPELL_SPIDER_FRENZY, uiDiff)) - if(Creature *pTemp = GetClosestCreatureWithEntry(m_creature, NPC_BURROWER, 50.0f)) + if(Creature* pTemp = GetClosestCreatureWithEntry(m_creature, NPC_BURROWER, 50.0f)) { currentTarget = pTemp; bsw->doCast(SPELL_SPIDER_FRENZY); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp index bb9d39ec5..2556c28d8 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 +/* Copyright (C) 2006 - 2009 ScriptDev2 * 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 @@ -11,15 +11,1648 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* ScriptData SDName: faction_champions -SD%Complete: 0 -SDComment: +SD%Complete: 60% +SDComment: Scripts by Selector, modified by /dev/rsa SDCategory: Crusader Coliseum EndScriptData */ #include "precompiled.h" #include "trial_of_the_crusader.h" + +#define AI_MELEE 0 +#define AI_RANGED 1 +#define AI_HEALER 2 + +#define SPELL_ANTI_AOE 68595 +#define SPELL_PVP_TRINKET 65547 + +struct MANGOS_DLL_DECL boss_faction_championsAI : public ScriptedAI +{ + boss_faction_championsAI(Creature* pCreature, uint32 aitype) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance *) pCreature->GetInstanceData(); + mAIType = aitype; + bsw = new BossSpellWorker(this); + Init(); + } + + ScriptedInstance* m_pInstance; + BossSpellWorker* bsw; + + uint32 mAIType; + uint32 ThreatTimer; + uint32 CCTimer; + + void Init() + { + CCTimer = rand()%10000; + ThreatTimer = 5000; + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_CRUSADERS, FAIL); + m_creature->ForcedDespawn(); + } + + float CalculateThreat(float distance, float armor, uint32 health) + { + float dist_mod = (mAIType == AI_MELEE) ? 15.0f/(15.0f + distance) : 1.0f; + float armor_mod = (mAIType == AI_MELEE) ? armor / 16635.0f : 0.0f; + float eh = (health+1) * (1.0f + armor_mod); + return dist_mod * 30000.0f / eh; + } + + void UpdateThreat() + { + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + ThreatList::const_iterator itr; + bool empty = true; + for(itr = tList.begin(); itr!=tList.end(); ++itr) + { + Unit* pUnit = Unit::GetUnit((*m_creature), (*itr)->getUnitGuid()); + if (pUnit && m_creature->getThreatManager().getThreat(pUnit)) + { + if(pUnit->GetTypeId()==TYPEID_PLAYER) + { + float threat = CalculateThreat(m_creature->GetDistance2d(pUnit), (float)pUnit->GetArmor(), pUnit->GetHealth()); + m_creature->getThreatManager().modifyThreatPercent(pUnit, -100); + m_creature->AddThreat(pUnit, 1000000.0f * threat); + empty = false; + } + } + } + } + + void UpdatePower() + { + if(m_creature->getPowerType() == POWER_MANA) + m_creature->ModifyPower(POWER_MANA, m_creature->GetMaxPower(POWER_MANA) / 3); + //else if(m_creature->getPowerType() == POWER_ENERGY) + // m_creature->ModifyPower(POWER_ENERGY, 100); + } + + void RemoveCC() + { + m_creature->RemoveSpellsCausingAura(SPELL_AURA_MOD_STUN); + m_creature->RemoveSpellsCausingAura(SPELL_AURA_MOD_FEAR); + m_creature->RemoveSpellsCausingAura(SPELL_AURA_MOD_ROOT); + m_creature->RemoveSpellsCausingAura(SPELL_AURA_MOD_PACIFY); + m_creature->RemoveSpellsCausingAura(SPELL_AURA_MOD_CONFUSE); + //DoCast(m_creature, SPELL_PVP_TRINKET); + } + + void JustDied(Unit *killer) + { + if(m_pInstance) m_pInstance->SetData(TYPE_CHAMPIONS_COUNT, m_pInstance->GetData(TYPE_CHAMPIONS_COUNT)-1); + } + + void Aggro(Unit *who) + { + DoCast(m_creature, SPELL_ANTI_AOE, true); + if(m_pInstance) m_pInstance->SetData(TYPE_CRUSADERS, IN_PROGRESS); + } + + void Reset() + { + if(m_pInstance) m_pInstance->SetData(TYPE_CRUSADERS, NOT_STARTED); + } + + Creature* SelectRandomFriendlyMissingBuff(uint32 spell) + { + std::list lst = DoFindFriendlyMissingBuff(40.0f, spell); + std::list::const_iterator itr = lst.begin(); + if(lst.empty()) + return NULL; + advance(itr, rand()%lst.size()); + return (*itr); + } + + Unit* SelectEnemyCaster(bool casting) + { + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + ThreatList::const_iterator iter; + for(iter = tList.begin(); iter!=tList.end(); ++iter) + { + Unit *target; + if(target = Unit::GetUnit((*m_creature),(*iter)->getUnitGuid())) + if(target->getPowerType() == POWER_MANA) + return target; + } + return NULL; + } + + uint32 EnemiesInRange(float distance) + { + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + ThreatList::const_iterator iter; + uint32 count = 0; + for(iter = tList.begin(); iter!=tList.end(); ++iter) + { + Unit *target; + if(target = Unit::GetUnit((*m_creature),(*iter)->getUnitGuid())) + if(m_creature->GetDistance2d(target) < distance) + ++count; + } + return count; + } + + void AttackStart(Unit* pWho) + { + if (!pWho) return; + + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + + if(mAIType==AI_MELEE) + DoStartMovement(pWho); + else + DoStartMovement(pWho, 40.0f); + } + } + + void UpdateAI(const uint32 diff) + { + if(ThreatTimer < diff) + { + UpdatePower(); + UpdateThreat(); + ThreatTimer = 4000; + } + else ThreatTimer -= diff; + + if(CCTimer < diff) + { + RemoveCC(); + CCTimer = 8000+rand()%2000; + } + else CCTimer -= diff; + + if(mAIType == AI_MELEE) DoMeleeAttackIfReady(); + } +}; + +/******************************************************************** + HEALERS +********************************************************************/ + +#define SPELL_LIFEBLOOM 66093 +#define SPELL_NOURISH 66066 +#define SPELL_REGROWTH 66067 +#define SPELL_REJUVENATION 66065 +#define SPELL_TRANQUILITY 66086 +#define SPELL_BARKSKIN 65860 //1 min cd +#define SPELL_THORNS 66068 +#define SPELL_NATURE_GRASP 66071 //1 min cd, self buff + +struct MANGOS_DLL_DECL mob_toc_druidAI : public boss_faction_championsAI +{ + mob_toc_druidAI(Creature* pCreature) : boss_faction_championsAI(pCreature, AI_HEALER) {Init();} + + void UpdateAI(const uint32 diff) + { + if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + + bsw->timedCast(SPELL_NATURE_GRASP, diff); + + bsw->timedCast(SPELL_TRANQUILITY, diff); + + if(bsw->timedQuery(SPELL_BARKSKIN, diff)) + if(m_creature->GetHealthPercent() < 50.0f) + bsw->doCast(SPELL_BARKSKIN); + + if(bsw->timedQuery(SPELL_LIFEBLOOM, diff)) + switch(urand(0,4)) + { + case 0: + if(Unit* target = DoSelectLowestHpFriendly(40.0f)) + bsw->doCast(SPELL_LIFEBLOOM, target); + break; + case 1: + if(Unit* target = DoSelectLowestHpFriendly(40.0f)) + bsw->doCast(SPELL_NOURISH, target); + break; + case 2: + if(Unit* target = DoSelectLowestHpFriendly(40.0f)) + bsw->doCast(SPELL_REGROWTH, target); + break; + case 3: + if(Unit* target = DoSelectLowestHpFriendly(40.0f)) + bsw->doCast(SPELL_REJUVENATION, target); + break; + case 4: + if(Creature* target = SelectRandomFriendlyMissingBuff(SPELL_THORNS)) + bsw->doCast(SPELL_THORNS, target); + break; + } + + boss_faction_championsAI::UpdateAI(diff); + } +}; + +#define SPELL_HEALING_WAVE 66055 +#define H_SPELL_HEALING_WAVE 68115 +#define SPELL_RIPTIDE 66053 +#define H_SPELL_RIPTIDE 68118 +#define SPELL_SPIRIT_CLEANSE 66056 //friendly only +#define SPELL_HEROISM 65983 +#define SPELL_BLOODLUST 65980 +#define SPELL_HEX 66054 +#define SPELL_EARTH_SHIELD 66063 +#define SPELL_EARTH_SHOCK 65973 +#define H_SPELL_EARTH_SHOCK 68100 + +struct MANGOS_DLL_DECL mob_toc_shamanAI : public boss_faction_championsAI +{ + mob_toc_shamanAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_HEALER) {Init();} + + uint32 HeroTimer; + uint32 HexTimer; + uint32 GCDTimer; + + void Init() + { + HeroTimer = 30000 + rand()%30000; + HexTimer = 10000 + rand()%30000; + GCDTimer = 2500; + } + + void UpdateAI(const uint32 diff) + { + if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + + if(HeroTimer < diff) + { + DoCast(m_creature, SPELL_HEROISM); + HeroTimer = 600000; + } + else HeroTimer -= diff; + + if(HexTimer < diff) + { + if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM,1)) + DoCast(target, SPELL_HEX); + HexTimer = 20000 + rand()%20000; + } + else HexTimer -= diff; + + if(GCDTimer < diff) + { + switch(urand(0,5)) + { + case 0: case 1: + if(Unit *target = DoSelectLowestHpFriendly(40.0f)) + DoCast(target, SPELL_HEALING_WAVE); + break; + case 2: + if(Unit *target = DoSelectLowestHpFriendly(40.0f)) + DoCast(target, SPELL_RIPTIDE); + break; + case 3: + if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(target, SPELL_EARTH_SHOCK); + break; + case 4: + if(Unit *target = DoSelectLowestHpFriendly(40.0f)) + DoCast(target, SPELL_SPIRIT_CLEANSE); + break; + case 5: + if(Unit *target = SelectRandomFriendlyMissingBuff(SPELL_EARTH_SHIELD)) + DoCast(target, SPELL_EARTH_SHIELD); + break; + } + GCDTimer = 2000; + } + else GCDTimer -= diff; + + boss_faction_championsAI::UpdateAI(diff); + } +}; + +#define SPELL_HAND_OF_FREEDOM 68757 //25 sec cd +#define SPELL_BUBBLE 66010 //5 min cd +#define SPELL_CLEANSE 66116 +#define SPELL_FLASH_OF_LIGHT 66113 +#define H_SPELL_FLASH_OF_LIGHT 68008 +#define SPELL_HOLY_LIGHT 66112 +#define H_SPELL_HOLY_LIGHT 68011 +#define SPELL_HAND_OF_PROTECTION 66009 +#define SPELL_HOLY_SHOCK 66114 +#define H_SPELL_HOLY_SHOCK 68015 +#define SPELL_HAND_OF_PROTECTION 66009 +#define SPELL_HAMMER_OF_JUSTICE 66613 + +struct MANGOS_DLL_DECL mob_toc_paladinAI : public boss_faction_championsAI +{ + mob_toc_paladinAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_HEALER) {Init();} + + bool BubbleUsed; + bool ProtectionUsed; + uint32 FreedomTimer; + uint32 GCDTimer; + uint32 ShockTimer; + uint32 HammerOfJusticeTimer; + + void Init() + { + GCDTimer = 3000; + ShockTimer = 6000 + rand()%4000; + BubbleUsed = false; + ProtectionUsed = false; + FreedomTimer = 10000 + rand()%15000; + HammerOfJusticeTimer = 15000 + rand()%10000; + } + + void UpdateAI(const uint32 diff) + { + if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + + //cast bubble at 20% hp + if(!BubbleUsed && m_creature->GetHealth()*5 < m_creature->GetMaxHealth()) + { + DoCast(m_creature, SPELL_BUBBLE); + BubbleUsed = true; + } + + if(!ProtectionUsed) + { + if(Unit *target = DoSelectLowestHpFriendly(40.0f)) + { + if(target->GetHealth() * 100 / target->GetMaxHealth() < 15) + { + DoCast(target, SPELL_HAND_OF_PROTECTION); + ProtectionUsed = true; + } + } + } + + if(ShockTimer < diff) + { + if(Unit *target = DoSelectLowestHpFriendly(40.0f)) + { + DoCast (target, SPELL_HOLY_SHOCK); + ShockTimer = 6000 + rand()%4000; + } + else + ShockTimer = 1000; + } + else ShockTimer -=diff; + + if(FreedomTimer < diff) + { + if(Unit *target = SelectRandomFriendlyMissingBuff(SPELL_HAND_OF_FREEDOM)) + DoCast(target, SPELL_HAND_OF_FREEDOM); + FreedomTimer = 25000 + rand()%10000; + } + else FreedomTimer -= diff; + + if(HammerOfJusticeTimer < diff) + { + if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) + { + if(m_creature->GetDistance2d(target) < 15) + { + DoCast(target, SPELL_HAMMER_OF_JUSTICE); + HammerOfJusticeTimer=40000+rand()%5000; + } + else + HammerOfJusticeTimer = 1000; + } + } + else HammerOfJusticeTimer -= diff; + + if(GCDTimer < diff) + { + switch(urand(0,4)) + { + case 0: case 1: + if(Unit *target = DoSelectLowestHpFriendly(40.0f)) + DoCast(target, SPELL_FLASH_OF_LIGHT); + break; + case 2: case 3: + if(Unit *target = DoSelectLowestHpFriendly(40.0f)) + DoCast(target, SPELL_HOLY_LIGHT); + break; + case 4: + if(Unit *target = DoSelectLowestHpFriendly(40.0f)) + DoCast(target, SPELL_CLEANSE); + break; + } + GCDTimer = 2500; + } + else GCDTimer -= diff; + + boss_faction_championsAI::UpdateAI(diff); + } +}; + +#define SPELL_RENEW 66177 +#define H_SPELL_RENEW 68035 +#define SPELL_SHIELD 66099 +#define H_SPELL_SHIELD 68032 +#define SPELL_FLASH_HEAL 66104 +#define H_SPELL_FLASH_HEAL 68023 +#define SPELL_DISPEL 65546 +#define SPELL_PSYCHIC_SCREAM 65543 +#define SPELL_MANA_BURN 66100 +#define H_SPELL_MANA_BURN 68026 + +struct MANGOS_DLL_DECL mob_toc_priestAI : public boss_faction_championsAI +{ + mob_toc_priestAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_HEALER) {Init();} + + uint32 GCDTimer; + uint32 ScreamTimer; + + void Init() + { + GCDTimer = 2500; + ScreamTimer = 5000; + } + + void UpdateAI(const uint32 diff) + { + if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + + if(ScreamTimer < diff) + { + if(EnemiesInRange(10.0f) > 2) + { + DoCast(m_creature, SPELL_PSYCHIC_SCREAM); + ScreamTimer = 30000; + } + else + ScreamTimer = 3000; + } + else ScreamTimer -= diff; + + if(GCDTimer < diff) + { + switch(urand(0,5)) + { + case 0: + if(Unit *target = DoSelectLowestHpFriendly(40.0f)) + DoCast(target, SPELL_RENEW); + break; + case 1: + if(Unit *target = DoSelectLowestHpFriendly(40.0f)) + DoCast(target, SPELL_SHIELD); + break; + case 2: case 3: + if(Unit *target = DoSelectLowestHpFriendly(40.0f)) + DoCast(target, SPELL_FLASH_HEAL); + break; + case 4: + if(Unit *target = urand(0,1) ? SelectUnit(SELECT_TARGET_RANDOM,0) : DoSelectLowestHpFriendly(40.0f)) + DoCast(target, SPELL_DISPEL); + break; + case 5: + if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, SPELL_MANA_BURN); + break; + } + GCDTimer = 2000; + } + else GCDTimer -= diff; + + boss_faction_championsAI::UpdateAI(diff); + } +}; + +/******************************************************************** + RANGED +********************************************************************/ + +#define SPELL_SILENCE 65542 +#define SPELL_VAMPIRIC_TOUCH 65490 +#define H_SPELL_VAMPIRIC_TOUCH 68091 +#define SPELL_SW_PAIN 65541 +#define H_SPELL_SW_PAIN 68088 +#define SPELL_MIND_FLAY 65488 +#define H_SPELL_MIND_FLAY 68042 +#define SPELL_MIND_BLAST 65492 +#define H_SPELL_MIND_BLAST 68038 +#define SPELL_HORROR 65545 +#define SPELL_DISPERSION 65544 +#define SPELL_SHADOWFORM 16592 + +struct MANGOS_DLL_DECL mob_toc_shadow_priestAI : public boss_faction_championsAI +{ + mob_toc_shadow_priestAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_RANGED) {Init();} + + uint32 SilenceTimer; + uint32 PsychicScreamTimer; + uint32 MindBlastTimer; + uint32 GCDTimer; + uint32 DispersionTimer; + + void Init() + { + SilenceTimer = 15000; + PsychicScreamTimer = 8000; + MindBlastTimer = 15000; + GCDTimer = 3000; + DispersionTimer = 1000; + } + + void Aggro(Unit *who) + { + boss_faction_championsAI::Aggro(who); + DoCast(m_creature, SPELL_SHADOWFORM, true); + } + + void UpdateAI(const uint32 diff) + { + if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + + if(PsychicScreamTimer < diff) + { + if(EnemiesInRange(10.0f) > 2) + { + DoCast(m_creature, SPELL_PSYCHIC_SCREAM); + PsychicScreamTimer = 24000; + } + else + PsychicScreamTimer = 3000; + } + else PsychicScreamTimer -= diff; + + if(DispersionTimer < diff) + { + if(m_creature->GetHealth()*5 < m_creature->GetMaxHealth()) + { + DoCast(m_creature, SPELL_DISPERSION); + DispersionTimer = 180000; + } + else DispersionTimer = 1000; + } + else DispersionTimer -= diff; + + if(SilenceTimer < diff) + { + if(Unit *target = SelectEnemyCaster(false)) + DoCast(target, SPELL_SILENCE); + SilenceTimer = 45000; + } + else SilenceTimer -= diff; + + if(MindBlastTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_MIND_BLAST); + MindBlastTimer = 8000; + } + else MindBlastTimer -= diff; + + if(GCDTimer < diff) + { + switch(urand(0,4)) + { + case 0: case 1: + DoCast(m_creature->getVictim(), SPELL_MIND_FLAY); + break; + case 2: + if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, SPELL_VAMPIRIC_TOUCH); + break; + case 3: + if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, SPELL_SW_PAIN); + break; + case 4: + if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, SPELL_DISPEL); + break; + } + GCDTimer = 2000; + } + else GCDTimer -= diff; + + boss_faction_championsAI::UpdateAI(diff); + } +}; + +#define SPELL_HELLFIRE 65816 +#define H_SPELL_HELLFIRE 68146 +#define SPELL_CORRUPTION 65810 +#define H_SPELL_CORRUPTION 68134 +#define SPELL_Curse_of_Agony 65814 +#define H_SPELL_Curse_of_Agony 68137 +#define SPELL_Curse_of_Exhaustion 65815 +#define SPELL_Fear 65809 //8s +#define SPELL_Searing_Pain 65819 +#define H_SPELL_Searing_Pain 68149 +#define SPELL_Shadow_Bolt 65821 +#define H_SPELL_Shadow_Bolt 68152 +#define SPELL_Summon_Felhunter 67514 +#define SPELL_Unstable_Affliction 65812 +#define H_SPELL_Unstable_Affliction 68155 //15s + +struct MANGOS_DLL_DECL mob_toc_warlockAI : public boss_faction_championsAI +{ + mob_toc_warlockAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_RANGED) {Init();} + + uint32 FearTimer; + uint32 UnstableAfflictionTimer; + uint32 HellfireTimer; + uint32 GCDTimer; + + void Init() + { + FearTimer = 4000+rand()%1000; + UnstableAfflictionTimer = 2000+rand()%1000; + HellfireTimer = 15000; + GCDTimer = 2500; + } + + void UpdateAI(const uint32 diff) + { + if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + + if(FearTimer < diff) + { + if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, SPELL_Fear); + FearTimer = 8000; + } + else FearTimer -= diff; + + if(HellfireTimer < diff) + { + if(EnemiesInRange(10.0f) > 2) + { + DoCast(m_creature, SPELL_HELLFIRE); + HellfireTimer = 40000; + } + else + HellfireTimer = 5000; + } + else HellfireTimer -= diff; + + if(UnstableAfflictionTimer < diff) + { + if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, SPELL_Unstable_Affliction); + UnstableAfflictionTimer = 15000; + } + else UnstableAfflictionTimer -= diff; + + if(GCDTimer < diff) + { + switch(urand(0,5)) + { + case 0: + DoCast(m_creature->getVictim(), SPELL_Searing_Pain ); + break; + case 1: case 2: + DoCast(m_creature->getVictim(), SPELL_Shadow_Bolt ); + break; + case 3: + if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, SPELL_CORRUPTION); + break; + case 4: + if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, SPELL_Curse_of_Agony); + break; + case 5: + if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, SPELL_Curse_of_Exhaustion); + break; + } + GCDTimer = 2500; + } + else GCDTimer -= diff; + + boss_faction_championsAI::UpdateAI(diff); + } +}; + +#define SPELL_Arcane_Barrage 65799 //3s +#define H_SPELL_Arcane_Barrage 67995 +#define SPELL_Arcane_Blast 65791 +#define H_SPELL_Arcane_Blast 67998 +#define SPELL_Arcane_Explosion 65800 +#define H_SPELL_Arcane_Explosion 68001 +#define SPELL_Blink 65793 //15s +#define SPELL_Counterspell 65790 //24s +#define SPELL_Frost_Nova 65792 //25s +#define SPELL_Frostbolt 65807 +#define H_SPELL_Frostbolt 68004 +#define SPELL_Ice_Block 65802 //5min +#define SPELL_Polymorph 65801 //15s + +struct MANGOS_DLL_DECL mob_toc_mageAI : public boss_faction_championsAI +{ + mob_toc_mageAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_RANGED) {Init();} + + uint32 ArcaneBarrageTimer; + uint32 BlinkTimer; + uint32 CounterspellTimer; + uint32 FrostNovaTimer; + bool IceBlockUsed; + uint32 PolymorphTimer; + uint32 GCDTimer; + + void Init() + { + ArcaneBarrageTimer = 2000+rand()%1000; + BlinkTimer = 8000+rand()%1000; + CounterspellTimer = 5000+rand()%1000; + FrostNovaTimer = 7000+rand()%2000; + IceBlockUsed = false; + PolymorphTimer = 3000+rand()%3000; + GCDTimer = 2000; + } + + void UpdateAI(const uint32 diff) + { + if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + + if(CounterspellTimer < diff) + { + if(Unit *target = SelectEnemyCaster(false)) + DoCast (target, SPELL_Counterspell); + CounterspellTimer = 24000; + } + else CounterspellTimer -= diff; + + if(BlinkTimer < diff) // escape + { + if(m_creature->GetHealth()*2 < m_creature->GetMaxHealth() && EnemiesInRange(10.0f)>3) + { + DoCast(m_creature, SPELL_Frost_Nova, true); + DoCast (m_creature , SPELL_Blink); + BlinkTimer = 25000; + } + else + BlinkTimer = 5000; + } + else BlinkTimer -= diff; + + if(!IceBlockUsed && m_creature->GetHealth()*5 < m_creature->GetMaxHealth()) + { + DoCast(m_creature, SPELL_Ice_Block); + IceBlockUsed = true; + } + + if(PolymorphTimer < diff) + { + if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM,1)) + DoCast(target, SPELL_Polymorph); + PolymorphTimer = 15000; + } + else PolymorphTimer -= diff; + + if(GCDTimer < diff) + { + switch(urand(0,2)) + { + case 0: + DoCast(m_creature->getVictim(), SPELL_Arcane_Barrage); + break; + case 1: + DoCast(m_creature->getVictim(), SPELL_Arcane_Blast); + break; + case 2: + if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, SPELL_Frostbolt); + break; + } + GCDTimer = 2500; + } + else GCDTimer -= diff; + + boss_faction_championsAI::UpdateAI(diff); + } +}; + + +#define SPELL_AIMED_SHOT 65883 +#define H_SPELL_AIMED_SHOT 67978//10s +#define SPELL_Call_Pet 67777//perm +#define SPELL_Deterrence 65871 //90s +#define SPELL_Disengage 65869 //30s +#define SPELL_EXPLOSIVE_SHOT 65866 +#define H_SPELL_EXPLOSIVE_SHOT 67984 //6s +#define SPELL_Frost_Trap 65880 //30s +#define SPELL_SHOOT 65868 //1.7s +#define H_SPELL_SHOOT 67989 +#define SPELL_Steady_Shot 65867 //3s +#define SPELL_WING_CLIP 66207 //6s +#define SPELL_Wyvern_Sting 65877 //60s + +struct MANGOS_DLL_DECL mob_toc_hunterAI : public boss_faction_championsAI +{ + mob_toc_hunterAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_RANGED) {Init();} + + uint32 AimedShotTimer; + uint32 CallPetTimer; + uint32 DeterrenceTimer; + uint32 DisengageTimer; + uint32 ExplosiveShotTimer; + uint32 FrostTrapTimer; + uint32 AutoShootTimer; + uint32 SteadyShotTimer; + uint32 WingClipTimer; + uint32 WyvernStingTimer; + uint32 GCDTimer; + + void Init() + { + AimedShotTimer = 1000+rand()%2000; + DeterrenceTimer = 20000; + DisengageTimer = 10000+rand()%3000; + ExplosiveShotTimer = 2000+rand()%3000; + FrostTrapTimer = 11000+rand()%5000; + SteadyShotTimer = 3200+rand()%2000; + WingClipTimer = 6000+rand()%2000; + WyvernStingTimer = 7000+rand()%3000; + GCDTimer = 1000; + } + + void UpdateAI(const uint32 diff) + { + if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + + if(DisengageTimer < diff) + { + if(EnemiesInRange(10.0f) > 3) + { + DoCast(m_creature , SPELL_Disengage); + DisengageTimer = 30000; + } + else + DisengageTimer = 3000; + } + else DisengageTimer -= diff; + + if(DeterrenceTimer < diff) + { + if(m_creature->GetHealth()*5 < m_creature->GetMaxHealth()) + { + DoCast(m_creature, SPELL_Deterrence); + DeterrenceTimer = 90000; + } + else DeterrenceTimer = 3000; + } + else DeterrenceTimer -= diff; + + if(WyvernStingTimer < diff) + { + if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM,1)) + DoCast(target, SPELL_Wyvern_Sting); + WyvernStingTimer = 60000; + } + else WyvernStingTimer -= diff; + + if(FrostTrapTimer < diff) + { + DoCast(m_creature, SPELL_Frost_Trap ); + FrostTrapTimer = 30000 + rand()%1000; + } + else FrostTrapTimer -= diff; + + if(WingClipTimer < diff) + { + if(m_creature->GetDistance2d(m_creature->getVictim()) < 5.0f) + DoCast(m_creature->getVictim(), SPELL_WING_CLIP); + WingClipTimer = 5000; + } + else WingClipTimer-= diff; + + if(GCDTimer < diff) + { + switch(urand(0,3)) + { + case 0: case 1: + DoCast(m_creature->getVictim(), SPELL_SHOOT); + break; + case 2: + DoCast(m_creature->getVictim(), SPELL_EXPLOSIVE_SHOT); + break; + case 3: + DoCast(m_creature->getVictim(), SPELL_AIMED_SHOT); + break; + } + GCDTimer = 2500; + } + else GCDTimer -= diff; + + boss_faction_championsAI::UpdateAI(diff); + } +}; + +#define SPELL_Cyclone 65859 //6s +#define SPELL_Entangling_Roots 65857 //10s +#define SPELL_Faerie_Fire 65863 +#define SPELL_Force_of_Nature 65861 //180s +#define SPELL_Insect_Swarm 65855 +#define H_SPELL_Insect_Swarm 67942 +#define SPELL_Moonfire 65856 //5s +#define H_SPELL_Moonfire 67945 +#define SPELL_Starfire 65854 +#define H_SPELL_Starfire 67948 +#define SPELL_Wrath 65862 +#define H_SPELL_Wrath 67952 + +struct MANGOS_DLL_DECL mob_toc_boomkinAI : public boss_faction_championsAI +{ + mob_toc_boomkinAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_RANGED) {Init();} + + uint32 BarkskinTimer; + uint32 CycloneTimer; + uint32 EntanglingRootsTimer; + uint32 MoonfireTimer; + uint32 FaerieFireTimer; + uint32 GCDTimer; + + void Init() + { + BarkskinTimer = 6000; + CycloneTimer = 5000; + EntanglingRootsTimer = 2000+rand()%1000; + MoonfireTimer = 1000+rand()%1000; + FaerieFireTimer = 10000; + GCDTimer = 1500; + } + + void UpdateAI(const uint32 diff) + { + if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + + if(BarkskinTimer < diff) + { + if(m_creature->GetHealth()*2 < m_creature->GetMaxHealth()) + { + DoCast (m_creature, SPELL_BARKSKIN); + BarkskinTimer = 60000; + } + else + BarkskinTimer = 3000; + } + else BarkskinTimer -= diff; + + if(CycloneTimer < diff) + { + if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM,1)) + DoCast (target, SPELL_Cyclone); + CycloneTimer = 6000+rand()%2000; + } + else CycloneTimer -= diff; + + if(EntanglingRootsTimer < diff) + { + if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, SPELL_Entangling_Roots); + EntanglingRootsTimer = 10000 + rand()%2000; + } + else EntanglingRootsTimer -= diff; + + if(FaerieFireTimer < diff) + { + if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, SPELL_Faerie_Fire); + FaerieFireTimer = 10000 + rand()%8000; + } + else FaerieFireTimer -= diff; + + if(GCDTimer < diff) + { + switch(urand(0,6)) + { + case 0: case 1: + DoCast(m_creature->getVictim(), SPELL_Moonfire); + break; + case 2: + if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target,SPELL_Insect_Swarm); + break; + case 3: + if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(m_creature->getVictim(), SPELL_Starfire); + break; + case 4: case 5: case 6: + DoCast(m_creature->getVictim(), SPELL_Wrath); + break; + } + GCDTimer = 2000; + } + else GCDTimer -= diff; + + boss_faction_championsAI::UpdateAI(diff); + } +}; + +/******************************************************************** + MELEE +********************************************************************/ + +#define SPELL_BLADESTORM 65947 +#define SPELL_INTIMIDATING_SHOUT 65930 +#define SPELL_MORTAL_STRIKE 65926 +#define SPELL_CHARGE 68764 +#define SPELL_DISARM 65935 +#define SPELL_OVERPOWER 65924 +#define SPELL_SUNDER_ARMOR 65936 +#define SPELL_SHATTERING_THROW 65940 +#define SPELL_RETALIATION 65932 + +struct MANGOS_DLL_DECL mob_toc_warriorAI : public boss_faction_championsAI +{ + mob_toc_warriorAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_MELEE) {Init();} + + uint32 BladestormTimer; + uint32 FearTimer; + uint32 MortalStrikeTimer; + uint32 ChargeTimer; + uint32 SunderArmorTimer; + uint32 RetaliationTimer; + uint32 ShatteringThrowTimer; + uint32 DisarmTimer; + + void Init() + { + BladestormTimer = 20000 + rand()%10000; + FearTimer = 10000 + rand()%10000; + MortalStrikeTimer = 6000 + rand()%4000; + ChargeTimer = 1000; + SunderArmorTimer = 5000; + RetaliationTimer = 30000 + rand()%8000; + ShatteringThrowTimer = 10000 + rand()%30000; + DisarmTimer = 5000 + rand()%20000; + } + + void UpdateAI(const uint32 diff) + { + if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + + if(BladestormTimer < diff) + { + DoCast(m_creature, SPELL_BLADESTORM); + BladestormTimer = 90000 + rand()%5000; + } + else BladestormTimer -= diff; + + if(FearTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_INTIMIDATING_SHOUT); + FearTimer = 40000 + rand()%40000; + } + else FearTimer -= diff; + + if(MortalStrikeTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_MORTAL_STRIKE); + MortalStrikeTimer = 6000 + rand()%2000; + } + else MortalStrikeTimer -= diff; + + if(SunderArmorTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_SUNDER_ARMOR); + SunderArmorTimer = 2000+rand()%5000; + } + else SunderArmorTimer -= diff; + + if(ChargeTimer < diff) + { + if(m_creature->IsInRange(m_creature->getVictim(), 8.0f, 25.0f, false)) + { + DoCast(m_creature->getVictim(), SPELL_CHARGE); + ChargeTimer = 12000; + } + else + ChargeTimer = 2000; + } + else ChargeTimer -= diff; + + if(RetaliationTimer < diff) + { + DoCast(m_creature, SPELL_RETALIATION); + RetaliationTimer = 300000 + rand()%10000; + } + else RetaliationTimer -= diff; + + if(ShatteringThrowTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_SHATTERING_THROW); + ShatteringThrowTimer = 300000 + rand()%30000; + } + else ShatteringThrowTimer -= diff; + + if(DisarmTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_DISARM); + DisarmTimer = 60000 + rand()%6000; + } + else DisarmTimer -= diff; + + boss_faction_championsAI::UpdateAI(diff); + } +}; + +#define SPELL_Chains_of_Ice 66020 //8sec +#define SPELL_Death_Coil 66019 //5sec +#define H_SPELL_Death_Coil 67930 +#define SPELL_Death_Grip 66017 //35sec +#define SPELL_Frost_Strike 66047 //6sec +#define H_SPELL_Frost_Strike 67936 +#define SPELL_Icebound_Fortitude 66023 //1min +#define SPELL_Icy_Touch 66021 //8sec +#define H_SPELL_Icy_Touch 67939 +#define SPELL_Strangulate 66018 //2min + +struct MANGOS_DLL_DECL mob_toc_dkAI : public boss_faction_championsAI +{ + mob_toc_dkAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_MELEE) {Init();} + + uint32 ChainsOfIceTimer; + uint32 DeathCoilTimer; + uint32 DeathGripTimer; + uint32 FrostStrikeTimer; + uint32 IceboundFortitudeTimer; + uint32 IcyTouchTimer; + uint32 StrangulateTimer; + + void Init() + { + ChainsOfIceTimer = 2000+rand()%3000; + DeathCoilTimer = 3000+rand()%4000; + DeathGripTimer = 1000+rand()%2000; + FrostStrikeTimer = 4000+rand()%2000; + IceboundFortitudeTimer = 20000; + IcyTouchTimer = 6000+rand()%2000; + StrangulateTimer = 6000+rand()%10000; + } + + void UpdateAI(const uint32 diff) + { + if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + + if(IceboundFortitudeTimer < diff) + { + if(m_creature->GetHealth()*2 < m_creature->GetMaxHealth()) + { + DoCast(m_creature, SPELL_Icebound_Fortitude); + IceboundFortitudeTimer = 60000 + rand()%10000; + } + else + IceboundFortitudeTimer = 5000; + } + else IceboundFortitudeTimer -= diff; + + if(ChainsOfIceTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_Chains_of_Ice); + ChainsOfIceTimer = 8000 + rand()%6000; + } + else ChainsOfIceTimer -= diff; + + if(DeathCoilTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_Death_Coil); + DeathCoilTimer = 6000 + rand()%4000; + } + else DeathCoilTimer -= diff; + + if(StrangulateTimer < diff) + { + if(Unit *target = SelectEnemyCaster(false)) + DoCast(target , SPELL_Strangulate); + StrangulateTimer = 60000 + rand()%6000; + } + else StrangulateTimer -= diff; + + if(FrostStrikeTimer < diff) + { + DoCast (m_creature->getVictim(), SPELL_Frost_Strike); + FrostStrikeTimer = 5000 + rand()%5000; + } + else FrostStrikeTimer -= diff; + + if(IcyTouchTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_Icy_Touch); + IcyTouchTimer = 8000 + rand()%4000; + } + else IcyTouchTimer -= diff; + + if(DeathGripTimer < diff) + { + if(m_creature->IsInRange(m_creature->getVictim(), 10.0f, 30.0f, false)) + { + DoCast(m_creature->getVictim(), SPELL_Death_Grip); + DeathGripTimer = 35000 + rand()%1000; + } + else DeathGripTimer = 3000; + } + else DeathGripTimer -= diff; + + boss_faction_championsAI::UpdateAI(diff); + } +}; + +#define SPELL_FAN_OF_KNIVES 52874 //correst is 65955 //2sec +#define SPELL_BLIND 43433 //correst is 65960 //2min +#define SPELL_CLOAK 65961 //90sec +#define SPELL_Blade_Flurry 65956 //2min +#define SPELL_SHADOWSTEP 66178 //30sec +#define SPELL_HEMORRHAGE 65897 //correct is65954 +#define SPELL_EVISCERATE 71933 //correct is 65957 +#define H_SPELL_EVISCERATE 71933 //correct is 68095 + +struct MANGOS_DLL_DECL mob_toc_rogueAI : public boss_faction_championsAI +{ + mob_toc_rogueAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_MELEE) {Init();} + + uint32 FanOfKnivesTimer; + uint32 BlindTimer; + uint32 CloakTimer; + uint32 BladeFlurryTimer; + uint32 ShadowstepTimer; + uint32 HemorrhageTimer; + uint32 EviscerateTimer; + + void Init() + { + FanOfKnivesTimer = 7000 + rand()%1000; + BlindTimer = 6000 + rand()%3000; + CloakTimer = 20000 + rand()%20000; + BladeFlurryTimer = 10000 + rand()%1000; + ShadowstepTimer = 9000 + rand()%2000; + HemorrhageTimer = 5000 + rand()%1000; + EviscerateTimer = 14000 + rand()%2000; + } + + void UpdateAI(const uint32 diff) + { + if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + + if(FanOfKnivesTimer < diff) + { + if(EnemiesInRange(15.0f) > 2) + DoCast(m_creature->getVictim(), SPELL_FAN_OF_KNIVES); + FanOfKnivesTimer = 3000; + } + else FanOfKnivesTimer -= diff; + + if(HemorrhageTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_HEMORRHAGE); + HemorrhageTimer = 5000 + rand()%2000; + } + else HemorrhageTimer -= diff; + + if(EviscerateTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_EVISCERATE); + EviscerateTimer = 7000 + rand()%3000; + } + else EviscerateTimer -= diff; + + if(ShadowstepTimer < diff) + { + if(m_creature->IsInRange(m_creature->getVictim(), 10.0f, 40.0f)) + { + DoCast(m_creature->getVictim(), SPELL_SHADOWSTEP); + ShadowstepTimer = 30000 + rand()%6000; + } + else ShadowstepTimer = 2000; + } + else ShadowstepTimer -= diff; + + if(BlindTimer < diff) + { + if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM,1)) + { + if(m_creature->IsInRange(target, 0.0f, 15.0f, false)) + { + DoCast(target, SPELL_BLIND); + BlindTimer = 120000 + rand()%6000; + } + else BlindTimer = 2000; + } + else BlindTimer = 2000; + } + else BlindTimer -= diff; + + if(CloakTimer < diff) //If rogue really damaged... + { + if(m_creature->GetHealth()*2 < m_creature->GetMaxHealth()) + { + DoCast(m_creature, SPELL_CLOAK); //...She will cloak. + CloakTimer = 90000; + } + else CloakTimer = 5000; + } + else CloakTimer -= diff; + + if(BladeFlurryTimer < diff) + { + DoCast(m_creature, SPELL_Blade_Flurry); + BladeFlurryTimer = 120000 + rand()%5000; + } + else BladeFlurryTimer -= diff; + + boss_faction_championsAI::UpdateAI(diff); + } +}; + +#define SPELL_EARTH_SHOCK 65973 +#define SPELL_LAVA_LASH 65974 +#define SPELL_STORMSTRIKE 65970 + +struct MANGOS_DLL_DECL mob_toc_enh_shamanAI : public boss_faction_championsAI +{ + mob_toc_enh_shamanAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_MELEE) {Init();} + + uint32 HeroismTimer; + uint32 ShockTimer; + uint32 LavaLashTimer; + uint32 StormstrikeTimer; + + void Init() + { + ShockTimer=3000+rand()%2000; + LavaLashTimer=4000+rand()%2000; + StormstrikeTimer=5000+rand()%2000; + HeroismTimer=5000+rand()%20000; + } + + void UpdateAI(const uint32 diff) + { + if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + + if(HeroismTimer < diff) + { + DoCast(m_creature, SPELL_HEROISM); + HeroismTimer = 600000; + } + else HeroismTimer -= diff; + + if(ShockTimer < diff) + { + if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) + DoCast(target, SPELL_EARTH_SHOCK); + ShockTimer = 6000 + rand()%1000; + } + else ShockTimer -= diff; + + if(StormstrikeTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_STORMSTRIKE); + StormstrikeTimer = 8000 + rand()%4000; + } + else StormstrikeTimer -= diff; + + if(LavaLashTimer < diff) + { + DoCast (m_creature->getVictim(), SPELL_LAVA_LASH); + LavaLashTimer = 8000 + rand()%5000; + } + else LavaLashTimer -= diff; + + boss_faction_championsAI::UpdateAI(diff); + } +}; + +#define SPELL_Avenging_Wrath 66011 //3min cd +#define SPELL_Crusader_Strike 66003 //6sec cd +#define SPELL_Divine_Shield 66010 //5min cd +#define SPELL_Divine_Storm 66006 //10sec cd +#define SPELL_Hammer_of_Justice 66007 //40sec cd +#define SPELL_Hand_of_Protection 66009 //5min cd +#define SPELL_Judgement_of_Command 66005 //8sec cd +#define SPELL_REPENTANCE 66008 //60sec cd +#define SPELL_Seal_of_Command 66004 //no cd + +struct MANGOS_DLL_DECL mob_toc_retro_paladinAI : public boss_faction_championsAI +{ + mob_toc_retro_paladinAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_MELEE) {Init();} + + bool ShieldUsed; + + void Init() + { + ShieldUsed = false; + } + + void Aggro(Unit *who) + { + boss_faction_championsAI::Aggro(who); + + bsw->doCast(SPELL_Seal_of_Command); + } + + void UpdateAI(const uint32 diff) + { + if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + + bsw->timedCast(SPELL_REPENTANCE, diff); + + bsw->timedCast(SPELL_Crusader_Strike, diff); + + bsw->timedCast(SPELL_Avenging_Wrath, diff); + + if(!ShieldUsed && m_creature->GetHealthPercent() < 20.0f) + { + bsw->doCast(SPELL_Divine_Shield); + ShieldUsed = true; + } + + bsw->timedCast(SPELL_Divine_Storm, diff); + + bsw->timedCast(SPELL_Judgement_of_Command, diff); + + boss_faction_championsAI::UpdateAI(diff); + } +}; + +#define SPELL_WPET0 67518 +#define SPELL_WPET1 67519 + +struct MANGOS_DLL_DECL mob_toc_pet_warlockAI : public boss_faction_championsAI +{ + mob_toc_pet_warlockAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_MELEE) {Init();} + + void Aggro(Unit *who) + { + boss_faction_championsAI::Aggro(who); + } + + void UpdateAI(const uint32 diff) + { + if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + + bsw->timedCast(SPELL_WPET0, diff); + + bsw->timedCast(SPELL_WPET1, diff); + + boss_faction_championsAI::UpdateAI(diff); + } +}; + +#define SPELL_HPET0 67793 +struct MANGOS_DLL_DECL mob_toc_pet_hunterAI : public boss_faction_championsAI +{ + mob_toc_pet_hunterAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_MELEE) {Init();} + + void Aggro(Unit *who) + { + boss_faction_championsAI::Aggro(who); + } + + void UpdateAI(const uint32 diff) + { + if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + + bsw->timedCast(SPELL_HPET0, diff); + + boss_faction_championsAI::UpdateAI(diff); + } +}; + + +/*========================================================*/ +CreatureAI* GetAI_mob_toc_druid(Creature *pCreature) { + return new mob_toc_druidAI (pCreature); +} +CreatureAI* GetAI_mob_toc_shaman(Creature *pCreature) { + return new mob_toc_shamanAI (pCreature); +} +CreatureAI* GetAI_mob_toc_paladin(Creature *pCreature) { + return new mob_toc_paladinAI (pCreature); +} +CreatureAI* GetAI_mob_toc_priest(Creature *pCreature) { + return new mob_toc_priestAI (pCreature); +} +CreatureAI* GetAI_mob_toc_shadow_priest(Creature *pCreature) { + return new mob_toc_shadow_priestAI (pCreature); +} +CreatureAI* GetAI_mob_toc_warlock(Creature *pCreature) { + return new mob_toc_warlockAI (pCreature); +} +CreatureAI* GetAI_mob_toc_mage(Creature *pCreature) { + return new mob_toc_mageAI (pCreature); +} +CreatureAI* GetAI_mob_toc_hunter(Creature *pCreature) { + return new mob_toc_hunterAI (pCreature); +} +CreatureAI* GetAI_mob_toc_boomkin(Creature *pCreature) { + return new mob_toc_boomkinAI (pCreature); +} +CreatureAI* GetAI_mob_toc_warrior(Creature *pCreature) { + return new mob_toc_warriorAI (pCreature); +} +CreatureAI* GetAI_mob_toc_dk(Creature *pCreature) { + return new mob_toc_dkAI (pCreature); +} +CreatureAI* GetAI_mob_toc_rogue(Creature *pCreature) { + return new mob_toc_rogueAI (pCreature); +} +CreatureAI* GetAI_mob_toc_enh_shaman(Creature *pCreature) { + return new mob_toc_enh_shamanAI (pCreature); +} +CreatureAI* GetAI_mob_toc_retro_paladin(Creature *pCreature) { + return new mob_toc_retro_paladinAI (pCreature); +} +CreatureAI* GetAI_mob_toc_pet_warlock(Creature *pCreature) { + return new mob_toc_pet_warlockAI (pCreature); +} +CreatureAI* GetAI_mob_toc_pet_hunter(Creature *pCreature) { + return new mob_toc_pet_hunterAI (pCreature); +} + +void AddSC_boss_faction_champions() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "mob_toc_druid"; + newscript->GetAI = &GetAI_mob_toc_druid; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_toc_shaman"; + newscript->GetAI = &GetAI_mob_toc_shaman; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_toc_paladin"; + newscript->GetAI = &GetAI_mob_toc_paladin; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_toc_priest"; + newscript->GetAI = &GetAI_mob_toc_priest; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_toc_shadow_priest"; + newscript->GetAI = &GetAI_mob_toc_shadow_priest; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_toc_mage"; + newscript->GetAI = &GetAI_mob_toc_mage; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_toc_warlock"; + newscript->GetAI = &GetAI_mob_toc_warlock; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_toc_hunter"; + newscript->GetAI = &GetAI_mob_toc_hunter; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_toc_boomkin"; + newscript->GetAI = &GetAI_mob_toc_boomkin; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_toc_warrior"; + newscript->GetAI = &GetAI_mob_toc_warrior; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_toc_dk"; + newscript->GetAI = &GetAI_mob_toc_dk; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_toc_rogue"; + newscript->GetAI = &GetAI_mob_toc_rogue; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_toc_enh_shaman"; + newscript->GetAI = &GetAI_mob_toc_enh_shaman; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_toc_retro_paladin"; + newscript->GetAI = &GetAI_mob_toc_retro_paladin; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_toc_pet_warlock"; + newscript->GetAI = &GetAI_mob_toc_pet_warlock; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_toc_pet_hunter"; + newscript->GetAI = &GetAI_mob_toc_pet_hunter; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index f3e859ecd..b7ebae19c 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -91,6 +91,7 @@ enum TYPE_EVENT_TIMER = 102, TYPE_EVENT_NPC = 103, TYPE_NORTHREND_BEASTS = 104, + TYPE_CHAMPIONS_COUNT = 105, DATA_HEALTH_EYDIS = 201, DATA_HEALTH_FJOLA = 202, diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index 0a01caba6..8bc65e7dd 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -263,6 +263,7 @@ extern void AddSC_winterspring(); //northrend extern void AddSC_northrend_beasts(); //Crusaders' Coliseum, trial_of_the_crusader extern void AddSC_boss_jaraxxus(); +extern void AddSC_boss_faction_champions(); extern void AddSC_boss_anubarak_trial(); extern void AddSC_twin_valkyr(); extern void AddSC_trial_of_the_crusader(); @@ -731,6 +732,7 @@ void AddScripts() //northrend AddSC_northrend_beasts(); //Crusaders' Coliseum, trial_of_the_crusader AddSC_boss_jaraxxus(); + AddSC_boss_faction_champions(); AddSC_boss_anubarak_trial(); AddSC_twin_valkyr(); AddSC_trial_of_the_crusader(); //trial_of_the_crusader From a2d9a9300127528505bdac06200f754e121e5732 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Mon, 12 Apr 2010 19:13:24 +0400 Subject: [PATCH 229/405] Small BSW improve --- include/sc_boss_spell_worker.cpp | 42 +++++++++++++++++++++++--------- include/sc_boss_spell_worker.h | 13 +++++++++- 2 files changed, 42 insertions(+), 13 deletions(-) diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index 3f35a804e..3326772e8 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -153,29 +153,21 @@ CanCastResult BossSpellWorker::_BSWSpellSelector(uint8 m_uiSpellIdx, Unit* pTarg case CAST_ON_VICTIM: pTarget = boss->getVictim(); - if (!pTarget) return CAST_FAIL_OTHER; - if (pTarget && !pSpell->m_IsBugged) return _DoCastSpellIfCan(boss->getVictim(), pSpell->m_uiSpellEntry[currentDifficulty]); - if (pTarget && pSpell->m_IsBugged) return _BSWDoCast(m_uiSpellIdx, boss->getVictim()); + return _BSWCastOnTarget(pTarget, m_uiSpellIdx); break; case CAST_ON_RANDOM: pTarget = SelectUnit(SELECT_TARGET_RANDOM); - if (!pTarget) return CAST_FAIL_OTHER; - if (pTarget && !pSpell->m_IsBugged) return _DoCastSpellIfCan(pTarget, pSpell->m_uiSpellEntry[currentDifficulty]); - if (pTarget && pSpell->m_IsBugged) return _BSWDoCast(m_uiSpellIdx, pTarget); + return _BSWCastOnTarget(pTarget, m_uiSpellIdx); break; case CAST_ON_BOTTOMAGGRO: pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); - if (!pTarget) return CAST_FAIL_OTHER; - if (pTarget && !pSpell->m_IsBugged) return _DoCastSpellIfCan(pTarget, pSpell->m_uiSpellEntry[currentDifficulty]); - if (pTarget && pSpell->m_IsBugged) return _BSWDoCast(m_uiSpellIdx, pTarget); + return _BSWCastOnTarget(pTarget, m_uiSpellIdx); break; case CAST_ON_TARGET: - if (!pTarget) return CAST_FAIL_OTHER; - if (pTarget && !pSpell->m_IsBugged) return _DoCastSpellIfCan(pTarget, pSpell->m_uiSpellEntry[currentDifficulty]); - if (pTarget && pSpell->m_IsBugged) return _BSWDoCast(m_uiSpellIdx, pTarget); + return _BSWCastOnTarget(pTarget, m_uiSpellIdx); break; case APPLY_AURA_SELF: @@ -232,6 +224,16 @@ CanCastResult BossSpellWorker::_BSWSpellSelector(uint8 m_uiSpellIdx, Unit* pTarg break; } + case CAST_ON_FRENDLY: + pTarget = SelectLowHPFriendly(); + return _BSWCastOnTarget(pTarget, m_uiSpellIdx); + break; + + case CAST_ON_FRENDLY_LOWHP: + pTarget = SelectLowHPFriendly(); + return _BSWCastOnTarget(pTarget, m_uiSpellIdx); + break; + default: return CAST_FAIL_OTHER; break; @@ -239,6 +241,22 @@ CanCastResult BossSpellWorker::_BSWSpellSelector(uint8 m_uiSpellIdx, Unit* pTarg return CAST_FAIL_OTHER; }; +CanCastResult BossSpellWorker::_BSWCastOnTarget(Unit* pTarget, uint8 m_uiSpellIdx) +{ + if (bossSpellCount == 0) return CAST_FAIL_OTHER; + if (!pTarget) return CAST_FAIL_OTHER; + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + + debug_log("BSW: Casting (on target) spell number %u type %u",pSpell->m_uiSpellEntry[currentDifficulty], pSpell->m_CastTarget); + + if (pTarget && !pSpell->m_IsBugged) return _DoCastSpellIfCan(pTarget, pSpell->m_uiSpellEntry[currentDifficulty]); + if (pTarget && pSpell->m_IsBugged) return _BSWDoCast(m_uiSpellIdx, pTarget); + + return CAST_FAIL_OTHER; +}; + + + bool BossSpellWorker::isSummon(uint8 m_uiSpellIdx) { if (bossSpellCount == 0) return false; diff --git a/include/sc_boss_spell_worker.h b/include/sc_boss_spell_worker.h index 0f63e6c69..14e205c45 100644 --- a/include/sc_boss_spell_worker.h +++ b/include/sc_boss_spell_worker.h @@ -124,11 +124,20 @@ class MANGOS_DLL_DECL BossSpellWorker }; CanCastResult doCast(uint32 SpellID, Unit* pTarget = NULL) - { uint8 m_uiSpellIdx = FindSpellIDX(SpellID); + { + uint8 m_uiSpellIdx = FindSpellIDX(SpellID); if ( m_uiSpellIdx != SPELL_INDEX_ERROR) return _BSWSpellSelector(m_uiSpellIdx, pTarget); else return CAST_FAIL_OTHER; }; + CanCastResult doCast(Unit* pTarget, uint32 SpellID) + { + if (!pTarget) return CAST_FAIL_OTHER; + uint8 m_uiSpellIdx = FindSpellIDX(SpellID); + if ( m_uiSpellIdx != SPELL_INDEX_ERROR) return _BSWCastOnTarget(pTarget, m_uiSpellIdx); + else return CAST_FAIL_OTHER; + }; + bool doRemove(uint32 SpellID, Unit* pTarget = NULL) { return _doRemove(FindSpellIDX(SpellID),pTarget); @@ -180,6 +189,8 @@ class MANGOS_DLL_DECL BossSpellWorker CanCastResult _BSWSpellSelector(uint8 m_uiSpellIdx, Unit* pTarget = NULL); + CanCastResult _BSWCastOnTarget(Unit* pTarget, uint8 m_uiSpellIdx); + Difficulty setDifficulty(uint8 _Difficulty = 0); bool _QuerySpellPeriod(uint8 m_uiSpellIdx, uint32 diff); From ac52202f91ba7bf8cd97286face9e83af814b376 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Tue, 13 Apr 2010 18:34:36 +0400 Subject: [PATCH 230/405] TOC part 40 - crusaders almost finished. --- addition/724_trial_of_crusader_mangos.sql | 36 +- ...rial_of_crusader_spelltable_scriptdev2.sql | 234 ++++- include/sc_boss_spell_worker.cpp | 32 +- include/sc_boss_spell_worker.h | 11 +- .../boss_faction_champions.cpp | 959 ++++-------------- .../trial_of_the_crusader/boss_jaraxxus.cpp | 7 +- .../boss_northrend_beasts.cpp | 6 +- .../instance_trial_of_the_crusader.cpp | 10 +- .../trial_of_the_crusader.cpp | 358 ++----- .../trial_of_the_crusader.h | 2 +- 10 files changed, 568 insertions(+), 1087 deletions(-) diff --git a/addition/724_trial_of_crusader_mangos.sql b/addition/724_trial_of_crusader_mangos.sql index 6789774d5..7ec36514b 100644 --- a/addition/724_trial_of_crusader_mangos.sql +++ b/addition/724_trial_of_crusader_mangos.sql @@ -12,24 +12,24 @@ UPDATE `creature_template` SET `scriptname`='npc_tirion_toc' WHERE `entry`=34996 UPDATE `creature_template` SET `scriptname`='npc_garrosh_toc' WHERE `entry`=34995; UPDATE `creature_template` SET `scriptname`='npc_rinn_toc' WHERE `entry`=34990; --- grand crusaders --- UPDATE `creature_template` SET `scriptname`='mob_toc_warrior' WHERE `entry` IN (34475,34453); --- UPDATE `creature_template` SET `scriptname`='mob_toc_mage' WHERE `entry` IN (34468,34449); --- UPDATE `creature_template` SET `scriptname`='mob_toc_shaman' WHERE `entry` IN (34463,34455); --- UPDATE `creature_template` SET `scriptname`='mob_toc_enh_shaman' WHERE `entry` IN (34470,34444); --- UPDATE `creature_template` SET `scriptname`='mob_toc_hunter' WHERE `entry` IN (34467,34448); --- UPDATE `creature_template` SET `scriptname`='mob_toc_rogue' WHERE `entry` IN (34472,34454); --- UPDATE `creature_template` SET `scriptname`='mob_toc_priest' WHERE `entry` IN (34466,34456); --- UPDATE `creature_template` SET `scriptname`='mob_toc_shadow_priest' WHERE `entry` IN (34473,34441); --- UPDATE `creature_template` SET `scriptname`='mob_toc_dk' WHERE `entry` IN (34461,34458); --- UPDATE `creature_template` SET `scriptname`='mob_toc_paladin' WHERE `entry` IN (34465,34445); -UPDATE `creature_template` SET `scriptname`='mob_toc_retro_paladin' WHERE `entry` IN (34471,34456); -UPDATE `creature_template` SET `scriptname`='mob_toc_druid' WHERE `entry` IN (34460,34451); --- UPDATE `creature_template` SET `scriptname`='mob_toc_boomkin' WHERE `entry` IN (34469,34459); --- UPDATE `creature_template` SET `scriptname`='mob_toc_warlock' WHERE `entry` IN (34474,34450); +-- Grand crusaders +UPDATE `creature_template` SET `scriptname`='mob_toc_warrior', `AIName` ='' WHERE `entry` IN (34475,34453); +UPDATE `creature_template` SET `scriptname`='mob_toc_mage', `AIName` ='' WHERE `entry` IN (34468,34449); +UPDATE `creature_template` SET `scriptname`='mob_toc_shaman', `AIName` ='' WHERE `entry` IN (34463,34455); +UPDATE `creature_template` SET `scriptname`='mob_toc_enh_shaman', `AIName` ='' WHERE `entry` IN (34470,34444); +UPDATE `creature_template` SET `scriptname`='mob_toc_hunter', `AIName` ='' WHERE `entry` IN (34467,34448); +UPDATE `creature_template` SET `scriptname`='mob_toc_rogue', `AIName` ='' WHERE `entry` IN (34472,34454); +UPDATE `creature_template` SET `scriptname`='mob_toc_priest', `AIName` ='' WHERE `entry` IN (34466,34456); +UPDATE `creature_template` SET `scriptname`='mob_toc_shadow_priest', `AIName` ='' WHERE `entry` IN (34473,34441); +UPDATE `creature_template` SET `scriptname`='mob_toc_dk', `AIName` ='' WHERE `entry` IN (34461,34458); +UPDATE `creature_template` SET `scriptname`='mob_toc_paladin', `AIName` ='' WHERE `entry` IN (34465,34445); +UPDATE `creature_template` SET `scriptname`='mob_toc_retro_paladin', `AIName` ='' WHERE `entry` IN (34471,34456); +UPDATE `creature_template` SET `scriptname`='mob_toc_druid', `AIName` ='' WHERE `entry` IN (34460,34451); +UPDATE `creature_template` SET `scriptname`='mob_toc_boomkin', `AIName` ='' WHERE `entry` IN (34469,34459); +UPDATE `creature_template` SET `scriptname`='mob_toc_warlock' WHERE `entry` IN (34474,34450); -UPDATE `creature_template` SET `scriptname`='mob_toc_pet_warlock' WHERE `entry` IN (35465); -UPDATE `creature_template` SET `scriptname`='mob_toc_pet_hunter' WHERE `entry` IN (35610); +UPDATE `creature_template` SET `scriptname`='mob_toc_pet_warlock', `AIName` ='' WHERE `entry` IN (35465); +UPDATE `creature_template` SET `scriptname`='mob_toc_pet_hunter', `AIName` ='' WHERE `entry` IN (35610); UPDATE `creature_template` SET `lootid`= 0 WHERE `entry` IN (34460,34463,34461,34471,34475,34472,34453,34455,34458,34454,34451,34456,34467,35465,34468,35610,34473,34474,34441,34449,34448,34450); @@ -60,7 +60,7 @@ UPDATE `creature_template` SET `scriptname`='mob_snobold_vassal', `AIName` ='' W UPDATE `creature_template` SET `scriptname`='boss_dreadscale', `AIName` ='' WHERE `entry`=34799; UPDATE `creature_template` SET `scriptname`='boss_acidmaw', `AIName` ='' WHERE `entry`=35144; -UPDATE `creature_template` SET `scriptname`='mob_slime_pool', `minlevel` = 80, `maxlevel` = 80, `AIName` ='', `faction_A`= 14, `faction_H` = 14, `modelid_A` = 12349, `modelid_H` = 12349 WHERE `entry` = 35176; +UPDATE `creature_template` SET `scriptname`='mob_slime_pool', `minlevel` = 80, `maxlevel` = 80, `minhealth`= 20000, `maxhealth` = 20000,`AIName` ='', `faction_A`= 14, `faction_H` = 14, `modelid_A` = 12349, `modelid_H` = 12349 WHERE `entry` = 35176; -- Model id for slime_pool need change! UPDATE `creature_template` SET `scriptname`='boss_icehowl', `AIName` ='' WHERE `entry`=34797; diff --git a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql index d2a933288..c4e9a6583 100644 --- a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql +++ b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql @@ -67,7 +67,7 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES (34780, 26662, 26662, 26662, 26662, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), (34780, 66197, 68123, 68124, 68125, 30000, 30000, 30000, 30000, 45000, 45000, 45000, 45000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), -(34780, 66237, 67049, 67050, 67051, 40000, 40000, 40000, 40000, 90000, 90000, 40000, 90000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34780, 66237, 67049, 67050, 67051, 40000, 40000, 40000, 40000, 90000, 90000, 40000, 90000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL), (34780, 66242, 67060, 67060, 67060, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), (34780, 66264, 66264, 68405, 68405, 60000, 60000, 60000, 60000, 60000, 60000, 60000, 60000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 1, 0, NULL), (34780, 66528, 66528, 67029, 67029, 15000, 15000, 15000, 15000, 25000, 25000, 25000, 25000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), @@ -159,7 +159,7 @@ DELETE FROM `boss_spell_table` WHERE `entry` IN (34471,34456); INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES (34471, 66011, 0, 180000, 180000, 3), (34471, 66003, 0, 6000, 18000, 3), -(34471, 66010, 0, 300000, 300000, 1), +(34471, 66010, 0, 0, 3600001, 1), (34471, 66006, 0, 10000, 10000, 3), (34471, 66007, 0, 40000, 40000, 3), (34471, 66009, 0, 300000, 300000, 1), @@ -169,7 +169,7 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES (34456, 66011, 0, 180000, 180000, 3), (34456, 66003, 0, 6000, 18000, 3), -(34456, 66010, 0, 300000, 300000, 1), +(34456, 66010, 0, 0, 3600001, 1), (34456, 66006, 0, 10000, 10000, 3), (34456, 66007, 0, 40000, 40000, 3), (34456, 66009, 0, 300000, 300000, 1), @@ -188,19 +188,19 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ -- Druids DELETE FROM `boss_spell_table` WHERE `entry` IN (34460,34451); INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES -(35460, 66093, 67957, 10000, 20000, 6), -(35460, 66066, 67965, 10000, 20000, 6), -(35460, 66067, 67968, 10000, 20000, 6), -(35460, 66065, 67971, 10000, 20000, 6), -(35460, 66086, 67974, 40000, 90000, 1), -(35460, 65860, 0, 45000, 90000, 1), -(35460, 66068, 0, 15000, 30000, 6), -(35460, 66071, 0, 40000, 80000, 1); -INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES -(34451, 66093, 67957, 10000, 20000, 6), -(34451, 66066, 67965, 10000, 20000, 6), -(34451, 66067, 67968, 10000, 20000, 6), -(34451, 66065, 67971, 10000, 20000, 6), +(34460, 66093, 67957, 5000, 15000, 14), +(34460, 66066, 67965, 10000, 20000, 14), +(34460, 66067, 67968, 10000, 20000, 14), +(34460, 66065, 67971, 10000, 20000, 14), +(34460, 66086, 67974, 40000, 90000, 1), +(34460, 65860, 0, 45000, 90000, 1), +(34460, 66068, 0, 15000, 30000, 6), +(34460, 66071, 0, 40000, 80000, 1); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34451, 66093, 67957, 10000, 20000, 14), +(34451, 66066, 67965, 10000, 20000, 14), +(34451, 66067, 67968, 10000, 20000, 14), +(34451, 66065, 67971, 10000, 20000, 14), (34451, 66086, 67974, 40000, 90000, 1), (34451, 65860, 0, 45000, 90000, 1), (34451, 66068, 0, 15000, 30000, 6), @@ -208,37 +208,239 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin -- Warriors DELETE FROM `boss_spell_table` WHERE `entry` IN (34475,34453); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34475, 65947, 0, 20000, 30000, 1), +(34475, 65930, 0, 10000, 60000, 3), +(34475, 65926, 0, 6000, 25000, 3), +(34475, 68764, 0, 3000, 25000, 3), +(34475, 65935, 0, 20000, 80000, 3), +(34475, 65924, 0, 30000, 90000, 1), +(34475, 65936, 0, 5000, 25000, 3), +(34475, 65940, 0, 10000, 25000, 3), +(34475, 65932, 0, 30000, 60000, 1); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34453, 65947, 0, 20000, 30000, 1), +(34453, 65930, 0, 10000, 60000, 3), +(34453, 65926, 0, 6000, 25000, 3), +(34453, 68764, 0, 3000, 25000, 3), +(34453, 65935, 0, 20000, 80000, 3), +(34453, 65924, 0, 30000, 90000, 1), +(34453, 65936, 0, 5000, 25000, 3), +(34453, 65940, 0, 10000, 25000, 3), +(34453, 65932, 0, 30000, 60000, 1); -- Mage DELETE FROM `boss_spell_table` WHERE `entry` IN (34468,34449); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34468, 65799, 67995, 3000, 10000, 3), +(34468, 65791, 67998, 5000, 15000, 3), +(34468, 65800, 68001, 5000, 15000, 3), +(34468, 65793, 0, 7000, 25000, 1), +(34468, 65807, 68004, 5000, 15000, 4), +(34468, 65790, 0, 5000, 15000, 6), +(34468, 65792, 0, 7000, 15000, 1), +(34468, 65802, 0, 0, 3600001, 1), +(34468, 65801, 0, 15000, 40000, 4); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34449, 65799, 67995, 3000, 10000, 3), +(34449, 65791, 67998, 5000, 15000, 3), +(34449, 65800, 68001, 5000, 15000, 3), +(34449, 65793, 0, 7000, 25000, 1), +(34449, 65807, 68004, 5000, 15000, 4), +(34449, 65790, 0, 5000, 15000, 6), +(34449, 65792, 0, 7000, 15000, 1), +(34449, 65802, 0, 0, 3600001, 1), +(34449, 65801, 0, 15000, 40000, 4); -- Shaman DELETE FROM `boss_spell_table` WHERE `entry` IN (34463,34455); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34463, 66055, 68115, 5000, 15000, 14), +(34463, 66053, 68118, 5000, 15000, 14), +(34463, 66056, 0, 5000, 15000, 14), +(34463, 65983, 0, 30000, 60000, 1), +(34463, 65980, 0, 5000, 15000, 6), +(34463, 66054, 0, 10000, 40000, 4), +(34463, 66063, 0, 5000, 15000, 14), +(34463, 65973, 68100, 5000, 15000, 4); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34455, 66055, 68115, 5000, 15000, 14), +(34455, 66053, 68118, 5000, 15000, 14), +(34455, 66056, 0, 5000, 15000, 14), +(34455, 65983, 0, 30000, 60000, 1), +(34455, 65980, 0, 5000, 15000, 6), +(34455, 66054, 0, 10000, 40000, 4), +(34455, 66063, 0, 5000, 15000, 14), +(34455, 65973, 68100, 5000, 15000, 4); -- Enh shaman DELETE FROM `boss_spell_table` WHERE `entry` IN (34470,34444); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34470, 65973, 0, 5000, 8000, 4), +(34470, 65974, 0, 5000, 8000, 3), +(34470, 65983, 0, 25000, 600000, 1), +(34470, 65970, 0, 5000, 90000, 3); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34444, 65973, 0, 5000, 8000, 4), +(34444, 65974, 0, 5000, 8000, 3), +(34444, 65983, 0, 25000, 600000, 1), +(34444, 65970, 0, 5000, 90000, 3); -- Hunter DELETE FROM `boss_spell_table` WHERE `entry` IN (34467,34448); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34467, 65583, 67978, 3000, 8000, 3), +(34467, 65871, 0, 20000, 120000, 1), +(34467, 65869, 0, 12000, 20000, 1), +(34467, 65866, 67984, 3000, 8000, 3), +(34467, 65880, 0, 12000, 30000, 1), +(34467, 65868, 67989, 4000, 8000, 3), +(34467, 65867, 0, 4000, 8000, 3), +(34467, 66207, 0, 4000, 8000, 3), +(34467, 65877, 0, 7000, 60000, 4); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34448, 65583, 67978, 3000, 8000, 3), +(34448, 65871, 0, 20000, 120000, 1), +(34448, 65869, 0, 12000, 20000, 1), +(34448, 65866, 67984, 3000, 8000, 3), +(34448, 65880, 0, 12000, 30000, 1), +(34448, 65868, 67989, 4000, 8000, 3), +(34448, 65867, 0, 4000, 8000, 3), +(34448, 66207, 0, 4000, 8000, 3), +(34448, 65877, 0, 7000, 60000, 4); -- Rogue DELETE FROM `boss_spell_table` WHERE `entry` IN (34472,34454); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34472, 65955, 0, 8000, 10000, 3), +(34472, 65956, 0, 12000, 120000, 1), +(34472, 65960, 0, 7000, 8000, 6), +(34472, 65961, 0, 20000, 120000, 1), +(34472, 66178, 0, 10000, 8000, 3), +(34472, 65954, 0, 5000, 8000, 3), +(34472, 65957, 68095, 15000, 20000, 3); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34454, 65955, 0, 8000, 10000, 3), +(34454, 65956, 0, 12000, 120000, 1), +(34454, 65960, 0, 7000, 8000, 6), +(34454, 65961, 0, 20000, 120000, 1), +(34454, 66178, 0, 10000, 8000, 3), +(34454, 65954, 0, 5000, 8000, 3), +(34454, 65957, 68095, 15000, 20000, 3); -- Priest DELETE FROM `boss_spell_table` WHERE `entry` IN (34466,34456); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34466, 66177, 68035, 3000, 8000, 14), +(34466, 66099, 68032, 3000, 8000, 14), +(34466, 66104, 68023, 3000, 8000, 14), +(34466, 66100, 68026, 3000, 8000, 4), +(34466, 65546, 0, 3000, 8000, 6), +(34466, 65543, 0, 5000, 25000, 1); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34456, 66177, 68035, 3000, 8000, 14), +(34456, 66099, 68032, 3000, 8000, 14), +(34456, 66104, 68023, 3000, 8000, 14), +(34456, 66100, 68026, 3000, 8000, 4), +(34456, 65546, 0, 3000, 8000, 6), +(34456, 65543, 0, 5000, 25000, 1); -- Shadow priest DELETE FROM `boss_spell_table` WHERE `entry` IN (34473,34441); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34473, 65542, 0, 8000, 15000, 6), +(34473, 65490, 68091, 3000, 8000, 4), +(34473, 65541, 68088, 3000, 8000, 4), +(34473, 65488, 68042, 3000, 8000, 3), +(34473, 65492, 68038, 3000, 8000, 3), +(34473, 65545, 0, 3000, 8000, 3), +(34473, 65544, 0, 1000, 180000, 1), +(34473, 65546, 0, 3000, 8000, 4), +(34473, 65543, 0, 8000, 24000, 1), +(34473, 16592, 0, 3000, 8000, 1); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34441, 65542, 0, 8000, 15000, 6), +(34441, 65490, 68091, 3000, 8000, 4), +(34441, 65541, 68088, 3000, 8000, 4), +(34441, 65488, 68042, 3000, 8000, 3), +(34441, 65492, 68038, 3000, 8000, 3), +(34441, 65545, 0, 3000, 8000, 3), +(34441, 65544, 0, 1000, 180000, 1), +(34441, 65546, 0, 3000, 8000, 4), +(34441, 65543, 0, 8000, 24000, 1), +(34441, 16592, 0, 3000, 8000, 1); -- Death knight DELETE FROM `boss_spell_table` WHERE `entry` IN (34461,34458); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34461, 66020, 0, 5000, 15000, 3), +(34461, 66019, 67930, 5000, 15000, 3), +(34461, 66017, 0, 5000, 15000, 3), +(34461, 66047, 67936, 5000, 15000, 3), +(34461, 66023, 0, 5000, 90000, 1), +(34461, 66021, 67939, 8000, 12000, 3), +(34461, 66018, 0, 10000, 90000, 6); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34458, 66020, 0, 5000, 15000, 3), +(34458, 66019, 67930, 5000, 15000, 3), +(34458, 66017, 0, 5000, 15000, 3), +(34458, 66047, 67936, 5000, 15000, 3), +(34458, 66023, 0, 5000, 90000, 1), +(34458, 66021, 67939, 8000, 12000, 3), +(34458, 66018, 0, 10000, 90000, 6); -- Paladin DELETE FROM `boss_spell_table` WHERE `entry` IN (34465,34445); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34465, 68757, 0, 25000, 40000, 6), +(34465, 66010, 0, 0, 3600001, 14), +(34465, 66116, 0, 5000, 15000, 14), +(34465, 66113, 68008, 5000, 10000, 14), +(34465, 66112, 68011, 5000, 15000, 14), +(34465, 66009, 0, 0, 3600001, 6), +(34465, 66114, 68015, 6000, 15000, 14), +(34465, 66613, 0, 5000, 15000, 4); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34445, 68757, 0, 25000, 40000, 6), +(34445, 66010, 0, 0, 3600001, 14), +(34445, 66116, 0, 5000, 15000, 14), +(34445, 66113, 68008, 5000, 10000, 14), +(34445, 66112, 68011, 5000, 15000, 14), +(34445, 66009, 0, 0, 3600001, 6), +(34445, 66114, 68015, 6000, 15000, 14), +(34445, 66613, 0, 5000, 15000, 4); -- Boomkin (druid in moonkin form) DELETE FROM `boss_spell_table` WHERE `entry` IN (34469,34459); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34469, 65859, 0, 5000, 40000, 4), +(34469, 65857, 0, 5000, 40000, 3), +(34469, 65863, 0, 10000, 40000, 4), +(34469, 65861, 0, 25000, 40000, 3), +(34469, 65855, 67942, 25000, 40000, 4), +(34469, 65856, 67945, 5000, 40000, 3), +(34469, 65854, 67948, 25000, 40000, 3), +(34469, 65860, 0, 5000, 120000, 1), +(34469, 65862, 67952, 25000, 40000, 3); -- Warlock DELETE FROM `boss_spell_table` WHERE `entry` IN (34474,34450); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34474, 65816, 68146, 15000, 30000, 1), +(34474, 65810, 68134, 15000, 30000, 4), +(34474, 65814, 68137, 15000, 30000, 4), +(34474, 65815, 0, 15000, 30000, 4), +(34474, 65809, 0, 4000, 15000, 4), +(34474, 65819, 68149, 15000, 30000, 3), +(34474, 65821, 68152, 3000, 10000, 3), +(34474, 65812, 68155, 2000, 10000, 4); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34450, 65816, 68146, 15000, 30000, 1), +(34450, 65810, 68134, 15000, 30000, 4), +(34450, 65814, 68137, 15000, 30000, 4), +(34450, 65815, 0, 15000, 30000, 4), +(34450, 65809, 0, 4000, 15000, 4), +(34450, 65819, 68149, 15000, 30000, 3), +(34450, 65821, 68152, 3000, 10000, 3), +(34450, 65812, 68155, 2000, 10000, 4); diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index 3326772e8..25ff4a7bc 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -11,7 +11,7 @@ BossSpellWorker::BossSpellWorker(ScriptedAI* bossAI) { boss = bossAI->m_creature; bossID = boss->GetEntry(); - bossSpellCount = 0; + _bossSpellCount = 0; currentTarget = NULL; memset(&m_uiSpell_Timer, 0, sizeof(m_uiSpell_Timer)); memset(&m_BossSpell,0,sizeof(m_BossSpell)); @@ -36,10 +36,13 @@ void BossSpellWorker::Reset(uint8 _Difficulty) void BossSpellWorker::_resetTimer(uint8 m_uiSpellIdx) { - if (m_uiSpellIdx > bossSpellCount) return; + if (m_uiSpellIdx > _bossSpellCount) return; if (m_BossSpell[m_uiSpellIdx].m_uiSpellTimerMin[currentDifficulty] != m_BossSpell[m_uiSpellIdx].m_uiSpellTimerMax[currentDifficulty]) m_uiSpell_Timer[m_uiSpellIdx] = urand(0,m_BossSpell[m_uiSpellIdx].m_uiSpellTimerMax[currentDifficulty]); else m_uiSpell_Timer[m_uiSpellIdx] = m_BossSpell[m_uiSpellIdx].m_uiSpellTimerMin[currentDifficulty]; + if (m_BossSpell[m_uiSpellIdx].m_uiSpellTimerMin[currentDifficulty] == 0 + && m_BossSpell[m_uiSpellIdx].m_uiSpellTimerMax[currentDifficulty] >= HOUR*IN_MILLISECONDS) + m_uiSpell_Timer[m_uiSpellIdx] = 0; }; void BossSpellWorker::LoadSpellTable() @@ -98,7 +101,7 @@ void BossSpellWorker::LoadSpellTable() } while (Result->NextRow()); - bossSpellCount = uiCount; + _bossSpellCount = uiCount; delete Result; @@ -109,17 +112,18 @@ void BossSpellWorker::LoadSpellTable() else { error_db_log("BSW: Boss spell table for boss %u is empty.", bossID); - bossSpellCount = 0; + _bossSpellCount = 0; }; } bool BossSpellWorker::_QuerySpellPeriod(uint8 m_uiSpellIdx, uint32 diff) { - if (bossSpellCount == 0) return false; + if (_bossSpellCount == 0) return false; SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; if (m_uiSpell_Timer[m_uiSpellIdx] < diff) { - m_uiSpell_Timer[m_uiSpellIdx]=urand(pSpell->m_uiSpellTimerMin[currentDifficulty],pSpell->m_uiSpellTimerMax[currentDifficulty]); + if (pSpell->m_uiSpellTimerMax[currentDifficulty] >= HOUR*IN_MILLISECONDS) m_uiSpell_Timer[m_uiSpellIdx]=HOUR*IN_MILLISECONDS; + else m_uiSpell_Timer[m_uiSpellIdx]=urand(pSpell->m_uiSpellTimerMin[currentDifficulty],pSpell->m_uiSpellTimerMax[currentDifficulty]); return true; } else { m_uiSpell_Timer[m_uiSpellIdx] -= diff; @@ -129,7 +133,7 @@ bool BossSpellWorker::_QuerySpellPeriod(uint8 m_uiSpellIdx, uint32 diff) CanCastResult BossSpellWorker::_BSWSpellSelector(uint8 m_uiSpellIdx, Unit* pTarget) { - if (bossSpellCount == 0) return CAST_FAIL_OTHER; + if (_bossSpellCount == 0) return CAST_FAIL_OTHER; SpellEntry const *spell; SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; Unit* pSummon = NULL; @@ -243,7 +247,7 @@ CanCastResult BossSpellWorker::_BSWSpellSelector(uint8 m_uiSpellIdx, Unit* pTarg CanCastResult BossSpellWorker::_BSWCastOnTarget(Unit* pTarget, uint8 m_uiSpellIdx) { - if (bossSpellCount == 0) return CAST_FAIL_OTHER; + if (_bossSpellCount == 0) return CAST_FAIL_OTHER; if (!pTarget) return CAST_FAIL_OTHER; SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; @@ -259,7 +263,7 @@ CanCastResult BossSpellWorker::_BSWCastOnTarget(Unit* pTarget, uint8 m_uiSpellId bool BossSpellWorker::isSummon(uint8 m_uiSpellIdx) { - if (bossSpellCount == 0) return false; + if (_bossSpellCount == 0) return false; SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; switch (pSpell->m_CastTarget) { @@ -283,8 +287,8 @@ bool BossSpellWorker::_hasAura(uint8 m_uiSpellIdx, Unit* pTarget) uint8 BossSpellWorker::FindSpellIDX(uint32 SpellID) { - if (bossSpellCount != 0) - for(uint8 i = 0; i < bossSpellCount; ++i) + if (_bossSpellCount != 0) + for(uint8 i = 0; i < _bossSpellCount; ++i) if (m_BossSpell[i].m_uiSpellEntry[RAID_DIFFICULTY_10MAN_NORMAL] == SpellID) return i; error_log("BSW: spell %u not found in boss %u spelltable. Memory or database error?", SpellID, bossID); @@ -323,7 +327,9 @@ BossSpellTableParameters BossSpellWorker::getBSWCastType(uint32 pTemp) case 10: return SUMMON_INSTANT; case 11: return SUMMON_TEMP; case 12: return CAST_ON_ALLPLAYERS; - case 13: return SPELLTABLEPARM_NUMBER; + case 13: return CAST_ON_FRENDLY; + case 14: return CAST_ON_FRENDLY_LOWHP; + case 15: return SPELLTABLEPARM_NUMBER; default: return DO_NOTHING; }; }; @@ -340,7 +346,7 @@ CanCastResult BossSpellWorker::_BSWDoCast(uint8 m_uiSpellIdx, Unit* pTarget) void BossSpellWorker::_fillEmptyDataField() { - for (uint8 i = 0; i < bossSpellCount; ++i) + for (uint8 i = 0; i < _bossSpellCount; ++i) for (uint8 j = 1; j < DIFFICULTY_LEVELS; ++j) { if (m_BossSpell[i].m_uiSpellEntry[j] == 0) diff --git a/include/sc_boss_spell_worker.h b/include/sc_boss_spell_worker.h index 14e205c45..210969e1a 100644 --- a/include/sc_boss_spell_worker.h +++ b/include/sc_boss_spell_worker.h @@ -107,7 +107,7 @@ class MANGOS_DLL_DECL BossSpellWorker void resetTimers() { - for (uint8 i = 0; i < bossSpellCount; ++i) + for (uint8 i = 0; i < _bossSpellCount; ++i) _resetTimer(i); }; @@ -169,7 +169,12 @@ class MANGOS_DLL_DECL BossSpellWorker return _SelectUnit(target, uiPosition); }; - Unit* SelectLowHPFriendly(float fRange = 50.0f, uint32 uiMinHPDiff = 0); + Unit* SelectLowHPFriendly(float fRange = 40.0f, uint32 uiMinHPDiff = 0); + + uint8 bossSpellCount() + { + return _bossSpellCount; + }; private: @@ -211,7 +216,7 @@ class MANGOS_DLL_DECL BossSpellWorker ScriptedAI* bossAI; Creature* boss; uint32 bossID; - uint8 bossSpellCount; + uint8 _bossSpellCount; Difficulty currentDifficulty; uint32 m_uiSpell_Timer[MAX_BOSS_SPELLS]; SpellTable m_BossSpell[MAX_BOSS_SPELLS]; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp index 2556c28d8..81c5eba8f 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp @@ -52,6 +52,12 @@ struct MANGOS_DLL_DECL boss_faction_championsAI : public ScriptedAI { CCTimer = rand()%10000; ThreatTimer = 5000; + bsw->resetTimers(); + m_creature->SetInCombatWithZone(); + m_creature->SetRespawnDelay(DAY); + if (mAIType == AI_MELEE) SetEquipmentSlots(false, 47427, 46964, EQUIP_NO_CHANGE); + if (mAIType == AI_RANGED) SetEquipmentSlots(false, 47156, EQUIP_NO_CHANGE, 48711); + if (mAIType == AI_HEALER) SetEquipmentSlots(false, 51799, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE); } void JustReachedHome() @@ -110,7 +116,7 @@ struct MANGOS_DLL_DECL boss_faction_championsAI : public ScriptedAI void JustDied(Unit *killer) { - if(m_pInstance) m_pInstance->SetData(TYPE_CHAMPIONS_COUNT, m_pInstance->GetData(TYPE_CHAMPIONS_COUNT)-1); + if(m_pInstance) m_pInstance->SetData(TYPE_CRUSADERS_COUNT, m_pInstance->GetData(TYPE_CRUSADERS_COUNT)-1); } void Aggro(Unit *who) @@ -176,7 +182,7 @@ struct MANGOS_DLL_DECL boss_faction_championsAI : public ScriptedAI if(mAIType==AI_MELEE) DoStartMovement(pWho); else - DoStartMovement(pWho, 40.0f); + DoStartMovement(pWho, 20.0f); } } @@ -197,6 +203,9 @@ struct MANGOS_DLL_DECL boss_faction_championsAI : public ScriptedAI } else CCTimer -= diff; + if(mAIType != AI_MELEE && EnemiesInRange(40.0f) < 1) + DoStartMovement(m_creature->getVictim(), 20.0f); + if(mAIType == AI_MELEE) DoMeleeAttackIfReady(); } }; @@ -234,20 +243,16 @@ struct MANGOS_DLL_DECL mob_toc_druidAI : public boss_faction_championsAI switch(urand(0,4)) { case 0: - if(Unit* target = DoSelectLowestHpFriendly(40.0f)) - bsw->doCast(SPELL_LIFEBLOOM, target); + bsw->doCast(SPELL_LIFEBLOOM); break; case 1: - if(Unit* target = DoSelectLowestHpFriendly(40.0f)) - bsw->doCast(SPELL_NOURISH, target); + bsw->doCast(SPELL_NOURISH); break; case 2: - if(Unit* target = DoSelectLowestHpFriendly(40.0f)) - bsw->doCast(SPELL_REGROWTH, target); + bsw->doCast(SPELL_REGROWTH); break; case 3: - if(Unit* target = DoSelectLowestHpFriendly(40.0f)) - bsw->doCast(SPELL_REJUVENATION, target); + bsw->doCast(SPELL_REJUVENATION); break; case 4: if(Creature* target = SelectRandomFriendlyMissingBuff(SPELL_THORNS)) @@ -260,79 +265,48 @@ struct MANGOS_DLL_DECL mob_toc_druidAI : public boss_faction_championsAI }; #define SPELL_HEALING_WAVE 66055 -#define H_SPELL_HEALING_WAVE 68115 #define SPELL_RIPTIDE 66053 -#define H_SPELL_RIPTIDE 68118 #define SPELL_SPIRIT_CLEANSE 66056 //friendly only #define SPELL_HEROISM 65983 #define SPELL_BLOODLUST 65980 #define SPELL_HEX 66054 #define SPELL_EARTH_SHIELD 66063 #define SPELL_EARTH_SHOCK 65973 -#define H_SPELL_EARTH_SHOCK 68100 struct MANGOS_DLL_DECL mob_toc_shamanAI : public boss_faction_championsAI { mob_toc_shamanAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_HEALER) {Init();} - uint32 HeroTimer; - uint32 HexTimer; - uint32 GCDTimer; - - void Init() - { - HeroTimer = 30000 + rand()%30000; - HexTimer = 10000 + rand()%30000; - GCDTimer = 2500; - } - void UpdateAI(const uint32 diff) { if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if(HeroTimer < diff) - { - DoCast(m_creature, SPELL_HEROISM); - HeroTimer = 600000; - } - else HeroTimer -= diff; + bsw->timedCast(SPELL_HEROISM, diff); - if(HexTimer < diff) - { - if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM,1)) - DoCast(target, SPELL_HEX); - HexTimer = 20000 + rand()%20000; - } - else HexTimer -= diff; + bsw->timedCast(SPELL_HEX, diff); - if(GCDTimer < diff) + if(bsw->timedQuery(SPELL_HEALING_WAVE, diff)) { switch(urand(0,5)) { case 0: case 1: - if(Unit *target = DoSelectLowestHpFriendly(40.0f)) - DoCast(target, SPELL_HEALING_WAVE); + bsw->doCast(SPELL_HEALING_WAVE); break; case 2: - if(Unit *target = DoSelectLowestHpFriendly(40.0f)) - DoCast(target, SPELL_RIPTIDE); + bsw->doCast(SPELL_RIPTIDE); break; case 3: - if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(target, SPELL_EARTH_SHOCK); + bsw->doCast(SPELL_EARTH_SHOCK); break; case 4: - if(Unit *target = DoSelectLowestHpFriendly(40.0f)) - DoCast(target, SPELL_SPIRIT_CLEANSE); + bsw->doCast(SPELL_SPIRIT_CLEANSE); break; case 5: if(Unit *target = SelectRandomFriendlyMissingBuff(SPELL_EARTH_SHIELD)) - DoCast(target, SPELL_EARTH_SHIELD); + bsw->doCast(target, SPELL_EARTH_SHIELD); break; } - GCDTimer = 2000; } - else GCDTimer -= diff; boss_faction_championsAI::UpdateAI(diff); } @@ -342,12 +316,8 @@ struct MANGOS_DLL_DECL mob_toc_shamanAI : public boss_faction_championsAI #define SPELL_BUBBLE 66010 //5 min cd #define SPELL_CLEANSE 66116 #define SPELL_FLASH_OF_LIGHT 66113 -#define H_SPELL_FLASH_OF_LIGHT 68008 #define SPELL_HOLY_LIGHT 66112 -#define H_SPELL_HOLY_LIGHT 68011 -#define SPELL_HAND_OF_PROTECTION 66009 #define SPELL_HOLY_SHOCK 66114 -#define H_SPELL_HOLY_SHOCK 68015 #define SPELL_HAND_OF_PROTECTION 66009 #define SPELL_HAMMER_OF_JUSTICE 66613 @@ -355,174 +325,85 @@ struct MANGOS_DLL_DECL mob_toc_paladinAI : public boss_faction_championsAI { mob_toc_paladinAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_HEALER) {Init();} - bool BubbleUsed; - bool ProtectionUsed; - uint32 FreedomTimer; - uint32 GCDTimer; - uint32 ShockTimer; - uint32 HammerOfJusticeTimer; - - void Init() - { - GCDTimer = 3000; - ShockTimer = 6000 + rand()%4000; - BubbleUsed = false; - ProtectionUsed = false; - FreedomTimer = 10000 + rand()%15000; - HammerOfJusticeTimer = 15000 + rand()%10000; - } - void UpdateAI(const uint32 diff) { if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; //cast bubble at 20% hp - if(!BubbleUsed && m_creature->GetHealth()*5 < m_creature->GetMaxHealth()) - { - DoCast(m_creature, SPELL_BUBBLE); - BubbleUsed = true; - } + if(m_creature->GetHealthPercent() < 20.0f) + bsw->timedCast(SPELL_BUBBLE, diff); - if(!ProtectionUsed) - { if(Unit *target = DoSelectLowestHpFriendly(40.0f)) - { - if(target->GetHealth() * 100 / target->GetMaxHealth() < 15) - { - DoCast(target, SPELL_HAND_OF_PROTECTION); - ProtectionUsed = true; - } - } - } + if(target->GetHealthPercent() < 15.0f) + bsw->timedCast(SPELL_HAND_OF_PROTECTION, diff); - if(ShockTimer < diff) - { - if(Unit *target = DoSelectLowestHpFriendly(40.0f)) - { - DoCast (target, SPELL_HOLY_SHOCK); - ShockTimer = 6000 + rand()%4000; - } - else - ShockTimer = 1000; - } - else ShockTimer -=diff; + bsw->timedCast(SPELL_HOLY_SHOCK, diff); - if(FreedomTimer < diff) - { if(Unit *target = SelectRandomFriendlyMissingBuff(SPELL_HAND_OF_FREEDOM)) - DoCast(target, SPELL_HAND_OF_FREEDOM); - FreedomTimer = 25000 + rand()%10000; - } - else FreedomTimer -= diff; + bsw->timedCast(SPELL_HAND_OF_FREEDOM, diff, target); - if(HammerOfJusticeTimer < diff) - { - if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) - { - if(m_creature->GetDistance2d(target) < 15) - { - DoCast(target, SPELL_HAMMER_OF_JUSTICE); - HammerOfJusticeTimer=40000+rand()%5000; - } - else - HammerOfJusticeTimer = 1000; - } - } - else HammerOfJusticeTimer -= diff; + bsw->timedCast(SPELL_HAMMER_OF_JUSTICE, diff); - if(GCDTimer < diff) + if(bsw->timedQuery(SPELL_FLASH_OF_LIGHT, diff)) { switch(urand(0,4)) { case 0: case 1: - if(Unit *target = DoSelectLowestHpFriendly(40.0f)) - DoCast(target, SPELL_FLASH_OF_LIGHT); + bsw->doCast(SPELL_FLASH_OF_LIGHT); break; case 2: case 3: - if(Unit *target = DoSelectLowestHpFriendly(40.0f)) - DoCast(target, SPELL_HOLY_LIGHT); + bsw->doCast(SPELL_HOLY_LIGHT); break; case 4: - if(Unit *target = DoSelectLowestHpFriendly(40.0f)) - DoCast(target, SPELL_CLEANSE); + bsw->doCast(SPELL_CLEANSE); break; } - GCDTimer = 2500; } - else GCDTimer -= diff; boss_faction_championsAI::UpdateAI(diff); } }; #define SPELL_RENEW 66177 -#define H_SPELL_RENEW 68035 #define SPELL_SHIELD 66099 -#define H_SPELL_SHIELD 68032 #define SPELL_FLASH_HEAL 66104 -#define H_SPELL_FLASH_HEAL 68023 #define SPELL_DISPEL 65546 #define SPELL_PSYCHIC_SCREAM 65543 #define SPELL_MANA_BURN 66100 -#define H_SPELL_MANA_BURN 68026 struct MANGOS_DLL_DECL mob_toc_priestAI : public boss_faction_championsAI { mob_toc_priestAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_HEALER) {Init();} - uint32 GCDTimer; - uint32 ScreamTimer; - - void Init() - { - GCDTimer = 2500; - ScreamTimer = 5000; - } - void UpdateAI(const uint32 diff) { if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if(ScreamTimer < diff) - { if(EnemiesInRange(10.0f) > 2) - { - DoCast(m_creature, SPELL_PSYCHIC_SCREAM); - ScreamTimer = 30000; - } - else - ScreamTimer = 3000; - } - else ScreamTimer -= diff; + bsw->timedCast(SPELL_PSYCHIC_SCREAM, diff); - if(GCDTimer < diff) + if(bsw->timedQuery(SPELL_RENEW, diff)) { switch(urand(0,5)) { case 0: - if(Unit *target = DoSelectLowestHpFriendly(40.0f)) - DoCast(target, SPELL_RENEW); + bsw->doCast(SPELL_RENEW); break; case 1: - if(Unit *target = DoSelectLowestHpFriendly(40.0f)) - DoCast(target, SPELL_SHIELD); + bsw->doCast(SPELL_SHIELD); break; case 2: case 3: - if(Unit *target = DoSelectLowestHpFriendly(40.0f)) - DoCast(target, SPELL_FLASH_HEAL); + bsw->doCast(SPELL_FLASH_HEAL); break; case 4: if(Unit *target = urand(0,1) ? SelectUnit(SELECT_TARGET_RANDOM,0) : DoSelectLowestHpFriendly(40.0f)) - DoCast(target, SPELL_DISPEL); + bsw->doCast(target, SPELL_DISPEL); break; case 5: - if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(target, SPELL_MANA_BURN); + bsw->doCast(SPELL_MANA_BURN); break; } - GCDTimer = 2000; } - else GCDTimer -= diff; boss_faction_championsAI::UpdateAI(diff); } @@ -534,13 +415,9 @@ struct MANGOS_DLL_DECL mob_toc_priestAI : public boss_faction_championsAI #define SPELL_SILENCE 65542 #define SPELL_VAMPIRIC_TOUCH 65490 -#define H_SPELL_VAMPIRIC_TOUCH 68091 #define SPELL_SW_PAIN 65541 -#define H_SPELL_SW_PAIN 68088 #define SPELL_MIND_FLAY 65488 -#define H_SPELL_MIND_FLAY 68042 #define SPELL_MIND_BLAST 65492 -#define H_SPELL_MIND_BLAST 68038 #define SPELL_HORROR 65545 #define SPELL_DISPERSION 65544 #define SPELL_SHADOWFORM 16592 @@ -549,110 +426,56 @@ struct MANGOS_DLL_DECL mob_toc_shadow_priestAI : public boss_faction_championsAI { mob_toc_shadow_priestAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_RANGED) {Init();} - uint32 SilenceTimer; - uint32 PsychicScreamTimer; - uint32 MindBlastTimer; - uint32 GCDTimer; - uint32 DispersionTimer; - - void Init() - { - SilenceTimer = 15000; - PsychicScreamTimer = 8000; - MindBlastTimer = 15000; - GCDTimer = 3000; - DispersionTimer = 1000; - } - void Aggro(Unit *who) { boss_faction_championsAI::Aggro(who); - DoCast(m_creature, SPELL_SHADOWFORM, true); + bsw->doCast(SPELL_SHADOWFORM); } void UpdateAI(const uint32 diff) { if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if(PsychicScreamTimer < diff) - { if(EnemiesInRange(10.0f) > 2) - { - DoCast(m_creature, SPELL_PSYCHIC_SCREAM); - PsychicScreamTimer = 24000; - } - else - PsychicScreamTimer = 3000; - } - else PsychicScreamTimer -= diff; + bsw->timedCast(SPELL_PSYCHIC_SCREAM, diff); - if(DispersionTimer < diff) - { - if(m_creature->GetHealth()*5 < m_creature->GetMaxHealth()) - { - DoCast(m_creature, SPELL_DISPERSION); - DispersionTimer = 180000; - } - else DispersionTimer = 1000; - } - else DispersionTimer -= diff; + if(m_creature->GetHealthPercent() < 20.0f) + bsw->timedCast(SPELL_DISPERSION, diff); - if(SilenceTimer < diff) - { if(Unit *target = SelectEnemyCaster(false)) - DoCast(target, SPELL_SILENCE); - SilenceTimer = 45000; - } - else SilenceTimer -= diff; + bsw->timedCast(SPELL_SILENCE, diff, target); - if(MindBlastTimer < diff) - { - DoCast(m_creature->getVictim(), SPELL_MIND_BLAST); - MindBlastTimer = 8000; - } - else MindBlastTimer -= diff; + bsw->timedCast(SPELL_MIND_BLAST, diff); - if(GCDTimer < diff) + if(bsw->timedQuery(SPELL_MIND_FLAY, diff)) { switch(urand(0,4)) { case 0: case 1: - DoCast(m_creature->getVictim(), SPELL_MIND_FLAY); + bsw->doCast(SPELL_MIND_FLAY); break; case 2: - if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(target, SPELL_VAMPIRIC_TOUCH); + bsw->doCast(SPELL_VAMPIRIC_TOUCH); break; case 3: - if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(target, SPELL_SW_PAIN); + bsw->doCast(SPELL_SW_PAIN); break; case 4: - if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(target, SPELL_DISPEL); + bsw->doCast(SPELL_DISPEL); break; } - GCDTimer = 2000; } - else GCDTimer -= diff; - boss_faction_championsAI::UpdateAI(diff); } }; #define SPELL_HELLFIRE 65816 -#define H_SPELL_HELLFIRE 68146 #define SPELL_CORRUPTION 65810 -#define H_SPELL_CORRUPTION 68134 #define SPELL_Curse_of_Agony 65814 -#define H_SPELL_Curse_of_Agony 68137 #define SPELL_Curse_of_Exhaustion 65815 #define SPELL_Fear 65809 //8s #define SPELL_Searing_Pain 65819 -#define H_SPELL_Searing_Pain 68149 #define SPELL_Shadow_Bolt 65821 -#define H_SPELL_Shadow_Bolt 68152 -#define SPELL_Summon_Felhunter 67514 #define SPELL_Unstable_Affliction 65812 #define H_SPELL_Unstable_Affliction 68155 //15s @@ -660,195 +483,104 @@ struct MANGOS_DLL_DECL mob_toc_warlockAI : public boss_faction_championsAI { mob_toc_warlockAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_RANGED) {Init();} - uint32 FearTimer; - uint32 UnstableAfflictionTimer; - uint32 HellfireTimer; - uint32 GCDTimer; - - void Init() - { - FearTimer = 4000+rand()%1000; - UnstableAfflictionTimer = 2000+rand()%1000; - HellfireTimer = 15000; - GCDTimer = 2500; - } - void UpdateAI(const uint32 diff) { if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if(FearTimer < diff) - { - if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(target, SPELL_Fear); - FearTimer = 8000; - } - else FearTimer -= diff; + bsw->timedCast(SPELL_Fear, diff); - if(HellfireTimer < diff) - { if(EnemiesInRange(10.0f) > 2) - { - DoCast(m_creature, SPELL_HELLFIRE); - HellfireTimer = 40000; - } - else - HellfireTimer = 5000; - } - else HellfireTimer -= diff; + bsw->timedCast(SPELL_HELLFIRE, diff); - if(UnstableAfflictionTimer < diff) - { - if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(target, SPELL_Unstable_Affliction); - UnstableAfflictionTimer = 15000; - } - else UnstableAfflictionTimer -= diff; + bsw->timedCast(SPELL_Unstable_Affliction, diff); - if(GCDTimer < diff) + if(bsw->timedQuery(SPELL_Shadow_Bolt, diff)) { switch(urand(0,5)) { case 0: - DoCast(m_creature->getVictim(), SPELL_Searing_Pain ); - break; + bsw->doCast(SPELL_Searing_Pain); + break; case 1: case 2: - DoCast(m_creature->getVictim(), SPELL_Shadow_Bolt ); - break; - case 3: - if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(target, SPELL_CORRUPTION); - break; - case 4: - if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(target, SPELL_Curse_of_Agony); + bsw->doCast(SPELL_Shadow_Bolt); break; - case 5: - if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(target, SPELL_Curse_of_Exhaustion); - break; - } - GCDTimer = 2500; - } - else GCDTimer -= diff; - - boss_faction_championsAI::UpdateAI(diff); + case 3: + bsw->doCast(SPELL_CORRUPTION); + break; + case 4: + bsw->doCast(SPELL_Curse_of_Agony); + break; + case 5: + bsw->doCast(SPELL_Curse_of_Exhaustion); + break; + } + } + boss_faction_championsAI::UpdateAI(diff); } }; #define SPELL_Arcane_Barrage 65799 //3s -#define H_SPELL_Arcane_Barrage 67995 -#define SPELL_Arcane_Blast 65791 -#define H_SPELL_Arcane_Blast 67998 +#define SPELL_Arcane_Blast 65791 #define SPELL_Arcane_Explosion 65800 -#define H_SPELL_Arcane_Explosion 68001 -#define SPELL_Blink 65793 //15s -#define SPELL_Counterspell 65790 //24s -#define SPELL_Frost_Nova 65792 //25s -#define SPELL_Frostbolt 65807 -#define H_SPELL_Frostbolt 68004 -#define SPELL_Ice_Block 65802 //5min -#define SPELL_Polymorph 65801 //15s +#define SPELL_Blink 65793 //15s +#define SPELL_Counterspell 65790 //24s +#define SPELL_Frost_Nova 65792 //25s +#define SPELL_Frostbolt 65807 +#define SPELL_Ice_Block 65802 //5min +#define SPELL_Polymorph 65801 //15s struct MANGOS_DLL_DECL mob_toc_mageAI : public boss_faction_championsAI { mob_toc_mageAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_RANGED) {Init();} - uint32 ArcaneBarrageTimer; - uint32 BlinkTimer; - uint32 CounterspellTimer; - uint32 FrostNovaTimer; - bool IceBlockUsed; - uint32 PolymorphTimer; - uint32 GCDTimer; - - void Init() - { - ArcaneBarrageTimer = 2000+rand()%1000; - BlinkTimer = 8000+rand()%1000; - CounterspellTimer = 5000+rand()%1000; - FrostNovaTimer = 7000+rand()%2000; - IceBlockUsed = false; - PolymorphTimer = 3000+rand()%3000; - GCDTimer = 2000; - } - void UpdateAI(const uint32 diff) { if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if(CounterspellTimer < diff) - { if(Unit *target = SelectEnemyCaster(false)) - DoCast (target, SPELL_Counterspell); - CounterspellTimer = 24000; - } - else CounterspellTimer -= diff; + bsw->timedCast(SPELL_Counterspell, diff, target); - if(BlinkTimer < diff) // escape - { - if(m_creature->GetHealth()*2 < m_creature->GetMaxHealth() && EnemiesInRange(10.0f)>3) + if(m_creature->GetHealthPercent() < 50.0f + && EnemiesInRange(10.0f)>3 ) { - DoCast(m_creature, SPELL_Frost_Nova, true); - DoCast (m_creature , SPELL_Blink); - BlinkTimer = 25000; + bsw->timedCast(SPELL_Frost_Nova, diff); + bsw->timedCast(SPELL_Blink, diff); } - else - BlinkTimer = 5000; - } - else BlinkTimer -= diff; - if(!IceBlockUsed && m_creature->GetHealth()*5 < m_creature->GetMaxHealth()) - { - DoCast(m_creature, SPELL_Ice_Block); - IceBlockUsed = true; - } + if(m_creature->GetHealthPercent() < 20.0f) + bsw->timedCast(SPELL_Ice_Block, diff); - if(PolymorphTimer < diff) - { - if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM,1)) - DoCast(target, SPELL_Polymorph); - PolymorphTimer = 15000; - } - else PolymorphTimer -= diff; + bsw->timedCast(SPELL_Polymorph, diff); - if(GCDTimer < diff) + if(bsw->timedQuery(SPELL_Arcane_Barrage, diff)) { switch(urand(0,2)) { case 0: - DoCast(m_creature->getVictim(), SPELL_Arcane_Barrage); + bsw->doCast(SPELL_Arcane_Barrage); break; case 1: - DoCast(m_creature->getVictim(), SPELL_Arcane_Blast); + bsw->doCast(SPELL_Arcane_Blast); break; case 2: - if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(target, SPELL_Frostbolt); + bsw->doCast(SPELL_Frostbolt); break; } - GCDTimer = 2500; } - else GCDTimer -= diff; - boss_faction_championsAI::UpdateAI(diff); } }; -#define SPELL_AIMED_SHOT 65883 -#define H_SPELL_AIMED_SHOT 67978//10s -#define SPELL_Call_Pet 67777//perm -#define SPELL_Deterrence 65871 //90s -#define SPELL_Disengage 65869 //30s +#define SPELL_AIMED_SHOT 65883 +#define SPELL_Deterrence 65871 //90s +#define SPELL_Disengage 65869 //30s #define SPELL_EXPLOSIVE_SHOT 65866 -#define H_SPELL_EXPLOSIVE_SHOT 67984 //6s -#define SPELL_Frost_Trap 65880 //30s -#define SPELL_SHOOT 65868 //1.7s -#define H_SPELL_SHOOT 67989 -#define SPELL_Steady_Shot 65867 //3s -#define SPELL_WING_CLIP 66207 //6s -#define SPELL_Wyvern_Sting 65877 //60s +#define SPELL_Frost_Trap 65880 //30s +#define SPELL_SHOOT 65868 //1.7s +#define SPELL_Steady_Shot 65867 //3s +#define SPELL_WING_CLIP 66207 //6s +#define SPELL_Wyvern_Sting 65877 //60s struct MANGOS_DLL_DECL mob_toc_hunterAI : public boss_faction_championsAI { @@ -883,171 +615,82 @@ struct MANGOS_DLL_DECL mob_toc_hunterAI : public boss_faction_championsAI { if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if(DisengageTimer < diff) - { if(EnemiesInRange(10.0f) > 3) - { - DoCast(m_creature , SPELL_Disengage); - DisengageTimer = 30000; - } - else - DisengageTimer = 3000; - } - else DisengageTimer -= diff; + bsw->timedCast(SPELL_Disengage, diff); - if(DeterrenceTimer < diff) - { - if(m_creature->GetHealth()*5 < m_creature->GetMaxHealth()) - { - DoCast(m_creature, SPELL_Deterrence); - DeterrenceTimer = 90000; - } - else DeterrenceTimer = 3000; - } - else DeterrenceTimer -= diff; + if(m_creature->GetHealthPercent() < 20.0f) + bsw->timedCast(SPELL_Deterrence, diff); - if(WyvernStingTimer < diff) - { - if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM,1)) - DoCast(target, SPELL_Wyvern_Sting); - WyvernStingTimer = 60000; - } - else WyvernStingTimer -= diff; + bsw->timedCast(SPELL_Wyvern_Sting, diff); - if(FrostTrapTimer < diff) - { - DoCast(m_creature, SPELL_Frost_Trap ); - FrostTrapTimer = 30000 + rand()%1000; - } - else FrostTrapTimer -= diff; + bsw->timedCast(SPELL_Frost_Trap, diff ); - if(WingClipTimer < diff) - { if(m_creature->GetDistance2d(m_creature->getVictim()) < 5.0f) - DoCast(m_creature->getVictim(), SPELL_WING_CLIP); - WingClipTimer = 5000; - } - else WingClipTimer-= diff; + bsw->timedCast(SPELL_WING_CLIP, diff); - if(GCDTimer < diff) + if(bsw->timedQuery(SPELL_SHOOT, diff)) { switch(urand(0,3)) { case 0: case 1: - DoCast(m_creature->getVictim(), SPELL_SHOOT); + bsw->doCast(SPELL_SHOOT); break; case 2: - DoCast(m_creature->getVictim(), SPELL_EXPLOSIVE_SHOT); + bsw->doCast(SPELL_EXPLOSIVE_SHOT); break; case 3: - DoCast(m_creature->getVictim(), SPELL_AIMED_SHOT); + bsw->doCast(SPELL_AIMED_SHOT); break; } - GCDTimer = 2500; - } - else GCDTimer -= diff; - + } boss_faction_championsAI::UpdateAI(diff); } }; -#define SPELL_Cyclone 65859 //6s +#define SPELL_Cyclone 65859 //6s #define SPELL_Entangling_Roots 65857 //10s -#define SPELL_Faerie_Fire 65863 -#define SPELL_Force_of_Nature 65861 //180s -#define SPELL_Insect_Swarm 65855 -#define H_SPELL_Insect_Swarm 67942 -#define SPELL_Moonfire 65856 //5s -#define H_SPELL_Moonfire 67945 -#define SPELL_Starfire 65854 -#define H_SPELL_Starfire 67948 -#define SPELL_Wrath 65862 -#define H_SPELL_Wrath 67952 +#define SPELL_Faerie_Fire 65863 +#define SPELL_Force_of_Nature 65861 //180s +#define SPELL_Insect_Swarm 65855 +#define SPELL_Moonfire 65856 //5s +#define SPELL_Starfire 65854 +#define SPELL_Wrath 65862 struct MANGOS_DLL_DECL mob_toc_boomkinAI : public boss_faction_championsAI { mob_toc_boomkinAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_RANGED) {Init();} - uint32 BarkskinTimer; - uint32 CycloneTimer; - uint32 EntanglingRootsTimer; - uint32 MoonfireTimer; - uint32 FaerieFireTimer; - uint32 GCDTimer; - - void Init() - { - BarkskinTimer = 6000; - CycloneTimer = 5000; - EntanglingRootsTimer = 2000+rand()%1000; - MoonfireTimer = 1000+rand()%1000; - FaerieFireTimer = 10000; - GCDTimer = 1500; - } - void UpdateAI(const uint32 diff) { if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if(BarkskinTimer < diff) - { - if(m_creature->GetHealth()*2 < m_creature->GetMaxHealth()) - { - DoCast (m_creature, SPELL_BARKSKIN); - BarkskinTimer = 60000; - } - else - BarkskinTimer = 3000; - } - else BarkskinTimer -= diff; + if(m_creature->GetHealthPercent() < 50.0f) + bsw->timedCast(SPELL_BARKSKIN, diff); - if(CycloneTimer < diff) - { - if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM,1)) - DoCast (target, SPELL_Cyclone); - CycloneTimer = 6000+rand()%2000; - } - else CycloneTimer -= diff; + bsw->timedCast(SPELL_Cyclone, diff); - if(EntanglingRootsTimer < diff) - { - if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(target, SPELL_Entangling_Roots); - EntanglingRootsTimer = 10000 + rand()%2000; - } - else EntanglingRootsTimer -= diff; + bsw->timedCast(SPELL_Entangling_Roots, diff); - if(FaerieFireTimer < diff) - { - if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(target, SPELL_Faerie_Fire); - FaerieFireTimer = 10000 + rand()%8000; - } - else FaerieFireTimer -= diff; + bsw->timedCast(SPELL_Faerie_Fire, diff); - if(GCDTimer < diff) + if(bsw->timedQuery(SPELL_Moonfire, diff)) { switch(urand(0,6)) { case 0: case 1: - DoCast(m_creature->getVictim(), SPELL_Moonfire); - break; - case 2: - if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(target,SPELL_Insect_Swarm); - break; - case 3: - if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(m_creature->getVictim(), SPELL_Starfire); - break; + bsw->doCast(SPELL_Moonfire); + break; + case 2: + bsw->doCast(SPELL_Insect_Swarm); + break; + case 3: + bsw->doCast(SPELL_Starfire); + break; case 4: case 5: case 6: - DoCast(m_creature->getVictim(), SPELL_Wrath); - break; - } - GCDTimer = 2000; - } - else GCDTimer -= diff; - + bsw->doCast(SPELL_Wrath); + break; + } + } boss_faction_championsAI::UpdateAI(diff); } }; @@ -1070,206 +713,77 @@ struct MANGOS_DLL_DECL mob_toc_warriorAI : public boss_faction_championsAI { mob_toc_warriorAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_MELEE) {Init();} - uint32 BladestormTimer; - uint32 FearTimer; - uint32 MortalStrikeTimer; - uint32 ChargeTimer; - uint32 SunderArmorTimer; - uint32 RetaliationTimer; - uint32 ShatteringThrowTimer; - uint32 DisarmTimer; - - void Init() - { - BladestormTimer = 20000 + rand()%10000; - FearTimer = 10000 + rand()%10000; - MortalStrikeTimer = 6000 + rand()%4000; - ChargeTimer = 1000; - SunderArmorTimer = 5000; - RetaliationTimer = 30000 + rand()%8000; - ShatteringThrowTimer = 10000 + rand()%30000; - DisarmTimer = 5000 + rand()%20000; - } - void UpdateAI(const uint32 diff) { if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if(BladestormTimer < diff) - { - DoCast(m_creature, SPELL_BLADESTORM); - BladestormTimer = 90000 + rand()%5000; - } - else BladestormTimer -= diff; + bsw->timedCast(SPELL_BLADESTORM, diff); - if(FearTimer < diff) - { - DoCast(m_creature->getVictim(), SPELL_INTIMIDATING_SHOUT); - FearTimer = 40000 + rand()%40000; - } - else FearTimer -= diff; + bsw->timedCast(SPELL_INTIMIDATING_SHOUT, diff); - if(MortalStrikeTimer < diff) - { - DoCast(m_creature->getVictim(), SPELL_MORTAL_STRIKE); - MortalStrikeTimer = 6000 + rand()%2000; - } - else MortalStrikeTimer -= diff; + bsw->timedCast(SPELL_MORTAL_STRIKE, diff); - if(SunderArmorTimer < diff) - { - DoCast(m_creature->getVictim(), SPELL_SUNDER_ARMOR); - SunderArmorTimer = 2000+rand()%5000; - } - else SunderArmorTimer -= diff; + bsw->timedCast(SPELL_SUNDER_ARMOR, diff); - if(ChargeTimer < diff) - { - if(m_creature->IsInRange(m_creature->getVictim(), 8.0f, 25.0f, false)) - { - DoCast(m_creature->getVictim(), SPELL_CHARGE); - ChargeTimer = 12000; - } - else - ChargeTimer = 2000; - } - else ChargeTimer -= diff; + bsw->timedCast(SPELL_CHARGE, diff); - if(RetaliationTimer < diff) - { - DoCast(m_creature, SPELL_RETALIATION); - RetaliationTimer = 300000 + rand()%10000; - } - else RetaliationTimer -= diff; + bsw->timedCast(SPELL_RETALIATION, diff); - if(ShatteringThrowTimer < diff) - { - DoCast(m_creature->getVictim(), SPELL_SHATTERING_THROW); - ShatteringThrowTimer = 300000 + rand()%30000; - } - else ShatteringThrowTimer -= diff; + bsw->timedCast(SPELL_OVERPOWER, diff); - if(DisarmTimer < diff) - { - DoCast(m_creature->getVictim(), SPELL_DISARM); - DisarmTimer = 60000 + rand()%6000; - } - else DisarmTimer -= diff; + bsw->timedCast(SPELL_SHATTERING_THROW, diff); + + bsw->timedCast(SPELL_DISARM, diff); boss_faction_championsAI::UpdateAI(diff); } }; -#define SPELL_Chains_of_Ice 66020 //8sec -#define SPELL_Death_Coil 66019 //5sec -#define H_SPELL_Death_Coil 67930 -#define SPELL_Death_Grip 66017 //35sec -#define SPELL_Frost_Strike 66047 //6sec -#define H_SPELL_Frost_Strike 67936 +#define SPELL_Chains_of_Ice 66020 //8sec +#define SPELL_Death_Coil 66019 //5sec +#define SPELL_Death_Grip 66017 //35sec +#define SPELL_Frost_Strike 66047 //6sec #define SPELL_Icebound_Fortitude 66023 //1min -#define SPELL_Icy_Touch 66021 //8sec -#define H_SPELL_Icy_Touch 67939 -#define SPELL_Strangulate 66018 //2min +#define SPELL_Icy_Touch 66021 //8sec +#define SPELL_Strangulate 66018 //2min struct MANGOS_DLL_DECL mob_toc_dkAI : public boss_faction_championsAI { mob_toc_dkAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_MELEE) {Init();} - uint32 ChainsOfIceTimer; - uint32 DeathCoilTimer; - uint32 DeathGripTimer; - uint32 FrostStrikeTimer; - uint32 IceboundFortitudeTimer; - uint32 IcyTouchTimer; - uint32 StrangulateTimer; - - void Init() - { - ChainsOfIceTimer = 2000+rand()%3000; - DeathCoilTimer = 3000+rand()%4000; - DeathGripTimer = 1000+rand()%2000; - FrostStrikeTimer = 4000+rand()%2000; - IceboundFortitudeTimer = 20000; - IcyTouchTimer = 6000+rand()%2000; - StrangulateTimer = 6000+rand()%10000; - } - void UpdateAI(const uint32 diff) { if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if(IceboundFortitudeTimer < diff) - { - if(m_creature->GetHealth()*2 < m_creature->GetMaxHealth()) - { - DoCast(m_creature, SPELL_Icebound_Fortitude); - IceboundFortitudeTimer = 60000 + rand()%10000; - } - else - IceboundFortitudeTimer = 5000; - } - else IceboundFortitudeTimer -= diff; + if(m_creature->GetHealthPercent() < 50.0f) + bsw->timedCast(SPELL_Icebound_Fortitude, diff); - if(ChainsOfIceTimer < diff) - { - DoCast(m_creature->getVictim(), SPELL_Chains_of_Ice); - ChainsOfIceTimer = 8000 + rand()%6000; - } - else ChainsOfIceTimer -= diff; + bsw->timedCast(SPELL_Chains_of_Ice, diff); - if(DeathCoilTimer < diff) - { - DoCast(m_creature->getVictim(), SPELL_Death_Coil); - DeathCoilTimer = 6000 + rand()%4000; - } - else DeathCoilTimer -= diff; + bsw->timedCast(SPELL_Death_Coil, diff); - if(StrangulateTimer < diff) - { - if(Unit *target = SelectEnemyCaster(false)) - DoCast(target , SPELL_Strangulate); - StrangulateTimer = 60000 + rand()%6000; - } - else StrangulateTimer -= diff; + if(Unit *target = SelectEnemyCaster(false)) + bsw->timedCast(SPELL_Strangulate, diff, target); - if(FrostStrikeTimer < diff) - { - DoCast (m_creature->getVictim(), SPELL_Frost_Strike); - FrostStrikeTimer = 5000 + rand()%5000; - } - else FrostStrikeTimer -= diff; + bsw->timedCast(SPELL_Frost_Strike, diff); - if(IcyTouchTimer < diff) - { - DoCast(m_creature->getVictim(), SPELL_Icy_Touch); - IcyTouchTimer = 8000 + rand()%4000; - } - else IcyTouchTimer -= diff; + bsw->timedCast(SPELL_Icy_Touch, diff); - if(DeathGripTimer < diff) - { if(m_creature->IsInRange(m_creature->getVictim(), 10.0f, 30.0f, false)) - { - DoCast(m_creature->getVictim(), SPELL_Death_Grip); - DeathGripTimer = 35000 + rand()%1000; - } - else DeathGripTimer = 3000; - } - else DeathGripTimer -= diff; + bsw->timedCast(SPELL_Death_Grip, diff); boss_faction_championsAI::UpdateAI(diff); } }; - -#define SPELL_FAN_OF_KNIVES 52874 //correst is 65955 //2sec -#define SPELL_BLIND 43433 //correst is 65960 //2min + +#define SPELL_FAN_OF_KNIVES 65955 //2sec +#define SPELL_BLIND 65960 //2min #define SPELL_CLOAK 65961 //90sec #define SPELL_Blade_Flurry 65956 //2min #define SPELL_SHADOWSTEP 66178 //30sec -#define SPELL_HEMORRHAGE 65897 //correct is65954 -#define SPELL_EVISCERATE 71933 //correct is 65957 -#define H_SPELL_EVISCERATE 71933 //correct is 68095 - +#define SPELL_HEMORRHAGE 65954 +#define SPELL_EVISCERATE 65957 + struct MANGOS_DLL_DECL mob_toc_rogueAI : public boss_faction_championsAI { mob_toc_rogueAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_MELEE) {Init();} @@ -1297,71 +811,24 @@ struct MANGOS_DLL_DECL mob_toc_rogueAI : public boss_faction_championsAI { if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if(FanOfKnivesTimer < diff) - { - if(EnemiesInRange(15.0f) > 2) - DoCast(m_creature->getVictim(), SPELL_FAN_OF_KNIVES); - FanOfKnivesTimer = 3000; - } - else FanOfKnivesTimer -= diff; + if(EnemiesInRange(15.0f) > 2) + bsw->timedCast(SPELL_FAN_OF_KNIVES, diff); - if(HemorrhageTimer < diff) - { - DoCast(m_creature->getVictim(), SPELL_HEMORRHAGE); - HemorrhageTimer = 5000 + rand()%2000; - } - else HemorrhageTimer -= diff; + bsw->timedCast(SPELL_HEMORRHAGE, diff); - if(EviscerateTimer < diff) - { - DoCast(m_creature->getVictim(), SPELL_EVISCERATE); - EviscerateTimer = 7000 + rand()%3000; - } - else EviscerateTimer -= diff; + bsw->timedCast(SPELL_EVISCERATE, diff); - if(ShadowstepTimer < diff) - { - if(m_creature->IsInRange(m_creature->getVictim(), 10.0f, 40.0f)) - { - DoCast(m_creature->getVictim(), SPELL_SHADOWSTEP); - ShadowstepTimer = 30000 + rand()%6000; - } - else ShadowstepTimer = 2000; - } - else ShadowstepTimer -= diff; + if(m_creature->IsInRange(m_creature->getVictim(), 10.0f, 40.0f)) + bsw->timedCast(SPELL_SHADOWSTEP, diff); - if(BlindTimer < diff) - { - if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM,1)) - { - if(m_creature->IsInRange(target, 0.0f, 15.0f, false)) - { - DoCast(target, SPELL_BLIND); - BlindTimer = 120000 + rand()%6000; - } - else BlindTimer = 2000; - } - else BlindTimer = 2000; - } - else BlindTimer -= diff; + if(Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1)) + if(m_creature->IsInRange(target, 0.0f, 15.0f, false)) + bsw->timedCast(SPELL_BLIND, diff, target); - if(CloakTimer < diff) //If rogue really damaged... - { - if(m_creature->GetHealth()*2 < m_creature->GetMaxHealth()) - { - DoCast(m_creature, SPELL_CLOAK); //...She will cloak. - CloakTimer = 90000; - } - else CloakTimer = 5000; - } - else CloakTimer -= diff; + if(m_creature->GetHealthPercent() < 50.0f) + bsw->timedCast(SPELL_CLOAK, diff); - if(BladeFlurryTimer < diff) - { - DoCast(m_creature, SPELL_Blade_Flurry); - BladeFlurryTimer = 120000 + rand()%5000; - } - else BladeFlurryTimer -= diff; + bsw->timedCast(SPELL_Blade_Flurry, diff); boss_faction_championsAI::UpdateAI(diff); } @@ -1375,81 +842,40 @@ struct MANGOS_DLL_DECL mob_toc_enh_shamanAI : public boss_faction_championsAI { mob_toc_enh_shamanAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_MELEE) {Init();} - uint32 HeroismTimer; - uint32 ShockTimer; - uint32 LavaLashTimer; - uint32 StormstrikeTimer; - - void Init() - { - ShockTimer=3000+rand()%2000; - LavaLashTimer=4000+rand()%2000; - StormstrikeTimer=5000+rand()%2000; - HeroismTimer=5000+rand()%20000; - } void UpdateAI(const uint32 diff) { if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if(HeroismTimer < diff) - { - DoCast(m_creature, SPELL_HEROISM); - HeroismTimer = 600000; - } - else HeroismTimer -= diff; + bsw->timedCast(SPELL_HEROISM, diff); - if(ShockTimer < diff) - { - if(Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) - DoCast(target, SPELL_EARTH_SHOCK); - ShockTimer = 6000 + rand()%1000; - } - else ShockTimer -= diff; + bsw->timedCast(SPELL_EARTH_SHOCK, diff); - if(StormstrikeTimer < diff) - { - DoCast(m_creature->getVictim(), SPELL_STORMSTRIKE); - StormstrikeTimer = 8000 + rand()%4000; - } - else StormstrikeTimer -= diff; + bsw->timedCast(SPELL_STORMSTRIKE, diff); - if(LavaLashTimer < diff) - { - DoCast (m_creature->getVictim(), SPELL_LAVA_LASH); - LavaLashTimer = 8000 + rand()%5000; - } - else LavaLashTimer -= diff; + bsw->timedCast(SPELL_LAVA_LASH, diff); boss_faction_championsAI::UpdateAI(diff); } }; -#define SPELL_Avenging_Wrath 66011 //3min cd -#define SPELL_Crusader_Strike 66003 //6sec cd -#define SPELL_Divine_Shield 66010 //5min cd -#define SPELL_Divine_Storm 66006 //10sec cd -#define SPELL_Hammer_of_Justice 66007 //40sec cd -#define SPELL_Hand_of_Protection 66009 //5min cd +#define SPELL_Avenging_Wrath 66011 //3min cd +#define SPELL_Crusader_Strike 66003 //6sec cd +#define SPELL_Divine_Shield 66010 //5min cd +#define SPELL_Divine_Storm 66006 //10sec cd +#define SPELL_Hammer_of_Justice 66007 //40sec cd +#define SPELL_Hand_of_Protection 66009 //5min cd #define SPELL_Judgement_of_Command 66005 //8sec cd -#define SPELL_REPENTANCE 66008 //60sec cd -#define SPELL_Seal_of_Command 66004 //no cd +#define SPELL_REPENTANCE 66008 //60sec cd +#define SPELL_Seal_of_Command 66004 //no cd struct MANGOS_DLL_DECL mob_toc_retro_paladinAI : public boss_faction_championsAI { mob_toc_retro_paladinAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_MELEE) {Init();} - bool ShieldUsed; - - void Init() - { - ShieldUsed = false; - } - void Aggro(Unit *who) { boss_faction_championsAI::Aggro(who); - bsw->doCast(SPELL_Seal_of_Command); } @@ -1463,11 +889,8 @@ struct MANGOS_DLL_DECL mob_toc_retro_paladinAI : public boss_faction_championsAI bsw->timedCast(SPELL_Avenging_Wrath, diff); - if(!ShieldUsed && m_creature->GetHealthPercent() < 20.0f) - { - bsw->doCast(SPELL_Divine_Shield); - ShieldUsed = true; - } + if(m_creature->GetHealthPercent() < 20.0f) + bsw->timedCast(SPELL_Divine_Shield, diff); bsw->timedCast(SPELL_Divine_Storm, diff); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp index 0ca4fa929..ac2689679 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp @@ -135,8 +135,11 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI bsw->timedCast(SPELL_FEL_LIGHTING, uiDiff); if (bsw->timedQuery(SPELL_INCINERATE_FLESH, uiDiff)) { - DoScriptText(-1713522,m_creature); - bsw->doCast(SPELL_INCINERATE_FLESH); + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,1)) + { + DoScriptText(-1713522,m_creature,pTarget); + bsw->doCast(SPELL_INCINERATE_FLESH,pTarget); + } } if (bsw->timedQuery(SPELL_LEGION_FLAME_1, uiDiff)) { diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index 97f5fd6f9..5308529bc 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -448,9 +448,9 @@ struct MANGOS_DLL_DECL mob_slime_poolAI : public ScriptedAI void Reset() { - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); +// m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->SetInCombatWithZone(); - m_creature->SetSpeedRate(MOVE_RUN, 0.08f); + m_creature->SetSpeedRate(MOVE_RUN, 0.05f); bsw->doCast(SPELL_SLIME_POOL_2); m_Size = m_creature->GetFloatValue(OBJECT_FIELD_SCALE_X); } @@ -461,7 +461,7 @@ struct MANGOS_DLL_DECL mob_slime_poolAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; if (bsw->timedQuery(SPELL_SLIME_POOL_2,uiDiff)) { - m_Size = m_Size*1.035; + m_Size = m_Size*1.03; m_creature->SetFloatValue(OBJECT_FIELD_SCALE_X, m_Size); } } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index cdb751081..e44d3c342 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -44,6 +44,8 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance uint32 m_uiFjolaCasting; uint32 m_uiEydisCasting; + uint32 m_auiCrusadersCount; + uint64 m_uiBarrentGUID; uint64 m_uiTirionGUID; uint64 m_uiFizzlebangGUID; @@ -106,6 +108,7 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance uint64 m_uiMainGateDoorGUID; + void Initialize() { for (uint8 i = 0; i < MAX_ENCOUNTERS; ++i) @@ -128,6 +131,8 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance m_auiEventTimer = 1000; + m_auiCrusadersCount = 6; + needsave = false; } @@ -256,7 +261,8 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance pChest->SetRespawnTime(7*DAY); }; }; - break; + break; + case TYPE_CRUSADERS_COUNT: m_auiCrusadersCount = uiData; break; case TYPE_VALKIRIES: if (m_auiEncounter[4] == SPECIAL && uiData == SPECIAL) uiData = DONE; m_auiEncounter[4] = uiData; break; case TYPE_LICH_KING: m_auiEncounter[5] = uiData; break; @@ -399,6 +405,7 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance case TYPE_DIFFICULTY: return Difficulty; case TYPE_NORTHREND_BEASTS: return m_auiNorthrendBeasts; case TYPE_EVENT_TIMER: return m_auiEventTimer; + case TYPE_CRUSADERS_COUNT: return m_auiCrusadersCount; case TYPE_EVENT_NPC: switch (m_auiEncounter[8]) { case 110: @@ -487,7 +494,6 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance case DATA_CASTING_FJOLA: return m_uiFjolaCasting; case DATA_CASTING_EYDIS: return m_uiEydisCasting; } - return 0; } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index 222220669..2ff071f8a 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -56,20 +56,20 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI } ScriptedInstance* pInstance; - bool flag25; uint32 DelayTimer; uint32 substage; void Reset() { + if (!pInstance) return; pInstance->SetData(TYPE_STAGE,0); - flag25 = true; DelayTimer = 0; m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); if(Creature *pAlly = GetClosestCreatureWithEntry(m_creature, NPC_THRALL, 300.0f)) pAlly->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); if(Creature *pAlly = GetClosestCreatureWithEntry(m_creature, NPC_PROUDMOORE, 300.0f)) pAlly->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetRespawnDelay(DAY); } void AttackStart(Unit *who) @@ -128,72 +128,23 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI }; break; }; + case 4: { break; }; - case 5: { - Creature* pTemp1 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_1)); - Creature* pTemp2 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_2)); - Creature* pTemp3 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_3)); - Creature* pTemp4 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_4)); - Creature* pTemp5 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_5)); - Creature* pTemp6 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_6)); - if (pInstance->GetData(TYPE_DIFFICULTY) == RAID_DIFFICULTY_25MAN_NORMAL - || pInstance->GetData(TYPE_DIFFICULTY) == RAID_DIFFICULTY_25MAN_HEROIC) - { - Creature* pTemp7 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_7)); - Creature* pTemp8 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_8)); - Creature* pTemp9 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_9)); - Creature* pTemp10 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_10)); - Creature* pTemp11 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_0_1)); - Creature* pTemp12 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_0_1)); - if (pTemp7 && pTemp8 && pTemp9 && pTemp10 && pTemp11 && pTemp12) { - if (!pTemp7->isAlive() && !pTemp8->isAlive() && !pTemp9->isAlive() && !pTemp10->isAlive() && !pTemp11->isAlive() && !pTemp12->isAlive()) - flag25 = true; - else flag25 = false; - } - } else flag25 = true; - if (pTemp1 && pTemp2 && pTemp3 && pTemp4 && pTemp5 && pTemp6) { - if (!pTemp1->isAlive() && !pTemp2->isAlive() && !pTemp3->isAlive() && !pTemp4->isAlive() && !pTemp5->isAlive() && !pTemp6->isAlive() && flag25) { - pInstance->SetData(TYPE_STAGE,0); - pInstance->SetData(TYPE_CRUSADERS,DONE); - pInstance->SetData(TYPE_EVENT,3100); - } - }; + case 5: { break; }; case 6: { - Creature* pTemp1 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_1)); - Creature* pTemp2 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_2)); - Creature* pTemp3 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_3)); - Creature* pTemp4 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_4)); - Creature* pTemp5 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_5)); - Creature* pTemp6 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_6)); - if (pInstance->GetData(TYPE_DIFFICULTY) == RAID_DIFFICULTY_25MAN_NORMAL - || pInstance->GetData(TYPE_DIFFICULTY) == RAID_DIFFICULTY_25MAN_HEROIC) - { - Creature* pTemp7 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_7)); - Creature* pTemp8 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_8)); - Creature* pTemp9 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_9)); - Creature* pTemp10 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_10)); - Creature* pTemp11 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_0_1)); - Creature* pTemp12 = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_0_1)); - if (pTemp7 && pTemp8 && pTemp9 && pTemp10 && pTemp11 && pTemp12) { - if (!pTemp7->isAlive() && !pTemp8->isAlive() && !pTemp9->isAlive() && !pTemp10->isAlive() && !pTemp11->isAlive() && !pTemp12->isAlive()) - flag25 = true; - else flag25 = false; - } - } else flag25 = true; - - if (pTemp1 && pTemp2 && pTemp3 && pTemp4 && pTemp5 && pTemp6) { - if (!pTemp1->isAlive() && !pTemp2->isAlive() && !pTemp3->isAlive() && !pTemp4->isAlive() && !pTemp5->isAlive() && !pTemp6->isAlive() && flag25) { + if (pInstance->GetData(TYPE_CRUSADERS_COUNT) == 0 + && pInstance->GetData(TYPE_CRUSADERS) == IN_PROGRESS) + { pInstance->SetData(TYPE_STAGE,0); pInstance->SetData(TYPE_CRUSADERS,DONE); pInstance->SetData(TYPE_EVENT,3100); - } - }; + } break; }; @@ -758,272 +709,157 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI break; //Summoning crusaders case 3091: - pInstance->SetData(TYPE_STAGE,5); - pInstance->SetData(TYPE_CRUSADERS,IN_PROGRESS); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_1))) - pTemp->Respawn(); - else { - m_creature->SummonCreature(NPC_CRUSADER_1_1, SpawnLoc[3].x, SpawnLoc[3].y, SpawnLoc[3].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_1))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); - } - } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_2))) - pTemp->Respawn(); - else { - m_creature->SummonCreature(NPC_CRUSADER_1_2, SpawnLoc[4].x, SpawnLoc[4].y, SpawnLoc[4].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_2))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); - } - } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_3))) - pTemp->Respawn(); - else { - m_creature->SummonCreature(NPC_CRUSADER_1_3, SpawnLoc[5].x, SpawnLoc[5].y, SpawnLoc[5].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_3))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); - } - } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_4))) - pTemp->Respawn(); - else { - m_creature->SummonCreature(NPC_CRUSADER_1_4, SpawnLoc[6].x, SpawnLoc[6].y, SpawnLoc[6].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_4))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); - } - } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_5))) - pTemp->Respawn(); - else { - m_creature->SummonCreature(NPC_CRUSADER_1_5, SpawnLoc[7].x, SpawnLoc[7].y, SpawnLoc[7].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_5))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); - } - } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_6))) - pTemp->Respawn(); - else { - m_creature->SummonCreature(NPC_CRUSADER_1_6, SpawnLoc[8].x, SpawnLoc[8].y, SpawnLoc[8].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_6))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); - } - } - if (pInstance->GetData(TYPE_DIFFICULTY) == RAID_DIFFICULTY_25MAN_NORMAL + pInstance->SetData(TYPE_STAGE,6); + if (pInstance->GetData(TYPE_DIFFICULTY) == RAID_DIFFICULTY_25MAN_NORMAL || pInstance->GetData(TYPE_DIFFICULTY) == RAID_DIFFICULTY_25MAN_HEROIC) - { - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_7))) - pTemp->Respawn(); - else { - m_creature->SummonCreature(NPC_CRUSADER_1_7, SpawnLoc[9].x, SpawnLoc[9].y, SpawnLoc[9].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_7))) { + { + pInstance->SetData(TYPE_CRUSADERS_COUNT,12); + m_creature->SummonCreature(NPC_CRUSADER_1_7, SpawnLoc[9].x, SpawnLoc[9].y, SpawnLoc[9].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_7))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); } - } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_8))) - pTemp->Respawn(); - else { - m_creature->SummonCreature(NPC_CRUSADER_1_8, SpawnLoc[10].x, SpawnLoc[10].y, SpawnLoc[10].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_8))) { + m_creature->SummonCreature(NPC_CRUSADER_1_8, SpawnLoc[10].x, SpawnLoc[10].y, SpawnLoc[10].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_8))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); } - } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_9))) - pTemp->Respawn(); - else { - m_creature->SummonCreature(NPC_CRUSADER_1_9, SpawnLoc[11].x, SpawnLoc[11].y, SpawnLoc[11].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_9))) { + m_creature->SummonCreature(NPC_CRUSADER_1_9, SpawnLoc[11].x, SpawnLoc[11].y, SpawnLoc[11].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_9))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); } - } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_10))) - pTemp->Respawn(); - else { - m_creature->SummonCreature(NPC_CRUSADER_1_10, SpawnLoc[12].x, SpawnLoc[12].y, SpawnLoc[12].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_10))) { + m_creature->SummonCreature(NPC_CRUSADER_1_10, SpawnLoc[12].x, SpawnLoc[12].y, SpawnLoc[12].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_10))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); } - } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_0_1))) - pTemp->Respawn(); - else { - m_creature->SummonCreature(NPC_CRUSADER_0_1, SpawnLoc[13].x, SpawnLoc[13].y, SpawnLoc[13].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_0_1))) { + m_creature->SummonCreature(NPC_CRUSADER_0_1, SpawnLoc[13].x, SpawnLoc[13].y, SpawnLoc[13].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_0_1))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetRespawnDelay(DAY); - pTemp->SetInCombatWithZone(); } - } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_0_2))) - pTemp->Respawn(); - else { - m_creature->SummonCreature(NPC_CRUSADER_0_2, SpawnLoc[14].x, SpawnLoc[14].y, SpawnLoc[14].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_0_2))) { + m_creature->SummonCreature(NPC_CRUSADER_0_2, SpawnLoc[14].x, SpawnLoc[14].y, SpawnLoc[14].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_0_2))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetRespawnDelay(DAY); - pTemp->SetInCombatWithZone(); } - } - } - UpdateTimer = 3000; - pInstance->SetData(TYPE_EVENT,3095); - pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_MAIN_GATE_DOOR)); - break; - -//summoning crusaders - case 3090: - pInstance->SetData(TYPE_STAGE,6); - pInstance->SetData(TYPE_CRUSADERS,IN_PROGRESS); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_1))) - pTemp->Respawn(); - else { - m_creature->SummonCreature(NPC_CRUSADER_2_1, SpawnLoc[3].x, SpawnLoc[3].y, SpawnLoc[3].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_1))) { + } + else pInstance->SetData(TYPE_CRUSADERS_COUNT,6); + m_creature->SummonCreature(NPC_CRUSADER_1_1, SpawnLoc[3].x, SpawnLoc[3].y, SpawnLoc[3].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_1))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); } - } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_2))) - pTemp->Respawn(); - else { - m_creature->SummonCreature(NPC_CRUSADER_2_2, SpawnLoc[4].x, SpawnLoc[4].y, SpawnLoc[4].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_2))) { + m_creature->SummonCreature(NPC_CRUSADER_1_2, SpawnLoc[4].x, SpawnLoc[4].y, SpawnLoc[4].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_2))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); } - } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_3))) - pTemp->Respawn(); - else { - m_creature->SummonCreature(NPC_CRUSADER_2_3, SpawnLoc[5].x, SpawnLoc[5].y, SpawnLoc[5].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_3))) { + m_creature->SummonCreature(NPC_CRUSADER_1_3, SpawnLoc[5].x, SpawnLoc[5].y, SpawnLoc[5].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_3))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); } - } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_4))) - pTemp->Respawn(); - else { - m_creature->SummonCreature(NPC_CRUSADER_2_4, SpawnLoc[6].x, SpawnLoc[6].y, SpawnLoc[6].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_4))) { + m_creature->SummonCreature(NPC_CRUSADER_1_4, SpawnLoc[6].x, SpawnLoc[6].y, SpawnLoc[6].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_4))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); } - } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_5))) - pTemp->Respawn(); - else { - m_creature->SummonCreature(NPC_CRUSADER_2_5, SpawnLoc[7].x, SpawnLoc[7].y, SpawnLoc[7].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_5))) { + m_creature->SummonCreature(NPC_CRUSADER_1_5, SpawnLoc[7].x, SpawnLoc[7].y, SpawnLoc[7].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_5))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); } - } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_6))) - pTemp->Respawn(); - else { - m_creature->SummonCreature(NPC_CRUSADER_2_6, SpawnLoc[8].x, SpawnLoc[8].y, SpawnLoc[8].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_6))) { + m_creature->SummonCreature(NPC_CRUSADER_1_6, SpawnLoc[8].x, SpawnLoc[8].y, SpawnLoc[8].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_6))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); } - } - if (pInstance->GetData(TYPE_DIFFICULTY) == RAID_DIFFICULTY_25MAN_NORMAL + UpdateTimer = 3000; + pInstance->SetData(TYPE_EVENT,3095); + pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_MAIN_GATE_DOOR)); + pInstance->SetData(TYPE_CRUSADERS,IN_PROGRESS); + break; + +//summoning crusaders + case 3090: + pInstance->SetData(TYPE_STAGE,6); + if (pInstance->GetData(TYPE_DIFFICULTY) == RAID_DIFFICULTY_25MAN_NORMAL || pInstance->GetData(TYPE_DIFFICULTY) == RAID_DIFFICULTY_25MAN_HEROIC) - { - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_7))) - pTemp->Respawn(); - else { - m_creature->SummonCreature(NPC_CRUSADER_2_7, SpawnLoc[9].x, SpawnLoc[9].y, SpawnLoc[9].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_7))) { + { + pInstance->SetData(TYPE_CRUSADERS_COUNT,12); + + m_creature->SummonCreature(NPC_CRUSADER_2_7, SpawnLoc[9].x, SpawnLoc[9].y, SpawnLoc[9].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_7))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); } - } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_8))) - pTemp->Respawn(); - else { - m_creature->SummonCreature(NPC_CRUSADER_2_8, SpawnLoc[10].x, SpawnLoc[10].y, SpawnLoc[10].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_8))) { + m_creature->SummonCreature(NPC_CRUSADER_2_8, SpawnLoc[10].x, SpawnLoc[10].y, SpawnLoc[10].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_8))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); } - } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_9))) - pTemp->Respawn(); - else { - m_creature->SummonCreature(NPC_CRUSADER_2_9, SpawnLoc[11].x, SpawnLoc[11].y, SpawnLoc[11].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_9))) { + m_creature->SummonCreature(NPC_CRUSADER_2_9, SpawnLoc[11].x, SpawnLoc[11].y, SpawnLoc[11].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_9))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); } - } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_10))) - pTemp->Respawn(); - else { - m_creature->SummonCreature(NPC_CRUSADER_2_10, SpawnLoc[12].x, SpawnLoc[12].y, SpawnLoc[12].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_10))) { + m_creature->SummonCreature(NPC_CRUSADER_2_10, SpawnLoc[12].x, SpawnLoc[12].y, SpawnLoc[12].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_10))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); } - } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_0_1))) - pTemp->Respawn(); - else { - m_creature->SummonCreature(NPC_CRUSADER_0_1, SpawnLoc[13].x, SpawnLoc[13].y, SpawnLoc[13].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_0_1))) { + m_creature->SummonCreature(NPC_CRUSADER_0_1, SpawnLoc[13].x, SpawnLoc[13].y, SpawnLoc[13].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_0_1))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetRespawnDelay(DAY); - pTemp->SetInCombatWithZone(); } - } - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_0_2))) - pTemp->Respawn(); - else { - m_creature->SummonCreature(NPC_CRUSADER_0_2, SpawnLoc[14].x, SpawnLoc[14].y, SpawnLoc[14].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_0_2))) { + m_creature->SummonCreature(NPC_CRUSADER_0_2, SpawnLoc[14].x, SpawnLoc[14].y, SpawnLoc[14].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_0_2))) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetRespawnDelay(DAY); - pTemp->SetInCombatWithZone(); } - } } + else pInstance->SetData(TYPE_CRUSADERS_COUNT,6); + + m_creature->SummonCreature(NPC_CRUSADER_2_1, SpawnLoc[3].x, SpawnLoc[3].y, SpawnLoc[3].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_1))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + } + m_creature->SummonCreature(NPC_CRUSADER_2_2, SpawnLoc[4].x, SpawnLoc[4].y, SpawnLoc[4].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_2))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + } + m_creature->SummonCreature(NPC_CRUSADER_2_3, SpawnLoc[5].x, SpawnLoc[5].y, SpawnLoc[5].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_3))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + } + m_creature->SummonCreature(NPC_CRUSADER_2_4, SpawnLoc[6].x, SpawnLoc[6].y, SpawnLoc[6].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_4))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + } + m_creature->SummonCreature(NPC_CRUSADER_2_5, SpawnLoc[7].x, SpawnLoc[7].y, SpawnLoc[7].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_5))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + } + m_creature->SummonCreature(NPC_CRUSADER_2_6, SpawnLoc[8].x, SpawnLoc[8].y, SpawnLoc[8].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_6))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetInCombatWithZone(); + } UpdateTimer = 3000; pInstance->SetData(TYPE_EVENT,3095); pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_MAIN_GATE_DOOR)); + pInstance->SetData(TYPE_CRUSADERS,IN_PROGRESS); break; //Crusaders battle end diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index b7ebae19c..d59dcecba 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -91,7 +91,7 @@ enum TYPE_EVENT_TIMER = 102, TYPE_EVENT_NPC = 103, TYPE_NORTHREND_BEASTS = 104, - TYPE_CHAMPIONS_COUNT = 105, + TYPE_CRUSADERS_COUNT = 105, DATA_HEALTH_EYDIS = 201, DATA_HEALTH_FJOLA = 202, From c5ba6b75a2107d6ca559dd2c85ab34283c20e8d6 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Tue, 13 Apr 2010 18:35:30 +0400 Subject: [PATCH 231/405] Spawn chest (tempfix) for mirroring halls --- .../halls_of_reflection/def_halls.h | 2 +- .../instance_halls_of_reflection.cpp | 19 ++++++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/def_halls.h b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/def_halls.h index 595b4982b..ac095ccd8 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/def_halls.h +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/def_halls.h @@ -45,7 +45,7 @@ enum GO_CAPTAIN_CHEST_4 = 202336, //3333 MOB_WAVES_NUM_1 = 4, - MOB_WAVES_DELAY_1 = 30000, //in milliseconds + MOB_WAVES_DELAY_1 = 25000, //in milliseconds }; diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp index 42e676409..5acf97401 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp @@ -35,7 +35,8 @@ struct MANGOS_DLL_DECL instance_halls_of_reflection : public ScriptedInstance uint64 m_uiMarwynGUID; uint64 m_uiLichKingGUID; uint64 m_uiFrostGeneralGUID; - uint64 m_uiCaptainsChestGUID; + uint64 m_uiCaptainsChestHordeGUID; + uint64 m_uiCaptainsChestAllianceGUID; uint64 m_uiIcecrownDoorGUID; uint64 m_uiImpenetrableDoorGUID; uint64 m_uiFrostmourneGUID; @@ -59,6 +60,8 @@ struct MANGOS_DLL_DECL instance_halls_of_reflection : public ScriptedInstance { for (uint8 i = 0; i < MAX_ENCOUNTERS; ++i) m_auiEncounter[i] = NOT_STARTED; + m_uiCaptainsChestHordeGUID = 0; + m_uiCaptainsChestAllianceGUID = 0; } void OnCreatureCreate(Creature* pCreature) @@ -85,16 +88,16 @@ struct MANGOS_DLL_DECL instance_halls_of_reflection : public ScriptedInstance switch(pGo->GetEntry()) { case GO_CAPTAIN_CHEST_1: - if(Regular) m_uiCaptainsChestGUID = pGo->GetGUID(); + if(Regular) m_uiCaptainsChestHordeGUID = pGo->GetGUID(); break; case GO_CAPTAIN_CHEST_2: - if(Regular) m_uiCaptainsChestGUID = pGo->GetGUID(); + if(Regular) m_uiCaptainsChestAllianceGUID = pGo->GetGUID(); break; case GO_CAPTAIN_CHEST_3: - if(!Regular) m_uiCaptainsChestGUID = pGo->GetGUID(); + if(!Regular) m_uiCaptainsChestHordeGUID = pGo->GetGUID(); break; case GO_CAPTAIN_CHEST_4: - if(!Regular) m_uiCaptainsChestGUID = pGo->GetGUID(); + if(!Regular) m_uiCaptainsChestAllianceGUID = pGo->GetGUID(); break; case GO_ICECROWN_DOOR: m_uiIcecrownDoorGUID = pGo->GetGUID(); break; case GO_IMPENETRABLE_DOOR: m_uiImpenetrableDoorGUID = pGo->GetGUID(); break; @@ -119,6 +122,12 @@ struct MANGOS_DLL_DECL instance_halls_of_reflection : public ScriptedInstance if (uiData == DONE) { OpenDoor(m_uiImpenetrableDoorGUID); OpenDoor(m_uiIcecrownDoorGUID); + if (m_uiCaptainsChestHordeGUID) + if (GameObject* pChest = instance->GetGameObject(m_uiCaptainsChestHordeGUID)) + if (pChest && !pChest->isSpawned()) pChest->SetRespawnTime(7*DAY); + if (m_uiCaptainsChestAllianceGUID) + if (GameObject* pChest = instance->GetGameObject(m_uiCaptainsChestAllianceGUID)) + if (pChest && !pChest->isSpawned()) pChest->SetRespawnTime(7*DAY); }; break; case TYPE_LICH_KING_1: m_auiEncounter[3] = uiData; break; case TYPE_FROST_GENERAL: m_auiEncounter[4] = uiData; break; From 9b8d9cf143adf4df611366228dae506d202c6e63 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 14 Apr 2010 13:33:35 +0400 Subject: [PATCH 232/405] TOC part 41 - final cleanup and switch to betatesting phase --- addition/724_trial_of_crusader_mangos.sql | 2 +- addition/724_trial_of_crusader_scriptdev2.sql | 4 +- .../boss_anubarak_trial.cpp | 2 +- .../boss_faction_champions.cpp | 106 +++++++++++------- .../boss_northrend_beasts.cpp | 16 ++- .../instance_trial_of_the_crusader.cpp | 19 ++-- .../trial_of_the_crusader.cpp | 19 +++- 7 files changed, 105 insertions(+), 63 deletions(-) diff --git a/addition/724_trial_of_crusader_mangos.sql b/addition/724_trial_of_crusader_mangos.sql index 7ec36514b..c8dcef22f 100644 --- a/addition/724_trial_of_crusader_mangos.sql +++ b/addition/724_trial_of_crusader_mangos.sql @@ -60,7 +60,7 @@ UPDATE `creature_template` SET `scriptname`='mob_snobold_vassal', `AIName` ='' W UPDATE `creature_template` SET `scriptname`='boss_dreadscale', `AIName` ='' WHERE `entry`=34799; UPDATE `creature_template` SET `scriptname`='boss_acidmaw', `AIName` ='' WHERE `entry`=35144; -UPDATE `creature_template` SET `scriptname`='mob_slime_pool', `minlevel` = 80, `maxlevel` = 80, `minhealth`= 20000, `maxhealth` = 20000,`AIName` ='', `faction_A`= 14, `faction_H` = 14, `modelid_A` = 12349, `modelid_H` = 12349 WHERE `entry` = 35176; +UPDATE `creature_template` SET `scriptname`='mob_slime_pool', `minlevel` = 80, `maxlevel` = 80, `minhealth`= 30000, `maxhealth` = 30000,`AIName` ='', `faction_A`= 14, `faction_H` = 14, `modelid_A` = 12349, `modelid_H` = 12349 WHERE `entry` = 35176; -- Model id for slime_pool need change! UPDATE `creature_template` SET `scriptname`='boss_icehowl', `AIName` ='' WHERE `entry`=34797; diff --git a/addition/724_trial_of_crusader_scriptdev2.sql b/addition/724_trial_of_crusader_scriptdev2.sql index 9b8eaa8ce..6619df27f 100644 --- a/addition/724_trial_of_crusader_scriptdev2.sql +++ b/addition/724_trial_of_crusader_scriptdev2.sql @@ -31,8 +31,8 @@ INSERT INTO `script_texts` ('34780','0','-1713520','%s создает |cFF00FF00Вулкан инферналов!|r','3','0','0','%S creates |cFF00FF00Vulkan Infernals!|R'), ('34780','16150','-1713521','Явись, сестра! Господин зовет!','6','0','0','Come forth, sister! Your master calls!'), ('34780','0','-1713522','$n $gподвергся:подверглась; |cFF00FFFFИспепелению плоти!|r Исцелите $gего:ее;!','3','0','0','$N $gpodvergsya:been; |cFF00FFFFIspepeleniyu flesh!|R Heal $gego:it;!'), -('34780','16149','-1713523','ПЛОТЬ ОТ КОСТИ!','3','0','0','FLESH FROM BONE!'), -('34780','16151','-1713524','ИНФЕРНАЛ!','3','0','0','INFERNO!'), +('34780','16149','-1713523','ПЛОТЬ ОТ КОСТИ!','6','0','0','FLESH FROM BONE!'), +('34780','16151','-1713524','ИНФЕРНАЛ!','6','0','0','INFERNO!'), ('34780','16147','-1713525','Мое место займут другие. Ваш мир обречен...','6','0','0','Another will take my place. Your world is doomed.'), ('34996','16045','-1713526','Гибель Вилфреда Непопамса весьма трагична и должна послужить уроком тем, кто смеет беспечно играть с темной магией. К счастью, вы победили демона, и теперь вас ждет новый противник.','6','0','0','The loss of Wilfred Fizzlebang, while unfortunate, should be a lesson to those that dare dabble in dark magic. Alas, you are victorious and must now face the next challenge.'), ('34995','16021','-1713527','Подлые собаки Альянса! Вы выпустили повелителя демонов на воинов Орды? Ваша смерть будет быстрой!','6','0','0','Treacherous Alliance dogs! You summon a demon lord against warriors of the Horde!? Your deaths will be swift!'), diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp index 3a6506b69..b459345f8 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp @@ -380,7 +380,7 @@ struct MANGOS_DLL_DECL mob_anubarak_spikeAI : public ScriptedAI m_creature->SetRespawnDelay(DAY); m_creature->SetSpeedRate(MOVE_RUN, 0.5f); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); -// m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } void Aggro(Unit *who) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp index 81c5eba8f..cff439af1 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp @@ -55,9 +55,6 @@ struct MANGOS_DLL_DECL boss_faction_championsAI : public ScriptedAI bsw->resetTimers(); m_creature->SetInCombatWithZone(); m_creature->SetRespawnDelay(DAY); - if (mAIType == AI_MELEE) SetEquipmentSlots(false, 47427, 46964, EQUIP_NO_CHANGE); - if (mAIType == AI_RANGED) SetEquipmentSlots(false, 47156, EQUIP_NO_CHANGE, 48711); - if (mAIType == AI_HEALER) SetEquipmentSlots(false, 51799, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE); } void JustReachedHome() @@ -183,6 +180,9 @@ struct MANGOS_DLL_DECL boss_faction_championsAI : public ScriptedAI DoStartMovement(pWho); else DoStartMovement(pWho, 20.0f); + + SetCombatMovement(true); + } } @@ -203,9 +203,6 @@ struct MANGOS_DLL_DECL boss_faction_championsAI : public ScriptedAI } else CCTimer -= diff; - if(mAIType != AI_MELEE && EnemiesInRange(40.0f) < 1) - DoStartMovement(m_creature->getVictim(), 20.0f); - if(mAIType == AI_MELEE) DoMeleeAttackIfReady(); } }; @@ -227,6 +224,11 @@ struct MANGOS_DLL_DECL mob_toc_druidAI : public boss_faction_championsAI { mob_toc_druidAI(Creature* pCreature) : boss_faction_championsAI(pCreature, AI_HEALER) {Init();} + void Init() + { + SetEquipmentSlots(false, 51799, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE); + } + void UpdateAI(const uint32 diff) { if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -277,6 +279,11 @@ struct MANGOS_DLL_DECL mob_toc_shamanAI : public boss_faction_championsAI { mob_toc_shamanAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_HEALER) {Init();} + void Init() + { + SetEquipmentSlots(false, 49992, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE); + } + void UpdateAI(const uint32 diff) { if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -325,6 +332,11 @@ struct MANGOS_DLL_DECL mob_toc_paladinAI : public boss_faction_championsAI { mob_toc_paladinAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_HEALER) {Init();} + void Init() + { + SetEquipmentSlots(false, 50771, 47079, EQUIP_NO_CHANGE); + } + void UpdateAI(const uint32 diff) { if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -375,6 +387,11 @@ struct MANGOS_DLL_DECL mob_toc_priestAI : public boss_faction_championsAI { mob_toc_priestAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_HEALER) {Init();} + void Init() + { + SetEquipmentSlots(false, 49992, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE); + } + void UpdateAI(const uint32 diff) { if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -426,6 +443,11 @@ struct MANGOS_DLL_DECL mob_toc_shadow_priestAI : public boss_faction_championsAI { mob_toc_shadow_priestAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_RANGED) {Init();} + void Init() + { + SetEquipmentSlots(false, 50040, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE); + } + void Aggro(Unit *who) { boss_faction_championsAI::Aggro(who); @@ -483,6 +505,11 @@ struct MANGOS_DLL_DECL mob_toc_warlockAI : public boss_faction_championsAI { mob_toc_warlockAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_RANGED) {Init();} + void Init() + { + SetEquipmentSlots(false, 49992, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE); + } + void UpdateAI(const uint32 diff) { if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -533,6 +560,11 @@ struct MANGOS_DLL_DECL mob_toc_mageAI : public boss_faction_championsAI { mob_toc_mageAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_RANGED) {Init();} + void Init() + { + SetEquipmentSlots(false, 47524, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE); + } + void UpdateAI(const uint32 diff) { if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -586,29 +618,9 @@ struct MANGOS_DLL_DECL mob_toc_hunterAI : public boss_faction_championsAI { mob_toc_hunterAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_RANGED) {Init();} - uint32 AimedShotTimer; - uint32 CallPetTimer; - uint32 DeterrenceTimer; - uint32 DisengageTimer; - uint32 ExplosiveShotTimer; - uint32 FrostTrapTimer; - uint32 AutoShootTimer; - uint32 SteadyShotTimer; - uint32 WingClipTimer; - uint32 WyvernStingTimer; - uint32 GCDTimer; - void Init() { - AimedShotTimer = 1000+rand()%2000; - DeterrenceTimer = 20000; - DisengageTimer = 10000+rand()%3000; - ExplosiveShotTimer = 2000+rand()%3000; - FrostTrapTimer = 11000+rand()%5000; - SteadyShotTimer = 3200+rand()%2000; - WingClipTimer = 6000+rand()%2000; - WyvernStingTimer = 7000+rand()%3000; - GCDTimer = 1000; + SetEquipmentSlots(false, 47156, EQUIP_NO_CHANGE, 48711); } void UpdateAI(const uint32 diff) @@ -660,6 +672,11 @@ struct MANGOS_DLL_DECL mob_toc_boomkinAI : public boss_faction_championsAI { mob_toc_boomkinAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_RANGED) {Init();} + void Init() + { + SetEquipmentSlots(false, 50966, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE); + } + void UpdateAI(const uint32 diff) { if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -713,6 +730,11 @@ struct MANGOS_DLL_DECL mob_toc_warriorAI : public boss_faction_championsAI { mob_toc_warriorAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_MELEE) {Init();} + void Init() + { + SetEquipmentSlots(false, 47427, 46964, EQUIP_NO_CHANGE); + } + void UpdateAI(const uint32 diff) { if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -751,6 +773,11 @@ struct MANGOS_DLL_DECL mob_toc_dkAI : public boss_faction_championsAI { mob_toc_dkAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_MELEE) {Init();} + void Init() + { + SetEquipmentSlots(false, 47518, 51021, EQUIP_NO_CHANGE); + } + void UpdateAI(const uint32 diff) { if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -788,23 +815,9 @@ struct MANGOS_DLL_DECL mob_toc_rogueAI : public boss_faction_championsAI { mob_toc_rogueAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_MELEE) {Init();} - uint32 FanOfKnivesTimer; - uint32 BlindTimer; - uint32 CloakTimer; - uint32 BladeFlurryTimer; - uint32 ShadowstepTimer; - uint32 HemorrhageTimer; - uint32 EviscerateTimer; - void Init() { - FanOfKnivesTimer = 7000 + rand()%1000; - BlindTimer = 6000 + rand()%3000; - CloakTimer = 20000 + rand()%20000; - BladeFlurryTimer = 10000 + rand()%1000; - ShadowstepTimer = 9000 + rand()%2000; - HemorrhageTimer = 5000 + rand()%1000; - EviscerateTimer = 14000 + rand()%2000; + SetEquipmentSlots(false, 47422, 49982, EQUIP_NO_CHANGE); } void UpdateAI(const uint32 diff) @@ -842,6 +855,10 @@ struct MANGOS_DLL_DECL mob_toc_enh_shamanAI : public boss_faction_championsAI { mob_toc_enh_shamanAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_MELEE) {Init();} + void Init() + { + SetEquipmentSlots(false, 51803, 48013, EQUIP_NO_CHANGE); + } void UpdateAI(const uint32 diff) { @@ -873,6 +890,11 @@ struct MANGOS_DLL_DECL mob_toc_retro_paladinAI : public boss_faction_championsAI { mob_toc_retro_paladinAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_MELEE) {Init();} + void Init() + { + SetEquipmentSlots(false, 47519, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE); + } + void Aggro(Unit *who) { boss_faction_championsAI::Aggro(who); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index 5308529bc..9c8734d62 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -445,23 +445,31 @@ struct MANGOS_DLL_DECL mob_slime_poolAI : public ScriptedAI ScriptedInstance *m_pInstance; BossSpellWorker* bsw; float m_Size; + uint8 Difficulty; void Reset() { -// m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + if(!m_pInstance) return; + Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); + if (Difficulty == RAID_DIFFICULTY_10MAN_HEROIC || Difficulty == RAID_DIFFICULTY_25MAN_HEROIC) + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->SetInCombatWithZone(); m_creature->SetSpeedRate(MOVE_RUN, 0.05f); + SetCombatMovement(false); + m_creature->GetMotionMaster()->MoveRandom(); bsw->doCast(SPELL_SLIME_POOL_2); m_Size = m_creature->GetFloatValue(OBJECT_FIELD_SCALE_X); } + void AttackStart(Unit *who) + { + return; + } void UpdateAI(const uint32 uiDiff) { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; if (bsw->timedQuery(SPELL_SLIME_POOL_2,uiDiff)) { - m_Size = m_Size*1.03; + m_Size = m_Size*1.036; m_creature->SetFloatValue(OBJECT_FIELD_SCALE_X, m_Size); } } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index e44d3c342..1adaa6358 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -254,14 +254,15 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance case TYPE_STAGE: m_auiEncounter[0] = uiData; break; case TYPE_BEASTS: m_auiEncounter[1] = uiData; break; case TYPE_JARAXXUS: m_auiEncounter[2] = uiData; break; - case TYPE_CRUSADERS: m_auiEncounter[3] = uiData; - if (uiData == DONE) { - if (GameObject* pChest = instance->GetGameObject(m_uiCrusadersCacheGUID)) - if (pChest && !pChest->isSpawned()) { - pChest->SetRespawnTime(7*DAY); - }; - }; - break; + case TYPE_CRUSADERS: if (uiData == FAIL && (m_auiEncounter[3] == FAIL || m_auiEncounter[3] == NOT_STARTED)) + m_auiEncounter[3] = NOT_STARTED; + else m_auiEncounter[3] = uiData; + if (uiData == DONE) { + if (GameObject* pChest = instance->GetGameObject(m_uiCrusadersCacheGUID)) + if (pChest && !pChest->isSpawned()) + pChest->SetRespawnTime(7*DAY); + }; + break; case TYPE_CRUSADERS_COUNT: m_auiCrusadersCount = uiData; break; case TYPE_VALKIRIES: if (m_auiEncounter[4] == SPECIAL && uiData == SPECIAL) uiData = DONE; m_auiEncounter[4] = uiData; break; @@ -412,8 +413,10 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance case 140: case 150: case 200: + case 205: case 210: case 300: + case 305: case 310: case 400: case 1010: diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index 2ff071f8a..f7c1e0315 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -616,6 +616,11 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI case 200: DoScriptText(-1713503, m_creature); UpdateTimer = 10000; + pInstance->SetData(TYPE_EVENT,205); + break; + + case 205: + UpdateTimer = 8000; pInstance->SetData(TYPE_EVENT,210); pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_MAIN_GATE_DOOR)); break; @@ -641,7 +646,11 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI break; case 300: DoScriptText(-1713505, m_creature); - UpdateTimer = 10000; + UpdateTimer = 15000; + pInstance->SetData(TYPE_EVENT,305); + break; + case 305: + UpdateTimer = 8000; pInstance->SetData(TYPE_EVENT,310); pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_MAIN_GATE_DOOR)); break; @@ -902,7 +911,7 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI break; case 4040: - UpdateTimer = 30000; + UpdateTimer = 60000; pInstance->SetData(TYPE_EVENT,5000); break; @@ -920,19 +929,19 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI break; case 6000: m_creature->NearTeleportTo(SpawnLoc[19].x, SpawnLoc[19].y, SpawnLoc[19].z, 4.0f); - UpdateTimer = 5000; + UpdateTimer = 20000; pInstance->SetData(TYPE_EVENT,6005); break; case 6005: DoScriptText(-1713565, m_creature); - UpdateTimer = 5000; + UpdateTimer = 20000; pInstance->SetData(TYPE_EVENT,6010); break; case 6010: if (pInstance->GetData(TYPE_DIFFICULTY) == RAID_DIFFICULTY_10MAN_HEROIC || pInstance->GetData(TYPE_DIFFICULTY) == RAID_DIFFICULTY_25MAN_HEROIC) DoScriptText(-1713566, m_creature); - UpdateTimer = 20000; + UpdateTimer = 60000; pInstance->SetData(TYPE_EVENT,6020); break; case 6020: From f3e4402c87c39756c0e5ff444e21d87e515b0440 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 14 Apr 2010 19:41:22 +0400 Subject: [PATCH 233/405] ICC part 15 - rewrite of ICC started. --- addition/721_icecrown_mangos.sql | 47 +++--- addition/721_icecrown_scriptdev2.sql | 4 +- .../721_icecrown_spelltable_scriptdev2.sql | 62 ++++++++ .../icecrown_citadel/boss_festergut.cpp | 141 +++++++----------- .../boss_proffesor_putricide.cpp | 68 ++++++++- .../icecrown_citadel/boss_rotface.cpp | 78 +++++++++- .../icecrown_citadel/def_spire.h | 28 +--- .../icecrown_citadel/icecrown_teleport.cpp | 59 +++----- .../instance_icecrown_spire.cpp | 38 +++-- system/ScriptLoader.cpp | 6 + 10 files changed, 341 insertions(+), 190 deletions(-) create mode 100644 addition/721_icecrown_spelltable_scriptdev2.sql diff --git a/addition/721_icecrown_mangos.sql b/addition/721_icecrown_mangos.sql index 33a905f98..e4aab24f6 100644 --- a/addition/721_icecrown_mangos.sql +++ b/addition/721_icecrown_mangos.sql @@ -6,13 +6,16 @@ DELETE FROM `gameobject` WHERE `guid` = 913334; INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES (913334, 202244, 631, 3, 1, -209.5, 2211.91, 199.97, 3.07661, 0, 0, 0.999472, 0.0324833, 0, 0, 1); -#UPDATE `gameobject_template` SET ScriptName = 'go_icecrown_teleporter' WHERE `entry` IN (202242,202243,202244,202245,202235); -UPDATE `gameobject_template` SET ScriptName = '' WHERE `entry` IN (202242,202243,202244,202245,202235); -# 202223 202246 +UPDATE `gameobject_template` SET `flags` = 0, ScriptName = 'go_icecrown_teleporter' WHERE `entry` IN (202242,202243,202244,202245,202235,202223,202246); +DELETE FROM `areatrigger_teleport` WHERE `id` = 5718 AND `target_map` = 631; + +DELETE FROM `creature` WHERE `id` = 99322; DELETE FROM `creature_template` WHERE `entry` = 99322; -INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES -(99322, 0, 0, 0, 0, 0, 22448, 0, 22448, 0, 'IceCrown teleporter', '', NULL, 0, 80, 80, 64200, 64200, 12300, 12300, 9730, 35, 35, 1, 0.5, 0, 294, 441, 0, 110, 1.4, 1400, 1400, 0, 0, 0, 0, 0, 0, 0, 0, 235, 353, 88, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 1, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 'icecrown_teleporter'); -REPLACE INTO `locales_creature` values ('99322','IceCrown teleporter','','','','','','','Телепортер цитадели Ледяной короны',NULL,NULL,NULL,NULL,NULL,NULL,NULL,''); +DELETE FROM `locales_npc_text` WHERE `entry` = 99322; +DELETE FROM `npc_text` WHERE `ID` = 99322; +DELETE FROM `locales_npc_text` WHERE `entry` = 99323; +DELETE FROM `npc_text` WHERE `ID` = 99323; +DELETE FROM `gameobject` WHERE `guid` IN (913334); DELETE FROM `creature` WHERE `guid` IN (599322,599323,599324,599325,599326,599327,599328,599329,599330); INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES @@ -26,22 +29,6 @@ INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid` (599329, 99322, 631, 15, 1, 0, 0, 4356.236816, 2402.573242, 220.462540, 0, 3600, 0, 0, 64200, 12300, 0, 0), (599330, 99322, 631, 15, 1, 0, 0, 4356.236816, 2402.573242, 220.462540, 0, 3600, 0, 0, 64200, 12300, 0, 0); -DELETE FROM `locales_npc_text` WHERE `entry` = 99322; -INSERT INTO `locales_npc_text` (`entry`, `Text0_0_loc1`, `Text0_0_loc2`, `Text0_0_loc3`, `Text0_0_loc4`, `Text0_0_loc5`, `Text0_0_loc6`, `Text0_0_loc7`, `Text0_0_loc8`, `Text0_1_loc1`, `Text0_1_loc2`, `Text0_1_loc3`, `Text0_1_loc4`, `Text0_1_loc5`, `Text0_1_loc6`, `Text0_1_loc7`, `Text0_1_loc8`, `Text1_0_loc1`, `Text1_0_loc2`, `Text1_0_loc3`, `Text1_0_loc4`, `Text1_0_loc5`, `Text1_0_loc6`, `Text1_0_loc7`, `Text1_0_loc8`, `Text1_1_loc1`, `Text1_1_loc2`, `Text1_1_loc3`, `Text1_1_loc4`, `Text1_1_loc5`, `Text1_1_loc6`, `Text1_1_loc7`, `Text1_1_loc8`, `Text2_0_loc1`, `Text2_0_loc2`, `Text2_0_loc3`, `Text2_0_loc4`, `Text2_0_loc5`, `Text2_0_loc6`, `Text2_0_loc7`, `Text2_0_loc8`, `Text2_1_loc1`, `Text2_1_loc2`, `Text2_1_loc3`, `Text2_1_loc4`, `Text2_1_loc5`, `Text2_1_loc6`, `Text2_1_loc7`, `Text2_1_loc8`, `Text3_0_loc1`, `Text3_0_loc2`, `Text3_0_loc3`, `Text3_0_loc4`, `Text3_0_loc5`, `Text3_0_loc6`, `Text3_0_loc7`, `Text3_0_loc8`, `Text3_1_loc1`, `Text3_1_loc2`, `Text3_1_loc3`, `Text3_1_loc4`, `Text3_1_loc5`, `Text3_1_loc6`, `Text3_1_loc7`, `Text3_1_loc8`, `Text4_0_loc1`, `Text4_0_loc2`, `Text4_0_loc3`, `Text4_0_loc4`, `Text4_0_loc5`, `Text4_0_loc6`, `Text4_0_loc7`, `Text4_0_loc8`, `Text4_1_loc1`, `Text4_1_loc2`, `Text4_1_loc3`, `Text4_1_loc4`, `Text4_1_loc5`, `Text4_1_loc6`, `Text4_1_loc7`, `Text4_1_loc8`, `Text5_0_loc1`, `Text5_0_loc2`, `Text5_0_loc3`, `Text5_0_loc4`, `Text5_0_loc5`, `Text5_0_loc6`, `Text5_0_loc7`, `Text5_0_loc8`, `Text5_1_loc1`, `Text5_1_loc2`, `Text5_1_loc3`, `Text5_1_loc4`, `Text5_1_loc5`, `Text5_1_loc6`, `Text5_1_loc7`, `Text5_1_loc8`, `Text6_0_loc1`, `Text6_0_loc2`, `Text6_0_loc3`, `Text6_0_loc4`, `Text6_0_loc5`, `Text6_0_loc6`, `Text6_0_loc7`, `Text6_0_loc8`, `Text6_1_loc1`, `Text6_1_loc2`, `Text6_1_loc3`, `Text6_1_loc4`, `Text6_1_loc5`, `Text6_1_loc6`, `Text6_1_loc7`, `Text6_1_loc8`, `Text7_0_loc1`, `Text7_0_loc2`, `Text7_0_loc3`, `Text7_0_loc4`, `Text7_0_loc5`, `Text7_0_loc6`, `Text7_0_loc7`, `Text7_0_loc8`, `Text7_1_loc1`, `Text7_1_loc2`, `Text7_1_loc3`, `Text7_1_loc4`, `Text7_1_loc5`, `Text7_1_loc6`, `Text7_1_loc7`, `Text7_1_loc8`) VALUES -(99322, 'Teleporter is functional. Player $N can teleport to:', NULL, NULL, NULL, NULL, NULL, NULL, 'Приветствую $N! Телепортер функционирует нормально. Вы можете переместиться в следущие места:', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Приветствую $N', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, ''); - -DELETE FROM `npc_text` WHERE `ID` = 99322; -INSERT INTO `npc_text` (`ID`, `text0_0`, `text0_1`, `lang0`, `prob0`, `em0_0`, `em0_1`, `em0_2`, `em0_3`, `em0_4`, `em0_5`, `text1_0`, `text1_1`, `lang1`, `prob1`, `em1_0`, `em1_1`, `em1_2`, `em1_3`, `em1_4`, `em1_5`, `text2_0`, `text2_1`, `lang2`, `prob2`, `em2_0`, `em2_1`, `em2_2`, `em2_3`, `em2_4`, `em2_5`, `text3_0`, `text3_1`, `lang3`, `prob3`, `em3_0`, `em3_1`, `em3_2`, `em3_3`, `em3_4`, `em3_5`, `text4_0`, `text4_1`, `lang4`, `prob4`, `em4_0`, `em4_1`, `em4_2`, `em4_3`, `em4_4`, `em4_5`, `text5_0`, `text5_1`, `lang5`, `prob5`, `em5_0`, `em5_1`, `em5_2`, `em5_3`, `em5_4`, `em5_5`, `text6_0`, `text6_1`, `lang6`, `prob6`, `em6_0`, `em6_1`, `em6_2`, `em6_3`, `em6_4`, `em6_5`, `text7_0`, `text7_1`, `lang7`, `prob7`, `em7_0`, `em7_1`, `em7_2`, `em7_3`, `em7_4`, `em7_5`) VALUES -(99322, 'Teleporter is functional. Player $N can teleport to:', 'Teleporter is functional. Player $N can teleport to:', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0); - -DELETE FROM `locales_npc_text` WHERE `entry` = 99323; -INSERT INTO `locales_npc_text` (`entry`, `Text0_0_loc1`, `Text0_0_loc2`, `Text0_0_loc3`, `Text0_0_loc4`, `Text0_0_loc5`, `Text0_0_loc6`, `Text0_0_loc7`, `Text0_0_loc8`, `Text0_1_loc1`, `Text0_1_loc2`, `Text0_1_loc3`, `Text0_1_loc4`, `Text0_1_loc5`, `Text0_1_loc6`, `Text0_1_loc7`, `Text0_1_loc8`, `Text1_0_loc1`, `Text1_0_loc2`, `Text1_0_loc3`, `Text1_0_loc4`, `Text1_0_loc5`, `Text1_0_loc6`, `Text1_0_loc7`, `Text1_0_loc8`, `Text1_1_loc1`, `Text1_1_loc2`, `Text1_1_loc3`, `Text1_1_loc4`, `Text1_1_loc5`, `Text1_1_loc6`, `Text1_1_loc7`, `Text1_1_loc8`, `Text2_0_loc1`, `Text2_0_loc2`, `Text2_0_loc3`, `Text2_0_loc4`, `Text2_0_loc5`, `Text2_0_loc6`, `Text2_0_loc7`, `Text2_0_loc8`, `Text2_1_loc1`, `Text2_1_loc2`, `Text2_1_loc3`, `Text2_1_loc4`, `Text2_1_loc5`, `Text2_1_loc6`, `Text2_1_loc7`, `Text2_1_loc8`, `Text3_0_loc1`, `Text3_0_loc2`, `Text3_0_loc3`, `Text3_0_loc4`, `Text3_0_loc5`, `Text3_0_loc6`, `Text3_0_loc7`, `Text3_0_loc8`, `Text3_1_loc1`, `Text3_1_loc2`, `Text3_1_loc3`, `Text3_1_loc4`, `Text3_1_loc5`, `Text3_1_loc6`, `Text3_1_loc7`, `Text3_1_loc8`, `Text4_0_loc1`, `Text4_0_loc2`, `Text4_0_loc3`, `Text4_0_loc4`, `Text4_0_loc5`, `Text4_0_loc6`, `Text4_0_loc7`, `Text4_0_loc8`, `Text4_1_loc1`, `Text4_1_loc2`, `Text4_1_loc3`, `Text4_1_loc4`, `Text4_1_loc5`, `Text4_1_loc6`, `Text4_1_loc7`, `Text4_1_loc8`, `Text5_0_loc1`, `Text5_0_loc2`, `Text5_0_loc3`, `Text5_0_loc4`, `Text5_0_loc5`, `Text5_0_loc6`, `Text5_0_loc7`, `Text5_0_loc8`, `Text5_1_loc1`, `Text5_1_loc2`, `Text5_1_loc3`, `Text5_1_loc4`, `Text5_1_loc5`, `Text5_1_loc6`, `Text5_1_loc7`, `Text5_1_loc8`, `Text6_0_loc1`, `Text6_0_loc2`, `Text6_0_loc3`, `Text6_0_loc4`, `Text6_0_loc5`, `Text6_0_loc6`, `Text6_0_loc7`, `Text6_0_loc8`, `Text6_1_loc1`, `Text6_1_loc2`, `Text6_1_loc3`, `Text6_1_loc4`, `Text6_1_loc5`, `Text6_1_loc6`, `Text6_1_loc7`, `Text6_1_loc8`, `Text7_0_loc1`, `Text7_0_loc2`, `Text7_0_loc3`, `Text7_0_loc4`, `Text7_0_loc5`, `Text7_0_loc6`, `Text7_0_loc7`, `Text7_0_loc8`, `Text7_1_loc1`, `Text7_1_loc2`, `Text7_1_loc3`, `Text7_1_loc4`, `Text7_1_loc5`, `Text7_1_loc6`, `Text7_1_loc7`, `Text7_1_loc8`) VALUES -(99323, 'Teleporter is functional. Select control panel to teleport.', NULL, NULL, NULL, NULL, NULL, NULL, 'Телепортер функционирует нормально. Выберите место назначения на контрольной панели.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Приветствую $N', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, ''); - -DELETE FROM `npc_text` WHERE `ID` = 99323; -INSERT INTO `npc_text` (`ID`, `text0_0`, `text0_1`, `lang0`, `prob0`, `em0_0`, `em0_1`, `em0_2`, `em0_3`, `em0_4`, `em0_5`, `text1_0`, `text1_1`, `lang1`, `prob1`, `em1_0`, `em1_1`, `em1_2`, `em1_3`, `em1_4`, `em1_5`, `text2_0`, `text2_1`, `lang2`, `prob2`, `em2_0`, `em2_1`, `em2_2`, `em2_3`, `em2_4`, `em2_5`, `text3_0`, `text3_1`, `lang3`, `prob3`, `em3_0`, `em3_1`, `em3_2`, `em3_3`, `em3_4`, `em3_5`, `text4_0`, `text4_1`, `lang4`, `prob4`, `em4_0`, `em4_1`, `em4_2`, `em4_3`, `em4_4`, `em4_5`, `text5_0`, `text5_1`, `lang5`, `prob5`, `em5_0`, `em5_1`, `em5_2`, `em5_3`, `em5_4`, `em5_5`, `text6_0`, `text6_1`, `lang6`, `prob6`, `em6_0`, `em6_1`, `em6_2`, `em6_3`, `em6_4`, `em6_5`, `text7_0`, `text7_1`, `lang7`, `prob7`, `em7_0`, `em7_1`, `em7_2`, `em7_3`, `em7_4`, `em7_5`) VALUES -(99323, 'Teleporter is functional. Select control panel to teleport.', 'Teleporter is functional. Select control panel to teleport.', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0); - UPDATE `instance_template` SET `script`='instance_icecrown_spire' WHERE `map`=631; -- Saurfang @@ -77,13 +64,19 @@ INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid` (124864, 37230, 631, 15, 1, 0, 0, -222.214, 2220.68, 199.97, 3.1586, 300, 0, 0, 1078480, 41690, 0, 0); -- Rotface --- UPDATE `creature_template` SET `ScriptName`='boss_rotface' WHERE `entry`= 36627; +UPDATE `creature_template` SET `ScriptName`='boss_rotface', `AIName`='' WHERE `entry`= 36627; +UPDATE `gameobject_template` SET `faction` = '114' WHERE `gameobject_template`.`entry` IN (201370); +UPDATE `gameobject` SET `state` = '0' WHERE `id` IN (201370); -- Festergut --- UPDATE `creature_template` SET `ScriptName`='boss_festergut' WHERE `entry`= 36626; +UPDATE `creature_template` SET `ScriptName`='boss_festergut', `AIName`='' WHERE `entry`= 36626; +UPDATE `gameobject_template` SET `faction` = '114' WHERE `gameobject_template`.`entry` IN (201371); +UPDATE `gameobject` SET `state` = '0' WHERE `id` IN (201371); + -- Professor putricide --- UPDATE `creature_template` SET `ScriptName`='boss_professor_putricide' WHERE `entry`= 36678; -UPDATE `gameobject_template` SET `faction` = '114',`data0` = '0' WHERE `gameobject_template`.`entry` IN (201371,201370,201372,201614,201613); -UPDATE `gameobject` SET `state` = '1' WHERE `id` IN (201371,201370,201372,201614,201613); +UPDATE `creature_template` SET `ScriptName`='boss_proffesor_putricide', `AIName`='' WHERE `entry`= 36678; +UPDATE `gameobject_template` SET `faction` = '114',`data0` = '0' WHERE `gameobject_template`.`entry` IN (201372,201614,201613, 201612); +UPDATE `gameobject` SET `state` = '1' WHERE `id` IN (201612,201614,201613); +UPDATE `gameobject` SET `state` = '0' WHERE `id` IN (201372); -- Taldaram -- UPDATE `creature_template` SET `ScriptName`='boss_taldaram' WHERE `entry`= 37973; diff --git a/addition/721_icecrown_scriptdev2.sql b/addition/721_icecrown_scriptdev2.sql index 36bdc0538..f62a2e894 100644 --- a/addition/721_icecrown_scriptdev2.sql +++ b/addition/721_icecrown_scriptdev2.sql @@ -3,7 +3,7 @@ INSERT INTO `script_texts` (`entry`,`content_loc8`, `content_default`, `sound`, ('-1631001','Проклятые несут миру смерть и разрушение!','The Scourge will wash over this world as a swarm of death and destruction!','16941','1','0','0','marrowgar SAY_AGGRO'), ('-1631002','Шторм костей!','BONE STORM!','16946','1','0','0','marrowgar SAY_BONESTORM'), ('-1631003','Проткнут костью!','Bound by bone!','16947','1','0','0','marrowgar SAY_BONESPIKE1'), -('-1631004','','Stick Around!','16948','1','0','0','marrowgar SAY_BONESPIKE2'), +('-1631004','Кости вокруг!','Stick Around!','16948','1','0','0','marrowgar SAY_BONESPIKE2'), ('-1631005','Выход - только смерть!','The only escape is death!','16949','1','0','0','marrowgar SAY_BONESPIKE3'), ('-1631006','Больше костей!','More bones for the offering!','16942','1','0','0','marrowgar SAY_KILL1'), ('-1631007','','Languish in damnation!','16943','1','0','0','marrowgar SAY_KILL2'), @@ -24,7 +24,7 @@ INSERT INTO `script_texts` (`entry`,`content_loc8`, `content_default`, `sound`, ('-1631032','Все - части плана Мастера! Ваш конец неизбежен...','All part of the masters plan! Your end is... inevitable!','16871','1','0','0','deathwhisper SAY_DEATH'), ('-1631100','Во имя Короля-Лича!','BY THE MIGHT OF THE LICH KING!','16694','1','0','0','saurfang SAY_AGGRO'), ('-1631101','Земля станет красной от вашей крови!','The ground runs red with your blood!','16699','1','0','0','saurfang SAY_FALLENCHAMPION'), -('-1631102','Корм, мои рабы!','Feast, my minions!','16700','1','0','0','saurfang SAY_BLOODBEASTS'), +('-1631102','Корм, мои собаки!','Feast, my minions!','16700','1','0','0','saurfang SAY_BLOODBEASTS'), ('-1631103','Ты никто!','You are nothing!','16695','1','0','0','saurfang SAY_KILL1'), ('-1631104','Ваши души не найдут здесь избавления!','Your soul will find no redemption here!','16696','1','0','0','saurfang SAY_KILL2'), ('-1631105','Я вижу приближение смерти!','I have become... death!','16698','1','0','0','saurfang SAY_BERSERK'), diff --git a/addition/721_icecrown_spelltable_scriptdev2.sql b/addition/721_icecrown_spelltable_scriptdev2.sql new file mode 100644 index 000000000..7dc2d02ea --- /dev/null +++ b/addition/721_icecrown_spelltable_scriptdev2.sql @@ -0,0 +1,62 @@ +-- Icecrown citadel spelltable + +-- Lord Marrowgar +DELETE FROM `boss_spell_table` WHERE `entry` = 36612; + +-- Lady Deathwhisper +DELETE FROM `boss_spell_table` WHERE `entry` = 36855; + +-- Deathbringer Saurfang +DELETE FROM `boss_spell_table` WHERE `entry` = 37813; + +-- Festergut +DELETE FROM `boss_spell_table` WHERE `entry` = 36626; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +( 36626, 70138, 70140, 70140, 70137, 10000, 0, 0, 0, 30000, 0, 0, 0, 4, 0, 0), +( 36626, 69161, 70139, 70139, 70140, 10000, 0, 0, 0, 30000, 0, 0, 0, 4, 0, 0), +( 36626, 70468, 69161, 69161, 70139, 10000, 0, 0, 0, 30000, 0, 0, 0, 4, 0, 0), +( 36626, 69165, 69165, 69165, 69165, 10000, 0, 0, 0, 30000, 0, 0, 0, 1, 0, 0), +( 36626, 71912, 71912, 71912, 71912, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 4, 1, 0), +( 36626, 69195, 73031, 71219, 73032, 20000, 0, 0, 0, 30000, 0, 0, 0, 1, 0, 0), +( 36626, 69279, 69279, 69279, 69279, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 4, 1, 0), +( 36626, 72103, 72103, 72103, 72103, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 4, 0, 0), +( 36626, 72219, 72551, 72551, 72553, 10000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), +( 36626, 72227, 72227, 72229, 72230, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 4, 0, 0), +( 36626, 72272, 72273, 72273, 73020, 20000, 0, 0, 0, 30000, 0, 0, 0, 1, 0, 0), +( 36626, 47008, 47008, 47008, 47008, 300000, 300000, 300000, 300000, 300000, 300000, 300000, 300000, 1, 0, 0); + +-- Rotface +DELETE FROM `boss_spell_table` WHERE `entry` = 36627; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(36627, 47008, 0, 0, 0, 300000, 0, 0, 0, 300000, 0, 0, 0, 1, 0, 0), +(36627, 69508, 0, 0, 0, 15000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), +(36627, 69674, 0, 0, 0, 15000, 0, 0, 0, 30000, 0, 0, 0, 4, 0, 0), +(36627, 69788, 0, 0, 0, 20000, 0, 0, 0, 40000, 0, 0, 0, 1, 0, 0), +(36627, 69783, 69797, 69799, 69802, 20000, 0, 0, 0, 40000, 0, 0, 0, 3, 0, 0), +(36627, 69789, 0, 0, 0, 20000, 0, 0, 0, 40000, 0, 0, 0, 1, 0, 0); + +-- Professor Putricide +DELETE FROM `boss_spell_table` WHERE `entry` = 36678; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(36678, 47008, 0, 0, 0, 300000, 0, 0, 0, 300000, 0, 0, 0, 1, 0, 0); + +-- Taldaram +DELETE FROM `boss_spell_table` WHERE `entry` = 37973; + +-- Valanar +DELETE FROM `boss_spell_table` WHERE `entry` = 37970; + +-- Keleseth +DELETE FROM `boss_spell_table` WHERE `entry` = 37972; + +-- Lanathel +DELETE FROM `boss_spell_table` WHERE `entry` = 37955; + +-- Valithria +DELETE FROM `boss_spell_table` WHERE `entry` = 36789; + +-- Sindragosa +DELETE FROM `boss_spell_table` WHERE `entry` = 36853; + +-- Lich king +DELETE FROM `boss_spell_table` WHERE `entry` = 36597; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp index cfb93f7c1..502093327 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp @@ -23,42 +23,20 @@ EndScriptData */ #include "precompiled.h" #include "def_spire.h" -enum -{ - TYPE_BOSS = TYPE_FESTERGUT, - -}; enum BossSpells { - SPELL_GASEOUS_BLIGHT_0, - SPELL_GASEOUS_BLIGHT_1, - SPELL_GASEOUS_BLIGHT_2, - SPELL_INHALE_BLIGHT, - SPELL_INHALED_BLIGHT, - SPELL_PUNGENT_BLIGHT, - SPELL_GAS_SPORE, - SPELL_INOCULATE, - SPELL_GASTRIC_BLOAT, - SPELL_GASTRIC_EXPLOSION, - SPELL_VILE_GAS, - SPELL_BERSERK, - BOSS_SPELL_COUNT -}; -static SpellTable m_BossSpell[]= -{ -// Name 10 25 10H 25H -{SPELL_GASEOUS_BLIGHT_0, 70138, 70140, 70140, 70137, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_GASEOUS_BLIGHT_1, 69161, 70139, 70139, 70140, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_GASEOUS_BLIGHT_2, 70468, 69161, 69161, 70139, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_INHALE_BLIGHT, 69165, 69165, 69165, 69165, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_INHALED_BLIGHT, 71912, 71912, 71912, 71912, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, true, false}, -{SPELL_PUNGENT_BLIGHT, 69195, 73031, 71219, 73032, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_GAS_SPORE, 69279, 69279, 69279, 69279, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, true, false}, -{SPELL_INOCULATE, 72103, 72103, 72103, 72103, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_GASTRIC_BLOAT, 72219, 72551, 72551, 72553, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_GASTRIC_EXPLOSION,72227, 72227, 72229, 72230, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_VILE_GAS, 72272, 72273, 72273, 73020, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 65535, CAST_ON_RANDOM, false, false}, -{SPELL_BERSERK, 47008, 47008, 47008, 47008, 300000, 300000, 300000, 300000, 300000, 300000, 300000, 300000, 65535, CAST_ON_SELF, false, false}, + SPELL_GASEOUS_BLIGHT_0 = 70138, + SPELL_GASEOUS_BLIGHT_1 = 69161, + SPELL_GASEOUS_BLIGHT_2 = 70468, + SPELL_INHALE_BLIGHT = 69165, + SPELL_INHALED_BLIGHT = 71912, + SPELL_PUNGENT_BLIGHT = 69195, + SPELL_GAS_SPORE = 69279, + SPELL_INOCULATE = 72103, + SPELL_GASTRIC_BLOAT = 72219, + SPELL_GASTRIC_EXPLOSION = 72227, + SPELL_VILE_GAS = 72272, + SPELL_BERSERK = 47008, }; struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI @@ -66,74 +44,30 @@ struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI boss_festergutAI(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); Reset(); } - uint8 Difficulty; ScriptedInstance *pInstance; - uint32 m_uiSpell_Timer[BOSS_SPELL_COUNT]; + BossSpellWorker* bsw; uint8 stage; - uint8 substage; void Reset() { if(!pInstance) return; - Difficulty = pInstance->GetData(DIFFICULTY); - pInstance->SetData(TYPE_BOSS, NOT_STARTED); - if (!Difficulty) Difficulty = 0; - memset(&m_uiSpell_Timer, 0, sizeof(m_uiSpell_Timer)); - } - - bool QuerySpellPeriod(uint32 m_uiSpellIdx, uint32 diff) - { - if(!pInstance) return false; - bool result; - SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; - if (m_uiSpellIdx != pSpell->id) return false; - if (m_uiSpell_Timer[m_uiSpellIdx] < diff && m_uiSpell_Timer[m_uiSpellIdx] != 0) { - m_uiSpell_Timer[m_uiSpellIdx]=urand(pSpell->m_uiSpellTimerMin[Difficulty],pSpell->m_uiSpellTimerMax[Difficulty]); - result = true; - } else { - m_uiSpell_Timer[m_uiSpellIdx] -= diff; - result = false; - }; - return result; - } - - bool CastBossSpell(uint32 m_uiSpellIdx) - { - if(!pInstance) return false; - Unit* pTarget; - SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; - // Find spell index - temporary direct insert from spelltable - if (m_uiSpellIdx != pSpell->id) return false; - - switch (pSpell->m_CastTarget) { - case CAST_ON_SUMMONS: - pTarget = m_creature->getVictim(); //CHANGE IT!!! - break; - case CAST_ON_VICTIM: - pTarget = m_creature->getVictim(); - break; - case CAST_ON_RANDOM: - pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); - break; - case CAST_ON_BOTTOMAGGRO: - pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1); - break; - - }; - if (pTarget) DoCastSpellIfCan(pTarget,pSpell->m_uiSpellEntry[Difficulty]); + pInstance->SetData(TYPE_FESTERGUT, NOT_STARTED); + stage = 0; } void Aggro(Unit *who) { - if(pInstance) pInstance->SetData(TYPE_BOSS, IN_PROGRESS); + if(pInstance) pInstance->SetData(TYPE_FESTERGUT, IN_PROGRESS); } void JustDied(Unit *killer) { - if(pInstance) pInstance->SetData(TYPE_BOSS, DONE); + if(pInstance) pInstance->SetData(TYPE_FESTERGUT, DONE); + bsw->doRemove(SPELL_PUNGENT_BLIGHT); } void UpdateAI(const uint32 diff) @@ -143,12 +77,37 @@ struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI switch(stage) { - case 0: { - if (QuerySpellPeriod(SPELL_GASEOUS_BLIGHT_0, diff)) - CastBossSpell(SPELL_GASEOUS_BLIGHT_0); - break;} - case 1: { - break;} + case 0: + if (bsw->timedQuery(SPELL_GASEOUS_BLIGHT_0, diff)) + { + bsw->doCast(SPELL_GASEOUS_BLIGHT_0); + bsw->doCast(SPELL_INHALE_BLIGHT); + stage = 1; + } + break; + case 1: + if (bsw->timedQuery(SPELL_GASEOUS_BLIGHT_1, diff)) + { + bsw->doCast(SPELL_GASEOUS_BLIGHT_1); + bsw->doCast(SPELL_INHALE_BLIGHT); + stage = 2; + } + break; + case 2: + if (bsw->timedQuery(SPELL_GASEOUS_BLIGHT_2, diff)) + { + bsw->doCast(SPELL_GASEOUS_BLIGHT_2); + bsw->doCast(SPELL_INHALE_BLIGHT); + stage = 3; + } + break; + case 3: + if (bsw->timedQuery(SPELL_PUNGENT_BLIGHT, diff)) + { + bsw->doCast(SPELL_PUNGENT_BLIGHT); + stage = 0; + } + break; } DoMeleeAttackIfReady(); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp index 51aae74a1..0b6dd80b7 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp @@ -22,4 +22,70 @@ SDCategory: Icecrown Citadel EndScriptData */ #include "precompiled.h" -#include "def_spire.h" \ No newline at end of file +#include "def_spire.h" + +enum BossSpells +{ + SPELL_BERSERK = 47008, +}; + +struct MANGOS_DLL_DECL boss_proffesor_putricideAI : public ScriptedAI +{ + boss_proffesor_putricideAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); + Reset(); + } + + ScriptedInstance *pInstance; + BossSpellWorker* bsw; + uint8 stage; + + void Reset() + { + if(!pInstance) return; + pInstance->SetData(TYPE_PUTRICIDE, NOT_STARTED); + } + + void Aggro(Unit *who) + { + if(pInstance) pInstance->SetData(TYPE_PUTRICIDE, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_PUTRICIDE, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + switch(stage) + { + case 0: { + bsw->timedCast(SPELL_BERSERK, diff); + break;} + case 1: { + break;} + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_proffesor_putricide(Creature* pCreature) +{ + return new boss_proffesor_putricideAI(pCreature); +} + +void AddSC_boss_proffesor_putricide() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_proffesor_putricide"; + newscript->GetAI = &GetAI_boss_proffesor_putricide; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp index 37f3cec3c..99dcd06d8 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp @@ -22,4 +22,80 @@ SDCategory: Icecrown Citadel EndScriptData */ #include "precompiled.h" -#include "def_spire.h" \ No newline at end of file +#include "def_spire.h" + +enum BossSpells +{ + SPELL_OOZE_FLOOD = 69789, + SPELL_OOZE_FLOOD_0 = 69788, + SPELL_OOZE_FLOOD_1 = 69783, + SPELL_SLIME_SPRAY = 69508, + SPELL_MUTATED_INFECTION = 69674, + SPELL_BERSERK = 47008, + SPELL_STICKY_OOZE = 69774, + SPELL_RADIATING_OOZE = 69750, + SPELL_RADIATING_OOZE_1 = 69760, + SPELL_UNSTABLE_OOZE = 69558, + SPELL_OOZE_EXPLODE = 69839, +}; + +struct MANGOS_DLL_DECL boss_rotfaceAI : public ScriptedAI +{ + boss_rotfaceAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); + Reset(); + } + + ScriptedInstance *pInstance; + BossSpellWorker* bsw; + uint8 stage; + + void Reset() + { + if(!pInstance) return; + pInstance->SetData(TYPE_ROTFACE, NOT_STARTED); + } + + void Aggro(Unit *who) + { + if(pInstance) pInstance->SetData(TYPE_ROTFACE, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_ROTFACE, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + bsw->timedCast(SPELL_OOZE_FLOOD_1, diff); + + bsw->timedCast(SPELL_SLIME_SPRAY, diff); + + bsw->timedCast(SPELL_MUTATED_INFECTION, diff); + + bsw->timedCast(SPELL_BERSERK, diff); + + DoMeleeAttackIfReady(); + } +}; + + +CreatureAI* GetAI_boss_rotface(Creature* pCreature) +{ + return new boss_rotfaceAI(pCreature); +} + +void AddSC_boss_rotface() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_rotface"; + newscript->GetAI = &GetAI_boss_rotface; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h index 47234c338..0865aaa00 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h @@ -1,12 +1,12 @@ #ifndef DEF_ICECROWN_SPIRE_H #define DEF_ICECROWN_SPIRE_H +#include "sc_boss_spell_worker.h" enum { DIFFICULTY = 1001, MAP_NUM = 631, - MAX_ENCOUNTERS = 16, TYPE_TELEPORT = 0, TYPE_MARROWGAR = 1, @@ -22,7 +22,9 @@ enum TYPE_VALITHRIA = 11, TYPE_SINDRAGOSA = 12, TYPE_LICH_KING = 13, + TYPE_ICECROWN_QUESTS = 14, TYPE_FROSTWIRM_COUNT = 15, + MAX_ENCOUNTERS, NPC_LORD_MARROWGAR = 36612, NPC_LADY_DEATHWHISPER = 36855, @@ -35,8 +37,8 @@ enum NPC_KELESETH = 37972, NPC_LANATHEL = 37955, NPC_VALITHRIA = 36789, - NPC_SINDRAGOSA = 37755, - NPC_LICH_KING = 29983, + NPC_SINDRAGOSA = 36853, + NPC_LICH_KING = 36597, GO_TELEPORT_GOSSIP_MESSAGE = 99323, TELEPORT_GOSSIP_MESSAGE = 99322, @@ -54,6 +56,7 @@ enum GO_SCIENTIST_DOOR_GREEN = 201614, //72530 GO_SCIENTIST_DOOR_ORANGE = 201613, //72531 + GO_SCIENTIST_DOOR_COLLISION = 201612, GO_SCIENTIST_DOOR = 201372, //72541 GO_CRIMSON_HALL_DOOR = 201376, //72532 @@ -87,24 +90,7 @@ enum GO_GUNSHIP_ARMORY_H_25H = 202180, // }; -struct Locations -{ - float x, y, z; - uint32 id; -}; - -enum SpellTableParameters -{ - DIFFICULTY_LEVELS = 4, - CAST_ON_SELF = 1000, - CAST_ON_SUMMONS, - CAST_ON_VICTIM, - CAST_ON_RANDOM, - CAST_ON_BOTTOMAGGRO, - -}; - -struct SpellTable +struct _SpellTable { uint32 id; uint32 m_uiSpellEntry[DIFFICULTY_LEVELS]; // Stores spell entry for difficulty levels diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp index dc92856cf..3e17d6a05 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp @@ -32,7 +32,7 @@ struct t_Locations { char const* name; float x, y, z; - uint32 id; + uint32 spellID; bool state; bool active; uint32 encounter; @@ -41,51 +41,43 @@ struct t_Locations static t_Locations PortalLoc[]= { {"Молот света",-17.1928, 2211.44, 30.1158,0,true,true,TYPE_TELEPORT}, // -{"Шпиль",-503.62, 2211.47, 62.8235,1,false,true,TYPE_MARROWGAR}, // -{"Черепной вал",-615.145, 2211.47, 199.972,2,false,true,TYPE_DEATHWHISPER}, // -{"Воздушное сражение",-209.5, 2211.91, 199.97,3,false,true,TYPE_SKULLS_PLATO}, // -{"Подъем смертоносного",-549.131, 2211.29, 539.291,4,false,true,TYPE_FLIGHT_WAR}, // -{"Цитадель Ледяной Короны",4198.42, 2769.22, 351.065,5,false,false,TYPE_SAURFANG}, // -{"Святилище крови",4490.205566, 2769.275635, 403.983765,6,false,false,TYPE_BLOOD_COUNCIL}, // -{"Логово Королевы льда",4356.236816, 2402.573242, 220.462540,7,false,false,TYPE_VALITHRIA}, // +{"Молельня проклятых",-503.62, 2211.47, 62.8235,70856,false,true,TYPE_MARROWGAR}, // +{"Черепной вал",-615.145, 2211.47, 199.972,70857,false,true,TYPE_DEATHWHISPER}, // +{"Подъем смертоносного",-549.131, 2211.29, 539.291,70858,false,true,TYPE_FLIGHT_WAR}, // +{"Цитадель Ледяной Короны",4198.42, 2769.22, 351.065,70859,false,true,TYPE_SAURFANG}, // +{"Святилище крови",4490.205566, 2769.275635, 403.983765,0,false,true,TYPE_BLOOD_COUNCIL}, // +{"Логово Королевы льда",4356.580078, 2565.75, 220.401993,70861,false,true,TYPE_VALITHRIA}, // +{"Ледяной трон",529.3, -2124.7, 1041, 70860,false,true,TYPE_SINDRAGOSA}, // }; -bool GossipSelect_icecrown_teleporter(Player *player, Creature* pCreature, uint32 sender, uint32 action) +bool GOGossipSelect_go_icecrown_teleporter(Player *player, GameObject* pGo, uint32 sender, uint32 action) { + int32 damage = 0; if(sender != GOSSIP_SENDER_MAIN) return true; + if(!player->getAttackers().empty()) return true; + if(action >= 0 && action <= PORTALS_COUNT) - player->TeleportTo(MAP_NUM, PortalLoc[action].x, PortalLoc[action].y, PortalLoc[action].z, 0); - player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(MAP_NUM, PortalLoc[action].x, PortalLoc[action].y, PortalLoc[action].z, 0); + if (PortalLoc[action].spellID !=0 ) + if (SpellEntry const* spell = (SpellEntry *)GetSpellStore()->LookupEntry(PortalLoc[action].spellID)) + player->AddAura(new BossAura(spell, EFFECT_INDEX_2, &damage,(Unit*)player, (Unit*)player)); + + player->CLOSE_GOSSIP_MENU(); return true; } -bool GossipHello_icecrown_teleporter(Player *player, Creature* pCreature) +bool GOGossipHello_go_icecrown_teleporter(Player *player, GameObject* pGo) { - ScriptedInstance *pInstance = (ScriptedInstance *) pCreature->GetInstanceData(); + ScriptedInstance *pInstance = (ScriptedInstance *) pGo->GetInstanceData(); if(!pInstance) return true; - bool m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); for(uint8 i = 0; i < PORTALS_COUNT; i++) { if (PortalLoc[i].active == true && (PortalLoc[i].state == true || pInstance->GetData(TYPE_TELEPORT) >= PortalLoc[i].encounter)) player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, PortalLoc[i].name, GOSSIP_SENDER_MAIN, i); }; - player->SEND_GOSSIP_MENU(TELEPORT_GOSSIP_MESSAGE, pCreature->GetGUID()); - return true; -} - - -bool GOHello_go_icecrown_teleporter(Player *player, GameObject* pGo) -{ - - ScriptedInstance *pInstance = (ScriptedInstance *) pGo->GetInstanceData(); - if(!pInstance) return true; - - bool m_bIsRegularMode = pGo->GetMap()->IsRegularDifficulty(); - - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, "No message", GOSSIP_SENDER_MAIN, 0); - player->SEND_GOSSIP_MENU(GO_TELEPORT_GOSSIP_MESSAGE, pGo->GetGUID()); + player->SEND_GOSSIP_MENU(TELEPORT_GOSSIP_MESSAGE, pGo->GetGUID()); return true; } @@ -94,14 +86,9 @@ void AddSC_icecrown_teleporter() { Script *newscript; - newscript = new Script; - newscript->Name = "icecrown_teleporter"; - newscript->pGossipHello = &GossipHello_icecrown_teleporter; - newscript->pGossipSelect = &GossipSelect_icecrown_teleporter; - newscript->RegisterSelf(); - newscript = new Script; newscript->Name = "go_icecrown_teleporter"; - newscript->pGOHello = &GOHello_go_icecrown_teleporter; + newscript->pGOGossipHello = &GOGossipHello_go_icecrown_teleporter; + newscript->pGOGossipSelect = &GOGossipSelect_go_icecrown_teleporter; newscript->RegisterSelf(); } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp index 780a31ae5..c68646fc9 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp @@ -54,6 +54,7 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance uint64 m_uiGreenPlagueGUID; uint64 m_uiSDoorGreenGUID; uint64 m_uiSDoorOrangeGUID; + uint64 m_uiSDoorCollisionGUID; uint64 m_uiScientistDoorGUID; uint64 m_uiCrimsonDoorGUID; uint64 m_uiCounsilDoor1GUID; @@ -176,7 +177,10 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance case GO_SCIENTIST_DOOR_ORANGE: m_uiSDoorOrangeGUID = pGo->GetGUID(); break; - case GO_SCIENTIST_DOOR: + case GO_SCIENTIST_DOOR_COLLISION: + m_uiSDoorCollisionGUID = pGo->GetGUID(); + break; + case GO_SCIENTIST_DOOR: m_uiScientistDoorGUID = pGo->GetGUID(); break; case GO_CRIMSON_HALL_DOOR: @@ -268,22 +272,17 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance if (uiData == DONE) { OpenDoor(m_uiIcewall1GUID); OpenDoor(m_uiIcewall1GUID); - m_auiEncounter[0] = TYPE_MARROWGAR; } break; case TYPE_DEATHWHISPER: m_auiEncounter[2] = uiData; if (uiData == DONE) { - m_auiEncounter[0] = TYPE_DEATHWHISPER; if (GameObject* pGOTemp = instance->GetGameObject(m_uiDeathWhisperElevatorGUID)) pGOTemp->SetRespawnTime(25000); } break; case TYPE_SKULLS_PLATO: m_auiEncounter[3] = uiData; - if (uiData == DONE) { - m_auiEncounter[0] = TYPE_SKULLS_PLATO; - } break; case TYPE_FLIGHT_WAR: if (uiData == DONE && m_auiEncounter[4] != DONE ) { @@ -298,14 +297,10 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance m_auiEncounter[4] = uiData; }; break; - case TYPE_FROSTWIRM_COUNT: - m_auiEncounter[15] = uiData; - uiData = NOT_STARTED; - break; case TYPE_SAURFANG: m_auiEncounter[5] = uiData; if (uiData == DONE) { -// OpenDoor(m_uiSaurfangDoorGUID); + OpenDoor(m_uiSaurfangDoorGUID); if (GameObject* pChest = instance->GetGameObject(m_uiSaurfangCacheGUID)) if (pChest && !pChest->isSpawned()) { pChest->SetRespawnTime(7*DAY); @@ -314,12 +309,26 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance break; case TYPE_FESTERGUT: m_auiEncounter[6] = uiData; + if (uiData == IN_PROGRESS) CloseDoor(m_uiOrangePlagueGUID); + else OpenDoor(m_uiOrangePlagueGUID); + if (uiData == DONE) { + OpenDoor(m_uiSDoorOrangeGUID); + if (m_auiEncounter[7] == DONE) OpenDoor(m_uiSDoorCollisionGUID); + } break; case TYPE_ROTFACE: m_auiEncounter[7] = uiData; + if (uiData == IN_PROGRESS) CloseDoor(m_uiGreenPlagueGUID); + else OpenDoor(m_uiGreenPlagueGUID); + if (uiData == DONE) { + OpenDoor(m_uiSDoorGreenGUID); + if (m_auiEncounter[6] == DONE) OpenDoor(m_uiSDoorCollisionGUID); + } break; case TYPE_PUTRICIDE: m_auiEncounter[8] = uiData; + if (uiData == IN_PROGRESS) CloseDoor(m_uiScientistDoorGUID); + else OpenDoor(m_uiScientistDoorGUID); break; case TYPE_BLOOD_COUNCIL: m_auiEncounter[9] = uiData; @@ -336,6 +345,13 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance case TYPE_LICH_KING: m_auiEncounter[13] = uiData; break; + case TYPE_ICECROWN_QUESTS: + m_auiEncounter[14] = uiData; + break; + case TYPE_FROSTWIRM_COUNT: + m_auiEncounter[15] = uiData; + uiData = NOT_STARTED; + break; } if (uiData == DONE) diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index 8bc65e7dd..1e7393a44 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -385,6 +385,9 @@ extern void AddSC_icecrown_teleporter(); extern void AddSC_boss_lord_marrowgar(); extern void AddSC_boss_lady_deathwhisper(); extern void AddSC_boss_deathbringer_saurfang(); +extern void AddSC_boss_rotface(); +extern void AddSC_boss_festergut(); +extern void AddSC_boss_proffesor_putricide(); extern void AddSC_instance_forge_of_souls(); extern void AddSC_boss_devourer_of_souls(); @@ -854,6 +857,9 @@ void AddScripts() AddSC_boss_lord_marrowgar(); AddSC_boss_lady_deathwhisper(); AddSC_boss_deathbringer_saurfang(); + AddSC_boss_rotface(); + AddSC_boss_festergut(); + AddSC_boss_proffesor_putricide(); AddSC_instance_forge_of_souls(); AddSC_boss_devourer_of_souls(); From 223a33f1619f760c7edf9d1bc9635dfdc5c7bdb3 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 15 Apr 2010 21:29:41 +0400 Subject: [PATCH 234/405] Variables initialize and cleanup. Thanks to Dron01 --- .../trial_of_the_crusader/boss_anubarak_trial.cpp | 3 ++- .../trial_of_the_crusader/boss_jaraxxus.cpp | 5 +---- .../trial_of_the_crusader/boss_northrend_beasts.cpp | 2 ++ .../trial_of_the_crusader/boss_twin_valkyr.cpp | 5 ++++- .../trial_of_the_crusader/trial_of_the_crusader.cpp | 7 ++++--- 5 files changed, 13 insertions(+), 9 deletions(-) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp index b459345f8..d14404d1c 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp @@ -73,7 +73,6 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI ScriptedInstance* m_pInstance; uint8 stage; - uint32 SubmergeTimer; bool intro; BossSpellWorker* bsw; Unit* pTarget; @@ -83,6 +82,7 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI stage = 0; intro = true; m_creature->SetRespawnDelay(DAY); + pTarget = NULL; } @@ -270,6 +270,7 @@ struct MANGOS_DLL_DECL mob_nerubian_borrowerAI : public ScriptedAI m_creature->SetInCombatWithZone(); m_creature->SetRespawnDelay(DAY); submerged = false; + currentTarget = NULL; } void KilledUnit(Unit* pVictim) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp index ac2689679..d1cbab603 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp @@ -179,13 +179,10 @@ struct MANGOS_DLL_DECL mob_legion_flameAI : public ScriptedAI } ScriptedInstance* m_pInstance; - uint8 Difficulty; uint32 m_uiRangeCheck_Timer; void Reset() { - Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); m_creature->SetInCombatWithZone(); @@ -195,7 +192,6 @@ struct MANGOS_DLL_DECL mob_legion_flameAI : public ScriptedAI m_creature->GetMotionMaster()->MoveChase(pTarget); m_creature->SetSpeedRate(MOVE_RUN, 0.5); } - } void KilledUnit(Unit* pVictim) @@ -478,6 +474,7 @@ struct MANGOS_DLL_DECL mob_mistress_of_painAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { + if (!m_pInstance) return; if (m_pInstance->GetData(TYPE_JARAXXUS) != IN_PROGRESS) m_creature->ForcedDespawn(); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index 9c8734d62..a38e43288 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -164,6 +164,8 @@ struct MANGOS_DLL_DECL mob_snobold_vassalAI : public ScriptedAI void Reset() { + pBoss = NULL; + defaultTarget = NULL; m_creature->SetInCombatWithZone(); m_creature->SetRespawnDelay(DAY); pBoss = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_GORMOK)); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp index 55f9cda09..5e5f33dde 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp @@ -111,6 +111,7 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI void KilledUnit(Unit* pVictim) { + if (!m_pInstance) return; DoScriptText(-1713544,pVictim); } @@ -127,6 +128,7 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) { + if (!m_pInstance) return; if (!m_creature || !m_creature->isAlive()) return; @@ -147,7 +149,7 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { - + if (!m_pInstance) return; if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -279,6 +281,7 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) { + if (!m_pInstance) return; if (!m_creature || !m_creature->isAlive()) return; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index f7c1e0315..5d2157264 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -469,13 +469,14 @@ struct MANGOS_DLL_DECL npc_fizzlebang_tocAI : public ScriptedAI { DoScriptText(-1713715, m_creature, pKiller); pInstance->SetData(TYPE_EVENT, 1180); - pPortal->ForcedDespawn(); + if (pPortal) pPortal->ForcedDespawn(); } void Reset() { m_creature->SetRespawnDelay(DAY); m_creature->GetMotionMaster()->MovePoint(1, SpawnLoc[27].x, SpawnLoc[27].y, SpawnLoc[27].z); + pPortal = NULL; } void UpdateAI(const uint32 diff) @@ -501,14 +502,14 @@ struct MANGOS_DLL_DECL npc_fizzlebang_tocAI : public ScriptedAI case 1130: m_creature->GetMotionMaster()->MovementExpired(); pPortal = m_creature->SummonCreature(NPC_PORTAL, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - pPortal->SetRespawnDelay(DAY); + if (pPortal) pPortal->SetRespawnDelay(DAY); DoScriptText(-1713512, m_creature); pInstance->SetData(TYPE_EVENT, 1135); UpdateTimer = 4000; break; case 1135: m_creature->GetMotionMaster()->MovementExpired(); - pPortal->SetDisplayId(15900); + if (pPortal) pPortal->SetDisplayId(15900); pInstance->SetData(TYPE_EVENT, 1140); UpdateTimer = 4000; break; From 46689bbe13f9403b45e1b64d71b5c9cdd14cdc84 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 15 Apr 2010 21:31:02 +0400 Subject: [PATCH 235/405] ICC part 17 - Rotface && Putricide + objects --- addition/721_icecrown_mangos.sql | 6 +- .../721_icecrown_spelltable_scriptdev2.sql | 53 ++++++++-- include/sc_boss_spell_worker.cpp | 2 +- .../icecrown_citadel/boss_festergut.cpp | 16 +-- .../boss_proffesor_putricide.cpp | 97 +++++++++++++++++-- .../icecrown_citadel/def_spire.h | 5 + .../instance_icecrown_spire.cpp | 26 ++++- 7 files changed, 181 insertions(+), 24 deletions(-) diff --git a/addition/721_icecrown_mangos.sql b/addition/721_icecrown_mangos.sql index e4aab24f6..50b25d529 100644 --- a/addition/721_icecrown_mangos.sql +++ b/addition/721_icecrown_mangos.sql @@ -84,8 +84,10 @@ UPDATE `gameobject` SET `state` = '0' WHERE `id` IN (201372); -- UPDATE `creature_template` SET `ScriptName`='boss_valanar' WHERE `entry`= 37970; -- Keleseth -- UPDATE `creature_template` SET `ScriptName`='boss_keleseth' WHERE `entry`= 37972; -UPDATE `gameobject_template` SET `faction` = '114',`data0` = '0' WHERE `gameobject_template`.`entry` IN (201376,201377,201378); -UPDATE `gameobject` SET `state` = '1' WHERE `id` IN (201376,201377,201378); +UPDATE `gameobject_template` SET `faction` = '114',`data0` = '0' WHERE `gameobject_template`.`entry` IN (201920,201377,201378); +UPDATE `gameobject` SET `state` = '1' WHERE `id` IN (201920,201377,201378); +UPDATE `gameobject_template` SET `faction` = '114',`data0` = '0' WHERE `gameobject_template`.`entry` IN (201376); +UPDATE `gameobject` SET `state` = '0' WHERE `id` IN (201376); -- Qween Lana'thel -- UPDATE `creature_template` SET `ScriptName`='boss_lanathel' WHERE `entry`= 37955; diff --git a/addition/721_icecrown_spelltable_scriptdev2.sql b/addition/721_icecrown_spelltable_scriptdev2.sql index 7dc2d02ea..aeeec7491 100644 --- a/addition/721_icecrown_spelltable_scriptdev2.sql +++ b/addition/721_icecrown_spelltable_scriptdev2.sql @@ -12,13 +12,14 @@ DELETE FROM `boss_spell_table` WHERE `entry` = 37813; -- Festergut DELETE FROM `boss_spell_table` WHERE `entry` = 36626; INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES -( 36626, 70138, 70140, 70140, 70137, 10000, 0, 0, 0, 30000, 0, 0, 0, 4, 0, 0), -( 36626, 69161, 70139, 70139, 70140, 10000, 0, 0, 0, 30000, 0, 0, 0, 4, 0, 0), -( 36626, 70468, 69161, 69161, 70139, 10000, 0, 0, 0, 30000, 0, 0, 0, 4, 0, 0), -( 36626, 69165, 69165, 69165, 69165, 10000, 0, 0, 0, 30000, 0, 0, 0, 1, 0, 0), -( 36626, 71912, 71912, 71912, 71912, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 4, 1, 0), -( 36626, 69195, 73031, 71219, 73032, 20000, 0, 0, 0, 30000, 0, 0, 0, 1, 0, 0), -( 36626, 69279, 69279, 69279, 69279, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 4, 1, 0), +( 36626, 70138, 0, 0, 0, 5000, 0, 0, 0, 15000, 0, 0, 0, 1, 0, 0), +( 36626, 69161, 0, 0, 0, 5000, 0, 0, 0, 15000, 0, 0, 0, 1, 0, 0), +( 36626, 69162, 0, 0, 0, 5000, 0, 0, 0, 15000, 0, 0, 0, 1, 0, 0), +( 36626, 70468, 0, 0, 0, 5000, 0, 0, 0, 15000, 0, 0, 0, 1, 0, 0), +( 36626, 69165, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 1, 0, 0), +( 36626, 69166, 0, 71912, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 1, 0, 0), +( 36626, 69195, 71219, 73031, 73032, 20000, 0, 0, 0, 30000, 0, 0, 0, 4, 0, 0), +( 36626, 69278, 69278, 71221, 71221, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 1, 0, 0), ( 36626, 72103, 72103, 72103, 72103, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 4, 0, 0), ( 36626, 72219, 72551, 72551, 72553, 10000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), ( 36626, 72227, 72227, 72229, 72230, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 4, 0, 0), @@ -38,7 +39,43 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ -- Professor Putricide DELETE FROM `boss_spell_table` WHERE `entry` = 36678; INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES -(36678, 47008, 0, 0, 0, 300000, 0, 0, 0, 300000, 0, 0, 0, 1, 0, 0); +(36678,70346, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), +(36678,71968, 0, 0, 0, 20000, 0, 0, 0, 40000, 0, 0, 0, 1, 0, 0), +(36678,71617, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), +(36678,71618, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 1, 0, 0), +(36678,71621, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), +(36678,71278, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), +(36678,71279, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), +(36678,72296, 72295, 72615, 72480, 10000, 0, 0, 0, 20000, 0, 0, 0, 4, 0, 0), +(36678,73122, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), +(36678,71603, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), +(36678,70311, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 1, 0, 0), +(36678,72672, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 1, 0, 0); +-- summons +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMax_N10`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType` ) VALUES +(36678, 37562, 20000, 40000, 1, 1, 1, 1, 5, 10, 0, 9), +(36678, 37697, 20000, 40000, 1, 1, 1, 1, 5, 10, 0, 9); +-- Gas cloud +DELETE FROM `boss_spell_table` WHERE `entry` = 37562; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(37562,70672, 0, 72455, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), +(37562,70215, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 6, 0, 0), +(37562,71203, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 1, 0, 0), +(37562,70701, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0); +-- Volatile ooze +DELETE FROM `boss_spell_table` WHERE `entry` = 37697; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(37697,70492, 72505, 72624, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 1, 0, 0), +(37697,71203, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 1, 0, 0), +(37697,70447, 72836, 72837, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 6, 0, 0); +-- Mutated abomination (pet?) +DELETE FROM `boss_spell_table` WHERE `entry` = 37672; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(37672,70311, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 1, 0, 0), +(37672,72527, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), +(37672,72539, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), +(37672,70542, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), +(37672,70405, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 1, 0, 0); -- Taldaram DELETE FROM `boss_spell_table` WHERE `entry` = 37973; diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index 25ff4a7bc..2b5e9a1f4 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -398,13 +398,13 @@ bool BossSpellWorker::_doRemove(uint8 m_uiSpellIdx, Unit* pTarget) case CAST_ON_SUMMONS: case CAST_ON_VICTIM: - case CAST_ON_RANDOM: case CAST_ON_BOTTOMAGGRO: case CAST_ON_TARGET: case APPLY_AURA_TARGET: if (!pTarget) return false; break; + case CAST_ON_RANDOM: case CAST_ON_ALLPLAYERS: { Map::PlayerList const& pPlayers = pMap->GetPlayers(); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp index 502093327..958539ab4 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp @@ -31,12 +31,11 @@ enum BossSpells SPELL_INHALE_BLIGHT = 69165, SPELL_INHALED_BLIGHT = 71912, SPELL_PUNGENT_BLIGHT = 69195, - SPELL_GAS_SPORE = 69279, + SPELL_GAS_SPORE = 69278, SPELL_INOCULATE = 72103, SPELL_GASTRIC_BLOAT = 72219, SPELL_GASTRIC_EXPLOSION = 72227, SPELL_VILE_GAS = 72272, - SPELL_BERSERK = 47008, }; struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI @@ -86,17 +85,17 @@ struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI } break; case 1: - if (bsw->timedQuery(SPELL_GASEOUS_BLIGHT_1, diff)) + if (bsw->timedQuery(SPELL_GASEOUS_BLIGHT_0, diff)) { - bsw->doCast(SPELL_GASEOUS_BLIGHT_1); + bsw->doCast(SPELL_GASEOUS_BLIGHT_0); bsw->doCast(SPELL_INHALE_BLIGHT); stage = 2; } break; case 2: - if (bsw->timedQuery(SPELL_GASEOUS_BLIGHT_2, diff)) + if (bsw->timedQuery(SPELL_GASEOUS_BLIGHT_0, diff)) { - bsw->doCast(SPELL_GASEOUS_BLIGHT_2); + bsw->doCast(SPELL_GASEOUS_BLIGHT_0); bsw->doCast(SPELL_INHALE_BLIGHT); stage = 3; } @@ -109,6 +108,11 @@ struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI } break; } + bsw->timedCast(SPELL_GAS_SPORE, diff); + + bsw->timedCast(SPELL_GASTRIC_BLOAT, diff); + + bsw->timedCast(SPELL_VILE_GAS, diff); DoMeleeAttackIfReady(); } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp index 0b6dd80b7..fd44bc983 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp @@ -26,7 +26,31 @@ EndScriptData */ enum BossSpells { - SPELL_BERSERK = 47008, + SPELL_SLIME_PUDDLE = 70346, + SPELL_UNSTABLE_EXPERIMENT = 71968, + SPELL_TEAR_GAS = 71617, + SPELL_TEAR_GAS_1 = 71618, + SPELL_CREATE_CONCOCTION = 71621, + SPELL_CHOKING_GAS = 71278, + SPELL_CHOKING_GAS_EXPLODE = 71279, + SPELL_MALLEABLE_GOO = 72296, + SPELL_GUZZLE_POTIONS = 73122, + SPELL_MUTATED_STRENGTH = 71603, + SPELL_MUTATED_PLAGUE = 72672, +// + NPC_GAS_CLOUD = 37562, + SPELL_GASEOUS_BLOAT = 70672, + SPELL_EXPUNGED_GAS = 70701, +// + NPC_VOLATILE_OOZE = 37697, + SPELL_OOZE_ADHESIVE = 70447, +// + NPC_MUTATED_ABOMINATION = 37672, + SPELL_MUTATED_TRANSFORMATION = 70311, + SPELL_EAT_OOZE = 72527, + SPELL_REGURGITATED_OOZE = 70539, + SPELL_MUTATED_SLASH = 70542, + SPELL_MUTATED_AURA = 70405, }; struct MANGOS_DLL_DECL boss_proffesor_putricideAI : public ScriptedAI @@ -65,13 +89,74 @@ struct MANGOS_DLL_DECL boss_proffesor_putricideAI : public ScriptedAI switch(stage) { - case 0: { - bsw->timedCast(SPELL_BERSERK, diff); - break;} - case 1: { - break;} + case 0: + bsw->timedCast(SPELL_SLIME_PUDDLE, diff); + + if (bsw->timedQuery(SPELL_UNSTABLE_EXPERIMENT, diff)) + switch(urand(0,1)) + { + case 0: + bsw->doSummon(NPC_VOLATILE_OOZE); + break; + case 1: + bsw->doSummon(NPC_GAS_CLOUD); + break; + } + + break; + case 1: + bsw->doCast(SPELL_TEAR_GAS); + bsw->doCast(SPELL_CREATE_CONCOCTION); + stage = 2; + break; + case 2: + bsw->timedCast(SPELL_SLIME_PUDDLE, diff); + + if (bsw->timedQuery(SPELL_UNSTABLE_EXPERIMENT, diff)) + switch(urand(0,1)) + { + case 0: + bsw->doSummon(NPC_VOLATILE_OOZE); + break; + case 1: + bsw->doSummon(NPC_GAS_CLOUD); + break; + } + + bsw->timedCast(SPELL_CHOKING_GAS, diff); + + bsw->timedCast(SPELL_MALLEABLE_GOO, diff); + + break; + case 3: + bsw->doCast(SPELL_TEAR_GAS); + bsw->doCast(SPELL_GUZZLE_POTIONS); + bsw->doCast(SPELL_MUTATED_STRENGTH); + bsw->doCast(SPELL_MUTATED_PLAGUE); + stage = 4; + break; + case 4: + if (bsw->timedQuery(SPELL_UNSTABLE_EXPERIMENT, diff)) + switch(urand(0,1)) + { + case 0: + bsw->doSummon(NPC_VOLATILE_OOZE); + break; + case 1: + bsw->doSummon(NPC_GAS_CLOUD); + break; + } + + bsw->timedCast(SPELL_CHOKING_GAS, diff); + + bsw->timedCast(SPELL_MALLEABLE_GOO, diff); + + break; } + if ( stage ==0 && m_creature->GetHealthPercent() < 80.0f ) stage = 1; + if ( stage ==2 && m_creature->GetHealthPercent() < 35.0f ) stage = 3; + DoMeleeAttackIfReady(); } }; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h index 0865aaa00..12e43b7b2 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h @@ -59,6 +59,7 @@ enum GO_SCIENTIST_DOOR_COLLISION = 201612, GO_SCIENTIST_DOOR = 201372, //72541 + GO_BLOODWING_DOOR = 201920, //72532 GO_CRIMSON_HALL_DOOR = 201376, //72532 GO_COUNCIL_DOOR_1 = 201377, //72533 GO_COUNCIL_DOOR_2 = 201378, //72534 @@ -88,6 +89,10 @@ enum GO_GUNSHIP_ARMORY_H_25 = 202178, // GO_GUNSHIP_ARMORY_H_10H = 202179, // GO_GUNSHIP_ARMORY_H_25H = 202180, // + + GO_PLAGUE_SIGIL = 202182, + GO_FROSTWING_SIGIL = 202181, + GO_BLOODWING_SIGIL = 202183, }; struct _SpellTable diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp index c68646fc9..948d56800 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp @@ -57,6 +57,7 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance uint64 m_uiSDoorCollisionGUID; uint64 m_uiScientistDoorGUID; uint64 m_uiCrimsonDoorGUID; + uint64 m_uiBloodwingDoorGUID; uint64 m_uiCounsilDoor1GUID; uint64 m_uiCounsilDoor2GUID; uint64 m_uiGreenDragonDoor1GUID; @@ -84,6 +85,19 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance if(pGo) pGo->SetGoState(GO_STATE_READY); } + void OpenAllDoors() + { + if (m_auiEncounter[1] == DONE) { + OpenDoor(m_uiIcewall1GUID); + OpenDoor(m_uiIcewall2GUID); + } + if (m_auiEncounter[6] == DONE) OpenDoor(m_uiSDoorOrangeGUID); + if (m_auiEncounter[7] == DONE) OpenDoor(m_uiSDoorGreenGUID); + if (m_auiEncounter[7] == DONE && m_auiEncounter[6] == DONE) OpenDoor(m_uiSDoorCollisionGUID); + if (m_auiEncounter[8] == DONE) OpenDoor(m_uiBloodwingDoorGUID); + + } + void Initialize() { for (uint8 i = 0; i < MAX_ENCOUNTERS; ++i) @@ -100,6 +114,11 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance } + void OnPlayerEnter(Player *m_player) + { + OpenAllDoors(); + } + void OnCreatureCreate(Creature* pCreature) { switch(pCreature->GetEntry()) @@ -186,6 +205,9 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance case GO_CRIMSON_HALL_DOOR: m_uiCrimsonDoorGUID = pGo->GetGUID(); break; + case GO_BLOODWING_DOOR: + m_uiBloodwingDoorGUID = pGo->GetGUID(); + break; case GO_COUNCIL_DOOR_1: m_uiCounsilDoor1GUID = pGo->GetGUID(); break; @@ -271,7 +293,7 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance m_auiEncounter[1] = uiData; if (uiData == DONE) { OpenDoor(m_uiIcewall1GUID); - OpenDoor(m_uiIcewall1GUID); + OpenDoor(m_uiIcewall2GUID); } break; case TYPE_DEATHWHISPER: @@ -329,6 +351,7 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance m_auiEncounter[8] = uiData; if (uiData == IN_PROGRESS) CloseDoor(m_uiScientistDoorGUID); else OpenDoor(m_uiScientistDoorGUID); + if (uiData == DONE) OpenDoor(m_uiBloodwingDoorGUID); break; case TYPE_BLOOD_COUNCIL: m_auiEncounter[9] = uiData; @@ -447,6 +470,7 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance } OUT_LOAD_INST_DATA_COMPLETE; + OpenAllDoors(); } }; From c8c02a4324f08c69dc3b0d879d8d3e03cd4481a7 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Fri, 16 Apr 2010 13:26:08 +0400 Subject: [PATCH 236/405] TOC part 43 - fixes by bugreports: slime pool && anubarak spike for clean core override, anubarak doublesummon fix attempt to fix end of champion event (fucking multithread) thanks to all --- ..._trial_of_crusader_spelltable_scriptdev2.sql | 1 + .../boss_anubarak_trial.cpp | 14 ++++++++++---- .../boss_faction_champions.cpp | 2 +- .../boss_northrend_beasts.cpp | 4 ++++ .../instance_trial_of_the_crusader.cpp | 4 +++- .../trial_of_the_crusader.cpp | 17 +++++++++++------ 6 files changed, 30 insertions(+), 12 deletions(-) diff --git a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql index c4e9a6583..fb4a0326f 100644 --- a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql +++ b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql @@ -54,6 +54,7 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ -- Anub'arak spike INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34660, 67574, 0, 0, 0, 20000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL), (34660, 66193, 67855, 67856, 67857, 1000, 0, 0, 0, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), (34660, 65920, 65921, 65922, 65923, 1000, 0, 0, 0, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp index d14404d1c..57ae61e8a 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp @@ -22,9 +22,9 @@ SDComment: by /dev/rsa EndScriptData */ // Anubarak - underground phase partially not worked, timers need correct -// Burrower - underground phase not implemented +// Burrower - underground phase not implemented, buff not worked. // Leecheng Swarm spell not worked - awaiting core support -// Frost Sphere - realised by EventAI +// Anubarak spike aura worked only after 9750 #include "precompiled.h" #include "trial_of_the_crusader.h" @@ -105,7 +105,7 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI { if (m_pInstance) m_pInstance->SetData(TYPE_ANUBARAK, FAIL); - m_creature->ForcedDespawn(); +// m_creature->ForcedDespawn(); } void JustDied(Unit* pKiller) @@ -151,8 +151,8 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI if (bsw->timedQuery(SPELL_SPIKE_CALL, uiDiff)) { pTarget = bsw->SelectUnit(); // bsw->doCast(SPELL_SPIKE_CALL); +// This summon not supported in database. Temporary override. Unit* spike = bsw->doSummon(NPC_SPIKE,TEMPSUMMON_TIMED_DESPAWN,60000); -// Creature* spike = GetClosestCreatureWithEntry(m_creature, NPC_SPIKE, 50.0f); if (spike) { spike->AddThreat(pTarget, 1000.0f); DoScriptText(-1713558,m_creature,pTarget); bsw->doCast(SPELL_MARK,pTarget); @@ -375,6 +375,7 @@ struct MANGOS_DLL_DECL mob_anubarak_spikeAI : public ScriptedAI ScriptedInstance* m_pInstance; BossSpellWorker* bsw; + Unit* defaultTarget; void Reset() { @@ -382,18 +383,23 @@ struct MANGOS_DLL_DECL mob_anubarak_spikeAI : public ScriptedAI m_creature->SetSpeedRate(MOVE_RUN, 0.5f); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + defaultTarget = NULL; } void Aggro(Unit *who) { if (!m_pInstance) return; bsw->doCast(SPELL_IMPALE); + defaultTarget = who; } void UpdateAI(const uint32 uiDiff) { if (m_pInstance && m_pInstance->GetData(TYPE_ANUBARAK) != IN_PROGRESS) m_creature->ForcedDespawn(); + if (defaultTarget) + if (!defaultTarget->isAlive() || !bsw->hasAura(SPELL_MARK,defaultTarget)) + m_creature->ForcedDespawn(); /* if (bsw->timedQuery(SPELL_IMPALE,uiDiff)) { if (m_creature->IsWithinDist(m_creature->getVictim(), 4.0f) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp index cff439af1..4e256380e 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp @@ -113,7 +113,7 @@ struct MANGOS_DLL_DECL boss_faction_championsAI : public ScriptedAI void JustDied(Unit *killer) { - if(m_pInstance) m_pInstance->SetData(TYPE_CRUSADERS_COUNT, m_pInstance->GetData(TYPE_CRUSADERS_COUNT)-1); + if(m_pInstance) m_pInstance->SetData(TYPE_CRUSADERS_COUNT, 0); } void Aggro(Unit *who) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index a38e43288..b88f3f83d 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -28,6 +28,7 @@ EndScriptData */ // snobolds link // snakes underground cast (not support in core) // aura 31 (SPELL_ADRENALINE) not applyed by undefined reason +// model_id (or visual effect) for slime_pool need change. #include "precompiled.h" #include "trial_of_the_crusader.h" @@ -189,6 +190,7 @@ struct MANGOS_DLL_DECL mob_snobold_vassalAI : public ScriptedAI { if (defaultTarget && defaultTarget->isAlive()) bsw->doRemove(SPELL_SNOBOLLED, defaultTarget); // if (pBoss && pBoss->isAlive()) bsw->doRemove(SPELL_RISING_ANGER,pBoss); +// This string - not offlike, in off this buff not removed! especially for small servers. } void UpdateAI(const uint32 uiDiff) @@ -474,6 +476,8 @@ struct MANGOS_DLL_DECL mob_slime_poolAI : public ScriptedAI m_Size = m_Size*1.036; m_creature->SetFloatValue(OBJECT_FIELD_SCALE_X, m_Size); } + // Override especially for clean core + if (m_Size >= 6.0f) m_creature->ForcedDespawn(); } }; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index 1adaa6358..18f1fed91 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -263,7 +263,9 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance pChest->SetRespawnTime(7*DAY); }; break; - case TYPE_CRUSADERS_COUNT: m_auiCrusadersCount = uiData; break; + case TYPE_CRUSADERS_COUNT: if (uiData == 0) --m_auiCrusadersCount; + else m_auiCrusadersCount = uiData; + break; case TYPE_VALKIRIES: if (m_auiEncounter[4] == SPECIAL && uiData == SPECIAL) uiData = DONE; m_auiEncounter[4] = uiData; break; case TYPE_LICH_KING: m_auiEncounter[5] = uiData; break; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index 5d2157264..1fa05adb0 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -209,6 +209,7 @@ bool GossipSelect_npc_toc_announcer(Player* pPlayer, Creature* pCreature, uint32 { ScriptedInstance* pInstance; pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + if (!pInstance) return false; pPlayer->CLOSE_GOSSIP_MENU(); @@ -242,6 +243,7 @@ switch(uiAction) { }; case GOSSIP_ACTION_INFO_DEF+5: { + if (pInstance->GetData(TYPE_LICH_KING) != DONE) return false; if (GameObject* pGoFloor = pInstance->instance->GetGameObject(pInstance->GetData64(GO_ARGENT_COLISEUM_FLOOR))) { pGoFloor->SetUInt32Value(GAMEOBJECT_DISPLAYID,9060); @@ -250,21 +252,23 @@ switch(uiAction) { } pCreature->CastSpell(pCreature,69016,false); - pInstance->SetData(TYPE_ANUBARAK,IN_PROGRESS); - pCreature->SummonCreature(NPC_ANUBARAK, SpawnLoc[19].x, SpawnLoc[19].y, SpawnLoc[19].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_ANUBARAK))) { + Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_ANUBARAK)); + if (!pTemp || !pTemp->isAlive()) + pCreature->SummonCreature(NPC_ANUBARAK, SpawnLoc[19].x, SpawnLoc[19].y, SpawnLoc[19].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (pTemp) { pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[20].x, SpawnLoc[20].y, SpawnLoc[20].z); pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); pTemp->SetInCombatWithZone(); } - pInstance->SetData(TYPE_STAGE,9); - if (pCreature->GetVisibility() == VISIBILITY_ON) + pInstance->SetData(TYPE_STAGE,9); + pInstance->SetData(TYPE_ANUBARAK,IN_PROGRESS); + if (pCreature->GetVisibility() == VISIBILITY_ON) pCreature->SetVisibility(VISIBILITY_OFF); break; }; case GOSSIP_ACTION_INFO_DEF+6: { - pInstance->SetData(TYPE_STAGE,9); + pInstance->SetData(TYPE_STAGE,10); break; }; @@ -304,6 +308,7 @@ struct MANGOS_DLL_DECL boss_lich_king_tocAI : public ScriptedAI pPortal->SetRespawnDelay(DAY); pPortal->CastSpell(pPortal, 51807, false); pPortal->SetDisplayId(17612); + if(pInstance) pInstance->SetData(TYPE_LICH_KING,IN_PROGRESS); } void AttackStart(Unit *who) From 67df4bdbd4706ddbe92bb0127aeea8f6aeafb677 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Fri, 16 Apr 2010 17:23:04 +0400 Subject: [PATCH 237/405] ICC part 18 - mobs rewrite, Gunship armory spawn. --- addition/721_icecrown_mangos.sql | 37 ++-- .../721_icecrown_spelltable_scriptdev2.sql | 23 +++ .../boss_valithria_dreamwalker.cpp | 8 - .../icecrown_citadel/def_spire.h | 17 +- .../icecrown_citadel/icecrown_spire.cpp | 176 +++++++++--------- .../instance_icecrown_spire.cpp | 37 +++- 6 files changed, 165 insertions(+), 133 deletions(-) diff --git a/addition/721_icecrown_mangos.sql b/addition/721_icecrown_mangos.sql index 50b25d529..3abf3a315 100644 --- a/addition/721_icecrown_mangos.sql +++ b/addition/721_icecrown_mangos.sql @@ -17,18 +17,6 @@ DELETE FROM `locales_npc_text` WHERE `entry` = 99323; DELETE FROM `npc_text` WHERE `ID` = 99323; DELETE FROM `gameobject` WHERE `guid` IN (913334); -DELETE FROM `creature` WHERE `guid` IN (599322,599323,599324,599325,599326,599327,599328,599329,599330); -INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES -(599322, 99322, 631, 15, 1, 0, 0, -209.5, 2211.91, 199.97, 0, 3600, 0, 0, 64200, 12300, 0, 0), -(599323, 99322, 631, 15, 1, 0, 0, -503.62, 2211.47, 62.8235, 0, 3600, 0, 0, 64200, 12300, 0, 0), -(599324, 99322, 631, 15, 1, 0, 0, -17.1928, 2211.44, 30.1158, 0, 3600, 0, 0, 64200, 12300, 0, 0), -(599325, 99322, 631, 15, 1, 0, 0, -549.131, 2211.29, 539.291, 0, 3600, 0, 0, 64200, 12300, 0, 0), -(599326, 99322, 631, 15, 1, 0, 0, -615.145, 2211.47, 199.972, 0, 3600, 0, 0, 64200, 12300, 0, 0), -(599327, 99322, 631, 15, 1, 0, 0, 4198.42, 2769.22, 351.065, 0, 3600, 0, 0, 64200, 12300, 0, 0), -(599328, 99322, 631, 15, 1, 0, 0, 4490.205566, 2769.275635, 403.983765, 0, 3600, 0, 0, 64200, 12300, 0, 0), -(599329, 99322, 631, 15, 1, 0, 0, 4356.236816, 2402.573242, 220.462540, 0, 3600, 0, 0, 64200, 12300, 0, 0), -(599330, 99322, 631, 15, 1, 0, 0, 4356.236816, 2402.573242, 220.462540, 0, 3600, 0, 0, 64200, 12300, 0, 0); - UPDATE `instance_template` SET `script`='instance_icecrown_spire' WHERE `map`=631; -- Saurfang @@ -50,18 +38,21 @@ UPDATE `creature_template` SET `ScriptName`='mob_bone_spike' WHERE `entry`= 3871 -- Gunship battle UPDATE `creature_template` SET `ScriptName`='mob_spire_frostwyrm', `AIName`='' WHERE `entry`= 37230; +DELETE FROM `creature_ai_scripts` WHERE `creature_id` = 37230; +UPDATE `creature_template` SET `ScriptName`='mob_frost_giant', `AIName`='' WHERE `entry` IN (38490, 38494) ; +DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (38490, 38494); +-- Gunship armory (override) +DELETE FROM `gameobject` WHERE `id` IN (201872,201873,201874,201875,202177,202178,202179,202180); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(972541, 201872, 631, 1, 1, -428.141, 2421.34, 191.233, 3.10389, 0, 0, 0.999822, 0.0188489, -604800, 100, 1), +(972543, 201873, 631, 2, 1, -428.141, 2421.34, 191.233, 3.10389, 0, 0, 0.999822, 0.0188489, -604800, 100, 1), +(972545, 201874, 631, 4, 1, -428.141, 2421.34, 191.233, 3.10389, 0, 0, 0.999822, 0.0188489, -604800, 100, 1), +(972547, 201875, 631, 8, 1, -428.141, 2421.34, 191.233, 3.10389, 0, 0, 0.999822, 0.0188489, -604800, 100, 1), +(972551, 202177, 631, 1, 1, -447.493, 2003.5, 191.235, 0.153939, 0, 0, 0.0768933, 0.997039, -604800, 100, 1), +(972553, 202178, 631, 2, 1, -447.493, 2003.5, 191.235, 0.153939, 0, 0, 0.0768933, 0.997039, -604800, 100, 1), +(972555, 202179, 631, 4, 1, -447.493, 2003.5, 191.235, 0.153939, 0, 0, 0.0768933, 0.997039, -604800, 100, 1), +(972557, 202180, 631, 8, 1, -447.493, 2003.5, 191.235, 0.153939, 0, 0, 0.0768933, 0.997039, -604800, 100, 1); -DELETE FROM `creature` WHERE `guid` IN (81531, 83459, 78383, 78385, 81170, 81535, 81165, 81168, 124864); -INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES -(81531, 37230, 631, 15, 1, 0, 0, -541.262, 2287.1, 199.97, 2.73098, 300, 0, 0, 1078480, 41690, 0, 0), -(83459, 37230, 631, 15, 1, 0, 0, -536.326, 2125.85, 199.97, 2.86921, 300, 0, 0, 1078480, 41690, 0, 0), -(78383, 37230, 631, 15, 1, 0, 0, -436.712, 2078.51, 191.254, 3.82738, 300, 0, 0, 1078480, 41690, 0, 0), -(78385, 37230, 631, 15, 1, 0, 0, -436.977, 2345.78, 191.254, 3.53716, 300, 0, 0, 1078480, 41690, 0, 0), -(81170, 37230, 631, 15, 1, 0, 0, -302.465, 2229.49, 199.982, 2.04961, 300, 0, 0, 1078480, 41690, 0, 0), -(81535, 37230, 631, 15, 1, 0, 0, -223.486, 2200.9, 199.97, 3.07063, 300, 0, 0, 1078480, 41690, 0, 0), -(81165, 37230, 631, 15, 1, 0, 0, -505.65, 2320, 199.969, 0.369649, 300, 0, 0, 1078480, 41690, 0, 0), -(81168, 37230, 631, 15, 1, 0, 0, -298.341, 2203.06, 199.983, 4.17647, 300, 0, 0, 1078480, 41690, 0, 0), -(124864, 37230, 631, 15, 1, 0, 0, -222.214, 2220.68, 199.97, 3.1586, 300, 0, 0, 1078480, 41690, 0, 0); -- Rotface UPDATE `creature_template` SET `ScriptName`='boss_rotface', `AIName`='' WHERE `entry`= 36627; diff --git a/addition/721_icecrown_spelltable_scriptdev2.sql b/addition/721_icecrown_spelltable_scriptdev2.sql index aeeec7491..739f87bbd 100644 --- a/addition/721_icecrown_spelltable_scriptdev2.sql +++ b/addition/721_icecrown_spelltable_scriptdev2.sql @@ -6,6 +6,29 @@ DELETE FROM `boss_spell_table` WHERE `entry` = 36612; -- Lady Deathwhisper DELETE FROM `boss_spell_table` WHERE `entry` = 36855; +-- Gunship battle +-- Frost wyrm +DELETE FROM `boss_spell_table` WHERE `entry` = 37230; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(37230, 70116, 0, 72641, 0, 15000, 0, 0, 0, 25000, 0, 0, 0, 4, 0, 0), +(37230, 70362, 0, 71118, 0, 20000, 0, 0, 0, 25000, 0, 0, 0, 4, 0, 0), +(37230, 71203, 0, 0, 0, 5000, 0, 0, 0, 15000, 0, 0, 0, 4, 0, 0), +(37230, 70361, 0, 0, 0, 3000, 0, 0, 0, 5000, 0, 0, 0, 3, 0, 0), +(37230, 47008, 0, 0, 0, 180000, 0, 0, 0, 180000, 0, 0, 0, 1, 0, 0); + +-- Rotted frost giant +DELETE FROM `boss_spell_table` WHERE `entry` IN (38490, 38494); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(38490, 64652, 0, 0, 0, 15000, 0, 0, 0, 27000, 0, 0, 0, 4, 0, 0), +(38490, 72865, 0, 0, 0, 5000, 0, 0, 0, 25000, 0, 0, 0, 4, 0, 0), +(38490, 71203, 0, 0, 0, 5000, 0, 0, 0, 15000, 0, 0, 0, 4, 0, 0), +(38490, 47008, 0, 0, 0, 300000, 0, 0, 0, 300000, 0, 0, 0, 1, 0, 0); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(38494, 64652, 0, 0, 0, 15000, 0, 0, 0, 27000, 0, 0, 0, 4, 0, 0), +(38494, 72865, 0, 0, 0, 5000, 0, 0, 0, 25000, 0, 0, 0, 4, 0, 0), +(38494, 71203, 0, 0, 0, 5000, 0, 0, 0, 15000, 0, 0, 0, 4, 0, 0), +(38494, 47008, 0, 0, 0, 300000, 0, 0, 0, 300000, 0, 0, 0, 1, 0, 0); + -- Deathbringer Saurfang DELETE FROM `boss_spell_table` WHERE `entry` = 37813; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp index 404198223..239a0234e 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp @@ -24,11 +24,3 @@ EndScriptData */ #include "precompiled.h" #include "def_spire.h" -static Locations SpawnLoc[]= -{ - {4203.470215, 2484.500000, 364.872009}, // 0 Valithria - {4240.688477, 2405.794678, 364.868591}, // Room 1 - {4165.112305, 2405.872559, 364.872925}, // Room 2 - {4166.216797, 2564.197266, 364.873047}, // Room 3 - {4239.579102, 2566.753418, 364.868439}, // Room 4 -}; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h index 12e43b7b2..18c4f304c 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h @@ -95,16 +95,15 @@ enum GO_BLOODWING_SIGIL = 202183, }; -struct _SpellTable +static Locations SpawnLoc[]= { - uint32 id; - uint32 m_uiSpellEntry[DIFFICULTY_LEVELS]; // Stores spell entry for difficulty levels - uint32 m_uiSpellTimerMin[DIFFICULTY_LEVELS]; // The timer (min) before the next spell casting, in milliseconds - uint32 m_uiSpellTimerMax[DIFFICULTY_LEVELS]; // The timer (max) before the next spell casting - uint32 m_uiStageMask; // The mask of stages where spell is casted - uint32 m_CastTarget; // Target on casting spell - bool m_IsVisualEffect; // Spellcasting is visual effect or real effect - bool m_IsBugged; // Need override for this spell + {-446.788971, 2003.362915, 191.233948}, // 0 Horde ship enter + {-428.140503, 2421.336914, 191.233078}, // 1 Alliance ship enter + {4203.470215, 2484.500000, 364.872009}, // 2 Valithria + {4240.688477, 2405.794678, 364.868591}, // 3 Valithria Room 1 + {4165.112305, 2405.872559, 364.872925}, // 4 Valithria Room 2 + {4166.216797, 2564.197266, 364.873047}, // 5 Valithria Room 3 + {4239.579102, 2566.753418, 364.868439}, // 6 Valithria Room 4 }; #endif diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp index 5aa5a0a0e..c0a53b6b3 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp @@ -25,19 +25,14 @@ EndScriptData */ #include "def_spire.h" enum { - //common SPELL_BERSERK = 47008, - //yells - //summons - //Abilities - SPELL_FROST_BREATH_N = 70116, - SPELL_BLIZZARD_N = 70362, + SPELL_FROST_BREATH = 70116, + SPELL_BLIZZARD = 70362, SPELL_SOUL_FEAST = 71203, SPELL_CLEAVE = 70361, - SPELL_FROST_BREATH_H = 72641, - SPELL_BLIZZARD_H = 71118, - + SPELL_STOMP = 64652, + SPELL_DEATH_PLAGUE = 72865, }; struct MANGOS_DLL_DECL mob_spire_frostwyrmAI : public ScriptedAI @@ -45,47 +40,27 @@ struct MANGOS_DLL_DECL mob_spire_frostwyrmAI : public ScriptedAI mob_spire_frostwyrmAI(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Regular = pCreature->GetMap()->IsRegularDifficulty(); + bsw = new BossSpellWorker(this); Reset(); } - bool Regular; ScriptedInstance *pInstance; uint8 stage; - uint32 m_uiFrostBreath_Timer; - uint32 m_uiBlizzard_Timer; - uint32 m_uiSoulFeast_Timer; - uint32 m_uiCleave_Timer; - uint32 m_uiBerserk_Timer; - uint8 health; - uint8 wirmsdied; + BossSpellWorker* bsw; void Reset() { - stage = 0; - health = 100; - m_uiFrostBreath_Timer=urand(10000,15000); - m_uiBlizzard_Timer=urand(20000,25000); - m_uiSoulFeast_Timer = 7000; - m_uiCleave_Timer = 5000; - m_uiBerserk_Timer = 120000; - wirmsdied=pInstance->GetData(TYPE_FROSTWIRM_COUNT); + stage = 0; } void Aggro(Unit *who) { - if(pInstance && who->GetTypeId() == TYPEID_PLAYER) pInstance->SetData(TYPE_SKULLS_PLATO, IN_PROGRESS); + if(pInstance) pInstance->SetData(TYPE_SKULLS_PLATO, IN_PROGRESS); } void JustDied(Unit *killer) { - if(pInstance && killer->GetTypeId() == TYPEID_PLAYER) { - pInstance->SetData(TYPE_SKULLS_PLATO, DONE); - wirmsdied=pInstance->GetData(TYPE_FROSTWIRM_COUNT); - ++wirmsdied; - pInstance->SetData(TYPE_FROSTWIRM_COUNT,wirmsdied); - if (pInstance->GetData(TYPE_FROSTWIRM_COUNT) >= 8 ) pInstance->SetData(TYPE_FLIGHT_WAR,DONE); - } + if(pInstance) pInstance->SetData(TYPE_SKULLS_PLATO, DONE); } void UpdateAI(const uint32 diff) @@ -96,72 +71,23 @@ struct MANGOS_DLL_DECL mob_spire_frostwyrmAI : public ScriptedAI switch(stage) { case 0: { - if (m_uiSoulFeast_Timer < diff) - { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, SPELL_SOUL_FEAST); - m_uiSoulFeast_Timer=urand(5000,7000); - } else m_uiSoulFeast_Timer -= diff; - - if (m_uiCleave_Timer < diff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE); - m_uiCleave_Timer=urand(5000,7000); - } else m_uiCleave_Timer -= diff; + bsw->timedCast(SPELL_SOUL_FEAST, diff); break;} - case 1: { - if (m_uiSoulFeast_Timer < diff) - { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, SPELL_SOUL_FEAST); - m_uiSoulFeast_Timer=urand(4000,6000); - } else m_uiSoulFeast_Timer -= diff; - - if (m_uiCleave_Timer < diff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE); - m_uiCleave_Timer=urand(3000,5000); - } else m_uiCleave_Timer -= diff; + bsw->doCast(SPELL_BERSERK); + stage = 2; break;} case 2: { - DoCastSpellIfCan(m_creature, SPELL_BERSERK); - m_uiBlizzard_Timer=urand(1000,2000); - m_uiFrostBreath_Timer=urand(1000,3000); - stage = 3; - break;} - case 3: { - if (m_uiSoulFeast_Timer < diff) - { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, SPELL_SOUL_FEAST); - m_uiSoulFeast_Timer=urand(2000,4000); - } else m_uiSoulFeast_Timer -= diff; - - if (m_uiCleave_Timer < diff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE); - m_uiCleave_Timer=urand(2000,4000); - } else m_uiCleave_Timer -= diff; break;} } - if (m_uiBlizzard_Timer < diff) - { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, Regular ? SPELL_BLIZZARD_N : SPELL_BLIZZARD_H); - m_uiBlizzard_Timer=urand(20000,25000); - } else m_uiBlizzard_Timer -= diff; + bsw->timedCast(SPELL_CLEAVE, diff); + bsw->timedCast(SPELL_BLIZZARD, diff); + bsw->timedCast(SPELL_FROST_BREATH, diff); - if (m_uiFrostBreath_Timer < diff) - {if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, Regular ? SPELL_FROST_BREATH_N :SPELL_FROST_BREATH_H); - m_uiFrostBreath_Timer=urand(10000,15000); - } else m_uiFrostBreath_Timer -= diff; + if (m_creature->GetHealthPercent() < 10.0f && stage == 0) stage = 1; - health = m_creature->GetHealth()*100 / m_creature->GetMaxHealth(); - if (health <= 50 && stage == 0) stage = 1; - if (health <= 10 && stage == 1) stage = 2; - - if (m_uiBerserk_Timer < diff) - { - DoCastSpellIfCan(m_creature, SPELL_BERSERK); - } - else m_uiBerserk_Timer -= diff; + bsw->timedCast(SPELL_BERSERK, diff); DoMeleeAttackIfReady(); @@ -173,11 +99,79 @@ CreatureAI* GetAI_mob_spire_frostwyrm(Creature* pCreature) return new mob_spire_frostwyrmAI(pCreature); } +struct MANGOS_DLL_DECL mob_frost_giantAI : public ScriptedAI +{ + mob_frost_giantAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); + Reset(); + } + + ScriptedInstance *pInstance; + uint8 stage; + BossSpellWorker* bsw; + + void Aggro(Unit *who) + { + if(pInstance) pInstance->SetData(TYPE_FLIGHT_WAR, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_FLIGHT_WAR, DONE); + } + + void Reset() + { + stage = 0; + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + switch(stage) + { + case 0: { + bsw->timedCast(SPELL_SOUL_FEAST, diff); + break;} + case 1: { + bsw->doCast(SPELL_BERSERK); + stage = 2; + break;} + case 2: { + break;} + } + bsw->timedCast(SPELL_STOMP, diff); + bsw->timedCast(SPELL_DEATH_PLAGUE, diff); + + if (m_creature->GetHealthPercent() < 2.0f && stage == 0) stage = 1; + + bsw->timedCast(SPELL_BERSERK, diff); + + DoMeleeAttackIfReady(); + + } +}; + +CreatureAI* GetAI_mob_frost_giant(Creature* pCreature) +{ + return new mob_frost_giantAI(pCreature); +} + void AddSC_icecrown_spire() { Script *newscript; + newscript = new Script; newscript->Name = "mob_spire_frostwyrm"; newscript->GetAI = &GetAI_mob_spire_frostwyrm; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_frost_giant"; + newscript->GetAI = &GetAI_mob_frost_giant; + newscript->RegisterSelf(); } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp index 948d56800..4ac9be272 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp @@ -71,6 +71,9 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance uint64 m_uiGunshipArmoryAGUID; uint64 m_uiGunshipArmoryHGUID; + uint64 m_uiGunshipArmoryH_ID; + uint64 m_uiGunshipArmoryA_ID; + void OpenDoor(uint64 guid) { if(!guid) return; @@ -111,7 +114,34 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance m_uiSaurfangCacheGUID = 0; m_uiGunshipArmoryAGUID = 0; m_uiGunshipArmoryHGUID = 0; - + m_uiIcewall1GUID = 0; + m_uiIcewall2GUID = 0; + m_uiSDoorOrangeGUID = 0; + m_uiSDoorGreenGUID = 0; + m_uiBloodwingDoorGUID = 0; + m_uiSDoorCollisionGUID = 0; + switch (Difficulty) { + case RAID_DIFFICULTY_10MAN_NORMAL: + m_uiGunshipArmoryH_ID = GO_GUNSHIP_ARMORY_H_10; + m_uiGunshipArmoryA_ID = GO_GUNSHIP_ARMORY_A_10; + break; + case RAID_DIFFICULTY_10MAN_HEROIC: + m_uiGunshipArmoryH_ID = GO_GUNSHIP_ARMORY_H_10H; + m_uiGunshipArmoryA_ID = GO_GUNSHIP_ARMORY_A_10H; + break; + case RAID_DIFFICULTY_25MAN_NORMAL: + m_uiGunshipArmoryH_ID = GO_GUNSHIP_ARMORY_H_25; + m_uiGunshipArmoryA_ID = GO_GUNSHIP_ARMORY_A_25; + break; + case RAID_DIFFICULTY_25MAN_HEROIC: + m_uiGunshipArmoryH_ID = GO_GUNSHIP_ARMORY_H_25H; + m_uiGunshipArmoryA_ID = GO_GUNSHIP_ARMORY_A_25H; + break; + default: + m_uiGunshipArmoryH_ID = 0; + m_uiGunshipArmoryA_ID = 0; + break; + }; } void OnPlayerEnter(Player *m_player) @@ -281,7 +311,9 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance m_uiGunshipArmoryHGUID = pGo->GetGUID(); break; } + OpenAllDoors(); } + void SetData(uint32 uiType, uint32 uiData) { if (uiType > m_auiEncounter[0] && uiData == DONE) m_auiEncounter[0] = uiType; @@ -312,12 +344,13 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance if (pChest && !pChest->isSpawned()) { pChest->SetRespawnTime(7*DAY); }; + if (GameObject* pChest = instance->GetGameObject(m_uiGunshipArmoryHGUID)) if (pChest && !pChest->isSpawned()) { pChest->SetRespawnTime(7*DAY); }; - m_auiEncounter[4] = uiData; }; + m_auiEncounter[4] = uiData; break; case TYPE_SAURFANG: m_auiEncounter[5] = uiData; From be307b9a9829c1fd61e96bc0bfc4c28c0a40a442 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Fri, 16 Apr 2010 18:41:26 +0400 Subject: [PATCH 238/405] Trial of the crusader && BSW class from /dev/rsa added --- Makefile.am | 2 + ScriptMgr.cpp | 8 +- ScriptMgr.h | 3 + addition/724_trial_of_crusader_mangos.sql | 95 ++ addition/724_trial_of_crusader_scriptdev2.sql | 82 ++ ...rial_of_crusader_spelltable_scriptdev2.sql | 447 +++++++ addition/boss_spell_table_scriptdev2.sql | 33 + ...re you can find SQL files from patches.txt | 0 .../spell_comment_from_wowd_scriptdev2.sql | 19 + include/sc_boss_spell_worker.cpp | 583 +++++++++ include/sc_boss_spell_worker.h | 226 ++++ .../boss_anubarak_trial.cpp | 380 +++++- .../boss_faction_champions.cpp | 1086 +++++++++++++++- .../trial_of_the_crusader/boss_jaraxxus.cpp | 460 ++++++- .../boss_northrend_beasts.cpp | 522 +++++++- .../boss_twin_valkyr.cpp | 409 +++++- .../instance_trial_of_the_crusader.cpp | 574 ++++++-- .../trial_of_the_crusader.cpp | 1149 ++++++++++++++++- .../trial_of_the_crusader.h | 167 ++- system/ScriptLoader.cpp | 2 + 20 files changed, 6036 insertions(+), 211 deletions(-) create mode 100644 addition/724_trial_of_crusader_mangos.sql create mode 100644 addition/724_trial_of_crusader_scriptdev2.sql create mode 100644 addition/724_trial_of_crusader_spelltable_scriptdev2.sql create mode 100644 addition/boss_spell_table_scriptdev2.sql create mode 100644 addition/here you can find SQL files from patches.txt create mode 100644 addition/spell_comment_from_wowd_scriptdev2.sql create mode 100644 include/sc_boss_spell_worker.cpp create mode 100644 include/sc_boss_spell_worker.h diff --git a/Makefile.am b/Makefile.am index b7ca4a853..415ece401 100644 --- a/Makefile.am +++ b/Makefile.am @@ -47,6 +47,8 @@ include/sc_grid_searchers.cpp \ include/sc_grid_searchers.h \ include/sc_instance.cpp \ include/sc_instance.h \ +include/sc_boss_spell_worker.cpp \ +include/sc_boss_spell_worker.h \ scripts/battlegrounds/battleground.cpp \ scripts/eastern_kingdoms/alterac_mountains.cpp \ scripts/eastern_kingdoms/arathi_highlands.cpp \ diff --git a/ScriptMgr.cpp b/ScriptMgr.cpp index 46d5596ab..2c40c67b4 100644 --- a/ScriptMgr.cpp +++ b/ScriptMgr.cpp @@ -17,6 +17,11 @@ Script *m_scripts[MAX_SCRIPTS]; Config SD2Config; +QueryResult* strSD2Pquery(char* str) +{ +return SD2Database.Query(str); +} + void FillSpellSummary(); void LoadDatabase() @@ -46,8 +51,6 @@ void LoadDatabase() return; } - SD2Database.HaltDelayThread(); - } struct TSpellSummary { @@ -66,6 +69,7 @@ void ScriptsFree() delete m_scripts[i]; num_sc_scripts = 0; + SD2Database.HaltDelayThread(); } MANGOS_DLL_EXPORT diff --git a/ScriptMgr.h b/ScriptMgr.h index f1884dcc7..c3ec650c1 100644 --- a/ScriptMgr.h +++ b/ScriptMgr.h @@ -73,6 +73,9 @@ struct Script //Generic scripting text function void DoScriptText(int32 textEntry, WorldObject* pSource, Unit* target = NULL); +//DB query +QueryResult* strSD2Pquery(char*); + #if COMPILER == COMPILER_GNU #define FUNC_PTR(name,callconvention,returntype,parameters) typedef returntype(*name)parameters __attribute__ ((callconvention)); #else diff --git a/addition/724_trial_of_crusader_mangos.sql b/addition/724_trial_of_crusader_mangos.sql new file mode 100644 index 000000000..c8dcef22f --- /dev/null +++ b/addition/724_trial_of_crusader_mangos.sql @@ -0,0 +1,95 @@ +-- instance +UPDATE `instance_template` SET `script`='instance_trial_of_the_crusader' WHERE `map`=649; +DELETE FROM `creature` WHERE `map` = 649 AND `id` IN +(34797,34796,34799,35144,34780,34460,34463,34461,34471,34475,34472,34453,34455,34458,34454,34451,34456,34497,34496,34564,34467,35465,34468,35610,34473,34474,34441,34449,34448,34450,34606, 34605, 34607, 34564); + +-- announcers +UPDATE `creature_template` SET `npcflag`=1, `scriptname`='npc_toc_announcer' WHERE `entry`=34816; +DELETE FROM `creature` WHERE `map` = 649 AND `id` = 35766; +UPDATE `creature_template` SET `scriptname`='boss_lich_king_toc' WHERE `entry`=35877; +UPDATE `creature_template` SET `minhealth`= 20000, `maxhealth` = 20000, `faction_A`= 1770, `faction_H` = 1770, `scriptname`='npc_fizzlebang_toc' WHERE `entry`=35458; +UPDATE `creature_template` SET `scriptname`='npc_tirion_toc' WHERE `entry`=34996; +UPDATE `creature_template` SET `scriptname`='npc_garrosh_toc' WHERE `entry`=34995; +UPDATE `creature_template` SET `scriptname`='npc_rinn_toc' WHERE `entry`=34990; + +-- Grand crusaders +UPDATE `creature_template` SET `scriptname`='mob_toc_warrior', `AIName` ='' WHERE `entry` IN (34475,34453); +UPDATE `creature_template` SET `scriptname`='mob_toc_mage', `AIName` ='' WHERE `entry` IN (34468,34449); +UPDATE `creature_template` SET `scriptname`='mob_toc_shaman', `AIName` ='' WHERE `entry` IN (34463,34455); +UPDATE `creature_template` SET `scriptname`='mob_toc_enh_shaman', `AIName` ='' WHERE `entry` IN (34470,34444); +UPDATE `creature_template` SET `scriptname`='mob_toc_hunter', `AIName` ='' WHERE `entry` IN (34467,34448); +UPDATE `creature_template` SET `scriptname`='mob_toc_rogue', `AIName` ='' WHERE `entry` IN (34472,34454); +UPDATE `creature_template` SET `scriptname`='mob_toc_priest', `AIName` ='' WHERE `entry` IN (34466,34456); +UPDATE `creature_template` SET `scriptname`='mob_toc_shadow_priest', `AIName` ='' WHERE `entry` IN (34473,34441); +UPDATE `creature_template` SET `scriptname`='mob_toc_dk', `AIName` ='' WHERE `entry` IN (34461,34458); +UPDATE `creature_template` SET `scriptname`='mob_toc_paladin', `AIName` ='' WHERE `entry` IN (34465,34445); +UPDATE `creature_template` SET `scriptname`='mob_toc_retro_paladin', `AIName` ='' WHERE `entry` IN (34471,34456); +UPDATE `creature_template` SET `scriptname`='mob_toc_druid', `AIName` ='' WHERE `entry` IN (34460,34451); +UPDATE `creature_template` SET `scriptname`='mob_toc_boomkin', `AIName` ='' WHERE `entry` IN (34469,34459); +UPDATE `creature_template` SET `scriptname`='mob_toc_warlock' WHERE `entry` IN (34474,34450); + +UPDATE `creature_template` SET `scriptname`='mob_toc_pet_warlock', `AIName` ='' WHERE `entry` IN (35465); +UPDATE `creature_template` SET `scriptname`='mob_toc_pet_hunter', `AIName` ='' WHERE `entry` IN (35610); + +UPDATE `creature_template` SET `lootid`= 0 WHERE `entry` IN +(34460,34463,34461,34471,34475,34472,34453,34455,34458,34454,34451,34456,34467,35465,34468,35610,34473,34474,34441,34449,34448,34450); +UPDATE `creature_template` SET `lootid`= 0 WHERE `entry` IN +(12266,12209,12212,12281,12190,12284,12269,12272,12229,12187,12091,12088,12169,12103,12106,12112,12166,12163,12175,12183,12303,12300); +UPDATE `creature_template` SET `lootid`= 0 WHERE `entry` IN +(12267,12210,12213,12282,12191,12285,12270,12273,12230,12188,12092,12089,12170,12104,12107,12113,12167,12164,12181,12184,12304,12301); +UPDATE `creature_template` SET `lootid`= 0 WHERE `entry` IN +(12268,12211,12214,12283,12192,12286,12271,12274,12231,12189,12093,12090,12171,12105,12108,12114,12168,12165,12182,12185,12305,12302); + +-- N10 +DELETE FROM `creature_loot_template` WHERE `entry` IN +(34460,34463,34461,34471,34475,34472,34453,34455,34458,34454,34451,34456,34467,35465,34468,35610,34473,34474,34441,34449,34448,34450); +-- H10 +DELETE FROM `creature_loot_template` WHERE `entry` IN +(12266,12209,12212,12281,12190,12284,12269,12272,12229,12187,12091,12088,12169,12103,12106,12112,12166,12163,12175,12183,12303,12300); +-- N25 +DELETE FROM `creature_loot_template` WHERE `entry` IN +(12267,12210,12213,12282,12191,12285,12270,12273,12230,12188,12092,12089,12170,12104,12107,12113,12167,12164,12181,12184,12304,12301); +-- H25 +DELETE FROM `creature_loot_template` WHERE `entry` IN +(12268,12211,12214,12283,12192,12286,12271,12274,12231,12189,12093,12090,12171,12105,12108,12114,12168,12165,12182,12185,12305,12302); + +-- Nortrend beasts +DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (34796, 34799, 35144, 34797); +UPDATE `creature_template` SET `scriptname`='boss_gormok', `AIName` ='' WHERE `entry`=34796; +UPDATE `creature_template` SET `scriptname`='mob_snobold_vassal', `AIName` ='' WHERE `entry`=34800; + +UPDATE `creature_template` SET `scriptname`='boss_dreadscale', `AIName` ='' WHERE `entry`=34799; +UPDATE `creature_template` SET `scriptname`='boss_acidmaw', `AIName` ='' WHERE `entry`=35144; +UPDATE `creature_template` SET `scriptname`='mob_slime_pool', `minlevel` = 80, `maxlevel` = 80, `minhealth`= 30000, `maxhealth` = 30000,`AIName` ='', `faction_A`= 14, `faction_H` = 14, `modelid_A` = 12349, `modelid_H` = 12349 WHERE `entry` = 35176; +-- Model id for slime_pool need change! + +UPDATE `creature_template` SET `scriptname`='boss_icehowl', `AIName` ='' WHERE `entry`=34797; + +UPDATE `creature_template` SET `lootid`= 0 WHERE `entry` IN (34796,34799,35144); +DELETE FROM `creature_loot_template` WHERE `entry` IN (34796,34799,35144); + +-- Jaraxxus +UPDATE `creature_template` SET `scriptname`='boss_jaraxxus', `AIName` ='' WHERE `entry`= 34780; +DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (34780, 34784, 34813, 34815, 34825, 34826); +UPDATE `creature_template` SET `scriptname`='mob_legion_flame', `minlevel` = 82, `maxlevel` = 82, `modelid_A` = 11686, `modelid_A2` = 11686, `modelid_H` = 11686, `modelid_H2` = 11686, `AIName` ='', `faction_A`= 14, `faction_H` = 14 WHERE `entry` = 34784; +UPDATE `creature_template` SET `scriptname`='mob_infernal_volcano', `AIName` ='' WHERE `entry` = 34813; +UPDATE `creature_template` SET `scriptname`='mob_fel_infernal', `AIName` ='' WHERE `entry` = 34815; +UPDATE `creature_template` SET `scriptname`='mob_nether_portal', `AIName` ='' WHERE `entry` = 34825; +UPDATE `creature_template` SET `scriptname`='mob_mistress_of_pain', `AIName` ='' WHERE `entry` = 34826; + +-- Froja's +UPDATE `creature_template` SET `scriptname` = 'boss_fjola', `AIName` ='' WHERE `entry`=34497; +UPDATE `creature_template` SET `scriptname` = 'boss_eydis', `AIName` ='' WHERE `entry`=34496; +DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (34497, 34496, 34568, 34567); +UPDATE `creature_template` SET `npcflag`=1, `scriptname`='mob_light_essence', `AIName` ='' WHERE entry = 34568; +UPDATE `creature_template` SET `npcflag`=1, `scriptname`='mob_dark_essence', `AIName` ='' WHERE entry = 34567; + +-- Anub'arak +UPDATE `creature_template` SET `scriptname`='boss_anubarak_trial', `AIName` ='' WHERE `entry`=34564; + +DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (34606, 34605, 34607, 34564, 34660); +UPDATE `creature_template` SET `modelid_A` = 25144, `modelid_A2` = 0, `modelid_H` = 25144, `modelid_H2` = 0, `faction_A` = 14, `faction_H` = 14, `AIName` = '', `ScriptName` = 'mob_frost_sphere' WHERE `entry` = 34606; +UPDATE `creature_template` SET `scriptname`='mob_swarm_scarab', `AIName` ='' WHERE `entry`=34605; +UPDATE `creature_template` SET `scriptname`='mob_nerubian_borrower', `AIName` ='' WHERE `entry`=34607; +UPDATE `creature_template` SET `scriptname`='mob_anubarak_spike', `faction_A` = 14, `minlevel` = 80, `maxlevel` = 80,`faction_H` = 14, `AIName` ='' WHERE `entry`=34660; + diff --git a/addition/724_trial_of_crusader_scriptdev2.sql b/addition/724_trial_of_crusader_scriptdev2.sql new file mode 100644 index 000000000..6619df27f --- /dev/null +++ b/addition/724_trial_of_crusader_scriptdev2.sql @@ -0,0 +1,82 @@ +-- TOC original texts/sounds (thanks to griffonheart) +-- english translation by Cristy +-- reworked by rsa + +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1713799 AND -1713499; +INSERT INTO `script_texts` +(`comment`,`sound`, `entry`,`content_loc8`,`type`,`language`,`emote`,`content_default`) VALUES +('34996','16036','-1713500','Добро пожаловать, герои! Вы услышали призыв Серебряного Авангарда и без колебаний откликнулись на него! В этом колизее вам предстоит сразиться с опаснейшими противниками. Те из вас, кто смогут пережить испытания, войдут в ряды Серебряного Авангарда, который направится в Цитадель Ледяной Короны.','6','0','0','Welcome champions, you have heard the call of the argent crusade and you have boldly answered. It is here in the crusaders coliseum that you will face your greatest challenges. Those of you who survive the rigors of the coliseum will join the Argent Crusade on its marsh to ice crown citadel.'), +('34996','16038','-1713501','Из самых глубоких и темных пещер Грозовой Гряды был призван Гормок Пронзающий Бивень! В бой, герои!','6','0','0','Hailing from the deepest, darkest carverns of the storm peaks, Gormok the Impaler! Battle on, heroes!'), +('34990','16069','-1713502','Твои чудовища не чета героям Альянса, Тирион!','6','0','0','Your beast will be no match for my champions Tirion!'), +('34995','16069','-1713702','Твои чудовища не чета героям Орды, Тирион!','6','0','0','Your beast will be no match for my champions Tirion!'), +('34796','0','-1713601','Мои рабы! Уничтожьте врага!','3','0','0','My slaves! Destroy the enemy!'), +('34996','16039','-1713503','Приготовьтесь к схватке с близнецами-чудовищами, Кислотной Утробой и Жуткой Чешуей!','6','0','0','Steel yourselves, heroes, for the twin terrors Acidmaw and Dreadscale. Enter the arena!'), +('34799','0','-1713504','После гибели товарища %s приходит в ярость!','3','0','0','After the death of sister %s goes berserk!'), +('34996','16040','-1713505','В воздухе повеяло ледяным дыханием следующего бойца: на арену выходит Ледяной Рев! Сражайтесь или погибните, чемпионы!','6','0','0','The air freezes with the introduction of our next combatant, Icehowl! Kill or be killed, champions!'), +('34797','0','-1713506','%s глядит на |3-3($n) и испускает гортанный вой!','3','0','0','%S looks at |3-3($n) and emits a guttural howl!'), +('34797','0','-1713507','%s врезается в стену Колизея и теряет ориентацию!','3','0','0','%S crashes into a wall of the Colosseum and lose focus!'), +('34797','0','-1713508','|3-3(%s) охватывает кипящая ярость, и он растаптывает всех на своем пути!','3','0','0','|3-3(%s) covers boiling rage, and he tramples all in its path!'), +('34996','16041','-1713509','Все чудовища повержены!','6','0','0','All the monsters defeated!'), +('34996','16043','-1713510','Сейчас великий чернокнижник Вилфред Непопамс призовет вашего нового противника. Готовьтесь к бою!','6','0','0','Grand Warlock Wilfred Fizzlebang will summon forth your next challenge. Stand by for his entry!'), +('35458','16268','-1713511','Благодарю, Верховный лорд. А теперь, смельчаки, я приступаю к ритуалу призыва. Когда я закончу, появится грозный демон!','6','0','0','Thank you, Highlord! Now challengers, I will begin the ritual of summoning! When I am done, a fearsome Doomguard will appear!'), +('35458','16269','-1713512','Готовьтесь к забвению!','6','0','0','Prepare for oblivion!'), +('35458','16270','-1713513','АГА! Получилось! Трепещи перед всевластным Вилфредом Непопамсом, мастером призыва! Ты покорен мне, демон!','6','0','0','Ah ha! Behold the absolute power of Wilfred Fizzlebang, master summoner! You are bound to ME, demon!'), +('34780','16143','-1713514','Ничтожный гном! Тебя погубит твоя самоуверенность!','6','0','0','Trifling gnome, your arrogance will be your undoing!'), +('35458','16271','-1713515','Тут я главный!','6','0','0','But I am in charge here-'), +('35458','16271','-1713715','Ну вот, опять я облажался...','6','0','0','Agonized Scream!!!'), +('34996','16044','-1713516','Быстрей, герои, расправьтесь с повелителем демонов, прежде чем он откроет портал в свое темное царство!','6','0','0','Quickly, heroes! Destroy the demon lord before it can open a portal to its twisted demonic realm!'), +('34780','16144','-1713517','Перед вами Джараксус, эредарский повелитель Пылающего Легиона!','6','0','0','You face Jaraxxus, eredar lord of the Burning Legion!'), +('34780','0','-1713518','На вас направлено |cFFFF0000Пламя Легиона!|r','3','0','0','You have been sent |cFFFF0000Plamya Legion!|R'), +('34780','0','-1713519','%s создает врата Пустоты!','3','0','0','%S creates the gates of the Void!'), +('34780','0','-1713520','%s создает |cFF00FF00Вулкан инферналов!|r','3','0','0','%S creates |cFF00FF00Vulkan Infernals!|R'), +('34780','16150','-1713521','Явись, сестра! Господин зовет!','6','0','0','Come forth, sister! Your master calls!'), +('34780','0','-1713522','$n $gподвергся:подверглась; |cFF00FFFFИспепелению плоти!|r Исцелите $gего:ее;!','3','0','0','$N $gpodvergsya:been; |cFF00FFFFIspepeleniyu flesh!|R Heal $gego:it;!'), +('34780','16149','-1713523','ПЛОТЬ ОТ КОСТИ!','6','0','0','FLESH FROM BONE!'), +('34780','16151','-1713524','ИНФЕРНАЛ!','6','0','0','INFERNO!'), +('34780','16147','-1713525','Мое место займут другие. Ваш мир обречен...','6','0','0','Another will take my place. Your world is doomed.'), +('34996','16045','-1713526','Гибель Вилфреда Непопамса весьма трагична и должна послужить уроком тем, кто смеет беспечно играть с темной магией. К счастью, вы победили демона, и теперь вас ждет новый противник.','6','0','0','The loss of Wilfred Fizzlebang, while unfortunate, should be a lesson to those that dare dabble in dark magic. Alas, you are victorious and must now face the next challenge.'), +('34995','16021','-1713527','Подлые собаки Альянса! Вы выпустили повелителя демонов на воинов Орды? Ваша смерть будет быстрой!','6','0','0','Treacherous Alliance dogs! You summon a demon lord against warriors of the Horde!? Your deaths will be swift!'), +('34990','16064','-1713528','Альянсу не нужна помощь повелителя демонов, чтобы справиться с ордынским отродьем, пес!','6','0','0','The Alliance doesnt need the help of a demon lord to deal with Horde filth. Come, pig!'), +('34996','16046','-1713529','Тише! Успокойтесь! Никакого заговора здесь нет. Чернокнижник заигрался и поплатился за это. Турнир продолжается!','6','0','0','Everyone, calm down! Compose yourselves! There is no conspiracy at play here. The warlock acted on his own volition - outside of influences from the Alliance. The tournament must go on!'), +('34996','16047','-1713530','В следующем бою вы встретитесь с могучими рыцарями Серебряного Авангарда! Лишь победив их, вы заслужите достойную награду.','6','0','0','The next battle will be against the Argent Crusades most powerful knights! Only by defeating them will you be deemed worthy...'), +('34995','16023','-1713531','Орда требует справедливости! Мы вызываем Альянс на бой! Позволь нам встать на место твоих рыцарей, паладин. Мы покажем этим псам, как оскорблять Орду!','6','0','0','The Horde demands justice! We challenge the Alliance. Allow us to battle in place of your knights, paladin. We will show these dogs what it means to insult the Horde!'), +('34995','16023','-1713731','Альянс требует справедливости! Мы вызываем Орду на бой! Позволь нам встать на место твоих рыцарей, паладин. Мы покажем этим псам, как оскорблять Альянс!','6','0','0','Our honor has been besmirched! They make wild claims and false accusations against us. I demand justice! Allow my champions to fight in place of your knights, Tirion. We challenge the Horde!'), +('34996','16048','-1713532','Хорошо. Да будет так. Сражайтесь с честью!','','0','0','Very well, I will allow it. Fight with honor!'), +('34995','16022','-1713533','Не щадите никого, герои Орды! ЛОК-ТАР ОГАР!','6','0','0','Show them no mercy, Horde champions! LOK-TAR OGAR!'), +('34995','16022','-1713733','Не щадите никого, герои Альянса! За Лордаэрон!','6','0','0','Fight for the glory of the Alliance, heroes! Honor your king and your people!'), +('34990','16067','-1713534','СЛАВА АЛЬЯНСУ!','6','0','0','GLORY OF THE ALLIANCE!'), +('34990','16067','-1713734','ЛОК-ТАР ОГАР!','6','0','0','LOK-TAR OGAR!'), +('34996','16049','-1713535','Пустая и горькая победа. После сегодняшних потерь мы стали слабее как целое. Кто еще, кроме Короля-лича, выиграет от подобной глупости? Пали великие воины. И ради чего? Истинная опасность еще впереди - нас ждет битва с Королем-личом.','6','0','0','A shallow and tragic victory. We are weaker as a whole from the losses suffered today. Who but the Lich King could benefit from such foolishness? Great warriors have lost their lives. And for what? The true threat looms ahead - the Lich King awaits us all in death.'), +('34996','16050','-1713536','Лишь сплотившись, вы сможете пройти последнее испытание. Из глубин Ледяной Короны навстречу вам подымаются две могучие воительницы Плети: жуткие валькирии, крылатые вестницы Короля-лича!','6','0','0','Only by working together will you overcome the final challenge. From the depths of Icecrown come two of the Scourges most powerful lieutenants: fearsome valkyr, winged harbingers of the Lich King!'), +('34996','16037','-1713537','Пусть состязания начнутся!','6','0','0','Let the games begin!'), +('34497','0','-1713538','%s начинает читать заклинание|cFFFFFFFFСветлая воронка!|r Переключение к |cFFFFFFFFСветлой|r сущности!','3','0','0','%S begins to read a spell |cFFFFFFFFSvetlaya funnel!|R switch to |cFFFFFFFFSvetloy|r essence!'), +('34497','0','-1713539','%s начинает читать заклинание Договор близнецов!','3','0','0','%S begins to read the spell Treaty twins!'), +('34496','0','-1713540','%s начинает читать заклинание |cFF9932CDТемная воронка!|r Переключение к |cFF9932CDТемной|r сущности!','3','0','0','%S begins to read a spell |cFF9932CDTemnaya funnel!|R switch to |cFF9932CDTemnoy|r essence!'), +('34497','16272','-1713541','Во имя темного повелителя. Во имя Короля-лича. Вы. Умрете.','6','0','0','In the name of our dark master. For the Lich King. You. Will. Die.'), +('34496','16272','-1713741','Во имя светлого повелителя. Во имя Короля-лича. Вы. Умрете.','6','0','0','In the name of our dark master. For the Lich King. You. Will. Die.'), +('34496','16279','-1713542','Да поглотит вас Свет!','6','0','0','Let the light consume you!'), +('34496','16277','-1713543','Пустое место!','6','0','0','Empty place!'), +('34497','16276','-1713544','Тебя оценили и признали ничтожеством.','6','0','0','You appreciated and acknowledged nothing.'), +('34497','16274','-1713545','ХАОС!','3','0','0','CHAOS!'), +('34496','16278','-1713546','Да поглотит вас Тьма!','6','0','0','Let the dark consume you!'), +('34496','16275','-1713547','Плеть не остановить...','6','0','0','The Scourge cannot be stopped...'), +('34990','16068','-1713548','Против Альянса не выстоять даже самым сильным прислужникам Короля-лича! Все славьте наших героев!','6','0','0','Against the Alliance can not stand even the most powerful henchmen of the Lich King! All glorify our heroes!'), +('34995','16068','-1713748','Против Орды не выстоять даже самым сильным прислужникам Короля-лича! Все славьте наших героев!','6','0','0','Against the Horde does not withstand even the most powerful henchmen of the Lich King! All glorify our heroes!'), +('34996','16051','-1713549','Король-лич понес тяжелую потерю! Вы проявили себя как бесстрашные герои Серебряного Авангарда! Мы вместе нанесем удар по Цитадели Ледяной Короны и разнесем в клочья остатки Плети! Нет такого испытания, которое мы бы не могли пройти сообща!','6','0','0','A mighty blow has been dealt to the Lich King! You have proven yourselves able bodied champions of the Argent Crusade. Together we will strike at Icecrown Citadel and destroy what remains of the Scourge! There is no challenge that we cannot face united!'), +('16980','16321','-1713550','Будет тебе такое испытание, Фордринг.','6','0','0','You will have your challenge, Fordring.'), +('34996','16052','-1713551','Артас! Нас гораздо больше! Сложи Ледяную Скорбь, и я подарю тебе заслуженную смерть.','6','0','0','Arthas! You are hopelessly outnumbered! Lay down Frostmourne and I will grant you a just death.'), +('35877','16322','-1713552','Нерубианцы воздвигли целую империю под льдами Нордскола. Империю, на которой вы так бездумно построили свои дома. МОЮ ИМПЕРИЮ.','6','0','0','The Nerubians built an empire beneath the frozen wastes of Northrend. An empire that you so foolishly built your structures upon. MY EMPIRE.'), +('16980','16323','-1713553','Души твоих павших чемпионов будут принадлежать мне, Фордринг.','6','0','0','The souls of your fallen champions will be mine, Fordring.'), +('34564','16235','-1713554','А вот и гости заявились, как и обещал господин.','6','0','0','Ahhh... Our guests arrived, just as the master promised.'), +('34564','16234','-1713555','Это место станет вашей могилой!','3','0','0','This place will serve as your tomb!'), +('34564','16240','-1713556','Ауум на-л ак-к-к-к, ишшш. Вставайте, слуги мои. Время пожирать...','6','0','0','Auum na-l ak-k-k-k, isshhh. Rise, minions. Devour...'), +('34564','0','-1713557','%s зарывается в землю!','3','0','0','%S buries itself in the earth!'), +('34660','0','-1713558','Шипы %s преследуют $n!','3','0','0','%s spikes pursuing $n!'), +('34564','0','-1713559','%s вылезает на поверхность!','3','0','0','%S getting out of the ground!'), +('34564','16241','-1713560','Стая поглотит вас!','6','0','0','The swarm shall overtake you!'), +('34564','0','-1713561','%s выпускает рой жуков-трупоедов, чтобы восстановить здоровье!','3','0','0','%S produces a swarm of beetles Peon to restore your health!'), +('34564','16236','-1713562','Ф-лаккх шир!','6','0','0','F-lakkh shir!'), +('34564','16237','-1713563','Еще одна душа накормит хозяина.','6','0','0','Another soul to sate the host.'), +('34564','16238','-1713564','Я подвел тебя, господин...','6','0','0','I have failed you, master...'), +('36095','0','-1713565','Чемпионы, вы прошли испытание великого крестоносца! Знайте, что только самые сильные искатели приключений могли рассчитывать завершить это испытание.','6','0','0','Champions, you are alive! Not only have you defeated every challenge of the Trial of the Crusader, but thwarted Arthas directly! Your skill and cunning will prove to be a powerful weapon against the Scourge. Well done! Allow one of my mages to transport you back to the surface!'), +('36095','0','-1713566','Позвольте вручить вам эти сундуки в качестве заслуженной награды, и пусть его содержимое послужит вам верой и правдой в походе против Артаса в самом центре Цитадели Ледяной Короны!','6','0','0','Let me hand you the chests as a reward, and let its contents will serve you faithfully in the campaign against Arthas in the heart of the Icecrown Citadel!'); diff --git a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql new file mode 100644 index 000000000..fb4a0326f --- /dev/null +++ b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql @@ -0,0 +1,447 @@ +-- Trial of the crusader spelltable +DELETE FROM `boss_spell_table` WHERE `entry` IN +(34496,34497,34564,34605,34607,34780,34784,34796,34797,34799, 34800, 34813, 34815, 34826, 35144, 35176, 34606, 34660); + +-- Eydis Darkbane +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34496, 64238, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34496, 65768, 67262, 67263, 67264, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34496, 65874, 67256, 67257, 67258, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), +(34496, 65876, 67306, 67307, 67308, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), +(34496, 65879, 67244, 67245, 67246, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), +(34496, 65916, 67248, 67249, 67250, 15000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34496, 66058, 67182, 67183, 67184, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34496, 66069, 67309, 67310, 67311, 10000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), +(34496, 67282, 0, 0, 0, 10000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL); + +-- Fjola Lightbane +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34497, 64238, 64238, 64238, 64238, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34497, 65766, 67270, 67271, 67272, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34497, 65858, 67259, 67260, 67261, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), +(34497, 65875, 67303, 67304, 67305, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), +(34497, 65916, 67248, 67249, 67250, 15000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34497, 66046, 67206, 67207, 67208, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34497, 66075, 67312, 67313, 67314, 10000, 10000, 10000, 10000, 20000, 20000, 20000, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), +(34497, 67297, 67297, 67298, 67298, 10000, 10000, 10000, 10000, 15000, 15000, 15000, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL); + +-- AnubArak +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34564, 26662, 26662, 26662, 26662, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34564, 34605, 0, 0, 0, 90000, 0, 0, 0, 90000, 0, 0, 0, 0, 0, 0, 0, 20.0, 100.0, 0, 0, 0, 0, 9, 1, 0, 0, NULL), +(34564, 34660, 0, 0, 0, 20000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 0, 5.0, 10.0, 0, 0, 0, 0, 9, 1, 0, 0, NULL), +(34564, 34606, 0, 0, 0, 5000, 0, 0, 0, 10000, 0, 0, 0, 0, 0, 0, 0, 10.0, 100.0, 0, 0, 0, 0, 9, 1, 0, 0, NULL), +(34564, 34607, 0, 0, 0, 70000, 0, 0, 0, 90000, 0, 0, 0, 0, 0, 0, 0, 20.0, 100.0, 0, 0, 0, 0, 9, 1, 0, 0, NULL), +(34564, 53421, 53421, 53421, 53421, 45000, 45000, 45000, 45000, 60000, 60000, 60000, 60000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, NULL), +(34564, 66169, 0, 0, 0, 20000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), +(34564, 66012, 66012, 66012, 66012, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34564, 66013, 67700, 68509, 68510, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34564, 66339, 66339, 66339, 66339, 5000, 5000, 5000, 5000, 10000, 10000, 10000, 10000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0, 0, NULL), +(34564, 67574, 0, 0, 0, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 1, 0, NULL), +(34564, 66118, 67630, 68646, 68647, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), +(34564, 66240, 0, 0, 0, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), +(34564, 66125, 0, 0, 0, 10000, 0, 0, 0, 10000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34564, 67730, 0, 0, 0, 20000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL); + +-- Anub'arak scarab +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34605, 66092, 66092, 66092, 66092, 5000, 5000, 5000, 5000, 20000, 20000, 20000, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34605, 67861, 66092, 66092, 66092, 5000, 5000, 5000, 5000, 20000, 20000, 20000, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL); + +-- Cold sphere +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34606, 66193, 67855, 67856, 67857, 5000, 0, 0, 0, 5000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL); + +-- Anub'arak spike +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34660, 67574, 0, 0, 0, 20000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL), +(34660, 66193, 67855, 67856, 67857, 1000, 0, 0, 0, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34660, 65920, 65921, 65922, 65923, 1000, 0, 0, 0, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL); + +-- Nerubian Borrower +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34607, 66129, 66129, 66129, 66129, 10000, 10000, 10000, 10000, 20000, 20000, 20000, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL), +(34607, 67322, 67322, 67322, 67322, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, NULL), +(34607, 67847, 67847, 67847, 67847, 5000, 5000, 5000, 5000, 20000, 20000, 20000, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL); + +-- Jaraxxus +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34780, 26662, 26662, 26662, 26662, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34780, 66197, 68123, 68124, 68125, 30000, 30000, 30000, 30000, 45000, 45000, 45000, 45000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34780, 66237, 67049, 67050, 67051, 40000, 40000, 40000, 40000, 90000, 90000, 40000, 90000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL), +(34780, 66242, 67060, 67060, 67060, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34780, 66264, 66264, 68405, 68405, 60000, 60000, 60000, 60000, 60000, 60000, 60000, 60000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 1, 0, NULL), +(34780, 66528, 66528, 67029, 67029, 15000, 15000, 15000, 15000, 25000, 25000, 25000, 25000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34780, 66532, 66963, 66964, 66965, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34780, 67108, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34780, 66255, 0, 0, 0, 30000, 0, 0, 0, 45000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34780, 34825, 0, 0, 0, 60000, 0, 0, 0, 60000, 0, 0, 0, 0, 0, 0, 0, 20.0, 80.0, 0, 0, 0, 0, 10, 0, 0, 0, NULL), +(34780, 34813, 0, 0, 0, 60000, 0, 0, 0, 60000, 0, 0, 0, 0, 0, 0, 0, 20.0, 60.0, 0, 0, 0, 0, 10, 0, 0, 0, NULL); + +-- NPC Legion flame +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34784, 66199, 68127, 68126, 68128, 30000, 30000, 30000, 30000, 45000, 45000, 45000, 45000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL); + +-- Gormok +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34796, 34800, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 20.0, 80.0, 0, 0, 0, 0, 9, 0, 0, 0, NULL), +(34796, 66331, 67477, 67478, 67479, 20000, 0, 0, 0, 40000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34796, 66636, 0, 0, 0, 15000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 1, 0, NULL), +(34796, 67648, 0, 0, 0, 15000, 0, 0, 0, 40000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL); + +-- Icehowl +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34797, 66683, 67660, 67661, 67662, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34797, 66689, 67650, 67651, 67652, 25000, 25000, 25000, 25000, 40000, 40000, 40000, 40000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34797, 66734, 0, 0, 0, 4000, 4000, 3000, 3000, 4000, 4000, 3000, 3000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL), +(34797, 66770, 67654, 67655, 67656, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), +(34797, 66758, 0, 0, 0, 15000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34797, 68667, 0, 0, 0, 8000, 0, 0, 0, 8000, 0, 0, 0, 0, 0, 0, 0, 200.0, 0, 0, 0, 0, 0, 12, 0, 0, 0, NULL), +(34797, 66759, 0, 0, 0, 300000, 0, 0, 0, 300000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34797, 67345, 67663, 67664, 67665, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL); + +-- Dreadscale +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34799, 53421, 0, 0, 0, 40000, 0, 0, 0, 40000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), +(34799, 66794, 67644, 67645, 67646, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), +(34799, 66796, 67632, 67633, 67634, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34799, 66821, 66821, 66821, 66821, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34799, 66879, 67624, 67625, 67626, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34799, 66902, 67627, 67628, 67629, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), +(34799, 66883, 67641, 67642, 67643, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), +(34799, 35176, 0, 0, 0, 30000, 30000, 45000, 60000, 30000, 30000, 45000, 60000, 0, 0, 0, 0, 1, 5, 0, 0, 0, 0, 11, 0, 0, 0, NULL), +(34799, 68335, 68335, 68335, 68335, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL); + +-- Snobold vassal +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34800, 66313, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL), +(34800, 66317, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL), +(34800, 66318, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL), +(34800, 66406, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 1, 0, NULL), +(34800, 66407, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), +(34800, 66408, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), +(34800, 66636, 0, 0, 0, 15000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 1, 0, NULL); + +-- Infernal volcano +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34813, 66255, 0, 0, 0, 30000, 0, 0, 0, 45000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34813, 66258, 0, 0, 0, 20000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, NULL); + +-- Fel infernal +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34815, 66494, 66494, 66494, 66494, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34815, 67047, 67047, 67047, 67047, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL); + +-- Mistress of pain +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34826, 66316, 66316, 66316, 66316, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34826, 67098, 67098, 67098, 67098, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL); + +-- Acidmaw +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(35144, 53421, 0, 0, 0, 40000, 0, 0, 0, 40000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, NULL), +(35144, 66794, 67644, 67645, 67646, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), +(35144, 66819, 66819, 66819, 66819, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(35144, 66824, 67612, 67613, 67614, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), +(35144, 66880, 67606, 67607, 67608, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(35144, 66901, 67615, 67616, 66617, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(35144, 66883, 67641, 67642, 67643, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), +(35144, 35176, 0, 0, 0, 30000, 30000, 45000, 60000, 30000, 30000, 45000, 60000, 0, 0, 0, 0, 1, 5, 0, 0, 0, 0, 11, 0, 0, 0, NULL), +(35144, 68335, 68335, 68335, 68335, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL); + +-- Slime pool +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(35176, 66881, 67638, 67639, 67640, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL), +(35176, 66883, 67641, 67642, 67643, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(35176, 66882, 0, 0, 0, 500, 0, 0, 0, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL); + +-- Retro Paladins +DELETE FROM `boss_spell_table` WHERE `entry` IN (34471,34456); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34471, 66011, 0, 180000, 180000, 3), +(34471, 66003, 0, 6000, 18000, 3), +(34471, 66010, 0, 0, 3600001, 1), +(34471, 66006, 0, 10000, 10000, 3), +(34471, 66007, 0, 40000, 40000, 3), +(34471, 66009, 0, 300000, 300000, 1), +(34471, 66005, 68018, 8000, 15000, 3), +(34471, 66008, 0, 60000, 60000, 4), +(34471, 66004, 68021, 10000, 15000, 1); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34456, 66011, 0, 180000, 180000, 3), +(34456, 66003, 0, 6000, 18000, 3), +(34456, 66010, 0, 0, 3600001, 1), +(34456, 66006, 0, 10000, 10000, 3), +(34456, 66007, 0, 40000, 40000, 3), +(34456, 66009, 0, 300000, 300000, 1), +(34456, 66005, 68018, 8000, 15000, 3), +(34456, 66008, 0, 60000, 60000, 4), +(34456, 66004, 68021, 10000, 15000, 1); + +-- Pet's +DELETE FROM `boss_spell_table` WHERE `entry` IN (35465,35610); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(35465, 67518, 0, 15000, 30000, 3), +(35465, 67519, 0, 15000, 30000, 3); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(35610, 67793, 67980, 67981, 67982, 5000, 10000, 3); + +-- Druids +DELETE FROM `boss_spell_table` WHERE `entry` IN (34460,34451); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34460, 66093, 67957, 5000, 15000, 14), +(34460, 66066, 67965, 10000, 20000, 14), +(34460, 66067, 67968, 10000, 20000, 14), +(34460, 66065, 67971, 10000, 20000, 14), +(34460, 66086, 67974, 40000, 90000, 1), +(34460, 65860, 0, 45000, 90000, 1), +(34460, 66068, 0, 15000, 30000, 6), +(34460, 66071, 0, 40000, 80000, 1); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34451, 66093, 67957, 10000, 20000, 14), +(34451, 66066, 67965, 10000, 20000, 14), +(34451, 66067, 67968, 10000, 20000, 14), +(34451, 66065, 67971, 10000, 20000, 14), +(34451, 66086, 67974, 40000, 90000, 1), +(34451, 65860, 0, 45000, 90000, 1), +(34451, 66068, 0, 15000, 30000, 6), +(34451, 66071, 0, 40000, 80000, 1); + +-- Warriors +DELETE FROM `boss_spell_table` WHERE `entry` IN (34475,34453); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34475, 65947, 0, 20000, 30000, 1), +(34475, 65930, 0, 10000, 60000, 3), +(34475, 65926, 0, 6000, 25000, 3), +(34475, 68764, 0, 3000, 25000, 3), +(34475, 65935, 0, 20000, 80000, 3), +(34475, 65924, 0, 30000, 90000, 1), +(34475, 65936, 0, 5000, 25000, 3), +(34475, 65940, 0, 10000, 25000, 3), +(34475, 65932, 0, 30000, 60000, 1); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34453, 65947, 0, 20000, 30000, 1), +(34453, 65930, 0, 10000, 60000, 3), +(34453, 65926, 0, 6000, 25000, 3), +(34453, 68764, 0, 3000, 25000, 3), +(34453, 65935, 0, 20000, 80000, 3), +(34453, 65924, 0, 30000, 90000, 1), +(34453, 65936, 0, 5000, 25000, 3), +(34453, 65940, 0, 10000, 25000, 3), +(34453, 65932, 0, 30000, 60000, 1); + +-- Mage +DELETE FROM `boss_spell_table` WHERE `entry` IN (34468,34449); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34468, 65799, 67995, 3000, 10000, 3), +(34468, 65791, 67998, 5000, 15000, 3), +(34468, 65800, 68001, 5000, 15000, 3), +(34468, 65793, 0, 7000, 25000, 1), +(34468, 65807, 68004, 5000, 15000, 4), +(34468, 65790, 0, 5000, 15000, 6), +(34468, 65792, 0, 7000, 15000, 1), +(34468, 65802, 0, 0, 3600001, 1), +(34468, 65801, 0, 15000, 40000, 4); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34449, 65799, 67995, 3000, 10000, 3), +(34449, 65791, 67998, 5000, 15000, 3), +(34449, 65800, 68001, 5000, 15000, 3), +(34449, 65793, 0, 7000, 25000, 1), +(34449, 65807, 68004, 5000, 15000, 4), +(34449, 65790, 0, 5000, 15000, 6), +(34449, 65792, 0, 7000, 15000, 1), +(34449, 65802, 0, 0, 3600001, 1), +(34449, 65801, 0, 15000, 40000, 4); + +-- Shaman +DELETE FROM `boss_spell_table` WHERE `entry` IN (34463,34455); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34463, 66055, 68115, 5000, 15000, 14), +(34463, 66053, 68118, 5000, 15000, 14), +(34463, 66056, 0, 5000, 15000, 14), +(34463, 65983, 0, 30000, 60000, 1), +(34463, 65980, 0, 5000, 15000, 6), +(34463, 66054, 0, 10000, 40000, 4), +(34463, 66063, 0, 5000, 15000, 14), +(34463, 65973, 68100, 5000, 15000, 4); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34455, 66055, 68115, 5000, 15000, 14), +(34455, 66053, 68118, 5000, 15000, 14), +(34455, 66056, 0, 5000, 15000, 14), +(34455, 65983, 0, 30000, 60000, 1), +(34455, 65980, 0, 5000, 15000, 6), +(34455, 66054, 0, 10000, 40000, 4), +(34455, 66063, 0, 5000, 15000, 14), +(34455, 65973, 68100, 5000, 15000, 4); + +-- Enh shaman +DELETE FROM `boss_spell_table` WHERE `entry` IN (34470,34444); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34470, 65973, 0, 5000, 8000, 4), +(34470, 65974, 0, 5000, 8000, 3), +(34470, 65983, 0, 25000, 600000, 1), +(34470, 65970, 0, 5000, 90000, 3); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34444, 65973, 0, 5000, 8000, 4), +(34444, 65974, 0, 5000, 8000, 3), +(34444, 65983, 0, 25000, 600000, 1), +(34444, 65970, 0, 5000, 90000, 3); + +-- Hunter +DELETE FROM `boss_spell_table` WHERE `entry` IN (34467,34448); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34467, 65583, 67978, 3000, 8000, 3), +(34467, 65871, 0, 20000, 120000, 1), +(34467, 65869, 0, 12000, 20000, 1), +(34467, 65866, 67984, 3000, 8000, 3), +(34467, 65880, 0, 12000, 30000, 1), +(34467, 65868, 67989, 4000, 8000, 3), +(34467, 65867, 0, 4000, 8000, 3), +(34467, 66207, 0, 4000, 8000, 3), +(34467, 65877, 0, 7000, 60000, 4); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34448, 65583, 67978, 3000, 8000, 3), +(34448, 65871, 0, 20000, 120000, 1), +(34448, 65869, 0, 12000, 20000, 1), +(34448, 65866, 67984, 3000, 8000, 3), +(34448, 65880, 0, 12000, 30000, 1), +(34448, 65868, 67989, 4000, 8000, 3), +(34448, 65867, 0, 4000, 8000, 3), +(34448, 66207, 0, 4000, 8000, 3), +(34448, 65877, 0, 7000, 60000, 4); + +-- Rogue +DELETE FROM `boss_spell_table` WHERE `entry` IN (34472,34454); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34472, 65955, 0, 8000, 10000, 3), +(34472, 65956, 0, 12000, 120000, 1), +(34472, 65960, 0, 7000, 8000, 6), +(34472, 65961, 0, 20000, 120000, 1), +(34472, 66178, 0, 10000, 8000, 3), +(34472, 65954, 0, 5000, 8000, 3), +(34472, 65957, 68095, 15000, 20000, 3); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34454, 65955, 0, 8000, 10000, 3), +(34454, 65956, 0, 12000, 120000, 1), +(34454, 65960, 0, 7000, 8000, 6), +(34454, 65961, 0, 20000, 120000, 1), +(34454, 66178, 0, 10000, 8000, 3), +(34454, 65954, 0, 5000, 8000, 3), +(34454, 65957, 68095, 15000, 20000, 3); + +-- Priest +DELETE FROM `boss_spell_table` WHERE `entry` IN (34466,34456); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34466, 66177, 68035, 3000, 8000, 14), +(34466, 66099, 68032, 3000, 8000, 14), +(34466, 66104, 68023, 3000, 8000, 14), +(34466, 66100, 68026, 3000, 8000, 4), +(34466, 65546, 0, 3000, 8000, 6), +(34466, 65543, 0, 5000, 25000, 1); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34456, 66177, 68035, 3000, 8000, 14), +(34456, 66099, 68032, 3000, 8000, 14), +(34456, 66104, 68023, 3000, 8000, 14), +(34456, 66100, 68026, 3000, 8000, 4), +(34456, 65546, 0, 3000, 8000, 6), +(34456, 65543, 0, 5000, 25000, 1); + +-- Shadow priest +DELETE FROM `boss_spell_table` WHERE `entry` IN (34473,34441); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34473, 65542, 0, 8000, 15000, 6), +(34473, 65490, 68091, 3000, 8000, 4), +(34473, 65541, 68088, 3000, 8000, 4), +(34473, 65488, 68042, 3000, 8000, 3), +(34473, 65492, 68038, 3000, 8000, 3), +(34473, 65545, 0, 3000, 8000, 3), +(34473, 65544, 0, 1000, 180000, 1), +(34473, 65546, 0, 3000, 8000, 4), +(34473, 65543, 0, 8000, 24000, 1), +(34473, 16592, 0, 3000, 8000, 1); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34441, 65542, 0, 8000, 15000, 6), +(34441, 65490, 68091, 3000, 8000, 4), +(34441, 65541, 68088, 3000, 8000, 4), +(34441, 65488, 68042, 3000, 8000, 3), +(34441, 65492, 68038, 3000, 8000, 3), +(34441, 65545, 0, 3000, 8000, 3), +(34441, 65544, 0, 1000, 180000, 1), +(34441, 65546, 0, 3000, 8000, 4), +(34441, 65543, 0, 8000, 24000, 1), +(34441, 16592, 0, 3000, 8000, 1); + +-- Death knight +DELETE FROM `boss_spell_table` WHERE `entry` IN (34461,34458); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34461, 66020, 0, 5000, 15000, 3), +(34461, 66019, 67930, 5000, 15000, 3), +(34461, 66017, 0, 5000, 15000, 3), +(34461, 66047, 67936, 5000, 15000, 3), +(34461, 66023, 0, 5000, 90000, 1), +(34461, 66021, 67939, 8000, 12000, 3), +(34461, 66018, 0, 10000, 90000, 6); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34458, 66020, 0, 5000, 15000, 3), +(34458, 66019, 67930, 5000, 15000, 3), +(34458, 66017, 0, 5000, 15000, 3), +(34458, 66047, 67936, 5000, 15000, 3), +(34458, 66023, 0, 5000, 90000, 1), +(34458, 66021, 67939, 8000, 12000, 3), +(34458, 66018, 0, 10000, 90000, 6); + +-- Paladin +DELETE FROM `boss_spell_table` WHERE `entry` IN (34465,34445); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34465, 68757, 0, 25000, 40000, 6), +(34465, 66010, 0, 0, 3600001, 14), +(34465, 66116, 0, 5000, 15000, 14), +(34465, 66113, 68008, 5000, 10000, 14), +(34465, 66112, 68011, 5000, 15000, 14), +(34465, 66009, 0, 0, 3600001, 6), +(34465, 66114, 68015, 6000, 15000, 14), +(34465, 66613, 0, 5000, 15000, 4); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34445, 68757, 0, 25000, 40000, 6), +(34445, 66010, 0, 0, 3600001, 14), +(34445, 66116, 0, 5000, 15000, 14), +(34445, 66113, 68008, 5000, 10000, 14), +(34445, 66112, 68011, 5000, 15000, 14), +(34445, 66009, 0, 0, 3600001, 6), +(34445, 66114, 68015, 6000, 15000, 14), +(34445, 66613, 0, 5000, 15000, 4); + +-- Boomkin (druid in moonkin form) +DELETE FROM `boss_spell_table` WHERE `entry` IN (34469,34459); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34469, 65859, 0, 5000, 40000, 4), +(34469, 65857, 0, 5000, 40000, 3), +(34469, 65863, 0, 10000, 40000, 4), +(34469, 65861, 0, 25000, 40000, 3), +(34469, 65855, 67942, 25000, 40000, 4), +(34469, 65856, 67945, 5000, 40000, 3), +(34469, 65854, 67948, 25000, 40000, 3), +(34469, 65860, 0, 5000, 120000, 1), +(34469, 65862, 67952, 25000, 40000, 3); + +-- Warlock +DELETE FROM `boss_spell_table` WHERE `entry` IN (34474,34450); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34474, 65816, 68146, 15000, 30000, 1), +(34474, 65810, 68134, 15000, 30000, 4), +(34474, 65814, 68137, 15000, 30000, 4), +(34474, 65815, 0, 15000, 30000, 4), +(34474, 65809, 0, 4000, 15000, 4), +(34474, 65819, 68149, 15000, 30000, 3), +(34474, 65821, 68152, 3000, 10000, 3), +(34474, 65812, 68155, 2000, 10000, 4); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34450, 65816, 68146, 15000, 30000, 1), +(34450, 65810, 68134, 15000, 30000, 4), +(34450, 65814, 68137, 15000, 30000, 4), +(34450, 65815, 0, 15000, 30000, 4), +(34450, 65809, 0, 4000, 15000, 4), +(34450, 65819, 68149, 15000, 30000, 3), +(34450, 65821, 68152, 3000, 10000, 3), +(34450, 65812, 68155, 2000, 10000, 4); + diff --git a/addition/boss_spell_table_scriptdev2.sql b/addition/boss_spell_table_scriptdev2.sql new file mode 100644 index 000000000..6ceddc255 --- /dev/null +++ b/addition/boss_spell_table_scriptdev2.sql @@ -0,0 +1,33 @@ +DROP TABLE IF EXISTS `boss_spell_table`; +CREATE TABLE IF NOT EXISTS `boss_spell_table` ( + `entry` mediumint(8) NOT NULL DEFAULT '0' COMMENT 'Creature entry', + `spellID_N10` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Spell ID for 10 normal', + `spellID_N25` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Spell ID for 25 normal', + `spellID_H10` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Spell ID for 10 heroic', + `spellID_H25` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Spell ID for 25 heroic', + `timerMin_N10` mediumint(8) unsigned NOT NULL DEFAULT '15000' COMMENT 'Minimum timer for this spell (in ms.) for 10 normal', + `timerMin_N25` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Minimum timer for this spell (in ms.) for 25 normal', + `timerMin_H10` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Minimum timer for this spell (in ms.) for 10 heroic', + `timerMin_H25` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Minimum timer for this spell (in ms.) for 25 heroic', + `timerMax_N10` mediumint(8) unsigned NOT NULL DEFAULT '30000' COMMENT 'Maximum timer for this spell (in ms.) for 10 normal', + `timerMax_N25` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Maximum timer for this spell (in ms.) for 25 normal', + `timerMax_H10` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Maximum timer for this spell (in ms.) for 10 heroic', + `timerMax_H25` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Maximum timer for this spell (in ms.) for 25 heroic', + `data1` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Various INT data for this spell or summon for 10 normal', + `data2` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Various INT data for this spell for 25 normal', + `data3` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Various INT data for this spell for 10 heroic', + `data4` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Various INT data for this spell for 25 heroic', + `locData_x` float NOT NULL DEFAULT '0' COMMENT 'Location X data for this spell', + `locData_y` float NOT NULL DEFAULT '0' COMMENT 'Location Y data for this spell', + `locData_z` float NOT NULL DEFAULT '0' COMMENT 'Location Z data for this spell', + `varData` mediumint(8) NOT NULL DEFAULT '0' COMMENT 'Special data field for this spell (basepoint for Aura, for example)', + `StageMask_N` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Stage mask for this spell (don\'t used now)', + `StageMask_H` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Stage mask for this spell - heroic mode (don\'t used now)', + `CastType` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Type of cast (by enum BossSpellTableParameters)', + `isVisualEffect` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT 'Is spell is Visual effect only', + `isBugged` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT 'Is spell bugged and need override', + `textEntry` mediumint(8) NOT NULL DEFAULT '0' COMMENT 'Text from script_texts for this spell casting', + `comment` text, + PRIMARY KEY (`entry`,`spellID_N10`,`CastType`), + INDEX `idx_entry`(`entry`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT 'Boss spell table by /dev/rsa'; diff --git a/addition/here you can find SQL files from patches.txt b/addition/here you can find SQL files from patches.txt new file mode 100644 index 000000000..e69de29bb diff --git a/addition/spell_comment_from_wowd_scriptdev2.sql b/addition/spell_comment_from_wowd_scriptdev2.sql new file mode 100644 index 000000000..a5fec77d0 --- /dev/null +++ b/addition/spell_comment_from_wowd_scriptdev2.sql @@ -0,0 +1,19 @@ +-- Insert comments to scriptdev2 boss_spell_table from WOWD database. +-- Change WOWD database name if you use this! + +CREATE ALGORITHM = TEMPTABLE VIEW `commentlist` +(`entry` ,`spell`, `comment`) +AS SELECT `scriptdev2`.`boss_spell_table`.`entry`, +`spellID_N10`, +CONCAT(`mangos`.`creature_template`.`name`, +' : ', +`mangos`.`wowd_spell`.`SpellName`) +FROM `scriptdev2`.`boss_spell_table` +INNER JOIN `mangos`.`creature_template` ON `mangos`.`creature_template`.`entry` = `scriptdev2`.`boss_spell_table`.`entry` +INNER JOIN `mangos`.`wowd_spell` ON `mangos`.`wowd_spell`.`id` = `scriptdev2`.`boss_spell_table`.`spellID_N10`; + +UPDATE `scriptdev2`.`boss_spell_table` SET `comment` = (SELECT DISTINCT `commentlist`.`comment` +FROM `commentlist` WHERE `scriptdev2`.`boss_spell_table`.`entry` = `commentlist`.`entry` +AND `scriptdev2`.`boss_spell_table`.`spellID_N10` = `commentlist`.`spell` +AND `scriptdev2`.`boss_spell_table`.`comment` IS NULL); +DROP VIEW `commentlist`; diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp new file mode 100644 index 000000000..25ff4a7bc --- /dev/null +++ b/include/sc_boss_spell_worker.cpp @@ -0,0 +1,583 @@ +/* Copyright (C) 2009 - 2010 by /dev/rsa for ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ +#include "sc_boss_spell_worker.h" +#include "precompiled.h" +#ifdef DEF_BOSS_SPELL_WORKER_H + +//extern DatabaseType SD2Database; + +BossSpellWorker::BossSpellWorker(ScriptedAI* bossAI) +{ + boss = bossAI->m_creature; + bossID = boss->GetEntry(); + _bossSpellCount = 0; + currentTarget = NULL; + memset(&m_uiSpell_Timer, 0, sizeof(m_uiSpell_Timer)); + memset(&m_BossSpell,0,sizeof(m_BossSpell)); + if (pMap = boss->GetMap()) + currentDifficulty = pMap->GetDifficulty(); + else currentDifficulty = RAID_DIFFICULTY_10MAN_NORMAL; + debug_log("BSW: Initializing BossSpellWorker object for boss %u difficulty %u",bossID,currentDifficulty); + LoadSpellTable(); + Reset((uint8)currentDifficulty); +}; + +BossSpellWorker::~BossSpellWorker() +{ + debug_log("BSW: Removing BossSpellWorker object for boss %u",bossID); +}; + +void BossSpellWorker::Reset(uint8 _Difficulty) +{ + currentDifficulty = setDifficulty(_Difficulty); + resetTimers(); +}; + +void BossSpellWorker::_resetTimer(uint8 m_uiSpellIdx) +{ + if (m_uiSpellIdx > _bossSpellCount) return; + if (m_BossSpell[m_uiSpellIdx].m_uiSpellTimerMin[currentDifficulty] != m_BossSpell[m_uiSpellIdx].m_uiSpellTimerMax[currentDifficulty]) + m_uiSpell_Timer[m_uiSpellIdx] = urand(0,m_BossSpell[m_uiSpellIdx].m_uiSpellTimerMax[currentDifficulty]); + else m_uiSpell_Timer[m_uiSpellIdx] = m_BossSpell[m_uiSpellIdx].m_uiSpellTimerMin[currentDifficulty]; + if (m_BossSpell[m_uiSpellIdx].m_uiSpellTimerMin[currentDifficulty] == 0 + && m_BossSpell[m_uiSpellIdx].m_uiSpellTimerMax[currentDifficulty] >= HOUR*IN_MILLISECONDS) + m_uiSpell_Timer[m_uiSpellIdx] = 0; +}; + +void BossSpellWorker::LoadSpellTable() +{ + debug_log("BSW: Loading table of spells boss %u difficulty %u", bossID , currentDifficulty); + + char query[MAX_QUERY_LEN]; + + sprintf(query, "SELECT entry, spellID_N10, spellID_N25, spellID_H10, spellID_H25, timerMin_N10, timerMin_N25, timerMin_H10, timerMin_H25, timerMax_N10, timerMax_N25, timerMax_H10, timerMax_H25, data1, data2, data3, data4, locData_x, locData_y, locData_z, varData, StageMask_N, StageMask_H, CastType, isVisualEffect, isBugged, textEntry FROM `boss_spell_table` WHERE entry = %u;\r\n", bossID); + + QueryResult* Result = strSD2Pquery(query); + + if (Result) + { + uint32 uiCount = 0; + do + { + Field* pFields = Result->Fetch(); + + m_BossSpell[uiCount].id = uiCount; + + int32 bossEntry = pFields[0].GetInt32(); + + for (uint8 j = 0; j < DIFFICULTY_LEVELS; ++j) + m_BossSpell[uiCount].m_uiSpellEntry[j] = pFields[1+j].GetUInt32(); + + for (uint8 j = 0; j < DIFFICULTY_LEVELS; ++j) + m_BossSpell[uiCount].m_uiSpellTimerMin[j] = pFields[1+DIFFICULTY_LEVELS+j].GetUInt32(); + + for (uint8 j = 0; j < DIFFICULTY_LEVELS; ++j) + m_BossSpell[uiCount].m_uiSpellTimerMax[j] = pFields[1+DIFFICULTY_LEVELS*2+j].GetUInt32(); + + for (uint8 j = 0; j < DIFFICULTY_LEVELS; ++j) + m_BossSpell[uiCount].m_uiSpellData[j] = pFields[1+DIFFICULTY_LEVELS*3+j].GetUInt32(); + + m_BossSpell[uiCount].LocData.x = pFields[1+DIFFICULTY_LEVELS*4].GetFloat(); + m_BossSpell[uiCount].LocData.y = pFields[2+DIFFICULTY_LEVELS*4].GetFloat(); + m_BossSpell[uiCount].LocData.z = pFields[3+DIFFICULTY_LEVELS*4].GetFloat(); + + m_BossSpell[uiCount].varData = pFields[4+DIFFICULTY_LEVELS*4].GetInt32(); + + m_BossSpell[uiCount].StageMaskN = pFields[5+DIFFICULTY_LEVELS*4].GetUInt32(); + m_BossSpell[uiCount].StageMaskH = pFields[6+DIFFICULTY_LEVELS*4].GetUInt32(); + + m_BossSpell[uiCount].m_CastTarget = getBSWCastType(pFields[7+DIFFICULTY_LEVELS*4].GetUInt8()); + + m_BossSpell[uiCount].m_IsVisualEffect = (pFields[8+DIFFICULTY_LEVELS*4].GetUInt8() == 0) ? false : true ; + + m_BossSpell[uiCount].m_IsBugged = (pFields[9+DIFFICULTY_LEVELS*4].GetUInt8() == 0) ? false : true ; + + m_BossSpell[uiCount].textEntry = pFields[10+DIFFICULTY_LEVELS*4].GetInt32(); + + if (bossEntry != bossID) error_db_log("BSW: Unknown error while load boss_spell_table"); + + ++uiCount; + + } while (Result->NextRow()); + + _bossSpellCount = uiCount; + + delete Result; + + _fillEmptyDataField(); + + debug_log("BSW: Loaded %u boss spell data records for boss %u", uiCount, bossID); + } + else + { + error_db_log("BSW: Boss spell table for boss %u is empty.", bossID); + _bossSpellCount = 0; + }; +} + +bool BossSpellWorker::_QuerySpellPeriod(uint8 m_uiSpellIdx, uint32 diff) + { + if (_bossSpellCount == 0) return false; + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + + if (m_uiSpell_Timer[m_uiSpellIdx] < diff) { + if (pSpell->m_uiSpellTimerMax[currentDifficulty] >= HOUR*IN_MILLISECONDS) m_uiSpell_Timer[m_uiSpellIdx]=HOUR*IN_MILLISECONDS; + else m_uiSpell_Timer[m_uiSpellIdx]=urand(pSpell->m_uiSpellTimerMin[currentDifficulty],pSpell->m_uiSpellTimerMax[currentDifficulty]); + return true; + } else { + m_uiSpell_Timer[m_uiSpellIdx] -= diff; + return false; + }; + }; + +CanCastResult BossSpellWorker::_BSWSpellSelector(uint8 m_uiSpellIdx, Unit* pTarget) +{ + if (_bossSpellCount == 0) return CAST_FAIL_OTHER; + SpellEntry const *spell; + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + Unit* pSummon = NULL; + + debug_log("BSW: Casting spell number %u type %u",pSpell->m_uiSpellEntry[currentDifficulty], pSpell->m_CastTarget); + + switch (pSpell->m_CastTarget) { + + case DO_NOTHING: + return CAST_OK; + + case CAST_ON_SELF: + if (!pSpell->m_IsBugged) return _DoCastSpellIfCan(boss, pSpell->m_uiSpellEntry[currentDifficulty]); + else return _BSWDoCast(m_uiSpellIdx, boss); + break; + + case CAST_ON_SUMMONS: + if (!pTarget) return CAST_FAIL_OTHER; + else return _DoCastSpellIfCan(pTarget, pSpell->m_uiSpellEntry[currentDifficulty]); + break; + + case CAST_ON_VICTIM: + pTarget = boss->getVictim(); + return _BSWCastOnTarget(pTarget, m_uiSpellIdx); + break; + + case CAST_ON_RANDOM: + pTarget = SelectUnit(SELECT_TARGET_RANDOM); + return _BSWCastOnTarget(pTarget, m_uiSpellIdx); + break; + + case CAST_ON_BOTTOMAGGRO: + pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); + return _BSWCastOnTarget(pTarget, m_uiSpellIdx); + break; + + case CAST_ON_TARGET: + return _BSWCastOnTarget(pTarget, m_uiSpellIdx); + break; + + case APPLY_AURA_SELF: + if (spell = (SpellEntry *)GetSpellStore()->LookupEntry(pSpell->m_uiSpellEntry[currentDifficulty])) + if(boss->AddAura(new BossAura(spell, EFFECT_INDEX_0, &pSpell->varData, boss, boss))) + return CAST_OK; + else return CAST_FAIL_OTHER; + break; + + case APPLY_AURA_TARGET: + if (!pTarget) return CAST_FAIL_OTHER; + if (spell = (SpellEntry *)GetSpellStore()->LookupEntry(pSpell->m_uiSpellEntry[currentDifficulty])) + if (pTarget->AddAura(new BossAura(spell, EFFECT_INDEX_0, &pSpell->varData, pTarget, pTarget))) + return CAST_OK; + else return CAST_FAIL_OTHER; + break; + + case SUMMON_NORMAL: + pSummon = _doSummon(m_uiSpellIdx, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000); + if(pSummon) return CAST_OK; + else return CAST_FAIL_OTHER; + break; + + case SUMMON_TEMP: + pSummon = _doSummon(m_uiSpellIdx, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, + urand(pSpell->m_uiSpellTimerMin[currentDifficulty],pSpell->m_uiSpellTimerMax[currentDifficulty])); + if(pSummon) return CAST_OK; + else return CAST_FAIL_OTHER; + break; + + case SUMMON_INSTANT: + pSummon = _doSummon(m_uiSpellIdx, TEMPSUMMON_MANUAL_DESPAWN,0); + if(pSummon) return CAST_OK; + else return CAST_FAIL_OTHER; + break; + + case CAST_ON_ALLPLAYERS: + { + CanCastResult res1 = CAST_FAIL_OTHER; + Map::PlayerList const& pPlayers = pMap->GetPlayers(); + for (Map::PlayerList::const_iterator itr = pPlayers.begin(); itr != pPlayers.end(); ++itr) + { + pTarget = itr->getSource(); + if (pTarget && pTarget->isAlive() && pTarget->IsWithinDistInMap(boss, pSpell->LocData.x)) + if (!pSpell->m_IsBugged) { + res1 = _DoCastSpellIfCan(pTarget, pSpell->m_uiSpellEntry[currentDifficulty]); + } + else { + _BSWDoCast(m_uiSpellIdx, pTarget); + res1 = CAST_OK; + }; + return res1; + } + break; + } + + case CAST_ON_FRENDLY: + pTarget = SelectLowHPFriendly(); + return _BSWCastOnTarget(pTarget, m_uiSpellIdx); + break; + + case CAST_ON_FRENDLY_LOWHP: + pTarget = SelectLowHPFriendly(); + return _BSWCastOnTarget(pTarget, m_uiSpellIdx); + break; + + default: + return CAST_FAIL_OTHER; + break; + }; + return CAST_FAIL_OTHER; +}; + +CanCastResult BossSpellWorker::_BSWCastOnTarget(Unit* pTarget, uint8 m_uiSpellIdx) +{ + if (_bossSpellCount == 0) return CAST_FAIL_OTHER; + if (!pTarget) return CAST_FAIL_OTHER; + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + + debug_log("BSW: Casting (on target) spell number %u type %u",pSpell->m_uiSpellEntry[currentDifficulty], pSpell->m_CastTarget); + + if (pTarget && !pSpell->m_IsBugged) return _DoCastSpellIfCan(pTarget, pSpell->m_uiSpellEntry[currentDifficulty]); + if (pTarget && pSpell->m_IsBugged) return _BSWDoCast(m_uiSpellIdx, pTarget); + + return CAST_FAIL_OTHER; +}; + + + +bool BossSpellWorker::isSummon(uint8 m_uiSpellIdx) +{ + if (_bossSpellCount == 0) return false; + + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + switch (pSpell->m_CastTarget) { + case SUMMON_NORMAL: + case SUMMON_TEMP: + case SUMMON_INSTANT: + return true; + default: return false; + }; +}; + +bool BossSpellWorker::_hasAura(uint8 m_uiSpellIdx, Unit* pTarget) +{ + if (!pTarget) return false; + + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + + return (pTarget->HasAura(pSpell->m_uiSpellEntry[currentDifficulty])); + +}; + +uint8 BossSpellWorker::FindSpellIDX(uint32 SpellID) +{ + if (_bossSpellCount != 0) + for(uint8 i = 0; i < _bossSpellCount; ++i) + if (m_BossSpell[i].m_uiSpellEntry[RAID_DIFFICULTY_10MAN_NORMAL] == SpellID) return i; + + error_log("BSW: spell %u not found in boss %u spelltable. Memory or database error?", SpellID, bossID); + return SPELL_INDEX_ERROR; +} + +Difficulty BossSpellWorker::setDifficulty(uint8 _Difficulty) +{ +switch (_Difficulty) { + case RAID_DIFFICULTY_10MAN_NORMAL: + return RAID_DIFFICULTY_10MAN_NORMAL; + case RAID_DIFFICULTY_25MAN_NORMAL: + return RAID_DIFFICULTY_25MAN_NORMAL; + case RAID_DIFFICULTY_10MAN_HEROIC: + return RAID_DIFFICULTY_10MAN_HEROIC; + case RAID_DIFFICULTY_25MAN_HEROIC: + return RAID_DIFFICULTY_25MAN_HEROIC; + default: + return RAID_DIFFICULTY_10MAN_NORMAL; + }; +} + +BossSpellTableParameters BossSpellWorker::getBSWCastType(uint32 pTemp) +{ + switch (pTemp) { + case 0: return DO_NOTHING; + case 1: return CAST_ON_SELF; + case 2: return CAST_ON_SUMMONS; + case 3: return CAST_ON_VICTIM; + case 4: return CAST_ON_RANDOM; + case 5: return CAST_ON_BOTTOMAGGRO; + case 6: return CAST_ON_TARGET; + case 7: return APPLY_AURA_SELF; + case 8: return APPLY_AURA_TARGET; + case 9: return SUMMON_NORMAL; + case 10: return SUMMON_INSTANT; + case 11: return SUMMON_TEMP; + case 12: return CAST_ON_ALLPLAYERS; + case 13: return CAST_ON_FRENDLY; + case 14: return CAST_ON_FRENDLY_LOWHP; + case 15: return SPELLTABLEPARM_NUMBER; + default: return DO_NOTHING; + }; +}; + +CanCastResult BossSpellWorker::_BSWDoCast(uint8 m_uiSpellIdx, Unit* pTarget) +{ + if (!pTarget) return CAST_FAIL_OTHER; + if (!pTarget->isAlive()) return CAST_FAIL_OTHER; + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + debug_log("BSW: Casting bugged spell number %u type %u",pSpell->m_uiSpellEntry[currentDifficulty], pSpell->m_CastTarget); + pTarget->CastSpell(pTarget, pSpell->m_uiSpellEntry[currentDifficulty], false); + return CAST_OK; +}; + +void BossSpellWorker::_fillEmptyDataField() +{ + for (uint8 i = 0; i < _bossSpellCount; ++i) + for (uint8 j = 1; j < DIFFICULTY_LEVELS; ++j) + { + if (m_BossSpell[i].m_uiSpellEntry[j] == 0) + m_BossSpell[i].m_uiSpellEntry[j] = m_BossSpell[i].m_uiSpellEntry[j-1]; + + if (m_BossSpell[i].m_uiSpellTimerMin[j] == 0) + m_BossSpell[i].m_uiSpellTimerMin[j] = m_BossSpell[i].m_uiSpellTimerMin[j-1]; + + if (m_BossSpell[i].m_uiSpellTimerMax[j] == 0) + m_BossSpell[i].m_uiSpellTimerMax[j] = m_BossSpell[i].m_uiSpellTimerMax[j-1]; + + if (m_BossSpell[i].m_uiSpellData[j] == 0) + m_BossSpell[i].m_uiSpellData[j] = m_BossSpell[i].m_uiSpellData[j-1]; + }; +}; + +Unit* BossSpellWorker::_doSummon(uint8 m_uiSpellIdx, TempSummonType summontype, uint32 delay) +{ + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + + debug_log("BSW: Summoning creature number %u type %u despawn delay %u",pSpell->m_uiSpellEntry[currentDifficulty], pSpell->m_CastTarget, delay); + + if (pSpell->LocData.z <= 1.0f) { + float fPosX, fPosY, fPosZ; + boss->GetPosition(fPosX, fPosY, fPosZ); + boss->GetRandomPoint(fPosX, fPosY, fPosZ, urand((uint32)pSpell->LocData.x, (uint32)pSpell->LocData.y), fPosX, fPosY, fPosZ); + return boss->SummonCreature(pSpell->m_uiSpellEntry[currentDifficulty], fPosX, fPosY, fPosZ, 0, summontype, delay); + } else return boss->SummonCreature(pSpell->m_uiSpellEntry[currentDifficulty], pSpell->LocData.x, pSpell->LocData.y, pSpell->LocData.z, 0, summontype, delay); +}; + +bool BossSpellWorker::_doRemove(uint8 m_uiSpellIdx, Unit* pTarget) +{ + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + + debug_log("BSW: Removing effect of spell %u type %u",pSpell->m_uiSpellEntry[currentDifficulty], pSpell->m_CastTarget); + + switch (pSpell->m_CastTarget) { + case DO_NOTHING: + return true; + case SUMMON_NORMAL: + case SUMMON_TEMP: + case SUMMON_INSTANT: + return false; + + case CAST_ON_SELF: + case APPLY_AURA_SELF: + if (!pTarget) pTarget = boss; + break; + + case CAST_ON_SUMMONS: + case CAST_ON_VICTIM: + case CAST_ON_RANDOM: + case CAST_ON_BOTTOMAGGRO: + case CAST_ON_TARGET: + case APPLY_AURA_TARGET: + if (!pTarget) return false; + break; + + case CAST_ON_ALLPLAYERS: + { + Map::PlayerList const& pPlayers = pMap->GetPlayers(); + for(Map::PlayerList::const_iterator itr = pPlayers.begin(); itr != pPlayers.end(); ++itr) + { + pTarget = itr->getSource(); + if (pTarget && pTarget->isAlive() && pTarget->IsWithinDistInMap(boss, pSpell->LocData.x)) + pTarget->RemoveAurasDueToSpell(pSpell->m_uiSpellEntry[currentDifficulty]); + } + return true; + break; + } + + default: return false; + } + if (pTarget) { + if (pTarget->isAlive()) { + if ( pTarget->HasAura(pSpell->m_uiSpellEntry[currentDifficulty]) && + pTarget->GetAura(pSpell->m_uiSpellEntry[currentDifficulty], EFFECT_INDEX_0)->GetStackAmount() > 1) { + if (pTarget->GetAura(pSpell->m_uiSpellEntry[currentDifficulty], EFFECT_INDEX_0)->modStackAmount(-1)) + return true; + else return false; + } + else pTarget->RemoveAurasDueToSpell(pSpell->m_uiSpellEntry[currentDifficulty]); + } + else pTarget->RemoveAurasDueToSpell(pSpell->m_uiSpellEntry[currentDifficulty]); + } + return true; +}; + +// Copypasting from CreatureAI.cpp. if this called from bossAI-> crashed :( + +CanCastResult BossSpellWorker::_CanCastSpell(Unit* pTarget, const SpellEntry *pSpell, bool isTriggered) +{ + if (!pTarget) return CAST_FAIL_OTHER; + // If not triggered, we check + if (!isTriggered) + { + // State does not allow + if (boss->hasUnitState(UNIT_STAT_CAN_NOT_REACT)) + return CAST_FAIL_STATE; + + if (pSpell->PreventionType == SPELL_PREVENTION_TYPE_SILENCE && boss->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SILENCED)) + return CAST_FAIL_STATE; + + if (pSpell->PreventionType == SPELL_PREVENTION_TYPE_PACIFY && boss->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PACIFIED)) + return CAST_FAIL_STATE; + + // Check for power (also done by Spell::CheckCast()) + if (boss->GetPower((Powers)pSpell->powerType) < pSpell->manaCost) + return CAST_FAIL_POWER; + } + + if (const SpellRangeEntry *pSpellRange = GetSpellRangeStore()->LookupEntry(pSpell->rangeIndex)) + { + if (pTarget != boss) + { + // pTarget is out of range of this spell (also done by Spell::CheckCast()) + float fDistance = boss->GetCombatDistance(pTarget); + + if (fDistance > (boss->IsHostileTo(pTarget) ? pSpellRange->maxRange : pSpellRange->maxRangeFriendly)) + return CAST_FAIL_TOO_FAR; + + float fMinRange = boss->IsHostileTo(pTarget) ? pSpellRange->minRange : pSpellRange->minRangeFriendly; + + if (fMinRange && fDistance < fMinRange) + return CAST_FAIL_TOO_CLOSE; + } + + return CAST_OK; + } + else + return CAST_FAIL_OTHER; +} + +CanCastResult BossSpellWorker::_DoCastSpellIfCan(Unit* pTarget, uint32 uiSpell, uint32 uiCastFlags, uint64 uiOriginalCasterGUID) +{ + Unit* pCaster = boss; + if (!pTarget) return CAST_FAIL_OTHER; + + if (uiCastFlags & CAST_FORCE_TARGET_SELF) + pCaster = pTarget; + + // Allowed to cast only if not casting (unless we interrupt ourself) or if spell is triggered + if (!pCaster->IsNonMeleeSpellCasted(false) || (uiCastFlags & (CAST_TRIGGERED | CAST_INTERRUPT_PREVIOUS))) + { + if (const SpellEntry* pSpell = GetSpellStore()->LookupEntry(uiSpell)) + { + // If cast flag CAST_AURA_NOT_PRESENT is active, check if target already has aura on them + if (uiCastFlags & CAST_AURA_NOT_PRESENT) + { + if (pTarget->HasAura(uiSpell)) + return CAST_FAIL_TARGET_AURA; + } + + // Check if cannot cast spell + if (!(uiCastFlags & (CAST_FORCE_TARGET_SELF | CAST_FORCE_CAST))) + { + CanCastResult castResult = _CanCastSpell(pTarget, pSpell, uiCastFlags & CAST_TRIGGERED); + + if (castResult != CAST_OK) + return castResult; + } + + // Interrupt any previous spell + if (uiCastFlags & CAST_INTERRUPT_PREVIOUS && pCaster->IsNonMeleeSpellCasted(false)) + pCaster->InterruptNonMeleeSpells(false); + + pCaster->CastSpell(pTarget, pSpell, uiCastFlags & CAST_TRIGGERED, NULL, NULL, uiOriginalCasterGUID); + return CAST_OK; + } + else + { + error_log("BSW: DoCastSpellIfCan by creature entry %u attempt to cast spell %u but spell does not exist.", boss->GetEntry(), uiSpell); + return CAST_FAIL_OTHER; + } + } + else + return CAST_FAIL_IS_CASTING; +} + +// Copypasting from sc_creature.cpp :( Hung if call from bossAI-> + +Unit* BossSpellWorker::_SelectUnit(SelectAggroTarget target, uint32 uiPosition) +{ + //ThreatList m_threatlist; + ThreatList const& threatlist = boss->getThreatManager().getThreatList(); + ThreatList::const_iterator itr = threatlist.begin(); + ThreatList::const_reverse_iterator ritr = threatlist.rbegin(); + + if (uiPosition >= threatlist.size() || threatlist.empty()) + return NULL; + + switch (target) + { + case SELECT_TARGET_RANDOM: + advance(itr, uiPosition + (rand() % (threatlist.size() - uiPosition))); + return Unit::GetUnit((*boss),(*itr)->getUnitGuid()); + break; + + case SELECT_TARGET_TOPAGGRO: + advance(itr, uiPosition); + return Unit::GetUnit((*boss),(*itr)->getUnitGuid()); + break; + + case SELECT_TARGET_BOTTOMAGGRO: + advance(ritr, uiPosition); + return Unit::GetUnit((*boss),(*ritr)->getUnitGuid()); + break; + } + + error_log("BSW: Cannot find target for spell :("); + return NULL; +} + +Unit* BossSpellWorker::SelectLowHPFriendly(float fRange, uint32 uiMinHPDiff) +{ + CellPair p(MaNGOS::ComputeCellPair(boss->GetPositionX(), boss->GetPositionY())); + Cell cell(p); + cell.data.Part.reserved = ALL_DISTRICT; + cell.SetNoCreate(); + + Unit* pUnit = NULL; + + MaNGOS::MostHPMissingInRange u_check(boss, fRange, uiMinHPDiff); + MaNGOS::UnitLastSearcher searcher(boss, pUnit, u_check); + + TypeContainerVisitor, GridTypeMapContainer > grid_unit_searcher(searcher); + + cell.Visit(p, grid_unit_searcher, *(pMap), *boss, fRange); + + return pUnit; +} + + +#endif \ No newline at end of file diff --git a/include/sc_boss_spell_worker.h b/include/sc_boss_spell_worker.h new file mode 100644 index 000000000..210969e1a --- /dev/null +++ b/include/sc_boss_spell_worker.h @@ -0,0 +1,226 @@ +/* Copyright (C) 2009 - 2010 by /dev/rsa for ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#include "Player.h" +#include "SpellAuras.h" +#include "Unit.h" +#include "precompiled.h" +#include "Database/DatabaseEnv.h" +#include "../ScriptMgr.h" + +#ifndef DEF_BOSS_SPELL_WORKER_H +#define DEF_BOSS_SPELL_WORKER_H + +enum +{ + DIFFICULTY_LEVELS = 4, + MAX_BOSS_SPELLS = 16, + SPELL_INDEX_ERROR = 255, +}; + +enum BossSpellFlag +{ + CAST_NORMAL, + CAST_REMOVE, + CAST_OVERRIDE, + SPELLFLAG_NUMBER +}; + +enum BossSpellTableParameters +{ + DO_NOTHING = 0, + CAST_ON_SELF = 1, + CAST_ON_SUMMONS = 2, + CAST_ON_VICTIM = 3, + CAST_ON_RANDOM = 4, + CAST_ON_BOTTOMAGGRO = 5, + CAST_ON_TARGET = 6, + APPLY_AURA_SELF = 7, + APPLY_AURA_TARGET = 8, + SUMMON_NORMAL = 9, + SUMMON_INSTANT = 10, + SUMMON_TEMP = 11, + CAST_ON_ALLPLAYERS = 12, + CAST_ON_FRENDLY = 13, + CAST_ON_FRENDLY_LOWHP = 14, + SPELLTABLEPARM_NUMBER +}; + +struct Locations +{ + float x, y, z; + int32 id; +}; + +struct WayPoints +{ + WayPoints(int32 _id, float _x, float _y, float _z) + { + id = _id; + x = _x; + y = _y; + z = _z; + } + int32 id; + float x, y, z; +}; + +struct SpellTable +{ + uint32 id; + uint32 m_uiSpellEntry[DIFFICULTY_LEVELS]; // Stores spell entry for difficulty levels + uint32 m_uiSpellTimerMin[DIFFICULTY_LEVELS]; // The timer (min) before the next spell casting, in milliseconds + uint32 m_uiSpellTimerMax[DIFFICULTY_LEVELS]; // The timer (max) before the next spell casting + uint32 m_uiSpellData[DIFFICULTY_LEVELS]; // Additional data for spell casting or summon + Locations LocData; // Float data structure for locations + int32 varData; // Additional data for spell + uint32 StageMaskN; // Stage mask for this spell (normal) + uint32 StageMaskH; // Stage mask for this spell (heroic) + BossSpellTableParameters m_CastTarget; // Target on casting spell + bool m_IsVisualEffect; // Spellcasting is visual effect or real effect + bool m_IsBugged; // Need override for this spell + int32 textEntry; // Text entry from script_text for this spell +}; + +class MANGOS_DLL_DECL BossAura : public Aura +{ + public: + BossAura(const SpellEntry *spell, SpellEffectIndex effect, int32 *basepoints, Unit *target, Unit *caster) : Aura(spell, effect, basepoints, target, caster) + {} +}; + +class MANGOS_DLL_DECL BossSpellWorker +{ + public: + explicit BossSpellWorker(ScriptedAI* bossAI); + ~BossSpellWorker(); + + Unit* currentTarget; + + void Reset(uint8 _Difficulty = 0); + + void resetTimer(uint32 SpellID) + { + return _resetTimer(FindSpellIDX(SpellID)); + }; + + void resetTimers() + { + for (uint8 i = 0; i < _bossSpellCount; ++i) + _resetTimer(i); + }; + + bool timedQuery(uint32 SpellID, uint32 diff) + { + return _QuerySpellPeriod(FindSpellIDX(SpellID), diff); + }; + + CanCastResult timedCast(uint32 SpellID, uint32 diff, Unit* pTarget = NULL) + { + uint8 m_uiSpellIdx = FindSpellIDX(SpellID); + if (!_QuerySpellPeriod(FindSpellIDX(SpellID), diff)) return CAST_FAIL_STATE; + else return _BSWSpellSelector(m_uiSpellIdx, pTarget); + }; + + CanCastResult doCast(uint32 SpellID, Unit* pTarget = NULL) + { + uint8 m_uiSpellIdx = FindSpellIDX(SpellID); + if ( m_uiSpellIdx != SPELL_INDEX_ERROR) return _BSWSpellSelector(m_uiSpellIdx, pTarget); + else return CAST_FAIL_OTHER; + }; + + CanCastResult doCast(Unit* pTarget, uint32 SpellID) + { + if (!pTarget) return CAST_FAIL_OTHER; + uint8 m_uiSpellIdx = FindSpellIDX(SpellID); + if ( m_uiSpellIdx != SPELL_INDEX_ERROR) return _BSWCastOnTarget(pTarget, m_uiSpellIdx); + else return CAST_FAIL_OTHER; + }; + + bool doRemove(uint32 SpellID, Unit* pTarget = NULL) + { + return _doRemove(FindSpellIDX(SpellID),pTarget); + }; + + bool hasAura(uint32 SpellID, Unit* pTarget = NULL) + { + if (!pTarget) pTarget = boss; + return _hasAura(FindSpellIDX(SpellID),pTarget); + }; + + Unit* doSummon(uint32 SpellID, TempSummonType type = TEMPSUMMON_CORPSE_TIMED_DESPAWN, uint32 delay = 60000) + { + return _doSummon(FindSpellIDX(SpellID), type, delay); + }; + + CanCastResult BSWSpellSelector(uint32 SpellID, Unit* pTarget = NULL) + { + return _BSWSpellSelector(FindSpellIDX(SpellID), pTarget); + }; + + CanCastResult BSWDoCast(uint32 SpellID, Unit* pTarget) + { + return _BSWDoCast(FindSpellIDX(SpellID), pTarget); + }; + + Unit* SelectUnit(SelectAggroTarget target = SELECT_TARGET_RANDOM, uint32 uiPosition = 0) + { + return _SelectUnit(target, uiPosition); + }; + + Unit* SelectLowHPFriendly(float fRange = 40.0f, uint32 uiMinHPDiff = 0); + + uint8 bossSpellCount() + { + return _bossSpellCount; + }; + + private: + + BossSpellTableParameters getBSWCastType(uint32 pTemp); + + uint8 FindSpellIDX(uint32 SpellID); + + void LoadSpellTable(); + + void _resetTimer(uint8 m_uiSpellIdx); + + bool isSummon(uint8 m_uiSpellIdx); + + Unit* _doSummon(uint8 m_uiSpellIdx, TempSummonType type = TEMPSUMMON_CORPSE_TIMED_DESPAWN, uint32 delay = 60000); + + CanCastResult _BSWDoCast(uint8 m_uiSpellIdx, Unit* pTarget); + + CanCastResult _BSWSpellSelector(uint8 m_uiSpellIdx, Unit* pTarget = NULL); + + CanCastResult _BSWCastOnTarget(Unit* pTarget, uint8 m_uiSpellIdx); + + Difficulty setDifficulty(uint8 _Difficulty = 0); + + bool _QuerySpellPeriod(uint8 m_uiSpellIdx, uint32 diff); + + CanCastResult _DoCastSpellIfCan(Unit* pTarget, uint32 uiSpell, uint32 uiCastFlags = 0, uint64 uiOriginalCasterGUID = 0); + + CanCastResult _CanCastSpell(Unit* pTarget, const SpellEntry *pSpell, bool isTriggered = false); + + Unit* _SelectUnit(SelectAggroTarget target, uint32 uiPosition); + + bool _doRemove(uint8 m_uiSpellIdx, Unit* pTarget = NULL); + + bool _hasAura(uint8 m_uiSpellIdx, Unit* pTarget); + + void _fillEmptyDataField(); + +// Constants from CreatureAI() + ScriptedAI* bossAI; + Creature* boss; + uint32 bossID; + uint8 _bossSpellCount; + Difficulty currentDifficulty; + uint32 m_uiSpell_Timer[MAX_BOSS_SPELLS]; + SpellTable m_BossSpell[MAX_BOSS_SPELLS]; + Map* pMap; +}; + +#endif \ No newline at end of file diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp index 55fd5d80a..57ae61e8a 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp @@ -16,41 +16,112 @@ /* ScriptData SDName: boss_anubarak_trial -SD%Complete: 0 -SDComment: +SD%Complete: 70% +SDComment: by /dev/rsa SDCategory: EndScriptData */ +// Anubarak - underground phase partially not worked, timers need correct +// Burrower - underground phase not implemented, buff not worked. +// Leecheng Swarm spell not worked - awaiting core support +// Anubarak spike aura worked only after 9750 + #include "precompiled.h" #include "trial_of_the_crusader.h" +enum Summons +{ + NPC_FROST_SPHERE = 34606, + NPC_BURROWER = 34607, + NPC_SCARAB = 34605, + NPC_SPIKE = 34660, +}; + +enum BossSpells +{ +SPELL_COLD = 66013, +SPELL_MARK = 67574, +SPELL_LEECHING_SWARM = 66118, +SPELL_LEECHING_HEAL = 66125, +SPELL_LEECHING_DAMAGE = 66240, +SPELL_IMPALE = 65920, +SPELL_SPIKE_CALL = 66169, +SPELL_POUND = 66012, +SPELL_SHOUT = 67730, +SPELL_SUBMERGE_0 = 53421, +SPELL_SUBMERGE_1 = 67322, +SPELL_SUMMON_BEATLES = 66339, +SPELL_DETERMINATION = 66092, +SPELL_ACID_MANDIBLE = 67861, +SPELL_SPIDER_FRENZY = 66129, +SPELL_EXPOSE_WEAKNESS = 67847, +SUMMON_SCARAB = NPC_SCARAB, +SUMMON_BORROWER = NPC_BURROWER, +SUMMON_FROSTSPHERE = NPC_FROST_SPHERE, +SPELL_BERSERK = 26662, +SPELL_PERMAFROST = 66193, +}; + struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI { boss_anubarak_trialAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); Reset(); } ScriptedInstance* m_pInstance; + uint8 stage; + bool intro; + BossSpellWorker* bsw; + Unit* pTarget; + + void Reset() { + if(!m_pInstance) return; + stage = 0; + intro = true; + m_creature->SetRespawnDelay(DAY); + pTarget = NULL; + } + - void Reset() {} + void KilledUnit(Unit* pVictim) + { + DoScriptText(-1713563,m_creature); + } + + void MoveInLineOfSight(Unit* pWho) + { + if (!intro) return; + DoScriptText(-1713554,m_creature); + intro = false; + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetInCombatWithZone(); + } void JustReachedHome() { if (m_pInstance) - m_pInstance->SetData(TYPE_ANUBARAK, NOT_STARTED); + m_pInstance->SetData(TYPE_ANUBARAK, FAIL); +// m_creature->ForcedDespawn(); } void JustDied(Unit* pKiller) { - if (m_pInstance) + if (!m_pInstance) return; + DoScriptText(-1713564,m_creature); m_pInstance->SetData(TYPE_ANUBARAK, DONE); } void Aggro(Unit* pWho) { + if (!intro) DoScriptText(-1713555,m_creature); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); m_creature->SetInCombatWithZone(); + m_pInstance->SetData(TYPE_ANUBARAK, IN_PROGRESS); } void UpdateAI(const uint32 uiDiff) @@ -58,6 +129,66 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + switch(stage) + { + case 0: { + bsw->timedCast(SPELL_POUND, uiDiff); + bsw->timedCast(SPELL_COLD, uiDiff); + if (bsw->timedQuery(SUMMON_BORROWER, uiDiff)) { + bsw->doCast(SUMMON_BORROWER); + DoScriptText(-1713556,m_creature); + }; + if (bsw->timedQuery(SPELL_SUBMERGE_0, uiDiff)) stage = 1; + + break;} + case 1: { + bsw->doCast(SPELL_SUBMERGE_0); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + stage = 2; + DoScriptText(-1713557,m_creature); + break;} + case 2: { + if (bsw->timedQuery(SPELL_SPIKE_CALL, uiDiff)) { + pTarget = bsw->SelectUnit(); +// bsw->doCast(SPELL_SPIKE_CALL); +// This summon not supported in database. Temporary override. + Unit* spike = bsw->doSummon(NPC_SPIKE,TEMPSUMMON_TIMED_DESPAWN,60000); + if (spike) { spike->AddThreat(pTarget, 1000.0f); + DoScriptText(-1713558,m_creature,pTarget); + bsw->doCast(SPELL_MARK,pTarget); + spike->GetMotionMaster()->MoveChase(pTarget); + } + }; + if (bsw->timedQuery(SPELL_SUMMON_BEATLES, uiDiff)) { + bsw->doCast(SPELL_SUMMON_BEATLES); + bsw->doCast(SUMMON_SCARAB); + DoScriptText(-1713560,m_creature); + }; + if (bsw->timedQuery(SPELL_SUBMERGE_0, uiDiff)) stage = 3; + break;} + case 3: { + stage = 0; + DoScriptText(-1713559,m_creature); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + bsw->doRemove(SPELL_SUBMERGE_0,m_creature); + break;} + case 4: { + bsw->doCast(SPELL_LEECHING_SWARM); + DoScriptText(-1713561,m_creature); + stage = 5; + break;} + case 5: { + bsw->timedCast(SPELL_POUND, uiDiff); + bsw->timedCast(SPELL_COLD, uiDiff); + break;} + + } + bsw->timedCast(SUMMON_FROSTSPHERE, uiDiff); + + bsw->timedCast(SPELL_BERSERK, uiDiff); + + if (m_creature->GetHealthPercent() < 30.0f && stage == 0) stage = 4; + DoMeleeAttackIfReady(); } }; @@ -67,6 +198,224 @@ CreatureAI* GetAI_boss_anubarak_trial(Creature* pCreature) return new boss_anubarak_trialAI(pCreature); } +struct MANGOS_DLL_DECL mob_swarm_scarabAI : public ScriptedAI +{ + mob_swarm_scarabAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); + Reset(); + } + + ScriptedInstance* m_pInstance; + BossSpellWorker* bsw; + + void Reset() + { + m_creature->SetInCombatWithZone(); + m_creature->SetRespawnDelay(DAY); + } + + void KilledUnit(Unit* pVictim) + { + if (pVictim->GetTypeId() != TYPEID_PLAYER) return; + } + + void JustDied(Unit* Killer) + { + } + + void Aggro(Unit *who) + { + if (!m_pInstance) return; + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_pInstance && m_pInstance->GetData(TYPE_ANUBARAK) != IN_PROGRESS) + m_creature->ForcedDespawn(); + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + bsw->timedCast(SPELL_DETERMINATION, uiDiff); + + bsw->timedCast(SPELL_ACID_MANDIBLE, uiDiff); + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_swarm_scarab(Creature* pCreature) +{ + return new mob_swarm_scarabAI(pCreature); +}; + +struct MANGOS_DLL_DECL mob_nerubian_borrowerAI : public ScriptedAI +{ + mob_nerubian_borrowerAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool submerged; + BossSpellWorker* bsw; + Unit* currentTarget; + + void Reset() + { + m_creature->SetInCombatWithZone(); + m_creature->SetRespawnDelay(DAY); + submerged = false; + currentTarget = NULL; + } + + void KilledUnit(Unit* pVictim) + { + if (pVictim->GetTypeId() != TYPEID_PLAYER) return; + } + + void JustDied(Unit* Killer) + { + } + + void Aggro(Unit *who) + { + if (!m_pInstance) return; + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_pInstance && m_pInstance->GetData(TYPE_ANUBARAK) != IN_PROGRESS) + m_creature->ForcedDespawn(); + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + bsw->timedCast(SPELL_EXPOSE_WEAKNESS, uiDiff); + + if (bsw->timedQuery(SPELL_SPIDER_FRENZY, uiDiff)) + if(Creature* pTemp = GetClosestCreatureWithEntry(m_creature, NPC_BURROWER, 50.0f)) + { + currentTarget = pTemp; + bsw->doCast(SPELL_SPIDER_FRENZY); + }; + + if (m_creature->GetHealthPercent() < 20.0f && bsw->timedQuery(SPELL_SUBMERGE_1, uiDiff) && !submerged) + { + bsw->doCast(SPELL_SUBMERGE_1); + submerged = true; + DoScriptText(-1713557,m_creature); + }; + + if (m_creature->GetHealthPercent() > 50.0f && submerged) + { + bsw->doRemove(SPELL_SUBMERGE_1,m_creature); + submerged = false; + DoScriptText(-1713559,m_creature); + }; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_nerubian_borrower(Creature* pCreature) +{ + return new mob_nerubian_borrowerAI(pCreature); +}; + +struct MANGOS_DLL_DECL mob_frost_sphereAI : public ScriptedAI +{ + mob_frost_sphereAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); + Reset(); + } + + ScriptedInstance* m_pInstance; + BossSpellWorker* bsw; + + void Reset() + { + m_creature->SetRespawnDelay(DAY); + m_creature->SetSpeedRate(MOVE_RUN, 0.1f); + m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); + m_creature->GetMotionMaster()->MoveRandom(); + } + + void EnterCombat(Unit* attacker) + { + bsw->doCast(SPELL_PERMAFROST); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_pInstance || m_pInstance->GetData(TYPE_ANUBARAK) != IN_PROGRESS) + m_creature->ForcedDespawn(); + } +}; + +CreatureAI* GetAI_mob_frost_sphere(Creature* pCreature) +{ + return new mob_frost_sphereAI(pCreature); +}; + +struct MANGOS_DLL_DECL mob_anubarak_spikeAI : public ScriptedAI +{ + mob_anubarak_spikeAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); + Reset(); + } + + ScriptedInstance* m_pInstance; + BossSpellWorker* bsw; + Unit* defaultTarget; + + void Reset() + { + m_creature->SetRespawnDelay(DAY); + m_creature->SetSpeedRate(MOVE_RUN, 0.5f); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + defaultTarget = NULL; + } + + void Aggro(Unit *who) + { + if (!m_pInstance) return; + bsw->doCast(SPELL_IMPALE); + defaultTarget = who; + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_pInstance && m_pInstance->GetData(TYPE_ANUBARAK) != IN_PROGRESS) + m_creature->ForcedDespawn(); + if (defaultTarget) + if (!defaultTarget->isAlive() || !bsw->hasAura(SPELL_MARK,defaultTarget)) + m_creature->ForcedDespawn(); + +/* if (bsw->timedQuery(SPELL_IMPALE,uiDiff)) { + if (m_creature->IsWithinDist(m_creature->getVictim(), 4.0f) + && !bsw->hasAura(SPELL_PERMAFROST,m_creature->getVictim())) + { + bsw->doCast(SPELL_IMPALE); + } else bsw->doRemove(SPELL_IMPALE); + }*/ + } +}; + +CreatureAI* GetAI_mob_anubarak_spike(Creature* pCreature) +{ + return new mob_anubarak_spikeAI(pCreature); +}; + void AddSC_boss_anubarak_trial() { Script* newscript; @@ -75,4 +424,25 @@ void AddSC_boss_anubarak_trial() newscript->Name = "boss_anubarak_trial"; newscript->GetAI = &GetAI_boss_anubarak_trial; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_swarm_scarab"; + newscript->GetAI = &GetAI_mob_swarm_scarab; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_nerubian_borrower"; + newscript->GetAI = &GetAI_mob_nerubian_borrower; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_anubarak_spike"; + newscript->GetAI = &GetAI_mob_anubarak_spike; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_frost_sphere"; + newscript->GetAI = &GetAI_mob_frost_sphere; + newscript->RegisterSelf(); + } \ No newline at end of file diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp index bb9d39ec5..4e256380e 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 +/* Copyright (C) 2006 - 2009 ScriptDev2 * 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 @@ -11,15 +11,1093 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* ScriptData SDName: faction_champions -SD%Complete: 0 -SDComment: +SD%Complete: 60% +SDComment: Scripts by Selector, modified by /dev/rsa SDCategory: Crusader Coliseum EndScriptData */ #include "precompiled.h" #include "trial_of_the_crusader.h" + +#define AI_MELEE 0 +#define AI_RANGED 1 +#define AI_HEALER 2 + +#define SPELL_ANTI_AOE 68595 +#define SPELL_PVP_TRINKET 65547 + +struct MANGOS_DLL_DECL boss_faction_championsAI : public ScriptedAI +{ + boss_faction_championsAI(Creature* pCreature, uint32 aitype) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance *) pCreature->GetInstanceData(); + mAIType = aitype; + bsw = new BossSpellWorker(this); + Init(); + } + + ScriptedInstance* m_pInstance; + BossSpellWorker* bsw; + + uint32 mAIType; + uint32 ThreatTimer; + uint32 CCTimer; + + void Init() + { + CCTimer = rand()%10000; + ThreatTimer = 5000; + bsw->resetTimers(); + m_creature->SetInCombatWithZone(); + m_creature->SetRespawnDelay(DAY); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_CRUSADERS, FAIL); + m_creature->ForcedDespawn(); + } + + float CalculateThreat(float distance, float armor, uint32 health) + { + float dist_mod = (mAIType == AI_MELEE) ? 15.0f/(15.0f + distance) : 1.0f; + float armor_mod = (mAIType == AI_MELEE) ? armor / 16635.0f : 0.0f; + float eh = (health+1) * (1.0f + armor_mod); + return dist_mod * 30000.0f / eh; + } + + void UpdateThreat() + { + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + ThreatList::const_iterator itr; + bool empty = true; + for(itr = tList.begin(); itr!=tList.end(); ++itr) + { + Unit* pUnit = Unit::GetUnit((*m_creature), (*itr)->getUnitGuid()); + if (pUnit && m_creature->getThreatManager().getThreat(pUnit)) + { + if(pUnit->GetTypeId()==TYPEID_PLAYER) + { + float threat = CalculateThreat(m_creature->GetDistance2d(pUnit), (float)pUnit->GetArmor(), pUnit->GetHealth()); + m_creature->getThreatManager().modifyThreatPercent(pUnit, -100); + m_creature->AddThreat(pUnit, 1000000.0f * threat); + empty = false; + } + } + } + } + + void UpdatePower() + { + if(m_creature->getPowerType() == POWER_MANA) + m_creature->ModifyPower(POWER_MANA, m_creature->GetMaxPower(POWER_MANA) / 3); + //else if(m_creature->getPowerType() == POWER_ENERGY) + // m_creature->ModifyPower(POWER_ENERGY, 100); + } + + void RemoveCC() + { + m_creature->RemoveSpellsCausingAura(SPELL_AURA_MOD_STUN); + m_creature->RemoveSpellsCausingAura(SPELL_AURA_MOD_FEAR); + m_creature->RemoveSpellsCausingAura(SPELL_AURA_MOD_ROOT); + m_creature->RemoveSpellsCausingAura(SPELL_AURA_MOD_PACIFY); + m_creature->RemoveSpellsCausingAura(SPELL_AURA_MOD_CONFUSE); + //DoCast(m_creature, SPELL_PVP_TRINKET); + } + + void JustDied(Unit *killer) + { + if(m_pInstance) m_pInstance->SetData(TYPE_CRUSADERS_COUNT, 0); + } + + void Aggro(Unit *who) + { + DoCast(m_creature, SPELL_ANTI_AOE, true); + if(m_pInstance) m_pInstance->SetData(TYPE_CRUSADERS, IN_PROGRESS); + } + + void Reset() + { + if(m_pInstance) m_pInstance->SetData(TYPE_CRUSADERS, NOT_STARTED); + } + + Creature* SelectRandomFriendlyMissingBuff(uint32 spell) + { + std::list lst = DoFindFriendlyMissingBuff(40.0f, spell); + std::list::const_iterator itr = lst.begin(); + if(lst.empty()) + return NULL; + advance(itr, rand()%lst.size()); + return (*itr); + } + + Unit* SelectEnemyCaster(bool casting) + { + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + ThreatList::const_iterator iter; + for(iter = tList.begin(); iter!=tList.end(); ++iter) + { + Unit *target; + if(target = Unit::GetUnit((*m_creature),(*iter)->getUnitGuid())) + if(target->getPowerType() == POWER_MANA) + return target; + } + return NULL; + } + + uint32 EnemiesInRange(float distance) + { + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + ThreatList::const_iterator iter; + uint32 count = 0; + for(iter = tList.begin(); iter!=tList.end(); ++iter) + { + Unit *target; + if(target = Unit::GetUnit((*m_creature),(*iter)->getUnitGuid())) + if(m_creature->GetDistance2d(target) < distance) + ++count; + } + return count; + } + + void AttackStart(Unit* pWho) + { + if (!pWho) return; + + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + + if(mAIType==AI_MELEE) + DoStartMovement(pWho); + else + DoStartMovement(pWho, 20.0f); + + SetCombatMovement(true); + + } + } + + void UpdateAI(const uint32 diff) + { + if(ThreatTimer < diff) + { + UpdatePower(); + UpdateThreat(); + ThreatTimer = 4000; + } + else ThreatTimer -= diff; + + if(CCTimer < diff) + { + RemoveCC(); + CCTimer = 8000+rand()%2000; + } + else CCTimer -= diff; + + if(mAIType == AI_MELEE) DoMeleeAttackIfReady(); + } +}; + +/******************************************************************** + HEALERS +********************************************************************/ + +#define SPELL_LIFEBLOOM 66093 +#define SPELL_NOURISH 66066 +#define SPELL_REGROWTH 66067 +#define SPELL_REJUVENATION 66065 +#define SPELL_TRANQUILITY 66086 +#define SPELL_BARKSKIN 65860 //1 min cd +#define SPELL_THORNS 66068 +#define SPELL_NATURE_GRASP 66071 //1 min cd, self buff + +struct MANGOS_DLL_DECL mob_toc_druidAI : public boss_faction_championsAI +{ + mob_toc_druidAI(Creature* pCreature) : boss_faction_championsAI(pCreature, AI_HEALER) {Init();} + + void Init() + { + SetEquipmentSlots(false, 51799, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE); + } + + void UpdateAI(const uint32 diff) + { + if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + + bsw->timedCast(SPELL_NATURE_GRASP, diff); + + bsw->timedCast(SPELL_TRANQUILITY, diff); + + if(bsw->timedQuery(SPELL_BARKSKIN, diff)) + if(m_creature->GetHealthPercent() < 50.0f) + bsw->doCast(SPELL_BARKSKIN); + + if(bsw->timedQuery(SPELL_LIFEBLOOM, diff)) + switch(urand(0,4)) + { + case 0: + bsw->doCast(SPELL_LIFEBLOOM); + break; + case 1: + bsw->doCast(SPELL_NOURISH); + break; + case 2: + bsw->doCast(SPELL_REGROWTH); + break; + case 3: + bsw->doCast(SPELL_REJUVENATION); + break; + case 4: + if(Creature* target = SelectRandomFriendlyMissingBuff(SPELL_THORNS)) + bsw->doCast(SPELL_THORNS, target); + break; + } + + boss_faction_championsAI::UpdateAI(diff); + } +}; + +#define SPELL_HEALING_WAVE 66055 +#define SPELL_RIPTIDE 66053 +#define SPELL_SPIRIT_CLEANSE 66056 //friendly only +#define SPELL_HEROISM 65983 +#define SPELL_BLOODLUST 65980 +#define SPELL_HEX 66054 +#define SPELL_EARTH_SHIELD 66063 +#define SPELL_EARTH_SHOCK 65973 + +struct MANGOS_DLL_DECL mob_toc_shamanAI : public boss_faction_championsAI +{ + mob_toc_shamanAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_HEALER) {Init();} + + void Init() + { + SetEquipmentSlots(false, 49992, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE); + } + + void UpdateAI(const uint32 diff) + { + if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + + bsw->timedCast(SPELL_HEROISM, diff); + + bsw->timedCast(SPELL_HEX, diff); + + if(bsw->timedQuery(SPELL_HEALING_WAVE, diff)) + { + switch(urand(0,5)) + { + case 0: case 1: + bsw->doCast(SPELL_HEALING_WAVE); + break; + case 2: + bsw->doCast(SPELL_RIPTIDE); + break; + case 3: + bsw->doCast(SPELL_EARTH_SHOCK); + break; + case 4: + bsw->doCast(SPELL_SPIRIT_CLEANSE); + break; + case 5: + if(Unit *target = SelectRandomFriendlyMissingBuff(SPELL_EARTH_SHIELD)) + bsw->doCast(target, SPELL_EARTH_SHIELD); + break; + } + } + + boss_faction_championsAI::UpdateAI(diff); + } +}; + +#define SPELL_HAND_OF_FREEDOM 68757 //25 sec cd +#define SPELL_BUBBLE 66010 //5 min cd +#define SPELL_CLEANSE 66116 +#define SPELL_FLASH_OF_LIGHT 66113 +#define SPELL_HOLY_LIGHT 66112 +#define SPELL_HOLY_SHOCK 66114 +#define SPELL_HAND_OF_PROTECTION 66009 +#define SPELL_HAMMER_OF_JUSTICE 66613 + +struct MANGOS_DLL_DECL mob_toc_paladinAI : public boss_faction_championsAI +{ + mob_toc_paladinAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_HEALER) {Init();} + + void Init() + { + SetEquipmentSlots(false, 50771, 47079, EQUIP_NO_CHANGE); + } + + void UpdateAI(const uint32 diff) + { + if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + + //cast bubble at 20% hp + if(m_creature->GetHealthPercent() < 20.0f) + bsw->timedCast(SPELL_BUBBLE, diff); + + if(Unit *target = DoSelectLowestHpFriendly(40.0f)) + if(target->GetHealthPercent() < 15.0f) + bsw->timedCast(SPELL_HAND_OF_PROTECTION, diff); + + bsw->timedCast(SPELL_HOLY_SHOCK, diff); + + if(Unit *target = SelectRandomFriendlyMissingBuff(SPELL_HAND_OF_FREEDOM)) + bsw->timedCast(SPELL_HAND_OF_FREEDOM, diff, target); + + bsw->timedCast(SPELL_HAMMER_OF_JUSTICE, diff); + + if(bsw->timedQuery(SPELL_FLASH_OF_LIGHT, diff)) + { + switch(urand(0,4)) + { + case 0: case 1: + bsw->doCast(SPELL_FLASH_OF_LIGHT); + break; + case 2: case 3: + bsw->doCast(SPELL_HOLY_LIGHT); + break; + case 4: + bsw->doCast(SPELL_CLEANSE); + break; + } + } + + boss_faction_championsAI::UpdateAI(diff); + } +}; + +#define SPELL_RENEW 66177 +#define SPELL_SHIELD 66099 +#define SPELL_FLASH_HEAL 66104 +#define SPELL_DISPEL 65546 +#define SPELL_PSYCHIC_SCREAM 65543 +#define SPELL_MANA_BURN 66100 + +struct MANGOS_DLL_DECL mob_toc_priestAI : public boss_faction_championsAI +{ + mob_toc_priestAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_HEALER) {Init();} + + void Init() + { + SetEquipmentSlots(false, 49992, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE); + } + + void UpdateAI(const uint32 diff) + { + if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + + if(EnemiesInRange(10.0f) > 2) + bsw->timedCast(SPELL_PSYCHIC_SCREAM, diff); + + if(bsw->timedQuery(SPELL_RENEW, diff)) + { + switch(urand(0,5)) + { + case 0: + bsw->doCast(SPELL_RENEW); + break; + case 1: + bsw->doCast(SPELL_SHIELD); + break; + case 2: case 3: + bsw->doCast(SPELL_FLASH_HEAL); + break; + case 4: + if(Unit *target = urand(0,1) ? SelectUnit(SELECT_TARGET_RANDOM,0) : DoSelectLowestHpFriendly(40.0f)) + bsw->doCast(target, SPELL_DISPEL); + break; + case 5: + bsw->doCast(SPELL_MANA_BURN); + break; + } + } + + boss_faction_championsAI::UpdateAI(diff); + } +}; + +/******************************************************************** + RANGED +********************************************************************/ + +#define SPELL_SILENCE 65542 +#define SPELL_VAMPIRIC_TOUCH 65490 +#define SPELL_SW_PAIN 65541 +#define SPELL_MIND_FLAY 65488 +#define SPELL_MIND_BLAST 65492 +#define SPELL_HORROR 65545 +#define SPELL_DISPERSION 65544 +#define SPELL_SHADOWFORM 16592 + +struct MANGOS_DLL_DECL mob_toc_shadow_priestAI : public boss_faction_championsAI +{ + mob_toc_shadow_priestAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_RANGED) {Init();} + + void Init() + { + SetEquipmentSlots(false, 50040, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE); + } + + void Aggro(Unit *who) + { + boss_faction_championsAI::Aggro(who); + bsw->doCast(SPELL_SHADOWFORM); + } + + void UpdateAI(const uint32 diff) + { + if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + + if(EnemiesInRange(10.0f) > 2) + bsw->timedCast(SPELL_PSYCHIC_SCREAM, diff); + + if(m_creature->GetHealthPercent() < 20.0f) + bsw->timedCast(SPELL_DISPERSION, diff); + + if(Unit *target = SelectEnemyCaster(false)) + bsw->timedCast(SPELL_SILENCE, diff, target); + + bsw->timedCast(SPELL_MIND_BLAST, diff); + + if(bsw->timedQuery(SPELL_MIND_FLAY, diff)) + { + switch(urand(0,4)) + { + case 0: case 1: + bsw->doCast(SPELL_MIND_FLAY); + break; + case 2: + bsw->doCast(SPELL_VAMPIRIC_TOUCH); + break; + case 3: + bsw->doCast(SPELL_SW_PAIN); + break; + case 4: + bsw->doCast(SPELL_DISPEL); + break; + } + } + boss_faction_championsAI::UpdateAI(diff); + } +}; + +#define SPELL_HELLFIRE 65816 +#define SPELL_CORRUPTION 65810 +#define SPELL_Curse_of_Agony 65814 +#define SPELL_Curse_of_Exhaustion 65815 +#define SPELL_Fear 65809 //8s +#define SPELL_Searing_Pain 65819 +#define SPELL_Shadow_Bolt 65821 +#define SPELL_Unstable_Affliction 65812 +#define H_SPELL_Unstable_Affliction 68155 //15s + +struct MANGOS_DLL_DECL mob_toc_warlockAI : public boss_faction_championsAI +{ + mob_toc_warlockAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_RANGED) {Init();} + + void Init() + { + SetEquipmentSlots(false, 49992, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE); + } + + void UpdateAI(const uint32 diff) + { + if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + + bsw->timedCast(SPELL_Fear, diff); + + if(EnemiesInRange(10.0f) > 2) + bsw->timedCast(SPELL_HELLFIRE, diff); + + bsw->timedCast(SPELL_Unstable_Affliction, diff); + + if(bsw->timedQuery(SPELL_Shadow_Bolt, diff)) + { + switch(urand(0,5)) + { + case 0: + bsw->doCast(SPELL_Searing_Pain); + break; + case 1: case 2: + bsw->doCast(SPELL_Shadow_Bolt); + break; + case 3: + bsw->doCast(SPELL_CORRUPTION); + break; + case 4: + bsw->doCast(SPELL_Curse_of_Agony); + break; + case 5: + bsw->doCast(SPELL_Curse_of_Exhaustion); + break; + } + } + boss_faction_championsAI::UpdateAI(diff); + } +}; + +#define SPELL_Arcane_Barrage 65799 //3s +#define SPELL_Arcane_Blast 65791 +#define SPELL_Arcane_Explosion 65800 +#define SPELL_Blink 65793 //15s +#define SPELL_Counterspell 65790 //24s +#define SPELL_Frost_Nova 65792 //25s +#define SPELL_Frostbolt 65807 +#define SPELL_Ice_Block 65802 //5min +#define SPELL_Polymorph 65801 //15s + +struct MANGOS_DLL_DECL mob_toc_mageAI : public boss_faction_championsAI +{ + mob_toc_mageAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_RANGED) {Init();} + + void Init() + { + SetEquipmentSlots(false, 47524, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE); + } + + void UpdateAI(const uint32 diff) + { + if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + + if(Unit *target = SelectEnemyCaster(false)) + bsw->timedCast(SPELL_Counterspell, diff, target); + + if(m_creature->GetHealthPercent() < 50.0f + && EnemiesInRange(10.0f)>3 ) + { + bsw->timedCast(SPELL_Frost_Nova, diff); + bsw->timedCast(SPELL_Blink, diff); + } + + if(m_creature->GetHealthPercent() < 20.0f) + bsw->timedCast(SPELL_Ice_Block, diff); + + bsw->timedCast(SPELL_Polymorph, diff); + + if(bsw->timedQuery(SPELL_Arcane_Barrage, diff)) + { + switch(urand(0,2)) + { + case 0: + bsw->doCast(SPELL_Arcane_Barrage); + break; + case 1: + bsw->doCast(SPELL_Arcane_Blast); + break; + case 2: + bsw->doCast(SPELL_Frostbolt); + break; + } + } + boss_faction_championsAI::UpdateAI(diff); + } +}; + + +#define SPELL_AIMED_SHOT 65883 +#define SPELL_Deterrence 65871 //90s +#define SPELL_Disengage 65869 //30s +#define SPELL_EXPLOSIVE_SHOT 65866 +#define SPELL_Frost_Trap 65880 //30s +#define SPELL_SHOOT 65868 //1.7s +#define SPELL_Steady_Shot 65867 //3s +#define SPELL_WING_CLIP 66207 //6s +#define SPELL_Wyvern_Sting 65877 //60s + +struct MANGOS_DLL_DECL mob_toc_hunterAI : public boss_faction_championsAI +{ + mob_toc_hunterAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_RANGED) {Init();} + + void Init() + { + SetEquipmentSlots(false, 47156, EQUIP_NO_CHANGE, 48711); + } + + void UpdateAI(const uint32 diff) + { + if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + + if(EnemiesInRange(10.0f) > 3) + bsw->timedCast(SPELL_Disengage, diff); + + if(m_creature->GetHealthPercent() < 20.0f) + bsw->timedCast(SPELL_Deterrence, diff); + + bsw->timedCast(SPELL_Wyvern_Sting, diff); + + bsw->timedCast(SPELL_Frost_Trap, diff ); + + if(m_creature->GetDistance2d(m_creature->getVictim()) < 5.0f) + bsw->timedCast(SPELL_WING_CLIP, diff); + + if(bsw->timedQuery(SPELL_SHOOT, diff)) + { + switch(urand(0,3)) + { + case 0: case 1: + bsw->doCast(SPELL_SHOOT); + break; + case 2: + bsw->doCast(SPELL_EXPLOSIVE_SHOT); + break; + case 3: + bsw->doCast(SPELL_AIMED_SHOT); + break; + } + } + boss_faction_championsAI::UpdateAI(diff); + } +}; + +#define SPELL_Cyclone 65859 //6s +#define SPELL_Entangling_Roots 65857 //10s +#define SPELL_Faerie_Fire 65863 +#define SPELL_Force_of_Nature 65861 //180s +#define SPELL_Insect_Swarm 65855 +#define SPELL_Moonfire 65856 //5s +#define SPELL_Starfire 65854 +#define SPELL_Wrath 65862 + +struct MANGOS_DLL_DECL mob_toc_boomkinAI : public boss_faction_championsAI +{ + mob_toc_boomkinAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_RANGED) {Init();} + + void Init() + { + SetEquipmentSlots(false, 50966, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE); + } + + void UpdateAI(const uint32 diff) + { + if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + + if(m_creature->GetHealthPercent() < 50.0f) + bsw->timedCast(SPELL_BARKSKIN, diff); + + bsw->timedCast(SPELL_Cyclone, diff); + + bsw->timedCast(SPELL_Entangling_Roots, diff); + + bsw->timedCast(SPELL_Faerie_Fire, diff); + + if(bsw->timedQuery(SPELL_Moonfire, diff)) + { + switch(urand(0,6)) + { + case 0: case 1: + bsw->doCast(SPELL_Moonfire); + break; + case 2: + bsw->doCast(SPELL_Insect_Swarm); + break; + case 3: + bsw->doCast(SPELL_Starfire); + break; + case 4: case 5: case 6: + bsw->doCast(SPELL_Wrath); + break; + } + } + boss_faction_championsAI::UpdateAI(diff); + } +}; + +/******************************************************************** + MELEE +********************************************************************/ + +#define SPELL_BLADESTORM 65947 +#define SPELL_INTIMIDATING_SHOUT 65930 +#define SPELL_MORTAL_STRIKE 65926 +#define SPELL_CHARGE 68764 +#define SPELL_DISARM 65935 +#define SPELL_OVERPOWER 65924 +#define SPELL_SUNDER_ARMOR 65936 +#define SPELL_SHATTERING_THROW 65940 +#define SPELL_RETALIATION 65932 + +struct MANGOS_DLL_DECL mob_toc_warriorAI : public boss_faction_championsAI +{ + mob_toc_warriorAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_MELEE) {Init();} + + void Init() + { + SetEquipmentSlots(false, 47427, 46964, EQUIP_NO_CHANGE); + } + + void UpdateAI(const uint32 diff) + { + if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + + bsw->timedCast(SPELL_BLADESTORM, diff); + + bsw->timedCast(SPELL_INTIMIDATING_SHOUT, diff); + + bsw->timedCast(SPELL_MORTAL_STRIKE, diff); + + bsw->timedCast(SPELL_SUNDER_ARMOR, diff); + + bsw->timedCast(SPELL_CHARGE, diff); + + bsw->timedCast(SPELL_RETALIATION, diff); + + bsw->timedCast(SPELL_OVERPOWER, diff); + + bsw->timedCast(SPELL_SHATTERING_THROW, diff); + + bsw->timedCast(SPELL_DISARM, diff); + + boss_faction_championsAI::UpdateAI(diff); + } +}; + +#define SPELL_Chains_of_Ice 66020 //8sec +#define SPELL_Death_Coil 66019 //5sec +#define SPELL_Death_Grip 66017 //35sec +#define SPELL_Frost_Strike 66047 //6sec +#define SPELL_Icebound_Fortitude 66023 //1min +#define SPELL_Icy_Touch 66021 //8sec +#define SPELL_Strangulate 66018 //2min + +struct MANGOS_DLL_DECL mob_toc_dkAI : public boss_faction_championsAI +{ + mob_toc_dkAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_MELEE) {Init();} + + void Init() + { + SetEquipmentSlots(false, 47518, 51021, EQUIP_NO_CHANGE); + } + + void UpdateAI(const uint32 diff) + { + if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + + if(m_creature->GetHealthPercent() < 50.0f) + bsw->timedCast(SPELL_Icebound_Fortitude, diff); + + bsw->timedCast(SPELL_Chains_of_Ice, diff); + + bsw->timedCast(SPELL_Death_Coil, diff); + + if(Unit *target = SelectEnemyCaster(false)) + bsw->timedCast(SPELL_Strangulate, diff, target); + + bsw->timedCast(SPELL_Frost_Strike, diff); + + bsw->timedCast(SPELL_Icy_Touch, diff); + + if(m_creature->IsInRange(m_creature->getVictim(), 10.0f, 30.0f, false)) + bsw->timedCast(SPELL_Death_Grip, diff); + + boss_faction_championsAI::UpdateAI(diff); + } +}; + +#define SPELL_FAN_OF_KNIVES 65955 //2sec +#define SPELL_BLIND 65960 //2min +#define SPELL_CLOAK 65961 //90sec +#define SPELL_Blade_Flurry 65956 //2min +#define SPELL_SHADOWSTEP 66178 //30sec +#define SPELL_HEMORRHAGE 65954 +#define SPELL_EVISCERATE 65957 + +struct MANGOS_DLL_DECL mob_toc_rogueAI : public boss_faction_championsAI +{ + mob_toc_rogueAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_MELEE) {Init();} + + void Init() + { + SetEquipmentSlots(false, 47422, 49982, EQUIP_NO_CHANGE); + } + + void UpdateAI(const uint32 diff) + { + if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + + if(EnemiesInRange(15.0f) > 2) + bsw->timedCast(SPELL_FAN_OF_KNIVES, diff); + + bsw->timedCast(SPELL_HEMORRHAGE, diff); + + bsw->timedCast(SPELL_EVISCERATE, diff); + + if(m_creature->IsInRange(m_creature->getVictim(), 10.0f, 40.0f)) + bsw->timedCast(SPELL_SHADOWSTEP, diff); + + if(Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1)) + if(m_creature->IsInRange(target, 0.0f, 15.0f, false)) + bsw->timedCast(SPELL_BLIND, diff, target); + + if(m_creature->GetHealthPercent() < 50.0f) + bsw->timedCast(SPELL_CLOAK, diff); + + bsw->timedCast(SPELL_Blade_Flurry, diff); + + boss_faction_championsAI::UpdateAI(diff); + } +}; + +#define SPELL_EARTH_SHOCK 65973 +#define SPELL_LAVA_LASH 65974 +#define SPELL_STORMSTRIKE 65970 + +struct MANGOS_DLL_DECL mob_toc_enh_shamanAI : public boss_faction_championsAI +{ + mob_toc_enh_shamanAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_MELEE) {Init();} + + void Init() + { + SetEquipmentSlots(false, 51803, 48013, EQUIP_NO_CHANGE); + } + + void UpdateAI(const uint32 diff) + { + if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + + bsw->timedCast(SPELL_HEROISM, diff); + + bsw->timedCast(SPELL_EARTH_SHOCK, diff); + + bsw->timedCast(SPELL_STORMSTRIKE, diff); + + bsw->timedCast(SPELL_LAVA_LASH, diff); + + boss_faction_championsAI::UpdateAI(diff); + } +}; + +#define SPELL_Avenging_Wrath 66011 //3min cd +#define SPELL_Crusader_Strike 66003 //6sec cd +#define SPELL_Divine_Shield 66010 //5min cd +#define SPELL_Divine_Storm 66006 //10sec cd +#define SPELL_Hammer_of_Justice 66007 //40sec cd +#define SPELL_Hand_of_Protection 66009 //5min cd +#define SPELL_Judgement_of_Command 66005 //8sec cd +#define SPELL_REPENTANCE 66008 //60sec cd +#define SPELL_Seal_of_Command 66004 //no cd + +struct MANGOS_DLL_DECL mob_toc_retro_paladinAI : public boss_faction_championsAI +{ + mob_toc_retro_paladinAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_MELEE) {Init();} + + void Init() + { + SetEquipmentSlots(false, 47519, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE); + } + + void Aggro(Unit *who) + { + boss_faction_championsAI::Aggro(who); + bsw->doCast(SPELL_Seal_of_Command); + } + + void UpdateAI(const uint32 diff) + { + if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + + bsw->timedCast(SPELL_REPENTANCE, diff); + + bsw->timedCast(SPELL_Crusader_Strike, diff); + + bsw->timedCast(SPELL_Avenging_Wrath, diff); + + if(m_creature->GetHealthPercent() < 20.0f) + bsw->timedCast(SPELL_Divine_Shield, diff); + + bsw->timedCast(SPELL_Divine_Storm, diff); + + bsw->timedCast(SPELL_Judgement_of_Command, diff); + + boss_faction_championsAI::UpdateAI(diff); + } +}; + +#define SPELL_WPET0 67518 +#define SPELL_WPET1 67519 + +struct MANGOS_DLL_DECL mob_toc_pet_warlockAI : public boss_faction_championsAI +{ + mob_toc_pet_warlockAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_MELEE) {Init();} + + void Aggro(Unit *who) + { + boss_faction_championsAI::Aggro(who); + } + + void UpdateAI(const uint32 diff) + { + if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + + bsw->timedCast(SPELL_WPET0, diff); + + bsw->timedCast(SPELL_WPET1, diff); + + boss_faction_championsAI::UpdateAI(diff); + } +}; + +#define SPELL_HPET0 67793 +struct MANGOS_DLL_DECL mob_toc_pet_hunterAI : public boss_faction_championsAI +{ + mob_toc_pet_hunterAI(Creature *pCreature) : boss_faction_championsAI(pCreature, AI_MELEE) {Init();} + + void Aggro(Unit *who) + { + boss_faction_championsAI::Aggro(who); + } + + void UpdateAI(const uint32 diff) + { + if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + + bsw->timedCast(SPELL_HPET0, diff); + + boss_faction_championsAI::UpdateAI(diff); + } +}; + + +/*========================================================*/ +CreatureAI* GetAI_mob_toc_druid(Creature *pCreature) { + return new mob_toc_druidAI (pCreature); +} +CreatureAI* GetAI_mob_toc_shaman(Creature *pCreature) { + return new mob_toc_shamanAI (pCreature); +} +CreatureAI* GetAI_mob_toc_paladin(Creature *pCreature) { + return new mob_toc_paladinAI (pCreature); +} +CreatureAI* GetAI_mob_toc_priest(Creature *pCreature) { + return new mob_toc_priestAI (pCreature); +} +CreatureAI* GetAI_mob_toc_shadow_priest(Creature *pCreature) { + return new mob_toc_shadow_priestAI (pCreature); +} +CreatureAI* GetAI_mob_toc_warlock(Creature *pCreature) { + return new mob_toc_warlockAI (pCreature); +} +CreatureAI* GetAI_mob_toc_mage(Creature *pCreature) { + return new mob_toc_mageAI (pCreature); +} +CreatureAI* GetAI_mob_toc_hunter(Creature *pCreature) { + return new mob_toc_hunterAI (pCreature); +} +CreatureAI* GetAI_mob_toc_boomkin(Creature *pCreature) { + return new mob_toc_boomkinAI (pCreature); +} +CreatureAI* GetAI_mob_toc_warrior(Creature *pCreature) { + return new mob_toc_warriorAI (pCreature); +} +CreatureAI* GetAI_mob_toc_dk(Creature *pCreature) { + return new mob_toc_dkAI (pCreature); +} +CreatureAI* GetAI_mob_toc_rogue(Creature *pCreature) { + return new mob_toc_rogueAI (pCreature); +} +CreatureAI* GetAI_mob_toc_enh_shaman(Creature *pCreature) { + return new mob_toc_enh_shamanAI (pCreature); +} +CreatureAI* GetAI_mob_toc_retro_paladin(Creature *pCreature) { + return new mob_toc_retro_paladinAI (pCreature); +} +CreatureAI* GetAI_mob_toc_pet_warlock(Creature *pCreature) { + return new mob_toc_pet_warlockAI (pCreature); +} +CreatureAI* GetAI_mob_toc_pet_hunter(Creature *pCreature) { + return new mob_toc_pet_hunterAI (pCreature); +} + +void AddSC_boss_faction_champions() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "mob_toc_druid"; + newscript->GetAI = &GetAI_mob_toc_druid; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_toc_shaman"; + newscript->GetAI = &GetAI_mob_toc_shaman; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_toc_paladin"; + newscript->GetAI = &GetAI_mob_toc_paladin; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_toc_priest"; + newscript->GetAI = &GetAI_mob_toc_priest; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_toc_shadow_priest"; + newscript->GetAI = &GetAI_mob_toc_shadow_priest; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_toc_mage"; + newscript->GetAI = &GetAI_mob_toc_mage; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_toc_warlock"; + newscript->GetAI = &GetAI_mob_toc_warlock; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_toc_hunter"; + newscript->GetAI = &GetAI_mob_toc_hunter; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_toc_boomkin"; + newscript->GetAI = &GetAI_mob_toc_boomkin; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_toc_warrior"; + newscript->GetAI = &GetAI_mob_toc_warrior; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_toc_dk"; + newscript->GetAI = &GetAI_mob_toc_dk; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_toc_rogue"; + newscript->GetAI = &GetAI_mob_toc_rogue; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_toc_enh_shaman"; + newscript->GetAI = &GetAI_mob_toc_enh_shaman; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_toc_retro_paladin"; + newscript->GetAI = &GetAI_mob_toc_retro_paladin; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_toc_pet_warlock"; + newscript->GetAI = &GetAI_mob_toc_pet_warlock; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_toc_pet_hunter"; + newscript->GetAI = &GetAI_mob_toc_pet_hunter; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp index e6eb7921a..d1cbab603 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp @@ -13,16 +13,53 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +// Jaraxxus - Magic aura (from start?) not fully offlike implemented. +// Legion flame visual effect not imlemented /* ScriptData SDName: trial_of_the_crusader -SD%Complete: 0 -SDComment: +SD%Complete: 80% +SDComment: by /dev/rsa SDCategory: Crusader Coliseum EndScriptData */ #include "precompiled.h" #include "trial_of_the_crusader.h" +enum Equipment +{ + EQUIP_MAIN = 47266, + EQUIP_OFFHAND = 46996, + EQUIP_RANGED = 47267, + EQUIP_DONE = EQUIP_NO_CHANGE, +}; + +enum Summons +{ + NPC_LEGION_FLAME = 34784, + NPC_INFERNAL_VOLCANO = 34813, + NPC_FEL_INFERNAL = 34815, + NPC_NETHER_PORTAL = 34825, + NPC_MISTRESS = 34826, +}; + +enum BossSpells +{ +SPELL_NETHER_POWER = 67108, +SPELL_INFERNAL = 66258, +SPELL_INFERNAL_ERUPTION = 66255, +SPELL_FEL_FIREBALL = 66532, +SPELL_FEL_LIGHTING = 66528, +SPELL_INCINERATE_FLESH = 66237, +SPELL_BURNING_INFERNO = 66242, +SPELL_NETHER_PORTAL = 66264, +SPELL_LEGION_FLAME_0 = 66199, +SPELL_LEGION_FLAME_1 = 66197, +SPELL_SHIVAN_SLASH = 67098, +SPELL_SPINNING_STRIKE = 66316, +SPELL_FEL_INFERNO = 67047, +SPELL_FEL_STREAK = 66494, +SPELL_BERSERK = 26662, +}; /*###### ## boss_jaraxxus @@ -33,28 +70,59 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI boss_jaraxxusAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); Reset(); } ScriptedInstance* m_pInstance; + uint8 Difficulty; + uint8 stage; + uint8 substage; + uint8 m_portalsCount; + uint8 m_volcanoCount; + BossSpellWorker* bsw; - void Reset() {} + void Reset() { + if(!m_pInstance) return; + Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); + m_pInstance->SetData(TYPE_JARAXXUS, NOT_STARTED); + SetEquipmentSlots(false, EQUIP_MAIN, EQUIP_OFFHAND, EQUIP_RANGED); + m_portalsCount = 1; + if (Difficulty == RAID_DIFFICULTY_10MAN_HEROIC || Difficulty == RAID_DIFFICULTY_25MAN_HEROIC) + { + m_portalsCount = 2; + m_volcanoCount = 4; + } else { + m_portalsCount = 1; + m_volcanoCount = 4; + } + DoScriptText(-1713517,m_creature); + m_creature->SetRespawnDelay(DAY); + } void JustReachedHome() { - if (m_pInstance) - m_pInstance->SetData(TYPE_JARAXXUS, NOT_STARTED); + if (!m_pInstance) return; + m_pInstance->SetData(TYPE_JARAXXUS, FAIL); + m_creature->ForcedDespawn(); } void JustDied(Unit* pKiller) { - if (m_pInstance) + if (!m_pInstance) return; + DoScriptText(-1713525,m_creature); m_pInstance->SetData(TYPE_JARAXXUS, DONE); + m_pInstance->SetData(TYPE_EVENT,2000); + m_pInstance->SetData(TYPE_STAGE,0); } void Aggro(Unit* pWho) { + if (!m_pInstance) return; m_creature->SetInCombatWithZone(); + m_pInstance->SetData(TYPE_JARAXXUS, IN_PROGRESS); + DoScriptText(-1713514,m_creature); + bsw->doCast(SPELL_NETHER_POWER); } void UpdateAI(const uint32 uiDiff) @@ -62,6 +130,37 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + bsw->timedCast(SPELL_FEL_FIREBALL, uiDiff); + + bsw->timedCast(SPELL_FEL_LIGHTING, uiDiff); + + if (bsw->timedQuery(SPELL_INCINERATE_FLESH, uiDiff)) { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,1)) + { + DoScriptText(-1713522,m_creature,pTarget); + bsw->doCast(SPELL_INCINERATE_FLESH,pTarget); + } + } + + if (bsw->timedQuery(SPELL_LEGION_FLAME_1, uiDiff)) { + DoScriptText(-1713518,m_creature); + bsw->doCast(SPELL_LEGION_FLAME_1); + }; + + if (bsw->timedQuery(SPELL_INFERNAL_ERUPTION, uiDiff) + && m_volcanoCount > 0) { + DoScriptText(-1713520,m_creature); + if (bsw->doCast(NPC_INFERNAL_VOLCANO) == CAST_OK) --m_volcanoCount; + }; + + if (bsw->timedQuery(SPELL_NETHER_PORTAL, uiDiff) + && m_portalsCount > 0 + && m_creature->GetHealthPercent() <= 90.0f) + { + DoScriptText(-1713519,m_creature); + if (bsw->doCast(NPC_NETHER_PORTAL) == CAST_OK) --m_portalsCount; + }; + DoMeleeAttackIfReady(); } }; @@ -71,6 +170,330 @@ CreatureAI* GetAI_boss_jaraxxus(Creature* pCreature) return new boss_jaraxxusAI(pCreature); } +struct MANGOS_DLL_DECL mob_legion_flameAI : public ScriptedAI +{ + mob_legion_flameAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + uint32 m_uiRangeCheck_Timer; + + void Reset() + { + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetInCombatWithZone(); + m_creature->SetRespawnDelay(DAY); + + if (Unit* pTarget= SelectUnit(SELECT_TARGET_RANDOM, 0) ) { + m_creature->GetMotionMaster()->MoveChase(pTarget); + m_creature->SetSpeedRate(MOVE_RUN, 0.5); + } + } + + void KilledUnit(Unit* pVictim) + { + if (pVictim->GetTypeId() != TYPEID_PLAYER) return; + } + + void JustDied(Unit* Killer) + { + } + + void Aggro(Unit *who) + { + if (!m_pInstance) return; + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_pInstance->GetData(TYPE_JARAXXUS) != IN_PROGRESS) + m_creature->ForcedDespawn(); + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_uiRangeCheck_Timer < uiDiff) + { + if (m_pInstance) + { + if (m_creature->IsWithinDist(m_creature->getVictim(), 4.0f, false)) + { + DoCast(m_creature,SPELL_LEGION_FLAME_0); + } + } + m_uiRangeCheck_Timer = 1000; + if (m_creature->getVictim()) { + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + m_creature->SetSpeedRate(MOVE_RUN, 0.5); + } + } + else m_uiRangeCheck_Timer -= uiDiff; + + } +}; + +CreatureAI* GetAI_mob_legion_flame(Creature* pCreature) +{ + return new mob_legion_flameAI(pCreature); +} + +struct MANGOS_DLL_DECL mob_infernal_volcanoAI : public ScriptedAI +{ + mob_infernal_volcanoAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); + Reset(); + } + + ScriptedInstance* m_pInstance; + uint8 Difficulty; + uint8 m_Count; + uint32 m_Timer; + BossSpellWorker* bsw; + + void Reset() + { + Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); + m_Timer = 15000; + m_creature->SetRespawnDelay(DAY); + if (Difficulty != RAID_DIFFICULTY_10MAN_HEROIC && Difficulty != RAID_DIFFICULTY_25MAN_HEROIC) + { + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_Count = 3; + } else + { + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_Count = 6; + } + } + + void AttackStart(Unit *who) + { + return; + } + + void KilledUnit(Unit* pVictim) + { + if (pVictim->GetTypeId() != TYPEID_PLAYER) return; + } + + void JustDied(Unit* Killer) + { + } + + void Aggro(Unit *who) + { + if (!m_pInstance) return; + } + + void UpdateAI(const uint32 diff) + { + if (m_pInstance->GetData(TYPE_JARAXXUS) != IN_PROGRESS) + m_creature->ForcedDespawn(); + + if (bsw->timedQuery(SPELL_INFERNAL_ERUPTION,diff) && m_Count > 0) { + bsw->doCast(SPELL_INFERNAL_ERUPTION); + DoScriptText(-1713524,m_creature); + --m_Count; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + } +}; + +CreatureAI* GetAI_mob_infernal_volcano(Creature* pCreature) +{ + return new mob_infernal_volcanoAI(pCreature); +} + +struct MANGOS_DLL_DECL mob_fel_infernalAI : public ScriptedAI +{ + mob_fel_infernalAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); + Reset(); + } + + ScriptedInstance* m_pInstance; + BossSpellWorker* bsw; + + void Reset() + { + m_creature->SetInCombatWithZone(); + m_creature->SetRespawnDelay(DAY); + } + + void KilledUnit(Unit* pVictim) + { + if (pVictim->GetTypeId() != TYPEID_PLAYER) return; + } + + void JustDied(Unit* Killer) + { + } + + void Aggro(Unit *who) + { + if (!m_pInstance) return; + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_pInstance->GetData(TYPE_JARAXXUS) != IN_PROGRESS) + m_creature->ForcedDespawn(); + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + bsw->timedCast(SPELL_FEL_INFERNO, uiDiff); + + bsw->timedCast(SPELL_FEL_STREAK, uiDiff); + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_fel_infernal(Creature* pCreature) +{ + return new mob_fel_infernalAI(pCreature); +} + +struct MANGOS_DLL_DECL mob_nether_portalAI : public ScriptedAI +{ + mob_nether_portalAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + uint8 Difficulty; + uint32 m_Timer; + uint8 m_Count; + + void Reset() + { + Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); + m_Timer = 10000; + m_creature->SetRespawnDelay(DAY); + if (Difficulty != RAID_DIFFICULTY_10MAN_HEROIC && Difficulty != RAID_DIFFICULTY_25MAN_HEROIC) + { + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_Count = 1; + } else + { + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_Count = 2; + } + } + + void KilledUnit(Unit* pVictim) + { + if (pVictim->GetTypeId() != TYPEID_PLAYER) return; + } + + void AttackStart(Unit *who) + { + return; + } + + void JustDied(Unit* Killer) + { + } + + void Aggro(Unit *who) + { + if (!m_pInstance) return; + } + + void UpdateAI(const uint32 diff) + { + if (m_pInstance->GetData(TYPE_JARAXXUS) != IN_PROGRESS) + m_creature->ForcedDespawn(); + + if (m_Timer < diff && m_Count > 0) { + DoCast(m_creature,SPELL_NETHER_PORTAL,false); + DoScriptText(-1713521,m_creature); + --m_Count; + m_Timer = 60000; + } else m_Timer -= diff; + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + } +}; + +CreatureAI* GetAI_mob_nether_portal(Creature* pCreature) +{ + return new mob_nether_portalAI(pCreature); +} + +struct MANGOS_DLL_DECL mob_mistress_of_painAI : public ScriptedAI +{ + mob_mistress_of_painAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); + Reset(); + } + + ScriptedInstance* m_pInstance; + BossSpellWorker* bsw; + + void Reset() + { + m_creature->SetInCombatWithZone(); + m_creature->SetRespawnDelay(DAY); + } + + void KilledUnit(Unit* pVictim) + { + if (pVictim->GetTypeId() != TYPEID_PLAYER) return; + } + + void JustDied(Unit* Killer) + { + } + + void Aggro(Unit *who) + { + if (!m_pInstance) return; + DoScriptText(-1713523,m_creature, who); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_pInstance) return; + if (m_pInstance->GetData(TYPE_JARAXXUS) != IN_PROGRESS) + m_creature->ForcedDespawn(); + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + bsw->timedCast(SPELL_SHIVAN_SLASH, uiDiff); + + bsw->timedCast(SPELL_SPINNING_STRIKE, uiDiff); + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_mistress_of_pain(Creature* pCreature) +{ + return new mob_mistress_of_painAI(pCreature); +} + void AddSC_boss_jaraxxus() { Script* newscript; @@ -79,4 +502,29 @@ void AddSC_boss_jaraxxus() newscript->Name = "boss_jaraxxus"; newscript->GetAI = &GetAI_boss_jaraxxus; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_legion_flame"; + newscript->GetAI = &GetAI_mob_legion_flame; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_infernal_volcano"; + newscript->GetAI = &GetAI_mob_infernal_volcano; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_fel_infernal"; + newscript->GetAI = &GetAI_mob_fel_infernal; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_nether_portal"; + newscript->GetAI = &GetAI_mob_nether_portal; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_mistress_of_pain"; + newscript->GetAI = &GetAI_mob_mistress_of_pain; + newscript->RegisterSelf(); } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index e9b81d8a0..b88f3f83d 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -13,38 +13,116 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +// Gormok - Firebomb not implemented, timers need correct +// Snakes - Underground phase not worked, timers need correct +// Icehowl - Trample&Crash event not implemented, timers need correct /* ScriptData -SDName: -SD%Complete: 0 -SDComment: +SDName: northrend_beasts +SD%Complete: 90% +SDComment: by /dev/rsa SDCategory: EndScriptData */ +// not implemented: +// snobolds link +// snakes underground cast (not support in core) +// aura 31 (SPELL_ADRENALINE) not applyed by undefined reason +// model_id (or visual effect) for slime_pool need change. + #include "precompiled.h" #include "trial_of_the_crusader.h" +enum Equipment +{ + EQUIP_MAIN = 50760, + EQUIP_OFFHAND = 48040, + EQUIP_RANGED = 47267, + EQUIP_DONE = EQUIP_NO_CHANGE, +}; + +enum Summons +{ + NPC_SNOBOLD_VASSAL = 34800, + NPC_SLIME_POOL = 35176, + NPC_FIRE_BOMB = 34854, +}; + +enum BossSpells +{ +SPELL_IMPALE = 66331, +SPELL_STAGGERING_STOMP = 67648, +SPELL_RISING_ANGER = 66636, +SUMMON_SNOBOLD = NPC_SNOBOLD_VASSAL, +SPELL_ACID_SPIT = 66880, +SPELL_PARALYTIC_SPRAY = 66901, +SPELL_ACID_SPEW = 66819, +SPELL_PARALYTIC_BITE = 66824, +SPELL_SWEEP_0 = 66794, +SPELL_SLIME_POOL = 66883, +SPELL_FIRE_SPIT = 66796, +SPELL_MOLTEN_SPEW = 66821, +SPELL_BURNING_BITE = 66879, +SPELL_BURNING_SPRAY = 66902, +SPELL_SWEEP_1 = 67646, +SPELL_FEROCIOUS_BUTT = 66770, +SPELL_MASSIVE_CRASH = 66683, +SPELL_WHIRL = 67345, +SPELL_ARCTIC_BREATH = 66689, +SPELL_TRAMPLE = 66734, +SPELL_ADRENALINE = 68667, +SPELL_SNOBOLLED = 66406, +SPELL_BATTER = 66408, +SPELL_FIRE_BOMB = 66313, +SPELL_FIRE_BOMB_1 = 66317, +SPELL_FIRE_BOMB_DOT = 66318, +SPELL_HEAD_CRACK = 66407, +SPELL_SUBMERGE_0 = 53421, +SPELL_ENRAGE = 68335, +SPELL_FROTHING_RAGE = 66759, +SPELL_STAGGERED_DAZE = 66758, +SPELL_SLIME_POOL_1 = 66881, +SPELL_SLIME_POOL_2 = 66882, +}; + struct MANGOS_DLL_DECL boss_gormokAI : public ScriptedAI { boss_gormokAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); Reset(); } ScriptedInstance* m_pInstance; + uint8 SnoboldsCount; + BossSpellWorker* bsw; - void Reset() {} + void Reset() { + + if(!m_pInstance) return; + SetEquipmentSlots(false, EQUIP_MAIN, EQUIP_OFFHAND, EQUIP_RANGED); + m_creature->SetRespawnDelay(DAY); + m_creature->SetInCombatWithZone(); + SnoboldsCount = 4; + } + + void JustDied(Unit* pKiller) + { + if (!m_pInstance) return; + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, GORMOK_DONE); + } void JustReachedHome() { - if (m_pInstance) - m_pInstance->SetData(TYPE_NORTHREND_BEASTS, NOT_STARTED); + if (!m_pInstance) return; + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, FAIL); + m_creature->ForcedDespawn(); } void Aggro(Unit* pWho) { - m_creature->SetInCombatWithZone(); + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, GORMOK_IN_PROGRESS); } void UpdateAI(const uint32 uiDiff) @@ -52,6 +130,16 @@ struct MANGOS_DLL_DECL boss_gormokAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + bsw->timedCast(SPELL_IMPALE, uiDiff); + + bsw->timedCast(SPELL_STAGGERING_STOMP, uiDiff); + + if (bsw->timedQuery(SUMMON_SNOBOLD, uiDiff) && SnoboldsCount > 0 ) { + bsw->doCast(SUMMON_SNOBOLD); + DoScriptText(-1713601,m_creature); + --SnoboldsCount; + }; + DoMeleeAttackIfReady(); } }; @@ -61,34 +149,175 @@ CreatureAI* GetAI_boss_gormok(Creature* pCreature) return new boss_gormokAI(pCreature); } +struct MANGOS_DLL_DECL mob_snobold_vassalAI : public ScriptedAI +{ + mob_snobold_vassalAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); + Reset(); + } + + ScriptedInstance* m_pInstance; + BossSpellWorker* bsw; + Unit* pBoss; + Unit* defaultTarget; + + void Reset() + { + pBoss = NULL; + defaultTarget = NULL; + m_creature->SetInCombatWithZone(); + m_creature->SetRespawnDelay(DAY); + pBoss = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_GORMOK)); + if (pBoss) bsw->doCast(SPELL_RISING_ANGER,pBoss); + } + + void Aggro(Unit *who) + { + if (!m_pInstance) return; + defaultTarget = who; + bsw->doCast(SPELL_SNOBOLLED, defaultTarget); + } + + void JustReachedHome() + { + if (!m_pInstance) return; + m_creature->ForcedDespawn(); + } + + void JustDied(Unit* pKiller) + { + if (defaultTarget && defaultTarget->isAlive()) bsw->doRemove(SPELL_SNOBOLLED, defaultTarget); +// if (pBoss && pBoss->isAlive()) bsw->doRemove(SPELL_RISING_ANGER,pBoss); +// This string - not offlike, in off this buff not removed! especially for small servers. + } + + void UpdateAI(const uint32 uiDiff) + { + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + bsw->timedCast(SPELL_BATTER, uiDiff); + + if (bsw->timedCast(SPELL_FIRE_BOMB, uiDiff, m_creature->getVictim()) == CAST_OK) { + bsw->doCast(SPELL_FIRE_BOMB_1, m_creature->getVictim()); + bsw->doCast(SPELL_FIRE_BOMB_DOT, m_creature->getVictim()); + } + + bsw->timedCast(SPELL_HEAD_CRACK, uiDiff); + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_snobold_vassal(Creature* pCreature) +{ + return new mob_snobold_vassalAI(pCreature); +} + struct MANGOS_DLL_DECL boss_acidmawAI : public ScriptedAI { boss_acidmawAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); Reset(); } ScriptedInstance* m_pInstance; + BossSpellWorker* bsw; + uint8 stage; + bool enraged; - void Reset() {} + void Reset() + { + stage = 1; + enraged = false; + m_creature->SetInCombatWithZone(); + m_creature->SetRespawnDelay(DAY); + } + + void JustDied(Unit* pKiller) + { + if (!m_pInstance) return; + if (Creature* pSister = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_DREADSCALE))) + if (!pSister->isAlive()) + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, SNAKES_DONE); + else m_pInstance->SetData(TYPE_NORTHREND_BEASTS, SNAKES_SPECIAL); + } void JustReachedHome() { - if (m_pInstance) - m_pInstance->SetData(TYPE_NORTHREND_BEASTS, NOT_STARTED); + if (!m_pInstance) return; + if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) != FAIL) + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, FAIL); + m_creature->ForcedDespawn(); } void Aggro(Unit* pWho) { - m_creature->SetInCombatWithZone(); } void UpdateAI(const uint32 uiDiff) { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + + if ((!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + && (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) != ACIDMAW_SUBMERGED)) return; + switch (stage) + { + case 0: { + bsw->timedCast(SPELL_ACID_SPEW, uiDiff); + + bsw->timedCast(SPELL_PARALYTIC_BITE, uiDiff); + + bsw->timedCast(SPELL_ACID_SPIT, uiDiff); + + bsw->timedCast(SPELL_PARALYTIC_SPRAY, uiDiff); + + bsw->timedCast(SPELL_SWEEP_0, uiDiff); + + if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == ACIDMAW_SUBMERGED) + stage = 1; + + break;} + case 1: { + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + bsw->doCast(SPELL_SUBMERGE_0); + stage = 2; + DoScriptText(-1713557,m_creature); + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, ACIDMAW_SUBMERGED); + break;} + case 2: { + if (bsw->timedQuery(SPELL_SLIME_POOL, uiDiff)) + bsw->doCast(NPC_SLIME_POOL); + + if (bsw->timedQuery(SPELL_SUBMERGE_0, uiDiff) && m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == ACIDMAW_SUBMERGED) + stage = 3; + break;} + case 3: { + DoScriptText(-1713559,m_creature); + bsw->doRemove(SPELL_SUBMERGE_0); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + stage = 0; + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, DREADSCALE_SUBMERGED); + break;} + } + + if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == SNAKES_SPECIAL && !enraged) + { + DoScriptText(-1713559,m_creature); + bsw->doRemove(SPELL_SUBMERGE_0); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + bsw->doCast(SPELL_ENRAGE); + enraged = true; + stage = 0; + DoScriptText(-1713504,m_creature); + }; + DoMeleeAttackIfReady(); } }; @@ -103,29 +332,102 @@ struct MANGOS_DLL_DECL boss_dreadscaleAI : public ScriptedAI boss_dreadscaleAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); Reset(); } ScriptedInstance* m_pInstance; + BossSpellWorker* bsw; + uint8 stage; + bool enraged; + + void Reset() + { + stage = 0; + enraged = false; + m_creature->SetInCombatWithZone(); + m_creature->SetRespawnDelay(DAY); + } - void Reset() {} + void JustDied(Unit* pKiller) + { + if (!m_pInstance) return; + if (Creature* pSister = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_ACIDMAW))) + if (!pSister->isAlive()) + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, SNAKES_DONE); + else m_pInstance->SetData(TYPE_NORTHREND_BEASTS, SNAKES_SPECIAL); + } void JustReachedHome() { - if (m_pInstance) - m_pInstance->SetData(TYPE_NORTHREND_BEASTS, NOT_STARTED); + if (!m_pInstance) return; + if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) != FAIL) + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, FAIL); + m_creature->ForcedDespawn(); } void Aggro(Unit* pWho) { - m_creature->SetInCombatWithZone(); } void UpdateAI(const uint32 uiDiff) { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + if ((!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + && (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) != DREADSCALE_SUBMERGED)) return; + switch (stage) + { + case 0: { + bsw->timedCast(SPELL_BURNING_BITE, uiDiff); + + bsw->timedCast(SPELL_MOLTEN_SPEW, uiDiff); + + bsw->timedCast(SPELL_FIRE_SPIT, uiDiff); + + bsw->timedCast(SPELL_BURNING_SPRAY, uiDiff); + + bsw->timedCast(SPELL_SWEEP_0, uiDiff); + + if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == DREADSCALE_SUBMERGED) + stage = 1; + + break;} + case 1: { + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + bsw->doCast(SPELL_SUBMERGE_0); + stage = 2; + DoScriptText(-1713557,m_creature); + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, DREADSCALE_SUBMERGED); + break;} + case 2: { + + if (bsw->timedQuery(SPELL_SLIME_POOL, uiDiff)) + bsw->doCast(NPC_SLIME_POOL); + + if (bsw->timedQuery(SPELL_SUBMERGE_0, uiDiff) && m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == DREADSCALE_SUBMERGED) + stage = 3; + break;} + case 3: { + DoScriptText(-1713559,m_creature); + bsw->doRemove(SPELL_SUBMERGE_0); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + stage = 0; + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, ACIDMAW_SUBMERGED); + break;} + } + + if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == SNAKES_SPECIAL && !enraged) + { + DoScriptText(-1713559,m_creature); + bsw->doRemove(SPELL_SUBMERGE_0); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + bsw->doCast(SPELL_ENRAGE); + enraged = true; + stage = 0; + DoScriptText(-1713504,m_creature); + }; + DoMeleeAttackIfReady(); } }; @@ -135,27 +437,113 @@ CreatureAI* GetAI_boss_dreadscale(Creature* pCreature) return new boss_dreadscaleAI(pCreature); } +struct MANGOS_DLL_DECL mob_slime_poolAI : public ScriptedAI +{ + mob_slime_poolAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + bsw = new BossSpellWorker(this); + Reset(); + } + + ScriptedInstance *m_pInstance; + BossSpellWorker* bsw; + float m_Size; + uint8 Difficulty; + + void Reset() + { + if(!m_pInstance) return; + Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); + if (Difficulty == RAID_DIFFICULTY_10MAN_HEROIC || Difficulty == RAID_DIFFICULTY_25MAN_HEROIC) + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetInCombatWithZone(); + m_creature->SetSpeedRate(MOVE_RUN, 0.05f); + SetCombatMovement(false); + m_creature->GetMotionMaster()->MoveRandom(); + bsw->doCast(SPELL_SLIME_POOL_2); + m_Size = m_creature->GetFloatValue(OBJECT_FIELD_SCALE_X); + } + + void AttackStart(Unit *who) + { + return; + } + + void UpdateAI(const uint32 uiDiff) + { + if (bsw->timedQuery(SPELL_SLIME_POOL_2,uiDiff)) { + m_Size = m_Size*1.036; + m_creature->SetFloatValue(OBJECT_FIELD_SCALE_X, m_Size); + } + // Override especially for clean core + if (m_Size >= 6.0f) m_creature->ForcedDespawn(); + } + +}; + +CreatureAI* GetAI_mob_slime_pool(Creature* pCreature) +{ + return new mob_slime_poolAI(pCreature); +} + struct MANGOS_DLL_DECL boss_icehowlAI : public ScriptedAI { boss_icehowlAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); Reset(); } ScriptedInstance* m_pInstance; + BossSpellWorker* bsw; + bool MovementStarted; + bool TrampleCasted; + uint8 stage; + float fPosX, fPosY, fPosZ; + Unit* pTarget; + + void Reset() { + if(!m_pInstance) return; + m_creature->SetRespawnDelay(DAY); + MovementStarted = false; + stage = 0; + } - void Reset() {} + void JustDied(Unit* pKiller) + { + if (!m_pInstance) return; + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, ICEHOWL_DONE); + } + + void MovementInform(uint32 type, uint32 id) + { + if(!m_pInstance) return; + if(type != POINT_MOTION_TYPE) return; + if(id != 1 && MovementStarted) + { + m_creature->GetMotionMaster()->MovePoint(1, fPosX, fPosY, fPosZ); + } + else { + m_creature->GetMotionMaster()->MovementExpired(); + MovementStarted = false; + SetCombatMovement(true); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + } + } void JustReachedHome() { - if (m_pInstance) - m_pInstance->SetData(TYPE_NORTHREND_BEASTS, NOT_STARTED); + if (!m_pInstance) return; + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, FAIL); + m_creature->ForcedDespawn(); } void Aggro(Unit* pWho) { m_creature->SetInCombatWithZone(); + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, ICEHOWL_IN_PROGRESS); } void UpdateAI(const uint32 uiDiff) @@ -163,7 +551,89 @@ struct MANGOS_DLL_DECL boss_icehowlAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - DoMeleeAttackIfReady(); + switch (stage) + { + case 0: { + bsw->timedCast(SPELL_FEROCIOUS_BUTT, uiDiff); + + bsw->timedCast(SPELL_ARCTIC_BREATH, uiDiff); + + bsw->timedCast(SPELL_WHIRL, uiDiff); + + if (bsw->timedQuery(SPELL_MASSIVE_CRASH, uiDiff)) stage = 1; + + bsw->timedCast(SPELL_FROTHING_RAGE, uiDiff); + + DoMeleeAttackIfReady(); + + break; + } + case 1: { + if (bsw->doCast(SPELL_MASSIVE_CRASH) == CAST_OK) + stage = 2; + break; + } + case 2: { + if (pTarget = bsw->SelectUnit()) { + TrampleCasted = false; + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + stage = 3; + bsw->resetTimer(SPELL_TRAMPLE); + DoScriptText(-1713506,m_creature,pTarget); + SetCombatMovement(false); + m_creature->GetMotionMaster()->MoveIdle(); + } + break; + } + case 3: { + if (bsw->timedQuery(SPELL_TRAMPLE,uiDiff)) { + pTarget->GetPosition(fPosX, fPosY, fPosZ); + TrampleCasted = false; + MovementStarted = true; + m_creature->GetMotionMaster()->MovePoint(1, fPosX, fPosY, fPosZ); + DoScriptText(-1713508,m_creature); + bsw->doCast(SPELL_ADRENALINE); + stage = 4; + } + break; + } + case 4: { + if (MovementStarted) + { + Map* pMap = m_creature->GetMap(); + Map::PlayerList const &lPlayers = pMap->GetPlayers(); + for(Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr) + { + Unit* pPlayer = itr->getSource(); + if (!pPlayer) continue; + if (pPlayer->isAlive() && pPlayer->IsWithinDistInMap(m_creature, 5.0f)) { + bsw->doCast(SPELL_TRAMPLE, pPlayer); + TrampleCasted = true; + MovementStarted = false; + m_creature->GetMotionMaster()->MovementExpired(); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + } + } + + } else stage = 5; + if (TrampleCasted) stage = 5; + break; + } + case 5: { + if (!TrampleCasted) { + bsw->doCast(SPELL_STAGGERED_DAZE); + DoScriptText(-1713507,m_creature); + } + MovementStarted = false; + m_creature->GetMotionMaster()->MovementExpired(); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + SetCombatMovement(true); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + stage = 0; + break; + } + } + } }; @@ -196,4 +666,14 @@ void AddSC_northrend_beasts() newscript->GetAI = &GetAI_boss_icehowl; newscript->RegisterSelf(); + newscript = new Script; + newscript->Name = "mob_snobold_vassal"; + newscript->GetAI = &GetAI_mob_snobold_vassal; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_slime_pool"; + newscript->GetAI = &GetAI_mob_slime_pool; + newscript->RegisterSelf(); + } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp index 0d384fac2..5e5f33dde 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp @@ -17,35 +17,198 @@ /* ScriptData SDName: trial_of_the_crusader SD%Complete: 0 -SDComment: +SDComment: by /dev/rsa SDCategory: Crusader Coliseum EndScriptData */ +// Twin pact - heal part not worked now by undefined reason. Need override? +// timers need correct + #include "precompiled.h" #include "trial_of_the_crusader.h" +enum Equipment +{ + EQUIP_MAIN_1 = 49303, + EQUIP_OFFHAND_1 = 47146, + EQUIP_RANGED_1 = 47267, + EQUIP_MAIN_2 = 45990, + EQUIP_OFFHAND_2 = 47470, + EQUIP_RANGED_2 = 47267, + EQUIP_DONE = EQUIP_NO_CHANGE, +}; + +enum Summons +{ + NPC_DARK_ESSENCE = 34567, + NPC_LIGHT_ESSENCE = 34568, +}; + +enum BossSpells +{ + SPELL_TWIN_SPIKE_L = 66075, + SPELL_LIGHT_SURGE = 65766, + SPELL_SHIELD_LIGHT = 65858, + SPELL_TWIN_PACT_L = 65875, + SPELL_LIGHT_VORTEX = 66046, + SPELL_LIGHT_TOUCH = 67297, + SPELL_TWIN_SPIKE_H = 66069, + SPELL_DARK_SURGE = 65768, + SPELL_SHIELD_DARK = 65874, + SPELL_TWIN_PACT_H = 65876, + SPELL_DARK_VORTEX = 66058, + SPELL_DARK_TOUCH = 67282, + SPELL_TWIN_POWER = 65916, + SPELL_LIGHT_ESSENCE = 65686, + SPELL_DARK_ESSENCE = 65684, + SPELL_BERSERK = 64238, + SPELL_NONE = 0, +}; + /*###### ## boss_fjola ######*/ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI { - boss_fjolaAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + boss_fjolaAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); + Reset(); + } ScriptedInstance* m_pInstance; + uint8 stage; + BossSpellWorker* bsw; + bool TwinPactCasted; - void Reset() {} + void Reset() { + if(!m_pInstance) return; + SetEquipmentSlots(false, EQUIP_MAIN_1, EQUIP_OFFHAND_1, EQUIP_RANGED_1); + m_creature->SetRespawnDelay(DAY); + stage = 1; + TwinPactCasted = false; + } + + void JustReachedHome() + { + if (!m_pInstance) return; + m_pInstance->SetData(TYPE_VALKIRIES, FAIL); + m_creature->ForcedDespawn(); + } + + void JustDied(Unit* pKiller) + { + if (!m_pInstance) return; + DoScriptText(-1713547,m_creature); + if (Creature* pSister = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_DARKBANE))) + if (!pSister->isAlive()) + m_pInstance->SetData(TYPE_VALKIRIES, DONE); + else m_pInstance->SetData(TYPE_VALKIRIES, SPECIAL); + m_pInstance->SetData(DATA_HEALTH_FJOLA, 0); + } + + void KilledUnit(Unit* pVictim) + { + if (!m_pInstance) return; + DoScriptText(-1713544,pVictim); + } void Aggro(Unit* pWho) { + if (!m_pInstance) return; m_creature->SetInCombatWithZone(); + m_pInstance->SetData(TYPE_VALKIRIES, IN_PROGRESS); + if (m_creature->isAlive()) m_creature->SummonCreature(NPC_LIGHT_ESSENCE, SpawnLoc[24].x, SpawnLoc[24].y, SpawnLoc[24].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); + if (m_creature->isAlive()) m_creature->SummonCreature(NPC_LIGHT_ESSENCE, SpawnLoc[25].x, SpawnLoc[25].y, SpawnLoc[25].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); + DoScriptText(-1713541,m_creature); + m_pInstance->SetData(DATA_HEALTH_FJOLA, m_creature->GetHealth()); + } + + void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + { + if (!m_pInstance) return; + if (!m_creature || !m_creature->isAlive()) + return; + + if(pDoneBy->GetGUID() == m_creature->GetGUID()) return; + + if(pDoneBy->GetTypeId() == TYPEID_PLAYER) + { + if(pDoneBy->HasAura(SPELL_LIGHT_ESSENCE)) + uiDamage /= 2; + else if(pDoneBy->HasAura(SPELL_DARK_ESSENCE)) + uiDamage += uiDamage/2; + } + + uiDamage /= 2; + + m_pInstance->SetData(DATA_HEALTH_FJOLA, m_creature->GetHealth() >= uiDamage ? m_creature->GetHealth() - uiDamage : 0); } void UpdateAI(const uint32 uiDiff) { + if (!m_pInstance) return; if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (m_creature->GetHealth() > m_pInstance->GetData(DATA_HEALTH_EYDIS) && + m_pInstance->GetData(DATA_HEALTH_EYDIS) != 0) + m_creature->SetHealth(m_pInstance->GetData(DATA_HEALTH_EYDIS)); + + switch (stage) + { + case 0: + break; + case 1: + if (bsw->timedQuery(SPELL_LIGHT_VORTEX, uiDiff)) { + m_pInstance->SetData(DATA_CASTING_FJOLA, SPELL_LIGHT_VORTEX); + DoScriptText(-1713538,m_creature); + bsw->doCast(SPELL_LIGHT_VORTEX); + stage = 0; + }; + break; + case 2: + if (bsw->timedQuery(SPELL_TWIN_PACT_L, uiDiff) + && bsw->doCast(SPELL_SHIELD_LIGHT) == CAST_OK ) + { + m_pInstance->SetData(DATA_CASTING_FJOLA, SPELL_TWIN_PACT_L); + DoScriptText(-1713539,m_creature); + bsw->doCast(SPELL_TWIN_PACT_L); + stage = 0; + TwinPactCasted = true; + } + break; + default: + break; + } + + if (m_pInstance->GetData(DATA_CASTING_EYDIS) == SPELL_DARK_VORTEX && stage==0 ) + { + m_pInstance->SetData(DATA_CASTING_EYDIS, SPELL_NONE); + stage = 1; + } + + if ( m_creature->GetHealthPercent() <= 50.0f + && stage == 0 + && !TwinPactCasted) + { + stage = 2; + } + + if (m_pInstance->GetData(DATA_CASTING_EYDIS) == SPELL_TWIN_PACT_H) + { + bsw->doCast(SPELL_TWIN_POWER); + m_pInstance->SetData(DATA_CASTING_EYDIS, SPELL_NONE); + } + + bsw->timedCast(SPELL_LIGHT_SURGE, uiDiff); + + bsw->timedCast(SPELL_LIGHT_TOUCH, uiDiff); + + bsw->timedCast(SPELL_BERSERK, uiDiff); + DoMeleeAttackIfReady(); } }; @@ -61,13 +224,80 @@ CreatureAI* GetAI_boss_fjola(Creature* pCreature) struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI { - boss_eydisAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + boss_eydisAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); + Reset(); + } - void Reset() {} + ScriptedInstance* m_pInstance; + uint8 stage; + BossSpellWorker* bsw; + bool TwinPactCasted; + + void Reset() + { + if(!m_pInstance) return; + SetEquipmentSlots(false, EQUIP_MAIN_2, EQUIP_OFFHAND_2, EQUIP_RANGED_2); + m_creature->SetRespawnDelay(DAY); + stage = 0; + TwinPactCasted = false; + } + + void JustReachedHome() + { + if (!m_pInstance) return; + m_pInstance->SetData(TYPE_VALKIRIES, FAIL); + m_creature->ForcedDespawn(); + } + + void JustDied(Unit* pKiller) + { + if (!m_pInstance) return; + DoScriptText(-1713547,m_creature); + if (Creature* pSister = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_LIGHTBANE))) + if (!pSister->isAlive()) + m_pInstance->SetData(TYPE_VALKIRIES, DONE); + else m_pInstance->SetData(TYPE_VALKIRIES, SPECIAL); + m_pInstance->SetData(DATA_HEALTH_EYDIS, 0); + } + + void KilledUnit(Unit* pVictim) + { + DoScriptText(-1713543,pVictim); + } void Aggro(Unit* pWho) { + if (!m_pInstance) return; m_creature->SetInCombatWithZone(); + m_pInstance->SetData(TYPE_VALKIRIES, IN_PROGRESS); + DoScriptText(-1713741,m_creature); + if (m_creature->isAlive()) m_creature->SummonCreature(NPC_DARK_ESSENCE, SpawnLoc[22].x, SpawnLoc[22].y, SpawnLoc[22].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); + if (m_creature->isAlive()) m_creature->SummonCreature(NPC_DARK_ESSENCE, SpawnLoc[23].x, SpawnLoc[23].y, SpawnLoc[23].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); + m_pInstance->SetData(DATA_HEALTH_EYDIS, m_creature->GetHealth()); + } + + void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + { + if (!m_pInstance) return; + if (!m_creature || !m_creature->isAlive()) + return; + + if(pDoneBy->GetGUID() == m_creature->GetGUID()) return; + + if(pDoneBy->GetTypeId() == TYPEID_PLAYER) + { + if(pDoneBy->HasAura(SPELL_DARK_ESSENCE)) + uiDamage /= 2; + else if(pDoneBy->HasAura(SPELL_LIGHT_ESSENCE)) + uiDamage += uiDamage/2; + } + + uiDamage /= 2; + + m_pInstance->SetData(DATA_HEALTH_EYDIS, m_creature->GetHealth() >= uiDamage ? m_creature->GetHealth() - uiDamage : 0); } void UpdateAI(const uint32 uiDiff) @@ -75,6 +305,59 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (m_creature->GetHealth() > m_pInstance->GetData(DATA_HEALTH_FJOLA) && + m_pInstance->GetData(DATA_HEALTH_FJOLA) != 0) + m_creature->SetHealth(m_pInstance->GetData(DATA_HEALTH_FJOLA)); + + switch (stage) + { + case 0: + break; + case 1: + if (bsw->timedQuery(SPELL_DARK_VORTEX, uiDiff)) { + m_pInstance->SetData(DATA_CASTING_EYDIS, SPELL_DARK_VORTEX); + DoScriptText(-1713540,m_creature); + bsw->doCast(SPELL_DARK_VORTEX); + stage = 0; + }; + break; + case 2: + if (bsw->timedQuery(SPELL_TWIN_PACT_H, uiDiff) + && bsw->doCast(SPELL_SHIELD_DARK) == CAST_OK ) + { + m_pInstance->SetData(DATA_CASTING_EYDIS, SPELL_TWIN_PACT_H); + DoScriptText(-1713539,m_creature); + bsw->doCast(SPELL_TWIN_PACT_H); + stage = 0; + TwinPactCasted = true; + } + break; + default: + break; + } + + if (m_pInstance->GetData(DATA_CASTING_FJOLA) == SPELL_LIGHT_VORTEX && stage==0 ) + { + m_pInstance->SetData(DATA_CASTING_FJOLA, SPELL_NONE); + stage = 1; + } + + if ( m_creature->GetHealthPercent() <= 50.0f + && m_pInstance->GetData(DATA_CASTING_FJOLA) == SPELL_TWIN_PACT_L + && !TwinPactCasted + && stage == 0) + { + bsw->doCast(SPELL_TWIN_POWER); + m_pInstance->SetData(DATA_CASTING_FJOLA, SPELL_NONE); + stage = 2; + } + + bsw->timedCast(SPELL_DARK_SURGE, uiDiff); + + bsw->timedCast(SPELL_DARK_TOUCH, uiDiff); + + bsw->timedCast(SPELL_BERSERK, uiDiff); + DoMeleeAttackIfReady(); } }; @@ -84,6 +367,107 @@ CreatureAI* GetAI_boss_eydis(Creature* pCreature) return new boss_eydisAI(pCreature); } +struct MANGOS_DLL_DECL mob_light_essenceAI : public ScriptedAI +{ + mob_light_essenceAI(Creature* pCreature) : ScriptedAI(pCreature) { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + ScriptedInstance* m_pInstance; + + void Reset() + { + m_creature->SetRespawnDelay(DAY); + m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); + m_creature->GetMotionMaster()->MoveRandom(); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_pInstance) m_creature->ForcedDespawn(); + if (m_pInstance->GetData(TYPE_VALKIRIES) != IN_PROGRESS) { + Map* pMap = m_creature->GetMap(); + Map::PlayerList const &lPlayers = pMap->GetPlayers(); + for(Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr) + { + Unit* pPlayer = itr->getSource(); + if (!pPlayer) continue; + if (pPlayer->isAlive()) + pPlayer->RemoveAurasDueToSpell(SPELL_LIGHT_ESSENCE); + } + + m_creature->ForcedDespawn(); + } + return; + } +}; + +CreatureAI* GetAI_mob_light_essence(Creature* pCreature) +{ + return new mob_light_essenceAI(pCreature); +}; + +bool GossipHello_mob_light_essence(Player *player, Creature* pCreature) +{ + ScriptedInstance *pInstance = (ScriptedInstance *) pCreature->GetInstanceData(); + if(!pInstance) return true; + player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, pCreature->GetGUID()); + player->RemoveAurasDueToSpell(SPELL_DARK_ESSENCE); + player->CastSpell(player,SPELL_LIGHT_ESSENCE,false); + player->CLOSE_GOSSIP_MENU(); + return true; +}; + +struct MANGOS_DLL_DECL mob_dark_essenceAI : public ScriptedAI +{ + mob_dark_essenceAI(Creature* pCreature) : ScriptedAI(pCreature) { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + ScriptedInstance* m_pInstance; + + void Reset() + { + m_creature->SetRespawnDelay(DAY); + m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); + m_creature->GetMotionMaster()->MoveRandom(); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_pInstance) m_creature->ForcedDespawn(); + if (m_pInstance->GetData(TYPE_VALKIRIES) != IN_PROGRESS) { + Map* pMap = m_creature->GetMap(); + Map::PlayerList const &lPlayers = pMap->GetPlayers(); + for(Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr) + { + Unit* pPlayer = itr->getSource(); + if (!pPlayer) continue; + if (pPlayer->isAlive()) + pPlayer->RemoveAurasDueToSpell(SPELL_DARK_ESSENCE); + } + m_creature->ForcedDespawn(); + } + return; + } +}; + +CreatureAI* GetAI_mob_dark_essence(Creature* pCreature) +{ + return new mob_dark_essenceAI(pCreature); +}; + +bool GossipHello_mob_dark_essence(Player *player, Creature* pCreature) +{ + ScriptedInstance *pInstance = (ScriptedInstance *) pCreature->GetInstanceData(); + if(!pInstance) return true; + player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, pCreature->GetGUID()); + player->RemoveAurasDueToSpell(SPELL_LIGHT_ESSENCE); + player->CastSpell(player,SPELL_DARK_ESSENCE,false); + player->CLOSE_GOSSIP_MENU(); + return true; +} + void AddSC_twin_valkyr() { Script* newscript; @@ -95,6 +479,19 @@ void AddSC_twin_valkyr() newscript = new Script; newscript->Name = "boss_eydis"; - newscript->GetAI = &GetAI_boss_fjola; + newscript->GetAI = &GetAI_boss_eydis; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_light_essence"; + newscript->GetAI = &GetAI_mob_light_essence; + newscript->pGossipHello = &GossipHello_mob_light_essence; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_dark_essence"; + newscript->GetAI = &GetAI_mob_dark_essence; + newscript->pGossipHello = &GossipHello_mob_dark_essence; + newscript->RegisterSelf(); + } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index 21c424fe3..18f1fed91 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -1,185 +1,536 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 - * 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, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ +/* Copyright (C) 2006 - 2009 ScriptDev2 +* 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, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ /* ScriptData SDName: instance_trial_of_the_crusader -SD%Complete: 100 -SDComment: -SDCategory: Crusader Coliseum +SD%Complete: 80% +SDComment: by /dev/rsa +SDCategory: Trial of the Crusader EndScriptData */ #include "precompiled.h" #include "trial_of_the_crusader.h" -/* Trial Of The Crusader encounters: -0 - Northrend Beasts -1 - Jaraxxus -2 - Faction Champions -3 - Twin Valkyr -4 - Anubarak -*/ - struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance { - instance_trial_of_the_crusader(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + instance_trial_of_the_crusader(Map* pMap) : ScriptedInstance(pMap) { + Difficulty = pMap->GetDifficulty(); + Initialize(); + } + + uint32 m_auiEncounter[MAX_ENCOUNTERS+1]; + uint32 m_auiEventTimer; + uint32 m_auiEventNPCId; + uint32 m_auiNorthrendBeasts; + uint8 Difficulty; + std::string m_strInstData; + bool needsave; + + uint32 m_uiDataDamageFjola; + uint32 m_uiDataDamageEydis; + uint32 m_uiFjolaCasting; + uint32 m_uiEydisCasting; + + uint32 m_auiCrusadersCount; + + uint64 m_uiBarrentGUID; + uint64 m_uiTirionGUID; + uint64 m_uiFizzlebangGUID; + uint64 m_uiGarroshGUID; + uint64 m_uiRinnGUID; + uint64 m_uiLich0GUID; + uint64 m_uiLich1GUID; + + uint64 m_uiGormokGUID; + uint64 m_uiAcidmawGUID; + uint64 m_uiDreadscaleGUID; + uint64 m_uiIcehowlGUID; + uint64 m_uiJaraxxusGUID; + uint64 m_uiDarkbaneGUID; + uint64 m_uiLightbaneGUID; + uint64 m_uiAnubarakGUID; - uint32 m_auiEncounter[MAX_ENCOUNTER]; - std::string strInstData; + uint64 m_uiCrusader11Guid; + uint64 m_uiCrusader12Guid; + uint64 m_uiCrusader13Guid; + uint64 m_uiCrusader14Guid; + uint64 m_uiCrusader15Guid; + uint64 m_uiCrusader16Guid; + uint64 m_uiCrusader17Guid; + uint64 m_uiCrusader18Guid; + uint64 m_uiCrusader19Guid; + uint64 m_uiCrusader1aGuid; + + uint64 m_uiCrusader21Guid; + uint64 m_uiCrusader22Guid; + uint64 m_uiCrusader23Guid; + uint64 m_uiCrusader24Guid; + uint64 m_uiCrusader25Guid; + uint64 m_uiCrusader26Guid; + uint64 m_uiCrusader27Guid; + uint64 m_uiCrusader28Guid; + uint64 m_uiCrusader29Guid; + uint64 m_uiCrusader2aGuid; + + uint64 m_uiCrusader01Guid; + uint64 m_uiCrusader02Guid; + + uint64 m_uiCrusadersCacheGUID; + uint64 m_uiFloorGUID; + + uint64 m_uiTC10h25GUID; + uint64 m_uiTC10h45GUID; + uint64 m_uiTC10h50GUID; + uint64 m_uiTC10h99GUID; + + uint64 m_uiTC25h25GUID; + uint64 m_uiTC25h45GUID; + uint64 m_uiTC25h50GUID; + uint64 m_uiTC25h99GUID; + + uint64 m_uiTributeChest1GUID; + uint64 m_uiTributeChest2GUID; + uint64 m_uiTributeChest3GUID; + uint64 m_uiTributeChest4GUID; + + uint64 m_uiMainGateDoorGUID; - uint32 m_uiGormokGUID; - uint32 m_uiAcidmawGUID; - uint32 m_uiDreadscaleGUID; - uint32 m_uiIcehowlGUID; - uint32 m_uiJaraxxusGUID; - uint32 m_uiFjolaGUID; - uint32 m_uiEydisGUID; - uint32 m_uiAnubarakGUID; void Initialize() { - memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + for (uint8 i = 0; i < MAX_ENCOUNTERS; ++i) + m_auiEncounter[i] = NOT_STARTED; + + m_auiEncounter[0] = 0; + m_auiEncounter[7] = 50; + m_auiEncounter[8] = 0; - m_uiGormokGUID = 0; - m_uiAcidmawGUID = 0; - m_uiDreadscaleGUID = 0; - m_uiIcehowlGUID = 0; - m_uiJaraxxusGUID = 0; - m_uiFjolaGUID = 0; - m_uiEydisGUID = 0; - m_uiAnubarakGUID = 0; + m_uiTributeChest1GUID = 0; + m_uiTributeChest2GUID = 0; + m_uiTributeChest3GUID = 0; + m_uiTributeChest4GUID = 0; + m_uiDataDamageFjola = 0; + m_uiDataDamageEydis = 0; + m_uiLich0GUID = 0; + m_uiLich1GUID = 0; + m_auiNorthrendBeasts = NOT_STARTED; + + m_auiEventTimer = 1000; + + m_auiCrusadersCount = 6; + + needsave = false; } - bool IsEncounterInProgress() const + void OnPlayerEnter(Player *m_player) { - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) - if (m_auiEncounter[i] == IN_PROGRESS) return true; - - return false; + if (Difficulty == RAID_DIFFICULTY_10MAN_HEROIC || Difficulty == RAID_DIFFICULTY_25MAN_HEROIC) + { + m_player->SendUpdateWorldState(UPDATE_STATE_UI_SHOW,1); + m_player->SendUpdateWorldState(UPDATE_STATE_UI_COUNT, GetData(TYPE_COUNTER)); + } } - void OnCreatureCreate(Creature* pCreature) + bool IsRaidWiped() { + Map::PlayerList const &players = instance->GetPlayers(); + + for (Map::PlayerList::const_iterator i = players.begin(); i != players.end(); ++i) + { + if(Player* pPlayer = i->getSource()) + { + if(pPlayer->isAlive()) + return false; + } + } + return true; + } + + void OnCreatureCreate(Creature* pCreature) + { switch(pCreature->GetEntry()) { - case 34796: m_uiGormokGUID = pCreature->GetGUID(); break; - case 35144: m_uiAcidmawGUID = pCreature->GetGUID(); break; - case 34799: m_uiDreadscaleGUID = pCreature->GetGUID(); break; - case 34797: m_uiIcehowlGUID = pCreature->GetGUID(); break; - case 34780: m_uiJaraxxusGUID = pCreature->GetGUID(); break; - case 34497: m_uiFjolaGUID = pCreature->GetGUID(); break; - case 34496: m_uiEydisGUID = pCreature->GetGUID(); break; - case 34564: m_uiAnubarakGUID = pCreature->GetGUID(); break; + case NPC_BARRENT: m_uiBarrentGUID = pCreature->GetGUID(); break; + case NPC_TIRION: m_uiTirionGUID = pCreature->GetGUID(); break; + case NPC_FIZZLEBANG: m_uiFizzlebangGUID = pCreature->GetGUID(); break; + case NPC_GARROSH: m_uiGarroshGUID = pCreature->GetGUID(); break; + case NPC_RINN: m_uiRinnGUID = pCreature->GetGUID(); break; + case NPC_LICH_KING_0: m_uiLich0GUID = pCreature->GetGUID(); break; + case NPC_LICH_KING_1: m_uiLich1GUID = pCreature->GetGUID(); break; + + case NPC_GORMOK: m_uiGormokGUID = pCreature->GetGUID(); break; + case NPC_ACIDMAW: m_uiAcidmawGUID = pCreature->GetGUID(); break; + case NPC_DREADSCALE: m_uiDreadscaleGUID = pCreature->GetGUID(); break; + case NPC_ICEHOWL: m_uiIcehowlGUID = pCreature->GetGUID(); break; + case NPC_JARAXXUS: m_uiJaraxxusGUID = pCreature->GetGUID(); break; + case NPC_DARKBANE: m_uiDarkbaneGUID = pCreature->GetGUID(); break; + case NPC_LIGHTBANE: m_uiLightbaneGUID = pCreature->GetGUID(); break; + case NPC_ANUBARAK: m_uiAnubarakGUID = pCreature->GetGUID(); break; + + case NPC_CRUSADER_1_1: m_uiCrusader11Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_1_2: m_uiCrusader12Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_1_3: m_uiCrusader13Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_1_4: m_uiCrusader14Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_1_5: m_uiCrusader15Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_1_6: m_uiCrusader16Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_1_7: m_uiCrusader17Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_1_8: m_uiCrusader18Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_1_9: m_uiCrusader19Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_1_10: m_uiCrusader1aGuid = pCreature->GetGUID(); break; + + case NPC_CRUSADER_2_1: m_uiCrusader21Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_2_2: m_uiCrusader22Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_2_3: m_uiCrusader23Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_2_4: m_uiCrusader24Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_2_5: m_uiCrusader25Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_2_6: m_uiCrusader26Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_2_7: m_uiCrusader27Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_2_8: m_uiCrusader28Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_2_9: m_uiCrusader29Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_2_10: m_uiCrusader2aGuid = pCreature->GetGUID(); break; + + case NPC_CRUSADER_0_1: m_uiCrusader01Guid = pCreature->GetGUID(); break; + case NPC_CRUSADER_0_2: m_uiCrusader02Guid = pCreature->GetGUID(); break; } } - void SetData(uint32 uiType, uint32 uiData) + void OnObjectCreate(GameObject *pGo) { - debug_log("SD2: Instance Trial Of The Crusader: SetData received for type %u with data %u",uiType,uiData); + switch(pGo->GetEntry()) + { + case GO_CRUSADERS_CACHE_10: + if(Difficulty == RAID_DIFFICULTY_10MAN_NORMAL) + m_uiCrusadersCacheGUID = pGo->GetGUID(); + break; + case GO_CRUSADERS_CACHE_25: + if(Difficulty == RAID_DIFFICULTY_25MAN_NORMAL) + m_uiCrusadersCacheGUID = pGo->GetGUID(); + break; + case GO_CRUSADERS_CACHE_10_H: + if(Difficulty == RAID_DIFFICULTY_10MAN_HEROIC) + m_uiCrusadersCacheGUID = pGo->GetGUID(); + break; + case GO_CRUSADERS_CACHE_25_H: + if(Difficulty == RAID_DIFFICULTY_25MAN_HEROIC) + m_uiCrusadersCacheGUID = pGo->GetGUID(); + break; + case GO_ARGENT_COLISEUM_FLOOR: + m_uiFloorGUID = pGo->GetGUID(); + break; + case GO_MAIN_GATE_DOOR: + m_uiMainGateDoorGUID = pGo->GetGUID(); + break; + + case GO_TRIBUTE_CHEST_10H_25: m_uiTC10h25GUID = pGo->GetGUID(); break; + case GO_TRIBUTE_CHEST_10H_45: m_uiTC10h45GUID = pGo->GetGUID(); break; + case GO_TRIBUTE_CHEST_10H_50: m_uiTC10h50GUID = pGo->GetGUID(); break; + case GO_TRIBUTE_CHEST_10H_99: m_uiTC10h99GUID = pGo->GetGUID(); break; + + case GO_TRIBUTE_CHEST_25H_25: m_uiTC25h25GUID = pGo->GetGUID(); break; + case GO_TRIBUTE_CHEST_25H_45: m_uiTC25h45GUID = pGo->GetGUID(); break; + case GO_TRIBUTE_CHEST_25H_50: m_uiTC25h50GUID = pGo->GetGUID(); break; + case GO_TRIBUTE_CHEST_25H_99: m_uiTC25h99GUID = pGo->GetGUID(); break; + } + } + void SetData(uint32 uiType, uint32 uiData) + { switch(uiType) { - case TYPE_NORTHREND_BEASTS: - m_auiEncounter[0] = uiData; - break; - case TYPE_JARAXXUS: - m_auiEncounter[1] = uiData; - break; - case TYPE_FACTION_CHAMPIONS: - m_auiEncounter[2] = uiData; - break; - case TYPE_TWIN_VALKYR: - m_auiEncounter[3] = uiData; - break; - case TYPE_ANUBARAK: - m_auiEncounter[4] = uiData; - break; - default: - error_log("SD2: Instance Trial of The Crusader: ERROR SetData = %u for type %u does not exist/not implemented.",uiType,uiData); - break; + case TYPE_STAGE: m_auiEncounter[0] = uiData; break; + case TYPE_BEASTS: m_auiEncounter[1] = uiData; break; + case TYPE_JARAXXUS: m_auiEncounter[2] = uiData; break; + case TYPE_CRUSADERS: if (uiData == FAIL && (m_auiEncounter[3] == FAIL || m_auiEncounter[3] == NOT_STARTED)) + m_auiEncounter[3] = NOT_STARTED; + else m_auiEncounter[3] = uiData; + if (uiData == DONE) { + if (GameObject* pChest = instance->GetGameObject(m_uiCrusadersCacheGUID)) + if (pChest && !pChest->isSpawned()) + pChest->SetRespawnTime(7*DAY); + }; + break; + case TYPE_CRUSADERS_COUNT: if (uiData == 0) --m_auiCrusadersCount; + else m_auiCrusadersCount = uiData; + break; + case TYPE_VALKIRIES: if (m_auiEncounter[4] == SPECIAL && uiData == SPECIAL) uiData = DONE; + m_auiEncounter[4] = uiData; break; + case TYPE_LICH_KING: m_auiEncounter[5] = uiData; break; + case TYPE_ANUBARAK: m_auiEncounter[6] = uiData; + if (uiData == DONE) { + if(Difficulty == RAID_DIFFICULTY_10MAN_HEROIC){ + if ( m_auiEncounter[7] >= 25) m_uiTributeChest1GUID = m_uiTC10h25GUID; + if ( m_auiEncounter[7] >= 45) m_uiTributeChest2GUID = m_uiTC10h45GUID; + if ( m_auiEncounter[7] >= 49) m_uiTributeChest3GUID = m_uiTC10h50GUID; + m_uiTributeChest4GUID = m_uiTC10h99GUID; + } + if(Difficulty == RAID_DIFFICULTY_25MAN_HEROIC){ + if ( m_auiEncounter[7] >= 25) m_uiTributeChest1GUID = m_uiTC25h25GUID; + if ( m_auiEncounter[7] >= 45) m_uiTributeChest2GUID = m_uiTC25h45GUID; + if ( m_auiEncounter[7] >= 49) m_uiTributeChest3GUID = m_uiTC25h50GUID; + m_uiTributeChest4GUID = m_uiTC25h99GUID; + } + // Attention! It is (may be) not off-like, but spawning all Tribute Chests is real + // reward for clearing TOC instance + if (m_uiTributeChest1GUID) + if (GameObject* pChest1 = instance->GetGameObject(m_uiTributeChest1GUID)) + if (pChest1 && !pChest1->isSpawned()) pChest1->SetRespawnTime(7*DAY); + if (m_uiTributeChest2GUID) + if (GameObject* pChest2 = instance->GetGameObject(m_uiTributeChest2GUID)) + if (pChest2 && !pChest2->isSpawned()) pChest2->SetRespawnTime(7*DAY); + if (m_uiTributeChest3GUID) + if (GameObject* pChest3 = instance->GetGameObject(m_uiTributeChest3GUID)) + if (pChest3 && !pChest3->isSpawned()) pChest3->SetRespawnTime(7*DAY); + if (m_uiTributeChest4GUID) + if (GameObject* pChest4 = instance->GetGameObject(m_uiTributeChest4GUID)) + if (pChest4 && !pChest4->isSpawned()) pChest4->SetRespawnTime(7*DAY); + }; + break; + case TYPE_COUNTER: m_auiEncounter[7] = uiData; uiData = DONE; break; + case TYPE_EVENT: m_auiEncounter[8] = uiData; uiData = NOT_STARTED; break; + case TYPE_EVENT_TIMER: m_auiEventTimer = uiData; uiData = NOT_STARTED; break; + case TYPE_NORTHREND_BEASTS: m_auiNorthrendBeasts = uiData; break; + case DATA_HEALTH_FJOLA: m_uiDataDamageFjola = uiData; uiData = NOT_STARTED; break; + case DATA_HEALTH_EYDIS: m_uiDataDamageEydis = uiData; uiData = NOT_STARTED; break; + case DATA_CASTING_FJOLA: m_uiFjolaCasting = uiData; uiData = NOT_STARTED; break; + case DATA_CASTING_EYDIS: m_uiEydisCasting = uiData; uiData = NOT_STARTED; break; } - if (uiData == DONE) + if (uiData == FAIL && uiType != TYPE_STAGE + && uiType != TYPE_EVENT + && uiType != TYPE_COUNTER + && uiType != TYPE_EVENT_TIMER) + { if (IsRaidWiped()) { --m_auiEncounter[7]; + needsave = true; + } + uiData = NOT_STARTED; + } + + if ((uiData == DONE && uiType != TYPE_STAGE + && uiType != TYPE_EVENT + && uiType != TYPE_EVENT_TIMER) + || needsave == true) { OUT_SAVE_INST_DATA; std::ostringstream saveStream; - saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " - << m_auiEncounter[3] << " " << m_auiEncounter[4]; - strInstData = saveStream.str(); + for(uint8 i = 0; i < MAX_ENCOUNTERS; ++i) + saveStream << m_auiEncounter[i] << " "; + + m_strInstData = saveStream.str(); SaveToDB(); OUT_SAVE_INST_DATA_COMPLETE; + needsave = false; } } - uint32 GetData(uint32 uiType) + uint64 GetData64(uint32 uiData) { - switch(uiType) + switch(uiData) { - case TYPE_NORTHREND_BEASTS: return m_auiEncounter[0]; - case TYPE_JARAXXUS: return m_auiEncounter[1]; - case TYPE_FACTION_CHAMPIONS: return m_auiEncounter[2]; - case TYPE_TWIN_VALKYR: return m_auiEncounter[3]; - case TYPE_ANUBARAK: return m_auiEncounter[4]; + case NPC_BARRENT: return m_uiBarrentGUID; + case NPC_TIRION: return m_uiTirionGUID; + case NPC_FIZZLEBANG: return m_uiFizzlebangGUID; + case NPC_GARROSH: return m_uiGarroshGUID; + case NPC_RINN: return m_uiRinnGUID; + case NPC_LICH_KING_0: return m_uiLich0GUID; + case NPC_LICH_KING_1: return m_uiLich1GUID; + + case NPC_GORMOK: return m_uiGormokGUID; + case NPC_ACIDMAW: return m_uiAcidmawGUID; + case NPC_DREADSCALE: return m_uiDreadscaleGUID; + case NPC_ICEHOWL: return m_uiIcehowlGUID; + case NPC_JARAXXUS: return m_uiJaraxxusGUID; + case NPC_DARKBANE: return m_uiDarkbaneGUID; + case NPC_LIGHTBANE: return m_uiLightbaneGUID; + case NPC_ANUBARAK: return m_uiAnubarakGUID; + + case NPC_CRUSADER_1_1: return m_uiCrusader11Guid; + case NPC_CRUSADER_1_2: return m_uiCrusader12Guid; + case NPC_CRUSADER_1_3: return m_uiCrusader13Guid; + case NPC_CRUSADER_1_4: return m_uiCrusader14Guid; + case NPC_CRUSADER_1_5: return m_uiCrusader15Guid; + case NPC_CRUSADER_1_6: return m_uiCrusader16Guid; + case NPC_CRUSADER_1_7: return m_uiCrusader17Guid; + case NPC_CRUSADER_1_8: return m_uiCrusader18Guid; + case NPC_CRUSADER_1_9: return m_uiCrusader19Guid; + case NPC_CRUSADER_1_10: return m_uiCrusader1aGuid; + + case NPC_CRUSADER_2_1: return m_uiCrusader21Guid; + case NPC_CRUSADER_2_2: return m_uiCrusader22Guid; + case NPC_CRUSADER_2_3: return m_uiCrusader23Guid; + case NPC_CRUSADER_2_4: return m_uiCrusader24Guid; + case NPC_CRUSADER_2_5: return m_uiCrusader25Guid; + case NPC_CRUSADER_2_6: return m_uiCrusader26Guid; + case NPC_CRUSADER_2_7: return m_uiCrusader27Guid; + case NPC_CRUSADER_2_8: return m_uiCrusader28Guid; + case NPC_CRUSADER_2_9: return m_uiCrusader29Guid; + case NPC_CRUSADER_2_10: return m_uiCrusader2aGuid; + + case NPC_CRUSADER_0_1: return m_uiCrusader01Guid; + case NPC_CRUSADER_0_2: return m_uiCrusader02Guid; + + case GO_ARGENT_COLISEUM_FLOOR: return m_uiFloorGUID; + case GO_MAIN_GATE_DOOR: return m_uiMainGateDoorGUID; + } return 0; } - uint64 GetData64(uint32 uiData) + uint32 GetData(uint32 uiType) { - switch(uiData) + switch(uiType) { - case DATA_GORMOK: return m_uiGormokGUID; - case DATA_ACIDMAW: return m_uiAcidmawGUID; - case DATA_DREADSCALE: return m_uiDreadscaleGUID; - case DATA_ICEHOWL: return m_uiIcehowlGUID; - case DATA_JARAXXUS: return m_uiJaraxxusGUID; - case DATA_FJOLA: return m_uiFjolaGUID; - case DATA_EYDIS: return m_uiEydisGUID; - case DATA_ANUBARAK: return m_uiAnubarakGUID; + case TYPE_STAGE: return m_auiEncounter[0]; + case TYPE_BEASTS: return m_auiEncounter[1]; + case TYPE_JARAXXUS: return m_auiEncounter[2]; + case TYPE_CRUSADERS: return m_auiEncounter[3]; + case TYPE_VALKIRIES: return m_auiEncounter[4]; + case TYPE_LICH_KING: return m_auiEncounter[5]; + case TYPE_ANUBARAK: return m_auiEncounter[6]; + case TYPE_COUNTER: return m_auiEncounter[7]; + case TYPE_EVENT: return m_auiEncounter[8]; + case TYPE_DIFFICULTY: return Difficulty; + case TYPE_NORTHREND_BEASTS: return m_auiNorthrendBeasts; + case TYPE_EVENT_TIMER: return m_auiEventTimer; + case TYPE_CRUSADERS_COUNT: return m_auiCrusadersCount; + case TYPE_EVENT_NPC: switch (m_auiEncounter[8]) + { + case 110: + case 140: + case 150: + case 200: + case 205: + case 210: + case 300: + case 305: + case 310: + case 400: + case 1010: + case 1180: + case 2000: + case 2030: + case 3000: + case 3001: + case 3060: + case 3061: + case 3090: + case 3091: + case 3100: + case 3110: + case 4000: + case 4010: + case 4015: + case 4040: + case 4050: + case 5000: + case 5020: + case 6000: + case 6005: + case 6010: + m_auiEventNPCId = NPC_TIRION; + break; + + case 5010: + case 5030: + case 5040: + case 5050: + case 5060: + case 5070: + case 5080: + m_auiEventNPCId = NPC_LICH_KING_1; + break; + + case 130: + case 132: + case 2020: + case 3080: + case 3051: + case 3071: + case 4020: + m_auiEventNPCId = NPC_RINN; + break; + + case 120: + case 122: + case 2010: + case 3050: + case 3070: + case 3081: + case 4030: + m_auiEventNPCId = NPC_GARROSH; + break; + + case 1110: + case 1120: + case 1130: + case 1135: + case 1140: + case 1150: + case 1160: + case 1170: + m_auiEventNPCId = NPC_FIZZLEBANG; + break; + + default: + m_auiEventNPCId = NPC_TIRION; + break; + + }; + return m_auiEventNPCId; + + case DATA_HEALTH_FJOLA: return m_uiDataDamageFjola; + case DATA_HEALTH_EYDIS: return m_uiDataDamageEydis; + case DATA_CASTING_FJOLA: return m_uiFjolaCasting; + case DATA_CASTING_EYDIS: return m_uiEydisCasting; } return 0; } const char* Save() { - return strInstData.c_str(); + return m_strInstData.c_str(); } - void Load(const char* chrIn) + void Load(const char* strIn) { - if (!chrIn) + if (!strIn) { OUT_LOAD_INST_DATA_FAIL; return; } - OUT_LOAD_INST_DATA(chrIn); + OUT_LOAD_INST_DATA(strIn); + + std::istringstream loadStream(strIn); - std::istringstream loadStream(chrIn); - loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] - >> m_auiEncounter[4]; + for(uint8 i = 0; i < MAX_ENCOUNTERS; ++i) + { + loadStream >> m_auiEncounter[i]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) - if (m_auiEncounter[i] == IN_PROGRESS) // Do not load an encounter as "In Progress" - reset it instead. + if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; + } + m_auiEncounter[TYPE_EVENT] = 0; + m_auiEncounter[TYPE_STAGE] = 0; OUT_LOAD_INST_DATA_COMPLETE; + } }; @@ -190,8 +541,7 @@ InstanceData* GetInstanceData_instance_trial_of_the_crusader(Map* pMap) void AddSC_instance_trial_of_the_crusader() { - Script* newscript; - + Script *newscript; newscript = new Script; newscript->Name = "instance_trial_of_the_crusader"; newscript->GetInstanceData = &GetInstanceData_instance_trial_of_the_crusader; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index ef1728989..1fa05adb0 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 +/* Copyright (C) 2006 - 2009 ScriptDev2 * 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 @@ -15,73 +15,1152 @@ */ /* ScriptData -SDName: trial_of_the_crusader -SD%Complete: 0 -SDComment: -SDCategory: Crusader Coliseum +SDName: Trial Of the crusader +SD%Complete: 60% +SDComment: event script by /dev/rsa +SDCategory: trial_of_the_crusader EndScriptData */ #include "precompiled.h" #include "trial_of_the_crusader.h" -#define GOSSIP_START_EVENT1 "Yes! We are ready to face the challenges ahead." +struct _Messages +{ + char const* name; + uint32 id; + bool state; + uint32 encounter; +}; +static _Messages _GossipMessage[]= +{ +{"Вы готовы пройти Испытание Крестоносца?",GOSSIP_ACTION_INFO_DEF+1,false,TYPE_BEASTS}, // +{"Вы готовы к следующему этапу?",GOSSIP_ACTION_INFO_DEF+2,false,TYPE_JARAXXUS}, // +{"Вы готовы драться с чемпионами Серебряного авангарда?",GOSSIP_ACTION_INFO_DEF+3,false,TYPE_CRUSADERS}, // +{"Вы готовы к следующему этапу?",GOSSIP_ACTION_INFO_DEF+4,false,TYPE_VALKIRIES}, // +{"Вы готовы продолжить бой с Ануб-Араком?",GOSSIP_ACTION_INFO_DEF+5,false,TYPE_ANUBARAK}, // +{"Не надо сюда тыкать. На сегодня арена закрыта.",GOSSIP_ACTION_INFO_DEF+6,true,TYPE_ANUBARAK}, // +}; enum { - NPC_GORMOK = 34796, - NPC_JARAXXUS = 34780 + NUM_MESSAGES = 6, }; -/*###### -## npc_crusader_anouncer -######*/ -struct MANGOS_DLL_DECL npc_crusader_anouncerAI : public ScriptedAI +struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI { - npc_crusader_anouncerAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + npc_toc_announcerAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } - ScriptedInstance* m_pInstance; + ScriptedInstance* pInstance; + uint32 DelayTimer; + uint32 substage; - void Reset() {} + void Reset() + { + if (!pInstance) return; + pInstance->SetData(TYPE_STAGE,0); + DelayTimer = 0; + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + if(Creature *pAlly = GetClosestCreatureWithEntry(m_creature, NPC_THRALL, 300.0f)) + pAlly->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + if(Creature *pAlly = GetClosestCreatureWithEntry(m_creature, NPC_PROUDMOORE, 300.0f)) + pAlly->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetRespawnDelay(DAY); + } + + void AttackStart(Unit *who) + { + //ignore all attackstart commands + return; + } - void StartEvent(Player* pPlayer) + void UpdateAI(const uint32 diff) { - // code starting the event here + if (!pInstance) return; + + if(DelayTimer < diff) { + switch (pInstance->GetData(TYPE_STAGE)) { + case 0: break; + case 1: { + if (pInstance->GetData(TYPE_NORTHREND_BEASTS) == GORMOK_DONE) { + pInstance->SetData(TYPE_STAGE,2); + pInstance->SetData(TYPE_EVENT,200); + pInstance->SetData(TYPE_NORTHREND_BEASTS,IN_PROGRESS); + pInstance->SetData(TYPE_BEASTS,IN_PROGRESS); + }; + if (pInstance->GetData(TYPE_NORTHREND_BEASTS) == FAIL) { + pInstance->SetData(TYPE_STAGE,0); + pInstance->SetData(TYPE_EVENT,0); + pInstance->SetData(TYPE_BEASTS,NOT_STARTED); + }; + break; + }; + case 2: { + if (pInstance->GetData(TYPE_NORTHREND_BEASTS) == SNAKES_DONE) { + pInstance->SetData(TYPE_STAGE,3); + pInstance->SetData(TYPE_EVENT,300); + pInstance->SetData(TYPE_NORTHREND_BEASTS,IN_PROGRESS); + pInstance->SetData(TYPE_BEASTS,IN_PROGRESS); + }; + if (pInstance->GetData(TYPE_NORTHREND_BEASTS) == FAIL) { + pInstance->SetData(TYPE_STAGE,0); + pInstance->SetData(TYPE_EVENT,0); + pInstance->SetData(TYPE_BEASTS,NOT_STARTED); + }; + break; + } + case 3: { + if (pInstance->GetData(TYPE_NORTHREND_BEASTS) == ICEHOWL_DONE) { + pInstance->SetData(TYPE_STAGE,0); + pInstance->SetData(TYPE_BEASTS,DONE); + pInstance->SetData(TYPE_EVENT,400); + pInstance->SetData(TYPE_NORTHREND_BEASTS,DONE); + } + if (pInstance->GetData(TYPE_NORTHREND_BEASTS) == FAIL) { + pInstance->SetData(TYPE_STAGE,0); + pInstance->SetData(TYPE_EVENT,0); + pInstance->SetData(TYPE_BEASTS,NOT_STARTED); + pInstance->SetData(TYPE_BEASTS,IN_PROGRESS); + }; + break; + }; + + case 4: { + break; + }; + + case 5: { + break; + }; + + case 6: { + if (pInstance->GetData(TYPE_CRUSADERS_COUNT) == 0 + && pInstance->GetData(TYPE_CRUSADERS) == IN_PROGRESS) + { + pInstance->SetData(TYPE_STAGE,0); + pInstance->SetData(TYPE_CRUSADERS,DONE); + pInstance->SetData(TYPE_EVENT,3100); + } + break; + }; + + case 7: { + if (pInstance->GetData(TYPE_VALKIRIES) == DONE) { + pInstance->SetData(TYPE_STAGE,0); + pInstance->SetData(TYPE_EVENT,4020); + } + break; + }; + case 8: { + break; + }; + case 9: { + if (pInstance->GetData(TYPE_ANUBARAK) == DONE) { + pInstance->SetData(TYPE_STAGE,10); + pInstance->SetData(TYPE_EVENT,6000); + } + break; + }; + case 10: { +// m_creature->ForcedDespawn(); + break; + }; + + } + } else DelayTimer -= diff; } }; -bool GossipHello_npc_crusader_anouncer(Player* pPlayer, Creature* pCreature) +CreatureAI* GetAI_npc_toc_announcer(Creature* pCreature) { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_START_EVENT1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + return new npc_toc_announcerAI(pCreature); +} + +bool GossipHello_npc_toc_announcer(Player* pPlayer, Creature* pCreature) +{ + + ScriptedInstance* pInstance; + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + + if (!pInstance) return false; + + if(!pPlayer->getAttackers().empty()) return true; + + for(uint8 i = 0; i < NUM_MESSAGES; i++) { + if (!_GossipMessage[i].state && (pInstance->GetData(_GossipMessage[i].encounter) != DONE )) { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, _GossipMessage[i].name, GOSSIP_SENDER_MAIN,_GossipMessage[i].id); + break; + } + if (_GossipMessage[i].state && pInstance->GetData(_GossipMessage[i].encounter) == DONE) { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, _GossipMessage[i].name, GOSSIP_SENDER_MAIN,_GossipMessage[i].id); + break; + } + }; pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + return true; } -bool GossipSelect_npc_crusader_anouncer(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +bool GossipSelect_npc_toc_announcer(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + ScriptedInstance* pInstance; + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + if (!pInstance) return false; + +pPlayer->CLOSE_GOSSIP_MENU(); + +switch(uiAction) { + case GOSSIP_ACTION_INFO_DEF+1: { + if (pInstance->GetData(TYPE_BEASTS) != DONE) { + pInstance->SetData(TYPE_EVENT,110); + pInstance->SetData(TYPE_NORTHREND_BEASTS,NOT_STARTED); + }; + break; + }; + + case GOSSIP_ACTION_INFO_DEF+2: { + if (pInstance->GetData(TYPE_JARAXXUS) != DONE) + pInstance->SetData(TYPE_EVENT,1010); + break; + }; + + case GOSSIP_ACTION_INFO_DEF+3: { + if (pInstance->GetData(TYPE_CRUSADERS) != DONE) { + if (pPlayer->GetTeam() == ALLIANCE) pInstance->SetData(TYPE_EVENT,3000); + else pInstance->SetData(TYPE_EVENT,3001); + }; + break; + }; + + case GOSSIP_ACTION_INFO_DEF+4: { + if (pInstance->GetData(TYPE_VALKIRIES) != DONE) + pInstance->SetData(TYPE_EVENT,4000); + break; + }; + + case GOSSIP_ACTION_INFO_DEF+5: { + if (pInstance->GetData(TYPE_LICH_KING) != DONE) return false; + if (GameObject* pGoFloor = pInstance->instance->GetGameObject(pInstance->GetData64(GO_ARGENT_COLISEUM_FLOOR))) + { + pGoFloor->SetUInt32Value(GAMEOBJECT_DISPLAYID,9060); + pGoFloor->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK_10 | GO_FLAG_NODESPAWN); + pGoFloor->SetUInt32Value(GAMEOBJECT_BYTES_1,8449); + } + pCreature->CastSpell(pCreature,69016,false); + + Creature* pTemp = (Creature*)Unit::GetUnit((*pCreature),pInstance->GetData64(NPC_ANUBARAK)); + if (!pTemp || !pTemp->isAlive()) + pCreature->SummonCreature(NPC_ANUBARAK, SpawnLoc[19].x, SpawnLoc[19].y, SpawnLoc[19].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (pTemp) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[20].x, SpawnLoc[20].y, SpawnLoc[20].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetInCombatWithZone(); + } + pInstance->SetData(TYPE_STAGE,9); + pInstance->SetData(TYPE_ANUBARAK,IN_PROGRESS); + if (pCreature->GetVisibility() == VISIBILITY_ON) + pCreature->SetVisibility(VISIBILITY_OFF); + break; + }; + + case GOSSIP_ACTION_INFO_DEF+6: { + pInstance->SetData(TYPE_STAGE,10); + break; + }; + + }; + +return true; +} + +struct MANGOS_DLL_DECL boss_lich_king_tocAI : public ScriptedAI +{ + boss_lich_king_tocAI(Creature *pCreature) : ScriptedAI(pCreature) { - pPlayer->CLOSE_GOSSIP_MENU(); - if (npc_crusader_anouncerAI* pCrusaderAnnouncerAI = dynamic_cast(pCreature->AI())) - pCrusaderAnnouncerAI->StartEvent(pPlayer); + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + WayPointList.clear(); + JustRespawned(); } - return true; + ScriptedInstance* pInstance; + uint32 UpdateTimer; + uint32 event_state_lich_king; + bool Event; + bool MovementStarted; + std::list WayPointList; + std::list::iterator WayPoint; + uint32 WalkTimer; + bool IsWalking; + Creature* pPortal; + + void Reset() + { + UpdateTimer = 0; + event_state_lich_king = 0; + Event = false; + MovementStarted = false; + m_creature->SetRespawnDelay(DAY); + pPortal = m_creature->SummonCreature(NPC_TRIGGER, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + pPortal->SetRespawnDelay(DAY); + pPortal->CastSpell(pPortal, 51807, false); + pPortal->SetDisplayId(17612); + if(pInstance) pInstance->SetData(TYPE_LICH_KING,IN_PROGRESS); + } + + void AttackStart(Unit *who) + { + //ignore all attackstart commands + return; + } + + void JustRespawned() + { + Reset(); + } + + void MoveInLineOfSight(Unit *who) + { + } + + void StartMovement() + { + if(!WayPointList.empty() || MovementStarted) + return; + + AddWaypoint(0, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z); + AddWaypoint(1, SpawnLoc[17].x, SpawnLoc[17].y, SpawnLoc[17].z); + AddWaypoint(2, SpawnLoc[18].x, SpawnLoc[18].y, SpawnLoc[18].z); + m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); + WayPoint = WayPointList.begin(); + MovementStarted = true; + IsWalking = true; + WalkTimer = 200; + event_state_lich_king = 1; + UpdateTimer = pInstance->GetData(TYPE_EVENT_TIMER); + } + + void AddWaypoint(uint32 id, float x, float y, float z) + { + WayPoints wp(id, x, y, z); + WayPointList.push_back(wp); + } + + void UpdateAI(const uint32 diff) + { + + if(!pInstance) return; + if (pInstance->GetData(TYPE_EVENT_NPC) != NPC_LICH_KING_1) return; + if (!MovementStarted) StartMovement(); + + if (IsWalking && WalkTimer) + { + if (WalkTimer <= diff) + { + if (WayPoint != WayPointList.end()) + { + m_creature->GetMotionMaster()->MovePoint(WayPoint->id, WayPoint->x, WayPoint->y,WayPoint->z); + WalkTimer = 0; + } + }else WalkTimer -= diff; + } + + UpdateTimer = pInstance->GetData(TYPE_EVENT_TIMER); + + if (UpdateTimer <= diff) + { + switch (pInstance->GetData(TYPE_EVENT)) + { + case 5010: + DoScriptText(-1713550,m_creature); + UpdateTimer = 3000; + pInstance->SetData(TYPE_EVENT,5020); + break; + case 5030: + DoScriptText(-1713552,m_creature); + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_TALK); + UpdateTimer = 10000; + pInstance->SetData(TYPE_EVENT,5040); + break; + case 5040: + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE); + UpdateTimer = 1000; + pInstance->SetData(TYPE_EVENT,5050); + break; + case 5050: + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION); + UpdateTimer = 3000; + pInstance->SetData(TYPE_EVENT,5060); + break; + case 5060: if (Event) { + DoScriptText(-1713553,m_creature); + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_KNEEL); + UpdateTimer = 2500; + pInstance->SetData(TYPE_EVENT,5070); + } + break; + case 5070: + m_creature->CastSpell(m_creature,68198,false); + UpdateTimer = 1500; + pInstance->SetData(TYPE_EVENT,5080); + break; + case 5080: + if (GameObject* pGoFloor = pInstance->instance->GetGameObject(pInstance->GetData64(GO_ARGENT_COLISEUM_FLOOR))) + { + pGoFloor->SetUInt32Value(GAMEOBJECT_DISPLAYID,9060); + pGoFloor->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK_10 | GO_FLAG_NODESPAWN); + pGoFloor->SetUInt32Value(GAMEOBJECT_BYTES_1,8449); + } + m_creature->CastSpell(m_creature,69016,false); + if(pInstance) pInstance->SetData(TYPE_LICH_KING,DONE); + + pInstance->SetData(TYPE_ANUBARAK,IN_PROGRESS); + m_creature->SummonCreature(NPC_ANUBARAK, SpawnLoc[19].x, SpawnLoc[19].y, SpawnLoc[19].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_ANUBARAK))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[20].x, SpawnLoc[20].y, SpawnLoc[20].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetInCombatWithZone(); + } + pInstance->SetData(TYPE_STAGE,9); + Event=false; + m_creature->ForcedDespawn(); + pPortal->ForcedDespawn(); + pInstance->SetData(TYPE_EVENT,5090); + UpdateTimer = 20000; + break; + } + } else UpdateTimer -= diff; + pInstance->SetData(TYPE_EVENT_TIMER, UpdateTimer); + + } + + void MovementInform(uint32 type, uint32 id) + { + if(pInstance) + { + if(id == 2) + { + Event = true; + } + } + if(type != POINT_MOTION_TYPE) return; + if(WayPoint->id != id) return; + ++WayPoint; + WalkTimer = 200; + } +}; + +CreatureAI* GetAI_boss_lich_king_toc(Creature* pCreature) +{ + return new boss_lich_king_tocAI(pCreature); +} + +struct MANGOS_DLL_DECL npc_fizzlebang_tocAI : public ScriptedAI +{ + npc_fizzlebang_tocAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)m_creature->GetInstanceData(); + Reset(); + } + + InstanceData* pInstance; + uint32 UpdateTimer; + Creature* pPortal; + + void JustDied(Unit* pKiller) + { + DoScriptText(-1713715, m_creature, pKiller); + pInstance->SetData(TYPE_EVENT, 1180); + if (pPortal) pPortal->ForcedDespawn(); + } + + void Reset() + { + m_creature->SetRespawnDelay(DAY); + m_creature->GetMotionMaster()->MovePoint(1, SpawnLoc[27].x, SpawnLoc[27].y, SpawnLoc[27].z); + pPortal = NULL; + } + + void UpdateAI(const uint32 diff) + { + if(!pInstance) return; + + if (pInstance->GetData(TYPE_EVENT_NPC) != NPC_FIZZLEBANG) return; + + UpdateTimer = pInstance->GetData(TYPE_EVENT_TIMER); + if(UpdateTimer <= diff) + { + switch(pInstance->GetData(TYPE_EVENT)) + { + case 1110: + pInstance->SetData(TYPE_EVENT, 1120); + UpdateTimer = 4000; + break; + case 1120: + DoScriptText(-1713511, m_creature); + pInstance->SetData(TYPE_EVENT, 1130); + UpdateTimer = 12000; + break; + case 1130: + m_creature->GetMotionMaster()->MovementExpired(); + pPortal = m_creature->SummonCreature(NPC_PORTAL, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (pPortal) pPortal->SetRespawnDelay(DAY); + DoScriptText(-1713512, m_creature); + pInstance->SetData(TYPE_EVENT, 1135); + UpdateTimer = 4000; + break; + case 1135: + m_creature->GetMotionMaster()->MovementExpired(); + if (pPortal) pPortal->SetDisplayId(15900); + pInstance->SetData(TYPE_EVENT, 1140); + UpdateTimer = 4000; + break; + case 1140: + m_creature->CastSpell(pPortal,69016,false); + pInstance->SetData(TYPE_STAGE,4); + pInstance->SetData(TYPE_JARAXXUS,IN_PROGRESS); + m_creature->SummonCreature(NPC_JARAXXUS, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_JARAXXUS))) { + pTemp->SetInCombatWithZone(); + m_creature->SetInCombatWith(pTemp); + pTemp->AddThreat(m_creature, 1000.0f); + pTemp->AI()->AttackStart(m_creature); + } + pInstance->SetData(TYPE_EVENT, 1150); + UpdateTimer = 500; + break; + case 1150: + DoScriptText(-1713513, m_creature); + pInstance->SetData(TYPE_EVENT, 1160); + UpdateTimer = 1000; + break; + case 1160: + DoScriptText(-1713515, m_creature); + pInstance->SetData(TYPE_EVENT, 1170); + UpdateTimer = 1000; + break; + case 1170: + pInstance->SetData(TYPE_EVENT, 1175); + UpdateTimer = 1000; + break; + } + } else UpdateTimer -= diff; + pInstance->SetData(TYPE_EVENT_TIMER, UpdateTimer); + } +}; + +CreatureAI* GetAI_npc_fizzlebang_toc(Creature* pCreature) +{ + return new npc_fizzlebang_tocAI(pCreature); } -CreatureAI* GetAI_npc_crusader_anouncer(Creature* pCreature) +struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI { - return new npc_crusader_anouncerAI(pCreature); + npc_tirion_tocAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)m_creature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* pInstance; + uint32 UpdateTimer; + + void Reset() + { + } + + void AttackStart(Unit *who) + { + //ignore all attackstart commands + return; + } + + void UpdateAI(const uint32 diff) + { + if (!pInstance) return; + if (pInstance->GetData(TYPE_EVENT_NPC) != NPC_TIRION) return; + + UpdateTimer = pInstance->GetData(TYPE_EVENT_TIMER); + + if (UpdateTimer <= diff) + { + switch (pInstance->GetData(TYPE_EVENT)) + { + case 110: + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_TALK); + DoScriptText(-1713500, m_creature); + UpdateTimer = 10000; + pInstance->SetData(TYPE_EVENT,120); + break; + case 140: + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_TALK); + DoScriptText(-1713501, m_creature); + UpdateTimer = 8000; + pInstance->SetData(TYPE_EVENT,150); + pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_MAIN_GATE_DOOR)); + break; + case 150: + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE); + if (pInstance->GetData(TYPE_BEASTS) != DONE) { + m_creature->SummonCreature(NPC_GORMOK, SpawnLoc[26].x, SpawnLoc[26].y, SpawnLoc[26].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_GORMOK))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetInCombatWithZone(); + } + } + UpdateTimer = 10000; + pInstance->SetData(TYPE_EVENT,160); + pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_MAIN_GATE_DOOR)); + pInstance->SetData(TYPE_STAGE,1); + pInstance->SetData(TYPE_BEASTS,IN_PROGRESS); + break; + + case 200: + DoScriptText(-1713503, m_creature); + UpdateTimer = 10000; + pInstance->SetData(TYPE_EVENT,205); + break; + + case 205: + UpdateTimer = 8000; + pInstance->SetData(TYPE_EVENT,210); + pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_MAIN_GATE_DOOR)); + break; + + case 210: + if (pInstance->GetData(TYPE_BEASTS) != DONE){ + m_creature->SummonCreature(NPC_DREADSCALE, SpawnLoc[3].x, SpawnLoc[3].y, SpawnLoc[3].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + m_creature->SummonCreature(NPC_ACIDMAW, SpawnLoc[4].x, SpawnLoc[4].y, SpawnLoc[4].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_DREADSCALE))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetInCombatWithZone(); + } + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_ACIDMAW))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetInCombatWithZone(); + } + } + UpdateTimer = 10000; + pInstance->SetData(TYPE_EVENT,220); + pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_MAIN_GATE_DOOR)); + break; + case 300: + DoScriptText(-1713505, m_creature); + UpdateTimer = 15000; + pInstance->SetData(TYPE_EVENT,305); + break; + case 305: + UpdateTimer = 8000; + pInstance->SetData(TYPE_EVENT,310); + pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_MAIN_GATE_DOOR)); + break; + case 310: + if (pInstance->GetData(TYPE_BEASTS) != DONE) { + m_creature->SummonCreature(NPC_ICEHOWL, SpawnLoc[26].x, SpawnLoc[26].y, SpawnLoc[26].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_ICEHOWL))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetInCombatWithZone(); + } + } + UpdateTimer = 10000; + pInstance->SetData(TYPE_EVENT,320); + pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_MAIN_GATE_DOOR)); + break; + case 400: + DoScriptText(-1713509, m_creature); + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT,410); + break; + + case 1010: + DoScriptText(-1713510, m_creature); + UpdateTimer = 5000; + m_creature->SummonCreature(NPC_FIZZLEBANG, SpawnLoc[21].x, SpawnLoc[21].y, SpawnLoc[21].z, 2, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + pInstance->SetData(TYPE_EVENT,1110); + break; + + case 1180: + DoScriptText(-1713516, m_creature); + UpdateTimer = 3000; + pInstance->SetData(TYPE_EVENT,1190); + break; + + case 2000: + DoScriptText(-1713526, m_creature); + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT,2010); + break; + case 2030: + DoScriptText(-1713529, m_creature); + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT,2040); + break; + case 3000: + DoScriptText(-1713530, m_creature); + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT,3050); + break; + case 3001: + DoScriptText(-1713530, m_creature); + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT,3051); + break; + case 3060: + DoScriptText(-1713532, m_creature); + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT,3070); + break; + case 3061: + DoScriptText(-1713532, m_creature); + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT,3071); + break; +//Summoning crusaders + case 3091: + pInstance->SetData(TYPE_STAGE,6); + if (pInstance->GetData(TYPE_DIFFICULTY) == RAID_DIFFICULTY_25MAN_NORMAL + || pInstance->GetData(TYPE_DIFFICULTY) == RAID_DIFFICULTY_25MAN_HEROIC) + { + pInstance->SetData(TYPE_CRUSADERS_COUNT,12); + m_creature->SummonCreature(NPC_CRUSADER_1_7, SpawnLoc[9].x, SpawnLoc[9].y, SpawnLoc[9].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_7))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + } + m_creature->SummonCreature(NPC_CRUSADER_1_8, SpawnLoc[10].x, SpawnLoc[10].y, SpawnLoc[10].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_8))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + } + m_creature->SummonCreature(NPC_CRUSADER_1_9, SpawnLoc[11].x, SpawnLoc[11].y, SpawnLoc[11].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_9))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + } + m_creature->SummonCreature(NPC_CRUSADER_1_10, SpawnLoc[12].x, SpawnLoc[12].y, SpawnLoc[12].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_10))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + } + m_creature->SummonCreature(NPC_CRUSADER_0_1, SpawnLoc[13].x, SpawnLoc[13].y, SpawnLoc[13].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_0_1))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetRespawnDelay(DAY); + } + m_creature->SummonCreature(NPC_CRUSADER_0_2, SpawnLoc[14].x, SpawnLoc[14].y, SpawnLoc[14].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_0_2))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetRespawnDelay(DAY); + } + } + else pInstance->SetData(TYPE_CRUSADERS_COUNT,6); + m_creature->SummonCreature(NPC_CRUSADER_1_1, SpawnLoc[3].x, SpawnLoc[3].y, SpawnLoc[3].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_1))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + } + m_creature->SummonCreature(NPC_CRUSADER_1_2, SpawnLoc[4].x, SpawnLoc[4].y, SpawnLoc[4].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_2))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + } + m_creature->SummonCreature(NPC_CRUSADER_1_3, SpawnLoc[5].x, SpawnLoc[5].y, SpawnLoc[5].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_3))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + } + m_creature->SummonCreature(NPC_CRUSADER_1_4, SpawnLoc[6].x, SpawnLoc[6].y, SpawnLoc[6].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_4))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + } + m_creature->SummonCreature(NPC_CRUSADER_1_5, SpawnLoc[7].x, SpawnLoc[7].y, SpawnLoc[7].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_5))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + } + m_creature->SummonCreature(NPC_CRUSADER_1_6, SpawnLoc[8].x, SpawnLoc[8].y, SpawnLoc[8].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_6))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + } + UpdateTimer = 3000; + pInstance->SetData(TYPE_EVENT,3095); + pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_MAIN_GATE_DOOR)); + pInstance->SetData(TYPE_CRUSADERS,IN_PROGRESS); + break; + +//summoning crusaders + case 3090: + pInstance->SetData(TYPE_STAGE,6); + if (pInstance->GetData(TYPE_DIFFICULTY) == RAID_DIFFICULTY_25MAN_NORMAL + || pInstance->GetData(TYPE_DIFFICULTY) == RAID_DIFFICULTY_25MAN_HEROIC) + { + pInstance->SetData(TYPE_CRUSADERS_COUNT,12); + + m_creature->SummonCreature(NPC_CRUSADER_2_7, SpawnLoc[9].x, SpawnLoc[9].y, SpawnLoc[9].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_7))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + } + m_creature->SummonCreature(NPC_CRUSADER_2_8, SpawnLoc[10].x, SpawnLoc[10].y, SpawnLoc[10].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_8))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + } + m_creature->SummonCreature(NPC_CRUSADER_2_9, SpawnLoc[11].x, SpawnLoc[11].y, SpawnLoc[11].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_9))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + } + m_creature->SummonCreature(NPC_CRUSADER_2_10, SpawnLoc[12].x, SpawnLoc[12].y, SpawnLoc[12].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_10))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + } + m_creature->SummonCreature(NPC_CRUSADER_0_1, SpawnLoc[13].x, SpawnLoc[13].y, SpawnLoc[13].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_0_1))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + } + m_creature->SummonCreature(NPC_CRUSADER_0_2, SpawnLoc[14].x, SpawnLoc[14].y, SpawnLoc[14].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_0_2))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + } + } + else pInstance->SetData(TYPE_CRUSADERS_COUNT,6); + + m_creature->SummonCreature(NPC_CRUSADER_2_1, SpawnLoc[3].x, SpawnLoc[3].y, SpawnLoc[3].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_1))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + } + m_creature->SummonCreature(NPC_CRUSADER_2_2, SpawnLoc[4].x, SpawnLoc[4].y, SpawnLoc[4].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_2))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + } + m_creature->SummonCreature(NPC_CRUSADER_2_3, SpawnLoc[5].x, SpawnLoc[5].y, SpawnLoc[5].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_3))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + } + m_creature->SummonCreature(NPC_CRUSADER_2_4, SpawnLoc[6].x, SpawnLoc[6].y, SpawnLoc[6].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_4))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + } + m_creature->SummonCreature(NPC_CRUSADER_2_5, SpawnLoc[7].x, SpawnLoc[7].y, SpawnLoc[7].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_5))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + } + m_creature->SummonCreature(NPC_CRUSADER_2_6, SpawnLoc[8].x, SpawnLoc[8].y, SpawnLoc[8].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_6))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetInCombatWithZone(); + } + UpdateTimer = 3000; + pInstance->SetData(TYPE_EVENT,3095); + pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_MAIN_GATE_DOOR)); + pInstance->SetData(TYPE_CRUSADERS,IN_PROGRESS); + break; + +//Crusaders battle end + case 3100: + DoScriptText(-1713535, m_creature); + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT,3110); + break; + + case 4000: + DoScriptText(-1713536, m_creature); + UpdateTimer = 3000; + pInstance->SetData(TYPE_EVENT,4010); + break; + case 4010: + DoScriptText(-1713537, m_creature); + UpdateTimer = 10000; + pInstance->SetData(TYPE_EVENT,4015); + pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_MAIN_GATE_DOOR)); + break; + + case 4015: + pInstance->SetData(TYPE_STAGE,7); + pInstance->SetData(TYPE_VALKIRIES,IN_PROGRESS); + m_creature->SummonCreature(NPC_LIGHTBANE, SpawnLoc[3].x, SpawnLoc[3].y, SpawnLoc[3].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_LIGHTBANE))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetInCombatWithZone(); + } + m_creature->SummonCreature(NPC_DARKBANE, SpawnLoc[4].x, SpawnLoc[4].y, SpawnLoc[4].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_DARKBANE))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetInCombatWithZone(); + } + UpdateTimer = 10000; + pInstance->SetData(TYPE_EVENT,4016); + pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_MAIN_GATE_DOOR)); + break; + + case 4040: + UpdateTimer = 60000; + pInstance->SetData(TYPE_EVENT,5000); + break; + + case 5000: + DoScriptText(-1713549, m_creature); + UpdateTimer = 2000; + pInstance->SetData(TYPE_EVENT,5010); + pInstance->SetData(TYPE_STAGE,8); + m_creature->SummonCreature(NPC_LICH_KING_1, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 5, TEMPSUMMON_MANUAL_DESPAWN, 0); + break; + case 5020: + DoScriptText(-1713551, m_creature); + UpdateTimer = 8000; + pInstance->SetData(TYPE_EVENT,5030); + break; + case 6000: + m_creature->NearTeleportTo(SpawnLoc[19].x, SpawnLoc[19].y, SpawnLoc[19].z, 4.0f); + UpdateTimer = 20000; + pInstance->SetData(TYPE_EVENT,6005); + break; + case 6005: + DoScriptText(-1713565, m_creature); + UpdateTimer = 20000; + pInstance->SetData(TYPE_EVENT,6010); + break; + case 6010: + if (pInstance->GetData(TYPE_DIFFICULTY) == RAID_DIFFICULTY_10MAN_HEROIC + || pInstance->GetData(TYPE_DIFFICULTY) == RAID_DIFFICULTY_25MAN_HEROIC) + DoScriptText(-1713566, m_creature); + UpdateTimer = 60000; + pInstance->SetData(TYPE_EVENT,6020); + break; + case 6020: + pInstance->SetData(TYPE_STAGE,10); + m_creature->ForcedDespawn(); + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT,6030); + break; + } + } else UpdateTimer -= diff; + pInstance->SetData(TYPE_EVENT_TIMER, UpdateTimer); + + } +}; + +CreatureAI* GetAI_npc_tirion_toc(Creature* pCreature) +{ + return new npc_tirion_tocAI(pCreature); } +struct MANGOS_DLL_DECL npc_garrosh_tocAI : public ScriptedAI +{ + npc_garrosh_tocAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)m_creature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* pInstance; + uint32 UpdateTimer; + + void Reset() + { + } + + void AttackStart(Unit *who) + { + //ignore all attackstart commands + return; + } + + void UpdateAI(const uint32 diff) + { + if (!pInstance) return; + if (pInstance->GetData(TYPE_EVENT_NPC) != NPC_GARROSH) return; + + UpdateTimer = pInstance->GetData(TYPE_EVENT_TIMER); + + if (UpdateTimer <= diff) + { + switch (pInstance->GetData(TYPE_EVENT)) + { + case 120: + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_TALK); + DoScriptText(-1713702, m_creature); + UpdateTimer = 2000; + pInstance->SetData(TYPE_EVENT,122); + break; + case 122: + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE); + UpdateTimer = 3000; + pInstance->SetData(TYPE_EVENT,130); + break; + case 2010: + DoScriptText(-1713527, m_creature); + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT,2020); + break; + case 3050: + DoScriptText(-1713531, m_creature); + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT,3060); + break; + case 3070: + DoScriptText(-1713533, m_creature); + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT,3080); + break; + case 3081: + DoScriptText(-1713734, m_creature); + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT,3091); + pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_MAIN_GATE_DOOR)); + break; + case 4030: + DoScriptText(-1713748, m_creature); + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT,4040); + break; + } + } else UpdateTimer -= diff; + pInstance->SetData(TYPE_EVENT_TIMER, UpdateTimer); + } +}; + +CreatureAI* GetAI_npc_garrosh_toc(Creature* pCreature) +{ + return new npc_garrosh_tocAI(pCreature); +}; + +struct MANGOS_DLL_DECL npc_rinn_tocAI : public ScriptedAI +{ + npc_rinn_tocAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)m_creature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* pInstance; + uint32 UpdateTimer; + + void Reset() + { + } + + void AttackStart(Unit *who) + { + //ignore all attackstart commands + return; + } + + void UpdateAI(const uint32 diff) + { + if (!pInstance) return; + if (pInstance->GetData(TYPE_EVENT_NPC) != NPC_RINN) return; + + UpdateTimer = pInstance->GetData(TYPE_EVENT_TIMER); + + if (UpdateTimer <= diff) + { + switch (pInstance->GetData(TYPE_EVENT)) + { + case 130: + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_TALK); + DoScriptText(-1713502, m_creature); + UpdateTimer = 2000; + pInstance->SetData(TYPE_EVENT,132); + break; + case 132: + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE); + UpdateTimer = 3000; + pInstance->SetData(TYPE_EVENT,140); + break; + case 2020: + DoScriptText(-1713528, m_creature); + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT,2030); + break; + case 3051: + DoScriptText(-1713731, m_creature); + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT,3061); + break; + case 3071: + DoScriptText(-1713733, m_creature); + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT,3081); + break; + case 3080: + DoScriptText(-1713534, m_creature); + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT,3090); + pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_MAIN_GATE_DOOR)); + break; + case 4020: + DoScriptText(-1713548, m_creature); + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT,4030); + break; + } + } else UpdateTimer -= diff; + pInstance->SetData(TYPE_EVENT_TIMER,UpdateTimer); + } +}; + +CreatureAI* GetAI_npc_rinn_toc(Creature* pCreature) +{ + return new npc_rinn_tocAI(pCreature); +}; + void AddSC_trial_of_the_crusader() { - Script* newscript; + Script* NewScript; - newscript = new Script; - newscript->Name = "npc_crusader_anouncer"; - newscript->GetAI = &GetAI_npc_crusader_anouncer; - newscript->pGossipHello = &GossipHello_npc_crusader_anouncer; - newscript->pGossipSelect = &GossipSelect_npc_crusader_anouncer; - newscript->RegisterSelf(); -} + NewScript = new Script; + NewScript->Name = "npc_toc_announcer"; + NewScript->GetAI = &GetAI_npc_toc_announcer; + NewScript->pGossipHello = &GossipHello_npc_toc_announcer; + NewScript->pGossipSelect = &GossipSelect_npc_toc_announcer; + NewScript->RegisterSelf(); + + NewScript = new Script; + NewScript->Name = "boss_lich_king_toc"; + NewScript->GetAI = &GetAI_boss_lich_king_toc; + NewScript->RegisterSelf(); + + NewScript = new Script; + NewScript->Name = "npc_fizzlebang_toc"; + NewScript->GetAI = &GetAI_npc_fizzlebang_toc; + NewScript->RegisterSelf(); + + NewScript = new Script; + NewScript->Name = "npc_tirion_toc"; + NewScript->GetAI = &GetAI_npc_tirion_toc; + NewScript->RegisterSelf(); + + NewScript = new Script; + NewScript->Name = "npc_garrosh_toc"; + NewScript->GetAI = &GetAI_npc_garrosh_toc; + NewScript->RegisterSelf(); + + NewScript = new Script; + NewScript->Name = "npc_rinn_toc"; + NewScript->GetAI = &GetAI_npc_rinn_toc; + NewScript->RegisterSelf(); +} \ No newline at end of file diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index 20ec79ffe..d59dcecba 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -1,29 +1,156 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 +/* Copyright (C) 2009 - 2010 by /dev/rsa for ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ -#ifndef DEF_TRIAL_OF_THE_CRUSADER_H -#define DEF_TRIAL_OF_THE_CRUSADER_H +#ifndef DEF_CRUSADER_H +#define DEF_CRUSADER_H +#include "sc_boss_spell_worker.h" enum { - MAX_ENCOUNTER = 5, - - TYPE_NORTHREND_BEASTS = 1, - TYPE_JARAXXUS = 2, - TYPE_FACTION_CHAMPIONS = 3, - TYPE_TWIN_VALKYR = 4, - TYPE_ANUBARAK = 5, - - DATA_GORMOK = 6, - DATA_ACIDMAW = 7, - DATA_DREADSCALE = 8, - DATA_ICEHOWL = 9, - DATA_JARAXXUS = 10, - DATA_FACTION_CHAMPIONS = 11, - DATA_FJOLA = 12, - DATA_EYDIS = 13, - DATA_ANUBARAK = 14, + TYPE_STAGE = 0, + TYPE_BEASTS = 1, + TYPE_JARAXXUS = 2, + TYPE_CRUSADERS = 3, + TYPE_VALKIRIES = 4, + TYPE_LICH_KING = 5, + TYPE_ANUBARAK = 6, + TYPE_COUNTER = 7, + TYPE_EVENT = 8, + MAX_ENCOUNTERS = 9, + + NPC_BARRENT = 34816, + NPC_TIRION = 34996, + NPC_FIZZLEBANG = 35458, + NPC_GARROSH = 34995, + NPC_RINN = 34990, + NPC_LICH_KING_0 = 16980, + NPC_LICH_KING_1 = 35877, + + NPC_THRALL = 34994, + NPC_PROUDMOORE = 34992, + NPC_PORTAL = 19224, + NPC_TRIGGER = 22517, + + NPC_ICEHOWL = 34797, + NPC_GORMOK = 34796, + NPC_DREADSCALE = 34799, + NPC_ACIDMAW = 35144, + + NPC_JARAXXUS = 34780, + + NPC_CRUSADER_1_1 = 34460, + NPC_CRUSADER_1_2 = 34463, + NPC_CRUSADER_1_3 = 34461, + NPC_CRUSADER_1_4 = 34471, + NPC_CRUSADER_1_5 = 34475, + NPC_CRUSADER_1_6 = 34472, + NPC_CRUSADER_1_7 = 34467, + NPC_CRUSADER_1_8 = 34468, + NPC_CRUSADER_1_9 = 34473, + NPC_CRUSADER_1_10 = 34474, + + NPC_CRUSADER_2_1 = 34453, + NPC_CRUSADER_2_2 = 34455, + NPC_CRUSADER_2_3 = 34458, + NPC_CRUSADER_2_4 = 34454, + NPC_CRUSADER_2_5 = 34451, + NPC_CRUSADER_2_6 = 34456, + NPC_CRUSADER_2_7 = 34441, + NPC_CRUSADER_2_8 = 34449, + NPC_CRUSADER_2_9 = 34448, + NPC_CRUSADER_2_10 = 34450, + + NPC_CRUSADER_0_1 = 35465, + NPC_CRUSADER_0_2 = 35610, + + NPC_LIGHTBANE = 34497, + NPC_DARKBANE = 34496, + + NPC_ANUBARAK = 34564, + + GO_CRUSADERS_CACHE_10 = 195631, + GO_CRUSADERS_CACHE_25 = 195632, + GO_CRUSADERS_CACHE_10_H = 195633, + GO_CRUSADERS_CACHE_25_H = 195635, + + GO_TRIBUTE_CHEST_10H_25 = 195665, + GO_TRIBUTE_CHEST_10H_45 = 195666, + GO_TRIBUTE_CHEST_10H_50 = 195667, + GO_TRIBUTE_CHEST_10H_99 = 195668, + + GO_TRIBUTE_CHEST_25H_25 = 195669, + GO_TRIBUTE_CHEST_25H_45 = 195670, + GO_TRIBUTE_CHEST_25H_50 = 195671, + GO_TRIBUTE_CHEST_25H_99 = 195672, + + GO_ARGENT_COLISEUM_FLOOR = 195527, //20943 + GO_MAIN_GATE_DOOR = 195647, + + TYPE_DIFFICULTY = 101, + TYPE_EVENT_TIMER = 102, + TYPE_EVENT_NPC = 103, + TYPE_NORTHREND_BEASTS = 104, + TYPE_CRUSADERS_COUNT = 105, + + DATA_HEALTH_EYDIS = 201, + DATA_HEALTH_FJOLA = 202, + DATA_CASTING_EYDIS = 203, + DATA_CASTING_FJOLA = 204, + + DESPAWN_TIME = 300000, + +}; + +static Locations SpawnLoc[]= +{ + {559.257996, 90.266197, 395.122986}, // 0 Barrent + {563.672974, 139.571, 393.837006}, // 1 Center + {563.833008, 187.244995, 394.5}, // 2 Backdoor + {577.347839, 195.338888, 395.14}, // 3 - Right + {550.955933, 195.338888, 395.14}, // 4 - Left + {575.042358, 195.260727, 395.137146}, // 5 + {552.248901, 195.331955, 395.132658}, // 6 + {573.342285, 195.515823, 395.135956}, // 7 + {554.239929, 195.825577, 395.137909}, // 8 + {571.042358, 195.260727, 395.137146}, // 9 + {556.720581, 195.015472, 395.132658}, // 10 + {569.534119, 195.214478, 395.139526}, // 11 + {569.231201, 195.941071, 395.139526}, // 12 + {558.811610, 195.985779, 394.671661}, // 13 + {567.641724, 195.351501, 394.659943}, // 14 + {560.633972, 195.391708, 395.137543}, // 15 + {565.816956, 195.477921, 395.136810}, // 16 + {563.549, 152.474, 394.393}, // 17 - Lich king start + {563.547, 141.613, 393.908}, // 18 - Lich king end + {787.932556, 133.28978, 142.612152}, // 19 - Anub'arak start location + {618.157898, 132.640869, 139.559769}, // 20 - Anub'arak move point location + {508.104767, 138.247345, 395.128052}, // 21 - Fizzlebang start location + {586.060242, 117.514809, 394.314026}, // 22 - Dark essence 1 + {541.602112, 161.879837, 394.587952}, // 23 - Dark essence 2 + {541.021118, 117.262932, 395.314819}, // 24 - Light essence 1 + {586.200562, 162.145523, 394.626129}, // 25 - Light essence 2 + {563.833008, 195.244995, 394.585561}, // 26 - outdoor + {548.610596, 139.807800, 394.321838}, // 27 - fizzlebang end +}; + +enum uiWorldStates +{ + UPDATE_STATE_UI_SHOW = 4390, + UPDATE_STATE_UI_COUNT = 4389, +}; + +enum NorthrendBeasts +{ + GORMOK_IN_PROGRESS = 1000, + GORMOK_DONE = 1001, + SNAKES_IN_PROGRESS = 2000, + DREADSCALE_SUBMERGED = 2001, + ACIDMAW_SUBMERGED = 2002, + SNAKES_SPECIAL = 2003, + SNAKES_DONE = 2004, + ICEHOWL_IN_PROGRESS = 3000, + ICEHOWL_DONE = 3001, }; #endif diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index f8806ce39..e74f2aef6 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -266,6 +266,7 @@ extern void AddSC_boss_jaraxxus(); extern void AddSC_boss_anubarak_trial(); extern void AddSC_twin_valkyr(); extern void AddSC_instance_trial_of_the_crusader(); +extern void AddSC_trial_of_the_crusader(); extern void AddSC_boss_novos(); //draktharon_keep extern void AddSC_boss_tharonja(); extern void AddSC_boss_trollgore(); @@ -670,6 +671,7 @@ void AddScripts() AddSC_boss_anubarak_trial(); AddSC_twin_valkyr(); AddSC_instance_trial_of_the_crusader(); + AddSC_trial_of_the_crusader(); AddSC_boss_novos(); //draktharon_keep AddSC_boss_tharonja(); AddSC_boss_trollgore(); From 98e99121087493b83dfd2be97e483a0138166d4a Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Fri, 16 Apr 2010 19:08:25 +0400 Subject: [PATCH 239/405] Configs for Windows compilers (not tested!) --- VC80/80ScriptDev2.vcproj | 8 ++++++++ VC90/90ScriptDev2.vcproj | 10 +++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/VC80/80ScriptDev2.vcproj b/VC80/80ScriptDev2.vcproj index 44a1f3f85..5108f167c 100644 --- a/VC80/80ScriptDev2.vcproj +++ b/VC80/80ScriptDev2.vcproj @@ -2697,6 +2697,14 @@ RelativePath="..\include\sc_instance.h" > + + + + - + + + + Date: Fri, 16 Apr 2010 20:00:55 +0400 Subject: [PATCH 240/405] Added README --- README | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 README diff --git a/README b/README new file mode 100644 index 000000000..d9d1052f4 --- /dev/null +++ b/README @@ -0,0 +1,35 @@ +@package Trial of the Crusader scripts for ScriptDev2 +@version 0.2 +@revision 43 +@copyright (c) 2010 /dev/rsa +@license GNU Public License + +SDName: trial_of_the_crusader +SD%Complete: 80% +SDComment: by /dev/rsa +SDCategory: Full scripts for Crusaders Coliseum instance in WOTLK +EndScriptData + +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, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Thanks to: +- Vladimir Mangos - MaNGOS project; +- griffonheart (original texts/sounds); +- Cristy (re-translation to english); +- Selector - Faction champions base script; +- Boxa - changes for Windows compilers and bugreports; +- Dron01 - bugreports and valuable advice; +- gladden, ghostart - bugreports; +- all - testing. From c1ed34ee6787e1c8c94ad8cf330cd261a1910748 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Fri, 16 Apr 2010 20:13:07 +0400 Subject: [PATCH 241/405] Small change --- VC90/90ScriptDev2.vcproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VC90/90ScriptDev2.vcproj b/VC90/90ScriptDev2.vcproj index d8db89ece..61a5d5c13 100644 --- a/VC90/90ScriptDev2.vcproj +++ b/VC90/90ScriptDev2.vcproj @@ -33,7 +33,7 @@ - Tool + Date: Sun, 18 Apr 2010 11:31:14 +0400 Subject: [PATCH 242/405] Restore compile, sorry. --- ScriptMgr.h | 1 + 1 file changed, 1 insertion(+) diff --git a/ScriptMgr.h b/ScriptMgr.h index c3ec650c1..c361b4b67 100644 --- a/ScriptMgr.h +++ b/ScriptMgr.h @@ -7,6 +7,7 @@ #include "Common.h" #include "DBCStructure.h" +#include "Database/DatabaseEnv.h" class Player; class Creature; From b97c3cb375ff824b79a39e45524cd3e8afa0f605 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sun, 18 Apr 2010 11:37:24 +0400 Subject: [PATCH 243/405] Another small change (from Insider42) --- include/sc_boss_spell_worker.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index 25ff4a7bc..4d4f633b4 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -1,12 +1,10 @@ /* Copyright (C) 2009 - 2010 by /dev/rsa for ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ -#include "sc_boss_spell_worker.h" #include "precompiled.h" +#include "sc_boss_spell_worker.h" #ifdef DEF_BOSS_SPELL_WORKER_H -//extern DatabaseType SD2Database; - BossSpellWorker::BossSpellWorker(ScriptedAI* bossAI) { boss = bossAI->m_creature; From 040a088172b73ac07afbb47b23eb27c54b91b6d4 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sun, 18 Apr 2010 11:44:04 +0400 Subject: [PATCH 244/405] Make VC happy (from Insider42) --- .../trial_of_the_crusader.h | 56 +++++++++---------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index d59dcecba..78ec485c9 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -104,34 +104,34 @@ enum static Locations SpawnLoc[]= { - {559.257996, 90.266197, 395.122986}, // 0 Barrent - {563.672974, 139.571, 393.837006}, // 1 Center - {563.833008, 187.244995, 394.5}, // 2 Backdoor - {577.347839, 195.338888, 395.14}, // 3 - Right - {550.955933, 195.338888, 395.14}, // 4 - Left - {575.042358, 195.260727, 395.137146}, // 5 - {552.248901, 195.331955, 395.132658}, // 6 - {573.342285, 195.515823, 395.135956}, // 7 - {554.239929, 195.825577, 395.137909}, // 8 - {571.042358, 195.260727, 395.137146}, // 9 - {556.720581, 195.015472, 395.132658}, // 10 - {569.534119, 195.214478, 395.139526}, // 11 - {569.231201, 195.941071, 395.139526}, // 12 - {558.811610, 195.985779, 394.671661}, // 13 - {567.641724, 195.351501, 394.659943}, // 14 - {560.633972, 195.391708, 395.137543}, // 15 - {565.816956, 195.477921, 395.136810}, // 16 - {563.549, 152.474, 394.393}, // 17 - Lich king start - {563.547, 141.613, 393.908}, // 18 - Lich king end - {787.932556, 133.28978, 142.612152}, // 19 - Anub'arak start location - {618.157898, 132.640869, 139.559769}, // 20 - Anub'arak move point location - {508.104767, 138.247345, 395.128052}, // 21 - Fizzlebang start location - {586.060242, 117.514809, 394.314026}, // 22 - Dark essence 1 - {541.602112, 161.879837, 394.587952}, // 23 - Dark essence 2 - {541.021118, 117.262932, 395.314819}, // 24 - Light essence 1 - {586.200562, 162.145523, 394.626129}, // 25 - Light essence 2 - {563.833008, 195.244995, 394.585561}, // 26 - outdoor - {548.610596, 139.807800, 394.321838}, // 27 - fizzlebang end + {559.257996f, 90.266197f, 395.122986f}, // 0 Barrent + {563.672974f, 139.571f, 393.837006f}, // 1 Center + {563.833008f, 187.244995f, 394.5f}, // 2 Backdoor + {577.347839f, 195.338888f, 395.14f}, // 3 - Right + {550.955933f, 195.338888f, 395.14f}, // 4 - Left + {575.042358f, 195.260727f, 395.137146f}, // 5 + {552.248901f, 195.331955f, 395.132658f}, // 6 + {573.342285f, 195.515823f, 395.135956f}, // 7 + {554.239929f, 195.825577f, 395.137909f}, // 8 + {571.042358f, 195.260727f, 395.137146f}, // 9 + {556.720581f, 195.015472f, 395.132658f}, // 10 + {569.534119f, 195.214478f, 395.139526f}, // 11 + {569.231201f, 195.941071f, 395.139526f}, // 12 + {558.811610f, 195.985779f, 394.671661f}, // 13 + {567.641724f, 195.351501f, 394.659943f}, // 14 + {560.633972f, 195.391708f, 395.137543f}, // 15 + {565.816956f, 195.477921f, 395.136810f}, // 16 + {563.549f, 152.474f, 394.393f}, // 17 - Lich king start + {563.547f, 141.613f, 393.908f}, // 18 - Lich king end + {787.932556f, 133.28978f, 142.612152f}, // 19 - Anub'arak start location + {618.157898f, 132.640869f, 139.559769f}, // 20 - Anub'arak move point location + {508.104767f, 138.247345f, 395.128052f}, // 21 - Fizzlebang start location + {586.060242f, 117.514809f, 394.314026f}, // 22 - Dark essence 1 + {541.602112f, 161.879837f, 394.587952f}, // 23 - Dark essence 2 + {541.021118f, 117.262932f, 395.314819f}, // 24 - Light essence 1 + {586.200562f, 162.145523f, 394.626129f}, // 25 - Light essence 2 + {563.833008f, 195.244995f, 394.585561f}, // 26 - outdoor + {548.610596f, 139.807800f, 394.321838f}, // 27 - fizzlebang end }; enum uiWorldStates From 3ab85d7cbeb5f7f36f824e6aa2e37af48148494d Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Mon, 19 Apr 2010 17:38:39 +0400 Subject: [PATCH 245/405] ICC 19 --- addition/721_icecrown_scriptdev2.sql | 61 ++++++++++--------- .../721_icecrown_spelltable_scriptdev2.sql | 4 +- include/sc_boss_spell_worker.cpp | 6 +- include/sc_boss_spell_worker.h | 6 +- .../boss_twin_valkyr.cpp | 4 +- .../icecrown_citadel/boss_festergut.cpp | 4 ++ 6 files changed, 46 insertions(+), 39 deletions(-) diff --git a/addition/721_icecrown_scriptdev2.sql b/addition/721_icecrown_scriptdev2.sql index f62a2e894..4915abbf7 100644 --- a/addition/721_icecrown_scriptdev2.sql +++ b/addition/721_icecrown_scriptdev2.sql @@ -1,31 +1,32 @@ +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1631200 AND -1631000; INSERT INTO `script_texts` (`entry`,`content_loc8`, `content_default`, `sound`, `type`, `language`, `emote`, `comment`) VALUES -('-1631000','Это начало и конец, смертные. Никто не может войти в Храм!','This is the beginning AND the end, mortals. None may enter the master\'s sanctum!','16950','1','0','0','marrowgar SAY_INTRO'), -('-1631001','Проклятые несут миру смерть и разрушение!','The Scourge will wash over this world as a swarm of death and destruction!','16941','1','0','0','marrowgar SAY_AGGRO'), -('-1631002','Шторм костей!','BONE STORM!','16946','1','0','0','marrowgar SAY_BONESTORM'), -('-1631003','Проткнут костью!','Bound by bone!','16947','1','0','0','marrowgar SAY_BONESPIKE1'), -('-1631004','Кости вокруг!','Stick Around!','16948','1','0','0','marrowgar SAY_BONESPIKE2'), -('-1631005','Выход - только смерть!','The only escape is death!','16949','1','0','0','marrowgar SAY_BONESPIKE3'), -('-1631006','Больше костей!','More bones for the offering!','16942','1','0','0','marrowgar SAY_KILL1'), -('-1631007','','Languish in damnation!','16943','1','0','0','marrowgar SAY_KILL2'), -('-1631008','ЯРОСТЬ МАСТЕРА ТЕЧЕТ ЧЕРЕЗ МЕНЯ!','THE MASTER\'S RAGE COURSES THROUGH ME!','16945','1','0','0','marrowgar SAY_ENRAGE'), -('-1631009','Я вижу... Только тьму...','I see... only darkness...','16944','1','0','0','marrowgar SAY_DEATH'), -('-1631020','','Fix your eyes upon your crude hands! The sinew, the soft meat, the dark blood coursing within! It is a weakness! A crippling flaw! A joke played by the creators upon their own creations! The sooner you come to accept your condition as a defect, the sooner you will find yourselves in a position to transcend it!','16878','1','0','0','deathwhisper SAY_INTRO1'), -('-1631021','','Through our master all things are possible! His power is without limit, and his will unbending! Those who oppose him will be destroyed utterly! And those who serve, who serve wholly, unquestioningly, with utter devotion of mind and soul? Elevated! To heights beyond your ken!','16879','1','0','0','deathwhisper SAY_INTRO2'), -('-1631022','','You have found your way here, because you are among the few gifted with true vision in a world cursed with blindness! You can see through the fog that hangs over this world like a shroud and grasp where true power lies!','16880','1','0','0','deathwhisper SAY_INTRO3'), -('-1631023','','What is this disturbance?! You dare trespass upon this hallowed ground? This shall be your final resting place.','16868','1','0','0','deathwhisper SAY_AGGRO'), -('-1631024','Однако! Я вижу что пора взять дело в свои руки.','Enough! I see I must take matters into my own hands!','16877','1','0','0','deathwhisper SAY_PHASE2'), -('-1631025','Вы слабы и бессильны против меня!','You are weak, powerless to resist my will!','16876','1','0','0','deathwhisper SAY_DOMINATEMIND'), -('-1631026','','Take this blessing and show these intruders a taste of our master\'s power.','16873','1','0','0','deathwhisper SAY_DARKEMPOWERMENT'), -('-1631027','Мои слуги! Я освобождаю вас от проклятия плоти!','Loyal adherent! I release you from the curse of flesh!','16874','1','0','0','deathwhisper SAY_DARKTRANSFORMATION'), -('-1631028','','Arise and exalt in your pure form!','16875','1','0','0','deathwhisper SAY_ANIMATEDEAD'), -('-1631029','','Do you yet grasp of the futility of your actions?','16869','1','0','0','deathwhisper SAY_KILL1'), -('-1631030','Прими Тьму! Тьма вечна...','Embrace the darkness... Darkness eternal!','16870','1','0','0','deathwhisper SAY_KILL2'), -('-1631031','Это игра продолжается слишком долго!','This charade has gone on long enough.','16872','1','0','0','deathwhisper SAY_BERSERK'), -('-1631032','Все - части плана Мастера! Ваш конец неизбежен...','All part of the masters plan! Your end is... inevitable!','16871','1','0','0','deathwhisper SAY_DEATH'), -('-1631100','Во имя Короля-Лича!','BY THE MIGHT OF THE LICH KING!','16694','1','0','0','saurfang SAY_AGGRO'), -('-1631101','Земля станет красной от вашей крови!','The ground runs red with your blood!','16699','1','0','0','saurfang SAY_FALLENCHAMPION'), -('-1631102','Корм, мои собаки!','Feast, my minions!','16700','1','0','0','saurfang SAY_BLOODBEASTS'), -('-1631103','Ты никто!','You are nothing!','16695','1','0','0','saurfang SAY_KILL1'), -('-1631104','Ваши души не найдут здесь избавления!','Your soul will find no redemption here!','16696','1','0','0','saurfang SAY_KILL2'), -('-1631105','Я вижу приближение смерти!','I have become... death!','16698','1','0','0','saurfang SAY_BERSERK'), -('-1631106','Я... Использован...','I... Am... Released.','16697','1','0','0','saurfang SAY_DEATH'); +('-1631000','Это начало и конец, смертные. Никто не может войти в Храм!','This is the beginning AND the end, mortals. None may enter the master\'s sanctum!','16950','6','0','0','marrowgar SAY_INTRO'), +('-1631001','Проклятые несут миру смерть и разрушение!','The Scourge will wash over this world as a swarm of death and destruction!','16941','6','0','0','marrowgar SAY_AGGRO'), +('-1631002','Шторм костей!','BONE STORM!','16946','3','0','0','marrowgar SAY_BONESTORM'), +('-1631003','Проткнут костью!','Bound by bone!','16947','3','0','0','marrowgar SAY_BONESPIKE1'), +('-1631004','Кости вокруг!','Stick Around!','16948','3','0','0','marrowgar SAY_BONESPIKE2'), +('-1631005','Выход - только смерть!','The only escape is death!','16949','6','0','0','marrowgar SAY_BONESPIKE3'), +('-1631006','Больше костей!','More bones for the offering!','16942','6','0','0','marrowgar SAY_KILL1'), +('-1631007','Будьте прокляты!','Languish in damnation!','16943','6','0','0','marrowgar SAY_KILL2'), +('-1631008','ЯРОСТЬ МАСТЕРА ТЕЧЕТ ЧЕРЕЗ МЕНЯ!','THE MASTER\'S RAGE COURSES THROUGH ME!','16945','3','0','0','marrowgar SAY_ENRAGE'), +('-1631009','Я вижу... Только тьму...','I see... only darkness...','16944','6','0','0','marrowgar SAY_DEATH'), +('-1631020','Взгляните на ваши мягкие руки! Сухожилия, мясо, кровь! Это слабость! Серьезная ошибка! Шутка создателя со своими творениями! Чем раньше вы поймете что жизнь - это дефект, тем раньше вы сможете преодолеть вашу слабость!','Fix your eyes upon your crude hands! The sinew, the soft meat, the dark blood coursing within! It is a weakness! A crippling flaw! A joke played by the creators upon their own creations! The sooner you come to accept your condition as a defect, the sooner you will find yourselves in a position to transcend it!','16878','6','0','0','deathwhisper SAY_INTRO1'), +('-1631021','Через нашего Мастера все возможно! Его сила не имеет предела, и его воля непреклонна! Те, кто против него будут истреблены! А те, кто служат, которые подчиняются полностью, беспрекословно, с беззаветной преданностью ума и души? Возвышены!','Through our master all things are possible! His power is without limit, and his will unbending! Those who oppose him will be destroyed utterly! And those who serve, who serve wholly, unquestioningly, with utter devotion of mind and soul? Elevated! To heights beyond your ken!','16879','6','0','0','deathwhisper SAY_INTRO2'), +('-1631022','Вы нашли свой путь здесь, потому что вы принадлежите к числу немногих одаренных истинным видением мира, проклятого слепотой! Вы можете видеть сквозь туман, что висит над этим миром, как саван, и понять, где истинная сила лжи!','You have found your way here, because you are among the few gifted with true vision in a world cursed with blindness! You can see through the fog that hangs over this world like a shroud and grasp where true power lies!','16880','6','0','0','deathwhisper SAY_INTRO3'), +('-1631023','Что это за беспорядок?! Вы смеете гадить на этой священной земле? Вот вам и место последнего упокоения!','What is this disturbance?! You dare trespass upon this hallowed ground? This shall be your final resting place.','16868','6','0','0','deathwhisper SAY_AGGRO'), +('-1631024','Однако! Я вижу что пора взять дело в свои руки.','Enough! I see I must take matters into my own hands!','16877','6','0','0','deathwhisper SAY_PHASE2'), +('-1631025','Вы слабы и бессильны против меня!','You are weak, powerless to resist my will!','16876','6','0','0','deathwhisper SAY_DOMINATEMIND'), +('-1631026','Возьмите это благословение и покажите этим злоумышленникам где раки зимуют!','Take this blessing and show these intruders a taste of our master\'s power.','16873','6','0','0','deathwhisper SAY_DARKEMPOWERMENT'), +('-1631027','Мои слуги! Я освобождаю вас от проклятия плоти!','Loyal adherent! I release you from the curse of flesh!','16874','6','0','0','deathwhisper SAY_DARKTRANSFORMATION'), +('-1631028','Встань и предстань в истинном виде!','Arise and exalt in your pure form!','16875','6','0','0','deathwhisper SAY_ANIMATEDEAD'), +('-1631029','Вы еще не осознали бесполезность своих действий?','Do you yet grasp of the futility of your actions?','16869','6','0','0','deathwhisper SAY_KILL1'), +('-1631030','Прими Тьму! Тьма вечна...','Embrace the darkness... Darkness eternal!','16870','6','0','0','deathwhisper SAY_KILL2'), +('-1631031','Это игра продолжается слишком долго!','This charade has gone on long enough.','16872','3','0','0','deathwhisper SAY_BERSERK'), +('-1631032','Все - части плана Мастера! Ваш конец неизбежен...','All part of the masters plan! Your end is... inevitable!','16871','6','0','0','deathwhisper SAY_DEATH'), +('-1631100','Во имя Короля-Лича!','BY THE MIGHT OF THE LICH KING!','16694','6','0','0','saurfang SAY_AGGRO'), +('-1631101','Земля станет красной от вашей крови!','The ground runs red with your blood!','16699','6','0','0','saurfang SAY_FALLENCHAMPION'), +('-1631102','Корм, мои собаки!','Feast, my minions!','16700','3','0','0','saurfang SAY_BLOODBEASTS'), +('-1631103','Ты никто!','You are nothing!','16695','6','0','0','saurfang SAY_KILL1'), +('-1631104','Ваши души не найдут здесь избавления!','Your soul will find no redemption here!','16696','6','0','0','saurfang SAY_KILL2'), +('-1631105','Я вижу приближение смерти!','I have become... death!','16698','3','0','0','saurfang SAY_BERSERK'), +('-1631106','Я... Использован...','I... Am... Released.','16697','6','0','0','saurfang SAY_DEATH'); diff --git a/addition/721_icecrown_spelltable_scriptdev2.sql b/addition/721_icecrown_spelltable_scriptdev2.sql index 739f87bbd..1b6e7cc49 100644 --- a/addition/721_icecrown_spelltable_scriptdev2.sql +++ b/addition/721_icecrown_spelltable_scriptdev2.sql @@ -40,8 +40,10 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ ( 36626, 69162, 0, 0, 0, 5000, 0, 0, 0, 15000, 0, 0, 0, 1, 0, 0), ( 36626, 70468, 0, 0, 0, 5000, 0, 0, 0, 15000, 0, 0, 0, 1, 0, 0), ( 36626, 69165, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 1, 0, 0), +( 36626, 69157, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 12, 0, 0), +( 36626, 69126, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 12, 0, 0), ( 36626, 69166, 0, 71912, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 1, 0, 0), -( 36626, 69195, 71219, 73031, 73032, 20000, 0, 0, 0, 30000, 0, 0, 0, 4, 0, 0), +( 36626, 69195, 71219, 73031, 73032, 20000, 0, 0, 0, 30000, 0, 0, 0, 1, 0, 0), ( 36626, 69278, 69278, 71221, 71221, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 1, 0, 0), ( 36626, 72103, 72103, 72103, 72103, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 4, 0, 0), ( 36626, 72219, 72551, 72551, 72553, 10000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index 2b5e9a1f4..e894dd4e1 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -377,7 +377,7 @@ Unit* BossSpellWorker::_doSummon(uint8 m_uiSpellIdx, TempSummonType summontype, } else return boss->SummonCreature(pSpell->m_uiSpellEntry[currentDifficulty], pSpell->LocData.x, pSpell->LocData.y, pSpell->LocData.z, 0, summontype, delay); }; -bool BossSpellWorker::_doRemove(uint8 m_uiSpellIdx, Unit* pTarget) +bool BossSpellWorker::_doRemove(uint8 m_uiSpellIdx, Unit* pTarget, SpellEffectIndex index) { SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; @@ -423,8 +423,8 @@ bool BossSpellWorker::_doRemove(uint8 m_uiSpellIdx, Unit* pTarget) if (pTarget) { if (pTarget->isAlive()) { if ( pTarget->HasAura(pSpell->m_uiSpellEntry[currentDifficulty]) && - pTarget->GetAura(pSpell->m_uiSpellEntry[currentDifficulty], EFFECT_INDEX_0)->GetStackAmount() > 1) { - if (pTarget->GetAura(pSpell->m_uiSpellEntry[currentDifficulty], EFFECT_INDEX_0)->modStackAmount(-1)) + pTarget->GetAura(pSpell->m_uiSpellEntry[currentDifficulty], index)->GetStackAmount() > 1) { + if (pTarget->GetAura(pSpell->m_uiSpellEntry[currentDifficulty], index)->modStackAmount(-1)) return true; else return false; } diff --git a/include/sc_boss_spell_worker.h b/include/sc_boss_spell_worker.h index 210969e1a..755f7a431 100644 --- a/include/sc_boss_spell_worker.h +++ b/include/sc_boss_spell_worker.h @@ -138,9 +138,9 @@ class MANGOS_DLL_DECL BossSpellWorker else return CAST_FAIL_OTHER; }; - bool doRemove(uint32 SpellID, Unit* pTarget = NULL) + bool doRemove(uint32 SpellID, Unit* pTarget = NULL, SpellEffectIndex index = EFFECT_INDEX_0) { - return _doRemove(FindSpellIDX(SpellID),pTarget); + return _doRemove(FindSpellIDX(SpellID),pTarget, index); }; bool hasAura(uint32 SpellID, Unit* pTarget = NULL) @@ -206,7 +206,7 @@ class MANGOS_DLL_DECL BossSpellWorker Unit* _SelectUnit(SelectAggroTarget target, uint32 uiPosition); - bool _doRemove(uint8 m_uiSpellIdx, Unit* pTarget = NULL); + bool _doRemove(uint8 m_uiSpellIdx, Unit* pTarget = NULL, SpellEffectIndex index = EFFECT_INDEX_0); bool _hasAura(uint8 m_uiSpellIdx, Unit* pTarget); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp index 55f9cda09..59a06b63c 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp @@ -122,7 +122,7 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI if (m_creature->isAlive()) m_creature->SummonCreature(NPC_LIGHT_ESSENCE, SpawnLoc[24].x, SpawnLoc[24].y, SpawnLoc[24].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); if (m_creature->isAlive()) m_creature->SummonCreature(NPC_LIGHT_ESSENCE, SpawnLoc[25].x, SpawnLoc[25].y, SpawnLoc[25].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); DoScriptText(-1713541,m_creature); - m_pInstance->SetData(DATA_HEALTH_FJOLA, m_creature->GetHealth()); + m_pInstance->SetData(DATA_HEALTH_FJOLA, m_creature->GetMaxHealth()); } void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) @@ -274,7 +274,7 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI DoScriptText(-1713741,m_creature); if (m_creature->isAlive()) m_creature->SummonCreature(NPC_DARK_ESSENCE, SpawnLoc[22].x, SpawnLoc[22].y, SpawnLoc[22].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); if (m_creature->isAlive()) m_creature->SummonCreature(NPC_DARK_ESSENCE, SpawnLoc[23].x, SpawnLoc[23].y, SpawnLoc[23].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); - m_pInstance->SetData(DATA_HEALTH_EYDIS, m_creature->GetHealth()); + m_pInstance->SetData(DATA_HEALTH_EYDIS, m_creature->GetMaxHealth()); } void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp index 958539ab4..d8c4cc2f7 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp @@ -31,6 +31,8 @@ enum BossSpells SPELL_INHALE_BLIGHT = 69165, SPELL_INHALED_BLIGHT = 71912, SPELL_PUNGENT_BLIGHT = 69195, + SPELL_PUNGENT_BLIGHT_1 = 69157, + SPELL_PUNGENT_BLIGHT_2 = 69126, SPELL_GAS_SPORE = 69278, SPELL_INOCULATE = 72103, SPELL_GASTRIC_BLOAT = 72219, @@ -67,6 +69,8 @@ struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI { if(pInstance) pInstance->SetData(TYPE_FESTERGUT, DONE); bsw->doRemove(SPELL_PUNGENT_BLIGHT); + bsw->doRemove(SPELL_PUNGENT_BLIGHT_1); + bsw->doRemove(SPELL_PUNGENT_BLIGHT_2); } void UpdateAI(const uint32 diff) From 6f3fa6ce6c7baa17510488f39039ce31bd4e9680 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Mon, 19 Apr 2010 17:40:09 +0400 Subject: [PATCH 246/405] Small change (for bugreports) --- .../trial_of_the_crusader/boss_twin_valkyr.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp index 5e5f33dde..c90da2774 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp @@ -123,7 +123,7 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI if (m_creature->isAlive()) m_creature->SummonCreature(NPC_LIGHT_ESSENCE, SpawnLoc[24].x, SpawnLoc[24].y, SpawnLoc[24].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); if (m_creature->isAlive()) m_creature->SummonCreature(NPC_LIGHT_ESSENCE, SpawnLoc[25].x, SpawnLoc[25].y, SpawnLoc[25].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); DoScriptText(-1713541,m_creature); - m_pInstance->SetData(DATA_HEALTH_FJOLA, m_creature->GetHealth()); + m_pInstance->SetData(DATA_HEALTH_FJOLA, m_creature->GetMaxHealth()); } void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) @@ -276,7 +276,7 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI DoScriptText(-1713741,m_creature); if (m_creature->isAlive()) m_creature->SummonCreature(NPC_DARK_ESSENCE, SpawnLoc[22].x, SpawnLoc[22].y, SpawnLoc[22].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); if (m_creature->isAlive()) m_creature->SummonCreature(NPC_DARK_ESSENCE, SpawnLoc[23].x, SpawnLoc[23].y, SpawnLoc[23].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); - m_pInstance->SetData(DATA_HEALTH_EYDIS, m_creature->GetHealth()); + m_pInstance->SetData(DATA_HEALTH_EYDIS, m_creature->GetMaxHealth()); } void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) From da068f7ca3cfd2bc5426457a0ba1bcb6102ec000 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Mon, 19 Apr 2010 17:49:56 +0400 Subject: [PATCH 247/405] Added loading faction_champions, sorry. --- system/ScriptLoader.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index e74f2aef6..9602a1efe 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -264,6 +264,7 @@ extern void AddSC_instance_azjol_nerub(); extern void AddSC_northrend_beasts(); //Crusaders' Coliseum, trial_of_the_crusader extern void AddSC_boss_jaraxxus(); extern void AddSC_boss_anubarak_trial(); +EXTERN VOID AddSC_boss_faction_champions(); extern void AddSC_twin_valkyr(); extern void AddSC_instance_trial_of_the_crusader(); extern void AddSC_trial_of_the_crusader(); @@ -669,6 +670,7 @@ void AddScripts() AddSC_northrend_beasts(); //Crusaders' Coliseum, trial_of_the_crusader AddSC_boss_jaraxxus(); AddSC_boss_anubarak_trial(); + AddSC_twin_valkyr(); AddSC_instance_trial_of_the_crusader(); AddSC_trial_of_the_crusader(); From a5dc3bb2dc9bb10e835448d22807911cfbcd9b44 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Mon, 19 Apr 2010 17:53:06 +0400 Subject: [PATCH 248/405] Replace preview commit... --- system/ScriptLoader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index 9602a1efe..4276a505b 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -264,7 +264,7 @@ extern void AddSC_instance_azjol_nerub(); extern void AddSC_northrend_beasts(); //Crusaders' Coliseum, trial_of_the_crusader extern void AddSC_boss_jaraxxus(); extern void AddSC_boss_anubarak_trial(); -EXTERN VOID AddSC_boss_faction_champions(); +extern void AddSC_boss_faction_champions(); extern void AddSC_twin_valkyr(); extern void AddSC_instance_trial_of_the_crusader(); extern void AddSC_trial_of_the_crusader(); @@ -670,7 +670,7 @@ void AddScripts() AddSC_northrend_beasts(); //Crusaders' Coliseum, trial_of_the_crusader AddSC_boss_jaraxxus(); AddSC_boss_anubarak_trial(); - + AddSC_boss_faction_champions(); AddSC_twin_valkyr(); AddSC_instance_trial_of_the_crusader(); AddSC_trial_of_the_crusader(); From d22a82d4eb7c75f1132ddcf4737d49f7b6c86488 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Mon, 19 Apr 2010 17:56:13 +0400 Subject: [PATCH 249/405] Change for preview merge --- ScriptMgr.cpp | 3 --- system/ScriptLoader.cpp | 6 ------ 2 files changed, 9 deletions(-) diff --git a/ScriptMgr.cpp b/ScriptMgr.cpp index 24f720fc1..9c3503db2 100644 --- a/ScriptMgr.cpp +++ b/ScriptMgr.cpp @@ -51,10 +51,7 @@ void LoadDatabase() error_log("SD2: Unable to connect to Database. Load database aborted."); return; } -<<<<<<< HEAD:ScriptMgr.cpp -======= ->>>>>>> offlike:ScriptMgr.cpp } struct TSpellSummary { diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index c970c8b57..8bc65e7dd 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -753,12 +753,6 @@ void AddScripts() AddSC_boss_hadronox(); AddSC_boss_krikthir(); AddSC_instance_azjol_nerub(); - AddSC_northrend_beasts(); //Crusaders' Coliseum, trial_of_the_crusader - AddSC_boss_jaraxxus(); - AddSC_boss_anubarak_trial(); - AddSC_twin_valkyr(); - AddSC_instance_trial_of_the_crusader(); - AddSC_trial_of_the_crusader(); AddSC_boss_novos(); //draktharon_keep AddSC_boss_dred(); AddSC_boss_tharonja(); From f335afc617a456c0c008fcc503c931170d649416 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Mon, 19 Apr 2010 18:17:03 +0400 Subject: [PATCH 250/405] Change for boss_ouro --- scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp index 6cd051c5f..a4ac81597 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp @@ -97,7 +97,6 @@ struct MANGOS_DLL_DECL boss_ouroAI : public ScriptedAI // Sand Blast if (m_uiSandBlastTimer < uiDiff) { - m_creature->MonsterMove(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 1); DoCastSpellIfCan(m_creature->getVictim(), SPELL_SANDBLAST); m_uiSandBlastTimer = urand(20000, 35000); } From 9ad83d0c60e51f146cd4ac26da316b149b277d5d Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Tue, 20 Apr 2010 00:19:35 +0400 Subject: [PATCH 251/405] Return normal damage to valkiries. Thanks to ghostart. --- .../trial_of_the_crusader/boss_twin_valkyr.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp index c90da2774..2770883a8 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp @@ -142,8 +142,6 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI uiDamage += uiDamage/2; } - uiDamage /= 2; - m_pInstance->SetData(DATA_HEALTH_FJOLA, m_creature->GetHealth() >= uiDamage ? m_creature->GetHealth() - uiDamage : 0); } @@ -295,8 +293,6 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI uiDamage += uiDamage/2; } - uiDamage /= 2; - m_pInstance->SetData(DATA_HEALTH_EYDIS, m_creature->GetHealth() >= uiDamage ? m_creature->GetHealth() - uiDamage : 0); } From 50dfc17d9be2801a02e29b7787620374481998a7 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Tue, 20 Apr 2010 12:35:41 +0400 Subject: [PATCH 252/405] Test changes --- addition/721_icecrown_spelltable_scriptdev2.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addition/721_icecrown_spelltable_scriptdev2.sql b/addition/721_icecrown_spelltable_scriptdev2.sql index 1b6e7cc49..0b7c28a16 100644 --- a/addition/721_icecrown_spelltable_scriptdev2.sql +++ b/addition/721_icecrown_spelltable_scriptdev2.sql @@ -40,8 +40,8 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ ( 36626, 69162, 0, 0, 0, 5000, 0, 0, 0, 15000, 0, 0, 0, 1, 0, 0), ( 36626, 70468, 0, 0, 0, 5000, 0, 0, 0, 15000, 0, 0, 0, 1, 0, 0), ( 36626, 69165, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 1, 0, 0), -( 36626, 69157, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 12, 0, 0), -( 36626, 69126, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 12, 0, 0), +( 36626, 69157, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 1, 0, 0), +( 36626, 69126, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 1, 0, 0), ( 36626, 69166, 0, 71912, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 1, 0, 0), ( 36626, 69195, 71219, 73031, 73032, 20000, 0, 0, 0, 30000, 0, 0, 0, 1, 0, 0), ( 36626, 69278, 69278, 71221, 71221, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 1, 0, 0), From 6445da0300ee62b5a1752d4c5e5ede1b2390b968 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Tue, 20 Apr 2010 12:47:03 +0400 Subject: [PATCH 253/405] Readme correct --- README | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/README b/README index d9d1052f4..09a8241c6 100644 --- a/README +++ b/README @@ -1,15 +1,9 @@ -@package Trial of the Crusader scripts for ScriptDev2 +@package RSA scripts for ScriptDev2 ; @version 0.2 -@revision 43 -@copyright (c) 2010 /dev/rsa +@revision (current) +@copyright (c) 2009-2010 /dev/rsa @license GNU Public License -SDName: trial_of_the_crusader -SD%Complete: 80% -SDComment: by /dev/rsa -SDCategory: Full scripts for Crusaders Coliseum instance in WOTLK -EndScriptData - 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 @@ -24,8 +18,25 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +In this repository you found this custom scripts: + +- many scripts from Insider42 +- Ulduar (by Insider42, small correct by me) +- Trial of the Champion ( by ..., big rewrite by me) +- Violet hold (by ..., big rewrite by me) +- Naxxramas (by ...) +- An'kahet (by ...) +- Draktaron (by ...) +- Trial of the Crusader (by me) +- Halls of reflection (partially, by me) +- Icecrown Citadel (by me) + +Attention please! In my project only correct Linux Makefile provided. +If you want compile this branch on Windows, please convert Makefile to your c++ compiler. + Thanks to: - Vladimir Mangos - MaNGOS project; +- Insider42 - for your work; - griffonheart (original texts/sounds); - Cristy (re-translation to english); - Selector - Faction champions base script; From 4ae53e4312bad7eb107f92198b29a752e1123b39 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 21 Apr 2010 01:05:19 +0400 Subject: [PATCH 254/405] Plaguework to improve (draft is ok) --- addition/721_icecrown_mangos.sql | 6 +- .../721_icecrown_spelltable_scriptdev2.sql | 4 +- .../boss_proffesor_putricide.cpp | 115 +++++++++++++++++- .../icecrown_citadel/icecrown_teleport.cpp | 20 +++ .../instance_icecrown_spire.cpp | 4 + 5 files changed, 145 insertions(+), 4 deletions(-) diff --git a/addition/721_icecrown_mangos.sql b/addition/721_icecrown_mangos.sql index 3abf3a315..07e308a0b 100644 --- a/addition/721_icecrown_mangos.sql +++ b/addition/721_icecrown_mangos.sql @@ -6,7 +6,7 @@ DELETE FROM `gameobject` WHERE `guid` = 913334; INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES (913334, 202244, 631, 3, 1, -209.5, 2211.91, 199.97, 3.07661, 0, 0, 0.999472, 0.0324833, 0, 0, 1); -UPDATE `gameobject_template` SET `flags` = 0, ScriptName = 'go_icecrown_teleporter' WHERE `entry` IN (202242,202243,202244,202245,202235,202223,202246); +UPDATE `gameobject_template` SET `flags` = 0, `ScriptName` = 'go_icecrown_teleporter' WHERE `entry` IN (202242,202243,202244,202245,202235,202223,202246); DELETE FROM `areatrigger_teleport` WHERE `id` = 5718 AND `target_map` = 631; DELETE FROM `creature` WHERE `id` = 99322; @@ -41,6 +41,7 @@ UPDATE `creature_template` SET `ScriptName`='mob_spire_frostwyrm', `AIName`='' W DELETE FROM `creature_ai_scripts` WHERE `creature_id` = 37230; UPDATE `creature_template` SET `ScriptName`='mob_frost_giant', `AIName`='' WHERE `entry` IN (38490, 38494) ; DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (38490, 38494); + -- Gunship armory (override) DELETE FROM `gameobject` WHERE `id` IN (201872,201873,201874,201875,202177,202178,202179,202180); INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES @@ -68,6 +69,9 @@ UPDATE `creature_template` SET `ScriptName`='boss_proffesor_putricide', `AIName` UPDATE `gameobject_template` SET `faction` = '114',`data0` = '0' WHERE `gameobject_template`.`entry` IN (201372,201614,201613, 201612); UPDATE `gameobject` SET `state` = '1' WHERE `id` IN (201612,201614,201613); UPDATE `gameobject` SET `state` = '0' WHERE `id` IN (201372); +UPDATE `creature_template` SET `ScriptName`='mob_icc_gas_cloud', `AIName`='' WHERE `entry`= 37562; +UPDATE `creature_template` SET `ScriptName`='mob_icc_volatile_ooze', `AIName`='' WHERE `entry`= 37697; +UPDATE `gameobject_template` SET `faction` = '0', `ScriptName` = 'go_plague_sigil' WHERE `gameobject_template`.`entry` IN (202182); -- Taldaram -- UPDATE `creature_template` SET `ScriptName`='boss_taldaram' WHERE `entry`= 37973; diff --git a/addition/721_icecrown_spelltable_scriptdev2.sql b/addition/721_icecrown_spelltable_scriptdev2.sql index 0b7c28a16..1b6e7cc49 100644 --- a/addition/721_icecrown_spelltable_scriptdev2.sql +++ b/addition/721_icecrown_spelltable_scriptdev2.sql @@ -40,8 +40,8 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ ( 36626, 69162, 0, 0, 0, 5000, 0, 0, 0, 15000, 0, 0, 0, 1, 0, 0), ( 36626, 70468, 0, 0, 0, 5000, 0, 0, 0, 15000, 0, 0, 0, 1, 0, 0), ( 36626, 69165, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 1, 0, 0), -( 36626, 69157, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 1, 0, 0), -( 36626, 69126, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 1, 0, 0), +( 36626, 69157, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 12, 0, 0), +( 36626, 69126, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 12, 0, 0), ( 36626, 69166, 0, 71912, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 1, 0, 0), ( 36626, 69195, 71219, 73031, 73032, 20000, 0, 0, 0, 30000, 0, 0, 0, 1, 0, 0), ( 36626, 69278, 69278, 71221, 71221, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 1, 0, 0), diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp index fd44bc983..cc1e7d16b 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp @@ -41,9 +41,11 @@ enum BossSpells NPC_GAS_CLOUD = 37562, SPELL_GASEOUS_BLOAT = 70672, SPELL_EXPUNGED_GAS = 70701, + SPELL_SOUL_FEAST = 71203, // NPC_VOLATILE_OOZE = 37697, - SPELL_OOZE_ADHESIVE = 70447, + SPELL_OOZE_ADHESIVE = 70447, + SPELL_OOZE_ERUPTION = 70492, // NPC_MUTATED_ABOMINATION = 37672, SPELL_MUTATED_TRANSFORMATION = 70311, @@ -166,6 +168,107 @@ CreatureAI* GetAI_boss_proffesor_putricide(Creature* pCreature) return new boss_proffesor_putricideAI(pCreature); } +struct MANGOS_DLL_DECL mob_icc_gas_cloudAI : public ScriptedAI +{ + mob_icc_gas_cloudAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); + Reset(); + } + + ScriptedInstance* m_pInstance; + BossSpellWorker* bsw; + + void Reset() + { + m_creature->SetInCombatWithZone(); + m_creature->SetRespawnDelay(DAY); + } + + void Aggro(Unit *who) + { + if (!m_pInstance) return; + } + + void JustReachedHome() + { + if (!m_pInstance) return; + m_creature->ForcedDespawn(); + } + + void UpdateAI(const uint32 uiDiff) + { + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + bsw->timedCast(SPELL_GASEOUS_BLOAT, uiDiff); + bsw->timedCast(SPELL_SOUL_FEAST, uiDiff); + if (m_creature->getVictim()->IsWithinDistInMap(m_creature, 1.0f) + && bsw->hasAura(SPELL_GASEOUS_BLOAT, m_creature->getVictim())) + { + bsw->doCast(SPELL_EXPUNGED_GAS); + m_creature->ForcedDespawn(); + }; + } +}; + +CreatureAI* GetAI_mob_icc_gas_cloud(Creature* pCreature) +{ + return new mob_icc_gas_cloudAI(pCreature); +} + +struct MANGOS_DLL_DECL mob_icc_volatile_oozeAI : public ScriptedAI +{ + mob_icc_volatile_oozeAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); + Reset(); + } + + ScriptedInstance* m_pInstance; + BossSpellWorker* bsw; + + void Reset() + { + m_creature->SetInCombatWithZone(); + m_creature->SetRespawnDelay(DAY); + } + + void Aggro(Unit *who) + { + if (!m_pInstance) return; + } + + void JustReachedHome() + { + if (!m_pInstance) return; + m_creature->ForcedDespawn(); + } + + void UpdateAI(const uint32 uiDiff) + { + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + bsw->timedCast(SPELL_OOZE_ADHESIVE, uiDiff, m_creature->getVictim()); + bsw->timedCast(SPELL_SOUL_FEAST, uiDiff); + if (m_creature->getVictim()->IsWithinDistInMap(m_creature, 1.0f)) + { + bsw->doCast(SPELL_OOZE_ERUPTION); + m_creature->ForcedDespawn(); + }; + } +}; + +CreatureAI* GetAI_mob_icc_volatile_ooze(Creature* pCreature) +{ + return new mob_icc_volatile_oozeAI(pCreature); +} + void AddSC_boss_proffesor_putricide() { Script *newscript; @@ -173,4 +276,14 @@ void AddSC_boss_proffesor_putricide() newscript->Name = "boss_proffesor_putricide"; newscript->GetAI = &GetAI_boss_proffesor_putricide; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_icc_volatile_ooze"; + newscript->GetAI = &GetAI_mob_icc_volatile_ooze; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_icc_gas_cloud"; + newscript->GetAI = &GetAI_mob_icc_gas_cloud; + newscript->RegisterSelf(); } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp index 3e17d6a05..53fa4d154 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp @@ -81,6 +81,21 @@ bool GOGossipHello_go_icecrown_teleporter(Player *player, GameObject* pGo) return true; } +bool GOGossipHello_go_plague_sigil(Player *player, GameObject* pGo) +{ + ScriptedInstance *pInstance = (ScriptedInstance *) pGo->GetInstanceData(); + if(!pInstance) return true; + + if (pInstance->GetData(TYPE_FESTERGUT) == DONE + && pInstance->GetData(TYPE_ROTFACE) == DONE) + { + pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_SCIENTIST_DOOR_GREEN)); + pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_SCIENTIST_DOOR_ORANGE)); + pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_SCIENTIST_DOOR_COLLISION)); + } + return true; +} + void AddSC_icecrown_teleporter() { @@ -91,4 +106,9 @@ void AddSC_icecrown_teleporter() newscript->pGOGossipHello = &GOGossipHello_go_icecrown_teleporter; newscript->pGOGossipSelect = &GOGossipSelect_go_icecrown_teleporter; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "go_plague_sigil"; + newscript->pGOGossipHello = &GOGossipHello_go_plague_sigil; + newscript->RegisterSelf(); } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp index 4ac9be272..b8e81b79d 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp @@ -478,6 +478,10 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance case NPC_LICH_KING: return m_uiLichKingGUID; + case GO_SCIENTIST_DOOR_ORANGE: return m_uiSDoorOrangeGUID; + case GO_SCIENTIST_DOOR_GREEN: return m_uiSDoorGreenGUID; + case GO_SCIENTIST_DOOR_COLLISION: return m_uiSDoorCollisionGUID; + case GO_BLOODWING_DOOR: return m_uiBloodwingDoorGUID; } return 0; } From 2cd309852a5c572f5a274c02c37ff6f151e87620 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Fri, 23 Apr 2010 12:55:16 +0400 Subject: [PATCH 255/405] ICC 20 - Deathwhisper rewrite almost complete --- addition/721_icecrown_mangos.sql | 2 + .../721_icecrown_spelltable_scriptdev2.sql | 28 +- include/sc_boss_spell_worker.cpp | 8 + include/sc_boss_spell_worker.h | 7 + .../boss_lady_deathwhisper.cpp | 382 +++++++++++------- .../boss_valithria_dreamwalker.cpp | 9 + .../icecrown_citadel/def_spire.h | 37 +- .../icecrown_citadel/icecrown_spire.cpp | 2 + .../instance_icecrown_spire.cpp | 21 +- 9 files changed, 319 insertions(+), 177 deletions(-) diff --git a/addition/721_icecrown_mangos.sql b/addition/721_icecrown_mangos.sql index 07e308a0b..98947fedf 100644 --- a/addition/721_icecrown_mangos.sql +++ b/addition/721_icecrown_mangos.sql @@ -2,6 +2,7 @@ UPDATE `areatrigger_teleport` SET `required_level` = '80' WHERE `areatrigger_teleport`.`id` =5670; DELETE FROM `gameobject` WHERE `guid` = 913334; +UPDATE `creature` SET `spawntimesecs` = 7200 WHERE `map` = 631 AND (`spawntimesecs` BETWEEN 200 AND 7100 ); INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES (913334, 202244, 631, 3, 1, -209.5, 2211.91, 199.97, 3.07661, 0, 0, 0.999472, 0.0324833, 0, 0, 1); @@ -44,6 +45,7 @@ DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (38490, 38494); -- Gunship armory (override) DELETE FROM `gameobject` WHERE `id` IN (201872,201873,201874,201875,202177,202178,202179,202180); +UPDATE `gameobject_template` SET `flags` = 0 WHERE `gameobject_template`.`entry` IN (201872,201873,201874,201875,202177,202178,202179,202180); INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES (972541, 201872, 631, 1, 1, -428.141, 2421.34, 191.233, 3.10389, 0, 0, 0.999822, 0.0188489, -604800, 100, 1), (972543, 201873, 631, 2, 1, -428.141, 2421.34, 191.233, 3.10389, 0, 0, 0.999822, 0.0188489, -604800, 100, 1), diff --git a/addition/721_icecrown_spelltable_scriptdev2.sql b/addition/721_icecrown_spelltable_scriptdev2.sql index 1b6e7cc49..619289cfb 100644 --- a/addition/721_icecrown_spelltable_scriptdev2.sql +++ b/addition/721_icecrown_spelltable_scriptdev2.sql @@ -5,6 +5,28 @@ DELETE FROM `boss_spell_table` WHERE `entry` = 36612; -- Lady Deathwhisper DELETE FROM `boss_spell_table` WHERE `entry` = 36855; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(36855, 70842, 0, 0, 0, 15000, 0, 0, 0, 25000, 0, 0, 0, 1, 0, 0), +(36855, 47008, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 1, 0, 0), +(36855, 71254, 72008, 72008, 72504, 5000, 0, 0, 0, 8000, 0, 0, 0, 4, 0, 0), +(36855, 71420, 72501, 72007, 72502, 15000, 0, 0, 0, 25000, 0, 0, 0, 4, 0, 0), +(36855, 71001, 0, 0, 0, 15000, 0, 0, 0, 25000, 0, 0, 0, 4, 0, 0), +(36855, 71204, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), +(36855, 70901, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 6, 0, 0), +(36855, 71289, 0, 0, 0, 15000, 0, 0, 0, 25000, 0, 0, 0, 4, 0, 0), +(36855, 71494, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 1, 0, 0); +-- summons +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMax_N10`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType` ) VALUES +(36855, 37890, 45000, 45000, 1, 1, 2, 2, 75, 100, 0, 9), +(36855, 37949, 45000, 45000, 1, 1, 2, 2, 75, 100, 0, 9), +(36855, 38010, 45000, 45000, 1, 1, 2, 2, 75, 100, 0, 9), +(36855, 38222, 8000, 15000, 1, 1, 1, 1, 75, 100, 0, 9), +(36855, 38009, 45000, 45000, 1, 1, 2, 2, 75, 100, 0, 9); +-- Vengeful shade +DELETE FROM `boss_spell_table` WHERE `entry` = 38222; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(38222, 71494, 0, 0, 0, 1000, 0, 0, 0, 1000, 0, 0, 0, 1, 0, 0), +(38222, 71544, 72010, 72011, 72012, 1000, 0, 0, 0, 1000, 0, 0, 0, 3, 0, 0); -- Gunship battle -- Frost wyrm @@ -42,14 +64,14 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ ( 36626, 69165, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 1, 0, 0), ( 36626, 69157, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 12, 0, 0), ( 36626, 69126, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 12, 0, 0), -( 36626, 69166, 0, 71912, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 1, 0, 0), +( 36626, 69166, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 1, 0, 0), ( 36626, 69195, 71219, 73031, 73032, 20000, 0, 0, 0, 30000, 0, 0, 0, 1, 0, 0), ( 36626, 69278, 69278, 71221, 71221, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 1, 0, 0), ( 36626, 72103, 72103, 72103, 72103, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 4, 0, 0), ( 36626, 72219, 72551, 72551, 72553, 10000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), ( 36626, 72227, 72227, 72229, 72230, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 4, 0, 0), -( 36626, 72272, 72273, 72273, 73020, 20000, 0, 0, 0, 30000, 0, 0, 0, 1, 0, 0), -( 36626, 47008, 47008, 47008, 47008, 300000, 300000, 300000, 300000, 300000, 300000, 300000, 300000, 1, 0, 0); +( 36626, 72272, 72273, 72273, 73020, 20000, 0, 0, 0, 30000, 0, 0, 0, 4, 0, 0), +( 36626, 47008, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 1, 0, 0); -- Rotface DELETE FROM `boss_spell_table` WHERE `entry` = 36627; diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index e894dd4e1..c44441ee7 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -377,6 +377,14 @@ Unit* BossSpellWorker::_doSummon(uint8 m_uiSpellIdx, TempSummonType summontype, } else return boss->SummonCreature(pSpell->m_uiSpellEntry[currentDifficulty], pSpell->LocData.x, pSpell->LocData.y, pSpell->LocData.z, 0, summontype, delay); }; +Unit* BossSpellWorker::_doSummonAtPosition(uint8 m_uiSpellIdx, TempSummonType summontype, uint32 delay, float fPosX, float fPosY, float fPosZ) +{ + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + + debug_log("BSW: Summoning creature number %u type %u despawn delay %u at position %f %f %f",pSpell->m_uiSpellEntry[currentDifficulty], pSpell->m_CastTarget, delay, fPosX, fPosY, fPosZ); + return boss->SummonCreature(pSpell->m_uiSpellEntry[currentDifficulty], fPosX, fPosY, fPosZ, 0, summontype, delay); +}; + bool BossSpellWorker::_doRemove(uint8 m_uiSpellIdx, Unit* pTarget, SpellEffectIndex index) { SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; diff --git a/include/sc_boss_spell_worker.h b/include/sc_boss_spell_worker.h index 755f7a431..582ae6e34 100644 --- a/include/sc_boss_spell_worker.h +++ b/include/sc_boss_spell_worker.h @@ -154,6 +154,11 @@ class MANGOS_DLL_DECL BossSpellWorker return _doSummon(FindSpellIDX(SpellID), type, delay); }; + Unit* doSummon(uint32 SpellID, float fPosX, float fPosY, float fPosZ, TempSummonType type = TEMPSUMMON_CORPSE_TIMED_DESPAWN, uint32 delay = 60000) + { + return _doSummonAtPosition(FindSpellIDX(SpellID), type, delay, fPosX, fPosY, fPosZ); + }; + CanCastResult BSWSpellSelector(uint32 SpellID, Unit* pTarget = NULL) { return _BSWSpellSelector(FindSpellIDX(SpellID), pTarget); @@ -190,6 +195,8 @@ class MANGOS_DLL_DECL BossSpellWorker Unit* _doSummon(uint8 m_uiSpellIdx, TempSummonType type = TEMPSUMMON_CORPSE_TIMED_DESPAWN, uint32 delay = 60000); + Unit* _doSummonAtPosition(uint8 m_uiSpellIdx, TempSummonType type, uint32 delay, float fPosX, float fPosY, float fPosZ); + CanCastResult _BSWDoCast(uint8 m_uiSpellIdx, Unit* pTarget); CanCastResult _BSWSpellSelector(uint8 m_uiSpellIdx, Unit* pTarget = NULL); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp index 71b3c1e61..b9e6fc24e 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp @@ -36,18 +36,30 @@ enum NPC_REANIMATED_ADHERENT = 38010, //Abilities SPELL_MANA_BARRIER = 70842, - SPELL_SHADOW_BOLT_N = 71254, - SPELL_DEATH_AND_DECAY_N = 71001, - SPELL_DARK_EMPOWERMENT_N = 70901, - SPELL_FROSTBOLT_N = 71420, - SPELL_INSIGNIFICANCE_N = 71204, - - SPELL_SHADOW_BOLT_H = 72008, - SPELL_FROSTBOLT_H = 72007, - SPELL_DOMINATE_MIND_H = 71289, - - SPELL_VENGEFUL_BLAST_N = 72011, - SPELL_VENGEFUL_BLAST_H = 72012, + SPELL_SHADOW_BOLT = 71254, + SPELL_DEATH_AND_DECAY = 71001, + SPELL_DARK_EMPOWERMENT = 70901, + SPELL_FROSTBOLT = 71420, + SPELL_INSIGNIFICANCE = 71204, + + SPELL_DOMINATE_MIND = 71289, + + SPELL_VENGEFUL_BLAST = 71494, + SPELL_VENGEFUL_BLAST_0 = 71544, +}; + +static Locations SpawnLoc[]= +{ + {-623.055481f, 2211.326660f, 51.764259f}, // 0 Lady's stay point + {-620.197449f, 2272.062256f, 50.848679f}, // 1 Right Door 1 + {-598.636353f, 2272.062256f, 50.848679f}, // 2 Right Door 2 + {-578.495728f, 2272.062256f, 50.848679f}, // 3 Right Door 3 + {-578.495728f, 2149.211182f, 50.848679f}, // 4 Left Door 1 + {-598.636353f, 2149.211182f, 50.848679f}, // 5 Left Door 2 + {-620.197449f, 2149.211182f, 50.848679f}, // 6 Left Door 3 + {-517.652466f, 2216.611328f, 62.823681f}, // 7 Upper marsh 1 + {-517.652466f, 2211.611328f, 62.823681f}, // 8 Upper marsh 2 + {-517.652466f, 2206.611328f, 62.823681f}, // 9 Upper marsh 3 }; struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI @@ -55,169 +67,250 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI boss_lady_deathwhisperAI(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Regular = pCreature->GetMap()->IsRegularDifficulty(); + bsw = new BossSpellWorker(this); Reset(); } - bool Regular; + BossSpellWorker* bsw; ScriptedInstance *pInstance; uint8 stage; - uint32 m_uiManaBarrier_Timer; - uint32 m_uiShadowBolt_Timer; - uint32 m_uiDeathAndDecay_Timer; - uint32 m_uiDarkEmpowerment_Timer; - uint32 m_uiFrostBolt_Timer; - uint32 m_uiInsignificance_Timer; - uint32 m_uiDominateMind_Timer; - uint32 m_uiBerserk_Timer; - uint32 m_uiSummon_Timer; - uint32 m_uiSummon2_Timer; - bool isManaBarrier; - uint8 health; - uint64 m_uiMana; - + uint8 Difficulty; + bool MovementStarted; + bool intro; + void Reset() { - if(pInstance) pInstance->SetData(TYPE_DEATHWHISPER, NOT_STARTED); - m_uiManaBarrier_Timer = 30000; - m_uiSummon_Timer = 60000; - m_uiSummon2_Timer = 20000; - m_uiShadowBolt_Timer = urand(8000,10000); - m_uiDeathAndDecay_Timer = urand(40000,60000); - m_uiDarkEmpowerment_Timer = 45000; - m_uiFrostBolt_Timer = urand(20000,25000); - m_uiInsignificance_Timer = 40000; - m_uiDominateMind_Timer = 30000; - m_uiBerserk_Timer = 600000; - - stage = 0; - isManaBarrier = false; + if(!pInstance) return; + Difficulty = pInstance->GetData(TYPE_DIFFICULTY); + pInstance->SetData(TYPE_DEATHWHISPER, NOT_STARTED); + stage = 0; + MovementStarted = false; + intro = false; } - - uint64 CallGuard(uint64 npctype,TempSummonType type, uint32 _summontime ) + + void MoveInLineOfSight(Unit* pWho) { - float fPosX, fPosY, fPosZ; - m_creature->GetPosition(fPosX, fPosY, fPosZ); - m_creature->GetRandomPoint(fPosX, fPosY, fPosZ, urand(75, 100), fPosX, fPosY, fPosZ); - Creature* pSummon = m_creature->SummonCreature(npctype, fPosX, fPosY, fPosZ, 0, type, _summontime); - if(pSummon) pSummon->SetInCombatWithZone(); -// DoScriptText(EMOTE_SUMMON, m_creature); - return pSummon ? pSummon->GetGUID() : 0; + if (stage) return; + else intro = true; } + void KilledUnit(Unit* pVictim) + { + switch (urand(0,2)) { + case 0: + DoScriptText(-1631029,m_creature,pVictim); + break; + case 1: + DoScriptText(-1631030,m_creature,pVictim); + break; + }; + } + + void MovementInform(uint32 type, uint32 id) + { + if(!pInstance) return; + if(type != POINT_MOTION_TYPE) return; + if(MovementStarted && id != 1) + { + m_creature->GetMotionMaster()->MovePoint(1, SpawnLoc[0].x, SpawnLoc[0].y, SpawnLoc[0].z); + } + else { + m_creature->GetMotionMaster()->MovementExpired(); + MovementStarted = false; + SetCombatMovement(false); + } + } void Aggro(Unit *who) { if(pInstance) pInstance->SetData(TYPE_DEATHWHISPER, IN_PROGRESS); - DoCastSpellIfCan(m_creature, SPELL_MANA_BARRIER ); - isManaBarrier = true; + bsw->doCast(SPELL_MANA_BARRIER ); + MovementStarted = true; + SetCombatMovement(false); + DoScriptText(-1631023,m_creature); + m_creature->GetMotionMaster()->MovePoint(1, SpawnLoc[0].x, SpawnLoc[0].y, SpawnLoc[0].z); } void JustDied(Unit *killer) { if(pInstance) pInstance->SetData(TYPE_DEATHWHISPER, DONE); + DoScriptText(-1631032,m_creature,killer); + } + + void CallGuard(uint8 place) + { + if (Unit* pTemp = bsw->doSummon(urand(0,1) ? NPC_FANATIC : NPC_ADHERENT, SpawnLoc[3*place+1].x, SpawnLoc[3*place+1].y, SpawnLoc[3*place+1].z)) + if (Unit* pTarget= SelectUnit(SELECT_TARGET_RANDOM, 0) ) { + pTemp->AddThreat(pTarget, 100.0f); + pTemp->GetMotionMaster()->MoveChase(pTarget); + }; + if (Unit* pTemp = bsw->doSummon(urand(0,1) ? NPC_FANATIC : NPC_ADHERENT, SpawnLoc[3*place+2].x, SpawnLoc[3*place+2].y, SpawnLoc[3*place+2].z)) + if (Unit* pTarget= SelectUnit(SELECT_TARGET_RANDOM, 0) ) { + pTemp->AddThreat(pTarget, 100.0f); + pTemp->GetMotionMaster()->MoveChase(pTarget); + }; + if (Unit* pTemp = bsw->doSummon(urand(0,1) ? NPC_FANATIC : NPC_ADHERENT, SpawnLoc[3*place+3].x, SpawnLoc[3*place+3].y, SpawnLoc[3*place+3].z)) + if (Unit* pTarget= SelectUnit(SELECT_TARGET_RANDOM, 0) ) { + pTemp->AddThreat(pTarget, 100.0f); + pTemp->GetMotionMaster()->MoveChase(pTarget); + }; } void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) { if (!m_creature || !m_creature->isAlive()) return; - if (isManaBarrier) { - m_creature->SetPower(POWER_MANA,m_creature->GetPower(POWER_MANA)-uiDamage); - uiDamage = 0; - if(m_creature->GetHealth() <= m_creature->GetMaxHealth()) { - m_uiMana = m_creature->GetPower(POWER_MANA)-(m_creature->GetMaxHealth()- m_creature->GetHealth()); - if (m_uiMana <= 0) m_uiMana =0; - m_creature->SetPower(POWER_MANA,m_uiMana); - m_creature->SetHealth(m_creature->GetMaxHealth()); - }; - if(m_creature->GetPower(POWER_MANA) <= m_creature->GetMaxPower(POWER_MANA)/10 ) { - m_creature->RemoveAurasDueToSpell(SPELL_MANA_BARRIER); - isManaBarrier = false; - }; + + if (bsw->hasAura(SPELL_MANA_BARRIER, m_creature)) { + if (m_creature->GetPower(POWER_MANA) > uiDamage) { + m_creature->SetPower(POWER_MANA,m_creature->GetPower(POWER_MANA)-uiDamage); + uiDamage = 0; + } + else { + m_creature->SetPower(POWER_MANA,0); + bsw->doRemove(SPELL_MANA_BARRIER); + }; } else return; } void UpdateAI(const uint32 diff) { + if (intro && bsw->timedQuery(SPELL_SHADOW_BOLT,diff)) + switch (stage) { + case 0: + DoScriptText(-1631020,m_creature); + stage = 1; + break; + case 1: + DoScriptText(-1631021,m_creature); + stage = 2; + break; + case 2: + DoScriptText(-1631022,m_creature); + stage = 3; + break; + default: + break; + } + + if (bsw->hasAura(SPELL_MANA_BARRIER, m_creature)) { + if(m_creature->GetHealth() <= m_creature->GetMaxHealth()) { + if (m_creature->GetPower(POWER_MANA) > (m_creature->GetMaxHealth() - m_creature->GetHealth())) + { + m_creature->SetPower(POWER_MANA,m_creature->GetPower(POWER_MANA)-(m_creature->GetMaxHealth() - m_creature->GetHealth())); + m_creature->SetHealth(m_creature->GetMaxHealth()); + } + else m_creature->SetPower(POWER_MANA,0); + } + } + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (MovementStarted) return; + switch(stage) { - case 0: { - if (m_uiShadowBolt_Timer < diff) - { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, Regular ? SPELL_SHADOW_BOLT_N : SPELL_SHADOW_BOLT_H ); - m_uiShadowBolt_Timer=urand(8000,10000); - } else m_uiShadowBolt_Timer -= diff; - - if (m_uiSummon_Timer < diff) - { - CallGuard(NPC_FANATIC, TEMPSUMMON_TIMED_DESPAWN, 60000); - CallGuard(NPC_ADHERENT, TEMPSUMMON_TIMED_DESPAWN, 60000); - if(!Regular){ - CallGuard(NPC_FANATIC, TEMPSUMMON_TIMED_DESPAWN, 60000); - CallGuard(NPC_ADHERENT, TEMPSUMMON_TIMED_DESPAWN, 60000); - }; - m_uiSummon_Timer=40000; - } else m_uiSummon_Timer -= diff; - - if (m_uiDarkEmpowerment_Timer < diff) + case 3: { + if (IsCombatMovement()) + SetCombatMovement(false); + + bsw->timedCast(SPELL_SHADOW_BOLT,diff); + + if (bsw->timedQuery(NPC_FANATIC, diff)) + { + DoScriptText(-1631028,m_creature); + switch (Difficulty) { + case RAID_DIFFICULTY_10MAN_NORMAL: + CallGuard(urand(0,1)); + break; + case RAID_DIFFICULTY_10MAN_HEROIC: + CallGuard(urand(0,1)); + if (urand(0,1)) CallGuard(2); + break; + case RAID_DIFFICULTY_25MAN_NORMAL: + CallGuard(0); + CallGuard(1); + if (urand(0,1)) CallGuard(2); + break; + case RAID_DIFFICULTY_25MAN_HEROIC: + CallGuard(0); + CallGuard(1); + CallGuard(2); + break; + default: + break; + + } + } + + if (bsw->timedQuery(SPELL_DARK_EMPOWERMENT ,diff)) { - if(Creature *pGuard = GetClosestCreatureWithEntry(m_creature, NPC_FANATIC, 30.0f)) - DoCast(pGuard, SPELL_DARK_EMPOWERMENT_N); - else if(Creature *pGuard = GetClosestCreatureWithEntry(m_creature, NPC_ADHERENT, 30.0f)) - DoCast(pGuard, SPELL_DARK_EMPOWERMENT_N); - m_uiDarkEmpowerment_Timer=urand(20000,40000); - } else m_uiDarkEmpowerment_Timer -= diff; + switch (urand(0,1)) { + case 0: + if(Creature *pGuard = GetClosestCreatureWithEntry(m_creature, NPC_FANATIC, 100.0f)) + bsw->doCast(SPELL_DARK_EMPOWERMENT, pGuard); + DoScriptText(-1631026,m_creature); + break; + case 1: + if(Creature *pGuard = GetClosestCreatureWithEntry(m_creature, NPC_ADHERENT, 100.0f)) + bsw->doCast(SPELL_DARK_EMPOWERMENT, pGuard); + DoScriptText(-1631027,m_creature); + break; + } + } break;} - case 1: { - if (m_uiFrostBolt_Timer < diff) - {if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, Regular ? SPELL_FROSTBOLT_N : SPELL_FROSTBOLT_H); - m_uiFrostBolt_Timer=urand(8000,15000); - } else m_uiFrostBolt_Timer -= diff; + case 4: { + bsw->timedCast(SPELL_FROSTBOLT, diff); - if (m_uiInsignificance_Timer < diff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_INSIGNIFICANCE_N); - m_uiInsignificance_Timer=urand(20000,40000); - } else m_uiInsignificance_Timer -= diff; + bsw->timedCast(SPELL_INSIGNIFICANCE, diff); - if (m_uiSummon2_Timer < diff) - { - CallGuard(NPC_VENGEFUL_SHADE, TEMPSUMMON_TIMED_DESPAWN, 30000); - if(!Regular) CallGuard(NPC_VENGEFUL_SHADE, TEMPSUMMON_TIMED_DESPAWN, 30000); - m_uiSummon2_Timer=10000; - } else m_uiSummon2_Timer -= diff; + bsw->timedCast(NPC_VENGEFUL_SHADE, diff); + + bsw->timedCast(SPELL_DOMINATE_MIND, diff); + + if (bsw->timedQuery(NPC_FANATIC, diff)) + { + switch (Difficulty) { + case RAID_DIFFICULTY_10MAN_HEROIC: + CallGuard(urand(0,1)); + if (urand(0,1)) CallGuard(2); + break; + case RAID_DIFFICULTY_25MAN_HEROIC: + CallGuard(0); + CallGuard(1); + CallGuard(2); + break; + default: + break; - if (m_uiDominateMind_Timer < diff) - {if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, SPELL_DOMINATE_MIND_H); - m_uiDominateMind_Timer=urand(15000,25000); - } else m_uiDominateMind_Timer -= diff; + } + } break;} } - if (m_uiDeathAndDecay_Timer < diff) - {DoCastSpellIfCan(m_creature->getVictim(), SPELL_DEATH_AND_DECAY_N); - m_uiDeathAndDecay_Timer=urand(30000,45000); - } else m_uiDeathAndDecay_Timer -= diff; + bsw->timedCast(SPELL_DEATH_AND_DECAY, diff); - health = m_creature->GetHealth()*100 / m_creature->GetMaxHealth(); - if (!isManaBarrier && stage == 0) stage = 1; + if (!bsw->hasAura(SPELL_MANA_BARRIER, m_creature) && stage == 3) + { + stage = 4; + DoScriptText(-1631024,m_creature); + SetCombatMovement(true); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + } + + if (bsw->timedQuery(SPELL_BERSERK, diff)) + { + bsw->doCast(SPELL_BERSERK); + DoScriptText(-1631031,m_creature); + }; - if (m_uiBerserk_Timer < diff) - { - DoCastSpellIfCan(m_creature, SPELL_BERSERK); - m_uiBerserk_Timer = 600000; - } else m_uiBerserk_Timer -= diff; - DoMeleeAttackIfReady(); + DoMeleeAttackIfReady(); } }; @@ -226,54 +319,49 @@ struct MANGOS_DLL_DECL mob_vengeful_shadeAI : public ScriptedAI mob_vengeful_shadeAI(Creature *pCreature) : ScriptedAI(pCreature) { m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); - Regular = pCreature->GetMap()->IsRegularDifficulty(); + bsw = new BossSpellWorker(this); Reset(); } ScriptedInstance *m_pInstance; - uint32 m_uiRangeCheck_Timer; - bool Regular; - + BossSpellWorker* bsw; void Reset() { - m_uiRangeCheck_Timer = 1000; + m_creature->SetRespawnDelay(DAY); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); m_creature->SetInCombatWithZone(); if (Unit* pTarget= SelectUnit(SELECT_TARGET_RANDOM, 0) ) { + m_creature->AddThreat(pTarget, 1000.0f); m_creature->GetMotionMaster()->MoveChase(pTarget); - m_creature->SetSpeedRate(MOVE_RUN, 0.8); - } else - if (Unit* pTarget = Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_LADY_DEATHWHISPER))) { - m_creature->GetMotionMaster()->MoveChase(pTarget); - m_creature->SetSpeedRate(MOVE_RUN, 0.8); + m_creature->SetSpeedRate(MOVE_RUN, 0.5); } + bsw->doCast(SPELL_VENGEFUL_BLAST); } void UpdateAI(const uint32 uiDiff) { + if(m_pInstance && m_pInstance->GetData(TYPE_DEATHWHISPER) != IN_PROGRESS) + m_creature->ForcedDespawn(); + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (m_uiRangeCheck_Timer < uiDiff) + if (bsw->timedQuery(SPELL_VENGEFUL_BLAST_0, uiDiff)) { - if (m_pInstance) - { - if (m_creature->IsWithinDist(m_creature->getVictim(), 2.0f, false)) + if (m_creature->IsWithinDist(m_creature->getVictim(), 3.0f, false)) { - DoCast(m_creature->getVictim(), Regular ? SPELL_VENGEFUL_BLAST_N : SPELL_VENGEFUL_BLAST_H); - m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); +// bsw->doCast(SPELL_VENGEFUL_BLAST_0); + m_creature->ForcedDespawn(); + } + else + { + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + m_creature->SetSpeedRate(MOVE_RUN, 0.5); } - } - m_uiRangeCheck_Timer = 1000; - if (m_creature->getVictim()) { - m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); - m_creature->SetSpeedRate(MOVE_RUN, 0.8); - } } - else m_uiRangeCheck_Timer -= uiDiff; } }; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp index 239a0234e..41dacf741 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp @@ -24,3 +24,12 @@ EndScriptData */ #include "precompiled.h" #include "def_spire.h" +static Locations SpawnLoc[]= +{ + {4203.470215, 2484.500000, 364.872009}, // 0 Valithria + {4240.688477, 2405.794678, 364.868591}, // 1 Valithria Room 1 + {4165.112305, 2405.872559, 364.872925}, // 2 Valithria Room 2 + {4166.216797, 2564.197266, 364.873047}, // 3 Valithria Room 3 + {4239.579102, 2566.753418, 364.868439}, // 4 Valithria Room 4 +}; + diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h index 18c4f304c..f47e37b10 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h @@ -5,7 +5,7 @@ enum { - DIFFICULTY = 1001, + TYPE_DIFFICULTY = 1001, MAP_NUM = 631, TYPE_TELEPORT = 0, @@ -23,7 +23,7 @@ enum TYPE_SINDRAGOSA = 12, TYPE_LICH_KING = 13, TYPE_ICECROWN_QUESTS = 14, - TYPE_FROSTWIRM_COUNT = 15, + TYPE_COUNT = 15, MAX_ENCOUNTERS, NPC_LORD_MARROWGAR = 36612, @@ -80,30 +80,19 @@ enum GO_SAURFANG_CACHE_10_H = 202238, GO_SAURFANG_CACHE_25_H = 202241, - GO_GUNSHIP_ARMORY_A_10 = 201872, // - GO_GUNSHIP_ARMORY_A_25 = 201873, // - GO_GUNSHIP_ARMORY_A_10H = 201874, // - GO_GUNSHIP_ARMORY_A_25H = 201875, // + GO_GUNSHIP_ARMORY_A_10 = 201872, // + GO_GUNSHIP_ARMORY_A_25 = 201873, // + GO_GUNSHIP_ARMORY_A_10H = 201874, // + GO_GUNSHIP_ARMORY_A_25H = 201875, // - GO_GUNSHIP_ARMORY_H_10 = 202177, // - GO_GUNSHIP_ARMORY_H_25 = 202178, // - GO_GUNSHIP_ARMORY_H_10H = 202179, // - GO_GUNSHIP_ARMORY_H_25H = 202180, // + GO_GUNSHIP_ARMORY_H_10 = 202177, // + GO_GUNSHIP_ARMORY_H_25 = 202178, // + GO_GUNSHIP_ARMORY_H_10H = 202179, // + GO_GUNSHIP_ARMORY_H_25H = 202180, // - GO_PLAGUE_SIGIL = 202182, - GO_FROSTWING_SIGIL = 202181, - GO_BLOODWING_SIGIL = 202183, -}; - -static Locations SpawnLoc[]= -{ - {-446.788971, 2003.362915, 191.233948}, // 0 Horde ship enter - {-428.140503, 2421.336914, 191.233078}, // 1 Alliance ship enter - {4203.470215, 2484.500000, 364.872009}, // 2 Valithria - {4240.688477, 2405.794678, 364.868591}, // 3 Valithria Room 1 - {4165.112305, 2405.872559, 364.872925}, // 4 Valithria Room 2 - {4166.216797, 2564.197266, 364.873047}, // 5 Valithria Room 3 - {4239.579102, 2566.753418, 364.868439}, // 6 Valithria Room 4 + GO_PLAGUE_SIGIL = 202182, + GO_FROSTWING_SIGIL = 202181, + GO_BLOODWING_SIGIL = 202183, }; #endif diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp index c0a53b6b3..7ae413540 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp @@ -50,6 +50,7 @@ struct MANGOS_DLL_DECL mob_spire_frostwyrmAI : public ScriptedAI void Reset() { + m_creature->SetRespawnDelay(DAY); stage = 0; } @@ -124,6 +125,7 @@ struct MANGOS_DLL_DECL mob_frost_giantAI : public ScriptedAI void Reset() { + m_creature->SetRespawnDelay(DAY); stage = 0; } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp index b8e81b79d..2f642ec5c 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp @@ -17,6 +17,12 @@ #include "precompiled.h" #include "def_spire.h" +static Locations SpawnLoc[]= +{ + {-446.788971, 2003.362915, 191.233948}, // 0 Horde ship enter + {-428.140503, 2421.336914, 191.233078}, // 1 Alliance ship enter +}; + struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance { instance_icecrown_spire(Map* pMap) : ScriptedInstance(pMap) @@ -404,7 +410,7 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance case TYPE_ICECROWN_QUESTS: m_auiEncounter[14] = uiData; break; - case TYPE_FROSTWIRM_COUNT: + case TYPE_COUNT: m_auiEncounter[15] = uiData; uiData = NOT_STARTED; break; @@ -435,14 +441,23 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance { switch(uiType) { - case DIFFICULTY: return Difficulty; + case TYPE_DIFFICULTY: return Difficulty; case TYPE_TELEPORT: return m_auiEncounter[0]; case TYPE_MARROWGAR: return m_auiEncounter[1]; case TYPE_DEATHWHISPER: return m_auiEncounter[2]; case TYPE_SKULLS_PLATO: return m_auiEncounter[3]; case TYPE_FLIGHT_WAR: return m_auiEncounter[4]; case TYPE_SAURFANG: return m_auiEncounter[5]; - case TYPE_FROSTWIRM_COUNT: return m_auiEncounter[15]; + case TYPE_FESTERGUT: return m_auiEncounter[6]; + case TYPE_ROTFACE: return m_auiEncounter[7]; + case TYPE_PUTRICIDE: return m_auiEncounter[8]; + case TYPE_BLOOD_COUNCIL: return m_auiEncounter[9]; + case TYPE_LANATHEL: return m_auiEncounter[10]; + case TYPE_VALITHRIA: return m_auiEncounter[11]; + case TYPE_SINDRAGOSA: return m_auiEncounter[12]; + case TYPE_LICH_KING: return m_auiEncounter[13]; + case TYPE_ICECROWN_QUESTS: return m_auiEncounter[14]; + case TYPE_COUNT: return m_auiEncounter[15]; } return 0; } From 7bd8586dc52a4114995541ee17fa668ee136559b Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Fri, 23 Apr 2010 13:40:50 +0400 Subject: [PATCH 256/405] ICC 21 - Saurfang rewrite started --- .../721_icecrown_spelltable_scriptdev2.sql | 22 ++++ .../boss_deathbringer_saurfang.cpp | 120 ++++++------------ .../boss_lady_deathwhisper.cpp | 2 +- 3 files changed, 64 insertions(+), 80 deletions(-) diff --git a/addition/721_icecrown_spelltable_scriptdev2.sql b/addition/721_icecrown_spelltable_scriptdev2.sql index 619289cfb..53fc71e70 100644 --- a/addition/721_icecrown_spelltable_scriptdev2.sql +++ b/addition/721_icecrown_spelltable_scriptdev2.sql @@ -53,6 +53,28 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ -- Deathbringer Saurfang DELETE FROM `boss_spell_table` WHERE `entry` = 37813; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(37813, 72178, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 4, 0, 0), +(37813, 72371, 0, 0, 0, 15000, 0, 0, 0, 27000, 0, 0, 0, 4, 0, 0), +(37813, 72293, 0, 72444, 0, 15000, 0, 0, 0, 27000, 0, 0, 0, 4, 0, 0), +(37813, 72737, 0, 0, 0, 15000, 0, 0, 0, 27000, 0, 0, 0, 4, 0, 0), +(37813, 72385, 0, 72442, 0, 20000, 0, 0, 0, 40000, 0, 0, 0, 4, 0, 0), +(37813, 72380, 0, 72438, 0, 15000, 0, 0, 0, 27000, 0, 0, 0, 4, 0, 0), +(37813, 72408, 0, 72448, 0, 20000, 0, 0, 0, 40000, 0, 0, 0, 4, 0, 0), +(37813, 72173, 0, 0, 0, 15000, 0, 0, 0, 27000, 0, 0, 0, 4, 0, 0), +(37813, 72769, 0, 0, 0, 15000, 0, 0, 0, 27000, 0, 0, 0, 4, 0, 0), +(37813, 72723, 0, 0, 0, 15000, 0, 0, 0, 27000, 0, 0, 0, 1, 0, 0), +(37813, 47008, 0, 0, 0, 300000, 0, 0, 0, 300000, 0, 0, 0, 1, 0, 0); +-- summons +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMax_N10`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType` ) VALUES +(37813, 38508, 45000, 45000, 1, 1, 2, 2, 15, 25, 0, 9); +-- Blood beast +DELETE FROM `boss_spell_table` WHERE `entry` = 38508; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(38508, 72176, 0, 0, 0, 15000, 0, 0, 0, 27000, 0, 0, 0, 4, 0, 0), +(38508, 72723, 0, 0, 0, 15000, 0, 0, 0, 27000, 0, 0, 0, 4, 0, 0), +(38508, 21150, 0, 0, 0, 15000, 0, 0, 0, 27000, 0, 0, 0, 4, 0, 0); + -- Festergut DELETE FROM `boss_spell_table` WHERE `entry` = 36626; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp index 47f0afad1..fcacaa710 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp @@ -34,20 +34,15 @@ enum //Abilities SPELL_BLOOD_LINK = 72178, SPELL_BLOOD_POWER = 72371, - SPELL_MARK_N = 72293, + SPELL_MARK = 72293, SPELL_FRENZY = 72737, - SPELL_BOILING_BLOOD_N = 72385, - SPELL_BLOOD_NOVA_N = 72380, - SPELL_RUNE_OF_BLOOD_N = 72408, + SPELL_BOILING_BLOOD = 72385, + SPELL_BLOOD_NOVA = 72380, + SPELL_RUNE_OF_BLOOD = 72408, SPELL_CALL_BLOOD_BEASTS = 72173, SPELL_SCENT_OF_BLOOD = 72769, SPELL_RESISTANT_SKIN = 72723, - SPELL_MARK_H = 72444, - SPELL_BOILING_BLOOD_H = 72442, - SPELL_BLOOD_NOVA_H = 72438, - SPELL_RUNE_OF_BLOOD_H = 72448, - SPELL_BEAST_1 = 72176, SPELL_BEAST_2 = 72723, SPELL_BEAST_3 = 21150, @@ -59,56 +54,44 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI boss_deathbringer_saurfangAI(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Regular = pCreature->GetMap()->IsRegularDifficulty(); + bsw = new BossSpellWorker(this); Reset(); } - bool Regular; - bool m_uiIsFrenzy; ScriptedInstance *pInstance; - uint32 m_uiBerserk_Timer; - uint32 m_uiBloodLink_Timer; - uint32 m_uiBloodNova_Timer; - uint32 m_uiBoilingBlood_Timer; - uint32 m_uiRuneOfBlood_Timer; - uint32 m_uiSummon_Timer; - - uint8 health; + BossSpellWorker* bsw; + bool m_uiIsFrenzy; uint8 stage; void Reset() { - if(pInstance) pInstance->SetData(TYPE_SAURFANG, NOT_STARTED); - m_uiBerserk_Timer = 480000; - m_uiIsFrenzy = false; - stage = 0; - - uint32 m_uiBloodLink_Timer = 10000; - uint32 m_uiBloodNova_Timer = 20000; - uint32 m_uiBoilingBlood_Timer = 25000; - uint32 m_uiRuneOfBlood_Timer = 35000; - uint32 m_uiSummon_Timer =30000; - - } - uint64 CallGuard(uint64 npctype,TempSummonType type, uint32 _summontime ) - { - float fPosX, fPosY, fPosZ; - m_creature->GetPosition(fPosX, fPosY, fPosZ); - m_creature->GetRandomPoint(fPosX, fPosY, fPosZ, urand(15, 25), fPosX, fPosY, fPosZ); - Creature* pSummon = m_creature->SummonCreature(npctype, fPosX, fPosY, fPosZ, 0, type, _summontime); - if(pSummon) pSummon->SetInCombatWithZone(); -// DoScriptText(EMOTE_SUMMON, m_creature); - return pSummon ? pSummon->GetGUID() : 0; + if(pInstance) pInstance->SetData(TYPE_SAURFANG, NOT_STARTED); + m_uiIsFrenzy = false; + stage = 0; } void Aggro(Unit *who) { if(pInstance) pInstance->SetData(TYPE_SAURFANG, IN_PROGRESS); + DoScriptText(-1631100,m_creature); + } + + void KilledUnit(Unit* pVictim) + { + switch (urand(0,1)) { + case 0: + DoScriptText(-1631103,m_creature,pVictim); + break; + case 1: + DoScriptText(-1631104,m_creature,pVictim); + break; + }; } void JustDied(Unit *killer) { if(pInstance) pInstance->SetData(TYPE_SAURFANG, DONE); + DoScriptText(-1631106,m_creature); } void UpdateAI(const uint32 diff) @@ -122,9 +105,10 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI break;} case 1: { if (!m_uiIsFrenzy) { - DoCast(m_creature, SPELL_FRENZY); + bsw->doCast(SPELL_FRENZY); m_uiIsFrenzy = true; stage = 2; + DoScriptText(-1631101,m_creature); } break;} @@ -132,46 +116,24 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI break;} } - if (m_uiBloodLink_Timer < diff) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, SPELL_BLOOD_LINK); - m_uiBloodLink_Timer=urand(8000,15000); - } else m_uiBloodLink_Timer -= diff; - - if (m_uiBloodNova_Timer < diff) { - DoCast(m_creature->getVictim(), Regular ? SPELL_BLOOD_NOVA_N : SPELL_BLOOD_NOVA_H); - m_uiBloodNova_Timer=urand(25000,30000); - } else m_uiBloodNova_Timer -= diff; - - if (m_uiBoilingBlood_Timer < diff) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, Regular ? SPELL_BOILING_BLOOD_N : SPELL_BOILING_BLOOD_H); - m_uiBoilingBlood_Timer=urand(20000,40000); - } else m_uiBoilingBlood_Timer -= diff; - - if (m_uiRuneOfBlood_Timer < diff) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, Regular ? SPELL_RUNE_OF_BLOOD_N : SPELL_RUNE_OF_BLOOD_H); - m_uiRuneOfBlood_Timer=urand(20000,40000); - } else m_uiRuneOfBlood_Timer -= diff; - - if (m_uiSummon_Timer < diff) + bsw->timedCast(SPELL_BLOOD_LINK, diff); + + bsw->timedCast(SPELL_BLOOD_NOVA, diff); + + bsw->timedCast(SPELL_BOILING_BLOOD, diff); + + bsw->timedCast(SPELL_RUNE_OF_BLOOD, diff); + + if (bsw->timedQuery(NPC_BLOOD_BEASTS, diff)) { - CallGuard(NPC_BLOOD_BEASTS, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000); - CallGuard(NPC_BLOOD_BEASTS, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000); - if(!Regular) CallGuard(NPC_BLOOD_BEASTS, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000); - if(!Regular) CallGuard(NPC_BLOOD_BEASTS, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000); - m_uiSummon_Timer=60000; - } else m_uiSummon_Timer -= diff; + bsw->doCast(NPC_BLOOD_BEASTS); + bsw->doCast(NPC_BLOOD_BEASTS); + DoScriptText(-1631102,m_creature); + } - health = m_creature->GetHealth()*100 / m_creature->GetMaxHealth(); - if (health <= 30 && stage == 0) stage = 1; + if (m_creature->GetHealthPercent() <= 30.0f && stage == 0) stage = 1; - if (m_uiBerserk_Timer < diff) - { - DoCast(m_creature, SPELL_BERSERK); - m_uiBerserk_Timer = 600000; - } else m_uiBerserk_Timer -= diff; + bsw->timedCast(SPELL_BERSERK, diff); DoMeleeAttackIfReady(); } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp index b9e6fc24e..387f8def0 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp @@ -96,7 +96,7 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI void KilledUnit(Unit* pVictim) { - switch (urand(0,2)) { + switch (urand(0,1)) { case 0: DoScriptText(-1631029,m_creature,pVictim); break; From 0b41bd6d4c18b219c5c471298e833d73f98ca555 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Fri, 23 Apr 2010 16:57:17 +0400 Subject: [PATCH 257/405] ICC part 22 - Marrowgar draft --- addition/721_icecrown_mangos.sql | 6 +- .../721_icecrown_spelltable_scriptdev2.sql | 56 ++++-- .../boss_deathbringer_saurfang.cpp | 33 +++- .../icecrown_citadel/boss_lord_marrowgar.cpp | 181 ++++++------------ .../icecrown_citadel/icecrown_teleport.cpp | 30 ++- 5 files changed, 149 insertions(+), 157 deletions(-) diff --git a/addition/721_icecrown_mangos.sql b/addition/721_icecrown_mangos.sql index 98947fedf..66a005a53 100644 --- a/addition/721_icecrown_mangos.sql +++ b/addition/721_icecrown_mangos.sql @@ -34,7 +34,7 @@ UPDATE `creature_template` SET `faction_A`=14, `faction_H`=14,`ScriptName`='mob_ UPDATE `creature_template` SET `ScriptName`='boss_lord_marrowgar' WHERE `entry`= 36612; UPDATE `gameobject_template` SET `faction` = '114',`data0` = '0' WHERE `gameobject_template`.`entry` IN (201910,201911); UPDATE `gameobject` SET `state` = '1' WHERE `guid` IN (72526,72525); -UPDATE `creature_template` SET `ScriptName`='mob_coldflame', `minlevel` = 80, `maxlevel` = 80, `modelid_A` = 11686, `modelid_A2` = 11686, `modelid_H` = 11686, `modelid_H2` = 11686, `faction_A` = 35, `faction_H` = 35 WHERE `entry`= 36672; +UPDATE `creature_template` SET `ScriptName`='mob_coldflame', `minlevel` = 82, `maxlevel` = 82, `modelid_A` = 11686, `modelid_A2` = 11686, `modelid_H` = 11686, `modelid_H2` = 11686, `faction_A` = 14, `faction_H` = 14 WHERE `entry`= 36672; UPDATE `creature_template` SET `ScriptName`='mob_bone_spike' WHERE `entry`= 38711; -- Gunship battle @@ -56,7 +56,7 @@ INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `positi (972555, 202179, 631, 4, 1, -447.493, 2003.5, 191.235, 0.153939, 0, 0, 0.0768933, 0.997039, -604800, 100, 1), (972557, 202180, 631, 8, 1, -447.493, 2003.5, 191.235, 0.153939, 0, 0, 0.0768933, 0.997039, -604800, 100, 1); - +-- Plague wing -- Rotface UPDATE `creature_template` SET `ScriptName`='boss_rotface', `AIName`='' WHERE `entry`= 36627; UPDATE `gameobject_template` SET `faction` = '114' WHERE `gameobject_template`.`entry` IN (201370); @@ -75,6 +75,8 @@ UPDATE `creature_template` SET `ScriptName`='mob_icc_gas_cloud', `AIName`='' WHE UPDATE `creature_template` SET `ScriptName`='mob_icc_volatile_ooze', `AIName`='' WHERE `entry`= 37697; UPDATE `gameobject_template` SET `faction` = '0', `ScriptName` = 'go_plague_sigil' WHERE `gameobject_template`.`entry` IN (202182); +-- Blood wing +UPDATE `gameobject_template` SET `faction` = '0', `ScriptName` = 'go_bloodwing_sigil' WHERE `gameobject_template`.`entry` IN (202181); -- Taldaram -- UPDATE `creature_template` SET `ScriptName`='boss_taldaram' WHERE `entry`= 37973; -- Valanar diff --git a/addition/721_icecrown_spelltable_scriptdev2.sql b/addition/721_icecrown_spelltable_scriptdev2.sql index 53fc71e70..9be9c8147 100644 --- a/addition/721_icecrown_spelltable_scriptdev2.sql +++ b/addition/721_icecrown_spelltable_scriptdev2.sql @@ -2,6 +2,26 @@ -- Lord Marrowgar DELETE FROM `boss_spell_table` WHERE `entry` = 36612; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(36612, 71021, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 3, 0, 0), +(36612, 69146, 0, 70824, 0, 15000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36612, 69057, 0, 70824, 0, 17000, 0, 0, 0, 27000, 0, 0, 0, 0, 0, 0, 6, 0, 0), +(36612, 69076, 0, 0, 0, 3600001, 0, 0, 0, 3600001, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36612, 69075, 0, 70835, 70836, 2000, 0, 0, 0, 2000, 0, 0, 0, 5, 0, 0, 12, 0, 0), +(36612, 47008, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 0, 0, 0, 1, 0, 0); +-- summons +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMax_N10`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType` ) VALUES +(36612, 38711, 10000, 12000, 1, 1, 2, 2, 1, 5, 0, 9), +(36612, 36672, 45000, 45000, 1, 1, 2, 2, 75, 100, 0, 9); +-- Cold flame +DELETE FROM `boss_spell_table` WHERE `entry` = 36672; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(36672, 69146, 0, 70824, 0, 1000, 0, 0, 0, 1000, 0, 0, 0, 5, 0, 0, 12, 0, 0); +-- Bone spike +DELETE FROM `boss_spell_table` WHERE `entry` = 38711; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(38711, 69065, 0, 0, 0, 1000, 0, 0, 0, 1000, 0, 0, 0, 6, 0, 0); + -- Lady Deathwhisper DELETE FROM `boss_spell_table` WHERE `entry` = 36855; @@ -54,14 +74,14 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ -- Deathbringer Saurfang DELETE FROM `boss_spell_table` WHERE `entry` = 37813; INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES -(37813, 72178, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 4, 0, 0), +(37813, 72178, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 1, 0, 0), (37813, 72371, 0, 0, 0, 15000, 0, 0, 0, 27000, 0, 0, 0, 4, 0, 0), (37813, 72293, 0, 72444, 0, 15000, 0, 0, 0, 27000, 0, 0, 0, 4, 0, 0), (37813, 72737, 0, 0, 0, 15000, 0, 0, 0, 27000, 0, 0, 0, 4, 0, 0), (37813, 72385, 0, 72442, 0, 20000, 0, 0, 0, 40000, 0, 0, 0, 4, 0, 0), (37813, 72380, 0, 72438, 0, 15000, 0, 0, 0, 27000, 0, 0, 0, 4, 0, 0), (37813, 72408, 0, 72448, 0, 20000, 0, 0, 0, 40000, 0, 0, 0, 4, 0, 0), -(37813, 72173, 0, 0, 0, 15000, 0, 0, 0, 27000, 0, 0, 0, 4, 0, 0), +(37813, 72173, 0, 0, 0, 30000, 0, 0, 0, 45000, 0, 0, 0, 1, 0, 0), (37813, 72769, 0, 0, 0, 15000, 0, 0, 0, 27000, 0, 0, 0, 4, 0, 0), (37813, 72723, 0, 0, 0, 15000, 0, 0, 0, 27000, 0, 0, 0, 1, 0, 0), (37813, 47008, 0, 0, 0, 300000, 0, 0, 0, 300000, 0, 0, 0, 1, 0, 0); @@ -78,22 +98,22 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ -- Festergut DELETE FROM `boss_spell_table` WHERE `entry` = 36626; -INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES -( 36626, 70138, 0, 0, 0, 5000, 0, 0, 0, 15000, 0, 0, 0, 1, 0, 0), -( 36626, 69161, 0, 0, 0, 5000, 0, 0, 0, 15000, 0, 0, 0, 1, 0, 0), -( 36626, 69162, 0, 0, 0, 5000, 0, 0, 0, 15000, 0, 0, 0, 1, 0, 0), -( 36626, 70468, 0, 0, 0, 5000, 0, 0, 0, 15000, 0, 0, 0, 1, 0, 0), -( 36626, 69165, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 1, 0, 0), -( 36626, 69157, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 12, 0, 0), -( 36626, 69126, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 12, 0, 0), -( 36626, 69166, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 1, 0, 0), -( 36626, 69195, 71219, 73031, 73032, 20000, 0, 0, 0, 30000, 0, 0, 0, 1, 0, 0), -( 36626, 69278, 69278, 71221, 71221, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 1, 0, 0), -( 36626, 72103, 72103, 72103, 72103, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 4, 0, 0), -( 36626, 72219, 72551, 72551, 72553, 10000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), -( 36626, 72227, 72227, 72229, 72230, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 4, 0, 0), -( 36626, 72272, 72273, 72273, 73020, 20000, 0, 0, 0, 30000, 0, 0, 0, 4, 0, 0), -( 36626, 47008, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 1, 0, 0); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +( 36626, 70138, 0, 0, 0, 5000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +( 36626, 69161, 0, 0, 0, 5000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +( 36626, 69162, 0, 0, 0, 5000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +( 36626, 70468, 0, 0, 0, 5000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +( 36626, 69165, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +( 36626, 69157, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 150, 0, 0, 12, 0, 0), +( 36626, 69126, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 150, 0, 0, 12, 0, 0), +( 36626, 69166, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +( 36626, 69195, 71219, 73031, 73032, 20000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +( 36626, 69278, 69278, 71221, 71221, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 1, 0, 0), +( 36626, 72103, 72103, 72103, 72103, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 4, 0, 0), +( 36626, 72219, 72551, 72551, 72553, 10000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 3, 0, 0), +( 36626, 72227, 72227, 72229, 72230, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 4, 0, 0), +( 36626, 72272, 72273, 72273, 73020, 20000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +( 36626, 47008, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 0, 0, 0, 1, 0, 0); -- Rotface DELETE FROM `boss_spell_table` WHERE `entry` = 36627; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp index fcacaa710..4392ffc13 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp @@ -62,10 +62,13 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI BossSpellWorker* bsw; bool m_uiIsFrenzy; uint8 stage; + uint8 Difficulty; void Reset() { - if(pInstance) pInstance->SetData(TYPE_SAURFANG, NOT_STARTED); + if(!pInstance) return; + Difficulty = pInstance->GetData(TYPE_DIFFICULTY); + pInstance->SetData(TYPE_SAURFANG, NOT_STARTED); m_uiIsFrenzy = false; stage = 0; } @@ -124,11 +127,33 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI bsw->timedCast(SPELL_RUNE_OF_BLOOD, diff); - if (bsw->timedQuery(NPC_BLOOD_BEASTS, diff)) + if (bsw->timedQuery(SPELL_CALL_BLOOD_BEASTS, diff)) { - bsw->doCast(NPC_BLOOD_BEASTS); - bsw->doCast(NPC_BLOOD_BEASTS); + if (Unit* pTemp = bsw->doSummon(NPC_BLOOD_BEASTS)) + if (Unit* pTarget= SelectUnit(SELECT_TARGET_RANDOM, 0) ) { + pTemp->AddThreat(pTarget, 100.0f); + pTemp->GetMotionMaster()->MoveChase(pTarget); + }; + if (Unit* pTemp = bsw->doSummon(NPC_BLOOD_BEASTS)) + if (Unit* pTarget= SelectUnit(SELECT_TARGET_RANDOM, 0) ) { + pTemp->AddThreat(pTarget, 100.0f); + pTemp->GetMotionMaster()->MoveChase(pTarget); + }; DoScriptText(-1631102,m_creature); + if (Difficulty == RAID_DIFFICULTY_25MAN_NORMAL + || Difficulty == RAID_DIFFICULTY_25MAN_HEROIC) + { + if (Unit* pTemp = bsw->doSummon(NPC_BLOOD_BEASTS)) + if (Unit* pTarget= SelectUnit(SELECT_TARGET_RANDOM, 0) ) { + pTemp->AddThreat(pTarget, 100.0f); + pTemp->GetMotionMaster()->MoveChase(pTarget); + }; + if (Unit* pTemp = bsw->doSummon(NPC_BLOOD_BEASTS)) + if (Unit* pTarget= SelectUnit(SELECT_TARGET_RANDOM, 0) ) { + pTemp->AddThreat(pTarget, 100.0f); + pTemp->GetMotionMaster()->MoveChase(pTarget); + }; + } } if (m_creature->GetHealthPercent() <= 30.0f && stage == 0) stage = 1; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp index d8f594455..ebdda0670 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp @@ -32,16 +32,12 @@ enum MOB_BONE_SPIKE = 38711, MOB_COLDFLAME = 36672, //Abilities - SPELL_SABER_LASH_N = 71021, - SPELL_COLD_FLAME_N = 69146, + SPELL_SABER_LASH = 71021, + SPELL_COLD_FLAME = 69146, SPELL_BONE_STRIKE = 69057, SPELL_BONE_STORM = 69076, SPELL_BONE_STRIKE_IMPALE = 69065, - SPELL_BONE_STORM_STRIKE_N = 69075, - - SPELL_SABER_LASH_H = 71021, - SPELL_COLD_FLAME_H = 70824, - SPELL_BONE_STORM_STRIKE_H = 70835, //h25 - 70836 + SPELL_BONE_STORM_STRIKE = 69075, }; struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI @@ -49,54 +45,21 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI boss_lord_marrowgarAI(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Regular = pCreature->GetMap()->IsRegularDifficulty(); + bsw = new BossSpellWorker(this); Reset(); } - bool Regular; ScriptedInstance *pInstance; + BossSpellWorker* bsw; uint8 stage; - uint32 m_uiSaberLash_Timer; - uint32 m_uiColdFlame_Timer; - uint32 m_uiBoneStrike_Timer; bool m_uiBoneStorm; - bool m_uiBoneStorm_Timer; - uint32 m_uiBerserk_Timer; - uint32 m_uiBoneStormStrike_Timer; - uint8 health; void Reset() { - stage = 0; - health = 100; - m_uiSaberLash_Timer = 10000; - m_uiColdFlame_Timer = 5000; - m_uiBoneStormStrike_Timer = 2000; - m_uiBoneStrike_Timer = urand(17000,29000); - m_uiBoneStorm = false; - m_uiBoneStorm_Timer = 40000; - m_uiBerserk_Timer = 600000; - if(pInstance) pInstance->SetData(TYPE_MARROWGAR, NOT_STARTED); + stage = 0; } - uint64 CallGuard(uint64 npctype,TempSummonType type, uint32 _summontime ) - { - float fPosX, fPosY, fPosZ; - m_creature->GetPosition(fPosX, fPosY, fPosZ); - m_creature->GetRandomPoint(fPosX, fPosY, fPosZ, urand(0, 10), fPosX, fPosY, fPosZ); - Creature* pSummon = m_creature->SummonCreature(npctype, fPosX, fPosY, fPosZ, 0, type, _summontime); - return pSummon ? pSummon->GetGUID() : 0; - } - - uint64 CallSpike(Unit* pPlayer, uint64 npctype,TempSummonType type, uint32 _summontime ) - { - float fPosX, fPosY, fPosZ; - pPlayer->GetPosition(fPosX, fPosY, fPosZ); - Creature* pSummon = m_creature->SummonCreature(npctype, fPosX, fPosY, fPosZ, 0, type, _summontime); - if (pSummon) pSummon->AddThreat(pPlayer); - return pSummon ? pSummon->GetGUID() : 0; - } /* void JustSummoned(Creature* _summoned) { @@ -122,64 +85,42 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI switch(stage) { case 0: { - if (m_uiBoneStrike_Timer < diff) - { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1)) - if (DoCastSpellIfCan(pTarget, SPELL_BONE_STRIKE)) - CallSpike(pTarget, MOB_BONE_SPIKE, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000); - m_uiBoneStrike_Timer=urand(17000,29000); - } else m_uiBoneStrike_Timer -= diff; + if (bsw->timedQuery(SPELL_BONE_STRIKE, diff)) + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + if (bsw->doCast(SPELL_BONE_STRIKE, pTarget) == CAST_OK) + { + float fPosX, fPosY, fPosZ; + pTarget->GetPosition(fPosX, fPosY, fPosZ); + if (Unit* pSpike = bsw->doSummon(MOB_BONE_SPIKE, fPosX, fPosY, fPosZ)) + pSpike->AddThreat(pTarget, 100.0f); + } break;} case 1: { - if (!m_uiBoneStorm) - {if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) - DoCast(pTarget, SPELL_BONE_STORM ); + if (!m_uiBoneStorm) { + bsw->doCast(SPELL_BONE_STORM); m_uiBoneStorm = true; stage = 2; } break;} + case 2: { - if (m_uiBoneStorm_Timer < diff) - { - m_creature->RemoveAurasDueToSpell(SPELL_BONE_STORM); - m_creature->SetInCombatWithZone(); - stage = 3; - } else m_uiBoneStorm_Timer -= diff; - - if (m_uiBoneStormStrike_Timer < diff) { - Map* pMap = m_creature->GetMap(); - Map::PlayerList const &lPlayers = pMap->GetPlayers(); - for(Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr) - { - Unit* pPlayer = itr->getSource(); - if (!pPlayer) continue; - if (pPlayer->isAlive() && pPlayer->IsWithinDistInMap(m_creature, 5.0f)) - m_creature->CastSpell(pPlayer, Regular ? SPELL_BONE_STORM_STRIKE_N : SPELL_BONE_STORM_STRIKE_H, true); - } - m_uiBoneStormStrike_Timer = 2000; - } + if (bsw->hasAura(SPELL_BONE_STORM, m_creature)) + bsw->timedCast(SPELL_BONE_STORM_STRIKE, diff); + else stage = 3; break;} + case 3: break; } - if (m_uiSaberLash_Timer < diff) - {DoCastSpellIfCan(m_creature->getVictim(), Regular ? SPELL_SABER_LASH_N :SPELL_SABER_LASH_H); - m_uiSaberLash_Timer=urand(8000,12000); - } else m_uiSaberLash_Timer -= diff; + bsw->timedCast(SPELL_SABER_LASH, diff); - if (m_uiColdFlame_Timer < diff) { - CallGuard(MOB_COLDFLAME, TEMPSUMMON_TIMED_DESPAWN, 60000); - m_uiColdFlame_Timer=urand(10000,30000); - } else m_uiColdFlame_Timer -= diff; + if (bsw->timedQuery(MOB_COLDFLAME, diff)) + bsw->doSummon(MOB_COLDFLAME, TEMPSUMMON_TIMED_DESPAWN, 60000); - health = m_creature->GetHealth()*100 / m_creature->GetMaxHealth(); - if (health <= 30 && stage == 0) stage = 1; + if (m_creature->GetHealthPercent() <= 30.0f && stage == 0) stage = 1; - if (m_uiBerserk_Timer < diff) - { - DoCast(m_creature, SPELL_BERSERK); - } - else m_uiBerserk_Timer -= diff; + bsw->timedCast(SPELL_BERSERK, diff); DoMeleeAttackIfReady(); @@ -191,47 +132,44 @@ struct MANGOS_DLL_DECL mob_coldflameAI : public ScriptedAI mob_coldflameAI(Creature *pCreature) : ScriptedAI(pCreature) { m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); - Regular = pCreature->GetMap()->IsRegularDifficulty(); + bsw = new BossSpellWorker(this); Reset(); } ScriptedInstance *m_pInstance; uint32 m_uiRangeCheck_Timer; - bool Regular; - uint32 _diff; - float fPosX, fPosY, fPosZ; + BossSpellWorker* bsw; + float fPosX, fPosY, fPosZ; void Reset() { - m_uiRangeCheck_Timer = 1000; m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); m_creature->GetPosition(fPosX, fPosY, fPosZ); m_creature->GetRandomPoint(fPosX, fPosY, fPosZ, urand(150, 200), fPosX, fPosY, fPosZ); - m_creature->GetMotionMaster()->MovePoint(0, fPosX, fPosY, fPosZ); + m_creature->GetMotionMaster()->MovePoint(1, fPosX, fPosY, fPosZ); + SetCombatMovement(false); m_creature->SetSpeedRate(MOVE_RUN, 0.5f); } - void UpdateAI(const uint32 uiDiff) + void MovementInform(uint32 type, uint32 id) { - _diff = uiDiff; + if(!m_pInstance) return; + if(type != POINT_MOTION_TYPE) return; + if(id != 1) + m_creature->GetMotionMaster()->MovePoint(1, fPosX, fPosY, fPosZ); + else m_creature->ForcedDespawn(); + } - if (m_uiRangeCheck_Timer < uiDiff) - { - m_creature->CastSpell(m_creature, Regular ? SPELL_COLD_FLAME_N : SPELL_COLD_FLAME_H, false); - Map* pMap = m_creature->GetMap(); - Map::PlayerList const &lPlayers = pMap->GetPlayers(); - for(Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr) - { - Unit* pPlayer = itr->getSource(); - if (!pPlayer) continue; - if (pPlayer->isAlive() && pPlayer->IsWithinDistInMap(m_creature, 5.0f)) - if (Creature* pMarrowgar = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(NPC_LORD_MARROWGAR)))) - pMarrowgar->CastSpell(pPlayer, Regular ? SPELL_COLD_FLAME_N : SPELL_COLD_FLAME_H, true); - } - m_uiRangeCheck_Timer = 1000; - } - else m_uiRangeCheck_Timer -= uiDiff; + void AttackStart(Unit *who) + { + //ignore all attackstart commands + return; + } + + void UpdateAI(const uint32 uiDiff) + { + bsw->timedCast(SPELL_COLD_FLAME, uiDiff); if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -243,22 +181,16 @@ struct MANGOS_DLL_DECL mob_bone_spikeAI : public ScriptedAI mob_bone_spikeAI(Creature *pCreature) : ScriptedAI(pCreature) { m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); - Regular = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance *m_pInstance; - uint32 m_uiRangeCheck_Timer; - bool Regular; - uint32 _diff; uint64 m_uiVictimGUID; void Reset() { - m_uiRangeCheck_Timer = 1000; - m_creature->SetSpeedRate(MOVE_RUN, 5.0f); - _diff = 1000; + SetCombatMovement(false); m_creature->SetInCombatWithZone(); } @@ -266,7 +198,6 @@ struct MANGOS_DLL_DECL mob_bone_spikeAI : public ScriptedAI { m_creature->SetInCombatWith(pWho); pWho->SetInCombatWith(m_creature); - m_creature->GetMotionMaster()->MoveChase(pWho); DoCast(pWho, SPELL_BONE_STRIKE_IMPALE); m_uiVictimGUID = pWho->GetGUID(); } @@ -298,15 +229,15 @@ struct MANGOS_DLL_DECL mob_bone_spikeAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (m_uiRangeCheck_Timer < uiDiff) + if(m_pInstance && m_pInstance->GetData(TYPE_MARROWGAR) != IN_PROGRESS) { - if (m_creature->IsWithinDist(m_creature->getVictim(), 1.0f, false)) - m_creature->SetSpeedRate(MOVE_RUN, 0.0f); + if (Unit* pVictim = Unit::GetUnit((*m_creature), m_uiVictimGUID)) + pVictim->RemoveAurasDueToSpell(SPELL_BONE_STRIKE_IMPALE); + m_creature->ForcedDespawn(); } - else m_uiRangeCheck_Timer -= uiDiff; + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; } }; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp index 53fa4d154..cadf2dbb5 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp @@ -84,15 +84,24 @@ bool GOGossipHello_go_icecrown_teleporter(Player *player, GameObject* pGo) bool GOGossipHello_go_plague_sigil(Player *player, GameObject* pGo) { ScriptedInstance *pInstance = (ScriptedInstance *) pGo->GetInstanceData(); - if(!pInstance) return true; + if(!pInstance) return false; + + if (pInstance->GetData(TYPE_FESTERGUT) == DONE) + pInstance->SetData(TYPE_FESTERGUT, DONE); + if (pInstance->GetData(TYPE_ROTFACE) == DONE) + pInstance->SetData(TYPE_ROTFACE, DONE); + + return true; +} + +bool GOGossipHello_go_bloodwing_sigil(Player *player, GameObject* pGo) +{ + ScriptedInstance *pInstance = (ScriptedInstance *) pGo->GetInstanceData(); + if(!pInstance) return false; + + if (pInstance->GetData(TYPE_PUTRICIDE) == DONE) + pInstance->SetData(TYPE_PUTRICIDE, DONE); - if (pInstance->GetData(TYPE_FESTERGUT) == DONE - && pInstance->GetData(TYPE_ROTFACE) == DONE) - { - pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_SCIENTIST_DOOR_GREEN)); - pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_SCIENTIST_DOOR_ORANGE)); - pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_SCIENTIST_DOOR_COLLISION)); - } return true; } @@ -111,4 +120,9 @@ void AddSC_icecrown_teleporter() newscript->Name = "go_plague_sigil"; newscript->pGOGossipHello = &GOGossipHello_go_plague_sigil; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "go_bloodwing_sigil"; + newscript->pGOGossipHello = &GOGossipHello_go_bloodwing_sigil; + newscript->RegisterSelf(); } From 00b63afb269d8915a2fd5396a3699c78bc8ce446 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Fri, 23 Apr 2010 20:32:26 +0400 Subject: [PATCH 258/405] ICC part 23 - first 7 bosses draft ok. --- .../721_icecrown_spelltable_scriptdev2.sql | 4 +- .../icecrown_citadel/boss_lord_marrowgar.cpp | 76 ++++++++++++++----- .../instance_icecrown_spire.cpp | 4 +- 3 files changed, 64 insertions(+), 20 deletions(-) diff --git a/addition/721_icecrown_spelltable_scriptdev2.sql b/addition/721_icecrown_spelltable_scriptdev2.sql index 9be9c8147..2caba94d1 100644 --- a/addition/721_icecrown_spelltable_scriptdev2.sql +++ b/addition/721_icecrown_spelltable_scriptdev2.sql @@ -4,6 +4,7 @@ DELETE FROM `boss_spell_table` WHERE `entry` = 36612; INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES (36612, 71021, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 3, 0, 0), +(36612, 69138, 0, 71580, 0, 8000, 0, 0, 0, 12000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36612, 69146, 0, 70824, 0, 15000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36612, 69057, 0, 70824, 0, 17000, 0, 0, 0, 27000, 0, 0, 0, 0, 0, 0, 6, 0, 0), (36612, 69076, 0, 0, 0, 3600001, 0, 0, 0, 3600001, 0, 0, 0, 0, 0, 0, 1, 0, 0), @@ -16,7 +17,8 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMa -- Cold flame DELETE FROM `boss_spell_table` WHERE `entry` = 36672; INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES -(36672, 69146, 0, 70824, 0, 1000, 0, 0, 0, 1000, 0, 0, 0, 5, 0, 0, 12, 0, 0); +(36672, 69146, 70823, 70824, 70825, 3000, 0, 0, 0, 3000, 0, 0, 0, 5, 0, 0, 12, 0, 0), +(36672, 69145, 0, 0, 0, 3000, 0, 0, 0, 3000, 0, 0, 0, 0, 0, 0, 1, 0, 0); -- Bone spike DELETE FROM `boss_spell_table` WHERE `entry` = 38711; INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp index ebdda0670..d59bba757 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp @@ -29,11 +29,13 @@ enum SPELL_BERSERK = 47008, //yells //summons - MOB_BONE_SPIKE = 38711, - MOB_COLDFLAME = 36672, + NPC_BONE_SPIKE = 38711, + NPC_COLDFLAME = 36672, //Abilities SPELL_SABER_LASH = 71021, + SPELL_CALL_COLD_FLAME = 69138, SPELL_COLD_FLAME = 69146, + SPELL_COLD_FLAME_0 = 69145, SPELL_BONE_STRIKE = 69057, SPELL_BONE_STORM = 69076, SPELL_BONE_STRIKE_IMPALE = 69065, @@ -52,7 +54,7 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI ScriptedInstance *pInstance; BossSpellWorker* bsw; uint8 stage; - bool m_uiBoneStorm; + bool intro; void Reset() { @@ -60,6 +62,13 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI stage = 0; } + void MoveInLineOfSight(Unit* pWho) + { + if (intro) return; + DoScriptText(-1631000,m_creature); + intro = true; + } + /* void JustSummoned(Creature* _summoned) { @@ -69,12 +78,27 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI */ void Aggro(Unit *who) { - if(pInstance) pInstance->SetData(TYPE_MARROWGAR, IN_PROGRESS); + if(!pInstance) return; + pInstance->SetData(TYPE_MARROWGAR, IN_PROGRESS); + DoScriptText(-1631001,m_creature); + } + + void KilledUnit(Unit* pVictim) + { + switch (urand(0,1)) { + case 0: + DoScriptText(-1631006,m_creature,pVictim); + break; + case 1: + DoScriptText(-1631007,m_creature,pVictim); + break; + }; } void JustDied(Unit *killer) { if(pInstance) pInstance->SetData(TYPE_MARROWGAR, DONE); + DoScriptText(-1631009,m_creature); } void UpdateAI(const uint32 diff) @@ -86,27 +110,38 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI { case 0: { if (bsw->timedQuery(SPELL_BONE_STRIKE, diff)) - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1)) if (bsw->doCast(SPELL_BONE_STRIKE, pTarget) == CAST_OK) { + switch (urand(0,1)) { + case 0: + DoScriptText(-1631003,m_creature,pTarget); + break; + case 1: + DoScriptText(-1631004,m_creature,pTarget); + break; + case 2: + DoScriptText(-1631005,m_creature,pTarget); + break; + }; + float fPosX, fPosY, fPosZ; pTarget->GetPosition(fPosX, fPosY, fPosZ); - if (Unit* pSpike = bsw->doSummon(MOB_BONE_SPIKE, fPosX, fPosY, fPosZ)) + if (Unit* pSpike = bsw->doSummon(NPC_BONE_SPIKE, fPosX, fPosY, fPosZ)) pSpike->AddThreat(pTarget, 100.0f); } break;} case 1: { - if (!m_uiBoneStorm) { bsw->doCast(SPELL_BONE_STORM); - m_uiBoneStorm = true; stage = 2; - } + DoScriptText(-1631002,m_creature); break;} case 2: { if (bsw->hasAura(SPELL_BONE_STORM, m_creature)) - bsw->timedCast(SPELL_BONE_STORM_STRIKE, diff); +// bsw->timedCast(SPELL_BONE_STORM_STRIKE, diff); +// insert to this damage override from bone storm else stage = 3; break;} @@ -115,12 +150,18 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI bsw->timedCast(SPELL_SABER_LASH, diff); - if (bsw->timedQuery(MOB_COLDFLAME, diff)) - bsw->doSummon(MOB_COLDFLAME, TEMPSUMMON_TIMED_DESPAWN, 60000); + bsw->timedCast(SPELL_CALL_COLD_FLAME, diff); + +// if (bsw->timedQuery(NPC_COLDFLAME, diff)) +// bsw->doSummon(NPC_COLDFLAME, TEMPSUMMON_TIMED_DESPAWN, 60000); if (m_creature->GetHealthPercent() <= 30.0f && stage == 0) stage = 1; - bsw->timedCast(SPELL_BERSERK, diff); + if (bsw->timedQuery(SPELL_BERSERK, diff)) + { + bsw->doCast(SPELL_BERSERK); + DoScriptText(-1631008,m_creature); + } DoMeleeAttackIfReady(); @@ -149,7 +190,8 @@ struct MANGOS_DLL_DECL mob_coldflameAI : public ScriptedAI m_creature->GetRandomPoint(fPosX, fPosY, fPosZ, urand(150, 200), fPosX, fPosY, fPosZ); m_creature->GetMotionMaster()->MovePoint(1, fPosX, fPosY, fPosZ); SetCombatMovement(false); - m_creature->SetSpeedRate(MOVE_RUN, 0.5f); + m_creature->SetSpeedRate(MOVE_RUN, 0.8f); + bsw->doCast(SPELL_COLD_FLAME_0); } void MovementInform(uint32 type, uint32 id) @@ -158,7 +200,7 @@ struct MANGOS_DLL_DECL mob_coldflameAI : public ScriptedAI if(type != POINT_MOTION_TYPE) return; if(id != 1) m_creature->GetMotionMaster()->MovePoint(1, fPosX, fPosY, fPosZ); - else m_creature->ForcedDespawn(); + else m_creature->ForcedDespawn(); } void AttackStart(Unit *who) @@ -169,8 +211,8 @@ struct MANGOS_DLL_DECL mob_coldflameAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { - bsw->timedCast(SPELL_COLD_FLAME, uiDiff); - + bsw->timedCast(SPELL_COLD_FLAME_0, uiDiff); +// bsw->timedCast(SPELL_COLD_FLAME, uiDiff); if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp index 2f642ec5c..fc9944bff 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp @@ -103,7 +103,7 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance if (m_auiEncounter[6] == DONE) OpenDoor(m_uiSDoorOrangeGUID); if (m_auiEncounter[7] == DONE) OpenDoor(m_uiSDoorGreenGUID); if (m_auiEncounter[7] == DONE && m_auiEncounter[6] == DONE) OpenDoor(m_uiSDoorCollisionGUID); - if (m_auiEncounter[8] == DONE) OpenDoor(m_uiBloodwingDoorGUID); +// if (m_auiEncounter[8] == DONE) OpenDoor(m_uiBloodwingDoorGUID); } @@ -390,7 +390,7 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance m_auiEncounter[8] = uiData; if (uiData == IN_PROGRESS) CloseDoor(m_uiScientistDoorGUID); else OpenDoor(m_uiScientistDoorGUID); - if (uiData == DONE) OpenDoor(m_uiBloodwingDoorGUID); +// if (uiData == DONE) OpenDoor(m_uiBloodwingDoorGUID); break; case TYPE_BLOOD_COUNCIL: m_auiEncounter[9] = uiData; From 538433014d019af0f835a0d12aba8356b0d0d591 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Fri, 23 Apr 2010 21:20:09 +0400 Subject: [PATCH 259/405] Marrowgar comments --- .../icecrown_citadel/boss_lord_marrowgar.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp index d59bba757..9696d9030 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp @@ -139,10 +139,9 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI break;} case 2: { - if (bsw->hasAura(SPELL_BONE_STORM, m_creature)) -// bsw->timedCast(SPELL_BONE_STORM_STRIKE, diff); + if (!bsw->hasAura(SPELL_BONE_STORM, m_creature)) stage = 3; +// else bsw->timedCast(SPELL_BONE_STORM_STRIKE, diff); // insert to this damage override from bone storm - else stage = 3; break;} case 3: break; From 7e42eae8ed40e9741ec2dbb2475297d0a7e9ce63 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sun, 25 Apr 2010 01:09:12 +0400 Subject: [PATCH 260/405] Teleports spawnmask --- addition/721_icecrown_mangos.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addition/721_icecrown_mangos.sql b/addition/721_icecrown_mangos.sql index 66a005a53..37cd87f53 100644 --- a/addition/721_icecrown_mangos.sql +++ b/addition/721_icecrown_mangos.sql @@ -1,13 +1,14 @@ -- Entrance UPDATE `areatrigger_teleport` SET `required_level` = '80' WHERE `areatrigger_teleport`.`id` =5670; -DELETE FROM `gameobject` WHERE `guid` = 913334; UPDATE `creature` SET `spawntimesecs` = 7200 WHERE `map` = 631 AND (`spawntimesecs` BETWEEN 200 AND 7100 ); +DELETE FROM `gameobject` WHERE `guid` = 913334; INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES (913334, 202244, 631, 3, 1, -209.5, 2211.91, 199.97, 3.07661, 0, 0, 0.999472, 0.0324833, 0, 0, 1); UPDATE `gameobject_template` SET `flags` = 0, `ScriptName` = 'go_icecrown_teleporter' WHERE `entry` IN (202242,202243,202244,202245,202235,202223,202246); +UPDATE `gameobject` SET `phaseMask` = 1 WHERE `id` IN (202242,202243,202244,202245,202235,202223,202246); DELETE FROM `areatrigger_teleport` WHERE `id` = 5718 AND `target_map` = 631; DELETE FROM `creature` WHERE `id` = 99322; From 8a4481187e344f75014d26dd3b14e022c2ee934a Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Tue, 27 Apr 2010 15:36:05 +0400 Subject: [PATCH 261/405] Changes by bugreports: - gossip messages moved to database (for localization); - IsEncounterInProgress implement; - disabled gossip while encounter started (by insider42); - entrance doors functional (by insider42); - Valkiries HP fix; - Valkiries unleashed light/dark added; - Dialogs/sounds correct (by GriffonHeart); --- addition/724_trial_of_crusader_mangos.sql | 25 ++- addition/724_trial_of_crusader_scriptdev2.sql | 13 +- ...rial_of_crusader_spelltable_scriptdev2.sql | 10 +- include/sc_boss_spell_worker.cpp | 21 ++- include/sc_boss_spell_worker.h | 19 +- .../boss_anubarak_trial.cpp | 4 +- .../trial_of_the_crusader/boss_jaraxxus.cpp | 2 +- .../boss_twin_valkyr.cpp | 173 +++++++++++++++++- .../instance_trial_of_the_crusader.cpp | 51 +++++- .../trial_of_the_crusader.cpp | 96 +++++++--- .../trial_of_the_crusader.h | 18 ++ 11 files changed, 376 insertions(+), 56 deletions(-) diff --git a/addition/724_trial_of_crusader_mangos.sql b/addition/724_trial_of_crusader_mangos.sql index c8dcef22f..055c58cc8 100644 --- a/addition/724_trial_of_crusader_mangos.sql +++ b/addition/724_trial_of_crusader_mangos.sql @@ -6,6 +6,25 @@ DELETE FROM `creature` WHERE `map` = 649 AND `id` IN -- announcers UPDATE `creature_template` SET `npcflag`=1, `scriptname`='npc_toc_announcer' WHERE `entry`=34816; DELETE FROM `creature` WHERE `map` = 649 AND `id` = 35766; + +DELETE FROM `npc_text` WHERE `ID` IN (724001, 724002, 724003, 724004, 724005, 724006); +INSERT INTO `npc_text` (`ID`, `Text0_0`) VALUES +(724001, 'Greetings $N! Are you ready to be tested in Crusaders Coliseum?'), +(724002, 'Are you ready for the next stage?'), +(724003, 'Are you ready to fight the champions of the Silver vanguard?'), +(724004, 'Are you ready for the next stage?'), +(724005, 'You are ready to continue battle with Anub-Arak?'), +(724006, 'Today, the arena is closed. Script dungeon designed specifically for server Pandora http://wow.teletoria.ru (c) /dev/rsa 2010'); + +DELETE FROM `locales_npc_text` WHERE `entry` IN (724001, 724002, 724003, 724004, 724005, 724006); +INSERT INTO `locales_npc_text` (`entry`, `Text0_0_loc1`, `Text0_0_loc2`, `Text0_0_loc3`, `Text0_0_loc4`, `Text0_0_loc5`, `Text0_0_loc6`, `Text0_0_loc7`, `Text0_0_loc8`) VALUES +(724001, 'Greetings $N! Are you ready to be tested in Crusaders Coliseum?', NULL, NULL, NULL, NULL, NULL, NULL, 'Приветствую, $N! Вы готовы пройти Испытание Крестоносца?'), +(724002, 'Are you ready for the next stage?', NULL, NULL, NULL, NULL, NULL, NULL, 'Вы готовы к следующему этапу?'), +(724003, 'Are you ready to fight the champions of the Silver vanguard?', NULL, NULL, NULL, NULL, NULL, NULL, 'Вы готовы драться с чемпионами Серебряного авангарда?'), +(724004, 'Are you ready for the next stage?', NULL, NULL, NULL, NULL, NULL, NULL, 'Вы готовы к следующему этапу?'), +(724005, 'You are ready to continue battle with Anub-Arak?', NULL, NULL, NULL, NULL, NULL, NULL, 'Вы готовы продолжить бой с Ануб-Араком?'), +(724006, 'Today, the arena is closed. Script dungeon designed specifically for server Pandora http://wow.teletoria.ru (c) /dev/rsa 2010', NULL, NULL, NULL, NULL, NULL, NULL, 'На сегодня арена закрыта. Скрипт инстанса разработан специально для сервера Пандора http://wow.teletoria.ru (c) /dev/rsa 2010'); + UPDATE `creature_template` SET `scriptname`='boss_lich_king_toc' WHERE `entry`=35877; UPDATE `creature_template` SET `minhealth`= 20000, `maxhealth` = 20000, `faction_A`= 1770, `faction_H` = 1770, `scriptname`='npc_fizzlebang_toc' WHERE `entry`=35458; UPDATE `creature_template` SET `scriptname`='npc_tirion_toc' WHERE `entry`=34996; @@ -77,15 +96,17 @@ UPDATE `creature_template` SET `scriptname`='mob_fel_infernal', `AIName` ='' WHE UPDATE `creature_template` SET `scriptname`='mob_nether_portal', `AIName` ='' WHERE `entry` = 34825; UPDATE `creature_template` SET `scriptname`='mob_mistress_of_pain', `AIName` ='' WHERE `entry` = 34826; --- Froja's +-- Valkiries UPDATE `creature_template` SET `scriptname` = 'boss_fjola', `AIName` ='' WHERE `entry`=34497; UPDATE `creature_template` SET `scriptname` = 'boss_eydis', `AIName` ='' WHERE `entry`=34496; DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (34497, 34496, 34568, 34567); UPDATE `creature_template` SET `npcflag`=1, `scriptname`='mob_light_essence', `AIName` ='' WHERE entry = 34568; UPDATE `creature_template` SET `npcflag`=1, `scriptname`='mob_dark_essence', `AIName` ='' WHERE entry = 34567; +UPDATE `creature_template` SET `faction_A` = 14, `minlevel` = 82, `maxlevel` = 82,`faction_H` = 14, `AIName` ='', `scriptname`='mob_unleashed_dark' WHERE entry = 34628; +UPDATE `creature_template` SET `faction_A` = 14, `minlevel` = 82, `maxlevel` = 82,`faction_H` = 14, `AIName` ='', `scriptname`='mob_unleashed_light' WHERE entry = 34630; -- Anub'arak -UPDATE `creature_template` SET `scriptname`='boss_anubarak_trial', `AIName` ='' WHERE `entry`=34564; +UPDATE `creature_template` SET `scriptname`='boss_anubarak_trial', `unit_flags` = 0, `AIName` ='' WHERE `entry`=34564; DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (34606, 34605, 34607, 34564, 34660); UPDATE `creature_template` SET `modelid_A` = 25144, `modelid_A2` = 0, `modelid_H` = 25144, `modelid_H2` = 0, `faction_A` = 14, `faction_H` = 14, `AIName` = '', `ScriptName` = 'mob_frost_sphere' WHERE `entry` = 34606; diff --git a/addition/724_trial_of_crusader_scriptdev2.sql b/addition/724_trial_of_crusader_scriptdev2.sql index 6619df27f..0e4421ce8 100644 --- a/addition/724_trial_of_crusader_scriptdev2.sql +++ b/addition/724_trial_of_crusader_scriptdev2.sql @@ -8,7 +8,7 @@ INSERT INTO `script_texts` ('34996','16036','-1713500','Добро пожаловать, герои! Вы услышали призыв Серебряного Авангарда и без колебаний откликнулись на него! В этом колизее вам предстоит сразиться с опаснейшими противниками. Те из вас, кто смогут пережить испытания, войдут в ряды Серебряного Авангарда, который направится в Цитадель Ледяной Короны.','6','0','0','Welcome champions, you have heard the call of the argent crusade and you have boldly answered. It is here in the crusaders coliseum that you will face your greatest challenges. Those of you who survive the rigors of the coliseum will join the Argent Crusade on its marsh to ice crown citadel.'), ('34996','16038','-1713501','Из самых глубоких и темных пещер Грозовой Гряды был призван Гормок Пронзающий Бивень! В бой, герои!','6','0','0','Hailing from the deepest, darkest carverns of the storm peaks, Gormok the Impaler! Battle on, heroes!'), ('34990','16069','-1713502','Твои чудовища не чета героям Альянса, Тирион!','6','0','0','Your beast will be no match for my champions Tirion!'), -('34995','16069','-1713702','Твои чудовища не чета героям Орды, Тирион!','6','0','0','Your beast will be no match for my champions Tirion!'), +('34995','16026','-1713702','Я видел и более достойных соперников в багровом круге. Ты напрасно тратишь наше время, паладин.','6','0','0','Your beast will be no match for my champions Tirion!'), ('34796','0','-1713601','Мои рабы! Уничтожьте врага!','3','0','0','My slaves! Destroy the enemy!'), ('34996','16039','-1713503','Приготовьтесь к схватке с близнецами-чудовищами, Кислотной Утробой и Жуткой Чешуей!','6','0','0','Steel yourselves, heroes, for the twin terrors Acidmaw and Dreadscale. Enter the arena!'), ('34799','0','-1713504','После гибели товарища %s приходит в ярость!','3','0','0','After the death of sister %s goes berserk!'), @@ -17,13 +17,14 @@ INSERT INTO `script_texts` ('34797','0','-1713507','%s врезается в стену Колизея и теряет ориентацию!','3','0','0','%S crashes into a wall of the Colosseum and lose focus!'), ('34797','0','-1713508','|3-3(%s) охватывает кипящая ярость, и он растаптывает всех на своем пути!','3','0','0','|3-3(%s) covers boiling rage, and he tramples all in its path!'), ('34996','16041','-1713509','Все чудовища повержены!','6','0','0','All the monsters defeated!'), +('34996','16042','-1713709','Прискорбно. Как яростно они не бились, чудовища Нордскола оказались сильнее. Почтим память павших героев минутой молчания.','6','0','0',''), ('34996','16043','-1713510','Сейчас великий чернокнижник Вилфред Непопамс призовет вашего нового противника. Готовьтесь к бою!','6','0','0','Grand Warlock Wilfred Fizzlebang will summon forth your next challenge. Stand by for his entry!'), ('35458','16268','-1713511','Благодарю, Верховный лорд. А теперь, смельчаки, я приступаю к ритуалу призыва. Когда я закончу, появится грозный демон!','6','0','0','Thank you, Highlord! Now challengers, I will begin the ritual of summoning! When I am done, a fearsome Doomguard will appear!'), ('35458','16269','-1713512','Готовьтесь к забвению!','6','0','0','Prepare for oblivion!'), ('35458','16270','-1713513','АГА! Получилось! Трепещи перед всевластным Вилфредом Непопамсом, мастером призыва! Ты покорен мне, демон!','6','0','0','Ah ha! Behold the absolute power of Wilfred Fizzlebang, master summoner! You are bound to ME, demon!'), ('34780','16143','-1713514','Ничтожный гном! Тебя погубит твоя самоуверенность!','6','0','0','Trifling gnome, your arrogance will be your undoing!'), ('35458','16271','-1713515','Тут я главный!','6','0','0','But I am in charge here-'), -('35458','16271','-1713715','Ну вот, опять я облажался...','6','0','0','Agonized Scream!!!'), +('35458','0','-1713715','Ну вот, опять я облажался...','6','0','0','Agonized Scream!!!'), ('34996','16044','-1713516','Быстрей, герои, расправьтесь с повелителем демонов, прежде чем он откроет портал в свое темное царство!','6','0','0','Quickly, heroes! Destroy the demon lord before it can open a portal to its twisted demonic realm!'), ('34780','16144','-1713517','Перед вами Джараксус, эредарский повелитель Пылающего Легиона!','6','0','0','You face Jaraxxus, eredar lord of the Burning Legion!'), ('34780','0','-1713518','На вас направлено |cFFFF0000Пламя Легиона!|r','3','0','0','You have been sent |cFFFF0000Plamya Legion!|R'), @@ -40,12 +41,12 @@ INSERT INTO `script_texts` ('34996','16046','-1713529','Тише! Успокойтесь! Никакого заговора здесь нет. Чернокнижник заигрался и поплатился за это. Турнир продолжается!','6','0','0','Everyone, calm down! Compose yourselves! There is no conspiracy at play here. The warlock acted on his own volition - outside of influences from the Alliance. The tournament must go on!'), ('34996','16047','-1713530','В следующем бою вы встретитесь с могучими рыцарями Серебряного Авангарда! Лишь победив их, вы заслужите достойную награду.','6','0','0','The next battle will be against the Argent Crusades most powerful knights! Only by defeating them will you be deemed worthy...'), ('34995','16023','-1713531','Орда требует справедливости! Мы вызываем Альянс на бой! Позволь нам встать на место твоих рыцарей, паладин. Мы покажем этим псам, как оскорблять Орду!','6','0','0','The Horde demands justice! We challenge the Alliance. Allow us to battle in place of your knights, paladin. We will show these dogs what it means to insult the Horde!'), -('34995','16023','-1713731','Альянс требует справедливости! Мы вызываем Орду на бой! Позволь нам встать на место твоих рыцарей, паладин. Мы покажем этим псам, как оскорблять Альянс!','6','0','0','Our honor has been besmirched! They make wild claims and false accusations against us. I demand justice! Allow my champions to fight in place of your knights, Tirion. We challenge the Horde!'), +('34995','16066','-1713731','Они хотели запятнать честь Альянса, они пытались нас оклеветать! Я требую справедливости! Тириорн, позволь моим чемпионам сражаться вместо твоих рыцарей. Мы бросаем вызов Орде!','6','0','0','Our honor has been besmirched! They make wild claims and false accusations against us. I demand justice! Allow my champions to fight in place of your knights, Tirion. We challenge the Horde!'), ('34996','16048','-1713532','Хорошо. Да будет так. Сражайтесь с честью!','','0','0','Very well, I will allow it. Fight with honor!'), ('34995','16022','-1713533','Не щадите никого, герои Орды! ЛОК-ТАР ОГАР!','6','0','0','Show them no mercy, Horde champions! LOK-TAR OGAR!'), -('34995','16022','-1713733','Не щадите никого, герои Альянса! За Лордаэрон!','6','0','0','Fight for the glory of the Alliance, heroes! Honor your king and your people!'), +('34995','16065','-1713733','Сражайтесь во славу Альянса, герои! Во имя вашего короля!','6','0','0','Fight for the glory of the Alliance, heroes! Honor your king and your people!'), ('34990','16067','-1713534','СЛАВА АЛЬЯНСУ!','6','0','0','GLORY OF THE ALLIANCE!'), -('34990','16067','-1713734','ЛОК-ТАР ОГАР!','6','0','0','LOK-TAR OGAR!'), +('34990','16024','-1713734','Это было лишь пробой того, что ждёт нас в будущем. За Орду!','6','0','0','LOK-TAR OGAR!'), ('34996','16049','-1713535','Пустая и горькая победа. После сегодняшних потерь мы стали слабее как целое. Кто еще, кроме Короля-лича, выиграет от подобной глупости? Пали великие воины. И ради чего? Истинная опасность еще впереди - нас ждет битва с Королем-личом.','6','0','0','A shallow and tragic victory. We are weaker as a whole from the losses suffered today. Who but the Lich King could benefit from such foolishness? Great warriors have lost their lives. And for what? The true threat looms ahead - the Lich King awaits us all in death.'), ('34996','16050','-1713536','Лишь сплотившись, вы сможете пройти последнее испытание. Из глубин Ледяной Короны навстречу вам подымаются две могучие воительницы Плети: жуткие валькирии, крылатые вестницы Короля-лича!','6','0','0','Only by working together will you overcome the final challenge. From the depths of Icecrown come two of the Scourges most powerful lieutenants: fearsome valkyr, winged harbingers of the Lich King!'), ('34996','16037','-1713537','Пусть состязания начнутся!','6','0','0','Let the games begin!'), @@ -61,7 +62,7 @@ INSERT INTO `script_texts` ('34496','16278','-1713546','Да поглотит вас Тьма!','6','0','0','Let the dark consume you!'), ('34496','16275','-1713547','Плеть не остановить...','6','0','0','The Scourge cannot be stopped...'), ('34990','16068','-1713548','Против Альянса не выстоять даже самым сильным прислужникам Короля-лича! Все славьте наших героев!','6','0','0','Against the Alliance can not stand even the most powerful henchmen of the Lich King! All glorify our heroes!'), -('34995','16068','-1713748','Против Орды не выстоять даже самым сильным прислужникам Короля-лича! Все славьте наших героев!','6','0','0','Against the Horde does not withstand even the most powerful henchmen of the Lich King! All glorify our heroes!'), +('34995','16025','-1713748','Ты все еще сомневаешься в могуществе Орды, паладин? Мы примем любой вызов!','6','0','0','Against the Horde does not withstand even the most powerful henchmen of the Lich King! All glorify our heroes!'), ('34996','16051','-1713549','Король-лич понес тяжелую потерю! Вы проявили себя как бесстрашные герои Серебряного Авангарда! Мы вместе нанесем удар по Цитадели Ледяной Короны и разнесем в клочья остатки Плети! Нет такого испытания, которое мы бы не могли пройти сообща!','6','0','0','A mighty blow has been dealt to the Lich King! You have proven yourselves able bodied champions of the Argent Crusade. Together we will strike at Icecrown Citadel and destroy what remains of the Scourge! There is no challenge that we cannot face united!'), ('16980','16321','-1713550','Будет тебе такое испытание, Фордринг.','6','0','0','You will have your challenge, Fordring.'), ('34996','16052','-1713551','Артас! Нас гораздо больше! Сложи Ледяную Скорбь, и я подарю тебе заслуженную смерть.','6','0','0','Arthas! You are hopelessly outnumbered! Lay down Frostmourne and I will grant you a just death.'), diff --git a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql index fb4a0326f..1b48f26ba 100644 --- a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql +++ b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql @@ -13,6 +13,9 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ (34496, 66058, 67182, 67183, 67184, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), (34496, 66069, 67309, 67310, 67311, 10000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), (34496, 67282, 0, 0, 0, 10000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL); +-- summons +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMax_N10`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType` ) VALUES +(34496, 34628, 40000, 40000, 1, 1, 2, 2, 10, 100, 0, 11); -- Fjola Lightbane INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES @@ -24,6 +27,9 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ (34497, 66046, 67206, 67207, 67208, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), (34497, 66075, 67312, 67313, 67314, 10000, 10000, 10000, 10000, 20000, 20000, 20000, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), (34497, 67297, 67297, 67298, 67298, 10000, 10000, 10000, 10000, 15000, 15000, 15000, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL); +-- summons +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMax_N10`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType` ) VALUES +(34497, 34630, 20000, 20000, 1, 1, 2, 2, 10, 100, 0, 11); -- AnubArak INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES @@ -85,7 +91,7 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ -- Gormok INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES (34796, 34800, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 20.0, 80.0, 0, 0, 0, 0, 9, 0, 0, 0, NULL), -(34796, 66331, 67477, 67478, 67479, 20000, 0, 0, 0, 40000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34796, 66331, 67477, 67478, 67479, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), (34796, 66636, 0, 0, 0, 15000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 1, 0, NULL), (34796, 67648, 0, 0, 0, 15000, 0, 0, 0, 40000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL); @@ -96,7 +102,7 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ (34797, 66734, 0, 0, 0, 4000, 4000, 3000, 3000, 4000, 4000, 3000, 3000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL), (34797, 66770, 67654, 67655, 67656, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), (34797, 66758, 0, 0, 0, 15000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), -(34797, 68667, 0, 0, 0, 8000, 0, 0, 0, 8000, 0, 0, 0, 0, 0, 0, 0, 200.0, 0, 0, 0, 0, 0, 12, 0, 0, 0, NULL), +(34797, 68667, 0, 0, 0, 8000, 0, 0, 0, 8000, 0, 0, 0, 0, 0, 0, 0, 200.0, 0, 0, 0, 0, 0, 12, 0, 1, 0, NULL), (34797, 66759, 0, 0, 0, 300000, 0, 0, 0, 300000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), (34797, 67345, 67663, 67664, 67665, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL); diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index 4d4f633b4..f6f227ccb 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -1,10 +1,12 @@ /* Copyright (C) 2009 - 2010 by /dev/rsa for ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ -#include "precompiled.h" #include "sc_boss_spell_worker.h" +#include "precompiled.h" #ifdef DEF_BOSS_SPELL_WORKER_H +//extern DatabaseType SD2Database; + BossSpellWorker::BossSpellWorker(ScriptedAI* bossAI) { boss = bossAI->m_creature; @@ -338,6 +340,7 @@ CanCastResult BossSpellWorker::_BSWDoCast(uint8 m_uiSpellIdx, Unit* pTarget) if (!pTarget->isAlive()) return CAST_FAIL_OTHER; SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; debug_log("BSW: Casting bugged spell number %u type %u",pSpell->m_uiSpellEntry[currentDifficulty], pSpell->m_CastTarget); + pTarget->InterruptNonMeleeSpells(false); pTarget->CastSpell(pTarget, pSpell->m_uiSpellEntry[currentDifficulty], false); return CAST_OK; }; @@ -375,7 +378,15 @@ Unit* BossSpellWorker::_doSummon(uint8 m_uiSpellIdx, TempSummonType summontype, } else return boss->SummonCreature(pSpell->m_uiSpellEntry[currentDifficulty], pSpell->LocData.x, pSpell->LocData.y, pSpell->LocData.z, 0, summontype, delay); }; -bool BossSpellWorker::_doRemove(uint8 m_uiSpellIdx, Unit* pTarget) +Unit* BossSpellWorker::_doSummonAtPosition(uint8 m_uiSpellIdx, TempSummonType summontype, uint32 delay, float fPosX, float fPosY, float fPosZ) +{ + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + + debug_log("BSW: Summoning creature number %u type %u despawn delay %u at position %f %f %f",pSpell->m_uiSpellEntry[currentDifficulty], pSpell->m_CastTarget, delay, fPosX, fPosY, fPosZ); + return boss->SummonCreature(pSpell->m_uiSpellEntry[currentDifficulty], fPosX, fPosY, fPosZ, 0, summontype, delay); +}; + +bool BossSpellWorker::_doRemove(uint8 m_uiSpellIdx, Unit* pTarget, SpellEffectIndex index) { SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; @@ -396,13 +407,13 @@ bool BossSpellWorker::_doRemove(uint8 m_uiSpellIdx, Unit* pTarget) case CAST_ON_SUMMONS: case CAST_ON_VICTIM: - case CAST_ON_RANDOM: case CAST_ON_BOTTOMAGGRO: case CAST_ON_TARGET: case APPLY_AURA_TARGET: if (!pTarget) return false; break; + case CAST_ON_RANDOM: case CAST_ON_ALLPLAYERS: { Map::PlayerList const& pPlayers = pMap->GetPlayers(); @@ -421,8 +432,8 @@ bool BossSpellWorker::_doRemove(uint8 m_uiSpellIdx, Unit* pTarget) if (pTarget) { if (pTarget->isAlive()) { if ( pTarget->HasAura(pSpell->m_uiSpellEntry[currentDifficulty]) && - pTarget->GetAura(pSpell->m_uiSpellEntry[currentDifficulty], EFFECT_INDEX_0)->GetStackAmount() > 1) { - if (pTarget->GetAura(pSpell->m_uiSpellEntry[currentDifficulty], EFFECT_INDEX_0)->modStackAmount(-1)) + pTarget->GetAura(pSpell->m_uiSpellEntry[currentDifficulty], index)->GetStackAmount() > 1) { + if (pTarget->GetAura(pSpell->m_uiSpellEntry[currentDifficulty], index)->modStackAmount(-1)) return true; else return false; } diff --git a/include/sc_boss_spell_worker.h b/include/sc_boss_spell_worker.h index 210969e1a..28efae309 100644 --- a/include/sc_boss_spell_worker.h +++ b/include/sc_boss_spell_worker.h @@ -2,6 +2,9 @@ * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ +#ifndef DEF_BOSS_SPELL_WORKER_H +#define DEF_BOSS_SPELL_WORKER_H + #include "Player.h" #include "SpellAuras.h" #include "Unit.h" @@ -9,9 +12,6 @@ #include "Database/DatabaseEnv.h" #include "../ScriptMgr.h" -#ifndef DEF_BOSS_SPELL_WORKER_H -#define DEF_BOSS_SPELL_WORKER_H - enum { DIFFICULTY_LEVELS = 4, @@ -138,9 +138,9 @@ class MANGOS_DLL_DECL BossSpellWorker else return CAST_FAIL_OTHER; }; - bool doRemove(uint32 SpellID, Unit* pTarget = NULL) + bool doRemove(uint32 SpellID, Unit* pTarget = NULL, SpellEffectIndex index = EFFECT_INDEX_0) { - return _doRemove(FindSpellIDX(SpellID),pTarget); + return _doRemove(FindSpellIDX(SpellID),pTarget, index); }; bool hasAura(uint32 SpellID, Unit* pTarget = NULL) @@ -154,6 +154,11 @@ class MANGOS_DLL_DECL BossSpellWorker return _doSummon(FindSpellIDX(SpellID), type, delay); }; + Unit* doSummon(uint32 SpellID, float fPosX, float fPosY, float fPosZ, TempSummonType type = TEMPSUMMON_CORPSE_TIMED_DESPAWN, uint32 delay = 60000) + { + return _doSummonAtPosition(FindSpellIDX(SpellID), type, delay, fPosX, fPosY, fPosZ); + }; + CanCastResult BSWSpellSelector(uint32 SpellID, Unit* pTarget = NULL) { return _BSWSpellSelector(FindSpellIDX(SpellID), pTarget); @@ -190,6 +195,8 @@ class MANGOS_DLL_DECL BossSpellWorker Unit* _doSummon(uint8 m_uiSpellIdx, TempSummonType type = TEMPSUMMON_CORPSE_TIMED_DESPAWN, uint32 delay = 60000); + Unit* _doSummonAtPosition(uint8 m_uiSpellIdx, TempSummonType type, uint32 delay, float fPosX, float fPosY, float fPosZ); + CanCastResult _BSWDoCast(uint8 m_uiSpellIdx, Unit* pTarget); CanCastResult _BSWSpellSelector(uint8 m_uiSpellIdx, Unit* pTarget = NULL); @@ -206,7 +213,7 @@ class MANGOS_DLL_DECL BossSpellWorker Unit* _SelectUnit(SelectAggroTarget target, uint32 uiPosition); - bool _doRemove(uint8 m_uiSpellIdx, Unit* pTarget = NULL); + bool _doRemove(uint8 m_uiSpellIdx, Unit* pTarget = NULL, SpellEffectIndex index = EFFECT_INDEX_0); bool _hasAura(uint8 m_uiSpellIdx, Unit* pTarget); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp index 57ae61e8a..2be507bbb 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp @@ -83,6 +83,8 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI intro = true; m_creature->SetRespawnDelay(DAY); pTarget = NULL; + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } @@ -96,8 +98,6 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI if (!intro) return; DoScriptText(-1713554,m_creature); intro = false; - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); m_creature->SetInCombatWithZone(); } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp index d1cbab603..2d81e654f 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp @@ -86,7 +86,7 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI if(!m_pInstance) return; Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); m_pInstance->SetData(TYPE_JARAXXUS, NOT_STARTED); - SetEquipmentSlots(false, EQUIP_MAIN, EQUIP_OFFHAND, EQUIP_RANGED); +// SetEquipmentSlots(false, EQUIP_MAIN, EQUIP_OFFHAND, EQUIP_RANGED); m_portalsCount = 1; if (Difficulty == RAID_DIFFICULTY_10MAN_HEROIC || Difficulty == RAID_DIFFICULTY_25MAN_HEROIC) { diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp index 2770883a8..40c3c64bc 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp @@ -42,6 +42,9 @@ enum Summons { NPC_DARK_ESSENCE = 34567, NPC_LIGHT_ESSENCE = 34568, + + NPC_UNLEASHED_DARK = 34628, + NPC_UNLEASHED_LIGHT = 34630, }; enum BossSpells @@ -63,6 +66,9 @@ enum BossSpells SPELL_DARK_ESSENCE = 65684, SPELL_BERSERK = 64238, SPELL_NONE = 0, +// + SPELL_UNLEASHED_DARK = 65808, + SPELL_UNLEASHED_LIGHT = 65795, }; /*###### @@ -95,6 +101,7 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI { if (!m_pInstance) return; m_pInstance->SetData(TYPE_VALKIRIES, FAIL); + m_pInstance->SetData(DATA_HEALTH_FJOLA, m_creature->GetMaxHealth()); m_creature->ForcedDespawn(); } @@ -112,7 +119,7 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI void KilledUnit(Unit* pVictim) { if (!m_pInstance) return; - DoScriptText(-1713544,pVictim); + DoScriptText(-1713544,m_creature,pVictim); } void Aggro(Unit* pWho) @@ -203,7 +210,11 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI bsw->timedCast(SPELL_LIGHT_SURGE, uiDiff); - bsw->timedCast(SPELL_LIGHT_TOUCH, uiDiff); + if (bsw->timedQuery(SPELL_LIGHT_TOUCH, uiDiff)) + { + bsw->doCast(SPELL_LIGHT_TOUCH); + bsw->doCast(NPC_UNLEASHED_LIGHT); + } bsw->timedCast(SPELL_BERSERK, uiDiff); @@ -247,6 +258,7 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI { if (!m_pInstance) return; m_pInstance->SetData(TYPE_VALKIRIES, FAIL); + m_pInstance->SetData(DATA_HEALTH_EYDIS, m_creature->GetMaxHealth()); m_creature->ForcedDespawn(); } @@ -263,7 +275,7 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI void KilledUnit(Unit* pVictim) { - DoScriptText(-1713543,pVictim); + DoScriptText(-1713543,m_creature,pVictim); } void Aggro(Unit* pWho) @@ -350,7 +362,11 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI bsw->timedCast(SPELL_DARK_SURGE, uiDiff); - bsw->timedCast(SPELL_DARK_TOUCH, uiDiff); + if (bsw->timedQuery(SPELL_DARK_TOUCH, uiDiff)) + { + bsw->doCast(SPELL_DARK_TOUCH); + bsw->doCast(NPC_UNLEASHED_DARK); + } bsw->timedCast(SPELL_BERSERK, uiDiff); @@ -464,6 +480,145 @@ bool GossipHello_mob_dark_essence(Player *player, Creature* pCreature) return true; } +struct MANGOS_DLL_DECL mob_unleashed_darkAI : public ScriptedAI +{ + mob_unleashed_darkAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + uint32 m_uiRangeCheck_Timer; + Creature* pboss1; + Creature* pboss2; + + void Reset() + { + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + SetCombatMovement(false); + m_creature->GetMotionMaster()->MoveRandom(); + m_uiRangeCheck_Timer = 1000; + pboss1 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_DARKBANE)); + pboss2 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_LIGHTBANE)); + } + + void AttackStart(Unit *pWho) + { + return; + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_pInstance || m_pInstance->GetData(TYPE_VALKIRIES) != IN_PROGRESS) + m_creature->ForcedDespawn(); + + if (m_uiRangeCheck_Timer < uiDiff) + { + Map* pMap = m_creature->GetMap(); + Map::PlayerList const &lPlayers = pMap->GetPlayers(); + for(Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr) + { + Unit* pPlayer = itr->getSource(); + if (!pPlayer) continue; + if (pPlayer->isAlive() && pPlayer->IsWithinDistInMap(m_creature, 2.0f)) + { + m_creature->CastSpell(m_creature, SPELL_UNLEASHED_DARK, true); + m_creature->ForcedDespawn(); + } + + } + if (pboss1 && pboss1->isAlive() && pboss1->IsWithinDistInMap(m_creature, 2.0f)) + { + m_creature->CastSpell(m_creature, SPELL_UNLEASHED_DARK, true); + m_creature->ForcedDespawn(); + } + if (pboss2 && pboss2->isAlive() && pboss2->IsWithinDistInMap(m_creature, 2.0f)) + { + m_creature->CastSpell(m_creature, SPELL_UNLEASHED_DARK, true); + m_creature->ForcedDespawn(); + } + m_uiRangeCheck_Timer = 1000; + } + else m_uiRangeCheck_Timer -= uiDiff; + } + +}; + +CreatureAI* GetAI_mob_unleashed_dark(Creature *pCreature) +{ + return new mob_unleashed_darkAI(pCreature); +} + +struct MANGOS_DLL_DECL mob_unleashed_lightAI : public ScriptedAI +{ + mob_unleashed_lightAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + uint32 m_uiRangeCheck_Timer; + Creature* pboss1; + Creature* pboss2; + + void Reset() + { + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + SetCombatMovement(false); + m_creature->GetMotionMaster()->MoveRandom(); + m_uiRangeCheck_Timer = 1000; + pboss1 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_DARKBANE)); + pboss2 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_LIGHTBANE)); + } + + void AttackStart(Unit *pWho) + { + return; + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_pInstance || m_pInstance->GetData(TYPE_VALKIRIES) != IN_PROGRESS) + m_creature->ForcedDespawn(); + + if (m_uiRangeCheck_Timer < uiDiff) + { + Map* pMap = m_creature->GetMap(); + Map::PlayerList const &lPlayers = pMap->GetPlayers(); + for(Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr) + { + Unit* pPlayer = itr->getSource(); + if (!pPlayer) continue; + if (pPlayer->isAlive() && pPlayer->IsWithinDistInMap(m_creature, 2.0f)) + { + m_creature->CastSpell(m_creature, SPELL_UNLEASHED_LIGHT, true); + m_creature->ForcedDespawn(); + } + } + if (pboss1 && pboss1->isAlive() && pboss1->IsWithinDistInMap(m_creature, 2.0f)) + { + m_creature->CastSpell(m_creature, SPELL_UNLEASHED_LIGHT, true); + m_creature->ForcedDespawn(); + } + if (pboss2 && pboss2->isAlive() && pboss2->IsWithinDistInMap(m_creature, 2.0f)) + { + m_creature->CastSpell(m_creature, SPELL_UNLEASHED_LIGHT, true); + m_creature->ForcedDespawn(); + } + m_uiRangeCheck_Timer = 1000; + } + else m_uiRangeCheck_Timer -= uiDiff; + } + +}; + +CreatureAI* GetAI_mob_unleashed_light(Creature *pCreature) +{ + return new mob_unleashed_lightAI(pCreature); +} + void AddSC_twin_valkyr() { Script* newscript; @@ -478,6 +633,16 @@ void AddSC_twin_valkyr() newscript->GetAI = &GetAI_boss_eydis; newscript->RegisterSelf(); + newscript = new Script; + newscript->Name = "mob_unleashed_light"; + newscript->GetAI = &GetAI_mob_unleashed_light; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_unleashed_dark"; + newscript->GetAI = &GetAI_mob_unleashed_dark; + newscript->RegisterSelf(); + newscript = new Script; newscript->Name = "mob_light_essence"; newscript->GetAI = &GetAI_mob_light_essence; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index 18f1fed91..0c1f037d1 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -108,6 +108,10 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance uint64 m_uiMainGateDoorGUID; + uint64 m_uiWestPortcullisGUID; + uint64 m_uiNorthPortcullisGUID; + uint64 m_uiSouthPortcullisGUID; + void Initialize() { @@ -136,6 +140,14 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance needsave = false; } + bool IsEncounterInProgress() const + { + for(uint8 i = 1; i < MAX_ENCOUNTERS-2 ; ++i) + if (m_auiEncounter[i] == IN_PROGRESS) return true; + + return false; + } + void OnPlayerEnter(Player *m_player) { if (Difficulty == RAID_DIFFICULTY_10MAN_HEROIC || Difficulty == RAID_DIFFICULTY_25MAN_HEROIC) @@ -160,6 +172,20 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance return true; } + void OpenDoor(uint64 guid) + { + if(!guid) return; + GameObject* pGo = instance->GetGameObject(guid); + if(pGo) pGo->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE); + } + + void CloseDoor(uint64 guid) + { + if(!guid) return; + GameObject* pGo = instance->GetGameObject(guid); + if(pGo) pGo->SetGoState(GO_STATE_READY); + } + void OnCreatureCreate(Creature* pCreature) { switch(pCreature->GetEntry()) @@ -231,9 +257,11 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance case GO_ARGENT_COLISEUM_FLOOR: m_uiFloorGUID = pGo->GetGUID(); break; - case GO_MAIN_GATE_DOOR: - m_uiMainGateDoorGUID = pGo->GetGUID(); - break; + case GO_MAIN_GATE_DOOR: m_uiMainGateDoorGUID = pGo->GetGUID(); break; + + case GO_SOUTH_PORTCULLIS: m_uiSouthPortcullisGUID = pGo->GetGUID(); break; + case GO_WEST_PORTCULLIS: m_uiWestPortcullisGUID = pGo->GetGUID(); break; + case GO_NORTH_PORTCULLIS: m_uiNorthPortcullisGUID = pGo->GetGUID(); break; case GO_TRIBUTE_CHEST_10H_25: m_uiTC10h25GUID = pGo->GetGUID(); break; case GO_TRIBUTE_CHEST_10H_45: m_uiTC10h45GUID = pGo->GetGUID(); break; @@ -309,6 +337,17 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance case DATA_CASTING_EYDIS: m_uiEydisCasting = uiData; uiData = NOT_STARTED; break; } + if (IsEncounterInProgress()) { + CloseDoor(GetData64(GO_WEST_PORTCULLIS)); + CloseDoor(GetData64(GO_NORTH_PORTCULLIS)); +// CloseDoor(GetData64(GO_SOUTH_PORTCULLIS)); + } + else { + OpenDoor(GetData64(GO_WEST_PORTCULLIS)); + OpenDoor(GetData64(GO_NORTH_PORTCULLIS)); +// OpenDoor(GetData64(GO_SOUTH_PORTCULLIS)); + }; + if (uiData == FAIL && uiType != TYPE_STAGE && uiType != TYPE_EVENT && uiType != TYPE_COUNTER @@ -388,6 +427,10 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance case GO_ARGENT_COLISEUM_FLOOR: return m_uiFloorGUID; case GO_MAIN_GATE_DOOR: return m_uiMainGateDoorGUID; + case GO_SOUTH_PORTCULLIS: return m_uiSouthPortcullisGUID; + case GO_WEST_PORTCULLIS: return m_uiWestPortcullisGUID; + case GO_NORTH_PORTCULLIS: return m_uiNorthPortcullisGUID; + } return 0; } @@ -421,6 +464,7 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance case 305: case 310: case 400: + case 666: case 1010: case 1180: case 2000: @@ -439,6 +483,7 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance case 4040: case 4050: case 5000: + case 5005: case 5020: case 6000: case 6005: diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index 1fa05adb0..f8e801146 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -26,7 +26,7 @@ EndScriptData */ struct _Messages { - char const* name; + AnnounserMessages msgnum; uint32 id; bool state; uint32 encounter; @@ -34,12 +34,12 @@ struct _Messages static _Messages _GossipMessage[]= { -{"Вы готовы пройти Испытание Крестоносца?",GOSSIP_ACTION_INFO_DEF+1,false,TYPE_BEASTS}, // -{"Вы готовы к следующему этапу?",GOSSIP_ACTION_INFO_DEF+2,false,TYPE_JARAXXUS}, // -{"Вы готовы драться с чемпионами Серебряного авангарда?",GOSSIP_ACTION_INFO_DEF+3,false,TYPE_CRUSADERS}, // -{"Вы готовы к следующему этапу?",GOSSIP_ACTION_INFO_DEF+4,false,TYPE_VALKIRIES}, // -{"Вы готовы продолжить бой с Ануб-Араком?",GOSSIP_ACTION_INFO_DEF+5,false,TYPE_ANUBARAK}, // -{"Не надо сюда тыкать. На сегодня арена закрыта.",GOSSIP_ACTION_INFO_DEF+6,true,TYPE_ANUBARAK}, // +{MSG_BEASTS,GOSSIP_ACTION_INFO_DEF+1,false,TYPE_BEASTS}, // +{MSG_JARAXXUS,GOSSIP_ACTION_INFO_DEF+2,false,TYPE_JARAXXUS}, // +{MSG_CRUSADERS,GOSSIP_ACTION_INFO_DEF+3,false,TYPE_CRUSADERS}, // +{MSG_VALKIRIES,GOSSIP_ACTION_INFO_DEF+4,false,TYPE_VALKIRIES}, // +{MSG_LICH_KING,GOSSIP_ACTION_INFO_DEF+5,false,TYPE_ANUBARAK}, // +{MSG_ANUBARAK,GOSSIP_ACTION_INFO_DEF+6,true,TYPE_ANUBARAK}, // }; enum { @@ -94,7 +94,7 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI }; if (pInstance->GetData(TYPE_NORTHREND_BEASTS) == FAIL) { pInstance->SetData(TYPE_STAGE,0); - pInstance->SetData(TYPE_EVENT,0); + pInstance->SetData(TYPE_EVENT,666); pInstance->SetData(TYPE_BEASTS,NOT_STARTED); }; break; @@ -108,7 +108,7 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI }; if (pInstance->GetData(TYPE_NORTHREND_BEASTS) == FAIL) { pInstance->SetData(TYPE_STAGE,0); - pInstance->SetData(TYPE_EVENT,0); + pInstance->SetData(TYPE_EVENT,666); pInstance->SetData(TYPE_BEASTS,NOT_STARTED); }; break; @@ -122,9 +122,8 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI } if (pInstance->GetData(TYPE_NORTHREND_BEASTS) == FAIL) { pInstance->SetData(TYPE_STAGE,0); - pInstance->SetData(TYPE_EVENT,0); + pInstance->SetData(TYPE_EVENT,666); pInstance->SetData(TYPE_BEASTS,NOT_STARTED); - pInstance->SetData(TYPE_BEASTS,IN_PROGRESS); }; break; }; @@ -153,6 +152,10 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI pInstance->SetData(TYPE_STAGE,0); pInstance->SetData(TYPE_EVENT,4020); } + if (pInstance->GetData(TYPE_VALKIRIES) == FAIL) { + pInstance->SetData(TYPE_STAGE,0); + pInstance->SetData(TYPE_EVENT,0); + } break; }; case 8: { @@ -163,6 +166,10 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI pInstance->SetData(TYPE_STAGE,10); pInstance->SetData(TYPE_EVENT,6000); } + if (pInstance->GetData(TYPE_ANUBARAK) == FAIL) { + pInstance->SetData(TYPE_STAGE,0); + pInstance->SetData(TYPE_EVENT,0); + } break; }; case 10: { @@ -185,22 +192,48 @@ bool GossipHello_npc_toc_announcer(Player* pPlayer, Creature* pCreature) ScriptedInstance* pInstance; pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + char const* _message; + uint8 i; if (!pInstance) return false; - if(!pPlayer->getAttackers().empty()) return true; + if( !pPlayer->getAttackers().empty() || + pInstance->IsEncounterInProgress() || + pInstance->GetData(TYPE_EVENT)) + return true; - for(uint8 i = 0; i < NUM_MESSAGES; i++) { + switch (LocaleConstant currentlocale = pPlayer->GetSession()->GetSessionDbcLocale()) + { + case LOCALE_enUS: + case LOCALE_koKR: + case LOCALE_frFR: + case LOCALE_deDE: + case LOCALE_zhCN: + case LOCALE_zhTW: + case LOCALE_esES: + case LOCALE_esMX: + _message = "We are ready!"; + break; + case LOCALE_ruRU: + _message = "Всегда готовы!"; + break; + default: + _message = "We are ready!"; + break; + }; + + for(i = 0; i < NUM_MESSAGES; i++) { if (!_GossipMessage[i].state && (pInstance->GetData(_GossipMessage[i].encounter) != DONE )) { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, _GossipMessage[i].name, GOSSIP_SENDER_MAIN,_GossipMessage[i].id); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, _message, GOSSIP_SENDER_MAIN,_GossipMessage[i].id); break; } if (_GossipMessage[i].state && pInstance->GetData(_GossipMessage[i].encounter) == DONE) { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, _GossipMessage[i].name, GOSSIP_SENDER_MAIN,_GossipMessage[i].id); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, _message, GOSSIP_SENDER_MAIN,_GossipMessage[i].id); break; } }; - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + + pPlayer->SEND_GOSSIP_MENU(_GossipMessage[i].msgnum, pCreature->GetGUID()); return true; } @@ -428,7 +461,7 @@ struct MANGOS_DLL_DECL boss_lich_king_tocAI : public ScriptedAI Event=false; m_creature->ForcedDespawn(); pPortal->ForcedDespawn(); - pInstance->SetData(TYPE_EVENT,5090); + pInstance->SetData(TYPE_EVENT,0); UpdateTimer = 20000; break; } @@ -456,7 +489,7 @@ struct MANGOS_DLL_DECL boss_lich_king_tocAI : public ScriptedAI CreatureAI* GetAI_boss_lich_king_toc(Creature* pCreature) { return new boss_lich_king_tocAI(pCreature); -} +}; struct MANGOS_DLL_DECL npc_fizzlebang_tocAI : public ScriptedAI { @@ -592,13 +625,14 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI case 110: m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_TALK); DoScriptText(-1713500, m_creature); - UpdateTimer = 10000; + UpdateTimer = 12000; pInstance->SetData(TYPE_EVENT,120); +// pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_WEST_PORTCULLIS)); break; case 140: m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_TALK); DoScriptText(-1713501, m_creature); - UpdateTimer = 8000; + UpdateTimer = 10000; pInstance->SetData(TYPE_EVENT,150); pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_MAIN_GATE_DOOR)); break; @@ -676,7 +710,15 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI case 400: DoScriptText(-1713509, m_creature); UpdateTimer = 5000; - pInstance->SetData(TYPE_EVENT,410); + pInstance->SetData(TYPE_EVENT,0); +// pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_WEST_PORTCULLIS)); + break; + + case 666: + DoScriptText(-1713709, m_creature); + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT,0); +// pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_WEST_PORTCULLIS)); break; case 1010: @@ -689,7 +731,7 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI case 1180: DoScriptText(-1713516, m_creature); UpdateTimer = 3000; - pInstance->SetData(TYPE_EVENT,1190); + pInstance->SetData(TYPE_EVENT,0); break; case 2000: @@ -700,7 +742,7 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI case 2030: DoScriptText(-1713529, m_creature); UpdateTimer = 5000; - pInstance->SetData(TYPE_EVENT,2040); + pInstance->SetData(TYPE_EVENT,0); break; case 3000: DoScriptText(-1713530, m_creature); @@ -881,7 +923,7 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI case 3100: DoScriptText(-1713535, m_creature); UpdateTimer = 5000; - pInstance->SetData(TYPE_EVENT,3110); + pInstance->SetData(TYPE_EVENT,0); break; case 4000: @@ -923,7 +965,11 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI case 5000: DoScriptText(-1713549, m_creature); - UpdateTimer = 2000; + UpdateTimer = 8000; + pInstance->SetData(TYPE_EVENT,5005); + break; + case 5005: + UpdateTimer = 8000; pInstance->SetData(TYPE_EVENT,5010); pInstance->SetData(TYPE_STAGE,8); m_creature->SummonCreature(NPC_LICH_KING_1, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 5, TEMPSUMMON_MANUAL_DESPAWN, 0); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index 78ec485c9..e00e1d21a 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -87,6 +87,10 @@ enum GO_ARGENT_COLISEUM_FLOOR = 195527, //20943 GO_MAIN_GATE_DOOR = 195647, + GO_WEST_PORTCULLIS = 195589, + GO_SOUTH_PORTCULLIS = 195590, + GO_NORTH_PORTCULLIS = 195591, + TYPE_DIFFICULTY = 101, TYPE_EVENT_TIMER = 102, TYPE_EVENT_NPC = 103, @@ -98,6 +102,10 @@ enum DATA_CASTING_EYDIS = 203, DATA_CASTING_FJOLA = 204, + SPELL_WILFRED_PORTAL = 68424, + SPELL_JARAXXUS_CHAINS = 67924, + NPC_WILFRED_POTAL = 35651, + DESPAWN_TIME = 300000, }; @@ -153,4 +161,14 @@ enum NorthrendBeasts ICEHOWL_DONE = 3001, }; +enum AnnounserMessages +{ + MSG_BEASTS = 724001, + MSG_JARAXXUS = 724002, + MSG_CRUSADERS = 724003, + MSG_VALKIRIES = 724004, + MSG_LICH_KING = 724005, + MSG_ANUBARAK = 724006, +}; + #endif From 96b4c485053fae73ff96cfd26fe16913e09e726f Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Tue, 27 Apr 2010 18:30:56 +0400 Subject: [PATCH 262/405] Inpenetrable door close --- addition/723_icecrown_down_mangos.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/addition/723_icecrown_down_mangos.sql b/addition/723_icecrown_down_mangos.sql index cd9806487..d13fba607 100644 --- a/addition/723_icecrown_down_mangos.sql +++ b/addition/723_icecrown_down_mangos.sql @@ -13,3 +13,4 @@ UPDATE `gameobject_template` SET ScriptName = 'go_frostmourne_altar' WHERE `entr UPDATE `gameobject_template` SET ScriptName = 'go_frostmourne' WHERE `entry` = 202302; DELETE FROM `creature` WHERE `map` = 668 AND `id` IN (38177,38176,38173,38172,38567,38175); UPDATE `creature_template` SET `ScriptName`='generic_creature' WHERE `entry` IN (38177,38176,38173,38172,38567,38175); +UPDATE `gameobject_template` SET `faction` = '114' WHERE `entry` IN (197341, 201976); From 9048a5094f55840c8e9df5c028b974b491e97bc4 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 28 Apr 2010 14:07:11 +0400 Subject: [PATCH 263/405] Remove TYPE_SKULLS_PLATO --- .../boss_deathbringer_saurfang.cpp | 5 ++ .../icecrown_citadel/boss_festergut.cpp | 5 ++ .../boss_lady_deathwhisper.cpp | 5 ++ .../icecrown_citadel/boss_lord_marrowgar.cpp | 5 ++ .../boss_proffesor_putricide.cpp | 12 ++-- .../icecrown_citadel/def_spire.h | 27 ++++----- .../icecrown_citadel/icecrown_spire.cpp | 15 ++--- .../instance_icecrown_spire.cpp | 58 +++++++++---------- 8 files changed, 74 insertions(+), 58 deletions(-) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp index 4392ffc13..d4ec23de5 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp @@ -79,6 +79,11 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI DoScriptText(-1631100,m_creature); } + void JustReachedHome() + { + if (pInstance) pInstance->SetData(TYPE_SAURFANG, FAIL); + } + void KilledUnit(Unit* pVictim) { switch (urand(0,1)) { diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp index d8c4cc2f7..53f7186e5 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp @@ -60,6 +60,11 @@ struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI stage = 0; } + void JustReachedHome() + { + if (pInstance) pInstance->SetData(TYPE_FESTERGUT, FAIL); + } + void Aggro(Unit *who) { if(pInstance) pInstance->SetData(TYPE_FESTERGUT, IN_PROGRESS); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp index 387f8def0..e75de42ae 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp @@ -106,6 +106,11 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI }; } + void JustReachedHome() + { + if (pInstance) pInstance->SetData(TYPE_DEATHWHISPER, FAIL); + } + void MovementInform(uint32 type, uint32 id) { if(!pInstance) return; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp index 9696d9030..130ea1b25 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp @@ -69,6 +69,11 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI intro = true; } + void JustReachedHome() + { + if (pInstance) pInstance->SetData(TYPE_MARROWGAR, FAIL); + } + /* void JustSummoned(Creature* _summoned) { diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp index cc1e7d16b..ae1c22423 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp @@ -70,18 +70,22 @@ struct MANGOS_DLL_DECL boss_proffesor_putricideAI : public ScriptedAI void Reset() { - if(!pInstance) return; - pInstance->SetData(TYPE_PUTRICIDE, NOT_STARTED); + if (pInstance) pInstance->SetData(TYPE_PUTRICIDE, NOT_STARTED); } void Aggro(Unit *who) { - if(pInstance) pInstance->SetData(TYPE_PUTRICIDE, IN_PROGRESS); + if (pInstance) pInstance->SetData(TYPE_PUTRICIDE, IN_PROGRESS); } void JustDied(Unit *killer) { - if(pInstance) pInstance->SetData(TYPE_PUTRICIDE, DONE); + if (pInstance) pInstance->SetData(TYPE_PUTRICIDE, DONE); + } + + void JustReachedHome() + { + if (pInstance) pInstance->SetData(TYPE_PUTRICIDE, FAIL); } void UpdateAI(const uint32 diff) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h index f47e37b10..d41e94224 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h @@ -11,19 +11,18 @@ enum TYPE_TELEPORT = 0, TYPE_MARROWGAR = 1, TYPE_DEATHWHISPER = 2, - TYPE_SKULLS_PLATO = 3, - TYPE_FLIGHT_WAR = 4, - TYPE_SAURFANG = 5, - TYPE_FESTERGUT = 6, - TYPE_ROTFACE = 7, - TYPE_PUTRICIDE = 8, - TYPE_BLOOD_COUNCIL = 9, - TYPE_LANATHEL = 10, - TYPE_VALITHRIA = 11, - TYPE_SINDRAGOSA = 12, - TYPE_LICH_KING = 13, - TYPE_ICECROWN_QUESTS = 14, - TYPE_COUNT = 15, + TYPE_FLIGHT_WAR = 3, + TYPE_SAURFANG = 4, + TYPE_FESTERGUT = 5, + TYPE_ROTFACE = 6, + TYPE_PUTRICIDE = 7, + TYPE_BLOOD_COUNCIL = 8, + TYPE_LANATHEL = 9, + TYPE_VALITHRIA = 10, + TYPE_SINDRAGOSA = 11, + TYPE_LICH_KING = 12, + TYPE_ICECROWN_QUESTS = 13, + TYPE_COUNT = 14, MAX_ENCOUNTERS, NPC_LORD_MARROWGAR = 36612, @@ -40,6 +39,8 @@ enum NPC_SINDRAGOSA = 36853, NPC_LICH_KING = 36597, + NPC_MURADIN = 36948, + GO_TELEPORT_GOSSIP_MESSAGE = 99323, TELEPORT_GOSSIP_MESSAGE = 99322, diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp index 7ae413540..d563671cc 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp @@ -54,16 +54,6 @@ struct MANGOS_DLL_DECL mob_spire_frostwyrmAI : public ScriptedAI stage = 0; } - void Aggro(Unit *who) - { - if(pInstance) pInstance->SetData(TYPE_SKULLS_PLATO, IN_PROGRESS); - } - - void JustDied(Unit *killer) - { - if(pInstance) pInstance->SetData(TYPE_SKULLS_PLATO, DONE); - } - void UpdateAI(const uint32 diff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -123,6 +113,11 @@ struct MANGOS_DLL_DECL mob_frost_giantAI : public ScriptedAI if(pInstance) pInstance->SetData(TYPE_FLIGHT_WAR, DONE); } + void JustReachedHome() + { + if (pInstance) pInstance->SetData(TYPE_FLIGHT_WAR, FAIL); + } + void Reset() { m_creature->SetRespawnDelay(DAY); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp index fc9944bff..38c188541 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp @@ -341,11 +341,8 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance pGOTemp->SetRespawnTime(25000); } break; - case TYPE_SKULLS_PLATO: - m_auiEncounter[3] = uiData; - break; case TYPE_FLIGHT_WAR: - if (uiData == DONE && m_auiEncounter[4] != DONE ) { + if (uiData == DONE && m_auiEncounter[3] != DONE ) { if (GameObject* pChest = instance->GetGameObject(m_uiGunshipArmoryAGUID)) if (pChest && !pChest->isSpawned()) { pChest->SetRespawnTime(7*DAY); @@ -356,10 +353,10 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance pChest->SetRespawnTime(7*DAY); }; }; - m_auiEncounter[4] = uiData; + m_auiEncounter[3] = uiData; break; case TYPE_SAURFANG: - m_auiEncounter[5] = uiData; + m_auiEncounter[4] = uiData; if (uiData == DONE) { OpenDoor(m_uiSaurfangDoorGUID); if (GameObject* pChest = instance->GetGameObject(m_uiSaurfangCacheGUID)) @@ -369,49 +366,49 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance }; break; case TYPE_FESTERGUT: - m_auiEncounter[6] = uiData; + m_auiEncounter[5] = uiData; if (uiData == IN_PROGRESS) CloseDoor(m_uiOrangePlagueGUID); else OpenDoor(m_uiOrangePlagueGUID); if (uiData == DONE) { OpenDoor(m_uiSDoorOrangeGUID); - if (m_auiEncounter[7] == DONE) OpenDoor(m_uiSDoorCollisionGUID); + if (m_auiEncounter[6] == DONE) OpenDoor(m_uiSDoorCollisionGUID); } break; case TYPE_ROTFACE: - m_auiEncounter[7] = uiData; + m_auiEncounter[6] = uiData; if (uiData == IN_PROGRESS) CloseDoor(m_uiGreenPlagueGUID); else OpenDoor(m_uiGreenPlagueGUID); if (uiData == DONE) { OpenDoor(m_uiSDoorGreenGUID); - if (m_auiEncounter[6] == DONE) OpenDoor(m_uiSDoorCollisionGUID); + if (m_auiEncounter[5] == DONE) OpenDoor(m_uiSDoorCollisionGUID); } break; case TYPE_PUTRICIDE: - m_auiEncounter[8] = uiData; + m_auiEncounter[7] = uiData; if (uiData == IN_PROGRESS) CloseDoor(m_uiScientistDoorGUID); else OpenDoor(m_uiScientistDoorGUID); // if (uiData == DONE) OpenDoor(m_uiBloodwingDoorGUID); break; case TYPE_BLOOD_COUNCIL: - m_auiEncounter[9] = uiData; + m_auiEncounter[8] = uiData; break; case TYPE_LANATHEL: - m_auiEncounter[10] = uiData; + m_auiEncounter[9] = uiData; break; case TYPE_VALITHRIA: - m_auiEncounter[11] = uiData; + m_auiEncounter[10] = uiData; break; case TYPE_SINDRAGOSA: - m_auiEncounter[12] = uiData; + m_auiEncounter[11] = uiData; break; case TYPE_LICH_KING: - m_auiEncounter[13] = uiData; + m_auiEncounter[12] = uiData; break; case TYPE_ICECROWN_QUESTS: - m_auiEncounter[14] = uiData; + m_auiEncounter[13] = uiData; break; case TYPE_COUNT: - m_auiEncounter[15] = uiData; + m_auiEncounter[14] = uiData; uiData = NOT_STARTED; break; } @@ -445,19 +442,18 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance case TYPE_TELEPORT: return m_auiEncounter[0]; case TYPE_MARROWGAR: return m_auiEncounter[1]; case TYPE_DEATHWHISPER: return m_auiEncounter[2]; - case TYPE_SKULLS_PLATO: return m_auiEncounter[3]; - case TYPE_FLIGHT_WAR: return m_auiEncounter[4]; - case TYPE_SAURFANG: return m_auiEncounter[5]; - case TYPE_FESTERGUT: return m_auiEncounter[6]; - case TYPE_ROTFACE: return m_auiEncounter[7]; - case TYPE_PUTRICIDE: return m_auiEncounter[8]; - case TYPE_BLOOD_COUNCIL: return m_auiEncounter[9]; - case TYPE_LANATHEL: return m_auiEncounter[10]; - case TYPE_VALITHRIA: return m_auiEncounter[11]; - case TYPE_SINDRAGOSA: return m_auiEncounter[12]; - case TYPE_LICH_KING: return m_auiEncounter[13]; - case TYPE_ICECROWN_QUESTS: return m_auiEncounter[14]; - case TYPE_COUNT: return m_auiEncounter[15]; + case TYPE_FLIGHT_WAR: return m_auiEncounter[3]; + case TYPE_SAURFANG: return m_auiEncounter[4]; + case TYPE_FESTERGUT: return m_auiEncounter[5]; + case TYPE_ROTFACE: return m_auiEncounter[6]; + case TYPE_PUTRICIDE: return m_auiEncounter[7]; + case TYPE_BLOOD_COUNCIL: return m_auiEncounter[8]; + case TYPE_LANATHEL: return m_auiEncounter[9]; + case TYPE_VALITHRIA: return m_auiEncounter[10]; + case TYPE_SINDRAGOSA: return m_auiEncounter[11]; + case TYPE_LICH_KING: return m_auiEncounter[12]; + case TYPE_ICECROWN_QUESTS: return m_auiEncounter[13]; + case TYPE_COUNT: return m_auiEncounter[14]; } return 0; } From f94137890512f0c4448af5412dff791724a7ecff Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 28 Apr 2010 18:32:07 +0400 Subject: [PATCH 264/405] BSW change && small correct to forge --- include/sc_boss_spell_worker.cpp | 5 ++--- include/sc_boss_spell_worker.h | 5 +++-- .../frozen_halls/forge_of_souls/boss_bronjahm.cpp | 14 +++++++------- .../forge_of_souls/instance_forge_of_souls.cpp | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index c44441ee7..3687ff53d 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -1,12 +1,10 @@ /* Copyright (C) 2009 - 2010 by /dev/rsa for ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ -#include "sc_boss_spell_worker.h" #include "precompiled.h" +#include "sc_boss_spell_worker.h" #ifdef DEF_BOSS_SPELL_WORKER_H -//extern DatabaseType SD2Database; - BossSpellWorker::BossSpellWorker(ScriptedAI* bossAI) { boss = bossAI->m_creature; @@ -340,6 +338,7 @@ CanCastResult BossSpellWorker::_BSWDoCast(uint8 m_uiSpellIdx, Unit* pTarget) if (!pTarget->isAlive()) return CAST_FAIL_OTHER; SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; debug_log("BSW: Casting bugged spell number %u type %u",pSpell->m_uiSpellEntry[currentDifficulty], pSpell->m_CastTarget); + pTarget->InterruptNonMeleeSpells(false); pTarget->CastSpell(pTarget, pSpell->m_uiSpellEntry[currentDifficulty], false); return CAST_OK; }; diff --git a/include/sc_boss_spell_worker.h b/include/sc_boss_spell_worker.h index 582ae6e34..c4311667e 100644 --- a/include/sc_boss_spell_worker.h +++ b/include/sc_boss_spell_worker.h @@ -2,6 +2,9 @@ * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ +#ifndef DEF_BOSS_SPELL_WORKER_H +#define DEF_BOSS_SPELL_WORKER_H + #include "Player.h" #include "SpellAuras.h" #include "Unit.h" @@ -9,8 +12,6 @@ #include "Database/DatabaseEnv.h" #include "../ScriptMgr.h" -#ifndef DEF_BOSS_SPELL_WORKER_H -#define DEF_BOSS_SPELL_WORKER_H enum { diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp index 427e383b1..1a1c8b20f 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp @@ -8,13 +8,14 @@ enum //summons NPC_SOUL_FRAGMENT = 36535, //Abilities - SPELL_MAGIC_BLANE_N = 68793, - SPELL_CORRUPT_SOUL_N = 68839, - SPELL_CONSUME_SOUL_N = 68858, - SPELL_TELEPORT_N = 68988, + SPELL_MAGIC_BANE = 68793, + SPELL_CORRUPT_SOUL = 68839, + SPELL_CONSUME_SOUL = 68858, + SPELL_TELEPORT = 68988, SPELL_SOULSTORM_N = 68872, - SPELL_SOULSTORM2_N = 68921, - SPELL_FEAR = 68950 + SPELL_SOULSTORM_2 = 68921, + SPELL_FEAR = 68950, + SPELL_SHADOW_BOLT = 70043, }; struct MANGOS_DLL_DECL boss_bronjahmAI : public ScriptedAI @@ -62,7 +63,6 @@ struct MANGOS_DLL_DECL mob_soul_fragmentAI : public ScriptedAI } ScriptedInstance *m_pInstance; - uint32 m_uiRangeCheck_Timer; void Reset() { diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp index f287a8ddb..66a39781b 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp @@ -109,7 +109,7 @@ struct MANGOS_DLL_DECL instance_forge_of_souls : public ScriptedInstance switch(uiType) { case TYPE_BRONJAHM: return m_auiEncounter[0]; - case TYPE_DEVOURER: return m_auiEncounter[1]; + case TYPE_DEVOURER: return m_auiEncounter[1]; } return 0; } From 988a87da3974eb62481a875901b2f85f1cf4ab1c Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 28 Apr 2010 18:34:44 +0400 Subject: [PATCH 265/405] Small change to bsw --- include/sc_boss_spell_worker.cpp | 4 +--- include/sc_boss_spell_worker.h | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index f6f227ccb..3687ff53d 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -1,12 +1,10 @@ /* Copyright (C) 2009 - 2010 by /dev/rsa for ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ -#include "sc_boss_spell_worker.h" #include "precompiled.h" +#include "sc_boss_spell_worker.h" #ifdef DEF_BOSS_SPELL_WORKER_H -//extern DatabaseType SD2Database; - BossSpellWorker::BossSpellWorker(ScriptedAI* bossAI) { boss = bossAI->m_creature; diff --git a/include/sc_boss_spell_worker.h b/include/sc_boss_spell_worker.h index 28efae309..c4311667e 100644 --- a/include/sc_boss_spell_worker.h +++ b/include/sc_boss_spell_worker.h @@ -12,6 +12,7 @@ #include "Database/DatabaseEnv.h" #include "../ScriptMgr.h" + enum { DIFFICULTY_LEVELS = 4, From 4bcd30ee6037fae2a731183e17e9a23638728fb8 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 28 Apr 2010 19:11:45 +0400 Subject: [PATCH 266/405] Small corrections --- README | 1 + addition/724_trial_of_crusader_mangos.sql | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README b/README index d9d1052f4..03a5c0278 100644 --- a/README +++ b/README @@ -32,4 +32,5 @@ Thanks to: - Boxa - changes for Windows compilers and bugreports; - Dron01 - bugreports and valuable advice; - gladden, ghostart - bugreports; +- Insider42 - bugreports, features; - all - testing. diff --git a/addition/724_trial_of_crusader_mangos.sql b/addition/724_trial_of_crusader_mangos.sql index 055c58cc8..c54d520a2 100644 --- a/addition/724_trial_of_crusader_mangos.sql +++ b/addition/724_trial_of_crusader_mangos.sql @@ -13,7 +13,7 @@ INSERT INTO `npc_text` (`ID`, `Text0_0`) VALUES (724002, 'Are you ready for the next stage?'), (724003, 'Are you ready to fight the champions of the Silver vanguard?'), (724004, 'Are you ready for the next stage?'), -(724005, 'You are ready to continue battle with Anub-Arak?'), +(724005, 'Are you ready to continue battle with Anub-Arak?'), (724006, 'Today, the arena is closed. Script dungeon designed specifically for server Pandora http://wow.teletoria.ru (c) /dev/rsa 2010'); DELETE FROM `locales_npc_text` WHERE `entry` IN (724001, 724002, 724003, 724004, 724005, 724006); @@ -22,7 +22,7 @@ INSERT INTO `locales_npc_text` (`entry`, `Text0_0_loc1`, `Text0_0_loc2`, `Text0_ (724002, 'Are you ready for the next stage?', NULL, NULL, NULL, NULL, NULL, NULL, 'Вы готовы к следующему этапу?'), (724003, 'Are you ready to fight the champions of the Silver vanguard?', NULL, NULL, NULL, NULL, NULL, NULL, 'Вы готовы драться с чемпионами Серебряного авангарда?'), (724004, 'Are you ready for the next stage?', NULL, NULL, NULL, NULL, NULL, NULL, 'Вы готовы к следующему этапу?'), -(724005, 'You are ready to continue battle with Anub-Arak?', NULL, NULL, NULL, NULL, NULL, NULL, 'Вы готовы продолжить бой с Ануб-Араком?'), +(724005, 'Are you ready to continue battle with Anub-Arak?', NULL, NULL, NULL, NULL, NULL, NULL, 'Вы готовы продолжить бой с Ануб-Араком?'), (724006, 'Today, the arena is closed. Script dungeon designed specifically for server Pandora http://wow.teletoria.ru (c) /dev/rsa 2010', NULL, NULL, NULL, NULL, NULL, NULL, 'На сегодня арена закрыта. Скрипт инстанса разработан специально для сервера Пандора http://wow.teletoria.ru (c) /dev/rsa 2010'); UPDATE `creature_template` SET `scriptname`='boss_lich_king_toc' WHERE `entry`=35877; From 39464a126b8a2e4dbc12bf9e3747fe8dfd07fe0a Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 28 Apr 2010 20:19:35 +0400 Subject: [PATCH 267/405] Pit of saron && Forge of souls texts (from Trinity) --- addition/723_icecrown_down_scriptdev2.sql | 116 ++++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 addition/723_icecrown_down_scriptdev2.sql diff --git a/addition/723_icecrown_down_scriptdev2.sql b/addition/723_icecrown_down_scriptdev2.sql new file mode 100644 index 000000000..5ef0d3a7e --- /dev/null +++ b/addition/723_icecrown_down_scriptdev2.sql @@ -0,0 +1,116 @@ +-- Pit of saron +DELETE FROM `script_texts` WHERE `entry` <= -1658000 and `entry` >= -1658999; +INSERT INTO `script_texts` (`npc_entry`,`entry`,`content_default`,`content_loc1`,`content_loc2`,`content_loc3`,`content_loc4`,`content_loc5`,`content_loc6`,`content_loc7`,`content_loc8`,`sound`,`type`,`language`,`emote`,`comment`) VALUES +-- Garfrost +(36494,-1658001,'Tiny creatures under feet, you bring Garfrost something good to eat!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16912,1,0,0,'garfrost SAY_AGGRO'), +(36494,-1658002,'Will save for snack. For later.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16913,1,0,0,'garfrost SAY_SLAY_1'), +(36494,-1658003,'That one maybe not so good to eat now. Stupid Garfrost! BAD! BAD!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16914,1,0,0,'garfrost SAY_SLAY_2'), +(36494,-1658004,'Garfrost hope giant underpants clean. Save boss great shame. For later.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16915,1,0,0,'garfrost SAY_DEATH'), +(36494,-1658005,'Axe too weak. Garfrost make better and CRUSH YOU!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16916,1,0,0,'garfrost SAY_PHASE2'), +(36494,-1658006,'Garfrost tired of puny mortals. Now your bones will freeze!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16917,1,0,0,'garfrost SAY_PHASE3'), +(36658,-1658007,'Another shall take his place. You waste your time.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16752,1,0,0,'Tyrannus SAY_TYRANNUS_DEATH'), + +-- Krick +(36477,-1658010,'Our work must not be interrupted! Ick! Take care of them!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16926,1,0,0,'Krick SAY_AGGRO'), +(36477,-1658011,'Ooh...We could probably use these parts!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16927,1,0,0,'Krick SAY_SLAY_1'), +(36477,-1658012,'Arms and legs are in short supply...Thanks for your contribution!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16928,1,0,0,'Krick SAY_SLAY_2'), +(36477,-1658013,'Enough moving around! Hold still while I blow them all up!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16929,1,0,0,'Krick SAY_BARRAGE_1'), +(36477,-1658014,'Krick begins rapidly conjuring explosive mines!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'Krick SAY_BARRAGE_2'), +(36477,-1658015,'Quickly! Poison them all while they''re still close!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16930,1,0,0,'Krick SAY_POISON_NOVA'), +(36477,-1658016,'No! That one! That one! Get that one!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16931,1,0,0,'Krick SAY_CHASE_1'), +(36477,-1658017,'I''ve changed my mind...go get that one instead!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16932,1,0,0,'Krick SAY_CHASE_2'), +(36477,-1658018,'What are you attacking him for? The dangerous one is over there,fool!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16933,1,0,0,'Krick SAY_CHASE_3'), + +-- Ick +(36476,-1658020,'Ick begins to unleash a toxic poison cloud!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'Ick SAY_ICK_POISON_NOVA'), +(36476,-1658021,'Ick is chasing you!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'Ick SAY_ICK_CHASE_1'), + +-- Krick OUTRO +(36477,-1658030,'Wait! Stop! Don''t kill me, please! I''ll tell you everything!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16934,1,0,0,'Krick SAY_KRICK_OUTRO_1'), +(36993,-1658031,'I''m not so naive as to believe your appeal for clemency, but I will listen.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16611,1,0,0,'Jaina SAY_JAINA_OUTRO_2'), +(36990,-1658032,'Why should the Banshee Queen spare your miserable life?',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17033,1,0,0,'Sylvanas SAY_SYLVANAS_OUTRO_2'), +(36477,-1658033,'What you seek is in the master''s lair, but you must destroy Tyrannus to gain entry. Within the Halls of Reflection you will find Frostmourne. It... it holds the truth.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16935,1,0,0,'Krick SAY_KRICK_OUTRO_3'), +(36993,-1658034,'Frostmourne lies unguarded? Impossible!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16612,1,0,0,'Jaina SAY_JAINA_OUTRO_4'), +(36990,-1658035,'Frostmourne? The Lich King is never without his blade! If you are lying to me...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17034,1,0,0,'Sylvanas SAY_SYLVANAS_OUTRO_4'), +(36477,-1658036,'I swear it is true! Please, don''t kill me!!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16936,1,0,0,'Krick SAY_KRICK_OUTRO_5'), +(36658,-1658037,'Worthless gnat! Death is all that awaits you!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16753,1,0,0,'Tyrannus SAY_TYRANNUS_OUTRO_7'), +(36477,-1658038,'Urg... no!!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16937,1,0,0,'Krick SAY_KRICK_OUTRO_8'), +(36658,-1658039,'Do not think that I shall permit you entry into my master''s sanctum so easily. Pursue me if you dare.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16754,1,0,0,'Tyrannus SAY_TYRANNUS_OUTRO_9'), +(36993,-1658040,'What a cruel end. Come, heroes. We must see if the gnome''s story is true. If we can separate Arthas from Frostmourne, we might have a chance at stopping him.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16613,1,0,0,'Jaina SAY_JAINA_OUTRO_10'), +(36990,-1658041,'A fitting end for a traitor. Come, we must free the slaves and see what is within the Lich King''s chamber for ourselves.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17035,1,0,0,'Sylvanas SAY_SYLVANAS_OUTRO_10'), + +-- Tyrannus +(36658,-1658050,'Your pursuit shall be in vain, adventurers, for the Lich King has placed an army of undead at my command! Behold!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16755,1,0,0,'Tyrannus SAY_AMBUSH_1'), +(36658,-1658051,'Persistent whelps! You will not reach the entrance of my lord''s lair! Soldiers, destroy them!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16756,1,0,0,'Tyrannus SAY_AMBUSH_2'), +(36658,-1658052,'Rimefang! Trap them within the tunnel! Bury them alive!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16757,1,0,0,'Tyrannus SAY_GAUNTLET_START'), +(36658,-1658053,'Alas, brave, brave adventurers, your meddling has reached its end. Do you hear the clatter of bone and steel coming up the tunnel behind you? That is the sound of your impending demise.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16758,1,0,0,'Tyrannus SAY_INTRO_1'), +(36658,-1658054,'Ha, such an amusing gesture from the rabble. When I have finished with you, my master''s blade will feast upon your souls. Die!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16759,1,0,0,'Tyrannus SAY_INTRO_2'), + +(36658,-1658055,'I shall not fail The Lich King! Come and meet your end!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16760,1,0,0,'Tyrannus SAY_AGGRO'), +(36658,-1658056,'Such a shameful display... You are better off dead!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16761,1,0,0,'Tyrannus SAY_SLAY_1'), +(36658,-1658057,'Perhaps you should have stayed in the mountains!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16762,1,0,0,'Tyrannus SAY_SLAY_2'), +(36658,-1658058,'Impossible! Rimefang... Warn...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16763,1,0,0,'Tyrannus SAY_DEATH'), +(36658,-1658059,'Rimefang, destroy this fool!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16764,1,0,0,'Tyrannus SAY_MARK_RIMEFANG_1'), +(36658,-1658060,'The frostwyrm Rimefang gazes at $N and readies an icy attack!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'Tyrannus SAY_MARK_RIMEFANG_2'), +(36658,-1658061,'Power... overwhelming!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16765,1,0,0,'Tyrannus SAY_DARK_MIGHT_1'), +(36658,-1658062,'Scourgelord Tyrannus roars and swells with dark might!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'Tyrannus SAY_DARK_MIGHT_2'), + +(37592,-1658063,'Brave champions, we owe you our lives, our freedom... Though it be a tiny gesture in the face of this enormous debt, I pledge that from this day forth, all will know of your deeds, and the blazing path of light you cut through the shadow of this dark citadel.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,0,'Gorkun SAY_GORKUN_OUTRO_1'), +(37592,-1658064,'This day will stand as a testament not only to your valor, but to the fact that no foe, not even the Lich King himself, can stand when Alliance and Horde set aside their differences and ---',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,0,'Gorkun SAY_GORKUN_OUTRO_2'), +(36993,-1658065,'Heroes, to me!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16614,1,0,0,'Jaina SAY_JAYNA_OUTRO_3'), +(36990,-1658066,'Take cover behind me! Quickly!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17037,1,0,0,'Sylvanas SAY_SYLVANAS_OUTRO_3'), +(36993,-1658067,'The Frost Queen is gone. We must keep moving - our objective is near.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16615,0,0,0,'Jaina SAY_JAYNA_OUTRO_4'), +(36990,-1658068,'I thought he''d never shut up. At last, Sindragosa silenced that long-winded fool. To the Halls of Reflection, champions! Our objective is near... I can sense it.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17036,0,0,0,'Sylvanas SAY_SYLVANAS_OUTRO_4'), +(36993,-1658069,'I... I could not save them... Damn you, Arthas! DAMN YOU!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16616,0,0,0,'Jaina SAY_JAYNA_OUTRO_5'); + +-- Forge of souls +DELETE FROM `script_texts` WHERE `entry` <= -1632000 and `entry` >= -1632999; +INSERT INTO `script_texts` (`npc_entry`,`entry`,`content_default`,`content_loc1`,`content_loc2`,`content_loc3`,`content_loc4`,`content_loc5`,`content_loc6`,`content_loc7`,`content_loc8`,`sound`,`type`,`language`,`emote`,`comment`) VALUES +-- Bronjham +(36497,-1632001,'Finally...a captive audience!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16595,1,0,0,'Bronjham SAY_AGGRO'), +(36497,-1632002,'Fodder for the engine!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16596,1,0,0,'Bronjham SAY_SLAY_1'), +(36497,-1632003,'Another soul to strengthen the host!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16597,1,0,0,'Bronjham SAY_SLAY_2'), +(36497,-1632004,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16598,1,0,0,'Bronjham SAY_DEATH'), +(36497,-1632005,'The vortex of the harvested calls to you!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16599,1,0,0,'Bronjham SAY_SOUL_STORM'), +(36497,-1632006,'I will sever the soul from your body!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16600,1,0,0,'Bronjham SAY_CORRUPT_SOUL'), + +-- Devourer of Souls +(36502,-1632010,'You dare look upon the host of souls? I SHALL DEVOUR YOU WHOLE!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16884,1,0,0,'Devoureur SAY_FACE_ANGER_AGGRO'), +(36502,-1632011,'You dare look upon the host of souls? I SHALL DEVOUR YOU WHOLE!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16890,1,0,0,'Devoureur SAY_FACE_DESIRE_AGGRO'), +(36502,-1632012,'Damnation!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16885,1,0,0,'Devoureur SAY_FACE_ANGER_SLAY_1'), +(36502,-1632013,'Damnation!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16896,1,0,0,'Devoureur SAY_FACE_SORROW_SLAY_1'), +(36502,-1632014,'Damnation!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16891,1,0,0,'Devoureur SAY_FACE_DESIRE_SLAY_1'), +(36502,-1632015,'Doomed for eternity!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16886,1,0,0,'Devoureur SAY_FACE_ANGER_SLAY_2'), +(36502,-1632016,'Doomed for eternity!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16897,1,0,0,'Devoureur SAY_FACE_SORROW_SLAY_2'), +(36502,-1632017,'Doomed for eternity!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16892,1,0,0,'Devoureur SAY_FACE_DESIRE_SLAY_2'), +(36502,-1632018,'The swell of souls will not be abated! You only delay the inevitable!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16887,1,0,0,'Devoureur SAY_FACE_ANGER_DEATH'), +(36502,-1632019,'The swell of souls will not be abated! You only delay the inevitable!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16898,1,0,0,'Devoureur SAY_FACE_SORROW_DEATH'), +(36502,-1632020,'The swell of souls will not be abated! You only delay the inevitable!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16893,1,0,0,'Devoureur SAY_FACE_DESIRE_DEATH'), +(36502,-1632021,'Devourer of Souls begins to cast Mirrored Soul!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'Devoureur EMOTE_MIRRORED_SOUL'), +(36502,-1632022,'Devourer of Souls begins to Unleash Souls!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'Devoureur EMOTE_UNLEASH_SOUL'), +(36502,-1632023,'SUFFERING! ANGUISH! CHAOS! RISE AND FEED!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16888,1,0,0,'Devoureur SAY_FACE_ANGER_UNLEASH_SOUL'), +(36502,-1632024,'SUFFERING! ANGUISH! CHAOS! RISE AND FEED!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16899,1,0,0,'Devoureur SAY_FACE_SORROW_UNLEASH_SOUL'), +(36502,-1632025,'SUFFERING! ANGUISH! CHAOS! RISE AND FEED!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16894,1,0,0,'Devoureur SAY_FACE_DESIRE_UNLEASH_SOUL'), +(36502,-1632026,'Devourer of Souls begins to cast Wailing Souls!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'Devoureur EMOTE_WAILING_SOUL'), +(36502,-1632027,'Stare into the abyss, and see your end!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16889,1,0,0,'Devoureur SAY_FACE_ANGER_WAILING_SOUL'), +(36502,-1632028,'Stare into the abyss, and see your end!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16895,1,0,0,'Devoureur SAY_FACE_DESIRE_WAILING_SOUL'), +(38160,-1632029,'Excellent work, champions! We shall set up our base camp in these chambers. My mages will get the Scourge transport device working shortly. Step inside it when you''re ready for your next mission. I will meet you on the other side.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16625,1,0,0,'Jaina SAY_JAINA_OUTRO'), +(38161,-1632030,'Excellent work, champions! We shall set up our base camp in these chambers. My mages will get the Scourge transport device working shortly. Step inside when you are ready for your next mission. I will meet you on the other side.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17044,1,0,0,'Sylvanas SAY_SYLVANAS_OUTRO'), + +-- Jaina +(37597,-1632040,'Thank the light for seeing you here safely. We have much work to do if we are to defeat the Lich King and put an end to the Scourge.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16617,0,0,0,'Jaina SAY_INTRO_1'), +(37597,-1632041,'Our allies within the Argent Crusade and the Knights of the Ebon Blade have broken through the front gate of Icecrown and are attempting to establish a foothold within the Citadel.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16618,0,0,0,'Jaina SAY_INTRO_2'), +(37597,-1632042,'Their success hinges upon what we discover in these cursed halls. Although our mission is a wrought with peril, we must persevere!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16619,0,0,0,'Jaina SAY_INTRO_3'), +(37597,-1632043,'With the attention of the Lich King drawn toward the front gate, we will be working our way through the side in search of information that will enable us to defeat the Scourge - once and for all.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16620,0,0,0,'Jaina SAY_INTRO_4'), +(37597,-1632044,'King Varian''s SI7 agents have gathered information about a private sanctum of the Lich King''s deep within a place called the Halls of Reflection.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16621,0,0,0,'Jaina SAY_INTRO_5'), +(37597,-1632045,'We will carve a path through this wretched place and find a way to enter the Halls of Reflection. I sense powerful magic hidden away within those walls... Magic that could be the key to destroy the Scourge.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16622,0,0,0,'Jaina SAY_INTRO_6'), +(37597,-1632046,'Your first mission is to destroy the machines of death within this malevolent engine of souls, and clear a path for our soldiers.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16623,0,0,0,'Jaina SAY_INTRO_7'), +(37597,-1632047,'Make haste, champions! I will prepare the troops to fall in behind you.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16624,0,0,0,'Jaina SAY_INTRO_8'), + +-- Sylvanas +(37596,-1632050,'The Argent Crusade and the Knights of the Ebon Blade have assaulted the gates of Icecrown Citadel and are preparing for a massive attack upon the Scourge. Our missition is a bit more subtle, but equally as important.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17038,0,0,0,'Sylvanas SAY_INTRO_1'), +(37596,-1632051,'With the attention of the Lich King turned towards the front gate, we''ll be working our way through the side in search of information that will enable us to defeat the Lich King - once and for all.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17039,0,0,0,'Sylvanas SAY_INTRO_2'), +(37596,-1632052,'Our scouts have reported that the Lich King has a private chamber, outside of the Frozen Throne, deep within a place called the Halls of Reflection. That is our target, champions.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17040,0,0,0,'Sylvanas SAY_INTRO_3'), +(37596,-1632053,'We will cut a swath of destruction through this cursed place and find a way to enter the Halls of Reflection. If there is anything of value to be found here, it will be found in the Halls.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17041,0,0,0,'Sylvanas SAY_INTRO_4'), +(37596,-1632054,'Your first mission is to destroy the machines of death within this wretched engine of souls, and clear a path for our soldiers.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17042,0,0,0,'Sylvanas SAY_INTRO_5'), +(37596,-1632055,'The Dark Lady watches over you. Make haste!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17043,0,0,0,'Sylvanas SAY_INTRO_6'); From 4e07db42f2721768b1d5fc24bce08e85ca27fee9 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 29 Apr 2010 01:01:59 +0400 Subject: [PATCH 268/405] Boss Bronjahm (Forge of souls) --- addition/723_icecrown_down_mangos.sql | 7 +- addition/723_icecrown_down_scriptdev2.sql | 186 +++++++++--------- ...23_icecrown_down_spelltable_scriptdev2.sql | 14 ++ .../forge_of_souls/boss_bronjahm.cpp | 115 +++++++++-- .../frozen_halls/forge_of_souls/def_forge.h | 1 + 5 files changed, 209 insertions(+), 114 deletions(-) create mode 100644 addition/723_icecrown_down_spelltable_scriptdev2.sql diff --git a/addition/723_icecrown_down_mangos.sql b/addition/723_icecrown_down_mangos.sql index d13fba607..34ba69997 100644 --- a/addition/723_icecrown_down_mangos.sql +++ b/addition/723_icecrown_down_mangos.sql @@ -1,7 +1,8 @@ --- UPDATE `instance_template` SET `script`='instance_forge_of_souls' WHERE `map`=632; +UPDATE `instance_template` SET `script`='instance_forge_of_souls' WHERE `map`=632; +UPDATE `creature_template` SET `ScriptName`='boss_bronjahm', `AIName` ='' WHERE `entry`=36497; +UPDATE `creature_template` SET `ScriptName`='mob_soul_fragment', `AIName` ='' WHERE `entry`=36535; --- UPDATE `creature_template` SET `ScriptName`='boss_bronjahm' WHERE `entry`=36497; --- UPDATE `creature_template` SET `ScriptName`='boss_devourer' WHERE `entry`=33113; +-- UPDATE `creature_template` SET `ScriptName`='boss_devourer', `AIName` ='' WHERE `entry`=33113; -- UPDATE `instance_template` SET `script`='instance_pit_of_saron' WHERE `map`=658; diff --git a/addition/723_icecrown_down_scriptdev2.sql b/addition/723_icecrown_down_scriptdev2.sql index 5ef0d3a7e..ea13b2b11 100644 --- a/addition/723_icecrown_down_scriptdev2.sql +++ b/addition/723_icecrown_down_scriptdev2.sql @@ -1,116 +1,116 @@ -- Pit of saron DELETE FROM `script_texts` WHERE `entry` <= -1658000 and `entry` >= -1658999; -INSERT INTO `script_texts` (`npc_entry`,`entry`,`content_default`,`content_loc1`,`content_loc2`,`content_loc3`,`content_loc4`,`content_loc5`,`content_loc6`,`content_loc7`,`content_loc8`,`sound`,`type`,`language`,`emote`,`comment`) VALUES +INSERT INTO `script_texts` (`entry`,`content_default`,`content_loc1`,`content_loc2`,`content_loc3`,`content_loc4`,`content_loc5`,`content_loc6`,`content_loc7`,`content_loc8`,`sound`,`type`,`language`,`emote`,`comment`) VALUES -- Garfrost -(36494,-1658001,'Tiny creatures under feet, you bring Garfrost something good to eat!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16912,1,0,0,'garfrost SAY_AGGRO'), -(36494,-1658002,'Will save for snack. For later.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16913,1,0,0,'garfrost SAY_SLAY_1'), -(36494,-1658003,'That one maybe not so good to eat now. Stupid Garfrost! BAD! BAD!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16914,1,0,0,'garfrost SAY_SLAY_2'), -(36494,-1658004,'Garfrost hope giant underpants clean. Save boss great shame. For later.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16915,1,0,0,'garfrost SAY_DEATH'), -(36494,-1658005,'Axe too weak. Garfrost make better and CRUSH YOU!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16916,1,0,0,'garfrost SAY_PHASE2'), -(36494,-1658006,'Garfrost tired of puny mortals. Now your bones will freeze!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16917,1,0,0,'garfrost SAY_PHASE3'), -(36658,-1658007,'Another shall take his place. You waste your time.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16752,1,0,0,'Tyrannus SAY_TYRANNUS_DEATH'), +(-1658001,'Tiny creatures under feet, you bring Garfrost something good to eat!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16912,1,0,0,'garfrost SAY_AGGRO'), +(-1658002,'Will save for snack. For later.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16913,1,0,0,'garfrost SAY_SLAY_1'), +(-1658003,'That one maybe not so good to eat now. Stupid Garfrost! BAD! BAD!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16914,1,0,0,'garfrost SAY_SLAY_2'), +(-1658004,'Garfrost hope giant underpants clean. Save boss great shame. For later.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16915,1,0,0,'garfrost SAY_DEATH'), +(-1658005,'Axe too weak. Garfrost make better and CRUSH YOU!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16916,1,0,0,'garfrost SAY_PHASE2'), +(-1658006,'Garfrost tired of puny mortals. Now your bones will freeze!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16917,1,0,0,'garfrost SAY_PHASE3'), +(-1658007,'Another shall take his place. You waste your time.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16752,1,0,0,'Tyrannus SAY_TYRANNUS_DEATH'), -- Krick -(36477,-1658010,'Our work must not be interrupted! Ick! Take care of them!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16926,1,0,0,'Krick SAY_AGGRO'), -(36477,-1658011,'Ooh...We could probably use these parts!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16927,1,0,0,'Krick SAY_SLAY_1'), -(36477,-1658012,'Arms and legs are in short supply...Thanks for your contribution!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16928,1,0,0,'Krick SAY_SLAY_2'), -(36477,-1658013,'Enough moving around! Hold still while I blow them all up!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16929,1,0,0,'Krick SAY_BARRAGE_1'), -(36477,-1658014,'Krick begins rapidly conjuring explosive mines!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'Krick SAY_BARRAGE_2'), -(36477,-1658015,'Quickly! Poison them all while they''re still close!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16930,1,0,0,'Krick SAY_POISON_NOVA'), -(36477,-1658016,'No! That one! That one! Get that one!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16931,1,0,0,'Krick SAY_CHASE_1'), -(36477,-1658017,'I''ve changed my mind...go get that one instead!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16932,1,0,0,'Krick SAY_CHASE_2'), -(36477,-1658018,'What are you attacking him for? The dangerous one is over there,fool!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16933,1,0,0,'Krick SAY_CHASE_3'), +(-1658010,'Our work must not be interrupted! Ick! Take care of them!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16926,1,0,0,'Krick SAY_AGGRO'), +(-1658011,'Ooh...We could probably use these parts!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16927,1,0,0,'Krick SAY_SLAY_1'), +(-1658012,'Arms and legs are in short supply...Thanks for your contribution!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16928,1,0,0,'Krick SAY_SLAY_2'), +(-1658013,'Enough moving around! Hold still while I blow them all up!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16929,1,0,0,'Krick SAY_BARRAGE_1'), +(-1658014,'Krick begins rapidly conjuring explosive mines!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'Krick SAY_BARRAGE_2'), +(-1658015,'Quickly! Poison them all while they''re still close!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16930,1,0,0,'Krick SAY_POISON_NOVA'), +(-1658016,'No! That one! That one! Get that one!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16931,1,0,0,'Krick SAY_CHASE_1'), +(-1658017,'I''ve changed my mind...go get that one instead!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16932,1,0,0,'Krick SAY_CHASE_2'), +(-1658018,'What are you attacking him for? The dangerous one is over there,fool!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16933,1,0,0,'Krick SAY_CHASE_3'), -- Ick -(36476,-1658020,'Ick begins to unleash a toxic poison cloud!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'Ick SAY_ICK_POISON_NOVA'), -(36476,-1658021,'Ick is chasing you!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'Ick SAY_ICK_CHASE_1'), +(-1658020,'Ick begins to unleash a toxic poison cloud!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'Ick SAY_ICK_POISON_NOVA'), +(-1658021,'Ick is chasing you!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'Ick SAY_ICK_CHASE_1'), -- Krick OUTRO -(36477,-1658030,'Wait! Stop! Don''t kill me, please! I''ll tell you everything!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16934,1,0,0,'Krick SAY_KRICK_OUTRO_1'), -(36993,-1658031,'I''m not so naive as to believe your appeal for clemency, but I will listen.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16611,1,0,0,'Jaina SAY_JAINA_OUTRO_2'), -(36990,-1658032,'Why should the Banshee Queen spare your miserable life?',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17033,1,0,0,'Sylvanas SAY_SYLVANAS_OUTRO_2'), -(36477,-1658033,'What you seek is in the master''s lair, but you must destroy Tyrannus to gain entry. Within the Halls of Reflection you will find Frostmourne. It... it holds the truth.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16935,1,0,0,'Krick SAY_KRICK_OUTRO_3'), -(36993,-1658034,'Frostmourne lies unguarded? Impossible!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16612,1,0,0,'Jaina SAY_JAINA_OUTRO_4'), -(36990,-1658035,'Frostmourne? The Lich King is never without his blade! If you are lying to me...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17034,1,0,0,'Sylvanas SAY_SYLVANAS_OUTRO_4'), -(36477,-1658036,'I swear it is true! Please, don''t kill me!!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16936,1,0,0,'Krick SAY_KRICK_OUTRO_5'), -(36658,-1658037,'Worthless gnat! Death is all that awaits you!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16753,1,0,0,'Tyrannus SAY_TYRANNUS_OUTRO_7'), -(36477,-1658038,'Urg... no!!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16937,1,0,0,'Krick SAY_KRICK_OUTRO_8'), -(36658,-1658039,'Do not think that I shall permit you entry into my master''s sanctum so easily. Pursue me if you dare.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16754,1,0,0,'Tyrannus SAY_TYRANNUS_OUTRO_9'), -(36993,-1658040,'What a cruel end. Come, heroes. We must see if the gnome''s story is true. If we can separate Arthas from Frostmourne, we might have a chance at stopping him.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16613,1,0,0,'Jaina SAY_JAINA_OUTRO_10'), -(36990,-1658041,'A fitting end for a traitor. Come, we must free the slaves and see what is within the Lich King''s chamber for ourselves.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17035,1,0,0,'Sylvanas SAY_SYLVANAS_OUTRO_10'), +(-1658030,'Wait! Stop! Don''t kill me, please! I''ll tell you everything!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16934,1,0,0,'Krick SAY_KRICK_OUTRO_1'), +(-1658031,'I''m not so naive as to believe your appeal for clemency, but I will listen.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16611,1,0,0,'Jaina SAY_JAINA_OUTRO_2'), +(-1658032,'Why should the Banshee Queen spare your miserable life?',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17033,1,0,0,'Sylvanas SAY_SYLVANAS_OUTRO_2'), +(-1658033,'What you seek is in the master''s lair, but you must destroy Tyrannus to gain entry. Within the Halls of Reflection you will find Frostmourne. It... it holds the truth.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16935,1,0,0,'Krick SAY_KRICK_OUTRO_3'), +(-1658034,'Frostmourne lies unguarded? Impossible!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16612,1,0,0,'Jaina SAY_JAINA_OUTRO_4'), +(-1658035,'Frostmourne? The Lich King is never without his blade! If you are lying to me...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17034,1,0,0,'Sylvanas SAY_SYLVANAS_OUTRO_4'), +(-1658036,'I swear it is true! Please, don''t kill me!!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16936,1,0,0,'Krick SAY_KRICK_OUTRO_5'), +(-1658037,'Worthless gnat! Death is all that awaits you!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16753,1,0,0,'Tyrannus SAY_TYRANNUS_OUTRO_7'), +(-1658038,'Urg... no!!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16937,1,0,0,'Krick SAY_KRICK_OUTRO_8'), +(-1658039,'Do not think that I shall permit you entry into my master''s sanctum so easily. Pursue me if you dare.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16754,1,0,0,'Tyrannus SAY_TYRANNUS_OUTRO_9'), +(-1658040,'What a cruel end. Come, heroes. We must see if the gnome''s story is true. If we can separate Arthas from Frostmourne, we might have a chance at stopping him.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16613,1,0,0,'Jaina SAY_JAINA_OUTRO_10'), +(-1658041,'A fitting end for a traitor. Come, we must free the slaves and see what is within the Lich King''s chamber for ourselves.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17035,1,0,0,'Sylvanas SAY_SYLVANAS_OUTRO_10'), -- Tyrannus -(36658,-1658050,'Your pursuit shall be in vain, adventurers, for the Lich King has placed an army of undead at my command! Behold!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16755,1,0,0,'Tyrannus SAY_AMBUSH_1'), -(36658,-1658051,'Persistent whelps! You will not reach the entrance of my lord''s lair! Soldiers, destroy them!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16756,1,0,0,'Tyrannus SAY_AMBUSH_2'), -(36658,-1658052,'Rimefang! Trap them within the tunnel! Bury them alive!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16757,1,0,0,'Tyrannus SAY_GAUNTLET_START'), -(36658,-1658053,'Alas, brave, brave adventurers, your meddling has reached its end. Do you hear the clatter of bone and steel coming up the tunnel behind you? That is the sound of your impending demise.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16758,1,0,0,'Tyrannus SAY_INTRO_1'), -(36658,-1658054,'Ha, such an amusing gesture from the rabble. When I have finished with you, my master''s blade will feast upon your souls. Die!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16759,1,0,0,'Tyrannus SAY_INTRO_2'), +(-1658050,'Your pursuit shall be in vain, adventurers, for the Lich King has placed an army of undead at my command! Behold!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16755,1,0,0,'Tyrannus SAY_AMBUSH_1'), +(-1658051,'Persistent whelps! You will not reach the entrance of my lord''s lair! Soldiers, destroy them!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16756,1,0,0,'Tyrannus SAY_AMBUSH_2'), +(-1658052,'Rimefang! Trap them within the tunnel! Bury them alive!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16757,1,0,0,'Tyrannus SAY_GAUNTLET_START'), +(-1658053,'Alas, brave, brave adventurers, your meddling has reached its end. Do you hear the clatter of bone and steel coming up the tunnel behind you? That is the sound of your impending demise.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16758,1,0,0,'Tyrannus SAY_INTRO_1'), +(-1658054,'Ha, such an amusing gesture from the rabble. When I have finished with you, my master''s blade will feast upon your souls. Die!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16759,1,0,0,'Tyrannus SAY_INTRO_2'), -(36658,-1658055,'I shall not fail The Lich King! Come and meet your end!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16760,1,0,0,'Tyrannus SAY_AGGRO'), -(36658,-1658056,'Such a shameful display... You are better off dead!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16761,1,0,0,'Tyrannus SAY_SLAY_1'), -(36658,-1658057,'Perhaps you should have stayed in the mountains!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16762,1,0,0,'Tyrannus SAY_SLAY_2'), -(36658,-1658058,'Impossible! Rimefang... Warn...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16763,1,0,0,'Tyrannus SAY_DEATH'), -(36658,-1658059,'Rimefang, destroy this fool!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16764,1,0,0,'Tyrannus SAY_MARK_RIMEFANG_1'), -(36658,-1658060,'The frostwyrm Rimefang gazes at $N and readies an icy attack!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'Tyrannus SAY_MARK_RIMEFANG_2'), -(36658,-1658061,'Power... overwhelming!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16765,1,0,0,'Tyrannus SAY_DARK_MIGHT_1'), -(36658,-1658062,'Scourgelord Tyrannus roars and swells with dark might!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'Tyrannus SAY_DARK_MIGHT_2'), +(-1658055,'I shall not fail The Lich King! Come and meet your end!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16760,1,0,0,'Tyrannus SAY_AGGRO'), +(-1658056,'Such a shameful display... You are better off dead!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16761,1,0,0,'Tyrannus SAY_SLAY_1'), +(-1658057,'Perhaps you should have stayed in the mountains!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16762,1,0,0,'Tyrannus SAY_SLAY_2'), +(-1658058,'Impossible! Rimefang... Warn...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16763,1,0,0,'Tyrannus SAY_DEATH'), +(-1658059,'Rimefang, destroy this fool!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16764,1,0,0,'Tyrannus SAY_MARK_RIMEFANG_1'), +(-1658060,'The frostwyrm Rimefang gazes at $N and readies an icy attack!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'Tyrannus SAY_MARK_RIMEFANG_2'), +(-1658061,'Power... overwhelming!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16765,1,0,0,'Tyrannus SAY_DARK_MIGHT_1'), +(-1658062,'Scourgelord Tyrannus roars and swells with dark might!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'Tyrannus SAY_DARK_MIGHT_2'), -(37592,-1658063,'Brave champions, we owe you our lives, our freedom... Though it be a tiny gesture in the face of this enormous debt, I pledge that from this day forth, all will know of your deeds, and the blazing path of light you cut through the shadow of this dark citadel.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,0,'Gorkun SAY_GORKUN_OUTRO_1'), -(37592,-1658064,'This day will stand as a testament not only to your valor, but to the fact that no foe, not even the Lich King himself, can stand when Alliance and Horde set aside their differences and ---',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,0,'Gorkun SAY_GORKUN_OUTRO_2'), -(36993,-1658065,'Heroes, to me!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16614,1,0,0,'Jaina SAY_JAYNA_OUTRO_3'), -(36990,-1658066,'Take cover behind me! Quickly!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17037,1,0,0,'Sylvanas SAY_SYLVANAS_OUTRO_3'), -(36993,-1658067,'The Frost Queen is gone. We must keep moving - our objective is near.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16615,0,0,0,'Jaina SAY_JAYNA_OUTRO_4'), -(36990,-1658068,'I thought he''d never shut up. At last, Sindragosa silenced that long-winded fool. To the Halls of Reflection, champions! Our objective is near... I can sense it.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17036,0,0,0,'Sylvanas SAY_SYLVANAS_OUTRO_4'), -(36993,-1658069,'I... I could not save them... Damn you, Arthas! DAMN YOU!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16616,0,0,0,'Jaina SAY_JAYNA_OUTRO_5'); +(-1658063,'Brave champions, we owe you our lives, our freedom... Though it be a tiny gesture in the face of this enormous debt, I pledge that from this day forth, all will know of your deeds, and the blazing path of light you cut through the shadow of this dark citadel.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,0,'Gorkun SAY_GORKUN_OUTRO_1'), +(-1658064,'This day will stand as a testament not only to your valor, but to the fact that no foe, not even the Lich King himself, can stand when Alliance and Horde set aside their differences and ---',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,0,'Gorkun SAY_GORKUN_OUTRO_2'), +(-1658065,'Heroes, to me!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16614,1,0,0,'Jaina SAY_JAYNA_OUTRO_3'), +(-1658066,'Take cover behind me! Quickly!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17037,1,0,0,'Sylvanas SAY_SYLVANAS_OUTRO_3'), +(-1658067,'The Frost Queen is gone. We must keep moving - our objective is near.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16615,0,0,0,'Jaina SAY_JAYNA_OUTRO_4'), +(-1658068,'I thought he''d never shut up. At last, Sindragosa silenced that long-winded fool. To the Halls of Reflection, champions! Our objective is near... I can sense it.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17036,0,0,0,'Sylvanas SAY_SYLVANAS_OUTRO_4'), +(-1658069,'I... I could not save them... Damn you, Arthas! DAMN YOU!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16616,0,0,0,'Jaina SAY_JAYNA_OUTRO_5'); -- Forge of souls DELETE FROM `script_texts` WHERE `entry` <= -1632000 and `entry` >= -1632999; -INSERT INTO `script_texts` (`npc_entry`,`entry`,`content_default`,`content_loc1`,`content_loc2`,`content_loc3`,`content_loc4`,`content_loc5`,`content_loc6`,`content_loc7`,`content_loc8`,`sound`,`type`,`language`,`emote`,`comment`) VALUES +INSERT INTO `script_texts` (`entry`,`content_default`,`content_loc1`,`content_loc2`,`content_loc3`,`content_loc4`,`content_loc5`,`content_loc6`,`content_loc7`,`content_loc8`,`sound`,`type`,`language`,`emote`,`comment`) VALUES -- Bronjham -(36497,-1632001,'Finally...a captive audience!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16595,1,0,0,'Bronjham SAY_AGGRO'), -(36497,-1632002,'Fodder for the engine!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16596,1,0,0,'Bronjham SAY_SLAY_1'), -(36497,-1632003,'Another soul to strengthen the host!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16597,1,0,0,'Bronjham SAY_SLAY_2'), -(36497,-1632004,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16598,1,0,0,'Bronjham SAY_DEATH'), -(36497,-1632005,'The vortex of the harvested calls to you!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16599,1,0,0,'Bronjham SAY_SOUL_STORM'), -(36497,-1632006,'I will sever the soul from your body!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16600,1,0,0,'Bronjham SAY_CORRUPT_SOUL'), +(-1632001,'Finally...a captive audience!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16595,6,0,0,'Bronjham SAY_AGGRO'), +(-1632002,'Fodder for the engine!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16596,6,0,0,'Bronjham SAY_SLAY_1'), +(-1632003,'Another soul to strengthen the host!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16597,6,0,0,'Bronjham SAY_SLAY_2'), +(-1632004,'Oooooo...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16598,6,0,0,'Bronjham SAY_DEATH'), +(-1632005,'The vortex of the harvested calls to you!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16599,3,0,0,'Bronjham SAY_SOUL_STORM'), +(-1632006,'I will sever the soul from your body!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16600,6,0,0,'Bronjham SAY_CORRUPT_SOUL'), -- Devourer of Souls -(36502,-1632010,'You dare look upon the host of souls? I SHALL DEVOUR YOU WHOLE!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16884,1,0,0,'Devoureur SAY_FACE_ANGER_AGGRO'), -(36502,-1632011,'You dare look upon the host of souls? I SHALL DEVOUR YOU WHOLE!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16890,1,0,0,'Devoureur SAY_FACE_DESIRE_AGGRO'), -(36502,-1632012,'Damnation!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16885,1,0,0,'Devoureur SAY_FACE_ANGER_SLAY_1'), -(36502,-1632013,'Damnation!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16896,1,0,0,'Devoureur SAY_FACE_SORROW_SLAY_1'), -(36502,-1632014,'Damnation!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16891,1,0,0,'Devoureur SAY_FACE_DESIRE_SLAY_1'), -(36502,-1632015,'Doomed for eternity!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16886,1,0,0,'Devoureur SAY_FACE_ANGER_SLAY_2'), -(36502,-1632016,'Doomed for eternity!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16897,1,0,0,'Devoureur SAY_FACE_SORROW_SLAY_2'), -(36502,-1632017,'Doomed for eternity!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16892,1,0,0,'Devoureur SAY_FACE_DESIRE_SLAY_2'), -(36502,-1632018,'The swell of souls will not be abated! You only delay the inevitable!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16887,1,0,0,'Devoureur SAY_FACE_ANGER_DEATH'), -(36502,-1632019,'The swell of souls will not be abated! You only delay the inevitable!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16898,1,0,0,'Devoureur SAY_FACE_SORROW_DEATH'), -(36502,-1632020,'The swell of souls will not be abated! You only delay the inevitable!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16893,1,0,0,'Devoureur SAY_FACE_DESIRE_DEATH'), -(36502,-1632021,'Devourer of Souls begins to cast Mirrored Soul!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'Devoureur EMOTE_MIRRORED_SOUL'), -(36502,-1632022,'Devourer of Souls begins to Unleash Souls!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'Devoureur EMOTE_UNLEASH_SOUL'), -(36502,-1632023,'SUFFERING! ANGUISH! CHAOS! RISE AND FEED!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16888,1,0,0,'Devoureur SAY_FACE_ANGER_UNLEASH_SOUL'), -(36502,-1632024,'SUFFERING! ANGUISH! CHAOS! RISE AND FEED!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16899,1,0,0,'Devoureur SAY_FACE_SORROW_UNLEASH_SOUL'), -(36502,-1632025,'SUFFERING! ANGUISH! CHAOS! RISE AND FEED!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16894,1,0,0,'Devoureur SAY_FACE_DESIRE_UNLEASH_SOUL'), -(36502,-1632026,'Devourer of Souls begins to cast Wailing Souls!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'Devoureur EMOTE_WAILING_SOUL'), -(36502,-1632027,'Stare into the abyss, and see your end!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16889,1,0,0,'Devoureur SAY_FACE_ANGER_WAILING_SOUL'), -(36502,-1632028,'Stare into the abyss, and see your end!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16895,1,0,0,'Devoureur SAY_FACE_DESIRE_WAILING_SOUL'), -(38160,-1632029,'Excellent work, champions! We shall set up our base camp in these chambers. My mages will get the Scourge transport device working shortly. Step inside it when you''re ready for your next mission. I will meet you on the other side.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16625,1,0,0,'Jaina SAY_JAINA_OUTRO'), -(38161,-1632030,'Excellent work, champions! We shall set up our base camp in these chambers. My mages will get the Scourge transport device working shortly. Step inside when you are ready for your next mission. I will meet you on the other side.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17044,1,0,0,'Sylvanas SAY_SYLVANAS_OUTRO'), +(-1632010,'You dare look upon the host of souls? I SHALL DEVOUR YOU WHOLE!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16884,1,0,0,'Devoureur SAY_FACE_ANGER_AGGRO'), +(-1632011,'You dare look upon the host of souls? I SHALL DEVOUR YOU WHOLE!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16890,1,0,0,'Devoureur SAY_FACE_DESIRE_AGGRO'), +(-1632012,'Damnation!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16885,1,0,0,'Devoureur SAY_FACE_ANGER_SLAY_1'), +(-1632013,'Damnation!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16896,1,0,0,'Devoureur SAY_FACE_SORROW_SLAY_1'), +(-1632014,'Damnation!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16891,1,0,0,'Devoureur SAY_FACE_DESIRE_SLAY_1'), +(-1632015,'Doomed for eternity!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16886,1,0,0,'Devoureur SAY_FACE_ANGER_SLAY_2'), +(-1632016,'Doomed for eternity!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16897,1,0,0,'Devoureur SAY_FACE_SORROW_SLAY_2'), +(-1632017,'Doomed for eternity!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16892,1,0,0,'Devoureur SAY_FACE_DESIRE_SLAY_2'), +(-1632018,'The swell of souls will not be abated! You only delay the inevitable!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16887,1,0,0,'Devoureur SAY_FACE_ANGER_DEATH'), +(-1632019,'The swell of souls will not be abated! You only delay the inevitable!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16898,1,0,0,'Devoureur SAY_FACE_SORROW_DEATH'), +(-1632020,'The swell of souls will not be abated! You only delay the inevitable!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16893,1,0,0,'Devoureur SAY_FACE_DESIRE_DEATH'), +(-1632021,'Devourer of Souls begins to cast Mirrored Soul!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'Devoureur EMOTE_MIRRORED_SOUL'), +(-1632022,'Devourer of Souls begins to Unleash Souls!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'Devoureur EMOTE_UNLEASH_SOUL'), +(-1632023,'SUFFERING! ANGUISH! CHAOS! RISE AND FEED!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16888,1,0,0,'Devoureur SAY_FACE_ANGER_UNLEASH_SOUL'), +(-1632024,'SUFFERING! ANGUISH! CHAOS! RISE AND FEED!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16899,1,0,0,'Devoureur SAY_FACE_SORROW_UNLEASH_SOUL'), +(-1632025,'SUFFERING! ANGUISH! CHAOS! RISE AND FEED!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16894,1,0,0,'Devoureur SAY_FACE_DESIRE_UNLEASH_SOUL'), +(-1632026,'Devourer of Souls begins to cast Wailing Souls!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'Devoureur EMOTE_WAILING_SOUL'), +(-1632027,'Stare into the abyss, and see your end!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16889,1,0,0,'Devoureur SAY_FACE_ANGER_WAILING_SOUL'), +(-1632028,'Stare into the abyss, and see your end!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16895,1,0,0,'Devoureur SAY_FACE_DESIRE_WAILING_SOUL'), +(-1632029,'Excellent work, champions! We shall set up our base camp in these chambers. My mages will get the Scourge transport device working shortly. Step inside it when you''re ready for your next mission. I will meet you on the other side.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16625,1,0,0,'Jaina SAY_JAINA_OUTRO'), +(-1632030,'Excellent work, champions! We shall set up our base camp in these chambers. My mages will get the Scourge transport device working shortly. Step inside when you are ready for your next mission. I will meet you on the other side.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17044,1,0,0,'Sylvanas SAY_SYLVANAS_OUTRO'), -- Jaina -(37597,-1632040,'Thank the light for seeing you here safely. We have much work to do if we are to defeat the Lich King and put an end to the Scourge.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16617,0,0,0,'Jaina SAY_INTRO_1'), -(37597,-1632041,'Our allies within the Argent Crusade and the Knights of the Ebon Blade have broken through the front gate of Icecrown and are attempting to establish a foothold within the Citadel.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16618,0,0,0,'Jaina SAY_INTRO_2'), -(37597,-1632042,'Their success hinges upon what we discover in these cursed halls. Although our mission is a wrought with peril, we must persevere!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16619,0,0,0,'Jaina SAY_INTRO_3'), -(37597,-1632043,'With the attention of the Lich King drawn toward the front gate, we will be working our way through the side in search of information that will enable us to defeat the Scourge - once and for all.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16620,0,0,0,'Jaina SAY_INTRO_4'), -(37597,-1632044,'King Varian''s SI7 agents have gathered information about a private sanctum of the Lich King''s deep within a place called the Halls of Reflection.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16621,0,0,0,'Jaina SAY_INTRO_5'), -(37597,-1632045,'We will carve a path through this wretched place and find a way to enter the Halls of Reflection. I sense powerful magic hidden away within those walls... Magic that could be the key to destroy the Scourge.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16622,0,0,0,'Jaina SAY_INTRO_6'), -(37597,-1632046,'Your first mission is to destroy the machines of death within this malevolent engine of souls, and clear a path for our soldiers.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16623,0,0,0,'Jaina SAY_INTRO_7'), -(37597,-1632047,'Make haste, champions! I will prepare the troops to fall in behind you.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16624,0,0,0,'Jaina SAY_INTRO_8'), +(-1632040,'Thank the light for seeing you here safely. We have much work to do if we are to defeat the Lich King and put an end to the Scourge.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16617,0,0,0,'Jaina SAY_INTRO_1'), +(-1632041,'Our allies within the Argent Crusade and the Knights of the Ebon Blade have broken through the front gate of Icecrown and are attempting to establish a foothold within the Citadel.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16618,0,0,0,'Jaina SAY_INTRO_2'), +(-1632042,'Their success hinges upon what we discover in these cursed halls. Although our mission is a wrought with peril, we must persevere!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16619,0,0,0,'Jaina SAY_INTRO_3'), +(-1632043,'With the attention of the Lich King drawn toward the front gate, we will be working our way through the side in search of information that will enable us to defeat the Scourge - once and for all.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16620,0,0,0,'Jaina SAY_INTRO_4'), +(-1632044,'King Varian''s SI7 agents have gathered information about a private sanctum of the Lich King''s deep within a place called the Halls of Reflection.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16621,0,0,0,'Jaina SAY_INTRO_5'), +(-1632045,'We will carve a path through this wretched place and find a way to enter the Halls of Reflection. I sense powerful magic hidden away within those walls... Magic that could be the key to destroy the Scourge.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16622,0,0,0,'Jaina SAY_INTRO_6'), +(-1632046,'Your first mission is to destroy the machines of death within this malevolent engine of souls, and clear a path for our soldiers.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16623,0,0,0,'Jaina SAY_INTRO_7'), +(-1632047,'Make haste, champions! I will prepare the troops to fall in behind you.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16624,0,0,0,'Jaina SAY_INTRO_8'), -- Sylvanas -(37596,-1632050,'The Argent Crusade and the Knights of the Ebon Blade have assaulted the gates of Icecrown Citadel and are preparing for a massive attack upon the Scourge. Our missition is a bit more subtle, but equally as important.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17038,0,0,0,'Sylvanas SAY_INTRO_1'), -(37596,-1632051,'With the attention of the Lich King turned towards the front gate, we''ll be working our way through the side in search of information that will enable us to defeat the Lich King - once and for all.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17039,0,0,0,'Sylvanas SAY_INTRO_2'), -(37596,-1632052,'Our scouts have reported that the Lich King has a private chamber, outside of the Frozen Throne, deep within a place called the Halls of Reflection. That is our target, champions.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17040,0,0,0,'Sylvanas SAY_INTRO_3'), -(37596,-1632053,'We will cut a swath of destruction through this cursed place and find a way to enter the Halls of Reflection. If there is anything of value to be found here, it will be found in the Halls.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17041,0,0,0,'Sylvanas SAY_INTRO_4'), -(37596,-1632054,'Your first mission is to destroy the machines of death within this wretched engine of souls, and clear a path for our soldiers.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17042,0,0,0,'Sylvanas SAY_INTRO_5'), -(37596,-1632055,'The Dark Lady watches over you. Make haste!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17043,0,0,0,'Sylvanas SAY_INTRO_6'); +(-1632050,'The Argent Crusade and the Knights of the Ebon Blade have assaulted the gates of Icecrown Citadel and are preparing for a massive attack upon the Scourge. Our missition is a bit more subtle, but equally as important.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17038,0,0,0,'Sylvanas SAY_INTRO_1'), +(-1632051,'With the attention of the Lich King turned towards the front gate, we''ll be working our way through the side in search of information that will enable us to defeat the Lich King - once and for all.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17039,0,0,0,'Sylvanas SAY_INTRO_2'), +(-1632052,'Our scouts have reported that the Lich King has a private chamber, outside of the Frozen Throne, deep within a place called the Halls of Reflection. That is our target, champions.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17040,0,0,0,'Sylvanas SAY_INTRO_3'), +(-1632053,'We will cut a swath of destruction through this cursed place and find a way to enter the Halls of Reflection. If there is anything of value to be found here, it will be found in the Halls.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17041,0,0,0,'Sylvanas SAY_INTRO_4'), +(-1632054,'Your first mission is to destroy the machines of death within this wretched engine of souls, and clear a path for our soldiers.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17042,0,0,0,'Sylvanas SAY_INTRO_5'), +(-1632055,'The Dark Lady watches over you. Make haste!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17043,0,0,0,'Sylvanas SAY_INTRO_6'); diff --git a/addition/723_icecrown_down_spelltable_scriptdev2.sql b/addition/723_icecrown_down_spelltable_scriptdev2.sql new file mode 100644 index 000000000..2f8071a4b --- /dev/null +++ b/addition/723_icecrown_down_spelltable_scriptdev2.sql @@ -0,0 +1,14 @@ +-- Icecrown down spelltable + +-- Boss Bronjahm +DELETE FROM `boss_spell_table` WHERE `entry` = 36497; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `timerMin_N10`, `timerMin_N25`, `timerMax_N10`, `timerMax_N25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(36497, 68793, 0, 3000, 0, 8000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(36497, 36535, 0, 30000, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, NULL), +(36497, 68839, 0, 15000, 0, 25000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL), +(36497, 68858, 0, 1000, 0, 3000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(36497, 68988, 0, 1000, 0, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(36497, 68950, 0, 8000, 0, 12000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(36497, 68872, 0, 1000, 0, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(36497, 68921, 0, 360001, 0, 360001, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 12, 0, 0, 0, NULL), +(36497, 70043, 0, 2000, 0, 6000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL); diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp index 1a1c8b20f..b4cc84e2a 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp @@ -1,6 +1,30 @@ +/* Copyright (C) 2006 - 2010 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_bronjahm +SD%Complete: 10% +SDComment: by /dev/rsa +SDCategory: Icecrown - forge of souls +EndScriptData */ + #include "precompiled.h" #include "def_forge.h" -enum + +enum BossSpells { //common SPELL_BERSERK = 47008, @@ -12,7 +36,7 @@ enum SPELL_CORRUPT_SOUL = 68839, SPELL_CONSUME_SOUL = 68858, SPELL_TELEPORT = 68988, - SPELL_SOULSTORM_N = 68872, + SPELL_SOULSTORM = 68872, SPELL_SOULSTORM_2 = 68921, SPELL_FEAR = 68950, SPELL_SHADOW_BOLT = 70043, @@ -23,26 +47,44 @@ struct MANGOS_DLL_DECL boss_bronjahmAI : public ScriptedAI boss_bronjahmAI(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Regular = pCreature->GetMap()->IsRegularDifficulty(); + bsw = new BossSpellWorker(this); Reset(); } - bool Regular; ScriptedInstance *pInstance; + BossSpellWorker* bsw; + uint8 stage; void Reset() { if(pInstance) pInstance->SetData(TYPE_BRONJAHM, NOT_STARTED); + bsw->resetTimers(); + stage = 0; } void Aggro(Unit *who) { if(pInstance) pInstance->SetData(TYPE_BRONJAHM, IN_PROGRESS); + DoScriptText(-1632001,m_creature,who); + SetCombatMovement(true); } void JustDied(Unit *killer) { if(pInstance) pInstance->SetData(TYPE_BRONJAHM, DONE); + DoScriptText(-1632004,m_creature,killer); + } + + void KilledUnit(Unit* pVictim) + { + switch (urand(0,1)) { + case 0: + DoScriptText(-1632002,m_creature,pVictim); + break; + case 1: + DoScriptText(-1632003,m_creature,pVictim); + break; + }; } void UpdateAI(const uint32 diff) @@ -50,6 +92,44 @@ struct MANGOS_DLL_DECL boss_bronjahmAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + switch(stage) + { + case 0: + if (bsw->timedQuery(SPELL_CORRUPT_SOUL, diff)) + { + if (Unit* pTarget= SelectUnit(SELECT_TARGET_RANDOM, 0)) + { + if (bsw->doCast(SPELL_CORRUPT_SOUL, pTarget) == CAST_OK) + { + DoScriptText(-1632006,m_creature,pTarget); + float fPosX, fPosY, fPosZ; + pTarget->GetPosition(fPosX, fPosY, fPosZ); + bsw->doSummon(NPC_SOUL_FRAGMENT,fPosX, fPosY, fPosZ); + } + } + } + break; + case 1: + if (bsw->timedCast(SPELL_TELEPORT, diff) == CAST_OK) stage = 2; + break; + case 2: + if (bsw->timedCast(SPELL_SOULSTORM, diff) == CAST_OK) { + DoScriptText(-1632005,m_creature); + SetCombatMovement(false); + stage = 3; + } + break; + case 3: + bsw->timedCast(SPELL_FEAR, diff); + break; + } + + bsw->timedCast(SPELL_SHADOW_BOLT, diff); + + bsw->timedCast(SPELL_MAGIC_BANE, diff); + + if (m_creature->GetHealthPercent() <= 30.0f && stage == 0) stage = 1; + DoMeleeAttackIfReady(); } }; @@ -63,10 +143,17 @@ struct MANGOS_DLL_DECL mob_soul_fragmentAI : public ScriptedAI } ScriptedInstance *m_pInstance; + Creature* pBoss; + uint32 m_uiRangeCheck_Timer; void Reset() { m_uiRangeCheck_Timer = 1000; + if (!m_pInstance) return; + pBoss = (Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(NPC_BRONJAHM)); + m_creature->SetSpeedRate(MOVE_RUN, 0.2f); + m_creature->GetMotionMaster()->MoveChase(pBoss); + m_creature->SetRespawnDelay(DAY); } void AttackStart(Unit* pWho) @@ -76,29 +163,21 @@ struct MANGOS_DLL_DECL mob_soul_fragmentAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { + if (!m_pInstance || m_pInstance->GetData(TYPE_BRONJAHM) != IN_PROGRESS ) m_creature->ForcedDespawn(); + if (m_uiRangeCheck_Timer < uiDiff) { - if (m_pInstance) + if ( m_creature->GetDistance2d(pBoss) <= 2.0f) { - if (Creature* pBronjahm = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(NPC_BRONJAHM)))) - { - float fDistance = m_creature->GetDistance2d(pBronjahm); - if (fDistance <= 2) - { -// ((boss_bronjahmAI*)pBronjahm->AI())->SoulFragmentHit(); - m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - } - } + pBoss->CastSpell(pBoss, SPELL_CONSUME_SOUL, false); + m_creature->ForcedDespawn(); } + m_uiRangeCheck_Timer = 1000; } else m_uiRangeCheck_Timer -= uiDiff; } - void JustDied(Unit* pKiller) - { -// DoCast(m_creature, SPELL_SPLASH); - } }; CreatureAI* GetAI_boss_bronjahm(Creature* pCreature) diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/def_forge.h b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/def_forge.h index 906c66512..cb30444ec 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/def_forge.h +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/def_forge.h @@ -1,6 +1,7 @@ #ifndef DEF_ICECROWN_FORGE_H #define DEF_ICECROWN_FORGE_H +#include "sc_boss_spell_worker.h" enum { From 9ad3e40d696bdeda3348d260ccbbb7a9270e1df2 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 29 Apr 2010 17:23:42 +0400 Subject: [PATCH 269/405] Soul fragment fix --- addition/723_icecrown_down_mangos.sql | 4 ++-- .../frozen_halls/forge_of_souls/boss_bronjahm.cpp | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/addition/723_icecrown_down_mangos.sql b/addition/723_icecrown_down_mangos.sql index 34ba69997..c33724870 100644 --- a/addition/723_icecrown_down_mangos.sql +++ b/addition/723_icecrown_down_mangos.sql @@ -1,7 +1,7 @@ UPDATE `instance_template` SET `script`='instance_forge_of_souls' WHERE `map`=632; UPDATE `creature_template` SET `ScriptName`='boss_bronjahm', `AIName` ='' WHERE `entry`=36497; -UPDATE `creature_template` SET `ScriptName`='mob_soul_fragment', `AIName` ='' WHERE `entry`=36535; - +UPDATE `creature_template` SET `ScriptName`='mob_soul_fragment', `modelid_A`= 10771, `modelid_H`= 10771, `AIName` ='' WHERE `entry`=36535; +-- original modelid - 30233 -- UPDATE `creature_template` SET `ScriptName`='boss_devourer', `AIName` ='' WHERE `entry`=33113; -- UPDATE `instance_template` SET `script`='instance_pit_of_saron' WHERE `map`=658; diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp index b4cc84e2a..f9a8f78a4 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp @@ -72,6 +72,7 @@ struct MANGOS_DLL_DECL boss_bronjahmAI : public ScriptedAI void JustDied(Unit *killer) { if(pInstance) pInstance->SetData(TYPE_BRONJAHM, DONE); + bsw->doRemove(SPELL_SOULSTORM); DoScriptText(-1632004,m_creature,killer); } @@ -167,11 +168,11 @@ struct MANGOS_DLL_DECL mob_soul_fragmentAI : public ScriptedAI if (m_uiRangeCheck_Timer < uiDiff) { - if ( m_creature->GetDistance2d(pBoss) <= 2.0f) + if (pBoss->IsWithinDistInMap(m_creature, 2.0f) { pBoss->CastSpell(pBoss, SPELL_CONSUME_SOUL, false); m_creature->ForcedDespawn(); - } + } else m_creature->GetMotionMaster()->MoveChase(pBoss); m_uiRangeCheck_Timer = 1000; } From 24120b5440c58c6d82176802a179aeddcc93b68b Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 29 Apr 2010 17:39:16 +0400 Subject: [PATCH 270/405] Remove double requiem :) --- .../trial_of_the_crusader/boss_northrend_beasts.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index b88f3f83d..29b4c7aa1 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -251,7 +251,7 @@ struct MANGOS_DLL_DECL boss_acidmawAI : public ScriptedAI void JustReachedHome() { if (!m_pInstance) return; - if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) != FAIL) + if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == IN_PROGRESS) m_pInstance->SetData(TYPE_NORTHREND_BEASTS, FAIL); m_creature->ForcedDespawn(); } @@ -361,7 +361,7 @@ struct MANGOS_DLL_DECL boss_dreadscaleAI : public ScriptedAI void JustReachedHome() { if (!m_pInstance) return; - if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) != FAIL) + if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == IN_PROGRESS) m_pInstance->SetData(TYPE_NORTHREND_BEASTS, FAIL); m_creature->ForcedDespawn(); } From 7aaedbec1a0eff9f39cb83b215f5acde4ce3432b Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 29 Apr 2010 17:53:55 +0400 Subject: [PATCH 271/405] Deathwhisper spawn change --- addition/721_icecrown_spelltable_scriptdev2.sql | 4 ++-- .../frozen_halls/forge_of_souls/boss_bronjahm.cpp | 2 +- .../icecrown_citadel/boss_lady_deathwhisper.cpp | 7 +++++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/addition/721_icecrown_spelltable_scriptdev2.sql b/addition/721_icecrown_spelltable_scriptdev2.sql index 2caba94d1..03cb7adb8 100644 --- a/addition/721_icecrown_spelltable_scriptdev2.sql +++ b/addition/721_icecrown_spelltable_scriptdev2.sql @@ -39,8 +39,8 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ (36855, 71494, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 1, 0, 0); -- summons INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMax_N10`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType` ) VALUES -(36855, 37890, 45000, 45000, 1, 1, 2, 2, 75, 100, 0, 9), -(36855, 37949, 45000, 45000, 1, 1, 2, 2, 75, 100, 0, 9), +(36855, 37890, 45000, 75000, 1, 1, 2, 2, 75, 100, 0, 11), +(36855, 37949, 45000, 75000, 1, 1, 2, 2, 75, 100, 0, 11), (36855, 38010, 45000, 45000, 1, 1, 2, 2, 75, 100, 0, 9), (36855, 38222, 8000, 15000, 1, 1, 1, 1, 75, 100, 0, 9), (36855, 38009, 45000, 45000, 1, 1, 2, 2, 75, 100, 0, 9); diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp index f9a8f78a4..2e7e4e24c 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp @@ -168,7 +168,7 @@ struct MANGOS_DLL_DECL mob_soul_fragmentAI : public ScriptedAI if (m_uiRangeCheck_Timer < uiDiff) { - if (pBoss->IsWithinDistInMap(m_creature, 2.0f) + if (pBoss->IsWithinDistInMap(m_creature, 2.0f)) { pBoss->CastSpell(pBoss, SPELL_CONSUME_SOUL, false); m_creature->ForcedDespawn(); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp index e75de42ae..027b13a73 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp @@ -144,17 +144,20 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI void CallGuard(uint8 place) { + if (place < 2) + { if (Unit* pTemp = bsw->doSummon(urand(0,1) ? NPC_FANATIC : NPC_ADHERENT, SpawnLoc[3*place+1].x, SpawnLoc[3*place+1].y, SpawnLoc[3*place+1].z)) if (Unit* pTarget= SelectUnit(SELECT_TARGET_RANDOM, 0) ) { pTemp->AddThreat(pTarget, 100.0f); pTemp->GetMotionMaster()->MoveChase(pTarget); }; - if (Unit* pTemp = bsw->doSummon(urand(0,1) ? NPC_FANATIC : NPC_ADHERENT, SpawnLoc[3*place+2].x, SpawnLoc[3*place+2].y, SpawnLoc[3*place+2].z)) + if (Unit* pTemp = bsw->doSummon(urand(0,1) ? NPC_FANATIC : NPC_ADHERENT, SpawnLoc[3*place+3].x, SpawnLoc[3*place+3].y, SpawnLoc[3*place+3].z)) if (Unit* pTarget= SelectUnit(SELECT_TARGET_RANDOM, 0) ) { pTemp->AddThreat(pTarget, 100.0f); pTemp->GetMotionMaster()->MoveChase(pTarget); }; - if (Unit* pTemp = bsw->doSummon(urand(0,1) ? NPC_FANATIC : NPC_ADHERENT, SpawnLoc[3*place+3].x, SpawnLoc[3*place+3].y, SpawnLoc[3*place+3].z)) + } + if (Unit* pTemp = bsw->doSummon(urand(0,1) ? NPC_FANATIC : NPC_ADHERENT, SpawnLoc[3*place+2].x, SpawnLoc[3*place+2].y, SpawnLoc[3*place+2].z)) if (Unit* pTarget= SelectUnit(SELECT_TARGET_RANDOM, 0) ) { pTemp->AddThreat(pTarget, 100.0f); pTemp->GetMotionMaster()->MoveChase(pTarget); From c7ec8c6182829d37c85f475629914e46a4a3fe47 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sat, 1 May 2010 00:01:32 +0400 Subject: [PATCH 272/405] Objects added --- .../icecrown_citadel/def_spire.h | 11 +++++++++++ .../instance_icecrown_spire.cpp | 18 ++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h index d41e94224..4e31c8616 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h @@ -36,11 +36,17 @@ enum NPC_KELESETH = 37972, NPC_LANATHEL = 37955, NPC_VALITHRIA = 36789, + NPC_VALITHRIA_H = 38589, NPC_SINDRAGOSA = 36853, NPC_LICH_KING = 36597, NPC_MURADIN = 36948, + NPC_RIMEFANG = 37533, + NPC_SPINESTALKER = 37534, + + NPC_RISEN_ARCHMAGE = 37868, + GO_TELEPORT_GOSSIP_MESSAGE = 99323, TELEPORT_GOSSIP_MESSAGE = 99322, @@ -91,6 +97,11 @@ enum GO_GUNSHIP_ARMORY_H_10H = 202179, // GO_GUNSHIP_ARMORY_H_25H = 202180, // + GO_DREAMWALKER_CACHE_10 = 201959, // + GO_DREAMWALKER_CACHE_25 = 202338, // + GO_DREAMWALKER_CACHE_10_H = 202339, // + GO_DREAMWALKER_CACHE_25_H = 202340, // + GO_PLAGUE_SIGIL = 202182, GO_FROSTWING_SIGIL = 202181, GO_BLOODWING_SIGIL = 202183, diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp index 38c188541..4fafaf9dd 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp @@ -68,6 +68,7 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance uint64 m_uiCounsilDoor2GUID; uint64 m_uiGreenDragonDoor1GUID; uint64 m_uiGreenDragonDoor2GUID; + uint64 m_uiValithriaDoor1GUID; uint64 m_uiValithriaDoor2GUID; uint64 m_uiValithriaDoor3GUID; @@ -76,6 +77,7 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance uint64 m_uiSaurfangCacheGUID; uint64 m_uiGunshipArmoryAGUID; uint64 m_uiGunshipArmoryHGUID; + uint64 m_uiValitriaCacheGUID; uint64 m_uiGunshipArmoryH_ID; uint64 m_uiGunshipArmoryA_ID; @@ -316,6 +318,22 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance if(Difficulty == RAID_DIFFICULTY_25MAN_HEROIC) m_uiGunshipArmoryHGUID = pGo->GetGUID(); break; + case GO_DREAMWALKER_CACHE_10: + if(Difficulty == RAID_DIFFICULTY_10MAN_NORMAL) + m_uiValitriaCacheGUID = pGo->GetGUID(); + break; + case GO_DREAMWALKER_CACHE_25: + if(Difficulty == RAID_DIFFICULTY_25MAN_NORMAL) + m_uiValitriaCacheGUID = pGo->GetGUID(); + break; + case GO_DREAMWALKER_CACHE_10_H: + if(Difficulty == RAID_DIFFICULTY_10MAN_HEROIC) + m_uiValitriaCacheGUID = pGo->GetGUID(); + break; + case GO_DREAMWALKER_CACHE_25_H: + if(Difficulty == RAID_DIFFICULTY_25MAN_HEROIC) + m_uiValitriaCacheGUID = pGo->GetGUID(); + break; } OpenAllDoors(); } From ba777080982f5627657764c9d8c80669637967ae Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sat, 1 May 2010 15:21:34 +0400 Subject: [PATCH 273/405] ICC part 24 - BloodWing draft is OK --- addition/721_icecrown_mangos.sql | 9 +- .../721_icecrown_spelltable_scriptdev2.sql | 41 +- .../icecrown_citadel/blood_prince_council.cpp | 383 +++++++++++++++++- .../boss_blood_queen_lanathel.cpp | 106 ++++- .../icecrown_citadel/boss_festergut.cpp | 3 +- .../boss_lady_deathwhisper.cpp | 2 +- .../icecrown_citadel/def_spire.h | 7 +- .../icecrown_citadel/icecrown_teleport.cpp | 16 + .../instance_icecrown_spire.cpp | 43 +- system/ScriptLoader.cpp | 4 + 10 files changed, 587 insertions(+), 27 deletions(-) diff --git a/addition/721_icecrown_mangos.sql b/addition/721_icecrown_mangos.sql index 37cd87f53..7ae09137a 100644 --- a/addition/721_icecrown_mangos.sql +++ b/addition/721_icecrown_mangos.sql @@ -79,18 +79,19 @@ UPDATE `gameobject_template` SET `faction` = '0', `ScriptName` = 'go_plague_sigi -- Blood wing UPDATE `gameobject_template` SET `faction` = '0', `ScriptName` = 'go_bloodwing_sigil' WHERE `gameobject_template`.`entry` IN (202181); -- Taldaram --- UPDATE `creature_template` SET `ScriptName`='boss_taldaram' WHERE `entry`= 37973; +UPDATE `creature_template` SET `ScriptName`='boss_taldaram_icc', `AIName`='' WHERE `entry`= 37973; -- Valanar --- UPDATE `creature_template` SET `ScriptName`='boss_valanar' WHERE `entry`= 37970; +UPDATE `creature_template` SET `ScriptName`='boss_valanar_icc', `AIName`='' WHERE `entry`= 37970; -- Keleseth --- UPDATE `creature_template` SET `ScriptName`='boss_keleseth' WHERE `entry`= 37972; +UPDATE `creature_template` SET `ScriptName`='boss_keleseth_icc', `AIName`='' WHERE `entry`= 37972; + UPDATE `gameobject_template` SET `faction` = '114',`data0` = '0' WHERE `gameobject_template`.`entry` IN (201920,201377,201378); UPDATE `gameobject` SET `state` = '1' WHERE `id` IN (201920,201377,201378); UPDATE `gameobject_template` SET `faction` = '114',`data0` = '0' WHERE `gameobject_template`.`entry` IN (201376); UPDATE `gameobject` SET `state` = '0' WHERE `id` IN (201376); -- Qween Lana'thel --- UPDATE `creature_template` SET `ScriptName`='boss_lanathel' WHERE `entry`= 37955; +UPDATE `creature_template` SET `ScriptName`='boss_blood_queen_lanathel', `AIName`='' WHERE `entry`= 37955; -- Valithria dreamwalker -- UPDATE `creature_template` SET `ScriptName`='boss_valithria' WHERE `entry`= 36789; diff --git a/addition/721_icecrown_spelltable_scriptdev2.sql b/addition/721_icecrown_spelltable_scriptdev2.sql index 03cb7adb8..fc0fc0458 100644 --- a/addition/721_icecrown_spelltable_scriptdev2.sql +++ b/addition/721_icecrown_spelltable_scriptdev2.sql @@ -4,11 +4,11 @@ DELETE FROM `boss_spell_table` WHERE `entry` = 36612; INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES (36612, 71021, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 3, 0, 0), -(36612, 69138, 0, 71580, 0, 8000, 0, 0, 0, 12000, 0, 0, 0, 0, 0, 0, 1, 0, 0), -(36612, 69146, 0, 70824, 0, 15000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 1, 0, 0), -(36612, 69057, 0, 70824, 0, 17000, 0, 0, 0, 27000, 0, 0, 0, 0, 0, 0, 6, 0, 0), +(36612, 69138, 0, 0, 0, 8000, 0, 0, 0, 12000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36612, 69146, 0, 0, 0, 15000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36612, 69057, 0, 0, 0, 17000, 0, 0, 0, 27000, 0, 0, 0, 0, 0, 0, 6, 0, 0), (36612, 69076, 0, 0, 0, 3600001, 0, 0, 0, 3600001, 0, 0, 0, 0, 0, 0, 1, 0, 0), -(36612, 69075, 0, 70835, 70836, 2000, 0, 0, 0, 2000, 0, 0, 0, 5, 0, 0, 12, 0, 0), +(36612, 69075, 0, 0, 0, 2000, 0, 0, 0, 2000, 0, 0, 0, 5, 0, 0, 12, 0, 0), (36612, 47008, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 0, 0, 0, 1, 0, 0); -- summons INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMax_N10`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType` ) VALUES @@ -170,15 +170,48 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ -- Taldaram DELETE FROM `boss_spell_table` WHERE `entry` = 37973; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(37973, 71807, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(37973, 71718, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(37973, 71393, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(37973, 72040, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(37973, 71708, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0); -- Valanar DELETE FROM `boss_spell_table` WHERE `entry` = 37970; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(37970, 72053, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(37970, 38459, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 11, 0, 0), +(37970, 72052, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(37970, 72037, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(37970, 38422, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 11, 0, 0), +(37970, 71944, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(37970, 72039, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0); -- Keleseth DELETE FROM `boss_spell_table` WHERE `entry` = 37972; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(37972, 71405, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(37972, 71815, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(37972, 71943, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(37972, 71822, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(37970, 38369, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 11, 0, 0); -- Lanathel DELETE FROM `boss_spell_table` WHERE `entry` = 37955; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(37955, 72981, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(37955, 71623, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(37955, 70821, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(37955, 71510, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(37955, 71726, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(37955, 70867, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(37955, 70923, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(37955, 71340, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(37955, 71265, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(37955, 71446, 0, 0, 0, 5000, 0, 0, 0, 8000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(37955, 71772, 0, 0, 0, 120000, 0, 0, 0, 150000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(37955, 71952, 0, 0, 0, 5000, 0, 0, 0, 8000, 0, 0, 0, 0, 0, 0, 1, 0, 0); -- Valithria DELETE FROM `boss_spell_table` WHERE `entry` = 36789; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp index 3b3ec10c5..f3cb013b2 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp @@ -16,10 +16,389 @@ /* ScriptData SDName: blood_prince_council -SD%Complete: 0% +SD%Complete: 3% SDComment: by /dev/rsa SDCategory: Icecrown Citadel EndScriptData */ #include "precompiled.h" -#include "def_spire.h" \ No newline at end of file +#include "def_spire.h" + +enum BossSpells +{ + //Darkfallen Orb + SPELL_INVOCATION_OF_BLOOD = 70952, + + //Valanar + SPELL_KINETIC_BOMB = 72053, + NPC_KINETIC_BOMB = 38458, + SPELL_KINETIC_BOMB_EXPLODE = 72052, + SPELL_SHOCK_VORTEX = 72037, + NPC_SHOCK_VORTEX = 38422, + SPELL_SHOCK_VORTEX_DAMAGE = 71944, + SPELL_SHOCK_VORTEX_2 = 72039, + + //Taldaram + SPELL_GLITTERING_SPARKS = 71807, + SPELL_CONJURE_FLAME = 71718, + SPELL_FLAMES = 71393, + SPELL_CONJURE_FLAME_2 = 72040, + SPELL_FLAMES_2 = 71708, + + //Keleseth + SPELL_SHADOW_LANCE = 71405, + SPELL_SHADOW_LANCE_2 = 71815, + SPELL_SHADOW_RESONANCE = 71943, + SPELL_SHADOW_RESONANCE_DAMAGE = 71822, + NPC_DARK_NUCLEUS = 38369, + +}; + +struct MANGOS_DLL_DECL boss_valanar_iccAI : public ScriptedAI +{ + boss_valanar_iccAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); + Reset(); + } + + ScriptedInstance* m_pInstance; + uint8 stage; + BossSpellWorker* bsw; + Creature* pBrother1; + Creature* pBrother2; + + + void Reset() { + if(!m_pInstance) return; + m_pInstance->SetData(DATA_BLOOD_COUNCIL_HEALTH, m_creature->GetMaxHealth()*3); + stage = 0; + } + + void JustReachedHome() + { + if (!m_pInstance) return; + m_pInstance->SetData(TYPE_BLOOD_COUNCIL, FAIL); + m_pInstance->SetData(DATA_BLOOD_COUNCIL_HEALTH, m_creature->GetMaxHealth()*3); + } + + void JustDied(Unit* pKiller) + { + if (!m_pInstance) return; + if (pBrother1 && pBrother2 && !pBrother1->isAlive() && !pBrother2->isAlive()) + { + m_pInstance->SetData(TYPE_BLOOD_COUNCIL, DONE); + m_creature->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + pBrother1->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + pBrother2->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + } + else m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + } + + void KilledUnit(Unit* pVictim) + { + if (!m_pInstance) return; + } + + void Aggro(Unit* pWho) + { + if (!m_pInstance) return; + pBrother1 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_TALDARAM)); + pBrother2 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_KELESETH)); + if (pBrother1 && !pBrother1->isAlive()) pBrother1->Respawn(); + if (pBrother2 && !pBrother2->isAlive()) pBrother2->Respawn(); + if (pBrother1) pBrother1->SetInCombatWithZone(); + if (pBrother2) pBrother2->SetInCombatWithZone(); + + m_pInstance->SetData(TYPE_BLOOD_COUNCIL, IN_PROGRESS); + m_pInstance->SetData(DATA_BLOOD_COUNCIL_HEALTH, m_creature->GetMaxHealth()*3); + } + + void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + { + if (!m_pInstance) return; + if (!m_creature || !m_creature->isAlive()) + return; + + if(pDoneBy->GetGUID() == m_creature->GetGUID()) return; + + m_pInstance->SetData(DATA_BLOOD_COUNCIL_HEALTH, m_creature->GetHealth() >= uiDamage ? m_pInstance->GetData(DATA_BLOOD_COUNCIL_HEALTH) - uiDamage : 0); + + uiDamage /=3; + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_pInstance) return; + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_creature->GetHealth() > m_pInstance->GetData(DATA_BLOOD_COUNCIL_HEALTH)/3 && + m_pInstance->GetData(DATA_BLOOD_COUNCIL_HEALTH) != 0) + m_creature->SetHealth(m_pInstance->GetData(DATA_BLOOD_COUNCIL_HEALTH)/3); + + switch (stage) + { + case 0: + break; + case 1: + break; + case 2: + break; + default: + break; + } + + bsw->timedCast(SPELL_KINETIC_BOMB, uiDiff); + + bsw->timedCast(SPELL_SHOCK_VORTEX, uiDiff); + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_valanar_icc(Creature* pCreature) +{ + return new boss_valanar_iccAI(pCreature); +} + +struct MANGOS_DLL_DECL boss_taldaram_iccAI : public ScriptedAI +{ + boss_taldaram_iccAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); + Reset(); + } + + ScriptedInstance* m_pInstance; + uint8 stage; + BossSpellWorker* bsw; + Creature* pBrother1; + Creature* pBrother2; + + + void Reset() { + if(!m_pInstance) return; + m_pInstance->SetData(DATA_BLOOD_COUNCIL_HEALTH, m_creature->GetMaxHealth()*3); + stage = 0; + } + + void JustReachedHome() + { + if (!m_pInstance) return; + m_pInstance->SetData(TYPE_BLOOD_COUNCIL, FAIL); + m_pInstance->SetData(DATA_BLOOD_COUNCIL_HEALTH, m_creature->GetMaxHealth()*3); + } + + void JustDied(Unit* pKiller) + { + if (!m_pInstance) return; + if (pBrother1 && pBrother2 && !pBrother1->isAlive() && !pBrother2->isAlive()) + { + m_pInstance->SetData(TYPE_BLOOD_COUNCIL, DONE); + m_creature->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + pBrother1->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + pBrother2->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + } + else m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + } + + void KilledUnit(Unit* pVictim) + { + if (!m_pInstance) return; + } + + void Aggro(Unit* pWho) + { + if (!m_pInstance) return; + pBrother1 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_VALANAR)); + pBrother2 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_KELESETH)); + if (pBrother1 && !pBrother1->isAlive()) pBrother1->Respawn(); + if (pBrother2 && !pBrother2->isAlive()) pBrother2->Respawn(); + if (pBrother1) pBrother1->SetInCombatWithZone(); + if (pBrother2) pBrother2->SetInCombatWithZone(); + + m_pInstance->SetData(TYPE_BLOOD_COUNCIL, IN_PROGRESS); + m_pInstance->SetData(DATA_BLOOD_COUNCIL_HEALTH, m_creature->GetMaxHealth()*3); + } + + void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + { + if (!m_pInstance) return; + if (!m_creature || !m_creature->isAlive()) + return; + + if(pDoneBy->GetGUID() == m_creature->GetGUID()) return; + + m_pInstance->SetData(DATA_BLOOD_COUNCIL_HEALTH, m_creature->GetHealth() >= uiDamage ? m_pInstance->GetData(DATA_BLOOD_COUNCIL_HEALTH) - uiDamage : 0); + + uiDamage /=3; + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_pInstance) return; + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_creature->GetHealth() > m_pInstance->GetData(DATA_BLOOD_COUNCIL_HEALTH)/3 && + m_pInstance->GetData(DATA_BLOOD_COUNCIL_HEALTH) != 0) + m_creature->SetHealth(m_pInstance->GetData(DATA_BLOOD_COUNCIL_HEALTH)/3); + + switch (stage) + { + case 0: + break; + case 1: + break; + case 2: + break; + default: + break; + } + + bsw->timedCast(SPELL_GLITTERING_SPARKS, uiDiff); + + bsw->timedCast(SPELL_CONJURE_FLAME, uiDiff); + + bsw->timedCast(SPELL_FLAMES, uiDiff); + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_taldaram_icc(Creature* pCreature) +{ + return new boss_taldaram_iccAI(pCreature); +} + +struct MANGOS_DLL_DECL boss_keleseth_iccAI : public ScriptedAI +{ + boss_keleseth_iccAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); + Reset(); + } + + ScriptedInstance* m_pInstance; + uint8 stage; + BossSpellWorker* bsw; + Creature* pBrother1; + Creature* pBrother2; + + void Reset() { + if(!m_pInstance) return; + m_pInstance->SetData(DATA_BLOOD_COUNCIL_HEALTH, m_creature->GetMaxHealth()*3); + stage = 0; + } + + void JustReachedHome() + { + if (!m_pInstance) return; + m_pInstance->SetData(TYPE_BLOOD_COUNCIL, FAIL); + m_pInstance->SetData(DATA_BLOOD_COUNCIL_HEALTH, m_creature->GetMaxHealth()*3); + } + + void JustDied(Unit* pKiller) + { + if (!m_pInstance) return; + if (pBrother1 && pBrother2 && !pBrother1->isAlive() && !pBrother2->isAlive()) + { + m_pInstance->SetData(TYPE_BLOOD_COUNCIL, DONE); + m_creature->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + pBrother1->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + pBrother2->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + } + else m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + } + + void KilledUnit(Unit* pVictim) + { + if (!m_pInstance) return; + } + + void Aggro(Unit* pWho) + { + if (!m_pInstance) return; + pBrother1 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_TALDARAM)); + pBrother2 = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_VALANAR)); + if (pBrother1 && !pBrother1->isAlive()) pBrother1->Respawn(); + if (pBrother2 && !pBrother2->isAlive()) pBrother2->Respawn(); + if (pBrother1) pBrother1->SetInCombatWithZone(); + if (pBrother2) pBrother2->SetInCombatWithZone(); + + m_pInstance->SetData(TYPE_BLOOD_COUNCIL, IN_PROGRESS); + m_pInstance->SetData(DATA_BLOOD_COUNCIL_HEALTH, m_creature->GetMaxHealth()*3); + } + + void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + { + if (!m_pInstance) return; + if (!m_creature || !m_creature->isAlive()) + return; + + if(pDoneBy->GetGUID() == m_creature->GetGUID()) return; + + m_pInstance->SetData(DATA_BLOOD_COUNCIL_HEALTH, m_creature->GetHealth() >= uiDamage ? m_pInstance->GetData(DATA_BLOOD_COUNCIL_HEALTH) - uiDamage : 0); + + uiDamage /=3; + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_pInstance) return; + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_creature->GetHealth() > m_pInstance->GetData(DATA_BLOOD_COUNCIL_HEALTH)/3 && + m_pInstance->GetData(DATA_BLOOD_COUNCIL_HEALTH) != 0) + m_creature->SetHealth(m_pInstance->GetData(DATA_BLOOD_COUNCIL_HEALTH)/3); + + switch (stage) + { + case 0: + break; + case 1: + break; + case 2: + break; + default: + break; + } + + bsw->timedCast(SPELL_SHADOW_LANCE, uiDiff); + + bsw->timedCast(SPELL_SHADOW_RESONANCE, uiDiff); + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_keleseth_icc(Creature* pCreature) +{ + return new boss_keleseth_iccAI(pCreature); +} + +void AddSC_blood_prince_council() +{ + Script* newscript; + + newscript = new Script; + newscript->Name = "boss_taldaram_icc"; + newscript->GetAI = &GetAI_boss_taldaram_icc; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_keleseth_icc"; + newscript->GetAI = &GetAI_boss_keleseth_icc; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_valanar_icc"; + newscript->GetAI = &GetAI_boss_valanar_icc; + newscript->RegisterSelf(); + +} diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp index 8a71d4575..ed31a204c 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp @@ -16,9 +16,111 @@ /* ScriptData SDName: boss_blood_queen_lanathel -SD%Complete: 0% -SDComment: +SD%Complete: 1% +SDComment: by /dev/rsa SDCategory: Icecrown Citadel EndScriptData */ #include "precompiled.h" +#include "def_spire.h" + +enum BossSpells +{ + SPELL_SHROUD_OF_SORROW = 72981, + SPELL_DELRIOUS_SLASH = 71623, + SPELL_BLOOD_MIRROR_1 = 70821, + SPELL_BLOOD_MIRROR_2 = 71510, + SPELL_VAMPIRIC_BITE = 71726, + SPELL_ESSENCE_OF_BLOOD_QWEEN = 70867, + SPELL_FRENZIED_BLOODTHIRST = 70877, + SPELL_UNCONTROLLABLE_FRENZY = 70923, + SPELL_PACT_OF_DARKFALLEN = 71340, + SPELL_SWARMING_SHADOWS = 71265, + SPELL_TWILIGHT_BLOODBOLT = 71446, + SPELL_BLOODBOLT_WHIRL = 71772, + SPELL_PRESENCE_OF_DARKFALLEN = 71952, + +}; + +struct MANGOS_DLL_DECL boss_blood_queen_lanathelAI : public ScriptedAI +{ + boss_blood_queen_lanathelAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); + Reset(); + } + + ScriptedInstance *pInstance; + BossSpellWorker* bsw; + uint8 stage; + + void Reset() + { + if(!pInstance) return; + pInstance->SetData(TYPE_LANATHEL, NOT_STARTED); + stage = 0; + } + + void JustReachedHome() + { + if (pInstance) pInstance->SetData(TYPE_LANATHEL, FAIL); + } + + void Aggro(Unit *who) + { + if(pInstance) pInstance->SetData(TYPE_LANATHEL, IN_PROGRESS); + bsw->doCast(SPELL_SHROUD_OF_SORROW); + } + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_LANATHEL, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + switch(stage) + { + case 0: + bsw->timedCast(SPELL_VAMPIRIC_BITE,diff); + if (bsw->timedQuery(SPELL_BLOODBOLT_WHIRL,diff)) stage = 1; + break; + case 1: + bsw->doCast(SPELL_BLOODBOLT_WHIRL); + stage = 0; + break; + default: + break; + } + + bsw->timedCast(SPELL_DELRIOUS_SLASH, diff); + + bsw->timedCast(SPELL_TWILIGHT_BLOODBOLT, diff); + + bsw->timedCast(SPELL_PACT_OF_DARKFALLEN, diff); + + bsw->timedCast(SPELL_SWARMING_SHADOWS, diff); + + DoMeleeAttackIfReady(); + } +}; + + +CreatureAI* GetAI_boss_blood_queen_lanathel(Creature* pCreature) +{ + return new boss_blood_queen_lanathelAI(pCreature); +} + + +void AddSC_boss_blood_queen_lanathel() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_blood_queen_lanathel"; + newscript->GetAI = &GetAI_boss_blood_queen_lanathel; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp index 53f7186e5..1c7173f51 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp @@ -16,13 +16,14 @@ /* ScriptData SDName: boss_festergut -SD%Complete: 1% +SD%Complete: 5% SDComment: by /dev/rsa SDCategory: Icecrown Citadel EndScriptData */ #include "precompiled.h" #include "def_spire.h" + enum BossSpells { SPELL_GASEOUS_BLIGHT_0 = 70138, diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp index 027b13a73..11da51129 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp @@ -23,7 +23,7 @@ EndScriptData */ #include "precompiled.h" #include "def_spire.h" -enum +enum BossSpells { //common SPELL_BERSERK = 47008, diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h index 4e31c8616..d1b8d820e 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h @@ -5,8 +5,6 @@ enum { - TYPE_DIFFICULTY = 1001, - MAP_NUM = 631, TYPE_TELEPORT = 0, TYPE_MARROWGAR = 1, @@ -71,6 +69,7 @@ enum GO_COUNCIL_DOOR_1 = 201377, //72533 GO_COUNCIL_DOOR_2 = 201378, //72534 + GO_FROSTWING_DOOR = 201919, GO_GREEN_DRAGON_DOOR_1 = 201375, //1202 GO_GREEN_DRAGON_DOOR_2 = 201374, //1200 GO_VALITHRIA_DOOR_1 = 201380, //1618 @@ -105,6 +104,10 @@ enum GO_PLAGUE_SIGIL = 202182, GO_FROSTWING_SIGIL = 202181, GO_BLOODWING_SIGIL = 202183, + + TYPE_DIFFICULTY = 1001, + MAP_NUM = 631, + DATA_BLOOD_COUNCIL_HEALTH = 1002, }; #endif diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp index cadf2dbb5..ccbb5fbda 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp @@ -105,6 +105,17 @@ bool GOGossipHello_go_bloodwing_sigil(Player *player, GameObject* pGo) return true; } +bool GOGossipHello_go_frostwing_sigil(Player *player, GameObject* pGo) +{ + ScriptedInstance *pInstance = (ScriptedInstance *) pGo->GetInstanceData(); + if(!pInstance) return false; + + if (pInstance->GetData(TYPE_LANATHEL) == DONE) + pInstance->SetData(TYPE_LANATHEL, DONE); + + return true; +} + void AddSC_icecrown_teleporter() { @@ -125,4 +136,9 @@ void AddSC_icecrown_teleporter() newscript->Name = "go_bloodwing_sigil"; newscript->pGOGossipHello = &GOGossipHello_go_bloodwing_sigil; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "go_frostwing_sigil"; + newscript->pGOGossipHello = &GOGossipHello_go_frostwing_sigil; + newscript->RegisterSelf(); } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp index 4fafaf9dd..e5f07b2bf 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp @@ -68,6 +68,7 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance uint64 m_uiCounsilDoor2GUID; uint64 m_uiGreenDragonDoor1GUID; uint64 m_uiGreenDragonDoor2GUID; + uint64 m_uiFrostwingDoorGUID; uint64 m_uiValithriaDoor1GUID; uint64 m_uiValithriaDoor2GUID; @@ -82,6 +83,8 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance uint64 m_uiGunshipArmoryH_ID; uint64 m_uiGunshipArmoryA_ID; + uint32 m_uiDataCouncilHealth; + void OpenDoor(uint64 guid) { if(!guid) return; @@ -99,13 +102,18 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance void OpenAllDoors() { if (m_auiEncounter[1] == DONE) { - OpenDoor(m_uiIcewall1GUID); - OpenDoor(m_uiIcewall2GUID); - } - if (m_auiEncounter[6] == DONE) OpenDoor(m_uiSDoorOrangeGUID); - if (m_auiEncounter[7] == DONE) OpenDoor(m_uiSDoorGreenGUID); - if (m_auiEncounter[7] == DONE && m_auiEncounter[6] == DONE) OpenDoor(m_uiSDoorCollisionGUID); -// if (m_auiEncounter[8] == DONE) OpenDoor(m_uiBloodwingDoorGUID); + OpenDoor(m_uiIcewall1GUID); + OpenDoor(m_uiIcewall2GUID); + } + if (m_auiEncounter[5] == DONE) OpenDoor(m_uiSDoorOrangeGUID); + if (m_auiEncounter[6] == DONE) OpenDoor(m_uiSDoorGreenGUID); + if (m_auiEncounter[6] == DONE && m_auiEncounter[5] == DONE) OpenDoor(m_uiSDoorCollisionGUID); + if (m_auiEncounter[7] == DONE) OpenDoor(m_uiBloodwingDoorGUID); + if (m_auiEncounter[8] == DONE) { + OpenDoor(m_uiCounsilDoor1GUID); + OpenDoor(m_uiCounsilDoor2GUID); + } + if (m_auiEncounter[9] == DONE) OpenDoor(m_uiFrostwingDoorGUID); } @@ -252,6 +260,9 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance case GO_COUNCIL_DOOR_2: m_uiCounsilDoor2GUID = pGo->GetGUID(); break; + case GO_FROSTWING_DOOR: + m_uiFrostwingDoorGUID = pGo->GetGUID(); + break; case GO_GREEN_DRAGON_DOOR_1: m_uiGreenDragonDoor1GUID = pGo->GetGUID(); break; @@ -348,9 +359,9 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance case TYPE_MARROWGAR: m_auiEncounter[1] = uiData; if (uiData == DONE) { - OpenDoor(m_uiIcewall1GUID); - OpenDoor(m_uiIcewall2GUID); - } + OpenDoor(m_uiIcewall1GUID); + OpenDoor(m_uiIcewall2GUID); + } break; case TYPE_DEATHWHISPER: m_auiEncounter[2] = uiData; @@ -405,13 +416,18 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance m_auiEncounter[7] = uiData; if (uiData == IN_PROGRESS) CloseDoor(m_uiScientistDoorGUID); else OpenDoor(m_uiScientistDoorGUID); -// if (uiData == DONE) OpenDoor(m_uiBloodwingDoorGUID); + if (uiData == DONE) OpenDoor(m_uiBloodwingDoorGUID); break; case TYPE_BLOOD_COUNCIL: m_auiEncounter[8] = uiData; + if (uiData == DONE) { + OpenDoor(m_uiCounsilDoor1GUID); + OpenDoor(m_uiCounsilDoor2GUID); + } break; case TYPE_LANATHEL: m_auiEncounter[9] = uiData; +// if (uiData == DONE) OpenDoor(m_uiFrostwingDoorGUID); break; case TYPE_VALITHRIA: m_auiEncounter[10] = uiData; @@ -429,6 +445,10 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance m_auiEncounter[14] = uiData; uiData = NOT_STARTED; break; + case DATA_BLOOD_COUNCIL_HEALTH: m_uiDataCouncilHealth = uiData; + uiData = NOT_STARTED; + break; + } if (uiData == DONE) @@ -472,6 +492,7 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance case TYPE_LICH_KING: return m_auiEncounter[12]; case TYPE_ICECROWN_QUESTS: return m_auiEncounter[13]; case TYPE_COUNT: return m_auiEncounter[14]; + case DATA_BLOOD_COUNCIL_HEALTH: return m_uiDataCouncilHealth; } return 0; } diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index c4a70ec12..040b6c26c 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -389,6 +389,8 @@ extern void AddSC_boss_deathbringer_saurfang(); extern void AddSC_boss_rotface(); extern void AddSC_boss_festergut(); extern void AddSC_boss_proffesor_putricide(); +extern void AddSC_blood_prince_council(); +extern void AddSC_boss_blood_queen_lanathel(); extern void AddSC_instance_forge_of_souls(); extern void AddSC_boss_devourer_of_souls(); @@ -862,6 +864,8 @@ void AddScripts() AddSC_boss_rotface(); AddSC_boss_festergut(); AddSC_boss_proffesor_putricide(); + AddSC_blood_prince_council(); + AddSC_boss_blood_queen_lanathel(); AddSC_instance_forge_of_souls(); AddSC_boss_devourer_of_souls(); From ccbc3c7fb05876d5c58e9c85a8a60ca66a50f09b Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sat, 1 May 2010 16:59:46 +0400 Subject: [PATCH 274/405] Valithria started (+small corrects to Marrowgar) --- .../721_icecrown_spelltable_scriptdev2.sql | 3 +- .../icecrown_citadel/boss_lord_marrowgar.cpp | 39 ++++++++----------- .../boss_valithria_dreamwalker.cpp | 11 ++++++ .../icecrown_citadel/def_spire.h | 2 - .../instance_icecrown_spire.cpp | 2 +- 5 files changed, 31 insertions(+), 26 deletions(-) diff --git a/addition/721_icecrown_spelltable_scriptdev2.sql b/addition/721_icecrown_spelltable_scriptdev2.sql index fc0fc0458..cbaede714 100644 --- a/addition/721_icecrown_spelltable_scriptdev2.sql +++ b/addition/721_icecrown_spelltable_scriptdev2.sql @@ -4,7 +4,8 @@ DELETE FROM `boss_spell_table` WHERE `entry` = 36612; INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES (36612, 71021, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 3, 0, 0), -(36612, 69138, 0, 0, 0, 8000, 0, 0, 0, 12000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36612, 69138, 0, 0, 0, 6000, 0, 0, 0, 12000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36612, 71580, 0, 0, 0, 6000, 0, 0, 0, 12000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36612, 69146, 0, 0, 0, 15000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36612, 69057, 0, 0, 0, 17000, 0, 0, 0, 27000, 0, 0, 0, 0, 0, 0, 6, 0, 0), (36612, 69076, 0, 0, 0, 3600001, 0, 0, 0, 3600001, 0, 0, 0, 0, 0, 0, 1, 0, 0), diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp index 130ea1b25..ed7237775 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp @@ -34,6 +34,7 @@ enum //Abilities SPELL_SABER_LASH = 71021, SPELL_CALL_COLD_FLAME = 69138, + SPELL_CALL_COLD_FLAME_1 = 71580, SPELL_COLD_FLAME = 69146, SPELL_COLD_FLAME_0 = 69145, SPELL_BONE_STRIKE = 69057, @@ -154,7 +155,11 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI bsw->timedCast(SPELL_SABER_LASH, diff); - bsw->timedCast(SPELL_CALL_COLD_FLAME, diff); + if (bsw->timedQuery(SPELL_CALL_COLD_FLAME, diff)) + { + bsw->doCast(SPELL_CALL_COLD_FLAME); + bsw->doCast(SPELL_CALL_COLD_FLAME_1); + } // if (bsw->timedQuery(NPC_COLDFLAME, diff)) // bsw->doSummon(NPC_COLDFLAME, TEMPSUMMON_TIMED_DESPAWN, 60000); @@ -231,59 +236,49 @@ struct MANGOS_DLL_DECL mob_bone_spikeAI : public ScriptedAI } ScriptedInstance *m_pInstance; - uint64 m_uiVictimGUID; + Unit* pVictim; void Reset() { SetCombatMovement(false); m_creature->SetInCombatWithZone(); + pVictim = NULL; } void Aggro(Unit* pWho) { - m_creature->SetInCombatWith(pWho); - pWho->SetInCombatWith(m_creature); - DoCast(pWho, SPELL_BONE_STRIKE_IMPALE); - m_uiVictimGUID = pWho->GetGUID(); + if (!pVictim && pWho) { + pVictim = pWho; + m_creature->SetInCombatWith(pVictim); + DoCast(pVictim, SPELL_BONE_STRIKE_IMPALE); + } } void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) { if (uiDamage > m_creature->GetHealth()) - { - if (m_uiVictimGUID) - { - if (Unit* pVictim = Unit::GetUnit((*m_creature), m_uiVictimGUID)) - pVictim->RemoveAurasDueToSpell(SPELL_BONE_STRIKE_IMPALE); - } - } + if (pVictim) pVictim->RemoveAurasDueToSpell(SPELL_BONE_STRIKE_IMPALE); } - void KilledUnit(Unit* pVictim) + void KilledUnit(Unit* _Victim) { if (pVictim) pVictim->RemoveAurasDueToSpell(SPELL_BONE_STRIKE_IMPALE); } void JustDied(Unit* Killer) { - if (Unit* pVictim = Unit::GetUnit((*m_creature), m_uiVictimGUID)) - pVictim->RemoveAurasDueToSpell(SPELL_BONE_STRIKE_IMPALE); - if (Killer) - Killer->RemoveAurasDueToSpell(SPELL_BONE_STRIKE_IMPALE); + if (pVictim) pVictim->RemoveAurasDueToSpell(SPELL_BONE_STRIKE_IMPALE); } void UpdateAI(const uint32 uiDiff) { if(m_pInstance && m_pInstance->GetData(TYPE_MARROWGAR) != IN_PROGRESS) { - if (Unit* pVictim = Unit::GetUnit((*m_creature), m_uiVictimGUID)) - pVictim->RemoveAurasDueToSpell(SPELL_BONE_STRIKE_IMPALE); + if (pVictim) pVictim->RemoveAurasDueToSpell(SPELL_BONE_STRIKE_IMPALE); m_creature->ForcedDespawn(); } - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; } }; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp index 41dacf741..4c3181a87 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp @@ -33,3 +33,14 @@ static Locations SpawnLoc[]= {4239.579102, 2566.753418, 364.868439}, // 4 Valithria Room 4 }; +enum BossSpells +{ + SPELL_NIGHTMARE_POTAL = 72482, + SPELL_EMERALD_VIGOR = 70873, + SPELL_DREAMWALKER_RAGE = 71189, +// Summons + NPC_RISEN_ARCHMAGE = 37868, + NPC_BLASING_SKELETON = 36791, + NPC_BLISTERING_ZOMBIE = 37934, + NPC_GLUTTONOUS_ABOMINATION = 37886, +}; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h index d1b8d820e..b2ec061c4 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h @@ -43,8 +43,6 @@ enum NPC_RIMEFANG = 37533, NPC_SPINESTALKER = 37534, - NPC_RISEN_ARCHMAGE = 37868, - GO_TELEPORT_GOSSIP_MESSAGE = 99323, TELEPORT_GOSSIP_MESSAGE = 99322, diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp index e5f07b2bf..6b6c94b70 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp @@ -113,7 +113,7 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance OpenDoor(m_uiCounsilDoor1GUID); OpenDoor(m_uiCounsilDoor2GUID); } - if (m_auiEncounter[9] == DONE) OpenDoor(m_uiFrostwingDoorGUID); +// if (m_auiEncounter[9] == DONE) OpenDoor(m_uiFrostwingDoorGUID); } From b3aa048c7d3ddc4ecd9cedcf8f165679f81dfc3a Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sat, 1 May 2010 18:31:04 +0400 Subject: [PATCH 275/405] Original sounds (from Razorcane and other) for ICC --- addition/721_icecrown_scriptdev2.sql | 100 +++++++++++++++++- .../icecrown_citadel/def_spire.h | 5 + 2 files changed, 103 insertions(+), 2 deletions(-) diff --git a/addition/721_icecrown_scriptdev2.sql b/addition/721_icecrown_scriptdev2.sql index 4915abbf7..c03aba573 100644 --- a/addition/721_icecrown_scriptdev2.sql +++ b/addition/721_icecrown_scriptdev2.sql @@ -1,5 +1,7 @@ -DELETE FROM `script_texts` WHERE `entry` BETWEEN -1631200 AND -1631000; +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1631600 AND -1631000; INSERT INTO `script_texts` (`entry`,`content_loc8`, `content_default`, `sound`, `type`, `language`, `emote`, `comment`) VALUES + +-- Lord Marrowgar ('-1631000','Это начало и конец, смертные. Никто не может войти в Храм!','This is the beginning AND the end, mortals. None may enter the master\'s sanctum!','16950','6','0','0','marrowgar SAY_INTRO'), ('-1631001','Проклятые несут миру смерть и разрушение!','The Scourge will wash over this world as a swarm of death and destruction!','16941','6','0','0','marrowgar SAY_AGGRO'), ('-1631002','Шторм костей!','BONE STORM!','16946','3','0','0','marrowgar SAY_BONESTORM'), @@ -10,6 +12,8 @@ INSERT INTO `script_texts` (`entry`,`content_loc8`, `content_default`, `sound`, ('-1631007','Будьте прокляты!','Languish in damnation!','16943','6','0','0','marrowgar SAY_KILL2'), ('-1631008','ЯРОСТЬ МАСТЕРА ТЕЧЕТ ЧЕРЕЗ МЕНЯ!','THE MASTER\'S RAGE COURSES THROUGH ME!','16945','3','0','0','marrowgar SAY_ENRAGE'), ('-1631009','Я вижу... Только тьму...','I see... only darkness...','16944','6','0','0','marrowgar SAY_DEATH'), + +-- Lady Deathwhisper ('-1631020','Взгляните на ваши мягкие руки! Сухожилия, мясо, кровь! Это слабость! Серьезная ошибка! Шутка создателя со своими творениями! Чем раньше вы поймете что жизнь - это дефект, тем раньше вы сможете преодолеть вашу слабость!','Fix your eyes upon your crude hands! The sinew, the soft meat, the dark blood coursing within! It is a weakness! A crippling flaw! A joke played by the creators upon their own creations! The sooner you come to accept your condition as a defect, the sooner you will find yourselves in a position to transcend it!','16878','6','0','0','deathwhisper SAY_INTRO1'), ('-1631021','Через нашего Мастера все возможно! Его сила не имеет предела, и его воля непреклонна! Те, кто против него будут истреблены! А те, кто служат, которые подчиняются полностью, беспрекословно, с беззаветной преданностью ума и души? Возвышены!','Through our master all things are possible! His power is without limit, and his will unbending! Those who oppose him will be destroyed utterly! And those who serve, who serve wholly, unquestioningly, with utter devotion of mind and soul? Elevated! To heights beyond your ken!','16879','6','0','0','deathwhisper SAY_INTRO2'), ('-1631022','Вы нашли свой путь здесь, потому что вы принадлежите к числу немногих одаренных истинным видением мира, проклятого слепотой! Вы можете видеть сквозь туман, что висит над этим миром, как саван, и понять, где истинная сила лжи!','You have found your way here, because you are among the few gifted with true vision in a world cursed with blindness! You can see through the fog that hangs over this world like a shroud and grasp where true power lies!','16880','6','0','0','deathwhisper SAY_INTRO3'), @@ -23,10 +27,102 @@ INSERT INTO `script_texts` (`entry`,`content_loc8`, `content_default`, `sound`, ('-1631030','Прими Тьму! Тьма вечна...','Embrace the darkness... Darkness eternal!','16870','6','0','0','deathwhisper SAY_KILL2'), ('-1631031','Это игра продолжается слишком долго!','This charade has gone on long enough.','16872','3','0','0','deathwhisper SAY_BERSERK'), ('-1631032','Все - части плана Мастера! Ваш конец неизбежен...','All part of the masters plan! Your end is... inevitable!','16871','6','0','0','deathwhisper SAY_DEATH'), + +-- Saurfang ('-1631100','Во имя Короля-Лича!','BY THE MIGHT OF THE LICH KING!','16694','6','0','0','saurfang SAY_AGGRO'), ('-1631101','Земля станет красной от вашей крови!','The ground runs red with your blood!','16699','6','0','0','saurfang SAY_FALLENCHAMPION'), ('-1631102','Корм, мои собаки!','Feast, my minions!','16700','3','0','0','saurfang SAY_BLOODBEASTS'), ('-1631103','Ты никто!','You are nothing!','16695','6','0','0','saurfang SAY_KILL1'), ('-1631104','Ваши души не найдут здесь избавления!','Your soul will find no redemption here!','16696','6','0','0','saurfang SAY_KILL2'), ('-1631105','Я вижу приближение смерти!','I have become... death!','16698','3','0','0','saurfang SAY_BERSERK'), -('-1631106','Я... Использован...','I... Am... Released.','16697','6','0','0','saurfang SAY_DEATH'); +('-1631106','Я... Использован...','I... Am... Released.','16697','6','0','0','saurfang SAY_DEATH'), + +-- Festergut +('-1631201','','','17123','6','0','0','Putricide Valve01'), +('-1631202','','','17124','6','0','0','Putricide Festergut Dead'), +('-1631203','','','16901','6','0','0','Festergut Aggro'), +('-1631204','','','16902','6','0','0','Festergut Slay 01'), +('-1631205','','','16903','6','0','0','Festergut Slay 02'), +('-1631206','','','16904','6','0','0','Festergut Death'), +('-1631207','','','16905','6','0','0','Festergut Berserk'), +('-1631208','','','16906','6','0','0','Festergut Explunge Blight'), +('-1631209','','','16907','6','0','0','Festergut Stinky Death '), + +-- Rotface +('-1631220','','','17126','6','0','0','Putricide Slime Flow'), +('-1631221','','','16986','6','0','0','Rotface Aggro'), +('-1631222','','','16987','6','0','0','Rotface Slay 01'), +('-1631223','','','16988','6','0','0','Rotface Slay 02'), +('-1631224','','','16989','6','0','0','Rotface Death'), +('-1631225','','','16990','6','0','0','Rotface Berserk'), +('-1631226','','','16991','6','0','0','Rotface Infection'), +('-1631227','','','16992','6','0','0','Rotface Unstable Ooze'), +('-1631228','','','16993','6','0','0','Rotface Precious played when precious dies'), +('-1631229','','','16994','6','0','0','Rotface'), + +-- Professor Putricide +('-1631230','','','17114','6','0','0','Putricide Aggro'), +('-1631231','','','17115','6','0','0','Putricide Slay 01'), +('-1631232','','','17116','6','0','0','Putricide Slay 02'), +('-1631233','','','17117','6','0','0','Putricide Death'), +('-1631234','','','17118','6','0','0','Putricide Berserk'), +('-1631235','','','17119','6','0','0','Putricide Gas Explosion'), +('-1631236','','','17120','6','0','0','Putricide Transform 01'), +('-1631237','','','17121','6','0','0','Putricide Transform 02'), +('-1631238','','','17122','6','0','0','Putricide Summon Ooze'), +('-1631239','','','17125','6','0','0','Putricide Airlock01 Before fight'), + +-- Blood Prince Council +('-1631301','','','16795','6','0','0','Lanathel Intro Princes'), +('-1631302','','','16681','6','0','0','Valanar Slay 01'), +('-1631303','','','16682','6','0','0','Valanar Slay 02'), +('-1631304','','','16683','6','0','0','Valanar Death'), +('-1631305','','','16684','6','0','0','Valanar Berserk'), +('-1631306','','','16685','6','0','0','Valanar Empower'), +('-1631307','','','16686','6','0','0','Valanar Special'), + +-- Blood Queen Lana'thel +('-1631321','','','16782','6','0','0','Lanathel Aggro'), +('-1631322','','','16783','6','0','0','Lanathel Bite 01'), +('-1631323','','','16784','6','0','0','Lanathel Bite 02'), +('-1631324','','','16785','6','0','0','Lanathel Add'), +('-1631325','','','16786','6','0','0','Lanathel Special 01'), +('-1631326','','','16787','6','0','0','Lanathel Special 02'), +('-1631327','','','16788','6','0','0','Lanathel Special 03'), +('-1631328','','','16789','6','0','0','Lanathel Reset'), +('-1631329','','','16790','6','0','0','Lanathel Mind Control'), +('-1631330','','','16791','6','0','0','Lanathel Slay 01'), +('-1631331','','','16792','6','0','0','Lanathel Slay 02'), +('-1631332','','','16793','6','0','0','Lanathel Berserk'), +('-1631333','','','16794','6','0','0','Lanathel Death'), +('-1631334','','','16796','6','0','0','Lanathel Empower'), + +-- Valithria Dreamwalker +('-1631401','','','17064','6','0','0','Valithria Aggro'), +('-1631402','','','17065','6','0','0','Valithria Slay Bad Hostile NPC'), +('-1631403','','','17066','6','0','0','Valithria Slay Good - Player'), +('-1631404','','','17067','6','0','0','Valithria Berserk'), +('-1631405','','','17068','6','0','0','Valithria Dream World Open'), +('-1631406','','','17069','6','0','0','Valithria Health Low'), +('-1631407','','','17070','6','0','0','Valithria Health High'), +('-1631408','','','17071','6','0','0','Valithria Win'), +('-1631409','','','17072','6','0','0','Valithria Lose'), + +-- Sindragosa +('-1631420','','','17007','6','0','0','Sindragosa Aggro'), +('-1631421','','','17008','6','0','0','Sindragosa Slay 01'), +('-1631422','','','17009','6','0','0','Sindragosa Slay 02'), +('-1631423','','','17010','6','0','0','Sindragosa Death'), +('-1631424','','','17011','6','0','0','Sindragosa Berserk'), +('-1631425','','','17012','6','0','0','Sindragosa Take Off - fly'), +('-1631426','','','17013','6','0','0','Sindragosa Freeze'), +('-1631427','','','17014','6','0','0','Sindragosa Arcane'), +('-1631428','','','17015','6','0','0','Sindragosa Special'), +('-1631429','','','17016','6','0','0','Sindragosa Low HP'), + +-- Lich king && Tirion +('-1631501','','','17349','6','0','0','Lich King SAY_INTRO1'), +('-1631502','','','17390','6','0','0','Tirion SAY_INTRO2'), +('-1631503','','','17350','6','0','0','Lich King SAY_INTRO3'), +('-1631504','','','17391','6','0','0','Tirion SAY_INTRO4'), +('-1631505','','','17351','6','0','0','Lich King SAY_AGGRO'); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h index b2ec061c4..12adb7f44 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h @@ -1,3 +1,6 @@ +/* Copyright (C) 2010 by /dev/rsa for ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ #ifndef DEF_ICECROWN_SPIRE_H #define DEF_ICECROWN_SPIRE_H @@ -40,6 +43,8 @@ enum NPC_MURADIN = 36948, + NPC_TIRION = 38995, + NPC_RIMEFANG = 37533, NPC_SPINESTALKER = 37534, From b92b821fd8a57eec9220279bc85556ae26928c0c Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sun, 2 May 2010 00:22:41 +0400 Subject: [PATCH 276/405] Small changes to Puticide --- .../721_icecrown_spelltable_scriptdev2.sql | 2 +- .../boss_proffesor_putricide.cpp | 27 ++++++++++++------- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/addition/721_icecrown_spelltable_scriptdev2.sql b/addition/721_icecrown_spelltable_scriptdev2.sql index cbaede714..e35fe550e 100644 --- a/addition/721_icecrown_spelltable_scriptdev2.sql +++ b/addition/721_icecrown_spelltable_scriptdev2.sql @@ -138,7 +138,7 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ (36678,71621, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), (36678,71278, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), (36678,71279, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), -(36678,72296, 72295, 72615, 72480, 10000, 0, 0, 0, 20000, 0, 0, 0, 4, 0, 0), +(36678,70852, 0, 0, 0, 15000, 0, 0, 0, 25000, 0, 0, 0, 6, 0, 0), (36678,73122, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), (36678,71603, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), (36678,70311, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 1, 0, 0), diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp index ae1c22423..61d49ba02 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp @@ -33,7 +33,7 @@ enum BossSpells SPELL_CREATE_CONCOCTION = 71621, SPELL_CHOKING_GAS = 71278, SPELL_CHOKING_GAS_EXPLODE = 71279, - SPELL_MALLEABLE_GOO = 72296, + SPELL_MALLEABLE_GOO = 70852, SPELL_GUZZLE_POTIONS = 73122, SPELL_MUTATED_STRENGTH = 71603, SPELL_MUTATED_PLAGUE = 72672, @@ -71,6 +71,7 @@ struct MANGOS_DLL_DECL boss_proffesor_putricideAI : public ScriptedAI void Reset() { if (pInstance) pInstance->SetData(TYPE_PUTRICIDE, NOT_STARTED); + stage = 0; } void Aggro(Unit *who) @@ -153,12 +154,17 @@ struct MANGOS_DLL_DECL boss_proffesor_putricideAI : public ScriptedAI break; } + break; + } + bsw->timedCast(SPELL_CHOKING_GAS, diff); - bsw->timedCast(SPELL_MALLEABLE_GOO, diff); + if (bsw->timedQuery(SPELL_MALLEABLE_GOO, diff)) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + bsw->doCast(SPELL_MALLEABLE_GOO, pTarget); + } - break; - } if ( stage ==0 && m_creature->GetHealthPercent() < 80.0f ) stage = 1; if ( stage ==2 && m_creature->GetHealthPercent() < 35.0f ) stage = 3; @@ -249,7 +255,7 @@ struct MANGOS_DLL_DECL mob_icc_volatile_oozeAI : public ScriptedAI void JustReachedHome() { if (!m_pInstance) return; - m_creature->ForcedDespawn(); + m_creature->ForcedDespawn(); } void UpdateAI(const uint32 uiDiff) @@ -260,11 +266,12 @@ struct MANGOS_DLL_DECL mob_icc_volatile_oozeAI : public ScriptedAI bsw->timedCast(SPELL_OOZE_ADHESIVE, uiDiff, m_creature->getVictim()); bsw->timedCast(SPELL_SOUL_FEAST, uiDiff); - if (m_creature->getVictim()->IsWithinDistInMap(m_creature, 1.0f)) - { - bsw->doCast(SPELL_OOZE_ERUPTION); - m_creature->ForcedDespawn(); - }; + if (bsw->timedQuery(SPELL_OOZE_ERUPTION, uiDiff)) + if (m_creature->getVictim()->IsWithinDistInMap(m_creature, 1.0f)) + { + bsw->doCast(SPELL_OOZE_ERUPTION); +// m_creature->ForcedDespawn(); + }; } }; From e75399ad0570b88e37fb0abc94599491efd0bfc5 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Mon, 3 May 2010 01:00:53 +0400 Subject: [PATCH 277/405] Texts & sounds (from me). --- addition/721_icecrown_scriptdev2.sql | 200 ++++++++++++++++----------- 1 file changed, 123 insertions(+), 77 deletions(-) diff --git a/addition/721_icecrown_scriptdev2.sql b/addition/721_icecrown_scriptdev2.sql index c03aba573..f724ae28b 100644 --- a/addition/721_icecrown_scriptdev2.sql +++ b/addition/721_icecrown_scriptdev2.sql @@ -30,99 +30,145 @@ INSERT INTO `script_texts` (`entry`,`content_loc8`, `content_default`, `sound`, -- Saurfang ('-1631100','Во имя Короля-Лича!','BY THE MIGHT OF THE LICH KING!','16694','6','0','0','saurfang SAY_AGGRO'), -('-1631101','Земля станет красной от вашей крови!','The ground runs red with your blood!','16699','6','0','0','saurfang SAY_FALLENCHAMPION'), -('-1631102','Корм, мои собаки!','Feast, my minions!','16700','3','0','0','saurfang SAY_BLOODBEASTS'), +('-1631101','Земля обагрится вашей кровью!','The ground runs red with your blood!','16699','6','0','0','saurfang SAY_FALLENCHAMPION'), +('-1631102','Веселитесь, слуги мои!','Feast, my minions!','16700','3','0','0','saurfang SAY_BLOODBEASTS'), ('-1631103','Ты никто!','You are nothing!','16695','6','0','0','saurfang SAY_KILL1'), ('-1631104','Ваши души не найдут здесь избавления!','Your soul will find no redemption here!','16696','6','0','0','saurfang SAY_KILL2'), ('-1631105','Я вижу приближение смерти!','I have become... death!','16698','3','0','0','saurfang SAY_BERSERK'), -('-1631106','Я... Использован...','I... Am... Released.','16697','6','0','0','saurfang SAY_DEATH'), +('-1631106','Я... Освободился...','I... Am... Released.','16697','6','0','0','saurfang SAY_DEATH'), +('-1631107','Все павшие воины орды, все дохлые псы альянса - все пополнят армию Короля-Лича! Даже сейчас валькиры воскрешают ваших покойников, чтобы они стали частью Плети!','','16701','6','0','0','saurfang SAY_INTRO'), +('-1631108','Сейчас все будет еще хуже. Идите сюда, я покажу вам, какой силой меня наделил Король-Лич!','','16702','6','0','0','saurfang SAY_BERSERK'), +('-1631109','Ха-ха-ха. Дворфы!','','16703','6','0','0','saurfang SAY'), -- Festergut -('-1631201','','','17123','6','0','0','Putricide Valve01'), -('-1631202','','','17124','6','0','0','Putricide Festergut Dead'), -('-1631203','','','16901','6','0','0','Festergut Aggro'), -('-1631204','','','16902','6','0','0','Festergut Slay 01'), -('-1631205','','','16903','6','0','0','Festergut Slay 02'), -('-1631206','','','16904','6','0','0','Festergut Death'), -('-1631207','','','16905','6','0','0','Festergut Berserk'), -('-1631208','','','16906','6','0','0','Festergut Explunge Blight'), -('-1631209','','','16907','6','0','0','Festergut Stinky Death '), +('-1631201','Отличные новости народ! Я починил трубы для подачи ядовитой смеси!','','17123','6','0','0','Putricide Valve01'), +('-1631202','Тухлопуз! Ты всегда был моим любимчиком, как и Гниломорд... Молодец, что оставил столько газа. Я его даже чувствую.','','17124','6','0','0','Putricide Festergut Dead'), +('-1631203','Повеселимся!','','16901','6','0','0','Festergut Aggro'), +('-1631204','Папочка! У меня получилось!','','16902','6','0','0','Festergut Slay 01'), +('-1631205','Мертвец! Мертвец! Мертвец!','','16903','6','0','0','Festergut Slay 02'), +('-1631206','А-а-а-а-а...','','16904','6','0','0','Festergut Death'), +('-1631207','Веселью конец!','','16905','6','0','0','Festergut Berserk'), +('-1631208','Что-то мне нехорошо...','','16906','6','0','0','Festergut Explunge Blight'), +('-1631209','Нет! Вы убили Вонючку! Сейчас получите!','','16907','6','0','0','Festergut Stinky Death '), +('-1631210','Их-ха!','','16908','6','0','0','Festergut say '), +('-1631211','Ы-ы-ы!','','16909','6','0','0','Festergut say '), +('-1631212','(Непереводимо)','','16910','6','0','0','Festergut say '), +('-1631213','Пук.','','16911','6','0','0','Festergut brrr '), -- Rotface -('-1631220','','','17126','6','0','0','Putricide Slime Flow'), -('-1631221','','','16986','6','0','0','Rotface Aggro'), -('-1631222','','','16987','6','0','0','Rotface Slay 01'), -('-1631223','','','16988','6','0','0','Rotface Slay 02'), -('-1631224','','','16989','6','0','0','Rotface Death'), -('-1631225','','','16990','6','0','0','Rotface Berserk'), -('-1631226','','','16991','6','0','0','Rotface Infection'), -('-1631227','','','16992','6','0','0','Rotface Unstable Ooze'), -('-1631228','','','16993','6','0','0','Rotface Precious played when precious dies'), -('-1631229','','','16994','6','0','0','Rotface'), +('-1631220','Отличные новости народ! Слизь снова потекла!','','17126','6','0','0','Putricide Slime Flow'), +('-1631221','Й-й-йя-хахаха!','','16986','6','0','0','Rotface Aggro'), +('-1631222','Я ЭТО заломал!','','16987','6','0','0','Rotface Slay 01'), +('-1631223','Папочка сделает новые игрушки из тебя!','','16988','6','0','0','Rotface Slay 02'), +('-1631224','Папочка, не огорчайся...','','16989','6','0','0','Rotface Death'), +('-1631225','Тихий час!','','16990','6','0','0','Rotface Berserk'), +('-1631226','Липучка-вонючка!','','16991','6','0','0','Rotface Infection'), +('-1631227','Я сделал очень злую каку! Сейчас взорвется!','','16992','6','0','0','Rotface Unstable Ooze'), +('-1631228','Что? Прелесть? Не-е-е-т!','','16993','6','0','0','Rotface Precious played when precious dies'), +('-1631229','Й-а-а-а!','','16994','6','0','0','Rotface say'), +('-1631230','Ах!','','16995','6','0','0','Rotface say'), +('-1631231','А-а-у!','','16996','6','0','0','Rotface say'), -- Professor Putricide -('-1631230','','','17114','6','0','0','Putricide Aggro'), -('-1631231','','','17115','6','0','0','Putricide Slay 01'), -('-1631232','','','17116','6','0','0','Putricide Slay 02'), -('-1631233','','','17117','6','0','0','Putricide Death'), -('-1631234','','','17118','6','0','0','Putricide Berserk'), -('-1631235','','','17119','6','0','0','Putricide Gas Explosion'), -('-1631236','','','17120','6','0','0','Putricide Transform 01'), -('-1631237','','','17121','6','0','0','Putricide Transform 02'), -('-1631238','','','17122','6','0','0','Putricide Summon Ooze'), -('-1631239','','','17125','6','0','0','Putricide Airlock01 Before fight'), +('-1631240','Отличные новости народ! Я усовершенствовал штамм чумы, которая уничтожит весь Азерот!','','17114','6','0','0','Putricide Aggro'), +('-1631241','М-м-м. Интересно.','','17115','6','0','0','Putricide Slay 01'), +('-1631242','О, как неожиданно!','','17116','6','0','0','Putricide Slay 02'), +('-1631243','Плохие новости, народ... Похоже, у меня ничего не выйдет.','','17117','6','0','0','Putricide Death'), +('-1631244','Прекрасные новости, народ!','','17118','6','0','0','Putricide Berserk'), +('-1631245','Это обычное облако газа. Но будьте осторожны, не такое уж оно и обычное...','','17119','6','0','0','Putricide Gas Explosion'), +('-1631246','Что-то я ничего не чувтвую. Что? Это еще откуда?','','17120','6','0','0','Putricide Transform 01'), +('-1631247','На вкус кка вишенка. Ой, извините...','','17121','6','0','0','Putricide Transform 02'), +('-1631248','Два слизнюка в одной комнате? Может получиться что-то любопытное...','','17122','6','0','0','Putricide Summon Ooze'), +('-1631249','Вы слишком грязные чтобы тут расхаживать! Надо сперва соскрести эту мерзкую плоть.','','17125','6','0','0','Putricide Airlock01 Before fight'), -- Blood Prince Council -('-1631301','','','16795','6','0','0','Lanathel Intro Princes'), -('-1631302','','','16681','6','0','0','Valanar Slay 01'), -('-1631303','','','16682','6','0','0','Valanar Slay 02'), -('-1631304','','','16683','6','0','0','Valanar Death'), -('-1631305','','','16684','6','0','0','Valanar Berserk'), -('-1631306','','','16685','6','0','0','Valanar Empower'), -('-1631307','','','16686','6','0','0','Valanar Special'), +('-1631301','Глупые смертные! Думали, что одолели нас? Санлейн, непобедимые воины Короля-Лича! Теперь наши силы едины!','','16795','6','0','0','Lanathel Intro Princes'), +('-1631302','Кушать подано!','','16681','6','0','0','Valanar Slay 01'), +('-1631303','Теперь вы видите, насколько мы сильны?','','16682','6','0','0','Valanar Slay 02'), +('-1631304','Охохо...','','16683','6','0','0','Valanar Death'), +('-1631305','Хорош тянуть время перед Санлейн!','','16684','6','0','0','Valanar Berserk'), +('-1631306','Наксанар был досадным недоразумением! Силы сферы позволят Валанару свершить отмщение!','','16685','6','0','0','Valanar Empower'), +('-1631307','Моя чаша полна','','16686','6','0','0','Valanar Special'), +('-1631308','Йих!','','16687','6','0','0','Princes say'), +('-1631309','Э-эх!','','16688','6','0','0','Princes say'), +('-1631310','До-хо!','','16689','6','0','0','Princes say'), -- Blood Queen Lana'thel -('-1631321','','','16782','6','0','0','Lanathel Aggro'), -('-1631322','','','16783','6','0','0','Lanathel Bite 01'), -('-1631323','','','16784','6','0','0','Lanathel Bite 02'), -('-1631324','','','16785','6','0','0','Lanathel Add'), -('-1631325','','','16786','6','0','0','Lanathel Special 01'), -('-1631326','','','16787','6','0','0','Lanathel Special 02'), -('-1631327','','','16788','6','0','0','Lanathel Special 03'), -('-1631328','','','16789','6','0','0','Lanathel Reset'), -('-1631329','','','16790','6','0','0','Lanathel Mind Control'), -('-1631330','','','16791','6','0','0','Lanathel Slay 01'), -('-1631331','','','16792','6','0','0','Lanathel Slay 02'), -('-1631332','','','16793','6','0','0','Lanathel Berserk'), -('-1631333','','','16794','6','0','0','Lanathel Death'), -('-1631334','','','16796','6','0','0','Lanathel Empower'), +('-1631321','Это было неразумное решение!','','16782','6','0','0','Lanathel Aggro'), +('-1631322','Я только попробую на вкус...','','16783','6','0','0','Lanathel Bite 01'), +('-1631323','Я голодна!','','16784','6','0','0','Lanathel Bite 02'), +('-1631324','Смерть вас не спсет!','','16785','6','0','0','Lanathel Add'), +('-1631325','Страдайте же!','','16786','6','0','0','Lanathel Special 01'), +('-1631326','Как вам такое?','','16787','6','0','0','Lanathel Special 02'), +('-1631327','Начинаем представление!','','16788','6','0','0','Lanathel Special 03'), +('-1631328','Не повезло...','','16789','6','0','0','Lanathel Reset'), +('-1631329','Нет. Моя прелесть, приятного аппетита!','','16790','6','0','0','Lanathel Mind Control'), +('-1631330','Вот как... У тебя не поучилось?','','16791','6','0','0','Lanathel Slay 01'), +('-1631331','Какая жалость...','','16792','6','0','0','Lanathel Slay 02'), +('-1631332','Сейчас все кончится!','','16793','6','0','0','Lanathel Berserk'), +('-1631333','Но... Мы ведь так хорошо ладили...','','16794','6','0','0','Lanathel Death'), +('-1631334','Восстаньте братья! И уничтожьте наших врагов!','','16796','6','0','0','Lanathel Empower'), +('-1631335','Ха-х!','','16797','6','0','0','Lanathel say'), +('-1631338','Ах-ха...','','16798','6','0','0','Lanathel say'), +('-1631339','Ых...','','16799','6','0','0','Lanathel say'), -- Valithria Dreamwalker -('-1631401','','','17064','6','0','0','Valithria Aggro'), -('-1631402','','','17065','6','0','0','Valithria Slay Bad Hostile NPC'), -('-1631403','','','17066','6','0','0','Valithria Slay Good - Player'), -('-1631404','','','17067','6','0','0','Valithria Berserk'), -('-1631405','','','17068','6','0','0','Valithria Dream World Open'), -('-1631406','','','17069','6','0','0','Valithria Health Low'), -('-1631407','','','17070','6','0','0','Valithria Health High'), -('-1631408','','','17071','6','0','0','Valithria Win'), -('-1631409','','','17072','6','0','0','Valithria Lose'), +('-1631401','Герои! Вы должны мне помочь! Мои силы на исходе... Залечите мои раны...','','17064','6','0','0','Valithria Aggro'), +('-1631402','Одержимые не знают отдыха...','','17065','6','0','0','Valithria Slay Bad Hostile NPC'), +('-1631403','Прискобная потеря.','','17066','6','0','0','Valithria Slay Good - Player'), +('-1631404','Неудачники!','','17067','6','0','0','Valithria Berserk'), +('-1631405','Я открыла портал в изумрудный сон. Там вы найдете спасение, герои!','','17068','6','0','0','Valithria Dream World Open'), +('-1631406','Я долго не продержусь!','','17069','6','0','0','Valithria Health Low'), +('-1631407','Силы возвращаются ко мне! Герои, еще немного!','','17070','6','0','0','Valithria Health High'), +('-1631408','Я излечилась! Изера, даруй мне силу покончить с этими нечестивыми тварями!','','17071','6','0','0','Valithria Win'), +('-1631409','Простите меня, я не могу остано... ВСЕ ВО ВЛАСТИ КОШМАРА!','','17072','6','0','0','Valithria Lose'), -- Sindragosa -('-1631420','','','17007','6','0','0','Sindragosa Aggro'), -('-1631421','','','17008','6','0','0','Sindragosa Slay 01'), -('-1631422','','','17009','6','0','0','Sindragosa Slay 02'), -('-1631423','','','17010','6','0','0','Sindragosa Death'), -('-1631424','','','17011','6','0','0','Sindragosa Berserk'), -('-1631425','','','17012','6','0','0','Sindragosa Take Off - fly'), -('-1631426','','','17013','6','0','0','Sindragosa Freeze'), -('-1631427','','','17014','6','0','0','Sindragosa Arcane'), -('-1631428','','','17015','6','0','0','Sindragosa Special'), -('-1631429','','','17016','6','0','0','Sindragosa Low HP'), +('-1631420','Глупцы! Зачем вы сюда явились? Ледяные ветра Нордскола унесут ваши души!','','17007','6','0','0','Sindragosa Aggro'), +('-1631421','Погибни!','','17008','6','0','0','Sindragosa Slay 01'), +('-1631422','Удел смертных!','','17009','6','0','0','Sindragosa Slay 02'), +('-1631423','Наконец-то! Свободна!','','17010','6','0','0','Sindragosa Death'), +('-1631424','Хватит! Эти игры меня утомляют!','','17011','6','0','0','Sindragosa Berserk'), +('-1631425','Здесь ваше вторжение и окончится! Никто не уцелеет!','','17012','6','0','0','Sindragosa Take Off - fly'), +('-1631426','Вы чувствуете, как ледяная ладонь смерти сжимает сердце?','','17013','6','0','0','Sindragosa Freeze'), +('-1631427','Трепещите, смертные! Ибо ваша жалкая магия теперь бессильна!','','17014','6','0','0','Sindragosa Arcane'), +('-1631428','А-а-а! Жжот! Что это за колдовство?','','17015','6','0','0','Sindragosa Special'), +('-1631429','А теперь почувствуйте всю мощь Господина и погрузитесь в отчаяние!','','17016','6','0','0','Sindragosa Low HP'), -- Lich king && Tirion -('-1631501','','','17349','6','0','0','Lich King SAY_INTRO1'), -('-1631502','','','17390','6','0','0','Tirion SAY_INTRO2'), -('-1631503','','','17350','6','0','0','Lich King SAY_INTRO3'), -('-1631504','','','17391','6','0','0','Tirion SAY_INTRO4'), -('-1631505','','','17351','6','0','0','Lich King SAY_AGGRO'); +('-1631501','Неужели прибыли, наконец, хваленые силы света? Мне бросить Ледяную скорбь и сдаться на твою милость, Фордринг?','','17349','6','0','0','Lich King SAY_INTRO1'), +('-1631503','Ты пройдешь через эти мучения сам.','','17350','6','0','0','Lich King SAY_INTRO3'), +('-1631505','Я оставлю тебя в живых, чтобы ты увидел финал! Не могу допустить чтобы величайший служитель света пропустил рождение МОЕГО мира!','','17351','6','0','0','Lich King SAY_AGGRO'), +('-1631506','Ну же, герои! В вашей ярости - МОЯ сила!','','17352','6','0','0','Lich King SAY'), +('-1631507','Сомнений нет - вы сильнейшие герои Азерота! Вы преодолели все препятствия, которые я воздвиг перед вами! Сильнейшие из моих слуг пали под вашим натиском, сгорели в пламени вашей ярости!','','17353','6','0','0','Lich King SAY'), +('-1631508','Что движет вами? Праведность? Не знаю...','','17354','6','0','0','Lich King SAY'), +('-1631509','Ты отлично их обучил, Фордринг! Ты привел сюда лучших воинов, которых знал мир! И отдал их в мои руки. Как я и рассчитывал.','','17355','6','0','0','Lich King SAY'), +('-1631510','Смотри как я буду воскрешать их и превращать в воинов Плети! Они повергнут этот мир в пучину хаоса. Азерот падет от их рук. И ты станешь первой жертвой. ','','17356','6','0','0','Lich King SAY'), +('-1631511','Мне по душе эта ирония!','','17357','6','0','0','Lich King SAY'), +('-1631512','Невозможно!','','17358','6','0','0','Lich King SAY'), +('-1631513','Да! Вы меня и правда ранили. Я слишком долго с вами играл. Испытайте на себе возмездие Смерти!','','17359','6','0','0','Lich King SAY'), +('-1631514','А-а-х!','','17360','6','0','0','Lich King SAY'), +('-1631515','И вот я стою как лев пред агнцами. И не дрожат они.','','17361','6','0','0','Lich King SAY'), +('-1631516','Им неведом страх!','','17362','6','0','0','Lich King SAY'), +('-1631517','Надежда тает!','','17363','6','0','0','Lich King SAY'), +('-1631518','Пришел конец!','','17364','6','0','0','Lich King SAY'), +('-1631519','Встречайте трагический финал!','','17365','6','0','0','Lich King SAY_KILL'), +('-1631520','Ледяная скорбь жаждет крови!','','17366','6','0','0','Lich King SAY'), +('-1631521','Ледяная скорбь, повинуйся мне!','','17367','6','0','0','Lich King SAY'), +('-1631522','Ледяная скорбь поглотит душу вашего товарища!','','17368','6','0','0','Lich King SAY_KILL'), +('-1631523','Я проморожу вас насквозь и вы разлетитесь на ледяные осколки!','','17369','6','0','0','Lich King SAY'), +('-1631524','Смотрите, как мир рушится вокруг вас!','','17370','6','0','0','Lich King SAY_WIN'), +('-1631525','Конец света!','','17371','6','0','0','Lich King SAY'), +('-1631526','Склонись перед своим господином и повелителем!','','17372','6','0','0','Lich King SAY'), +('-1631527','Валькирия! Твой господин зовет!','','17373','6','0','0','Lich King SAY_SUMMON'), +('-1631528','...','','17374','6','0','0','Lich King SAY_DEATH'), +-- Tirion +('-1631552','Мы даруем тебе быструю смерть, Артас! Более быструю чем ты заслуживаешь за то что замучил и погубил десятки тысяч жизней!','','17390','6','0','0','Tirion SAY_INTRO2'), +('-1631554','Да будет так! Герои, в атаку','','17391','6','0','0','Tirion SAY_INTRO4'), +('-1631555','Свет! Даруй мне последнее благословение! Дай мне разбить эти оковы!','','17392','6','0','0','Tirion SAY'), +('-1631556','Хватит, Артас! Твоя ненависть не заберет больше ни одной жизни!','','17393','6','0','0','Tirion SAY'), +('-1631557','Вы пришли чтобы вершить суд над Артасом? Чтобы уничтожить короля-лича?','','17394','6','0','0',' SAY'), +('-1631558','Вы не должны оказаться во власти Ледяной скорби. Иначе, как и я, будете навеки порабощены этим проклятым клинком.','','17395','6','0','0',' SAY'), +('-1631559','Помогите мне уничтожить эти истерзанные души. Вместе мы вытянем силу из ледяной скорби и ослабим короля-лича.','','17396','6','0','0',' SAY'), +('-1631560','Наконец я свободен. Все кончено, сын мой. Настал час расплаты.','','17397','6','0','0',' SAY'), +('-1631561','Поднимитесь, воины света!','','17398','6','0','0',' SAY'); From c27945545b5b9ea5eafc501dce870d2ed58be3ec Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Tue, 4 May 2010 15:05:11 +0400 Subject: [PATCH 278/405] Sindragosa's minions --- addition/721_icecrown_mangos.sql | 5 +- .../721_icecrown_spelltable_scriptdev2.sql | 12 ++ scripts/examples/boss_general.cpp | 116 +++++++++++++ .../icecrown_citadel/boss_sindragosa.cpp | 160 +++++++++++++++++- .../icecrown_citadel/def_spire.h | 7 +- .../instance_icecrown_spire.cpp | 74 +++++--- system/ScriptLoader.cpp | 2 + 7 files changed, 345 insertions(+), 31 deletions(-) create mode 100644 scripts/examples/boss_general.cpp diff --git a/addition/721_icecrown_mangos.sql b/addition/721_icecrown_mangos.sql index 7ae09137a..fe03c65ef 100644 --- a/addition/721_icecrown_mangos.sql +++ b/addition/721_icecrown_mangos.sql @@ -101,6 +101,9 @@ UPDATE `gameobject_template` SET `faction` = '114',`data0` = '0' WHERE `gameobje UPDATE `gameobject` SET `state` = '1' WHERE `id` IN (201380,201381,201382,201383); -- Sindragosa --- UPDATE `creature_template` SET `ScriptName`='boss_sindragosa' WHERE `entry`= 37755; +-- UPDATE `creature_template` SET `ScriptName`='boss_sindragosa' WHERE `entry`= 36853; +UPDATE `creature_template` SET `ScriptName`='mob_rimefang', `AIName`='' WHERE `entry`= 37533; +UPDATE `creature_template` SET `ScriptName`='mob_spinestalker', `AIName`='' WHERE `entry`= 37534; + -- Lich King -- UPDATE `creature_template` SET `ScriptName`='boss_lich_king' WHERE `entry`= 29983; diff --git a/addition/721_icecrown_spelltable_scriptdev2.sql b/addition/721_icecrown_spelltable_scriptdev2.sql index e35fe550e..8949777c3 100644 --- a/addition/721_icecrown_spelltable_scriptdev2.sql +++ b/addition/721_icecrown_spelltable_scriptdev2.sql @@ -219,6 +219,18 @@ DELETE FROM `boss_spell_table` WHERE `entry` = 36789; -- Sindragosa DELETE FROM `boss_spell_table` WHERE `entry` = 36853; +-- Rimefang +DELETE FROM `boss_spell_table` WHERE `entry` = 37533; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(37533, 71387, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(37533, 71386, 0, 0, 0, 5000, 0, 0, 0, 8000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(37533, 71376, 0, 0, 0, 4000, 0, 0, 0, 8000, 0, 0, 0, 0, 0, 0, 4, 0, 0); +-- Spinestalker +DELETE FROM `boss_spell_table` WHERE `entry` = 37534; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(37534, 36922, 0, 0, 0, 8000, 0, 0, 0, 24000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(37534, 40505, 0, 0, 0, 5000, 0, 0, 0, 8000, 0, 0, 0, 0, 0, 0, 3, 0, 0), +(37534, 71369, 0, 0, 0, 4000, 0, 0, 0, 8000, 0, 0, 0, 0, 0, 0, 4, 0, 0); -- Lich king DELETE FROM `boss_spell_table` WHERE `entry` = 36597; diff --git a/scripts/examples/boss_general.cpp b/scripts/examples/boss_general.cpp new file mode 100644 index 000000000..c44bac819 --- /dev/null +++ b/scripts/examples/boss_general.cpp @@ -0,0 +1,116 @@ +/* Copyright (C) 2010 /dev/rsa for ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_general +SD%Complete: ?% +SDComment: by /dev/rsa +SDCategory: General boss instance script template +EndScriptData */ + +#include "precompiled.h" +#include "def_instance.h" + +enum BossSpells +{ + SPELL_SUPERSPELL = 99999, +}; + +struct MANGOS_DLL_DECL boss_generalAI : public ScriptedAI +{ + boss_generalAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); + Reset(); + } + + ScriptedInstance *pInstance; + BossSpellWorker* bsw; + uint8 stage; + + void Reset() + { + if(!pInstance) return; + pInstance->SetData(TYPE_GENERAL, NOT_STARTED); + bsw->resetTimers(); + } + + void MoveInLineOfSight(Unit* pWho) + { + } + + void MovementInform(uint32 type, uint32 id) + { + if (type != POINT_MOTION_TYPE) return; + } + + void KilledUnit(Unit* pVictim) + { +/* switch (urand(0,1)) { + case 0: + DoScriptText(-1631006,m_creature,pVictim); + break; + case 1: + DoScriptText(-1631007,m_creature,pVictim); + break; + };*/ + } + + void JustReachedHome() + { + if (pInstance) pInstance->SetData(TYPE_GENERAL, FAIL); + } + + void JustSummoned(Creature* summoned) + { + } + + void Aggro(Unit *who) + { + if(pInstance) pInstance->SetData(TYPE_GENERAL, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_GENERAL, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + bsw->timedCast(SPELL_SUPERSPELL, diff); + + DoMeleeAttackIfReady(); + } +}; + + +CreatureAI* GetAI_boss_general(Creature* pCreature) +{ + return new boss_generalAI(pCreature); +} + +void AddSC_boss_general() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_general"; + newscript->GetAI = &GetAI_boss_general; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp index f89bd8b31..2c6188fe7 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp @@ -17,8 +17,166 @@ /* ScriptData SDName: boss_sindragosa SD%Complete: 0% -SDComment: +SDComment: by /dev/rsa SDCategory: Icecrown Citadel EndScriptData */ #include "precompiled.h" +#include "def_spire.h" + +enum BossSpells +{ +// Rimefang + SPELL_FROST_AURA = 71387, + SPELL_FROST_BREATH = 71386, + SPELL_ICY_BLAST = 71376, +// Spinestalker + SPELL_BELLOWING_ROAR = 36922, + SPELL_CLEAVE = 40505, + SPELL_TAIL_SWEEP = 71369, +}; + +static Locations SpawnLoc[]= +{ + {4408.052734f, 2484.825439f, 203.374207f}, // 0 Sindragosa spawn +}; + +struct MANGOS_DLL_DECL mob_rimefangAI : public ScriptedAI +{ + mob_rimefangAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); + Reset(); + } + + ScriptedInstance *pInstance; + BossSpellWorker* bsw; + Creature* pBrother; + + void Reset() + { + if(!pInstance) return; + pInstance->SetData(TYPE_SINDRAGOSA, NOT_STARTED); + bsw->resetTimers(); + m_creature->SetRespawnDelay(DAY); + } + + void JustReachedHome() + { + if (pInstance) pInstance->SetData(TYPE_SINDRAGOSA, FAIL); + } + + void Aggro(Unit *who) + { + if(!pInstance) return; + pInstance->SetData(TYPE_SINDRAGOSA, IN_PROGRESS); + pBrother = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_SPINESTALKER)); + if (pBrother && !pBrother->isAlive()) pBrother->Respawn(); + if (pBrother) pBrother->SetInCombatWithZone(); + bsw->doCast(SPELL_FROST_AURA); + } + + void JustDied(Unit *killer) + { + if(!pInstance) return; + if (pBrother && !pBrother->isAlive()) + m_creature->SummonCreature(NPC_SINDRAGOSA, SpawnLoc[0].x, SpawnLoc[0].y, SpawnLoc[0].z, 3.17f, TEMPSUMMON_MANUAL_DESPAWN, DESPAWN_TIME); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + bsw->timedCast(SPELL_FROST_BREATH, diff); + + bsw->timedCast(SPELL_ICY_BLAST, diff); + + DoMeleeAttackIfReady(); + } +}; + + +CreatureAI* GetAI_mob_rimefang(Creature* pCreature) +{ + return new mob_rimefangAI(pCreature); +} + +struct MANGOS_DLL_DECL mob_spinestalkerAI : public ScriptedAI +{ + mob_spinestalkerAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); + Reset(); + } + + ScriptedInstance *pInstance; + BossSpellWorker* bsw; + Creature* pBrother; + + void Reset() + { + if(!pInstance) return; + pInstance->SetData(TYPE_SINDRAGOSA, NOT_STARTED); + bsw->resetTimers(); + m_creature->SetRespawnDelay(DAY); + } + + void JustReachedHome() + { + if (pInstance) pInstance->SetData(TYPE_SINDRAGOSA, FAIL); + } + + void Aggro(Unit *who) + { + if(!pInstance) return; + pInstance->SetData(TYPE_SINDRAGOSA, IN_PROGRESS); + pBrother = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_RIMEFANG)); + if (pBrother && !pBrother->isAlive()) pBrother->Respawn(); + if (pBrother) pBrother->SetInCombatWithZone(); + } + + void JustDied(Unit *killer) + { + if(!pInstance) return; + if (pBrother && !pBrother->isAlive()) + m_creature->SummonCreature(NPC_SINDRAGOSA, SpawnLoc[0].x, SpawnLoc[0].y, SpawnLoc[0].z, 3.17f, TEMPSUMMON_MANUAL_DESPAWN, DESPAWN_TIME); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + bsw->timedCast(SPELL_BELLOWING_ROAR, diff); + + bsw->timedCast(SPELL_CLEAVE, diff); + + bsw->timedCast(SPELL_TAIL_SWEEP, diff); + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_spinestalker(Creature* pCreature) +{ + return new mob_spinestalkerAI(pCreature); +} + +void AddSC_boss_sindragosa() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "mob_rimefang"; + newscript->GetAI = &GetAI_mob_rimefang; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_spinestalker"; + newscript->GetAI = &GetAI_mob_spinestalker; + newscript->RegisterSelf(); + +} diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h index 12adb7f44..acfae9819 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h @@ -108,9 +108,14 @@ enum GO_FROSTWING_SIGIL = 202181, GO_BLOODWING_SIGIL = 202183, - TYPE_DIFFICULTY = 1001, + TYPE_EVENT_TIMER = 99, + TYPE_EVENT = 100, + TYPE_EVENT_NPC = 101, MAP_NUM = 631, + TYPE_DIFFICULTY = 1001, DATA_BLOOD_COUNCIL_HEALTH = 1002, + DESPAWN_TIME = 300000, + }; #endif diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp index 6b6c94b70..840aaea58 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp @@ -51,6 +51,9 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance uint64 m_uiSindragosaGUID; uint64 m_uiLichKingGUID; + uint64 m_uiRimefangGUID; + uint64 m_uiSpinestalkerGUID; + uint64 m_uiIcewall1GUID; uint64 m_uiIcewall2GUID; uint64 m_uiSaurfangDoorGUID; @@ -85,6 +88,9 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance uint32 m_uiDataCouncilHealth; + uint32 m_auiEvent; + uint32 m_auiEventTimer; + void OpenDoor(uint64 guid) { if(!guid) return; @@ -136,6 +142,7 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance m_uiSDoorGreenGUID = 0; m_uiBloodwingDoorGUID = 0; m_uiSDoorCollisionGUID = 0; + m_auiEvent = 0; switch (Difficulty) { case RAID_DIFFICULTY_10MAN_NORMAL: m_uiGunshipArmoryH_ID = GO_GUNSHIP_ARMORY_H_10; @@ -208,6 +215,12 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance case NPC_LICH_KING: m_uiLichKingGUID = pCreature->GetGUID(); break; + case NPC_RIMEFANG: + m_uiRimefangGUID = pCreature->GetGUID(); + break; + case NPC_SPINESTALKER: + m_uiSpinestalkerGUID = pCreature->GetGUID(); + break; } } @@ -448,7 +461,8 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance case DATA_BLOOD_COUNCIL_HEALTH: m_uiDataCouncilHealth = uiData; uiData = NOT_STARTED; break; - + case TYPE_EVENT: m_auiEvent = uiData; uiData = NOT_STARTED; break; + case TYPE_EVENT_TIMER: m_auiEventTimer = uiData; uiData = NOT_STARTED; break; } if (uiData == DONE) @@ -493,6 +507,22 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance case TYPE_ICECROWN_QUESTS: return m_auiEncounter[13]; case TYPE_COUNT: return m_auiEncounter[14]; case DATA_BLOOD_COUNCIL_HEALTH: return m_uiDataCouncilHealth; + case TYPE_EVENT: return m_auiEvent; + case TYPE_EVENT_TIMER: return m_auiEventTimer; + case TYPE_EVENT_NPC: switch (m_auiEvent) + { + case 1: + return NPC_TIRION; + break; + + case 2: + return NPC_LICH_KING; + break; + + default: + break; + }; + } return 0; } @@ -501,33 +531,21 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance { switch(uiData) { - case NPC_LORD_MARROWGAR: - return m_uiMarrogwarGUID; - case NPC_LADY_DEATHWHISPER: - return m_uiDeathWhisperGUID; - case NPC_DEATHBRINGER_SAURFANG: - return m_uiSaurfangGUID; - case NPC_FESTERGUT: - return m_uiFestergutGUID; - case NPC_ROTFACE: - return m_uiRotfaceGUID; - case NPC_PROFESSOR_PUTRICIDE: - return m_uiPutricideGUID; - case NPC_TALDARAM: - return m_uiTaldaramGUID; - case NPC_VALANAR: - return m_uiValanarGUID; - case NPC_KELESETH: - return m_uiKelesethGUID; - case NPC_LANATHEL: - return m_uiLanathelGUID; - case NPC_VALITHRIA: - return m_uiValithriaGUID; - case NPC_SINDRAGOSA: - return m_uiSindragosaGUID; - case NPC_LICH_KING: - return m_uiLichKingGUID; - + case NPC_LORD_MARROWGAR: return m_uiMarrogwarGUID; + case NPC_LADY_DEATHWHISPER: return m_uiDeathWhisperGUID; + case NPC_DEATHBRINGER_SAURFANG: return m_uiSaurfangGUID; + case NPC_FESTERGUT: return m_uiFestergutGUID; + case NPC_ROTFACE: return m_uiRotfaceGUID; + case NPC_PROFESSOR_PUTRICIDE: return m_uiPutricideGUID; + case NPC_TALDARAM: return m_uiTaldaramGUID; + case NPC_VALANAR: return m_uiValanarGUID; + case NPC_KELESETH: return m_uiKelesethGUID; + case NPC_LANATHEL: return m_uiLanathelGUID; + case NPC_VALITHRIA: return m_uiValithriaGUID; + case NPC_SINDRAGOSA: return m_uiSindragosaGUID; + case NPC_LICH_KING: return m_uiLichKingGUID; + case NPC_RIMEFANG: return m_uiRimefangGUID; + case NPC_SPINESTALKER: return m_uiSpinestalkerGUID; case GO_SCIENTIST_DOOR_ORANGE: return m_uiSDoorOrangeGUID; case GO_SCIENTIST_DOOR_GREEN: return m_uiSDoorGreenGUID; case GO_SCIENTIST_DOOR_COLLISION: return m_uiSDoorCollisionGUID; diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index 040b6c26c..85da56234 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -391,6 +391,7 @@ extern void AddSC_boss_festergut(); extern void AddSC_boss_proffesor_putricide(); extern void AddSC_blood_prince_council(); extern void AddSC_boss_blood_queen_lanathel(); +extern void AddSC_boss_sindragosa(); extern void AddSC_instance_forge_of_souls(); extern void AddSC_boss_devourer_of_souls(); @@ -866,6 +867,7 @@ void AddScripts() AddSC_boss_proffesor_putricide(); AddSC_blood_prince_council(); AddSC_boss_blood_queen_lanathel(); + AddSC_boss_sindragosa(); AddSC_instance_forge_of_souls(); AddSC_boss_devourer_of_souls(); From 4dd97e2a5daaf69b708f99d607cee1cf19de4303 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Tue, 4 May 2010 20:37:47 +0400 Subject: [PATCH 279/405] Sindragosa (unfinished) --- addition/721_icecrown_mangos.sql | 3 +- .../721_icecrown_spelltable_scriptdev2.sql | 17 ++ .../icecrown_citadel/boss_sindragosa.cpp | 217 ++++++++++++++++++ 3 files changed, 236 insertions(+), 1 deletion(-) diff --git a/addition/721_icecrown_mangos.sql b/addition/721_icecrown_mangos.sql index fe03c65ef..3f58d06c1 100644 --- a/addition/721_icecrown_mangos.sql +++ b/addition/721_icecrown_mangos.sql @@ -101,9 +101,10 @@ UPDATE `gameobject_template` SET `faction` = '114',`data0` = '0' WHERE `gameobje UPDATE `gameobject` SET `state` = '1' WHERE `id` IN (201380,201381,201382,201383); -- Sindragosa --- UPDATE `creature_template` SET `ScriptName`='boss_sindragosa' WHERE `entry`= 36853; +UPDATE `creature_template` SET `ScriptName`='boss_sindragosa' WHERE `entry`= 36853; UPDATE `creature_template` SET `ScriptName`='mob_rimefang', `AIName`='' WHERE `entry`= 37533; UPDATE `creature_template` SET `ScriptName`='mob_spinestalker', `AIName`='' WHERE `entry`= 37534; +UPDATE `creature_template` SET `ScriptName`='mob_ice_tomb', `AIName`='' WHERE `entry`= 36980; -- Lich King -- UPDATE `creature_template` SET `ScriptName`='boss_lich_king' WHERE `entry`= 29983; diff --git a/addition/721_icecrown_spelltable_scriptdev2.sql b/addition/721_icecrown_spelltable_scriptdev2.sql index 8949777c3..d247f9349 100644 --- a/addition/721_icecrown_spelltable_scriptdev2.sql +++ b/addition/721_icecrown_spelltable_scriptdev2.sql @@ -219,6 +219,23 @@ DELETE FROM `boss_spell_table` WHERE `entry` = 36789; -- Sindragosa DELETE FROM `boss_spell_table` WHERE `entry` = 36853; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(36853, 70084, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36853, 19983, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 3, 0, 0), +(36853, 71007, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(36853, 69649, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(36853, 70107, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(36853, 69762, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(36853, 69766, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 6, 0, 0), +(36853, 70117, 0, 0, 0, 20000, 0, 0, 0, 40000, 0, 0, 0, 30.0, 0, 0, 12, 0, 0), +(36853, 70123, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36853, 70126, 0, 0, 0, 90000, 0, 0, 0, 90000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(36853, 70157, 0, 0, 0, 7000, 0, 0, 0, 7000, 0, 0, 0, 0, 0, 0, 6, 0, 0), +(36853, 71665, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 6, 0, 0), +(36853, 71053, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(36853, 36980, 0, 0, 0, 90000, 0, 0, 0, 90000, 0, 0, 0, 0, 0, 0, 11, 0, 0), +(36853, 70128, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 30.0, 0, 0, 12, 0, 0); + -- Rimefang DELETE FROM `boss_spell_table` WHERE `entry` = 37533; INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp index 2c6188fe7..d278aba0c 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp @@ -26,6 +26,26 @@ EndScriptData */ enum BossSpells { +// Sindragosa + SPELL_FROST_AURA_1 = 70084, + SPELL_CLEAVE_1 = 19983, + SPELL_TAIL_SMASH = 71077, + SPELL_FROST_BREATH_1 = 69649, + SPELL_PERMEATING_CHILL = 70107, + SPELL_UNCHAINED_MAGIC = 69762, + SPELL_INSTABILITY = 69766, + SPELL_ICY_GRIP = 70117, + SPELL_BLISTERING_COLD = 70123, + + SPELL_FROST_BEACON = 70126, + SPELL_ICY_TOMB = 70157, + SPELL_ASPHYXATION = 71665, + SPELL_FROST_BOMB = 71053, + + SPELL_MYSTIC_BUFFET = 70128, + + NPC_ICE_TOMB = 36980, + // Rimefang SPELL_FROST_AURA = 71387, SPELL_FROST_BREATH = 71386, @@ -41,6 +61,193 @@ static Locations SpawnLoc[]= {4408.052734f, 2484.825439f, 203.374207f}, // 0 Sindragosa spawn }; +struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI +{ + boss_sindragosaAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); + Reset(); + } + + ScriptedInstance *pInstance; + BossSpellWorker* bsw; + uint8 stage; + Unit* pTarget1; + Unit* pTarget2; + + void Reset() + { + if(!pInstance) return; + bsw->resetTimers(); + stage = 0; + m_creature->SetRespawnDelay(7*DAY); + } + + void KilledUnit(Unit* pVictim) + { + switch (urand(0,1)) { + case 0: + DoScriptText(-1631421,m_creature,pVictim); + break; + case 1: + DoScriptText(-16311422,m_creature,pVictim); + break; + } + } + + void JustReachedHome() + { + if (!pInstance) return; + pInstance->SetData(TYPE_SINDRAGOSA, FAIL); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_RIMEFANG))) + pTemp->Respawn(); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_SPINESTALKER))) + pTemp->Respawn(); + DoScriptText(-1631422,m_creature); + m_creature->ForcedDespawn(); + } + + void Aggro(Unit *who) + { + if(!pInstance) return; + DoScriptText(-16311420,m_creature,who); + bsw->doCast(SPELL_FROST_AURA_1); + } + + void JustDied(Unit *killer) + { + if(!pInstance) return; + pInstance->SetData(TYPE_SINDRAGOSA, DONE); + DoScriptText(-16311423,m_creature,killer); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + switch(stage) + { + case 0: + bsw->timedCast(SPELL_CLEAVE_1, diff); + bsw->timedCast(SPELL_TAIL_SMASH, diff); + bsw->timedCast(SPELL_FROST_BREATH, diff); + bsw->timedCast(SPELL_PERMEATING_CHILL, diff); + + bsw->timedCast(SPELL_UNCHAINED_MAGIC, diff); + if (bsw->timedQuery(SPELL_ICY_GRIP, diff)) + { + bsw->doCast(SPELL_ICY_GRIP); + bsw->doCast(SPELL_BLISTERING_COLD); + DoScriptText(-16311426,m_creature); + } + + if (bsw->timedQuery(SPELL_FROST_BEACON, diff) && m_creature->GetHealthPercent() < 85.0f) stage = 1; + break; + case 1: + DoScriptText(-1631425,m_creature); + bsw->doCast(SPELL_FROST_BEACON); + stage = 2; + break; + case 2: + bsw->timedCast(SPELL_ICY_TOMB, diff); + bsw->timedCast(SPELL_FROST_BOMB, diff); + if (bsw->timedQuery(SPELL_FROST_BEACON, diff)) stage = 0; + break; + case 3: + bsw->timedCast(SPELL_CLEAVE_1, diff); + bsw->timedCast(SPELL_TAIL_SMASH, diff); + bsw->timedCast(SPELL_FROST_BREATH, diff); + bsw->timedCast(SPELL_PERMEATING_CHILL, diff); + bsw->timedCast(SPELL_UNCHAINED_MAGIC, diff); + bsw->timedCast(SPELL_MYSTIC_BUFFET, diff); + if (bsw->timedQuery(SPELL_ICY_GRIP, diff)) + { + bsw->doCast(SPELL_ICY_GRIP); + bsw->doCast(SPELL_BLISTERING_COLD); + DoScriptText(-16311426,m_creature); + } + break; + default: break; + } + + if (m_creature->GetHealthPercent() < 35.0f) + { + stage = 3; + DoScriptText(-1631429,m_creature); + } + + + DoMeleeAttackIfReady(); + } +}; + + +CreatureAI* GetAI_boss_sindragosa(Creature* pCreature) +{ + return new boss_sindragosaAI(pCreature); +} + +struct MANGOS_DLL_DECL mob_ice_tombAI : public ScriptedAI +{ + mob_ice_tombAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + Reset(); + } + + ScriptedInstance *m_pInstance; + Unit* pVictim; + + void Reset() + { + SetCombatMovement(false); + m_creature->SetInCombatWithZone(); + pVictim = NULL; + } + + void Aggro(Unit* pWho) + { + if (!pVictim && pWho) { + pVictim = pWho; + m_creature->SetInCombatWith(pVictim); + } + } + + void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + { + if (uiDamage > m_creature->GetHealth()) + if (pVictim) pVictim->RemoveAurasDueToSpell(SPELL_ICY_TOMB); + } + + void KilledUnit(Unit* _Victim) + { + if (pVictim) pVictim->RemoveAurasDueToSpell(SPELL_ICY_TOMB); + } + + void JustDied(Unit* Killer) + { + if (pVictim) pVictim->RemoveAurasDueToSpell(SPELL_ICY_TOMB); + } + + void UpdateAI(const uint32 uiDiff) + { + if(m_pInstance && m_pInstance->GetData(TYPE_SINDRAGOSA) != IN_PROGRESS) + { + if (pVictim) pVictim->RemoveAurasDueToSpell(SPELL_ICY_TOMB); + m_creature->ForcedDespawn(); + } + + } + +}; + +CreatureAI* GetAI_mob_ice_tomb(Creature* pCreature) +{ + return new mob_ice_tombAI(pCreature); +} + struct MANGOS_DLL_DECL mob_rimefangAI : public ScriptedAI { mob_rimefangAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -169,6 +376,11 @@ void AddSC_boss_sindragosa() { Script *newscript; + newscript = new Script; + newscript->Name = "boss_sindragosa"; + newscript->GetAI = &GetAI_boss_sindragosa; + newscript->RegisterSelf(); + newscript = new Script; newscript->Name = "mob_rimefang"; newscript->GetAI = &GetAI_mob_rimefang; @@ -179,4 +391,9 @@ void AddSC_boss_sindragosa() newscript->GetAI = &GetAI_mob_spinestalker; newscript->RegisterSelf(); + newscript = new Script; + newscript->Name = "mob_ice_tomb"; + newscript->GetAI = &GetAI_mob_ice_tomb; + newscript->RegisterSelf(); + } From 8bfed14f8b0be2b136ad250b2de7dc3c9ab3ae80 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 5 May 2010 01:03:12 +0400 Subject: [PATCH 280/405] BSW change to SD2 change related to mangos 9832 --- include/sc_boss_spell_worker.cpp | 36 ++----------------- include/sc_boss_spell_worker.h | 7 ---- .../boss_anubarak_trial.cpp | 2 +- .../boss_northrend_beasts.cpp | 2 +- 4 files changed, 4 insertions(+), 43 deletions(-) diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index 3687ff53d..ed7097ab1 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -159,12 +159,12 @@ CanCastResult BossSpellWorker::_BSWSpellSelector(uint8 m_uiSpellIdx, Unit* pTarg break; case CAST_ON_RANDOM: - pTarget = SelectUnit(SELECT_TARGET_RANDOM); + pTarget = boss->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); return _BSWCastOnTarget(pTarget, m_uiSpellIdx); break; case CAST_ON_BOTTOMAGGRO: - pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); + pTarget = boss->SelectAttackingTarget(ATTACKING_TARGET_BOTTOMAGGRO,0); return _BSWCastOnTarget(pTarget, m_uiSpellIdx); break; @@ -535,38 +535,6 @@ CanCastResult BossSpellWorker::_DoCastSpellIfCan(Unit* pTarget, uint32 uiSpell, // Copypasting from sc_creature.cpp :( Hung if call from bossAI-> -Unit* BossSpellWorker::_SelectUnit(SelectAggroTarget target, uint32 uiPosition) -{ - //ThreatList m_threatlist; - ThreatList const& threatlist = boss->getThreatManager().getThreatList(); - ThreatList::const_iterator itr = threatlist.begin(); - ThreatList::const_reverse_iterator ritr = threatlist.rbegin(); - - if (uiPosition >= threatlist.size() || threatlist.empty()) - return NULL; - - switch (target) - { - case SELECT_TARGET_RANDOM: - advance(itr, uiPosition + (rand() % (threatlist.size() - uiPosition))); - return Unit::GetUnit((*boss),(*itr)->getUnitGuid()); - break; - - case SELECT_TARGET_TOPAGGRO: - advance(itr, uiPosition); - return Unit::GetUnit((*boss),(*itr)->getUnitGuid()); - break; - - case SELECT_TARGET_BOTTOMAGGRO: - advance(ritr, uiPosition); - return Unit::GetUnit((*boss),(*ritr)->getUnitGuid()); - break; - } - - error_log("BSW: Cannot find target for spell :("); - return NULL; -} - Unit* BossSpellWorker::SelectLowHPFriendly(float fRange, uint32 uiMinHPDiff) { CellPair p(MaNGOS::ComputeCellPair(boss->GetPositionX(), boss->GetPositionY())); diff --git a/include/sc_boss_spell_worker.h b/include/sc_boss_spell_worker.h index c4311667e..f621ba060 100644 --- a/include/sc_boss_spell_worker.h +++ b/include/sc_boss_spell_worker.h @@ -170,11 +170,6 @@ class MANGOS_DLL_DECL BossSpellWorker return _BSWDoCast(FindSpellIDX(SpellID), pTarget); }; - Unit* SelectUnit(SelectAggroTarget target = SELECT_TARGET_RANDOM, uint32 uiPosition = 0) - { - return _SelectUnit(target, uiPosition); - }; - Unit* SelectLowHPFriendly(float fRange = 40.0f, uint32 uiMinHPDiff = 0); uint8 bossSpellCount() @@ -212,8 +207,6 @@ class MANGOS_DLL_DECL BossSpellWorker CanCastResult _CanCastSpell(Unit* pTarget, const SpellEntry *pSpell, bool isTriggered = false); - Unit* _SelectUnit(SelectAggroTarget target, uint32 uiPosition); - bool _doRemove(uint8 m_uiSpellIdx, Unit* pTarget = NULL, SpellEffectIndex index = EFFECT_INDEX_0); bool _hasAura(uint8 m_uiSpellIdx, Unit* pTarget); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp index 2be507bbb..f67ea0540 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp @@ -149,7 +149,7 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI break;} case 2: { if (bsw->timedQuery(SPELL_SPIKE_CALL, uiDiff)) { - pTarget = bsw->SelectUnit(); + pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); // bsw->doCast(SPELL_SPIKE_CALL); // This summon not supported in database. Temporary override. Unit* spike = bsw->doSummon(NPC_SPIKE,TEMPSUMMON_TIMED_DESPAWN,60000); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index 29b4c7aa1..c982c21ba 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -574,7 +574,7 @@ struct MANGOS_DLL_DECL boss_icehowlAI : public ScriptedAI break; } case 2: { - if (pTarget = bsw->SelectUnit()) { + if (pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) { TrampleCasted = false; m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); stage = 3; From c12729f633f2b34ac7b783216928b442ae1fd6e3 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 5 May 2010 01:06:08 +0400 Subject: [PATCH 281/405] Changes related to commit 9832 --- ...rial_of_crusader_spelltable_scriptdev2.sql | 9 ++--- include/sc_boss_spell_worker.cpp | 36 ++----------------- include/sc_boss_spell_worker.h | 7 ---- .../boss_anubarak_trial.cpp | 2 +- .../boss_northrend_beasts.cpp | 2 +- 5 files changed, 9 insertions(+), 47 deletions(-) diff --git a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql index 1b48f26ba..8ab4538c2 100644 --- a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql +++ b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql @@ -5,10 +5,10 @@ DELETE FROM `boss_spell_table` WHERE `entry` IN -- Eydis Darkbane INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES (34496, 64238, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), -(34496, 65768, 67262, 67263, 67264, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34496, 65768, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), (34496, 65874, 67256, 67257, 67258, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), (34496, 65876, 67306, 67307, 67308, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), -(34496, 65879, 67244, 67245, 67246, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), +(34496, 65879, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), (34496, 65916, 67248, 67249, 67250, 15000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), (34496, 66058, 67182, 67183, 67184, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), (34496, 66069, 67309, 67310, 67311, 10000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), @@ -20,13 +20,14 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMa -- Fjola Lightbane INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES (34497, 64238, 64238, 64238, 64238, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), -(34497, 65766, 67270, 67271, 67272, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34497, 65766, 67270, 67271, 67272, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), (34497, 65858, 67259, 67260, 67261, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), (34497, 65875, 67303, 67304, 67305, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), +(34497, 65879, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), (34497, 65916, 67248, 67249, 67250, 15000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), (34497, 66046, 67206, 67207, 67208, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), (34497, 66075, 67312, 67313, 67314, 10000, 10000, 10000, 10000, 20000, 20000, 20000, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), -(34497, 67297, 67297, 67298, 67298, 10000, 10000, 10000, 10000, 15000, 15000, 15000, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL); +(34497, 67297, 0, 0, 0, 10000, 10000, 10000, 10000, 15000, 15000, 15000, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL); -- summons INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMax_N10`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType` ) VALUES (34497, 34630, 20000, 20000, 1, 1, 2, 2, 10, 100, 0, 11); diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index 3687ff53d..ed7097ab1 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -159,12 +159,12 @@ CanCastResult BossSpellWorker::_BSWSpellSelector(uint8 m_uiSpellIdx, Unit* pTarg break; case CAST_ON_RANDOM: - pTarget = SelectUnit(SELECT_TARGET_RANDOM); + pTarget = boss->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); return _BSWCastOnTarget(pTarget, m_uiSpellIdx); break; case CAST_ON_BOTTOMAGGRO: - pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); + pTarget = boss->SelectAttackingTarget(ATTACKING_TARGET_BOTTOMAGGRO,0); return _BSWCastOnTarget(pTarget, m_uiSpellIdx); break; @@ -535,38 +535,6 @@ CanCastResult BossSpellWorker::_DoCastSpellIfCan(Unit* pTarget, uint32 uiSpell, // Copypasting from sc_creature.cpp :( Hung if call from bossAI-> -Unit* BossSpellWorker::_SelectUnit(SelectAggroTarget target, uint32 uiPosition) -{ - //ThreatList m_threatlist; - ThreatList const& threatlist = boss->getThreatManager().getThreatList(); - ThreatList::const_iterator itr = threatlist.begin(); - ThreatList::const_reverse_iterator ritr = threatlist.rbegin(); - - if (uiPosition >= threatlist.size() || threatlist.empty()) - return NULL; - - switch (target) - { - case SELECT_TARGET_RANDOM: - advance(itr, uiPosition + (rand() % (threatlist.size() - uiPosition))); - return Unit::GetUnit((*boss),(*itr)->getUnitGuid()); - break; - - case SELECT_TARGET_TOPAGGRO: - advance(itr, uiPosition); - return Unit::GetUnit((*boss),(*itr)->getUnitGuid()); - break; - - case SELECT_TARGET_BOTTOMAGGRO: - advance(ritr, uiPosition); - return Unit::GetUnit((*boss),(*ritr)->getUnitGuid()); - break; - } - - error_log("BSW: Cannot find target for spell :("); - return NULL; -} - Unit* BossSpellWorker::SelectLowHPFriendly(float fRange, uint32 uiMinHPDiff) { CellPair p(MaNGOS::ComputeCellPair(boss->GetPositionX(), boss->GetPositionY())); diff --git a/include/sc_boss_spell_worker.h b/include/sc_boss_spell_worker.h index c4311667e..f621ba060 100644 --- a/include/sc_boss_spell_worker.h +++ b/include/sc_boss_spell_worker.h @@ -170,11 +170,6 @@ class MANGOS_DLL_DECL BossSpellWorker return _BSWDoCast(FindSpellIDX(SpellID), pTarget); }; - Unit* SelectUnit(SelectAggroTarget target = SELECT_TARGET_RANDOM, uint32 uiPosition = 0) - { - return _SelectUnit(target, uiPosition); - }; - Unit* SelectLowHPFriendly(float fRange = 40.0f, uint32 uiMinHPDiff = 0); uint8 bossSpellCount() @@ -212,8 +207,6 @@ class MANGOS_DLL_DECL BossSpellWorker CanCastResult _CanCastSpell(Unit* pTarget, const SpellEntry *pSpell, bool isTriggered = false); - Unit* _SelectUnit(SelectAggroTarget target, uint32 uiPosition); - bool _doRemove(uint8 m_uiSpellIdx, Unit* pTarget = NULL, SpellEffectIndex index = EFFECT_INDEX_0); bool _hasAura(uint8 m_uiSpellIdx, Unit* pTarget); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp index 2be507bbb..f67ea0540 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp @@ -149,7 +149,7 @@ struct MANGOS_DLL_DECL boss_anubarak_trialAI : public ScriptedAI break;} case 2: { if (bsw->timedQuery(SPELL_SPIKE_CALL, uiDiff)) { - pTarget = bsw->SelectUnit(); + pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); // bsw->doCast(SPELL_SPIKE_CALL); // This summon not supported in database. Temporary override. Unit* spike = bsw->doSummon(NPC_SPIKE,TEMPSUMMON_TIMED_DESPAWN,60000); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index 29b4c7aa1..c982c21ba 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -574,7 +574,7 @@ struct MANGOS_DLL_DECL boss_icehowlAI : public ScriptedAI break; } case 2: { - if (pTarget = bsw->SelectUnit()) { + if (pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) { TrampleCasted = false; m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); stage = 3; From fca09c3ffc38dd6f9c1880e48393b16702aa0225 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 5 May 2010 12:59:03 +0400 Subject: [PATCH 282/405] Marrowgar change --- .../icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp index ed7237775..5ae847fb0 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp @@ -139,6 +139,7 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI break;} case 1: { + m_creature->InterruptNonMeleeSpells(true); bsw->doCast(SPELL_BONE_STORM); stage = 2; DoScriptText(-1631002,m_creature); From aecccae22c0dddaffbdf4cb9fcb75a529c1253da Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 5 May 2010 13:55:32 +0400 Subject: [PATCH 283/405] Changes after 9832 --- .../culling_of_stratholme/boss_lord_epoch.cpp | 6 +++--- .../culling_of_stratholme/boss_malganis.cpp | 6 +++--- .../culling_of_stratholme/boss_meathook.cpp | 4 ++-- .../culling_of_stratholme/boss_salramm.cpp | 6 +++--- .../culling_of_stratholme/culling_of_stratholme.cpp | 2 +- .../northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp | 4 ++-- .../northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp | 2 +- .../northrend/azjol-nerub/ahnkahet/boss_volazj.cpp | 4 ++-- .../trial_of_the_champion/boss_argent_challenge.cpp | 12 ++++++------ .../trial_of_the_champion/boss_black_knight.cpp | 6 +++--- .../trial_of_the_champion/boss_grand_champions.cpp | 4 ++-- .../trial_of_the_crusader/boss_faction_champions.cpp | 4 ++-- .../trial_of_the_crusader/boss_jaraxxus.cpp | 4 ++-- scripts/northrend/draktharon_keep/boss_novos.cpp | 6 +++--- scripts/northrend/draktharon_keep/boss_tharonja.cpp | 6 +++--- .../frozen_halls/forge_of_souls/boss_bronjahm.cpp | 2 +- .../frozen_halls/halls_of_reflection/boss_falryn.cpp | 10 +++++----- .../frozen_halls/halls_of_reflection/boss_marwyn.cpp | 8 ++++---- .../icecrown_citadel/boss_deathbringer_saurfang.cpp | 8 ++++---- .../icecrown_citadel/boss_lady_deathwhisper.cpp | 8 ++++---- .../icecrown_citadel/boss_lord_marrowgar.cpp | 4 ++-- scripts/northrend/naxxramas/boss_anubrekhan.cpp | 2 +- scripts/northrend/naxxramas/boss_gothik.cpp | 2 +- scripts/northrend/naxxramas/boss_grobbulus.cpp | 4 ++-- scripts/northrend/naxxramas/boss_kelthuzad.cpp | 8 ++++---- scripts/northrend/naxxramas/boss_loatheb.cpp | 2 +- scripts/northrend/naxxramas/boss_maexxna.cpp | 4 ++-- scripts/northrend/naxxramas/boss_noth.cpp | 4 ++-- .../ulduar/halls_of_stone/boss_krystallus.cpp | 4 ++-- .../ulduar/halls_of_stone/boss_maiden_of_grief.cpp | 2 +- .../northrend/ulduar/halls_of_stone/boss_sjonnir.cpp | 4 ++-- .../ulduar/halls_of_stone/halls_of_stone.cpp | 6 +++--- scripts/northrend/ulduar/ulduar/boss_auriaya.cpp | 4 ++-- scripts/northrend/ulduar/ulduar/boss_freya.cpp | 12 ++++++------ scripts/northrend/ulduar/ulduar/boss_hodir.cpp | 2 +- scripts/northrend/ulduar/ulduar/boss_ignis.cpp | 4 ++-- .../northrend/ulduar/ulduar/boss_iron_council.cpp | 6 +++--- scripts/northrend/ulduar/ulduar/boss_kologarn.cpp | 6 +++--- scripts/northrend/ulduar/ulduar/boss_leviathan.cpp | 2 +- scripts/northrend/ulduar/ulduar/boss_razorscale.cpp | 4 ++-- scripts/northrend/ulduar/ulduar/boss_xt_002.cpp | 10 +++++----- .../northrend/vault_of_archavon/boss_archavon.cpp | 2 +- scripts/northrend/vault_of_archavon/boss_emalon.cpp | 4 ++-- scripts/northrend/vault_of_archavon/boss_koralon.cpp | 2 +- scripts/northrend/violet_hold/boss_cyanigosa.cpp | 4 ++-- scripts/northrend/violet_hold/boss_erekem.cpp | 4 ++-- scripts/northrend/violet_hold/boss_moragg.cpp | 4 ++-- scripts/northrend/violet_hold/boss_xevozz.cpp | 2 +- scripts/northrend/violet_hold/boss_zuramat.cpp | 2 +- scripts/northrend/violet_hold/violet_hold.cpp | 4 ++-- 50 files changed, 118 insertions(+), 118 deletions(-) diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_lord_epoch.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_lord_epoch.cpp index dbe6fea9d..99dd4cd3e 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_lord_epoch.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_lord_epoch.cpp @@ -156,7 +156,7 @@ struct MANGOS_DLL_DECL boss_lord_epochAI : public ScriptedAI if (Course_Timer < diff) { - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) DoCast(target, SPELL_COURSE); Course_Timer = 9300; @@ -176,7 +176,7 @@ struct MANGOS_DLL_DECL boss_lord_epochAI : public ScriptedAI if (Stop_Timer < diff) { - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) DoCast(target, SPELL_TIME_STOP); Stop_Timer = 21300; @@ -186,7 +186,7 @@ struct MANGOS_DLL_DECL boss_lord_epochAI : public ScriptedAI if (Warp_Timer < diff) { - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) DoCast(target, SPELL_TIME_WARP); switch(rand()%3) diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_malganis.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_malganis.cpp index f88eae62e..89003f4fc 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_malganis.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_malganis.cpp @@ -154,7 +154,7 @@ struct MANGOS_DLL_DECL boss_malganisAI : public ScriptedAI if (Swamp_Timer < diff) { - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) DoCast(target, m_bIsHeroic ? SPELL_SWAMP_H : SPELL_SWAMP_N); Swamp_Timer = 7300; @@ -164,7 +164,7 @@ struct MANGOS_DLL_DECL boss_malganisAI : public ScriptedAI if (MindBlast_Timer < diff) { - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) DoCast(target, m_bIsHeroic ? SPELL_MIND_BLAST_H : SPELL_MIND_BLAST_N); MindBlast_Timer = 11300; @@ -182,7 +182,7 @@ struct MANGOS_DLL_DECL boss_malganisAI : public ScriptedAI if (Sleep_Timer < diff) { - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) DoCast(target, m_bIsHeroic ? SPELL_SLEEP_H : SPELL_SLEEP_N); switch(rand()%2) { diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_meathook.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_meathook.cpp index 370bbca44..47624ab92 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_meathook.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_meathook.cpp @@ -108,7 +108,7 @@ struct MANGOS_DLL_DECL boss_meathookAI : public ScriptedAI if (Chain_Timer < diff) { - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) DoCast(target, m_bIsHeroic ? SPELL_CHAIN_H : SPELL_CHAIN_N); Chain_Timer = 6300; @@ -118,7 +118,7 @@ struct MANGOS_DLL_DECL boss_meathookAI : public ScriptedAI if (Exploded_Timer < diff) { - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) DoCast(target, m_bIsHeroic ? SPELL_EXPLODED_H : SPELL_EXPLODED_N); Exploded_Timer = 9300; diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_salramm.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_salramm.cpp index 3cb457324..59442e7ae 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_salramm.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_salramm.cpp @@ -139,7 +139,7 @@ struct MANGOS_DLL_DECL boss_salrammAI : public ScriptedAI if (ShadowBolt_Timer < diff) { - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) DoCast(target, m_bIsHeroic ? SPELL_SB_H : SPELL_SB_N); ShadowBolt_Timer = 5300; @@ -149,7 +149,7 @@ struct MANGOS_DLL_DECL boss_salrammAI : public ScriptedAI if (Flesh_Timer < diff) { - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) DoCast(target,SPELL_FLESH); Flesh_Timer = 7300; @@ -159,7 +159,7 @@ struct MANGOS_DLL_DECL boss_salrammAI : public ScriptedAI if (Steal_Timer < diff) { - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) DoCast(target,SPELL_STEAL); switch(rand()%3) diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp index 99339172e..7376a6226 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp @@ -410,7 +410,7 @@ struct MANGOS_DLL_DECL npc_arthasAI : public npc_escortAI if (Exorcism_Timer < diff) { - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) DoCast(target, m_bIsHeroic ? SPELL_EXORCISM_H : SPELL_EXORCISM_N); Exorcism_Timer = 7300; diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp index a3c43c0c8..34c3bb4eb 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp @@ -435,7 +435,7 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI //Lightning Bolt if(m_uiLightningBoltTimer <= uiDiff) { - if(Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + if(Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) DoCast(pTarget, m_bIsRegularMode ? SPELL_LIGHTNING_BOLT : SPELL_LIGHTNING_BOLT_H); m_uiLightningBoltTimer = 3000 + rand()%2000; }else m_uiLightningBoltTimer -= uiDiff; @@ -443,7 +443,7 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI //Thundershock if(m_uiThundershockTimer <= uiDiff) { - if(Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + if(Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) DoCast(pTarget, m_bIsRegularMode ? SPELL_THUNDERSHOCK : SPELL_THUNDERSHOCK_H); m_uiThundershockTimer = 20000 + rand()%10000; }else m_uiThundershockTimer -= uiDiff; diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp index 6b95781e1..6b2acebda 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp @@ -211,7 +211,7 @@ struct MANGOS_DLL_DECL boss_taldaramAI : public ScriptedAI //DoCast(m_creature, SPELL_VANISH); We dont want to drop aggro m_uiVanishPhase = 1; - if (m_uEmbraceTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + if (m_uEmbraceTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) m_creature->GetMotionMaster()->MoveChase(m_uEmbraceTarget); m_creature->SetVisibility(VISIBILITY_OFF); diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp index 3252032d3..e190ed489 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp @@ -240,7 +240,7 @@ struct MANGOS_DLL_DECL boss_volazjAI : public ScriptedAI { if(m_uiShiverJumpTimer == 3) { - if(Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + if(Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) { DoCast(pTarget, m_bIsRegularMode ? SPELL_SHIVER : SPELL_SHIVER_H); m_pLastShiverTarget = ((Player*)pTarget); @@ -249,7 +249,7 @@ struct MANGOS_DLL_DECL boss_volazjAI : public ScriptedAI }else m_uiShiverJumpTimer++; } }else{ - if(Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + if(Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) { DoCast(pTarget, m_bIsRegularMode ? SPELL_SHIVER : SPELL_SHIVER_H); m_pLastShiverTarget = ((Player*)pTarget); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp index ed0018f8f..cd7f77311 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp @@ -121,7 +121,7 @@ struct MANGOS_DLL_DECL boss_eadricAI : public ScriptedAI if (Hammer_Timer < diff) { - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) { DoCast(target, SPELL_HAMMER_OF_JUSTICE); HammerTarget = target->GetGUID(); @@ -193,7 +193,7 @@ struct MANGOS_DLL_DECL boss_paletressAI : public ScriptedAI void JustSummoned(Creature* _summoned) { - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) _summoned->AddThreat(target); summoned = true; } @@ -220,7 +220,7 @@ struct MANGOS_DLL_DECL boss_paletressAI : public ScriptedAI if (Smite_Timer < diff) { - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) DoCast(target, m_bIsRegularMode ? SPELL_SMITE : SPELL_SMITE_H); Smite_Timer = 2000; }else Smite_Timer -= diff; @@ -228,7 +228,7 @@ struct MANGOS_DLL_DECL boss_paletressAI : public ScriptedAI if (Holy_Fire_Timer < diff) { m_creature->CastStop(m_bIsRegularMode ? SPELL_SMITE : SPELL_SMITE_H); - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) DoCast(target, m_bIsRegularMode ? SPELL_HOLY_FIRE : SPELL_HOLY_FIRE_H); Holy_Fire_Timer = m_bIsRegularMode ? 10000 : 7000; }else Holy_Fire_Timer -= diff; @@ -386,7 +386,7 @@ struct MANGOS_DLL_DECL mob_toc5_memoryAI : public ScriptedAI if (Old_Wounds_Timer < diff) { - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) DoCast(target, m_bIsRegularMode ? SPELL_OLD_WOUNDS : SPELL_OLD_WOUNDS_H); Old_Wounds_Timer = 10000; }else Old_Wounds_Timer -= diff; @@ -399,7 +399,7 @@ struct MANGOS_DLL_DECL mob_toc5_memoryAI : public ScriptedAI if (Shadows_Timer < diff) { - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1)) + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,1)) DoCast(target, m_bIsRegularMode ? SPELL_SHADOWS : SPELL_SHADOWS_H); Shadows_Timer = 10000; }else Shadows_Timer -= diff; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp index 8c5ec774d..2c619255b 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp @@ -89,7 +89,7 @@ struct MANGOS_DLL_DECL mob_toc5_risen_ghoulAI : public ScriptedAI if (m_creature->IsWithinDistInMap(m_creature->getVictim(), 4)) { DoCast(m_creature->getVictim(), SPELL_CLAW); - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1)) + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,1)) m_creature->AI()->AttackStart(target); Attack = 2500; }else @@ -252,7 +252,7 @@ struct MANGOS_DLL_DECL boss_black_knightAI : public ScriptedAI if (Choke_Timer < diff && phase1) { - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1)) + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,1)) DoCast(m_creature->getVictim(), SPELL_CHOKE); Choke_Timer = m_bIsRegularMode ? 15000 : 10000; }else Choke_Timer -= diff; @@ -268,7 +268,7 @@ struct MANGOS_DLL_DECL boss_black_knightAI : public ScriptedAI if (Mark_Timer < diff && phase3) { - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1)) + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,1)) DoCast(target, SPELL_MARK); Mark_Timer = m_bIsRegularMode ? 15000 : 10000; }else Mark_Timer -= diff; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp index 51f893fc8..be9a78065 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp @@ -282,7 +282,7 @@ struct MANGOS_DLL_DECL mob_toc5_mageAI : public ScriptedAI if (Polymorph_Timer < diff) { - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) DoCast(target, m_bIsRegularMode ? SPELL_POLYMORPH : SPELL_POLYMORPH_H); Polymorph_Timer = m_bIsRegularMode ? 20000 : 15000; }else Polymorph_Timer -= diff; @@ -696,7 +696,7 @@ struct MANGOS_DLL_DECL mob_toc5_rogueAI : public ScriptedAI if (Poison_Timer < diff) { - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) DoCast(m_creature, SPELL_POISON_BOTTLE); Poison_Timer = m_bIsRegularMode ? 10000 : 5000; }else Poison_Timer -= diff; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp index 4e256380e..0a5846bdd 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp @@ -413,7 +413,7 @@ struct MANGOS_DLL_DECL mob_toc_priestAI : public boss_faction_championsAI bsw->doCast(SPELL_FLASH_HEAL); break; case 4: - if(Unit *target = urand(0,1) ? SelectUnit(SELECT_TARGET_RANDOM,0) : DoSelectLowestHpFriendly(40.0f)) + if(Unit *target = urand(0,1) ? m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0) : DoSelectLowestHpFriendly(40.0f)) bsw->doCast(target, SPELL_DISPEL); break; case 5: @@ -834,7 +834,7 @@ struct MANGOS_DLL_DECL mob_toc_rogueAI : public boss_faction_championsAI if(m_creature->IsInRange(m_creature->getVictim(), 10.0f, 40.0f)) bsw->timedCast(SPELL_SHADOWSTEP, diff); - if(Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1)) + if(Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,1)) if(m_creature->IsInRange(target, 0.0f, 15.0f, false)) bsw->timedCast(SPELL_BLIND, diff, target); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp index 2d81e654f..e6630f287 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp @@ -135,7 +135,7 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI bsw->timedCast(SPELL_FEL_LIGHTING, uiDiff); if (bsw->timedQuery(SPELL_INCINERATE_FLESH, uiDiff)) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,1)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,1)) { DoScriptText(-1713522,m_creature,pTarget); bsw->doCast(SPELL_INCINERATE_FLESH,pTarget); @@ -188,7 +188,7 @@ struct MANGOS_DLL_DECL mob_legion_flameAI : public ScriptedAI m_creature->SetInCombatWithZone(); m_creature->SetRespawnDelay(DAY); - if (Unit* pTarget= SelectUnit(SELECT_TARGET_RANDOM, 0) ) { + if (Unit* pTarget= m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0) ) { m_creature->GetMotionMaster()->MoveChase(pTarget); m_creature->SetSpeedRate(MOVE_RUN, 0.5); } diff --git a/scripts/northrend/draktharon_keep/boss_novos.cpp b/scripts/northrend/draktharon_keep/boss_novos.cpp index bf4c852b2..9f477dda9 100644 --- a/scripts/northrend/draktharon_keep/boss_novos.cpp +++ b/scripts/northrend/draktharon_keep/boss_novos.cpp @@ -154,9 +154,9 @@ struct MANGOS_DLL_DECL boss_novosAI : public ScriptedAI switch(urand(0, 1)) { case 0: - DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), m_bIsRegularMode ? SPELL_WRATH_OF_MISERY : H_SPELL_WRATH_OF_MISERY); + DoCast(m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0), m_bIsRegularMode ? SPELL_WRATH_OF_MISERY : H_SPELL_WRATH_OF_MISERY); case 1: - DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), m_bIsRegularMode ? SPELL_BLIZZARD : H_SPELL_BLIZZARD); + DoCast(m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0), m_bIsRegularMode ? SPELL_BLIZZARD : H_SPELL_BLIZZARD); } SpecialCast_Timer = urand(10000, 15000); }else ArcaneBlast_Timer -= uiDiff; @@ -164,7 +164,7 @@ struct MANGOS_DLL_DECL boss_novosAI : public ScriptedAI //Regual cast - frostbolt if (Cast_Timer < uiDiff && ArcaneBlast_Timer > uiDiff && SpecialCast_Timer > uiDiff) { - DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), m_bIsRegularMode ? SPELL_FROSTBOLT : H_SPELL_FROSTBOLT); + DoCast(m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0), m_bIsRegularMode ? SPELL_FROSTBOLT : H_SPELL_FROSTBOLT); Cast_Timer = 1000; }else Cast_Timer -= uiDiff; diff --git a/scripts/northrend/draktharon_keep/boss_tharonja.cpp b/scripts/northrend/draktharon_keep/boss_tharonja.cpp index 3adfac3ea..d39f0325a 100644 --- a/scripts/northrend/draktharon_keep/boss_tharonja.cpp +++ b/scripts/northrend/draktharon_keep/boss_tharonja.cpp @@ -199,7 +199,7 @@ struct MANGOS_DLL_DECL boss_tharonjaAI : public ScriptedAI if (PoisonCloud_Timer < uiDiff) { - DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), m_bIsRegularMode ? SPELL_POISON_CLOUD : H_SPELL_POSION_CLOUD); + DoCast(m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0), m_bIsRegularMode ? SPELL_POISON_CLOUD : H_SPELL_POSION_CLOUD); PoisonCloud_Timer = 10000; }else PoisonCloud_Timer -= uiDiff; @@ -210,9 +210,9 @@ struct MANGOS_DLL_DECL boss_tharonjaAI : public ScriptedAI case 0: case 1: case 2: - DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), m_bIsRegularMode ? SPELL_LIGHTNING_BREATH : H_SPELL_LIGHTNING_BREATH); + DoCast(m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0), m_bIsRegularMode ? SPELL_LIGHTNING_BREATH : H_SPELL_LIGHTNING_BREATH); case 3: - DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), m_bIsRegularMode ? SPELL_EYE_BEAM : SPELL_EYE_BEAM); + DoCast(m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0), m_bIsRegularMode ? SPELL_EYE_BEAM : SPELL_EYE_BEAM); } FleshSpells_Timer = 1500; }else FleshSpells_Timer -= uiDiff; diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp index 2e7e4e24c..2c3dad4d8 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp @@ -98,7 +98,7 @@ struct MANGOS_DLL_DECL boss_bronjahmAI : public ScriptedAI case 0: if (bsw->timedQuery(SPELL_CORRUPT_SOUL, diff)) { - if (Unit* pTarget= SelectUnit(SELECT_TARGET_RANDOM, 0)) + if (Unit* pTarget= m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { if (bsw->doCast(SPELL_CORRUPT_SOUL, pTarget) == CAST_OK) { diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falryn.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falryn.cpp index bc7756a95..ff865600b 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falryn.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falryn.cpp @@ -169,21 +169,21 @@ struct MANGOS_DLL_DECL boss_falrynAI : public ScriptedAI case 0: { break;} case 1: { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) DoCast(pTarget, SPELL_HOPELESSNESS); stage = 2; break;} case 2: { break;} case 3: { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) DoCast(pTarget, SPELL_HOPELESSNESS); stage = 4; break;} case 4: { break;} case 5: { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) DoCast(pTarget, SPELL_HOPELESSNESS); stage = 6; break;} @@ -191,7 +191,7 @@ struct MANGOS_DLL_DECL boss_falrynAI : public ScriptedAI break;} } if (m_uiDespair_Timer < diff) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) DoCast(pTarget, SPELL_IMPENDING_DESPAIR); m_uiDespair_Timer= Regular ? 40000 : 30000; } else m_uiDespair_Timer -= diff; @@ -202,7 +202,7 @@ struct MANGOS_DLL_DECL boss_falrynAI : public ScriptedAI } else m_uiStrike_Timer -= diff; if (m_uiHorror_Timer < diff) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) DoCast(pTarget, Regular ? SPELL_DEFILING_HORROR_N : SPELL_DEFILING_HORROR_H); m_uiHorror_Timer=urand(25000,35000); } else m_uiHorror_Timer -= diff; diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_marwyn.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_marwyn.cpp index 9abedaa40..c4e08caf6 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_marwyn.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_marwyn.cpp @@ -175,25 +175,25 @@ struct MANGOS_DLL_DECL boss_marwynAI : public ScriptedAI break;} case 1: { if (m_uiSharedSuffering_Timer < diff) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) DoCast(pTarget, Regular ? SPELL_SHARED_SUFFERING_N : SPELL_SHARED_SUFFERING_H); m_uiSharedSuffering_Timer= 20000; } else m_uiSharedSuffering_Timer -= diff; if (m_uiWell_Timer < diff) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) DoCast(pTarget, SPELL_WELL_OF_CORRUPTION); m_uiWell_Timer= 30000; } else m_uiWell_Timer -= diff; /* if (m_uiTouch_Timer < diff) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) DoCast(pTarget, Regular ? SPELL_WELL_OF_CORRUPTION_N : SPELL_WELL_OF_CORRUPTION_H); m_uiTouch_Timer= 30000; } else m_uiTouch_Timer -= diff; */ if (m_uiFlesh_Timer < diff) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) DoCast(pTarget, Regular ? SPELL_CORRUPTED_FLESH_N : SPELL_CORRUPTED_FLESH_H); m_uiWell_Timer= 10000; } else m_uiWell_Timer -= diff; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp index d4ec23de5..2b5af5227 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp @@ -135,12 +135,12 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI if (bsw->timedQuery(SPELL_CALL_BLOOD_BEASTS, diff)) { if (Unit* pTemp = bsw->doSummon(NPC_BLOOD_BEASTS)) - if (Unit* pTarget= SelectUnit(SELECT_TARGET_RANDOM, 0) ) { + if (Unit* pTarget= m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0) ) { pTemp->AddThreat(pTarget, 100.0f); pTemp->GetMotionMaster()->MoveChase(pTarget); }; if (Unit* pTemp = bsw->doSummon(NPC_BLOOD_BEASTS)) - if (Unit* pTarget= SelectUnit(SELECT_TARGET_RANDOM, 0) ) { + if (Unit* pTarget= m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0) ) { pTemp->AddThreat(pTarget, 100.0f); pTemp->GetMotionMaster()->MoveChase(pTarget); }; @@ -149,12 +149,12 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI || Difficulty == RAID_DIFFICULTY_25MAN_HEROIC) { if (Unit* pTemp = bsw->doSummon(NPC_BLOOD_BEASTS)) - if (Unit* pTarget= SelectUnit(SELECT_TARGET_RANDOM, 0) ) { + if (Unit* pTarget= m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0) ) { pTemp->AddThreat(pTarget, 100.0f); pTemp->GetMotionMaster()->MoveChase(pTarget); }; if (Unit* pTemp = bsw->doSummon(NPC_BLOOD_BEASTS)) - if (Unit* pTarget= SelectUnit(SELECT_TARGET_RANDOM, 0) ) { + if (Unit* pTarget= m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0) ) { pTemp->AddThreat(pTarget, 100.0f); pTemp->GetMotionMaster()->MoveChase(pTarget); }; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp index 11da51129..dbcb40d05 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp @@ -147,18 +147,18 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI if (place < 2) { if (Unit* pTemp = bsw->doSummon(urand(0,1) ? NPC_FANATIC : NPC_ADHERENT, SpawnLoc[3*place+1].x, SpawnLoc[3*place+1].y, SpawnLoc[3*place+1].z)) - if (Unit* pTarget= SelectUnit(SELECT_TARGET_RANDOM, 0) ) { + if (Unit* pTarget= m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0) ) { pTemp->AddThreat(pTarget, 100.0f); pTemp->GetMotionMaster()->MoveChase(pTarget); }; if (Unit* pTemp = bsw->doSummon(urand(0,1) ? NPC_FANATIC : NPC_ADHERENT, SpawnLoc[3*place+3].x, SpawnLoc[3*place+3].y, SpawnLoc[3*place+3].z)) - if (Unit* pTarget= SelectUnit(SELECT_TARGET_RANDOM, 0) ) { + if (Unit* pTarget= m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0) ) { pTemp->AddThreat(pTarget, 100.0f); pTemp->GetMotionMaster()->MoveChase(pTarget); }; } if (Unit* pTemp = bsw->doSummon(urand(0,1) ? NPC_FANATIC : NPC_ADHERENT, SpawnLoc[3*place+2].x, SpawnLoc[3*place+2].y, SpawnLoc[3*place+2].z)) - if (Unit* pTarget= SelectUnit(SELECT_TARGET_RANDOM, 0) ) { + if (Unit* pTarget= m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0) ) { pTemp->AddThreat(pTarget, 100.0f); pTemp->GetMotionMaster()->MoveChase(pTarget); }; @@ -340,7 +340,7 @@ struct MANGOS_DLL_DECL mob_vengeful_shadeAI : public ScriptedAI m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); m_creature->SetInCombatWithZone(); - if (Unit* pTarget= SelectUnit(SELECT_TARGET_RANDOM, 0) ) { + if (Unit* pTarget= m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0) ) { m_creature->AddThreat(pTarget, 1000.0f); m_creature->GetMotionMaster()->MoveChase(pTarget); m_creature->SetSpeedRate(MOVE_RUN, 0.5); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp index 130ea1b25..f1e8c78d9 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp @@ -77,7 +77,7 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI /* void JustSummoned(Creature* _summoned) { - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1)) + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,1)) _summoned->AddThreat(target); } */ @@ -115,7 +115,7 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI { case 0: { if (bsw->timedQuery(SPELL_BONE_STRIKE, diff)) - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) if (bsw->doCast(SPELL_BONE_STRIKE, pTarget) == CAST_OK) { switch (urand(0,1)) { diff --git a/scripts/northrend/naxxramas/boss_anubrekhan.cpp b/scripts/northrend/naxxramas/boss_anubrekhan.cpp index 66fa0bef0..b6e01cf30 100644 --- a/scripts/northrend/naxxramas/boss_anubrekhan.cpp +++ b/scripts/northrend/naxxramas/boss_anubrekhan.cpp @@ -172,7 +172,7 @@ struct MANGOS_DLL_DECL boss_anubrekhanAI : public ScriptedAI void SummonGuard() { //DoCast(m_creature, SPELL_SUMMONGUARD); - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) m_creature->SummonCreature(NPC_CRYPT_GUARD, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000); } diff --git a/scripts/northrend/naxxramas/boss_gothik.cpp b/scripts/northrend/naxxramas/boss_gothik.cpp index d3bce746b..10f5bbfd0 100644 --- a/scripts/northrend/naxxramas/boss_gothik.cpp +++ b/scripts/northrend/naxxramas/boss_gothik.cpp @@ -200,7 +200,7 @@ struct MANGOS_DLL_DECL boss_gothikAI : public Scripted_NoMovementAI void JustSummoned(Creature* pSummon) { - pSummon->AI()->AttackStart(SelectUnit(SELECT_TARGET_RANDOM,0)); + pSummon->AI()->AttackStart(m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)); } void UpdateAI(const uint32 diff) diff --git a/scripts/northrend/naxxramas/boss_grobbulus.cpp b/scripts/northrend/naxxramas/boss_grobbulus.cpp index 3e3dd563d..4d0ba51e4 100644 --- a/scripts/northrend/naxxramas/boss_grobbulus.cpp +++ b/scripts/northrend/naxxramas/boss_grobbulus.cpp @@ -104,7 +104,7 @@ struct MANGOS_DLL_DECL boss_grobbulusAI : public ScriptedAI if(spell->Id == SPELL_SLIME_SPRAY || spell->Id == H_SPELL_SLIME_SPRAY) { if (Creature* pTemp = m_creature->SummonCreature(MOB_FALLOUT_SLIME, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000)) - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) { pTemp->AddThreat(pTarget,0.0f); pTemp->AI()->AttackStart(pTarget); @@ -125,7 +125,7 @@ struct MANGOS_DLL_DECL boss_grobbulusAI : public ScriptedAI if (MutatingInjection_Timer < diff) { - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) DoCast(target, SPELL_MUTATING_INJECTION); MutatingInjection_Timer = 20000; diff --git a/scripts/northrend/naxxramas/boss_kelthuzad.cpp b/scripts/northrend/naxxramas/boss_kelthuzad.cpp index 89140f795..a1f354779 100644 --- a/scripts/northrend/naxxramas/boss_kelthuzad.cpp +++ b/scripts/northrend/naxxramas/boss_kelthuzad.cpp @@ -278,7 +278,7 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI void Possess() { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,1)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,1)) { pTarget->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED); pTarget->setFaction(pTarget->getFaction()); @@ -390,7 +390,7 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI //Check for Mana Detonation if (ManaDetonation_Timer < diff) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,1)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,1)) if (pTarget->getPowerType() == POWER_MANA) { int32 curPower = pTarget->GetPower(POWER_MANA); @@ -426,7 +426,7 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI //Check for Shadow Fissure if (ShadowFisure_Timer < diff) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,1)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,1)) DoCast(pTarget,SPELL_SHADOW_FISURE); if (rand()%2) @@ -438,7 +438,7 @@ struct MANGOS_DLL_DECL boss_kelthuzadAI : public ScriptedAI //Check for Frost Blast if (FrostBlast_Timer < diff) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,1)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,1)) m_creature->CastSpell(pTarget,SPELL_FROST_BLAST,true); if (rand()%2) diff --git a/scripts/northrend/naxxramas/boss_loatheb.cpp b/scripts/northrend/naxxramas/boss_loatheb.cpp index a0df55dc8..58764edf9 100644 --- a/scripts/northrend/naxxramas/boss_loatheb.cpp +++ b/scripts/northrend/naxxramas/boss_loatheb.cpp @@ -157,7 +157,7 @@ struct MANGOS_DLL_DECL boss_loathebAI : public ScriptedAI pSummonedSpores = m_creature->SummonCreature(16286,ADD_3X,ADD_3Y,ADD_3Z,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000); if (pSummonedSpores) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) pSummonedSpores->AddThreat(pTarget); } diff --git a/scripts/northrend/naxxramas/boss_maexxna.cpp b/scripts/northrend/naxxramas/boss_maexxna.cpp index de8d72917..1a7cf8d5c 100644 --- a/scripts/northrend/naxxramas/boss_maexxna.cpp +++ b/scripts/northrend/naxxramas/boss_maexxna.cpp @@ -162,7 +162,7 @@ struct MANGOS_DLL_DECL boss_maexxnaAI : public ScriptedAI break; } - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,1)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,1)) { if (pWrapped) if (pTarget == pWrapped) @@ -181,7 +181,7 @@ struct MANGOS_DLL_DECL boss_maexxnaAI : public ScriptedAI float x,y,z; for(uint8 i = 0; number >= i; i++) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) { m_creature->GetRandomPoint(m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ(),7.0f,x,y,z); if(Creature* spiderling = m_creature->SummonCreature(NPC_SPIDERLING, x, y, z,0, TEMPSUMMON_DEAD_DESPAWN, 0)) diff --git a/scripts/northrend/naxxramas/boss_noth.cpp b/scripts/northrend/naxxramas/boss_noth.cpp index 76bdfe0f1..abf6ae926 100644 --- a/scripts/northrend/naxxramas/boss_noth.cpp +++ b/scripts/northrend/naxxramas/boss_noth.cpp @@ -155,7 +155,7 @@ struct MANGOS_DLL_DECL boss_nothAI : public ScriptedAI void JustSummoned(Creature* summoned) { - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) { summoned->AddThreat(target,0.0f); summoned->AI()->AttackStart(target); @@ -228,7 +228,7 @@ struct MANGOS_DLL_DECL boss_nothAI : public ScriptedAI //DoCast(m_creature, SPELL_BLINK); m_creature->GetMap()->CreatureRelocation(m_creature, 2670.804 + rand()%30, -3517.517 + rand()%30, 261.313, m_creature->GetOrientation()); DoResetThreat(); - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) AttackStart(pTarget); Blink_Timer = 25000; }else Blink_Timer -= diff; diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_krystallus.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_krystallus.cpp index caa3682e4..8f21afa69 100644 --- a/scripts/northrend/ulduar/halls_of_stone/boss_krystallus.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/boss_krystallus.cpp @@ -109,7 +109,7 @@ struct MANGOS_DLL_DECL boss_krystallusAI : public ScriptedAI if (m_uiToss_Timer < uiDiff) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) DoCast(pTarget, m_bIsRegularMode ? SPELL_BOULDER_TOSS_H : SPELL_BOULDER_TOSS); m_uiToss_Timer = 9000 + rand()%6000; } @@ -118,7 +118,7 @@ struct MANGOS_DLL_DECL boss_krystallusAI : public ScriptedAI if (m_uiSpike_Timer < uiDiff) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) DoCast(pTarget, SPELL_GROUND_SPIKE); m_uiSpike_Timer = 12000 + rand()%5000; } diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp index f2be4608a..6a957c7a7 100644 --- a/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp @@ -109,7 +109,7 @@ struct MANGOS_DLL_DECL boss_maiden_of_griefAI : public ScriptedAI if (m_uiPartingSorrow_Timer < uiDiff) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) DoCast(pTarget, SPELL_PARTING_SORROW); m_uiPartingSorrow_Timer = 12000 + rand()%5000; } diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp index 30489d014..1ad126720 100644 --- a/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp @@ -154,7 +154,7 @@ struct MANGOS_DLL_DECL boss_sjonnirAI : public ScriptedAI { m_lDwarfGUIDList.push_back(pSummoned->GetGUID()); - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { pSummoned->AddThreat(pTarget, 0.0f); pSummoned->AI()->AttackStart(pTarget); @@ -168,7 +168,7 @@ struct MANGOS_DLL_DECL boss_sjonnirAI : public ScriptedAI if (m_uiChainLightning_Timer < uiDiff) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) DoCast(pTarget, m_bIsRegularMode ? SPELL_CHAIN_LIGHTING_H : SPELL_CHAIN_LIGHTING); m_uiChainLightning_Timer = 10000 + rand()%5000; } diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp index dcba90ab2..da202cfae 100644 --- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp @@ -212,7 +212,7 @@ struct MANGOS_DLL_DECL mob_tribuna_controllerAI : public ScriptedAI { if (m_uiKaddrak_Encounter_timer < uiDiff) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) if (!m_lKaddrakGUIDList.empty()) for(std::list::iterator itr = m_lKaddrakGUIDList.begin(); itr != m_lKaddrakGUIDList.end(); ++itr) if ((*itr)->isAlive()) @@ -227,7 +227,7 @@ struct MANGOS_DLL_DECL mob_tribuna_controllerAI : public ScriptedAI { if (m_uiMarnak_Encounter_timer < uiDiff) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) if (Creature* pTemp = m_creature->SummonCreature(NPC_DARK_MATTER_TARGET, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN, 1000)) { pTemp->SetDisplayId(11686); @@ -244,7 +244,7 @@ struct MANGOS_DLL_DECL mob_tribuna_controllerAI : public ScriptedAI { if (m_uiAbedneum_Encounter_timer < uiDiff) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) if (Creature* pTemp = m_creature->SummonCreature(NPC_SEARING_GAZE_TARGET, pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN, 10000)) { pTemp->SetDisplayId(11686); diff --git a/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp b/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp index 49503eba0..1e30b7d06 100644 --- a/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_auriaya.cpp @@ -60,7 +60,7 @@ struct MANGOS_DLL_DECL boss_auriayaAI : public ScriptedAI if (DefenderTimer < diff) { Unit *defender = DoSpawnCreature(CR_FERAL_DEFENDER, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); - Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); if(defender && target && target->isAlive()) defender->AddThreat(target, 1.0f); DefenderTimer = 45000; @@ -76,7 +76,7 @@ struct MANGOS_DLL_DECL boss_auriayaAI : public ScriptedAI if (SwarmTimer < diff) { - Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); if(target && target->isAlive()) { DoCast(target, SP_GUARDIAN_SWARM); diff --git a/scripts/northrend/ulduar/ulduar/boss_freya.cpp b/scripts/northrend/ulduar/ulduar/boss_freya.cpp index 76d790854..f27563eee 100644 --- a/scripts/northrend/ulduar/ulduar/boss_freya.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_freya.cpp @@ -90,7 +90,7 @@ struct MANGOS_DLL_DECL boss_freyaAI : public ScriptedAI x = (rand_norm() * 30.0f) - 15.0f; y = (rand_norm() * 30.0f) - 15.0f; Creature *lasher = DoSpawnCreature(CR_DETONATING_LASHER, x, y, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 2000); - Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); if(lasher && target) lasher->AddThreat(target, 1.0f); } @@ -101,7 +101,7 @@ struct MANGOS_DLL_DECL boss_freyaAI : public ScriptedAI float x = (rand_norm() * 30.0f) - 15.0f; float y = (rand_norm() * 30.0f) - 15.0f; Creature *add = DoSpawnCreature(CR_ANCIENT_CONSERVATOR, x, y, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 2000); - Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); if(add && target) add->AddThreat(target, 1.0f); } @@ -111,17 +111,17 @@ struct MANGOS_DLL_DECL boss_freyaAI : public ScriptedAI Creature *add; Unit *target; add = DoSpawnCreature(CR_WATER_SPIRIT, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 2000); - target = SelectUnit(SELECT_TARGET_RANDOM, 0); + target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); if(add && target) add->AddThreat(target, 1.0f); add = DoSpawnCreature(CR_STORM_LASHER, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 2000); - target = SelectUnit(SELECT_TARGET_RANDOM, 0); + target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); if(add && target) add->AddThreat(target, 1.0f); add = DoSpawnCreature(CR_SNAPLASHER, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 2000); - target = SelectUnit(SELECT_TARGET_RANDOM, 0); + target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); if(add && target) add->AddThreat(target, 1.0f); } @@ -176,7 +176,7 @@ struct MANGOS_DLL_DECL boss_freyaAI : public ScriptedAI //All phases if(SunbeamTimer < diff) { - if( Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0)) + if( Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) DoCast(target, Regular ? SP_SUNBEAM : H_SP_SUNBEAM); SunbeamTimer = 6000 + rand()%10000; } diff --git a/scripts/northrend/ulduar/ulduar/boss_hodir.cpp b/scripts/northrend/ulduar/ulduar/boss_hodir.cpp index 24d721381..1f230ca62 100644 --- a/scripts/northrend/ulduar/ulduar/boss_hodir.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_hodir.cpp @@ -96,7 +96,7 @@ struct MANGOS_DLL_DECL boss_hodirAI : public ScriptedAI if(FreezeTimer < diff) { - Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); if(target) DoCast(target, SP_FREEZE); FreezeTimer = 60000; } diff --git a/scripts/northrend/ulduar/ulduar/boss_ignis.cpp b/scripts/northrend/ulduar/ulduar/boss_ignis.cpp index 54ee0cec0..52008260e 100644 --- a/scripts/northrend/ulduar/ulduar/boss_ignis.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_ignis.cpp @@ -72,7 +72,7 @@ struct MANGOS_DLL_DECL boss_ignisAI : public ScriptedAI if (SlagPotTimer < diff) { - Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); if(target && target->isAlive()) DoCast(target, Regular ? SP_SLAG_POT : H_SP_SLAG_POT); SlagPotTimer = 15000; @@ -83,7 +83,7 @@ struct MANGOS_DLL_DECL boss_ignisAI : public ScriptedAI { Creature *construct; construct = DoSpawnCreature(CR_CONSTRUCT, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); - Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); if(construct && target && target->isAlive()) { construct->AddThreat(target, 1.0f); diff --git a/scripts/northrend/ulduar/ulduar/boss_iron_council.cpp b/scripts/northrend/ulduar/ulduar/boss_iron_council.cpp index f4cb91c5a..33ebe2740 100644 --- a/scripts/northrend/ulduar/ulduar/boss_iron_council.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_iron_council.cpp @@ -179,7 +179,7 @@ struct MANGOS_DLL_DECL boss_brundirAI : public iron_councilAI if(LightningTimer < diff) { - Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); if(target && target->isAlive()) DoCast(target, Regular ? SP_CHAIN_LIGHTNING : H_SP_CHAIN_LIGHTNING); LightningTimer = 5000 + rand()%5000; @@ -223,7 +223,7 @@ struct MANGOS_DLL_DECL boss_molgeimAI : public iron_councilAI /*if(ElementalTimer < diff) { Creature *elem = DoSpawnCreature(CR_LIGHTNING_ELEMENTAL, 0,0,0,0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); - Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); if(elem && target && target->isAlive()) elem->AddThreat(target, 1.0f); ElementalTimer = 15000 + rand()%10000; @@ -234,7 +234,7 @@ struct MANGOS_DLL_DECL boss_molgeimAI : public iron_councilAI { if(DeathRuneTimer < diff) { - Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); if(target) DoCast(target, Regular ? SP_RUNE_OF_DEATH : H_SP_RUNE_OF_DEATH); } } diff --git a/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp b/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp index 3b6df2117..48f3b7a19 100644 --- a/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_kologarn.cpp @@ -166,7 +166,7 @@ struct MANGOS_DLL_DECL boss_kologarn_left_armAI : public ScriptedAI pTemp->DealDamage(pTemp, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); do{ if (Creature* pTemp = m_creature->SummonCreature(MOB_RUBBLE, LeftArmX, LeftArmY, LeftArmZ, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000)) - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) { pTemp->AddThreat(pTarget,0.0f); pTemp->AI()->AttackStart(pTarget); @@ -269,7 +269,7 @@ struct MANGOS_DLL_DECL boss_kologarn_right_armAI : public ScriptedAI pTemp->DealDamage(pTemp, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); do{ if (Creature* pTemp = m_creature->SummonCreature(MOB_RUBBLE, RightArmX, RightArmY, RightArmZ, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000)) - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) { pTemp->AddThreat(pTarget,0.0f); pTemp->AI()->AttackStart(pTarget); @@ -286,7 +286,7 @@ struct MANGOS_DLL_DECL boss_kologarn_right_armAI : public ScriptedAI if (Stone_Grip_Timer < diff) { //stone grip emote - if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)){ + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)){ //DoCast(target, m_bIsRegularMode ? SPELL_STONE_GRIP : SPELL_STONE_GRIP_H); GripTarget = target->GetGUID(); grip = true; diff --git a/scripts/northrend/ulduar/ulduar/boss_leviathan.cpp b/scripts/northrend/ulduar/ulduar/boss_leviathan.cpp index 60a34f53d..a1489d31f 100644 --- a/scripts/northrend/ulduar/ulduar/boss_leviathan.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_leviathan.cpp @@ -87,7 +87,7 @@ struct MANGOS_DLL_DECL boss_flame_leviathan : public ScriptedAI if(RocketTimer < diff) { - Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); int32 dmg = Regular ? (3000 + rand()%2000) : (2000 + rand()%1200); if(target && target->isAlive()) m_creature->CastCustomSpell(target, SP_ROCKET, &dmg, 0, 0, false); diff --git a/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp b/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp index 872a7f395..e5ff30c63 100644 --- a/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_razorscale.cpp @@ -85,7 +85,7 @@ struct MANGOS_DLL_DECL boss_razorscaleAI : public ScriptedAI if (DevouringFlameTimer < diff) { - Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); if(target && target->isAlive()) DoCast(target, Regular ? SP_DEVOURING_FLAME : H_SP_DEVOURING_FLAME); DevouringFlameTimer = 9000+rand()%3000; @@ -108,7 +108,7 @@ struct MANGOS_DLL_DECL boss_razorscaleAI : public ScriptedAI if (FireballTimer < diff) { - Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); if(target && target->isAlive()) DoCast(target, Regular ? SP_FIREBALL : H_SP_FIREBALL); FireballTimer = 4000 + rand()%4000; diff --git a/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp b/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp index 9c9488818..29c042aca 100644 --- a/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp @@ -146,7 +146,7 @@ struct MANGOS_DLL_DECL boss_xt002 : public ScriptedAI { add = m_creature->SummonCreature(CR_PUMMELER, AddX[rnd], AddY[rnd], AddZ[rnd], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); add->SetActiveObjectState(true); - target = SelectUnit(SELECT_TARGET_RANDOM, 0); + target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); if(add && target && target->isAlive()) add->AddThreat(target, 1.0f); } @@ -154,7 +154,7 @@ struct MANGOS_DLL_DECL boss_xt002 : public ScriptedAI { add = m_creature->SummonCreature(CR_SCRAPBOT, AddX[rnd], AddY[rnd], AddZ[rnd], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); add->SetActiveObjectState(true); - target = SelectUnit(SELECT_TARGET_RANDOM, 0); + target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); if(add && target && target->isAlive()) add->AddThreat(target, 1.0f); } @@ -162,7 +162,7 @@ struct MANGOS_DLL_DECL boss_xt002 : public ScriptedAI { add = m_creature->SummonCreature(CR_BOOMBOT, AddX[rnd], AddY[rnd], AddZ[rnd], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); add->SetActiveObjectState(true); - target = SelectUnit(SELECT_TARGET_RANDOM, 0); + target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); if(add && target && target->isAlive()) add->AddThreat(target, 1.0f); } @@ -196,7 +196,7 @@ struct MANGOS_DLL_DECL boss_xt002 : public ScriptedAI if(LightTimer < diff) { - Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); if(target && target->isAlive()) DoCast(target, Regular ? SP_SEARING_LIGHT : H_SP_SEARING_LIGHT); LightTimer = 10000; @@ -205,7 +205,7 @@ struct MANGOS_DLL_DECL boss_xt002 : public ScriptedAI if(GravityTimer < diff) { - Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); if(target && target->isAlive()) DoCast(target, Regular ? SP_GRAVITY : H_SP_GRAVITY); GravityTimer = 15000 + rand()%5000; diff --git a/scripts/northrend/vault_of_archavon/boss_archavon.cpp b/scripts/northrend/vault_of_archavon/boss_archavon.cpp index 0463268fb..464d4e1c7 100644 --- a/scripts/northrend/vault_of_archavon/boss_archavon.cpp +++ b/scripts/northrend/vault_of_archavon/boss_archavon.cpp @@ -198,7 +198,7 @@ struct MANGOS_DLL_DECL boss_archavonAI : public ScriptedAI m_uiRockShardsProgressTimer = 3000; m_bRLRockShard = true; m_pRockShardsTarget = NULL; - if (m_pRockShardsTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + if (m_pRockShardsTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) m_creature->getThreatManager().addThreat(m_pRockShardsTarget, 100000000.0f); m_uiRockShardsTimer = 15000+rand()%15000; return; diff --git a/scripts/northrend/vault_of_archavon/boss_emalon.cpp b/scripts/northrend/vault_of_archavon/boss_emalon.cpp index cdbc68c07..f39a8388f 100644 --- a/scripts/northrend/vault_of_archavon/boss_emalon.cpp +++ b/scripts/northrend/vault_of_archavon/boss_emalon.cpp @@ -160,7 +160,7 @@ struct MANGOS_DLL_DECL npc_tempest_minionAI : public ScriptedAI m_creature->MonsterTextEmote("%s appears to defend Emalon!", 0, true); m_creature->SetInCombatWithZone(); DoResetThreat(); - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) m_creature->GetMotionMaster()->MoveChase(pTarget); } else @@ -307,7 +307,7 @@ struct MANGOS_DLL_DECL boss_emalonAI : public ScriptedAI if (m_uiChainLightningTimer < uiDiff) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) DoCast(pTarget, m_bIsRegularMode ? SPELL_CHAIN_LIGHTNING_N : SPELL_CHAIN_LIGHTNING_H); m_uiChainLightningTimer = 10000 + rand()%15000; } diff --git a/scripts/northrend/vault_of_archavon/boss_koralon.cpp b/scripts/northrend/vault_of_archavon/boss_koralon.cpp index e1e3e6764..8d6125f2c 100644 --- a/scripts/northrend/vault_of_archavon/boss_koralon.cpp +++ b/scripts/northrend/vault_of_archavon/boss_koralon.cpp @@ -106,7 +106,7 @@ struct MANGOS_DLL_DECL boss_koralonAI : public ScriptedAI int i; for(i=0; i< flames; ++i) { - Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); if(target) DoCast(target, Regular ? SP_CINDER : H_SP_CINDER); } FlamesTimer = 20000; diff --git a/scripts/northrend/violet_hold/boss_cyanigosa.cpp b/scripts/northrend/violet_hold/boss_cyanigosa.cpp index f4891e750..cc8db5b88 100644 --- a/scripts/northrend/violet_hold/boss_cyanigosa.cpp +++ b/scripts/northrend/violet_hold/boss_cyanigosa.cpp @@ -100,7 +100,7 @@ struct MANGOS_DLL_DECL boss_cyanigosaAI : public ScriptedAI if (m_uiManaDestruction_Timer < uiDiff) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) DoCast(pTarget, SPELL_MANA_DESTRUCTION); m_uiManaDestruction_Timer = urand(8000, 13000); } @@ -109,7 +109,7 @@ struct MANGOS_DLL_DECL boss_cyanigosaAI : public ScriptedAI if (m_uiBlizzard_Timer < uiDiff) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) DoCast(pTarget, m_bIsRegularMode ? SPELL_BLIZZARD_H : SPELL_BLIZZARD); m_uiBlizzard_Timer = urand(20000, 25000); } diff --git a/scripts/northrend/violet_hold/boss_erekem.cpp b/scripts/northrend/violet_hold/boss_erekem.cpp index cc845f009..d6a2ef186 100644 --- a/scripts/northrend/violet_hold/boss_erekem.cpp +++ b/scripts/northrend/violet_hold/boss_erekem.cpp @@ -165,7 +165,7 @@ struct MANGOS_DLL_DECL boss_erekemAI : public ScriptedAI if (m_uiEarthShock_Timer < uiDiff) { m_creature->InterruptNonMeleeSpells(false); - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) DoCast(pTarget, SPELL_EARTH_SHOCK); m_uiEarthShock_Timer = urand(12000, 17000); } @@ -191,7 +191,7 @@ struct MANGOS_DLL_DECL boss_erekemAI : public ScriptedAI { if (m_uiLightningBolt_Timer < uiDiff) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) DoCast(pTarget, SPELL_LIGHTNING_BOLT); m_uiLightningBolt_Timer = 2000; } diff --git a/scripts/northrend/violet_hold/boss_moragg.cpp b/scripts/northrend/violet_hold/boss_moragg.cpp index 6aa6196df..713b058a9 100644 --- a/scripts/northrend/violet_hold/boss_moragg.cpp +++ b/scripts/northrend/violet_hold/boss_moragg.cpp @@ -114,7 +114,7 @@ struct MANGOS_DLL_DECL boss_moraggAI : public ScriptedAI if (m_uiOpticLink_Timer < uiDiff) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) DoCast(pTarget, SPELL_OPTIC_LINK); m_uiOpticLink_Timer = urand(25000, 30000); } @@ -122,7 +122,7 @@ struct MANGOS_DLL_DECL boss_moraggAI : public ScriptedAI if (m_uiRay_Timer < uiDiff) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) DoCast(pTarget, urand(0, 1) ? SPELL_RAY_PAIN : SPELL_RAY_SUFFERING); m_uiRay_Timer = urand(2000, 7000); } diff --git a/scripts/northrend/violet_hold/boss_xevozz.cpp b/scripts/northrend/violet_hold/boss_xevozz.cpp index 53211287a..30f8b1dd9 100644 --- a/scripts/northrend/violet_hold/boss_xevozz.cpp +++ b/scripts/northrend/violet_hold/boss_xevozz.cpp @@ -129,7 +129,7 @@ struct MANGOS_DLL_DECL boss_xevozzAI : public ScriptedAI void JustSummoned(Creature* pSummoned) { pSummoned->SetSpeedRate(MOVE_RUN, 0.5f); - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { pSummoned->AddThreat(pTarget); pSummoned->AI()->AttackStart(pTarget); diff --git a/scripts/northrend/violet_hold/boss_zuramat.cpp b/scripts/northrend/violet_hold/boss_zuramat.cpp index 27a26da39..39f7432cc 100644 --- a/scripts/northrend/violet_hold/boss_zuramat.cpp +++ b/scripts/northrend/violet_hold/boss_zuramat.cpp @@ -158,7 +158,7 @@ struct MANGOS_DLL_DECL boss_zuramatAI : public ScriptedAI if (m_uiVoidShift_Timer < uiDiff) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) DoCast(pTarget, m_bIsRegularMode ? SPELL_VOID_SHIFT_H : SPELL_VOID_SHIFT); m_uiVoidShift_Timer = urand(10000, 11000); } diff --git a/scripts/northrend/violet_hold/violet_hold.cpp b/scripts/northrend/violet_hold/violet_hold.cpp index a80172c80..c4a02137b 100644 --- a/scripts/northrend/violet_hold/violet_hold.cpp +++ b/scripts/northrend/violet_hold/violet_hold.cpp @@ -223,7 +223,7 @@ struct MANGOS_DLL_DECL mob_vh_dragonsAI : public ScriptedAI } } if(!IsWalking && !IsInCombat) { - if (Unit* m_uEmbraceTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + if (Unit* m_uEmbraceTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) m_creature->GetMotionMaster()->MoveChase(m_uEmbraceTarget); m_creature->SetInCombatWithZone(); IsInCombat = true; @@ -304,7 +304,7 @@ struct MANGOS_DLL_DECL mob_vh_dragonsAI : public ScriptedAI //Arcane Stream if (m_uiArcaneStream_Timer <= uiDiff) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) DoCast(pTarget, m_bIsRegular ? SPELL_ARCANE_STREAM : SPELL_ARCANE_STREAM_H); m_uiArcaneStream_Timer = 7000; }else m_uiArcaneStream_Timer -= uiDiff; From a0b6d3830b3c58be1ef43d379f23a0eb7f694dd5 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 5 May 2010 13:57:01 +0400 Subject: [PATCH 284/405] Changes ater 9832 --- .../icecrown_citadel/boss_proffesor_putricide.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp index 61d49ba02..e4f7e5a6e 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp @@ -161,7 +161,7 @@ struct MANGOS_DLL_DECL boss_proffesor_putricideAI : public ScriptedAI if (bsw->timedQuery(SPELL_MALLEABLE_GOO, diff)) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) bsw->doCast(SPELL_MALLEABLE_GOO, pTarget); } From 701b296925f6a4f704865ca31c7297278411db4f Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 5 May 2010 14:22:47 +0400 Subject: [PATCH 285/405] Strangetorn Vale fishing gameevent added --- addition/727_fishing_extravaganza_mangos.sql | 44 +++++++ .../727_fishing_extravaganza_scriptdev2.sql | 6 + .../eastern_kingdoms/stranglethorn_vale.cpp | 124 +++++++++++++++++- 3 files changed, 172 insertions(+), 2 deletions(-) create mode 100644 addition/727_fishing_extravaganza_mangos.sql create mode 100644 addition/727_fishing_extravaganza_scriptdev2.sql diff --git a/addition/727_fishing_extravaganza_mangos.sql b/addition/727_fishing_extravaganza_mangos.sql new file mode 100644 index 000000000..6c5e6fde8 --- /dev/null +++ b/addition/727_fishing_extravaganza_mangos.sql @@ -0,0 +1,44 @@ +-- set ai for riggle +UPDATE `creature_template` SET `ScriptName`='npc_riggle_bassbait' WHERE entry=15077; +-- updated start time for event Fishing Extravaganza +UPDATE `game_event` SET `start_time`='2009-06-14 14:00:00', `occurence`=10080, `length`=120 where entry=15; +-- Create Jang +DELETE FROM `creature` WHERE `id`=15078; +INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`DeathState`,`MovementType`) VALUES +(954687, 15078, 0, 1, 1, 0, 1711, -14438, 473.661, 15.3137, 3.65362, 25, 0, 0, 3200, 0, 0, 0); +-- Create Fishbot 5000 +DELETE FROM `creature` WHERE `id`=15079; +INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`DeathState`,`MovementType`) VALUES +(954688, 15079, 0, 1, 1, 0, 0, -14440, 477.446, 15.25, 3.71802, 25, 0, 0, 2600, 0, 0, 0); +-- Create Riggle Bassbait +DELETE FROM `creature` WHERE `id`=15077; +INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`DeathState`,`MovementType`) VALUES +(954689, 15077, 0, 1, 1, 0, 13, -14439.3, 475.42, 15.892, 3.68503, 25, 0, 0, 3700, 0, 0, 0); +-- Create Soapbox gameobject +DELETE FROM `gameobject` WHERE `id`=180403; +INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES +(954391, 180403, 0, 1, 1, -14439.3, 475.42, 15.2791, 3.68503, 0, 0, 0.963311, -0.268388, 25, 0, 1); + +-- new event - Fishing Extravaganza Questgivers +-- Remove NPC and GO from any other event. +DELETE FROM `game_event_creature` WHERE `guid` IN (954687,954688,954689); +DELETE FROM `game_event_gameobject`WHERE `guid`=954391; +-- Create Event +DELETE FROM `game_event` WHERE `entry`=35; +INSERT INTO `game_event` (`entry`, `start_time`, `end_time`, `occurence`, `length`, `holiday`, `description`) VALUES (35, '2009-03-29 14:00:00', '2020-12-31 00:00:00', 10080, 180, 0, 'Fishing Extravaganza Questgivers'); +-- Add NPCs to Event +DELETE FROM `game_event_creature` WHERE abs(`event`) = 35; +INSERT INTO `game_event_creature` (`guid`, `event`) VALUES (954687,35), (954688,35), (954689,35); +-- Add Soapbox to Event +DELETE FROM `game_event_gameobject` WHERE abs(`event`) = 35; +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (954391,35); +-- Remove Quests from normal DB: +DELETE FROM `creature_questrelation` WHERE quest IN (8193,8194,8225,8224,8221); +-- Add Quests to Event +-- Riggle Bassbait Quest: Master Angler +-- Jang Quest: Apprentice Angler +-- Fishbot 5000 Quest: Rare Fish - Brownell's Blue Striped Racer +-- Fishbot 5000 Quest: Rare Fish - Dezian Queenfish +-- Fishbot 5000 Quest: Rare Fish - Keefer's Angelfish +DELETE FROM `game_event_creature_quest` WHERE `event` IN (15,35); +INSERT INTO `game_event_creature_quest` (`id`,`quest`,`event`) VALUES (15077,8193,35), (15078,8194,35), (15079,8225,35), (15079,8224,35), (15079,8221,35); diff --git a/addition/727_fishing_extravaganza_scriptdev2.sql b/addition/727_fishing_extravaganza_scriptdev2.sql new file mode 100644 index 000000000..a033054e4 --- /dev/null +++ b/addition/727_fishing_extravaganza_scriptdev2.sql @@ -0,0 +1,6 @@ +-- add ai text for riggle +DELETE FROM `script_texts` WHERE `entry` IN (-1510356,-1510357,-1510358); +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`emote`,`comment`) VALUES +(-1510356, 'Let the Fishing Tournament BEGIN!', 0, 6, 0, 0, 'riggle SAY_START'), +(-1510357, 'We have a winner! $N is the Master Angler!', 0, 6, 0, 0, 'riggle SAY_WINNER'), +(-1510358, 'And the Tastyfish have gone for the week! I will remain for another hour to allow you to turn in your fish!', 0, 6, 0, 0, 'riggle SAY_END'); diff --git a/scripts/eastern_kingdoms/stranglethorn_vale.cpp b/scripts/eastern_kingdoms/stranglethorn_vale.cpp index bcc31573b..493699e26 100644 --- a/scripts/eastern_kingdoms/stranglethorn_vale.cpp +++ b/scripts/eastern_kingdoms/stranglethorn_vale.cpp @@ -17,15 +17,25 @@ /* ScriptData SDName: Stranglethorn_Vale SD%Complete: 100 -SDComment: Quest support: 592 +SDComment: Quest support: 592, 8193 SDCategory: Stranglethorn Vale EndScriptData */ /* ContentData mob_yenniku +npc_riggle_bassbait EndContentData */ #include "precompiled.h" +#include "GameEventMgr.h" + +enum +{ + SAY_START = -1510356, + SAY_WINNER = -1510357, + SAY_END = -1510358, + QUEST_MASTER_ANGLER = 8193, +}; /*###### ## mob_yenniku @@ -93,8 +103,111 @@ CreatureAI* GetAI_mob_yenniku(Creature *_Creature) } /*###### -## +##npc_riggle_bassbait ######*/ +/** + * AI for Riggle Bassbait. + * This is the AI for Riggle Bassbait, see http://www.wowhead.com/?npc=15077 + * @see ScriptedAI + * @author burned, gotisch + */ +struct MANGOS_DLL_DECL npc_riggle_bassbaitAI : public ScriptedAI +{ + /** + * Constructor of the Creature. + * This is called when the creature is spawned. + * @param c The Creature that this AI is for + */ + npc_riggle_bassbaitAI(Creature *c) : ScriptedAI(c) + { + // This will keep the NPC active even if there are no players around! + c->SetActiveObjectState(true); + bEventAnnounced = bEventIsOver = bEventWinnerFound = false; + Reset(); + } + /** + * Flag to check if event was announced. True if event was announced. + */ + bool bEventAnnounced; + /** + * Flag to check if event is over. True if event is over. + */ + bool bEventIsOver; + /** + * Flag to check if someone won the event. True if someone has won. + */ + bool bEventWinnerFound; + + void Reset() { } + + void Aggro(Unit *who) {} + + void UpdateAI(const uint32 diff) + { + // Announce the event max 1 minute after being spawned. But only if Fishing extravaganza is running. + if (!bEventAnnounced && time(NULL) % 60 == 0 && IsHolidayActive(HOLIDAY_FISHING_EXTRAVAGANZA)) + { + debug_log("SD2: npc_riggle_bassbait announce HOLIDAY_FISHING_EXTRAVAGANZA contest"); + DoScriptText(SAY_START, m_creature); + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); //Quest&Gossip are now active + bEventAnnounced = true; + } + // The Event was started (announced) & It was not yet ended & One minute passed & the Fish are gone + if ( bEventAnnounced && !bEventIsOver && time(NULL) % 60 == 0 && !IsHolidayActive(HOLIDAY_FISHING_EXTRAVAGANZA)) + { + debug_log("SD2: npc_riggle_bassbait end HOLIDAY_FISHING_EXTRAVAGANZA contest"); + DoScriptText(SAY_END, m_creature); + bEventIsOver = true; + } + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; +/** + * GossipHello for NPC Riggle Bassbait. + * This is called each time a Player tries to talk with the NPC. + */ +bool GossipHello_npc_riggle_bassbait(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) // If the quest is still running. + { + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(7614, pCreature->GetGUID()); + return true; + } + // The Quest is not there anymore + // There is a winner! + pPlayer->SEND_GOSSIP_MENU(7714, pCreature->GetGUID()); + return true; +} + +bool ChooseReward_npc_riggle_bassbait(Player* pPlayer, Creature* pCreature, const Quest* pQuest, uint32 uiItem) +{ + // TODO: check if this can only be called if NPC has QUESTGIVER flag. + if (pQuest->GetQuestId() == QUEST_MASTER_ANGLER && ((npc_riggle_bassbaitAI*)(pCreature->AI()))->bEventWinnerFound == false) + { + DoScriptText(SAY_WINNER, pCreature,pPlayer); + pCreature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + ((npc_riggle_bassbaitAI*)(pCreature->AI()))->bEventWinnerFound = true; + // right way to load another creature, you need first argument because he uses it to get map. + Unit* creature2 = Unit::GetUnit((*pCreature),MAKE_NEW_GUID(54687,15078,HIGHGUID_UNIT)); + if (creature2) + { + creature2->SetFlag(UNIT_NPC_FLAGS,UNIT_NPC_FLAG_QUESTGIVER); + } else { + debug_log("Could not change flag of Jang"); + } + return true; + } + return true; +} + +CreatureAI* GetAI_npc_riggle_bassbait(Creature* pCreature) +{ + return new npc_riggle_bassbaitAI(pCreature); +} void AddSC_stranglethorn_vale() { @@ -104,4 +217,11 @@ void AddSC_stranglethorn_vale() newscript->Name = "mob_yenniku"; newscript->GetAI = &GetAI_mob_yenniku; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_riggle_bassbait"; + newscript->GetAI = &GetAI_npc_riggle_bassbait; + newscript->pGossipHello = &GossipHello_npc_riggle_bassbait; + newscript->pChooseReward = &ChooseReward_npc_riggle_bassbait; + newscript->RegisterSelf(); } From 7e8815c3efdf36b6f34daea83b35d5672ad38209 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 5 May 2010 15:11:32 +0400 Subject: [PATCH 286/405] Attempt to prevent spawn flight_war chests --- .../icecrown_citadel/icecrown_citadel/icecrown_spire.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp index d563671cc..523e212a9 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp @@ -110,7 +110,9 @@ struct MANGOS_DLL_DECL mob_frost_giantAI : public ScriptedAI void JustDied(Unit *killer) { - if(pInstance) pInstance->SetData(TYPE_FLIGHT_WAR, DONE); + if(!pInstance) return; + if (killer->GetTypeId() == TYPEID_PLAYER) + pInstance->SetData(TYPE_FLIGHT_WAR, DONE); } void JustReachedHome() @@ -120,7 +122,7 @@ struct MANGOS_DLL_DECL mob_frost_giantAI : public ScriptedAI void Reset() { - m_creature->SetRespawnDelay(DAY); + m_creature->SetRespawnDelay(7*DAY); stage = 0; } From adc86491116144da08a60c583a8ca7ba21afed23 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 5 May 2010 17:11:05 +0400 Subject: [PATCH 287/405] Lich king && Tirion template added --- addition/721_icecrown_mangos.sql | 3 +- .../icecrown_citadel/boss_the_lich_king.cpp | 207 +++++++++++++++++- system/ScriptLoader.cpp | 2 + 3 files changed, 209 insertions(+), 3 deletions(-) diff --git a/addition/721_icecrown_mangos.sql b/addition/721_icecrown_mangos.sql index 3f58d06c1..6f505e991 100644 --- a/addition/721_icecrown_mangos.sql +++ b/addition/721_icecrown_mangos.sql @@ -107,4 +107,5 @@ UPDATE `creature_template` SET `ScriptName`='mob_spinestalker', `AIName`='' WHER UPDATE `creature_template` SET `ScriptName`='mob_ice_tomb', `AIName`='' WHERE `entry`= 36980; -- Lich King --- UPDATE `creature_template` SET `ScriptName`='boss_lich_king' WHERE `entry`= 29983; +UPDATE `creature_template` SET `ScriptName`='boss_the_lich_king_icc', `AIName`='' WHERE `entry`= 29983; +UPDATE `creature_template` SET `ScriptName`='boss_tirion_icc', `AIName`='' WHERE `entry`= 38995; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp index 1e5775b0c..3973d9665 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp @@ -16,9 +16,212 @@ /* ScriptData SDName: boss_the_lich_king -SD%Complete: 0% -SDComment: +SD%Complete: 1% +SDComment: by /dev/rsa SDCategory: Icecrown Citadel EndScriptData */ #include "precompiled.h" +#include "def_spire.h" + +enum BossSpells +{ + SPELL_INFEST = 70541, + SPELL_NECROTIC_PLAGUE = 70337, + SPELL_PLAGUE_SIPHON = 74074, + SPELL_SOUL_REAPER = 69409, + SPELL_DEFILE = 72754, + SPELL_HARVEST_SOUL = 68980, +//Transition phase + SPELL_REMORSELESS_WINTER = 68981, + SPELL_PAIN_AND_SUFFERING = 72133, + SPELL_QUAKE = 72262, + +//Raging spirit + SPELL_SUMMON_RAGING_SPIRIT = 69200, + SPELL_SOUL_SHRIEK = 69242, + +//Ice sphere + SPELL_SUMMON_ICE_SPHERE = 69103, + SPELL_ICE_PULSE = 69099, + SPELL_ICE_BURST = 69108, + +//Drudge ghouls + SPELL_SUMMON_DRUDGE_GHOULS = 70358, + +//Shambling horror + SPELL_SUMMON_SHAMBLING_HORROR = 70372, + SPELL_SHOCKWAVE = 72149, + SPELL_HORROR_ENRAGE = 72143, + +//Vile spirits + SPELL_SUMMON_VILE_SPIRITS = 70498, + SPELL_SPIRITS_BURST = 70503, + +//Valkyr + SPELL_SUMMON_VALKYR = 69037, + NPC_VALKYR = 36609, + SPELL_WINGS_OF_THE_DAMNED = 74352, + +}; + +static Locations SpawnLoc[]= +{ + {459.93689f, -2124.638184f, 1240.860107f}, //0 Lich King Intro + {491.27118f, -2124.638184f, 1240.860107f}, //1 Tirion 1 + {481.69797f, -2124.638184f, 1240.860107f}, //2 Tirion 2 +}; + +struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI +{ + boss_the_lich_king_iccAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); + Reset(); + } + + ScriptedInstance *pInstance; + BossSpellWorker* bsw; + uint8 stage; + + void Reset() + { + if(!pInstance) return; + pInstance->SetData(TYPE_LICH_KING, NOT_STARTED); + bsw->resetTimers(); + } + + void MoveInLineOfSight(Unit* pWho) + { + } + + void MovementInform(uint32 type, uint32 id) + { + if (type != POINT_MOTION_TYPE) return; + } + + void KilledUnit(Unit* pVictim) + { +/* switch (urand(0,1)) { + case 0: + DoScriptText(-1631006,m_creature,pVictim); + break; + case 1: + DoScriptText(-1631007,m_creature,pVictim); + break; + };*/ + } + + void JustReachedHome() + { + if (pInstance) pInstance->SetData(TYPE_LICH_KING, FAIL); + } + + void JustSummoned(Creature* summoned) + { + } + + void Aggro(Unit *who) + { + if(pInstance) pInstance->SetData(TYPE_LICH_KING, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_LICH_KING, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + bsw->timedCast(SPELL_SHOCKWAVE, diff); + + DoMeleeAttackIfReady(); + } +}; + + +CreatureAI* GetAI_boss_the_lich_king_icc(Creature* pCreature) +{ + return new boss_the_lich_king_iccAI(pCreature); +}; + +struct MANGOS_DLL_DECL boss_tirion_iccAI : public ScriptedAI +{ + boss_tirion_iccAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance *pInstance; + + void Reset() + { + if(!pInstance) return; + } + +}; + +bool GossipHello_boss_tirion_icc(Player* pPlayer, Creature* pCreature) +{ + char const* _message; + + switch (LocaleConstant currentlocale = pPlayer->GetSession()->GetSessionDbcLocale()) + { + case LOCALE_enUS: + case LOCALE_koKR: + case LOCALE_frFR: + case LOCALE_deDE: + case LOCALE_zhCN: + case LOCALE_zhTW: + case LOCALE_esES: + case LOCALE_esMX: + _message = "We are ready, Tirion!"; + break; + case LOCALE_ruRU: + _message = "Всегда готовы, дедуля!"; + break; + default: + _message = "We are ready, Tirion!"; + break; + }; + + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, _message, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + pPlayer->PlayerTalkClass->SendGossipMenu(907, pCreature->GetGUID()); + return true; +}; + +bool GossipSelect_boss_tirion_icc(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF) + { + pPlayer->CLOSE_GOSSIP_MENU(); + } +}; + +CreatureAI* GetAI_boss_tirion_icc(Creature* pCreature) +{ + return new boss_tirion_iccAI(pCreature); +}; + +void AddSC_boss_lich_king_icc() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_the_lich_king_icc"; + newscript->GetAI = &GetAI_boss_the_lich_king_icc; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "boss_tirion_icc"; + newscript->GetAI = &GetAI_boss_tirion_icc; + newscript->pGossipHello = &GossipHello_boss_tirion_icc; + newscript->pGossipSelect = &GossipSelect_boss_tirion_icc; + newscript->RegisterSelf(); + +}; diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index d27e4c238..364b0b1b2 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -391,6 +391,7 @@ extern void AddSC_boss_proffesor_putricide(); extern void AddSC_blood_prince_council(); extern void AddSC_boss_blood_queen_lanathel(); extern void AddSC_boss_sindragosa(); +extern void AddSC_boss_lich_king_icc(); extern void AddSC_instance_forge_of_souls(); extern void AddSC_boss_devourer_of_souls(); @@ -866,6 +867,7 @@ void AddScripts() AddSC_blood_prince_council(); AddSC_boss_blood_queen_lanathel(); AddSC_boss_sindragosa(); + AddSC_boss_lich_king_icc(); AddSC_instance_forge_of_souls(); AddSC_boss_devourer_of_souls(); From 23d7cb7e7a062d1ed9095ffdbdda7f7c763fde68 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 6 May 2010 16:37:09 +0400 Subject: [PATCH 288/405] Valithria pattern added --- addition/721_icecrown_mangos.sql | 11 +- .../boss_valithria_dreamwalker.cpp | 116 ++++++++++++++++++ .../icecrown_citadel/def_spire.h | 3 +- .../instance_icecrown_spire.cpp | 25 ++++ 4 files changed, 151 insertions(+), 4 deletions(-) diff --git a/addition/721_icecrown_mangos.sql b/addition/721_icecrown_mangos.sql index 6f505e991..c59395b01 100644 --- a/addition/721_icecrown_mangos.sql +++ b/addition/721_icecrown_mangos.sql @@ -94,9 +94,12 @@ UPDATE `gameobject` SET `state` = '0' WHERE `id` IN (201376); UPDATE `creature_template` SET `ScriptName`='boss_blood_queen_lanathel', `AIName`='' WHERE `entry`= 37955; -- Valithria dreamwalker --- UPDATE `creature_template` SET `ScriptName`='boss_valithria' WHERE `entry`= 36789; -UPDATE `gameobject_template` SET `faction` = '114',`data0` = '0' WHERE `gameobject_template`.`entry` IN (201374,201375,201369); -UPDATE `gameobject` SET `state` = '1' WHERE `id` IN (201374,201375,201369); +DELETE FROM `creature` WHERE `map` = 631 AND `id` IN (38589); +UPDATE `creature_template` SET `faction_A` = 35, `faction_H` = 35, `ScriptName`='boss_valithria_dreamwalker' WHERE `entry`= 36789; + +UPDATE `gameobject_template` SET `faction` = '0',`data0` = '0' WHERE `gameobject_template`.`entry` IN (201375,201373); +UPDATE `gameobject_template` SET `faction` = '114',`data0` = '0' WHERE `gameobject_template`.`entry` IN (201374); +UPDATE `gameobject` SET `state` = '1' WHERE `id` IN (201374); UPDATE `gameobject_template` SET `faction` = '114',`data0` = '0' WHERE `gameobject_template`.`entry` IN (201380,201381,201382,201383); UPDATE `gameobject` SET `state` = '1' WHERE `id` IN (201380,201381,201382,201383); @@ -105,6 +108,8 @@ UPDATE `creature_template` SET `ScriptName`='boss_sindragosa' WHERE `entry`= 368 UPDATE `creature_template` SET `ScriptName`='mob_rimefang', `AIName`='' WHERE `entry`= 37533; UPDATE `creature_template` SET `ScriptName`='mob_spinestalker', `AIName`='' WHERE `entry`= 37534; UPDATE `creature_template` SET `ScriptName`='mob_ice_tomb', `AIName`='' WHERE `entry`= 36980; +UPDATE `gameobject_template` SET `faction` = '114',`data0` = '0' WHERE `gameobject_template`.`entry` IN (201369,201379); +UPDATE `gameobject` SET `state` = '1' WHERE `id` IN (201369,201379); -- Lich King UPDATE `creature_template` SET `ScriptName`='boss_the_lich_king_icc', `AIName`='' WHERE `entry`= 29983; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp index 4c3181a87..318c02577 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp @@ -38,9 +38,125 @@ enum BossSpells SPELL_NIGHTMARE_POTAL = 72482, SPELL_EMERALD_VIGOR = 70873, SPELL_DREAMWALKER_RAGE = 71189, + SPELL_IMMUNITY = 72724, + SPELL_CORRUPTION = 70904, + SPELL_DREAM_SLIP = 71196, + SPELL_ICE_SPIKE = 70702, + // Summons NPC_RISEN_ARCHMAGE = 37868, + NPC_SUPPRESSOR = 37863, NPC_BLASING_SKELETON = 36791, NPC_BLISTERING_ZOMBIE = 37934, NPC_GLUTTONOUS_ABOMINATION = 37886, }; + +struct MANGOS_DLL_DECL boss_valithria_dreamwalkerAI : public ScriptedAI +{ + boss_valithria_dreamwalkerAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); + Reset(); + } + + ScriptedInstance *pInstance; + BossSpellWorker* bsw; + uint8 stage; + bool battlestarted; + bool intro; + + void Reset() + { + if(!pInstance) return; + pInstance->SetData(TYPE_VALITHRIA, NOT_STARTED); + bsw->resetTimers(); + m_creature->SetRespawnDelay(7*DAY); + bsw->doCast(SPELL_CORRUPTION); + bsw->doCast(SPELL_IMMUNITY); + stage = 0; + battlestarted = false; + intro = false; + } + + void MoveInLineOfSight(Unit* pWho) + { + } + + void KilledUnit(Unit* pVictim) + { +/* switch (urand(0,1)) { + case 0: + DoScriptText(-1631006,m_creature,pVictim); + break; + case 1: + DoScriptText(-1631007,m_creature,pVictim); + break; + };*/ + } + + void JustSummoned(Creature* summoned) + { + } + + void PlayersWin() + { + if(!pInstance) return + DoScriptText(-1631000,m_creature); + bsw->doCast(SPELL_DREAMWALKER_RAGE); + if (Unit* pTemp = bsw->doSummon(NPC_VALITHRIA_QUEST, SpawnLoc[0].x, SpawnLoc[0].y, SpawnLoc[0].z,TEMPSUMMON_MANUAL_DESPAWN)) + if (pTemp->HasAura(SPELL_CORRUPTION)) + pTemp->RemoveAurasDueToSpell(SPELL_CORRUPTION); + pInstance->SetData(TYPE_VALITHRIA, DONE); + m_creature->ForcedDespawn(); + } + + void JustDied(Unit *killer) + { + if(!pInstance) return + pInstance->SetData(TYPE_VALITHRIA, FAIL); + DoScriptText(-1631000,m_creature); + } + + void AttackStart(Unit *who) + { + //ignore all attackstart commands + return; + } + + void UpdateAI(const uint32 diff) + { + switch(stage) + { + case 0: + break; + case 1: + break; + default: + break; + } + + if ( stage ==0 && m_creature->GetHealthPercent() > 90.0f ) stage = 1; + if ( stage ==2 && m_creature->GetHealthPercent() < 15.0f ) stage = 3; + if ( m_creature->GetHealthPercent() > 99.9f ) stage = 4; + + bsw->timedCast(SPELL_ICE_SPIKE, diff); + + return; + } +}; + + +CreatureAI* GetAI_boss_valithria_dreamwalker(Creature* pCreature) +{ + return new boss_valithria_dreamwalkerAI(pCreature); +} + +void AddSC_boss_valithria_dreamwalker() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_valithria_dreamwalker"; + newscript->GetAI = &GetAI_boss_valithria_dreamwalker; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h index acfae9819..f71e7374b 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h @@ -37,7 +37,7 @@ enum NPC_KELESETH = 37972, NPC_LANATHEL = 37955, NPC_VALITHRIA = 36789, - NPC_VALITHRIA_H = 38589, + NPC_VALITHRIA_QUEST = 38589, NPC_SINDRAGOSA = 36853, NPC_LICH_KING = 36597, @@ -81,6 +81,7 @@ enum GO_VALITHRIA_DOOR_4 = 201381, //1558 GO_SINDRAGOSA_DOOR_1 = 201369, //1619 + GO_SINDRAGOSA_DOOR_2 = 201379, GO_FROZENTRONE_TR = 202223, //72061 diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp index 840aaea58..b974f6374 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp @@ -78,6 +78,9 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance uint64 m_uiValithriaDoor3GUID; uint64 m_uiValithriaDoor4GUID; + uint64 m_uiSindragosaDoor1GUID; + uint64 m_uiSindragosaDoor2GUID; + uint64 m_uiSaurfangCacheGUID; uint64 m_uiGunshipArmoryAGUID; uint64 m_uiGunshipArmoryHGUID; @@ -120,6 +123,11 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance OpenDoor(m_uiCounsilDoor2GUID); } // if (m_auiEncounter[9] == DONE) OpenDoor(m_uiFrostwingDoorGUID); +// if (m_auiEncounter[10] == DONE) OpenDoor(m_uiValithriaDoor2GUID); +// if (m_auiEncounter[11] == DONE) { +// OpenDoor(m_uiSindragosaDoor2GUID); +// OpenDoor(m_uiSindragosaDoor1GUID); +// } } @@ -294,6 +302,12 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance case GO_VALITHRIA_DOOR_4: m_uiValithriaDoor4GUID = pGo->GetGUID(); break; + case GO_SINDRAGOSA_DOOR_1: + m_uiSindragosaDoor1GUID = pGo->GetGUID(); + break; + case GO_SINDRAGOSA_DOOR_2: + m_uiSindragosaDoor2GUID = pGo->GetGUID(); + break; case GO_SAURFANG_CACHE_10: if(Difficulty == RAID_DIFFICULTY_10MAN_NORMAL) m_uiSaurfangCacheGUID = pGo->GetGUID(); @@ -444,9 +458,20 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance break; case TYPE_VALITHRIA: m_auiEncounter[10] = uiData; + if (uiData == DONE) { + OpenDoor(m_uiGreenDragonDoor2GUID); + if (GameObject* pChest = instance->GetGameObject(m_uiValitriaCacheGUID)) + if (pChest && !pChest->isSpawned()) { + pChest->SetRespawnTime(7*DAY); + }; + }; break; case TYPE_SINDRAGOSA: m_auiEncounter[11] = uiData; + if (uiData == DONE) { + OpenDoor(m_uiSindragosaDoor1GUID); + OpenDoor(m_uiSindragosaDoor2GUID); + } break; case TYPE_LICH_KING: m_auiEncounter[12] = uiData; From 219b4e2799266b60b6115fac525f036bc16e5356 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 6 May 2010 18:17:25 +0400 Subject: [PATCH 289/405] Rework Vault of Archavon (from Insider42) --- Makefile.am | 1 + addition/1_mangos_vault_of_archavon.sql | 8 +- addition/2_mangos_vault_of_archavon.sql | 6 - .../vault_of_archavon/boss_archavon.cpp | 12 +- .../vault_of_archavon/boss_emalon.cpp | 20 +-- .../vault_of_archavon/boss_koralon.cpp | 24 +--- .../vault_of_archavon/boss_toravon.cpp | 122 ++++++++++++++++++ .../instance_vault_of_archavon.cpp | 10 +- .../vault_of_archavon/vault_of_archavon.h | 3 +- system/ScriptLoader.cpp | 2 + 10 files changed, 160 insertions(+), 48 deletions(-) delete mode 100644 addition/2_mangos_vault_of_archavon.sql create mode 100644 scripts/northrend/vault_of_archavon/boss_toravon.cpp diff --git a/Makefile.am b/Makefile.am index 3e12e862f..cf89178ed 100644 --- a/Makefile.am +++ b/Makefile.am @@ -429,6 +429,7 @@ scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h \ scripts/northrend/vault_of_archavon/boss_archavon.cpp \ scripts/northrend/vault_of_archavon/boss_emalon.cpp \ scripts/northrend/vault_of_archavon/boss_koralon.cpp \ +scripts/northrend/vault_of_archavon/boss_toravon.cpp \ scripts/northrend/vault_of_archavon/instance_vault_of_archavon.cpp \ scripts/northrend/vault_of_archavon/vault_of_archavon.h \ scripts/outland/blades_edge_mountains.cpp \ diff --git a/addition/1_mangos_vault_of_archavon.sql b/addition/1_mangos_vault_of_archavon.sql index 4b2973da6..7d6033d81 100644 --- a/addition/1_mangos_vault_of_archavon.sql +++ b/addition/1_mangos_vault_of_archavon.sql @@ -1,11 +1,9 @@ UPDATE `creature_template` SET `ScriptName`='boss_archavon' WHERE `entry`=31125; - UPDATE `creature_template` SET `ScriptName`='boss_emalon' WHERE `entry`=33993; - UPDATE `creature_template` SET `ScriptName`='npc_tempest_minion' WHERE `entry`=33998; - UPDATE `creature_template` SET `ScriptName`='npc_tempest_warder' WHERE `entry`=34015; - UPDATE `creature_template` SET `ScriptName`='boss_koralon' WHERE `entry`=35013; - +UPDATE `creature_template` SET `AIName`='', ScriptName='boss_toravon' WHERE `entry`=38433; UPDATE `instance_template` SET `script`='instance_vault_of_archavon' WHERE `map`=624; +DELETE FROM `spell_script_target` WHERE `entry` IN (72034,72096); +INSERT INTO `spell_script_target` VALUES (72034,1,38433),(72096,1,38433); diff --git a/addition/2_mangos_vault_of_archavon.sql b/addition/2_mangos_vault_of_archavon.sql deleted file mode 100644 index 7505429d8..000000000 --- a/addition/2_mangos_vault_of_archavon.sql +++ /dev/null @@ -1,6 +0,0 @@ -UPDATE `creature_template` SET `ScriptName`='boss_archavon' WHERE `entry`=31125; -UPDATE `creature_template` SET `ScriptName`='boss_emalon' WHERE `entry`=33993; -UPDATE `creature_template` SET `ScriptName`='npc_tempest_minion' WHERE `entry`=33998; -UPDATE `creature_template` SET `ScriptName`='npc_tempest_warder' WHERE `entry`=34015; -UPDATE `creature_template` SET `ScriptName`='boss_koralon' WHERE `entry`=35013; -UPDATE `instance_template` SET `script`='instance_vault_of_archavon' WHERE `map`=624; diff --git a/scripts/northrend/vault_of_archavon/boss_archavon.cpp b/scripts/northrend/vault_of_archavon/boss_archavon.cpp index 464d4e1c7..9dc483da8 100644 --- a/scripts/northrend/vault_of_archavon/boss_archavon.cpp +++ b/scripts/northrend/vault_of_archavon/boss_archavon.cpp @@ -112,7 +112,7 @@ struct MANGOS_DLL_DECL boss_archavonAI : public ScriptedAI if (m_uiEvadeCheckCooldown < uiDiff) { - if (m_creature->GetDistance2d(140.71f, -101.09f) > 80.0f) + if (m_creature->GetDistance2d(140.34f, -102.34f) > 80.0f) EnterEvadeMode(); m_uiEvadeCheckCooldown = 2000; } @@ -125,7 +125,7 @@ struct MANGOS_DLL_DECL boss_archavonAI : public ScriptedAI { if (Unit* pTarget = m_creature->getVictim()) { - DoCast(pTarget, m_bIsRegularMode ? SPELL_IMPALE_DMG_N : SPELL_IMPALE_DMG_H); + DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_IMPALE_DMG_N : SPELL_IMPALE_DMG_H); pTarget->CastSpell(pTarget, SPELL_IMPALE_STUN, true); } m_bImpaleInProgress = false; @@ -156,7 +156,7 @@ struct MANGOS_DLL_DECL boss_archavonAI : public ScriptedAI { m_creature->getThreatManager().addThreat(m_pCrushingLeapTarget, -100000000.0f); m_creature->SetSpeedRate(MOVE_RUN, m_fDefaultMoveSpeed); - DoCast(m_pCrushingLeapTarget, m_bIsRegularMode ? SPELL_CRUSHING_LEAP_N : SPELL_CRUSHING_LEAP_H, true); + DoCastSpellIfCan(m_pCrushingLeapTarget, m_bIsRegularMode ? SPELL_CRUSHING_LEAP_N : SPELL_CRUSHING_LEAP_H, true); m_bCrushingLeapInProgress = false; } else @@ -198,7 +198,7 @@ struct MANGOS_DLL_DECL boss_archavonAI : public ScriptedAI m_uiRockShardsProgressTimer = 3000; m_bRLRockShard = true; m_pRockShardsTarget = NULL; - if (m_pRockShardsTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + if (m_pRockShardsTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) m_creature->getThreatManager().addThreat(m_pRockShardsTarget, 100000000.0f); m_uiRockShardsTimer = 15000+rand()%15000; return; @@ -239,7 +239,7 @@ struct MANGOS_DLL_DECL boss_archavonAI : public ScriptedAI if (m_uiStompTimer < uiDiff) { - DoCast(m_creature, m_bIsRegularMode ? SPELL_STOMP_N : SPELL_STOMP_H); + DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_STOMP_N : SPELL_STOMP_H); m_uiImpaleAfterStompTimer = 1000; m_bImpaleInProgress = true; m_uiStompTimer = 45000+rand()%15000; @@ -249,7 +249,7 @@ struct MANGOS_DLL_DECL boss_archavonAI : public ScriptedAI if (m_uiBerserkTimer < uiDiff) { - DoCast(m_creature, SPELL_BERSERK); + DoCastSpellIfCan(m_creature, SPELL_BERSERK); m_uiBerserkTimer = 60000; } else diff --git a/scripts/northrend/vault_of_archavon/boss_emalon.cpp b/scripts/northrend/vault_of_archavon/boss_emalon.cpp index f39a8388f..f94886cf4 100644 --- a/scripts/northrend/vault_of_archavon/boss_emalon.cpp +++ b/scripts/northrend/vault_of_archavon/boss_emalon.cpp @@ -160,7 +160,7 @@ struct MANGOS_DLL_DECL npc_tempest_minionAI : public ScriptedAI m_creature->MonsterTextEmote("%s appears to defend Emalon!", 0, true); m_creature->SetInCombatWithZone(); DoResetThreat(); - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) m_creature->GetMotionMaster()->MoveChase(pTarget); } else @@ -175,7 +175,7 @@ struct MANGOS_DLL_DECL npc_tempest_minionAI : public ScriptedAI Aura* pAuraOvercharged = m_creature->GetAura(SPELL_OVERCHARGED, EFFECT_INDEX_0); if(pAuraOvercharged && pAuraOvercharged->GetStackAmount() >= 10) { - DoCast(m_creature, SPELL_OVERCHARGED_BLAST); + DoCastSpellIfCan(m_creature, SPELL_OVERCHARGED_BLAST); m_bTimeToDie = true; return; } @@ -185,7 +185,7 @@ struct MANGOS_DLL_DECL npc_tempest_minionAI : public ScriptedAI if (m_uiShockTimer < uiDiff) { - DoCast(m_creature->getVictim(), SPELL_SHOCK); + DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHOCK); m_uiShockTimer = 8000+rand()%4000; } else @@ -307,8 +307,8 @@ struct MANGOS_DLL_DECL boss_emalonAI : public ScriptedAI if (m_uiChainLightningTimer < uiDiff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCast(pTarget, m_bIsRegularMode ? SPELL_CHAIN_LIGHTNING_N : SPELL_CHAIN_LIGHTNING_H); + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_CHAIN_LIGHTNING_N : SPELL_CHAIN_LIGHTNING_H); m_uiChainLightningTimer = 10000 + rand()%15000; } else @@ -316,7 +316,7 @@ struct MANGOS_DLL_DECL boss_emalonAI : public ScriptedAI if (m_uiLightningNovaTimer < uiDiff) { - DoCast(m_creature, m_bIsRegularMode ? SPELL_LIGHTNING_NOVA_N : SPELL_LIGHTNING_NOVA_H); + DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_LIGHTNING_NOVA_N : SPELL_LIGHTNING_NOVA_H); m_uiLightningNovaTimer = 45000; } else @@ -324,7 +324,7 @@ struct MANGOS_DLL_DECL boss_emalonAI : public ScriptedAI if (m_uiEnrageTimer < uiDiff) { - DoCast(m_creature, SPELL_BERSERK); + DoCastSpellIfCan(m_creature, SPELL_BERSERK); m_uiEnrageTimer = 30000; } else @@ -376,7 +376,7 @@ struct MANGOS_DLL_DECL npc_tempest_warderAI : public ScriptedAI if (!m_bOvercharged && ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 37)) { - DoCast(m_creature, SPELL_OVERCHARGE); + DoCastSpellIfCan(m_creature, SPELL_OVERCHARGE); m_bOvercharged = true; } @@ -388,7 +388,7 @@ struct MANGOS_DLL_DECL npc_tempest_warderAI : public ScriptedAI Aura* pAuraOvercharged = m_creature->GetAura(SPELL_OVERCHARGED, EFFECT_INDEX_0); if(pAuraOvercharged && pAuraOvercharged->GetStackAmount() >= 10) { - DoCast(m_creature, SPELL_OVERCHARGED_BLAST); + DoCastSpellIfCan(m_creature, SPELL_OVERCHARGED_BLAST); m_bTimeToDie = true; return; } @@ -399,7 +399,7 @@ struct MANGOS_DLL_DECL npc_tempest_warderAI : public ScriptedAI if (m_uiShockTimer < uiDiff) { - DoCast(m_creature->getVictim(), SPELL_SHOCK); + DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHOCK); m_uiShockTimer = 8000+rand()%4000; } else diff --git a/scripts/northrend/vault_of_archavon/boss_koralon.cpp b/scripts/northrend/vault_of_archavon/boss_koralon.cpp index 8d6125f2c..b0f99a5fb 100644 --- a/scripts/northrend/vault_of_archavon/boss_koralon.cpp +++ b/scripts/northrend/vault_of_archavon/boss_koralon.cpp @@ -29,8 +29,6 @@ struct MANGOS_DLL_DECL boss_koralonAI : public ScriptedAI ScriptedInstance* pInstance; bool Regular; - uint32 m_uiEvadeCheckCooldown; - uint32 BurningBreathTimer; uint32 MeteorFistsTimer; uint32 FlamesTimer; @@ -41,7 +39,6 @@ struct MANGOS_DLL_DECL boss_koralonAI : public ScriptedAI void Reset() { - m_uiEvadeCheckCooldown = 2000; BurningBreathTimer = 25000; MeteorFistsTimer = 47000; FlamesTimer = 15000; @@ -53,7 +50,7 @@ struct MANGOS_DLL_DECL boss_koralonAI : public ScriptedAI void Aggro(Unit *who) { - DoCast(m_creature, SP_BURNING_FURY_AURA); + DoCastSpellIfCan(m_creature, SP_BURNING_FURY_AURA); if(pInstance) pInstance->SetData(TYPE_KORALON, IN_PROGRESS); }; @@ -68,18 +65,9 @@ struct MANGOS_DLL_DECL boss_koralonAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (m_uiEvadeCheckCooldown < diff) - { - if (m_creature->GetDistance2d(-218.95f, 103.41f) > 80.0f) - EnterEvadeMode(); - m_uiEvadeCheckCooldown = 2000; - } - else - m_uiEvadeCheckCooldown -= diff; - if(BurningBreathTimer < diff) { - DoCast(m_creature, Regular ? SP_BURNING_BREATH : H_SP_BURNING_BREATH); + DoCastSpellIfCan(m_creature, Regular ? SP_BURNING_BREATH : H_SP_BURNING_BREATH); BurningBreathTimer = 45000; BB = true; @@ -92,7 +80,7 @@ struct MANGOS_DLL_DECL boss_koralonAI : public ScriptedAI { if(BBTickTimer < diff) { - DoCast(NULL, Regular ? SP_BB_EFFECT : H_SP_BB_EFFECT, true); + DoCastSpellIfCan(NULL, Regular ? SP_BB_EFFECT : H_SP_BB_EFFECT, true); BBTickTimer = 1000; ++BBTicks; if(BBTicks > 2) BB = false; @@ -106,8 +94,8 @@ struct MANGOS_DLL_DECL boss_koralonAI : public ScriptedAI int i; for(i=0; i< flames; ++i) { - Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); - if(target) DoCast(target, Regular ? SP_CINDER : H_SP_CINDER); + Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + if(target) DoCastSpellIfCan(target, Regular ? SP_CINDER : H_SP_CINDER); } FlamesTimer = 20000; } @@ -115,7 +103,7 @@ struct MANGOS_DLL_DECL boss_koralonAI : public ScriptedAI if(MeteorFistsTimer < diff) { - DoCast(m_creature->getVictim(), SP_METEOR_FISTS_EFF); + DoCastSpellIfCan(m_creature->getVictim(), SP_METEOR_FISTS_EFF); MeteorFistsTimer = 45000; } else MeteorFistsTimer -= diff; diff --git a/scripts/northrend/vault_of_archavon/boss_toravon.cpp b/scripts/northrend/vault_of_archavon/boss_toravon.cpp new file mode 100644 index 000000000..3feea2b26 --- /dev/null +++ b/scripts/northrend/vault_of_archavon/boss_toravon.cpp @@ -0,0 +1,122 @@ +/* ScriptData +SDName: Toravon the Ice Watcher +SDAuthor: Lutik +SD%Complete: 0% +SDComment: +SDCategory: Vault of Archavon +EndScriptData */ + +#include "precompiled.h" +#include "vault_of_archavon.h" + +enum +{ + SP_WHITEOUT = 72034, + H_SP_WHITEOUT = 72096, + SP_FREEZING_GROUND = 72090, + H_SP_FREEZING_GROUND = 72104, + SP_FROZEN_MALLET = 71993, + FROZEN_ORB_AURA = 72081, + + CR_FROZEN_ORB = 38456 +}; + + +struct MANGOS_DLL_DECL boss_toravonAI : public ScriptedAI +{ + boss_toravonAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + orbsNum = m_bIsRegularMode ? 1 : 3; + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + bool m_bIsRegularMode; + ScriptedInstance *pInstance; + + int orbsNum; + uint32 WhiteoutTimer; + uint32 OrbsTimer; + uint32 FreezeTimer; + + void Reset() + { + WhiteoutTimer = 40000; + OrbsTimer = 15000; + FreezeTimer = 20000 + rand()%5000; + + if(pInstance) + pInstance->SetData(TYPE_TORAVON, NOT_STARTED); + } + + void Aggro(Unit *who) + { + DoCastSpellIfCan(m_creature, SP_FROZEN_MALLET); + + if(pInstance) + pInstance->SetData(TYPE_TORAVON, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + if(pInstance) + pInstance->SetData(TYPE_TORAVON, DONE); + } + + void JustSummoned(Creature *orb) + { + orb->CastSpell(orb, FROZEN_ORB_AURA, false); + orb->SetInCombatWithZone(); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if(WhiteoutTimer < diff) + { + DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SP_WHITEOUT : H_SP_WHITEOUT); + WhiteoutTimer = 40000; + } + else + WhiteoutTimer -= diff; + + if(OrbsTimer < diff) + { + for(int i=0; iSummonCreature(CR_FROZEN_ORB, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 3000); + } + OrbsTimer = 40000; + } + else + OrbsTimer -= diff; + + if(FreezeTimer < diff) + { + DoCastSpellIfCan(m_creature, SP_FREEZING_GROUND); + FreezeTimer = 20000 + rand()%5000; + } + else + FreezeTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_toravon(Creature *pCreature) +{ + return new boss_toravonAI (pCreature); +}; + +void AddSC_boss_toravon() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_toravon"; + newscript->GetAI = &GetAI_boss_toravon; + newscript->RegisterSelf(); +}; diff --git a/scripts/northrend/vault_of_archavon/instance_vault_of_archavon.cpp b/scripts/northrend/vault_of_archavon/instance_vault_of_archavon.cpp index 70471f9d9..72bed6a2c 100644 --- a/scripts/northrend/vault_of_archavon/instance_vault_of_archavon.cpp +++ b/scripts/northrend/vault_of_archavon/instance_vault_of_archavon.cpp @@ -103,13 +103,17 @@ struct MANGOS_DLL_DECL instance_vault_of_archavon : public ScriptedInstance case TYPE_KORALON: m_auiEncounter[2] = uiData; break; + case TYPE_TORAVON: + m_auiEncounter[3] = uiData; + break; } + if (uiData == DONE) { OUT_SAVE_INST_DATA; std::ostringstream saveStream; - saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2]; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3]; strInstData = saveStream.str(); @@ -128,6 +132,8 @@ struct MANGOS_DLL_DECL instance_vault_of_archavon : public ScriptedInstance return m_auiEncounter[1]; case TYPE_KORALON: return m_auiEncounter[2]; + case TYPE_TORAVON: + return m_auiEncounter[3]; } return 0; } @@ -169,7 +175,7 @@ struct MANGOS_DLL_DECL instance_vault_of_archavon : public ScriptedInstance OUT_LOAD_INST_DATA(in); std::istringstream loadStream(in); - loadStream >> m_auiEncounter[0] >> m_auiEncounter[1]; + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3]; for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { diff --git a/scripts/northrend/vault_of_archavon/vault_of_archavon.h b/scripts/northrend/vault_of_archavon/vault_of_archavon.h index cd54f28f2..c42e70817 100644 --- a/scripts/northrend/vault_of_archavon/vault_of_archavon.h +++ b/scripts/northrend/vault_of_archavon/vault_of_archavon.h @@ -7,7 +7,7 @@ enum { - MAX_ENCOUNTER = 3, + MAX_ENCOUNTER = 4, DATA_ARCHAVON = 1, DATA_EMALON = 2, @@ -20,6 +20,7 @@ enum TYPE_ARCHAVON = 8, TYPE_EMALON = 9, TYPE_KORALON = 10, + TYPE_TORAVON = 11, NPC_ARCHAVON = 31125, NPC_EMALON = 33993, diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index cecc76482..2224c9977 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -318,6 +318,7 @@ extern void AddSC_instance_nexus(); extern void AddSC_boss_sartharion(); //obsidian_sanctum extern void AddSC_instance_obsidian_sanctum(); extern void AddSC_instance_vault_of_archavon(); //vault_of_archavon +extern void AddSC_boss_toravon(); extern void AddSC_boss_koralon(); extern void AddSC_boss_emalon(); extern void AddSC_boss_archavon(); @@ -791,6 +792,7 @@ void AddScripts() AddSC_boss_sartharion(); //obsidian_sanctum AddSC_instance_obsidian_sanctum(); AddSC_instance_vault_of_archavon(); //vault_of_archavon + AddSC_boss_toravon(); AddSC_boss_koralon(); AddSC_boss_emalon(); AddSC_boss_archavon(); From 001f92d871cbc7ac97b4c6891ed6931670b9e8a5 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 6 May 2010 18:42:20 +0400 Subject: [PATCH 290/405] Changes to preview commit related to 9832 --- scripts/northrend/vault_of_archavon/boss_archavon.cpp | 2 +- scripts/northrend/vault_of_archavon/boss_emalon.cpp | 4 ++-- scripts/northrend/vault_of_archavon/boss_koralon.cpp | 2 +- scripts/northrend/vault_of_archavon/boss_toravon.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/northrend/vault_of_archavon/boss_archavon.cpp b/scripts/northrend/vault_of_archavon/boss_archavon.cpp index 9dc483da8..5efee3ca4 100644 --- a/scripts/northrend/vault_of_archavon/boss_archavon.cpp +++ b/scripts/northrend/vault_of_archavon/boss_archavon.cpp @@ -198,7 +198,7 @@ struct MANGOS_DLL_DECL boss_archavonAI : public ScriptedAI m_uiRockShardsProgressTimer = 3000; m_bRLRockShard = true; m_pRockShardsTarget = NULL; - if (m_pRockShardsTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + if (m_pRockShardsTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) m_creature->getThreatManager().addThreat(m_pRockShardsTarget, 100000000.0f); m_uiRockShardsTimer = 15000+rand()%15000; return; diff --git a/scripts/northrend/vault_of_archavon/boss_emalon.cpp b/scripts/northrend/vault_of_archavon/boss_emalon.cpp index f94886cf4..174218d7d 100644 --- a/scripts/northrend/vault_of_archavon/boss_emalon.cpp +++ b/scripts/northrend/vault_of_archavon/boss_emalon.cpp @@ -160,7 +160,7 @@ struct MANGOS_DLL_DECL npc_tempest_minionAI : public ScriptedAI m_creature->MonsterTextEmote("%s appears to defend Emalon!", 0, true); m_creature->SetInCombatWithZone(); DoResetThreat(); - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) m_creature->GetMotionMaster()->MoveChase(pTarget); } else @@ -307,7 +307,7 @@ struct MANGOS_DLL_DECL boss_emalonAI : public ScriptedAI if (m_uiChainLightningTimer < uiDiff) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_CHAIN_LIGHTNING_N : SPELL_CHAIN_LIGHTNING_H); m_uiChainLightningTimer = 10000 + rand()%15000; } diff --git a/scripts/northrend/vault_of_archavon/boss_koralon.cpp b/scripts/northrend/vault_of_archavon/boss_koralon.cpp index b0f99a5fb..585473c75 100644 --- a/scripts/northrend/vault_of_archavon/boss_koralon.cpp +++ b/scripts/northrend/vault_of_archavon/boss_koralon.cpp @@ -94,7 +94,7 @@ struct MANGOS_DLL_DECL boss_koralonAI : public ScriptedAI int i; for(i=0; i< flames; ++i) { - Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + Unit *target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); if(target) DoCastSpellIfCan(target, Regular ? SP_CINDER : H_SP_CINDER); } FlamesTimer = 20000; diff --git a/scripts/northrend/vault_of_archavon/boss_toravon.cpp b/scripts/northrend/vault_of_archavon/boss_toravon.cpp index 3feea2b26..63c9db8c2 100644 --- a/scripts/northrend/vault_of_archavon/boss_toravon.cpp +++ b/scripts/northrend/vault_of_archavon/boss_toravon.cpp @@ -87,7 +87,7 @@ struct MANGOS_DLL_DECL boss_toravonAI : public ScriptedAI { for(int i=0; iSelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) m_creature->SummonCreature(CR_FROZEN_ORB, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 3000); } OrbsTimer = 40000; From bb7cfdb0f84070eee007eaf82293196f44a0f145 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 6 May 2010 18:58:11 +0400 Subject: [PATCH 291/405] Readme correct --- README | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/README b/README index 06703f033..5eb7d87ba 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -@package RSA scripts for ScriptDev2 ; +@package RSA scripts for ScriptDev2 @version 0.2 @revision (current) @copyright (c) 2009-2010 /dev/rsa @@ -22,14 +22,15 @@ In this repository you found this custom scripts: - many scripts from Insider42 - Ulduar (by Insider42, small correct by me) -- Trial of the Champion ( by ..., big rewrite by me) -- Violet hold (by ..., big rewrite by me) -- Naxxramas (by ...) -- An'kahet (by ...) -- Draktaron (by ...) +- Trial of the Champion ( by Syntec, big rewrite by me) +- Violet hold (by ckegg, big rewrite by me) +- Naxxramas (by ckegg) +- An'kahet (by Tassadar) +- Draktaron (by Tassadar) +- Vault of Archavon (by Insider42) - Trial of the Crusader (by me) - Halls of reflection (partially, by me) -- Icecrown Citadel (by me) +- Icecrown Citadel (not finished, by me) Attention please! In my project only correct Linux Makefile provided. If you want compile this branch on Windows, please convert Makefile to your c++ compiler. From fbade58a605aceae53a7a9a697640ae9b311061b Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Fri, 7 May 2010 01:21:54 +0400 Subject: [PATCH 292/405] TOC fix by bugreports --- .../724_trial_of_crusader_spelltable_scriptdev2.sql | 4 ++-- .../trial_of_the_crusader/boss_northrend_beasts.cpp | 13 +++++++++---- .../trial_of_the_crusader/boss_twin_valkyr.cpp | 13 +++++++++---- .../trial_of_the_crusader/trial_of_the_crusader.cpp | 5 +++-- 4 files changed, 23 insertions(+), 12 deletions(-) diff --git a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql index 1b48f26ba..f15e6bdde 100644 --- a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql +++ b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql @@ -51,8 +51,8 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ -- Anub'arak scarab INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES -(34605, 66092, 66092, 66092, 66092, 5000, 5000, 5000, 5000, 20000, 20000, 20000, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), -(34605, 67861, 66092, 66092, 66092, 5000, 5000, 5000, 5000, 20000, 20000, 20000, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL); +(34605, 66092, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34605, 67861, 0, 0, , 5000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL); -- Cold sphere INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index c982c21ba..1ac3f9021 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -237,6 +237,7 @@ struct MANGOS_DLL_DECL boss_acidmawAI : public ScriptedAI enraged = false; m_creature->SetInCombatWithZone(); m_creature->SetRespawnDelay(DAY); + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, ACIDMAW_SUBMERGED); } void JustDied(Unit* pKiller) @@ -251,7 +252,7 @@ struct MANGOS_DLL_DECL boss_acidmawAI : public ScriptedAI void JustReachedHome() { if (!m_pInstance) return; - if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == IN_PROGRESS) + if (m_pInstance->GetData(TYPE_BEASTS) == IN_PROGRESS) m_pInstance->SetData(TYPE_NORTHREND_BEASTS, FAIL); m_creature->ForcedDespawn(); } @@ -286,6 +287,7 @@ struct MANGOS_DLL_DECL boss_acidmawAI : public ScriptedAI break;} case 1: { m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->InterruptNonMeleeSpells(true); bsw->doCast(SPELL_SUBMERGE_0); stage = 2; DoScriptText(-1713557,m_creature); @@ -295,7 +297,8 @@ struct MANGOS_DLL_DECL boss_acidmawAI : public ScriptedAI if (bsw->timedQuery(SPELL_SLIME_POOL, uiDiff)) bsw->doCast(NPC_SLIME_POOL); - if (bsw->timedQuery(SPELL_SUBMERGE_0, uiDiff) && m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == ACIDMAW_SUBMERGED) + if ((bsw->timedQuery(SPELL_SUBMERGE_0, uiDiff) && m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == ACIDMAW_SUBMERGED) + || m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == DREADSCALE_SUBMERGED) stage = 3; break;} case 3: { @@ -361,7 +364,7 @@ struct MANGOS_DLL_DECL boss_dreadscaleAI : public ScriptedAI void JustReachedHome() { if (!m_pInstance) return; - if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == IN_PROGRESS) + if (m_pInstance->GetData(TYPE_BEASTS) == IN_PROGRESS) m_pInstance->SetData(TYPE_NORTHREND_BEASTS, FAIL); m_creature->ForcedDespawn(); } @@ -395,6 +398,7 @@ struct MANGOS_DLL_DECL boss_dreadscaleAI : public ScriptedAI break;} case 1: { m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->InterruptNonMeleeSpells(true); bsw->doCast(SPELL_SUBMERGE_0); stage = 2; DoScriptText(-1713557,m_creature); @@ -405,7 +409,8 @@ struct MANGOS_DLL_DECL boss_dreadscaleAI : public ScriptedAI if (bsw->timedQuery(SPELL_SLIME_POOL, uiDiff)) bsw->doCast(NPC_SLIME_POOL); - if (bsw->timedQuery(SPELL_SUBMERGE_0, uiDiff) && m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == DREADSCALE_SUBMERGED) + if ((bsw->timedQuery(SPELL_SUBMERGE_0, uiDiff) && m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == DREADSCALE_SUBMERGED) + || m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == ACIDMAW_SUBMERGED) stage = 3; break;} case 3: { diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp index 40c3c64bc..2cd3eef5b 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp @@ -65,6 +65,7 @@ enum BossSpells SPELL_LIGHT_ESSENCE = 65686, SPELL_DARK_ESSENCE = 65684, SPELL_BERSERK = 64238, + SPELL_REMOVE_TOUCH = 68084, SPELL_NONE = 0, // SPELL_UNLEASHED_DARK = 65808, @@ -175,11 +176,12 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI }; break; case 2: - if (bsw->timedQuery(SPELL_TWIN_PACT_L, uiDiff) - && bsw->doCast(SPELL_SHIELD_LIGHT) == CAST_OK ) + if (bsw->timedQuery(SPELL_TWIN_PACT_L, uiDiff)) { m_pInstance->SetData(DATA_CASTING_FJOLA, SPELL_TWIN_PACT_L); DoScriptText(-1713539,m_creature); + m_creature->InterruptNonMeleeSpells(true); + bsw->doCast(SPELL_SHIELD_LIGHT); bsw->doCast(SPELL_TWIN_PACT_L); stage = 0; TwinPactCasted = true; @@ -330,11 +332,12 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI }; break; case 2: - if (bsw->timedQuery(SPELL_TWIN_PACT_H, uiDiff) - && bsw->doCast(SPELL_SHIELD_DARK) == CAST_OK ) + if (bsw->timedQuery(SPELL_TWIN_PACT_H, uiDiff)) { m_pInstance->SetData(DATA_CASTING_EYDIS, SPELL_TWIN_PACT_H); DoScriptText(-1713539,m_creature); + m_creature->InterruptNonMeleeSpells(true); + bsw->doCast(SPELL_SHIELD_DARK); bsw->doCast(SPELL_TWIN_PACT_H); stage = 0; TwinPactCasted = true; @@ -425,6 +428,7 @@ bool GossipHello_mob_light_essence(Player *player, Creature* pCreature) if(!pInstance) return true; player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, pCreature->GetGUID()); player->RemoveAurasDueToSpell(SPELL_DARK_ESSENCE); + player->CastSpell(player,SPELL_REMOVE_TOUCH,false); player->CastSpell(player,SPELL_LIGHT_ESSENCE,false); player->CLOSE_GOSSIP_MENU(); return true; @@ -475,6 +479,7 @@ bool GossipHello_mob_dark_essence(Player *player, Creature* pCreature) if(!pInstance) return true; player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, pCreature->GetGUID()); player->RemoveAurasDueToSpell(SPELL_LIGHT_ESSENCE); + player->CastSpell(player,SPELL_REMOVE_TOUCH,false); player->CastSpell(player,SPELL_DARK_ESSENCE,false); player->CLOSE_GOSSIP_MENU(); return true; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index f8e801146..0974ea8a0 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -89,7 +89,7 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI if (pInstance->GetData(TYPE_NORTHREND_BEASTS) == GORMOK_DONE) { pInstance->SetData(TYPE_STAGE,2); pInstance->SetData(TYPE_EVENT,200); - pInstance->SetData(TYPE_NORTHREND_BEASTS,IN_PROGRESS); + pInstance->SetData(TYPE_NORTHREND_BEASTS,SNAKES_IN_PROGRESS); pInstance->SetData(TYPE_BEASTS,IN_PROGRESS); }; if (pInstance->GetData(TYPE_NORTHREND_BEASTS) == FAIL) { @@ -103,7 +103,7 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI if (pInstance->GetData(TYPE_NORTHREND_BEASTS) == SNAKES_DONE) { pInstance->SetData(TYPE_STAGE,3); pInstance->SetData(TYPE_EVENT,300); - pInstance->SetData(TYPE_NORTHREND_BEASTS,IN_PROGRESS); + pInstance->SetData(TYPE_NORTHREND_BEASTS,SNAKES_IN_PROGRESS); pInstance->SetData(TYPE_BEASTS,IN_PROGRESS); }; if (pInstance->GetData(TYPE_NORTHREND_BEASTS) == FAIL) { @@ -251,6 +251,7 @@ switch(uiAction) { if (pInstance->GetData(TYPE_BEASTS) != DONE) { pInstance->SetData(TYPE_EVENT,110); pInstance->SetData(TYPE_NORTHREND_BEASTS,NOT_STARTED); + pInstance->SetData(TYPE_BEASTS,IN_PROGRESS); }; break; }; From 22461566c4101bbc70e87a53864ab01e1e742699 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Fri, 7 May 2010 13:33:57 +0400 Subject: [PATCH 293/405] TOC bugfixes --- addition/724_trial_of_crusader_mangos.sql | 3 + ...rial_of_crusader_spelltable_scriptdev2.sql | 19 ++--- .../boss_twin_valkyr.cpp | 14 ++-- .../instance_trial_of_the_crusader.cpp | 5 ++ .../trial_of_the_crusader.cpp | 76 ++++++++++++++----- .../trial_of_the_crusader.h | 6 +- 6 files changed, 81 insertions(+), 42 deletions(-) diff --git a/addition/724_trial_of_crusader_mangos.sql b/addition/724_trial_of_crusader_mangos.sql index c54d520a2..643c66b57 100644 --- a/addition/724_trial_of_crusader_mangos.sql +++ b/addition/724_trial_of_crusader_mangos.sql @@ -27,6 +27,9 @@ INSERT INTO `locales_npc_text` (`entry`, `Text0_0_loc1`, `Text0_0_loc2`, `Text0_ UPDATE `creature_template` SET `scriptname`='boss_lich_king_toc' WHERE `entry`=35877; UPDATE `creature_template` SET `minhealth`= 20000, `maxhealth` = 20000, `faction_A`= 1770, `faction_H` = 1770, `scriptname`='npc_fizzlebang_toc' WHERE `entry`=35458; +UPDATE `creature_template` SET `flags_extra`=0 WHERE `entry` IN (22517, 35651); +DELETE FROM `creature` WHERE `map` = 649 AND `id` IN (35651, 22517); + UPDATE `creature_template` SET `scriptname`='npc_tirion_toc' WHERE `entry`=34996; UPDATE `creature_template` SET `scriptname`='npc_garrosh_toc' WHERE `entry`=34995; UPDATE `creature_template` SET `scriptname`='npc_rinn_toc' WHERE `entry`=34990; diff --git a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql index f15e6bdde..bc9547282 100644 --- a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql +++ b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql @@ -5,10 +5,10 @@ DELETE FROM `boss_spell_table` WHERE `entry` IN -- Eydis Darkbane INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES (34496, 64238, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), -(34496, 65768, 67262, 67263, 67264, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), -(34496, 65874, 67256, 67257, 67258, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), -(34496, 65876, 67306, 67307, 67308, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), -(34496, 65879, 67244, 67245, 67246, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), +(34496, 65768, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34496, 65874, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34496, 65876, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34496, 65879, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), (34496, 65916, 67248, 67249, 67250, 15000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), (34496, 66058, 67182, 67183, 67184, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), (34496, 66069, 67309, 67310, 67311, 10000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), @@ -20,13 +20,14 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMa -- Fjola Lightbane INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES (34497, 64238, 64238, 64238, 64238, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), -(34497, 65766, 67270, 67271, 67272, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), -(34497, 65858, 67259, 67260, 67261, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), -(34497, 65875, 67303, 67304, 67305, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), +(34497, 65766, 67270, 67271, 67272, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34497, 65858, 0, 0, 0, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34497, 65875, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34497, 65879, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), (34497, 65916, 67248, 67249, 67250, 15000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), (34497, 66046, 67206, 67207, 67208, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), (34497, 66075, 67312, 67313, 67314, 10000, 10000, 10000, 10000, 20000, 20000, 20000, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), -(34497, 67297, 67297, 67298, 67298, 10000, 10000, 10000, 10000, 15000, 15000, 15000, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL); +(34497, 67297, 0, 0, 0, 10000, 10000, 10000, 10000, 15000, 15000, 15000, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL); -- summons INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMax_N10`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType` ) VALUES (34497, 34630, 20000, 20000, 1, 1, 2, 2, 10, 100, 0, 11); @@ -52,7 +53,7 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ -- Anub'arak scarab INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES (34605, 66092, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), -(34605, 67861, 0, 0, , 5000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL); +(34605, 67861, 0, 0, 0, 5000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL); -- Cold sphere INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp index 2cd3eef5b..cb3a880f8 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp @@ -132,6 +132,7 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI if (m_creature->isAlive()) m_creature->SummonCreature(NPC_LIGHT_ESSENCE, SpawnLoc[25].x, SpawnLoc[25].y, SpawnLoc[25].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); DoScriptText(-1713541,m_creature); m_pInstance->SetData(DATA_HEALTH_FJOLA, m_creature->GetMaxHealth()); + bsw->doCast(SPELL_LIGHT_SURGE); } void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) @@ -178,10 +179,10 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI case 2: if (bsw->timedQuery(SPELL_TWIN_PACT_L, uiDiff)) { - m_pInstance->SetData(DATA_CASTING_FJOLA, SPELL_TWIN_PACT_L); - DoScriptText(-1713539,m_creature); m_creature->InterruptNonMeleeSpells(true); bsw->doCast(SPELL_SHIELD_LIGHT); + m_pInstance->SetData(DATA_CASTING_FJOLA, SPELL_TWIN_PACT_L); + DoScriptText(-1713539,m_creature); bsw->doCast(SPELL_TWIN_PACT_L); stage = 0; TwinPactCasted = true; @@ -210,8 +211,6 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI m_pInstance->SetData(DATA_CASTING_EYDIS, SPELL_NONE); } - bsw->timedCast(SPELL_LIGHT_SURGE, uiDiff); - if (bsw->timedQuery(SPELL_LIGHT_TOUCH, uiDiff)) { bsw->doCast(SPELL_LIGHT_TOUCH); @@ -289,6 +288,7 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI if (m_creature->isAlive()) m_creature->SummonCreature(NPC_DARK_ESSENCE, SpawnLoc[22].x, SpawnLoc[22].y, SpawnLoc[22].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); if (m_creature->isAlive()) m_creature->SummonCreature(NPC_DARK_ESSENCE, SpawnLoc[23].x, SpawnLoc[23].y, SpawnLoc[23].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); m_pInstance->SetData(DATA_HEALTH_EYDIS, m_creature->GetMaxHealth()); + bsw->doCast(SPELL_DARK_SURGE); } void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) @@ -334,10 +334,10 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI case 2: if (bsw->timedQuery(SPELL_TWIN_PACT_H, uiDiff)) { - m_pInstance->SetData(DATA_CASTING_EYDIS, SPELL_TWIN_PACT_H); - DoScriptText(-1713539,m_creature); m_creature->InterruptNonMeleeSpells(true); bsw->doCast(SPELL_SHIELD_DARK); + m_pInstance->SetData(DATA_CASTING_EYDIS, SPELL_TWIN_PACT_H); + DoScriptText(-1713539,m_creature); bsw->doCast(SPELL_TWIN_PACT_H); stage = 0; TwinPactCasted = true; @@ -363,8 +363,6 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI stage = 2; } - bsw->timedCast(SPELL_DARK_SURGE, uiDiff); - if (bsw->timedQuery(SPELL_DARK_TOUCH, uiDiff)) { bsw->doCast(SPELL_DARK_TOUCH); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index 0c1f037d1..b2eb16923 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -524,8 +524,13 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance case 1110: case 1120: case 1130: + case 1132: + case 1134: case 1135: case 1140: + case 1142: + case 1144: + case 1145: case 1150: case 1160: case 1170: diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index 0974ea8a0..3a5a77984 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -41,9 +41,12 @@ static _Messages _GossipMessage[]= {MSG_LICH_KING,GOSSIP_ACTION_INFO_DEF+5,false,TYPE_ANUBARAK}, // {MSG_ANUBARAK,GOSSIP_ACTION_INFO_DEF+6,true,TYPE_ANUBARAK}, // }; + enum { - NUM_MESSAGES = 6, + NUM_MESSAGES = 6, + SPELL_WILFRED_PORTAL = 68424, + SPELL_JARAXXUS_CHAINS = 67924, }; @@ -503,6 +506,7 @@ struct MANGOS_DLL_DECL npc_fizzlebang_tocAI : public ScriptedAI InstanceData* pInstance; uint32 UpdateTimer; Creature* pPortal; + Creature* pTrigger; void JustDied(Unit* pKiller) { @@ -531,7 +535,8 @@ struct MANGOS_DLL_DECL npc_fizzlebang_tocAI : public ScriptedAI { case 1110: pInstance->SetData(TYPE_EVENT, 1120); - UpdateTimer = 4000; + UpdateTimer = 3000; + pInstance->SetData(TYPE_JARAXXUS,IN_PROGRESS); break; case 1120: DoScriptText(-1713511, m_creature); @@ -540,46 +545,77 @@ struct MANGOS_DLL_DECL npc_fizzlebang_tocAI : public ScriptedAI break; case 1130: m_creature->GetMotionMaster()->MovementExpired(); - pPortal = m_creature->SummonCreature(NPC_PORTAL, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (pPortal) pPortal->SetRespawnDelay(DAY); + m_creature->HandleEmoteCommand(EMOTE_STATE_SPELL_CHANNEL_OMNI); + pPortal = m_creature->SummonCreature(NPC_WILFRED_PORTAL, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z, 5, TEMPSUMMON_MANUAL_DESPAWN, 5000); + if (pPortal) { + pPortal->SetRespawnDelay(DAY); + pPortal->SetDisplayId(22862); + } DoScriptText(-1713512, m_creature); - pInstance->SetData(TYPE_EVENT, 1135); + pInstance->SetData(TYPE_EVENT, 1132); UpdateTimer = 4000; break; - case 1135: + case 1132: m_creature->GetMotionMaster()->MovementExpired(); + if (pPortal) pPortal->SetFloatValue(OBJECT_FIELD_SCALE_X, 1.5f); + pInstance->SetData(TYPE_EVENT, 1134); + UpdateTimer = 4000; + break; + case 1134: if (pPortal) pPortal->SetDisplayId(15900); - pInstance->SetData(TYPE_EVENT, 1140); + pTrigger = m_creature->SummonCreature(NPC_TRIGGER, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z, 5.0f, TEMPSUMMON_MANUAL_DESPAWN, 5000); + if (pTrigger) { + pTrigger->SetDisplayId(17612); + pTrigger->CastSpell(pTrigger, SPELL_WILFRED_PORTAL, false); + pTrigger->SetRespawnDelay(DAY); + } + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_SPELLCAST_OMNI); UpdateTimer = 4000; + pInstance->SetData(TYPE_EVENT, 1135); + break; + case 1135: + if (pTrigger) pTrigger->SetFloatValue(OBJECT_FIELD_SCALE_X, 2.0f); + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_SPELLCAST_OMNI); + UpdateTimer = 3000; + pInstance->SetData(TYPE_EVENT, 1140); break; case 1140: - m_creature->CastSpell(pPortal,69016,false); pInstance->SetData(TYPE_STAGE,4); - pInstance->SetData(TYPE_JARAXXUS,IN_PROGRESS); m_creature->SummonCreature(NPC_JARAXXUS, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_JARAXXUS))) { + pTemp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + pTemp->CastSpell(pTemp, SPELL_JARAXXUS_CHAINS, false); + } + pInstance->SetData(TYPE_EVENT, 1142); + UpdateTimer = 5000; + break; + case 1142: + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT, 1144); + DoScriptText(-1713513, m_creature); + break; + case 1144: + if (pTrigger) pTrigger->ForcedDespawn(); + pInstance->SetData(TYPE_EVENT, 1150); + UpdateTimer = 5000; + break; + case 1150: + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_JARAXXUS))) { + pTemp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + pTemp->RemoveAurasDueToSpell(SPELL_JARAXXUS_CHAINS); pTemp->SetInCombatWithZone(); m_creature->SetInCombatWith(pTemp); pTemp->AddThreat(m_creature, 1000.0f); pTemp->AI()->AttackStart(m_creature); } - pInstance->SetData(TYPE_EVENT, 1150); - UpdateTimer = 500; - break; - case 1150: - DoScriptText(-1713513, m_creature); + DoScriptText(-1713515, m_creature); pInstance->SetData(TYPE_EVENT, 1160); - UpdateTimer = 1000; + UpdateTimer = 3000; break; case 1160: - DoScriptText(-1713515, m_creature); pInstance->SetData(TYPE_EVENT, 1170); UpdateTimer = 1000; break; - case 1170: - pInstance->SetData(TYPE_EVENT, 1175); - UpdateTimer = 1000; - break; } } else UpdateTimer -= diff; pInstance->SetData(TYPE_EVENT_TIMER, UpdateTimer); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index e00e1d21a..6977bca9d 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -29,8 +29,8 @@ enum NPC_THRALL = 34994, NPC_PROUDMOORE = 34992, - NPC_PORTAL = 19224, NPC_TRIGGER = 22517, + NPC_WILFRED_PORTAL = 35651, NPC_ICEHOWL = 34797, NPC_GORMOK = 34796, @@ -102,10 +102,6 @@ enum DATA_CASTING_EYDIS = 203, DATA_CASTING_FJOLA = 204, - SPELL_WILFRED_PORTAL = 68424, - SPELL_JARAXXUS_CHAINS = 67924, - NPC_WILFRED_POTAL = 35651, - DESPAWN_TIME = 300000, }; From 1d44a67aea1c2e73f4622fba6a9f9ae4047eca4a Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Fri, 7 May 2010 13:36:14 +0400 Subject: [PATCH 294/405] TOC bugfixes (by bugreports) - NEED TESTING! - attempt to fix freeze instance on raid wipe on Northrend beasts - correct possibility to two yormungar undergrownd phase - correct casting Valkyries and his portals - correct casting Anub'arak scarabs - (feature) - new, more offlike scenario to summon Jaraxxus, correct NPC and spells --- addition/724_trial_of_crusader_mangos.sql | 3 + ...rial_of_crusader_spelltable_scriptdev2.sql | 12 +-- .../boss_faction_champions.cpp | 4 +- .../trial_of_the_crusader/boss_jaraxxus.cpp | 4 +- .../boss_northrend_beasts.cpp | 13 ++- .../boss_twin_valkyr.cpp | 19 +++-- .../instance_trial_of_the_crusader.cpp | 5 ++ .../trial_of_the_crusader.cpp | 81 ++++++++++++++----- .../trial_of_the_crusader.h | 6 +- 9 files changed, 98 insertions(+), 49 deletions(-) diff --git a/addition/724_trial_of_crusader_mangos.sql b/addition/724_trial_of_crusader_mangos.sql index c54d520a2..643c66b57 100644 --- a/addition/724_trial_of_crusader_mangos.sql +++ b/addition/724_trial_of_crusader_mangos.sql @@ -27,6 +27,9 @@ INSERT INTO `locales_npc_text` (`entry`, `Text0_0_loc1`, `Text0_0_loc2`, `Text0_ UPDATE `creature_template` SET `scriptname`='boss_lich_king_toc' WHERE `entry`=35877; UPDATE `creature_template` SET `minhealth`= 20000, `maxhealth` = 20000, `faction_A`= 1770, `faction_H` = 1770, `scriptname`='npc_fizzlebang_toc' WHERE `entry`=35458; +UPDATE `creature_template` SET `flags_extra`=0 WHERE `entry` IN (22517, 35651); +DELETE FROM `creature` WHERE `map` = 649 AND `id` IN (35651, 22517); + UPDATE `creature_template` SET `scriptname`='npc_tirion_toc' WHERE `entry`=34996; UPDATE `creature_template` SET `scriptname`='npc_garrosh_toc' WHERE `entry`=34995; UPDATE `creature_template` SET `scriptname`='npc_rinn_toc' WHERE `entry`=34990; diff --git a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql index 8ab4538c2..bc9547282 100644 --- a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql +++ b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql @@ -6,8 +6,8 @@ DELETE FROM `boss_spell_table` WHERE `entry` IN INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES (34496, 64238, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), (34496, 65768, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), -(34496, 65874, 67256, 67257, 67258, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), -(34496, 65876, 67306, 67307, 67308, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), +(34496, 65874, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34496, 65876, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), (34496, 65879, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), (34496, 65916, 67248, 67249, 67250, 15000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), (34496, 66058, 67182, 67183, 67184, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), @@ -21,8 +21,8 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMa INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES (34497, 64238, 64238, 64238, 64238, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), (34497, 65766, 67270, 67271, 67272, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), -(34497, 65858, 67259, 67260, 67261, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), -(34497, 65875, 67303, 67304, 67305, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), +(34497, 65858, 0, 0, 0, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34497, 65875, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), (34497, 65879, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), (34497, 65916, 67248, 67249, 67250, 15000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), (34497, 66046, 67206, 67207, 67208, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), @@ -52,8 +52,8 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ -- Anub'arak scarab INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES -(34605, 66092, 66092, 66092, 66092, 5000, 5000, 5000, 5000, 20000, 20000, 20000, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), -(34605, 67861, 66092, 66092, 66092, 5000, 5000, 5000, 5000, 20000, 20000, 20000, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL); +(34605, 66092, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34605, 67861, 0, 0, 0, 5000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL); -- Cold sphere INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp index 4e256380e..0a5846bdd 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp @@ -413,7 +413,7 @@ struct MANGOS_DLL_DECL mob_toc_priestAI : public boss_faction_championsAI bsw->doCast(SPELL_FLASH_HEAL); break; case 4: - if(Unit *target = urand(0,1) ? SelectUnit(SELECT_TARGET_RANDOM,0) : DoSelectLowestHpFriendly(40.0f)) + if(Unit *target = urand(0,1) ? m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0) : DoSelectLowestHpFriendly(40.0f)) bsw->doCast(target, SPELL_DISPEL); break; case 5: @@ -834,7 +834,7 @@ struct MANGOS_DLL_DECL mob_toc_rogueAI : public boss_faction_championsAI if(m_creature->IsInRange(m_creature->getVictim(), 10.0f, 40.0f)) bsw->timedCast(SPELL_SHADOWSTEP, diff); - if(Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1)) + if(Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,1)) if(m_creature->IsInRange(target, 0.0f, 15.0f, false)) bsw->timedCast(SPELL_BLIND, diff, target); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp index 2d81e654f..e6630f287 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp @@ -135,7 +135,7 @@ struct MANGOS_DLL_DECL boss_jaraxxusAI : public ScriptedAI bsw->timedCast(SPELL_FEL_LIGHTING, uiDiff); if (bsw->timedQuery(SPELL_INCINERATE_FLESH, uiDiff)) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,1)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,1)) { DoScriptText(-1713522,m_creature,pTarget); bsw->doCast(SPELL_INCINERATE_FLESH,pTarget); @@ -188,7 +188,7 @@ struct MANGOS_DLL_DECL mob_legion_flameAI : public ScriptedAI m_creature->SetInCombatWithZone(); m_creature->SetRespawnDelay(DAY); - if (Unit* pTarget= SelectUnit(SELECT_TARGET_RANDOM, 0) ) { + if (Unit* pTarget= m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0) ) { m_creature->GetMotionMaster()->MoveChase(pTarget); m_creature->SetSpeedRate(MOVE_RUN, 0.5); } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index c982c21ba..1ac3f9021 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -237,6 +237,7 @@ struct MANGOS_DLL_DECL boss_acidmawAI : public ScriptedAI enraged = false; m_creature->SetInCombatWithZone(); m_creature->SetRespawnDelay(DAY); + m_pInstance->SetData(TYPE_NORTHREND_BEASTS, ACIDMAW_SUBMERGED); } void JustDied(Unit* pKiller) @@ -251,7 +252,7 @@ struct MANGOS_DLL_DECL boss_acidmawAI : public ScriptedAI void JustReachedHome() { if (!m_pInstance) return; - if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == IN_PROGRESS) + if (m_pInstance->GetData(TYPE_BEASTS) == IN_PROGRESS) m_pInstance->SetData(TYPE_NORTHREND_BEASTS, FAIL); m_creature->ForcedDespawn(); } @@ -286,6 +287,7 @@ struct MANGOS_DLL_DECL boss_acidmawAI : public ScriptedAI break;} case 1: { m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->InterruptNonMeleeSpells(true); bsw->doCast(SPELL_SUBMERGE_0); stage = 2; DoScriptText(-1713557,m_creature); @@ -295,7 +297,8 @@ struct MANGOS_DLL_DECL boss_acidmawAI : public ScriptedAI if (bsw->timedQuery(SPELL_SLIME_POOL, uiDiff)) bsw->doCast(NPC_SLIME_POOL); - if (bsw->timedQuery(SPELL_SUBMERGE_0, uiDiff) && m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == ACIDMAW_SUBMERGED) + if ((bsw->timedQuery(SPELL_SUBMERGE_0, uiDiff) && m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == ACIDMAW_SUBMERGED) + || m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == DREADSCALE_SUBMERGED) stage = 3; break;} case 3: { @@ -361,7 +364,7 @@ struct MANGOS_DLL_DECL boss_dreadscaleAI : public ScriptedAI void JustReachedHome() { if (!m_pInstance) return; - if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == IN_PROGRESS) + if (m_pInstance->GetData(TYPE_BEASTS) == IN_PROGRESS) m_pInstance->SetData(TYPE_NORTHREND_BEASTS, FAIL); m_creature->ForcedDespawn(); } @@ -395,6 +398,7 @@ struct MANGOS_DLL_DECL boss_dreadscaleAI : public ScriptedAI break;} case 1: { m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->InterruptNonMeleeSpells(true); bsw->doCast(SPELL_SUBMERGE_0); stage = 2; DoScriptText(-1713557,m_creature); @@ -405,7 +409,8 @@ struct MANGOS_DLL_DECL boss_dreadscaleAI : public ScriptedAI if (bsw->timedQuery(SPELL_SLIME_POOL, uiDiff)) bsw->doCast(NPC_SLIME_POOL); - if (bsw->timedQuery(SPELL_SUBMERGE_0, uiDiff) && m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == DREADSCALE_SUBMERGED) + if ((bsw->timedQuery(SPELL_SUBMERGE_0, uiDiff) && m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == DREADSCALE_SUBMERGED) + || m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == ACIDMAW_SUBMERGED) stage = 3; break;} case 3: { diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp index 40c3c64bc..cb3a880f8 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp @@ -65,6 +65,7 @@ enum BossSpells SPELL_LIGHT_ESSENCE = 65686, SPELL_DARK_ESSENCE = 65684, SPELL_BERSERK = 64238, + SPELL_REMOVE_TOUCH = 68084, SPELL_NONE = 0, // SPELL_UNLEASHED_DARK = 65808, @@ -131,6 +132,7 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI if (m_creature->isAlive()) m_creature->SummonCreature(NPC_LIGHT_ESSENCE, SpawnLoc[25].x, SpawnLoc[25].y, SpawnLoc[25].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); DoScriptText(-1713541,m_creature); m_pInstance->SetData(DATA_HEALTH_FJOLA, m_creature->GetMaxHealth()); + bsw->doCast(SPELL_LIGHT_SURGE); } void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) @@ -175,9 +177,10 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI }; break; case 2: - if (bsw->timedQuery(SPELL_TWIN_PACT_L, uiDiff) - && bsw->doCast(SPELL_SHIELD_LIGHT) == CAST_OK ) + if (bsw->timedQuery(SPELL_TWIN_PACT_L, uiDiff)) { + m_creature->InterruptNonMeleeSpells(true); + bsw->doCast(SPELL_SHIELD_LIGHT); m_pInstance->SetData(DATA_CASTING_FJOLA, SPELL_TWIN_PACT_L); DoScriptText(-1713539,m_creature); bsw->doCast(SPELL_TWIN_PACT_L); @@ -208,8 +211,6 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI m_pInstance->SetData(DATA_CASTING_EYDIS, SPELL_NONE); } - bsw->timedCast(SPELL_LIGHT_SURGE, uiDiff); - if (bsw->timedQuery(SPELL_LIGHT_TOUCH, uiDiff)) { bsw->doCast(SPELL_LIGHT_TOUCH); @@ -287,6 +288,7 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI if (m_creature->isAlive()) m_creature->SummonCreature(NPC_DARK_ESSENCE, SpawnLoc[22].x, SpawnLoc[22].y, SpawnLoc[22].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); if (m_creature->isAlive()) m_creature->SummonCreature(NPC_DARK_ESSENCE, SpawnLoc[23].x, SpawnLoc[23].y, SpawnLoc[23].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); m_pInstance->SetData(DATA_HEALTH_EYDIS, m_creature->GetMaxHealth()); + bsw->doCast(SPELL_DARK_SURGE); } void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) @@ -330,9 +332,10 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI }; break; case 2: - if (bsw->timedQuery(SPELL_TWIN_PACT_H, uiDiff) - && bsw->doCast(SPELL_SHIELD_DARK) == CAST_OK ) + if (bsw->timedQuery(SPELL_TWIN_PACT_H, uiDiff)) { + m_creature->InterruptNonMeleeSpells(true); + bsw->doCast(SPELL_SHIELD_DARK); m_pInstance->SetData(DATA_CASTING_EYDIS, SPELL_TWIN_PACT_H); DoScriptText(-1713539,m_creature); bsw->doCast(SPELL_TWIN_PACT_H); @@ -360,8 +363,6 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI stage = 2; } - bsw->timedCast(SPELL_DARK_SURGE, uiDiff); - if (bsw->timedQuery(SPELL_DARK_TOUCH, uiDiff)) { bsw->doCast(SPELL_DARK_TOUCH); @@ -425,6 +426,7 @@ bool GossipHello_mob_light_essence(Player *player, Creature* pCreature) if(!pInstance) return true; player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, pCreature->GetGUID()); player->RemoveAurasDueToSpell(SPELL_DARK_ESSENCE); + player->CastSpell(player,SPELL_REMOVE_TOUCH,false); player->CastSpell(player,SPELL_LIGHT_ESSENCE,false); player->CLOSE_GOSSIP_MENU(); return true; @@ -475,6 +477,7 @@ bool GossipHello_mob_dark_essence(Player *player, Creature* pCreature) if(!pInstance) return true; player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, pCreature->GetGUID()); player->RemoveAurasDueToSpell(SPELL_LIGHT_ESSENCE); + player->CastSpell(player,SPELL_REMOVE_TOUCH,false); player->CastSpell(player,SPELL_DARK_ESSENCE,false); player->CLOSE_GOSSIP_MENU(); return true; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index 0c1f037d1..b2eb16923 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -524,8 +524,13 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance case 1110: case 1120: case 1130: + case 1132: + case 1134: case 1135: case 1140: + case 1142: + case 1144: + case 1145: case 1150: case 1160: case 1170: diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index f8e801146..3a5a77984 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -41,9 +41,12 @@ static _Messages _GossipMessage[]= {MSG_LICH_KING,GOSSIP_ACTION_INFO_DEF+5,false,TYPE_ANUBARAK}, // {MSG_ANUBARAK,GOSSIP_ACTION_INFO_DEF+6,true,TYPE_ANUBARAK}, // }; + enum { - NUM_MESSAGES = 6, + NUM_MESSAGES = 6, + SPELL_WILFRED_PORTAL = 68424, + SPELL_JARAXXUS_CHAINS = 67924, }; @@ -89,7 +92,7 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI if (pInstance->GetData(TYPE_NORTHREND_BEASTS) == GORMOK_DONE) { pInstance->SetData(TYPE_STAGE,2); pInstance->SetData(TYPE_EVENT,200); - pInstance->SetData(TYPE_NORTHREND_BEASTS,IN_PROGRESS); + pInstance->SetData(TYPE_NORTHREND_BEASTS,SNAKES_IN_PROGRESS); pInstance->SetData(TYPE_BEASTS,IN_PROGRESS); }; if (pInstance->GetData(TYPE_NORTHREND_BEASTS) == FAIL) { @@ -103,7 +106,7 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI if (pInstance->GetData(TYPE_NORTHREND_BEASTS) == SNAKES_DONE) { pInstance->SetData(TYPE_STAGE,3); pInstance->SetData(TYPE_EVENT,300); - pInstance->SetData(TYPE_NORTHREND_BEASTS,IN_PROGRESS); + pInstance->SetData(TYPE_NORTHREND_BEASTS,SNAKES_IN_PROGRESS); pInstance->SetData(TYPE_BEASTS,IN_PROGRESS); }; if (pInstance->GetData(TYPE_NORTHREND_BEASTS) == FAIL) { @@ -251,6 +254,7 @@ switch(uiAction) { if (pInstance->GetData(TYPE_BEASTS) != DONE) { pInstance->SetData(TYPE_EVENT,110); pInstance->SetData(TYPE_NORTHREND_BEASTS,NOT_STARTED); + pInstance->SetData(TYPE_BEASTS,IN_PROGRESS); }; break; }; @@ -502,6 +506,7 @@ struct MANGOS_DLL_DECL npc_fizzlebang_tocAI : public ScriptedAI InstanceData* pInstance; uint32 UpdateTimer; Creature* pPortal; + Creature* pTrigger; void JustDied(Unit* pKiller) { @@ -530,7 +535,8 @@ struct MANGOS_DLL_DECL npc_fizzlebang_tocAI : public ScriptedAI { case 1110: pInstance->SetData(TYPE_EVENT, 1120); - UpdateTimer = 4000; + UpdateTimer = 3000; + pInstance->SetData(TYPE_JARAXXUS,IN_PROGRESS); break; case 1120: DoScriptText(-1713511, m_creature); @@ -539,46 +545,77 @@ struct MANGOS_DLL_DECL npc_fizzlebang_tocAI : public ScriptedAI break; case 1130: m_creature->GetMotionMaster()->MovementExpired(); - pPortal = m_creature->SummonCreature(NPC_PORTAL, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (pPortal) pPortal->SetRespawnDelay(DAY); + m_creature->HandleEmoteCommand(EMOTE_STATE_SPELL_CHANNEL_OMNI); + pPortal = m_creature->SummonCreature(NPC_WILFRED_PORTAL, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z, 5, TEMPSUMMON_MANUAL_DESPAWN, 5000); + if (pPortal) { + pPortal->SetRespawnDelay(DAY); + pPortal->SetDisplayId(22862); + } DoScriptText(-1713512, m_creature); - pInstance->SetData(TYPE_EVENT, 1135); + pInstance->SetData(TYPE_EVENT, 1132); UpdateTimer = 4000; break; - case 1135: + case 1132: m_creature->GetMotionMaster()->MovementExpired(); + if (pPortal) pPortal->SetFloatValue(OBJECT_FIELD_SCALE_X, 1.5f); + pInstance->SetData(TYPE_EVENT, 1134); + UpdateTimer = 4000; + break; + case 1134: if (pPortal) pPortal->SetDisplayId(15900); - pInstance->SetData(TYPE_EVENT, 1140); + pTrigger = m_creature->SummonCreature(NPC_TRIGGER, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z, 5.0f, TEMPSUMMON_MANUAL_DESPAWN, 5000); + if (pTrigger) { + pTrigger->SetDisplayId(17612); + pTrigger->CastSpell(pTrigger, SPELL_WILFRED_PORTAL, false); + pTrigger->SetRespawnDelay(DAY); + } + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_SPELLCAST_OMNI); UpdateTimer = 4000; + pInstance->SetData(TYPE_EVENT, 1135); + break; + case 1135: + if (pTrigger) pTrigger->SetFloatValue(OBJECT_FIELD_SCALE_X, 2.0f); + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_SPELLCAST_OMNI); + UpdateTimer = 3000; + pInstance->SetData(TYPE_EVENT, 1140); break; case 1140: - m_creature->CastSpell(pPortal,69016,false); pInstance->SetData(TYPE_STAGE,4); - pInstance->SetData(TYPE_JARAXXUS,IN_PROGRESS); m_creature->SummonCreature(NPC_JARAXXUS, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_JARAXXUS))) { + pTemp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + pTemp->CastSpell(pTemp, SPELL_JARAXXUS_CHAINS, false); + } + pInstance->SetData(TYPE_EVENT, 1142); + UpdateTimer = 5000; + break; + case 1142: + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT, 1144); + DoScriptText(-1713513, m_creature); + break; + case 1144: + if (pTrigger) pTrigger->ForcedDespawn(); + pInstance->SetData(TYPE_EVENT, 1150); + UpdateTimer = 5000; + break; + case 1150: + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_JARAXXUS))) { + pTemp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + pTemp->RemoveAurasDueToSpell(SPELL_JARAXXUS_CHAINS); pTemp->SetInCombatWithZone(); m_creature->SetInCombatWith(pTemp); pTemp->AddThreat(m_creature, 1000.0f); pTemp->AI()->AttackStart(m_creature); } - pInstance->SetData(TYPE_EVENT, 1150); - UpdateTimer = 500; - break; - case 1150: - DoScriptText(-1713513, m_creature); + DoScriptText(-1713515, m_creature); pInstance->SetData(TYPE_EVENT, 1160); - UpdateTimer = 1000; + UpdateTimer = 3000; break; case 1160: - DoScriptText(-1713515, m_creature); pInstance->SetData(TYPE_EVENT, 1170); UpdateTimer = 1000; break; - case 1170: - pInstance->SetData(TYPE_EVENT, 1175); - UpdateTimer = 1000; - break; } } else UpdateTimer -= diff; pInstance->SetData(TYPE_EVENT_TIMER, UpdateTimer); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index e00e1d21a..6977bca9d 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -29,8 +29,8 @@ enum NPC_THRALL = 34994, NPC_PROUDMOORE = 34992, - NPC_PORTAL = 19224, NPC_TRIGGER = 22517, + NPC_WILFRED_PORTAL = 35651, NPC_ICEHOWL = 34797, NPC_GORMOK = 34796, @@ -102,10 +102,6 @@ enum DATA_CASTING_EYDIS = 203, DATA_CASTING_FJOLA = 204, - SPELL_WILFRED_PORTAL = 68424, - SPELL_JARAXXUS_CHAINS = 67924, - NPC_WILFRED_POTAL = 35651, - DESPAWN_TIME = 300000, }; From 62ad867be191329fababb537e36e2857e84463d0 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Fri, 7 May 2010 13:53:13 +0400 Subject: [PATCH 295/405] Old SQL correction. Thanks to Janu. --- addition/711_ruinsAQ_bosses_mangos.sql | 2 -- addition/712_halls_of_stone_mangos.sql | 32 ++++--------------- addition/712_halls_of_stone_scriptdev2.sql | 14 ++++++++ addition/715_trial_of_the_champion_mangos.sql | 4 +-- addition/718_draktharon_mangos.sql | 28 ++++++++-------- 5 files changed, 37 insertions(+), 43 deletions(-) delete mode 100644 addition/711_ruinsAQ_bosses_mangos.sql create mode 100644 addition/712_halls_of_stone_scriptdev2.sql diff --git a/addition/711_ruinsAQ_bosses_mangos.sql b/addition/711_ruinsAQ_bosses_mangos.sql deleted file mode 100644 index 87e04da34..000000000 --- a/addition/711_ruinsAQ_bosses_mangos.sql +++ /dev/null @@ -1,2 +0,0 @@ -UPDATE `mangos`.`creature_template` SET `ScriptName` = 'boss_kurinnaxx' WHERE `creature_template`.`entry` =15348 LIMIT 1 ; -UPDATE `mangos`.`creature_template` SET `ScriptName` = 'boss_moam' WHERE `creature_template`.`entry` =15340 LIMIT 1 ; diff --git a/addition/712_halls_of_stone_mangos.sql b/addition/712_halls_of_stone_mangos.sql index f8414fa9a..072e680c4 100644 --- a/addition/712_halls_of_stone_mangos.sql +++ b/addition/712_halls_of_stone_mangos.sql @@ -1,27 +1,9 @@ -UPDATE `mangos`.`creature_template` SET `ScriptName` = 'boss_krystallus' WHERE `creature_template`.`entry` =27977 LIMIT 1 ; - -DELETE FROM `scriptdev2`.`script_texts` WHERE `entry` IN -('-1712001','-1712002','-1712003','-1712004','-1712005','-1712006','-1712007','-1712008'); - -INSERT IGNORE INTO `scriptdev2`.`script_texts` -(`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`, `sound`, `type`, `language`, `emote`, `comment`) -VALUES -('-1712001', 'Soft meat! Come to me!', 'Soft meat! Come to me!', NULL, NULL, NULL, NULL, NULL, NULL, 'Мягкие пришли! Заходите!', '0', '0', '0', '0', NULL), -('-1712002', 'Get it!', 'Get it!', NULL, NULL, NULL, NULL, NULL, NULL, 'Лови кирпич!', '0', '0', '0', '0', NULL), -('-1712003', 'Into the ice!', 'Into the ice!', NULL, NULL, NULL, NULL, NULL, NULL, 'Всех заморожу!', '0', '0', '0', '0', NULL), -('-1712004', 'Stone curse!', 'Stone curse!', NULL, NULL, NULL, NULL, NULL, NULL, 'Окаменей!', '0', '0', '0', '0', NULL), -('-1712005', 'Gr-r-r-r!', 'Gr-r-r-r!', NULL, NULL, NULL, NULL, NULL, NULL, 'Ух, как я зол!', '0', '0', '0', '0', NULL), -('-1712006', 'It is cool!', 'It is cool!', NULL, NULL, NULL, NULL, NULL, NULL, 'Что, съел?', '0', '0', '0', '0', NULL), -('-1712007', 'O, no...', 'O, no...', NULL, NULL, NULL, NULL, NULL, NULL, 'Не может быть...', '0', '0', '0', '0', NULL), -('-1712008', 'Enrage!', 'Enrage!', NULL, NULL, NULL, NULL, NULL, NULL, 'Ну все, вы меня достали...', '0', '0', '0', '0', NULL); - -UPDATE `mangos`.`gameobject` SET `state` = '1' WHERE `gameobject`.`guid` =53556; -UPDATE `mangos`.`gameobject` SET `state` = '1' WHERE `gameobject`.`guid` =53560; - -UPDATE `mangos`.`gameobject_template` SET `faction` = '114',`data0` = '0' WHERE `gameobject_template`.`entry` =191293; -UPDATE `mangos`.`gameobject_template` SET `faction` = '0', `flags` = '0' WHERE `gameobject_template`.`entry` IN (193996,190586); -UPDATE `mangos`.`gameobject` SET `phaseMask` = '65535' WHERE `gameobject`.`guid` =37577; -UPDATE `mangos`.`gameobject` SET `phaseMask` = '65535' WHERE `gameobject`.`guid` =37583; - +UPDATE `creature_template` SET `ScriptName` = 'boss_krystallus' WHERE `entry` =27977 LIMIT 1 ; +UPDATE `gameobject` SET `state` = '1' WHERE `guid` =53556; +UPDATE `gameobject` SET `state` = '1' WHERE `guid` =53560; +UPDATE `gameobject_template` SET `faction` = '114',`data0` = '0' WHERE `entry` =191293; +UPDATE `gameobject_template` SET `faction` = '0', `flags` = '0' WHERE `entry` IN (193996,190586); +UPDATE `gameobject` SET `phaseMask` = '65535' WHERE `guid` =37577; +UPDATE `gameobject` SET `phaseMask` = '65535' WHERE `guid` =37583; diff --git a/addition/712_halls_of_stone_scriptdev2.sql b/addition/712_halls_of_stone_scriptdev2.sql new file mode 100644 index 000000000..94be15d20 --- /dev/null +++ b/addition/712_halls_of_stone_scriptdev2.sql @@ -0,0 +1,14 @@ +DELETE FROM `script_texts` WHERE `entry` IN +('-1712001','-1712002','-1712003','-1712004','-1712005','-1712006','-1712007','-1712008'); + +INSERT IGNORE INTO `script_texts` +(`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`, `sound`, `type`, `language`, `emote`, `comment`) +VALUES +('-1712001', 'Soft meat! Come to me!', 'Soft meat! Come to me!', NULL, NULL, NULL, NULL, NULL, NULL, 'Мягкие пришли! Заходите!', '0', '0', '0', '0', NULL), +('-1712002', 'Get it!', 'Get it!', NULL, NULL, NULL, NULL, NULL, NULL, 'Лови кирпич!', '0', '0', '0', '0', NULL), +('-1712003', 'Into the ice!', 'Into the ice!', NULL, NULL, NULL, NULL, NULL, NULL, 'Всех заморожу!', '0', '0', '0', '0', NULL), +('-1712004', 'Stone curse!', 'Stone curse!', NULL, NULL, NULL, NULL, NULL, NULL, 'Окаменей!', '0', '0', '0', '0', NULL), +('-1712005', 'Gr-r-r-r!', 'Gr-r-r-r!', NULL, NULL, NULL, NULL, NULL, NULL, 'Ух, как я зол!', '0', '0', '0', '0', NULL), +('-1712006', 'It is cool!', 'It is cool!', NULL, NULL, NULL, NULL, NULL, NULL, 'Что, съел?', '0', '0', '0', '0', NULL), +('-1712007', 'O, no...', 'O, no...', NULL, NULL, NULL, NULL, NULL, NULL, 'Не может быть...', '0', '0', '0', '0', NULL), +('-1712008', 'Enrage!', 'Enrage!', NULL, NULL, NULL, NULL, NULL, NULL, 'Ну все, вы меня достали...', '0', '0', '0', '0', NULL); diff --git a/addition/715_trial_of_the_champion_mangos.sql b/addition/715_trial_of_the_champion_mangos.sql index 3c2230c56..8a3407899 100644 --- a/addition/715_trial_of_the_champion_mangos.sql +++ b/addition/715_trial_of_the_champion_mangos.sql @@ -21,7 +21,7 @@ UPDATE creature_template SET faction_a=14, faction_h=14, scriptname='mob_toc5_ri UPDATE creature_template SET scriptname='boss_black_knight' WHERE entry=35451; -- free spells for creatures -UPDATE `mangos`.`creature_template` SET `spell1` = '0',`spell2` = '0',`spell3` = '0',`spell4` = '0' WHERE `creature_template`.`entry` IN +UPDATE `creature_template` SET `spell1` = '0',`spell2` = '0',`spell3` = '0',`spell4` = '0' WHERE `creature_template`.`entry` IN (34705,34702,34701,34657,34703,35572,35569,35571,35570,35617,35119,34928,35451,35545,35564,35004,35005,35052,35041,35033,35046,35043,35047,35044,35039,35034,35049,35030,34942,35050,35042,35045,35037,35031,35038,35029,35048,35032,35028,35040,35036,35051); -UPDATE `mangos`.`creature_template` SET `spell1` = '0',`spell2` = '0',`spell3` = '0',`spell4` = '0' WHERE `creature_template`.`entry` IN +UPDATE `creature_template` SET `spell1` = '0',`spell2` = '0',`spell3` = '0',`spell4` = '0' WHERE `creature_template`.`entry` IN (12002,12001,12000,12003,12004,12010,12484,12485,12447,12454,12441,12438,12453,12443,12437,12445,12725,12452,12486,12442,12482,12440,12483,12451,12456,12449,12455,12450,12487,12446,12011,12012,12436,12005,12007,12006,12009,12008); diff --git a/addition/718_draktharon_mangos.sql b/addition/718_draktharon_mangos.sql index 24ac6f6e1..4e7bd51c7 100644 --- a/addition/718_draktharon_mangos.sql +++ b/addition/718_draktharon_mangos.sql @@ -6,13 +6,13 @@ INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equ (927503, 26712, 600, 3, 1, 17188, 0, -392.455, -724.809, 32.1685, 5.35816, 3600, 5, 0, 4050, 0, 0, 1); DELETE FROM `creature_template` WHERE (`entry`=26710); -INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (26710, 0, 0, 0, 0, 0, 2536, 1160, 9829, 14952, 'Channel Target', '', '', 0, 1, 1, 8, 8, 0, 0, 7, 190, 190, 0, 1, 1, 0, 2, 2, 0, 24, 7.5, 2000, 0, 1, 33587200, 0, 0, 0, 0, 0, 0, 1, 1, 100, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 4, 0.2, 1, 0, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, ''); +INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed_walk`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (26710, 0, 0, 0, 0, 0, 2536, 1160, 9829, 14952, 'Channel Target', '', '', 0, 1, 1, 8, 8, 0, 0, 7, 190, 190, 0, 1, 1, 0, 2, 2, 0, 24, 7.5, 2000, 0, 1, 33587200, 0, 0, 0, 0, 0, 0, 1, 1, 100, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 4, 0.2, 1, 0, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, ''); DELETE FROM `creature_template` WHERE (`entry`=26712); -INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (26712, 0, 0, 0, 0, 0, 169, 0, 17188, 0, 'Crystal Channel Target', '', '', 0, 70, 70, 4050, 4050, 0, 0, 6719, 16, 16, 0, 1, 1, 0, 252, 357, 0, 304, 1, 2000, 0, 1, 33554436, 0, 0, 0, 0, 0, 0, 215, 320, 44, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 'crystal_channel'); +INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed_walk`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (26712, 0, 0, 0, 0, 0, 169, 0, 17188, 0, 'Crystal Channel Target', '', '', 0, 70, 70, 4050, 4050, 0, 0, 6719, 16, 16, 0, 1, 1, 0, 252, 357, 0, 304, 1, 2000, 0, 1, 33554436, 0, 0, 0, 0, 0, 0, 215, 320, 44, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 'crystal_channel'); DELETE FROM `creature_template` WHERE (`entry`=26714); -INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (26714, 0, 0, 0, 0, 0, 2536, 1160, 9829, 14952, 'Dead Crystal Holder', '', '', 0, 1, 1, 8, 8, 0, 0, 7, 190, 190, 0, 1, 1, 0, 2, 2, 0, 24, 7.5, 2000, 0, 1, 32768, 0, 0, 0, 0, 0, 0, 1, 1, 100, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 4, 0.2, 1, 0, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, ''); +INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed_walk`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (26714, 0, 0, 0, 0, 0, 2536, 1160, 9829, 14952, 'Dead Crystal Holder', '', '', 0, 1, 1, 8, 8, 0, 0, 7, 190, 190, 0, 1, 1, 0, 2, 2, 0, 24, 7.5, 2000, 0, 1, 32768, 0, 0, 0, 0, 0, 0, 1, 1, 100, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 4, 0.2, 1, 0, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, ''); /*King Dred*/ @@ -23,10 +23,10 @@ INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equ (152490, 26632, 600, 3, 1, 0, 0, -237.176, -675.768, 131.866, 4.66859, 25, 0, 0, 512278, 4169, 0, 0); DELETE FROM `creature_template` WHERE (`entry`=26632); -INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (26632, 31360, 0, 0, 0, 0, 27072, 0, 27072, 0, 'The Prophet Tharon\'ja', '', '', 76, 77, 275025, 275025, 0, 0, 0, 16, 16, 0, 1, 1, 1, 350, 450, 0, 400, 7.5, 2000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 350, 450, 75, 6, 72, 26632, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 25, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 'boss_tharonja'); +INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed_walk`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (26632, 31360, 0, 0, 0, 0, 27072, 0, 27072, 0, 'The Prophet Tharon\'ja', '', '', 76, 77, 275025, 275025, 0, 0, 0, 16, 16, 0, 1, 1, 1, 350, 450, 0, 400, 7.5, 2000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 350, 450, 75, 6, 72, 26632, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 25, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 'boss_tharonja'); DELETE FROM `creature_template` WHERE (`entry`=31360); -INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (31360, 0, 0, 0, 0, 0, 27072, 0, 27072, 0, 'The Prophet Tharon\'ja (1)', '', '', 82, 82, 512278, 512278, 4169, 4169, 0, 16, 16, 0, 1, 1, 1, 450, 650, 0, 750, 13, 2000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 350, 530, 100, 6, 72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 38, 1, 0, 43670, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, ''); +INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed_walk`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (31360, 0, 0, 0, 0, 0, 27072, 0, 27072, 0, 'The Prophet Tharon\'ja (1)', '', '', 82, 82, 512278, 512278, 4169, 4169, 0, 16, 16, 0, 1, 1, 1, 450, 650, 0, 750, 13, 2000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 350, 530, 100, 6, 72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 38, 1, 0, 43670, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, ''); DELETE FROM `spell_script_target` WHERE `entry` = 49555; INSERT INTO `spell_script_target` VALUES (49555, 2, 27753); @@ -34,28 +34,28 @@ INSERT INTO `spell_script_target` VALUES (49555, 2, 27753); UPDATE `creature_template` SET minhealth = 1885, maxhealth = 1885 WHERE entry = 27753; DELETE FROM `creature_template` WHERE (`entry`=26627); -INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (26627, 31344, 0, 0, 0, 0, 24500, 0, 24500, 0, 'Crystal Handler', '', '', 0, 75, 75, 21270, 21270, 0, 0, 0, 15, 15, 0, 1, 1, 1, 500, 1000, 0, 500, 1, 2000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 2.5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 'crystal_handler'); +INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed_walk`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (26627, 31344, 0, 0, 0, 0, 24500, 0, 24500, 0, 'Crystal Handler', '', '', 0, 75, 75, 21270, 21270, 0, 0, 0, 15, 15, 0, 1, 1, 1, 500, 1000, 0, 500, 1, 2000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 2.5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 'crystal_handler'); DELETE FROM `creature_template` WHERE (`entry`=31344); -INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (31344, 0, 0, 0, 0, 0, 24500, 0, 24500, 0, 'Crystal Handler (1)', '', '', 0, 81, 81, 41704, 41704, 8979, 8979, 0, 15, 15, 0, 1, 1, 1, 1000, 1500, 0, 500, 2, 2000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, ''); +INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed_walk`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (31344, 0, 0, 0, 0, 0, 24500, 0, 24500, 0, 'Crystal Handler (1)', '', '', 0, 81, 81, 41704, 41704, 8979, 8979, 0, 15, 15, 0, 1, 1, 1, 1000, 1500, 0, 500, 2, 2000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, ''); DELETE FROM `creature_template` WHERE (`entry`=27597); -INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (27597, 31348, 0, 0, 0, 0, 22337, 0, 22337, 0, 'Hulking Corpse', '', '', 0, 74, 74, 12338, 12338, 0, 0, 0, 15, 15, 0, 1, 1, 1, 500, 1000, 0, 500, 1, 2000, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 1.2, 1, 0, 0, 0, 0, 0, 0, 0, 88, 1, 0, 0, 0, ''); +INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed_walk`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (27597, 31348, 0, 0, 0, 0, 22337, 0, 22337, 0, 'Hulking Corpse', '', '', 0, 74, 74, 12338, 12338, 0, 0, 0, 15, 15, 0, 1, 1, 1, 500, 1000, 0, 500, 1, 2000, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 1.2, 1, 0, 0, 0, 0, 0, 0, 0, 88, 1, 0, 0, 0, ''); DELETE FROM `creature_template` WHERE (`entry`=31348); -INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (31348, 0, 0, 0, 0, 0, 22337, 0, 22337, 0, 'Hulking Corpse (1)', '', '', 0, 80, 80, 25200, 25200, 0, 0, 0, 15, 15, 0, 1, 1, 1, 1000, 1500, 0, 500, 2, 2000, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 88, 1, 0, 0, 0, ''); +INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed_walk`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (31348, 0, 0, 0, 0, 0, 22337, 0, 22337, 0, 'Hulking Corpse (1)', '', '', 0, 80, 80, 25200, 25200, 0, 0, 0, 15, 15, 0, 1, 1, 1, 1000, 1500, 0, 500, 2, 2000, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 88, 1, 0, 0, 0, ''); DELETE FROM `creature_template` WHERE (`entry`=27598); -INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (27598, 31873, 0, 0, 0, 0, 10978, 0, 10972, 0, 'Fetid Troll Corpse', '', '', 0, 74, 74, 2056, 2056, 0, 0, 0, 15, 15, 0, 1, 1, 0, 200, 400, 0, 500, 1, 2000, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0.2, 1, 0, 0, 0, 0, 0, 0, 0, 73, 1, 0, 0, 0, ''); +INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed_walk`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (27598, 31873, 0, 0, 0, 0, 10978, 0, 10972, 0, 'Fetid Troll Corpse', '', '', 0, 74, 74, 2056, 2056, 0, 0, 0, 15, 15, 0, 1, 1, 0, 200, 400, 0, 500, 1, 2000, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0.2, 1, 0, 0, 0, 0, 0, 0, 0, 73, 1, 0, 0, 0, ''); DELETE FROM `creature_template` WHERE (`entry`=31873); -INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (31873, 0, 0, 0, 0, 0, 10978, 0, 10972, 0, 'Fetid Troll Corpse (1)', '', '', 0, 80, 80, 3780, 3780, 0, 0, 0, 15, 15, 0, 1, 1, 0, 500, 1000, 0, 500, 2, 2000, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0.3, 1, 0, 0, 0, 0, 0, 0, 0, 73, 1, 0, 0, 0, ''); +INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed_walk`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (31873, 0, 0, 0, 0, 0, 10978, 0, 10972, 0, 'Fetid Troll Corpse (1)', '', '', 0, 80, 80, 3780, 3780, 0, 0, 0, 15, 15, 0, 1, 1, 0, 500, 1000, 0, 500, 2, 2000, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0.3, 1, 0, 0, 0, 0, 0, 0, 0, 73, 1, 0, 0, 0, ''); DELETE FROM `creature_template` WHERE (`entry`=27600); -INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (27600, 31356, 0, 0, 0, 0, 2606, 0, 2606, 0, 'Risen Shadowcaster', '', '', 0, 74, 74, 1645, 1645, 7809, 7809, 0, 15, 15, 0, 1, 1, 0, 200, 400, 0, 500, 1, 2000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'EventAI', 0, 3, 0.2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, ''); +INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed_walk`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (27600, 31356, 0, 0, 0, 0, 2606, 0, 2606, 0, 'Risen Shadowcaster', '', '', 0, 74, 74, 1645, 1645, 7809, 7809, 0, 15, 15, 0, 1, 1, 0, 200, 400, 0, 500, 1, 2000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'EventAI', 0, 3, 0.2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, ''); DELETE FROM `creature_template` WHERE (`entry`=31356); -INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (31356, 0, 0, 0, 0, 0, 2606, 0, 2606, 0, 'Risen Shadowcaster (1)', '', '', 0, 81, 81, 3128, 3128, 8979, 8979, 0, 15, 15, 0, 1, 1, 0, 500, 1000, 0, 500, 2, 2000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0.3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, ''); +INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed_walk`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (31356, 0, 0, 0, 0, 0, 2606, 0, 2606, 0, 'Risen Shadowcaster (1)', '', '', 0, 81, 81, 3128, 3128, 8979, 8979, 0, 15, 15, 0, 1, 1, 0, 500, 1000, 0, 500, 2, 2000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 0.3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, ''); UPDATE `creature_template` set AIName = '', ScriptName = 'boss_trollgore' where entry = 26630; UPDATE `creature_template` set AIName = '', ScriptName = 'boss_novos' where entry = 26631; @@ -63,4 +63,4 @@ UPDATE `creature_template` set AIName = '', ScriptName = 'crystal_handler' where UPDATE `creature_template` set AIName = '', ScriptName = 'crystal_channel' where entry = 26712; UPDATE `creature_template` set AIName = '', ScriptName = 'risen_shadowcaster' where entry = 27600; UPDATE `creature_template` set AIName = '', ScriptName = 'boss_dred' where entry = 27483; -UPDATE `creature_template` set AIName = '', ScriptName = 'boss_tharonja' where entry = 26632; \ No newline at end of file +UPDATE `creature_template` set AIName = '', ScriptName = 'boss_tharonja' where entry = 26632; From 9175a98a32fd755de13956c5ed6fe2fe1beddc30 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sun, 9 May 2010 20:29:00 +0400 Subject: [PATCH 296/405] Unfinished - Valithria && texts from PlagueWorks --- addition/721_icecrown_mangos.sql | 1 + addition/721_icecrown_scriptdev2.sql | 4 +- .../721_icecrown_spelltable_scriptdev2.sql | 47 ++++++- include/sc_boss_spell_worker.cpp | 10 ++ include/sc_boss_spell_worker.h | 1 + .../icecrown_citadel/boss_festergut.cpp | 50 ++++++- .../boss_proffesor_putricide.cpp | 46 ++++++- .../icecrown_citadel/boss_rotface.cpp | 58 +++++++- .../icecrown_citadel/boss_sindragosa.cpp | 10 +- .../boss_valithria_dreamwalker.cpp | 127 ++++++++++++++++-- .../icecrown_citadel/def_spire.h | 3 + .../instance_icecrown_spire.cpp | 15 +++ system/ScriptLoader.cpp | 2 + 13 files changed, 340 insertions(+), 34 deletions(-) diff --git a/addition/721_icecrown_mangos.sql b/addition/721_icecrown_mangos.sql index c59395b01..ebf6e2447 100644 --- a/addition/721_icecrown_mangos.sql +++ b/addition/721_icecrown_mangos.sql @@ -95,6 +95,7 @@ UPDATE `creature_template` SET `ScriptName`='boss_blood_queen_lanathel', `AIName -- Valithria dreamwalker DELETE FROM `creature` WHERE `map` = 631 AND `id` IN (38589); +DELETE FROM `creature` WHERE `map` = 631 AND `guid` IN (62056,61780,75866,77143); UPDATE `creature_template` SET `faction_A` = 35, `faction_H` = 35, `ScriptName`='boss_valithria_dreamwalker' WHERE `entry`= 36789; UPDATE `gameobject_template` SET `faction` = '0',`data0` = '0' WHERE `gameobject_template`.`entry` IN (201375,201373); diff --git a/addition/721_icecrown_scriptdev2.sql b/addition/721_icecrown_scriptdev2.sql index f724ae28b..2baa7c92b 100644 --- a/addition/721_icecrown_scriptdev2.sql +++ b/addition/721_icecrown_scriptdev2.sql @@ -76,8 +76,8 @@ INSERT INTO `script_texts` (`entry`,`content_loc8`, `content_default`, `sound`, ('-1631243','Плохие новости, народ... Похоже, у меня ничего не выйдет.','','17117','6','0','0','Putricide Death'), ('-1631244','Прекрасные новости, народ!','','17118','6','0','0','Putricide Berserk'), ('-1631245','Это обычное облако газа. Но будьте осторожны, не такое уж оно и обычное...','','17119','6','0','0','Putricide Gas Explosion'), -('-1631246','Что-то я ничего не чувтвую. Что? Это еще откуда?','','17120','6','0','0','Putricide Transform 01'), -('-1631247','На вкус кка вишенка. Ой, извините...','','17121','6','0','0','Putricide Transform 02'), +('-1631246','Что-то я ничего не чувствую. Что? Это еще откуда?','','17120','6','0','0','Putricide Transform 01'), +('-1631247','На вкус как вишенка. Ой, извините...','','17121','6','0','0','Putricide Transform 02'), ('-1631248','Два слизнюка в одной комнате? Может получиться что-то любопытное...','','17122','6','0','0','Putricide Summon Ooze'), ('-1631249','Вы слишком грязные чтобы тут расхаживать! Надо сперва соскрести эту мерзкую плоть.','','17125','6','0','0','Putricide Airlock01 Before fight'), diff --git a/addition/721_icecrown_spelltable_scriptdev2.sql b/addition/721_icecrown_spelltable_scriptdev2.sql index d247f9349..d09a95616 100644 --- a/addition/721_icecrown_spelltable_scriptdev2.sql +++ b/addition/721_icecrown_spelltable_scriptdev2.sql @@ -121,11 +121,11 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ -- Rotface DELETE FROM `boss_spell_table` WHERE `entry` = 36627; INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES -(36627, 47008, 0, 0, 0, 300000, 0, 0, 0, 300000, 0, 0, 0, 1, 0, 0), (36627, 69508, 0, 0, 0, 15000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), (36627, 69674, 0, 0, 0, 15000, 0, 0, 0, 30000, 0, 0, 0, 4, 0, 0), (36627, 69788, 0, 0, 0, 20000, 0, 0, 0, 40000, 0, 0, 0, 1, 0, 0), (36627, 69783, 69797, 69799, 69802, 20000, 0, 0, 0, 40000, 0, 0, 0, 3, 0, 0), +(36627, 47008, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 1, 0, 0), (36627, 69789, 0, 0, 0, 20000, 0, 0, 0, 40000, 0, 0, 0, 1, 0, 0); -- Professor Putricide @@ -138,11 +138,14 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ (36678,71621, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), (36678,71278, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), (36678,71279, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), -(36678,70852, 0, 0, 0, 15000, 0, 0, 0, 25000, 0, 0, 0, 6, 0, 0), (36678,73122, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), (36678,71603, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), (36678,70311, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 1, 0, 0), +(36678, 47008, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 1, 0, 0), (36678,72672, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 1, 0, 0); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(36678,70852, 0, 0, 0, 15000, 0, 0, 0, 25000, 0, 0, 0, 10, 30, 0, 15, 0, 0); + -- summons INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMax_N10`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType` ) VALUES (36678, 37562, 20000, 40000, 1, 1, 1, 1, 5, 10, 0, 9), @@ -216,6 +219,22 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ -- Valithria DELETE FROM `boss_spell_table` WHERE `entry` = 36789; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(36789, 72482, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36789, 70873, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36789, 71189, 0, 0, 0, 3000, 0, 0, 0, 3000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36789, 72724, 0, 0, 0, 3000, 0, 0, 0, 3000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36789, 70904, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36789, 71196, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36789, 70702, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 10, 40, 0, 15, 0, 0); +-- summons +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMax_N10`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType` ) VALUES +(36789, 37868, 20000, 40000, 1, 1, 1, 1, 2, 5, 0, 9), +(36789, 37863, 20000, 40000, 1, 1, 1, 1, 2, 5, 0, 9), +(36789, 36791, 20000, 40000, 1, 1, 1, 1, 2, 5, 0, 9), +(36789, 37934, 20000, 40000, 1, 1, 1, 1, 2, 5, 0, 9), +(36789, 37886, 20000, 40000, 1, 1, 1, 1, 2, 5, 0, 9); + -- Sindragosa DELETE FROM `boss_spell_table` WHERE `entry` = 36853; @@ -251,3 +270,27 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ -- Lich king DELETE FROM `boss_spell_table` WHERE `entry` = 36597; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(36597, 70541, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 70337, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 74074, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 69409, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 72754, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 68980, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 68981, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 72133, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 72262, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 69200, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 69242, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 69103, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 69099, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 69108, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 70358, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 70372, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 72149, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 72143, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 70498, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 70503, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 69037, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 36609, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 74352, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0); diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index ed7097ab1..a32a8d825 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -236,6 +236,16 @@ CanCastResult BossSpellWorker::_BSWSpellSelector(uint8 m_uiSpellIdx, Unit* pTarg return _BSWCastOnTarget(pTarget, m_uiSpellIdx); break; + case CAST_ON_RANDOM_POINT: + if (pSpell->LocData.z <= 1.0f) { + float fPosX, fPosY, fPosZ; + boss->GetPosition(fPosX, fPosY, fPosZ); + boss->GetRandomPoint(fPosX, fPosY, fPosZ, urand((uint32)pSpell->LocData.x, (uint32)pSpell->LocData.y), fPosX, fPosY, fPosZ); + boss->CastSpell(fPosX, fPosY, fPosZ, pSpell->m_uiSpellEntry[currentDifficulty], false); + return CAST_OK; + } else return CAST_FAIL_OTHER; + break; + default: return CAST_FAIL_OTHER; break; diff --git a/include/sc_boss_spell_worker.h b/include/sc_boss_spell_worker.h index f621ba060..26a3722ea 100644 --- a/include/sc_boss_spell_worker.h +++ b/include/sc_boss_spell_worker.h @@ -45,6 +45,7 @@ enum BossSpellTableParameters CAST_ON_ALLPLAYERS = 12, CAST_ON_FRENDLY = 13, CAST_ON_FRENDLY_LOWHP = 14, + CAST_ON_RANDOM_POINT = 15, SPELLTABLEPARM_NUMBER }; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp index 1c7173f51..8f11aad05 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp @@ -39,6 +39,7 @@ enum BossSpells SPELL_GASTRIC_BLOAT = 72219, SPELL_GASTRIC_EXPLOSION = 72227, SPELL_VILE_GAS = 72272, + SPELL_BERSERK = 47008, }; struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI @@ -53,12 +54,35 @@ struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI ScriptedInstance *pInstance; BossSpellWorker* bsw; uint8 stage; + bool intro; + bool pet; void Reset() { if(!pInstance) return; pInstance->SetData(TYPE_FESTERGUT, NOT_STARTED); stage = 0; + intro = false; + pet = false; + } + + void MoveInLineOfSight(Unit* pWho) + { + if(!pInstance || intro) return + pInstance->SetData(TYPE_EVENT, 500); + intro = true; + } + + void KilledUnit(Unit* pVictim) + { + switch (urand(0,1)) { + case 0: + DoScriptText(-1631204,m_creature,pVictim); + break; + case 1: + DoScriptText(-1631205,m_creature,pVictim); + break; + } } void JustReachedHome() @@ -68,7 +92,9 @@ struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI void Aggro(Unit *who) { - if(pInstance) pInstance->SetData(TYPE_FESTERGUT, IN_PROGRESS); + if(!pInstance) return; + pInstance->SetData(TYPE_FESTERGUT, IN_PROGRESS); + DoScriptText(-1631203,m_creature,who); } void JustDied(Unit *killer) @@ -77,10 +103,20 @@ struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI bsw->doRemove(SPELL_PUNGENT_BLIGHT); bsw->doRemove(SPELL_PUNGENT_BLIGHT_1); bsw->doRemove(SPELL_PUNGENT_BLIGHT_2); + DoScriptText(-1631206,m_creature); } void UpdateAI(const uint32 diff) { + + if (!pet) { + if (Creature* pGuard = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_STINKY))) + if (!pGuard->isAlive()) { + pet = true; + DoScriptText(-1631209,m_creature); + } + } + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -113,6 +149,7 @@ struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI case 3: if (bsw->timedQuery(SPELL_PUNGENT_BLIGHT, diff)) { + DoScriptText(-1631208,m_creature); bsw->doCast(SPELL_PUNGENT_BLIGHT); stage = 0; } @@ -122,7 +159,16 @@ struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI bsw->timedCast(SPELL_GASTRIC_BLOAT, diff); - bsw->timedCast(SPELL_VILE_GAS, diff); + if (bsw->timedQuery(SPELL_VILE_GAS, diff)) { + bsw->doCast(SPELL_VILE_GAS); + DoScriptText(-1631213,m_creature); + }; + + if (bsw->timedQuery(SPELL_BERSERK, diff)){ + bsw->doCast(SPELL_BERSERK); + DoScriptText(-1631207,m_creature); + }; + DoMeleeAttackIfReady(); } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp index e4f7e5a6e..452b92227 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp @@ -53,6 +53,12 @@ enum BossSpells SPELL_REGURGITATED_OOZE = 70539, SPELL_MUTATED_SLASH = 70542, SPELL_MUTATED_AURA = 70405, + + SPELL_BERSERK = 47008, +// +// VIEW_1 = 30881, +// VIEW_2 = 38216, +// VIEW_3 = 38216, }; struct MANGOS_DLL_DECL boss_proffesor_putricideAI : public ScriptedAI @@ -67,21 +73,47 @@ struct MANGOS_DLL_DECL boss_proffesor_putricideAI : public ScriptedAI ScriptedInstance *pInstance; BossSpellWorker* bsw; uint8 stage; + bool intro; void Reset() { - if (pInstance) pInstance->SetData(TYPE_PUTRICIDE, NOT_STARTED); + if (!pInstance) return; + pInstance->SetData(TYPE_PUTRICIDE, NOT_STARTED); stage = 0; + intro = false; + } + + void MoveInLineOfSight(Unit* pWho) + { + if(!pInstance || intro) return + DoScriptText(-1631249,m_creature); + intro = true; + } + + void KilledUnit(Unit* pVictim) + { + switch (urand(0,1)) { + case 0: + DoScriptText(-1631241,m_creature,pVictim); + break; + case 1: + DoScriptText(-1631242,m_creature,pVictim); + break; + } } void Aggro(Unit *who) { - if (pInstance) pInstance->SetData(TYPE_PUTRICIDE, IN_PROGRESS); + if (!pInstance) return; + pInstance->SetData(TYPE_PUTRICIDE, IN_PROGRESS); + DoScriptText(-1631240,m_creature, who); } void JustDied(Unit *killer) { - if (pInstance) pInstance->SetData(TYPE_PUTRICIDE, DONE); + if (!pInstance) return; + pInstance->SetData(TYPE_PUTRICIDE, DONE); + DoScriptText(-1631243,m_creature, killer); } void JustReachedHome() @@ -161,14 +193,18 @@ struct MANGOS_DLL_DECL boss_proffesor_putricideAI : public ScriptedAI if (bsw->timedQuery(SPELL_MALLEABLE_GOO, diff)) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - bsw->doCast(SPELL_MALLEABLE_GOO, pTarget); + bsw->doCast(SPELL_MALLEABLE_GOO); } if ( stage ==0 && m_creature->GetHealthPercent() < 80.0f ) stage = 1; if ( stage ==2 && m_creature->GetHealthPercent() < 35.0f ) stage = 3; + if (bsw->timedQuery(SPELL_BERSERK, diff)){ + bsw->doCast(SPELL_BERSERK); + DoScriptText(-1631244,m_creature); + } + DoMeleeAttackIfReady(); } }; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp index 99dcd06d8..81303866c 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp @@ -51,35 +51,81 @@ struct MANGOS_DLL_DECL boss_rotfaceAI : public ScriptedAI ScriptedInstance *pInstance; BossSpellWorker* bsw; uint8 stage; + bool intro; + bool pet; void Reset() { if(!pInstance) return; pInstance->SetData(TYPE_ROTFACE, NOT_STARTED); + stage = 0; + intro = false; + pet = false; + } + + void MoveInLineOfSight(Unit* pWho) + { + if(!pInstance || intro) return + pInstance->SetData(TYPE_EVENT, 600); + intro = true; + } + + void KilledUnit(Unit* pVictim) + { + switch (urand(0,1)) { + case 0: + DoScriptText(-1631222,m_creature,pVictim); + break; + case 1: + DoScriptText(-1631223,m_creature,pVictim); + break; + } } void Aggro(Unit *who) { - if(pInstance) pInstance->SetData(TYPE_ROTFACE, IN_PROGRESS); + if(!pInstance) return; + pInstance->SetData(TYPE_ROTFACE, IN_PROGRESS); + DoScriptText(-1631221,m_creature,who); } void JustDied(Unit *killer) { - if(pInstance) pInstance->SetData(TYPE_ROTFACE, DONE); + if(!pInstance) return; + pInstance->SetData(TYPE_ROTFACE, DONE); + DoScriptText(-1631224,m_creature); } void UpdateAI(const uint32 diff) { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + + if (!pet) { + if (Creature* pGuard = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_PRECIOUS))) + if (!pGuard->isAlive()) { + pet = true; + DoScriptText(-1631228,m_creature); + }; + }; + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - bsw->timedCast(SPELL_OOZE_FLOOD_1, diff); + if (bsw->timedQuery(SPELL_OOZE_FLOOD_1, diff)){ + bsw->doCast(SPELL_OOZE_FLOOD_1); + DoScriptText(-1631225,m_creature); + }; bsw->timedCast(SPELL_SLIME_SPRAY, diff); - bsw->timedCast(SPELL_MUTATED_INFECTION, diff); + if (bsw->timedQuery(SPELL_MUTATED_INFECTION, diff)){ + bsw->doCast(SPELL_MUTATED_INFECTION); + DoScriptText(-1631226,m_creature); + }; - bsw->timedCast(SPELL_BERSERK, diff); + if (bsw->timedQuery(SPELL_BERSERK, diff)){ + bsw->doCast(SPELL_BERSERK); + DoScriptText(-1631225,m_creature); + }; DoMeleeAttackIfReady(); } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp index d278aba0c..45612806a 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp @@ -91,7 +91,7 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI DoScriptText(-1631421,m_creature,pVictim); break; case 1: - DoScriptText(-16311422,m_creature,pVictim); + DoScriptText(-1631422,m_creature,pVictim); break; } } @@ -111,7 +111,7 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI void Aggro(Unit *who) { if(!pInstance) return; - DoScriptText(-16311420,m_creature,who); + DoScriptText(-1631420,m_creature,who); bsw->doCast(SPELL_FROST_AURA_1); } @@ -119,7 +119,7 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI { if(!pInstance) return; pInstance->SetData(TYPE_SINDRAGOSA, DONE); - DoScriptText(-16311423,m_creature,killer); + DoScriptText(-1631423,m_creature,killer); } void UpdateAI(const uint32 diff) @@ -140,7 +140,7 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI { bsw->doCast(SPELL_ICY_GRIP); bsw->doCast(SPELL_BLISTERING_COLD); - DoScriptText(-16311426,m_creature); + DoScriptText(-1631426,m_creature); } if (bsw->timedQuery(SPELL_FROST_BEACON, diff) && m_creature->GetHealthPercent() < 85.0f) stage = 1; @@ -166,7 +166,7 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI { bsw->doCast(SPELL_ICY_GRIP); bsw->doCast(SPELL_BLISTERING_COLD); - DoScriptText(-16311426,m_creature); + DoScriptText(-1631426,m_creature); } break; default: break; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp index 318c02577..17e30a91c 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp @@ -26,11 +26,15 @@ EndScriptData */ static Locations SpawnLoc[]= { - {4203.470215, 2484.500000, 364.872009}, // 0 Valithria - {4240.688477, 2405.794678, 364.868591}, // 1 Valithria Room 1 - {4165.112305, 2405.872559, 364.872925}, // 2 Valithria Room 2 - {4166.216797, 2564.197266, 364.873047}, // 3 Valithria Room 3 - {4239.579102, 2566.753418, 364.868439}, // 4 Valithria Room 4 + {4203.470215f, 2484.500000f, 364.872009f}, // 0 Valithria + {4240.688477f, 2405.794678f, 364.868591f}, // 1 Valithria Room 1 + {4165.112305f, 2405.872559f, 364.872925f}, // 2 Valithria Room 2 + {4166.216797f, 2564.197266f, 364.873047f}, // 3 Valithria Room 3 + {4239.579102f, 2566.753418f, 364.868439f}, // 4 Valithria Room 4 + {4228.589844f, 2469.110107f, 364.868988f}, // 5 Mob 1 + {4236.000000f, 2479.500000f, 364.869995f}, // 6 Mob 2 + {4235.410156f, 2489.300049f, 364.872009f}, // 7 Mob 3 + {4228.509766f, 2500.310059f, 364.876007f}, // 8 Mob 4 }; enum BossSpells @@ -58,6 +62,10 @@ struct MANGOS_DLL_DECL boss_valithria_dreamwalkerAI : public ScriptedAI pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); bsw = new BossSpellWorker(this); Reset(); + pGuard1 = NULL; + pGuard2 = NULL; + pGuard3 = NULL; + pGuard4 = NULL; } ScriptedInstance *pInstance; @@ -65,6 +73,11 @@ struct MANGOS_DLL_DECL boss_valithria_dreamwalkerAI : public ScriptedAI uint8 stage; bool battlestarted; bool intro; + uint8 currentDoor; + Creature* pGuard1; + Creature* pGuard2; + Creature* pGuard3; + Creature* pGuard4; void Reset() { @@ -77,26 +90,94 @@ struct MANGOS_DLL_DECL boss_valithria_dreamwalkerAI : public ScriptedAI stage = 0; battlestarted = false; intro = false; + currentDoor = 0; + if (!pGuard1) pGuard1 = (Creature*)bsw->doSummon(NPC_RISEN_ARCHMAGE, SpawnLoc[5].x, SpawnLoc[5].y, SpawnLoc[5].z); + if (pGuard1 && !pGuard1->isAlive()) pGuard1->Respawn(); + if (!pGuard2) pGuard2 = (Creature*)bsw->doSummon(NPC_RISEN_ARCHMAGE, SpawnLoc[6].x, SpawnLoc[6].y, SpawnLoc[6].z); + if (pGuard2 && !pGuard2->isAlive()) pGuard2->Respawn(); + if (!pGuard3) pGuard3 = (Creature*)bsw->doSummon(NPC_RISEN_ARCHMAGE, SpawnLoc[7].x, SpawnLoc[7].y, SpawnLoc[7].z); + if (pGuard3 && !pGuard3->isAlive()) pGuard3->Respawn(); + if (!pGuard4) pGuard4 = (Creature*)bsw->doSummon(NPC_RISEN_ARCHMAGE, SpawnLoc[8].x, SpawnLoc[8].y, SpawnLoc[8].z); + if (pGuard4 && !pGuard4->isAlive()) pGuard4->Respawn(); + } + + uint8 GetDoor(uint8 doornum) + { + switch (doornum) { + case 1: + return pInstance->GetData(GO_VALITHRIA_DOOR_1); + break; + case 2: + return pInstance->GetData(GO_VALITHRIA_DOOR_2); + break; + case 3: + return pInstance->GetData(GO_VALITHRIA_DOOR_3); + break; + case 4: + return pInstance->GetData(GO_VALITHRIA_DOOR_4); + break; + default: + return 0; + break; + }; + } + + void OpenDoor(uint64 guid) + { + if(!guid) return; + + if (Map* pMap = m_creature->GetMap()) + if (GameObject* pGo = pMap->GetGameObject(guid)) + pGo->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE); + } + + void CloseDoor(uint64 guid) + { + if(!guid) return; + + if (Map* pMap = m_creature->GetMap()) + if (GameObject* pGo = pMap->GetGameObject(guid)) + pGo->SetGoState(GO_STATE_READY); + } + + void EnterEvadeMode() + { + Map* pMap = m_creature->GetMap(); + Map::PlayerList const &players = pMap->GetPlayers(); + for (Map::PlayerList::const_iterator i = players.begin(); i != players.end(); ++i) + { + if(Player* pPlayer = i->getSource()) + if(pPlayer->isAlive() && pPlayer->IsWithinDistInMap(m_creature, 100.0f)) return; + } } void MoveInLineOfSight(Unit* pWho) { + if(!pInstance || intro) return; + + DoScriptText(-1631401,m_creature,pWho); + intro = true; } void KilledUnit(Unit* pVictim) { -/* switch (urand(0,1)) { - case 0: - DoScriptText(-1631006,m_creature,pVictim); + if(!pInstance) return; + + switch (urand(0,1)) { + case 0: + DoScriptText(-1631403,m_creature,pVictim); break; - case 1: - DoScriptText(-1631007,m_creature,pVictim); + case 1: + DoScriptText(-1631404,m_creature,pVictim); break; - };*/ + }; } void JustSummoned(Creature* summoned) { + if(!pInstance || !summoned || !battlestarted) return; + summoned->AddThreat(m_creature, 100.0f); + m_creature->GetMotionMaster()->MoveChase(m_creature); } void PlayersWin() @@ -115,7 +196,11 @@ struct MANGOS_DLL_DECL boss_valithria_dreamwalkerAI : public ScriptedAI { if(!pInstance) return pInstance->SetData(TYPE_VALITHRIA, FAIL); - DoScriptText(-1631000,m_creature); + DoScriptText(-1631409,m_creature); + if (pGuard1 && pGuard1->isAlive()) pGuard1->ForcedDespawn(); + if (pGuard2 && pGuard2->isAlive()) pGuard2->ForcedDespawn(); + if (pGuard3 && pGuard3->isAlive()) pGuard3->ForcedDespawn(); + if (pGuard4 && pGuard4->isAlive()) pGuard4->ForcedDespawn(); } void AttackStart(Unit *who) @@ -126,6 +211,17 @@ struct MANGOS_DLL_DECL boss_valithria_dreamwalkerAI : public ScriptedAI void UpdateAI(const uint32 diff) { + if (!battlestarted) { + if (pGuard1 && !pGuard1->isAlive() && + pGuard2 && !pGuard2->isAlive() && + pGuard3 && !pGuard3->isAlive() && + pGuard4 && !pGuard4->isAlive()) { + battlestarted = true; + DoScriptText(-1631401,m_creature); + } + return; + } + switch(stage) { case 0: @@ -140,6 +236,13 @@ struct MANGOS_DLL_DECL boss_valithria_dreamwalkerAI : public ScriptedAI if ( stage ==2 && m_creature->GetHealthPercent() < 15.0f ) stage = 3; if ( m_creature->GetHealthPercent() > 99.9f ) stage = 4; + if (bsw->timedQuery(NPC_RISEN_ARCHMAGE, diff)) { + CloseDoor(GetDoor(currentDoor)); + currentDoor = urand(1,4); + OpenDoor(GetDoor(currentDoor)); + DoScriptText(-1631402,m_creature); + }; + bsw->timedCast(SPELL_ICE_SPIKE, diff); return; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h index f71e7374b..e9f7df277 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h @@ -45,6 +45,9 @@ enum NPC_TIRION = 38995, + NPC_STINKY = 37025, + NPC_PRECIOUS = 37217, + NPC_RIMEFANG = 37533, NPC_SPINESTALKER = 37534, diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp index b974f6374..a9f2677e2 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp @@ -54,6 +54,9 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance uint64 m_uiRimefangGUID; uint64 m_uiSpinestalkerGUID; + uint64 m_uiStinkyGUID; + uint64 m_uiPreciousGUID; + uint64 m_uiIcewall1GUID; uint64 m_uiIcewall2GUID; uint64 m_uiSaurfangDoorGUID; @@ -229,6 +232,12 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance case NPC_SPINESTALKER: m_uiSpinestalkerGUID = pCreature->GetGUID(); break; + case NPC_STINKY: + m_uiStinkyGUID = pCreature->GetGUID(); + break; + case NPC_PRECIOUS: + m_uiPreciousGUID = pCreature->GetGUID(); + break; } } @@ -571,10 +580,16 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance case NPC_LICH_KING: return m_uiLichKingGUID; case NPC_RIMEFANG: return m_uiRimefangGUID; case NPC_SPINESTALKER: return m_uiSpinestalkerGUID; + case NPC_STINKY: return m_uiStinkyGUID; + case NPC_PRECIOUS: return m_uiPreciousGUID; case GO_SCIENTIST_DOOR_ORANGE: return m_uiSDoorOrangeGUID; case GO_SCIENTIST_DOOR_GREEN: return m_uiSDoorGreenGUID; case GO_SCIENTIST_DOOR_COLLISION: return m_uiSDoorCollisionGUID; case GO_BLOODWING_DOOR: return m_uiBloodwingDoorGUID; + case GO_VALITHRIA_DOOR_1: return m_uiValithriaDoor1GUID; + case GO_VALITHRIA_DOOR_2: return m_uiValithriaDoor2GUID; + case GO_VALITHRIA_DOOR_3: return m_uiValithriaDoor3GUID; + case GO_VALITHRIA_DOOR_4: return m_uiValithriaDoor4GUID; } return 0; } diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index 364b0b1b2..aeb75daaa 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -390,6 +390,7 @@ extern void AddSC_boss_festergut(); extern void AddSC_boss_proffesor_putricide(); extern void AddSC_blood_prince_council(); extern void AddSC_boss_blood_queen_lanathel(); +extern void AddSC_boss_valithria_dreamwalker(); extern void AddSC_boss_sindragosa(); extern void AddSC_boss_lich_king_icc(); @@ -866,6 +867,7 @@ void AddScripts() AddSC_boss_proffesor_putricide(); AddSC_blood_prince_council(); AddSC_boss_blood_queen_lanathel(); + AddSC_boss_valithria_dreamwalker(); AddSC_boss_sindragosa(); AddSC_boss_lich_king_icc(); From efbb6f28c041952c9d75f2e17c5185d8828b7548 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Mon, 10 May 2010 21:16:22 +0400 Subject: [PATCH 297/405] Valithria 50% ready --- addition/721_icecrown_mangos.sql | 3 +- .../721_icecrown_spelltable_scriptdev2.sql | 24 +- include/sc_boss_spell_worker.cpp | 17 ++ include/sc_boss_spell_worker.h | 7 + .../boss_valithria_dreamwalker.cpp | 248 +++++++++++++----- .../icecrown_citadel/icecrown_teleport.cpp | 2 +- 6 files changed, 226 insertions(+), 75 deletions(-) diff --git a/addition/721_icecrown_mangos.sql b/addition/721_icecrown_mangos.sql index ebf6e2447..dea390647 100644 --- a/addition/721_icecrown_mangos.sql +++ b/addition/721_icecrown_mangos.sql @@ -94,9 +94,8 @@ UPDATE `gameobject` SET `state` = '0' WHERE `id` IN (201376); UPDATE `creature_template` SET `ScriptName`='boss_blood_queen_lanathel', `AIName`='' WHERE `entry`= 37955; -- Valithria dreamwalker -DELETE FROM `creature` WHERE `map` = 631 AND `id` IN (38589); -DELETE FROM `creature` WHERE `map` = 631 AND `guid` IN (62056,61780,75866,77143); UPDATE `creature_template` SET `faction_A` = 35, `faction_H` = 35, `ScriptName`='boss_valithria_dreamwalker' WHERE `entry`= 36789; +UPDATE `creature_template` SET `faction_A` = 35, `faction_H` = 35, `ScriptName`='mob_nightmare_portal', `AIName`='' WHERE `entry`= 38429; UPDATE `gameobject_template` SET `faction` = '0',`data0` = '0' WHERE `gameobject_template`.`entry` IN (201375,201373); UPDATE `gameobject_template` SET `faction` = '114',`data0` = '0' WHERE `gameobject_template`.`entry` IN (201374); diff --git a/addition/721_icecrown_spelltable_scriptdev2.sql b/addition/721_icecrown_spelltable_scriptdev2.sql index d09a95616..18ab609cb 100644 --- a/addition/721_icecrown_spelltable_scriptdev2.sql +++ b/addition/721_icecrown_spelltable_scriptdev2.sql @@ -220,21 +220,27 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ -- Valithria DELETE FROM `boss_spell_table` WHERE `entry` = 36789; INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES -(36789, 72482, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36789, 71977, 0, 0, 0, 30000, 0, 0, 0, 60000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36789, 71987, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 1, 1, 0), +(36789, 72481, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36789, 70873, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36789, 71189, 0, 0, 0, 3000, 0, 0, 0, 3000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36789, 72724, 0, 0, 0, 3000, 0, 0, 0, 3000, 0, 0, 0, 0, 0, 0, 1, 0, 0), -(36789, 70904, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36789, 70904, 0, 0, 0, 5000, 0, 0, 0, 5000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36789, 71196, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), -(36789, 70702, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 10, 40, 0, 15, 0, 0); +(36789, 70702, 0, 0, 0, 15000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 13, 0, 1); -- summons INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMax_N10`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType` ) VALUES -(36789, 37868, 20000, 40000, 1, 1, 1, 1, 2, 5, 0, 9), -(36789, 37863, 20000, 40000, 1, 1, 1, 1, 2, 5, 0, 9), -(36789, 36791, 20000, 40000, 1, 1, 1, 1, 2, 5, 0, 9), -(36789, 37934, 20000, 40000, 1, 1, 1, 1, 2, 5, 0, 9), -(36789, 37886, 20000, 40000, 1, 1, 1, 1, 2, 5, 0, 9); - +(36789, 38429, 30000, 40000, 1, 1, 1, 1, 5, 70, 0, 9), +(36789, 37868, 30000, 40000, 1, 1, 1, 1, 2, 5, 0, 9), +(36789, 37863, 30000, 40000, 1, 1, 1, 1, 2, 5, 0, 9), +(36789, 36791, 30000, 40000, 1, 1, 1, 1, 2, 5, 0, 9), +(36789, 37934, 30000, 40000, 1, 1, 1, 1, 2, 5, 0, 9), +(36789, 37886, 30000, 40000, 1, 1, 1, 1, 2, 5, 0, 9); +-- Nightmare portal +DELETE FROM `boss_spell_table` WHERE `entry` = 38429; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(38429, 70873, 0, 0, 0, 1000, 0, 0, 0, 1000, 0, 0, 0, 0, 0, 0, 6, 0, 1); -- Sindragosa DELETE FROM `boss_spell_table` WHERE `entry` = 36853; diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index a32a8d825..64c8b9108 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -452,6 +452,23 @@ bool BossSpellWorker::_doRemove(uint8 m_uiSpellIdx, Unit* pTarget, SpellEffectIn return true; }; +bool BossSpellWorker::_doAura(uint8 m_uiSpellIdx, Unit* pTarget, SpellEffectIndex index) +{ + if (!pTarget) return false; + + SpellEntry const *spell; + + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + + debug_log("BSW: adding aura from spell %u index %u",pSpell->m_uiSpellEntry[currentDifficulty], index); + + if (spell = (SpellEntry *)GetSpellStore()->LookupEntry(pSpell->m_uiSpellEntry[currentDifficulty])) + if (pTarget->AddAura(new BossAura(spell, index, &pSpell->varData, pTarget, pTarget))) + return CAST_OK; + else return CAST_FAIL_OTHER; + +}; + // Copypasting from CreatureAI.cpp. if this called from bossAI-> crashed :( CanCastResult BossSpellWorker::_CanCastSpell(Unit* pTarget, const SpellEntry *pSpell, bool isTriggered) diff --git a/include/sc_boss_spell_worker.h b/include/sc_boss_spell_worker.h index 26a3722ea..eddd95af3 100644 --- a/include/sc_boss_spell_worker.h +++ b/include/sc_boss_spell_worker.h @@ -145,6 +145,11 @@ class MANGOS_DLL_DECL BossSpellWorker return _doRemove(FindSpellIDX(SpellID),pTarget, index); }; + bool doAura(uint32 SpellID, Unit* pTarget = NULL, SpellEffectIndex index = EFFECT_INDEX_0) + { + return _doAura(FindSpellIDX(SpellID),pTarget, index); + }; + bool hasAura(uint32 SpellID, Unit* pTarget = NULL) { if (!pTarget) pTarget = boss; @@ -210,6 +215,8 @@ class MANGOS_DLL_DECL BossSpellWorker bool _doRemove(uint8 m_uiSpellIdx, Unit* pTarget = NULL, SpellEffectIndex index = EFFECT_INDEX_0); + bool _doAura(uint8 m_uiSpellIdx, Unit* pTarget = NULL, SpellEffectIndex index = EFFECT_INDEX_0); + bool _hasAura(uint8 m_uiSpellIdx, Unit* pTarget); void _fillEmptyDataField(); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp index 17e30a91c..5096278f4 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: boss_valithria -SD%Complete: 1% +SD%Complete: 5% SDComment: by /dev/rsa SDCategory: Icecrown Citadel EndScriptData */ @@ -39,7 +39,8 @@ static Locations SpawnLoc[]= enum BossSpells { - SPELL_NIGHTMARE_POTAL = 72482, +// SPELL_NIGHTMARE_PORTAL = 72481, // Not worked yet. Use 71977 (visual effect) instead? + SPELL_NIGHTMARE_PORTAL = 71977, SPELL_EMERALD_VIGOR = 70873, SPELL_DREAMWALKER_RAGE = 71189, SPELL_IMMUNITY = 72724, @@ -53,6 +54,7 @@ enum BossSpells NPC_BLASING_SKELETON = 36791, NPC_BLISTERING_ZOMBIE = 37934, NPC_GLUTTONOUS_ABOMINATION = 37886, + NPC_NIGHTMARE_PORTAL = 38429, // Not realized yet }; struct MANGOS_DLL_DECL boss_valithria_dreamwalkerAI : public ScriptedAI @@ -61,11 +63,8 @@ struct MANGOS_DLL_DECL boss_valithria_dreamwalkerAI : public ScriptedAI { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); bsw = new BossSpellWorker(this); + pMap = m_creature->GetMap(); Reset(); - pGuard1 = NULL; - pGuard2 = NULL; - pGuard3 = NULL; - pGuard4 = NULL; } ScriptedInstance *pInstance; @@ -74,47 +73,43 @@ struct MANGOS_DLL_DECL boss_valithria_dreamwalkerAI : public ScriptedAI bool battlestarted; bool intro; uint8 currentDoor; - Creature* pGuard1; - Creature* pGuard2; - Creature* pGuard3; - Creature* pGuard4; + int8 portalscount; + Map* pMap; + void Reset() { if(!pInstance) return; + m_creature->SetHealth(m_creature->GetMaxHealth()/2); pInstance->SetData(TYPE_VALITHRIA, NOT_STARTED); bsw->resetTimers(); m_creature->SetRespawnDelay(7*DAY); bsw->doCast(SPELL_CORRUPTION); bsw->doCast(SPELL_IMMUNITY); stage = 0; + portalscount = 0; battlestarted = false; intro = false; currentDoor = 0; - if (!pGuard1) pGuard1 = (Creature*)bsw->doSummon(NPC_RISEN_ARCHMAGE, SpawnLoc[5].x, SpawnLoc[5].y, SpawnLoc[5].z); - if (pGuard1 && !pGuard1->isAlive()) pGuard1->Respawn(); - if (!pGuard2) pGuard2 = (Creature*)bsw->doSummon(NPC_RISEN_ARCHMAGE, SpawnLoc[6].x, SpawnLoc[6].y, SpawnLoc[6].z); - if (pGuard2 && !pGuard2->isAlive()) pGuard2->Respawn(); - if (!pGuard3) pGuard3 = (Creature*)bsw->doSummon(NPC_RISEN_ARCHMAGE, SpawnLoc[7].x, SpawnLoc[7].y, SpawnLoc[7].z); - if (pGuard3 && !pGuard3->isAlive()) pGuard3->Respawn(); - if (!pGuard4) pGuard4 = (Creature*)bsw->doSummon(NPC_RISEN_ARCHMAGE, SpawnLoc[8].x, SpawnLoc[8].y, SpawnLoc[8].z); - if (pGuard4 && !pGuard4->isAlive()) pGuard4->Respawn(); + if (Unit* pTemp = Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_VALITHRIA_QUEST))) + if (pTemp->GetVisibility() == VISIBILITY_ON) + pTemp->SetVisibility(VISIBILITY_OFF); } - uint8 GetDoor(uint8 doornum) + uint64 GetDoor(uint8 doornum) { switch (doornum) { case 1: - return pInstance->GetData(GO_VALITHRIA_DOOR_1); + return pInstance->GetData64(GO_VALITHRIA_DOOR_1); break; case 2: - return pInstance->GetData(GO_VALITHRIA_DOOR_2); + return pInstance->GetData64(GO_VALITHRIA_DOOR_2); break; case 3: - return pInstance->GetData(GO_VALITHRIA_DOOR_3); + return pInstance->GetData64(GO_VALITHRIA_DOOR_3); break; case 4: - return pInstance->GetData(GO_VALITHRIA_DOOR_4); + return pInstance->GetData64(GO_VALITHRIA_DOOR_4); break; default: return 0; @@ -140,23 +135,39 @@ struct MANGOS_DLL_DECL boss_valithria_dreamwalkerAI : public ScriptedAI pGo->SetGoState(GO_STATE_READY); } - void EnterEvadeMode() + void QueryEvadeMode() { - Map* pMap = m_creature->GetMap(); Map::PlayerList const &players = pMap->GetPlayers(); for (Map::PlayerList::const_iterator i = players.begin(); i != players.end(); ++i) { if(Player* pPlayer = i->getSource()) if(pPlayer->isAlive() && pPlayer->IsWithinDistInMap(m_creature, 100.0f)) return; } + + pInstance->SetData(TYPE_VALITHRIA, FAIL); + DoScriptText(-1631409,m_creature); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->LoadCreaturesAddon(); + if (m_creature->isAlive()) + m_creature->GetMotionMaster()->MoveTargetedHome(); + m_creature->SetLootRecipient(NULL); + Reset(); } void MoveInLineOfSight(Unit* pWho) { - if(!pInstance || intro) return; + if (!pInstance || ( intro && battlestarted)) return; - DoScriptText(-1631401,m_creature,pWho); - intro = true; + if (!intro) { + DoScriptText(-1631401,m_creature,pWho); + intro = true; + } + if (!battlestarted && pWho->isAlive() && pWho->IsWithinDistInMap(m_creature, 20.0f)) { + DoScriptText(-1631401,m_creature,pWho); + battlestarted = true; + pInstance->SetData(TYPE_VALITHRIA, IN_PROGRESS); + } } void KilledUnit(Unit* pVictim) @@ -176,20 +187,13 @@ struct MANGOS_DLL_DECL boss_valithria_dreamwalkerAI : public ScriptedAI void JustSummoned(Creature* summoned) { if(!pInstance || !summoned || !battlestarted) return; + + if ( summoned->GetEntry() == NPC_NIGHTMARE_PORTAL ) return; + summoned->AddThreat(m_creature, 100.0f); + m_creature->GetMotionMaster()->MoveChase(m_creature); - } - void PlayersWin() - { - if(!pInstance) return - DoScriptText(-1631000,m_creature); - bsw->doCast(SPELL_DREAMWALKER_RAGE); - if (Unit* pTemp = bsw->doSummon(NPC_VALITHRIA_QUEST, SpawnLoc[0].x, SpawnLoc[0].y, SpawnLoc[0].z,TEMPSUMMON_MANUAL_DESPAWN)) - if (pTemp->HasAura(SPELL_CORRUPTION)) - pTemp->RemoveAurasDueToSpell(SPELL_CORRUPTION); - pInstance->SetData(TYPE_VALITHRIA, DONE); - m_creature->ForcedDespawn(); } void JustDied(Unit *killer) @@ -197,10 +201,8 @@ struct MANGOS_DLL_DECL boss_valithria_dreamwalkerAI : public ScriptedAI if(!pInstance) return pInstance->SetData(TYPE_VALITHRIA, FAIL); DoScriptText(-1631409,m_creature); - if (pGuard1 && pGuard1->isAlive()) pGuard1->ForcedDespawn(); - if (pGuard2 && pGuard2->isAlive()) pGuard2->ForcedDespawn(); - if (pGuard3 && pGuard3->isAlive()) pGuard3->ForcedDespawn(); - if (pGuard4 && pGuard4->isAlive()) pGuard4->ForcedDespawn(); + m_creature->Respawn(); + Reset(); } void AttackStart(Unit *who) @@ -211,37 +213,95 @@ struct MANGOS_DLL_DECL boss_valithria_dreamwalkerAI : public ScriptedAI void UpdateAI(const uint32 diff) { - if (!battlestarted) { - if (pGuard1 && !pGuard1->isAlive() && - pGuard2 && !pGuard2->isAlive() && - pGuard3 && !pGuard3->isAlive() && - pGuard4 && !pGuard4->isAlive()) { - battlestarted = true; - DoScriptText(-1631401,m_creature); - } - return; - } + if (!battlestarted) return; + + QueryEvadeMode(); switch(stage) { case 0: + if ( m_creature->GetHealthPercent() > 90.0f ) stage = 2; + if ( m_creature->GetHealthPercent() < 10.0f ) stage = 3; break; case 1: + if ( m_creature->GetHealthPercent() < 90.0f && m_creature->GetHealthPercent() > 10.0f ) stage = 0; + if ( m_creature->GetHealthPercent() > 99.9f ) stage = 5; + if ( m_creature->GetHealthPercent() < 1.0f ) stage = 4; + break; + case 2: + DoScriptText(-1631407,m_creature); + stage = 1; + break; + case 3: + DoScriptText(-1631406,m_creature); + stage = 1; + break; + case 4: + DoScriptText(-1631409,m_creature); + stage = 1; + pInstance->SetData(TYPE_VALITHRIA, FAIL); + DoScriptText(-1631409,m_creature); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->LoadCreaturesAddon(); + + if (m_creature->isAlive()) + m_creature->GetMotionMaster()->MoveTargetedHome(); + m_creature->SetLootRecipient(NULL); + Reset(); + break; + case 5: + DoScriptText(-1631408,m_creature); + if (m_creature->HasAura(SPELL_CORRUPTION)) bsw->doRemove(SPELL_CORRUPTION); + stage = 6; + return; + break; + case 6: + if (bsw->timedQuery(SPELL_CORRUPTION, diff)) stage = 7; + return; + break; + case 7: + bsw->doCast(SPELL_DREAMWALKER_RAGE); + stage = 8; + return; + break; + case 8: + if (bsw->timedQuery(SPELL_CORRUPTION, diff)) stage = 9; + return; + break; + case 9: + if (Unit* pTemp = Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_VALITHRIA_QUEST))) + { + if (pTemp->HasAura(SPELL_CORRUPTION)) + pTemp->RemoveAurasDueToSpell(SPELL_CORRUPTION); + if (pTemp->GetVisibility() == VISIBILITY_OFF) + pTemp->SetVisibility(VISIBILITY_ON); + } + pInstance->SetData(TYPE_VALITHRIA, DONE); + stage = 10; + m_creature->ForcedDespawn(); break; default: break; } - if ( stage ==0 && m_creature->GetHealthPercent() > 90.0f ) stage = 1; - if ( stage ==2 && m_creature->GetHealthPercent() < 15.0f ) stage = 3; - if ( m_creature->GetHealthPercent() > 99.9f ) stage = 4; if (bsw->timedQuery(NPC_RISEN_ARCHMAGE, diff)) { - CloseDoor(GetDoor(currentDoor)); - currentDoor = urand(1,4); - OpenDoor(GetDoor(currentDoor)); - DoScriptText(-1631402,m_creature); - }; + CloseDoor(GetDoor(currentDoor)); + currentDoor = urand(1,4); + OpenDoor(GetDoor(currentDoor)); + DoScriptText(-1631402,m_creature); + }; + + if (bsw->timedQuery(SPELL_NIGHTMARE_PORTAL, diff) || portalscount > 0) + { + if (!portalscount) { + portalscount = 3; + DoScriptText(-1631405,m_creature); + }; + bsw->doCast(SPELL_NIGHTMARE_PORTAL); + --portalscount; + }; bsw->timedCast(SPELL_ICE_SPIKE, diff); @@ -249,17 +309,79 @@ struct MANGOS_DLL_DECL boss_valithria_dreamwalkerAI : public ScriptedAI } }; - CreatureAI* GetAI_boss_valithria_dreamwalker(Creature* pCreature) { return new boss_valithria_dreamwalkerAI(pCreature); -} +}; + +struct MANGOS_DLL_DECL mob_nightmare_portalAI : public ScriptedAI +{ + mob_nightmare_portalAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool portalcasted; + BossSpellWorker* bsw; + + void Reset() + { + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + SetCombatMovement(false); + m_creature->GetMotionMaster()->MoveRandom(); + m_creature->SetDisplayId(29352); + portalcasted = false; + } + + void MoveInLineOfSight(Unit* pWho) + { + if (!m_pInstance || portalcasted) return; + + if (pWho->isAlive() && pWho->GetTypeId() == TYPEID_PLAYER && pWho->IsWithinDistInMap(m_creature, 2.0f)) + { + bsw->doCast(SPELL_EMERALD_VIGOR, pWho); + bsw->doAura(SPELL_EMERALD_VIGOR, pWho,EFFECT_INDEX_0); + bsw->doAura(SPELL_EMERALD_VIGOR, pWho,EFFECT_INDEX_1); + bsw->doAura(SPELL_EMERALD_VIGOR, pWho,EFFECT_INDEX_2); + portalcasted = true; + } + } + + void AttackStart(Unit *pWho) + { + return; + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_pInstance || m_pInstance->GetData(TYPE_VALITHRIA) != IN_PROGRESS || portalcasted) + m_creature->ForcedDespawn(); + + } + +}; + +CreatureAI* GetAI_mob_nightmare_portal(Creature *pCreature) +{ + return new mob_nightmare_portalAI(pCreature); +}; + void AddSC_boss_valithria_dreamwalker() { Script *newscript; + newscript = new Script; newscript->Name = "boss_valithria_dreamwalker"; newscript->GetAI = &GetAI_boss_valithria_dreamwalker; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_nightmare_portal"; + newscript->GetAI = &GetAI_mob_nightmare_portal; + newscript->RegisterSelf(); + } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp index ccbb5fbda..0df6bda34 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp @@ -47,7 +47,7 @@ static t_Locations PortalLoc[]= {"Цитадель Ледяной Короны",4198.42, 2769.22, 351.065,70859,false,true,TYPE_SAURFANG}, // {"Святилище крови",4490.205566, 2769.275635, 403.983765,0,false,true,TYPE_BLOOD_COUNCIL}, // {"Логово Королевы льда",4356.580078, 2565.75, 220.401993,70861,false,true,TYPE_VALITHRIA}, // -{"Ледяной трон",529.3, -2124.7, 1041, 70860,false,true,TYPE_SINDRAGOSA}, // +{"Ледяной трон",528.767273f, -2124.845947f, 1041.86f, 70860,false,true,TYPE_SINDRAGOSA}, // }; From 850aebfd91bfbbd89f934c98951a25316f04e2e1 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Tue, 11 May 2010 14:08:03 +0400 Subject: [PATCH 298/405] Test change for TOC (unfinished) --- addition/724_trial_of_crusader_mangos.sql | 3 +-- ...trial_of_crusader_spelltable_scriptdev2.sql | 3 +-- .../boss_northrend_beasts.cpp | 18 +++++++++++++----- .../trial_of_the_crusader/boss_twin_valkyr.cpp | 16 ++++++++++++---- .../trial_of_the_crusader.cpp | 3 ++- .../boss_valithria_dreamwalker.cpp | 2 +- 6 files changed, 30 insertions(+), 15 deletions(-) diff --git a/addition/724_trial_of_crusader_mangos.sql b/addition/724_trial_of_crusader_mangos.sql index 643c66b57..394c55b44 100644 --- a/addition/724_trial_of_crusader_mangos.sql +++ b/addition/724_trial_of_crusader_mangos.sql @@ -82,8 +82,7 @@ UPDATE `creature_template` SET `scriptname`='mob_snobold_vassal', `AIName` ='' W UPDATE `creature_template` SET `scriptname`='boss_dreadscale', `AIName` ='' WHERE `entry`=34799; UPDATE `creature_template` SET `scriptname`='boss_acidmaw', `AIName` ='' WHERE `entry`=35144; -UPDATE `creature_template` SET `scriptname`='mob_slime_pool', `minlevel` = 80, `maxlevel` = 80, `minhealth`= 30000, `maxhealth` = 30000,`AIName` ='', `faction_A`= 14, `faction_H` = 14, `modelid_A` = 12349, `modelid_H` = 12349 WHERE `entry` = 35176; --- Model id for slime_pool need change! +UPDATE `creature_template` SET `scriptname`='mob_slime_pool', `minlevel` = 80, `maxlevel` = 80, `minhealth`= 30000, `maxhealth` = 30000,`AIName` ='', `faction_A`= 14, `faction_H` = 14, `modelid_A` = 11686, `modelid_H` = 11686 WHERE `entry` = 35176; UPDATE `creature_template` SET `scriptname`='boss_icehowl', `AIName` ='' WHERE `entry`=34797; diff --git a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql index bc9547282..c1f84321c 100644 --- a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql +++ b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql @@ -158,8 +158,7 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ -- Slime pool INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES -(35176, 66881, 67638, 67639, 67640, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL), -(35176, 66883, 67641, 67642, 67643, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(35176, 63084, 0, 0, 0, 1000, 0, 0, 0, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), (35176, 66882, 0, 0, 0, 500, 0, 0, 0, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL); -- Retro Paladins diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index 1ac3f9021..176fc88d4 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -27,8 +27,6 @@ EndScriptData */ // not implemented: // snobolds link // snakes underground cast (not support in core) -// aura 31 (SPELL_ADRENALINE) not applyed by undefined reason -// model_id (or visual effect) for slime_pool need change. #include "precompiled.h" #include "trial_of_the_crusader.h" @@ -83,6 +81,7 @@ SPELL_FROTHING_RAGE = 66759, SPELL_STAGGERED_DAZE = 66758, SPELL_SLIME_POOL_1 = 66881, SPELL_SLIME_POOL_2 = 66882, +SPELL_SLIME_POOL_VISUAL = 63084, }; struct MANGOS_DLL_DECL boss_gormokAI : public ScriptedAI @@ -252,7 +251,8 @@ struct MANGOS_DLL_DECL boss_acidmawAI : public ScriptedAI void JustReachedHome() { if (!m_pInstance) return; - if (m_pInstance->GetData(TYPE_BEASTS) == IN_PROGRESS) + if (m_pInstance->GetData(TYPE_BEASTS) == IN_PROGRESS + && m_pInstance->GetData(TYPE_NORTHREND_BEASTS) != FAIL) m_pInstance->SetData(TYPE_NORTHREND_BEASTS, FAIL); m_creature->ForcedDespawn(); } @@ -364,7 +364,8 @@ struct MANGOS_DLL_DECL boss_dreadscaleAI : public ScriptedAI void JustReachedHome() { if (!m_pInstance) return; - if (m_pInstance->GetData(TYPE_BEASTS) == IN_PROGRESS) + if (m_pInstance->GetData(TYPE_BEASTS) == IN_PROGRESS + && m_pInstance->GetData(TYPE_NORTHREND_BEASTS) != FAIL) m_pInstance->SetData(TYPE_NORTHREND_BEASTS, FAIL); m_creature->ForcedDespawn(); } @@ -467,6 +468,7 @@ struct MANGOS_DLL_DECL mob_slime_poolAI : public ScriptedAI SetCombatMovement(false); m_creature->GetMotionMaster()->MoveRandom(); bsw->doCast(SPELL_SLIME_POOL_2); + bsw->doCast(SPELL_SLIME_POOL_VISUAL); m_Size = m_creature->GetFloatValue(OBJECT_FIELD_SCALE_X); } @@ -478,7 +480,7 @@ struct MANGOS_DLL_DECL mob_slime_poolAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { if (bsw->timedQuery(SPELL_SLIME_POOL_2,uiDiff)) { - m_Size = m_Size*1.036; + m_Size = m_Size*1.035; m_creature->SetFloatValue(OBJECT_FIELD_SCALE_X, m_Size); } // Override especially for clean core @@ -592,6 +594,7 @@ struct MANGOS_DLL_DECL boss_icehowlAI : public ScriptedAI } case 3: { if (bsw->timedQuery(SPELL_TRAMPLE,uiDiff)) { + if (pTarget && pTarget->isAlive() && (m_creature->GetDistance2d(pTarget) <= 200.0f)) { pTarget->GetPosition(fPosX, fPosY, fPosZ); TrampleCasted = false; MovementStarted = true; @@ -600,6 +603,11 @@ struct MANGOS_DLL_DECL boss_icehowlAI : public ScriptedAI bsw->doCast(SPELL_ADRENALINE); stage = 4; } + else { + TrampleCasted = true; + stage = 5; + } + } break; } case 4: { diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp index cb3a880f8..58b5c4f9b 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp @@ -178,15 +178,19 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI break; case 2: if (bsw->timedQuery(SPELL_TWIN_PACT_L, uiDiff)) - { + { m_creature->InterruptNonMeleeSpells(true); bsw->doCast(SPELL_SHIELD_LIGHT); m_pInstance->SetData(DATA_CASTING_FJOLA, SPELL_TWIN_PACT_L); DoScriptText(-1713539,m_creature); + stage = 3; + } + break; + case 3: + m_creature->InterruptNonMeleeSpells(true); bsw->doCast(SPELL_TWIN_PACT_L); stage = 0; TwinPactCasted = true; - } break; default: break; @@ -333,15 +337,19 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI break; case 2: if (bsw->timedQuery(SPELL_TWIN_PACT_H, uiDiff)) - { + { m_creature->InterruptNonMeleeSpells(true); bsw->doCast(SPELL_SHIELD_DARK); m_pInstance->SetData(DATA_CASTING_EYDIS, SPELL_TWIN_PACT_H); DoScriptText(-1713539,m_creature); + stage = 3; + } + break; + case 3: + m_creature->InterruptNonMeleeSpells(true); bsw->doCast(SPELL_TWIN_PACT_H); stage = 0; TwinPactCasted = true; - } break; default: break; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index 3a5a77984..9aab68617 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -106,7 +106,7 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI if (pInstance->GetData(TYPE_NORTHREND_BEASTS) == SNAKES_DONE) { pInstance->SetData(TYPE_STAGE,3); pInstance->SetData(TYPE_EVENT,300); - pInstance->SetData(TYPE_NORTHREND_BEASTS,SNAKES_IN_PROGRESS); + pInstance->SetData(TYPE_NORTHREND_BEASTS,ICEHOWL_IN_PROGRESS); pInstance->SetData(TYPE_BEASTS,IN_PROGRESS); }; if (pInstance->GetData(TYPE_NORTHREND_BEASTS) == FAIL) { @@ -755,6 +755,7 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI DoScriptText(-1713709, m_creature); UpdateTimer = 5000; pInstance->SetData(TYPE_EVENT,0); + pInstance->SetData(TYPE_NORTHREND_BEASTS,NOT_STARTED); // pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_WEST_PORTCULLIS)); break; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp index 5096278f4..7362e393a 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp @@ -340,7 +340,7 @@ struct MANGOS_DLL_DECL mob_nightmare_portalAI : public ScriptedAI { if (!m_pInstance || portalcasted) return; - if (pWho->isAlive() && pWho->GetTypeId() == TYPEID_PLAYER && pWho->IsWithinDistInMap(m_creature, 2.0f)) + if (pWho->isAlive() && pWho->GetTypeId() == TYPEID_PLAYER && pWho->IsWithinDistInMap(m_creature, 2.0f)) { bsw->doCast(SPELL_EMERALD_VIGOR, pWho); bsw->doAura(SPELL_EMERALD_VIGOR, pWho,EFFECT_INDEX_0); From 946011486f9bedde2c3d05b81ab3e09311db76b3 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 12 May 2010 20:33:03 +0400 Subject: [PATCH 299/405] Valithria && BSW improve --- addition/721_icecrown_mangos.sql | 1 + .../721_icecrown_spelltable_scriptdev2.sql | 2 +- ...rial_of_crusader_spelltable_scriptdev2.sql | 2 +- include/sc_boss_spell_worker.cpp | 45 +++++++++++++++- include/sc_boss_spell_worker.h | 14 +++++ .../boss_northrend_beasts.cpp | 15 +++--- .../boss_twin_valkyr.cpp | 20 +++---- .../boss_valithria_dreamwalker.cpp | 54 +++++++++++++++++++ 8 files changed, 131 insertions(+), 22 deletions(-) diff --git a/addition/721_icecrown_mangos.sql b/addition/721_icecrown_mangos.sql index dea390647..685c5a6ce 100644 --- a/addition/721_icecrown_mangos.sql +++ b/addition/721_icecrown_mangos.sql @@ -96,6 +96,7 @@ UPDATE `creature_template` SET `ScriptName`='boss_blood_queen_lanathel', `AIName -- Valithria dreamwalker UPDATE `creature_template` SET `faction_A` = 35, `faction_H` = 35, `ScriptName`='boss_valithria_dreamwalker' WHERE `entry`= 36789; UPDATE `creature_template` SET `faction_A` = 35, `faction_H` = 35, `ScriptName`='mob_nightmare_portal', `AIName`='' WHERE `entry`= 38429; +UPDATE `creature_template` SET `ScriptName`='mob_mana_void', `AIName`='' WHERE `entry`= 38068; UPDATE `gameobject_template` SET `faction` = '0',`data0` = '0' WHERE `gameobject_template`.`entry` IN (201375,201373); UPDATE `gameobject_template` SET `faction` = '114',`data0` = '0' WHERE `gameobject_template`.`entry` IN (201374); diff --git a/addition/721_icecrown_spelltable_scriptdev2.sql b/addition/721_icecrown_spelltable_scriptdev2.sql index 18ab609cb..2eb2d78e4 100644 --- a/addition/721_icecrown_spelltable_scriptdev2.sql +++ b/addition/721_icecrown_spelltable_scriptdev2.sql @@ -228,7 +228,7 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ (36789, 72724, 0, 0, 0, 3000, 0, 0, 0, 3000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36789, 70904, 0, 0, 0, 5000, 0, 0, 0, 5000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36789, 71196, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), -(36789, 70702, 0, 0, 0, 15000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 13, 0, 1); +(36789, 70702, 0, 0, 0, 15000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 16, 0, 1); -- summons INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMax_N10`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType` ) VALUES (36789, 38429, 30000, 40000, 1, 1, 1, 1, 5, 70, 0, 9), diff --git a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql index c1f84321c..23a48ffbd 100644 --- a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql +++ b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql @@ -158,7 +158,7 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ -- Slime pool INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES -(35176, 63084, 0, 0, 0, 1000, 0, 0, 0, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(35176, 63084, 0, 0, 0, 1000, 0, 0, 0, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, NULL), (35176, 66882, 0, 0, 0, 500, 0, 0, 0, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL); -- Retro Paladins diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index 64c8b9108..54e40c770 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -246,6 +246,12 @@ CanCastResult BossSpellWorker::_BSWSpellSelector(uint8 m_uiSpellIdx, Unit* pTarg } else return CAST_FAIL_OTHER; break; + case CAST_ON_RANDOM_PLAYER: + if ( pSpell->LocData.x < 1 ) pTarget = SelectRandomPlayer(); + else pTarget = SelectRandomPlayerAtRange((float)pSpell->LocData.x); + return _BSWCastOnTarget(pTarget, m_uiSpellIdx); + break; + default: return CAST_FAIL_OTHER; break; @@ -337,7 +343,9 @@ BossSpellTableParameters BossSpellWorker::getBSWCastType(uint32 pTemp) case 12: return CAST_ON_ALLPLAYERS; case 13: return CAST_ON_FRENDLY; case 14: return CAST_ON_FRENDLY_LOWHP; - case 15: return SPELLTABLEPARM_NUMBER; + case 15: return CAST_ON_RANDOM_POINT; + case 16: return CAST_ON_RANDOM_PLAYER; + case 17: return SPELLTABLEPARM_NUMBER; default: return DO_NOTHING; }; }; @@ -422,6 +430,7 @@ bool BossSpellWorker::_doRemove(uint8 m_uiSpellIdx, Unit* pTarget, SpellEffectIn break; case CAST_ON_RANDOM: + case CAST_ON_RANDOM_PLAYER: case CAST_ON_ALLPLAYERS: { Map::PlayerList const& pPlayers = pMap->GetPlayers(); @@ -581,5 +590,39 @@ Unit* BossSpellWorker::SelectLowHPFriendly(float fRange, uint32 uiMinHPDiff) return pUnit; } +// Not threat-based select random player function + +Unit* BossSpellWorker::_doSelect(uint32 SpellID, bool spellsearchtype, float range) +{ + Map::PlayerList const &pList = pMap->GetPlayers(); + if (pList.isEmpty()) return NULL; + + Unit* _list[pMap->GetMaxPlayers()]; + + uint8 _count = 0; + + memset(&_list, 0, sizeof(_list)); + + + for(Map::PlayerList::const_iterator i = pList.begin(); i != pList.end(); ++i) + { + if (Player* player = i->getSource()) + { + if (player->isGameMaster()) continue; + + if ( player->isAlive() + && player->IsWithinDistInMap(boss, range) + && (SpellID == 0 || (player->HasAura(SpellID) == spellsearchtype)) + ) + { + _list[_count] = (Unit*)player; + ++_count; + } + } + } + debug_log("BSW: search result for random player, count = %u ",_count); + return _list[urand(0,_count)]; +}; + #endif \ No newline at end of file diff --git a/include/sc_boss_spell_worker.h b/include/sc_boss_spell_worker.h index eddd95af3..0a767eb28 100644 --- a/include/sc_boss_spell_worker.h +++ b/include/sc_boss_spell_worker.h @@ -46,6 +46,7 @@ enum BossSpellTableParameters CAST_ON_FRENDLY = 13, CAST_ON_FRENDLY_LOWHP = 14, CAST_ON_RANDOM_POINT = 15, + CAST_ON_RANDOM_PLAYER = 16, SPELLTABLEPARM_NUMBER }; @@ -161,6 +162,17 @@ class MANGOS_DLL_DECL BossSpellWorker return _doSummon(FindSpellIDX(SpellID), type, delay); }; + Unit* SelectRandomPlayer(uint32 SpellID = 0, bool spellsearchtype = false, float range = 100.0f) + { + return _doSelect(SpellID, spellsearchtype, range); + }; + + Unit* SelectRandomPlayerAtRange(float range) + { + return _doSelect(0, false, range); + }; + + Unit* doSummon(uint32 SpellID, float fPosX, float fPosY, float fPosZ, TempSummonType type = TEMPSUMMON_CORPSE_TIMED_DESPAWN, uint32 delay = 60000) { return _doSummonAtPosition(FindSpellIDX(SpellID), type, delay, fPosX, fPosY, fPosZ); @@ -195,6 +207,8 @@ class MANGOS_DLL_DECL BossSpellWorker bool isSummon(uint8 m_uiSpellIdx); + Unit* _doSelect(uint32 SpellID, bool spellsearchtype = false, float range = 100.0f); + Unit* _doSummon(uint8 m_uiSpellIdx, TempSummonType type = TEMPSUMMON_CORPSE_TIMED_DESPAWN, uint32 delay = 60000); Unit* _doSummonAtPosition(uint8 m_uiSpellIdx, TempSummonType type, uint32 delay, float fPosX, float fPosY, float fPosZ); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index 176fc88d4..0dedfa656 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -455,21 +455,19 @@ struct MANGOS_DLL_DECL mob_slime_poolAI : public ScriptedAI ScriptedInstance *m_pInstance; BossSpellWorker* bsw; float m_Size; - uint8 Difficulty; + bool cloudcasted; void Reset() { if(!m_pInstance) return; - Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); - if (Difficulty == RAID_DIFFICULTY_10MAN_HEROIC || Difficulty == RAID_DIFFICULTY_25MAN_HEROIC) - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->SetInCombatWithZone(); m_creature->SetSpeedRate(MOVE_RUN, 0.05f); SetCombatMovement(false); m_creature->GetMotionMaster()->MoveRandom(); bsw->doCast(SPELL_SLIME_POOL_2); - bsw->doCast(SPELL_SLIME_POOL_VISUAL); m_Size = m_creature->GetFloatValue(OBJECT_FIELD_SCALE_X); + cloudcasted = false; } void AttackStart(Unit *who) @@ -479,7 +477,12 @@ struct MANGOS_DLL_DECL mob_slime_poolAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { - if (bsw->timedQuery(SPELL_SLIME_POOL_2,uiDiff)) { + if (!cloudcasted) { + bsw->doCast(SPELL_SLIME_POOL_VISUAL); + cloudcasted = true; + } + + if (bsw->timedQuery(SPELL_SLIME_POOL_2,uiDiff)) { m_Size = m_Size*1.035; m_creature->SetFloatValue(OBJECT_FIELD_SCALE_X, m_Size); } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp index 58b5c4f9b..e4528a1fa 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: trial_of_the_crusader -SD%Complete: 0 +SD%Complete: 80% SDComment: by /dev/rsa SDCategory: Crusader Coliseum EndScriptData */ @@ -72,10 +72,6 @@ enum BossSpells SPELL_UNLEASHED_LIGHT = 65795, }; -/*###### -## boss_fjola -######*/ - struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI { boss_fjolaAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -187,7 +183,6 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI } break; case 3: - m_creature->InterruptNonMeleeSpells(true); bsw->doCast(SPELL_TWIN_PACT_L); stage = 0; TwinPactCasted = true; @@ -232,10 +227,6 @@ CreatureAI* GetAI_boss_fjola(Creature* pCreature) return new boss_fjolaAI(pCreature); } -/*###### -## boss_eydis -######*/ - struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI { boss_eydisAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -346,7 +337,6 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI } break; case 3: - m_creature->InterruptNonMeleeSpells(true); bsw->doCast(SPELL_TWIN_PACT_H); stage = 0; TwinPactCasted = true; @@ -434,8 +424,10 @@ bool GossipHello_mob_light_essence(Player *player, Creature* pCreature) if(!pInstance) return true; player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, pCreature->GetGUID()); player->RemoveAurasDueToSpell(SPELL_DARK_ESSENCE); - player->CastSpell(player,SPELL_REMOVE_TOUCH,false); +// player->CastSpell(player,SPELL_REMOVE_TOUCH,false); // Not worked now player->CastSpell(player,SPELL_LIGHT_ESSENCE,false); + if (player->HasAura(SPELL_LIGHT_TOUCH)) + player->RemoveAurasDueToSpell(SPELL_LIGHT_TOUCH); // Override for REMOVE_TOUCH player->CLOSE_GOSSIP_MENU(); return true; }; @@ -485,8 +477,10 @@ bool GossipHello_mob_dark_essence(Player *player, Creature* pCreature) if(!pInstance) return true; player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, pCreature->GetGUID()); player->RemoveAurasDueToSpell(SPELL_LIGHT_ESSENCE); - player->CastSpell(player,SPELL_REMOVE_TOUCH,false); +// player->CastSpell(player,SPELL_REMOVE_TOUCH,false); // Not worked now player->CastSpell(player,SPELL_DARK_ESSENCE,false); + if (player->HasAura(SPELL_DARK_TOUCH)) + player->RemoveAurasDueToSpell(SPELL_DARK_TOUCH); // Override for REMOVE_TOUCH player->CLOSE_GOSSIP_MENU(); return true; } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp index 7362e393a..19a628877 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp @@ -55,6 +55,9 @@ enum BossSpells NPC_BLISTERING_ZOMBIE = 37934, NPC_GLUTTONOUS_ABOMINATION = 37886, NPC_NIGHTMARE_PORTAL = 38429, // Not realized yet + // Mana void + NPC_MANA_VOID = 38068, // Bugged, need override + SPELL_VOID_BUFF = 71085, }; struct MANGOS_DLL_DECL boss_valithria_dreamwalkerAI : public ScriptedAI @@ -369,6 +372,52 @@ CreatureAI* GetAI_mob_nightmare_portal(Creature *pCreature) return new mob_nightmare_portalAI(pCreature); }; +struct MANGOS_DLL_DECL mob_mana_voidAI : public ScriptedAI +{ + mob_mana_voidAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + uint32 m_ui_Timer; + + void Reset() + { + SetCombatMovement(false); + m_creature->SetDisplayId(29308); + m_creature->GetMotionMaster()->MoveRandom(); + m_creature->CastSpell(m_creature, SPELL_VOID_BUFF, false); + m_ui_Timer = 30000; + } + + void AttackStart(Unit *pWho) + { + return; + } + + void JustDied(Unit *killer) + { + m_creature->RemoveCorpse(); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_pInstance || m_pInstance->GetData(TYPE_VALITHRIA) != IN_PROGRESS) + m_creature->ForcedDespawn(); + + if (m_ui_Timer < uiDiff) + m_creature->ForcedDespawn(); + else m_ui_Timer -= uiDiff; + } + +}; + +CreatureAI* GetAI_mob_mana_void(Creature *pCreature) +{ + return new mob_mana_voidAI(pCreature); +}; void AddSC_boss_valithria_dreamwalker() { @@ -384,4 +433,9 @@ void AddSC_boss_valithria_dreamwalker() newscript->GetAI = &GetAI_mob_nightmare_portal; newscript->RegisterSelf(); + newscript = new Script; + newscript->Name = "mob_mana_void"; + newscript->GetAI = &GetAI_mob_mana_void; + newscript->RegisterSelf(); + } From ff3d2f765c4a4e9632aeb8e325679786572c2551 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 13 May 2010 00:37:04 +0400 Subject: [PATCH 300/405] Revert Culling of stratholme to old version --- Makefile.am | 3 - .../culling_of_stratholme.h | 194 ------------------ system/ScriptLoader.cpp | 4 - 3 files changed, 201 deletions(-) delete mode 100644 scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h diff --git a/Makefile.am b/Makefile.am index 87d6c24a7..cf89178ed 100644 --- a/Makefile.am +++ b/Makefile.am @@ -254,9 +254,6 @@ scripts/kalimdor/ungoro_crater.cpp \ scripts/kalimdor/winterspring.cpp \ scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h \ scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp \ -scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h \ -scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp \ -scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp \ scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp \ scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp \ scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp \ diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h deleted file mode 100644 index 29c2f13b3..000000000 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h +++ /dev/null @@ -1,194 +0,0 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 - * This program is free software licensed under GPL version 2 - * Please see the included DOCS/LICENSE.TXT for more information */ - -#ifndef DEF_CULLING_OF_STRATHOLME_H -#define DEF_CULLING_OF_STRATHOLME_H - -enum -{ - MAX_ENCOUNTER = 9, - - TYPE_GRAIN_EVENT = 0, // crates with plagued grain identified - TYPE_ARTHAS_INTRO_EVENT = 1, // Arhas Speech and Walk to Gates and short intro with MalGanis - TYPE_MEATHOOK_EVENT = 2, // Waves 1-5 - TYPE_SALRAMM_EVENT = 3, // Waves 6-10 - TYPE_EPOCH_EVENT = 4, // Townhall Event, Boss Killed - TYPE_ARTHAS_ESCORT_EVENT = 5, // Townhall to Malganis - TYPE_MALGANIS_EVENT = 6, // Malganis - TYPE_INFINITE_CORRUPTER_TIME = 7, // Time for 25min Timer - TYPE_INFINITE_CORRUPTER = 8, - - // Main Encounter NPCs - NPC_CHROMIE_INN = 26527, - NPC_CHROMIE_ENTRANCE = 27915, - NPC_CHROMIE_END = 30997, - NPC_HOURGLASS = 28656, - NPC_ARTHAS = 26499, - NPC_MEATHOOK = 26529, - NPC_SALRAMM_THE_FLESHCRAFTER = 26530, - NPC_CHRONO_LORD_EPOCH = 26532, - NPC_MALGANIS = 26533, - NPC_INFINITE_CORRUPTER = 32273, - NPC_LORDAERON_CRIER = 27913, - NPC_ZOMBIE = 27737, - - // Inn Event related NPC - NPC_MICHAEL_BELFAST = 30571, - NPC_HEARTHSINGER_FORRESTEN = 30551, - NPC_FRAS_SIABI = 30552, - NPC_FOOTMAN_JAMES = 30553, - NPC_MAL_CORRICKS = 31017, - NPC_GRYAN_STOUTMANTLE = 30561, - - // Grain Event NPCs - NPC_ROGER_OWENS = 27903, - NPC_SERGEANT_MORIGAN = 27877, - NPC_JENA_ANDERSON = 27885, - NPC_MALCOM_MOORE = 27891, // Not (yet?) spawned - NPC_BARTLEBY_BATTSON = 27907, - NPC_CRATES_BUNNY = 30996, - - // Intro Event NPCs - NPC_LORDAERON_FOOTMAN = 27745, - NPC_STRATHOLME_CITIZEN = 28167, - NPC_STRATHOLME_RESIDENT = 28169, - - // Mobs in Stratholme (to despawn) -- only here for sake of completeness handling remains open (mangos feature) - NPC_MAGISTRATE_BARTHILAS = 30994, - NPC_STEPHANIE_SINDREE = 31019, - NPC_LEEKA_TURNER = 31027, - NPC_SOPHIE_AAREN = 31021, - NPC_ROBERT_PIERCE = 31025, - NPC_GEORGE_GOODMAN = 31022, - - // Others NPCs in Stratholme - NPC_EMERY_NEILL = 30570, - NPC_EDWARD_ORRICK = 31018, - NPC_OLIVIA_ZENITH = 31020, - - // Townhall Event NPCs - NPC_AGIATED_STRATHOLME_CITIZEN = 31126, - NPC_AGIATED_STRATHOLME_RESIDENT = 31127, - NPC_PATRICIA_O_REILLY = 31028, - - // Gameobjects - GO_DOOR_BOOKCASE = 188686, - GO_DARK_RUNED_CHEST = 190663, - GO_DARK_RUNED_CHEST_H = 193597, - - // World States - WORLD_STATE_CRATES = 3479, - WORLD_STATE_CRATES_COUNT = 3480, - WORLD_STATE_WAVE = 3504, - WORLD_STATE_TIME = 3932, - WORLD_STATE_TIME_COUNTER = 3931, - - // Areatrigger - AREATRIGGER_INN = 5291, - /* - 5085 before bridge - could be Uther SpawnPos - 5148 ini entrance - 5181 ini exit - 5249 fras siabis store - 5250 leeking shields...(store) - 5251 bar in stratholme - 5252 Aaren flowers - 5253 Angelicas boutique - 5256 townhall - 5291 Inn */ -}; - -enum eInstancePosition -{ - POS_ARTHAS_INTRO = 1, - POS_ARTHAS_WAVES = 2, - POS_ARTHAS_TOWNHALL = 3, - POS_ARTHAS_ESCORTING = 4, - POS_ARTHAS_MALGANIS = 5, - POS_INSTANCE_FINISHED = 6 -}; - -class MANGOS_DLL_DECL instance_culling_of_stratholme : public ScriptedInstance -{ - public: - instance_culling_of_stratholme(Map* pMap); - ~instance_culling_of_stratholme() {} - - void Initialize(); - - void OnCreatureCreate(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); - - void SetData(uint32 uiType, uint32 uiData); - uint32 GetData(uint32 uiType); - uint64 GetData64(uint32 uiData); - - const char* Save() { return strInstData.c_str(); } - void Load(const char* chrIn); - - void Update(uint32 uiDiff); - - void GetStratAgiatedCitizenList(std::list &lList){ lList = m_lAgiatedCitizenGUIDList; }; - void GetStratAgiatedResidentList(std::list &lList){ lList = m_lAgiatedResidentGUIDList; }; - - void GetCratesBunnyOrderedList(std::list &lList); - Creature* GetStratIntroFootman(); - void GetResidentOrderedList(std::list &lList); - void DoSpawnArthasIfNeeded(); - void DoSpawnChromieIfNeeded(); - uint8 GetInstancePosition(); - void ArthasJustDied(); - - protected: - void OnPlayerEnter(Player* pPlayer); - Player* GetPlayerInMap(); - void UpdateQuestCredit(); - void DoChromieHurrySpeech(); - - uint32 m_auiEncounter[MAX_ENCOUNTER]; - std::string strInstData; - - uint8 m_uiGrainCrateCount; - uint32 m_uiRemoveCrateStateTimer; - uint32 m_uiArthasRespawnTimer; - - uint64 m_uiChromieInnGUID; - uint64 m_uiChromieEntranceGUID; - uint64 m_uiChromieEndGUID; - uint64 m_uiHourglassGUID; - uint64 m_uiArthasGUID; - uint64 m_uiMeathookGUID; - uint64 m_uiSalrammGUID; - uint64 m_uiEpochGUID; - uint64 m_uiMalganisGUID; - uint64 m_uiCorrupterGUID; - uint64 m_uiLordaeronCrierGUID; - - uint64 m_uiBelfastGUID; - uint64 m_uiForrestenGUID; - uint64 m_uiSiabiGUID; - uint64 m_uiJamesGUID; - uint64 m_uiCorricksGUID; - uint64 m_uiStoutmantleGUID; - - uint64 m_uiOwensGUID; - uint64 m_uiMoriganGUID; - uint64 m_uiAndersonGUID; - uint64 m_uiMooreGUID; - uint64 m_uiBattsonGUID; - - uint64 m_uiOReillyGUID; - - std::list m_lCratesBunnyList; - std::list m_lFootmanList; - std::list m_lResidentList; - - std::list m_lAgiatedCitizenGUIDList; - std::list m_lAgiatedResidentGUIDList; - - uint64 m_uiDoorBookcaseGUID; - uint64 m_uiDarkRunedChestGUID; -}; - -#endif diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index 29db1e038..5dc6ed45d 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -208,8 +208,6 @@ extern void AddSC_boss_epoch_hunter(); extern void AddSC_boss_lieutenant_drake(); extern void AddSC_instance_old_hillsbrad(); extern void AddSC_old_hillsbrad(); -extern void AddSC_culling_of_stratholme(); //Culling of Stratholme -extern void AddSC_instance_culling_of_stratholme(); extern void AddSC_boss_celebras_the_cursed(); //maraudon extern void AddSC_boss_landslide(); extern void AddSC_boss_noxxion(); @@ -692,8 +690,6 @@ void AddScripts() AddSC_boss_lieutenant_drake(); AddSC_instance_old_hillsbrad(); AddSC_old_hillsbrad(); - AddSC_culling_of_stratholme(); // Culling of Stratholme - AddSC_instance_culling_of_stratholme(); AddSC_boss_celebras_the_cursed(); //maraudon AddSC_boss_landslide(); AddSC_boss_noxxion(); From f6069e095ef82d3d94f195589f39e712b264046a Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 13 May 2010 15:57:03 +0400 Subject: [PATCH 301/405] TOC improve --- ...rial_of_crusader_spelltable_scriptdev2.sql | 36 ++-- .../boss_northrend_beasts.cpp | 8 +- .../boss_twin_valkyr.cpp | 204 +++++++++--------- .../instance_trial_of_the_crusader.cpp | 10 +- .../trial_of_the_crusader.h | 3 +- 5 files changed, 134 insertions(+), 127 deletions(-) diff --git a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql index 23a48ffbd..f12127064 100644 --- a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql +++ b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql @@ -4,33 +4,33 @@ DELETE FROM `boss_spell_table` WHERE `entry` IN -- Eydis Darkbane INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES -(34496, 64238, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34496, 64238, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), (34496, 65768, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), -(34496, 65874, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), -(34496, 65876, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34496, 65874, 0, 0, 0, 15000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34496, 65876, 0, 0, 0, 30000, 0, 0, 0, 45000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), (34496, 65879, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), -(34496, 65916, 67248, 67249, 67250, 15000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), -(34496, 66058, 67182, 67183, 67184, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), -(34496, 66069, 67309, 67310, 67311, 10000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), -(34496, 67282, 0, 0, 0, 10000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL); +(34496, 65916, 0, 0, 0, 15000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34496, 66058, 0, 0, 0, 30000, 0, 0, 0, 45000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34496, 66069, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), +(34496, 67282, 0, 0, 0, 8000, 0, 6000, 0, 12000, 0, 8000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL); -- summons INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMax_N10`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType` ) VALUES -(34496, 34628, 40000, 40000, 1, 1, 2, 2, 10, 100, 0, 11); +(34496, 34628, 45000, 45000, 1, 1, 2, 2, 10, 100, 0, 11); -- Fjola Lightbane INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES -(34497, 64238, 64238, 64238, 64238, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34497, 64238, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), (34497, 65766, 67270, 67271, 67272, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), -(34497, 65858, 0, 0, 0, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), -(34497, 65875, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), -(34497, 65879, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), -(34497, 65916, 67248, 67249, 67250, 15000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), -(34497, 66046, 67206, 67207, 67208, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), -(34497, 66075, 67312, 67313, 67314, 10000, 10000, 10000, 10000, 20000, 20000, 20000, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), -(34497, 67297, 0, 0, 0, 10000, 10000, 10000, 10000, 15000, 15000, 15000, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL); +(34497, 65858, 0, 0, 0, 15000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34497, 65875, 0, 0, 0, 30000, 0, 0, 0, 45000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34497, 65879, 0, 0, 0, 30000, 0, 0, 0, 45000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), +(34497, 65916, 0, 0, 0, 15000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34497, 66046, 0, 0, 0, 30000, 0, 0, 0, 45000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34497, 66075, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), +(34497, 67297, 0, 0, 0, 8000, 0, 6000, 0, 0, 12000, 0, 8000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL); -- summons INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMax_N10`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType` ) VALUES -(34497, 34630, 20000, 20000, 1, 1, 2, 2, 10, 100, 0, 11); +(34497, 34630, 45000, 45000, 1, 1, 2, 2, 10, 100, 0, 11); -- AnubArak INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES @@ -151,7 +151,7 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ (35144, 66819, 66819, 66819, 66819, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), (35144, 66824, 67612, 67613, 67614, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), (35144, 66880, 67606, 67607, 67608, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), -(35144, 66901, 67615, 67616, 66617, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(35144, 66901, 0, 0, 0, 15000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), (35144, 66883, 67641, 67642, 67643, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), (35144, 35176, 0, 0, 0, 30000, 30000, 45000, 60000, 30000, 30000, 45000, 60000, 0, 0, 0, 0, 1, 5, 0, 0, 0, 0, 11, 0, 0, 0, NULL), (35144, 68335, 68335, 68335, 68335, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index 0dedfa656..a036049e3 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -101,7 +101,7 @@ struct MANGOS_DLL_DECL boss_gormokAI : public ScriptedAI if(!m_pInstance) return; SetEquipmentSlots(false, EQUIP_MAIN, EQUIP_OFFHAND, EQUIP_RANGED); - m_creature->SetRespawnDelay(DAY); + m_creature->SetRespawnDelay(7*DAY); m_creature->SetInCombatWithZone(); SnoboldsCount = 4; } @@ -235,7 +235,7 @@ struct MANGOS_DLL_DECL boss_acidmawAI : public ScriptedAI stage = 1; enraged = false; m_creature->SetInCombatWithZone(); - m_creature->SetRespawnDelay(DAY); + m_creature->SetRespawnDelay(7*DAY); m_pInstance->SetData(TYPE_NORTHREND_BEASTS, ACIDMAW_SUBMERGED); } @@ -349,7 +349,7 @@ struct MANGOS_DLL_DECL boss_dreadscaleAI : public ScriptedAI stage = 0; enraged = false; m_creature->SetInCombatWithZone(); - m_creature->SetRespawnDelay(DAY); + m_creature->SetRespawnDelay(7*DAY); } void JustDied(Unit* pKiller) @@ -516,7 +516,7 @@ struct MANGOS_DLL_DECL boss_icehowlAI : public ScriptedAI void Reset() { if(!m_pInstance) return; - m_creature->SetRespawnDelay(DAY); + m_creature->SetRespawnDelay(7*DAY); MovementStarted = false; stage = 0; } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp index e4528a1fa..b2f35e5df 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp @@ -84,14 +84,13 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI ScriptedInstance* m_pInstance; uint8 stage; BossSpellWorker* bsw; - bool TwinPactCasted; void Reset() { if(!m_pInstance) return; SetEquipmentSlots(false, EQUIP_MAIN_1, EQUIP_OFFHAND_1, EQUIP_RANGED_1); - m_creature->SetRespawnDelay(DAY); - stage = 1; - TwinPactCasted = false; + m_creature->SetRespawnDelay(7*DAY); + m_pInstance->SetData(DATA_CASTING_VALKYRS, SPELL_NONE); + stage = 0; } void JustReachedHome() @@ -99,6 +98,7 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI if (!m_pInstance) return; m_pInstance->SetData(TYPE_VALKIRIES, FAIL); m_pInstance->SetData(DATA_HEALTH_FJOLA, m_creature->GetMaxHealth()); + m_pInstance->SetData(DATA_CASTING_VALKYRS, SPELL_NONE); m_creature->ForcedDespawn(); } @@ -163,59 +163,64 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI switch (stage) { case 0: - break; - case 1: - if (bsw->timedQuery(SPELL_LIGHT_VORTEX, uiDiff)) { - m_pInstance->SetData(DATA_CASTING_FJOLA, SPELL_LIGHT_VORTEX); - DoScriptText(-1713538,m_creature); - bsw->doCast(SPELL_LIGHT_VORTEX); - stage = 0; - }; - break; - case 2: - if (bsw->timedQuery(SPELL_TWIN_PACT_L, uiDiff)) + bsw->timedCast(SPELL_TWIN_SPIKE_L, uiDiff); + + if (bsw->timedQuery(SPELL_LIGHT_TOUCH, uiDiff)) + { + if (Unit* pTarget = bsw->SelectRandomPlayer(SPELL_LIGHT_ESSENCE, false, 150.0f)) + bsw->doCast(SPELL_LIGHT_TOUCH, pTarget); + bsw->doCast(NPC_UNLEASHED_LIGHT); + }; + if (m_pInstance->GetData(DATA_CASTING_VALKYRS) == SPELL_NONE ) + { + if (bsw->timedQuery(SPELL_LIGHT_VORTEX, uiDiff)) + { + m_pInstance->SetData(DATA_CASTING_VALKYRS, SPELL_LIGHT_VORTEX); + DoScriptText(-1713538,m_creature); + stage = 1; + break; + }; + if (bsw->timedQuery(SPELL_TWIN_PACT_L, uiDiff) + && m_creature->GetHealthPercent() <= 50.0f) { m_creature->InterruptNonMeleeSpells(true); bsw->doCast(SPELL_SHIELD_LIGHT); - m_pInstance->SetData(DATA_CASTING_FJOLA, SPELL_TWIN_PACT_L); + m_pInstance->SetData(DATA_CASTING_VALKYRS, SPELL_TWIN_PACT_L); DoScriptText(-1713539,m_creature); stage = 3; - } - break; - case 3: - bsw->doCast(SPELL_TWIN_PACT_L); - stage = 0; - TwinPactCasted = true; + }; + }; + if (m_pInstance->GetData(DATA_CASTING_VALKYRS) == SPELL_TWIN_PACT_H) + if (!m_creature->HasAura(SPELL_TWIN_POWER)) + bsw->doCast(SPELL_TWIN_POWER); + break; + case 1: + bsw->doCast(SPELL_LIGHT_VORTEX); + stage = 2; + break; + case 2: + if (!m_creature->HasAura(SPELL_LIGHT_VORTEX) + && bsw->timedQuery(SPELL_SHIELD_LIGHT, uiDiff)) + { + m_pInstance->SetData(DATA_CASTING_VALKYRS, SPELL_NONE); + stage = 0; + }; + break; + case 3: + bsw->doCast(SPELL_TWIN_PACT_L); + stage = 4; break; - default: + case 4: + if (!m_creature->HasAura(SPELL_SHIELD_LIGHT) + && bsw->timedQuery(SPELL_SHIELD_LIGHT, uiDiff)) + { + m_pInstance->SetData(DATA_CASTING_VALKYRS, SPELL_NONE); + stage = 0; + }; + default: break; } - if (m_pInstance->GetData(DATA_CASTING_EYDIS) == SPELL_DARK_VORTEX && stage==0 ) - { - m_pInstance->SetData(DATA_CASTING_EYDIS, SPELL_NONE); - stage = 1; - } - - if ( m_creature->GetHealthPercent() <= 50.0f - && stage == 0 - && !TwinPactCasted) - { - stage = 2; - } - - if (m_pInstance->GetData(DATA_CASTING_EYDIS) == SPELL_TWIN_PACT_H) - { - bsw->doCast(SPELL_TWIN_POWER); - m_pInstance->SetData(DATA_CASTING_EYDIS, SPELL_NONE); - } - - if (bsw->timedQuery(SPELL_LIGHT_TOUCH, uiDiff)) - { - bsw->doCast(SPELL_LIGHT_TOUCH); - bsw->doCast(NPC_UNLEASHED_LIGHT); - } - bsw->timedCast(SPELL_BERSERK, uiDiff); DoMeleeAttackIfReady(); @@ -239,15 +244,14 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI ScriptedInstance* m_pInstance; uint8 stage; BossSpellWorker* bsw; - bool TwinPactCasted; void Reset() { if(!m_pInstance) return; SetEquipmentSlots(false, EQUIP_MAIN_2, EQUIP_OFFHAND_2, EQUIP_RANGED_2); - m_creature->SetRespawnDelay(DAY); + m_creature->SetRespawnDelay(7*DAY); + m_pInstance->SetData(DATA_CASTING_VALKYRS, SPELL_NONE); stage = 0; - TwinPactCasted = false; } void JustReachedHome() @@ -255,6 +259,7 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI if (!m_pInstance) return; m_pInstance->SetData(TYPE_VALKIRIES, FAIL); m_pInstance->SetData(DATA_HEALTH_EYDIS, m_creature->GetMaxHealth()); + m_pInstance->SetData(DATA_CASTING_VALKYRS, SPELL_NONE); m_creature->ForcedDespawn(); } @@ -317,56 +322,65 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI switch (stage) { case 0: - break; - case 1: - if (bsw->timedQuery(SPELL_DARK_VORTEX, uiDiff)) { - m_pInstance->SetData(DATA_CASTING_EYDIS, SPELL_DARK_VORTEX); - DoScriptText(-1713540,m_creature); - bsw->doCast(SPELL_DARK_VORTEX); - stage = 0; - }; - break; - case 2: - if (bsw->timedQuery(SPELL_TWIN_PACT_H, uiDiff)) + bsw->timedCast(SPELL_TWIN_SPIKE_H, uiDiff); + + if (bsw->timedQuery(SPELL_DARK_TOUCH, uiDiff)) + { + if (Unit* pTarget = bsw->SelectRandomPlayer(SPELL_DARK_ESSENCE, false, 150.0f)) + bsw->doCast(SPELL_DARK_TOUCH, pTarget); + bsw->doCast(NPC_UNLEASHED_DARK); + }; + if (m_pInstance->GetData(DATA_CASTING_VALKYRS) == SPELL_NONE ) + { + if (bsw->timedQuery(SPELL_DARK_VORTEX, uiDiff)) + { + m_pInstance->SetData(DATA_CASTING_VALKYRS, SPELL_DARK_VORTEX); + DoScriptText(-1713540,m_creature); + stage = 1; + break; + }; + if (bsw->timedQuery(SPELL_TWIN_PACT_H, uiDiff) + && m_creature->GetHealthPercent() <= 50.0f) { m_creature->InterruptNonMeleeSpells(true); bsw->doCast(SPELL_SHIELD_DARK); - m_pInstance->SetData(DATA_CASTING_EYDIS, SPELL_TWIN_PACT_H); + m_pInstance->SetData(DATA_CASTING_VALKYRS, SPELL_TWIN_PACT_H); DoScriptText(-1713539,m_creature); stage = 3; - } - break; - case 3: - bsw->doCast(SPELL_TWIN_PACT_H); - stage = 0; - TwinPactCasted = true; + break; + }; + }; + if (m_pInstance->GetData(DATA_CASTING_VALKYRS) == SPELL_TWIN_PACT_L) + if (!m_creature->HasAura(SPELL_TWIN_POWER)) + bsw->doCast(SPELL_TWIN_POWER); + break; + case 1: + bsw->doCast(SPELL_DARK_VORTEX); + stage = 2; + break; + case 2: + if (!m_creature->HasAura(SPELL_DARK_VORTEX) + && bsw->timedQuery(SPELL_SHIELD_DARK, uiDiff)) + { + m_pInstance->SetData(DATA_CASTING_VALKYRS, SPELL_NONE); + stage = 0; + }; + break; + case 3: + bsw->doCast(SPELL_TWIN_PACT_H); + stage = 4; break; - default: + case 4: + if (!m_creature->HasAura(SPELL_SHIELD_DARK) + && bsw->timedQuery(SPELL_SHIELD_DARK, uiDiff)) + { + m_pInstance->SetData(DATA_CASTING_VALKYRS, SPELL_NONE); + stage = 0; + }; + default: break; } - if (m_pInstance->GetData(DATA_CASTING_FJOLA) == SPELL_LIGHT_VORTEX && stage==0 ) - { - m_pInstance->SetData(DATA_CASTING_FJOLA, SPELL_NONE); - stage = 1; - } - - if ( m_creature->GetHealthPercent() <= 50.0f - && m_pInstance->GetData(DATA_CASTING_FJOLA) == SPELL_TWIN_PACT_L - && !TwinPactCasted - && stage == 0) - { - bsw->doCast(SPELL_TWIN_POWER); - m_pInstance->SetData(DATA_CASTING_FJOLA, SPELL_NONE); - stage = 2; - } - - if (bsw->timedQuery(SPELL_DARK_TOUCH, uiDiff)) - { - bsw->doCast(SPELL_DARK_TOUCH); - bsw->doCast(NPC_UNLEASHED_DARK); - } - bsw->timedCast(SPELL_BERSERK, uiDiff); DoMeleeAttackIfReady(); @@ -426,8 +440,7 @@ bool GossipHello_mob_light_essence(Player *player, Creature* pCreature) player->RemoveAurasDueToSpell(SPELL_DARK_ESSENCE); // player->CastSpell(player,SPELL_REMOVE_TOUCH,false); // Not worked now player->CastSpell(player,SPELL_LIGHT_ESSENCE,false); - if (player->HasAura(SPELL_LIGHT_TOUCH)) - player->RemoveAurasDueToSpell(SPELL_LIGHT_TOUCH); // Override for REMOVE_TOUCH + player->RemoveAurasDueToSpell(SPELL_LIGHT_TOUCH); // Override for REMOVE_TOUCH player->CLOSE_GOSSIP_MENU(); return true; }; @@ -479,8 +492,7 @@ bool GossipHello_mob_dark_essence(Player *player, Creature* pCreature) player->RemoveAurasDueToSpell(SPELL_LIGHT_ESSENCE); // player->CastSpell(player,SPELL_REMOVE_TOUCH,false); // Not worked now player->CastSpell(player,SPELL_DARK_ESSENCE,false); - if (player->HasAura(SPELL_DARK_TOUCH)) - player->RemoveAurasDueToSpell(SPELL_DARK_TOUCH); // Override for REMOVE_TOUCH + player->RemoveAurasDueToSpell(SPELL_DARK_TOUCH); // Override for REMOVE_TOUCH player->CLOSE_GOSSIP_MENU(); return true; } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index b2eb16923..6fac4d8ce 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -41,8 +41,7 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance uint32 m_uiDataDamageFjola; uint32 m_uiDataDamageEydis; - uint32 m_uiFjolaCasting; - uint32 m_uiEydisCasting; + uint32 m_uiValkyrsCasting; uint32 m_auiCrusadersCount; @@ -333,8 +332,7 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance case TYPE_NORTHREND_BEASTS: m_auiNorthrendBeasts = uiData; break; case DATA_HEALTH_FJOLA: m_uiDataDamageFjola = uiData; uiData = NOT_STARTED; break; case DATA_HEALTH_EYDIS: m_uiDataDamageEydis = uiData; uiData = NOT_STARTED; break; - case DATA_CASTING_FJOLA: m_uiFjolaCasting = uiData; uiData = NOT_STARTED; break; - case DATA_CASTING_EYDIS: m_uiEydisCasting = uiData; uiData = NOT_STARTED; break; + case DATA_CASTING_VALKYRS: m_uiValkyrsCasting = uiData; uiData = NOT_STARTED; break; } if (IsEncounterInProgress()) { @@ -533,7 +531,6 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance case 1145: case 1150: case 1160: - case 1170: m_auiEventNPCId = NPC_FIZZLEBANG; break; @@ -546,8 +543,7 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance case DATA_HEALTH_FJOLA: return m_uiDataDamageFjola; case DATA_HEALTH_EYDIS: return m_uiDataDamageEydis; - case DATA_CASTING_FJOLA: return m_uiFjolaCasting; - case DATA_CASTING_EYDIS: return m_uiEydisCasting; + case DATA_CASTING_VALKYRS: return m_uiValkyrsCasting; } return 0; } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index 6977bca9d..44f062bad 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -99,8 +99,7 @@ enum DATA_HEALTH_EYDIS = 201, DATA_HEALTH_FJOLA = 202, - DATA_CASTING_EYDIS = 203, - DATA_CASTING_FJOLA = 204, + DATA_CASTING_VALKYRS = 203, DESPAWN_TIME = 300000, From ae551dbd58586fa60d9e5d0cd66fa4d9f95aaf2f Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 13 May 2010 15:59:47 +0400 Subject: [PATCH 302/405] TOC bugfixes (by bugreports) - NEED TESTING! - attempt 2 to fix restart instance on raid wipe on Northrend beasts - full rewrite Valkyries casting queue - correct view for slime pool (Yormungar's) - small cleanup --- addition/724_trial_of_crusader_mangos.sql | 3 +- ...rial_of_crusader_spelltable_scriptdev2.sql | 39 ++-- include/sc_boss_spell_worker.cpp | 72 +++++- include/sc_boss_spell_worker.h | 22 ++ .../boss_northrend_beasts.cpp | 39 ++-- .../boss_twin_valkyr.cpp | 212 ++++++++++-------- .../instance_trial_of_the_crusader.cpp | 10 +- .../trial_of_the_crusader.cpp | 3 +- .../trial_of_the_crusader.h | 3 +- 9 files changed, 257 insertions(+), 146 deletions(-) diff --git a/addition/724_trial_of_crusader_mangos.sql b/addition/724_trial_of_crusader_mangos.sql index 643c66b57..394c55b44 100644 --- a/addition/724_trial_of_crusader_mangos.sql +++ b/addition/724_trial_of_crusader_mangos.sql @@ -82,8 +82,7 @@ UPDATE `creature_template` SET `scriptname`='mob_snobold_vassal', `AIName` ='' W UPDATE `creature_template` SET `scriptname`='boss_dreadscale', `AIName` ='' WHERE `entry`=34799; UPDATE `creature_template` SET `scriptname`='boss_acidmaw', `AIName` ='' WHERE `entry`=35144; -UPDATE `creature_template` SET `scriptname`='mob_slime_pool', `minlevel` = 80, `maxlevel` = 80, `minhealth`= 30000, `maxhealth` = 30000,`AIName` ='', `faction_A`= 14, `faction_H` = 14, `modelid_A` = 12349, `modelid_H` = 12349 WHERE `entry` = 35176; --- Model id for slime_pool need change! +UPDATE `creature_template` SET `scriptname`='mob_slime_pool', `minlevel` = 80, `maxlevel` = 80, `minhealth`= 30000, `maxhealth` = 30000,`AIName` ='', `faction_A`= 14, `faction_H` = 14, `modelid_A` = 11686, `modelid_H` = 11686 WHERE `entry` = 35176; UPDATE `creature_template` SET `scriptname`='boss_icehowl', `AIName` ='' WHERE `entry`=34797; diff --git a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql index bc9547282..f12127064 100644 --- a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql +++ b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql @@ -4,33 +4,33 @@ DELETE FROM `boss_spell_table` WHERE `entry` IN -- Eydis Darkbane INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES -(34496, 64238, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34496, 64238, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), (34496, 65768, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), -(34496, 65874, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), -(34496, 65876, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34496, 65874, 0, 0, 0, 15000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34496, 65876, 0, 0, 0, 30000, 0, 0, 0, 45000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), (34496, 65879, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), -(34496, 65916, 67248, 67249, 67250, 15000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), -(34496, 66058, 67182, 67183, 67184, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), -(34496, 66069, 67309, 67310, 67311, 10000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), -(34496, 67282, 0, 0, 0, 10000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL); +(34496, 65916, 0, 0, 0, 15000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34496, 66058, 0, 0, 0, 30000, 0, 0, 0, 45000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34496, 66069, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), +(34496, 67282, 0, 0, 0, 8000, 0, 6000, 0, 12000, 0, 8000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL); -- summons INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMax_N10`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType` ) VALUES -(34496, 34628, 40000, 40000, 1, 1, 2, 2, 10, 100, 0, 11); +(34496, 34628, 45000, 45000, 1, 1, 2, 2, 10, 100, 0, 11); -- Fjola Lightbane INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES -(34497, 64238, 64238, 64238, 64238, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34497, 64238, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), (34497, 65766, 67270, 67271, 67272, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), -(34497, 65858, 0, 0, 0, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), -(34497, 65875, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), -(34497, 65879, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), -(34497, 65916, 67248, 67249, 67250, 15000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), -(34497, 66046, 67206, 67207, 67208, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), -(34497, 66075, 67312, 67313, 67314, 10000, 10000, 10000, 10000, 20000, 20000, 20000, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), -(34497, 67297, 0, 0, 0, 10000, 10000, 10000, 10000, 15000, 15000, 15000, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL); +(34497, 65858, 0, 0, 0, 15000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34497, 65875, 0, 0, 0, 30000, 0, 0, 0, 45000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34497, 65879, 0, 0, 0, 30000, 0, 0, 0, 45000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), +(34497, 65916, 0, 0, 0, 15000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34497, 66046, 0, 0, 0, 30000, 0, 0, 0, 45000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34497, 66075, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), +(34497, 67297, 0, 0, 0, 8000, 0, 6000, 0, 0, 12000, 0, 8000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL); -- summons INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMax_N10`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType` ) VALUES -(34497, 34630, 20000, 20000, 1, 1, 2, 2, 10, 100, 0, 11); +(34497, 34630, 45000, 45000, 1, 1, 2, 2, 10, 100, 0, 11); -- AnubArak INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES @@ -151,15 +151,14 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ (35144, 66819, 66819, 66819, 66819, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), (35144, 66824, 67612, 67613, 67614, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), (35144, 66880, 67606, 67607, 67608, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), -(35144, 66901, 67615, 67616, 66617, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(35144, 66901, 0, 0, 0, 15000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), (35144, 66883, 67641, 67642, 67643, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), (35144, 35176, 0, 0, 0, 30000, 30000, 45000, 60000, 30000, 30000, 45000, 60000, 0, 0, 0, 0, 1, 5, 0, 0, 0, 0, 11, 0, 0, 0, NULL), (35144, 68335, 68335, 68335, 68335, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL); -- Slime pool INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES -(35176, 66881, 67638, 67639, 67640, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL), -(35176, 66883, 67641, 67642, 67643, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(35176, 63084, 0, 0, 0, 1000, 0, 0, 0, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, NULL), (35176, 66882, 0, 0, 0, 500, 0, 0, 0, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL); -- Retro Paladins diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index ed7097ab1..54e40c770 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -236,6 +236,22 @@ CanCastResult BossSpellWorker::_BSWSpellSelector(uint8 m_uiSpellIdx, Unit* pTarg return _BSWCastOnTarget(pTarget, m_uiSpellIdx); break; + case CAST_ON_RANDOM_POINT: + if (pSpell->LocData.z <= 1.0f) { + float fPosX, fPosY, fPosZ; + boss->GetPosition(fPosX, fPosY, fPosZ); + boss->GetRandomPoint(fPosX, fPosY, fPosZ, urand((uint32)pSpell->LocData.x, (uint32)pSpell->LocData.y), fPosX, fPosY, fPosZ); + boss->CastSpell(fPosX, fPosY, fPosZ, pSpell->m_uiSpellEntry[currentDifficulty], false); + return CAST_OK; + } else return CAST_FAIL_OTHER; + break; + + case CAST_ON_RANDOM_PLAYER: + if ( pSpell->LocData.x < 1 ) pTarget = SelectRandomPlayer(); + else pTarget = SelectRandomPlayerAtRange((float)pSpell->LocData.x); + return _BSWCastOnTarget(pTarget, m_uiSpellIdx); + break; + default: return CAST_FAIL_OTHER; break; @@ -327,7 +343,9 @@ BossSpellTableParameters BossSpellWorker::getBSWCastType(uint32 pTemp) case 12: return CAST_ON_ALLPLAYERS; case 13: return CAST_ON_FRENDLY; case 14: return CAST_ON_FRENDLY_LOWHP; - case 15: return SPELLTABLEPARM_NUMBER; + case 15: return CAST_ON_RANDOM_POINT; + case 16: return CAST_ON_RANDOM_PLAYER; + case 17: return SPELLTABLEPARM_NUMBER; default: return DO_NOTHING; }; }; @@ -412,6 +430,7 @@ bool BossSpellWorker::_doRemove(uint8 m_uiSpellIdx, Unit* pTarget, SpellEffectIn break; case CAST_ON_RANDOM: + case CAST_ON_RANDOM_PLAYER: case CAST_ON_ALLPLAYERS: { Map::PlayerList const& pPlayers = pMap->GetPlayers(); @@ -442,6 +461,23 @@ bool BossSpellWorker::_doRemove(uint8 m_uiSpellIdx, Unit* pTarget, SpellEffectIn return true; }; +bool BossSpellWorker::_doAura(uint8 m_uiSpellIdx, Unit* pTarget, SpellEffectIndex index) +{ + if (!pTarget) return false; + + SpellEntry const *spell; + + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + + debug_log("BSW: adding aura from spell %u index %u",pSpell->m_uiSpellEntry[currentDifficulty], index); + + if (spell = (SpellEntry *)GetSpellStore()->LookupEntry(pSpell->m_uiSpellEntry[currentDifficulty])) + if (pTarget->AddAura(new BossAura(spell, index, &pSpell->varData, pTarget, pTarget))) + return CAST_OK; + else return CAST_FAIL_OTHER; + +}; + // Copypasting from CreatureAI.cpp. if this called from bossAI-> crashed :( CanCastResult BossSpellWorker::_CanCastSpell(Unit* pTarget, const SpellEntry *pSpell, bool isTriggered) @@ -554,5 +590,39 @@ Unit* BossSpellWorker::SelectLowHPFriendly(float fRange, uint32 uiMinHPDiff) return pUnit; } +// Not threat-based select random player function + +Unit* BossSpellWorker::_doSelect(uint32 SpellID, bool spellsearchtype, float range) +{ + Map::PlayerList const &pList = pMap->GetPlayers(); + if (pList.isEmpty()) return NULL; + + Unit* _list[pMap->GetMaxPlayers()]; + + uint8 _count = 0; + + memset(&_list, 0, sizeof(_list)); + + + for(Map::PlayerList::const_iterator i = pList.begin(); i != pList.end(); ++i) + { + if (Player* player = i->getSource()) + { + if (player->isGameMaster()) continue; + + if ( player->isAlive() + && player->IsWithinDistInMap(boss, range) + && (SpellID == 0 || (player->HasAura(SpellID) == spellsearchtype)) + ) + { + _list[_count] = (Unit*)player; + ++_count; + } + } + } + debug_log("BSW: search result for random player, count = %u ",_count); + return _list[urand(0,_count)]; +}; + #endif \ No newline at end of file diff --git a/include/sc_boss_spell_worker.h b/include/sc_boss_spell_worker.h index f621ba060..0a767eb28 100644 --- a/include/sc_boss_spell_worker.h +++ b/include/sc_boss_spell_worker.h @@ -45,6 +45,8 @@ enum BossSpellTableParameters CAST_ON_ALLPLAYERS = 12, CAST_ON_FRENDLY = 13, CAST_ON_FRENDLY_LOWHP = 14, + CAST_ON_RANDOM_POINT = 15, + CAST_ON_RANDOM_PLAYER = 16, SPELLTABLEPARM_NUMBER }; @@ -144,6 +146,11 @@ class MANGOS_DLL_DECL BossSpellWorker return _doRemove(FindSpellIDX(SpellID),pTarget, index); }; + bool doAura(uint32 SpellID, Unit* pTarget = NULL, SpellEffectIndex index = EFFECT_INDEX_0) + { + return _doAura(FindSpellIDX(SpellID),pTarget, index); + }; + bool hasAura(uint32 SpellID, Unit* pTarget = NULL) { if (!pTarget) pTarget = boss; @@ -155,6 +162,17 @@ class MANGOS_DLL_DECL BossSpellWorker return _doSummon(FindSpellIDX(SpellID), type, delay); }; + Unit* SelectRandomPlayer(uint32 SpellID = 0, bool spellsearchtype = false, float range = 100.0f) + { + return _doSelect(SpellID, spellsearchtype, range); + }; + + Unit* SelectRandomPlayerAtRange(float range) + { + return _doSelect(0, false, range); + }; + + Unit* doSummon(uint32 SpellID, float fPosX, float fPosY, float fPosZ, TempSummonType type = TEMPSUMMON_CORPSE_TIMED_DESPAWN, uint32 delay = 60000) { return _doSummonAtPosition(FindSpellIDX(SpellID), type, delay, fPosX, fPosY, fPosZ); @@ -189,6 +207,8 @@ class MANGOS_DLL_DECL BossSpellWorker bool isSummon(uint8 m_uiSpellIdx); + Unit* _doSelect(uint32 SpellID, bool spellsearchtype = false, float range = 100.0f); + Unit* _doSummon(uint8 m_uiSpellIdx, TempSummonType type = TEMPSUMMON_CORPSE_TIMED_DESPAWN, uint32 delay = 60000); Unit* _doSummonAtPosition(uint8 m_uiSpellIdx, TempSummonType type, uint32 delay, float fPosX, float fPosY, float fPosZ); @@ -209,6 +229,8 @@ class MANGOS_DLL_DECL BossSpellWorker bool _doRemove(uint8 m_uiSpellIdx, Unit* pTarget = NULL, SpellEffectIndex index = EFFECT_INDEX_0); + bool _doAura(uint8 m_uiSpellIdx, Unit* pTarget = NULL, SpellEffectIndex index = EFFECT_INDEX_0); + bool _hasAura(uint8 m_uiSpellIdx, Unit* pTarget); void _fillEmptyDataField(); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index 1ac3f9021..a036049e3 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -27,8 +27,6 @@ EndScriptData */ // not implemented: // snobolds link // snakes underground cast (not support in core) -// aura 31 (SPELL_ADRENALINE) not applyed by undefined reason -// model_id (or visual effect) for slime_pool need change. #include "precompiled.h" #include "trial_of_the_crusader.h" @@ -83,6 +81,7 @@ SPELL_FROTHING_RAGE = 66759, SPELL_STAGGERED_DAZE = 66758, SPELL_SLIME_POOL_1 = 66881, SPELL_SLIME_POOL_2 = 66882, +SPELL_SLIME_POOL_VISUAL = 63084, }; struct MANGOS_DLL_DECL boss_gormokAI : public ScriptedAI @@ -102,7 +101,7 @@ struct MANGOS_DLL_DECL boss_gormokAI : public ScriptedAI if(!m_pInstance) return; SetEquipmentSlots(false, EQUIP_MAIN, EQUIP_OFFHAND, EQUIP_RANGED); - m_creature->SetRespawnDelay(DAY); + m_creature->SetRespawnDelay(7*DAY); m_creature->SetInCombatWithZone(); SnoboldsCount = 4; } @@ -236,7 +235,7 @@ struct MANGOS_DLL_DECL boss_acidmawAI : public ScriptedAI stage = 1; enraged = false; m_creature->SetInCombatWithZone(); - m_creature->SetRespawnDelay(DAY); + m_creature->SetRespawnDelay(7*DAY); m_pInstance->SetData(TYPE_NORTHREND_BEASTS, ACIDMAW_SUBMERGED); } @@ -252,7 +251,8 @@ struct MANGOS_DLL_DECL boss_acidmawAI : public ScriptedAI void JustReachedHome() { if (!m_pInstance) return; - if (m_pInstance->GetData(TYPE_BEASTS) == IN_PROGRESS) + if (m_pInstance->GetData(TYPE_BEASTS) == IN_PROGRESS + && m_pInstance->GetData(TYPE_NORTHREND_BEASTS) != FAIL) m_pInstance->SetData(TYPE_NORTHREND_BEASTS, FAIL); m_creature->ForcedDespawn(); } @@ -349,7 +349,7 @@ struct MANGOS_DLL_DECL boss_dreadscaleAI : public ScriptedAI stage = 0; enraged = false; m_creature->SetInCombatWithZone(); - m_creature->SetRespawnDelay(DAY); + m_creature->SetRespawnDelay(7*DAY); } void JustDied(Unit* pKiller) @@ -364,7 +364,8 @@ struct MANGOS_DLL_DECL boss_dreadscaleAI : public ScriptedAI void JustReachedHome() { if (!m_pInstance) return; - if (m_pInstance->GetData(TYPE_BEASTS) == IN_PROGRESS) + if (m_pInstance->GetData(TYPE_BEASTS) == IN_PROGRESS + && m_pInstance->GetData(TYPE_NORTHREND_BEASTS) != FAIL) m_pInstance->SetData(TYPE_NORTHREND_BEASTS, FAIL); m_creature->ForcedDespawn(); } @@ -454,20 +455,19 @@ struct MANGOS_DLL_DECL mob_slime_poolAI : public ScriptedAI ScriptedInstance *m_pInstance; BossSpellWorker* bsw; float m_Size; - uint8 Difficulty; + bool cloudcasted; void Reset() { if(!m_pInstance) return; - Difficulty = m_pInstance->GetData(TYPE_DIFFICULTY); - if (Difficulty == RAID_DIFFICULTY_10MAN_HEROIC || Difficulty == RAID_DIFFICULTY_25MAN_HEROIC) - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->SetInCombatWithZone(); m_creature->SetSpeedRate(MOVE_RUN, 0.05f); SetCombatMovement(false); m_creature->GetMotionMaster()->MoveRandom(); bsw->doCast(SPELL_SLIME_POOL_2); m_Size = m_creature->GetFloatValue(OBJECT_FIELD_SCALE_X); + cloudcasted = false; } void AttackStart(Unit *who) @@ -477,8 +477,13 @@ struct MANGOS_DLL_DECL mob_slime_poolAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { - if (bsw->timedQuery(SPELL_SLIME_POOL_2,uiDiff)) { - m_Size = m_Size*1.036; + if (!cloudcasted) { + bsw->doCast(SPELL_SLIME_POOL_VISUAL); + cloudcasted = true; + } + + if (bsw->timedQuery(SPELL_SLIME_POOL_2,uiDiff)) { + m_Size = m_Size*1.035; m_creature->SetFloatValue(OBJECT_FIELD_SCALE_X, m_Size); } // Override especially for clean core @@ -511,7 +516,7 @@ struct MANGOS_DLL_DECL boss_icehowlAI : public ScriptedAI void Reset() { if(!m_pInstance) return; - m_creature->SetRespawnDelay(DAY); + m_creature->SetRespawnDelay(7*DAY); MovementStarted = false; stage = 0; } @@ -592,6 +597,7 @@ struct MANGOS_DLL_DECL boss_icehowlAI : public ScriptedAI } case 3: { if (bsw->timedQuery(SPELL_TRAMPLE,uiDiff)) { + if (pTarget && pTarget->isAlive() && (m_creature->GetDistance2d(pTarget) <= 200.0f)) { pTarget->GetPosition(fPosX, fPosY, fPosZ); TrampleCasted = false; MovementStarted = true; @@ -600,6 +606,11 @@ struct MANGOS_DLL_DECL boss_icehowlAI : public ScriptedAI bsw->doCast(SPELL_ADRENALINE); stage = 4; } + else { + TrampleCasted = true; + stage = 5; + } + } break; } case 4: { diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp index cb3a880f8..b2f35e5df 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: trial_of_the_crusader -SD%Complete: 0 +SD%Complete: 80% SDComment: by /dev/rsa SDCategory: Crusader Coliseum EndScriptData */ @@ -72,10 +72,6 @@ enum BossSpells SPELL_UNLEASHED_LIGHT = 65795, }; -/*###### -## boss_fjola -######*/ - struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI { boss_fjolaAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -88,14 +84,13 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI ScriptedInstance* m_pInstance; uint8 stage; BossSpellWorker* bsw; - bool TwinPactCasted; void Reset() { if(!m_pInstance) return; SetEquipmentSlots(false, EQUIP_MAIN_1, EQUIP_OFFHAND_1, EQUIP_RANGED_1); - m_creature->SetRespawnDelay(DAY); - stage = 1; - TwinPactCasted = false; + m_creature->SetRespawnDelay(7*DAY); + m_pInstance->SetData(DATA_CASTING_VALKYRS, SPELL_NONE); + stage = 0; } void JustReachedHome() @@ -103,6 +98,7 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI if (!m_pInstance) return; m_pInstance->SetData(TYPE_VALKIRIES, FAIL); m_pInstance->SetData(DATA_HEALTH_FJOLA, m_creature->GetMaxHealth()); + m_pInstance->SetData(DATA_CASTING_VALKYRS, SPELL_NONE); m_creature->ForcedDespawn(); } @@ -167,56 +163,64 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI switch (stage) { case 0: + bsw->timedCast(SPELL_TWIN_SPIKE_L, uiDiff); + + if (bsw->timedQuery(SPELL_LIGHT_TOUCH, uiDiff)) + { + if (Unit* pTarget = bsw->SelectRandomPlayer(SPELL_LIGHT_ESSENCE, false, 150.0f)) + bsw->doCast(SPELL_LIGHT_TOUCH, pTarget); + bsw->doCast(NPC_UNLEASHED_LIGHT); + }; + if (m_pInstance->GetData(DATA_CASTING_VALKYRS) == SPELL_NONE ) + { + if (bsw->timedQuery(SPELL_LIGHT_VORTEX, uiDiff)) + { + m_pInstance->SetData(DATA_CASTING_VALKYRS, SPELL_LIGHT_VORTEX); + DoScriptText(-1713538,m_creature); + stage = 1; + break; + }; + if (bsw->timedQuery(SPELL_TWIN_PACT_L, uiDiff) + && m_creature->GetHealthPercent() <= 50.0f) + { + m_creature->InterruptNonMeleeSpells(true); + bsw->doCast(SPELL_SHIELD_LIGHT); + m_pInstance->SetData(DATA_CASTING_VALKYRS, SPELL_TWIN_PACT_L); + DoScriptText(-1713539,m_creature); + stage = 3; + }; + }; + if (m_pInstance->GetData(DATA_CASTING_VALKYRS) == SPELL_TWIN_PACT_H) + if (!m_creature->HasAura(SPELL_TWIN_POWER)) + bsw->doCast(SPELL_TWIN_POWER); break; case 1: - if (bsw->timedQuery(SPELL_LIGHT_VORTEX, uiDiff)) { - m_pInstance->SetData(DATA_CASTING_FJOLA, SPELL_LIGHT_VORTEX); - DoScriptText(-1713538,m_creature); bsw->doCast(SPELL_LIGHT_VORTEX); - stage = 0; + stage = 2; + break; + case 2: + if (!m_creature->HasAura(SPELL_LIGHT_VORTEX) + && bsw->timedQuery(SPELL_SHIELD_LIGHT, uiDiff)) + { + m_pInstance->SetData(DATA_CASTING_VALKYRS, SPELL_NONE); + stage = 0; }; + break; + case 3: + bsw->doCast(SPELL_TWIN_PACT_L); + stage = 4; break; - case 2: - if (bsw->timedQuery(SPELL_TWIN_PACT_L, uiDiff)) - { - m_creature->InterruptNonMeleeSpells(true); - bsw->doCast(SPELL_SHIELD_LIGHT); - m_pInstance->SetData(DATA_CASTING_FJOLA, SPELL_TWIN_PACT_L); - DoScriptText(-1713539,m_creature); - bsw->doCast(SPELL_TWIN_PACT_L); - stage = 0; - TwinPactCasted = true; - } - break; - default: + case 4: + if (!m_creature->HasAura(SPELL_SHIELD_LIGHT) + && bsw->timedQuery(SPELL_SHIELD_LIGHT, uiDiff)) + { + m_pInstance->SetData(DATA_CASTING_VALKYRS, SPELL_NONE); + stage = 0; + }; + default: break; } - if (m_pInstance->GetData(DATA_CASTING_EYDIS) == SPELL_DARK_VORTEX && stage==0 ) - { - m_pInstance->SetData(DATA_CASTING_EYDIS, SPELL_NONE); - stage = 1; - } - - if ( m_creature->GetHealthPercent() <= 50.0f - && stage == 0 - && !TwinPactCasted) - { - stage = 2; - } - - if (m_pInstance->GetData(DATA_CASTING_EYDIS) == SPELL_TWIN_PACT_H) - { - bsw->doCast(SPELL_TWIN_POWER); - m_pInstance->SetData(DATA_CASTING_EYDIS, SPELL_NONE); - } - - if (bsw->timedQuery(SPELL_LIGHT_TOUCH, uiDiff)) - { - bsw->doCast(SPELL_LIGHT_TOUCH); - bsw->doCast(NPC_UNLEASHED_LIGHT); - } - bsw->timedCast(SPELL_BERSERK, uiDiff); DoMeleeAttackIfReady(); @@ -228,10 +232,6 @@ CreatureAI* GetAI_boss_fjola(Creature* pCreature) return new boss_fjolaAI(pCreature); } -/*###### -## boss_eydis -######*/ - struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI { boss_eydisAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -244,15 +244,14 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI ScriptedInstance* m_pInstance; uint8 stage; BossSpellWorker* bsw; - bool TwinPactCasted; void Reset() { if(!m_pInstance) return; SetEquipmentSlots(false, EQUIP_MAIN_2, EQUIP_OFFHAND_2, EQUIP_RANGED_2); - m_creature->SetRespawnDelay(DAY); + m_creature->SetRespawnDelay(7*DAY); + m_pInstance->SetData(DATA_CASTING_VALKYRS, SPELL_NONE); stage = 0; - TwinPactCasted = false; } void JustReachedHome() @@ -260,6 +259,7 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI if (!m_pInstance) return; m_pInstance->SetData(TYPE_VALKIRIES, FAIL); m_pInstance->SetData(DATA_HEALTH_EYDIS, m_creature->GetMaxHealth()); + m_pInstance->SetData(DATA_CASTING_VALKYRS, SPELL_NONE); m_creature->ForcedDespawn(); } @@ -322,53 +322,65 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI switch (stage) { case 0: + bsw->timedCast(SPELL_TWIN_SPIKE_H, uiDiff); + + if (bsw->timedQuery(SPELL_DARK_TOUCH, uiDiff)) + { + if (Unit* pTarget = bsw->SelectRandomPlayer(SPELL_DARK_ESSENCE, false, 150.0f)) + bsw->doCast(SPELL_DARK_TOUCH, pTarget); + bsw->doCast(NPC_UNLEASHED_DARK); + }; + if (m_pInstance->GetData(DATA_CASTING_VALKYRS) == SPELL_NONE ) + { + if (bsw->timedQuery(SPELL_DARK_VORTEX, uiDiff)) + { + m_pInstance->SetData(DATA_CASTING_VALKYRS, SPELL_DARK_VORTEX); + DoScriptText(-1713540,m_creature); + stage = 1; + break; + }; + if (bsw->timedQuery(SPELL_TWIN_PACT_H, uiDiff) + && m_creature->GetHealthPercent() <= 50.0f) + { + m_creature->InterruptNonMeleeSpells(true); + bsw->doCast(SPELL_SHIELD_DARK); + m_pInstance->SetData(DATA_CASTING_VALKYRS, SPELL_TWIN_PACT_H); + DoScriptText(-1713539,m_creature); + stage = 3; + break; + }; + }; + if (m_pInstance->GetData(DATA_CASTING_VALKYRS) == SPELL_TWIN_PACT_L) + if (!m_creature->HasAura(SPELL_TWIN_POWER)) + bsw->doCast(SPELL_TWIN_POWER); break; case 1: - if (bsw->timedQuery(SPELL_DARK_VORTEX, uiDiff)) { - m_pInstance->SetData(DATA_CASTING_EYDIS, SPELL_DARK_VORTEX); - DoScriptText(-1713540,m_creature); bsw->doCast(SPELL_DARK_VORTEX); - stage = 0; + stage = 2; + break; + case 2: + if (!m_creature->HasAura(SPELL_DARK_VORTEX) + && bsw->timedQuery(SPELL_SHIELD_DARK, uiDiff)) + { + m_pInstance->SetData(DATA_CASTING_VALKYRS, SPELL_NONE); + stage = 0; }; + break; + case 3: + bsw->doCast(SPELL_TWIN_PACT_H); + stage = 4; break; - case 2: - if (bsw->timedQuery(SPELL_TWIN_PACT_H, uiDiff)) - { - m_creature->InterruptNonMeleeSpells(true); - bsw->doCast(SPELL_SHIELD_DARK); - m_pInstance->SetData(DATA_CASTING_EYDIS, SPELL_TWIN_PACT_H); - DoScriptText(-1713539,m_creature); - bsw->doCast(SPELL_TWIN_PACT_H); - stage = 0; - TwinPactCasted = true; - } - break; - default: + case 4: + if (!m_creature->HasAura(SPELL_SHIELD_DARK) + && bsw->timedQuery(SPELL_SHIELD_DARK, uiDiff)) + { + m_pInstance->SetData(DATA_CASTING_VALKYRS, SPELL_NONE); + stage = 0; + }; + default: break; } - if (m_pInstance->GetData(DATA_CASTING_FJOLA) == SPELL_LIGHT_VORTEX && stage==0 ) - { - m_pInstance->SetData(DATA_CASTING_FJOLA, SPELL_NONE); - stage = 1; - } - - if ( m_creature->GetHealthPercent() <= 50.0f - && m_pInstance->GetData(DATA_CASTING_FJOLA) == SPELL_TWIN_PACT_L - && !TwinPactCasted - && stage == 0) - { - bsw->doCast(SPELL_TWIN_POWER); - m_pInstance->SetData(DATA_CASTING_FJOLA, SPELL_NONE); - stage = 2; - } - - if (bsw->timedQuery(SPELL_DARK_TOUCH, uiDiff)) - { - bsw->doCast(SPELL_DARK_TOUCH); - bsw->doCast(NPC_UNLEASHED_DARK); - } - bsw->timedCast(SPELL_BERSERK, uiDiff); DoMeleeAttackIfReady(); @@ -426,8 +438,9 @@ bool GossipHello_mob_light_essence(Player *player, Creature* pCreature) if(!pInstance) return true; player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, pCreature->GetGUID()); player->RemoveAurasDueToSpell(SPELL_DARK_ESSENCE); - player->CastSpell(player,SPELL_REMOVE_TOUCH,false); +// player->CastSpell(player,SPELL_REMOVE_TOUCH,false); // Not worked now player->CastSpell(player,SPELL_LIGHT_ESSENCE,false); + player->RemoveAurasDueToSpell(SPELL_LIGHT_TOUCH); // Override for REMOVE_TOUCH player->CLOSE_GOSSIP_MENU(); return true; }; @@ -477,8 +490,9 @@ bool GossipHello_mob_dark_essence(Player *player, Creature* pCreature) if(!pInstance) return true; player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, pCreature->GetGUID()); player->RemoveAurasDueToSpell(SPELL_LIGHT_ESSENCE); - player->CastSpell(player,SPELL_REMOVE_TOUCH,false); +// player->CastSpell(player,SPELL_REMOVE_TOUCH,false); // Not worked now player->CastSpell(player,SPELL_DARK_ESSENCE,false); + player->RemoveAurasDueToSpell(SPELL_DARK_TOUCH); // Override for REMOVE_TOUCH player->CLOSE_GOSSIP_MENU(); return true; } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index b2eb16923..6fac4d8ce 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -41,8 +41,7 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance uint32 m_uiDataDamageFjola; uint32 m_uiDataDamageEydis; - uint32 m_uiFjolaCasting; - uint32 m_uiEydisCasting; + uint32 m_uiValkyrsCasting; uint32 m_auiCrusadersCount; @@ -333,8 +332,7 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance case TYPE_NORTHREND_BEASTS: m_auiNorthrendBeasts = uiData; break; case DATA_HEALTH_FJOLA: m_uiDataDamageFjola = uiData; uiData = NOT_STARTED; break; case DATA_HEALTH_EYDIS: m_uiDataDamageEydis = uiData; uiData = NOT_STARTED; break; - case DATA_CASTING_FJOLA: m_uiFjolaCasting = uiData; uiData = NOT_STARTED; break; - case DATA_CASTING_EYDIS: m_uiEydisCasting = uiData; uiData = NOT_STARTED; break; + case DATA_CASTING_VALKYRS: m_uiValkyrsCasting = uiData; uiData = NOT_STARTED; break; } if (IsEncounterInProgress()) { @@ -533,7 +531,6 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance case 1145: case 1150: case 1160: - case 1170: m_auiEventNPCId = NPC_FIZZLEBANG; break; @@ -546,8 +543,7 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance case DATA_HEALTH_FJOLA: return m_uiDataDamageFjola; case DATA_HEALTH_EYDIS: return m_uiDataDamageEydis; - case DATA_CASTING_FJOLA: return m_uiFjolaCasting; - case DATA_CASTING_EYDIS: return m_uiEydisCasting; + case DATA_CASTING_VALKYRS: return m_uiValkyrsCasting; } return 0; } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index 3a5a77984..9aab68617 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -106,7 +106,7 @@ struct MANGOS_DLL_DECL npc_toc_announcerAI : public ScriptedAI if (pInstance->GetData(TYPE_NORTHREND_BEASTS) == SNAKES_DONE) { pInstance->SetData(TYPE_STAGE,3); pInstance->SetData(TYPE_EVENT,300); - pInstance->SetData(TYPE_NORTHREND_BEASTS,SNAKES_IN_PROGRESS); + pInstance->SetData(TYPE_NORTHREND_BEASTS,ICEHOWL_IN_PROGRESS); pInstance->SetData(TYPE_BEASTS,IN_PROGRESS); }; if (pInstance->GetData(TYPE_NORTHREND_BEASTS) == FAIL) { @@ -755,6 +755,7 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI DoScriptText(-1713709, m_creature); UpdateTimer = 5000; pInstance->SetData(TYPE_EVENT,0); + pInstance->SetData(TYPE_NORTHREND_BEASTS,NOT_STARTED); // pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_WEST_PORTCULLIS)); break; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index 6977bca9d..44f062bad 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -99,8 +99,7 @@ enum DATA_HEALTH_EYDIS = 201, DATA_HEALTH_FJOLA = 202, - DATA_CASTING_EYDIS = 203, - DATA_CASTING_FJOLA = 204, + DATA_CASTING_VALKYRS = 203, DESPAWN_TIME = 300000, From 159037025a215acc8d16cd23d607003ae71904c7 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 13 May 2010 21:18:53 +0400 Subject: [PATCH 303/405] True result from _doAura(), thanks to frostzhenya --- include/sc_boss_spell_worker.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index 54e40c770..88b3a1e30 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -473,8 +473,8 @@ bool BossSpellWorker::_doAura(uint8 m_uiSpellIdx, Unit* pTarget, SpellEffectInde if (spell = (SpellEntry *)GetSpellStore()->LookupEntry(pSpell->m_uiSpellEntry[currentDifficulty])) if (pTarget->AddAura(new BossAura(spell, index, &pSpell->varData, pTarget, pTarget))) - return CAST_OK; - else return CAST_FAIL_OTHER; + return true; + else return false; }; From 4117fac366ec828cd7d9b7c4822bb6a44f87ddea Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 13 May 2010 21:47:05 +0400 Subject: [PATCH 304/405] BSW change --- include/sc_boss_spell_worker.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index 54e40c770..88b3a1e30 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -473,8 +473,8 @@ bool BossSpellWorker::_doAura(uint8 m_uiSpellIdx, Unit* pTarget, SpellEffectInde if (spell = (SpellEntry *)GetSpellStore()->LookupEntry(pSpell->m_uiSpellEntry[currentDifficulty])) if (pTarget->AddAura(new BossAura(spell, index, &pSpell->varData, pTarget, pTarget))) - return CAST_OK; - else return CAST_FAIL_OTHER; + return true; + else return false; }; From 1aac0043e102d700c766944bafc039afc4407f72 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 13 May 2010 23:52:22 +0400 Subject: [PATCH 305/405] Process-safe database command execution (test). --- include/sc_boss_spell_worker.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index 88b3a1e30..1c0e6d97d 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -4,6 +4,7 @@ #include "precompiled.h" #include "sc_boss_spell_worker.h" #ifdef DEF_BOSS_SPELL_WORKER_H +#include "ace/Process_Mutex.h" BossSpellWorker::BossSpellWorker(ScriptedAI* bossAI) { @@ -45,13 +46,18 @@ void BossSpellWorker::_resetTimer(uint8 m_uiSpellIdx) void BossSpellWorker::LoadSpellTable() { + // mutex block for process-safe request execute + ACE_Process_Mutex mMutex = ACE_Process_Mutex("BSW_Lock"); + debug_log("BSW: Loading table of spells boss %u difficulty %u", bossID , currentDifficulty); char query[MAX_QUERY_LEN]; sprintf(query, "SELECT entry, spellID_N10, spellID_N25, spellID_H10, spellID_H25, timerMin_N10, timerMin_N25, timerMin_H10, timerMin_H25, timerMax_N10, timerMax_N25, timerMax_H10, timerMax_H25, data1, data2, data3, data4, locData_x, locData_y, locData_z, varData, StageMask_N, StageMask_H, CastType, isVisualEffect, isBugged, textEntry FROM `boss_spell_table` WHERE entry = %u;\r\n", bossID); + mMutex.acquire(); QueryResult* Result = strSD2Pquery(query); + mMutex.release(); if (Result) { From 253e3343cf8157c13c661509b212b51c668a4dd0 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Fri, 14 May 2010 01:23:27 +0400 Subject: [PATCH 306/405] Lanathel texts --- addition/721_icecrown_scriptdev2.sql | 2 +- .../721_icecrown_spelltable_scriptdev2.sql | 3 +- .../icecrown_citadel/blood_prince_council.cpp | 11 ++- .../boss_blood_queen_lanathel.cpp | 91 ++++++++++++++++++- .../boss_deathbringer_saurfang.cpp | 5 +- .../boss_proffesor_putricide.cpp | 25 +++++ .../instance_icecrown_spire.cpp | 9 ++ 7 files changed, 139 insertions(+), 7 deletions(-) diff --git a/addition/721_icecrown_scriptdev2.sql b/addition/721_icecrown_scriptdev2.sql index 2baa7c92b..b9a3ca53a 100644 --- a/addition/721_icecrown_scriptdev2.sql +++ b/addition/721_icecrown_scriptdev2.sql @@ -97,7 +97,7 @@ INSERT INTO `script_texts` (`entry`,`content_loc8`, `content_default`, `sound`, ('-1631321','Это было неразумное решение!','','16782','6','0','0','Lanathel Aggro'), ('-1631322','Я только попробую на вкус...','','16783','6','0','0','Lanathel Bite 01'), ('-1631323','Я голодна!','','16784','6','0','0','Lanathel Bite 02'), -('-1631324','Смерть вас не спсет!','','16785','6','0','0','Lanathel Add'), +('-1631324','Смерть вас не спасет!','','16785','6','0','0','Lanathel Add'), ('-1631325','Страдайте же!','','16786','6','0','0','Lanathel Special 01'), ('-1631326','Как вам такое?','','16787','6','0','0','Lanathel Special 02'), ('-1631327','Начинаем представление!','','16788','6','0','0','Lanathel Special 03'), diff --git a/addition/721_icecrown_spelltable_scriptdev2.sql b/addition/721_icecrown_spelltable_scriptdev2.sql index 2eb2d78e4..45428908e 100644 --- a/addition/721_icecrown_spelltable_scriptdev2.sql +++ b/addition/721_icecrown_spelltable_scriptdev2.sql @@ -212,9 +212,10 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ (37955, 70867, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), (37955, 70923, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), (37955, 71340, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), -(37955, 71265, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(37955, 71264, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), (37955, 71446, 0, 0, 0, 5000, 0, 0, 0, 8000, 0, 0, 0, 0, 0, 0, 4, 0, 0), (37955, 71772, 0, 0, 0, 120000, 0, 0, 0, 150000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(37955, 47008, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (37955, 71952, 0, 0, 0, 5000, 0, 0, 0, 8000, 0, 0, 0, 0, 0, 0, 1, 0, 0); -- Valithria diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp index f3cb013b2..2f6998072 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp @@ -68,14 +68,23 @@ struct MANGOS_DLL_DECL boss_valanar_iccAI : public ScriptedAI BossSpellWorker* bsw; Creature* pBrother1; Creature* pBrother2; - + bool intro; void Reset() { if(!m_pInstance) return; m_pInstance->SetData(DATA_BLOOD_COUNCIL_HEALTH, m_creature->GetMaxHealth()*3); stage = 0; + intro = false; } + void MoveInLineOfSight(Unit* pWho) + { + if(!m_pInstance || intro) return + m_pInstance->SetData(TYPE_EVENT, 800); + intro = true; + } + + void JustReachedHome() { if (!m_pInstance) return; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp index ed31a204c..dfc5d0c2b 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp @@ -26,6 +26,7 @@ EndScriptData */ enum BossSpells { + SPELL_BERSERK = 47008, SPELL_SHROUD_OF_SORROW = 72981, SPELL_DELRIOUS_SLASH = 71623, SPELL_BLOOD_MIRROR_1 = 70821, @@ -35,11 +36,14 @@ enum BossSpells SPELL_FRENZIED_BLOODTHIRST = 70877, SPELL_UNCONTROLLABLE_FRENZY = 70923, SPELL_PACT_OF_DARKFALLEN = 71340, - SPELL_SWARMING_SHADOWS = 71265, + SPELL_PACT_OF_DARKFALLEN_1 = 71341, + SPELL_SWARMING_SHADOWS = 71264, SPELL_TWILIGHT_BLOODBOLT = 71446, SPELL_BLOODBOLT_WHIRL = 71772, SPELL_PRESENCE_OF_DARKFALLEN = 71952, + NPC_SWARMING_SHADOWS = 38163, + SPELL_SWARMING_SHADOWS_VISUAL = 71267, }; struct MANGOS_DLL_DECL boss_blood_queen_lanathelAI : public ScriptedAI @@ -54,6 +58,7 @@ struct MANGOS_DLL_DECL boss_blood_queen_lanathelAI : public ScriptedAI ScriptedInstance *pInstance; BossSpellWorker* bsw; uint8 stage; + uint32 UpdateTimer; void Reset() { @@ -67,19 +72,54 @@ struct MANGOS_DLL_DECL boss_blood_queen_lanathelAI : public ScriptedAI if (pInstance) pInstance->SetData(TYPE_LANATHEL, FAIL); } + void KilledUnit(Unit* pVictim) + { + switch (urand(0,1)) { + case 0: + DoScriptText(-1631330,m_creature,pVictim); + break; + case 1: + DoScriptText(-1631331,m_creature,pVictim); + break; + } + } + void Aggro(Unit *who) { - if(pInstance) pInstance->SetData(TYPE_LANATHEL, IN_PROGRESS); + if(!pInstance) return; + pInstance->SetData(TYPE_LANATHEL, IN_PROGRESS); bsw->doCast(SPELL_SHROUD_OF_SORROW); + DoScriptText(-1631321,m_creature,who); } void JustDied(Unit *killer) { - if(pInstance) pInstance->SetData(TYPE_LANATHEL, DONE); + if(!pInstance) return; + pInstance->SetData(TYPE_LANATHEL, DONE); + DoScriptText(-1631333,m_creature,killer); } void UpdateAI(const uint32 diff) { + if (pInstance->GetData(TYPE_EVENT_NPC) == NPC_LANATHEL) + { + UpdateTimer = pInstance->GetData(TYPE_EVENT_TIMER); + if (UpdateTimer <= diff) + { + switch (pInstance->GetData(TYPE_EVENT)) + { + case 800: + DoScriptText(-1631301, m_creature); + UpdateTimer = 2000; + pInstance->SetData(TYPE_EVENT,810); + break; + default: + break; + } + } else UpdateTimer -= diff; + pInstance->SetData(TYPE_EVENT_TIMER, UpdateTimer); + } + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -90,6 +130,7 @@ struct MANGOS_DLL_DECL boss_blood_queen_lanathelAI : public ScriptedAI if (bsw->timedQuery(SPELL_BLOODBOLT_WHIRL,diff)) stage = 1; break; case 1: + DoScriptText(-1631327,m_creature); bsw->doCast(SPELL_BLOODBOLT_WHIRL); stage = 0; break; @@ -105,6 +146,11 @@ struct MANGOS_DLL_DECL boss_blood_queen_lanathelAI : public ScriptedAI bsw->timedCast(SPELL_SWARMING_SHADOWS, diff); + if (bsw->timedQuery(SPELL_BERSERK, diff)){ + bsw->doCast(SPELL_BERSERK); + DoScriptText(-1631332,m_creature); + }; + DoMeleeAttackIfReady(); } }; @@ -115,12 +161,51 @@ CreatureAI* GetAI_boss_blood_queen_lanathel(Creature* pCreature) return new boss_blood_queen_lanathelAI(pCreature); } +struct MANGOS_DLL_DECL mob_swarming_shadowsAI : public ScriptedAI +{ + mob_swarming_shadowsAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + } + + ScriptedInstance* m_pInstance; + + void Reset() + { + SetCombatMovement(false); +// m_creature->SetDisplayId(29308); + m_creature->GetMotionMaster()->MoveRandom(); +// m_ui_Timer = 30000; + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_pInstance || m_pInstance->GetData(TYPE_LANATHEL) != IN_PROGRESS) + m_creature->ForcedDespawn(); + + if (!m_creature->HasAura(SPELL_SWARMING_SHADOWS_VISUAL)) + DoCast(m_creature, SPELL_SWARMING_SHADOWS_VISUAL); + + } +}; + +CreatureAI* GetAI_mob_swarming_shadows(Creature* pCreature) +{ + return new mob_swarming_shadowsAI (pCreature); +} + void AddSC_boss_blood_queen_lanathel() { Script *newscript; + newscript = new Script; newscript->Name = "boss_blood_queen_lanathel"; newscript->GetAI = &GetAI_boss_blood_queen_lanathel; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_swarming_shadows"; + newscript->GetAI = &GetAI_mob_swarming_shadows; + newscript->RegisterSelf(); } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp index 2b5af5227..a77af57dc 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp @@ -163,7 +163,10 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI if (m_creature->GetHealthPercent() <= 30.0f && stage == 0) stage = 1; - bsw->timedCast(SPELL_BERSERK, diff); + if (bsw->timedQuery(SPELL_BERSERK, diff)){ + bsw->doCast(SPELL_BERSERK); + DoScriptText(-1631108,m_creature); + }; DoMeleeAttackIfReady(); } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp index 452b92227..33507019b 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp @@ -74,6 +74,7 @@ struct MANGOS_DLL_DECL boss_proffesor_putricideAI : public ScriptedAI BossSpellWorker* bsw; uint8 stage; bool intro; + uint32 UpdateTimer; void Reset() { @@ -123,6 +124,30 @@ struct MANGOS_DLL_DECL boss_proffesor_putricideAI : public ScriptedAI void UpdateAI(const uint32 diff) { + if (pInstance->GetData(TYPE_EVENT_NPC) == NPC_PROFESSOR_PUTRICIDE) + { + UpdateTimer = pInstance->GetData(TYPE_EVENT_TIMER); + if (UpdateTimer <= diff) + { + switch (pInstance->GetData(TYPE_EVENT)) + { + case 500: + DoScriptText(-16311201, m_creature); + UpdateTimer = 2000; + pInstance->SetData(TYPE_EVENT,510); + break; + case 600: + DoScriptText(-16311220, m_creature); + UpdateTimer = 2000; + pInstance->SetData(TYPE_EVENT,610); + break; + default: + break; + } + } else UpdateTimer -= diff; + pInstance->SetData(TYPE_EVENT_TIMER, UpdateTimer); + } + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp index a9f2677e2..e240b43a9 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp @@ -553,6 +553,15 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance return NPC_LICH_KING; break; + case 500: + case 600: + return NPC_PROFESSOR_PUTRICIDE; + break; + + case 800: + return NPC_LANATHEL; + break; + default: break; }; From 97fbd958aa1fdfffb02ed2fe0219a74540baf03a Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Fri, 14 May 2010 12:59:33 +0400 Subject: [PATCH 307/405] TOC change (by bugreports). - added Twin pact DB record - rewrite logic of crusaders summon +small fixes. --- addition/724_trial_of_crusader_mangos.sql | 13 +- ...rial_of_crusader_spelltable_scriptdev2.sql | 14 +- .../boss_northrend_beasts.cpp | 2 +- .../instance_trial_of_the_crusader.cpp | 24 ++ .../trial_of_the_crusader.cpp | 407 ++++++++++++------ .../trial_of_the_crusader.h | 50 ++- 6 files changed, 350 insertions(+), 160 deletions(-) diff --git a/addition/724_trial_of_crusader_mangos.sql b/addition/724_trial_of_crusader_mangos.sql index 394c55b44..f1ce1d97f 100644 --- a/addition/724_trial_of_crusader_mangos.sql +++ b/addition/724_trial_of_crusader_mangos.sql @@ -41,7 +41,7 @@ UPDATE `creature_template` SET `scriptname`='mob_toc_shaman', `AIName` ='' WHERE UPDATE `creature_template` SET `scriptname`='mob_toc_enh_shaman', `AIName` ='' WHERE `entry` IN (34470,34444); UPDATE `creature_template` SET `scriptname`='mob_toc_hunter', `AIName` ='' WHERE `entry` IN (34467,34448); UPDATE `creature_template` SET `scriptname`='mob_toc_rogue', `AIName` ='' WHERE `entry` IN (34472,34454); -UPDATE `creature_template` SET `scriptname`='mob_toc_priest', `AIName` ='' WHERE `entry` IN (34466,34456); +UPDATE `creature_template` SET `scriptname`='mob_toc_priest', `AIName` ='' WHERE `entry` IN (34466,34447); UPDATE `creature_template` SET `scriptname`='mob_toc_shadow_priest', `AIName` ='' WHERE `entry` IN (34473,34441); UPDATE `creature_template` SET `scriptname`='mob_toc_dk', `AIName` ='' WHERE `entry` IN (34461,34458); UPDATE `creature_template` SET `scriptname`='mob_toc_paladin', `AIName` ='' WHERE `entry` IN (34465,34445); @@ -106,6 +106,17 @@ UPDATE `creature_template` SET `npcflag`=1, `scriptname`='mob_light_essence', `A UPDATE `creature_template` SET `npcflag`=1, `scriptname`='mob_dark_essence', `AIName` ='' WHERE entry = 34567; UPDATE `creature_template` SET `faction_A` = 14, `minlevel` = 82, `maxlevel` = 82,`faction_H` = 14, `AIName` ='', `scriptname`='mob_unleashed_dark' WHERE entry = 34628; UPDATE `creature_template` SET `faction_A` = 14, `minlevel` = 82, `maxlevel` = 82,`faction_H` = 14, `AIName` ='', `scriptname`='mob_unleashed_light' WHERE entry = 34630; +-- Twin pact by Wowka321 +DELETE FROM `spell_script_target` WHERE `entry` IN (65875,67303,67304,67305,65876,67306,67307,67308); +INSERT INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES +('65875', '1', '34497'), +('67303', '1', '34497'), +('67304', '1', '34497'), +('67305', '1', '34497'), +('65876', '1', '34496'), +('67306', '1', '34496'), +('67307', '1', '34496'), +('67308', '1', '34496'); -- Anub'arak UPDATE `creature_template` SET `scriptname`='boss_anubarak_trial', `unit_flags` = 0, `AIName` ='' WHERE `entry`=34564; diff --git a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql index f12127064..7ce7a996b 100644 --- a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql +++ b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql @@ -336,7 +336,7 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin (34454, 65957, 68095, 15000, 20000, 3); -- Priest -DELETE FROM `boss_spell_table` WHERE `entry` IN (34466,34456); +DELETE FROM `boss_spell_table` WHERE `entry` IN (34466,34447); INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES (34466, 66177, 68035, 3000, 8000, 14), (34466, 66099, 68032, 3000, 8000, 14), @@ -345,12 +345,12 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin (34466, 65546, 0, 3000, 8000, 6), (34466, 65543, 0, 5000, 25000, 1); INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES -(34456, 66177, 68035, 3000, 8000, 14), -(34456, 66099, 68032, 3000, 8000, 14), -(34456, 66104, 68023, 3000, 8000, 14), -(34456, 66100, 68026, 3000, 8000, 4), -(34456, 65546, 0, 3000, 8000, 6), -(34456, 65543, 0, 5000, 25000, 1); +(34447, 66177, 68035, 3000, 8000, 14), +(34447, 66099, 68032, 3000, 8000, 14), +(34447, 66104, 68023, 3000, 8000, 14), +(34447, 66100, 68026, 3000, 8000, 4), +(34447, 65546, 0, 3000, 8000, 6), +(34447, 65543, 0, 5000, 25000, 1); -- Shadow priest DELETE FROM `boss_spell_table` WHERE `entry` IN (34473,34441); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index a036049e3..24f4012d5 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -597,7 +597,7 @@ struct MANGOS_DLL_DECL boss_icehowlAI : public ScriptedAI } case 3: { if (bsw->timedQuery(SPELL_TRAMPLE,uiDiff)) { - if (pTarget && pTarget->isAlive() && (m_creature->GetDistance2d(pTarget) <= 200.0f)) { + if (pTarget && pTarget->isAlive() && (pTarget->IsWithinDistInMap(m_creature, 200.0f))) { pTarget->GetPosition(fPosX, fPosY, fPosZ); TrampleCasted = false; MovementStarted = true; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index 6fac4d8ce..c4f772f00 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -72,6 +72,10 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance uint64 m_uiCrusader18Guid; uint64 m_uiCrusader19Guid; uint64 m_uiCrusader1aGuid; + uint64 m_uiCrusader1bGuid; + uint64 m_uiCrusader1cGuid; + uint64 m_uiCrusader1dGuid; + uint64 m_uiCrusader1eGuid; uint64 m_uiCrusader21Guid; uint64 m_uiCrusader22Guid; @@ -83,6 +87,10 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance uint64 m_uiCrusader28Guid; uint64 m_uiCrusader29Guid; uint64 m_uiCrusader2aGuid; + uint64 m_uiCrusader2bGuid; + uint64 m_uiCrusader2cGuid; + uint64 m_uiCrusader2dGuid; + uint64 m_uiCrusader2eGuid; uint64 m_uiCrusader01Guid; uint64 m_uiCrusader02Guid; @@ -216,6 +224,10 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance case NPC_CRUSADER_1_8: m_uiCrusader18Guid = pCreature->GetGUID(); break; case NPC_CRUSADER_1_9: m_uiCrusader19Guid = pCreature->GetGUID(); break; case NPC_CRUSADER_1_10: m_uiCrusader1aGuid = pCreature->GetGUID(); break; + case NPC_CRUSADER_1_11: m_uiCrusader1bGuid = pCreature->GetGUID(); break; + case NPC_CRUSADER_1_12: m_uiCrusader1cGuid = pCreature->GetGUID(); break; + case NPC_CRUSADER_1_13: m_uiCrusader1dGuid = pCreature->GetGUID(); break; + case NPC_CRUSADER_1_14: m_uiCrusader1eGuid = pCreature->GetGUID(); break; case NPC_CRUSADER_2_1: m_uiCrusader21Guid = pCreature->GetGUID(); break; case NPC_CRUSADER_2_2: m_uiCrusader22Guid = pCreature->GetGUID(); break; @@ -227,6 +239,10 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance case NPC_CRUSADER_2_8: m_uiCrusader28Guid = pCreature->GetGUID(); break; case NPC_CRUSADER_2_9: m_uiCrusader29Guid = pCreature->GetGUID(); break; case NPC_CRUSADER_2_10: m_uiCrusader2aGuid = pCreature->GetGUID(); break; + case NPC_CRUSADER_2_11: m_uiCrusader2bGuid = pCreature->GetGUID(); break; + case NPC_CRUSADER_2_12: m_uiCrusader2cGuid = pCreature->GetGUID(); break; + case NPC_CRUSADER_2_13: m_uiCrusader2dGuid = pCreature->GetGUID(); break; + case NPC_CRUSADER_2_14: m_uiCrusader2eGuid = pCreature->GetGUID(); break; case NPC_CRUSADER_0_1: m_uiCrusader01Guid = pCreature->GetGUID(); break; case NPC_CRUSADER_0_2: m_uiCrusader02Guid = pCreature->GetGUID(); break; @@ -407,6 +423,10 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance case NPC_CRUSADER_1_8: return m_uiCrusader18Guid; case NPC_CRUSADER_1_9: return m_uiCrusader19Guid; case NPC_CRUSADER_1_10: return m_uiCrusader1aGuid; + case NPC_CRUSADER_1_11: return m_uiCrusader1bGuid; + case NPC_CRUSADER_1_12: return m_uiCrusader1cGuid; + case NPC_CRUSADER_1_13: return m_uiCrusader1dGuid; + case NPC_CRUSADER_1_14: return m_uiCrusader1eGuid; case NPC_CRUSADER_2_1: return m_uiCrusader21Guid; case NPC_CRUSADER_2_2: return m_uiCrusader22Guid; @@ -418,6 +438,10 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance case NPC_CRUSADER_2_8: return m_uiCrusader28Guid; case NPC_CRUSADER_2_9: return m_uiCrusader29Guid; case NPC_CRUSADER_2_10: return m_uiCrusader2aGuid; + case NPC_CRUSADER_2_11: return m_uiCrusader2bGuid; + case NPC_CRUSADER_2_12: return m_uiCrusader2cGuid; + case NPC_CRUSADER_2_13: return m_uiCrusader2dGuid; + case NPC_CRUSADER_2_14: return m_uiCrusader2eGuid; case NPC_CRUSADER_0_1: return m_uiCrusader01Guid; case NPC_CRUSADER_0_2: return m_uiCrusader02Guid; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index 9aab68617..e9f2fe22d 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -637,9 +637,13 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI ScriptedInstance* pInstance; uint32 UpdateTimer; + uint32 crusader[12]; + uint8 crusaderscount; void Reset() { + crusaderscount = 0; + memset(&crusader, 0, sizeof(crusader)); } void AttackStart(Unit *who) @@ -805,74 +809,146 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI //Summoning crusaders case 3091: pInstance->SetData(TYPE_STAGE,6); - if (pInstance->GetData(TYPE_DIFFICULTY) == RAID_DIFFICULTY_25MAN_NORMAL + if (pInstance->GetData(TYPE_DIFFICULTY) == RAID_DIFFICULTY_25MAN_NORMAL || pInstance->GetData(TYPE_DIFFICULTY) == RAID_DIFFICULTY_25MAN_HEROIC) { - pInstance->SetData(TYPE_CRUSADERS_COUNT,12); - m_creature->SummonCreature(NPC_CRUSADER_1_7, SpawnLoc[9].x, SpawnLoc[9].y, SpawnLoc[9].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_7))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - } - m_creature->SummonCreature(NPC_CRUSADER_1_8, SpawnLoc[10].x, SpawnLoc[10].y, SpawnLoc[10].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_8))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - } - m_creature->SummonCreature(NPC_CRUSADER_1_9, SpawnLoc[11].x, SpawnLoc[11].y, SpawnLoc[11].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_9))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - } - m_creature->SummonCreature(NPC_CRUSADER_1_10, SpawnLoc[12].x, SpawnLoc[12].y, SpawnLoc[12].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_10))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - } - m_creature->SummonCreature(NPC_CRUSADER_0_1, SpawnLoc[13].x, SpawnLoc[13].y, SpawnLoc[13].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_0_1))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetRespawnDelay(DAY); - } - m_creature->SummonCreature(NPC_CRUSADER_0_2, SpawnLoc[14].x, SpawnLoc[14].y, SpawnLoc[14].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_0_2))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetRespawnDelay(DAY); - } + crusaderscount = 12; + switch (urand(0,3)){ // Healers, 3 in 25-mode + case 0: crusader[0] = NPC_CRUSADER_1_1; + crusader[1] = NPC_CRUSADER_1_12; + crusader[2] = NPC_CRUSADER_1_13; + break; + case 1: crusader[0] = NPC_CRUSADER_1_1; + crusader[1] = NPC_CRUSADER_1_2; + crusader[2] = NPC_CRUSADER_1_13; + break; + case 2: crusader[0] = NPC_CRUSADER_1_1; + crusader[1] = NPC_CRUSADER_1_2; + crusader[2] = NPC_CRUSADER_1_12; + break; + case 3: crusader[0] = NPC_CRUSADER_1_2; + crusader[1] = NPC_CRUSADER_1_12; + crusader[2] = NPC_CRUSADER_1_13; + break; + } + switch (urand(0,5)){ // Random melee DD, 2 in 25-mode + case 0: crusader[3] = NPC_CRUSADER_1_3; + crusader[4] = NPC_CRUSADER_1_4; + break; + case 1: crusader[3] = NPC_CRUSADER_1_3; + crusader[4] = NPC_CRUSADER_1_5; + break; + case 2: crusader[3] = NPC_CRUSADER_1_3; + crusader[4] = NPC_CRUSADER_1_6; + break; + case 3: crusader[3] = NPC_CRUSADER_1_4; + crusader[4] = NPC_CRUSADER_1_5; + break; + case 4: crusader[3] = NPC_CRUSADER_1_4; + crusader[4] = NPC_CRUSADER_1_6; + break; + case 5: crusader[3] = NPC_CRUSADER_1_5; + crusader[4] = NPC_CRUSADER_1_6; + break; + } + + switch (urand(0,3)){ // Random magic DD, 3 in 25-mode + case 0: crusader[5] = NPC_CRUSADER_1_7; + crusader[6] = NPC_CRUSADER_1_8; + crusader[7] = NPC_CRUSADER_1_11; + break; + case 1: crusader[5] = NPC_CRUSADER_1_7; + crusader[6] = NPC_CRUSADER_1_8; + crusader[7] = NPC_CRUSADER_1_14; + break; + case 2: crusader[5] = NPC_CRUSADER_1_8; + crusader[6] = NPC_CRUSADER_1_11; + crusader[7] = NPC_CRUSADER_1_14; + break; + case 3: crusader[5] = NPC_CRUSADER_1_7; + crusader[6] = NPC_CRUSADER_1_11; + crusader[7] = NPC_CRUSADER_1_14; + break; + } + crusader[8] = NPC_CRUSADER_1_9; //Hunter+warlock + crusader[9] = NPC_CRUSADER_1_10; + crusader[10] = NPC_CRUSADER_0_1; + crusader[11] = NPC_CRUSADER_0_2; + + } else { + crusaderscount = 6; + switch (urand(0,5)){ // Healers, 2 in 10-mode + case 0: crusader[0] = NPC_CRUSADER_1_1; + crusader[1] = NPC_CRUSADER_1_12; + break; + case 1: crusader[0] = NPC_CRUSADER_1_1; + crusader[1] = NPC_CRUSADER_1_2; + break; + case 2: crusader[0] = NPC_CRUSADER_1_2; + crusader[1] = NPC_CRUSADER_1_12; + break; + case 3: crusader[0] = NPC_CRUSADER_1_1; + crusader[1] = NPC_CRUSADER_1_13; + break; + case 4: crusader[0] = NPC_CRUSADER_1_2; + crusader[1] = NPC_CRUSADER_1_13; + break; + case 5: crusader[0] = NPC_CRUSADER_1_12; + crusader[1] = NPC_CRUSADER_1_13; + break; + } + switch (urand(0,5)){ // Random melee DD, 2 in 10-mode + case 0: crusader[3] = NPC_CRUSADER_1_3; + crusader[2] = NPC_CRUSADER_1_4; + break; + case 1: crusader[3] = NPC_CRUSADER_1_3; + crusader[2] = NPC_CRUSADER_1_5; + break; + case 2: crusader[3] = NPC_CRUSADER_1_3; + crusader[2] = NPC_CRUSADER_1_6; + break; + case 3: crusader[3] = NPC_CRUSADER_1_4; + crusader[2] = NPC_CRUSADER_1_5; + break; + case 4: crusader[3] = NPC_CRUSADER_1_4; + crusader[2] = NPC_CRUSADER_1_6; + break; + case 5: crusader[3] = NPC_CRUSADER_1_5; + crusader[2] = NPC_CRUSADER_1_6; + break; + } + + switch (urand(0,5)){ // Random magic DD, 2 in 10-mode + case 0: crusader[4] = NPC_CRUSADER_1_7; + crusader[5] = NPC_CRUSADER_1_8; + break; + case 1: crusader[5] = NPC_CRUSADER_1_7; + crusader[4] = NPC_CRUSADER_1_14; + break; + case 2: crusader[5] = NPC_CRUSADER_1_7; + crusader[4] = NPC_CRUSADER_1_11; + break; + case 3: crusader[5] = NPC_CRUSADER_1_8; + crusader[4] = NPC_CRUSADER_1_11; + break; + case 4: crusader[5] = NPC_CRUSADER_1_8; + crusader[4] = NPC_CRUSADER_1_14; + break; + case 5: crusader[5] = NPC_CRUSADER_1_11; + crusader[4] = NPC_CRUSADER_1_14; + break; + } + } - else pInstance->SetData(TYPE_CRUSADERS_COUNT,6); - m_creature->SummonCreature(NPC_CRUSADER_1_1, SpawnLoc[3].x, SpawnLoc[3].y, SpawnLoc[3].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_1))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - } - m_creature->SummonCreature(NPC_CRUSADER_1_2, SpawnLoc[4].x, SpawnLoc[4].y, SpawnLoc[4].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_2))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - } - m_creature->SummonCreature(NPC_CRUSADER_1_3, SpawnLoc[5].x, SpawnLoc[5].y, SpawnLoc[5].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_3))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - } - m_creature->SummonCreature(NPC_CRUSADER_1_4, SpawnLoc[6].x, SpawnLoc[6].y, SpawnLoc[6].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_4))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - } - m_creature->SummonCreature(NPC_CRUSADER_1_5, SpawnLoc[7].x, SpawnLoc[7].y, SpawnLoc[7].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_5))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - } - m_creature->SummonCreature(NPC_CRUSADER_1_6, SpawnLoc[8].x, SpawnLoc[8].y, SpawnLoc[8].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_6))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - } + for(uint8 i = 0; i < crusaderscount; ++i) + { + m_creature->SummonCreature(crusader[i], SpawnLoc[i+2].x, SpawnLoc[i+2].y, SpawnLoc[i+2].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(crusader[i]))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + } + } + pInstance->SetData(TYPE_CRUSADERS_COUNT,crusaderscount); UpdateTimer = 3000; pInstance->SetData(TYPE_EVENT,3095); pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_MAIN_GATE_DOOR)); @@ -885,72 +961,143 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI if (pInstance->GetData(TYPE_DIFFICULTY) == RAID_DIFFICULTY_25MAN_NORMAL || pInstance->GetData(TYPE_DIFFICULTY) == RAID_DIFFICULTY_25MAN_HEROIC) { - pInstance->SetData(TYPE_CRUSADERS_COUNT,12); - - m_creature->SummonCreature(NPC_CRUSADER_2_7, SpawnLoc[9].x, SpawnLoc[9].y, SpawnLoc[9].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_7))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - } - m_creature->SummonCreature(NPC_CRUSADER_2_8, SpawnLoc[10].x, SpawnLoc[10].y, SpawnLoc[10].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_8))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - } - m_creature->SummonCreature(NPC_CRUSADER_2_9, SpawnLoc[11].x, SpawnLoc[11].y, SpawnLoc[11].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_9))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - } - m_creature->SummonCreature(NPC_CRUSADER_2_10, SpawnLoc[12].x, SpawnLoc[12].y, SpawnLoc[12].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_10))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - } - m_creature->SummonCreature(NPC_CRUSADER_0_1, SpawnLoc[13].x, SpawnLoc[13].y, SpawnLoc[13].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_0_1))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - } - m_creature->SummonCreature(NPC_CRUSADER_0_2, SpawnLoc[14].x, SpawnLoc[14].y, SpawnLoc[14].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_0_2))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - } - } - else pInstance->SetData(TYPE_CRUSADERS_COUNT,6); + crusaderscount = 12; + switch (urand(0,3)){ // Healers, 3 in 25-mode + case 0: crusader[0] = NPC_CRUSADER_2_1; + crusader[1] = NPC_CRUSADER_2_12; + crusader[2] = NPC_CRUSADER_2_13; + break; + case 1: crusader[0] = NPC_CRUSADER_2_1; + crusader[1] = NPC_CRUSADER_2_2; + crusader[2] = NPC_CRUSADER_2_13; + break; + case 2: crusader[0] = NPC_CRUSADER_2_1; + crusader[1] = NPC_CRUSADER_2_2; + crusader[2] = NPC_CRUSADER_2_12; + break; + case 3: crusader[0] = NPC_CRUSADER_2_2; + crusader[1] = NPC_CRUSADER_2_12; + crusader[2] = NPC_CRUSADER_2_13; + break; + } + switch (urand(0,5)){ // Random melee DD, 2 in 25-mode + case 0: crusader[3] = NPC_CRUSADER_2_3; + crusader[4] = NPC_CRUSADER_2_4; + break; + case 1: crusader[3] = NPC_CRUSADER_2_3; + crusader[4] = NPC_CRUSADER_2_5; + break; + case 2: crusader[3] = NPC_CRUSADER_2_3; + crusader[4] = NPC_CRUSADER_2_6; + break; + case 3: crusader[3] = NPC_CRUSADER_2_4; + crusader[4] = NPC_CRUSADER_2_5; + break; + case 4: crusader[3] = NPC_CRUSADER_2_4; + crusader[4] = NPC_CRUSADER_2_6; + break; + case 5: crusader[3] = NPC_CRUSADER_2_5; + crusader[4] = NPC_CRUSADER_2_6; + break; + } + + switch (urand(0,3)){ // Random magic DD, 3 in 25-mode + case 0: crusader[5] = NPC_CRUSADER_2_7; + crusader[6] = NPC_CRUSADER_2_8; + crusader[7] = NPC_CRUSADER_2_11; + break; + case 1: crusader[5] = NPC_CRUSADER_2_7; + crusader[6] = NPC_CRUSADER_2_8; + crusader[7] = NPC_CRUSADER_2_14; + break; + case 2: crusader[5] = NPC_CRUSADER_2_8; + crusader[6] = NPC_CRUSADER_2_11; + crusader[7] = NPC_CRUSADER_2_14; + break; + case 3: crusader[5] = NPC_CRUSADER_2_7; + crusader[6] = NPC_CRUSADER_2_11; + crusader[7] = NPC_CRUSADER_2_14; + break; + } + crusader[8] = NPC_CRUSADER_2_9; //Hunter+warlock + crusader[9] = NPC_CRUSADER_2_10; + crusader[10] = NPC_CRUSADER_0_1; + crusader[11] = NPC_CRUSADER_0_2; + + } else { + crusaderscount = 6; + switch (urand(0,5)){ // Healers, 2 in 10-mode + case 0: crusader[0] = NPC_CRUSADER_2_1; + crusader[1] = NPC_CRUSADER_2_12; + break; + case 1: crusader[0] = NPC_CRUSADER_2_1; + crusader[1] = NPC_CRUSADER_2_2; + break; + case 2: crusader[0] = NPC_CRUSADER_2_2; + crusader[1] = NPC_CRUSADER_2_12; + break; + case 3: crusader[0] = NPC_CRUSADER_2_1; + crusader[1] = NPC_CRUSADER_2_13; + break; + case 4: crusader[0] = NPC_CRUSADER_2_2; + crusader[1] = NPC_CRUSADER_2_13; + break; + case 5: crusader[0] = NPC_CRUSADER_2_12; + crusader[1] = NPC_CRUSADER_2_13; + break; + } + switch (urand(0,5)){ // Random melee DD, 2 in 10-mode + case 0: crusader[3] = NPC_CRUSADER_2_3; + crusader[2] = NPC_CRUSADER_2_4; + break; + case 1: crusader[3] = NPC_CRUSADER_2_3; + crusader[2] = NPC_CRUSADER_2_5; + break; + case 2: crusader[3] = NPC_CRUSADER_2_3; + crusader[2] = NPC_CRUSADER_2_6; + break; + case 3: crusader[3] = NPC_CRUSADER_2_4; + crusader[2] = NPC_CRUSADER_2_5; + break; + case 4: crusader[3] = NPC_CRUSADER_2_4; + crusader[2] = NPC_CRUSADER_2_6; + break; + case 5: crusader[3] = NPC_CRUSADER_2_5; + crusader[2] = NPC_CRUSADER_2_6; + break; + } + + switch (urand(0,5)){ // Random magic DD, 2 in 10-mode + case 0: crusader[4] = NPC_CRUSADER_2_7; + crusader[5] = NPC_CRUSADER_2_8; + break; + case 1: crusader[5] = NPC_CRUSADER_2_7; + crusader[4] = NPC_CRUSADER_2_14; + break; + case 2: crusader[5] = NPC_CRUSADER_2_7; + crusader[4] = NPC_CRUSADER_2_11; + break; + case 3: crusader[5] = NPC_CRUSADER_2_8; + crusader[4] = NPC_CRUSADER_2_11; + break; + case 4: crusader[5] = NPC_CRUSADER_2_8; + crusader[4] = NPC_CRUSADER_2_14; + break; + case 5: crusader[5] = NPC_CRUSADER_2_11; + crusader[4] = NPC_CRUSADER_2_14; + break; + } - m_creature->SummonCreature(NPC_CRUSADER_2_1, SpawnLoc[3].x, SpawnLoc[3].y, SpawnLoc[3].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_1))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - } - m_creature->SummonCreature(NPC_CRUSADER_2_2, SpawnLoc[4].x, SpawnLoc[4].y, SpawnLoc[4].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_2))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - } - m_creature->SummonCreature(NPC_CRUSADER_2_3, SpawnLoc[5].x, SpawnLoc[5].y, SpawnLoc[5].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_3))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - } - m_creature->SummonCreature(NPC_CRUSADER_2_4, SpawnLoc[6].x, SpawnLoc[6].y, SpawnLoc[6].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_4))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - } - m_creature->SummonCreature(NPC_CRUSADER_2_5, SpawnLoc[7].x, SpawnLoc[7].y, SpawnLoc[7].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_5))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - } - m_creature->SummonCreature(NPC_CRUSADER_2_6, SpawnLoc[8].x, SpawnLoc[8].y, SpawnLoc[8].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_6))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); - } + } + for(uint8 i = 0; i < crusaderscount; ++i) + { + m_creature->SummonCreature(crusader[i], SpawnLoc[i+2].x, SpawnLoc[i+2].y, SpawnLoc[i+2].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(crusader[i]))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + } + } + pInstance->SetData(TYPE_CRUSADERS_COUNT,crusaderscount); UpdateTimer = 3000; pInstance->SetData(TYPE_EVENT,3095); pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_MAIN_GATE_DOOR)); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index 44f062bad..8cbec4177 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -39,27 +39,35 @@ enum NPC_JARAXXUS = 34780, - NPC_CRUSADER_1_1 = 34460, - NPC_CRUSADER_1_2 = 34463, - NPC_CRUSADER_1_3 = 34461, - NPC_CRUSADER_1_4 = 34471, - NPC_CRUSADER_1_5 = 34475, - NPC_CRUSADER_1_6 = 34472, - NPC_CRUSADER_1_7 = 34467, - NPC_CRUSADER_1_8 = 34468, - NPC_CRUSADER_1_9 = 34473, - NPC_CRUSADER_1_10 = 34474, - - NPC_CRUSADER_2_1 = 34453, - NPC_CRUSADER_2_2 = 34455, - NPC_CRUSADER_2_3 = 34458, - NPC_CRUSADER_2_4 = 34454, - NPC_CRUSADER_2_5 = 34451, - NPC_CRUSADER_2_6 = 34456, - NPC_CRUSADER_2_7 = 34441, - NPC_CRUSADER_2_8 = 34449, - NPC_CRUSADER_2_9 = 34448, - NPC_CRUSADER_2_10 = 34450, + NPC_CRUSADER_1_1 = 34460, //Druid + NPC_CRUSADER_1_2 = 34463, //Shaman + NPC_CRUSADER_1_3 = 34461, //DK + NPC_CRUSADER_1_4 = 34472, //Rogue + NPC_CRUSADER_1_5 = 34475, //Warrior + NPC_CRUSADER_1_6 = 34471, //Retro pal + NPC_CRUSADER_1_7 = 34473, //Shadow priest + NPC_CRUSADER_1_8 = 34468, //Mage + NPC_CRUSADER_1_9 = 34467, //Hunter + NPC_CRUSADER_1_10 = 34474, //Warlock + NPC_CRUSADER_1_11 = 34470, //Enh shaman + NPC_CRUSADER_1_12 = 34466, //Priest + NPC_CRUSADER_1_13 = 34465, //Holy paladin + NPC_CRUSADER_1_14 = 34469, //Moonkin + + NPC_CRUSADER_2_1 = 34451, //Druid + NPC_CRUSADER_2_2 = 34455, //Shaman + NPC_CRUSADER_2_3 = 34458, //DK + NPC_CRUSADER_2_4 = 34454, //Rogue + NPC_CRUSADER_2_5 = 34453, //Warrior + NPC_CRUSADER_2_6 = 34456, //Retro pal + NPC_CRUSADER_2_7 = 34441, //Shadow Priest + NPC_CRUSADER_2_8 = 34449, //Mage + NPC_CRUSADER_2_9 = 34448, //Hunter + NPC_CRUSADER_2_10 = 34450, //Warlock + NPC_CRUSADER_2_11 = 34444, //Enh shaman + NPC_CRUSADER_2_12 = 34447, //Priest + NPC_CRUSADER_2_13 = 34445, //Holy paladin + NPC_CRUSADER_2_14 = 34459, //Moonkin NPC_CRUSADER_0_1 = 35465, NPC_CRUSADER_0_2 = 35610, From 96ac807c80b1de02fc714e70b3e4cce4a1a33c14 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Fri, 14 May 2010 13:02:57 +0400 Subject: [PATCH 308/405] TOC change (by bugreports). - added Twin pact DB record - rewrite logic of crusaders summon +small fixes. --- addition/724_trial_of_crusader_mangos.sql | 13 +- ...rial_of_crusader_spelltable_scriptdev2.sql | 14 +- include/sc_boss_spell_worker.cpp | 6 + .../boss_northrend_beasts.cpp | 2 +- .../instance_trial_of_the_crusader.cpp | 24 ++ .../trial_of_the_crusader.cpp | 407 ++++++++++++------ .../trial_of_the_crusader.h | 50 ++- 7 files changed, 356 insertions(+), 160 deletions(-) diff --git a/addition/724_trial_of_crusader_mangos.sql b/addition/724_trial_of_crusader_mangos.sql index 394c55b44..f1ce1d97f 100644 --- a/addition/724_trial_of_crusader_mangos.sql +++ b/addition/724_trial_of_crusader_mangos.sql @@ -41,7 +41,7 @@ UPDATE `creature_template` SET `scriptname`='mob_toc_shaman', `AIName` ='' WHERE UPDATE `creature_template` SET `scriptname`='mob_toc_enh_shaman', `AIName` ='' WHERE `entry` IN (34470,34444); UPDATE `creature_template` SET `scriptname`='mob_toc_hunter', `AIName` ='' WHERE `entry` IN (34467,34448); UPDATE `creature_template` SET `scriptname`='mob_toc_rogue', `AIName` ='' WHERE `entry` IN (34472,34454); -UPDATE `creature_template` SET `scriptname`='mob_toc_priest', `AIName` ='' WHERE `entry` IN (34466,34456); +UPDATE `creature_template` SET `scriptname`='mob_toc_priest', `AIName` ='' WHERE `entry` IN (34466,34447); UPDATE `creature_template` SET `scriptname`='mob_toc_shadow_priest', `AIName` ='' WHERE `entry` IN (34473,34441); UPDATE `creature_template` SET `scriptname`='mob_toc_dk', `AIName` ='' WHERE `entry` IN (34461,34458); UPDATE `creature_template` SET `scriptname`='mob_toc_paladin', `AIName` ='' WHERE `entry` IN (34465,34445); @@ -106,6 +106,17 @@ UPDATE `creature_template` SET `npcflag`=1, `scriptname`='mob_light_essence', `A UPDATE `creature_template` SET `npcflag`=1, `scriptname`='mob_dark_essence', `AIName` ='' WHERE entry = 34567; UPDATE `creature_template` SET `faction_A` = 14, `minlevel` = 82, `maxlevel` = 82,`faction_H` = 14, `AIName` ='', `scriptname`='mob_unleashed_dark' WHERE entry = 34628; UPDATE `creature_template` SET `faction_A` = 14, `minlevel` = 82, `maxlevel` = 82,`faction_H` = 14, `AIName` ='', `scriptname`='mob_unleashed_light' WHERE entry = 34630; +-- Twin pact by Wowka321 +DELETE FROM `spell_script_target` WHERE `entry` IN (65875,67303,67304,67305,65876,67306,67307,67308); +INSERT INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES +('65875', '1', '34497'), +('67303', '1', '34497'), +('67304', '1', '34497'), +('67305', '1', '34497'), +('65876', '1', '34496'), +('67306', '1', '34496'), +('67307', '1', '34496'), +('67308', '1', '34496'); -- Anub'arak UPDATE `creature_template` SET `scriptname`='boss_anubarak_trial', `unit_flags` = 0, `AIName` ='' WHERE `entry`=34564; diff --git a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql index f12127064..7ce7a996b 100644 --- a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql +++ b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql @@ -336,7 +336,7 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin (34454, 65957, 68095, 15000, 20000, 3); -- Priest -DELETE FROM `boss_spell_table` WHERE `entry` IN (34466,34456); +DELETE FROM `boss_spell_table` WHERE `entry` IN (34466,34447); INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES (34466, 66177, 68035, 3000, 8000, 14), (34466, 66099, 68032, 3000, 8000, 14), @@ -345,12 +345,12 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin (34466, 65546, 0, 3000, 8000, 6), (34466, 65543, 0, 5000, 25000, 1); INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES -(34456, 66177, 68035, 3000, 8000, 14), -(34456, 66099, 68032, 3000, 8000, 14), -(34456, 66104, 68023, 3000, 8000, 14), -(34456, 66100, 68026, 3000, 8000, 4), -(34456, 65546, 0, 3000, 8000, 6), -(34456, 65543, 0, 5000, 25000, 1); +(34447, 66177, 68035, 3000, 8000, 14), +(34447, 66099, 68032, 3000, 8000, 14), +(34447, 66104, 68023, 3000, 8000, 14), +(34447, 66100, 68026, 3000, 8000, 4), +(34447, 65546, 0, 3000, 8000, 6), +(34447, 65543, 0, 5000, 25000, 1); -- Shadow priest DELETE FROM `boss_spell_table` WHERE `entry` IN (34473,34441); diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index 88b3a1e30..1c0e6d97d 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -4,6 +4,7 @@ #include "precompiled.h" #include "sc_boss_spell_worker.h" #ifdef DEF_BOSS_SPELL_WORKER_H +#include "ace/Process_Mutex.h" BossSpellWorker::BossSpellWorker(ScriptedAI* bossAI) { @@ -45,13 +46,18 @@ void BossSpellWorker::_resetTimer(uint8 m_uiSpellIdx) void BossSpellWorker::LoadSpellTable() { + // mutex block for process-safe request execute + ACE_Process_Mutex mMutex = ACE_Process_Mutex("BSW_Lock"); + debug_log("BSW: Loading table of spells boss %u difficulty %u", bossID , currentDifficulty); char query[MAX_QUERY_LEN]; sprintf(query, "SELECT entry, spellID_N10, spellID_N25, spellID_H10, spellID_H25, timerMin_N10, timerMin_N25, timerMin_H10, timerMin_H25, timerMax_N10, timerMax_N25, timerMax_H10, timerMax_H25, data1, data2, data3, data4, locData_x, locData_y, locData_z, varData, StageMask_N, StageMask_H, CastType, isVisualEffect, isBugged, textEntry FROM `boss_spell_table` WHERE entry = %u;\r\n", bossID); + mMutex.acquire(); QueryResult* Result = strSD2Pquery(query); + mMutex.release(); if (Result) { diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index a036049e3..24f4012d5 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -597,7 +597,7 @@ struct MANGOS_DLL_DECL boss_icehowlAI : public ScriptedAI } case 3: { if (bsw->timedQuery(SPELL_TRAMPLE,uiDiff)) { - if (pTarget && pTarget->isAlive() && (m_creature->GetDistance2d(pTarget) <= 200.0f)) { + if (pTarget && pTarget->isAlive() && (pTarget->IsWithinDistInMap(m_creature, 200.0f))) { pTarget->GetPosition(fPosX, fPosY, fPosZ); TrampleCasted = false; MovementStarted = true; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index 6fac4d8ce..c4f772f00 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -72,6 +72,10 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance uint64 m_uiCrusader18Guid; uint64 m_uiCrusader19Guid; uint64 m_uiCrusader1aGuid; + uint64 m_uiCrusader1bGuid; + uint64 m_uiCrusader1cGuid; + uint64 m_uiCrusader1dGuid; + uint64 m_uiCrusader1eGuid; uint64 m_uiCrusader21Guid; uint64 m_uiCrusader22Guid; @@ -83,6 +87,10 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance uint64 m_uiCrusader28Guid; uint64 m_uiCrusader29Guid; uint64 m_uiCrusader2aGuid; + uint64 m_uiCrusader2bGuid; + uint64 m_uiCrusader2cGuid; + uint64 m_uiCrusader2dGuid; + uint64 m_uiCrusader2eGuid; uint64 m_uiCrusader01Guid; uint64 m_uiCrusader02Guid; @@ -216,6 +224,10 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance case NPC_CRUSADER_1_8: m_uiCrusader18Guid = pCreature->GetGUID(); break; case NPC_CRUSADER_1_9: m_uiCrusader19Guid = pCreature->GetGUID(); break; case NPC_CRUSADER_1_10: m_uiCrusader1aGuid = pCreature->GetGUID(); break; + case NPC_CRUSADER_1_11: m_uiCrusader1bGuid = pCreature->GetGUID(); break; + case NPC_CRUSADER_1_12: m_uiCrusader1cGuid = pCreature->GetGUID(); break; + case NPC_CRUSADER_1_13: m_uiCrusader1dGuid = pCreature->GetGUID(); break; + case NPC_CRUSADER_1_14: m_uiCrusader1eGuid = pCreature->GetGUID(); break; case NPC_CRUSADER_2_1: m_uiCrusader21Guid = pCreature->GetGUID(); break; case NPC_CRUSADER_2_2: m_uiCrusader22Guid = pCreature->GetGUID(); break; @@ -227,6 +239,10 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance case NPC_CRUSADER_2_8: m_uiCrusader28Guid = pCreature->GetGUID(); break; case NPC_CRUSADER_2_9: m_uiCrusader29Guid = pCreature->GetGUID(); break; case NPC_CRUSADER_2_10: m_uiCrusader2aGuid = pCreature->GetGUID(); break; + case NPC_CRUSADER_2_11: m_uiCrusader2bGuid = pCreature->GetGUID(); break; + case NPC_CRUSADER_2_12: m_uiCrusader2cGuid = pCreature->GetGUID(); break; + case NPC_CRUSADER_2_13: m_uiCrusader2dGuid = pCreature->GetGUID(); break; + case NPC_CRUSADER_2_14: m_uiCrusader2eGuid = pCreature->GetGUID(); break; case NPC_CRUSADER_0_1: m_uiCrusader01Guid = pCreature->GetGUID(); break; case NPC_CRUSADER_0_2: m_uiCrusader02Guid = pCreature->GetGUID(); break; @@ -407,6 +423,10 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance case NPC_CRUSADER_1_8: return m_uiCrusader18Guid; case NPC_CRUSADER_1_9: return m_uiCrusader19Guid; case NPC_CRUSADER_1_10: return m_uiCrusader1aGuid; + case NPC_CRUSADER_1_11: return m_uiCrusader1bGuid; + case NPC_CRUSADER_1_12: return m_uiCrusader1cGuid; + case NPC_CRUSADER_1_13: return m_uiCrusader1dGuid; + case NPC_CRUSADER_1_14: return m_uiCrusader1eGuid; case NPC_CRUSADER_2_1: return m_uiCrusader21Guid; case NPC_CRUSADER_2_2: return m_uiCrusader22Guid; @@ -418,6 +438,10 @@ struct MANGOS_DLL_DECL instance_trial_of_the_crusader : public ScriptedInstance case NPC_CRUSADER_2_8: return m_uiCrusader28Guid; case NPC_CRUSADER_2_9: return m_uiCrusader29Guid; case NPC_CRUSADER_2_10: return m_uiCrusader2aGuid; + case NPC_CRUSADER_2_11: return m_uiCrusader2bGuid; + case NPC_CRUSADER_2_12: return m_uiCrusader2cGuid; + case NPC_CRUSADER_2_13: return m_uiCrusader2dGuid; + case NPC_CRUSADER_2_14: return m_uiCrusader2eGuid; case NPC_CRUSADER_0_1: return m_uiCrusader01Guid; case NPC_CRUSADER_0_2: return m_uiCrusader02Guid; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index 9aab68617..e9f2fe22d 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -637,9 +637,13 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI ScriptedInstance* pInstance; uint32 UpdateTimer; + uint32 crusader[12]; + uint8 crusaderscount; void Reset() { + crusaderscount = 0; + memset(&crusader, 0, sizeof(crusader)); } void AttackStart(Unit *who) @@ -805,74 +809,146 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI //Summoning crusaders case 3091: pInstance->SetData(TYPE_STAGE,6); - if (pInstance->GetData(TYPE_DIFFICULTY) == RAID_DIFFICULTY_25MAN_NORMAL + if (pInstance->GetData(TYPE_DIFFICULTY) == RAID_DIFFICULTY_25MAN_NORMAL || pInstance->GetData(TYPE_DIFFICULTY) == RAID_DIFFICULTY_25MAN_HEROIC) { - pInstance->SetData(TYPE_CRUSADERS_COUNT,12); - m_creature->SummonCreature(NPC_CRUSADER_1_7, SpawnLoc[9].x, SpawnLoc[9].y, SpawnLoc[9].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_7))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - } - m_creature->SummonCreature(NPC_CRUSADER_1_8, SpawnLoc[10].x, SpawnLoc[10].y, SpawnLoc[10].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_8))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - } - m_creature->SummonCreature(NPC_CRUSADER_1_9, SpawnLoc[11].x, SpawnLoc[11].y, SpawnLoc[11].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_9))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - } - m_creature->SummonCreature(NPC_CRUSADER_1_10, SpawnLoc[12].x, SpawnLoc[12].y, SpawnLoc[12].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_10))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - } - m_creature->SummonCreature(NPC_CRUSADER_0_1, SpawnLoc[13].x, SpawnLoc[13].y, SpawnLoc[13].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_0_1))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetRespawnDelay(DAY); - } - m_creature->SummonCreature(NPC_CRUSADER_0_2, SpawnLoc[14].x, SpawnLoc[14].y, SpawnLoc[14].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_0_2))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetRespawnDelay(DAY); - } + crusaderscount = 12; + switch (urand(0,3)){ // Healers, 3 in 25-mode + case 0: crusader[0] = NPC_CRUSADER_1_1; + crusader[1] = NPC_CRUSADER_1_12; + crusader[2] = NPC_CRUSADER_1_13; + break; + case 1: crusader[0] = NPC_CRUSADER_1_1; + crusader[1] = NPC_CRUSADER_1_2; + crusader[2] = NPC_CRUSADER_1_13; + break; + case 2: crusader[0] = NPC_CRUSADER_1_1; + crusader[1] = NPC_CRUSADER_1_2; + crusader[2] = NPC_CRUSADER_1_12; + break; + case 3: crusader[0] = NPC_CRUSADER_1_2; + crusader[1] = NPC_CRUSADER_1_12; + crusader[2] = NPC_CRUSADER_1_13; + break; + } + switch (urand(0,5)){ // Random melee DD, 2 in 25-mode + case 0: crusader[3] = NPC_CRUSADER_1_3; + crusader[4] = NPC_CRUSADER_1_4; + break; + case 1: crusader[3] = NPC_CRUSADER_1_3; + crusader[4] = NPC_CRUSADER_1_5; + break; + case 2: crusader[3] = NPC_CRUSADER_1_3; + crusader[4] = NPC_CRUSADER_1_6; + break; + case 3: crusader[3] = NPC_CRUSADER_1_4; + crusader[4] = NPC_CRUSADER_1_5; + break; + case 4: crusader[3] = NPC_CRUSADER_1_4; + crusader[4] = NPC_CRUSADER_1_6; + break; + case 5: crusader[3] = NPC_CRUSADER_1_5; + crusader[4] = NPC_CRUSADER_1_6; + break; + } + + switch (urand(0,3)){ // Random magic DD, 3 in 25-mode + case 0: crusader[5] = NPC_CRUSADER_1_7; + crusader[6] = NPC_CRUSADER_1_8; + crusader[7] = NPC_CRUSADER_1_11; + break; + case 1: crusader[5] = NPC_CRUSADER_1_7; + crusader[6] = NPC_CRUSADER_1_8; + crusader[7] = NPC_CRUSADER_1_14; + break; + case 2: crusader[5] = NPC_CRUSADER_1_8; + crusader[6] = NPC_CRUSADER_1_11; + crusader[7] = NPC_CRUSADER_1_14; + break; + case 3: crusader[5] = NPC_CRUSADER_1_7; + crusader[6] = NPC_CRUSADER_1_11; + crusader[7] = NPC_CRUSADER_1_14; + break; + } + crusader[8] = NPC_CRUSADER_1_9; //Hunter+warlock + crusader[9] = NPC_CRUSADER_1_10; + crusader[10] = NPC_CRUSADER_0_1; + crusader[11] = NPC_CRUSADER_0_2; + + } else { + crusaderscount = 6; + switch (urand(0,5)){ // Healers, 2 in 10-mode + case 0: crusader[0] = NPC_CRUSADER_1_1; + crusader[1] = NPC_CRUSADER_1_12; + break; + case 1: crusader[0] = NPC_CRUSADER_1_1; + crusader[1] = NPC_CRUSADER_1_2; + break; + case 2: crusader[0] = NPC_CRUSADER_1_2; + crusader[1] = NPC_CRUSADER_1_12; + break; + case 3: crusader[0] = NPC_CRUSADER_1_1; + crusader[1] = NPC_CRUSADER_1_13; + break; + case 4: crusader[0] = NPC_CRUSADER_1_2; + crusader[1] = NPC_CRUSADER_1_13; + break; + case 5: crusader[0] = NPC_CRUSADER_1_12; + crusader[1] = NPC_CRUSADER_1_13; + break; + } + switch (urand(0,5)){ // Random melee DD, 2 in 10-mode + case 0: crusader[3] = NPC_CRUSADER_1_3; + crusader[2] = NPC_CRUSADER_1_4; + break; + case 1: crusader[3] = NPC_CRUSADER_1_3; + crusader[2] = NPC_CRUSADER_1_5; + break; + case 2: crusader[3] = NPC_CRUSADER_1_3; + crusader[2] = NPC_CRUSADER_1_6; + break; + case 3: crusader[3] = NPC_CRUSADER_1_4; + crusader[2] = NPC_CRUSADER_1_5; + break; + case 4: crusader[3] = NPC_CRUSADER_1_4; + crusader[2] = NPC_CRUSADER_1_6; + break; + case 5: crusader[3] = NPC_CRUSADER_1_5; + crusader[2] = NPC_CRUSADER_1_6; + break; + } + + switch (urand(0,5)){ // Random magic DD, 2 in 10-mode + case 0: crusader[4] = NPC_CRUSADER_1_7; + crusader[5] = NPC_CRUSADER_1_8; + break; + case 1: crusader[5] = NPC_CRUSADER_1_7; + crusader[4] = NPC_CRUSADER_1_14; + break; + case 2: crusader[5] = NPC_CRUSADER_1_7; + crusader[4] = NPC_CRUSADER_1_11; + break; + case 3: crusader[5] = NPC_CRUSADER_1_8; + crusader[4] = NPC_CRUSADER_1_11; + break; + case 4: crusader[5] = NPC_CRUSADER_1_8; + crusader[4] = NPC_CRUSADER_1_14; + break; + case 5: crusader[5] = NPC_CRUSADER_1_11; + crusader[4] = NPC_CRUSADER_1_14; + break; + } + } - else pInstance->SetData(TYPE_CRUSADERS_COUNT,6); - m_creature->SummonCreature(NPC_CRUSADER_1_1, SpawnLoc[3].x, SpawnLoc[3].y, SpawnLoc[3].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_1))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - } - m_creature->SummonCreature(NPC_CRUSADER_1_2, SpawnLoc[4].x, SpawnLoc[4].y, SpawnLoc[4].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_2))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - } - m_creature->SummonCreature(NPC_CRUSADER_1_3, SpawnLoc[5].x, SpawnLoc[5].y, SpawnLoc[5].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_3))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - } - m_creature->SummonCreature(NPC_CRUSADER_1_4, SpawnLoc[6].x, SpawnLoc[6].y, SpawnLoc[6].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_4))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - } - m_creature->SummonCreature(NPC_CRUSADER_1_5, SpawnLoc[7].x, SpawnLoc[7].y, SpawnLoc[7].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_5))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - } - m_creature->SummonCreature(NPC_CRUSADER_1_6, SpawnLoc[8].x, SpawnLoc[8].y, SpawnLoc[8].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_1_6))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - } + for(uint8 i = 0; i < crusaderscount; ++i) + { + m_creature->SummonCreature(crusader[i], SpawnLoc[i+2].x, SpawnLoc[i+2].y, SpawnLoc[i+2].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(crusader[i]))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + } + } + pInstance->SetData(TYPE_CRUSADERS_COUNT,crusaderscount); UpdateTimer = 3000; pInstance->SetData(TYPE_EVENT,3095); pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_MAIN_GATE_DOOR)); @@ -885,72 +961,143 @@ struct MANGOS_DLL_DECL npc_tirion_tocAI : public ScriptedAI if (pInstance->GetData(TYPE_DIFFICULTY) == RAID_DIFFICULTY_25MAN_NORMAL || pInstance->GetData(TYPE_DIFFICULTY) == RAID_DIFFICULTY_25MAN_HEROIC) { - pInstance->SetData(TYPE_CRUSADERS_COUNT,12); - - m_creature->SummonCreature(NPC_CRUSADER_2_7, SpawnLoc[9].x, SpawnLoc[9].y, SpawnLoc[9].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_7))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - } - m_creature->SummonCreature(NPC_CRUSADER_2_8, SpawnLoc[10].x, SpawnLoc[10].y, SpawnLoc[10].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_8))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - } - m_creature->SummonCreature(NPC_CRUSADER_2_9, SpawnLoc[11].x, SpawnLoc[11].y, SpawnLoc[11].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_9))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - } - m_creature->SummonCreature(NPC_CRUSADER_2_10, SpawnLoc[12].x, SpawnLoc[12].y, SpawnLoc[12].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_10))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - } - m_creature->SummonCreature(NPC_CRUSADER_0_1, SpawnLoc[13].x, SpawnLoc[13].y, SpawnLoc[13].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_0_1))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - } - m_creature->SummonCreature(NPC_CRUSADER_0_2, SpawnLoc[14].x, SpawnLoc[14].y, SpawnLoc[14].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_0_2))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - } - } - else pInstance->SetData(TYPE_CRUSADERS_COUNT,6); + crusaderscount = 12; + switch (urand(0,3)){ // Healers, 3 in 25-mode + case 0: crusader[0] = NPC_CRUSADER_2_1; + crusader[1] = NPC_CRUSADER_2_12; + crusader[2] = NPC_CRUSADER_2_13; + break; + case 1: crusader[0] = NPC_CRUSADER_2_1; + crusader[1] = NPC_CRUSADER_2_2; + crusader[2] = NPC_CRUSADER_2_13; + break; + case 2: crusader[0] = NPC_CRUSADER_2_1; + crusader[1] = NPC_CRUSADER_2_2; + crusader[2] = NPC_CRUSADER_2_12; + break; + case 3: crusader[0] = NPC_CRUSADER_2_2; + crusader[1] = NPC_CRUSADER_2_12; + crusader[2] = NPC_CRUSADER_2_13; + break; + } + switch (urand(0,5)){ // Random melee DD, 2 in 25-mode + case 0: crusader[3] = NPC_CRUSADER_2_3; + crusader[4] = NPC_CRUSADER_2_4; + break; + case 1: crusader[3] = NPC_CRUSADER_2_3; + crusader[4] = NPC_CRUSADER_2_5; + break; + case 2: crusader[3] = NPC_CRUSADER_2_3; + crusader[4] = NPC_CRUSADER_2_6; + break; + case 3: crusader[3] = NPC_CRUSADER_2_4; + crusader[4] = NPC_CRUSADER_2_5; + break; + case 4: crusader[3] = NPC_CRUSADER_2_4; + crusader[4] = NPC_CRUSADER_2_6; + break; + case 5: crusader[3] = NPC_CRUSADER_2_5; + crusader[4] = NPC_CRUSADER_2_6; + break; + } + + switch (urand(0,3)){ // Random magic DD, 3 in 25-mode + case 0: crusader[5] = NPC_CRUSADER_2_7; + crusader[6] = NPC_CRUSADER_2_8; + crusader[7] = NPC_CRUSADER_2_11; + break; + case 1: crusader[5] = NPC_CRUSADER_2_7; + crusader[6] = NPC_CRUSADER_2_8; + crusader[7] = NPC_CRUSADER_2_14; + break; + case 2: crusader[5] = NPC_CRUSADER_2_8; + crusader[6] = NPC_CRUSADER_2_11; + crusader[7] = NPC_CRUSADER_2_14; + break; + case 3: crusader[5] = NPC_CRUSADER_2_7; + crusader[6] = NPC_CRUSADER_2_11; + crusader[7] = NPC_CRUSADER_2_14; + break; + } + crusader[8] = NPC_CRUSADER_2_9; //Hunter+warlock + crusader[9] = NPC_CRUSADER_2_10; + crusader[10] = NPC_CRUSADER_0_1; + crusader[11] = NPC_CRUSADER_0_2; + + } else { + crusaderscount = 6; + switch (urand(0,5)){ // Healers, 2 in 10-mode + case 0: crusader[0] = NPC_CRUSADER_2_1; + crusader[1] = NPC_CRUSADER_2_12; + break; + case 1: crusader[0] = NPC_CRUSADER_2_1; + crusader[1] = NPC_CRUSADER_2_2; + break; + case 2: crusader[0] = NPC_CRUSADER_2_2; + crusader[1] = NPC_CRUSADER_2_12; + break; + case 3: crusader[0] = NPC_CRUSADER_2_1; + crusader[1] = NPC_CRUSADER_2_13; + break; + case 4: crusader[0] = NPC_CRUSADER_2_2; + crusader[1] = NPC_CRUSADER_2_13; + break; + case 5: crusader[0] = NPC_CRUSADER_2_12; + crusader[1] = NPC_CRUSADER_2_13; + break; + } + switch (urand(0,5)){ // Random melee DD, 2 in 10-mode + case 0: crusader[3] = NPC_CRUSADER_2_3; + crusader[2] = NPC_CRUSADER_2_4; + break; + case 1: crusader[3] = NPC_CRUSADER_2_3; + crusader[2] = NPC_CRUSADER_2_5; + break; + case 2: crusader[3] = NPC_CRUSADER_2_3; + crusader[2] = NPC_CRUSADER_2_6; + break; + case 3: crusader[3] = NPC_CRUSADER_2_4; + crusader[2] = NPC_CRUSADER_2_5; + break; + case 4: crusader[3] = NPC_CRUSADER_2_4; + crusader[2] = NPC_CRUSADER_2_6; + break; + case 5: crusader[3] = NPC_CRUSADER_2_5; + crusader[2] = NPC_CRUSADER_2_6; + break; + } + + switch (urand(0,5)){ // Random magic DD, 2 in 10-mode + case 0: crusader[4] = NPC_CRUSADER_2_7; + crusader[5] = NPC_CRUSADER_2_8; + break; + case 1: crusader[5] = NPC_CRUSADER_2_7; + crusader[4] = NPC_CRUSADER_2_14; + break; + case 2: crusader[5] = NPC_CRUSADER_2_7; + crusader[4] = NPC_CRUSADER_2_11; + break; + case 3: crusader[5] = NPC_CRUSADER_2_8; + crusader[4] = NPC_CRUSADER_2_11; + break; + case 4: crusader[5] = NPC_CRUSADER_2_8; + crusader[4] = NPC_CRUSADER_2_14; + break; + case 5: crusader[5] = NPC_CRUSADER_2_11; + crusader[4] = NPC_CRUSADER_2_14; + break; + } - m_creature->SummonCreature(NPC_CRUSADER_2_1, SpawnLoc[3].x, SpawnLoc[3].y, SpawnLoc[3].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_1))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - } - m_creature->SummonCreature(NPC_CRUSADER_2_2, SpawnLoc[4].x, SpawnLoc[4].y, SpawnLoc[4].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_2))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - } - m_creature->SummonCreature(NPC_CRUSADER_2_3, SpawnLoc[5].x, SpawnLoc[5].y, SpawnLoc[5].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_3))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - } - m_creature->SummonCreature(NPC_CRUSADER_2_4, SpawnLoc[6].x, SpawnLoc[6].y, SpawnLoc[6].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_4))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - } - m_creature->SummonCreature(NPC_CRUSADER_2_5, SpawnLoc[7].x, SpawnLoc[7].y, SpawnLoc[7].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_5))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - } - m_creature->SummonCreature(NPC_CRUSADER_2_6, SpawnLoc[8].x, SpawnLoc[8].y, SpawnLoc[8].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); - if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_CRUSADER_2_6))) { - pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); - pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetInCombatWithZone(); - } + } + for(uint8 i = 0; i < crusaderscount; ++i) + { + m_creature->SummonCreature(crusader[i], SpawnLoc[i+2].x, SpawnLoc[i+2].y, SpawnLoc[i+2].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(crusader[i]))) { + pTemp->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + pTemp->AddSplineFlag(SPLINEFLAG_WALKMODE); + } + } + pInstance->SetData(TYPE_CRUSADERS_COUNT,crusaderscount); UpdateTimer = 3000; pInstance->SetData(TYPE_EVENT,3095); pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_MAIN_GATE_DOOR)); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index 44f062bad..8cbec4177 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -39,27 +39,35 @@ enum NPC_JARAXXUS = 34780, - NPC_CRUSADER_1_1 = 34460, - NPC_CRUSADER_1_2 = 34463, - NPC_CRUSADER_1_3 = 34461, - NPC_CRUSADER_1_4 = 34471, - NPC_CRUSADER_1_5 = 34475, - NPC_CRUSADER_1_6 = 34472, - NPC_CRUSADER_1_7 = 34467, - NPC_CRUSADER_1_8 = 34468, - NPC_CRUSADER_1_9 = 34473, - NPC_CRUSADER_1_10 = 34474, - - NPC_CRUSADER_2_1 = 34453, - NPC_CRUSADER_2_2 = 34455, - NPC_CRUSADER_2_3 = 34458, - NPC_CRUSADER_2_4 = 34454, - NPC_CRUSADER_2_5 = 34451, - NPC_CRUSADER_2_6 = 34456, - NPC_CRUSADER_2_7 = 34441, - NPC_CRUSADER_2_8 = 34449, - NPC_CRUSADER_2_9 = 34448, - NPC_CRUSADER_2_10 = 34450, + NPC_CRUSADER_1_1 = 34460, //Druid + NPC_CRUSADER_1_2 = 34463, //Shaman + NPC_CRUSADER_1_3 = 34461, //DK + NPC_CRUSADER_1_4 = 34472, //Rogue + NPC_CRUSADER_1_5 = 34475, //Warrior + NPC_CRUSADER_1_6 = 34471, //Retro pal + NPC_CRUSADER_1_7 = 34473, //Shadow priest + NPC_CRUSADER_1_8 = 34468, //Mage + NPC_CRUSADER_1_9 = 34467, //Hunter + NPC_CRUSADER_1_10 = 34474, //Warlock + NPC_CRUSADER_1_11 = 34470, //Enh shaman + NPC_CRUSADER_1_12 = 34466, //Priest + NPC_CRUSADER_1_13 = 34465, //Holy paladin + NPC_CRUSADER_1_14 = 34469, //Moonkin + + NPC_CRUSADER_2_1 = 34451, //Druid + NPC_CRUSADER_2_2 = 34455, //Shaman + NPC_CRUSADER_2_3 = 34458, //DK + NPC_CRUSADER_2_4 = 34454, //Rogue + NPC_CRUSADER_2_5 = 34453, //Warrior + NPC_CRUSADER_2_6 = 34456, //Retro pal + NPC_CRUSADER_2_7 = 34441, //Shadow Priest + NPC_CRUSADER_2_8 = 34449, //Mage + NPC_CRUSADER_2_9 = 34448, //Hunter + NPC_CRUSADER_2_10 = 34450, //Warlock + NPC_CRUSADER_2_11 = 34444, //Enh shaman + NPC_CRUSADER_2_12 = 34447, //Priest + NPC_CRUSADER_2_13 = 34445, //Holy paladin + NPC_CRUSADER_2_14 = 34459, //Moonkin NPC_CRUSADER_0_1 = 35465, NPC_CRUSADER_0_2 = 35610, From f11cf20b20c853eec3ce04e7e20fe2e8dff9333c Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sat, 15 May 2010 15:54:02 +0400 Subject: [PATCH 309/405] Valithria && Sindragosa (not finished) --- addition/721_icecrown_mangos.sql | 1 + .../721_icecrown_spelltable_scriptdev2.sql | 12 +- ...rial_of_crusader_spelltable_scriptdev2.sql | 2 +- include/sc_boss_spell_worker.cpp | 13 +- include/sc_boss_spell_worker.h | 3 +- .../boss_twin_valkyr.cpp | 4 +- .../icecrown_citadel/blood_prince_council.cpp | 36 +++- .../icecrown_citadel/boss_festergut.cpp | 2 +- .../boss_lady_deathwhisper.cpp | 1 - .../boss_proffesor_putricide.cpp | 4 +- .../icecrown_citadel/boss_rotface.cpp | 4 +- .../icecrown_citadel/boss_sindragosa.cpp | 170 ++++++++++++++++-- .../boss_valithria_dreamwalker.cpp | 135 +++++++++++--- .../instance_icecrown_spire.cpp | 56 +++--- 14 files changed, 351 insertions(+), 92 deletions(-) diff --git a/addition/721_icecrown_mangos.sql b/addition/721_icecrown_mangos.sql index 685c5a6ce..859ac6a9d 100644 --- a/addition/721_icecrown_mangos.sql +++ b/addition/721_icecrown_mangos.sql @@ -109,6 +109,7 @@ UPDATE `creature_template` SET `ScriptName`='boss_sindragosa' WHERE `entry`= 368 UPDATE `creature_template` SET `ScriptName`='mob_rimefang', `AIName`='' WHERE `entry`= 37533; UPDATE `creature_template` SET `ScriptName`='mob_spinestalker', `AIName`='' WHERE `entry`= 37534; UPDATE `creature_template` SET `ScriptName`='mob_ice_tomb', `AIName`='' WHERE `entry`= 36980; +UPDATE `creature_template` SET `ScriptName`='mob_frost_bomb', `AIName`='' WHERE `entry`= 37186; UPDATE `gameobject_template` SET `faction` = '114',`data0` = '0' WHERE `gameobject_template`.`entry` IN (201369,201379); UPDATE `gameobject` SET `state` = '1' WHERE `id` IN (201369,201379); diff --git a/addition/721_icecrown_spelltable_scriptdev2.sql b/addition/721_icecrown_spelltable_scriptdev2.sql index 45428908e..017fefeaa 100644 --- a/addition/721_icecrown_spelltable_scriptdev2.sql +++ b/addition/721_icecrown_spelltable_scriptdev2.sql @@ -179,6 +179,7 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ (37973, 71718, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), (37973, 71393, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), (37973, 72040, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(37973, 47008, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (37973, 71708, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0); -- Valanar @@ -190,6 +191,7 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ (37970, 72037, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (37970, 38422, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 11, 0, 0), (37970, 71944, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(37970, 47008, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (37970, 72039, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0); -- Keleseth @@ -199,7 +201,8 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ (37972, 71815, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), (37972, 71943, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (37972, 71822, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), -(37970, 38369, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 11, 0, 0); +(37972, 47008, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(37972, 38369, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 11, 0, 0); -- Lanathel DELETE FROM `boss_spell_table` WHERE `entry` = 37955; @@ -247,19 +250,22 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ DELETE FROM `boss_spell_table` WHERE `entry` = 36853; INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES (36853, 70084, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36853, 57764, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 1, 0), (36853, 19983, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 3, 0, 0), (36853, 71007, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 4, 0, 0), (36853, 69649, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 4, 0, 0), (36853, 70107, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 4, 0, 0), (36853, 69762, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 4, 0, 0), (36853, 69766, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 6, 0, 0), +(36853, 69846, 0, 0, 0, 15000, 0, 0, 0, 20000, 0, 0, 0, 10.0, 100.0, 0, 15, 0, 0), (36853, 70117, 0, 0, 0, 20000, 0, 0, 0, 40000, 0, 0, 0, 30.0, 0, 0, 12, 0, 0), (36853, 70123, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36853, 70126, 0, 0, 0, 90000, 0, 0, 0, 90000, 0, 0, 0, 0, 0, 0, 4, 0, 0), -(36853, 70157, 0, 0, 0, 7000, 0, 0, 0, 7000, 0, 0, 0, 0, 0, 0, 6, 0, 0), +(36853, 70157, 0, 0, 0, 6000, 0, 0, 0, 6000, 0, 0, 0, 0, 0, 0, 6, 0, 0), (36853, 71665, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 6, 0, 0), (36853, 71053, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 4, 0, 0), -(36853, 36980, 0, 0, 0, 90000, 0, 0, 0, 90000, 0, 0, 0, 0, 0, 0, 11, 0, 0), +(36853, 36980, 0, 0, 0, 90000, 0, 0, 0, 90000, 0, 0, 0, 0, 0, 0, 9, 0, 0), +(36853, 47008, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36853, 70128, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 30.0, 0, 0, 12, 0, 0); -- Rimefang diff --git a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql index 7ce7a996b..89b2ccf97 100644 --- a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql +++ b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql @@ -124,7 +124,7 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ (34800, 66313, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL), (34800, 66317, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL), (34800, 66318, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL), -(34800, 66406, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 1, 0, NULL), +(34800, 66406, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, NULL), (34800, 66407, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), (34800, 66408, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), (34800, 66636, 0, 0, 0, 15000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 1, 0, NULL); diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index 1c0e6d97d..7e66fa6ab 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -243,10 +243,11 @@ CanCastResult BossSpellWorker::_BSWSpellSelector(uint8 m_uiSpellIdx, Unit* pTarg break; case CAST_ON_RANDOM_POINT: + if (!pTarget) pTarget = boss; if (pSpell->LocData.z <= 1.0f) { float fPosX, fPosY, fPosZ; - boss->GetPosition(fPosX, fPosY, fPosZ); - boss->GetRandomPoint(fPosX, fPosY, fPosZ, urand((uint32)pSpell->LocData.x, (uint32)pSpell->LocData.y), fPosX, fPosY, fPosZ); + pTarget->GetPosition(fPosX, fPosY, fPosZ); + pTarget->GetRandomPoint(fPosX, fPosY, fPosZ, urand((uint32)pSpell->LocData.x, (uint32)pSpell->LocData.y), fPosX, fPosY, fPosZ); boss->CastSpell(fPosX, fPosY, fPosZ, pSpell->m_uiSpellEntry[currentDifficulty], false); return CAST_OK; } else return CAST_FAIL_OTHER; @@ -603,8 +604,11 @@ Unit* BossSpellWorker::_doSelect(uint32 SpellID, bool spellsearchtype, float ran Map::PlayerList const &pList = pMap->GetPlayers(); if (pList.isEmpty()) return NULL; +#if defined( __GNUC__ ) Unit* _list[pMap->GetMaxPlayers()]; - +#else + Unit* _list[INSTANCE_MAX_PLAYERS]; +#endif uint8 _count = 0; memset(&_list, 0, sizeof(_list)); @@ -627,7 +631,8 @@ Unit* BossSpellWorker::_doSelect(uint32 SpellID, bool spellsearchtype, float ran } } debug_log("BSW: search result for random player, count = %u ",_count); - return _list[urand(0,_count)]; + if (_count == 0) return NULL; + else return _list[urand(0,_count)]; }; diff --git a/include/sc_boss_spell_worker.h b/include/sc_boss_spell_worker.h index 0a767eb28..bc49d1515 100644 --- a/include/sc_boss_spell_worker.h +++ b/include/sc_boss_spell_worker.h @@ -16,8 +16,9 @@ enum { DIFFICULTY_LEVELS = 4, - MAX_BOSS_SPELLS = 16, + MAX_BOSS_SPELLS = 32, SPELL_INDEX_ERROR = 255, + INSTANCE_MAX_PLAYERS = 40, }; enum BossSpellFlag diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp index b2f35e5df..7cb471c0d 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp @@ -167,7 +167,7 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI if (bsw->timedQuery(SPELL_LIGHT_TOUCH, uiDiff)) { - if (Unit* pTarget = bsw->SelectRandomPlayer(SPELL_LIGHT_ESSENCE, false, 150.0f)) + if (Unit* pTarget = bsw->SelectRandomPlayer(SPELL_LIGHT_ESSENCE, false, 50.0f)) bsw->doCast(SPELL_LIGHT_TOUCH, pTarget); bsw->doCast(NPC_UNLEASHED_LIGHT); }; @@ -326,7 +326,7 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI if (bsw->timedQuery(SPELL_DARK_TOUCH, uiDiff)) { - if (Unit* pTarget = bsw->SelectRandomPlayer(SPELL_DARK_ESSENCE, false, 150.0f)) + if (Unit* pTarget = bsw->SelectRandomPlayer(SPELL_DARK_ESSENCE, false, 50.0f)) bsw->doCast(SPELL_DARK_TOUCH, pTarget); bsw->doCast(NPC_UNLEASHED_DARK); }; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp index 2f6998072..80fa13baf 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp @@ -26,6 +26,8 @@ EndScriptData */ enum BossSpells { + SPELL_BERSERK = 47008, + //Darkfallen Orb SPELL_INVOCATION_OF_BLOOD = 70952, @@ -79,11 +81,22 @@ struct MANGOS_DLL_DECL boss_valanar_iccAI : public ScriptedAI void MoveInLineOfSight(Unit* pWho) { - if(!m_pInstance || intro) return + if(!m_pInstance || intro) return; m_pInstance->SetData(TYPE_EVENT, 800); intro = true; } + void KilledUnit(Unit* pVictim) + { + switch (urand(0,1)) { + case 0: + DoScriptText(-1631302,m_creature,pVictim); + break; + case 1: + DoScriptText(-1631303,m_creature,pVictim); + break; + } + } void JustReachedHome() { @@ -95,6 +108,7 @@ struct MANGOS_DLL_DECL boss_valanar_iccAI : public ScriptedAI void JustDied(Unit* pKiller) { if (!m_pInstance) return; + DoScriptText(-1631304,m_creature,pKiller); if (pBrother1 && pBrother2 && !pBrother1->isAlive() && !pBrother2->isAlive()) { m_pInstance->SetData(TYPE_BLOOD_COUNCIL, DONE); @@ -105,11 +119,6 @@ struct MANGOS_DLL_DECL boss_valanar_iccAI : public ScriptedAI else m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); } - void KilledUnit(Unit* pVictim) - { - if (!m_pInstance) return; - } - void Aggro(Unit* pWho) { if (!m_pInstance) return; @@ -163,6 +172,11 @@ struct MANGOS_DLL_DECL boss_valanar_iccAI : public ScriptedAI bsw->timedCast(SPELL_SHOCK_VORTEX, uiDiff); + if (bsw->timedQuery(SPELL_BERSERK, uiDiff)){ + bsw->doCast(SPELL_BERSERK); + DoScriptText(-1631305,m_creature); + }; + DoMeleeAttackIfReady(); } }; @@ -274,6 +288,11 @@ struct MANGOS_DLL_DECL boss_taldaram_iccAI : public ScriptedAI bsw->timedCast(SPELL_FLAMES, uiDiff); + if (bsw->timedQuery(SPELL_BERSERK, uiDiff)){ + bsw->doCast(SPELL_BERSERK); + DoScriptText(-1631305,m_creature); + }; + DoMeleeAttackIfReady(); } }; @@ -382,6 +401,11 @@ struct MANGOS_DLL_DECL boss_keleseth_iccAI : public ScriptedAI bsw->timedCast(SPELL_SHADOW_RESONANCE, uiDiff); + if (bsw->timedQuery(SPELL_BERSERK, uiDiff)){ + bsw->doCast(SPELL_BERSERK); + DoScriptText(-1631305,m_creature); + }; + DoMeleeAttackIfReady(); } }; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp index 8f11aad05..ce3edfa01 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp @@ -68,7 +68,7 @@ struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI void MoveInLineOfSight(Unit* pWho) { - if(!pInstance || intro) return + if(!pInstance || intro) return; pInstance->SetData(TYPE_EVENT, 500); intro = true; } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp index dbcb40d05..f168f7749 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp @@ -317,7 +317,6 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI DoScriptText(-1631031,m_creature); }; - DoMeleeAttackIfReady(); } }; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp index 33507019b..1923d180a 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp @@ -86,8 +86,8 @@ struct MANGOS_DLL_DECL boss_proffesor_putricideAI : public ScriptedAI void MoveInLineOfSight(Unit* pWho) { - if(!pInstance || intro) return - DoScriptText(-1631249,m_creature); + if(!pInstance || intro) return; + DoScriptText(-1631249,m_creature, pWho); intro = true; } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp index 81303866c..a3c2b29dd 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp @@ -65,7 +65,7 @@ struct MANGOS_DLL_DECL boss_rotfaceAI : public ScriptedAI void MoveInLineOfSight(Unit* pWho) { - if(!pInstance || intro) return + if(!pInstance || intro) return; pInstance->SetData(TYPE_EVENT, 600); intro = true; } @@ -93,7 +93,7 @@ struct MANGOS_DLL_DECL boss_rotfaceAI : public ScriptedAI { if(!pInstance) return; pInstance->SetData(TYPE_ROTFACE, DONE); - DoScriptText(-1631224,m_creature); + DoScriptText(-1631224,m_creature, killer); } void UpdateAI(const uint32 diff) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp index 45612806a..ace358c80 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp @@ -41,10 +41,15 @@ enum BossSpells SPELL_ICY_TOMB = 70157, SPELL_ASPHYXATION = 71665, SPELL_FROST_BOMB = 71053, - + SPELL_FROST_BOMB_TRIGGER = 69846, + SPELL_ICE_TOMB_TRIGGER = 69675, SPELL_MYSTIC_BUFFET = 70128, NPC_ICE_TOMB = 36980, + NPC_FROST_BOMB = 37186, + + SPELL_FLY_VISUAL = 57764, + SPELL_BERSERK = 47008, // Rimefang SPELL_FROST_AURA = 71387, @@ -59,6 +64,8 @@ enum BossSpells static Locations SpawnLoc[]= { {4408.052734f, 2484.825439f, 203.374207f}, // 0 Sindragosa spawn + {4474.239746f, 2484.243896f, 231.0f}, // 1 Sindragosa fly o=3.11 + {4474.239746f, 2484.243896f, 203.380402f}, // 2 Sindragosa fly - ground point o=3.11 }; struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI @@ -73,8 +80,10 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI ScriptedInstance *pInstance; BossSpellWorker* bsw; uint8 stage; - Unit* pTarget1; - Unit* pTarget2; + Map* pMap; + uint8 Difficulty; + uint8 icecount; + bool MovementStarted; void Reset() { @@ -82,6 +91,25 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI bsw->resetTimers(); stage = 0; m_creature->SetRespawnDelay(7*DAY); + pMap = m_creature->GetMap(); + Difficulty = pMap->GetDifficulty(); + switch (Difficulty) { + case RAID_DIFFICULTY_10MAN_NORMAL: + icecount = 2; + break; + case RAID_DIFFICULTY_10MAN_HEROIC: + icecount = 2; + break; + case RAID_DIFFICULTY_25MAN_NORMAL: + icecount = 5; + break; + case RAID_DIFFICULTY_25MAN_HEROIC: + icecount = 5; + break; + default: + icecount = 2; + break; + } } void KilledUnit(Unit* pVictim) @@ -122,6 +150,50 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI DoScriptText(-1631423,m_creature,killer); } + void MovementInform(uint32 type, uint32 id) + { + if (!pInstance) return; + if (type != POINT_MOTION_TYPE || !MovementStarted) return; + + if (id == 1) { + m_creature->GetMotionMaster()->MovementExpired(); + MovementStarted = false; + } + } + + void IceMark() + { + for (uint8 i = 1; i <= icecount; i++) + if (Unit* pTemp = bsw->SelectRandomPlayer(SPELL_FROST_BEACON, false, 200.0f)) + bsw->doCast(SPELL_FROST_BEACON, pTemp); + } + + void IceBlock() + { + for (uint8 i = 1; i <= icecount; i++) + if (Unit* pTemp = bsw->SelectRandomPlayer(SPELL_FROST_BEACON, true, 200.0f)) + bsw->doCast(SPELL_ICY_TOMB, pTemp); + + Map::PlayerList const &pList = pMap->GetPlayers(); + if (pList.isEmpty()) return; + + for(Map::PlayerList::const_iterator i = pList.begin(); i != pList.end(); ++i) + { + if (Player* player = i->getSource()) + { + if (player->isGameMaster()) continue; + + if (player->isAlive() && (player->HasAura(SPELL_ICY_TOMB))) + { + float fPosX, fPosY, fPosZ; + player->GetPosition(fPosX, fPosY, fPosZ); + if (Unit* pTemp = bsw->doSummon(NPC_ICE_TOMB,fPosX, fPosY, fPosZ)) + pTemp->AddThreat(player, 100.0f); + }; + }; + }; + } + void UpdateAI(const uint32 diff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -144,24 +216,46 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI } if (bsw->timedQuery(SPELL_FROST_BEACON, diff) && m_creature->GetHealthPercent() < 85.0f) stage = 1; + if (m_creature->GetHealthPercent() < 35.0f) + { + bsw->doCast(SPELL_MYSTIC_BUFFET); + stage = 4; + DoScriptText(-1631429,m_creature); + } break; case 1: DoScriptText(-1631425,m_creature); - bsw->doCast(SPELL_FROST_BEACON); + IceMark(); stage = 2; + MovementStarted = true; + SetCombatMovement(false); + bsw->doCast(SPELL_FLY_VISUAL); + m_creature->GetMotionMaster()->MovePoint(1, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); break; case 2: - bsw->timedCast(SPELL_ICY_TOMB, diff); - bsw->timedCast(SPELL_FROST_BOMB, diff); - if (bsw->timedQuery(SPELL_FROST_BEACON, diff)) stage = 0; + if (bsw->timedQuery(SPELL_ICY_TOMB, diff)) { + stage = 3; + IceBlock(); + }; break; case 3: + if (bsw->timedQuery(SPELL_FROST_BOMB, diff)) + if (Unit* pTemp = bsw->SelectRandomPlayerAtRange(250.0f)) + bsw->doCast(SPELL_FROST_BOMB_TRIGGER, pTemp); + + if (bsw->timedQuery(SPELL_FROST_BEACON, diff)) { + stage = 0; + SetCombatMovement(true); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + bsw->doRemove(SPELL_FLY_VISUAL); + } + break; + case 4: bsw->timedCast(SPELL_CLEAVE_1, diff); bsw->timedCast(SPELL_TAIL_SMASH, diff); bsw->timedCast(SPELL_FROST_BREATH, diff); bsw->timedCast(SPELL_PERMEATING_CHILL, diff); bsw->timedCast(SPELL_UNCHAINED_MAGIC, diff); - bsw->timedCast(SPELL_MYSTIC_BUFFET, diff); if (bsw->timedQuery(SPELL_ICY_GRIP, diff)) { bsw->doCast(SPELL_ICY_GRIP); @@ -172,12 +266,11 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI default: break; } - if (m_creature->GetHealthPercent() < 35.0f) - { - stage = 3; - DoScriptText(-1631429,m_creature); - } - + if (bsw->timedQuery(SPELL_BERSERK, diff)) + { + bsw->doCast(SPELL_BERSERK); + DoScriptText(-1631424,m_creature); + }; DoMeleeAttackIfReady(); } @@ -203,7 +296,6 @@ struct MANGOS_DLL_DECL mob_ice_tombAI : public ScriptedAI void Reset() { SetCombatMovement(false); - m_creature->SetInCombatWithZone(); pVictim = NULL; } @@ -248,6 +340,49 @@ CreatureAI* GetAI_mob_ice_tomb(Creature* pCreature) return new mob_ice_tombAI(pCreature); } +struct MANGOS_DLL_DECL mob_frost_bombAI : public ScriptedAI +{ + mob_frost_bombAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + Reset(); + } + + ScriptedInstance *m_pInstance; + uint32 boom_timer; + + void Reset() + { + SetCombatMovement(false); + boom_timer = 5000; + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + } + + void AttackStart(Unit *pWho) + { + return; + } + + void UpdateAI(const uint32 uiDiff) + { + if(m_pInstance && m_pInstance->GetData(TYPE_SINDRAGOSA) != IN_PROGRESS) + m_creature->ForcedDespawn(); + + if (boom_timer <= uiDiff) + { + m_creature->CastSpell(m_creature, SPELL_FROST_BOMB, true); + m_creature->ForcedDespawn(); + } + else boom_timer -= uiDiff; + } + +}; + +CreatureAI* GetAI_mob_frost_bomb(Creature* pCreature) +{ + return new mob_frost_bombAI(pCreature); +} + struct MANGOS_DLL_DECL mob_rimefangAI : public ScriptedAI { mob_rimefangAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -396,4 +531,9 @@ void AddSC_boss_sindragosa() newscript->GetAI = &GetAI_mob_ice_tomb; newscript->RegisterSelf(); + newscript = new Script; + newscript->Name = "mob_frost_bomb"; + newscript->GetAI = &GetAI_mob_frost_bomb; + newscript->RegisterSelf(); + } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp index 19a628877..f0358b52b 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp @@ -27,9 +27,9 @@ EndScriptData */ static Locations SpawnLoc[]= { {4203.470215f, 2484.500000f, 364.872009f}, // 0 Valithria - {4240.688477f, 2405.794678f, 364.868591f}, // 1 Valithria Room 1 - {4165.112305f, 2405.872559f, 364.872925f}, // 2 Valithria Room 2 - {4166.216797f, 2564.197266f, 364.873047f}, // 3 Valithria Room 3 + {4166.216797f, 2564.197266f, 364.873047f}, // 1 Valithria Room 1 + {4240.688477f, 2405.794678f, 364.868591f}, // 2 Valithria Room 2 + {4165.112305f, 2405.872559f, 364.872925f}, // 3 Valithria Room 3 {4239.579102f, 2566.753418f, 364.868439f}, // 4 Valithria Room 4 {4228.589844f, 2469.110107f, 364.868988f}, // 5 Mob 1 {4236.000000f, 2479.500000f, 364.869995f}, // 6 Mob 2 @@ -76,9 +76,12 @@ struct MANGOS_DLL_DECL boss_valithria_dreamwalkerAI : public ScriptedAI bool battlestarted; bool intro; uint8 currentDoor; + uint8 currentDoor2; int8 portalscount; Map* pMap; - + std::list mobsGUIDList; + uint8 Difficulty; + uint32 speedK; void Reset() { @@ -88,12 +91,16 @@ struct MANGOS_DLL_DECL boss_valithria_dreamwalkerAI : public ScriptedAI bsw->resetTimers(); m_creature->SetRespawnDelay(7*DAY); bsw->doCast(SPELL_CORRUPTION); - bsw->doCast(SPELL_IMMUNITY); + SetCombatMovement(false); stage = 0; + speedK = 0; portalscount = 0; battlestarted = false; intro = false; currentDoor = 0; + currentDoor2 = 0; + mobsGUIDList.clear(); + Difficulty = pMap->GetDifficulty(); if (Unit* pTemp = Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_VALITHRIA_QUEST))) if (pTemp->GetVisibility() == VISIBILITY_ON) pTemp->SetVisibility(VISIBILITY_OFF); @@ -138,23 +145,68 @@ struct MANGOS_DLL_DECL boss_valithria_dreamwalkerAI : public ScriptedAI pGo->SetGoState(GO_STATE_READY); } + void CallMobs(uint8 door) + { + if(!door) return; + uint8 mobs; + uint32 randommob; + + switch (Difficulty) { + case RAID_DIFFICULTY_10MAN_NORMAL: + mobs = urand(1,3); + break; + case RAID_DIFFICULTY_10MAN_HEROIC: + mobs = urand(2,4); + break; + case RAID_DIFFICULTY_25MAN_NORMAL: + mobs = urand(2,5); + break; + case RAID_DIFFICULTY_25MAN_HEROIC: + mobs = urand(3,5); + break; + default: + mobs = urand(1,5); + break; + } + + for(uint8 i = 0; i <= mobs; ++i) + { + switch (urand(0,4)) { + case 0: randommob = NPC_RISEN_ARCHMAGE; break; + case 1: randommob = NPC_SUPPRESSOR; break; + case 2: randommob = NPC_BLASING_SKELETON; break; + case 3: randommob = NPC_BLISTERING_ZOMBIE; break; + case 4: randommob = NPC_GLUTTONOUS_ABOMINATION;break; + default: randommob = NPC_RISEN_ARCHMAGE; break; + } + if (Creature* pTemp = m_creature->SummonCreature(randommob, SpawnLoc[door].x, SpawnLoc[door].y, SpawnLoc[door].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME)) + mobsGUIDList.push_back(pTemp->GetGUID()); + } + } + void QueryEvadeMode() { + + if ( m_creature->GetHealthPercent() > 1.0f ) { Map::PlayerList const &players = pMap->GetPlayers(); for (Map::PlayerList::const_iterator i = players.begin(); i != players.end(); ++i) { if(Player* pPlayer = i->getSource()) - if(pPlayer->isAlive() && pPlayer->IsWithinDistInMap(m_creature, 100.0f)) return; + if(pPlayer->isAlive() && !pPlayer->isGameMaster() + && pPlayer->IsWithinDistInMap(m_creature, 90.0f)) return; } - + } pInstance->SetData(TYPE_VALITHRIA, FAIL); DoScriptText(-1631409,m_creature); + DespawnMobs(); m_creature->DeleteThreatList(); m_creature->CombatStop(true); m_creature->LoadCreaturesAddon(); if (m_creature->isAlive()) m_creature->GetMotionMaster()->MoveTargetedHome(); m_creature->SetLootRecipient(NULL); + CloseDoor(GetDoor(currentDoor)); + CloseDoor(GetDoor(currentDoor2)); Reset(); } @@ -162,11 +214,14 @@ struct MANGOS_DLL_DECL boss_valithria_dreamwalkerAI : public ScriptedAI { if (!pInstance || ( intro && battlestarted)) return; + if (pWho->GetTypeId() != TYPEID_PLAYER) return; + if (!intro) { DoScriptText(-1631401,m_creature,pWho); intro = true; + bsw->doCast(SPELL_IMMUNITY); } - if (!battlestarted && pWho->isAlive() && pWho->IsWithinDistInMap(m_creature, 20.0f)) { + if (!battlestarted && pWho->isAlive() && pWho->IsWithinDistInMap(m_creature, 15.0f)) { DoScriptText(-1631401,m_creature,pWho); battlestarted = true; pInstance->SetData(TYPE_VALITHRIA, IN_PROGRESS); @@ -191,12 +246,29 @@ struct MANGOS_DLL_DECL boss_valithria_dreamwalkerAI : public ScriptedAI { if(!pInstance || !summoned || !battlestarted) return; - if ( summoned->GetEntry() == NPC_NIGHTMARE_PORTAL ) return; + if ( summoned->GetEntry() != NPC_NIGHTMARE_PORTAL ) { + summoned->AddThreat(m_creature, 100.0f); + summoned->GetMotionMaster()->MoveChase(m_creature); + } - summoned->AddThreat(m_creature, 100.0f); + } - m_creature->GetMotionMaster()->MoveChase(m_creature); + void DespawnMobs() + { + if (mobsGUIDList.empty()) + return; + for(std::list::iterator itr = mobsGUIDList.begin(); itr != mobsGUIDList.end(); ++itr) + { + if (Creature* pTemp = (Creature*)Unit::GetUnit(*m_creature, *itr)) + if (pTemp->isAlive()) { + pTemp->DeleteThreatList(); + pTemp->CombatStop(true); + pTemp->DealDamage(pTemp, pTemp->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + pTemp->ForcedDespawn(); + } + } + mobsGUIDList.clear(); } void JustDied(Unit *killer) @@ -204,10 +276,19 @@ struct MANGOS_DLL_DECL boss_valithria_dreamwalkerAI : public ScriptedAI if(!pInstance) return pInstance->SetData(TYPE_VALITHRIA, FAIL); DoScriptText(-1631409,m_creature); + DespawnMobs(); m_creature->Respawn(); Reset(); } + void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + { + if (!m_creature || !m_creature->isAlive()) + return; + + if (uiDamage >= m_creature->GetHealth()) uiDamage = 0; + } + void AttackStart(Unit *who) { //ignore all attackstart commands @@ -229,7 +310,6 @@ struct MANGOS_DLL_DECL boss_valithria_dreamwalkerAI : public ScriptedAI case 1: if ( m_creature->GetHealthPercent() < 90.0f && m_creature->GetHealthPercent() > 10.0f ) stage = 0; if ( m_creature->GetHealthPercent() > 99.9f ) stage = 5; - if ( m_creature->GetHealthPercent() < 1.0f ) stage = 4; break; case 2: DoScriptText(-1631407,m_creature); @@ -240,18 +320,6 @@ struct MANGOS_DLL_DECL boss_valithria_dreamwalkerAI : public ScriptedAI stage = 1; break; case 4: - DoScriptText(-1631409,m_creature); - stage = 1; - pInstance->SetData(TYPE_VALITHRIA, FAIL); - DoScriptText(-1631409,m_creature); - m_creature->DeleteThreatList(); - m_creature->CombatStop(true); - m_creature->LoadCreaturesAddon(); - - if (m_creature->isAlive()) - m_creature->GetMotionMaster()->MoveTargetedHome(); - m_creature->SetLootRecipient(NULL); - Reset(); break; case 5: DoScriptText(-1631408,m_creature); @@ -289,11 +357,26 @@ struct MANGOS_DLL_DECL boss_valithria_dreamwalkerAI : public ScriptedAI } - if (bsw->timedQuery(NPC_RISEN_ARCHMAGE, diff)) { + if (bsw->timedQuery(NPC_RISEN_ARCHMAGE, (uint32)(diff + diff*(speedK/100)))) { + if (urand(0,1) == 1) DoScriptText(-1631402,m_creature); + speedK = speedK+10; + if (Difficulty == RAID_DIFFICULTY_25MAN_NORMAL + || Difficulty == RAID_DIFFICULTY_25MAN_HEROIC) { + CloseDoor(GetDoor(currentDoor2)); + currentDoor2 = urand(1,2); + OpenDoor(GetDoor(currentDoor2)); + CallMobs(currentDoor2); + + CloseDoor(GetDoor(currentDoor)); + currentDoor = urand(3,4); + OpenDoor(GetDoor(currentDoor)); + CallMobs(currentDoor); + } else { CloseDoor(GetDoor(currentDoor)); currentDoor = urand(1,4); OpenDoor(GetDoor(currentDoor)); - DoScriptText(-1631402,m_creature); + CallMobs(currentDoor); + } }; if (bsw->timedQuery(SPELL_NIGHTMARE_PORTAL, diff) || portalscount > 0) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp index e240b43a9..e6dab9f02 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp @@ -125,12 +125,12 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance OpenDoor(m_uiCounsilDoor1GUID); OpenDoor(m_uiCounsilDoor2GUID); } -// if (m_auiEncounter[9] == DONE) OpenDoor(m_uiFrostwingDoorGUID); -// if (m_auiEncounter[10] == DONE) OpenDoor(m_uiValithriaDoor2GUID); -// if (m_auiEncounter[11] == DONE) { -// OpenDoor(m_uiSindragosaDoor2GUID); -// OpenDoor(m_uiSindragosaDoor1GUID); -// } + if (m_auiEncounter[9] == DONE) OpenDoor(m_uiFrostwingDoorGUID); + if (m_auiEncounter[10] == DONE) OpenDoor(m_uiValithriaDoor2GUID); + if (m_auiEncounter[11] == DONE) { + OpenDoor(m_uiSindragosaDoor2GUID); + OpenDoor(m_uiSindragosaDoor1GUID); + } } @@ -463,7 +463,7 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance break; case TYPE_LANATHEL: m_auiEncounter[9] = uiData; -// if (uiData == DONE) OpenDoor(m_uiFrostwingDoorGUID); + if (uiData == DONE) OpenDoor(m_uiFrostwingDoorGUID); break; case TYPE_VALITHRIA: m_auiEncounter[10] = uiData; @@ -544,27 +544,27 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance case TYPE_EVENT: return m_auiEvent; case TYPE_EVENT_TIMER: return m_auiEventTimer; case TYPE_EVENT_NPC: switch (m_auiEvent) - { - case 1: - return NPC_TIRION; - break; - - case 2: - return NPC_LICH_KING; - break; - - case 500: - case 600: - return NPC_PROFESSOR_PUTRICIDE; - break; - - case 800: - return NPC_LANATHEL; - break; - - default: - break; - }; + { + case 1: + return NPC_TIRION; + break; + + case 2: + return NPC_LICH_KING; + break; + + case 500: + case 600: + return NPC_PROFESSOR_PUTRICIDE; + break; + + case 800: + return NPC_LANATHEL; + break; + + default: + break; + }; } return 0; From f47780b1a90442f9f337eddc5673cd8e0493a217 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sat, 15 May 2010 18:33:12 +0400 Subject: [PATCH 310/405] Continued work for Sindragosa && Valithria --- .../721_icecrown_spelltable_scriptdev2.sql | 4 +- include/sc_boss_spell_worker.cpp | 7 +-- include/sc_boss_spell_worker.h | 1 - .../icecrown_citadel/boss_sindragosa.cpp | 47 +++++++++++++------ 4 files changed, 39 insertions(+), 20 deletions(-) diff --git a/addition/721_icecrown_spelltable_scriptdev2.sql b/addition/721_icecrown_spelltable_scriptdev2.sql index 017fefeaa..ef463d621 100644 --- a/addition/721_icecrown_spelltable_scriptdev2.sql +++ b/addition/721_icecrown_spelltable_scriptdev2.sql @@ -252,13 +252,13 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ (36853, 70084, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36853, 57764, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 1, 0), (36853, 19983, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 3, 0, 0), -(36853, 71007, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(36853, 71077, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 4, 0, 0), (36853, 69649, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 4, 0, 0), (36853, 70107, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 4, 0, 0), (36853, 69762, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 4, 0, 0), (36853, 69766, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 6, 0, 0), (36853, 69846, 0, 0, 0, 15000, 0, 0, 0, 20000, 0, 0, 0, 10.0, 100.0, 0, 15, 0, 0), -(36853, 70117, 0, 0, 0, 20000, 0, 0, 0, 40000, 0, 0, 0, 30.0, 0, 0, 12, 0, 0), +(36853, 70117, 0, 0, 0, 20000, 0, 0, 0, 40000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36853, 70123, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36853, 70126, 0, 0, 0, 90000, 0, 0, 0, 90000, 0, 0, 0, 0, 0, 0, 4, 0, 0), (36853, 70157, 0, 0, 0, 6000, 0, 0, 0, 6000, 0, 0, 0, 0, 0, 0, 6, 0, 0), diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index 7e66fa6ab..8eeca6974 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -478,10 +478,11 @@ bool BossSpellWorker::_doAura(uint8 m_uiSpellIdx, Unit* pTarget, SpellEffectInde debug_log("BSW: adding aura from spell %u index %u",pSpell->m_uiSpellEntry[currentDifficulty], index); - if (spell = (SpellEntry *)GetSpellStore()->LookupEntry(pSpell->m_uiSpellEntry[currentDifficulty])) + if (spell = (SpellEntry *)GetSpellStore()->LookupEntry(pSpell->m_uiSpellEntry[currentDifficulty])) if (pTarget->AddAura(new BossAura(spell, index, &pSpell->varData, pTarget, pTarget))) - return true; - else return false; + return true; + + return false; }; diff --git a/include/sc_boss_spell_worker.h b/include/sc_boss_spell_worker.h index bc49d1515..36411d594 100644 --- a/include/sc_boss_spell_worker.h +++ b/include/sc_boss_spell_worker.h @@ -173,7 +173,6 @@ class MANGOS_DLL_DECL BossSpellWorker return _doSelect(0, false, range); }; - Unit* doSummon(uint32 SpellID, float fPosX, float fPosY, float fPosZ, TempSummonType type = TEMPSUMMON_CORPSE_TIMED_DESPAWN, uint32 delay = 60000) { return _doSummonAtPosition(FindSpellIDX(SpellID), type, delay, fPosX, fPosY, fPosZ); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp index ace358c80..cccee5e40 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp @@ -161,6 +161,25 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI } } + void doBlisteringCold() + { + bsw->doCast(SPELL_ICY_GRIP); + + Map::PlayerList const &pList = pMap->GetPlayers(); + if (pList.isEmpty()) return; + + for (Map::PlayerList::const_iterator i = pList.begin(); i != pList.end(); ++i) + if (Player* player = i->getSource()) + if ( player->isAlive()) + { + float fPosX, fPosY, fPosZ; + m_creature->GetPosition(fPosX, fPosY, fPosZ); + m_creature->GetRandomPoint(fPosX, fPosY, fPosZ, 1.0f, fPosX, fPosY, fPosZ); + player->NearTeleportTo(fPosX, fPosX, fPosX, 0.0f); + } + bsw->doCast(SPELL_BLISTERING_COLD); + } + void IceMark() { for (uint8 i = 1; i <= icecount; i++) @@ -172,7 +191,10 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI { for (uint8 i = 1; i <= icecount; i++) if (Unit* pTemp = bsw->SelectRandomPlayer(SPELL_FROST_BEACON, true, 200.0f)) - bsw->doCast(SPELL_ICY_TOMB, pTemp); + { + bsw->doCast(SPELL_ICY_TOMB, pTemp); + pTemp->RemoveAurasDueToSpell(SPELL_FROST_BEACON); + }; Map::PlayerList const &pList = pMap->GetPlayers(); if (pList.isEmpty()) return; @@ -181,14 +203,12 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI { if (Player* player = i->getSource()) { - if (player->isGameMaster()) continue; - - if (player->isAlive() && (player->HasAura(SPELL_ICY_TOMB))) + if ( player->isAlive() && (player->HasAura(SPELL_ICY_TOMB)) ) { - float fPosX, fPosY, fPosZ; - player->GetPosition(fPosX, fPosY, fPosZ); - if (Unit* pTemp = bsw->doSummon(NPC_ICE_TOMB,fPosX, fPosY, fPosZ)) - pTemp->AddThreat(player, 100.0f); + float fPosX, fPosY, fPosZ; + player->GetPosition(fPosX, fPosY, fPosZ); + if (Unit* pTemp = bsw->doSummon(NPC_ICE_TOMB,fPosX, fPosY, fPosZ)) + pTemp->AddThreat(player, 100.0f); }; }; }; @@ -204,15 +224,15 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI case 0: bsw->timedCast(SPELL_CLEAVE_1, diff); bsw->timedCast(SPELL_TAIL_SMASH, diff); - bsw->timedCast(SPELL_FROST_BREATH, diff); + bsw->timedCast(SPELL_FROST_BREATH_1, diff); bsw->timedCast(SPELL_PERMEATING_CHILL, diff); bsw->timedCast(SPELL_UNCHAINED_MAGIC, diff); + if (bsw->timedQuery(SPELL_ICY_GRIP, diff)) { - bsw->doCast(SPELL_ICY_GRIP); - bsw->doCast(SPELL_BLISTERING_COLD); DoScriptText(-1631426,m_creature); + doBlisteringCold(); } if (bsw->timedQuery(SPELL_FROST_BEACON, diff) && m_creature->GetHealthPercent() < 85.0f) stage = 1; @@ -253,14 +273,13 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI case 4: bsw->timedCast(SPELL_CLEAVE_1, diff); bsw->timedCast(SPELL_TAIL_SMASH, diff); - bsw->timedCast(SPELL_FROST_BREATH, diff); + bsw->timedCast(SPELL_FROST_BREATH_1, diff); bsw->timedCast(SPELL_PERMEATING_CHILL, diff); bsw->timedCast(SPELL_UNCHAINED_MAGIC, diff); if (bsw->timedQuery(SPELL_ICY_GRIP, diff)) { - bsw->doCast(SPELL_ICY_GRIP); - bsw->doCast(SPELL_BLISTERING_COLD); DoScriptText(-1631426,m_creature); + doBlisteringCold(); } break; default: break; From 8b473c4fbef2daea2348d7676721f60396c46d6a Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sun, 16 May 2010 01:39:22 +0400 Subject: [PATCH 311/405] Sindragosa && Valithria draft finished. --- .../721_icecrown_spelltable_scriptdev2.sql | 20 ++-- .../icecrown_citadel/blood_prince_council.cpp | 4 +- .../icecrown_citadel/boss_festergut.cpp | 2 + .../icecrown_citadel/boss_rotface.cpp | 2 + .../icecrown_citadel/boss_sindragosa.cpp | 100 ++++++++++++++---- .../boss_valithria_dreamwalker.cpp | 5 +- .../instance_icecrown_spire.cpp | 2 +- 7 files changed, 97 insertions(+), 38 deletions(-) diff --git a/addition/721_icecrown_spelltable_scriptdev2.sql b/addition/721_icecrown_spelltable_scriptdev2.sql index ef463d621..9dcdea493 100644 --- a/addition/721_icecrown_spelltable_scriptdev2.sql +++ b/addition/721_icecrown_spelltable_scriptdev2.sql @@ -236,11 +236,11 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ -- summons INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMax_N10`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType` ) VALUES (36789, 38429, 30000, 40000, 1, 1, 1, 1, 5, 70, 0, 9), -(36789, 37868, 30000, 40000, 1, 1, 1, 1, 2, 5, 0, 9), -(36789, 37863, 30000, 40000, 1, 1, 1, 1, 2, 5, 0, 9), -(36789, 36791, 30000, 40000, 1, 1, 1, 1, 2, 5, 0, 9), -(36789, 37934, 30000, 40000, 1, 1, 1, 1, 2, 5, 0, 9), -(36789, 37886, 30000, 40000, 1, 1, 1, 1, 2, 5, 0, 9); +(36789, 37868, 30000, 45000, 1, 1, 1, 1, 1, 3, 0, 11), +(36789, 37863, 30000, 45000, 1, 1, 1, 1, 1, 3, 0, 11), +(36789, 36791, 30000, 45000, 1, 1, 1, 1, 1, 3, 0, 11), +(36789, 37934, 30000, 45000, 1, 1, 1, 1, 1, 3, 0, 11), +(36789, 37886, 30000, 45000, 1, 1, 1, 1, 1, 3, 0, 11); -- Nightmare portal DELETE FROM `boss_spell_table` WHERE `entry` = 38429; INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES @@ -253,13 +253,13 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ (36853, 57764, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 1, 0), (36853, 19983, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 3, 0, 0), (36853, 71077, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 4, 0, 0), -(36853, 69649, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(36853, 69649, 0, 0, 0, 20000, 0, 0, 0, 35000, 0, 0, 0, 0, 0, 0, 4, 0, 0), (36853, 70107, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 4, 0, 0), -(36853, 69762, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(36853, 69762, 0, 0, 0, 10000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 4, 0, 0), (36853, 69766, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 6, 0, 0), -(36853, 69846, 0, 0, 0, 15000, 0, 0, 0, 20000, 0, 0, 0, 10.0, 100.0, 0, 15, 0, 0), -(36853, 70117, 0, 0, 0, 20000, 0, 0, 0, 40000, 0, 0, 0, 0, 0, 0, 1, 0, 0), -(36853, 70123, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36853, 69846, 0, 0, 0, 15000, 0, 0, 0, 20000, 0, 0, 0, 50.0, 100.0, 0, 15, 0, 0), +(36853, 70117, 0, 0, 0, 30000, 0, 0, 0, 40000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36853, 70123, 0, 0, 0, 20000, 0, 0, 0, 35000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36853, 70126, 0, 0, 0, 90000, 0, 0, 0, 90000, 0, 0, 0, 0, 0, 0, 4, 0, 0), (36853, 70157, 0, 0, 0, 6000, 0, 0, 0, 6000, 0, 0, 0, 0, 0, 0, 6, 0, 0), (36853, 71665, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 6, 0, 0), diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp index 80fa13baf..6f28e1189 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp @@ -72,7 +72,8 @@ struct MANGOS_DLL_DECL boss_valanar_iccAI : public ScriptedAI Creature* pBrother2; bool intro; - void Reset() { + void Reset() + { if(!m_pInstance) return; m_pInstance->SetData(DATA_BLOOD_COUNCIL_HEALTH, m_creature->GetMaxHealth()*3); stage = 0; @@ -82,6 +83,7 @@ struct MANGOS_DLL_DECL boss_valanar_iccAI : public ScriptedAI void MoveInLineOfSight(Unit* pWho) { if(!m_pInstance || intro) return; + if (pWho->GetTypeId() != TYPEID_PLAYER) return; m_pInstance->SetData(TYPE_EVENT, 800); intro = true; } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp index ce3edfa01..a6a563427 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp @@ -69,6 +69,8 @@ struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI void MoveInLineOfSight(Unit* pWho) { if(!pInstance || intro) return; + if (pWho->GetTypeId() != TYPEID_PLAYER) return; + pInstance->SetData(TYPE_EVENT, 500); intro = true; } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp index a3c2b29dd..eef050ff0 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp @@ -66,6 +66,8 @@ struct MANGOS_DLL_DECL boss_rotfaceAI : public ScriptedAI void MoveInLineOfSight(Unit* pWho) { if(!pInstance || intro) return; + if (pWho->GetTypeId() != TYPEID_PLAYER) return; + pInstance->SetData(TYPE_EVENT, 600); intro = true; } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp index cccee5e40..adc6d1662 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp @@ -42,6 +42,8 @@ enum BossSpells SPELL_ASPHYXATION = 71665, SPELL_FROST_BOMB = 71053, SPELL_FROST_BOMB_TRIGGER = 69846, + SPELL_FROST_BOMB_VISUAL = 64624, + SPELL_FROST_BOMB_VISUAL2 = 69016, SPELL_ICE_TOMB_TRIGGER = 69675, SPELL_MYSTIC_BUFFET = 70128, @@ -84,12 +86,15 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI uint8 Difficulty; uint8 icecount; bool MovementStarted; + Unit* marked[5]; void Reset() { if(!pInstance) return; bsw->resetTimers(); stage = 0; + memset(&marked, 0, sizeof(marked)); + m_creature->SetRespawnDelay(7*DAY); pMap = m_creature->GetMap(); Difficulty = pMap->GetDifficulty(); @@ -170,33 +175,39 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI for (Map::PlayerList::const_iterator i = pList.begin(); i != pList.end(); ++i) if (Player* player = i->getSource()) - if ( player->isAlive()) + if (player->isAlive() && player->IsWithinDistInMap(m_creature, 30.0f)) { float fPosX, fPosY, fPosZ; m_creature->GetPosition(fPosX, fPosY, fPosZ); m_creature->GetRandomPoint(fPosX, fPosY, fPosZ, 1.0f, fPosX, fPosY, fPosZ); - player->NearTeleportTo(fPosX, fPosX, fPosX, 0.0f); + player->NearTeleportTo(fPosX, fPosY, fPosZ+1.0f, (float)(urand(0,6)), true); } bsw->doCast(SPELL_BLISTERING_COLD); } void IceMark() { - for (uint8 i = 1; i <= icecount; i++) - if (Unit* pTemp = bsw->SelectRandomPlayer(SPELL_FROST_BEACON, false, 200.0f)) - bsw->doCast(SPELL_FROST_BEACON, pTemp); + memset(&marked, 0, sizeof(marked)); + + for (uint8 i = 0; i < icecount; i++) + if (marked[i] = bsw->SelectRandomPlayer(SPELL_FROST_BEACON, false, 200.0f)) + bsw->doCast(SPELL_FROST_BEACON, marked[i]); } void IceBlock() { - for (uint8 i = 1; i <= icecount; i++) - if (Unit* pTemp = bsw->SelectRandomPlayer(SPELL_FROST_BEACON, true, 200.0f)) - { - bsw->doCast(SPELL_ICY_TOMB, pTemp); - pTemp->RemoveAurasDueToSpell(SPELL_FROST_BEACON); - }; - - Map::PlayerList const &pList = pMap->GetPlayers(); + for (uint8 i = 0; i < icecount; i++) + if (marked[i] && marked[i]->isAlive()) + { + bsw->doCast(SPELL_ICY_TOMB, marked[i]); + marked[i]->RemoveAurasDueToSpell(SPELL_FROST_BEACON); + float fPosX, fPosY, fPosZ; + marked[i]->GetPosition(fPosX, fPosY, fPosZ); + if (Unit* pTemp1 = bsw->doSummon(NPC_ICE_TOMB,fPosX, fPosY, fPosZ)) + pTemp1->AddThreat(marked[i], 100.0f); + }; + +/* Map::PlayerList const &pList = pMap->GetPlayers(); if (pList.isEmpty()) return; for(Map::PlayerList::const_iterator i = pList.begin(); i != pList.end(); ++i) @@ -211,7 +222,7 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI pTemp->AddThreat(player, 100.0f); }; }; - }; + };*/ } void UpdateAI(const uint32 diff) @@ -236,10 +247,11 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI } if (bsw->timedQuery(SPELL_FROST_BEACON, diff) && m_creature->GetHealthPercent() < 85.0f) stage = 1; + if (m_creature->GetHealthPercent() < 35.0f) { bsw->doCast(SPELL_MYSTIC_BUFFET); - stage = 4; + stage = 9; DoScriptText(-1631429,m_creature); } break; @@ -251,36 +263,60 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI SetCombatMovement(false); bsw->doCast(SPELL_FLY_VISUAL); m_creature->GetMotionMaster()->MovePoint(1, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_FLY_SIT_GROUND_UP); + m_creature->AddSplineFlag(SPLINEFLAG_FLYING); break; case 2: - if (bsw->timedQuery(SPELL_ICY_TOMB, diff)) { - stage = 3; - IceBlock(); + if (!MovementStarted) { + stage = 3; + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_FLY_FALL); }; break; case 3: + stage = 4; + IceBlock(); + break; + case 4: if (bsw->timedQuery(SPELL_FROST_BOMB, diff)) - if (Unit* pTemp = bsw->SelectRandomPlayerAtRange(250.0f)) + if (Unit* pTemp = bsw->SelectRandomPlayerAtRange(300.0f)) bsw->doCast(SPELL_FROST_BOMB_TRIGGER, pTemp); + bsw->timedCast(SPELL_FROST_BREATH_1, diff); + if (bsw->timedQuery(SPELL_FROST_BEACON, diff)) { + stage = 5; + } + break; + case 5: + MovementStarted = true; + SetCombatMovement(false); + m_creature->GetMotionMaster()->MovePoint(1, SpawnLoc[0].x, SpawnLoc[0].y, SpawnLoc[0].z); + stage = 6; + m_creature->HandleEmoteCommand(EMOTE_STATE_FLY_SIT_GROUND); + break; + case 6: + if (!MovementStarted) { stage = 0; SetCombatMovement(true); m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); bsw->doRemove(SPELL_FLY_VISUAL); - } + m_creature->RemoveSplineFlag(SPLINEFLAG_FLYING); + }; break; - case 4: + + case 9: bsw->timedCast(SPELL_CLEAVE_1, diff); bsw->timedCast(SPELL_TAIL_SMASH, diff); bsw->timedCast(SPELL_FROST_BREATH_1, diff); bsw->timedCast(SPELL_PERMEATING_CHILL, diff); bsw->timedCast(SPELL_UNCHAINED_MAGIC, diff); + if (bsw->timedQuery(SPELL_ICY_GRIP, diff)) { DoScriptText(-1631426,m_creature); doBlisteringCold(); } + break; default: break; } @@ -369,12 +405,17 @@ struct MANGOS_DLL_DECL mob_frost_bombAI : public ScriptedAI ScriptedInstance *m_pInstance; uint32 boom_timer; + uint32 visual_timer; + bool finita; void Reset() { SetCombatMovement(false); - boom_timer = 5000; + visual_timer = 6000; + boom_timer = 9000; + finita = false; m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetDisplayId(15880); } void AttackStart(Unit *pWho) @@ -387,11 +428,24 @@ struct MANGOS_DLL_DECL mob_frost_bombAI : public ScriptedAI if(m_pInstance && m_pInstance->GetData(TYPE_SINDRAGOSA) != IN_PROGRESS) m_creature->ForcedDespawn(); - if (boom_timer <= uiDiff) + if (finita) { m_creature->CastSpell(m_creature, SPELL_FROST_BOMB, true); m_creature->ForcedDespawn(); } + + if (visual_timer <= uiDiff) + { + m_creature->CastSpell(m_creature, SPELL_FROST_BOMB_VISUAL, true); + visual_timer= DAY; + } + else visual_timer -= uiDiff; + + if (boom_timer <= uiDiff) + { + m_creature->CastSpell(m_creature,SPELL_FROST_BOMB_VISUAL2,false); + finita = true; + } else boom_timer -= uiDiff; } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp index f0358b52b..982ffa854 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp @@ -179,7 +179,7 @@ struct MANGOS_DLL_DECL boss_valithria_dreamwalkerAI : public ScriptedAI case 4: randommob = NPC_GLUTTONOUS_ABOMINATION;break; default: randommob = NPC_RISEN_ARCHMAGE; break; } - if (Creature* pTemp = m_creature->SummonCreature(randommob, SpawnLoc[door].x, SpawnLoc[door].y, SpawnLoc[door].z, 5, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME)) + if (Unit* pTemp = bsw->doSummon(randommob, SpawnLoc[door].x, SpawnLoc[door].y, SpawnLoc[door].z, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 300000)) mobsGUIDList.push_back(pTemp->GetGUID()); } } @@ -260,12 +260,11 @@ struct MANGOS_DLL_DECL boss_valithria_dreamwalkerAI : public ScriptedAI for(std::list::iterator itr = mobsGUIDList.begin(); itr != mobsGUIDList.end(); ++itr) { - if (Creature* pTemp = (Creature*)Unit::GetUnit(*m_creature, *itr)) + if (Unit* pTemp = Unit::GetUnit(*m_creature, *itr)) if (pTemp->isAlive()) { pTemp->DeleteThreatList(); pTemp->CombatStop(true); pTemp->DealDamage(pTemp, pTemp->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - pTemp->ForcedDespawn(); } } mobsGUIDList.clear(); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp index e6dab9f02..94b80f867 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp @@ -543,7 +543,7 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance case DATA_BLOOD_COUNCIL_HEALTH: return m_uiDataCouncilHealth; case TYPE_EVENT: return m_auiEvent; case TYPE_EVENT_TIMER: return m_auiEventTimer; - case TYPE_EVENT_NPC: switch (m_auiEvent) + case TYPE_EVENT_NPC: switch (m_auiEvent) { case 1: return NPC_TIRION; From 4006f8f8e80b2f3ebfbdc86958ae366626efee7c Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sun, 16 May 2010 01:47:14 +0400 Subject: [PATCH 312/405] Frost wing draft complete --- .../icecrown_citadel/blood_prince_council.cpp | 2 +- .../icecrown_citadel/boss_blood_queen_lanathel.cpp | 2 +- .../icecrown_citadel/boss_deathbringer_saurfang.cpp | 2 +- .../icecrown_citadel/icecrown_citadel/boss_festergut.cpp | 2 +- .../icecrown_citadel/boss_lady_deathwhisper.cpp | 2 +- .../icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp | 2 +- .../icecrown_citadel/boss_proffesor_putricide.cpp | 2 +- .../icecrown_citadel/icecrown_citadel/boss_rotface.cpp | 4 ++-- .../icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp | 2 +- .../icecrown_citadel/boss_valithria_dreamwalker.cpp | 2 +- .../icecrown_citadel/icecrown_citadel/icecrown_spire.cpp | 2 +- .../icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp index 6f28e1189..8ca44ef5a 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: blood_prince_council -SD%Complete: 3% +SD%Complete: 30% SDComment: by /dev/rsa SDCategory: Icecrown Citadel EndScriptData */ diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp index dfc5d0c2b..4baefce32 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: boss_blood_queen_lanathel -SD%Complete: 1% +SD%Complete: 20% SDComment: by /dev/rsa SDCategory: Icecrown Citadel EndScriptData */ diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp index a77af57dc..3c18efe77 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: boss_deathbringer_saurfang -SD%Complete: 10% +SD%Complete: 30% SDComment: by /dev/rsa SDCategory: Icecrown Citadel EndScriptData */ diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp index a6a563427..690975e84 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: boss_festergut -SD%Complete: 5% +SD%Complete: 20% SDComment: by /dev/rsa SDCategory: Icecrown Citadel EndScriptData */ diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp index f168f7749..9bcf5df63 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: boss_lady_deathwhisper -SD%Complete: 20% +SD%Complete: 50% SDComment: by /dev/rsa SDCategory: Icecrown Citadel EndScriptData */ diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp index b3a4cd2fc..a8f3cdfb7 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: boss_lord_marrowgar -SD%Complete: 30% +SD%Complete: 60% SDComment: by /dev/rsa SDCategory: Icecrown Citadel EndScriptData */ diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp index 1923d180a..07cb9fbc6 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: boss_proffesor_putricide -SD%Complete: 0% +SD%Complete: 20% SDComment: by /dev/rsa SDCategory: Icecrown Citadel EndScriptData */ diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp index eef050ff0..ba92f2fa6 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: boss_rotface -SD%Complete: 0% +SD%Complete: 10% SDComment: by /dev/rsa SDCategory: Icecrown Citadel EndScriptData */ @@ -107,7 +107,7 @@ struct MANGOS_DLL_DECL boss_rotfaceAI : public ScriptedAI pet = true; DoScriptText(-1631228,m_creature); }; - }; + }; if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp index adc6d1662..f84c1abf4 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: boss_sindragosa -SD%Complete: 0% +SD%Complete: 60% SDComment: by /dev/rsa SDCategory: Icecrown Citadel EndScriptData */ diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp index 982ffa854..959ad4d0c 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: boss_valithria -SD%Complete: 5% +SD%Complete: 60% SDComment: by /dev/rsa SDCategory: Icecrown Citadel EndScriptData */ diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp index 523e212a9..a69a6a5a6 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: icecrown_spire -SD%Complete: 10% +SD%Complete: 100% SDComment: by /dev/rsa SDCategory: Icecrown Citadel - mobs EndScriptData */ diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp index 0df6bda34..78e13d4b7 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: icecrown_teleport -SD%Complete: 30% +SD%Complete: 100% SDComment: by /dev/rsa SDCategory: Icecrown Citadel EndScriptData */ From a76ae469a3ae340dc2b9206f425eafae48adbf3a Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sun, 16 May 2010 10:44:35 +0400 Subject: [PATCH 313/405] TOC crusaders threat fix (NEED TESTING!) --- .../trial_of_the_crusader/boss_faction_champions.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp index 0a5846bdd..f6da28163 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp @@ -118,8 +118,12 @@ struct MANGOS_DLL_DECL boss_faction_championsAI : public ScriptedAI void Aggro(Unit *who) { + if(!m_pInstance) return; + m_pInstance->SetData(TYPE_CRUSADERS, IN_PROGRESS); DoCast(m_creature, SPELL_ANTI_AOE, true); - if(m_pInstance) m_pInstance->SetData(TYPE_CRUSADERS, IN_PROGRESS); + if(who->GetTypeId() != TYPEID_PLAYER) + if (Unit* player = bsw->SelectRandomPlayerAtRange(80.0f)) + m_creature->AddThreat(player, 100.0f); } void Reset() From 2be963c49f1254bc58365d2ad8bae676d6d8c757 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sun, 16 May 2010 15:33:38 +0400 Subject: [PATCH 314/405] ICC bosses events. --- .../icecrown_citadel/blood_prince_council.cpp | 1 + .../boss_blood_queen_lanathel.cpp | 2 + .../icecrown_citadel/boss_festergut.cpp | 2 + .../boss_proffesor_putricide.cpp | 51 +++++++++++++++++-- .../icecrown_citadel/boss_rotface.cpp | 1 + .../instance_icecrown_spire.cpp | 8 ++- 6 files changed, 59 insertions(+), 6 deletions(-) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp index 8ca44ef5a..0e580a228 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp @@ -85,6 +85,7 @@ struct MANGOS_DLL_DECL boss_valanar_iccAI : public ScriptedAI if(!m_pInstance || intro) return; if (pWho->GetTypeId() != TYPEID_PLAYER) return; m_pInstance->SetData(TYPE_EVENT, 800); + debug_log("EventMGR: creature %u send signal %u ",m_creature->GetEntry(),m_pInstance->GetData(TYPE_EVENT)); intro = true; } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp index 4baefce32..eea42a432 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp @@ -65,6 +65,7 @@ struct MANGOS_DLL_DECL boss_blood_queen_lanathelAI : public ScriptedAI if(!pInstance) return; pInstance->SetData(TYPE_LANATHEL, NOT_STARTED); stage = 0; + UpdateTimer = 1000; } void JustReachedHome() @@ -106,6 +107,7 @@ struct MANGOS_DLL_DECL boss_blood_queen_lanathelAI : public ScriptedAI UpdateTimer = pInstance->GetData(TYPE_EVENT_TIMER); if (UpdateTimer <= diff) { + debug_log("EventMGR: creature %u received signal %u ",m_creature->GetEntry(),pInstance->GetData(TYPE_EVENT)); switch (pInstance->GetData(TYPE_EVENT)) { case 800: diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp index 690975e84..4d351a4d2 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp @@ -72,6 +72,7 @@ struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI if (pWho->GetTypeId() != TYPEID_PLAYER) return; pInstance->SetData(TYPE_EVENT, 500); + debug_log("EventMGR: creature %u send signal %u ",m_creature->GetEntry(),pInstance->GetData(TYPE_EVENT)); intro = true; } @@ -102,6 +103,7 @@ struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI void JustDied(Unit *killer) { if(pInstance) pInstance->SetData(TYPE_FESTERGUT, DONE); + pInstance->SetData(TYPE_EVENT, 550); bsw->doRemove(SPELL_PUNGENT_BLIGHT); bsw->doRemove(SPELL_PUNGENT_BLIGHT_1); bsw->doRemove(SPELL_PUNGENT_BLIGHT_2); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp index 07cb9fbc6..5ac1db0e7 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp @@ -61,6 +61,13 @@ enum BossSpells // VIEW_3 = 38216, }; +static Locations SpawnLoc[]= +{ + {4356.779785f, 3263.510010f, 389.398010f}, // 0 Putricide start point o=1.586 + {4295.081055f, 3188.883545f, 389.330261f}, // 1 Puticide Festergut say, o=4.27 + {4417.302246f, 3188.219971f, 389.332520f}, // 2 Putricide Rotface say o=5.102 +}; + struct MANGOS_DLL_DECL boss_proffesor_putricideAI : public ScriptedAI { boss_proffesor_putricideAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -82,11 +89,15 @@ struct MANGOS_DLL_DECL boss_proffesor_putricideAI : public ScriptedAI pInstance->SetData(TYPE_PUTRICIDE, NOT_STARTED); stage = 0; intro = false; + UpdateTimer = 1000; } void MoveInLineOfSight(Unit* pWho) { - if(!pInstance || intro) return; + if (!pInstance || intro) return; + if (pInstance->GetData(TYPE_EVENT_NPC) == NPC_PROFESSOR_PUTRICIDE + || !pWho->IsWithinDistInMap(m_creature, 40.0f)) return; + DoScriptText(-1631249,m_creature, pWho); intro = true; } @@ -129,18 +140,48 @@ struct MANGOS_DLL_DECL boss_proffesor_putricideAI : public ScriptedAI UpdateTimer = pInstance->GetData(TYPE_EVENT_TIMER); if (UpdateTimer <= diff) { + debug_log("EventMGR: creature %u received signal %u ",m_creature->GetEntry(),pInstance->GetData(TYPE_EVENT)); switch (pInstance->GetData(TYPE_EVENT)) { case 500: - DoScriptText(-16311201, m_creature); - UpdateTimer = 2000; + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->NearTeleportTo(SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z, 4.27f); + DoScriptText(-1631201, m_creature); + UpdateTimer = 10000; pInstance->SetData(TYPE_EVENT,510); break; - case 600: - DoScriptText(-16311220, m_creature); + case 510: + m_creature->NearTeleportTo(SpawnLoc[0].x, SpawnLoc[0].y, SpawnLoc[0].z, 1.586f); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); UpdateTimer = 2000; + pInstance->SetData(TYPE_EVENT,520); + break; + case 550: + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->NearTeleportTo(SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z, 4.27f); + DoScriptText(-1631202, m_creature); + UpdateTimer = 10000; + pInstance->SetData(TYPE_EVENT,560); + break; + case 560: + m_creature->NearTeleportTo(SpawnLoc[0].x, SpawnLoc[0].y, SpawnLoc[0].z, 1.586f); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + UpdateTimer = 2000; + pInstance->SetData(TYPE_EVENT,570); + break; + case 600: + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->NearTeleportTo(SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 5.102f); + DoScriptText(-1631220, m_creature); + UpdateTimer = 10000; pInstance->SetData(TYPE_EVENT,610); break; + case 610: + m_creature->NearTeleportTo(SpawnLoc[0].x, SpawnLoc[0].y, SpawnLoc[0].z, 1.586f); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + UpdateTimer = 2000; + pInstance->SetData(TYPE_EVENT,620); + break; default: break; } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp index ba92f2fa6..271ea3c3e 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp @@ -69,6 +69,7 @@ struct MANGOS_DLL_DECL boss_rotfaceAI : public ScriptedAI if (pWho->GetTypeId() != TYPEID_PLAYER) return; pInstance->SetData(TYPE_EVENT, 600); + debug_log("EventMGR: creature %u send signal %u ",m_creature->GetEntry(),pInstance->GetData(TYPE_EVENT)); intro = true; } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp index 94b80f867..9fa88a4ca 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp @@ -154,6 +154,7 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance m_uiBloodwingDoorGUID = 0; m_uiSDoorCollisionGUID = 0; m_auiEvent = 0; + m_auiEventTimer = 1000; switch (Difficulty) { case RAID_DIFFICULTY_10MAN_NORMAL: m_uiGunshipArmoryH_ID = GO_GUNSHIP_ARMORY_H_10; @@ -552,9 +553,14 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance case 2: return NPC_LICH_KING; break; - case 500: + case 510: + case 550: + case 560: case 600: + case 610: + case 650: + case 660: return NPC_PROFESSOR_PUTRICIDE; break; From 68c1df25b8d6698d902522304c7cec02825ef13e Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sun, 16 May 2010 15:36:09 +0400 Subject: [PATCH 315/405] Changes (by bugreports)- NEED TESTING! - attempt to fix crashes from kero99 - attempt to fix aggro on crusaders - BSW bugfixes and improve (thanks to Insider42) - make (?) VC happy on compile BSW --- ...rial_of_crusader_spelltable_scriptdev2.sql | 2 +- include/sc_boss_spell_worker.cpp | 20 ++++++++++++------- include/sc_boss_spell_worker.h | 4 ++-- .../boss_faction_champions.cpp | 6 +++++- .../boss_twin_valkyr.cpp | 4 ++-- 5 files changed, 23 insertions(+), 13 deletions(-) diff --git a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql index 7ce7a996b..89b2ccf97 100644 --- a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql +++ b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql @@ -124,7 +124,7 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ (34800, 66313, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL), (34800, 66317, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL), (34800, 66318, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL), -(34800, 66406, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 1, 0, NULL), +(34800, 66406, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, NULL), (34800, 66407, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), (34800, 66408, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), (34800, 66636, 0, 0, 0, 15000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 1, 0, NULL); diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index 1c0e6d97d..8eeca6974 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -243,10 +243,11 @@ CanCastResult BossSpellWorker::_BSWSpellSelector(uint8 m_uiSpellIdx, Unit* pTarg break; case CAST_ON_RANDOM_POINT: + if (!pTarget) pTarget = boss; if (pSpell->LocData.z <= 1.0f) { float fPosX, fPosY, fPosZ; - boss->GetPosition(fPosX, fPosY, fPosZ); - boss->GetRandomPoint(fPosX, fPosY, fPosZ, urand((uint32)pSpell->LocData.x, (uint32)pSpell->LocData.y), fPosX, fPosY, fPosZ); + pTarget->GetPosition(fPosX, fPosY, fPosZ); + pTarget->GetRandomPoint(fPosX, fPosY, fPosZ, urand((uint32)pSpell->LocData.x, (uint32)pSpell->LocData.y), fPosX, fPosY, fPosZ); boss->CastSpell(fPosX, fPosY, fPosZ, pSpell->m_uiSpellEntry[currentDifficulty], false); return CAST_OK; } else return CAST_FAIL_OTHER; @@ -477,10 +478,11 @@ bool BossSpellWorker::_doAura(uint8 m_uiSpellIdx, Unit* pTarget, SpellEffectInde debug_log("BSW: adding aura from spell %u index %u",pSpell->m_uiSpellEntry[currentDifficulty], index); - if (spell = (SpellEntry *)GetSpellStore()->LookupEntry(pSpell->m_uiSpellEntry[currentDifficulty])) + if (spell = (SpellEntry *)GetSpellStore()->LookupEntry(pSpell->m_uiSpellEntry[currentDifficulty])) if (pTarget->AddAura(new BossAura(spell, index, &pSpell->varData, pTarget, pTarget))) - return true; - else return false; + return true; + + return false; }; @@ -603,8 +605,11 @@ Unit* BossSpellWorker::_doSelect(uint32 SpellID, bool spellsearchtype, float ran Map::PlayerList const &pList = pMap->GetPlayers(); if (pList.isEmpty()) return NULL; +#if defined( __GNUC__ ) Unit* _list[pMap->GetMaxPlayers()]; - +#else + Unit* _list[INSTANCE_MAX_PLAYERS]; +#endif uint8 _count = 0; memset(&_list, 0, sizeof(_list)); @@ -627,7 +632,8 @@ Unit* BossSpellWorker::_doSelect(uint32 SpellID, bool spellsearchtype, float ran } } debug_log("BSW: search result for random player, count = %u ",_count); - return _list[urand(0,_count)]; + if (_count == 0) return NULL; + else return _list[urand(0,_count)]; }; diff --git a/include/sc_boss_spell_worker.h b/include/sc_boss_spell_worker.h index 0a767eb28..36411d594 100644 --- a/include/sc_boss_spell_worker.h +++ b/include/sc_boss_spell_worker.h @@ -16,8 +16,9 @@ enum { DIFFICULTY_LEVELS = 4, - MAX_BOSS_SPELLS = 16, + MAX_BOSS_SPELLS = 32, SPELL_INDEX_ERROR = 255, + INSTANCE_MAX_PLAYERS = 40, }; enum BossSpellFlag @@ -172,7 +173,6 @@ class MANGOS_DLL_DECL BossSpellWorker return _doSelect(0, false, range); }; - Unit* doSummon(uint32 SpellID, float fPosX, float fPosY, float fPosZ, TempSummonType type = TEMPSUMMON_CORPSE_TIMED_DESPAWN, uint32 delay = 60000) { return _doSummonAtPosition(FindSpellIDX(SpellID), type, delay, fPosX, fPosY, fPosZ); diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp index 0a5846bdd..f6da28163 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp @@ -118,8 +118,12 @@ struct MANGOS_DLL_DECL boss_faction_championsAI : public ScriptedAI void Aggro(Unit *who) { + if(!m_pInstance) return; + m_pInstance->SetData(TYPE_CRUSADERS, IN_PROGRESS); DoCast(m_creature, SPELL_ANTI_AOE, true); - if(m_pInstance) m_pInstance->SetData(TYPE_CRUSADERS, IN_PROGRESS); + if(who->GetTypeId() != TYPEID_PLAYER) + if (Unit* player = bsw->SelectRandomPlayerAtRange(80.0f)) + m_creature->AddThreat(player, 100.0f); } void Reset() diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp index b2f35e5df..7cb471c0d 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp @@ -167,7 +167,7 @@ struct MANGOS_DLL_DECL boss_fjolaAI : public ScriptedAI if (bsw->timedQuery(SPELL_LIGHT_TOUCH, uiDiff)) { - if (Unit* pTarget = bsw->SelectRandomPlayer(SPELL_LIGHT_ESSENCE, false, 150.0f)) + if (Unit* pTarget = bsw->SelectRandomPlayer(SPELL_LIGHT_ESSENCE, false, 50.0f)) bsw->doCast(SPELL_LIGHT_TOUCH, pTarget); bsw->doCast(NPC_UNLEASHED_LIGHT); }; @@ -326,7 +326,7 @@ struct MANGOS_DLL_DECL boss_eydisAI : public ScriptedAI if (bsw->timedQuery(SPELL_DARK_TOUCH, uiDiff)) { - if (Unit* pTarget = bsw->SelectRandomPlayer(SPELL_DARK_ESSENCE, false, 150.0f)) + if (Unit* pTarget = bsw->SelectRandomPlayer(SPELL_DARK_ESSENCE, false, 50.0f)) bsw->doCast(SPELL_DARK_TOUCH, pTarget); bsw->doCast(NPC_UNLEASHED_DARK); }; From 5dfb34bcf6572af17470fe09dd3fb7fe4dfd033a Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sun, 16 May 2010 20:00:32 +0400 Subject: [PATCH 316/405] COS update --- addition/717_culling_of_stratholme_mangos.sql | 8 +- .../717_culling_of_stratholme_scriptdev2.sql | 25 +- .../culling_of_stratholme/boss_lord_epoch.cpp | 442 +-- .../culling_of_stratholme/boss_malganis.cpp | 710 ++--- .../culling_of_stratholme/boss_meathook.cpp | 310 +- .../culling_of_stratholme/boss_salramm.cpp | 388 +-- .../culling_of_stratholme.cpp | 2638 +++++++++-------- .../def_culling_of_stratholme.h | 126 +- .../instance_culling_of_stratholme.cpp | 547 ++-- 9 files changed, 2730 insertions(+), 2464 deletions(-) diff --git a/addition/717_culling_of_stratholme_mangos.sql b/addition/717_culling_of_stratholme_mangos.sql index 88229396f..d259bef8d 100644 --- a/addition/717_culling_of_stratholme_mangos.sql +++ b/addition/717_culling_of_stratholme_mangos.sql @@ -20,7 +20,7 @@ update `creature_template` set `AIName`='', `Scriptname`='boss_meathook' where ` update `creature_template` set `AIName`='', `Scriptname`='boss_lord_epoch' where `entry` in (26532); update `creature_template` set `AIName`='', `Scriptname`='boss_malganis' where `entry` in (26533); update `instance_template` set `script` = 'instance_culling_of_stratholme' WHERE map=595; --- Spawning Salramm in the instance -- +/*-- Spawning Salramm in the instance -- INSERT INTO creature VALUES (4458724,26530,595,1,1,0,0,2174.32,1307.32,131.866,4.32264,25,0,0,337025,62535,0,0); -- heroic version -- INSERT INTO creature VALUES (4458725,26530,595,2,1,0,0,2178.93,1307.89,131.526,4.12069,25,0,0,421281,62535,0,0); @@ -36,6 +36,7 @@ INSERT INTO creature VALUES (4458741,26532,595,2,1,0,1820,2446.17,1111.64,148.07 INSERT INTO creature VALUES (4459981,26533,595,1,1,0,0,2298.33,1501.03,128.362,5.11213,25,0,0,404430,41690,0,0); -- heroic version -- INSERT INTO creature VALUES (4459615,26533,595,2,1,0,0,2298.9,1502.32,128.361,5.21301,25,0,0,505538,41690,0,0); +*/ update `creature` set `spawntimesecs`='3600' where `id` in (31127, 31126, 28167, 28169); DELETE FROM `creature` WHERE (`guid`=4456649); @@ -55,9 +56,10 @@ INSERT INTO `gameobject_template` (`entry`, `type`, `displayId`, `name`, `castBa update `gameobject` set `state` = '1' where `id` in (187711); update `gameobject` set `spawntimesecs` = '-604800', `state` = '0' where `id` in (190663); - +UPDATE `gameobject_template` SET faction = 0 WHERE entry= 190663; +/* UPDATE `creature` set `curhealth` = '8600' where `id`=28167; UPDATE `creature` set `curhealth` = '8600' where `id`=28169; UPDATE `creature` set `curhealth` = '15000' where `id`=27737; UPDATE `quest_template` set `SpecialFlags` = '1' where `entry`=13151; - +*/ diff --git a/addition/717_culling_of_stratholme_scriptdev2.sql b/addition/717_culling_of_stratholme_scriptdev2.sql index 1e7496c69..b4ecfef78 100644 --- a/addition/717_culling_of_stratholme_scriptdev2.sql +++ b/addition/717_culling_of_stratholme_scriptdev2.sql @@ -1,15 +1,7 @@ DELETE FROM `script_texts` WHERE `comment` = 26499; -DELETE FROM `script_texts` WHERE `entry` IN ('-1594071','-1594072','-1594073','-1594074','-1594075','-1594076','-1594077','-1594078','-1594079','-1594080','-1594081','-1594082','-1594083'); -DELETE FROM `script_texts` WHERE `entry` IN ('-1594084','-1594085','-1594086','-1594087','-1594088,','-1594089','-1594090','-1594091','-1594092','-1594093','-1594094','-1594095','-1594096'); -DELETE FROM `script_texts` WHERE `entry` IN ('-1594097','-1594098','-1594099','-1594100','-1594101','-1594102','-1594103','-1594104','-1594105','-1594106','-1594107','-1594108','-1594109'); -DELETE FROM `script_texts` WHERE `entry` IN ('-1594110','-1594111','-1594112','-1594113','-1594114','-1594115','-1594116','-1594117','-1594118','-1594119','-1594120','-1594121','-1594122'); -DELETE FROM `script_texts` WHERE `entry` IN ('-1594123','-1594124','-1594125','-1594126','-1594127','-1594128','-1594129','-1594130','-1594131','-1594132','-1594133','-1594134','-1594135'); -DELETE FROM `script_texts` WHERE `entry` IN ('-1594136','-1594137','-1594138','-1594139','-1594140','-1594141','-1594142','-1594143','-1594144','-1594145','-1594146','-1594147','-1594148'); -DELETE FROM `script_texts` WHERE `entry` IN ('-1594149','-1594150','-1594151','-1594152','-1594153','-1594154','-1594155','-1594156','-1594157','-1594158','-1594159','-1594160','-1594161'); -DELETE FROM `script_texts` WHERE `entry` IN ('-1594162','-1594163','-1594164','-1594165','-1594166','-1594167','-1594168','-1594169','-1594170','-1594171','-1594172','-1594173','-1594174'); -DELETE FROM `script_texts` WHERE `entry` IN ('-1594175','-1594176'); +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1594177 AND -1594070 ; -INSERT INTO `script_texts` (`entry`,`content_default`,`content_loc8`,`sound`,`type`,`language`,`emote`,`comment`) VALUES +INSERT INTO `script_texts` (`entry`,`content_default`,`content_loc8`,`sound`,`type`,`language`,`emote`,`comment`) VALUES (-1594071, 'I\'m glad you could make it! Uther.','Я рад, что ты пришел! Утер.', 12828,0,0,1, '26499'), (-1594072, 'Watch your tone, Boy. You may be the prince, but I\'m still your superrior as a paladin.','Следи за своим тоном, юноша. Хоть ты и принц, но как паладин ты все еще находишься под моим командованием.', 12839,0,0,25, '26499'), (-1594073, 'As I could forget. Listen Uther, There is somthing about the plague you should know.','Как будто я не помню. Послушай Утер я должен рассказать тебе кое что про чуму.',12829,0,0,0, '26499'), @@ -20,20 +12,20 @@ INSERT INTO `script_texts` (`entry`,`content_default`,`content_loc8`,`sound`,`ty (-1594078, 'Damn it Uther! As your future king, I order you to purge this city.','Проклятие Утер! Как будущий король я приказываю тебе очистить этот город.',12832,1,0,5, '26499'), (-1594079, 'You are not my king yet boy.You know I whould obey that command ,even if you were!','Пока ты еще не король юноша. Но этот приказ я не выполнил бы будь ты хоть трижды королем!',12842,1,0,22, '26499'), (-1594080, 'Then I consider this as an act of treason.','Тогда я буду расценивать это как измену.', 12833,0,0,0, '26499'), -(-1594081, 'Treason? You lost your mind Arthas?','Измену? Ты совсем лишился рассудка Артас?', 12843,0,0,5, '26499'), +(-1594081, 'Treason? You lost your mind Arthas?','Измену? Ты совсем лишился рассудка Артас?', 12843,0,0,5, '26499'), (-1594082, 'Have I? Lord Uther. By my right of succession and suvenerity of my crown, I\'m here to releave you from command, and susspend your paladins from the service.','Неужели? Лорд Утер. Властью данной мне по праву наследования, я отстраняю вас от командования, и освобождаю от службы ваших паладинов.', 12834,0,0,1, '26499'), -(-1594083, 'Arthas? You can not just ...','Артас? Ты не можешь так просто...', 12837,0,0,1, '26499'), +(-1594083, 'Arthas? You can not just ...','Артас? Ты не можешь так просто...', 12837,0,0,1, '26499'), (-1594084, 'It\'s done! Those of you who have will to save this land follow me!, the rest of you get out of my sight.!','Это уже сделано! Те из вас, кто действительно хочет спасти эту землю - за мной, остальные прочь с глаз моих.', 12835,0,0,0, '26499'), (-1594085, 'You have crossed terible treshold, Arthas.','Ты пересек опасную черту, Артас.', 12844,0,0,25, '26499'), -(-1594086, 'Jaina?','Джайна?', 12836,0,0,1, '26499'), +(-1594086, 'Jaina?','Джайна?', 12836,0,0,1, '26499'), (-1594087, 'I\'m sorry,Arthas , I can\'t watch you do this.','Прости Артас, но я не могу смотреть на это.', 12838,0,0,1, '26499'), (-1594088, 'Take position here, I\'ll will lead a small force in stratholm and start the culling. We must contain and purge the infected people for the sake all of Lordaeron.','Обустройте позицию тут, а я пока поведу небольшой отряд в стратхольм и начну очищение. Мы должны изолировать и уничтожить зараженных жителей ради всего Лордаэрона.', 14327,0,0,1, '26499'), (-1594089, 'Everyone looks ready! Remember these people are all infected with the plague, and they will die soon. We need to purge Stratholm and protect the remain of Lordaeron from the Scourge. Let\'s go.','Похоже все готовы! Помните эти люди заражены чумой и скоро умрут. Мы должны очистить Стратхольм и защитить Лордаэрон от Плети. Вперед.', 14293,0,0,1, '26499'), (-1594090, 'Greetings to you my lord. How we can help?','Приветствую вас милорд. Чем вы можете помочь?', 0,0,0,1, '26499'), (-1594091, 'I can help you, only with a clean death.','Я могу помочь вам лишь быстрой смертью.', 14294,0,0,0, '26499'), -(-1594092, 'Help our prince has gone mad ...','Помогите наш принц сошел с ума...', 0,0,0,0, '26499'), -(-1594093, 'This is only the beginning ..','Это только начало...', 14295,0,0,1, '26499'), -(-1594094, 'Yes. This is the beginning! I have ben waiting for you young Prince. Ahh, I\'m Mal\'Ganis.','Да. Это начало! Я ждал тебя юнный принц. Я Малганис.', 14410,0,0,1, '26499'), +(-1594092, 'Help our prince has gone mad ...','Помогите наш принц сошел с ума...', 0,0,0,0, '26499'), +(-1594093, 'This is only the beginning ..','Это только начало...', 14295,0,0,1, '26499'), +(-1594094, 'Yes. This is the beginning! I have ben waiting for you young Prince. Ahh, I\'m Mal\'Ganis.','Да. Это начало! Я ждал тебя юнный принц. Я Малганис.', 14410,0,0,1, '26499'), (-1594095, 'As you can see your people are now my people.I will now turn the city Household by household, Until the flame of life has ben snufed out ,forever ..','Как видишь, твои люди отныне принадлежат мне. Дом за домом я порабощу этот город и огонь жизни угаснет здесь навсегда...',14411,0,0,1, '26499'), (-1594096, 'I won\'t allow it Mal\'Ganis. Beter these people die by my hand, than they become your slaves and serv you after death.','Я не допущу этого Малганис. Лудше эти люди погибнут от моей руки, чем станут твоими рабами после смерти.',14296,0,0,5, '26499'), (-1594097, 'Mal\'Ganis will send some of his scourge minions to interfer with us. Those with you with strong stell and magic should go forward and destroy them. I will lead the remaining forces for purging stratholme of the infected.','Малганис отправит своих прислужников из плети навстречу нам. Опытные воины и маги ступайте и уничтожте врагов. Я возглавлю оставшиеся войска в деле очищения стратхольма от заразы.',14885,0,0,1, '26499'), @@ -163,4 +155,3 @@ INSERT INTO script_waypoint VALUES (26499, 40, 2329.882,1406.273,128.013, 12000, 'Knights Street WP3'), (26499, 41, 2327.391,1412.475,127.692, 180000000, 'Knights Street WP4'), (26499, 42, 2329.882,1406.273,128.013, 0, 'Knights Street WP2'); -- Pustishka -- - \ No newline at end of file diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_lord_epoch.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_lord_epoch.cpp index 99dd4cd3e..0bfcc20c5 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_lord_epoch.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_lord_epoch.cpp @@ -1,221 +1,221 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 - * 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, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - - -/* ScriptData -SDName: instance_culling_of_stratholme -SD%Complete: ?% -SDComment: -SDCategory: Culling of Stratholme -EndScriptData */ - - -#include "precompiled.h" -#include "def_culling_of_stratholme.h" - -enum -{ - SPELL_COURSE = 52772, - SPELL_TIME_STOP = 58848, - SPELL_TIME_WARP = 52766, - SPELL_SPIKE_N = 52771, - SPELL_SPIKE_H = 58830, - - SAY_EPOCH_INTRO = -1594116, - SAY_EPOCH_AGGRO = -1594118, - SAY_EPOCH_DEATH = -1594119, - SAY_EPOCH_SLAY01 = -1594120, - SAY_EPOCH_SLAY02 = -1594121, - SAY_EPOCH_SLAY03 = -1594122, - SAY_EPOCH_WARP01 = -1594123, - SAY_EPOCH_WARP02 = -1594124, - SAY_EPOCH_WARP03 = -1594125 -}; - - - -/*###### -## boss_lord_epoch -######*/ -struct MANGOS_DLL_DECL boss_lord_epochAI : public ScriptedAI -{ - boss_lord_epochAI(Creature *c) : ScriptedAI(c) - { - m_pInstance = (ScriptedInstance*)c->GetInstanceData(); - m_bIsHeroic = c->GetMap()->IsRegularDifficulty(); - Reset(); - } - - ScriptedInstance* m_pInstance; - - uint32 Step; - uint32 Steptim; - uint32 Intro; - bool m_bIsHeroic; - uint32 Spike_Timer; - uint32 Warp_Timer; - uint32 Stop_Timer; - uint32 Course_Timer; - - void Reset() - { - Step = 1; - Steptim = 26000; - Course_Timer = 9300; - Stop_Timer = 21300; - Warp_Timer = 25300; - Spike_Timer = 5300; - } - - void MoveInLineOfSight(Unit *who) - { - if (m_creature->IsWithinDistInMap(who, 10.0f)) - { - if (m_pInstance->GetData(TYPE_ARTHAS_EVENT) == IN_PROGRESS) - Intro = 0; - } - - ScriptedAI::MoveInLineOfSight(who); - } - - void Aggro(Unit* who) - { - DoScriptText(SAY_EPOCH_AGGRO, m_creature); - - if (m_pInstance) - m_pInstance->SetData(TYPE_EPOCH_EVENT, IN_PROGRESS); - } - - void JustDied(Unit *killer) - { - DoScriptText(SAY_EPOCH_DEATH, m_creature); - - if (m_pInstance) - m_pInstance->SetData(TYPE_EPOCH_EVENT, DONE); - } - - void KilledUnit(Unit* pVictim) - { - switch(rand()%3) - { - case 0: DoScriptText(SAY_EPOCH_SLAY01, m_creature); break; - case 1: DoScriptText(SAY_EPOCH_SLAY02, m_creature); break; - case 2: DoScriptText(SAY_EPOCH_SLAY03, m_creature); break; - } - } - - void UpdateAI(const uint32 diff) - { - if(Intro == 0) - { - switch(Step) - { - case 1: - ++Step; - Steptim = 5000; - break; - case 3: - DoScriptText(SAY_EPOCH_INTRO, m_creature); - ++Step; - Steptim = 26000; - break; - case 5: - m_creature->setFaction(14); - ++Step; - Steptim = 1000; - break; - } - } - else - return; - - if (Steptim <= diff) - { - ++Step; - Steptim = 330000; - } - Steptim -= diff; - - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - DoMeleeAttackIfReady(); - - if (Course_Timer < diff) - { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCast(target, SPELL_COURSE); - - Course_Timer = 9300; - } - else - Course_Timer -= diff; - - if (Spike_Timer < diff) - { - - DoCast(m_creature->getVictim(),m_bIsHeroic ? SPELL_SPIKE_H : SPELL_SPIKE_N); - - Spike_Timer = 5300; - } - else - Spike_Timer -= diff; - - if (Stop_Timer < diff) - { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCast(target, SPELL_TIME_STOP); - - Stop_Timer = 21300; - } - else - Stop_Timer -= diff; - - if (Warp_Timer < diff) - { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCast(target, SPELL_TIME_WARP); - - switch(rand()%3) - { - case 0: DoScriptText(SAY_EPOCH_WARP01, m_creature); break; - case 1: DoScriptText(SAY_EPOCH_WARP02, m_creature); break; - case 2: DoScriptText(SAY_EPOCH_WARP03, m_creature); break; - } - - Warp_Timer = 25300; - } - else - Warp_Timer -= diff; - - } -}; - -CreatureAI* GetAI_boss_lord_epoch(Creature *_Creature) -{ - boss_lord_epochAI* lord_epochAI = new boss_lord_epochAI(_Creature); - return (CreatureAI*)lord_epochAI; -}; - -void AddSC_boss_lord_epoch() -{ - Script *newscript; - - newscript = new Script; - newscript->Name = "boss_lord_epoch"; - newscript->GetAI = &GetAI_boss_lord_epoch; - newscript->RegisterSelf(); -} +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + +/* ScriptData +SDName: instance_culling_of_stratholme +SD%Complete: ?% +SDComment: +SDCategory: Culling of Stratholme +EndScriptData */ + + +#include "precompiled.h" +#include "def_culling_of_stratholme.h" + +enum +{ + SPELL_COURSE = 52772, + SPELL_TIME_STOP = 58848, + SPELL_TIME_WARP = 52766, + SPELL_SPIKE_N = 52771, + SPELL_SPIKE_H = 58830, + + SAY_EPOCH_INTRO = -1594116, + SAY_EPOCH_AGGRO = -1594118, + SAY_EPOCH_DEATH = -1594119, + SAY_EPOCH_SLAY01 = -1594120, + SAY_EPOCH_SLAY02 = -1594121, + SAY_EPOCH_SLAY03 = -1594122, + SAY_EPOCH_WARP01 = -1594123, + SAY_EPOCH_WARP02 = -1594124, + SAY_EPOCH_WARP03 = -1594125 +}; + + + +/*###### +## boss_lord_epoch +######*/ +struct MANGOS_DLL_DECL boss_lord_epochAI : public ScriptedAI +{ + boss_lord_epochAI(Creature *c) : ScriptedAI(c) + { + m_pInstance = (ScriptedInstance*)c->GetInstanceData(); + m_bIsHeroic = c->GetMap()->IsRegularDifficulty(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 Step; + uint32 Steptim; + uint32 Intro; + bool m_bIsHeroic; + uint32 Spike_Timer; + uint32 Warp_Timer; + uint32 Stop_Timer; + uint32 Course_Timer; + + void Reset() + { + Step = 1; + Steptim = 26000; + Course_Timer = 9300; + Stop_Timer = 21300; + Warp_Timer = 25300; + Spike_Timer = 5300; + } + + void MoveInLineOfSight(Unit *who) + { + if (m_creature->IsWithinDistInMap(who, 10.0f)) + { + if (m_pInstance->GetData(TYPE_ARTHAS_EVENT) == IN_PROGRESS) + Intro = 0; + } + + ScriptedAI::MoveInLineOfSight(who); + } + + void Aggro(Unit* who) + { + DoScriptText(SAY_EPOCH_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_EPOCH_EVENT, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + DoScriptText(SAY_EPOCH_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_EPOCH_EVENT, DONE); + } + + void KilledUnit(Unit* pVictim) + { + switch(rand()%3) + { + case 0: DoScriptText(SAY_EPOCH_SLAY01, m_creature); break; + case 1: DoScriptText(SAY_EPOCH_SLAY02, m_creature); break; + case 2: DoScriptText(SAY_EPOCH_SLAY03, m_creature); break; + } + } + + void UpdateAI(const uint32 diff) + { + if(Intro == 0) + { + switch(Step) + { + case 1: + ++Step; + Steptim = 5000; + break; + case 3: + DoScriptText(SAY_EPOCH_INTRO, m_creature); + ++Step; + Steptim = 26000; + break; + case 5: + m_creature->setFaction(14); + ++Step; + Steptim = 1000; + break; + } + } + else + return; + + if (Steptim <= diff) + { + ++Step; + Steptim = 330000; + } + Steptim -= diff; + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + + if (Course_Timer < diff) + { + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + DoCast(target, SPELL_COURSE); + + Course_Timer = 9300; + } + else + Course_Timer -= diff; + + if (Spike_Timer < diff) + { + + DoCast(m_creature->getVictim(),m_bIsHeroic ? SPELL_SPIKE_H : SPELL_SPIKE_N); + + Spike_Timer = 5300; + } + else + Spike_Timer -= diff; + + if (Stop_Timer < diff) + { + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + DoCast(target, SPELL_TIME_STOP); + + Stop_Timer = 21300; + } + else + Stop_Timer -= diff; + + if (Warp_Timer < diff) + { + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + DoCast(target, SPELL_TIME_WARP); + + switch(rand()%3) + { + case 0: DoScriptText(SAY_EPOCH_WARP01, m_creature); break; + case 1: DoScriptText(SAY_EPOCH_WARP02, m_creature); break; + case 2: DoScriptText(SAY_EPOCH_WARP03, m_creature); break; + } + + Warp_Timer = 25300; + } + else + Warp_Timer -= diff; + + } +}; + +CreatureAI* GetAI_boss_lord_epoch(Creature *_Creature) +{ + boss_lord_epochAI* lord_epochAI = new boss_lord_epochAI(_Creature); + return (CreatureAI*)lord_epochAI; +}; + +void AddSC_boss_lord_epoch() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_lord_epoch"; + newscript->GetAI = &GetAI_boss_lord_epoch; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_malganis.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_malganis.cpp index 89003f4fc..83073658f 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_malganis.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_malganis.cpp @@ -1,356 +1,356 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 - * 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, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - - -/* ScriptData -SDName: instance_culling_of_stratholme -SD%Complete: ?% -SDComment: -SDCategory: Culling of Stratholme -EndScriptData */ - - -#include "precompiled.h" -#include "def_culling_of_stratholme.h" - -enum -{ - SAY_MALGANIS_AGGRO = -1594159, - SAY_MALGANIS_ESCAPE02 = -1594169, - SAY_MALGANIS_ESCAPE01 = -1594176, - SAY_MALGANIS_SLAY01 = -1594160, - SAY_MALGANIS_SLAY02 = -1594161, - SAY_MALGANIS_SLAY03 = -1594162, - SAY_MALGANIS_SLAY04 = -1594163, - SAY_MALGANIS_SLAY05 = -1594164, - SAY_MALGANIS_SLAY06 = -1594165, - SAY_MALGANIS_SLAY07 = -1594166, - SAY_MALGANIS_SLEEP01 = -1594174, - SAY_MALGANIS_SLEEP02 = -1594175, - SAY_MALGANIS_Sleep = -1594167, - SAY_MALGANIS_15HP = -1594168, - SAY_MALGANIS_OUTRO = -1594171, - SAY_ARTHAS_OUTRO01 = -1594170, - SAY_ARTHAS_OUTRO02 = -1594172, - SAY_ARTHAS_OUTRO03 = -1594173, - - SPELL_SWAMP_N = 52720, - SPELL_SWAMP_H = 58852, - SPELL_MIND_BLAST_N = 52722, - SPELL_MIND_BLAST_H = 58850, - SPELL_SLEEP_N = 52721, - SPELL_SLEEP_H = 58849, - SPELL_VAMPIRE = 52723 -}; - -/*###### -## boss_malganis -######*/ -struct MANGOS_DLL_DECL boss_malganisAI : public ScriptedAI -{ - boss_malganisAI(Creature *c) : ScriptedAI(c) - { - m_pInstance = (ScriptedInstance*)c->GetInstanceData(); - m_bIsHeroic = c->GetMap()->IsRegularDifficulty(); - Reset(); - } - - ScriptedInstance* m_pInstance; - - Unit* pTarget; - bool Finish; - bool Sleep; - bool Vampire; - uint32 Phase; - Creature* Malganis; - Creature* Arthas; - bool Outro; - bool m_bIsHeroic; - uint32 Step; - uint32 Steptim; - uint32 Motion; - uint32 Swamp_Timer; - uint32 MindBlast_Timer; - uint32 Sleep_Timer; - uint32 Vampire_Timer; - - void Reset() - { - Sleep = false; - Vampire = false; - Phase = 1; - Outro = false; - Step = 1; - Steptim = 7000; - Motion = 0; - Swamp_Timer = 6300; - MindBlast_Timer = 11300; - Sleep_Timer = 17300; - Vampire_Timer = 30000; - - if(Finish == true) {} - else - Finish = false; - - if(m_pInstance->GetData(TYPE_MALGANIS_EVENT) == DONE || m_pInstance->GetData(TYPE_ARTHAS_EVENT) == DONE) - { - m_creature->SetDeadByDefault(true); - } - } - - void Aggro(Unit* who) - { - DoScriptText(SAY_MALGANIS_AGGRO, m_creature); - if (Creature* pArthas = GetClosestCreatureWithEntry(m_creature, NPC_ARTHAS, 150.0f)) - Arthas = pArthas; - - if (m_pInstance) - { - m_pInstance->SetData(TYPE_MALGANIS_EVENT, IN_PROGRESS); - GameObject* pGate = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GO_MAL_GATE2)); - if (pGate && !pGate->GetGoState()) - { - pGate->SetGoState(GO_STATE_READY); - } - } - } - - void KilledUnit(Unit* pVictim) - { - switch(rand()%7) - { - case 0: DoScriptText(SAY_MALGANIS_SLAY01, m_creature); break; - case 1: DoScriptText(SAY_MALGANIS_SLAY02, m_creature); break; - case 2: DoScriptText(SAY_MALGANIS_SLAY03, m_creature); break; - case 3: DoScriptText(SAY_MALGANIS_SLAY04, m_creature); break; - case 4: DoScriptText(SAY_MALGANIS_SLAY05, m_creature); break; - case 5: DoScriptText(SAY_MALGANIS_SLAY06, m_creature); break; - case 6: DoScriptText(SAY_MALGANIS_SLAY07, m_creature); break; - } - } - - void UpdateAI(const uint32 diff) - { - - if(Outro == false) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - DoMeleeAttackIfReady(); - - if (Swamp_Timer < diff) - { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCast(target, m_bIsHeroic ? SPELL_SWAMP_H : SPELL_SWAMP_N); - - Swamp_Timer = 7300; - } - else - Swamp_Timer -= diff; - - if (MindBlast_Timer < diff) - { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCast(target, m_bIsHeroic ? SPELL_MIND_BLAST_H : SPELL_MIND_BLAST_N); - - MindBlast_Timer = 11300; - } - else - MindBlast_Timer -= diff; - - if(m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 40) - { - if(Sleep == false) - { - Sleep = true; - DoScriptText(SAY_MALGANIS_Sleep, m_creature); - } - - if (Sleep_Timer < diff) - { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCast(target, m_bIsHeroic ? SPELL_SLEEP_H : SPELL_SLEEP_N); - switch(rand()%2) - { - case 0: DoScriptText(SAY_MALGANIS_SLEEP01, m_creature); break; - case 1: DoScriptText(SAY_MALGANIS_SLEEP02, m_creature); break; - } - - Sleep_Timer = 17300; - } - else - Sleep_Timer -= diff; - } - - if(m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 25) - { - if(Vampire == false) - { - Vampire = true; - DoScriptText(SAY_MALGANIS_15HP, m_creature); - DoCast(m_creature, SPELL_VAMPIRE); - } - if (Vampire_Timer < diff) - { - DoCast(m_creature, SPELL_VAMPIRE); - Vampire_Timer = 30000; - } - else - Vampire_Timer -= diff; - - } - - if(m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 5) - { - // adding kill credit for the players to be able to complete the quest - Map *map = m_creature->GetMap(); - Map::PlayerList const& players = map->GetPlayers(); - if (!players.isEmpty() && map->IsDungeon()) - { - for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) - { - if (Player* pPlayer = itr->getSource()) - pPlayer->KilledMonsterCredit(NPC_MALGANIS, m_creature->GetGUID()); - } - } - Finish = true; - } - - if(Arthas) - { - if(Arthas->isDead()) - { - m_creature->setFaction(35); - m_creature->RemoveAllAuras(); - m_creature->DeleteThreatList(); - m_creature->CombatStop(true); - m_creature->InterruptNonMeleeSpells(false); - m_creature->SetVisibility(VISIBILITY_OFF); - } - } - } - - if(Finish == true) - { - switch(Step) - { - case 1: - Outro = true; - Malganis = m_creature; - DoScriptText(SAY_MALGANIS_ESCAPE01, Malganis); - if (Creature* pArthas = GetClosestCreatureWithEntry(m_creature, NPC_ARTHAS, 150.0f)) - Arthas = pArthas; - Arthas->setFaction(35); - Arthas->RemoveAllAuras(); - Arthas->DeleteThreatList(); - Arthas->CombatStop(true); - Arthas->InterruptNonMeleeSpells(false); - Malganis->setFaction(35); - Malganis->RemoveAllAuras(); - Malganis->DeleteThreatList(); - Malganis->CombatStop(true); - Malganis->InterruptNonMeleeSpells(false); - Malganis->GetMotionMaster()->MovePoint(0, 2286.963f, 1484.449f, 127.850f); - Arthas->GetMotionMaster()->MovePoint(0, 2299.289f, 1491.944f, 128.362f); - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Malganis->GetGUID()); - Malganis->SetUInt64Value(UNIT_FIELD_TARGET, Arthas->GetGUID()); - ++Step; - Steptim = 10000; - break; - case 3: - DoScriptText(SAY_MALGANIS_ESCAPE02, Malganis); - ++Step; - Steptim = 10000; - break; - case 5: - DoScriptText(SAY_ARTHAS_OUTRO01, Arthas); - ++Step; - Steptim = 5000; - break; - case 7: - DoScriptText(SAY_MALGANIS_OUTRO, Malganis); - ++Step; - Steptim = 20000; - break; - case 9: - Malganis->SetVisibility(VISIBILITY_OFF); - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, 0); - Arthas->RemoveSplineFlag(SPLINEFLAG_WALKMODE); - Arthas->GetMotionMaster()->MovePoint(0, Malganis->GetPositionX(), Malganis->GetPositionY(), Malganis->GetPositionZ()); - ++Step; - Steptim = 3000; - break; - case 11: - DoScriptText(SAY_ARTHAS_OUTRO02, Arthas); - ++Step; - Steptim = 6000; - break; - case 13: - DoScriptText(SAY_ARTHAS_OUTRO03, Arthas); - if (m_pInstance) - { - GameObject* pChest = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GO_MAL_CHEST)); - // this is the npc at who the players can turn in the quest - Arthas->SummonCreature(30997,2296.665f,1502.362f,128.362f,4.961f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,900000); - // those here gonna lock out the instance for the cd time - m_pInstance->SetData(TYPE_ARTHAS_EVENT, DONE); - m_pInstance->SetData(TYPE_MALGANIS_EVENT, DONE); - } - ++Step; - Steptim =11000; - break; - case 15: - Arthas->GetMotionMaster()->MovePoint(0, 2243.311f, 1476.025f, 132.352f); - ++Step; - Steptim =11000; - break; - case 17: - Arthas->SetVisibility(VISIBILITY_OFF); - Outro = false; - ++Step; - Steptim =11000; - break; - } - } - else - return; - - if (Steptim <= diff) - { - ++Step; - Steptim = 330000; - } - Steptim -= diff; - } -}; - -CreatureAI* GetAI_boss_malganis(Creature *_Creature) -{ - boss_malganisAI* malganisAI = new boss_malganisAI(_Creature); - return (CreatureAI*)malganisAI; -}; - -void AddSC_boss_malganis() -{ - Script *newscript; - - newscript = new Script; - newscript->Name = "boss_malganis"; - newscript->GetAI = &GetAI_boss_malganis; - newscript->RegisterSelf(); - +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + +/* ScriptData +SDName: instance_culling_of_stratholme +SD%Complete: ?% +SDComment: +SDCategory: Culling of Stratholme +EndScriptData */ + + +#include "precompiled.h" +#include "def_culling_of_stratholme.h" + +enum +{ + SAY_MALGANIS_AGGRO = -1594159, + SAY_MALGANIS_ESCAPE02 = -1594169, + SAY_MALGANIS_ESCAPE01 = -1594176, + SAY_MALGANIS_SLAY01 = -1594160, + SAY_MALGANIS_SLAY02 = -1594161, + SAY_MALGANIS_SLAY03 = -1594162, + SAY_MALGANIS_SLAY04 = -1594163, + SAY_MALGANIS_SLAY05 = -1594164, + SAY_MALGANIS_SLAY06 = -1594165, + SAY_MALGANIS_SLAY07 = -1594166, + SAY_MALGANIS_SLEEP01 = -1594174, + SAY_MALGANIS_SLEEP02 = -1594175, + SAY_MALGANIS_Sleep = -1594167, + SAY_MALGANIS_15HP = -1594168, + SAY_MALGANIS_OUTRO = -1594171, + SAY_ARTHAS_OUTRO01 = -1594170, + SAY_ARTHAS_OUTRO02 = -1594172, + SAY_ARTHAS_OUTRO03 = -1594173, + + SPELL_SWAMP_N = 52720, + SPELL_SWAMP_H = 58852, + SPELL_MIND_BLAST_N = 52722, + SPELL_MIND_BLAST_H = 58850, + SPELL_SLEEP_N = 52721, + SPELL_SLEEP_H = 58849, + SPELL_VAMPIRE = 52723 +}; + +/*###### +## boss_malganis +######*/ +struct MANGOS_DLL_DECL boss_malganisAI : public ScriptedAI +{ + boss_malganisAI(Creature *c) : ScriptedAI(c) + { + m_pInstance = (ScriptedInstance*)c->GetInstanceData(); + m_bIsHeroic = c->GetMap()->IsRegularDifficulty(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + Unit* pTarget; + bool Finish; + bool Sleep; + bool Vampire; + uint32 Phase; + Creature* Malganis; + Creature* Arthas; + bool Outro; + bool m_bIsHeroic; + uint32 Step; + uint32 Steptim; + uint32 Motion; + uint32 Swamp_Timer; + uint32 MindBlast_Timer; + uint32 Sleep_Timer; + uint32 Vampire_Timer; + + void Reset() + { + Sleep = false; + Vampire = false; + Phase = 1; + Outro = false; + Step = 1; + Steptim = 7000; + Motion = 0; + Swamp_Timer = 6300; + MindBlast_Timer = 11300; + Sleep_Timer = 17300; + Vampire_Timer = 30000; + + if(Finish == true) {} + else + Finish = false; + + if(m_pInstance->GetData(TYPE_MALGANIS_EVENT) == DONE || m_pInstance->GetData(TYPE_ARTHAS_EVENT) == DONE) + { + m_creature->SetDeadByDefault(true); + } + } + + void Aggro(Unit* who) + { + DoScriptText(SAY_MALGANIS_AGGRO, m_creature); + if (Creature* pArthas = GetClosestCreatureWithEntry(m_creature, NPC_ARTHAS, 150.0f)) + Arthas = pArthas; + + if (m_pInstance) + { + m_pInstance->SetData(TYPE_MALGANIS_EVENT, IN_PROGRESS); + GameObject* pGate = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GO_MAL_GATE2)); + if (pGate && !pGate->GetGoState()) + { + pGate->SetGoState(GO_STATE_READY); + } + } + } + + void KilledUnit(Unit* pVictim) + { + switch(rand()%7) + { + case 0: DoScriptText(SAY_MALGANIS_SLAY01, m_creature); break; + case 1: DoScriptText(SAY_MALGANIS_SLAY02, m_creature); break; + case 2: DoScriptText(SAY_MALGANIS_SLAY03, m_creature); break; + case 3: DoScriptText(SAY_MALGANIS_SLAY04, m_creature); break; + case 4: DoScriptText(SAY_MALGANIS_SLAY05, m_creature); break; + case 5: DoScriptText(SAY_MALGANIS_SLAY06, m_creature); break; + case 6: DoScriptText(SAY_MALGANIS_SLAY07, m_creature); break; + } + } + + void UpdateAI(const uint32 diff) + { + + if(Outro == false) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + + if (Swamp_Timer < diff) + { + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + DoCast(target, m_bIsHeroic ? SPELL_SWAMP_H : SPELL_SWAMP_N); + + Swamp_Timer = 7300; + } + else + Swamp_Timer -= diff; + + if (MindBlast_Timer < diff) + { + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + DoCast(target, m_bIsHeroic ? SPELL_MIND_BLAST_H : SPELL_MIND_BLAST_N); + + MindBlast_Timer = 11300; + } + else + MindBlast_Timer -= diff; + + if(m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 40) + { + if(Sleep == false) + { + Sleep = true; + DoScriptText(SAY_MALGANIS_Sleep, m_creature); + } + + if (Sleep_Timer < diff) + { + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + DoCast(target, m_bIsHeroic ? SPELL_SLEEP_H : SPELL_SLEEP_N); + switch(rand()%2) + { + case 0: DoScriptText(SAY_MALGANIS_SLEEP01, m_creature); break; + case 1: DoScriptText(SAY_MALGANIS_SLEEP02, m_creature); break; + } + + Sleep_Timer = 17300; + } + else + Sleep_Timer -= diff; + } + + if(m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 25) + { + if(Vampire == false) + { + Vampire = true; + DoScriptText(SAY_MALGANIS_15HP, m_creature); + DoCast(m_creature, SPELL_VAMPIRE); + } + if (Vampire_Timer < diff) + { + DoCast(m_creature, SPELL_VAMPIRE); + Vampire_Timer = 30000; + } + else + Vampire_Timer -= diff; + + } + + if(m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 5) + { + // adding kill credit for the players to be able to complete the quest + Map *map = m_creature->GetMap(); + Map::PlayerList const& players = map->GetPlayers(); + if (!players.isEmpty() && map->IsDungeon()) + { + for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) + { + if (Player* pPlayer = itr->getSource()) + pPlayer->KilledMonsterCredit(NPC_MALGANIS, m_creature->GetGUID()); + } + } + Finish = true; + } + + if(Arthas) + { + if(Arthas->isDead()) + { + m_creature->setFaction(35); + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->InterruptNonMeleeSpells(false); + m_creature->SetVisibility(VISIBILITY_OFF); + } + } + } + + if(Finish == true) + { + switch(Step) + { + case 1: + Outro = true; + Malganis = m_creature; + DoScriptText(SAY_MALGANIS_ESCAPE01, Malganis); + if (Creature* pArthas = GetClosestCreatureWithEntry(m_creature, NPC_ARTHAS, 150.0f)) + Arthas = pArthas; + Arthas->setFaction(35); + Arthas->RemoveAllAuras(); + Arthas->DeleteThreatList(); + Arthas->CombatStop(true); + Arthas->InterruptNonMeleeSpells(false); + Malganis->setFaction(35); + Malganis->RemoveAllAuras(); + Malganis->DeleteThreatList(); + Malganis->CombatStop(true); + Malganis->InterruptNonMeleeSpells(false); + Malganis->GetMotionMaster()->MovePoint(0, 2286.963f, 1484.449f, 127.850f); + Arthas->GetMotionMaster()->MovePoint(0, 2299.289f, 1491.944f, 128.362f); + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Malganis->GetGUID()); + Malganis->SetUInt64Value(UNIT_FIELD_TARGET, Arthas->GetGUID()); + ++Step; + Steptim = 10000; + break; + case 3: + DoScriptText(SAY_MALGANIS_ESCAPE02, Malganis); + ++Step; + Steptim = 10000; + break; + case 5: + DoScriptText(SAY_ARTHAS_OUTRO01, Arthas); + ++Step; + Steptim = 5000; + break; + case 7: + DoScriptText(SAY_MALGANIS_OUTRO, Malganis); + ++Step; + Steptim = 20000; + break; + case 9: + Malganis->SetVisibility(VISIBILITY_OFF); + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, 0); + Arthas->RemoveSplineFlag(SPLINEFLAG_FORWARD); + Arthas->GetMotionMaster()->MovePoint(0, Malganis->GetPositionX(), Malganis->GetPositionY(), Malganis->GetPositionZ()); + ++Step; + Steptim = 3000; + break; + case 11: + DoScriptText(SAY_ARTHAS_OUTRO02, Arthas); + ++Step; + Steptim = 6000; + break; + case 13: + DoScriptText(SAY_ARTHAS_OUTRO03, Arthas); + if (m_pInstance) + { + GameObject* pChest = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GO_MAL_CHEST)); + // this is the npc at who the players can turn in the quest + Arthas->SummonCreature(30997,2296.665f,1502.362f,128.362f,4.961f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,900000); + // those here gonna lock out the instance for the cd time + m_pInstance->SetData(TYPE_ARTHAS_EVENT, DONE); + m_pInstance->SetData(TYPE_MALGANIS_EVENT, DONE); + } + ++Step; + Steptim =11000; + break; + case 15: + Arthas->GetMotionMaster()->MovePoint(0, 2243.311f, 1476.025f, 132.352f); + ++Step; + Steptim =11000; + break; + case 17: + Arthas->SetVisibility(VISIBILITY_OFF); + Outro = false; + ++Step; + Steptim =11000; + break; + } + } + else + return; + + if (Steptim <= diff) + { + ++Step; + Steptim = 330000; + } + Steptim -= diff; + } +}; + +CreatureAI* GetAI_boss_malganis(Creature *_Creature) +{ + boss_malganisAI* malganisAI = new boss_malganisAI(_Creature); + return (CreatureAI*)malganisAI; +}; + +void AddSC_boss_malganis() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_malganis"; + newscript->GetAI = &GetAI_boss_malganis; + newscript->RegisterSelf(); + } \ No newline at end of file diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_meathook.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_meathook.cpp index 47624ab92..d6868f476 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_meathook.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_meathook.cpp @@ -1,155 +1,155 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 - * 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, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - - -/* ScriptData -SDName: instance_culling_of_stratholme -SD%Complete: ?% -SDComment: -SDCategory: Culling of Stratholme -EndScriptData */ - - - -#include "precompiled.h" -#include "def_culling_of_stratholme.h" - -enum -{ - SPELL_CHAIN_N = 52696, - SPELL_CHAIN_H = 58823, - SPELL_EXPLODED_N = 52666, - SPELL_EXPLODED_H = 58821, - SPELL_FRENZY = 58841, - - SAY_MEATHOOK_SPAWN = -1594110, - SAY_MEATHOOK_AGGRO = -1594111, - SAY_MEATHOOK_DEATH = -1594112, - SAY_MEATHOOK_SLAY01 = -1594113, - SAY_MEATHOOK_SLAY02 = -1594114, - SAY_MEATHOOK_SLAY03 = -1594115 -}; - -/*###### -## boss_meathook -######*/ -struct MANGOS_DLL_DECL boss_meathookAI : public ScriptedAI -{ - boss_meathookAI(Creature *c) : ScriptedAI(c) - { - m_pInstance = (ScriptedInstance*)c->GetInstanceData(); - m_bIsHeroic = c->GetMap()->IsRegularDifficulty(); - Reset(); - } - - ScriptedInstance* m_pInstance; - - bool m_bIsHeroic; - uint32 phaseArthas; - uint32 Chain_Timer; - uint32 Exploded_Timer; - uint32 Frenzy_Timer; - - void Reset() - { - phaseArthas = 0; - Chain_Timer = 6300; - Exploded_Timer = 9300; - Frenzy_Timer = 23300; - - } - - void Aggro(Unit* who) - { - DoScriptText(SAY_MEATHOOK_AGGRO, m_creature); - - if (m_pInstance) - m_pInstance->SetData(TYPE_MEATHOOK_EVENT, IN_PROGRESS); - } - - void JustDied(Unit *killer) - { - DoScriptText(SAY_MEATHOOK_DEATH, m_creature); - - if (m_pInstance) - m_pInstance->SetData(TYPE_MEATHOOK_EVENT, DONE); - } - - void KilledUnit(Unit* pVictim) - { - switch(rand()%3) - { - case 0: DoScriptText(SAY_MEATHOOK_SLAY01, m_creature); break; - case 1: DoScriptText(SAY_MEATHOOK_SLAY02, m_creature); break; - case 2: DoScriptText(SAY_MEATHOOK_SLAY03, m_creature); break; - } - } - - void UpdateAI(const uint32 diff) - { - - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - DoMeleeAttackIfReady(); - - if (Chain_Timer < diff) - { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCast(target, m_bIsHeroic ? SPELL_CHAIN_H : SPELL_CHAIN_N); - - Chain_Timer = 6300; - } - else - Chain_Timer -= diff; - - if (Exploded_Timer < diff) - { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCast(target, m_bIsHeroic ? SPELL_EXPLODED_H : SPELL_EXPLODED_N); - - Exploded_Timer = 9300; - } - else - Exploded_Timer -= diff; - - if (Frenzy_Timer < diff) - { - DoCast(m_creature,SPELL_FRENZY); - - Frenzy_Timer = 23300; - } - else - Frenzy_Timer -= diff; - - } -}; - -CreatureAI* GetAI_boss_meathook(Creature *_Creature) -{ - boss_meathookAI* meathookAI = new boss_meathookAI(_Creature); - return (CreatureAI*)meathookAI; -}; - -void AddSC_boss_meathook() -{ - Script *newscript; - - newscript = new Script; - newscript->Name = "boss_meathook"; - newscript->GetAI = &GetAI_boss_meathook; - newscript->RegisterSelf(); -} +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + +/* ScriptData +SDName: instance_culling_of_stratholme +SD%Complete: ?% +SDComment: +SDCategory: Culling of Stratholme +EndScriptData */ + + + +#include "precompiled.h" +#include "def_culling_of_stratholme.h" + +enum +{ + SPELL_CHAIN_N = 52696, + SPELL_CHAIN_H = 58823, + SPELL_EXPLODED_N = 52666, + SPELL_EXPLODED_H = 58821, + SPELL_FRENZY = 58841, + + SAY_MEATHOOK_SPAWN = -1594110, + SAY_MEATHOOK_AGGRO = -1594111, + SAY_MEATHOOK_DEATH = -1594112, + SAY_MEATHOOK_SLAY01 = -1594113, + SAY_MEATHOOK_SLAY02 = -1594114, + SAY_MEATHOOK_SLAY03 = -1594115 +}; + +/*###### +## boss_meathook +######*/ +struct MANGOS_DLL_DECL boss_meathookAI : public ScriptedAI +{ + boss_meathookAI(Creature *c) : ScriptedAI(c) + { + m_pInstance = (ScriptedInstance*)c->GetInstanceData(); + m_bIsHeroic = c->GetMap()->IsRegularDifficulty(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + bool m_bIsHeroic; + uint32 phaseArthas; + uint32 Chain_Timer; + uint32 Exploded_Timer; + uint32 Frenzy_Timer; + + void Reset() + { + phaseArthas = 0; + Chain_Timer = 6300; + Exploded_Timer = 9300; + Frenzy_Timer = 23300; + + } + + void Aggro(Unit* who) + { + DoScriptText(SAY_MEATHOOK_AGGRO, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_MEATHOOK_EVENT, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + DoScriptText(SAY_MEATHOOK_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_MEATHOOK_EVENT, DONE); + } + + void KilledUnit(Unit* pVictim) + { + switch(rand()%3) + { + case 0: DoScriptText(SAY_MEATHOOK_SLAY01, m_creature); break; + case 1: DoScriptText(SAY_MEATHOOK_SLAY02, m_creature); break; + case 2: DoScriptText(SAY_MEATHOOK_SLAY03, m_creature); break; + } + } + + void UpdateAI(const uint32 diff) + { + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + + if (Chain_Timer < diff) + { + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + DoCast(target, m_bIsHeroic ? SPELL_CHAIN_H : SPELL_CHAIN_N); + + Chain_Timer = 6300; + } + else + Chain_Timer -= diff; + + if (Exploded_Timer < diff) + { + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + DoCast(target, m_bIsHeroic ? SPELL_EXPLODED_H : SPELL_EXPLODED_N); + + Exploded_Timer = 9300; + } + else + Exploded_Timer -= diff; + + if (Frenzy_Timer < diff) + { + DoCast(m_creature,SPELL_FRENZY); + + Frenzy_Timer = 23300; + } + else + Frenzy_Timer -= diff; + + } +}; + +CreatureAI* GetAI_boss_meathook(Creature *_Creature) +{ + boss_meathookAI* meathookAI = new boss_meathookAI(_Creature); + return (CreatureAI*)meathookAI; +}; + +void AddSC_boss_meathook() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_meathook"; + newscript->GetAI = &GetAI_boss_meathook; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_salramm.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_salramm.cpp index 59442e7ae..9714af9f7 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_salramm.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_salramm.cpp @@ -1,195 +1,195 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 - * 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, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - - -/* ScriptData -SDName: instance_culling_of_stratholme -SD%Complete: ?% -SDComment: -SDCategory: Culling of Stratholme -EndScriptData */ - - - -#include "precompiled.h" -#include "def_culling_of_stratholme.h" - -enum -{ - SAY_SALRAMM_SPAWN = -1594129, - SAY_SALRAMM_AGGRO = -1594130, - SAY_SALRAMM_DEATH = -1594131, - SAY_SALRAMM_SLAY01 = -1594132, - SAY_SALRAMM_SLAY02 = -1594133, - SAY_SALRAMM_SLAY03 = -1594134, - SAY_SALRAMM_STEAL01 = -1594135, - SAY_SALRAMM_STEAL02 = -1594136, - SAY_SALRAMM_STEAL03 = -1594137, - - SPELL_SB_N = 57725, - SPELL_SB_H = 58827, - SPELL_FLESH = 58845, - SPELL_STEAL = 52708 -}; - -/*###### -## boss_salramm -######*/ -struct MANGOS_DLL_DECL boss_salrammAI : public ScriptedAI -{ - boss_salrammAI(Creature *c) : ScriptedAI(c) - { - m_pInstance = (ScriptedInstance*)c->GetInstanceData(); - m_bIsHeroic = c->GetMap()->IsRegularDifficulty(); - Reset(); - } - - ScriptedInstance* m_pInstance; - - bool m_bIsHeroic; - uint32 Step; - uint32 Steptim; - uint32 Motion; - uint32 ShadowBolt_Timer; - uint32 Flesh_Timer; - uint32 Steal_Timer; - - void Reset() - { - Step = 1; - Steptim = 7000; - ShadowBolt_Timer = 5300; - Flesh_Timer = 7300; - Steal_Timer = 17300; - } - - void Aggro(Unit* who) - { - Motion = 0; - DoScriptText(SAY_SALRAMM_AGGRO, m_creature); - m_creature->GetMotionMaster()->Clear(false); - - if (m_pInstance) - m_pInstance->SetData(TYPE_SALRAMM_EVENT, IN_PROGRESS); - } - - void JustDied(Unit *killer) - { - DoScriptText(SAY_SALRAMM_DEATH, m_creature); - - if (m_pInstance) - m_pInstance->SetData(TYPE_SALRAMM_EVENT, DONE); - } - - void KilledUnit(Unit* pVictim) - { - switch(rand()%3) - { - case 0: DoScriptText(SAY_SALRAMM_SLAY01, m_creature); break; - case 1: DoScriptText(SAY_SALRAMM_SLAY02, m_creature); break; - case 2: DoScriptText(SAY_SALRAMM_SLAY03, m_creature); break; - } - } - - void UpdateAI(const uint32 diff) - { - DoMeleeAttackIfReady(); - - if(Motion == 0) - { - switch(Step) - { - case 1: - DoScriptText(SAY_SALRAMM_SPAWN, m_creature); - ++Step; - Steptim = 7000; - break; - case 3: - m_creature->GetMotionMaster()->MovePoint(0, 2165.073f,1279.338f,133.40f); - ++Step; - Steptim = 7000; - break; - } - } - else - return; - - if (Steptim <= diff) - { - ++Step; - Steptim = 330000; - } - Steptim -= diff; - - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (ShadowBolt_Timer < diff) - { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCast(target, m_bIsHeroic ? SPELL_SB_H : SPELL_SB_N); - - ShadowBolt_Timer = 5300; - } - else - ShadowBolt_Timer -= diff; - - if (Flesh_Timer < diff) - { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCast(target,SPELL_FLESH); - - Flesh_Timer = 7300; - } - else - Flesh_Timer -= diff; - - if (Steal_Timer < diff) - { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCast(target,SPELL_STEAL); - - switch(rand()%3) - { - case 0: DoScriptText(SAY_SALRAMM_STEAL01, m_creature); break; - case 1: DoScriptText(SAY_SALRAMM_STEAL02, m_creature); break; - case 2: DoScriptText(SAY_SALRAMM_STEAL03, m_creature); break; - } - - Steal_Timer = 17300; - } - else - Steal_Timer -= diff; - - } -}; - -CreatureAI* GetAI_boss_salramm(Creature *_Creature) -{ - boss_salrammAI* salrammAI = new boss_salrammAI(_Creature); - return (CreatureAI*)salrammAI; -}; - -void AddSC_boss_salramm() -{ - Script *newscript; - - newscript = new Script; - newscript->Name = "boss_salramm"; - newscript->GetAI = &GetAI_boss_salramm; - newscript->RegisterSelf(); - +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + +/* ScriptData +SDName: instance_culling_of_stratholme +SD%Complete: ?% +SDComment: +SDCategory: Culling of Stratholme +EndScriptData */ + + + +#include "precompiled.h" +#include "def_culling_of_stratholme.h" + +enum +{ + SAY_SALRAMM_SPAWN = -1594129, + SAY_SALRAMM_AGGRO = -1594130, + SAY_SALRAMM_DEATH = -1594131, + SAY_SALRAMM_SLAY01 = -1594132, + SAY_SALRAMM_SLAY02 = -1594133, + SAY_SALRAMM_SLAY03 = -1594134, + SAY_SALRAMM_STEAL01 = -1594135, + SAY_SALRAMM_STEAL02 = -1594136, + SAY_SALRAMM_STEAL03 = -1594137, + + SPELL_SB_N = 57725, + SPELL_SB_H = 58827, + SPELL_FLESH = 58845, + SPELL_STEAL = 52708 +}; + +/*###### +## boss_salramm +######*/ +struct MANGOS_DLL_DECL boss_salrammAI : public ScriptedAI +{ + boss_salrammAI(Creature *c) : ScriptedAI(c) + { + m_pInstance = (ScriptedInstance*)c->GetInstanceData(); + m_bIsHeroic = c->GetMap()->IsRegularDifficulty(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + bool m_bIsHeroic; + uint32 Step; + uint32 Steptim; + uint32 Motion; + uint32 ShadowBolt_Timer; + uint32 Flesh_Timer; + uint32 Steal_Timer; + + void Reset() + { + Step = 1; + Steptim = 7000; + ShadowBolt_Timer = 5300; + Flesh_Timer = 7300; + Steal_Timer = 17300; + } + + void Aggro(Unit* who) + { + Motion = 0; + DoScriptText(SAY_SALRAMM_AGGRO, m_creature); + m_creature->GetMotionMaster()->Clear(false); + + if (m_pInstance) + m_pInstance->SetData(TYPE_SALRAMM_EVENT, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + DoScriptText(SAY_SALRAMM_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_SALRAMM_EVENT, DONE); + } + + void KilledUnit(Unit* pVictim) + { + switch(rand()%3) + { + case 0: DoScriptText(SAY_SALRAMM_SLAY01, m_creature); break; + case 1: DoScriptText(SAY_SALRAMM_SLAY02, m_creature); break; + case 2: DoScriptText(SAY_SALRAMM_SLAY03, m_creature); break; + } + } + + void UpdateAI(const uint32 diff) + { + DoMeleeAttackIfReady(); + + if(Motion == 0) + { + switch(Step) + { + case 1: + DoScriptText(SAY_SALRAMM_SPAWN, m_creature); + ++Step; + Steptim = 7000; + break; + case 3: + m_creature->GetMotionMaster()->MovePoint(0, 2165.073f,1279.338f,133.40f); + ++Step; + Steptim = 7000; + break; + } + } + else + return; + + if (Steptim <= diff) + { + ++Step; + Steptim = 330000; + } + Steptim -= diff; + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (ShadowBolt_Timer < diff) + { + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + DoCast(target, m_bIsHeroic ? SPELL_SB_H : SPELL_SB_N); + + ShadowBolt_Timer = 5300; + } + else + ShadowBolt_Timer -= diff; + + if (Flesh_Timer < diff) + { + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + DoCast(target,SPELL_FLESH); + + Flesh_Timer = 7300; + } + else + Flesh_Timer -= diff; + + if (Steal_Timer < diff) + { + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + DoCast(target,SPELL_STEAL); + + switch(rand()%3) + { + case 0: DoScriptText(SAY_SALRAMM_STEAL01, m_creature); break; + case 1: DoScriptText(SAY_SALRAMM_STEAL02, m_creature); break; + case 2: DoScriptText(SAY_SALRAMM_STEAL03, m_creature); break; + } + + Steal_Timer = 17300; + } + else + Steal_Timer -= diff; + + } +}; + +CreatureAI* GetAI_boss_salramm(Creature *_Creature) +{ + boss_salrammAI* salrammAI = new boss_salrammAI(_Creature); + return (CreatureAI*)salrammAI; +}; + +void AddSC_boss_salramm() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_salramm"; + newscript->GetAI = &GetAI_boss_salramm; + newscript->RegisterSelf(); + } \ No newline at end of file diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp index 7376a6226..1cedfdda2 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp @@ -1,1187 +1,1453 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 - * 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, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - - -/* ScriptData -SDName: instance_culling_of_stratholme -SD%Complete: ?% -SDComment: -SDCategory: Culling of Stratholme -EndScriptData */ - - -#include "precompiled.h" -#include "def_culling_of_stratholme.h" -#include "escort_ai.h" - - -enum -{ - SAY_INTRO01 = -1594071, //Arthas - SAY_INTRO02 = -1594072, //Uther - SAY_INTRO03 = -1594073, //Arthas - SAY_INTRO04 = -1594074, //Arthas - SAY_INTRO05 = -1594075, //Uther - SAY_INTRO06 = -1594076, //Arthas - SAY_INTRO07 = -1594077, //Uther - SAY_INTRO08 = -1594078, //Arthas - SAY_INTRO09 = -1594079, //Arthas - SAY_INTRO10 = -1594080, //Uther - SAY_INTRO11 = -1594081, //Arthas - SAY_INTRO12 = -1594082, //Uther - SAY_INTRO13 = -1594083, //Jaina - SAY_INTRO14 = -1594084, //Arthas - SAY_INTRO15 = -1594085, //Uther - SAY_INTRO16 = -1594086, //Arthas - SAY_INTRO17 = -1594087, //Jaina - SAY_INTRO18 = -1594088, //Arthas - SAY_ENTER01 = -1594089, //Arthas - SAY_ENTER02 = -1594090, //Cityman - SAY_ENTER03 = -1594091, //Arthas - SAY_ENTER04 = -1594092, //Crazyman - SAY_ENTER05 = -1594093, //Arthas - SAY_ENTER06 = -1594094, //Malganis - SAY_ENTER07 = -1594095, //Malganis - SAY_ENTER08 = -1594096, //Arthas - SAY_ENTER09 = -1594097, //Arthas - SAY_PHASE501 = -1594098, //Arthas - SAY_PHASE502 = -1594099, //Arthas - SAY_PEOPLE05 = -1594100, //Patricia - SAY_PEOPLE06 = -1594101, //Patricia - SAY_PEOPLE07 = -1594103, //Patricia - SAY_PEOPLE08 = -1594105, //Patricia - SAY_PEOPLE09 = -1594106, //Patricia - SAY_EPOCH = -1594117, //Arthas Dialog for Epoch - SAY_MEATHOOK_SPAWN = -1594110, - SAY_PEOPLE01 = -1594107, //People Run - SAY_PEOPLE02 = -1594108, //People Run - SAY_PEOPLE03 = -1594109, //People Run - SAY_PEOPLE04 = -1594104, //People Run - SAY_PEOPLE10 = -1594102, //People Run - SAY_PEOPLE11 = -1594126, //People Run - SAY_PEOPLE12 = -1594127, //People Run - SAY_PEOPLE13 = -1594128, //People Run - SAY_PHASE503 = -1594152, //Arthas Shkaf 01 - SAY_PHASE504 = -1594153, //Arthas Shkaf 02 - SAY_PHASE505 = -1594142, //Arthas Glore - SAY_PHASE506 = -1594143, //Arthas That is it - SAY_PHASE507 = -1594144, //Arthas - SAY_PHASE508 = -1594145, //Arthas This Magic Again - SAY_PHASE509 = -1594147, //Arthas We are Close in trap - SAY_PHASE510 = -1594146, //Arthas Lets go - SAY_PHASE511 = -1594151, //Arthas Shkaff tam - SAY_PHASE601 = -1594154, //Arthas Fire - SAY_PHASE602 = -1594155, //Arthas Picnic - SAY_PHASE603 = -1594156, //Arthas Picnic End - SAY_PHASE604 = -1594157, //Arthas Stop Escort ska on ne virybaetsa - SAY_PHASE605 = -1594158, //Arthas Pipec Malganisy - - NPC_SCARED_MAN_2 = 31127, - NPC_DRAKONIAN = 27744, - NPC_TIME_RIFT = 28409, - NPC_TIME_RIFT_2 = 28439, - NPC_PATRICIA = 31028, - NPC_SCARED_MAN = 31126, - NPC_KNIGHT_ESCORT = 27745, - NPC_PRIEST_ESCORT = 27747, - NPC_JAINA = 26497, - NPC_UTHER = 26528, - NPC_CITY_MAN = 28167, - NPC_CRAZY_MAN = 28169, - NPC_ZOMBIE = 27737, - - SPELL_FEAR = 39176, - SPELL_CHAIN_N = 52696, - SPELL_CHAIN_H = 58823, - SPELL_EXPLODED_N = 52666, - SPELL_EXPLODED_H = 58821, - SPELL_FRENZY = 58841, - SPELL_ARTHAS_AURA = 52442, - SPELL_EXORCISM_N = 52445, - SPELL_EXORCISM_H = 58822, - SPELL_HOLY_LIGHT = 52444, - - ENCOUNTER_ZOMBIE_NUMBER = 4, - ENCOUNTER_ZOMBIE_NUMBER2 = 50 -}; - -/*###### -## npc_arthas -######*/ -struct MANGOS_DLL_DECL npc_arthasAI : public npc_escortAI -{ - npc_arthasAI(Creature *pCreature) : npc_escortAI(pCreature) - { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroic = pCreature->GetMap()->IsRegularDifficulty(); - ArthasGUID = 0; - SalrammGUID = 0; - PhaseC = false; - Reset(); - } - - ScriptedInstance* m_pInstance; - - uint64 ArthasGUID; - uint64 SalrammGUID; - uint64 EpochGUID; - - bool m_bIsHeroic; - uint32 Exorcism_Timer; - uint32 FinalFight; - bool PhaseC; - uint32 arthas_event; - Unit* culling_faction; - Creature* Patricia; - Creature* StalkerM; - Creature* Crazyman; - Creature* Cityman; - Creature* Stalker; - Creature* TempZombie; - Creature* Salramm; - Creature* Meathook; - Creature* Epoch; - Creature* Malganis; - Creature* TempMalganis; - Creature* Arthas; - Creature* Jaina; - Creature* Uther; - uint32 phase; - uint32 phaseAI; - uint32 phasetim; - uint64 uiZombieGUID[ENCOUNTER_ZOMBIE_NUMBER]; - uint32 uiZombie_counter; - uint32 tmpZombie; - uint32 PatriciaEvent; - - void Reset() - { - if(arthas_event == 2) { } - else - arthas_event = 0; - FinalFight = 1; - phase = 1; - phasetim = 20000; - Exorcism_Timer = 7300; - Arthas=m_creature; - - if(m_pInstance->GetData(TYPE_ARTHAS_EVENT) == DONE) - Arthas->SetVisibility(VISIBILITY_OFF); - - // this is Arthas's start position in the instance he will give gossip only here and in front of the gate at Mal'Ganis - if(PhaseC == false && m_pInstance->GetData(TYPE_ARTHAS_EVENT) != DONE) - { - Arthas->SetVisibility(VISIBILITY_ON); - Arthas->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); - Arthas->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - } - - } - - void Aggro(Unit* who) - { - DoCast(m_creature, SPELL_ARTHAS_AURA); - } - - void MoveInLineOfSight(Unit* pWho) - { - if (!pWho) - return; - - if (!m_creature->hasUnitState(UNIT_STAT_STUNNED) && pWho->isTargetableForAttack() && - m_creature->IsHostileTo(pWho) && pWho->isInAccessablePlaceFor(m_creature)) - { - if (!m_creature->canFly() && m_creature->GetDistanceZ(pWho) > CREATURE_Z_ATTACK_RANGE) - return; - - float attackRadius = m_creature->GetAttackDistance(pWho); - if (m_creature->IsWithinDistInMap(pWho, attackRadius) && m_creature->IsWithinLOSInMap(pWho)) - { - if (!m_creature->getVictim()) - { - AttackStart(pWho); - pWho->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); - } - else if (m_creature->GetMap()->IsDungeon()) - { - pWho->SetInCombatWith(m_creature); - m_creature->AddThreat(pWho, 0.0f); - } - } - } - } - - void JustDied(Unit *killer) - { - if (m_pInstance) - { - m_pInstance->SetData(TYPE_ARTHAS_EVENT, FAIL); - } - } - - void AttackStart(Unit* pWho) - { - if (!pWho) - return; - - if (m_creature->Attack(pWho, true)) - { - m_creature->AddThreat(pWho, 0.0f); - m_creature->SetInCombatWith(pWho); - pWho->SetInCombatWith(m_creature); - - if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == POINT_MOTION_TYPE) - m_creature->GetMotionMaster()->MovementExpired(); - - if (IsCombatMovement()) - m_creature->GetMotionMaster()->MoveChase(pWho); - } - } - - void WaypointReached(uint32 uiPointId) - { - switch(uiPointId) - { - case 1: - DoScriptText(SAY_PHASE501, Arthas); - break; - case 2: - DoScriptText(SAY_PHASE502, Arthas); - break; - case 3: - Arthas->RemoveSplineFlag(SPLINEFLAG_WALKMODE); - DoScriptText(SAY_PHASE505, Arthas); - break; - case 4: - DoScriptText(SAY_PHASE506, Arthas); - Arthas->SummonCreature(NPC_TIME_RIFT,2225.388f,1178.470f,136.289f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); - break; - case 5: - DoScriptText(SAY_PHASE507, Arthas); - - Arthas->SummonCreature(NPC_TIME_RIFT,2264.253f,1162.153f,137.919f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); - Arthas->SummonCreature(NPC_TIME_RIFT,2286.946f,1182.064f,137.986f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); - break; - case 9: - DoScriptText(SAY_PHASE509, Arthas); - Arthas->SummonCreature(NPC_TIME_RIFT,2410.561f,1187.790f,133.933f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); - Arthas->SummonCreature(NPC_TIME_RIFT,2388.574f,1214.650f,134.239f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); - Arthas->SummonCreature(NPC_TIME_RIFT,2430.593f,1212.919f,134.124f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); - break; - case 10: - DoScriptText(SAY_PHASE510, Arthas); - break; - case 11: - Arthas->RemoveSplineFlag(SPLINEFLAG_WALKMODE); - break; - case 13: - DoScriptText(SAY_PHASE508,Arthas); - Arthas->SummonCreature(NPC_TIME_RIFT,2393.985f,1190.519f,148.076f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); - Arthas->SummonCreature(NPC_TIME_RIFT,2436.202f,1200.540f,148.077f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); - break; - case 15: - DoScriptText(SAY_PHASE511,Arthas); - Arthas->SummonCreature(NPC_TIME_RIFT_2,2445.629f,1111.500f,148.076f,3.229f,TEMPSUMMON_TIMED_DESPAWN,9000); - if (EpochGUID = m_pInstance->GetData64(DATA_EPOCH)) - { - // check if it has ben killed already - if(m_pInstance->GetData(TYPE_EPOCH_EVENT) != DONE) - { - Epoch = m_pInstance->instance->GetCreature(EpochGUID); - Epoch->SetVisibility(VISIBILITY_ON); - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Epoch->GetGUID()); - } - // already has ben killed as the db says so needs to die - if(m_pInstance->GetData(TYPE_EPOCH_EVENT) == DONE) - { - Epoch = m_pInstance->instance->GetCreature(EpochGUID); - Epoch->SetDeadByDefault(true); - } - } - break; - case 18: - DoScriptText(SAY_EPOCH, Arthas); - break; - case 19: - break; - case 20: - Arthas->AddSplineFlag(SPLINEFLAG_WALKMODE); - break; - case 23: - DoScriptText(SAY_PHASE503,Arthas); - break; - case 24: - if (m_pInstance) - { - GameObject* pGate = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GO_SHKAF_GATE)); - pGate->SetGoState(GO_STATE_ACTIVE); - } - DoScriptText(SAY_PHASE504,Arthas); - break; - case 32: - DoScriptText(SAY_PHASE601,Arthas); - Arthas->RemoveSplineFlag(SPLINEFLAG_WALKMODE); - break; - case 34: - Arthas->AddSplineFlag(SPLINEFLAG_WALKMODE); - DoScriptText(SAY_PHASE602,Arthas); - break; - case 35: - Arthas->RemoveSplineFlag(SPLINEFLAG_WALKMODE); - DoScriptText(SAY_PHASE603,Arthas); - break; - case 40: - DoScriptText(SAY_PHASE604,Arthas); - break; - case 41: - FinalFight = 1; - Arthas->setFaction(35); - phaseAI = 94; - break; - } - } - - void UpdateAI(const uint32 diff) - { - npc_escortAI::UpdateAI(diff); - - DoMeleeAttackIfReady(); - if (phaseAI == 94 && FinalFight != 2) - { - Arthas->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); - Arthas->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - } - if(FinalFight == 2) - { - Arthas->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); - Arthas->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - switch(phaseAI) - { - case 95: - DoScriptText(SAY_PHASE605, Arthas); - if (m_pInstance) - { - GameObject* pGate = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GO_MAL_GATE1)); - pGate->SetGoState(GO_STATE_ACTIVE); - } - ++phaseAI; - phasetim = 3000; - break; - case 97: - Arthas->GetMotionMaster()->MovePoint(0, 2303.016f, 1480.070f, 128.139f); - ++phaseAI; - phasetim = 3000; - break; - case 99: - Arthas->setFaction(culling_faction->getFaction()); - ++phaseAI; - phasetim = 3000; - break; - } - } - - if(FinalFight == 2) - { - if (phasetim <= diff) - { - ++phaseAI; - phasetim = 330000; - } - phasetim -= diff; - } - - if(arthas_event == 2) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (Exorcism_Timer < diff) - { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCast(target, m_bIsHeroic ? SPELL_EXORCISM_H : SPELL_EXORCISM_N); - - Exorcism_Timer = 7300; - } - else - Exorcism_Timer -= diff; - - if(m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 40) - DoCast(m_creature, SPELL_HOLY_LIGHT); - } - - if(arthas_event == 1) - { - Arthas->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); - Arthas->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - switch(phase) - { - case 1: - PhaseC = true; - Arthas = m_creature; - Arthas->RemoveSplineFlag(SPLINEFLAG_WALKMODE); - Uther = Arthas->SummonCreature(26528,1794.357f,1272.183f,140.558f,1.37f,TEMPSUMMON_TIMED_DESPAWN,180000); - - if (Creature* pJaina = GetClosestCreatureWithEntry(Arthas, NPC_JAINA, 50.0f)) - Jaina = pJaina; - - if (m_pInstance) - m_pInstance->SetData(TYPE_ARTHAS_EVENT, NOT_STARTED); - - Uther->RemoveSplineFlag(SPLINEFLAG_WALKMODE); - Arthas->GetMotionMaster()->MovePoint(0, 1903.167f, 1291.573f, 143.32f); - Uther->GetMotionMaster()->MovePoint(0, 1897.018f, 1287.487f, 143.481f); - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Uther->GetGUID()); - Uther->SetUInt64Value(UNIT_FIELD_TARGET, Arthas->GetGUID()); - ++phase; - phasetim = 17000; - break; - case 3: - DoScriptText(SAY_INTRO01, Arthas); - ++phase; - phasetim = 2000; - break; - case 5: - DoScriptText(SAY_INTRO02, Uther); - ++phase; - phasetim = 8000; - break; - case 7: - Arthas->AddSplineFlag(SPLINEFLAG_WALKMODE); - DoScriptText(SAY_INTRO03, Arthas); - Arthas->GetMotionMaster()->MovePoint(0, 1911.087f, 1314.263f, 150.026f); - ++phase; - phasetim = 9000; - break; - case 9: - Jaina = Arthas->SummonCreature(26497, 1895.48f, 1292.66f, 143.706f, 0.023475f,TEMPSUMMON_TIMED_DESPAWN,180000); - Jaina->SetUInt64Value(UNIT_FIELD_TARGET, Arthas->GetGUID()); - DoScriptText(SAY_INTRO04, Arthas); - ++phase; - phasetim = 10000; - break; - case 11: - DoScriptText(SAY_INTRO05, Uther); - ++phase; - phasetim = 1000; - break; - case 13: - DoScriptText(SAY_INTRO06, Arthas); - ++phase; - phasetim = 4000; - break; - case 15: - DoScriptText(SAY_INTRO07, Uther); - ++phase; - phasetim = 6000; - break; - case 17: - DoScriptText(SAY_INTRO08, Arthas); - ++phase; - phasetim = 4000; - break; - case 19: - DoScriptText(SAY_INTRO09, Uther); - ++phase; - phasetim = 8000; - break; - case 21: - DoScriptText(SAY_INTRO10, Arthas); - ++phase; - phasetim = 4000; - break; - case 23: - DoScriptText(SAY_INTRO11, Uther); - ++phase; - phasetim = 4000; - break; - case 25: - DoScriptText(SAY_INTRO12, Arthas); - ++phase; - phasetim = 11000; - break; - case 27: - DoScriptText(SAY_INTRO13, Jaina); - ++phase; - phasetim = 3000; - break; - case 29: - DoScriptText(SAY_INTRO14, Arthas); - ++phase; - phasetim = 9000; - break; - case 31: - DoScriptText(SAY_INTRO15, Uther); - ++phase; - phasetim = 4000; - break; - case 33: - Uther->AddSplineFlag(SPLINEFLAG_WALKMODE); - Uther->GetMotionMaster()->MovePoint(0, 1794.357f,1272.183f,140.558f); - ++phase; - phasetim = 1000; - break; - case 35: - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Jaina->GetGUID()); - Jaina->GetMotionMaster()->MovePoint(0, 1794.357f,1272.183f,140.558f); - ++phase; - phasetim = 1000; - break; - case 37: - DoScriptText(SAY_INTRO16, Arthas); - ++phase; - phasetim = 1000; - break; - case 39: - DoScriptText(SAY_INTRO17, Jaina); - ++phase; - phasetim = 3000; - break; - case 41: - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, 0); - Arthas->GetMotionMaster()->MovePoint(0, 1902.959f,1295.127f,143.388f); - ++phase; - phasetim = 10000; - break; - case 43: - Arthas->GetMotionMaster()->MovePoint(0, 1913.726f,1287.407f,141.927f); - ++phase; - phasetim = 6000; - break; - case 45: - DoScriptText(SAY_INTRO18, Arthas); - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Jaina->GetGUID()); - ++phase; - phasetim = 10000; - break; - case 47: - Arthas->RemoveSplineFlag(SPLINEFLAG_WALKMODE); - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, 0); - Jaina->SetVisibility(VISIBILITY_OFF); - Uther->SetVisibility(VISIBILITY_OFF); - Arthas->GetMotionMaster()->MovePoint(0, 1990.833f,1293.391f,145.467f); - ++phase; - phasetim = 12000; - break; - case 49: - Arthas->GetMotionMaster()->MovePoint(0, 1997.003f,1317.776f,142.963f); - ++phase; - phasetim = 5000; - break; - case 51: - Arthas->GetMotionMaster()->MovePoint(0, 2019.631f,1326.084f,142.929f); - ++phase; - phasetim = 4000; - break; - case 53: - Arthas->GetMotionMaster()->MovePoint(0, 2026.469f,1287.088f,143.596f); - ++phase; - phasetim = 6000; - break; - case 55: - Cityman = Arthas->SummonCreature(NPC_CITY_MAN,2091.977f,1275.021f,140.757f,0.558f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,60000); - Crazyman = Arthas->SummonCreature(NPC_CRAZY_MAN,2093.514f,1275.842f,140.408f,3.801f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,60000); - Arthas->GetMotionMaster()->MovePoint(0, 2050.660f,1287.333f,142.671f); - ++phase; - phasetim = 6000; - break; - case 57: - Stalker = Arthas->SummonCreature(20562,2026.469f,1287.088f,143.596f,1.37f,TEMPSUMMON_TIMED_DESPAWN,14000); - Stalker->SetVisibility(VISIBILITY_OFF); - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Stalker->GetGUID()); - ++phase; - phasetim = 1000; - break; - case 59: - DoScriptText(SAY_ENTER01, Arthas); - ++phase; - phasetim = 12000; - break; - case 61: - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, 0); - Arthas->AddSplineFlag(SPLINEFLAG_WALKMODE); - Arthas->GetMotionMaster()->MovePoint(0, 2081.447f,1287.770f,141.3241f); - ++phase; - phasetim = 15000; - break; - case 63: - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Cityman->GetGUID()); - Cityman->SetUInt64Value(UNIT_FIELD_TARGET, Arthas->GetGUID()); - Cityman->AddSplineFlag(SPLINEFLAG_WALKMODE); - Cityman->GetMotionMaster()->MovePoint(0, 2088.625f,1279.191f,140.743f); - ++phase; - phasetim = 2000; - break; - case 65: - DoScriptText(SAY_ENTER02, Cityman); - ++phase; - phasetim = 4000; - break; - case 67: - Arthas->GetMotionMaster()->MovePoint(0, 2087.689f,1280.344f,140.73f); - DoScriptText(SAY_ENTER03, Arthas); - ++phase; - phasetim = 3000; - break; - case 69: - Arthas->HandleEmoteCommand(37); - ++phase; - phasetim = 1000; - break; - case 71: - DoScriptText(SAY_ENTER04, Crazyman); - Crazyman->SetUInt64Value(UNIT_FIELD_TARGET, Arthas->GetGUID()); - Cityman->DealDamage(Cityman, Cityman->GetMaxHealth(),NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Crazyman->GetGUID()); - Arthas->GetMotionMaster()->MovePoint(0, 2092.154f,1276.645f,140.52f); - ++phase; - phasetim = 3000; - break; - case 73: - Arthas->HandleEmoteCommand(37); - ++phase; - phasetim = 1000; - break; - case 75: - Crazyman->DealDamage(Crazyman, Crazyman->GetMaxHealth(),NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - ++phase; - phasetim = 1000; - break; - case 77: - Stalker = Arthas->SummonCreature(20562,2081.447f,1287.770f,141.3241f,1.37f,TEMPSUMMON_TIMED_DESPAWN,70000); - Stalker->SetVisibility(VISIBILITY_OFF); - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Stalker->GetGUID()); - DoScriptText(SAY_ENTER05, Arthas); - ++phase; - phasetim = 3000; - break; - case 79: - StalkerM = Arthas->SummonCreature(20562,2117.349f,1288.624f,136.271f,1.37f,TEMPSUMMON_TIMED_DESPAWN,60000); - StalkerM->SetVisibility(VISIBILITY_OFF); - StalkerM->CastSpell(StalkerM,63793,false); - ++phase; - phasetim = 1000; - break; - case 81: - TempMalganis = Arthas->SummonCreature(26533,2117.349f,1288.624f,136.271f,1.37f,TEMPSUMMON_TIMED_DESPAWN,29000); - DoScriptText(SAY_ENTER06, TempMalganis); - TempMalganis->SetVisibility(VISIBILITY_ON); - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, TempMalganis->GetGUID()); - TempMalganis->SetUInt64Value(UNIT_FIELD_TARGET, Arthas->GetGUID()); - TempMalganis->setFaction(35); - ++phase; - phasetim = 11000; - break; - case 83: - phasetim = 500; - if (uiZombie_counter < ENCOUNTER_ZOMBIE_NUMBER) - { - if (Creature* TempZombie = GetClosestCreatureWithEntry(StalkerM, NPC_CITY_MAN, 100.0f)) - { - TempZombie->UpdateEntry(NPC_ZOMBIE, 0); - uiZombie_counter++; - ++phase; - tmpZombie = 4; - } - } - else - { - uiZombie_counter = 0; - ++phase; - } - break; - case 85: - phasetim = 500; - if (uiZombie_counter < ENCOUNTER_ZOMBIE_NUMBER) - { - if (Creature* TempZombie = GetClosestCreatureWithEntry(StalkerM, NPC_CRAZY_MAN, 100.0f)) - { - TempZombie->UpdateEntry(NPC_ZOMBIE, 0); - uiZombie_counter++; - } - } - else - { - uiZombie_counter = 0; - ++phase; - } - break; - case 87: - DoScriptText(SAY_ENTER07, TempMalganis); - Arthas->RemoveSplineFlag(SPLINEFLAG_WALKMODE); - ++phase; - phasetim = 17000; - if (SalrammGUID = m_pInstance->GetData64(DATA_SALRAMM)) - { - // check if it has ben killed already - if(m_pInstance->GetData(TYPE_SALRAMM_EVENT) != DONE) - { - Salramm = m_pInstance->instance->GetCreature(SalrammGUID); - // set his flags back to be atackable if there is no cd on this boss - Salramm->SetVisibility(VISIBILITY_ON); - Salramm->setFaction(14); - Salramm->RemoveSplineFlag(SPLINEFLAG_WALKMODE); - Salramm->GetMotionMaster()->MovePoint(0, 2165.110f,1284.64f,133.29f); - } - // already has ben killed as the db says so needs to die or just leave him with invisible flag - if(m_pInstance->GetData(TYPE_SALRAMM_EVENT) == DONE) - { - Salramm = m_pInstance->instance->GetCreature(SalrammGUID); - Salramm->SetDeadByDefault(true); - } - } - break; - case 89: - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, StalkerM->GetGUID()); - DoScriptText(SAY_ENTER08, Arthas); - ++phase; - phasetim = 7000; - break; - case 91: - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Stalker->GetGUID()); - DoScriptText(SAY_ENTER09, Arthas); - ++phase; - phasetim = 12000; - break; - case 93: - phaseAI = 95; - - if (m_pInstance) - m_pInstance->SetData(TYPE_ARTHAS_EVENT, IN_PROGRESS); - - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, 0); - - if (npc_arthasAI* pEscortAI = dynamic_cast(Arthas->AI())) - pEscortAI->Start(false, false, culling_faction->GetGUID(), NULL, false, false); - - Arthas->setFaction(culling_faction->getFaction()); - arthas_event = 2; - ++phase; - phasetim = 1000; - break; - - } - } - else - return; - - if(arthas_event == 1) - { - if (phasetim <= diff) - { - ++phase; - phasetim = 330000; - } - phasetim -= diff; - } - } -}; - -CreatureAI* GetAI_npc_arthas(Creature* pCreature) -{ - return new npc_arthasAI(pCreature); -} - -bool GossipHello_npc_arthas(Player *player, Creature *mCreature) -{ - if (mCreature->isQuestGiver()) - player->PrepareQuestMenu(mCreature->GetGUID()); - - if(((npc_arthasAI*)mCreature->AI())->arthas_event == 0) - { - if (player->FindQuestSlot(13151)>=25) - { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "You don't have the Quest for this instance", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - player->SEND_GOSSIP_MENU(player->GetGossipTextId(mCreature), mCreature->GetGUID()); - return true; - } - if (player->FindQuestSlot(13151)<=25) - { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I\'m ready start culling of stratholme", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - player->SEND_GOSSIP_MENU(player->GetGossipTextId(mCreature), mCreature->GetGUID()); - return true; - } - } - if(((npc_arthasAI*)mCreature->AI())->FinalFight == 1) - { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "We are ready to Final Combat!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); - player->SEND_GOSSIP_MENU(player->GetGossipTextId(mCreature), mCreature->GetGUID()); - player->hasQuest(13151); - return true; - } - return true; -} - -bool GossipSelect_npc_arthas(Player *player, Creature *mCreature, uint32 sender, uint32 uiAction ) -{ - switch(uiAction) - { - case GOSSIP_ACTION_INFO_DEF+1: - player->CLOSE_GOSSIP_MENU(); - ((npc_arthasAI*)mCreature->AI())->arthas_event = 1; - break; - case GOSSIP_ACTION_INFO_DEF+2: - player->CLOSE_GOSSIP_MENU(); - break; - case GOSSIP_ACTION_INFO_DEF+3: - player->CLOSE_GOSSIP_MENU(); - ((npc_arthasAI*)mCreature->AI())->FinalFight = 2; - } - ((npc_arthasAI*)mCreature->AI())->culling_faction = player; - - return true; -} - -/*###### -## npc_patricia -######*/ -struct MANGOS_DLL_DECL npc_patriciaAI : public ScriptedAI -{ - npc_patriciaAI(Creature *c) : ScriptedAI(c) - { - m_pInstance = (ScriptedInstance*)c->GetInstanceData(); - Reset(); - } - - ScriptedInstance* m_pInstance; - - Unit* Target; - Creature* Arthas; - Creature* Meathook; - Creature* Patricia; - - uint32 Step; - uint32 Steptim; - uint64 MeathookGUID; - bool Event; - bool Event2; - bool Event2Com; - - void Reset() - { - Event = false; - Event2 = true; - Event2Com = false; - Step = 1; - Steptim = 20000; - if(Event == true){} - else - Event = false; - } - - void MoveInLineOfSight(Unit *who) - { - - if (Event2 == false) - { - Target = who; - Event2Com = true; - } - - if (Event == false && m_creature->IsWithinDistInMap(who, 20.0f)) - { - if (m_pInstance->GetData(TYPE_ARTHAS_EVENT) == IN_PROGRESS) - { - Event = true; - } - } - ScriptedAI::MoveInLineOfSight(who); - } - - void UpdateAI(const uint32 diff) - { - DoMeleeAttackIfReady(); - - if(Event == true) - { - switch(Step) - { - case 1: - Patricia = m_creature; - DoScriptText(SAY_PEOPLE05, Patricia); - ++Step; - Steptim = 5000; - break; - case 3: - if (MeathookGUID = m_pInstance->GetData64(DATA_MEATHOOK)) - { - // check if it has ben killed already - if (m_pInstance->GetData(TYPE_MEATHOOK_EVENT) != DONE) - { - Meathook = m_pInstance->instance->GetCreature(MeathookGUID); - Meathook->SetVisibility(VISIBILITY_ON); - Meathook->setFaction(14); - Meathook->GetMotionMaster()->MovePoint(0, 2354.626f,1192.099f,130.535f); - DoScriptText(SAY_MEATHOOK_SPAWN, Meathook); - } - // If is on cooldown kill it - if(m_pInstance->GetData(TYPE_MEATHOOK_EVENT) == DONE) - { - Meathook = m_pInstance->instance->GetCreature(MeathookGUID); - Meathook->SetDeadByDefault(true); - } - } - Patricia->RemoveSplineFlag(SPLINEFLAG_WALKMODE); - DoScriptText(SAY_PEOPLE06, Patricia); - Patricia->GetMotionMaster()->MovePoint(0, 2395.487f,1203.199f,134.125f); - ++Step; - Steptim = 13000; - break; - case 5: - Patricia->GetMotionMaster()->MovePoint(0, 2431.674f,1211.797f,134.124f); - ++Step; - Steptim = 7000; - break; - case 7: - Patricia->GetMotionMaster()->MovePoint(0, 2438.028f,1206.680f,133.935f); - ++Step; - Steptim = 3000; - break; - case 9: - Patricia->GetMotionMaster()->MovePoint(0, 2437.524f,1206.971f,133.935f); - Event2 = false; - ++Step; - Steptim = 3000; - break; - case 11: - if(Event2Com == false) - return; - Patricia->SetUInt64Value(UNIT_FIELD_TARGET, Target->GetGUID()); - ++Step; - Steptim = 1000; - break; - case 13: - DoScriptText(SAY_PEOPLE07, m_creature); - ++Step; - Steptim = 4000; - break; - case 15: - DoScriptText(SAY_PEOPLE08, m_creature); - ++Step; - Steptim = 4000; - break; - case 17: - DoScriptText(SAY_PEOPLE09, m_creature); - ++Step; - Steptim = 9000; - break; - case 19: - m_creature->UpdateEntry(NPC_ZOMBIE, 0); - Event = 0; - ++Step; - Steptim = 7000; - break; - } - } - else - return; - - if (Steptim <= diff) - { - ++Step; - Steptim = 330000; - } - Steptim -= diff; - - } -}; - -CreatureAI* GetAI_npc_patricia(Creature* pCreature) -{ - return new npc_patriciaAI(pCreature); -} - -/*###### -## dark_conversion_AI -######*/ -struct MANGOS_DLL_DECL dark_conversionAI : public ScriptedAI -{ - dark_conversionAI(Creature *c) : ScriptedAI(c) - { - m_pInstance = (ScriptedInstance*)c->GetInstanceData(); - Reset(); - } - - ScriptedInstance* m_pInstance; - - Unit* Target; - Creature* Arthas; - bool Conversion; - uint32 Step; - uint32 Steptim; - - void Reset() - { - m_creature->setFaction(35); - Conversion = false; - Step = 1; - Steptim = 500; - } - - void MoveInLineOfSight(Unit *who) - { - if (Conversion == false && m_creature->IsWithinDistInMap(who, 30.0f)) - { - if (m_pInstance->GetData(TYPE_ARTHAS_EVENT) == IN_PROGRESS) - { - Target = who; - Conversion = true; - } - } - ScriptedAI::MoveInLineOfSight(who); - } - - void UpdateAI(const uint32 diff) - { - - DoMeleeAttackIfReady(); - - if(Conversion == true) - { - switch(Step) - { - case 1: - m_creature->setFaction(14); //2078 - m_creature->CastSpell(m_creature,SPELL_FEAR,false); - switch(rand()%12) - { - case 0: DoScriptText(SAY_PEOPLE01, m_creature); break; - case 1: DoScriptText(SAY_PEOPLE02, m_creature); break; - case 2: DoScriptText(SAY_PEOPLE03, m_creature); break; - case 3: DoScriptText(SAY_PEOPLE04, m_creature); break; - case 4: DoScriptText(SAY_PEOPLE10, m_creature); break; - case 5: DoScriptText(SAY_PEOPLE11, m_creature); break; - case 6: DoScriptText(SAY_PEOPLE12, m_creature); break; - case 7: DoScriptText(SAY_PEOPLE13, m_creature); break; - } - ++Step; - Steptim = 5000 + rand()%5000; - break; - case 3: - m_creature->UpdateEntry(NPC_ZOMBIE, 0); - m_creature->GetMotionMaster()->MovePoint(0, Target->GetPositionX(), Target->GetPositionY(), Target->GetPositionZ()); - ++Step; - Steptim = 1000; - break; - } - } - else - return; - - if (Steptim <= diff) - { - ++Step; - Steptim = 330000; - } - Steptim -= diff; - - } -}; - -CreatureAI* GetAI_dark_conversion(Creature* pCreature) -{ - return new dark_conversionAI(pCreature); -} - -/*###### -## npc_time_riftCSAI -######*/ -struct MANGOS_DLL_DECL npc_time_riftCSAI : public ScriptedAI -{ - npc_time_riftCSAI(Creature *c) : ScriptedAI(c) - { - Reset(); - } - - Creature* Drakonian01; - Creature* Drakonian02; - Creature* Drakonian03; - Creature* Arthas; - bool Conversion; - uint32 Step; - uint32 Steptim; - - void Reset() - { - Conversion = false; - Step = 1; - Steptim = 500; - } - void UpdateAI(const uint32 diff) - { - switch(Step) - { - case 1: - if (Creature* pArthas = GetClosestCreatureWithEntry(m_creature, NPC_ARTHAS, 180.0f)) - Arthas = pArthas; - Drakonian01 = m_creature->SummonCreature(NPC_DRAKONIAN,m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ()+1,3.229f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,900000); - Drakonian01->GetMotionMaster()->MovePoint(0, Arthas->GetPositionX(), Arthas->GetPositionY(), Arthas->GetPositionZ()); - ++Step; - Steptim = 3000; - break; - case 3: - Drakonian02 = m_creature->SummonCreature(NPC_DRAKONIAN,m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ()+1,3.229f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,900000); - Drakonian02->GetMotionMaster()->MovePoint(0, Arthas->GetPositionX(), Arthas->GetPositionY(), Arthas->GetPositionZ()); - ++Step; - Steptim = 3000; - break; - case 5: - Drakonian03 = m_creature->SummonCreature(NPC_DRAKONIAN,m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ()+1,3.229f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,900000); - Drakonian03->GetMotionMaster()->MovePoint(0, Arthas->GetPositionX(), Arthas->GetPositionY(), Arthas->GetPositionZ()); - ++Step; - Steptim = 3000; - break; - } - - if (Steptim <= diff) - { - ++Step; - Steptim = 330000; - } - Steptim -= diff; - } -}; - -CreatureAI* GetAI_npc_time_riftCS(Creature* pCreature) -{ - return new npc_time_riftCSAI(pCreature); -} - -void AddSC_culling_of_stratholme() -{ - Script *newscript; - - newscript = new Script; - newscript->Name = "npc_arthas"; - newscript->GetAI = &GetAI_npc_arthas; - newscript->pGossipHello = &GossipHello_npc_arthas; - newscript->pGossipSelect = &GossipSelect_npc_arthas; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "dark_conversion"; - newscript->GetAI = &GetAI_dark_conversion; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_patricia"; - newscript->GetAI = &GetAI_npc_patricia; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_time_riftCS"; - newscript->GetAI = &GetAI_npc_time_riftCS; - newscript->RegisterSelf(); +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + +/* ScriptData +SDName: instance_culling_of_stratholme +SD%Complete: ?% +SDComment: +SDCategory: Culling of Stratholme +EndScriptData */ + + +#include "precompiled.h" +#include "def_culling_of_stratholme.h" +#include "escort_ai.h" + +enum +{ + SAY_INTRO01 = -1594071, //Arthas + SAY_INTRO02 = -1594072, //Uther + SAY_INTRO03 = -1594073, //Arthas + SAY_INTRO04 = -1594074, //Arthas + SAY_INTRO05 = -1594075, //Uther + SAY_INTRO06 = -1594076, //Arthas + SAY_INTRO07 = -1594077, //Uther + SAY_INTRO08 = -1594078, //Arthas + SAY_INTRO09 = -1594079, //Arthas + SAY_INTRO10 = -1594080, //Uther + SAY_INTRO11 = -1594081, //Arthas + SAY_INTRO12 = -1594082, //Uther + SAY_INTRO13 = -1594083, //Jaina + SAY_INTRO14 = -1594084, //Arthas + SAY_INTRO15 = -1594085, //Uther + SAY_INTRO16 = -1594086, //Arthas + SAY_INTRO17 = -1594087, //Jaina + SAY_INTRO18 = -1594088, //Arthas + SAY_ENTER01 = -1594089, //Arthas + SAY_ENTER02 = -1594090, //Cityman + SAY_ENTER03 = -1594091, //Arthas + SAY_ENTER04 = -1594092, //Crazyman + SAY_ENTER05 = -1594093, //Arthas + SAY_ENTER06 = -1594094, //Malganis + SAY_ENTER07 = -1594095, //Malganis + SAY_ENTER08 = -1594096, //Arthas + SAY_ENTER09 = -1594097, //Arthas + SAY_PHASE501 = -1594098, //Arthas + SAY_PHASE502 = -1594099, //Arthas + SAY_PEOPLE05 = -1594100, //Patricia + SAY_PEOPLE06 = -1594101, //Patricia + SAY_PEOPLE07 = -1594103, //Patricia + SAY_PEOPLE08 = -1594105, //Patricia + SAY_PEOPLE09 = -1594106, //Patricia + SAY_EPOCH = -1594117, //Arthas Dialog for Epoch + SAY_MEATHOOK_SPAWN = -1594110, + SAY_PEOPLE01 = -1594107, //People Run + SAY_PEOPLE02 = -1594108, //People Run + SAY_PEOPLE03 = -1594109, //People Run + SAY_PEOPLE04 = -1594104, //People Run + SAY_PEOPLE10 = -1594102, //People Run + SAY_PEOPLE11 = -1594126, //People Run + SAY_PEOPLE12 = -1594127, //People Run + SAY_PEOPLE13 = -1594128, //People Run + SAY_PHASE503 = -1594152, //Arthas Shkaf 01 + SAY_PHASE504 = -1594153, //Arthas Shkaf 02 + SAY_PHASE505 = -1594142, //Arthas Glore + SAY_PHASE506 = -1594143, //Arthas That is it + SAY_PHASE507 = -1594144, //Arthas + SAY_PHASE508 = -1594145, //Arthas This Magic Again + SAY_PHASE509 = -1594147, //Arthas We are Close in trap + SAY_PHASE510 = -1594146, //Arthas Lets go + SAY_PHASE511 = -1594151, //Arthas Shkaff tam + SAY_PHASE601 = -1594154, //Arthas Fire + SAY_PHASE602 = -1594155, //Arthas Picnic + SAY_PHASE603 = -1594156, //Arthas Picnic End + SAY_PHASE604 = -1594157, //Arthas Stop Escort ska on ne virybaetsa + SAY_PHASE605 = -1594158, //Arthas Pipec Malganisy + + NPC_SCARED_MAN_2 = 31127, + NPC_DRAKONIAN = 27744, + NPC_TIME_RIFT = 28409, + NPC_TIME_RIFT_2 = 28439, + NPC_PATRICIA = 31028, + NPC_SCARED_MAN = 31126, + NPC_KNIGHT_ESCORT = 27745, + NPC_PRIEST_ESCORT = 27747, + NPC_JAINA = 26497, + NPC_UTHER = 26528, + NPC_CITY_MAN = 28167, + NPC_CRAZY_MAN = 28169, + NPC_ZOMBIE = 27737, + + SPELL_FEAR = 39176, + SPELL_CHAIN_N = 52696, + SPELL_CHAIN_H = 58823, + SPELL_EXPLODED_N = 52666, + SPELL_EXPLODED_H = 58821, + SPELL_FRENZY = 58841, + SPELL_ARTHAS_AURA = 52442, + SPELL_EXORCISM_N = 52445, + SPELL_EXORCISM_H = 58822, + SPELL_HOLY_LIGHT = 52444, + + SPELL_SUMMON_VISUAL = 53708, + + ENCOUNTER_ZOMBIE_NUMBER = 4, + ENCOUNTER_ZOMBIE_NUMBER2 = 50, + + // Wave Event + NPC_PATCHWORK = 27736, + NPC_GOLEM = 28201, + NPC_NECROMANCER = 27732, + NPC_FIEND = 27734, + NPC_GHOUL = 28249, + +}; + +/*###### +## npc_arthas +######*/ +struct MANGOS_DLL_DECL npc_arthasAI : public npc_escortAI +{ + npc_arthasAI(Creature *pCreature) : npc_escortAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroic = pCreature->GetMap()->IsRegularDifficulty(); + ArthasGUID = 0; + SalrammGUID = 0; + PhaseC = false; + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint64 ArthasGUID; + uint64 MeathookGUID; + uint64 SalrammGUID; + uint64 EpochGUID; + + + bool m_bIsHeroic; + uint32 Exorcism_Timer; + uint32 FinalFight; + bool PhaseC; + uint32 arthas_event; + Unit* culling_faction; + Creature* Patricia; + Creature* StalkerM; + Creature* Crazyman; + Creature* Cityman; + Creature* Stalker; + Creature* TempZombie; + Creature* Salramm; + Creature* Meathook; + Creature* Epoch; + Creature* Malganis; + Creature* TempMalganis; + Creature* Arthas; + Creature* Jaina; + Creature* Uther; + uint32 phase; + uint32 phaseAI; + uint32 phasetim; + uint64 uiZombieGUID[ENCOUNTER_ZOMBIE_NUMBER]; + uint32 uiZombie_counter; + uint32 tmpZombie; + uint32 PatriciaEvent; + + // wave event + uint64 WaveCount; + uint64 WaveTimer; + uint64 EscortPoint; + bool WaveSpawned; + + // time event + uint64 TimeRemain; + uint64 TimeTotal; + uint64 TimePast; + uint64 TimeEventTimer; + + void Reset() + { + if(arthas_event == 2) { } + else + arthas_event = 0; + FinalFight = 1; + phase = 1; + phasetim = 20000; + Exorcism_Timer = 7300; + Arthas = m_creature; + + // wave event + WaveSpawned = false; + WaveCount = 0; + EscortPoint = 0; + WaveTimer = 60000; + + // time event + TimePast = 0; + TimeTotal = 15; // in minutes + TimeRemain = TimeTotal - TimePast; + TimeEventTimer = 60000; + + + if(m_pInstance->GetData(TYPE_ARTHAS_EVENT) == DONE) + Arthas->SetVisibility(VISIBILITY_OFF); + + // this is Arthas's start position in the instance he will give gossip only here and in front of the gate at Mal'Ganis + if(PhaseC == false && m_pInstance->GetData(TYPE_ARTHAS_EVENT) != DONE) + { + Arthas->SetVisibility(VISIBILITY_ON); + Arthas->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + Arthas->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + } + + } + + void Aggro(Unit* who) + { + DoCast(m_creature, SPELL_ARTHAS_AURA); + } + + void MoveInLineOfSight(Unit* pWho) + { + if (!pWho) + return; + + if (!m_creature->hasUnitState(UNIT_STAT_STUNNED) && pWho->isTargetableForAttack() && + m_creature->IsHostileTo(pWho) && pWho->isInAccessablePlaceFor(m_creature)) + { + if (!m_creature->canFly() && m_creature->GetDistanceZ(pWho) > CREATURE_Z_ATTACK_RANGE) + return; + + float attackRadius = m_creature->GetAttackDistance(pWho); + if (m_creature->IsWithinDistInMap(pWho, attackRadius) && m_creature->IsWithinLOSInMap(pWho)) + { + if (!m_creature->getVictim()) + { + AttackStart(pWho); + pWho->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); + } + else if (m_creature->GetMap()->IsDungeon()) + { + pWho->SetInCombatWith(m_creature); + m_creature->AddThreat(pWho, 0.0f); + } + } + } + } + + void SetWeather(uint32 weather, float grade) + { + Map *map = m_creature->GetMap(); + if (!map->IsDungeon()) return; + WorldPacket data(SMSG_WEATHER, (4+4+4)); + data << uint32(weather) << (float)grade << uint8(0); + ((InstanceMap*)map)->SendToPlayers(&data); + } + + void JustDied(Unit *killer) + { + if (m_pInstance) + { + m_pInstance->SetData(TYPE_ARTHAS_EVENT, FAIL); + } + } + + void SpawnWave(int wp) { + if(wp == 1){ + // 4 Ghouls + for(uint8 i = 0; i < 2; ++i) + { + if (Creature* pGhoul = Arthas->SummonCreature(NPC_GHOUL, 2227.03f, 1331.65f, 126.99f,1.30f,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 180000)) + { + pGhoul->AddThreat(Arthas, 0.00f); + pGhoul->GetMotionMaster()->MovePoint(0, 2165.073f,1279.338f,133.40f); + } + if (Creature* pSpider = Arthas->SummonCreature(NPC_FIEND, 2227.10f, 1331.63f, 126.99f,1.30f,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 180000)) + { + pSpider->AddThreat(Arthas, 0.00f); + pSpider->GetMotionMaster()->MovePoint(0, 2165.073f,1279.338f,133.40f); + } + } + // 2 Necromancers + for(uint8 i = 0; i < 1; ++i) + { + if (Creature* pNecro = Arthas->SummonCreature(NPC_NECROMANCER, 2227.23f, 1331.67f, 126.99f,1.30f,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 180000)) + { + pNecro->AddThreat(Arthas, 0.00f); + pNecro->GetMotionMaster()->MovePoint(0, 2165.073f,1279.338f,133.40f); + } + } + // 1 Patchwork + if (Creature* pPatch = Arthas->SummonCreature(NPC_PATCHWORK, 2227.13f, 1331.69f, 126.99f,1.30f,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 180000)) + { + pPatch->AddThreat(Arthas, 0.00f); + pPatch->GetMotionMaster()->MovePoint(0, 2165.073f,1279.338f,133.40f); + } + } else { + // 4 Ghouls + for(uint8 i = 0; i < 3; ++i) + { + if (Creature* pGhoul = Arthas->SummonCreature(NPC_GHOUL, 2199.28f, 1218.51f, 137.93f,2.12f,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 180000)) + { + pGhoul->AddThreat(Arthas, 0.00f); + pGhoul->GetMotionMaster()->MovePoint(0, 2165.073f,1279.338f,133.40f); + } + } + // 2 Necromancers + for(uint8 i = 0; i < 1; ++i) + { + if (Creature* pNecro = Arthas->SummonCreature(NPC_NECROMANCER, 2199.18f, 1218.49f, 137.93f,2.12f,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 180000)) + { + pNecro->AddThreat(Arthas, 0.00f); + pNecro->GetMotionMaster()->MovePoint(0, 2165.073f,1279.338f,133.40f); + } + } + // 1 Patchwork + if (Creature* pPatch = Arthas->SummonCreature(NPC_PATCHWORK, 2199.08f, 1218.50, 137.93f,2.12f,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 180000)) + { + pPatch->AddThreat(Arthas, 0.00f); + pPatch->GetMotionMaster()->MovePoint(0, 2165.073f,1279.338f,133.40f); + } + } + } + + void AttackStart(Unit* pWho) + { + if (!pWho) + return; + + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho, 0.0f); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == POINT_MOTION_TYPE) + m_creature->GetMotionMaster()->MovementExpired(); + + if (IsCombatMovement()) + m_creature->GetMotionMaster()->MoveChase(pWho); + } + } + + void WaypointReached(uint32 uiPointId) + { + switch(uiPointId) + { + case 1: + DoScriptText(SAY_ENTER09, Arthas); + EscortPoint = 1; + WaveTimer = 60000; + SetEscortPaused(true); + break; + case 2: + DoScriptText(SAY_PHASE502, Arthas); + break; + case 3: + Arthas->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + DoScriptText(SAY_PHASE505, Arthas); + break; + case 4: + DoScriptText(SAY_PHASE506, Arthas); + Arthas->SummonCreature(NPC_TIME_RIFT,2225.388f,1178.470f,136.289f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); + break; + case 5: + DoScriptText(SAY_PHASE507, Arthas); + + Arthas->SummonCreature(NPC_TIME_RIFT,2264.253f,1162.153f,137.919f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); + Arthas->SummonCreature(NPC_TIME_RIFT,2286.946f,1182.064f,137.986f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); + break; + case 9: + DoScriptText(SAY_PHASE509, Arthas); + Arthas->SummonCreature(NPC_TIME_RIFT,2410.561f,1187.790f,133.933f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); + Arthas->SummonCreature(NPC_TIME_RIFT,2388.574f,1214.650f,134.239f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); + Arthas->SummonCreature(NPC_TIME_RIFT,2430.593f,1212.919f,134.124f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); + break; + case 10: + DoScriptText(SAY_PHASE510, Arthas); + break; + case 11: + Arthas->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + break; + case 13: + DoScriptText(SAY_PHASE508,Arthas); + Arthas->SummonCreature(NPC_TIME_RIFT,2393.985f,1190.519f,148.076f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); + Arthas->SummonCreature(NPC_TIME_RIFT,2436.202f,1200.540f,148.077f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); + break; + case 15: + DoScriptText(SAY_PHASE511,Arthas); + Arthas->SummonCreature(NPC_TIME_RIFT_2,2445.629f,1111.500f,148.076f,3.229f,TEMPSUMMON_TIMED_DESPAWN,9000); + if (EpochGUID = m_pInstance->GetData64(DATA_EPOCH)) + { + // check if it has ben killed already + if(m_pInstance->GetData(TYPE_EPOCH_EVENT) != DONE) + { + Epoch = m_pInstance->instance->GetCreature(EpochGUID); + Epoch->SetVisibility(VISIBILITY_ON); + Epoch->setFaction(14); + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Epoch->GetGUID()); + } + // already has ben killed as the db says so needs to die + if(m_pInstance->GetData(TYPE_EPOCH_EVENT) == DONE) + { + Epoch = m_pInstance->instance->GetCreature(EpochGUID); + Epoch->SetDeadByDefault(true); + } + } + break; + case 18: + DoScriptText(SAY_EPOCH, Arthas); + break; + case 19: + break; + case 20: + Arthas->AddSplineFlag(SPLINEFLAG_WALKMODE); + break; + case 23: + DoScriptText(SAY_PHASE503,Arthas); + break; + case 24: + if (m_pInstance) + { + GameObject* pGate = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GO_SHKAF_GATE)); + pGate->SetGoState(GO_STATE_ACTIVE); + } + DoScriptText(SAY_PHASE504,Arthas); + break; + case 32: + DoScriptText(SAY_PHASE601,Arthas); + Arthas->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + break; + case 34: + Arthas->AddSplineFlag(SPLINEFLAG_WALKMODE); + DoScriptText(SAY_PHASE602,Arthas); + break; + case 35: + Arthas->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + DoScriptText(SAY_PHASE603,Arthas); + break; + case 40: + DoScriptText(SAY_PHASE604,Arthas); + break; + case 41: + FinalFight = 1; + Arthas->setFaction(35); + phaseAI = 94; + break; + } + } + + void UpdateAI(const uint32 diff) + { + npc_escortAI::UpdateAI(diff); + + DoMeleeAttackIfReady(); + + // time event + if (m_pInstance->GetData(TYPE_ARTHAS_EVENT) == IN_PROGRESS) + { + if (TimeEventTimer <= diff) + { + if (TimeRemain == 0) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_TIME_EVENT, FAIL); + return; + } + + --TimeRemain; + TimeEventTimer = 60000; + m_pInstance->DoUpdateWorldState(WORLD_STATE_REMAIN, TimeRemain); + } + else + TimeEventTimer -= diff; + } + + // wave event + if(EscortPoint == 1){ + switch(WaveCount) { + case 1: + m_pInstance->DoUpdateWorldState(WORLD_STATE_WAVE, true); + m_pInstance->DoUpdateWorldState(WORLD_STATE_WAVE, WaveCount); + + if (WaveTimer < diff){ + WaveTimer = 60000; + WaveSpawned = false; + ++WaveCount; + } else WaveTimer -= diff; + + if(!WaveSpawned) { + WaveSpawned = true; + SpawnWave(urand(0,1)); + } + + break; + case 2: + m_pInstance->DoUpdateWorldState(WORLD_STATE_WAVE, WaveCount); + + if (WaveTimer < diff){ + WaveTimer = 60000; + WaveSpawned = false; + ++WaveCount; + } else WaveTimer -= diff; + + if(!WaveSpawned) { + WaveSpawned = true; + SpawnWave(urand(0,1)); + } + + break; + case 3: + m_pInstance->DoUpdateWorldState(WORLD_STATE_WAVE, WaveCount); + + if (WaveTimer < diff){ + WaveTimer = 60000; + WaveSpawned = false; + ++WaveCount; + } else WaveTimer -= diff; + + if(!WaveSpawned) { + WaveSpawned = true; + SpawnWave(urand(0,1)); + } + break; + case 4: + m_pInstance->DoUpdateWorldState(WORLD_STATE_WAVE, WaveCount); + + if (WaveTimer < diff){ + WaveTimer = 60000; + WaveSpawned = false; + ++WaveCount; + } else WaveTimer -= diff; + + if(!WaveSpawned) { + WaveSpawned = true; + SpawnWave(urand(0,1)); + } + + break; + case 5: + m_pInstance->DoUpdateWorldState(WORLD_STATE_WAVE, WaveCount); + if (MeathookGUID = m_pInstance->GetData64(DATA_MEATHOOK)) + { + // check if it has ben killed already + if (m_pInstance->GetData(TYPE_MEATHOOK_EVENT) != DONE) + { + Meathook = m_pInstance->instance->GetCreature(MeathookGUID); + Meathook->SetVisibility(VISIBILITY_ON); + Meathook->setFaction(14); + Meathook->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + Meathook->GetMotionMaster()->MovePoint(0, 2165.073f,1279.338f,133.40f); + DoScriptText(SAY_MEATHOOK_SPAWN, Meathook); + } + // If is on cooldown kill it + if(m_pInstance->GetData(TYPE_MEATHOOK_EVENT) == DONE) + { + Meathook = m_pInstance->instance->GetCreature(MeathookGUID); + Meathook->SetDeadByDefault(true); + } + } + if (WaveTimer < diff){ + WaveTimer = 60000; + ++WaveCount; + } else WaveTimer -= diff; + break; + case 6: + m_pInstance->DoUpdateWorldState(WORLD_STATE_WAVE, WaveCount); + + if (WaveTimer < diff){ + WaveTimer = 60000; + WaveSpawned = false; + ++WaveCount; + } else WaveTimer -= diff; + + if(!WaveSpawned) { + WaveSpawned = true; + SpawnWave(urand(0,1)); + } + break; + case 7: + m_pInstance->DoUpdateWorldState(WORLD_STATE_WAVE, WaveCount); + if (WaveTimer < diff){ + WaveTimer = 60000; + WaveSpawned = false; + ++WaveCount; + } else WaveTimer -= diff; + + if(!WaveSpawned) { + WaveSpawned = true; + SpawnWave(urand(0,1)); + } + break; + case 8: + m_pInstance->DoUpdateWorldState(WORLD_STATE_WAVE, WaveCount); + + if (WaveTimer < diff){ + WaveTimer = 60000; + WaveSpawned = false; + ++WaveCount; + } else WaveTimer -= diff; + + if(!WaveSpawned) { + WaveSpawned = true; + SpawnWave(urand(0,1)); + } + break; + case 9: + m_pInstance->DoUpdateWorldState(WORLD_STATE_WAVE, WaveCount); + if (WaveTimer < diff){ + WaveTimer = 60000; + WaveSpawned = false; + ++WaveCount; + } else WaveTimer -= diff; + + if(!WaveSpawned) { + WaveSpawned = true; + SpawnWave(urand(0,1)); + } + break; + case 10: + m_pInstance->DoUpdateWorldState(WORLD_STATE_WAVE, WaveCount); + if (SalrammGUID = m_pInstance->GetData64(DATA_SALRAMM)) + { + // check if it has ben killed already + if(m_pInstance->GetData(TYPE_SALRAMM_EVENT) != DONE) + { + Salramm = m_pInstance->instance->GetCreature(SalrammGUID); + // set his flags back to be atackable if there is no cd on this boss + Salramm->SetVisibility(VISIBILITY_ON); + Salramm->setFaction(14); + Salramm->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + Salramm->GetMotionMaster()->MovePoint(0, 2165.073f,1279.338f,133.40f); + } + // already has ben killed as the db says so needs to die or just leave him with invisible flag + if(m_pInstance->GetData(TYPE_SALRAMM_EVENT) == DONE) + { + Salramm = m_pInstance->instance->GetCreature(SalrammGUID); + Salramm->SetDeadByDefault(true); + } + } + + if (WaveTimer < diff){ + WaveTimer = 60000; + ++WaveCount; + m_pInstance->DoUpdateWorldState(WORLD_STATE_WAVE, false); + } else WaveTimer -= diff; + break; + case 11: + DoScriptText(SAY_PHASE501, Arthas); + SetEscortPaused(false); + EscortPoint = 0; + break; + } + } + + + if (phaseAI == 94 && FinalFight != 2) + { + Arthas->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + Arthas->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + } + if(FinalFight == 2) + { + Arthas->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + Arthas->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + switch(phaseAI) + { + case 95: + DoScriptText(SAY_PHASE605, Arthas); + if (m_pInstance) + { + GameObject* pGate = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GO_MAL_GATE1)); + pGate->SetGoState(GO_STATE_ACTIVE); + } + ++phaseAI; + phasetim = 3000; + break; + case 97: + Arthas->GetMotionMaster()->MovePoint(0, 2303.016f, 1480.070f, 128.139f); + ++phaseAI; + phasetim = 3000; + break; + case 99: + Arthas->setFaction(culling_faction->getFaction()); + ++phaseAI; + phasetim = 3000; + break; + } + } + + if(FinalFight == 2) + { + if (phasetim <= diff) + { + ++phaseAI; + phasetim = 330000; + } + phasetim -= diff; + } + + if(EscortPoint == 1) + { + if (phasetim <= diff) + { + ++WaveCount; + phasetim = 10000; + } + phasetim -= diff; + } + + if(arthas_event == 2) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (Exorcism_Timer < diff) + { + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + DoCast(target, m_bIsHeroic ? SPELL_EXORCISM_H : SPELL_EXORCISM_N); + + Exorcism_Timer = 7300; + } + else + Exorcism_Timer -= diff; + + if(m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 40) + DoCast(m_creature, SPELL_HOLY_LIGHT); + } + + if(arthas_event == 1) + { + Arthas->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + Arthas->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + switch(phase) + { + case 1: + PhaseC = true; + + Arthas = m_creature; + Arthas->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + Uther = Arthas->SummonCreature(26528, 1794.357f,1272.183f,141.558f,1.37f,TEMPSUMMON_TIMED_DESPAWN,180000); + Jaina = Arthas->SummonCreature(26497, 1870.21f, 1303.38f, 146.51f, 1.37f,TEMPSUMMON_TIMED_DESPAWN,180000); + + if (m_pInstance) + m_pInstance->SetData(TYPE_TIME_EVENT, NOT_STARTED); + if (m_pInstance) + m_pInstance->SetData(TYPE_ARTHAS_EVENT, NOT_STARTED); + + Uther->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + Arthas->GetMotionMaster()->MovePoint(0, 1903.167f, 1291.573f, 143.32f); + Uther->GetMotionMaster()->MovePoint(0, 1897.018f, 1287.487f, 143.481f); + Jaina->GetMotionMaster()->MovePoint(0, 1895.48f, 1292.66f, 143.706f); + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Uther->GetGUID()); + Uther->SetUInt64Value(UNIT_FIELD_TARGET, Arthas->GetGUID()); + ++phase; + phasetim = 17000; + break; + case 3: + DoScriptText(SAY_INTRO01, Arthas); + ++phase; + phasetim = 2000; + break; + case 5: + DoScriptText(SAY_INTRO02, Uther); + ++phase; + phasetim = 8000; + break; + case 7: + Arthas->AddSplineFlag(SPLINEFLAG_WALKMODE); + DoScriptText(SAY_INTRO03, Arthas); + Arthas->GetMotionMaster()->MovePoint(0, 1911.087f, 1314.263f, 150.026f); + ++phase; + phasetim = 9000; + break; + case 9: + Jaina->SetUInt64Value(UNIT_FIELD_TARGET, Arthas->GetGUID()); + DoScriptText(SAY_INTRO04, Arthas); + ++phase; + phasetim = 10000; + break; + case 11: + DoScriptText(SAY_INTRO05, Uther); + ++phase; + phasetim = 1000; + break; + case 13: + DoScriptText(SAY_INTRO06, Arthas); + ++phase; + phasetim = 4000; + break; + case 15: + DoScriptText(SAY_INTRO07, Uther); + ++phase; + phasetim = 6000; + break; + case 17: + DoScriptText(SAY_INTRO08, Arthas); + ++phase; + phasetim = 4000; + break; + case 19: + DoScriptText(SAY_INTRO09, Uther); + ++phase; + phasetim = 8000; + break; + case 21: + DoScriptText(SAY_INTRO10, Arthas); + ++phase; + phasetim = 4000; + break; + case 23: + DoScriptText(SAY_INTRO11, Uther); + ++phase; + phasetim = 4000; + break; + case 25: + DoScriptText(SAY_INTRO12, Arthas); + ++phase; + phasetim = 11000; + break; + case 27: + DoScriptText(SAY_INTRO13, Jaina); + ++phase; + phasetim = 2000; + break; + case 29: + DoScriptText(SAY_INTRO14, Arthas); + ++phase; + phasetim = 9000; + break; + case 31: + DoScriptText(SAY_INTRO15, Uther); + ++phase; + phasetim = 4000; + break; + case 33: + Uther->AddSplineFlag(SPLINEFLAG_WALKMODE); + Uther->GetMotionMaster()->MovePoint(0, 1794.357f,1272.183f,141.558f); + ++phase; + phasetim = 1000; + break; + case 35: + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Jaina->GetGUID()); + ++phase; + phasetim = 1000; + break; + case 37: + Jaina->GetMotionMaster()->MovePoint(0, 1794.357f,1272.183f,141.558f); + DoScriptText(SAY_INTRO16, Arthas); + ++phase; + phasetim = 1000; + break; + case 39: + DoScriptText(SAY_INTRO17, Jaina); + ++phase; + phasetim = 3000; + break; + case 41: + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, 0); + Arthas->GetMotionMaster()->MovePoint(0, 1902.959f,1295.127f,143.388f); + ++phase; + phasetim = 10000; + break; + case 43: + Arthas->GetMotionMaster()->MovePoint(0, 1913.726f,1287.407f,141.927f); + ++phase; + phasetim = 6000; + break; + case 45: + DoScriptText(SAY_INTRO18, Arthas); + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Jaina->GetGUID()); + ++phase; + phasetim = 10000; + break; + case 47: + Arthas->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, 0); + Jaina->SetVisibility(VISIBILITY_OFF); + Uther->SetVisibility(VISIBILITY_OFF); + Arthas->GetMotionMaster()->MovePoint(0, 1990.833f,1293.391f,145.467f); + ++phase; + phasetim = 12000; + break; + case 49: + Arthas->GetMotionMaster()->MovePoint(0, 1997.003f,1317.776f,142.963f); + ++phase; + phasetim = 5000; + break; + case 51: + Arthas->GetMotionMaster()->MovePoint(0, 2019.631f,1326.084f,142.929f); + ++phase; + phasetim = 4000; + break; + case 53: + Arthas->GetMotionMaster()->MovePoint(0, 2026.469f,1287.088f,143.596f); + ++phase; + phasetim = 6000; + break; + case 55: + Cityman = Arthas->SummonCreature(NPC_CITY_MAN,2091.977f,1275.021f,140.757f,0.558f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,60000); + Crazyman = Arthas->SummonCreature(NPC_CRAZY_MAN,2093.514f,1275.842f,140.408f,3.801f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,60000); + Arthas->GetMotionMaster()->MovePoint(0, 2050.660f,1287.333f,142.671f); + ++phase; + phasetim = 6000; + break; + case 57: + Stalker = Arthas->SummonCreature(20562,2026.469f,1287.088f,143.596f,1.37f,TEMPSUMMON_TIMED_DESPAWN,14000); + Stalker->SetVisibility(VISIBILITY_OFF); + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Stalker->GetGUID()); + ++phase; + phasetim = 1000; + break; + case 59: + DoScriptText(SAY_ENTER01, Arthas); + ++phase; + phasetim = 12000; + break; + case 61: + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, 0); + Arthas->AddSplineFlag(SPLINEFLAG_WALKMODE); + Arthas->GetMotionMaster()->MovePoint(0, 2081.447f,1287.770f,141.3241f); + ++phase; + phasetim = 15000; + break; + case 63: + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Cityman->GetGUID()); + Cityman->SetUInt64Value(UNIT_FIELD_TARGET, Arthas->GetGUID()); + Cityman->AddSplineFlag(SPLINEFLAG_WALKMODE); + Cityman->GetMotionMaster()->MovePoint(0, 2088.625f,1279.191f,140.743f); + ++phase; + phasetim = 2000; + break; + case 65: + DoScriptText(SAY_ENTER02, Cityman); + ++phase; + phasetim = 4000; + break; + case 67: + Arthas->GetMotionMaster()->MovePoint(0, 2087.689f,1280.344f,140.73f); + DoScriptText(SAY_ENTER03, Arthas); + ++phase; + phasetim = 3000; + break; + case 69: + Arthas->HandleEmoteCommand(37); + ++phase; + phasetim = 1000; + break; + case 71: + DoScriptText(SAY_ENTER04, Crazyman); + Crazyman->SetUInt64Value(UNIT_FIELD_TARGET, Arthas->GetGUID()); + Cityman->DealDamage(Cityman, Cityman->GetMaxHealth(),NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Crazyman->GetGUID()); + Arthas->GetMotionMaster()->MovePoint(0, 2092.154f,1276.645f,140.52f); + ++phase; + phasetim = 3000; + break; + case 73: + Arthas->HandleEmoteCommand(37); + ++phase; + phasetim = 1000; + break; + case 75: + Crazyman->DealDamage(Crazyman, Crazyman->GetMaxHealth(),NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + ++phase; + phasetim = 1000; + break; + case 77: + Stalker = Arthas->SummonCreature(20562,2081.447f,1287.770f,141.3241f,1.37f,TEMPSUMMON_TIMED_DESPAWN,70000); + Stalker->SetVisibility(VISIBILITY_OFF); + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Stalker->GetGUID()); + DoScriptText(SAY_ENTER05, Arthas); + ++phase; + phasetim = 2000; + break; + case 79: + StalkerM = Arthas->SummonCreature(20562,2117.349f,1288.624f,136.271f,1.37f,TEMPSUMMON_TIMED_DESPAWN,60000); + StalkerM->SetVisibility(VISIBILITY_OFF); + StalkerM->CastSpell(StalkerM,63793,false); + ++phase; + phasetim = 1000; + break; + case 81: + TempMalganis = Arthas->SummonCreature(26533,2117.349f,1288.624f,136.271f,1.37f,TEMPSUMMON_TIMED_DESPAWN,29000); + DoScriptText(SAY_ENTER06, TempMalganis); + TempMalganis->SetVisibility(VISIBILITY_ON); + TempMalganis->CastSpell(TempMalganis, SPELL_SUMMON_VISUAL, true); + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, TempMalganis->GetGUID()); + TempMalganis->SetUInt64Value(UNIT_FIELD_TARGET, Arthas->GetGUID()); + TempMalganis->setFaction(35); + ++phase; + phasetim = 11000; + break; + case 83: + phasetim = 500; + ++phase; + break; + case 85: + phasetim = 500; + ++phase; + break; + case 87: + DoScriptText(SAY_ENTER07, TempMalganis); + Arthas->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + ++phase; + phasetim = 17000; + break; + case 89: + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, StalkerM->GetGUID()); + DoScriptText(SAY_ENTER08, Arthas); + ++phase; + phasetim = 7000; + break; + case 91: + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Stalker->GetGUID()); + ++phase; + phasetim = 1000; + break; + case 93: + // time event if heroic + m_pInstance->DoUpdateWorldState(WORLD_STATE_TIME, true); + m_pInstance->DoUpdateWorldState(WORLD_STATE_REMAIN, TimeRemain); + + WaveCount = 0; + phaseAI = 95; + + + if (m_pInstance) + m_pInstance->SetData(TYPE_ARTHAS_EVENT, IN_PROGRESS); + if (m_pInstance) + m_pInstance->SetData(TYPE_TIME_EVENT, IN_PROGRESS); + + Arthas->SetUInt64Value(UNIT_FIELD_TARGET, 0); + + if (npc_arthasAI* pEscortAI = dynamic_cast(Arthas->AI())) + pEscortAI->Start(false, false, culling_faction->GetGUID(), NULL, false, false); + + Arthas->setFaction(culling_faction->getFaction()); + arthas_event = 2; + + ++phase; + phasetim = 1000; + break; + + } + } + else + return; + + if(arthas_event == 1) + { + if (phasetim <= diff) + { + ++phase; + phasetim = 330000; + } + phasetim -= diff; + } + } +}; + +CreatureAI* GetAI_npc_arthas(Creature* pCreature) +{ + return new npc_arthasAI(pCreature); +} + +bool GossipHello_npc_arthas(Player *player, Creature *mCreature) +{ + if (mCreature->isQuestGiver()) + player->PrepareQuestMenu(mCreature->GetGUID()); + + if(((npc_arthasAI*)mCreature->AI())->arthas_event == 0) + { + if (player->FindQuestSlot(13151)>=25) + { + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "You don't have the Quest for this instance", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + player->SEND_GOSSIP_MENU(player->GetGossipTextId(mCreature), mCreature->GetGUID()); + return true; + } + if (player->FindQuestSlot(13151)<=25) + { + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I\'m ready start culling of stratholme", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + player->SEND_GOSSIP_MENU(player->GetGossipTextId(mCreature), mCreature->GetGUID()); + return true; + } + } + if(((npc_arthasAI*)mCreature->AI())->FinalFight == 1) + { + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "We are ready to Final Combat!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); + player->SEND_GOSSIP_MENU(player->GetGossipTextId(mCreature), mCreature->GetGUID()); + player->hasQuest(13151); + return true; + } + return true; +} + +bool GossipSelect_npc_arthas(Player *player, Creature *mCreature, uint32 sender, uint32 uiAction ) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + player->CLOSE_GOSSIP_MENU(); + ((npc_arthasAI*)mCreature->AI())->arthas_event = 1; + break; + case GOSSIP_ACTION_INFO_DEF+2: + player->CLOSE_GOSSIP_MENU(); + break; + case GOSSIP_ACTION_INFO_DEF+3: + player->CLOSE_GOSSIP_MENU(); + ((npc_arthasAI*)mCreature->AI())->FinalFight = 2; + } + ((npc_arthasAI*)mCreature->AI())->culling_faction = player; + + return true; +} + +/*###### +## npc_patricia +######*/ +struct MANGOS_DLL_DECL npc_patriciaAI : public ScriptedAI +{ + npc_patriciaAI(Creature *c) : ScriptedAI(c) + { + m_pInstance = (ScriptedInstance*)c->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + Unit* Target; + Creature* Arthas; + Creature* Meathook; + Creature* Patricia; + + uint32 Step; + uint32 Steptim; + + bool Event; + bool Event2; + bool Event2Com; + + void Reset() + { + Event = false; + Event2 = true; + Event2Com = false; + Step = 1; + Steptim = 20000; + if(Event == true){} + else + Event = false; + } + + void MoveInLineOfSight(Unit *who) + { + + if (Event2 == false) + { + Target = who; + Event2Com = true; + } + + if (Event == false && m_creature->IsWithinDistInMap(who, 20.0f)) + { + if (m_pInstance->GetData(TYPE_ARTHAS_EVENT) == IN_PROGRESS) + { + Event = true; + } + } + ScriptedAI::MoveInLineOfSight(who); + } + + void UpdateAI(const uint32 diff) + { + DoMeleeAttackIfReady(); + + if(Event == true) + { + switch(Step) + { + case 1: + Patricia = m_creature; + DoScriptText(SAY_PEOPLE05, Patricia); + ++Step; + Steptim = 5000; + break; + case 3: + Patricia->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + DoScriptText(SAY_PEOPLE06, Patricia); + Patricia->GetMotionMaster()->MovePoint(0, 2395.487f,1203.199f,134.125f); + ++Step; + Steptim = 13000; + break; + case 5: + Patricia->GetMotionMaster()->MovePoint(0, 2431.674f,1211.797f,134.124f); + ++Step; + Steptim = 7000; + break; + case 7: + Patricia->GetMotionMaster()->MovePoint(0, 2438.028f,1206.680f,133.935f); + ++Step; + Steptim = 3000; + break; + case 9: + Patricia->GetMotionMaster()->MovePoint(0, 2437.524f,1206.971f,133.935f); + Event2 = false; + ++Step; + Steptim = 3000; + break; + case 11: + if(Event2Com == false) + return; + Patricia->SetUInt64Value(UNIT_FIELD_TARGET, Target->GetGUID()); + ++Step; + Steptim = 1000; + break; + case 13: + DoScriptText(SAY_PEOPLE07, m_creature); + ++Step; + Steptim = 4000; + break; + case 15: + DoScriptText(SAY_PEOPLE08, m_creature); + ++Step; + Steptim = 4000; + break; + case 17: + DoScriptText(SAY_PEOPLE09, m_creature); + ++Step; + Steptim = 9000; + break; + case 19: + m_creature->UpdateEntry(NPC_ZOMBIE, 0); + Event = 0; + ++Step; + Steptim = 7000; + break; + } + } + else + return; + + if (Steptim <= diff) + { + ++Step; + Steptim = 330000; + } + Steptim -= diff; + + } +}; + +CreatureAI* GetAI_npc_patricia(Creature* pCreature) +{ + return new npc_patriciaAI(pCreature); +} + +/*###### +## dark_conversion_AI +######*/ +struct MANGOS_DLL_DECL dark_conversionAI : public ScriptedAI +{ + dark_conversionAI(Creature *c) : ScriptedAI(c) + { + m_pInstance = (ScriptedInstance*)c->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + Unit* Target; + Creature* Arthas; + bool Conversion; + uint32 Step; + uint32 Steptim; + + void Reset() + { + m_creature->setFaction(35); + Conversion = false; + Step = 1; + Steptim = 500; + } + + void MoveInLineOfSight(Unit *who) + { + if (Conversion == false && m_creature->IsWithinDistInMap(who, 30.0f)) + { + if (m_pInstance->GetData(TYPE_ARTHAS_EVENT) == IN_PROGRESS) + { + Target = who; + Conversion = true; + } + } + ScriptedAI::MoveInLineOfSight(who); + } + + void UpdateAI(const uint32 diff) + { + + DoMeleeAttackIfReady(); + + if(Conversion == true) + { + switch(Step) + { + case 1: + m_creature->setFaction(14); //2078 + m_creature->CastSpell(m_creature,SPELL_FEAR,false); + switch(rand()%12) + { + case 0: DoScriptText(SAY_PEOPLE01, m_creature); break; + case 1: DoScriptText(SAY_PEOPLE02, m_creature); break; + case 2: DoScriptText(SAY_PEOPLE03, m_creature); break; + case 3: DoScriptText(SAY_PEOPLE04, m_creature); break; + case 4: DoScriptText(SAY_PEOPLE10, m_creature); break; + case 5: DoScriptText(SAY_PEOPLE11, m_creature); break; + case 6: DoScriptText(SAY_PEOPLE12, m_creature); break; + case 7: DoScriptText(SAY_PEOPLE13, m_creature); break; + } + ++Step; + Steptim = 5000 + rand()%5000; + break; + case 3: + m_creature->UpdateEntry(NPC_ZOMBIE, 0); + m_creature->GetMotionMaster()->MovePoint(0, Target->GetPositionX(), Target->GetPositionY(), Target->GetPositionZ()); + ++Step; + Steptim = 1000; + break; + } + } + else + return; + + if (Steptim <= diff) + { + ++Step; + Steptim = 330000; + } + Steptim -= diff; + + } +}; + +CreatureAI* GetAI_dark_conversion(Creature* pCreature) +{ + return new dark_conversionAI(pCreature); +} + +/*###### +## npc_time_riftCSAI +######*/ +struct MANGOS_DLL_DECL npc_time_riftCSAI : public ScriptedAI +{ + npc_time_riftCSAI(Creature *c) : ScriptedAI(c) + { + Reset(); + } + + Creature* Drakonian01; + Creature* Drakonian02; + Creature* Drakonian03; + Creature* Arthas; + bool Conversion; + uint32 Step; + uint32 Steptim; + + void Reset() + { + Conversion = false; + Step = 1; + Steptim = 500; + } + void UpdateAI(const uint32 diff) + { + switch(Step) + { + case 1: + if (Creature* pArthas = GetClosestCreatureWithEntry(m_creature, NPC_ARTHAS, 180.0f)) + Arthas = pArthas; + Drakonian01 = m_creature->SummonCreature(NPC_DRAKONIAN,m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ()+1,3.229f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,900000); + Drakonian01->GetMotionMaster()->MovePoint(0, Arthas->GetPositionX(), Arthas->GetPositionY(), Arthas->GetPositionZ()); + ++Step; + Steptim = 3000; + break; + case 3: + Drakonian02 = m_creature->SummonCreature(NPC_DRAKONIAN,m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ()+1,3.229f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,900000); + Drakonian02->GetMotionMaster()->MovePoint(0, Arthas->GetPositionX(), Arthas->GetPositionY(), Arthas->GetPositionZ()); + ++Step; + Steptim = 3000; + break; + case 5: + Drakonian03 = m_creature->SummonCreature(NPC_DRAKONIAN,m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ()+1,3.229f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,900000); + Drakonian03->GetMotionMaster()->MovePoint(0, Arthas->GetPositionX(), Arthas->GetPositionY(), Arthas->GetPositionZ()); + ++Step; + Steptim = 3000; + break; + } + + if (Steptim <= diff) + { + ++Step; + Steptim = 330000; + } + Steptim -= diff; + } +}; + +CreatureAI* GetAI_npc_time_riftCS(Creature* pCreature) +{ + return new npc_time_riftCSAI(pCreature); +} + +void AddSC_culling_of_stratholme() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_arthas"; + newscript->GetAI = &GetAI_npc_arthas; + newscript->pGossipHello = &GossipHello_npc_arthas; + newscript->pGossipSelect = &GossipSelect_npc_arthas; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "dark_conversion"; + newscript->GetAI = &GetAI_dark_conversion; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_patricia"; + newscript->GetAI = &GetAI_npc_patricia; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_time_riftCS"; + newscript->GetAI = &GetAI_npc_time_riftCS; + newscript->RegisterSelf(); } \ No newline at end of file diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/def_culling_of_stratholme.h b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/def_culling_of_stratholme.h index 59c88c65b..04b2d23d7 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/def_culling_of_stratholme.h +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/def_culling_of_stratholme.h @@ -1,60 +1,66 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 - * 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, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - - -/* ScriptData -SDName: instance_culling_of_stratholme -SD%Complete: ?% -SDComment: -SDCategory: Culling of Stratholme -EndScriptData */ - - - - -#ifndef DEF_CULLING_OF_STRATHOLME_H -#define DEF_CULLING_OF_STRATHOLME_H - -enum Data -{ - MAX_ENCOUNTER = 5, - TYPE_ARTHAS_EVENT = 0, - TYPE_SALRAMM_EVENT = 1, - TYPE_MEATHOOK_EVENT = 2, - TYPE_EPOCH_EVENT = 3, - TYPE_MALGANIS_EVENT = 4, - - DATA_GO_SHKAF_GATE = 8, - DATA_GO_MAL_GATE1 = 9, - DATA_GO_MAL_GATE2 = 10, - DATA_GO_MAL_CHEST = 11, - DATA_ARTHAS = 12, - DATA_SALRAMM = 13, - DATA_MEATHOOK = 14, - DATA_EPOCH = 15, - DATA_MALGANIS = 16, - - - NPC_ARTHAS = 26499, // Arthas - NPC_MEATHOOK = 26529, // Meathook - NPC_SALRAMM = 26530, // Salramm - NPC_EPOCH = 26532, // Lord Epoch - NPC_MALGANIS = 26533 // Mal'Ganis -}; - -#endif - - +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + +/* ScriptData +SDName: instance_culling_of_stratholme +SD%Complete: ?% +SDComment: +SDCategory: Culling of Stratholme +EndScriptData */ + + + + +#ifndef DEF_CULLING_OF_STRATHOLME_H +#define DEF_CULLING_OF_STRATHOLME_H + +enum Data +{ + MAX_ENCOUNTER = 5, + TYPE_ARTHAS_EVENT = 0, + TYPE_SALRAMM_EVENT = 1, + TYPE_MEATHOOK_EVENT = 2, + TYPE_EPOCH_EVENT = 3, + TYPE_MALGANIS_EVENT = 4, + TYPE_TIME_EVENT = 6, + + DATA_GO_SHKAF_GATE = 8, + DATA_GO_MAL_GATE1 = 9, + DATA_GO_MAL_GATE2 = 10, + DATA_GO_MAL_CHEST = 11, + DATA_ARTHAS = 12, + DATA_SALRAMM = 13, + DATA_MEATHOOK = 14, + DATA_EPOCH = 15, + DATA_MALGANIS = 16, + + + NPC_ARTHAS = 26499, // Arthas + NPC_MEATHOOK = 26529, // Meathook + NPC_SALRAMM = 26530, // Salramm + NPC_EPOCH = 26532, // Lord Epoch + NPC_MALGANIS = 26533, // Mal'Ganis + + // Wave Event + TYPE_WAVE_EVENT = 17, + WORLD_STATE_WAVE = 3504, + WORLD_STATE_TIME = 3932, + WORLD_STATE_REMAIN = 3931 +}; + +#endif + \ No newline at end of file diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp index ea54fb334..87686ba7f 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp @@ -1,273 +1,274 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 - * 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, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - - -/* ScriptData -SDName: instance_culling_of_stratholme -SD%Complete: ?% -SDComment: -SDCategory: Culling of Stratholme -EndScriptData */ - - - -#include "precompiled.h" -#include "def_culling_of_stratholme.h" - -#define GO_SHKAF_GATE 188686 -#define GO_MALGANIS_GATE1 187711 -#define GO_MALGANIS_GATE2 187723 -#define GO_MALGANIS_CHEST 190663 - -struct MANGOS_DLL_DECL instance_culling_of_stratholme : public ScriptedInstance -{ - instance_culling_of_stratholme(Map* pMap) : ScriptedInstance(pMap) - { - Initialize(); - }; - - uint32 m_auiEncounter[MAX_ENCOUNTER]; - std::string strInstData; - - uint64 m_uiShkafGateGUID; - uint64 m_uiMalGate1GUID; - uint64 m_uiMalGate2GUID; - uint64 m_uiMalChestGUID; - - uint64 m_uilordEpochGUID; - uint64 m_uiMeathookGUID; - uint64 m_uiSalrammGUID; - uint64 m_uiMalganisGUID; - uint64 m_uiArthasGUID; - - void Initialize() - { - m_uiShkafGateGUID = 0; - m_uiMalGate1GUID = 0; - m_uiMalGate2GUID = 0; - m_uiMalChestGUID = 0; - - m_uilordEpochGUID = 0; - m_uiMeathookGUID = 0; - m_uiSalrammGUID = 0; - m_uiMalganisGUID = 0; - m_uiArthasGUID = 0; - } - - bool IsEncounterInProgress() const - { - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) - { - if (m_auiEncounter[i] == IN_PROGRESS) - return true; - } - - return false; - } - - void OnCreatureCreate(Creature* pCreature) - { - switch(pCreature->GetEntry()) - { - case NPC_ARTHAS: - { - m_uiArthasGUID = pCreature->GetGUID(); - break; - } - case NPC_SALRAMM: - { - m_uiSalrammGUID = pCreature->GetGUID(); - pCreature->SetVisibility(VISIBILITY_OFF); - pCreature->setFaction(35); - break; - } - case NPC_MEATHOOK: - { - m_uiMeathookGUID = pCreature->GetGUID(); - pCreature->SetVisibility(VISIBILITY_OFF); - pCreature->setFaction(35); - break; - } - case NPC_EPOCH: - { - m_uilordEpochGUID = pCreature->GetGUID(); - pCreature->SetVisibility(VISIBILITY_OFF); - pCreature->setFaction(35); - break; - } - case NPC_MALGANIS: - { - m_uiMalganisGUID = pCreature->GetGUID(); - break; - } - } - } - - void OnObjectCreate(GameObject* pGo) - { - if (pGo->GetEntry() == GO_SHKAF_GATE) - m_uiShkafGateGUID = pGo->GetGUID(); - - if (pGo->GetEntry() == GO_MALGANIS_GATE1) - m_uiMalGate1GUID = pGo->GetGUID(); - - if (pGo->GetEntry() == GO_MALGANIS_GATE2) - m_uiMalGate2GUID = pGo->GetGUID(); - - if (pGo->GetEntry() == GO_MALGANIS_CHEST) - m_uiMalChestGUID = pGo->GetGUID(); - } - - uint64 GetData64(uint32 uiData) - { - switch(uiData) - { - case DATA_ARTHAS: return m_uiArthasGUID; - case DATA_SALRAMM: return m_uiSalrammGUID; - case DATA_MEATHOOK: return m_uiMeathookGUID; - case DATA_EPOCH: return m_uilordEpochGUID; - case DATA_MALGANIS: return m_uiMalganisGUID; - case DATA_GO_SHKAF_GATE: return m_uiShkafGateGUID; - case DATA_GO_MAL_GATE1: return m_uiMalGate1GUID; - case DATA_GO_MAL_GATE2: return m_uiMalGate2GUID; - case DATA_GO_MAL_CHEST: return m_uiMalChestGUID; - } - - return 0; - } - - void SetData(uint32 uiType, uint32 uiData) - { - bool needSave = false; - switch(uiType) - { - case TYPE_ARTHAS_EVENT: - { - if (m_auiEncounter[0] == IN_PROGRESS) - needSave = true; - - m_auiEncounter[0] = uiData; - break; - } - case TYPE_SALRAMM_EVENT: - { - if (m_auiEncounter[1] == DONE) - needSave = true; - - m_auiEncounter[1] = uiData; - break; - } - case TYPE_MEATHOOK_EVENT: - { - if (m_auiEncounter[2] == DONE) - needSave = true; - - m_auiEncounter[2] = uiData; - break; - } - case TYPE_EPOCH_EVENT: - { - if (m_auiEncounter[3] == DONE) - needSave = true; - - m_auiEncounter[3] = uiData; - break; - } - case TYPE_MALGANIS_EVENT: - { - if (m_auiEncounter[4] == DONE) - { - needSave = true; - DoRespawnGameObject(m_uiMalChestGUID,86400); //respawn time for the chest 1 day - } - m_auiEncounter[4] = uiData; - break; - } - } - if (uiData == DONE || needSave) - { - OUT_SAVE_INST_DATA; - - std::ostringstream saveStream; - saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3] << " " << m_auiEncounter[4]; - - strInstData = saveStream.str(); - - SaveToDB(); - OUT_SAVE_INST_DATA_COMPLETE; - } - } - - uint32 GetData(uint32 uiType) - { - switch(uiType) - { - case TYPE_ARTHAS_EVENT: - return m_auiEncounter[0]; - case TYPE_SALRAMM_EVENT: - return m_auiEncounter[1]; - case TYPE_MEATHOOK_EVENT: - return m_auiEncounter[2]; - case TYPE_EPOCH_EVENT: - return m_auiEncounter[3]; - case TYPE_MALGANIS_EVENT: - return m_auiEncounter[4]; - } - - return 0; - } - - const char* Save() - { - return strInstData.c_str(); - } - - void Load(const char* chrIn) - { - if (!chrIn) - { - OUT_LOAD_INST_DATA_FAIL; - return; - } - - OUT_LOAD_INST_DATA(chrIn); - - std::istringstream loadStream(chrIn); - loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] >> m_auiEncounter[4]; - - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) - { - if (m_auiEncounter[i] == IN_PROGRESS) - m_auiEncounter[i] = NOT_STARTED; - } - - OUT_LOAD_INST_DATA_COMPLETE; - } -}; - -InstanceData* GetInstanceData_instance_culling_of_stratholme(Map* pMap) -{ - return new instance_culling_of_stratholme(pMap); -} - -void AddSC_instance_culling_of_stratholme() -{ - Script *newscript; - newscript = new Script; - newscript->Name = "instance_culling_of_stratholme"; - newscript->GetInstanceData = &GetInstanceData_instance_culling_of_stratholme; - newscript->RegisterSelf(); -} +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + +/* ScriptData +SDName: instance_culling_of_stratholme +SD%Complete: ?% +SDComment: +SDCategory: Culling of Stratholme +EndScriptData */ + + + +#include "precompiled.h" +#include "def_culling_of_stratholme.h" + +#define GO_SHKAF_GATE 188686 +#define GO_MALGANIS_GATE1 187711 +#define GO_MALGANIS_GATE2 187723 +#define GO_MALGANIS_CHEST 190663 + +struct MANGOS_DLL_DECL instance_culling_of_stratholme : public ScriptedInstance +{ + instance_culling_of_stratholme(Map* pMap) : ScriptedInstance(pMap) + { + Initialize(); + }; + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string strInstData; + + uint64 m_uiShkafGateGUID; + uint64 m_uiMalGate1GUID; + uint64 m_uiMalGate2GUID; + uint64 m_uiMalChestGUID; + + uint64 m_uilordEpochGUID; + uint64 m_uiMeathookGUID; + uint64 m_uiSalrammGUID; + uint64 m_uiMalganisGUID; + uint64 m_uiArthasGUID; + + void Initialize() + { + m_uiShkafGateGUID = 0; + m_uiMalGate1GUID = 0; + m_uiMalGate2GUID = 0; + m_uiMalChestGUID = 0; + + m_uilordEpochGUID = 0; + m_uiMeathookGUID = 0; + m_uiSalrammGUID = 0; + m_uiMalganisGUID = 0; + m_uiArthasGUID = 0; + } + + bool IsEncounterInProgress() const + { + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + return true; + } + + return false; + } + + void OnCreatureCreate(Creature* pCreature) + { + switch(pCreature->GetEntry()) + { + case NPC_ARTHAS: + { + m_uiArthasGUID = pCreature->GetGUID(); + break; + } + case NPC_SALRAMM: + { + m_uiSalrammGUID = pCreature->GetGUID(); + pCreature->SetVisibility(VISIBILITY_OFF); + pCreature->setFaction(35); + break; + } + case NPC_MEATHOOK: + { + m_uiMeathookGUID = pCreature->GetGUID(); + pCreature->SetVisibility(VISIBILITY_OFF); + pCreature->setFaction(35); + break; + } + case NPC_EPOCH: + { + m_uilordEpochGUID = pCreature->GetGUID(); + pCreature->SetVisibility(VISIBILITY_OFF); + pCreature->setFaction(35); + break; + } + case NPC_MALGANIS: + { + m_uiMalganisGUID = pCreature->GetGUID(); + break; + } + } + } + + void OnObjectCreate(GameObject* pGo) + { + if (pGo->GetEntry() == GO_SHKAF_GATE) + m_uiShkafGateGUID = pGo->GetGUID(); + + if (pGo->GetEntry() == GO_MALGANIS_GATE1) + m_uiMalGate1GUID = pGo->GetGUID(); + + if (pGo->GetEntry() == GO_MALGANIS_GATE2) + m_uiMalGate2GUID = pGo->GetGUID(); + + if (pGo->GetEntry() == GO_MALGANIS_CHEST) + m_uiMalChestGUID = pGo->GetGUID(); + } + + uint64 GetData64(uint32 uiData) + { + switch(uiData) + { + case DATA_ARTHAS: return m_uiArthasGUID; + case DATA_SALRAMM: return m_uiSalrammGUID; + case DATA_MEATHOOK: return m_uiMeathookGUID; + case DATA_EPOCH: return m_uilordEpochGUID; + case DATA_MALGANIS: return m_uiMalganisGUID; + case DATA_GO_SHKAF_GATE: return m_uiShkafGateGUID; + case DATA_GO_MAL_GATE1: return m_uiMalGate1GUID; + case DATA_GO_MAL_GATE2: return m_uiMalGate2GUID; + case DATA_GO_MAL_CHEST: return m_uiMalChestGUID; + } + + return 0; + } + + void SetData(uint32 uiType, uint32 uiData) + { + bool needSave = false; + switch(uiType) + { + case TYPE_ARTHAS_EVENT: + { + if (m_auiEncounter[0] == IN_PROGRESS) + needSave = true; + + m_auiEncounter[0] = uiData; + break; + } + case TYPE_SALRAMM_EVENT: + { + if (m_auiEncounter[1] == DONE) + needSave = true; + + m_auiEncounter[1] = uiData; + break; + } + case TYPE_MEATHOOK_EVENT: + { + if (m_auiEncounter[2] == DONE) + needSave = true; + + m_auiEncounter[2] = uiData; + break; + } + case TYPE_EPOCH_EVENT: + { + if (m_auiEncounter[3] == DONE) + needSave = true; + + m_auiEncounter[3] = uiData; + break; + } + case TYPE_MALGANIS_EVENT: + { + if (m_auiEncounter[4] == DONE) + { + needSave = true; + DoRespawnGameObject(m_uiMalChestGUID,86400); //respawn time for the chest 1 day + } + m_auiEncounter[4] = uiData; + break; + } + } + if (uiData == DONE || needSave) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3] << " " << m_auiEncounter[4]; + + strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } + } + + uint32 GetData(uint32 uiType) + { + switch(uiType) + { + case TYPE_ARTHAS_EVENT: + return m_auiEncounter[0]; + case TYPE_SALRAMM_EVENT: + return m_auiEncounter[1]; + case TYPE_MEATHOOK_EVENT: + return m_auiEncounter[2]; + case TYPE_EPOCH_EVENT: + return m_auiEncounter[3]; + case TYPE_MALGANIS_EVENT: + return m_auiEncounter[4]; + } + + return 0; + } + + const char* Save() + { + return strInstData.c_str(); + } + + void Load(const char* chrIn) + { + if (!chrIn) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(chrIn); + + std::istringstream loadStream(chrIn); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] >> m_auiEncounter[4]; + + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; + } + + OUT_LOAD_INST_DATA_COMPLETE; + } +}; + +InstanceData* GetInstanceData_instance_culling_of_stratholme(Map* pMap) +{ + return new instance_culling_of_stratholme(pMap); +} + +void AddSC_instance_culling_of_stratholme() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "instance_culling_of_stratholme"; + newscript->GetInstanceData = &GetInstanceData_instance_culling_of_stratholme; + newscript->RegisterSelf(); +} + \ No newline at end of file From 6c885e262bccdd86ff32a173186de93a743eac36 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Tue, 18 May 2010 12:49:35 +0400 Subject: [PATCH 317/405] SQL correct (thanks to nord1988) --- addition/3_mangos_teleguy.sql | 2 +- addition/4_mangos_arena_honor.sql | 2 +- addition/721_icecrown_spelltable_scriptdev2.sql | 2 +- addition/726_naxxramas_mangos.sql | 14 +++++++------- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/addition/3_mangos_teleguy.sql b/addition/3_mangos_teleguy.sql index b44be87ac..b57d330c0 100644 --- a/addition/3_mangos_teleguy.sql +++ b/addition/3_mangos_teleguy.sql @@ -1,2 +1,2 @@ DELETE FROM `creature_template` WHERE `entry`=99001; -insert into `creature_template` values ('99001','0','0','0','0','0','18','0','18','0','Slappy McFry','The Teleport Guy',NULL,'0','59','61','6700','24000','5598','5875','20','35','35','1','1.48','0','0','181','189','0','158','1','1400','1900','0','0','0','0','0','0','0','0','0','0','100','7','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','1','3','1','1','0','0','0','0','0','0','0','0','1','0','0','0','teleguy'); +insert into `creature_template` values ('99001','0','0','0','0','0','18','0','18','0','Slappy McFry','The Teleport Guy',NULL,'0','59','61','6700','24000','5598','5875','20','35','35','1','1.48','1.48','0','0','181','189','0','158','1','1400','1900','0','0','0','0','0','0','0','0','0','0','100','7','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','1','3','1','1','0','0','0','0','0','0','0','0','1','0','0','0','teleguy'); diff --git a/addition/4_mangos_arena_honor.sql b/addition/4_mangos_arena_honor.sql index 9c08ee744..7b767cb59 100644 --- a/addition/4_mangos_arena_honor.sql +++ b/addition/4_mangos_arena_honor.sql @@ -1,2 +1,2 @@ DELETE FROM `creature_template` WHERE `entry`=7; -INSERT INTO `creature_template` VALUES ('7','0','0','0','0','0','17858','0','17858','0','Besdoban Durnoye','Arena-Honor Exchange',NULL,'0','59','61','6700','24000','5598','5875','20','35','35','1','1.48','0','0','170','182','0','1235','1','1400','1900','0','0','0','0','0','0','0','0','0','0','100','7','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','1','3','0','1','0','0','0','0','0','0','0','0','1','0','0','0','npc_arena_honor'); +INSERT INTO `creature_template` VALUES ('7','0','0','0','0','0','17858','0','17858','0','Besdoban Durnoye','Arena-Honor Exchange',NULL,'0','59','61','6700','24000','5598','5875','20','35','35','1','1.48','1.48','0','0','170','182','0','1235','1','1400','1900','0','0','0','0','0','0','0','0','0','0','100','7','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','1','3','0','1','0','0','0','0','0','0','0','0','1','0','0','0','npc_arena_honor'); diff --git a/addition/721_icecrown_spelltable_scriptdev2.sql b/addition/721_icecrown_spelltable_scriptdev2.sql index 9dcdea493..ca682bea5 100644 --- a/addition/721_icecrown_spelltable_scriptdev2.sql +++ b/addition/721_icecrown_spelltable_scriptdev2.sql @@ -87,7 +87,7 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ (37813, 72173, 0, 0, 0, 30000, 0, 0, 0, 45000, 0, 0, 0, 1, 0, 0), (37813, 72769, 0, 0, 0, 15000, 0, 0, 0, 27000, 0, 0, 0, 4, 0, 0), (37813, 72723, 0, 0, 0, 15000, 0, 0, 0, 27000, 0, 0, 0, 1, 0, 0), -(37813, 47008, 0, 0, 0, 300000, 0, 0, 0, 300000, 0, 0, 0, 1, 0, 0); +(37813, 47008, 0, 0, 0, 480000, 0, 0, 0, 480000, 0, 0, 0, 1, 0, 0); -- summons INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMax_N10`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType` ) VALUES (37813, 38508, 45000, 45000, 1, 1, 2, 2, 15, 25, 0, 9); diff --git a/addition/726_naxxramas_mangos.sql b/addition/726_naxxramas_mangos.sql index 2bcba3b08..9fb93f061 100644 --- a/addition/726_naxxramas_mangos.sql +++ b/addition/726_naxxramas_mangos.sql @@ -48,8 +48,8 @@ INSERT INTO `gameobject` (`id`, `map`, `spawnMask`, `phaseMask`, `position_x`, ` (181577, 533, 3, 1, 2909, -4025.02, 273.475, 3.14159, 0, 0, 1, 0, -604800, 0, 1), (181578, 533, 3, 1, 2492.16, -2921.66, 241.276, 5.52219, 0, 0, 1, 0, -604800, 0, 1); -INSERT IGNORE INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) values('2','0','0','0','0','0','0','0','0','0','Erupt trigger','',NULL,'80','80','200','300','20','30','0','21','21','0','1','1','0','0','0','0','0','1','0','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','0','3','1','1','0','0','0','0','0','0','0','0','1','0','0','194',''); -REPLACE INTO `creature_template` (`entry`, `difficulty_entry_1`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (15384, 0, 18783, 0, 11686, 0, 'Plague Fissure', '', '', 83, 83, 4120, 4120, 0, 0, 0, 21, 21, 0, 1.1, 1, 0, 0, 0, 0, 0, 1, 2000, 0, 1, 33555206, 0, 0, 0, 0, 0, 0, 0, 1, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 1, 1.35, 1, 0, 1, 0, 0, 130, 'npc_heigan_eruption'); +INSERT IGNORE INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed_walk`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) values('2','0','0','0','0','0','0','0','0','0','Erupt trigger','',NULL,'80','80','200','300','20','30','0','21','21','0','1','1','0','0','0','0','0','1','0','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','0','3','1','1','0','0','0','0','0','0','0','0','1','0','0','194',''); +REPLACE INTO `creature_template` (`entry`, `difficulty_entry_1`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed_walk`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (15384, 0, 18783, 0, 11686, 0, 'Plague Fissure', '', '', 83, 83, 4120, 4120, 0, 0, 0, 21, 21, 0, 1.1, 1, 0, 0, 0, 0, 0, 1, 2000, 0, 1, 33555206, 0, 0, 0, 0, 0, 0, 0, 1, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 1, 1.35, 1, 0, 1, 0, 0, 130, 'npc_heigan_eruption'); -- Soul Weaver UPDATE `creature_template` SET `minlevel` = 80, `maxlevel` = 80, `minhealth` = 56700, `maxhealth` = 56700 WHERE `entry` = 16429; @@ -78,19 +78,19 @@ INSERT INTO `npc_text` (`ID`, `text0_0`, `text0_1`, `lang0`, `prob0`, `em0_0`, ` UPDATE `creature` set `spawnMask` = 1 where `id` = 29912; DELETE FROM `creature_template` WHERE (`entry`=16803); -INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (16803, 29941, 0, 0, 0, 0, 16539, 0, 16539, 0, 'Death Knight Understudy', '', '', 0, 82, 82, 404430, 404430, 0, 0, 49905, 21, 21, 0, 1, 1, 1, 488, 642, 0, 782, 7.5, 2000, 0, 1, 32832, 0, 0, 0, 0, 0, 0, 363, 521, 121, 7, 72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 61696, 29060, 29061, 0, 0, 0, 0, 'EventAI', 0, 3, 30, 2, 0, 22708, 0, 0, 0, 0, 0, 144, 1, 1728, 0, 0, ''); +INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed_walk`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (16803, 29941, 0, 0, 0, 0, 16539, 0, 16539, 0, 'Death Knight Understudy', '', '', 0, 82, 82, 404430, 404430, 0, 0, 49905, 21, 21, 0, 1, 1, 1, 488, 642, 0, 782, 7.5, 2000, 0, 1, 32832, 0, 0, 0, 0, 0, 0, 363, 521, 121, 7, 72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 61696, 29060, 29061, 0, 0, 0, 0, 'EventAI', 0, 3, 30, 2, 0, 22708, 0, 0, 0, 0, 0, 144, 1, 1728, 0, 0, ''); DELETE FROM `creature_template` WHERE (`entry`=29941); -INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (29941, 0, 0, 0, 0, 0, 16539, 0, 16539, 0, 'Death Knight Understudy (1)', '', '', 0, 82, 82, 404430, 404430, 0, 0, 49905, 14, 14, 0, 1.5, 1, 1, 488, 642, 0, 782, 13, 2000, 0, 1, 32832, 0, 0, 0, 0, 0, 0, 363, 521, 121, 7, 72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 30, 2, 0, 22708, 0, 0, 0, 0, 0, 144, 1, 0, 0, 0, ''); +INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed_walk`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (29941, 0, 0, 0, 0, 0, 16539, 0, 16539, 0, 'Death Knight Understudy (1)', '', '', 0, 82, 82, 404430, 404430, 0, 0, 49905, 14, 14, 0, 1.5, 1, 1, 488, 642, 0, 782, 13, 2000, 0, 1, 32832, 0, 0, 0, 0, 0, 0, 363, 521, 121, 7, 72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 30, 2, 0, 22708, 0, 0, 0, 0, 0, 144, 1, 0, 0, 0, ''); DELETE FROM `creature_template` WHERE (`entry`=16061); -INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (16061, 29940, 0, 0, 0, 0, 16582, 0, 16582, 0, 'Instructor Razuvious', '', '', 0, 83, 83, 3346800, 3346800, 0, 0, 10673, 21, 21, 0, 1.6, 1, 3, 1000, 1200, 0, 800, 70, 3500, 0, 1, 32832, 0, 0, 0, 0, 0, 0, 371, 535, 135, 6, 76, 16061, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1253602, 1532181, '', 0, 3, 240, 2, 0, 0, 0, 0, 0, 0, 0, 167, 1, 1718, 617299803, 1, 'boss_razuvious'); +INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed_walk`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (16061, 29940, 0, 0, 0, 0, 16582, 0, 16582, 0, 'Instructor Razuvious', '', '', 0, 83, 83, 3346800, 3346800, 0, 0, 10673, 21, 21, 0, 1.6, 1, 3, 1000, 1200, 0, 800, 70, 3500, 0, 1, 32832, 0, 0, 0, 0, 0, 0, 371, 535, 135, 6, 76, 16061, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1253602, 1532181, '', 0, 3, 240, 2, 0, 0, 0, 0, 0, 0, 0, 167, 1, 1718, 617299803, 1, 'boss_razuvious'); DELETE FROM `creature_template` WHERE (`entry`=29940); -INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (29940, 0, 0, 0, 0, 0, 16582, 0, 16582, 0, 'Instructor Razuvious (1)', '', '', 0, 83, 83, 10110125, 10110125, 0, 0, 10673, 21, 21, 0, 2, 1, 3, 1000, 1200, 0, 800, 70, 3500, 0, 1, 32832, 0, 0, 0, 0, 0, 0, 371, 535, 135, 6, 76, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2507204, 3064362, '', 0, 3, 725, 2, 0, 0, 0, 0, 0, 0, 0, 167, 1, 0, 617299803, 1, ''); +INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed_walk`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (29940, 0, 0, 0, 0, 0, 16582, 0, 16582, 0, 'Instructor Razuvious (1)', '', '', 0, 83, 83, 10110125, 10110125, 0, 0, 10673, 21, 21, 0, 2, 1, 3, 1000, 1200, 0, 800, 70, 3500, 0, 1, 32832, 0, 0, 0, 0, 0, 0, 371, 535, 135, 6, 76, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2507204, 3064362, '', 0, 3, 725, 2, 0, 0, 0, 0, 0, 0, 0, 167, 1, 0, 617299803, 1, ''); DELETE FROM `creature_template` WHERE (`entry`=29912); -INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (29912, 0, 0, 0, 0, 0, 26620, 0, 26620, 0, 'Obedience Crystal', '', 'Interact', 0, 80, 80, 12600, 12600, 0, 0, 9729, 35, 35, 1, 1, 1, 0, 422, 586, 0, 642, 1, 2000, 0, 1, 64, 0, 0, 0, 0, 0, 0, 345, 509, 103, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 'npc_obedience_crystal'); +INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed_walk`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (29912, 0, 0, 0, 0, 0, 26620, 0, 26620, 0, 'Obedience Crystal', '', 'Interact', 0, 80, 80, 12600, 12600, 0, 0, 9729, 35, 35, 1, 1, 1, 0, 422, 586, 0, 642, 1, 2000, 0, 1, 64, 0, 0, 0, 0, 0, 0, 345, 509, 103, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 'npc_obedience_crystal'); UPDATE `creature` SET `MovementType` = 2 WHERE `guid` = 128312; DELETE FROM `creature_movement` WHERE id = 128312; From 9c3436d185bedea4ace7d6c0d93af1b7e99ce4e5 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 20 May 2010 14:32:06 +0400 Subject: [PATCH 318/405] mob_swarming_shadows correct, thanks to anemak --- addition/721_icecrown_mangos.sql | 1 + .../icecrown_citadel/boss_blood_queen_lanathel.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/addition/721_icecrown_mangos.sql b/addition/721_icecrown_mangos.sql index 859ac6a9d..37c0b6dc5 100644 --- a/addition/721_icecrown_mangos.sql +++ b/addition/721_icecrown_mangos.sql @@ -92,6 +92,7 @@ UPDATE `gameobject` SET `state` = '0' WHERE `id` IN (201376); -- Qween Lana'thel UPDATE `creature_template` SET `ScriptName`='boss_blood_queen_lanathel', `AIName`='' WHERE `entry`= 37955; +UPDATE `creature_template` SET `ScriptName`='mob_swarming_shadows', `AIName`='' WHERE `entry`= 38163; -- Valithria dreamwalker UPDATE `creature_template` SET `faction_A` = 35, `faction_H` = 35, `ScriptName`='boss_valithria_dreamwalker' WHERE `entry`= 36789; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp index eea42a432..45555df35 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp @@ -206,7 +206,7 @@ void AddSC_boss_blood_queen_lanathel() newscript->GetAI = &GetAI_boss_blood_queen_lanathel; newscript->RegisterSelf(); - newscript = new Script; + newscript = new Script; newscript->Name = "mob_swarming_shadows"; newscript->GetAI = &GetAI_mob_swarming_shadows; newscript->RegisterSelf(); From 8d77ec2776eddeaa835add9979997b492af3ec16 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 20 May 2010 16:49:58 +0400 Subject: [PATCH 319/405] Work changes to Violet hold (unfinished) --- scripts/northrend/violet_hold/violet_hold.cpp | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/scripts/northrend/violet_hold/violet_hold.cpp b/scripts/northrend/violet_hold/violet_hold.cpp index c4a02137b..fe3c97247 100644 --- a/scripts/northrend/violet_hold/violet_hold.cpp +++ b/scripts/northrend/violet_hold/violet_hold.cpp @@ -122,6 +122,13 @@ struct MANGOS_DLL_DECL mob_vh_dragonsAI : public ScriptedAI //Azure Stalker m_uiBackstab_Timer = 7100; m_uiBlink_Timer = 7000; + + if (creatureEntry == NPC_KEEPER) + { + SetCombatMovement(false); + m_creature->GetMotionMaster()->MoveRandom(); + }; + } void StartMovement() { @@ -399,7 +406,7 @@ struct MANGOS_DLL_DECL npc_violet_portalAI : public ScriptedAI for(uint8 i = 0; i < uiSpawnCount; i++) { uint32 uiSpawnEntry = SelectRandSummon(); - if(Creature* pSummoned = m_creature->SummonCreature(uiSpawnEntry, m_creature->GetPositionX()-5+rand()%10, m_creature->GetPositionY()-5+rand()%10, m_creature->GetPositionZ(), 0, TEMPSUMMON_CORPSE_DESPAWN, 0)) + if(Creature* pSummoned = m_creature->SummonCreature(uiSpawnEntry, m_creature->GetPositionX()-5+rand()%10, m_creature->GetPositionY()-5+rand()%10, m_creature->GetPositionZ(), 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000)) { debug_log("Spawn NPC %u, motherPortalID %u, portalLoc %u", uiSpawnEntry, portalID, portalLoc); ((mob_vh_dragonsAI*)pSummoned->AI())->motherPortalID = portalID; @@ -522,7 +529,7 @@ struct MANGOS_DLL_DECL npc_sinclariAI : public ScriptedAI void DoSpawnPortal() { int tmp = urand(1, 6); - if (Creature* pTemp = m_creature->SummonCreature(NPC_PORTAL, PortalLoc[tmp].x, PortalLoc[tmp].y, PortalLoc[tmp].z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0)) + if (Creature* pTemp = m_creature->SummonCreature(NPC_PORTAL, PortalLoc[tmp].x, PortalLoc[tmp].y, PortalLoc[tmp].z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000)) { pTemp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); pTemp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); @@ -537,7 +544,7 @@ struct MANGOS_DLL_DECL npc_sinclariAI : public ScriptedAI if(portalType == 1) { uint32 entry = urand(0, 1) ? NPC_GUARDIAN : NPC_KEEPER; - if (Creature* pSummoned = pTemp->SummonCreature(entry, PortalLoc[tmp].x, PortalLoc[tmp].y, PortalLoc[tmp].z, pTemp->GetOrientation(), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000)) + if (Creature* pSummoned = pTemp->SummonCreature(entry, PortalLoc[tmp].x, PortalLoc[tmp].y, PortalLoc[tmp].z, pTemp->GetOrientation(), TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000)) { pSummoned->AddThreat(pTemp); pTemp->CastSpell(pSummoned, SPELL_PORTAL_CHANNEL,false); @@ -584,9 +591,9 @@ struct MANGOS_DLL_DECL npc_sinclariAI : public ScriptedAI || m_uiRiftPortalCount == 15 || m_uiRiftPortalCount == 18 ) { - if (Creature* pTemp = m_creature->SummonCreature(NPC_PORTAL, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z, 0, TEMPSUMMON_TIMED_DESPAWN, 1500)) + if (Creature* pTemp = m_creature->SummonCreature(NPC_PORTAL, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000)) { - Creature* pSummoned = m_creature->SummonCreature(NPC_AZURE_SABOTEUR, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); + Creature* pSummoned = m_creature->SummonCreature(NPC_AZURE_SABOTEUR, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000); pSummoned->AddThreat(pTemp); pTemp->CastSpell(pSummoned, SPELL_PORTAL_CHANNEL, false); @@ -597,7 +604,7 @@ struct MANGOS_DLL_DECL npc_sinclariAI : public ScriptedAI } else if (m_uiRiftPortalCount == 19 && m_pInstance->GetData(TYPE_RIFT) != DONE) { - m_creature->SummonCreature(NPC_CYANIGOSA, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 180000); + m_creature->SummonCreature(NPC_CYANIGOSA, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000); m_pInstance->SetData(TYPE_RIFT, DONE); m_pInstance->SetData(TYPE_DISRUPTIONS, 20); m_uiNextPortal_Timer = 0; From 52204471ca943f475a73cdcf7c157ffc0987edee Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sun, 23 May 2010 15:18:52 +0400 Subject: [PATCH 320/405] Test change for ICC --- addition/721_icecrown_mangos.sql | 1 + addition/721_icecrown_scriptdev2.sql | 243 +++++++++--------- .../721_icecrown_spelltable_scriptdev2.sql | 6 + .../icecrown_citadel/boss_the_lich_king.cpp | 234 ++++++++++++++++- .../boss_valithria_dreamwalker.cpp | 2 +- .../icecrown_citadel/def_spire.h | 1 + .../icecrown_citadel/icecrown_teleport.cpp | 42 ++- .../instance_icecrown_spire.cpp | 12 +- 8 files changed, 401 insertions(+), 140 deletions(-) diff --git a/addition/721_icecrown_mangos.sql b/addition/721_icecrown_mangos.sql index 37c0b6dc5..04e0eff70 100644 --- a/addition/721_icecrown_mangos.sql +++ b/addition/721_icecrown_mangos.sql @@ -117,3 +117,4 @@ UPDATE `gameobject` SET `state` = '1' WHERE `id` IN (201369,201379); -- Lich King UPDATE `creature_template` SET `ScriptName`='boss_the_lich_king_icc', `AIName`='' WHERE `entry`= 29983; UPDATE `creature_template` SET `ScriptName`='boss_tirion_icc', `AIName`='' WHERE `entry`= 38995; +UPDATE `creature_template` SET `ScriptName`='mob_ice_sphere_icc', `AIName`='' WHERE `entry`= 36633; diff --git a/addition/721_icecrown_scriptdev2.sql b/addition/721_icecrown_scriptdev2.sql index b9a3ca53a..7fe6fc594 100644 --- a/addition/721_icecrown_scriptdev2.sql +++ b/addition/721_icecrown_scriptdev2.sql @@ -36,139 +36,142 @@ INSERT INTO `script_texts` (`entry`,`content_loc8`, `content_default`, `sound`, ('-1631104','Ваши души не найдут здесь избавления!','Your soul will find no redemption here!','16696','6','0','0','saurfang SAY_KILL2'), ('-1631105','Я вижу приближение смерти!','I have become... death!','16698','3','0','0','saurfang SAY_BERSERK'), ('-1631106','Я... Освободился...','I... Am... Released.','16697','6','0','0','saurfang SAY_DEATH'), -('-1631107','Все павшие воины орды, все дохлые псы альянса - все пополнят армию Короля-Лича! Даже сейчас валькиры воскрешают ваших покойников, чтобы они стали частью Плети!','','16701','6','0','0','saurfang SAY_INTRO'), -('-1631108','Сейчас все будет еще хуже. Идите сюда, я покажу вам, какой силой меня наделил Король-Лич!','','16702','6','0','0','saurfang SAY_BERSERK'), -('-1631109','Ха-ха-ха. Дворфы!','','16703','6','0','0','saurfang SAY'), +('-1631107','Все павшие воины орды, все дохлые псы альянса - все пополнят армию Короля-Лича! Даже сейчас валькиры воскрешают ваших покойников, чтобы они стали частью Плети!','For every Horde soldier that you killed, for every Alliance dog that fell, the Lich King\'s armies grew. Even now the Val\'kyr work to raise your fallen... As Scourge.','16701','6','0','0','saurfang SAY_INTRO'), +('-1631108','Сейчас все будет еще хуже. Идите сюда, я покажу вам, какой силой меня наделил Король-Лич!','Things are about to get much worse. Come, taste the power that the Lich King has bestowed upon me!','16702','6','0','0','saurfang SAY_BERSERK'), +('-1631109','Ха-ха-ха. Дворфы!','Hahahaha! Dwarves.','16703','6','0','0','saurfang SAY'), -- Festergut -('-1631201','Отличные новости народ! Я починил трубы для подачи ядовитой смеси!','','17123','6','0','0','Putricide Valve01'), -('-1631202','Тухлопуз! Ты всегда был моим любимчиком, как и Гниломорд... Молодец, что оставил столько газа. Я его даже чувствую.','','17124','6','0','0','Putricide Festergut Dead'), -('-1631203','Повеселимся!','','16901','6','0','0','Festergut Aggro'), -('-1631204','Папочка! У меня получилось!','','16902','6','0','0','Festergut Slay 01'), -('-1631205','Мертвец! Мертвец! Мертвец!','','16903','6','0','0','Festergut Slay 02'), -('-1631206','А-а-а-а-а...','','16904','6','0','0','Festergut Death'), -('-1631207','Веселью конец!','','16905','6','0','0','Festergut Berserk'), -('-1631208','Что-то мне нехорошо...','','16906','6','0','0','Festergut Explunge Blight'), -('-1631209','Нет! Вы убили Вонючку! Сейчас получите!','','16907','6','0','0','Festergut Stinky Death '), -('-1631210','Их-ха!','','16908','6','0','0','Festergut say '), -('-1631211','Ы-ы-ы!','','16909','6','0','0','Festergut say '), -('-1631212','(Непереводимо)','','16910','6','0','0','Festergut say '), -('-1631213','Пук.','','16911','6','0','0','Festergut brrr '), +('-1631201','Отличные новости народ! Я починил трубы для подачи ядовитой смеси!','Good news, everyone! I\'ve fixed the poison slime pipes!','17123','6','0','0','Putricide Valve01'), +('-1631202','Тухлопуз! Ты всегда был моим любимчиком, как и Гниломорд... Молодец, что оставил столько газа. Я его даже чувствую.','Oh, Festergut. You were always my favorite. Next to Rotface. The good news is you left behind so much gas, I can practically taste it!','17124','6','0','0','Putricide Festergut Dead'), +('-1631203','Повеселимся!','Fun time!','16901','6','0','0','Festergut Aggro'), +('-1631204','Папочка! У меня получилось!','Daddy, I did it!','16902','6','0','0','Festergut Slay 01'), +('-1631205','Мертвец! Мертвец! Мертвец!','Dead, dead, dead!','16903','6','0','0','Festergut Slay 02'), +('-1631206','А-а-а-а-а...','Da ... Ddy...','16904','6','0','0','Festergut Death'), +('-1631207','Веселью конец!','Fun time over!','16905','6','0','0','Festergut Berserk'), +('-1631208','Что-то мне нехорошо...','Gyah! Uhhh, I not feel so good...','16906','6','0','0','Festergut Explunge Blight'), +('-1631209','Нет! Вы убили Вонючку! Сейчас получите!','NOOOO! You kill Stinky! You pay!','16907','6','0','0','Festergut Stinky Death '), +('-1631210','Их-ха!','...','16908','6','0','0','Festergut say '), +('-1631211','Ы-ы-ы!','...','16909','6','0','0','Festergut say '), +('-1631212','(Непереводимо)','...','16910','6','0','0','Festergut say '), +('-1631213','Пук.','...','16911','6','0','0','Festergut brrr '), -- Rotface -('-1631220','Отличные новости народ! Слизь снова потекла!','','17126','6','0','0','Putricide Slime Flow'), -('-1631221','Й-й-йя-хахаха!','','16986','6','0','0','Rotface Aggro'), -('-1631222','Я ЭТО заломал!','','16987','6','0','0','Rotface Slay 01'), -('-1631223','Папочка сделает новые игрушки из тебя!','','16988','6','0','0','Rotface Slay 02'), -('-1631224','Папочка, не огорчайся...','','16989','6','0','0','Rotface Death'), -('-1631225','Тихий час!','','16990','6','0','0','Rotface Berserk'), -('-1631226','Липучка-вонючка!','','16991','6','0','0','Rotface Infection'), -('-1631227','Я сделал очень злую каку! Сейчас взорвется!','','16992','6','0','0','Rotface Unstable Ooze'), -('-1631228','Что? Прелесть? Не-е-е-т!','','16993','6','0','0','Rotface Precious played when precious dies'), -('-1631229','Й-а-а-а!','','16994','6','0','0','Rotface say'), -('-1631230','Ах!','','16995','6','0','0','Rotface say'), -('-1631231','А-а-у!','','16996','6','0','0','Rotface say'), +('-1631220','Отличные новости народ! Слизь снова потекла!','Great news, everyone! The slime is flowing again!','17126','6','0','0','Putricide Slime Flow'), +('-1631221','Й-й-йя-хахаха!','WEEEEEE!','16986','6','0','0','Rotface Aggro'), +('-1631222','Я ЭТО заломал!','I brokes-ded it...','16987','6','0','0','Rotface Slay 01'), +('-1631223','Папочка сделает новые игрушки из тебя!','Daddy make toys out of you!','16988','6','0','0','Rotface Slay 02'), +('-1631224','Папочка, не огорчайся...','Bad news daddy.','16989','6','0','0','Rotface Death'), +('-1631225','Тихий час!','Sleepy Time!','16990','6','0','0','Rotface Berserk'), +('-1631226','Липучка-вонючка!','Icky sticky.','16991','6','0','0','Rotface Infection'), +('-1631227','Я сделал очень злую каку! Сейчас взорвется!','I think I made an angry poo-poo. It gonna blow!','16992','6','0','0','Rotface Unstable Ooze'), +('-1631228','Что? Прелесть? Не-е-е-т!','What? Precious? Noooooooooo!!!','16993','6','0','0','Rotface Precious played when precious dies'), +('-1631229','Й-а-а-а!','...','16994','6','0','0','Rotface say'), +('-1631230','Ах!','...','16995','6','0','0','Rotface say'), +('-1631231','А-а-у!','...','16996','6','0','0','Rotface say'), -- Professor Putricide -('-1631240','Отличные новости народ! Я усовершенствовал штамм чумы, которая уничтожит весь Азерот!','','17114','6','0','0','Putricide Aggro'), -('-1631241','М-м-м. Интересно.','','17115','6','0','0','Putricide Slay 01'), -('-1631242','О, как неожиданно!','','17116','6','0','0','Putricide Slay 02'), -('-1631243','Плохие новости, народ... Похоже, у меня ничего не выйдет.','','17117','6','0','0','Putricide Death'), -('-1631244','Прекрасные новости, народ!','','17118','6','0','0','Putricide Berserk'), -('-1631245','Это обычное облако газа. Но будьте осторожны, не такое уж оно и обычное...','','17119','6','0','0','Putricide Gas Explosion'), -('-1631246','Что-то я ничего не чувствую. Что? Это еще откуда?','','17120','6','0','0','Putricide Transform 01'), -('-1631247','На вкус как вишенка. Ой, извините...','','17121','6','0','0','Putricide Transform 02'), -('-1631248','Два слизнюка в одной комнате? Может получиться что-то любопытное...','','17122','6','0','0','Putricide Summon Ooze'), -('-1631249','Вы слишком грязные чтобы тут расхаживать! Надо сперва соскрести эту мерзкую плоть.','','17125','6','0','0','Putricide Airlock01 Before fight'), +('-1631240','Отличные новости народ! Я усовершенствовал штамм чумы, которая уничтожит весь Азерот!','Good news, everyone! I think I perfected a plague that will destroy all life on Azeroth!','17114','6','0','0','Putricide Aggro'), +('-1631241','М-м-м. Интересно.','Hmm... Interesting...','17115','6','0','0','Putricide Slay 01'), +('-1631242','О, как неожиданно!','That was unexpected!','17116','6','0','0','Putricide Slay 02'), +('-1631243','Плохие новости, народ... Похоже, у меня ничего не выйдет.','Bad news, everyone! I don\'t think I\'m going to make it.','17117','6','0','0','Putricide Death'), +('-1631244','Прекрасные новости, народ!','Great news, everyone!','17118','6','0','0','Putricide Berserk'), +('-1631245','Это обычное облако газа. Но будьте осторожны, не такое уж оно и обычное...','Just an ordinary gas cloud. But watch out, because that\'s no ordinary gas cloud!','17119','6','0','0','Putricide Gas Explosion'), +('-1631246','Что-то я ничего не чувствую. Что? Это еще откуда?','Hmm. I don\'t feel a thing. Whaa...? Where\'d those come from?','17120','6','0','0','Putricide Transform 01'), +('-1631247','На вкус как вишенка. Ой, извините...','Tastes like... Cherry! Oh! Excuse me!','17121','6','0','0','Putricide Transform 02'), +('-1631248','Два слизнюка в одной комнате? Может получиться что-то любопытное...','Two oozes, one room! So many delightful possibilities...','17122','6','0','0','Putricide Summon Ooze'), +('-1631249','Вы слишком грязные чтобы тут расхаживать! Надо сперва соскрести эту мерзкую плоть.','You can\'t come in here all dirty like that! You need that nasty flesh scrubbed off first!','17125','6','0','0','Putricide Airlock01 Before fight'), -- Blood Prince Council -('-1631301','Глупые смертные! Думали, что одолели нас? Санлейн, непобедимые воины Короля-Лича! Теперь наши силы едины!','','16795','6','0','0','Lanathel Intro Princes'), -('-1631302','Кушать подано!','','16681','6','0','0','Valanar Slay 01'), -('-1631303','Теперь вы видите, насколько мы сильны?','','16682','6','0','0','Valanar Slay 02'), -('-1631304','Охохо...','','16683','6','0','0','Valanar Death'), -('-1631305','Хорош тянуть время перед Санлейн!','','16684','6','0','0','Valanar Berserk'), -('-1631306','Наксанар был досадным недоразумением! Силы сферы позволят Валанару свершить отмщение!','','16685','6','0','0','Valanar Empower'), -('-1631307','Моя чаша полна','','16686','6','0','0','Valanar Special'), -('-1631308','Йих!','','16687','6','0','0','Princes say'), -('-1631309','Э-эх!','','16688','6','0','0','Princes say'), -('-1631310','До-хо!','','16689','6','0','0','Princes say'), +('-1631301','Глупые смертные! Думали, что одолели нас? Санлейн, непобедимые воины Короля-Лича! Теперь наши силы едины!','Foolish mortals. You thought us defeated so easily? The San\'layn are the Lich King\'s immortal soldiers! Now you shall face their might combined!','16795','6','0','0','Lanathel Intro Princes'), +('-1631302','Кушать подано!','Dinner... is served.','16681','6','0','0','Valanar Slay 01'), +('-1631303','Теперь вы видите, насколько мы сильны?','Do you see NOW the power of the Darkfallen?','16682','6','0','0','Valanar Slay 02'), +('-1631304','Охохо...','...why...?','16683','6','0','0','Valanar Death'), +('-1631305','Хорош тянуть время перед Санлейн!','BOW DOWN BEFORE THE SAN\'LAYN!','16684','6','0','0','Valanar Berserk'), +('-1631306','Наксанар был досадным недоразумением! Силы сферы позволят Валанару свершить отмщение!','Naxxanar was merely a setback! With the power of the orb, Valanar will have his vengeance!','16685','6','0','0','Valanar Empower'), +('-1631307','Моя чаша полна','My cup runneth over.','16686','6','0','0','Valanar Special'), +('-1631308','Йих!','...','16687','6','0','0','Princes say'), +('-1631309','Э-эх!','...','16688','6','0','0','Princes say'), +('-1631310','До-хо!','...','16689','6','0','0','Princes say'), -- Blood Queen Lana'thel -('-1631321','Это было неразумное решение!','','16782','6','0','0','Lanathel Aggro'), -('-1631322','Я только попробую на вкус...','','16783','6','0','0','Lanathel Bite 01'), -('-1631323','Я голодна!','','16784','6','0','0','Lanathel Bite 02'), -('-1631324','Смерть вас не спасет!','','16785','6','0','0','Lanathel Add'), -('-1631325','Страдайте же!','','16786','6','0','0','Lanathel Special 01'), -('-1631326','Как вам такое?','','16787','6','0','0','Lanathel Special 02'), -('-1631327','Начинаем представление!','','16788','6','0','0','Lanathel Special 03'), -('-1631328','Не повезло...','','16789','6','0','0','Lanathel Reset'), -('-1631329','Нет. Моя прелесть, приятного аппетита!','','16790','6','0','0','Lanathel Mind Control'), -('-1631330','Вот как... У тебя не поучилось?','','16791','6','0','0','Lanathel Slay 01'), -('-1631331','Какая жалость...','','16792','6','0','0','Lanathel Slay 02'), -('-1631332','Сейчас все кончится!','','16793','6','0','0','Lanathel Berserk'), -('-1631333','Но... Мы ведь так хорошо ладили...','','16794','6','0','0','Lanathel Death'), -('-1631334','Восстаньте братья! И уничтожьте наших врагов!','','16796','6','0','0','Lanathel Empower'), -('-1631335','Ха-х!','','16797','6','0','0','Lanathel say'), -('-1631338','Ах-ха...','','16798','6','0','0','Lanathel say'), -('-1631339','Ых...','','16799','6','0','0','Lanathel say'), +('-1631321','Это было неразумное решение!','You have made an... unwise... decision.','16782','6','0','0','Lanathel Aggro'), +('-1631322','Я только попробую на вкус...','Just a taste...','16783','6','0','0','Lanathel Bite 01'), +('-1631323','Я голодна!','Know my hunger!','16784','6','0','0','Lanathel Bite 02'), +('-1631324','Смерть вас не спасет!','Death is no escape!','16785','6','0','0','Lanathel Add'), +('-1631325','Страдайте же!','SUFFER!','16786','6','0','0','Lanathel Special 01'), +('-1631326','Как вам такое?','Can you handle this?','16787','6','0','0','Lanathel Special 02'), +('-1631327','Начинаем представление!','Here it comes.','16788','6','0','0','Lanathel Special 03'), +('-1631328','Не повезло...','How... Unfortunate...','16789','6','0','0','Lanathel Reset'), +('-1631329','Нет. Моя прелесть, приятного аппетита!','Yes... feed my precious one! You\'re mine now!','16790','6','0','0','Lanathel Mind Control'), +('-1631330','Вот как... У тебя не поучилось?','Really...? Is that all you\'ve got?','16791','6','0','0','Lanathel Slay 01'), +('-1631331','Какая жалость...','Such a pity!','16792','6','0','0','Lanathel Slay 02'), +('-1631332','Сейчас все кончится!','THIS! ENDS! NOW!','16793','6','0','0','Lanathel Berserk'), +('-1631333','Но... Мы ведь так хорошо ладили...','But... we were getting along... so well...','16794','6','0','0','Lanathel Death'), +('-1631334','Восстаньте братья! И уничтожьте наших врагов!','Rise up brothers! And destroy our enemies!','16796','6','0','0','Lanathel Empower'), +('-1631335','Ха-х!','Ha!','16797','6','0','0','Lanathel say'), +('-1631338','Ах-ха...','Oo...','16798','6','0','0','Lanathel say'), +('-1631339','Ых...','Oh...','16799','6','0','0','Lanathel say'), -- Valithria Dreamwalker -('-1631401','Герои! Вы должны мне помочь! Мои силы на исходе... Залечите мои раны...','','17064','6','0','0','Valithria Aggro'), -('-1631402','Одержимые не знают отдыха...','','17065','6','0','0','Valithria Slay Bad Hostile NPC'), -('-1631403','Прискобная потеря.','','17066','6','0','0','Valithria Slay Good - Player'), -('-1631404','Неудачники!','','17067','6','0','0','Valithria Berserk'), -('-1631405','Я открыла портал в изумрудный сон. Там вы найдете спасение, герои!','','17068','6','0','0','Valithria Dream World Open'), -('-1631406','Я долго не продержусь!','','17069','6','0','0','Valithria Health Low'), -('-1631407','Силы возвращаются ко мне! Герои, еще немного!','','17070','6','0','0','Valithria Health High'), -('-1631408','Я излечилась! Изера, даруй мне силу покончить с этими нечестивыми тварями!','','17071','6','0','0','Valithria Win'), -('-1631409','Простите меня, я не могу остано... ВСЕ ВО ВЛАСТИ КОШМАРА!','','17072','6','0','0','Valithria Lose'), +('-1631401','Герои! Вы должны мне помочь! Мои силы на исходе... Залечите мои раны...','Heroes, lend me your aid! I... I cannot hold them off much longer! You must heal my wounds!','17064','6','0','0','Valithria Aggro'), +('-1631402','Одержимые не знают отдыха...','No rest for the wicked...','17065','6','0','0','Valithria Slay Bad Hostile NPC'), +('-1631403','Прискобная потеря.','A tragic loss...','17066','6','0','0','Valithria Slay Good - Player'), +('-1631404','Неудачники!','FAILURES!','17067','6','0','0','Valithria Berserk'), +('-1631405','Я открыла портал в изумрудный сон. Там вы найдете спасение, герои!','I have opened a portal into the Dream. Your salvation lies within, heroes.','17068','6','0','0','Valithria Dream World Open'), +('-1631406','Я долго не продержусь!','I will not last much longer!','17069','6','0','0','Valithria Health Low'), +('-1631407','Силы возвращаются ко мне! Герои, еще немного!','My strength is returning! Press on, heroes!','17070','6','0','0','Valithria Health High'), +('-1631408','Я излечилась! Изера, даруй мне силу покончить с этими нечестивыми тварями!','I am renewed! Ysera grants me the favor to lay these foul creatures to rest!','17071','6','0','0','Valithria Win'), +('-1631409','Простите меня, я не могу остано... ВСЕ ВО ВЛАСТИ КОШМАРА!','Forgive me for what I do! I... cannot... stop... ONLY NIGHTMARES REMAIN!','17072','6','0','0','Valithria Lose'), -- Sindragosa -('-1631420','Глупцы! Зачем вы сюда явились? Ледяные ветра Нордскола унесут ваши души!','','17007','6','0','0','Sindragosa Aggro'), -('-1631421','Погибни!','','17008','6','0','0','Sindragosa Slay 01'), -('-1631422','Удел смертных!','','17009','6','0','0','Sindragosa Slay 02'), -('-1631423','Наконец-то! Свободна!','','17010','6','0','0','Sindragosa Death'), -('-1631424','Хватит! Эти игры меня утомляют!','','17011','6','0','0','Sindragosa Berserk'), -('-1631425','Здесь ваше вторжение и окончится! Никто не уцелеет!','','17012','6','0','0','Sindragosa Take Off - fly'), -('-1631426','Вы чувствуете, как ледяная ладонь смерти сжимает сердце?','','17013','6','0','0','Sindragosa Freeze'), -('-1631427','Трепещите, смертные! Ибо ваша жалкая магия теперь бессильна!','','17014','6','0','0','Sindragosa Arcane'), -('-1631428','А-а-а! Жжот! Что это за колдовство?','','17015','6','0','0','Sindragosa Special'), -('-1631429','А теперь почувствуйте всю мощь Господина и погрузитесь в отчаяние!','','17016','6','0','0','Sindragosa Low HP'), +('-1631420','Глупцы! Зачем вы сюда явились? Ледяные ветра Нордскола унесут ваши души!','You are fools who have come to this place! The icy winds of Northrend will consume your souls!','17007','6','0','0','Sindragosa Aggro'), +('-1631421','Погибни!','Perish!','17008','6','0','0','Sindragosa Slay 01'), +('-1631422','Удел смертных!','A flaw of mortality...','17009','6','0','0','Sindragosa Slay 02'), +('-1631423','Наконец-то! Свободна!','Free...at last...','17010','6','0','0','Sindragosa Death'), +('-1631424','Хватит! Эти игры меня утомляют!','Enough! I tire of these games!','17011','6','0','0','Sindragosa Berserk'), +('-1631425','Здесь ваше вторжение и окончится! Никто не уцелеет!','Your incursion ends here! None shall survive!','17012','6','0','0','Sindragosa Take Off - fly'), +('-1631426','Вы чувствуете, как ледяная ладонь смерти сжимает сердце?','Can you feel the cold hand of death upon your heart?','17013','6','0','0','Sindragosa Freeze'), +('-1631427','Трепещите, смертные! Ибо ваша жалкая магия теперь бессильна!','Suffer, mortals, as your pathetic magic betrays you!','17014','6','0','0','Sindragosa Arcane'), +('-1631428','А-а-а! Жжот! Что это за колдовство?','Suffer, mortals, as your pathetic magic betrays you!','17015','6','0','0','Sindragosa Special'), +('-1631429','А теперь почувствуйте всю мощь Господина и погрузитесь в отчаяние!','Now feel my master\'s limitless power and despair!','17016','6','0','0','Sindragosa Low HP'), + +-- Lich king +('-1631501','Неужели прибыли, наконец, хваленые силы света? Мне бросить Ледяную скорбь и сдаться на твою милость, Фордринг?','So...the Light\'s vaunted justice has finally arrived. Shall I lay down Frostmourne and throw myself at your mercy, Fordring?','17349','6','0','0','Lich King SAY_INTRO1'), +('-1631503','Ты пройдешь через эти мучения сам.','You will learn of that first hand. When my work is complete, you will beg for mercy -- and I will deny you. Your anguished cries will be testament to my unbridled power.','17350','6','0','0','Lich King SAY_INTRO3'), +('-1631505','Я оставлю тебя в живых, чтобы ты увидел финал! Не могу допустить чтобы величайший служитель света пропустил рождение МОЕГО мира!','I\'ll keep you alive to witness the end, Fordring. I would not want the Light\'s greatest champion to miss seeing this wretched world remade in my image.','17351','6','0','0','Lich King SAY_AGGRO'), +('-1631506','Ну же, герои! В вашей ярости - МОЯ сила!','Come then champions, feed me your rage!','17352','6','0','0','Lich King SAY'), +('-1631507','Сомнений нет - вы сильнейшие герои Азерота! Вы преодолели все препятствия, которые я воздвиг перед вами! Сильнейшие из моих слуг пали под вашим натиском, сгорели в пламени вашей ярости!','No question remains unanswered. No doubts linger. You are Azeroth\'s greatest champions! You overcame every challenge I laid before you. My mightiest servants have fallen before your relentless onslaught, your unbridled fury..','17353','6','0','0','Lich King SAY'), +('-1631508','Что движет вами? Праведность? Не знаю...','Is it truly righteousness that drives you? I wonder.','17354','6','0','0','Lich King SAY'), +('-1631509','Ты отлично их обучил, Фордринг! Ты привел сюда лучших воинов, которых знал мир! И отдал их в мои руки. Как я и рассчитывал.','You trained them well, Fordring. You delivered the greatest fighting force this world has ever known... right into my hands -- exactly as I intended. You shall be rewarded for your unwitting sacrifice.','17355','6','0','0','Lich King SAY'), +('-1631510','Смотри как я буду воскрешать их и превращать в воинов Плети! Они повергнут этот мир в пучину хаоса. Азерот падет от их рук. И ты станешь первой жертвой. ','Watch now as I raise them from the dead to become masters of the Scourge. They will shroud this world in chaos and destruction. Azeroth\'s fall will come at their hands -- and you will be the first to die.','17356','6','0','0','Lich King SAY'), +('-1631511','Мне по душе эта ирония!','I delight in the irony.','17357','6','0','0','Lich King SAY'), +('-1631512','Невозможно!','Impossible...','17358','6','0','0','Lich King SAY'), +('-1631513','Да! Вы меня и правда ранили. Я слишком долго с вами играл. Испытайте на себе возмездие Смерти!','You gnats actually hurt me! Perhaps I\'ve toyed with you long enough, now taste the vengeance of the grave!','17359','6','0','0','Lich King SAY'), +('-1631514','А-а-х!','...','17360','6','0','0','Lich King SAY'), +('-1631515','И вот я стою как лев пред агнцами. И не дрожат они.','Now I stand, the lion before the lambs... and they do not fear.','17361','6','0','0','Lich King SAY'), +('-1631516','Им неведом страх!','They cannot fear.','17362','6','0','0','Lich King SAY'), +('-1631517','Надежда тает!','Hope wanes!','17363','6','0','0','Lich King SAY'), +('-1631518','Пришел конец!','The end has come!','17364','6','0','0','Lich King SAY'), +('-1631519','Встречайте трагический финал!','Face now your tragic end!','17365','6','0','0','Lich King SAY_KILL'), +('-1631520','Ледяная скорбь жаждет крови!','Frostmourne hungers...','17366','6','0','0','Lich King SAY'), +('-1631521','Ледяная скорбь, повинуйся мне!','Argh... Frostmourne, obey me!','17367','6','0','0','Lich King SAY'), +('-1631522','Ледяная скорбь поглотит душу вашего товарища!','Frostmourne feeds on the soul of your fallen ally!','17368','6','0','0','Lich King SAY_KILL'), +('-1631523','Я проморожу вас насквозь и вы разлетитесь на ледяные осколки!','I will freeze you from within until all that remains is an icy husk!','17369','6','0','0','Lich King SAY'), +('-1631524','Смотрите, как мир рушится вокруг вас!','Watch as the world around you collapses!','17370','6','0','0','Lich King SAY_WIN'), +('-1631525','Конец света!','Apocalypse!','17371','6','0','0','Lich King SAY'), +('-1631526','Склонись перед своим господином и повелителем!','Bow down before your lord and master!','17372','6','0','0','Lich King SAY'), +('-1631527','Валькирия! Твой господин зовет!','Val\'kyr, your master calls!','17373','6','0','0','Lich King SAY_SUMMON'), +('-1631528','...','...','17374','6','0','0','Lich King SAY_DEATH'), --- Lich king && Tirion -('-1631501','Неужели прибыли, наконец, хваленые силы света? Мне бросить Ледяную скорбь и сдаться на твою милость, Фордринг?','','17349','6','0','0','Lich King SAY_INTRO1'), -('-1631503','Ты пройдешь через эти мучения сам.','','17350','6','0','0','Lich King SAY_INTRO3'), -('-1631505','Я оставлю тебя в живых, чтобы ты увидел финал! Не могу допустить чтобы величайший служитель света пропустил рождение МОЕГО мира!','','17351','6','0','0','Lich King SAY_AGGRO'), -('-1631506','Ну же, герои! В вашей ярости - МОЯ сила!','','17352','6','0','0','Lich King SAY'), -('-1631507','Сомнений нет - вы сильнейшие герои Азерота! Вы преодолели все препятствия, которые я воздвиг перед вами! Сильнейшие из моих слуг пали под вашим натиском, сгорели в пламени вашей ярости!','','17353','6','0','0','Lich King SAY'), -('-1631508','Что движет вами? Праведность? Не знаю...','','17354','6','0','0','Lich King SAY'), -('-1631509','Ты отлично их обучил, Фордринг! Ты привел сюда лучших воинов, которых знал мир! И отдал их в мои руки. Как я и рассчитывал.','','17355','6','0','0','Lich King SAY'), -('-1631510','Смотри как я буду воскрешать их и превращать в воинов Плети! Они повергнут этот мир в пучину хаоса. Азерот падет от их рук. И ты станешь первой жертвой. ','','17356','6','0','0','Lich King SAY'), -('-1631511','Мне по душе эта ирония!','','17357','6','0','0','Lich King SAY'), -('-1631512','Невозможно!','','17358','6','0','0','Lich King SAY'), -('-1631513','Да! Вы меня и правда ранили. Я слишком долго с вами играл. Испытайте на себе возмездие Смерти!','','17359','6','0','0','Lich King SAY'), -('-1631514','А-а-х!','','17360','6','0','0','Lich King SAY'), -('-1631515','И вот я стою как лев пред агнцами. И не дрожат они.','','17361','6','0','0','Lich King SAY'), -('-1631516','Им неведом страх!','','17362','6','0','0','Lich King SAY'), -('-1631517','Надежда тает!','','17363','6','0','0','Lich King SAY'), -('-1631518','Пришел конец!','','17364','6','0','0','Lich King SAY'), -('-1631519','Встречайте трагический финал!','','17365','6','0','0','Lich King SAY_KILL'), -('-1631520','Ледяная скорбь жаждет крови!','','17366','6','0','0','Lich King SAY'), -('-1631521','Ледяная скорбь, повинуйся мне!','','17367','6','0','0','Lich King SAY'), -('-1631522','Ледяная скорбь поглотит душу вашего товарища!','','17368','6','0','0','Lich King SAY_KILL'), -('-1631523','Я проморожу вас насквозь и вы разлетитесь на ледяные осколки!','','17369','6','0','0','Lich King SAY'), -('-1631524','Смотрите, как мир рушится вокруг вас!','','17370','6','0','0','Lich King SAY_WIN'), -('-1631525','Конец света!','','17371','6','0','0','Lich King SAY'), -('-1631526','Склонись перед своим господином и повелителем!','','17372','6','0','0','Lich King SAY'), -('-1631527','Валькирия! Твой господин зовет!','','17373','6','0','0','Lich King SAY_SUMMON'), -('-1631528','...','','17374','6','0','0','Lich King SAY_DEATH'), -- Tirion -('-1631552','Мы даруем тебе быструю смерть, Артас! Более быструю чем ты заслуживаешь за то что замучил и погубил десятки тысяч жизней!','','17390','6','0','0','Tirion SAY_INTRO2'), -('-1631554','Да будет так! Герои, в атаку','','17391','6','0','0','Tirion SAY_INTRO4'), -('-1631555','Свет! Даруй мне последнее благословение! Дай мне разбить эти оковы!','','17392','6','0','0','Tirion SAY'), -('-1631556','Хватит, Артас! Твоя ненависть не заберет больше ни одной жизни!','','17393','6','0','0','Tirion SAY'), -('-1631557','Вы пришли чтобы вершить суд над Артасом? Чтобы уничтожить короля-лича?','','17394','6','0','0',' SAY'), -('-1631558','Вы не должны оказаться во власти Ледяной скорби. Иначе, как и я, будете навеки порабощены этим проклятым клинком.','','17395','6','0','0',' SAY'), -('-1631559','Помогите мне уничтожить эти истерзанные души. Вместе мы вытянем силу из ледяной скорби и ослабим короля-лича.','','17396','6','0','0',' SAY'), -('-1631560','Наконец я свободен. Все кончено, сын мой. Настал час расплаты.','','17397','6','0','0',' SAY'), -('-1631561','Поднимитесь, воины света!','','17398','6','0','0',' SAY'); +('-1631552','Мы даруем тебе быструю смерть, Артас! Более быструю чем ты заслуживаешь за то что замучил и погубил десятки тысяч жизней!','We will grant you a swift death, Arthas. More than can be said for the thousands you\'ve tortured and slain.','17390','6','0','0','Tirion SAY_INTRO2'), +('-1631554','Да будет так! Герои, в атаку','So be it. Champions, attack!','17391','6','0','0','Tirion SAY_INTRO4'), +('-1631555','Свет! Даруй мне последнее благословение! Дай мне разбить эти оковы!','LIGHT, GRANT ME ONE FINAL BLESSING. GIVE ME THE STRENGTH... TO SHATTER THESE BONDS!','17392','6','0','0','Tirion SAY'), +('-1631556','Хватит, Артас! Твоя ненависть не заберет больше ни одной жизни!','No more, Arthas! No more lives will be consumed by your hatred!','17393','6','0','0','Tirion SAY'), + +-- Menethil +('-1631557','Вы пришли чтобы вершить суд над Артасом? Чтобы уничтожить короля-лича?','You have come to bring Arthas to justice? To see the Lich King destroyed?','17394','6','0','0','Terenas Menethil II SAY'), +('-1631558','Вы не должны оказаться во власти Ледяной скорби. Иначе, как и я, будете навеки порабощены этим проклятым клинком.','First, you must escape Frostmourne\'s hold, or be damned as I am; trapped within this cursed blade for all eternity.','17395','6','0','0','Terenas Menethil II SAY'), +('-1631559','Помогите мне уничтожить эти истерзанные души. Вместе мы вытянем силу из ледяной скорби и ослабим короля-лича.','Aid me in destroying these tortured souls! Together we will loosen Frostmourne\'s hold and weaken the Lich King from within!','17396','6','0','0','Terenas Menethil II SAY'), +('-1631560','Наконец я свободен. Все кончено, сын мой. Настал час расплаты.','Free at last! It is over, my son. This is the moment of reckoning.','17397','6','0','0','Terenas Menethil II SAY'), +('-1631561','Поднимитесь, воины света!','Rise up, champions of the Light!','17398','6','0','0',' SAY'); diff --git a/addition/721_icecrown_spelltable_scriptdev2.sql b/addition/721_icecrown_spelltable_scriptdev2.sql index 9dcdea493..b1c17bce7 100644 --- a/addition/721_icecrown_spelltable_scriptdev2.sql +++ b/addition/721_icecrown_spelltable_scriptdev2.sql @@ -307,3 +307,9 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ (36597, 69037, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36597, 36609, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36597, 74352, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0); +-- ice sphere +DELETE FROM `boss_spell_table` WHERE `entry` = 36633; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(36633, 69099, 0, 0, 0, 2000, 0, 0, 0, 2000, 0, 0, 0, 0, 0, 0, 6, 0, 0), +(36633, 69108, 0, 0, 0, 2000, 0, 0, 0, 2000, 0, 0, 0, 0, 0, 0, 3, 0, 0), +(36633, 69090, 0, 0, 0, 8000, 0, 0, 0, 24000, 0, 0, 0, 0, 0, 0, 1, 0, 0); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp index 3973d9665..3038a741d 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp @@ -32,6 +32,22 @@ enum BossSpells SPELL_SOUL_REAPER = 69409, SPELL_DEFILE = 72754, SPELL_HARVEST_SOUL = 68980, + SPELL_HARVEST_SOUL_TELEPORT = 71372, +// + SPELL_CHANNEL_KING = 71769, + SPELL_BROKEN_FROSTMOURNE = 72398, + SPELL_BOOM_VISUAL = 72726, + SPELL_ICEBLOCK_TRIGGER = 71614, + SPELL_TIRION_LIGHT = 71797, + SPELL_FROSTMOURNE_TRIGGER = 72405, + SPELL_SUMMON_BROKEN_FROSTMOURNE = 72406, + SPELL_DISENGAGE = 61508, + SPELL_FURY_OF_FROSTMOURNE = 70063, + SPELL_REVIVE_VISUAL = 37755, //Override? + SPELL_REVIVE = 51918, + SPELL_CLONE_PLAYER = 57507, + SPELL_BERSERK = 47008, + //Transition phase SPELL_REMORSELESS_WINTER = 68981, SPELL_PAIN_AND_SUFFERING = 72133, @@ -45,6 +61,7 @@ enum BossSpells SPELL_SUMMON_ICE_SPHERE = 69103, SPELL_ICE_PULSE = 69099, SPELL_ICE_BURST = 69108, + SPELL_ICE_SPHERE_VISUAL = 69090, //Drudge ghouls SPELL_SUMMON_DRUDGE_GHOULS = 70358, @@ -63,13 +80,63 @@ enum BossSpells NPC_VALKYR = 36609, SPELL_WINGS_OF_THE_DAMNED = 74352, +// + NPC_FROSTMOURNE_TRIGGER = 38584, + NPC_ICE_SPHERE = 36633, + NPC_DEFILER = 38757, + NPC_RAGING_SPIRIT = 36701, + +}; + +enum Yells +{ + SAY_INTRO_1_KING = -1631501, + SAY_INTRO_2_TIRION = -1631502, + SAY_INTRO_3_KING = -1631503, + SAY_INTRO_4_TIRION = -1631504, + SAY_INTRO_5_KING = -1631505, + SAY_AGGRO_KING = -1631506, + SAY_REMORSELESS_WINTER = -1631507, + SAY_RANDOM_1 = -1631508, + SAY_RANDOM_2 = -1631509, + SAY_KILL_1 = -1631510, + SAY_KILL_2 = -1631511, + SAY_BERSERK = -1631512, + SAY_ENDING_1_KING = -1631513, + SAY_ENDING_2_KING = -1631514, + SAY_ENDING_3_KING = -1631515, + SAY_ENDING_4_KING = -1631516, + SAY_ENDING_5_TIRION = -1631517, + SAY_ENDING_6_KING = -1631518, + SAY_ENDING_7_KING = -1631519, + SAY_ENDING_8_TIRION = -1631520, + SAY_ENDING_9_FATHER = -1631521, + SAY_ENDING_10_TIRION = -1631522, + SAY_ENDING_11_FATHER = -1631523, + SAY_ENDING_12_KING = -1631524, + SAY_DEATH_KING = -1631525, + SAY_ESCAPE_FROSTMOURNE = -1631526, + SAY_HARVEST_SOUL = -1631527, + SAY_DEVOURED_FROSTMOURNE = -1631528, + SAY_SUMMON_VALKYR = -1631529, + SAY_BROKEN_ARENA = -1631530, + SAY_10_PROZENT = -1631531, }; static Locations SpawnLoc[]= { - {459.93689f, -2124.638184f, 1240.860107f}, //0 Lich King Intro - {491.27118f, -2124.638184f, 1240.860107f}, //1 Tirion 1 - {481.69797f, -2124.638184f, 1240.860107f}, //2 Tirion 2 + {459.93689f, -2124.638184f, 1040.860107f}, // 0 Lich King Intro + {503.156525, -2124.516602, 1040.860107}, // 1 Lich king move end + {491.27118f, -2124.638184f, 1040.860107f}, // 2 Tirion 1 + {481.69797f, -2124.638184f, 1040.860107f}, // 3 Tirion 2 + {498.00448f, 2201.573486f, 1046.093872f}, // 4 Valkyrs? + {959.996f, 212.576f, 193.843f}, + {932.537f, 231.813f, 193.838f}, + {958.675f, 254.767f, 193.822f}, + {946.955f, 201.316f, 192.535f}, + {944.294f, 149.676f, 197.551f}, + {930.548f, 284.888f, 193.367f}, + {965.997f, 278.398f, 195.777f}, }; struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI @@ -84,12 +151,20 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI ScriptedInstance *pInstance; BossSpellWorker* bsw; uint8 stage; + uint32 nextEvent; + uint32 nextPoint; + uint32 UpdateTimer; + bool movementstarted; void Reset() { if(!pInstance) return; pInstance->SetData(TYPE_LICH_KING, NOT_STARTED); bsw->resetTimers(); + stage = 0; + nextEvent = 0; + nextPoint = 0; + movementstarted = false; } void MoveInLineOfSight(Unit* pWho) @@ -98,7 +173,13 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI void MovementInform(uint32 type, uint32 id) { - if (type != POINT_MOTION_TYPE) return; + if (type != POINT_MOTION_TYPE || !movementstarted) return; + if (id == nextPoint) + { + movementstarted = false; + pInstance->SetData(TYPE_EVENT,nextEvent); + m_creature->GetMotionMaster()->MovementExpired(); + } } void KilledUnit(Unit* pVictim) @@ -118,6 +199,13 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI if (pInstance) pInstance->SetData(TYPE_LICH_KING, FAIL); } + void StartMovement(uint32 id, uint32 _nextEvent) + { + nextPoint = id; + nextEvent = _nextEvent; + m_creature->GetMotionMaster()->MovePoint(id, SpawnLoc[id].x, SpawnLoc[id].y, SpawnLoc[id].z); + } + void JustSummoned(Creature* summoned) { } @@ -134,6 +222,46 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI void UpdateAI(const uint32 diff) { + + if (pInstance->GetData(TYPE_EVENT_NPC) == NPC_LICH_KING) + { + UpdateTimer = pInstance->GetData(TYPE_EVENT_TIMER); + if (UpdateTimer <= diff) + { + debug_log("EventMGR: creature %u received signal %u ",m_creature->GetEntry(),pInstance->GetData(TYPE_EVENT)); + switch (pInstance->GetData(TYPE_EVENT)) + { + case 12000: + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_STAND); + StartMovement(0,12020); + break; + case 12020: + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_TALK); + DoScriptText(SAY_INTRO_1_KING, m_creature); + UpdateTimer = 12000; + pInstance->SetData(TYPE_EVENT,12030); + break; + case 12040: + break; + case 12060: + break; + case 12080: + break; + case 12100: + break; + case 12120: + break; + case 12140: + break; + case 12160: + break; + default: + break; + } + } else UpdateTimer -= diff; + pInstance->SetData(TYPE_EVENT_TIMER, UpdateTimer); + } + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -158,12 +286,58 @@ struct MANGOS_DLL_DECL boss_tirion_iccAI : public ScriptedAI } ScriptedInstance *pInstance; + uint32 UpdateTimer; void Reset() { if(!pInstance) return; } + void UpdateAI(const uint32 diff) + { + + if (pInstance->GetData(TYPE_EVENT_NPC) == NPC_TIRION) + { + UpdateTimer = pInstance->GetData(TYPE_EVENT_TIMER); + if (UpdateTimer <= diff) + { + debug_log("EventMGR: creature %u received signal %u ",m_creature->GetEntry(),pInstance->GetData(TYPE_EVENT)); + switch (pInstance->GetData(TYPE_EVENT)) + { + case 12030: + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_TALK); + DoScriptText(SAY_INTRO_2_TIRION, m_creature); + UpdateTimer = 9000; + pInstance->SetData(TYPE_EVENT,12040); + break; + case 12050: + break; + case 12070: + break; + case 12090: + break; + case 12110: + break; + case 12130: + break; + case 12150: + break; + case 12170: + break; + default: + break; + } + } else UpdateTimer -= diff; + pInstance->SetData(TYPE_EVENT_TIMER, UpdateTimer); + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + +// DoMeleeAttackIfReady(); + } + + }; bool GossipHello_boss_tirion_icc(Player* pPlayer, Creature* pCreature) @@ -197,10 +371,17 @@ bool GossipHello_boss_tirion_icc(Player* pPlayer, Creature* pCreature) bool GossipSelect_boss_tirion_icc(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { + ScriptedInstance* pInstance; + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + if (!pInstance) return false; + if (uiAction == GOSSIP_ACTION_INFO_DEF) { pPlayer->CLOSE_GOSSIP_MENU(); - } + pInstance->SetData(TYPE_EVENT,12000); + return true; + } else return false; + }; CreatureAI* GetAI_boss_tirion_icc(Creature* pCreature) @@ -208,6 +389,44 @@ CreatureAI* GetAI_boss_tirion_icc(Creature* pCreature) return new boss_tirion_iccAI(pCreature); }; +struct MANGOS_DLL_DECL mob_ice_sphere_iccAI : public ScriptedAI +{ + mob_ice_sphere_iccAI(Creature *pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); + Reset(); + } + + ScriptedInstance *pInstance; + BossSpellWorker* bsw; + + void Reset() + { + bsw->doCast(SPELL_ICE_SPHERE_VISUAL); + } + + + void UpdateAI(const uint32 uiDiff) + { + if (!pInstance || pInstance->GetData(TYPE_LICH_KING) != IN_PROGRESS) + m_creature->ForcedDespawn(); + + if (m_creature->getVictim()->GetTypeId() != TYPEID_PLAYER) + return; + + bsw->timedCast(SPELL_ICE_PULSE, uiDiff); + + if (m_creature->IsWithinDistInMap(m_creature->getVictim(), 3.0f)) + bsw->timedCast(SPELL_ICE_BURST,uiDiff); + } +}; + +CreatureAI* GetAI_mob_ice_sphere_icc(Creature* pCreature) +{ + return new mob_ice_sphere_iccAI(pCreature); +}; + void AddSC_boss_lich_king_icc() { Script *newscript; @@ -224,4 +443,9 @@ void AddSC_boss_lich_king_icc() newscript->pGossipSelect = &GossipSelect_boss_tirion_icc; newscript->RegisterSelf(); + newscript = new Script; + newscript->Name = "mob_ice_sphere_icc"; + newscript->GetAI = &GetAI_mob_ice_sphere_icc; + newscript->RegisterSelf(); + }; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp index 959ad4d0c..73d800ca7 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp @@ -488,7 +488,7 @@ struct MANGOS_DLL_DECL mob_mana_voidAI : public ScriptedAI { if (!m_pInstance || m_pInstance->GetData(TYPE_VALITHRIA) != IN_PROGRESS) m_creature->ForcedDespawn(); - + if (m_ui_Timer < uiDiff) m_creature->ForcedDespawn(); else m_ui_Timer -= uiDiff; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h index e9f7df277..140b45467 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h @@ -44,6 +44,7 @@ enum NPC_MURADIN = 36948, NPC_TIRION = 38995, + NPC_MENETHIL = 38579, NPC_STINKY = 37025, NPC_PRECIOUS = 37217, diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp index 78e13d4b7..5c6535f77 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp @@ -30,7 +30,7 @@ PORTALS_COUNT = 8 struct t_Locations { - char const* name; + char const* name[2]; float x, y, z; uint32 spellID; bool state; @@ -40,14 +40,14 @@ struct t_Locations static t_Locations PortalLoc[]= { -{"Молот света",-17.1928, 2211.44, 30.1158,0,true,true,TYPE_TELEPORT}, // -{"Молельня проклятых",-503.62, 2211.47, 62.8235,70856,false,true,TYPE_MARROWGAR}, // -{"Черепной вал",-615.145, 2211.47, 199.972,70857,false,true,TYPE_DEATHWHISPER}, // -{"Подъем смертоносного",-549.131, 2211.29, 539.291,70858,false,true,TYPE_FLIGHT_WAR}, // -{"Цитадель Ледяной Короны",4198.42, 2769.22, 351.065,70859,false,true,TYPE_SAURFANG}, // -{"Святилище крови",4490.205566, 2769.275635, 403.983765,0,false,true,TYPE_BLOOD_COUNCIL}, // -{"Логово Королевы льда",4356.580078, 2565.75, 220.401993,70861,false,true,TYPE_VALITHRIA}, // -{"Ледяной трон",528.767273f, -2124.845947f, 1041.86f, 70860,false,true,TYPE_SINDRAGOSA}, // +{"Hammer of the World","Молот света",-17.1928, 2211.44, 30.1158,0,true,true,TYPE_TELEPORT}, // +{"Chapel of Damned","Молельня проклятых",-503.62, 2211.47, 62.8235,70856,false,true,TYPE_MARROWGAR}, // +{"Skulls plato","Черепной вал",-615.145, 2211.47, 199.972,70857,false,true,TYPE_DEATHWHISPER}, // +{"The Rise of Deadly","Подъем смертоносного",-549.131, 2211.29, 539.291,70858,false,true,TYPE_FLIGHT_WAR}, // +{"Icecrown Citadel","Цитадель Ледяной Короны",4198.42, 2769.22, 351.065,70859,false,true,TYPE_SAURFANG}, // +{"Sanctuary of Blood","Святилище крови",4490.205566, 2769.275635, 403.983765,0,false,true,TYPE_BLOOD_COUNCIL}, // +{"Lair of the Queen of Ice","Логово Королевы льда",4356.580078, 2565.75, 220.401993,70861,false,true,TYPE_VALITHRIA}, // +{"Frozen Throne","Ледяной трон",528.767273f, -2124.845947f, 1041.86f, 70860,false,true,TYPE_SINDRAGOSA}, // }; @@ -73,9 +73,31 @@ bool GOGossipHello_go_icecrown_teleporter(Player *player, GameObject* pGo) ScriptedInstance *pInstance = (ScriptedInstance *) pGo->GetInstanceData(); if(!pInstance) return true; + uint8 _locale; + + switch (LocaleConstant currentlocale = player->GetSession()->GetSessionDbcLocale()) + { + case LOCALE_enUS: + case LOCALE_koKR: + case LOCALE_frFR: + case LOCALE_deDE: + case LOCALE_zhCN: + case LOCALE_zhTW: + case LOCALE_esES: + case LOCALE_esMX: + _locale = 0; + break; + case LOCALE_ruRU: + _locale = 1; + break; + default: + _locale = 0; + break; + }; + for(uint8 i = 0; i < PORTALS_COUNT; i++) { if (PortalLoc[i].active == true && (PortalLoc[i].state == true || pInstance->GetData(TYPE_TELEPORT) >= PortalLoc[i].encounter)) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, PortalLoc[i].name, GOSSIP_SENDER_MAIN, i); + player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, PortalLoc[i].name[_locale], GOSSIP_SENDER_MAIN, i); }; player->SEND_GOSSIP_MENU(TELEPORT_GOSSIP_MESSAGE, pGo->GetGUID()); return true; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp index 9fa88a4ca..a5516fcb1 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp @@ -116,7 +116,11 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance if (m_auiEncounter[1] == DONE) { OpenDoor(m_uiIcewall1GUID); OpenDoor(m_uiIcewall2GUID); - } + }; + if (m_auiEncounter[2] == DONE) { + if (GameObject* pGOTemp = instance->GetGameObject(m_uiDeathWhisperElevatorGUID)) + pGOTemp->SetGoState(GO_STATE_ACTIVE); + }; if (m_auiEncounter[5] == DONE) OpenDoor(m_uiSDoorOrangeGUID); if (m_auiEncounter[6] == DONE) OpenDoor(m_uiSDoorGreenGUID); if (m_auiEncounter[6] == DONE && m_auiEncounter[5] == DONE) OpenDoor(m_uiSDoorCollisionGUID); @@ -124,13 +128,13 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance if (m_auiEncounter[8] == DONE) { OpenDoor(m_uiCounsilDoor1GUID); OpenDoor(m_uiCounsilDoor2GUID); - } + }; if (m_auiEncounter[9] == DONE) OpenDoor(m_uiFrostwingDoorGUID); if (m_auiEncounter[10] == DONE) OpenDoor(m_uiValithriaDoor2GUID); if (m_auiEncounter[11] == DONE) { OpenDoor(m_uiSindragosaDoor2GUID); OpenDoor(m_uiSindragosaDoor1GUID); - } + }; } @@ -404,7 +408,7 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance m_auiEncounter[2] = uiData; if (uiData == DONE) { if (GameObject* pGOTemp = instance->GetGameObject(m_uiDeathWhisperElevatorGUID)) - pGOTemp->SetRespawnTime(25000); + pGOTemp->SetGoState(GO_STATE_ACTIVE); } break; case TYPE_FLIGHT_WAR: From f688d1da0348ea1690ee68702a8e13f0b8584d8a Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 26 May 2010 15:34:01 +0400 Subject: [PATCH 321/405] LK dialog start --- addition/721_icecrown_mangos.sql | 2 +- .../instance_icecrown_spire.cpp | 44 ++++++++++++++++--- 2 files changed, 39 insertions(+), 7 deletions(-) diff --git a/addition/721_icecrown_mangos.sql b/addition/721_icecrown_mangos.sql index 04e0eff70..1b1c5b0b6 100644 --- a/addition/721_icecrown_mangos.sql +++ b/addition/721_icecrown_mangos.sql @@ -116,5 +116,5 @@ UPDATE `gameobject` SET `state` = '1' WHERE `id` IN (201369,201379); -- Lich King UPDATE `creature_template` SET `ScriptName`='boss_the_lich_king_icc', `AIName`='' WHERE `entry`= 29983; -UPDATE `creature_template` SET `ScriptName`='boss_tirion_icc', `AIName`='' WHERE `entry`= 38995; +UPDATE `creature_template` SET `ScriptName`='boss_tirion_icc', `npcflag`=1, `AIName`='' WHERE `entry`= 38995; UPDATE `creature_template` SET `ScriptName`='mob_ice_sphere_icc', `AIName`='' WHERE `entry`= 36633; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp index a5516fcb1..2b7ebbda8 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp @@ -118,8 +118,12 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance OpenDoor(m_uiIcewall2GUID); }; if (m_auiEncounter[2] == DONE) { - if (GameObject* pGOTemp = instance->GetGameObject(m_uiDeathWhisperElevatorGUID)) - pGOTemp->SetGoState(GO_STATE_ACTIVE); + if (GameObject* pGO = instance->GetGameObject(m_uiDeathWhisperElevatorGUID)) + { + pGO->SetUInt32Value(GAMEOBJECT_LEVEL, 1); + pGO->SetGoState(GO_STATE_READY); + pGO->SetRespawnTime(MINUTE); + } }; if (m_auiEncounter[5] == DONE) OpenDoor(m_uiSDoorOrangeGUID); if (m_auiEncounter[6] == DONE) OpenDoor(m_uiSDoorGreenGUID); @@ -407,8 +411,14 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance case TYPE_DEATHWHISPER: m_auiEncounter[2] = uiData; if (uiData == DONE) { - if (GameObject* pGOTemp = instance->GetGameObject(m_uiDeathWhisperElevatorGUID)) - pGOTemp->SetGoState(GO_STATE_ACTIVE); + if (GameObject* pGO = instance->GetGameObject(m_uiDeathWhisperElevatorGUID)) + { + pGO->SetUInt32Value(GAMEOBJECT_LEVEL, 1); + pGO->SetGoState(GO_STATE_READY); +// pGO->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE); +// pGO->SetRespawnTime(MINUTE); +// pGOTemp->SetGoState(GO_STATE_ACTIVE); + } } break; case TYPE_FLIGHT_WAR: @@ -550,11 +560,33 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance case TYPE_EVENT_TIMER: return m_auiEventTimer; case TYPE_EVENT_NPC: switch (m_auiEvent) { - case 1: + case 12030: + case 12050: + case 12070: + case 12090: + case 12110: + case 12130: + case 12150: + case 12170: return NPC_TIRION; break; - case 2: + case 12000: + case 12020: + case 12040: + case 12060: + case 12080: + case 12100: + case 12120: + case 12140: + case 12160: + case 12180: + case 12200: + case 12220: + case 12240: + case 12260: + case 12280: + case 12300: return NPC_LICH_KING; break; case 500: From 929a17c692fac69034b4c8bb01723f3e976ef855 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 26 May 2010 15:35:43 +0400 Subject: [PATCH 322/405] English translation of ICC yells (thanks to Miskith) --- addition/721_icecrown_scriptdev2.sql | 243 ++++++++++++++------------- 1 file changed, 123 insertions(+), 120 deletions(-) diff --git a/addition/721_icecrown_scriptdev2.sql b/addition/721_icecrown_scriptdev2.sql index b9a3ca53a..7fe6fc594 100644 --- a/addition/721_icecrown_scriptdev2.sql +++ b/addition/721_icecrown_scriptdev2.sql @@ -36,139 +36,142 @@ INSERT INTO `script_texts` (`entry`,`content_loc8`, `content_default`, `sound`, ('-1631104','Ваши души не найдут здесь избавления!','Your soul will find no redemption here!','16696','6','0','0','saurfang SAY_KILL2'), ('-1631105','Я вижу приближение смерти!','I have become... death!','16698','3','0','0','saurfang SAY_BERSERK'), ('-1631106','Я... Освободился...','I... Am... Released.','16697','6','0','0','saurfang SAY_DEATH'), -('-1631107','Все павшие воины орды, все дохлые псы альянса - все пополнят армию Короля-Лича! Даже сейчас валькиры воскрешают ваших покойников, чтобы они стали частью Плети!','','16701','6','0','0','saurfang SAY_INTRO'), -('-1631108','Сейчас все будет еще хуже. Идите сюда, я покажу вам, какой силой меня наделил Король-Лич!','','16702','6','0','0','saurfang SAY_BERSERK'), -('-1631109','Ха-ха-ха. Дворфы!','','16703','6','0','0','saurfang SAY'), +('-1631107','Все павшие воины орды, все дохлые псы альянса - все пополнят армию Короля-Лича! Даже сейчас валькиры воскрешают ваших покойников, чтобы они стали частью Плети!','For every Horde soldier that you killed, for every Alliance dog that fell, the Lich King\'s armies grew. Even now the Val\'kyr work to raise your fallen... As Scourge.','16701','6','0','0','saurfang SAY_INTRO'), +('-1631108','Сейчас все будет еще хуже. Идите сюда, я покажу вам, какой силой меня наделил Король-Лич!','Things are about to get much worse. Come, taste the power that the Lich King has bestowed upon me!','16702','6','0','0','saurfang SAY_BERSERK'), +('-1631109','Ха-ха-ха. Дворфы!','Hahahaha! Dwarves.','16703','6','0','0','saurfang SAY'), -- Festergut -('-1631201','Отличные новости народ! Я починил трубы для подачи ядовитой смеси!','','17123','6','0','0','Putricide Valve01'), -('-1631202','Тухлопуз! Ты всегда был моим любимчиком, как и Гниломорд... Молодец, что оставил столько газа. Я его даже чувствую.','','17124','6','0','0','Putricide Festergut Dead'), -('-1631203','Повеселимся!','','16901','6','0','0','Festergut Aggro'), -('-1631204','Папочка! У меня получилось!','','16902','6','0','0','Festergut Slay 01'), -('-1631205','Мертвец! Мертвец! Мертвец!','','16903','6','0','0','Festergut Slay 02'), -('-1631206','А-а-а-а-а...','','16904','6','0','0','Festergut Death'), -('-1631207','Веселью конец!','','16905','6','0','0','Festergut Berserk'), -('-1631208','Что-то мне нехорошо...','','16906','6','0','0','Festergut Explunge Blight'), -('-1631209','Нет! Вы убили Вонючку! Сейчас получите!','','16907','6','0','0','Festergut Stinky Death '), -('-1631210','Их-ха!','','16908','6','0','0','Festergut say '), -('-1631211','Ы-ы-ы!','','16909','6','0','0','Festergut say '), -('-1631212','(Непереводимо)','','16910','6','0','0','Festergut say '), -('-1631213','Пук.','','16911','6','0','0','Festergut brrr '), +('-1631201','Отличные новости народ! Я починил трубы для подачи ядовитой смеси!','Good news, everyone! I\'ve fixed the poison slime pipes!','17123','6','0','0','Putricide Valve01'), +('-1631202','Тухлопуз! Ты всегда был моим любимчиком, как и Гниломорд... Молодец, что оставил столько газа. Я его даже чувствую.','Oh, Festergut. You were always my favorite. Next to Rotface. The good news is you left behind so much gas, I can practically taste it!','17124','6','0','0','Putricide Festergut Dead'), +('-1631203','Повеселимся!','Fun time!','16901','6','0','0','Festergut Aggro'), +('-1631204','Папочка! У меня получилось!','Daddy, I did it!','16902','6','0','0','Festergut Slay 01'), +('-1631205','Мертвец! Мертвец! Мертвец!','Dead, dead, dead!','16903','6','0','0','Festergut Slay 02'), +('-1631206','А-а-а-а-а...','Da ... Ddy...','16904','6','0','0','Festergut Death'), +('-1631207','Веселью конец!','Fun time over!','16905','6','0','0','Festergut Berserk'), +('-1631208','Что-то мне нехорошо...','Gyah! Uhhh, I not feel so good...','16906','6','0','0','Festergut Explunge Blight'), +('-1631209','Нет! Вы убили Вонючку! Сейчас получите!','NOOOO! You kill Stinky! You pay!','16907','6','0','0','Festergut Stinky Death '), +('-1631210','Их-ха!','...','16908','6','0','0','Festergut say '), +('-1631211','Ы-ы-ы!','...','16909','6','0','0','Festergut say '), +('-1631212','(Непереводимо)','...','16910','6','0','0','Festergut say '), +('-1631213','Пук.','...','16911','6','0','0','Festergut brrr '), -- Rotface -('-1631220','Отличные новости народ! Слизь снова потекла!','','17126','6','0','0','Putricide Slime Flow'), -('-1631221','Й-й-йя-хахаха!','','16986','6','0','0','Rotface Aggro'), -('-1631222','Я ЭТО заломал!','','16987','6','0','0','Rotface Slay 01'), -('-1631223','Папочка сделает новые игрушки из тебя!','','16988','6','0','0','Rotface Slay 02'), -('-1631224','Папочка, не огорчайся...','','16989','6','0','0','Rotface Death'), -('-1631225','Тихий час!','','16990','6','0','0','Rotface Berserk'), -('-1631226','Липучка-вонючка!','','16991','6','0','0','Rotface Infection'), -('-1631227','Я сделал очень злую каку! Сейчас взорвется!','','16992','6','0','0','Rotface Unstable Ooze'), -('-1631228','Что? Прелесть? Не-е-е-т!','','16993','6','0','0','Rotface Precious played when precious dies'), -('-1631229','Й-а-а-а!','','16994','6','0','0','Rotface say'), -('-1631230','Ах!','','16995','6','0','0','Rotface say'), -('-1631231','А-а-у!','','16996','6','0','0','Rotface say'), +('-1631220','Отличные новости народ! Слизь снова потекла!','Great news, everyone! The slime is flowing again!','17126','6','0','0','Putricide Slime Flow'), +('-1631221','Й-й-йя-хахаха!','WEEEEEE!','16986','6','0','0','Rotface Aggro'), +('-1631222','Я ЭТО заломал!','I brokes-ded it...','16987','6','0','0','Rotface Slay 01'), +('-1631223','Папочка сделает новые игрушки из тебя!','Daddy make toys out of you!','16988','6','0','0','Rotface Slay 02'), +('-1631224','Папочка, не огорчайся...','Bad news daddy.','16989','6','0','0','Rotface Death'), +('-1631225','Тихий час!','Sleepy Time!','16990','6','0','0','Rotface Berserk'), +('-1631226','Липучка-вонючка!','Icky sticky.','16991','6','0','0','Rotface Infection'), +('-1631227','Я сделал очень злую каку! Сейчас взорвется!','I think I made an angry poo-poo. It gonna blow!','16992','6','0','0','Rotface Unstable Ooze'), +('-1631228','Что? Прелесть? Не-е-е-т!','What? Precious? Noooooooooo!!!','16993','6','0','0','Rotface Precious played when precious dies'), +('-1631229','Й-а-а-а!','...','16994','6','0','0','Rotface say'), +('-1631230','Ах!','...','16995','6','0','0','Rotface say'), +('-1631231','А-а-у!','...','16996','6','0','0','Rotface say'), -- Professor Putricide -('-1631240','Отличные новости народ! Я усовершенствовал штамм чумы, которая уничтожит весь Азерот!','','17114','6','0','0','Putricide Aggro'), -('-1631241','М-м-м. Интересно.','','17115','6','0','0','Putricide Slay 01'), -('-1631242','О, как неожиданно!','','17116','6','0','0','Putricide Slay 02'), -('-1631243','Плохие новости, народ... Похоже, у меня ничего не выйдет.','','17117','6','0','0','Putricide Death'), -('-1631244','Прекрасные новости, народ!','','17118','6','0','0','Putricide Berserk'), -('-1631245','Это обычное облако газа. Но будьте осторожны, не такое уж оно и обычное...','','17119','6','0','0','Putricide Gas Explosion'), -('-1631246','Что-то я ничего не чувствую. Что? Это еще откуда?','','17120','6','0','0','Putricide Transform 01'), -('-1631247','На вкус как вишенка. Ой, извините...','','17121','6','0','0','Putricide Transform 02'), -('-1631248','Два слизнюка в одной комнате? Может получиться что-то любопытное...','','17122','6','0','0','Putricide Summon Ooze'), -('-1631249','Вы слишком грязные чтобы тут расхаживать! Надо сперва соскрести эту мерзкую плоть.','','17125','6','0','0','Putricide Airlock01 Before fight'), +('-1631240','Отличные новости народ! Я усовершенствовал штамм чумы, которая уничтожит весь Азерот!','Good news, everyone! I think I perfected a plague that will destroy all life on Azeroth!','17114','6','0','0','Putricide Aggro'), +('-1631241','М-м-м. Интересно.','Hmm... Interesting...','17115','6','0','0','Putricide Slay 01'), +('-1631242','О, как неожиданно!','That was unexpected!','17116','6','0','0','Putricide Slay 02'), +('-1631243','Плохие новости, народ... Похоже, у меня ничего не выйдет.','Bad news, everyone! I don\'t think I\'m going to make it.','17117','6','0','0','Putricide Death'), +('-1631244','Прекрасные новости, народ!','Great news, everyone!','17118','6','0','0','Putricide Berserk'), +('-1631245','Это обычное облако газа. Но будьте осторожны, не такое уж оно и обычное...','Just an ordinary gas cloud. But watch out, because that\'s no ordinary gas cloud!','17119','6','0','0','Putricide Gas Explosion'), +('-1631246','Что-то я ничего не чувствую. Что? Это еще откуда?','Hmm. I don\'t feel a thing. Whaa...? Where\'d those come from?','17120','6','0','0','Putricide Transform 01'), +('-1631247','На вкус как вишенка. Ой, извините...','Tastes like... Cherry! Oh! Excuse me!','17121','6','0','0','Putricide Transform 02'), +('-1631248','Два слизнюка в одной комнате? Может получиться что-то любопытное...','Two oozes, one room! So many delightful possibilities...','17122','6','0','0','Putricide Summon Ooze'), +('-1631249','Вы слишком грязные чтобы тут расхаживать! Надо сперва соскрести эту мерзкую плоть.','You can\'t come in here all dirty like that! You need that nasty flesh scrubbed off first!','17125','6','0','0','Putricide Airlock01 Before fight'), -- Blood Prince Council -('-1631301','Глупые смертные! Думали, что одолели нас? Санлейн, непобедимые воины Короля-Лича! Теперь наши силы едины!','','16795','6','0','0','Lanathel Intro Princes'), -('-1631302','Кушать подано!','','16681','6','0','0','Valanar Slay 01'), -('-1631303','Теперь вы видите, насколько мы сильны?','','16682','6','0','0','Valanar Slay 02'), -('-1631304','Охохо...','','16683','6','0','0','Valanar Death'), -('-1631305','Хорош тянуть время перед Санлейн!','','16684','6','0','0','Valanar Berserk'), -('-1631306','Наксанар был досадным недоразумением! Силы сферы позволят Валанару свершить отмщение!','','16685','6','0','0','Valanar Empower'), -('-1631307','Моя чаша полна','','16686','6','0','0','Valanar Special'), -('-1631308','Йих!','','16687','6','0','0','Princes say'), -('-1631309','Э-эх!','','16688','6','0','0','Princes say'), -('-1631310','До-хо!','','16689','6','0','0','Princes say'), +('-1631301','Глупые смертные! Думали, что одолели нас? Санлейн, непобедимые воины Короля-Лича! Теперь наши силы едины!','Foolish mortals. You thought us defeated so easily? The San\'layn are the Lich King\'s immortal soldiers! Now you shall face their might combined!','16795','6','0','0','Lanathel Intro Princes'), +('-1631302','Кушать подано!','Dinner... is served.','16681','6','0','0','Valanar Slay 01'), +('-1631303','Теперь вы видите, насколько мы сильны?','Do you see NOW the power of the Darkfallen?','16682','6','0','0','Valanar Slay 02'), +('-1631304','Охохо...','...why...?','16683','6','0','0','Valanar Death'), +('-1631305','Хорош тянуть время перед Санлейн!','BOW DOWN BEFORE THE SAN\'LAYN!','16684','6','0','0','Valanar Berserk'), +('-1631306','Наксанар был досадным недоразумением! Силы сферы позволят Валанару свершить отмщение!','Naxxanar was merely a setback! With the power of the orb, Valanar will have his vengeance!','16685','6','0','0','Valanar Empower'), +('-1631307','Моя чаша полна','My cup runneth over.','16686','6','0','0','Valanar Special'), +('-1631308','Йих!','...','16687','6','0','0','Princes say'), +('-1631309','Э-эх!','...','16688','6','0','0','Princes say'), +('-1631310','До-хо!','...','16689','6','0','0','Princes say'), -- Blood Queen Lana'thel -('-1631321','Это было неразумное решение!','','16782','6','0','0','Lanathel Aggro'), -('-1631322','Я только попробую на вкус...','','16783','6','0','0','Lanathel Bite 01'), -('-1631323','Я голодна!','','16784','6','0','0','Lanathel Bite 02'), -('-1631324','Смерть вас не спасет!','','16785','6','0','0','Lanathel Add'), -('-1631325','Страдайте же!','','16786','6','0','0','Lanathel Special 01'), -('-1631326','Как вам такое?','','16787','6','0','0','Lanathel Special 02'), -('-1631327','Начинаем представление!','','16788','6','0','0','Lanathel Special 03'), -('-1631328','Не повезло...','','16789','6','0','0','Lanathel Reset'), -('-1631329','Нет. Моя прелесть, приятного аппетита!','','16790','6','0','0','Lanathel Mind Control'), -('-1631330','Вот как... У тебя не поучилось?','','16791','6','0','0','Lanathel Slay 01'), -('-1631331','Какая жалость...','','16792','6','0','0','Lanathel Slay 02'), -('-1631332','Сейчас все кончится!','','16793','6','0','0','Lanathel Berserk'), -('-1631333','Но... Мы ведь так хорошо ладили...','','16794','6','0','0','Lanathel Death'), -('-1631334','Восстаньте братья! И уничтожьте наших врагов!','','16796','6','0','0','Lanathel Empower'), -('-1631335','Ха-х!','','16797','6','0','0','Lanathel say'), -('-1631338','Ах-ха...','','16798','6','0','0','Lanathel say'), -('-1631339','Ых...','','16799','6','0','0','Lanathel say'), +('-1631321','Это было неразумное решение!','You have made an... unwise... decision.','16782','6','0','0','Lanathel Aggro'), +('-1631322','Я только попробую на вкус...','Just a taste...','16783','6','0','0','Lanathel Bite 01'), +('-1631323','Я голодна!','Know my hunger!','16784','6','0','0','Lanathel Bite 02'), +('-1631324','Смерть вас не спасет!','Death is no escape!','16785','6','0','0','Lanathel Add'), +('-1631325','Страдайте же!','SUFFER!','16786','6','0','0','Lanathel Special 01'), +('-1631326','Как вам такое?','Can you handle this?','16787','6','0','0','Lanathel Special 02'), +('-1631327','Начинаем представление!','Here it comes.','16788','6','0','0','Lanathel Special 03'), +('-1631328','Не повезло...','How... Unfortunate...','16789','6','0','0','Lanathel Reset'), +('-1631329','Нет. Моя прелесть, приятного аппетита!','Yes... feed my precious one! You\'re mine now!','16790','6','0','0','Lanathel Mind Control'), +('-1631330','Вот как... У тебя не поучилось?','Really...? Is that all you\'ve got?','16791','6','0','0','Lanathel Slay 01'), +('-1631331','Какая жалость...','Such a pity!','16792','6','0','0','Lanathel Slay 02'), +('-1631332','Сейчас все кончится!','THIS! ENDS! NOW!','16793','6','0','0','Lanathel Berserk'), +('-1631333','Но... Мы ведь так хорошо ладили...','But... we were getting along... so well...','16794','6','0','0','Lanathel Death'), +('-1631334','Восстаньте братья! И уничтожьте наших врагов!','Rise up brothers! And destroy our enemies!','16796','6','0','0','Lanathel Empower'), +('-1631335','Ха-х!','Ha!','16797','6','0','0','Lanathel say'), +('-1631338','Ах-ха...','Oo...','16798','6','0','0','Lanathel say'), +('-1631339','Ых...','Oh...','16799','6','0','0','Lanathel say'), -- Valithria Dreamwalker -('-1631401','Герои! Вы должны мне помочь! Мои силы на исходе... Залечите мои раны...','','17064','6','0','0','Valithria Aggro'), -('-1631402','Одержимые не знают отдыха...','','17065','6','0','0','Valithria Slay Bad Hostile NPC'), -('-1631403','Прискобная потеря.','','17066','6','0','0','Valithria Slay Good - Player'), -('-1631404','Неудачники!','','17067','6','0','0','Valithria Berserk'), -('-1631405','Я открыла портал в изумрудный сон. Там вы найдете спасение, герои!','','17068','6','0','0','Valithria Dream World Open'), -('-1631406','Я долго не продержусь!','','17069','6','0','0','Valithria Health Low'), -('-1631407','Силы возвращаются ко мне! Герои, еще немного!','','17070','6','0','0','Valithria Health High'), -('-1631408','Я излечилась! Изера, даруй мне силу покончить с этими нечестивыми тварями!','','17071','6','0','0','Valithria Win'), -('-1631409','Простите меня, я не могу остано... ВСЕ ВО ВЛАСТИ КОШМАРА!','','17072','6','0','0','Valithria Lose'), +('-1631401','Герои! Вы должны мне помочь! Мои силы на исходе... Залечите мои раны...','Heroes, lend me your aid! I... I cannot hold them off much longer! You must heal my wounds!','17064','6','0','0','Valithria Aggro'), +('-1631402','Одержимые не знают отдыха...','No rest for the wicked...','17065','6','0','0','Valithria Slay Bad Hostile NPC'), +('-1631403','Прискобная потеря.','A tragic loss...','17066','6','0','0','Valithria Slay Good - Player'), +('-1631404','Неудачники!','FAILURES!','17067','6','0','0','Valithria Berserk'), +('-1631405','Я открыла портал в изумрудный сон. Там вы найдете спасение, герои!','I have opened a portal into the Dream. Your salvation lies within, heroes.','17068','6','0','0','Valithria Dream World Open'), +('-1631406','Я долго не продержусь!','I will not last much longer!','17069','6','0','0','Valithria Health Low'), +('-1631407','Силы возвращаются ко мне! Герои, еще немного!','My strength is returning! Press on, heroes!','17070','6','0','0','Valithria Health High'), +('-1631408','Я излечилась! Изера, даруй мне силу покончить с этими нечестивыми тварями!','I am renewed! Ysera grants me the favor to lay these foul creatures to rest!','17071','6','0','0','Valithria Win'), +('-1631409','Простите меня, я не могу остано... ВСЕ ВО ВЛАСТИ КОШМАРА!','Forgive me for what I do! I... cannot... stop... ONLY NIGHTMARES REMAIN!','17072','6','0','0','Valithria Lose'), -- Sindragosa -('-1631420','Глупцы! Зачем вы сюда явились? Ледяные ветра Нордскола унесут ваши души!','','17007','6','0','0','Sindragosa Aggro'), -('-1631421','Погибни!','','17008','6','0','0','Sindragosa Slay 01'), -('-1631422','Удел смертных!','','17009','6','0','0','Sindragosa Slay 02'), -('-1631423','Наконец-то! Свободна!','','17010','6','0','0','Sindragosa Death'), -('-1631424','Хватит! Эти игры меня утомляют!','','17011','6','0','0','Sindragosa Berserk'), -('-1631425','Здесь ваше вторжение и окончится! Никто не уцелеет!','','17012','6','0','0','Sindragosa Take Off - fly'), -('-1631426','Вы чувствуете, как ледяная ладонь смерти сжимает сердце?','','17013','6','0','0','Sindragosa Freeze'), -('-1631427','Трепещите, смертные! Ибо ваша жалкая магия теперь бессильна!','','17014','6','0','0','Sindragosa Arcane'), -('-1631428','А-а-а! Жжот! Что это за колдовство?','','17015','6','0','0','Sindragosa Special'), -('-1631429','А теперь почувствуйте всю мощь Господина и погрузитесь в отчаяние!','','17016','6','0','0','Sindragosa Low HP'), +('-1631420','Глупцы! Зачем вы сюда явились? Ледяные ветра Нордскола унесут ваши души!','You are fools who have come to this place! The icy winds of Northrend will consume your souls!','17007','6','0','0','Sindragosa Aggro'), +('-1631421','Погибни!','Perish!','17008','6','0','0','Sindragosa Slay 01'), +('-1631422','Удел смертных!','A flaw of mortality...','17009','6','0','0','Sindragosa Slay 02'), +('-1631423','Наконец-то! Свободна!','Free...at last...','17010','6','0','0','Sindragosa Death'), +('-1631424','Хватит! Эти игры меня утомляют!','Enough! I tire of these games!','17011','6','0','0','Sindragosa Berserk'), +('-1631425','Здесь ваше вторжение и окончится! Никто не уцелеет!','Your incursion ends here! None shall survive!','17012','6','0','0','Sindragosa Take Off - fly'), +('-1631426','Вы чувствуете, как ледяная ладонь смерти сжимает сердце?','Can you feel the cold hand of death upon your heart?','17013','6','0','0','Sindragosa Freeze'), +('-1631427','Трепещите, смертные! Ибо ваша жалкая магия теперь бессильна!','Suffer, mortals, as your pathetic magic betrays you!','17014','6','0','0','Sindragosa Arcane'), +('-1631428','А-а-а! Жжот! Что это за колдовство?','Suffer, mortals, as your pathetic magic betrays you!','17015','6','0','0','Sindragosa Special'), +('-1631429','А теперь почувствуйте всю мощь Господина и погрузитесь в отчаяние!','Now feel my master\'s limitless power and despair!','17016','6','0','0','Sindragosa Low HP'), + +-- Lich king +('-1631501','Неужели прибыли, наконец, хваленые силы света? Мне бросить Ледяную скорбь и сдаться на твою милость, Фордринг?','So...the Light\'s vaunted justice has finally arrived. Shall I lay down Frostmourne and throw myself at your mercy, Fordring?','17349','6','0','0','Lich King SAY_INTRO1'), +('-1631503','Ты пройдешь через эти мучения сам.','You will learn of that first hand. When my work is complete, you will beg for mercy -- and I will deny you. Your anguished cries will be testament to my unbridled power.','17350','6','0','0','Lich King SAY_INTRO3'), +('-1631505','Я оставлю тебя в живых, чтобы ты увидел финал! Не могу допустить чтобы величайший служитель света пропустил рождение МОЕГО мира!','I\'ll keep you alive to witness the end, Fordring. I would not want the Light\'s greatest champion to miss seeing this wretched world remade in my image.','17351','6','0','0','Lich King SAY_AGGRO'), +('-1631506','Ну же, герои! В вашей ярости - МОЯ сила!','Come then champions, feed me your rage!','17352','6','0','0','Lich King SAY'), +('-1631507','Сомнений нет - вы сильнейшие герои Азерота! Вы преодолели все препятствия, которые я воздвиг перед вами! Сильнейшие из моих слуг пали под вашим натиском, сгорели в пламени вашей ярости!','No question remains unanswered. No doubts linger. You are Azeroth\'s greatest champions! You overcame every challenge I laid before you. My mightiest servants have fallen before your relentless onslaught, your unbridled fury..','17353','6','0','0','Lich King SAY'), +('-1631508','Что движет вами? Праведность? Не знаю...','Is it truly righteousness that drives you? I wonder.','17354','6','0','0','Lich King SAY'), +('-1631509','Ты отлично их обучил, Фордринг! Ты привел сюда лучших воинов, которых знал мир! И отдал их в мои руки. Как я и рассчитывал.','You trained them well, Fordring. You delivered the greatest fighting force this world has ever known... right into my hands -- exactly as I intended. You shall be rewarded for your unwitting sacrifice.','17355','6','0','0','Lich King SAY'), +('-1631510','Смотри как я буду воскрешать их и превращать в воинов Плети! Они повергнут этот мир в пучину хаоса. Азерот падет от их рук. И ты станешь первой жертвой. ','Watch now as I raise them from the dead to become masters of the Scourge. They will shroud this world in chaos and destruction. Azeroth\'s fall will come at their hands -- and you will be the first to die.','17356','6','0','0','Lich King SAY'), +('-1631511','Мне по душе эта ирония!','I delight in the irony.','17357','6','0','0','Lich King SAY'), +('-1631512','Невозможно!','Impossible...','17358','6','0','0','Lich King SAY'), +('-1631513','Да! Вы меня и правда ранили. Я слишком долго с вами играл. Испытайте на себе возмездие Смерти!','You gnats actually hurt me! Perhaps I\'ve toyed with you long enough, now taste the vengeance of the grave!','17359','6','0','0','Lich King SAY'), +('-1631514','А-а-х!','...','17360','6','0','0','Lich King SAY'), +('-1631515','И вот я стою как лев пред агнцами. И не дрожат они.','Now I stand, the lion before the lambs... and they do not fear.','17361','6','0','0','Lich King SAY'), +('-1631516','Им неведом страх!','They cannot fear.','17362','6','0','0','Lich King SAY'), +('-1631517','Надежда тает!','Hope wanes!','17363','6','0','0','Lich King SAY'), +('-1631518','Пришел конец!','The end has come!','17364','6','0','0','Lich King SAY'), +('-1631519','Встречайте трагический финал!','Face now your tragic end!','17365','6','0','0','Lich King SAY_KILL'), +('-1631520','Ледяная скорбь жаждет крови!','Frostmourne hungers...','17366','6','0','0','Lich King SAY'), +('-1631521','Ледяная скорбь, повинуйся мне!','Argh... Frostmourne, obey me!','17367','6','0','0','Lich King SAY'), +('-1631522','Ледяная скорбь поглотит душу вашего товарища!','Frostmourne feeds on the soul of your fallen ally!','17368','6','0','0','Lich King SAY_KILL'), +('-1631523','Я проморожу вас насквозь и вы разлетитесь на ледяные осколки!','I will freeze you from within until all that remains is an icy husk!','17369','6','0','0','Lich King SAY'), +('-1631524','Смотрите, как мир рушится вокруг вас!','Watch as the world around you collapses!','17370','6','0','0','Lich King SAY_WIN'), +('-1631525','Конец света!','Apocalypse!','17371','6','0','0','Lich King SAY'), +('-1631526','Склонись перед своим господином и повелителем!','Bow down before your lord and master!','17372','6','0','0','Lich King SAY'), +('-1631527','Валькирия! Твой господин зовет!','Val\'kyr, your master calls!','17373','6','0','0','Lich King SAY_SUMMON'), +('-1631528','...','...','17374','6','0','0','Lich King SAY_DEATH'), --- Lich king && Tirion -('-1631501','Неужели прибыли, наконец, хваленые силы света? Мне бросить Ледяную скорбь и сдаться на твою милость, Фордринг?','','17349','6','0','0','Lich King SAY_INTRO1'), -('-1631503','Ты пройдешь через эти мучения сам.','','17350','6','0','0','Lich King SAY_INTRO3'), -('-1631505','Я оставлю тебя в живых, чтобы ты увидел финал! Не могу допустить чтобы величайший служитель света пропустил рождение МОЕГО мира!','','17351','6','0','0','Lich King SAY_AGGRO'), -('-1631506','Ну же, герои! В вашей ярости - МОЯ сила!','','17352','6','0','0','Lich King SAY'), -('-1631507','Сомнений нет - вы сильнейшие герои Азерота! Вы преодолели все препятствия, которые я воздвиг перед вами! Сильнейшие из моих слуг пали под вашим натиском, сгорели в пламени вашей ярости!','','17353','6','0','0','Lich King SAY'), -('-1631508','Что движет вами? Праведность? Не знаю...','','17354','6','0','0','Lich King SAY'), -('-1631509','Ты отлично их обучил, Фордринг! Ты привел сюда лучших воинов, которых знал мир! И отдал их в мои руки. Как я и рассчитывал.','','17355','6','0','0','Lich King SAY'), -('-1631510','Смотри как я буду воскрешать их и превращать в воинов Плети! Они повергнут этот мир в пучину хаоса. Азерот падет от их рук. И ты станешь первой жертвой. ','','17356','6','0','0','Lich King SAY'), -('-1631511','Мне по душе эта ирония!','','17357','6','0','0','Lich King SAY'), -('-1631512','Невозможно!','','17358','6','0','0','Lich King SAY'), -('-1631513','Да! Вы меня и правда ранили. Я слишком долго с вами играл. Испытайте на себе возмездие Смерти!','','17359','6','0','0','Lich King SAY'), -('-1631514','А-а-х!','','17360','6','0','0','Lich King SAY'), -('-1631515','И вот я стою как лев пред агнцами. И не дрожат они.','','17361','6','0','0','Lich King SAY'), -('-1631516','Им неведом страх!','','17362','6','0','0','Lich King SAY'), -('-1631517','Надежда тает!','','17363','6','0','0','Lich King SAY'), -('-1631518','Пришел конец!','','17364','6','0','0','Lich King SAY'), -('-1631519','Встречайте трагический финал!','','17365','6','0','0','Lich King SAY_KILL'), -('-1631520','Ледяная скорбь жаждет крови!','','17366','6','0','0','Lich King SAY'), -('-1631521','Ледяная скорбь, повинуйся мне!','','17367','6','0','0','Lich King SAY'), -('-1631522','Ледяная скорбь поглотит душу вашего товарища!','','17368','6','0','0','Lich King SAY_KILL'), -('-1631523','Я проморожу вас насквозь и вы разлетитесь на ледяные осколки!','','17369','6','0','0','Lich King SAY'), -('-1631524','Смотрите, как мир рушится вокруг вас!','','17370','6','0','0','Lich King SAY_WIN'), -('-1631525','Конец света!','','17371','6','0','0','Lich King SAY'), -('-1631526','Склонись перед своим господином и повелителем!','','17372','6','0','0','Lich King SAY'), -('-1631527','Валькирия! Твой господин зовет!','','17373','6','0','0','Lich King SAY_SUMMON'), -('-1631528','...','','17374','6','0','0','Lich King SAY_DEATH'), -- Tirion -('-1631552','Мы даруем тебе быструю смерть, Артас! Более быструю чем ты заслуживаешь за то что замучил и погубил десятки тысяч жизней!','','17390','6','0','0','Tirion SAY_INTRO2'), -('-1631554','Да будет так! Герои, в атаку','','17391','6','0','0','Tirion SAY_INTRO4'), -('-1631555','Свет! Даруй мне последнее благословение! Дай мне разбить эти оковы!','','17392','6','0','0','Tirion SAY'), -('-1631556','Хватит, Артас! Твоя ненависть не заберет больше ни одной жизни!','','17393','6','0','0','Tirion SAY'), -('-1631557','Вы пришли чтобы вершить суд над Артасом? Чтобы уничтожить короля-лича?','','17394','6','0','0',' SAY'), -('-1631558','Вы не должны оказаться во власти Ледяной скорби. Иначе, как и я, будете навеки порабощены этим проклятым клинком.','','17395','6','0','0',' SAY'), -('-1631559','Помогите мне уничтожить эти истерзанные души. Вместе мы вытянем силу из ледяной скорби и ослабим короля-лича.','','17396','6','0','0',' SAY'), -('-1631560','Наконец я свободен. Все кончено, сын мой. Настал час расплаты.','','17397','6','0','0',' SAY'), -('-1631561','Поднимитесь, воины света!','','17398','6','0','0',' SAY'); +('-1631552','Мы даруем тебе быструю смерть, Артас! Более быструю чем ты заслуживаешь за то что замучил и погубил десятки тысяч жизней!','We will grant you a swift death, Arthas. More than can be said for the thousands you\'ve tortured and slain.','17390','6','0','0','Tirion SAY_INTRO2'), +('-1631554','Да будет так! Герои, в атаку','So be it. Champions, attack!','17391','6','0','0','Tirion SAY_INTRO4'), +('-1631555','Свет! Даруй мне последнее благословение! Дай мне разбить эти оковы!','LIGHT, GRANT ME ONE FINAL BLESSING. GIVE ME THE STRENGTH... TO SHATTER THESE BONDS!','17392','6','0','0','Tirion SAY'), +('-1631556','Хватит, Артас! Твоя ненависть не заберет больше ни одной жизни!','No more, Arthas! No more lives will be consumed by your hatred!','17393','6','0','0','Tirion SAY'), + +-- Menethil +('-1631557','Вы пришли чтобы вершить суд над Артасом? Чтобы уничтожить короля-лича?','You have come to bring Arthas to justice? To see the Lich King destroyed?','17394','6','0','0','Terenas Menethil II SAY'), +('-1631558','Вы не должны оказаться во власти Ледяной скорби. Иначе, как и я, будете навеки порабощены этим проклятым клинком.','First, you must escape Frostmourne\'s hold, or be damned as I am; trapped within this cursed blade for all eternity.','17395','6','0','0','Terenas Menethil II SAY'), +('-1631559','Помогите мне уничтожить эти истерзанные души. Вместе мы вытянем силу из ледяной скорби и ослабим короля-лича.','Aid me in destroying these tortured souls! Together we will loosen Frostmourne\'s hold and weaken the Lich King from within!','17396','6','0','0','Terenas Menethil II SAY'), +('-1631560','Наконец я свободен. Все кончено, сын мой. Настал час расплаты.','Free at last! It is over, my son. This is the moment of reckoning.','17397','6','0','0','Terenas Menethil II SAY'), +('-1631561','Поднимитесь, воины света!','Rise up, champions of the Light!','17398','6','0','0',' SAY'); From 695b5a9ba0eb3d867fe0f1cee3449d02700f3b03 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 26 May 2010 22:18:19 +0400 Subject: [PATCH 323/405] Added placeholders for ruby_sanctum instance (3.3.5) --- Makefile.am | 6 + addition/728_ruby_sanctum_mangos.sql | 5 + ...728_ruby_sanctum_spelltable_scriptdev2.sql | 13 ++ .../northrend/ruby_sanctum/boss_baltharus.cpp | 116 ++++++++++++++ .../northrend/ruby_sanctum/boss_halion.cpp | 116 ++++++++++++++ .../northrend/ruby_sanctum/boss_ragefire.cpp | 116 ++++++++++++++ .../northrend/ruby_sanctum/boss_zarithian.cpp | 116 ++++++++++++++ .../northrend/ruby_sanctum/def_ruby_sanctum.h | 25 +++ .../ruby_sanctum/instance_ruby_sanctum.cpp | 148 ++++++++++++++++++ system/ScriptLoader.cpp | 12 ++ 10 files changed, 673 insertions(+) create mode 100644 addition/728_ruby_sanctum_mangos.sql create mode 100644 addition/728_ruby_sanctum_spelltable_scriptdev2.sql create mode 100644 scripts/northrend/ruby_sanctum/boss_baltharus.cpp create mode 100644 scripts/northrend/ruby_sanctum/boss_halion.cpp create mode 100644 scripts/northrend/ruby_sanctum/boss_ragefire.cpp create mode 100644 scripts/northrend/ruby_sanctum/boss_zarithian.cpp create mode 100644 scripts/northrend/ruby_sanctum/def_ruby_sanctum.h create mode 100644 scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp diff --git a/Makefile.am b/Makefile.am index d5eb9de7a..f282de88b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -362,6 +362,12 @@ scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp \ scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp \ scripts/northrend/icecrown_citadel/icecrown_citadel/gunship_battle.cpp \ scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp \ +scripts/northrend/ruby_sanctum/def_ruby_sanctum.h \ +scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp \ +scripts/northrend/ruby_sanctum/boss_halion.cpp \ +scripts/northrend/ruby_sanctum/boss_zarithian.cpp \ +scripts/northrend/ruby_sanctum/boss_baltharus.cpp \ +scripts/northrend/ruby_sanctum/boss_ragefire.cpp \ scripts/northrend/naxxramas/boss_anubrekhan.cpp \ scripts/northrend/naxxramas/boss_faerlina.cpp \ scripts/northrend/naxxramas/boss_four_horsemen.cpp \ diff --git a/addition/728_ruby_sanctum_mangos.sql b/addition/728_ruby_sanctum_mangos.sql new file mode 100644 index 000000000..e9ce6f093 --- /dev/null +++ b/addition/728_ruby_sanctum_mangos.sql @@ -0,0 +1,5 @@ +-- UPDATE `instance_template` SET `script`='instance_ruby_sanctum' WHERE `map`=???; +UPDATE `creature_template` SET `ScriptName`='boss_halion', `AIName` ='' WHERE `entry`=39863; +UPDATE `creature_template` SET `ScriptName`='boss_baltharus', `AIName` ='' WHERE `entry`=39751; +UPDATE `creature_template` SET `ScriptName`='boss_zarithian', `AIName` ='' WHERE `entry`=39746; +UPDATE `creature_template` SET `ScriptName`='boss_ragefire', `AIName` ='' WHERE `entry`=39747; diff --git a/addition/728_ruby_sanctum_spelltable_scriptdev2.sql b/addition/728_ruby_sanctum_spelltable_scriptdev2.sql new file mode 100644 index 000000000..20d003e3d --- /dev/null +++ b/addition/728_ruby_sanctum_spelltable_scriptdev2.sql @@ -0,0 +1,13 @@ +-- Ruby sanctum spelltable + +-- Boss Halion +DELETE FROM `boss_spell_table` WHERE `entry` = 39863; + +-- Boss Baltharus +DELETE FROM `boss_spell_table` WHERE `entry` = 39751; + +-- Boss Zarithian +DELETE FROM `boss_spell_table` WHERE `entry` = 39746; + +-- Boss Ragefire +DELETE FROM `boss_spell_table` WHERE `entry` = 39747; diff --git a/scripts/northrend/ruby_sanctum/boss_baltharus.cpp b/scripts/northrend/ruby_sanctum/boss_baltharus.cpp new file mode 100644 index 000000000..21a593dd1 --- /dev/null +++ b/scripts/northrend/ruby_sanctum/boss_baltharus.cpp @@ -0,0 +1,116 @@ +/* Copyright (C) 2010 /dev/rsa for ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_baltharus +SD%Complete: 0% +SDComment: by /dev/rsa +SDCategory: ruby_sanctum +EndScriptData */ + +#include "precompiled.h" +#include "def_ruby_sanctum.h" + +enum BossSpells +{ + SPELL_TWILIGHT_PRECISION = 78243, +}; + +struct MANGOS_DLL_DECL boss_baltharusAI : public ScriptedAI +{ + boss_baltharusAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); + Reset(); + } + + ScriptedInstance *pInstance; + BossSpellWorker* bsw; + uint8 stage; + + void Reset() + { + if(!pInstance) return; + pInstance->SetData(TYPE_BALTHARUS, NOT_STARTED); + bsw->resetTimers(); + } + + void MoveInLineOfSight(Unit* pWho) + { + } + + void MovementInform(uint32 type, uint32 id) + { + if (type != POINT_MOTION_TYPE) return; + } + + void KilledUnit(Unit* pVictim) + { +/* switch (urand(0,1)) { + case 0: + DoScriptText(-1631006,m_creature,pVictim); + break; + case 1: + DoScriptText(-1631007,m_creature,pVictim); + break; + };*/ + } + + void JustReachedHome() + { + if (pInstance) pInstance->SetData(TYPE_BALTHARUS, FAIL); + } + + void JustSummoned(Creature* summoned) + { + } + + void Aggro(Unit *who) + { + if(pInstance) pInstance->SetData(TYPE_BALTHARUS, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_BALTHARUS, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + bsw->timedCast(SPELL_TWILIGHT_PRECISION, diff); + + DoMeleeAttackIfReady(); + } +}; + + +CreatureAI* GetAI_boss_baltharus(Creature* pCreature) +{ + return new boss_baltharusAI(pCreature); +} + +void AddSC_boss_baltharus() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_baltharus"; + newscript->GetAI = &GetAI_boss_baltharus; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/ruby_sanctum/boss_halion.cpp b/scripts/northrend/ruby_sanctum/boss_halion.cpp new file mode 100644 index 000000000..e2a223ef0 --- /dev/null +++ b/scripts/northrend/ruby_sanctum/boss_halion.cpp @@ -0,0 +1,116 @@ +/* Copyright (C) 2010 /dev/rsa for ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_halion +SD%Complete: 0% +SDComment: by /dev/rsa +SDCategory: ruby_sanctum +EndScriptData */ + +#include "precompiled.h" +#include "def_ruby_sanctum.h" + +enum BossSpells +{ + SPELL_TWILIGHT_PRECISION = 78243, +}; + +struct MANGOS_DLL_DECL boss_halionAI : public ScriptedAI +{ + boss_halionAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); + Reset(); + } + + ScriptedInstance *pInstance; + BossSpellWorker* bsw; + uint8 stage; + + void Reset() + { + if(!pInstance) return; + pInstance->SetData(TYPE_HALION, NOT_STARTED); + bsw->resetTimers(); + } + + void MoveInLineOfSight(Unit* pWho) + { + } + + void MovementInform(uint32 type, uint32 id) + { + if (type != POINT_MOTION_TYPE) return; + } + + void KilledUnit(Unit* pVictim) + { +/* switch (urand(0,1)) { + case 0: + DoScriptText(-1631006,m_creature,pVictim); + break; + case 1: + DoScriptText(-1631007,m_creature,pVictim); + break; + };*/ + } + + void JustReachedHome() + { + if (pInstance) pInstance->SetData(TYPE_HALION, FAIL); + } + + void JustSummoned(Creature* summoned) + { + } + + void Aggro(Unit *who) + { + if(pInstance) pInstance->SetData(TYPE_HALION, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_HALION, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + bsw->timedCast(SPELL_TWILIGHT_PRECISION, diff); + + DoMeleeAttackIfReady(); + } +}; + + +CreatureAI* GetAI_boss_halion(Creature* pCreature) +{ + return new boss_halionAI(pCreature); +} + +void AddSC_boss_halion() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_halion"; + newscript->GetAI = &GetAI_boss_halion; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/ruby_sanctum/boss_ragefire.cpp b/scripts/northrend/ruby_sanctum/boss_ragefire.cpp new file mode 100644 index 000000000..2dcc2006f --- /dev/null +++ b/scripts/northrend/ruby_sanctum/boss_ragefire.cpp @@ -0,0 +1,116 @@ +/* Copyright (C) 2010 /dev/rsa for ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_ragefire +SD%Complete: 0% +SDComment: by /dev/rsa +SDCategory: ruby_sanctum +EndScriptData */ + +#include "precompiled.h" +#include "def_ruby_sanctum.h" + +enum BossSpells +{ + SPELL_TWILIGHT_PRECISION = 78243, +}; + +struct MANGOS_DLL_DECL boss_ragefireAI : public ScriptedAI +{ + boss_ragefireAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); + Reset(); + } + + ScriptedInstance *pInstance; + BossSpellWorker* bsw; + uint8 stage; + + void Reset() + { + if(!pInstance) return; + pInstance->SetData(TYPE_RAGEFIRE, NOT_STARTED); + bsw->resetTimers(); + } + + void MoveInLineOfSight(Unit* pWho) + { + } + + void MovementInform(uint32 type, uint32 id) + { + if (type != POINT_MOTION_TYPE) return; + } + + void KilledUnit(Unit* pVictim) + { +/* switch (urand(0,1)) { + case 0: + DoScriptText(-1631006,m_creature,pVictim); + break; + case 1: + DoScriptText(-1631007,m_creature,pVictim); + break; + };*/ + } + + void JustReachedHome() + { + if (pInstance) pInstance->SetData(TYPE_RAGEFIRE, FAIL); + } + + void JustSummoned(Creature* summoned) + { + } + + void Aggro(Unit *who) + { + if(pInstance) pInstance->SetData(TYPE_RAGEFIRE, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_RAGEFIRE, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + bsw->timedCast(SPELL_TWILIGHT_PRECISION, diff); + + DoMeleeAttackIfReady(); + } +}; + + +CreatureAI* GetAI_boss_ragefire(Creature* pCreature) +{ + return new boss_ragefireAI(pCreature); +} + +void AddSC_boss_ragefire() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_ragefire"; + newscript->GetAI = &GetAI_boss_ragefire; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/ruby_sanctum/boss_zarithian.cpp b/scripts/northrend/ruby_sanctum/boss_zarithian.cpp new file mode 100644 index 000000000..58b823c84 --- /dev/null +++ b/scripts/northrend/ruby_sanctum/boss_zarithian.cpp @@ -0,0 +1,116 @@ +/* Copyright (C) 2010 /dev/rsa for ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_zarithian +SD%Complete: 0% +SDComment: by /dev/rsa +SDCategory: ruby_sanctum +EndScriptData */ + +#include "precompiled.h" +#include "def_ruby_sanctum.h" + +enum BossSpells +{ + SPELL_TWILIGHT_PRECISION = 78243, +}; + +struct MANGOS_DLL_DECL boss_zarithianAI : public ScriptedAI +{ + boss_zarithianAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); + Reset(); + } + + ScriptedInstance *pInstance; + BossSpellWorker* bsw; + uint8 stage; + + void Reset() + { + if(!pInstance) return; + pInstance->SetData(TYPE_ZARITHIAN, NOT_STARTED); + bsw->resetTimers(); + } + + void MoveInLineOfSight(Unit* pWho) + { + } + + void MovementInform(uint32 type, uint32 id) + { + if (type != POINT_MOTION_TYPE) return; + } + + void KilledUnit(Unit* pVictim) + { +/* switch (urand(0,1)) { + case 0: + DoScriptText(-1631006,m_creature,pVictim); + break; + case 1: + DoScriptText(-1631007,m_creature,pVictim); + break; + };*/ + } + + void JustReachedHome() + { + if (pInstance) pInstance->SetData(TYPE_ZARITHIAN, FAIL); + } + + void JustSummoned(Creature* summoned) + { + } + + void Aggro(Unit *who) + { + if(pInstance) pInstance->SetData(TYPE_ZARITHIAN, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_ZARITHIAN, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + bsw->timedCast(SPELL_TWILIGHT_PRECISION, diff); + + DoMeleeAttackIfReady(); + } +}; + + +CreatureAI* GetAI_boss_zarithian(Creature* pCreature) +{ + return new boss_zarithianAI(pCreature); +} + +void AddSC_boss_zarithian() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_zarithian"; + newscript->GetAI = &GetAI_boss_zarithian; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/ruby_sanctum/def_ruby_sanctum.h b/scripts/northrend/ruby_sanctum/def_ruby_sanctum.h new file mode 100644 index 000000000..8fb3895fa --- /dev/null +++ b/scripts/northrend/ruby_sanctum/def_ruby_sanctum.h @@ -0,0 +1,25 @@ +/* Copyright (C) 2010 by /dev/rsa for ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_RUBY_SANCTUM_H +#define DEF_RUBY_SANCTUM_H +#include "sc_boss_spell_worker.h" + +enum +{ + MAX_ENCOUNTERS = 4, + + TYPE_BALTHARUS = 0, + TYPE_ZARITHIAN = 1, + TYPE_RAGEFIRE = 2, + TYPE_HALION = 3, + + NPC_HALION = 39863, + NPC_BALTHARUS = 39751, + NPC_ZARITHIAN = 39746, + NPC_RAGEFIRE = 39747 + +}; + +#endif diff --git a/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp b/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp new file mode 100644 index 000000000..da30581e2 --- /dev/null +++ b/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp @@ -0,0 +1,148 @@ +/* Copyright (C) 2006 - 2010 ScriptDev2 +* 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, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "precompiled.h" +#include "def_ruby_sanctum.h" + +struct MANGOS_DLL_DECL instance_ruby_sanctum : public ScriptedInstance +{ + instance_ruby_sanctum(Map* pMap) : ScriptedInstance(pMap) + { + Initialize(); + } + + std::string strSaveData; + + //Creatures GUID + uint32 m_auiEncounter[MAX_ENCOUNTERS+1]; + uint64 m_uiHalionGUID; + uint64 m_uiRagefireGUID; + uint64 m_uiZarithianGUID; + uint64 m_uiBaltharusGUID; + + void Initialize() + { + for (uint8 i = 0; i < MAX_ENCOUNTERS; ++i) + m_auiEncounter[i] = NOT_STARTED; + } + + void OnCreatureCreate(Creature* pCreature) + { + switch(pCreature->GetEntry()) + { + case NPC_HALION: + m_uiHalionGUID = pCreature->GetGUID(); + break; + case NPC_RAGEFIRE: + m_uiRagefireGUID = pCreature->GetGUID(); + break; + } + } + + void OnObjectCreate(GameObject* pGo) + { + switch(pGo->GetEntry()) + { + } + } + + void SetData(uint32 uiType, uint32 uiData) + { + switch(uiType) + { + case TYPE_HALION: m_auiEncounter[3] = uiData; break; + case TYPE_RAGEFIRE: m_auiEncounter[1] = uiData; break; + } + + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + + for(uint8 i = 0; i < MAX_ENCOUNTERS; ++i) + saveStream << m_auiEncounter[i] << " "; + + strSaveData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } + } + + const char* Save() + { + return strSaveData.c_str(); + } + + uint32 GetData(uint32 uiType) + { + switch(uiType) + { + case TYPE_HALION: return m_auiEncounter[3]; + case TYPE_RAGEFIRE: return m_auiEncounter[2]; + } + return 0; + } + + uint64 GetData64(uint32 uiData) + { + switch(uiData) + { + case NPC_HALION: return m_uiHalionGUID; + case NPC_RAGEFIRE: return m_uiRagefireGUID; + } + return 0; + } + + void Load(const char* chrIn) + { + if (!chrIn) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(chrIn); + + std::istringstream loadStream(chrIn); + + for(uint8 i = 0; i < MAX_ENCOUNTERS; ++i) + { + loadStream >> m_auiEncounter[i]; + + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; + } + + OUT_LOAD_INST_DATA_COMPLETE; + } +}; + +InstanceData* GetInstanceData_instance_ruby_sanctum(Map* pMap) +{ + return new instance_ruby_sanctum(pMap); +} + + +void AddSC_instance_ruby_sanctum() +{ + Script* pNewScript; + pNewScript = new Script; + pNewScript->Name = "instance_ruby_sanctum"; + pNewScript->GetInstanceData = &GetInstanceData_instance_ruby_sanctum; + pNewScript->RegisterSelf(); +} diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index 1f7f79fad..fca06bb4a 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -411,6 +411,12 @@ extern void AddSC_boss_falryn(); extern void AddSC_boss_marwyn(); //extern void AddSC_boss_lich_king_fh(); +extern void AddSC_instance_ruby_sanctum(); // Ruby Sanctum +extern void AddSC_boss_halion(); +extern void AddSC_boss_ragefire(); +extern void AddSC_boss_zarithian(); +extern void AddSC_boss_baltharus(); + //outland extern void AddSC_boss_exarch_maladaar(); //auchindoun, auchenai_crypts extern void AddSC_boss_nexusprince_shaffar(); //auchindoun, mana_tombs @@ -891,6 +897,12 @@ void AddScripts() AddSC_boss_marwyn(); // AddSC_boss_lich_king_fh(); + AddSC_instance_ruby_sanctum(); // Ruby Sanctum + AddSC_boss_halion(); + AddSC_boss_ragefire(); + AddSC_boss_zarithian(); + AddSC_boss_baltharus(); + //outland AddSC_boss_exarch_maladaar(); //auchindoun, auchenai_crypts AddSC_boss_nexusprince_shaffar(); //auchindoun, mana_tombs From f05f6ace4f7fae53c2651befb30e918b66fef271 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 27 May 2010 13:32:12 +0400 Subject: [PATCH 324/405] Sartharion patch (Obsidian sanctum) from MaxXx2021 --- addition/730_obsidian_sanctum_mangos.sql | 110 ++ .../obsidian_sanctum/boss_sartharion.cpp | 974 +++++++++++++++--- 2 files changed, 938 insertions(+), 146 deletions(-) create mode 100644 addition/730_obsidian_sanctum_mangos.sql diff --git a/addition/730_obsidian_sanctum_mangos.sql b/addition/730_obsidian_sanctum_mangos.sql new file mode 100644 index 000000000..468d6fb0d --- /dev/null +++ b/addition/730_obsidian_sanctum_mangos.sql @@ -0,0 +1,110 @@ +UPDATE creature_template SET ScriptName='mob_fire_cyclone' WHERE entry = 30648; +UPDATE creature_template SET ScriptName='mob_flame_tsunami' WHERE entry = 30616; + +-- CUSTOM hack to different hard mode loot +REPLACE INTO creature_template (entry, difficulty_entry_1, modelid_A, modelid_H, faction_A, faction_H, NAME, subname, minhealth, maxhealth, rank, lootid) VALUES +(288601, 313111, 27035, 27035, 103, 103, 'Sartharion', 'The Onyx Guardian', 1, 1, 3, 288601), +(288602, 313112, 27035, 27035, 103, 103, 'Sartharion', 'The Onyx Guardian', 1, 1, 3, 288602), +(288603, 313113, 27035, 27035, 103, 103, 'Sartharion', 'The Onyx Guardian', 1, 1, 3, 288603), +(313111, 0, 27035, 27035, 103, 103, 'Sartharion', 'The Onyx Guardian', 1, 1, 3, 313111), +(313112, 0, 27035, 27035, 103, 103, 'Sartharion', 'The Onyx Guardian', 1, 1, 3, 313112), +(313113, 0, 27035, 27035, 103, 103, 'Sartharion', 'The Onyx Guardian', 1, 1, 3, 313113); + +-- boss loot +DELETE FROM creature_loot_template WHERE entry IN (30452, 30451, 30449, 28860, 288601, 288602, 288603, 31534, 31520, 31535, 31311, 313111, 313112, 313113); +-- Tenebron, Shadron, Vesperon +UPDATE creature_template SET lootid=30449 WHERE entry IN (30452, 30451, 30449, 31534, 31520, 31535); +INSERT INTO creature_loot_template (entry, item, ChanceOrQuestChance, groupid, mincountOrRef, maxcount, lootcondition, condition_value1, condition_value2) VALUES +(30449, 45624, 100, 0, 1, 1, 0, 0, 0); +-- Sartharion +-- references +DELETE FROM reference_loot_template WHERE entry IN (615000, 615001, 615002, 615010, 615011, 615012); +INSERT INTO reference_loot_template (entry, item, ChanceOrQuestChance, groupid, mincountOrRef, maxcount, lootcondition, condition_value1, condition_value2) VALUES +-- normal, no drakes +(615000, 40426, 0, 2, 1, 1, 0, 0, 0), +(615000, 40427, 0, 2, 1, 1, 0, 0, 0), +(615000, 40428, 0, 2, 1, 1, 0, 0, 0), +(615000, 40429, 0, 2, 1, 1, 0, 0, 0), +(615000, 40430, 0, 2, 1, 1, 0, 0, 0), +(615000, 40613, 0, 1, 1, 1, 0, 0, 0), +(615000, 40614, 0, 1, 1, 1, 0, 0, 0), +(615000, 40615, 0, 1, 1, 1, 0, 0, 0), +(615000, 43345, 100, 0, 1, 1, 0, 0, 0), +(615000, 43347, 100, 0, 1, 1, 0, 0, 0), +-- normal, 1 drake +(615001, 43992, 0, 1, 1, 1, 0, 0, 0), +(615001, 43988, 0, 1, 1, 1, 0, 0, 0), +(615001, 43990, 0, 1, 1, 1, 0, 0, 0), +(615001, 43989, 0, 1, 1, 1, 0, 0, 0), +(615001, 43991, 0, 1, 1, 1, 0, 0, 0), +-- normal, 2 drakes +(615002, 43995, 0, 1, 1, 1, 0, 0, 0), +(615002, 43998, 0, 1, 1, 1, 0, 0, 0), +(615002, 43994, 0, 1, 1, 1, 0, 0, 0), +(615002, 43996, 0, 1, 1, 1, 0, 0, 0), +(615002, 43993, 0, 1, 1, 1, 0, 0, 0), +-- heroic, no drakes +(615010, 40431, 0, 2, 1, 1, 0, 0, 0), +(615010, 40432, 0, 3, 1, 1, 0, 0, 0), +(615010, 40433, 0, 3, 1, 1, 0, 0, 0), +(615010, 40437, 0, 2, 1, 1, 0, 0, 0), +(615010, 40438, 0, 3, 1, 1, 0, 0, 0), +(615010, 40439, 0, 3, 1, 1, 0, 0, 0), +(615010, 40446, 0, 2, 1, 1, 0, 0, 0), +(615010, 40451, 0, 2, 1, 1, 0, 0, 0), +(615010, 40453, 0, 3, 1, 1, 0, 0, 0), +(615010, 40455, 0, 2, 1, 1, 0, 0, 0), +(615010, 40628, 0, 1, 1, 1, 0, 0, 0), +(615010, 40629, 0, 1, 1, 1, 0, 0, 0), +(615010, 40630, 0, 1, 1, 1, 0, 0, 0), +(615010, 43345, 100, 0, 1, 1, 0, 0, 0), +(615010, 43346, 100, 0, 1, 1, 0, 0, 0), +-- heroic, 1 drake +(615011, 44003, 0, 1, 1, 1, 0, 0, 0), +(615011, 44002, 0, 1, 1, 1, 0, 0, 0), +(615011, 44000, 0, 1, 1, 1, 0, 0, 0), +(615011, 44004, 0, 1, 1, 1, 0, 0, 0), +-- heroic, 2 drakes +(615012, 44007, 0, 1, 1, 1, 0, 0, 0), +(615012, 44006, 0, 1, 1, 1, 0, 0, 0), +(615012, 44005, 0, 1, 1, 1, 0, 0, 0), +(615012, 44008, 0, 1, 1, 1, 0, 0, 0), +(615012, 44011, 0, 1, 1, 1, 0, 0, 0); +UPDATE creature_template SET lootid=entry WHERE entry IN (28860, 288601, 288602, 288603, 31311, 313111, 313112, 313113); +INSERT INTO creature_loot_template (entry, item, ChanceOrQuestChance, groupid, mincountOrRef, maxcount, lootcondition, condition_value1, condition_value2) VALUES +-- normal, no drakes +(28860, 615000, 100, 0, -615000, 1, 0, 0, 0), +(28860, 45624, 100, 0, 1, 1, 0, 0, 0), +-- normal, 1 drake +(288601, 615000, 100, 0, -615000, 1, 0, 0, 0), +(288601, 615001, 100, 0, -615001, 1, 0, 0, 0), +(288601, 45624, 100, 0, 2, 2, 0, 0, 0), +-- normal, 2 drakes +(288602, 615000, 100, 0, -615000, 1, 0, 0, 0), +(288602, 615001, 100, 0, -615001, 1, 0, 0, 0), +(288602, 615002, 100, 0, -615002, 1, 0, 0, 0), +(288602, 45624, 100, 0, 3, 3, 0, 0, 0), +-- normal, 3 drakes +(288603, 615000, 100, 0, -615000, 1, 0, 0, 0), +(288603, 615001, 100, 0, -615001, 1, 0, 0, 0), +(288603, 615002, 100, 0, -615002, 1, 0, 0, 0), +(288603, 43986, 100, 0, 1, 1, 0, 0, 0), +(288603, 45624, 100, 0, 4, 4, 0, 0, 0), +-- heroic, no drakes +(31311, 615010, 100, 0, -615010, 1, 0, 0, 0), +(31311, 45624, 100, 0, 1, 1, 0, 0, 0), +-- heroic, 1 drake +(313111, 615010, 100, 0, -615010, 1, 0, 0, 0), +(313111, 615011, 100, 0, -615011, 1, 0, 0, 0), +(313111, 45624, 100, 0, 2, 2, 0, 0, 0), +-- heroic, 2 drakes +(313112, 615010, 100, 0, -615010, 1, 0, 0, 0), +(313112, 615011, 100, 0, -615011, 1, 0, 0, 0), +(313112, 615012, 100, 0, -615012, 1, 0, 0, 0), +(313112, 45624, 100, 0, 3, 3, 0, 0, 0), +-- heroic, 3 drakes +(313113, 615010, 100, 0, -615010, 1, 0, 0, 0), +(313113, 615011, 100, 0, -615011, 1, 0, 0, 0), +(313113, 615012, 100, 0, -615012, 1, 0, 0, 0), +(313113, 43954, 100, 0, 1, 1, 0, 0, 0), +(313113, 45624, 100, 0, 4, 4, 0, 0, 0); diff --git a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp index 998059505..f4d38be6e 100644 --- a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp +++ b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp @@ -16,8 +16,9 @@ /* ScriptData SDName: Boss Sartharion -SD%Complete: 70% -SDComment: Flame wave, achievement and portal events need to be implemented +SD%Complete: 100% +SDComment: It's alive! ;) Now this is script is alive realy! (c) MaxXx2021 :D +SDComment: Relised Fire Cyclone how be on Blizzlike! SDCategory: Obsidian Sanctum EndScriptData */ @@ -58,6 +59,7 @@ enum SPELL_TAIL_LASH_H = 58957, // A sweeping tail strike hits all enemies behind the caster, inflicting 4375 to 5625 damage and stunning them for 2 sec. SPELL_WILL_OF_SARTHARION = 61254, // Sartharion's presence bolsters the resolve of the Twilight Drakes, increasing their total health by 25%. This effect also increases Sartharion's health by 25%. SPELL_LAVA_STRIKE = 57571, // (Real spell casted should be 57578) 57571 then trigger visual missile, then summon Lava Blaze on impact(spell 57572) + SPELL_CYCLONE_AURA_2 = 57598, SPELL_TWILIGHT_REVENGE = 60639, SPELL_PYROBUFFET = 56916, // currently used for hard enrage after 15 minutes @@ -103,6 +105,8 @@ enum SPELL_HATCH_EGGS_EFFECT_H = 59190, SPELL_HATCH_EGGS_EFFECT = 58685, + NPC_TWILIGHT_EGG = 30882, + //Whelps NPC_TWILIGHT_WHELP = 30890, NPC_SHARTHARION_TWILIGHT_WHELP = 31214, @@ -112,9 +116,12 @@ enum SPELL_FLAME_TSUNAMI = 57494, // the visual dummy SPELL_FLAME_TSUNAMI_LEAP = 60241, // SPELL_EFFECT_138 some leap effect, causing caster to move in direction SPELL_FLAME_TSUNAMI_DMG_AURA = 57492, // periodic damage, npc has this aura + SPELL_FLAME_TSUNAMI_DMG = 57491, // damage players + SPELL_FLAME_TSUNAMI_BUFF = 60430, // buff Lava Blazes NPC_FLAME_TSUNAMI = 30616, // for the flame waves NPC_LAVA_BLAZE = 30643, // adds spawning from flame strike + NPC_FIRE_CYCLONE = 30648, //using these custom points for dragons start and end POINT_ID_INIT = 100, @@ -156,6 +163,21 @@ Waypoint m_aDragonCommon[]= {3209.969f, 566.523f, 98.652f} }; +float m_afTsunamiStartLoc[5][4]= +{ + //left to right + {3201.0f, 487.75f, 58.6f, 6.23f}, + {3201.0f, 533.54f, 58.6f, 6.23f}, + {3201.0f, 579.14f, 58.6f, 6.23f}, + //right to left + {3287.5f, 552.53f, 58.6f, 3.19f}, + {3287.5f, 511.10f, 58.6f, 3.19f}, +}; + +uint64 m_uiAcolyteShadronGUID; +uint64 m_uiAcolyteVesperonGUID; +std::list m_lEggsGUIDList; + /*###### ## Boss Sartharion ######*/ @@ -166,6 +188,9 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI { m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + m_bTenebronHelpedInFight = false; + m_bShadronHelpedInFight = false; + m_bVesperonHelpedInFight = false; Reset(); } @@ -186,11 +211,25 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI uint32 m_uiFlameBreathTimer; uint32 m_uiTailSweepTimer; uint32 m_uiCleaveTimer; - uint32 m_uiLavaStrikeTimer; + uint32 m_uiCycloneAuraTimer; bool m_bHasCalledTenebron; bool m_bHasCalledShadron; bool m_bHasCalledVesperon; + bool m_bTenebronHelpedInFight; + bool m_bShadronHelpedInFight; + bool m_bVesperonHelpedInFight; + + bool bCanUseWill; + bool bFirstWill; + uint32 m_uiSarthHealth; + uint32 m_uiTeneHealth; + uint32 m_uiShadHealth; + uint32 m_uiVespHealth; + + uint32 m_uiCheckTwilightTimer; + + std::list m_lFireCyclones; void Reset() { @@ -206,16 +245,56 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI m_uiFlameTsunamiTimer = 30000; m_uiFlameBreathTimer = 20000; - m_uiTailSweepTimer = 20000; + m_uiTailSweepTimer = 5000; m_uiCleaveTimer = 7000; - m_uiLavaStrikeTimer = 5000; + m_uiCycloneAuraTimer = 10000; m_bHasCalledTenebron = false; m_bHasCalledShadron = false; m_bHasCalledVesperon = false; - if (m_creature->HasAura(SPELL_TWILIGHT_REVENGE)) - m_creature->RemoveAurasDueToSpell(SPELL_TWILIGHT_REVENGE); + bCanUseWill = false; + bFirstWill = true; + + m_uiCheckTwilightTimer = 2000; + + if (m_pInstance) + { + Creature* pTene = (Creature*)Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_TENEBRON)); + Creature* pShad = (Creature*)Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_SHADRON)); + Creature* pVesp = (Creature*)Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_VESPERON)); + + if (m_bTenebronHelpedInFight && pTene) + { + if (pTene->isDead()) + pTene->Respawn(); + else + pTene->AI()->EnterEvadeMode(); + } + + if (m_bShadronHelpedInFight && pShad) + { + if (pShad->isDead()) + pShad->Respawn(); + else + pShad->AI()->EnterEvadeMode(); + } + + if (m_bVesperonHelpedInFight && pVesp) + { + if (pVesp->isDead()) + pVesp->Respawn(); + else + pVesp->AI()->EnterEvadeMode(); + } + } + + m_bTenebronHelpedInFight = false; + m_bShadronHelpedInFight = false; + m_bVesperonHelpedInFight = false; + + m_creature->RemoveAurasDueToSpell(SPELL_GIFT_OF_TWILIGTH_SAR); + m_creature->RemoveAurasDueToSpell(SPELL_TWILIGHT_REVENGE); } void JustReachedHome() @@ -239,7 +318,21 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI void JustDied(Unit* pKiller) { - DoScriptText(SAY_SARTHARION_DEATH,m_creature); + DoScriptText(SAY_SARTHARION_DEATH, m_creature); + + uint8 uiHardMode = 0; + if (m_bTenebronHelpedInFight) + ++uiHardMode; + if (m_bShadronHelpedInFight) + ++uiHardMode; + if (m_bVesperonHelpedInFight) + ++uiHardMode; + + if (uiHardMode) + { + m_creature->UpdateEntry(m_creature->GetEntry()*10+uiHardMode); + pKiller->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } if (m_pInstance) m_pInstance->SetData(TYPE_SARTHARION_EVENT, DONE); @@ -247,7 +340,7 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI void KilledUnit(Unit* pVictim) { - switch(urand(0, 2)) + switch (urand(0, 2)) { case 0: DoScriptText(SAY_SARTHARION_SLAY_1, m_creature); break; case 1: DoScriptText(SAY_SARTHARION_SLAY_2, m_creature); break; @@ -257,16 +350,17 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI void FetchDragons() { - Unit* pTene = Unit::GetUnit(*m_creature,m_pInstance->GetData64(DATA_TENEBRON)); - Unit* pShad = Unit::GetUnit(*m_creature,m_pInstance->GetData64(DATA_SHADRON)); - Unit* pVesp = Unit::GetUnit(*m_creature,m_pInstance->GetData64(DATA_VESPERON)); + Creature* pTene = (Creature*)Unit::GetUnit(*m_creature,m_pInstance->GetData64(DATA_TENEBRON)); + Creature* pShad = (Creature*)Unit::GetUnit(*m_creature,m_pInstance->GetData64(DATA_SHADRON)); + Creature* pVesp = (Creature*)Unit::GetUnit(*m_creature,m_pInstance->GetData64(DATA_VESPERON)); //if at least one of the dragons are alive and are being called - bool bCanUseWill = false; - if (pTene && pTene->isAlive() && !pTene->getVictim()) { bCanUseWill = true; + pTene->CastSpell(pTene, SPELL_POWER_OF_TENEBRON, false); + pTene->AddSplineFlag(SPLINEFLAG_FLYING); + pTene->RemoveSplineFlag(SPLINEFLAG_WALKMODE); pTene->GetMotionMaster()->MovePoint(POINT_ID_INIT, m_aTene[0].m_fX, m_aTene[0].m_fY, m_aTene[0].m_fZ); if (!pTene->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) @@ -276,6 +370,9 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI if (pShad && pShad->isAlive() && !pShad->getVictim()) { bCanUseWill = true; + pShad->CastSpell(pShad, SPELL_POWER_OF_SHADRON, false); + pShad->AddSplineFlag(SPLINEFLAG_FLYING); + pShad->RemoveSplineFlag(SPLINEFLAG_WALKMODE); pShad->GetMotionMaster()->MovePoint(POINT_ID_INIT, m_aShad[0].m_fX, m_aShad[0].m_fY, m_aShad[0].m_fZ); if (!pShad->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) @@ -285,6 +382,9 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI if (pVesp && pVesp->isAlive() && !pVesp->getVictim()) { bCanUseWill = true; + pVesp->CastSpell(pVesp, SPELL_POWER_OF_VESPERON, false); + pVesp->AddSplineFlag(SPLINEFLAG_FLYING); + pVesp->RemoveSplineFlag(SPLINEFLAG_WALKMODE); pVesp->GetMotionMaster()->MovePoint(POINT_ID_INIT, m_aVesp[0].m_fX, m_aVesp[0].m_fY, m_aVesp[0].m_fZ); if (!pVesp->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) @@ -292,7 +392,7 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI } if (bCanUseWill) - DoCastSpellIfCan(m_creature, SPELL_WILL_OF_SARTHARION); + DoCast(m_creature, SPELL_WILL_OF_SARTHARION); } void CallDragon(uint32 uiDataId) @@ -303,27 +403,41 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI if (pTemp && pTemp->isAlive() && !pTemp->getVictim()) { - if (pTemp->HasSplineFlag(SPLINEFLAG_WALKMODE)) - pTemp->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - if (pTemp->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) - pTemp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_uiSarthHealth = m_creature->GetHealth(); + DoCast(m_creature, SPELL_WILL_OF_SARTHARION, false); + bCanUseWill = true; int32 iTextId = 0; - switch(pTemp->GetEntry()) + Creature* pAdd = NULL; + pAdd = (Creature*)Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_TENEBRON)); + if (pAdd) + m_uiTeneHealth = pAdd->GetHealth(); + pAdd = (Creature*)Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_SHADRON)); + if (pAdd) + m_uiShadHealth = pAdd->GetHealth(); + pAdd = (Creature*)Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_VESPERON)); + if (pAdd) + m_uiVespHealth = pAdd->GetHealth(); + + switch (pTemp->GetEntry()) { case NPC_TENEBRON: iTextId = SAY_SARTHARION_CALL_TENEBRON; pTemp->GetMotionMaster()->MovePoint(POINT_ID_LAND, m_aTene[1].m_fX, m_aTene[1].m_fY, m_aTene[1].m_fZ); + m_bTenebronHelpedInFight = true; break; case NPC_SHADRON: iTextId = SAY_SARTHARION_CALL_SHADRON; pTemp->GetMotionMaster()->MovePoint(POINT_ID_LAND, m_aShad[1].m_fX, m_aShad[1].m_fY, m_aShad[1].m_fZ); + m_bShadronHelpedInFight = true; break; case NPC_VESPERON: iTextId = SAY_SARTHARION_CALL_VESPERON; pTemp->GetMotionMaster()->MovePoint(POINT_ID_LAND, m_aVesp[1].m_fX, m_aVesp[1].m_fY, m_aVesp[1].m_fZ); + m_bVesperonHelpedInFight = true; break; } @@ -345,10 +459,19 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) { if (i->getSource()->isAlive()) - DoScriptText(WHISPER_LAVA_CHURN, m_creature,i->getSource()); + DoScriptText(WHISPER_LAVA_CHURN, m_creature, i->getSource()); } } } + + uint8 uiTsunamiDirection = urand(0, 1); + uint8 uiTsunamiWavesAmount = 3; + if (uiTsunamiDirection) + uiTsunamiWavesAmount = 2; + for (uint8 i = uiTsunamiDirection*3; i < uiTsunamiDirection*3+uiTsunamiWavesAmount; ++i) + { + m_creature->SummonCreature(NPC_FLAME_TSUNAMI, m_afTsunamiStartLoc[i][0], m_afTsunamiStartLoc[i][1], m_afTsunamiStartLoc[i][2], m_afTsunamiStartLoc[i][3], TEMPSUMMON_TIMED_DESPAWN, 18000); + } } void UpdateAI(const uint32 uiDiff) @@ -357,18 +480,52 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (bCanUseWill) + { + if (bFirstWill) + { + m_creature->SetHealth(m_creature->GetHealth()*1.25); + } + else + { + m_creature->SetHealth(m_uiSarthHealth); + Creature* pTemp = NULL; + pTemp = (Creature*)Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_TENEBRON)); + if (pTemp && pTemp->isAlive()) + pTemp->SetHealth(m_uiTeneHealth); + pTemp = (Creature*)Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_SHADRON)); + if (pTemp && pTemp->isAlive()) + pTemp->SetHealth(m_uiShadHealth); + pTemp = (Creature*)Unit::GetUnit(*m_creature, m_pInstance->GetData64(DATA_VESPERON)); + if (pTemp && pTemp->isAlive()) + pTemp->SetHealth(m_uiVespHealth); + } + bCanUseWill = false; + bFirstWill = false; + } + //spell will target dragons, if they are still alive at 35% - if (!m_bIsBerserk && m_creature->GetHealthPercent() < 35.0f) + if (!m_bIsBerserk && m_creature->GetHealthPercent() <= 35.0f) { DoScriptText(SAY_SARTHARION_BERSERK, m_creature); - DoCastSpellIfCan(m_creature, SPELL_BERSERK); + //DoCast(m_creature, SPELL_BERSERK); + Creature* pTemp = NULL; + pTemp = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(DATA_TENEBRON)); + if (pTemp && pTemp->isAlive()) + pTemp->CastSpell(pTemp, 27680, true); + pTemp = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(DATA_SHADRON)); + if (pTemp && pTemp->isAlive()) + pTemp->CastSpell(pTemp, 27680, true); + pTemp = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(DATA_VESPERON)); + if (pTemp && pTemp->isAlive()) + pTemp->CastSpell(pTemp, 27680, true); + m_bIsBerserk = true; } //soft enrage if (!m_bIsSoftEnraged && m_creature->GetHealthPercent() <= 10.0f) { - // TODO m_bIsSoftEnraged = true; } @@ -377,7 +534,7 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI { if (m_uiEnrageTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_PYROBUFFET, CAST_TRIGGERED); + DoCast(m_creature, SPELL_PYROBUFFET, true); m_bIsHardEnraged = true; } else @@ -388,6 +545,14 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI if (m_uiFlameTsunamiTimer < uiDiff) { SendFlameTsunami(); + switch(urand(0, 3)) + { + case 0: DoScriptText(SAY_SARTHARION_SPECIAL_1, m_creature); break; + case 1: DoScriptText(SAY_SARTHARION_SPECIAL_2, m_creature); break; + case 2: DoScriptText(SAY_SARTHARION_SPECIAL_3, m_creature); break; + case 3: DoScriptText(SAY_SARTHARION_SPECIAL_4, m_creature); break; + } + m_uiFlameTsunamiTimer = 30000; } else @@ -397,7 +562,7 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI if (m_uiFlameBreathTimer < uiDiff) { DoScriptText(SAY_SARTHARION_BREATH, m_creature); - DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_FLAME_BREATH : SPELL_FLAME_BREATH_H); + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_FLAME_BREATH : SPELL_FLAME_BREATH_H); m_uiFlameBreathTimer = urand(25000, 35000); } else @@ -406,8 +571,8 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI // Tail Sweep if (m_uiTailSweepTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_TAIL_LASH : SPELL_TAIL_LASH_H); - m_uiTailSweepTimer = urand(15000, 20000); + DoCast(m_creature, m_bIsRegularMode ? SPELL_TAIL_LASH : SPELL_TAIL_LASH_H); + m_uiTailSweepTimer = urand(5000, 7000); } else m_uiTailSweepTimer -= uiDiff; @@ -415,31 +580,12 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI // Cleave if (m_uiCleaveTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE); + DoCast(m_creature->getVictim(), SPELL_CLEAVE); m_uiCleaveTimer = urand(7000, 10000); } else m_uiCleaveTimer -= uiDiff; - // Lavas Strike - if (m_uiLavaStrikeTimer < uiDiff) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - { - DoCastSpellIfCan(pTarget, SPELL_LAVA_STRIKE); - - switch(urand(0, 15)) - { - case 0: DoScriptText(SAY_SARTHARION_SPECIAL_1, m_creature); break; - case 1: DoScriptText(SAY_SARTHARION_SPECIAL_2, m_creature); break; - case 2: DoScriptText(SAY_SARTHARION_SPECIAL_3, m_creature); break; - } - } - m_uiLavaStrikeTimer = urand(5000, 20000); - } - else - m_uiLavaStrikeTimer -= uiDiff; - // call tenebron if (!m_bHasCalledTenebron && m_uiTenebronTimer < uiDiff) { @@ -467,6 +613,61 @@ struct MANGOS_DLL_DECL boss_sartharionAI : public ScriptedAI else m_uiVesperonTimer -= uiDiff; + if (m_uiCheckTwilightTimer < uiDiff) + { + bool bNoAliveTwilightRealm = true; + if (m_pInstance) + { + if (Creature* pAcolyte = m_pInstance->instance->GetCreature(m_uiAcolyteShadronGUID)) + { + if (pAcolyte->isAlive()) + { + bNoAliveTwilightRealm = false; + } + } + if (Creature* pAcolyte = m_pInstance->instance->GetCreature(m_uiAcolyteVesperonGUID)) + { + if (pAcolyte->isAlive()) + { + bNoAliveTwilightRealm = false; + } + } + if (!m_lEggsGUIDList.empty()) + { + for (std::list::iterator itr = m_lEggsGUIDList.begin(); itr != m_lEggsGUIDList.end(); ++itr) + { + if (Creature* pTemp = (Creature*)Unit::GetUnit(*m_creature, *itr)) + { + if (pTemp->isAlive()) + { + bNoAliveTwilightRealm = false; + break; + } + } + } + } + if (bNoAliveTwilightRealm) + { + Map* pMap = m_creature->GetMap(); + + if (pMap && pMap->IsDungeon()) + { + Map::PlayerList const &PlayerList = pMap->GetPlayers(); + + if (!PlayerList.isEmpty()) + for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) + { + if (i->getSource()->isAlive()) + i->getSource()->CastSpell(i->getSource(), SPELL_TWILIGHT_SHIFT_REMOVAL, true); + } + } + } + } + m_uiCheckTwilightTimer = 2000; + } + else + m_uiCheckTwilightTimer -= uiDiff; + DoMeleeAttackIfReady(); EnterEvadeIfOutOfCombatArea(uiDiff); @@ -529,20 +730,38 @@ struct MANGOS_DLL_DECL dummy_dragonAI : public ScriptedAI uint32 m_uiWaypointId; uint32 m_uiMoveNextTimer; - int32 m_iPortalRespawnTime; bool m_bCanMoveFree; void Reset() { - if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE)) - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_uiWaypointId = 0; m_uiMoveNextTimer = 500; - m_iPortalRespawnTime = 30000; m_bCanMoveFree = false; } + void AttackStart(Unit* pWho) + { + if (!pWho || m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == POINT_MOTION_TYPE) + return; + + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + + if (IsCombatMovement()) + m_creature->GetMotionMaster()->MoveChase(pWho); + } + } + + void JustReachedHome() + { + m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + } + void MovementInform(uint32 uiType, uint32 uiPointId) { if (!m_pInstance || uiType != POINT_MOTION_TYPE) @@ -562,6 +781,7 @@ struct MANGOS_DLL_DECL dummy_dragonAI : public ScriptedAI { m_creature->GetMotionMaster()->Clear(); m_bCanMoveFree = false; + m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); m_creature->SetInCombatWithZone(); return; } @@ -601,95 +821,208 @@ struct MANGOS_DLL_DECL dummy_dragonAI : public ScriptedAI } } + //Removes debuff from players + void RemoveDebuff(uint32 uiSpellId) + { + Map* pMap = m_creature->GetMap(); + + if (pMap && pMap->IsDungeon()) + { + Map::PlayerList const &PlayerList = pMap->GetPlayers(); + + if (PlayerList.isEmpty()) + return; + + for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) + { + if (uiSpellId == SPELL_TWILIGHT_SHIFT_ENTER) + i->getSource()->CastSpell(i->getSource(), SPELL_TWILIGHT_SHIFT_REMOVAL, true); + else + i->getSource()->RemoveAurasDueToSpell(uiSpellId); + } + } + } + //"opens" the portal and does the "opening" whisper void OpenPortal() { int32 iTextId = 0; + int32 iPortalRespawnTime = 0; //there are 4 portal spawn locations, each are expected to be spawned with negative spawntimesecs in database //using a grid search here seem to be more efficient than caching all four guids //in instance script and calculate range to each. - GameObject* pPortal = GetClosestGameObjectWithEntry(m_creature,GO_TWILIGHT_PORTAL,50.0f); - - switch(m_creature->GetEntry()) + if (GameObject* pPortal = GetClosestGameObjectWithEntry(m_creature, GO_TWILIGHT_PORTAL, 100.0f)) { - case NPC_TENEBRON: - iTextId = WHISPER_HATCH_EGGS; - break; - case NPC_SHADRON: - case NPC_VESPERON: - iTextId = WHISPER_OPEN_PORTAL; - break; - } + Creature* pAcolyte = NULL; + switch(m_creature->GetEntry()) + { + case NPC_TENEBRON: + iTextId = WHISPER_HATCH_EGGS; + m_lEggsGUIDList.clear(); + for (uint8 i=0; i<6; ++i) + { + if (Creature* pEgg = m_creature->SummonCreature(NPC_TWILIGHT_EGG, pPortal->GetPositionX()-10+urand(0, 20), pPortal->GetPositionY()-10+urand(0, 20), pPortal->GetPositionZ()+1.0f, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000)) + { + pEgg->SetPhaseMask(16, true); + m_lEggsGUIDList.push_back(pEgg->GetGUID()); + } + } + iPortalRespawnTime = 30; + break; + case NPC_SHADRON: + iTextId = WHISPER_OPEN_PORTAL; + if (m_pInstance) + { + pAcolyte = m_pInstance->instance->GetCreature(m_uiAcolyteShadronGUID); + if (!pAcolyte || (pAcolyte && pAcolyte->isDead())) + { + pAcolyte = NULL; + if (pAcolyte = m_creature->SummonCreature(NPC_ACOLYTE_OF_SHADRON, pPortal->GetPositionX()-10+urand(0, 20), pPortal->GetPositionY()-10+urand(0, 20), pPortal->GetPositionZ()+1.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000)) + { + m_uiAcolyteShadronGUID = pAcolyte->GetGUID(); + pAcolyte->SetPhaseMask(16, true); + } + } + if (m_pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) + { + if (Creature* pSarth = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(DATA_SARTHARION))) + pSarth->CastSpell(pSarth, SPELL_GIFT_OF_TWILIGTH_SAR, true); + } + else + { + if (Creature* pShad = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(DATA_SHADRON))) + pShad->CastSpell(pShad, SPELL_GIFT_OF_TWILIGTH_SHA, true); + } + } + iPortalRespawnTime = 60; + break; + case NPC_VESPERON: + iTextId = WHISPER_OPEN_PORTAL; + if (m_pInstance) + { + uint32 uiTempSpell; + if (m_pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) + uiTempSpell = 58835; + else + uiTempSpell = 57935; + + SpellEntry* pTempSpell = (SpellEntry*)GetSpellStore()->LookupEntry(uiTempSpell); + if (pTempSpell) + { + pTempSpell->StackAmount = 1; + pTempSpell->procCharges = 0; + m_creature->CastSpell(m_creature, pTempSpell, true); + } + + pAcolyte = m_pInstance->instance->GetCreature(m_uiAcolyteVesperonGUID); + if (!pAcolyte || (pAcolyte && pAcolyte->isDead())) + { + pAcolyte = NULL; + if (pAcolyte = m_creature->SummonCreature(NPC_ACOLYTE_OF_VESPERON, pPortal->GetPositionX()-10+urand(0, 20), pPortal->GetPositionY()-10+urand(0, 20), pPortal->GetPositionZ()+1.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000)) + { + m_uiAcolyteVesperonGUID = pAcolyte->GetGUID(); + pAcolyte->SetPhaseMask(16, true); + } + } + } + iPortalRespawnTime = 60; + break; + } - DoRaidWhisper(iTextId); + DoRaidWhisper(iTextId); - //By using SetRespawnTime() we will actually "spawn" the object with our defined time. - //Once time is up, portal will disappear again. - if (pPortal && !pPortal->isSpawned()) - pPortal->SetRespawnTime(m_iPortalRespawnTime); + //By using SetRespawnTime() we will actually "spawn" the object with our defined time. + //Once time is up, portal will disappear again. + + pPortal->SetRespawnTime(iPortalRespawnTime); + pPortal->Refresh(); - //Unclear what are expected to happen if one drake has a portal open already - //Refresh respawnTime so time again are set to 30secs? + //Unclear what are expected to happen if one drake has a portal open already + //Refresh respawnTime so time again are set to 30secs? + } } - //Removes each drakes unique debuff from players - void RemoveDebuff(uint32 uiSpellId) - { - Map* pMap = m_creature->GetMap(); - if (pMap && pMap->IsDungeon()) + void CheckTwilightRealm() + { + bool bNoAliveTwilightRealm = true; + if (m_pInstance) { - Map::PlayerList const &PlayerList = pMap->GetPlayers(); - - if (PlayerList.isEmpty()) - return; - - for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) - { - if (i->getSource()->isAlive() && i->getSource()->HasAura(uiSpellId)) - i->getSource()->RemoveAurasDueToSpell(uiSpellId); - } + if (Creature* pAcolyte = m_pInstance->instance->GetCreature(m_uiAcolyteShadronGUID)) + if (pAcolyte->isAlive()) + bNoAliveTwilightRealm = false; + if (Creature* pAcolyte = m_pInstance->instance->GetCreature(m_uiAcolyteVesperonGUID)) + if (pAcolyte->isAlive()) + bNoAliveTwilightRealm = false; + if (!m_lEggsGUIDList.empty()) + for (std::list::iterator itr = m_lEggsGUIDList.begin(); itr != m_lEggsGUIDList.end(); ++itr) + if (Creature* pTemp = (Creature*)Unit::GetUnit(*m_creature, *itr)) + if (pTemp->isAlive()) + { + bNoAliveTwilightRealm = false; + break; + } + if (bNoAliveTwilightRealm) + RemoveDebuff(SPELL_TWILIGHT_SHIFT_ENTER); } } void JustDied(Unit* pKiller) { int32 iTextId = 0; - uint32 uiSpellId = 0; switch(m_creature->GetEntry()) { case NPC_TENEBRON: + { iTextId = SAY_TENEBRON_DEATH; - uiSpellId = SPELL_POWER_OF_TENEBRON; + + if (!m_lEggsGUIDList.empty()) + for (std::list::iterator itr = m_lEggsGUIDList.begin(); itr != m_lEggsGUIDList.end(); ++itr) + if (Creature* pEgg = (Creature*)Unit::GetUnit(*m_creature, *itr)) + pEgg->ForcedDespawn(); break; + } case NPC_SHADRON: + { iTextId = SAY_SHADRON_DEATH; - uiSpellId = SPELL_POWER_OF_SHADRON; + + if (Creature* pAcolyte = m_pInstance->instance->GetCreature(m_uiAcolyteShadronGUID)) + pAcolyte->DealDamage(pAcolyte, pAcolyte->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + break; + } case NPC_VESPERON: + { iTextId = SAY_VESPERON_DEATH; - uiSpellId = SPELL_POWER_OF_VESPERON; + + if (Creature* pAcolyte = m_pInstance->instance->GetCreature(m_uiAcolyteVesperonGUID)) + pAcolyte->DealDamage(pAcolyte, pAcolyte->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + break; + } } DoScriptText(iTextId, m_creature); - RemoveDebuff(uiSpellId); - if (m_pInstance) { // not if solo mini-boss fight if (m_pInstance->GetData(TYPE_SARTHARION_EVENT) != IN_PROGRESS) + { + RemoveDebuff(SPELL_TWILIGHT_SHIFT_ENTER); + m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); return; + } // Twilight Revenge to main boss if (Unit* pSartharion = Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_SARTHARION))) { if (pSartharion->isAlive()) - m_creature->CastSpell(pSartharion,SPELL_TWILIGHT_REVENGE,true); + m_creature->CastSpell(pSartharion, SPELL_TWILIGHT_REVENGE, true); + m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); } } } @@ -718,23 +1051,30 @@ struct MANGOS_DLL_DECL dummy_dragonAI : public ScriptedAI struct MANGOS_DLL_DECL mob_tenebronAI : public dummy_dragonAI { - mob_tenebronAI(Creature* pCreature) : dummy_dragonAI(pCreature) { Reset(); } + mob_tenebronAI(Creature* pCreature) : dummy_dragonAI(pCreature) + { + Reset(); + } uint32 m_uiShadowBreathTimer; uint32 m_uiShadowFissureTimer; uint32 m_uiHatchEggTimer; + uint32 m_uiCheckTimer; + uint32 m_uiTailSweepTimer; void Reset() { - m_uiShadowBreathTimer = 20000; - m_uiShadowFissureTimer = 5000; - m_uiHatchEggTimer = 30000; + m_uiShadowBreathTimer = 10000; + m_uiShadowFissureTimer = 8000; + m_uiHatchEggTimer = 15000; + m_uiCheckTimer = 2000; + m_uiTailSweepTimer = 5000; + m_lEggsGUIDList.clear(); } void Aggro(Unit* pWho) { DoScriptText(SAY_TENEBRON_AGGRO, m_creature); - DoCastSpellIfCan(m_creature, SPELL_POWER_OF_TENEBRON); } void KilledUnit(Unit* pVictim) @@ -754,10 +1094,10 @@ struct MANGOS_DLL_DECL mob_tenebronAI : public dummy_dragonAI // shadow fissure if (m_uiShadowFissureTimer < uiDiff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_SHADOW_FISSURE : SPELL_SHADOW_FISSURE_H); + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, m_bIsRegularMode ? SPELL_SHADOW_FISSURE : SPELL_SHADOW_FISSURE_H); - m_uiShadowFissureTimer = urand(15000, 20000); + m_uiShadowFissureTimer = urand(8000, 10000); } else m_uiShadowFissureTimer -= uiDiff; @@ -766,12 +1106,36 @@ struct MANGOS_DLL_DECL mob_tenebronAI : public dummy_dragonAI if (m_uiShadowBreathTimer < uiDiff) { DoScriptText(SAY_TENEBRON_BREATH, m_creature); - DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_SHADOW_BREATH : SPELL_SHADOW_BREATH_H); - m_uiShadowBreathTimer = urand(20000, 25000); + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_SHADOW_BREATH : SPELL_SHADOW_BREATH_H); + m_uiShadowBreathTimer = urand(10000, 30000); } else m_uiShadowBreathTimer -= uiDiff; + if (m_uiTailSweepTimer < uiDiff) + { + DoCast(m_creature, m_bIsRegularMode ? SPELL_TAIL_LASH : SPELL_TAIL_LASH_H); + m_uiTailSweepTimer = urand(5000, 7000); + } + else + m_uiTailSweepTimer -= uiDiff; + + if (m_uiHatchEggTimer < uiDiff) + { + OpenPortal(); + m_uiHatchEggTimer = 45000; + } + else + m_uiHatchEggTimer -= uiDiff; + + if (m_uiCheckTimer < uiDiff && m_pInstance->GetData(TYPE_SARTHARION_EVENT) != IN_PROGRESS) + { + CheckTwilightRealm(); + m_uiCheckTimer = 2000; + } + else + m_uiCheckTimer -= uiDiff; + DoMeleeAttackIfReady(); } }; @@ -787,29 +1151,30 @@ CreatureAI* GetAI_mob_tenebron(Creature* pCreature) struct MANGOS_DLL_DECL mob_shadronAI : public dummy_dragonAI { - mob_shadronAI(Creature* pCreature) : dummy_dragonAI(pCreature) { Reset(); } + mob_shadronAI(Creature* pCreature) : dummy_dragonAI(pCreature) + { + Reset(); + } uint32 m_uiShadowBreathTimer; uint32 m_uiShadowFissureTimer; uint32 m_uiAcolyteShadronTimer; + uint32 m_uiCheckTimer; + uint32 m_uiTailSweepTimer; void Reset() { - m_uiShadowBreathTimer = 20000; - m_uiShadowFissureTimer = 5000; - m_uiAcolyteShadronTimer = 60000; - - if (m_creature->HasAura(SPELL_TWILIGHT_TORMENT_VESP)) - m_creature->RemoveAurasDueToSpell(SPELL_TWILIGHT_TORMENT_VESP); - - if (m_creature->HasAura(SPELL_GIFT_OF_TWILIGTH_SHA)) - m_creature->RemoveAurasDueToSpell(SPELL_GIFT_OF_TWILIGTH_SHA); + m_uiShadowBreathTimer = 10000; + m_uiShadowFissureTimer = 8000; + m_uiAcolyteShadronTimer = 15000; + m_uiCheckTimer = 2000; + m_uiTailSweepTimer = 5000; + m_uiAcolyteShadronGUID = 0; } void Aggro(Unit* pWho) { DoScriptText(SAY_SHADRON_AGGRO,m_creature); - DoCastSpellIfCan(m_creature, SPELL_POWER_OF_SHADRON); } void KilledUnit(Unit* pVictim) @@ -829,10 +1194,10 @@ struct MANGOS_DLL_DECL mob_shadronAI : public dummy_dragonAI // shadow fissure if (m_uiShadowFissureTimer < uiDiff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_SHADOW_FISSURE : SPELL_SHADOW_FISSURE_H); + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, m_bIsRegularMode ? SPELL_SHADOW_FISSURE : SPELL_SHADOW_FISSURE_H); - m_uiShadowFissureTimer = urand(15000, 20000); + m_uiShadowFissureTimer = urand(8000, 10000); } else m_uiShadowFissureTimer -= uiDiff; @@ -841,12 +1206,36 @@ struct MANGOS_DLL_DECL mob_shadronAI : public dummy_dragonAI if (m_uiShadowBreathTimer < uiDiff) { DoScriptText(SAY_SHADRON_BREATH, m_creature); - DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_SHADOW_BREATH : SPELL_SHADOW_BREATH_H); - m_uiShadowBreathTimer = urand(20000, 25000); + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_SHADOW_BREATH : SPELL_SHADOW_BREATH_H); + m_uiShadowBreathTimer = urand(10000, 30000); } else m_uiShadowBreathTimer -= uiDiff; + if (m_uiTailSweepTimer < uiDiff) + { + DoCast(m_creature, m_bIsRegularMode ? SPELL_TAIL_LASH : SPELL_TAIL_LASH_H); + m_uiTailSweepTimer = urand(5000, 7000); + } + else + m_uiTailSweepTimer -= uiDiff; + + if (m_uiAcolyteShadronTimer < uiDiff) + { + OpenPortal(); + m_uiAcolyteShadronTimer = 60000; + } + else + m_uiAcolyteShadronTimer -= uiDiff; + + if (m_uiCheckTimer < uiDiff && m_pInstance->GetData(TYPE_SARTHARION_EVENT) != IN_PROGRESS) + { + CheckTwilightRealm(); + m_uiCheckTimer = 2000; + } + else + m_uiCheckTimer -= uiDiff; + DoMeleeAttackIfReady(); } }; @@ -862,23 +1251,30 @@ CreatureAI* GetAI_mob_shadron(Creature* pCreature) struct MANGOS_DLL_DECL mob_vesperonAI : public dummy_dragonAI { - mob_vesperonAI(Creature* pCreature) : dummy_dragonAI(pCreature) { Reset(); } + mob_vesperonAI(Creature* pCreature) : dummy_dragonAI(pCreature) + { + Reset(); + } uint32 m_uiShadowBreathTimer; uint32 m_uiShadowFissureTimer; uint32 m_uiAcolyteVesperonTimer; + uint32 m_uiCheckTimer; + uint32 m_uiTailSweepTimer; void Reset() { - m_uiShadowBreathTimer = 20000; - m_uiShadowFissureTimer = 5000; - m_uiAcolyteVesperonTimer = 60000; + m_uiShadowBreathTimer = 10000; + m_uiShadowFissureTimer = 8000; + m_uiAcolyteVesperonTimer = 15000; + m_uiCheckTimer = 2000; + m_uiTailSweepTimer = 5000; + m_uiAcolyteVesperonGUID = 0; } void Aggro(Unit* pWho) { DoScriptText(SAY_VESPERON_AGGRO,m_creature); - DoCastSpellIfCan(m_creature, SPELL_POWER_OF_VESPERON); } void KilledUnit(Unit* pVictim) @@ -898,10 +1294,10 @@ struct MANGOS_DLL_DECL mob_vesperonAI : public dummy_dragonAI // shadow fissure if (m_uiShadowFissureTimer < uiDiff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_SHADOW_FISSURE : SPELL_SHADOW_FISSURE_H); + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, m_bIsRegularMode ? SPELL_SHADOW_FISSURE : SPELL_SHADOW_FISSURE_H); - m_uiShadowFissureTimer = urand(15000, 20000); + m_uiShadowFissureTimer = urand(8000, 10000); } else m_uiShadowFissureTimer -= uiDiff; @@ -910,12 +1306,36 @@ struct MANGOS_DLL_DECL mob_vesperonAI : public dummy_dragonAI if (m_uiShadowBreathTimer < uiDiff) { DoScriptText(SAY_VESPERON_BREATH, m_creature); - DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_SHADOW_BREATH : SPELL_SHADOW_BREATH_H); - m_uiShadowBreathTimer = urand(20000, 25000); + DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_SHADOW_BREATH : SPELL_SHADOW_BREATH_H); + m_uiShadowBreathTimer = urand(10000, 30000); } else m_uiShadowBreathTimer -= uiDiff; + if (m_uiTailSweepTimer < uiDiff) + { + DoCast(m_creature, m_bIsRegularMode ? SPELL_TAIL_LASH : SPELL_TAIL_LASH_H); + m_uiTailSweepTimer = urand(5000, 7000); + } + else + m_uiTailSweepTimer -= uiDiff; + + if (m_uiAcolyteVesperonTimer < uiDiff) + { + OpenPortal(); + m_uiAcolyteVesperonTimer = 60000; + } + else + m_uiAcolyteVesperonTimer -= uiDiff; + + if (m_uiCheckTimer < uiDiff && m_pInstance->GetData(TYPE_SARTHARION_EVENT) != IN_PROGRESS) + { + CheckTwilightRealm(); + m_uiCheckTimer = 2000; + } + else + m_uiCheckTimer -= uiDiff; + DoMeleeAttackIfReady(); } }; @@ -941,14 +1361,6 @@ struct MANGOS_DLL_DECL mob_acolyte_of_shadronAI : public ScriptedAI void Reset() { - if (m_pInstance) - { - //if not solo figth, buff main boss, else place debuff on mini-boss. both spells TARGET_SCRIPT - if (m_pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) - DoCastSpellIfCan(m_creature, SPELL_GIFT_OF_TWILIGTH_SAR); - else - DoCastSpellIfCan(m_creature, SPELL_GIFT_OF_TWILIGTH_SHA); - } } void JustDied(Unit* killer) @@ -998,7 +1410,7 @@ struct MANGOS_DLL_DECL mob_acolyte_of_vesperonAI : public ScriptedAI { mob_acolyte_of_vesperonAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Reset(); } @@ -1006,18 +1418,25 @@ struct MANGOS_DLL_DECL mob_acolyte_of_vesperonAI : public ScriptedAI void Reset() { - DoCastSpellIfCan(m_creature, SPELL_TWILIGHT_TORMENT_VESP_ACO); } void JustDied(Unit* pKiller) { - // remove twilight torment on Vesperon - if (m_pInstance) + // remove twilight torment + Map* pMap = m_creature->GetMap(); + + if (pMap && pMap->IsDungeon()) { - Creature* pVesperon = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_VESPERON)); + Map::PlayerList const &PlayerList = pMap->GetPlayers(); - if (pVesperon && pVesperon->isAlive() && pVesperon->HasAura(SPELL_TWILIGHT_TORMENT_VESP)) - pVesperon->RemoveAurasDueToSpell(SPELL_TWILIGHT_TORMENT_VESP); + if (PlayerList.isEmpty()) + return; + + for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) + { + i->getSource()->RemoveAurasDueToSpell(57935); + i->getSource()->RemoveAurasDueToSpell(58835); + } } } @@ -1043,12 +1462,36 @@ struct MANGOS_DLL_DECL mob_twilight_eggsAI : public ScriptedAI { mob_twilight_eggsAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + uint32 m_uiSummonWhelpTimer; + void Reset() + { + m_uiSummonWhelpTimer = 20000; + } + + void AttackStart(Unit* pWho) { } - void AttackStart(Unit* pWho) { } - void MoveInLineOfSight(Unit* pWho) { } + void MoveInLineOfSight(Unit* pWho) + { + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_uiSummonWhelpTimer < uiDiff) + { + if (Creature* pWhelp = DoSpawnCreature(NPC_TWILIGHT_WHELP, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000)) + { + pWhelp->SetPhaseMask(1, true); + pWhelp->SetInCombatWithZone(); + } + m_uiSummonWhelpTimer = 20000; + m_creature->ForcedDespawn(); + } + else + m_uiSummonWhelpTimer -= uiDiff; + } }; CreatureAI* GetAI_mob_twilight_eggs(Creature* pCreature) @@ -1080,7 +1523,7 @@ struct MANGOS_DLL_DECL mob_twilight_whelpAI : public ScriptedAI // twilight torment if (m_uiFadeArmorTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_FADE_ARMOR); + DoCast(m_creature->getVictim(), SPELL_FADE_ARMOR); m_uiFadeArmorTimer = urand(5000, 10000); } else @@ -1095,6 +1538,235 @@ CreatureAI* GetAI_mob_twilight_whelp(Creature* pCreature) return new mob_twilight_whelpAI(pCreature); } +/*###### +## Mob Fire Cyclone +######*/ + +struct MANGOS_DLL_DECL mob_fire_cycloneAI : public ScriptedAI +{ + mob_fire_cycloneAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 m_uiRefreshTimer; + uint32 m_uiLavaStrikeTimer; + uint8 m_uiLavaBlazeCount; + bool m_bLavaStrikeAllowed; + + + void Reset() + { + m_bLavaStrikeAllowed = false; + m_uiRefreshTimer = (urand(1000, 60000)); + } + + void AttackStart(Unit* pWho) + { + } + + void MoveInLineOfSight(Unit* pWho) + { + } + + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + { + if (pSpell->Id == SPELL_CYCLONE_AURA_2) + { + DoCast(m_creature, 57560, true); + m_bLavaStrikeAllowed = true; + m_uiLavaStrikeTimer = 0; + m_uiLavaBlazeCount = 0; + } + } + + void JustSummoned(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_LAVA_BLAZE) + { + if(m_pInstance) + if(Creature* pSartharion = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_SARTHARION))) + if(pSartharion->isAlive()) + if(((boss_sartharionAI*)pSartharion->AI())->m_bIsSoftEnraged != true) + { + switch (urand(0, 9)) + { + case 0: pSummoned->ForcedDespawn(); break; + case 1: pSummoned->ForcedDespawn(); break; + case 2: pSummoned->ForcedDespawn(); break; + case 3: pSummoned->ForcedDespawn(); break; + case 4: pSummoned->ForcedDespawn(); break; + case 5: pSummoned->ForcedDespawn(); break; + case 6: pSummoned->ForcedDespawn(); break; + case 7: pSummoned->ForcedDespawn(); break; + case 8: pSummoned->ForcedDespawn(); break; + case 9: pSummoned->SetInCombatWithZone(); break; + } + } + else + { + pSummoned->SetInCombatWithZone(); + } + } + } + + void UpdateAI(const uint32 uiDiff) + { + if(m_pInstance && m_pInstance->GetData(TYPE_SARTHARION_EVENT) != IN_PROGRESS) return; + + if (m_bLavaStrikeAllowed) + { + if (m_uiLavaStrikeTimer < uiDiff) + { + if (Creature* pTemp = m_creature->SummonCreature(25640, urand(3220, 3275), urand(486, 575), 58.8f, 0, TEMPSUMMON_TIMED_DESPAWN, 15000)) + { + pTemp->SetDisplayId(11686); + pTemp->setFaction(35); + pTemp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + pTemp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + DoCast(pTemp, SPELL_LAVA_STRIKE); + } + m_uiLavaStrikeTimer = (urand(1000, 3000)); + m_uiLavaBlazeCount++; + if (m_uiLavaBlazeCount>=12) + { + m_bLavaStrikeAllowed = false; + m_creature->SetFloatValue(OBJECT_FIELD_SCALE_X, 1.0f); + } + } + else + m_uiLavaStrikeTimer -= uiDiff; + } + + if (!m_bLavaStrikeAllowed) + { + if (m_uiRefreshTimer < uiDiff) + { + DoCast(m_creature, SPELL_CYCLONE_AURA_2); + m_creature->SetFloatValue(OBJECT_FIELD_SCALE_X, 2.5f); + m_uiRefreshTimer = (urand(15000, 45000)); + } + else + m_uiRefreshTimer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_mob_fire_cyclone(Creature* pCreature) +{ + return new mob_fire_cycloneAI(pCreature); +} + +/*###### +## Mob Flame Tsunami +######*/ + +struct MANGOS_DLL_DECL mob_flame_tsunamiAI : public ScriptedAI +{ + mob_flame_tsunamiAI(Creature* pCreature) : ScriptedAI(pCreature) + { + Reset(); + } + + uint32 m_uiTickTimer; + uint32 m_uiMovementStartTimer; + Creature* m_pDummyDamager; + + void Reset() + { + m_creature->SetDisplayId(11686); + DoCast(m_creature, SPELL_FLAME_TSUNAMI, true); + m_creature->AddSplineFlag(SPLINEFLAG_FLYING); + m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + m_uiMovementStartTimer = 4000; + m_uiTickTimer = 1000; + m_pDummyDamager = DoSpawnCreature(31103, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 18000); + if (m_pDummyDamager) + { + m_pDummyDamager->SetDisplayId(11686); + m_pDummyDamager->setFaction(14); + m_pDummyDamager->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + } + } + + void AttackStart(Unit* pWho) + { + } + + void MoveInLineOfSight(Unit* pWho) + { + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_uiMovementStartTimer < uiDiff) + { + int8 uiDirection = 1; + if (m_creature->GetPositionX() > 3240.0f) + uiDirection = -1; + m_creature->GetMotionMaster()->MovePoint(0, m_creature->GetPositionX()+uiDirection*86.5f, m_creature->GetPositionY(), m_creature->GetPositionZ()); + if (m_pDummyDamager) + m_pDummyDamager->GetMotionMaster()->MovePoint(0, m_creature->GetPositionX()+uiDirection*86.5f, m_creature->GetPositionY(), m_creature->GetPositionZ()); + m_uiMovementStartTimer = 30000; + } + else + m_uiMovementStartTimer -= uiDiff; + + if (m_uiTickTimer < uiDiff) + { + if (m_pDummyDamager) + m_pDummyDamager->CastSpell(m_pDummyDamager, SPELL_FLAME_TSUNAMI_DMG, false); + + std::list lLavaBlazes; + GetCreatureListWithEntryInGrid(lLavaBlazes, m_creature, NPC_LAVA_BLAZE, 6.0f); + if (!lLavaBlazes.empty()) + { + SpellEntry* pTempSpell = (SpellEntry*)GetSpellStore()->LookupEntry(SPELL_FLAME_TSUNAMI_BUFF); + if (pTempSpell) + { + pTempSpell->EffectImplicitTargetA[0] = TARGET_SELF; + pTempSpell->EffectImplicitTargetB[0] = 0; + pTempSpell->EffectImplicitTargetA[1] = TARGET_SELF; + pTempSpell->EffectImplicitTargetB[1] = 0; + pTempSpell->EffectImplicitTargetA[2] = TARGET_SELF; + pTempSpell->EffectImplicitTargetB[2] = 0; + for (std::list::iterator iter = lLavaBlazes.begin(); iter != lLavaBlazes.end(); ++iter) + { + (*iter)->CastSpell(*iter, pTempSpell, false); + (*iter)->SetHealth((*iter)->GetHealth()*4); + } + } + } + + Map* pMap = m_creature->GetMap(); + if (pMap && pMap->IsDungeon()) + { + Map::PlayerList const &PlayerList = pMap->GetPlayers(); + + if (!PlayerList.isEmpty()) + for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) + if (i->getSource()->isAlive() && m_creature->GetDistance2d(i->getSource()) <= 5.0f) + { + i->getSource()->SetOrientation(m_creature->GetOrientation()); + i->getSource()->CastSpell(i->getSource(), SPELL_FLAME_TSUNAMI_LEAP, true); + } + } + + m_uiTickTimer = 1000; + } + else + m_uiTickTimer -= uiDiff; + } +}; + +CreatureAI* GetAI_mob_flame_tsunami(Creature* pCreature) +{ + return new mob_flame_tsunamiAI(pCreature); +} + void AddSC_boss_sartharion() { Script *newscript; @@ -1138,4 +1810,14 @@ void AddSC_boss_sartharion() newscript->Name = "mob_twilight_whelp"; newscript->GetAI = &GetAI_mob_twilight_whelp; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_fire_cyclone"; + newscript->GetAI = &GetAI_mob_fire_cyclone; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_flame_tsunami"; + newscript->GetAI = &GetAI_mob_flame_tsunami; + newscript->RegisterSelf(); } From a7df2cfa70313426ee0d01ed6d30ee6c96222795 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 27 May 2010 21:01:20 +0400 Subject: [PATCH 325/405] LK Intro phase added --- addition/721_icecrown_mangos.sql | 4 +- .../icecrown_citadel/boss_the_lich_king.cpp | 98 ++++++++++++++++--- .../instance_icecrown_spire.cpp | 14 ++- 3 files changed, 91 insertions(+), 25 deletions(-) diff --git a/addition/721_icecrown_mangos.sql b/addition/721_icecrown_mangos.sql index 1b1c5b0b6..fbb93810d 100644 --- a/addition/721_icecrown_mangos.sql +++ b/addition/721_icecrown_mangos.sql @@ -115,6 +115,8 @@ UPDATE `gameobject_template` SET `faction` = '114',`data0` = '0' WHERE `gameobje UPDATE `gameobject` SET `state` = '1' WHERE `id` IN (201369,201379); -- Lich King -UPDATE `creature_template` SET `ScriptName`='boss_the_lich_king_icc', `AIName`='' WHERE `entry`= 29983; +UPDATE `creature_template` SET `ScriptName`='boss_the_lich_king_icc', `AIName`='' WHERE `entry`= 36597; UPDATE `creature_template` SET `ScriptName`='boss_tirion_icc', `npcflag`=1, `AIName`='' WHERE `entry`= 38995; +INSERT IGNORE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('71614', '1', '38995'); + UPDATE `creature_template` SET `ScriptName`='mob_ice_sphere_icc', `AIName`='' WHERE `entry`= 36633; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp index 3038a741d..044490f07 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp @@ -91,9 +91,9 @@ enum BossSpells enum Yells { SAY_INTRO_1_KING = -1631501, - SAY_INTRO_2_TIRION = -1631502, + SAY_INTRO_2_TIRION = -1631552, SAY_INTRO_3_KING = -1631503, - SAY_INTRO_4_TIRION = -1631504, + SAY_INTRO_4_TIRION = -1631554, SAY_INTRO_5_KING = -1631505, SAY_AGGRO_KING = -1631506, SAY_REMORSELESS_WINTER = -1631507, @@ -126,7 +126,7 @@ enum Yells static Locations SpawnLoc[]= { {459.93689f, -2124.638184f, 1040.860107f}, // 0 Lich King Intro - {503.156525, -2124.516602, 1040.860107}, // 1 Lich king move end + {503.15652f, -2124.516602f, 1040.860107f}, // 1 Lich king move end {491.27118f, -2124.638184f, 1040.860107f}, // 2 Tirion 1 {481.69797f, -2124.638184f, 1040.860107f}, // 3 Tirion 2 {498.00448f, 2201.573486f, 1046.093872f}, // 4 Valkyrs? @@ -196,7 +196,8 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI void JustReachedHome() { - if (pInstance) pInstance->SetData(TYPE_LICH_KING, FAIL); + if (!pInstance) return; + pInstance->SetData(TYPE_LICH_KING, FAIL); } void StartMovement(uint32 id, uint32 _nextEvent) @@ -204,6 +205,8 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI nextPoint = id; nextEvent = _nextEvent; m_creature->GetMotionMaster()->MovePoint(id, SpawnLoc[id].x, SpawnLoc[id].y, SpawnLoc[id].z); + pInstance->SetData(TYPE_EVENT,0); + movementstarted = true; } void JustSummoned(Creature* summoned) @@ -212,7 +215,8 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI void Aggro(Unit *who) { - if(pInstance) pInstance->SetData(TYPE_LICH_KING, IN_PROGRESS); + if(!pInstance) return; + pInstance->SetData(TYPE_LICH_KING, IN_PROGRESS); } void JustDied(Unit *killer) @@ -233,6 +237,7 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI { case 12000: m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_STAND); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); StartMovement(0,12020); break; case 12020: @@ -242,18 +247,48 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI pInstance->SetData(TYPE_EVENT,12030); break; case 12040: + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_READY2H); + DoScriptText(SAY_INTRO_3_KING, m_creature); + UpdateTimer = 3000; + pInstance->SetData(TYPE_EVENT,12041); + break; + case 12041: + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_LAUGH); + UpdateTimer = 3000; + pInstance->SetData(TYPE_EVENT,12042); + break; + case 12042: + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE,EMOTE_ONESHOT_POINT_NOSHEATHE); + UpdateTimer = 2000; + pInstance->SetData(TYPE_EVENT,12043); + break; + case 12043: + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE,EMOTE_ONESHOT_NONE); + UpdateTimer = 10000; + pInstance->SetData(TYPE_EVENT,12050); break; case 12060: + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_TALK); + DoScriptText(SAY_INTRO_5_KING, m_creature); + UpdateTimer = 10000; + pInstance->SetData(TYPE_EVENT,12080); break; case 12080: + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE,EMOTE_STATE_READY2H); + UpdateTimer = 2000; + pInstance->SetData(TYPE_EVENT,12100); break; case 12100: + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE,EMOTE_ONESHOT_NONE); + UpdateTimer = 6000; + pInstance->SetData(TYPE_EVENT,12120); break; case 12120: + m_creature->SetInCombatWithZone(); + pInstance->SetData(TYPE_EVENT,12999); + UpdateTimer = 6000; break; - case 12140: - break; - case 12160: + case 13000: break; default: break; @@ -287,10 +322,34 @@ struct MANGOS_DLL_DECL boss_tirion_iccAI : public ScriptedAI ScriptedInstance *pInstance; uint32 UpdateTimer; + uint32 nextEvent; + uint32 nextPoint; + bool movementstarted; void Reset() { if(!pInstance) return; + movementstarted = false; + } + + void StartMovement(uint32 id, uint32 _nextEvent) + { + nextPoint = id; + nextEvent = _nextEvent; + m_creature->GetMotionMaster()->MovePoint(id, SpawnLoc[id].x, SpawnLoc[id].y, SpawnLoc[id].z); + pInstance->SetData(TYPE_EVENT,0); + movementstarted = true; + } + + void MovementInform(uint32 type, uint32 id) + { + if (type != POINT_MOTION_TYPE || !movementstarted) return; + if (id == nextPoint) + { + movementstarted = false; + pInstance->SetData(TYPE_EVENT,nextEvent); + m_creature->GetMotionMaster()->MovementExpired(); + } } void UpdateAI(const uint32 diff) @@ -311,18 +370,25 @@ struct MANGOS_DLL_DECL boss_tirion_iccAI : public ScriptedAI pInstance->SetData(TYPE_EVENT,12040); break; case 12050: + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_POINT_NOSHEATHE); + DoScriptText(SAY_INTRO_4_TIRION, m_creature); + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT,12051); break; - case 12070: - break; - case 12090: - break; - case 12110: + case 12051: + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE); + UpdateTimer = 3000; + pInstance->SetData(TYPE_EVENT,12052); break; - case 12130: + case 12052: + StartMovement(3,12053); break; - case 12150: + case 12053: + UpdateTimer = 3000; + pInstance->SetData(TYPE_EVENT,12060); + m_creature->CastSpell(m_creature, SPELL_ICEBLOCK_TRIGGER, false); break; - case 12170: + case 13010: break; default: break; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp index 2b7ebbda8..4b7f320e4 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp @@ -562,6 +562,9 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance { case 12030: case 12050: + case 12051: + case 12052: + case 12053: case 12070: case 12090: case 12110: @@ -574,18 +577,13 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance case 12000: case 12020: case 12040: + case 12041: + case 12042: + case 12043: case 12060: case 12080: case 12100: case 12120: - case 12140: - case 12160: - case 12180: - case 12200: - case 12220: - case 12240: - case 12260: - case 12280: case 12300: return NPC_LICH_KING; break; From fd503ab48564e47d98f895a8360daeb0df147db3 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Fri, 28 May 2010 19:33:33 +0400 Subject: [PATCH 326/405] Change SelectUnit --- scripts/northrend/obsidian_sanctum/boss_sartharion.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp index f4d38be6e..6b3f761e2 100644 --- a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp +++ b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp @@ -1094,7 +1094,7 @@ struct MANGOS_DLL_DECL mob_tenebronAI : public dummy_dragonAI // shadow fissure if (m_uiShadowFissureTimer < uiDiff) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) DoCast(pTarget, m_bIsRegularMode ? SPELL_SHADOW_FISSURE : SPELL_SHADOW_FISSURE_H); m_uiShadowFissureTimer = urand(8000, 10000); @@ -1194,7 +1194,7 @@ struct MANGOS_DLL_DECL mob_shadronAI : public dummy_dragonAI // shadow fissure if (m_uiShadowFissureTimer < uiDiff) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) DoCast(pTarget, m_bIsRegularMode ? SPELL_SHADOW_FISSURE : SPELL_SHADOW_FISSURE_H); m_uiShadowFissureTimer = urand(8000, 10000); @@ -1294,7 +1294,7 @@ struct MANGOS_DLL_DECL mob_vesperonAI : public dummy_dragonAI // shadow fissure if (m_uiShadowFissureTimer < uiDiff) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) DoCast(pTarget, m_bIsRegularMode ? SPELL_SHADOW_FISSURE : SPELL_SHADOW_FISSURE_H); m_uiShadowFissureTimer = urand(8000, 10000); From ce3a32afd8a837d879438d7fb480872685351d12 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Fri, 28 May 2010 21:49:57 +0400 Subject: [PATCH 327/405] New version Culling of stratholme (from MaxXx2021) added. --- Makefile.am | 2 + addition/717_culling_of_stratholme_mangos.sql | 147 +- .../717_culling_of_stratholme_scriptdev2.sql | 365 ++- .../boss_infinite_corruptor.cpp | 132 + .../culling_of_stratholme/boss_lord_epoch.cpp | 209 +- .../culling_of_stratholme/boss_malganis.cpp | 473 +-- .../culling_of_stratholme/boss_meathook.cpp | 136 +- .../culling_of_stratholme/boss_salramm.cpp | 336 +- .../culling_of_stratholme.cpp | 2881 +++++++++-------- .../culling_of_stratholmeai.cpp | 1255 +++++++ .../def_culling_of_stratholme.h | 121 +- .../instance_culling_of_stratholme.cpp | 470 +-- .../trash_culling_of_stratholme.cpp | 1094 +++++++ system/ScriptLoader.cpp | 12 +- 14 files changed, 5238 insertions(+), 2395 deletions(-) create mode 100644 scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_infinite_corruptor.cpp create mode 100644 scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholmeai.cpp create mode 100644 scripts/kalimdor/caverns_of_time/culling_of_stratholme/trash_culling_of_stratholme.cpp diff --git a/Makefile.am b/Makefile.am index f282de88b..8728abf32 100644 --- a/Makefile.am +++ b/Makefile.am @@ -557,10 +557,12 @@ scripts/northrend/violet_hold/boss_lavanthor.cpp \ scripts/kalimdor/caverns_of_time/culling_of_stratholme/def_culling_of_stratholme.h \ scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_lord_epoch.cpp \ scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp \ +scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholmeai.cpp \ scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_malganis.cpp \ scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_meathook.cpp \ scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp \ scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_salramm.cpp \ +scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_infinite_corruptor.cpp \ scripts/world/areatrigger_scripts.cpp \ scripts/world/boss_emeriss.cpp \ scripts/world/boss_lethon.cpp \ diff --git a/addition/717_culling_of_stratholme_mangos.sql b/addition/717_culling_of_stratholme_mangos.sql index d259bef8d..b2efdc597 100644 --- a/addition/717_culling_of_stratholme_mangos.sql +++ b/addition/717_culling_of_stratholme_mangos.sql @@ -1,65 +1,86 @@ -update `creature_template` set `minhealth`='8600', `maxhealth`='8600' where `entry` in (31127, 31126, 28167, 28169); -update `creature_template` set `minhealth`='8600', `maxhealth`='8600' where `entry` in (10002, 10003, 10004, 10005); -update `creature_template` set `faction_A`='35', `faction_H`='35' where `entry` in (31127, 31126, 28167, 28169); -update `creature_template` set `faction_A`='35', `faction_H`='35' where `entry` in (10002, 10003, 10004, 10005); -update `creature_template` set `minhealth`='15000', `maxhealth`='15000' where `entry` in (27737); -update `creature_template` set `minhealth`='25000', `maxhealth`='25000' where `entry` in (31208); - -DELETE FROM `creature` WHERE (`id`=27744); -DELETE FROM `creature` WHERE (`id`=26530); -DELETE FROM `creature` WHERE (`id`=26529); -DELETE FROM `creature` WHERE (`id`=26532); -DELETE FROM `creature` WHERE (`id`=26533); +-- Remove old version +DELETE FROM `creature` WHERE `guid` IN (4456649,4456653); +REPLACE INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (30996, 0, 0, 0, 0, 0, 11686, 0, 11686, 0, 'CoT Stratholme - Crates KC Bunny', '', '', 1, 1, 1, 1, 0, 0, 17, 35, 35, 0, 1, 0, 1, 2, 0, 0, 1, 2000, 2000, 1, 33554432, 0, 0, 0, 0, 0, 0, 1, 2, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, ''); +UPDATE `quest_template` SET `ReqCreatureOrGOCount1` = '5' WHERE entry=13149; +REPLACE INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (20562, 0, 0, 0, 0, 0, 11686, 0, 11686, 0, 'Invisible Stalker (Scale x5)', '', '', 1, 1, 42, 42, 0, 0, 17, 35, 35, 0, 5, 0, 1, 2, 0, 0, 1, 2000, 2000, 1, 33554944, 0, 0, 0, 0, 0, 0, 1, 2, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, ''); + +UPDATE `creature` SET `spawntimesecs`='36000' WHERE `id` IN (31127, 31126, 28167, 28169); +replace into `spell_script_target` (`entry`, `type`, `targetEntry`) values('58825','1','27733'); + +UPDATE `creature_template` SET `faction_A`='35', `faction_H`='35' WHERE `entry` IN (31127, 31126, 28167, 28169); +UPDATE `creature_template` SET `faction_A`='35', `faction_H`='35' WHERE `entry` IN (10002, 10003, 10004, 10005); +UPDATE `creature_template` SET `minhealth`='15000', `maxhealth`='15000' WHERE `entry` IN (27737); +UPDATE `creature_template` SET `minhealth`='25000', `maxhealth`='25000' WHERE `entry` IN (31208); + +replace into `spell_area` (`spell`, `area`, `quest_start`, `quest_start_active`, `quest_end`, `aura_spell`, `racemask`, `gender`, `autocast`) values('35481','4100','0','0','0','0','0','1','1'); +replace into `spell_area` (`spell`, `area`, `quest_start`, `quest_start_active`, `quest_end`, `aura_spell`, `racemask`, `gender`, `autocast`) values('35480','4100','0','0','0','0','0','0','1'); + +UPDATE `instance_template` SET `script` = 'instance_culling_of_stratholme' WHERE map=595; + +update `creature_template` set `AIName`='', `Scriptname`='npc_mike' where `entry` in (30571); +update `creature_template` set `AIName`='', `Scriptname`='npc_chromi_start' where `entry` in (26527); +update `creature_template` set `AIName`='', `Scriptname`='npc_roger' where `entry` in (27903); +update `creature_template` set `AIName`='', `Scriptname`='npc_morigan' where `entry` in (27877); +update `creature_template` set `AIName`='', `Scriptname`='npc_stratholme_crates' where `entry` in (30996); +update `creature_template` set `AIName`='', `Scriptname`='npc_jena' where `entry` in (27885); +update `creature_template` set `AIName`='', `Scriptname`='npc_malcolm' where `entry` in (27891); +update `creature_template` set `AIName`='', `Scriptname`='npc_bartleby_cs' where `entry` in (27907); +update `creature_template` set `AIName`='', `Scriptname`='npc_chromi_middle' where `entry` in (27915); +update `creature_template` set `AIName`='', `Scriptname`='npc_uther' where `entry` in (26528); update `creature_template` set `AIName`='', `Scriptname`='npc_arthas' where `entry` in (26499); -update `creature_template` set `AIName`='', `Scriptname`='dark_conversion' where `entry` in (31127, 31126, 28167, 28169); -update `creature_template` set `AIName`='', `Scriptname`='npc_patricia' where `entry` in (31028); -update `creature_template` set `AIName`='', `Scriptname`='npc_time_riftCS' where `entry` in (28409); -update `creature_template` set `AIName`='', `Scriptname`='boss_salramm' where `entry` in (26530); -update `creature_template` set `AIName`='', `Scriptname`='boss_meathook' where `entry` in (26529); -update `creature_template` set `AIName`='', `Scriptname`='boss_lord_epoch' where `entry` in (26532); -update `creature_template` set `AIName`='', `Scriptname`='boss_malganis' where `entry` in (26533); -update `instance_template` set `script` = 'instance_culling_of_stratholme' WHERE map=595; -/*-- Spawning Salramm in the instance -- -INSERT INTO creature VALUES (4458724,26530,595,1,1,0,0,2174.32,1307.32,131.866,4.32264,25,0,0,337025,62535,0,0); --- heroic version -- -INSERT INTO creature VALUES (4458725,26530,595,2,1,0,0,2178.93,1307.89,131.526,4.12069,25,0,0,421281,62535,0,0); --- Spawning Meathook in the instance -- -INSERT INTO creature VALUES (4458738,26529,595,1,1,0,0,2351.43,1218.03,130.078,4.64621,25,0,0,337025,0,0,0); --- heroic version -- -INSERT INTO creature VALUES (4458739,26529,595,2,1,0,0,2350.42,1215.31,130.23,4.76314,25,0,0,421281,0,0,0); --- Spawning Lord Epoch in the instance -- -INSERT INTO creature VALUES (4458740,26532,595,1,1,0,1820,2446.25,1111.97,148.077,3.37779,25,0,0,337025,41690,0,0); --- heroic version -- -INSERT INTO creature VALUES (4458741,26532,595,2,1,0,1820,2446.17,1111.64,148.076,3.25517,25,0,0,421281,41690,0,0); --- Spawning Malganis in the instance -INSERT INTO creature VALUES (4459981,26533,595,1,1,0,0,2298.33,1501.03,128.362,5.11213,25,0,0,404430,41690,0,0); --- heroic version -- -INSERT INTO creature VALUES (4459615,26533,595,2,1,0,0,2298.9,1502.32,128.361,5.21301,25,0,0,505538,41690,0,0); -*/ -update `creature` set `spawntimesecs`='3600' where `id` in (31127, 31126, 28167, 28169); - -DELETE FROM `creature` WHERE (`guid`=4456649); -INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (4456649, 26499, 595, 1, 0, 0, 1920.87, 1287.12, 142.935, 6.25562, 25, 0, 0, 44100, 7988, 0, 0); - -DELETE FROM `creature` WHERE (`guid`=4456653); -INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (4456653, 26497, 595, 1, 0, 0, 1895.48, 1292.66, 143.706, 0.023475, 25, 0, 0, 100800, 88140, 0, 0); - -DELETE FROM `gameobject_template` WHERE (`entry`=188686); -INSERT INTO `gameobject_template` (`entry`, `type`, `displayId`, `name`, `castBarCaption`, `faction`, `flags`, `size`, `data0`, `data1`, `data2`, `data3`, `data4`, `data5`, `data6`, `data7`, `data8`, `data9`, `data10`, `data11`, `data12`, `data13`, `data14`, `data15`, `data16`, `data17`, `data18`, `data19`, `data20`, `data21`, `data22`, `data23`, `ScriptName`) VALUES (188686, 0, 7831, 'Doodad_LD_hidden_door_room01', '', 1375, 6553632, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ''); - -DELETE FROM `gameobject_template` WHERE (`entry`=187711); -INSERT INTO `gameobject_template` (`entry`, `type`, `displayId`, `name`, `castBarCaption`, `faction`, `flags`, `size`, `data0`, `data1`, `data2`, `data3`, `data4`, `data5`, `data6`, `data7`, `data8`, `data9`, `data10`, `data11`, `data12`, `data13`, `data14`, `data15`, `data16`, `data17`, `data18`, `data19`, `data20`, `data21`, `data22`, `data23`, `ScriptName`) VALUES (187711, 0, 3631, 'Crusaders\' Square Gate', '', 1375, 6553632, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ''); - -DELETE FROM `gameobject_template` WHERE (`entry`=187723); -INSERT INTO `gameobject_template` (`entry`, `type`, `displayId`, `name`, `castBarCaption`, `faction`, `flags`, `size`, `data0`, `data1`, `data2`, `data3`, `data4`, `data5`, `data6`, `data7`, `data8`, `data9`, `data10`, `data11`, `data12`, `data13`, `data14`, `data15`, `data16`, `data17`, `data18`, `data19`, `data20`, `data21`, `data22`, `data23`, `ScriptName`) VALUES (187723, 0, 3631, 'Crusaders\' Square Gate', '', 1375, 6553632, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ''); - -update `gameobject` set `state` = '1' where `id` in (187711); -update `gameobject` set `spawntimesecs` = '-604800', `state` = '0' where `id` in (190663); -UPDATE `gameobject_template` SET faction = 0 WHERE entry= 190663; -/* -UPDATE `creature` set `curhealth` = '8600' where `id`=28167; -UPDATE `creature` set `curhealth` = '8600' where `id`=28169; -UPDATE `creature` set `curhealth` = '15000' where `id`=27737; -UPDATE `quest_template` set `SpecialFlags` = '1' where `entry`=13151; -*/ +update `creature_template` set `AIName`='', `Scriptname`='' where `entry` in (26533); +update `creature_template` set `AIName`='', `Scriptname`='npc_arthas_priest' where `entry` in (27747); +update `creature_template` set `AIName`='', `Scriptname`='npc_arthas_marine' where `entry` in (27745); +UPDATE `creature_template` SET `AIName`='', `Scriptname`='npc_dark_conversion' WHERE `entry` IN (31127, 31126, 28167, 28169); +update `creature_template` set `AIName`='', `Scriptname`='npc_cs_gnoul' where `entry` in (28249); +update `creature_template` set `AIName`='', `Scriptname`='npc_cs_necromancer' where `entry` in (28200); +update `creature_template` set `AIName`='', `Scriptname`='npc_cs_field' where `entry` in (27734); +update `creature_template` set `AIName`='', `Scriptname`='npc_cs_acolyte' where `entry` in (27731); +update `creature_template` set `AIName`='', `Scriptname`='npc_cs_butcher' where `entry` in (27736); +UPDATE `creature_template` SET `AIName`='', `Scriptname`='boss_meathook' WHERE `entry` IN (26529); +UPDATE `creature_template` SET `AIName`='', `Scriptname`='boss_salramm' WHERE `entry` IN (26530); +UPDATE `creature_template` SET `AIName`='', `Scriptname`='npc_salramm_gnoul' WHERE `entry` IN (27733); +UPDATE `creature_template` SET `AIName`='', `Scriptname`='boss_lord_epoch' WHERE `entry` IN (26532); +UPDATE `creature_template` SET `AIName`='', `Scriptname`='boss_malganis' WHERE `entry` IN (26533); +UPDATE `creature_template` SET `AIName`='', `Scriptname`='npc_time_riftCS' WHERE `entry` IN (28409); +UPDATE `creature_template` SET `AIName`='', `Scriptname`='boss_infinite_corruptor' WHERE `entry` IN (32273); + +DELETE FROM `npc_gossip` WHERE (`npc_guid`=115298); + +REPLACE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('58825', '1', '27733'); + +DELETE FROM `creature` WHERE `id` in (27731); +DELETE FROM `creature` WHERE `id` in (27734); +DELETE FROM `creature` WHERE `id` in (28249); +DELETE FROM `creature` WHERE `id` in (27736); + +DELETE FROM `creature` WHERE `id` in (27915); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (9777887, 27915, 595, 3, 1, 0, 0, 1812.49, 1284.81, 142.248, 4.03364, 300, 0, 0, 17010, 0, 0, 0); + +DELETE FROM `creature` WHERE `id` in (30571); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (9777888, 30571, 595, 3, 1, 27139, 0, 1549.61, 575.545, 100.052, 4.16253, 360, 0, 0, 8982, 0, 0, 0); + +DELETE FROM `creature` WHERE `id` in (26499); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (138007, 26499, 595, 3, 1, 0, 1613, 1920.87, 1287.12, 142.935, 6.25562, 43200, 0, 0, 44100, 7988, 0, 0); + +DELETE FROM `creature` WHERE `id` in (26497); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (9337048, 26497, 595, 3, 1, 0, 1221, 1896.39, 1292.91, 143.711, 0.016332, 25, 5, 0, 100800, 88140, 0, 0); + +DELETE FROM `creature` WHERE `id` in (26528); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (9777889, 26528, 595, 3, 1, 0, 1819, 1761.42, 1285.75, 139.945, 4.93874, 25, 5, 0, 126000, 59910, 0, 0); + +DELETE FROM `creature` WHERE `id` in (27891); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (9797890, 27891, 595, 3, 1, 0, 0, 1603.38, 805.988, 123.272, 1.90688, 25, 5, 0, 8982, 0, 0, 0); + +DELETE FROM `creature` WHERE `id` in (27892); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (9797891, 27892, 595, 3, 1, 0, 0, 1602.3, 809.385, 123.454, 5.02884, 25, 5, 0, 8982, 0, 0, 0); + +DELETE FROM `creature` WHERE `id` in (27884); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (9777892, 27884, 595, 3, 1, 24901, 0, 1635.81, 723.155, 113.562, 3.21455, 360, 0, 0, 8982, 0, 0, 0); + +DELETE FROM `creature` WHERE `id` in (32273); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (9798216, 32273, 595, 2, 1, 0, 1839, 2330.93, 1275.59, 132.848, 3.60489, 25, 5, 0, 417911, 0, 0, 0); + +DELETE FROM `creature` WHERE `id` in (28439); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (9798218, 28439, 595, 2, 1, 0, 0, 2336.56, 1277.9, 132.885, 3.47923, 25, 5, 0, 1, 0, 0, 0); diff --git a/addition/717_culling_of_stratholme_scriptdev2.sql b/addition/717_culling_of_stratholme_scriptdev2.sql index b4ecfef78..2b0f75967 100644 --- a/addition/717_culling_of_stratholme_scriptdev2.sql +++ b/addition/717_culling_of_stratholme_scriptdev2.sql @@ -1,157 +1,216 @@ +DELETE FROM `script_texts` WHERE `comment` = 34587; DELETE FROM `script_texts` WHERE `comment` = 26499; -DELETE FROM `script_texts` WHERE `entry` BETWEEN -1594177 AND -1594070 ; - -INSERT INTO `script_texts` (`entry`,`content_default`,`content_loc8`,`sound`,`type`,`language`,`emote`,`comment`) VALUES -(-1594071, 'I\'m glad you could make it! Uther.','Я рад, что ты пришел! Утер.', 12828,0,0,1, '26499'), -(-1594072, 'Watch your tone, Boy. You may be the prince, but I\'m still your superrior as a paladin.','Следи за своим тоном, юноша. Хоть ты и принц, но как паладин ты все еще находишься под моим командованием.', 12839,0,0,25, '26499'), -(-1594073, 'As I could forget. Listen Uther, There is somthing about the plague you should know.','Как будто я не помню. Послушай Утер я должен рассказать тебе кое что про чуму.',12829,0,0,0, '26499'), -(-1594074, 'Oh no ... We are too late ... These people have ben infected. They may look fine now, but this is just mater of time before they will turn into the undead.','О нет... Мы опоздали... Все эти люди заражены чумой. Сейчас это еще не заметно, но скоро все они превратяся в нежить.', 12830,0,0,1, '26499'), -(-1594075, 'What?','Что?', 12840,0,0,5, '26499'), -(-1594076, 'This entire city must be purged.','Весь город должен быть очищен.', 12831,0,0,1, '26499'), -(-1594077, 'How can you even consider that? There got be some other way?','Как ты мог даже подумать об этом? Должен быть какой то другой путь?', 12841,0,0,1, '26499'), -(-1594078, 'Damn it Uther! As your future king, I order you to purge this city.','Проклятие Утер! Как будущий король я приказываю тебе очистить этот город.',12832,1,0,5, '26499'), -(-1594079, 'You are not my king yet boy.You know I whould obey that command ,even if you were!','Пока ты еще не король юноша. Но этот приказ я не выполнил бы будь ты хоть трижды королем!',12842,1,0,22, '26499'), -(-1594080, 'Then I consider this as an act of treason.','Тогда я буду расценивать это как измену.', 12833,0,0,0, '26499'), -(-1594081, 'Treason? You lost your mind Arthas?','Измену? Ты совсем лишился рассудка Артас?', 12843,0,0,5, '26499'), -(-1594082, 'Have I? Lord Uther. By my right of succession and suvenerity of my crown, I\'m here to releave you from command, and susspend your paladins from the service.','Неужели? Лорд Утер. Властью данной мне по праву наследования, я отстраняю вас от командования, и освобождаю от службы ваших паладинов.', 12834,0,0,1, '26499'), -(-1594083, 'Arthas? You can not just ...','Артас? Ты не можешь так просто...', 12837,0,0,1, '26499'), -(-1594084, 'It\'s done! Those of you who have will to save this land follow me!, the rest of you get out of my sight.!','Это уже сделано! Те из вас, кто действительно хочет спасти эту землю - за мной, остальные прочь с глаз моих.', 12835,0,0,0, '26499'), -(-1594085, 'You have crossed terible treshold, Arthas.','Ты пересек опасную черту, Артас.', 12844,0,0,25, '26499'), -(-1594086, 'Jaina?','Джайна?', 12836,0,0,1, '26499'), -(-1594087, 'I\'m sorry,Arthas , I can\'t watch you do this.','Прости Артас, но я не могу смотреть на это.', 12838,0,0,1, '26499'), -(-1594088, 'Take position here, I\'ll will lead a small force in stratholm and start the culling. We must contain and purge the infected people for the sake all of Lordaeron.','Обустройте позицию тут, а я пока поведу небольшой отряд в стратхольм и начну очищение. Мы должны изолировать и уничтожить зараженных жителей ради всего Лордаэрона.', 14327,0,0,1, '26499'), -(-1594089, 'Everyone looks ready! Remember these people are all infected with the plague, and they will die soon. We need to purge Stratholm and protect the remain of Lordaeron from the Scourge. Let\'s go.','Похоже все готовы! Помните эти люди заражены чумой и скоро умрут. Мы должны очистить Стратхольм и защитить Лордаэрон от Плети. Вперед.', 14293,0,0,1, '26499'), -(-1594090, 'Greetings to you my lord. How we can help?','Приветствую вас милорд. Чем вы можете помочь?', 0,0,0,1, '26499'), -(-1594091, 'I can help you, only with a clean death.','Я могу помочь вам лишь быстрой смертью.', 14294,0,0,0, '26499'), -(-1594092, 'Help our prince has gone mad ...','Помогите наш принц сошел с ума...', 0,0,0,0, '26499'), -(-1594093, 'This is only the beginning ..','Это только начало...', 14295,0,0,1, '26499'), -(-1594094, 'Yes. This is the beginning! I have ben waiting for you young Prince. Ahh, I\'m Mal\'Ganis.','Да. Это начало! Я ждал тебя юнный принц. Я Малганис.', 14410,0,0,1, '26499'), -(-1594095, 'As you can see your people are now my people.I will now turn the city Household by household, Until the flame of life has ben snufed out ,forever ..','Как видишь, твои люди отныне принадлежат мне. Дом за домом я порабощу этот город и огонь жизни угаснет здесь навсегда...',14411,0,0,1, '26499'), -(-1594096, 'I won\'t allow it Mal\'Ganis. Beter these people die by my hand, than they become your slaves and serv you after death.','Я не допущу этого Малганис. Лудше эти люди погибнут от моей руки, чем станут твоими рабами после смерти.',14296,0,0,5, '26499'), -(-1594097, 'Mal\'Ganis will send some of his scourge minions to interfer with us. Those with you with strong stell and magic should go forward and destroy them. I will lead the remaining forces for purging stratholme of the infected.','Малганис отправит своих прислужников из плети навстречу нам. Опытные воины и маги ступайте и уничтожте врагов. Я возглавлю оставшиеся войска в деле очищения стратхольма от заразы.',14885,0,0,1, '26499'), -(-1594098, 'Champions meet me at the Town Hall at once. We must take the fight with Mal\'Ganis !','Герои поспешите вcтретимся у городской ратуши. Мы должны сразиться с Малганисом на его территории!',14297,0,0,1, '26499'), -(-1594099, 'Follow me, I know the way through.','Идите за мной, я знаю дорогу.',14298,0,0,1, '26499'), -(-1594100, 'Calm citizens. Everything is normal. To go home ... Aaaaaa ... What is it?','Успокойтесь граждане. Все нормально. Расходитесь по домам... Аааааа... Что это?',0,0,0,1, '26499'), -(-1594101, 'Help...','Помогите...',0,0,0,0, '26499'), -(-1594102, 'Prince Arthas, what are you doing?','Принц Артас, что вы делаете?',0,0,0,0, '26499'), -(-1594103, 'Nenad ... You our prince, you\'re a defender of Lordaeron ....','Не надо! Вы же наш принц, вы же защитник Лордаэрона...',0,0,0,0, '26499'), -(-1594104, 'Paschady Milord ...','Пощады, милорд!',0,0,0,0, '26499'), -(-1594105, 'What we have done to you?','Что мы вам сделали?',0,0,0,0, '26499'), -(-1594106, '','<Плач>',9676,0,0,18, '26499'), -(-1594107, 'Royal troops attacked us, who can escape ...','Королевские войска напали на нас, спасайся кто может...',0,1,0,0, '26499'), -(-1594108, 'What have you done? What is happening here?','Что вы наделали? Что здесь происходит?',0,0,0,0, '26499'), -(-1594109, 'For what?','За что?',0,0,0,0, '26499'), -(-1594110, 'Let\'s play?',13428,'Поиграем?',0,0,0, '26499'), -(-1594111, 'New toys.','Новые игрушки.',13429,1,0,0, '26499'), -(-1594112, 'This ... Not ... Fun ...','Это... Не... Смешно...',13433,1,0,0, '26499'), -(-1594113, 'Boring ...','Скучно...',13430,1,0,0, '26499'), -(-1594114, 'Why do not you move?','Почему ты не идешь?',13431,1,0,0, '26499'), -(-1594115, 'Come on, I did not finish ...','Вставай я не закончил...',13432,1,0,0, '26499'), -(-1594116, 'Prince Arthas Menethil, On this day, a powerful darknes has taken hold of your soul. The death that you had destined on others by visiting others,On this day will be your own.','Принц Артас Менетил, в этот самый день могущественное зло поглотило твою душу. Смерть которую ты должен был принести другим, сегодня придет за тобой.',13408,0,0,0, '26499'), -(-1594117, 'I\'m doing what i have to , to save Lordaeron niether your words or actions will stop me.','Я делаю для Лордаэрона то, что должен, и никакие слова и поступки меня не остановят.',14309,0,0,5, '26499'), -(-1594118, 'We\'ll see about that young prince ...','Ну что ж, посмотрим, юный принц...',13409,0,0,0, '26499'), -(-1594119, '???????? ......','Аааааааа......',13416,0,0,0, '26499'), -(-1594120, 'You have no future ...','У тебя нет будущего...',13413,1,0,0, '26499'), -(-1594121, 'The hour of our greatest triumph ..','Пробил час нашего величайшего триумфа...',13414,1,0,0, '26499'), -(-1594122, 'You were destined to be defeated ...','Тебе было суждено потерпеть поражение...',13415,1,0,0, '26499'), -(-1594123, 'Tic,tac,tic,tac...','Тик - так... Тик - так...',13410,1,0,0, '26499'), -(-1594124, 'Too slow ...','Слишком медленно...',13411,1,0,0, '26499'), -(-1594125, 'It\'s time to end ...','Пора заканчивать...',13412,1,0,0, '26499'), -(-1594126, 'Do not touch me ...','Не трогайте меня...',0,1,0,0, '26499'), -(-1594127, 'You are a monster, not the prince ...','Вы чудовище, а не Принц...',0,1,0,0, '26499'), -(-1594128, 'Run .....','Бежим...',0,1,0,0, '26499'), -(-1594129, 'Remarcable late heroes of Lordaeron! It\'s time the dead ...','Cлишком поздно, герои Лордаэрона! Пришло время мертвых...',0,1,0,0, '26499'), -(-1594130, 'Aaaaaa fun ....','Аааааа развлечемся...',0,1,0,0, '26499'), -(-1594131, 'You are just a part of the master plan ...','Вы всего лишь часть плана хозяина...',0,1,0,0, '26499'), -(-1594132, 'The fun is just beginning!','Веселье только начинается!',0,1,0,0, '26499'), -(-1594133, 'Aaaa quality material ...','Аааа качественный материал...',0,1,0,0, '26499'), -(-1594134, 'Do not worry I\'ll find where you adapt ...','Не волнуйся, я найду куда тебя приспособить...',0,1,0,0, '26499'), -(-1594135, 'I need a sample!','Мне нужен образец!',0,1,0,0, '26499'), -(-1594136, 'So much power ... It will be my ....','Столько силы... Она будет моей...',0,1,0,0, '26499'), -(-1594137, 'Your flesh attached to you!','Твоя плоть предает тебя!',0,1,0,0, '26499'), -(-1594138, 'Familiarize yourself with my friends ...','Познакомтесь с моими друзьями...',0,1,0,0, '26499'), -(-1594139, 'Living Stratholm Meet your savior ...','Жители Стратхольма, встречайте ваших спасителей...',0,1,0,0, '26499'), -(-1594140, 'Boom ... Ha-ha-ha-ha ...','Бум... Ха-ха-ха-ха...',0,1,0,0, '26499'), -(-1594141, 'Blood ... Destruction ... Marvelous ...','Кровь... Разрушение... Восхитительно...',0,1,0,0, '26499'), -(-1594142, 'Yes! I am glad that I could get you through before the plague!','Да! Я рад, что я смог добраться сюда раньше чумы!',14299,0,0,1, '26499'), -(-1594143, 'What is this sorrcery?','Что это за колдовство?',14300,0,0,0, '26499'), -(-1594144, 'Mal\'Ganis it apers to have more thans scourge on his arsenal.We should do haste.','Кажется, что у Малганиса в распорежении есть еще кое что кроме Плети. Давайте поспешим.',14301,0,0,0, '26499'), -(-1594145, 'Again, that sorrcery, be prepared for anything.','Снова черная магия. Будьте готовы ко всему.',14302,0,0,0, '26499'), -(-1594146, 'Let\'s move on!.','Идем дальше.',14303,0,0,0, '26499'), -(-1594147, 'Watch your backs they surrounded Us in this hole...','Будьте начеку наc окружили в этой дыре...',14304,0,0,0, '26499'), -(-1594148, 'Mal\'Ganis is not making this easy ...','Малганис не собирается облегчить нам жизнь...',14305,0,0,0, '26499'), -(-1594149, 'They are very persistent','Они упрямы.',14306,0,0,0, '26499'), -(-1594150, 'What\'s more, he put me on the way?','Что еще он поставит у меня на пути?',14307,0,0,0, '26499'), -(-1594151, 'The quickest way to Mal\'Ganis lays behind those bookshelf ahead','Кратчайший путь к Малганису находится за тем шкафом.',14308,0,0,0, '26499'), -(-1594152, 'This will take only a moment.','Это займет совсем не много времени.',14310,0,0,0, '26499'), -(-1594153, 'I\' relieved that secret passage still works!','Слава свету, что потайной ход еще работает!',14311,0,0,0, '26499'), -(-1594154, 'Let\'s go through this place as quick as possible. If the undead won\'t gonna kill us the fire might','Давайте пройдем этот участок как можно быстрее. Если мы не погибнем от нежити, то можем погибнуть от этого огня.',14312,0,0,0, '26499'), -(-1594155, 'Rest a moment here clean your luns, but be ready we must go soon again.','Отдышитесь немного, но имейте ввиду - нам скоро снова в путь.',14313,0,0,0, '26499'), -(-1594156, 'That\'s enough we have to move again , Mal\'Ganis awaits.','Отдых окончен, надо идти. Малганис ждет.',14314,0,0,0, '26499'), -(-1594157,'Atlast , some luck! it looks like that Market Row not go cut by the fire. Mal\'Ganis it\'s supoused to be in Crussaders of squire, which is just ahead. Tell me whe you\'re ready to move forward.','Наконец нам хоть как то повезло! Огонь еще не добрался до торгового ряда. Малганис должен быть на площади рыцарей, которая находится не далеко от сюда. Скажите мне как будете готовы идти дальше.',14315,0,0,0, '26499'), -(-1594158, 'Yes, Justice will be done.','Да свершится правосудие.',14316,0,0,0, '26499'), -(-1594159, 'It will be a worthy test of Prince Arthas!','Это будет достойное испытание Принц Артас!',14413,1,0,0, '26499'), -(-1594160, 'Too easy ...','Слишком просто...',14416,1,0,0, '26499'), -(-1594161, 'The dark lord is not happy with your intervention ...','Темный повелитель не доволен твоим вторжением...',144107,1,0,0, '26499'), -(-1594162, 'I want Prince Arthas, not you ...','Мне нужен Принц Артас, а не ты...',14418,1,0,0, '26499'), -(-1594163, 'Anak Kiri ...','Анак Кири...',14422,1,0,0, '26499'), -(-1594164, 'My pressure will sweep away the forces of King - Lich ...','Мой натиск сметет силы короля - лича...',14423,1,0,0, '26499'), -(-1594165, 'Your death was in vain tiny mortal ...','Твоя смерть была напрасна, насекомое...',14424,1,0,0, '26499'), -(-1594166, 'Your time has came to an end ...','Твое время вышло...',14425,1,0,0, '26499'), -(-1594167, 'Arrrrhhhh ... I spent too much time in this weak litle shell ...','Аррррхххх... Я и так провел слишком много времени в этой слабой оболочке...',14426,1,0,0, '26499'), -(-1594168, 'Earl Narath ... I Mal\'Ganis .... I am eternal ...','Ирл Нарат... Я малганис.... Я вечен...',14427,1,0,0, '26499'), -(-1594169, 'You will never defeat the Lich - King without my forces! I will have my revenge on him , and you...','Тебе никогда не победить короля - лича без моих войск! Я отомщу и тебе и ему...',14429,1,0,0, '26499'), -(-1594170, 'We are going to finish this right now Mal\'Ganis. Just you and me ...','Мы покончим с этим сейчас же Малганис. Один на один...',14317,0,0,0, '26499'), -(-1594171, 'Your journey just begins young prince. Gather your forces and and meet me at the arctic land of, Northrend! It is there, we\'ll we shall setup the score beetwen us, It is there where your true destiny will unfold.','Твое путешествие начинается юный принц. Собирай свои войска и отправляйся в царство вечных снегов, Нордскол! Там мы уладим все наши дела, там ты узнаешь свою судьбу.',14412,0,0,0, '26499'), -(-1594172, 'I will hunt you till the end of the earth if I have to... Did you heard me? To the end of erth!...','Я отыщу тебя на краю земли... Ты слышешь меня? На краю земли...',14318,1,0,5, '26499'), -(-1594173, 'You performed well on this day! Anything that Mal\'Ganis left behind is yours take it as your reward. Now I need to begin some plans for an expedition into Northrend.','Вы славно сражались сегодня! Все что Малганис оставил тут ваша награда. А мне нужно начинать готовиться к экспедиции в Нордскол.',14319,0,0,5, '26499'), -(-1594174, 'Relax!','Отдохни!',14414,1,0,0, '26499'), -(-1594175, 'You seam tired!','Ты выглядишь усталым!',14415,1,0,0, '26499'), -(-1594176, 'Enogh I have ben waisted my time here . I need to come by in my own world.','Я лишь зря трачу тут свое время. Мне нужно собраться силами в моем родном мире.',14428,1,0,0, '26499'); - +insert into `script_texts` (`entry`,`content_default`,`content_loc8`,`sound`,`type`,`language`,`emote`,`comment`) VALUES +# TAVERN EVENT +(-1557270, 'Hey! Stop rooting around in my cellar! Clear out!', 'Hey! Stop rooting around in my cellar! Clear out!', 0,0,0,1, '34587'), +(-1557271, 'This whole situation seems a bit paranoid, dont you think?', 'This whole situation seems a bit paranoid, dont you think?', 0,0,0,25, '34587'), +(-1557272, 'Orders are orders, if Prince says jump...', 'Orders are orders, if Prince says jump...', 0,0,0,1, '34587'), +(-1557273, 'Its strange order, you cant deny Suspicious food? Under that definition, you should arrest Belfast!', 'Its strange order, you cant deny Suspicious food? Under that definition, you should arrest Belfast!', 0,0,0,1, '34587'), +(-1557274, 'I HEARD THAT! No more ale for you! Not a drop!', 'I HEARD THAT! No more ale for you! Not a drop!', 0,0,0,25, '34587'), +(-1557275, 'Enough, Michael Businnes is hurting enough with this scare as it is. We can use every copper.', 'Enough, Michael Businnes is hurting enough with this scare as it is. We can use every copper.', 0,0,0,274, '34587'), +(-1557276, 'The soldiers are doing important work. The safely of the people is more important, Mal if youre interested in your customers living to spend another day.', 'The soldiers are doing important work. The safely of the people is more important, Mal if youre interested in your customers living to spend another day.', 0,0,0,1, '34587'), +(-1557277, 'I cant argue with that.', 'I cant argue with that.', 0,0,0,1, '34587'), +(-1557278, 'Dont worry too much. By the time I went odd duty, we hadnt a scrap of befouled grain here.', 'Dont worry too much. By the time I went odd duty, we hadnt a scrap of befouled grain here.', 0,0,0,274, '34587'), +(-1557279, 'Thank the Light for that.', 'Thank the Light for that.', 0,0,0,1, '34587'), +# ROGER EVENT +(-1557280, 'Wait, whats that smell?', 'Wait, whats that smell?', 0,0,0,1, '34587'), +(-1557281, 'Cant be me, I took a bath 3 days ago!', 'Cant be me, I took a bath 3 days ago!', 0,0,0,1, '34587'), +(-1557282, 'Oh, close call. Its just the grain here.', 'Oh, close call. Its just the grain here.', 0,0,0,1, '34587'), +(-1557283, 'Wait a second. Grain isnt supposed to smell like THAT! I better go find a guard.', 'Wait a second. Grain isnt supposed to smell like THAT! I better go find a guard.', 0,0,0,1, '34587'), +# MORIGAN EVENT +(-1557284, 'You dont mind me checking out your merchandise for signs of tampering, do you?', 'You dont mind me checking out your merchandise for signs of tampering, do you?', 0,0,0,1, '34587'), +(-1557285, 'No, sir.', 'No, sir.', 0,0,0,1, '34587'), +(-1557286, 'Wait, what is it? Youve been holding out on me, Perelli!', 'Wait, what is it? Youve been holding out on me, Perelli!', 0,0,0,0, '34587'), +(-1557287, 'What are you talking about, Sergeant?', 'What are you talking about, Sergeant?', 0,0,0,1, '34587'), +(-1557288, 'Iam confiscating this suspicious grain, Perelli. We were looking for signs of tampered food, and it would be in your best interest to stay put while Prince Arthas checks this out.', 'Iam confiscating this suspicious grain, Perelli. We were looking for signs of tampered food, and it would be in your best interest to stay put while Prince Arthas checks this out.', 0,0,0,1, '34587'), +(-1557289, 'You have to belive me, Iam innocent!', 'You have to belive me, Iam innocent!', 0,0,0,20, '34587'), +(-1557290, 'Well see about that. Perelli. Well see about that.', 'Well see about that. Perelli. Well see about that.', 0,0,0,1, '34587'), +# JENA EVENT +(-1557291, 'Martha. Iam out of flour for bread. You wouldnt happen to have any grain from that recent, would you?', 'Martha. Iam out of flour for bread. You wouldnt happen to have any grain from that recent, would you?', 0,0,0,1, '34587'), +(-1557292, 'Oh hello, Jena. Of Course you can borrow some grain. Help yourself.', 'Oh hello, Jena. Of Course you can borrow some grain. Help yourself.', 0,0,0,1, '34587'), +(-1557293, 'Thanks. Martha! I owe you one.', 'Thanks. Martha! I owe you one.', 0,0,0,1, '34587'), +(-1557294, 'Martha, somethings wrong with this grain! Some of the Princes soldiers were looking for this. Im going to go look for one.', 'Martha, somethings wrong with this grain! Some of the Princes soldiers were looking for this. Im going to go look for one.', 0,0,0,1, '34587'), +(-1557295, 'Oh, my.', 'Oh, my.', 0,0,0,1, '34587'), +# MALCOLM EVENT +(-1557296, 'Looks like a storms coming in, Scruffy...', 'Looks like a storms coming in, Scruffy...', 0,0,0,0, '34587'), +(-1557297, 'Whats wrong, pal?', 'Whats wrong, pal?', 0,0,0,1, '34587'), +(-1557298, 'What did you find, boy?', 'What did you find, boy?', 0,0,0,0, '34587'), +(-1557299, 'This is no good, Scruffy. Stay here and guard the house. I need to go find a soldier.', 'This is no good, Scruffy. Stay here and guard the house. I need to go find a soldier.', 0,0,0,0, '34587'), +# BARTLEBY EVENT +(-1557300, 'I knew I should have secured the wagon lock better when I was in Andorhal.', 'I knew I should have secured the wagon lock better when I was in Andorhal.', 0,0,0,1, '34587'), +(-1557301, 'This grain shipmend has been nothing but trouble!', 'This grain shipmend has been nothing but trouble!', 0,0,0,1, '34587'), +(-1557302, 'Well, guess I should load everything back into the cart.', 'Well, guess I should load everything back into the cart.', 0,0,0,0, '34587'), +(-1557303, 'Oh, come on! My cart broke, my horse a shoe, and now the cargo goes bad!', 'Oh, come on! My cart broke, my horse a shoe, and now the cargo goes bad!', 0,0,0,1, '34587'), +(-1557304, 'I guess Ill go find the authorites. If Im lucky theyll tell me its the plague and that were all to die!', 'I guess Ill go find the authorites. If Im lucky theyll tell me its the plague and that were all to die!', 0,0,0,1, '34587'), +# ARTHAS INTRO EVENT +(-1594071, 'Glad you could make it, Uther.', 'Я рад, что ты пришел! Утер.', 12828,0,0,1, '34587'), +(-1594072, 'Watch your tone with me boy. You may be the prince, but iam still your superior as a paladin!', 'Следи за своим тоном, юноша. Хоть ты и принц, но как паладин ты все еще находишься под моим командыванием.', 12839,0,0,25, '34587'), +(-1594073, 'As if I could forget. listen, Uther, theres something about the plague you should know...', 'Как будто я не помню. Послушай Утер я должен рассказать тебе кое что про чуму.', 12829,0,0,0, '34587'), +(-1594074, 'Oh, no. Were too late. These people have all been infected! They may look fine now, but its just a matter of time before they turn into the undead!', 'О нет... Мы опоздали... Все эти люди заражены чумой. Сейчас это еще не заметно, но скоро все они превратяся в нежить.', 12830,0,0,1, '34587'), +(-1594075, 'What?', 'Что?', 12840,0,0,5, '34587'), +(-1594076, 'This entire city must be purged.', 'Весь город должен быть очищен.', 12831,0,0,1, '34587'), +(-1594077, 'How can you even consider that? Theres got to be some other way.', 'Как ты мог даже подумать об этом? Должен быть какой то другой путь?', 12841,0,0,1, '34587'), +(-1594078, 'Damn it, Uther! As your future king, I order you to purge this city!', 'Проклятие Утер! Как будущий король я приказываю тебе очистить этот город.', 12832,1,0,5, '34587'), +(-1594079, 'You are not my king yet, boy! Nor would I obey that command even if you were!', 'Пока ты еще не король юноша. Но этот приказ я не выполнил бы будь ты хоть трижды королем!', 12842,1,0,22, '34587'), +(-1594080, 'Then I must consider this an act of treason.', 'Тогда я буду расценивать это как измену.', 12833,0,0,0, '34587'), +(-1594081, 'Treason? Have you lost your mind, Arthas?', 'Измену? Ты совсем лишился рассудка Артас?', 12843,0,0,5, '34587'), +(-1594082, 'Have I? Lord Uther, by my right of succession and the sovereignty of my crown, I hereby relieve you of your commnad and suspend your paladins from service.', 'Неужели? Лорд Утер. Властью данной мне по праву наследования, я отстраняю вас от командования, и освобождаю от службы ваших паладинов. ', 12834,0,0,1, '34587'), +(-1594083, 'Arthas! You cant just...', 'Артас? Ты не можешь так просто...', 12837,0,0,1, '34587'), +(-1594084, 'Its done! those of you who have the will to save this land, follow me! The rest of you... get out of my sight!', 'Это уже сделано! Те из вас кто действительно хочет спасти эту землю за мной, остальные прочь с глаз моих.', 12835,0,0,0, '34587'), +(-1594085, 'Youve just crossed a terrible inreshold, Arthas!', 'Ты пересек опасную черту, артас.', 12844,0,0,25, '34587'), +(-1594086, 'Jaina?', 'Джайна?', 12836,0,0,1, '34587'), +(-1594087, 'Im sorry Arthas. I cant watch you do this.', 'Прости Артас, но я не могу смотреть на это.', 12838,0,0,1, '34587'), +(-1594088, 'Take position here and I will', 'Обустройте позицию тут, а я пока поведу небольшой отряд в стратхольм и начну очищение. Мы должны изолировать и уничтожить зараженных жителей ради всего Лордерона.', 14327,1,0,1, '34587'), +#ARTHAS ENTER IN THE CITY +(-1594089, 'Enveryone looks ready. Remember these people are all infected with the plague and will die soon. We must purge Stratholme to protect the remainder of Lorderon from the Scourge. Lets go!', 'Похоже все готовы! Помните эти люди заражены чумой и скоро умрут. Мы должны очистить Стратхольм и защитить Лордерон от Плети. Вперед.', 14293,0,0,1, '26499'), +(-1594090, 'Prince Arthas, may the light the privail. Many people in the town have begin to tall seriously Ill. Can you help us?', 'Принц Артас, Слава свету. Многие люди в городе будут рады видеть вас. Чем мы вам можем помочь?', 0,0,0,1, '26499'), +(-1594091, 'I can help you only with a clean death.', 'Я могу помочь вам, лишь быстрой смертью.', 14294,0,0,0, '26499'), +(-1594092, 'What? This cant be!', 'Что? Этого не может быть...', 0,0,0,0, '26499'), +(-1594093, 'Oh... My g...', 'О... Мой б...', 0,0,0,0, '26499'), +(-1594094, 'This is begining!', 'Это только начало..', 14295,0,0,1, '26499'), +(-1594095, 'g', 'Да. Это начало! Я ждал тебя юнный принц. Я Малганус.', 14410,0,0,1, '26499'), +(-1594096, 'g', 'Как видишь твои люди отныне принадлежат мне. Дом за домом я порабощу этот город и огонь жизни угаснет здесь на всегда..',14411,0,0,1, '26499'), +(-1594097, 'g', 'Я не допущу этого Малганис. Лудше эти люди погибнут от моей руки, чем станут твоими рабами после смерти.',14296,0,0,5, '26499'), +(-1594098, 'g', 'Малганис отправит своих прислужников из плети навстречу нам. Опытные воины и маги ступайте и уничтожте врагов. Я возглавлю оставшиеся войска в деле очищения стратхольма от заразы.',14885,0,0,1, '26499'), +#MEATHOOK +(-1594110, 'g', 'Поиграем?',13428,0,0,0, '26499'), +(-1594111, 'g', 'Новые игрушки.',13429,1,0,0, '26499'), +(-1594112, 'g', 'Это... Не... Смешно...',13433,1,0,0, '26499'), +(-1594113, 'g', 'Скучно...',13430,1,0,0, '26499'), +(-1594114, 'g', 'Почему ты не двигаться?',13431,1,0,0, '26499'), +(-1594115, 'g', 'Вставай я не закончил...',13432,1,0,0, '26499'), +#SALRAMM +(-1594129, 'g', 'Cлишком поздно герои Лордерона! Пришло время мертвых...',0,1,0,0, '26499'), +(-1594130, 'g', 'Аааааа развлечемся....',0,1,0,0, '26499'), +(-1594131, 'g', 'Вы всего лишь часть плана хозяина...',0,1,0,0, '26499'), +(-1594132, 'g', 'Веселье только начинается!',0,1,0,0, '26499'), +(-1594133, 'g', 'Аааа качественный материал...',0,1,0,0, '26499'), +(-1594134, 'g', 'Не волнуйся я найду куда тебя приспособить...',0,1,0,0, '26499'), +(-1594135, 'g', 'Мне нужен образец!',0,1,0,0, '26499'), +(-1594136, 'g', 'Столько силы... Она будет моей....',0,1,0,0, '26499'), +(-1594137, 'g', 'Твоя плоть придает тебя!',0,1,0,0, '26499'), +(-1594138, 'g', 'Познакомтесь с моими друзьями...',0,1,0,0, '26499'), +(-1594139, 'g', 'Жители Стратхольма встречайте ваших спасителей...',0,1,0,0, '26499'), +(-1594140, 'g', 'Бум... Ха-ха-ха-ха...',0,1,0,0, '26499'), +(-1594141, 'g', 'Кровь... Разрушение... Восхитительно...',0,1,0,0, '26499'), +#ARTHAS - HOUSE +(-1594142, 'g', 'Герои поспешите вcтретимся у городской ратуши. Мы должны сразиться с Малганисом на его территории!',14297,1,0,0, '26499'), +(-1594143, 'g', 'Идите за мной я знаю дорогу.',14298,0,0,1, '26499'), +(-1594144, 'Ah, Youve finaly arrived Prince Arthas. Youre here just in the nick of time.', 'Ах... Наконец вы прибыли Принц Артас. Вы как раз во время.',0,0,0,1, '26499'), +(-1594145, 'g', 'Да! Я рад, что я смог добраться сюда раньше чумы!',14299,0,0,1, '26499'), +(-1594146, 'g', 'Что это за магия?',14300,0,0,0, '26499'), +(-1594147, 'Theres no need for you in understand Arthas. All you need to do is die!', 'Этого не нужно вам понимать Артас. Все что тебе только нужно сделать это умереть!',0,0,0,11, '26499'), +(-1594148, 'g', 'Кажется, что у Малганиса в распорежении есть еще кое что кроме Плети. Давайте поспешим.',14301,0,0,0, '26499'), +(-1594149, 'g', 'Снова черная магия будьте готовы ко всему.',14302,0,0,0, '26499'), +(-1594150, 'g', 'Идем дальше.',14303,0,0,0, '26499'), +(-1594151, 'g', 'Будьте начеку наc окружили...',14304,0,0,0, '26499'), +(-1594152, 'g', 'Малганис не собирается облегчить нам жизнь...',14305,0,0,0, '26499'), +(-1594153, 'g', 'Они упрямы.',14306,0,0,0, '26499'), +(-1594154, 'g', 'Что еще он поставит у меня на пути?',14307,0,0,0, '26499'), +(-1594155, 'g', 'Принц Артас Менетил, в этот самый день могущественное зло поглотило твою душу. Смерть которую ты должен был принести другим, сегодня придет за тобой.',13408,0,0,0, '26499'), +(-1594156, 'g', 'Я делаю для Лордерона то, что должен, и никакие слова и поступки меня не остановят.',14309,0,0,5, '26499'), +(-1594157, 'g', 'Ну что ж посмотрим юный принц...',13409,0,0,0, '26499'), +#Epoch +(-1594119, 'g', 'Аааааааа......',13416,0,0,0, '26499'), +(-1594120, 'g', 'У тебя нет будущего...',13413,1,0,0, '26499'), +(-1594121, 'g', 'Пробил час нашего величайшего триумфа..',13414,1,0,0, '26499'), +(-1594122, 'g', 'Тебе было суждено потерпеть поражение...',13415,1,0,0, '26499'), +(-1594123, 'g', 'Тик - так... Тик - так...',13410,1,0,0, '26499'), +(-1594124, 'g', 'Слишком медленно...',13411,1,0,0, '26499'), +(-1594125, 'g', 'Пора заканчивать...',13412,1,0,0, '26499'), +#Street +(-1594158, 'g', 'Это займет совсем не много времени.',14310,0,0,0, '26499'), +(-1594159, 'g', 'Слава свету, что потайной ход еще работает!',14311,0,0,0, '26499'), +(-1594160, 'g', 'Давайте пройдем этот участок как можно быстрее. Если мы не погибнем от нежити, то можем погибнуть от этого огня.',14312,0,0,0, '26499'), +(-1594161, 'g', 'Отдышитесь немного, но имейте ввиду нам скоро снова в путь.',14313,0,0,0, '26499'), +(-1594162, 'g', 'Отдых окончен надо идти, Малганис ждет.',14314,0,0,0, '26499'), +(-1594163, 'g', 'Наконец нам хоть как то повезло! Огонь еще не добрался до торгового ряда. Малганис должен быть на площади рыцарей, которая находится не далеко от сюда. Скажите мне как будете готовы идти дальше.',14315,0,0,0, '26499'), +(-1594164, 'g', 'Да свершится правосудие.',14316,0,0,0, '26499'), +#malganis +(-1594170, 'g', 'Это будет достойное испытание Принц артас!',14413,1,0,0, '26499'), +(-1594171, 'g', 'Слишком просто...',14416,1,0,0, '26499'), +(-1594172, 'g', 'Темный повелитель не доволен твоим вмешательством...',144107,1,0,0, '26499'), +(-1594173, 'g', 'Мне нужен Принц Артас, а не ты...',14418,1,0,0, '26499'), +(-1594174, 'g', 'Анак Кири...',14422,1,0,0, '26499'), +(-1594175, 'g', 'Мой натиск сметет силы короля - лича...',14423,1,0,0, '26499'), +(-1594176, 'g', 'Твоя смерть была напрасна насекомое...',14424,1,0,0, '26499'), +(-1594177, 'g', 'Твое время вышло...',14425,1,0,0, '26499'), +(-1594178, 'g', 'Аррррхххх... Я и так провел слишком много времени в этой слабой оболочке...',14426,1,0,0, '26499'), +(-1594179, 'g', 'Ирл Нарат... Я малганис.... Я вечен...',14427,1,0,0, '26499'), +(-1594180, 'g', 'Тебе никогда не победить короля - лича без моих войск! Я отомщу и тебе и ему...',14429,1,0,0, '26499'), +(-1594181, 'g', 'Мы покончим с этим сейчас же Малганис. Один на один...',14317,0,0,0, '26499'), +(-1594182, 'g', 'Твое путешествие начинается юный принц. Собирай свои войска и отправляйся в царство вечных снегов, Нордскол! Там мы уладим все наши дела, там ты узнаешь свою судьбу.',14412,0,0,0, '26499'), +(-1594183, 'g', 'Я отыщу тебя на краю земли... Ты слышешь меня? На краю земли...',14318,1,0,5, '26499'), +(-1594184, 'g', 'Вы славно сражались сегодня! Все что Малганис оставил тут ваша награда. А мне нужно начинать готовиться к экспедиции в нордскол.',14319,0,0,5, '26499'), +(-1594185, 'g', 'Отдохни!',14414,1,0,0, '26499'), +(-1594186, 'g', 'Ты выглядишь усталым!',14415,1,0,0, '26499'), +(-1594187, 'g', 'Я лишь зря трачу тут свое время. Мне нужно собраться силами в моем родном мире.',14428,1,0,0, '26499'), +(-1594188, 'g', 'Наконец нам хоть как то повезло! Огонь еще не добрался до торгового ряда. Малганис должен быть на площади рыцарей, которая находится не далеко от сюда. Скажите мне как будете готовы идти дальше.',14315,0,0,0, '26499'); +DELETE FROM script_waypoint WHERE entry=26528; DELETE FROM script_waypoint WHERE entry=26499; INSERT INTO script_waypoint VALUES - (26499, 0, 2099.876,1280.21,138.55, 0, 'WP1'), - (26499, 1, 2120.757,1286.97,136.343, 0, 'Summon Zombie'), - (26499, 2, 2165.073,1279.338,133.40, 18000, 'Battle for Boss 1'), - (26499, 3, 2186.441,1234.445,136.524, 5000, 'Open The Gate 01'), - (26499, 4, 2210.385,1207.550,136.259, 0, 'WP2'), - (26499, 5, 2243.594,1177.705,137.144, 0, 'WP3'), - (26499, 6, 2286.883,1177.262,137.631, 0, 'Summon Zombie and Meathook'), - (26499, 7, 2320.374,1179.954,133.926, 0, 'WP4 Meathook Order'), - (26499, 8, 2354.626,1192.099,130.535, 15000, 'Battle For Boss 2 and Summon Zombie'), - (26499, 9, 2390.256,1204.235,134.125, 0, 'House WP1'), - (26499, 10, 2442.023,1219.205,133.999, 0, 'House WP2'), - (26499, 11, 2446.945,1192.559,149.076, 0, 'House WP3'), - (26499, 12, 2431.264,1189.590,149.076, 0, 'House WP4'), - (26499, 13, 2418.487,1196.059,148.076, 0, 'House WP5'), - (26499, 14, 2401.221,1191.705,148.076, 0, 'House WP6'), - (26499, 15, 2417.584,1121.026,148.082, 0, 'House WP7'), - (26499, 16, 2426.099,1107.088,148.076, 0, 'House WP8 and Summon Boss 3'), - (26499, 17, 2427.063,1107.298,148.076, 20000, 'House WP9 Cinematic'), - (26499, 18, 2428.013,1107.508,148.076, 6000, 'House WP10 Arthas Dialog'), - (26499, 19, 2444.682,1111.705,148.076, 15000, 'Battle For Boss 3'), - (26499, 20, 2457.133,1120.941,150.008, 0, 'House WP11'), - (26499, 21, 2459.694,1127.012,150.008, 0, 'House WP12'), - (26499, 22, 2469.617,1122.274,150.008, 0, 'House WP13'), - (26499, 23, 2470.437,1122.794,150.008, 3000, 'Open Shkaf'), - (26499, 24, 2471.662,1123.077,150.035, 3000, 'Shkaf Dialog'), - (26499, 25, 2483.183,1125.042,149.905, 0, 'Secret WP1'), - (26499, 26, 2487.867,1099.760,144.858, 0, 'Secret WP2'), - (26499, 27, 2498.270,1101.929,144.599, 0, 'Secret WP3'), - (26499, 28, 2492.114,1128.238,139.967, 0, 'Secret WP4'), - (26499, 29, 2500.286,1130.183,139.982, 0, 'Room WP1'), - (26499, 30, 2503.010,1119.241,139.978, 0, 'Room WP2'), - (26499, 31, 2517.820,1122.645,132.066, 0, 'Room WP3'), - (26499, 32, 2540.479,1129.061,130.868, 7000, 'Fire Street WP1'), - (26499, 33, 2568.619,1157.794,126.906, 0, 'Fire Street WP2'), - (26499, 34, 2556.074,1222.058,125.412, 20000, 'Fire Street WP3'), - (26499, 35, 2521.531,1295.209,130.573, 0, 'Fire Street WP4'), - (26499, 36, 2504.362,1348.667,132.944, 0, 'Fire Street WP5'), - (26499, 37, 2450.594,1431.544,131.361, 0, 'Fire Street WP6'), - (26499, 38, 2353.485,1404.839,128.531, 0, 'Knights Street WP1'), - (26499, 39, 2329.882,1406.273,128.013, 0, 'Knights Street WP2'), - (26499, 40, 2329.882,1406.273,128.013, 12000, 'Knights Street WP3'), - (26499, 41, 2327.391,1412.475,127.692, 180000000, 'Knights Street WP4'), - (26499, 42, 2329.882,1406.273,128.013, 0, 'Knights Street WP2'); -- Pustishka -- +#Uther + (26528, 0, 1772.707,1263.927,138.867, 0, 'WP1'), + (26528, 1, 1810.249,1276.557,141.854, 0, 'WP2'), + (26528, 2, 1810.249,1276.557,141.854, 0, 'WP3'), + (26528, 3, 1851.476,1281.370,144.106, 0, 'WP4 - Arthas Move'), + (26528, 4, 1898.716,1288.757,143.461, 90000, 'WP5 - Pause Escort'), + (26528, 5, 1851.476,1281.370,144.106, 0, 'WP6'), + (26528, 6, 1794.357,1272.183,140.558, 0, 'WP7 - Uther Despawn'), +#Arthas + (26499, 0, 1902.959,1295.127,143.388, 0, 'WP1'), + (26499, 1, 1916.657,1287.327,141.946, 0, 'WP2'), + (26499, 2, 1913.726,1287.407,141.927, 10000, 'WP3 - Dialog'), + (26499, 3, 1990.833,1293.391,145.467, 0, 'WP4'), + (26499, 4, 1997.003,1317.776,142.963, 0, 'WP5'), + (26499, 5, 2019.631,1326.084,142.929, 0, 'WP6'), + (26499, 6, 2026.469,1287.088,143.596, 0, 'WP7'), + (26499, 7, 2054.879,1287.505,142.422, 0, 'WP8'), + (26499, 8, 2050.660,1287.333,142.671, 0, 'WP9 - Pause Escort'), + (26499, 9, 2050.652,1287.382,142.672, 12000, 'WP10'), + (26499, 10, 2081.447,1287.770,141.324, 2000, 'wp11'), + (26499, 11, 2099.876,1280.210,138.550, 0, 'WP12'), + (26499, 12, 2120.757,1286.970,136.343, 0, 'WP13'), + (26499, 13, 2165.073,1279.338,133.400, 0, 'WP14'), + (26499, 14, 2186.441,1234.445,136.524, 0, 'WP15'), + (26499, 15, 2210.385,1207.550,136.259, 0, 'WP16'), + (26499, 16, 2243.594,1177.705,137.144, 0, 'WP17'), + (26499, 17, 2286.883,1177.262,137.631, 0, 'WP18'), + (26499, 18, 2320.374,1179.954,133.926, 0, 'WP19'), + (26499, 19, 2354.626,1192.099,130.535, 0, 'WP20'), + (26499, 20, 2363.374,1194.101,131.414, 0, 'WP21 - pause'), + (26499, 21, 2364.749,1194.660,131.672, 3000, 'WP22 - say'), + (26499, 22, 2390.256,1204.235,134.125, 0, 'WP21 - pause escort and start event'), #2500 2396.035 1206.942 134.038 + (26499, 23, 2442.023,1219.205,133.999, 0, 'WP22'), + (26499, 24, 2446.945,1192.559,148.100, 0, 'WP23'), + (26499, 25, 2443.161,1191.442,148.076, 5000, 'WP24 - summon portal'), + (26499, 26, 2428.901,1192.164,148.076, 0, 'WP25'), + (26499, 27, 2418.487,1196.059,148.076, 0, 'WP26'), + (26499, 28, 2401.221,1191.705,148.076, 0, 'WP27'), + (26499, 29, 2409.143,1157.000,148.190, 1000, 'WP28 - trap'), + (26499, 30, 2417.584,1121.026,148.082, 10000, 'WP29'), + (26499, 31, 2420.949,1119.944,148.075, 29000, 'WP30 - pause'), + (26499, 32, 2444.682,1111.705,148.076, 0, 'WP31 - Stop'), + (26499, 33, 2457.133,1120.941,150.008, 0, 'House WP11'), + (26499, 34, 2459.694,1127.012,150.008, 0, 'House WP12'), + (26499, 35, 2469.617,1122.274,150.008, 0, 'House WP13'), + (26499, 36, 2470.437,1122.794,150.008, 3000, 'Open Shkaf'), + (26499, 37, 2471.662,1123.077,150.035, 3000, 'Shkaf Dialog'), + (26499, 38, 2483.183,1125.042,149.905, 0, 'Secret WP1'), + (26499, 39, 2487.867,1099.760,144.858, 0, 'Secret WP2'), + (26499, 40, 2498.270,1101.929,144.599, 0, 'Secret WP3'), + (26499, 41, 2492.114,1128.238,139.967, 0, 'Secret WP4'), + (26499, 42, 2500.286,1130.183,139.982, 0, 'Room WP1'), + (26499, 43, 2503.010,1119.241,139.978, 0, 'Room WP2'), + (26499, 44, 2517.820,1122.645,132.066, 0, 'Room WP3'), + (26499, 45, 2540.479,1129.061,130.868, 7000, 'Fire Street WP1'), + (26499, 46, 2568.619,1157.794,126.906, 0, 'Fire Street WP2'), + (26499, 47, 2556.074,1222.058,125.412, 0, 'Fire Street WP3'), + (26499, 48, 2521.531,1295.209,130.573, 20000, 'Fire Street WP4'), + (26499, 49, 2504.362,1348.667,132.944, 0, 'Fire Street WP5'), + (26499, 50, 2450.594,1431.544,131.361, 0, 'Fire Street WP6'), + (26499, 51, 2353.485,1404.839,128.531, 0, 'Stop Malganis'), + (26499, 52, 2329.882,1406.273,128.013, 0, 'wp'), + (26499, 53, 2300.415,1489.316,128.362, 0, 'wp stop'), + (26499, 54, 2329.882,1406.273,128.013, 0, 'wp'); diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_infinite_corruptor.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_infinite_corruptor.cpp new file mode 100644 index 000000000..4e65beb1d --- /dev/null +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_infinite_corruptor.cpp @@ -0,0 +1,132 @@ +/* Copyright (C) 2006 - 2010 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + +/* ScriptData +SDName: instance_culling_of_stratholme +SD%Complete: ?% +SDComment: by MaxXx2021 +SDCategory: Culling of Stratholme +EndScriptData */ + +#include "precompiled.h" +#include "def_culling_of_stratholme.h" + +enum +{ + SPELL_COURSE = 60588, + SPELL_STRIKE = 60590 +}; + +struct MANGOS_DLL_DECL boss_infinite_corruptorAI : public ScriptedAI +{ + boss_infinite_corruptorAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_creature->SetActiveObjectState(true); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 m_uiStrikeTimer; + uint32 m_uiCourseTimer; + + void Reset() + { + m_uiCourseTimer = 7000; + m_uiStrikeTimer = 5000; + } + + void Aggro(Unit* who) + { + if(m_pInstance) + m_pInstance->SetData(TYPE_BONUS, SPECIAL); + } + + void JustDied(Unit *killer) + { + if(m_pInstance) + m_pInstance->SetData(TYPE_BONUS, DONE); + } + + void KilledUnit(Unit* pVictim) + { + //switch(rand()%3) + // { + // case 0: DoScriptText(SAY_EPOCH_SLAY01, m_creature); break; + // case 1: DoScriptText(SAY_EPOCH_SLAY02, m_creature); break; + // case 2: DoScriptText(SAY_EPOCH_SLAY03, m_creature); break; + // } + } + + void EnterEvadeMode() + { + if(!m_pInstance) return; + + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->LoadCreaturesAddon(); + if(m_pInstance) + m_pInstance->SetData(TYPE_BONUS, IN_PROGRESS); + + if(m_creature->isAlive()) + m_creature->GetMotionMaster()->MoveTargetedHome(); + + m_creature->SetLootRecipient(NULL); + + Reset(); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + + if (m_uiCourseTimer < diff) + { + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + DoCast(target, SPELL_COURSE); + + m_uiCourseTimer = 17000; + }else m_uiCourseTimer -= diff; + + if (m_uiStrikeTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_STRIKE); + + m_uiStrikeTimer = 5000; + }else m_uiStrikeTimer -= diff; + } +}; + +CreatureAI* GetAI_boss_infinite_corruptor(Creature* pCreature) +{ + return new boss_infinite_corruptorAI(pCreature); +} + +void AddSC_boss_infinite_corruptor() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_infinite_corruptor"; + newscript->GetAI = &GetAI_boss_infinite_corruptor; + newscript->RegisterSelf(); +} \ No newline at end of file diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_lord_epoch.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_lord_epoch.cpp index 0bfcc20c5..ec89d84f1 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_lord_epoch.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_lord_epoch.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 @@ -18,94 +18,61 @@ /* ScriptData SDName: instance_culling_of_stratholme SD%Complete: ?% -SDComment: +SDComment: by MaxXx2021 SDCategory: Culling of Stratholme EndScriptData */ - #include "precompiled.h" #include "def_culling_of_stratholme.h" enum { - SPELL_COURSE = 52772, - SPELL_TIME_STOP = 58848, - SPELL_TIME_WARP = 52766, - SPELL_SPIKE_N = 52771, - SPELL_SPIKE_H = 58830, - - SAY_EPOCH_INTRO = -1594116, - SAY_EPOCH_AGGRO = -1594118, - SAY_EPOCH_DEATH = -1594119, - SAY_EPOCH_SLAY01 = -1594120, - SAY_EPOCH_SLAY02 = -1594121, - SAY_EPOCH_SLAY03 = -1594122, - SAY_EPOCH_WARP01 = -1594123, - SAY_EPOCH_WARP02 = -1594124, - SAY_EPOCH_WARP03 = -1594125 + SPELL_COURSE = 52772, + SPELL_TIME_STOP = 58848, + SPELL_TIME_WARP = 52766, + SPELL_SPIKE_N = 52771, + SPELL_SPIKE_H = 58830, + + SAY_EPOCH_DEATH = -1594119, + SAY_EPOCH_SLAY01 = -1594120, + SAY_EPOCH_SLAY02 = -1594121, + SAY_EPOCH_SLAY03 = -1594122, + SAY_EPOCH_WARP01 = -1594123, + SAY_EPOCH_WARP02 = -1594124, + SAY_EPOCH_WARP03 = -1594125 }; - - -/*###### -## boss_lord_epoch -######*/ struct MANGOS_DLL_DECL boss_lord_epochAI : public ScriptedAI { - boss_lord_epochAI(Creature *c) : ScriptedAI(c) - { - m_pInstance = (ScriptedInstance*)c->GetInstanceData(); - m_bIsHeroic = c->GetMap()->IsRegularDifficulty(); + boss_lord_epochAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_creature->SetActiveObjectState(true); Reset(); - } - - ScriptedInstance* m_pInstance; - - uint32 Step; - uint32 Steptim; - uint32 Intro; - bool m_bIsHeroic; - uint32 Spike_Timer; - uint32 Warp_Timer; - uint32 Stop_Timer; - uint32 Course_Timer; - - void Reset() - { - Step = 1; - Steptim = 26000; - Course_Timer = 9300; - Stop_Timer = 21300; - Warp_Timer = 25300; - Spike_Timer = 5300; - } - - void MoveInLineOfSight(Unit *who) - { - if (m_creature->IsWithinDistInMap(who, 10.0f)) - { - if (m_pInstance->GetData(TYPE_ARTHAS_EVENT) == IN_PROGRESS) - Intro = 0; - } - - ScriptedAI::MoveInLineOfSight(who); - } - - void Aggro(Unit* who) - { - DoScriptText(SAY_EPOCH_AGGRO, m_creature); - - if (m_pInstance) - m_pInstance->SetData(TYPE_EPOCH_EVENT, IN_PROGRESS); - } - - void JustDied(Unit *killer) - { - DoScriptText(SAY_EPOCH_DEATH, m_creature); - - if (m_pInstance) - m_pInstance->SetData(TYPE_EPOCH_EVENT, DONE); - } + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroic; + + uint32 Spike_Timer; + uint32 Warp_Timer; + uint32 Stop_Timer; + uint32 Course_Timer; + uint64 m_uiArthasGUID; + + void Reset() + { + Course_Timer = 9300; + Stop_Timer = 21300; + Warp_Timer = 25300; + Spike_Timer = 5300; + } + + void JustDied(Unit *killer) + { + DoScriptText(SAY_EPOCH_DEATH, m_creature); + } void KilledUnit(Unit* pVictim) { @@ -116,99 +83,59 @@ struct MANGOS_DLL_DECL boss_lord_epochAI : public ScriptedAI case 2: DoScriptText(SAY_EPOCH_SLAY03, m_creature); break; } } - - void UpdateAI(const uint32 diff) - { - if(Intro == 0) - { - switch(Step) - { - case 1: - ++Step; - Steptim = 5000; - break; - case 3: - DoScriptText(SAY_EPOCH_INTRO, m_creature); - ++Step; - Steptim = 26000; - break; - case 5: - m_creature->setFaction(14); - ++Step; - Steptim = 1000; - break; - } - } - else - return; - - if (Steptim <= diff) - { - ++Step; - Steptim = 330000; - } - Steptim -= diff; + void UpdateAI(const uint32 diff) + { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - DoMeleeAttackIfReady(); + DoMeleeAttackIfReady(); - if (Course_Timer < diff) + if (Course_Timer < diff) { if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) DoCast(target, SPELL_COURSE); Course_Timer = 9300; - } - else - Course_Timer -= diff; + }else Course_Timer -= diff; - if (Spike_Timer < diff) + if (Spike_Timer < diff) { DoCast(m_creature->getVictim(),m_bIsHeroic ? SPELL_SPIKE_H : SPELL_SPIKE_N); Spike_Timer = 5300; - } - else - Spike_Timer -= diff; + }else Spike_Timer -= diff; - if (Stop_Timer < diff) + if (Stop_Timer < diff) { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) DoCast(target, SPELL_TIME_STOP); - Stop_Timer = 21300; - } - else - Stop_Timer -= diff; + Stop_Timer = 21300; + }else Stop_Timer -= diff; - if (Warp_Timer < diff) + if (Warp_Timer < diff) { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCast(target, SPELL_TIME_WARP); - - switch(rand()%3) - { - case 0: DoScriptText(SAY_EPOCH_WARP01, m_creature); break; - case 1: DoScriptText(SAY_EPOCH_WARP02, m_creature); break; - case 2: DoScriptText(SAY_EPOCH_WARP03, m_creature); break; - } + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + DoCast(target, SPELL_TIME_WARP); + switch(rand()%3) + { + case 0: DoScriptText(SAY_EPOCH_WARP01, m_creature); break; + case 1: DoScriptText(SAY_EPOCH_WARP02, m_creature); break; + case 2: DoScriptText(SAY_EPOCH_WARP03, m_creature); break; + } Warp_Timer = 25300; - } - else - Warp_Timer -= diff; + }else Warp_Timer -= diff; - } + } }; -CreatureAI* GetAI_boss_lord_epoch(Creature *_Creature) +CreatureAI* GetAI_boss_lord_epoch(Creature* pCreature) { - boss_lord_epochAI* lord_epochAI = new boss_lord_epochAI(_Creature); - return (CreatureAI*)lord_epochAI; -}; + return new boss_lord_epochAI(pCreature); +} void AddSC_boss_lord_epoch() { diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_malganis.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_malganis.cpp index 83073658f..3fbd81475 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_malganis.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_malganis.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 @@ -18,118 +18,127 @@ /* ScriptData SDName: instance_culling_of_stratholme SD%Complete: ?% -SDComment: +SDComment: by MaxXx2021 SDCategory: Culling of Stratholme EndScriptData */ - #include "precompiled.h" #include "def_culling_of_stratholme.h" enum { - SAY_MALGANIS_AGGRO = -1594159, - SAY_MALGANIS_ESCAPE02 = -1594169, - SAY_MALGANIS_ESCAPE01 = -1594176, - SAY_MALGANIS_SLAY01 = -1594160, - SAY_MALGANIS_SLAY02 = -1594161, - SAY_MALGANIS_SLAY03 = -1594162, - SAY_MALGANIS_SLAY04 = -1594163, - SAY_MALGANIS_SLAY05 = -1594164, - SAY_MALGANIS_SLAY06 = -1594165, - SAY_MALGANIS_SLAY07 = -1594166, - SAY_MALGANIS_SLEEP01 = -1594174, - SAY_MALGANIS_SLEEP02 = -1594175, - SAY_MALGANIS_Sleep = -1594167, - SAY_MALGANIS_15HP = -1594168, - SAY_MALGANIS_OUTRO = -1594171, - SAY_ARTHAS_OUTRO01 = -1594170, - SAY_ARTHAS_OUTRO02 = -1594172, - SAY_ARTHAS_OUTRO03 = -1594173, - - SPELL_SWAMP_N = 52720, - SPELL_SWAMP_H = 58852, - SPELL_MIND_BLAST_N = 52722, - SPELL_MIND_BLAST_H = 58850, - SPELL_SLEEP_N = 52721, - SPELL_SLEEP_H = 58849, - SPELL_VAMPIRE = 52723 + SAY_MALGANIS_AGGRO = -1594170, + SAY_MALGANIS_SLAY01 = -1594172, + SAY_MALGANIS_SLAY02 = -1594173, + SAY_MALGANIS_SLAY03 = -1594174, + SAY_MALGANIS_SLAY04 = -1594175, + SAY_MALGANIS_SLAY05 = -1594176, + SAY_MALGANIS_SLAY06 = -1594177, + SAY_MALGANIS_SLAY07 = -1594166, + SAY_MALGANIS_SLEEP01 = -1594185, + SAY_MALGANIS_SLEEP02 = -1594186, + SAY_MALGANIS_Sleep = -1594178, + SAY_MALGANIS_15HP = -1594179, + + SPELL_SWAMP_N = 52720, + SPELL_SWAMP_H = 58852, + SPELL_MIND_BLAST_N = 52722, + SPELL_MIND_BLAST_H = 58850, + SPELL_SLEEP_N = 52721, + SPELL_SLEEP_H = 58849, + SPELL_VAMPIRE = 52723 }; -/*###### -## boss_malganis -######*/ struct MANGOS_DLL_DECL boss_malganisAI : public ScriptedAI { - boss_malganisAI(Creature *c) : ScriptedAI(c) - { - m_pInstance = (ScriptedInstance*)c->GetInstanceData(); - m_bIsHeroic = c->GetMap()->IsRegularDifficulty(); + boss_malganisAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_creature->SetActiveObjectState(true); Reset(); - } - - ScriptedInstance* m_pInstance; - - Unit* pTarget; - bool Finish; - bool Sleep; - bool Vampire; - uint32 Phase; - Creature* Malganis; - Creature* Arthas; - bool Outro; - bool m_bIsHeroic; - uint32 Step; - uint32 Steptim; - uint32 Motion; - uint32 Swamp_Timer; - uint32 MindBlast_Timer; - uint32 Sleep_Timer; - uint32 Vampire_Timer; - - void Reset() - { - Sleep = false; - Vampire = false; - Phase = 1; - Outro = false; - Step = 1; - Steptim = 7000; - Motion = 0; - Swamp_Timer = 6300; - MindBlast_Timer = 11300; - Sleep_Timer = 17300; - Vampire_Timer = 30000; - - if(Finish == true) {} - else - Finish = false; - - if(m_pInstance->GetData(TYPE_MALGANIS_EVENT) == DONE || m_pInstance->GetData(TYPE_ARTHAS_EVENT) == DONE) - { - m_creature->SetDeadByDefault(true); - } - } - - void Aggro(Unit* who) - { - DoScriptText(SAY_MALGANIS_AGGRO, m_creature); - if (Creature* pArthas = GetClosestCreatureWithEntry(m_creature, NPC_ARTHAS, 150.0f)) - Arthas = pArthas; - - if (m_pInstance) - { - m_pInstance->SetData(TYPE_MALGANIS_EVENT, IN_PROGRESS); - GameObject* pGate = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GO_MAL_GATE2)); - if (pGate && !pGate->GetGoState()) - { - pGate->SetGoState(GO_STATE_READY); - } - } - } - - void KilledUnit(Unit* pVictim) - { + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroic; + + Unit* pTarget; + bool Sleep; + bool Vampire; + uint32 Phase; + Creature* Malganis; + Creature* Arthas; + + uint32 Swamp_Timer; + uint32 MindBlast_Timer; + uint32 Sleep_Timer; + uint32 Vampire_Timer; + + void Reset() + { + Sleep = false; + Vampire = false; + Swamp_Timer = 6300; + MindBlast_Timer = 11300; + Sleep_Timer = 17300; + Vampire_Timer = 30000; + } + + void AttackStart(Unit* who) + { + if(m_pInstance->GetData(TYPE_PHASE) > 9) return; + + if(m_pInstance->GetData(TYPE_MALGANIS) != IN_PROGRESS) return; + + if(!who || who == m_creature) + return; + + ScriptedAI::AttackStart(who); + } + + void KillCreditMalganis() + { + Map *map = m_creature->GetMap(); + Map::PlayerList const& players = map->GetPlayers(); + if (!players.isEmpty() && map->IsDungeon()) + { + for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) + { + if(Player* pPlayer = itr->getSource()) + pPlayer->KilledMonsterCredit(31006, m_creature->GetGUID()); + } + } + } + + void EnterEvadeMode() + { + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->LoadCreaturesAddon(); + + if(m_pInstance->GetData(TYPE_PHASE) > 9) + { + KillCreditMalganis(); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + if (Creature* pArthas = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_ARTHAS))) + m_creature->SetInCombatWith(pArthas); + } + else + m_creature->RemoveFromWorld(); + + m_creature->SetLootRecipient(NULL); + } + + void Aggro(Unit* who) + { + if(m_pInstance->GetData(TYPE_PHASE) > 9) return; + + DoScriptText(SAY_MALGANIS_AGGRO, m_creature); + } + + void KilledUnit(Unit* pVictim) + { switch(rand()%7) { case 0: DoScriptText(SAY_MALGANIS_SLAY01, m_creature); break; @@ -140,209 +149,87 @@ struct MANGOS_DLL_DECL boss_malganisAI : public ScriptedAI case 5: DoScriptText(SAY_MALGANIS_SLAY06, m_creature); break; case 6: DoScriptText(SAY_MALGANIS_SLAY07, m_creature); break; } - } + } void UpdateAI(const uint32 diff) { - - if(Outro == false) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - DoMeleeAttackIfReady(); - - if (Swamp_Timer < diff) - { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCast(target, m_bIsHeroic ? SPELL_SWAMP_H : SPELL_SWAMP_N); - - Swamp_Timer = 7300; - } - else - Swamp_Timer -= diff; - - if (MindBlast_Timer < diff) - { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCast(target, m_bIsHeroic ? SPELL_MIND_BLAST_H : SPELL_MIND_BLAST_N); - - MindBlast_Timer = 11300; - } - else - MindBlast_Timer -= diff; - - if(m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 40) - { - if(Sleep == false) - { - Sleep = true; - DoScriptText(SAY_MALGANIS_Sleep, m_creature); - } - - if (Sleep_Timer < diff) - { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCast(target, m_bIsHeroic ? SPELL_SLEEP_H : SPELL_SLEEP_N); - switch(rand()%2) - { - case 0: DoScriptText(SAY_MALGANIS_SLEEP01, m_creature); break; - case 1: DoScriptText(SAY_MALGANIS_SLEEP02, m_creature); break; - } - - Sleep_Timer = 17300; - } - else - Sleep_Timer -= diff; - } - - if(m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 25) - { - if(Vampire == false) - { - Vampire = true; - DoScriptText(SAY_MALGANIS_15HP, m_creature); - DoCast(m_creature, SPELL_VAMPIRE); - } - if (Vampire_Timer < diff) - { - DoCast(m_creature, SPELL_VAMPIRE); - Vampire_Timer = 30000; - } - else - Vampire_Timer -= diff; - - } - - if(m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 5) + if(m_pInstance->GetData(TYPE_PHASE) > 9) return; + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + + if (Swamp_Timer < diff) + { + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + DoCast(target, m_bIsHeroic ? SPELL_SWAMP_H : SPELL_SWAMP_N); + + Swamp_Timer = 7300; + }else Swamp_Timer -= diff; + + if (MindBlast_Timer < diff) + { + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + DoCast(target, m_bIsHeroic ? SPELL_MIND_BLAST_H : SPELL_MIND_BLAST_N); + + MindBlast_Timer = 11300; + }else MindBlast_Timer -= diff; + + if(m_creature->GetHealthPercent() < 40.0f) + { + if(Sleep == false) + { + Sleep = true; + DoScriptText(SAY_MALGANIS_Sleep, m_creature); + } + + if (Sleep_Timer < diff) + { + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + DoCast(target, m_bIsHeroic ? SPELL_SLEEP_H : SPELL_SLEEP_N); + switch(rand()%2) { - // adding kill credit for the players to be able to complete the quest - Map *map = m_creature->GetMap(); - Map::PlayerList const& players = map->GetPlayers(); - if (!players.isEmpty() && map->IsDungeon()) - { - for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) - { - if (Player* pPlayer = itr->getSource()) - pPlayer->KilledMonsterCredit(NPC_MALGANIS, m_creature->GetGUID()); - } - } - Finish = true; + case 0: DoScriptText(SAY_MALGANIS_SLEEP01, m_creature); break; + case 1: DoScriptText(SAY_MALGANIS_SLEEP02, m_creature); break; } - if(Arthas) - { - if(Arthas->isDead()) - { - m_creature->setFaction(35); - m_creature->RemoveAllAuras(); - m_creature->DeleteThreatList(); - m_creature->CombatStop(true); - m_creature->InterruptNonMeleeSpells(false); - m_creature->SetVisibility(VISIBILITY_OFF); - } - } - } - - if(Finish == true) - { - switch(Step) - { - case 1: - Outro = true; - Malganis = m_creature; - DoScriptText(SAY_MALGANIS_ESCAPE01, Malganis); - if (Creature* pArthas = GetClosestCreatureWithEntry(m_creature, NPC_ARTHAS, 150.0f)) - Arthas = pArthas; - Arthas->setFaction(35); - Arthas->RemoveAllAuras(); - Arthas->DeleteThreatList(); - Arthas->CombatStop(true); - Arthas->InterruptNonMeleeSpells(false); - Malganis->setFaction(35); - Malganis->RemoveAllAuras(); - Malganis->DeleteThreatList(); - Malganis->CombatStop(true); - Malganis->InterruptNonMeleeSpells(false); - Malganis->GetMotionMaster()->MovePoint(0, 2286.963f, 1484.449f, 127.850f); - Arthas->GetMotionMaster()->MovePoint(0, 2299.289f, 1491.944f, 128.362f); - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Malganis->GetGUID()); - Malganis->SetUInt64Value(UNIT_FIELD_TARGET, Arthas->GetGUID()); - ++Step; - Steptim = 10000; - break; - case 3: - DoScriptText(SAY_MALGANIS_ESCAPE02, Malganis); - ++Step; - Steptim = 10000; - break; - case 5: - DoScriptText(SAY_ARTHAS_OUTRO01, Arthas); - ++Step; - Steptim = 5000; - break; - case 7: - DoScriptText(SAY_MALGANIS_OUTRO, Malganis); - ++Step; - Steptim = 20000; - break; - case 9: - Malganis->SetVisibility(VISIBILITY_OFF); - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, 0); - Arthas->RemoveSplineFlag(SPLINEFLAG_FORWARD); - Arthas->GetMotionMaster()->MovePoint(0, Malganis->GetPositionX(), Malganis->GetPositionY(), Malganis->GetPositionZ()); - ++Step; - Steptim = 3000; - break; - case 11: - DoScriptText(SAY_ARTHAS_OUTRO02, Arthas); - ++Step; - Steptim = 6000; - break; - case 13: - DoScriptText(SAY_ARTHAS_OUTRO03, Arthas); - if (m_pInstance) - { - GameObject* pChest = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GO_MAL_CHEST)); - // this is the npc at who the players can turn in the quest - Arthas->SummonCreature(30997,2296.665f,1502.362f,128.362f,4.961f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,900000); - // those here gonna lock out the instance for the cd time - m_pInstance->SetData(TYPE_ARTHAS_EVENT, DONE); - m_pInstance->SetData(TYPE_MALGANIS_EVENT, DONE); - } - ++Step; - Steptim =11000; - break; - case 15: - Arthas->GetMotionMaster()->MovePoint(0, 2243.311f, 1476.025f, 132.352f); - ++Step; - Steptim =11000; - break; - case 17: - Arthas->SetVisibility(VISIBILITY_OFF); - Outro = false; - ++Step; - Steptim =11000; - break; - } + Sleep_Timer = 17300; + }else Sleep_Timer -= diff; + } + + if(m_creature->GetHealthPercent() < 25.0f) + { + if(Vampire == false) + { + Vampire = true; + DoScriptText(SAY_MALGANIS_15HP, m_creature); + DoCast(m_creature, SPELL_VAMPIRE); } - else - return; - - if (Steptim <= diff) - { - ++Step; - Steptim = 330000; - } - Steptim -= diff; - } + + if (Vampire_Timer < diff) + { + DoCast(m_creature, SPELL_VAMPIRE); + + Vampire_Timer = 30000; + }else Vampire_Timer -= diff; + + } + + if(m_creature->GetHealthPercent() < 5.0f) + { + m_pInstance->SetData(TYPE_PHASE, 10); + m_pInstance->SetData(TYPE_MALGANIS, DONE); + EnterEvadeMode(); + } + + } }; -CreatureAI* GetAI_boss_malganis(Creature *_Creature) +CreatureAI* GetAI_boss_malganis(Creature* pCreature) { - boss_malganisAI* malganisAI = new boss_malganisAI(_Creature); - return (CreatureAI*)malganisAI; -}; + return new boss_malganisAI(pCreature); +} void AddSC_boss_malganis() { diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_meathook.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_meathook.cpp index d6868f476..724d9cd21 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_meathook.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_meathook.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 @@ -18,12 +18,10 @@ /* ScriptData SDName: instance_culling_of_stratholme SD%Complete: ?% -SDComment: +SDComment: by MaxXx2021 SDCategory: Culling of Stratholme EndScriptData */ - - #include "precompiled.h" #include "def_culling_of_stratholme.h" @@ -32,61 +30,51 @@ enum SPELL_CHAIN_N = 52696, SPELL_CHAIN_H = 58823, SPELL_EXPLODED_N = 52666, - SPELL_EXPLODED_H = 58821, + SPELL_EXPLODED_H = 58824, SPELL_FRENZY = 58841, - SAY_MEATHOOK_SPAWN = -1594110, - SAY_MEATHOOK_AGGRO = -1594111, - SAY_MEATHOOK_DEATH = -1594112, - SAY_MEATHOOK_SLAY01 = -1594113, - SAY_MEATHOOK_SLAY02 = -1594114, - SAY_MEATHOOK_SLAY03 = -1594115 + SAY_MEATHOOK_AGGRO = -1594111, + SAY_MEATHOOK_DEATH = -1594112, + SAY_MEATHOOK_SLAY01 = -1594113, + SAY_MEATHOOK_SLAY02 = -1594114, + SAY_MEATHOOK_SLAY03 = -1594115 }; -/*###### -## boss_meathook -######*/ struct MANGOS_DLL_DECL boss_meathookAI : public ScriptedAI { - boss_meathookAI(Creature *c) : ScriptedAI(c) - { - m_pInstance = (ScriptedInstance*)c->GetInstanceData(); - m_bIsHeroic = c->GetMap()->IsRegularDifficulty(); + boss_meathookAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_creature->SetActiveObjectState(true); Reset(); - } - - ScriptedInstance* m_pInstance; - - bool m_bIsHeroic; - uint32 phaseArthas; - uint32 Chain_Timer; - uint32 Exploded_Timer; - uint32 Frenzy_Timer; - - void Reset() - { - phaseArthas = 0; - Chain_Timer = 6300; - Exploded_Timer = 9300; - Frenzy_Timer = 23300; - - } - - void Aggro(Unit* who) - { - DoScriptText(SAY_MEATHOOK_AGGRO, m_creature); - - if (m_pInstance) - m_pInstance->SetData(TYPE_MEATHOOK_EVENT, IN_PROGRESS); - } - - void JustDied(Unit *killer) - { - DoScriptText(SAY_MEATHOOK_DEATH, m_creature); - - if (m_pInstance) - m_pInstance->SetData(TYPE_MEATHOOK_EVENT, DONE); - } + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroic; + + uint32 Chain_Timer; + uint32 Exploded_Timer; + uint32 Frenzy_Timer; + + void Reset() + { + Chain_Timer = 6300; + Exploded_Timer = 5000; + Frenzy_Timer = 22300; + } + + void Aggro(Unit* who) + { + DoScriptText(SAY_MEATHOOK_AGGRO, m_creature); + } + + void JustDied(Unit *killer) + { + DoScriptText(SAY_MEATHOOK_DEATH, m_creature); + if(m_pInstance) + m_pInstance->SetData(TYPE_PHASE, 3); + } void KilledUnit(Unit* pVictim) { @@ -104,45 +92,39 @@ struct MANGOS_DLL_DECL boss_meathookAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - DoMeleeAttackIfReady(); + DoMeleeAttackIfReady(); - if (Chain_Timer < diff) + if (Chain_Timer < diff) { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCast(target, m_bIsHeroic ? SPELL_CHAIN_H : SPELL_CHAIN_N); + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + DoCast(target, m_bIsHeroic ? SPELL_CHAIN_H : SPELL_CHAIN_N); Chain_Timer = 6300; - } - else - Chain_Timer -= diff; + }else Chain_Timer -= diff; - if (Exploded_Timer < diff) + if (Exploded_Timer < diff) { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCast(target, m_bIsHeroic ? SPELL_EXPLODED_H : SPELL_EXPLODED_N); + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + DoCast(target, m_bIsHeroic ? SPELL_EXPLODED_H : SPELL_EXPLODED_N); - Exploded_Timer = 9300; - } - else - Exploded_Timer -= diff; + Exploded_Timer = 5000; + }else Exploded_Timer -= diff; - if (Frenzy_Timer < diff) - { - DoCast(m_creature,SPELL_FRENZY); + if (Frenzy_Timer < diff) + { + m_creature->InterruptNonMeleeSpells(false); + DoCast(m_creature,SPELL_FRENZY); Frenzy_Timer = 23300; - } - else - Frenzy_Timer -= diff; + }else Frenzy_Timer -= diff; - } + } }; -CreatureAI* GetAI_boss_meathook(Creature *_Creature) +CreatureAI* GetAI_boss_meathook(Creature* pCreature) { - boss_meathookAI* meathookAI = new boss_meathookAI(_Creature); - return (CreatureAI*)meathookAI; -}; + return new boss_meathookAI(pCreature); +} void AddSC_boss_meathook() { diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_salramm.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_salramm.cpp index 9714af9f7..896f23636 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_salramm.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_salramm.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 @@ -18,171 +18,239 @@ /* ScriptData SDName: instance_culling_of_stratholme SD%Complete: ?% -SDComment: +SDComment: by MaxXx2021 SDCategory: Culling of Stratholme EndScriptData */ - - #include "precompiled.h" #include "def_culling_of_stratholme.h" enum { - SAY_SALRAMM_SPAWN = -1594129, - SAY_SALRAMM_AGGRO = -1594130, - SAY_SALRAMM_DEATH = -1594131, - SAY_SALRAMM_SLAY01 = -1594132, - SAY_SALRAMM_SLAY02 = -1594133, - SAY_SALRAMM_SLAY03 = -1594134, - SAY_SALRAMM_STEAL01 = -1594135, - SAY_SALRAMM_STEAL02 = -1594136, - SAY_SALRAMM_STEAL03 = -1594137, - - SPELL_SB_N = 57725, - SPELL_SB_H = 58827, - SPELL_FLESH = 58845, - SPELL_STEAL = 52708 + SAY_SALRAMM_AGGRO = -1594130, + SAY_SALRAMM_DEATH = -1594131, + SAY_SALRAMM_SLAY01 = -1594132, + SAY_SALRAMM_SLAY02 = -1594133, + SAY_SALRAMM_SLAY03 = -1594134, + SAY_SALRAMM_STEAL01 = -1594135, + SAY_SALRAMM_STEAL02 = -1594136, + SAY_SALRAMM_STEAL03 = -1594137, + SAY_SUMMON01 = -1594138, + SAY_SUMMON02 = -1594139, + SAY_BOOM01 = -1594140, + SAY_BOOM02 = -1594141, + + SPELL_SB_N = 57725, + SPELL_SB_H = 58827, + SPELL_FLESH = 58845, + SPELL_STEAL = 52708, + SPELL_GNOUL_BLOW = 58825, + SPELL_SUMMON_GNOUL = 52451, + + NPC_GNOUL = 27733 }; -/*###### -## boss_salramm -######*/ struct MANGOS_DLL_DECL boss_salrammAI : public ScriptedAI { - boss_salrammAI(Creature *c) : ScriptedAI(c) - { - m_pInstance = (ScriptedInstance*)c->GetInstanceData(); - m_bIsHeroic = c->GetMap()->IsRegularDifficulty(); + boss_salrammAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_creature->SetActiveObjectState(true); Reset(); - } - - ScriptedInstance* m_pInstance; - - bool m_bIsHeroic; - uint32 Step; - uint32 Steptim; - uint32 Motion; - uint32 ShadowBolt_Timer; - uint32 Flesh_Timer; - uint32 Steal_Timer; - - void Reset() - { - Step = 1; - Steptim = 7000; - ShadowBolt_Timer = 5300; - Flesh_Timer = 7300; - Steal_Timer = 17300; - } - - void Aggro(Unit* who) - { - Motion = 0; - DoScriptText(SAY_SALRAMM_AGGRO, m_creature); - m_creature->GetMotionMaster()->Clear(false); - - if (m_pInstance) - m_pInstance->SetData(TYPE_SALRAMM_EVENT, IN_PROGRESS); - } - - void JustDied(Unit *killer) - { - DoScriptText(SAY_SALRAMM_DEATH, m_creature); - - if (m_pInstance) - m_pInstance->SetData(TYPE_SALRAMM_EVENT, DONE); - } - - void KilledUnit(Unit* pVictim) - { + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroic; + + uint32 ShadowBoltTimer; + uint32 FleshTimer; + uint32 StealTimer; + uint32 SummonTimer; + + void Reset() + { + ShadowBoltTimer = 5000; + FleshTimer = (urand(7000, 9000)); + StealTimer = (urand(9000, 17000)); + SummonTimer = (urand(12000, 17000)); + if(m_pInstance) + m_pInstance->SetData64(NPC_SALRAMM, m_creature->GetGUID()); + } + + void Aggro(Unit* who) + { + DoScriptText(SAY_SALRAMM_AGGRO, m_creature); + } + + void JustDied(Unit *killer) + { + DoScriptText(SAY_SALRAMM_DEATH, m_creature); + if(m_pInstance) + m_pInstance->SetData(TYPE_ENCOUNTER, DONE); + } + + void KilledUnit(Unit* pVictim) + { switch(rand()%3) { case 0: DoScriptText(SAY_SALRAMM_SLAY01, m_creature); break; case 1: DoScriptText(SAY_SALRAMM_SLAY02, m_creature); break; case 2: DoScriptText(SAY_SALRAMM_SLAY03, m_creature); break; } - } - - void UpdateAI(const uint32 diff) - { - DoMeleeAttackIfReady(); - - if(Motion == 0) - { - switch(Step) - { - case 1: - DoScriptText(SAY_SALRAMM_SPAWN, m_creature); - ++Step; - Steptim = 7000; - break; - case 3: - m_creature->GetMotionMaster()->MovePoint(0, 2165.073f,1279.338f,133.40f); - ++Step; - Steptim = 7000; - break; - } - } - else - return; - - if (Steptim <= diff) - { - ++Step; - Steptim = 330000; - } - Steptim -= diff; - - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (ShadowBolt_Timer < diff) - { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCast(target, m_bIsHeroic ? SPELL_SB_H : SPELL_SB_N); - - ShadowBolt_Timer = 5300; - } - else - ShadowBolt_Timer -= diff; + } + + void SpellHitTarget(Unit *target, const SpellEntry *spell) + { + if(spell->Id == SPELL_GNOUL_BLOW) + if(target->GetTypeId() != TYPEID_PLAYER && target->GetEntry() == NPC_GNOUL) + target->SetDisplayId(11686); + } + + void UpdateAI(const uint32 diff) + { - if (Flesh_Timer < diff) + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (ShadowBoltTimer < diff) + { + DoCast(m_creature->getVictim(), m_bIsHeroic ? SPELL_SB_H : SPELL_SB_N); + + ShadowBoltTimer = (urand(5000, 6000)); + }else ShadowBoltTimer -= diff; + + if (FleshTimer < diff) { if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) DoCast(target,SPELL_FLESH); - Flesh_Timer = 7300; - } - else - Flesh_Timer -= diff; + FleshTimer = 7300; + }else FleshTimer -= diff; - if (Steal_Timer < diff) + if (StealTimer < diff) { if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) DoCast(target,SPELL_STEAL); - - switch(rand()%3) - { - case 0: DoScriptText(SAY_SALRAMM_STEAL01, m_creature); break; - case 1: DoScriptText(SAY_SALRAMM_STEAL02, m_creature); break; - case 2: DoScriptText(SAY_SALRAMM_STEAL03, m_creature); break; - } - - Steal_Timer = 17300; - } - else - Steal_Timer -= diff; - } + switch(rand()%3) + { + case 0: DoScriptText(SAY_SALRAMM_STEAL01, m_creature); break; + case 1: DoScriptText(SAY_SALRAMM_STEAL02, m_creature); break; + case 2: DoScriptText(SAY_SALRAMM_STEAL03, m_creature); break; + } + + StealTimer = (urand(8000, 11000)); + }else StealTimer -= diff; + + if (SummonTimer < diff) + { + switch(rand()%2) + { + case 0: DoScriptText(SAY_SUMMON01, m_creature); break; + case 1: DoScriptText(SAY_SUMMON02, m_creature); break; + } + + m_creature->InterruptNonMeleeSpells(false); + DoCast(m_creature,SPELL_SUMMON_GNOUL); + + SummonTimer = (urand(12000, 17000)); + }else SummonTimer -= diff; + + DoMeleeAttackIfReady(); + } }; -CreatureAI* GetAI_boss_salramm(Creature *_Creature) +/*### +## npc_salramm_gnoul +###*/ + +struct MANGOS_DLL_DECL npc_salramm_gnoulAI : public ScriptedAI { - boss_salrammAI* salrammAI = new boss_salrammAI(_Creature); - return (CreatureAI*)salrammAI; + npc_salramm_gnoulAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_creature->SetActiveObjectState(true); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroic; + + uint32 m_uiBlowTimer; + + void Reset() + { + m_uiBlowTimer = (urand(3000, 15000)); + } + + void MoveInLineOfSight(Unit* pWho) + { + if (!pWho) + return; + + if (!m_creature->hasUnitState(UNIT_STAT_STUNNED) && pWho->isTargetableForAttack() && + m_creature->IsHostileTo(pWho) && pWho->isInAccessablePlaceFor(m_creature)) + { + if (!m_creature->canFly() && m_creature->GetDistanceZ(pWho) > CREATURE_Z_ATTACK_RANGE) + return; + + float attackRadius = m_creature->GetAttackDistance(pWho); + if (m_creature->IsWithinDistInMap(pWho, attackRadius) && m_creature->IsWithinLOSInMap(pWho)) + { + if (!m_creature->getVictim()) + { + AttackStart(pWho); + pWho->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); + } + else if (m_creature->GetMap()->IsDungeon()) + { + pWho->SetInCombatWith(m_creature); + m_creature->AddThreat(pWho, 0.0f); + } + } + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if(m_uiBlowTimer < uiDiff) + { + if(Creature* pSalramm = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_SALRAMM))) + { + if(pSalramm->isDead()) return; + + switch(rand()%2) + { + case 0: DoScriptText(SAY_BOOM01, pSalramm); break; + case 1: DoScriptText(SAY_BOOM02, pSalramm); break; + } + pSalramm->InterruptNonMeleeSpells(false); + pSalramm->CastSpell(m_creature, SPELL_GNOUL_BLOW, false); + } + } + else m_uiBlowTimer -= uiDiff; + + DoMeleeAttackIfReady(); + + return; + } }; +CreatureAI* GetAI_boss_salramm(Creature* pCreature) +{ + return new boss_salrammAI(pCreature); +} + +CreatureAI* GetAI_npc_salramm_gnoul(Creature* pCreature) +{ + return new npc_salramm_gnoulAI(pCreature); +} + void AddSC_boss_salramm() { Script *newscript; @@ -192,4 +260,8 @@ void AddSC_boss_salramm() newscript->GetAI = &GetAI_boss_salramm; newscript->RegisterSelf(); + newscript = new Script; + newscript->Name = "npc_salramm_gnoul"; + newscript->GetAI = &GetAI_npc_salramm_gnoul; + newscript->RegisterSelf(); } \ No newline at end of file diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp index 1cedfdda2..b28adc6a3 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 @@ -13,20 +13,25 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - - + + /* ScriptData SDName: instance_culling_of_stratholme SD%Complete: ?% -SDComment: +SDComment: by MaxXx2021 SDCategory: Culling of Stratholme EndScriptData */ - - + #include "precompiled.h" #include "def_culling_of_stratholme.h" #include "escort_ai.h" - +#include "WorldPacket.h" +#include "weather.h" + +/*### +## npc_arthas +###*/ + enum { SAY_INTRO01 = -1594071, //Arthas @@ -47,1407 +52,1667 @@ enum SAY_INTRO16 = -1594086, //Arthas SAY_INTRO17 = -1594087, //Jaina SAY_INTRO18 = -1594088, //Arthas + SAY_ENTER01 = -1594089, //Arthas SAY_ENTER02 = -1594090, //Cityman SAY_ENTER03 = -1594091, //Arthas SAY_ENTER04 = -1594092, //Crazyman - SAY_ENTER05 = -1594093, //Arthas - SAY_ENTER06 = -1594094, //Malganis + SAY_ENTER05 = -1594093, //Crazyman2 + SAY_ENTER06 = -1594094, //Arthas SAY_ENTER07 = -1594095, //Malganis - SAY_ENTER08 = -1594096, //Arthas + SAY_ENTER08 = -1594096, //Malganis SAY_ENTER09 = -1594097, //Arthas - SAY_PHASE501 = -1594098, //Arthas - SAY_PHASE502 = -1594099, //Arthas - SAY_PEOPLE05 = -1594100, //Patricia - SAY_PEOPLE06 = -1594101, //Patricia - SAY_PEOPLE07 = -1594103, //Patricia - SAY_PEOPLE08 = -1594105, //Patricia - SAY_PEOPLE09 = -1594106, //Patricia - SAY_EPOCH = -1594117, //Arthas Dialog for Epoch + SAY_ENTER10 = -1594098, //Arthas + + SAY_SALRAMM_SPAWN = -1594129, SAY_MEATHOOK_SPAWN = -1594110, - SAY_PEOPLE01 = -1594107, //People Run - SAY_PEOPLE02 = -1594108, //People Run - SAY_PEOPLE03 = -1594109, //People Run - SAY_PEOPLE04 = -1594104, //People Run - SAY_PEOPLE10 = -1594102, //People Run - SAY_PEOPLE11 = -1594126, //People Run - SAY_PEOPLE12 = -1594127, //People Run - SAY_PEOPLE13 = -1594128, //People Run - SAY_PHASE503 = -1594152, //Arthas Shkaf 01 - SAY_PHASE504 = -1594153, //Arthas Shkaf 02 - SAY_PHASE505 = -1594142, //Arthas Glore - SAY_PHASE506 = -1594143, //Arthas That is it - SAY_PHASE507 = -1594144, //Arthas - SAY_PHASE508 = -1594145, //Arthas This Magic Again - SAY_PHASE509 = -1594147, //Arthas We are Close in trap - SAY_PHASE510 = -1594146, //Arthas Lets go - SAY_PHASE511 = -1594151, //Arthas Shkaff tam - SAY_PHASE601 = -1594154, //Arthas Fire - SAY_PHASE602 = -1594155, //Arthas Picnic - SAY_PHASE603 = -1594156, //Arthas Picnic End - SAY_PHASE604 = -1594157, //Arthas Stop Escort ska on ne virybaetsa - SAY_PHASE605 = -1594158, //Arthas Pipec Malganisy - - NPC_SCARED_MAN_2 = 31127, - NPC_DRAKONIAN = 27744, - NPC_TIME_RIFT = 28409, - NPC_TIME_RIFT_2 = 28439, - NPC_PATRICIA = 31028, - NPC_SCARED_MAN = 31126, - NPC_KNIGHT_ESCORT = 27745, - NPC_PRIEST_ESCORT = 27747, - NPC_JAINA = 26497, - NPC_UTHER = 26528, - NPC_CITY_MAN = 28167, - NPC_CRAZY_MAN = 28169, - NPC_ZOMBIE = 27737, - - SPELL_FEAR = 39176, - SPELL_CHAIN_N = 52696, - SPELL_CHAIN_H = 58823, - SPELL_EXPLODED_N = 52666, - SPELL_EXPLODED_H = 58821, - SPELL_FRENZY = 58841, - SPELL_ARTHAS_AURA = 52442, - SPELL_EXORCISM_N = 52445, - SPELL_EXORCISM_H = 58822, - SPELL_HOLY_LIGHT = 52444, - - SPELL_SUMMON_VISUAL = 53708, - - ENCOUNTER_ZOMBIE_NUMBER = 4, - ENCOUNTER_ZOMBIE_NUMBER2 = 50, - - // Wave Event - NPC_PATCHWORK = 27736, - NPC_GOLEM = 28201, - NPC_NECROMANCER = 27732, - NPC_FIEND = 27734, - NPC_GHOUL = 28249, - + + SAY_PHASE501 = -1594142, //Arthas + SAY_PHASE502 = -1594143, //Arthas + SAY_PHASE503 = -1594144, //Human + SAY_PHASE504 = -1594145, //Arthas + SAY_PHASE505 = -1594146, //Arthas + SAY_PHASE506 = -1594147, //Human + SAY_PHASE507 = -1594148, //Arthas + SAY_PHASE508 = -1594149, //Arthas + SAY_PHASE509 = -1594150, //Arthas + SAY_PHASE510 = -1594151, //Arthas + SAY_PHASE511 = -1594152, //Arthas + SAY_PHASE512 = -1594153, //Arthas + SAY_PHASE513 = -1594154, //Arthas + + SAY_EPOCH_INTRO = -1594155, + SAY_ARTHAS_INTRO = -1594156, + SAY_EPOCH_AGGRO = -1594157, + + SAY_PHASE514 = -1594158, //Arthas Shkaf 01 + SAY_PHASE515 = -1594159, //Arthas Shkaf 02 + SAY_PHASE601 = -1594160, //Arthas Fire + SAY_PHASE602 = -1594161, //Arthas Picnic + SAY_PHASE603 = -1594162, //Arthas Picnic End + SAY_PHASE605 = -1594164, //Arthas mall start + SAY_PHASE606 = -1594188, + + SAY_MALGANIS_ESCAPE02 = -1594180, + SAY_MALGANIS_ESCAPE01 = -1594187, + SAY_MALGANIS_OUTRO = -1594182, + SAY_ARTHAS_OUTRO01 = -1594181, + SAY_ARTHAS_OUTRO02 = -1594183, + SAY_ARTHAS_OUTRO03 = -1594184, + + /*SPELL*/ + SPELL_EXORCISM_N = 52445, + SPELL_EXORCISM_H = 58822, + SPELL_HOLY_LIGHT = 52444, + SPELL_ARTHAS_AURA = 52442, + + /*NPC*/ + NPC_CITYMAN = 28167, + NPC_CRAZYMAN = 28169, + NPC_MALGANIS_INTRO = 26533, + + /*OTHER*/ + POINT_LAST_POINT = 0xFFFFFF, + FACTION = 2076 }; - -/*###### -## npc_arthas -######*/ + +const float SummonScourge[2][4] = +{ + {2340.058f, 1253.570f, 132.733f, 5.09f}, //right wing + {2272.773f, 1331.824f, 124.171f, 3.12f}, //left wing +}; + struct MANGOS_DLL_DECL npc_arthasAI : public npc_escortAI { - npc_arthasAI(Creature *pCreature) : npc_escortAI(pCreature) - { + npc_arthasAI(Creature* pCreature) : npc_escortAI(pCreature) + { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsHeroic = pCreature->GetMap()->IsRegularDifficulty(); - ArthasGUID = 0; - SalrammGUID = 0; - PhaseC = false; + m_bIsHeroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_creature->SetActiveObjectState(true); Reset(); - } - - ScriptedInstance* m_pInstance; - - uint64 ArthasGUID; - uint64 MeathookGUID; - uint64 SalrammGUID; - uint64 EpochGUID; - - - bool m_bIsHeroic; - uint32 Exorcism_Timer; - uint32 FinalFight; - bool PhaseC; - uint32 arthas_event; - Unit* culling_faction; - Creature* Patricia; - Creature* StalkerM; - Creature* Crazyman; - Creature* Cityman; - Creature* Stalker; - Creature* TempZombie; - Creature* Salramm; - Creature* Meathook; - Creature* Epoch; - Creature* Malganis; - Creature* TempMalganis; - Creature* Arthas; - Creature* Jaina; - Creature* Uther; - uint32 phase; - uint32 phaseAI; - uint32 phasetim; - uint64 uiZombieGUID[ENCOUNTER_ZOMBIE_NUMBER]; - uint32 uiZombie_counter; - uint32 tmpZombie; - uint32 PatriciaEvent; - - // wave event - uint64 WaveCount; - uint64 WaveTimer; - uint64 EscortPoint; - bool WaveSpawned; - - // time event - uint64 TimeRemain; - uint64 TimeTotal; - uint64 TimePast; - uint64 TimeEventTimer; - - void Reset() - { - if(arthas_event == 2) { } - else - arthas_event = 0; - FinalFight = 1; - phase = 1; - phasetim = 20000; - Exorcism_Timer = 7300; - Arthas = m_creature; - - // wave event - WaveSpawned = false; - WaveCount = 0; - EscortPoint = 0; - WaveTimer = 60000; - - // time event - TimePast = 0; - TimeTotal = 15; // in minutes - TimeRemain = TimeTotal - TimePast; - TimeEventTimer = 60000; - - - if(m_pInstance->GetData(TYPE_ARTHAS_EVENT) == DONE) - Arthas->SetVisibility(VISIBILITY_OFF); - - // this is Arthas's start position in the instance he will give gossip only here and in front of the gate at Mal'Ganis - if(PhaseC == false && m_pInstance->GetData(TYPE_ARTHAS_EVENT) != DONE) - { - Arthas->SetVisibility(VISIBILITY_ON); - Arthas->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); - Arthas->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - } - - } - - void Aggro(Unit* who) - { - DoCast(m_creature, SPELL_ARTHAS_AURA); - } - + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroic; + + uint64 m_uiUtherGUID; + uint64 m_uiJainaGUID; + uint64 m_uiPeople01GUID; + uint64 m_uiPeople02GUID; + uint64 m_uiMalganisGUID; + uint64 m_uiMarine01GUID; + uint64 m_uiMarine02GUID; + uint64 m_uiMarine03GUID; + uint64 m_uiMarine04GUID; + uint64 m_uiPriest01GUID; + uint64 m_uiPriest02GUID; + uint64 m_uiHuman01GUID; + uint64 m_uiHuman02GUID; + uint64 m_uiHuman03GUID; + + uint32 culling_faction; + uint32 m_uiStep; + uint32 m_uiStepTimer; + uint32 m_uiMoveTimer; + uint32 m_uiHealTimer; + uint32 m_uiExorcismTimer; + uint32 m_uiSummonTimer; + uint32 m_uiWaveCount; + + Creature* Malganis; + Creature* pEpoch; + bool StartEvent; + bool MoveSoldier; + + float LastX; + float LastY; + float LastZ; + + void Reset() + { + if(!m_pInstance) return; + + if(m_pInstance->GetData(TYPE_INTRO) == NOT_STARTED) + { + m_creature->setFaction(35); + RemoveGossip(); + } + + if(m_pInstance->GetData(TYPE_PHASE) == 11) + { + m_creature->SetVisibility(VISIBILITY_OFF); + } + } + + void RemoveGossip() + { + m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + } + + void MoveSoldiers() + { + if(Unit* Marine01 = Unit::GetUnit((*m_creature), m_uiMarine01GUID)) + { + Marine01->GetMotionMaster()->MovePoint(0, 2083.483f,1282.313f,141.198f); + Marine01->setFaction(culling_faction); + } + if(Unit* Marine02 = Unit::GetUnit((*m_creature), m_uiMarine02GUID)) + { + Marine02->GetMotionMaster()->MovePoint(0, 2083.681f,1292.809f,141.141f); + Marine02->setFaction(culling_faction); + } + if(Unit* Marine03 = Unit::GetUnit((*m_creature), m_uiMarine03GUID)) + { + Marine03->GetMotionMaster()->MovePoint(0, 2082.158f,1290.406f,141.261f); + Marine03->setFaction(culling_faction); + } + if(Unit* Marine04 = Unit::GetUnit((*m_creature), m_uiMarine04GUID)) + { + Marine04->GetMotionMaster()->MovePoint(0, 2081.899f,1285.122f,141.302f); + Marine04->setFaction(culling_faction); + } + if(Unit* Priest01 = Unit::GetUnit((*m_creature), m_uiPriest01GUID)) + { + Priest01->GetMotionMaster()->MovePoint(0, 2081.072f,1292.233f,141.329f); + Priest01->setFaction(culling_faction); + } + if(Unit* Priest02 = Unit::GetUnit((*m_creature), m_uiPriest02GUID)) + { + Priest02->GetMotionMaster()->MovePoint(0, 2080.632f,1283.004f,141.358f); + Priest02->setFaction(culling_faction); + } + } + + void EnableEscort() + { + SetEscortPaused(false); + } + + void SummonPeople() + { + if(Creature* Cityman = m_creature->SummonCreature(NPC_CITYMAN,2091.977f,1275.021f,140.757f,0.558f,TEMPSUMMON_CORPSE_TIMED_DESPAWN,30000)) + m_uiPeople01GUID = Cityman->GetGUID(); + if(Creature* Crazyman = m_creature->SummonCreature(NPC_CRAZYMAN,2093.514f,1275.842f,140.408f,3.801f,TEMPSUMMON_CORPSE_TIMED_DESPAWN,30000)) + m_uiPeople02GUID = Crazyman->GetGUID(); + } + + void StartAI() + { + SummonPeople(); + m_uiStep = 0; + m_uiStepTimer = 100; + StartEvent = true; + } + + void Aggro(Unit* who) + { + DoCast(m_creature, SPELL_ARTHAS_AURA); + } + + void EnterEvadeMode() + { + if(!m_pInstance) return; + + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->LoadCreaturesAddon(); + m_uiExorcismTimer = 7400; + m_uiHealTimer = 100; + + m_creature->SetLootRecipient(NULL); + + if(m_pInstance->GetData(TYPE_PHASE) > 4) + { + npc_escortAI::EnterEvadeMode(); + } + + if(m_pInstance->GetData(TYPE_PHASE) > 2 && m_pInstance->GetData(TYPE_PHASE) < 5) + { + m_creature->GetMotionMaster()->MovePoint(POINT_LAST_POINT, LastX, LastY, LastZ); + } + } + + void AttackStart(Unit* pWho) + { + if(!pWho || pWho == m_creature) + return; + + if(m_pInstance && m_pInstance->GetData(TYPE_PHASE) == 4) return; + + npc_escortAI::AttackStart(pWho); + } + void MoveInLineOfSight(Unit* pWho) { if (!pWho) return; - - if (!m_creature->hasUnitState(UNIT_STAT_STUNNED) && pWho->isTargetableForAttack() && - m_creature->IsHostileTo(pWho) && pWho->isInAccessablePlaceFor(m_creature)) + + if (!m_creature->hasUnitState(UNIT_STAT_STUNNED) && pWho->isTargetableForAttack() && + m_creature->IsHostileTo(pWho) && pWho->isInAccessablePlaceFor(m_creature)) + { + if (!m_creature->canFly() && m_creature->GetDistanceZ(pWho) > CREATURE_Z_ATTACK_RANGE) + return; + + float attackRadius = m_creature->GetAttackDistance(pWho); + if (m_creature->IsWithinDistInMap(pWho, attackRadius) && m_creature->IsWithinLOSInMap(pWho)) + { + if (!m_creature->getVictim()) { - if (!m_creature->canFly() && m_creature->GetDistanceZ(pWho) > CREATURE_Z_ATTACK_RANGE) - return; - - float attackRadius = m_creature->GetAttackDistance(pWho); - if (m_creature->IsWithinDistInMap(pWho, attackRadius) && m_creature->IsWithinLOSInMap(pWho)) - { - if (!m_creature->getVictim()) - { - AttackStart(pWho); - pWho->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); - } - else if (m_creature->GetMap()->IsDungeon()) - { - pWho->SetInCombatWith(m_creature); - m_creature->AddThreat(pWho, 0.0f); - } - } + AttackStart(pWho); + pWho->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); + } + else if (m_creature->GetMap()->IsDungeon()) + { + pWho->SetInCombatWith(m_creature); + m_creature->AddThreat(pWho, 0.0f); } + } } - - void SetWeather(uint32 weather, float grade) + } + + void WaypointReached(uint32 uiPointId) { - Map *map = m_creature->GetMap(); - if (!map->IsDungeon()) return; - WorldPacket data(SMSG_WEATHER, (4+4+4)); - data << uint32(weather) << (float)grade << uint8(0); - ((InstanceMap*)map)->SendToPlayers(&data); + switch(uiPointId) + { + case 2: + DoScriptText(SAY_INTRO18, m_creature); + SetRun(true); + break; + case 8: + GetSoldier(); + SetEscortPaused(true); + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + m_pInstance->SetData(TYPE_INTRO, DONE); + SetRun(false); + break; + case 9: + DoScriptText(SAY_ENTER01, m_creature); + MoveSoldier = true; + m_uiMoveTimer = 12000; + break; + case 10: + SetEscortPaused(true); + m_pInstance->SetData(TYPE_PHASE, 2); + ResetStep(2000); + if(Unit* Cityman = Unit::GetUnit((*m_creature), m_uiPeople01GUID)) + { + m_creature->SetUInt64Value(UNIT_FIELD_TARGET, Cityman->GetGUID()); + Cityman->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->GetGUID()); + Cityman->GetMotionMaster()->MovePoint(0, 2088.625f,1279.191f,140.743f); + } + break; + case 14: + if(Creature* Human01 = m_creature->SummonCreature(NPC_CITY,2397.308f,1207.565f,134.038f,5.593f,TEMPSUMMON_CORPSE_TIMED_DESPAWN,30000)) + m_uiHuman01GUID = Human01->GetGUID(); + if(Creature* Human02 = m_creature->SummonCreature(NPC_CITY,2400.770f,1207.362f,134.038f,3.454f,TEMPSUMMON_CORPSE_TIMED_DESPAWN,30000)) + m_uiHuman02GUID = Human02->GetGUID(); + if(Creature* Human03 = m_creature->SummonCreature(NPC_CITY,2400.547f,1204.892f,134.038f,2.479f,TEMPSUMMON_CORPSE_TIMED_DESPAWN,30000)) + m_uiHuman03GUID = Human03->GetGUID(); + break; + case 20: + SetEscortPaused(true); + m_creature->setFaction(35); + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + SetRun(false); + break; + case 21: + DoScriptText(SAY_PHASE502, m_creature); + break; + case 22: + SetEscortPaused(true); + m_pInstance->SetData(TYPE_PHASE, 6); + ResetStep(1000); + break; + case 25: + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_READY1H); + m_creature->SummonCreature(NPC_TIME_RIFT,2428.901f, 1192.164f, 148.076f, 5.09f,TEMPSUMMON_CORPSE_TIMED_DESPAWN,29000); + DoScriptText(SAY_PHASE508, m_creature); + break; + case 26: + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_STAND); + DoScriptText(SAY_PHASE509, m_creature); + break; + case 29: + m_creature->SummonCreature(NPC_TIME_RIFT,2413.773f, 1137.820f, 148.076f, 5.09f,TEMPSUMMON_CORPSE_TIMED_DESPAWN,29000); + m_creature->SummonCreature(NPC_TIME_RIFT,2404.990f, 1175.121f, 148.076f, 5.09f,TEMPSUMMON_CORPSE_TIMED_DESPAWN,29000); + DoScriptText(SAY_PHASE510, m_creature); + break; + case 30: + DoScriptText(SAY_PHASE513, m_creature); + break; + case 31: + ResetStep(1000); + m_pInstance->SetData(TYPE_PHASE, 7); + break; + case 32: + SetEscortPaused(true); + m_pInstance->SetData(TYPE_PHASE, 8); + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + SetRun(false); + break; + case 36: + DoScriptText(SAY_PHASE514, m_creature); + break; + case 37: + if(GameObject* pGate = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(GO_SHKAF_GATE))) + pGate->SetGoState(GO_STATE_ACTIVE); + SetRun(true); + DoScriptText(SAY_PHASE515, m_creature); + break; + case 45: + DoScriptText(SAY_PHASE601, m_creature); + break; + case 48: + DoScriptText(SAY_PHASE602, m_creature); + break; + case 51: + SetEscortPaused(true); + m_pInstance->SetData(TYPE_PHASE, 9); + DoScriptText(SAY_PHASE606, m_creature); + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + break; + case 53: + SetEscortPaused(true); + m_creature->StopMoving(); + m_creature->GetMotionMaster()->MovementExpired(false); + m_creature->setFaction(FACTION); + DoScriptText(SAY_PHASE605, m_creature); + if(Creature* Malganis = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_MALGANIS))) + { + m_pInstance->SetData(TYPE_MALGANIS, IN_PROGRESS); + Malganis->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->AI()->AttackStart(Malganis); + Malganis->AI()->AttackStart(m_creature); + } + break; + } } - - void JustDied(Unit *killer) + + void JumpNextStep(uint32 Timer) { - if (m_pInstance) + m_uiStepTimer = Timer; + m_uiStep++; + } + + void GetSoldier() //huck + { + //Marine Close Left + if(Creature* pEscort01 = GetClosestCreatureWithEntry(m_creature, NPC_MARINE, 50.0f)) + { + m_uiMarine01GUID = pEscort01->GetGUID(); + pEscort01->UpdateEntry(NPC_CITYMAN); + if(Creature* pEscort02 = GetClosestCreatureWithEntry(m_creature, NPC_MARINE, 50.0f)) + { + m_uiMarine02GUID = pEscort02->GetGUID(); + pEscort02->UpdateEntry(NPC_CITYMAN); + // Right marine 2 + if(Creature* pEscort03 = GetClosestCreatureWithEntry(m_creature, NPC_MARINE, 50.0f)) + { + m_uiMarine03GUID = pEscort03->GetGUID(); + pEscort03->UpdateEntry(NPC_CITYMAN); + if(Creature* pEscort04 = GetClosestCreatureWithEntry(m_creature, NPC_MARINE, 50.0f)) { - m_pInstance->SetData(TYPE_ARTHAS_EVENT, FAIL); + m_uiMarine04GUID = pEscort04->GetGUID(); + pEscort01->UpdateEntry(NPC_MARINE); + pEscort02->UpdateEntry(NPC_MARINE); + pEscort03->UpdateEntry(NPC_MARINE); } - } - - void SpawnWave(int wp) { - if(wp == 1){ - // 4 Ghouls - for(uint8 i = 0; i < 2; ++i) - { - if (Creature* pGhoul = Arthas->SummonCreature(NPC_GHOUL, 2227.03f, 1331.65f, 126.99f,1.30f,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 180000)) - { - pGhoul->AddThreat(Arthas, 0.00f); - pGhoul->GetMotionMaster()->MovePoint(0, 2165.073f,1279.338f,133.40f); - } - if (Creature* pSpider = Arthas->SummonCreature(NPC_FIEND, 2227.10f, 1331.63f, 126.99f,1.30f,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 180000)) - { - pSpider->AddThreat(Arthas, 0.00f); - pSpider->GetMotionMaster()->MovePoint(0, 2165.073f,1279.338f,133.40f); - } - } - // 2 Necromancers - for(uint8 i = 0; i < 1; ++i) - { - if (Creature* pNecro = Arthas->SummonCreature(NPC_NECROMANCER, 2227.23f, 1331.67f, 126.99f,1.30f,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 180000)) - { - pNecro->AddThreat(Arthas, 0.00f); - pNecro->GetMotionMaster()->MovePoint(0, 2165.073f,1279.338f,133.40f); - } - } - // 1 Patchwork - if (Creature* pPatch = Arthas->SummonCreature(NPC_PATCHWORK, 2227.13f, 1331.69f, 126.99f,1.30f,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 180000)) - { - pPatch->AddThreat(Arthas, 0.00f); - pPatch->GetMotionMaster()->MovePoint(0, 2165.073f,1279.338f,133.40f); - } - } else { - // 4 Ghouls - for(uint8 i = 0; i < 3; ++i) - { - if (Creature* pGhoul = Arthas->SummonCreature(NPC_GHOUL, 2199.28f, 1218.51f, 137.93f,2.12f,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 180000)) - { - pGhoul->AddThreat(Arthas, 0.00f); - pGhoul->GetMotionMaster()->MovePoint(0, 2165.073f,1279.338f,133.40f); - } - } - // 2 Necromancers - for(uint8 i = 0; i < 1; ++i) - { - if (Creature* pNecro = Arthas->SummonCreature(NPC_NECROMANCER, 2199.18f, 1218.49f, 137.93f,2.12f,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 180000)) - { - pNecro->AddThreat(Arthas, 0.00f); - pNecro->GetMotionMaster()->MovePoint(0, 2165.073f,1279.338f,133.40f); - } - } - // 1 Patchwork - if (Creature* pPatch = Arthas->SummonCreature(NPC_PATCHWORK, 2199.08f, 1218.50, 137.93f,2.12f,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 180000)) - { - pPatch->AddThreat(Arthas, 0.00f); - pPatch->GetMotionMaster()->MovePoint(0, 2165.073f,1279.338f,133.40f); - } - } - } - - void AttackStart(Unit* pWho) + } + } + } + + if(Creature* pEscort05 = GetClosestCreatureWithEntry(m_creature, NPC_PRIEST, 50.0f)) { - if (!pWho) - return; - - if (m_creature->Attack(pWho, true)) - { - m_creature->AddThreat(pWho, 0.0f); - m_creature->SetInCombatWith(pWho); - pWho->SetInCombatWith(m_creature); - - if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == POINT_MOTION_TYPE) - m_creature->GetMotionMaster()->MovementExpired(); - - if (IsCombatMovement()) - m_creature->GetMotionMaster()->MoveChase(pWho); - } + m_uiPriest01GUID = pEscort05->GetGUID(); + pEscort05->UpdateEntry(NPC_CITYMAN); + if(Creature* pEscort06 = GetClosestCreatureWithEntry(m_creature, NPC_PRIEST, 50.0f)) + { + m_uiPriest02GUID = pEscort06->GetGUID(); + pEscort05->UpdateEntry(NPC_PRIEST); + } } - - void WaypointReached(uint32 uiPointId) + } + + void ResetStep(uint32 Timer) + { + m_uiStep = 0; + m_uiStepTimer = Timer; + } + + void IntroEvent() + { + switch(m_uiStep) + { + case 0: + DoScriptText(SAY_INTRO01, m_creature); + JumpNextStep(2000); + break; + case 1: + m_uiUtherGUID = m_pInstance->GetData64(NPC_UTHER); + m_uiJainaGUID = m_pInstance->GetData64(NPC_JAINA); + if(Creature* pUther = m_pInstance->instance->GetCreature(m_uiUtherGUID)) + DoScriptText(SAY_INTRO02, pUther); + JumpNextStep(8000); + break; + case 2: + m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); + DoScriptText(SAY_INTRO03, m_creature); + m_creature->SetUInt64Value(UNIT_FIELD_TARGET, 0); + m_creature->GetMotionMaster()->MovePoint(0, 1908.334f, 1315.354f, 149.551f); + if(Creature* pUther = m_pInstance->instance->GetCreature(m_uiUtherGUID)) + pUther->GetMotionMaster()->MovePoint(0, 1903.600f, 1296.678f, 143.383f); + JumpNextStep(2000); + break; + case 3: + if(Creature* pJaina = m_pInstance->instance->GetCreature(m_uiJainaGUID)) + pJaina->GetMotionMaster()->MovePoint(0, 1899.641f, 1298.684f, 143.831f); + JumpNextStep(7000); + break; + case 4: + m_creature->GetMotionMaster()->MovementExpired(false); + m_creature->GetMotionMaster()->MovePoint(0, 1911.087f, 1314.263f, 150.026f); + JumpNextStep(1000); + break; + case 5: + DoScriptText(SAY_INTRO04, m_creature); + JumpNextStep(10000); + break; + case 6: + if(Creature* pUther = m_pInstance->instance->GetCreature(m_uiUtherGUID)) + DoScriptText(SAY_INTRO05, pUther); + JumpNextStep(1000); + break; + case 7: + if(Creature* pUther = m_pInstance->instance->GetCreature(m_uiUtherGUID)) + m_creature->SetUInt64Value(UNIT_FIELD_TARGET, pUther->GetGUID()); + DoScriptText(SAY_INTRO06, m_creature); + JumpNextStep(4000); + break; + case 8: + if(Creature* pUther = m_pInstance->instance->GetCreature(m_uiUtherGUID)) + DoScriptText(SAY_INTRO07, pUther); + JumpNextStep(6000); + break; + case 9: + DoScriptText(SAY_INTRO08, m_creature); + JumpNextStep(4000); + break; + case 10: + if(Creature* pUther = m_pInstance->instance->GetCreature(m_uiUtherGUID)) + DoScriptText(SAY_INTRO09, pUther); + JumpNextStep(8000); + break; + case 11: + DoScriptText(SAY_INTRO10, m_creature); + JumpNextStep(4000); + break; + case 12: + if(Creature* pUther = m_pInstance->instance->GetCreature(m_uiUtherGUID)) + DoScriptText(SAY_INTRO11, pUther); + JumpNextStep(4000); + break; + case 13: + DoScriptText(SAY_INTRO12, m_creature); + JumpNextStep(11000); + break; + case 14: + if(Creature* pJaina = m_pInstance->instance->GetCreature(m_uiJainaGUID)) + DoScriptText(SAY_INTRO13, pJaina); + JumpNextStep(3000); + break; + case 15: + DoScriptText(SAY_INTRO14, m_creature); + JumpNextStep(9000); + break; + case 16: + if(Creature* pUther = m_pInstance->instance->GetCreature(m_uiUtherGUID)) + DoScriptText(SAY_INTRO15, pUther); + JumpNextStep(5000); + break; + case 17: + if(Creature* pJaina = m_pInstance->instance->GetCreature(m_uiJainaGUID)) + { + m_creature->SetUInt64Value(UNIT_FIELD_TARGET, pJaina->GetGUID()); + pJaina->GetMotionMaster()->MovePoint(0, 1794.357f,1272.183f,140.558f); + } + JumpNextStep(1000); + break; + case 18: + DoScriptText(SAY_INTRO16, m_creature); + JumpNextStep(1000); + break; + case 19: + if(Creature* pJaina = m_pInstance->instance->GetCreature(m_uiJainaGUID)) + DoScriptText(SAY_INTRO17, pJaina); + JumpNextStep(3000); + break; + case 20: + m_creature->SetUInt64Value(UNIT_FIELD_TARGET, 0); + ((npc_arthasAI*)m_creature->AI())->Start(true, false); + JumpNextStep(3000); + break; + } + } + + void EnterEvent() + { + switch(m_uiStep) + { + case 0: + if(Unit* Cityman = Unit::GetUnit((*m_creature), m_uiPeople01GUID)) + DoScriptText(SAY_ENTER02, Cityman); + JumpNextStep(4000); + break; + case 1: + m_creature->GetMotionMaster()->MovePoint(0, 2087.689f,1280.344f,140.73f); + DoScriptText(SAY_ENTER03, m_creature); + JumpNextStep(3000); + break; + case 2: + if(Unit* Cityman = Unit::GetUnit((*m_creature), m_uiPeople01GUID)) + DoScriptText(SAY_ENTER04, Cityman); + m_creature->HandleEmoteCommand(37); + JumpNextStep(1000); + break; + case 3: + if(Unit* Cityman = Unit::GetUnit((*m_creature), m_uiPeople01GUID)) + m_creature->DealDamage(Cityman, Cityman->GetMaxHealth(),NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + if(Unit* Crazyman = Unit::GetUnit((*m_creature), m_uiPeople02GUID)) + { + DoScriptText(SAY_ENTER05, Crazyman); + Crazyman->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->GetGUID()); + m_creature->SetUInt64Value(UNIT_FIELD_TARGET, Crazyman->GetGUID()); + m_creature->GetMotionMaster()->MovePoint(0, 2092.154f,1276.645f,140.52f); + } + JumpNextStep(3000); + break; + case 4: + m_creature->HandleEmoteCommand(37); + JumpNextStep(1000); + break; + case 5: + if(Unit* Crazyman = Unit::GetUnit((*m_creature), m_uiPeople02GUID)) + Crazyman->DealDamage(Crazyman, Crazyman->GetMaxHealth(),NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + JumpNextStep(1000); + break; + case 6: + m_creature->SetUInt64Value(UNIT_FIELD_TARGET, 0); + m_creature->GetMotionMaster()->MovePoint(0, 2091.179f,1278.065f,140.476f); + DoScriptText(SAY_ENTER06, m_creature); + JumpNextStep(3000); + break; + case 7: + if(Creature* StalkerM = m_creature->SummonCreature(20562,2117.349f,1288.624f,136.271f,1.37f,TEMPSUMMON_TIMED_DESPAWN,60000)) + StalkerM->CastSpell(StalkerM,63793,false); + JumpNextStep(1000); + break; + case 8: + m_pInstance->SetData(TYPE_ENCOUNTER, IN_PROGRESS); + if(Creature* TempMalganis = m_creature->SummonCreature(NPC_MALGANIS_INTRO,2117.349f,1288.624f,136.271f,1.37f,TEMPSUMMON_TIMED_DESPAWN,29000)) + { + m_uiMalganisGUID = TempMalganis->GetGUID(); + DoScriptText(SAY_ENTER07, TempMalganis); + m_creature->SetUInt64Value(UNIT_FIELD_TARGET, TempMalganis->GetGUID()); + TempMalganis->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->GetGUID()); + TempMalganis->setFaction(35); + } + JumpNextStep(11000); + break; + case 9: + if(Unit* TempMalganis = Unit::GetUnit((*m_creature), m_uiMalganisGUID)) + DoScriptText(SAY_ENTER08, TempMalganis); + JumpNextStep(17000); + break; + case 10: + DoScriptText(SAY_ENTER09, m_creature); + JumpNextStep(7000); + break; + case 11: + m_creature->SetUInt64Value(UNIT_FIELD_TARGET, 0); + DoScriptText(SAY_ENTER10, m_creature); + JumpNextStep(12000); + break; + case 12: + m_creature->GetMotionMaster()->MovePoint(0, 2084.584f,1278.331f,141.479f); + JumpNextStep(4000); + break; + case 13: + m_creature->GetMotionMaster()->MovementExpired(false); + m_creature->GetMotionMaster()->MovePoint(0, 2087.414f,1279.293f,140.933f); + JumpNextStep(2000); + break; + case 14: + LastX = m_creature->GetPositionX(); + LastY = m_creature->GetPositionY(); + LastZ = m_creature->GetPositionZ(); + if(m_bIsHeroic) + m_pInstance->SetData(TYPE_BONUS, IN_PROGRESS); + m_uiWaveCount = 0; + SetRun(true); + m_pInstance->SetData(TYPE_WING, RIGHT); + m_creature->setFaction(FACTION); + m_uiSummonTimer = 100; + m_pInstance->SetData(TYPE_PHASE, 3); + break; + } + } + + void SummonWing() { - switch(uiPointId) + m_uiWaveCount++; + m_pInstance->DoUpdateWorldState(WORLD_STATE_COS_WAVE_COUNT, m_uiWaveCount); + + switch(m_uiWaveCount) { - case 1: - DoScriptText(SAY_ENTER09, Arthas); - EscortPoint = 1; - WaveTimer = 60000; - SetEscortPaused(true); - break; - case 2: - DoScriptText(SAY_PHASE502, Arthas); - break; - case 3: - Arthas->RemoveSplineFlag(SPLINEFLAG_WALKMODE); - DoScriptText(SAY_PHASE505, Arthas); - break; - case 4: - DoScriptText(SAY_PHASE506, Arthas); - Arthas->SummonCreature(NPC_TIME_RIFT,2225.388f,1178.470f,136.289f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); - break; - case 5: - DoScriptText(SAY_PHASE507, Arthas); - - Arthas->SummonCreature(NPC_TIME_RIFT,2264.253f,1162.153f,137.919f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); - Arthas->SummonCreature(NPC_TIME_RIFT,2286.946f,1182.064f,137.986f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); - break; - case 9: - DoScriptText(SAY_PHASE509, Arthas); - Arthas->SummonCreature(NPC_TIME_RIFT,2410.561f,1187.790f,133.933f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); - Arthas->SummonCreature(NPC_TIME_RIFT,2388.574f,1214.650f,134.239f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); - Arthas->SummonCreature(NPC_TIME_RIFT,2430.593f,1212.919f,134.124f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); - break; - case 10: - DoScriptText(SAY_PHASE510, Arthas); - break; - case 11: - Arthas->RemoveSplineFlag(SPLINEFLAG_WALKMODE); - break; - case 13: - DoScriptText(SAY_PHASE508,Arthas); - Arthas->SummonCreature(NPC_TIME_RIFT,2393.985f,1190.519f,148.076f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); - Arthas->SummonCreature(NPC_TIME_RIFT,2436.202f,1200.540f,148.077f,3.15f,TEMPSUMMON_TIMED_DESPAWN,11000); - break; - case 15: - DoScriptText(SAY_PHASE511,Arthas); - Arthas->SummonCreature(NPC_TIME_RIFT_2,2445.629f,1111.500f,148.076f,3.229f,TEMPSUMMON_TIMED_DESPAWN,9000); - if (EpochGUID = m_pInstance->GetData64(DATA_EPOCH)) - { - // check if it has ben killed already - if(m_pInstance->GetData(TYPE_EPOCH_EVENT) != DONE) - { - Epoch = m_pInstance->instance->GetCreature(EpochGUID); - Epoch->SetVisibility(VISIBILITY_ON); - Epoch->setFaction(14); - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Epoch->GetGUID()); - } - // already has ben killed as the db says so needs to die - if(m_pInstance->GetData(TYPE_EPOCH_EVENT) == DONE) - { - Epoch = m_pInstance->instance->GetCreature(EpochGUID); - Epoch->SetDeadByDefault(true); - } - } - break; - case 18: - DoScriptText(SAY_EPOCH, Arthas); + case 1: + m_creature->SummonCreature(NPC_GHOUL,2340.058f, 1253.570f, 132.733f, 5.09f,TEMPSUMMON_CORPSE_TIMED_DESPAWN,29000); + m_creature->SummonCreature(NPC_GHOUL,2340.058f, 1253.570f, 132.733f, 5.09f,TEMPSUMMON_CORPSE_TIMED_DESPAWN,29000); + break; + case 2: + m_creature->SummonCreature(NPC_GHOUL,2340.058f, 1253.570f, 132.733f, 5.09f,TEMPSUMMON_CORPSE_TIMED_DESPAWN,29000); + m_creature->SummonCreature(NPC_GHOUL,2340.058f, 1253.570f, 132.733f, 5.09f,TEMPSUMMON_CORPSE_TIMED_DESPAWN,29000); + m_creature->SummonCreature(NPC_NECROMANCER,2340.058f, 1253.570f, 132.733f, 5.09f,TEMPSUMMON_CORPSE_TIMED_DESPAWN,29000); + m_creature->SummonCreature(NPC_FIEND,2340.058f, 1253.570f, 132.733f, 5.09f,TEMPSUMMON_CORPSE_TIMED_DESPAWN,29000); + break; + case 3: + m_pInstance->SetData(TYPE_WING, LEFT); + m_creature->SummonCreature(NPC_GHOUL,2272.773f, 1331.824f, 124.171f, 3.12f,TEMPSUMMON_CORPSE_TIMED_DESPAWN,29000); + m_creature->SummonCreature(NPC_NECROMANCER,2272.773f, 1331.824f, 124.171f, 3.12f,TEMPSUMMON_CORPSE_TIMED_DESPAWN,29000); + m_creature->SummonCreature(NPC_NECROMANCER,2272.773f, 1331.824f, 124.171f, 3.12f,TEMPSUMMON_CORPSE_TIMED_DESPAWN,29000); + m_creature->SummonCreature(NPC_FIEND,2272.773f, 1331.824f, 124.171f, 3.12f,TEMPSUMMON_CORPSE_TIMED_DESPAWN,29000); + break; + case 4: + m_pInstance->SetData(TYPE_WING, RIGHT); + m_creature->SummonCreature(NPC_ACOLYTE,2340.058f, 1253.570f, 132.733f, 5.09f,TEMPSUMMON_CORPSE_TIMED_DESPAWN,29000); + m_creature->SummonCreature(NPC_NECROMANCER,2340.058f, 1253.570f, 132.733f, 5.09f,TEMPSUMMON_CORPSE_TIMED_DESPAWN,29000); + m_creature->SummonCreature(NPC_ACOLYTE,2340.058f, 1253.570f, 132.733f, 5.09f,TEMPSUMMON_CORPSE_TIMED_DESPAWN,29000); + m_creature->SummonCreature(NPC_FIEND,2340.058f, 1253.570f, 132.733f, 5.09f,TEMPSUMMON_CORPSE_TIMED_DESPAWN,29000); + break; + case 5: + m_pInstance->SetData(TYPE_PHASE, 4); + if(Creature* pMeathook = m_creature->SummonCreature(NPC_MEATHOOK,2272.773f, 1331.824f, 124.171f, 3.12f,TEMPSUMMON_CORPSE_TIMED_DESPAWN,29000)) + { + DoScriptText(SAY_MEATHOOK_SPAWN, pMeathook); + pMeathook->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + pMeathook->GetMotionMaster()->MovePoint(0, 2196.036f, 1328.818f, 129.997f); + } + break; + case 6: + m_pInstance->SetData(TYPE_WING, LEFT); + m_creature->SummonCreature(NPC_GHOUL,2272.773f, 1331.824f, 124.171f, 3.12f,TEMPSUMMON_CORPSE_TIMED_DESPAWN,29000); + m_creature->SummonCreature(NPC_NECROMANCER,2272.773f, 1331.824f, 124.171f, 3.12f,TEMPSUMMON_CORPSE_TIMED_DESPAWN,29000); + m_creature->SummonCreature(NPC_NECROMANCER,2272.773f, 1331.824f, 124.171f, 3.12f,TEMPSUMMON_CORPSE_TIMED_DESPAWN,29000); + m_creature->SummonCreature(NPC_FIEND,2272.773f, 1331.824f, 124.171f, 3.12f,TEMPSUMMON_CORPSE_TIMED_DESPAWN,29000); + m_creature->SummonCreature(NPC_FIEND,2272.773f, 1331.824f, 124.171f, 3.12f,TEMPSUMMON_CORPSE_TIMED_DESPAWN,29000); + break; + case 7: + m_pInstance->SetData(TYPE_WING, RIGHT); + m_creature->SummonCreature(NPC_CONSTRUCT,2340.058f, 1253.570f, 132.733f, 5.09f,TEMPSUMMON_CORPSE_TIMED_DESPAWN,29000); + m_creature->SummonCreature(NPC_GHOUL,2340.058f, 1253.570f, 132.733f, 5.09f,TEMPSUMMON_CORPSE_TIMED_DESPAWN,29000); + m_creature->SummonCreature(NPC_GHOUL,2340.058f, 1253.570f, 132.733f, 5.09f,TEMPSUMMON_CORPSE_TIMED_DESPAWN,29000); + m_creature->SummonCreature(NPC_GHOUL,2340.058f, 1253.570f, 132.733f, 5.09f,TEMPSUMMON_CORPSE_TIMED_DESPAWN,29000); + break; + case 8: + m_pInstance->SetData(TYPE_WING, LEFT); + m_creature->SummonCreature(NPC_CONSTRUCT,2272.773f, 1331.824f, 124.171f, 3.12f,TEMPSUMMON_CORPSE_TIMED_DESPAWN,29000); + m_creature->SummonCreature(NPC_NECROMANCER,2272.773f, 1331.824f, 124.171f, 3.12f,TEMPSUMMON_CORPSE_TIMED_DESPAWN,29000); + m_creature->SummonCreature(NPC_GHOUL,2272.773f, 1331.824f, 124.171f, 3.12f,TEMPSUMMON_CORPSE_TIMED_DESPAWN,29000); + m_creature->SummonCreature(NPC_GHOUL,2272.773f, 1331.824f, 124.171f, 3.12f,TEMPSUMMON_CORPSE_TIMED_DESPAWN,29000); + m_creature->SummonCreature(NPC_NECROMANCER,2272.773f, 1331.824f, 124.171f, 3.12f,TEMPSUMMON_CORPSE_TIMED_DESPAWN,29000); + break; + case 9: + m_pInstance->SetData(TYPE_WING, RIGHT); + m_creature->SummonCreature(NPC_CONSTRUCT,2340.058f, 1253.570f, 132.733f, 5.09f,TEMPSUMMON_CORPSE_TIMED_DESPAWN,29000); + m_creature->SummonCreature(NPC_FIEND,2340.058f, 1253.570f, 132.733f, 5.09f,TEMPSUMMON_CORPSE_TIMED_DESPAWN,29000); + m_creature->SummonCreature(NPC_NECROMANCER,2340.058f, 1253.570f, 132.733f, 5.09f,TEMPSUMMON_CORPSE_TIMED_DESPAWN,29000); + m_creature->SummonCreature(NPC_NECROMANCER,2340.058f, 1253.570f, 132.733f, 5.09f,TEMPSUMMON_CORPSE_TIMED_DESPAWN,29000); + m_creature->SummonCreature(NPC_GHOUL,2340.058f, 1253.570f, 132.733f, 5.09f,TEMPSUMMON_CORPSE_TIMED_DESPAWN,29000); + break; + case 10: + m_pInstance->SetData(TYPE_PHASE, 4); + if(Creature* pSalramm = m_creature->SummonCreature(NPC_SALRAMM,2196.036f, 1328.818f, 129.997f, 3.12f,TEMPSUMMON_CORPSE_TIMED_DESPAWN,29000)) + { + DoScriptText(SAY_SALRAMM_SPAWN, pSalramm); + pSalramm->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + pSalramm->GetMotionMaster()->MovePoint(0, 2196.036f, 1328.818f, 129.997f); + } + break; + } + } + + void HouseEvent() + { + switch(m_uiStep) + { + case 0: + if(Creature* Human = m_pInstance->instance->GetCreature(m_uiHuman01GUID)) + { + m_creature->SetUInt64Value(UNIT_FIELD_TARGET, Human->GetGUID()); + Human->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->GetGUID()); + DoScriptText(SAY_PHASE503, Human); + } + JumpNextStep(4000); + break; + case 1: + DoScriptText(SAY_PHASE504, m_creature); + m_creature->GetMotionMaster()->MovePoint(0, 2396.035f, 1206.942f, 134.038f); + JumpNextStep(3000); + break; + case 2: + m_creature->HandleEmoteCommand(37); + JumpNextStep(2000); + break; + case 3: + DoScriptText(SAY_PHASE505, m_creature); + JumpNextStep(2000); + break; + case 4: + if(Creature* Human = m_pInstance->instance->GetCreature(m_uiHuman01GUID)) + DoScriptText(SAY_PHASE506, Human); + JumpNextStep(6000); + break; + case 5: + m_creature->SetUInt64Value(UNIT_FIELD_TARGET, 0); + if(Creature* Human = m_pInstance->instance->GetCreature(m_uiHuman01GUID)) + { + Human->SetUInt64Value(UNIT_FIELD_TARGET, 0); + Human->UpdateEntry(NPC_INFINITE_ADVERSARY); + } + if(Creature* Human2 = m_pInstance->instance->GetCreature(m_uiHuman02GUID)) + Human2->UpdateEntry(NPC_INFINITE_HUNTER); + if(Creature* Human3 = m_pInstance->instance->GetCreature(m_uiHuman03GUID)) + Human3->UpdateEntry(NPC_INFINITE_AGENT); + JumpNextStep(1000); + break; + case 6: + SetRun(true); + m_creature->GetMotionMaster()->MovePoint(0, 2384.320f, 1202.779f, 134.040f); + DoScriptText(SAY_PHASE507, m_creature); + JumpNextStep(5000); + break; + case 7: + SetEscortPaused(false); + m_creature->setFaction(FACTION); + m_pInstance->SetData(TYPE_PHASE, 5); + JumpNextStep(1000); + break; + } + } + + void EpochEvent() + { + switch(m_uiStep) + { + case 0: + m_creature->SummonCreature(NPC_TIME_RIFT_2,2445.629f,1111.500f,148.076f,3.229f,TEMPSUMMON_TIMED_DESPAWN,9000); + JumpNextStep(2000); + break; + case 1: + pEpoch = m_creature->SummonCreature(NPC_EPOCH,2445.629f,1111.500f,148.076f,3.229f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,900000); + if(pEpoch) + { + pEpoch->setFaction(35); + DoScriptText(SAY_EPOCH_INTRO, pEpoch); + m_creature->SetUInt64Value(UNIT_FIELD_TARGET, pEpoch->GetGUID()); + } + JumpNextStep(20000); + break; + case 2: + DoScriptText(SAY_ARTHAS_INTRO, m_creature); + JumpNextStep(6000); + break; + case 3: + if(pEpoch) + { + DoScriptText(SAY_EPOCH_AGGRO, pEpoch); + m_creature->AI()->AttackStart(pEpoch); + pEpoch->AI()->AttackStart(m_creature); + pEpoch->setFaction(14); + } + m_pInstance->SetData(TYPE_PHASE, 5); + SetRun(false); + JumpNextStep(6000); + break; + } + } + + void MalganisEvent() + { + switch(m_uiStep) + { + case 0: + m_creature->setFaction(35); + m_creature->GetMotionMaster()->MovePoint(0, 2302.326f, 1491.386f, 128.362f); + if(Creature* Malganis = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_MALGANIS))) + { + DoScriptText(SAY_MALGANIS_ESCAPE01, Malganis); + Malganis->InterruptNonMeleeSpells(false); + Malganis->GetMotionMaster()->MovePoint(0, 2296.665f,1502.362f,128.362f); + m_creature->SetUInt64Value(UNIT_FIELD_TARGET, Malganis->GetGUID()); + Malganis->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->GetGUID()); + } + JumpNextStep(10000); break; - case 19: + case 1: + if(Creature* Malganis = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_MALGANIS))) + DoScriptText(SAY_MALGANIS_ESCAPE02, Malganis); + JumpNextStep(10000); break; - case 20: - Arthas->AddSplineFlag(SPLINEFLAG_WALKMODE); + case 2: + DoScriptText(SAY_ARTHAS_OUTRO01, m_creature); + JumpNextStep(5000); break; - case 23: - DoScriptText(SAY_PHASE503,Arthas); + case 3: + if(Creature* Malganis = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_MALGANIS))) + DoScriptText(SAY_MALGANIS_OUTRO, Malganis); + JumpNextStep(20000); break; - case 24: - if (m_pInstance) + case 4: + if(Creature* Malganis = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_MALGANIS))) { - GameObject* pGate = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GO_SHKAF_GATE)); - pGate->SetGoState(GO_STATE_ACTIVE); - } - DoScriptText(SAY_PHASE504,Arthas); - break; - case 32: - DoScriptText(SAY_PHASE601,Arthas); - Arthas->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + Malganis->SetVisibility(VISIBILITY_OFF); + m_creature->GetMotionMaster()->MovePoint(0, Malganis->GetPositionX(), Malganis->GetPositionY(), Malganis->GetPositionZ()); + } + m_creature->SetUInt64Value(UNIT_FIELD_TARGET, 0); + m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + JumpNextStep(3000); break; - case 34: - Arthas->AddSplineFlag(SPLINEFLAG_WALKMODE); - DoScriptText(SAY_PHASE602,Arthas); + case 5: + DoScriptText(SAY_ARTHAS_OUTRO02, m_creature); + JumpNextStep(6000); break; - case 35: - Arthas->RemoveSplineFlag(SPLINEFLAG_WALKMODE); - DoScriptText(SAY_PHASE603,Arthas); + case 6: + m_creature->GetMotionMaster()->MovePoint(0, 2298.298f,1500.362f,128.362f); + DoScriptText(SAY_ARTHAS_OUTRO03, m_creature); + if(GameObject* pChest = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(GO_MALGANIS_CHEST))) + pChest->SetUInt32Value(GAMEOBJECT_FACTION, 0); + JumpNextStep(11000); break; - case 40: - DoScriptText(SAY_PHASE604,Arthas); + case 7: + m_creature->GetMotionMaster()->MovePoint(0, 2243.311f, 1476.025f, 132.352f); + JumpNextStep(11000); break; - case 41: - FinalFight = 1; - Arthas->setFaction(35); - phaseAI = 94; + case 8: + m_pInstance->SetData(TYPE_PHASE, 12); + m_creature->SetVisibility(VISIBILITY_OFF); break; - } + } } - - void UpdateAI(const uint32 diff) + + void UpdateAI(const uint32 uiDiff) { - npc_escortAI::UpdateAI(diff); - - DoMeleeAttackIfReady(); - - // time event - if (m_pInstance->GetData(TYPE_ARTHAS_EVENT) == IN_PROGRESS) - { - if (TimeEventTimer <= diff) + npc_escortAI::UpdateAI(uiDiff); + + if(!m_pInstance) return; + + if(StartEvent == true) + { + if(m_pInstance->GetData(TYPE_INTRO) != DONE) + { + if(m_uiStepTimer < uiDiff) { - if (TimeRemain == 0) - { - if (m_pInstance) - m_pInstance->SetData(TYPE_TIME_EVENT, FAIL); - return; - } - - --TimeRemain; - TimeEventTimer = 60000; - m_pInstance->DoUpdateWorldState(WORLD_STATE_REMAIN, TimeRemain); + IntroEvent(); } - else - TimeEventTimer -= diff; - } - - // wave event - if(EscortPoint == 1){ - switch(WaveCount) { - case 1: - m_pInstance->DoUpdateWorldState(WORLD_STATE_WAVE, true); - m_pInstance->DoUpdateWorldState(WORLD_STATE_WAVE, WaveCount); - - if (WaveTimer < diff){ - WaveTimer = 60000; - WaveSpawned = false; - ++WaveCount; - } else WaveTimer -= diff; - - if(!WaveSpawned) { - WaveSpawned = true; - SpawnWave(urand(0,1)); - } - - break; - case 2: - m_pInstance->DoUpdateWorldState(WORLD_STATE_WAVE, WaveCount); - - if (WaveTimer < diff){ - WaveTimer = 60000; - WaveSpawned = false; - ++WaveCount; - } else WaveTimer -= diff; - - if(!WaveSpawned) { - WaveSpawned = true; - SpawnWave(urand(0,1)); - } - - break; - case 3: - m_pInstance->DoUpdateWorldState(WORLD_STATE_WAVE, WaveCount); - - if (WaveTimer < diff){ - WaveTimer = 60000; - WaveSpawned = false; - ++WaveCount; - } else WaveTimer -= diff; - - if(!WaveSpawned) { - WaveSpawned = true; - SpawnWave(urand(0,1)); - } - break; - case 4: - m_pInstance->DoUpdateWorldState(WORLD_STATE_WAVE, WaveCount); - - if (WaveTimer < diff){ - WaveTimer = 60000; - WaveSpawned = false; - ++WaveCount; - } else WaveTimer -= diff; - - if(!WaveSpawned) { - WaveSpawned = true; - SpawnWave(urand(0,1)); - } - - break; - case 5: - m_pInstance->DoUpdateWorldState(WORLD_STATE_WAVE, WaveCount); - if (MeathookGUID = m_pInstance->GetData64(DATA_MEATHOOK)) - { - // check if it has ben killed already - if (m_pInstance->GetData(TYPE_MEATHOOK_EVENT) != DONE) - { - Meathook = m_pInstance->instance->GetCreature(MeathookGUID); - Meathook->SetVisibility(VISIBILITY_ON); - Meathook->setFaction(14); - Meathook->RemoveSplineFlag(SPLINEFLAG_WALKMODE); - Meathook->GetMotionMaster()->MovePoint(0, 2165.073f,1279.338f,133.40f); - DoScriptText(SAY_MEATHOOK_SPAWN, Meathook); - } - // If is on cooldown kill it - if(m_pInstance->GetData(TYPE_MEATHOOK_EVENT) == DONE) - { - Meathook = m_pInstance->instance->GetCreature(MeathookGUID); - Meathook->SetDeadByDefault(true); - } - } - if (WaveTimer < diff){ - WaveTimer = 60000; - ++WaveCount; - } else WaveTimer -= diff; - break; - case 6: - m_pInstance->DoUpdateWorldState(WORLD_STATE_WAVE, WaveCount); - - if (WaveTimer < diff){ - WaveTimer = 60000; - WaveSpawned = false; - ++WaveCount; - } else WaveTimer -= diff; - - if(!WaveSpawned) { - WaveSpawned = true; - SpawnWave(urand(0,1)); - } - break; - case 7: - m_pInstance->DoUpdateWorldState(WORLD_STATE_WAVE, WaveCount); - if (WaveTimer < diff){ - WaveTimer = 60000; - WaveSpawned = false; - ++WaveCount; - } else WaveTimer -= diff; - - if(!WaveSpawned) { - WaveSpawned = true; - SpawnWave(urand(0,1)); - } - break; - case 8: - m_pInstance->DoUpdateWorldState(WORLD_STATE_WAVE, WaveCount); - - if (WaveTimer < diff){ - WaveTimer = 60000; - WaveSpawned = false; - ++WaveCount; - } else WaveTimer -= diff; - - if(!WaveSpawned) { - WaveSpawned = true; - SpawnWave(urand(0,1)); - } - break; - case 9: - m_pInstance->DoUpdateWorldState(WORLD_STATE_WAVE, WaveCount); - if (WaveTimer < diff){ - WaveTimer = 60000; - WaveSpawned = false; - ++WaveCount; - } else WaveTimer -= diff; - - if(!WaveSpawned) { - WaveSpawned = true; - SpawnWave(urand(0,1)); - } - break; - case 10: - m_pInstance->DoUpdateWorldState(WORLD_STATE_WAVE, WaveCount); - if (SalrammGUID = m_pInstance->GetData64(DATA_SALRAMM)) - { - // check if it has ben killed already - if(m_pInstance->GetData(TYPE_SALRAMM_EVENT) != DONE) - { - Salramm = m_pInstance->instance->GetCreature(SalrammGUID); - // set his flags back to be atackable if there is no cd on this boss - Salramm->SetVisibility(VISIBILITY_ON); - Salramm->setFaction(14); - Salramm->RemoveSplineFlag(SPLINEFLAG_WALKMODE); - Salramm->GetMotionMaster()->MovePoint(0, 2165.073f,1279.338f,133.40f); - } - // already has ben killed as the db says so needs to die or just leave him with invisible flag - if(m_pInstance->GetData(TYPE_SALRAMM_EVENT) == DONE) - { - Salramm = m_pInstance->instance->GetCreature(SalrammGUID); - Salramm->SetDeadByDefault(true); - } - } - - if (WaveTimer < diff){ - WaveTimer = 60000; - ++WaveCount; - m_pInstance->DoUpdateWorldState(WORLD_STATE_WAVE, false); - } else WaveTimer -= diff; - break; - case 11: - DoScriptText(SAY_PHASE501, Arthas); - SetEscortPaused(false); - EscortPoint = 0; - break; - } - } - - - if (phaseAI == 94 && FinalFight != 2) - { - Arthas->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); - Arthas->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - } - if(FinalFight == 2) - { - Arthas->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); - Arthas->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - switch(phaseAI) + else m_uiStepTimer -= uiDiff; + } + + if(m_pInstance->GetData(TYPE_PHASE) == 2) + { + if(m_uiStepTimer < uiDiff) { - case 95: - DoScriptText(SAY_PHASE605, Arthas); - if (m_pInstance) - { - GameObject* pGate = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GO_MAL_GATE1)); - pGate->SetGoState(GO_STATE_ACTIVE); - } - ++phaseAI; - phasetim = 3000; - break; - case 97: - Arthas->GetMotionMaster()->MovePoint(0, 2303.016f, 1480.070f, 128.139f); - ++phaseAI; - phasetim = 3000; - break; - case 99: - Arthas->setFaction(culling_faction->getFaction()); - ++phaseAI; - phasetim = 3000; - break; - } - } - - if(FinalFight == 2) - { - if (phasetim <= diff) - { - ++phaseAI; - phasetim = 330000; - } - phasetim -= diff; - } - - if(EscortPoint == 1) - { - if (phasetim <= diff) - { - ++WaveCount; - phasetim = 10000; - } - phasetim -= diff; - } - - if(arthas_event == 2) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - if (Exorcism_Timer < diff) - { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCast(target, m_bIsHeroic ? SPELL_EXORCISM_H : SPELL_EXORCISM_N); - - Exorcism_Timer = 7300; - } - else - Exorcism_Timer -= diff; - - if(m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 40) - DoCast(m_creature, SPELL_HOLY_LIGHT); - } - - if(arthas_event == 1) - { - Arthas->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); - Arthas->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - switch(phase) + EnterEvent(); + } + else m_uiStepTimer -= uiDiff; + } + + if(MoveSoldier == true) + { + if(m_uiMoveTimer < uiDiff) { - case 1: - PhaseC = true; - - Arthas = m_creature; - Arthas->RemoveSplineFlag(SPLINEFLAG_WALKMODE); - Uther = Arthas->SummonCreature(26528, 1794.357f,1272.183f,141.558f,1.37f,TEMPSUMMON_TIMED_DESPAWN,180000); - Jaina = Arthas->SummonCreature(26497, 1870.21f, 1303.38f, 146.51f, 1.37f,TEMPSUMMON_TIMED_DESPAWN,180000); - - if (m_pInstance) - m_pInstance->SetData(TYPE_TIME_EVENT, NOT_STARTED); - if (m_pInstance) - m_pInstance->SetData(TYPE_ARTHAS_EVENT, NOT_STARTED); - - Uther->RemoveSplineFlag(SPLINEFLAG_WALKMODE); - Arthas->GetMotionMaster()->MovePoint(0, 1903.167f, 1291.573f, 143.32f); - Uther->GetMotionMaster()->MovePoint(0, 1897.018f, 1287.487f, 143.481f); - Jaina->GetMotionMaster()->MovePoint(0, 1895.48f, 1292.66f, 143.706f); - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Uther->GetGUID()); - Uther->SetUInt64Value(UNIT_FIELD_TARGET, Arthas->GetGUID()); - ++phase; - phasetim = 17000; - break; - case 3: - DoScriptText(SAY_INTRO01, Arthas); - ++phase; - phasetim = 2000; - break; - case 5: - DoScriptText(SAY_INTRO02, Uther); - ++phase; - phasetim = 8000; - break; - case 7: - Arthas->AddSplineFlag(SPLINEFLAG_WALKMODE); - DoScriptText(SAY_INTRO03, Arthas); - Arthas->GetMotionMaster()->MovePoint(0, 1911.087f, 1314.263f, 150.026f); - ++phase; - phasetim = 9000; - break; - case 9: - Jaina->SetUInt64Value(UNIT_FIELD_TARGET, Arthas->GetGUID()); - DoScriptText(SAY_INTRO04, Arthas); - ++phase; - phasetim = 10000; - break; - case 11: - DoScriptText(SAY_INTRO05, Uther); - ++phase; - phasetim = 1000; - break; - case 13: - DoScriptText(SAY_INTRO06, Arthas); - ++phase; - phasetim = 4000; - break; - case 15: - DoScriptText(SAY_INTRO07, Uther); - ++phase; - phasetim = 6000; - break; - case 17: - DoScriptText(SAY_INTRO08, Arthas); - ++phase; - phasetim = 4000; - break; - case 19: - DoScriptText(SAY_INTRO09, Uther); - ++phase; - phasetim = 8000; - break; - case 21: - DoScriptText(SAY_INTRO10, Arthas); - ++phase; - phasetim = 4000; - break; - case 23: - DoScriptText(SAY_INTRO11, Uther); - ++phase; - phasetim = 4000; - break; - case 25: - DoScriptText(SAY_INTRO12, Arthas); - ++phase; - phasetim = 11000; - break; - case 27: - DoScriptText(SAY_INTRO13, Jaina); - ++phase; - phasetim = 2000; - break; - case 29: - DoScriptText(SAY_INTRO14, Arthas); - ++phase; - phasetim = 9000; - break; - case 31: - DoScriptText(SAY_INTRO15, Uther); - ++phase; - phasetim = 4000; - break; - case 33: - Uther->AddSplineFlag(SPLINEFLAG_WALKMODE); - Uther->GetMotionMaster()->MovePoint(0, 1794.357f,1272.183f,141.558f); - ++phase; - phasetim = 1000; - break; - case 35: - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Jaina->GetGUID()); - ++phase; - phasetim = 1000; - break; - case 37: - Jaina->GetMotionMaster()->MovePoint(0, 1794.357f,1272.183f,141.558f); - DoScriptText(SAY_INTRO16, Arthas); - ++phase; - phasetim = 1000; - break; - case 39: - DoScriptText(SAY_INTRO17, Jaina); - ++phase; - phasetim = 3000; - break; - case 41: - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, 0); - Arthas->GetMotionMaster()->MovePoint(0, 1902.959f,1295.127f,143.388f); - ++phase; - phasetim = 10000; - break; - case 43: - Arthas->GetMotionMaster()->MovePoint(0, 1913.726f,1287.407f,141.927f); - ++phase; - phasetim = 6000; - break; - case 45: - DoScriptText(SAY_INTRO18, Arthas); - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Jaina->GetGUID()); - ++phase; - phasetim = 10000; - break; - case 47: - Arthas->RemoveSplineFlag(SPLINEFLAG_WALKMODE); - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, 0); - Jaina->SetVisibility(VISIBILITY_OFF); - Uther->SetVisibility(VISIBILITY_OFF); - Arthas->GetMotionMaster()->MovePoint(0, 1990.833f,1293.391f,145.467f); - ++phase; - phasetim = 12000; - break; - case 49: - Arthas->GetMotionMaster()->MovePoint(0, 1997.003f,1317.776f,142.963f); - ++phase; - phasetim = 5000; - break; - case 51: - Arthas->GetMotionMaster()->MovePoint(0, 2019.631f,1326.084f,142.929f); - ++phase; - phasetim = 4000; - break; - case 53: - Arthas->GetMotionMaster()->MovePoint(0, 2026.469f,1287.088f,143.596f); - ++phase; - phasetim = 6000; - break; - case 55: - Cityman = Arthas->SummonCreature(NPC_CITY_MAN,2091.977f,1275.021f,140.757f,0.558f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,60000); - Crazyman = Arthas->SummonCreature(NPC_CRAZY_MAN,2093.514f,1275.842f,140.408f,3.801f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,60000); - Arthas->GetMotionMaster()->MovePoint(0, 2050.660f,1287.333f,142.671f); - ++phase; - phasetim = 6000; - break; - case 57: - Stalker = Arthas->SummonCreature(20562,2026.469f,1287.088f,143.596f,1.37f,TEMPSUMMON_TIMED_DESPAWN,14000); - Stalker->SetVisibility(VISIBILITY_OFF); - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Stalker->GetGUID()); - ++phase; - phasetim = 1000; - break; - case 59: - DoScriptText(SAY_ENTER01, Arthas); - ++phase; - phasetim = 12000; - break; - case 61: - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, 0); - Arthas->AddSplineFlag(SPLINEFLAG_WALKMODE); - Arthas->GetMotionMaster()->MovePoint(0, 2081.447f,1287.770f,141.3241f); - ++phase; - phasetim = 15000; - break; - case 63: - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Cityman->GetGUID()); - Cityman->SetUInt64Value(UNIT_FIELD_TARGET, Arthas->GetGUID()); - Cityman->AddSplineFlag(SPLINEFLAG_WALKMODE); - Cityman->GetMotionMaster()->MovePoint(0, 2088.625f,1279.191f,140.743f); - ++phase; - phasetim = 2000; - break; - case 65: - DoScriptText(SAY_ENTER02, Cityman); - ++phase; - phasetim = 4000; - break; - case 67: - Arthas->GetMotionMaster()->MovePoint(0, 2087.689f,1280.344f,140.73f); - DoScriptText(SAY_ENTER03, Arthas); - ++phase; - phasetim = 3000; - break; - case 69: - Arthas->HandleEmoteCommand(37); - ++phase; - phasetim = 1000; - break; - case 71: - DoScriptText(SAY_ENTER04, Crazyman); - Crazyman->SetUInt64Value(UNIT_FIELD_TARGET, Arthas->GetGUID()); - Cityman->DealDamage(Cityman, Cityman->GetMaxHealth(),NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Crazyman->GetGUID()); - Arthas->GetMotionMaster()->MovePoint(0, 2092.154f,1276.645f,140.52f); - ++phase; - phasetim = 3000; - break; - case 73: - Arthas->HandleEmoteCommand(37); - ++phase; - phasetim = 1000; - break; - case 75: - Crazyman->DealDamage(Crazyman, Crazyman->GetMaxHealth(),NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - ++phase; - phasetim = 1000; - break; - case 77: - Stalker = Arthas->SummonCreature(20562,2081.447f,1287.770f,141.3241f,1.37f,TEMPSUMMON_TIMED_DESPAWN,70000); - Stalker->SetVisibility(VISIBILITY_OFF); - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Stalker->GetGUID()); - DoScriptText(SAY_ENTER05, Arthas); - ++phase; - phasetim = 2000; - break; - case 79: - StalkerM = Arthas->SummonCreature(20562,2117.349f,1288.624f,136.271f,1.37f,TEMPSUMMON_TIMED_DESPAWN,60000); - StalkerM->SetVisibility(VISIBILITY_OFF); - StalkerM->CastSpell(StalkerM,63793,false); - ++phase; - phasetim = 1000; - break; - case 81: - TempMalganis = Arthas->SummonCreature(26533,2117.349f,1288.624f,136.271f,1.37f,TEMPSUMMON_TIMED_DESPAWN,29000); - DoScriptText(SAY_ENTER06, TempMalganis); - TempMalganis->SetVisibility(VISIBILITY_ON); - TempMalganis->CastSpell(TempMalganis, SPELL_SUMMON_VISUAL, true); - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, TempMalganis->GetGUID()); - TempMalganis->SetUInt64Value(UNIT_FIELD_TARGET, Arthas->GetGUID()); - TempMalganis->setFaction(35); - ++phase; - phasetim = 11000; - break; - case 83: - phasetim = 500; - ++phase; - break; - case 85: - phasetim = 500; - ++phase; - break; - case 87: - DoScriptText(SAY_ENTER07, TempMalganis); - Arthas->RemoveSplineFlag(SPLINEFLAG_WALKMODE); - ++phase; - phasetim = 17000; - break; - case 89: - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, StalkerM->GetGUID()); - DoScriptText(SAY_ENTER08, Arthas); - ++phase; - phasetim = 7000; - break; - case 91: - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, Stalker->GetGUID()); - ++phase; - phasetim = 1000; - break; - case 93: - // time event if heroic - m_pInstance->DoUpdateWorldState(WORLD_STATE_TIME, true); - m_pInstance->DoUpdateWorldState(WORLD_STATE_REMAIN, TimeRemain); - - WaveCount = 0; - phaseAI = 95; - - - if (m_pInstance) - m_pInstance->SetData(TYPE_ARTHAS_EVENT, IN_PROGRESS); - if (m_pInstance) - m_pInstance->SetData(TYPE_TIME_EVENT, IN_PROGRESS); - - Arthas->SetUInt64Value(UNIT_FIELD_TARGET, 0); - - if (npc_arthasAI* pEscortAI = dynamic_cast(Arthas->AI())) - pEscortAI->Start(false, false, culling_faction->GetGUID(), NULL, false, false); - - Arthas->setFaction(culling_faction->getFaction()); - arthas_event = 2; - - ++phase; - phasetim = 1000; - break; + MoveSoldiers(); + MoveSoldier = false; + } + else m_uiMoveTimer -= uiDiff; + } + if(m_pInstance->GetData(TYPE_PHASE) == 3) + { + if(m_uiSummonTimer < uiDiff) + { + SummonWing(); + m_uiSummonTimer = 70000; } - } - else - return; + else m_uiSummonTimer -= uiDiff; + } + + if(m_pInstance->GetData(TYPE_PHASE) == 4 && m_pInstance->GetData(TYPE_ENCOUNTER) == DONE) + { + m_pInstance->SetData(TYPE_PHASE, 5); + SetRun(true); + EnableEscort(); + DoScriptText(SAY_PHASE501, m_creature); + } + + if(m_pInstance->GetData(TYPE_PHASE) == 6) + { + if(m_uiStepTimer < uiDiff) + { + HouseEvent(); + } + else m_uiStepTimer -= uiDiff; + } + + if(m_pInstance->GetData(TYPE_PHASE) == 7) + { + if(m_uiStepTimer < uiDiff) + { + EpochEvent(); + } + else m_uiStepTimer -= uiDiff; + } + + } //close event! + + if(m_pInstance->GetData(TYPE_PHASE) == 10) + { + SetEscortPaused(true); + ResetStep(1000); + m_creature->AttackStop(); + m_pInstance->SetData(TYPE_PHASE, 11); + } + + if(m_pInstance->GetData(TYPE_PHASE) == 11) + { + if(m_uiStepTimer < uiDiff) + { + MalganisEvent(); + } + else m_uiStepTimer -= uiDiff; + } + + //} //close event! + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if(m_pInstance->GetData(TYPE_PHASE) > 9) return; + + if (m_uiExorcismTimer < uiDiff) + { + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + DoCast(target, m_bIsHeroic ? SPELL_EXORCISM_H : SPELL_EXORCISM_N); + + m_uiExorcismTimer = 7300; + }else m_uiExorcismTimer -= uiDiff; + + if (m_uiHealTimer < uiDiff) + { + if(m_creature->GetHealthPercent() < 40.0f) + { + DoCast(m_creature, SPELL_HOLY_LIGHT); + m_uiHealTimer = 20000; + } + } else m_uiHealTimer -= uiDiff; + + return; + } +}; + +/*### +## npc_uther +###*/ + +struct MANGOS_DLL_DECL npc_utherAI : public npc_escortAI +{ + npc_utherAI(Creature* pCreature) : npc_escortAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_creature->SetActiveObjectState(true); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint64 m_uiArthasGUID; + uint32 m_uiStep; + uint32 m_uiStepTimer; + bool StartEvent; + + uint64 m_uiKnightGUID01; + uint64 m_uiKnightGUID02; + uint64 m_uiKnightGUID03; - if(arthas_event == 1) + void Reset() + { + m_creature->SetVisibility(VISIBILITY_OFF); + m_uiStep = 0; + m_uiStepTimer = 100; + } + + void StartAI() + { + //m_pInstance->SetWeather(WEATHER_STATE_MEDIUM_RAIN, 0.9999f); + StartEvent = true; + m_creature->SetVisibility(VISIBILITY_ON); + ((npc_utherAI*)m_creature->AI())->Start(false, true); + + if(Creature* Knight01 = m_creature->SummonCreature(NPC_KNIGHT,m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ(),m_creature->GetOrientation(),TEMPSUMMON_TIMED_DESPAWN,110000)) + { + m_uiKnightGUID01 = Knight01->GetGUID(); + Knight01->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + Knight01->GetMotionMaster()->MoveFollow(m_creature,PET_FOLLOW_DIST,M_PI_F/2); + } + + if(Creature* Knight02 = m_creature->SummonCreature(NPC_KNIGHT,m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ(),m_creature->GetOrientation(),TEMPSUMMON_TIMED_DESPAWN,110000)) + { + m_uiKnightGUID02 = Knight02->GetGUID(); + Knight02->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + Knight02->GetMotionMaster()->MoveFollow(m_creature,PET_FOLLOW_DIST,M_PI_F/4); + } + + if(Creature* Knight03 = m_creature->SummonCreature(NPC_KNIGHT,m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ(),m_creature->GetOrientation(),TEMPSUMMON_TIMED_DESPAWN,110000)) + { + m_uiKnightGUID03 = Knight03->GetGUID(); + Knight03->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + Knight03->GetMotionMaster()->MoveFollow(m_creature,PET_FOLLOW_DIST,M_PI_F/3); + } + } + + void WaypointReached(uint32 uiPointId) + { + switch(uiPointId) { - if (phasetim <= diff) - { - ++phase; - phasetim = 330000; - } - phasetim -= diff; + case 3: + m_uiArthasGUID = m_pInstance->GetData64(NPC_ARTHAS); + if(Creature* pArthas = m_pInstance->instance->GetCreature(m_uiArthasGUID)) + { + pArthas->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + pArthas->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->GetGUID()); + pArthas->GetMotionMaster()->MovePoint(0, 1902.974f, 1291.635f, 143.337f); + } + break; + case 4: + SetRun(false); + if(Creature *pArthas = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_ARTHAS))) + ((npc_arthasAI*)pArthas->AI())->StartAI(); + break; + case 6: + m_creature->SetVisibility(VISIBILITY_OFF); + uint64 m_uiJainaGUID = m_pInstance->GetData64(NPC_JAINA); + if(Creature* pJaina = m_pInstance->instance->GetCreature(m_uiJainaGUID)) + pJaina->SetVisibility(VISIBILITY_OFF); + break; } } + + void UpdateAI(const uint32 uiDiff) + { + npc_escortAI::UpdateAI(uiDiff); + + if(!m_pInstance) return; + + return; + } }; - -CreatureAI* GetAI_npc_arthas(Creature* pCreature) + +/*### +## npc_chromi_middle +###*/ + +#define GOSSIP_ITEM_CHROMI1 "What do you think they're up to?" +#define GOSSIP_ITEM_CHROMI2 "What want me to do what?" +#define GOSSIP_ITEM_CHROMI3 "Very well, Chromie." + +enum { - return new npc_arthasAI(pCreature); + QUEST_ROYAL_ESCORT = 13151, + GOSSIP_TEXTID_CHROMI1 = 12953, + GOSSIP_TEXTID_CHROMI2 = 12949, + GOSSIP_TEXTID_CHROMI3 = 12950, + GOSSIP_TEXTID_CHROMI4 = 12952 +}; + +bool GossipHello_npc_chromi_middle(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + //if (pPlayer->GetQuestStatus(QUEST_ROYAL_ESCORT) == QUEST_STATUS_INCOMPLETE) return true; + + ScriptedInstance* pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + if(pInstance && pInstance->GetData(TYPE_INTRO) == NOT_STARTED) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_CHROMI1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_CHROMI1, pCreature->GetGUID()); + + return true; } - -bool GossipHello_npc_arthas(Player *player, Creature *mCreature) + +bool GossipSelect_npc_chromi_middle(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - if (mCreature->isQuestGiver()) - player->PrepareQuestMenu(mCreature->GetGUID()); - - if(((npc_arthasAI*)mCreature->AI())->arthas_event == 0) + if(ScriptedInstance* m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData())) + if(m_pInstance->GetData(TYPE_INTRO) != NOT_STARTED) return true; + + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_CHROMI2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_CHROMI2, pCreature->GetGUID()); + } + + if (uiAction == GOSSIP_ACTION_INFO_DEF+2) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_CHROMI3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); + + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_CHROMI3, pCreature->GetGUID()); + } + + if (uiAction == GOSSIP_ACTION_INFO_DEF+3) + { + // START COUNTER HERE + if(ScriptedInstance* m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData())) + m_pInstance->DoUpdateWorldState(WORLD_STATE_COS_CRATE_ON, 0); + + ScriptedInstance* m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + + if(Creature *pUther = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_UTHER))) + ((npc_utherAI*)pUther->AI())->StartAI(); + + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_CHROMI4, pCreature->GetGUID()); + } + + return true; +} + +/*### +## npc_arthas_dialog +###*/ + +enum +{ + GOSSIP_MENU_ARTHAS_1 = 100001, + GOSSIP_MENU_ARTHAS_2 = 100002, + GOSSIP_MENU_ARTHAS_3 = 100003, + GOSSIP_MENU_ARTHAS_4 = 100004, + GOSSIP_MENU_ARTHAS_5 = 100005 +}; + +#define GOSSIP_ITEM_ARTHAS_0 "I'm ready to start Culling of Stratholme." +#define GOSSIP_ITEM_ARTHAS_1 "Yes, my Prince. We're ready." +#define GOSSIP_ITEM_ARTHAS_2 "We're only doing what is best for Loarderon your Highness." +#define GOSSIP_ITEM_ARTHAS_3 "I'm ready." +#define GOSSIP_ITEM_ARTHAS_4 "For Lordaeron!" +#define GOSSIP_ITEM_ARTHAS_5 "I'm ready to battle the dreadlord, sire." + +bool GossipHello_npc_arthas(Player* pPlayer, Creature* pCreature) +{ + ScriptedInstance* pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + + if(pInstance && pInstance->GetData(TYPE_PHASE) == 0) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ARTHAS_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_MENU_ARTHAS_1, pCreature->GetGUID()); + } + + if(pInstance && pInstance->GetData(TYPE_PHASE) == 5) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ARTHAS_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_MENU_ARTHAS_2, pCreature->GetGUID()); + } + + if(pInstance && pInstance->GetData(TYPE_PHASE) == 8) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ARTHAS_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_MENU_ARTHAS_3, pCreature->GetGUID()); + } + + if(pInstance && pInstance->GetData(TYPE_PHASE) == 9) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ARTHAS_4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_MENU_ARTHAS_4, pCreature->GetGUID()); + } + + return true; +} + +bool GossipSelect_npc_arthas(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + ScriptedInstance* m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + + if(m_pInstance && m_pInstance->GetData(TYPE_PHASE) == 0) + { + m_pInstance->SetData(TYPE_PHASE, 1); + ((npc_arthasAI*)pCreature->AI())->EnableEscort(); + ((npc_arthasAI*)pCreature->AI())->RemoveGossip(); + ((npc_arthasAI*)pCreature->AI())->culling_faction = pPlayer->getFaction(); + } + + if(m_pInstance && m_pInstance->GetData(TYPE_PHASE) == 5) + { + ((npc_arthasAI*)pCreature->AI())->EnableEscort(); + ((npc_arthasAI*)pCreature->AI())->RemoveGossip(); + } + + if(m_pInstance && m_pInstance->GetData(TYPE_PHASE) == 8) + { + ((npc_arthasAI*)pCreature->AI())->EnableEscort(); + ((npc_arthasAI*)pCreature->AI())->RemoveGossip(); + } + + if(m_pInstance && m_pInstance->GetData(TYPE_PHASE) == 9) + { + ((npc_arthasAI*)pCreature->AI())->EnableEscort(); + ((npc_arthasAI*)pCreature->AI())->RemoveGossip(); + if(Creature* pMalganis = pCreature->SummonCreature(NPC_MALGANIS,2296.665f,1502.362f,128.362f,4.961f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,900000)) + { + m_pInstance->SetData64(NPC_MALGANIS, pMalganis->GetGUID()); + pMalganis->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + } + } + + return true; +} + +/*### +## npc_arthas_priest +###*/ + +enum +{ + SPELL_SMITE = 61923, + SPELL_HEAL = 62442 +}; + +struct MANGOS_DLL_DECL npc_arthas_priestAI : public ScriptedAI +{ + npc_arthas_priestAI(Creature *c) : ScriptedAI(c) + { + SetCombatMovement(false); + Reset(); + } + + uint32 m_uiSmiteTimer; + uint32 m_uiHealTimer; + + void Reset() + { + m_uiSmiteTimer = 100; + m_uiHealTimer = 1000; + } + + void AttackStart(Unit* pWho) + { + if (!pWho) + return; + + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + } + } + + void EnterEvadeMode() + { + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->LoadCreaturesAddon(); + + m_creature->SetLootRecipient(NULL); + + Reset(); + } + + void MoveInLineOfSight(Unit* pWho) + { + if (!pWho) + return; + + if (!m_creature->hasUnitState(UNIT_STAT_STUNNED) && pWho->isTargetableForAttack() && + m_creature->IsHostileTo(pWho) && pWho->isInAccessablePlaceFor(m_creature)) { - if (player->FindQuestSlot(13151)>=25) + if (!m_creature->canFly() && m_creature->GetDistanceZ(pWho) > CREATURE_Z_ATTACK_RANGE) + return; + + float attackRadius = m_creature->GetAttackDistance(pWho); + if (m_creature->IsWithinDistInMap(pWho, attackRadius) && m_creature->IsWithinLOSInMap(pWho)) + { + if (!m_creature->getVictim()) { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "You don't have the Quest for this instance", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - player->SEND_GOSSIP_MENU(player->GetGossipTextId(mCreature), mCreature->GetGUID()); - return true; + AttackStart(pWho); + pWho->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); } - if (player->FindQuestSlot(13151)<=25) + else if (m_creature->GetMap()->IsDungeon()) { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "I\'m ready start culling of stratholme", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - player->SEND_GOSSIP_MENU(player->GetGossipTextId(mCreature), mCreature->GetGUID()); - return true; + pWho->SetInCombatWith(m_creature); + m_creature->AddThreat(pWho, 0.0f); } + } } - if(((npc_arthasAI*)mCreature->AI())->FinalFight == 1) + } + + void UpdateAI(const uint32 uiDiff) + { + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if(m_uiSmiteTimer < uiDiff) { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "We are ready to Final Combat!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); - player->SEND_GOSSIP_MENU(player->GetGossipTextId(mCreature), mCreature->GetGUID()); - player->hasQuest(13151); - return true; + DoCast(m_creature->getVictim(), SPELL_SMITE); + m_uiSmiteTimer = 3000; } - return true; -} - -bool GossipSelect_npc_arthas(Player *player, Creature *mCreature, uint32 sender, uint32 uiAction ) -{ - switch(uiAction) + else m_uiSmiteTimer -= uiDiff; + + if(m_uiHealTimer < uiDiff) { - case GOSSIP_ACTION_INFO_DEF+1: - player->CLOSE_GOSSIP_MENU(); - ((npc_arthasAI*)mCreature->AI())->arthas_event = 1; - break; - case GOSSIP_ACTION_INFO_DEF+2: - player->CLOSE_GOSSIP_MENU(); - break; - case GOSSIP_ACTION_INFO_DEF+3: - player->CLOSE_GOSSIP_MENU(); - ((npc_arthasAI*)mCreature->AI())->FinalFight = 2; + if(m_creature->GetHealthPercent() <= 40.0f) + { + m_creature->InterruptNonMeleeSpells(false); + DoCast(m_creature, SPELL_HEAL); + m_uiHealTimer = 3000; + } } - ((npc_arthasAI*)mCreature->AI())->culling_faction = player; - - return true; -} - -/*###### -## npc_patricia -######*/ -struct MANGOS_DLL_DECL npc_patriciaAI : public ScriptedAI + else m_uiHealTimer -= uiDiff; + + DoMeleeAttackIfReady(); + + return; + } +}; + +/*### +## npc_arthas_marine +###*/ + +struct MANGOS_DLL_DECL npc_arthas_marineAI : public ScriptedAI { - npc_patriciaAI(Creature *c) : ScriptedAI(c) - { - m_pInstance = (ScriptedInstance*)c->GetInstanceData(); - Reset(); - } - - ScriptedInstance* m_pInstance; - - Unit* Target; - Creature* Arthas; - Creature* Meathook; - Creature* Patricia; - - uint32 Step; - uint32 Steptim; - - bool Event; - bool Event2; - bool Event2Com; - - void Reset() - { - Event = false; - Event2 = true; - Event2Com = false; - Step = 1; - Steptim = 20000; - if(Event == true){} - else - Event = false; - } - - void MoveInLineOfSight(Unit *who) + npc_arthas_marineAI(Creature *c) : ScriptedAI(c) + { + Reset(); + } + + float LastX; + float LastY; + float LastZ; + + uint32 m_uiHealTimer; + + void Reset() + { + m_uiHealTimer = 3000; + } + + void Aggro(Unit* who) + { + LastX = m_creature->GetPositionX(); + LastY = m_creature->GetPositionY(); + LastZ = m_creature->GetPositionZ(); + } + + void AttackStart(Unit* pWho) + { + if (!pWho) + return; + + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + + if (IsCombatMovement()) + m_creature->GetMotionMaster()->MoveChase(pWho); + } + } + + void EnterEvadeMode() + { + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->LoadCreaturesAddon(); + + m_creature->SetLootRecipient(NULL); + m_creature->GetMotionMaster()->MovePoint(POINT_LAST_POINT, LastX, LastY, LastZ); + + Reset(); + } + + void MoveInLineOfSight(Unit* pWho) + { + if (!pWho) + return; + + if (!m_creature->hasUnitState(UNIT_STAT_STUNNED) && pWho->isTargetableForAttack() && + m_creature->IsHostileTo(pWho) && pWho->isInAccessablePlaceFor(m_creature)) { - - if (Event2 == false) + if (!m_creature->canFly() && m_creature->GetDistanceZ(pWho) > CREATURE_Z_ATTACK_RANGE) + return; + + float attackRadius = m_creature->GetAttackDistance(pWho); + if (m_creature->IsWithinDistInMap(pWho, attackRadius) && m_creature->IsWithinLOSInMap(pWho)) + { + if (!m_creature->getVictim()) { - Target = who; - Event2Com = true; + AttackStart(pWho); + pWho->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); } - - if (Event == false && m_creature->IsWithinDistInMap(who, 20.0f)) + else if (m_creature->GetMap()->IsDungeon()) { - if (m_pInstance->GetData(TYPE_ARTHAS_EVENT) == IN_PROGRESS) - { - Event = true; - } + pWho->SetInCombatWith(m_creature); + m_creature->AddThreat(pWho, 0.0f); } - ScriptedAI::MoveInLineOfSight(who); - } - - void UpdateAI(const uint32 diff) - { - DoMeleeAttackIfReady(); - - if(Event == true) - { - switch(Step) - { - case 1: - Patricia = m_creature; - DoScriptText(SAY_PEOPLE05, Patricia); - ++Step; - Steptim = 5000; - break; - case 3: - Patricia->RemoveSplineFlag(SPLINEFLAG_WALKMODE); - DoScriptText(SAY_PEOPLE06, Patricia); - Patricia->GetMotionMaster()->MovePoint(0, 2395.487f,1203.199f,134.125f); - ++Step; - Steptim = 13000; - break; - case 5: - Patricia->GetMotionMaster()->MovePoint(0, 2431.674f,1211.797f,134.124f); - ++Step; - Steptim = 7000; - break; - case 7: - Patricia->GetMotionMaster()->MovePoint(0, 2438.028f,1206.680f,133.935f); - ++Step; - Steptim = 3000; - break; - case 9: - Patricia->GetMotionMaster()->MovePoint(0, 2437.524f,1206.971f,133.935f); - Event2 = false; - ++Step; - Steptim = 3000; - break; - case 11: - if(Event2Com == false) - return; - Patricia->SetUInt64Value(UNIT_FIELD_TARGET, Target->GetGUID()); - ++Step; - Steptim = 1000; - break; - case 13: - DoScriptText(SAY_PEOPLE07, m_creature); - ++Step; - Steptim = 4000; - break; - case 15: - DoScriptText(SAY_PEOPLE08, m_creature); - ++Step; - Steptim = 4000; - break; - case 17: - DoScriptText(SAY_PEOPLE09, m_creature); - ++Step; - Steptim = 9000; - break; - case 19: - m_creature->UpdateEntry(NPC_ZOMBIE, 0); - Event = 0; - ++Step; - Steptim = 7000; - break; } } - else - return; - - if (Steptim <= diff) - { - ++Step; - Steptim = 330000; - } - Steptim -= diff; - } + + void UpdateAI(const uint32 uiDiff) + { + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if(m_uiHealTimer < uiDiff) + { + if(m_creature->GetHealthPercent() <= 40.0f) + { + if(Creature* pHeal = GetClosestCreatureWithEntry(m_creature, NPC_PRIEST, 50.0f)) + { + if(pHeal->GetHealthPercent() > 40.0f) + { + pHeal->InterruptNonMeleeSpells(false); + pHeal->CastSpell(m_creature, SPELL_HEAL, false); + m_uiHealTimer = 3000; + } + } + } + } + else m_uiHealTimer -= uiDiff; + + DoMeleeAttackIfReady(); + + return; + } }; - -CreatureAI* GetAI_npc_patricia(Creature* pCreature) + +/*### +## npc_dark_conversion +###*/ + +/*enum { - return new npc_patriciaAI(pCreature); -} - -/*###### -## dark_conversion_AI -######*/ -struct MANGOS_DLL_DECL dark_conversionAI : public ScriptedAI + SAY_PEOPLE01 = -1594099, + SAY_PEOPLE02 = -1594100, + SAY_PEOPLE03 = -1594101, + SAY_PEOPLE04 = -1594102, + SAY_PEOPLE05 = -1594103, +};*/ + +struct MANGOS_DLL_DECL npc_dark_conversionAI : public ScriptedAI { - dark_conversionAI(Creature *c) : ScriptedAI(c) - { - m_pInstance = (ScriptedInstance*)c->GetInstanceData(); - Reset(); - } - - ScriptedInstance* m_pInstance; - - Unit* Target; - Creature* Arthas; - bool Conversion; - uint32 Step; - uint32 Steptim; - - void Reset() - { + npc_dark_conversionAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_creature->SetActiveObjectState(true); + Reset(); + } + +ScriptedInstance* m_pInstance; + +bool Special; +bool Conversion; +uint32 m_uiStep; +uint32 m_uiStepTimer; + + void Reset() + { m_creature->setFaction(35); Conversion = false; - Step = 1; - Steptim = 500; - } - - void MoveInLineOfSight(Unit *who) - { - if (Conversion == false && m_creature->IsWithinDistInMap(who, 30.0f)) - { - if (m_pInstance->GetData(TYPE_ARTHAS_EVENT) == IN_PROGRESS) - { - Target = who; - Conversion = true; - } - } - ScriptedAI::MoveInLineOfSight(who); - } - - void UpdateAI(const uint32 diff) - { - - DoMeleeAttackIfReady(); + Special = false; + m_uiStep = 1; + m_uiStepTimer = 5000; + } + + void MalganisScared(Creature* target, float horizontalSpeed, float verticalSpeed) + { + float angle = target->GetAngle(m_creature); + float vsin = sin(angle); + float vcos = cos(angle); + + float ox, oy, oz; + m_creature->GetPosition(ox, oy, oz); + + float g = 19.23f;// seems that physic constant g(earth's gravity) in world of warcraft is about 2 times larger than real + float dh = verticalSpeed*verticalSpeed / (2*g); // maximum parabola height + float time = sqrtf(dh/(0.124976 * verticalSpeed)); //full move time in seconds // should be time = 2*Vert_speed/g, but.. + + float dis = time * horizontalSpeed; + float fx = ox + dis * vcos; + float fy = oy + dis * vsin; + float fz = oz; + + m_creature->UpdateGroundPositionZ(fx, fy, fz); + + m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + m_creature->GetMotionMaster()->MovePoint(0, fx, fy, fz); + } - if(Conversion == true) + void DarkConversion(bool Move) + { + m_creature->UpdateEntry(NPC_ZOMBIE); + if(Move == true) { - switch(Step) - { - case 1: - m_creature->setFaction(14); //2078 - m_creature->CastSpell(m_creature,SPELL_FEAR,false); - switch(rand()%12) - { - case 0: DoScriptText(SAY_PEOPLE01, m_creature); break; - case 1: DoScriptText(SAY_PEOPLE02, m_creature); break; - case 2: DoScriptText(SAY_PEOPLE03, m_creature); break; - case 3: DoScriptText(SAY_PEOPLE04, m_creature); break; - case 4: DoScriptText(SAY_PEOPLE10, m_creature); break; - case 5: DoScriptText(SAY_PEOPLE11, m_creature); break; - case 6: DoScriptText(SAY_PEOPLE12, m_creature); break; - case 7: DoScriptText(SAY_PEOPLE13, m_creature); break; - } - ++Step; - Steptim = 5000 + rand()%5000; - break; - case 3: - m_creature->UpdateEntry(NPC_ZOMBIE, 0); - m_creature->GetMotionMaster()->MovePoint(0, Target->GetPositionX(), Target->GetPositionY(), Target->GetPositionZ()); - ++Step; - Steptim = 1000; - break; - } + uint64 m_uiArthasGUID = m_pInstance->GetData64(NPC_ARTHAS); + if(Creature* pArthas = m_pInstance->instance->GetCreature(m_uiArthasGUID)) + m_creature->GetMotionMaster()->MovePoint(0, pArthas->GetPositionX(), pArthas->GetPositionY(), pArthas->GetPositionZ()); } - else - return; - - if (Steptim <= diff) - { - ++Step; - Steptim = 330000; - } - Steptim -= diff; - + } + + void UpdateAI(const uint32 uiDiff) + { + if(!m_pInstance) return; + + if(m_pInstance->GetData(TYPE_ENCOUNTER) == IN_PROGRESS) + { + if(Creature* pMalganis = GetClosestCreatureWithEntry(m_creature, NPC_MALGANIS_INTRO, 20.0f)) + { + if(Special == false) + { + float Dist = m_creature->GetDistance2d(pMalganis->GetPositionX(), pMalganis->GetPositionY()); + Dist = Dist + 2.0f; + MalganisScared(pMalganis, Dist, 1.0f); + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_COWER); + m_uiStepTimer = 5000; + Special = true; + } + } + + if(m_uiStepTimer < uiDiff && Conversion != true) + { + Conversion = true; + if(Special != false) + DarkConversion(true); + else + DarkConversion(false); + } + else m_uiStepTimer -= uiDiff; + + } + + DoMeleeAttackIfReady(); + + return; } }; - -CreatureAI* GetAI_dark_conversion(Creature* pCreature) + +CreatureAI* GetAI_npc_uther(Creature* pCreature) { - return new dark_conversionAI(pCreature); + return new npc_utherAI(pCreature); } - -/*###### -## npc_time_riftCSAI -######*/ -struct MANGOS_DLL_DECL npc_time_riftCSAI : public ScriptedAI + +CreatureAI* GetAI_npc_arthas(Creature* pCreature) { - npc_time_riftCSAI(Creature *c) : ScriptedAI(c) - { - Reset(); - } - - Creature* Drakonian01; - Creature* Drakonian02; - Creature* Drakonian03; - Creature* Arthas; - bool Conversion; - uint32 Step; - uint32 Steptim; - - void Reset() - { - Conversion = false; - Step = 1; - Steptim = 500; - } - void UpdateAI(const uint32 diff) - { - switch(Step) - { - case 1: - if (Creature* pArthas = GetClosestCreatureWithEntry(m_creature, NPC_ARTHAS, 180.0f)) - Arthas = pArthas; - Drakonian01 = m_creature->SummonCreature(NPC_DRAKONIAN,m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ()+1,3.229f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,900000); - Drakonian01->GetMotionMaster()->MovePoint(0, Arthas->GetPositionX(), Arthas->GetPositionY(), Arthas->GetPositionZ()); - ++Step; - Steptim = 3000; - break; - case 3: - Drakonian02 = m_creature->SummonCreature(NPC_DRAKONIAN,m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ()+1,3.229f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,900000); - Drakonian02->GetMotionMaster()->MovePoint(0, Arthas->GetPositionX(), Arthas->GetPositionY(), Arthas->GetPositionZ()); - ++Step; - Steptim = 3000; - break; - case 5: - Drakonian03 = m_creature->SummonCreature(NPC_DRAKONIAN,m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ()+1,3.229f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,900000); - Drakonian03->GetMotionMaster()->MovePoint(0, Arthas->GetPositionX(), Arthas->GetPositionY(), Arthas->GetPositionZ()); - ++Step; - Steptim = 3000; - break; - } - - if (Steptim <= diff) - { - ++Step; - Steptim = 330000; - } - Steptim -= diff; - } -}; - -CreatureAI* GetAI_npc_time_riftCS(Creature* pCreature) + return new npc_arthasAI(pCreature); +} + +CreatureAI* GetAI_npc_arthas_priest(Creature* pCreature) { - return new npc_time_riftCSAI(pCreature); + return new npc_arthas_priestAI(pCreature); } - + +CreatureAI* GetAI_npc_arthas_marine(Creature* pCreature) +{ + return new npc_arthas_marineAI(pCreature); +} + +CreatureAI* GetAI_npc_dark_conversion(Creature* pCreature) +{ + return new npc_dark_conversionAI(pCreature); +} + void AddSC_culling_of_stratholme() { Script *newscript; - + + newscript = new Script; + newscript->Name = "npc_chromi_middle"; + newscript->pGossipHello = &GossipHello_npc_chromi_middle; + newscript->pGossipSelect = &GossipSelect_npc_chromi_middle; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_uther"; + newscript->GetAI = &GetAI_npc_uther; + newscript->RegisterSelf(); + newscript = new Script; newscript->Name = "npc_arthas"; newscript->GetAI = &GetAI_npc_arthas; - newscript->pGossipHello = &GossipHello_npc_arthas; + newscript->pGossipHello = &GossipHello_npc_arthas; newscript->pGossipSelect = &GossipSelect_npc_arthas; newscript->RegisterSelf(); - + newscript = new Script; - newscript->Name = "dark_conversion"; - newscript->GetAI = &GetAI_dark_conversion; + newscript->Name = "npc_arthas_priest"; + newscript->GetAI = &GetAI_npc_arthas_priest; newscript->RegisterSelf(); - + newscript = new Script; - newscript->Name = "npc_patricia"; - newscript->GetAI = &GetAI_npc_patricia; + newscript->Name = "npc_arthas_marine"; + newscript->GetAI = &GetAI_npc_arthas_marine; newscript->RegisterSelf(); - + newscript = new Script; - newscript->Name = "npc_time_riftCS"; - newscript->GetAI = &GetAI_npc_time_riftCS; + newscript->Name = "npc_dark_conversion"; + newscript->GetAI = &GetAI_npc_dark_conversion; newscript->RegisterSelf(); } \ No newline at end of file diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholmeai.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholmeai.cpp new file mode 100644 index 000000000..fc4e055de --- /dev/null +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholmeai.cpp @@ -0,0 +1,1255 @@ +/* Copyright (C) 2006 - 2010 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + +/* ScriptData +SDName: instance_culling_of_stratholme +SD%Complete: ?% +SDComment: by MaxXx2021 +SDCategory: Culling of Stratholme +EndScriptData */ + +#include "precompiled.h" +#include "def_culling_of_stratholme.h" +#include "escort_ai.h" +#include "WorldPacket.h" + +/*### +## npc_chromi_start +###*/ + +#define GOSSIP_ITEM_CHROMI1 "Why have I been sent back to this particular place and time?" +#define GOSSIP_ITEM_CHROMI2 "What was this decision?" +#define GOSSIP_ITEM_CHROMI3 "So how does the infinite Dragonflight plan to Interfere?" + +enum +{ + QUEST_ILLUSION = 13149, + ITEM_ENTRY_ARCANE_DISRUPTOR = 37888, + GOSSIP_TEXTID_CHROMI1 = 12939, + GOSSIP_TEXTID_CHROMI2 = 12949, + GOSSIP_TEXTID_CHROMI3 = 12950, + GOSSIP_TEXTID_CHROMI4 = 12952 +}; + +bool GossipHello_npc_chromi_start(Player* pPlayer, Creature* pCreature) +{ + if(pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if(pPlayer->GetQuestStatus(QUEST_ILLUSION) == QUEST_STATUS_INCOMPLETE) return true; + + if(ScriptedInstance* m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData())) + if(m_pInstance->GetData(TYPE_QUEST) != DONE && !pPlayer->HasItemCount(ITEM_ENTRY_ARCANE_DISRUPTOR,1)) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_CHROMI1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_CHROMI1, pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_chromi_start(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_CHROMI2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_CHROMI2, pCreature->GetGUID()); + } + + if (uiAction == GOSSIP_ACTION_INFO_DEF+2) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_CHROMI3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); + + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_CHROMI3, pCreature->GetGUID()); + } + + if (uiAction == GOSSIP_ACTION_INFO_DEF+3) + { + // START COUNTER HERE + if(ScriptedInstance* m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData())) + m_pInstance->DoUpdateWorldState(WORLD_STATE_COS_CRATE_ON, 1); + if (Item* pItem = pPlayer->StoreNewItemInInventorySlot(ITEM_ENTRY_ARCANE_DISRUPTOR, 1)) + pPlayer->SendNewItem(pItem, 1, true, false); + + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_CHROMI4, pCreature->GetGUID()); + } + + return true; +} + +/*### +## npc_mike +###*/ + +enum +{ + SAY_MIKE01 = -1557270, + SAY_FORRESTER02 = -1557271, + SAY_JAMES03 = -1557272, + SAY_SIABI04 = -1557273, + SAY_MIKE05 = -1557274, + SAY_CORICKS06 = -1557275, + SAY_GRIAN07 = -1557276, + SAY_CORICKS08 = -1557277, + SAY_JAMES09 = -1557278, + SAY_FORRESTER10 = -1557279, + + EMOTE_SHOT = 5, + EMOTE_TALK = 1, + EMOTE_POINT = 25, + EMOTE_NO = 274, + EMOTE_LAUGH = 11 +}; + +struct MANGOS_DLL_DECL npc_mikeAI : public ScriptedAI +{ + npc_mikeAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_creature->SetActiveObjectState(true); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 m_uiStep; + uint32 m_uiStepTimer; + uint32 m_uiPhase; + + uint64 m_uiForesterGUID; + uint64 m_uiJamesGUID; + uint64 m_uiSiabiGUID; + uint64 m_uiCorricksGUID; + uint64 m_uiGryanGUID; + + void Reset() + { + if(m_uiPhase != 2) + { + m_uiStep = 0; + m_uiStepTimer = 100; + m_uiPhase = 0; + } + } + + void MoveInLineOfSight(Unit* who) + { + if (!who) + return; + + if(!m_pInstance) return; + + if (who->GetTypeId() == TYPEID_PLAYER && m_creature->GetDistance2d(who) <= 15 && who->GetPositionZ() > 99.50f && m_uiPhase == 0) + { + m_creature->SetUInt64Value(UNIT_FIELD_TARGET, who->GetGUID()); + m_uiPhase = 1; + } + } + + void TavernEvent() + { + switch(m_uiStep) + { + case 0: + DoScriptText(SAY_MIKE01, m_creature); + m_uiStepTimer = 4000; + break; + case 1: + m_creature->SetUInt64Value(UNIT_FIELD_TARGET, 0); + m_uiStepTimer = 5000; + break; + case 2: + m_uiForesterGUID = m_pInstance->GetData64(NPC_FORRESTER); + if(Creature* pTemp = m_pInstance->instance->GetCreature(m_uiForesterGUID)) + DoScriptText(SAY_FORRESTER02, pTemp); + m_uiStepTimer = 6000; + break; + case 3: + m_uiJamesGUID = m_pInstance->GetData64(NPC_JAMES); + if(Creature* pTemp = m_pInstance->instance->GetCreature(m_uiJamesGUID)) + DoScriptText(SAY_JAMES03, pTemp); + m_uiStepTimer = 5000; + break; + case 4: + m_uiSiabiGUID = m_pInstance->GetData64(NPC_FRAS_FRASIABI); + if(Creature* pTemp = m_pInstance->instance->GetCreature(m_uiSiabiGUID)) + DoScriptText(SAY_SIABI04, pTemp); + m_uiStepTimer = 2000; + break; + case 5: + if(Creature* pTemp = m_pInstance->instance->GetCreature(m_uiSiabiGUID)) + pTemp->HandleEmoteCommand(EMOTE_SHOT); + m_uiStepTimer = 5000; + break; + case 6: + m_creature->GetMotionMaster()->MovePoint(0, 1554.849f, 588.465f, 99.775f); + m_uiStepTimer = 3000; + break; + case 7: + if(Creature* pTemp = m_pInstance->instance->GetCreature(m_uiSiabiGUID)) + pTemp->HandleEmoteCommand(EMOTE_LAUGH); + m_uiStepTimer = 3000; + break; + case 8: + DoScriptText(SAY_MIKE05, m_creature); + m_uiStepTimer = 2000; + break; + case 9: + m_creature->HandleEmoteCommand(EMOTE_SHOT); + m_uiStepTimer = 1000; + break; + case 10: + m_uiCorricksGUID = m_pInstance->GetData64(NPC_MAL_CORICS); + if(Creature* pTemp = m_pInstance->instance->GetCreature(m_uiCorricksGUID)) + DoScriptText(SAY_CORICKS06, pTemp); + m_uiStepTimer = 4000; + break; + case 11: + if(Creature* pTemp = m_pInstance->instance->GetCreature(m_uiCorricksGUID)) + pTemp->HandleEmoteCommand(EMOTE_TALK); + m_uiGryanGUID = m_pInstance->GetData64(NPC_GRIAN_STONE); + if(Creature* pTemp = m_pInstance->instance->GetCreature(m_uiGryanGUID)) + DoScriptText(SAY_GRIAN07, pTemp); + m_uiStepTimer = 11000; + break; + case 12: + if(Creature* pTemp = m_pInstance->instance->GetCreature(m_uiCorricksGUID)) + DoScriptText(SAY_CORICKS08, pTemp); + m_creature->GetMotionMaster()->MovePoint(0, 1549.609f, 575.544f, 100.052f); + m_uiStepTimer = 2000; + break; + case 13: + if(Creature* pTemp = m_pInstance->instance->GetCreature(m_uiJamesGUID)) + DoScriptText(SAY_JAMES09, pTemp); + m_uiStepTimer = 2000; + break; + case 14: + if(Creature* pTemp = m_pInstance->instance->GetCreature(m_uiJamesGUID)) + pTemp->HandleEmoteCommand(EMOTE_TALK); + m_uiStepTimer = 5000; + break; + case 15: + if(Creature* pTemp = m_pInstance->instance->GetCreature(m_uiForesterGUID)) + DoScriptText(SAY_FORRESTER10, pTemp); + m_uiPhase = 2; + break; + } + } + + void UpdateAI(const uint32 uiDiff) + { + if(m_uiPhase == 1) + { + if(m_uiStepTimer < uiDiff) + { + TavernEvent(); + m_uiStep++; + } + else m_uiStepTimer -= uiDiff; + } + + return; + } +}; + +/*### +## npc_roger +###*/ + +enum +{ + SAY_ROGER01 = -1557280, + SAY_ROGER02 = -1557281, + SAY_ROGER03 = -1557282, + SAY_ROGER04 = -1557283, +}; + +struct MANGOS_DLL_DECL npc_rogerAI : public ScriptedAI +{ + npc_rogerAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_creature->SetActiveObjectState(true); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 m_uiStep; + uint32 m_uiStepTimer; + uint32 m_uiPhase; + + void Reset() + { + if(m_uiPhase != 2) + { + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + m_uiStep = 0; + m_uiStepTimer = 100; + m_uiPhase = 0; + } + } + + void StartRoger() + { + m_uiPhase = 1; + } + + void FirstCrateEvent() + { + switch(m_uiStep) + { + case 0: + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_uiStepTimer = 7000; + break; + case 1: + MoveToPoint(m_creature, 1590.055f, 615.727f, 99.795f, 7000); + m_uiStepTimer = 6900; + break; + case 2: + MoveToPoint(m_creature, 1584.039f, 622.049f, 99.907f, 4000); + m_uiStepTimer = 3900; + break; + case 3: + MoveToPoint(m_creature, 1578.787f, 623.924f, 99.855f, 2000); + m_uiStepTimer = 2500; + break; + case 4: + DoScriptText(SAY_ROGER01, m_creature); + m_uiStepTimer = 6000; + break; + case 5: + MoveToPoint(m_creature, 1579.393f, 624.018f, 99.886f, 900); + m_uiStepTimer = 2000; + break; + case 6: + DoScriptText(SAY_ROGER02, m_creature); + m_uiStepTimer = 6000; + break; + case 7: + MoveToPoint(m_creature, 1579.387f, 623.198f, 99.837f, 300); + m_uiStepTimer = 1000; + break; + case 8: + DoScriptText(SAY_ROGER03, m_creature); + m_uiStepTimer = 4000; + break; + case 9: + MoveToPoint(m_creature, 1575.576f, 619.935f, 99.422f, 1500); + m_uiStepTimer = 2000; + break; + case 10: + MoveToPoint(m_creature, 1575.833f, 620.471f, 99.466f, 300); + m_uiStepTimer = 1000; + break; + case 11: + DoScriptText(SAY_ROGER04, m_creature); + m_uiStepTimer = 6000; + break; + case 12: + MoveToPoint(m_creature, 1580.215f, 624.368f, 99.924f, 2000); + m_uiStepTimer = 1900; + break; + case 13: + MoveToPoint(m_creature, 1587.471f, 618.181f, 99.850f, 4000); + m_uiStepTimer = 3900; + break; + case 14: + MoveToPoint(m_creature, 1592.646f, 590.888f, 99.151f, 11000); + m_uiStepTimer = 13000; + break; + case 15: + m_uiPhase = 2; + m_creature->SetVisibility(VISIBILITY_OFF); + break; + } + } + + void MoveToPoint(Creature* unit, float X, float Y, float Z, uint32 Timer) + { + unit->GetMotionMaster()->MovementExpired(false); + unit->GetMap()->CreatureRelocation(unit, X, Y, Z, unit->GetOrientation()); + unit->SendMonsterMove(X, Y, Z, SPLINETYPE_NORMAL , unit->GetSplineFlags(), Timer); + } + + void UpdateAI(const uint32 uiDiff) + { + if(m_uiPhase == 1) + { + if(m_uiStepTimer < uiDiff) + { + FirstCrateEvent(); + m_uiStep++; + } + else m_uiStepTimer -= uiDiff; + } + + return; + } +}; + +/*### +## npc_morigan +###*/ + +enum +{ + SAY_MORIGAN01 = -1557284, + SAY_PERELLI02 = -1557285, + SAY_MORIGAN03 = -1557286, + SAY_PERELLI04 = -1557287, + SAY_MORIGAN05 = -1557288, + SAY_PERELLI06 = -1557289, + SAY_MORIGAN07 = -1557290, +}; + +struct MANGOS_DLL_DECL npc_moriganAI : public ScriptedAI +{ + npc_moriganAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_creature->SetActiveObjectState(true); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint64 m_uiPerelliGUID; + uint32 m_uiStep; + uint32 m_uiStepTimer; + uint32 m_uiPhase; + + void Reset() + { + if(m_uiPhase != 2) + { + m_uiStep = 0; + m_uiStepTimer = 100; + m_uiPhase = 0; + } + } + + void StartMorigan() + { + m_uiPhase = 1; + } + + void SecondCrateEvent() + { + switch(m_uiStep) + { + case 0: + DoScriptText(SAY_MORIGAN01, m_creature); + m_uiStepTimer = 6000; + break; + case 1: + m_uiPerelliGUID = m_pInstance->GetData64(NPC_PERELLI); + if(Creature* pTemp = m_pInstance->instance->GetCreature(m_uiPerelliGUID)) + DoScriptText(SAY_PERELLI02, pTemp); + m_uiStepTimer = 2000; + break; + case 2: + m_creature->GetMotionMaster()->MovePoint(0, 1564.138f, 668.343f, 102.058f); + m_uiStepTimer = 2000; + break; + case 3: + m_creature->GetMotionMaster()->MovePoint(0, 1567.956f, 667.776f, 102.094f); + m_uiStepTimer = 1500; + break; + case 4: + m_creature->GetMotionMaster()->MovementExpired(false); + m_creature->GetMotionMaster()->MovePoint(0, 1569.615f, 668.859f, 102.180f); + m_uiStepTimer = 2000; + break; + case 5: + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + m_uiStepTimer = 1000; + break; + case 6: + DoScriptText(SAY_MORIGAN03, m_creature); + m_uiStepTimer = 3000; + break; + case 7: + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + if(Creature* pTemp = m_pInstance->instance->GetCreature(m_uiPerelliGUID)) + { + m_creature->SetUInt64Value(UNIT_FIELD_TARGET, pTemp->GetGUID()); + pTemp->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->GetGUID()); + } + m_uiStepTimer = 3000; + break; + case 8: + if(Creature* pTemp = m_pInstance->instance->GetCreature(m_uiPerelliGUID)) + DoScriptText(SAY_PERELLI04, pTemp); + m_uiStepTimer = 3000; + break; + case 9: + DoScriptText(SAY_MORIGAN05, m_creature); + m_uiStepTimer = 9000; + break; + case 10: + if(Creature* pTemp = m_pInstance->instance->GetCreature(m_uiPerelliGUID)) + DoScriptText(SAY_PERELLI06, pTemp); + m_uiStepTimer = 6000; + break; + case 11: + DoScriptText(SAY_MORIGAN07, m_creature); + m_uiStepTimer = 4000; + break; + case 12: + m_creature->SetUInt64Value(UNIT_FIELD_TARGET, 0); + if(Creature* pTemp = m_pInstance->instance->GetCreature(m_uiPerelliGUID)) + pTemp->SetUInt64Value(UNIT_FIELD_TARGET, 0); + MoveToPoint(m_creature, 1576.119f, 657.675f, 102.09f, 5000); + m_uiStepTimer = 4900; + break; + case 13: + MoveToPoint(m_creature, 1586.040f, 646.113f, 100.910f, 6000); + m_uiStepTimer = 5900; + break; + case 14: + MoveToPoint(m_creature, 1609.189f, 697.134f, 106.902f, 23000); + m_uiStepTimer = 24900; + break; + case 15: + m_uiPhase = 2; + m_creature->SetVisibility(VISIBILITY_OFF); + break; + } + } + + void MoveToPoint(Creature* unit, float X, float Y, float Z, uint32 Timer) + { + unit->GetMap()->CreatureRelocation(unit, X, Y, Z, unit->GetOrientation()); + unit->SendMonsterMove(X, Y, Z, SPLINETYPE_NORMAL , unit->GetSplineFlags(), Timer); + } + + void UpdateAI(const uint32 uiDiff) + { + if(m_uiPhase == 1) + { + if(m_uiStepTimer < uiDiff) + { + SecondCrateEvent(); + m_uiStep++; + } + else m_uiStepTimer -= uiDiff; + } + + return; + } +}; + +/*### +## npc_jena +###*/ + +enum +{ + SAY_JENA01 = -1557291, + SAY_MARTHA02 = -1557292, + SAY_JENA03 = -1557293, + SAY_JENA04 = -1557294, + SAY_MARTHA05 = -1557295, + +}; + +struct MANGOS_DLL_DECL npc_jenaAI : public ScriptedAI +{ + npc_jenaAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_creature->SetActiveObjectState(true); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint64 m_uiMarthaGUID; + uint32 m_uiStep; + uint32 m_uiStepTimer; + uint32 m_uiPhase; + + void Reset() + { + if(m_uiPhase != 2) + { + m_uiStep = 0; + m_uiStepTimer = 100; + m_uiPhase = 0; + } + } + + void StartJena() + { + m_uiPhase = 1; + } + + void ThirdCrateEvent() + { + switch(m_uiStep) + { + case 0: + m_creature->GetMotionMaster()->MovementExpired(false); + m_creature->GetMotionMaster()->MovePoint(0, 1605.546f, 744.869f, 114.731f); + m_uiStepTimer = 1900; + break; + case 1: + m_creature->GetMotionMaster()->MovementExpired(false); + m_creature->GetMotionMaster()->MovePoint(0, 1614.967f, 743.673f, 114.063f); + m_uiStepTimer = 4900; + break; + case 2: + m_creature->GetMotionMaster()->MovementExpired(false); + m_creature->GetMotionMaster()->MovePoint(0, 1623.848f, 729.251f, 112.410f); + m_uiStepTimer = 6900; + break; + case 3: + m_creature->GetMotionMaster()->MovementExpired(false); + m_creature->GetMotionMaster()->MovePoint(0, 1633.460f, 726.261f, 113.518f); + m_uiStepTimer = 4000; + break; + case 4: + m_uiMarthaGUID = m_pInstance->GetData64(NPC_MARTHA); + if(Creature* pTemp = m_pInstance->instance->GetCreature(m_uiMarthaGUID)) + m_creature->SetUInt64Value(UNIT_FIELD_TARGET, pTemp->GetGUID()); + DoScriptText(SAY_JENA01, m_creature); + m_uiStepTimer = 3000; + break; + case 5: + if(Creature* pTemp = m_pInstance->instance->GetCreature(m_uiMarthaGUID)) + { + pTemp->RemoveAurasDueToSpell(58925); + pTemp->GetMotionMaster()->MovePoint(0, 1635.918f, 724.357f, 113.561f); + } + m_uiStepTimer = 1000; + break; + case 6: + if(Creature* pTemp = m_pInstance->instance->GetCreature(m_uiMarthaGUID)) + { + pTemp->GetMotionMaster()->MovementExpired(false); + pTemp->GetMotionMaster()->MovePoint(0, 1636.721f, 725.88f, 113.561f); + pTemp->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->GetGUID()); + } + m_uiStepTimer = 1000; + break; + case 7: + if(Creature* pTemp = m_pInstance->instance->GetCreature(m_uiMarthaGUID)) + DoScriptText(SAY_MARTHA02, pTemp); + m_uiStepTimer = 4000; + break; + case 8: + DoScriptText(SAY_JENA03, m_creature); + m_uiStepTimer = 3000; + break; + case 9: + m_creature->SetUInt64Value(UNIT_FIELD_TARGET, 0); + m_creature->GetMotionMaster()->MovePoint(0, 1629.278f, 727.894f, 112.636f); + m_uiStepTimer = 1500; + break; + case 10: + if(Creature* pTemp = m_pInstance->instance->GetCreature(m_uiMarthaGUID)) + { + pTemp->SetUInt64Value(UNIT_FIELD_TARGET, 0); + pTemp->GetMap()->CreatureRelocation(pTemp, 1640.089f, 725.766f, 113.561f, 4.77f); + pTemp->SendMonsterMove(1640.089f, 725.766f, 113.561f, SPLINETYPE_NORMAL , pTemp->GetSplineFlags(), 1500); + } + m_creature->GetMotionMaster()->MovementExpired(false); + m_creature->GetMotionMaster()->MovePoint(0, 1629.452f, 729.416f, 112.712f); + m_uiStepTimer = 1000; + break; + case 11: + if(Creature* pTemp = m_pInstance->instance->GetCreature(m_uiMarthaGUID)) + pTemp->GetMotionMaster()->MovePoint(0, 1640.103f, 725.522f, 113.561f); + m_uiStepTimer = 500; + break; + case 12: + if(Creature* pTemp = m_pInstance->instance->GetCreature(m_uiMarthaGUID)) + pTemp->CastSpell(pTemp, 58925, false); + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + m_uiStepTimer = 1500; + break; + case 13: + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_uiStepTimer = 1000; + break; + case 14: + if(Creature* pTemp = m_pInstance->instance->GetCreature(m_uiMarthaGUID)) + m_creature->SetUInt64Value(UNIT_FIELD_TARGET, pTemp->GetGUID()); + DoScriptText(SAY_JENA04, m_creature); + m_uiStepTimer = 3000; + break; + case 15: + if(Creature* pTemp = m_pInstance->instance->GetCreature(m_uiMarthaGUID)) + { + pTemp->RemoveAurasDueToSpell(58925); + DoScriptText(SAY_MARTHA05, pTemp); + MoveToPoint(pTemp, 1638.196f, 726.171f, 113.561f, 1000); + } + m_creature->SetUInt64Value(UNIT_FIELD_TARGET, 0); + MoveToPoint(m_creature, 1615.590f, 719.509f, 110.311f, 2000); + m_uiStepTimer = 2000; + break; + case 16: + MoveToPoint(m_creature, 1596.436f, 670.809f, 103.747f, 7000); + m_uiStepTimer = 6900; + break; + case 17: + MoveToPoint(m_creature, 1571.549f, 609.837f, 99.767f, 9000); + m_uiStepTimer = 11000; + break; + case 18: + m_uiPhase = 2; + m_creature->SetVisibility(VISIBILITY_OFF); + break; + } + } + + void MoveToPoint(Creature* unit, float X, float Y, float Z, uint32 Timer) + { + unit->GetMap()->CreatureRelocation(unit, X, Y, Z, unit->GetOrientation()); + unit->SendMonsterMove(X, Y, Z, SPLINETYPE_NORMAL , unit->GetSplineFlags(), Timer); + } + + void UpdateAI(const uint32 uiDiff) + { + if(m_uiPhase == 1) + { + if(m_uiStepTimer < uiDiff) + { + ThirdCrateEvent(); + m_uiStep++; + } + else m_uiStepTimer -= uiDiff; + } + + return; + } +}; + +/*### +## npc_malcolm +###*/ + +enum +{ + SOUND_ID_DOG_GROWL = 1108, + SOUND_ID_DOG_HOWL = 1018, + EMOTE_DOG_HOWL = 393, + + SAY_MALCOLM01 = -1557296, + SAY_MALCOLM02 = -1557297, + SAY_MALCOLM03 = -1557298, + SAY_MALCOLM04 = -1557299, +}; + +struct MANGOS_DLL_DECL npc_malcolmAI : public ScriptedAI +{ + npc_malcolmAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_creature->SetActiveObjectState(true); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint64 m_uiDogGUID; + uint32 m_uiStep; + uint32 m_uiStepTimer; + uint32 m_uiPhase; + + void Reset() + { + if(m_uiPhase != 2) + { + m_uiStep = 0; + m_uiStepTimer = 100; + m_uiPhase = 0; + } + } + + void StartMalcolm() + { + m_uiPhase = 1; + } + + void FourCrateEvent() + { + switch(m_uiStep) + { + case 0: + MoveToPoint(m_creature, 1614.066f, 796.722f, 121.739f, 5500); + m_uiDogGUID = m_pInstance->GetData64(NPC_DOG); + if(Creature* pTemp = m_pInstance->instance->GetCreature(m_uiDogGUID)) + MoveToPoint(pTemp, 1611.459f, 793.274f, 121.928f, 5500); + m_uiStepTimer = 5400; + break; + case 1: + DoScriptText(SAY_MALCOLM01, m_creature); + MoveToPoint(m_creature, 1622.820f, 798.816f, 120.570f, 3500); + if(Creature* pTemp = m_pInstance->instance->GetCreature(m_uiDogGUID)) + MoveToPoint(pTemp, 1621.467f, 794.323f, 120.323f, 3500); + m_uiStepTimer = 3400; + break; + case 2: + MoveToPoint(m_creature, 1626.574f, 806.781f, 120.270f, 3500); + if(Creature* pTemp = m_pInstance->instance->GetCreature(m_uiDogGUID)) + MoveToPoint(pTemp, 1629.232f, 803.629f, 120.011f, 3500); + m_uiStepTimer = 3400; + break; + case 3: + MoveToPoint(m_creature, 1622.782f, 808.533f, 121.249f, 1500); + if(Creature* pTemp = m_pInstance->instance->GetCreature(m_uiDogGUID)) + MoveToPoint(pTemp, 1629.265f, 805.245f, 120.070f, 300); + m_uiStepTimer = 300; + break; + case 4: + if(Creature* pTemp = m_pInstance->instance->GetCreature(m_uiDogGUID)) + pTemp->PlayDirectSound(SOUND_ID_DOG_GROWL); + m_uiStepTimer = 500; + break; + case 5: + if(Creature* pTemp = m_pInstance->instance->GetCreature(m_uiDogGUID)) + m_creature->SetUInt64Value(UNIT_FIELD_TARGET, pTemp->GetGUID()); + DoScriptText(SAY_MALCOLM02, m_creature); + m_uiStepTimer = 2000; + break; + case 6: + if(Creature* pTemp = m_pInstance->instance->GetCreature(m_uiDogGUID)) + MoveToPoint(pTemp, 1629.163f, 809.738f, 120.369f, 1500); + m_uiStepTimer = 2000; + break; + case 7: + if(Creature* pTemp = m_pInstance->instance->GetCreature(m_uiDogGUID)) + { + pTemp->HandleEmoteCommand(EMOTE_DOG_HOWL); + pTemp->PlayDirectSound(SOUND_ID_DOG_HOWL); + } + m_uiStepTimer = 4000; + break; + case 8: + m_creature->SetUInt64Value(UNIT_FIELD_TARGET, 0); + MoveToPoint(m_creature, 1629.922f, 807.799f, 120.122f, 3000); + m_uiStepTimer = 2900; + break; + case 9: + MoveToPoint(m_creature, 1632.169f, 809.851f, 120.047f, 1000); + m_uiStepTimer = 900; + break; + case 10: + MoveToPoint(m_creature, 1630.651f, 811.149f, 120.307f, 800); + m_uiStepTimer = 800; + break; + case 11: + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + DoScriptText(SAY_MALCOLM03, m_creature); + m_uiStepTimer = 4000; + break; + case 12: + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + if(Creature* pTemp = m_pInstance->instance->GetCreature(m_uiDogGUID)) + m_creature->SetUInt64Value(UNIT_FIELD_TARGET, pTemp->GetGUID()); + DoScriptText(SAY_MALCOLM04, m_creature); + m_uiStepTimer = 7000; + break; + case 13: + if(Creature* pTemp = m_pInstance->instance->GetCreature(m_uiDogGUID)) + MoveToPoint(pTemp, 1630.692f, 808.011f, 120.083f, 400); + m_uiStepTimer = 600; + break; + case 14: + if(Creature* pTemp = m_pInstance->instance->GetCreature(m_uiDogGUID)) + pTemp->SetStandState(UNIT_STAND_STATE_SIT); + m_creature->SetUInt64Value(UNIT_FIELD_TARGET, 0); + MoveToPoint(m_creature, 1641.452f, 812.600f, 119.948f, 4000); + m_uiStepTimer = 3900; + break; + case 15: + MoveToPoint(m_creature, 1657.975f, 857.352f, 119.097f, 18000); + m_uiStepTimer = 17900; + break; + case 16: + MoveToPoint(m_creature, 1679.852f, 912.245f, 120.533f, 23000); + m_uiStepTimer = 22900; + break; + case 17: + MoveToPoint(m_creature, 1699.915f, 967.110f, 121.643f, 23000); + m_uiStepTimer = 22900; + break; + case 18: + MoveToPoint(m_creature, 1678.393f, 1026.890f, 125.431f, 25000); + m_uiStepTimer = 24900; + break; + case 19: + MoveToPoint(m_creature, 1678.943f, 1093.130f, 126.899f, 26000); + m_uiStepTimer = 25900; + break; + case 20: + MoveToPoint(m_creature, 1700.042f, 1103.880f, 130.872f, 9000); + m_uiStepTimer = 10900; + break; + case 21: + m_uiPhase = 2; + m_creature->SetVisibility(VISIBILITY_OFF); + break; + } + } + + void MoveToPoint(Creature* unit, float X, float Y, float Z, uint32 Timer) + { + unit->GetMap()->CreatureRelocation(unit, X, Y, Z, unit->GetOrientation()); + unit->SendMonsterMove(X, Y, Z, SPLINETYPE_NORMAL , unit->GetSplineFlags(), Timer); + } + + void UpdateAI(const uint32 uiDiff) + { + if(m_uiPhase == 1) + { + if(m_uiStepTimer < uiDiff) + { + FourCrateEvent(); + m_uiStep++; + } + else m_uiStepTimer -= uiDiff; + } + + return; + } +}; + +/*### +## npc_bartleby +###*/ + +enum +{ + SAY_BARTLEBY01 = -1557300, + SAY_BARTLEBY02 = -1557301, + SAY_BARTLEBY03 = -1557302, + SAY_BARTLEBY04 = -1557303, + SAY_BARTLEBY05 = -1557304, +}; + +struct MANGOS_DLL_DECL npc_bartleby_csAI : public ScriptedAI +{ + npc_bartleby_csAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_creature->SetActiveObjectState(true); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 m_uiStep; + uint32 m_uiStepTimer; + uint32 m_uiPhase; + + void Reset() + { + if(m_uiPhase != 4) + { + m_uiStep = 0; + m_uiStepTimer = 100; + m_uiPhase = 0; + } + } + + void MoveInLineOfSight(Unit* who) + { + if (!who) + return; + + if(!m_pInstance) return; + + if (who->GetTypeId() == TYPEID_PLAYER && m_creature->GetDistance2d(who) <= 20 && m_uiPhase == 0) + { + m_uiPhase = 1; + } + } + + void StartBartleby() + { + m_uiPhase = 3; + } + + void FifthCrateEvent() + { + switch(m_uiStep) + { + case 0: + DoScriptText(SAY_BARTLEBY03, m_creature); + MoveToPoint(m_creature, 1672.539f, 872.277f, 120.113f, 1000); + m_uiStepTimer = 1000; + break; + case 1: + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + m_uiStepTimer = 3000; + break; + case 2: + DoScriptText(SAY_BARTLEBY04, m_creature); + m_uiStepTimer = 7000; + break; + case 3: + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_uiStepTimer = 1000; + break; + case 4: + DoScriptText(SAY_BARTLEBY05, m_creature); + MoveToPoint(m_creature, 1663.054f, 869.959f, 119.734f, 3000); + m_uiStepTimer = 2900; + break; + case 5: + MoveToPoint(m_creature, 1640.732f, 812.422f, 119.933f, 24000); + m_uiStepTimer = 23900; + break; + case 6: + MoveToPoint(m_creature, 1623.704f, 755.741f, 115.710f, 23000); + m_uiStepTimer = 22900; + break; + case 7: + MoveToPoint(m_creature, 1607.108f, 699.637f, 106.971f, 23000); + m_uiStepTimer = 22900; + break; + case 8: + MoveToPoint(m_creature, 1587.750f, 646.929f, 100.990f, 21000); + m_uiStepTimer = 20900; + break; + case 9: + MoveToPoint(m_creature, 1571.103f, 660.949f, 102.084f, 8000); + m_uiStepTimer = 10900; + break; + case 10: + m_uiPhase = 4; + m_creature->SetVisibility(VISIBILITY_OFF); + break; + } + } + + void SpeechEvent() + { + switch(m_uiStep) + { + case 0: + DoScriptText(SAY_BARTLEBY01, m_creature); + m_uiStepTimer = 5000; + break; + case 1: + DoScriptText(SAY_BARTLEBY02, m_creature); + if(m_uiPhase == 1) + m_uiPhase = 2; + break; + } + } + + void MoveToPoint(Creature* unit, float X, float Y, float Z, uint32 Timer) + { + unit->GetMap()->CreatureRelocation(unit, X, Y, Z, unit->GetOrientation()); + unit->SendMonsterMove(X, Y, Z, SPLINETYPE_NORMAL , unit->GetSplineFlags(), Timer); + } + + void UpdateAI(const uint32 uiDiff) + { + if(m_uiPhase == 3) + { + if(m_uiStepTimer < uiDiff) + { + FifthCrateEvent(); + m_uiStep++; + } + else m_uiStepTimer -= uiDiff; + } + + if(m_uiPhase == 1) + { + if(m_uiStepTimer < uiDiff) + { + SpeechEvent(); + m_uiStep++; + } + else m_uiStepTimer -= uiDiff; + } + + return; + } +}; + +/*### +## npc_crates +###*/ + +enum +{ + SPELL_LIGHT = 49590 +}; + +struct MANGOS_DLL_DECL npc_stratholme_cratesAI : public ScriptedAI +{ + npc_stratholme_cratesAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_creature->SetActiveObjectState(true); + Reset(); + } + + ScriptedInstance* m_pInstance; + + bool Active; + + void Reset() + { + } + + void UpdateAI(const uint32 uiDiff) + { + if(!m_pInstance) return; + + if(m_creature->HasAura(SPELL_LIGHT) && Active != true) + { + if(Creature* pRoger = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_ROGER))) + { + if(m_creature->GetDistance2d(pRoger->GetPositionX(), pRoger->GetPositionY()) < 50.0f) + { + ((npc_rogerAI*)pRoger->AI())->StartRoger(); + } + } + + if(Creature* pMorigan = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_MORIGAN))) + { + if(m_creature->GetDistance2d(pMorigan->GetPositionX(), pMorigan->GetPositionY()) < 50.0f) + { + ((npc_moriganAI*)pMorigan->AI())->StartMorigan(); + } + } + + if(Creature* pJena = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_JENA))) + { + if(m_creature->GetDistance2d(pJena->GetPositionX(), pJena->GetPositionY()) < 50.0f) + { + ((npc_jenaAI*)pJena->AI())->StartJena(); + } + } + + if(Creature* pMalcolm = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_MALCOLM))) + { + if(m_creature->GetDistance2d(pMalcolm->GetPositionX(), pMalcolm->GetPositionY()) < 50.0f) + { + ((npc_malcolmAI*)pMalcolm->AI())->StartMalcolm(); + } + } + + if(Creature* pBartleby = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_BARTLEBY))) + { + if(m_creature->GetDistance2d(pBartleby->GetPositionX(), pBartleby->GetPositionY()) < 50.0f) + { + ((npc_bartleby_csAI*)pBartleby->AI())->StartBartleby(); + } + } + + m_pInstance->SetData(TYPE_CRATES_COUNT, 1); + if(GameObject* pLight = GetClosestGameObjectWithEntry(m_creature, GO_CRATE_LIGHT, 5.0f)) + pLight->SetPhaseMask(0, true); + //m_creature->SetPhaseMask(0, true); + Active = true; + } + + return; + } +}; + +CreatureAI* GetAI_npc_mike(Creature* pCreature) +{ + return new npc_mikeAI(pCreature); +} + +CreatureAI* GetAI_npc_roger(Creature* pCreature) +{ + return new npc_rogerAI(pCreature); +} + +CreatureAI* GetAI_npc_morigan(Creature* pCreature) +{ + return new npc_moriganAI(pCreature); +} + +CreatureAI* GetAI_npc_jena(Creature* pCreature) +{ + return new npc_jenaAI(pCreature); +} + +CreatureAI* GetAI_npc_malcolm(Creature* pCreature) +{ + return new npc_malcolmAI(pCreature); +} + +CreatureAI* GetAI_npc_bartleby_cs(Creature* pCreature) +{ + return new npc_bartleby_csAI(pCreature); +} + +CreatureAI* GetAI_npc_stratholme_crates(Creature* pCreature) +{ + return new npc_stratholme_cratesAI(pCreature); +} + +void AddSC_culling_of_stratholmeAI() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_chromi_start"; + newscript->pGossipHello = &GossipHello_npc_chromi_start; + newscript->pGossipSelect = &GossipSelect_npc_chromi_start; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_mike"; + newscript->GetAI = &GetAI_npc_mike; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_roger"; + newscript->GetAI = &GetAI_npc_roger; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_morigan"; + newscript->GetAI = &GetAI_npc_morigan; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_jena"; + newscript->GetAI = &GetAI_npc_jena; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_malcolm"; + newscript->GetAI = &GetAI_npc_malcolm; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_bartleby_cs"; + newscript->GetAI = &GetAI_npc_bartleby_cs; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_stratholme_crates"; + newscript->GetAI = &GetAI_npc_stratholme_crates; + newscript->RegisterSelf(); +} diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/def_culling_of_stratholme.h b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/def_culling_of_stratholme.h index 04b2d23d7..3a1c08ed6 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/def_culling_of_stratholme.h +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/def_culling_of_stratholme.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 @@ -13,54 +13,93 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - - + + /* ScriptData SDName: instance_culling_of_stratholme SD%Complete: ?% -SDComment: +SDComment: by MaxXx2021 SDCategory: Culling of Stratholme EndScriptData */ - - - - + #ifndef DEF_CULLING_OF_STRATHOLME_H #define DEF_CULLING_OF_STRATHOLME_H - + enum Data { - MAX_ENCOUNTER = 5, - TYPE_ARTHAS_EVENT = 0, - TYPE_SALRAMM_EVENT = 1, - TYPE_MEATHOOK_EVENT = 2, - TYPE_EPOCH_EVENT = 3, - TYPE_MALGANIS_EVENT = 4, - TYPE_TIME_EVENT = 6, - - DATA_GO_SHKAF_GATE = 8, - DATA_GO_MAL_GATE1 = 9, - DATA_GO_MAL_GATE2 = 10, - DATA_GO_MAL_CHEST = 11, - DATA_ARTHAS = 12, - DATA_SALRAMM = 13, - DATA_MEATHOOK = 14, - DATA_EPOCH = 15, - DATA_MALGANIS = 16, - - - NPC_ARTHAS = 26499, // Arthas - NPC_MEATHOOK = 26529, // Meathook - NPC_SALRAMM = 26530, // Salramm - NPC_EPOCH = 26532, // Lord Epoch - NPC_MALGANIS = 26533, // Mal'Ganis - - // Wave Event - TYPE_WAVE_EVENT = 17, - WORLD_STATE_WAVE = 3504, - WORLD_STATE_TIME = 3932, - WORLD_STATE_REMAIN = 3931 + TYPE_QUEST = 1, + TYPE_INTRO = 2, + TYPE_CRATES_COUNT = 3, + TYPE_PHASE = 4, + TYPE_ENCOUNTER = 5, + TYPE_WAVE_COUNT = 6, + TYPE_WING = 7, + TYPE_BONUS = 8, + TYPE_MALGANIS = 9, + + DATA_TEMPSUMMON = 10, + + NPC_CHROMI01 = 26527, + NPC_CHROMI02 = 27915, + NPC_ARTHAS = 26499, + NPC_JAINA = 26497, + NPC_UTHER = 26528, + NPC_KNIGHT = 28612, + NPC_MIKE = 30571, + NPC_MAL_CORICS = 31017, + NPC_GRIAN_STONE = 30561, + NPC_JAMES = 30553, + NPC_FRAS_FRASIABI = 30552, + NPC_FORRESTER = 30551, + NPC_ROGER = 27903, + NPC_CRATE = 30996, + NPC_MORIGAN = 27877, + NPC_PERELLI = 27876, + NPC_JENA = 27885, + NPC_MARTHA = 27884, + NPC_MALCOLM = 27891, + NPC_DOG = 27892, + NPC_BARTLEBY = 27907, + NPC_MARINE = 27745, + NPC_PRIEST = 27747, + + NPC_INFINITE_ADVERSARY = 27742, + NPC_INFINITE_HUNTER = 27743, + NPC_INFINITE_AGENT = 27744, + NPC_TIME_RIFT = 28409, + NPC_TIME_RIFT_2 = 28439, + NPC_ZOMBIE = 27737, + NPC_GHOUL = 28249, + NPC_NECROMANCER = 28200, + NPC_STALKER = 28199, + NPC_FIEND = 27734, + NPC_GOLEM = 28201, + NPC_EGHOUL = 27729, + NPC_CONSTRUCT = 27736, + NPC_ACOLYTE = 27731, + NPC_MEATHOOK = 26529, + NPC_SALRAMM = 26530, + NPC_EPOCH = 26532, + NPC_MALGANIS = 26533, + NPC_CITY = 28167, + NPC_INFINITE_CORRUPTOR = 32273, + + GO_CRATE_LIGHT = 190117, + GO_SHKAF_GATE = 188686, + GO_MALGANIS_GATE1 = 187711, + GO_MALGANIS_GATE2 = 187723, + GO_MALGANIS_CHEST = 190663, + GO_EXIT = 191788, + + + WORLD_STATE_COS_TIME_ON = 3932, + WORLD_STATE_COS_TIME_COUNT = 3931, + WORLD_STATE_COS_WAVE_COUNT = 3504, + WORLD_STATE_COS_CRATE_ON = 3479, + WORLD_STATE_COS_CRATE_COUNT = 3480, + + RIGHT = 1, + LEFT = 2 }; - + #endif - \ No newline at end of file diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp index 87686ba7f..d1b08ee58 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2010 ScriptDev2 * 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 @@ -13,256 +13,361 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - - + + /* ScriptData SDName: instance_culling_of_stratholme SD%Complete: ?% -SDComment: +SDComment: by MaxXx2021 SDCategory: Culling of Stratholme EndScriptData */ - - - + #include "precompiled.h" #include "def_culling_of_stratholme.h" - -#define GO_SHKAF_GATE 188686 -#define GO_MALGANIS_GATE1 187711 -#define GO_MALGANIS_GATE2 187723 -#define GO_MALGANIS_CHEST 190663 - + struct MANGOS_DLL_DECL instance_culling_of_stratholme : public ScriptedInstance { - instance_culling_of_stratholme(Map* pMap) : ScriptedInstance(pMap) - { - Initialize(); - }; - - uint32 m_auiEncounter[MAX_ENCOUNTER]; - std::string strInstData; - + instance_culling_of_stratholme(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + + uint8 m_uiCratesCount; + uint32 m_auiEncounter[7]; + uint32 m_uiHeroicTimer; + uint32 m_uiLastTimer; + + uint64 m_uiChromi01GUID; + uint64 m_uiChromi02GUID; + uint64 m_uiMikeGUID; + uint64 m_uiMalCoricsGUID; + uint64 m_uiGrianStoneGUID; + uint64 m_uiJamesGUID; + uint64 m_uiFrasCiabiGUID; + uint64 m_uiForrestenGUID; + uint64 m_uiRogerGUID; + uint64 m_uiMoriganGUID; + uint64 m_uiPerelliGUID; + uint64 m_uiJenaGUID; + uint64 m_uiMarthaGUID; + uint64 m_uiMalcolmGUID; + uint64 m_uiDogGUID; + uint64 m_uiBartlebyGUID; + uint64 m_uiArthasGUID; + uint64 m_uiUtherGUID; + uint64 m_uiJainaGUID; + uint64 m_uiSalrammGUID; + uint64 m_uiMalganisGUID; + uint64 m_uiCorruptorGUID; + uint64 m_uiShkafGateGUID; uint64 m_uiMalGate1GUID; uint64 m_uiMalGate2GUID; uint64 m_uiMalChestGUID; - - uint64 m_uilordEpochGUID; - uint64 m_uiMeathookGUID; - uint64 m_uiSalrammGUID; - uint64 m_uiMalganisGUID; - uint64 m_uiArthasGUID; - + uint64 m_uiExitGUID; + void Initialize() { - m_uiShkafGateGUID = 0; - m_uiMalGate1GUID = 0; - m_uiMalGate2GUID = 0; - m_uiMalChestGUID = 0; - - m_uilordEpochGUID = 0; - m_uiMeathookGUID = 0; - m_uiSalrammGUID = 0; - m_uiMalganisGUID = 0; - m_uiArthasGUID = 0; - } - - bool IsEncounterInProgress() const - { - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) - { - if (m_auiEncounter[i] == IN_PROGRESS) - return true; - } - - return false; + m_uiHeroicTimer = 1500000; + m_uiLastTimer = 1500000; + m_auiEncounter[0] = NOT_STARTED; + m_auiEncounter[1] = NOT_STARTED; + m_auiEncounter[2] = 0; + m_auiEncounter[3] = NOT_STARTED; + m_auiEncounter[4] = 0; + m_auiEncounter[5] = NOT_STARTED; + m_auiEncounter[6] = NOT_STARTED; + + DoUpdateWorldState(WORLD_STATE_COS_CRATE_COUNT, 0); + DoUpdateWorldState(WORLD_STATE_COS_CRATE_ON, 0); + DoUpdateWorldState(WORLD_STATE_COS_WAVE_COUNT, 0); + DoUpdateWorldState(WORLD_STATE_COS_TIME_COUNT, 0); + DoUpdateWorldState(WORLD_STATE_COS_TIME_ON, 0); + + m_uiCratesCount = 0; + m_uiMikeGUID = 0; + m_uiChromi01GUID = 0; + m_uiChromi02GUID = 0; + m_uiMalCoricsGUID = 0; + m_uiGrianStoneGUID = 0; + m_uiJamesGUID = 0; + m_uiFrasCiabiGUID = 0; + m_uiForrestenGUID = 0; + m_uiRogerGUID = 0; + m_uiMoriganGUID = 0; + m_uiPerelliGUID = 0; + m_uiJenaGUID = 0; + m_uiMarthaGUID = 0; + m_uiMalcolmGUID = 0; + m_uiDogGUID = 0; + m_uiBartlebyGUID = 0; + m_uiArthasGUID = 0; + m_uiUtherGUID = 0; + m_uiJainaGUID = 0; + m_uiShkafGateGUID = 0; + m_uiSalrammGUID = 0; + m_uiCorruptorGUID = 0; + m_uiMalganisGUID = 0; + m_uiMalGate1GUID = 0; + m_uiMalGate2GUID = 0; + m_uiMalChestGUID = 0; + m_uiExitGUID = 0; } - + void OnCreatureCreate(Creature* pCreature) { switch(pCreature->GetEntry()) { + case NPC_CHROMI01: + pCreature->SetActiveObjectState(true); + m_uiChromi01GUID = pCreature->GetGUID(); + break; + case NPC_MIKE: + m_uiMikeGUID = pCreature->GetGUID(); + break; + case NPC_MAL_CORICS: + pCreature->SetActiveObjectState(true); + m_uiMalCoricsGUID = pCreature->GetGUID(); + break; + case NPC_GRIAN_STONE: + pCreature->SetActiveObjectState(true); + pCreature->SetStandState(UNIT_STAND_STATE_SIT_MEDIUM_CHAIR); + m_uiGrianStoneGUID = pCreature->GetGUID(); + break; + case NPC_JAMES: + pCreature->SetActiveObjectState(true); + pCreature->SetStandState(UNIT_STAND_STATE_SIT_MEDIUM_CHAIR); + m_uiJamesGUID = pCreature->GetGUID(); + break; + case NPC_FRAS_FRASIABI: + pCreature->SetActiveObjectState(true); + pCreature->SetStandState(UNIT_STAND_STATE_SIT_MEDIUM_CHAIR); + m_uiFrasCiabiGUID = pCreature->GetGUID(); + break; + case NPC_FORRESTER: + pCreature->SetActiveObjectState(true); + pCreature->SetStandState(UNIT_STAND_STATE_SIT_MEDIUM_CHAIR); + m_uiForrestenGUID = pCreature->GetGUID(); + break; + case NPC_ROGER: + m_uiRogerGUID = pCreature->GetGUID(); + break; + case NPC_MORIGAN: + m_uiMoriganGUID = pCreature->GetGUID(); + break; + case NPC_PERELLI: + pCreature->SetActiveObjectState(true); + m_uiPerelliGUID = pCreature->GetGUID(); + break; + case NPC_JENA: + m_uiJenaGUID = pCreature->GetGUID(); + break; + case NPC_MARTHA: + pCreature->CastSpell(pCreature, 58925, false); + pCreature->SetActiveObjectState(true); + m_uiMarthaGUID = pCreature->GetGUID(); + break; + case NPC_MALCOLM: + m_uiMalcolmGUID = pCreature->GetGUID(); + break; + case NPC_DOG: + pCreature->SetActiveObjectState(true); + m_uiDogGUID = pCreature->GetGUID(); + break; + case NPC_BARTLEBY: + m_uiBartlebyGUID = pCreature->GetGUID(); + break; + case NPC_UTHER: + m_uiUtherGUID = pCreature->GetGUID(); + break; case NPC_ARTHAS: - { - m_uiArthasGUID = pCreature->GetGUID(); - break; - } - case NPC_SALRAMM: - { - m_uiSalrammGUID = pCreature->GetGUID(); - pCreature->SetVisibility(VISIBILITY_OFF); - pCreature->setFaction(35); - break; - } - case NPC_MEATHOOK: - { - m_uiMeathookGUID = pCreature->GetGUID(); - pCreature->SetVisibility(VISIBILITY_OFF); - pCreature->setFaction(35); - break; - } - case NPC_EPOCH: - { - m_uilordEpochGUID = pCreature->GetGUID(); - pCreature->SetVisibility(VISIBILITY_OFF); - pCreature->setFaction(35); - break; - } - case NPC_MALGANIS: - { - m_uiMalganisGUID = pCreature->GetGUID(); - break; - } - } + m_uiArthasGUID = pCreature->GetGUID(); + break; + case NPC_JAINA: + pCreature->SetActiveObjectState(true); + m_uiJainaGUID = pCreature->GetGUID(); + break; + case NPC_INFINITE_CORRUPTOR: + pCreature->SetPhaseMask(0, true); + m_uiCorruptorGUID = pCreature->GetGUID(); + break; + } } - - void OnObjectCreate(GameObject* pGo) + + void OnObjectCreate(GameObject* pGo) { if (pGo->GetEntry() == GO_SHKAF_GATE) m_uiShkafGateGUID = pGo->GetGUID(); - + if (pGo->GetEntry() == GO_MALGANIS_GATE1) m_uiMalGate1GUID = pGo->GetGUID(); - + if (pGo->GetEntry() == GO_MALGANIS_GATE2) m_uiMalGate2GUID = pGo->GetGUID(); - + if (pGo->GetEntry() == GO_MALGANIS_CHEST) + { m_uiMalChestGUID = pGo->GetGUID(); + pGo->SetUInt32Value(GAMEOBJECT_FACTION, 1375); + } + + if (pGo->GetEntry() == GO_EXIT) + m_uiExitGUID = pGo->GetGUID(); } - - uint64 GetData64(uint32 uiData) + + void ChromiWhispers() { - switch(uiData) - { - case DATA_ARTHAS: return m_uiArthasGUID; - case DATA_SALRAMM: return m_uiSalrammGUID; - case DATA_MEATHOOK: return m_uiMeathookGUID; - case DATA_EPOCH: return m_uilordEpochGUID; - case DATA_MALGANIS: return m_uiMalganisGUID; - case DATA_GO_SHKAF_GATE: return m_uiShkafGateGUID; - case DATA_GO_MAL_GATE1: return m_uiMalGate1GUID; - case DATA_GO_MAL_GATE2: return m_uiMalGate2GUID; - case DATA_GO_MAL_CHEST: return m_uiMalChestGUID; - } - - return 0; + + Map::PlayerList const &PlayerList = instance->GetPlayers(); + + if (PlayerList.isEmpty()) + return; + + for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) + { + if(Creature* pChromi = instance->GetCreature(m_uiChromi01GUID)) + pChromi->MonsterWhisper("Good work with crates! Come to me in front of Stratholme for your next assighment!", i->getSource()->GetGUID(), false); + } } - - void SetData(uint32 uiType, uint32 uiData) + + void SetData(uint32 uiType, uint32 uiData) { - bool needSave = false; switch(uiType) { - case TYPE_ARTHAS_EVENT: - { - if (m_auiEncounter[0] == IN_PROGRESS) - needSave = true; - - m_auiEncounter[0] = uiData; + case TYPE_QUEST: + m_auiEncounter[0] = uiData; + break; + case TYPE_CRATES_COUNT: + m_uiCratesCount = m_uiCratesCount + uiData; + if(m_uiCratesCount == 5) + { + m_auiEncounter[0] = DONE; + ChromiWhispers(); + } + DoUpdateWorldState(WORLD_STATE_COS_CRATE_COUNT, m_uiCratesCount); break; - } - case TYPE_SALRAMM_EVENT: - { - if (m_auiEncounter[1] == DONE) - needSave = true; - + case TYPE_INTRO: m_auiEncounter[1] = uiData; break; - } - case TYPE_MEATHOOK_EVENT: - { - if (m_auiEncounter[2] == DONE) - needSave = true; - + case TYPE_PHASE: m_auiEncounter[2] = uiData; break; - } - case TYPE_EPOCH_EVENT: - { - if (m_auiEncounter[3] == DONE) - needSave = true; - + case TYPE_ENCOUNTER: m_auiEncounter[3] = uiData; break; - } - case TYPE_MALGANIS_EVENT: - { - if (m_auiEncounter[4] == DONE) - { - needSave = true; - DoRespawnGameObject(m_uiMalChestGUID,86400); //respawn time for the chest 1 day - } + case TYPE_WING: m_auiEncounter[4] = uiData; break; - } - } - if (uiData == DONE || needSave) + case TYPE_BONUS: + m_auiEncounter[5] = uiData; + if(uiData == IN_PROGRESS) + { + if(Creature* Corruptor = instance->GetCreature(m_uiCorruptorGUID)) + Corruptor->SetPhaseMask(1, true); + DoUpdateWorldState(WORLD_STATE_COS_TIME_ON, 1); + DoUpdateWorldState(WORLD_STATE_COS_TIME_COUNT, 25); + } + break; + case TYPE_MALGANIS: + m_auiEncounter[6] = uiData; + break; + } + } + + void SetData64(uint32 uiData, uint64 uiGuid) + { + switch(uiData) { - OUT_SAVE_INST_DATA; - - std::ostringstream saveStream; - saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3] << " " << m_auiEncounter[4]; - - strInstData = saveStream.str(); - - SaveToDB(); - OUT_SAVE_INST_DATA_COMPLETE; + case NPC_SALRAMM: + m_uiSalrammGUID = uiGuid; + break; + case NPC_MALGANIS: + m_uiMalganisGUID = uiGuid; + break; } } - - uint32 GetData(uint32 uiType) + + uint32 GetData(uint32 uiType) { switch(uiType) { - case TYPE_ARTHAS_EVENT: + case TYPE_QUEST: return m_auiEncounter[0]; - case TYPE_SALRAMM_EVENT: + case TYPE_INTRO: return m_auiEncounter[1]; - case TYPE_MEATHOOK_EVENT: + case TYPE_PHASE: return m_auiEncounter[2]; - case TYPE_EPOCH_EVENT: + case TYPE_ENCOUNTER: return m_auiEncounter[3]; - case TYPE_MALGANIS_EVENT: + case TYPE_WING: return m_auiEncounter[4]; + case TYPE_BONUS: + return m_auiEncounter[5]; + case TYPE_MALGANIS: + return m_auiEncounter[6]; } - return 0; } - - const char* Save() - { - return strInstData.c_str(); - } - - void Load(const char* chrIn) + + uint64 GetData64(uint32 uiData) { - if (!chrIn) - { - OUT_LOAD_INST_DATA_FAIL; - return; - } - - OUT_LOAD_INST_DATA(chrIn); - - std::istringstream loadStream(chrIn); - loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] >> m_auiEncounter[4]; - - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + switch(uiData) { - if (m_auiEncounter[i] == IN_PROGRESS) - m_auiEncounter[i] = NOT_STARTED; + case NPC_FORRESTER: return m_uiForrestenGUID; + case NPC_JAMES: return m_uiJamesGUID; + case NPC_FRAS_FRASIABI: return m_uiFrasCiabiGUID; + case NPC_MAL_CORICS: return m_uiMalCoricsGUID; + case NPC_GRIAN_STONE: return m_uiGrianStoneGUID; + case NPC_ROGER: return m_uiRogerGUID; + case NPC_MORIGAN: return m_uiMoriganGUID; + case NPC_PERELLI: return m_uiPerelliGUID; + case NPC_JENA: return m_uiJenaGUID; + case NPC_MARTHA: return m_uiMarthaGUID; + case NPC_MALCOLM: return m_uiMalcolmGUID; + case NPC_DOG: return m_uiDogGUID; + case NPC_BARTLEBY: return m_uiBartlebyGUID; + case NPC_UTHER: return m_uiUtherGUID; + case NPC_ARTHAS: return m_uiArthasGUID; + case NPC_JAINA: return m_uiJainaGUID; + case NPC_SALRAMM: return m_uiSalrammGUID; + case NPC_MALGANIS: return m_uiMalganisGUID; + case GO_SHKAF_GATE: return m_uiShkafGateGUID; + case GO_MALGANIS_GATE1: return m_uiMalGate1GUID; + case GO_MALGANIS_GATE2: return m_uiMalGate2GUID; + case GO_MALGANIS_CHEST: return m_uiMalChestGUID; + case GO_EXIT: return m_uiExitGUID; } - - OUT_LOAD_INST_DATA_COMPLETE; + + return 0; + } + + void Update(uint32 uiDiff) + { + if(m_auiEncounter[5] == IN_PROGRESS) + { + if(m_uiHeroicTimer < uiDiff) + { + m_auiEncounter[5] = FAIL; + DoUpdateWorldState(WORLD_STATE_COS_TIME_ON, 0); + if(Creature* Corruptor = instance->GetCreature(m_uiCorruptorGUID)) + Corruptor->SetPhaseMask(0, true); + + }else m_uiHeroicTimer -= uiDiff; + + if(m_uiHeroicTimer < m_uiLastTimer - 60000) + { + m_uiLastTimer = m_uiHeroicTimer; + uint32 tMinutes = m_uiHeroicTimer / 60000; + DoUpdateWorldState(WORLD_STATE_COS_TIME_COUNT, tMinutes); + } + } + + return; } }; - + InstanceData* GetInstanceData_instance_culling_of_stratholme(Map* pMap) { return new instance_culling_of_stratholme(pMap); } - + void AddSC_instance_culling_of_stratholme() { Script *newscript; @@ -271,4 +376,3 @@ void AddSC_instance_culling_of_stratholme() newscript->GetInstanceData = &GetInstanceData_instance_culling_of_stratholme; newscript->RegisterSelf(); } - \ No newline at end of file diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/trash_culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/trash_culling_of_stratholme.cpp new file mode 100644 index 000000000..f3c7b20f5 --- /dev/null +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/trash_culling_of_stratholme.cpp @@ -0,0 +1,1094 @@ +/* Copyright (C) 2006 - 2010 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + +/* ScriptData +SDName: instance_culling_of_stratholme +SD%Complete: ?% +SDComment: by MaxXx2021 +SDCategory: Culling of Stratholme +EndScriptData */ + +#include "precompiled.h" +#include "def_culling_of_stratholme.h" + +/*### +## npc_cs_gnoul +###*/ + +enum +{ + SPELL_FLESH = 52352 +}; + +struct MANGOS_DLL_DECL npc_cs_gnoulAI : public ScriptedAI +{ + npc_cs_gnoulAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_creature->SetActiveObjectState(true); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroic; + + uint32 m_uiFleshTimer; + + uint32 WaypointId; + uint32 MoveTimer; + + void Reset() + { + m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + MoveTimer = (urand(100, 5000)); + m_uiFleshTimer = (urand(3000, 10000)); + WaypointId = 1; + } + + void MoveToPoint(float X, float Y, float Z) + { + m_creature->GetMotionMaster()->MovementExpired(false); + m_creature->GetMotionMaster()->MovePoint(0, X, Y, Z); + } + + void AttackStart(Unit* pWho) + { + if (!pWho) + return; + + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + + if (IsCombatMovement()) + m_creature->GetMotionMaster()->MoveChase(pWho); + } + } + + void EnterEvadeMode() + { + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->LoadCreaturesAddon(); + m_uiFleshTimer = (urand(3000, 10000)); + + m_creature->SetLootRecipient(NULL); + } + + void MoveInLineOfSight(Unit* pWho) + { + if (!pWho) + return; + + if (!m_creature->hasUnitState(UNIT_STAT_STUNNED) && pWho->isTargetableForAttack() && + m_creature->IsHostileTo(pWho) && pWho->isInAccessablePlaceFor(m_creature)) + { + if (!m_creature->canFly() && m_creature->GetDistanceZ(pWho) > CREATURE_Z_ATTACK_RANGE) + return; + + float attackRadius = m_creature->GetAttackDistance(pWho); + if (m_creature->IsWithinDistInMap(pWho, attackRadius) && m_creature->IsWithinLOSInMap(pWho)) + { + if (!m_creature->getVictim()) + { + AttackStart(pWho); + pWho->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); + } + else if (m_creature->GetMap()->IsDungeon()) + { + pWho->SetInCombatWith(m_creature); + m_creature->AddThreat(pWho, 0.0f); + } + } + } + } + + void JumpNextStep(uint32 Time) + { + MoveTimer = Time; + WaypointId++; + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim() && m_creature->isTemporarySummon()) + { + if(MoveTimer < uiDiff) + { + if(m_pInstance->GetData(TYPE_WING) == RIGHT) + { + switch(WaypointId) + { + case 1: + MoveToPoint(2356.659f, 1185.501f, 130.636f); + JumpNextStep(10000); + break; + case 2: + MoveToPoint(2301.735f, 1179.265f, 136.944f); + JumpNextStep(8000); + break; + case 3: + MoveToPoint(2234.787f, 1180.638f, 136.344f); + JumpNextStep(9000); + break; + case 4: + MoveToPoint(2178.313f, 1244.350f, 136.107f); + JumpNextStep(12000); + break; + case 5: + MoveToPoint(2163.553f, 1277.814f, 133.444f); + JumpNextStep(5000); + break; + case 6: + MoveToPoint(2083.952f, 1287.716f, 141.146f); + JumpNextStep(5000); + break; + } + } + + if(m_pInstance->GetData(TYPE_WING) == LEFT) + { + switch(WaypointId) + { + case 1: + MoveToPoint(2188.318f, 1331.410f, 130.003f); + JumpNextStep(10000); + break; + case 2: + MoveToPoint(2165.351f, 1279.156f, 133.388f); + JumpNextStep(8000); + break; + case 3: + MoveToPoint(2083.952f, 1287.716f, 141.146f); + JumpNextStep(9000); + break; + } + } + + } else MoveTimer -= uiDiff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if(m_uiFleshTimer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_FLESH); + m_uiFleshTimer = (urand(3000, 10000)); + } + else m_uiFleshTimer -= uiDiff; + + DoMeleeAttackIfReady(); + + return; + } +}; + +/*### +## npc_cs_necromancer +###*/ + +enum +{ + SPELL_SHADOW_BOLT = 15472, + SPELL_COURSE = 20812, + SPELL_DRAIN_MANA = 58770 +}; + +struct MANGOS_DLL_DECL npc_cs_necromancerAI : public ScriptedAI +{ + npc_cs_necromancerAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_creature->SetActiveObjectState(true); + SetCombatMovement(false); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroic; + + uint32 m_uiShadowBoltTimer; + uint32 m_uiCourseTimer; + + uint32 WaypointId; + uint32 MoveTimer; + + void Reset() + { + m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + MoveTimer = (urand(100, 5000)); + m_uiCourseTimer = (urand(7000, 17000)); + m_uiShadowBoltTimer = (urand(3000, 10000)); + WaypointId = 1; + } + + void Aggro(Unit* pWho) + { + m_creature->GetMotionMaster()->MovementExpired(false); + m_creature->StopMoving(); + } + + void MoveToPoint(float X, float Y, float Z) + { + m_creature->GetMotionMaster()->MovementExpired(false); + m_creature->GetMotionMaster()->MovePoint(0, X, Y, Z); + } + + void AttackStart(Unit* pWho) + { + if (!pWho) + return; + + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + } + m_creature->GetMotionMaster()->MovementExpired(false); + } + + void EnterEvadeMode() + { + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->LoadCreaturesAddon(); + m_uiShadowBoltTimer = (urand(3000, 10000)); + m_uiCourseTimer = (urand(7000, 17000)); + + m_creature->SetLootRecipient(NULL); + } + + void MoveInLineOfSight(Unit* pWho) + { + if (!pWho) + return; + + if (!m_creature->hasUnitState(UNIT_STAT_STUNNED) && pWho->isTargetableForAttack() && + m_creature->IsHostileTo(pWho) && pWho->isInAccessablePlaceFor(m_creature)) + { + if (!m_creature->canFly() && m_creature->GetDistanceZ(pWho) > CREATURE_Z_ATTACK_RANGE) + return; + + float attackRadius = m_creature->GetAttackDistance(pWho); + if (m_creature->IsWithinDistInMap(pWho, attackRadius) && m_creature->IsWithinLOSInMap(pWho)) + { + if (!m_creature->getVictim()) + { + AttackStart(pWho); + pWho->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); + } + else if (m_creature->GetMap()->IsDungeon()) + { + pWho->SetInCombatWith(m_creature); + m_creature->AddThreat(pWho, 0.0f); + } + } + } + } + + void JumpNextStep(uint32 Time) + { + MoveTimer = Time; + WaypointId++; + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim() && m_creature->isTemporarySummon()) + { + if(MoveTimer < uiDiff) + { + if(m_pInstance->GetData(TYPE_WING) == RIGHT) + { + switch(WaypointId) + { + case 1: + MoveToPoint(2356.659f, 1185.501f, 130.636f); + JumpNextStep(10000); + break; + case 2: + MoveToPoint(2301.735f, 1179.265f, 136.944f); + JumpNextStep(8000); + break; + case 3: + MoveToPoint(2234.787f, 1180.638f, 136.344f); + JumpNextStep(9000); + break; + case 4: + MoveToPoint(2178.313f, 1244.350f, 136.107f); + JumpNextStep(12000); + break; + case 5: + MoveToPoint(2163.553f, 1277.814f, 133.444f); + JumpNextStep(5000); + break; + case 6: + MoveToPoint(2083.952f, 1287.716f, 141.146f); + JumpNextStep(5000); + break; + } + } + + if(m_pInstance->GetData(TYPE_WING) == LEFT) + { + switch(WaypointId) + { + case 1: + MoveToPoint(2188.318f, 1331.410f, 130.003f); + JumpNextStep(10000); + break; + case 2: + MoveToPoint(2165.351f, 1279.156f, 133.388f); + JumpNextStep(8000); + break; + case 3: + MoveToPoint(2083.952f, 1287.716f, 141.146f); + JumpNextStep(9000); + break; + } + } + + } else MoveTimer -= uiDiff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if(m_uiShadowBoltTimer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_SHADOW_BOLT); + m_uiShadowBoltTimer = (urand(3000, 5000)); + } + else m_uiShadowBoltTimer -= uiDiff; + + if(m_uiCourseTimer < uiDiff) + { + m_creature->InterruptNonMeleeSpells(false); + if(Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + DoCast(target, SPELL_COURSE); + m_uiCourseTimer = (urand(7000, 17000)); + } + else m_uiCourseTimer -= uiDiff; + + DoMeleeAttackIfReady(); + + return; + } +}; + +/*### +## npc_cs_field +###*/ + +enum +{ + SPELL_BLOW = 52491, + SPELL_SCARAB = 52496 +}; + +struct MANGOS_DLL_DECL npc_cs_fieldAI : public ScriptedAI +{ + npc_cs_fieldAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_creature->SetActiveObjectState(true); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroic; + + uint32 m_uiScarabTimer; + uint32 m_uiBlowTimer; + + uint32 WaypointId; + uint32 MoveTimer; + + void Reset() + { + m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + MoveTimer = (urand(100, 5000)); + m_uiBlowTimer = (urand(7000, 17000)); + m_uiScarabTimer = (urand(3000, 10000)); + WaypointId = 1; + } + + void MoveToPoint(float X, float Y, float Z) + { + m_creature->GetMotionMaster()->MovementExpired(false); + m_creature->GetMotionMaster()->MovePoint(0, X, Y, Z); + } + + void AttackStart(Unit* pWho) + { + if (!pWho) + return; + + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + + if (IsCombatMovement()) + m_creature->GetMotionMaster()->MoveChase(pWho); + } + } + + void EnterEvadeMode() + { + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->LoadCreaturesAddon(); + m_uiScarabTimer = (urand(3000, 10000)); + m_uiBlowTimer = (urand(7000, 17000)); + + m_creature->SetLootRecipient(NULL); + } + + void MoveInLineOfSight(Unit* pWho) + { + if (!pWho) + return; + + if (!m_creature->hasUnitState(UNIT_STAT_STUNNED) && pWho->isTargetableForAttack() && + m_creature->IsHostileTo(pWho) && pWho->isInAccessablePlaceFor(m_creature)) + { + if (!m_creature->canFly() && m_creature->GetDistanceZ(pWho) > CREATURE_Z_ATTACK_RANGE) + return; + + float attackRadius = m_creature->GetAttackDistance(pWho); + if (m_creature->IsWithinDistInMap(pWho, attackRadius) && m_creature->IsWithinLOSInMap(pWho)) + { + if (!m_creature->getVictim()) + { + AttackStart(pWho); + pWho->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); + } + else if (m_creature->GetMap()->IsDungeon()) + { + pWho->SetInCombatWith(m_creature); + m_creature->AddThreat(pWho, 0.0f); + } + } + } + } + + void JumpNextStep(uint32 Time) + { + MoveTimer = Time; + WaypointId++; + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim() && m_creature->isTemporarySummon()) + { + if(MoveTimer < uiDiff) + { + if(m_pInstance->GetData(TYPE_WING) == RIGHT) + { + switch(WaypointId) + { + case 1: + MoveToPoint(2356.659f, 1185.501f, 130.636f); + JumpNextStep(10000); + break; + case 2: + MoveToPoint(2301.735f, 1179.265f, 136.944f); + JumpNextStep(8000); + break; + case 3: + MoveToPoint(2234.787f, 1180.638f, 136.344f); + JumpNextStep(9000); + break; + case 4: + MoveToPoint(2178.313f, 1244.350f, 136.107f); + JumpNextStep(12000); + break; + case 5: + MoveToPoint(2163.553f, 1277.814f, 133.444f); + JumpNextStep(5000); + break; + case 6: + MoveToPoint(2083.952f, 1287.716f, 141.146f); + JumpNextStep(5000); + break; + } + } + + if(m_pInstance->GetData(TYPE_WING) == LEFT) + { + switch(WaypointId) + { + case 1: + MoveToPoint(2188.318f, 1331.410f, 130.003f); + JumpNextStep(10000); + break; + case 2: + MoveToPoint(2165.351f, 1279.156f, 133.388f); + JumpNextStep(8000); + break; + case 3: + MoveToPoint(2083.952f, 1287.716f, 141.146f); + JumpNextStep(9000); + break; + } + } + + } else MoveTimer -= uiDiff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if(m_uiScarabTimer < uiDiff) + { + if(Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + DoCast(target, SPELL_SCARAB); + m_uiScarabTimer = (urand(3000, 5000)); + } + else m_uiScarabTimer -= uiDiff; + + if(m_uiBlowTimer < uiDiff) + { + m_creature->InterruptNonMeleeSpells(false); + if(Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + DoCast(target, SPELL_BLOW); + m_uiBlowTimer = (urand(7000, 17000)); + } + else m_uiBlowTimer -= uiDiff; + + DoMeleeAttackIfReady(); + + return; + } +}; + +/*### +## npc_cs_alocyte +###*/ + +enum +{ + SPELL_SHADOW = 17234, + SPELL_COLD = 15244, + SPELL_FIRE = 14145, + SPELL_COURSEA = 39621 +}; + +struct MANGOS_DLL_DECL npc_cs_acolyteAI : public ScriptedAI +{ + npc_cs_acolyteAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_creature->SetActiveObjectState(true); + SetCombatMovement(false); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroic; + + uint32 m_uiColdTimer; + uint32 m_uiFireTimer; + uint32 m_uiCourseTimer; + uint32 m_uiShadowTimer; + + uint32 WaypointId; + uint32 MoveTimer; + + void Reset() + { + m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + MoveTimer = (urand(100, 5000)); + m_uiColdTimer = (urand(7000, 17000)); + m_uiFireTimer = (urand(3000, 10000)); + m_uiCourseTimer = (urand(5000, 12000)); + m_uiShadowTimer = (urand(1000, 3000)); + WaypointId = 1; + } + + void MoveToPoint(float X, float Y, float Z) + { + m_creature->GetMotionMaster()->MovementExpired(false); + m_creature->GetMotionMaster()->MovePoint(0, X, Y, Z); + } + + void Aggro(Unit* pWho) + { + m_creature->GetMotionMaster()->MovementExpired(false); + m_creature->StopMoving(); + } + + void AttackStart(Unit* pWho) + { + if (!pWho) + return; + + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + } + m_creature->GetMotionMaster()->MovementExpired(false); + } + + void EnterEvadeMode() + { + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->LoadCreaturesAddon(); + m_uiColdTimer = (urand(7000, 17000)); + m_uiFireTimer = (urand(3000, 10000)); + m_uiCourseTimer = (urand(5000, 12000)); + m_uiShadowTimer = (urand(1000, 3000)); + + m_creature->SetLootRecipient(NULL); + } + + void MoveInLineOfSight(Unit* pWho) + { + if (!pWho) + return; + + if (!m_creature->hasUnitState(UNIT_STAT_STUNNED) && pWho->isTargetableForAttack() && + m_creature->IsHostileTo(pWho) && pWho->isInAccessablePlaceFor(m_creature)) + { + if (!m_creature->canFly() && m_creature->GetDistanceZ(pWho) > CREATURE_Z_ATTACK_RANGE) + return; + + float attackRadius = m_creature->GetAttackDistance(pWho); + if (m_creature->IsWithinDistInMap(pWho, attackRadius) && m_creature->IsWithinLOSInMap(pWho)) + { + if (!m_creature->getVictim()) + { + AttackStart(pWho); + pWho->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); + } + else if (m_creature->GetMap()->IsDungeon()) + { + pWho->SetInCombatWith(m_creature); + m_creature->AddThreat(pWho, 0.0f); + } + } + } + } + + void JumpNextStep(uint32 Time) + { + MoveTimer = Time; + WaypointId++; + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim() && m_creature->isTemporarySummon()) + { + if(MoveTimer < uiDiff) + { + if(m_pInstance->GetData(TYPE_WING) == RIGHT) + { + switch(WaypointId) + { + case 1: + MoveToPoint(2356.659f, 1185.501f, 130.636f); + JumpNextStep(10000); + break; + case 2: + MoveToPoint(2301.735f, 1179.265f, 136.944f); + JumpNextStep(8000); + break; + case 3: + MoveToPoint(2234.787f, 1180.638f, 136.344f); + JumpNextStep(9000); + break; + case 4: + MoveToPoint(2178.313f, 1244.350f, 136.107f); + JumpNextStep(12000); + break; + case 5: + MoveToPoint(2163.553f, 1277.814f, 133.444f); + JumpNextStep(5000); + break; + case 6: + MoveToPoint(2083.952f, 1287.716f, 141.146f); + JumpNextStep(5000); + break; + } + } + + if(m_pInstance->GetData(TYPE_WING) == LEFT) + { + switch(WaypointId) + { + case 1: + MoveToPoint(2188.318f, 1331.410f, 130.003f); + JumpNextStep(10000); + break; + case 2: + MoveToPoint(2165.351f, 1279.156f, 133.388f); + JumpNextStep(8000); + break; + case 3: + MoveToPoint(2083.952f, 1287.716f, 141.146f); + JumpNextStep(9000); + break; + } + } + + } else MoveTimer -= uiDiff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if(m_uiShadowTimer < uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_SHADOW); + m_uiShadowTimer = (urand(3000, 8000)); + } + else m_uiShadowTimer -= uiDiff; + + if(m_uiCourseTimer < uiDiff) + { + if(Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + DoCast(target, SPELL_COURSEA); + m_uiCourseTimer = (urand(7000, 13000)); + } + else m_uiCourseTimer -= uiDiff; + + if(m_uiColdTimer < uiDiff) + { + if(Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + DoCast(target, SPELL_COLD); + m_uiColdTimer = (urand(13000, 17000)); + } + else m_uiColdTimer -= uiDiff; + + if(m_uiFireTimer < uiDiff) + { + if(Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + DoCast(target, SPELL_FIRE); + m_uiFireTimer = (urand(6000, 11000)); + } + else m_uiFireTimer -= uiDiff; + + DoMeleeAttackIfReady(); + + return; + } +}; + +/*### +## npc_cs_butcher +###*/ + +enum +{ + SPELL_CLOUD = 52525 +}; + +struct MANGOS_DLL_DECL npc_cs_butcherAI : public ScriptedAI +{ + npc_cs_butcherAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_creature->SetActiveObjectState(true); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroic; + + uint32 WaypointId; + uint32 MoveTimer; + + void Reset() + { + DoCast(m_creature, SPELL_CLOUD); + m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + MoveTimer = (urand(100, 5000)); + WaypointId = 1; + } + + void MoveToPoint(float X, float Y, float Z) + { + m_creature->GetMotionMaster()->MovementExpired(false); + m_creature->GetMotionMaster()->MovePoint(0, X, Y, Z); + } + + void AttackStart(Unit* pWho) + { + if (!pWho) + return; + + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + + if (IsCombatMovement()) + m_creature->GetMotionMaster()->MoveChase(pWho); + } + } + + void EnterEvadeMode() + { + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->LoadCreaturesAddon(); + + m_creature->SetLootRecipient(NULL); + DoCast(m_creature, SPELL_CLOUD); + } + + void MoveInLineOfSight(Unit* pWho) + { + if (!pWho) + return; + + if (!m_creature->hasUnitState(UNIT_STAT_STUNNED) && pWho->isTargetableForAttack() && + m_creature->IsHostileTo(pWho) && pWho->isInAccessablePlaceFor(m_creature)) + { + if (!m_creature->canFly() && m_creature->GetDistanceZ(pWho) > CREATURE_Z_ATTACK_RANGE) + return; + + float attackRadius = m_creature->GetAttackDistance(pWho); + if (m_creature->IsWithinDistInMap(pWho, attackRadius) && m_creature->IsWithinLOSInMap(pWho)) + { + if (!m_creature->getVictim()) + { + AttackStart(pWho); + pWho->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); + } + else if (m_creature->GetMap()->IsDungeon()) + { + pWho->SetInCombatWith(m_creature); + m_creature->AddThreat(pWho, 0.0f); + } + } + } + } + + void JumpNextStep(uint32 Time) + { + MoveTimer = Time; + WaypointId++; + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim() && m_creature->isTemporarySummon()) + { + if(MoveTimer < uiDiff) + { + if(m_pInstance->GetData(TYPE_WING) == RIGHT) + { + switch(WaypointId) + { + case 1: + MoveToPoint(2356.659f, 1185.501f, 130.636f); + JumpNextStep(10000); + break; + case 2: + MoveToPoint(2301.735f, 1179.265f, 136.944f); + JumpNextStep(8000); + break; + case 3: + MoveToPoint(2234.787f, 1180.638f, 136.344f); + JumpNextStep(9000); + break; + case 4: + MoveToPoint(2178.313f, 1244.350f, 136.107f); + JumpNextStep(12000); + break; + case 5: + MoveToPoint(2163.553f, 1277.814f, 133.444f); + JumpNextStep(5000); + break; + case 6: + MoveToPoint(2083.952f, 1287.716f, 141.146f); + JumpNextStep(5000); + break; + } + } + + if(m_pInstance->GetData(TYPE_WING) == LEFT) + { + switch(WaypointId) + { + case 1: + MoveToPoint(2188.318f, 1331.410f, 130.003f); + JumpNextStep(10000); + break; + case 2: + MoveToPoint(2165.351f, 1279.156f, 133.388f); + JumpNextStep(8000); + break; + case 3: + MoveToPoint(2083.952f, 1287.716f, 141.146f); + JumpNextStep(9000); + break; + } + } + + } else MoveTimer -= uiDiff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + + return; + } +}; + +struct MANGOS_DLL_DECL npc_time_riftCSAI : public ScriptedAI +{ + npc_time_riftCSAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); + m_creature->SetActiveObjectState(true); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsHeroic; + + uint32 Step; + uint32 m_uiStepTimer; + Creature* Drakonian01; + Creature* Drakonian02; + Creature* Drakonian03; + + void Reset() + { + m_uiStepTimer = 1000; + Step = 1; + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_uiStepTimer < uiDiff) + { + switch(Step) + { + case 1: + if (Creature* pArthas = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_ARTHAS))) + { + Drakonian01 = m_creature->SummonCreature(NPC_INFINITE_ADVERSARY,(m_creature->GetPositionX()-2)+rand()%4, (m_creature->GetPositionY()-2)+rand()%4, m_creature->GetPositionZ(),3.229f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,900000); + Drakonian01->GetMotionMaster()->MovePoint(0, pArthas->GetPositionX(), pArthas->GetPositionY(), pArthas->GetPositionZ()); + Drakonian02 = m_creature->SummonCreature(NPC_INFINITE_HUNTER,(m_creature->GetPositionX()-2)+rand()%4, (m_creature->GetPositionY()-2)+rand()%4, m_creature->GetPositionZ(),3.229f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,900000); + Drakonian02->GetMotionMaster()->MovePoint(0, pArthas->GetPositionX(), pArthas->GetPositionY(), pArthas->GetPositionZ()); + Drakonian03 = m_creature->SummonCreature(NPC_INFINITE_AGENT,(m_creature->GetPositionX()-2)+rand()%4, (m_creature->GetPositionY()-2)+rand()%4, m_creature->GetPositionZ(),3.229f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,900000); + Drakonian03->GetMotionMaster()->MovePoint(0, pArthas->GetPositionX(), pArthas->GetPositionY(), pArthas->GetPositionZ()); + } + m_uiStepTimer = 3000; + Step++; + break; + case 2: + m_creature->RemoveFromWorld(); + Step++; + break; + } + } else m_uiStepTimer -= uiDiff; + } +}; + +CreatureAI* GetAI_npc_cs_gnoul(Creature* pCreature) +{ + return new npc_cs_gnoulAI(pCreature); +} + +CreatureAI* GetAI_npc_cs_necromancer(Creature* pCreature) +{ + return new npc_cs_necromancerAI(pCreature); +} + +CreatureAI* GetAI_npc_cs_field(Creature* pCreature) +{ + return new npc_cs_fieldAI(pCreature); +} + +CreatureAI* GetAI_npc_cs_acolyte(Creature* pCreature) +{ + return new npc_cs_acolyteAI(pCreature); +} + +CreatureAI* GetAI_npc_cs_butcher(Creature* pCreature) +{ + return new npc_cs_butcherAI(pCreature); +} + +CreatureAI* GetAI_npc_time_riftCS(Creature* pCreature) +{ + return new npc_time_riftCSAI(pCreature); +} + +void AddSC_trash_culling_of_stratholme() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_cs_gnoul"; + newscript->GetAI = &GetAI_npc_cs_gnoul; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_cs_necromancer"; + newscript->GetAI = &GetAI_npc_cs_necromancer; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_cs_field"; + newscript->GetAI = &GetAI_npc_cs_field; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_cs_acolyte"; + newscript->GetAI = &GetAI_npc_cs_acolyte; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_cs_butcher"; + newscript->GetAI = &GetAI_npc_cs_butcher; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_time_riftCS"; + newscript->GetAI = &GetAI_npc_time_riftCS; + newscript->RegisterSelf(); +} \ No newline at end of file diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index fca06bb4a..4c5f633cd 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -233,11 +233,13 @@ extern void AddSC_instance_wailing_caverns(); // Wailing Caverns extern void AddSC_zulfarrak(); //zulfarrak // culling of stratholme extern void AddSC_boss_lord_epoch(); -extern void AddSC_culling_of_stratholme(); extern void AddSC_boss_malganis(); extern void AddSC_boss_meathook(); -extern void AddSC_instance_culling_of_stratholme(); extern void AddSC_boss_salramm(); +extern void AddSC_boss_infinite_corruptor(); +extern void AddSC_culling_of_stratholme(); +extern void AddSC_culling_of_stratholmeAI(); +extern void AddSC_instance_culling_of_stratholme(); extern void AddSC_ashenvale(); extern void AddSC_azshara(); @@ -971,11 +973,13 @@ void AddScripts() AddSC_instance_mechanar(); AddSC_boss_lord_epoch(); //culling of stratholme - AddSC_culling_of_stratholme(); AddSC_boss_malganis(); AddSC_boss_meathook(); - AddSC_instance_culling_of_stratholme(); AddSC_boss_salramm(); + AddSC_boss_infinite_corruptor(); + AddSC_culling_of_stratholme(); + AddSC_culling_of_stratholmeAI(); + AddSC_instance_culling_of_stratholme(); AddSC_blades_edge_mountains(); AddSC_boss_doomlordkazzak(); From 029a4a811d0dcd78474b46c85126641276e4772c Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sat, 29 May 2010 08:53:56 +0400 Subject: [PATCH 328/405] Small change to COS --- .../culling_of_stratholme/culling_of_stratholme.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp index b28adc6a3..d1bb6a070 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp @@ -26,7 +26,7 @@ EndScriptData */ #include "def_culling_of_stratholme.h" #include "escort_ai.h" #include "WorldPacket.h" -#include "weather.h" +#include "Weather.h" /*### ## npc_arthas From f51d061fac6dc7c51f700fe67ebe6edfce2cf14c Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sat, 29 May 2010 09:06:24 +0400 Subject: [PATCH 329/405] Makefile correct. Thanks to MadMann --- Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile.am b/Makefile.am index 8728abf32..323a4b84f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -362,6 +362,7 @@ scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp \ scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp \ scripts/northrend/icecrown_citadel/icecrown_citadel/gunship_battle.cpp \ scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp \ +scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h \ scripts/northrend/ruby_sanctum/def_ruby_sanctum.h \ scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp \ scripts/northrend/ruby_sanctum/boss_halion.cpp \ From 067b5568f8d29b519e10991f411cb36afed2c2e0 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 2 Jun 2010 12:54:53 +0400 Subject: [PATCH 330/405] COS sql correct --- addition/717_culling_of_stratholme_mangos.sql | 24 +-- .../717_culling_of_stratholme_scriptdev2.sql | 149 +++++++++--------- 2 files changed, 86 insertions(+), 87 deletions(-) diff --git a/addition/717_culling_of_stratholme_mangos.sql b/addition/717_culling_of_stratholme_mangos.sql index b2efdc597..2af22ed52 100644 --- a/addition/717_culling_of_stratholme_mangos.sql +++ b/addition/717_culling_of_stratholme_mangos.sql @@ -1,11 +1,11 @@ -- Remove old version -DELETE FROM `creature` WHERE `guid` IN (4456649,4456653); +DELETE FROM `creature` WHERE `guid` IN (4456649,4456653,4458724,4458725,4458738,4458739,4458740,4458741,4459981,4459615); REPLACE INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (30996, 0, 0, 0, 0, 0, 11686, 0, 11686, 0, 'CoT Stratholme - Crates KC Bunny', '', '', 1, 1, 1, 1, 0, 0, 17, 35, 35, 0, 1, 0, 1, 2, 0, 0, 1, 2000, 2000, 1, 33554432, 0, 0, 0, 0, 0, 0, 1, 2, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, ''); UPDATE `quest_template` SET `ReqCreatureOrGOCount1` = '5' WHERE entry=13149; REPLACE INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (20562, 0, 0, 0, 0, 0, 11686, 0, 11686, 0, 'Invisible Stalker (Scale x5)', '', '', 1, 1, 42, 42, 0, 0, 17, 35, 35, 0, 5, 0, 1, 2, 0, 0, 1, 2000, 2000, 1, 33554944, 0, 0, 0, 0, 0, 0, 1, 2, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, ''); -UPDATE `creature` SET `spawntimesecs`='36000' WHERE `id` IN (31127, 31126, 28167, 28169); +UPDATE `creature` SET `spawntimesecs`= 36000 WHERE `id` IN (31127, 31126, 28167, 28169); replace into `spell_script_target` (`entry`, `type`, `targetEntry`) values('58825','1','27733'); UPDATE `creature_template` SET `faction_A`='35', `faction_H`='35' WHERE `entry` IN (31127, 31126, 28167, 28169); @@ -56,31 +56,31 @@ DELETE FROM `creature` WHERE `id` in (28249); DELETE FROM `creature` WHERE `id` in (27736); DELETE FROM `creature` WHERE `id` in (27915); -INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (9777887, 27915, 595, 3, 1, 0, 0, 1812.49, 1284.81, 142.248, 4.03364, 300, 0, 0, 17010, 0, 0, 0); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (571701, 27915, 595, 3, 1, 0, 0, 1812.49, 1284.81, 142.248, 4.03364, 300, 0, 0, 17010, 0, 0, 0); DELETE FROM `creature` WHERE `id` in (30571); -INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (9777888, 30571, 595, 3, 1, 27139, 0, 1549.61, 575.545, 100.052, 4.16253, 360, 0, 0, 8982, 0, 0, 0); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (571702, 30571, 595, 3, 1, 27139, 0, 1549.61, 575.545, 100.052, 4.16253, 360, 0, 0, 8982, 0, 0, 0); DELETE FROM `creature` WHERE `id` in (26499); -INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (138007, 26499, 595, 3, 1, 0, 1613, 1920.87, 1287.12, 142.935, 6.25562, 43200, 0, 0, 44100, 7988, 0, 0); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (571703, 26499, 595, 3, 1, 0, 1613, 1920.87, 1287.12, 142.935, 6.25562, 43200, 0, 0, 44100, 7988, 0, 0); DELETE FROM `creature` WHERE `id` in (26497); -INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (9337048, 26497, 595, 3, 1, 0, 1221, 1896.39, 1292.91, 143.711, 0.016332, 25, 5, 0, 100800, 88140, 0, 0); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (571704, 26497, 595, 3, 1, 0, 1221, 1896.39, 1292.91, 143.711, 0.016332, 25, 5, 0, 100800, 88140, 0, 0); DELETE FROM `creature` WHERE `id` in (26528); -INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (9777889, 26528, 595, 3, 1, 0, 1819, 1761.42, 1285.75, 139.945, 4.93874, 25, 5, 0, 126000, 59910, 0, 0); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (571705, 26528, 595, 3, 1, 0, 1819, 1761.42, 1285.75, 139.945, 4.93874, 25, 5, 0, 126000, 59910, 0, 0); DELETE FROM `creature` WHERE `id` in (27891); -INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (9797890, 27891, 595, 3, 1, 0, 0, 1603.38, 805.988, 123.272, 1.90688, 25, 5, 0, 8982, 0, 0, 0); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (571706, 27891, 595, 3, 1, 0, 0, 1603.38, 805.988, 123.272, 1.90688, 25, 5, 0, 8982, 0, 0, 0); DELETE FROM `creature` WHERE `id` in (27892); -INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (9797891, 27892, 595, 3, 1, 0, 0, 1602.3, 809.385, 123.454, 5.02884, 25, 5, 0, 8982, 0, 0, 0); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (571707, 27892, 595, 3, 1, 0, 0, 1602.3, 809.385, 123.454, 5.02884, 25, 5, 0, 8982, 0, 0, 0); DELETE FROM `creature` WHERE `id` in (27884); -INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (9777892, 27884, 595, 3, 1, 24901, 0, 1635.81, 723.155, 113.562, 3.21455, 360, 0, 0, 8982, 0, 0, 0); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (571708, 27884, 595, 3, 1, 24901, 0, 1635.81, 723.155, 113.562, 3.21455, 360, 0, 0, 8982, 0, 0, 0); DELETE FROM `creature` WHERE `id` in (32273); -INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (9798216, 32273, 595, 2, 1, 0, 1839, 2330.93, 1275.59, 132.848, 3.60489, 25, 5, 0, 417911, 0, 0, 0); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (571709, 32273, 595, 2, 1, 0, 1839, 2330.93, 1275.59, 132.848, 3.60489, 25, 5, 0, 417911, 0, 0, 0); DELETE FROM `creature` WHERE `id` in (28439); -INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (9798218, 28439, 595, 2, 1, 0, 0, 2336.56, 1277.9, 132.885, 3.47923, 25, 5, 0, 1, 0, 0, 0); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (571710, 28439, 595, 2, 1, 0, 0, 2336.56, 1277.9, 132.885, 3.47923, 25, 5, 0, 1, 0, 0, 0); diff --git a/addition/717_culling_of_stratholme_scriptdev2.sql b/addition/717_culling_of_stratholme_scriptdev2.sql index 2b0f75967..23c327235 100644 --- a/addition/717_culling_of_stratholme_scriptdev2.sql +++ b/addition/717_culling_of_stratholme_scriptdev2.sql @@ -1,5 +1,4 @@ -DELETE FROM `script_texts` WHERE `comment` = 34587; -DELETE FROM `script_texts` WHERE `comment` = 26499; +DELETE FROM `script_texts` WHERE `comment` in (34587, 26499); insert into `script_texts` (`entry`,`content_default`,`content_loc8`,`sound`,`type`,`language`,`emote`,`comment`) VALUES # TAVERN EVENT (-1557270, 'Hey! Stop rooting around in my cellar! Clear out!', 'Hey! Stop rooting around in my cellar! Clear out!', 0,0,0,1, '34587'), @@ -50,7 +49,7 @@ insert into `script_texts` (`entry`,`content_default`,`content_loc8`,`sound`,`ty (-1594075, 'What?', 'Что?', 12840,0,0,5, '34587'), (-1594076, 'This entire city must be purged.', 'Весь город должен быть очищен.', 12831,0,0,1, '34587'), (-1594077, 'How can you even consider that? Theres got to be some other way.', 'Как ты мог даже подумать об этом? Должен быть какой то другой путь?', 12841,0,0,1, '34587'), -(-1594078, 'Damn it, Uther! As your future king, I order you to purge this city!', 'Проклятие Утер! Как будущий король я приказываю тебе очистить этот город.', 12832,1,0,5, '34587'), +(-1594078, 'Damn it, Uther! As your future king, I order you to purge this city!', 'Проклятие, Утер! Как будущий король, я приказываю тебе очистить этот город.', 12832,1,0,5, '34587'), (-1594079, 'You are not my king yet, boy! Nor would I obey that command even if you were!', 'Пока ты еще не король юноша. Но этот приказ я не выполнил бы будь ты хоть трижды королем!', 12842,1,0,22, '34587'), (-1594080, 'Then I must consider this an act of treason.', 'Тогда я буду расценивать это как измену.', 12833,0,0,0, '34587'), (-1594081, 'Treason? Have you lost your mind, Arthas?', 'Измену? Ты совсем лишился рассудка Артас?', 12843,0,0,5, '34587'), @@ -67,85 +66,84 @@ insert into `script_texts` (`entry`,`content_default`,`content_loc8`,`sound`,`ty (-1594091, 'I can help you only with a clean death.', 'Я могу помочь вам, лишь быстрой смертью.', 14294,0,0,0, '26499'), (-1594092, 'What? This cant be!', 'Что? Этого не может быть...', 0,0,0,0, '26499'), (-1594093, 'Oh... My g...', 'О... Мой б...', 0,0,0,0, '26499'), -(-1594094, 'This is begining!', 'Это только начало..', 14295,0,0,1, '26499'), -(-1594095, 'g', 'Да. Это начало! Я ждал тебя юнный принц. Я Малганус.', 14410,0,0,1, '26499'), -(-1594096, 'g', 'Как видишь твои люди отныне принадлежат мне. Дом за домом я порабощу этот город и огонь жизни угаснет здесь на всегда..',14411,0,0,1, '26499'), -(-1594097, 'g', 'Я не допущу этого Малганис. Лудше эти люди погибнут от моей руки, чем станут твоими рабами после смерти.',14296,0,0,5, '26499'), -(-1594098, 'g', 'Малганис отправит своих прислужников из плети навстречу нам. Опытные воины и маги ступайте и уничтожте врагов. Я возглавлю оставшиеся войска в деле очищения стратхольма от заразы.',14885,0,0,1, '26499'), +(-1594094, 'This is begining!', 'Это только начало...', 14295,0,0,1, '26499'), +(-1594095, 'Yes, this is the beginning. I\'ve been waiting for you, young prince. I am Mal\'Ganis.', 'Да. Это начало! Я ждал тебя, юный принц. Я Мал\'Ганис.', 14410,0,0,1, '26499'), +(-1594096, 'As you can see, your people are now mine. I will now turn this city, household by household, until the flame of life has been snuffed out forever.', 'Как видишь твои люди отныне принадлежат мне. Дом за домом я порабощу этот город и огонь жизни угаснет здесь навсегда..',14411,0,0,1, '26499'), +(-1594097, 'I will not allow this, Mal\'Ganis. Better these people will die from my hand, than become your slaves after death.', 'Я не допущу этого, Мал\'Ганис. Лучше эти люди погибнут от моей руки, чем станут твоими рабами после смерти.',14296,0,0,5, '26499'), +(-1594098, 'Mal\'Ganis will send his Scourge henchmen to meet us. Skilled warriors and mages go and destroy enemies. I will lead the remaining troops in the purification of Stratholme from infection.', 'Мал\'Ганис отправит своих прислужников из плети навстречу нам. Опытные воины и маги ступайте и уничтожьте врагов. Я возглавлю оставшиеся войска в деле очищения Стратхольма от заразы.',14885,0,0,1, '26499'), #MEATHOOK -(-1594110, 'g', 'Поиграем?',13428,0,0,0, '26499'), -(-1594111, 'g', 'Новые игрушки.',13429,1,0,0, '26499'), -(-1594112, 'g', 'Это... Не... Смешно...',13433,1,0,0, '26499'), -(-1594113, 'g', 'Скучно...',13430,1,0,0, '26499'), -(-1594114, 'g', 'Почему ты не двигаться?',13431,1,0,0, '26499'), -(-1594115, 'g', 'Вставай я не закончил...',13432,1,0,0, '26499'), +(-1594110, 'Play time!', 'Поиграем?',13428,0,0,0, '26499'), +(-1594111, 'New toys!', 'Новые игрушки.',13429,1,0,0, '26499'), +(-1594112, 'This not fun...', 'Это... Не... Смешно...',13433,1,0,0, '26499'), +(-1594113, 'Boring...', 'Скучно...',13430,1,0,0, '26499'), +(-1594114, 'Why you stop moving?', 'Почему ты не двигаться?',13431,1,0,0, '26499'), +(-1594115, 'Get up! Me not done!', 'Вставай я не закончил...',13432,1,0,0, '26499'), #SALRAMM -(-1594129, 'g', 'Cлишком поздно герои Лордерона! Пришло время мертвых...',0,1,0,0, '26499'), -(-1594130, 'g', 'Аааааа развлечемся....',0,1,0,0, '26499'), -(-1594131, 'g', 'Вы всего лишь часть плана хозяина...',0,1,0,0, '26499'), -(-1594132, 'g', 'Веселье только начинается!',0,1,0,0, '26499'), -(-1594133, 'g', 'Аааа качественный материал...',0,1,0,0, '26499'), -(-1594134, 'g', 'Не волнуйся я найду куда тебя приспособить...',0,1,0,0, '26499'), -(-1594135, 'g', 'Мне нужен образец!',0,1,0,0, '26499'), -(-1594136, 'g', 'Столько силы... Она будет моей....',0,1,0,0, '26499'), -(-1594137, 'g', 'Твоя плоть придает тебя!',0,1,0,0, '26499'), -(-1594138, 'g', 'Познакомтесь с моими друзьями...',0,1,0,0, '26499'), -(-1594139, 'g', 'Жители Стратхольма встречайте ваших спасителей...',0,1,0,0, '26499'), -(-1594140, 'g', 'Бум... Ха-ха-ха-ха...',0,1,0,0, '26499'), -(-1594141, 'g', 'Кровь... Разрушение... Восхитительно...',0,1,0,0, '26499'), +(-1594129, 'You are too late, champion of Lordaeron. The dead shall have their day.', 'Cлишком поздно герои Лордерона! Пришло время мертвых...',0,1,0,0, '26499'), +(-1594130, 'Ah, the entertainment has arrived!', 'Аааааа развлечемся....',0,1,0,0, '26499'), +(-1594131, 'You only advance... the master\'s plan...', 'Вы всего лишь часть плана хозяина...',0,1,0,0, '26499'), +(-1594132, 'The fun is just beginning!', 'Веселье только начинается!',0,1,0,0, '26499'), +(-1594133, 'Aah, quality materials!', 'Аааа качественный материал...',0,1,0,0, '26499'), +(-1594134, 'Don\'t worry, I\'ll make good use of you.', 'Не волнуйся я найду куда тебя приспособить...',0,1,0,0, '26499'), +(-1594135, 'I want a sample...', 'Мне нужен образец!',0,1,0,0, '26499'), +(-1594136, 'Such strength... it must be mine!', 'Столько силы... Она будет моей....',0,1,0,0, '26499'), +(-1594137, 'Your flesh betrays you.', 'Твоя плоть предает тебя!',0,1,0,0, '26499'), +(-1594138, 'Say hello to some friends of mine.', 'Познакомтесь с моими друзьями...',0,1,0,0, '26499'), +(-1594139, 'Come, citizen of Stratholme! Meet your saviors.', 'Жители Стратхольма встречайте ваших спасителей...',0,1,0,0, '26499'), +(-1594140, 'BOOM! Hahahahah...', 'Бум... Ха-ха-ха-ха...',0,1,0,0, '26499'), +(-1594141, 'Blood... destruction... EXHILARATING!', 'Кровь... Разрушение... Восхитительно...',0,1,0,0, '26499'), #ARTHAS - HOUSE -(-1594142, 'g', 'Герои поспешите вcтретимся у городской ратуши. Мы должны сразиться с Малганисом на его территории!',14297,1,0,0, '26499'), -(-1594143, 'g', 'Идите за мной я знаю дорогу.',14298,0,0,1, '26499'), -(-1594144, 'Ah, Youve finaly arrived Prince Arthas. Youre here just in the nick of time.', 'Ах... Наконец вы прибыли Принц Артас. Вы как раз во время.',0,0,0,1, '26499'), -(-1594145, 'g', 'Да! Я рад, что я смог добраться сюда раньше чумы!',14299,0,0,1, '26499'), -(-1594146, 'g', 'Что это за магия?',14300,0,0,0, '26499'), +(-1594142, 'Heroes, hurry up, we\'ll meet near town hall. We must fight with Mal\'Ganis on its territory!', 'Герои, поспешите, вcтретимся у городской ратуши. Мы должны сразиться с Мал\'Ганисом на его территории!',14297,1,0,0, '26499'), +(-1594143, 'Follow me, I know the way.', 'Идите за мной я знаю дорогу.',14298,0,0,1, '26499'), +(-1594144, 'Ah, You\'ve finaly arrived, Prince Arthas. Youre here just in the nick of time.', 'Ах... Наконец вы прибыли, Принц Артас. Вы как раз во время.',0,0,0,1, '26499'), +(-1594145, 'Yes! I\'m glad to get here before plague!', 'Да! Я рад, что я смог добраться сюда раньше чумы!',14299,0,0,1, '26499'), +(-1594146, 'What kind of magic is this?', 'Что это за магия?',14300,0,0,0, '26499'), (-1594147, 'Theres no need for you in understand Arthas. All you need to do is die!', 'Этого не нужно вам понимать Артас. Все что тебе только нужно сделать это умереть!',0,0,0,11, '26499'), -(-1594148, 'g', 'Кажется, что у Малганиса в распорежении есть еще кое что кроме Плети. Давайте поспешим.',14301,0,0,0, '26499'), -(-1594149, 'g', 'Снова черная магия будьте готовы ко всему.',14302,0,0,0, '26499'), -(-1594150, 'g', 'Идем дальше.',14303,0,0,0, '26499'), -(-1594151, 'g', 'Будьте начеку наc окружили...',14304,0,0,0, '26499'), -(-1594152, 'g', 'Малганис не собирается облегчить нам жизнь...',14305,0,0,0, '26499'), -(-1594153, 'g', 'Они упрямы.',14306,0,0,0, '26499'), -(-1594154, 'g', 'Что еще он поставит у меня на пути?',14307,0,0,0, '26499'), -(-1594155, 'g', 'Принц Артас Менетил, в этот самый день могущественное зло поглотило твою душу. Смерть которую ты должен был принести другим, сегодня придет за тобой.',13408,0,0,0, '26499'), -(-1594156, 'g', 'Я делаю для Лордерона то, что должен, и никакие слова и поступки меня не остановят.',14309,0,0,5, '26499'), -(-1594157, 'g', 'Ну что ж посмотрим юный принц...',13409,0,0,0, '26499'), +(-1594148, 'Seems that Mal\'Ganis has something else except Scourge. Let\'s hurry.', 'Кажется, что у Мал\'Ганиса в распоряжении есть еще кое что кроме Плети. Давайте поспешим.',14301,0,0,0, '26499'), +(-1594149, 'Dark magic again... Be ready for all.', 'Снова черная магия... Будьте готовы ко всему.',14302,0,0,0, '26499'), +(-1594150, 'Come on.', 'Идем дальше.',14303,0,0,0, '26499'), +(-1594151, 'Be on the alert. We were surrounded.', 'Будьте начеку, наc окружили...',14304,0,0,0, '26499'), +(-1594152, 'Mal\'Ganis doesn\'t want to make our life easier...', 'Мал\'Ганис не собирается облегчить нам жизнь...',14305,0,0,0, '26499'), +(-1594153, 'They are stubborn.', 'Они упрямы.',14306,0,0,0, '26499'), +(-1594154, 'What else he will put on my way?', 'Что еще он поставит у меня на пути?',14307,0,0,0, '26499'), +(-1594155, 'Prince Arthas Menethil, in this day mighty evil devoured your soul. Death, which you had to bring to others, today will come for you.', 'Принц Артас Менетил, в этот самый день могущественное зло поглотило твою душу. Смерть которую ты должен был принести другим, сегодня придет за тобой.',13408,0,0,0, '26499'), +(-1594156, 'I do for Lordaeron that should, and words and deeds will not stop me.', 'Я делаю для Лордерона то, что должен, и никакие слова и поступки меня не остановят.',14309,0,0,5, '26499'), +(-1594157, 'Let\'s see, youg prince...', 'Ну что ж посмотрим юный принц...',13409,0,0,0, '26499'), #Epoch -(-1594119, 'g', 'Аааааааа......',13416,0,0,0, '26499'), -(-1594120, 'g', 'У тебя нет будущего...',13413,1,0,0, '26499'), -(-1594121, 'g', 'Пробил час нашего величайшего триумфа..',13414,1,0,0, '26499'), -(-1594122, 'g', 'Тебе было суждено потерпеть поражение...',13415,1,0,0, '26499'), -(-1594123, 'g', 'Тик - так... Тик - так...',13410,1,0,0, '26499'), -(-1594124, 'g', 'Слишком медленно...',13411,1,0,0, '26499'), -(-1594125, 'g', 'Пора заканчивать...',13412,1,0,0, '26499'), +(-1594119, 'We\'ll see about that, young prince.', 'Аааааааа......',13416,0,0,0, '26499'), +(-1594120, 'There is no future for you.', 'У тебя нет будущего...',13413,1,0,0, '26499'), +(-1594121, 'This is the hour of our greatest triumph!', 'Пробил час нашего величайшего триумфа..',13414,1,0,0, '26499'), +(-1594122, 'You were destined to fail.', 'Тебе было суждено потерпеть поражение...',13415,1,0,0, '26499'), +(-1594123, 'Tick tock, tick tock...', 'Тик - так... Тик - так...',13410,1,0,0, '26499'), +(-1594124, 'Not quick enough!', 'Слишком медленно...',13411,1,0,0, '26499'), +(-1594125, 'Let\'s get this over with.', 'Пора заканчивать...',13412,1,0,0, '26499'), #Street -(-1594158, 'g', 'Это займет совсем не много времени.',14310,0,0,0, '26499'), -(-1594159, 'g', 'Слава свету, что потайной ход еще работает!',14311,0,0,0, '26499'), -(-1594160, 'g', 'Давайте пройдем этот участок как можно быстрее. Если мы не погибнем от нежити, то можем погибнуть от этого огня.',14312,0,0,0, '26499'), -(-1594161, 'g', 'Отдышитесь немного, но имейте ввиду нам скоро снова в путь.',14313,0,0,0, '26499'), -(-1594162, 'g', 'Отдых окончен надо идти, Малганис ждет.',14314,0,0,0, '26499'), -(-1594163, 'g', 'Наконец нам хоть как то повезло! Огонь еще не добрался до торгового ряда. Малганис должен быть на площади рыцарей, которая находится не далеко от сюда. Скажите мне как будете готовы идти дальше.',14315,0,0,0, '26499'), -(-1594164, 'g', 'Да свершится правосудие.',14316,0,0,0, '26499'), +(-1594158, 'It will take not much time.', 'Это займет совсем не много времени.',14310,0,0,0, '26499'), +(-1594159, 'Thanks Light, backdoor still works!', 'Слава Свету, что потайной ход еще работает!',14311,0,0,0, '26499'), +(-1594160, 'Let\'s pass through this area as soon as possible. If we do not perish from the undead, we can die from this fire.', 'Давайте пройдем этот участок как можно быстрее. Если мы не погибнем от нежити, то можем погибнуть от этого огня.',14312,0,0,0, '26499'), +(-1594161, 'Breather a little bit, but keep in mind, we will soon again in the path.', 'Отдышитесь немного, но имейте в виду, нам скоро снова в путь.',14313,0,0,0, '26499'), +(-1594162, 'The rest is over, let\'s go. Mal\'Ganis waits.', 'Отдых окончен надо идти, Мал\'Ганис ждет.',14314,0,0,0, '26499'), +(-1594163, 'Finally, we even like that lucky! The fire has not yet reached the commercial area. Mal\'Ganis should be in Square of Knights, which is not far from here. Tell me when you\'re ready to go.', 'Наконец нам хоть как то повезло! Огонь еще не добрался до торгового ряда. Мал\'Ганис должен быть на площади рыцарей, которая находится недалеко отсюда. Скажите мне как будете готовы идти дальше.',14315,0,0,0, '26499'), +(-1594164, 'Let\'s justice will be here.', 'Да свершится правосудие.',14316,0,0,0, '26499'), #malganis -(-1594170, 'g', 'Это будет достойное испытание Принц артас!',14413,1,0,0, '26499'), -(-1594171, 'g', 'Слишком просто...',14416,1,0,0, '26499'), -(-1594172, 'g', 'Темный повелитель не доволен твоим вмешательством...',144107,1,0,0, '26499'), -(-1594173, 'g', 'Мне нужен Принц Артас, а не ты...',14418,1,0,0, '26499'), -(-1594174, 'g', 'Анак Кири...',14422,1,0,0, '26499'), -(-1594175, 'g', 'Мой натиск сметет силы короля - лича...',14423,1,0,0, '26499'), -(-1594176, 'g', 'Твоя смерть была напрасна насекомое...',14424,1,0,0, '26499'), -(-1594177, 'g', 'Твое время вышло...',14425,1,0,0, '26499'), -(-1594178, 'g', 'Аррррхххх... Я и так провел слишком много времени в этой слабой оболочке...',14426,1,0,0, '26499'), -(-1594179, 'g', 'Ирл Нарат... Я малганис.... Я вечен...',14427,1,0,0, '26499'), -(-1594180, 'g', 'Тебе никогда не победить короля - лича без моих войск! Я отомщу и тебе и ему...',14429,1,0,0, '26499'), -(-1594181, 'g', 'Мы покончим с этим сейчас же Малганис. Один на один...',14317,0,0,0, '26499'), -(-1594182, 'g', 'Твое путешествие начинается юный принц. Собирай свои войска и отправляйся в царство вечных снегов, Нордскол! Там мы уладим все наши дела, там ты узнаешь свою судьбу.',14412,0,0,0, '26499'), -(-1594183, 'g', 'Я отыщу тебя на краю земли... Ты слышешь меня? На краю земли...',14318,1,0,5, '26499'), -(-1594184, 'g', 'Вы славно сражались сегодня! Все что Малганис оставил тут ваша награда. А мне нужно начинать готовиться к экспедиции в нордскол.',14319,0,0,5, '26499'), -(-1594185, 'g', 'Отдохни!',14414,1,0,0, '26499'), -(-1594186, 'g', 'Ты выглядишь усталым!',14415,1,0,0, '26499'), -(-1594187, 'g', 'Я лишь зря трачу тут свое время. Мне нужно собраться силами в моем родном мире.',14428,1,0,0, '26499'), -(-1594188, 'g', 'Наконец нам хоть как то повезло! Огонь еще не добрался до торгового ряда. Малганис должен быть на площади рыцарей, которая находится не далеко от сюда. Скажите мне как будете готовы идти дальше.',14315,0,0,0, '26499'); +(-1594170, 'This will be a fine test, Prince Arthas.', 'Это будет достойное испытание Принц артас!',14413,1,0,0, '26499'), +(-1594171, 'All too easy.', 'Слишком просто...',14416,1,0,0, '26499'), +(-1594172, 'The dark lord is displeased with your interference.', 'Темный повелитель не доволен твоим вмешательством...',144107,1,0,0, '26499'), +(-1594173, 'It is Prince Arthas I want, not you.', 'Мне нужен Принц Артас, а не ты...',14418,1,0,0, '26499'), +(-1594174, 'Anak\'Keri...', 'Анак Кири...',14422,1,0,0, '26499'), +(-1594175, 'My onslaught will wash over the Lich King\'s forces...', 'Мой натиск сметет силы короля - лича...',14423,1,0,0, '26499'), +(-1594176, 'Your death is in vain, tiny mortal...', 'Твоя смерть была напрасна насекомое...',14424,1,0,0, '26499'), +(-1594177, 'Your time has come to an end!', 'Твое время вышло...',14425,1,0,0, '26499'), +(-1594178, '*Struggling sounds* I spent too much time in that weak little shell...', 'Аррррхххх... Я и так провел слишком много времени в этой слабой оболочке...',14426,1,0,0, '26499'), +(-1594179, 'I AM MAL\'GANIS! I AM ETERNAL!', 'Ирл Нарат... Я Мал\'Ганис.... Я вечен...',14427,1,0,0, '26499'), +(-1594180, 'You\'ll never defeat the Lich King without my forces! I\'ll have my revenge...on him, AND you...', 'Тебе никогда не победить короля - лича без моих войск! Я отомщу и тебе и ему...',14429,1,0,0, '26499'), +(-1594181, 'We\'re going to finish this right now, Mal\'Ganis!', 'Мы покончим с этим сейчас же Мал\'Ганис. Один на один...',14317,0,0,0, '26499'), +(-1594182, 'Your journey has just begun, young prince. Gather your forces, and meet me in the arctic land of Northrend. It is there we shall settle the score between us. It is there that your true destiny will unfold.', 'Твое путешествие начинается юный принц. Собирай свои войска и отправляйся в царство вечных снегов, Нордскол! Там мы уладим все наши дела, там ты узнаешь свою судьбу.',14412,0,0,0, '26499'), +(-1594183, 'I\'ll hunt you to the ends of the earth if I have to! Do you hear me? To the ends of the earth!', 'Я отыщу тебя на краю земли... Ты слышишь меня? На краю земли...',14318,1,0,5, '26499'), +(-1594184, 'You performed well this day. Anything that Mal\'Ganis has left behind is yours. Take it as your reward. I must now begin plans for an expedition to Northrend.', 'Вы славно сражались сегодня! Все что Мал\'Ганис оставил тут - ваша награда. А мне нужно начинать готовиться к экспедиции в Нордскол.',14319,0,0,5, '26499'), +(-1594185, 'Time out...', 'Отдохни!',14414,1,0,0, '26499'), +(-1594186, 'You seem tired.', 'Ты выглядишь усталым!',14415,1,0,0, '26499'), +(-1594187, 'ENOUGH! I waste my time here...I must gather my strength on the home world...', 'Я лишь зря трачу тут свое время. Мне нужно собраться силами в моем родном мире.',14428,1,0,0, '26499'); DELETE FROM script_waypoint WHERE entry=26528; DELETE FROM script_waypoint WHERE entry=26499; @@ -192,6 +190,7 @@ INSERT INTO script_waypoint VALUES (26499, 30, 2417.584,1121.026,148.082, 10000, 'WP29'), (26499, 31, 2420.949,1119.944,148.075, 29000, 'WP30 - pause'), (26499, 32, 2444.682,1111.705,148.076, 0, 'WP31 - Stop'), + (26499, 33, 2457.133,1120.941,150.008, 0, 'House WP11'), (26499, 34, 2459.694,1127.012,150.008, 0, 'House WP12'), (26499, 35, 2469.617,1122.274,150.008, 0, 'House WP13'), From 6215c0494c0f650f16b1a1e418d0793dd2f84992 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 3 Jun 2010 18:36:41 +0400 Subject: [PATCH 331/405] ICC part 31 (LK notcrashed part 1) && other bosses correct --- Makefile.am | 2 +- addition/723_icecrown_down_mangos.sql | 9 +- .../pit_of_saron/boss_forgemaster_gafrost.cpp | 23 +++++ .../pit_of_saron/boss_krick_and_ick.cpp | 93 +++++++++++++++++-- .../boss_scourgelord_tirannus.cpp | 64 ------------- .../boss_scourgelord_tyrannus.cpp | 64 +++++++++++++ .../frozen_halls/pit_of_saron/def_pit.h | 14 ++- .../pit_of_saron/instance_pit_of_saron.cpp | 8 +- .../icecrown_citadel/blood_prince_council.cpp | 3 + .../boss_blood_queen_lanathel.cpp | 1 + .../boss_deathbringer_saurfang.cpp | 1 + .../icecrown_citadel/boss_festergut.cpp | 1 + .../boss_lady_deathwhisper.cpp | 1 + .../icecrown_citadel/boss_lord_marrowgar.cpp | 1 + .../boss_proffesor_putricide.cpp | 1 + .../icecrown_citadel/boss_rotface.cpp | 1 + .../icecrown_citadel/boss_the_lich_king.cpp | 25 +++++ .../icecrown_citadel/icecrown_spire.cpp | 2 + .../icecrown_citadel/icecrown_teleport.cpp | 2 +- system/ScriptLoader.cpp | 4 +- 20 files changed, 232 insertions(+), 88 deletions(-) delete mode 100644 scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tirannus.cpp diff --git a/Makefile.am b/Makefile.am index 91f1b6ca2..2206cc119 100644 --- a/Makefile.am +++ b/Makefile.am @@ -343,7 +343,7 @@ scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_ scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp \ scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp \ scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_gafrost.cpp \ -scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tirannus.cpp \ +scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp \ scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp \ scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp \ scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falryn.cpp \ diff --git a/addition/723_icecrown_down_mangos.sql b/addition/723_icecrown_down_mangos.sql index c33724870..7616a77e9 100644 --- a/addition/723_icecrown_down_mangos.sql +++ b/addition/723_icecrown_down_mangos.sql @@ -1,10 +1,15 @@ UPDATE `instance_template` SET `script`='instance_forge_of_souls' WHERE `map`=632; UPDATE `creature_template` SET `ScriptName`='boss_bronjahm', `AIName` ='' WHERE `entry`=36497; -UPDATE `creature_template` SET `ScriptName`='mob_soul_fragment', `modelid_A`= 10771, `modelid_H`= 10771, `AIName` ='' WHERE `entry`=36535; --- original modelid - 30233 +UPDATE `creature_template` SET `ScriptName`='mob_soul_fragment', `modelid_A`= 30233, `modelid_H`= 30233, `AIName` ='' WHERE `entry`=36535; +-- UPDATE `creature_template` SET `ScriptName`='mob_soul_storm', `AIName` ='' WHERE `entry`=; -- UPDATE `creature_template` SET `ScriptName`='boss_devourer', `AIName` ='' WHERE `entry`=33113; -- UPDATE `instance_template` SET `script`='instance_pit_of_saron' WHERE `map`=658; +-- UPDATE `creature_template` SET `ScriptName`='boss_ick', `AIName` ='' WHERE `entry`=36476; +-- UPDATE `creature_template` SET `ScriptName`='boss_krick', `AIName` ='' WHERE `entry`=36477; +-- UPDATE `creature_template` SET `ScriptName`='mob_exploding_orb', `AIName` ='' WHERE `entry`=36610; +-- UPDATE `creature_template` SET `ScriptName`='boss_forgemaster_garfrost', `AIName` ='' WHERE `entry`=36494; +-- UPDATE `creature_template` SET `ScriptName`='boss_scourgelord_tyrannus', `AIName` ='' WHERE `entry`=36658; UPDATE `instance_template` SET `script`='instance_halls_of_reflection' WHERE `map`=668; UPDATE `creature_template` SET `ScriptName`='boss_falryn' WHERE `entry`=38112; diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_gafrost.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_gafrost.cpp index 0df035e53..b2f10aab1 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_gafrost.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_gafrost.cpp @@ -1,3 +1,26 @@ +/* Copyright (C) 2006 - 2010 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_forgemaster_garfrost +SD%Complete: 0% +SDComment: by ..., modified by /dev/rsa +SDCategory: Pit of Saron +EndScriptData */ + #include "precompiled.h" #include "def_pit.h" enum diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp index c4dfc79aa..887e17d11 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp @@ -1,13 +1,48 @@ +/* Copyright (C) 2006 - 2010 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_ick && boss_krick +SD%Complete: 1% +SDComment: by ..., modified by /dev/rsa +SDCategory: Pit of Saron +EndScriptData */ + #include "precompiled.h" #include "def_pit.h" enum { - //common - SPELL_BERSERK = 47008, - //yells - //summons - //Abilities - SPELL_FEAR = 68950 + //common + SPELL_BERSERK = 47008, + //yells + //summons + NPC_EXPLODING_ORB = 36610, + //Abilities + SPELL_FEAR = 68950, + SPELL_EXPLOSIVE_ORB = 69019, + SPELL_EXPLOSIVE = 69012, + SPELL_SHADOWBOLT = 69028, + SPELL_STRANGULATE = 69413, + SPELL_TOXIC = 69024, + SPELL_KICK = 69021, + SPELL_POISON = 68989, + SPELL_POISON_H = 70434, + SPELL_PURSUIT = 68987, + SPELL_PUSTULANT = 69581, + SPELL_CONFUSION = 69029, }; struct MANGOS_DLL_DECL boss_krickAI : public ScriptedAI @@ -92,6 +127,47 @@ CreatureAI* GetAI_boss_ick(Creature* pCreature) return new boss_ickAI(pCreature); } +struct MANGOS_DLL_DECL mob_exploding_orbAI : public ScriptedAI +{ + mob_exploding_orbAI(Creature *pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_creature->SetActiveObjectState(true); + Reset(); + } + + ScriptedInstance* pInstance; + uint32 ExplodeTimer; + + void Reset() + { + ExplodeTimer = 18000; + } + + void AttackStart(Unit* who) + { + return; + } + + void UpdateAI(const uint32 diff) + { + if(!pInstance) return; + + if (ExplodeTimer < diff) + { + DoCast(m_creature, SPELL_EXPLOSIVE_ORB); + m_creature->ForcedDespawn(); + } else ExplodeTimer -= diff; + return; + } + +}; + +CreatureAI* GetAI_mob_exploding_orb(Creature* pCreature) +{ + return new mob_exploding_orbAI(pCreature); +} + void AddSC_boss_krick() { @@ -105,4 +181,9 @@ void AddSC_boss_krick() newscript->Name = "boss_ick"; newscript->GetAI = &GetAI_boss_ick; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_exploding_orb"; + newscript->GetAI = &GetAI_mob_exploding_orb; + newscript->RegisterSelf(); } diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tirannus.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tirannus.cpp deleted file mode 100644 index f921c2177..000000000 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tirannus.cpp +++ /dev/null @@ -1,64 +0,0 @@ -#include "precompiled.h" -#include "def_pit.h" -enum -{ - //common - SPELL_BERSERK = 47008, - //yells - //summons - //Abilities - SPELL_FEAR = 68950 -}; - -struct MANGOS_DLL_DECL boss_scourgelord_tirannusAI : public ScriptedAI -{ - boss_scourgelord_tirannusAI(Creature* pCreature) : ScriptedAI(pCreature) - { - pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Regular = pCreature->GetMap()->IsRegularDifficulty(); - Reset(); - } - - bool Regular; - ScriptedInstance *pInstance; - - void Reset() - { - if(pInstance) pInstance->SetData(TYPE_TIRANNUS, NOT_STARTED); - } - - void Aggro(Unit *who) - { - if(pInstance) pInstance->SetData(TYPE_TIRANNUS, IN_PROGRESS); - } - - void JustDied(Unit *killer) - { - if(pInstance) pInstance->SetData(TYPE_TIRANNUS, DONE); - } - - void UpdateAI(const uint32 diff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - DoMeleeAttackIfReady(); - } -}; - - -CreatureAI* GetAI_boss_scourgelord_tirannus(Creature* pCreature) -{ - return new boss_scourgelord_tirannusAI(pCreature); -} - - -void AddSC_boss_scourgelord_tirannus() -{ - Script *newscript; - newscript = new Script; - newscript->Name = "boss_scourgelord_tirannus"; - newscript->GetAI = &GetAI_boss_scourgelord_tirannus; - newscript->RegisterSelf(); - -} diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp index a023c3d55..15cf84633 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp @@ -22,3 +22,67 @@ SDCategory: Pit of Saron EndScriptData */ #include "precompiled.h" +#include "def_pit.h" + +enum +{ + //common + SPELL_BERSERK = 47008, + //yells + //summons + //Abilities + SPELL_FEAR = 68950 +}; + +struct MANGOS_DLL_DECL boss_scourgelord_tyrannusAI : public ScriptedAI +{ + boss_scourgelord_tyrannusAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Regular = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + bool Regular; + ScriptedInstance *pInstance; + + void Reset() + { + if(pInstance) pInstance->SetData(TYPE_TYRANNUS, NOT_STARTED); + } + + void Aggro(Unit *who) + { + if(pInstance) pInstance->SetData(TYPE_TYRANNUS, IN_PROGRESS); + } + + void JustDied(Unit *killer) + { + if(pInstance) pInstance->SetData(TYPE_TYRANNUS, DONE); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + + +CreatureAI* GetAI_boss_scourgelord_tyrannus(Creature* pCreature) +{ + return new boss_scourgelord_tyrannusAI(pCreature); +} + + +void AddSC_boss_scourgelord_tyrannus() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "boss_scourgelord_tyrannus"; + newscript->GetAI = &GetAI_boss_scourgelord_tyrannus; + newscript->RegisterSelf(); + +} diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/def_pit.h b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/def_pit.h index da0b141dc..3451f2807 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/def_pit.h +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/def_pit.h @@ -4,19 +4,17 @@ enum { - MAX_ENCOUNTERS = 4, + MAX_ENCOUNTERS = 4, TYPE_GAFROST = 0, - TYPE_KRICK = 1, - TYPE_ICK = 2, - TYPE_TIRANNUS = 3, + TYPE_KRICK = 1, + TYPE_ICK = 2, + TYPE_TYRANNUS = 3, - NPC_GAFROST = 36494, + NPC_GAFROST = 36494, NPC_KRICK = 36477, NPC_ICK = 36476, - NPC_TIRANNUS = 36658 - -// GO_1 = 194232 + NPC_TYRANNUS = 36658, }; diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp index d833bf357..0a13f5857 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp @@ -67,7 +67,7 @@ struct MANGOS_DLL_DECL instance_pit_of_saron : public ScriptedInstance case NPC_GAFROST: m_uiGafrostGUID = pCreature->GetGUID(); break; case NPC_KRICK: m_uiKrickGUID = pCreature->GetGUID(); break; case NPC_ICK: m_uiIckGUID = pCreature->GetGUID(); break; - case NPC_TIRANNUS: m_uiTirannusGUID = pCreature->GetGUID(); break; + case NPC_TYRANNUS: m_uiTirannusGUID = pCreature->GetGUID(); break; } } @@ -84,7 +84,7 @@ struct MANGOS_DLL_DECL instance_pit_of_saron : public ScriptedInstance case TYPE_GAFROST: m_auiEncounter[0] = uiData; break; case TYPE_KRICK: m_auiEncounter[1] = uiData; break; case TYPE_ICK: m_auiEncounter[2] = uiData; break; - case TYPE_TIRANNUS: m_auiEncounter[3] = uiData; break; + case TYPE_TYRANNUS: m_auiEncounter[3] = uiData; break; } if (uiData == DONE) @@ -115,7 +115,7 @@ struct MANGOS_DLL_DECL instance_pit_of_saron : public ScriptedInstance case TYPE_GAFROST: return m_auiEncounter[0]; case TYPE_KRICK: return m_auiEncounter[1]; case TYPE_ICK: return m_auiEncounter[2]; - case TYPE_TIRANNUS: return m_auiEncounter[3]; + case TYPE_TYRANNUS: return m_auiEncounter[3]; } return 0; } @@ -127,7 +127,7 @@ struct MANGOS_DLL_DECL instance_pit_of_saron : public ScriptedInstance case NPC_GAFROST: return m_uiGafrostGUID; case NPC_KRICK: return m_uiKrickGUID; case NPC_ICK: return m_uiIckGUID; - case NPC_TIRANNUS: return m_uiTirannusGUID; + case NPC_TYRANNUS: return m_uiTirannusGUID; } return 0; } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp index 0e580a228..3f050cdfb 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp @@ -78,6 +78,7 @@ struct MANGOS_DLL_DECL boss_valanar_iccAI : public ScriptedAI m_pInstance->SetData(DATA_BLOOD_COUNCIL_HEALTH, m_creature->GetMaxHealth()*3); stage = 0; intro = false; + bsw->resetTimers(); } void MoveInLineOfSight(Unit* pWho) @@ -209,6 +210,7 @@ struct MANGOS_DLL_DECL boss_taldaram_iccAI : public ScriptedAI if(!m_pInstance) return; m_pInstance->SetData(DATA_BLOOD_COUNCIL_HEALTH, m_creature->GetMaxHealth()*3); stage = 0; + bsw->resetTimers(); } void JustReachedHome() @@ -324,6 +326,7 @@ struct MANGOS_DLL_DECL boss_keleseth_iccAI : public ScriptedAI if(!m_pInstance) return; m_pInstance->SetData(DATA_BLOOD_COUNCIL_HEALTH, m_creature->GetMaxHealth()*3); stage = 0; + bsw->resetTimers(); } void JustReachedHome() diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp index 45555df35..41254658e 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp @@ -66,6 +66,7 @@ struct MANGOS_DLL_DECL boss_blood_queen_lanathelAI : public ScriptedAI pInstance->SetData(TYPE_LANATHEL, NOT_STARTED); stage = 0; UpdateTimer = 1000; + bsw->resetTimers(); } void JustReachedHome() diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp index 3c18efe77..66c1abfdd 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp @@ -71,6 +71,7 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI pInstance->SetData(TYPE_SAURFANG, NOT_STARTED); m_uiIsFrenzy = false; stage = 0; + bsw->resetTimers(); } void Aggro(Unit *who) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp index 4d351a4d2..30be7bfc8 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp @@ -49,6 +49,7 @@ struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); bsw = new BossSpellWorker(this); Reset(); + bsw->resetTimers(); } ScriptedInstance *pInstance; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp index 9bcf5df63..691bb0c11 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp @@ -86,6 +86,7 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI stage = 0; MovementStarted = false; intro = false; + bsw->resetTimers(); } void MoveInLineOfSight(Unit* pWho) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp index a8f3cdfb7..6270a27c7 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp @@ -61,6 +61,7 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI { if(pInstance) pInstance->SetData(TYPE_MARROWGAR, NOT_STARTED); stage = 0; + bsw->resetTimers(); } void MoveInLineOfSight(Unit* pWho) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp index 5ac1db0e7..581f7ba80 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp @@ -90,6 +90,7 @@ struct MANGOS_DLL_DECL boss_proffesor_putricideAI : public ScriptedAI stage = 0; intro = false; UpdateTimer = 1000; + bsw->resetTimers(); } void MoveInLineOfSight(Unit* pWho) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp index 271ea3c3e..3a1a67106 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp @@ -61,6 +61,7 @@ struct MANGOS_DLL_DECL boss_rotfaceAI : public ScriptedAI stage = 0; intro = false; pet = false; + bsw->resetTimers(); } void MoveInLineOfSight(Unit* pWho) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp index 044490f07..e2d6f9678 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp @@ -155,6 +155,7 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI uint32 nextPoint; uint32 UpdateTimer; bool movementstarted; + bool battlestarted; void Reset() { @@ -165,6 +166,7 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI nextEvent = 0; nextPoint = 0; movementstarted = false; + battlestarted = false; } void MoveInLineOfSight(Unit* pWho) @@ -285,6 +287,7 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI break; case 12120: m_creature->SetInCombatWithZone(); + battlestarted = true; pInstance->SetData(TYPE_EVENT,12999); UpdateTimer = 6000; break; @@ -297,6 +300,14 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI pInstance->SetData(TYPE_EVENT_TIMER, UpdateTimer); } + if (battlestarted && !m_creature->SelectHostileTarget()) + { + battlestarted = false; + pInstance->SetData(TYPE_LICH_KING, FAIL); + EnterEvadeMode(); + return; + } + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -330,6 +341,7 @@ struct MANGOS_DLL_DECL boss_tirion_iccAI : public ScriptedAI { if(!pInstance) return; movementstarted = false; + m_creature->RemoveAurasDueToSpell(SPELL_ICEBLOCK_TRIGGER); } void StartMovement(uint32 id, uint32 _nextEvent) @@ -355,6 +367,13 @@ struct MANGOS_DLL_DECL boss_tirion_iccAI : public ScriptedAI void UpdateAI(const uint32 diff) { + if (pInstance->GetData(TYPE_LICH_KING) == FAIL && m_creature->HasAura(SPELL_ICEBLOCK_TRIGGER)) + { + m_creature->RemoveAurasDueToSpell(SPELL_ICEBLOCK_TRIGGER); + m_creature->GetMotionMaster()->MoveTargetedHome(); + Reset(); + } + if (pInstance->GetData(TYPE_EVENT_NPC) == NPC_TIRION) { UpdateTimer = pInstance->GetData(TYPE_EVENT_TIMER); @@ -408,6 +427,11 @@ struct MANGOS_DLL_DECL boss_tirion_iccAI : public ScriptedAI bool GossipHello_boss_tirion_icc(Player* pPlayer, Creature* pCreature) { + ScriptedInstance* pInstance; + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + + if (pInstance->GetData(TYPE_LICH_KING) != NOT_STARTED) return false; + char const* _message; switch (LocaleConstant currentlocale = pPlayer->GetSession()->GetSessionDbcLocale()) @@ -444,6 +468,7 @@ bool GossipSelect_boss_tirion_icc(Player* pPlayer, Creature* pCreature, uint32 u if (uiAction == GOSSIP_ACTION_INFO_DEF) { pPlayer->CLOSE_GOSSIP_MENU(); + pInstance->SetData(TYPE_LICH_KING, IN_PROGRESS); pInstance->SetData(TYPE_EVENT,12000); return true; } else return false; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp index a69a6a5a6..33b5006aa 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp @@ -52,6 +52,7 @@ struct MANGOS_DLL_DECL mob_spire_frostwyrmAI : public ScriptedAI { m_creature->SetRespawnDelay(DAY); stage = 0; + bsw->resetTimers(); } void UpdateAI(const uint32 diff) @@ -124,6 +125,7 @@ struct MANGOS_DLL_DECL mob_frost_giantAI : public ScriptedAI { m_creature->SetRespawnDelay(7*DAY); stage = 0; + bsw->resetTimers(); } void UpdateAI(const uint32 diff) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp index 5c6535f77..8543216e3 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp @@ -96,7 +96,7 @@ bool GOGossipHello_go_icecrown_teleporter(Player *player, GameObject* pGo) }; for(uint8 i = 0; i < PORTALS_COUNT; i++) { - if (PortalLoc[i].active == true && (PortalLoc[i].state == true || pInstance->GetData(TYPE_TELEPORT) >= PortalLoc[i].encounter)) + if (PortalLoc[i].active == true && (PortalLoc[i].state == true || pInstance->GetData(TYPE_TELEPORT) >= PortalLoc[i].encounter) || player->isGameMaster()) player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, PortalLoc[i].name[_locale], GOSSIP_SENDER_MAIN, i); }; player->SEND_GOSSIP_MENU(TELEPORT_GOSSIP_MESSAGE, pGo->GetGUID()); diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index 165bb68d4..f071d94b4 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -407,7 +407,7 @@ extern void AddSC_boss_bronjahm(); extern void AddSC_instance_pit_of_saron(); extern void AddSC_boss_forgemaster_gafrost(); extern void AddSC_boss_krick(); -extern void AddSC_boss_scourgelord_tirannus(); +extern void AddSC_boss_scourgelord_tyrannus(); extern void AddSC_instance_halls_of_reflection(); extern void AddSC_boss_falryn(); @@ -894,7 +894,7 @@ void AddScripts() AddSC_instance_pit_of_saron(); AddSC_boss_forgemaster_gafrost(); AddSC_boss_krick(); - AddSC_boss_scourgelord_tirannus(); + AddSC_boss_scourgelord_tyrannus(); AddSC_instance_halls_of_reflection(); AddSC_boss_falryn(); From 4021ff3a417052980cc7f808a79af95a1c71dde8 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Fri, 4 Jun 2010 17:45:44 +0400 Subject: [PATCH 332/405] ICC part 32 (LK yelss and phases, only safe part). Not finished. --- .../721_icecrown_spelltable_scriptdev2.sql | 32 +- .../icecrown_citadel/boss_the_lich_king.cpp | 283 ++++++++++++++---- .../instance_icecrown_spire.cpp | 16 +- 3 files changed, 263 insertions(+), 68 deletions(-) diff --git a/addition/721_icecrown_spelltable_scriptdev2.sql b/addition/721_icecrown_spelltable_scriptdev2.sql index 39e3ed096..5ed41a8a4 100644 --- a/addition/721_icecrown_spelltable_scriptdev2.sql +++ b/addition/721_icecrown_spelltable_scriptdev2.sql @@ -284,28 +284,30 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ -- Lich king DELETE FROM `boss_spell_table` WHERE `entry` = 36597; INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES -(36597, 70541, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), -(36597, 70337, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), -(36597, 74074, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), -(36597, 69409, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), -(36597, 72754, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), -(36597, 68980, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), -(36597, 68981, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), -(36597, 72133, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), -(36597, 72262, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), -(36597, 69200, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 70541, 0, 0, 0, 6000, 0, 0, 0, 10000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(36597, 70337, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(36597, 74074, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(36597, 69409, 0, 0, 0, 10000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 3, 0, 0), +(36597, 72754, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 10, 50, 0, 15, 0, 0), +(36597, 68980, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(36597, 68981, 0, 0, 0, 2000, 0, 0, 0, 8000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 72133, 0, 0, 0, 5000, 0, 0, 0, 10000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 72262, 0, 0, 0, 60000, 0, 0, 0, 60000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 69200, 0, 0, 0, 15000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36597, 69242, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), -(36597, 69103, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 69103, 0, 0, 0, 3000, 0, 0, 0, 5000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36597, 69099, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36597, 69108, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), -(36597, 70358, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), -(36597, 70372, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 70358, 0, 0, 0, 5000, 0, 0, 0, 60000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 70372, 0, 0, 0, 20000, 0, 0, 0, 60000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36597, 72149, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36597, 72143, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36597, 70498, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36597, 70503, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), -(36597, 69037, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), -(36597, 36609, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 69037, 0, 0, 0, 20000, 0, 0, 0, 40000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 36609, 0, 0, 0, 20000, 0, 0, 0, 40000, 0, 0, 0, 0, 0, 0, 9, 0, 0), +(36597, 71769, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 47008, 0, 0, 0, 900000, 0, 0, 0, 900000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36597, 74352, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0); -- ice sphere DELETE FROM `boss_spell_table` WHERE `entry` = 36633; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp index e2d6f9678..f2cc92e62 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: boss_the_lich_king -SD%Complete: 1% +SD%Complete: 5% SDComment: by /dev/rsa SDCategory: Icecrown Citadel EndScriptData */ @@ -88,45 +88,15 @@ enum BossSpells }; -enum Yells +enum Common { - SAY_INTRO_1_KING = -1631501, - SAY_INTRO_2_TIRION = -1631552, - SAY_INTRO_3_KING = -1631503, - SAY_INTRO_4_TIRION = -1631554, - SAY_INTRO_5_KING = -1631505, - SAY_AGGRO_KING = -1631506, - SAY_REMORSELESS_WINTER = -1631507, - SAY_RANDOM_1 = -1631508, - SAY_RANDOM_2 = -1631509, - SAY_KILL_1 = -1631510, - SAY_KILL_2 = -1631511, - SAY_BERSERK = -1631512, - SAY_ENDING_1_KING = -1631513, - SAY_ENDING_2_KING = -1631514, - SAY_ENDING_3_KING = -1631515, - SAY_ENDING_4_KING = -1631516, - SAY_ENDING_5_TIRION = -1631517, - SAY_ENDING_6_KING = -1631518, - SAY_ENDING_7_KING = -1631519, - SAY_ENDING_8_TIRION = -1631520, - SAY_ENDING_9_FATHER = -1631521, - SAY_ENDING_10_TIRION = -1631522, - SAY_ENDING_11_FATHER = -1631523, - SAY_ENDING_12_KING = -1631524, - SAY_DEATH_KING = -1631525, - SAY_ESCAPE_FROSTMOURNE = -1631526, - SAY_HARVEST_SOUL = -1631527, - SAY_DEVOURED_FROSTMOURNE = -1631528, - SAY_SUMMON_VALKYR = -1631529, - SAY_BROKEN_ARENA = -1631530, - SAY_10_PROZENT = -1631531, + FINAL_BATTLE_MOVIE = 14, }; static Locations SpawnLoc[]= { {459.93689f, -2124.638184f, 1040.860107f}, // 0 Lich King Intro - {503.15652f, -2124.516602f, 1040.860107f}, // 1 Lich king move end + {503.15652f, -2124.516602f, 1040.860107f}, // 1 Lich king move end {491.27118f, -2124.638184f, 1040.860107f}, // 2 Tirion 1 {481.69797f, -2124.638184f, 1040.860107f}, // 3 Tirion 2 {498.00448f, 2201.573486f, 1046.093872f}, // 4 Valkyrs? @@ -156,6 +126,7 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI uint32 UpdateTimer; bool movementstarted; bool battlestarted; + Creature* pTirion; void Reset() { @@ -186,14 +157,14 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI void KilledUnit(Unit* pVictim) { -/* switch (urand(0,1)) { + switch (urand(0,1)) { case 0: - DoScriptText(-1631006,m_creature,pVictim); + DoScriptText(-1631519,m_creature,pVictim); break; case 1: - DoScriptText(-1631007,m_creature,pVictim); + DoScriptText(-1631517,m_creature,pVictim); break; - };*/ + }; } void JustReachedHome() @@ -244,13 +215,13 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI break; case 12020: m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_TALK); - DoScriptText(SAY_INTRO_1_KING, m_creature); + DoScriptText(-1631501, m_creature); UpdateTimer = 12000; pInstance->SetData(TYPE_EVENT,12030); break; case 12040: m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_READY2H); - DoScriptText(SAY_INTRO_3_KING, m_creature); + DoScriptText(-1631503, m_creature); UpdateTimer = 3000; pInstance->SetData(TYPE_EVENT,12041); break; @@ -271,7 +242,7 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI break; case 12060: m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_TALK); - DoScriptText(SAY_INTRO_5_KING, m_creature); + DoScriptText(-1631505, m_creature); UpdateTimer = 10000; pInstance->SetData(TYPE_EVENT,12080); break; @@ -288,10 +259,43 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI case 12120: m_creature->SetInCombatWithZone(); battlestarted = true; - pInstance->SetData(TYPE_EVENT,12999); - UpdateTimer = 6000; + pInstance->SetData(TYPE_EVENT,12200); + UpdateTimer = 10000; + break; + case 12200: + DoScriptText(-1631506, m_creature); + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT,12220); break; case 13000: + DoScriptText(-1631507, m_creature); + UpdateTimer = 10000; + pInstance->SetData(TYPE_EVENT,13020); + break; + case 13020: + DoScriptText(-1631508, m_creature); + UpdateTimer = 10000; + pInstance->SetData(TYPE_EVENT,13060); + break; + case 13060: + DoScriptText(-1631509, m_creature); + UpdateTimer = 10000; + pInstance->SetData(TYPE_EVENT,13080); + break; + case 13100: + DoScriptText(-1631510, m_creature); + UpdateTimer = 8000; + pInstance->SetData(TYPE_EVENT,13110); + break; + case 13120: + DoScriptText(-1631511, m_creature); + UpdateTimer = 10000; + pInstance->SetData(TYPE_EVENT,13130); + break; + case 13140: + DoScriptText(-1631512, m_creature); + UpdateTimer = 2000; + pInstance->SetData(TYPE_EVENT,13150); break; default: break; @@ -311,9 +315,165 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - bsw->timedCast(SPELL_SHOCKWAVE, diff); + switch(stage) + { + case 0: // Phase 1 +// bsw->timedCast(SPELL_SHOCKWAVE, diff); + bsw->timedCast(SPELL_INFEST, diff); + bsw->timedCast(SPELL_SUMMON_DRUDGE_GHOULS, diff); + bsw->timedCast(SPELL_PLAGUE_SIPHON, diff); + bsw->timedCast(SPELL_SUMMON_SHAMBLING_HORROR, diff); + bsw->timedCast(SPELL_NECROTIC_PLAGUE, diff); + + DoMeleeAttackIfReady(); + if (bsw->timedQuery(SPELL_BERSERK, diff)) + { + bsw->doCast(SPELL_BERSERK); + DoScriptText(-1631518,m_creature); + }; + + if (m_creature->GetHealthPercent() < 70.0f) + { + stage = 1; + DoScriptText(-1631515,m_creature); + } + break; + case 1: // Go in transition phase + m_creature->AttackStop(); + SetCombatMovement(false); + StartMovement(1,0); + stage = 2; + break; + case 2: + if (movementstarted) return; + stage = 3; + break; + case 3: + bsw->timedCast(SPELL_REMORSELESS_WINTER, diff); + bsw->timedCast(SPELL_SUMMON_RAGING_SPIRIT, diff); + bsw->timedCast(SPELL_SUMMON_ICE_SPHERE, diff); + bsw->timedCast(SPELL_PAIN_AND_SUFFERING, diff); + + if (bsw->timedQuery(SPELL_BERSERK, diff)) + { + bsw->doCast(SPELL_BERSERK); + DoScriptText(-1631518,m_creature); + }; + + if (bsw->timedQuery(SPELL_QUAKE, diff)) + { + bsw->doCast(SPELL_QUAKE); + stage = 4; + DoScriptText(-1631524, m_creature); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + SetCombatMovement(true); + } + break; + case 4: // Phase 2 + + bsw->timedCast(SPELL_DEFILE, diff); + if (bsw->timedQuery(SPELL_SUMMON_VALKYR, diff)) + { + bsw->doCast(SPELL_SUMMON_VALKYR); + DoScriptText(-1631527,m_creature); + } + + bsw->timedCast(SPELL_SOUL_REAPER, diff); + bsw->timedCast(SPELL_INFEST, diff); + + DoMeleeAttackIfReady(); + + if (bsw->timedQuery(SPELL_BERSERK, diff)) + { + bsw->doCast(SPELL_BERSERK); + DoScriptText(-1631518,m_creature); + }; + + if (m_creature->GetHealthPercent() < 40.0f) + { + stage = 5; + DoScriptText(-1631523,m_creature); + } + break; + case 5: // Go in transition phase + m_creature->AttackStop(); + SetCombatMovement(false); + StartMovement(1,0); + stage = 6; + break; + case 6: + if (movementstarted) return; + stage = 7; + break; + + case 7: + bsw->timedCast(SPELL_REMORSELESS_WINTER, diff); + bsw->timedCast(SPELL_SUMMON_RAGING_SPIRIT, diff); + bsw->timedCast(SPELL_SUMMON_ICE_SPHERE, diff); + bsw->timedCast(SPELL_PAIN_AND_SUFFERING, diff); + + if (bsw->timedQuery(SPELL_BERSERK, diff)) + { + bsw->doCast(SPELL_BERSERK); + DoScriptText(-1631518,m_creature); + }; + + if (bsw->timedQuery(SPELL_QUAKE, diff)) + { + bsw->doCast(SPELL_QUAKE); + stage = 8; + DoScriptText(-1631524, m_creature); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + SetCombatMovement(true); + } + break; + case 8: // Phase 3 + + bsw->timedCast(SPELL_SOUL_REAPER, diff); + bsw->timedCast(SPELL_DEFILE, diff); + bsw->timedCast(SPELL_SUMMON_VILE_SPIRITS, diff); + if (bsw->timedQuery(SPELL_HARVEST_SOUL, diff)) + { + bsw->doCast(SPELL_HARVEST_SOUL); + DoScriptText(-16314,m_creature); + } + + bsw->timedCast(SPELL_SOUL_REAPER, diff); + bsw->timedCast(SPELL_INFEST, diff); + + DoMeleeAttackIfReady(); + + if (m_creature->GetHealthPercent() < 10.0f) + { + stage = 9; + DoScriptText(-1631429,m_creature); + } + break; + case 9: // Ending Phase start + m_creature->AttackStop(); + SetCombatMovement(false); + if (pTirion = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_TIRION))) { + m_creature->SetInCombatWith(pTirion); + pTirion->AddThreat(m_creature, 1000.0f); + } + bsw->doCast(SPELL_FURY_OF_FROSTMOURNE); + SetCombatMovement(false); + StartMovement(1,0); + stage = 10; + pInstance->SetData(TYPE_EVENT,13000); + break; + case 10: + if (movementstarted) return; + stage = 11; + bsw->doCast(SPELL_CHANNEL_KING); + break; + case 11: + break; + + } - DoMeleeAttackIfReady(); } }; @@ -384,30 +544,41 @@ struct MANGOS_DLL_DECL boss_tirion_iccAI : public ScriptedAI { case 12030: m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_TALK); - DoScriptText(SAY_INTRO_2_TIRION, m_creature); + DoScriptText(-1631552, m_creature); UpdateTimer = 9000; pInstance->SetData(TYPE_EVENT,12040); break; case 12050: m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_POINT_NOSHEATHE); - DoScriptText(SAY_INTRO_4_TIRION, m_creature); - UpdateTimer = 5000; + DoScriptText(-1631554, m_creature); + UpdateTimer = 3000; pInstance->SetData(TYPE_EVENT,12051); break; case 12051: m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE); - UpdateTimer = 3000; + UpdateTimer = 1000; pInstance->SetData(TYPE_EVENT,12052); break; case 12052: + m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); StartMovement(3,12053); break; case 12053: UpdateTimer = 3000; pInstance->SetData(TYPE_EVENT,12060); - m_creature->CastSpell(m_creature, SPELL_ICEBLOCK_TRIGGER, false); + m_creature->CastSpell(m_creature, SPELL_ICEBLOCK_TRIGGER, true); break; - case 13010: + case 13110: + DoScriptText(-1631555, m_creature); + UpdateTimer = 5000; + m_creature->CastSpell(m_creature, SPELL_TIRION_LIGHT, false); + pInstance->SetData(TYPE_EVENT,13120); + break; + case 13130: + SetCombatMovement(false); + m_creature->RemoveAurasDueToSpell(SPELL_ICEBLOCK_TRIGGER); + UpdateTimer = 2000; + pInstance->SetData(TYPE_EVENT,13140); break; default: break; @@ -494,6 +665,11 @@ struct MANGOS_DLL_DECL mob_ice_sphere_iccAI : public ScriptedAI void Reset() { + if (Unit* pTarget = bsw->SelectRandomPlayerAtRange(100.0f)) + { + m_creature->SetInCombatWith(pTarget); + m_creature->AddThreat(pTarget,100.0f); + } bsw->doCast(SPELL_ICE_SPHERE_VISUAL); } @@ -503,8 +679,11 @@ struct MANGOS_DLL_DECL mob_ice_sphere_iccAI : public ScriptedAI if (!pInstance || pInstance->GetData(TYPE_LICH_KING) != IN_PROGRESS) m_creature->ForcedDespawn(); + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + if (m_creature->getVictim()->GetTypeId() != TYPEID_PLAYER) - return; + return; bsw->timedCast(SPELL_ICE_PULSE, uiDiff); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp index 4b7f320e4..9acb99ca2 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp @@ -571,6 +571,10 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance case 12130: case 12150: case 12170: + case 13110: + case 13130: + case 13150: + case 13170: return NPC_TIRION; break; @@ -584,7 +588,17 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance case 12080: case 12100: case 12120: - case 12300: + case 12200: + case 13000: + case 13020: + case 13040: + case 13060: + case 13080: + case 13100: + case 13120: + case 13140: + case 13160: + case 13180: return NPC_LICH_KING; break; case 500: From 1b7b105c66a99a857194fb0307574b60f95557fb Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sat, 5 Jun 2010 10:47:13 +0400 Subject: [PATCH 333/405] NPCs special (from Tassadar REPO) added. --- addition/731_npc_special_mangos.sql | 6 + scripts/world/npcs_special.cpp | 220 ++++++++++++++++++++++++++++ 2 files changed, 226 insertions(+) create mode 100644 addition/731_npc_special_mangos.sql diff --git a/addition/731_npc_special_mangos.sql b/addition/731_npc_special_mangos.sql new file mode 100644 index 000000000..93f23da24 --- /dev/null +++ b/addition/731_npc_special_mangos.sql @@ -0,0 +1,6 @@ +-- Snakes trap +UPDATE `creature_template` SET `ScriptName`='npc_snake_trap_serpents' WHERE `entry` IN (19921, 19833); +-- Mirror Immage +UPDATE `creature_template` SET `speed_walk` = 2.5, modelid_A = 11686, `minlevel` = 80, `maxlevel` = 80, `AIName` = '', `ScriptName`='mob_mirror_image' WHERE `entry` = 31216; +-- Rune blade +UPDATE `creature_template` SET `modelid_A` = '11686', `modelid_H` = 11686, `AIName` = '', `ScriptName`='npc_runeblade' WHERE `entry` = 27893; diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index 32a785f23..efb4a3a02 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -1716,6 +1716,210 @@ bool GossipSelect_npc_locksmith(Player* pPlayer, Creature* pCreature, uint32 uiS return true; } +struct MANGOS_DLL_DECL mob_mirror_imageAI : public ScriptedAI +{ + mob_mirror_imageAI(Creature* pCreature) : ScriptedAI(pCreature) + { + bLocked = false; + Reset(); + } + uint64 m_uiCreatorGUID; + uint32 m_uiFrostboltTimer; + uint32 m_uiFireBlastTimer; + float fDist; + float fAngle; + bool bLocked; + + void Reset() + { + m_uiFrostboltTimer = urand(500, 1500); + m_uiFireBlastTimer = urand(4500, 6000); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!bLocked) + { + m_uiCreatorGUID = m_creature->GetCreatorGUID(); + if (Player* pOwner = (Player*)Unit::GetUnit(*m_creature, m_uiCreatorGUID)) + { + fDist = m_creature->GetDistance(pOwner); + fAngle = m_creature->GetAngle(pOwner); + } + bLocked = true; + } + + Player* pOwner = (Player*)Unit::GetUnit(*m_creature, m_uiCreatorGUID); + if (!pOwner || !pOwner->IsInWorld()) + { + m_creature->ForcedDespawn(); + return; + } + + uint64 targetGUID = 0; + + if (Spell* pSpell = pOwner->GetCurrentSpell(CURRENT_GENERIC_SPELL)) + targetGUID = pSpell->m_targets.getUnitTargetGUID(); + else if (pOwner->getVictim()) + targetGUID = pOwner->getVictim()->GetGUID(); + + Unit* pTarget = Unit::GetUnit(*m_creature, targetGUID); + + if (!pTarget || !m_creature->CanInitiateAttack() || !pTarget->isTargetableForAttack() || + !m_creature->IsHostileTo(pTarget) || !pTarget->isInAccessablePlaceFor(m_creature)) + { + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != FOLLOW_MOTION_TYPE) + { + m_creature->InterruptNonMeleeSpells(false); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveFollow(pOwner, fDist, fAngle); + } + return; + } + + if (m_uiFrostboltTimer <= uiDiff) + { + m_creature->CastSpell(pTarget, SPELL_FROSTBOLT, false, NULL, NULL, pOwner->GetGUID()); + m_uiFrostboltTimer = urand(3000, 4500); + } else m_uiFrostboltTimer -= uiDiff; + + if (m_uiFireBlastTimer <= uiDiff) + { + m_creature->CastSpell(pTarget, SPELL_FIREBLAST, false, NULL, NULL, pOwner->GetGUID()); + m_uiFireBlastTimer = urand(9000, 12000); + } else m_uiFireBlastTimer -= uiDiff; + } +}; + +CreatureAI* GetAI_mob_mirror_image(Creature* pCreature) +{ + return new mob_mirror_imageAI(pCreature); +} + +/*#### + ## npc_snake_trap_serpents - Summonned snake id are 19921 and 19833 + ####*/ + +#define SPELL_MIND_NUMBING_POISON 25810 //Viper +#define SPELL_CRIPPLING_POISON 30981 //Viper +#define SPELL_DEADLY_POISON 34655 //Venomous Snake + +#define MOB_VIPER 19921 + +struct MANGOS_DLL_DECL npc_snake_trap_serpentsAI : public ScriptedAI +{ + npc_snake_trap_serpentsAI(Creature *c) : ScriptedAI(c) {Reset();} + + uint32 SpellTimer; + bool IsViper; + + void Reset() + { + SpellTimer = 500; + + Unit *Owner = m_creature->GetOwner(); + if (!Owner) return; + + CreatureInfo const *Info = m_creature->GetCreatureInfo(); + + if (Info->Entry == MOB_VIPER) + IsViper = true; + else + IsViper = false; + } + + void UpdateAI(const uint32 diff) + { + Unit *Owner = m_creature->GetOwner(); + + if (!Owner) return; + + if (!m_creature->getVictim()) + { + if (m_creature->isInCombat()) + DoStopAttack(); + + if (Owner->getAttackerForHelper()) + AttackStart(Owner->getAttackerForHelper()); + } + + if (SpellTimer <= diff) + { + if (IsViper) //Viper - 19921 + { + if (urand(0,2) == 0) //33% chance to cast + { + uint32 spell; + if (urand(0,1) == 0) + spell = SPELL_MIND_NUMBING_POISON; + else + spell = SPELL_CRIPPLING_POISON; + + m_creature->CastSpell(m_creature->getVictim(), spell, true); + } + + SpellTimer = urand(3000, 5000); + } + else //Venomous Snake - 19833 + { + if (urand(0,1) == 0) //80% chance to cast + m_creature->CastSpell(m_creature->getVictim(), SPELL_DEADLY_POISON, true); + SpellTimer = urand(2500, 4500); + } + } + else + { + SpellTimer -= diff; + DoMeleeAttackIfReady(); + } + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_snake_trap_serpents(Creature* pCreature) +{ + return new npc_snake_trap_serpentsAI(pCreature); +} + +struct MANGOS_DLL_DECL npc_rune_blade : public ScriptedAI +{ + npc_rune_blade(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + void Reset() + { + Unit * owner = m_creature->GetOwner(); + if (!owner || owner->GetTypeId() != TYPEID_PLAYER) + return; + + // Cannot be Selected or Attacked + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + // Add visible weapon + if (Item const * item = ((Player *)owner)->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND)) + m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, item->GetProto()->ItemId); + + // Add stats scaling + int32 damageDone=owner->CalculateDamage(BASE_ATTACK, true); // might be average damage instead ? + int32 meleeSpeed=owner->m_modAttackSpeedPct[BASE_ATTACK]; + m_creature->CastCustomSpell(m_creature, 51906, &damageDone, &meleeSpeed, NULL, true); + + // Visual Glow + m_creature->CastSpell(m_creature, 53160, true); + + // Start Chasing victim + if (uint64 guid = ((Player*)owner)->GetSelection()) + if (Unit *target = m_creature->GetUnit(*owner,guid)) + if (!target->IsFriendlyTo(owner)) + m_creature->Attack(target,true); + + } +}; + +CreatureAI* GetAI_npc_rune_blade(Creature* pCreature) +{ + return new npc_rune_blade(pCreature); +} + void AddSC_npcs_special() { Script* newscript; @@ -1805,4 +2009,20 @@ void AddSC_npcs_special() newscript->pGossipHello = &GossipHello_npc_locksmith; newscript->pGossipSelect = &GossipSelect_npc_locksmith; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_mirror_image"; + newscript->GetAI = &GetAI_mob_mirror_image; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_snake_trap_serpents"; + newscript->GetAI = &GetAI_npc_snake_trap_serpents; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_runeblade"; + newscript->GetAI = &GetAI_npc_rune_blade; + newscript->RegisterSelf(); + } From ecabcc53c386979ff7a5ddd0f7872919a5f4373c Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sat, 5 Jun 2010 11:58:46 +0400 Subject: [PATCH 334/405] Set version of mirror_image && other npcs correct --- addition/731_npc_special_mangos.sql | 2 +- scripts/world/npcs_special.cpp | 164 ++++++++++++++++++---------- 2 files changed, 107 insertions(+), 59 deletions(-) diff --git a/addition/731_npc_special_mangos.sql b/addition/731_npc_special_mangos.sql index 93f23da24..32387fa2f 100644 --- a/addition/731_npc_special_mangos.sql +++ b/addition/731_npc_special_mangos.sql @@ -1,6 +1,6 @@ -- Snakes trap UPDATE `creature_template` SET `ScriptName`='npc_snake_trap_serpents' WHERE `entry` IN (19921, 19833); -- Mirror Immage -UPDATE `creature_template` SET `speed_walk` = 2.5, modelid_A = 11686, `minlevel` = 80, `maxlevel` = 80, `AIName` = '', `ScriptName`='mob_mirror_image' WHERE `entry` = 31216; +UPDATE `creature_template` SET `speed_walk` = 2.5, modelid_A = 11686, `minlevel` = 80, `maxlevel` = 80, `AIName` = '', `ScriptName`='npc_mirror_image' WHERE `entry` = 31216; -- Rune blade UPDATE `creature_template` SET `modelid_A` = '11686', `modelid_H` = 11686, `AIName` = '', `ScriptName`='npc_runeblade' WHERE `entry` = 27893; diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index efb4a3a02..26b0964bc 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -1716,85 +1716,126 @@ bool GossipSelect_npc_locksmith(Player* pPlayer, Creature* pCreature, uint32 uiS return true; } -struct MANGOS_DLL_DECL mob_mirror_imageAI : public ScriptedAI +/*###### +## npc_mirror_image +######*/ + +struct MANGOS_DLL_DECL npc_mirror_imageAI : public ScriptedAI { - mob_mirror_imageAI(Creature* pCreature) : ScriptedAI(pCreature) - { - bLocked = false; - Reset(); - } - uint64 m_uiCreatorGUID; + npc_mirror_imageAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + uint32 m_uiFrostboltTimer; - uint32 m_uiFireBlastTimer; - float fDist; - float fAngle; - bool bLocked; + uint32 m_uiFireblastTimer; + bool inCombat; - void Reset() + void Reset() { - m_uiFrostboltTimer = urand(500, 1500); - m_uiFireBlastTimer = urand(4500, 6000); + Unit *owner = m_creature->GetOwner(); + if (!owner) return; + + m_creature->SetLevel(owner->getLevel()); + + if (owner && !m_creature->hasUnitState(UNIT_STAT_FOLLOW)) + { + m_creature->GetMotionMaster()->Clear(false); + m_creature->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE); + } + // Inherit Master's Threat List (not yet implemented) + //owner->CastSpell((Unit*)NULL, 58838, true); + // here mirror image casts on summoner spell (not present in client dbc) 49866 + // here should be auras (not present in client dbc): 35657, 35658, 35659, 35660 selfcasted by mirror images (stats related?) + // Clone Me! + m_uiFrostboltTimer = 0; + m_uiFireblastTimer = 6100; + inCombat = false; } - void UpdateAI(const uint32 uiDiff) + void AttackStart(Unit* pWho) { - if (!bLocked) + if (!pWho) return; + + if (m_creature->Attack(pWho, true)) { - m_uiCreatorGUID = m_creature->GetCreatorGUID(); - if (Player* pOwner = (Player*)Unit::GetUnit(*m_creature, m_uiCreatorGUID)) - { - fDist = m_creature->GetDistance(pOwner); - fAngle = m_creature->GetAngle(pOwner); - } - bLocked = true; + m_creature->clearUnitState(UNIT_STAT_FOLLOW); + // TMGs call CreatureRelocation which via MoveInLineOfSight can call this function + // thus with the following clear the original TMG gets invalidated and crash, doh + // hope it doesn't start to leak memory without this :-/ + //i_pet->Clear(); + m_creature->GetMotionMaster()->MoveChase(pWho); + m_creature->getVictim()->AddThreat(m_creature); + inCombat = true; } + } + + void EnterEvadeMode() + { + if (m_creature->IsInEvadeMode() || !m_creature->isAlive()) + return; - Player* pOwner = (Player*)Unit::GetUnit(*m_creature, m_uiCreatorGUID); - if (!pOwner || !pOwner->IsInWorld()) + inCombat = false; + Unit *owner = m_creature->GetCharmerOrOwner(); + + m_creature->AttackStop(); + m_creature->CombatStop(true); + if (owner && !m_creature->hasUnitState(UNIT_STAT_FOLLOW)) { - m_creature->ForcedDespawn(); - return; + m_creature->GetMotionMaster()->Clear(false); + m_creature->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST,PET_FOLLOW_ANGLE); } + } - uint64 targetGUID = 0; + void UpdateAI(const uint32 diff) + { + if (!(m_creature->HasAura(45204))) + { + Unit *owner = m_creature->GetCharmerOrOwner(); + if (!owner)return; + m_creature->CastSpell(m_creature, 45204, true, NULL, NULL, owner->GetGUID()); + } - if (Spell* pSpell = pOwner->GetCurrentSpell(CURRENT_GENERIC_SPELL)) - targetGUID = pSpell->m_targets.getUnitTargetGUID(); - else if (pOwner->getVictim()) - targetGUID = pOwner->getVictim()->GetGUID(); + if (!(m_creature->HasAura(58836))) + { + Unit *owner = m_creature->GetCharmerOrOwner(); + if (!owner) return; + m_creature->CastSpell(m_creature, 58836, true, NULL, NULL, owner->GetGUID()); + } - Unit* pTarget = Unit::GetUnit(*m_creature, targetGUID); + if (/*!m_creature->SelectHostileTarget() || */!m_creature->getVictim()) + { + Unit *owner = m_creature->GetCharmerOrOwner(); + if (owner && owner->getVictim()) + m_creature->AI()->AttackStart(owner->getVictim()); + } - if (!pTarget || !m_creature->CanInitiateAttack() || !pTarget->isTargetableForAttack() || - !m_creature->IsHostileTo(pTarget) || !pTarget->isInAccessablePlaceFor(m_creature)) + if (inCombat && !m_creature->getVictim()) { - if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != FOLLOW_MOTION_TYPE) - { - m_creature->InterruptNonMeleeSpells(false); - m_creature->GetMotionMaster()->Clear(); - m_creature->GetMotionMaster()->MoveFollow(pOwner, fDist, fAngle); - } + EnterEvadeMode(); return; } - if (m_uiFrostboltTimer <= uiDiff) + if (/*!m_creature->SelectHostileTarget() || */!m_creature->getVictim()) + return; + + if (m_uiFrostboltTimer <= diff) { - m_creature->CastSpell(pTarget, SPELL_FROSTBOLT, false, NULL, NULL, pOwner->GetGUID()); - m_uiFrostboltTimer = urand(3000, 4500); - } else m_uiFrostboltTimer -= uiDiff; + DoCast(m_creature->getVictim(),59638); + m_uiFrostboltTimer = 3100; + }else m_uiFrostboltTimer -= diff; - if (m_uiFireBlastTimer <= uiDiff) + if (m_uiFireblastTimer <= diff) { - m_creature->CastSpell(pTarget, SPELL_FIREBLAST, false, NULL, NULL, pOwner->GetGUID()); - m_uiFireBlastTimer = urand(9000, 12000); - } else m_uiFireBlastTimer -= uiDiff; + DoCast(m_creature->getVictim(),59637,true); + m_uiFireblastTimer = 6000; + }else m_uiFireblastTimer -= diff; + + DoMeleeAttackIfReady(); } }; -CreatureAI* GetAI_mob_mirror_image(Creature* pCreature) +CreatureAI* GetAI_npc_mirror_image(Creature* pCreature) { - return new mob_mirror_imageAI(pCreature); -} + return new npc_mirror_imageAI(pCreature); +}; /*#### ## npc_snake_trap_serpents - Summonned snake id are 19921 and 19833 @@ -1812,12 +1853,14 @@ struct MANGOS_DLL_DECL npc_snake_trap_serpentsAI : public ScriptedAI uint32 SpellTimer; bool IsViper; + Unit* Owner; void Reset() { SpellTimer = 500; - Unit *Owner = m_creature->GetOwner(); + Owner = m_creature->GetOwner(); + if (!Owner) return; CreatureInfo const *Info = m_creature->GetCreatureInfo(); @@ -1826,13 +1869,13 @@ struct MANGOS_DLL_DECL npc_snake_trap_serpentsAI : public ScriptedAI IsViper = true; else IsViper = false; + + m_creature->SetLevel(Owner->getLevel()); } void UpdateAI(const uint32 diff) { - Unit *Owner = m_creature->GetOwner(); - - if (!Owner) return; + if (!Owner || !m_creature->SelectHostileTarget()) return; if (!m_creature->getVictim()) { @@ -1843,6 +1886,9 @@ struct MANGOS_DLL_DECL npc_snake_trap_serpentsAI : public ScriptedAI AttackStart(Owner->getAttackerForHelper()); } + if (!m_creature->getVictim()) + return; + if (SpellTimer <= diff) { if (IsViper) //Viper - 19921 @@ -1890,6 +1936,8 @@ struct MANGOS_DLL_DECL npc_rune_blade : public ScriptedAI if (!owner || owner->GetTypeId() != TYPEID_PLAYER) return; + m_creature->SetLevel(owner->getLevel()); + // Cannot be Selected or Attacked m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); @@ -2011,8 +2059,8 @@ void AddSC_npcs_special() newscript->RegisterSelf(); newscript = new Script; - newscript->Name = "mob_mirror_image"; - newscript->GetAI = &GetAI_mob_mirror_image; + newscript->Name = "npc_mirror_image"; + newscript->GetAI = &GetAI_npc_mirror_image; newscript->RegisterSelf(); newscript = new Script; From cb99e2f24d9ce303b390005d319b6247e2de2fdd Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sat, 5 Jun 2010 17:08:18 +0400 Subject: [PATCH 335/405] Fix for mirror_image by me. --- scripts/world/npcs_special.cpp | 44 +++++++++++++--------------------- 1 file changed, 17 insertions(+), 27 deletions(-) diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index 26b0964bc..b3fc6f996 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -1727,10 +1727,11 @@ struct MANGOS_DLL_DECL npc_mirror_imageAI : public ScriptedAI uint32 m_uiFrostboltTimer; uint32 m_uiFireblastTimer; bool inCombat; + Unit *owner; void Reset() { - Unit *owner = m_creature->GetOwner(); + owner = m_creature->GetOwner(); if (!owner) return; m_creature->SetLevel(owner->getLevel()); @@ -1746,7 +1747,7 @@ struct MANGOS_DLL_DECL npc_mirror_imageAI : public ScriptedAI // here should be auras (not present in client dbc): 35657, 35658, 35659, 35660 selfcasted by mirror images (stats related?) // Clone Me! m_uiFrostboltTimer = 0; - m_uiFireblastTimer = 6100; + m_uiFireblastTimer = 0; inCombat = false; } @@ -1761,8 +1762,10 @@ struct MANGOS_DLL_DECL npc_mirror_imageAI : public ScriptedAI // thus with the following clear the original TMG gets invalidated and crash, doh // hope it doesn't start to leak memory without this :-/ //i_pet->Clear(); - m_creature->GetMotionMaster()->MoveChase(pWho); - m_creature->getVictim()->AddThreat(m_creature); +// m_creature->GetMotionMaster()->MoveChase(pWho); + m_creature->SetInCombatWith(pWho); + m_creature->AddThreat(pWho, 100.0f); + DoStartMovement(pWho, 20.0f); inCombat = true; } } @@ -1773,7 +1776,6 @@ struct MANGOS_DLL_DECL npc_mirror_imageAI : public ScriptedAI return; inCombat = false; - Unit *owner = m_creature->GetCharmerOrOwner(); m_creature->AttackStop(); m_creature->CombatStop(true); @@ -1786,26 +1788,15 @@ struct MANGOS_DLL_DECL npc_mirror_imageAI : public ScriptedAI void UpdateAI(const uint32 diff) { - if (!(m_creature->HasAura(45204))) - { - Unit *owner = m_creature->GetCharmerOrOwner(); - if (!owner)return; + if (owner && !(m_creature->HasAura(45204))) m_creature->CastSpell(m_creature, 45204, true, NULL, NULL, owner->GetGUID()); - } - if (!(m_creature->HasAura(58836))) - { - Unit *owner = m_creature->GetCharmerOrOwner(); - if (!owner) return; + if (owner && !(m_creature->HasAura(58836))) m_creature->CastSpell(m_creature, 58836, true, NULL, NULL, owner->GetGUID()); - } - if (/*!m_creature->SelectHostileTarget() || */!m_creature->getVictim()) - { - Unit *owner = m_creature->GetCharmerOrOwner(); + if (!m_creature->getVictim()) if (owner && owner->getVictim()) - m_creature->AI()->AttackStart(owner->getVictim()); - } + m_creature->AI()->AttackStart(owner->getVictim()); if (inCombat && !m_creature->getVictim()) { @@ -1813,18 +1804,17 @@ struct MANGOS_DLL_DECL npc_mirror_imageAI : public ScriptedAI return; } - if (/*!m_creature->SelectHostileTarget() || */!m_creature->getVictim()) - return; + if (!inCombat) return; if (m_uiFrostboltTimer <= diff) { - DoCast(m_creature->getVictim(),59638); + DoCastSpellIfCan(m_creature->getVictim(),59638); m_uiFrostboltTimer = 3100; }else m_uiFrostboltTimer -= diff; if (m_uiFireblastTimer <= diff) { - DoCast(m_creature->getVictim(),59637,true); + DoCastSpellIfCan(m_creature->getVictim(),59637); m_uiFireblastTimer = 6000; }else m_uiFireblastTimer -= diff; @@ -1859,7 +1849,7 @@ struct MANGOS_DLL_DECL npc_snake_trap_serpentsAI : public ScriptedAI { SpellTimer = 500; - Owner = m_creature->GetOwner(); + Owner = m_creature->GetCharmerOrOwner(); if (!Owner) return; @@ -1882,8 +1872,8 @@ struct MANGOS_DLL_DECL npc_snake_trap_serpentsAI : public ScriptedAI if (m_creature->isInCombat()) DoStopAttack(); - if (Owner->getAttackerForHelper()) - AttackStart(Owner->getAttackerForHelper()); + if (Owner && Owner->getVictim()) + m_creature->AI()->AttackStart(Owner->getVictim()); } if (!m_creature->getVictim()) From 7386b98c89ef1af2b025121181da20c685f2d3a2 Mon Sep 17 00:00:00 2001 From: insider42 Date: Sun, 6 Jun 2010 13:15:31 +0700 Subject: [PATCH 336/405] [patch 6] Fixed resurrection at battleground graveyards. Patch provided by Spammer --- scripts/battlegrounds/battleground.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/battlegrounds/battleground.cpp b/scripts/battlegrounds/battleground.cpp index 0e8daef14..427a40948 100644 --- a/scripts/battlegrounds/battleground.cpp +++ b/scripts/battlegrounds/battleground.cpp @@ -57,7 +57,10 @@ struct MANGOS_DLL_DECL npc_spirit_guideAI : public ScriptedAI { // auto cast the whole time this spell if (!m_creature->GetCurrentSpell(CURRENT_CHANNELED_SPELL)) + { + m_creature->CastSpell(m_creature, SPELL_SPIRIT_HEAL, true); m_creature->CastSpell(m_creature, SPELL_SPIRIT_HEAL_CHANNEL, false); + } } void CorpseRemoved(uint32 &) From b94177f38001c5ba9b1745b3e314defcb5f27757 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sun, 6 Jun 2010 21:39:17 +0400 Subject: [PATCH 337/405] NPC special part 4 --- scripts/world/npcs_special.cpp | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index b3fc6f996..da47cfd75 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -1836,6 +1836,7 @@ CreatureAI* GetAI_npc_mirror_image(Creature* pCreature) #define SPELL_DEADLY_POISON 34655 //Venomous Snake #define MOB_VIPER 19921 +#define MOB_VENOM_SNIKE 19833 struct MANGOS_DLL_DECL npc_snake_trap_serpentsAI : public ScriptedAI { @@ -1863,9 +1864,20 @@ struct MANGOS_DLL_DECL npc_snake_trap_serpentsAI : public ScriptedAI m_creature->SetLevel(Owner->getLevel()); } + void AttackStart(Unit* pWho) + { + if (!pWho) return; + + if (m_creature->Attack(pWho, true)) + { + m_creature->SetInCombatWith(pWho); + m_creature->AddThreat(pWho, 100.0f); + } + } + void UpdateAI(const uint32 diff) { - if (!Owner || !m_creature->SelectHostileTarget()) return; + if (!Owner) return; if (!m_creature->getVictim()) { @@ -1873,7 +1885,7 @@ struct MANGOS_DLL_DECL npc_snake_trap_serpentsAI : public ScriptedAI DoStopAttack(); if (Owner && Owner->getVictim()) - m_creature->AI()->AttackStart(Owner->getVictim()); + AttackStart(Owner->getVictim()); } if (!m_creature->getVictim()) @@ -1881,12 +1893,12 @@ struct MANGOS_DLL_DECL npc_snake_trap_serpentsAI : public ScriptedAI if (SpellTimer <= diff) { - if (IsViper) //Viper - 19921 + if (m_creature->GetEntry() == MOB_VIPER ) //Viper - 19921 { - if (urand(0,2) == 0) //33% chance to cast + if (!urand(0,2)) //33% chance to cast { uint32 spell; - if (urand(0,1) == 0) + if (urand(0,1)) spell = SPELL_MIND_NUMBING_POISON; else spell = SPELL_CRIPPLING_POISON; @@ -1896,18 +1908,15 @@ struct MANGOS_DLL_DECL npc_snake_trap_serpentsAI : public ScriptedAI SpellTimer = urand(3000, 5000); } - else //Venomous Snake - 19833 + else if (m_creature->GetEntry() == MOB_VENOM_SNIKE ) //Venomous Snake - 19833 { if (urand(0,1) == 0) //80% chance to cast m_creature->CastSpell(m_creature->getVictim(), SPELL_DEADLY_POISON, true); SpellTimer = urand(2500, 4500); } } - else - { - SpellTimer -= diff; - DoMeleeAttackIfReady(); - } + else SpellTimer -= diff; + DoMeleeAttackIfReady(); } }; From 0a3cee1643e0dee998a9268ccb87ee4892c8f574 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Mon, 7 Jun 2010 17:24:45 +0400 Subject: [PATCH 338/405] BSW improve (may fix crashes in ICC), bone_spike correct. Especially for Selector. NEED TESTING! --- include/sc_boss_spell_worker.cpp | 50 +++++++++---------- include/sc_boss_spell_worker.h | 6 +-- .../icecrown_citadel/boss_lord_marrowgar.cpp | 35 +++++++++---- 3 files changed, 51 insertions(+), 40 deletions(-) diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index 8eeca6974..fc4d29c73 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -10,16 +10,11 @@ BossSpellWorker::BossSpellWorker(ScriptedAI* bossAI) { boss = bossAI->m_creature; bossID = boss->GetEntry(); - _bossSpellCount = 0; - currentTarget = NULL; - memset(&m_uiSpell_Timer, 0, sizeof(m_uiSpell_Timer)); - memset(&m_BossSpell,0,sizeof(m_BossSpell)); if (pMap = boss->GetMap()) currentDifficulty = pMap->GetDifficulty(); else currentDifficulty = RAID_DIFFICULTY_10MAN_NORMAL; debug_log("BSW: Initializing BossSpellWorker object for boss %u difficulty %u",bossID,currentDifficulty); - LoadSpellTable(); - Reset((uint8)currentDifficulty); + Reset(); }; BossSpellWorker::~BossSpellWorker() @@ -27,10 +22,14 @@ BossSpellWorker::~BossSpellWorker() debug_log("BSW: Removing BossSpellWorker object for boss %u",bossID); }; -void BossSpellWorker::Reset(uint8 _Difficulty) +void BossSpellWorker::Reset() { - currentDifficulty = setDifficulty(_Difficulty); - resetTimers(); + memset(&m_uiSpell_Timer, 0, sizeof(m_uiSpell_Timer)); + memset(&m_BossSpell,0,sizeof(m_BossSpell)); + _bossSpellCount = 0; + currentTarget = NULL; + LoadSpellTable(); + resetTimers(); }; void BossSpellWorker::_resetTimer(uint8 m_uiSpellIdx) @@ -246,6 +245,13 @@ CanCastResult BossSpellWorker::_BSWSpellSelector(uint8 m_uiSpellIdx, Unit* pTarg if (!pTarget) pTarget = boss; if (pSpell->LocData.z <= 1.0f) { float fPosX, fPosY, fPosZ; + if (!pTarget->IsPositionValid()) + { + if (pTarget->GetTypeId() == TYPEID_PLAYER) + debug_log("BSW: Player %s (guid %u) has invalid position. May be cheater?",pTarget->GetName(),pTarget->GetGUIDLow()); + else debug_log("BSW: Creature %u has invalid position.",pTarget->GetEntry()); + return CAST_FAIL_OTHER; + } pTarget->GetPosition(fPosX, fPosY, fPosZ); pTarget->GetRandomPoint(fPosX, fPosY, fPosZ, urand((uint32)pSpell->LocData.x, (uint32)pSpell->LocData.y), fPosX, fPosY, fPosZ); boss->CastSpell(fPosX, fPosY, fPosZ, pSpell->m_uiSpellEntry[currentDifficulty], false); @@ -316,22 +322,6 @@ uint8 BossSpellWorker::FindSpellIDX(uint32 SpellID) return SPELL_INDEX_ERROR; } -Difficulty BossSpellWorker::setDifficulty(uint8 _Difficulty) -{ -switch (_Difficulty) { - case RAID_DIFFICULTY_10MAN_NORMAL: - return RAID_DIFFICULTY_10MAN_NORMAL; - case RAID_DIFFICULTY_25MAN_NORMAL: - return RAID_DIFFICULTY_25MAN_NORMAL; - case RAID_DIFFICULTY_10MAN_HEROIC: - return RAID_DIFFICULTY_10MAN_HEROIC; - case RAID_DIFFICULTY_25MAN_HEROIC: - return RAID_DIFFICULTY_25MAN_HEROIC; - default: - return RAID_DIFFICULTY_10MAN_NORMAL; - }; -} - BossSpellTableParameters BossSpellWorker::getBSWCastType(uint32 pTemp) { switch (pTemp) { @@ -395,6 +385,7 @@ Unit* BossSpellWorker::_doSummon(uint8 m_uiSpellIdx, TempSummonType summontype, if (pSpell->LocData.z <= 1.0f) { float fPosX, fPosY, fPosZ; + if (!boss->IsPositionValid()) return NULL; boss->GetPosition(fPosX, fPosY, fPosZ); boss->GetRandomPoint(fPosX, fPosY, fPosZ, urand((uint32)pSpell->LocData.x, (uint32)pSpell->LocData.y), fPosX, fPosY, fPosZ); return boss->SummonCreature(pSpell->m_uiSpellEntry[currentDifficulty], fPosX, fPosY, fPosZ, 0, summontype, delay); @@ -457,7 +448,7 @@ bool BossSpellWorker::_doRemove(uint8 m_uiSpellIdx, Unit* pTarget, SpellEffectIn if (pTarget->isAlive()) { if ( pTarget->HasAura(pSpell->m_uiSpellEntry[currentDifficulty]) && pTarget->GetAura(pSpell->m_uiSpellEntry[currentDifficulty], index)->GetStackAmount() > 1) { - if (pTarget->GetAura(pSpell->m_uiSpellEntry[currentDifficulty], index)->modStackAmount(-1)) + if (pTarget->GetAura(pSpell->m_uiSpellEntry[currentDifficulty], index)->modStackAmount(-1)) return true; else return false; } @@ -479,8 +470,11 @@ bool BossSpellWorker::_doAura(uint8 m_uiSpellIdx, Unit* pTarget, SpellEffectInde debug_log("BSW: adding aura from spell %u index %u",pSpell->m_uiSpellEntry[currentDifficulty], index); if (spell = (SpellEntry *)GetSpellStore()->LookupEntry(pSpell->m_uiSpellEntry[currentDifficulty])) - if (pTarget->AddAura(new BossAura(spell, index, &pSpell->varData, pTarget, pTarget))) + { + int32 basepoint = pSpell->varData ? spell->EffectBasePoints[index] : pSpell->varData; + if (pTarget->AddAura(new BossAura(spell, index, &basepoint, pTarget, pTarget))) return true; + } return false; @@ -513,6 +507,8 @@ CanCastResult BossSpellWorker::_CanCastSpell(Unit* pTarget, const SpellEntry *pS { if (pTarget != boss) { + if (!pTarget->IsPositionValid() || !boss->IsPositionValid()) return CAST_FAIL_OTHER; + // pTarget is out of range of this spell (also done by Spell::CheckCast()) float fDistance = boss->GetCombatDistance(pTarget); diff --git a/include/sc_boss_spell_worker.h b/include/sc_boss_spell_worker.h index 36411d594..d39f5bd79 100644 --- a/include/sc_boss_spell_worker.h +++ b/include/sc_boss_spell_worker.h @@ -78,7 +78,7 @@ struct SpellTable uint32 m_uiSpellTimerMax[DIFFICULTY_LEVELS]; // The timer (max) before the next spell casting uint32 m_uiSpellData[DIFFICULTY_LEVELS]; // Additional data for spell casting or summon Locations LocData; // Float data structure for locations - int32 varData; // Additional data for spell + int varData; // Additional data for spell uint32 StageMaskN; // Stage mask for this spell (normal) uint32 StageMaskH; // Stage mask for this spell (heroic) BossSpellTableParameters m_CastTarget; // Target on casting spell @@ -102,7 +102,7 @@ class MANGOS_DLL_DECL BossSpellWorker Unit* currentTarget; - void Reset(uint8 _Difficulty = 0); + void Reset(); void resetTimer(uint32 SpellID) { @@ -219,8 +219,6 @@ class MANGOS_DLL_DECL BossSpellWorker CanCastResult _BSWCastOnTarget(Unit* pTarget, uint8 m_uiSpellIdx); - Difficulty setDifficulty(uint8 _Difficulty = 0); - bool _QuerySpellPeriod(uint8 m_uiSpellIdx, uint32 diff); CanCastResult _DoCastSpellIfCan(Unit* pTarget, uint32 uiSpell, uint32 uiCastFlags = 0, uint64 uiOriginalCasterGUID = 0); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp index 6270a27c7..d4ca8a2d9 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp @@ -133,7 +133,7 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI }; float fPosX, fPosY, fPosZ; - pTarget->GetPosition(fPosX, fPosY, fPosZ); + m_creature->GetPosition(fPosX, fPosY, fPosZ); if (Unit* pSpike = bsw->doSummon(NPC_BONE_SPIKE, fPosX, fPosY, fPosZ)) pSpike->AddThreat(pTarget, 100.0f); } @@ -234,17 +234,17 @@ struct MANGOS_DLL_DECL mob_bone_spikeAI : public ScriptedAI mob_bone_spikeAI(Creature *pCreature) : ScriptedAI(pCreature) { m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + bsw = new BossSpellWorker(this); Reset(); } ScriptedInstance *m_pInstance; + BossSpellWorker* bsw; Unit* pVictim; - void Reset() { - SetCombatMovement(false); - m_creature->SetInCombatWithZone(); +// SetCombatMovement(false); pVictim = NULL; } @@ -253,34 +253,51 @@ struct MANGOS_DLL_DECL mob_bone_spikeAI : public ScriptedAI if (!pVictim && pWho) { pVictim = pWho; m_creature->SetInCombatWith(pVictim); - DoCast(pVictim, SPELL_BONE_STRIKE_IMPALE); + m_creature->SetSpeedRate(MOVE_RUN, 5.0f); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); } } void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) { if (uiDamage > m_creature->GetHealth()) - if (pVictim) pVictim->RemoveAurasDueToSpell(SPELL_BONE_STRIKE_IMPALE); + bsw->doRemove(SPELL_BONE_STRIKE_IMPALE,pVictim); } void KilledUnit(Unit* _Victim) { - if (pVictim) pVictim->RemoveAurasDueToSpell(SPELL_BONE_STRIKE_IMPALE); + bsw->doRemove(SPELL_BONE_STRIKE_IMPALE,pVictim); } void JustDied(Unit* Killer) { - if (pVictim) pVictim->RemoveAurasDueToSpell(SPELL_BONE_STRIKE_IMPALE); + bsw->doRemove(SPELL_BONE_STRIKE_IMPALE,pVictim); } void UpdateAI(const uint32 uiDiff) { if(m_pInstance && m_pInstance->GetData(TYPE_MARROWGAR) != IN_PROGRESS) { - if (pVictim) pVictim->RemoveAurasDueToSpell(SPELL_BONE_STRIKE_IMPALE); + bsw->doRemove(SPELL_BONE_STRIKE_IMPALE,pVictim); + m_creature->ForcedDespawn(); + } + + if (!pVictim) return; + + if(pVictim && !pVictim->isAlive()) + { + bsw->doRemove(SPELL_BONE_STRIKE_IMPALE,pVictim); m_creature->ForcedDespawn(); } + if((m_creature->GetDistance2d(pVictim) < 1.1f) && + !pVictim->HasAura(SPELL_BONE_STRIKE_IMPALE)) + { + bsw->doCast(SPELL_BONE_STRIKE_IMPALE,pVictim); + m_creature->GetMotionMaster()->Clear(); + SetCombatMovement(false); + } + } }; From 08ce6655bb952bdae166c8c6831c4d039edada56 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Mon, 7 Jun 2010 17:24:45 +0400 Subject: [PATCH 339/405] BSW improve (may fix crashes in ICC), bone_spike correct. Especially for Selector. NEED TESTING! --- include/sc_boss_spell_worker.cpp | 50 +++++++++---------- include/sc_boss_spell_worker.h | 6 +-- .../icecrown_citadel/boss_lord_marrowgar.cpp | 35 +++++++++---- 3 files changed, 51 insertions(+), 40 deletions(-) diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index 8eeca6974..fc4d29c73 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -10,16 +10,11 @@ BossSpellWorker::BossSpellWorker(ScriptedAI* bossAI) { boss = bossAI->m_creature; bossID = boss->GetEntry(); - _bossSpellCount = 0; - currentTarget = NULL; - memset(&m_uiSpell_Timer, 0, sizeof(m_uiSpell_Timer)); - memset(&m_BossSpell,0,sizeof(m_BossSpell)); if (pMap = boss->GetMap()) currentDifficulty = pMap->GetDifficulty(); else currentDifficulty = RAID_DIFFICULTY_10MAN_NORMAL; debug_log("BSW: Initializing BossSpellWorker object for boss %u difficulty %u",bossID,currentDifficulty); - LoadSpellTable(); - Reset((uint8)currentDifficulty); + Reset(); }; BossSpellWorker::~BossSpellWorker() @@ -27,10 +22,14 @@ BossSpellWorker::~BossSpellWorker() debug_log("BSW: Removing BossSpellWorker object for boss %u",bossID); }; -void BossSpellWorker::Reset(uint8 _Difficulty) +void BossSpellWorker::Reset() { - currentDifficulty = setDifficulty(_Difficulty); - resetTimers(); + memset(&m_uiSpell_Timer, 0, sizeof(m_uiSpell_Timer)); + memset(&m_BossSpell,0,sizeof(m_BossSpell)); + _bossSpellCount = 0; + currentTarget = NULL; + LoadSpellTable(); + resetTimers(); }; void BossSpellWorker::_resetTimer(uint8 m_uiSpellIdx) @@ -246,6 +245,13 @@ CanCastResult BossSpellWorker::_BSWSpellSelector(uint8 m_uiSpellIdx, Unit* pTarg if (!pTarget) pTarget = boss; if (pSpell->LocData.z <= 1.0f) { float fPosX, fPosY, fPosZ; + if (!pTarget->IsPositionValid()) + { + if (pTarget->GetTypeId() == TYPEID_PLAYER) + debug_log("BSW: Player %s (guid %u) has invalid position. May be cheater?",pTarget->GetName(),pTarget->GetGUIDLow()); + else debug_log("BSW: Creature %u has invalid position.",pTarget->GetEntry()); + return CAST_FAIL_OTHER; + } pTarget->GetPosition(fPosX, fPosY, fPosZ); pTarget->GetRandomPoint(fPosX, fPosY, fPosZ, urand((uint32)pSpell->LocData.x, (uint32)pSpell->LocData.y), fPosX, fPosY, fPosZ); boss->CastSpell(fPosX, fPosY, fPosZ, pSpell->m_uiSpellEntry[currentDifficulty], false); @@ -316,22 +322,6 @@ uint8 BossSpellWorker::FindSpellIDX(uint32 SpellID) return SPELL_INDEX_ERROR; } -Difficulty BossSpellWorker::setDifficulty(uint8 _Difficulty) -{ -switch (_Difficulty) { - case RAID_DIFFICULTY_10MAN_NORMAL: - return RAID_DIFFICULTY_10MAN_NORMAL; - case RAID_DIFFICULTY_25MAN_NORMAL: - return RAID_DIFFICULTY_25MAN_NORMAL; - case RAID_DIFFICULTY_10MAN_HEROIC: - return RAID_DIFFICULTY_10MAN_HEROIC; - case RAID_DIFFICULTY_25MAN_HEROIC: - return RAID_DIFFICULTY_25MAN_HEROIC; - default: - return RAID_DIFFICULTY_10MAN_NORMAL; - }; -} - BossSpellTableParameters BossSpellWorker::getBSWCastType(uint32 pTemp) { switch (pTemp) { @@ -395,6 +385,7 @@ Unit* BossSpellWorker::_doSummon(uint8 m_uiSpellIdx, TempSummonType summontype, if (pSpell->LocData.z <= 1.0f) { float fPosX, fPosY, fPosZ; + if (!boss->IsPositionValid()) return NULL; boss->GetPosition(fPosX, fPosY, fPosZ); boss->GetRandomPoint(fPosX, fPosY, fPosZ, urand((uint32)pSpell->LocData.x, (uint32)pSpell->LocData.y), fPosX, fPosY, fPosZ); return boss->SummonCreature(pSpell->m_uiSpellEntry[currentDifficulty], fPosX, fPosY, fPosZ, 0, summontype, delay); @@ -457,7 +448,7 @@ bool BossSpellWorker::_doRemove(uint8 m_uiSpellIdx, Unit* pTarget, SpellEffectIn if (pTarget->isAlive()) { if ( pTarget->HasAura(pSpell->m_uiSpellEntry[currentDifficulty]) && pTarget->GetAura(pSpell->m_uiSpellEntry[currentDifficulty], index)->GetStackAmount() > 1) { - if (pTarget->GetAura(pSpell->m_uiSpellEntry[currentDifficulty], index)->modStackAmount(-1)) + if (pTarget->GetAura(pSpell->m_uiSpellEntry[currentDifficulty], index)->modStackAmount(-1)) return true; else return false; } @@ -479,8 +470,11 @@ bool BossSpellWorker::_doAura(uint8 m_uiSpellIdx, Unit* pTarget, SpellEffectInde debug_log("BSW: adding aura from spell %u index %u",pSpell->m_uiSpellEntry[currentDifficulty], index); if (spell = (SpellEntry *)GetSpellStore()->LookupEntry(pSpell->m_uiSpellEntry[currentDifficulty])) - if (pTarget->AddAura(new BossAura(spell, index, &pSpell->varData, pTarget, pTarget))) + { + int32 basepoint = pSpell->varData ? spell->EffectBasePoints[index] : pSpell->varData; + if (pTarget->AddAura(new BossAura(spell, index, &basepoint, pTarget, pTarget))) return true; + } return false; @@ -513,6 +507,8 @@ CanCastResult BossSpellWorker::_CanCastSpell(Unit* pTarget, const SpellEntry *pS { if (pTarget != boss) { + if (!pTarget->IsPositionValid() || !boss->IsPositionValid()) return CAST_FAIL_OTHER; + // pTarget is out of range of this spell (also done by Spell::CheckCast()) float fDistance = boss->GetCombatDistance(pTarget); diff --git a/include/sc_boss_spell_worker.h b/include/sc_boss_spell_worker.h index 36411d594..d39f5bd79 100644 --- a/include/sc_boss_spell_worker.h +++ b/include/sc_boss_spell_worker.h @@ -78,7 +78,7 @@ struct SpellTable uint32 m_uiSpellTimerMax[DIFFICULTY_LEVELS]; // The timer (max) before the next spell casting uint32 m_uiSpellData[DIFFICULTY_LEVELS]; // Additional data for spell casting or summon Locations LocData; // Float data structure for locations - int32 varData; // Additional data for spell + int varData; // Additional data for spell uint32 StageMaskN; // Stage mask for this spell (normal) uint32 StageMaskH; // Stage mask for this spell (heroic) BossSpellTableParameters m_CastTarget; // Target on casting spell @@ -102,7 +102,7 @@ class MANGOS_DLL_DECL BossSpellWorker Unit* currentTarget; - void Reset(uint8 _Difficulty = 0); + void Reset(); void resetTimer(uint32 SpellID) { @@ -219,8 +219,6 @@ class MANGOS_DLL_DECL BossSpellWorker CanCastResult _BSWCastOnTarget(Unit* pTarget, uint8 m_uiSpellIdx); - Difficulty setDifficulty(uint8 _Difficulty = 0); - bool _QuerySpellPeriod(uint8 m_uiSpellIdx, uint32 diff); CanCastResult _DoCastSpellIfCan(Unit* pTarget, uint32 uiSpell, uint32 uiCastFlags = 0, uint64 uiOriginalCasterGUID = 0); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp index a8f3cdfb7..4010c4206 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp @@ -132,7 +132,7 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI }; float fPosX, fPosY, fPosZ; - pTarget->GetPosition(fPosX, fPosY, fPosZ); + m_creature->GetPosition(fPosX, fPosY, fPosZ); if (Unit* pSpike = bsw->doSummon(NPC_BONE_SPIKE, fPosX, fPosY, fPosZ)) pSpike->AddThreat(pTarget, 100.0f); } @@ -233,17 +233,17 @@ struct MANGOS_DLL_DECL mob_bone_spikeAI : public ScriptedAI mob_bone_spikeAI(Creature *pCreature) : ScriptedAI(pCreature) { m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + bsw = new BossSpellWorker(this); Reset(); } ScriptedInstance *m_pInstance; + BossSpellWorker* bsw; Unit* pVictim; - void Reset() { - SetCombatMovement(false); - m_creature->SetInCombatWithZone(); +// SetCombatMovement(false); pVictim = NULL; } @@ -252,34 +252,51 @@ struct MANGOS_DLL_DECL mob_bone_spikeAI : public ScriptedAI if (!pVictim && pWho) { pVictim = pWho; m_creature->SetInCombatWith(pVictim); - DoCast(pVictim, SPELL_BONE_STRIKE_IMPALE); + m_creature->SetSpeedRate(MOVE_RUN, 5.0f); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); } } void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) { if (uiDamage > m_creature->GetHealth()) - if (pVictim) pVictim->RemoveAurasDueToSpell(SPELL_BONE_STRIKE_IMPALE); + bsw->doRemove(SPELL_BONE_STRIKE_IMPALE,pVictim); } void KilledUnit(Unit* _Victim) { - if (pVictim) pVictim->RemoveAurasDueToSpell(SPELL_BONE_STRIKE_IMPALE); + bsw->doRemove(SPELL_BONE_STRIKE_IMPALE,pVictim); } void JustDied(Unit* Killer) { - if (pVictim) pVictim->RemoveAurasDueToSpell(SPELL_BONE_STRIKE_IMPALE); + bsw->doRemove(SPELL_BONE_STRIKE_IMPALE,pVictim); } void UpdateAI(const uint32 uiDiff) { if(m_pInstance && m_pInstance->GetData(TYPE_MARROWGAR) != IN_PROGRESS) { - if (pVictim) pVictim->RemoveAurasDueToSpell(SPELL_BONE_STRIKE_IMPALE); + bsw->doRemove(SPELL_BONE_STRIKE_IMPALE,pVictim); + m_creature->ForcedDespawn(); + } + + if (!pVictim) return; + + if(pVictim && !pVictim->isAlive()) + { + bsw->doRemove(SPELL_BONE_STRIKE_IMPALE,pVictim); m_creature->ForcedDespawn(); } + if((m_creature->GetDistance2d(pVictim) < 1.1f) && + !pVictim->HasAura(SPELL_BONE_STRIKE_IMPALE)) + { + bsw->doCast(SPELL_BONE_STRIKE_IMPALE,pVictim); + m_creature->GetMotionMaster()->Clear(); + SetCombatMovement(false); + } + } }; From 2a04630e9a0d8bbddc7ff8e6fda09adb7cf3836c Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Mon, 7 Jun 2010 19:48:02 +0400 Subject: [PATCH 340/405] Make Z=0 invalid for cast position. --- include/sc_boss_spell_worker.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index fc4d29c73..bedc6a1d7 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -254,6 +254,11 @@ CanCastResult BossSpellWorker::_BSWSpellSelector(uint8 m_uiSpellIdx, Unit* pTarg } pTarget->GetPosition(fPosX, fPosY, fPosZ); pTarget->GetRandomPoint(fPosX, fPosY, fPosZ, urand((uint32)pSpell->LocData.x, (uint32)pSpell->LocData.y), fPosX, fPosY, fPosZ); + if ((int)fPosZ == 0) + { + debug_log("BSW: Positon Z is NULL. Strange bug"); + return CAST_FAIL_OTHER; + } boss->CastSpell(fPosX, fPosY, fPosZ, pSpell->m_uiSpellEntry[currentDifficulty], false); return CAST_OK; } else return CAST_FAIL_OTHER; From 9ecee54860d35ec7fbbf6db639a3f582e295d09b Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Tue, 8 Jun 2010 18:50:39 +0400 Subject: [PATCH 341/405] NPC special part 5, bsw correct --- ...rial_of_crusader_spelltable_scriptdev2.sql | 2 +- addition/731_npc_special_mangos.sql | 5 +- include/sc_boss_spell_worker.cpp | 2 +- scripts/world/npcs_special.cpp | 69 ++++++++++--------- 4 files changed, 41 insertions(+), 37 deletions(-) diff --git a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql index 89b2ccf97..b5bee961a 100644 --- a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql +++ b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql @@ -124,7 +124,7 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ (34800, 66313, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL), (34800, 66317, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL), (34800, 66318, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL), -(34800, 66406, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, NULL), +(34800, 66406, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, NULL), (34800, 66407, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), (34800, 66408, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), (34800, 66636, 0, 0, 0, 15000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 1, 0, NULL); diff --git a/addition/731_npc_special_mangos.sql b/addition/731_npc_special_mangos.sql index 32387fa2f..248cf3527 100644 --- a/addition/731_npc_special_mangos.sql +++ b/addition/731_npc_special_mangos.sql @@ -1,6 +1,7 @@ -- Snakes trap UPDATE `creature_template` SET `ScriptName`='npc_snake_trap_serpents' WHERE `entry` IN (19921, 19833); -- Mirror Immage -UPDATE `creature_template` SET `speed_walk` = 2.5, modelid_A = 11686, `minlevel` = 80, `maxlevel` = 80, `AIName` = '', `ScriptName`='npc_mirror_image' WHERE `entry` = 31216; +UPDATE `creature_template` SET `speed_walk` = 2.5, `modelid_A` = 11686, `modelid_H` = 11686, `minlevel` = 80, `maxlevel` = 80, `AIName` = '', `ScriptName`='npc_mirror_image' WHERE `entry` = 31216; -- Rune blade -UPDATE `creature_template` SET `modelid_A` = '11686', `modelid_H` = 11686, `AIName` = '', `ScriptName`='npc_runeblade' WHERE `entry` = 27893; +UPDATE `creature_template` SET `modelid_A` = 11686, `modelid_H` = 11686,`AIName` = '', `ScriptName`='npc_runeblade' WHERE `entry` = 27893; +-- UPDATE `creature_template` SET `modelid_A` = 11686, `modelid_H` = 11686,`AIName` = '', `ScriptName`='' WHERE `entry` = 27893; diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index bedc6a1d7..9de592f49 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -476,7 +476,7 @@ bool BossSpellWorker::_doAura(uint8 m_uiSpellIdx, Unit* pTarget, SpellEffectInde if (spell = (SpellEntry *)GetSpellStore()->LookupEntry(pSpell->m_uiSpellEntry[currentDifficulty])) { - int32 basepoint = pSpell->varData ? spell->EffectBasePoints[index] : pSpell->varData; + int32 basepoint = pSpell->varData ? pSpell->varData - 1 : spell->EffectBasePoints[index] + 1; if (pTarget->AddAura(new BossAura(spell, index, &basepoint, pTarget, pTarget))) return true; } diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index da47cfd75..27d04f567 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -1733,8 +1733,9 @@ struct MANGOS_DLL_DECL npc_mirror_imageAI : public ScriptedAI { owner = m_creature->GetOwner(); if (!owner) return; - + m_creature->SetLevel(owner->getLevel()); + m_creature->setFaction(owner->getFaction()); if (owner && !m_creature->hasUnitState(UNIT_STAT_FOLLOW)) { @@ -1749,6 +1750,11 @@ struct MANGOS_DLL_DECL npc_mirror_imageAI : public ScriptedAI m_uiFrostboltTimer = 0; m_uiFireblastTimer = 0; inCombat = false; + uint32 equipmain = 0; + uint32 equipoffhand = 0; + // Add visible weapon + if (Item const * item = ((Player *)owner)->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND)) + m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, item->GetProto()->ItemId); } void AttackStart(Unit* pWho) @@ -1808,13 +1814,13 @@ struct MANGOS_DLL_DECL npc_mirror_imageAI : public ScriptedAI if (m_uiFrostboltTimer <= diff) { - DoCastSpellIfCan(m_creature->getVictim(),59638); + DoCast(m_creature->getVictim(),59638); m_uiFrostboltTimer = 3100; }else m_uiFrostboltTimer -= diff; if (m_uiFireblastTimer <= diff) { - DoCastSpellIfCan(m_creature->getVictim(),59637); + DoCast(m_creature->getVictim(),59637); m_uiFireblastTimer = 6000; }else m_uiFireblastTimer -= diff; @@ -1843,25 +1849,16 @@ struct MANGOS_DLL_DECL npc_snake_trap_serpentsAI : public ScriptedAI npc_snake_trap_serpentsAI(Creature *c) : ScriptedAI(c) {Reset();} uint32 SpellTimer; - bool IsViper; Unit* Owner; void Reset() { SpellTimer = 500; - Owner = m_creature->GetCharmerOrOwner(); - if (!Owner) return; - CreatureInfo const *Info = m_creature->GetCreatureInfo(); - - if (Info->Entry == MOB_VIPER) - IsViper = true; - else - IsViper = false; - m_creature->SetLevel(Owner->getLevel()); + m_creature->setFaction(Owner->getFaction()); } void AttackStart(Unit* pWho) @@ -1872,24 +1869,19 @@ struct MANGOS_DLL_DECL npc_snake_trap_serpentsAI : public ScriptedAI { m_creature->SetInCombatWith(pWho); m_creature->AddThreat(pWho, 100.0f); + SetCombatMovement(true); + m_creature->GetMotionMaster()->MoveChase(pWho); } } void UpdateAI(const uint32 diff) { - if (!Owner) return; - if (!m_creature->getVictim()) { - if (m_creature->isInCombat()) - DoStopAttack(); - if (Owner && Owner->getVictim()) AttackStart(Owner->getVictim()); - } - - if (!m_creature->getVictim()) return; + } if (SpellTimer <= diff) { @@ -1902,8 +1894,7 @@ struct MANGOS_DLL_DECL npc_snake_trap_serpentsAI : public ScriptedAI spell = SPELL_MIND_NUMBING_POISON; else spell = SPELL_CRIPPLING_POISON; - - m_creature->CastSpell(m_creature->getVictim(), spell, true); + DoCast(m_creature->getVictim(), spell); } SpellTimer = urand(3000, 5000); @@ -1911,10 +1902,10 @@ struct MANGOS_DLL_DECL npc_snake_trap_serpentsAI : public ScriptedAI else if (m_creature->GetEntry() == MOB_VENOM_SNIKE ) //Venomous Snake - 19833 { if (urand(0,1) == 0) //80% chance to cast - m_creature->CastSpell(m_creature->getVictim(), SPELL_DEADLY_POISON, true); + DoCast(m_creature->getVictim(), SPELL_DEADLY_POISON); SpellTimer = urand(2500, 4500); } - } + } else SpellTimer -= diff; DoMeleeAttackIfReady(); @@ -1929,18 +1920,22 @@ CreatureAI* GetAI_npc_snake_trap_serpents(Creature* pCreature) struct MANGOS_DLL_DECL npc_rune_blade : public ScriptedAI { npc_rune_blade(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + Unit* owner; + void Reset() { - Unit * owner = m_creature->GetOwner(); + owner = m_creature->GetOwner(); if (!owner || owner->GetTypeId() != TYPEID_PLAYER) return; - m_creature->SetLevel(owner->getLevel()); - // Cannot be Selected or Attacked m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetLevel(owner->getLevel()); + m_creature->setFaction(owner->getFaction()); + // Add visible weapon if (Item const * item = ((Player *)owner)->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND)) m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, item->GetProto()->ItemId); @@ -1953,12 +1948,20 @@ struct MANGOS_DLL_DECL npc_rune_blade : public ScriptedAI // Visual Glow m_creature->CastSpell(m_creature, 53160, true); - // Start Chasing victim - if (uint64 guid = ((Player*)owner)->GetSelection()) - if (Unit *target = m_creature->GetUnit(*owner,guid)) - if (!target->IsFriendlyTo(owner)) - m_creature->Attack(target,true); + SetCombatMovement(true); + } + void UpdateAI(const uint32 diff) + { + if (!owner) return; + + if (!m_creature->getVictim()) + { + if (owner->getVictim()) + AttackStart(owner->getVictim()); + } + + DoMeleeAttackIfReady(); } }; From ce7e99dd110ec153137dadd4148dfc96f8cdd870 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 9 Jun 2010 18:34:39 +0400 Subject: [PATCH 342/405] ICC part 35 - Arthas not crashing part implement (not finised). --- addition/721_icecrown_mangos.sql | 12 + .../721_icecrown_spelltable_scriptdev2.sql | 18 +- include/sc_boss_spell_worker.cpp | 6 +- .../icecrown_citadel/boss_lord_marrowgar.cpp | 3 +- .../icecrown_citadel/boss_sindragosa.cpp | 8 +- .../icecrown_citadel/boss_the_lich_king.cpp | 338 ++++++++++++++++-- .../icecrown_citadel/def_spire.h | 10 + .../instance_icecrown_spire.cpp | 51 +++ 8 files changed, 400 insertions(+), 46 deletions(-) diff --git a/addition/721_icecrown_mangos.sql b/addition/721_icecrown_mangos.sql index fbb93810d..1a0d0ac07 100644 --- a/addition/721_icecrown_mangos.sql +++ b/addition/721_icecrown_mangos.sql @@ -120,3 +120,15 @@ UPDATE `creature_template` SET `ScriptName`='boss_tirion_icc', `npcflag`=1, `AIN INSERT IGNORE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('71614', '1', '38995'); UPDATE `creature_template` SET `ScriptName`='mob_ice_sphere_icc', `AIName`='' WHERE `entry`= 36633; +UPDATE `creature_template` SET `ScriptName`='mob_defiler_icc', `AIName`='' WHERE `entry`= 38757; +UPDATE `creature_template` SET `ScriptName`='mob_strangulate_vehicle', `AIName`='' WHERE `entry`= 36598; +UPDATE `creature_template` SET `ScriptName`='mob_vile_spirit', `AIName`='' WHERE `entry`= 37799; + +DELETE FROM `npc_text` WHERE `ID` IN (721001); +INSERT INTO `npc_text` (`ID`, `Text0_0`) VALUES +(721001, 'Greetings $N! Are you ready to battle with Lich King?'); + +DELETE FROM `locales_npc_text` WHERE `entry` IN (721001); +INSERT INTO `locales_npc_text` (`entry`, `Text0_0_loc1`, `Text0_0_loc2`, `Text0_0_loc3`, `Text0_0_loc4`, `Text0_0_loc5`, `Text0_0_loc6`, `Text0_0_loc7`, `Text0_0_loc8`) VALUES +(721001, 'Greetings $N! Are you ready to battle with Lich King?', NULL, NULL, NULL, NULL, NULL, NULL, 'Приветствую, $N! Поможешь мне прихлопнуть главного засранца WOW?'); + diff --git a/addition/721_icecrown_spelltable_scriptdev2.sql b/addition/721_icecrown_spelltable_scriptdev2.sql index 5ed41a8a4..39d23b1ef 100644 --- a/addition/721_icecrown_spelltable_scriptdev2.sql +++ b/addition/721_icecrown_spelltable_scriptdev2.sql @@ -288,30 +288,38 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ (36597, 70337, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 4, 0, 0), (36597, 74074, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 4, 0, 0), (36597, 69409, 0, 0, 0, 10000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 3, 0, 0), -(36597, 72754, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 10, 50, 0, 15, 0, 0), +(36597, 72762, 0, 0, 0, 20000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), (36597, 68980, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 4, 0, 0), -(36597, 68981, 0, 0, 0, 2000, 0, 0, 0, 8000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 68981, 0, 0, 0, 60000, 0, 0, 0, 60000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36597, 72133, 0, 0, 0, 5000, 0, 0, 0, 10000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36597, 72262, 0, 0, 0, 60000, 0, 0, 0, 60000, 0, 0, 0, 0, 0, 0, 1, 0, 0), -(36597, 69200, 0, 0, 0, 15000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 69200, 0, 0, 0, 15000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), (36597, 69242, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36597, 69103, 0, 0, 0, 3000, 0, 0, 0, 5000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36597, 69099, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36597, 69108, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36597, 70358, 0, 0, 0, 5000, 0, 0, 0, 60000, 0, 0, 0, 0, 0, 0, 1, 0, 0), -(36597, 70372, 0, 0, 0, 20000, 0, 0, 0, 60000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 70372, 0, 0, 0, 45000, 0, 0, 0, 45000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36597, 72149, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36597, 72143, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), -(36597, 70498, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 70498, 0, 0, 0, 3600001, 0, 0, 0, 3600001, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36597, 70503, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36597, 69037, 0, 0, 0, 20000, 0, 0, 0, 40000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36597, 36609, 0, 0, 0, 20000, 0, 0, 0, 40000, 0, 0, 0, 0, 0, 0, 9, 0, 0), (36597, 71769, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 70063, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 1), (36597, 47008, 0, 0, 0, 900000, 0, 0, 0, 900000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36597, 74352, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0); +-- summons +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMax_N10`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType` ) VALUES +(36597, 37799, 60000, 60000, 8, 10, 10, 10, 15, 25, 0, 11); -- ice sphere DELETE FROM `boss_spell_table` WHERE `entry` = 36633; INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES (36633, 69099, 0, 0, 0, 2000, 0, 0, 0, 2000, 0, 0, 0, 0, 0, 0, 6, 0, 0), (36633, 69108, 0, 0, 0, 2000, 0, 0, 0, 2000, 0, 0, 0, 0, 0, 0, 3, 0, 0), (36633, 69090, 0, 0, 0, 8000, 0, 0, 0, 24000, 0, 0, 0, 0, 0, 0, 1, 0, 0); +-- vile spirit +DELETE FROM `boss_spell_table` WHERE `entry` = 37799; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(37799, 70503, 0, 0, 0, 10000, 0, 0, 0, 10000, 0, 0, 0, 0, 0, 0, 1, 0, 0); diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index 9de592f49..5682dd288 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -248,15 +248,15 @@ CanCastResult BossSpellWorker::_BSWSpellSelector(uint8 m_uiSpellIdx, Unit* pTarg if (!pTarget->IsPositionValid()) { if (pTarget->GetTypeId() == TYPEID_PLAYER) - debug_log("BSW: Player %s (guid %u) has invalid position. May be cheater?",pTarget->GetName(),pTarget->GetGUIDLow()); - else debug_log("BSW: Creature %u has invalid position.",pTarget->GetEntry()); + error_log("BSW: Player %s (guid %u) has invalid position. May be cheater?",pTarget->GetName(),pTarget->GetGUIDLow()); + else error_log("BSW: Creature %u has invalid position.",pTarget->GetEntry()); return CAST_FAIL_OTHER; } pTarget->GetPosition(fPosX, fPosY, fPosZ); pTarget->GetRandomPoint(fPosX, fPosY, fPosZ, urand((uint32)pSpell->LocData.x, (uint32)pSpell->LocData.y), fPosX, fPosY, fPosZ); if ((int)fPosZ == 0) { - debug_log("BSW: Positon Z is NULL. Strange bug"); + error_log("BSW: Positon Z is NULL. Strange bug"); return CAST_FAIL_OTHER; } boss->CastSpell(fPosX, fPosY, fPosZ, pSpell->m_uiSpellEntry[currentDifficulty], false); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp index d4ca8a2d9..44c87eec4 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp @@ -290,14 +290,13 @@ struct MANGOS_DLL_DECL mob_bone_spikeAI : public ScriptedAI m_creature->ForcedDespawn(); } - if((m_creature->GetDistance2d(pVictim) < 1.1f) && + if(m_creature->IsWithinDistInMap(pVictim, 1.0f) && !pVictim->HasAura(SPELL_BONE_STRIKE_IMPALE)) { bsw->doCast(SPELL_BONE_STRIKE_IMPALE,pVictim); m_creature->GetMotionMaster()->Clear(); SetCombatMovement(false); } - } }; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp index f84c1abf4..7d2d75615 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp @@ -262,6 +262,8 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI MovementStarted = true; SetCombatMovement(false); bsw->doCast(SPELL_FLY_VISUAL); + m_creature->SetUInt32Value(UNIT_FIELD_BYTES_0, 50331648); + m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 50331648); m_creature->GetMotionMaster()->MovePoint(1, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); m_creature->HandleEmoteCommand(EMOTE_ONESHOT_FLY_SIT_GROUND_UP); m_creature->AddSplineFlag(SPLINEFLAG_FLYING); @@ -300,6 +302,8 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI SetCombatMovement(true); m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); bsw->doRemove(SPELL_FLY_VISUAL); + m_creature->SetUInt32Value(UNIT_FIELD_BYTES_0, 0); + m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); m_creature->RemoveSplineFlag(SPLINEFLAG_FLYING); }; break; @@ -415,7 +419,9 @@ struct MANGOS_DLL_DECL mob_frost_bombAI : public ScriptedAI boom_timer = 9000; finita = false; m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - m_creature->SetDisplayId(15880); +// m_creature->SetDisplayId(15880); + m_creature->SetDisplayId(22523); +// m_creature->SetDisplayId(19075); } void AttackStart(Unit *pWho) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp index f2cc92e62..86111a24f 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp @@ -30,7 +30,7 @@ enum BossSpells SPELL_NECROTIC_PLAGUE = 70337, SPELL_PLAGUE_SIPHON = 74074, SPELL_SOUL_REAPER = 69409, - SPELL_DEFILE = 72754, + SPELL_SPAWN_DEFILE = 72762, SPELL_HARVEST_SOUL = 68980, SPELL_HARVEST_SOUL_TELEPORT = 71372, // @@ -41,6 +41,7 @@ enum BossSpells SPELL_TIRION_LIGHT = 71797, SPELL_FROSTMOURNE_TRIGGER = 72405, SPELL_SUMMON_BROKEN_FROSTMOURNE = 72406, + SPELL_SUMMON_BROKEN_FROSTMOURNE_2 = 73017, SPELL_DISENGAGE = 61508, SPELL_FURY_OF_FROSTMOURNE = 70063, SPELL_REVIVE_VISUAL = 37755, //Override? @@ -80,11 +81,16 @@ enum BossSpells NPC_VALKYR = 36609, SPELL_WINGS_OF_THE_DAMNED = 74352, +//Defile + SPELL_DEFILE = 72743, + // NPC_FROSTMOURNE_TRIGGER = 38584, NPC_ICE_SPHERE = 36633, NPC_DEFILER = 38757, NPC_RAGING_SPIRIT = 36701, + NPC_VILE_SPIRIT = 37799, + NPC_STRANGULATE_VEHICLE = 36598, }; @@ -99,7 +105,8 @@ static Locations SpawnLoc[]= {503.15652f, -2124.516602f, 1040.860107f}, // 1 Lich king move end {491.27118f, -2124.638184f, 1040.860107f}, // 2 Tirion 1 {481.69797f, -2124.638184f, 1040.860107f}, // 3 Tirion 2 - {498.00448f, 2201.573486f, 1046.093872f}, // 4 Valkyrs? + {498.00448f, -2201.573486f, 1046.093872f}, // 4 Valkyrs? + {517.48291f, -2124.905762f, 1040.861328f}, // 5 Tirion? {959.996f, 212.576f, 193.843f}, {932.537f, 231.813f, 193.838f}, {958.675f, 254.767f, 193.822f}, @@ -127,6 +134,7 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI bool movementstarted; bool battlestarted; Creature* pTirion; + Creature* pFrostmourne; void Reset() { @@ -173,10 +181,12 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI pInstance->SetData(TYPE_LICH_KING, FAIL); } + void StartMovement(uint32 id, uint32 _nextEvent) { nextPoint = id; nextEvent = _nextEvent; + m_creature->GetMotionMaster()->Clear(); m_creature->GetMotionMaster()->MovePoint(id, SpawnLoc[id].x, SpawnLoc[id].y, SpawnLoc[id].z); pInstance->SetData(TYPE_EVENT,0); movementstarted = true; @@ -280,22 +290,50 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI case 13060: DoScriptText(-1631509, m_creature); UpdateTimer = 10000; - pInstance->SetData(TYPE_EVENT,13080); + pInstance->SetData(TYPE_EVENT,13100); break; case 13100: DoScriptText(-1631510, m_creature); UpdateTimer = 8000; pInstance->SetData(TYPE_EVENT,13110); + bsw->doCast(SPELL_CHANNEL_KING); break; case 13120: DoScriptText(-1631511, m_creature); - UpdateTimer = 10000; + UpdateTimer = 2000; pInstance->SetData(TYPE_EVENT,13130); break; case 13140: - DoScriptText(-1631512, m_creature); UpdateTimer = 2000; + bsw->doRemove(SPELL_CHANNEL_KING); pInstance->SetData(TYPE_EVENT,13150); + m_creature->CastSpell(m_creature, SPELL_SUMMON_BROKEN_FROSTMOURNE, false); + break; + case 13160: + UpdateTimer = 2000; + pInstance->SetData(TYPE_EVENT,13170); + m_creature->CastSpell(m_creature, SPELL_SUMMON_BROKEN_FROSTMOURNE_2, false); + break; + case 13180: + UpdateTimer = 2000; + pInstance->SetData(TYPE_EVENT,13190); + pFrostmourne = m_creature->SummonCreature(NPC_FROSTMOURNE, m_creature->GetPositionX()+2, m_creature->GetPositionY()+2, m_creature->GetPositionZ(), 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); + pFrostmourne->CastSpell(pFrostmourne, SPELL_BROKEN_FROSTMOURNE, false); + pFrostmourne->CastSpell(pFrostmourne, SPELL_FROSTMOURNE_TRIGGER, false); + pFrostmourne->GetMotionMaster()->MoveChase(m_creature); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISARMED); + break; + case 13200: + DoScriptText(-1631512, m_creature); + m_creature->RemoveAurasDueToSpell(SPELL_SUMMON_BROKEN_FROSTMOURNE); + m_creature->RemoveAllAuras(); + UpdateTimer = 2000; + pInstance->SetData(TYPE_EVENT,13210); + break; + case 13280: + UpdateTimer = 2000; + pInstance->SetData(TYPE_EVENT,132900); + stage = 12; break; default: break; @@ -346,10 +384,10 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI break; case 2: if (movementstarted) return; + bsw->doCast(SPELL_REMORSELESS_WINTER); stage = 3; - break; + return; case 3: - bsw->timedCast(SPELL_REMORSELESS_WINTER, diff); bsw->timedCast(SPELL_SUMMON_RAGING_SPIRIT, diff); bsw->timedCast(SPELL_SUMMON_ICE_SPHERE, diff); bsw->timedCast(SPELL_PAIN_AND_SUFFERING, diff); @@ -360,19 +398,28 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI DoScriptText(-1631518,m_creature); }; - if (bsw->timedQuery(SPELL_QUAKE, diff)) + if (bsw->timedQuery(SPELL_REMORSELESS_WINTER, diff)) { bsw->doCast(SPELL_QUAKE); + pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_ICESHARD_1)); + pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_ICESHARD_2)); + pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_ICESHARD_3)); + pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_ICESHARD_4)); stage = 4; DoScriptText(-1631524, m_creature); m_creature->GetMotionMaster()->Clear(); m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); SetCombatMovement(true); - } + }; + break; case 4: // Phase 2 - bsw->timedCast(SPELL_DEFILE, diff); + if (bsw->timedQuery(SPELL_SPAWN_DEFILE, diff)) + { + bsw->doCast(SPELL_SPAWN_DEFILE); +// DoScriptText(-1631527,m_creature); + } if (bsw->timedQuery(SPELL_SUMMON_VALKYR, diff)) { bsw->doCast(SPELL_SUMMON_VALKYR); @@ -404,11 +451,10 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI break; case 6: if (movementstarted) return; + bsw->doCast(SPELL_REMORSELESS_WINTER); stage = 7; - break; - + return; case 7: - bsw->timedCast(SPELL_REMORSELESS_WINTER, diff); bsw->timedCast(SPELL_SUMMON_RAGING_SPIRIT, diff); bsw->timedCast(SPELL_SUMMON_ICE_SPHERE, diff); bsw->timedCast(SPELL_PAIN_AND_SUFFERING, diff); @@ -419,25 +465,34 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI DoScriptText(-1631518,m_creature); }; - if (bsw->timedQuery(SPELL_QUAKE, diff)) + if (bsw->timedQuery(SPELL_REMORSELESS_WINTER, diff)) { - bsw->doCast(SPELL_QUAKE); stage = 8; DoScriptText(-1631524, m_creature); m_creature->GetMotionMaster()->Clear(); m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); SetCombatMovement(true); - } + + bsw->doCast(SPELL_SUMMON_VILE_SPIRITS); + for (uint8 i = 0; i < 11; ++i) + bsw->doCast(NPC_VILE_SPIRIT); + + bsw->doCast(SPELL_QUAKE); + }; + break; case 8: // Phase 3 - + if (bsw->timedQuery(SPELL_SPAWN_DEFILE, diff)) + { + bsw->doCast(SPELL_SPAWN_DEFILE); +// DoScriptText(-1631527,m_creature); + } bsw->timedCast(SPELL_SOUL_REAPER, diff); - bsw->timedCast(SPELL_DEFILE, diff); - bsw->timedCast(SPELL_SUMMON_VILE_SPIRITS, diff); + if (bsw->timedQuery(SPELL_HARVEST_SOUL, diff)) { bsw->doCast(SPELL_HARVEST_SOUL); - DoScriptText(-16314,m_creature); + DoScriptText(-1631520,m_creature); } bsw->timedCast(SPELL_SOUL_REAPER, diff); @@ -448,32 +503,28 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI if (m_creature->GetHealthPercent() < 10.0f) { stage = 9; - DoScriptText(-1631429,m_creature); + DoScriptText(-1631513,m_creature); } break; case 9: // Ending Phase start m_creature->AttackStop(); - SetCombatMovement(false); if (pTirion = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_TIRION))) { m_creature->SetInCombatWith(pTirion); pTirion->AddThreat(m_creature, 1000.0f); } bsw->doCast(SPELL_FURY_OF_FROSTMOURNE); SetCombatMovement(false); - StartMovement(1,0); + StartMovement(1,13000); stage = 10; - pInstance->SetData(TYPE_EVENT,13000); break; case 10: - if (movementstarted) return; - stage = 11; - bsw->doCast(SPELL_CHANNEL_KING); break; case 11: break; - + case 12: + DoMeleeAttackIfReady(); + break; } - } }; @@ -496,6 +547,7 @@ struct MANGOS_DLL_DECL boss_tirion_iccAI : public ScriptedAI uint32 nextEvent; uint32 nextPoint; bool movementstarted; + Creature* pMenethil; void Reset() { @@ -524,6 +576,23 @@ struct MANGOS_DLL_DECL boss_tirion_iccAI : public ScriptedAI } } + void doRevivePlayers() + { + Map::PlayerList const &PlList = pMenethil->GetMap()->GetPlayers(); + if (PlList.isEmpty()) return; + for (Map::PlayerList::const_iterator i = PlList.begin(); i != PlList.end(); ++i) + { + if (Player* pPlayer = i->getSource()) + { + if (pPlayer && !pPlayer->isAlive()) + { + pMenethil->CastSpell(pPlayer, 26687, true); + pPlayer->ResurrectPlayer(100, false); + } + } + }; + } + void UpdateAI(const uint32 diff) { @@ -570,7 +639,7 @@ struct MANGOS_DLL_DECL boss_tirion_iccAI : public ScriptedAI break; case 13110: DoScriptText(-1631555, m_creature); - UpdateTimer = 5000; + UpdateTimer = 2000; m_creature->CastSpell(m_creature, SPELL_TIRION_LIGHT, false); pInstance->SetData(TYPE_EVENT,13120); break; @@ -578,7 +647,56 @@ struct MANGOS_DLL_DECL boss_tirion_iccAI : public ScriptedAI SetCombatMovement(false); m_creature->RemoveAurasDueToSpell(SPELL_ICEBLOCK_TRIGGER); UpdateTimer = 2000; - pInstance->SetData(TYPE_EVENT,13140); + pInstance->SetData(TYPE_EVENT,13131); + break; + case 13131: + m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + StartMovement(2,13132); + break; + case 13132: + StartMovement(5,13140); + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_READY2H); + break; + case 13150: + UpdateTimer = 1000; + pInstance->SetData(TYPE_EVENT,13160); + break; + case 13170: + UpdateTimer = 2000; + pInstance->SetData(TYPE_EVENT,13180); + break; + case 13190: + UpdateTimer = 500; + pInstance->SetData(TYPE_EVENT,13200); + break; + case 13210: + UpdateTimer = 6000; + DoScriptText(-1631556, m_creature); + pInstance->SetData(TYPE_EVENT,13230); + break; + case 13230: + UpdateTimer = 6000; + pMenethil = m_creature->SummonCreature(NPC_MENETHIL, m_creature->GetPositionX()+5, m_creature->GetPositionY()+5, m_creature->GetPositionZ(), 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); + pInstance->SetData(TYPE_EVENT,13250); + DoScriptText(-1631560, pMenethil); + break; + case 13250: + UpdateTimer = 6000; + pInstance->SetData(TYPE_EVENT,13270); + DoScriptText(-1631561, pMenethil); + pMenethil->CastSpell(pMenethil, SPELL_REVIVE_VISUAL, false); + doRevivePlayers(); + break; + + case 13270: + UpdateTimer = 6000; + pInstance->SetData(TYPE_EVENT,13280); + if (Creature* pLichKing = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_LICH_KING))) + { + m_creature->AI()->AttackStart(pLichKing); + pMenethil->AI()->AttackStart(pLichKing); + }; +// DoScriptText(-1631560, m_creature); break; default: break; @@ -601,7 +719,8 @@ bool GossipHello_boss_tirion_icc(Player* pPlayer, Creature* pCreature) ScriptedInstance* pInstance; pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - if (pInstance->GetData(TYPE_LICH_KING) != NOT_STARTED) return false; + if (pInstance->GetData(TYPE_LICH_KING) != NOT_STARTED && + pInstance->GetData(TYPE_LICH_KING) != FAIL ) return false; char const* _message; @@ -626,7 +745,7 @@ bool GossipHello_boss_tirion_icc(Player* pPlayer, Creature* pCreature) }; pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, _message, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - pPlayer->PlayerTalkClass->SendGossipMenu(907, pCreature->GetGUID()); + pPlayer->PlayerTalkClass->SendGossipMenu(721001, pCreature->GetGUID()); return true; }; @@ -665,12 +784,13 @@ struct MANGOS_DLL_DECL mob_ice_sphere_iccAI : public ScriptedAI void Reset() { - if (Unit* pTarget = bsw->SelectRandomPlayerAtRange(100.0f)) + if (Unit* pTarget = bsw->SelectRandomPlayerAtRange(120.0f)) { m_creature->SetInCombatWith(pTarget); m_creature->AddThreat(pTarget,100.0f); } bsw->doCast(SPELL_ICE_SPHERE_VISUAL); + m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); } @@ -687,7 +807,7 @@ struct MANGOS_DLL_DECL mob_ice_sphere_iccAI : public ScriptedAI bsw->timedCast(SPELL_ICE_PULSE, uiDiff); - if (m_creature->IsWithinDistInMap(m_creature->getVictim(), 3.0f)) + if (m_creature->IsWithinDistInMap(m_creature->getVictim(), 1.0f)) bsw->timedCast(SPELL_ICE_BURST,uiDiff); } }; @@ -697,6 +817,139 @@ CreatureAI* GetAI_mob_ice_sphere_icc(Creature* pCreature) return new mob_ice_sphere_iccAI(pCreature); }; +struct MANGOS_DLL_DECL mob_defiler_iccAI : public ScriptedAI +{ + mob_defiler_iccAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + Reset(); + } + + ScriptedInstance *m_pInstance; + uint32 life_timer; + + void Reset() + { + SetCombatMovement(false); + life_timer = 30000; + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->CastSpell(m_creature, SPELL_DEFILE, true); + } + + void AttackStart(Unit *pWho) + { + return; + } + + void UpdateAI(const uint32 uiDiff) + { + if(m_pInstance && m_pInstance->GetData(TYPE_LICH_KING) != IN_PROGRESS) + m_creature->ForcedDespawn(); + + if (life_timer <= uiDiff) + m_creature->ForcedDespawn(); + else life_timer -= uiDiff; + } + +}; + +CreatureAI* GetAI_mob_defiler_icc(Creature* pCreature) +{ + return new mob_defiler_iccAI(pCreature); +} + +struct MANGOS_DLL_DECL mob_strangulate_vehicleAI : public ScriptedAI +{ + mob_strangulate_vehicleAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + Reset(); + } + + ScriptedInstance *m_pInstance; + + void Reset() + { + SetCombatMovement(false); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + } + + void AttackStart(Unit *pWho) + { + return; + } + + void UpdateAI(const uint32 uiDiff) + { + m_creature->ForcedDespawn(); + } + +}; + +CreatureAI* GetAI_mob_strangulate_vehicle(Creature* pCreature) +{ + return new mob_strangulate_vehicleAI(pCreature); +} + +struct MANGOS_DLL_DECL mob_vile_spiritAI : public ScriptedAI +{ + mob_vile_spiritAI(Creature *pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); + Reset(); + } + + ScriptedInstance *pInstance; + BossSpellWorker* bsw; + bool movementstarted; + + void Reset() + { + if (Unit* pTarget = bsw->SelectRandomPlayerAtRange(120.0f)) + { + m_creature->SetInCombatWith(pTarget); + m_creature->AddThreat(pTarget,1000.0f); + } + SetCombatMovement(false); + movementstarted = false; + m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); + } + + + void UpdateAI(const uint32 uiDiff) + { + if (!pInstance || pInstance->GetData(TYPE_LICH_KING) != IN_PROGRESS) + m_creature->ForcedDespawn(); + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (bsw->timedQuery(SPELL_SPIRITS_BURST, uiDiff) && !movementstarted) + { + SetCombatMovement(true); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + movementstarted = true; + } + + if (m_creature->getVictim()->GetTypeId() != TYPEID_PLAYER) + return; + + if (m_creature->IsWithinDistInMap(m_creature->getVictim(), 1.0f)) + { + bsw->doCast(SPELL_SPIRITS_BURST); + m_creature->ForcedDespawn(); + }; + } +}; + +CreatureAI* GetAI_mob_vile_spirit(Creature* pCreature) +{ + return new mob_vile_spiritAI(pCreature); +} + void AddSC_boss_lich_king_icc() { Script *newscript; @@ -718,4 +971,19 @@ void AddSC_boss_lich_king_icc() newscript->GetAI = &GetAI_mob_ice_sphere_icc; newscript->RegisterSelf(); + newscript = new Script; + newscript->Name = "mob_defiler_icc"; + newscript->GetAI = &GetAI_mob_defiler_icc; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_strangulate_vehicle"; + newscript->GetAI = &GetAI_mob_strangulate_vehicle; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_vile_spirit"; + newscript->GetAI = &GetAI_mob_vile_spirit; + newscript->RegisterSelf(); + }; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h index 140b45467..01db52c1c 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h @@ -45,6 +45,8 @@ enum NPC_TIRION = 38995, NPC_MENETHIL = 38579, + NPC_SPIRIT_WARDEN = 38579, + NPC_FROSTMOURNE = 27880, NPC_STINKY = 37025, NPC_PRECIOUS = 37217, @@ -113,6 +115,14 @@ enum GO_FROSTWING_SIGIL = 202181, GO_BLOODWING_SIGIL = 202183, + GO_ICESHARD_1 = 202142, //8304 + GO_ICESHARD_2 = 202141, //8364 + GO_ICESHARD_3 = 202143, //8310 + GO_ICESHARD_4 = 202144, //9007 + + GO_FROSTY_WIND = 202188, // + GO_FROSTY_EDGE = 202189, // + TYPE_EVENT_TIMER = 99, TYPE_EVENT = 100, TYPE_EVENT_NPC = 101, diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp index 9acb99ca2..e0b7212fd 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp @@ -84,6 +84,14 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance uint64 m_uiSindragosaDoor1GUID; uint64 m_uiSindragosaDoor2GUID; + uint64 m_uiIceShard1GUID; + uint64 m_uiIceShard2GUID; + uint64 m_uiIceShard3GUID; + uint64 m_uiIceShard4GUID; + + uint64 m_uiFrostyWindGUID; + uint64 m_uiFrostyEdgeGUID; + uint64 m_uiSaurfangCacheGUID; uint64 m_uiGunshipArmoryAGUID; uint64 m_uiGunshipArmoryHGUID; @@ -192,6 +200,14 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance OpenAllDoors(); } + bool IsEncounterInProgress() const + { + for(uint8 i = 1; i < MAX_ENCOUNTERS-3 ; ++i) + if (m_auiEncounter[i] == IN_PROGRESS) return true; + + return false; + } + void OnCreatureCreate(Creature* pCreature) { switch(pCreature->GetEntry()) @@ -390,6 +406,24 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance if(Difficulty == RAID_DIFFICULTY_25MAN_HEROIC) m_uiValitriaCacheGUID = pGo->GetGUID(); break; + case GO_ICESHARD_1: + m_uiIceShard1GUID = pGo->GetGUID(); + break; + case GO_ICESHARD_2: + m_uiIceShard2GUID = pGo->GetGUID(); + break; + case GO_ICESHARD_3: + m_uiIceShard3GUID = pGo->GetGUID(); + break; + case GO_ICESHARD_4: + m_uiIceShard4GUID = pGo->GetGUID(); + break; + case GO_FROSTY_WIND: + m_uiFrostyWindGUID = pGo->GetGUID(); + break; + case GO_FROSTY_EDGE: + m_uiFrostyEdgeGUID = pGo->GetGUID(); + break; } OpenAllDoors(); } @@ -573,8 +607,16 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance case 12170: case 13110: case 13130: + case 13131: + case 13132: case 13150: case 13170: + case 13190: + case 13210: + case 13230: + case 13250: + case 13270: + case 13290: return NPC_TIRION; break; @@ -599,6 +641,9 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance case 13140: case 13160: case 13180: + case 13200: + case 13220: + case 13240: return NPC_LICH_KING; break; case 500: @@ -653,6 +698,12 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance case GO_VALITHRIA_DOOR_2: return m_uiValithriaDoor2GUID; case GO_VALITHRIA_DOOR_3: return m_uiValithriaDoor3GUID; case GO_VALITHRIA_DOOR_4: return m_uiValithriaDoor4GUID; + case GO_ICESHARD_1: return m_uiIceShard1GUID; + case GO_ICESHARD_2: return m_uiIceShard2GUID; + case GO_ICESHARD_3: return m_uiIceShard3GUID; + case GO_ICESHARD_4: return m_uiIceShard4GUID; + case GO_FROSTY_WIND: return m_uiFrostyWindGUID; + case GO_FROSTY_EDGE: return m_uiFrostyEdgeGUID; } return 0; } From fcf3493233a9fae98b568ccb9168412216112ab4 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 10 Jun 2010 18:22:49 +0400 Subject: [PATCH 343/405] ICC part 36 - The lich king first alfa coming. +Many changes to ICC --- README | 12 +- addition/721_icecrown_mangos.sql | 15 +- addition/721_icecrown_scriptdev2.sql | 10 +- .../721_icecrown_spelltable_scriptdev2.sql | 53 ++-- include/sc_boss_spell_worker.cpp | 6 +- .../boss_deathbringer_saurfang.cpp | 188 +++++++++++---- .../boss_lady_deathwhisper.cpp | 172 +++++++++++-- .../icecrown_citadel/boss_lord_marrowgar.cpp | 66 ++--- .../icecrown_citadel/boss_sindragosa.cpp | 1 + .../icecrown_citadel/boss_the_lich_king.cpp | 226 ++++++++++++++---- .../instance_icecrown_spire.cpp | 12 + 11 files changed, 583 insertions(+), 178 deletions(-) diff --git a/README b/README index 5eb7d87ba..c9dd42eec 100644 --- a/README +++ b/README @@ -1,5 +1,5 @@ @package RSA scripts for ScriptDev2 -@version 0.2 +@version 0.3a @revision (current) @copyright (c) 2009-2010 /dev/rsa @license GNU Public License @@ -27,10 +27,12 @@ In this repository you found this custom scripts: - Naxxramas (by ckegg) - An'kahet (by Tassadar) - Draktaron (by Tassadar) +- Culling of Stratholme (by Maxxx2021) - Vault of Archavon (by Insider42) - Trial of the Crusader (by me) - Halls of reflection (partially, by me) -- Icecrown Citadel (not finished, by me) +- Icecrown Citadel (by me) +- NPC special (by me, thanks for all) Attention please! In my project only correct Linux Makefile provided. If you want compile this branch on Windows, please convert Makefile to your c++ compiler. @@ -38,11 +40,11 @@ If you want compile this branch on Windows, please convert Makefile to your c++ Thanks to: - Vladimir Mangos - MaNGOS project; - Insider42 - for your work; -- griffonheart (original texts/sounds); +- griffonheart (original texts/sounds for TOC); - Cristy (re-translation to english); -- Selector - Faction champions base script; +- Selector - Faction champions base script, testing, bugreports; - Boxa - changes for Windows compilers and bugreports; +- Wowka321 - core support; - Dron01 - bugreports and valuable advice; - gladden, ghostart - bugreports; -- Insider42 - bugreports, features; - all - testing. diff --git a/addition/721_icecrown_mangos.sql b/addition/721_icecrown_mangos.sql index 1a0d0ac07..2262d5797 100644 --- a/addition/721_icecrown_mangos.sql +++ b/addition/721_icecrown_mangos.sql @@ -25,11 +25,14 @@ UPDATE `instance_template` SET `script`='instance_icecrown_spire' WHERE `map`=63 UPDATE `creature_template` SET `ScriptName`='boss_deathbringer_saurfang' WHERE `entry`=37813; DELETE FROM `gameobject` WHERE `guid` IN (913383, 913385, 913395, 913397); DELETE FROM `gameobject_template` WHERE `entry` IN (902241,902242); +UPDATE `creature_template` SET `ScriptName`='mob_blood_beast', `AIName`='' WHERE `entry`= 38508; -- Deathwhisper UPDATE `creature_template` SET `ScriptName`='boss_lady_deathwhisper' WHERE `entry`=36855; UPDATE `creature_template` SET `faction_A`=14, `faction_H`=14,`ScriptName`='mob_vengeful_shade', `AIName`='' WHERE `entry`= 38222; #UPDATE `gameobject` SET `spawntimesecs` = -25, `state` = 1 WHERE `id` = 202220; +UPDATE `creature_template` SET `ScriptName`='mob_cult_adherent', `AIName`='' WHERE `entry`= 37949; +UPDATE `creature_template` SET `ScriptName`='mob_cult_fanatic', `AIName`='' WHERE `entry`= 37890; -- Marrowgar UPDATE `creature_template` SET `ScriptName`='boss_lord_marrowgar' WHERE `entry`= 36612; @@ -123,12 +126,14 @@ UPDATE `creature_template` SET `ScriptName`='mob_ice_sphere_icc', `AIName`='' WH UPDATE `creature_template` SET `ScriptName`='mob_defiler_icc', `AIName`='' WHERE `entry`= 38757; UPDATE `creature_template` SET `ScriptName`='mob_strangulate_vehicle', `AIName`='' WHERE `entry`= 36598; UPDATE `creature_template` SET `ScriptName`='mob_vile_spirit', `AIName`='' WHERE `entry`= 37799; +UPDATE `creature_template` SET `ScriptName`='mob_raging_spirit', `AIName`='' WHERE `entry`= 36701; -DELETE FROM `npc_text` WHERE `ID` IN (721001); +DELETE FROM `npc_text` WHERE `ID` IN (721001,721002); INSERT INTO `npc_text` (`ID`, `Text0_0`) VALUES -(721001, 'Greetings $N! Are you ready to battle with Lich King?'); +(721001, 'Greetings $N! Are you ready to battle with Lich King?'), +(721002, 'Instance script designed by /dev/rsa especially for\n http://wow.teletoria.ru\n Thanks to:\n Vladimir Mangos\n Insider42\n Wowka321\n Selector\n and many other !\n'); -DELETE FROM `locales_npc_text` WHERE `entry` IN (721001); +DELETE FROM `locales_npc_text` WHERE `entry` IN (721001,721002); INSERT INTO `locales_npc_text` (`entry`, `Text0_0_loc1`, `Text0_0_loc2`, `Text0_0_loc3`, `Text0_0_loc4`, `Text0_0_loc5`, `Text0_0_loc6`, `Text0_0_loc7`, `Text0_0_loc8`) VALUES -(721001, 'Greetings $N! Are you ready to battle with Lich King?', NULL, NULL, NULL, NULL, NULL, NULL, 'Приветствую, $N! Поможешь мне прихлопнуть главного засранца WOW?'); - +(721001, 'Greetings $N! Are you ready to battle with Lich King?', NULL, NULL, NULL, NULL, NULL, NULL, 'Приветствую, $N! Поможешь мне прихлопнуть главного засранца WOW?'), +(721002, 'Instance script designed by /dev/rsa especially for\n http://wow.teletoria.ru\n Thanks to:\n Vladimir Mangos\n Insider42\n Wowka321\n Selector\n and many other !\n', NULL, NULL, NULL, NULL, NULL, NULL, 'Скрипт инстанса разработан специально для\n http://wow.teletoria.ru\n Благодарности:\n Vladimir Mangos\n Insider42\n Wowka321\n Selector\n и многим другим!\n (c) /dev/rsa 2010 год'); diff --git a/addition/721_icecrown_scriptdev2.sql b/addition/721_icecrown_scriptdev2.sql index 7fe6fc594..43bc90330 100644 --- a/addition/721_icecrown_scriptdev2.sql +++ b/addition/721_icecrown_scriptdev2.sql @@ -162,6 +162,7 @@ INSERT INTO `script_texts` (`entry`,`content_loc8`, `content_default`, `sound`, ('-1631526','Склонись перед своим господином и повелителем!','Bow down before your lord and master!','17372','6','0','0','Lich King SAY'), ('-1631527','Валькирия! Твой господин зовет!','Val\'kyr, your master calls!','17373','6','0','0','Lich King SAY_SUMMON'), ('-1631528','...','...','17374','6','0','0','Lich King SAY_DEATH'), +('-1631531','Оскверняю!','Defile!','0','3','0','0','Lich King SAY'), -- Tirion ('-1631552','Мы даруем тебе быструю смерть, Артас! Более быструю чем ты заслуживаешь за то что замучил и погубил десятки тысяч жизней!','We will grant you a swift death, Arthas. More than can be said for the thousands you\'ve tortured and slain.','17390','6','0','0','Tirion SAY_INTRO2'), @@ -174,4 +175,11 @@ INSERT INTO `script_texts` (`entry`,`content_loc8`, `content_default`, `sound`, ('-1631558','Вы не должны оказаться во власти Ледяной скорби. Иначе, как и я, будете навеки порабощены этим проклятым клинком.','First, you must escape Frostmourne\'s hold, or be damned as I am; trapped within this cursed blade for all eternity.','17395','6','0','0','Terenas Menethil II SAY'), ('-1631559','Помогите мне уничтожить эти истерзанные души. Вместе мы вытянем силу из ледяной скорби и ослабим короля-лича.','Aid me in destroying these tortured souls! Together we will loosen Frostmourne\'s hold and weaken the Lich King from within!','17396','6','0','0','Terenas Menethil II SAY'), ('-1631560','Наконец я свободен. Все кончено, сын мой. Настал час расплаты.','Free at last! It is over, my son. This is the moment of reckoning.','17397','6','0','0','Terenas Menethil II SAY'), -('-1631561','Поднимитесь, воины света!','Rise up, champions of the Light!','17398','6','0','0',' SAY'); +('-1631561','Поднимитесь, воины света!','Rise up, champions of the Light!','17398','6','0','0',' SAY'), + +-- Adds +('-1631590','Р-р-р-рота, подъем!','','0','6','0','0','custom message'), +('-1631591','Хилы, не спать!','','0','6','0','0','custom message'), +('-1631592','ДД поднажали!','','0','6','0','0','custom message'), +('-1631593','Лидер, гони лентяев из рейда! А то еще час возиться будете!','','0','6','0','0','custom message'), +('-1631594','Ну вот вы и прикончили Артаса. Теперь будем ждать Катаклизм.','','0','6','0','0','custom message'); diff --git a/addition/721_icecrown_spelltable_scriptdev2.sql b/addition/721_icecrown_spelltable_scriptdev2.sql index 39d23b1ef..d81353e71 100644 --- a/addition/721_icecrown_spelltable_scriptdev2.sql +++ b/addition/721_icecrown_spelltable_scriptdev2.sql @@ -8,8 +8,8 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ (36612, 71580, 0, 0, 0, 6000, 0, 0, 0, 12000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36612, 69146, 0, 0, 0, 15000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36612, 69057, 0, 0, 0, 17000, 0, 0, 0, 27000, 0, 0, 0, 0, 0, 0, 6, 0, 0), -(36612, 69076, 0, 0, 0, 3600001, 0, 0, 0, 3600001, 0, 0, 0, 0, 0, 0, 1, 0, 0), -(36612, 69075, 0, 0, 0, 2000, 0, 0, 0, 2000, 0, 0, 0, 5, 0, 0, 12, 0, 0), +(36612, 69076, 0, 0, 0, 60000, 0, 0, 0, 60000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36612, 69075, 0, 0, 0, 2000, 0, 0, 0, 2000, 0, 0, 0, 5, 0, 0, 12, 0, 1), (36612, 47008, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 0, 0, 0, 1, 0, 0); -- summons INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMax_N10`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType` ) VALUES @@ -25,7 +25,6 @@ DELETE FROM `boss_spell_table` WHERE `entry` = 38711; INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES (38711, 69065, 0, 0, 0, 1000, 0, 0, 0, 1000, 0, 0, 0, 6, 0, 0); - -- Lady Deathwhisper DELETE FROM `boss_spell_table` WHERE `entry` = 36855; INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES @@ -50,6 +49,24 @@ DELETE FROM `boss_spell_table` WHERE `entry` = 38222; INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES (38222, 71494, 0, 0, 0, 1000, 0, 0, 0, 1000, 0, 0, 0, 1, 0, 0), (38222, 71544, 72010, 72011, 72012, 1000, 0, 0, 0, 1000, 0, 0, 0, 3, 0, 0); +-- Adherent +DELETE FROM `boss_spell_table` WHERE `entry` = 37949; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(37949, 71129, 0, 0, 0, 15000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), +(37949, 70594, 0, 0, 0, 5000, 0, 0, 0, 10000, 0, 0, 0, 4, 0, 0), +(37949, 71254, 0, 0, 0, 5000, 0, 0, 0, 15000, 0, 0, 0, 4, 0, 0), +(37949, 70906, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 4, 0, 0), +(37949, 70903, 0, 0, 0, 1000, 0, 0, 0, 2000, 0, 0, 0, 1, 0, 0), +(37949, 71237, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), +(37949, 70768, 0, 0, 0, 5000, 0, 0, 0, 10000, 0, 0, 0, 4, 0, 0), +(37949, 41236, 0, 0, 0, 5000, 0, 0, 0, 10000, 0, 0, 0, 1, 0, 0), +(37949, 71234, 0, 0, 0, 5000, 0, 0, 0, 10000, 0, 0, 0, 4, 0, 0); +-- Fanatic +DELETE FROM `boss_spell_table` WHERE `entry` = 37890; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(37890, 70659, 0, 0, 0, 5000, 0, 0, 0, 10000, 0, 0, 0, 3, 0, 0), +(37890, 70670, 0, 0, 0, 5000, 0, 0, 0, 10000, 0, 0, 0, 3, 0, 0), +(37890, 70674, 0, 0, 0, 5000, 0, 0, 0, 10000, 0, 0, 0, 1, 0, 0); -- Gunship battle -- Frost wyrm @@ -77,14 +94,14 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ -- Deathbringer Saurfang DELETE FROM `boss_spell_table` WHERE `entry` = 37813; INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES -(37813, 72178, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 1, 0, 0), -(37813, 72371, 0, 0, 0, 15000, 0, 0, 0, 27000, 0, 0, 0, 4, 0, 0), -(37813, 72293, 0, 72444, 0, 15000, 0, 0, 0, 27000, 0, 0, 0, 4, 0, 0), +(37813, 72178, 0, 0, 0, 20000, 0, 0, 0, 15000, 0, 0, 0, 1, 0, 0), +(37813, 72371, 0, 0, 0, 3000, 0, 0, 0, 5000, 0, 0, 0, 1, 0, 0), +(37813, 72293, 0, 0, 0, 25000, 0, 0, 0, 35000, 0, 0, 0, 4, 0, 0), (37813, 72737, 0, 0, 0, 15000, 0, 0, 0, 27000, 0, 0, 0, 4, 0, 0), -(37813, 72385, 0, 72442, 0, 20000, 0, 0, 0, 40000, 0, 0, 0, 4, 0, 0), -(37813, 72380, 0, 72438, 0, 15000, 0, 0, 0, 27000, 0, 0, 0, 4, 0, 0), -(37813, 72408, 0, 72448, 0, 20000, 0, 0, 0, 40000, 0, 0, 0, 4, 0, 0), -(37813, 72173, 0, 0, 0, 30000, 0, 0, 0, 45000, 0, 0, 0, 1, 0, 0), +(37813, 72385, 0, 0, 0, 20000, 0, 0, 0, 40000, 0, 0, 0, 4, 0, 0), +(37813, 72380, 0, 0, 0, 25000, 0, 0, 0, 45000, 0, 0, 0, 4, 0, 0), +(37813, 72408, 0, 0, 0, 20000, 0, 0, 0, 40000, 0, 0, 0, 4, 0, 0), +(37813, 72173, 0, 0, 0, 45000, 0, 0, 0, 45000, 0, 0, 0, 1, 0, 0), (37813, 72769, 0, 0, 0, 15000, 0, 0, 0, 27000, 0, 0, 0, 4, 0, 0), (37813, 72723, 0, 0, 0, 15000, 0, 0, 0, 27000, 0, 0, 0, 1, 0, 0), (37813, 47008, 0, 0, 0, 480000, 0, 0, 0, 480000, 0, 0, 0, 1, 0, 0); @@ -94,9 +111,9 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMa -- Blood beast DELETE FROM `boss_spell_table` WHERE `entry` = 38508; INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES -(38508, 72176, 0, 0, 0, 15000, 0, 0, 0, 27000, 0, 0, 0, 4, 0, 0), -(38508, 72723, 0, 0, 0, 15000, 0, 0, 0, 27000, 0, 0, 0, 4, 0, 0), -(38508, 21150, 0, 0, 0, 15000, 0, 0, 0, 27000, 0, 0, 0, 4, 0, 0); +(38508, 72176, 0, 0, 0, 15000, 0, 0, 0, 27000, 0, 0, 0, 1, 0, 0), +(38508, 72723, 0, 0, 0, 15000, 0, 0, 0, 27000, 0, 0, 0, 1, 0, 0), +(38508, 21150, 0, 0, 0, 15000, 0, 0, 0, 27000, 0, 0, 0, 1, 0, 0); -- Festergut @@ -284,16 +301,16 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ -- Lich king DELETE FROM `boss_spell_table` WHERE `entry` = 36597; INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES -(36597, 70541, 0, 0, 0, 6000, 0, 0, 0, 10000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(36597, 70541, 0, 0, 0, 6000, 0, 0, 0, 12000, 0, 0, 0, 60, 0, 0, 12, 0, 0), (36597, 70337, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 4, 0, 0), (36597, 74074, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 4, 0, 0), (36597, 69409, 0, 0, 0, 10000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 3, 0, 0), (36597, 72762, 0, 0, 0, 20000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), -(36597, 68980, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(36597, 68980, 0, 0, 0, 1500, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), (36597, 68981, 0, 0, 0, 60000, 0, 0, 0, 60000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36597, 72133, 0, 0, 0, 5000, 0, 0, 0, 10000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36597, 72262, 0, 0, 0, 60000, 0, 0, 0, 60000, 0, 0, 0, 0, 0, 0, 1, 0, 0), -(36597, 69200, 0, 0, 0, 15000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(36597, 69201, 0, 0, 0, 5000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 4, 0, 1), (36597, 69242, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36597, 69103, 0, 0, 0, 3000, 0, 0, 0, 5000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36597, 69099, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), @@ -323,3 +340,7 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ DELETE FROM `boss_spell_table` WHERE `entry` = 37799; INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES (37799, 70503, 0, 0, 0, 10000, 0, 0, 0, 10000, 0, 0, 0, 0, 0, 0, 1, 0, 0); +-- raging spirit +DELETE FROM `boss_spell_table` WHERE `entry` = 36701; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(36701, 69242, 0, 0, 0, 2000, 0, 0, 0, 5000, 0, 0, 0, 0, 0, 0, 3, 0, 0); diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index 5682dd288..a645a5930 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -472,14 +472,16 @@ bool BossSpellWorker::_doAura(uint8 m_uiSpellIdx, Unit* pTarget, SpellEffectInde SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; - debug_log("BSW: adding aura from spell %u index %u",pSpell->m_uiSpellEntry[currentDifficulty], index); + if (pTarget->HasAura(pSpell->m_uiSpellEntry[currentDifficulty])) + debug_log("BSW: adding aura stack from spell %u index %u",pSpell->m_uiSpellEntry[currentDifficulty], index); if (spell = (SpellEntry *)GetSpellStore()->LookupEntry(pSpell->m_uiSpellEntry[currentDifficulty])) { + debug_log("BSW: adding aura from spell %u index %u",pSpell->m_uiSpellEntry[currentDifficulty], index); int32 basepoint = pSpell->varData ? pSpell->varData - 1 : spell->EffectBasePoints[index] + 1; if (pTarget->AddAura(new BossAura(spell, index, &basepoint, pTarget, pTarget))) return true; - } + }; return false; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp index 66c1abfdd..3483ee58b 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp @@ -40,12 +40,10 @@ enum SPELL_BLOOD_NOVA = 72380, SPELL_RUNE_OF_BLOOD = 72408, SPELL_CALL_BLOOD_BEASTS = 72173, + SPELL_SCENT_OF_BLOOD = 72769, SPELL_RESISTANT_SKIN = 72723, - - SPELL_BEAST_1 = 72176, - SPELL_BEAST_2 = 72723, - SPELL_BEAST_3 = 21150, + SPELL_BLOOD_LINK_BEAST = 72176, }; @@ -60,24 +58,27 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI ScriptedInstance *pInstance; BossSpellWorker* bsw; - bool m_uiIsFrenzy; uint8 stage; uint8 Difficulty; + uint8 beasts; + Unit* MarkTarget; void Reset() { if(!pInstance) return; Difficulty = pInstance->GetData(TYPE_DIFFICULTY); pInstance->SetData(TYPE_SAURFANG, NOT_STARTED); - m_uiIsFrenzy = false; stage = 0; + beasts = 0; bsw->resetTimers(); + MarkTarget = NULL; } void Aggro(Unit *who) { if(pInstance) pInstance->SetData(TYPE_SAURFANG, IN_PROGRESS); DoScriptText(-1631100,m_creature); + bsw->doCast(SPELL_BLOOD_LINK); } void JustReachedHome() @@ -85,6 +86,7 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI if (pInstance) pInstance->SetData(TYPE_SAURFANG, FAIL); } + void KilledUnit(Unit* pVictim) { switch (urand(0,1)) { @@ -95,12 +97,35 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI DoScriptText(-1631104,m_creature,pVictim); break; }; + + if (pVictim && pVictim->HasAura(SPELL_MARK)) + { + m_creature->ModifyHealth(m_creature->GetMaxHealth() * 0.05f); + pVictim->RemoveAurasDueToSpell(SPELL_MARK); + } + } + + void JustSummoned(Creature* summoned) + { + if(!pInstance || !summoned) return; + + if (Unit* pTarget= m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0) ) { + summoned->AddThreat(pTarget, 100.0f); + summoned->GetMotionMaster()->MoveChase(pTarget); + } } void JustDied(Unit *killer) { - if(pInstance) pInstance->SetData(TYPE_SAURFANG, DONE); + if(!pInstance) return; + pInstance->SetData(TYPE_SAURFANG, DONE); DoScriptText(-1631106,m_creature); + if (MarkTarget) MarkTarget->RemoveAurasDueToSpell(SPELL_MARK); + } + + void doBloodPower() + { + m_creature->ModifyPower(m_creature->getPowerType(), +1); } void UpdateAI(const uint32 diff) @@ -108,61 +133,58 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (!m_creature->HasAura(SPELL_BLOOD_POWER)) + bsw->doCast(SPELL_BLOOD_POWER); + switch(stage) { - case 0: { - break;} - case 1: { - if (!m_uiIsFrenzy) { - bsw->doCast(SPELL_FRENZY); - m_uiIsFrenzy = true; - stage = 2; - DoScriptText(-1631101,m_creature); - } - break;} - - case 2: { - break;} + case 0: + if (m_creature->GetHealthPercent() <= 30.0f) stage = 1; + break; + + case 1: + bsw->doCast(SPELL_FRENZY); + stage = 2; + DoScriptText(-1631101,m_creature); + break; + + case 2: + break; + + default: + break; } - bsw->timedCast(SPELL_BLOOD_LINK, diff); + if (bsw->timedQuery(SPELL_MARK, diff)) + { + if (MarkTarget) MarkTarget->RemoveAurasDueToSpell(SPELL_MARK); + + if (MarkTarget = bsw->SelectRandomPlayerAtRange(120.0f)) + if (bsw->doCast(SPELL_MARK, MarkTarget) == CAST_OK) + doBloodPower(); + } - bsw->timedCast(SPELL_BLOOD_NOVA, diff); + if (bsw->timedCast(SPELL_BLOOD_NOVA, diff) == CAST_OK) doBloodPower(); - bsw->timedCast(SPELL_BOILING_BLOOD, diff); + if (bsw->timedCast(SPELL_BOILING_BLOOD, diff) == CAST_OK) doBloodPower(); - bsw->timedCast(SPELL_RUNE_OF_BLOOD, diff); + if (bsw->timedCast(SPELL_RUNE_OF_BLOOD, diff) == CAST_OK) doBloodPower(); - if (bsw->timedQuery(SPELL_CALL_BLOOD_BEASTS, diff)) + if (bsw->timedQuery(SPELL_CALL_BLOOD_BEASTS, diff)) { - if (Unit* pTemp = bsw->doSummon(NPC_BLOOD_BEASTS)) - if (Unit* pTarget= m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0) ) { - pTemp->AddThreat(pTarget, 100.0f); - pTemp->GetMotionMaster()->MoveChase(pTarget); - }; - if (Unit* pTemp = bsw->doSummon(NPC_BLOOD_BEASTS)) - if (Unit* pTarget= m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0) ) { - pTemp->AddThreat(pTarget, 100.0f); - pTemp->GetMotionMaster()->MoveChase(pTarget); - }; - DoScriptText(-1631102,m_creature); if (Difficulty == RAID_DIFFICULTY_25MAN_NORMAL - || Difficulty == RAID_DIFFICULTY_25MAN_HEROIC) - { - if (Unit* pTemp = bsw->doSummon(NPC_BLOOD_BEASTS)) - if (Unit* pTarget= m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0) ) { - pTemp->AddThreat(pTarget, 100.0f); - pTemp->GetMotionMaster()->MoveChase(pTarget); - }; - if (Unit* pTemp = bsw->doSummon(NPC_BLOOD_BEASTS)) - if (Unit* pTarget= m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0) ) { - pTemp->AddThreat(pTarget, 100.0f); - pTemp->GetMotionMaster()->MoveChase(pTarget); - }; - } - } - - if (m_creature->GetHealthPercent() <= 30.0f && stage == 0) stage = 1; + || Difficulty == RAID_DIFFICULTY_25MAN_HEROIC) beasts = 4; + else beasts = 2; + + DoScriptText(-1631102,m_creature); + }; + + if (beasts > 0) + if (bsw->doCast(SPELL_CALL_BLOOD_BEASTS) == CAST_OK) + { + doBloodPower(); + --beasts; + }; if (bsw->timedQuery(SPELL_BERSERK, diff)){ bsw->doCast(SPELL_BERSERK); @@ -178,6 +200,63 @@ CreatureAI* GetAI_boss_deathbringer_saurfang(Creature* pCreature) return new boss_deathbringer_saurfangAI(pCreature); } +struct MANGOS_DLL_DECL mob_blood_beastAI : public ScriptedAI +{ + mob_blood_beastAI(Creature *pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); + Reset(); + } + + ScriptedInstance *pInstance; + Creature* pOwner; + bool scentcasted; + BossSpellWorker* bsw; + + void Reset() + { + pOwner = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_DEATHBRINGER_SAURFANG)); + bsw->resetTimers(); + bsw->doCast(SPELL_BLOOD_LINK_BEAST); + scentcasted = false; + } + void KilledUnit(Unit* pVictim) + { + if (pOwner && pOwner->isAlive()) + pOwner->ModifyHealth(pOwner->GetMaxHealth() * 0.05f); + if (pVictim && pVictim->HasAura(SPELL_MARK)) + pVictim->RemoveAurasDueToSpell(SPELL_MARK); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!pInstance || pInstance->GetData(TYPE_SAURFANG) != IN_PROGRESS) + m_creature->ForcedDespawn(); + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (!m_creature->HasAura(SPELL_RESISTANT_SKIN)) + bsw->doCast(SPELL_RESISTANT_SKIN); + + if (!scentcasted && (m_creature->GetHealthPercent() <= 20.0f)) + { + if (urand(0,1)) //50% + bsw->doCast(SPELL_SCENT_OF_BLOOD); + scentcasted = true; + } + + DoMeleeAttackIfReady(); + + } +}; + +CreatureAI* GetAI_mob_blood_beast(Creature* pCreature) +{ + return new mob_blood_beastAI(pCreature); +} + void AddSC_boss_deathbringer_saurfang() { Script *newscript; @@ -185,4 +264,9 @@ void AddSC_boss_deathbringer_saurfang() newscript->Name = "boss_deathbringer_saurfang"; newscript->GetAI = &GetAI_boss_deathbringer_saurfang; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_blood_beast"; + newscript->GetAI = &GetAI_mob_blood_beast; + newscript->RegisterSelf(); } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp index 691bb0c11..37488d312 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp @@ -46,6 +46,19 @@ enum BossSpells SPELL_VENGEFUL_BLAST = 71494, SPELL_VENGEFUL_BLAST_0 = 71544, + // summons + SPELL_FROST_FEVER = 71129, + SPELL_DEATHCHILL_BOLT = 70594, + SPELL_DEATHCHILL_BLAST = 70906, + SPELL_DARK_MARTYRDROM = 70903, + SPELL_CURSE_OF_TOPOR = 71237, + SPELL_SHORUD_OF_THE_OCCULUT = 70768, + SPELL_ADHERENTS_DETERMINIATION = 71234, + SPELL_SUMMON_VISUAL = 41236, + + SPELL_NECROTIC_STRIKE = 70659, + SPELL_SHADOW_CLEAVE = 70670, + SPELL_VAMPIRIC_MIGHT = 70674, }; static Locations SpawnLoc[]= @@ -143,26 +156,23 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI DoScriptText(-1631032,m_creature,killer); } + void JustSummoned(Creature* summoned) + { + if(!pInstance || !summoned) return; + + if (Unit* pTarget= m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0) ) { + summoned->AddThreat(pTarget, 100.0f); + } + } + void CallGuard(uint8 place) { if (place < 2) - { - if (Unit* pTemp = bsw->doSummon(urand(0,1) ? NPC_FANATIC : NPC_ADHERENT, SpawnLoc[3*place+1].x, SpawnLoc[3*place+1].y, SpawnLoc[3*place+1].z)) - if (Unit* pTarget= m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0) ) { - pTemp->AddThreat(pTarget, 100.0f); - pTemp->GetMotionMaster()->MoveChase(pTarget); - }; - if (Unit* pTemp = bsw->doSummon(urand(0,1) ? NPC_FANATIC : NPC_ADHERENT, SpawnLoc[3*place+3].x, SpawnLoc[3*place+3].y, SpawnLoc[3*place+3].z)) - if (Unit* pTarget= m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0) ) { - pTemp->AddThreat(pTarget, 100.0f); - pTemp->GetMotionMaster()->MoveChase(pTarget); - }; - } - if (Unit* pTemp = bsw->doSummon(urand(0,1) ? NPC_FANATIC : NPC_ADHERENT, SpawnLoc[3*place+2].x, SpawnLoc[3*place+2].y, SpawnLoc[3*place+2].z)) - if (Unit* pTarget= m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0) ) { - pTemp->AddThreat(pTarget, 100.0f); - pTemp->GetMotionMaster()->MoveChase(pTarget); - }; + { + bsw->doSummon(urand(0,1) ? NPC_FANATIC : NPC_ADHERENT, SpawnLoc[3*place+1].x, SpawnLoc[3*place+1].y, SpawnLoc[3*place+1].z); + bsw->doSummon(urand(0,1) ? NPC_FANATIC : NPC_ADHERENT, SpawnLoc[3*place+3].x, SpawnLoc[3*place+3].y, SpawnLoc[3*place+3].z); + } + bsw->doSummon(urand(0,1) ? NPC_FANATIC : NPC_ADHERENT, SpawnLoc[3*place+2].x, SpawnLoc[3*place+2].y, SpawnLoc[3*place+2].z); } void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) @@ -258,13 +268,17 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI switch (urand(0,1)) { case 0: if(Creature *pGuard = GetClosestCreatureWithEntry(m_creature, NPC_FANATIC, 100.0f)) - bsw->doCast(SPELL_DARK_EMPOWERMENT, pGuard); - DoScriptText(-1631026,m_creature); + { + bsw->doCast(SPELL_DARK_EMPOWERMENT, pGuard); + DoScriptText(-1631026,m_creature); + }; break; case 1: if(Creature *pGuard = GetClosestCreatureWithEntry(m_creature, NPC_ADHERENT, 100.0f)) - bsw->doCast(SPELL_DARK_EMPOWERMENT, pGuard); - DoScriptText(-1631027,m_creature); + { + bsw->doCast(SPELL_DARK_EMPOWERMENT, pGuard); + DoScriptText(-1631027,m_creature); + }; break; } } @@ -322,6 +336,11 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI } }; +CreatureAI* GetAI_boss_lady_deathwhisper(Creature* pCreature) +{ + return new boss_lady_deathwhisperAI(pCreature); +} + struct MANGOS_DLL_DECL mob_vengeful_shadeAI : public ScriptedAI { mob_vengeful_shadeAI(Creature *pCreature) : ScriptedAI(pCreature) @@ -379,10 +398,107 @@ CreatureAI* GetAI_mob_vengeful_shade(Creature* pCreature) return new mob_vengeful_shadeAI(pCreature); } +struct MANGOS_DLL_DECL mob_cult_adherentAI : public ScriptedAI +{ + mob_cult_adherentAI(Creature *pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); + Reset(); + } -CreatureAI* GetAI_boss_lady_deathwhisper(Creature* pCreature) + ScriptedInstance *pInstance; + BossSpellWorker* bsw; + bool bone; + + void Reset() + { + bsw->resetTimers(); + bsw->doCast(SPELL_SUMMON_VISUAL); + bone = false; + } + + void Aggro(Unit *who) + { + bsw->doCast(SPELL_SHORUD_OF_THE_OCCULUT); + DoStartMovement(who, 20.0f); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!pInstance || pInstance->GetData(TYPE_DEATHWHISPER) != IN_PROGRESS) + m_creature->ForcedDespawn(); + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + bsw->timedCast(SPELL_FROST_FEVER, uiDiff); + + bsw->timedCast(SPELL_DEATHCHILL_BOLT, uiDiff); + + bsw->timedCast( SPELL_DEATHCHILL_BLAST, uiDiff); + + if (m_creature->GetHealthPercent() < 15.0f && !bone) + { + if (!urand(0,3)) bsw->doCast(SPELL_DARK_MARTYRDROM); //30% + bone = true; + } + } +}; + +CreatureAI* GetAI_mob_cult_adherent(Creature* pCreature) { - return new boss_lady_deathwhisperAI(pCreature); + return new mob_cult_adherentAI(pCreature); +} + +struct MANGOS_DLL_DECL mob_cult_fanaticAI : public ScriptedAI +{ + mob_cult_fanaticAI(Creature *pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); + Reset(); + } + + ScriptedInstance *pInstance; + BossSpellWorker* bsw; + bool bone; + + void Reset() + { + bsw->resetTimers(); + bone = false; + } + + void Aggro(Unit *who) + { + bsw->doCast(SPELL_VAMPIRIC_MIGHT); + DoStartMovement(who); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!pInstance || pInstance->GetData(TYPE_DEATHWHISPER) != IN_PROGRESS) + m_creature->ForcedDespawn(); + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + bsw->timedCast(SPELL_NECROTIC_STRIKE, uiDiff); + + bsw->timedCast(SPELL_SHADOW_CLEAVE, uiDiff); + + if (m_creature->GetHealthPercent() < 15.0f && !bone) + { + if (!urand(0,3)) bsw->doCast(SPELL_DARK_MARTYRDROM); //30% + bone = true; + } + } +}; + +CreatureAI* GetAI_mob_cult_fanatic(Creature* pCreature) +{ + return new mob_cult_fanaticAI(pCreature); } void AddSC_boss_lady_deathwhisper() @@ -397,4 +513,14 @@ void AddSC_boss_lady_deathwhisper() newscript->Name = "mob_vengeful_shade"; newscript->GetAI = &GetAI_mob_vengeful_shade; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_cult_adherent"; + newscript->GetAI = &GetAI_mob_cult_adherent; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_cult_fanatic"; + newscript->GetAI = &GetAI_mob_cult_fanatic; + newscript->RegisterSelf(); } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp index 44c87eec4..5f0c1abb5 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: boss_lord_marrowgar -SD%Complete: 60% +SD%Complete: 70% SDComment: by /dev/rsa SDCategory: Icecrown Citadel EndScriptData */ @@ -56,11 +56,13 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI BossSpellWorker* bsw; uint8 stage; bool intro; + uint8 flames; void Reset() { if(pInstance) pInstance->SetData(TYPE_MARROWGAR, NOT_STARTED); stage = 0; + flames = 0; bsw->resetTimers(); } @@ -76,13 +78,6 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI if (pInstance) pInstance->SetData(TYPE_MARROWGAR, FAIL); } -/* - void JustSummoned(Creature* _summoned) - { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,1)) - _summoned->AddThreat(target); - } -*/ void Aggro(Unit *who) { if(!pInstance) return; @@ -115,7 +110,7 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI switch(stage) { - case 0: { + case 0: if (bsw->timedQuery(SPELL_BONE_STRIKE, diff)) if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) if (bsw->doCast(SPELL_BONE_STRIKE, pTarget) == CAST_OK) @@ -136,45 +131,52 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI m_creature->GetPosition(fPosX, fPosY, fPosZ); if (Unit* pSpike = bsw->doSummon(NPC_BONE_SPIKE, fPosX, fPosY, fPosZ)) pSpike->AddThreat(pTarget, 100.0f); - } - break;} + }; + if (m_creature->GetHealthPercent() <= 30.0f) stage = 1; + + if (bsw->timedQuery(SPELL_CALL_COLD_FLAME, diff)) flames = 2; - case 1: { + bsw->timedCast(SPELL_SABER_LASH, diff); + + DoMeleeAttackIfReady(); + + break; + case 1: m_creature->InterruptNonMeleeSpells(true); bsw->doCast(SPELL_BONE_STORM); stage = 2; DoScriptText(-1631002,m_creature); - break;} + break; + case 2: - case 2: { - if (!bsw->hasAura(SPELL_BONE_STORM, m_creature)) stage = 3; -// else bsw->timedCast(SPELL_BONE_STORM_STRIKE, diff); -// insert to this damage override from bone storm - break;} + if (bsw->timedQuery(SPELL_BONE_STORM, diff)) stage = 3; - case 3: break; - } + bsw->timedCast(SPELL_BONE_STORM_STRIKE, diff); - bsw->timedCast(SPELL_SABER_LASH, diff); + break; - if (bsw->timedQuery(SPELL_CALL_COLD_FLAME, diff)) - { - bsw->doCast(SPELL_CALL_COLD_FLAME); - bsw->doCast(SPELL_CALL_COLD_FLAME_1); - } + case 3: + bsw->timedCast(SPELL_SABER_LASH, diff); + DoMeleeAttackIfReady(); -// if (bsw->timedQuery(NPC_COLDFLAME, diff)) -// bsw->doSummon(NPC_COLDFLAME, TEMPSUMMON_TIMED_DESPAWN, 60000); + if (bsw->timedQuery(SPELL_CALL_COLD_FLAME, diff)) flames = 4; - if (m_creature->GetHealthPercent() <= 30.0f && stage == 0) stage = 1; + break; + } + + if (flames > 0) + { + if (urand(0,1)) bsw->doCast(SPELL_CALL_COLD_FLAME); + else bsw->doCast(SPELL_CALL_COLD_FLAME_1); + --flames; + }; if (bsw->timedQuery(SPELL_BERSERK, diff)) { - bsw->doCast(SPELL_BERSERK); - DoScriptText(-1631008,m_creature); + bsw->doCast(SPELL_BERSERK); + DoScriptText(-1631008,m_creature); } - DoMeleeAttackIfReady(); } }; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp index 7d2d75615..d4b65da9a 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp @@ -277,6 +277,7 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI case 3: stage = 4; IceBlock(); + m_creature->SetOrientation(3.1f); break; case 4: if (bsw->timedQuery(SPELL_FROST_BOMB, diff)) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp index 86111a24f..55041ca87 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: boss_the_lich_king -SD%Complete: 5% +SD%Complete: 40% SDComment: by /dev/rsa SDCategory: Icecrown Citadel EndScriptData */ @@ -55,7 +55,7 @@ enum BossSpells SPELL_QUAKE = 72262, //Raging spirit - SPELL_SUMMON_RAGING_SPIRIT = 69200, + SPELL_SUMMON_RAGING_SPIRIT = 69201, // triggered SPELL_SOUL_SHRIEK = 69242, //Ice sphere @@ -96,7 +96,7 @@ enum BossSpells enum Common { - FINAL_BATTLE_MOVIE = 14, + FINAL_ARTHAS_MOVIE = 16, }; static Locations SpawnLoc[]= @@ -107,13 +107,8 @@ static Locations SpawnLoc[]= {481.69797f, -2124.638184f, 1040.860107f}, // 3 Tirion 2 {498.00448f, -2201.573486f, 1046.093872f}, // 4 Valkyrs? {517.48291f, -2124.905762f, 1040.861328f}, // 5 Tirion? - {959.996f, 212.576f, 193.843f}, - {932.537f, 231.813f, 193.838f}, - {958.675f, 254.767f, 193.822f}, - {946.955f, 201.316f, 192.535f}, - {944.294f, 149.676f, 197.551f}, - {930.548f, 284.888f, 193.367f}, - {965.997f, 278.398f, 195.777f}, + {529.85302f, -2124.709961f, 1040.859985f}, // 6 Lich king final, o=3.1146 + {520.311f, -2124.709961f, 1040.859985f}, // 7 Frostmourne }; struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI @@ -133,25 +128,32 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI uint32 UpdateTimer; bool movementstarted; bool battlestarted; + bool finalphase; Creature* pTirion; Creature* pFrostmourne; void Reset() { if(!pInstance) return; - pInstance->SetData(TYPE_LICH_KING, NOT_STARTED); bsw->resetTimers(); stage = 0; nextEvent = 0; nextPoint = 0; movementstarted = false; battlestarted = false; + finalphase = false; } void MoveInLineOfSight(Unit* pWho) { } + void EnterEvadeMode() + { + if (!pInstance) return; + if (finalphase) return; + } + void MovementInform(uint32 type, uint32 id) { if (type != POINT_MOTION_TYPE || !movementstarted) return; @@ -204,7 +206,12 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI void JustDied(Unit *killer) { - if(pInstance) pInstance->SetData(TYPE_LICH_KING, DONE); + if(!pInstance) return; + pInstance->SetData(TYPE_LICH_KING, DONE); + DoScriptText(-1631528,m_creature,killer); + + pInstance->SetData(TYPE_EVENT,14010); + } void UpdateAI(const uint32 diff) @@ -232,7 +239,7 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI case 12040: m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_READY2H); DoScriptText(-1631503, m_creature); - UpdateTimer = 3000; + UpdateTimer = 8000; pInstance->SetData(TYPE_EVENT,12041); break; case 12041: @@ -278,9 +285,17 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI pInstance->SetData(TYPE_EVENT,12220); break; case 13000: + m_creature->SetOrientation(3.1146f); DoScriptText(-1631507, m_creature); - UpdateTimer = 10000; + UpdateTimer = 8000; + finalphase = true; + bsw->doCast(SPELL_FURY_OF_FROSTMOURNE); pInstance->SetData(TYPE_EVENT,13020); + if (pTirion = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_TIRION))) { + m_creature->SetInCombatWith(pTirion); + pTirion->AddThreat(m_creature, 1000.0f); + } + m_creature->SetInCombatWithZone(); break; case 13020: DoScriptText(-1631508, m_creature); @@ -289,51 +304,56 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI break; case 13060: DoScriptText(-1631509, m_creature); - UpdateTimer = 10000; + UpdateTimer = 12000; pInstance->SetData(TYPE_EVENT,13100); break; case 13100: DoScriptText(-1631510, m_creature); - UpdateTimer = 8000; + UpdateTimer = 12000; pInstance->SetData(TYPE_EVENT,13110); bsw->doCast(SPELL_CHANNEL_KING); break; case 13120: DoScriptText(-1631511, m_creature); - UpdateTimer = 2000; + UpdateTimer = 12000; pInstance->SetData(TYPE_EVENT,13130); break; case 13140: - UpdateTimer = 2000; + UpdateTimer = 6000; bsw->doRemove(SPELL_CHANNEL_KING); pInstance->SetData(TYPE_EVENT,13150); m_creature->CastSpell(m_creature, SPELL_SUMMON_BROKEN_FROSTMOURNE, false); break; case 13160: - UpdateTimer = 2000; + UpdateTimer = 6000; pInstance->SetData(TYPE_EVENT,13170); m_creature->CastSpell(m_creature, SPELL_SUMMON_BROKEN_FROSTMOURNE_2, false); break; case 13180: - UpdateTimer = 2000; + UpdateTimer = 8000; pInstance->SetData(TYPE_EVENT,13190); - pFrostmourne = m_creature->SummonCreature(NPC_FROSTMOURNE, m_creature->GetPositionX()+2, m_creature->GetPositionY()+2, m_creature->GetPositionZ(), 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); - pFrostmourne->CastSpell(pFrostmourne, SPELL_BROKEN_FROSTMOURNE, false); - pFrostmourne->CastSpell(pFrostmourne, SPELL_FROSTMOURNE_TRIGGER, false); - pFrostmourne->GetMotionMaster()->MoveChase(m_creature); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISARMED); + if (pFrostmourne = m_creature->SummonCreature(NPC_FROSTMOURNE, SpawnLoc[7].x, SpawnLoc[7].y, SpawnLoc[7].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000)) + { + pFrostmourne->CastSpell(pFrostmourne, SPELL_BROKEN_FROSTMOURNE, false); + pFrostmourne->CastSpell(pFrostmourne, SPELL_FROSTMOURNE_TRIGGER, false); + pFrostmourne->GetMotionMaster()->MoveChase(m_creature); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISARMED); + } break; case 13200: DoScriptText(-1631512, m_creature); m_creature->RemoveAurasDueToSpell(SPELL_SUMMON_BROKEN_FROSTMOURNE); m_creature->RemoveAllAuras(); - UpdateTimer = 2000; + UpdateTimer = 5000; pInstance->SetData(TYPE_EVENT,13210); break; case 13280: UpdateTimer = 2000; - pInstance->SetData(TYPE_EVENT,132900); + pInstance->SetData(TYPE_EVENT,13290); stage = 12; + if (pFrostmourne) pFrostmourne->ForcedDespawn(); + SetCombatMovement(true); + battlestarted = true; break; default: break; @@ -342,7 +362,7 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI pInstance->SetData(TYPE_EVENT_TIMER, UpdateTimer); } - if (battlestarted && !m_creature->SelectHostileTarget()) + if (battlestarted && !m_creature->SelectHostileTarget() && !finalphase) { battlestarted = false; pInstance->SetData(TYPE_LICH_KING, FAIL); @@ -405,11 +425,16 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_ICESHARD_2)); pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_ICESHARD_3)); pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_ICESHARD_4)); - stage = 4; + if (GameObject* pGoFloor = pInstance->instance->GetGameObject(pInstance->GetData64(GO_FROSTY_WIND))) + { +// pGoFloor->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK_10 | GO_FLAG_NODESPAWN); +// pGoFloor->SetUInt32Value(GAMEOBJECT_BYTES_1,8449); + } DoScriptText(-1631524, m_creature); m_creature->GetMotionMaster()->Clear(); m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); SetCombatMovement(true); + stage = 4; }; break; @@ -508,14 +533,10 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI break; case 9: // Ending Phase start m_creature->AttackStop(); - if (pTirion = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_TIRION))) { - m_creature->SetInCombatWith(pTirion); - pTirion->AddThreat(m_creature, 1000.0f); - } - bsw->doCast(SPELL_FURY_OF_FROSTMOURNE); SetCombatMovement(false); - StartMovement(1,13000); + StartMovement(6,13000); stage = 10; + battlestarted = false; break; case 10: break; @@ -576,11 +597,21 @@ struct MANGOS_DLL_DECL boss_tirion_iccAI : public ScriptedAI } } + void doSendCinematic() + { + Map::PlayerList const &pList = m_creature->GetMap()->GetPlayers(); + if (pList.isEmpty()) return; + for (Map::PlayerList::const_iterator i = pList.begin(); i != pList.end(); ++i) + if (Player* pPlayer = i->getSource()) + if (pPlayer) + pPlayer->SendMovieStart(FINAL_ARTHAS_MOVIE); + } + void doRevivePlayers() { - Map::PlayerList const &PlList = pMenethil->GetMap()->GetPlayers(); - if (PlList.isEmpty()) return; - for (Map::PlayerList::const_iterator i = PlList.begin(); i != PlList.end(); ++i) + Map::PlayerList const &pList = pMenethil->GetMap()->GetPlayers(); + if (pList.isEmpty()) return; + for (Map::PlayerList::const_iterator i = pList.begin(); i != pList.end(); ++i) { if (Player* pPlayer = i->getSource()) { @@ -639,14 +670,15 @@ struct MANGOS_DLL_DECL boss_tirion_iccAI : public ScriptedAI break; case 13110: DoScriptText(-1631555, m_creature); - UpdateTimer = 2000; + UpdateTimer = 5000; m_creature->CastSpell(m_creature, SPELL_TIRION_LIGHT, false); pInstance->SetData(TYPE_EVENT,13120); break; case 13130: SetCombatMovement(false); m_creature->RemoveAurasDueToSpell(SPELL_ICEBLOCK_TRIGGER); - UpdateTimer = 2000; + UpdateTimer = 500; + m_creature->SetOrientation(0.0f); pInstance->SetData(TYPE_EVENT,13131); break; case 13131: @@ -687,17 +719,60 @@ struct MANGOS_DLL_DECL boss_tirion_iccAI : public ScriptedAI pMenethil->CastSpell(pMenethil, SPELL_REVIVE_VISUAL, false); doRevivePlayers(); break; - case 13270: UpdateTimer = 6000; pInstance->SetData(TYPE_EVENT,13280); if (Creature* pLichKing = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_LICH_KING))) { + m_creature->SetInCombatWith(pLichKing); + pLichKing->SetInCombatWith(m_creature); + pLichKing->AddThreat(m_creature, 1000.0f); m_creature->AI()->AttackStart(pLichKing); pMenethil->AI()->AttackStart(pLichKing); + SetCombatMovement(true); + m_creature->GetMotionMaster()->MoveChase(pLichKing); + pLichKing->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); }; // DoScriptText(-1631560, m_creature); break; + case 13290: + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT,13310); + DoScriptText(-1631590, pMenethil); + break; + case 13310: + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT,13330); + DoScriptText(-1631591, m_creature); + break; + case 13330: + UpdateTimer = 5000; + pInstance->SetData(TYPE_EVENT,13350); + DoScriptText(-1631592, pMenethil); + break; + case 13350: + UpdateTimer = 2000; + pInstance->SetData(TYPE_EVENT,13370); + DoScriptText(-1631593, m_creature); + break; + case 14010: + m_creature->AttackStop(); + SetCombatMovement(false); + UpdateTimer =90000; + pInstance->SetData(TYPE_EVENT,14030); + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE); + doSendCinematic(); + break; + case 14030: + UpdateTimer = 20000; + pInstance->SetData(TYPE_EVENT,14030); + DoScriptText(-1631594, m_creature); + pMenethil->ForcedDespawn(); + EnterEvadeMode(); + pInstance->SetData(TYPE_EVENT,0); + if (Creature* pLichKing = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_LICH_KING))) + pLichKing->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); + break; default: break; } @@ -720,7 +795,11 @@ bool GossipHello_boss_tirion_icc(Player* pPlayer, Creature* pCreature) pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); if (pInstance->GetData(TYPE_LICH_KING) != NOT_STARTED && - pInstance->GetData(TYPE_LICH_KING) != FAIL ) return false; + pInstance->GetData(TYPE_LICH_KING) != FAIL ) + { + pPlayer->PlayerTalkClass->SendGossipMenu(721002, pCreature->GetGUID()); + return true; + }; char const* _message; @@ -827,6 +906,7 @@ struct MANGOS_DLL_DECL mob_defiler_iccAI : public ScriptedAI ScriptedInstance *m_pInstance; uint32 life_timer; + float m_Size; void Reset() { @@ -835,6 +915,7 @@ struct MANGOS_DLL_DECL mob_defiler_iccAI : public ScriptedAI m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); m_creature->CastSpell(m_creature, SPELL_DEFILE, true); + m_Size = m_creature->GetFloatValue(OBJECT_FIELD_SCALE_X); } void AttackStart(Unit *pWho) @@ -842,6 +923,17 @@ struct MANGOS_DLL_DECL mob_defiler_iccAI : public ScriptedAI return; } + bool doSearchPlayers() + { + Map::PlayerList const &pList = m_creature->GetMap()->GetPlayers(); + if (pList.isEmpty()) return false; + for (Map::PlayerList::const_iterator i = pList.begin(); i != pList.end(); ++i) + if (Player* pPlayer = i->getSource()) + if (pPlayer && pPlayer->isAlive()) + if(m_creature->IsWithinDistInMap(pPlayer, 0.1f)) return true; + return false; + } + void UpdateAI(const uint32 uiDiff) { if(m_pInstance && m_pInstance->GetData(TYPE_LICH_KING) != IN_PROGRESS) @@ -850,6 +942,15 @@ struct MANGOS_DLL_DECL mob_defiler_iccAI : public ScriptedAI if (life_timer <= uiDiff) m_creature->ForcedDespawn(); else life_timer -= uiDiff; + + // Override especially for clean core + if (m_Size >= 6.0f) m_creature->ForcedDespawn(); + + if (doSearchPlayers()) { + m_Size = m_Size*1.01; + m_creature->SetFloatValue(OBJECT_FIELD_SCALE_X, m_Size); + } + } }; @@ -908,6 +1009,7 @@ struct MANGOS_DLL_DECL mob_vile_spiritAI : public ScriptedAI void Reset() { + bsw->resetTimers(); if (Unit* pTarget = bsw->SelectRandomPlayerAtRange(120.0f)) { m_creature->SetInCombatWith(pTarget); @@ -950,6 +1052,41 @@ CreatureAI* GetAI_mob_vile_spirit(Creature* pCreature) return new mob_vile_spiritAI(pCreature); } +struct MANGOS_DLL_DECL mob_raging_spiritAI : public ScriptedAI +{ + mob_raging_spiritAI(Creature *pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); + Reset(); + } + + ScriptedInstance *pInstance; + BossSpellWorker* bsw; + + void Reset() + { + bsw->resetTimers(); + m_creature->SetDisplayId(10771); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!pInstance || pInstance->GetData(TYPE_LICH_KING) != IN_PROGRESS) + m_creature->ForcedDespawn(); + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + bsw->timedCast(SPELL_SOUL_SHRIEK, uiDiff); + } +}; + +CreatureAI* GetAI_mob_raging_spirit(Creature* pCreature) +{ + return new mob_raging_spiritAI(pCreature); +} + void AddSC_boss_lich_king_icc() { Script *newscript; @@ -986,4 +1123,9 @@ void AddSC_boss_lich_king_icc() newscript->GetAI = &GetAI_mob_vile_spirit; newscript->RegisterSelf(); + newscript = new Script; + newscript->Name = "mob_raging_spirit"; + newscript->GetAI = &GetAI_mob_raging_spirit; + newscript->RegisterSelf(); + }; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp index e0b7212fd..0634a73bf 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp @@ -617,6 +617,14 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance case 13250: case 13270: case 13290: + case 13310: + case 13330: + case 13350: + case 13370: + case 14010: + case 14030: + case 14050: + case 14070: return NPC_TIRION; break; @@ -644,6 +652,10 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance case 13200: case 13220: case 13240: + case 13260: + case 13280: + case 13300: + case 14000: return NPC_LICH_KING; break; case 500: From 3cfeca5c21672cffbfa894eeeb531dcfade65ddc Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Fri, 11 Jun 2010 16:42:28 +0400 Subject: [PATCH 344/405] ICC part 37 - Lanathel rewrite (may be unstable) --- addition/721_icecrown_scriptdev2.sql | 2 +- .../721_icecrown_spelltable_scriptdev2.sql | 9 +- .../boss_blood_queen_lanathel.cpp | 217 ++++++++++++++++-- .../boss_deathbringer_saurfang.cpp | 6 +- .../instance_icecrown_spire.cpp | 8 +- 5 files changed, 213 insertions(+), 29 deletions(-) diff --git a/addition/721_icecrown_scriptdev2.sql b/addition/721_icecrown_scriptdev2.sql index 43bc90330..bc241779f 100644 --- a/addition/721_icecrown_scriptdev2.sql +++ b/addition/721_icecrown_scriptdev2.sql @@ -103,7 +103,7 @@ INSERT INTO `script_texts` (`entry`,`content_loc8`, `content_default`, `sound`, ('-1631327','Начинаем представление!','Here it comes.','16788','6','0','0','Lanathel Special 03'), ('-1631328','Не повезло...','How... Unfortunate...','16789','6','0','0','Lanathel Reset'), ('-1631329','Нет. Моя прелесть, приятного аппетита!','Yes... feed my precious one! You\'re mine now!','16790','6','0','0','Lanathel Mind Control'), -('-1631330','Вот как... У тебя не поучилось?','Really...? Is that all you\'ve got?','16791','6','0','0','Lanathel Slay 01'), +('-1631330','Вот как... У тебя не получилось?','Really...? Is that all you\'ve got?','16791','6','0','0','Lanathel Slay 01'), ('-1631331','Какая жалость...','Such a pity!','16792','6','0','0','Lanathel Slay 02'), ('-1631332','Сейчас все кончится!','THIS! ENDS! NOW!','16793','6','0','0','Lanathel Berserk'), ('-1631333','Но... Мы ведь так хорошо ладили...','But... we were getting along... so well...','16794','6','0','0','Lanathel Death'), diff --git a/addition/721_icecrown_spelltable_scriptdev2.sql b/addition/721_icecrown_spelltable_scriptdev2.sql index d81353e71..6708845e1 100644 --- a/addition/721_icecrown_spelltable_scriptdev2.sql +++ b/addition/721_icecrown_spelltable_scriptdev2.sql @@ -225,17 +225,18 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ DELETE FROM `boss_spell_table` WHERE `entry` = 37955; INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES (37955, 72981, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 1, 0, 0), -(37955, 71623, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), -(37955, 70821, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), -(37955, 71510, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(37955, 71623, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 6, 0, 0), +(37955, 70821, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 6, 0, 0), +(37955, 71510, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 6, 0, 0), (37955, 71726, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), (37955, 70867, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), (37955, 70923, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), (37955, 71340, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), (37955, 71264, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), (37955, 71446, 0, 0, 0, 5000, 0, 0, 0, 8000, 0, 0, 0, 0, 0, 0, 4, 0, 0), -(37955, 71772, 0, 0, 0, 120000, 0, 0, 0, 150000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(37955, 71772, 0, 0, 0, 90000, 0, 0, 0, 90000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (37955, 47008, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(37955, 57764, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 1, 0), (37955, 71952, 0, 0, 0, 5000, 0, 0, 0, 8000, 0, 0, 0, 0, 0, 0, 1, 0, 0); -- Valithria diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp index 41254658e..3a947f0a2 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp @@ -42,10 +42,19 @@ enum BossSpells SPELL_BLOODBOLT_WHIRL = 71772, SPELL_PRESENCE_OF_DARKFALLEN = 71952, + SPELL_FLY_VISUAL = 57764, + NPC_SWARMING_SHADOWS = 38163, SPELL_SWARMING_SHADOWS_VISUAL = 71267, }; +static Locations SpawnLoc[]= +{ + {4595.640137f, 2769.195557f, 400.137054f}, // 0 Phased + {4595.904785f, 2769.315918f, 421.838623f}, // 1 Fly +}; + + struct MANGOS_DLL_DECL boss_blood_queen_lanathelAI : public ScriptedAI { boss_blood_queen_lanathelAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -58,7 +67,14 @@ struct MANGOS_DLL_DECL boss_blood_queen_lanathelAI : public ScriptedAI ScriptedInstance *pInstance; BossSpellWorker* bsw; uint8 stage; + uint8 nextPoint; + uint8 bloodbolts; uint32 UpdateTimer; + bool movementstarted; + Unit* MirrorMarked; + Unit* MirrorTarget; + Unit* Darkfallen[5]; + uint8 darkfallened; void Reset() { @@ -66,7 +82,15 @@ struct MANGOS_DLL_DECL boss_blood_queen_lanathelAI : public ScriptedAI pInstance->SetData(TYPE_LANATHEL, NOT_STARTED); stage = 0; UpdateTimer = 1000; + bloodbolts = 0; + movementstarted = false; + MirrorMarked = NULL; + MirrorTarget = NULL; bsw->resetTimers(); + memset(&Darkfallen, 0, sizeof(Darkfallen)); + darkfallened = 0; + m_creature->SetUInt32Value(UNIT_FIELD_BYTES_0, 0); + m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); } void JustReachedHome() @@ -84,21 +108,111 @@ struct MANGOS_DLL_DECL boss_blood_queen_lanathelAI : public ScriptedAI DoScriptText(-1631331,m_creature,pVictim); break; } + + if (pVictim && pVictim->HasAura(SPELL_BLOOD_MIRROR_1)) + pVictim->RemoveAurasDueToSpell(SPELL_BLOOD_MIRROR_1); + + if (pVictim && pVictim->HasAura(SPELL_BLOOD_MIRROR_2)) + pVictim->RemoveAurasDueToSpell(SPELL_BLOOD_MIRROR_2); + } + + void MovementInform(uint32 type, uint32 id) + { + if (type != POINT_MOTION_TYPE || !movementstarted) return; + if (id == nextPoint) + { + movementstarted = false; + m_creature->GetMotionMaster()->MovementExpired(); + } + } + + void StartMovement(uint32 id) + { + nextPoint = id; + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MovePoint(id, SpawnLoc[id].x, SpawnLoc[id].y, SpawnLoc[id].z); + movementstarted = true; } void Aggro(Unit *who) { if(!pInstance) return; pInstance->SetData(TYPE_LANATHEL, IN_PROGRESS); + bsw->doCast(SPELL_SHROUD_OF_SORROW); - DoScriptText(-1631321,m_creature,who); + + DoScriptText(-1631321,m_creature,who); } void JustDied(Unit *killer) { if(!pInstance) return; pInstance->SetData(TYPE_LANATHEL, DONE); - DoScriptText(-1631333,m_creature,killer); + DoScriptText(-1631333,m_creature,killer); + } + + void doPactOfDarkfallen(bool command) + { + if (command) + { + uint8 num = urand(2,5); + for(uint8 i = 0; i <= num; ++i) + if (Unit* pTarget = bsw->SelectRandomPlayer(SPELL_PACT_OF_DARKFALLEN, false, 100.0f)) + { + Darkfallen[i] = pTarget; + bsw->doCast(SPELL_PACT_OF_DARKFALLEN,pTarget); + ++darkfallened; + }; + } + else if (darkfallened) + { + for(uint8 i = 0; i < darkfallened; ++i) + if (Darkfallen[i] && Darkfallen[i]->isAlive() && Darkfallen[i]->HasAura(SPELL_PACT_OF_DARKFALLEN)) + for(uint8 j = 0; j < darkfallened; ++j) + if (j != i && Darkfallen[j] && Darkfallen[j]->isAlive() && Darkfallen[j]->HasAura(SPELL_PACT_OF_DARKFALLEN)) + if (!Darkfallen[j]->IsWithinDistInMap(Darkfallen[i], 5.0f)) return; + + for(uint8 i = 0; i < darkfallened; ++i) + if (Darkfallen[i] && Darkfallen[i]->isAlive() && Darkfallen[i]->HasAura(SPELL_PACT_OF_DARKFALLEN)) + Darkfallen[i]->RemoveAurasDueToSpell(SPELL_PACT_OF_DARKFALLEN); + darkfallened = 0; + }; + } + + void doBloodMirror(bool command) + { + + if (MirrorMarked) + if (!MirrorMarked->isAlive() || !MirrorMarked->HasAura(SPELL_BLOOD_MIRROR_1)) + MirrorMarked = NULL; + + if (MirrorTarget) + if (!MirrorTarget->isAlive() || !MirrorTarget->HasAura(SPELL_BLOOD_MIRROR_2)) + MirrorTarget = NULL; + + if (!MirrorMarked && m_creature->getVictim()) + { + if (MirrorMarked = m_creature->getVictim()) + bsw->doCast(SPELL_BLOOD_MIRROR_1, MirrorMarked); + } + + if (!MirrorTarget) + { + if (MirrorTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,1)) + bsw->doCast(SPELL_BLOOD_MIRROR_2, MirrorTarget); + } + + } + + void DamageDeal(Unit* target, uint32 &damage) + { + if (target) + if (MirrorMarked) + if (MirrorMarked->isAlive()) + if (target == MirrorMarked) + if (MirrorTarget) + if (MirrorTarget->isAlive()) + m_creature->DealDamage(MirrorTarget, damage, NULL, SPELL_DIRECT_DAMAGE, SPELL_SCHOOL_MASK_SHADOW, NULL, false); } void UpdateAI(const uint32 diff) @@ -129,32 +243,104 @@ struct MANGOS_DLL_DECL boss_blood_queen_lanathelAI : public ScriptedAI switch(stage) { case 0: - bsw->timedCast(SPELL_VAMPIRIC_BITE,diff); - if (bsw->timedQuery(SPELL_BLOODBOLT_WHIRL,diff)) stage = 1; + + bsw->timedCast(SPELL_SWARMING_SHADOWS, diff); + + if (bsw->timedQuery(SPELL_TWILIGHT_BLOODBOLT, diff)) bloodbolts = 1; + + if (bsw->timedQuery(SPELL_DELRIOUS_SLASH, diff)) + if (Unit* pTarget= m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,1)) + bsw->doCast(SPELL_DELRIOUS_SLASH, pTarget); + + if (bsw->timedQuery(SPELL_PACT_OF_DARKFALLEN, diff)) + doPactOfDarkfallen(true); + + if (bsw->timedQuery(SPELL_VAMPIRIC_BITE,diff)) + { + switch (urand(0,1)) { + case 0: + DoScriptText(-1631322,m_creature); + break; + case 1: + DoScriptText(-1631323,m_creature); + break; + } + bsw->doCast(SPELL_VAMPIRIC_BITE); + } + + if (bsw->timedQuery(SPELL_BLOODBOLT_WHIRL,diff)) + { + stage = 1; + }; + + doBloodMirror(true); + + DoMeleeAttackIfReady(); + break; - case 1: - DoScriptText(-1631327,m_creature); - bsw->doCast(SPELL_BLOODBOLT_WHIRL); - stage = 0; + case 1: // Go in fly phase + m_creature->AttackStop(); + SetCombatMovement(false); + StartMovement(1); + bsw->doCast(SPELL_FLY_VISUAL); + m_creature->SetUInt32Value(UNIT_FIELD_BYTES_0, 50331648); + m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 50331648); + m_creature->AddSplineFlag(SPLINEFLAG_FLYING); + stage = 2; break; + case 2: + if (movementstarted) return; + DoScriptText(-1631327,m_creature); + stage = 3; + bsw->doCast(SPELL_BLOODBOLT_WHIRL); + return; + case 3: + if (bsw->timedQuery(SPELL_TWILIGHT_BLOODBOLT, diff)) bloodbolts = 5; + + if (bsw->timedQuery(SPELL_PACT_OF_DARKFALLEN, diff)) + doPactOfDarkfallen(true); + + bsw->timedCast(SPELL_SWARMING_SHADOWS, diff); + + if (bsw->timedQuery(SPELL_BLOODBOLT_WHIRL,diff)) + { + stage = 4; + DoScriptText(-1631325,m_creature); + }; + break; + case 4: // Go in grownd phase + m_creature->AttackStop(); + StartMovement(0); + stage = 5; + break; + case 5: + if (movementstarted) return; + DoScriptText(-1631325,m_creature); + bsw->doRemove(SPELL_FLY_VISUAL); + m_creature->SetUInt32Value(UNIT_FIELD_BYTES_0, 0); + m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); + m_creature->RemoveSplineFlag(SPLINEFLAG_FLYING); + stage = 0; + SetCombatMovement(true); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + return; default: break; } - bsw->timedCast(SPELL_DELRIOUS_SLASH, diff); - - bsw->timedCast(SPELL_TWILIGHT_BLOODBOLT, diff); + doPactOfDarkfallen(false); - bsw->timedCast(SPELL_PACT_OF_DARKFALLEN, diff); - - bsw->timedCast(SPELL_SWARMING_SHADOWS, diff); + if (bloodbolts > 0) + { + bsw->doCast(SPELL_TWILIGHT_BLOODBOLT); + --bloodbolts; + }; if (bsw->timedQuery(SPELL_BERSERK, diff)){ bsw->doCast(SPELL_BERSERK); DoScriptText(-1631332,m_creature); }; - DoMeleeAttackIfReady(); } }; @@ -178,7 +364,6 @@ struct MANGOS_DLL_DECL mob_swarming_shadowsAI : public ScriptedAI SetCombatMovement(false); // m_creature->SetDisplayId(29308); m_creature->GetMotionMaster()->MoveRandom(); -// m_ui_Timer = 30000; } void UpdateAI(const uint32 uiDiff) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp index 3483ee58b..5a2fd6e71 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp @@ -120,7 +120,8 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI if(!pInstance) return; pInstance->SetData(TYPE_SAURFANG, DONE); DoScriptText(-1631106,m_creature); - if (MarkTarget) MarkTarget->RemoveAurasDueToSpell(SPELL_MARK); + if (MarkTarget && MarkTarget->HasAura(SPELL_MARK)) + MarkTarget->RemoveAurasDueToSpell(SPELL_MARK); } void doBloodPower() @@ -157,7 +158,8 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI if (bsw->timedQuery(SPELL_MARK, diff)) { - if (MarkTarget) MarkTarget->RemoveAurasDueToSpell(SPELL_MARK); + if (MarkTarget && MarkTarget->HasAura(SPELL_MARK)) + MarkTarget->RemoveAurasDueToSpell(SPELL_MARK); if (MarkTarget = bsw->SelectRandomPlayerAtRange(120.0f)) if (bsw->doCast(SPELL_MARK, MarkTarget) == CAST_OK) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp index 0634a73bf..e12403f2b 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp @@ -128,9 +128,8 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance if (m_auiEncounter[2] == DONE) { if (GameObject* pGO = instance->GetGameObject(m_uiDeathWhisperElevatorGUID)) { - pGO->SetUInt32Value(GAMEOBJECT_LEVEL, 1); + pGO->SetUInt32Value(GAMEOBJECT_LEVEL, 0); pGO->SetGoState(GO_STATE_READY); - pGO->SetRespawnTime(MINUTE); } }; if (m_auiEncounter[5] == DONE) OpenDoor(m_uiSDoorOrangeGUID); @@ -447,11 +446,8 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance if (uiData == DONE) { if (GameObject* pGO = instance->GetGameObject(m_uiDeathWhisperElevatorGUID)) { - pGO->SetUInt32Value(GAMEOBJECT_LEVEL, 1); + pGO->SetUInt32Value(GAMEOBJECT_LEVEL, 0); pGO->SetGoState(GO_STATE_READY); -// pGO->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE); -// pGO->SetRespawnTime(MINUTE); -// pGOTemp->SetGoState(GO_STATE_ACTIVE); } } break; From a8626aa23a86d4f9c9a3f2d1c74b47496b8809a3 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Fri, 11 Jun 2010 21:42:29 +0400 Subject: [PATCH 345/405] ICC part 38 - changes by bugreports --- .../721_icecrown_spelltable_scriptdev2.sql | 1 + .../icecrown_citadel/boss_the_lich_king.cpp | 28 +++++++++++++------ .../boss_valithria_dreamwalker.cpp | 2 +- 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/addition/721_icecrown_spelltable_scriptdev2.sql b/addition/721_icecrown_spelltable_scriptdev2.sql index 6708845e1..5510f4b3d 100644 --- a/addition/721_icecrown_spelltable_scriptdev2.sql +++ b/addition/721_icecrown_spelltable_scriptdev2.sql @@ -312,6 +312,7 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ (36597, 72133, 0, 0, 0, 5000, 0, 0, 0, 10000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36597, 72262, 0, 0, 0, 60000, 0, 0, 0, 60000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36597, 69201, 0, 0, 0, 5000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 4, 0, 1), +(36597, 69200, 0, 0, 0, 5000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 4, 0, 0), (36597, 69242, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36597, 69103, 0, 0, 0, 3000, 0, 0, 0, 5000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36597, 69099, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp index 55041ca87..8aa7fa189 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp @@ -55,7 +55,8 @@ enum BossSpells SPELL_QUAKE = 72262, //Raging spirit - SPELL_SUMMON_RAGING_SPIRIT = 69201, // triggered +// SPELL_SUMMON_RAGING_SPIRIT = 69201, // triggered + SPELL_SUMMON_RAGING_SPIRIT = 69200, SPELL_SOUL_SHRIEK = 69242, //Ice sphere @@ -151,7 +152,7 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI void EnterEvadeMode() { if (!pInstance) return; - if (finalphase) return; + if (finalphase && pInstance->GetData(TYPE_LICH_KING) == IN_PROGRESS) return; } void MovementInform(uint32 type, uint32 id) @@ -181,6 +182,9 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI { if (!pInstance) return; pInstance->SetData(TYPE_LICH_KING, FAIL); + stage = 0; + battlestarted = false; + finalphase = false; } @@ -366,6 +370,7 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI { battlestarted = false; pInstance->SetData(TYPE_LICH_KING, FAIL); + m_creature->GetMotionMaster()->MoveTargetedHome(); EnterEvadeMode(); return; } @@ -863,11 +868,7 @@ struct MANGOS_DLL_DECL mob_ice_sphere_iccAI : public ScriptedAI void Reset() { - if (Unit* pTarget = bsw->SelectRandomPlayerAtRange(120.0f)) - { - m_creature->SetInCombatWith(pTarget); - m_creature->AddThreat(pTarget,100.0f); - } + bsw->resetTimers(); bsw->doCast(SPELL_ICE_SPHERE_VISUAL); m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); } @@ -879,7 +880,14 @@ struct MANGOS_DLL_DECL mob_ice_sphere_iccAI : public ScriptedAI m_creature->ForcedDespawn(); if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + { + if (Unit* pTarget = bsw->SelectRandomPlayerAtRange(120.0f)) + { + m_creature->SetInCombatWith(pTarget); + m_creature->AddThreat(pTarget,100.0f); + } return; + } if (m_creature->getVictim()->GetTypeId() != TYPEID_PLAYER) return; @@ -906,6 +914,7 @@ struct MANGOS_DLL_DECL mob_defiler_iccAI : public ScriptedAI ScriptedInstance *m_pInstance; uint32 life_timer; + float m_Size0; float m_Size; void Reset() @@ -915,7 +924,8 @@ struct MANGOS_DLL_DECL mob_defiler_iccAI : public ScriptedAI m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); m_creature->CastSpell(m_creature, SPELL_DEFILE, true); - m_Size = m_creature->GetFloatValue(OBJECT_FIELD_SCALE_X); + m_Size0 = m_creature->GetFloatValue(OBJECT_FIELD_SCALE_X); + m_Size = m_Size0; } void AttackStart(Unit *pWho) @@ -944,7 +954,7 @@ struct MANGOS_DLL_DECL mob_defiler_iccAI : public ScriptedAI else life_timer -= uiDiff; // Override especially for clean core - if (m_Size >= 6.0f) m_creature->ForcedDespawn(); + if (m_Size >= m_Size0 * 6.0f) m_creature->ForcedDespawn(); if (doSearchPlayers()) { m_Size = m_Size*1.01; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp index 73d800ca7..9ee6b3eda 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp @@ -221,7 +221,7 @@ struct MANGOS_DLL_DECL boss_valithria_dreamwalkerAI : public ScriptedAI intro = true; bsw->doCast(SPELL_IMMUNITY); } - if (!battlestarted && pWho->isAlive() && pWho->IsWithinDistInMap(m_creature, 15.0f)) { + if (!battlestarted && pWho->isAlive() && pWho->IsWithinDistInMap(m_creature, 40.0f)) { DoScriptText(-1631401,m_creature,pWho); battlestarted = true; pInstance->SetData(TYPE_VALITHRIA, IN_PROGRESS); From 49306dc7719638d89635e28093c3ecaadd0bcfb3 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Fri, 11 Jun 2010 22:29:40 +0400 Subject: [PATCH 346/405] Lich king EvadeMode() correct. Thanks to Selector. --- .../icecrown_citadel/boss_the_lich_king.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp index 8aa7fa189..e7d8e1db8 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp @@ -153,6 +153,17 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI { if (!pInstance) return; if (finalphase && pInstance->GetData(TYPE_LICH_KING) == IN_PROGRESS) return; + + m_creature->RemoveAllAuras(); + m_creature->DeleteThreatList(); + m_creature->CombatStop(true); + m_creature->LoadCreaturesAddon(); + if (m_creature->isAlive()) + m_creature->GetMotionMaster()->MoveTargetedHome(); + + m_creature->SetLootRecipient(NULL); + + Reset(); } void MovementInform(uint32 type, uint32 id) @@ -370,7 +381,6 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI { battlestarted = false; pInstance->SetData(TYPE_LICH_KING, FAIL); - m_creature->GetMotionMaster()->MoveTargetedHome(); EnterEvadeMode(); return; } From ed76aa9e5c7e0b53c1a7e710713a0e6a7530d30a Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sat, 12 Jun 2010 11:49:28 +0400 Subject: [PATCH 347/405] Changes by bugreports - thanks to Selector && MadMann --- addition/721_icecrown_mangos.sql | 4 +++ .../boss_blood_queen_lanathel.cpp | 25 +++++++++++++------ .../boss_deathbringer_saurfang.cpp | 2 +- .../boss_valithria_dreamwalker.cpp | 2 +- 4 files changed, 24 insertions(+), 9 deletions(-) diff --git a/addition/721_icecrown_mangos.sql b/addition/721_icecrown_mangos.sql index 2262d5797..5bd891fc1 100644 --- a/addition/721_icecrown_mangos.sql +++ b/addition/721_icecrown_mangos.sql @@ -99,9 +99,13 @@ UPDATE `creature_template` SET `ScriptName`='mob_swarming_shadows', `AIName`='' -- Valithria dreamwalker UPDATE `creature_template` SET `faction_A` = 35, `faction_H` = 35, `ScriptName`='boss_valithria_dreamwalker' WHERE `entry`= 36789; +UPDATE `creature_template` SET `faction_A` = 35, `faction_H` = 35 WHERE `entry`= 10067; +UPDATE `creature_template` SET `faction_A` = 35, `faction_H` = 35 WHERE `entry`= 10068; +UPDATE `creature_template` SET `faction_A` = 35, `faction_H` = 35 WHERE `entry`= 10069; UPDATE `creature_template` SET `faction_A` = 35, `faction_H` = 35, `ScriptName`='mob_nightmare_portal', `AIName`='' WHERE `entry`= 38429; UPDATE `creature_template` SET `ScriptName`='mob_mana_void', `AIName`='' WHERE `entry`= 38068; + UPDATE `gameobject_template` SET `faction` = '0',`data0` = '0' WHERE `gameobject_template`.`entry` IN (201375,201373); UPDATE `gameobject_template` SET `faction` = '114',`data0` = '0' WHERE `gameobject_template`.`entry` IN (201374); UPDATE `gameobject` SET `state` = '1' WHERE `id` IN (201374); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp index 3a947f0a2..9cb524ae1 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp @@ -114,6 +114,14 @@ struct MANGOS_DLL_DECL boss_blood_queen_lanathelAI : public ScriptedAI if (pVictim && pVictim->HasAura(SPELL_BLOOD_MIRROR_2)) pVictim->RemoveAurasDueToSpell(SPELL_BLOOD_MIRROR_2); + + for(uint8 i = 0; i < darkfallened; ++i) + if (Darkfallen[i] && Darkfallen[i] == pVictim) + { + Darkfallen[i] = NULL; + if (pVictim && pVictim->HasAura(SPELL_PACT_OF_DARKFALLEN)) + pVictim->RemoveAurasDueToSpell(SPELL_PACT_OF_DARKFALLEN); + } } void MovementInform(uint32 type, uint32 id) @@ -164,17 +172,20 @@ struct MANGOS_DLL_DECL boss_blood_queen_lanathelAI : public ScriptedAI ++darkfallened; }; } - else if (darkfallened) + else if (darkfallened > 0) { for(uint8 i = 0; i < darkfallened; ++i) - if (Darkfallen[i] && Darkfallen[i]->isAlive() && Darkfallen[i]->HasAura(SPELL_PACT_OF_DARKFALLEN)) - for(uint8 j = 0; j < darkfallened; ++j) - if (j != i && Darkfallen[j] && Darkfallen[j]->isAlive() && Darkfallen[j]->HasAura(SPELL_PACT_OF_DARKFALLEN)) - if (!Darkfallen[j]->IsWithinDistInMap(Darkfallen[i], 5.0f)) return; + if (Darkfallen[i]) + if (Darkfallen[i]->isAlive() && Darkfallen[i]->HasAura(SPELL_PACT_OF_DARKFALLEN)) + for(uint8 j = 0; j < darkfallened; ++j) + if (j != i && Darkfallen[j]) + if(Darkfallen[j]->isAlive() && Darkfallen[j]->HasAura(SPELL_PACT_OF_DARKFALLEN)) + if (!Darkfallen[j]->IsWithinDistInMap(Darkfallen[i], 5.0f)) return; for(uint8 i = 0; i < darkfallened; ++i) - if (Darkfallen[i] && Darkfallen[i]->isAlive() && Darkfallen[i]->HasAura(SPELL_PACT_OF_DARKFALLEN)) - Darkfallen[i]->RemoveAurasDueToSpell(SPELL_PACT_OF_DARKFALLEN); + if (Darkfallen[i]) + if (Darkfallen[i]->isAlive() && Darkfallen[i]->HasAura(SPELL_PACT_OF_DARKFALLEN)) + Darkfallen[i]->RemoveAurasDueToSpell(SPELL_PACT_OF_DARKFALLEN); darkfallened = 0; }; } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp index 5a2fd6e71..fe099b9ec 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp @@ -159,7 +159,7 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI if (bsw->timedQuery(SPELL_MARK, diff)) { if (MarkTarget && MarkTarget->HasAura(SPELL_MARK)) - MarkTarget->RemoveAurasDueToSpell(SPELL_MARK); + MarkTarget->RemoveAurasDueToSpell(SPELL_MARK); if (MarkTarget = bsw->SelectRandomPlayerAtRange(120.0f)) if (bsw->doCast(SPELL_MARK, MarkTarget) == CAST_OK) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp index 9ee6b3eda..536123515 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp @@ -86,7 +86,7 @@ struct MANGOS_DLL_DECL boss_valithria_dreamwalkerAI : public ScriptedAI void Reset() { if(!pInstance) return; - m_creature->SetHealth(m_creature->GetMaxHealth()/2); + m_creature->SetHealth(m_creature->GetMaxHealth()/2.0f); pInstance->SetData(TYPE_VALITHRIA, NOT_STARTED); bsw->resetTimers(); m_creature->SetRespawnDelay(7*DAY); From e2c9068d3e760e2d644276b5de6c444994b62d87 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sat, 12 Jun 2010 16:34:13 +0400 Subject: [PATCH 348/405] fix for crush in 57491 --- scripts/northrend/obsidian_sanctum/boss_sartharion.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp index 6b3f761e2..14d2e0d2f 100644 --- a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp +++ b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp @@ -1715,10 +1715,13 @@ struct MANGOS_DLL_DECL mob_flame_tsunamiAI : public ScriptedAI else m_uiMovementStartTimer -= uiDiff; + if (m_uiTickTimer < uiDiff) { + if (m_pDummyDamager) - m_pDummyDamager->CastSpell(m_pDummyDamager, SPELL_FLAME_TSUNAMI_DMG, false); + if (m_pDummyDamager->isAlive() && !m_pDummyDamager->HasAura(SPELL_FLAME_TSUNAMI_DMG_AURA)) + m_pDummyDamager->CastSpell(m_pDummyDamager, SPELL_FLAME_TSUNAMI_DMG_AURA, false); std::list lLavaBlazes; GetCreatureListWithEntryInGrid(lLavaBlazes, m_creature, NPC_LAVA_BLAZE, 6.0f); From 5f2ce1c9577d13d2642a05cb36e133187ce0c5b4 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sat, 12 Jun 2010 20:02:53 +0400 Subject: [PATCH 349/405] 72293 more offlike support. Thanks to Selector, VBB, Wowka321 --- README | 2 ++ .../721_icecrown_spelltable_scriptdev2.sql | 2 +- .../boss_blood_queen_lanathel.cpp | 2 ++ .../boss_deathbringer_saurfang.cpp | 28 ++++++++----------- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/README b/README index c9dd42eec..5de474248 100644 --- a/README +++ b/README @@ -28,10 +28,12 @@ In this repository you found this custom scripts: - An'kahet (by Tassadar) - Draktaron (by Tassadar) - Culling of Stratholme (by Maxxx2021) +- Obsidian Sanctum (by Maxxx2021) - Vault of Archavon (by Insider42) - Trial of the Crusader (by me) - Halls of reflection (partially, by me) - Icecrown Citadel (by me) +- Rubi Sanctum (placeholders, by me) - NPC special (by me, thanks for all) Attention please! In my project only correct Linux Makefile provided. diff --git a/addition/721_icecrown_spelltable_scriptdev2.sql b/addition/721_icecrown_spelltable_scriptdev2.sql index 5510f4b3d..147418b47 100644 --- a/addition/721_icecrown_spelltable_scriptdev2.sql +++ b/addition/721_icecrown_spelltable_scriptdev2.sql @@ -96,7 +96,7 @@ DELETE FROM `boss_spell_table` WHERE `entry` = 37813; INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES (37813, 72178, 0, 0, 0, 20000, 0, 0, 0, 15000, 0, 0, 0, 1, 0, 0), (37813, 72371, 0, 0, 0, 3000, 0, 0, 0, 5000, 0, 0, 0, 1, 0, 0), -(37813, 72293, 0, 0, 0, 25000, 0, 0, 0, 35000, 0, 0, 0, 4, 0, 0), +(37813, 72293, 0, 0, 0, 35000, 0, 0, 0, 45000, 0, 0, 0, 6, 0, 0), (37813, 72737, 0, 0, 0, 15000, 0, 0, 0, 27000, 0, 0, 0, 4, 0, 0), (37813, 72385, 0, 0, 0, 20000, 0, 0, 0, 40000, 0, 0, 0, 4, 0, 0), (37813, 72380, 0, 0, 0, 25000, 0, 0, 0, 45000, 0, 0, 0, 4, 0, 0), diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp index 9cb524ae1..fe980733c 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp @@ -157,6 +157,8 @@ struct MANGOS_DLL_DECL boss_blood_queen_lanathelAI : public ScriptedAI if(!pInstance) return; pInstance->SetData(TYPE_LANATHEL, DONE); DoScriptText(-1631333,m_creature,killer); + m_creature->SetUInt32Value(UNIT_FIELD_BYTES_0, 0); + m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); } void doPactOfDarkfallen(bool command) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp index fe099b9ec..c97b4bd79 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp @@ -61,7 +61,6 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI uint8 stage; uint8 Difficulty; uint8 beasts; - Unit* MarkTarget; void Reset() { @@ -71,7 +70,6 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI stage = 0; beasts = 0; bsw->resetTimers(); - MarkTarget = NULL; } void Aggro(Unit *who) @@ -98,11 +96,6 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI break; }; - if (pVictim && pVictim->HasAura(SPELL_MARK)) - { - m_creature->ModifyHealth(m_creature->GetMaxHealth() * 0.05f); - pVictim->RemoveAurasDueToSpell(SPELL_MARK); - } } void JustSummoned(Creature* summoned) @@ -120,8 +113,15 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI if(!pInstance) return; pInstance->SetData(TYPE_SAURFANG, DONE); DoScriptText(-1631106,m_creature); - if (MarkTarget && MarkTarget->HasAura(SPELL_MARK)) - MarkTarget->RemoveAurasDueToSpell(SPELL_MARK); + + Map::PlayerList const &pList = m_creature->GetMap()->GetPlayers(); + if (pList.isEmpty()) return; + + for (Map::PlayerList::const_iterator i = pList.begin(); i != pList.end(); ++i) + if (Player* pPlayer = i->getSource()) + if (pPlayer && pPlayer->isAlive()) + if (pPlayer->HasAura(SPELL_MARK)) + bsw->doRemove(SPELL_MARK,pPlayer); } void doBloodPower() @@ -158,11 +158,8 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI if (bsw->timedQuery(SPELL_MARK, diff)) { - if (MarkTarget && MarkTarget->HasAura(SPELL_MARK)) - MarkTarget->RemoveAurasDueToSpell(SPELL_MARK); - - if (MarkTarget = bsw->SelectRandomPlayerAtRange(120.0f)) - if (bsw->doCast(SPELL_MARK, MarkTarget) == CAST_OK) + if (Unit* pTarget = bsw->SelectRandomPlayer(SPELL_MARK,false,120.0f)) + if (bsw->doCast(SPELL_MARK, pTarget) == CAST_OK) doBloodPower(); } @@ -223,12 +220,11 @@ struct MANGOS_DLL_DECL mob_blood_beastAI : public ScriptedAI bsw->doCast(SPELL_BLOOD_LINK_BEAST); scentcasted = false; } + void KilledUnit(Unit* pVictim) { if (pOwner && pOwner->isAlive()) pOwner->ModifyHealth(pOwner->GetMaxHealth() * 0.05f); - if (pVictim && pVictim->HasAura(SPELL_MARK)) - pVictim->RemoveAurasDueToSpell(SPELL_MARK); } void UpdateAI(const uint32 uiDiff) From f4c052170528ab194f5735e4e62d49e6b1851ebb Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sat, 12 Jun 2010 23:43:15 +0400 Subject: [PATCH 350/405] 72293 script_target added --- addition/721_icecrown_mangos.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addition/721_icecrown_mangos.sql b/addition/721_icecrown_mangos.sql index 5bd891fc1..64b830e6c 100644 --- a/addition/721_icecrown_mangos.sql +++ b/addition/721_icecrown_mangos.sql @@ -26,11 +26,11 @@ UPDATE `creature_template` SET `ScriptName`='boss_deathbringer_saurfang' WHERE ` DELETE FROM `gameobject` WHERE `guid` IN (913383, 913385, 913395, 913397); DELETE FROM `gameobject_template` WHERE `entry` IN (902241,902242); UPDATE `creature_template` SET `ScriptName`='mob_blood_beast', `AIName`='' WHERE `entry`= 38508; +INSERT INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('72260', '1', '37813'); -- Deathwhisper UPDATE `creature_template` SET `ScriptName`='boss_lady_deathwhisper' WHERE `entry`=36855; UPDATE `creature_template` SET `faction_A`=14, `faction_H`=14,`ScriptName`='mob_vengeful_shade', `AIName`='' WHERE `entry`= 38222; -#UPDATE `gameobject` SET `spawntimesecs` = -25, `state` = 1 WHERE `id` = 202220; UPDATE `creature_template` SET `ScriptName`='mob_cult_adherent', `AIName`='' WHERE `entry`= 37949; UPDATE `creature_template` SET `ScriptName`='mob_cult_fanatic', `AIName`='' WHERE `entry`= 37890; From 4856bf0348f6fd1f7e69b39809ef1c36d0360459 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sun, 13 Jun 2010 14:09:02 +0400 Subject: [PATCH 351/405] ICC part 39 - changes by bugreports && SQL for ruby_sanctum --- .../icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp index e7d8e1db8..eb4d32cc7 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp @@ -963,10 +963,7 @@ struct MANGOS_DLL_DECL mob_defiler_iccAI : public ScriptedAI m_creature->ForcedDespawn(); else life_timer -= uiDiff; - // Override especially for clean core - if (m_Size >= m_Size0 * 6.0f) m_creature->ForcedDespawn(); - - if (doSearchPlayers()) { + if (doSearchPlayers() && m_Size <= m_Size0 * 6.0f) { m_Size = m_Size*1.01; m_creature->SetFloatValue(OBJECT_FIELD_SCALE_X, m_Size); } From 2615117b4bd8497f1257246f0c3f2deaab0c0e65 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sun, 13 Jun 2010 15:09:34 +0400 Subject: [PATCH 352/405] ICC part 39 (forget part) --- addition/728_ruby_sanctum_scriptdev2.sql | 48 +++++++++++++++++++ include/sc_boss_spell_worker.cpp | 12 +++-- .../boss_blood_queen_lanathel.cpp | 32 ++++++++++--- .../icecrown_citadel/boss_lord_marrowgar.cpp | 8 ++-- .../icecrown_citadel/boss_the_lich_king.cpp | 43 ++++++++++------- .../icecrown_citadel/def_spire.h | 4 +- .../instance_icecrown_spire.cpp | 10 ++++ 7 files changed, 124 insertions(+), 33 deletions(-) create mode 100644 addition/728_ruby_sanctum_scriptdev2.sql diff --git a/addition/728_ruby_sanctum_scriptdev2.sql b/addition/728_ruby_sanctum_scriptdev2.sql new file mode 100644 index 000000000..c49c09f84 --- /dev/null +++ b/addition/728_ruby_sanctum_scriptdev2.sql @@ -0,0 +1,48 @@ +-- sound / text +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1666404 AND -1666000; + +-- xerestrasza +INSERT INTO `script_texts` (`entry`, `content_default`, `content_loc8`, `sound`, `type`, `language`, `emote`, `comment`) VALUES +('-1666000','Help! I am trapped within this tree! I require aid!','Спасите! Я под этим деревом. Мне нужна помощь!','17490','1','0','0','SAY_XERESTRASZA_YELL_1'), +('-1666001','Thank you! I could have not held out for much longer. A terrible thing has happened here.','','17491','1','0','0','SAY_XERESTRASZA_YELL_2'), +('-1666002','We believed that the Sanctum was well fortified, but we were not prepareted for the nature of this assault.','','17492','0','0','0','SAY_XERESTRASZA_SAY_1'), +('-1666003','The Black Dragonkin materialized from thin air, and set upon us before we could react.','','17493','0','0','0','SAY_XERESTRASZA_SAY_2'), +('-1666004','We did not stand a chance. As my brethren perished around me, I managed to retreat hear and bar the entrance.','','17494','0','0','0','SAY_XERESTRASZA_SAY_3'), +('-1666005','They slaughtered us with cold efficiency, but the true focus of their interest seemed to be the eggs kept here in the sanctum.','','17495','0','0','0','SAY_XERESTRASZA_SAY_4'), +('-1666006','The commander of the forces on the ground here is a cruel brute named Zarithrian. But I fear there are greater powers at work.','','17496','0','0','0','SAY_XERESTRASZA_SAY_5'), +('-1666007','In their initial assault I caught a glimpse of their true leader, a fearsome full-grown Twilight Dragon.','','17497','0','0','0','SAY_XERESTRASZA_SAY_6'), +('-1666008','I know not the extent of their plans heroes, but I know this: they cannot be allowed to succeed!','','17498','0','0','0','SAY_XERESTRASZA_SAY_7'), + +-- Halion +('-1666100','Meddlesome insects, you\'re too late! The Ruby Sanctum is lost.','','17499','1','0','0','SAY_HALION_SPAWN'), +('-1666101','Your world teeters on the brink of annihilation. You will all bear witness to the coming of a new age of destruction!','','17500','1','0','0','SAY_HALION_AGGRO'), +('-1666102','Another hero falls.','','17501','1','0','0','SAY_HALION_SLAY_1'), +('-1666103','Ha Ha Ha!','','17502','1','0','0','SAY_HALION_SLAY_2'), +('-1666104','Relish this victory mortals, for it will be your last. This world will burn with the Master\'s return!','','17503','1','0','0','SAY_HALION_DEATH'), +('-1666105','Not good enough!','','17504','1','0','0','SAY_HALION_BERSERK'), +('-1666106','The heavens burn!','Небеса в огне!','17505','1','0','0','SAY_HALION_SPECIAL_1'), +('-1666107','Beware the shadow!','','17506','1','0','0','SAY_HALION_SPECIAL_2'), +('-1666108','You will find only suffering within the realm of Twilight. Enter if you dare.','','17507','1','0','0','SAY_HALION_PHASE_2'), +('-1666109','I am the light AND the darkness! Cower mortals before the Herald of Deathwing!','','17508','1','0','0','SAY_HALION_PHASE_3'), + +-- Zarthrian +('-1666200','Alexstrasza has chosen capable allies. A pity that I must end you!','','17512','1','0','0','SAY_ZARITHRIAN_AGGRO'), +('-1666201','You thought you stood a chance?','','17513','1','0','0','SAY_ZARITHRIAN_SLAY_1'), +('-1666202','It\'s for the best.','','17514','1','0','0','SAY_ZARITHRIAN_SLAY_2'), +('-1666203','Halion! I\'m...aah!','','17515','1','0','0','SAY_ZARITHRIAN_DEATH'), +('-1666204','Turn them to ash, minions!','','17516','1','0','0','SAY_ZARITHRIAN_SPECIAL_1'), + +-- baltharus +('-1666300','Ah, the entertainment has arrived...','','17520','1','0','0','SAY_BALTHARUS_AGGRO'), +('-1666301','Baltharus leaves no survivors!','','17521','1','0','0','SAY_BALTHARUS_SLAY_1'), +('-1666302','This world has enough heroes!','','17522','1','0','0','SAY_BALTHARUS_SLAY_2'), +('-1666303','I...didn\'t see that coming...','','17523','1','0','0','SAY_BALTHARUS_DEATH'), +('-1666304','Twice the pain and half the fun!','','17524','1','0','0','SAY_BALTHARUS_SPECIAL_1'), +('-1666305','Your power wanes, ancient one! Soon, you will join your friends!','','17525','1','0','0','SAY_BALTHARUS_YELL'), + +-- saviana +('-1666400','You will suffer for this intrusion...','','17528','1','0','0','SAY_SAVIANA_AGGRO'), +('-1666401','As it should be!','','17529','1','0','0','SAY_SAVIANA_SLAY_1'), +('-1666402','Halion will be pleased...','','17530','1','0','0','SAY_SAVIANA_SLAY_2'), +('-1666403','','','17531','1','0','0','SAY_SAVIANA_DEATH'), +('-1666404','Burn in the master\'s flame!','','17532','1','0','0','SAY_SAVIANA_SPECIAL_1'); diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index a645a5930..6a961087e 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -440,7 +440,7 @@ bool BossSpellWorker::_doRemove(uint8 m_uiSpellIdx, Unit* pTarget, SpellEffectIn for(Map::PlayerList::const_iterator itr = pPlayers.begin(); itr != pPlayers.end(); ++itr) { pTarget = itr->getSource(); - if (pTarget && pTarget->isAlive() && pTarget->IsWithinDistInMap(boss, pSpell->LocData.x)) + if (pTarget && pTarget->isAlive() && pTarget->IsInMap(boss)) pTarget->RemoveAurasDueToSpell(pSpell->m_uiSpellEntry[currentDifficulty]); } return true; @@ -450,7 +450,7 @@ bool BossSpellWorker::_doRemove(uint8 m_uiSpellIdx, Unit* pTarget, SpellEffectIn default: return false; } if (pTarget) { - if (pTarget->isAlive()) { + if (pTarget->isAlive() && pTarget->IsInMap(boss)) { if ( pTarget->HasAura(pSpell->m_uiSpellEntry[currentDifficulty]) && pTarget->GetAura(pSpell->m_uiSpellEntry[currentDifficulty], index)->GetStackAmount() > 1) { if (pTarget->GetAura(pSpell->m_uiSpellEntry[currentDifficulty], index)->modStackAmount(-1)) @@ -459,7 +459,13 @@ bool BossSpellWorker::_doRemove(uint8 m_uiSpellIdx, Unit* pTarget, SpellEffectIn } else pTarget->RemoveAurasDueToSpell(pSpell->m_uiSpellEntry[currentDifficulty]); } - else pTarget->RemoveAurasDueToSpell(pSpell->m_uiSpellEntry[currentDifficulty]); + else { + if (pTarget->IsInMap(boss)) pTarget->RemoveAurasDueToSpell(pSpell->m_uiSpellEntry[currentDifficulty]); + else { + error_log("BSW: Attempt remove aura fom dead unit %u, unit not same map with boss",pTarget->GetGUIDLow()); + return false; + } + } } return true; }; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp index 3a947f0a2..4ae84896c 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp @@ -75,6 +75,7 @@ struct MANGOS_DLL_DECL boss_blood_queen_lanathelAI : public ScriptedAI Unit* MirrorTarget; Unit* Darkfallen[5]; uint8 darkfallened; + uint32 MirrorDamage; void Reset() { @@ -89,6 +90,7 @@ struct MANGOS_DLL_DECL boss_blood_queen_lanathelAI : public ScriptedAI bsw->resetTimers(); memset(&Darkfallen, 0, sizeof(Darkfallen)); darkfallened = 0; + MirrorDamage = 0; m_creature->SetUInt32Value(UNIT_FIELD_BYTES_0, 0); m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); } @@ -110,10 +112,10 @@ struct MANGOS_DLL_DECL boss_blood_queen_lanathelAI : public ScriptedAI } if (pVictim && pVictim->HasAura(SPELL_BLOOD_MIRROR_1)) - pVictim->RemoveAurasDueToSpell(SPELL_BLOOD_MIRROR_1); + bsw->doRemove(SPELL_BLOOD_MIRROR_1,pVictim); if (pVictim && pVictim->HasAura(SPELL_BLOOD_MIRROR_2)) - pVictim->RemoveAurasDueToSpell(SPELL_BLOOD_MIRROR_2); + bsw->doRemove(SPELL_BLOOD_MIRROR_2,pVictim); } void MovementInform(uint32 type, uint32 id) @@ -174,7 +176,7 @@ struct MANGOS_DLL_DECL boss_blood_queen_lanathelAI : public ScriptedAI for(uint8 i = 0; i < darkfallened; ++i) if (Darkfallen[i] && Darkfallen[i]->isAlive() && Darkfallen[i]->HasAura(SPELL_PACT_OF_DARKFALLEN)) - Darkfallen[i]->RemoveAurasDueToSpell(SPELL_PACT_OF_DARKFALLEN); + bsw->doRemove(SPELL_PACT_OF_DARKFALLEN, Darkfallen[i]); darkfallened = 0; }; } @@ -204,15 +206,23 @@ struct MANGOS_DLL_DECL boss_blood_queen_lanathelAI : public ScriptedAI } + void doMirrorDamage() + { + uint32 tempdamage = MirrorDamage; + + if (MirrorTarget) + if (MirrorTarget->isAlive()) + m_creature->DealDamage(MirrorTarget, tempdamage, NULL, SPELL_DIRECT_DAMAGE, SPELL_SCHOOL_MASK_SHADOW, NULL, false); + MirrorDamage -= tempdamage; + } + void DamageDeal(Unit* target, uint32 &damage) { if (target) if (MirrorMarked) if (MirrorMarked->isAlive()) if (target == MirrorMarked) - if (MirrorTarget) - if (MirrorTarget->isAlive()) - m_creature->DealDamage(MirrorTarget, damage, NULL, SPELL_DIRECT_DAMAGE, SPELL_SCHOOL_MASK_SHADOW, NULL, false); + MirrorDamage += damage; } void UpdateAI(const uint32 diff) @@ -330,6 +340,8 @@ struct MANGOS_DLL_DECL boss_blood_queen_lanathelAI : public ScriptedAI doPactOfDarkfallen(false); + doMirrorDamage(); + if (bloodbolts > 0) { bsw->doCast(SPELL_TWILIGHT_BLOODBOLT); @@ -358,12 +370,14 @@ struct MANGOS_DLL_DECL mob_swarming_shadowsAI : public ScriptedAI } ScriptedInstance* m_pInstance; + uint32 m_lifetimer; void Reset() { SetCombatMovement(false); -// m_creature->SetDisplayId(29308); + m_creature->SetDisplayId(11686); m_creature->GetMotionMaster()->MoveRandom(); + m_lifetimer = 10000; } void UpdateAI(const uint32 uiDiff) @@ -374,6 +388,10 @@ struct MANGOS_DLL_DECL mob_swarming_shadowsAI : public ScriptedAI if (!m_creature->HasAura(SPELL_SWARMING_SHADOWS_VISUAL)) DoCast(m_creature, SPELL_SWARMING_SHADOWS_VISUAL); + if (m_lifetimer <= uiDiff) + m_creature->ForcedDespawn(); + else m_lifetimer -= uiDiff; + } }; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp index 5f0c1abb5..ff6f42582 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp @@ -225,7 +225,6 @@ struct MANGOS_DLL_DECL mob_coldflameAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { bsw->timedCast(SPELL_COLD_FLAME_0, uiDiff); -// bsw->timedCast(SPELL_COLD_FLAME, uiDiff); if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; } @@ -288,12 +287,13 @@ struct MANGOS_DLL_DECL mob_bone_spikeAI : public ScriptedAI if(pVictim && !pVictim->isAlive()) { - bsw->doRemove(SPELL_BONE_STRIKE_IMPALE,pVictim); +// bsw->doRemove(SPELL_BONE_STRIKE_IMPALE,pVictim); m_creature->ForcedDespawn(); } - if(m_creature->IsWithinDistInMap(pVictim, 1.0f) && - !pVictim->HasAura(SPELL_BONE_STRIKE_IMPALE)) + if(m_creature->IsWithinDistInMap(pVictim, 1.0f) + && pVictim->isAlive() + && !pVictim->HasAura(SPELL_BONE_STRIKE_IMPALE)) { bsw->doCast(SPELL_BONE_STRIKE_IMPALE,pVictim); m_creature->GetMotionMaster()->Clear(); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp index 55041ca87..3106bb882 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp @@ -85,7 +85,6 @@ enum BossSpells SPELL_DEFILE = 72743, // - NPC_FROSTMOURNE_TRIGGER = 38584, NPC_ICE_SPHERE = 36633, NPC_DEFILER = 38757, NPC_RAGING_SPIRIT = 36701, @@ -167,7 +166,10 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI void KilledUnit(Unit* pVictim) { - switch (urand(0,1)) { + + if (!battlestarted) return; + + switch (urand(0,1)) { case 0: DoScriptText(-1631519,m_creature,pVictim); break; @@ -287,7 +289,7 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI case 13000: m_creature->SetOrientation(3.1146f); DoScriptText(-1631507, m_creature); - UpdateTimer = 8000; + UpdateTimer = 12000; finalphase = true; bsw->doCast(SPELL_FURY_OF_FROSTMOURNE); pInstance->SetData(TYPE_EVENT,13020); @@ -299,17 +301,17 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI break; case 13020: DoScriptText(-1631508, m_creature); - UpdateTimer = 10000; + UpdateTimer = 12000; pInstance->SetData(TYPE_EVENT,13060); break; case 13060: DoScriptText(-1631509, m_creature); - UpdateTimer = 12000; + UpdateTimer = 15000; pInstance->SetData(TYPE_EVENT,13100); break; case 13100: DoScriptText(-1631510, m_creature); - UpdateTimer = 12000; + UpdateTimer = 15000; pInstance->SetData(TYPE_EVENT,13110); bsw->doCast(SPELL_CHANNEL_KING); break; @@ -330,9 +332,9 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI m_creature->CastSpell(m_creature, SPELL_SUMMON_BROKEN_FROSTMOURNE_2, false); break; case 13180: - UpdateTimer = 8000; + UpdateTimer = 12000; pInstance->SetData(TYPE_EVENT,13190); - if (pFrostmourne = m_creature->SummonCreature(NPC_FROSTMOURNE, SpawnLoc[7].x, SpawnLoc[7].y, SpawnLoc[7].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000)) + if (pFrostmourne = m_creature->SummonCreature(NPC_FROSTMOURNE_HOLDER, SpawnLoc[7].x, SpawnLoc[7].y, SpawnLoc[7].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000)) { pFrostmourne->CastSpell(pFrostmourne, SPELL_BROKEN_FROSTMOURNE, false); pFrostmourne->CastSpell(pFrostmourne, SPELL_FROSTMOURNE_TRIGGER, false); @@ -344,6 +346,7 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI DoScriptText(-1631512, m_creature); m_creature->RemoveAurasDueToSpell(SPELL_SUMMON_BROKEN_FROSTMOURNE); m_creature->RemoveAllAuras(); + pFrostmourne->RemoveAurasDueToSpell(SPELL_FROSTMOURNE_TRIGGER); UpdateTimer = 5000; pInstance->SetData(TYPE_EVENT,13210); break; @@ -352,6 +355,10 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI pInstance->SetData(TYPE_EVENT,13290); stage = 12; if (pFrostmourne) pFrostmourne->ForcedDespawn(); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_FROSTMOURNE_TRIGGER))) + pTemp->ForcedDespawn(); + if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_FROSTMOURNE_HOLDER))) + pTemp->ForcedDespawn(); SetCombatMovement(true); battlestarted = true; break; @@ -366,6 +373,7 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI { battlestarted = false; pInstance->SetData(TYPE_LICH_KING, FAIL); + pInstance->SetData(TYPE_EVENT,0); EnterEvadeMode(); return; } @@ -443,7 +451,7 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI if (bsw->timedQuery(SPELL_SPAWN_DEFILE, diff)) { bsw->doCast(SPELL_SPAWN_DEFILE); -// DoScriptText(-1631527,m_creature); + DoScriptText(-1631531,m_creature); } if (bsw->timedQuery(SPELL_SUMMON_VALKYR, diff)) { @@ -670,7 +678,7 @@ struct MANGOS_DLL_DECL boss_tirion_iccAI : public ScriptedAI break; case 13110: DoScriptText(-1631555, m_creature); - UpdateTimer = 5000; + UpdateTimer = 6000; m_creature->CastSpell(m_creature, SPELL_TIRION_LIGHT, false); pInstance->SetData(TYPE_EVENT,13120); break; @@ -687,6 +695,7 @@ struct MANGOS_DLL_DECL boss_tirion_iccAI : public ScriptedAI break; case 13132: StartMovement(5,13140); + DoScriptText(-1631556, m_creature); m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_READY2H); break; case 13150: @@ -702,12 +711,11 @@ struct MANGOS_DLL_DECL boss_tirion_iccAI : public ScriptedAI pInstance->SetData(TYPE_EVENT,13200); break; case 13210: - UpdateTimer = 6000; - DoScriptText(-1631556, m_creature); + UpdateTimer = 3000; pInstance->SetData(TYPE_EVENT,13230); break; case 13230: - UpdateTimer = 6000; + UpdateTimer = 12000; pMenethil = m_creature->SummonCreature(NPC_MENETHIL, m_creature->GetPositionX()+5, m_creature->GetPositionY()+5, m_creature->GetPositionZ(), 0, TEMPSUMMON_MANUAL_DESPAWN, 5000); pInstance->SetData(TYPE_EVENT,13250); DoScriptText(-1631560, pMenethil); @@ -731,9 +739,7 @@ struct MANGOS_DLL_DECL boss_tirion_iccAI : public ScriptedAI pMenethil->AI()->AttackStart(pLichKing); SetCombatMovement(true); m_creature->GetMotionMaster()->MoveChase(pLichKing); - pLichKing->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); }; -// DoScriptText(-1631560, m_creature); break; case 13290: UpdateTimer = 5000; @@ -761,6 +767,8 @@ struct MANGOS_DLL_DECL boss_tirion_iccAI : public ScriptedAI UpdateTimer =90000; pInstance->SetData(TYPE_EVENT,14030); m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE); + if (Creature* pLichKing = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_LICH_KING))) + pLichKing->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); doSendCinematic(); break; case 14030: @@ -782,8 +790,7 @@ struct MANGOS_DLL_DECL boss_tirion_iccAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - -// DoMeleeAttackIfReady(); + DoMeleeAttackIfReady(); } @@ -944,7 +951,7 @@ struct MANGOS_DLL_DECL mob_defiler_iccAI : public ScriptedAI else life_timer -= uiDiff; // Override especially for clean core - if (m_Size >= 6.0f) m_creature->ForcedDespawn(); + if (m_Size >= 4.0f) m_creature->ForcedDespawn(); if (doSearchPlayers()) { m_Size = m_Size*1.01; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h index 01db52c1c..52efa4558 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h @@ -46,7 +46,9 @@ enum NPC_TIRION = 38995, NPC_MENETHIL = 38579, NPC_SPIRIT_WARDEN = 38579, - NPC_FROSTMOURNE = 27880, + + NPC_FROSTMOURNE_TRIGGER = 38584, + NPC_FROSTMOURNE_HOLDER = 27880, NPC_STINKY = 37025, NPC_PRECIOUS = 37217, diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp index e12403f2b..8a4abec78 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp @@ -92,6 +92,10 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance uint64 m_uiFrostyWindGUID; uint64 m_uiFrostyEdgeGUID; + uint64 m_uiFrostmourneGUID; + uint64 m_uiFrostmourneTriggerGUID; + uint64 m_uiFrostmourneHolderGUID; + uint64 m_uiSaurfangCacheGUID; uint64 m_uiGunshipArmoryAGUID; uint64 m_uiGunshipArmoryHGUID; @@ -262,6 +266,10 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance case NPC_PRECIOUS: m_uiPreciousGUID = pCreature->GetGUID(); break; + case NPC_FROSTMOURNE_TRIGGER: + m_uiFrostmourneTriggerGUID = pCreature->GetGUID(); break; + case NPC_FROSTMOURNE_HOLDER: + m_uiFrostmourneHolderGUID = pCreature->GetGUID(); break; } } @@ -712,6 +720,8 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance case GO_ICESHARD_4: return m_uiIceShard4GUID; case GO_FROSTY_WIND: return m_uiFrostyWindGUID; case GO_FROSTY_EDGE: return m_uiFrostyEdgeGUID; + case NPC_FROSTMOURNE_TRIGGER: return m_uiFrostmourneTriggerGUID; + case NPC_FROSTMOURNE_HOLDER: return m_uiFrostmourneHolderGUID; } return 0; } From ed9640521e21848bdeb7c5a411ba6fcc23ffa30e Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sun, 13 Jun 2010 18:27:58 +0400 Subject: [PATCH 353/405] BSW improve - additional IsInMap() check always. --- include/sc_boss_spell_worker.cpp | 23 +++++++++++++---------- include/sc_boss_spell_worker.h | 2 +- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index 6a961087e..f63e72051 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -34,7 +34,7 @@ void BossSpellWorker::Reset() void BossSpellWorker::_resetTimer(uint8 m_uiSpellIdx) { - if (m_uiSpellIdx > _bossSpellCount) return; + if (m_uiSpellIdx > bossSpellCount()) return; if (m_BossSpell[m_uiSpellIdx].m_uiSpellTimerMin[currentDifficulty] != m_BossSpell[m_uiSpellIdx].m_uiSpellTimerMax[currentDifficulty]) m_uiSpell_Timer[m_uiSpellIdx] = urand(0,m_BossSpell[m_uiSpellIdx].m_uiSpellTimerMax[currentDifficulty]); else m_uiSpell_Timer[m_uiSpellIdx] = m_BossSpell[m_uiSpellIdx].m_uiSpellTimerMin[currentDifficulty]; @@ -185,7 +185,7 @@ CanCastResult BossSpellWorker::_BSWSpellSelector(uint8 m_uiSpellIdx, Unit* pTarg break; case APPLY_AURA_TARGET: - if (!pTarget) return CAST_FAIL_OTHER; + if (!pTarget || !pTarget->IsInMap(boss)) return CAST_FAIL_OTHER; if (spell = (SpellEntry *)GetSpellStore()->LookupEntry(pSpell->m_uiSpellEntry[currentDifficulty])) if (pTarget->AddAura(new BossAura(spell, EFFECT_INDEX_0, &pSpell->varData, pTarget, pTarget))) return CAST_OK; @@ -245,7 +245,7 @@ CanCastResult BossSpellWorker::_BSWSpellSelector(uint8 m_uiSpellIdx, Unit* pTarg if (!pTarget) pTarget = boss; if (pSpell->LocData.z <= 1.0f) { float fPosX, fPosY, fPosZ; - if (!pTarget->IsPositionValid()) + if (!pTarget->IsPositionValid() || !pTarget->IsInMap(boss)) { if (pTarget->GetTypeId() == TYPEID_PLAYER) error_log("BSW: Player %s (guid %u) has invalid position. May be cheater?",pTarget->GetName(),pTarget->GetGUIDLow()); @@ -267,7 +267,7 @@ CanCastResult BossSpellWorker::_BSWSpellSelector(uint8 m_uiSpellIdx, Unit* pTarg case CAST_ON_RANDOM_PLAYER: if ( pSpell->LocData.x < 1 ) pTarget = SelectRandomPlayer(); else pTarget = SelectRandomPlayerAtRange((float)pSpell->LocData.x); - return _BSWCastOnTarget(pTarget, m_uiSpellIdx); + if (pTarget || pTarget->IsInMap(boss)) return _BSWCastOnTarget(pTarget, m_uiSpellIdx); break; default: @@ -279,8 +279,9 @@ CanCastResult BossSpellWorker::_BSWSpellSelector(uint8 m_uiSpellIdx, Unit* pTarg CanCastResult BossSpellWorker::_BSWCastOnTarget(Unit* pTarget, uint8 m_uiSpellIdx) { - if (_bossSpellCount == 0) return CAST_FAIL_OTHER; - if (!pTarget) return CAST_FAIL_OTHER; + if (_bossSpellCount == 0) return CAST_FAIL_OTHER; + if (!pTarget || !pTarget->IsInMap(boss)) return CAST_FAIL_OTHER; + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; debug_log("BSW: Casting (on target) spell number %u type %u",pSpell->m_uiSpellEntry[currentDifficulty], pSpell->m_CastTarget); @@ -309,7 +310,7 @@ bool BossSpellWorker::isSummon(uint8 m_uiSpellIdx) bool BossSpellWorker::_hasAura(uint8 m_uiSpellIdx, Unit* pTarget) { - if (!pTarget) return false; + if (!pTarget || !pTarget->IsInMap(boss)) return false; SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; @@ -355,7 +356,7 @@ BossSpellTableParameters BossSpellWorker::getBSWCastType(uint32 pTemp) CanCastResult BossSpellWorker::_BSWDoCast(uint8 m_uiSpellIdx, Unit* pTarget) { if (!pTarget) return CAST_FAIL_OTHER; - if (!pTarget->isAlive()) return CAST_FAIL_OTHER; + if (!pTarget->isAlive() || !pTarget->IsInMap(boss)) return CAST_FAIL_OTHER; SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; debug_log("BSW: Casting bugged spell number %u type %u",pSpell->m_uiSpellEntry[currentDifficulty], pSpell->m_CastTarget); pTarget->InterruptNonMeleeSpells(false); @@ -472,7 +473,7 @@ bool BossSpellWorker::_doRemove(uint8 m_uiSpellIdx, Unit* pTarget, SpellEffectIn bool BossSpellWorker::_doAura(uint8 m_uiSpellIdx, Unit* pTarget, SpellEffectIndex index) { - if (!pTarget) return false; + if (!pTarget || !pTarget->IsInMap(boss)) return false; SpellEntry const *spell; @@ -543,7 +544,7 @@ CanCastResult BossSpellWorker::_CanCastSpell(Unit* pTarget, const SpellEntry *pS CanCastResult BossSpellWorker::_DoCastSpellIfCan(Unit* pTarget, uint32 uiSpell, uint32 uiCastFlags, uint64 uiOriginalCasterGUID) { Unit* pCaster = boss; - if (!pTarget) return CAST_FAIL_OTHER; + if (!pTarget || !pTarget->IsInMap(boss)) return CAST_FAIL_OTHER; if (uiCastFlags & CAST_FORCE_TARGET_SELF) pCaster = pTarget; @@ -630,6 +631,8 @@ Unit* BossSpellWorker::_doSelect(uint32 SpellID, bool spellsearchtype, float ran { if (player->isGameMaster()) continue; + if (!player->IsInMap(boss)) continue; + if ( player->isAlive() && player->IsWithinDistInMap(boss, range) && (SpellID == 0 || (player->HasAura(SpellID) == spellsearchtype)) diff --git a/include/sc_boss_spell_worker.h b/include/sc_boss_spell_worker.h index d39f5bd79..d38088b6c 100644 --- a/include/sc_boss_spell_worker.h +++ b/include/sc_boss_spell_worker.h @@ -111,7 +111,7 @@ class MANGOS_DLL_DECL BossSpellWorker void resetTimers() { - for (uint8 i = 0; i < _bossSpellCount; ++i) + for (uint8 i = 0; i < bossSpellCount(); ++i) _resetTimer(i); }; From 72b20bacd8b5f31622ee2d05da343f09c0d7e59a Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sun, 13 Jun 2010 19:23:41 +0400 Subject: [PATCH 354/405] BSW improve - part 2 --- include/sc_boss_spell_worker.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index f63e72051..05f614d7c 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -267,7 +267,7 @@ CanCastResult BossSpellWorker::_BSWSpellSelector(uint8 m_uiSpellIdx, Unit* pTarg case CAST_ON_RANDOM_PLAYER: if ( pSpell->LocData.x < 1 ) pTarget = SelectRandomPlayer(); else pTarget = SelectRandomPlayerAtRange((float)pSpell->LocData.x); - if (pTarget || pTarget->IsInMap(boss)) return _BSWCastOnTarget(pTarget, m_uiSpellIdx); + if (pTarget && pTarget->IsInMap(boss)) return _BSWCastOnTarget(pTarget, m_uiSpellIdx); break; default: @@ -320,8 +320,8 @@ bool BossSpellWorker::_hasAura(uint8 m_uiSpellIdx, Unit* pTarget) uint8 BossSpellWorker::FindSpellIDX(uint32 SpellID) { - if (_bossSpellCount != 0) - for(uint8 i = 0; i < _bossSpellCount; ++i) + if (bossSpellCount() >= 0) + for(uint8 i = 0; i < bossSpellCount(); ++i) if (m_BossSpell[i].m_uiSpellEntry[RAID_DIFFICULTY_10MAN_NORMAL] == SpellID) return i; error_log("BSW: spell %u not found in boss %u spelltable. Memory or database error?", SpellID, bossID); @@ -366,7 +366,7 @@ CanCastResult BossSpellWorker::_BSWDoCast(uint8 m_uiSpellIdx, Unit* pTarget) void BossSpellWorker::_fillEmptyDataField() { - for (uint8 i = 0; i < _bossSpellCount; ++i) + for (uint8 i = 0; i < bossSpellCount(); ++i) for (uint8 j = 1; j < DIFFICULTY_LEVELS; ++j) { if (m_BossSpell[i].m_uiSpellEntry[j] == 0) From 96ddcfc4c191ff5496fba4513fcf41637508186a Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sun, 13 Jun 2010 22:06:50 +0400 Subject: [PATCH 355/405] BSW improve - additional checks part 3. --- include/sc_boss_spell_worker.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index 05f614d7c..d499df62e 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -259,8 +259,13 @@ CanCastResult BossSpellWorker::_BSWSpellSelector(uint8 m_uiSpellIdx, Unit* pTarg error_log("BSW: Positon Z is NULL. Strange bug"); return CAST_FAIL_OTHER; } - boss->CastSpell(fPosX, fPosY, fPosZ, pSpell->m_uiSpellEntry[currentDifficulty], false); - return CAST_OK; + if (SpellEntry const *spell = (SpellEntry *)GetSpellStore()->LookupEntry(pSpell->m_uiSpellEntry[currentDifficulty])) + if (SpellRangeEntry const *pSpellRange = GetSpellRangeStore()->LookupEntry(spell->rangeIndex)) + if (boss->GetDistance(fPosX, fPosY, fPosZ) <= pSpellRange->maxRange) + { + boss->CastSpell(fPosX, fPosY, fPosZ, pSpell->m_uiSpellEntry[currentDifficulty], false); + return CAST_OK; + } else CAST_FAIL_TOO_FAR; } else return CAST_FAIL_OTHER; break; From 3836847411ef18903d6f32971d26320fe23daead Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Mon, 14 Jun 2010 11:12:43 +0400 Subject: [PATCH 356/405] ICC part 40 - changes by bugreports (core modifications from Wowka321 needed!) --- addition/721_icecrown_spelltable_scriptdev2.sql | 4 ++++ .../icecrown_citadel/boss_sindragosa.cpp | 10 ++++++---- .../icecrown_citadel/boss_the_lich_king.cpp | 4 ++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/addition/721_icecrown_spelltable_scriptdev2.sql b/addition/721_icecrown_spelltable_scriptdev2.sql index 147418b47..0a4f4cd4f 100644 --- a/addition/721_icecrown_spelltable_scriptdev2.sql +++ b/addition/721_icecrown_spelltable_scriptdev2.sql @@ -298,6 +298,10 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ (37534, 36922, 0, 0, 0, 8000, 0, 0, 0, 24000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (37534, 40505, 0, 0, 0, 5000, 0, 0, 0, 8000, 0, 0, 0, 0, 0, 0, 3, 0, 0), (37534, 71369, 0, 0, 0, 4000, 0, 0, 0, 8000, 0, 0, 0, 0, 0, 0, 4, 0, 0); +-- Ice tomb +DELETE FROM `boss_spell_table` WHERE `entry` = 36980; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(36980, 70157, 0, 0, 0, 2000, 0, 0, 0, 2000, 0, 0, 0, 0, 0, 0, 6, 0, 0); -- Lich king DELETE FROM `boss_spell_table` WHERE `entry` = 36597; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp index d4b65da9a..1317fdd42 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp @@ -347,10 +347,12 @@ struct MANGOS_DLL_DECL mob_ice_tombAI : public ScriptedAI mob_ice_tombAI(Creature *pCreature) : ScriptedAI(pCreature) { m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); + bsw = new BossSpellWorker(this); Reset(); } ScriptedInstance *m_pInstance; + BossSpellWorker* bsw; Unit* pVictim; void Reset() @@ -370,24 +372,24 @@ struct MANGOS_DLL_DECL mob_ice_tombAI : public ScriptedAI void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) { if (uiDamage > m_creature->GetHealth()) - if (pVictim) pVictim->RemoveAurasDueToSpell(SPELL_ICY_TOMB); + if (pVictim) bsw->doRemove(SPELL_ICY_TOMB,pVictim); } void KilledUnit(Unit* _Victim) { - if (pVictim) pVictim->RemoveAurasDueToSpell(SPELL_ICY_TOMB); + if (pVictim) bsw->doRemove(SPELL_ICY_TOMB,pVictim); } void JustDied(Unit* Killer) { - if (pVictim) pVictim->RemoveAurasDueToSpell(SPELL_ICY_TOMB); + if (pVictim) bsw->doRemove(SPELL_ICY_TOMB,pVictim); } void UpdateAI(const uint32 uiDiff) { if(m_pInstance && m_pInstance->GetData(TYPE_SINDRAGOSA) != IN_PROGRESS) { - if (pVictim) pVictim->RemoveAurasDueToSpell(SPELL_ICY_TOMB); + if (pVictim) bsw->doRemove(SPELL_ICY_TOMB,pVictim); m_creature->ForcedDespawn(); } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp index 93bea1551..e209daef9 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp @@ -956,8 +956,8 @@ struct MANGOS_DLL_DECL mob_defiler_iccAI : public ScriptedAI if (pList.isEmpty()) return false; for (Map::PlayerList::const_iterator i = pList.begin(); i != pList.end(); ++i) if (Player* pPlayer = i->getSource()) - if (pPlayer && pPlayer->isAlive()) - if(m_creature->IsWithinDistInMap(pPlayer, 0.1f)) return true; + if (pPlayer && pPlayer->isAlive() && pPlayer->IsInMap(m_creature)) + if(m_creature->IsWithinDistInMap(pPlayer, m_Size * 6.0f)) return true; return false; } From 1cce3b48f13431edc8b6f1a534ba8e4f04f294ec Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Tue, 15 Jun 2010 19:06:55 +0400 Subject: [PATCH 357/405] ICC part 40 - Rotface rewrite, LK && SQL correct, BSW improve. Rotface need continue work... --- addition/721_icecrown_mangos.sql | 9 + .../721_icecrown_spelltable_scriptdev2.sql | 40 ++- include/sc_boss_spell_worker.cpp | 29 +- include/sc_boss_spell_worker.h | 11 + .../boss_deathbringer_saurfang.cpp | 2 +- .../icecrown_citadel/boss_rotface.cpp | 264 +++++++++++++++++- .../icecrown_citadel/boss_the_lich_king.cpp | 8 +- .../instance_icecrown_spire.cpp | 4 +- 8 files changed, 341 insertions(+), 26 deletions(-) diff --git a/addition/721_icecrown_mangos.sql b/addition/721_icecrown_mangos.sql index 64b830e6c..3064503d5 100644 --- a/addition/721_icecrown_mangos.sql +++ b/addition/721_icecrown_mangos.sql @@ -26,6 +26,7 @@ UPDATE `creature_template` SET `ScriptName`='boss_deathbringer_saurfang' WHERE ` DELETE FROM `gameobject` WHERE `guid` IN (913383, 913385, 913395, 913397); DELETE FROM `gameobject_template` WHERE `entry` IN (902241,902242); UPDATE `creature_template` SET `ScriptName`='mob_blood_beast', `AIName`='' WHERE `entry`= 38508; +DELETE FROM `spell_script_target` WHERE `entry` = 72260; INSERT INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('72260', '1', '37813'); -- Deathwhisper @@ -65,6 +66,14 @@ INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `positi UPDATE `creature_template` SET `ScriptName`='boss_rotface', `AIName`='' WHERE `entry`= 36627; UPDATE `gameobject_template` SET `faction` = '114' WHERE `gameobject_template`.`entry` IN (201370); UPDATE `gameobject` SET `state` = '0' WHERE `id` IN (201370); +UPDATE `creature_template` SET `ScriptName`='mob_small_ooze', `AIName`='' WHERE `entry`= 36897; +UPDATE `creature_template` SET `ScriptName`='mob_big_ooze', `AIName`='' WHERE `entry`= 36899; +UPDATE `creature_template` SET `minlevel` = 80, `maxlevel` = 80, `AIName` ='', `faction_A`= 14, `faction_H` = 14, `ScriptName`='mob_sticky_ooze', `AIName`='' WHERE `entry`= 37006; +UPDATE `creature_template` SET `minlevel` = 80, `maxlevel` = 80, `AIName` ='', `faction_A`= 14, `faction_H` = 14, `ScriptName`='mob_ooze_spray_stalker', `AIName`='' WHERE `entry`= 37986; +DELETE FROM `spell_script_target` WHERE `entry` = 69783; +INSERT INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('69783', '1', '37986'); + + -- Festergut UPDATE `creature_template` SET `ScriptName`='boss_festergut', `AIName`='' WHERE `entry`= 36626; UPDATE `gameobject_template` SET `faction` = '114' WHERE `gameobject_template`.`entry` IN (201371); diff --git a/addition/721_icecrown_spelltable_scriptdev2.sql b/addition/721_icecrown_spelltable_scriptdev2.sql index 0a4f4cd4f..f2387d085 100644 --- a/addition/721_icecrown_spelltable_scriptdev2.sql +++ b/addition/721_icecrown_spelltable_scriptdev2.sql @@ -127,23 +127,47 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ ( 36626, 69157, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 150, 0, 0, 12, 0, 0), ( 36626, 69126, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 150, 0, 0, 12, 0, 0), ( 36626, 69166, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 1, 0, 0), -( 36626, 69195, 71219, 73031, 73032, 20000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 1, 0, 0), -( 36626, 69278, 69278, 71221, 71221, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 1, 0, 0), -( 36626, 72103, 72103, 72103, 72103, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 4, 0, 0), -( 36626, 72219, 72551, 72551, 72553, 10000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 3, 0, 0), -( 36626, 72227, 72227, 72229, 72230, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 4, 0, 0), -( 36626, 72272, 72273, 72273, 73020, 20000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +( 36626, 69195, 0, 0, 0, 20000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +( 36626, 69278, 0, 0, 0, 20000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +( 36626, 72103, 0, 0, 0, 20000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +( 36626, 72219, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 3, 0, 0), +( 36626, 72227, 0, 0, 0, 20000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +( 36626, 72272, 0, 0, 0, 20000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 4, 0, 0), ( 36626, 47008, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 0, 0, 0, 1, 0, 0); -- Rotface DELETE FROM `boss_spell_table` WHERE `entry` = 36627; INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES (36627, 69508, 0, 0, 0, 15000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), -(36627, 69674, 0, 0, 0, 15000, 0, 0, 0, 30000, 0, 0, 0, 4, 0, 0), +(36627, 69674, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 6, 0, 0), +(36627, 70003, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 6, 0, 0), (36627, 69788, 0, 0, 0, 20000, 0, 0, 0, 40000, 0, 0, 0, 1, 0, 0), -(36627, 69783, 69797, 69799, 69802, 20000, 0, 0, 0, 40000, 0, 0, 0, 3, 0, 0), +(36627, 69783, 0, 0, 0, 20000, 0, 0, 0, 40000, 0, 0, 0, 3, 0, 0), (36627, 47008, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 1, 0, 0), (36627, 69789, 0, 0, 0, 20000, 0, 0, 0, 40000, 0, 0, 0, 1, 0, 0); +-- summons +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMax_N10`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType` ) VALUES +(36627, 36897, 12000, 12000, 1, 1, 1, 1, 1, 5, 0, 9), +(36627, 37986, 15000, 15000, 1, 1, 1, 1, 0, 0, 0, 11); +-- Small ooze +DELETE FROM `boss_spell_table` WHERE `entry` = 36897; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(36897,69774, 0, 0, 0, 10000, 0, 0, 0, 15000, 0, 0, 0, 4, 0, 0), +(36897,69750, 0, 0, 0, 10000, 0, 0, 0, 15000, 0, 0, 0, 1, 0, 0), +(36897,69644, 0, 0, 0, 10000, 0, 0, 0, 15000, 0, 0, 0, 6, 0, 0), +(36897,69889, 0, 0, 0, 10000, 0, 0, 0, 15000, 0, 0, 0, 6, 0, 0); +-- summons +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMax_N10`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType` ) VALUES +(36897, 36899, 12000, 12000, 1, 1, 1, 1, 1, 5, 0, 9); +-- Big ooze +DELETE FROM `boss_spell_table` WHERE `entry` = 36899; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(36899,69774, 0, 0, 0, 10000, 0, 0, 0, 15000, 0, 0, 0, 4, 0, 0), +(36899,69839, 0, 0, 0, 6000, 0, 0, 0, 6000, 0, 0, 0, 1, 0, 0), +(36899,69760, 0, 0, 0, 10000, 0, 0, 0, 15000, 0, 0, 0, 1, 0, 0), +(36899,69644, 0, 0, 0, 10000, 0, 0, 0, 15000, 0, 0, 0, 1, 0, 0), +(36899,69558, 0, 0, 0, 10000, 0, 0, 0, 15000, 0, 0, 0, 1, 0, 0), +(36899,69889, 0, 0, 0, 10000, 0, 0, 0, 15000, 0, 0, 0, 6, 0, 0); -- Professor Putricide DELETE FROM `boss_spell_table` WHERE `entry` = 36678; diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index d499df62e..7246b44f6 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -232,12 +232,12 @@ CanCastResult BossSpellWorker::_BSWSpellSelector(uint8 m_uiSpellIdx, Unit* pTarg } case CAST_ON_FRENDLY: - pTarget = SelectLowHPFriendly(); + pTarget = SelectLowHPFriendly(pSpell->LocData.x); return _BSWCastOnTarget(pTarget, m_uiSpellIdx); break; case CAST_ON_FRENDLY_LOWHP: - pTarget = SelectLowHPFriendly(); + pTarget = SelectLowHPFriendly(pSpell->LocData.x); return _BSWCastOnTarget(pTarget, m_uiSpellIdx); break; @@ -323,6 +323,20 @@ bool BossSpellWorker::_hasAura(uint8 m_uiSpellIdx, Unit* pTarget) }; +uint8 BossSpellWorker::_auraCount(uint8 m_uiSpellIdx, Unit* pTarget, SpellEffectIndex index) +{ + if (!pTarget) return false; + + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + + if (!pTarget->HasAura(pSpell->m_uiSpellEntry[currentDifficulty])) return 0; + + if (pTarget->GetAura(pSpell->m_uiSpellEntry[currentDifficulty], index)->GetStackAmount() > 0) + return pTarget->GetAura(pSpell->m_uiSpellEntry[currentDifficulty], index)->GetStackAmount(); + else return 0; + +}; + uint8 BossSpellWorker::FindSpellIDX(uint32 SpellID) { if (bossSpellCount() >= 0) @@ -653,5 +667,16 @@ Unit* BossSpellWorker::_doSelect(uint32 SpellID, bool spellsearchtype, float ran else return _list[urand(0,_count)]; }; +Creature* BossSpellWorker::SelectNearestCreature(uint32 guid, float range) +{ + Creature* pTarget = NULL; + + MaNGOS::NearestCreatureEntryWithLiveStateInObjectRangeCheck u_check(*boss, guid, true, range*2); + MaNGOS::CreatureLastSearcher searcher(boss, pTarget, u_check); + Cell::VisitGridObjects(boss, searcher, range*2); + + if (pTarget && pTarget != boss && pTarget->isAlive()) return pTarget; + else return NULL; +} #endif \ No newline at end of file diff --git a/include/sc_boss_spell_worker.h b/include/sc_boss_spell_worker.h index d38088b6c..cbb8b00ef 100644 --- a/include/sc_boss_spell_worker.h +++ b/include/sc_boss_spell_worker.h @@ -158,6 +158,13 @@ class MANGOS_DLL_DECL BossSpellWorker return _hasAura(FindSpellIDX(SpellID),pTarget); }; + uint8 auraCount(uint32 SpellID, Unit* pTarget = NULL, SpellEffectIndex index = EFFECT_INDEX_0) + { + if (!pTarget) pTarget = boss; + if (!_hasAura(FindSpellIDX(SpellID),pTarget)) return 0; + else return _auraCount(FindSpellIDX(SpellID),pTarget,index); + }; + Unit* doSummon(uint32 SpellID, TempSummonType type = TEMPSUMMON_CORPSE_TIMED_DESPAWN, uint32 delay = 60000) { return _doSummon(FindSpellIDX(SpellID), type, delay); @@ -195,6 +202,8 @@ class MANGOS_DLL_DECL BossSpellWorker return _bossSpellCount; }; + Creature* SelectNearestCreature(uint32 guid, float range = 120.0f); + private: BossSpellTableParameters getBSWCastType(uint32 pTemp); @@ -231,6 +240,8 @@ class MANGOS_DLL_DECL BossSpellWorker bool _hasAura(uint8 m_uiSpellIdx, Unit* pTarget); + uint8 _auraCount(uint8 m_uiSpellIdx, Unit* pTarget = NULL, SpellEffectIndex index = EFFECT_INDEX_0); + void _fillEmptyDataField(); // Constants from CreatureAI() diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp index c97b4bd79..fd8c42cde 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp @@ -102,7 +102,7 @@ struct MANGOS_DLL_DECL boss_deathbringer_saurfangAI : public ScriptedAI { if(!pInstance || !summoned) return; - if (Unit* pTarget= m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0) ) { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0) ) { summoned->AddThreat(pTarget, 100.0f); summoned->GetMotionMaster()->MoveChase(pTarget); } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp index 3a1a67106..c8b82e2ca 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp @@ -29,14 +29,33 @@ enum BossSpells SPELL_OOZE_FLOOD = 69789, SPELL_OOZE_FLOOD_0 = 69788, SPELL_OOZE_FLOOD_1 = 69783, + SPELL_OOZE_FLOOD_2 = 69785, SPELL_SLIME_SPRAY = 69508, - SPELL_MUTATED_INFECTION = 69674, + SPELL_MUTATED_INFECTION_0 = 69674, + SPELL_MUTATED_INFECTION = 70003, SPELL_BERSERK = 47008, + SPELL_STICKY_OOZE = 69774, + SPELL_STICKY_AURA = 69776, + SPELL_MERGE_OOZE = 69889, SPELL_RADIATING_OOZE = 69750, SPELL_RADIATING_OOZE_1 = 69760, - SPELL_UNSTABLE_OOZE = 69558, + SPELL_UNSTABLE_OOZE = 69644, + SPELL_UNSTABLE_OOZE_AURA = 69558, SPELL_OOZE_EXPLODE = 69839, + + NPC_BIG_OOZE = 36899, + NPC_SMALL_OOZE = 36897, + NPC_STICKY_OOZE = 37006, + NPC_OOZE_SPRAY_STALKER = 37986, +}; + +static Locations SpawnLoc[]= +{ + {4471.821289f, 3162.986084f, 360.38501f}, // 0 + {4471.821289f, 3110.452148f, 360.38501f}, // 1 + {4418.825684f, 3110.452148f, 360.38501f}, // 2 + {4418.825684f, 3162.986084f, 360.38501f}, // 3 }; struct MANGOS_DLL_DECL boss_rotfaceAI : public ScriptedAI @@ -51,8 +70,10 @@ struct MANGOS_DLL_DECL boss_rotfaceAI : public ScriptedAI ScriptedInstance *pInstance; BossSpellWorker* bsw; uint8 stage; + Unit* InfectionTarget; bool intro; bool pet; + bool nexttick; void Reset() { @@ -61,6 +82,8 @@ struct MANGOS_DLL_DECL boss_rotfaceAI : public ScriptedAI stage = 0; intro = false; pet = false; + nexttick = false; + InfectionTarget = NULL; bsw->resetTimers(); } @@ -114,17 +137,39 @@ struct MANGOS_DLL_DECL boss_rotfaceAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (bsw->timedQuery(SPELL_OOZE_FLOOD_1, diff)){ - bsw->doCast(SPELL_OOZE_FLOOD_1); - DoScriptText(-1631225,m_creature); - }; + if (nexttick) + { + bsw->doCast(SPELL_OOZE_FLOOD_1); + DoScriptText(-1631225,m_creature); + nexttick = false; + }; + + if (bsw->timedQuery(SPELL_OOZE_FLOOD_1, diff)) + { + uint8 i = urand(0,3); + if (Unit* pTemp1 = bsw->doSummon(NPC_OOZE_SPRAY_STALKER,SpawnLoc[i].x, SpawnLoc[i].y, SpawnLoc[i].z)) + nexttick = true; + }; bsw->timedCast(SPELL_SLIME_SPRAY, diff); - if (bsw->timedQuery(SPELL_MUTATED_INFECTION, diff)){ - bsw->doCast(SPELL_MUTATED_INFECTION); - DoScriptText(-1631226,m_creature); - }; + if (InfectionTarget && InfectionTarget->isAlive() && InfectionTarget->IsInMap(m_creature)) + if (!bsw->hasAura(SPELL_MUTATED_INFECTION,InfectionTarget)) + { + float fPosX, fPosY, fPosZ; + InfectionTarget->GetPosition(fPosX, fPosY, fPosZ); + if (Unit* pTemp = bsw->doSummon(NPC_SMALL_OOZE,fPosX, fPosY, fPosZ)) + pTemp->AddThreat(InfectionTarget, 1000.0f); + InfectionTarget = NULL; + }; + + if (bsw->timedQuery(SPELL_MUTATED_INFECTION, diff)) + if (Unit* pTarget = bsw->SelectRandomPlayer(SPELL_MUTATED_INFECTION, false, 60.0f)) + { + InfectionTarget = pTarget; + bsw->doCast(SPELL_MUTATED_INFECTION, InfectionTarget); + DoScriptText(-1631226,m_creature, InfectionTarget); + }; if (bsw->timedQuery(SPELL_BERSERK, diff)){ bsw->doCast(SPELL_BERSERK); @@ -141,6 +186,185 @@ CreatureAI* GetAI_boss_rotface(Creature* pCreature) return new boss_rotfaceAI(pCreature); } +struct MANGOS_DLL_DECL mob_small_oozeAI : public ScriptedAI +{ + mob_small_oozeAI(Creature *pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); + Reset(); + } + + ScriptedInstance *pInstance; + BossSpellWorker* bsw; + + void Reset() + { + bsw->resetTimers(); + bsw->doCast(SPELL_RADIATING_OOZE); + m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); + m_creature->SetSpeedRate(MOVE_RUN, 0.5); + m_creature->SetSpeedRate(MOVE_WALK, 0.5); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!pInstance || pInstance->GetData(TYPE_ROTFACE) != IN_PROGRESS) + m_creature->ForcedDespawn(); + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + bsw->timedCast(SPELL_STICKY_OOZE, uiDiff); + + if (Creature* pTemp = bsw->SelectNearestCreature(m_creature->GetEntry(),7.0f)) + { + bsw->doCast(SPELL_MERGE_OOZE, pTemp); + bsw->doSummon(NPC_BIG_OOZE); + pTemp->ForcedDespawn(); + m_creature->ForcedDespawn(); + }; + } +}; + +CreatureAI* GetAI_mob_small_ooze(Creature* pCreature) +{ + return new mob_small_oozeAI(pCreature); +} + +struct MANGOS_DLL_DECL mob_big_oozeAI : public ScriptedAI +{ + mob_big_oozeAI(Creature *pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); + Reset(); + } + + ScriptedInstance *pInstance; + BossSpellWorker* bsw; + bool exploded; + + void Reset() + { + bsw->resetTimers(); + bsw->doCast(SPELL_UNSTABLE_OOZE); + m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); + m_creature->SetSpeedRate(MOVE_RUN, 0.5); + m_creature->SetSpeedRate(MOVE_WALK, 0.5); + exploded = false; + } + + void UpdateAI(const uint32 uiDiff) + { + if (!pInstance || pInstance->GetData(TYPE_ROTFACE) != IN_PROGRESS) + m_creature->ForcedDespawn(); + + if (exploded) + if (bsw->timedQuery(SPELL_UNSTABLE_OOZE_AURA,uiDiff)) + m_creature->ForcedDespawn(); + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + bsw->timedCast(SPELL_STICKY_OOZE, uiDiff); + + if (Creature* pSmall = bsw->SelectNearestCreature(NPC_SMALL_OOZE,5.0f)) + { + bsw->doCast(SPELL_UNSTABLE_OOZE); + pSmall->ForcedDespawn(); + }; + + if (Creature* pBig = bsw->SelectNearestCreature(m_creature->GetEntry(),10.0f)) + { + bsw->doCast(SPELL_UNSTABLE_OOZE); + pBig->ForcedDespawn(); + } + + if ( bsw->auraCount(SPELL_UNSTABLE_OOZE_AURA) > 4 && !exploded) + { + bsw->doCast(SPELL_OOZE_EXPLODE); + exploded = true; + } + + } +}; + +CreatureAI* GetAI_mob_big_ooze(Creature* pCreature) +{ + return new mob_big_oozeAI(pCreature); +} + +struct MANGOS_DLL_DECL mob_sticky_oozeAI : public ScriptedAI +{ + mob_sticky_oozeAI(Creature *pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance *pInstance; + + void Reset() + { + m_creature->SetDisplayId(11686); + m_creature->CastSpell(m_creature, SPELL_STICKY_AURA, true); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetInCombatWithZone(); + SetCombatMovement(false); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!pInstance || pInstance->GetData(TYPE_ROTFACE) != IN_PROGRESS) + m_creature->ForcedDespawn(); + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + } +}; + +CreatureAI* GetAI_mob_sticky_ooze(Creature* pCreature) +{ + return new mob_sticky_oozeAI(pCreature); +} + +struct MANGOS_DLL_DECL mob_ooze_spray_stalkerAI : public ScriptedAI +{ + mob_ooze_spray_stalkerAI(Creature *pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance *pInstance; + + void Reset() + { + m_creature->SetDisplayId(11686); + m_creature->CastSpell(m_creature, SPELL_OOZE_FLOOD, true); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetInCombatWithZone(); + SetCombatMovement(false); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!pInstance || pInstance->GetData(TYPE_ROTFACE) != IN_PROGRESS) + m_creature->ForcedDespawn(); + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + } +}; + +CreatureAI* GetAI_mob_ooze_spray_stalker(Creature* pCreature) +{ + return new mob_ooze_spray_stalkerAI(pCreature); +} + void AddSC_boss_rotface() { Script *newscript; @@ -148,4 +372,24 @@ void AddSC_boss_rotface() newscript->Name = "boss_rotface"; newscript->GetAI = &GetAI_boss_rotface; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_small_ooze"; + newscript->GetAI = &GetAI_mob_small_ooze; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_big_ooze"; + newscript->GetAI = &GetAI_mob_big_ooze; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_sticky_ooze"; + newscript->GetAI = &GetAI_mob_sticky_ooze; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_ooze_spray_stalker"; + newscript->GetAI = &GetAI_mob_ooze_spray_stalker; + newscript->RegisterSelf(); } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp index e209daef9..784df765e 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp @@ -85,6 +85,8 @@ enum BossSpells //Defile SPELL_DEFILE = 72743, +// Menethil + SPELL_REVALL = 26687, // NPC_ICE_SPHERE = 36633, NPC_DEFILER = 38757, @@ -626,7 +628,7 @@ struct MANGOS_DLL_DECL boss_tirion_iccAI : public ScriptedAI if (pList.isEmpty()) return; for (Map::PlayerList::const_iterator i = pList.begin(); i != pList.end(); ++i) if (Player* pPlayer = i->getSource()) - if (pPlayer) + if (pPlayer && pPlayer->isAlive() && pPlayer->IsInMap(m_creature)) pPlayer->SendMovieStart(FINAL_ARTHAS_MOVIE); } @@ -638,9 +640,9 @@ struct MANGOS_DLL_DECL boss_tirion_iccAI : public ScriptedAI { if (Player* pPlayer = i->getSource()) { - if (pPlayer && !pPlayer->isAlive()) + if (pPlayer && !pPlayer->isAlive() && pPlayer->IsInMap(pMenethil)) { - pMenethil->CastSpell(pPlayer, 26687, true); + pMenethil->CastSpell(pPlayer, SPELL_REVALL, true); pPlayer->ResurrectPlayer(100, false); } } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp index 8a4abec78..76b9cd17b 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp @@ -160,8 +160,8 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance m_auiEncounter[0] = 0; - m_uiMarrogwarGUID =0; - m_uiDeathWhisperGUID =0; + m_uiMarrogwarGUID = 0; + m_uiDeathWhisperGUID = 0; m_uiSaurfangGUID = 0; m_uiSaurfangCacheGUID = 0; m_uiGunshipArmoryAGUID = 0; From 1e192b7002f239fc34ee936487b724b1dedbac6e Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Tue, 15 Jun 2010 19:52:34 +0400 Subject: [PATCH 358/405] Violet hold SQL correct (script need rewrite :( --- addition/716_the_violet_hold_mangos.sql | 59 +++++++++++++++++++++---- 1 file changed, 51 insertions(+), 8 deletions(-) diff --git a/addition/716_the_violet_hold_mangos.sql b/addition/716_the_violet_hold_mangos.sql index bfe19ce5f..c79da055a 100644 --- a/addition/716_the_violet_hold_mangos.sql +++ b/addition/716_the_violet_hold_mangos.sql @@ -1,6 +1,6 @@ /* VIOLET HOLD */ UPDATE `instance_template` SET `script`='instance_violet_hold' WHERE `map`=608; -UPDATE `creature_template` SET `ScriptName`='npc_sinclari', npcflag='1',`minhealth`=ROUND(`minhealth`*4), `maxhealth`=ROUND(`maxhealth`*4) WHERE `entry`='30658'; -- 64 +UPDATE `creature_template` SET `ScriptName`='npc_sinclari', `npcflag`=1,`minhealth`=50400, `maxhealth`=50400 WHERE `entry`='30658'; -- 64 UPDATE `creature_template` SET `ScriptName`='npc_azure_saboteur' WHERE `entry`='31079'; UPDATE `creature_template` SET `ScriptName`='boss_cyanigosa' WHERE `entry`='31134'; UPDATE `creature_template` SET `ScriptName`='boss_erekem' WHERE `entry`='29315'; @@ -21,8 +21,9 @@ DELETE FROM `creature` WHERE map = 608 AND `id`='31134'; -- cyanigosa should not UPDATE `gameobject_template` SET `flags`=`flags`|4 WHERE `entry` IN (191723,191564,191563,191562,191606,191722,191556,191566,191565); -- door untargetable UPDATE `creature_template` SET AIName='EventAI',`ScriptName`='' WHERE `entry` IN ('30660','30695','30666','30668','30667','32191'); -DELETE FROM creature_ai_scripts WHERE creature_id IN ('30660','30695','30666','30668','30667','32191'); -INSERT INTO `creature_ai_scripts` VALUES +DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN ('30660','30695','30666','30668','30667','32191'); +-- old values +/*INSERT INTO `creature_ai_scripts` VALUES ('3066001', '30660', '0', '0', '100', '1', '5000', '10000', '30000', '32000', '11', '58504', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Agonizing Strike'), ('3066002', '30660', '0', '0', '100', '1', '12000', '15000', '24000', '30000', '11', '58508', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Side Swipe'), ('3069501', '30695', '0', '0', '100', '3', '5000', '10000', '30000', '32000', '11', '58531', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Arcane Missiles'), @@ -41,11 +42,53 @@ INSERT INTO `creature_ai_scripts` VALUES ('3066704', '30667', '0', '0', '100', '5', '12000', '15000', '24000', '30000', '11', '60205', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Mana Detonation'), ('3219101', '32191', '0', '0', '100', '1', '11000', '11000', '15000', '15000', '11', '58471', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Backstab'), ('3219102', '32191', '0', '0', '100', '1', '10000', '10000', '15000', '15000', '11', '58470', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Tactical Blink'); +*/ +INSERT INTO `creature_ai_scripts` (`id`, `creature_id`, `event_type`, `event_inverse_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action1_type`, `action1_param1`, `action1_param2`, `action1_param3`, `action2_type`, `action2_param1`, `action2_param2`, `action2_param3`, `action3_type`, `action3_param1`, `action3_param2`, `action3_param3`, `comment`) VALUES +(3066001, 30660, 0, 0, 100, 7, 5000, 7000, 6000, 9000, 11, 58504, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Portal Guardian - Cast Agonizing Strike'), +(3066002, 30660, 0, 0, 100, 7, 7000, 12000, 9000, 11000, 11, 58508, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Portal Guardian - Cast Side Swipe'), +(3066601, 30666, 1, 0, 100, 6, 1000, 1000, 0, 0, 11, 58040, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Azure Captain - Cast Destroy Door Seal on Spawn'), +(3066602, 30666, 9, 0, 100, 7, 0, 5, 5000, 9000, 11, 41056, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Azure Captain - Cast Whirlwind'), +(3066603, 30666, 0, 0, 100, 7, 3000, 6000, 7000, 10000, 11, 32736, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Azure Captain - Cast Mortal Strike'), +(3066701, 30667, 1, 0, 100, 6, 0, 0, 0, 0, 21, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 'Azure Sorceror - Prevent Combat Movement and Set Phase to 0 on Spawn'), +(3066702, 30667, 1, 0, 100, 6, 1000, 1000, 0, 0, 11, 58040, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Azure Sorceror - Cast Destroy Door Seal on Spawn'), +(3066703, 30667, 4, 0, 100, 2, 0, 0, 0, 0, 11, 60181, 4, 0, 23, 1, 0, 0, 0, 0, 0, 0, 'Azure Sorceror (Normal) - Cast Arcane Stream and Set Phase 1 on Aggro'), +(3066704, 30667, 9, 5, 100, 3, 5, 35, 6000, 8000, 11, 60181, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Azure Sorceror (Normal) - Cast Arcane Stream (Phase 1)'), +(3066705, 30667, 4, 0, 100, 4, 0, 0, 0, 0, 11, 60204, 4, 0, 23, 1, 0, 0, 0, 0, 0, 0, 'Azure Sorceror (Heroic) - Cast Arcane Stream and Set Phase 1 on Aggro'), +(3066706, 30667, 9, 5, 100, 5, 5, 35, 6000, 8000, 11, 60204, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Azure Sorceror (Heroic) - Cast Arcane Stream (Phase 1)'), +(3066707, 30667, 3, 5, 100, 6, 7, 0, 0, 0, 21, 1, 0, 0, 23, 1, 0, 0, 0, 0, 0, 0, 'Azure Sorceror - Start Combat Movement and Set Phase 2 when Mana is at 7% (Phase 1)'), +(3066708, 30667, 9, 5, 100, 6, 30, 80, 0, 0, 21, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Azure Sorceror - Start Combat Movement at 30 Yards (Phase 1)'), +(3066709, 30667, 9, 5, 100, 6, 5, 15, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Azure Sorceror - Prevent Combat Movement at 15 Yards (Phase 1)'), +(3066710, 30667, 9, 5, 100, 6, 0, 5, 0, 0, 21, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Azure Sorceror - Start Combat Movement Below 5 Yards'), +(3066711, 30667, 9, 0, 100, 3, 0, 8, 9000, 15000, 11, 60182, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Azure Sorceror (Normal) - Cast Mana Detonation'), +(3066712, 30667, 9, 0, 100, 5, 0, 8, 9000, 15000, 11, 60205, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Azure Sorceror (Heroic) - Cast Mana Detonation'), +(3066713, 30667, 3, 3, 100, 7, 100, 15, 100, 100, 23, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Azure Sorceror - Set Phase 1 when Mana is above 15% (Phase 2)'), +(3066714, 30667, 7, 0, 100, 6, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Azure Sorceror - Set Phase to 0 on Evade'), +(3066801, 30668, 1, 0, 100, 6, 1000, 1000, 0, 0, 11, 58040, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Azure Raider - Cast Destroy Door Seal on Spawn'), +(3066802, 30668, 9, 0, 100, 7, 0, 8, 9000, 14000, 11, 52719, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Azure Raider - Cast Concussion Blow'), +(3066803, 30668, 0, 0, 100, 7, 7000, 14000, 12000, 18000, 11, 60158, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Azure Raider - Cast Magic Reflection'), +(3069501, 30695, 1, 0, 100, 6, 0, 0, 0, 0, 21, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 'Portal Keeper - Prevent Combat Movement and Set Phase to 0 on Spawn'), +(3069502, 30695, 4, 0, 100, 2, 0, 0, 0, 0, 11, 58531, 1, 0, 23, 1, 0, 0, 0, 0, 0, 0, 'Portal Keeper (Normal) - Cast Arcane Missiles and Set Phase 1 on Aggro'), +(3069503, 30695, 9, 5, 100, 3, 0, 45, 6000, 8000, 11, 58531, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Portal Keeper (Normal) - Cast Arcane Missiles (Phase 1)'), +(3069504, 30695, 4, 0, 100, 4, 0, 0, 0, 0, 11, 61593, 1, 0, 23, 1, 0, 0, 0, 0, 0, 0, 'Portal Keeper (Heroic) - Cast Arcane Missiles and Set Phase 1 on Aggro'), +(3069505, 30695, 9, 5, 100, 5, 0, 45, 6000, 8000, 11, 61593, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Portal Keeper (Heroic) - Cast Arcane Missiles (Phase 1)'), +(3069506, 30695, 3, 5, 100, 6, 7, 0, 0, 0, 21, 1, 0, 0, 23, 1, 0, 0, 0, 0, 0, 0, 'Portal Keeper - Start Combat Movement and Set Phase 2 when Mana is at 7% (Phase 1)'), +(3069507, 30695, 9, 5, 100, 6, 40, 80, 0, 0, 21, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Portal Keeper - Start Combat Movement at 40 Yards (Phase 1)'), +(3069508, 30695, 9, 5, 100, 6, 5, 15, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Portal Keeper - Prevent Combat Movement at 15 Yards (Phase 1)'), +(3069509, 30695, 9, 5, 100, 6, 0, 5, 0, 0, 21, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Portal Keeper - Start Combat Movement Below 5 Yards'), +(3069510, 30695, 9, 0, 100, 3, 0, 8, 13000, 19000, 11, 58532, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Portal Keeper (Normal) - Cast Frostbolt Volley'), +(3069511, 30695, 9, 0, 100, 5, 0, 8, 13000, 19000, 11, 61594, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Portal Keeper (Heroic) - Cast Frostbolt Volley'), +(3069512, 30695, 0, 0, 100, 7, 0, 8, 9000, 14000, 11, 58534, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Portal Keeper - Cast Deep Freeze'), +(3069513, 30695, 3, 3, 100, 7, 100, 15, 100, 100, 23, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Portal Keeper - Set Phase 1 when Mana is above 15% (Phase 2)'), +(3069514, 30695, 7, 0, 100, 6, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Portal Keeper - Set Phase to 0 on Evade'), +(3219101, 32191, 1, 0, 100, 6, 1000, 1000, 0, 0, 11, 58040, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Azure Stalker - Cast Destroy Door Seal on Spawn'), +(3219102, 32191, 9, 0, 100, 7, 0, 5, 5000, 7000, 11, 58471, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Azure Stalker - Cast Backstab'), +(3219103, 32191, 0, 0, 100, 7, 11000, 16000, 13000, 21000, 11, 58470, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Azure Stalker - Cast Tactical Blink'); + DELETE FROM `spell_script_target` WHERE `entry` IN (54160,59474); -INSERT INTO spell_script_target VALUES (54160, 1, 29266); -INSERT INTO spell_script_target VALUES (59474, 1, 29266); +INSERT INTO `spell_script_target` VALUES (54160, 1, 29266); +INSERT INTO `spell_script_target` VALUES (59474, 1, 29266); -UPDATE `creature_template` SET `ScriptName`='npc_door_seal_vh', unit_flags=33816580 WHERE entry=30896; -UPDATE `creature_template` SET `faction_A`=35, faction_H=35 WHERE entry=30658; -UPDATE `creature_template` SET `faction_A`=1720, faction_H=1720, ScriptName='mob_vh_dragons', minlevel=70,maxlevel=70,minhealth=7000,maxhealth=8000 WHERE entry IN (30660, 30661, 30662, 30663, 30664, 30666, 30667, 30668, 32191, 30695); +UPDATE `creature_template` SET `ScriptName`='npc_door_seal_vh', `unit_flags`=33816580 WHERE `entry`=30896; +UPDATE `creature_template` SET `faction_A`=35, faction_H=35 WHERE `entry`=30658; +UPDATE `creature_template` SET `faction_A`=1720, faction_H=1720, `ScriptName`='mob_vh_dragons', `minlevel`=70,`maxlevel`=70,`minhealth`=7000,`maxhealth`=8000 WHERE `entry` IN (30660, 30661, 30662, 30663, 30664, 30666, 30667, 30668, 32191, 30695); From 3d6711e952eaf6cbe03e44ba63bbf1fc6f846f38 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Tue, 15 Jun 2010 22:10:52 +0400 Subject: [PATCH 359/405] Smal change to ICC, may fix crashes in assert() --- .../icecrown_citadel/boss_lord_marrowgar.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp index ff6f42582..c06a5f33e 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp @@ -291,9 +291,10 @@ struct MANGOS_DLL_DECL mob_bone_spikeAI : public ScriptedAI m_creature->ForcedDespawn(); } - if(m_creature->IsWithinDistInMap(pVictim, 1.0f) - && pVictim->isAlive() - && !pVictim->HasAura(SPELL_BONE_STRIKE_IMPALE)) + if(pVictim && pVictim->IsInWorld()) + if(m_creature->IsWithinDistInMap(pVictim, 1.0f) + && pVictim->isAlive() + && !pVictim->HasAura(SPELL_BONE_STRIKE_IMPALE)) { bsw->doCast(SPELL_BONE_STRIKE_IMPALE,pVictim); m_creature->GetMotionMaster()->Clear(); From d3b18a5c8aa896c9f3a4ea03902669f0294637e9 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 16 Jun 2010 13:16:52 +0400 Subject: [PATCH 360/405] BSW additional checks (by -Wall) --- include/sc_boss_spell_worker.cpp | 55 +++++++++++++++++-------------- include/sc_boss_spell_worker.h | 56 ++++++++++++++++++++++++-------- 2 files changed, 74 insertions(+), 37 deletions(-) diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index 7246b44f6..66cb1129c 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -10,8 +10,8 @@ BossSpellWorker::BossSpellWorker(ScriptedAI* bossAI) { boss = bossAI->m_creature; bossID = boss->GetEntry(); - if (pMap = boss->GetMap()) - currentDifficulty = pMap->GetDifficulty(); + pMap = boss->GetMap(); + if (pMap) currentDifficulty = pMap->GetDifficulty(); else currentDifficulty = RAID_DIFFICULTY_10MAN_NORMAL; debug_log("BSW: Initializing BossSpellWorker object for boss %u difficulty %u",bossID,currentDifficulty); Reset(); @@ -99,8 +99,7 @@ void BossSpellWorker::LoadSpellTable() m_BossSpell[uiCount].textEntry = pFields[10+DIFFICULTY_LEVELS*4].GetInt32(); if (bossEntry != bossID) error_db_log("BSW: Unknown error while load boss_spell_table"); - - ++uiCount; + else ++uiCount; } while (Result->NextRow()); @@ -178,18 +177,20 @@ CanCastResult BossSpellWorker::_BSWSpellSelector(uint8 m_uiSpellIdx, Unit* pTarg break; case APPLY_AURA_SELF: - if (spell = (SpellEntry *)GetSpellStore()->LookupEntry(pSpell->m_uiSpellEntry[currentDifficulty])) - if(boss->AddAura(new BossAura(spell, EFFECT_INDEX_0, &pSpell->varData, boss, boss))) + spell = (SpellEntry *)GetSpellStore()->LookupEntry(pSpell->m_uiSpellEntry[currentDifficulty]); + if (spell) + if (boss->AddAura(new BossAura(spell, EFFECT_INDEX_0, &pSpell->varData, boss, boss))) return CAST_OK; - else return CAST_FAIL_OTHER; + return CAST_FAIL_OTHER; break; case APPLY_AURA_TARGET: if (!pTarget || !pTarget->IsInMap(boss)) return CAST_FAIL_OTHER; - if (spell = (SpellEntry *)GetSpellStore()->LookupEntry(pSpell->m_uiSpellEntry[currentDifficulty])) - if (pTarget->AddAura(new BossAura(spell, EFFECT_INDEX_0, &pSpell->varData, pTarget, pTarget))) + spell = (SpellEntry *)GetSpellStore()->LookupEntry(pSpell->m_uiSpellEntry[currentDifficulty]); + if (spell) + if (pTarget->AddAura(new BossAura(spell, EFFECT_INDEX_0, &pSpell->varData, pTarget, pTarget))) return CAST_OK; - else return CAST_FAIL_OTHER; + return CAST_FAIL_OTHER; break; case SUMMON_NORMAL: @@ -219,14 +220,18 @@ CanCastResult BossSpellWorker::_BSWSpellSelector(uint8 m_uiSpellIdx, Unit* pTarg { pTarget = itr->getSource(); if (pTarget && pTarget->isAlive() && pTarget->IsWithinDistInMap(boss, pSpell->LocData.x)) - if (!pSpell->m_IsBugged) { - res1 = _DoCastSpellIfCan(pTarget, pSpell->m_uiSpellEntry[currentDifficulty]); - } - else { - _BSWDoCast(m_uiSpellIdx, pTarget); - res1 = CAST_OK; - }; - return res1; + { + if (!pSpell->m_IsBugged) + { + res1 = _DoCastSpellIfCan(pTarget, pSpell->m_uiSpellEntry[currentDifficulty]); + } + else + { + _BSWDoCast(m_uiSpellIdx, pTarget); + res1 = CAST_OK; + }; + }; + return res1; } break; } @@ -254,7 +259,7 @@ CanCastResult BossSpellWorker::_BSWSpellSelector(uint8 m_uiSpellIdx, Unit* pTarg } pTarget->GetPosition(fPosX, fPosY, fPosZ); pTarget->GetRandomPoint(fPosX, fPosY, fPosZ, urand((uint32)pSpell->LocData.x, (uint32)pSpell->LocData.y), fPosX, fPosY, fPosZ); - if ((int)fPosZ == 0) + if ((int)fPosZ == 0) { error_log("BSW: Positon Z is NULL. Strange bug"); return CAST_FAIL_OTHER; @@ -262,11 +267,12 @@ CanCastResult BossSpellWorker::_BSWSpellSelector(uint8 m_uiSpellIdx, Unit* pTarg if (SpellEntry const *spell = (SpellEntry *)GetSpellStore()->LookupEntry(pSpell->m_uiSpellEntry[currentDifficulty])) if (SpellRangeEntry const *pSpellRange = GetSpellRangeStore()->LookupEntry(spell->rangeIndex)) if (boss->GetDistance(fPosX, fPosY, fPosZ) <= pSpellRange->maxRange) - { - boss->CastSpell(fPosX, fPosY, fPosZ, pSpell->m_uiSpellEntry[currentDifficulty], false); + { + boss->CastSpell(fPosX, fPosY, fPosZ, pSpell->m_uiSpellEntry[currentDifficulty], false); return CAST_OK; - } else CAST_FAIL_TOO_FAR; - } else return CAST_FAIL_OTHER; + }; + return CAST_FAIL_TOO_FAR; + } else return CAST_FAIL_OTHER; break; case CAST_ON_RANDOM_PLAYER: @@ -501,7 +507,8 @@ bool BossSpellWorker::_doAura(uint8 m_uiSpellIdx, Unit* pTarget, SpellEffectInde if (pTarget->HasAura(pSpell->m_uiSpellEntry[currentDifficulty])) debug_log("BSW: adding aura stack from spell %u index %u",pSpell->m_uiSpellEntry[currentDifficulty], index); - if (spell = (SpellEntry *)GetSpellStore()->LookupEntry(pSpell->m_uiSpellEntry[currentDifficulty])) + spell = (SpellEntry *)GetSpellStore()->LookupEntry(pSpell->m_uiSpellEntry[currentDifficulty]); + if (spell) { debug_log("BSW: adding aura from spell %u index %u",pSpell->m_uiSpellEntry[currentDifficulty], index); int32 basepoint = pSpell->varData ? pSpell->varData - 1 : spell->EffectBasePoints[index] + 1; diff --git a/include/sc_boss_spell_worker.h b/include/sc_boss_spell_worker.h index cbb8b00ef..8331b7a1e 100644 --- a/include/sc_boss_spell_worker.h +++ b/include/sc_boss_spell_worker.h @@ -106,7 +106,9 @@ class MANGOS_DLL_DECL BossSpellWorker void resetTimer(uint32 SpellID) { - return _resetTimer(FindSpellIDX(SpellID)); + uint8 m_uiSpellIdx = FindSpellIDX(SpellID); + if (!queryIndex(m_uiSpellIdx)) return; + return _resetTimer(m_uiSpellIdx); }; void resetTimers() @@ -117,12 +119,15 @@ class MANGOS_DLL_DECL BossSpellWorker bool timedQuery(uint32 SpellID, uint32 diff) { - return _QuerySpellPeriod(FindSpellIDX(SpellID), diff); + uint8 m_uiSpellIdx = FindSpellIDX(SpellID); + if (!queryIndex(m_uiSpellIdx)) return false; + return _QuerySpellPeriod(m_uiSpellIdx, diff); }; CanCastResult timedCast(uint32 SpellID, uint32 diff, Unit* pTarget = NULL) { uint8 m_uiSpellIdx = FindSpellIDX(SpellID); + if (!queryIndex(m_uiSpellIdx)) return CAST_FAIL_OTHER; if (!_QuerySpellPeriod(FindSpellIDX(SpellID), diff)) return CAST_FAIL_STATE; else return _BSWSpellSelector(m_uiSpellIdx, pTarget); }; @@ -130,7 +135,7 @@ class MANGOS_DLL_DECL BossSpellWorker CanCastResult doCast(uint32 SpellID, Unit* pTarget = NULL) { uint8 m_uiSpellIdx = FindSpellIDX(SpellID); - if ( m_uiSpellIdx != SPELL_INDEX_ERROR) return _BSWSpellSelector(m_uiSpellIdx, pTarget); + if (queryIndex(m_uiSpellIdx)) return _BSWSpellSelector(m_uiSpellIdx, pTarget); else return CAST_FAIL_OTHER; }; @@ -138,36 +143,46 @@ class MANGOS_DLL_DECL BossSpellWorker { if (!pTarget) return CAST_FAIL_OTHER; uint8 m_uiSpellIdx = FindSpellIDX(SpellID); - if ( m_uiSpellIdx != SPELL_INDEX_ERROR) return _BSWCastOnTarget(pTarget, m_uiSpellIdx); + if (queryIndex(m_uiSpellIdx)) return _BSWCastOnTarget(pTarget, m_uiSpellIdx); else return CAST_FAIL_OTHER; }; bool doRemove(uint32 SpellID, Unit* pTarget = NULL, SpellEffectIndex index = EFFECT_INDEX_0) { - return _doRemove(FindSpellIDX(SpellID),pTarget, index); + uint8 m_uiSpellIdx = FindSpellIDX(SpellID); + if (!queryIndex(m_uiSpellIdx)) return false; + return _doRemove(m_uiSpellIdx,pTarget, index); }; bool doAura(uint32 SpellID, Unit* pTarget = NULL, SpellEffectIndex index = EFFECT_INDEX_0) { - return _doAura(FindSpellIDX(SpellID),pTarget, index); + uint8 m_uiSpellIdx = FindSpellIDX(SpellID); + if (!queryIndex(m_uiSpellIdx)) return false; + return _doAura(m_uiSpellIdx,pTarget, index); }; bool hasAura(uint32 SpellID, Unit* pTarget = NULL) { + uint8 m_uiSpellIdx = FindSpellIDX(SpellID); + if (!queryIndex(m_uiSpellIdx)) return false; if (!pTarget) pTarget = boss; - return _hasAura(FindSpellIDX(SpellID),pTarget); + return _hasAura(m_uiSpellIdx,pTarget); }; uint8 auraCount(uint32 SpellID, Unit* pTarget = NULL, SpellEffectIndex index = EFFECT_INDEX_0) { + uint8 m_uiSpellIdx = FindSpellIDX(SpellID); + if (!queryIndex(m_uiSpellIdx)) return 0; if (!pTarget) pTarget = boss; - if (!_hasAura(FindSpellIDX(SpellID),pTarget)) return 0; - else return _auraCount(FindSpellIDX(SpellID),pTarget,index); + if (!_hasAura(m_uiSpellIdx,pTarget)) return 0; + else return _auraCount(m_uiSpellIdx,pTarget,index); }; Unit* doSummon(uint32 SpellID, TempSummonType type = TEMPSUMMON_CORPSE_TIMED_DESPAWN, uint32 delay = 60000) { - return _doSummon(FindSpellIDX(SpellID), type, delay); + uint8 m_uiSpellIdx = FindSpellIDX(SpellID); + if (!queryIndex(m_uiSpellIdx)) return NULL; + return _doSummon(m_uiSpellIdx, type, delay); }; Unit* SelectRandomPlayer(uint32 SpellID = 0, bool spellsearchtype = false, float range = 100.0f) @@ -182,17 +197,23 @@ class MANGOS_DLL_DECL BossSpellWorker Unit* doSummon(uint32 SpellID, float fPosX, float fPosY, float fPosZ, TempSummonType type = TEMPSUMMON_CORPSE_TIMED_DESPAWN, uint32 delay = 60000) { - return _doSummonAtPosition(FindSpellIDX(SpellID), type, delay, fPosX, fPosY, fPosZ); + uint8 m_uiSpellIdx = FindSpellIDX(SpellID); + if (!queryIndex(m_uiSpellIdx)) return NULL; + return _doSummonAtPosition(m_uiSpellIdx, type, delay, fPosX, fPosY, fPosZ); }; CanCastResult BSWSpellSelector(uint32 SpellID, Unit* pTarget = NULL) { - return _BSWSpellSelector(FindSpellIDX(SpellID), pTarget); + uint8 m_uiSpellIdx = FindSpellIDX(SpellID); + if (!queryIndex(m_uiSpellIdx)) return CAST_FAIL_OTHER; + return _BSWSpellSelector(m_uiSpellIdx, pTarget); }; CanCastResult BSWDoCast(uint32 SpellID, Unit* pTarget) { - return _BSWDoCast(FindSpellIDX(SpellID), pTarget); + uint8 m_uiSpellIdx = FindSpellIDX(SpellID); + if (!queryIndex(m_uiSpellIdx)) return CAST_FAIL_OTHER; + return _BSWDoCast(m_uiSpellIdx, pTarget); }; Unit* SelectLowHPFriendly(float fRange = 40.0f, uint32 uiMinHPDiff = 0); @@ -202,6 +223,15 @@ class MANGOS_DLL_DECL BossSpellWorker return _bossSpellCount; }; + bool queryIndex(uint8 m_uiSpellIdx) + { + if ( (m_uiSpellIdx >= 0) + && (m_uiSpellIdx <= bossSpellCount()) + && (m_uiSpellIdx != SPELL_INDEX_ERROR)) + return true; + else return false; + }; + Creature* SelectNearestCreature(uint32 guid, float range = 120.0f); private: From a84e86aa08d03fa6afcb47e9f93c8b590e2e344d Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 16 Jun 2010 13:17:50 +0400 Subject: [PATCH 361/405] ICC41 - remove unneeded spel from Sindragosa --- addition/721_icecrown_spelltable_scriptdev2.sql | 1 - .../icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp | 3 --- 2 files changed, 4 deletions(-) diff --git a/addition/721_icecrown_spelltable_scriptdev2.sql b/addition/721_icecrown_spelltable_scriptdev2.sql index f2387d085..a88194d9b 100644 --- a/addition/721_icecrown_spelltable_scriptdev2.sql +++ b/addition/721_icecrown_spelltable_scriptdev2.sql @@ -260,7 +260,6 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ (37955, 71446, 0, 0, 0, 5000, 0, 0, 0, 8000, 0, 0, 0, 0, 0, 0, 4, 0, 0), (37955, 71772, 0, 0, 0, 90000, 0, 0, 0, 90000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (37955, 47008, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 0, 0, 0, 1, 0, 0), -(37955, 57764, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 1, 0), (37955, 71952, 0, 0, 0, 5000, 0, 0, 0, 8000, 0, 0, 0, 0, 0, 0, 1, 0, 0); -- Valithria diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp index 1317fdd42..1ca7fb7df 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp @@ -50,7 +50,6 @@ enum BossSpells NPC_ICE_TOMB = 36980, NPC_FROST_BOMB = 37186, - SPELL_FLY_VISUAL = 57764, SPELL_BERSERK = 47008, // Rimefang @@ -261,7 +260,6 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI stage = 2; MovementStarted = true; SetCombatMovement(false); - bsw->doCast(SPELL_FLY_VISUAL); m_creature->SetUInt32Value(UNIT_FIELD_BYTES_0, 50331648); m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 50331648); m_creature->GetMotionMaster()->MovePoint(1, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z); @@ -302,7 +300,6 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public ScriptedAI stage = 0; SetCombatMovement(true); m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); - bsw->doRemove(SPELL_FLY_VISUAL); m_creature->SetUInt32Value(UNIT_FIELD_BYTES_0, 0); m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); m_creature->RemoveSplineFlag(SPLINEFLAG_FLYING); From 33bdf286cb230509bd17dc39097ae8f8b5939a90 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 16 Jun 2010 18:32:45 +0400 Subject: [PATCH 362/405] Violet hold work restore. --- addition/716_the_violet_hold_mangos.sql | 21 -- .../northrend/violet_hold/boss_cyanigosa.cpp | 1 + scripts/northrend/violet_hold/boss_erekem.cpp | 64 ++++- .../northrend/violet_hold/boss_ichoron.cpp | 37 ++- .../northrend/violet_hold/boss_lavanthor.cpp | 39 ++- scripts/northrend/violet_hold/boss_moragg.cpp | 34 ++- scripts/northrend/violet_hold/boss_xevozz.cpp | 32 ++- .../northrend/violet_hold/boss_zuramat.cpp | 31 ++- .../northrend/violet_hold/def_violet_hold.h | 2 + scripts/northrend/violet_hold/violet_hold.cpp | 32 +-- scripts/northrend/violet_hold/violet_hold.h | 229 ------------------ 11 files changed, 204 insertions(+), 318 deletions(-) delete mode 100644 scripts/northrend/violet_hold/violet_hold.h diff --git a/addition/716_the_violet_hold_mangos.sql b/addition/716_the_violet_hold_mangos.sql index c79da055a..59b83e1d7 100644 --- a/addition/716_the_violet_hold_mangos.sql +++ b/addition/716_the_violet_hold_mangos.sql @@ -22,27 +22,6 @@ UPDATE `gameobject_template` SET `flags`=`flags`|4 WHERE `entry` IN (191723,1915 UPDATE `creature_template` SET AIName='EventAI',`ScriptName`='' WHERE `entry` IN ('30660','30695','30666','30668','30667','32191'); DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN ('30660','30695','30666','30668','30667','32191'); --- old values -/*INSERT INTO `creature_ai_scripts` VALUES -('3066001', '30660', '0', '0', '100', '1', '5000', '10000', '30000', '32000', '11', '58504', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Agonizing Strike'), -('3066002', '30660', '0', '0', '100', '1', '12000', '15000', '24000', '30000', '11', '58508', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Side Swipe'), -('3069501', '30695', '0', '0', '100', '3', '5000', '10000', '30000', '32000', '11', '58531', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Arcane Missiles'), -('3069502', '30695', '0', '0', '100', '1', '12000', '15000', '24000', '30000', '11', '58534', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Deep Freeze'), -('3069503', '30695', '0', '0', '100', '3', '12000', '15000', '24000', '30000', '11', '58532', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Frostbolt Volley'), -('3069504', '30695', '0', '0', '100', '5', '5000', '10000', '30000', '32000', '11', '61593', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Arcane Missiles'), -('3069505', '30695', '0', '0', '100', '5', '12000', '15000', '24000', '30000', '11', '61594', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Frostbolt Volley'), -('3066601', '30666', '0', '0', '100', '1', '12000', '15000', '24000', '30000', '11', '32736', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Mortal Strike'), -('3066602', '30666', '0', '0', '100', '3', '12000', '15000', '24000', '30000', '11', '41057', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Whirlwind'), -('3066603', '30666', '0', '0', '100', '5', '5000', '10000', '30000', '32000', '11', '41056', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Whirlwind'), -('3066801', '30668', '0', '0', '100', '1', '12000', '15000', '24000', '30000', '11', '60158', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Magic Reflection'), -('3066802', '30668', '0', '0', '100', '1', '12000', '15000', '24000', '30000', '11', '52719', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Concussion Blow'), -('3066701', '30667', '0', '0', '100', '3', '5000', '10000', '30000', '32000', '11', '60181', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Arcane Stream'), -('3066702', '30667', '0', '0', '100', '3', '12000', '15000', '24000', '30000', '11', '60182', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Mana Detonation'), -('3066703', '30667', '0', '0', '100', '5', '5000', '10000', '30000', '32000', '11', '60204', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Arcane Stream'), -('3066704', '30667', '0', '0', '100', '5', '12000', '15000', '24000', '30000', '11', '60205', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Mana Detonation'), -('3219101', '32191', '0', '0', '100', '1', '11000', '11000', '15000', '15000', '11', '58471', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Backstab'), -('3219102', '32191', '0', '0', '100', '1', '10000', '10000', '15000', '15000', '11', '58470', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Tactical Blink'); -*/ INSERT INTO `creature_ai_scripts` (`id`, `creature_id`, `event_type`, `event_inverse_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action1_type`, `action1_param1`, `action1_param2`, `action1_param3`, `action2_type`, `action2_param1`, `action2_param2`, `action2_param3`, `action3_type`, `action3_param1`, `action3_param2`, `action3_param3`, `comment`) VALUES (3066001, 30660, 0, 0, 100, 7, 5000, 7000, 6000, 9000, 11, 58504, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Portal Guardian - Cast Agonizing Strike'), (3066002, 30660, 0, 0, 100, 7, 7000, 12000, 9000, 11000, 11, 58508, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Portal Guardian - Cast Side Swipe'), diff --git a/scripts/northrend/violet_hold/boss_cyanigosa.cpp b/scripts/northrend/violet_hold/boss_cyanigosa.cpp index cc8db5b88..7eb3bef49 100644 --- a/scripts/northrend/violet_hold/boss_cyanigosa.cpp +++ b/scripts/northrend/violet_hold/boss_cyanigosa.cpp @@ -76,6 +76,7 @@ struct MANGOS_DLL_DECL boss_cyanigosaAI : public ScriptedAI m_uiTailSweep_Timer = urand(10000, 11000); m_uiArcaneVacuum_Timer = urand(28000, 33000); MovementStarted = false; + m_creature->SetInCombatWithZone(); } void Aggro(Unit* pWho) diff --git a/scripts/northrend/violet_hold/boss_erekem.cpp b/scripts/northrend/violet_hold/boss_erekem.cpp index d6a2ef186..e67ffaeca 100644 --- a/scripts/northrend/violet_hold/boss_erekem.cpp +++ b/scripts/northrend/violet_hold/boss_erekem.cpp @@ -75,6 +75,8 @@ struct MANGOS_DLL_DECL boss_erekemAI : public ScriptedAI void Reset() { + if (!m_pInstance) return; + m_bIsAddDead = false; MovementStarted = false; m_uiLightningBolt_Timer = 2000; @@ -93,7 +95,6 @@ struct MANGOS_DLL_DECL boss_erekemAI : public ScriptedAI if ((*iter)->isDead()) (*iter)->Respawn(); - if (m_pInstance) m_pInstance->SetData(TYPE_EREKEM, NOT_STARTED); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); @@ -102,11 +103,11 @@ struct MANGOS_DLL_DECL boss_erekemAI : public ScriptedAI void Aggro(Unit* pWho) { + if (!m_pInstance) return; DoScriptText(SAY_AGGRO, m_creature); - - if (m_pInstance) - m_pInstance->SetData(TYPE_EREKEM, IN_PROGRESS); - + m_pInstance->SetData(TYPE_EREKEM, IN_PROGRESS); + m_creature->GetMotionMaster()->MovementExpired(); + SetCombatMovement(true); } void AttackStart(Unit* pWho) @@ -140,15 +141,32 @@ struct MANGOS_DLL_DECL boss_erekemAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void StartMovement(uint32 id) { - if (m_pInstance->GetData(TYPE_EREKEM) == SPECIAL && !MovementStarted) { - m_creature->GetMotionMaster()->MovePoint(0, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z); + m_creature->GetMotionMaster()->MovePoint(id, PortalLoc[id].x, PortalLoc[id].y, PortalLoc[id].z); m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetInCombatWithZone(); MovementStarted = true; + } + + void MovementInform(uint32 type, uint32 id) + { + if (type != POINT_MOTION_TYPE || !MovementStarted) return; + if (id == 0) + { + MovementStarted = false; + m_creature->GetMotionMaster()->MovementExpired(); + SetCombatMovement(true); + m_creature->SetInCombatWithZone(); } + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_pInstance->GetData(TYPE_EREKEM) == SPECIAL && !MovementStarted) + StartMovement(0); //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -253,6 +271,13 @@ struct MANGOS_DLL_DECL mob_erekem_guardAI : public ScriptedAI } + void Aggro(Unit* pWho) + { + if (!m_pInstance) return; + m_creature->GetMotionMaster()->MovementExpired(); + SetCombatMovement(true); + } + void AttackStart(Unit* pWho) { if (!m_pInstance) @@ -274,15 +299,32 @@ struct MANGOS_DLL_DECL mob_erekem_guardAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void StartMovement(uint32 id) { - if (m_pInstance->GetData(TYPE_EREKEM) == SPECIAL && !MovementStarted) { - m_creature->GetMotionMaster()->MovePoint(0, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z); + m_creature->GetMotionMaster()->MovePoint(id, PortalLoc[id].x, PortalLoc[id].y, PortalLoc[id].z); m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); MovementStarted = true; + m_creature->SetInCombatWithZone(); + } + + void MovementInform(uint32 type, uint32 id) + { + if (type != POINT_MOTION_TYPE || !MovementStarted) return; + if (id == 0) + { + MovementStarted = false; + m_creature->GetMotionMaster()->MovementExpired(); + SetCombatMovement(true); + m_creature->SetInCombatWithZone(); } + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_pInstance->GetData(TYPE_EREKEM) == SPECIAL && !MovementStarted) + StartMovement(0); //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/scripts/northrend/violet_hold/boss_ichoron.cpp b/scripts/northrend/violet_hold/boss_ichoron.cpp index 434cccc79..1ef1057f9 100644 --- a/scripts/northrend/violet_hold/boss_ichoron.cpp +++ b/scripts/northrend/violet_hold/boss_ichoron.cpp @@ -73,6 +73,7 @@ struct MANGOS_DLL_DECL boss_ichoronAI : public ScriptedAI void Reset() { + if (!m_pInstance) return; m_bIsExploded = false; m_bIsFrenzy = false; MovementStarted = false; @@ -83,18 +84,18 @@ struct MANGOS_DLL_DECL boss_ichoronAI : public ScriptedAI m_creature->SetVisibility(VISIBILITY_ON); DespawnWaterElements(); - if (m_pInstance) - m_pInstance->SetData(TYPE_ICHORON, NOT_STARTED); + m_pInstance->SetData(TYPE_ICHORON, NOT_STARTED); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } void Aggro(Unit* pWho) { - DoScriptText(SAY_AGGRO, m_creature); + if (m_pInstance) return; - if (m_pInstance) - m_pInstance->SetData(TYPE_ICHORON, IN_PROGRESS); + DoScriptText(SAY_AGGRO, m_creature); + m_pInstance->SetData(TYPE_ICHORON, IN_PROGRESS); + SetCombatMovement(true); } void AttackStart(Unit* pWho) @@ -157,15 +158,32 @@ struct MANGOS_DLL_DECL boss_ichoronAI : public ScriptedAI m_lWaterElementsGUIDList.clear(); } - void UpdateAI(const uint32 uiDiff) + void StartMovement(uint32 id) { - if (m_pInstance->GetData(TYPE_ICHORON) == SPECIAL && !MovementStarted) { - m_creature->GetMotionMaster()->MovePoint(0, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z); + m_creature->GetMotionMaster()->MovePoint(id, PortalLoc[id].x, PortalLoc[id].y, PortalLoc[id].z); m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); MovementStarted = true; + m_creature->SetInCombatWithZone(); + } + + void MovementInform(uint32 type, uint32 id) + { + if (type != POINT_MOTION_TYPE || !MovementStarted) return; + if (id == 0) + { + MovementStarted = false; + m_creature->GetMotionMaster()->MovementExpired(); + SetCombatMovement(true); + m_creature->SetInCombatWithZone(); } + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_pInstance->GetData(TYPE_ICHORON) == SPECIAL && !MovementStarted) + StartMovement(0); //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -185,12 +203,10 @@ struct MANGOS_DLL_DECL boss_ichoronAI : public ScriptedAI m_uiShowup_Counter = 0; DoCast(m_creature, SPELL_PROTECTIVE_BUBBLE); m_creature->AttackStop(); -// m_creature->SetVisibility(VISIBILITY_OFF); for(uint8 i = 0; i < 10; i++) { int tmp = urand(0, 5); m_creature->SummonCreature(NPC_ICHOR_GLOBULE, PortalLoc[tmp].x, PortalLoc[tmp].y, PortalLoc[tmp].z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); - //m_creature->SummonCreature(NPC_ICHOR_GLOBULE, m_creature->GetPositionX()-10+rand()%20, m_creature->GetPositionY()-10+rand()%20, m_creature->GetPositionZ(), 0, TEMPSUMMON_CORPSE_DESPAWN, 0); } } m_uiBuubleChecker_Timer = 3000; @@ -210,7 +226,6 @@ struct MANGOS_DLL_DECL boss_ichoronAI : public ScriptedAI { m_bIsExploded = false; m_uiShowup_Counter = 0; -// m_creature->SetVisibility(VISIBILITY_ON); m_creature->SetInCombatWithZone(); m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); } diff --git a/scripts/northrend/violet_hold/boss_lavanthor.cpp b/scripts/northrend/violet_hold/boss_lavanthor.cpp index 8c101da94..efbbd86a6 100644 --- a/scripts/northrend/violet_hold/boss_lavanthor.cpp +++ b/scripts/northrend/violet_hold/boss_lavanthor.cpp @@ -55,22 +55,23 @@ struct MANGOS_DLL_DECL boss_lavanthorAI : public ScriptedAI void Reset() { + if (!m_pInstance) return; m_uiCauterizingFlames_Timer = urand(40000, 41000); m_uiFlameBreath_Timer = urand(15000, 16000); m_uiFirebolt_Timer = urand(10000, 11000); MovementStarted = false; - if (m_pInstance) - m_pInstance->SetData(TYPE_LAVANTHOR, NOT_STARTED); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - + m_pInstance->SetData(TYPE_LAVANTHOR, NOT_STARTED); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } void Aggro(Unit* pWho) { - if (m_pInstance) - m_pInstance->SetData(TYPE_LAVANTHOR, IN_PROGRESS); + if (!m_pInstance) return; + m_pInstance->SetData(TYPE_LAVANTHOR, IN_PROGRESS); + m_creature->GetMotionMaster()->MovementExpired(); + SetCombatMovement(true); } void AttackStart(Unit* pWho) @@ -93,15 +94,33 @@ struct MANGOS_DLL_DECL boss_lavanthorAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void StartMovement(uint32 id) { - if (m_pInstance->GetData(TYPE_LAVANTHOR) == SPECIAL && !MovementStarted) { - m_creature->GetMotionMaster()->MovePoint(0, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z); + m_creature->GetMotionMaster()->MovePoint(id, PortalLoc[id].x, PortalLoc[id].y, PortalLoc[id].z); m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); MovementStarted = true; + m_creature->SetInCombatWithZone(); + } + + void MovementInform(uint32 type, uint32 id) + { + if (type != POINT_MOTION_TYPE || !MovementStarted) return; + if (id == 0 ) + { + MovementStarted = false; + m_creature->GetMotionMaster()->MovementExpired(); + SetCombatMovement(true); + m_creature->SetInCombatWithZone(); } + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_pInstance->GetData(TYPE_LAVANTHOR) == SPECIAL && !MovementStarted) + StartMovement(0); + //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; diff --git a/scripts/northrend/violet_hold/boss_moragg.cpp b/scripts/northrend/violet_hold/boss_moragg.cpp index 713b058a9..f7844f545 100644 --- a/scripts/northrend/violet_hold/boss_moragg.cpp +++ b/scripts/northrend/violet_hold/boss_moragg.cpp @@ -47,7 +47,7 @@ struct MANGOS_DLL_DECL boss_moraggAI : public ScriptedAI uint32 m_uiCorrosiveSaliva_Timer; uint32 m_uiOpticLink_Timer; uint32 m_uiRay_Timer; - + bool MovementStarted; void Reset() @@ -66,9 +66,10 @@ struct MANGOS_DLL_DECL boss_moraggAI : public ScriptedAI void Aggro(Unit* pWho) { - if (m_pInstance) - m_pInstance->SetData(TYPE_MORAGG, IN_PROGRESS); - + if (!m_pInstance) return; + m_pInstance->SetData(TYPE_MORAGG, IN_PROGRESS); + m_creature->GetMotionMaster()->MovementExpired(); + SetCombatMovement(true); } void AttackStart(Unit* pWho) @@ -91,15 +92,32 @@ struct MANGOS_DLL_DECL boss_moraggAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void StartMovement(uint32 id) { - if (m_pInstance->GetData(TYPE_MORAGG) == SPECIAL && !MovementStarted) { - m_creature->GetMotionMaster()->MovePoint(0, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z); + m_creature->GetMotionMaster()->MovePoint(id, PortalLoc[id].x, PortalLoc[id].y, PortalLoc[id].z); m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); MovementStarted = true; - } + m_creature->SetInCombatWithZone(); + } + + void MovementInform(uint32 type, uint32 id) + { + if (type != POINT_MOTION_TYPE || !MovementStarted) return; + if (id == 0) + { + MovementStarted = false; + m_creature->GetMotionMaster()->MovementExpired(); + SetCombatMovement(true); + m_creature->SetInCombatWithZone(); + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_pInstance->GetData(TYPE_MORAGG) == SPECIAL && !MovementStarted) + StartMovement(0); //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/scripts/northrend/violet_hold/boss_xevozz.cpp b/scripts/northrend/violet_hold/boss_xevozz.cpp index 30f8b1dd9..f717604d4 100644 --- a/scripts/northrend/violet_hold/boss_xevozz.cpp +++ b/scripts/northrend/violet_hold/boss_xevozz.cpp @@ -87,11 +87,12 @@ struct MANGOS_DLL_DECL boss_xevozzAI : public ScriptedAI void Aggro(Unit* pWho) { - DoScriptText(SAY_AGGRO, m_creature); - - if (m_pInstance) - m_pInstance->SetData(TYPE_XEVOZZ, IN_PROGRESS); + if (!m_pInstance) return; + DoScriptText(SAY_AGGRO, m_creature); + m_pInstance->SetData(TYPE_XEVOZZ, IN_PROGRESS); + m_creature->GetMotionMaster()->MovementExpired(); + SetCombatMovement(true); } void AttackStart(Unit* pWho) @@ -136,15 +137,32 @@ struct MANGOS_DLL_DECL boss_xevozzAI : public ScriptedAI } } - void UpdateAI(const uint32 uiDiff) + void StartMovement(uint32 id) { - if (m_pInstance->GetData(TYPE_XEVOZZ) == SPECIAL && !MovementStarted) { - m_creature->GetMotionMaster()->MovePoint(0, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z); + m_creature->GetMotionMaster()->MovePoint(id, PortalLoc[id].x, PortalLoc[id].y, PortalLoc[id].z); m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); MovementStarted = true; + m_creature->SetInCombatWithZone(); + } + + void MovementInform(uint32 type, uint32 id) + { + if (type != POINT_MOTION_TYPE || !MovementStarted) return; + if (id == 0) + { + MovementStarted = false; + m_creature->GetMotionMaster()->MovementExpired(); + SetCombatMovement(true); + m_creature->SetInCombatWithZone(); } + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_pInstance->GetData(TYPE_XEVOZZ) == SPECIAL && !MovementStarted) + StartMovement(0); //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/scripts/northrend/violet_hold/boss_zuramat.cpp b/scripts/northrend/violet_hold/boss_zuramat.cpp index 39f7432cc..103e9696f 100644 --- a/scripts/northrend/violet_hold/boss_zuramat.cpp +++ b/scripts/northrend/violet_hold/boss_zuramat.cpp @@ -83,11 +83,11 @@ struct MANGOS_DLL_DECL boss_zuramatAI : public ScriptedAI void Aggro(Unit* pWho) { + if (!m_pInstance) return; DoScriptText(SAY_AGGRO, m_creature); - - if (m_pInstance) - m_pInstance->SetData(TYPE_ZURAMAT, IN_PROGRESS); - + m_pInstance->SetData(TYPE_ZURAMAT, IN_PROGRESS); + m_creature->GetMotionMaster()->MovementExpired(); + SetCombatMovement(true); } void AttackStart(Unit* pWho) @@ -135,15 +135,32 @@ struct MANGOS_DLL_DECL boss_zuramatAI : public ScriptedAI m_lSentryGUIDList.clear(); } - void UpdateAI(const uint32 uiDiff) + void StartMovement(uint32 id) { - if (m_pInstance->GetData(TYPE_ZURAMAT) == SPECIAL && !MovementStarted) { - m_creature->GetMotionMaster()->MovePoint(0, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z); + m_creature->GetMotionMaster()->MovePoint(id, PortalLoc[id].x, PortalLoc[id].y, PortalLoc[id].z); m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); MovementStarted = true; + m_creature->SetInCombatWithZone(); + } + + void MovementInform(uint32 type, uint32 id) + { + if (type != POINT_MOTION_TYPE || !MovementStarted) return; + if (id == 0) + { + MovementStarted = false; + m_creature->GetMotionMaster()->MovementExpired(); + SetCombatMovement(true); + m_creature->SetInCombatWithZone(); } + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_pInstance->GetData(TYPE_ZURAMAT) == SPECIAL && !MovementStarted) + StartMovement(0); //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/scripts/northrend/violet_hold/def_violet_hold.h b/scripts/northrend/violet_hold/def_violet_hold.h index 7f34571dc..177c66a9d 100644 --- a/scripts/northrend/violet_hold/def_violet_hold.h +++ b/scripts/northrend/violet_hold/def_violet_hold.h @@ -97,6 +97,7 @@ struct Locations float x, y, z; uint32 id; }; + struct WayPoints { WayPoints(uint32 _id, float _x, float _y, float _z) @@ -132,6 +133,7 @@ static Locations BossLoc[]= {1857.125, 763.295, 38.654}, // Lavanthor {1925.480, 849.981, 47.174}, // Zuramat }; + static Locations DragonsWP[]= { //center, ichoron diff --git a/scripts/northrend/violet_hold/violet_hold.cpp b/scripts/northrend/violet_hold/violet_hold.cpp index fe3c97247..a3c8c908e 100644 --- a/scripts/northrend/violet_hold/violet_hold.cpp +++ b/scripts/northrend/violet_hold/violet_hold.cpp @@ -106,7 +106,7 @@ struct MANGOS_DLL_DECL mob_vh_dragonsAI : public ScriptedAI IsInCombat = false; MovementStarted = false; pDoorSeal = GetClosestCreatureWithEntry(m_creature, NPC_DOOR_SEAL, 150.0f); - + //Azure Captain m_uiMortalStrike_Timer = 3000; m_uiWhirlwind_Timer = 5000; @@ -123,10 +123,11 @@ struct MANGOS_DLL_DECL mob_vh_dragonsAI : public ScriptedAI m_uiBackstab_Timer = 7100; m_uiBlink_Timer = 7000; - if (creatureEntry == NPC_KEEPER) + if (creatureEntry == NPC_KEEPER + || creatureEntry == NPC_GUARDIAN) { - SetCombatMovement(false); - m_creature->GetMotionMaster()->MoveRandom(); + SetCombatMovement(false); + m_creature->GetMotionMaster()->MoveRandom(); }; } @@ -370,10 +371,12 @@ struct MANGOS_DLL_DECL npc_violet_portalAI : public ScriptedAI portalType = 0; portalID = 0; portalLoc = -1; - TimeRiftWave_Timer = 15000; Check_Timer = 5000; + + m_creature->SetRespawnDelay(DAY); } + uint32 SelectRandSummon() { uint32 entry = 0; @@ -385,7 +388,7 @@ struct MANGOS_DLL_DECL npc_violet_portalAI : public ScriptedAI case 1: entry = NPC_AZURE_INVADER; break; case 2: entry = NPC_AZURE_MAGE_SLAYER; break; case 3: entry = NPC_AZURE_SPELLBREAKER; break; - } + } }else{ switch (urand(0, 3)) { @@ -393,7 +396,7 @@ struct MANGOS_DLL_DECL npc_violet_portalAI : public ScriptedAI case 1: entry = NPC_AZURE_RAIDER; break; case 2: entry = NPC_AZURE_SORCEROR; break; case 3: entry = NPC_AZURE_STALKER; break; - } + } } return entry; } @@ -442,6 +445,7 @@ struct MANGOS_DLL_DECL npc_violet_portalAI : public ScriptedAI } return false; } + void UpdateAI(const uint32 diff) { if (!m_pInstance) @@ -466,7 +470,7 @@ struct MANGOS_DLL_DECL npc_violet_portalAI : public ScriptedAI { m_uiNextPortal_Timer = 5000; debug_log("SD2: npc_time_rift: not casting anylonger, i need to die."); - m_creature->setDeathState(JUST_DIED); + m_creature->ForcedDespawn(); } break; case 2: @@ -481,7 +485,7 @@ struct MANGOS_DLL_DECL npc_violet_portalAI : public ScriptedAI { m_uiNextPortal_Timer = 5000; debug_log("SD2: npc_time_rift: No elite, i need to die."); - m_creature->setDeathState(JUST_DIED); + m_creature->ForcedDespawn(); } Check_Timer = 1000; }else Check_Timer -= diff; @@ -540,7 +544,7 @@ struct MANGOS_DLL_DECL npc_sinclariAI : public ScriptedAI ((npc_violet_portalAI*)pTemp->AI())->portalType = portalType; ((npc_violet_portalAI*)pTemp->AI())->portalID = portalID; ((npc_violet_portalAI*)pTemp->AI())->portalLoc = tmp; - + if(portalType == 1) { uint32 entry = urand(0, 1) ? NPC_GUARDIAN : NPC_KEEPER; @@ -591,11 +595,11 @@ struct MANGOS_DLL_DECL npc_sinclariAI : public ScriptedAI || m_uiRiftPortalCount == 15 || m_uiRiftPortalCount == 18 ) { - if (Creature* pTemp = m_creature->SummonCreature(NPC_PORTAL, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000)) + if (Creature* pTemp = m_creature->SummonCreature(NPC_PORTAL, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z, 0, TEMPSUMMON_TIMED_DESPAWN, 15000)) { - Creature* pSummoned = m_creature->SummonCreature(NPC_AZURE_SABOTEUR, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000); - - pSummoned->AddThreat(pTemp); + pTemp->SetRespawnDelay(7*DAY); + Creature* pSummoned = m_creature->SummonCreature(NPC_AZURE_SABOTEUR, PortalLoc[0].x, PortalLoc[0].y, PortalLoc[0].z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); +// pSummoned->AddThreat(pTemp); pTemp->CastSpell(pSummoned, SPELL_PORTAL_CHANNEL, false); } m_pInstance->SetData(TYPE_RIFT, IN_PROGRESS); diff --git a/scripts/northrend/violet_hold/violet_hold.h b/scripts/northrend/violet_hold/violet_hold.h deleted file mode 100644 index b8f4a8b17..000000000 --- a/scripts/northrend/violet_hold/violet_hold.h +++ /dev/null @@ -1,229 +0,0 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 - * This program is free software licensed under GPL version 2 - * Please see the included DOCS/LICENSE.TXT for more information */ - -#ifndef DEF_VIOLET_H -#define DEF_VIOLET_H - -enum -{ - MAX_ENCOUNTER = 3, - - TYPE_MAIN = 1, - TYPE_SEAL = 2, - TYPE_PORTAL = 3, - - WORLD_STATE_ID = 3816, - WORLD_STATE_SEAL = 3815, - WORLD_STATE_PORTALS = 3810, - - GO_INTRO_CRYSTAL = 193615, - GO_PRISON_SEAL_DOOR = 191723, - - GO_CELL_LAVANTHOR = 191566, - GO_CELL_MORAGG = 191606, - GO_CELL_ZURAMAT = 191565, - GO_CELL_EREKEM = 191564, - GO_CELL_EREKEM_GUARD_L = 191563, - GO_CELL_EREKEM_GUARD_R = 191562, - GO_CELL_XEVOZZ = 191556, - GO_CELL_ICHORON = 191722, - - NPC_EVENT_CONTROLLER = 30883, - NPC_PORTAL_INTRO = 31011, - NPC_PORTAL = 30679, - NPC_PORTAL_ELITE = 32174, - NPC_DOOR_SEAL = 30896, - - NPC_SINCLARI = 30658, - NPC_SINCLARI_ALT = 32204, // yeller for seal weakening and summoner for portals - NPC_HOLD_GUARD = 30659, - - NPC_EREKEM = 29315, - NPC_EREKEM_GUARD = 29395, - NPC_MORAGG = 29316, - NPC_ICHORON = 29313, - NPC_XEVOZZ = 29266, - NPC_LAVANTHOR = 29312, - NPC_ZURAMAT = 29314, - NPC_CYANIGOSA = 31134, - - NPC_PORTAL_GUARDIAN = 30660, - NPC_PORTAL_KEEPER = 30695, - - NPC_AZURE_INVADER = 30661, - NPC_AZURE_SPELLBREAKER = 30662, - NPC_AZURE_BINDER = 30663, - NPC_AZURE_MAGE_SLAYER = 30664, - NPC_MAGE_HUNTER = 30665, - NPC_AZURE_CAPTAIN = 30666, - NPC_AZURE_SORCEROR = 30667, - NPC_AZURE_RAIDER = 30668, - NPC_AZURE_STALKER = 32191, - - // used for intro - NPC_AZURE_BINDER_INTRO = 31007, - NPC_AZURE_INVADER_INTRO = 31008, - NPC_AZURE_SPELLBREAKER_INTRO= 31009, - NPC_AZURE_MAGE_SLAYER_INTRO = 31010, - - NPC_AZURE_SABOTEUR = 31079, - - NPC_DEFENSE_SYSTEM = 30837, - NPC_DEFENSE_DUMMY_TARGET = 30857, - - NPC_ARAKKOA = 32226, - NPC_VOID_LORD = 32230, - NPC_ETHERAL = 32231, - NPC_SWIRLING = 32234, - NPC_WATCHER = 32235, - NPC_LAVA_HOUND = 32237, - - SPELL_DEFENSE_SYSTEM_VISUAL = 57887, - SPELL_DEFENSE_SYSTEM_SPAWN = 57886, - - SPELL_DESTROY_DOOR_SEAL = 58040, // spell periodic cast by misc - SPELL_TELEPORTATION_PORTAL = 57687, // visual aura, but possibly not used? creature_template model for portals are same - - SPELL_SHIELD_DISRUPTION = 58291, // dummy when opening a cell - - SPELL_PORTAL_PERIODIC = 58008, // most likely the tick for each summon (tick each 15 seconds) - SPELL_PORTAL_CHANNEL = 58012, // the blue "stream" between portal and guardian/keeper - SPELL_PORTAL_BEAM = 56046, // large beam, unsure if really used here (or possible for something different) - - SPELL_PORTAL_VISUAL_1 = 57872, // no idea, but is possibly related based on it's visual appearence - SPELL_PORTAL_VISUAL_2 = 57630, - - SAY_SEAL_75 = -1608002, - SAY_SEAL_50 = -1608003, - SAY_SEAL_5 = -1608004, - - EMOTE_GUARDIAN_PORTAL = -1608005, - EMOTE_DRAGONFLIGHT_PORTAL = -1608006, - EMOTE_KEEPER_PORTAL = -1608007, - - MAX_NORMAL_PORTAL = 8 -}; - -static float fDefenseSystemLoc[4] = {1888.146f, 803.382f, 58.604f, 3.072f}; - -enum ePortalType -{ - PORTAL_TYPE_NORM = 0, - PORTAL_TYPE_SQUAD, - PORTAL_TYPE_BOSS, -}; - -struct sPortalData -{ - ePortalType pPortalType; - float fX, fY, fZ, fOrient; -}; - -static sPortalData afPortalLocation[]= -{ - {PORTAL_TYPE_NORM, 1936.07f, 803.198f, 53.3749f, 3.1241f}, //balcony - {PORTAL_TYPE_NORM, 1877.51f, 850.104f, 44.6599f, 4.7822f}, //erekem - {PORTAL_TYPE_NORM, 1890.64f, 753.471f, 48.7224f, 1.7104f}, //moragg - {PORTAL_TYPE_SQUAD, 1911.06f, 802.103f, 38.6465f, 2.8908f}, //below balcony - {PORTAL_TYPE_SQUAD, 1928.06f, 763.256f, 51.3167f, 2.3905f}, //bridge - {PORTAL_TYPE_SQUAD, 1924.26f, 847.661f, 47.1591f, 4.0202f}, //zuramat - {PORTAL_TYPE_NORM, 1914.16f, 832.527f, 38.6441f, 3.5160f}, //xevozz - {PORTAL_TYPE_NORM, 1857.30f, 764.145f, 38.6543f, 0.8339f}, //lavanthor - {PORTAL_TYPE_BOSS, 1890.73f, 803.309f, 38.4001f, 2.4139f}, //center -}; - -class MANGOS_DLL_DECL instance_violet_hold : public ScriptedInstance -{ - public: - instance_violet_hold(Map* pMap); - ~instance_violet_hold() {} - - void Initialize(); - void ResetAll(); - void ResetVariables(); - - void OnCreatureCreate(Creature* pCreature); - void OnObjectCreate(GameObject* pGo); - - void UpdateCellForBoss(uint32 uiBossEntry); - void UpdateWorldState(bool bEnable = true); - - void SetIntroPortals(bool bDeactivate); - void SpawnPortal(); - - void SetPortalId(); - - void CallGuards(bool bRespawn); - - uint32 GetRandomPortalEliteEntry(); - uint32 GetRandomMobForNormalPortal(); - - uint32 GetCurrentPortalNumber() { return m_uiWorldStatePortalCount; } - - sPortalData const* GetPortalData() { return &afPortalLocation[m_uiPortalId]; } - - bool IsCurrentPortalForTrash() - { - if (m_uiWorldStatePortalCount % 6) - return true; - - return false; - } - - bool IsNextPortalForTrash() - { - if ((m_uiWorldStatePortalCount+1) % 6) - return true; - - return false; - } - - void ProcessActivationCrystal(Unit* pUser, bool bIsIntro = false); - - void SetRandomBosses(); - - void OnPlayerEnter(Player* pPlayer); - - void SetData(uint32 uiType, uint32 uiData); - uint64 GetData64(uint32 uiData); - - void Update(uint32 uiDiff); - - typedef std::multimap BossToCellMap; - - protected: - - uint32 m_auiEncounter[MAX_ENCOUNTER]; - std::string strInstData; - - uint64 m_uiSinclariGUID; - uint64 m_uiSinclariAltGUID; - uint64 m_uiErekemGUID; - uint64 m_uiMoraggGUID; - uint64 m_uiIchoronGUID; - uint64 m_uiXevozzGUID; - uint64 m_uiLavanthorGUID; - uint64 m_uiZuramatGUID; - - uint64 m_uiCellErekemGuard_LGUID; - uint64 m_uiCellErekemGuard_RGUID; - uint64 m_uiIntroCrystalGUID; - uint64 m_uiDoorSealGUID; - - uint32 m_uiWorldState; - uint32 m_uiWorldStateSealCount; - uint32 m_uiWorldStatePortalCount; - - uint8 m_uiPortalId; - uint32 m_uiPortalTimer; - uint32 m_uiMaxCountPortalLoc; - - BossToCellMap m_mBossToCellMap; - - std::list m_lIntroPortalList; - std::list m_lGuardsList; - std::list m_lRandomBossList; -}; - -#endif From 25d5872e4c0ed42151d203f2b9e9025d54bdbbed Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 17 Jun 2010 00:02:08 +0400 Subject: [PATCH 363/405] ICC 42 - Deathbringer's beasts spell correct --- addition/721_icecrown_spelltable_scriptdev2.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/addition/721_icecrown_spelltable_scriptdev2.sql b/addition/721_icecrown_spelltable_scriptdev2.sql index a88194d9b..728315ba0 100644 --- a/addition/721_icecrown_spelltable_scriptdev2.sql +++ b/addition/721_icecrown_spelltable_scriptdev2.sql @@ -113,6 +113,7 @@ DELETE FROM `boss_spell_table` WHERE `entry` = 38508; INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES (38508, 72176, 0, 0, 0, 15000, 0, 0, 0, 27000, 0, 0, 0, 1, 0, 0), (38508, 72723, 0, 0, 0, 15000, 0, 0, 0, 27000, 0, 0, 0, 1, 0, 0), +(38508, 72769, 0, 0, 0, 15000, 0, 0, 0, 27000, 0, 0, 0, 1, 0, 0), (38508, 21150, 0, 0, 0, 15000, 0, 0, 0, 27000, 0, 0, 0, 1, 0, 0); From ffb9d1a80b3f714a2dd035346ed8ab15ee18809b Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 17 Jun 2010 18:50:12 +0400 Subject: [PATCH 364/405] ICC part 42 - Rotface seems to comlete --- addition/721_icecrown_mangos.sql | 7 +- .../721_icecrown_spelltable_scriptdev2.sql | 17 ++- .../icecrown_citadel/boss_rotface.cpp | 130 +++++++++++++----- 3 files changed, 113 insertions(+), 41 deletions(-) diff --git a/addition/721_icecrown_mangos.sql b/addition/721_icecrown_mangos.sql index 3064503d5..b34b00a03 100644 --- a/addition/721_icecrown_mangos.sql +++ b/addition/721_icecrown_mangos.sql @@ -69,9 +69,12 @@ UPDATE `gameobject` SET `state` = '0' WHERE `id` IN (201370); UPDATE `creature_template` SET `ScriptName`='mob_small_ooze', `AIName`='' WHERE `entry`= 36897; UPDATE `creature_template` SET `ScriptName`='mob_big_ooze', `AIName`='' WHERE `entry`= 36899; UPDATE `creature_template` SET `minlevel` = 80, `maxlevel` = 80, `AIName` ='', `faction_A`= 14, `faction_H` = 14, `ScriptName`='mob_sticky_ooze', `AIName`='' WHERE `entry`= 37006; -UPDATE `creature_template` SET `minlevel` = 80, `maxlevel` = 80, `AIName` ='', `faction_A`= 14, `faction_H` = 14, `ScriptName`='mob_ooze_spray_stalker', `AIName`='' WHERE `entry`= 37986; +UPDATE `creature_template` SET `minlevel` = 80, `maxlevel` = 80, `AIName` ='', `faction_A`= 14, `faction_H` = 14, `ScriptName`='mob_ooze_stalker', `AIName`='' WHERE `entry` IN (37986,37013); +UPDATE `creature_template` SET `minlevel` = 80, `maxlevel` = 80, `AIName` ='', `faction_A`= 14, `faction_H` = 14, `ScriptName`='mob_ooze_explode_stalker', `AIName`='' WHERE `entry` = 38107; DELETE FROM `spell_script_target` WHERE `entry` = 69783; -INSERT INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('69783', '1', '37986'); +INSERT INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('69783', '1', '37013'); +DELETE FROM `spell_script_target` WHERE `entry` = 69508; +INSERT INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('69508', '1', '37986'); -- Festergut diff --git a/addition/721_icecrown_spelltable_scriptdev2.sql b/addition/721_icecrown_spelltable_scriptdev2.sql index 728315ba0..965984b13 100644 --- a/addition/721_icecrown_spelltable_scriptdev2.sql +++ b/addition/721_icecrown_spelltable_scriptdev2.sql @@ -139,17 +139,18 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ -- Rotface DELETE FROM `boss_spell_table` WHERE `entry` = 36627; INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES -(36627, 69508, 0, 0, 0, 15000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), +(36627, 69508, 0, 0, 0, 15000, 0, 0, 0, 20000, 0, 0, 0, 1, 0, 0), (36627, 69674, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 6, 0, 0), -(36627, 70003, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 6, 0, 0), +(36627, 70003, 0, 0, 0, 12000, 0, 0, 0, 27000, 0, 0, 0, 6, 0, 0), (36627, 69788, 0, 0, 0, 20000, 0, 0, 0, 40000, 0, 0, 0, 1, 0, 0), -(36627, 69783, 0, 0, 0, 20000, 0, 0, 0, 40000, 0, 0, 0, 3, 0, 0), +(36627, 69783, 0, 0, 0, 30000, 0, 0, 0, 45000, 0, 0, 0, 3, 0, 0), (36627, 47008, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 1, 0, 0), -(36627, 69789, 0, 0, 0, 20000, 0, 0, 0, 40000, 0, 0, 0, 1, 0, 0); +(36627, 69789, 0, 0, 0, 20000, 0, 0, 0, 40000, 0, 0, 0, 6, 0, 1); -- summons INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMax_N10`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType` ) VALUES (36627, 36897, 12000, 12000, 1, 1, 1, 1, 1, 5, 0, 9), -(36627, 37986, 15000, 15000, 1, 1, 1, 1, 0, 0, 0, 11); +(36627, 37986, 15000, 15000, 1, 1, 1, 1, 10, 20, 0, 11), +(36627, 37013, 15000, 15000, 1, 1, 1, 1, 0, 0, 0, 11); -- Small ooze DELETE FROM `boss_spell_table` WHERE `entry` = 36897; INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES @@ -163,12 +164,16 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMa -- Big ooze DELETE FROM `boss_spell_table` WHERE `entry` = 36899; INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES -(36899,69774, 0, 0, 0, 10000, 0, 0, 0, 15000, 0, 0, 0, 4, 0, 0), +(36899,69774, 0, 0, 0, 15000, 0, 0, 0, 25000, 0, 0, 0, 4, 0, 0), (36899,69839, 0, 0, 0, 6000, 0, 0, 0, 6000, 0, 0, 0, 1, 0, 0), (36899,69760, 0, 0, 0, 10000, 0, 0, 0, 15000, 0, 0, 0, 1, 0, 0), (36899,69644, 0, 0, 0, 10000, 0, 0, 0, 15000, 0, 0, 0, 1, 0, 0), (36899,69558, 0, 0, 0, 10000, 0, 0, 0, 15000, 0, 0, 0, 1, 0, 0), (36899,69889, 0, 0, 0, 10000, 0, 0, 0, 15000, 0, 0, 0, 6, 0, 0); +-- Ooze explode stalker +DELETE FROM `boss_spell_table` WHERE `entry` = 38107; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(38107,69840, 0, 0, 0, 2000, 0, 0, 0, 2000, 0, 0, 0, 1, 0, 0); -- Professor Putricide DELETE FROM `boss_spell_table` WHERE `entry` = 36678; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp index c8b82e2ca..971f18ca1 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_rotface -SD%Complete: 10% -SDComment: by /dev/rsa +SD%Complete: 80% +SDComment: by /dev/rsa. Need correct timers && infection logic SDCategory: Icecrown Citadel EndScriptData */ @@ -29,9 +29,8 @@ enum BossSpells SPELL_OOZE_FLOOD = 69789, SPELL_OOZE_FLOOD_0 = 69788, SPELL_OOZE_FLOOD_1 = 69783, - SPELL_OOZE_FLOOD_2 = 69785, SPELL_SLIME_SPRAY = 69508, - SPELL_MUTATED_INFECTION_0 = 69674, + SPELL_MUTATED_INFECTION_AURA = 69674, SPELL_MUTATED_INFECTION = 70003, SPELL_BERSERK = 47008, @@ -43,11 +42,16 @@ enum BossSpells SPELL_UNSTABLE_OOZE = 69644, SPELL_UNSTABLE_OOZE_AURA = 69558, SPELL_OOZE_EXPLODE = 69839, + SPELL_OOZE_EXPLODE_AURA = 69840, NPC_BIG_OOZE = 36899, NPC_SMALL_OOZE = 36897, NPC_STICKY_OOZE = 37006, NPC_OOZE_SPRAY_STALKER = 37986, + NPC_OOZE_STALKER = 37013, + NPC_OOZE_EXPLODE_STALKER = 38107, + + MAX_INFECTION_TARGETS = 5, }; static Locations SpawnLoc[]= @@ -58,6 +62,7 @@ static Locations SpawnLoc[]= {4418.825684f, 3162.986084f, 360.38501f}, // 3 }; + struct MANGOS_DLL_DECL boss_rotfaceAI : public ScriptedAI { boss_rotfaceAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -70,7 +75,7 @@ struct MANGOS_DLL_DECL boss_rotfaceAI : public ScriptedAI ScriptedInstance *pInstance; BossSpellWorker* bsw; uint8 stage; - Unit* InfectionTarget; + Unit* InfectionTarget[MAX_INFECTION_TARGETS]; bool intro; bool pet; bool nexttick; @@ -83,7 +88,7 @@ struct MANGOS_DLL_DECL boss_rotfaceAI : public ScriptedAI intro = false; pet = false; nexttick = false; - InfectionTarget = NULL; + memset(&InfectionTarget, 0, sizeof(InfectionTarget)); bsw->resetTimers(); } @@ -140,35 +145,47 @@ struct MANGOS_DLL_DECL boss_rotfaceAI : public ScriptedAI if (nexttick) { bsw->doCast(SPELL_OOZE_FLOOD_1); - DoScriptText(-1631225,m_creature); + DoScriptText(-1631227,m_creature); nexttick = false; }; if (bsw->timedQuery(SPELL_OOZE_FLOOD_1, diff)) { uint8 i = urand(0,3); - if (Unit* pTemp1 = bsw->doSummon(NPC_OOZE_SPRAY_STALKER,SpawnLoc[i].x, SpawnLoc[i].y, SpawnLoc[i].z)) + if (Unit* pTemp = bsw->doSummon(NPC_OOZE_STALKER,SpawnLoc[i].x, SpawnLoc[i].y, SpawnLoc[i].z)) + { + bsw->doCast(SPELL_OOZE_FLOOD, pTemp); nexttick = true; - }; + } + }; - bsw->timedCast(SPELL_SLIME_SPRAY, diff); + if (bsw->timedQuery(SPELL_SLIME_SPRAY, diff)) + if (Unit* pTemp = bsw->doSummon(NPC_OOZE_SPRAY_STALKER)) + bsw->doCast(SPELL_SLIME_SPRAY); - if (InfectionTarget && InfectionTarget->isAlive() && InfectionTarget->IsInMap(m_creature)) - if (!bsw->hasAura(SPELL_MUTATED_INFECTION,InfectionTarget)) + for(uint8 i = 0; i < MAX_INFECTION_TARGETS; ++i) + if (InfectionTarget[i] && InfectionTarget[i]->isAlive() && InfectionTarget[i]->IsInMap(m_creature)) + if (!bsw->hasAura(SPELL_MUTATED_INFECTION_AURA,InfectionTarget[i])) { float fPosX, fPosY, fPosZ; - InfectionTarget->GetPosition(fPosX, fPosY, fPosZ); + InfectionTarget[i]->GetPosition(fPosX, fPosY, fPosZ); if (Unit* pTemp = bsw->doSummon(NPC_SMALL_OOZE,fPosX, fPosY, fPosZ)) - pTemp->AddThreat(InfectionTarget, 1000.0f); - InfectionTarget = NULL; + pTemp->AddThreat(InfectionTarget[i], 1000.0f); + InfectionTarget[i] = NULL; }; if (bsw->timedQuery(SPELL_MUTATED_INFECTION, diff)) - if (Unit* pTarget = bsw->SelectRandomPlayer(SPELL_MUTATED_INFECTION, false, 60.0f)) + if (Unit* pTarget = bsw->SelectRandomPlayer(SPELL_MUTATED_INFECTION_AURA, false, 60.0f)) { - InfectionTarget = pTarget; - bsw->doCast(SPELL_MUTATED_INFECTION, InfectionTarget); - DoScriptText(-1631226,m_creature, InfectionTarget); + for(uint8 i = 0; i < MAX_INFECTION_TARGETS; ++i) + if (!InfectionTarget[i]) + { + InfectionTarget[i] = pTarget; + bsw->doCast(SPELL_MUTATED_INFECTION, InfectionTarget[i]); + DoScriptText(-1631226,m_creature); + break; + } + else continue; }; if (bsw->timedQuery(SPELL_BERSERK, diff)){ @@ -201,6 +218,7 @@ struct MANGOS_DLL_DECL mob_small_oozeAI : public ScriptedAI void Reset() { bsw->resetTimers(); + m_creature->SetRespawnDelay(7*DAY); bsw->doCast(SPELL_RADIATING_OOZE); m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); m_creature->SetSpeedRate(MOVE_RUN, 0.5); @@ -248,6 +266,7 @@ struct MANGOS_DLL_DECL mob_big_oozeAI : public ScriptedAI void Reset() { bsw->resetTimers(); + m_creature->SetRespawnDelay(7*DAY); bsw->doCast(SPELL_UNSTABLE_OOZE); m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); m_creature->SetSpeedRate(MOVE_RUN, 0.5); @@ -260,10 +279,6 @@ struct MANGOS_DLL_DECL mob_big_oozeAI : public ScriptedAI if (!pInstance || pInstance->GetData(TYPE_ROTFACE) != IN_PROGRESS) m_creature->ForcedDespawn(); - if (exploded) - if (bsw->timedQuery(SPELL_UNSTABLE_OOZE_AURA,uiDiff)) - m_creature->ForcedDespawn(); - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -271,14 +286,14 @@ struct MANGOS_DLL_DECL mob_big_oozeAI : public ScriptedAI if (Creature* pSmall = bsw->SelectNearestCreature(NPC_SMALL_OOZE,5.0f)) { - bsw->doCast(SPELL_UNSTABLE_OOZE); pSmall->ForcedDespawn(); + bsw->doCast(SPELL_UNSTABLE_OOZE); }; - if (Creature* pBig = bsw->SelectNearestCreature(m_creature->GetEntry(),10.0f)) + if (Creature* pBig = bsw->SelectNearestCreature(NPC_BIG_OOZE, 8.0f)) { - bsw->doCast(SPELL_UNSTABLE_OOZE); pBig->ForcedDespawn(); + bsw->doCast(SPELL_UNSTABLE_OOZE); } if ( bsw->auraCount(SPELL_UNSTABLE_OOZE_AURA) > 4 && !exploded) @@ -308,6 +323,7 @@ struct MANGOS_DLL_DECL mob_sticky_oozeAI : public ScriptedAI void Reset() { m_creature->SetDisplayId(11686); + m_creature->SetRespawnDelay(7*DAY); m_creature->CastSpell(m_creature, SPELL_STICKY_AURA, true); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->SetInCombatWithZone(); @@ -330,9 +346,9 @@ CreatureAI* GetAI_mob_sticky_ooze(Creature* pCreature) return new mob_sticky_oozeAI(pCreature); } -struct MANGOS_DLL_DECL mob_ooze_spray_stalkerAI : public ScriptedAI +struct MANGOS_DLL_DECL mob_ooze_stalkerAI : public ScriptedAI { - mob_ooze_spray_stalkerAI(Creature *pCreature) : ScriptedAI(pCreature) + mob_ooze_stalkerAI(Creature *pCreature) : ScriptedAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Reset(); @@ -343,7 +359,7 @@ struct MANGOS_DLL_DECL mob_ooze_spray_stalkerAI : public ScriptedAI void Reset() { m_creature->SetDisplayId(11686); - m_creature->CastSpell(m_creature, SPELL_OOZE_FLOOD, true); + m_creature->SetRespawnDelay(7*DAY); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->SetInCombatWithZone(); SetCombatMovement(false); @@ -360,9 +376,52 @@ struct MANGOS_DLL_DECL mob_ooze_spray_stalkerAI : public ScriptedAI } }; -CreatureAI* GetAI_mob_ooze_spray_stalker(Creature* pCreature) +CreatureAI* GetAI_mob_ooze_stalker(Creature* pCreature) { - return new mob_ooze_spray_stalkerAI(pCreature); + return new mob_ooze_stalkerAI(pCreature); +} + +struct MANGOS_DLL_DECL mob_ooze_explode_stalkerAI : public ScriptedAI +{ + mob_ooze_explode_stalkerAI(Creature *pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + bsw = new BossSpellWorker(this); + Reset(); + } + + ScriptedInstance *pInstance; + Creature* creator; + BossSpellWorker* bsw; + + void Reset() + { + m_creature->SetDisplayId(11686); + m_creature->SetRespawnDelay(7*DAY); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + SetCombatMovement(false); + m_creature->SetInCombatWithZone(); + bsw->doCast(SPELL_OOZE_EXPLODE_AURA); + creator = bsw->SelectNearestCreature(NPC_BIG_OOZE, 20.0f); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!pInstance || pInstance->GetData(TYPE_ROTFACE) != IN_PROGRESS) + m_creature->ForcedDespawn(); + + if (creator && creator->isAlive()) + creator->ForcedDespawn(); + + if (bsw->timedQuery(SPELL_OOZE_EXPLODE_AURA, uiDiff)) + m_creature->ForcedDespawn(); + + } +}; + +CreatureAI* GetAI_mob_ooze_explode_stalker(Creature* pCreature) +{ + return new mob_ooze_explode_stalkerAI(pCreature); } void AddSC_boss_rotface() @@ -389,7 +448,12 @@ void AddSC_boss_rotface() newscript->RegisterSelf(); newscript = new Script; - newscript->Name = "mob_ooze_spray_stalker"; - newscript->GetAI = &GetAI_mob_ooze_spray_stalker; + newscript->Name = "mob_ooze_stalker"; + newscript->GetAI = &GetAI_mob_ooze_stalker; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_ooze_explode_stalker"; + newscript->GetAI = &GetAI_mob_ooze_explode_stalker; newscript->RegisterSelf(); } From e4242ee50c12fc38de0c8122486607ad14575914 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 17 Jun 2010 18:51:06 +0400 Subject: [PATCH 365/405] ICC part 43 - Lanathel correct --- addition/721_icecrown_mangos.sql | 2 +- .../721_icecrown_spelltable_scriptdev2.sql | 4 +- .../boss_blood_queen_lanathel.cpp | 81 +++++++++++++------ 3 files changed, 59 insertions(+), 28 deletions(-) diff --git a/addition/721_icecrown_mangos.sql b/addition/721_icecrown_mangos.sql index b34b00a03..2dc3b3276 100644 --- a/addition/721_icecrown_mangos.sql +++ b/addition/721_icecrown_mangos.sql @@ -107,7 +107,7 @@ UPDATE `gameobject` SET `state` = '0' WHERE `id` IN (201376); -- Qween Lana'thel UPDATE `creature_template` SET `ScriptName`='boss_blood_queen_lanathel', `AIName`='' WHERE `entry`= 37955; -UPDATE `creature_template` SET `ScriptName`='mob_swarming_shadows', `AIName`='' WHERE `entry`= 38163; +UPDATE `creature_template` SET `minlevel` = 80, `maxlevel` = 80, `AIName` ='', `faction_A`= 14, `faction_H` = 14,`ScriptName`='mob_swarming_shadows' WHERE `entry`= 38163; -- Valithria dreamwalker UPDATE `creature_template` SET `faction_A` = 35, `faction_H` = 35, `ScriptName`='boss_valithria_dreamwalker' WHERE `entry`= 36789; diff --git a/addition/721_icecrown_spelltable_scriptdev2.sql b/addition/721_icecrown_spelltable_scriptdev2.sql index 965984b13..bc3f486b3 100644 --- a/addition/721_icecrown_spelltable_scriptdev2.sql +++ b/addition/721_icecrown_spelltable_scriptdev2.sql @@ -262,8 +262,8 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ (37955, 70867, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), (37955, 70923, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), (37955, 71340, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), -(37955, 71264, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), -(37955, 71446, 0, 0, 0, 5000, 0, 0, 0, 8000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(37955, 71264, 0, 0, 0, 20000, 0, 0, 0, 35000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(37955, 71446, 0, 0, 0, 7000, 0, 0, 0, 12000, 0, 0, 0, 0, 0, 0, 4, 0, 0), (37955, 71772, 0, 0, 0, 90000, 0, 0, 0, 90000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (37955, 47008, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (37955, 71952, 0, 0, 0, 5000, 0, 0, 0, 8000, 0, 0, 0, 0, 0, 0, 1, 0, 0); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp index 99f53f6da..b7cbc1dee 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp @@ -42,8 +42,6 @@ enum BossSpells SPELL_BLOODBOLT_WHIRL = 71772, SPELL_PRESENCE_OF_DARKFALLEN = 71952, - SPELL_FLY_VISUAL = 57764, - NPC_SWARMING_SHADOWS = 38163, SPELL_SWARMING_SHADOWS_VISUAL = 71267, }; @@ -159,27 +157,39 @@ struct MANGOS_DLL_DECL boss_blood_queen_lanathelAI : public ScriptedAI { if (command) { - uint8 num = urand(2,5); + uint8 num = urand(3,5); for(uint8 i = 0; i <= num; ++i) - if (Unit* pTarget = bsw->SelectRandomPlayer(SPELL_PACT_OF_DARKFALLEN, false, 100.0f)) + if (Unit* pTarget = bsw->SelectRandomPlayer(SPELL_PACT_OF_DARKFALLEN, false, 60.0f)) { - Darkfallen[i] = pTarget; - bsw->doCast(SPELL_PACT_OF_DARKFALLEN,pTarget); - ++darkfallened; + if (bsw->doCast(SPELL_PACT_OF_DARKFALLEN,pTarget) == CAST_OK) + { + Darkfallen[i] = pTarget; + ++darkfallened; + }; }; } else if (darkfallened > 0) { for(uint8 i = 0; i < darkfallened; ++i) - if (Darkfallen[i]) - if (Darkfallen[i]->isAlive() && Darkfallen[i]->HasAura(SPELL_PACT_OF_DARKFALLEN)) - for(uint8 j = 0; j < darkfallened; ++j) - if (j != i && Darkfallen[j]) - if(Darkfallen[j]->isAlive() && Darkfallen[j]->HasAura(SPELL_PACT_OF_DARKFALLEN)) - if (!Darkfallen[j]->IsWithinDistInMap(Darkfallen[i], 5.0f)) return; - + if (Darkfallen[i]) + { + if (bsw->hasAura(SPELL_PACT_OF_DARKFALLEN,Darkfallen[i])) + { + for(uint8 j = 0; j < darkfallened; ++j) + if (j != i && Darkfallen[j]) + { + if(Darkfallen[j]) + { + if (bsw->hasAura(SPELL_PACT_OF_DARKFALLEN,Darkfallen[j])) + { + if (!Darkfallen[j]->IsWithinDistInMap(Darkfallen[i], 5.0f)) return; + } else Darkfallen[j] = NULL; + } + } + } else Darkfallen[i] = NULL; + } for(uint8 i = 0; i < darkfallened; ++i) - if (Darkfallen[i] && Darkfallen[i]->isAlive() && Darkfallen[i]->HasAura(SPELL_PACT_OF_DARKFALLEN)) + if (bsw->hasAura(SPELL_PACT_OF_DARKFALLEN,Darkfallen[i])) bsw->doRemove(SPELL_PACT_OF_DARKFALLEN, Darkfallen[i]); darkfallened = 0; }; @@ -187,26 +197,45 @@ struct MANGOS_DLL_DECL boss_blood_queen_lanathelAI : public ScriptedAI void doBloodMirror(bool command) { - + if (command) + { if (MirrorMarked) - if (!MirrorMarked->isAlive() || !MirrorMarked->HasAura(SPELL_BLOOD_MIRROR_1)) + if (!bsw->hasAura(SPELL_BLOOD_MIRROR_1,MirrorMarked)) MirrorMarked = NULL; if (MirrorTarget) - if (!MirrorTarget->isAlive() || !MirrorTarget->HasAura(SPELL_BLOOD_MIRROR_2)) + if (!bsw->hasAura(SPELL_BLOOD_MIRROR_2,MirrorTarget)) MirrorTarget = NULL; - if (!MirrorMarked && m_creature->getVictim()) + if (!MirrorMarked && m_creature->getVictim()) { - if (MirrorMarked = m_creature->getVictim()) + MirrorMarked = m_creature->getVictim(); + if (MirrorMarked) bsw->doCast(SPELL_BLOOD_MIRROR_1, MirrorMarked); } if (!MirrorTarget) { - if (MirrorTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,1)) + MirrorTarget = bsw->SelectRandomPlayer(SPELL_BLOOD_MIRROR_1, false, 40.0f); + if (MirrorTarget) bsw->doCast(SPELL_BLOOD_MIRROR_2, MirrorTarget); } + } else + { + if (MirrorMarked) + if (bsw->hasAura(SPELL_BLOOD_MIRROR_1,MirrorMarked)) + { + bsw->doRemove(SPELL_BLOOD_MIRROR_1, MirrorMarked); + MirrorMarked = NULL; + } + + if (MirrorTarget) + if (bsw->hasAura(SPELL_BLOOD_MIRROR_2,MirrorTarget)) + { + bsw->doRemove(SPELL_BLOOD_MIRROR_2, MirrorTarget); + MirrorTarget = NULL; + } + } } @@ -296,10 +325,10 @@ struct MANGOS_DLL_DECL boss_blood_queen_lanathelAI : public ScriptedAI m_creature->AttackStop(); SetCombatMovement(false); StartMovement(1); - bsw->doCast(SPELL_FLY_VISUAL); m_creature->SetUInt32Value(UNIT_FIELD_BYTES_0, 50331648); m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 50331648); m_creature->AddSplineFlag(SPLINEFLAG_FLYING); + doBloodMirror(false); stage = 2; break; case 2: @@ -330,7 +359,6 @@ struct MANGOS_DLL_DECL boss_blood_queen_lanathelAI : public ScriptedAI case 5: if (movementstarted) return; DoScriptText(-1631325,m_creature); - bsw->doRemove(SPELL_FLY_VISUAL); m_creature->SetUInt32Value(UNIT_FIELD_BYTES_0, 0); m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); m_creature->RemoveSplineFlag(SPLINEFLAG_FLYING); @@ -371,6 +399,7 @@ struct MANGOS_DLL_DECL mob_swarming_shadowsAI : public ScriptedAI mob_swarming_shadowsAI(Creature *pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); } ScriptedInstance* m_pInstance; @@ -378,10 +407,12 @@ struct MANGOS_DLL_DECL mob_swarming_shadowsAI : public ScriptedAI void Reset() { - SetCombatMovement(false); m_creature->SetDisplayId(11686); - m_creature->GetMotionMaster()->MoveRandom(); + m_creature->SetRespawnDelay(7*DAY); + SetCombatMovement(false); + m_creature->SetInCombatWithZone(); m_lifetimer = 10000; + DoCast(m_creature, SPELL_SWARMING_SHADOWS_VISUAL); } void UpdateAI(const uint32 uiDiff) From df33d06cbee14f62fc7b4af77f957692ace97076 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 17 Jun 2010 19:26:52 +0400 Subject: [PATCH 366/405] Fix possible crush if Menethil killed. Thanks to jahangames --- .../icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp index 784df765e..8a82326a1 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp @@ -792,7 +792,7 @@ struct MANGOS_DLL_DECL boss_tirion_iccAI : public ScriptedAI UpdateTimer = 20000; pInstance->SetData(TYPE_EVENT,14030); DoScriptText(-1631594, m_creature); - pMenethil->ForcedDespawn(); + if (pMenethil && pMenethil->isAlive()) pMenethil->ForcedDespawn(); EnterEvadeMode(); pInstance->SetData(TYPE_EVENT,0); if (Creature* pLichKing = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_LICH_KING))) From 3f8c5503813a1404c17474e41639c576cfa2e525 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 17 Jun 2010 21:01:09 +0400 Subject: [PATCH 367/405] attempt to restore worc Corruption from Valithria --- addition/721_icecrown_spelltable_scriptdev2.sql | 2 +- .../icecrown_citadel/boss_valithria_dreamwalker.cpp | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/addition/721_icecrown_spelltable_scriptdev2.sql b/addition/721_icecrown_spelltable_scriptdev2.sql index bc3f486b3..a566f451e 100644 --- a/addition/721_icecrown_spelltable_scriptdev2.sql +++ b/addition/721_icecrown_spelltable_scriptdev2.sql @@ -277,7 +277,7 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ (36789, 70873, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36789, 71189, 0, 0, 0, 3000, 0, 0, 0, 3000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36789, 72724, 0, 0, 0, 3000, 0, 0, 0, 3000, 0, 0, 0, 0, 0, 0, 1, 0, 0), -(36789, 70904, 0, 0, 0, 5000, 0, 0, 0, 5000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36789, 70904, 0, 0, 0, 5000, 0, 0, 0, 5000, 0, 0, 0, 0, 0, 0, 1, 0, 1), (36789, 71196, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36789, 70702, 0, 0, 0, 15000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 16, 0, 1); -- summons diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp index 536123515..fb9e9a9d9 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp @@ -296,6 +296,10 @@ struct MANGOS_DLL_DECL boss_valithria_dreamwalkerAI : public ScriptedAI void UpdateAI(const uint32 diff) { + + if (!bsw->hasAura(SPELL_CORRUPTION,m_creature) && stage == 0) + bsw->doCast(SPELL_CORRUPTION); + if (!battlestarted) return; QueryEvadeMode(); @@ -322,7 +326,7 @@ struct MANGOS_DLL_DECL boss_valithria_dreamwalkerAI : public ScriptedAI break; case 5: DoScriptText(-1631408,m_creature); - if (m_creature->HasAura(SPELL_CORRUPTION)) bsw->doRemove(SPELL_CORRUPTION); + if (bsw->hasAura(SPELL_CORRUPTION,m_creature)) bsw->doRemove(SPELL_CORRUPTION); stage = 6; return; break; From 67416fbfec7bfd1f1e39bb468b3797abbed2f3f7 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Fri, 18 Jun 2010 13:28:31 +0400 Subject: [PATCH 368/405] BSW cleanup, typo, code style and logging improve. Thanks Dron01 for kick :) --- include/sc_boss_spell_worker.cpp | 256 +++++++++++++++++-------------- include/sc_boss_spell_worker.h | 112 +++++++------- 2 files changed, 191 insertions(+), 177 deletions(-) diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index 66cb1129c..b5b6d50f4 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -27,7 +27,6 @@ void BossSpellWorker::Reset() memset(&m_uiSpell_Timer, 0, sizeof(m_uiSpell_Timer)); memset(&m_BossSpell,0,sizeof(m_BossSpell)); _bossSpellCount = 0; - currentTarget = NULL; LoadSpellTable(); resetTimers(); }; @@ -35,9 +34,11 @@ void BossSpellWorker::Reset() void BossSpellWorker::_resetTimer(uint8 m_uiSpellIdx) { if (m_uiSpellIdx > bossSpellCount()) return; + if (m_BossSpell[m_uiSpellIdx].m_uiSpellTimerMin[currentDifficulty] != m_BossSpell[m_uiSpellIdx].m_uiSpellTimerMax[currentDifficulty]) m_uiSpell_Timer[m_uiSpellIdx] = urand(0,m_BossSpell[m_uiSpellIdx].m_uiSpellTimerMax[currentDifficulty]); else m_uiSpell_Timer[m_uiSpellIdx] = m_BossSpell[m_uiSpellIdx].m_uiSpellTimerMin[currentDifficulty]; + if (m_BossSpell[m_uiSpellIdx].m_uiSpellTimerMin[currentDifficulty] == 0 && m_BossSpell[m_uiSpellIdx].m_uiSpellTimerMax[currentDifficulty] >= HOUR*IN_MILLISECONDS) m_uiSpell_Timer[m_uiSpellIdx] = 0; @@ -50,12 +51,12 @@ void BossSpellWorker::LoadSpellTable() debug_log("BSW: Loading table of spells boss %u difficulty %u", bossID , currentDifficulty); - char query[MAX_QUERY_LEN]; + char query[MAX_QUERY_LEN]; - sprintf(query, "SELECT entry, spellID_N10, spellID_N25, spellID_H10, spellID_H25, timerMin_N10, timerMin_N25, timerMin_H10, timerMin_H25, timerMax_N10, timerMax_N25, timerMax_H10, timerMax_H25, data1, data2, data3, data4, locData_x, locData_y, locData_z, varData, StageMask_N, StageMask_H, CastType, isVisualEffect, isBugged, textEntry FROM `boss_spell_table` WHERE entry = %u;\r\n", bossID); + sprintf(query, "SELECT entry, spellID_N10, spellID_N25, spellID_H10, spellID_H25, timerMin_N10, timerMin_N25, timerMin_H10, timerMin_H25, timerMax_N10, timerMax_N25, timerMax_H10, timerMax_H25, data1, data2, data3, data4, locData_x, locData_y, locData_z, varData, StageMask_N, StageMask_H, CastType, isVisualEffect, isBugged, textEntry FROM `boss_spell_table` WHERE entry = %u;\r\n", bossID); mMutex.acquire(); - QueryResult* Result = strSD2Pquery(query); + QueryResult* Result = strSD2Pquery(query); mMutex.release(); if (Result) @@ -67,7 +68,7 @@ void BossSpellWorker::LoadSpellTable() m_BossSpell[uiCount].id = uiCount; - int32 bossEntry = pFields[0].GetInt32(); + uint32 bossEntry = pFields[0].GetUInt32(); for (uint8 j = 0; j < DIFFICULTY_LEVELS; ++j) m_BossSpell[uiCount].m_uiSpellEntry[j] = pFields[1+j].GetUInt32(); @@ -90,7 +91,7 @@ void BossSpellWorker::LoadSpellTable() m_BossSpell[uiCount].StageMaskN = pFields[5+DIFFICULTY_LEVELS*4].GetUInt32(); m_BossSpell[uiCount].StageMaskH = pFields[6+DIFFICULTY_LEVELS*4].GetUInt32(); - m_BossSpell[uiCount].m_CastTarget = getBSWCastType(pFields[7+DIFFICULTY_LEVELS*4].GetUInt8()); + m_BossSpell[uiCount].m_CastTarget = _getBSWCastType(pFields[7+DIFFICULTY_LEVELS*4].GetUInt8()); m_BossSpell[uiCount].m_IsVisualEffect = (pFields[8+DIFFICULTY_LEVELS*4].GetUInt8() == 0) ? false : true ; @@ -98,7 +99,7 @@ void BossSpellWorker::LoadSpellTable() m_BossSpell[uiCount].textEntry = pFields[10+DIFFICULTY_LEVELS*4].GetInt32(); - if (bossEntry != bossID) error_db_log("BSW: Unknown error while load boss_spell_table"); + if (bossEntry != bossID) error_log("BSW: Unknown error while load boss_spell_table"); else ++uiCount; } while (Result->NextRow()); @@ -113,31 +114,32 @@ void BossSpellWorker::LoadSpellTable() } else { - error_db_log("BSW: Boss spell table for boss %u is empty.", bossID); + error_log("BSW: Boss spell table for boss %u is empty.", bossID); _bossSpellCount = 0; }; } bool BossSpellWorker::_QuerySpellPeriod(uint8 m_uiSpellIdx, uint32 diff) - { - if (_bossSpellCount == 0) return false; +{ SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; - if (m_uiSpell_Timer[m_uiSpellIdx] < diff) { - if (pSpell->m_uiSpellTimerMax[currentDifficulty] >= HOUR*IN_MILLISECONDS) m_uiSpell_Timer[m_uiSpellIdx]=HOUR*IN_MILLISECONDS; + if (m_uiSpell_Timer[m_uiSpellIdx] < diff) + { + if (pSpell->m_uiSpellTimerMax[currentDifficulty] >= HOUR*IN_MILLISECONDS) m_uiSpell_Timer[m_uiSpellIdx]=HOUR*IN_MILLISECONDS; else m_uiSpell_Timer[m_uiSpellIdx]=urand(pSpell->m_uiSpellTimerMin[currentDifficulty],pSpell->m_uiSpellTimerMax[currentDifficulty]); - return true; - } else { - m_uiSpell_Timer[m_uiSpellIdx] -= diff; - return false; + return true; + } else { + m_uiSpell_Timer[m_uiSpellIdx] -= diff; + return false; }; - }; +}; CanCastResult BossSpellWorker::_BSWSpellSelector(uint8 m_uiSpellIdx, Unit* pTarget) { - if (_bossSpellCount == 0) return CAST_FAIL_OTHER; SpellEntry const *spell; + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + Unit* pSummon = NULL; debug_log("BSW: Casting spell number %u type %u",pSpell->m_uiSpellEntry[currentDifficulty], pSpell->m_CastTarget); @@ -253,15 +255,15 @@ CanCastResult BossSpellWorker::_BSWSpellSelector(uint8 m_uiSpellIdx, Unit* pTarg if (!pTarget->IsPositionValid() || !pTarget->IsInMap(boss)) { if (pTarget->GetTypeId() == TYPEID_PLAYER) - error_log("BSW: Player %s (guid %u) has invalid position. May be cheater?",pTarget->GetName(),pTarget->GetGUIDLow()); - else error_log("BSW: Creature %u has invalid position.",pTarget->GetEntry()); + error_log("BSW: CAST_ON_RANDOM_POINT FAILED: player has invalid position. SpellID is %u",pSpell->m_uiSpellEntry[currentDifficulty]); + else error_log("BSW: CAST_ON_RANDOM_POINT FAILED: creature has invalid position. SpellID is %u",pSpell->m_uiSpellEntry[currentDifficulty]); return CAST_FAIL_OTHER; } pTarget->GetPosition(fPosX, fPosY, fPosZ); pTarget->GetRandomPoint(fPosX, fPosY, fPosZ, urand((uint32)pSpell->LocData.x, (uint32)pSpell->LocData.y), fPosX, fPosY, fPosZ); if ((int)fPosZ == 0) { - error_log("BSW: Positon Z is NULL. Strange bug"); + error_log("BSW: CAST_ON_RANDOM_POINT FAILED: Positon Z is NULL. Strange bug"); return CAST_FAIL_OTHER; } if (SpellEntry const *spell = (SpellEntry *)GetSpellStore()->LookupEntry(pSpell->m_uiSpellEntry[currentDifficulty])) @@ -285,75 +287,67 @@ CanCastResult BossSpellWorker::_BSWSpellSelector(uint8 m_uiSpellIdx, Unit* pTarg return CAST_FAIL_OTHER; break; }; + + error_log("BSW: FAILED casting spell number %u type %u - type not exists",pSpell->m_uiSpellEntry[currentDifficulty], pSpell->m_CastTarget); + return CAST_FAIL_OTHER; }; CanCastResult BossSpellWorker::_BSWCastOnTarget(Unit* pTarget, uint8 m_uiSpellIdx) { - if (_bossSpellCount == 0) return CAST_FAIL_OTHER; - if (!pTarget || !pTarget->IsInMap(boss)) return CAST_FAIL_OTHER; - SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; - debug_log("BSW: Casting (on target) spell number %u type %u",pSpell->m_uiSpellEntry[currentDifficulty], pSpell->m_CastTarget); - - if (pTarget && !pSpell->m_IsBugged) return _DoCastSpellIfCan(pTarget, pSpell->m_uiSpellEntry[currentDifficulty]); - if (pTarget && pSpell->m_IsBugged) return _BSWDoCast(m_uiSpellIdx, pTarget); - - return CAST_FAIL_OTHER; -}; - - + if (!pTarget || !pTarget->IsInMap(boss) || !pTarget->isAlive()) + { + error_log("BSW: FAILED casting (on target) spell number %u - no target or target not in map",pSpell->m_uiSpellEntry[currentDifficulty]); + return CAST_FAIL_OTHER; + } -bool BossSpellWorker::isSummon(uint8 m_uiSpellIdx) -{ - if (_bossSpellCount == 0) return false; + debug_log("BSW: Casting (on target) spell %u type %u",pSpell->m_uiSpellEntry[currentDifficulty], pSpell->m_CastTarget); - SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; - switch (pSpell->m_CastTarget) { - case SUMMON_NORMAL: - case SUMMON_TEMP: - case SUMMON_INSTANT: - return true; - default: return false; - }; + if (!pSpell->m_IsBugged) return _DoCastSpellIfCan(pTarget, pSpell->m_uiSpellEntry[currentDifficulty]); + else if (pSpell->m_IsBugged) return _BSWDoCast(m_uiSpellIdx, pTarget); + else return CAST_FAIL_OTHER; }; bool BossSpellWorker::_hasAura(uint8 m_uiSpellIdx, Unit* pTarget) { - if (!pTarget || !pTarget->IsInMap(boss)) return false; - SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + if (!pTarget || !pTarget->IsInMap(boss)) + { + error_log("BSW: FAILED Query aura for spell %u - no target or target not in map",pSpell->m_uiSpellEntry[currentDifficulty]); + return false; + } + return (pTarget->HasAura(pSpell->m_uiSpellEntry[currentDifficulty])); }; uint8 BossSpellWorker::_auraCount(uint8 m_uiSpellIdx, Unit* pTarget, SpellEffectIndex index) { - if (!pTarget) return false; + if (!_hasAura(m_uiSpellIdx,pTarget)) return 0; SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; - if (!pTarget->HasAura(pSpell->m_uiSpellEntry[currentDifficulty])) return 0; - if (pTarget->GetAura(pSpell->m_uiSpellEntry[currentDifficulty], index)->GetStackAmount() > 0) return pTarget->GetAura(pSpell->m_uiSpellEntry[currentDifficulty], index)->GetStackAmount(); else return 0; }; -uint8 BossSpellWorker::FindSpellIDX(uint32 SpellID) +uint8 BossSpellWorker::_findSpellIDX(uint32 SpellID) { if (bossSpellCount() >= 0) - for(uint8 i = 0; i < bossSpellCount(); ++i) - if (m_BossSpell[i].m_uiSpellEntry[RAID_DIFFICULTY_10MAN_NORMAL] == SpellID) return i; + for(uint8 i = 0; i < bossSpellCount(); ++i) + if (m_BossSpell[i].m_uiSpellEntry[RAID_DIFFICULTY_10MAN_NORMAL] == SpellID) return i; error_log("BSW: spell %u not found in boss %u spelltable. Memory or database error?", SpellID, bossID); + return SPELL_INDEX_ERROR; } -BossSpellTableParameters BossSpellWorker::getBSWCastType(uint32 pTemp) +BossSpellTableParameters BossSpellWorker::_getBSWCastType(uint32 pTemp) { switch (pTemp) { case 0: return DO_NOTHING; @@ -380,11 +374,18 @@ BossSpellTableParameters BossSpellWorker::getBSWCastType(uint32 pTemp) CanCastResult BossSpellWorker::_BSWDoCast(uint8 m_uiSpellIdx, Unit* pTarget) { - if (!pTarget) return CAST_FAIL_OTHER; - if (!pTarget->isAlive() || !pTarget->IsInMap(boss)) return CAST_FAIL_OTHER; SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + + if (!pTarget || !pTarget->IsInMap(boss) || !pTarget->isAlive()) + { + error_log("BSW: FAILED casting bugged spell number %u - no target or target not in map",pSpell->m_uiSpellEntry[currentDifficulty]); + return CAST_FAIL_OTHER; + } + debug_log("BSW: Casting bugged spell number %u type %u",pSpell->m_uiSpellEntry[currentDifficulty], pSpell->m_CastTarget); + pTarget->InterruptNonMeleeSpells(false); + pTarget->CastSpell(pTarget, pSpell->m_uiSpellEntry[currentDifficulty], false); return CAST_OK; }; @@ -414,13 +415,19 @@ Unit* BossSpellWorker::_doSummon(uint8 m_uiSpellIdx, TempSummonType summontype, debug_log("BSW: Summoning creature number %u type %u despawn delay %u",pSpell->m_uiSpellEntry[currentDifficulty], pSpell->m_CastTarget, delay); - if (pSpell->LocData.z <= 1.0f) { - float fPosX, fPosY, fPosZ; - if (!boss->IsPositionValid()) return NULL; - boss->GetPosition(fPosX, fPosY, fPosZ); - boss->GetRandomPoint(fPosX, fPosY, fPosZ, urand((uint32)pSpell->LocData.x, (uint32)pSpell->LocData.y), fPosX, fPosY, fPosZ); - return boss->SummonCreature(pSpell->m_uiSpellEntry[currentDifficulty], fPosX, fPosY, fPosZ, 0, summontype, delay); - } else return boss->SummonCreature(pSpell->m_uiSpellEntry[currentDifficulty], pSpell->LocData.x, pSpell->LocData.y, pSpell->LocData.z, 0, summontype, delay); + if (pSpell->LocData.z <= 1.0f) + { + float fPosX, fPosY, fPosZ; + if (!boss->IsPositionValid()) + { + error_log("BSW: FAILED summoning creature, boss %u has invalid position",bossID); + return NULL; + } + boss->GetPosition(fPosX, fPosY, fPosZ); + boss->GetRandomPoint(fPosX, fPosY, fPosZ, urand((uint32)pSpell->LocData.x, (uint32)pSpell->LocData.y), fPosX, fPosY, fPosZ); + return boss->SummonCreature(pSpell->m_uiSpellEntry[currentDifficulty], fPosX, fPosY, fPosZ, 0, summontype, delay); + } + else return boss->SummonCreature(pSpell->m_uiSpellEntry[currentDifficulty], pSpell->LocData.x, pSpell->LocData.y, pSpell->LocData.z, 0, summontype, delay); }; Unit* BossSpellWorker::_doSummonAtPosition(uint8 m_uiSpellIdx, TempSummonType summontype, uint32 delay, float fPosX, float fPosY, float fPosZ) @@ -428,6 +435,7 @@ Unit* BossSpellWorker::_doSummonAtPosition(uint8 m_uiSpellIdx, TempSummonType su SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; debug_log("BSW: Summoning creature number %u type %u despawn delay %u at position %f %f %f",pSpell->m_uiSpellEntry[currentDifficulty], pSpell->m_CastTarget, delay, fPosX, fPosY, fPosZ); + return boss->SummonCreature(pSpell->m_uiSpellEntry[currentDifficulty], fPosX, fPosY, fPosZ, 0, summontype, delay); }; @@ -435,9 +443,10 @@ bool BossSpellWorker::_doRemove(uint8 m_uiSpellIdx, Unit* pTarget, SpellEffectIn { SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; - debug_log("BSW: Removing effect of spell %u type %u",pSpell->m_uiSpellEntry[currentDifficulty], pSpell->m_CastTarget); + debug_log("BSW: Removing effects of spell %u type %u",pSpell->m_uiSpellEntry[currentDifficulty], pSpell->m_CastTarget); - switch (pSpell->m_CastTarget) { + switch (pSpell->m_CastTarget) + { case DO_NOTHING: return true; case SUMMON_NORMAL: @@ -447,7 +456,7 @@ bool BossSpellWorker::_doRemove(uint8 m_uiSpellIdx, Unit* pTarget, SpellEffectIn case CAST_ON_SELF: case APPLY_AURA_SELF: - if (!pTarget) pTarget = boss; + pTarget = boss; break; case CAST_ON_SUMMONS: @@ -455,76 +464,78 @@ bool BossSpellWorker::_doRemove(uint8 m_uiSpellIdx, Unit* pTarget, SpellEffectIn case CAST_ON_BOTTOMAGGRO: case CAST_ON_TARGET: case APPLY_AURA_TARGET: - if (!pTarget) return false; + if (!pTarget) return false; break; case CAST_ON_RANDOM: case CAST_ON_RANDOM_PLAYER: case CAST_ON_ALLPLAYERS: - { - Map::PlayerList const& pPlayers = pMap->GetPlayers(); - for(Map::PlayerList::const_iterator itr = pPlayers.begin(); itr != pPlayers.end(); ++itr) - { - pTarget = itr->getSource(); - if (pTarget && pTarget->isAlive() && pTarget->IsInMap(boss)) - pTarget->RemoveAurasDueToSpell(pSpell->m_uiSpellEntry[currentDifficulty]); - } - return true; - break; - } - - default: return false; - } - if (pTarget) { - if (pTarget->isAlive() && pTarget->IsInMap(boss)) { - if ( pTarget->HasAura(pSpell->m_uiSpellEntry[currentDifficulty]) && - pTarget->GetAura(pSpell->m_uiSpellEntry[currentDifficulty], index)->GetStackAmount() > 1) { - if (pTarget->GetAura(pSpell->m_uiSpellEntry[currentDifficulty], index)->modStackAmount(-1)) - return true; - else return false; - } - else pTarget->RemoveAurasDueToSpell(pSpell->m_uiSpellEntry[currentDifficulty]); - } - else { - if (pTarget->IsInMap(boss)) pTarget->RemoveAurasDueToSpell(pSpell->m_uiSpellEntry[currentDifficulty]); - else { - error_log("BSW: Attempt remove aura fom dead unit %u, unit not same map with boss",pTarget->GetGUIDLow()); - return false; - } - } - } - return true; + { + Map::PlayerList const& pPlayers = pMap->GetPlayers(); + for (Map::PlayerList::const_iterator itr = pPlayers.begin(); itr != pPlayers.end(); ++itr) + { + pTarget = itr->getSource(); + if (_hasAura(m_uiSpellIdx,pTarget)) + pTarget->RemoveAurasDueToSpell(pSpell->m_uiSpellEntry[currentDifficulty]); + } + return true; + break; + } + default: + debug_log("BSW: FAILED Removing effects of spell %u type %u - unsupported type",pSpell->m_uiSpellEntry[currentDifficulty], pSpell->m_CastTarget); + return false; + } + + if (!pTarget || !pTarget->IsInMap(boss) || !pTarget->isAlive()) + { + error_log("BSW: FAILED removing effects of spell number %u - no target or target not in map or target is dead",pSpell->m_uiSpellEntry[currentDifficulty]); + return false; + } + + if (_auraCount(m_uiSpellIdx,pTarget) > 1) + { + if (pTarget->GetAura(pSpell->m_uiSpellEntry[currentDifficulty], index)->modStackAmount(-1)) + return true; + else return false; + } + else pTarget->RemoveAurasDueToSpell(pSpell->m_uiSpellEntry[currentDifficulty]); + return true; }; bool BossSpellWorker::_doAura(uint8 m_uiSpellIdx, Unit* pTarget, SpellEffectIndex index) { - if (!pTarget || !pTarget->IsInMap(boss)) return false; + SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; - SpellEntry const *spell; + if (!pTarget || !pTarget->IsInMap(boss) || !pTarget->isAlive()) + { + error_log("BSW: FAILED adding aura of spell number %u - no target or target not in map or target is dead",pSpell->m_uiSpellEntry[currentDifficulty]); + return false; + } - SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; + SpellEntry const *spell; - if (pTarget->HasAura(pSpell->m_uiSpellEntry[currentDifficulty])) - debug_log("BSW: adding aura stack from spell %u index %u",pSpell->m_uiSpellEntry[currentDifficulty], index); + if (_hasAura(m_uiSpellIdx,pTarget)) + debug_log("BSW: adding aura stack from spell %u index %u",pSpell->m_uiSpellEntry[currentDifficulty], index); + else debug_log("BSW: adding new aura from spell %u index %u",pSpell->m_uiSpellEntry[currentDifficulty], index); spell = (SpellEntry *)GetSpellStore()->LookupEntry(pSpell->m_uiSpellEntry[currentDifficulty]); if (spell) { - debug_log("BSW: adding aura from spell %u index %u",pSpell->m_uiSpellEntry[currentDifficulty], index); int32 basepoint = pSpell->varData ? pSpell->varData - 1 : spell->EffectBasePoints[index] + 1; if (pTarget->AddAura(new BossAura(spell, index, &basepoint, pTarget, pTarget))) return true; }; - return false; + error_log("BSW: FAILED adding aura from spell %u index %u",pSpell->m_uiSpellEntry[currentDifficulty], index); + return false; }; // Copypasting from CreatureAI.cpp. if this called from bossAI-> crashed :( CanCastResult BossSpellWorker::_CanCastSpell(Unit* pTarget, const SpellEntry *pSpell, bool isTriggered) { - if (!pTarget) return CAST_FAIL_OTHER; + if (!pTarget || !pTarget->IsInMap(boss) || !pTarget->isAlive()) return CAST_FAIL_OTHER; // If not triggered, we check if (!isTriggered) { @@ -570,7 +581,7 @@ CanCastResult BossSpellWorker::_CanCastSpell(Unit* pTarget, const SpellEntry *pS CanCastResult BossSpellWorker::_DoCastSpellIfCan(Unit* pTarget, uint32 uiSpell, uint32 uiCastFlags, uint64 uiOriginalCasterGUID) { Unit* pCaster = boss; - if (!pTarget || !pTarget->IsInMap(boss)) return CAST_FAIL_OTHER; + if (!pTarget || !pTarget->IsInMap(boss) || !pTarget->isAlive()) return CAST_FAIL_OTHER; if (uiCastFlags & CAST_FORCE_TARGET_SELF) pCaster = pTarget; @@ -605,7 +616,7 @@ CanCastResult BossSpellWorker::_DoCastSpellIfCan(Unit* pTarget, uint32 uiSpell, } else { - error_log("BSW: DoCastSpellIfCan by creature entry %u attempt to cast spell %u but spell does not exist.", boss->GetEntry(), uiSpell); + error_log("BSW: FAILED DoCastSpellIfCan: boss %u attempt to cast spell %u but spell does not exist.", boss->GetEntry(), uiSpell); return CAST_FAIL_OTHER; } } @@ -650,27 +661,29 @@ Unit* BossSpellWorker::_doSelect(uint32 SpellID, bool spellsearchtype, float ran memset(&_list, 0, sizeof(_list)); - for(Map::PlayerList::const_iterator i = pList.begin(); i != pList.end(); ++i) { if (Player* player = i->getSource()) - { + { if (player->isGameMaster()) continue; if (!player->IsInMap(boss)) continue; - if ( player->isAlive() + if (player->isAlive() && player->IsWithinDistInMap(boss, range) && (SpellID == 0 || (player->HasAura(SpellID) == spellsearchtype)) ) - { - _list[_count] = (Unit*)player; - ++_count; - } - } + { + _list[_count] = (Unit*)player; + ++_count; + } + } } + debug_log("BSW: search result for random player, count = %u ",_count); + if (_count == 0) return NULL; + else return _list[urand(0,_count)]; }; @@ -682,8 +695,13 @@ Creature* BossSpellWorker::SelectNearestCreature(uint32 guid, float range) MaNGOS::CreatureLastSearcher searcher(boss, pTarget, u_check); Cell::VisitGridObjects(boss, searcher, range*2); - if (pTarget && pTarget != boss && pTarget->isAlive()) return pTarget; - else return NULL; + + if (pTarget && pTarget->IsInMap(boss) && pTarget != boss && pTarget->isAlive()) + { + debug_log("BSW: search creature %u in range %f - found it.",guid,range); + return pTarget; + } + else return NULL; } #endif \ No newline at end of file diff --git a/include/sc_boss_spell_worker.h b/include/sc_boss_spell_worker.h index 8331b7a1e..e6f4834e1 100644 --- a/include/sc_boss_spell_worker.h +++ b/include/sc_boss_spell_worker.h @@ -98,15 +98,14 @@ class MANGOS_DLL_DECL BossSpellWorker { public: explicit BossSpellWorker(ScriptedAI* bossAI); - ~BossSpellWorker(); - Unit* currentTarget; + ~BossSpellWorker(); void Reset(); void resetTimer(uint32 SpellID) { - uint8 m_uiSpellIdx = FindSpellIDX(SpellID); + uint8 m_uiSpellIdx = _findSpellIDX(SpellID); if (!queryIndex(m_uiSpellIdx)) return; return _resetTimer(m_uiSpellIdx); }; @@ -119,133 +118,130 @@ class MANGOS_DLL_DECL BossSpellWorker bool timedQuery(uint32 SpellID, uint32 diff) { - uint8 m_uiSpellIdx = FindSpellIDX(SpellID); + uint8 m_uiSpellIdx = _findSpellIDX(SpellID); if (!queryIndex(m_uiSpellIdx)) return false; return _QuerySpellPeriod(m_uiSpellIdx, diff); }; CanCastResult timedCast(uint32 SpellID, uint32 diff, Unit* pTarget = NULL) { - uint8 m_uiSpellIdx = FindSpellIDX(SpellID); + uint8 m_uiSpellIdx = _findSpellIDX(SpellID); if (!queryIndex(m_uiSpellIdx)) return CAST_FAIL_OTHER; - if (!_QuerySpellPeriod(FindSpellIDX(SpellID), diff)) return CAST_FAIL_STATE; + if (!_QuerySpellPeriod(_findSpellIDX(SpellID), diff)) return CAST_FAIL_STATE; else return _BSWSpellSelector(m_uiSpellIdx, pTarget); }; CanCastResult doCast(uint32 SpellID, Unit* pTarget = NULL) { - uint8 m_uiSpellIdx = FindSpellIDX(SpellID); + uint8 m_uiSpellIdx = _findSpellIDX(SpellID); if (queryIndex(m_uiSpellIdx)) return _BSWSpellSelector(m_uiSpellIdx, pTarget); - else return CAST_FAIL_OTHER; + else return CAST_FAIL_OTHER; }; CanCastResult doCast(Unit* pTarget, uint32 SpellID) { if (!pTarget) return CAST_FAIL_OTHER; - uint8 m_uiSpellIdx = FindSpellIDX(SpellID); + uint8 m_uiSpellIdx = _findSpellIDX(SpellID); if (queryIndex(m_uiSpellIdx)) return _BSWCastOnTarget(pTarget, m_uiSpellIdx); - else return CAST_FAIL_OTHER; + else return CAST_FAIL_OTHER; }; bool doRemove(uint32 SpellID, Unit* pTarget = NULL, SpellEffectIndex index = EFFECT_INDEX_0) { - uint8 m_uiSpellIdx = FindSpellIDX(SpellID); - if (!queryIndex(m_uiSpellIdx)) return false; - return _doRemove(m_uiSpellIdx,pTarget, index); + uint8 m_uiSpellIdx = _findSpellIDX(SpellID); + if (!queryIndex(m_uiSpellIdx)) return false; + return _doRemove(m_uiSpellIdx,pTarget, index); }; bool doAura(uint32 SpellID, Unit* pTarget = NULL, SpellEffectIndex index = EFFECT_INDEX_0) { - uint8 m_uiSpellIdx = FindSpellIDX(SpellID); - if (!queryIndex(m_uiSpellIdx)) return false; - return _doAura(m_uiSpellIdx,pTarget, index); + uint8 m_uiSpellIdx = _findSpellIDX(SpellID); + if (!queryIndex(m_uiSpellIdx)) return false; + return _doAura(m_uiSpellIdx,pTarget, index); }; bool hasAura(uint32 SpellID, Unit* pTarget = NULL) { - uint8 m_uiSpellIdx = FindSpellIDX(SpellID); - if (!queryIndex(m_uiSpellIdx)) return false; - if (!pTarget) pTarget = boss; - return _hasAura(m_uiSpellIdx,pTarget); + uint8 m_uiSpellIdx = _findSpellIDX(SpellID); + if (!queryIndex(m_uiSpellIdx)) return false; + if (!pTarget) pTarget = boss; + return _hasAura(m_uiSpellIdx,pTarget); }; uint8 auraCount(uint32 SpellID, Unit* pTarget = NULL, SpellEffectIndex index = EFFECT_INDEX_0) { - uint8 m_uiSpellIdx = FindSpellIDX(SpellID); - if (!queryIndex(m_uiSpellIdx)) return 0; - if (!pTarget) pTarget = boss; - if (!_hasAura(m_uiSpellIdx,pTarget)) return 0; - else return _auraCount(m_uiSpellIdx,pTarget,index); + uint8 m_uiSpellIdx = _findSpellIDX(SpellID); + if (!queryIndex(m_uiSpellIdx)) return 0; + if (!pTarget) pTarget = boss; + return _auraCount(m_uiSpellIdx,pTarget,index); }; Unit* doSummon(uint32 SpellID, TempSummonType type = TEMPSUMMON_CORPSE_TIMED_DESPAWN, uint32 delay = 60000) { - uint8 m_uiSpellIdx = FindSpellIDX(SpellID); - if (!queryIndex(m_uiSpellIdx)) return NULL; - return _doSummon(m_uiSpellIdx, type, delay); + uint8 m_uiSpellIdx = _findSpellIDX(SpellID); + if (!queryIndex(m_uiSpellIdx)) return NULL; + return _doSummon(m_uiSpellIdx, type, delay); }; Unit* SelectRandomPlayer(uint32 SpellID = 0, bool spellsearchtype = false, float range = 100.0f) { - return _doSelect(SpellID, spellsearchtype, range); + return _doSelect(SpellID, spellsearchtype, range); }; Unit* SelectRandomPlayerAtRange(float range) { - return _doSelect(0, false, range); + return _doSelect(0, false, range); }; Unit* doSummon(uint32 SpellID, float fPosX, float fPosY, float fPosZ, TempSummonType type = TEMPSUMMON_CORPSE_TIMED_DESPAWN, uint32 delay = 60000) { - uint8 m_uiSpellIdx = FindSpellIDX(SpellID); - if (!queryIndex(m_uiSpellIdx)) return NULL; - return _doSummonAtPosition(m_uiSpellIdx, type, delay, fPosX, fPosY, fPosZ); + uint8 m_uiSpellIdx = _findSpellIDX(SpellID); + if (!queryIndex(m_uiSpellIdx)) return NULL; + return _doSummonAtPosition(m_uiSpellIdx, type, delay, fPosX, fPosY, fPosZ); }; CanCastResult BSWSpellSelector(uint32 SpellID, Unit* pTarget = NULL) { - uint8 m_uiSpellIdx = FindSpellIDX(SpellID); - if (!queryIndex(m_uiSpellIdx)) return CAST_FAIL_OTHER; - return _BSWSpellSelector(m_uiSpellIdx, pTarget); + uint8 m_uiSpellIdx = _findSpellIDX(SpellID); + if (!queryIndex(m_uiSpellIdx)) return CAST_FAIL_OTHER; + return _BSWSpellSelector(m_uiSpellIdx, pTarget); }; CanCastResult BSWDoCast(uint32 SpellID, Unit* pTarget) { - uint8 m_uiSpellIdx = FindSpellIDX(SpellID); - if (!queryIndex(m_uiSpellIdx)) return CAST_FAIL_OTHER; - return _BSWDoCast(m_uiSpellIdx, pTarget); + uint8 m_uiSpellIdx = _findSpellIDX(SpellID); + if (!queryIndex(m_uiSpellIdx)) return CAST_FAIL_OTHER; + return _BSWDoCast(m_uiSpellIdx, pTarget); }; Unit* SelectLowHPFriendly(float fRange = 40.0f, uint32 uiMinHPDiff = 0); uint8 bossSpellCount() { - return _bossSpellCount; + return _bossSpellCount; }; bool queryIndex(uint8 m_uiSpellIdx) { - if ( (m_uiSpellIdx >= 0) - && (m_uiSpellIdx <= bossSpellCount()) - && (m_uiSpellIdx != SPELL_INDEX_ERROR)) - return true; - else return false; + if ( (m_uiSpellIdx >= 0) + && (m_uiSpellIdx <= bossSpellCount()) + && (m_uiSpellIdx != SPELL_INDEX_ERROR)) + return true; + else return false; }; Creature* SelectNearestCreature(uint32 guid, float range = 120.0f); private: - BossSpellTableParameters getBSWCastType(uint32 pTemp); + BossSpellTableParameters _getBSWCastType(uint32 pTemp); - uint8 FindSpellIDX(uint32 SpellID); + uint8 _findSpellIDX(uint32 SpellID); void LoadSpellTable(); void _resetTimer(uint8 m_uiSpellIdx); - bool isSummon(uint8 m_uiSpellIdx); - Unit* _doSelect(uint32 SpellID, bool spellsearchtype = false, float range = 100.0f); Unit* _doSummon(uint8 m_uiSpellIdx, TempSummonType type = TEMPSUMMON_CORPSE_TIMED_DESPAWN, uint32 delay = 60000); @@ -274,15 +270,15 @@ class MANGOS_DLL_DECL BossSpellWorker void _fillEmptyDataField(); -// Constants from CreatureAI() - ScriptedAI* bossAI; - Creature* boss; - uint32 bossID; - uint8 _bossSpellCount; - Difficulty currentDifficulty; - uint32 m_uiSpell_Timer[MAX_BOSS_SPELLS]; - SpellTable m_BossSpell[MAX_BOSS_SPELLS]; - Map* pMap; +// Constants + ScriptedAI* bossAI; + Creature* boss; + uint32 bossID; + uint8 _bossSpellCount; + Difficulty currentDifficulty; + uint32 m_uiSpell_Timer[MAX_BOSS_SPELLS]; + SpellTable m_BossSpell[MAX_BOSS_SPELLS]; + Map* pMap; }; #endif \ No newline at end of file From 0c1077c3e372d85be8395ec2d7cf8d2f20a39ae3 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Fri, 18 Jun 2010 17:46:10 +0400 Subject: [PATCH 369/405] Implement Forge of Souls (My+Mioka+partially TC) --- Makefile.am | 3 + addition/723_icecrown_down_mangos.sql | 24 + addition/723_icecrown_down_scriptdev2.sql | 60 +- .../forge_of_souls/boss_bronjahm.cpp | 44 ++ .../forge_of_souls/boss_devourer_of_souls.cpp | 422 ++++++++++++- .../frozen_halls/forge_of_souls/def_forge.h | 29 +- .../forge_of_souls/forge_of_souls.cpp | 537 ++++++++++++++++ .../instance_forge_of_souls.cpp | 20 +- .../forge_of_souls/trash_forge_of_souls.cpp | 594 ++++++++++++++++++ system/ScriptLoader.cpp | 4 + 10 files changed, 1676 insertions(+), 61 deletions(-) create mode 100644 scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.cpp create mode 100644 scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/trash_forge_of_souls.cpp diff --git a/Makefile.am b/Makefile.am index 582ecf8b3..4bf4726e9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -339,9 +339,12 @@ scripts/northrend/gundrak/boss_moorabi.cpp \ scripts/northrend/gundrak/boss_sladran.cpp \ scripts/northrend/gundrak/gundrak.h \ scripts/northrend/gundrak/instance_gundrak.cpp \ +scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/def_forge.h \ scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp \ scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp \ scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp \ +scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.cpp \ +scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/trash_forge_of_souls.cpp \ scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp \ scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_gafrost.cpp \ scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp \ diff --git a/addition/723_icecrown_down_mangos.sql b/addition/723_icecrown_down_mangos.sql index 7616a77e9..1110f0e4c 100644 --- a/addition/723_icecrown_down_mangos.sql +++ b/addition/723_icecrown_down_mangos.sql @@ -1,9 +1,32 @@ +-- Forge of souls UPDATE `instance_template` SET `script`='instance_forge_of_souls' WHERE `map`=632; UPDATE `creature_template` SET `ScriptName`='boss_bronjahm', `AIName` ='' WHERE `entry`=36497; UPDATE `creature_template` SET `ScriptName`='mob_soul_fragment', `modelid_A`= 30233, `modelid_H`= 30233, `AIName` ='' WHERE `entry`=36535; -- UPDATE `creature_template` SET `ScriptName`='mob_soul_storm', `AIName` ='' WHERE `entry`=; + -- UPDATE `creature_template` SET `ScriptName`='boss_devourer', `AIName` ='' WHERE `entry`=33113; +UPDATE `creature_template` SET `AIName`='', `Scriptname`='boss_devourer_of_souls' where `entry` IN (36502); +UPDATE `creature_template` SET `AIName`='', `Scriptname`='npc_well_of_soul' where `entry` IN (36536); +UPDATE `creature_template` SET `AIName`='', `Scriptname`='npc_unleashed_soul' where `entry` IN (36595); + +UPDATE `creature_template` SET `AIName`='', `Scriptname`='npc_jaina_and_sylvana_FSintro' where `entry` IN (37597, 37596); +UPDATE `creature_template` SET `AIName`='', `Scriptname`='npc_jaina_and_sylvana_FSextro' where `entry` IN (38160, 38161); +UPDATE `creature_template` SET `scale`='0.8', `equipment_id`='1221' where `entry` IN (37597, 38160, 36993, 38188, 37221, 36955); +UPDATE `creature_template` SET `scale`='0.8' where `entry` IN (36658, 37225, 37223, 37226, 37554); +UPDATE `creature_template` SET `npcflag`='0' where `entry` IN (38160, 38161); +UPDATE `creature_template` SET `npcflag`='3' where `entry` IN (37597, 37596, 36993, 36990); +UPDATE `creature_template` SET `scale`='1' where `entry` IN (38161, 37596, 36990); +UPDATE `creature_template` SET `scale`='1' where `entry` IN (37755); +UPDATE `creature_template` SET `equipment_id`='1290' where `entry` IN (36990, 37596, 38161, 38189, 37223, 37554); +-- UPDATE `creature_template` SET `AIName`='', `Scriptname`='npc_soulguard_watchman' where `entry` IN (36478); +-- UPDATE `creature_template` SET `AIName`='', `Scriptname`='npc_soulguard_reaper' where `entry` IN (36499); +-- UPDATE `creature_template` SET `AIName`='', `Scriptname`='npc_soulguard_adept' where `entry` IN (36620); +-- UPDATE `creature_template` SET `AIName`='', `Scriptname`='npc_soulguard_bonecaster' where `entry` IN (36564); +-- UPDATE `creature_template` SET `AIName`='', `Scriptname`='npc_soulguard_animator' where `entry` IN (36516); +-- UPDATE `creature_template` SET `AIName`='', `Scriptname`='npc_soul_horror' where `entry` IN (36522); +-- UPDATE `creature_template` SET `AIName`='', `Scriptname`='npc_npc_spectral_warden' where `entry` IN (36666); +-- Pit of saron -- UPDATE `instance_template` SET `script`='instance_pit_of_saron' WHERE `map`=658; -- UPDATE `creature_template` SET `ScriptName`='boss_ick', `AIName` ='' WHERE `entry`=36476; -- UPDATE `creature_template` SET `ScriptName`='boss_krick', `AIName` ='' WHERE `entry`=36477; @@ -11,6 +34,7 @@ UPDATE `creature_template` SET `ScriptName`='mob_soul_fragment', `modelid_A`= 30 -- UPDATE `creature_template` SET `ScriptName`='boss_forgemaster_garfrost', `AIName` ='' WHERE `entry`=36494; -- UPDATE `creature_template` SET `ScriptName`='boss_scourgelord_tyrannus', `AIName` ='' WHERE `entry`=36658; +-- Halls of reflection UPDATE `instance_template` SET `script`='instance_halls_of_reflection' WHERE `map`=668; UPDATE `creature_template` SET `ScriptName`='boss_falryn' WHERE `entry`=38112; UPDATE `creature_template` SET `ScriptName`='boss_marwyn' WHERE `entry`=38113; diff --git a/addition/723_icecrown_down_scriptdev2.sql b/addition/723_icecrown_down_scriptdev2.sql index ea13b2b11..b867bf73c 100644 --- a/addition/723_icecrown_down_scriptdev2.sql +++ b/addition/723_icecrown_down_scriptdev2.sql @@ -1,5 +1,5 @@ -- Pit of saron -DELETE FROM `script_texts` WHERE `entry` <= -1658000 and `entry` >= -1658999; +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1658100 AND -1658000; INSERT INTO `script_texts` (`entry`,`content_default`,`content_loc1`,`content_loc2`,`content_loc3`,`content_loc4`,`content_loc5`,`content_loc6`,`content_loc7`,`content_loc8`,`sound`,`type`,`language`,`emote`,`comment`) VALUES -- Garfrost (-1658001,'Tiny creatures under feet, you bring Garfrost something good to eat!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16912,1,0,0,'garfrost SAY_AGGRO'), @@ -64,53 +64,53 @@ INSERT INTO `script_texts` (`entry`,`content_default`,`content_loc1`,`content_lo (-1658069,'I... I could not save them... Damn you, Arthas! DAMN YOU!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16616,0,0,0,'Jaina SAY_JAYNA_OUTRO_5'); -- Forge of souls -DELETE FROM `script_texts` WHERE `entry` <= -1632000 and `entry` >= -1632999; +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1632099 AND -1632000; INSERT INTO `script_texts` (`entry`,`content_default`,`content_loc1`,`content_loc2`,`content_loc3`,`content_loc4`,`content_loc5`,`content_loc6`,`content_loc7`,`content_loc8`,`sound`,`type`,`language`,`emote`,`comment`) VALUES -- Bronjham -(-1632001,'Finally...a captive audience!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16595,6,0,0,'Bronjham SAY_AGGRO'), -(-1632002,'Fodder for the engine!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16596,6,0,0,'Bronjham SAY_SLAY_1'), -(-1632003,'Another soul to strengthen the host!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16597,6,0,0,'Bronjham SAY_SLAY_2'), -(-1632004,'Oooooo...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16598,6,0,0,'Bronjham SAY_DEATH'), -(-1632005,'The vortex of the harvested calls to you!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16599,3,0,0,'Bronjham SAY_SOUL_STORM'), -(-1632006,'I will sever the soul from your body!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16600,6,0,0,'Bronjham SAY_CORRUPT_SOUL'), +(-1632001,'Finally...a captive audience!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Наконец то! Гости пожаловали!',16595,6,0,0,'Bronjham SAY_AGGRO'), +(-1632002,'Fodder for the engine!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Скормлю тебя машине!',16596,6,0,0,'Bronjham SAY_SLAY_1'), +(-1632003,'Another soul to strengthen the host!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Еще одна душа обогатит вместилище!',16597,6,0,0,'Bronjham SAY_SLAY_2'), +(-1632004,'Oooooo...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Аааааааааааа...',16598,6,0,0,'Bronjham SAY_DEATH'), +(-1632005,'The vortex of the harvested calls to you!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Вихрь погубленных душ, взываю к вам!',16599,3,0,0,'Bronjham SAY_SOUL_STORM'), +(-1632006,'I will sever the soul from your body!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Я вырву душу из твоего тела!',16600,6,0,0,'Bronjham SAY_CORRUPT_SOUL'), -- Devourer of Souls -(-1632010,'You dare look upon the host of souls? I SHALL DEVOUR YOU WHOLE!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16884,1,0,0,'Devoureur SAY_FACE_ANGER_AGGRO'), +(-1632010,'You dare look upon the host of souls? I SHALL DEVOUR YOU WHOLE!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Вы осмелились взглянуть на вместилище душ! Я сожру вас заживо!',16884,1,0,0,'Devoureur SAY_FACE_ANGER_AGGRO'), (-1632011,'You dare look upon the host of souls? I SHALL DEVOUR YOU WHOLE!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16890,1,0,0,'Devoureur SAY_FACE_DESIRE_AGGRO'), -(-1632012,'Damnation!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16885,1,0,0,'Devoureur SAY_FACE_ANGER_SLAY_1'), +(-1632012,'Damnation!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Проклинаю тебя!',16885,1,0,0,'Devoureur SAY_FACE_ANGER_SLAY_1'), (-1632013,'Damnation!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16896,1,0,0,'Devoureur SAY_FACE_SORROW_SLAY_1'), (-1632014,'Damnation!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16891,1,0,0,'Devoureur SAY_FACE_DESIRE_SLAY_1'), -(-1632015,'Doomed for eternity!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16886,1,0,0,'Devoureur SAY_FACE_ANGER_SLAY_2'), +(-1632015,'Doomed for eternity!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Обрекаю тебя на вечные муки!',16886,1,0,0,'Devoureur SAY_FACE_ANGER_SLAY_2'), (-1632016,'Doomed for eternity!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16897,1,0,0,'Devoureur SAY_FACE_SORROW_SLAY_2'), (-1632017,'Doomed for eternity!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16892,1,0,0,'Devoureur SAY_FACE_DESIRE_SLAY_2'), -(-1632018,'The swell of souls will not be abated! You only delay the inevitable!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16887,1,0,0,'Devoureur SAY_FACE_ANGER_DEATH'), +(-1632018,'The swell of souls will not be abated! You only delay the inevitable!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Вместилише душ не ослабнет! Вы лишь пытаетесь отсрочить неизбежное.',16887,1,0,0,'Devoureur SAY_FACE_ANGER_DEATH'), (-1632019,'The swell of souls will not be abated! You only delay the inevitable!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16898,1,0,0,'Devoureur SAY_FACE_SORROW_DEATH'), (-1632020,'The swell of souls will not be abated! You only delay the inevitable!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16893,1,0,0,'Devoureur SAY_FACE_DESIRE_DEATH'), (-1632021,'Devourer of Souls begins to cast Mirrored Soul!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'Devoureur EMOTE_MIRRORED_SOUL'), (-1632022,'Devourer of Souls begins to Unleash Souls!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'Devoureur EMOTE_UNLEASH_SOUL'), -(-1632023,'SUFFERING! ANGUISH! CHAOS! RISE AND FEED!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16888,1,0,0,'Devoureur SAY_FACE_ANGER_UNLEASH_SOUL'), +(-1632023,'SUFFERING! ANGUISH! CHAOS! RISE AND FEED!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Страдание, мучение, хаос! Восстаньте и пируйте!',16888,1,0,0,'Devoureur SAY_FACE_ANGER_UNLEASH_SOUL'), (-1632024,'SUFFERING! ANGUISH! CHAOS! RISE AND FEED!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16899,1,0,0,'Devoureur SAY_FACE_SORROW_UNLEASH_SOUL'), (-1632025,'SUFFERING! ANGUISH! CHAOS! RISE AND FEED!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16894,1,0,0,'Devoureur SAY_FACE_DESIRE_UNLEASH_SOUL'), (-1632026,'Devourer of Souls begins to cast Wailing Souls!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'Devoureur EMOTE_WAILING_SOUL'), -(-1632027,'Stare into the abyss, and see your end!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16889,1,0,0,'Devoureur SAY_FACE_ANGER_WAILING_SOUL'), +(-1632027,'Stare into the abyss, and see your end!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Вглядитесь в бездну, и узрите свою смерть!',16889,1,0,0,'Devoureur SAY_FACE_ANGER_WAILING_SOUL'), (-1632028,'Stare into the abyss, and see your end!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16895,1,0,0,'Devoureur SAY_FACE_DESIRE_WAILING_SOUL'), -(-1632029,'Excellent work, champions! We shall set up our base camp in these chambers. My mages will get the Scourge transport device working shortly. Step inside it when you''re ready for your next mission. I will meet you on the other side.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16625,1,0,0,'Jaina SAY_JAINA_OUTRO'), -(-1632030,'Excellent work, champions! We shall set up our base camp in these chambers. My mages will get the Scourge transport device working shortly. Step inside when you are ready for your next mission. I will meet you on the other side.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17044,1,0,0,'Sylvanas SAY_SYLVANAS_OUTRO'), +(-1632029,'Excellent work, champions! We shall set up our base camp in these chambers. My mages will get the Scourge transport device working shortly. Step inside it when you''re ready for your next mission. I will meet you on the other side.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Вы справились. Мы разобьем лагерь в этих покоях. Вскоре мои маги заставят портал плети работать! Войдите в него, когда будете готовы к следующему заданию. Я присоеденусь к вам чуть позже.',16625,1,0,0,'Jaina SAY_JAINA_OUTRO'), +(-1632030,'Excellent work, champions! We shall set up our base camp in these chambers. My mages will get the Scourge transport device working shortly. Step inside when you are ready for your next mission. I will meet you on the other side.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Превосходно! Мы разобьем лагерь в этих покоях! Вскоре мои маги заставят портал плети работать, войдите в него когда будете готовы к следующему заданию! Я присоединюсь к вам позже.',17044,1,0,0,'Sylvanas SAY_SYLVANAS_OUTRO'), -- Jaina -(-1632040,'Thank the light for seeing you here safely. We have much work to do if we are to defeat the Lich King and put an end to the Scourge.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16617,0,0,0,'Jaina SAY_INTRO_1'), -(-1632041,'Our allies within the Argent Crusade and the Knights of the Ebon Blade have broken through the front gate of Icecrown and are attempting to establish a foothold within the Citadel.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16618,0,0,0,'Jaina SAY_INTRO_2'), -(-1632042,'Their success hinges upon what we discover in these cursed halls. Although our mission is a wrought with peril, we must persevere!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16619,0,0,0,'Jaina SAY_INTRO_3'), -(-1632043,'With the attention of the Lich King drawn toward the front gate, we will be working our way through the side in search of information that will enable us to defeat the Scourge - once and for all.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16620,0,0,0,'Jaina SAY_INTRO_4'), -(-1632044,'King Varian''s SI7 agents have gathered information about a private sanctum of the Lich King''s deep within a place called the Halls of Reflection.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16621,0,0,0,'Jaina SAY_INTRO_5'), -(-1632045,'We will carve a path through this wretched place and find a way to enter the Halls of Reflection. I sense powerful magic hidden away within those walls... Magic that could be the key to destroy the Scourge.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16622,0,0,0,'Jaina SAY_INTRO_6'), -(-1632046,'Your first mission is to destroy the machines of death within this malevolent engine of souls, and clear a path for our soldiers.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16623,0,0,0,'Jaina SAY_INTRO_7'), -(-1632047,'Make haste, champions! I will prepare the troops to fall in behind you.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16624,0,0,0,'Jaina SAY_INTRO_8'), +(-1632040,'Thank the light for seeing you here safely. We have much work to do if we are to defeat the Lich King and put an end to the Scourge.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Слава свету! Вы целы и невредимы нам предстоит многое сделать, если мы хотим покончить с королем личем и плетью.',16617,0,0,0,'Jaina SAY_INTRO_1'), +(-1632041,'Our allies within the Argent Crusade and the Knights of the Ebon Blade have broken through the front gate of Icecrown and are attempting to establish a foothold within the Citadel.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Серебряный Авангард и рыцари черного клинка прорвались через главные ворота и пытаются укрепить свои позиции в цитадели!',16618,0,0,0,'Jaina SAY_INTRO_2'), +(-1632042,'Their success hinges upon what we discover in these cursed halls. Although our mission is a wrought with peril, we must persevere!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Их успех зависит от того что мы найдем этих ужасных залах. Пусть наша миссия опасна, но мы должны выстоять.',16619,0,0,0,'Jaina SAY_INTRO_3'), +(-1632043,'With the attention of the Lich King drawn toward the front gate, we will be working our way through the side in search of information that will enable us to defeat the Scourge - once and for all.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Пока король лич отвлекся на главные ворота, мы проникнем внутрь другим путем и постараемся узнать как можно покончить с плетью раз и навсегда.',16620,0,0,0,'Jaina SAY_INTRO_4'), +(-1632044,'King Varian''s SI7 agents have gathered information about a private sanctum of the Lich King''s deep within a place called the Halls of Reflection.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Разведчики SI7 отправленные Варианом сообщают что покои короля находятся в глубине дворца! Это место называется Залами отражений.',16621,0,0,0,'Jaina SAY_INTRO_5'), +(-1632045,'We will carve a path through this wretched place and find a way to enter the Halls of Reflection. I sense powerful magic hidden away within those walls... Magic that could be the key to destroy the Scourge.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Мы проложим себе путь сквозь это проклятое место и найдем вход в залы отражений. Я чувствую что в них сокрыта могушественная магия, которая поможет нам сокрушить плеть!',16622,0,0,0,'Jaina SAY_INTRO_6'), +(-1632046,'Your first mission is to destroy the machines of death within this malevolent engine of souls, and clear a path for our soldiers.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Ваша первая задача разрушить машины смерти в этом механизме душ, это откроет путь нашим солдатам.',16623,0,0,0,'Jaina SAY_INTRO_7'), +(-1632047,'Make haste, champions! I will prepare the troops to fall in behind you.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Спешите герои, я прикажу солдатам следовать за вами!',16624,0,0,0,'Jaina SAY_INTRO_8'), -- Sylvanas -(-1632050,'The Argent Crusade and the Knights of the Ebon Blade have assaulted the gates of Icecrown Citadel and are preparing for a massive attack upon the Scourge. Our missition is a bit more subtle, but equally as important.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17038,0,0,0,'Sylvanas SAY_INTRO_1'), -(-1632051,'With the attention of the Lich King turned towards the front gate, we''ll be working our way through the side in search of information that will enable us to defeat the Lich King - once and for all.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17039,0,0,0,'Sylvanas SAY_INTRO_2'), -(-1632052,'Our scouts have reported that the Lich King has a private chamber, outside of the Frozen Throne, deep within a place called the Halls of Reflection. That is our target, champions.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17040,0,0,0,'Sylvanas SAY_INTRO_3'), -(-1632053,'We will cut a swath of destruction through this cursed place and find a way to enter the Halls of Reflection. If there is anything of value to be found here, it will be found in the Halls.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17041,0,0,0,'Sylvanas SAY_INTRO_4'), -(-1632054,'Your first mission is to destroy the machines of death within this wretched engine of souls, and clear a path for our soldiers.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17042,0,0,0,'Sylvanas SAY_INTRO_5'), -(-1632055,'The Dark Lady watches over you. Make haste!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17043,0,0,0,'Sylvanas SAY_INTRO_6'); +(-1632050,'The Argent Crusade and the Knights of the Ebon Blade have assaulted the gates of Icecrown Citadel and are preparing for a massive attack upon the Scourge. Our missition is a bit more subtle, but equally as important.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Серебряный Авангард и рыцари черного клинка штурмуют ворота цитадели ледяной короны! И готовятся нанести решаюший удар! Мы будем действовать незаметно, но не менее эффективно.',17038,0,0,0,'Sylvanas SAY_INTRO_1'), +(-1632051,'With the attention of the Lich King turned towards the front gate, we''ll be working our way through the side in search of information that will enable us to defeat the Lich King - once and for all.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Пока Король-Лич отвлекся мы проникнем внутрь другим путем и постараемся понять как можно покончить с ним раз и навсегда.',17039,0,0,0,'Sylvanas SAY_INTRO_2'), +(-1632052,'Our scouts have reported that the Lich King has a private chamber, outside of the Frozen Throne, deep within a place called the Halls of Reflection. That is our target, champions.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Наши разведчики сообщили что покои короля лича находятся в глубине дворца, недалеко от ледяного трона. Это место называется залами отражений, туда и лежит наш путь.',17040,0,0,0,'Sylvanas SAY_INTRO_3'), +(-1632053,'We will cut a swath of destruction through this cursed place and find a way to enter the Halls of Reflection. If there is anything of value to be found here, it will be found in the Halls.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Мы проложим себе путь сквозь это проклетое место и найдем и найдем вход в залы отражений! Если в цитадели и есть что то достойное внимания оно ждет нас именно там.',17041,0,0,0,'Sylvanas SAY_INTRO_4'), +(-1632054,'Your first mission is to destroy the machines of death within this wretched engine of souls, and clear a path for our soldiers.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Вашей первой задачей будет разрушение машин смерти в этом гнусном механизме душ, это откроет путь к нашим солдатам',17042,0,0,0,'Sylvanas SAY_INTRO_5'), +(-1632055,'The Dark Lady watches over you. Make haste!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Темная госпожа будет наблюдать за вами, спешите!',17043,0,0,0,'Sylvanas SAY_INTRO_6'); diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp index 2c3dad4d8..5f357af5b 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp @@ -40,6 +40,12 @@ enum BossSpells SPELL_SOULSTORM_2 = 68921, SPELL_FEAR = 68950, SPELL_SHADOW_BOLT = 70043, + + /*Music*/ + Battle01 = 6077, + Battle02 = 6078, + Battle03 = 6079, + }; struct MANGOS_DLL_DECL boss_bronjahmAI : public ScriptedAI @@ -54,6 +60,8 @@ struct MANGOS_DLL_DECL boss_bronjahmAI : public ScriptedAI ScriptedInstance *pInstance; BossSpellWorker* bsw; uint8 stage; + uint32 BattleMusicTimer; + uint32 Music; void Reset() { @@ -64,6 +72,23 @@ struct MANGOS_DLL_DECL boss_bronjahmAI : public ScriptedAI void Aggro(Unit *who) { + Music = (urand(0, 2)); + switch(Music) + { + case 0: + m_creature->PlayDirectSound(Battle01); + BattleMusicTimer = 48000; + break; + case 1: + m_creature->PlayDirectSound(Battle02); + BattleMusicTimer = 27000; + break; + case 2: + m_creature->PlayDirectSound(Battle03); + BattleMusicTimer = 36000; + break; + } + if(pInstance) pInstance->SetData(TYPE_BRONJAHM, IN_PROGRESS); DoScriptText(-1632001,m_creature,who); SetCombatMovement(true); @@ -132,6 +157,25 @@ struct MANGOS_DLL_DECL boss_bronjahmAI : public ScriptedAI if (m_creature->GetHealthPercent() <= 30.0f && stage == 0) stage = 1; DoMeleeAttackIfReady(); + + if (BattleMusicTimer < diff && m_creature->isAlive()) + { + switch(Music) + { + case 0: + m_creature->PlayDirectSound(Battle01); + BattleMusicTimer = 49000; + break; + case 1: + m_creature->PlayDirectSound(Battle02); + BattleMusicTimer = 28000; + break; + case 2: + m_creature->PlayDirectSound(Battle03); + BattleMusicTimer = 37000; + break; + } + } else BattleMusicTimer -= diff; } }; diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp index ab0936d70..f7189cb7e 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp @@ -1,51 +1,410 @@ +/* Copyright (C) 2006 - 2010 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_devourer_of_souls +SD%Complete: 100% +SDComment: MaxXx2021, modified by /dev/rsa +SDCategory: The Forge of Souls +EndScriptData */ + #include "precompiled.h" #include "def_forge.h" + enum { - //common - SPELL_BERSERK = 47008, - //yells - //Abilities - SPELL_PHANTOM_BLAST_N = 68982, - SPELL_MIRRORED_SOUL_N = 69051, - SPELL_WELL_OF_SOULS_N = 68820, - SPELL_UNLEASHED_SOULS_N = 68939, - SPELL_WAILING_SOULS_N = 68873 + /*Speach*/ + SAY_DEVOURER_AGGRO_MALE_01 = -1632010, + SAY_DEVOURER_SLAY_01_MALE_01 = -1632012, + SAY_DEVOURER_SLAY_02_MALE_01 = -1632015, + SAY_DEVOURER_DEATH_MALE_01 = -1632018, + SAY_DEVOURER_SUMMON_MALE_01 = -1632023, + SAY_DEVOURER_DARK_MALE_01 = -1632027, + + SAY_JAINA_FS09_EXTRO = -1632029, + SAY_SYLVANA_FS07_EXTRO = -1632030, + + /*Spell And Visual Effects*/ + SPELL_PHANTOM_BLAST = 68982, + SPELL_MIRRORED_SOUL = 69051, + SPELL_WELL_OF_SOULS = 68820, + SPELL_UNLEASHED_SOULS = 68939, + SPELL_WAILING_SOULS = 68912, //68873 + SPELL_WELL_OF_SOULS_VIS = 68854, + SPELL_WELL_OF_SOUL_DM = 68863, + + /*Units*/ + NPC_WELL_OF_SOUL = 36536, + NPC_UNLEASHED_SOUL = 36595, + + /*Others*/ + MODEL_FAT = 30149, + MODEL_WOMAN = 30150, + + /*Music*/ + Battle01 = 6077, + Battle02 = 6078, + Battle03 = 6079, + + MAX_POINTS = 22, +}; + +static Locations SpawnLoc[]= +{ +{5618.139f, 2451.873f, 705.854f}, //0 - spawn +{5590.47f, 2427.79f, 705.935f}, +{5593.59f, 2428.34f, 705.935f}, +{5600.81f, 2429.31f, 705.935f}, +{5600.81f, 2421.12f, 705.935f}, +{5601.43f, 2426.53f, 705.935f}, +{5601.55f, 2418.36f, 705.935f}, +{5598.0f, 2429.14f, 705.935f}, +{5594.04f, 2424.87f, 705.935f}, +{5597.89f, 2421.54f, 705.935f}, +{5598.57f, 2434.62f, 705.935f}, +{5585.46f, 2417.99f, 705.935f}, +{5605.81f, 2428.42f, 705.935f}, +{5591.61f, 2412.66f, 705.935f}, +{5593.9f, 2410.64f, 705.935f}, +{5586.76f, 2416.73f, 705.935f}, +{5592.23f, 2419.14f, 705.935f}, +{5594.61f, 2416.87f, 705.935f}, +{5589.77f, 2421.03f, 705.935f}, +{5602.58f, 2435.95f, 705.935f}, +{5606.13f, 2433.16f, 705.935f}, +{5606.12f, 2436.6f, 705.935f}, //21 }; + + struct MANGOS_DLL_DECL boss_devourer_of_soulsAI : public ScriptedAI { - boss_devourer_of_soulsAI(Creature* pCreature) : ScriptedAI(pCreature) + boss_devourer_of_soulsAI(Creature *pCreature) : ScriptedAI(pCreature) { - pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Regular = pCreature->GetMap()->IsRegularDifficulty(); + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Reset(); } - bool Regular; - ScriptedInstance *pInstance; + ScriptedInstance* m_pInstance; + + uint32 BattleMusicTimer; + uint32 PhantomBlastTimer; + uint32 SummonTimer; + uint32 WellOfSoulTimer; + uint32 MirroredTimer; + uint32 SoulBeamTimer; + uint32 Step; + uint32 StepTimer; + bool Summon; void Reset() { - if(pInstance) pInstance->SetData(TYPE_DEVOURER, NOT_STARTED); + if(!m_pInstance) return; + m_pInstance->SetData(TYPE_DEVOURER, NOT_STARTED); + DespawnAllSummons(); + Summon = false; + Step = 0; + StepTimer = 100; + PhantomBlastTimer = 5000; + WellOfSoulTimer = 10000; + SummonTimer = 20000; + MirroredTimer = 28000; + SoulBeamTimer = 33000; + } + + void Aggro(Unit *who) + { + if(!m_pInstance) return; + m_pInstance->SetData(TYPE_DEVOURER, IN_PROGRESS); + m_creature->PlayDirectSound(Battle01); + BattleMusicTimer = 48000; + DoScriptText(SAY_DEVOURER_AGGRO_MALE_01, m_creature); + } + + void DespawnAllSummons() + { + std::list m_pSouls; + GetCreatureListWithEntryInGrid(m_pSouls, m_creature, NPC_UNLEASHED_SOUL, DEFAULT_VISIBILITY_INSTANCE); + + if (!m_pSouls.empty()) + for(std::list::iterator itr = m_pSouls.begin(); itr != m_pSouls.end(); ++itr) + { + (*itr)->ForcedDespawn(); + } + + std::list m_pWells; + GetCreatureListWithEntryInGrid(m_pWells, m_creature, NPC_WELL_OF_SOUL, DEFAULT_VISIBILITY_INSTANCE); + + if (!m_pWells.empty()) + for(std::list::iterator iter = m_pWells.begin(); iter != m_pWells.end(); ++iter) + { + (*iter)->ForcedDespawn(); + } + } + + void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + { + + Map *map = m_creature->GetMap(); + Map::PlayerList const &PlayerList = map->GetPlayers(); + + if (PlayerList.isEmpty()) + return; + + for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) + if (i->getSource()->isAlive() && i->getSource()->HasAura(SPELL_MIRRORED_SOUL)) + m_creature->DealDamage(i->getSource(), uiDamage*45,NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + + void SpawnOutro(uint32 guid) + { + if (Creature *pSummon = m_creature->SummonCreature(guid, SpawnLoc[0].x, SpawnLoc[0].y, SpawnLoc[0].z,0, TEMPSUMMON_TIMED_DESPAWN, 300000)) + { + uint8 i = urand(1,MAX_POINTS); + + pSummon->GetMotionMaster()->MovePoint(i, SpawnLoc[i].x, SpawnLoc[i].y, SpawnLoc[i].z); + + if (pSummon->GetEntry() == npc_jaina_extro) + DoScriptText(SAY_JAINA_FS09_EXTRO, pSummon); + else if (pSummon->GetEntry() == npc_sylvana_extro) + DoScriptText(SAY_SYLVANA_FS07_EXTRO, pSummon); + } } - void Aggro(Unit *who) + void JustDied(Unit* pKiller) { - if(pInstance) pInstance->SetData(TYPE_DEVOURER, IN_PROGRESS); + if(!m_pInstance) return; + m_pInstance->SetData(TYPE_DEVOURER, DONE); + DoScriptText(SAY_DEVOURER_DEATH_MALE_01, m_creature); + DespawnAllSummons(); + + Player* player = (Player*)pKiller; + + if(player->GetTeam() == ALLIANCE) + { + m_pInstance->SetData64(DATA_LIDER,0); + SpawnOutro(npc_jaina_extro); + SpawnOutro(npc_jaina_credit); + SpawnOutro(npc_mage); + SpawnOutro(npc_mage_woman); + SpawnOutro(npc_cc_a_01); + SpawnOutro(npc_cc_a_02); + SpawnOutro(npc_cc_a_03); + + } else + { + m_pInstance->SetData64(DATA_LIDER,1); + SpawnOutro(npc_sylvana_extro); + SpawnOutro(npc_sylvana_credit); + SpawnOutro(npc_mage); + SpawnOutro(npc_mage_woman); + SpawnOutro(npc_cc_h_01); + SpawnOutro(npc_cc_h_02); + SpawnOutro(npc_cc_h_03); + }; } - void JustDied(Unit *killer) + void KilledUnit(Unit* victim) { - if(pInstance) pInstance->SetData(TYPE_DEVOURER, DONE); + switch (rand()%2) + { + case 0: DoScriptText(SAY_DEVOURER_SLAY_01_MALE_01, m_creature); break; + case 1: DoScriptText(SAY_DEVOURER_SLAY_02_MALE_01, m_creature); break; + } } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 diff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - DoMeleeAttackIfReady(); + if(Summon != true) + { + if (PhantomBlastTimer < diff) + { + if (Unit* Target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCast(Target, SPELL_PHANTOM_BLAST); + PhantomBlastTimer = 8000; + } + else + PhantomBlastTimer -= diff; + + if (WellOfSoulTimer < diff) + { + if (Unit* Target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCast(Target, SPELL_WELL_OF_SOULS); + WellOfSoulTimer = 12000; + } + else + WellOfSoulTimer -= diff; + + if (SummonTimer < diff) + { + m_creature->InterruptNonMeleeSpells(false); + DoScriptText(SAY_DEVOURER_SUMMON_MALE_01, m_creature); + DoCast(m_creature, SPELL_UNLEASHED_SOULS); + SummonTimer = 50000; + Summon = true; + } + else + SummonTimer -= diff; + + if (MirroredTimer < diff) + { + if (Unit* Target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCast(Target, SPELL_MIRRORED_SOUL); + MirroredTimer = 25000; + } + else + MirroredTimer -= diff; + + if (SoulBeamTimer < diff) + { + DoScriptText(SAY_DEVOURER_DARK_MALE_01, m_creature); + DoCast(m_creature->getVictim(), SPELL_WAILING_SOULS); + SoulBeamTimer = (urand(35000, 45000)); + } + else + SoulBeamTimer -= diff; + + } + + if(Summon == true) + { + if (StepTimer < diff) + { + switch(Step) + { + case 0: + StepTimer = 900; + ++Step; + break; + case 1: + m_creature->SetDisplayId(MODEL_FAT); //this is huck, because this spell (SPELL_UNLEASHED_SOULS) morphed boss into PIG :D + StepTimer = 2000; + ++Step; + break; + case 2: + Summon = false; + Step = 0; + StepTimer = 100; + break; + } + } else StepTimer -= diff; + + } + + DoMeleeAttackIfReady(); + + if (BattleMusicTimer < diff && m_creature->isAlive()) + { + m_creature->PlayDirectSound(Battle01); + BattleMusicTimer = 49000; + } + else + BattleMusicTimer -= diff; + + return; + } +}; + +struct MANGOS_DLL_DECL npc_well_of_soulAI : public ScriptedAI +{ + npc_well_of_soulAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + +ScriptedInstance* m_pInstance; + +uint32 DamageTimer; +uint32 DeathTimer; + + void Reset() + { + m_creature->SetLevel(80); + m_creature->setFaction(14); + m_creature->SetDisplayId(11686); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + DeathTimer = 60000; + DoCast(m_creature, SPELL_WELL_OF_SOULS_VIS); + DamageTimer = 1000; + } + + void AttackStart(Unit* who) + { + return; + } + + void UpdateAI(const uint32 diff) + { + if(!m_pInstance) return; + + if(m_pInstance && m_pInstance->GetData(TYPE_DEVOURER) != IN_PROGRESS) + m_creature->ForcedDespawn(); + + if (DeathTimer < diff) + { + m_creature->ForcedDespawn(); + } else DeathTimer -= diff; + + if (DamageTimer < diff) + { + DoCast(m_creature, SPELL_WELL_OF_SOUL_DM); + DamageTimer = 1000; + } else DamageTimer -= diff; + + return; + } +}; + +struct MANGOS_DLL_DECL npc_unleashed_soulAI : public ScriptedAI +{ + npc_unleashed_soulAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + void Reset() + { + if (m_pInstance) + { + if (Creature* pDevourer = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(NPC_DEVOURER)))) + if (pDevourer && pDevourer->isAlive()) + AttackStart(pDevourer->getVictim()); + } + + } + + void UpdateAI(const uint32 diff) + { + if(!m_pInstance) return; + + if(m_pInstance && m_pInstance->GetData(TYPE_DEVOURER) != IN_PROGRESS) + m_creature->ForcedDespawn(); + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } }; @@ -54,11 +413,32 @@ CreatureAI* GetAI_boss_devourer_of_souls(Creature* pCreature) return new boss_devourer_of_soulsAI(pCreature); } +CreatureAI* GetAI_npc_well_of_soul(Creature* pCreature) +{ + return new npc_well_of_soulAI(pCreature); +} + +CreatureAI* GetAI_npc_unleashed_soul(Creature* pCreature) +{ + return new npc_unleashed_soulAI(pCreature); +} + void AddSC_boss_devourer_of_souls() { Script *newscript; + newscript = new Script; newscript->Name = "boss_devourer_of_souls"; newscript->GetAI = &GetAI_boss_devourer_of_souls; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_well_of_soul"; + newscript->GetAI = &GetAI_npc_well_of_soul; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_unleashed_soul"; + newscript->GetAI = &GetAI_npc_unleashed_soul; + newscript->RegisterSelf(); } diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/def_forge.h b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/def_forge.h index cb30444ec..98a51a62d 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/def_forge.h +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/def_forge.h @@ -1,17 +1,34 @@ - #ifndef DEF_ICECROWN_FORGE_H #define DEF_ICECROWN_FORGE_H #include "sc_boss_spell_worker.h" enum { - MAX_ENCOUNTERS = 2, + MAX_ENCOUNTERS = 3, + + TYPE_INTRO = 0, + TYPE_BRONJAHM = 1, + TYPE_DEVOURER = 2, + + NPC_BRONJAHM = 36497, + NPC_DEVOURER = 36502, - TYPE_BRONJAHM = 0, - TYPE_DEVOURER = 1, + DATA_LIDER = 101, - NPC_BRONJAHM = 36497, - NPC_DEVOURER = 33113 + npc_jaina = 37597, + npc_sylvana = 37596, + npc_jaina_extro = 38160, + npc_sylvana_extro = 38161, + npc_jaina_credit = 36955, + npc_sylvana_credit = 37554, + npc_mage = 37582, + npc_mage_woman = 37774, + npc_cc_a_01 = 37497, + npc_cc_a_02 = 37496, + npc_cc_a_03 = 37498, + npc_cc_h_01 = 37588, + npc_cc_h_02 = 37584, + npc_cc_h_03 = 37587, }; diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.cpp new file mode 100644 index 000000000..0d63a28f6 --- /dev/null +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.cpp @@ -0,0 +1,537 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Forge Of The Souls +SD%Complete: 90% +SDComment: event script! Need Add 6 Coliseum Champion after devourer death. +SDCategory: forge_of_the_souls +SDAuthor: MaxXx2021 aka Mioka +EndScriptData */ + +#include "precompiled.h" +#include "def_forge.h" + +enum +{ + SAY_JAINA_FS01 = -1632040, + SAY_JAINA_FS02 = -1632041, + SAY_JAINA_FS03 = -1632042, + SAY_JAINA_FS04 = -1632043, + SAY_JAINA_FS05 = -1632044, + SAY_JAINA_FS06 = -1632045, + SAY_JAINA_FS07 = -1632046, + SAY_JAINA_FS08 = -1632047, + SAY_JAINA_FS09_EXTRO = -1632029, + + SAY_SYLVANA_FS01 = -1632050, + SAY_SYLVANA_FS02 = -1632051, + SAY_SYLVANA_FS03 = -1632052, + SAY_SYLVANA_FS04 = -1632053, + SAY_SYLVANA_FS05 = -1632054, + SAY_SYLVANA_FS06 = -1632055, + SAY_SYLVANA_FS07_EXTRO = -1632030, + + GOSSIP_SPEECHINTRO = 13525, +}; + +struct MANGOS_DLL_DECL npc_jaina_and_sylvana_FSintroAI : public ScriptedAI +{ + npc_jaina_and_sylvana_FSintroAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_creature->SetActiveObjectState(true); + Reset(); + } + +ScriptedInstance* m_pInstance; + +uint32 StepTimer; +uint32 Step; +bool StartEvent; + + void Reset() + { + if(m_pInstance) + if(m_pInstance->GetData(TYPE_DEVOURER) == DONE) + m_creature->SetVisibility(VISIBILITY_OFF); + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + Step = 0; + StepTimer = 100; + if(m_pInstance->GetData(TYPE_INTRO) == DONE) + { + m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + Step = 8; + } + } + + void UpdateAI(const uint32 diff) + { + DoMeleeAttackIfReady(); + + if(!m_pInstance) return; + + if(StartEvent != true) return; + + if(StepTimer < diff) + { + switch(Step) + { + case 0: + m_pInstance->SetData(TYPE_INTRO, DONE); + m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + if(m_creature->GetEntry() == npc_jaina) + { + DoScriptText(SAY_JAINA_FS01, m_creature); + StepTimer = 7000; + } + if(m_creature->GetEntry() == npc_sylvana) + StepTimer = 100; + ++Step; + break; + case 1: + if(m_creature->GetEntry() == npc_jaina) + { + DoScriptText(SAY_JAINA_FS02, m_creature); + StepTimer = 9000; + } + if(m_creature->GetEntry() == npc_sylvana) + { + DoScriptText(SAY_SYLVANA_FS01, m_creature); + StepTimer = 12000; + } + ++Step; + break; + case 2: + if(m_creature->GetEntry() == npc_jaina) + { + DoScriptText(SAY_JAINA_FS03, m_creature); + StepTimer = 8000; + } + if(m_creature->GetEntry() == npc_sylvana) + { + DoScriptText(SAY_SYLVANA_FS02, m_creature); + StepTimer = 11000; + } + ++Step; + break; + case 3: + if(m_creature->GetEntry() == npc_jaina) + { + DoScriptText(SAY_JAINA_FS04, m_creature); + StepTimer = 10000; + } + if(m_creature->GetEntry() == npc_sylvana) + { + DoScriptText(SAY_SYLVANA_FS03, m_creature); + StepTimer = 11000; + } + ++Step; + break; + case 4: + if(m_creature->GetEntry() == npc_jaina) + { + DoScriptText(SAY_JAINA_FS05, m_creature); + StepTimer = 8000; + } + if(m_creature->GetEntry() == npc_sylvana) + { + DoScriptText(SAY_SYLVANA_FS04, m_creature); + StepTimer = 12000; + } + ++Step; + break; + case 5: + if(m_creature->GetEntry() == npc_jaina) + { + DoScriptText(SAY_JAINA_FS06, m_creature); + StepTimer = 12000; + } + if(m_creature->GetEntry() == npc_sylvana) + { + DoScriptText(SAY_SYLVANA_FS05, m_creature); + StepTimer = 7000; + } + ++Step; + break; + case 6: + if(m_creature->GetEntry() == npc_jaina) + { + DoScriptText(SAY_JAINA_FS07, m_creature); + StepTimer = 7000; + } + if(m_creature->GetEntry() == npc_sylvana) + { + DoScriptText(SAY_SYLVANA_FS06, m_creature); + StepTimer = 4000; + } + ++Step; + break; + case 7: + if(m_creature->GetEntry() == npc_jaina) + { + DoScriptText(SAY_JAINA_FS08, m_creature); + StepTimer = 5000; + } + ++Step; + break; + } + } else StepTimer -= diff; + } +}; + +bool GossipHello_npc_jaina_and_sylvana_FSintro(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu( pCreature->GetGUID()); + switch(pCreature->GetEntry()) + { + case 37597: + if(((npc_jaina_and_sylvana_FSintroAI*)pCreature->AI())->StartEvent != true) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What would you have of me, My Lady?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + break; + case 37596: + if(((npc_jaina_and_sylvana_FSintroAI*)pCreature->AI())->StartEvent != true) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "What would you have of me, Banshee Queen?", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + break; + } + + pPlayer->PlayerTalkClass->SendGossipMenu(907,pCreature->GetGUID()); //907 + return true; +} + +bool GossipSelect_npc_jaina_and_sylvana_FSintro(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + pPlayer->CLOSE_GOSSIP_MENU(); + ((npc_jaina_and_sylvana_FSintroAI*)pCreature->AI())->StartEvent = true; + + return true; +} + +struct MANGOS_DLL_DECL npc_jaina_and_sylvana_FSextroAI : public ScriptedAI +{ + npc_jaina_and_sylvana_FSextroAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_creature->SetActiveObjectState(true); + Reset(); + } + +ScriptedInstance* m_pInstance; + +uint32 StepTimer; +uint32 Step; +uint64 m_uiLiderGUID; +uint32 uiSummon_counter; + + void Reset() + { + if (m_pInstance) + if (m_pInstance->GetData(TYPE_DEVOURER) != DONE) + { + m_pInstance->SetData(TYPE_DEVOURER, NOT_STARTED); + Step = 0; + m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + } else Step = 10; + StepTimer = 100; + m_creature->SetVisibility(VISIBILITY_OFF); + } + + void UpdateAI(const uint32 diff) + { + DoMeleeAttackIfReady(); + + if (!m_pInstance) return; + + if (m_pInstance->GetData(TYPE_DEVOURER) == DONE) + { + + if(m_pInstance->GetData64(DATA_LIDER) == 1 && m_creature->GetEntry() == npc_sylvana_extro) return; + + if(m_pInstance->GetData64(DATA_LIDER) == 2 && m_creature->GetEntry() == npc_jaina_extro) return; + + if(StepTimer < diff) + { + switch(Step) + { + case 0: + m_creature->SetVisibility(VISIBILITY_ON); + m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + m_creature->GetMotionMaster()->MovePoint(0, 5653.337f, 2496.407f, 708.829f); + uiSummon_counter = 0; + StepTimer = 400; + ++Step; + break; + case 1: + if(m_creature->GetEntry() == npc_jaina_extro) + { + StepTimer = 100; + if (uiSummon_counter < 4) + { + if (Creature* pTemp = m_creature->SummonCreature(npc_cc_a_01,5623.609f,2457.946f,705.891f,1.37f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 300000)) + { + pTemp->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->GetGUID()); + switch(uiSummon_counter) + { + case 0: + pTemp->GetMotionMaster()->MovePoint(0, 5659.251f, 2472.017f, 708.696f); + break; + case 1: + pTemp->GetMotionMaster()->MovePoint(0, 5627.611f, 2501.972f, 708.696f); + break; + case 2: + pTemp->GetMotionMaster()->MovePoint(0, 5680.920f, 2482.998f, 708.696f); + break; + case 3: + pTemp->GetMotionMaster()->MovePoint(0, 5641.398f, 2523.911f, 708.696f); + break; + } + uiSummon_counter++; + } + } + else + { + uiSummon_counter = 0; + Step++; + } + } + if(m_creature->GetEntry() == npc_sylvana_extro) + { + StepTimer = 100; + if (uiSummon_counter < 4) + { + if (Creature* pTemp = m_creature->SummonCreature(npc_cc_h_01,5623.609f,2457.946f,705.891f,1.37f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 300000)) + { + pTemp->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->GetGUID()); + switch(uiSummon_counter) + { + case 0: + pTemp->GetMotionMaster()->MovePoint(0, 5659.251f, 2472.017f, 708.696f); + break; + case 1: + pTemp->GetMotionMaster()->MovePoint(0, 5627.611f, 2501.972f, 708.696f); + break; + case 2: + pTemp->GetMotionMaster()->MovePoint(0, 5680.920f, 2482.998f, 708.696f); + break; + case 3: + pTemp->GetMotionMaster()->MovePoint(0, 5641.398f, 2523.911f, 708.696f); + break; + } + uiSummon_counter++; + } + } + else + { + uiSummon_counter = 0; + Step++; + } + } + break; + case 2: + if(m_creature->GetEntry() == npc_jaina_extro) + { + StepTimer = 100; + if (uiSummon_counter < 4) + { + if (Creature* pTemp = m_creature->SummonCreature(npc_cc_a_02,5623.609f,2457.946f,705.891f,1.37f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 300000)) + { + pTemp->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->GetGUID()); + switch(uiSummon_counter) + { + case 0: + pTemp->GetMotionMaster()->MovePoint(0, 5661.508f, 2473.066f, 708.696f); + break; + case 1: + pTemp->GetMotionMaster()->MovePoint(0, 5627.146f, 2499.098f, 708.696f); + break; + case 2: + pTemp->GetMotionMaster()->MovePoint(0, 5682.331f, 2485.985f, 708.696f); + break; + case 3: + pTemp->GetMotionMaster()->MovePoint(0, 5639.636f, 2521.228f, 708.696f); + break; + } + uiSummon_counter++; + } + } + else + { + uiSummon_counter = 0; + Step++; + } + } + if(m_creature->GetEntry() == npc_sylvana_extro) + { + StepTimer = 100; + if (uiSummon_counter < 4) + { + if (Creature* pTemp = m_creature->SummonCreature(npc_cc_h_02,5623.609f,2457.946f,705.891f,1.37f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 300000)) + { + pTemp->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->GetGUID()); + switch(uiSummon_counter) + { + case 0: + pTemp->GetMotionMaster()->MovePoint(0, 5661.508f, 2473.066f, 708.696f); + break; + case 1: + pTemp->GetMotionMaster()->MovePoint(0, 5627.146f, 2499.098f, 708.696f); + break; + case 2: + pTemp->GetMotionMaster()->MovePoint(0, 5682.331f, 2485.985f, 708.696f); + break; + case 3: + pTemp->GetMotionMaster()->MovePoint(0, 5639.636f, 2521.228f, 708.696f); + break; + } + uiSummon_counter++; + } + } + else + { + uiSummon_counter = 0; + Step++; + } + } + break; + case 3: + if(m_creature->GetEntry() == npc_jaina_extro) + { + StepTimer = 100; + if (uiSummon_counter < 4) + { + if (Creature* pTemp = m_creature->SummonCreature(npc_cc_a_03,5623.609f,2457.946f,705.891f,1.37f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 300000)) + { + pTemp->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->GetGUID()); + switch(uiSummon_counter) + { + case 0: + pTemp->GetMotionMaster()->MovePoint(0, 5664.265f, 2473.974f, 708.696f); + break; + case 1: + pTemp->GetMotionMaster()->MovePoint(0, 5626.768f, 2496.534f, 708.696f); + break; + case 2: + pTemp->GetMotionMaster()->MovePoint(0, 5683.696f, 2489.598f, 708.696f); + break; + case 3: + pTemp->GetMotionMaster()->MovePoint(0, 5637.580f, 2518.249f, 708.696f); + break; + } + uiSummon_counter++; + } + } + else + { + uiSummon_counter = 0; + StepTimer = 8000; + Step++; + } + } + if(m_creature->GetEntry() == npc_sylvana_extro) + { + StepTimer = 100; + if (uiSummon_counter < 4) + { + if (Creature* pTemp = m_creature->SummonCreature(npc_cc_h_03,5623.609f,2457.946f,705.891f,1.37f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 300000)) + { + pTemp->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + pTemp->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->GetGUID()); + switch(uiSummon_counter) + { + case 0: + pTemp->GetMotionMaster()->MovePoint(0, 5664.265f, 2473.974f, 708.696f); + break; + case 1: + pTemp->GetMotionMaster()->MovePoint(0, 5626.768f, 2496.534f, 708.696f); + break; + case 2: + pTemp->GetMotionMaster()->MovePoint(0, 5683.696f, 2489.598f, 708.696f); + break; + case 3: + pTemp->GetMotionMaster()->MovePoint(0, 5637.580f, 2518.249f, 708.696f); + break; + } + uiSummon_counter++; + } + } + else + { + uiSummon_counter = 0; + StepTimer = 8000; + Step++; + } + } + break; + case 4: + if(m_creature->GetEntry() == npc_jaina_extro) + { + DoScriptText(SAY_JAINA_FS09_EXTRO, m_creature); + StepTimer = 6000; + } + if(m_creature->GetEntry() == npc_sylvana_extro) + { + DoScriptText(SAY_SYLVANA_FS07_EXTRO, m_creature); + StepTimer = 3000; + } + ++Step; + break; + case 5: + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + ++Step; + break; + } + } else StepTimer -= diff; + } + return; + } +}; + +CreatureAI* GetAI_npc_jaina_and_sylvana_FSintro(Creature* pCreature) +{ + return new npc_jaina_and_sylvana_FSintroAI(pCreature); +} + +CreatureAI* GetAI_npc_jaina_and_sylvana_FSextro(Creature* pCreature) +{ + return new npc_jaina_and_sylvana_FSextroAI(pCreature); +} + +void AddSC_forge_of_souls() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_jaina_and_sylvana_FSintro"; + newscript->GetAI = &GetAI_npc_jaina_and_sylvana_FSintro; + newscript->pGossipHello = &GossipHello_npc_jaina_and_sylvana_FSintro; + newscript->pGossipSelect = &GossipSelect_npc_jaina_and_sylvana_FSintro; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_jaina_and_sylvana_FSextro"; + newscript->GetAI = &GetAI_npc_jaina_and_sylvana_FSextro; + newscript->RegisterSelf(); +} \ No newline at end of file diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp index 66a39781b..b99a25094 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp @@ -33,6 +33,7 @@ struct MANGOS_DLL_DECL instance_forge_of_souls : public ScriptedInstance uint32 m_auiEncounter[MAX_ENCOUNTERS+1]; uint64 m_uiBronjahmGUID; uint64 m_uiDevourerGUID; + uint64 m_uiLiderGUID; void OpenDoor(uint64 guid) { @@ -79,8 +80,9 @@ struct MANGOS_DLL_DECL instance_forge_of_souls : public ScriptedInstance { switch(uiType) { - case TYPE_BRONJAHM: m_auiEncounter[0] = uiData; break; - case TYPE_DEVOURER: m_auiEncounter[1] = uiData; break; + case TYPE_INTRO: m_auiEncounter[0] = uiData; break; + case TYPE_BRONJAHM: m_auiEncounter[1] = uiData; break; + case TYPE_DEVOURER: m_auiEncounter[2] = uiData; break; } if (uiData == DONE) @@ -108,8 +110,9 @@ struct MANGOS_DLL_DECL instance_forge_of_souls : public ScriptedInstance { switch(uiType) { - case TYPE_BRONJAHM: return m_auiEncounter[0]; - case TYPE_DEVOURER: return m_auiEncounter[1]; + case TYPE_INTRO: return m_auiEncounter[0]; + case TYPE_BRONJAHM: return m_auiEncounter[1]; + case TYPE_DEVOURER: return m_auiEncounter[2]; } return 0; } @@ -120,10 +123,19 @@ struct MANGOS_DLL_DECL instance_forge_of_souls : public ScriptedInstance { case NPC_BRONJAHM: return m_uiBronjahmGUID; case NPC_DEVOURER: return m_uiDevourerGUID; + case DATA_LIDER: return m_uiLiderGUID; } return 0; } + void SetData64(uint32 uiData, uint64 uiGuid) + { + switch(uiData) + { + case DATA_LIDER: m_uiLiderGUID = uiGuid; + } + } + void Load(const char* chrIn) { if (!chrIn) diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/trash_forge_of_souls.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/trash_forge_of_souls.cpp new file mode 100644 index 000000000..b51235648 --- /dev/null +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/trash_forge_of_souls.cpp @@ -0,0 +1,594 @@ +/* Copyright (C) 2006 - 2010 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Trash Mobs +SD%Complete: 100% +SDComment: +SDCategory: The Forge of Souls +EndScriptData */ + +#include "precompiled.h" +#include "def_forge.h" + +enum +{ + //Spiteful Apparition + SPELL_SPITE_N = 68895, + SPELL_SPITE_H = 70212, + + //Spectral Warden + SPELL_VEIL_OF_SHADOWS = 69633, + SPELL_WAIL_OF_SOULS_N = 69148, + SPELL_WAIL_OF_SOULS_H = 70210, + + //Soulguard Watchman + SPELL_SHROUD_OF_RUNES = 69056, + SPELL_UNHOLY_RAGE = 69053, + + //Soulguard Reaper + SPELL_FROST_NOVA_N = 69060, + SPELL_FROST_NOVA_H = 70209, + SPELL_SHADOW_LANCE = 69058, + + //Soulguard Bonecaster + SPELL_BONE_VOLLEY_N = 69080, + SPELL_BONE_VOLLEY_H = 70206, + SPELL_RAISE_DEAD = 69562, + SPELL_SHIELD_OF_BONES_N = 69069, + SPELL_SHIELD_OF_BONES_H = 70207, + + //Soulguard Animator + // Raise dead 69562 + SPELL_SHADOW_BOLT_N = 69068, + SPELL_SHADOW_BOLT_H = 70208, + SPELL_SOUL_SICKNESS = 69131, + SPELL_SOUL_SIPHON = 69128, + + //Soulguard Adept + //Raise dead 69562 + //Shadow Bolt 69068/70208 + SPELL_DRAIN_LIFE_N = 69066, + SPELL_DRAIN_LIFE_H = 70213, + SPELL_SHADOW_MEND_N = 69564, + SPELL_SHADOW_MEND_H = 70205, + + //Soul Horror + SPELL_SOUL_STRIKE_N = 69088, + SPELL_SOUL_STRIKE_H = 70211, + + NPC_SOULGUARD_ADEPT = 36620 +}; + +struct MANGOS_DLL_DECL npc_soulguard_watchmanAI : public ScriptedAI +{ + npc_soulguard_watchmanAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + +ScriptedInstance* m_pInstance; +bool m_bIsRegularMode; + +uint32 ShieldTimer; + + void Reset() + { + ShieldTimer = (urand(2000, 15000)); + } + + void Aggro(Unit *who) + { + DoCast(m_creature, SPELL_UNHOLY_RAGE); + } + + void UpdateAI(const uint32 diff) + { + if(!m_pInstance) return; + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (ShieldTimer < diff) + { + DoCast(m_creature, SPELL_SHROUD_OF_RUNES); + ShieldTimer = (urand(15000, 25000)); + } + else + ShieldTimer -= diff; + + DoMeleeAttackIfReady(); + + return; + } +}; + +struct MANGOS_DLL_DECL npc_soulguard_reaperAI : public ScriptedAI +{ + npc_soulguard_reaperAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + +ScriptedInstance* m_pInstance; +bool m_bIsRegularMode; + +uint32 ShadowBoltTimer; +uint32 IceNovaTimer; +uint32 AdeptHealTimer; + + void Reset() + { + AdeptHealTimer = (urand(2000, 4000)); + ShadowBoltTimer = (urand(2000, 20000)); + IceNovaTimer = (urand(15000, 20000)); + } + + void UpdateAI(const uint32 diff) + { + if(!m_pInstance) return; + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (ShadowBoltTimer < diff) + { + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCast(target, SPELL_SHADOW_LANCE); + ShadowBoltTimer = (urand(2000, 15000)); + } + else + ShadowBoltTimer -= diff; + + if (IceNovaTimer < diff) + { + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCast(target, m_bIsRegularMode ? SPELL_FROST_NOVA_N : SPELL_FROST_NOVA_H); + IceNovaTimer = (urand(15000, 20000)); + } + else + IceNovaTimer -= diff; + + if(m_creature->GetHealth()*100 < m_creature->GetMaxHealth()*45) + { + if (AdeptHealTimer < diff) + { + if (Creature* pAdept = GetClosestCreatureWithEntry(m_creature, NPC_SOULGUARD_ADEPT, 25.0f)) + { + if(pAdept->GetHealth()*100 > pAdept->GetMaxHealth()*45) + { + pAdept->InterruptNonMeleeSpells(false); + pAdept->CastSpell(m_creature, m_bIsRegularMode ? SPELL_SHADOW_MEND_N : SPELL_SHADOW_MEND_H, false); + } + } + + AdeptHealTimer = (urand(9000, 20000)); + } + else + AdeptHealTimer -= diff; + } + + + DoMeleeAttackIfReady(); + + return; + } +}; + +struct MANGOS_DLL_DECL npc_soulguard_adeptAI : public ScriptedAI +{ + npc_soulguard_adeptAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + +ScriptedInstance* m_pInstance; +bool m_bIsRegularMode; + +bool Summon; +uint32 ShadowBoltTimer; +uint32 ShadowMendTimer; +uint32 DrainLifeTimer; +uint32 SummonTimer; +uint32 Say; + + void Reset() + { + Summon = false; + ShadowBoltTimer = (urand(2000, 20000)); + ShadowMendTimer = (urand(1000, 5000)); + DrainLifeTimer = (urand(1000, 2000)); + SummonTimer = (urand(1000, 10000)); + } + + void UpdateAI(const uint32 diff) + { + if(!m_pInstance) return; + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (ShadowBoltTimer < diff) + { + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCast(target, m_bIsRegularMode ? SPELL_SHADOW_BOLT_N : SPELL_SHADOW_BOLT_H); + ShadowBoltTimer = (urand(2000, 15000)); + } + else + ShadowBoltTimer -= diff; + + if(m_creature->GetHealth()*100 < m_creature->GetMaxHealth()*45) + { + if (ShadowMendTimer < diff) + { + m_creature->InterruptNonMeleeSpells(false); + DoCast(m_creature, m_bIsRegularMode ? SPELL_SHADOW_MEND_N : SPELL_SHADOW_MEND_H); + ShadowMendTimer = (urand(6000, 10000)); + } + else + ShadowMendTimer -= diff; + } + + if(m_creature->GetHealth()*100 < m_creature->GetMaxHealth()*75) + { + if (DrainLifeTimer < diff) + { + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCast(target, m_bIsRegularMode ? SPELL_DRAIN_LIFE_N : SPELL_DRAIN_LIFE_H); + DrainLifeTimer = (urand(5000, 15000)); + } + else + DrainLifeTimer -= diff; + } + + if(Summon != true) + { + if (SummonTimer < diff) + { + Summon = true; + Say = (urand(0, 3)); + switch(Say) + { + case 0: + m_creature->MonsterSay("Wake up deads!",LANG_UNIVERSAL,NULL); + break; + case 1: + m_creature->MonsterSay("Dead hear my call!",LANG_UNIVERSAL,NULL); + break; + case 2: + m_creature->MonsterSay("I command power of Dead!",LANG_UNIVERSAL,NULL); + break; + case 3: + m_creature->MonsterSay("A raise my servant!",LANG_UNIVERSAL,NULL); + break; + } + DoCast(m_creature, SPELL_RAISE_DEAD); + } + else + SummonTimer -= diff; + } + + DoMeleeAttackIfReady(); + + return; + } +}; + +struct MANGOS_DLL_DECL npc_soulguard_bonecasterAI : public ScriptedAI +{ + npc_soulguard_bonecasterAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + +ScriptedInstance* m_pInstance; +bool m_bIsRegularMode; + +uint32 BoneTimer; +uint32 ShieldTimer; + + void Reset() + { + BoneTimer = (urand(2000, 20000)); + ShieldTimer = (urand(15000, 20000)); + } + + void UpdateAI(const uint32 diff) + { + if(!m_pInstance) return; + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (BoneTimer < diff) + { + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCast(target, m_bIsRegularMode ? SPELL_BONE_VOLLEY_N : SPELL_BONE_VOLLEY_H); + BoneTimer = (urand(2000, 15000)); + } + else + BoneTimer -= diff; + + if (ShieldTimer < diff) + { + DoCast(m_creature, m_bIsRegularMode ? SPELL_SHIELD_OF_BONES_N : SPELL_SHIELD_OF_BONES_H); + ShieldTimer = (urand(15000, 20000)); + } + else + ShieldTimer -= diff; + + DoMeleeAttackIfReady(); + + return; + } +}; + +struct MANGOS_DLL_DECL npc_soulguard_animatorAI : public ScriptedAI +{ + npc_soulguard_animatorAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + +ScriptedInstance* m_pInstance; +bool m_bIsRegularMode; + +uint32 ShadowBoltTimer; +uint32 SoulSickTimer; +uint32 SoulSiphTimer; +uint32 AdeptHealTimer; + + void Reset() + { + AdeptHealTimer = (urand(1000, 6000)); + ShadowBoltTimer = (urand(2000, 20000)); + SoulSickTimer = (urand(15000, 20000)); + SoulSiphTimer = (urand(7500, 30000)); + } + + void UpdateAI(const uint32 diff) + { + if(!m_pInstance) return; + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (ShadowBoltTimer < diff) + { + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCast(target, m_bIsRegularMode ? SPELL_SHADOW_BOLT_N : SPELL_SHADOW_BOLT_H); + ShadowBoltTimer = (urand(2000, 15000)); + } + else + ShadowBoltTimer -= diff; + + if (SoulSickTimer < diff) + { + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCast(target, SPELL_SOUL_SICKNESS); + SoulSickTimer = (urand(15000, 20000)); + } + else + SoulSickTimer -= diff; + + if (SoulSiphTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_SOUL_SIPHON); + SoulSiphTimer = (urand(7500, 30000)); + } + else + SoulSiphTimer -= diff; + + if(m_creature->GetHealth()*100 < m_creature->GetMaxHealth()*45) + { + if (AdeptHealTimer < diff) + { + if (Creature* pAdept = GetClosestCreatureWithEntry(m_creature, NPC_SOULGUARD_ADEPT, 25.0f)) + { + if(pAdept->GetHealth()*100 > pAdept->GetMaxHealth()*45) + { + pAdept->InterruptNonMeleeSpells(false); + pAdept->CastSpell(m_creature, m_bIsRegularMode ? SPELL_SHADOW_MEND_N : SPELL_SHADOW_MEND_H, false); + } + } + + AdeptHealTimer = (urand(9000, 20000)); + } + else + AdeptHealTimer -= diff; + } + + DoMeleeAttackIfReady(); + + return; + } +}; + +struct MANGOS_DLL_DECL npc_soul_horrorAI : public ScriptedAI +{ + npc_soul_horrorAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + +ScriptedInstance* m_pInstance; +bool m_bIsRegularMode; + +uint32 SoulStrikeTimer; + + void Reset() + { + SoulStrikeTimer = (urand(2000, 5000)); + } + + void UpdateAI(const uint32 diff) + { + if(!m_pInstance) return; + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (SoulStrikeTimer < diff) + { + if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCast(target, m_bIsRegularMode ? SPELL_SOUL_STRIKE_N : SPELL_SOUL_STRIKE_H); + SoulStrikeTimer = (urand(2000, 10000)); + } + else + SoulStrikeTimer -= diff; + + DoMeleeAttackIfReady(); + + return; + } +}; + +struct MANGOS_DLL_DECL npc_spectral_wardenAI : public ScriptedAI +{ + npc_spectral_wardenAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + +ScriptedInstance* m_pInstance; +bool m_bIsRegularMode; + +uint32 ShadowsTimer; +uint32 SoulsTimer; + + void Reset() + { + ShadowsTimer = (urand(2000, 5000)); + SoulsTimer = (urand(10000, 15000)); + } + + void UpdateAI(const uint32 diff) + { + if(!m_pInstance) return; + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (ShadowsTimer < diff) + { + DoCast(m_creature->getVictim(), SPELL_VEIL_OF_SHADOWS); + ShadowsTimer = (urand(10000, 15000)); + } + else + ShadowsTimer -= diff; + + if (SoulsTimer < diff) + { + DoCast(m_creature, m_bIsRegularMode ? SPELL_WAIL_OF_SOULS_N : SPELL_WAIL_OF_SOULS_H); + SoulsTimer = (urand(7000, 20000)); + } + else + SoulsTimer -= diff; + + DoMeleeAttackIfReady(); + + return; + } +}; + +CreatureAI* GetAI_npc_soulguard_watchman(Creature* pCreature) +{ + return new npc_soulguard_watchmanAI(pCreature); +} + +CreatureAI* GetAI_npc_soulguard_reaper(Creature* pCreature) +{ + return new npc_soulguard_reaperAI(pCreature); +} + +CreatureAI* GetAI_npc_soulguard_adept(Creature* pCreature) +{ + return new npc_soulguard_adeptAI(pCreature); +} + +CreatureAI* GetAI_npc_soulguard_bonecaster(Creature* pCreature) +{ + return new npc_soulguard_bonecasterAI(pCreature); +} + +CreatureAI* GetAI_npc_soulguard_animator(Creature* pCreature) +{ + return new npc_soulguard_animatorAI(pCreature); +} + +CreatureAI* GetAI_npc_soul_horror(Creature* pCreature) +{ + return new npc_soul_horrorAI(pCreature); +} + +CreatureAI* GetAI_npc_spectral_warden(Creature* pCreature) +{ + return new npc_spectral_wardenAI(pCreature); +} + +void AddSC_trash_forge_of_souls() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_soulguard_watchman"; + newscript->GetAI = &GetAI_npc_soulguard_watchman; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_soulguard_reaper"; + newscript->GetAI = &GetAI_npc_soulguard_reaper; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_soulguard_adept"; + newscript->GetAI = &GetAI_npc_soulguard_adept; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_soulguard_bonecaster"; + newscript->GetAI = &GetAI_npc_soulguard_bonecaster; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_soulguard_animator"; + newscript->GetAI = &GetAI_npc_soulguard_animator; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_soul_horror"; + newscript->GetAI = &GetAI_npc_soul_horror; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_spectral_warden"; + newscript->GetAI = &GetAI_npc_spectral_warden; + newscript->RegisterSelf(); +} \ No newline at end of file diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index 36d60f0c2..aab06c1b4 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -404,6 +404,8 @@ extern void AddSC_boss_lich_king_icc(); extern void AddSC_instance_forge_of_souls(); extern void AddSC_boss_devourer_of_souls(); extern void AddSC_boss_bronjahm(); +extern void AddSC_trash_forge_of_souls(); +extern void AddSC_forge_of_souls(); extern void AddSC_instance_pit_of_saron(); extern void AddSC_boss_forgemaster_gafrost(); @@ -892,6 +894,8 @@ void AddScripts() AddSC_instance_forge_of_souls(); AddSC_boss_devourer_of_souls(); AddSC_boss_bronjahm(); + AddSC_trash_forge_of_souls(); + AddSC_forge_of_souls(); AddSC_instance_pit_of_saron(); AddSC_boss_forgemaster_gafrost(); From 280086b6b478e1152e2cad54e813af1ba2db733b Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sat, 19 Jun 2010 16:50:43 +0400 Subject: [PATCH 370/405] COS sql correct (from PSZ). sources also need correct :( --- addition/717_culling_of_stratholme_mangos.sql | 123 ++++-------- .../717_culling_of_stratholme_scriptdev2.sql | 187 +++++++++--------- 2 files changed, 136 insertions(+), 174 deletions(-) diff --git a/addition/717_culling_of_stratholme_mangos.sql b/addition/717_culling_of_stratholme_mangos.sql index 2af22ed52..e09ac11f2 100644 --- a/addition/717_culling_of_stratholme_mangos.sql +++ b/addition/717_culling_of_stratholme_mangos.sql @@ -1,86 +1,49 @@ --- Remove old version +-- Remove old versions DELETE FROM `creature` WHERE `guid` IN (4456649,4456653,4458724,4458725,4458738,4458739,4458740,4458741,4459981,4459615); - -REPLACE INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (30996, 0, 0, 0, 0, 0, 11686, 0, 11686, 0, 'CoT Stratholme - Crates KC Bunny', '', '', 1, 1, 1, 1, 0, 0, 17, 35, 35, 0, 1, 0, 1, 2, 0, 0, 1, 2000, 2000, 1, 33554432, 0, 0, 0, 0, 0, 0, 1, 2, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, ''); -UPDATE `quest_template` SET `ReqCreatureOrGOCount1` = '5' WHERE entry=13149; -REPLACE INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (20562, 0, 0, 0, 0, 0, 11686, 0, 11686, 0, 'Invisible Stalker (Scale x5)', '', '', 1, 1, 42, 42, 0, 0, 17, 35, 35, 0, 5, 0, 1, 2, 0, 0, 1, 2000, 2000, 1, 33554944, 0, 0, 0, 0, 0, 0, 1, 2, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, ''); +DELETE FROM `creature` WHERE `id` IN (27731,27734,28249,27736,27915,30571,26499,26497,26528,27891,27892,27884,32273,28439); UPDATE `creature` SET `spawntimesecs`= 36000 WHERE `id` IN (31127, 31126, 28167, 28169); -replace into `spell_script_target` (`entry`, `type`, `targetEntry`) values('58825','1','27733'); - -UPDATE `creature_template` SET `faction_A`='35', `faction_H`='35' WHERE `entry` IN (31127, 31126, 28167, 28169); -UPDATE `creature_template` SET `faction_A`='35', `faction_H`='35' WHERE `entry` IN (10002, 10003, 10004, 10005); -UPDATE `creature_template` SET `minhealth`='15000', `maxhealth`='15000' WHERE `entry` IN (27737); -UPDATE `creature_template` SET `minhealth`='25000', `maxhealth`='25000' WHERE `entry` IN (31208); - -replace into `spell_area` (`spell`, `area`, `quest_start`, `quest_start_active`, `quest_end`, `aura_spell`, `racemask`, `gender`, `autocast`) values('35481','4100','0','0','0','0','0','1','1'); -replace into `spell_area` (`spell`, `area`, `quest_start`, `quest_start_active`, `quest_end`, `aura_spell`, `racemask`, `gender`, `autocast`) values('35480','4100','0','0','0','0','0','0','1'); - -UPDATE `instance_template` SET `script` = 'instance_culling_of_stratholme' WHERE map=595; - -update `creature_template` set `AIName`='', `Scriptname`='npc_mike' where `entry` in (30571); -update `creature_template` set `AIName`='', `Scriptname`='npc_chromi_start' where `entry` in (26527); -update `creature_template` set `AIName`='', `Scriptname`='npc_roger' where `entry` in (27903); -update `creature_template` set `AIName`='', `Scriptname`='npc_morigan' where `entry` in (27877); -update `creature_template` set `AIName`='', `Scriptname`='npc_stratholme_crates' where `entry` in (30996); -update `creature_template` set `AIName`='', `Scriptname`='npc_jena' where `entry` in (27885); -update `creature_template` set `AIName`='', `Scriptname`='npc_malcolm' where `entry` in (27891); -update `creature_template` set `AIName`='', `Scriptname`='npc_bartleby_cs' where `entry` in (27907); -update `creature_template` set `AIName`='', `Scriptname`='npc_chromi_middle' where `entry` in (27915); -update `creature_template` set `AIName`='', `Scriptname`='npc_uther' where `entry` in (26528); -update `creature_template` set `AIName`='', `Scriptname`='npc_arthas' where `entry` in (26499); -update `creature_template` set `AIName`='', `Scriptname`='' where `entry` in (26533); -update `creature_template` set `AIName`='', `Scriptname`='npc_arthas_priest' where `entry` in (27747); -update `creature_template` set `AIName`='', `Scriptname`='npc_arthas_marine' where `entry` in (27745); -UPDATE `creature_template` SET `AIName`='', `Scriptname`='npc_dark_conversion' WHERE `entry` IN (31127, 31126, 28167, 28169); -update `creature_template` set `AIName`='', `Scriptname`='npc_cs_gnoul' where `entry` in (28249); -update `creature_template` set `AIName`='', `Scriptname`='npc_cs_necromancer' where `entry` in (28200); -update `creature_template` set `AIName`='', `Scriptname`='npc_cs_field' where `entry` in (27734); -update `creature_template` set `AIName`='', `Scriptname`='npc_cs_acolyte' where `entry` in (27731); -update `creature_template` set `AIName`='', `Scriptname`='npc_cs_butcher' where `entry` in (27736); -UPDATE `creature_template` SET `AIName`='', `Scriptname`='boss_meathook' WHERE `entry` IN (26529); -UPDATE `creature_template` SET `AIName`='', `Scriptname`='boss_salramm' WHERE `entry` IN (26530); -UPDATE `creature_template` SET `AIName`='', `Scriptname`='npc_salramm_gnoul' WHERE `entry` IN (27733); -UPDATE `creature_template` SET `AIName`='', `Scriptname`='boss_lord_epoch' WHERE `entry` IN (26532); -UPDATE `creature_template` SET `AIName`='', `Scriptname`='boss_malganis' WHERE `entry` IN (26533); -UPDATE `creature_template` SET `AIName`='', `Scriptname`='npc_time_riftCS' WHERE `entry` IN (28409); -UPDATE `creature_template` SET `AIName`='', `Scriptname`='boss_infinite_corruptor' WHERE `entry` IN (32273); - -DELETE FROM `npc_gossip` WHERE (`npc_guid`=115298); - +REPLACE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) values('58825','1','27733'); +REPLACE INTO `spell_area` (`spell`, `area`, `quest_start`, `quest_start_active`, `quest_end`, `aura_spell`, `racemask`, `gender`, `autocast`) values('35481','4100','0','0','0','0','0','1','1'); +REPLACE INTO `spell_area` (`spell`, `area`, `quest_start`, `quest_start_active`, `quest_end`, `aura_spell`, `racemask`, `gender`, `autocast`) values('35480','4100','0','0','0','0','0','0','1'); REPLACE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('58825', '1', '27733'); -DELETE FROM `creature` WHERE `id` in (27731); -DELETE FROM `creature` WHERE `id` in (27734); -DELETE FROM `creature` WHERE `id` in (28249); -DELETE FROM `creature` WHERE `id` in (27736); - -DELETE FROM `creature` WHERE `id` in (27915); -INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (571701, 27915, 595, 3, 1, 0, 0, 1812.49, 1284.81, 142.248, 4.03364, 300, 0, 0, 17010, 0, 0, 0); - -DELETE FROM `creature` WHERE `id` in (30571); -INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (571702, 30571, 595, 3, 1, 27139, 0, 1549.61, 575.545, 100.052, 4.16253, 360, 0, 0, 8982, 0, 0, 0); - -DELETE FROM `creature` WHERE `id` in (26499); -INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (571703, 26499, 595, 3, 1, 0, 1613, 1920.87, 1287.12, 142.935, 6.25562, 43200, 0, 0, 44100, 7988, 0, 0); - -DELETE FROM `creature` WHERE `id` in (26497); -INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (571704, 26497, 595, 3, 1, 0, 1221, 1896.39, 1292.91, 143.711, 0.016332, 25, 5, 0, 100800, 88140, 0, 0); - -DELETE FROM `creature` WHERE `id` in (26528); -INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (571705, 26528, 595, 3, 1, 0, 1819, 1761.42, 1285.75, 139.945, 4.93874, 25, 5, 0, 126000, 59910, 0, 0); - -DELETE FROM `creature` WHERE `id` in (27891); -INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (571706, 27891, 595, 3, 1, 0, 0, 1603.38, 805.988, 123.272, 1.90688, 25, 5, 0, 8982, 0, 0, 0); - -DELETE FROM `creature` WHERE `id` in (27892); -INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (571707, 27892, 595, 3, 1, 0, 0, 1602.3, 809.385, 123.454, 5.02884, 25, 5, 0, 8982, 0, 0, 0); - -DELETE FROM `creature` WHERE `id` in (27884); -INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (571708, 27884, 595, 3, 1, 24901, 0, 1635.81, 723.155, 113.562, 3.21455, 360, 0, 0, 8982, 0, 0, 0); - -DELETE FROM `creature` WHERE `id` in (32273); -INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (571709, 32273, 595, 2, 1, 0, 1839, 2330.93, 1275.59, 132.848, 3.60489, 25, 5, 0, 417911, 0, 0, 0); +UPDATE `instance_template` SET `script` = 'instance_culling_of_stratholme' WHERE map=595; -DELETE FROM `creature` WHERE `id` in (28439); -INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (571710, 28439, 595, 2, 1, 0, 0, 2336.56, 1277.9, 132.885, 3.47923, 25, 5, 0, 1, 0, 0, 0); +UPDATE `creature_template` SET `ScriptName`='npc_mike' WHERE entry=30571; +UPDATE `creature_template` SET `ScriptName`='npc_chromi_start' WHERE entry=26527; +UPDATE `creature_template` SET `ScriptName`='npc_roger' WHERE entry=27903; +UPDATE `creature_template` SET `ScriptName`='npc_morigan' WHERE entry=27877; +UPDATE `creature_template` SET `ScriptName`='npc_stratholme_crates' WHERE entry=30996; +UPDATE `creature_template` SET `ScriptName`='npc_jena' WHERE entry=27885; +UPDATE `creature_template` SET `ScriptName`='npc_malcolm' WHERE entry=27891; +UPDATE `creature_template` SET `ScriptName`='npc_bartleby_cs' WHERE entry=27907; +UPDATE `creature_template` SET `ScriptName`='npc_chromi_middle' WHERE entry=27915; +UPDATE `creature_template` SET `ScriptName`='npc_uther' WHERE entry=26528; +UPDATE `creature_template` SET `ScriptName`='npc_arthas' WHERE entry=26499; +UPDATE `creature_template` SET `ScriptName`='npc_arthas_priest' WHERE entry=27747; +UPDATE `creature_template` SET `ScriptName`='npc_arthas_marine' WHERE entry=27745; +UPDATE `creature_template` SET `ScriptName`='npc_dark_conversion' WHERE entry IN (31127, 31126, 28167, 28169); +UPDATE `creature_template` SET `ScriptName`='npc_cs_gnoul' WHERE entry=28249; +UPDATE `creature_template` SET `ScriptName`='npc_cs_necromancer' WHERE entry=28200; +UPDATE `creature_template` SET `ScriptName`='npc_cs_field' WHERE entry=27734; +UPDATE `creature_template` SET `ScriptName`='npc_cs_acolyte' WHERE entry=27731; +UPDATE `creature_template` SET `ScriptName`='npc_cs_butcher' WHERE entry=27736; +UPDATE `creature_template` SET `ScriptName`='boss_meathook' WHERE entry=26529; +UPDATE `creature_template` SET `ScriptName`='boss_salramm' WHERE entry=26530; +UPDATE `creature_template` SET `ScriptName`='npc_salramm_gnoul' WHERE entry=27733; +UPDATE `creature_template` SET `ScriptName`='boss_lord_epoch' WHERE entry=26532; +UPDATE `creature_template` SET `ScriptName`='boss_malganis' WHERE entry=26533; +UPDATE `creature_template` SET `ScriptName`='npc_time_riftCS' WHERE entry=28409; +UPDATE `creature_template` SET `ScriptName`='boss_infinite_corruptor' WHERE entry=32273; + +DELETE FROM `creature` WHERE `id` in (27915, 26499, 26497, 26528, 27891, 27892, 32273, 28439); +INSERT INTO `creature` (id, map, spawnMask, phaseMask, modelid, equipment_id, position_x, position_y, position_z, orientation, spawntimesecs, spawndist, currentwaypoint, curhealth, curmana, DeathState, MovementType) VALUES +(27915, 595, 3, 1, 0, 0, 1812.49, 1284.81, 142.248, 4.03364, 300, 0, 0, 17010, 0, 0, 0), +(26499, 595, 3, 1, 0, 1613, 1920.87, 1287.12, 142.935, 6.25562, 43200, 0, 0, 44100, 7988, 0, 0), +(26497, 595, 3, 1, 0, 1221, 1896.39, 1292.91, 143.711, 0.016332, 25, 5, 0, 100800, 88140, 0, 0), +(26528, 595, 3, 1, 0, 1819, 1761.42, 1285.75, 139.945, 4.93874, 25, 5, 0, 126000, 59910, 0, 0), +(27891, 595, 3, 1, 0, 0, 1603.38, 805.988, 123.272, 1.90688, 25, 5, 0, 8982, 0, 0, 0), +(27892, 595, 3, 1, 0, 0, 1602.3, 809.385, 123.454, 5.02884, 25, 5, 0, 8982, 0, 0, 0), +(32273, 595, 2, 1, 0, 1839, 2330.93, 1275.59, 132.848, 3.60489, 86400, 5, 0, 417911, 0, 0, 0), +(28439, 595, 2, 1, 0, 0, 2336.56, 1277.9, 132.885, 3.47923, 25, 5, 0, 1, 0, 0, 0); diff --git a/addition/717_culling_of_stratholme_scriptdev2.sql b/addition/717_culling_of_stratholme_scriptdev2.sql index 23c327235..d20d80781 100644 --- a/addition/717_culling_of_stratholme_scriptdev2.sql +++ b/addition/717_culling_of_stratholme_scriptdev2.sql @@ -1,146 +1,145 @@ -DELETE FROM `script_texts` WHERE `comment` in (34587, 26499); -insert into `script_texts` (`entry`,`content_default`,`content_loc8`,`sound`,`type`,`language`,`emote`,`comment`) VALUES +REPLACE INTO script_texts (entry, content_default, content_loc8, sound, type, language, emote, comment) VALUES # TAVERN EVENT -(-1557270, 'Hey! Stop rooting around in my cellar! Clear out!', 'Hey! Stop rooting around in my cellar! Clear out!', 0,0,0,1, '34587'), -(-1557271, 'This whole situation seems a bit paranoid, dont you think?', 'This whole situation seems a bit paranoid, dont you think?', 0,0,0,25, '34587'), -(-1557272, 'Orders are orders, if Prince says jump...', 'Orders are orders, if Prince says jump...', 0,0,0,1, '34587'), -(-1557273, 'Its strange order, you cant deny Suspicious food? Under that definition, you should arrest Belfast!', 'Its strange order, you cant deny Suspicious food? Under that definition, you should arrest Belfast!', 0,0,0,1, '34587'), -(-1557274, 'I HEARD THAT! No more ale for you! Not a drop!', 'I HEARD THAT! No more ale for you! Not a drop!', 0,0,0,25, '34587'), -(-1557275, 'Enough, Michael Businnes is hurting enough with this scare as it is. We can use every copper.', 'Enough, Michael Businnes is hurting enough with this scare as it is. We can use every copper.', 0,0,0,274, '34587'), -(-1557276, 'The soldiers are doing important work. The safely of the people is more important, Mal if youre interested in your customers living to spend another day.', 'The soldiers are doing important work. The safely of the people is more important, Mal if youre interested in your customers living to spend another day.', 0,0,0,1, '34587'), -(-1557277, 'I cant argue with that.', 'I cant argue with that.', 0,0,0,1, '34587'), -(-1557278, 'Dont worry too much. By the time I went odd duty, we hadnt a scrap of befouled grain here.', 'Dont worry too much. By the time I went odd duty, we hadnt a scrap of befouled grain here.', 0,0,0,274, '34587'), -(-1557279, 'Thank the Light for that.', 'Thank the Light for that.', 0,0,0,1, '34587'), +(-1557270, 'Hey! Stop rooting around in my cellar! Clear out!', 'Эй! А ну, хорош рыться в моей кладовке! Проваливайте!', 0,0,0,1, '34587'), +(-1557271, 'This whole situation seems a bit paranoid, don\'t you think?', 'По-моему, все это сильно смахивает на паранойю, вы не находите?', 0,0,0,25, '34587'), +(-1557272, 'Orders are orders, if prince says jump...', 'Приказ есть приказ. Если принц говорит прыгать...', 0,0,0,1, '34587'), +(-1557273, 'It\'s strange order, you cant deny Suspicious food? Under that definition, you should arrest Belfast!', 'Странный приказ, что верно, то верно. Подозрительная пища? Тогда уж и Белфаста арестовывайте!', 0,0,0,1, '34587'), +(-1557274, 'I HEARD THAT! No more ale for you! Not a drop!', 'Я ВСЕ СЛЫШАЛ! Больше эля ты не получишь! Ни капли!', 0,0,0,25, '34587'), +(-1557275, 'Enough, Michael. Business is hurting enough with this scare as it is. We can use every copper.', 'Довольно, Майкл. Наши дела и так страдают из-за этой угрозы. Сейчас каждый медяк на счету.', 0,0,0,274, '34587'), +(-1557276, 'The soldiers are doing important work. The safely of the people is more important, Mal, if you\'re interested in your customers living to spend another day.', 'Солдаты заняты очень важным делом, Мал. Если ты хочешь, чтобы твои покупатели дожили до завтрашнего дня - надо обеспечить их безопасность.', 0,0,0,1, '34587'), +(-1557277, 'I can\'t argue with that.', 'С этим не поспоришь.', 0,0,0,1, '34587'), +(-1557278, 'Don\'t worry too much. By the time I went odd duty, we hadnt a scrap of befouled grain here.', 'Не стоит так сильно волноваться. К тому времени, как я сдал пост, мы не нашли здесь и следа этого мерзского зерна.', 0,0,0,274, '34587'), +(-1557279, 'Thank the Light for that.', 'Скажи спасибо Свету.', 0,0,0,1, '34587'), # ROGER EVENT -(-1557280, 'Wait, whats that smell?', 'Wait, whats that smell?', 0,0,0,1, '34587'), -(-1557281, 'Cant be me, I took a bath 3 days ago!', 'Cant be me, I took a bath 3 days ago!', 0,0,0,1, '34587'), -(-1557282, 'Oh, close call. Its just the grain here.', 'Oh, close call. Its just the grain here.', 0,0,0,1, '34587'), -(-1557283, 'Wait a second. Grain isnt supposed to smell like THAT! I better go find a guard.', 'Wait a second. Grain isnt supposed to smell like THAT! I better go find a guard.', 0,0,0,1, '34587'), +(-1557280, 'Wait, what\'s that smell?', 'Стоп, что за вонь?', 0,0,0,1, '34587'), +(-1557281, 'Can\'t be me, I took a bath 3 days ago!', 'Это не от меня, я мылся 3 дня назад!', 0,0,0,1, '34587'), +(-1557282, 'Oh, close call. It\'s just the grain here.', 'О, это всего лишь зерно.', 0,0,0,1, '34587'), +(-1557283, 'Wait a second. Grain isn\'t supposed to smell like THAT! I better go find a guard.', 'Погоди. Зерно не может ТАК вонять! Я лучше пойду поищу стражника.', 0,0,0,1, '34587'), # MORIGAN EVENT -(-1557284, 'You dont mind me checking out your merchandise for signs of tampering, do you?', 'You dont mind me checking out your merchandise for signs of tampering, do you?', 0,0,0,1, '34587'), -(-1557285, 'No, sir.', 'No, sir.', 0,0,0,1, '34587'), -(-1557286, 'Wait, what is it? Youve been holding out on me, Perelli!', 'Wait, what is it? Youve been holding out on me, Perelli!', 0,0,0,0, '34587'), -(-1557287, 'What are you talking about, Sergeant?', 'What are you talking about, Sergeant?', 0,0,0,1, '34587'), -(-1557288, 'Iam confiscating this suspicious grain, Perelli. We were looking for signs of tampered food, and it would be in your best interest to stay put while Prince Arthas checks this out.', 'Iam confiscating this suspicious grain, Perelli. We were looking for signs of tampered food, and it would be in your best interest to stay put while Prince Arthas checks this out.', 0,0,0,1, '34587'), -(-1557289, 'You have to belive me, Iam innocent!', 'You have to belive me, Iam innocent!', 0,0,0,20, '34587'), -(-1557290, 'Well see about that. Perelli. Well see about that.', 'Well see about that. Perelli. Well see about that.', 0,0,0,1, '34587'), +(-1557284, 'You don\'t mind me checking out your merchandise for signs of tampering, do you?', 'Вы же не возражаете, чтобы я проверил ваши товары?', 0,0,0,1, '34587'), +(-1557285, 'No, sir.', 'Нет, сэр.', 0,0,0,1, '34587'), +(-1557286, 'Wait, what is it? Youve been holding out on me, Perelli!', 'Подождите-ка, что это? Ты скрывал это от меня, Перелли!', 0,0,0,0, '34587'), +(-1557287, 'What are you talking about, Sergeant?', 'О чем вы говорите, сержант?', 0,0,0,1, '34587'), +(-1557288, 'I am confiscating this suspicious grain, Perelli. We were looking for signs of tampered food, and it would be in your best interest to stay put while Prince Arthas checks this out.', 'Я конфискую это подозрительное зерно, Перелли. Мы искали признаки подозрительной еды, и было бы в твоих лучших интересах оставаться на месте, пока принц Артас разбирается в происходящем.', 0,0,0,1, '34587'), +(-1557289, 'You have to belive me, I am innocent!', 'Вы должны верить мне, я не виновен!', 0,0,0,20, '34587'), +(-1557290, 'Well see about that. Perelli. Well see about that.', 'Это мы посмотрим, Перелли. Это мы посмотрим.', 0,0,0,1, '34587'), # JENA EVENT -(-1557291, 'Martha. Iam out of flour for bread. You wouldnt happen to have any grain from that recent, would you?', 'Martha. Iam out of flour for bread. You wouldnt happen to have any grain from that recent, would you?', 0,0,0,1, '34587'), -(-1557292, 'Oh hello, Jena. Of Course you can borrow some grain. Help yourself.', 'Oh hello, Jena. Of Course you can borrow some grain. Help yourself.', 0,0,0,1, '34587'), -(-1557293, 'Thanks. Martha! I owe you one.', 'Thanks. Martha! I owe you one.', 0,0,0,1, '34587'), -(-1557294, 'Martha, somethings wrong with this grain! Some of the Princes soldiers were looking for this. Im going to go look for one.', 'Martha, somethings wrong with this grain! Some of the Princes soldiers were looking for this. Im going to go look for one.', 0,0,0,1, '34587'), -(-1557295, 'Oh, my.', 'Oh, my.', 0,0,0,1, '34587'), +(-1557291, 'Martha. I am out of flour for bread. You wouldn\'t happen to have any grain from that recent, would you?', 'Марта, я не нашла у себя муки для выпечки хлеба. Вы не одолжите мне зерна?', 0,0,0,1, '34587'), +(-1557292, 'Oh hello, Jena. Of Course you can borrow some grain. Help yourself.', 'О, привет Джена. Конечно я одолжу вам зерна. Возьмите сами.', 0,0,0,1, '34587'), +(-1557293, 'Thanks. Martha! I owe you one.', 'Спасибо. Марта! Я твоя должница.', 0,0,0,1, '34587'), +(-1557294, 'Martha, somethings wrong with this grain! Some of the Princes soldiers were looking for this. Im going to go look for one.', 'Марта, с этим зерном что-то не так! Солдаты Принца что-то говорили о нем. Пойду-ка поищу кого-нибудь из них.', 0,0,0,1, '34587'), +(-1557295, 'Oh, my.', 'Боже мой.', 0,0,0,1, '34587'), # MALCOLM EVENT -(-1557296, 'Looks like a storms coming in, Scruffy...', 'Looks like a storms coming in, Scruffy...', 0,0,0,0, '34587'), -(-1557297, 'Whats wrong, pal?', 'Whats wrong, pal?', 0,0,0,1, '34587'), -(-1557298, 'What did you find, boy?', 'What did you find, boy?', 0,0,0,0, '34587'), -(-1557299, 'This is no good, Scruffy. Stay here and guard the house. I need to go find a soldier.', 'This is no good, Scruffy. Stay here and guard the house. I need to go find a soldier.', 0,0,0,0, '34587'), +(-1557296, 'Looks like a storms coming in, Scruffy...', 'Похоже на приближающуюся бурю, Лохмач...', 0,0,0,0, '34587'), +(-1557297, 'Whats wrong, pal?', 'Что случилось, друг?', 0,0,0,1, '34587'), +(-1557298, 'What did you find, boy?', 'Что ты нашел, парень?', 0,0,0,0, '34587'), +(-1557299, 'This is no good, Scruffy. Stay here and guard the house. I need to go find a soldier.', 'Выглядит плохо, Лохмач. Стой тут и охраняй дом, а я пока сбегаю - поищу солдат.', 0,0,0,0, '34587'), # BARTLEBY EVENT -(-1557300, 'I knew I should have secured the wagon lock better when I was in Andorhal.', 'I knew I should have secured the wagon lock better when I was in Andorhal.', 0,0,0,1, '34587'), -(-1557301, 'This grain shipmend has been nothing but trouble!', 'This grain shipmend has been nothing but trouble!', 0,0,0,1, '34587'), -(-1557302, 'Well, guess I should load everything back into the cart.', 'Well, guess I should load everything back into the cart.', 0,0,0,0, '34587'), -(-1557303, 'Oh, come on! My cart broke, my horse a shoe, and now the cargo goes bad!', 'Oh, come on! My cart broke, my horse a shoe, and now the cargo goes bad!', 0,0,0,1, '34587'), -(-1557304, 'I guess Ill go find the authorites. If Im lucky theyll tell me its the plague and that were all to die!', 'I guess Ill go find the authorites. If Im lucky theyll tell me its the plague and that were all to die!', 0,0,0,1, '34587'), +(-1557300, 'I knew I should have secured the wagon lock better when I was in Andorhal.', 'Надо было получше запереть фургон в Андорале.', 0,0,0,1, '34587'), +(-1557301, 'This grain shipmend has been nothing but trouble!', 'От этого зерна пока одни лишь хлопоты!', 0,0,0,1, '34587'), +(-1557302, 'Well, guess I should load everything back into the cart.', 'Ну, наверное, мне нужно сложить все обратно в телегу.', 0,0,0,0, '34587'), +(-1557303, 'Oh, come on! My cart broke, my horse a shoe, and now the cargo goes bad!', 'О, черт! Моя телега сломалась, моя лошадь потеряла подкову, а теперь еще и с грузом проблемы!', 0,0,0,1, '34587'), +(-1557304, 'I guess I\'ll go find the authorites. If I\'m lucky theyll tell me it\'s the plague and that were all to die!', 'Похоже, мне придется идти искать представителей закона. Если мне повезет, они скажут, что это чума и что скоро мы все умрем!', 0,0,0,1, '34587'), # ARTHAS INTRO EVENT -(-1594071, 'Glad you could make it, Uther.', 'Я рад, что ты пришел! Утер.', 12828,0,0,1, '34587'), -(-1594072, 'Watch your tone with me boy. You may be the prince, but iam still your superior as a paladin!', 'Следи за своим тоном, юноша. Хоть ты и принц, но как паладин ты все еще находишься под моим командыванием.', 12839,0,0,25, '34587'), -(-1594073, 'As if I could forget. listen, Uther, theres something about the plague you should know...', 'Как будто я не помню. Послушай Утер я должен рассказать тебе кое что про чуму.', 12829,0,0,0, '34587'), -(-1594074, 'Oh, no. Were too late. These people have all been infected! They may look fine now, but its just a matter of time before they turn into the undead!', 'О нет... Мы опоздали... Все эти люди заражены чумой. Сейчас это еще не заметно, но скоро все они превратяся в нежить.', 12830,0,0,1, '34587'), +(-1594071, 'Glad you could make it, Uther.', 'Я рад, что ты пришел, Утер!', 12828,0,0,1, '34587'), +(-1594072, 'Watch your tone with me boy. You may be the prince, but I am still your superior as a paladin!', 'Следи за своим тоном, юноша. Хоть ты и принц, но, как паладин, ты все еще находишься под моим командованием.', 12839,0,0,25, '34587'), +(-1594073, 'As if I could forget. Listen, Uther, there\'s something about the plague you should know...', 'Как будто я не помню. Послушай, Утер, я должен рассказать тебе кое-что про чуму...', 12829,0,0,0, '34587'), +(-1594074, 'Oh, no. Were too late. These people have all been infected! They may look fine now, but it\'s just a matter of time before they turn into the undead!', 'О нет. Мы опоздали. Все эти люди заражены чумой! Сейчас это еще незаметно, но скоро все они превратятся в нежить!', 12830,0,0,1, '34587'), (-1594075, 'What?', 'Что?', 12840,0,0,5, '34587'), (-1594076, 'This entire city must be purged.', 'Весь город должен быть очищен.', 12831,0,0,1, '34587'), -(-1594077, 'How can you even consider that? Theres got to be some other way.', 'Как ты мог даже подумать об этом? Должен быть какой то другой путь?', 12841,0,0,1, '34587'), -(-1594078, 'Damn it, Uther! As your future king, I order you to purge this city!', 'Проклятие, Утер! Как будущий король, я приказываю тебе очистить этот город.', 12832,1,0,5, '34587'), -(-1594079, 'You are not my king yet, boy! Nor would I obey that command even if you were!', 'Пока ты еще не король юноша. Но этот приказ я не выполнил бы будь ты хоть трижды королем!', 12842,1,0,22, '34587'), +(-1594077, 'How can you even consider that? There\'s got to be some other way.', 'Как ты мог даже подумать об этом?! Должен быть какой-то другой путь!', 12841,0,0,1, '34587'), +(-1594078, 'Damn it, Uther! As your future king, I order you to purge this city!', 'Проклятие, Утер! Как будущий король, я приказываю тебе очистить этот город!', 12832,1,0,5, '34587'), +(-1594079, 'You are not my king yet, boy! Nor would I obey that command even if you were!', 'Пока ты еще не король, юноша. Но этот приказ я не выполнил бы, будь ты хоть трижды королем!', 12842,1,0,22, '34587'), (-1594080, 'Then I must consider this an act of treason.', 'Тогда я буду расценивать это как измену.', 12833,0,0,0, '34587'), -(-1594081, 'Treason? Have you lost your mind, Arthas?', 'Измену? Ты совсем лишился рассудка Артас?', 12843,0,0,5, '34587'), -(-1594082, 'Have I? Lord Uther, by my right of succession and the sovereignty of my crown, I hereby relieve you of your commnad and suspend your paladins from service.', 'Неужели? Лорд Утер. Властью данной мне по праву наследования, я отстраняю вас от командования, и освобождаю от службы ваших паладинов. ', 12834,0,0,1, '34587'), -(-1594083, 'Arthas! You cant just...', 'Артас? Ты не можешь так просто...', 12837,0,0,1, '34587'), -(-1594084, 'Its done! those of you who have the will to save this land, follow me! The rest of you... get out of my sight!', 'Это уже сделано! Те из вас кто действительно хочет спасти эту землю за мной, остальные прочь с глаз моих.', 12835,0,0,0, '34587'), -(-1594085, 'Youve just crossed a terrible inreshold, Arthas!', 'Ты пересек опасную черту, артас.', 12844,0,0,25, '34587'), +(-1594081, 'Treason? Have you lost your mind, Arthas?', 'Измену? Ты совсем лишился рассудка, Артас?', 12843,0,0,5, '34587'), +(-1594082, 'Have I? Lord Uther, by my right of succession and the sovereignty of my crown, I hereby relieve you of your commnad and suspend your paladins from service.', 'Неужели? Лорд Утер, властью, данной мне по праву наследования, я отстраняю вас от командования и освобождаю от службы ваших паладинов.', 12834,0,0,1, '34587'), +(-1594083, 'Arthas! You cant just...', 'Артас! Ты не можешь так просто...', 12837,0,0,1, '34587'), +(-1594084, 'It\'s done! those of you who have the will to save this land, follow me! The rest of you... get out of my sight!', 'Это уже сделано! Те из вас, кто действительно хочет спасти эту землю - за мной! Остальные - прочь с глаз моих!', 12835,0,0,0, '34587'), +(-1594085, 'You\'ve just crossed a terrible inreshold, Arthas!', 'Ты пересек опасную черту, Артас.', 12844,0,0,25, '34587'), (-1594086, 'Jaina?', 'Джайна?', 12836,0,0,1, '34587'), -(-1594087, 'Im sorry Arthas. I cant watch you do this.', 'Прости Артас, но я не могу смотреть на это.', 12838,0,0,1, '34587'), -(-1594088, 'Take position here and I will', 'Обустройте позицию тут, а я пока поведу небольшой отряд в стратхольм и начну очищение. Мы должны изолировать и уничтожить зараженных жителей ради всего Лордерона.', 14327,1,0,1, '34587'), +(-1594087, 'Im sorry Arthas. I can\'t watch you do this.', 'Прости, Артас. Я не могу на это смотреть.', 12838,0,0,1, '34587'), +(-1594088, 'Take position here and I will lead a small force inside Stratholme to begin the culling. We must contain and purge the infected for the sake of all of Lordaeron!', 'Займите позицию, а я поведу небольшой отряд в Стратхольм и начну очищение. Мы должны изолировать и уничтожить зараженных жителей ради всего Лордерона!', 14327,1,0,1, '34587'), #ARTHAS ENTER IN THE CITY -(-1594089, 'Enveryone looks ready. Remember these people are all infected with the plague and will die soon. We must purge Stratholme to protect the remainder of Lorderon from the Scourge. Lets go!', 'Похоже все готовы! Помните эти люди заражены чумой и скоро умрут. Мы должны очистить Стратхольм и защитить Лордерон от Плети. Вперед.', 14293,0,0,1, '26499'), -(-1594090, 'Prince Arthas, may the light the privail. Many people in the town have begin to tall seriously Ill. Can you help us?', 'Принц Артас, Слава свету. Многие люди в городе будут рады видеть вас. Чем мы вам можем помочь?', 0,0,0,1, '26499'), -(-1594091, 'I can help you only with a clean death.', 'Я могу помочь вам, лишь быстрой смертью.', 14294,0,0,0, '26499'), -(-1594092, 'What? This cant be!', 'Что? Этого не может быть...', 0,0,0,0, '26499'), +(-1594089, 'Everyone looks ready. Remember, these people are all infected with the plague and will die soon. We must purge Stratholme to protect the remainder of Lordaeron from the Scourge. Lets go!', 'Похоже, все готовы. Помните, эти люди заражены чумой и скоро умрут. Мы должны очистить Стратхольм и защитить Лордерон от Плети. Вперед.', 14293,0,0,1, '26499'), +(-1594090, 'Prince Arthas, may the light be praised. Many people in the town have begun to fall seriously ill. Can you help us?', 'Принц Артас, слава Свету! Многие горожане серьезно больны. Можете ли вы помочь нам?', 0,0,0,1, '26499'), +(-1594091, 'I can help you only with a clean death.', 'Я могу помочь вам лишь быстрой смертью.', 14294,0,0,0, '26499'), +(-1594092, 'What? This cant be!', 'Что? Этого не может быть!', 0,0,0,0, '26499'), (-1594093, 'Oh... My g...', 'О... Мой б...', 0,0,0,0, '26499'), -(-1594094, 'This is begining!', 'Это только начало...', 14295,0,0,1, '26499'), -(-1594095, 'Yes, this is the beginning. I\'ve been waiting for you, young prince. I am Mal\'Ganis.', 'Да. Это начало! Я ждал тебя, юный принц. Я Мал\'Ганис.', 14410,0,0,1, '26499'), -(-1594096, 'As you can see, your people are now mine. I will now turn this city, household by household, until the flame of life has been snuffed out forever.', 'Как видишь твои люди отныне принадлежат мне. Дом за домом я порабощу этот город и огонь жизни угаснет здесь навсегда..',14411,0,0,1, '26499'), -(-1594097, 'I will not allow this, Mal\'Ganis. Better these people will die from my hand, than become your slaves after death.', 'Я не допущу этого, Мал\'Ганис. Лучше эти люди погибнут от моей руки, чем станут твоими рабами после смерти.',14296,0,0,5, '26499'), -(-1594098, 'Mal\'Ganis will send his Scourge henchmen to meet us. Skilled warriors and mages go and destroy enemies. I will lead the remaining troops in the purification of Stratholme from infection.', 'Мал\'Ганис отправит своих прислужников из плети навстречу нам. Опытные воины и маги ступайте и уничтожьте врагов. Я возглавлю оставшиеся войска в деле очищения Стратхольма от заразы.',14885,0,0,1, '26499'), +(-1594094, 'This is begining!', 'Это было только начало.', 14295,0,0,1, '26499'), +(-1594095, 'Yes, this is the beginning. I\'ve been waiting for you, young prince. I am Mal\'Ganis.', 'Да, это начало. Я ждал тебя, юный принц. Я Мал\'Ганис.', 14410,0,0,1, '26499'), +(-1594096, 'As you can see, your people are now mine. I will now turn this city, household by household, until the flame of life has been snuffed out forever.', 'Как видишь, твои люди отныне принадлежат мне. Дом за домом я порабощу этот город, и огонь жизни угаснет здесь навсегда...',14411,0,0,1, '26499'), +(-1594097, 'I will not allow this, Mal\'Ganis. Better these people will die from my hand, than become your slaves after death.', 'Я не допущу этого, Мал\'Ганис! Лучше эти люди погибнут от моей руки, чем станут твоими рабами после смерти!',14296,0,0,5, '26499'), +(-1594098, 'Mal\'Ganis will send his Scourge henchmen to meet us. Skilled warriors and mages go and destroy enemies. I will lead the remaining troops in the purification of Stratholme from infection.', 'Мал\'Ганис отправит своих прислужников из Плети навстречу нам. Опытные воины и маги, ступайте и уничтожьте врагов. Я возглавлю оставшиеся войска в деле очищения Стратхольма от заразы.',14885,0,0,1, '26499'), #MEATHOOK -(-1594110, 'Play time!', 'Поиграем?',13428,0,0,0, '26499'), -(-1594111, 'New toys!', 'Новые игрушки.',13429,1,0,0, '26499'), -(-1594112, 'This not fun...', 'Это... Не... Смешно...',13433,1,0,0, '26499'), +(-1594110, 'Play time!', 'Поиграем!',13428,0,0,0, '26499'), +(-1594111, 'New toys!', 'Новые игрушки!',13429,1,0,0, '26499'), +(-1594112, 'This not fun...', 'Это не смешно...',13433,1,0,0, '26499'), (-1594113, 'Boring...', 'Скучно...',13430,1,0,0, '26499'), -(-1594114, 'Why you stop moving?', 'Почему ты не двигаться?',13431,1,0,0, '26499'), -(-1594115, 'Get up! Me not done!', 'Вставай я не закончил...',13432,1,0,0, '26499'), +(-1594114, 'Why you stop moving?', 'Почему ты не двигаться?',13431,1,0,0, '26499'), # ! +(-1594115, 'Get up! Me not done!', 'Вставай! Я не закончил!',13432,1,0,0, '26499'), # ! #SALRAMM -(-1594129, 'You are too late, champion of Lordaeron. The dead shall have their day.', 'Cлишком поздно герои Лордерона! Пришло время мертвых...',0,1,0,0, '26499'), -(-1594130, 'Ah, the entertainment has arrived!', 'Аааааа развлечемся....',0,1,0,0, '26499'), +(-1594129, 'You are too late, champion of Lordaeron. The dead shall have their day.', 'Слишком поздно, герой Лордерона! Пришло время мертвых.',0,1,0,0, '26499'), +(-1594130, 'Ah, the entertainment has arrived!', 'А, развлечемся!',0,1,0,0, '26499'), (-1594131, 'You only advance... the master\'s plan...', 'Вы всего лишь часть плана хозяина...',0,1,0,0, '26499'), (-1594132, 'The fun is just beginning!', 'Веселье только начинается!',0,1,0,0, '26499'), -(-1594133, 'Aah, quality materials!', 'Аааа качественный материал...',0,1,0,0, '26499'), -(-1594134, 'Don\'t worry, I\'ll make good use of you.', 'Не волнуйся я найду куда тебя приспособить...',0,1,0,0, '26499'), +(-1594133, 'Aah, quality materials!', 'Аааа, качественный материал...',0,1,0,0, '26499'), +(-1594134, 'Don\'t worry, I\'ll make good use of you.', 'Не волнуйся, я найду куда тебя приспособить...',0,1,0,0, '26499'), (-1594135, 'I want a sample...', 'Мне нужен образец!',0,1,0,0, '26499'), (-1594136, 'Such strength... it must be mine!', 'Столько силы... Она будет моей....',0,1,0,0, '26499'), (-1594137, 'Your flesh betrays you.', 'Твоя плоть предает тебя!',0,1,0,0, '26499'), (-1594138, 'Say hello to some friends of mine.', 'Познакомтесь с моими друзьями...',0,1,0,0, '26499'), -(-1594139, 'Come, citizen of Stratholme! Meet your saviors.', 'Жители Стратхольма встречайте ваших спасителей...',0,1,0,0, '26499'), +(-1594139, 'Come, citizen of Stratholme! Meet your saviors.', 'Жители Стратхольма, встречайте ваших спасителей...',0,1,0,0, '26499'), (-1594140, 'BOOM! Hahahahah...', 'Бум... Ха-ха-ха-ха...',0,1,0,0, '26499'), (-1594141, 'Blood... destruction... EXHILARATING!', 'Кровь... Разрушение... Восхитительно...',0,1,0,0, '26499'), #ARTHAS - HOUSE -(-1594142, 'Heroes, hurry up, we\'ll meet near town hall. We must fight with Mal\'Ganis on its territory!', 'Герои, поспешите, вcтретимся у городской ратуши. Мы должны сразиться с Мал\'Ганисом на его территории!',14297,1,0,0, '26499'), -(-1594143, 'Follow me, I know the way.', 'Идите за мной я знаю дорогу.',14298,0,0,1, '26499'), -(-1594144, 'Ah, You\'ve finaly arrived, Prince Arthas. Youre here just in the nick of time.', 'Ах... Наконец вы прибыли, Принц Артас. Вы как раз во время.',0,0,0,1, '26499'), -(-1594145, 'Yes! I\'m glad to get here before plague!', 'Да! Я рад, что я смог добраться сюда раньше чумы!',14299,0,0,1, '26499'), +(-1594142, 'Heroes, hurry up, we\'ll meet near town hall. We must fight with Mal\'Ganis on its territory!', 'Герои, поспешите, встретимся у городской ратуши. Мы должны сразиться с Мал\'Ганисом на его территории!',14297,1,0,0, '26499'), +(-1594143, 'Follow me, I know the way.', 'Идите за мной. Я знаю дорогу.',14298,0,0,1, '26499'), +(-1594144, 'Ah, You\'ve finaly arrived, Prince Arthas. You\'re here just in the nick of time.', 'О, вы наконец-то прибыли, принц Артас. Вы едва успели.',0,0,0,1, '26499'), +(-1594145, 'Yes! I\'m glad to get here before plague!', 'Да! Я рад, что смог добраться сюда раньше чумы.',14299,0,0,1, '26499'), (-1594146, 'What kind of magic is this?', 'Что это за магия?',14300,0,0,0, '26499'), -(-1594147, 'Theres no need for you in understand Arthas. All you need to do is die!', 'Этого не нужно вам понимать Артас. Все что тебе только нужно сделать это умереть!',0,0,0,11, '26499'), -(-1594148, 'Seems that Mal\'Ganis has something else except Scourge. Let\'s hurry.', 'Кажется, что у Мал\'Ганиса в распоряжении есть еще кое что кроме Плети. Давайте поспешим.',14301,0,0,0, '26499'), -(-1594149, 'Dark magic again... Be ready for all.', 'Снова черная магия... Будьте готовы ко всему.',14302,0,0,0, '26499'), +(-1594147, 'Theres no need for you in understand Arthas. All you need to do is die!', 'Тебе и не надо этого понимать, Артас. Все, что от тебя требуется – это умереть.',0,0,0,11, '26499'), +(-1594148, 'Seems that Mal\'Ganis has something else except Scourge. Let\'s hurry.', 'Кажется у Мал\'Ганиса в распоряжении есть еще кое что кроме Плети. Давайте поспешим.',14301,0,0,0, '26499'), +(-1594149, 'Dark magic again... Be ready for all.', 'Снова черная магия... Будьте готовы ко всему!',14302,0,0,0, '26499'), (-1594150, 'Come on.', 'Идем дальше.',14303,0,0,0, '26499'), -(-1594151, 'Be on the alert. We were surrounded.', 'Будьте начеку, наc окружили...',14304,0,0,0, '26499'), -(-1594152, 'Mal\'Ganis doesn\'t want to make our life easier...', 'Мал\'Ганис не собирается облегчить нам жизнь...',14305,0,0,0, '26499'), +(-1594151, 'Be on the alert. We were surrounded.', 'Будьте начеку. Нас окружили.',14304,0,0,0, '26499'), +(-1594152, 'Mal\'Ganis doesn\'t want to make our life easier...', 'Мал\'Ганис не собирается облегчить нам жизнь.',14305,0,0,0, '26499'), (-1594153, 'They are stubborn.', 'Они упрямы.',14306,0,0,0, '26499'), (-1594154, 'What else he will put on my way?', 'Что еще он поставит у меня на пути?',14307,0,0,0, '26499'), -(-1594155, 'Prince Arthas Menethil, in this day mighty evil devoured your soul. Death, which you had to bring to others, today will come for you.', 'Принц Артас Менетил, в этот самый день могущественное зло поглотило твою душу. Смерть которую ты должен был принести другим, сегодня придет за тобой.',13408,0,0,0, '26499'), +(-1594155, 'Prince Arthas Menethil, in this day mighty evil devoured your soul. Death, which you had to bring to others, today will come for you.', 'Принц Артас Менетил, в этот самый день могущественное зло поглотило твою душу. Смерть, которую ты должен был принести другим, сегодня придет за тобой.',13408,0,0,0, '26499'), (-1594156, 'I do for Lordaeron that should, and words and deeds will not stop me.', 'Я делаю для Лордерона то, что должен, и никакие слова и поступки меня не остановят.',14309,0,0,5, '26499'), -(-1594157, 'Let\'s see, youg prince...', 'Ну что ж посмотрим юный принц...',13409,0,0,0, '26499'), +(-1594157, 'Let\'s see, young prince...', 'Ну что ж, посмотрим, юный принц.',13409,0,0,0, '26499'), #Epoch -(-1594119, 'We\'ll see about that, young prince.', 'Аааааааа......',13416,0,0,0, '26499'), +(-1594119, 'We\'ll see about that, young prince.', 'Поcмотрим, молодой принц.',13416,0,0,0, '26499'), (-1594120, 'There is no future for you.', 'У тебя нет будущего...',13413,1,0,0, '26499'), (-1594121, 'This is the hour of our greatest triumph!', 'Пробил час нашего величайшего триумфа..',13414,1,0,0, '26499'), (-1594122, 'You were destined to fail.', 'Тебе было суждено потерпеть поражение...',13415,1,0,0, '26499'), -(-1594123, 'Tick tock, tick tock...', 'Тик - так... Тик - так...',13410,1,0,0, '26499'), +(-1594123, 'Tick tock, tick tock...', 'Тик-так... Тик-так...',13410,1,0,0, '26499'), (-1594124, 'Not quick enough!', 'Слишком медленно...',13411,1,0,0, '26499'), (-1594125, 'Let\'s get this over with.', 'Пора заканчивать...',13412,1,0,0, '26499'), #Street -(-1594158, 'It will take not much time.', 'Это займет совсем не много времени.',14310,0,0,0, '26499'), -(-1594159, 'Thanks Light, backdoor still works!', 'Слава Свету, что потайной ход еще работает!',14311,0,0,0, '26499'), +(-1594158, 'It will take not much time.', 'Это займет совсем немного времени.',14310,0,0,0, '26499'), +(-1594159, 'Thanks Light, backdoor still works!', 'Слава Свету, что потайной ход еще работает.',14311,0,0,0, '26499'), (-1594160, 'Let\'s pass through this area as soon as possible. If we do not perish from the undead, we can die from this fire.', 'Давайте пройдем этот участок как можно быстрее. Если мы не погибнем от нежити, то можем погибнуть от этого огня.',14312,0,0,0, '26499'), -(-1594161, 'Breather a little bit, but keep in mind, we will soon again in the path.', 'Отдышитесь немного, но имейте в виду, нам скоро снова в путь.',14313,0,0,0, '26499'), -(-1594162, 'The rest is over, let\'s go. Mal\'Ganis waits.', 'Отдых окончен надо идти, Мал\'Ганис ждет.',14314,0,0,0, '26499'), -(-1594163, 'Finally, we even like that lucky! The fire has not yet reached the commercial area. Mal\'Ganis should be in Square of Knights, which is not far from here. Tell me when you\'re ready to go.', 'Наконец нам хоть как то повезло! Огонь еще не добрался до торгового ряда. Мал\'Ганис должен быть на площади рыцарей, которая находится недалеко отсюда. Скажите мне как будете готовы идти дальше.',14315,0,0,0, '26499'), +(-1594161, 'Breather a little bit, but keep in mind, we will soon again in the path.', 'Отдышитесь немного. Но имейте в виду, нам скоро снова в путь.',14313,0,0,0, '26499'), +(-1594162, 'The rest is over, let\'s go. Mal\'Ganis waits.', 'Отдых окончен, надо идти. Мал\'Ганис ждет.',14314,0,0,0, '26499'), +(-1594163, 'Finally, we even like that lucky! The fire has not yet reached the commercial area. Mal\'Ganis should be in Square of Knights, which is not far from here. Tell me when you\'re ready to go.', 'Наконец нам хоть как-то повезло. Огонь еще не добрался до Торгового ряда. Мал\'Ганис должен быть на Площади рыцарей, которая находится недалеко отсюда. Скажите мне, как будете готовы идти дальше.',14315,0,0,0, '26499'), (-1594164, 'Let\'s justice will be here.', 'Да свершится правосудие.',14316,0,0,0, '26499'), #malganis -(-1594170, 'This will be a fine test, Prince Arthas.', 'Это будет достойное испытание Принц артас!',14413,1,0,0, '26499'), +(-1594170, 'This will be a fine test, Prince Arthas.', 'Это будет достойное испытание, принц Артас.',14413,1,0,0, '26499'), (-1594171, 'All too easy.', 'Слишком просто...',14416,1,0,0, '26499'), (-1594172, 'The dark lord is displeased with your interference.', 'Темный повелитель не доволен твоим вмешательством...',144107,1,0,0, '26499'), (-1594173, 'It is Prince Arthas I want, not you.', 'Мне нужен Принц Артас, а не ты...',14418,1,0,0, '26499'), (-1594174, 'Anak\'Keri...', 'Анак Кири...',14422,1,0,0, '26499'), -(-1594175, 'My onslaught will wash over the Lich King\'s forces...', 'Мой натиск сметет силы короля - лича...',14423,1,0,0, '26499'), +(-1594175, 'My onslaught will wash over the Lich King\'s forces...', 'Мой натиск сметет силы Короля-Лича...',14423,1,0,0, '26499'), (-1594176, 'Your death is in vain, tiny mortal...', 'Твоя смерть была напрасна насекомое...',14424,1,0,0, '26499'), (-1594177, 'Your time has come to an end!', 'Твое время вышло...',14425,1,0,0, '26499'), (-1594178, '*Struggling sounds* I spent too much time in that weak little shell...', 'Аррррхххх... Я и так провел слишком много времени в этой слабой оболочке...',14426,1,0,0, '26499'), (-1594179, 'I AM MAL\'GANIS! I AM ETERNAL!', 'Ирл Нарат... Я Мал\'Ганис.... Я вечен...',14427,1,0,0, '26499'), (-1594180, 'You\'ll never defeat the Lich King without my forces! I\'ll have my revenge...on him, AND you...', 'Тебе никогда не победить короля - лича без моих войск! Я отомщу и тебе и ему...',14429,1,0,0, '26499'), -(-1594181, 'We\'re going to finish this right now, Mal\'Ganis!', 'Мы покончим с этим сейчас же Мал\'Ганис. Один на один...',14317,0,0,0, '26499'), -(-1594182, 'Your journey has just begun, young prince. Gather your forces, and meet me in the arctic land of Northrend. It is there we shall settle the score between us. It is there that your true destiny will unfold.', 'Твое путешествие начинается юный принц. Собирай свои войска и отправляйся в царство вечных снегов, Нордскол! Там мы уладим все наши дела, там ты узнаешь свою судьбу.',14412,0,0,0, '26499'), -(-1594183, 'I\'ll hunt you to the ends of the earth if I have to! Do you hear me? To the ends of the earth!', 'Я отыщу тебя на краю земли... Ты слышишь меня? На краю земли...',14318,1,0,5, '26499'), -(-1594184, 'You performed well this day. Anything that Mal\'Ganis has left behind is yours. Take it as your reward. I must now begin plans for an expedition to Northrend.', 'Вы славно сражались сегодня! Все что Мал\'Ганис оставил тут - ваша награда. А мне нужно начинать готовиться к экспедиции в Нордскол.',14319,0,0,5, '26499'), +(-1594181, 'We\'re going to finish this right now, Mal\'Ganis!', 'Мы покончим с этим сейчас же, Мал\'Ганис. Один на один.',14317,0,0,0, '26499'), +(-1594182, 'Your journey has just begun, young prince. Gather your forces, and meet me in the arctic land of Northrend. It is there we shall settle the score between us. It is there that your true destiny will unfold.', 'Твое путешествие начинается, юный принц. Собирай свои войска и отправляйся в царство вечных снегов, в Нордскол. Там мы и уладим все наши дела, там ты узнаешь свою судьбу.',14412,0,0,0, '26499'), +(-1594183, 'I\'ll hunt you to the ends of the earth if I have to! Do you hear me? To the ends of the earth!', 'Я отыщу тебя на краю земли! Ты слышишь меня? На краю земли!',14318,1,0,5, '26499'), +(-1594184, 'You performed well this day. Anything that Mal\'Ganis has left behind is yours. Take it as your reward. I must now begin plans for an expedition to Northrend.', 'Вы славно сражались сегодня. Все, что Мал\'Ганис оставил тут – ваша награда. А мне нужно начинать готовиться к экспедиции в Нордскол.',14319,0,0,5, '26499'), (-1594185, 'Time out...', 'Отдохни!',14414,1,0,0, '26499'), (-1594186, 'You seem tired.', 'Ты выглядишь усталым!',14415,1,0,0, '26499'), (-1594187, 'ENOUGH! I waste my time here...I must gather my strength on the home world...', 'Я лишь зря трачу тут свое время. Мне нужно собраться силами в моем родном мире.',14428,1,0,0, '26499'); From de8f23773d3a0637bd84974adb0426fa4381b749 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sat, 19 Jun 2010 17:17:01 +0400 Subject: [PATCH 371/405] Instance Azjol-Nerub (from MaxXx2021) implemented --- addition/732_azjol-nerub_mangos.sql | 10 + .../azjol-nerub/azjol-nerub/azjol-nerub.h | 30 +- .../azjol-nerub/azjol-nerub/boss_anubarak.cpp | 324 +++++++++-- .../azjol-nerub/azjol-nerub/boss_hadronox.cpp | 166 +++++- .../azjol-nerub/azjol-nerub/boss_krikthir.cpp | 537 ++++++++++++++++-- .../azjol-nerub/instance_azjol-nerub.cpp | 30 + 6 files changed, 994 insertions(+), 103 deletions(-) create mode 100644 addition/732_azjol-nerub_mangos.sql diff --git a/addition/732_azjol-nerub_mangos.sql b/addition/732_azjol-nerub_mangos.sql new file mode 100644 index 000000000..e7ec038d5 --- /dev/null +++ b/addition/732_azjol-nerub_mangos.sql @@ -0,0 +1,10 @@ +-- Azjol-Nerub from MaxXx2021 +UPDATE creature_template SET ScriptName = 'npc_watcher_gashra' WHERE entry = 28730; +UPDATE creature_template SET ScriptName = 'npc_watcher_narjil' WHERE entry = 28729; +UPDATE creature_template SET ScriptName = 'boss_krikthir' WHERE entry = 28684; +UPDATE creature_template SET ScriptName = 'npc_watcher_silthik' WHERE entry = 28731; +UPDATE creature_template SET ScriptName = 'boss_hadronox' WHERE entry = 28921; +UPDATE creature_template SET ScriptName = 'npc_anub_ar_warrior' WHERE entry = 28732; +UPDATE creature_template SET ScriptName = 'npc_anub_ar_skirmisher' WHERE entry = 28734; +UPDATE creature_template SET ScriptName = 'npc_anub_ar_shadowcaster' WHERE entry = 28733; +UPDATE creature_template SET ScriptName = 'npc_skittering_infector' WHERE entry = 28736; diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h b/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h index bc62506b9..43666299c 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h +++ b/scripts/northrend/azjol-nerub/azjol-nerub/azjol-nerub.h @@ -1,6 +1,26 @@ /* Copyright (C) 2006 - 2010 ScriptDev2 - * This program is free software licensed under GPL version 2 - * Please see the included DOCS/LICENSE.TXT for more information */ + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + +/* ScriptData +SDName: azjol-nerub +SD%Complete: ?% +SDComment: by MaxXx2021 +SDCategory: Azjol-Nerub instance +EndScriptData */ #ifndef DEF_AZJOL_NERUB_H #define DEF_AZJOL_NERUB_H @@ -16,7 +36,11 @@ enum GO_DOOR_KRIKTHIR = 192395, GO_DOOR_ANUBARAK_1 = 192396, GO_DOOR_ANUBARAK_2 = 192397, - GO_DOOR_ANUBARAK_3 = 192398 + GO_DOOR_ANUBARAK_3 = 192398, + + DATA_WATCHER_GASHRA = 4, + DATA_WATCHER_SILTHIK = 5, + DATA_WATCHER_NARJIL = 6 }; #endif diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp index a7fe3bfbd..d27537f4c 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_anubarak.cpp @@ -14,11 +14,12 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + /* ScriptData -SDName: Boss_Anubarak -SD%Complete: 20% -SDComment: -SDCategory: Azjol'NerubstrInstData +SDName: boss_anubarak +SD%Complete: ?% +SDComment: by MaxXx2021 +SDCategory: Azjol-Nerub instance EndScriptData */ #include "precompiled.h" @@ -26,83 +27,316 @@ EndScriptData */ enum { - SAY_INTRO = -1601014, - SAY_AGGRO = -1601015, - SAY_KILL_1 = -1601016, - SAY_KILL_2 = -1601017, - SAY_KILL_3 = -1601018, - SAY_SUBMERGE_1 = -1601019, - SAY_SUBMERGE_2 = -1601020, - SAY_LOCUST_1 = -1601021, - SAY_LOCUST_2 = -1601022, - SAY_LOCUST_3 = -1601023, - SAY_DEATH = -1601024 + SPELL_CARRION_BEETLES = 53520, + SPELL_SUMMON_CARRION_BEETLES = 53521, + SPELL_LEECHING_SWARM = 53467, + SPELL_IMPALE = 53454, + SPELL_POUND = 53472, + SPELL_SUBMERGE = 53421, + + NPC_GUARDIAN = 29216, + NPC_VENOMANCER = 29217, + NPC_DATTER = 29213, + + 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 +}; + +struct Locations +{ + float x, y, z; + uint32 id; }; -/*###### -## boss_anubarak -######*/ +static Locations SpawnPoint[2] = +{ + {550.7f, 282.8f, 224.3f}, + {551.1f, 229.4f, 224.3f} +}; struct MANGOS_DLL_DECL boss_anubarakAI : public ScriptedAI { - boss_anubarakAI(Creature* pCreature) : ScriptedAI(pCreature) + boss_anubarakAI(Creature *pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Reset(); } - ScriptedInstance* m_pInstance; - bool m_bIsRegularMode; + ScriptedInstance *pInstance; + + bool bChanneling; + bool bGuardianSummoned; + bool bVenomancerSummoned; + bool bDatterSummoned; + uint8 uiPhase; + uint32 uiPhaseTimer; + uint32 uiEmergeTimer; + + uint32 uiCarrionBeetlesTimer; + uint32 uiLeechingSwarmTimer; + uint32 uiImpaleTimer; + uint32 uiPoundTimer; + uint32 uiSubmergeTimer; + uint32 uiUndergroundTimer; + uint32 uiVenomancerTimer; + uint32 uiDatterTimer; + + //SummonList lSummons; void Reset() { + + uiCarrionBeetlesTimer = 8000; + uiLeechingSwarmTimer = 20000; + uiImpaleTimer = 9000; + uiPoundTimer = 15000; + + uiPhase = 0; + uiPhaseTimer = 0; + bChanneling = false; + + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE); + m_creature->RemoveAurasDueToSpell(SPELL_SUBMERGE); + m_creature->SetDisplayId(27856); + + DespawnAll(); + + if (pInstance) + pInstance->SetData(TYPE_ANUBARAK, NOT_STARTED); } - void Aggro(Unit* pWho) + void AttackStart(Unit* who) { - DoScriptText(SAY_AGGRO, m_creature); + if(!who) return; + + if(uiPhase > 0) return; - if (m_pInstance) - m_pInstance->SetData(TYPE_ANUBARAK, IN_PROGRESS); + ScriptedAI::AttackStart(who); } - void KilledUnit(Unit* pVictim) + void DespawnAll() { - switch(urand(0, 2)) - { - case 0: DoScriptText(SAY_KILL_1, m_creature); break; - case 1: DoScriptText(SAY_KILL_2, m_creature); break; - case 2: DoScriptText(SAY_KILL_3, m_creature); break; - } + std::list m_pGuard; + GetCreatureListWithEntryInGrid(m_pGuard, m_creature, NPC_GUARDIAN, DEFAULT_VISIBILITY_INSTANCE); + + if (!m_pGuard.empty()) + for(std::list::iterator itr = m_pGuard.begin(); itr != m_pGuard.end(); ++itr) + { + (*itr)->ForcedDespawn(); + } + + std::list m_pVen; + GetCreatureListWithEntryInGrid(m_pVen, m_creature, NPC_VENOMANCER, DEFAULT_VISIBILITY_INSTANCE); + + if (!m_pVen.empty()) + for(std::list::iterator iter = m_pVen.begin(); iter != m_pVen.end(); ++iter) + { + (*iter)->ForcedDespawn(); + } + + std::list m_pDat; + GetCreatureListWithEntryInGrid(m_pDat, m_creature, NPC_DATTER, DEFAULT_VISIBILITY_INSTANCE); + + if (!m_pDat.empty()) + for(std::list::iterator iter = m_pDat.begin(); iter != m_pDat.end(); ++iter) + { + (*iter)->ForcedDespawn(); + } } - void JustDied(Unit* pKiller) + void EnterCombat(Unit *pWho) { - DoScriptText(SAY_DEATH, m_creature); + DoScriptText(SAY_AGGRO, m_creature); - if (m_pInstance) - m_pInstance->SetData(TYPE_ANUBARAK, DONE); + if (pInstance) + pInstance->SetData(TYPE_ANUBARAK, IN_PROGRESS); } - void JustReachedHome() + void NextPhase() { - if (m_pInstance) - m_pInstance->SetData(TYPE_ANUBARAK, NOT_STARTED); + m_creature->InterruptNonMeleeSpells(false); + ++uiPhaseTimer; + + bGuardianSummoned = false; + bVenomancerSummoned = false; + bDatterSummoned = false; + + uiUndergroundTimer = 40000; + uiVenomancerTimer = 25000; + uiDatterTimer = 32000; + + DoCast(m_creature, SPELL_SUBMERGE); + + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE); + + uiPhase = 1; } - void UpdateAI(const uint32 uiDiff) + void UpdateAI(const uint32 diff) { + //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - DoMeleeAttackIfReady(); + if (bChanneling == true) + { + for (uint8 i = 0; i < 4; ++i) + DoCast(m_creature->getVictim(), SPELL_SUMMON_CARRION_BEETLES, true); + bChanneling = false; + } + + if (uiPhase == 1) + { + if (uiImpaleTimer <= diff) + { + if(m_creature->HasAura(SPELL_SUBMERGE)) + { + m_creature->RemoveAurasDueToSpell(SPELL_SUBMERGE); + m_creature->SetDisplayId(11686); + m_creature->StopMoving(); + m_creature->GetMotionMaster()->Clear(false); + m_creature->GetMotionMaster()->MoveIdle(); + } + if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCast(pTarget, SPELL_IMPALE); + uiImpaleTimer = 9000; + } else uiImpaleTimer -= diff; + + if (!bGuardianSummoned) + { + for (uint8 i = 0; i < 2; ++i) + { + if (Creature *Guardian = m_creature->SummonCreature(NPC_GUARDIAN,SpawnPoint[i].x,SpawnPoint[i].y,SpawnPoint[i].z,0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,30000)) + { + Guardian->AddThreat(m_creature->getVictim(), 0.0f); + Guardian->SetInCombatWithZone(); + } + } + bGuardianSummoned = true; + } + + if (!bVenomancerSummoned) + { + if (uiVenomancerTimer <= diff) + { + if (uiPhaseTimer > 1) + { + for (uint8 i = 0; i < 2; ++i) + { + if (Creature *Venomancer = m_creature->SummonCreature(NPC_VENOMANCER,SpawnPoint[i].x,SpawnPoint[i].y,SpawnPoint[i].z,0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,30000)) + { + Venomancer->AddThreat(m_creature->getVictim(), 0.0f); + Venomancer->SetInCombatWithZone(); + } + } + bVenomancerSummoned = true; + } + } else uiVenomancerTimer -= diff; + } + + if (!bDatterSummoned) + { + if (uiDatterTimer <= diff) + { + if (uiPhaseTimer > 2) + { + for (uint8 i = 0; i < 2; ++i) + { + if (Creature *Datter = m_creature->SummonCreature(NPC_DATTER,SpawnPoint[i].x,SpawnPoint[i].y,SpawnPoint[i].z,0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,30000)) + { + Datter->AddThreat(m_creature->getVictim(), 0.0f); + Datter->SetInCombatWithZone(); + } + } + bDatterSummoned = true; + } + } else uiDatterTimer -= diff; + } + + if (uiUndergroundTimer <= diff) + { + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetDisplayId(27856); + DoCast(m_creature, 50142); + uiEmergeTimer = 2000; + uiPhase = 2; + } else uiUndergroundTimer -= diff; + } + + if (uiPhase == 2) + { + if (uiEmergeTimer <= diff) + { + uiPhase = 0; + m_creature->RemoveAurasDueToSpell(50142); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + } else uiEmergeTimer -= diff; + } + + if (uiPhase == 0) + { + if (uiLeechingSwarmTimer <= diff) + { + DoCast(m_creature, SPELL_LEECHING_SWARM); + uiLeechingSwarmTimer = 19000; + } else uiLeechingSwarmTimer -= diff; + + if (uiCarrionBeetlesTimer <= diff) + { + bChanneling = true; + DoCast(m_creature->getVictim(), SPELL_CARRION_BEETLES); + uiCarrionBeetlesTimer = 25000; + } else uiCarrionBeetlesTimer -= diff; + + if (uiPoundTimer <= diff) + { + DoCast(m_creature->getVictim(), SPELL_POUND); + uiPoundTimer = 16500; + } else uiPoundTimer -= diff; + + DoMeleeAttackIfReady(); + } + + if(uiPhaseTimer == 0 && m_creature->GetHealthPercent() < 75.0f) + NextPhase(); + + if(uiPhaseTimer == 1 && m_creature->GetHealthPercent() < 50.0f) + NextPhase(); + + if(uiPhaseTimer == 2 && m_creature->GetHealthPercent() < 25.0f) + NextPhase(); + } + + void JustDied(Unit *pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + + if (pInstance) + pInstance->SetData(TYPE_ANUBARAK, DONE); + } + + void KilledUnit(Unit *pVictim) + { + if (pVictim == m_creature) + return; + + DoScriptText(urand(SAY_SLAY_1,SAY_SLAY_2), m_creature); } + }; -CreatureAI* GetAI_boss_anubarak(Creature* pCreature) +CreatureAI* GetAI_boss_anubarak(Creature *pCreature) { - return new boss_anubarakAI(pCreature); + return new boss_anubarakAI (pCreature); } void AddSC_boss_anubarak() diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp index 22074a7a2..7ebae5e67 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_hadronox.cpp @@ -14,58 +14,190 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + /* ScriptData -SDName: Boss_Hadronox -SD%Complete: 20% -SDComment: -SDCategory: Azjol'Nerub +SDName: boss_hadronox +SD%Complete: ?% +SDComment: by MaxXx2021 +SDCategory: Azjol-Nerub instance EndScriptData */ +/* +* Comment: No Waves atm and the doors spells are crazy... +* +* When your group enters the main room (the one after the bridge), you will notice a group of 3 Nerubians. +* When you engage them, 2 more groups like this one spawn behind the first one - it is important to pull the first group back, +* so you don't aggro all 3. Hadronox will be under you, fighting Nerubians. +* +* This is the timed gauntlet - waves of non-elite spiders +* will spawn from the 3 doors located a little above the main room, and will then head down to fight Hadronox. After clearing the +* main room, it is recommended to just stay in it, kill the occasional non-elites that will attack you instead of the boss, and wait for +* Hadronox to make his way to you. When Hadronox enters the main room, she will web the doors, and no more non-elites will spawn. +*/ #include "precompiled.h" #include "azjol-nerub.h" enum { - + SPELL_ACID_CLOUD = 53400, // Victim + SPELL_LEECH_POISON = 53030, // Victim + SPELL_PIERCE_ARMOR = 53418, // Victim + SPELL_WEB_GRAB = 57731, // Victim + SPELL_WEB_FRONT_DOORS = 53177, // Self + SPELL_WEB_SIDE_DOORS = 53185, // Self }; -/*###### -## boss_hadronox -######*/ - struct MANGOS_DLL_DECL boss_hadronoxAI : public ScriptedAI { boss_hadronoxAI(Creature* pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Reset(); + bFirstTime = true; } - ScriptedInstance* m_pInstance; - bool m_bIsRegularMode; + ScriptedInstance* pInstance; + + uint32 uiAcidTimer; + uint32 uiLeechTimer; + uint32 uiPierceTimer; + uint32 uiGrabTimer; + uint32 uiDoorsTimer; + uint32 uiCheckDistanceTimer; + + bool bFirstTime; + + float fMaxDistance; void Reset() { + m_creature->SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, 9.0f); + m_creature->SetFloatValue(UNIT_FIELD_COMBATREACH, 9.0f); + + uiAcidTimer = urand(10000,14000); + uiLeechTimer = urand(3000,9000); + uiPierceTimer = urand(1000,3000); + uiGrabTimer = urand(15000,19000); + uiDoorsTimer = urand(20000,30000); + uiCheckDistanceTimer = 2000; + + fMaxDistance = 50.0f; + + if (pInstance && (pInstance->GetData(TYPE_HADRONOX) != DONE && !bFirstTime)) + pInstance->SetData(TYPE_HADRONOX, FAIL); + + bFirstTime = false; + } + + //when Hadronox kills any enemy (that includes a party member) she will regain 10% of her HP if the target had Leech Poison on + void KilledUnit(Unit* Victim) + { + // not sure if this aura check is correct, I think it is though + if (!Victim || !Victim->HasAura(SPELL_LEECH_POISON) || !m_creature->isAlive()) + return; + + uint32 health = m_creature->GetMaxHealth()/10; + + if ((m_creature->GetHealth()+health) >= m_creature->GetMaxHealth()) + m_creature->SetHealth(m_creature->GetMaxHealth()); + else + m_creature->SetHealth(m_creature->GetHealth()+health); + } + + void JustDied(Unit* Killer) + { + if (pInstance) + pInstance->SetData(TYPE_HADRONOX, DONE); } - void KilledUnit(Unit* pVictim) + void EnterCombat(Unit* who) { - m_creature->SetHealth(m_creature->GetHealth() + (m_creature->GetMaxHealth() * 0.1)); + if (pInstance) + pInstance->SetData(TYPE_HADRONOX, IN_PROGRESS); + m_creature->SetInCombatWithZone(); } - void UpdateAI(const uint32 uiDiff) + void CheckDistance(float dist, const uint32 uiDiff) { + if (!m_creature->isInCombat()) + return; + + float x=0.0f, y=0.0f, z=0.0f; + m_creature->GetRespawnCoord(x,y,z); + + if (uiCheckDistanceTimer <= uiDiff) + uiCheckDistanceTimer = 5000; + else + { + uiCheckDistanceTimer -= uiDiff; + return; + } + if (m_creature->IsInEvadeMode() || !m_creature->getVictim()) + return; + if (m_creature->GetDistance(x,y,z) > dist) + EnterEvadeMode(); + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + // Without he comes up through the air to players on the bridge after krikthir if players crossing this bridge! + CheckDistance(fMaxDistance, diff); + + if (m_creature->HasAura(SPELL_WEB_FRONT_DOORS) || m_creature->HasAura(SPELL_WEB_SIDE_DOORS)) + { + if (IsCombatMovement()) + SetCombatMovement(false); + } + else if (!IsCombatMovement()) + SetCombatMovement(true); + + if (uiPierceTimer <= diff) + { + DoCast(m_creature->getVictim(), SPELL_PIERCE_ARMOR); + uiPierceTimer = 8000; + } else uiPierceTimer -= diff; + + if (uiAcidTimer <= diff) + { + if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCast(pTarget, SPELL_ACID_CLOUD); + + uiAcidTimer = urand(20000,30000); + } else uiAcidTimer -= diff; + + if (uiLeechTimer <= diff) + { + if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCast(pTarget, SPELL_LEECH_POISON); + + uiLeechTimer = urand(11000,14000); + } else uiLeechTimer -= diff; + + if (uiGrabTimer <= diff) + { + if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) // Draws all players (and attacking Mobs) to itself. + DoCast(pTarget, SPELL_WEB_GRAB); + + uiGrabTimer = urand(15000,30000); + } else uiGrabTimer -= diff; + + if (uiDoorsTimer <= diff) + { + //DoCast(me, urand(SPELL_WEB_FRONT_DOORS, SPELL_WEB_SIDE_DOORS)); + uiDoorsTimer = urand(30000,60000); + } else uiDoorsTimer -= diff; + DoMeleeAttackIfReady(); } }; CreatureAI* GetAI_boss_hadronox(Creature* pCreature) { - return new boss_hadronoxAI(pCreature); + return new boss_hadronoxAI (pCreature); } void AddSC_boss_hadronox() diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp index 0f656599a..f3e837063 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/boss_krikthir.cpp @@ -14,83 +14,478 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + /* ScriptData -SDName: Boss_Krikthir -SD%Complete: 20% -SDComment: -SDCategory: Azjol'Nerub +SDName: boss_krikthir +SD%Complete: ?% +SDComment: by MaxXx2021 +SDCategory: Azjol-Nerub instance EndScriptData */ #include "precompiled.h" #include "azjol-nerub.h" -enum -{ - SAY_AGGRO = -1601000, - SAY_KILL_1 = -1601001, - SAY_KILL_2 = -1601002, - SAY_KILL_3 = -1601003, - SAY_SEND_GROUP_1 = -1601004, - SAY_SEND_GROUP_2 = -1601005, - SAY_SEND_GROUP_3 = -1601006, - SAY_PREFIGHT_1 = -1601007, - SAY_PREFIGHT_2 = -1601008, - SAY_PREFIGHT_3 = -1601009, - SAY_SWARM_1 = -1601010, - SAY_SWARM_2 = -1601011, - SAY_DEATH = -1601012, - EMOTE_BOSS_GENERIC_FRENZY = -1000005 +enum Spells +{ + SPELL_MIND_FLAY = 52586, + H_SPELL_MIND_FLAY = 59367, + SPELL_CURSE_OF_FATIGUE = 52592, + H_SPELL_CURSE_OF_FATIGUE = 59368, + SPELL_FRENZY = 28747, //maybe 53361 + SPELL_SUMMON_SKITTERING_SWARMER = 52438, //AOE Effect 140, maybe 52439 + SPELL_SUMMON_SKITTERING_SWARMER_1 = 52439, //Summon 3x 28735 + H_SPELL_ACID_SPLASH = 59363, + SPELL_ACID_SPLASH = 52446, + SPELL_CHARGE = 16979,//maybe is another spell + SPELL_BACKSTAB = 52540, + SPELL_SHADOW_BOLT = 52534, + H_SPELL_SHADOW_BOLT = 59357, + SPELL_SHADOW_NOVA = 52535, + H_SPELL_SHADOW_NOVA = 59358, + SPELL_STRIKE = 52532, + SPELL_CLEAVE = 49806, + SPELL_ENRAGE = 52470, + SPELL_INFECTED_BITE = 52469, + H_SPELL_INFECTED_BITE = 59364, + SPELL_WEB_WRAP = 52086,//the spell is not working properly + SPELL_BLINDING_WEBS = 52524, + H_SPELL_BLINDING_WEBS = 59365, + SPELL_POSION_SPRAY = 52493, + H_SPELL_POSION_SPRAY = 59366, + + MOB_SKITTERING_SWARMER = 28735, + MOB_SKITTERING_SWARMER_CONTROLLER = 32593, + MOB_SKITTERING_INFECTIOR = 28736, + + 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, + + ACHIEV_WATH_HIM_DIE = 1296 }; -/*###### -## boss_krikthir -######*/ +struct Locations +{ + float x, y, z, o; + uint32 id; +}; +static Locations SpawnPoint[8] = +{ + {566.164f, 682.087f, 769.079f, 2.21f}, + {529.042f, 706.941f, 777.298f, 1.08f}, + {489.975f, 671.239f, 772.131f, 0.26f}, + {488.556f, 692.950f, 771.764f, 4.88f}, + {553.340f, 640.387f, 777.419f, 1.20f}, + {517.486f, 706.398f, 777.335f, 5.35f}, + {504.010f, 637.693f, 777.479f, 0.50f}, + {552.625f, 706.408f, 777.177f, 3.43f} +}; struct MANGOS_DLL_DECL boss_krikthirAI : public ScriptedAI { - boss_krikthirAI(Creature* pCreature) : ScriptedAI(pCreature) + boss_krikthirAI(Creature *pCreature) : ScriptedAI(pCreature) { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Reset(); } - ScriptedInstance* m_pInstance; - bool m_bIsRegularMode; + ScriptedInstance* pInstance; + + uint32 uiMindFlayTimer; + uint32 uiCurseFatigueTimer; + uint32 uiSummonTimer; void Reset() { + uiMindFlayTimer = 15000; + uiCurseFatigueTimer = 12000; + + if (pInstance) + pInstance->SetData(TYPE_KRIKTHIR, NOT_STARTED); } - void Aggro(Unit* pWho) + void EnterCombat(Unit* who) { DoScriptText(SAY_AGGRO, m_creature); + Summon(); + uiSummonTimer = 15000; + + if (pInstance) + pInstance->SetData(TYPE_KRIKTHIR, IN_PROGRESS); + } + + void Summon() + { + m_creature->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[0].x,SpawnPoint[0].y,SpawnPoint[0].z,SpawnPoint[0].o,TEMPSUMMON_CORPSE_TIMED_DESPAWN,25000); + m_creature->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[0].x,SpawnPoint[0].y,SpawnPoint[0].z,SpawnPoint[0].o,TEMPSUMMON_CORPSE_TIMED_DESPAWN,25000); + m_creature->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[1].x,SpawnPoint[1].y,SpawnPoint[1].z,SpawnPoint[1].o,TEMPSUMMON_CORPSE_TIMED_DESPAWN,25000); + m_creature->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[1].x,SpawnPoint[1].y,SpawnPoint[1].z,SpawnPoint[1].o,TEMPSUMMON_CORPSE_TIMED_DESPAWN,25000); + m_creature->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[2].x,SpawnPoint[2].y,SpawnPoint[2].z,SpawnPoint[2].o,TEMPSUMMON_CORPSE_TIMED_DESPAWN,25000); + m_creature->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[2].x,SpawnPoint[2].y,SpawnPoint[2].z,SpawnPoint[2].o,TEMPSUMMON_CORPSE_TIMED_DESPAWN,25000); + m_creature->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[3].x,SpawnPoint[3].y,SpawnPoint[3].z,SpawnPoint[3].o,TEMPSUMMON_CORPSE_TIMED_DESPAWN,25000); + m_creature->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[3].x,SpawnPoint[3].y,SpawnPoint[3].z,SpawnPoint[3].o,TEMPSUMMON_CORPSE_TIMED_DESPAWN,25000); + m_creature->SummonCreature(MOB_SKITTERING_INFECTIOR,SpawnPoint[4].x,SpawnPoint[4].y,SpawnPoint[4].z,SpawnPoint[4].o,TEMPSUMMON_CORPSE_TIMED_DESPAWN,25000); + m_creature->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[4].x,SpawnPoint[4].y,SpawnPoint[4].z,SpawnPoint[4].o,TEMPSUMMON_CORPSE_TIMED_DESPAWN,25000); + m_creature->SummonCreature(MOB_SKITTERING_INFECTIOR,SpawnPoint[5].x,SpawnPoint[5].y,SpawnPoint[5].z,SpawnPoint[5].o,TEMPSUMMON_CORPSE_TIMED_DESPAWN,25000); + m_creature->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[5].x,SpawnPoint[5].y,SpawnPoint[5].z,SpawnPoint[5].o,TEMPSUMMON_CORPSE_TIMED_DESPAWN,25000); + m_creature->SummonCreature(MOB_SKITTERING_INFECTIOR,SpawnPoint[6].x,SpawnPoint[6].y,SpawnPoint[6].z,SpawnPoint[6].o,TEMPSUMMON_CORPSE_TIMED_DESPAWN,25000); + m_creature->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[6].x,SpawnPoint[6].y,SpawnPoint[6].z,SpawnPoint[6].o,TEMPSUMMON_CORPSE_TIMED_DESPAWN,25000); + m_creature->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[7].x,SpawnPoint[7].y,SpawnPoint[7].z,SpawnPoint[7].o,TEMPSUMMON_CORPSE_TIMED_DESPAWN,25000); + m_creature->SummonCreature(MOB_SKITTERING_SWARMER,SpawnPoint[7].x,SpawnPoint[7].y,SpawnPoint[7].z,SpawnPoint[7].o,TEMPSUMMON_CORPSE_TIMED_DESPAWN,25000); } - void KilledUnit(Unit* pVictim) + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (uiSummonTimer <= diff) + { + Summon(); + uiSummonTimer = 15000; + } else uiSummonTimer -= diff; + + if (uiMindFlayTimer <= diff) + { + DoCast(m_creature->getVictim(), SPELL_MIND_FLAY); + uiMindFlayTimer = 15000; + } else uiMindFlayTimer -= diff; + + if (uiCurseFatigueTimer <= diff) + { + //WowWiki say "Curse of Fatigue-Kirk'thir will cast Curse of Fatigue on 2-3 targets periodically." + if(Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCast(pTarget, SPELL_CURSE_OF_FATIGUE); + if(Unit *pTarget_1 = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCast(pTarget_1, SPELL_CURSE_OF_FATIGUE); + + uiCurseFatigueTimer = 10000; + } else uiCurseFatigueTimer -= diff; + + if (!m_creature->HasAura(SPELL_FRENZY) && m_creature->GetHealthPercent() < 10.0f) + DoCast(m_creature, SPELL_FRENZY); + + DoMeleeAttackIfReady(); + } + void JustDied(Unit* killer) { - switch(urand(0, 2)) + DoScriptText(SAY_DEATH, m_creature); + + if (pInstance) { - case 0: DoScriptText(SAY_KILL_1, m_creature); break; - case 1: DoScriptText(SAY_KILL_2, m_creature); break; - case 2: DoScriptText(SAY_KILL_3, m_creature); break; + pInstance->SetData(TYPE_KRIKTHIR, DONE); + //Achievement: Watch him die + //Creature *pAdd1, *pAdd2, *pAdd3; + //if ((pAdd1 = pInstance->instance->GetCreature(pInstance->GetData64(DATA_WATCHER_GASHRA))) && pAdd1->isAlive() && + //(pAdd2 = pInstance->instance->GetCreature(pInstance->GetData64(DATA_WATCHER_SILTHIK))) && pAdd2->isAlive() && + //(pAdd3 = pInstance->instance->GetCreature(pInstance->GetData64(DATA_WATCHER_NARJIL))) && pAdd3->isAlive() && + //m_bIsRegularMode) + //pInstance->DoCompleteAchievement(ACHIEV_WATH_HIM_DIE); } } + void KilledUnit(Unit *victim) + { + if (victim == m_creature) + return; + + DoScriptText(urand(SAY_SLAY_1,SAY_SLAY_2), m_creature); + } - void JustDied(Unit* pKiller) + void JustSummoned(Creature* summoned) { - DoScriptText(SAY_DEATH, m_creature); + summoned->GetMotionMaster()->MovePoint(0,m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ()); + } +}; + +struct MANGOS_DLL_DECL npc_skittering_infectorAI : public ScriptedAI +{ + npc_skittering_infectorAI(Creature *pCreature) : ScriptedAI(pCreature) + { + Reset(); + } - if (m_pInstance) - m_pInstance->SetData(TYPE_KRIKTHIR, DONE); + void Reset() + { + } + + void JustDied(Unit* killer) + { + DoCast(m_creature->getVictim(), SPELL_ACID_SPLASH); } void UpdateAI(const uint32 uiDiff) + { + DoMeleeAttackIfReady(); + return; + } +}; + +CreatureAI* GetAI_npc_skittering_infector(Creature* pCreature) +{ + return new npc_skittering_infectorAI(pCreature); +} + +struct MANGOS_DLL_DECL npc_anub_ar_skirmisherAI : public ScriptedAI +{ + npc_anub_ar_skirmisherAI(Creature *c) : ScriptedAI(c) + { + Reset(); + } + + uint32 uiChargeTimer; + uint32 uiBackstabTimer; + + void Reset() + { + uiChargeTimer = 11000; + uiBackstabTimer = 7000; + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (uiChargeTimer <= diff) + { + if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + DoResetThreat(); + m_creature->AddThreat(pTarget,1.0f); + DoCast(pTarget, SPELL_CHARGE, true); + } + uiChargeTimer = 15000; + } else uiChargeTimer -= diff; + + if (uiBackstabTimer <= diff) + { + DoCast(m_creature->getVictim(), SPELL_BACKSTAB); + uiBackstabTimer = 12000; + } else uiBackstabTimer -= diff; + + DoMeleeAttackIfReady(); + + } +}; + +struct MANGOS_DLL_DECL npc_anub_ar_shadowcasterAI : public ScriptedAI +{ + npc_anub_ar_shadowcasterAI(Creature *pCreature) : ScriptedAI(pCreature) + { + Reset(); + } + + uint32 uiShadowBoltTimer; + uint32 uiShadowNovaTimer; + + void Reset() + { + uiShadowBoltTimer = 6000; + uiShadowNovaTimer = 15000; + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (uiShadowBoltTimer <= diff) + { + if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCast(pTarget, SPELL_SHADOW_BOLT); + uiShadowBoltTimer = 15000; + } else uiShadowBoltTimer -= diff; + + if (uiShadowNovaTimer <= diff) + { + DoCast(m_creature->getVictim(), SPELL_SHADOW_NOVA); + uiShadowNovaTimer = 17000; + } else uiShadowNovaTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +struct MANGOS_DLL_DECL npc_anub_ar_warriorAI : public ScriptedAI +{ + npc_anub_ar_warriorAI(Creature *c) : ScriptedAI(c){ Reset(); } + + uint32 uiCleaveTimer; + uint32 uiStrikeTimer; + + void Reset() + { + uiCleaveTimer = 11000; + uiStrikeTimer = 6000; + } + + void UpdateAI(const uint32 diff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (uiStrikeTimer <= diff) + { + DoCast(m_creature->getVictim(), SPELL_STRIKE, true); + uiStrikeTimer = 15000; + } else uiStrikeTimer -= diff; + + if (uiCleaveTimer <= diff) + { + DoCast(m_creature->getVictim(), SPELL_CLEAVE, true); + uiCleaveTimer = 17000; + } else uiCleaveTimer -= diff; + DoMeleeAttackIfReady(); + + } + +}; + +struct MANGOS_DLL_DECL npc_watcher_gashraAI : public ScriptedAI +{ + npc_watcher_gashraAI(Creature *pCreature) : ScriptedAI(pCreature) + { + Reset(); + } + + uint32 uiWebWrapTimer; + uint32 uiInfectedBiteTimer; + + void Reset() + { + uiWebWrapTimer = 11000; + uiInfectedBiteTimer = 4000; + } + + void EnterCombat(Unit* who) + { + DoCast(m_creature, SPELL_ENRAGE, true); + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (uiWebWrapTimer <= diff) + { + if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCast(pTarget, SPELL_WEB_WRAP); + uiWebWrapTimer = 17000; + } else uiWebWrapTimer -= diff; + + if (uiInfectedBiteTimer <= diff) + { + DoCast(m_creature->getVictim(), SPELL_INFECTED_BITE); + uiInfectedBiteTimer = 15000; + } else uiInfectedBiteTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +struct MANGOS_DLL_DECL npc_watcher_narjilAI : public ScriptedAI +{ + npc_watcher_narjilAI(Creature *pCreature) : ScriptedAI(pCreature) + { + Reset(); + } + + uint32 uiWebWrapTimer; + uint32 uiInfectedBiteTimer; + uint32 uiBindingWebsTimer; + + void Reset() + { + uiWebWrapTimer = 11000; + uiInfectedBiteTimer = 4000; + uiBindingWebsTimer = 17000; + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (uiWebWrapTimer <= diff) + { + if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCast(pTarget, SPELL_WEB_WRAP); + uiWebWrapTimer = 15000; + } else uiWebWrapTimer -= diff; + + if (uiInfectedBiteTimer <= diff) + { + DoCast(m_creature->getVictim(), SPELL_INFECTED_BITE); + uiInfectedBiteTimer = 11000; + } else uiInfectedBiteTimer -= diff; + + if (uiBindingWebsTimer <= diff) + { + DoCast(m_creature->getVictim(), SPELL_BLINDING_WEBS); + uiBindingWebsTimer = 17000; + } else uiBindingWebsTimer -= diff; + + DoMeleeAttackIfReady(); + } +}; + +struct MANGOS_DLL_DECL npc_watcher_silthikAI : public ScriptedAI +{ + npc_watcher_silthikAI(Creature *pCreature) : ScriptedAI(pCreature) + { + Reset(); + } + + uint32 uiWebWrapTimer; + uint32 uiInfectedBiteTimer; + uint32 uiPoisonSprayTimer; + + void Reset() + { + uiWebWrapTimer = 11000; + uiInfectedBiteTimer = 4000; + uiPoisonSprayTimer = 15000; + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (uiWebWrapTimer <= diff) + { + if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCast(pTarget, SPELL_WEB_WRAP); + + uiWebWrapTimer = 15000; + } else uiWebWrapTimer -= diff; + + if (uiInfectedBiteTimer <= diff) + { + DoCast(m_creature->getVictim(), SPELL_INFECTED_BITE); + uiInfectedBiteTimer = 15000; + } else uiInfectedBiteTimer -= diff; + + if (uiPoisonSprayTimer <= diff) + { + DoCast(m_creature->getVictim(), SPELL_POSION_SPRAY); + uiPoisonSprayTimer = 17000; + } else uiPoisonSprayTimer -= diff; + + DoMeleeAttackIfReady(); + } }; @@ -99,6 +494,36 @@ CreatureAI* GetAI_boss_krikthir(Creature* pCreature) return new boss_krikthirAI(pCreature); } +CreatureAI* GetAI_npc_anub_ar_skirmisher(Creature* pCreature) +{ + return new npc_anub_ar_skirmisherAI(pCreature); +} + +CreatureAI* GetAI_npc_anub_ar_shadowcaster(Creature* pCreature) +{ + return new npc_anub_ar_shadowcasterAI(pCreature); +} + +CreatureAI* GetAI_npc_anub_ar_warrior(Creature* pCreature) +{ + return new npc_anub_ar_warriorAI(pCreature); +} + +CreatureAI* GetAI_npc_watcher_gashra(Creature* pCreature) +{ + return new npc_watcher_gashraAI(pCreature); +} + +CreatureAI* GetAI_npc_watcher_narjil(Creature* pCreature) +{ + return new npc_watcher_narjilAI(pCreature); +} + +CreatureAI* GetAI_npc_watcher_silthik(Creature* pCreature) +{ + return new npc_watcher_silthikAI(pCreature); +} + void AddSC_boss_krikthir() { Script *newscript; @@ -107,4 +532,40 @@ void AddSC_boss_krikthir() newscript->Name = "boss_krikthir"; newscript->GetAI = &GetAI_boss_krikthir; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_skittering_infector"; + newscript->GetAI = &GetAI_npc_skittering_infector; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_anub_ar_skirmisher"; + newscript->GetAI = &GetAI_npc_anub_ar_skirmisher; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_anub_ar_shadowcaster"; + newscript->GetAI = &GetAI_npc_anub_ar_shadowcaster; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_watcher_gashra"; + newscript->GetAI = &GetAI_npc_watcher_gashra; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_anub_ar_warrior"; + newscript->GetAI = &GetAI_npc_anub_ar_warrior; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_watcher_silthik"; + newscript->GetAI = &GetAI_npc_watcher_silthik; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_watcher_narjil"; + newscript->GetAI = &GetAI_npc_watcher_narjil; + newscript->RegisterSelf(); } + diff --git a/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp b/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp index ca8839bad..d51a9c45e 100644 --- a/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp +++ b/scripts/northrend/azjol-nerub/azjol-nerub/instance_azjol-nerub.cpp @@ -36,6 +36,10 @@ struct MANGOS_DLL_DECL instance_azjol_nerub : public ScriptedInstance uint64 m_uiDoor_Anubarak_2GUID; uint64 m_uiDoor_Anubarak_3GUID; + uint64 uiWatcherGashra; + uint64 uiWatcherSilthik; + uint64 uiWatcherNarjil; + void Initialize() { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); @@ -44,6 +48,10 @@ struct MANGOS_DLL_DECL instance_azjol_nerub : public ScriptedInstance m_uiDoor_Anubarak_1GUID = 0; m_uiDoor_Anubarak_2GUID = 0; m_uiDoor_Anubarak_3GUID = 0; + + uiWatcherGashra = 0; + uiWatcherSilthik = 0; + uiWatcherNarjil = 0; } void OnObjectCreate(GameObject* pGo) @@ -73,6 +81,28 @@ struct MANGOS_DLL_DECL instance_azjol_nerub : public ScriptedInstance } } + void OnCreatureCreate(Creature* pCreature) + { + switch(pCreature->GetEntry()) + { + case 28730: uiWatcherGashra = pCreature->GetGUID(); break; + case 28731: uiWatcherSilthik = pCreature->GetGUID(); break; + case 28729: uiWatcherNarjil = pCreature->GetGUID(); break; + } + } + + uint64 GetData64(uint32 identifier) + { + switch(identifier) + { + case DATA_WATCHER_GASHRA: return uiWatcherGashra; + case DATA_WATCHER_SILTHIK: return uiWatcherSilthik; + case DATA_WATCHER_NARJIL: return uiWatcherNarjil; + } + + return 0; + } + void SetData(uint32 uiType, uint32 uiData) { switch(uiType) From 835d5f653ea0e4f848134db973fa34ee386c4223 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sat, 19 Jun 2010 19:34:17 +0400 Subject: [PATCH 372/405] Readme correct --- README | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/README b/README index ed803da8f..557ede72f 100644 --- a/README +++ b/README @@ -21,18 +21,20 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA In this repository you found this custom scripts: - many scripts from Insider42 -- Ulduar (by Insider42, small correct by me) -- Trial of the Champion ( by Syntec, big rewrite by me) +- Ulduar (base from Syntec, rewrite by Insider42 and me) +- Trial of the Champion (by Syntec, big rewrite by me) - Violet hold (by ckegg, big rewrite by me) - Naxxramas (by ckegg) - An'kahet (by Tassadar) - Draktaron (by Tassadar) -- Culling of Stratholme (by Maxxx2021) -- Obsidian Sanctum (by Maxxx2021) +- Culling of Stratholme (by MaxXx2021) +- Obsidian Sanctum (by MaxXx2021) +- Azjol-Nerub (by MaxXx2021) +- Forge of souls (by Maxxx2021 and me) - Vault of Archavon (by Insider42) - Trial of the Crusader (by me) - Halls of reflection (partially, by me) -- Icecrown Citadel (by me) +- Icecrown Citadel (alfatesting phase, by me) - Ruby Sanctum (placeholders, by me) - NPC special (by me, thanks for all) @@ -42,6 +44,8 @@ If you want compile this branch on Windows, please convert Makefile to your c++ Thanks to: - Vladimir Mangos - MaNGOS project; - Insider42 - for your work; +- MaxXx2021 aka Mioka - for your scripts; +- Tassadar; - griffonheart (original texts/sounds for TOC); - Cristy (re-translation to english); - Selector - Faction champions base script, testing, bugreports; @@ -50,3 +54,9 @@ Thanks to: - Dron01 - bugreports and valuable advice; - gladden, ghostart - bugreports; - all - testing. + +Ladies and gentlemen, and friends! If you want to compile my scripts with a compiler different from the GNU C, then the config files, projects or whatever else you need to create your own! I do only Makefile. +And please do not send me a compilation error. So what lies in my repository, absolute accuracy compiles fine and works on live servers. + +Уважаемые дамы и господа, а также товарищи! Если Вы хотите скомпилировать мои скрипты с помощью компилятора, отличного от GNU C, то конфиг-файлы, проекты или что там еще Вам придется создавать самостоятельно! Я делаю только Makefile. +И пожалуйста, не присылайте мне ошибки компиляции. То что лежит в моем репозитории, абсолютно точно компилируется нормально и работает на живых серверах. From 9eb0bf992ba60881d902e408ff0e4eddf6c1a9b3 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sun, 20 Jun 2010 18:27:09 +0400 Subject: [PATCH 373/405] Possible bug on removing impale fix --- .../icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp index c06a5f33e..c0a5015f9 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp @@ -245,7 +245,7 @@ struct MANGOS_DLL_DECL mob_bone_spikeAI : public ScriptedAI void Reset() { -// SetCombatMovement(false); + m_creature->SetRespawnDelay(7*DAY); pVictim = NULL; } From bf87251533e49862e397a96ff603579af28f7350 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sun, 20 Jun 2010 20:01:57 +0400 Subject: [PATCH 374/405] Another LK crush fix --- .../icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp index 8a82326a1..a382cecda 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp @@ -236,6 +236,8 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI void UpdateAI(const uint32 diff) { + if(!pInstance) return; + if (pInstance->GetData(TYPE_EVENT_NPC) == NPC_LICH_KING) { UpdateTimer = pInstance->GetData(TYPE_EVENT_TIMER); From 528f82c4450effb1b22f59acfc7f8221563d5b73 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Mon, 21 Jun 2010 18:36:07 +0400 Subject: [PATCH 375/405] Frozen halls (from Mioka and me) added. Not stable, need testing! --- Makefile.am | 4 +- addition/723_icecrown_down_mangos.sql | 79 +- addition/723_icecrown_down_scriptdev2.sql | 190 +++ .../halls_of_reflection/boss_falric.cpp | 262 ++++ .../halls_of_reflection/boss_falryn.cpp | 237 --- .../halls_of_reflection/boss_lich_king.cpp | 504 ++++++- .../halls_of_reflection/boss_marwyn.cpp | 351 +++-- .../halls_of_reflection/def_halls.h | 116 +- .../halls_of_reflection.cpp | 1323 +++++++++++++++++ .../instance_halls_of_reflection.cpp | 303 ++-- system/ScriptLoader.cpp | 10 +- 11 files changed, 2787 insertions(+), 592 deletions(-) create mode 100644 scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falric.cpp delete mode 100644 scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falryn.cpp create mode 100644 scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.cpp diff --git a/Makefile.am b/Makefile.am index 4bf4726e9..cc494a5a1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -349,8 +349,10 @@ scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_sar scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_gafrost.cpp \ scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp \ scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp \ +scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/def_halls.h \ scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp \ -scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falryn.cpp \ +scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.cpp \ +scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falric.cpp \ scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_lich_king.cpp \ scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_marwyn.cpp \ scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp \ diff --git a/addition/723_icecrown_down_mangos.sql b/addition/723_icecrown_down_mangos.sql index 1110f0e4c..d842f3464 100644 --- a/addition/723_icecrown_down_mangos.sql +++ b/addition/723_icecrown_down_mangos.sql @@ -35,12 +35,77 @@ UPDATE `creature_template` SET `equipment_id`='1290' where `entry` IN (36990, 37 -- UPDATE `creature_template` SET `ScriptName`='boss_scourgelord_tyrannus', `AIName` ='' WHERE `entry`=36658; -- Halls of reflection -UPDATE `instance_template` SET `script`='instance_halls_of_reflection' WHERE `map`=668; -UPDATE `creature_template` SET `ScriptName`='boss_falryn' WHERE `entry`=38112; -UPDATE `creature_template` SET `ScriptName`='boss_marwyn' WHERE `entry`=38113; --- UPDATE `creature_template` SET `ScriptName`='boss_lich_king_fh' WHERE `entry`=37226; -UPDATE `gameobject_template` SET ScriptName = 'go_frostmourne_altar' WHERE `entry` = 202236; -UPDATE `gameobject_template` SET ScriptName = 'go_frostmourne' WHERE `entry` = 202302; -DELETE FROM `creature` WHERE `map` = 668 AND `id` IN (38177,38176,38173,38172,38567,38175); +UPDATE `instance_template` SET `script` = 'instance_halls_of_reflection' WHERE map=668; +UPDATE `gameobject_template` SET ScriptName = '' WHERE `entry` IN (202236,202302); +DELETE FROM `creature` WHERE `map` = 668 AND `id` IN (38177,38176,38173,38172,38567,38175,36940,36941,37069); + UPDATE `creature_template` SET `ScriptName`='generic_creature' WHERE `entry` IN (38177,38176,38173,38172,38567,38175); + UPDATE `gameobject_template` SET `faction` = '114' WHERE `entry` IN (197341, 201976); +UPDATE `gameobject_template` SET `faction`='1375' WHERE `entry` IN (197341, 202302, 201385, 201596); + +UPDATE `creature_template` SET `speed_walk`='1.5', `speed_run`='2.0' WHERE `entry` IN (36954, 37226); +UPDATE `creature_template` SET `AIName`='', `Scriptname`='npc_jaina_and_sylvana_HRintro' WHERE `entry` IN (37221, 37223); +UPDATE `creature_template` SET `AIName`='', `Scriptname`='boss_falric' WHERE `entry` IN (38112); +UPDATE `creature_template` SET `AIName`='', `Scriptname`='boss_marwyn' WHERE `entry` IN (38113); +UPDATE `creature_template` SET `AIName`='', `Scriptname`='npc_lich_king_hr' WHERE `entry` IN (36954); +UPDATE `creature_template` SET `AIName`='', `Scriptname`='boss_lich_king_hr' WHERE `entry` IN (37226); +UPDATE `creature_template` SET `AIName`='', `Scriptname`='npc_jaina_and_sylvana_HRextro' WHERE `entry` IN (36955, 37554); +UPDATE `creature_template` SET `AIName`='', `Scriptname`='npc_raging_gnoul' WHERE `entry` IN (36940); +UPDATE `creature_template` SET `AIName`='', `Scriptname`='npc_risen_witch_doctor' WHERE `entry` IN (36941); +UPDATE `creature_template` SET `AIName`='', `Scriptname`='npc_abon' WHERE `entry` IN (37069); +UPDATE `creature_template` SET `scale`='0.8', `equipment_id`='1221' WHERE `entry` IN (37221, 36955); +UPDATE `creature_template` SET `equipment_id`='1290' WHERE `entry` IN (37223, 37554); +UPDATE `creature_template` SET `equipment_id`='0' WHERE `entry`=36954; +UPDATE `creature_template` SET `scale`='1' WHERE `entry` IN (37223); +UPDATE `creature_template` SET `scale`='0.8' WHERE `entry` IN (36658, 37225, 37223, 37226, 37554); +UPDATE `creature_template` SET `unit_flags`='768', `type_flags`='268435564' WHERE `entry` IN (38177, 38176, 38173, 38172, 38567, 38175); +UPDATE `creature_template` SET `AIName`='', `Scriptname`='npc_frostworn_general' WHERE `entry`=36723; + +REPLACE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('70464', '1', '36881'); +REPLACE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('69708', '1', '37226'); +REPLACE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('70194', '1', '37226'); +REPLACE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('69784', '1', '37014'); + +REPLACE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('69784', '1', '37014'); +REPLACE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('70224', '1', '37014'); +REPLACE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('70225', '1', '37014'); + +REPLACE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('69431', '1', '37497'); +REPLACE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('69431', '1', '37496'); +REPLACE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('69431', '1', '37496'); + +REPLACE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('69431', '1', '37588'); +REPLACE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('69431', '1', '37584'); +REPLACE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('69431', '1', '37587'); + +REPLACE INTO `creature_equip_template` VALUES ('38112', '50249', '49777', '0'); #Falric +UPDATE `creature_template` SET `equipment_id`='38112' WHERE `entry` IN (38112); + +REPLACE INTO `creature_equip_template` VALUES ('38113', '50248', '50248', '0'); #Marwyn +UPDATE `creature_template` SET `equipment_id`='38113' WHERE `entry` IN (38113); +REPLACE INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (135341, 38112, 668, 3, 1, 0, 0, 5276.81, 2037.45, 709.32, 5.58779, 604800, 0, 0, 377468, 0, 0, 0); +REPLACE INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (135342, 38113, 668, 3, 1, 0, 0, 5341.72, 1975.74, 709.32, 2.40694, 604800, 0, 0, 539240, 0, 0, 0); + +REPLACE INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES (14531739, 201596, 668, 1, 128, 5275.28, 1694.23, 786.147, 0.981225, 0, 0, 0.471166, 0.882044, 25, 0, 1); + +DELETE from `creature` WHERE `id`=36955; +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (135349, 36955, 668, 3, 128, 0, 0, 5547.27, 2256.95, 733.011, 0.835987, 7200, 0, 0, 252000, 881400, 0, 0); + +DELETE from `creature` WHERE `id`=37554; +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (135345, 37554, 668, 3, 64, 0, 0, 5547.27, 2256.95, 733.011, 0.835987, 7200, 0, 0, 252000, 881400, 0, 0); + +DELETE from `creature` WHERE `id`=37226; +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (135344, 37226, 668, 3, 1, 0, 0, 5551.29, 2261.33, 733.012, 4.0452, 604800, 0, 0, 27890000, 0, 0, 0); + +UPDATE `creature_template` SET `modelid_A` = 11686, `modelid_A2` = 11686, `modelid_H` = 11686, `modelid_H2` = 11686 WHERE `entry` = 37014; + +DELETE FROM `gameobject` WHERE `id` IN (201385,201596,202079); + +/* +REPLACE INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(3485, 201385, 668, 3, 1, 5540.39, 2086.48, 731.066, 1.00057, 0, 0, 0.479677, 0.877445, 604800, 100, 1), +(3438, 201385, 668, 3, 1, 5494.3, 1978.27, 736.689, 1.0885, 0, 0, 0.517777, 0.855516, 604800, 100, 1), +(3386, 201385, 668, 3, 1, 5434.27, 1881.12, 751.303, 0.923328, 0, 0, 0.445439, 0.895312, 604800, 100, 1), +(3383, 201385, 668, 3, 1, 5323.61, 1755.85, 770.305, 0.784186, 0, 0, 0.382124, 0.924111, 604800, 100, 1); +*/ \ No newline at end of file diff --git a/addition/723_icecrown_down_scriptdev2.sql b/addition/723_icecrown_down_scriptdev2.sql index b867bf73c..bfb030436 100644 --- a/addition/723_icecrown_down_scriptdev2.sql +++ b/addition/723_icecrown_down_scriptdev2.sql @@ -114,3 +114,193 @@ INSERT INTO `script_texts` (`entry`,`content_default`,`content_loc1`,`content_lo (-1632053,'We will cut a swath of destruction through this cursed place and find a way to enter the Halls of Reflection. If there is anything of value to be found here, it will be found in the Halls.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Мы проложим себе путь сквозь это проклетое место и найдем и найдем вход в залы отражений! Если в цитадели и есть что то достойное внимания оно ждет нас именно там.',17041,0,0,0,'Sylvanas SAY_INTRO_4'), (-1632054,'Your first mission is to destroy the machines of death within this wretched engine of souls, and clear a path for our soldiers.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Вашей первой задачей будет разрушение машин смерти в этом гнусном механизме душ, это откроет путь к нашим солдатам',17042,0,0,0,'Sylvanas SAY_INTRO_5'), (-1632055,'The Dark Lady watches over you. Make haste!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Темная госпожа будет наблюдать за вами, спешите!',17043,0,0,0,'Sylvanas SAY_INTRO_6'); + +-- Halls of reflection (from MaxXx2021 aka Mioka) +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1594540 AND -1594430; +INSERT INTO `script_texts` (`entry`,`content_default`,`content_loc8`,`sound`,`type`,`language`,`emote`,`comment`) VALUES +# SCENE - Hall Of Reflection (Intro) - PreUther +(-1594433, '', 'Как же тут холодно... Кровь стынет в жилах.', 16631,0,0,1, '67234'), +(-1594434, '', 'Я... Я не верю своим глазам. Ледяная скорбь перед нами без всякой охраны! Как и говорил гном. Вперед герои!', 17049,0,0,1, '67234'), +(-1594435, '', 'Что это там впереди? Неужели? Скорее герои!', 16632,1,0,1, '67234'), +(-1594436, '', 'Ледяная Скорбь, клинок разрушивший наше королевство.', 16633,1,0,1, '67234'), +(-1594437, '', 'Боль снова захлестывает меня, когда я так близко вижу меч, отнявший у меня жизнь.', 17050,0,0,1, '67234'), +(-1594438, '', 'Отойдите. Тот кто коснется этого клинка обречет себя на вечные муки. Я попытаюсь заговорить с душами заключенными в Ледяной скорби. Расступитесь... Чуть назад! Прошу.', 16634,1,0,1, '67234'), +(-1594439, '', 'Я не смею его коснуться. Назад! Отступите! Я попробую установить связь с мечом. Возможно спасение находится внутри!', 17051,1,0,1, '67234'), +# SCENE - Hall Of Reflection (Intro) - UtherDialog +(-1594440, '', 'Джайна? Неужели это ты?', 16666,0,0,1, '67234'), +(-1594441, '', 'Осторожней девочка! Однажды мне уже говорили что этот проклятый меч может нас спасти. Посмотри вокруг и ты увидешь что из этого вышло.', 16659,0,0,1, '67234'), +(-1594442, '', 'Утер? Милый Утер! Мне... Мне так жаль.', 16635,0,0,1, '67234'), +(-1594443, '', 'Утер? Утер Святоносный? Как...', 17052,0,0,1, '67234'), +(-1594444, '', 'Джайна, у вас мало времени. Король - Лич видит все что видит Ледяная Скорбь. Вскоре он будет здесь.', 16667,0,0,1, '67234'), +(-1594445, '', 'У вас мало времени. Король - Лич видит все что видит Ледяная Скорбь. Вскоре он будет здесь.', 16660,0,0,1, '67234'), +(-1594446, '', 'Артас здесь? Может я...', 16636,0,0,1, '67234'), +(-1594447, '', 'Король - Лич здесь? Значит моя судьба решится сегодня!', 17053,1,0,1, '67234'), +(-1594448, '', 'Нет девочка. Артаса здесь нет. Артас лишь тень, мелькающая в сознании Короля - Лича. Смутная тень.', 16668,0,0,1, '67234'), +(-1594449, '', 'Вам не победить Короля - Лича. Покрайней мере не здесь. Глупо и пытаться. Он убьет твоих соратников и воскресит их как воинов плети. Но что до тебя Сильвана, он готовит тебе участь еще страшнее, чем в прошлый раз.', 16661,0,0,1, '67234'), +(-1594450, '', 'Но если есть малейшая надежда вернуть Артаса... Я должна попытаться!', 16637,0,0,1, '67234'), +(-1594451, '', 'Должен быть способ!', 17054,0,0,1, '67234'), +(-1594452, '', 'Джайна послушай меня. Вам нужно уничтожить Короля - Лича. С ним нельзя договориться. Он убьет вас всех и превратит в могущественных воинов Плети.', 16669,0,0,1, '67234'), +(-1594453, '', 'Возможно... Но знай! Король - Лич должен быть всегда. Даже если вы убьете Артаса кто то обязан будет занять его место. Лишившись правителя Плеть налетит на мир как стая саранчи и уничтожит все на своем пути.', 16662,0,0,1, '67234'), +(-1594454, '', 'Но как Утер? Как мне убить моего принца, моего...', 16638,0,0,1, '67234'), +(-1594455, '', 'Кому по силам такое Бремя?', 17055,0,0,1, '67234'), +(-1594456, '', 'Забудь об этом девочка. Короля - Лича нужно уничтожить на том месте, где он слился с Нерзулом. На самой вершине, у ледяного трона!', 16670,0,0,1, '67234'), +(-1594457, '', 'Не знаю, Королева Баньши... Если бы не Артас, который все еще является частью Короля - Лича, Плеть давно бы уже уничтожила Азерот.', 16663,0,0,1, '67234'), +(-1594458, '', 'Ты прав Утер прости меня. Я не знаю что на меня нашло. Мы передадим твои слова Королю и рыцарям, которые сражаются с Плетью в Цитадели Ледяной Короны.', 16639,0,0,1, '67234'), +(-1594459, '', 'Тебе нужно знать еще кое что о Короле - Личе. Плеть не должна выйти из под контроля, даже если вы убьете Короля - Лича, кто то должен будет занять его место. Без короля Плеть налетит на мир как стая саранчи и уничтожит все живое.', 16671,0,0,1, '67234'), +(-1594460, '', 'Увы единственый способ одолеть Короля - Лича это убить его там где он был порожден.', 16664,0,0,1, '67234'), +(-1594461, '', 'Кому по силам такое бремя?', 16640,0,0,1, '67234'), +(-1594462, '', 'Ледяной Трон!', 17056,0,0,1, '67234'), +(-1594463, '', 'Великая жертва, благородной души.', 16672,0,0,1, '67234'), +(-1594464, '', 'Не знаю Джайна... мне кажется если бы не Артас, который все еще является частью Короля - Лича, Плеть давно бы уже уничтожила Азерот.', 16673,0,0,1, '67234'), +(-1594465, '', 'Но может еще есть надежда?', 16641,0,0,1, '67234'), +(-1594466, '', 'Нет Джайна... Эээээ... Он... Он приближается... Вы... Вы должны...', 16674,1,0,1, '67234'), +(-1594467, '', 'Да... Эээээ... Он... Он приближается... Вы... Вы должны...', 16665,1,0,1, '67234'), +(-1594468, '', 'Замолчи, паладин.', 17225,1,0,0, '67234'), +(-1594469, '', 'Так ты хочешь поговорить с мертвыми? Нет ничего проще!', 17226,1,0,0, '67234'), +(-1594470, '', 'Фалрик, Марвин, когда закончите, принесите их тела в мои покои.', 17227,0,0,0, '67234'), +(-1594471, '', 'Ты от меня не отмахнешься Артас. Я должна понять, я должна знать.', 16642,1,0,1, '67234'), +(-1594472, '', 'Ты так просто от меня не уйдешь Артас. Я отомщу тебе!', 17057,1,0,1, '67234'), +(-1594473, '', 'Глупая девчонка! Тот кого ты ищещь давно убит! Теперь он лишь призрак, слабый отзвук в моем сознании!', 17229,1,0,0, '67234'), +(-1594474, '', 'Я не повторю прежней ошибки, Сильвана. На этот раз тебе не спастись, ты не оправдала моего доверия и теперь тебя ждет только забвение!', 17228,1,0,0, '67234'), +(-1594475, '', 'Как пожелаете мой господин!', 16717,1,0,0, '67234'), +(-1594476, '', 'Как пожелаете мой господин!', 16741,1,0,0, '67234'), +# SCENE - Hall Of Reflection (Extro) - PreEscape +(-1594477, '', 'Твои союзники прибыли Джайна! Как ты и обещала... Хахахаха... Все вы станете могучими солдатами плети...', 17212,1,0,0, '67234'), +(-1594478, '', 'Я не повторю прежней ошибки, Сильвана! На этот раз тебе не спастись. Вы все будите служить мне после смерти...', 17213,1,0,0, '67234'), +(-1594479, '', 'Он слишком силен. Мы должны выбраться от сюда как можно скорее. Моя магия задержит его ненадолго, быстрее герои...', 16644,0,0,1, '67234'), +(-1594480, '', 'Он слишком силен. Герои скорее, за мной. Мы должны выбраться от сюда немедленно. Я постараюсь его задержать пока мы будем убегать.', 17058,0,0,1, '67234'), +# SCENE - Hall Of Reflection (Extro) - Escape +(-1594481, '', 'Смерть распростерла ледяные обьятия!', 17221,1,0,0, '67234'), +(-1594482, '', 'Восстаньте прислужники, не дайте им сбежать!', 17216,1,0,0, '67234'), +(-1594483, '', 'Схватите их! Принесите мне их тела!', 17222,1,0,0, '67234'), +(-1594484, '', 'Надежды нет!', 17214,1,0,0, '67234'), +(-1594485, '', 'Смирись с судьбой.', 17215,1,0,0, '67234'), +(-1594486, '', 'Бежать некуда!', 17217,1,0,0, '67234'), +(-1594487, '', 'Я разрушу эту преграду, а вы удерживайте нежить на расстоянии!', 16607,1,0,0, '67234'), +(-1594488, '', 'Никакие стены не удержат Королеву Баньши. Держите нежить на расстоянии, я сокрушу эту преграду.', 17029,1,0,0, '67234'), +(-1594489, '', 'Опять Ледяная Стена... Я разобью ее, только не дайте нежити прервать мои заклинания...', 16608,1,0,0, '67234'), +(-1594490, '', 'Еще одна преграда. Держитесь герои! Я разрушу эту стену!', 17030,1,0,0, '67234'), +(-1594491, '', 'Покоритесь Леденящей смерти!', 17218,1,0,0, '67234'), +(-1594492, '', 'Вы в ловушке!', 17219,1,0,0, '67234'), +(-1594493, '', 'Как долго вы сможете сопротивляться?', 17220,1,0,0, '67234'), +(-1594494, '', 'Он с нами играет. Я покажу ему что бывает когда лед встречается со огнем!', 16609,0,0,0, '67234'), +(-1594495, '', 'Твои преграды больше не задержат нас, чудовище. Я смету их с пути!', 16610,1,0,0, '67234'), +(-1594496, '', 'Я устала от этих игр Артас. Твои стены не остановят меня!', 17031,1,0,0, '67234'), +(-1594497, '', 'Ты не помешаешь нам уйти, монстр. Сдерживайте нежить а я уничтожу эту преграду.', 17032,1,0,0, '67234'), +(-1594498, '', 'Я вижу выход, скорее!', 16645,1,0,0, '67234'), +(-1594499, '', 'Мы почти выбрались, не сдавайтесь!', 16646,1,0,0, '67234'), +(-1594500, '', 'Я вижу выход, скорее!', 17059,1,0,0, '67234'), +(-1594501, '', 'Мы почти выбрались, не сдавайтесь!', 17060,1,0,0, '67234'), +(-1594502, '', 'Больше некуда бежать. Теперь нам придется сражаться, это наша последняя битва!', 16647,1,0,0, '67234'), +(-1594503, '', 'Проклятый тупик, значит все закончится здесь. Готовтесь герои это наша последняя битва.', 17061,1,0,0, '67234'), +(-1594504, '', 'Ха-ха-ха... Бежать некуда теперь вы мои!', 17223,1,0,0, '67234'), +(-1594505, '', 'Солдаты Лордерона, восстаньте по зову Господина!', 16714,1,0,0, '67234'), +(-1594506, '', 'Господин осмотрел свое королевство и признал его негодным! Его суд был быстрым и суровым - предать всех смерти!', 16738,1,0,0, '67234'), + +#Falric +(-1594507, '', 'Мужчины, Женщины и дети... Никто не избежал гнева господина. Вы разделите их Участь!', 16710,1,0,0, '67234'), +(-1594508, '', 'Марвин... Добей их...', 16713,1,0,0, '67234'), +(-1594509, '', 'Сопливый червяк!', 16711,1,0,0, '67234'), +(-1594510, '', 'Стратхольмские детишки и те сражались отчаянее!', 16712,1,0,0, '67234'), +(-1594511, '', 'Как сладостно отчаянье!', 16715,1,0,0, '67234'), +(-1594512, '', 'Как приятен страх!', 16716,1,0,0, '67234'), + +#Marwyn +(-1594513, '', 'Вы найдете здесь лишь смерть!', 16734,1,0,0, '67234'), +(-1594514, '', 'Эээээ... Да... Бегите на встречу судьбе. Ее жестокие и холодные обьятия ждут вас...', 16737,1,0,0, '67234'), +(-1594515, '', 'У Теренаса был такой же взгляд в миг смерти, он никак не мог поверить... Хахахахаха...', 16735,1,0,0, '67234'), +(-1594516, '', 'Захлебнись страданием!', 16736,1,0,0, '67234'), +(-1594517, '', 'Вы увидите как разлагается ваша плоть!', 16739,1,0,0, '67234'), +(-1594518, '', 'Сгиньте без следа!', 16740,1,0,0, '67234'), + +#FrostWorn General +(-1594519, '', 'Вы не достойны предстать перед Королем - Личом!', 16921,1,0,0, '67234'), +(-1594520, '', 'Господин... Я подвел вас...', 16922,1,0,0, '67234'), + +#add +(-1594531, '', 'Ну, теперь точно пора сваливать.', 0,0,0,0, '67234'), +(-1594532, '', 'Вот вам сундук за работу.', 0,0,0,0, '67234'), +(-1594533, '', 'И, поскольку корабля с оффа не будет, вот вам портал в Даларан.', 0,0,0,0, '67234'); + +-- Waipoints to escort event on Halls of reflection + +DELETE FROM script_waypoint WHERE entry=36955; +DELETE FROM script_waypoint WHERE entry=37226; +DELETE FROM script_waypoint WHERE entry=37554; + +INSERT INTO script_waypoint VALUES +-- Jaina + + (36955, 0, 5587.682,2228.586,733.011, 0, 'WP1'), + (36955, 1, 5600.715,2209.058,731.618, 0, 'WP2'), + (36955, 2, 5606.417,2193.029,731.129, 0, 'WP3'), + (36955, 3, 5598.562,2167.806,730.918, 0, 'WP4 - Summon IceWall 01'), + (36955, 4, 5556.436,2099.827,731.827, 0, 'WP5 - Spell Channel'), + (36955, 5, 5543.498,2071.234,731.702, 0, 'WP6'), + (36955, 6, 5528.969,2036.121,731.407, 0, 'WP7'), + (36955, 7, 5512.045,1996.702,735.122, 0, 'WP8'), + (36955, 8, 5504.490,1988.789,735.886, 0, 'WP9 - Spell Channel'), + (36955, 9, 5489.645,1966.389,737.653, 0, 'WP10'), + (36955, 10, 5475.517,1943.176,741.146, 0, 'WP11'), + (36955, 11, 5466.930,1926.049,743.536, 0, 'WP12'), + (36955, 12, 5445.157,1894.955,748.757, 0, 'WP13 - Spell Channel'), + (36955, 13, 5425.907,1869.708,753.237, 0, 'WP14'), + (36955, 14, 5405.118,1833.937,757.486, 0, 'WP15'), + (36955, 15, 5370.324,1799.375,761.007, 0, 'WP16'), + (36955, 16, 5335.422,1766.951,767.635, 0, 'WP17 - Spell Channel'), + (36955, 17, 5311.438,1739.390,774.165, 0, 'WP18'), + (36955, 18, 5283.589,1703.755,784.176, 0, 'WP19'), + (36955, 19, 5260.400,1677.775,784.301, 3000, 'WP20'), + (36955, 20, 5262.439,1680.410,784.294, 0, 'WP21'), + (36955, 21, 5260.400,1677.775,784.301, 0, 'WP22'), + +-- Sylvana + + (37554, 0, 5587.682,2228.586,733.011, 0, 'WP1'), + (37554, 1, 5600.715,2209.058,731.618, 0, 'WP2'), + (37554, 2, 5606.417,2193.029,731.129, 0, 'WP3'), + (37554, 3, 5598.562,2167.806,730.918, 0, 'WP4 - Summon IceWall 01'), + (37554, 4, 5556.436,2099.827,731.827, 0, 'WP5 - Spell Channel'), + (37554, 5, 5543.498,2071.234,731.702, 0, 'WP6'), + (37554, 6, 5528.969,2036.121,731.407, 0, 'WP7'), + (37554, 7, 5512.045,1996.702,735.122, 0, 'WP8'), + (37554, 8, 5504.490,1988.789,735.886, 0, 'WP9 - Spell Channel'), + (37554, 9, 5489.645,1966.389,737.653, 0, 'WP10'), + (37554, 10, 5475.517,1943.176,741.146, 0, 'WP11'), + (37554, 11, 5466.930,1926.049,743.536, 0, 'WP12'), + (37554, 12, 5445.157,1894.955,748.757, 0, 'WP13 - Spell Channel'), + (37554, 13, 5425.907,1869.708,753.237, 0, 'WP14'), + (37554, 14, 5405.118,1833.937,757.486, 0, 'WP15'), + (37554, 15, 5370.324,1799.375,761.007, 0, 'WP16'), + (37554, 16, 5335.422,1766.951,767.635, 0, 'WP17 - Spell Channel'), + (37554, 17, 5311.438,1739.390,774.165, 0, 'WP18'), + (37554, 18, 5283.589,1703.755,784.176, 0, 'WP19'), + (37554, 19, 5260.400,1677.775,784.301, 3000, 'WP20'), + (37554, 20, 5262.439,1680.410,784.294, 0, 'WP21'), + (37554, 21, 5260.400,1677.775,784.301, 0, 'WP22'), + +-- Lich King + + (37226, 0, 5577.187,2236.003,733.012, 0, 'WP1'), + (37226, 1, 5587.682,2228.586,733.011, 0, 'WP2'), + (37226, 2, 5600.715,2209.058,731.618, 0, 'WP3'), + (37226, 3, 5606.417,2193.029,731.129, 0, 'WP4'), + (37226, 4, 5598.562,2167.806,730.918, 0, 'WP5'), + (37226, 5, 5559.218,2106.802,731.229, 0, 'WP6'), + (37226, 6, 5543.498,2071.234,731.702, 0, 'WP7'), + (37226, 7, 5528.969,2036.121,731.407, 0, 'WP8'), + (37226, 8, 5512.045,1996.702,735.122, 0, 'WP9'), + (37226, 9, 5504.490,1988.789,735.886, 0, 'WP10'), + + (37226, 10, 5489.645,1966.389,737.653, 0, 'WP10'), + (37226, 11, 5475.517,1943.176,741.146, 0, 'WP11'), + (37226, 12, 5466.930,1926.049,743.536, 0, 'WP12'), + (37226, 13, 5445.157,1894.955,748.757, 0, 'WP13'), + (37226, 14, 5425.907,1869.708,753.237, 0, 'WP14'), + (37226, 15, 5405.118,1833.937,757.486, 0, 'WP15'), + (37226, 16, 5370.324,1799.375,761.007, 0, 'WP16'), + (37226, 17, 5335.422,1766.951,767.635, 0, 'WP17'), + (37226, 18, 5311.438,1739.390,774.165, 0, 'WP18'), + (37226, 19, 5283.589,1703.755,784.176, 0, 'WP19'), + (37226, 20, 5278.694,1697.912,785.692, 0, 'WP20'), + (37226, 21, 5283.589,1703.755,784.176, 0, 'WP19'); diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falric.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falric.cpp new file mode 100644 index 000000000..306ea1a74 --- /dev/null +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falric.cpp @@ -0,0 +1,262 @@ +/* Copyright (C) 2006 - 2010 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_falric +SD%Complete: 70% +SDComment: +SDAuthor: /dev/rsa, rewrited by MaxXx2021 aka Mioka +SDCategory: Halls of Reflection +EndScriptData */ + +#include "precompiled.h" +#include "def_halls.h" + +enum +{ + SAY_FALRIC_AGGRO = -1594507, + SAY_FALRIC_DEATH = -1594508, + SAY_FALRIC_SLAY01 = -1594509, + SAY_FALRIC_SLAY02 = -1594510, + SAY_FALRIC_SP01 = -1594511, + SAY_FALRIC_SP02 = -1594512, + + SPELL_HOPELESSNESS = 72395, + SPELL_IMPENDING_DESPAIR = 72426, + SPELL_DEFILING_HORROR_N = 72435, + SPELL_DEFILING_HORROR_H = 72452, + SPELL_QUIVERING_STRIKE_N = 72422, + SPELL_QUIVERING_STRIKE_H = 72453, + + SPELL_BERSERK = 47008 +}; + +struct MANGOS_DLL_DECL boss_falricAI : public ScriptedAI +{ + boss_falricAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Regular = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool Regular; + bool m_bIsCall; + + uint32 m_uiBerserkTimer; + uint32 m_uiGrowlTimer; + uint32 m_uiHorrorTimer; + uint32 m_uiStrikeTimer; + uint32 m_uiSummonTimer; + uint32 m_uiLocNo; + uint64 m_uiSummonGUID[16]; + uint32 m_uiCheckSummon; + + uint8 SummonCount; + + uint64 pSummon; + + void Reset() + { + m_uiBerserkTimer = 180000; + SummonCount = 0; + m_bIsCall = false; + m_uiGrowlTimer = 20000; + m_uiHorrorTimer = urand(14000,20000); + m_uiStrikeTimer = 2000; + m_uiSummonTimer = 11000; + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetVisibility(VISIBILITY_OFF); + } + + void Aggro(Unit* pVictim) + { + m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + DoScriptText(SAY_FALRIC_AGGRO, m_creature); + DoCast(m_creature, SPELL_HOPELESSNESS); + } + + void KilledUnit(Unit* pVictim) + { + switch(urand(0,1)) + { + case 0: DoScriptText(SAY_FALRIC_SLAY01, m_creature); break; + case 1: DoScriptText(SAY_FALRIC_SLAY02, m_creature); break; + } + } + + void JustDied(Unit* pKiller) + { + if(m_pInstance) + m_pInstance->SetData(TYPE_MARWYN, SPECIAL); + DoScriptText(SAY_FALRIC_DEATH, m_creature); + } + + void AttackStart(Unit* who) + { + if(m_pInstance) + if(m_pInstance->GetData(TYPE_FALRIC) != IN_PROGRESS) + return; + + ScriptedAI::AttackStart(who); + } + + void Summon() + { + m_uiLocNo = 0; + + for(uint8 i = 0; i < 14; i++) + { + switch(urand(0,3)) + { + case 0: + switch(urand(1, 3)) + { + case 1: pSummon = NPC_DARK_1; break; + case 2: pSummon = NPC_DARK_3; break; + case 3: pSummon = NPC_DARK_6; break; + } + break; + case 1: + switch(urand(1, 3)) + { + case 1: pSummon = NPC_DARK_2; break; + case 2: pSummon = NPC_DARK_3; break; + case 3: pSummon = NPC_DARK_4; break; + } + break; + case 2: + switch(urand(1, 3)) + { + case 1: pSummon = NPC_DARK_2; break; + case 2: pSummon = NPC_DARK_5; break; + case 3: pSummon = NPC_DARK_6; break; + } + break; + case 3: + switch(urand(1, 3)) + { + case 1: pSummon = NPC_DARK_1; break; + case 2: pSummon = NPC_DARK_5; break; + case 3: pSummon = NPC_DARK_4; break; + } + break; + } + + m_uiCheckSummon = 0; + + if(Creature* Summon = m_creature->SummonCreature(pSummon, SpawnLoc[m_uiLocNo].x, SpawnLoc[m_uiLocNo].y, SpawnLoc[m_uiLocNo].z, SpawnLoc[m_uiLocNo].o, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000)) + { + m_uiSummonGUID[i] = Summon->GetGUID(); + Summon->setFaction(974); + } + m_uiLocNo++; + } + } + + void CallFallSoldier() + { + for(uint8 i = 0; i < 4; i++) + { + if(Creature* Summon = m_pInstance->instance->GetCreature(m_uiSummonGUID[m_uiCheckSummon])) + { + Summon->setFaction(14); + Summon->SetInCombatWithZone(); + } + m_uiCheckSummon++; + } + } + + void UpdateAI(const uint32 uiDiff) + { + if(!m_pInstance) return; + + if (m_pInstance->GetData(TYPE_FALRIC) == SPECIAL) + { + if(!m_bIsCall) + { + m_bIsCall = true; + Summon(); + } + + if (m_uiSummonTimer < uiDiff) + { + ++SummonCount; + if(SummonCount > 4) + { + m_pInstance->SetData(TYPE_FALRIC, IN_PROGRESS); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetInCombatWithZone(); + } + else CallFallSoldier(); + m_uiSummonTimer = 60000; + } else m_uiSummonTimer -= uiDiff; + } + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if(m_uiStrikeTimer < uiDiff) + { + DoCast(m_creature->getVictim(), Regular ? SPELL_QUIVERING_STRIKE_N : SPELL_QUIVERING_STRIKE_H); + m_uiStrikeTimer = (urand(7000, 14000)); + } + else m_uiStrikeTimer -= uiDiff; + + if(m_uiHorrorTimer < uiDiff) + { + DoScriptText(SAY_FALRIC_SP01, m_creature); + if(Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCast(pTarget, SPELL_IMPENDING_DESPAIR); + m_uiHorrorTimer = (urand(15000, 25000)); + } + else m_uiHorrorTimer -= uiDiff; + + if(m_uiGrowlTimer < uiDiff) + { + DoScriptText(SAY_FALRIC_SP02, m_creature); + DoCast(m_creature->getVictim(), Regular ? SPELL_DEFILING_HORROR_N : SPELL_DEFILING_HORROR_H); + m_uiGrowlTimer = (urand(25000, 30000)); + } + else m_uiGrowlTimer -= uiDiff; + + if (m_uiBerserkTimer < uiDiff) + { + DoCast(m_creature, SPELL_BERSERK); + m_uiBerserkTimer = 180000; + } else m_uiBerserkTimer -= uiDiff; + + DoMeleeAttackIfReady(); + + return; + } +}; + +CreatureAI* GetAI_boss_falric(Creature* pCreature) +{ + return new boss_falricAI(pCreature); +} + +void AddSC_boss_falric() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_falric"; + newscript->GetAI = &GetAI_boss_falric; + newscript->RegisterSelf(); +} diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falryn.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falryn.cpp deleted file mode 100644 index ff865600b..000000000 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falryn.cpp +++ /dev/null @@ -1,237 +0,0 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 - * 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, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* ScriptData -SDName: boss_falryn -SD%Complete: 40% -SDComment: by /dev/rsa -SDCategory: Halls of Reflection -EndScriptData */ - -#include "precompiled.h" -#include "def_halls.h" - -enum -{ - //common - SPELL_BERSERK = 47008, - //yells - //summons - //Abilities - SPELL_HOPELESSNESS = 72395, - SPELL_IMPENDING_DESPAIR = 72426, - SPELL_DEFILING_HORROR_N = 72435, - SPELL_QUIVERING_STRIKE_N = 72422, - - SPELL_DEFILING_HORROR_H = 72452, - SPELL_QUIVERING_STRIKE_H = 72453, - -}; - -struct MANGOS_DLL_DECL boss_falrynAI : public ScriptedAI -{ - boss_falrynAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Regular = pCreature->GetMap()->IsRegularDifficulty(); - Reset(); - } - - bool Regular; - ScriptedInstance *m_pInstance; - uint32 m_uiBerserk_Timer; - uint32 m_uiDespair_Timer; - uint32 m_uiHorror_Timer; - uint32 m_uiStrike_Timer; - uint32 m_uiSummon_Timer; - - uint8 health; - uint8 stage; - uint8 SummonCount; - - uint64 npctype1; - uint64 npctype2; - uint64 npctype3; - - void Reset() - { - m_uiBerserk_Timer = 180000; - stage = 0; - SummonCount = 0; - m_uiDespair_Timer = Regular ? 40000 : 30000; - m_uiHorror_Timer = urand(25000,35000); - m_uiStrike_Timer = urand(10000,15000); - m_uiSummon_Timer = 0; - if (m_pInstance) { - m_pInstance->SetData(TYPE_FALRYN, NOT_STARTED); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->SetVisibility(VISIBILITY_OFF); - } - } - - bool CallGuards(TempSummonType type, uint32 _summontime ) - { - switch(urand(0,3)) - { - case 0: { - npctype1 = NPC_DARK_1; - npctype2 = NPC_DARK_3; - npctype3 = NPC_DARK_6; - break;} - case 1: { - npctype1 = NPC_DARK_2; - npctype2 = NPC_DARK_3; - npctype3 = NPC_DARK_4; - break;} - case 2: { - npctype1 = NPC_DARK_2; - npctype2 = NPC_DARK_5; - npctype3 = NPC_DARK_6; - break;} - case 3: { - npctype1 = NPC_DARK_1; - npctype2 = NPC_DARK_5; - npctype3 = NPC_DARK_4; - break;} - } - if (Creature* pSummon1 = m_creature->SummonCreature(npctype1, SpawnLoc[0].x, SpawnLoc[0].y, SpawnLoc[0].z, 0, type, _summontime)) - pSummon1->SetInCombatWithZone(); - if (Creature* pSummon2 = m_creature->SummonCreature(npctype2, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z, 0, type, _summontime)) - pSummon2->SetInCombatWithZone(); - if (Creature* pSummon3 = m_creature->SummonCreature(npctype3, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 0, type, _summontime)) - pSummon3->SetInCombatWithZone(); - - return true; - } - - void Aggro(Unit *who) - { -// if(m_pInstance) m_pInstance->SetData(TYPE_FALRYN, IN_PROGRESS); - } - - void AttackStart(Unit* pWho) - { - if (!m_pInstance) return; - - if (m_pInstance->GetData(TYPE_FALRYN) != IN_PROGRESS) return; - - if (!pWho || pWho == m_creature) return; - - if (m_creature->Attack(pWho, true)) { - m_creature->AddThreat(pWho); - m_creature->SetInCombatWith(pWho); - pWho->SetInCombatWith(m_creature); - DoStartMovement(pWho); - } - } - - void JustDied(Unit *killer) - { - if(m_pInstance) m_pInstance->SetData(TYPE_FALRYN, DONE); - } - - void UpdateAI(const uint32 diff) - { - if (m_pInstance->GetData(TYPE_FALRYN) == SPECIAL ) { - if (m_uiSummon_Timer < diff) { - ++SummonCount; - if (SummonCount > MOB_WAVES_NUM_1) { - m_pInstance->SetData(TYPE_FALRYN, IN_PROGRESS); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->SetVisibility(VISIBILITY_ON); - m_creature->SetInCombatWithZone(); - } - else CallGuards(TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60000); - m_uiSummon_Timer = MOB_WAVES_DELAY_1; - } else m_uiSummon_Timer -= diff; - } - - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - switch(stage) - { - case 0: { - break;} - case 1: { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCast(pTarget, SPELL_HOPELESSNESS); - stage = 2; - break;} - case 2: { - break;} - case 3: { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCast(pTarget, SPELL_HOPELESSNESS); - stage = 4; - break;} - case 4: { - break;} - case 5: { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCast(pTarget, SPELL_HOPELESSNESS); - stage = 6; - break;} - case 6: { - break;} - } - if (m_uiDespair_Timer < diff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCast(pTarget, SPELL_IMPENDING_DESPAIR); - m_uiDespair_Timer= Regular ? 40000 : 30000; - } else m_uiDespair_Timer -= diff; - - if (m_uiStrike_Timer < diff) - {DoCastSpellIfCan(m_creature->getVictim(), Regular ? SPELL_QUIVERING_STRIKE_N : SPELL_QUIVERING_STRIKE_H); - m_uiStrike_Timer=urand(10000,15000); - } else m_uiStrike_Timer -= diff; - - if (m_uiHorror_Timer < diff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCast(pTarget, Regular ? SPELL_DEFILING_HORROR_N : SPELL_DEFILING_HORROR_H); - m_uiHorror_Timer=urand(25000,35000); - } else m_uiHorror_Timer -= diff; - - health = m_creature->GetHealth()*100 / m_creature->GetMaxHealth(); - if (health <= 66 && stage == 0) stage = 1; - if (health <= 33 && stage == 2) stage = 3; - if (health <= 10 && stage == 4) stage = 5; - - if (m_uiBerserk_Timer < diff) - { - DoCast(m_creature, SPELL_BERSERK); - m_uiBerserk_Timer = 180000; - } else m_uiBerserk_Timer -= diff; - - DoMeleeAttackIfReady(); - } -}; - -CreatureAI* GetAI_boss_falryn(Creature* pCreature) -{ - return new boss_falrynAI(pCreature); -} - -void AddSC_boss_falryn() -{ - Script *newscript; - newscript = new Script; - newscript->Name = "boss_falryn"; - newscript->GetAI = &GetAI_boss_falryn; - newscript->RegisterSelf(); -} diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_lich_king.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_lich_king.cpp index 49402876a..e65ea88d4 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_lich_king.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_lich_king.cpp @@ -16,10 +16,510 @@ /* ScriptData SDName: boss_lich_king -SD%Complete: 0% +SD%Complete: 100% SDComment: +SDAuthor: MaxXx2021 aka Mioka SDCategory: Halls of Reflection EndScriptData */ #include "precompiled.h" -#include "def_halls.h" \ No newline at end of file +#include "def_halls.h" +#include "escort_ai.h" + +enum +{ + SPELL_WINTER = 69780, + SPELL_FURY_OF_FROSTMOURNE = 70063, + SPELL_SOUL_REAPER = 73797, + SPELL_RAISE_DEAD = 69818, + SPELL_ICE_PRISON = 69708, + SPELL_DARK_ARROW = 70194, + SPELL_EMERGE_VISUAL = 50142, + SPELL_DESTROY_ICE_WALL_02 = 70224, + SPELL_SILENCE = 69413, + SPELL_LICH_KING_CAST = 57561, + SPELL_GNOUL_JUMP = 70150, + SPELL_ABON_STRIKE = 40505, + + /*SPELLS - Witch Doctor*/ + SPELL_COURSE_OF_DOOM = 70144, + SPELL_SHADOW_BOLT_VALLEY = 70145, + SPELL_SHADOW_BOLT_N = 70080, + SPELL_SHADOW_BOLT_H = 70182, + + SAY_LICH_KING_WALL_01 = -1594486, + SAY_LICH_KING_WALL_02 = -1594491, + SAY_LICH_KING_GNOUL = -1594482, + SAY_LICH_KING_ABON = -1594483, + SAY_LICH_KING_WINTER = -1594481, + SAY_LICH_KING_END_DUN = -1594504, +}; + +struct MANGOS_DLL_DECL boss_lich_king_hrAI : public npc_escortAI +{ + boss_lich_king_hrAI(Creature *pCreature) : npc_escortAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_creature->SetActiveObjectState(true); + Reset(); + } + + ScriptedInstance* m_pInstance; + uint32 Step; + uint32 StepTimer; + bool StartEscort; + bool IceWall01; + bool NonFight; + bool Finish; + + void Reset() + { + NonFight = false; + m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 0, uint32(36942)); + } + + void JustDied(Unit* pKiller) + { + } + + void WaypointReached(uint32 i) + { + switch(i) + { + case 20: + SetEscortPaused(true); + Finish = true; + DoCast(m_creature, SPELL_LICH_KING_CAST); + m_pInstance->SetData(TYPE_LICH_KING, DONE); + DoScriptText(SAY_LICH_KING_END_DUN, m_creature); + if(Creature* pLider = ((Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_ESCAPE_LIDER)))) + { + pLider->CastSpell(pLider, SPELL_SILENCE, false); + pLider->AddSplineFlag(SPLINEFLAG_FLYING); + pLider->SendMonsterMove(pLider->GetPositionX(), pLider->GetPositionY(), pLider->GetPositionZ() + 4, SPLINETYPE_NORMAL , pLider->GetSplineFlags(), 3000); + } + break; + } + } + + void AttackStart(Unit* who) + { + if (!who) + return; + + if(NonFight == true) return; + + if(m_pInstance->GetData(TYPE_LICH_KING) == IN_PROGRESS || who->GetTypeId() == TYPEID_PLAYER) return; + + npc_escortAI::AttackStart(who); + } + + void Wall01() + { + switch(Step) + { + case 0: + SetEscortPaused(true); + DoScriptText(SAY_LICH_KING_WALL_01, m_creature); + DoCast(m_creature, SPELL_DESTROY_ICE_WALL_02); + StepTimer = 2000; + ++Step; + break; + case 1: + /*if(GameObject* pGate = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GO_ICE_WALL_01))) + pGate->SetGoState(GO_STATE_READY);*/ + StepTimer = 2000; + ++Step; + break; + case 2: + DoCast(m_creature, SPELL_RAISE_DEAD); + DoScriptText(SAY_LICH_KING_GNOUL, m_creature); + StepTimer = 7000; + ++Step; + break; + case 3: + DoCast(m_creature, SPELL_WINTER); + DoScriptText(SAY_LICH_KING_WINTER, m_creature); + m_creature->SetSpeedRate(MOVE_WALK, 0.9f, true); + StepTimer = 1000; + ++Step; + break; + case 4: + SetEscortPaused(false); + StepTimer = 2000; + ++Step; + break; + case 5: + m_creature->SummonCreature(NPC_RISEN_WITCH_DOCTOR,(m_creature->GetPositionX()-5)+rand()%10, (m_creature->GetPositionY()-5)+rand()%10, m_creature->GetPositionZ(),4.17f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,360000); + m_pInstance->SetData(TYPE_ICE_WALL_01, DONE); + StepTimer = 100; + Step = 0; + break; + } + } + + void Wall02() + { + switch(Step) + { + case 0: + SetEscortPaused(true); + DoCast(m_creature, SPELL_RAISE_DEAD); + DoScriptText(SAY_LICH_KING_GNOUL, m_creature); + StepTimer = 10000; + ++Step; + break; + case 1: + SetEscortPaused(false); + m_creature->SummonCreature(NPC_RISEN_WITCH_DOCTOR,(m_creature->GetPositionX()-5)+rand()%10, (m_creature->GetPositionY()-5)+rand()%10, m_creature->GetPositionZ(),4.17f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,360000); + m_creature->SummonCreature(NPC_RISEN_WITCH_DOCTOR,(m_creature->GetPositionX()-5)+rand()%10, (m_creature->GetPositionY()-5)+rand()%10, m_creature->GetPositionZ(),4.17f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,360000); + m_creature->SummonCreature(NPC_ABON,(m_creature->GetPositionX()-5)+rand()%10, (m_creature->GetPositionY()-5)+rand()%10, m_creature->GetPositionZ(),4.17f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,360000); + m_pInstance->SetData(TYPE_ICE_WALL_02, DONE); + StepTimer = 100; + Step = 0; + break; + } + } + + void Wall03() + { + switch(Step) + { + case 0: + SetEscortPaused(true); + DoCast(m_creature, SPELL_RAISE_DEAD); + DoScriptText(SAY_LICH_KING_GNOUL, m_creature); + StepTimer = 10000; + ++Step; + break; + case 1: + SetEscortPaused(false); + DoScriptText(SAY_LICH_KING_ABON, m_creature); + m_creature->SummonCreature(NPC_RISEN_WITCH_DOCTOR,(m_creature->GetPositionX()-5)+rand()%10, (m_creature->GetPositionY()-5)+rand()%10, m_creature->GetPositionZ(),4.17f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,360000); + m_creature->SummonCreature(NPC_RISEN_WITCH_DOCTOR,(m_creature->GetPositionX()-5)+rand()%10, (m_creature->GetPositionY()-5)+rand()%10, m_creature->GetPositionZ(),4.17f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,360000); + m_creature->SummonCreature(NPC_RISEN_WITCH_DOCTOR,(m_creature->GetPositionX()-5)+rand()%10, (m_creature->GetPositionY()-5)+rand()%10, m_creature->GetPositionZ(),4.17f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,360000); + m_creature->SummonCreature(NPC_ABON,(m_creature->GetPositionX()-5)+rand()%10, (m_creature->GetPositionY()-5)+rand()%10, m_creature->GetPositionZ(),4.17f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,360000); + m_creature->SummonCreature(NPC_ABON,(m_creature->GetPositionX()-5)+rand()%10, (m_creature->GetPositionY()-5)+rand()%10, m_creature->GetPositionZ(),4.17f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,360000); + m_pInstance->SetData(TYPE_ICE_WALL_03, DONE); + StepTimer = 100; + Step = 0; + break; + } + } + + void Wall04() + { + switch(Step) + { + case 0: + SetEscortPaused(true); + DoCast(m_creature, SPELL_RAISE_DEAD); + DoScriptText(SAY_LICH_KING_GNOUL, m_creature); + StepTimer = 10000; + ++Step; + break; + case 1: + SetEscortPaused(false); + m_creature->SummonCreature(NPC_RISEN_WITCH_DOCTOR,(m_creature->GetPositionX()-5)+rand()%10, (m_creature->GetPositionY()-5)+rand()%10, m_creature->GetPositionZ(),4.17f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,360000); + m_creature->SummonCreature(NPC_RISEN_WITCH_DOCTOR,(m_creature->GetPositionX()-5)+rand()%10, (m_creature->GetPositionY()-5)+rand()%10, m_creature->GetPositionZ(),4.17f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,360000); + m_creature->SummonCreature(NPC_RISEN_WITCH_DOCTOR,(m_creature->GetPositionX()-5)+rand()%10, (m_creature->GetPositionY()-5)+rand()%10, m_creature->GetPositionZ(),4.17f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,360000); + m_creature->SummonCreature(NPC_ABON,(m_creature->GetPositionX()-5)+rand()%10, (m_creature->GetPositionY()-5)+rand()%10, m_creature->GetPositionZ(),4.17f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,360000); + m_creature->SummonCreature(NPC_ABON,(m_creature->GetPositionX()-5)+rand()%10, (m_creature->GetPositionY()-5)+rand()%10, m_creature->GetPositionZ(),4.17f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,360000); + StepTimer = 15000; + ++Step; + break; + case 2: + DoScriptText(SAY_LICH_KING_ABON, m_creature); + m_creature->SummonCreature(NPC_RISEN_WITCH_DOCTOR,(m_creature->GetPositionX()-5)+rand()%10, (m_creature->GetPositionY()-5)+rand()%10, m_creature->GetPositionZ(),4.17f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,360000); + m_creature->SummonCreature(NPC_RISEN_WITCH_DOCTOR,(m_creature->GetPositionX()-5)+rand()%10, (m_creature->GetPositionY()-5)+rand()%10, m_creature->GetPositionZ(),4.17f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,360000); + m_pInstance->SetData(TYPE_ICE_WALL_04, DONE); + ++Step; + break; + } + } + + void UpdateEscortAI(const uint32 diff) + { + if(!m_pInstance) return; + + if(m_pInstance->GetData(TYPE_LICH_KING) != IN_PROGRESS) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } + + if(m_creature->isInCombat() && m_pInstance->GetData(TYPE_LICH_KING) == IN_PROGRESS) + npc_escortAI::EnterEvadeMode(); + + if(m_pInstance->GetData(TYPE_LICH_KING) == IN_PROGRESS && StartEscort != true) + { + StartEscort = true; + if(m_creature->HasAura(SPELL_ICE_PRISON)) + m_creature->RemoveAurasDueToSpell(SPELL_ICE_PRISON); + if(m_creature->HasAura(SPELL_DARK_ARROW)) + m_creature->RemoveAurasDueToSpell(SPELL_DARK_ARROW); + + NonFight = true; + m_creature->AttackStop(); + m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); + m_creature->SetSpeedRate(MOVE_WALK, 2.0f, true); + if (boss_lich_king_hrAI* pEscortAI = dynamic_cast(m_creature->AI())) + pEscortAI->Start(false, false); + Step = 0; + StepTimer = 100; + } + + if(m_pInstance->GetData(TYPE_ICE_WALL_01) == IN_PROGRESS) + { + if(StepTimer < diff) + Wall01(); + else StepTimer -= diff; + } + + if(m_pInstance->GetData(TYPE_ICE_WALL_02) == IN_PROGRESS) + { + if(StepTimer < diff) + Wall02(); + else StepTimer -= diff; + } + + if(m_pInstance->GetData(TYPE_ICE_WALL_03) == IN_PROGRESS) + { + if(StepTimer < diff) + Wall03(); + else StepTimer -= diff; + } + + if(m_pInstance->GetData(TYPE_ICE_WALL_04) == IN_PROGRESS) + { + if(StepTimer < diff) + Wall04(); + else StepTimer -= diff; + } + return; + } +}; + +struct MANGOS_DLL_DECL npc_raging_gnoulAI : public ScriptedAI +{ + npc_raging_gnoulAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_creature->SetActiveObjectState(true); + Reset(); + } + +ScriptedInstance* m_pInstance; +uint32 EmergeTimer; +bool Emerge; +uint64 m_uiLiderGUID; + + void Reset() + { + DoCast(m_creature, SPELL_EMERGE_VISUAL); + EmergeTimer = 4000; + Emerge = false; + } + + void JustDied(Unit* pKiller) + { + } + + void AttackStart(Unit* who) + { + if (!who) + return; + + if(Emerge == false) return; + + ScriptedAI::AttackStart(who); + } + + void UpdateAI(const uint32 diff) + { + if(!m_pInstance) return; + + if(m_pInstance->GetData(TYPE_LICH_KING) == IN_PROGRESS) + { + if(Emerge != true) + { + if(EmergeTimer < diff) + { + m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + Emerge = true; + m_uiLiderGUID = m_pInstance->GetData64(DATA_ESCAPE_LIDER); + if(Creature* pLider = ((Creature*)Unit::GetUnit((*m_creature), m_uiLiderGUID))) + { + DoResetThreat(); + m_creature->AI()->AttackStart(pLider); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveChase(pLider); + m_creature->AddThreat(pLider); + } + + } else EmergeTimer -= diff; + } + } + + DoMeleeAttackIfReady(); + + } +}; + +struct MANGOS_DLL_DECL npc_risen_witch_doctorAI : public ScriptedAI +{ + npc_risen_witch_doctorAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_creature->SetActiveObjectState(true); + Reset(); + } + +ScriptedInstance* m_pInstance; +uint32 EmergeTimer; +bool Emerge; +uint64 m_uiLiderGUID; + + void Reset() + { + DoCast(m_creature, SPELL_EMERGE_VISUAL); + EmergeTimer = 5000; + Emerge = false; + } + + void JustDied(Unit* pKiller) + { + } + + void AttackStart(Unit* who) + { + if (!who) + return; + + if(Emerge == false) return; + + ScriptedAI::AttackStart(who); + } + + void UpdateAI(const uint32 diff) + { + if(!m_pInstance) return; + + if(m_pInstance->GetData(TYPE_LICH_KING) == IN_PROGRESS) + { + if(Emerge != true) + { + if(EmergeTimer < diff) + { + m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + Emerge = true; + m_uiLiderGUID = m_pInstance->GetData64(DATA_ESCAPE_LIDER); + if(Creature* pLider = ((Creature*)Unit::GetUnit((*m_creature), m_uiLiderGUID))) + { + DoResetThreat(); + m_creature->AI()->AttackStart(pLider); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveChase(pLider); + m_creature->AddThreat(pLider); + } + + } else EmergeTimer -= diff; + } + } + + DoMeleeAttackIfReady(); + + } +}; + +struct MANGOS_DLL_DECL npc_abonAI : public ScriptedAI +{ + npc_abonAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_creature->SetActiveObjectState(true); + Reset(); + } + +ScriptedInstance* m_pInstance; +uint64 m_uiLiderGUID; +bool Walk; + + void Reset() + { + Walk = false; + } + + void UpdateAI(const uint32 diff) + { + if(!m_pInstance) return; + + if(m_pInstance->GetData(TYPE_LICH_KING) == IN_PROGRESS) + { + if(Walk != true) + { + m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + Walk = true; + m_uiLiderGUID = m_pInstance->GetData64(DATA_ESCAPE_LIDER); + if(Creature* pLider = ((Creature*)Unit::GetUnit((*m_creature), m_uiLiderGUID))) + { + DoResetThreat(); + m_creature->AI()->AttackStart(pLider); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveChase(pLider); + m_creature->AddThreat(pLider); + } + } + } + + DoMeleeAttackIfReady(); + + } +}; + +CreatureAI* GetAI_boss_lich_king_hr(Creature* pCreature) +{ + return new boss_lich_king_hrAI(pCreature); +} + +CreatureAI* GetAI_npc_raging_gnoul(Creature* pCreature) +{ + return new npc_raging_gnoulAI(pCreature); +} + +CreatureAI* GetAI_npc_risen_witch_doctor(Creature* pCreature) +{ + return new npc_risen_witch_doctorAI(pCreature); +} + +CreatureAI* GetAI_npc_abon(Creature* pCreature) +{ + return new npc_abonAI(pCreature); +} + +void AddSC_boss_lich_king_hr() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "boss_lich_king_hr"; + newscript->GetAI = &GetAI_boss_lich_king_hr; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_raging_gnoul"; + newscript->GetAI = &GetAI_npc_raging_gnoul; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_risen_witch_doctor"; + newscript->GetAI = &GetAI_npc_risen_witch_doctor; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_abon"; + newscript->GetAI = &GetAI_npc_abon; + newscript->RegisterSelf(); +} \ No newline at end of file diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_marwyn.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_marwyn.cpp index c4e08caf6..f63e9cfcb 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_marwyn.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_marwyn.cpp @@ -16,8 +16,9 @@ /* ScriptData SDName: boss_marwyn -SD%Complete: 30% -SDComment: by /dev/rsa +SD%Complete: 60% +SDComment: +SDAuthor: /dev/rsa, rewrited by MaxXx2021 aka Mioka SDCategory: Halls of Reflection EndScriptData */ @@ -26,194 +27,243 @@ EndScriptData */ enum { - //common - SPELL_BERSERK = 47008, - //yells - //summons - //Abilities - SPELL_OBLITERATE_N = 72360, - SPELL_SHARED_SUFFERING_N = 72368, - SPELL_WELL_OF_CORRUPTION = 72362, - SPELL_CORRUPTED_FLESH_N = 72363, - - SPELL_OBLITERATE_H = 72434, - SPELL_SHARED_SUFFERING_H = 72369, - SPELL_CORRUPTED_FLESH_H = 72436, + SAY_MARWYN_INTRO = -1594506, + SAY_MARWYN_AGGRO = -1594513, + SAY_MARWYN_DEATH = -1594514, + SAY_MARWYN_SLAY01 = -1594515, + SAY_MARWYN_SLAY02 = -1594516, + SAY_MARWYN_SP01 = -1594517, + SAY_MARWYN_SP02 = -1594518, + SPELL_OBLITERATE_N = 72360, + SPELL_OBLITERATE_H = 72434, + SPELL_SHARED_SUFFERING_N = 72368, + SPELL_SHARED_SUFFERING_H = 72369, + SPELL_WELL_OF_CORRUPTION = 72362, + SPELL_CORRUPTED_FLESH_N = 72363, + SPELL_CORRUPTED_FLESH_H = 72436, + + SPELL_BERSERK = 47008, }; struct MANGOS_DLL_DECL boss_marwynAI : public ScriptedAI { - boss_marwynAI(Creature* pCreature) : ScriptedAI(pCreature) - { + boss_marwynAI(Creature *pCreature) : ScriptedAI(pCreature) + { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Regular = pCreature->GetMap()->IsRegularDifficulty(); Reset(); - } + } - bool Regular; - ScriptedInstance *m_pInstance; - uint32 m_uiBerserk_Timer; - uint32 m_uiSharedSuffering_Timer; - uint32 m_uiWell_Timer; - uint32 m_uiTouch_Timer; - uint32 m_uiFlesh_Timer; - uint32 m_uiObliterate_Timer; - uint32 m_uiSummon_Timer; - - uint8 health; - uint8 stage; - uint8 SummonCount; - - uint64 npctype1; - uint64 npctype2; - uint64 npctype3; - - void Reset() - { - m_uiBerserk_Timer = 180000; - m_uiSharedSuffering_Timer = 4000; - m_uiWell_Timer = 5000; - m_uiTouch_Timer = 8000; - m_uiFlesh_Timer = 10000; - m_uiObliterate_Timer = 1000; - SummonCount = 0; - stage = 0; - m_uiSummon_Timer = 0; - if (m_pInstance) - m_pInstance->SetData(TYPE_MARWYN, NOT_STARTED); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->SetVisibility(VISIBILITY_OFF); + ScriptedInstance* m_pInstance; + bool Regular; + bool m_bIsCall; + uint32 m_uiBerserkTimer; + uint32 m_uiSharedSufferingTimer; + uint32 m_uiWellTimer; + uint32 m_uiTouchTimer; + uint32 m_uiFleshTimer; + uint32 m_uiObliterateTimer; + uint32 m_uiSummonTimer; + + uint32 m_uiLocNo; + uint64 m_uiSummonGUID[16]; + uint32 m_uiCheckSummon; + + uint8 SummonCount; + + uint64 pSummon; + + void Reset() + { + m_uiBerserkTimer = 180000; + m_uiSharedSufferingTimer = 4000; + m_uiWellTimer = 12000; + m_uiTouchTimer = 8000; + m_uiFleshTimer = 21000; + m_uiObliterateTimer = 5000; + SummonCount = 0; + m_bIsCall = false; + m_uiSummonTimer = 15000; + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetVisibility(VISIBILITY_OFF); } - bool CallGuards(TempSummonType type, uint32 _summontime ) + void Summon() { - switch(urand(0,3)) - { - case 0: { - npctype1 = NPC_DARK_1; - npctype2 = NPC_DARK_3; - npctype3 = NPC_DARK_6; - break;} - case 1: { - npctype1 = NPC_DARK_2; - npctype2 = NPC_DARK_3; - npctype3 = NPC_DARK_4; - break;} - case 2: { - npctype1 = NPC_DARK_2; - npctype2 = NPC_DARK_5; - npctype3 = NPC_DARK_6; - break;} - case 3: { - npctype1 = NPC_DARK_1; - npctype2 = NPC_DARK_5; - npctype3 = NPC_DARK_4; - break;} - } + m_uiLocNo = 14; - if (Creature* pSummon1 = m_creature->SummonCreature(npctype1, SpawnLoc[0].x, SpawnLoc[0].y, SpawnLoc[0].z, 0, type, _summontime)) - pSummon1->SetInCombatWithZone(); - if (Creature* pSummon2 = m_creature->SummonCreature(npctype2, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z, 0, type, _summontime)) - pSummon2->SetInCombatWithZone(); - if (Creature* pSummon3 = m_creature->SummonCreature(npctype3, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, 0, type, _summontime)) - pSummon3->SetInCombatWithZone(); + for(uint8 i = 0; i < 14; i++) + { + switch(urand(0,3)) + { + case 0: + switch(urand(1, 3)) + { + case 1: pSummon = NPC_DARK_1; break; + case 2: pSummon = NPC_DARK_3; break; + case 3: pSummon = NPC_DARK_6; break; + } + break; + case 1: + switch(urand(1, 3)) + { + case 1: pSummon = NPC_DARK_2; break; + case 2: pSummon = NPC_DARK_3; break; + case 3: pSummon = NPC_DARK_4; break; + } + break; + case 2: + switch(urand(1, 3)) + { + case 1: pSummon = NPC_DARK_2; break; + case 2: pSummon = NPC_DARK_5; break; + case 3: pSummon = NPC_DARK_6; break; + } + break; + case 3: + switch(urand(1, 3)) + { + case 1: pSummon = NPC_DARK_1; break; + case 2: pSummon = NPC_DARK_5; break; + case 3: pSummon = NPC_DARK_4; break; + } + break; + } - return true; + m_uiCheckSummon = 0; + + if(Creature* Summon = m_creature->SummonCreature(pSummon, SpawnLoc[m_uiLocNo].x, SpawnLoc[m_uiLocNo].y, SpawnLoc[m_uiLocNo].z, SpawnLoc[m_uiLocNo].o, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000)) + { + m_uiSummonGUID[i] = Summon->GetGUID(); + Summon->setFaction(974); + } + m_uiLocNo++; + } } - void AttackStart(Unit* pWho) + void CallFallSoldier() { - if (!m_pInstance) return; + for(uint8 i = 0; i < 4; i++) + { + if(Creature* Summon = m_pInstance->instance->GetCreature(m_uiSummonGUID[m_uiCheckSummon])) + { + Summon->setFaction(14); + Summon->SetInCombatWithZone(); + } + m_uiCheckSummon++; + } + } - if (m_pInstance->GetData(TYPE_MARWYN) != IN_PROGRESS) return; + void JustDied(Unit* pKiller) + { + if(m_pInstance) + { + m_pInstance->SetData(TYPE_MARWYN, DONE); + m_pInstance->SetData(TYPE_PHASE, 3); + } - if (!pWho || pWho == m_creature) return; + DoScriptText(SAY_MARWYN_DEATH, m_creature); + } - if (m_creature->Attack(pWho, true)) { - m_creature->AddThreat(pWho); - m_creature->SetInCombatWith(pWho); - pWho->SetInCombatWith(m_creature); - DoStartMovement(pWho); + void KilledUnit(Unit* pVictim) + { + switch(urand(0,1)) + { + case 0: DoScriptText(SAY_MARWYN_SLAY01, m_creature); break; + case 1: DoScriptText(SAY_MARWYN_SLAY02, m_creature); break; } } - void Aggro(Unit *who) + void Aggro(Unit* pVictim) { -// if(m_pInstance) m_pInstance->SetData(TYPE_MARWYN, IN_PROGRESS); + m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + DoScriptText(SAY_MARWYN_AGGRO, m_creature); } - void JustDied(Unit *killer) - { - if(m_pInstance) m_pInstance->SetData(TYPE_MARWYN, DONE); + void AttackStart(Unit* who) + { + if (m_pInstance) + if (m_pInstance->GetData(TYPE_MARWYN) != IN_PROGRESS) + return; + + ScriptedAI::AttackStart(who); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - if (m_pInstance->GetData(TYPE_MARWYN) == SPECIAL ) { - if (m_uiSummon_Timer < diff) { - ++SummonCount; - if (SummonCount > MOB_WAVES_NUM_1) { - m_pInstance->SetData(TYPE_MARWYN, IN_PROGRESS); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->SetVisibility(VISIBILITY_ON); - m_creature->SetInCombatWithZone(); - } - else CallGuards(TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60000); - m_uiSummon_Timer = MOB_WAVES_DELAY_1; - } else m_uiSummon_Timer -= diff; + if(!m_pInstance) return; + + if (m_pInstance->GetData(TYPE_FALRIC) == SPECIAL) + { + if(!m_bIsCall) + { + m_bIsCall = true; + Summon(); + } + } + + if(m_pInstance->GetData(TYPE_MARWYN) == SPECIAL) + { + if(m_uiSummonTimer < uiDiff) + { + ++SummonCount; + if(SummonCount == 1) + DoScriptText(SAY_MARWYN_INTRO, m_creature); + + if(SummonCount > 4) + { + m_pInstance->SetData(TYPE_MARWYN, IN_PROGRESS); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetInCombatWithZone(); + } + else CallFallSoldier(); + m_uiSummonTimer = 60000; + } else m_uiSummonTimer -= uiDiff; } - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - switch(stage) + if(m_uiObliterateTimer < uiDiff) { - case 0: { - break;} - case 1: { - if (m_uiSharedSuffering_Timer < diff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCast(pTarget, Regular ? SPELL_SHARED_SUFFERING_N : SPELL_SHARED_SUFFERING_H); - m_uiSharedSuffering_Timer= 20000; - } else m_uiSharedSuffering_Timer -= diff; - - if (m_uiWell_Timer < diff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCast(pTarget, SPELL_WELL_OF_CORRUPTION); - m_uiWell_Timer= 30000; - } else m_uiWell_Timer -= diff; - -/* if (m_uiTouch_Timer < diff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCast(pTarget, Regular ? SPELL_WELL_OF_CORRUPTION_N : SPELL_WELL_OF_CORRUPTION_H); - m_uiTouch_Timer= 30000; - } else m_uiTouch_Timer -= diff; -*/ - if (m_uiFlesh_Timer < diff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCast(pTarget, Regular ? SPELL_CORRUPTED_FLESH_N : SPELL_CORRUPTED_FLESH_H); - m_uiWell_Timer= 10000; - } else m_uiWell_Timer -= diff; - - if (m_uiObliterate_Timer < diff) - {DoCastSpellIfCan(m_creature->getVictim(), Regular ? SPELL_OBLITERATE_N : SPELL_OBLITERATE_H); - m_uiObliterate_Timer=urand(8000,12000); - } else m_uiObliterate_Timer -= diff; - } - } + DoCast(m_creature->getVictim(), Regular ? SPELL_OBLITERATE_N : SPELL_OBLITERATE_H); + m_uiObliterateTimer = urand(8000, 12000); + } else m_uiObliterateTimer -= uiDiff; + + if (m_uiWellTimer < uiDiff) + { + DoScriptText(SAY_MARWYN_SP02, m_creature); + if(Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCast(pTarget, SPELL_WELL_OF_CORRUPTION); + m_uiWellTimer= urand(25000, 30000); + } else m_uiWellTimer -= uiDiff; + if (m_uiSharedSufferingTimer < uiDiff) + { + if(Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCast(pTarget, Regular ? SPELL_SHARED_SUFFERING_N : SPELL_SHARED_SUFFERING_H); + m_uiSharedSufferingTimer = urand(15000, 20000); + } else m_uiSharedSufferingTimer -= uiDiff; + if (m_uiFleshTimer < uiDiff) + { + DoScriptText(SAY_MARWYN_SP01, m_creature); + if(Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCast(pTarget, Regular ? SPELL_CORRUPTED_FLESH_N : SPELL_CORRUPTED_FLESH_H); + m_uiFleshTimer = urand(10000, 16000); + } else m_uiFleshTimer -= uiDiff; - if (m_uiBerserk_Timer < diff) + if(m_uiBerserkTimer < uiDiff) { DoCast(m_creature, SPELL_BERSERK); - m_uiBerserk_Timer = 180000; - } else m_uiBerserk_Timer -= diff; + m_uiBerserkTimer = 180000; + } else m_uiBerserkTimer -= uiDiff; DoMeleeAttackIfReady(); + + return; } }; @@ -225,8 +275,9 @@ CreatureAI* GetAI_boss_marwyn(Creature* pCreature) void AddSC_boss_marwyn() { Script *newscript; + newscript = new Script; newscript->Name = "boss_marwyn"; newscript->GetAI = &GetAI_boss_marwyn; newscript->RegisterSelf(); -} +} \ No newline at end of file diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/def_halls.h b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/def_halls.h index ac095ccd8..85bce27d5 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/def_halls.h +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/def_halls.h @@ -1,65 +1,113 @@ +#ifndef DEF_HALL_OF_REFLECTION_H +#define DEF_HALL_OF_REFLECTION_H -#ifndef DEF_ICECROWN_HALLS_H -#define DEF_ICECROWN_HALLS_H - -enum +enum Data { - MAX_ENCOUNTERS = 7, - - TYPE_START_EVENT = 0, - TYPE_FALRYN = 1, - TYPE_MARWYN = 2, - TYPE_LICH_KING_1 = 3, - TYPE_FROST_GENERAL = 4, - TYPE_LICH_KING_BATTLE = 5, - TYPE_ESCAPE = 6, - - NPC_FALRYN = 38112, - NPC_MARWYN = 38113, - NPC_LICH_KING = 37226, + TYPE_PHASE = 0, + TYPE_EVENT = 1, + TYPE_FALRIC = 2, + TYPE_MARWYN = 3, + TYPE_LICH_KING = 4, + TYPE_ICE_WALL_01 = 5, + TYPE_ICE_WALL_02 = 6, + TYPE_ICE_WALL_03 = 7, + TYPE_ICE_WALL_04 = 8, + TYPE_HALLS = 9, + MAX_ENCOUNTERS, - NPC_PRAUDMUR_0 = 37221, - NPC_PRAUDMUR_1 = 36955, - NPC_PRAUDMUR_2 = 36955, - NPC_SYLVANA_0 = 37223, - NPC_SYLVANA_1 = 37554, - NPC_SYLVANA_2 = 37554, + DATA_ESCAPE_LIDER = 101, + DATA_LIDER = 102, + /*UNITS*/ NPC_DARK_1 = 38177, //Shadowy Mercenary NPC_DARK_2 = 38176, //Tortured Rifleman NPC_DARK_3 = 38173, //Spectral Footman NPC_DARK_4 = 38172, //Phantom Mage NPC_DARK_5 = 38567, //Phantom Hallucination NPC_DARK_6 = 38175, //Ghostly Priest + NPC_JAINA = 37221, + NPC_SYLVANA = 37223, + NPC_JAINA_OUTRO = 36955, + NPC_SYLVANA_OUTRO = 37554, + NPC_ALTAR_TARGET = 37704, + NPC_UTHER = 37225, + NPC_LICH_KING = 36954, + BOSS_LICH_KING = 37226, + NPC_ICE_WALL = 37014, + NPC_FALRIC = 38112, + NPC_MARWYN = 38113, + NPC_GHOSTLY_ROGUE = 38177, + NPC_GHOSTLY_PRIEST = 38175, + NPC_GHOSTLY_MAGE = 38172, + NPC_GHOSTLY_FOOTMAN = 38173, + NPC_GHOSTLY_RIFLEMAN = 38176, + NPC_GLUK = 38567, + + NPC_RAGING_GNOUL = 36940, + NPC_RISEN_WITCH_DOCTOR = 36941, + NPC_ABON = 37069, NPC_FROST_GENERAL = 36723, GO_ICECROWN_DOOR = 201976, //72802 + GO_ICECROWN_DOOR_3 = 197343, GO_IMPENETRABLE_DOOR = 197341, //72801 GO_FROSTMOURNE_ALTAR = 202236, //3551 GO_FROSTMOURNE = 202302, //364 + GO_ICE_WALL = 201385, + GO_CAVE = 201596, + GO_PORTAL = 202079, + GO_CAPTAIN_CHEST_1 = 202212, //3145 GO_CAPTAIN_CHEST_2 = 201710, //30357 GO_CAPTAIN_CHEST_3 = 202337, //3246 GO_CAPTAIN_CHEST_4 = 202336, //3333 - - MOB_WAVES_NUM_1 = 4, - MOB_WAVES_DELAY_1 = 25000, //in milliseconds - }; -struct Locations +struct _Locations { - float x, y, z; + float x, y, z, o; uint32 id; }; -static Locations SpawnLoc[]= +static _Locations SpawnLoc[]= { - {5325.330078, 1976.609985, 707.695007}, // 0 Марвин - {5274.630859, 2040.283813, 709.319824}, // 1 Фалрик - {5346.934570, 2044.740234, 707.695801}, // 2 Выход + //Wing 01 + {5277.409f, 1993.161f, 707.694f, 0.05f}, //27 + {5301.876f, 2041.699f, 707.694f, 4.71f}, //1 + {5339.830f, 2020.887f, 707.694f, 3.14f}, //13 + {5311.041f, 2042.935f, 707.694f, 4.71f}, //3 + {5314.750f, 2039.969f, 707.694f, 4.71f}, //4 + {5342.823f, 2003.801f, 707.694f, 3.14f}, //10 + {5311.579f, 1972.823f, 707.694f, 1.62f}, //16 + + //Wing 02 + {5272.491f, 2005.673f, 707.694f, 0.05f}, //23 + {5302.669f, 1973.050f, 707.694f, 1.62f}, //18 + {5346.187f, 2008.058f, 707.694f, 3.14f}, //9 + {5319.752f, 2041.321f, 707.694f, 4.71f}, //5 + {5344.882f, 1998.714f, 707.694f, 3.14f}, //11 + {5340.552f, 1994.735f, 707.694f, 3.14f}, //12 + {5306.441f, 2040.358f, 707.694f, 4.71f}, //2 + + //Wing 03 + {5273.297f, 2014.009f, 707.694f, 0.05f}, //25 + {5316.062f, 1970.777f, 707.694f, 1.62f}, //15 + {5322.498f, 2037.415f, 707.694f, 4.71f}, //6 + {5307.087f, 1970.065f, 707.694f, 1.62f}, //17 + {5342.460f, 2012.391f, 707.694f, 3.14f}, //8 + {5297.601f, 1971.420f, 707.694f, 1.62f}, //19 + {5295.668f, 1975.853f, 707.694f, 1.62f}, //20 + + //Wing 04 + {5273.661f, 1996.767f, 707.694f, 0.05f}, //21 + {5275.228f, 2001.275f, 707.694f, 0.05f}, //22 + {5344.153f, 2017.753f, 707.694f, 3.14f}, //7 + {5275.310f, 2009.686f, 707.694f, 0.05f}, //24 + {5319.835f, 1975.177f, 707.694f, 1.62f}, //14 + {5277.445f, 2017.197f, 707.694f, 0.05f}, //26 + {5298.198f, 2037.762f, 707.694f, 4.71f} //0 }; -#endif +#endif \ No newline at end of file diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.cpp new file mode 100644 index 000000000..ea42f7f38 --- /dev/null +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.cpp @@ -0,0 +1,1323 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Hall Of Reflection +SD%Complete: Who knows? :D +SDComment: event script! +SDErrors: They have, but i dont know were it! :D +SDCategory: hall_of_reflection +SDAuthor: MaxXx2021 aka Mioka +EndScriptData */ + +#include "precompiled.h" +#include "def_halls.h" +#include "escort_ai.h" + +enum +{ + /*INTRO - Pre Uther*/ + SAY_JAINA_INTRO_01 = -1594433, + SAY_SYLVANA_INTRO_01 = -1594434, + SAY_JAINA_INTRO_02 = -1594435, + SAY_JAINA_INTRO_03 = -1594436, + SAY_SYLVANA_INTRO_03 = -1594437, + SAY_JAINA_INTRO_04 = -1594438, + SAY_SYLVANA_INTRO_04 = -1594439, + + /*INTRO - Uther Dialog*/ + SAY_UTHER_A_01 = -1594440, + SAY_UTHER_H_01 = -1594441, + SAY_JAINA_02 = -1594442, + SAY_SYLVANA_02 = -1594443, + SAY_UTHER_A_03 = -1594444, + SAY_UTHER_H_03 = -1594445, + SAY_JAINA_04 = -1594446, + SAY_SYLVANA_04 = -1594447, + SAY_UTHER_A_05 = -1594448, + SAY_UTHER_H_05 = -1594449, + SAY_JAINA_06 = -1594450, + SAY_SYLVANA_06 = -1594451, + SAY_UTHER_A_07 = -1594452, + SAY_UTHER_H_07 = -1594453, + SAY_JAINA_08 = -1594454, + SAY_SYLVANA_08 = -1594455, + SAY_UTHER_A_09 = -1594456, + SAY_UTHER_H_09 = -1594457, + SAY_JAINA_10 = -1594458, + SAY_UTHER_A_11 = -1594459, + SAY_UTHER_H_11 = -1594460, + SAY_JAINA_12 = -1594461, + SAY_SYLVANA_12 = -1594462, + SAY_UTHER_A_13 = -1594463, + SAY_UTHER_A_14 = -1594464, + SAY_JAINA_15 = -1594465, + + /*INTRO - Lich King Arrive*/ + SAY_UTHER_A_16 = -1594466, + SAY_UTHER_H_16 = -1594467, + SAY_LICH_KING_17 = -1594468, + SAY_LICH_KING_18 = -1594469, + SAY_LICH_KING_19 = -1594470, + SAY_JAINA_20 = -1594471, + SAY_SYLVANA_20 = -1594472, + SAY_LICH_KING_A_21 = -1594473, + SAY_LICH_KING_H_21 = -1594474, + SAY_FALRIC_INTRO = -1594475, + SAY_MARWYN_INTRO = -1594476, + SAY_FALRIC_INTRO2 = -1594505, + + /*INTRO - Pre Escape*/ + SAY_LICH_KING_AGGRO_A = -1594477, + SAY_LICH_KING_AGGRO_H = -1594478, + SAY_JAINA_AGGRO = -1594479, + SAY_SYLVANA_AGGRO = -1594480, + + /*ESCAPE*/ + SAY_JAINA_WALL_01 = -1594487, + SAY_SYLVANA_WALL_01 = -1594488, + SAY_JAINA_WALL_02 = -1594489, + SAY_SYLVANA_WALL_02 = -1594490, + SAY_LICH_KING_WALL_02 = -1594491, + SAY_LICH_KING_WALL_03 = -1594492, + SAY_LICH_KING_WALL_04 = -1594493, + SAY_JAINA_WALL_03 = -1594494, + SAY_JAINA_WALL_04 = -1594495, + SAY_SYLVANA_WALL_03 = -1594496, + SAY_SYLVANA_WALL_04 = -1594497, + SAY_JAINA_ESCAPE_01 = -1594498, + SAY_JAINA_ESCAPE_02 = -1594499, + SAY_SYLVANA_ESCAPE_01 = -1594500, + SAY_SYLVANA_ESCAPE_02 = -1594501, + SAY_JAINA_TRAP = -1594502, + SAY_SYLVANA_TRAP = -1594503, + SAY_MATHEAS_JAINA = -1594505, + SAY_LICH_KING_END_01 = -1594506, + SAY_LICH_KING_END_02 = -1594507, + SAY_LICH_KING_END_03 = -1594508, + + SAY_ESCAPE_01 = -1594531, + SAY_ESCAPE_02 = -1594532, + SAY_ESCAPE_03 = -1594533, + + + /*SPELLS AND VISUAL EFFECTS*/ + SPELL_TAKE_FROSTMOURNE = 72729, + SPELL_FROSTMOURNE_DESPAWN = 72726, + SPELL_FROSTMOURNE_SOUNDS = 70667, + SPELL_CAST_VISUAL = 65633, //Jaina And Sylavana cast this when summon uther. + SPELL_BOSS_SPAWN_AURA = 72712, //Falric and Marwyn + SPELL_UTHER_DESPAWN = 70693, + SPELL_WINTER = 69780, + SPELL_FURY_OF_FROSTMOURNE = 70063, + SPELL_SOUL_REAPER = 73797, + SPELL_RAISE_DEAD = 69818, + SPELL_ICE_PRISON = 69708, + SPELL_DARK_ARROW = 70194, + SPELL_ICE_BARRIER = 69787, + SPELL_DESTROY_ICE_WALL_01 = 69784, //Jaina + SPELL_DESTROY_ICE_WALL_02 = 70224, + SPELL_DESTROY_ICE_WALL_03 = 70225, //Sylvana + SPELL_SUMMON_ICE_WALL = 69784, + SPELL_SYLVANA_JUMP = 68339, + SPELL_SYLVANA_STEP = 69087, + SPELL_SILENCE = 69413, + SPELL_LICH_KING_CAST = 57561, + SPELL_FROSTMOURNE_VISUAL = 73220, + + FACTION = 2076, +}; + +struct MANGOS_DLL_DECL npc_jaina_and_sylvana_HRintroAI : public ScriptedAI +{ + npc_jaina_and_sylvana_HRintroAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 StepTimer; + uint32 Step; + uint64 m_uiFrostmourneGUID; + uint64 m_uiMainGateGUID; + uint64 m_uiFalricGUID; + uint64 m_uiMarwynGUID; + Creature* pUther; + Creature* pLichKing; + bool Small; + + void Reset() + { + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + Small = false; + } + + void StartEvent() + { + if(!m_pInstance) return + debug_log("EventMGR: creature %u received signal %u ",m_creature->GetEntry(),m_pInstance->GetData(TYPE_EVENT)); + m_pInstance->SetData(TYPE_PHASE, 1); + m_pInstance->SetData(TYPE_EVENT, 0); + Step = 1; + StepTimer = 100; + } + + void JumpNextStep(uint32 Time) + { + StepTimer = Time; + Step++; + } + + void Event() + { + switch(Step) + { + case 1: + m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + JumpNextStep(2000); + break; + case 2: + if(m_creature->GetEntry() == NPC_JAINA) + { + DoScriptText(SAY_JAINA_INTRO_01, m_creature); + JumpNextStep(5000); + } + if(m_creature->GetEntry() == NPC_SYLVANA) + { + DoScriptText(SAY_SYLVANA_INTRO_01, m_creature); + JumpNextStep(8000); + } + break; + case 3: + if(m_creature->GetEntry() == NPC_JAINA) + { + DoScriptText(SAY_JAINA_INTRO_02, m_creature); + JumpNextStep(5000); + } + if(m_creature->GetEntry() == NPC_SYLVANA) + JumpNextStep(500); + break; + case 4: + m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + m_creature->GetMotionMaster()->MovePoint(0, 5307.031f, 1997.920f, 709.341f); + JumpNextStep(10000); + break; + case 5: + if(Creature* pTarget = m_creature->SummonCreature(NPC_ALTAR_TARGET,5309.374f,2006.788f,711.615f,1.37f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,360000)) + m_creature->SetUInt64Value(UNIT_FIELD_TARGET, pTarget->GetGUID()); + JumpNextStep(1000); + break; + case 6: + if(m_creature->GetEntry() == NPC_JAINA) + { + DoScriptText(SAY_JAINA_INTRO_03, m_creature); + JumpNextStep(5000); + } + if(m_creature->GetEntry() == NPC_SYLVANA) + { + DoScriptText(SAY_SYLVANA_INTRO_03, m_creature); + JumpNextStep(6000); + } + break; + case 7: + DoCast(m_creature, SPELL_CAST_VISUAL); + if(m_creature->GetEntry() == NPC_JAINA) + DoScriptText(SAY_JAINA_INTRO_04, m_creature); + if(m_creature->GetEntry() == NPC_SYLVANA) + DoScriptText(SAY_SYLVANA_INTRO_04, m_creature); + JumpNextStep(3000); + break; + case 8: + DoCast(m_creature, SPELL_FROSTMOURNE_SOUNDS); + m_uiFrostmourneGUID = m_pInstance->GetData64(GO_FROSTMOURNE); + if(GameObject* pFrostmourne = m_pInstance->instance->GetGameObject(m_uiFrostmourneGUID)) + pFrostmourne->SetGoState(GO_STATE_ACTIVE); + if(m_creature->GetEntry() == NPC_JAINA) + JumpNextStep(12000); + if(m_creature->GetEntry() == NPC_SYLVANA) + JumpNextStep(8000); + break; + case 9: + if(Creature* Uther = m_creature->SummonCreature(NPC_UTHER,5308.228f,2003.641f,709.341f,4.17f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,360000)) + { + pUther = Uther; + Uther->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->GetGUID()); + m_creature->SetUInt64Value(UNIT_FIELD_TARGET, Uther->GetGUID()); + if(m_creature->GetEntry() == NPC_JAINA) + { + DoScriptText(SAY_UTHER_A_01, Uther); + JumpNextStep(3000); + } + if(m_creature->GetEntry() == NPC_SYLVANA) + { + DoScriptText(SAY_UTHER_H_01, Uther); + JumpNextStep(10000); + } + } + break; + case 10: + if(m_creature->GetEntry() == NPC_JAINA) + { + DoScriptText(SAY_JAINA_02, m_creature); + JumpNextStep(5000); + } + if(m_creature->GetEntry() == NPC_SYLVANA) + { + DoScriptText(SAY_SYLVANA_02, m_creature); + JumpNextStep(3000); + } + break; + case 11: + if(m_creature->GetEntry() == NPC_JAINA && pUther) + { + DoScriptText(SAY_UTHER_A_03, pUther); + JumpNextStep(7000); + } + if(m_creature->GetEntry() == NPC_SYLVANA && pUther) + { + DoScriptText(SAY_UTHER_H_03, pUther); + JumpNextStep(6000); + } + if(Small) + Step = 24; + break; + case 12: + if(m_creature->GetEntry() == NPC_JAINA) + { + DoScriptText(SAY_JAINA_04, m_creature); + JumpNextStep(2000); + } + if(m_creature->GetEntry() == NPC_SYLVANA) + { + DoScriptText(SAY_SYLVANA_04, m_creature); + JumpNextStep(5000); + } + break; + case 13: + if(m_creature->GetEntry() == NPC_JAINA && pUther) + { + DoScriptText(SAY_UTHER_A_05, pUther); + JumpNextStep(10000); + } + if(m_creature->GetEntry() == NPC_SYLVANA && pUther) + { + DoScriptText(SAY_UTHER_H_05, pUther); + JumpNextStep(19000); + } + break; + case 14: + if(m_creature->GetEntry() == NPC_JAINA) + { + DoScriptText(SAY_JAINA_06, m_creature); + JumpNextStep(6000); + } + if(m_creature->GetEntry() == NPC_SYLVANA) + { + DoScriptText(SAY_SYLVANA_06, m_creature); + JumpNextStep(2000); + } + break; + case 15: + if(m_creature->GetEntry() == NPC_JAINA && pUther) + { + DoScriptText(SAY_UTHER_A_07, pUther); + JumpNextStep(12000); + } + if(m_creature->GetEntry() == NPC_SYLVANA && pUther) + { + DoScriptText(SAY_UTHER_H_07, pUther); + JumpNextStep(20000); + } + break; + case 16: + if(m_creature->GetEntry() == NPC_JAINA) + { + DoScriptText(SAY_JAINA_08, m_creature); + JumpNextStep(6000); + } + if(m_creature->GetEntry() == NPC_SYLVANA) + { + DoScriptText(SAY_SYLVANA_08, m_creature); + JumpNextStep(3000); + } + break; + case 17: + if(m_creature->GetEntry() == NPC_JAINA && pUther) + { + DoScriptText(SAY_UTHER_A_09, pUther); + JumpNextStep(12000); + } + if(m_creature->GetEntry() == NPC_SYLVANA && pUther) + { + DoScriptText(SAY_UTHER_H_09, pUther); + JumpNextStep(11000); + } + break; + case 18: + if(m_creature->GetEntry() == NPC_JAINA) + { + DoScriptText(SAY_JAINA_10, m_creature); + JumpNextStep(11000); + } + if(m_creature->GetEntry() == NPC_SYLVANA) + { + JumpNextStep(100); + } + break; + case 19: + if(m_creature->GetEntry() == NPC_JAINA && pUther) + { + DoScriptText(SAY_UTHER_A_11, pUther); + JumpNextStep(24000); + } + if(m_creature->GetEntry() == NPC_SYLVANA && pUther) + { + DoScriptText(SAY_UTHER_H_11, pUther); + JumpNextStep(9000); + } + break; + case 20: + if(m_creature->GetEntry() == NPC_JAINA) + { + DoScriptText(SAY_JAINA_12, m_creature); + JumpNextStep(2000); + } + if(m_creature->GetEntry() == NPC_SYLVANA) + { + DoScriptText(SAY_SYLVANA_12, m_creature); + JumpNextStep(2100); + } + break; + case 21: + if(m_creature->GetEntry() == NPC_JAINA && pUther) + { + DoScriptText(SAY_UTHER_A_13, pUther); + JumpNextStep(5000); + } + if(m_creature->GetEntry() == NPC_SYLVANA) + { + JumpNextStep(100); + } + break; + case 22: + if(m_creature->GetEntry() == NPC_JAINA && pUther) + { + DoScriptText(SAY_UTHER_A_14, pUther); + JumpNextStep(12000); + } + if(m_creature->GetEntry() == NPC_SYLVANA) + { + JumpNextStep(100); + } + break; + case 23: + if(m_creature->GetEntry() == NPC_JAINA) + { + DoScriptText(SAY_JAINA_15, m_creature); + JumpNextStep(2000); + } + if(m_creature->GetEntry() == NPC_SYLVANA) + { + JumpNextStep(100); + } + break; + case 24: + if(m_creature->GetEntry() == NPC_JAINA && pUther) + DoScriptText(SAY_UTHER_A_16, pUther); + if(m_creature->GetEntry() == NPC_SYLVANA && pUther) + DoScriptText(SAY_UTHER_H_16, pUther); + m_uiMainGateGUID = m_pInstance->GetData64(GO_IMPENETRABLE_DOOR); + if(GameObject* pGate = m_pInstance->instance->GetGameObject(m_uiMainGateGUID)) + pGate->SetGoState(GO_STATE_ACTIVE); + if(Creature* LichKing = m_creature->SummonCreature(NPC_LICH_KING,5362.469f,2062.342f,707.695f,3.97f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,360000)) + { + pLichKing = LichKing; + LichKing->SetActiveObjectState(true); + } + JumpNextStep(1000); + break; + case 25: + if(pUther) + pUther->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_COWER); + if(pLichKing) + { + pLichKing->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + pLichKing->GetMotionMaster()->MovePoint(0, 5314.881f, 2012.496f, 709.341f); + } + JumpNextStep(3000); + break; + case 26: + if(GameObject* pGate = m_pInstance->instance->GetGameObject(m_uiMainGateGUID)) + pGate->SetGoState(GO_STATE_READY); + JumpNextStep(7000); + break; + case 27: + if(pUther) + pUther->CastSpell(pUther, SPELL_UTHER_DESPAWN, false); + JumpNextStep(500); + break; + case 28: + if(pLichKing) + DoScriptText(SAY_LICH_KING_17, pLichKing); + JumpNextStep(10000); + break; + case 29: + if(pLichKing) + DoScriptText(SAY_LICH_KING_18, pLichKing); + JumpNextStep(5000); + break; + case 30: + if(pLichKing) + pLichKing->CastSpell(pLichKing, SPELL_TAKE_FROSTMOURNE, false); + if(GameObject* pFrostmourne = m_pInstance->instance->GetGameObject(m_uiFrostmourneGUID)) + pFrostmourne->SetGoState(GO_STATE_READY); + JumpNextStep(1500); + break; + case 31: + if(GameObject* pFrostmourne = m_pInstance->instance->GetGameObject(m_uiFrostmourneGUID)) + pFrostmourne->SetPhaseMask(0, true); + if(pLichKing) + pLichKing->CastSpell(pLichKing, SPELL_FROSTMOURNE_VISUAL, false); + //pLichKing->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 0, uint32(36942)); + m_creature->RemoveAurasDueToSpell(SPELL_FROSTMOURNE_SOUNDS); + JumpNextStep(5000); + break; + case 32: + if(pLichKing) + DoScriptText(SAY_LICH_KING_19, pLichKing); + JumpNextStep(9000); + break; + case 33: + m_uiFalricGUID = m_pInstance->GetData64(NPC_FALRIC); + m_uiMarwynGUID = m_pInstance->GetData64(NPC_MARWYN); + if(Creature* Falric = ((Creature*)Unit::GetUnit((*m_creature), m_uiFalricGUID))) + { + Falric->SetVisibility(VISIBILITY_ON); + Falric->CastSpell(Falric, SPELL_BOSS_SPAWN_AURA, false); + Falric->GetMotionMaster()->MovePoint(0, 5283.309f, 2031.173f, 709.319f); + } + if(Creature* Marwyn = ((Creature*)Unit::GetUnit((*m_creature), m_uiMarwynGUID))) + { + Marwyn->SetVisibility(VISIBILITY_ON); + Marwyn->CastSpell(Marwyn, SPELL_BOSS_SPAWN_AURA, false); + Marwyn->GetMotionMaster()->MovePoint(0, 5335.585f, 1981.439f, 709.319f); + } + if(pLichKing) + pLichKing->GetMotionMaster()->MovePoint(0, 5402.286f, 2104.496f, 707.695f); + JumpNextStep(600); + break; + case 34: + if(Creature* Falric = ((Creature*)Unit::GetUnit((*m_creature), m_uiFalricGUID))) + DoScriptText(SAY_FALRIC_INTRO, Falric); + if(Creature* Marwyn = ((Creature*)Unit::GetUnit((*m_creature), m_uiMarwynGUID))) + DoScriptText(SAY_MARWYN_INTRO, Marwyn); + JumpNextStep(3000); + break; + case 35: + if(GameObject* pGate = m_pInstance->instance->GetGameObject(m_uiMainGateGUID)) + pGate->SetGoState(GO_STATE_ACTIVE); + if(Creature* Falric = ((Creature*)Unit::GetUnit((*m_creature), m_uiFalricGUID))) + DoScriptText(SAY_FALRIC_INTRO2, Falric); + m_pInstance->SetData(TYPE_FALRIC, SPECIAL); + JumpNextStep(4000); + break; + case 36: + if(m_creature->GetEntry() == NPC_JAINA) + DoScriptText(SAY_JAINA_20, m_creature); + if(m_creature->GetEntry() == NPC_SYLVANA) + DoScriptText(SAY_SYLVANA_20, m_creature); + m_creature->GetMotionMaster()->MovePoint(0, 5443.880f, 2147.095f, 707.695f); + JumpNextStep(4000); + break; + case 37: + if(pLichKing) + { + pLichKing->GetMotionMaster()->MovementExpired(false); + pLichKing->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + pLichKing->GetMotionMaster()->MovePoint(0, 5443.880f, 2147.095f, 707.695f); + } + if(m_creature->GetEntry() == NPC_JAINA && pLichKing) + DoScriptText(SAY_LICH_KING_A_21, pLichKing); + if(m_creature->GetEntry() == NPC_SYLVANA && pLichKing) + DoScriptText(SAY_LICH_KING_H_21, pLichKing); + JumpNextStep(8000); + break; + case 38: + if(GameObject* pGate = m_pInstance->instance->GetGameObject(m_uiMainGateGUID)) + pGate->SetGoState(GO_STATE_READY); + JumpNextStep(5000); + break; + case 39: + m_creature->SetVisibility(VISIBILITY_OFF); + if(pLichKing) + pLichKing->SetVisibility(VISIBILITY_OFF); + m_pInstance->SetData(TYPE_PHASE, 2); + JumpNextStep(2000); + break; + } + } + + void UpdateAI(const uint32 diff) + { + if(!m_pInstance) + return; + + if(m_pInstance->GetData(TYPE_EVENT) == 1 + && m_pInstance->GetData64(DATA_ESCAPE_LIDER) == m_creature->GetGUID()) + StartEvent(); + + if(m_pInstance->GetData(TYPE_EVENT) == 2 + && m_pInstance->GetData64(DATA_ESCAPE_LIDER) == m_creature->GetGUID()) + { + Small = true; + StartEvent(); + } + + if(StepTimer < diff && m_pInstance->GetData(TYPE_PHASE) == 1) + Event(); + else StepTimer -= diff; + + return; + } +}; + +bool GossipHello_npc_jaina_and_sylvana_HRintro(Player* pPlayer, Creature* pCreature) +{ + ScriptedInstance* m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + + if(pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu( pCreature->GetGUID()); + + char const* _message1a; + char const* _message2a; + char const* _message1h; + char const* _message2h; + + switch (pPlayer->GetSession()->GetSessionDbcLocale()) + { + case LOCALE_ruRU: + _message1a = "Джайна, мы готовы!"; + _message2a = "Давай быстрее!"; + _message1h = "Сильвана, мы готовы!"; + _message2h = "Поехали!"; + break; + case LOCALE_enUS: + case LOCALE_koKR: + case LOCALE_frFR: + case LOCALE_deDE: + case LOCALE_zhCN: + case LOCALE_zhTW: + case LOCALE_esES: + case LOCALE_esMX: + default: + _message1a = "Lady Jaina, we are ready for next mission!"; + _message2a = "Lady Jaina, Let's go!"; + _message1h = "Lady Sylvanas, we are ready for next mission!"; + _message2h = "Lady Sylvanas, Let's go!"; + break; + }; + + switch(pCreature->GetEntry()) + { + case NPC_JAINA: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, _message1a, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, _message2a, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + break; + case NPC_SYLVANA: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, _message1h, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, _message2h, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + break; + } + + pPlayer->PlayerTalkClass->SendGossipMenu(907,pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_jaina_and_sylvana_HRintro(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + ScriptedInstance* m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + + if (!m_pInstance) return false; + + switch (uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->CLOSE_GOSSIP_MENU(); + m_pInstance->SetData(TYPE_EVENT, 1); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->CLOSE_GOSSIP_MENU(); + m_pInstance->SetData(TYPE_EVENT, 2); + break; + } + + if(pPlayer->GetTeam() == ALLIANCE) + m_pInstance->SetData(DATA_LIDER, 1); + else m_pInstance->SetData(DATA_LIDER, 2); + + m_pInstance->SetData64(DATA_ESCAPE_LIDER,pCreature->GetGUID()); + + return true; +} + +struct MANGOS_DLL_DECL npc_jaina_and_sylvana_HRextroAI : public npc_escortAI +{ + npc_jaina_and_sylvana_HRextroAI(Creature *pCreature) : npc_escortAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_creature->SetActiveObjectState(true); + Reset(); + } + + ScriptedInstance* m_pInstance; + + uint32 CastTimer; + uint32 StepTimer; + uint32 Step; + uint32 HoldTimer; + uint32 Count; + bool Fight; + bool Event; + bool PreFight; + bool WallCast; + uint64 m_uiLichKingGUID; + uint64 m_uiLiderGUID; + uint64 m_uiIceWallGUID; + Creature* pWallTarget; + Creature* pLichKing; + uint32 m_chestID; + + void Reset() + { + if(!m_pInstance) return; + + if(m_pInstance->GetData(TYPE_LICH_KING) == IN_PROGRESS) return; + + Step = 0; + StepTimer = 500; + Fight = true; + m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + + if(m_creature->GetEntry() == NPC_JAINA_OUTRO) + { + m_creature->CastSpell(m_creature, SPELL_ICE_BARRIER, false); + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_READY2HL); + } + if(m_pInstance->GetData(TYPE_LICH_KING) == DONE) + m_creature->SetVisibility(VISIBILITY_OFF); + + } + + void AttackStart(Unit* who) + { + if(!who) + return; + + if(m_creature->GetEntry() != NPC_SYLVANA_OUTRO) return; + + if(m_pInstance->GetData(TYPE_LICH_KING) == IN_PROGRESS || Fight != true) return; + + npc_escortAI::AttackStart(who); + + } + + void WaypointReached(uint32 i) + { + switch(i) + { + case 3: + m_pInstance->SetData(TYPE_ICE_WALL_01, IN_PROGRESS); + if(GameObject* pGate = m_creature->SummonGameobject(GO_ICE_WALL, 5540.39f, 2086.48f, 731.066f, 1.00057f, 0)) + { + m_uiIceWallGUID = pGate->GetGUID(); + pGate->SetGoState(GO_STATE_READY); + } + break; + case 4: + if(m_creature->GetEntry() == NPC_JAINA_OUTRO) + DoScriptText(SAY_JAINA_WALL_01, m_creature); + if(m_creature->GetEntry() == NPC_SYLVANA_OUTRO) + DoScriptText(SAY_SYLVANA_WALL_01, m_creature); + CastTimer = 1000; + HoldTimer = 30000; + SetEscortPaused(true); + pWallTarget = m_creature->SummonCreature(NPC_ICE_WALL,m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ(),m_creature->GetOrientation(),TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,360000); + if(m_creature->GetEntry() == NPC_JAINA_OUTRO) + m_creature->CastSpell(pWallTarget, SPELL_DESTROY_ICE_WALL_01, false); + WallCast = true; + break; + case 6: + m_pInstance->SetData(TYPE_ICE_WALL_02, IN_PROGRESS); + break; + case 8: + if(m_creature->GetEntry() == NPC_JAINA_OUTRO) + DoScriptText(SAY_JAINA_WALL_02, m_creature); + if(m_creature->GetEntry() == NPC_SYLVANA_OUTRO) + DoScriptText(SAY_SYLVANA_WALL_02, m_creature); + CastTimer = 1000; + HoldTimer = 30000; + SetEscortPaused(true); + pWallTarget = m_creature->SummonCreature(NPC_ICE_WALL,m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ(),m_creature->GetOrientation(),TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,360000); + if(m_creature->GetEntry() == NPC_JAINA_OUTRO) + m_creature->CastSpell(pWallTarget, SPELL_DESTROY_ICE_WALL_01, false); + WallCast = true; + break; + case 9: + if(m_creature->GetEntry() == NPC_JAINA_OUTRO) + DoScriptText(SAY_JAINA_ESCAPE_01, m_creature); + if(m_creature->GetEntry() == NPC_SYLVANA_OUTRO) + DoScriptText(SAY_SYLVANA_ESCAPE_01, m_creature); + break; + case 11: + m_pInstance->SetData(TYPE_ICE_WALL_03, IN_PROGRESS); + break; + case 12: + if(m_creature->GetEntry() == NPC_JAINA_OUTRO) + DoScriptText(SAY_JAINA_WALL_03, m_creature); + if(m_creature->GetEntry() == NPC_SYLVANA_OUTRO) + DoScriptText(SAY_SYLVANA_WALL_03, m_creature); + CastTimer = 1000; + HoldTimer = 30000; + SetEscortPaused(true); + pWallTarget = m_creature->SummonCreature(NPC_ICE_WALL,m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ(),m_creature->GetOrientation(),TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,360000); + if(m_creature->GetEntry() == NPC_JAINA_OUTRO) + m_creature->CastSpell(pWallTarget, SPELL_DESTROY_ICE_WALL_01, false); + WallCast = true; + break; + case 13: + if(m_creature->GetEntry() == NPC_JAINA_OUTRO) + DoScriptText(SAY_JAINA_ESCAPE_02, m_creature); + if(m_creature->GetEntry() == NPC_SYLVANA_OUTRO) + DoScriptText(SAY_SYLVANA_ESCAPE_02, m_creature); + break; + case 15: + m_pInstance->SetData(TYPE_ICE_WALL_04, IN_PROGRESS); + break; + case 16: + if(m_creature->GetEntry() == NPC_JAINA_OUTRO) + DoScriptText(SAY_JAINA_WALL_04, m_creature); + if(m_creature->GetEntry() == NPC_SYLVANA_OUTRO) + DoScriptText(SAY_SYLVANA_WALL_04, m_creature); + CastTimer = 1000; + HoldTimer = 30000; + SetEscortPaused(true); + pWallTarget = m_creature->SummonCreature(NPC_ICE_WALL,m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ(),m_creature->GetOrientation(),TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,360000); + if(m_creature->GetEntry() == NPC_JAINA_OUTRO) + m_creature->CastSpell(pWallTarget, SPELL_DESTROY_ICE_WALL_01, false); + WallCast = true; + break; + case 19: + if(m_creature->GetEntry() == NPC_JAINA_OUTRO) + DoScriptText(SAY_JAINA_TRAP, m_creature); + if(m_creature->GetEntry() == NPC_SYLVANA_OUTRO) + DoScriptText(SAY_SYLVANA_TRAP, m_creature); + break; + case 20: + SetEscortPaused(true); + if(m_creature->GetEntry() == NPC_JAINA_OUTRO) + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_READY2HL); + if(m_creature->GetEntry() == NPC_SYLVANA_OUTRO) + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_READY1H); + break; + } + } + + void MoveInLineOfSight(Unit* who) + { + if(!who) + return; + + if(!m_pInstance || who->GetTypeId() != TYPEID_PLAYER) return; + + Player* pPlayer = (Player *)who; + + if(pPlayer->GetTeam() == ALLIANCE && m_creature->GetEntry() == NPC_SYLVANA_OUTRO) return; + + if(pPlayer->GetTeam() == HORDE && m_creature->GetEntry() == NPC_JAINA_OUTRO) return; + + if(m_creature->GetDistance2d(who) <= 50 && m_pInstance->GetData(TYPE_MARWYN) == DONE && m_pInstance->GetData(TYPE_PHASE) == 3) + { + pPlayer = (Player *)who; + Event = true; + m_creature->setFaction(FACTION); + m_pInstance->SetData(TYPE_PHASE, 4); + } + } + + void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + { + if(!m_pInstance) return; + + if(m_pInstance->GetData(TYPE_LICH_KING) != IN_PROGRESS) + { + uiDamage = 0; + return; + } + + if(m_pInstance->GetData(TYPE_LICH_KING) == IN_PROGRESS && WallCast == true) + { + HoldTimer = HoldTimer + 1000; + return; + } + } + + void JumpNextStep(uint32 Time) + { + StepTimer = Time; + Step++; + } + + void Intro() + { + switch(Step) + { + case 0: + m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + m_uiLichKingGUID = m_pInstance->GetData64(BOSS_LICH_KING); + pLichKing = ((Creature*)Unit::GetUnit((*m_creature), m_uiLichKingGUID)); + JumpNextStep(100); + break; + case 1: + if(pLichKing) + { + pLichKing->SetPhaseMask(m_creature->GetPhaseMask(), true); + if(m_creature->GetEntry() == NPC_JAINA_OUTRO) + DoScriptText(SAY_LICH_KING_AGGRO_A, pLichKing); + if(m_creature->GetEntry() == NPC_SYLVANA_OUTRO) + DoScriptText(SAY_LICH_KING_AGGRO_H, pLichKing); + pLichKing->AI()->AttackStart(m_creature); + m_creature->AI()->AttackStart(pLichKing); + } + JumpNextStep(3000); + break; + case 2: + if(m_creature->GetEntry() == NPC_SYLVANA_OUTRO) + { + Fight = false; + if(pLichKing) + m_creature->GetMotionMaster()->MovePoint(0, (m_creature->GetPositionX()-5)+rand()%10, (m_creature->GetPositionY()-5)+rand()%10, m_creature->GetPositionZ()); + JumpNextStep(3000); + } else JumpNextStep(100); + break; + case 3: + if(m_creature->GetEntry() == NPC_SYLVANA_OUTRO) + Fight = true; + JumpNextStep(100); + break; + case 4: + if(m_creature->GetEntry() == NPC_SYLVANA_OUTRO) + { + if(pLichKing) + m_creature->CastSpell(pLichKing, SPELL_SYLVANA_STEP, false); + JumpNextStep(3000); + } else JumpNextStep(100); + break; + case 5: + if(m_creature->GetEntry() == NPC_SYLVANA_OUTRO) + { + Fight = false; + if(pLichKing) + m_creature->GetMotionMaster()->MovePoint(0, (m_creature->GetPositionX()-5)+rand()%10, (m_creature->GetPositionY()-5)+rand()%10, m_creature->GetPositionZ()); + JumpNextStep(3000); + } else JumpNextStep(12000); + break; + case 6: + Fight = true; + if(m_creature->GetEntry() == NPC_JAINA_OUTRO) + { + if(pLichKing) + m_creature->CastSpell(pLichKing,SPELL_ICE_PRISON,true); + } + if(m_creature->GetEntry() == NPC_SYLVANA_OUTRO) + { + if(pLichKing) + m_creature->CastSpell(pLichKing,SPELL_DARK_ARROW,true); + } + JumpNextStep(2500); + break; + case 7: + if(m_creature->GetEntry() == NPC_JAINA_OUTRO) + { + if(pLichKing && !pLichKing->HasAura(SPELL_ICE_PRISON)) + pLichKing->CastSpell(pLichKing,SPELL_ICE_PRISON,true); + } + if(m_creature->GetEntry() == NPC_SYLVANA_OUTRO) + { + if(pLichKing && !pLichKing->HasAura(SPELL_DARK_ARROW)) + pLichKing->CastSpell(pLichKing,SPELL_DARK_ARROW,true); + } + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_STAND); + m_creature->AttackStop(); + if(m_creature->GetEntry() == NPC_JAINA_OUTRO) + { + m_creature->RemoveAurasDueToSpell(SPELL_ICE_BARRIER); + DoScriptText(SAY_JAINA_AGGRO, m_creature); + } + if(m_creature->GetEntry() == NPC_SYLVANA_OUTRO) + DoScriptText(SAY_SYLVANA_AGGRO, m_creature); + JumpNextStep(3000); + break; + case 8: + m_creature->GetMotionMaster()->MovePoint(0, 5577.187f, 2236.003f, 733.012f); + if(pLichKing) + m_creature->SetUInt64Value(UNIT_FIELD_TARGET, pLichKing->GetGUID()); + JumpNextStep(10000); + break; + case 9: + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + Count = 1; + JumpNextStep(10000); + break; + } + + } + + void Outro() + { + switch(Step) + { + case 10: + m_creature->RemoveAurasDueToSpell(SPELL_SILENCE); + m_creature->RemoveSplineFlag(SPLINEFLAG_FLYING); + JumpNextStep(2000); + break; + case 11: + if(GameObject* pCave = m_creature->SummonGameobject(GO_CAVE, 5275.28f, 1694.23f, 786.147f, 0.981225f, 0)) + pCave->SetGoState(GO_STATE_READY); + m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + m_creature->GetMotionMaster()->MovePoint(0, 5258.911328f,1652.112f,784.295166f); + DoScriptText(SAY_ESCAPE_01, m_creature); + JumpNextStep(10000); + break; + case 12: + if (Map* pMap = m_creature->GetMap()) + switch (pMap->GetDifficulty()) + { + case DUNGEON_DIFFICULTY_NORMAL: + if (m_pInstance->GetData(DATA_LIDER) == 1) m_chestID = GO_CAPTAIN_CHEST_2; + else m_chestID = GO_CAPTAIN_CHEST_1; + case DUNGEON_DIFFICULTY_HEROIC: + if (m_pInstance->GetData(DATA_LIDER) == 1) m_chestID = GO_CAPTAIN_CHEST_4; + else m_chestID = GO_CAPTAIN_CHEST_3; + }; + if(GameObject* pChest = m_creature->SummonGameobject(m_chestID, 5241.047f, 1663.4364f, 784.295166f, 0.54f, 0)) + pChest->SetGoState(GO_STATE_READY); + m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + DoScriptText(SAY_ESCAPE_02, m_creature); + JumpNextStep(10000); + break; + case 13: + if(GameObject* pPortal = m_creature->SummonGameobject(GO_PORTAL, 5250.959961f, 1639.359985f, 784.302f, 0.0f, 0)) + pPortal->SetGoState(GO_STATE_READY); + DoScriptText(SAY_ESCAPE_03, m_creature); + JumpNextStep(20000); + break; + case 14: + m_creature->ForcedDespawn(); + JumpNextStep(20000); + break; + } + } + + void UpdateEscortAI(const uint32 diff) + { + if(!m_pInstance || !Event) + return; + + DoMeleeAttackIfReady(); + + if(m_pInstance->GetData(TYPE_PHASE) == 4) + { + if(StepTimer < diff) + Intro(); + else StepTimer -= diff; + } + + if(m_pInstance->GetData(TYPE_LICH_KING) == DONE + && m_pInstance->GetData(TYPE_PHASE) != 6) //End Cinematic + { + m_pInstance->SetData(TYPE_PHASE, 6); + Step = 10; + } + + if (m_pInstance->GetData(TYPE_PHASE) == 6) + { + if(StepTimer < diff) + Outro(); + else StepTimer -= diff; + return; + } + + if(WallCast == true && CastTimer < diff) + { + if(pWallTarget) + { + if(m_creature->GetEntry() == NPC_SYLVANA_OUTRO) + m_creature->CastSpell(pWallTarget, SPELL_DESTROY_ICE_WALL_03, false); + CastTimer = 1000; + } + } else CastTimer -= diff; + + if(WallCast == true && HoldTimer < diff) + { + WallCast = false; + m_creature->InterruptNonMeleeSpells(false); + SetEscortPaused(false); + if(GameObject* pGate = m_pInstance->instance->GetGameObject(m_uiIceWallGUID)) + pGate->SetGoState(GO_STATE_ACTIVE); + ++Count; + switch(Count) + { + case 2: + if(GameObject* pGate = m_creature->SummonGameobject(GO_ICE_WALL, 5494.3f, 1978.27f, 736.689f, 1.0885f, 0)) + { + if(pLichKing && pLichKing->isAlive()) + DoScriptText(SAY_LICH_KING_WALL_02, pLichKing); + m_uiIceWallGUID = pGate->GetGUID(); + pGate->SetGoState(GO_STATE_READY); + } + break; + case 3: + if(GameObject* pGate = m_creature->SummonGameobject(GO_ICE_WALL, 5434.27f, 1881.12f, 751.303f, 0.923328f, 0)) + { + if(pLichKing && pLichKing->isAlive()) + DoScriptText(SAY_LICH_KING_WALL_03, pLichKing); + m_uiIceWallGUID = pGate->GetGUID(); + pGate->SetGoState(GO_STATE_READY); + } + break; + case 4: + if(GameObject* pGate = m_creature->SummonGameobject(GO_ICE_WALL, 5323.61f, 1755.85f, 770.305f, 0.784186f, 0)) + { + if(pLichKing && pLichKing->isAlive()) + DoScriptText(SAY_LICH_KING_WALL_04, pLichKing); + m_uiIceWallGUID = pGate->GetGUID(); + pGate->SetGoState(GO_STATE_READY); + } + break; + case 5: + if(pLichKing && pLichKing->isAlive()) + { + pLichKing->RemoveAurasDueToSpell(SPELL_WINTER); + pLichKing->SetSpeedRate(MOVE_WALK, 2.5f, true); + Step = 0; + } + break; + } + } else HoldTimer -= diff; + + return; + } +}; + +bool GossipHello_npc_jaina_and_sylvana_HRextro(Player* pPlayer, Creature* pCreature) +{ + if(pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu( pCreature->GetGUID()); + + char const* _message; + + switch (pPlayer->GetSession()->GetSessionDbcLocale()) + { + case LOCALE_ruRU: + _message = "Побежали!"; + break; + case LOCALE_enUS: + case LOCALE_koKR: + case LOCALE_frFR: + case LOCALE_deDE: + case LOCALE_zhCN: + case LOCALE_zhTW: + case LOCALE_esES: + case LOCALE_esMX: + default: + _message = "Let's go!"; + break; + }; + + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, _message, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_jaina_and_sylvana_HRextro(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch (uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->CLOSE_GOSSIP_MENU(); + ((npc_jaina_and_sylvana_HRextroAI*)pCreature->AI())->Start(false, true); + pCreature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + pCreature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + pCreature->SetUInt64Value(UNIT_FIELD_TARGET, 0); + + ScriptedInstance* m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + if(m_pInstance) + { + m_pInstance->SetData64(DATA_ESCAPE_LIDER, pCreature->GetGUID()); + m_pInstance->SetData(TYPE_LICH_KING, IN_PROGRESS); + m_pInstance->SetData(TYPE_PHASE, 5); + } + break; + } + return true; +} + +struct MANGOS_DLL_DECL npc_lich_king_hrAI : public ScriptedAI +{ + npc_lich_king_hrAI(Creature *pCreature) : ScriptedAI(pCreature) + { + Reset(); + } + + void Reset() + { + } + + void JustDied(Unit* pKiller) + { + } + + void AttackStart(Unit* who) + { + return; + } + + void UpdateAI(const uint32 diff) + { + } +}; + +CreatureAI* GetAI_npc_jaina_and_sylvana_HRintro(Creature* pCreature) +{ + return new npc_jaina_and_sylvana_HRintroAI(pCreature); +} + +CreatureAI* GetAI_npc_jaina_and_sylvana_HRextro(Creature* pCreature) +{ + return new npc_jaina_and_sylvana_HRextroAI(pCreature); +} + +CreatureAI* GetAI_npc_lich_king_hr(Creature* pCreature) +{ + return new npc_lich_king_hrAI(pCreature); +} + +enum GENERAL_EVENT +{ + SAY_AGGRO = -1594519, + SAY_DEATH = -1594520, + + SPELL_SHIELD_THROWN_N = 69222, + SPELL_SHIELD_THROWN_H = 73076, + SPELL_SPIKE = 59446 // this is not right spell! +}; + +struct MANGOS_DLL_DECL npc_frostworn_generalAI : public ScriptedAI +{ + npc_frostworn_generalAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Regular = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool Regular; + + uint32 m_uiShieldTimer; + uint32 m_uiSpikeTimer; + + void Reset() + { + m_uiShieldTimer = 5000; + m_uiSpikeTimer = 14000; + } + + void JustDied(Unit* pKiller) + { + DoScriptText(SAY_DEATH, m_creature); + } + + void Aggro(Unit* pVictim) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + if(!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if(m_uiShieldTimer < uiDiff) + { + if(Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCast(pTarget, Regular ? SPELL_SHIELD_THROWN_N : SPELL_SHIELD_THROWN_H); + m_uiShieldTimer = urand(8000, 12000); + } else m_uiShieldTimer -= uiDiff; + + if (m_uiSpikeTimer < uiDiff) + { + if(Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCast(pTarget, SPELL_SPIKE); + m_uiSpikeTimer = urand(15000, 20000); + } else m_uiSpikeTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_frostworn_general(Creature* pCreature) +{ + return new npc_frostworn_generalAI(pCreature); +} + +void AddSC_halls_of_reflection() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_jaina_and_sylvana_HRintro"; + newscript->GetAI = &GetAI_npc_jaina_and_sylvana_HRintro; + newscript->pGossipHello = &GossipHello_npc_jaina_and_sylvana_HRintro; + newscript->pGossipSelect = &GossipSelect_npc_jaina_and_sylvana_HRintro; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_jaina_and_sylvana_HRextro"; + newscript->GetAI = &GetAI_npc_jaina_and_sylvana_HRextro; + newscript->pGossipHello = &GossipHello_npc_jaina_and_sylvana_HRextro; + newscript->pGossipSelect = &GossipSelect_npc_jaina_and_sylvana_HRextro; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_lich_king_hr"; + newscript->GetAI = &GetAI_npc_lich_king_hr; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_frostworn_general"; + newscript->GetAI = &GetAI_npc_frostworn_general; + newscript->RegisterSelf(); +} \ No newline at end of file diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp index 5acf97401..9b78d16d6 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp @@ -1,18 +1,27 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 -* 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, write to the Free Software -* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: instance_halls_of_reflection +SD%Complete: 70% +SDComment: +SDErrors: +SDCategory: instance script +SDAuthor: /dev/rsa, modified by MaxXx2021 aka Mioka +EndScriptData */ #include "precompiled.h" #include "def_halls.h" @@ -25,23 +34,38 @@ struct MANGOS_DLL_DECL instance_halls_of_reflection : public ScriptedInstance Initialize(); } - bool Regular; - bool needSave; + uint32 m_auiEncounter[MAX_ENCOUNTERS+1]; + uint32 m_auiLider; std::string strSaveData; - //Creatures GUID - uint32 m_auiEncounter[MAX_ENCOUNTERS+1]; - uint64 m_uiFalrynGUID; + bool Regular; + + uint64 m_uiFalricGUID; uint64 m_uiMarwynGUID; uint64 m_uiLichKingGUID; + uint64 m_uiLiderGUID; + + uint64 m_uiMainGateGUID; + uint64 m_uiExitGateGUID; + uint64 m_uiFrostGeneralGUID; uint64 m_uiCaptainsChestHordeGUID; uint64 m_uiCaptainsChestAllianceGUID; - uint64 m_uiIcecrownDoorGUID; - uint64 m_uiImpenetrableDoorGUID; uint64 m_uiFrostmourneGUID; uint64 m_uiFrostmourneAltarGUID; + void Initialize() + { + for (uint8 i = 0; i < MAX_ENCOUNTERS; ++i) + m_auiEncounter[i] = NOT_STARTED; + m_uiMainGateGUID = 0; + m_uiFrostmourneGUID = 0; + m_uiFalricGUID = 0; + m_uiLiderGUID = 0; + m_uiLichKingGUID = 0; + m_uiExitGateGUID = 0; + } + void OpenDoor(uint64 guid) { if(!guid) return; @@ -56,30 +80,22 @@ struct MANGOS_DLL_DECL instance_halls_of_reflection : public ScriptedInstance if(pGo) pGo->SetGoState(GO_STATE_READY); } - void Initialize() - { - for (uint8 i = 0; i < MAX_ENCOUNTERS; ++i) - m_auiEncounter[i] = NOT_STARTED; - m_uiCaptainsChestHordeGUID = 0; - m_uiCaptainsChestAllianceGUID = 0; - } - void OnCreatureCreate(Creature* pCreature) { switch(pCreature->GetEntry()) { - case NPC_FALRYN: - m_uiFalrynGUID = pCreature->GetGUID(); - break; - case NPC_MARWYN: - m_uiMarwynGUID = pCreature->GetGUID(); - break; - case NPC_LICH_KING: - m_uiLichKingGUID = pCreature->GetGUID(); - break; - case NPC_FROST_GENERAL: - m_uiFrostGeneralGUID = pCreature->GetGUID(); - break; + case NPC_FALRIC: + m_uiFalricGUID = pCreature->GetGUID(); + break; + case NPC_MARWYN: + m_uiMarwynGUID = pCreature->GetGUID(); + break; + case BOSS_LICH_KING: + m_uiLichKingGUID = pCreature->GetGUID(); + break; + case NPC_FROST_GENERAL: + m_uiFrostGeneralGUID = pCreature->GetGUID(); + break; } } @@ -87,52 +103,58 @@ struct MANGOS_DLL_DECL instance_halls_of_reflection : public ScriptedInstance { switch(pGo->GetEntry()) { - case GO_CAPTAIN_CHEST_1: - if(Regular) m_uiCaptainsChestHordeGUID = pGo->GetGUID(); - break; - case GO_CAPTAIN_CHEST_2: - if(Regular) m_uiCaptainsChestAllianceGUID = pGo->GetGUID(); - break; - case GO_CAPTAIN_CHEST_3: - if(!Regular) m_uiCaptainsChestHordeGUID = pGo->GetGUID(); - break; - case GO_CAPTAIN_CHEST_4: - if(!Regular) m_uiCaptainsChestAllianceGUID = pGo->GetGUID(); - break; - case GO_ICECROWN_DOOR: m_uiIcecrownDoorGUID = pGo->GetGUID(); break; - case GO_IMPENETRABLE_DOOR: m_uiImpenetrableDoorGUID = pGo->GetGUID(); break; - case GO_FROSTMOURNE: m_uiFrostmourneGUID = pGo->GetGUID(); - pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); - break; - case GO_FROSTMOURNE_ALTAR: m_uiFrostmourneAltarGUID = pGo->GetGUID(); - pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); - break; + case GO_IMPENETRABLE_DOOR: m_uiMainGateGUID = pGo->GetGUID(); break; + case GO_FROSTMOURNE: m_uiFrostmourneGUID = pGo->GetGUID(); break; + case GO_ICECROWN_DOOR: m_uiExitGateGUID = pGo->GetGUID(); break; } } + void SetData(uint32 uiType, uint32 uiData) { switch(uiType) { - case TYPE_START_EVENT: m_auiEncounter[0] = uiData; - if (uiData == DONE) { - CloseDoor(m_uiIcecrownDoorGUID); - }; break; - case TYPE_FALRYN: m_auiEncounter[1] = uiData; break; - case TYPE_MARWYN: m_auiEncounter[2] = uiData; - if (uiData == DONE) { - OpenDoor(m_uiImpenetrableDoorGUID); - OpenDoor(m_uiIcecrownDoorGUID); - if (m_uiCaptainsChestHordeGUID) - if (GameObject* pChest = instance->GetGameObject(m_uiCaptainsChestHordeGUID)) - if (pChest && !pChest->isSpawned()) pChest->SetRespawnTime(7*DAY); - if (m_uiCaptainsChestAllianceGUID) - if (GameObject* pChest = instance->GetGameObject(m_uiCaptainsChestAllianceGUID)) - if (pChest && !pChest->isSpawned()) pChest->SetRespawnTime(7*DAY); - }; break; - case TYPE_LICH_KING_1: m_auiEncounter[3] = uiData; break; - case TYPE_FROST_GENERAL: m_auiEncounter[4] = uiData; break; - case TYPE_LICH_KING_BATTLE: m_auiEncounter[5] = uiData; break; - case TYPE_ESCAPE: m_auiEncounter[6] = uiData; break; + case TYPE_PHASE: + m_auiEncounter[0] = uiData; + break; + case TYPE_EVENT: + m_auiEncounter[1] = uiData; + uiData = NOT_STARTED; + break; + case TYPE_FALRIC: + m_auiEncounter[2] = uiData; + if(uiData == SPECIAL) + CloseDoor(m_uiExitGateGUID); + break; + case TYPE_MARWYN: + m_auiEncounter[3] = uiData; + if(uiData == DONE) + { + OpenDoor(m_uiMainGateGUID); + OpenDoor(m_uiExitGateGUID); + } + break; + case TYPE_LICH_KING: + m_auiEncounter[4] = uiData; + break; + case TYPE_ICE_WALL_01: + m_auiEncounter[5] = uiData; + break; + case TYPE_ICE_WALL_02: + m_auiEncounter[6] = uiData; + break; + case TYPE_ICE_WALL_03: + m_auiEncounter[7] = uiData; + break; + case TYPE_ICE_WALL_04: + m_auiEncounter[8] = uiData; + break; + case TYPE_HALLS: + m_auiEncounter[9] = uiData; + break; + case DATA_LIDER: + m_auiLider = uiData; + uiData = NOT_STARTED; + break; } if (uiData == DONE) @@ -160,24 +182,52 @@ struct MANGOS_DLL_DECL instance_halls_of_reflection : public ScriptedInstance { switch(uiType) { - case TYPE_START_EVENT: return m_auiEncounter[0]; - case TYPE_FALRYN: return m_auiEncounter[1]; - case TYPE_MARWYN: return m_auiEncounter[2]; - case TYPE_LICH_KING_1: return m_auiEncounter[3]; - case TYPE_FROST_GENERAL: return m_auiEncounter[4]; - case TYPE_LICH_KING_BATTLE: return m_auiEncounter[5]; - case TYPE_ESCAPE: return m_auiEncounter[6]; + case TYPE_PHASE: + return m_auiEncounter[0]; + case TYPE_EVENT: + return m_auiEncounter[1]; + case TYPE_FALRIC: + return m_auiEncounter[2]; + case TYPE_MARWYN: + return m_auiEncounter[3]; + case TYPE_LICH_KING: + return m_auiEncounter[4]; + case TYPE_ICE_WALL_01: + return m_auiEncounter[5]; + case TYPE_ICE_WALL_02: + return m_auiEncounter[6]; + case TYPE_ICE_WALL_03: + return m_auiEncounter[7]; + case TYPE_ICE_WALL_04: + return m_auiEncounter[8]; + case TYPE_HALLS: + return m_auiEncounter[9]; + case DATA_LIDER: + return m_auiLider; } return 0; } + void SetData64(uint32 uiData, uint64 uiGuid) + { + switch(uiData) + { + case DATA_ESCAPE_LIDER: + m_uiLiderGUID = uiGuid; + break; + } + } + uint64 GetData64(uint32 uiData) { switch(uiData) { - case NPC_FALRYN: return m_uiFalrynGUID; - case NPC_MARWYN: return m_uiMarwynGUID; - case NPC_LICH_KING: return m_uiLichKingGUID; + case GO_IMPENETRABLE_DOOR: return m_uiMainGateGUID; + case GO_FROSTMOURNE: return m_uiFrostmourneGUID; + case NPC_FALRIC: return m_uiFalricGUID; + case NPC_MARWYN: return m_uiMarwynGUID; + case BOSS_LICH_KING: return m_uiLichKingGUID; + case DATA_ESCAPE_LIDER: return m_uiLiderGUID; case NPC_FROST_GENERAL: return m_uiFrostGeneralGUID; } return 0; @@ -199,13 +249,13 @@ struct MANGOS_DLL_DECL instance_halls_of_reflection : public ScriptedInstance { loadStream >> m_auiEncounter[i]; - if (m_auiEncounter[i] != DONE) + if (m_auiEncounter[i] == IN_PROGRESS) m_auiEncounter[i] = NOT_STARTED; } OUT_LOAD_INST_DATA_COMPLETE; - OpenDoor(m_uiIcecrownDoorGUID); } + }; InstanceData* GetInstanceData_instance_halls_of_reflection(Map* pMap) @@ -213,72 +263,11 @@ InstanceData* GetInstanceData_instance_halls_of_reflection(Map* pMap) return new instance_halls_of_reflection(pMap); } - -bool GOHello_go_frostmourne_altar(Player *player, GameObject* pGo) -{ - - ScriptedInstance *pInstance = (ScriptedInstance *) pGo->GetInstanceData(); - if(!pInstance) return false; - - switch(pGo->GetEntry()) - { - case GO_FROSTMOURNE_ALTAR: { - if (pInstance->GetData(TYPE_START_EVENT) != DONE) { - pInstance->SetData(TYPE_START_EVENT, DONE); - pInstance->SetData(TYPE_FALRYN, SPECIAL); - pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); - }; - if (pInstance->GetData(TYPE_START_EVENT) == DONE - && pInstance->GetData(TYPE_FALRYN) != DONE) { - pInstance->SetData(TYPE_START_EVENT, DONE); - pInstance->SetData(TYPE_FALRYN, SPECIAL); - pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); - }; - } break; - } - - pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); - return true; -} - -bool GOHello_go_frostmourne(Player *player, GameObject* pGo) -{ - - ScriptedInstance *pInstance = (ScriptedInstance *) pGo->GetInstanceData(); - if(!pInstance) return false; - - switch(pGo->GetEntry()) - { - case GO_FROSTMOURNE: { - if (pInstance->GetData(TYPE_START_EVENT) == DONE - && pInstance->GetData(TYPE_FALRYN) == DONE - && pInstance->GetData(TYPE_MARWYN) != DONE) { - pInstance->SetData(TYPE_MARWYN, SPECIAL); - pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); - }; - } break; - } - - - return true; -} - void AddSC_instance_halls_of_reflection() { - Script* newscript; + Script *newscript; newscript = new Script; newscript->Name = "instance_halls_of_reflection"; newscript->GetInstanceData = &GetInstanceData_instance_halls_of_reflection; newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "go_frostmourne_altar"; - newscript->pGOHello = &GOHello_go_frostmourne_altar; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "go_frostmourne"; - newscript->pGOHello = &GOHello_go_frostmourne; - newscript->RegisterSelf(); - -} +} \ No newline at end of file diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index aab06c1b4..cb8755b41 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -413,9 +413,10 @@ extern void AddSC_boss_krick(); extern void AddSC_boss_scourgelord_tyrannus(); extern void AddSC_instance_halls_of_reflection(); -extern void AddSC_boss_falryn(); +extern void AddSC_halls_of_reflection(); +extern void AddSC_boss_falric(); extern void AddSC_boss_marwyn(); -//extern void AddSC_boss_lich_king_fh(); +extern void AddSC_boss_lich_king_hr(); extern void AddSC_instance_ruby_sanctum(); // Ruby Sanctum extern void AddSC_boss_halion(); @@ -903,9 +904,10 @@ void AddScripts() AddSC_boss_scourgelord_tyrannus(); AddSC_instance_halls_of_reflection(); - AddSC_boss_falryn(); + AddSC_halls_of_reflection(); + AddSC_boss_falric(); AddSC_boss_marwyn(); -// AddSC_boss_lich_king_fh(); + AddSC_boss_lich_king_hr(); AddSC_instance_ruby_sanctum(); // Ruby Sanctum AddSC_boss_halion(); From f89b133a62edd65b23bb4ea7bd9bcd5c3c9f1890 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Tue, 22 Jun 2010 13:30:15 +0400 Subject: [PATCH 376/405] Frozen halls part2 - cleanup and some rewrite --- addition/723_icecrown_down_mangos.sql | 14 +- addition/723_icecrown_down_scriptdev2.sql | 50 +-- .../halls_of_reflection/boss_falric.cpp | 33 +- .../halls_of_reflection/boss_lich_king.cpp | 299 ++++-------------- .../halls_of_reflection/boss_marwyn.cpp | 43 ++- .../halls_of_reflection/def_halls.h | 14 +- .../halls_of_reflection.cpp | 63 +++- .../instance_halls_of_reflection.cpp | 119 ++++--- 8 files changed, 233 insertions(+), 402 deletions(-) diff --git a/addition/723_icecrown_down_mangos.sql b/addition/723_icecrown_down_mangos.sql index d842f3464..e0b4b1674 100644 --- a/addition/723_icecrown_down_mangos.sql +++ b/addition/723_icecrown_down_mangos.sql @@ -36,7 +36,7 @@ UPDATE `creature_template` SET `equipment_id`='1290' where `entry` IN (36990, 37 -- Halls of reflection UPDATE `instance_template` SET `script` = 'instance_halls_of_reflection' WHERE map=668; -UPDATE `gameobject_template` SET ScriptName = '' WHERE `entry` IN (202236,202302); +UPDATE `gameobject_template` SET `ScriptName` = '' WHERE `entry` IN (202236,202302); DELETE FROM `creature` WHERE `map` = 668 AND `id` IN (38177,38176,38173,38172,38567,38175,36940,36941,37069); UPDATE `creature_template` SET `ScriptName`='generic_creature' WHERE `entry` IN (38177,38176,38173,38172,38567,38175); @@ -51,9 +51,7 @@ UPDATE `creature_template` SET `AIName`='', `Scriptname`='boss_marwyn' WHERE `en UPDATE `creature_template` SET `AIName`='', `Scriptname`='npc_lich_king_hr' WHERE `entry` IN (36954); UPDATE `creature_template` SET `AIName`='', `Scriptname`='boss_lich_king_hr' WHERE `entry` IN (37226); UPDATE `creature_template` SET `AIName`='', `Scriptname`='npc_jaina_and_sylvana_HRextro' WHERE `entry` IN (36955, 37554); -UPDATE `creature_template` SET `AIName`='', `Scriptname`='npc_raging_gnoul' WHERE `entry` IN (36940); -UPDATE `creature_template` SET `AIName`='', `Scriptname`='npc_risen_witch_doctor' WHERE `entry` IN (36941); -UPDATE `creature_template` SET `AIName`='', `Scriptname`='npc_abon' WHERE `entry` IN (37069); +UPDATE `creature_template` SET `AIName`='', `Scriptname`='generic_creature' WHERE `entry` IN (36940,36941,37069); UPDATE `creature_template` SET `scale`='0.8', `equipment_id`='1221' WHERE `entry` IN (37221, 36955); UPDATE `creature_template` SET `equipment_id`='1290' WHERE `entry` IN (37223, 37554); UPDATE `creature_template` SET `equipment_id`='0' WHERE `entry`=36954; @@ -98,11 +96,15 @@ INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid` DELETE from `creature` WHERE `id`=37226; INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (135344, 37226, 668, 3, 1, 0, 0, 5551.29, 2261.33, 733.012, 4.0452, 604800, 0, 0, 27890000, 0, 0, 0); -UPDATE `creature_template` SET `modelid_A` = 11686, `modelid_A2` = 11686, `modelid_H` = 11686, `modelid_H2` = 11686 WHERE `entry` = 37014; +UPDATE `creature_template` SET `modelid_A` = 11686, `modelid_A2` = 11686, `modelid_H` = 11686, `modelid_H2` = 11686 WHERE `entry` IN (37014,37704); DELETE FROM `gameobject` WHERE `id` IN (201385,201596,202079); -/* +UPDATE `gameobject_template` SET `faction` = '114',`data0` = '0' WHERE `gameobject_template`.`entry` IN (197341,197342,197343); +UPDATE `gameobject` SET `state` = '1' WHERE `id` IN (197341,197342,197343); + + +/* Original Icewalls from YTDB REPLACE INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES (3485, 201385, 668, 3, 1, 5540.39, 2086.48, 731.066, 1.00057, 0, 0, 0.479677, 0.877445, 604800, 100, 1), (3438, 201385, 668, 3, 1, 5494.3, 1978.27, 736.689, 1.0885, 0, 0, 0.517777, 0.855516, 604800, 100, 1), diff --git a/addition/723_icecrown_down_scriptdev2.sql b/addition/723_icecrown_down_scriptdev2.sql index bfb030436..3bad9acec 100644 --- a/addition/723_icecrown_down_scriptdev2.sql +++ b/addition/723_icecrown_down_scriptdev2.sql @@ -122,15 +122,15 @@ INSERT INTO `script_texts` (`entry`,`content_default`,`content_loc8`,`sound`,`ty (-1594433, '', 'Как же тут холодно... Кровь стынет в жилах.', 16631,0,0,1, '67234'), (-1594434, '', 'Я... Я не верю своим глазам. Ледяная скорбь перед нами без всякой охраны! Как и говорил гном. Вперед герои!', 17049,0,0,1, '67234'), (-1594435, '', 'Что это там впереди? Неужели? Скорее герои!', 16632,1,0,1, '67234'), -(-1594436, '', 'Ледяная Скорбь, клинок разрушивший наше королевство.', 16633,1,0,1, '67234'), +(-1594436, '', 'Ледяная Скорбь, клинок, разрушивший наше королевство...', 16633,1,0,1, '67234'), (-1594437, '', 'Боль снова захлестывает меня, когда я так близко вижу меч, отнявший у меня жизнь.', 17050,0,0,1, '67234'), (-1594438, '', 'Отойдите. Тот кто коснется этого клинка обречет себя на вечные муки. Я попытаюсь заговорить с душами заключенными в Ледяной скорби. Расступитесь... Чуть назад! Прошу.', 16634,1,0,1, '67234'), -(-1594439, '', 'Я не смею его коснуться. Назад! Отступите! Я попробую установить связь с мечом. Возможно спасение находится внутри!', 17051,1,0,1, '67234'), +(-1594439, '', 'Я не смею его коснуться. Назад! Отступите! Я попробую установить связь с мечом. Возможно, спасение находится внутри!', 17051,1,0,1, '67234'), # SCENE - Hall Of Reflection (Intro) - UtherDialog (-1594440, '', 'Джайна? Неужели это ты?', 16666,0,0,1, '67234'), -(-1594441, '', 'Осторожней девочка! Однажды мне уже говорили что этот проклятый меч может нас спасти. Посмотри вокруг и ты увидешь что из этого вышло.', 16659,0,0,1, '67234'), +(-1594441, '', 'Осторожней девочка! Однажды мне уже говорили, что этот проклятый меч может нас спасти. Посмотри вокруг, и ты увидишь, что из этого вышло.', 16659,0,0,1, '67234'), (-1594442, '', 'Утер? Милый Утер! Мне... Мне так жаль.', 16635,0,0,1, '67234'), -(-1594443, '', 'Утер? Утер Святоносный? Как...', 17052,0,0,1, '67234'), +(-1594443, '', 'Утер? Утер Светоносный? Как...', 17052,0,0,1, '67234'), (-1594444, '', 'Джайна, у вас мало времени. Король - Лич видит все что видит Ледяная Скорбь. Вскоре он будет здесь.', 16667,0,0,1, '67234'), (-1594445, '', 'У вас мало времени. Король - Лич видит все что видит Ледяная Скорбь. Вскоре он будет здесь.', 16660,0,0,1, '67234'), (-1594446, '', 'Артас здесь? Может я...', 16636,0,0,1, '67234'), @@ -142,12 +142,12 @@ INSERT INTO `script_texts` (`entry`,`content_default`,`content_loc8`,`sound`,`ty (-1594452, '', 'Джайна послушай меня. Вам нужно уничтожить Короля - Лича. С ним нельзя договориться. Он убьет вас всех и превратит в могущественных воинов Плети.', 16669,0,0,1, '67234'), (-1594453, '', 'Возможно... Но знай! Король - Лич должен быть всегда. Даже если вы убьете Артаса кто то обязан будет занять его место. Лишившись правителя Плеть налетит на мир как стая саранчи и уничтожит все на своем пути.', 16662,0,0,1, '67234'), (-1594454, '', 'Но как Утер? Как мне убить моего принца, моего...', 16638,0,0,1, '67234'), -(-1594455, '', 'Кому по силам такое Бремя?', 17055,0,0,1, '67234'), -(-1594456, '', 'Забудь об этом девочка. Короля - Лича нужно уничтожить на том месте, где он слился с Нерзулом. На самой вершине, у ледяного трона!', 16670,0,0,1, '67234'), +(-1594455, '', 'Кому по силам такое бремя?', 17055,0,0,1, '67234'), +(-1594456, '', 'Забудь об этом девочка. Короля - Лича нужно уничтожить на том месте, где он слился с Нерзулом. На самой вершине, у Ледяного Трона!', 16670,0,0,1, '67234'), (-1594457, '', 'Не знаю, Королева Баньши... Если бы не Артас, который все еще является частью Короля - Лича, Плеть давно бы уже уничтожила Азерот.', 16663,0,0,1, '67234'), -(-1594458, '', 'Ты прав Утер прости меня. Я не знаю что на меня нашло. Мы передадим твои слова Королю и рыцарям, которые сражаются с Плетью в Цитадели Ледяной Короны.', 16639,0,0,1, '67234'), -(-1594459, '', 'Тебе нужно знать еще кое что о Короле - Личе. Плеть не должна выйти из под контроля, даже если вы убьете Короля - Лича, кто то должен будет занять его место. Без короля Плеть налетит на мир как стая саранчи и уничтожит все живое.', 16671,0,0,1, '67234'), -(-1594460, '', 'Увы единственый способ одолеть Короля - Лича это убить его там где он был порожден.', 16664,0,0,1, '67234'), +(-1594458, '', 'Ты прав Утер, прости меня... Я не знаю что на меня нашло. Мы передадим твои слова Королю и рыцарям, которые сражаются с Плетью в Цитадели Ледяной Короны.', 16639,0,0,1, '67234'), +(-1594459, '', 'Тебе нужно знать еще кое что о Короле - Личе. Плеть не должна выйти из под контроля. Даже если вы убьете Короля - Лича, кто-то должен будет занять его место. Без Короля Плеть налетит на мир как стая саранчи и уничтожит все живое.', 16671,0,0,1, '67234'), +(-1594460, '', 'Увы единственый способ одолеть Короля - Лича - это убить его там где он был порожден.', 16664,0,0,1, '67234'), (-1594461, '', 'Кому по силам такое бремя?', 16640,0,0,1, '67234'), (-1594462, '', 'Ледяной Трон!', 17056,0,0,1, '67234'), (-1594463, '', 'Великая жертва, благородной души.', 16672,0,0,1, '67234'), @@ -161,14 +161,14 @@ INSERT INTO `script_texts` (`entry`,`content_default`,`content_loc8`,`sound`,`ty (-1594471, '', 'Ты от меня не отмахнешься Артас. Я должна понять, я должна знать.', 16642,1,0,1, '67234'), (-1594472, '', 'Ты так просто от меня не уйдешь Артас. Я отомщу тебе!', 17057,1,0,1, '67234'), (-1594473, '', 'Глупая девчонка! Тот кого ты ищещь давно убит! Теперь он лишь призрак, слабый отзвук в моем сознании!', 17229,1,0,0, '67234'), -(-1594474, '', 'Я не повторю прежней ошибки, Сильвана. На этот раз тебе не спастись, ты не оправдала моего доверия и теперь тебя ждет только забвение!', 17228,1,0,0, '67234'), -(-1594475, '', 'Как пожелаете мой господин!', 16717,1,0,0, '67234'), -(-1594476, '', 'Как пожелаете мой господин!', 16741,1,0,0, '67234'), +(-1594474, '', 'Я не повторю прежней ошибки, Сильвана. На этот раз тебе не спастись. Ты не оправдала моего доверия и теперь тебя ждет только забвение!', 17228,1,0,0, '67234'), +(-1594475, '', 'Как пожелаете, мой господин!', 16717,1,0,0, '67234'), +(-1594476, '', 'Как пожелаете, мой господин!', 16741,1,0,0, '67234'), # SCENE - Hall Of Reflection (Extro) - PreEscape -(-1594477, '', 'Твои союзники прибыли Джайна! Как ты и обещала... Хахахаха... Все вы станете могучими солдатами плети...', 17212,1,0,0, '67234'), +(-1594477, '', 'Твои союзники прибыли, Джайна! Как ты и обещала... Ха-ха-ха-ха... Все вы станете могучими солдатами Плети...', 17212,1,0,0, '67234'), (-1594478, '', 'Я не повторю прежней ошибки, Сильвана! На этот раз тебе не спастись. Вы все будите служить мне после смерти...', 17213,1,0,0, '67234'), (-1594479, '', 'Он слишком силен. Мы должны выбраться от сюда как можно скорее. Моя магия задержит его ненадолго, быстрее герои...', 16644,0,0,1, '67234'), -(-1594480, '', 'Он слишком силен. Герои скорее, за мной. Мы должны выбраться от сюда немедленно. Я постараюсь его задержать пока мы будем убегать.', 17058,0,0,1, '67234'), +(-1594480, '', 'Он слишком силен. Герои скорее, за мной. Мы должны выбраться отсюда немедленно. Я постараюсь его задержать, пока мы будем убегать.', 17058,0,0,1, '67234'), # SCENE - Hall Of Reflection (Extro) - Escape (-1594481, '', 'Смерть распростерла ледяные обьятия!', 17221,1,0,0, '67234'), (-1594482, '', 'Восстаньте прислужники, не дайте им сбежать!', 17216,1,0,0, '67234'), @@ -178,7 +178,7 @@ INSERT INTO `script_texts` (`entry`,`content_default`,`content_loc8`,`sound`,`ty (-1594486, '', 'Бежать некуда!', 17217,1,0,0, '67234'), (-1594487, '', 'Я разрушу эту преграду, а вы удерживайте нежить на расстоянии!', 16607,1,0,0, '67234'), (-1594488, '', 'Никакие стены не удержат Королеву Баньши. Держите нежить на расстоянии, я сокрушу эту преграду.', 17029,1,0,0, '67234'), -(-1594489, '', 'Опять Ледяная Стена... Я разобью ее, только не дайте нежити прервать мои заклинания...', 16608,1,0,0, '67234'), +(-1594489, '', 'Опять ледяная стена... Я разобью ее, только не дайте нежити прервать мои заклинания...', 16608,1,0,0, '67234'), (-1594490, '', 'Еще одна преграда. Держитесь герои! Я разрушу эту стену!', 17030,1,0,0, '67234'), (-1594491, '', 'Покоритесь Леденящей смерти!', 17218,1,0,0, '67234'), (-1594492, '', 'Вы в ловушке!', 17219,1,0,0, '67234'), @@ -186,39 +186,39 @@ INSERT INTO `script_texts` (`entry`,`content_default`,`content_loc8`,`sound`,`ty (-1594494, '', 'Он с нами играет. Я покажу ему что бывает когда лед встречается со огнем!', 16609,0,0,0, '67234'), (-1594495, '', 'Твои преграды больше не задержат нас, чудовище. Я смету их с пути!', 16610,1,0,0, '67234'), (-1594496, '', 'Я устала от этих игр Артас. Твои стены не остановят меня!', 17031,1,0,0, '67234'), -(-1594497, '', 'Ты не помешаешь нам уйти, монстр. Сдерживайте нежить а я уничтожу эту преграду.', 17032,1,0,0, '67234'), +(-1594497, '', 'Ты не помешаешь нам уйти, монстр. Сдерживайте нежить, а я уничтожу эту преграду.', 17032,1,0,0, '67234'), (-1594498, '', 'Я вижу выход, скорее!', 16645,1,0,0, '67234'), (-1594499, '', 'Мы почти выбрались, не сдавайтесь!', 16646,1,0,0, '67234'), (-1594500, '', 'Я вижу выход, скорее!', 17059,1,0,0, '67234'), (-1594501, '', 'Мы почти выбрались, не сдавайтесь!', 17060,1,0,0, '67234'), -(-1594502, '', 'Больше некуда бежать. Теперь нам придется сражаться, это наша последняя битва!', 16647,1,0,0, '67234'), -(-1594503, '', 'Проклятый тупик, значит все закончится здесь. Готовтесь герои это наша последняя битва.', 17061,1,0,0, '67234'), -(-1594504, '', 'Ха-ха-ха... Бежать некуда теперь вы мои!', 17223,1,0,0, '67234'), +(-1594502, '', 'Больше некуда бежать. Теперь нам придется сражаться. Это наша последняя битва!', 16647,1,0,0, '67234'), +(-1594503, '', 'Проклятый тупик, значит все закончится здесь. Готовьтесь герои, это наша последняя битва.', 17061,1,0,0, '67234'), +(-1594504, '', 'Ха-ха-ха... Бежать некуда. Теперь вы мои!', 17223,1,0,0, '67234'), (-1594505, '', 'Солдаты Лордерона, восстаньте по зову Господина!', 16714,1,0,0, '67234'), (-1594506, '', 'Господин осмотрел свое королевство и признал его негодным! Его суд был быстрым и суровым - предать всех смерти!', 16738,1,0,0, '67234'), #Falric -(-1594507, '', 'Мужчины, Женщины и дети... Никто не избежал гнева господина. Вы разделите их Участь!', 16710,1,0,0, '67234'), +(-1594507, '', 'Мужчины, Женщины и дети... Никто не избежал гнева господина. Вы разделите их участь!', 16710,1,0,0, '67234'), (-1594508, '', 'Марвин... Добей их...', 16713,1,0,0, '67234'), (-1594509, '', 'Сопливый червяк!', 16711,1,0,0, '67234'), -(-1594510, '', 'Стратхольмские детишки и те сражались отчаянее!', 16712,1,0,0, '67234'), +(-1594510, '', 'Стратхольмские детишки - и те сражались отчаяннее!', 16712,1,0,0, '67234'), (-1594511, '', 'Как сладостно отчаянье!', 16715,1,0,0, '67234'), (-1594512, '', 'Как приятен страх!', 16716,1,0,0, '67234'), #Marwyn (-1594513, '', 'Вы найдете здесь лишь смерть!', 16734,1,0,0, '67234'), -(-1594514, '', 'Эээээ... Да... Бегите на встречу судьбе. Ее жестокие и холодные обьятия ждут вас...', 16737,1,0,0, '67234'), -(-1594515, '', 'У Теренаса был такой же взгляд в миг смерти, он никак не мог поверить... Хахахахаха...', 16735,1,0,0, '67234'), +(-1594514, '', 'Эээээ... Да... Бегите навстречу судьбе. Ее жестокие и холодные обьятия ждут вас...', 16737,1,0,0, '67234'), +(-1594515, '', 'У Теренаса был такой же взгляд в миг смерти, он никак не мог поверить... Ха-ха-ха-ха-ха...', 16735,1,0,0, '67234'), (-1594516, '', 'Захлебнись страданием!', 16736,1,0,0, '67234'), (-1594517, '', 'Вы увидите как разлагается ваша плоть!', 16739,1,0,0, '67234'), (-1594518, '', 'Сгиньте без следа!', 16740,1,0,0, '67234'), #FrostWorn General -(-1594519, '', 'Вы не достойны предстать перед Королем - Личом!', 16921,1,0,0, '67234'), +(-1594519, '', 'Вы недостойны предстать перед Королем - Личом!', 16921,1,0,0, '67234'), (-1594520, '', 'Господин... Я подвел вас...', 16922,1,0,0, '67234'), #add -(-1594531, '', 'Ну, теперь точно пора сваливать.', 0,0,0,0, '67234'), +(-1594531, '', 'Ну теперь-то точно пора сваливать.', 0,0,0,0, '67234'), (-1594532, '', 'Вот вам сундук за работу.', 0,0,0,0, '67234'), (-1594533, '', 'И, поскольку корабля с оффа не будет, вот вам портал в Даларан.', 0,0,0,0, '67234'); diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falric.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falric.cpp index 306ea1a74..ae3b08138 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falric.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falric.cpp @@ -18,7 +18,7 @@ SDName: boss_falric SD%Complete: 70% SDComment: -SDAuthor: /dev/rsa, rewrited by MaxXx2021 aka Mioka +SDAuthor: /dev/rsa, changed by MaxXx2021 aka Mioka SDCategory: Halls of Reflection EndScriptData */ @@ -36,10 +36,8 @@ enum SPELL_HOPELESSNESS = 72395, SPELL_IMPENDING_DESPAIR = 72426, - SPELL_DEFILING_HORROR_N = 72435, - SPELL_DEFILING_HORROR_H = 72452, - SPELL_QUIVERING_STRIKE_N = 72422, - SPELL_QUIVERING_STRIKE_H = 72453, + SPELL_DEFILING_HORROR = 72435, + SPELL_QUIVERING_STRIKE = 72422, SPELL_BERSERK = 47008 }; @@ -49,12 +47,10 @@ struct MANGOS_DLL_DECL boss_falricAI : public ScriptedAI boss_falricAI(Creature *pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Regular = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool Regular; bool m_bIsCall; uint32 m_uiBerserkTimer; @@ -101,18 +97,19 @@ struct MANGOS_DLL_DECL boss_falricAI : public ScriptedAI void JustDied(Unit* pKiller) { - if(m_pInstance) - m_pInstance->SetData(TYPE_MARWYN, SPECIAL); + if(!m_pInstance) return; + m_pInstance->SetData(TYPE_MARWYN, SPECIAL); DoScriptText(SAY_FALRIC_DEATH, m_creature); } void AttackStart(Unit* who) - { - if(m_pInstance) - if(m_pInstance->GetData(TYPE_FALRIC) != IN_PROGRESS) - return; + { + if(!m_pInstance) return; + + if(m_pInstance->GetData(TYPE_FALRIC) != IN_PROGRESS) + return; - ScriptedAI::AttackStart(who); + ScriptedAI::AttackStart(who); } void Summon() @@ -162,6 +159,7 @@ struct MANGOS_DLL_DECL boss_falricAI : public ScriptedAI if(Creature* Summon = m_creature->SummonCreature(pSummon, SpawnLoc[m_uiLocNo].x, SpawnLoc[m_uiLocNo].y, SpawnLoc[m_uiLocNo].z, SpawnLoc[m_uiLocNo].o, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000)) { m_uiSummonGUID[i] = Summon->GetGUID(); + Summon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); Summon->setFaction(974); } m_uiLocNo++; @@ -175,6 +173,7 @@ struct MANGOS_DLL_DECL boss_falricAI : public ScriptedAI if(Creature* Summon = m_pInstance->instance->GetCreature(m_uiSummonGUID[m_uiCheckSummon])) { Summon->setFaction(14); + Summon->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); Summon->SetInCombatWithZone(); } m_uiCheckSummon++; @@ -185,7 +184,7 @@ struct MANGOS_DLL_DECL boss_falricAI : public ScriptedAI { if(!m_pInstance) return; - if (m_pInstance->GetData(TYPE_FALRIC) == SPECIAL) + if (m_pInstance->GetData(TYPE_FALRIC) == SPECIAL) { if(!m_bIsCall) { @@ -212,7 +211,7 @@ struct MANGOS_DLL_DECL boss_falricAI : public ScriptedAI if(m_uiStrikeTimer < uiDiff) { - DoCast(m_creature->getVictim(), Regular ? SPELL_QUIVERING_STRIKE_N : SPELL_QUIVERING_STRIKE_H); + DoCast(m_creature->getVictim(), SPELL_QUIVERING_STRIKE); m_uiStrikeTimer = (urand(7000, 14000)); } else m_uiStrikeTimer -= uiDiff; @@ -229,7 +228,7 @@ struct MANGOS_DLL_DECL boss_falricAI : public ScriptedAI if(m_uiGrowlTimer < uiDiff) { DoScriptText(SAY_FALRIC_SP02, m_creature); - DoCast(m_creature->getVictim(), Regular ? SPELL_DEFILING_HORROR_N : SPELL_DEFILING_HORROR_H); + DoCast(m_creature, SPELL_DEFILING_HORROR); m_uiGrowlTimer = (urand(25000, 30000)); } else m_uiGrowlTimer -= uiDiff; diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_lich_king.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_lich_king.cpp index e65ea88d4..95675a17b 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_lich_king.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_lich_king.cpp @@ -60,7 +60,6 @@ struct MANGOS_DLL_DECL boss_lich_king_hrAI : public npc_escortAI boss_lich_king_hrAI(Creature *pCreature) : npc_escortAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_creature->SetActiveObjectState(true); Reset(); } @@ -73,8 +72,10 @@ struct MANGOS_DLL_DECL boss_lich_king_hrAI : public npc_escortAI bool Finish; void Reset() - { - NonFight = false; + { + if(!m_pInstance) return; + NonFight = false; + StartEscort = false; m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 0, uint32(36942)); } @@ -103,17 +104,35 @@ struct MANGOS_DLL_DECL boss_lich_king_hrAI : public npc_escortAI } void AttackStart(Unit* who) - { - if (!who) - return; + { + if (!m_pInstance) return; + if (!who) return; - if(NonFight == true) return; + if (NonFight) return; - if(m_pInstance->GetData(TYPE_LICH_KING) == IN_PROGRESS || who->GetTypeId() == TYPEID_PLAYER) return; + if (m_pInstance->GetData(TYPE_LICH_KING) == IN_PROGRESS || who->GetTypeId() == TYPEID_PLAYER) return; npc_escortAI::AttackStart(who); } + void JustSummoned(Creature* summoned) + { + if(!m_pInstance || !summoned) return; + + summoned->SetInCombatWithZone(); + + if (Unit* pLider = Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_ESCAPE_LIDER))) + { + summoned->GetMotionMaster()->MoveChase(pLider); + summoned->AddThreat(pLider, 100.0f); + } + } + + void CallGuard(uint32 GuardID) + { + m_creature->SummonCreature(GuardID,(m_creature->GetPositionX()-5)+rand()%10, (m_creature->GetPositionY()-5)+rand()%10, m_creature->GetPositionZ(),4.17f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,180000); + } + void Wall01() { switch(Step) @@ -126,8 +145,6 @@ struct MANGOS_DLL_DECL boss_lich_king_hrAI : public npc_escortAI ++Step; break; case 1: - /*if(GameObject* pGate = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GO_ICE_WALL_01))) - pGate->SetGoState(GO_STATE_READY);*/ StepTimer = 2000; ++Step; break; @@ -150,7 +167,7 @@ struct MANGOS_DLL_DECL boss_lich_king_hrAI : public npc_escortAI ++Step; break; case 5: - m_creature->SummonCreature(NPC_RISEN_WITCH_DOCTOR,(m_creature->GetPositionX()-5)+rand()%10, (m_creature->GetPositionY()-5)+rand()%10, m_creature->GetPositionZ(),4.17f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,360000); + CallGuard(NPC_RISEN_WITCH_DOCTOR); m_pInstance->SetData(TYPE_ICE_WALL_01, DONE); StepTimer = 100; Step = 0; @@ -171,9 +188,9 @@ struct MANGOS_DLL_DECL boss_lich_king_hrAI : public npc_escortAI break; case 1: SetEscortPaused(false); - m_creature->SummonCreature(NPC_RISEN_WITCH_DOCTOR,(m_creature->GetPositionX()-5)+rand()%10, (m_creature->GetPositionY()-5)+rand()%10, m_creature->GetPositionZ(),4.17f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,360000); - m_creature->SummonCreature(NPC_RISEN_WITCH_DOCTOR,(m_creature->GetPositionX()-5)+rand()%10, (m_creature->GetPositionY()-5)+rand()%10, m_creature->GetPositionZ(),4.17f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,360000); - m_creature->SummonCreature(NPC_ABON,(m_creature->GetPositionX()-5)+rand()%10, (m_creature->GetPositionY()-5)+rand()%10, m_creature->GetPositionZ(),4.17f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,360000); + CallGuard(NPC_RISEN_WITCH_DOCTOR); + CallGuard(NPC_RISEN_WITCH_DOCTOR); + CallGuard(NPC_ABON); m_pInstance->SetData(TYPE_ICE_WALL_02, DONE); StepTimer = 100; Step = 0; @@ -193,13 +210,13 @@ struct MANGOS_DLL_DECL boss_lich_king_hrAI : public npc_escortAI ++Step; break; case 1: - SetEscortPaused(false); - DoScriptText(SAY_LICH_KING_ABON, m_creature); - m_creature->SummonCreature(NPC_RISEN_WITCH_DOCTOR,(m_creature->GetPositionX()-5)+rand()%10, (m_creature->GetPositionY()-5)+rand()%10, m_creature->GetPositionZ(),4.17f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,360000); - m_creature->SummonCreature(NPC_RISEN_WITCH_DOCTOR,(m_creature->GetPositionX()-5)+rand()%10, (m_creature->GetPositionY()-5)+rand()%10, m_creature->GetPositionZ(),4.17f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,360000); - m_creature->SummonCreature(NPC_RISEN_WITCH_DOCTOR,(m_creature->GetPositionX()-5)+rand()%10, (m_creature->GetPositionY()-5)+rand()%10, m_creature->GetPositionZ(),4.17f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,360000); - m_creature->SummonCreature(NPC_ABON,(m_creature->GetPositionX()-5)+rand()%10, (m_creature->GetPositionY()-5)+rand()%10, m_creature->GetPositionZ(),4.17f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,360000); - m_creature->SummonCreature(NPC_ABON,(m_creature->GetPositionX()-5)+rand()%10, (m_creature->GetPositionY()-5)+rand()%10, m_creature->GetPositionZ(),4.17f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,360000); + SetEscortPaused(false); + DoScriptText(SAY_LICH_KING_ABON, m_creature); + CallGuard(NPC_RISEN_WITCH_DOCTOR); + CallGuard(NPC_RISEN_WITCH_DOCTOR); + CallGuard(NPC_RISEN_WITCH_DOCTOR); + CallGuard(NPC_ABON); + CallGuard(NPC_ABON); m_pInstance->SetData(TYPE_ICE_WALL_03, DONE); StepTimer = 100; Step = 0; @@ -219,21 +236,21 @@ struct MANGOS_DLL_DECL boss_lich_king_hrAI : public npc_escortAI ++Step; break; case 1: - SetEscortPaused(false); - m_creature->SummonCreature(NPC_RISEN_WITCH_DOCTOR,(m_creature->GetPositionX()-5)+rand()%10, (m_creature->GetPositionY()-5)+rand()%10, m_creature->GetPositionZ(),4.17f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,360000); - m_creature->SummonCreature(NPC_RISEN_WITCH_DOCTOR,(m_creature->GetPositionX()-5)+rand()%10, (m_creature->GetPositionY()-5)+rand()%10, m_creature->GetPositionZ(),4.17f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,360000); - m_creature->SummonCreature(NPC_RISEN_WITCH_DOCTOR,(m_creature->GetPositionX()-5)+rand()%10, (m_creature->GetPositionY()-5)+rand()%10, m_creature->GetPositionZ(),4.17f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,360000); - m_creature->SummonCreature(NPC_ABON,(m_creature->GetPositionX()-5)+rand()%10, (m_creature->GetPositionY()-5)+rand()%10, m_creature->GetPositionZ(),4.17f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,360000); - m_creature->SummonCreature(NPC_ABON,(m_creature->GetPositionX()-5)+rand()%10, (m_creature->GetPositionY()-5)+rand()%10, m_creature->GetPositionZ(),4.17f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,360000); - StepTimer = 15000; - ++Step; - break; + SetEscortPaused(false); + CallGuard(NPC_RISEN_WITCH_DOCTOR); + CallGuard(NPC_RISEN_WITCH_DOCTOR); + CallGuard(NPC_RISEN_WITCH_DOCTOR); + CallGuard(NPC_ABON); + CallGuard(NPC_ABON); + StepTimer = 15000; + ++Step; + break; case 2: - DoScriptText(SAY_LICH_KING_ABON, m_creature); - m_creature->SummonCreature(NPC_RISEN_WITCH_DOCTOR,(m_creature->GetPositionX()-5)+rand()%10, (m_creature->GetPositionY()-5)+rand()%10, m_creature->GetPositionZ(),4.17f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,360000); - m_creature->SummonCreature(NPC_RISEN_WITCH_DOCTOR,(m_creature->GetPositionX()-5)+rand()%10, (m_creature->GetPositionY()-5)+rand()%10, m_creature->GetPositionZ(),4.17f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,360000); - m_pInstance->SetData(TYPE_ICE_WALL_04, DONE); - ++Step; + DoScriptText(SAY_LICH_KING_ABON, m_creature); + CallGuard(NPC_RISEN_WITCH_DOCTOR); + CallGuard(NPC_RISEN_WITCH_DOCTOR); + m_pInstance->SetData(TYPE_ICE_WALL_04, DONE); + ++Step; break; } } @@ -241,7 +258,7 @@ struct MANGOS_DLL_DECL boss_lich_king_hrAI : public npc_escortAI void UpdateEscortAI(const uint32 diff) { if(!m_pInstance) return; - + if(m_pInstance->GetData(TYPE_LICH_KING) != IN_PROGRESS) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -253,7 +270,7 @@ struct MANGOS_DLL_DECL boss_lich_king_hrAI : public npc_escortAI if(m_creature->isInCombat() && m_pInstance->GetData(TYPE_LICH_KING) == IN_PROGRESS) npc_escortAI::EnterEvadeMode(); - if(m_pInstance->GetData(TYPE_LICH_KING) == IN_PROGRESS && StartEscort != true) + if(m_pInstance->GetData(TYPE_LICH_KING) == IN_PROGRESS && !StartEscort) { StartEscort = true; if(m_creature->HasAura(SPELL_ICE_PRISON)) @@ -264,7 +281,7 @@ struct MANGOS_DLL_DECL boss_lich_king_hrAI : public npc_escortAI NonFight = true; m_creature->AttackStop(); m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); - m_creature->SetSpeedRate(MOVE_WALK, 2.0f, true); + m_creature->SetSpeedRate(MOVE_WALK, 2.4f, true); if (boss_lich_king_hrAI* pEscortAI = dynamic_cast(m_creature->AI())) pEscortAI->Start(false, false); Step = 0; @@ -302,203 +319,11 @@ struct MANGOS_DLL_DECL boss_lich_king_hrAI : public npc_escortAI } }; -struct MANGOS_DLL_DECL npc_raging_gnoulAI : public ScriptedAI -{ - npc_raging_gnoulAI(Creature *pCreature) : ScriptedAI(pCreature) - { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_creature->SetActiveObjectState(true); - Reset(); - } - -ScriptedInstance* m_pInstance; -uint32 EmergeTimer; -bool Emerge; -uint64 m_uiLiderGUID; - - void Reset() - { - DoCast(m_creature, SPELL_EMERGE_VISUAL); - EmergeTimer = 4000; - Emerge = false; - } - - void JustDied(Unit* pKiller) - { - } - - void AttackStart(Unit* who) - { - if (!who) - return; - - if(Emerge == false) return; - - ScriptedAI::AttackStart(who); - } - - void UpdateAI(const uint32 diff) - { - if(!m_pInstance) return; - - if(m_pInstance->GetData(TYPE_LICH_KING) == IN_PROGRESS) - { - if(Emerge != true) - { - if(EmergeTimer < diff) - { - m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); - Emerge = true; - m_uiLiderGUID = m_pInstance->GetData64(DATA_ESCAPE_LIDER); - if(Creature* pLider = ((Creature*)Unit::GetUnit((*m_creature), m_uiLiderGUID))) - { - DoResetThreat(); - m_creature->AI()->AttackStart(pLider); - m_creature->GetMotionMaster()->Clear(); - m_creature->GetMotionMaster()->MoveChase(pLider); - m_creature->AddThreat(pLider); - } - - } else EmergeTimer -= diff; - } - } - - DoMeleeAttackIfReady(); - - } -}; - -struct MANGOS_DLL_DECL npc_risen_witch_doctorAI : public ScriptedAI -{ - npc_risen_witch_doctorAI(Creature *pCreature) : ScriptedAI(pCreature) - { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_creature->SetActiveObjectState(true); - Reset(); - } - -ScriptedInstance* m_pInstance; -uint32 EmergeTimer; -bool Emerge; -uint64 m_uiLiderGUID; - - void Reset() - { - DoCast(m_creature, SPELL_EMERGE_VISUAL); - EmergeTimer = 5000; - Emerge = false; - } - - void JustDied(Unit* pKiller) - { - } - - void AttackStart(Unit* who) - { - if (!who) - return; - - if(Emerge == false) return; - - ScriptedAI::AttackStart(who); - } - - void UpdateAI(const uint32 diff) - { - if(!m_pInstance) return; - - if(m_pInstance->GetData(TYPE_LICH_KING) == IN_PROGRESS) - { - if(Emerge != true) - { - if(EmergeTimer < diff) - { - m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); - Emerge = true; - m_uiLiderGUID = m_pInstance->GetData64(DATA_ESCAPE_LIDER); - if(Creature* pLider = ((Creature*)Unit::GetUnit((*m_creature), m_uiLiderGUID))) - { - DoResetThreat(); - m_creature->AI()->AttackStart(pLider); - m_creature->GetMotionMaster()->Clear(); - m_creature->GetMotionMaster()->MoveChase(pLider); - m_creature->AddThreat(pLider); - } - - } else EmergeTimer -= diff; - } - } - - DoMeleeAttackIfReady(); - - } -}; - -struct MANGOS_DLL_DECL npc_abonAI : public ScriptedAI -{ - npc_abonAI(Creature *pCreature) : ScriptedAI(pCreature) - { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_creature->SetActiveObjectState(true); - Reset(); - } - -ScriptedInstance* m_pInstance; -uint64 m_uiLiderGUID; -bool Walk; - - void Reset() - { - Walk = false; - } - - void UpdateAI(const uint32 diff) - { - if(!m_pInstance) return; - - if(m_pInstance->GetData(TYPE_LICH_KING) == IN_PROGRESS) - { - if(Walk != true) - { - m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); - Walk = true; - m_uiLiderGUID = m_pInstance->GetData64(DATA_ESCAPE_LIDER); - if(Creature* pLider = ((Creature*)Unit::GetUnit((*m_creature), m_uiLiderGUID))) - { - DoResetThreat(); - m_creature->AI()->AttackStart(pLider); - m_creature->GetMotionMaster()->Clear(); - m_creature->GetMotionMaster()->MoveChase(pLider); - m_creature->AddThreat(pLider); - } - } - } - - DoMeleeAttackIfReady(); - - } -}; - CreatureAI* GetAI_boss_lich_king_hr(Creature* pCreature) { return new boss_lich_king_hrAI(pCreature); } -CreatureAI* GetAI_npc_raging_gnoul(Creature* pCreature) -{ - return new npc_raging_gnoulAI(pCreature); -} - -CreatureAI* GetAI_npc_risen_witch_doctor(Creature* pCreature) -{ - return new npc_risen_witch_doctorAI(pCreature); -} - -CreatureAI* GetAI_npc_abon(Creature* pCreature) -{ - return new npc_abonAI(pCreature); -} - void AddSC_boss_lich_king_hr() { Script *newscript; @@ -508,18 +333,4 @@ void AddSC_boss_lich_king_hr() newscript->GetAI = &GetAI_boss_lich_king_hr; newscript->RegisterSelf(); - newscript = new Script; - newscript->Name = "npc_raging_gnoul"; - newscript->GetAI = &GetAI_npc_raging_gnoul; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_risen_witch_doctor"; - newscript->GetAI = &GetAI_npc_risen_witch_doctor; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_abon"; - newscript->GetAI = &GetAI_npc_abon; - newscript->RegisterSelf(); } \ No newline at end of file diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_marwyn.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_marwyn.cpp index f63e9cfcb..85b8b9120 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_marwyn.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_marwyn.cpp @@ -18,7 +18,7 @@ SDName: boss_marwyn SD%Complete: 60% SDComment: -SDAuthor: /dev/rsa, rewrited by MaxXx2021 aka Mioka +SDAuthor: /dev/rsa, changed by MaxXx2021 aka Mioka SDCategory: Halls of Reflection EndScriptData */ @@ -35,13 +35,10 @@ enum SAY_MARWYN_SP01 = -1594517, SAY_MARWYN_SP02 = -1594518, - SPELL_OBLITERATE_N = 72360, - SPELL_OBLITERATE_H = 72434, - SPELL_SHARED_SUFFERING_N = 72368, - SPELL_SHARED_SUFFERING_H = 72369, + SPELL_OBLITERATE = 72360, + SPELL_SHARED_SUFFERING = 72368, SPELL_WELL_OF_CORRUPTION = 72362, - SPELL_CORRUPTED_FLESH_N = 72363, - SPELL_CORRUPTED_FLESH_H = 72436, + SPELL_CORRUPTED_FLESH = 72436, SPELL_BERSERK = 47008, }; @@ -51,12 +48,10 @@ struct MANGOS_DLL_DECL boss_marwynAI : public ScriptedAI boss_marwynAI(Creature *pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Regular = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool Regular; bool m_bIsCall; uint32 m_uiBerserkTimer; uint32 m_uiSharedSufferingTimer; @@ -136,6 +131,7 @@ struct MANGOS_DLL_DECL boss_marwynAI : public ScriptedAI if(Creature* Summon = m_creature->SummonCreature(pSummon, SpawnLoc[m_uiLocNo].x, SpawnLoc[m_uiLocNo].y, SpawnLoc[m_uiLocNo].z, SpawnLoc[m_uiLocNo].o, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000)) { m_uiSummonGUID[i] = Summon->GetGUID(); + Summon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); Summon->setFaction(974); } m_uiLocNo++; @@ -149,6 +145,7 @@ struct MANGOS_DLL_DECL boss_marwynAI : public ScriptedAI if(Creature* Summon = m_pInstance->instance->GetCreature(m_uiSummonGUID[m_uiCheckSummon])) { Summon->setFaction(14); + Summon->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); Summon->SetInCombatWithZone(); } m_uiCheckSummon++; @@ -177,17 +174,19 @@ struct MANGOS_DLL_DECL boss_marwynAI : public ScriptedAI void Aggro(Unit* pVictim) { - m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); - DoScriptText(SAY_MARWYN_AGGRO, m_creature); + if (!m_pInstance) return; + m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + DoScriptText(SAY_MARWYN_AGGRO, m_creature); } void AttackStart(Unit* who) - { - if (m_pInstance) - if (m_pInstance->GetData(TYPE_MARWYN) != IN_PROGRESS) - return; + { + if (!m_pInstance) return; + + if (m_pInstance->GetData(TYPE_MARWYN) != IN_PROGRESS) + return; - ScriptedAI::AttackStart(who); + ScriptedAI::AttackStart(who); } void UpdateAI(const uint32 uiDiff) @@ -228,22 +227,22 @@ struct MANGOS_DLL_DECL boss_marwynAI : public ScriptedAI if(m_uiObliterateTimer < uiDiff) { - DoCast(m_creature->getVictim(), Regular ? SPELL_OBLITERATE_N : SPELL_OBLITERATE_H); - m_uiObliterateTimer = urand(8000, 12000); + DoCast(m_creature->getVictim(), SPELL_OBLITERATE); + m_uiObliterateTimer = urand(8000, 12000); } else m_uiObliterateTimer -= uiDiff; if (m_uiWellTimer < uiDiff) { DoScriptText(SAY_MARWYN_SP02, m_creature); - if(Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCast(pTarget, SPELL_WELL_OF_CORRUPTION); +// if(Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) +// DoCast(pTarget, SPELL_WELL_OF_CORRUPTION); m_uiWellTimer= urand(25000, 30000); } else m_uiWellTimer -= uiDiff; if (m_uiSharedSufferingTimer < uiDiff) { if(Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCast(pTarget, Regular ? SPELL_SHARED_SUFFERING_N : SPELL_SHARED_SUFFERING_H); + DoCast(pTarget, SPELL_SHARED_SUFFERING); m_uiSharedSufferingTimer = urand(15000, 20000); } else m_uiSharedSufferingTimer -= uiDiff; @@ -251,7 +250,7 @@ struct MANGOS_DLL_DECL boss_marwynAI : public ScriptedAI { DoScriptText(SAY_MARWYN_SP01, m_creature); if(Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCast(pTarget, Regular ? SPELL_CORRUPTED_FLESH_N : SPELL_CORRUPTED_FLESH_H); + DoCast(pTarget, SPELL_CORRUPTED_FLESH); m_uiFleshTimer = urand(10000, 16000); } else m_uiFleshTimer -= uiDiff; diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/def_halls.h b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/def_halls.h index 85bce27d5..4c4272a33 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/def_halls.h +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/def_halls.h @@ -7,12 +7,13 @@ enum Data TYPE_EVENT = 1, TYPE_FALRIC = 2, TYPE_MARWYN = 3, - TYPE_LICH_KING = 4, - TYPE_ICE_WALL_01 = 5, - TYPE_ICE_WALL_02 = 6, - TYPE_ICE_WALL_03 = 7, - TYPE_ICE_WALL_04 = 8, - TYPE_HALLS = 9, + TYPE_FROST_GENERAL = 4, + TYPE_LICH_KING = 5, + TYPE_ICE_WALL_01 = 6, + TYPE_ICE_WALL_02 = 7, + TYPE_ICE_WALL_03 = 8, + TYPE_ICE_WALL_04 = 9, + TYPE_HALLS = 10, MAX_ENCOUNTERS, DATA_ESCAPE_LIDER = 101, @@ -50,6 +51,7 @@ enum Data NPC_FROST_GENERAL = 36723, GO_ICECROWN_DOOR = 201976, //72802 + GO_ICECROWN_DOOR_2 = 197342, GO_ICECROWN_DOOR_3 = 197343, GO_IMPENETRABLE_DOOR = 197341, //72801 GO_FROSTMOURNE_ALTAR = 202236, //3551 diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.cpp index ea42f7f38..e7b8d3270 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.cpp @@ -137,6 +137,7 @@ enum SPELL_SILENCE = 69413, SPELL_LICH_KING_CAST = 57561, SPELL_FROSTMOURNE_VISUAL = 73220, + SPELL_SHIELD_DISRUPTION = 58291, FACTION = 2076, }; @@ -569,7 +570,7 @@ struct MANGOS_DLL_DECL npc_jaina_and_sylvana_HRintroAI : public ScriptedAI if(pLichKing) pLichKing->SetVisibility(VISIBILITY_OFF); m_pInstance->SetData(TYPE_PHASE, 2); - JumpNextStep(2000); + JumpNextStep(1000); break; } } @@ -682,7 +683,6 @@ struct MANGOS_DLL_DECL npc_jaina_and_sylvana_HRextroAI : public npc_escortAI npc_jaina_and_sylvana_HRextroAI(Creature *pCreature) : npc_escortAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_creature->SetActiveObjectState(true); Reset(); } @@ -842,10 +842,10 @@ struct MANGOS_DLL_DECL npc_jaina_and_sylvana_HRextroAI : public npc_escortAI void MoveInLineOfSight(Unit* who) { - if(!who) + if(!who || !m_pInstance) return; - if(!m_pInstance || who->GetTypeId() != TYPEID_PLAYER) return; + if(who->GetTypeId() != TYPEID_PLAYER) return; Player* pPlayer = (Player *)who; @@ -853,7 +853,9 @@ struct MANGOS_DLL_DECL npc_jaina_and_sylvana_HRextroAI : public npc_escortAI if(pPlayer->GetTeam() == HORDE && m_creature->GetEntry() == NPC_JAINA_OUTRO) return; - if(m_creature->GetDistance2d(who) <= 50 && m_pInstance->GetData(TYPE_MARWYN) == DONE && m_pInstance->GetData(TYPE_PHASE) == 3) + if(m_creature->IsWithinDistInMap(who, 50.0f) + && m_pInstance->GetData(TYPE_FROST_GENERAL) == DONE + && m_pInstance->GetData(TYPE_PHASE) == 3) { pPlayer = (Player *)who; Event = true; @@ -996,13 +998,15 @@ struct MANGOS_DLL_DECL npc_jaina_and_sylvana_HRextroAI : public npc_escortAI switch(Step) { case 10: + m_creature->CastSpell(m_creature, SPELL_SHIELD_DISRUPTION,false); m_creature->RemoveAurasDueToSpell(SPELL_SILENCE); m_creature->RemoveSplineFlag(SPLINEFLAG_FLYING); - JumpNextStep(2000); + JumpNextStep(6000); break; case 11: if(GameObject* pCave = m_creature->SummonGameobject(GO_CAVE, 5275.28f, 1694.23f, 786.147f, 0.981225f, 0)) pCave->SetGoState(GO_STATE_READY); + m_creature->CastSpell(m_creature, SPELL_SHIELD_DISRUPTION,false); m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); m_creature->GetMotionMaster()->MovePoint(0, 5258.911328f,1652.112f,784.295166f); DoScriptText(SAY_ESCAPE_01, m_creature); @@ -1032,8 +1036,12 @@ struct MANGOS_DLL_DECL npc_jaina_and_sylvana_HRextroAI : public npc_escortAI JumpNextStep(20000); break; case 14: + m_creature->GetMotionMaster()->MovePoint(0, 5250.959961f, 1639.359985f, 784.302f); + JumpNextStep(5000); + break; + case 15: m_creature->ForcedDespawn(); - JumpNextStep(20000); + JumpNextStep(5000); break; } } @@ -1229,8 +1237,7 @@ enum GENERAL_EVENT SAY_AGGRO = -1594519, SAY_DEATH = -1594520, - SPELL_SHIELD_THROWN_N = 69222, - SPELL_SHIELD_THROWN_H = 73076, + SPELL_SHIELD_THROWN = 69222, SPELL_SPIKE = 59446 // this is not right spell! }; @@ -1239,30 +1246,54 @@ struct MANGOS_DLL_DECL npc_frostworn_generalAI : public ScriptedAI npc_frostworn_generalAI(Creature *pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Regular = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool Regular; uint32 m_uiShieldTimer; uint32 m_uiSpikeTimer; void Reset() { - m_uiShieldTimer = 5000; - m_uiSpikeTimer = 14000; + if (!m_pInstance) return; + m_uiShieldTimer = 5000; + m_uiSpikeTimer = 14000; + m_pInstance->SetData(TYPE_FROST_GENERAL, NOT_STARTED); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); } void JustDied(Unit* pKiller) { - DoScriptText(SAY_DEATH, m_creature); + if (!m_pInstance) return; + DoScriptText(SAY_DEATH, m_creature); + m_pInstance->SetData(TYPE_FROST_GENERAL, DONE); + } + + void MoveInLineOfSight(Unit* pWho) + { + if (!m_pInstance) return; + + if (m_creature->getVictim()) return; + + if (pWho->GetTypeId() != TYPEID_PLAYER + || m_pInstance->GetData(TYPE_MARWYN) != DONE + || !m_creature->IsWithinDistInMap(pWho, 20.0f) + ) return; + + if (Player* pPlayer = (Player*)pWho) + if (pPlayer->isGameMaster()) return; + + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + + AttackStart(pWho); } void Aggro(Unit* pVictim) { - DoScriptText(SAY_AGGRO, m_creature); + if (!m_pInstance) return; + DoScriptText(SAY_AGGRO, m_creature); + m_pInstance->SetData(TYPE_FROST_GENERAL, IN_PROGRESS); } void UpdateAI(const uint32 uiDiff) @@ -1273,7 +1304,7 @@ struct MANGOS_DLL_DECL npc_frostworn_generalAI : public ScriptedAI if(m_uiShieldTimer < uiDiff) { if(Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCast(pTarget, Regular ? SPELL_SHIELD_THROWN_N : SPELL_SHIELD_THROWN_H); + DoCast(pTarget,SPELL_SHIELD_THROWN); m_uiShieldTimer = urand(8000, 12000); } else m_uiShieldTimer -= uiDiff; diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp index 9b78d16d6..0d22a3d2f 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp @@ -47,6 +47,8 @@ struct MANGOS_DLL_DECL instance_halls_of_reflection : public ScriptedInstance uint64 m_uiMainGateGUID; uint64 m_uiExitGateGUID; + uint64 m_uiDoor2GUID; + uint64 m_uiDoor3GUID; uint64 m_uiFrostGeneralGUID; uint64 m_uiCaptainsChestHordeGUID; @@ -104,8 +106,10 @@ struct MANGOS_DLL_DECL instance_halls_of_reflection : public ScriptedInstance switch(pGo->GetEntry()) { case GO_IMPENETRABLE_DOOR: m_uiMainGateGUID = pGo->GetGUID(); break; - case GO_FROSTMOURNE: m_uiFrostmourneGUID = pGo->GetGUID(); break; - case GO_ICECROWN_DOOR: m_uiExitGateGUID = pGo->GetGUID(); break; + case GO_FROSTMOURNE: m_uiFrostmourneGUID = pGo->GetGUID(); break; + case GO_ICECROWN_DOOR: m_uiExitGateGUID = pGo->GetGUID(); break; + case GO_ICECROWN_DOOR_2: m_uiDoor2GUID = pGo->GetGUID(); break; + case GO_ICECROWN_DOOR_3: m_uiDoor3GUID = pGo->GetGUID(); break; } } @@ -113,47 +117,36 @@ struct MANGOS_DLL_DECL instance_halls_of_reflection : public ScriptedInstance { switch(uiType) { - case TYPE_PHASE: - m_auiEncounter[0] = uiData; + case TYPE_PHASE: m_auiEncounter[uiType] = uiData; break; + case TYPE_EVENT: m_auiEncounter[uiType] = uiData; + uiData = NOT_STARTED; break; - case TYPE_EVENT: - m_auiEncounter[1] = uiData; - uiData = NOT_STARTED; + case TYPE_FALRIC: m_auiEncounter[uiType] = uiData; + if(uiData == SPECIAL) + CloseDoor(m_uiExitGateGUID); break; - case TYPE_FALRIC: - m_auiEncounter[2] = uiData; - if(uiData == SPECIAL) - CloseDoor(m_uiExitGateGUID); + case TYPE_MARWYN: m_auiEncounter[uiType] = uiData; + if(uiData == DONE) + { + OpenDoor(m_uiMainGateGUID); + OpenDoor(m_uiExitGateGUID); + } break; - case TYPE_MARWYN: - m_auiEncounter[3] = uiData; - if(uiData == DONE) - { - OpenDoor(m_uiMainGateGUID); - OpenDoor(m_uiExitGateGUID); - } + case TYPE_FROST_GENERAL: m_auiEncounter[uiType] = uiData; + if(uiData == DONE) + OpenDoor(m_uiDoor2GUID); break; - case TYPE_LICH_KING: - m_auiEncounter[4] = uiData; + case TYPE_LICH_KING: m_auiEncounter[uiType] = uiData; + if(uiData == IN_PROGRESS) + OpenDoor(m_uiDoor3GUID); break; - case TYPE_ICE_WALL_01: - m_auiEncounter[5] = uiData; - break; - case TYPE_ICE_WALL_02: - m_auiEncounter[6] = uiData; - break; - case TYPE_ICE_WALL_03: - m_auiEncounter[7] = uiData; - break; - case TYPE_ICE_WALL_04: - m_auiEncounter[8] = uiData; - break; - case TYPE_HALLS: - m_auiEncounter[9] = uiData; - break; - case DATA_LIDER: - m_auiLider = uiData; - uiData = NOT_STARTED; + case TYPE_ICE_WALL_01: m_auiEncounter[uiType] = uiData; break; + case TYPE_ICE_WALL_02: m_auiEncounter[uiType] = uiData; break; + case TYPE_ICE_WALL_03: m_auiEncounter[uiType] = uiData; break; + case TYPE_ICE_WALL_04: m_auiEncounter[uiType] = uiData; break; + case TYPE_HALLS: m_auiEncounter[uiType] = uiData; break; + case DATA_LIDER: m_auiLider = uiData; + uiData = NOT_STARTED; break; } @@ -182,28 +175,19 @@ struct MANGOS_DLL_DECL instance_halls_of_reflection : public ScriptedInstance { switch(uiType) { - case TYPE_PHASE: - return m_auiEncounter[0]; - case TYPE_EVENT: - return m_auiEncounter[1]; - case TYPE_FALRIC: - return m_auiEncounter[2]; - case TYPE_MARWYN: - return m_auiEncounter[3]; - case TYPE_LICH_KING: - return m_auiEncounter[4]; - case TYPE_ICE_WALL_01: - return m_auiEncounter[5]; - case TYPE_ICE_WALL_02: - return m_auiEncounter[6]; - case TYPE_ICE_WALL_03: - return m_auiEncounter[7]; - case TYPE_ICE_WALL_04: - return m_auiEncounter[8]; - case TYPE_HALLS: - return m_auiEncounter[9]; - case DATA_LIDER: - return m_auiLider; + case TYPE_PHASE: return m_auiEncounter[uiType]; + case TYPE_EVENT: return m_auiEncounter[uiType]; + case TYPE_FALRIC: return m_auiEncounter[uiType]; + case TYPE_MARWYN: return m_auiEncounter[uiType]; + case TYPE_LICH_KING: return m_auiEncounter[uiType]; + case TYPE_FROST_GENERAL: return m_auiEncounter[uiType]; + case TYPE_ICE_WALL_01: return m_auiEncounter[uiType]; + case TYPE_ICE_WALL_02: return m_auiEncounter[uiType]; + case TYPE_ICE_WALL_03: return m_auiEncounter[uiType]; + case TYPE_ICE_WALL_04: return m_auiEncounter[uiType]; + case TYPE_HALLS: return m_auiEncounter[uiType]; + case DATA_LIDER: return m_auiLider; + default: return 0; } return 0; } @@ -223,12 +207,15 @@ struct MANGOS_DLL_DECL instance_halls_of_reflection : public ScriptedInstance switch(uiData) { case GO_IMPENETRABLE_DOOR: return m_uiMainGateGUID; - case GO_FROSTMOURNE: return m_uiFrostmourneGUID; - case NPC_FALRIC: return m_uiFalricGUID; - case NPC_MARWYN: return m_uiMarwynGUID; - case BOSS_LICH_KING: return m_uiLichKingGUID; - case DATA_ESCAPE_LIDER: return m_uiLiderGUID; - case NPC_FROST_GENERAL: return m_uiFrostGeneralGUID; + case GO_FROSTMOURNE: return m_uiFrostmourneGUID; + case NPC_FALRIC: return m_uiFalricGUID; + case NPC_MARWYN: return m_uiMarwynGUID; + case BOSS_LICH_KING: return m_uiLichKingGUID; + case DATA_ESCAPE_LIDER: return m_uiLiderGUID; + case NPC_FROST_GENERAL: return m_uiFrostGeneralGUID; + case GO_ICECROWN_DOOR: return m_uiExitGateGUID; + case GO_ICECROWN_DOOR_2: return m_uiDoor2GUID; + case GO_ICECROWN_DOOR_3: return m_uiDoor3GUID; } return 0; } From 7695aab76ff19a0868aa35f47baf2683ed27b223 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Tue, 22 Jun 2010 13:32:09 +0400 Subject: [PATCH 377/405] Readme change --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README b/README index 557ede72f..a8d1e88fe 100644 --- a/README +++ b/README @@ -31,9 +31,9 @@ In this repository you found this custom scripts: - Obsidian Sanctum (by MaxXx2021) - Azjol-Nerub (by MaxXx2021) - Forge of souls (by Maxxx2021 and me) +- Halls of reflection (by Maxxx2021 and me) - Vault of Archavon (by Insider42) - Trial of the Crusader (by me) -- Halls of reflection (partially, by me) - Icecrown Citadel (alfatesting phase, by me) - Ruby Sanctum (placeholders, by me) - NPC special (by me, thanks for all) From 683786676bcda75a2fbcda514064796393e42286 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Tue, 22 Jun 2010 19:00:17 +0400 Subject: [PATCH 378/405] BSW error correct --- include/sc_boss_spell_worker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index b5b6d50f4..8574c5732 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -492,7 +492,7 @@ bool BossSpellWorker::_doRemove(uint8 m_uiSpellIdx, Unit* pTarget, SpellEffectIn return false; } - if (_auraCount(m_uiSpellIdx,pTarget) > 1) + if (_auraCount(m_uiSpellIdx,pTarget,index) > 1) { if (pTarget->GetAura(pSpell->m_uiSpellEntry[currentDifficulty], index)->modStackAmount(-1)) return true; From fb94f811b6e6007277b169a1fe9ca54bc28fdd97 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Tue, 22 Jun 2010 19:01:12 +0400 Subject: [PATCH 379/405] ICC part 46 - Festergut rewrite. NEED TESTING! (may be unstable) --- addition/721_icecrown_mangos.sql | 4 + .../721_icecrown_spelltable_scriptdev2.sql | 26 ++- .../icecrown_citadel/boss_festergut.cpp | 189 +++++++++++++++--- 3 files changed, 183 insertions(+), 36 deletions(-) diff --git a/addition/721_icecrown_mangos.sql b/addition/721_icecrown_mangos.sql index 2dc3b3276..5d54a7ab9 100644 --- a/addition/721_icecrown_mangos.sql +++ b/addition/721_icecrown_mangos.sql @@ -81,6 +81,10 @@ INSERT INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('6950 UPDATE `creature_template` SET `ScriptName`='boss_festergut', `AIName`='' WHERE `entry`= 36626; UPDATE `gameobject_template` SET `faction` = '114' WHERE `gameobject_template`.`entry` IN (201371); UPDATE `gameobject` SET `state` = '0' WHERE `id` IN (201371); +UPDATE `creature_template` SET `ScriptName`='mob_vile_gas_stalker', `AIName`='' WHERE `entry`= 38548; +DELETE FROM `spell_script_target` WHERE `targetEntry` = 38548; +INSERT INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('69248', '1', '38548'); +INSERT INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('69240', '1', '38548'); -- Professor putricide UPDATE `creature_template` SET `ScriptName`='boss_proffesor_putricide', `AIName`='' WHERE `entry`= 36678; diff --git a/addition/721_icecrown_spelltable_scriptdev2.sql b/addition/721_icecrown_spelltable_scriptdev2.sql index a566f451e..bcba520db 100644 --- a/addition/721_icecrown_spelltable_scriptdev2.sql +++ b/addition/721_icecrown_spelltable_scriptdev2.sql @@ -120,21 +120,27 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ -- Festergut DELETE FROM `boss_spell_table` WHERE `entry` = 36626; INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES -( 36626, 70138, 0, 0, 0, 5000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), -( 36626, 69161, 0, 0, 0, 5000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), -( 36626, 69162, 0, 0, 0, 5000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), -( 36626, 70468, 0, 0, 0, 5000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +( 36626, 69162, 0, 0, 0, 25000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +( 36626, 69166, 0, 0, 0, 5000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), ( 36626, 69165, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 1, 0, 0), ( 36626, 69157, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 150, 0, 0, 12, 0, 0), ( 36626, 69126, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 150, 0, 0, 12, 0, 0), -( 36626, 69166, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 1, 0, 0), ( 36626, 69195, 0, 0, 0, 20000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 1, 0, 0), -( 36626, 69278, 0, 0, 0, 20000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 1, 0, 0), -( 36626, 72103, 0, 0, 0, 20000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 4, 0, 0), -( 36626, 72219, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 3, 0, 0), -( 36626, 72227, 0, 0, 0, 20000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 4, 0, 0), -( 36626, 72272, 0, 0, 0, 20000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +( 36626, 69278, 0, 0, 0, 20000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +( 36626, 69279, 0, 0, 0, 20000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +( 36626, 69290, 0, 0, 0, 20000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +( 36626, 72103, 0, 0, 0, 20000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 6, 0, 1), +( 36626, 72214, 0, 0, 0, 15000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 3, 0, 0), +( 36626, 72219, 0, 0, 0, 15000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 3, 0, 0), +( 36626, 72227, 0, 0, 0, 20000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 6, 0, 1), +( 36626, 72272, 0, 0, 0, 20000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 6, 0, 0), +( 36626, 69244, 0, 0, 0, 20000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 6, 0, 0), +( 36626, 69248, 0, 0, 0, 20000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 6, 0, 0), +( 36626, 72287, 0, 0, 0, 20000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 1, 0, 0), ( 36626, 47008, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 0, 0, 0, 1, 0, 0); +-- summons +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMax_N10`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType` ) VALUES +(36626, 38548, 12000, 12000, 1, 1, 1, 1, 10, 20, 0, 11); -- Rotface DELETE FROM `boss_spell_table` WHERE `entry` = 36627; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp index 30be7bfc8..76c153192 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp @@ -16,7 +16,7 @@ /* ScriptData SDName: boss_festergut -SD%Complete: 20% +SD%Complete: 80% SDComment: by /dev/rsa SDCategory: Icecrown Citadel EndScriptData */ @@ -26,20 +26,27 @@ EndScriptData */ enum BossSpells { - SPELL_GASEOUS_BLIGHT_0 = 70138, - SPELL_GASEOUS_BLIGHT_1 = 69161, - SPELL_GASEOUS_BLIGHT_2 = 70468, + SPELL_GASEOUS_BLIGHT = 69162, SPELL_INHALE_BLIGHT = 69165, - SPELL_INHALED_BLIGHT = 71912, + SPELL_INHALED_BLIGHT = 69166, SPELL_PUNGENT_BLIGHT = 69195, SPELL_PUNGENT_BLIGHT_1 = 69157, SPELL_PUNGENT_BLIGHT_2 = 69126, SPELL_GAS_SPORE = 69278, + SPELL_SPORE_AURA_0 = 69279, + SPELL_SPORE_AURA_1 = 69290, SPELL_INOCULATE = 72103, SPELL_GASTRIC_BLOAT = 72219, +// SPELL_GASTRIC_BLOAT = 72214, SPELL_GASTRIC_EXPLOSION = 72227, SPELL_VILE_GAS = 72272, + SPELL_VILE_GAS_AURA = 69244, + SPELL_VILE_GAS_AURA_0 = 69248, SPELL_BERSERK = 47008, + SPELL_SUMMON_VILE_STALKER = 72287, + + NPC_VILE_GAS_STALKER = 38548, + MAX_SPORE_TARGETS = 6, }; struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI @@ -49,7 +56,6 @@ struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); bsw = new BossSpellWorker(this); Reset(); - bsw->resetTimers(); } ScriptedInstance *pInstance; @@ -57,14 +63,19 @@ struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI uint8 stage; bool intro; bool pet; + bool sporeCasted; + Unit* spored[MAX_SPORE_TARGETS]; void Reset() { if(!pInstance) return; + bsw->resetTimers(); pInstance->SetData(TYPE_FESTERGUT, NOT_STARTED); stage = 0; intro = false; pet = false; + sporeCasted = false; + memset(&spored, 0, sizeof(spored)); } void MoveInLineOfSight(Unit* pWho) @@ -94,7 +105,7 @@ struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI if (pInstance) pInstance->SetData(TYPE_FESTERGUT, FAIL); } - void Aggro(Unit *who) + void Aggro(Unit *who) { if(!pInstance) return; pInstance->SetData(TYPE_FESTERGUT, IN_PROGRESS); @@ -111,6 +122,43 @@ struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI DoScriptText(-1631206,m_creature); } + void doTriggerUnoculated() + { + for(uint8 i = 0; i < MAX_SPORE_TARGETS; ++i) + if (spored[i]) + if (!bsw->hasAura(SPELL_SPORE_AURA_1,spored[i])) + { + bsw->doCast(SPELL_INOCULATE,spored[i]); + spored[i] = NULL; + } + } + + void doSearchSpored() + { + Unit* searched = bsw->SelectRandomPlayer(SPELL_SPORE_AURA_1, true, 80.0f); + + if (!searched) return; + + bool exist = false; + + for(uint8 i = 0; i < MAX_SPORE_TARGETS; ++i) + if (spored[i]) + if (spored[i] = searched) + { + exist = true; + break; + } + + if (exist) return; + + for(uint8 i = 0; i < MAX_SPORE_TARGETS; ++i) + if (!spored[i]) + { + spored[i] = searched; + break; + } + } + void UpdateAI(const uint32 diff) { @@ -128,44 +176,89 @@ struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI switch(stage) { case 0: - if (bsw->timedQuery(SPELL_GASEOUS_BLIGHT_0, diff)) + if (bsw->timedQuery(SPELL_GASEOUS_BLIGHT, diff)) { - bsw->doCast(SPELL_GASEOUS_BLIGHT_0); - bsw->doCast(SPELL_INHALE_BLIGHT); - stage = 1; + bsw->doCast(SPELL_GASEOUS_BLIGHT); + stage = 1; } break; - case 1: - if (bsw->timedQuery(SPELL_GASEOUS_BLIGHT_0, diff)) - { - bsw->doCast(SPELL_GASEOUS_BLIGHT_0); + case 1: + switch (urand(0,2)) { + case 0: DoScriptText(-1631210,m_creature); break; + case 1: DoScriptText(-1631211,m_creature); break; + case 2: DoScriptText(-1631212,m_creature); break; + } bsw->doCast(SPELL_INHALE_BLIGHT); stage = 2; - } break; - case 2: - if (bsw->timedQuery(SPELL_GASEOUS_BLIGHT_0, diff)) + case 2: + if (bsw->timedQuery(SPELL_GASEOUS_BLIGHT, diff)) { - bsw->doCast(SPELL_GASEOUS_BLIGHT_0); + bsw->doCast(SPELL_GASEOUS_BLIGHT); + stage = 3; + } + break; + case 3: + switch (urand(0,2)) { + case 0: DoScriptText(-1631210,m_creature); break; + case 1: DoScriptText(-1631211,m_creature); break; + case 2: DoScriptText(-1631212,m_creature); break; + } bsw->doCast(SPELL_INHALE_BLIGHT); - stage = 3; + stage = 4; + break; + case 4: + if (bsw->timedQuery(SPELL_GASEOUS_BLIGHT, diff)) + { + bsw->doCast(SPELL_GASEOUS_BLIGHT); + stage = 5; } break; - case 3: + case 5: + switch (urand(0,2)) { + case 0: DoScriptText(-1631210,m_creature); break; + case 1: DoScriptText(-1631211,m_creature); break; + case 2: DoScriptText(-1631212,m_creature); break; + } + bsw->doCast(SPELL_INHALE_BLIGHT); + stage = 6; + break; + case 6: if (bsw->timedQuery(SPELL_PUNGENT_BLIGHT, diff)) { - DoScriptText(-1631208,m_creature); - bsw->doCast(SPELL_PUNGENT_BLIGHT); - stage = 0; + DoScriptText(-1631208,m_creature); + bsw->doCast(SPELL_PUNGENT_BLIGHT); + stage = 7; } break; + case 7: + switch (urand(0,2)) { + case 0: DoScriptText(-1631210,m_creature); break; + case 1: DoScriptText(-1631211,m_creature); break; + case 2: DoScriptText(-1631212,m_creature); break; + } + m_creature->RemoveAurasDueToSpell(SPELL_INHALED_BLIGHT); + stage = 0; + break; } + + doTriggerUnoculated(); + bsw->timedCast(SPELL_GAS_SPORE, diff); + doSearchSpored(); + bsw->timedCast(SPELL_GASTRIC_BLOAT, diff); + if (bsw->auraCount(SPELL_GASTRIC_BLOAT,m_creature->getVictim(),EFFECT_INDEX_1) > 9) + { + bsw->doCast(SPELL_GASTRIC_EXPLOSION,m_creature->getVictim()); + m_creature->getVictim()->RemoveAurasDueToSpell(SPELL_GASTRIC_BLOAT); + } + if (bsw->timedQuery(SPELL_VILE_GAS, diff)) { - bsw->doCast(SPELL_VILE_GAS); +// if (Unit* pTemp = bsw->doSummon(NPC_VILE_GAS_STALKER)) + bsw->doCast(SPELL_VILE_GAS); DoScriptText(-1631213,m_creature); }; @@ -174,7 +267,6 @@ struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI DoScriptText(-1631207,m_creature); }; - DoMeleeAttackIfReady(); } }; @@ -185,6 +277,46 @@ CreatureAI* GetAI_boss_festergut(Creature* pCreature) return new boss_festergutAI(pCreature); } +struct MANGOS_DLL_DECL mob_vile_gas_stalkerAI : public ScriptedAI +{ + mob_vile_gas_stalkerAI(Creature *pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance *pInstance; + uint32 m_lifetimer; + + void Reset() + { + m_creature->SetRespawnDelay(7*DAY); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetInCombatWithZone(); + SetCombatMovement(false); + m_creature->SetDisplayId(11686); + m_lifetimer = 12000; + } + + void UpdateAI(const uint32 uiDiff) + { + if (!pInstance || pInstance->GetData(TYPE_FESTERGUT) != IN_PROGRESS) + m_creature->ForcedDespawn(); + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (m_lifetimer <= uiDiff) + m_creature->ForcedDespawn(); + else m_lifetimer -= uiDiff; + + } +}; + +CreatureAI* GetAI_mob_vile_gas_stalker(Creature* pCreature) +{ + return new mob_vile_gas_stalkerAI(pCreature); +} void AddSC_boss_festergut() { @@ -193,4 +325,9 @@ void AddSC_boss_festergut() newscript->Name = "boss_festergut"; newscript->GetAI = &GetAI_boss_festergut; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "mob_vile_gas_stalker"; + newscript->GetAI = &GetAI_mob_vile_gas_stalker; + newscript->RegisterSelf(); } From 802955f22269f2344be084b99360f79bbaf1a356 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 23 Jun 2010 18:38:20 +0400 Subject: [PATCH 380/405] Mirror image correct && improve --- scripts/world/npcs_special.cpp | 124 +++++++++++++++++++++++---------- 1 file changed, 89 insertions(+), 35 deletions(-) diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index 27d04f567..4ad2f205b 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -1720,14 +1720,32 @@ bool GossipSelect_npc_locksmith(Player* pPlayer, Creature* pCreature, uint32 uiS ## npc_mirror_image ######*/ +enum MirrorImageSpells +{ + SPELL_CLONE_CASTER = 45204, + SPELL_CLONE_CASTER_1 = 69837, +// SPELL_CLONE_CASTER_1 = 58836, + SPELL_CLONE_THREAT = 58838, + SPELL_FIREBLAST = 59637, + SPELL_FROSTBOLT = 59638, + SPELL_FROSTSHIELD = 43008, + SPELL_FIRESHIELD = 43046, + SPELL_ICEBLOCK = 65802, + SPELL_ICERING = 42917, +}; + struct MANGOS_DLL_DECL npc_mirror_imageAI : public ScriptedAI { npc_mirror_imageAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} uint32 m_uiFrostboltTimer; + uint32 m_uiFrostringTimer; uint32 m_uiFireblastTimer; bool inCombat; Unit *owner; + float angle; + bool blocked; + bool movement; void Reset() { @@ -1737,24 +1755,30 @@ struct MANGOS_DLL_DECL npc_mirror_imageAI : public ScriptedAI m_creature->SetLevel(owner->getLevel()); m_creature->setFaction(owner->getFaction()); + m_creature->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE); + m_creature->SetUInt32Value(UNIT_FIELD_BYTES_0, 2048); + m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); + m_creature->SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE); + + m_uiFrostboltTimer = urand(4000,9000); + m_uiFrostboltTimer = urand(5000,12000); + m_uiFireblastTimer = urand(4000,9000); + inCombat = false; + blocked = false; + movement = false; + + if (owner && !m_creature->hasUnitState(UNIT_STAT_FOLLOW)) { + angle = m_creature->GetAngle(owner); m_creature->GetMotionMaster()->Clear(false); - m_creature->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE); + m_creature->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST + 3.0f, angle); } - // Inherit Master's Threat List (not yet implemented) - //owner->CastSpell((Unit*)NULL, 58838, true); - // here mirror image casts on summoner spell (not present in client dbc) 49866 - // here should be auras (not present in client dbc): 35657, 35658, 35659, 35660 selfcasted by mirror images (stats related?) - // Clone Me! - m_uiFrostboltTimer = 0; - m_uiFireblastTimer = 0; - inCombat = false; - uint32 equipmain = 0; - uint32 equipoffhand = 0; - // Add visible weapon - if (Item const * item = ((Player *)owner)->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND)) - m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, item->GetProto()->ItemId); + + if(owner->IsPvP()) + m_creature->SetPvP(true); + if(owner->IsFFAPvP()) + m_creature->SetFFAPvP(true); } void AttackStart(Unit* pWho) @@ -1764,14 +1788,11 @@ struct MANGOS_DLL_DECL npc_mirror_imageAI : public ScriptedAI if (m_creature->Attack(pWho, true)) { m_creature->clearUnitState(UNIT_STAT_FOLLOW); - // TMGs call CreatureRelocation which via MoveInLineOfSight can call this function - // thus with the following clear the original TMG gets invalidated and crash, doh - // hope it doesn't start to leak memory without this :-/ - //i_pet->Clear(); -// m_creature->GetMotionMaster()->MoveChase(pWho); m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); m_creature->AddThreat(pWho, 100.0f); - DoStartMovement(pWho, 20.0f); + DoStartMovement(pWho, 30.0f); + SetCombatMovement(true); inCombat = true; } } @@ -1788,21 +1809,35 @@ struct MANGOS_DLL_DECL npc_mirror_imageAI : public ScriptedAI if (owner && !m_creature->hasUnitState(UNIT_STAT_FOLLOW)) { m_creature->GetMotionMaster()->Clear(false); - m_creature->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST,PET_FOLLOW_ANGLE); + m_creature->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST + 3.0f,angle); } } void UpdateAI(const uint32 diff) { - if (owner && !(m_creature->HasAura(45204))) - m_creature->CastSpell(m_creature, 45204, true, NULL, NULL, owner->GetGUID()); + if (!owner || !owner->isAlive()) m_creature->ForcedDespawn(); + + if (owner && !m_creature->HasAura(SPELL_CLONE_CASTER)) + m_creature->CastSpell(m_creature, SPELL_CLONE_CASTER, true, NULL, NULL, owner->GetGUID()); + + if (owner && !m_creature->HasAura(SPELL_CLONE_CASTER_1)) + m_creature->CastSpell(m_creature, SPELL_CLONE_CASTER_1, true, NULL, NULL, owner->GetGUID()); - if (owner && !(m_creature->HasAura(58836))) - m_creature->CastSpell(m_creature, 58836, true, NULL, NULL, owner->GetGUID()); + if (owner && !m_creature->HasAura(SPELL_CLONE_THREAT)) + m_creature->CastSpell(m_creature, SPELL_CLONE_THREAT, true, NULL, NULL, owner->GetGUID()); + + if (owner && owner->HasAura(SPELL_FROSTSHIELD) && !m_creature->HasAura(SPELL_FROSTSHIELD)) + m_creature->CastSpell(m_creature, SPELL_FROSTSHIELD, false); + + if (owner && owner->HasAura(SPELL_FIRESHIELD) && !m_creature->HasAura(SPELL_FIRESHIELD)) + m_creature->CastSpell(m_creature, SPELL_FIRESHIELD, false); if (!m_creature->getVictim()) if (owner && owner->getVictim()) - m_creature->AI()->AttackStart(owner->getVictim()); + AttackStart(owner->getVictim()); + + if (m_creature->getVictim() && m_creature->getVictim() != owner->getVictim()) + AttackStart(owner->getVictim()); if (inCombat && !m_creature->getVictim()) { @@ -1812,17 +1847,36 @@ struct MANGOS_DLL_DECL npc_mirror_imageAI : public ScriptedAI if (!inCombat) return; - if (m_uiFrostboltTimer <= diff) + if (m_creature->IsWithinDistInMap(m_creature->getVictim(),30.0f)) { - DoCast(m_creature->getVictim(),59638); - m_uiFrostboltTimer = 3100; - }else m_uiFrostboltTimer -= diff; + movement = false; + if (m_uiFrostboltTimer <= diff) + { + DoCastSpellIfCan(m_creature->getVictim(),SPELL_FROSTBOLT); + m_uiFrostboltTimer = urand(4000,8000); + } else m_uiFrostboltTimer -= diff; - if (m_uiFireblastTimer <= diff) - { - DoCast(m_creature->getVictim(),59637); - m_uiFireblastTimer = 6000; - }else m_uiFireblastTimer -= diff; + if (m_uiFireblastTimer <= diff) + { + DoCastSpellIfCan(m_creature->getVictim(),SPELL_FIREBLAST); + m_uiFireblastTimer = urand(4000,8000); + } else m_uiFireblastTimer -= diff; + + if (m_uiFrostringTimer <= diff && m_creature->IsWithinDistInMap(m_creature->getVictim(),5.0f)) + { + DoCastSpellIfCan(m_creature->getVictim(),SPELL_ICERING); + m_uiFrostringTimer = urand(4000,8000); + } else m_uiFrostboltTimer -= diff; + + if (!blocked && m_creature->GetHealthPercent() < 10.0f) + { + DoCastSpellIfCan(m_creature,SPELL_ICEBLOCK); + blocked = true; + } + } else if (!movement) { + DoStartMovement(m_creature->getVictim(), 30.0f); + movement = true; + } DoMeleeAttackIfReady(); } From 2705e813d95be25c63016172b38ae904bd9bb9cc Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 24 Jun 2010 20:11:15 +0400 Subject: [PATCH 381/405] ICC part 47 - LK platform destruction almost complete. --- .../721_icecrown_spelltable_scriptdev2.sql | 2 +- .../icecrown_citadel/boss_the_lich_king.cpp | 97 ++++++++++++------- .../icecrown_citadel/def_spire.h | 3 + .../instance_icecrown_spire.cpp | 10 ++ 4 files changed, 75 insertions(+), 37 deletions(-) diff --git a/addition/721_icecrown_spelltable_scriptdev2.sql b/addition/721_icecrown_spelltable_scriptdev2.sql index bcba520db..4ad02f55b 100644 --- a/addition/721_icecrown_spelltable_scriptdev2.sql +++ b/addition/721_icecrown_spelltable_scriptdev2.sql @@ -349,7 +349,7 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ (36597, 68980, 0, 0, 0, 1500, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), (36597, 68981, 0, 0, 0, 60000, 0, 0, 0, 60000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36597, 72133, 0, 0, 0, 5000, 0, 0, 0, 10000, 0, 0, 0, 0, 0, 0, 1, 0, 0), -(36597, 72262, 0, 0, 0, 60000, 0, 0, 0, 60000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 72262, 0, 0, 0, 5000, 0, 0, 0, 5000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36597, 69201, 0, 0, 0, 5000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 4, 0, 1), (36597, 69200, 0, 0, 0, 5000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 4, 0, 0), (36597, 69242, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp index a382cecda..b837c6b2d 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp @@ -128,6 +128,7 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI uint32 nextEvent; uint32 nextPoint; uint32 UpdateTimer; + uint32 oldflag; bool movementstarted; bool battlestarted; bool finalphase; @@ -372,7 +373,7 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI case 13280: UpdateTimer = 2000; pInstance->SetData(TYPE_EVENT,13290); - stage = 12; + stage = 13; if (pFrostmourne) pFrostmourne->ForcedDespawn(); if (Creature* pTemp = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_FROSTMOURNE_TRIGGER))) pTemp->ForcedDespawn(); @@ -433,7 +434,7 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI if (movementstarted) return; bsw->doCast(SPELL_REMORSELESS_WINTER); stage = 3; - return; + break; case 3: bsw->timedCast(SPELL_SUMMON_RAGING_SPIRIT, diff); bsw->timedCast(SPELL_SUMMON_ICE_SPHERE, diff); @@ -448,24 +449,32 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI if (bsw->timedQuery(SPELL_REMORSELESS_WINTER, diff)) { bsw->doCast(SPELL_QUAKE); + stage = 4; + DoScriptText(-1631524, m_creature); + }; + break; + case 4: // Platform destruct + if (bsw->timedQuery(SPELL_QUAKE, diff)) + { pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_ICESHARD_1)); pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_ICESHARD_2)); pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_ICESHARD_3)); pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_ICESHARD_4)); - if (GameObject* pGoFloor = pInstance->instance->GetGameObject(pInstance->GetData64(GO_FROSTY_WIND))) - { -// pGoFloor->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK_10 | GO_FLAG_NODESPAWN); -// pGoFloor->SetUInt32Value(GAMEOBJECT_BYTES_1,8449); - } - DoScriptText(-1631524, m_creature); + if (GameObject* pGoFloor = pInstance->instance->GetGameObject(pInstance->GetData64(GO_ARTHAS_PLATFORM))) + { + pGoFloor->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK_10 | GO_FLAG_NODESPAWN); + oldflag = pGoFloor->GetUInt32Value(GAMEOBJECT_BYTES_1); + pGoFloor->SetUInt32Value(GAMEOBJECT_BYTES_1,8449); + } + if (GameObject* pGoSnow = pInstance->instance->GetGameObject(pInstance->GetData64(GO_FROSTY_WIND))) + pGoSnow->SetGoState(GO_STATE_READY); m_creature->GetMotionMaster()->Clear(); m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); SetCombatMovement(true); - stage = 4; - }; - + stage = 5; + } break; - case 4: // Phase 2 + case 5: // Phase 2 if (bsw->timedQuery(SPELL_SPAWN_DEFILE, diff)) { @@ -491,22 +500,29 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI if (m_creature->GetHealthPercent() < 40.0f) { - stage = 5; + stage = 6; DoScriptText(-1631523,m_creature); } break; - case 5: // Go in transition phase + case 6: // Go in transition phase m_creature->AttackStop(); SetCombatMovement(false); StartMovement(1,0); - stage = 6; + stage = 7; break; - case 6: + case 7: // Platform restore if (movementstarted) return; + if (GameObject* pGoFloor = pInstance->instance->GetGameObject(pInstance->GetData64(GO_ARTHAS_PLATFORM))) + { + pGoFloor->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK_10 | GO_FLAG_NODESPAWN); + pGoFloor->SetUInt32Value(GAMEOBJECT_BYTES_1,oldflag); + } + if (GameObject* pGoSnow = pInstance->instance->GetGameObject(pInstance->GetData64(GO_FROSTY_WIND))) + pGoSnow->SetGoState(GO_STATE_ACTIVE); bsw->doCast(SPELL_REMORSELESS_WINTER); - stage = 7; - return; - case 7: + stage = 8; + break; + case 8: bsw->timedCast(SPELL_SUMMON_RAGING_SPIRIT, diff); bsw->timedCast(SPELL_SUMMON_ICE_SPHERE, diff); bsw->timedCast(SPELL_PAIN_AND_SUFFERING, diff); @@ -519,21 +535,33 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI if (bsw->timedQuery(SPELL_REMORSELESS_WINTER, diff)) { - stage = 8; DoScriptText(-1631524, m_creature); - m_creature->GetMotionMaster()->Clear(); - m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); - SetCombatMovement(true); - bsw->doCast(SPELL_SUMMON_VILE_SPIRITS); for (uint8 i = 0; i < 11; ++i) - bsw->doCast(NPC_VILE_SPIRIT); - + bsw->doCast(NPC_VILE_SPIRIT); bsw->doCast(SPELL_QUAKE); + stage = 9; }; break; - case 8: // Phase 3 + case 9: // Platform destruct + if (bsw->timedQuery(SPELL_QUAKE, diff)) + { + if (GameObject* pGoFloor = pInstance->instance->GetGameObject(pInstance->GetData64(GO_ARTHAS_PLATFORM))) + { + pGoFloor->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK_10 | GO_FLAG_NODESPAWN); + oldflag = pGoFloor->GetUInt32Value(GAMEOBJECT_BYTES_1); + pGoFloor->SetUInt32Value(GAMEOBJECT_BYTES_1,8449); + } + if (GameObject* pGoSnow = pInstance->instance->GetGameObject(pInstance->GetData64(GO_FROSTY_WIND))) + pGoSnow->SetGoState(GO_STATE_READY); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + SetCombatMovement(true); + stage = 10; + } + break; + case 10: // Phase 3 if (bsw->timedQuery(SPELL_SPAWN_DEFILE, diff)) { bsw->doCast(SPELL_SPAWN_DEFILE); @@ -554,22 +582,20 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public ScriptedAI if (m_creature->GetHealthPercent() < 10.0f) { - stage = 9; + stage = 11; DoScriptText(-1631513,m_creature); } break; - case 9: // Ending Phase start + case 11: // Ending Phase start m_creature->AttackStop(); SetCombatMovement(false); StartMovement(6,13000); - stage = 10; + stage = 12; battlestarted = false; break; - case 10: - break; - case 11: - break; case 12: + break; + case 13: DoMeleeAttackIfReady(); break; } @@ -829,7 +855,7 @@ bool GossipHello_boss_tirion_icc(Player* pPlayer, Creature* pCreature) char const* _message; - switch (LocaleConstant currentlocale = pPlayer->GetSession()->GetSessionDbcLocale()) + switch (pPlayer->GetSession()->GetSessionDbcLocale()) { case LOCALE_enUS: case LOCALE_koKR: @@ -867,7 +893,6 @@ bool GossipSelect_boss_tirion_icc(Player* pPlayer, Creature* pCreature, uint32 u pInstance->SetData(TYPE_EVENT,12000); return true; } else return false; - }; CreatureAI* GetAI_boss_tirion_icc(Creature* pCreature) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h index 52efa4558..3a123036c 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h @@ -124,6 +124,9 @@ enum GO_FROSTY_WIND = 202188, // GO_FROSTY_EDGE = 202189, // + GO_SNOW_EDGE = 202190, // + GO_ARTHAS_PLATFORM = 202161, // + GO_ARTHAS_PRECIPICE = 202078, // TYPE_EVENT_TIMER = 99, TYPE_EVENT = 100, diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp index 76b9cd17b..43fee66f4 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp @@ -91,6 +91,8 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance uint64 m_uiFrostyWindGUID; uint64 m_uiFrostyEdgeGUID; + uint64 m_uiArthasPlatformGUID; + uint64 m_uiArthasPrecipiceGUID; uint64 m_uiFrostmourneGUID; uint64 m_uiFrostmourneTriggerGUID; @@ -431,6 +433,12 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance case GO_FROSTY_EDGE: m_uiFrostyEdgeGUID = pGo->GetGUID(); break; + case GO_ARTHAS_PLATFORM: + m_uiArthasPlatformGUID = pGo->GetGUID(); + break; + case GO_ARTHAS_PRECIPICE: + m_uiArthasPrecipiceGUID = pGo->GetGUID(); + break; } OpenAllDoors(); } @@ -720,6 +728,8 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance case GO_ICESHARD_4: return m_uiIceShard4GUID; case GO_FROSTY_WIND: return m_uiFrostyWindGUID; case GO_FROSTY_EDGE: return m_uiFrostyEdgeGUID; + case GO_ARTHAS_PLATFORM: return m_uiArthasPlatformGUID; + case GO_ARTHAS_PRECIPICE: return m_uiArthasPrecipiceGUID; case NPC_FROSTMOURNE_TRIGGER: return m_uiFrostmourneTriggerGUID; case NPC_FROSTMOURNE_HOLDER: return m_uiFrostmourneHolderGUID; } From 8b6c9a97257c5f34710ebc147284cb2b3893733b Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Fri, 25 Jun 2010 23:09:11 +0400 Subject: [PATCH 382/405] English HoR texts - thanks to miskith --- addition/723_icecrown_down_scriptdev2.sql | 170 +++++++++++----------- 1 file changed, 85 insertions(+), 85 deletions(-) diff --git a/addition/723_icecrown_down_scriptdev2.sql b/addition/723_icecrown_down_scriptdev2.sql index 3bad9acec..ac7ded6ee 100644 --- a/addition/723_icecrown_down_scriptdev2.sql +++ b/addition/723_icecrown_down_scriptdev2.sql @@ -119,103 +119,103 @@ INSERT INTO `script_texts` (`entry`,`content_default`,`content_loc1`,`content_lo DELETE FROM `script_texts` WHERE `entry` BETWEEN -1594540 AND -1594430; INSERT INTO `script_texts` (`entry`,`content_default`,`content_loc8`,`sound`,`type`,`language`,`emote`,`comment`) VALUES # SCENE - Hall Of Reflection (Intro) - PreUther -(-1594433, '', 'Как же тут холодно... Кровь стынет в жилах.', 16631,0,0,1, '67234'), -(-1594434, '', 'Я... Я не верю своим глазам. Ледяная скорбь перед нами без всякой охраны! Как и говорил гном. Вперед герои!', 17049,0,0,1, '67234'), -(-1594435, '', 'Что это там впереди? Неужели? Скорее герои!', 16632,1,0,1, '67234'), -(-1594436, '', 'Ледяная Скорбь, клинок, разрушивший наше королевство...', 16633,1,0,1, '67234'), -(-1594437, '', 'Боль снова захлестывает меня, когда я так близко вижу меч, отнявший у меня жизнь.', 17050,0,0,1, '67234'), -(-1594438, '', 'Отойдите. Тот кто коснется этого клинка обречет себя на вечные муки. Я попытаюсь заговорить с душами заключенными в Ледяной скорби. Расступитесь... Чуть назад! Прошу.', 16634,1,0,1, '67234'), -(-1594439, '', 'Я не смею его коснуться. Назад! Отступите! Я попробую установить связь с мечом. Возможно, спасение находится внутри!', 17051,1,0,1, '67234'), +(-1594433, 'The chill of this place freezes the marrow of my bones!', 'Как же тут холодно... Кровь стынет в жилах.', 16631,0,0,1, '67234'), +(-1594434, 'I... I don\'t believe it! Frostmourne stands before us, unguarded! Just as the Gnome claimed. Come, heroes!', 'Я... Я не верю своим глазам. Ледяная скорбь перед нами без всякой охраны! Как и говорил гном. Вперед герои!', 17049,0,0,1, '67234'), +(-1594435, 'What is that? Up ahead! Could it be ... ? Heroes at my side!', 'Что это там впереди? Неужели? Скорее герои!', 16632,1,0,1, '67234'), +(-1594436, 'Frostmourne ... The blade that destroyed our kingdom ...', 'Ледяная Скорбь, клинок, разрушивший наше королевство...', 16633,1,0,1, '67234'), +(-1594437, 'Standing this close to the blade that ended my life... The pain... It is renewed.', 'Боль снова захлестывает меня, когда я так близко вижу меч, отнявший у меня жизнь.', 17050,0,0,1, '67234'), +(-1594438, 'Stand back! Touch that blade and your soul will be scarred for all eternity! I must attempt to commune with the spirits locked away within Frostmourne. Give me space, back up please!', 'Отойдите. Тот кто коснется этого клинка обречет себя на вечные муки. Я попытаюсь заговорить с душами заключенными в Ледяной скорби. Расступитесь... Чуть назад! Прошу.', 16634,1,0,1, '67234'), +(-1594439, 'I dare not touch it. Stand back! Stand back! As I attempt to commune with the blade. Perhaps our salvation lies within.', 'Я не смею его коснуться. Назад! Отступите! Я попробую установить связь с мечом. Возможно, спасение находится внутри!', 17051,1,0,1, '67234'), # SCENE - Hall Of Reflection (Intro) - UtherDialog -(-1594440, '', 'Джайна? Неужели это ты?', 16666,0,0,1, '67234'), -(-1594441, '', 'Осторожней девочка! Однажды мне уже говорили, что этот проклятый меч может нас спасти. Посмотри вокруг, и ты увидишь, что из этого вышло.', 16659,0,0,1, '67234'), -(-1594442, '', 'Утер? Милый Утер! Мне... Мне так жаль.', 16635,0,0,1, '67234'), -(-1594443, '', 'Утер? Утер Светоносный? Как...', 17052,0,0,1, '67234'), -(-1594444, '', 'Джайна, у вас мало времени. Король - Лич видит все что видит Ледяная Скорбь. Вскоре он будет здесь.', 16667,0,0,1, '67234'), -(-1594445, '', 'У вас мало времени. Король - Лич видит все что видит Ледяная Скорбь. Вскоре он будет здесь.', 16660,0,0,1, '67234'), -(-1594446, '', 'Артас здесь? Может я...', 16636,0,0,1, '67234'), -(-1594447, '', 'Король - Лич здесь? Значит моя судьба решится сегодня!', 17053,1,0,1, '67234'), -(-1594448, '', 'Нет девочка. Артаса здесь нет. Артас лишь тень, мелькающая в сознании Короля - Лича. Смутная тень.', 16668,0,0,1, '67234'), -(-1594449, '', 'Вам не победить Короля - Лича. Покрайней мере не здесь. Глупо и пытаться. Он убьет твоих соратников и воскресит их как воинов плети. Но что до тебя Сильвана, он готовит тебе участь еще страшнее, чем в прошлый раз.', 16661,0,0,1, '67234'), -(-1594450, '', 'Но если есть малейшая надежда вернуть Артаса... Я должна попытаться!', 16637,0,0,1, '67234'), -(-1594451, '', 'Должен быть способ!', 17054,0,0,1, '67234'), -(-1594452, '', 'Джайна послушай меня. Вам нужно уничтожить Короля - Лича. С ним нельзя договориться. Он убьет вас всех и превратит в могущественных воинов Плети.', 16669,0,0,1, '67234'), -(-1594453, '', 'Возможно... Но знай! Король - Лич должен быть всегда. Даже если вы убьете Артаса кто то обязан будет занять его место. Лишившись правителя Плеть налетит на мир как стая саранчи и уничтожит все на своем пути.', 16662,0,0,1, '67234'), -(-1594454, '', 'Но как Утер? Как мне убить моего принца, моего...', 16638,0,0,1, '67234'), -(-1594455, '', 'Кому по силам такое бремя?', 17055,0,0,1, '67234'), -(-1594456, '', 'Забудь об этом девочка. Короля - Лича нужно уничтожить на том месте, где он слился с Нерзулом. На самой вершине, у Ледяного Трона!', 16670,0,0,1, '67234'), -(-1594457, '', 'Не знаю, Королева Баньши... Если бы не Артас, который все еще является частью Короля - Лича, Плеть давно бы уже уничтожила Азерот.', 16663,0,0,1, '67234'), -(-1594458, '', 'Ты прав Утер, прости меня... Я не знаю что на меня нашло. Мы передадим твои слова Королю и рыцарям, которые сражаются с Плетью в Цитадели Ледяной Короны.', 16639,0,0,1, '67234'), -(-1594459, '', 'Тебе нужно знать еще кое что о Короле - Личе. Плеть не должна выйти из под контроля. Даже если вы убьете Короля - Лича, кто-то должен будет занять его место. Без Короля Плеть налетит на мир как стая саранчи и уничтожит все живое.', 16671,0,0,1, '67234'), -(-1594460, '', 'Увы единственый способ одолеть Короля - Лича - это убить его там где он был порожден.', 16664,0,0,1, '67234'), -(-1594461, '', 'Кому по силам такое бремя?', 16640,0,0,1, '67234'), -(-1594462, '', 'Ледяной Трон!', 17056,0,0,1, '67234'), -(-1594463, '', 'Великая жертва, благородной души.', 16672,0,0,1, '67234'), -(-1594464, '', 'Не знаю Джайна... мне кажется если бы не Артас, который все еще является частью Короля - Лича, Плеть давно бы уже уничтожила Азерот.', 16673,0,0,1, '67234'), -(-1594465, '', 'Но может еще есть надежда?', 16641,0,0,1, '67234'), -(-1594466, '', 'Нет Джайна... Эээээ... Он... Он приближается... Вы... Вы должны...', 16674,1,0,1, '67234'), -(-1594467, '', 'Да... Эээээ... Он... Он приближается... Вы... Вы должны...', 16665,1,0,1, '67234'), -(-1594468, '', 'Замолчи, паладин.', 17225,1,0,0, '67234'), -(-1594469, '', 'Так ты хочешь поговорить с мертвыми? Нет ничего проще!', 17226,1,0,0, '67234'), -(-1594470, '', 'Фалрик, Марвин, когда закончите, принесите их тела в мои покои.', 17227,0,0,0, '67234'), -(-1594471, '', 'Ты от меня не отмахнешься Артас. Я должна понять, я должна знать.', 16642,1,0,1, '67234'), -(-1594472, '', 'Ты так просто от меня не уйдешь Артас. Я отомщу тебе!', 17057,1,0,1, '67234'), +(-1594440, 'Jaina! Could it truly be you?', 'Джайна? Неужели это ты?', 16666,0,0,1, '67234'), +(-1594441, 'Careful, girl. I\'ve heard talk of that cursed blade saving us before. Look around you and see what has been born of Frostmourne.', 'Осторожней девочка! Однажды мне уже говорили, что этот проклятый меч может нас спасти. Посмотри вокруг, и ты увидишь, что из этого вышло.', 16659,0,0,1, '67234'), +(-1594442, 'Uther! Dear Uther! I... I\'m so sorry.', 'Утер? Милый Утер! Мне... Мне так жаль.', 16635,0,0,1, '67234'), +(-1594443, 'Uther...Uther the Lightbringer. How...', 'Утер? Утер Светоносный? Как...', 17052,0,0,1, '67234'), +(-1594444, 'Jaina, you haven\'t much time. The Lich King sees what the sword sees. He will be here shortly.', 'Джайна, у вас мало времени. Король - Лич видит все что видит Ледяная Скорбь. Вскоре он будет здесь.', 16667,0,0,1, '67234'), +(-1594445, 'You haven\'t much time. The Lich King sees what the sword sees. He will be here shortly.', 'У вас мало времени. Король - Лич видит все что видит Ледяная Скорбь. Вскоре он будет здесь.', 16660,0,0,1, '67234'), +(-1594446, 'Arthas is here? Maybe I...', 'Артас здесь? Может я...', 16636,0,0,1, '67234'), +(-1594447, 'The Lich King is here? Then my destiny shall be fulfilled today!', 'Король - Лич здесь? Значит моя судьба решится сегодня!', 17053,1,0,1, '67234'), +(-1594448, 'No, girl. Arthas is not here. Arthas is merely a presence within the Lich King\'s mind. A dwindling presence...', 'Нет девочка. Артаса здесь нет. Артас лишь тень, мелькающая в сознании Короля - Лича. Смутная тень.', 16668,0,0,1, '67234'), +(-1594449, 'You cannot defeat the Lich King. Not here. You would be a fool to try. He will kill those who follow you and raise them as powerful servants of the Scourge. But for you, Sylvanas, his reward for you would be worse than the last.', 'Вам не победить Короля - Лича. Покрайней мере не здесь. Глупо и пытаться. Он убьет твоих соратников и воскресит их как воинов плети. Но что до тебя Сильвана, он готовит тебе участь еще страшнее, чем в прошлый раз.', 16661,0,0,1, '67234'), +(-1594450, 'But Uther, if there\'s any hope of reaching Arthas. I... I must try.', 'Но если есть малейшая надежда вернуть Артаса... Я должна попытаться!', 16637,0,0,1, '67234'), +(-1594451, 'There must be a way...', 'Должен быть способ!', 17054,0,0,1, '67234'), +(-1594452, 'Jaina, listen to me. You must destroy the Lich King. You cannot reason with him. He will kill you and your allies and raise you all as powerful soldiers of the Scourge.', 'Джайна послушай меня. Вам нужно уничтожить Короля - Лича. С ним нельзя договориться. Он убьет вас всех и превратит в могущественных воинов Плети.', 16669,0,0,1, '67234'), +(-1594453, 'Perhaps, but know this: there must always be a Lich King. Even if you were to strike down Arthas, another would have to take his place, for without the control of the Lich King, the Scourge would wash over this world like locusts, destroying all that they touched.', 'Возможно... Но знай! Король - Лич должен быть всегда. Даже если вы убьете Артаса кто то обязан будет занять его место. Лишившись правителя Плеть налетит на мир как стая саранчи и уничтожит все на своем пути.', 16662,0,0,1, '67234'), +(-1594454, 'Tell me how, Uther? How do I destroy my prince? My...', 'Но как Утер? Как мне убить моего принца, моего...', 16638,0,0,1, '67234'), +(-1594455, 'Who could bear such a burden?', 'Кому по силам такое бремя?', 17055,0,0,1, '67234'), +(-1594456, 'Snap out of it, girl. You must destroy the Lich King at the place where he merged with Ner\'zhul - atop the spire, at the Frozen Throne. It is the only way.', 'Забудь об этом девочка. Короля - Лича нужно уничтожить на том месте, где он слился с Нерзулом. На самой вершине, у Ледяного Трона!', 16670,0,0,1, '67234'), +(-1594457, 'I do not know, Banshee Queen. I suspect that the piece of Arthas that might be left inside the Lich King is all that holds the Scourge from annihilating Azeroth.', 'Не знаю, Королева Баньши... Если бы не Артас, который все еще является частью Короля - Лича, Плеть давно бы уже уничтожила Азерот.', 16663,0,0,1, '67234'), +(-1594458, 'You\'re right, Uther. Forgive me. I... I don\'t know what got a hold of me. We will deliver this information to the King and the knights that battle the Scourge within Icecrown Citadel.', 'Ты прав Утер, прости меня... Я не знаю что на меня нашло. Мы передадим твои слова Королю и рыцарям, которые сражаются с Плетью в Цитадели Ледяной Короны.', 16639,0,0,1, '67234'), +(-1594459, 'There is... something else that you should know about the Lich King. Control over the Scourge must never be lost. Even if you were to strike down the Lich King, another would have to take his place. For without the control of its master, the Scourge would run rampant across the world - destroying all living things.', 'Тебе нужно знать еще кое что о Короле - Личе. Плеть не должна выйти из под контроля. Даже если вы убьете Короля - Лича, кто-то должен будет занять его место. Без Короля Плеть налетит на мир как стая саранчи и уничтожит все живое.', 16671,0,0,1, '67234'), +(-1594460, 'Alas, the only way to defeat the Lich King is to destroy him at the place he was created.', 'Увы единственый способ одолеть Короля - Лича - это убить его там где он был порожден.', 16664,0,0,1, '67234'), +(-1594461, 'Who could bear such a burden?', 'Кому по силам такое бремя?', 16640,0,0,1, '67234'), +(-1594462, 'The Frozen Throne...', 'Ледяной Трон!', 17056,0,0,1, '67234'), +(-1594463, 'A grand sacrifice by a noble soul...', 'Великая жертва, благородной души.', 16672,0,0,1, '67234'), +(-1594464, 'I do not know, Jaina. I suspect that the piece of Arthas that might be left inside the Lich King is all that holds the Scourge from annihilating Azeroth.', 'Не знаю Джайна... мне кажется если бы не Артас, который все еще является частью Короля - Лича, Плеть давно бы уже уничтожила Азерот.', 16673,0,0,1, '67234'), +(-1594465, 'Then maybe there is still hope...', 'Но может еще есть надежда?', 16641,0,0,1, '67234'), +(-1594466, 'No, Jaina! ARRRRRRGHHHH... He... He is coming. You... You must...', 'Нет Джайна... Эээээ... Он... Он приближается... Вы... Вы должны...', 16674,1,0,1, '67234'), +(-1594467, 'Aye. ARRRRRRGHHHH... He... He is coming. You... You must...', 'Да... Эээээ... Он... Он приближается... Вы... Вы должны...', 16665,1,0,1, '67234'), +(-1594468, 'SILENCE, PALADIN!', 'Замолчи, паладин.', 17225,1,0,0, '67234'), +(-1594469, 'So you wish to commune with the dead? You shall have your wish.', 'Так ты хочешь поговорить с мертвыми? Нет ничего проще!', 17226,1,0,0, '67234'), +(-1594470, 'Falric. Marwyn. Bring their corpses to my chamber when you are through.', 'Фалрик, Марвин, когда закончите, принесите их тела в мои покои.', 17227,0,0,0, '67234'), +(-1594471, 'You won\'t deny me this, Arthas! I must know... I must find out...', 'Ты от меня не отмахнешься Артас. Я должна понять, я должна знать.', 16642,1,0,1, '67234'), +(-1594472, 'You will not escape me that easily, Arthas! I will have my vengeance!', 'Ты так просто от меня не уйдешь Артас. Я отомщу тебе!', 17057,1,0,1, '67234'), (-1594473, '', 'Глупая девчонка! Тот кого ты ищещь давно убит! Теперь он лишь призрак, слабый отзвук в моем сознании!', 17229,1,0,0, '67234'), (-1594474, '', 'Я не повторю прежней ошибки, Сильвана. На этот раз тебе не спастись. Ты не оправдала моего доверия и теперь тебя ждет только забвение!', 17228,1,0,0, '67234'), -(-1594475, '', 'Как пожелаете, мой господин!', 16717,1,0,0, '67234'), -(-1594476, '', 'Как пожелаете, мой господин!', 16741,1,0,0, '67234'), +(-1594475, 'As you wish, my lord.', 'Как пожелаете, мой господин!', 16717,1,0,0, '67234'), +(-1594476, 'As you wish, my lord.', 'Как пожелаете, мой господин!', 16741,1,0,0, '67234'), # SCENE - Hall Of Reflection (Extro) - PreEscape -(-1594477, '', 'Твои союзники прибыли, Джайна! Как ты и обещала... Ха-ха-ха-ха... Все вы станете могучими солдатами Плети...', 17212,1,0,0, '67234'), -(-1594478, '', 'Я не повторю прежней ошибки, Сильвана! На этот раз тебе не спастись. Вы все будите служить мне после смерти...', 17213,1,0,0, '67234'), -(-1594479, '', 'Он слишком силен. Мы должны выбраться от сюда как можно скорее. Моя магия задержит его ненадолго, быстрее герои...', 16644,0,0,1, '67234'), -(-1594480, '', 'Он слишком силен. Герои скорее, за мной. Мы должны выбраться отсюда немедленно. Я постараюсь его задержать, пока мы будем убегать.', 17058,0,0,1, '67234'), +(-1594477, 'Your allies have arrived, Jaina, just as you promised. You will all become powerful agents of the Scourge.', 'Твои союзники прибыли, Джайна! Как ты и обещала... Ха-ха-ха-ха... Все вы станете могучими солдатами Плети...', 17212,1,0,0, '67234'), +(-1594478, 'I will not make the same mistake again, Sylvanas. This time there will be no escape. You will all serve me in death!', 'Я не повторю прежней ошибки, Сильвана! На этот раз тебе не спастись. Вы все будите служить мне после смерти...', 17213,1,0,0, '67234'), +(-1594479, 'He is too powerful, we must leave this place at once! My magic will hold him in place for only a short time! Come quickly, heroes!', 'Он слишком силен. Мы должны выбраться от сюда как можно скорее. Моя магия задержит его ненадолго, быстрее герои...', 16644,0,0,1, '67234'), +(-1594480, 'He\'s too powerful! Heroes, quickly, come to me! We must leave this place immediately! I will do what I can do hold him in place while we flee.', 'Он слишком силен. Герои скорее, за мной. Мы должны выбраться отсюда немедленно. Я постараюсь его задержать, пока мы будем убегать.', 17058,0,0,1, '67234'), # SCENE - Hall Of Reflection (Extro) - Escape -(-1594481, '', 'Смерть распростерла ледяные обьятия!', 17221,1,0,0, '67234'), -(-1594482, '', 'Восстаньте прислужники, не дайте им сбежать!', 17216,1,0,0, '67234'), -(-1594483, '', 'Схватите их! Принесите мне их тела!', 17222,1,0,0, '67234'), -(-1594484, '', 'Надежды нет!', 17214,1,0,0, '67234'), -(-1594485, '', 'Смирись с судьбой.', 17215,1,0,0, '67234'), -(-1594486, '', 'Бежать некуда!', 17217,1,0,0, '67234'), -(-1594487, '', 'Я разрушу эту преграду, а вы удерживайте нежить на расстоянии!', 16607,1,0,0, '67234'), -(-1594488, '', 'Никакие стены не удержат Королеву Баньши. Держите нежить на расстоянии, я сокрушу эту преграду.', 17029,1,0,0, '67234'), -(-1594489, '', 'Опять ледяная стена... Я разобью ее, только не дайте нежити прервать мои заклинания...', 16608,1,0,0, '67234'), -(-1594490, '', 'Еще одна преграда. Держитесь герои! Я разрушу эту стену!', 17030,1,0,0, '67234'), -(-1594491, '', 'Покоритесь Леденящей смерти!', 17218,1,0,0, '67234'), -(-1594492, '', 'Вы в ловушке!', 17219,1,0,0, '67234'), -(-1594493, '', 'Как долго вы сможете сопротивляться?', 17220,1,0,0, '67234'), +(-1594481, 'Death\'s cold embrace awaits.', 'Смерть распростерла ледяные обьятия!', 17221,1,0,0, '67234'), +(-1594482, 'Rise minions, do not left them us!', 'Восстаньте прислужники, не дайте им сбежать!', 17216,1,0,0, '67234'), +(-1594483, 'Minions sees them. Bring their corpses back to me!', 'Схватите их! Принесите мне их тела!', 17222,1,0,0, '67234'), +(-1594484, 'No...', 'Надежды нет!', 17214,1,0,0, '67234'), +(-1594485, 'All is lost!', 'Смирись с судьбой.', 17215,1,0,0, '67234'), +(-1594486, 'There is no escape!', 'Бежать некуда!', 17217,1,0,0, '67234'), +(-1594487, 'I will destroy this barrier. You must hold the undead back!', 'Я разрушу эту преграду, а вы удерживайте нежить на расстоянии!', 16607,1,0,0, '67234'), +(-1594488, 'No wall can hold the Banshee Queen! Keep the undead at bay, heroes! I will tear this barrier down!', 'Никакие стены не удержат Королеву Баньши. Держите нежить на расстоянии, я сокрушу эту преграду.', 17029,1,0,0, '67234'), +(-1594489, 'Another ice wall! Keep the undead from interrupting my incantation so that I may bring this wall down!', 'Опять ледяная стена... Я разобью ее, только не дайте нежити прервать мои заклинания...', 16608,1,0,0, '67234'), +(-1594490, 'Another barrier? Stand strong, champions! I will bring the wall down!', 'Еще одна преграда. Держитесь герои! Я разрушу эту стену!', 17030,1,0,0, '67234'), +(-1594491, 'Succumb to the chill of the grave.', 'Покоритесь Леденящей смерти!', 17218,1,0,0, '67234'), +(-1594492, 'Another dead end.', 'Вы в ловушке!', 17219,1,0,0, '67234'), +(-1594493, 'How long can you fight it?', 'Как долго вы сможете сопротивляться?', 17220,1,0,0, '67234'), (-1594494, '', 'Он с нами играет. Я покажу ему что бывает когда лед встречается со огнем!', 16609,0,0,0, '67234'), -(-1594495, '', 'Твои преграды больше не задержат нас, чудовище. Я смету их с пути!', 16610,1,0,0, '67234'), -(-1594496, '', 'Я устала от этих игр Артас. Твои стены не остановят меня!', 17031,1,0,0, '67234'), -(-1594497, '', 'Ты не помешаешь нам уйти, монстр. Сдерживайте нежить, а я уничтожу эту преграду.', 17032,1,0,0, '67234'), -(-1594498, '', 'Я вижу выход, скорее!', 16645,1,0,0, '67234'), -(-1594499, '', 'Мы почти выбрались, не сдавайтесь!', 16646,1,0,0, '67234'), -(-1594500, '', 'Я вижу выход, скорее!', 17059,1,0,0, '67234'), -(-1594501, '', 'Мы почти выбрались, не сдавайтесь!', 17060,1,0,0, '67234'), -(-1594502, '', 'Больше некуда бежать. Теперь нам придется сражаться. Это наша последняя битва!', 16647,1,0,0, '67234'), -(-1594503, '', 'Проклятый тупик, значит все закончится здесь. Готовьтесь герои, это наша последняя битва.', 17061,1,0,0, '67234'), -(-1594504, '', 'Ха-ха-ха... Бежать некуда. Теперь вы мои!', 17223,1,0,0, '67234'), -(-1594505, '', 'Солдаты Лордерона, восстаньте по зову Господина!', 16714,1,0,0, '67234'), -(-1594506, '', 'Господин осмотрел свое королевство и признал его негодным! Его суд был быстрым и суровым - предать всех смерти!', 16738,1,0,0, '67234'), +(-1594495, 'Your barriers can\'t hold us back much longer, monster. I will shatter them all!', 'Твои преграды больше не задержат нас, чудовище. Я смету их с пути!', 16610,1,0,0, '67234'), +(-1594496, 'I grow tired of these games, Arthas! Your walls can\'t stop me!', 'Я устала от этих игр Артас. Твои стены не остановят меня!', 17031,1,0,0, '67234'), +(-1594497, 'You won\'t impede our escape, fiend. Keep the undead off me while I bring this barrier down!', 'Ты не помешаешь нам уйти, монстр. Сдерживайте нежить, а я уничтожу эту преграду.', 17032,1,0,0, '67234'), +(-1594498, 'There\'s an opening up ahead. GO NOW!', 'Я вижу выход, скорее!', 16645,1,0,0, '67234'), +(-1594499, 'We\'re almost there... Don\'t give up!', 'Мы почти выбрались, не сдавайтесь!', 16646,1,0,0, '67234'), +(-1594500, 'There\'s an opening up ahead. GO NOW!', 'Я вижу выход, скорее!', 17059,1,0,0, '67234'), +(-1594501, 'We\'re almost there! Don\'t give up!', 'Мы почти выбрались, не сдавайтесь!', 17060,1,0,0, '67234'), +(-1594502, 'It... It\'s a dead end. We have no choice but to fight. Steel yourself heroes, for this is our last stand!', 'Больше некуда бежать. Теперь нам придется сражаться. Это наша последняя битва!', 16647,1,0,0, '67234'), +(-1594503, 'BLASTED DEAD END! So this is how it ends. Prepare yourselves, heroes, for today we make our final stand!', 'Проклятый тупик, значит все закончится здесь. Готовьтесь герои, это наша последняя битва.', 17061,1,0,0, '67234'), +(-1594504, 'Nowhere to run! You\'re mine now...', 'Ха-ха-ха... Бежать некуда. Теперь вы мои!', 17223,1,0,0, '67234'), +(-1594505, 'Soldiers of Lordaeron, rise to meet your master\'s call!', 'Солдаты Лордерона, восстаньте по зову Господина!', 16714,1,0,0, '67234'), +(-1594506, 'The master surveyed his kingdom and found it... lacking. His judgement was swift and without mercy. Death to all!', 'Господин осмотрел свое королевство и признал его негодным! Его суд был быстрым и суровым - предать всех смерти!', 16738,1,0,0, '67234'), #Falric -(-1594507, '', 'Мужчины, Женщины и дети... Никто не избежал гнева господина. Вы разделите их участь!', 16710,1,0,0, '67234'), -(-1594508, '', 'Марвин... Добей их...', 16713,1,0,0, '67234'), -(-1594509, '', 'Сопливый червяк!', 16711,1,0,0, '67234'), -(-1594510, '', 'Стратхольмские детишки - и те сражались отчаяннее!', 16712,1,0,0, '67234'), -(-1594511, '', 'Как сладостно отчаянье!', 16715,1,0,0, '67234'), -(-1594512, '', 'Как приятен страх!', 16716,1,0,0, '67234'), +(-1594507, 'Men, women and children... None were spared the master\'s wrath. Your death will be no different.', 'Мужчины, Женщины и дети... Никто не избежал гнева господина. Вы разделите их участь!', 16710,1,0,0, '67234'), +(-1594508, 'Marwyn, finish them...', 'Марвин... Добей их...', 16713,1,0,0, '67234'), +(-1594509, 'Sniveling maggot!', 'Сопливый червяк!', 16711,1,0,0, '67234'), +(-1594510, 'The children of Stratholme fought with more ferocity!', 'Стратхольмские детишки - и те сражались отчаяннее!', 16712,1,0,0, '67234'), +(-1594511, 'Despair... so delicious...', 'Как сладостно отчаянье!', 16715,1,0,0, '67234'), +(-1594512, 'Fear... so exhilarating...', 'Как приятен страх!', 16716,1,0,0, '67234'), #Marwyn -(-1594513, '', 'Вы найдете здесь лишь смерть!', 16734,1,0,0, '67234'), -(-1594514, '', 'Эээээ... Да... Бегите навстречу судьбе. Ее жестокие и холодные обьятия ждут вас...', 16737,1,0,0, '67234'), -(-1594515, '', 'У Теренаса был такой же взгляд в миг смерти, он никак не мог поверить... Ха-ха-ха-ха-ха...', 16735,1,0,0, '67234'), -(-1594516, '', 'Захлебнись страданием!', 16736,1,0,0, '67234'), -(-1594517, '', 'Вы увидите как разлагается ваша плоть!', 16739,1,0,0, '67234'), -(-1594518, '', 'Сгиньте без следа!', 16740,1,0,0, '67234'), +(-1594513, 'Death is all that you will find here!', 'Вы найдете здесь лишь смерть!', 16734,1,0,0, '67234'), +(-1594514, 'Yes... Run... Run to meet your destiny... Its bitter, cold embrace, awaits you.', 'Эээээ... Да... Бегите навстречу судьбе. Ее жестокие и холодные обьятия ждут вас...', 16737,1,0,0, '67234'), +(-1594515, 'I saw the same look in his eyes when he died. Terenas could hardly believe it. Hahahaha!', 'У Теренаса был такой же взгляд в миг смерти, он никак не мог поверить... Ха-ха-ха-ха-ха...', 16735,1,0,0, '67234'), +(-1594516, 'Choke on your suffering!', 'Захлебнись страданием!', 16736,1,0,0, '67234'), +(-1594517, 'Your flesh shall decay before your very eyes!', 'Вы увидите как разлагается ваша плоть!', 16739,1,0,0, '67234'), +(-1594518, 'Waste away into nothingness!', 'Сгиньте без следа!', 16740,1,0,0, '67234'), #FrostWorn General -(-1594519, '', 'Вы недостойны предстать перед Королем - Личом!', 16921,1,0,0, '67234'), -(-1594520, '', 'Господин... Я подвел вас...', 16922,1,0,0, '67234'), +(-1594519, 'You are not worthy to face the Lich King!', 'Вы недостойны предстать перед Королем - Личом!', 16921,1,0,0, '67234'), +(-1594520, 'Master, I have failed...', 'Господин... Я подвел вас...', 16922,1,0,0, '67234'), #add (-1594531, '', 'Ну теперь-то точно пора сваливать.', 0,0,0,0, '67234'), From 58184acc1dbc73500ee3d7e998e8747e1d120152 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sat, 26 Jun 2010 20:05:36 +0400 Subject: [PATCH 383/405] Changes for varyous bosses and chests. Thenks to Salja for Devourer correct. --- .../forge_of_souls/boss_devourer_of_souls.cpp | 17 +++++++++++++---- .../halls_of_reflection/halls_of_reflection.cpp | 3 +++ scripts/northrend/naxxramas/boss_maexxna.cpp | 4 ++-- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp index f7189cb7e..c53d7ef29 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp @@ -33,6 +33,8 @@ enum SAY_DEVOURER_DEATH_MALE_01 = -1632018, SAY_DEVOURER_SUMMON_MALE_01 = -1632023, SAY_DEVOURER_DARK_MALE_01 = -1632027, + SAY_DEVOURER_MIRRORED_SOUL = -1632021, + SAY_DEVOURER_UNLEASHED_SOULS = -1632022, SAY_JAINA_FS09_EXTRO = -1632029, SAY_SYLVANA_FS07_EXTRO = -1632030, @@ -166,7 +168,7 @@ struct MANGOS_DLL_DECL boss_devourer_of_soulsAI : public ScriptedAI for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) if (i->getSource()->isAlive() && i->getSource()->HasAura(SPELL_MIRRORED_SOUL)) - m_creature->DealDamage(i->getSource(), uiDamage*45,NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + m_creature->DealDamage(i->getSource(), uiDamage/2,NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); } void SpawnOutro(uint32 guid) @@ -219,7 +221,7 @@ struct MANGOS_DLL_DECL boss_devourer_of_soulsAI : public ScriptedAI void KilledUnit(Unit* victim) { - switch (rand()%2) + switch (urand(0,1)) { case 0: DoScriptText(SAY_DEVOURER_SLAY_01_MALE_01, m_creature); break; case 1: DoScriptText(SAY_DEVOURER_SLAY_02_MALE_01, m_creature); break; @@ -254,7 +256,11 @@ struct MANGOS_DLL_DECL boss_devourer_of_soulsAI : public ScriptedAI if (SummonTimer < diff) { m_creature->InterruptNonMeleeSpells(false); - DoScriptText(SAY_DEVOURER_SUMMON_MALE_01, m_creature); + switch (urand(0,1)) + { + case 0: DoScriptText(SAY_DEVOURER_SUMMON_MALE_01, m_creature); break; + case 1: DoScriptText(SAY_DEVOURER_UNLEASHED_SOULS, m_creature); break; + } DoCast(m_creature, SPELL_UNLEASHED_SOULS); SummonTimer = 50000; Summon = true; @@ -265,8 +271,11 @@ struct MANGOS_DLL_DECL boss_devourer_of_soulsAI : public ScriptedAI if (MirroredTimer < diff) { if (Unit* Target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { DoCast(Target, SPELL_MIRRORED_SOUL); - MirroredTimer = 25000; + DoScriptText(SAY_DEVOURER_MIRRORED_SOUL, m_creature); + MirroredTimer = 25000; + } } else MirroredTimer -= diff; diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.cpp index e7b8d3270..670f8d83f 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.cpp @@ -1024,7 +1024,10 @@ struct MANGOS_DLL_DECL npc_jaina_and_sylvana_HRextroAI : public npc_escortAI else m_chestID = GO_CAPTAIN_CHEST_3; }; if(GameObject* pChest = m_creature->SummonGameobject(m_chestID, 5241.047f, 1663.4364f, 784.295166f, 0.54f, 0)) + { pChest->SetGoState(GO_STATE_READY); + pChest->SetRespawnTime(7*DAY); + } m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); DoScriptText(SAY_ESCAPE_02, m_creature); JumpNextStep(10000); diff --git a/scripts/northrend/naxxramas/boss_maexxna.cpp b/scripts/northrend/naxxramas/boss_maexxna.cpp index de8d72917..f1d46aaf4 100644 --- a/scripts/northrend/naxxramas/boss_maexxna.cpp +++ b/scripts/northrend/naxxramas/boss_maexxna.cpp @@ -162,7 +162,7 @@ struct MANGOS_DLL_DECL boss_maexxnaAI : public ScriptedAI break; } - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,1)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,1)) { if (pWrapped) if (pTarget == pWrapped) @@ -181,7 +181,7 @@ struct MANGOS_DLL_DECL boss_maexxnaAI : public ScriptedAI float x,y,z; for(uint8 i = 0; number >= i; i++) { - if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) { m_creature->GetRandomPoint(m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ(),7.0f,x,y,z); if(Creature* spiderling = m_creature->SummonCreature(NPC_SPIDERLING, x, y, z,0, TEMPSUMMON_DEAD_DESPAWN, 0)) From 160a337d935cba62317ab30d3befb57d611be33f Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sun, 27 Jun 2010 10:23:42 +0400 Subject: [PATCH 384/405] Additional correct for Deathwhisper mobs --- .../icecrown_citadel/boss_lady_deathwhisper.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp index 37488d312..b109d35c3 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp @@ -414,6 +414,7 @@ struct MANGOS_DLL_DECL mob_cult_adherentAI : public ScriptedAI void Reset() { bsw->resetTimers(); + m_creature->SetRespawnDelay(DAY); bsw->doCast(SPELL_SUMMON_VISUAL); bone = false; } @@ -467,6 +468,7 @@ struct MANGOS_DLL_DECL mob_cult_fanaticAI : public ScriptedAI void Reset() { bsw->resetTimers(); + m_creature->SetRespawnDelay(DAY); bone = false; } From 6229f86498de45c12264fe79001f12bf09b863be Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sun, 27 Jun 2010 10:54:27 +0400 Subject: [PATCH 385/405] Fix possible crushes on unload instance --- .../icecrown_citadel/icecrown_citadel/boss_festergut.cpp | 2 ++ .../icecrown_citadel/icecrown_citadel/boss_rotface.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp index 76c153192..b1ddb2b75 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp @@ -162,6 +162,8 @@ struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI void UpdateAI(const uint32 diff) { + if(!pInstance) return; + if (!pet) { if (Creature* pGuard = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_STINKY))) if (!pGuard->isAlive()) { diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp index 971f18ca1..41d88387c 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp @@ -131,6 +131,8 @@ struct MANGOS_DLL_DECL boss_rotfaceAI : public ScriptedAI void UpdateAI(const uint32 diff) { + if(!pInstance) return; + if (!pet) { if (Creature* pGuard = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_PRECIOUS))) if (!pGuard->isAlive()) { From 5f70b0a17c6fd1a25ba11c38a6563f04d8bba404 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sun, 27 Jun 2010 12:52:51 +0400 Subject: [PATCH 386/405] Additional isInCombat check for icecrown_teleport --- .../icecrown_citadel/icecrown_teleport.cpp | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp index 8543216e3..cf021fc89 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp @@ -51,31 +51,33 @@ static t_Locations PortalLoc[]= }; -bool GOGossipSelect_go_icecrown_teleporter(Player *player, GameObject* pGo, uint32 sender, uint32 action) +bool GOGossipSelect_go_icecrown_teleporter(Player *pPlayer, GameObject* pGo, uint32 sender, uint32 action) { int32 damage = 0; - if(sender != GOSSIP_SENDER_MAIN) return true; + if(sender != GOSSIP_SENDER_MAIN) return false; - if(!player->getAttackers().empty()) return true; + if(!pPlayer->getAttackers().empty()) return false; if(action >= 0 && action <= PORTALS_COUNT) - player->TeleportTo(MAP_NUM, PortalLoc[action].x, PortalLoc[action].y, PortalLoc[action].z, 0); + pPlayer->TeleportTo(MAP_NUM, PortalLoc[action].x, PortalLoc[action].y, PortalLoc[action].z, 0); if (PortalLoc[action].spellID !=0 ) if (SpellEntry const* spell = (SpellEntry *)GetSpellStore()->LookupEntry(PortalLoc[action].spellID)) - player->AddAura(new BossAura(spell, EFFECT_INDEX_2, &damage,(Unit*)player, (Unit*)player)); + pPlayer->AddAura(new BossAura(spell, EFFECT_INDEX_2, &damage,(Unit*)pPlayer, (Unit*)pPlayer)); - player->CLOSE_GOSSIP_MENU(); + pPlayer->CLOSE_GOSSIP_MENU(); return true; } -bool GOGossipHello_go_icecrown_teleporter(Player *player, GameObject* pGo) +bool GOGossipHello_go_icecrown_teleporter(Player *pPlayer, GameObject* pGo) { ScriptedInstance *pInstance = (ScriptedInstance *) pGo->GetInstanceData(); - if(!pInstance) return true; + + if (!pInstance || !pPlayer) return false; + if (pPlayer->isInCombat()) return true; uint8 _locale; - switch (LocaleConstant currentlocale = player->GetSession()->GetSessionDbcLocale()) + switch (LocaleConstant currentlocale = pPlayer->GetSession()->GetSessionDbcLocale()) { case LOCALE_enUS: case LOCALE_koKR: @@ -96,10 +98,10 @@ bool GOGossipHello_go_icecrown_teleporter(Player *player, GameObject* pGo) }; for(uint8 i = 0; i < PORTALS_COUNT; i++) { - if (PortalLoc[i].active == true && (PortalLoc[i].state == true || pInstance->GetData(TYPE_TELEPORT) >= PortalLoc[i].encounter) || player->isGameMaster()) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, PortalLoc[i].name[_locale], GOSSIP_SENDER_MAIN, i); + if (PortalLoc[i].active == true && (PortalLoc[i].state == true || pInstance->GetData(TYPE_TELEPORT) >= PortalLoc[i].encounter) || pPlayer->isGameMaster()) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, PortalLoc[i].name[_locale], GOSSIP_SENDER_MAIN, i); }; - player->SEND_GOSSIP_MENU(TELEPORT_GOSSIP_MESSAGE, pGo->GetGUID()); + pPlayer->SEND_GOSSIP_MENU(TELEPORT_GOSSIP_MESSAGE, pGo->GetGUID()); return true; } From be424396b9dce66c970a54f2350159d37a1449b1 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sun, 27 Jun 2010 12:57:35 +0400 Subject: [PATCH 387/405] One Devourer say/spell correct. Thanks to Salja --- .../frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp index c53d7ef29..94b87a491 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp @@ -35,6 +35,7 @@ enum SAY_DEVOURER_DARK_MALE_01 = -1632027, SAY_DEVOURER_MIRRORED_SOUL = -1632021, SAY_DEVOURER_UNLEASHED_SOULS = -1632022, + SAY_DEVOURER_WELL_OF_SOULS = -1632026, SAY_JAINA_FS09_EXTRO = -1632029, SAY_SYLVANA_FS07_EXTRO = -1632030, @@ -121,7 +122,7 @@ struct MANGOS_DLL_DECL boss_devourer_of_soulsAI : public ScriptedAI Step = 0; StepTimer = 100; PhantomBlastTimer = 5000; - WellOfSoulTimer = 10000; + WellOfSoulTimer = 12000; SummonTimer = 20000; MirroredTimer = 28000; SoulBeamTimer = 33000; @@ -248,7 +249,8 @@ struct MANGOS_DLL_DECL boss_devourer_of_soulsAI : public ScriptedAI { if (Unit* Target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) DoCast(Target, SPELL_WELL_OF_SOULS); - WellOfSoulTimer = 12000; + DoScriptText(SAY_DEVOURER_WELL_OF_SOULS, m_creature); + WellOfSoulTimer = urand(12000,24000); } else WellOfSoulTimer -= diff; From 92766e4ef31961af098e8e5e4ab840e7c5365629 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sun, 27 Jun 2010 14:51:12 +0400 Subject: [PATCH 388/405] Make isEncounterInProgress work on LK --- .../icecrown_citadel/instance_icecrown_spire.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp index 43fee66f4..fd82fbbd0 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp @@ -207,7 +207,7 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance bool IsEncounterInProgress() const { - for(uint8 i = 1; i < MAX_ENCOUNTERS-3 ; ++i) + for(uint8 i = 1; i < MAX_ENCOUNTERS-2 ; ++i) if (m_auiEncounter[i] == IN_PROGRESS) return true; return false; From 7545f305f651ac9224a57a396e76397ef3dd6432 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Mon, 28 Jun 2010 00:43:23 +0400 Subject: [PATCH 389/405] Changes after 10112 --- .../eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp | 2 +- scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp | 2 +- scripts/outland/shadowmoon_valley.cpp | 2 +- scripts/world/go_scripts.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp index 30c903412..1429c5f08 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp @@ -158,7 +158,7 @@ struct MANGOS_DLL_DECL boss_selin_fireheartAI : public ScriptedAI CrystalChosen->CastSpell(CrystalChosen, SPELL_FEL_CRYSTAL_COSMETIC, true); float x, y, z; // coords that we move to, close to the crystal. - CrystalChosen->GetClosePoint(x, y, z, m_creature->GetObjectSize(), CONTACT_DISTANCE); + CrystalChosen->GetClosePoint(x, y, z, m_creature->GetObjectBoundingRadius(), CONTACT_DISTANCE); m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); m_creature->GetMotionMaster()->MovePoint(1, x, y, z); diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp index 0e5a0a59a..e7af0562d 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp @@ -114,7 +114,7 @@ struct MANGOS_DLL_DECL boss_svalaAI : public ScriptedAI m_pInstance->SetData(TYPE_SVALA, SPECIAL); float fX, fY, fZ; - m_creature->GetClosePoint(fX, fY, fZ, m_creature->GetObjectSize(), 16.0f, 0.0f); + m_creature->GetClosePoint(fX, fY, fZ, m_creature->GetObjectBoundingRadius(), 16.0f, 0.0f); // we assume m_creature is spawned in proper location m_creature->SummonCreature(NPC_ARTHAS_IMAGE, fX, fY, fZ, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 60000); diff --git a/scripts/outland/shadowmoon_valley.cpp b/scripts/outland/shadowmoon_valley.cpp index eccad718f..51b0aac49 100644 --- a/scripts/outland/shadowmoon_valley.cpp +++ b/scripts/outland/shadowmoon_valley.cpp @@ -312,7 +312,7 @@ struct MANGOS_DLL_DECL mob_dragonmaw_peonAI : public ScriptedAI m_bIsTapped = true; float fX, fY, fZ; - pCaster->GetClosePoint(fX, fY, fZ, m_creature->GetObjectSize()); + pCaster->GetClosePoint(fX, fY, fZ, m_creature->GetObjectBoundingRadius()); m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); m_creature->GetMotionMaster()->MovePoint(POINT_DEST, fX, fY, fZ); diff --git a/scripts/world/go_scripts.cpp b/scripts/world/go_scripts.cpp index f96774540..d48ebc11d 100644 --- a/scripts/world/go_scripts.cpp +++ b/scripts/world/go_scripts.cpp @@ -307,7 +307,7 @@ bool GOHello_go_shrine_of_the_birds(Player* pPlayer, GameObject* pGo) uint32 uiBirdEntry = 0; float fX,fY,fZ; - pGo->GetClosePoint(fX,fY,fZ,pGo->GetObjectSize(),INTERACTION_DISTANCE); + pGo->GetClosePoint(fX,fY,fZ,pGo->GetObjectBoundingRadius(),INTERACTION_DISTANCE); switch(pGo->GetEntry()) { From fa6036b73a135b37ccbfabe17c087ce2471e49ad Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Mon, 28 Jun 2010 18:24:31 +0400 Subject: [PATCH 390/405] Correct one SD2 core error && restore learning DualSpec on Alliance rogue trainer --- ScriptMgr.cpp | 4 ++- scripts/world/npcs_special.cpp | 45 ++++++++++++---------------------- 2 files changed, 18 insertions(+), 31 deletions(-) diff --git a/ScriptMgr.cpp b/ScriptMgr.cpp index de4e7cf16..d3903a6bc 100644 --- a/ScriptMgr.cpp +++ b/ScriptMgr.cpp @@ -274,7 +274,9 @@ bool GossipSelect(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 if (!tmpscript || !tmpscript->pGossipSelect) return false; - pPlayer->PlayerTalkClass->ClearMenus(); +// pPlayer->PlayerTalkClass->ClearMenus(); +// this expression is wrong, where 'return false' from script's GossipSelect +// not return menu ID (cleared in this string) and not allow to work with database-based menus return tmpscript->pGossipSelect(pPlayer, pCreature, uiSender, uiAction); } diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index 4ad2f205b..5bf6817e8 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -1281,42 +1281,27 @@ bool GossipSelect_npc_mount_vendor(Player* pPlayer, Creature* pCreature, uint32 bool GossipHello_npc_rogue_trainer(Player* pPlayer, Creature* pCreature) { - if (pCreature->isQuestGiver()) - pPlayer->PrepareQuestMenu(pCreature->GetGUID()); - - if (pCreature->isTrainer()) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_TEXT_TRAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRAIN); - - if (pCreature->isCanTrainingAndResetTalentsOf(pPlayer)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, "I wish to unlearn my talents", GOSSIP_SENDER_MAIN, GOSSIP_OPTION_UNLEARNTALENTS); - - if (pPlayer->getClass() == CLASS_ROGUE && pPlayer->getLevel() >= 24 && !pPlayer->HasItemCount(17126,1) && !pPlayer->GetQuestRewardStatus(6681)) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(5996, pCreature->GetGUID()); - } else - pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); - - return true; + if (pPlayer->getClass() != CLASS_ROGUE) return false; + + if (pPlayer->getLevel() >= 24 && !pPlayer->HasItemCount(17126,1) && !pPlayer->GetQuestRewardStatus(6681)) + if (pCreature->isQuestGiver()) + { + pPlayer->PrepareGossipMenu(pCreature,50195); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); + pPlayer->SEND_GOSSIP_MENU(5996, pCreature->GetGUID()); + return true; + } + return false; } bool GossipSelect_npc_rogue_trainer(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - switch(uiAction) - { - case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->CLOSE_GOSSIP_MENU(); + if (uiAction == GOSSIP_ACTION_INFO_DEF) + { pPlayer->CastSpell(pPlayer,21100,false); - break; - case GOSSIP_ACTION_TRAIN: - pPlayer->SEND_TRAINERLIST(pCreature->GetGUID()); - break; - case GOSSIP_OPTION_UNLEARNTALENTS: pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->SendTalentWipeConfirm(pCreature->GetGUID()); - break; - } - return true; + return true; + } else return false; } /*###### From 3be4a89806f135048e46bd2ea5fb13d31c1e3f65 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Mon, 28 Jun 2010 18:25:49 +0400 Subject: [PATCH 391/405] New GetScriptText() function for allow multilanguage gossip's and other script actions (with core language support and database storing) --- ScriptMgr.cpp | 27 +++++++++++++++++++++++++++ ScriptMgr.h | 1 + 2 files changed, 28 insertions(+) diff --git a/ScriptMgr.cpp b/ScriptMgr.cpp index d3903a6bc..a1cf171e3 100644 --- a/ScriptMgr.cpp +++ b/ScriptMgr.cpp @@ -203,6 +203,33 @@ void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* pTarget) } } +char const* GetScriptText(int32 iTextEntry, Player* pPlayer) +{ + if (iTextEntry >= 0) + { + error_log("SD2: GetScriptText attempts to process text entry %i, but text entry must be negative.", iTextEntry); + return NULL; + } + + const StringTextData* pData = pSystemMgr.GetTextData(iTextEntry); + + if (!pData) + { + error_log("SD2: GetScriptText could not find text entry %i.", iTextEntry); + return NULL; + } + + debug_log("SD2: GetScriptText: text entry=%i, Sound=%u, Type=%u, Language=%u, Emote=%u", + iTextEntry, pData->uiSoundId, pData->uiType, pData->uiLanguage, pData->uiEmote); + + int currentLocaleIdx; + + if (pPlayer && pPlayer->IsInWorld()) currentLocaleIdx = pPlayer->GetSession()->GetSessionDbLocaleIndex(); + else currentLocaleIdx = LOCALE_enUS; + + return sObjectMgr.GetMangosString(iTextEntry,currentLocaleIdx); +} + //********************************* //*** Functions used internally *** diff --git a/ScriptMgr.h b/ScriptMgr.h index 9a51df1be..c305df5aa 100644 --- a/ScriptMgr.h +++ b/ScriptMgr.h @@ -73,6 +73,7 @@ struct Script //Generic scripting text function void DoScriptText(int32 textEntry, WorldObject* pSource, Unit* target = NULL); +char const* GetScriptText(int32 iTextEntry, Player* pPlayer = NULL); //DB query QueryResult* strSD2Pquery(char*); From 6ae7eb5453ef4e03a866c61c3c2d1fc4933010ac Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Mon, 28 Jun 2010 18:28:05 +0400 Subject: [PATCH 392/405] Ulduar teleporter rewrite --- addition/7_mangos_ulduar.sql | 21 +-- addition/7_mangos_ulduar_eventai.sql | 5 - addition/7_scriptdev2_ulduar.sql | 16 +- .../ulduar/ulduar/ulduar_teleport.cpp | 172 ++++++++---------- 4 files changed, 97 insertions(+), 117 deletions(-) delete mode 100644 addition/7_mangos_ulduar_eventai.sql diff --git a/addition/7_mangos_ulduar.sql b/addition/7_mangos_ulduar.sql index 7aa06ae63..6566c7b1e 100644 --- a/addition/7_mangos_ulduar.sql +++ b/addition/7_mangos_ulduar.sql @@ -18,19 +18,8 @@ UPDATE `creature_template` SET `ScriptName`='boss_yogg_saron' WHERE `entry`=3328 UPDATE `creature_template` SET `ScriptName`='boss_algalon' WHERE `entry`=32871; UPDATE `instance_template` SET `script`='instance_ulduar' WHERE `map`=603; -REPLACE INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) -VALUES (99005, 0, 0, 0, 0, 0, 22448, 0, 22448, 0, 'Ulduar teleporter', '', NULL, 0, 80, 80, 64200, 64200, 12300, 12300, 9730, 35, 35, 1, 0.5, 0, 294, 441, 0, 110, 1.4, 1400, 1400, 0, 0, 0, 0, 0, 0, 0, 0, 235, 353, 88, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 1, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 'ulduar_teleporter'); -REPLACE INTO `creature_template_addon` (`entry`, `mount`, `bytes1`, `bytes2`, `emote`, `moveflags`, `auras`) VALUES -(99005, 0, 0, 0, 0, 0, '48143 0'); -REPLACE INTO `locales_creature` values ('99005','Ulduar teleporter','','','','','','','Телепортер Ульдуара',NULL,NULL,NULL,NULL,NULL,NULL,NULL,''); -DELETE FROM `creature` WHERE `guid` IN (500000,500001,500002,500003,500004,500005,500006,500007,500008); -INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES -(500000, 99005, 571, 3, 1, 0, 0, 9025.76, -1179.12, 1060.18, 4.59386, 3600, 0, 0, 64200, 12300, 0, 0), -(500001, 99005, 603, 3, 1, 0, 0, 1497.84, -23.9801, 421.367, 5.0242, 3600, 0, 0, 64200, 12300, 0, 0), -(500002, 99005, 603, 3, 1, 0, 0, 131.248, -35.3802, 410.204, 0, 3600, 0, 0, 64200, 12300, 0, 0), -(500003, 99005, 603, 3, 1, 0, 0, 553.233, -12.3247, 410.079, 0, 3600, 0, 0, 64200, 12300, 0, 0), -(500004, 99005, 603, 3, 1, 0, 0, 926.292, -11.4635, 418.995, 0, 3600, 0, 0, 64200, 12300, 0, 0), -(500005, 99005, 603, 3, 1, 0, 0, 2086.17, -24.3111, 421.639, 3.11803, 3600, 0, 0, 64200, 12300, 0, 0), -(500006, 99005, 603, 3, 1, 0, 0, -705.304, -92.5391, 429.879, 4.87217, 3600, 0, 0, 64200, 12300, 0, 0), -(500007, 99005, 603, 3, 1, 0, 0, 2516.96, 2568.03, 412.4, 0.672303, 3600, 0, 0, 64200, 12300, 0, 0), -(500008, 99005, 603, 3, 1, 0, 0, 1854.2975, -11.0173, 334.3998, 0, 3600, 0, 0, 64200, 12300, 0, 0); +DELETE FROM `creature` WHERE `id` = 99005; +DELETE FROM `creature_template` WHERE `entry` = 99005; +DELETE FROM `creature_template_addon` WHERE `entry` = 99005; + +UPDATE `gameobject_template` SET `flags` = 0, `ScriptName` = 'go_ulduar_teleporter' WHERE `entry` IN (194569); diff --git a/addition/7_mangos_ulduar_eventai.sql b/addition/7_mangos_ulduar_eventai.sql deleted file mode 100644 index e0fc432ce..000000000 --- a/addition/7_mangos_ulduar_eventai.sql +++ /dev/null @@ -1,5 +0,0 @@ -UPDATE creature_template SET AIName='EventAI', ScriptName='' WHERE entry IN (32918, 36561); -DELETE FROM creature_ai_scripts WHERE creature_id IN (32918, 36561); -INSERT INTO creature_ai_scripts VALUES -(3291800, 32918, 6, 0, 100, 2, 0, 0, 0, 0, 11, 62598, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Detonating Lasher - OnDeath (N)'), -(3291801, 32918, 6, 0, 100, 4, 0, 0, 0, 0, 11, 62937, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Detonating Lasher - OnDeath (H)'); diff --git a/addition/7_scriptdev2_ulduar.sql b/addition/7_scriptdev2_ulduar.sql index f841d43f6..5b1c9c776 100644 --- a/addition/7_scriptdev2_ulduar.sql +++ b/addition/7_scriptdev2_ulduar.sql @@ -1,5 +1,5 @@ -DELETE FROM script_texts WHERE entry BETWEEN -1603017 AND -1603000; -INSERT INTO script_texts VALUES +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1603017 AND -1603000; +INSERT INTO `script_texts` VALUES (-1603000, "New toys? For me? I promise I won't break them this time!", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15724, 1, 0, 0, "XT-002 Aggro"), (-1603001, "NO! NO! NO! NO! NO!", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15727, 1, 0, 0, "XT-002 Tympanic Tantrum"), (-1603002, "I... I think I broke it.", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15728, 1, 0, 0, "XT-002 Slay 1"), @@ -18,3 +18,15 @@ INSERT INTO script_texts VALUES (-1603015, "Welcome to the endless winter.", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15554, 1, 0, 0, "Hodir Slay 2"), (-1603016, "Winds of the north consume you!", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15555, 1, 0, 0, "Hodir Flash Freeze"), (-1603017, "", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15556, 1, 0, 0, "Hodir Frozen Blows"); + +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1050010 AND -1050000; +INSERT INTO `script_texts` VALUES +(-1050001, "Expedition Base Camp", NULL, NULL, NULL, NULL, NULL, NULL, NULL, "Лагерь экспедиции", 0, 0, 0, 0, "Ulduar teleporter text 1"), +(-1050002, "Formation Grounds", NULL, NULL, NULL, NULL, NULL, NULL, NULL, "Железный двор", 0, 0, 0, 0, "Ulduar teleporter text 2"), +(-1050003, "Colossal Forge", NULL, NULL, NULL, NULL, NULL, NULL, NULL, "Колоссальный горн", 0, 0, 0, 0, "Ulduar teleporter text 3"), +(-1050004, "Scrapyard", NULL, NULL, NULL, NULL, NULL, NULL, NULL, "Мусорная свалка", 0, 0, 0, 0, "Ulduar teleporter text 4"), +(-1050005, "Antechamber of Ulduar", NULL, NULL, NULL, NULL, NULL, NULL, NULL, "Вестибюль Ульдуара", 0, 0, 0, 0, "Ulduar teleporter text 5"), +(-1050006, "Shattered Walkway", NULL, NULL, NULL, NULL, NULL, NULL, NULL, "Обвалившаяся галерея", 0, 0, 0, 0, "Ulduar teleporter text 6"), +(-1050007, "Conservatory of Life", NULL, NULL, NULL, NULL, NULL, NULL, NULL, "Круг наблюдения", 0, 0, 0, 0, "Ulduar teleporter text 7"), +(-1050008, "Spark of Imagination", NULL, NULL, NULL, NULL, NULL, NULL, NULL, "Искра воображения", 0, 0, 0, 0, "Ulduar teleporter text 8"), +(-1050009, "Prison of Yogg-Saron", NULL, NULL, NULL, NULL, NULL, NULL, NULL, "Провал безумия", 0, 0, 0, 0, "Ulduar teleporter text 9"); diff --git a/scripts/northrend/ulduar/ulduar/ulduar_teleport.cpp b/scripts/northrend/ulduar/ulduar/ulduar_teleport.cpp index bd6596b6e..734ad1512 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar_teleport.cpp +++ b/scripts/northrend/ulduar/ulduar/ulduar_teleport.cpp @@ -1,120 +1,104 @@ +/* Copyright (C) 2006 - 2010 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: ulduar_teleport +SD%Complete: 90% +SDComment: by /dev/rsa +SDCategory: Ulduar instance +EndScriptData */ #include "precompiled.h" #include "def_ulduar.h" +#include "sc_boss_spell_worker.h" + +enum +{ + PORTALS_COUNT = 9, + TELEPORT_GOSSIP_MESSAGE = 99322, +}; -/* -The teleporter appears to be active and stable. +struct t_Locations +{ + int textNum; + uint32 map_num; + float x, y, z, o; + uint32 spellID; + bool state; + bool active; + uint32 encounter; +}; -- Expedition Base Camp -- Formation Grounds -- Colossal Forge -- Scrapyard -- Antechamber of Ulduar -- Shattered Walkway -- Conservatory of Life -- Spark of Imagination -- Prison of Yogg-Saron -*/ +static t_Locations PortalLoc[]= +{ +{-1050001,603, -706.122f, -92.6024f, 429.876f, 0, 0,true,true,TYPE_FLAME_LEVIATHAN}, // base camp +{-1050002,603, 131.248f, -35.3802f, 409.804f, 0, 0,true,true,TYPE_FLAME_LEVIATHAN}, // formation ground +{-1050003,603, 553.233f, -12.3247f, 409.679f, 0, 0,false,true,TYPE_FLAME_LEVIATHAN}, // +{-1050004,603, 926.292f, -11.4635f, 418.595f, 3.19f, 0,false,true,TYPE_XT002_TP}, // +{-1050005,603, 1498.09f, -24.246f, 420.967f, 0, 0,false,true,TYPE_XT002_TP}, // +{-1050006,603, 1859.45f, -24.1f, 448.9f, 0, 0,false,true,TYPE_KOLOGARN}, // +{-1050007,603, 2086.27f, -24.3134f, 421.239f, 0, 0,false,true,TYPE_AURIAYA}, // +{-1050008,603, 2517.3979f, 2568.89f, 412.69f, 6.17f, 0,false,true,TYPE_THORIM}, // +{-1050009,603, 1854.297f, -11.0173f, 334.4f, 0, 65042,false,true,TYPE_VEZAX}, // +}; -#define BASE_CAMP 200 -#define GROUNDS 201 -#define FORGE 202 -#define SCRAPYARD 203 -#define ANTECHAMBER 204 -#define WALKWAY 205 -#define CONSERVATORY 206 -#define SPARK 207 -#define PRISON 208 -bool GossipHello_ulduar_teleporter(Player *player, Creature *creature) +bool GOGossipSelect_go_ulduar_teleporter(Player *pPlayer, GameObject* pGo, uint32 sender, uint32 action) { + int32 damage = 0; + if(sender != GOSSIP_SENDER_MAIN) return false; - ScriptedInstance *pInstance = (ScriptedInstance *) creature->GetInstanceData(); + if(!pPlayer->getAttackers().empty()) return false; - if(!pInstance) return true; + if(action >= 0 && action <= PORTALS_COUNT) + pPlayer->TeleportTo(PortalLoc[action].map_num, PortalLoc[action].x, PortalLoc[action].y, PortalLoc[action].z, PortalLoc[action].o); + if (PortalLoc[action].spellID != 0 ) + if (SpellEntry const* spell = (SpellEntry *)GetSpellStore()->LookupEntry(PortalLoc[action].spellID)) + pPlayer->AddAura(new BossAura(spell, EFFECT_INDEX_2, &damage,(Unit*)pPlayer, (Unit*)pPlayer)); - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, "Teleport to the Expedition Base Camp", GOSSIP_SENDER_MAIN, BASE_CAMP); - if(pInstance->GetData(TYPE_LEVIATHAN_TP) == IN_PROGRESS) - { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, "Teleport to the Formation Grounds", GOSSIP_SENDER_MAIN, GROUNDS); - }; - if(pInstance->GetData(TYPE_FLAME_LEVIATHAN) == DONE) - { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, "Teleport to the Colossal Forge", GOSSIP_SENDER_MAIN, FORGE); - }; - if(pInstance->GetData(TYPE_XT002_TP) == IN_PROGRESS) - { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, "Teleport to the Scrapyard", GOSSIP_SENDER_MAIN, SCRAPYARD); - }; - if(pInstance->GetData(TYPE_XT002) == DONE) - { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, "Teleport to the Antechamber of Ulduar", GOSSIP_SENDER_MAIN, ANTECHAMBER); - }; - if(pInstance->GetData(TYPE_KOLOGARN) == DONE) - { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, "Teleport to the Shattered Walkway", GOSSIP_SENDER_MAIN, WALKWAY); - }; - if(pInstance->GetData(TYPE_AURIAYA) == DONE) - { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, "Teleport to the Conservatory of Life", GOSSIP_SENDER_MAIN, CONSERVATORY); - }; - if(pInstance->GetData(TYPE_MIMIRON_TP) == IN_PROGRESS) - { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, "Teleport to the Spark of Imagination", GOSSIP_SENDER_MAIN, SPARK); - }; - if(pInstance->GetData(TYPE_VEZAX) == DONE) - { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, "Teleport to the Prison of Yogg-Saron", GOSSIP_SENDER_MAIN, PRISON); - }; - player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, creature->GetGUID()); + pPlayer->CLOSE_GOSSIP_MENU(); return true; } -bool GossipSelect_ulduar_teleporter(Player *player, Creature *creature, uint32 sender, uint32 action) +bool GOGossipHello_go_ulduar_teleporter(Player *pPlayer, GameObject* pGo) { - if(sender != GOSSIP_SENDER_MAIN) return true; - if(!player->getAttackers().empty()) return true; + ScriptedInstance *pInstance = (ScriptedInstance *) pGo->GetInstanceData(); - switch(action) - { - case BASE_CAMP: - player->TeleportTo(603, -706.122, -92.6024, 429.876, 0); - player->CLOSE_GOSSIP_MENU(); break; - case GROUNDS: - player->TeleportTo(603, 131.248, -35.3802, 409.804, 0); - player->CLOSE_GOSSIP_MENU(); break; - case FORGE: - player->TeleportTo(603, 553.233, -12.3247, 409.679, 0); - player->CLOSE_GOSSIP_MENU(); break; - case SCRAPYARD: - player->TeleportTo(603, 926.292, -11.4635, 418.595, 0); - player->CLOSE_GOSSIP_MENU(); break; - case ANTECHAMBER: - player->TeleportTo(603, 1498.09, -24.246, 420.967, 0); - player->CLOSE_GOSSIP_MENU(); break; - case WALKWAY: - player->TeleportTo(603, 1859.45, -24.1, 448.9, 0); - player->CLOSE_GOSSIP_MENU(); break; - case CONSERVATORY: - player->TeleportTo(603, 2086.27, -24.3134, 421.239, 0); - player->CLOSE_GOSSIP_MENU(); break; - case SPARK: - player->TeleportTo(603, 2536.87, 2569.15, 412.304, 0); - player->CLOSE_GOSSIP_MENU(); break; - case PRISON: - player->TeleportTo(603, 1854.297, -11.0173, 334.4, 0); - player->CLOSE_GOSSIP_MENU(); break; - } + if (!pInstance || !pPlayer) return false; + if (pPlayer->isInCombat()) return true; + for(uint8 i = 0; i < PORTALS_COUNT; i++) { + if ((PortalLoc[i].active == true && + (PortalLoc[i].state == true || + pInstance->GetData(PortalLoc[i].encounter) == DONE || + pInstance->GetData(PortalLoc[i].encounter) == IN_PROGRESS)) + || pPlayer->isGameMaster()) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_TAXI, GetScriptText(PortalLoc[i].textNum, pPlayer), GOSSIP_SENDER_MAIN, i); + }; + pPlayer->SEND_GOSSIP_MENU(TELEPORT_GOSSIP_MESSAGE, pGo->GetGUID()); return true; } void AddSC_ulduar_teleport() { Script *newscript; + newscript = new Script; - newscript->Name = "ulduar_teleporter"; - newscript->pGossipHello = &GossipHello_ulduar_teleporter; - newscript->pGossipSelect = &GossipSelect_ulduar_teleporter; + newscript->Name = "go_ulduar_teleporter"; + newscript->pGOGossipHello = &GOGossipHello_go_ulduar_teleporter; + newscript->pGOGossipSelect = &GOGossipSelect_go_ulduar_teleporter; newscript->RegisterSelf(); } From e01fdbb5ff96120520e30ab3d6516193ae2b83f6 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Tue, 29 Jun 2010 13:00:02 +0400 Subject: [PATCH 393/405] Ahn'kahet (from Tassadar) renew --- Makefile.am | 1 + README | 2 +- addition/719_ankahet_mangos.sql | 106 ++++- .../northrend/azjol-nerub/ahnkahet/ahnkahet.h | 2 +- .../azjol-nerub/ahnkahet/boss_amanitar.cpp | 269 +++++++++++ .../azjol-nerub/ahnkahet/boss_jedoga.cpp | 111 +++-- .../azjol-nerub/ahnkahet/boss_nadox.cpp | 41 +- .../azjol-nerub/ahnkahet/boss_taldaram.cpp | 25 +- .../azjol-nerub/ahnkahet/boss_volazj.cpp | 418 ++++++++++-------- .../ahnkahet/instance_ahnkahet.cpp | 14 +- system/ScriptLoader.cpp | 2 + 11 files changed, 736 insertions(+), 255 deletions(-) create mode 100644 scripts/northrend/azjol-nerub/ahnkahet/boss_amanitar.cpp diff --git a/Makefile.am b/Makefile.am index cc494a5a1..88c12c7d5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -318,6 +318,7 @@ scripts/northrend/storm_peaks.cpp \ scripts/northrend/howling_fjord.cpp \ scripts/northrend/zuldrak.cpp \ scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp \ +scripts/northrend/azjol-nerub/ahnkahet/boss_amanitar.cpp \ scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp \ scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp \ scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp \ diff --git a/README b/README index a8d1e88fe..03ee56b27 100644 --- a/README +++ b/README @@ -25,7 +25,7 @@ In this repository you found this custom scripts: - Trial of the Champion (by Syntec, big rewrite by me) - Violet hold (by ckegg, big rewrite by me) - Naxxramas (by ckegg) -- An'kahet (by Tassadar) +- Ahn'kahet (renewed, by Tassadar with my corrects) - Draktaron (by Tassadar) - Culling of Stratholme (by MaxXx2021) - Obsidian Sanctum (by MaxXx2021) diff --git a/addition/719_ankahet_mangos.sql b/addition/719_ankahet_mangos.sql index a02f7c479..407cf7fe3 100644 --- a/addition/719_ankahet_mangos.sql +++ b/addition/719_ankahet_mangos.sql @@ -1,18 +1,114 @@ -DELETE FROM creature_template_addon WHERE entry IN (30385, 31474); +-- Ahnkahet from Tassadar +UPDATE `instance_template` SET `script` = 'instance_ahnkahet' WHERE `map`=619; +UPDATE `creature_template` SET `ScriptName` = 'boss_jedoga', `AIName`='' WHERE `entry`=29310; +UPDATE `creature_template` SET `ScriptName` = 'boss_nadox', `AIName`='' WHERE `entry`=29309; +UPDATE `creature_template` SET `ScriptName` = 'boss_taldaram', `AIName`='' WHERE `entry`=29308; +UPDATE `gameobject_template` SET `ScriptName` = 'go_nerubian_device' WHERE `entry` IN (193093,193094); +UPDATE `creature_template` SET `ScriptName` = 'boss_volazj', `AIName`='' WHERE `entry`=29311; + +DELETE FROM `creature_template_addon` WHERE `entry` IN (30385, 31474); INSERT INTO `creature_template_addon` (`entry`, `mount`, `bytes1`, `bytes2`, `emote`, `moveflags`, `auras`) VALUES ('30385', '0', '8', '1', '0', '0', NULL), ('31474', '0', '8', '1', '0', '0', NULL); -DELETE FROM creature_template WHERE entry IN (31474, 30385, 29310, 31465); +DELETE FROM `creature_template` WHERE entry IN (31474, 30385, 29310, 31465); INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_A`, `modelid_A2`, `modelid_H`, `modelid_H2`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (29310, 31465, 0, 0, 0, 0, 26777, 0, 26777, 0, 'Jedoga Shadowseeker', '', '', 0, 75, 75, 212700, 212700, 0, 0, 8204, 16, 16, 0, 1, 1, 339, 481, 0, 370, 7.5, 2000, 0, 2, 0, 0, 0, 0, 0, 0, 0, 293, 436, 53, 7, 0, 29310, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4176, 6960, '', 0, 3, 20, 20, 0, 0, 0, 0, 0, 0, 0, 172, 1, 1575, 0, 0, 'boss_jedoga'), (30385, 31474, 0, 0, 0, 0, 27382, 27384, 27383, 27385, 'Twilight Volunteer', '', '', 0, 74, 74, 25705, 25705, 0, 0, 0, 16, 16, 0, 1, 1, 0, 0, 0, 0, 1, 2000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 2.5, 4, 0, 0, 0, 0, 0, 0, 0, 0, 1, 93, 0, 0, 'npc_twilight_volunteer'), -(31465, 0, 0, 0, 0, 0, 26777, 0, 26777, 0, 'Jedoga Shadowseeker (1)', '', '', 0, 82, 82, 431392, 431392, 0, 0, 10253, 16, 16, 0, 1, 1, 463, 640, 0, 726, 13, 2000, 0, 2, 0, 0, 0, 0, 0, 0, 0, 360, 520, 91, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8352, 13920, '', 0, 3, 32, 20, 0, 0, 0, 0, 0, 0, 0, 172, 1, 0, 0, 1, ''), +(31465, 0, 0, 0, 0, 0, 26777, 0, 26777, 0, 'Jedoga Shadowseeker (1)', '', '', 0, 82, 82, 431392, 431392, 0, 0, 10253, 16, 16, 0, 1, 1, 463, 640, 0, 726, 13, 2000, 0, 2, 0, 0, 0, 0, 0, 0, 0, 360, 520, 91, 7, 0, 31465, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8352, 13920, '', 0, 3, 32, 20, 0, 0, 0, 0, 0, 0, 0, 172, 1, 0, 0, 1, ''), (31474, 0, 0, 0, 0, 0, 27382, 27384, 27383, 27385, 'Twilight Volunteer (1)', '', '', 0, 81, 81, 58648, 58648, 0, 0, 0, 16, 16, 0, 1, 1, 0, 0, 0, 0, 1, 2000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 4.5, 4, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, ''); -DELETE FROM creature_addon WHERE guid=131953; -DELETE FROM creature WHERE guid=131953; +UPDATE `creature_template` SET `unit_flags` = '0' WHERE `entry` IN (30114,31473); + +DELETE FROM `creature_addon` WHERE guid=131953; +DELETE FROM `creature` WHERE guid IN (131953, 115064); INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (131953, 29310, 619, 3, 1, 26777, 0, 357.353, -692.808, -10.7028, 5.56541, 14400, 5, 0, 212700, 0, 0, 1); +DELETE FROM `gameobject` WHERE `guid` = 911321; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(911321, 194394, 619, 2, 1, 371.842, -701.621, -16.1797, 5.67851, 0, 0, 0.297751, -0.954644, -10, 0, 1); + +UPDATE `creature_template` SET `unit_flags` = 0, `difficulty_entry_1` = 0 WHERE `entry` IN (30258, 30391, 30435); +UPDATE `creature_template` SET `ScriptName` ='npc_amanitar_mushroom', `AIName`='' WHERE `entry` IN (30391, 30435); +UPDATE `creature_template` SET `ScriptName` ='boss_amanitar', `AIName`='', `mindmg` = 488, `maxdmg` = 648, `attackpower` = 782, `dmg_multiplier` = 13 WHERE `entry` = 30258; + +DELETE FROM `creature` WHERE `map` = 619 AND `id` IN (30258,30391); + +INSERT INTO `creature` (`id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES +#Amanitar +(30258, 619, 2, 1, 0, 0, 340.433, -884.8, -74.6965, 6.10105, 9800, 0, 0, 1, 0, 0, 0), + +#Mushrooms +(30391, 619, 2, 1, 0, 0, 358.386, -885.553, -76.1054, 3.06235, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 355.893, -871.712, -76.1473, 2.37356, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 350.343, -874.985, -76.7057, 3.40793, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 339.429, -875.16, -75.6668, 2.76233, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 333.095, -874.652, -73.8099, 3.95457, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 324.208, -878.923, -70.915, 3.95457, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 319.612, -893.614, -66.4438, 6.25892, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 335.775, -899.115, -76.1423, 0.282045, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 344.644, -898.122, -77.6435, 0.282045, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 353.341, -894.159, -77.208, 0.282045, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 363.279, -897.252, -79.5129, 0.282045, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 364.47, -903.557, -80.3345, 4.7651, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 366.219, -915.939, -82.5392, 5.04784, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 368.297, -920.562, -82.5588, 5.59919, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 381.647, -923.685, -82.4737, 0.190153, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 389.079, -916.929, -81.4451, 1.40831, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 386.916, -909.718, -79.9835, 1.40831, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 386.976, -898.374, -79.2561, 2.5652, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 390.349, -882.168, -76.0919, 1.56146, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 387.136, -871.625, -75.4158, 2.15051, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 378.056, -864.542, -73.8699, 3.01759, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 363.749, -858.04, -75.1185, 3.01759, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 352.564, -862.387, -74.7834, 3.01759, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 343.924, -860.44, -74.5909, 2.23533, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 339.94, -852.104, -74.3732, 0.995972, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 347.839, -848.228, -73.7097, 6.23065, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 324.306, -858.725, -75.0947, 3.68596, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 347.971, -882.318, -75.884, 3.55872, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 347.965, -889.829, -76.747, 3.55872, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 368.578, -877.354, -75.676, 1.46878, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 378.003, -852.353, -73.5427, 0.519235, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 361.828, -841.2, -70.86, 2.94298, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 346.972, -839.523, -73.5286, 2.94298, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 337.009, -843.074, -74.3865, 2.94298, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 330.036, -847.017, -74.318, 3.25321, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 328.839, -838.69, -72.921, 1.8929, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 322.452, -829.799, -73.5624, 2.6563, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 316.367, -822.016, -73.1033, 1.71618, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 320.592, -812.011, -73.8038, 0.957487, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 322.619, -803.898, -72.9384, 2.07668, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 331.481, -811.702, -72.9227, 5.46332, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 341.894, -826.849, -73.049, 5.46332, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 387.58, -856.341, -71.0935, 5.72486, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 401.977, -867.49, -73.3215, 5.27247, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 408.72, -872.115, -73.0256, 6.03823, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 416.438, -875.336, -70.4833, 5.08397, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 403.004, -895.527, -75.561, 5.60391, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 409.35, -902.562, -77.2837, 5.22927, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 414.538, -911.69, -79.8006, 5.22927, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 419.727, -920.818, -80.7403, 5.22927, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 428.151, -920.833, -79.0992, 0.892305, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 436.712, -911.759, -78.8367, 0.0605679, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 461.167, -910.276, -77.4777, 0.0605679, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 419.827, -930.386, -77.7951, 4.29465, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 418.017, -939.624, -80.2493, 4.29465, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 417.247, -948.532, -79.3315, 4.29465, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 409.236, -952.042, -80.6495, 4.29465, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 410.077, -959.059, -78.9977, 4.29465, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 403.871, -964.208, -77.8873, 4.29465, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 401.693, -970.428, -77.3012, 4.90255, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 402.379, -980.099, -75.4585, 4.60567, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 399.272, -984.535, -75.9494, 3.15425, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 380.102, -984.145, -74.2926, 2.13402, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 369.565, -973.481, -77.4914, 2.56756, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 360.748, -967.779, -79.832, 2.56756, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 350.138, -958.988, -79.4422, 2.16229, 30, 0, 0, 1, 0, 0, 0), +(30391, 619, 2, 1, 0, 0, 342.879, -944.352, -79.8533, 1.64157, 30, 0, 0, 1, 0, 0, 0); +UPDATE creature_template SET `AIname`='EventAI' WHERE `entry` = 30176; +INSERT INTO `creature_ai_scripts` (`id`, `creature_id`, `event_type`, `event_inverse_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action1_type`, `action1_param1`, `action1_param2`, `action1_param3`, `action2_type`, `action2_param1`, `action2_param2`, `action2_param3`, `action3_type`, `action3_param1`, `action3_param2`, `action3_param3`, `comment`) VALUES +('3017610', '30176', '11', '0', '100', '6', '0', '0', '0', '0', '11', '56151', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', ''), +('3017611', '30176', '8', '0', '100', '6', '56153', '0', '0', '0', '28', '0', '56153', '0', '0', '0', '0', '0', '0', '0', '0', '0', ''); diff --git a/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h b/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h index 6f4b522db..ed51ee667 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h +++ b/scripts/northrend/azjol-nerub/ahnkahet/ahnkahet.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 +/* Copyright (C) 2006 - 2009 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_amanitar.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_amanitar.cpp new file mode 100644 index 000000000..5849531f3 --- /dev/null +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_amanitar.cpp @@ -0,0 +1,269 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Boss_Amanitar +SD%Complete: 80% +SDComment: Timers +SDAuthor: Tassadar +SDCategory: Ahn'kahet +EndScriptData */ + +#include "precompiled.h" +#include "ahnkahet.h" + +enum +{ + //Amanitar spells + SPELL_BASH = 57094, + SPELL_VENOM_BOLT = 57088, + SPELL_ENTANGLING_ROOTS = 57095, + SPELL_MINI = 57055, // this one and SPELL_POTENT_FUNGUS MUST stack! + + //Mushroom spells + SPELL_POISON_CLOUD = 57061, + SPELL_POISONOUS_MUSHROOM_VISUAL = 56741, + SPELL_POTENT_FUNGUS = 56648, // this one and SPELL_MINI MUST stack! + SPELL_PUTRID_MUSHROOM = 31690, // They should look like mushroom + + //Script thinks that all mushrooms which are spawned are only healthy, so change entry only for poisinous + NPC_HEALTHY_MUSHROOM = 30391, + NPC_POISONOUS_MUSHROOM = 30435, +}; +/*###### +## boss_amanitar +######*/ + +struct MANGOS_DLL_DECL boss_amanitarAI : public ScriptedAI +{ + boss_amanitarAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + + uint32 m_uiBashTimer; + uint32 m_uiVenomBoltTimer; + uint32 m_uiRootsTimer; + uint32 m_uiMiniTimer; + + + void Reset() + { + m_uiBashTimer = 8000; + m_uiVenomBoltTimer = 12000; + m_uiRootsTimer = 19000; + m_uiMiniTimer = 30000; + + if (m_pInstance) + m_pInstance->SetData(TYPE_AMANITAR, NOT_STARTED); + } + + void Aggro(Unit* pWho) + { + ShowMushrooms(); + + if(m_bIsRegularMode == true) + m_creature->ForcedDespawn(); + + m_pInstance->SetData(TYPE_AMANITAR, IN_PROGRESS); + } + void EnterEvadeMode() + { + ShowMushrooms(false); + if (m_pInstance) + m_pInstance->SetData(TYPE_AMANITAR, FAIL); + + m_creature->GetMotionMaster()->MoveTargetedHome(); + } + void JustDied(Unit* pKiller) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_AMANITAR, DONE); + } + void ShowMushrooms(bool show = true) + { + std::list lMushroomsHealthy; + GetCreatureListWithEntryInGrid(lMushroomsHealthy, m_creature, NPC_HEALTHY_MUSHROOM, 150.0f); + for(std::list::iterator itr1 = lMushroomsHealthy.begin(); itr1 != lMushroomsHealthy.end(); ++itr1) + { + if(show) + (*itr1)->SetVisibility(VISIBILITY_ON); + else + (*itr1)->SetVisibility(VISIBILITY_OFF); + } + std::list lMushroomsPoison; + GetCreatureListWithEntryInGrid(lMushroomsPoison, m_creature, NPC_POISONOUS_MUSHROOM, 150.0f); + for(std::list::iterator itr2 = lMushroomsPoison.begin(); itr2 != lMushroomsPoison.end(); ++itr2) + { + if(show) + (*itr2)->SetVisibility(VISIBILITY_ON); + else + (*itr2)->SetVisibility(VISIBILITY_OFF); + } + } + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + //Bash + if(m_uiBashTimer <= uiDiff) + { + DoCast(m_creature->getVictim(), SPELL_BASH); + m_uiBashTimer = 8000 + rand()%5000; + }else m_uiBashTimer -= uiDiff; + + //Venom bolt volley + if(m_uiVenomBoltTimer <= uiDiff) + { + DoCast(m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0), SPELL_VENOM_BOLT); + m_uiVenomBoltTimer = 15000 + rand()%5000; + }else m_uiVenomBoltTimer -= uiDiff; + + //Entangling Roots + if(m_uiRootsTimer <= uiDiff) + { + DoCast(m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0), SPELL_ENTANGLING_ROOTS); + m_uiRootsTimer = 18000 + rand()%5000; + }else m_uiRootsTimer -= uiDiff; + + //Mini + if(m_uiMiniTimer <= uiDiff) + { + DoCast(m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0), SPELL_MINI); + m_uiMiniTimer = 30000; + }else m_uiMiniTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_amanitar(Creature* pCreature) +{ + return new boss_amanitarAI(pCreature); +} +/*###### +## npc_amanitar_mushroom +######*/ + +struct MANGOS_DLL_DECL npc_amanitar_mushroomAI : public ScriptedAI +{ + npc_amanitar_mushroomAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + + uint8 m_uiMushroomType; //0 = healthy, 1 = poisinous + bool m_bIsDead; + uint32 m_uiRespawnTimer; + + void Reset() + { + m_bIsDead = false; + m_uiRespawnTimer = 30000; + + DoCast(m_creature,SPELL_PUTRID_MUSHROOM,true); + m_creature->SetVisibility(VISIBILITY_OFF); + + ResetMushroom(); + } + void ResetMushroom() + { + m_uiMushroomType = urand(0, 1); + if(m_uiMushroomType == 1) + { + m_creature->UpdateEntry(NPC_POISONOUS_MUSHROOM); + m_creature->CastSpell(m_creature, SPELL_POISONOUS_MUSHROOM_VISUAL, true); + }else{ + m_creature->RemoveAurasDueToSpell(SPELL_POISONOUS_MUSHROOM_VISUAL); + m_creature->UpdateEntry(NPC_HEALTHY_MUSHROOM); + } + DoCast(m_creature,SPELL_PUTRID_MUSHROOM,true); + if(m_bIsDead) + m_creature->SetVisibility(VISIBILITY_OFF); + } + void AttackStart(Unit *pWho) + { + return; + } + void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + { + if (m_bIsDead) + { + uiDamage = 0; + return; + } + + if (uiDamage > m_creature->GetHealth()) + { + m_bIsDead = true; + uiDamage = 0; + if(m_uiMushroomType == 0) + m_creature->CastSpell(m_creature, SPELL_POTENT_FUNGUS, true); + else + m_creature->CastSpell(m_creature, SPELL_POISON_CLOUD, true); + + m_creature->SetHealth(1); + m_creature->SetVisibility(VISIBILITY_OFF); + } + } + void JustDied(Unit* pKiller) + { + m_creature->Respawn(); + } + void UpdateAI(const uint32 uiDiff) + { + if(m_bIsDead) + { + if(m_uiRespawnTimer <= uiDiff) + { + m_bIsDead = false; + ResetMushroom(); + m_creature->SetHealth(m_creature->GetMaxHealth()); + m_creature->SetVisibility(VISIBILITY_ON); + m_uiRespawnTimer = 30000; + }else m_uiRespawnTimer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_npc_amanitar_mushroom(Creature* pCreature) +{ + return new npc_amanitar_mushroomAI(pCreature); +} +void AddSC_boss_amanitar() +{ + Script* newscript; + + newscript = new Script; + newscript->Name = "boss_amanitar"; + newscript->GetAI = &GetAI_boss_amanitar; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_amanitar_mushroom"; + newscript->GetAI = &GetAI_npc_amanitar_mushroom; + newscript->RegisterSelf(); +} \ No newline at end of file diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp index f3a672f00..9cf2b708f 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_jedoga.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 +/* Copyright (C) 2006 - 2009 ScriptDev2 * 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 @@ -61,6 +61,7 @@ enum NPC_TWILIGHT_INITIATE = 30114, NPC_TWILIGHT_VOLUNTEER = 30385, + NPC_JEDOGA = 29310, GO_CIRCLE = 194394, // Propably wrong id @@ -115,7 +116,7 @@ static Locations VolunteerLoc[]= {386.19, -725.89, -16.00, 2.491}, {383.61, -729.29, -16.00, 2.491}, {380.37, -733.55, -16.00, 2.491}, - + {402.72, -700.79, -16.00, 3.046}, // Left, first line {402.63, -698.86, -16.18, 3.149}, {402.62, -697.10, -16.17, 3.149}, @@ -137,26 +138,44 @@ struct MANGOS_DLL_DECL npc_twilight_volunteerAI : public ScriptedAI npc_twilight_volunteerAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } ScriptedInstance* m_pInstance; - bool m_bIsRegularMode; uint8 m_uiPhase; bool m_bIsVulunteerNear; uint32 m_uiCheckTimer; + bool m_bIsDead; void Reset() { m_uiPhase = 0; m_bIsVulunteerNear = false; m_uiCheckTimer = 1000; + m_bIsDead = false; } void AttackStart(Unit* pWho) { return; } + void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) + { + if (m_bIsDead) + { + uiDamage = 0; + return; + } + + if (uiDamage > m_creature->GetHealth()) + { + m_creature->ForcedDespawn(10000); + m_bIsDead = true; + uiDamage = 0; + + m_creature->SetHealth(1); + m_creature->SetVisibility(VISIBILITY_OFF); + } + } void MovementInform(uint32 uiType, uint32 uiPointId) { if(uiType != POINT_MOTION_TYPE) @@ -166,11 +185,17 @@ struct MANGOS_DLL_DECL npc_twilight_volunteerAI : public ScriptedAI { case 0: m_bIsVulunteerNear = true; + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->ForcedDespawn(10000); + m_creature->SetVisibility(VISIBILITY_OFF); break; } } void Sacriface(uint8 phase) { + if(m_bIsDead) + return; + m_uiPhase = phase; switch(m_uiPhase) { @@ -191,27 +216,10 @@ struct MANGOS_DLL_DECL npc_twilight_volunteerAI : public ScriptedAI } void UpdateAI(const uint32 uiDiff) { - //Despawn if no Jedoga or if she is not in combat - // I hope this will not take too CPU time - if (m_uiCheckTimer <= uiDiff) - { - if(Creature *pJedoga = GetClosestCreatureWithEntry(m_creature, NPC_JEDOGA_SHADOWSEEKER, 50.0f)) - { - if(!pJedoga->isAlive()) - m_creature->ForcedDespawn(); - else - { - if(Creature *pInitiate = GetClosestCreatureWithEntry(m_creature, NPC_TWILIGHT_INITIATE, 50.0f)) - { - if(pInitiate->isAlive()) - m_creature->ForcedDespawn(); - } - } - }else m_creature->ForcedDespawn(); + if (!m_pInstance || m_bIsDead) return; + if (m_pInstance->GetData(TYPE_JEDOGA) != IN_PROGRESS) m_creature->ForcedDespawn(); - m_uiCheckTimer = 4000; - }else m_uiCheckTimer -= uiDiff; } }; @@ -232,6 +240,7 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI bool m_bIsRegularMode; bool m_bIsVulunteerNear; bool m_bVolunteerDied; + bool m_isRealEvade; uint8 m_uiPhase; uint8 m_uiSubPhase; uint8 m_uiPreachingText; @@ -254,6 +263,7 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI m_bIsVulunteerNear = false; m_bVolunteerDied = false; m_uiLastSacrifaceHP = 0; + m_isRealEvade = true; m_uiCheckTimer = 1000; m_uiSacrifaceTimer = 2000; @@ -275,7 +285,6 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI if (m_pInstance) m_pInstance->SetData(TYPE_JEDOGA, IN_PROGRESS); } - void KilledUnit(Unit* pVictim) { switch(urand(0, 2)) @@ -287,16 +296,28 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI } void EnterEvadeMode() { + if (m_uiPhase == PHASE_PREACHING && !m_isRealEvade) return; + m_uiPhase = PHASE_PREACHING; SetCombatMovement(false); m_creature->GetMotionMaster()->MovementExpired(); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->InterruptNonMeleeSpells(true); DoCast(m_creature, SPELL_SPHERE_VISUAL); - m_creature->MonsterMove(JEDOGA_X, JEDOGA_Y, JEDOGA_Z, 0); + m_creature->GetMap()->CreatureRelocation(m_creature, JEDOGA_X, JEDOGA_Y, JEDOGA_Z, JEDOGA_O); + m_creature->SendMonsterMove(JEDOGA_X, JEDOGA_Y, JEDOGA_Z, SPLINETYPE_NORMAL, SPLINEFLAG_NONE, 0); if (m_pInstance) m_pInstance->SetData(TYPE_JEDOGA, NOT_STARTED); + if (m_isRealEvade) + { + RespawnInitiates(); + m_isRealEvade = false; + } + } + + void RespawnInitiates() + { std::list lInitiates; //respawn Twilight initiates GetCreatureListWithEntryInGrid(lInitiates, m_creature, NPC_TWILIGHT_INITIATE, DEFAULT_VISIBILITY_INSTANCE); @@ -308,15 +329,15 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI (*iter)->Respawn(); } } - } + void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); if (m_pInstance) m_pInstance->SetData(TYPE_JEDOGA, DONE); } - + Creature* SelectRandomVolunteer(float fRange) { std::list lVolunteerList; @@ -360,8 +381,9 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI return; } - if(m_pInstance->GetData(TYPE_TALDARAM) != DONE) - return; + if (m_pInstance) + if(m_pInstance->GetData(TYPE_TALDARAM) != DONE) + return; switch(m_uiPreachingText) { @@ -401,17 +423,18 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI return; SetCombatMovement(true); - m_creature->MonsterMove(CENTER_X, CENTER_Y, GROUND_Z, 0); + m_creature->GetMap()->CreatureRelocation(m_creature, CENTER_X, CENTER_Y, GROUND_Z, JEDOGA_O); + m_creature->SendMonsterMove(CENTER_X, CENTER_Y, GROUND_Z, SPLINETYPE_NORMAL, SPLINEFLAG_NONE, 0); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); m_creature->RemoveAurasDueToSpell(SPELL_SPHERE_VISUAL); m_creature->SetInCombatWithZone(); //Spawn Volunteers - for(int i = 0; i <= 28; i++) + for(int i = 0; i <= 28; ++i) { if(Creature *pTemp = m_creature->SummonCreature(NPC_TWILIGHT_VOLUNTEER, VolunteerLoc[i].x, VolunteerLoc[i].y, VolunteerLoc[i].z, VolunteerLoc[i].o, TEMPSUMMON_CORPSE_DESPAWN, 0)) pTemp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - + } m_uiSubPhase = 0; m_uiPhase = PHASE_FIGHT; @@ -435,7 +458,7 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI //Lightning Bolt if(m_uiLightningBoltTimer <= uiDiff) { - if(Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + if(Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) DoCast(pTarget, m_bIsRegularMode ? SPELL_LIGHTNING_BOLT : SPELL_LIGHTNING_BOLT_H); m_uiLightningBoltTimer = 3000 + rand()%2000; }else m_uiLightningBoltTimer -= uiDiff; @@ -443,7 +466,7 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI //Thundershock if(m_uiThundershockTimer <= uiDiff) { - if(Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + if(Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) DoCast(pTarget, m_bIsRegularMode ? SPELL_THUNDERSHOCK : SPELL_THUNDERSHOCK_H); m_uiThundershockTimer = 20000 + rand()%10000; }else m_uiThundershockTimer -= uiDiff; @@ -487,7 +510,8 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->InterruptNonMeleeSpells(true); DoCast(m_creature, SPELL_SPHERE_VISUAL); - m_creature->MonsterMove(JEDOGA_X, JEDOGA_Y, JEDOGA_Z, 0); + m_creature->GetMap()->CreatureRelocation(m_creature, JEDOGA_X, JEDOGA_Y, JEDOGA_Z, JEDOGA_O); + m_creature->SendMonsterMove(JEDOGA_X, JEDOGA_Y, JEDOGA_Z, SPLINETYPE_NORMAL, SPLINEFLAG_NONE, 0); m_uiSubPhase = SUBPHASE_CALL_VOLUNTEER; GameObject* pCircle = GetClosestGameObjectWithEntry(m_creature,GO_CIRCLE,50.0f); if (pCircle && !pCircle->isSpawned()) @@ -512,15 +536,19 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI if(m_uiCheckTimer <= uiDiff) { if(pVolunteer && pVolunteer->isAlive()){ - m_bVolunteerDied = false; - if(((npc_twilight_volunteerAI*)pVolunteer->AI())->m_bIsVulunteerNear) + if(pVolunteer->GetVisibility() == VISIBILITY_OFF) + { + if(((npc_twilight_volunteerAI*)pVolunteer->AI())->m_bIsVulunteerNear) + m_bVolunteerDied = false; + else + m_bVolunteerDied = true; m_uiSubPhase = SUBPHASE_SACRIFACE; + } }else{ m_bIsVulunteerNear = true; m_bVolunteerDied = true; m_uiSubPhase = SUBPHASE_SACRIFACE; } - m_uiCheckTimer = 1000; }else m_uiCheckTimer -= uiDiff; } @@ -531,14 +559,11 @@ struct MANGOS_DLL_DECL boss_jedogaAI : public ScriptedAI case 0: DoScriptText(SAY_SACRIFICE_1, m_creature); break; case 1: DoScriptText(SAY_SACRIFICE_2, m_creature); break; } - - if(pVolunteer && pVolunteer->isAlive()) - ((npc_twilight_volunteerAI*)pVolunteer->AI())->Sacriface(SACRIFACE_DIE); - if(!m_bVolunteerDied) DoCast(m_creature, SPELL_GIFT_OF_THE_HERALD); + m_creature->GetMap()->CreatureRelocation(m_creature, CENTER_X, CENTER_Y, GROUND_Z, JEDOGA_O); - m_creature->MonsterMove(CENTER_X, CENTER_Y, GROUND_Z, 0); + m_creature->SendMonsterMove(CENTER_X, CENTER_Y, GROUND_Z, SPLINETYPE_NORMAL, SPLINEFLAG_NONE, 0); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); m_creature->RemoveAurasDueToSpell(SPELL_SPHERE_VISUAL); diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp index c54585b86..ba4977461 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_nadox.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 +/* Copyright (C) 2006 - 2009 ScriptDev2 * 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 @@ -109,7 +109,7 @@ struct MANGOS_DLL_DECL boss_nadoxAI : public ScriptedAI bool m_bIsRegularMode; bool m_bBerserk; - bool m_bGuardianSummoned; + uint8 m_uiGuardianCount; uint32 m_uiBroodPlagueTimer; uint32 m_uiBroodRageTimer; uint32 m_uiSummonTimer; @@ -117,7 +117,7 @@ struct MANGOS_DLL_DECL boss_nadoxAI : public ScriptedAI void Reset() { m_bBerserk = false; - m_bGuardianSummoned = false; + m_uiGuardianCount = 3; m_uiSummonTimer = 5000; m_uiBroodPlagueTimer = 15000; m_uiBroodRageTimer = 20000; @@ -162,21 +162,32 @@ struct MANGOS_DLL_DECL boss_nadoxAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (!m_bGuardianSummoned && m_creature->GetHealthPercent() < 50.0f) + if (m_creature->GetHealth()*4 < m_creature->GetMaxHealth()*m_uiGuardianCount) { - // guardian is summoned at 50% of boss HP - if (Creature* pGuardianEgg = SelectRandomCreatureOfEntryInRange(NPC_AHNKAHAR_GUARDIAN_EGG, 75.0f)) - pGuardianEgg->CastSpell(pGuardianEgg, SPELL_SUMMON_SWARM_GUARDIAN, false); + // guardian is summoned at 75%, 50% and 25% of boss HP + if (Creature* pGuardianEgg = SelectRandomCreatureOfEntryInRange(NPC_AHNKAHAR_GUARDIAN_EGG, 75.0)) + { + // pGuardianEgg->CastSpell(pGuardianEgg, SPELL_SUMMON_SWARM_GUARDIAN, false); + if(Creature *pGuardian = pGuardianEgg->SummonCreature(NPC_AHNKAHAR_GUARDIAN, pGuardianEgg->GetPositionX(), pGuardianEgg->GetPositionY(), pGuardianEgg->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 3*MINUTE*IN_MILLISECONDS)) + pGuardian->AI()->AttackStart(m_creature->getVictim()); + } - m_bGuardianSummoned = true; + --m_uiGuardianCount; } if (m_uiSummonTimer < uiDiff) { - DoScriptText(urand(0, 1) ? SAY_SUMMON_EGG_1 : SAY_SUMMON_EGG_2, m_creature); + DoScriptText(rand()%2?SAY_SUMMON_EGG_1:SAY_SUMMON_EGG_2, m_creature); if (Creature* pSwarmerEgg = SelectRandomCreatureOfEntryInRange(NPC_AHNKAHAR_SWARM_EGG, 75.0)) - pSwarmerEgg->CastSpell(pSwarmerEgg, SPELL_SUMMON_SWARMERS, false); + { + // pSwarmerEgg->CastSpell(pSwarmerEgg, SPELL_SUMMON_SWARMERS, false); + if(Creature *pSwarmer = pSwarmerEgg->SummonCreature(NPC_AHNKAHAR_SWARMER, pSwarmerEgg->GetPositionX(), pSwarmerEgg->GetPositionY(), pSwarmerEgg->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 3*MINUTE*IN_MILLISECONDS)) + pSwarmer->AI()->AttackStart(m_creature->getVictim()); + + if(Creature *pSwarmer = pSwarmerEgg->SummonCreature(NPC_AHNKAHAR_SWARMER, pSwarmerEgg->GetPositionX(), pSwarmerEgg->GetPositionY(), pSwarmerEgg->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 3*MINUTE*IN_MILLISECONDS)) + pSwarmer->AI()->AttackStart(m_creature->getVictim()); + } m_uiSummonTimer = 10000; } @@ -193,12 +204,12 @@ struct MANGOS_DLL_DECL boss_nadoxAI : public ScriptedAI else m_uiBroodPlagueTimer -= uiDiff; - if (!m_bIsRegularMode) + if(!m_bIsRegularMode) { if (m_uiBroodRageTimer < uiDiff) { if (Creature* pRageTarget = SelectRandomCreatureOfEntryInRange(NPC_AHNKAHAR_SWARMER, 50.0)) - DoCastSpellIfCan(pRageTarget, SPELL_BROOD_RAGE); + DoCast(pRageTarget, SPELL_BROOD_RAGE); m_uiBroodRageTimer = 20000; } @@ -206,10 +217,10 @@ struct MANGOS_DLL_DECL boss_nadoxAI : public ScriptedAI m_uiBroodRageTimer -= uiDiff; } - if (!m_bBerserk && m_creature->GetPositionZ() < 24.0) + if (!m_bBerserk && (m_creature->GetPositionZ() < 24.0)) { m_bBerserk = true; - DoCastSpellIfCan(m_creature, SPELL_BERSERK); + DoCast(m_creature, SPELL_BERSERK); } DoMeleeAttackIfReady(); @@ -223,7 +234,7 @@ CreatureAI* GetAI_boss_nadox(Creature* pCreature) void AddSC_boss_nadox() { - Script* newscript; + Script *newscript; newscript = new Script; newscript->Name = "boss_nadox"; diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp index 6b2acebda..1816b2150 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_taldaram.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 +/* Copyright (C) 2006 - 2009 ScriptDev2 * 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 @@ -109,6 +109,7 @@ struct MANGOS_DLL_DECL boss_taldaramAI : public ScriptedAI { DoScriptText(SAY_AGGRO, m_creature); m_creature->RemoveAurasDueToSpell(SPELL_BEAM_VISUAL); + m_creature->RemoveSplineFlag(SPLINEFLAG_FLYING); if (m_pInstance) m_pInstance->SetData(TYPE_TALDARAM, IN_PROGRESS); } @@ -149,6 +150,8 @@ struct MANGOS_DLL_DECL boss_taldaramAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (!m_pInstance) return; + if(m_uiVanishPhase != 0) { m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); @@ -170,9 +173,9 @@ struct MANGOS_DLL_DECL boss_taldaramAI : public ScriptedAI case 0: DoScriptText(SAY_FEED_1, m_creature); break; case 1: DoScriptText(SAY_FEED_2, m_creature); break; } - if(m_uEmbraceTarget) - DoCast(m_uEmbraceTarget, m_bIsRegularMode ? SPELL_EMBRACE_OF_THE_VAMPYR : SPELL_EMBRACE_OF_THE_VAMPYR_H); m_creature->SetVisibility(VISIBILITY_ON); + if(m_uEmbraceTarget && m_uEmbraceTarget->isAlive()) + DoCast(m_uEmbraceTarget, m_bIsRegularMode ? SPELL_EMBRACE_OF_THE_VAMPYR : SPELL_EMBRACE_OF_THE_VAMPYR_H); m_uiDamageTaken = 0; m_uiVanishPhase = 2; }else m_uiEmbrace_Timer -= uiDiff; @@ -189,7 +192,7 @@ struct MANGOS_DLL_DECL boss_taldaramAI : public ScriptedAI // Summon Flame Orb if(m_uiSummonOrb_Timer <= uiDiff) { - for(int i = 0; i <= 3; i++) + for(int i = 0; i <= 3; ++i) { m_creature->SummonCreature(NPC_FLAME_ORB, m_creature->GetPositionX(), m_creature->GetPositionY(), FLAME_ORB_Z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); if(m_bIsRegularMode) @@ -211,8 +214,18 @@ struct MANGOS_DLL_DECL boss_taldaramAI : public ScriptedAI //DoCast(m_creature, SPELL_VANISH); We dont want to drop aggro m_uiVanishPhase = 1; - if (m_uEmbraceTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + bool stop = false; + while(!stop) + { + m_uEmbraceTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0); + if(m_uEmbraceTarget && m_uEmbraceTarget->isAlive() && m_uEmbraceTarget->GetTypeId() == TYPEID_PLAYER) + stop = true; + else + continue; + m_creature->GetMotionMaster()->MoveChase(m_uEmbraceTarget); + break; + } m_creature->SetVisibility(VISIBILITY_OFF); m_uiVanish_Timer = 10000 + rand()%10000; @@ -246,7 +259,7 @@ struct MANGOS_DLL_DECL mob_flame_orbAI : public ScriptedAI bool m_bIsRegularMode; bool m_bIsFlying; int8 direction; - + uint32 m_uiDespawn_Timer; uint32 m_uiCast_Timer; diff --git a/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp b/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp index e190ed489..38fde4ba4 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/boss_volazj.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 +/* Copyright (C) 2006 - 2009 ScriptDev2 * 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 @@ -16,15 +16,15 @@ /* ScriptData SDName: Boss_Volazj -SD%Complete: 20% -SDComment: +SD%Complete: 60% +SDComment: Insanity does not work blizzlike - custom event made, shiver need core support, timers +SDAuthor: Tassadar SDCategory: Ahn'kahet EndScriptData */ #include "precompiled.h" #include "ahnkahet.h" -//TODO: fill in texts in database. Also need to add text for whisper. enum { SPELL_MIND_FLAY = 57941, @@ -59,8 +59,19 @@ enum http://www.wowhead.com/?spells=0&filter=na=twisted+visage so many spells?! */ + //Ancient void spells + SPELL_PRISON = 43312, + SPELL_BLUE_FLAMES = 42586, + SPELL_RED_FLAMES = 42346, + SPELL_BLUE_BEAM = 32840, + SPELL_SHAKE = 44681, + SPELL_PSYCHIC_SCREAM = 34322, + NPC_TWISTED_VISAGE = 30621, - //NPC_TWISTED_VISAGE = 20058, //Bloodmaul wolf, for testing + NPC_ANCIENT_VOID = 30622, //Custom + + MODEL_VOID_LIGHT = 19702, + MODEL_VOID_DARK = 1132, SAY_AGGRO = -1619033, SAY_INSANITY = -1619034, @@ -69,62 +80,38 @@ enum SAY_SLAY_3 = -1619037, SAY_DEATH_1 = -1619038, SAY_DEATH_2 = -1619039, + SAY_ANCIENT_VOID = -1619040, + + SAY_VOID_CORRUPT = -1619041, + SAY_VOID_AGGRO = -1619042, PHASE_NOSTART = 0, PHASE_FIGHT = 1, PHASE_INSANITY_1 = 2, // Wait five seconds until cast is complete, set unattackable PHASE_INSANITY_2 = 3, - PHASE_INSANITY_3 = 4 + PHASE_INSANITY_3 = 4, }; -/*###### -## mob_twisted_visage -######*/ -struct MANGOS_DLL_DECL mob_twisted_visageAI : public ScriptedAI +struct Locations { - mob_twisted_visageAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); - Reset(); - } - - ScriptedInstance* m_pInstance; - bool m_bIsRegularMode; - - uint8 m_uiMyPhase; - Player *m_pAttackPlayer; - Player *m_pMirrorPlayer; - - void Reset() - { - if(m_pMirrorPlayer) - m_creature->CastSpell(m_creature, 57507, false); - - } - void Aggro(Unit *pWho) - { - if(m_pMirrorPlayer) - m_creature->CastSpell(m_creature, 57507, false); - } - void EnterEvadeMode() - { - if (m_creature->IsInEvadeMode() || !m_creature->isAlive()) - return; - } - void JustDied(Unit *pWho) - { - pWho->RemoveAurasDueToSpell(SPELL_INSANITY_PHASE+m_uiMyPhase); - } - - void UpdateAI(const uint32 uiDiff) - { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - DoMeleeAttackIfReady(); - } + float x, y, z; + uint32 id; }; +static Locations SpawnLoc[]= +{ + //Around room + {571.48, -494.01, 26.35}, + {562.58, -526.48, 28.97}, + {524.80, -552.07, 26.66}, + {494.62, -533.39, 28.99}, + {470.88, -498.74, 26.35}, + {483.96, -468.54, 28.97}, + {519.23, -441.54, 26.35}, + {548.45, -456.50, 29.00}, + + //Center of the room + {521.67, -496.17, 27.01} +}; /*###### ## boss_volazj ######*/ @@ -142,7 +129,7 @@ struct MANGOS_DLL_DECL boss_volazjAI : public ScriptedAI bool m_bIsRegularMode; bool m_bIsDebugMode; //if only one player(GM) in instance uint8 m_uiPhase; - Player *m_pLastShiverTarget; + uint64 m_uiLastShiverTargetGUID; uint8 m_uiShiverJumpTimer; uint8 m_uiLastSacrifaceHP; @@ -165,6 +152,7 @@ struct MANGOS_DLL_DECL boss_volazjAI : public ScriptedAI m_uiShiverTimer = 18000; m_uiCheckTimer = 1000; m_uiShiverJumpTimer = 0; + m_uiLastShiverTargetGUID = 0; //Insanity @@ -181,7 +169,7 @@ struct MANGOS_DLL_DECL boss_volazjAI : public ScriptedAI if (m_pInstance) m_pInstance->SetData(TYPE_VOLAZJ, IN_PROGRESS); m_uiPhase = PHASE_FIGHT; - + Map* pMap = m_creature->GetMap(); if(pMap) { @@ -194,6 +182,8 @@ struct MANGOS_DLL_DECL boss_volazjAI : public ScriptedAI { if(m_uiPhase != PHASE_FIGHT) return; + + m_creature->GetMotionMaster()->MoveTargetedHome(); } void KilledUnit(Unit* pVictim) { @@ -211,51 +201,6 @@ struct MANGOS_DLL_DECL boss_volazjAI : public ScriptedAI if (m_pInstance) m_pInstance->SetData(TYPE_VOLAZJ, DONE); } - void DoShiver() - { - if(m_pLastShiverTarget && m_pLastShiverTarget->isAlive()) - { - Map* pMap = m_creature->GetMap(); - if(!pMap) - return; - Map::PlayerList const &lPlayers = pMap->GetPlayers(); - - if (lPlayers.isEmpty()) - return; - bool hasJumped = false; - - for(Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr) - { - if(m_pLastShiverTarget == itr->getSource()) - continue; - - if(itr->getSource()->IsWithinDist(m_pLastShiverTarget, 20.0f, false)) - { - m_pLastShiverTarget->CastSpell(itr->getSource(), m_bIsRegularMode ? SPELL_SHIVER : SPELL_SHIVER_H, true); - m_pLastShiverTarget = itr->getSource(); - hasJumped = true; - } - } - if(hasJumped == false) - { - if(m_uiShiverJumpTimer == 3) - { - if(Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - { - DoCast(pTarget, m_bIsRegularMode ? SPELL_SHIVER : SPELL_SHIVER_H); - m_pLastShiverTarget = ((Player*)pTarget); - } - m_uiShiverJumpTimer = 0; - }else m_uiShiverJumpTimer++; - } - }else{ - if(Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - { - DoCast(pTarget, m_bIsRegularMode ? SPELL_SHIVER : SPELL_SHIVER_H); - m_pLastShiverTarget = ((Player*)pTarget); - } - } - } void UpdateAI(const uint32 uiDiff) { if(m_uiPhase == PHASE_FIGHT) @@ -281,35 +226,26 @@ struct MANGOS_DLL_DECL boss_volazjAI : public ScriptedAI //Shiver if(m_uiShiverTimer <= uiDiff) { - //DoShiver(); - m_uiShiverTimer = 5000; + DoCast(m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0), m_bIsRegularMode ? SPELL_SHIVER : SPELL_SHIVER_H); + m_uiShiverTimer = 30000; }else m_uiShiverTimer -= uiDiff; //Health check if(m_uiCheckTimer <= uiDiff) { uint8 health = m_creature->GetHealth()*100 / m_creature->GetMaxHealth(); - if(m_uiLastSacrifaceHP == 0 && health <= 66) + if(m_uiLastSacrifaceHP == 0 && health <= 50) { m_creature->InterruptNonMeleeSpells(true); SetCombatMovement(false); - m_uiLastSacrifaceHP = 66; - DoCast(m_creature, SPELL_INSANITY, false); - m_uiPhase = PHASE_INSANITY_1; - return; - } - else if(m_uiLastSacrifaceHP == 66 && health <= 33) - { - m_creature->InterruptNonMeleeSpells(true); - SetCombatMovement(false); - DoCast(m_creature, SPELL_INSANITY, false); - m_uiLastSacrifaceHP = 33; + m_uiLastSacrifaceHP = 50; + DoCast(m_creature, SPELL_INSANITY); m_uiPhase = PHASE_INSANITY_1; return; } m_uiCheckTimer = 1000; - }else m_uiCheckTimer -= uiDiff; - + }else m_uiCheckTimer -= uiDiff; + DoMeleeAttackIfReady(); }else if(m_uiPhase == PHASE_INSANITY_1) { @@ -317,7 +253,6 @@ struct MANGOS_DLL_DECL boss_volazjAI : public ScriptedAI if(m_uiInsanityCastTimer <= uiDiff) { m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - DoCast(m_creature, SPELL_INSANITY_PHASE_1, true); DoCast(m_creature, SPELL_INSANITY_CHANNEL); DoInsanity(); m_uiInsanityCastTimer = 5000; @@ -325,12 +260,13 @@ struct MANGOS_DLL_DECL boss_volazjAI : public ScriptedAI m_uiPhase = PHASE_INSANITY_2; SetCombatMovement(false); m_creature->GetMotionMaster()->MovementExpired(false); + DoScriptText(SAY_ANCIENT_VOID, m_creature); }else m_uiInsanityCastTimer -= uiDiff; }else if(m_uiPhase == PHASE_INSANITY_2) { if(m_uiCheckTimer <= uiDiff) { - if(Creature *pTemp = GetClosestCreatureWithEntry(m_creature, NPC_TWISTED_VISAGE, 150.0f)) + if(Creature *pTemp = GetClosestCreatureWithEntry(m_creature, NPC_ANCIENT_VOID, 150.0f)) { if(!pTemp->isAlive()) m_uiPhase = PHASE_INSANITY_3; @@ -341,91 +277,207 @@ struct MANGOS_DLL_DECL boss_volazjAI : public ScriptedAI { m_creature->RemoveAurasDueToSpell(SPELL_INSANITY_CHANNEL); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - m_creature->RemoveAurasDueToSpell(SPELL_INSANITY_PHASE_1); - //RemoveInsanity(); SetCombatMovement(true); m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); m_uiPhase = PHASE_FIGHT; } - + } - //This do everything which is needed by Insanity spell + //This do everything which is needed by Insanity spell (CUSTOM) void DoInsanity() { - Map* pMap = m_creature->GetMap(); - if(!pMap) - return; - Map::PlayerList const &lPlayers = pMap->GetPlayers(); + m_creature->SummonCreature(NPC_ANCIENT_VOID, SpawnLoc[8].x, SpawnLoc[8].y, SpawnLoc[8].z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); - if (lPlayers.isEmpty()) - return; - int i = 1; - for(Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr) + for(int i = 0; i <= 7; ++i) + m_creature->SummonCreature(NPC_TWISTED_VISAGE, SpawnLoc[i].x, SpawnLoc[i].y, SpawnLoc[i].z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); + + } +}; +/*###### +## mob_twisted_visage +######*/ +struct MANGOS_DLL_DECL mob_twisted_visageAI : public ScriptedAI +{ + mob_twisted_visageAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + + void Reset() + { + m_creature->GetMotionMaster()->MovePoint(0, SpawnLoc[8].x, SpawnLoc[8].y, SpawnLoc[8].z); + } + void AttackStart(Unit *pWho) + { + return; + } + void MovementInform(uint32 uiType, uint32 uiPointId) + { + if(uiType != POINT_MOTION_TYPE) + return; + + switch(uiPointId) { - if(!itr->getSource()->isAlive()) - continue; - //Phase players, so they dont see together - DoPhasePlayer(i, itr->getSource()); - //Spawn Visages and port them to phases - DoSpawnTwistedVisages(itr->getSource(), i); - i++; + case 0: + if(Creature *pVoid = GetClosestCreatureWithEntry(m_creature, NPC_ANCIENT_VOID, 30.0f)) + { + float newsize = pVoid->GetFloatValue(OBJECT_FIELD_SCALE_X) + 0.25f; + uint32 health = pVoid->GetHealth() + 20000; + pVoid->SetHealth(health); + pVoid->SetFloatValue(OBJECT_FIELD_SCALE_X, newsize); + } + m_creature->ForcedDespawn(); + break; } - //Set mirror image to twisted visages - //DoInitializeVisages(); } - //Phase players, so they dont see together - void DoPhasePlayer(uint8 count, Player *pPlayer) + void UpdateAI(const uint32 uiDiff) { - if(pPlayer) - pPlayer->CastSpell(pPlayer, SPELL_INSANITY_PHASE+count, false); + } - //Spawn Visages and port them to phases - void DoSpawnTwistedVisages(Player *pPlayer, uint8 count) +}; +/*###### +## mob_ancient_void +######*/ +struct MANGOS_DLL_DECL mob_ancient_voidAI : public ScriptedAI +{ + mob_ancient_voidAI(Creature* pCreature) : ScriptedAI(pCreature) { - if(!pPlayer) - return; - if(!pPlayer->isAlive()) + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + defaultsize = m_creature->GetFloatValue(OBJECT_FIELD_SCALE_X); + Reset(); + } + + ScriptedInstance* m_pInstance; + bool m_bIsRegularMode; + uint8 m_uiPhase; + float defaultsize; + uint8 m_uiTransformPhase; + uint32 m_uiDelayTimer; + uint32 m_uiPhysicScreamTimer; + uint32 m_uiShadowBoltTimer; + uint32 m_uiOutOfCombatTimer; + float m_fVisages; + + void Reset() + { + m_fVisages = 0.0f; + m_uiDelayTimer = 1000; + m_uiOutOfCombatTimer = 20000; + m_uiPhase = 1; + m_uiTransformPhase = 1; + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_STUN); + m_creature->SetDisplayId(MODEL_VOID_LIGHT); + SetCombatMovement(false); + m_creature->SetFloatValue(OBJECT_FIELD_SCALE_X, defaultsize); + DoCast(m_creature, SPELL_PRISON); + DoCast(m_creature, SPELL_BLUE_BEAM, true); + + m_uiPhysicScreamTimer = 0; + m_uiShadowBoltTimer = 8000; + if(m_bIsRegularMode) + m_creature->SetHealth(200000); + else + m_creature->SetHealth(300000); + } + void DoTransform(uint8 phase) + { + switch(phase) + { + case 1: + m_fVisages = (m_creature->GetFloatValue(OBJECT_FIELD_SCALE_X) - 1.0f) / 0.25; + SetPhysicScreamTimer(); + DoCast(m_creature, SPELL_BLUE_FLAMES); + DoScriptText(SAY_VOID_CORRUPT, m_creature); + m_creature->RemoveAurasDueToSpell(SPELL_PRISON); + break; + case 2: + DoCast(m_creature, SPELL_RED_FLAMES); + m_creature->RemoveAurasDueToSpell(SPELL_BLUE_BEAM); + break; + case 3: + DoCast(m_creature, SPELL_SHAKE); + m_creature->SetDisplayId(MODEL_VOID_DARK); + break; + case 4: + m_creature->RemoveAurasDueToSpell(SPELL_RED_FLAMES); + break; + case 5: + DoScriptText(SAY_VOID_AGGRO, m_creature); + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + SetCombatMovement(true); + if(m_creature->getVictim()) + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + m_uiPhase = 3; + break; + } + } + void SetPhysicScreamTimer() + { + if(m_fVisages < 3) + m_uiPhysicScreamTimer = 23000; + else if(m_fVisages < 5) + m_uiPhysicScreamTimer = 17000; + else if(m_fVisages < 7) + m_uiPhysicScreamTimer = 11000; + else if(m_fVisages < 9) + m_uiPhysicScreamTimer = 5000; + } + void UpdateAI(const uint32 uiDiff) + { + if(m_uiPhase == 1) + { + if(m_uiDelayTimer <= uiDiff) + { + if(!GetClosestCreatureWithEntry(m_creature, NPC_TWISTED_VISAGE, 150.0f)) + m_uiPhase = 2; + m_uiDelayTimer = 1000; + }else m_uiDelayTimer -= uiDiff; return; - float x,y,z; - m_creature->GetPosition(x, y, z); - if(m_bIsDebugMode || count < 1) + } + if(m_uiPhase == 2) { - if(Creature *pTemp = pPlayer->SummonCreature(NPC_TWISTED_VISAGE, x, y, z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0)) + if(m_uiDelayTimer <= uiDiff) { - if(!pTemp->isAlive()) - return; + DoTransform(m_uiTransformPhase); + m_uiTransformPhase++; + m_uiDelayTimer = 2500; + }else m_uiDelayTimer -= uiDiff; + } + + if(m_uiPhase != 3) + return; + if(!m_creature->isInCombat()) + { + if(m_uiOutOfCombatTimer <= uiDiff) + m_creature->ForcedDespawn(); + else m_uiOutOfCombatTimer -= uiDiff; - pTemp->CastSpell(pTemp, SPELL_INSANITY_PHASE+1, true); - ((mob_twisted_visageAI*)pTemp->AI())->m_uiMyPhase = 1; - ((mob_twisted_visageAI*)pTemp->AI())->m_pMirrorPlayer = pPlayer; - pTemp->SetUInt32Value(UNIT_CREATED_BY_SPELL, 57500); - pTemp->SetCreatorGUID(pPlayer->GetGUID()); - pPlayer->CastSpell(pTemp, SPELL_TWISTED_VISAGE_MIRROR, true); - } return; } - for(int i = 1; i <= 5; i++) + if(m_uiPhysicScreamTimer <= uiDiff) { - if(i == count) - continue; + DoCast(m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0),SPELL_PSYCHIC_SCREAM); + SetPhysicScreamTimer(); + }else m_uiPhysicScreamTimer -= uiDiff; - if(Creature *pTemp = pPlayer->SummonCreature(NPC_TWISTED_VISAGE, x, y, z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0)) - { - if(!pTemp->isAlive()) - return; + //Shadowbolt voley + if(m_uiShadowBoltTimer <= uiDiff) + { + DoCast(m_creature, m_bIsRegularMode ? SPELL_SHADOW_BOLT : SPELL_SHADOW_BOLT_H); + m_uiShadowBoltTimer = 8000; + }else m_uiShadowBoltTimer -= uiDiff; - pTemp->CastSpell(pTemp, SPELL_INSANITY_PHASE+i, true); - ((mob_twisted_visageAI*)pTemp->AI())->m_uiMyPhase = i; - ((mob_twisted_visageAI*)pTemp->AI())->m_pMirrorPlayer = pPlayer; - pTemp->SetUInt32Value(UNIT_CREATED_BY_SPELL, 57500); - pTemp->SetCreatorGUID(pPlayer->GetGUID()); - pPlayer->CastSpell(pTemp, SPELL_TWISTED_VISAGE_MIRROR, true); - } - } + DoMeleeAttackIfReady(); } }; - CreatureAI* GetAI_boss_volazj(Creature* pCreature) { return new boss_volazjAI(pCreature); @@ -435,6 +487,10 @@ CreatureAI* GetAI_mob_twisted_visage(Creature* pCreature) { return new mob_twisted_visageAI(pCreature); } +CreatureAI* GetAI_mob_ancient_void(Creature* pCreature) +{ + return new mob_ancient_voidAI(pCreature); +} void AddSC_boss_volazj() { @@ -449,7 +505,9 @@ void AddSC_boss_volazj() newscript->Name = "mob_twisted_visage"; newscript->GetAI = &GetAI_mob_twisted_visage; newscript->RegisterSelf(); -} -/* -UPDATE creature_template SET ScriptName = "mob_twisted_visage" WHERE entry =30621; -*/ + + newscript = new Script; + newscript->Name = "mob_ancient_void"; + newscript->GetAI = &GetAI_mob_ancient_void; + newscript->RegisterSelf(); +} \ No newline at end of file diff --git a/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp index 33819d845..ef2cb1a6a 100644 --- a/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp +++ b/scripts/northrend/azjol-nerub/ahnkahet/instance_ahnkahet.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 +/* Copyright (C) 2006 - 2009 ScriptDev2 * 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 @@ -84,7 +84,7 @@ struct MANGOS_DLL_DECL instance_ahnkahet : public ScriptedInstance break; } } - + void SetData(uint32 uiType, uint32 uiData) { debug_log("SD2: Instance Ahn'Kahet: SetData received for type %u with data %u",uiType,uiData); @@ -172,10 +172,16 @@ struct MANGOS_DLL_DECL instance_ahnkahet : public ScriptedInstance { switch(uiType) { - case TYPE_TALDARAM: + case TYPE_NADOX: return m_auiEncounter[0]; - case TYPE_JEDOGA: + case TYPE_TALDARAM: return m_auiEncounter[1]; + case TYPE_JEDOGA: + return m_auiEncounter[2]; + case TYPE_VOLAZJ: + return m_auiEncounter[3]; + case TYPE_AMANITAR: + return m_auiEncounter[4]; } return 0; } diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index cb8755b41..0b80d22c8 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -275,6 +275,7 @@ extern void AddSC_boss_grand_champions(); extern void AddSC_instance_trial_of_the_champion(); extern void AddSC_boss_jedoga(); //ahnkahet +extern void AddSC_boss_amanitar(); extern void AddSC_boss_nadox(); extern void AddSC_boss_taldaram(); extern void AddSC_boss_volazj(); @@ -765,6 +766,7 @@ void AddScripts() AddSC_instance_trial_of_the_champion(); AddSC_boss_jedoga(); //ahnkahet + AddSC_boss_amanitar(); AddSC_boss_nadox(); AddSC_boss_taldaram(); AddSC_boss_volazj(); From e91b0fce08b6e19f662217356b38b577e79da628 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Tue, 29 Jun 2010 20:03:55 +0400 Subject: [PATCH 394/405] Attempt to fix GO spawn on HoR (not tested) --- .../halls_of_reflection/boss_lich_king.cpp | 3 +++ .../halls_of_reflection/halls_of_reflection.cpp | 11 ++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_lich_king.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_lich_king.cpp index 95675a17b..02098b9b7 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_lich_king.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_lich_king.cpp @@ -99,6 +99,7 @@ struct MANGOS_DLL_DECL boss_lich_king_hrAI : public npc_escortAI pLider->AddSplineFlag(SPLINEFLAG_FLYING); pLider->SendMonsterMove(pLider->GetPositionX(), pLider->GetPositionY(), pLider->GetPositionZ() + 4, SPLINETYPE_NORMAL , pLider->GetSplineFlags(), 3000); } + m_creature->SetActiveObjectState(false); break; } } @@ -278,6 +279,8 @@ struct MANGOS_DLL_DECL boss_lich_king_hrAI : public npc_escortAI if(m_creature->HasAura(SPELL_DARK_ARROW)) m_creature->RemoveAurasDueToSpell(SPELL_DARK_ARROW); + m_creature->SetActiveObjectState(true); + NonFight = true; m_creature->AttackStop(); m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE); diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.cpp index 670f8d83f..ddd982d73 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.cpp @@ -1023,19 +1023,20 @@ struct MANGOS_DLL_DECL npc_jaina_and_sylvana_HRextroAI : public npc_escortAI if (m_pInstance->GetData(DATA_LIDER) == 1) m_chestID = GO_CAPTAIN_CHEST_4; else m_chestID = GO_CAPTAIN_CHEST_3; }; - if(GameObject* pChest = m_creature->SummonGameobject(m_chestID, 5241.047f, 1663.4364f, 784.295166f, 0.54f, 0)) + if(GameObject* pChest = m_creature->SummonGameobject(m_chestID, 5241.047f, 1663.4364f, 784.295166f, 0.54f, DAY*IN_MILLISECONDS)) { - pChest->SetGoState(GO_STATE_READY); - pChest->SetRespawnTime(7*DAY); + pChest->SetPhaseMask(65535,true); } m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); DoScriptText(SAY_ESCAPE_02, m_creature); JumpNextStep(10000); break; case 13: - if(GameObject* pPortal = m_creature->SummonGameobject(GO_PORTAL, 5250.959961f, 1639.359985f, 784.302f, 0.0f, 0)) - pPortal->SetGoState(GO_STATE_READY); + if(GameObject* pPortal = m_creature->SummonGameobject(GO_PORTAL, 5250.959961f, 1639.359985f, 784.302f, 0.0f, DAY*IN_MILLISECONDS)) + { + pPortal->SetPhaseMask(65535,true); DoScriptText(SAY_ESCAPE_03, m_creature); + } JumpNextStep(20000); break; case 14: From 81ce1afffa633ce724a2675115a0586d8735c232 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Tue, 29 Jun 2010 20:33:01 +0400 Subject: [PATCH 395/405] Partially added VC9 config (from Wowka321) --- VC90/90ScriptDev2.vcproj | 58 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/VC90/90ScriptDev2.vcproj b/VC90/90ScriptDev2.vcproj index 1f1c33e4e..5620bee54 100644 --- a/VC90/90ScriptDev2.vcproj +++ b/VC90/90ScriptDev2.vcproj @@ -1649,6 +1649,10 @@ RelativePath="..\scripts\northrend\azjol-nerub\ahnkahet\ahnkahet.h" > + + @@ -2201,10 +2205,26 @@ RelativePath="..\scripts\northrend\icecrown_citadel\icecrown_citadel\boss_valithria_dreamwalker.cpp" > + + + + + + + + + + + + + + + + + + + + + + + + + + From 8e88c1a774b7d246aee52faf5e9e3b13c02f67b6 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 30 Jun 2010 13:24:06 +0400 Subject: [PATCH 396/405] Small correct Ahn'kahet sql --- addition/719_ankahet_mangos.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addition/719_ankahet_mangos.sql b/addition/719_ankahet_mangos.sql index 407cf7fe3..394d0dbe7 100644 --- a/addition/719_ankahet_mangos.sql +++ b/addition/719_ankahet_mangos.sql @@ -108,7 +108,8 @@ INSERT INTO `creature` (`id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equip (30391, 619, 2, 1, 0, 0, 350.138, -958.988, -79.4422, 2.16229, 30, 0, 0, 1, 0, 0, 0), (30391, 619, 2, 1, 0, 0, 342.879, -944.352, -79.8533, 1.64157, 30, 0, 0, 1, 0, 0, 0); -UPDATE creature_template SET `AIname`='EventAI' WHERE `entry` = 30176; +UPDATE `creature_template` SET `AIname`='EventAI' WHERE `entry` = 30176; +DELETE FROM `creature_ai_scripts` WHERE `creature_id` = 30176; INSERT INTO `creature_ai_scripts` (`id`, `creature_id`, `event_type`, `event_inverse_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action1_type`, `action1_param1`, `action1_param2`, `action1_param3`, `action2_type`, `action2_param1`, `action2_param2`, `action2_param3`, `action3_type`, `action3_param1`, `action3_param2`, `action3_param3`, `comment`) VALUES ('3017610', '30176', '11', '0', '100', '6', '0', '0', '0', '0', '11', '56151', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', ''), ('3017611', '30176', '8', '0', '100', '6', '56153', '0', '0', '0', '28', '0', '56153', '0', '0', '0', '0', '0', '0', '0', '0', '0', ''); From 168ebf9042ca9a4241e509c91e140776c487ce22 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Wed, 30 Jun 2010 17:41:37 +0400 Subject: [PATCH 397/405] Attempt to hack horde/alliance phase shift control. This patch don't fix bugs! It only replaces some bugs in other. If your not sure, don't apply! --- .../instance_trial_of_the_champion.cpp | 28 ++++++++++++++ .../instance_halls_of_reflection.cpp | 28 ++++++++++++++ .../instance_icecrown_spire.cpp | 37 ++++++++++++++++--- 3 files changed, 88 insertions(+), 5 deletions(-) diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp index c76c01d2d..487fed563 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp @@ -23,6 +23,7 @@ EndScriptData */ #include "precompiled.h" #include "trial_of_the_champion.h" +#include "World.h" struct MANGOS_DLL_DECL instance_trial_of_the_champion : public ScriptedInstance { @@ -100,6 +101,33 @@ struct MANGOS_DLL_DECL instance_trial_of_the_champion : public ScriptedInstance m_auiEncounter[i] = NOT_STARTED; } + void OnPlayerEnter(Player *pPlayer) + { + + enum PhaseControl + { + HORDE_CONTROL_PHASE_SHIFT_1 = 55773, + HORDE_CONTROL_PHASE_SHIFT_2 = 60028, + ALLIANCE_CONTROL_PHASE_SHIFT_1 = 55774, + ALLIANCE_CONTROL_PHASE_SHIFT_2 = 60027, + }; + if (!sWorld.getConfig(CONFIG_BOOL_ALLOW_TWO_SIDE_INTERACTION_GROUP)) return; + + switch (pPlayer->GetTeam()) + { + case ALLIANCE: + if (pPlayer && pPlayer->IsInWorld() && pPlayer->HasAura(HORDE_CONTROL_PHASE_SHIFT_1)) + pPlayer->RemoveAurasDueToSpell(HORDE_CONTROL_PHASE_SHIFT_1); + pPlayer->CastSpell(pPlayer, HORDE_CONTROL_PHASE_SHIFT_2, false); + break; + case HORDE: + if (pPlayer && pPlayer->IsInWorld() && pPlayer->HasAura(ALLIANCE_CONTROL_PHASE_SHIFT_1)) + pPlayer->RemoveAurasDueToSpell(ALLIANCE_CONTROL_PHASE_SHIFT_1); + pPlayer->CastSpell(pPlayer, ALLIANCE_CONTROL_PHASE_SHIFT_2, false); + break; + }; + }; + void OnCreatureCreate(Creature* pCreature) { switch(pCreature->GetEntry()) diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp index 0d22a3d2f..876002e5e 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp @@ -25,6 +25,7 @@ EndScriptData */ #include "precompiled.h" #include "def_halls.h" +#include "World.h" struct MANGOS_DLL_DECL instance_halls_of_reflection : public ScriptedInstance { @@ -101,6 +102,33 @@ struct MANGOS_DLL_DECL instance_halls_of_reflection : public ScriptedInstance } } + void OnPlayerEnter(Player *pPlayer) + { + + enum PhaseControl + { + HORDE_CONTROL_PHASE_SHIFT_1 = 55773, + HORDE_CONTROL_PHASE_SHIFT_2 = 60028, + ALLIANCE_CONTROL_PHASE_SHIFT_1 = 55774, + ALLIANCE_CONTROL_PHASE_SHIFT_2 = 60027, + }; + if (!sWorld.getConfig(CONFIG_BOOL_ALLOW_TWO_SIDE_INTERACTION_GROUP)) return; + + switch (pPlayer->GetTeam()) + { + case ALLIANCE: + if (pPlayer && pPlayer->IsInWorld() && pPlayer->HasAura(HORDE_CONTROL_PHASE_SHIFT_1)) + pPlayer->RemoveAurasDueToSpell(HORDE_CONTROL_PHASE_SHIFT_1); + pPlayer->CastSpell(pPlayer, HORDE_CONTROL_PHASE_SHIFT_2, false); + break; + case HORDE: + if (pPlayer && pPlayer->IsInWorld() && pPlayer->HasAura(ALLIANCE_CONTROL_PHASE_SHIFT_1)) + pPlayer->RemoveAurasDueToSpell(ALLIANCE_CONTROL_PHASE_SHIFT_1); + pPlayer->CastSpell(pPlayer, ALLIANCE_CONTROL_PHASE_SHIFT_2, false); + break; + }; + }; + void OnObjectCreate(GameObject* pGo) { switch(pGo->GetEntry()) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp index fd82fbbd0..aaecd0349 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp @@ -16,6 +16,7 @@ #include "precompiled.h" #include "def_spire.h" +#include "World.h" static Locations SpawnLoc[]= { @@ -200,11 +201,6 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance }; } - void OnPlayerEnter(Player *m_player) - { - OpenAllDoors(); - } - bool IsEncounterInProgress() const { for(uint8 i = 1; i < MAX_ENCOUNTERS-2 ; ++i) @@ -213,6 +209,37 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance return false; } + void OnPlayerEnter(Player *pPlayer) + { + OpenAllDoors(); + + enum PhaseControl + { + HORDE_CONTROL_PHASE_SHIFT_1 = 55773, + HORDE_CONTROL_PHASE_SHIFT_2 = 60028, + ALLIANCE_CONTROL_PHASE_SHIFT_1 = 55774, + ALLIANCE_CONTROL_PHASE_SHIFT_2 = 60027, + }; +/* + + if (!sWorld.getConfig(CONFIG_BOOL_ALLOW_TWO_SIDE_INTERACTION_GROUP)) return; + + switch (pPlayer->GetTeam()) + { + case ALLIANCE: + if (pPlayer && pPlayer->IsInWorld() && pPlayer->HasAura(HORDE_CONTROL_PHASE_SHIFT_1)) + pPlayer->RemoveAurasDueToSpell(HORDE_CONTROL_PHASE_SHIFT_1); + pPlayer->CastSpell(pPlayer, HORDE_CONTROL_PHASE_SHIFT_2, false); + break; + case HORDE: + if (pPlayer && pPlayer->IsInWorld() && pPlayer->HasAura(ALLIANCE_CONTROL_PHASE_SHIFT_1)) + pPlayer->RemoveAurasDueToSpell(ALLIANCE_CONTROL_PHASE_SHIFT_1); + pPlayer->CastSpell(pPlayer, ALLIANCE_CONTROL_PHASE_SHIFT_2, false); + break; + }; +*/ + }; + void OnCreatureCreate(Creature* pCreature) { switch(pCreature->GetEntry()) From 599d86053dbcf020572d149027d171bd24bf42ca Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 1 Jul 2010 13:11:50 +0400 Subject: [PATCH 398/405] COS correct (from PSZ) and cleanup. Need testing. --- .../culling_of_stratholme/boss_lord_epoch.cpp | 12 +- .../culling_of_stratholme/boss_malganis.cpp | 8 +- .../culling_of_stratholme/boss_meathook.cpp | 12 +- .../culling_of_stratholme/boss_salramm.cpp | 16 +- .../culling_of_stratholme.cpp | 152 ++++++++++++------ .../culling_of_stratholmeai.cpp | 93 +++++++---- .../def_culling_of_stratholme.h | 11 +- .../instance_culling_of_stratholme.cpp | 38 +++-- .../trash_culling_of_stratholme.cpp | 100 ++++++------ 9 files changed, 282 insertions(+), 160 deletions(-) diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_lord_epoch.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_lord_epoch.cpp index ec89d84f1..ebe958b80 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_lord_epoch.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_lord_epoch.cpp @@ -32,13 +32,13 @@ enum SPELL_TIME_WARP = 52766, SPELL_SPIKE_N = 52771, SPELL_SPIKE_H = 58830, - - SAY_EPOCH_DEATH = -1594119, - SAY_EPOCH_SLAY01 = -1594120, - SAY_EPOCH_SLAY02 = -1594121, + + SAY_EPOCH_DEATH = -1594119, + SAY_EPOCH_SLAY01 = -1594120, + SAY_EPOCH_SLAY02 = -1594121, SAY_EPOCH_SLAY03 = -1594122, - SAY_EPOCH_WARP01 = -1594123, - SAY_EPOCH_WARP02 = -1594124, + SAY_EPOCH_WARP01 = -1594123, + SAY_EPOCH_WARP02 = -1594124, SAY_EPOCH_WARP03 = -1594125 }; diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_malganis.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_malganis.cpp index 3fbd81475..d2e6b3ee8 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_malganis.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_malganis.cpp @@ -27,9 +27,9 @@ EndScriptData */ enum { - SAY_MALGANIS_AGGRO = -1594170, - SAY_MALGANIS_SLAY01 = -1594172, - SAY_MALGANIS_SLAY02 = -1594173, + SAY_MALGANIS_AGGRO = -1594170, + SAY_MALGANIS_SLAY01 = -1594172, + SAY_MALGANIS_SLAY02 = -1594173, SAY_MALGANIS_SLAY03 = -1594174, SAY_MALGANIS_SLAY04 = -1594175, SAY_MALGANIS_SLAY05 = -1594176, @@ -83,7 +83,7 @@ struct MANGOS_DLL_DECL boss_malganisAI : public ScriptedAI Sleep_Timer = 17300; Vampire_Timer = 30000; } - + void AttackStart(Unit* who) { if(m_pInstance->GetData(TYPE_PHASE) > 9) return; diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_meathook.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_meathook.cpp index 724d9cd21..1ef53ec52 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_meathook.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_meathook.cpp @@ -33,10 +33,10 @@ enum SPELL_EXPLODED_H = 58824, SPELL_FRENZY = 58841, - SAY_MEATHOOK_AGGRO = -1594111, - SAY_MEATHOOK_DEATH = -1594112, - SAY_MEATHOOK_SLAY01 = -1594113, - SAY_MEATHOOK_SLAY02 = -1594114, + SAY_MEATHOOK_AGGRO = -1594111, + SAY_MEATHOOK_DEATH = -1594112, + SAY_MEATHOOK_SLAY01 = -1594113, + SAY_MEATHOOK_SLAY02 = -1594114, SAY_MEATHOOK_SLAY03 = -1594115 }; @@ -63,7 +63,7 @@ struct MANGOS_DLL_DECL boss_meathookAI : public ScriptedAI Exploded_Timer = 5000; Frenzy_Timer = 22300; } - + void Aggro(Unit* who) { DoScriptText(SAY_MEATHOOK_AGGRO, m_creature); @@ -111,7 +111,7 @@ struct MANGOS_DLL_DECL boss_meathookAI : public ScriptedAI }else Exploded_Timer -= diff; if (Frenzy_Timer < diff) - { + { m_creature->InterruptNonMeleeSpells(false); DoCast(m_creature,SPELL_FRENZY); diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_salramm.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_salramm.cpp index 896f23636..94500262d 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_salramm.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_salramm.cpp @@ -27,10 +27,10 @@ EndScriptData */ enum { - SAY_SALRAMM_AGGRO = -1594130, - SAY_SALRAMM_DEATH = -1594131, - SAY_SALRAMM_SLAY01 = -1594132, - SAY_SALRAMM_SLAY02 = -1594133, + SAY_SALRAMM_AGGRO = -1594130, + SAY_SALRAMM_DEATH = -1594131, + SAY_SALRAMM_SLAY01 = -1594132, + SAY_SALRAMM_SLAY02 = -1594133, SAY_SALRAMM_SLAY03 = -1594134, SAY_SALRAMM_STEAL01 = -1594135, SAY_SALRAMM_STEAL02 = -1594136, @@ -46,7 +46,7 @@ enum SPELL_STEAL = 52708, SPELL_GNOUL_BLOW = 58825, SPELL_SUMMON_GNOUL = 52451, - + NPC_GNOUL = 27733 }; @@ -77,7 +77,7 @@ struct MANGOS_DLL_DECL boss_salrammAI : public ScriptedAI if(m_pInstance) m_pInstance->SetData64(NPC_SALRAMM, m_creature->GetGUID()); } - + void Aggro(Unit* who) { DoScriptText(SAY_SALRAMM_AGGRO, m_creature); @@ -219,7 +219,7 @@ struct MANGOS_DLL_DECL npc_salramm_gnoulAI : public ScriptedAI return; if(m_uiBlowTimer < uiDiff) - { + { if(Creature* pSalramm = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_SALRAMM))) { if(pSalramm->isDead()) return; @@ -264,4 +264,4 @@ void AddSC_boss_salramm() newscript->Name = "npc_salramm_gnoul"; newscript->GetAI = &GetAI_npc_salramm_gnoul; newscript->RegisterSelf(); -} \ No newline at end of file +} diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp index d1bb6a070..6f1dccbaf 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp @@ -129,6 +129,7 @@ struct MANGOS_DLL_DECL npc_arthasAI : public npc_escortAI m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); m_bIsHeroic = pCreature->GetMap()->IsRaidOrHeroicDungeon(); m_creature->SetActiveObjectState(true); + m_creature->SetSpeedRate(MOVE_RUN, 1); Reset(); } @@ -163,7 +164,7 @@ struct MANGOS_DLL_DECL npc_arthasAI : public npc_escortAI Creature* pEpoch; bool StartEvent; bool MoveSoldier; - + float LastX; float LastY; float LastZ; @@ -171,7 +172,9 @@ struct MANGOS_DLL_DECL npc_arthasAI : public npc_escortAI void Reset() { if(!m_pInstance) return; - + + m_creature->SetSpeedRate(MOVE_RUN, 1); + if(m_pInstance->GetData(TYPE_INTRO) == NOT_STARTED) { m_creature->setFaction(35); @@ -185,7 +188,7 @@ struct MANGOS_DLL_DECL npc_arthasAI : public npc_escortAI } void RemoveGossip() - { + { m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); } @@ -358,15 +361,15 @@ struct MANGOS_DLL_DECL npc_arthasAI : public npc_escortAI m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); SetRun(false); - break; + break; case 21: DoScriptText(SAY_PHASE502, m_creature); break; - case 22: + case 22: SetEscortPaused(true); m_pInstance->SetData(TYPE_PHASE, 6); ResetStep(1000); - break; + break; case 25: m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_READY1H); m_creature->SummonCreature(NPC_TIME_RIFT,2428.901f, 1192.164f, 148.076f, 5.09f,TEMPSUMMON_CORPSE_TIMED_DESPAWN,29000); @@ -387,21 +390,21 @@ struct MANGOS_DLL_DECL npc_arthasAI : public npc_escortAI case 31: ResetStep(1000); m_pInstance->SetData(TYPE_PHASE, 7); - break; + break; case 32: SetEscortPaused(true); m_pInstance->SetData(TYPE_PHASE, 8); m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); SetRun(false); - break; + break; case 36: DoScriptText(SAY_PHASE514, m_creature); break; case 37: if(GameObject* pGate = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(GO_SHKAF_GATE))) pGate->SetGoState(GO_STATE_ACTIVE); - SetRun(true); + SetRun(true); DoScriptText(SAY_PHASE515, m_creature); break; case 45: @@ -416,22 +419,22 @@ struct MANGOS_DLL_DECL npc_arthasAI : public npc_escortAI DoScriptText(SAY_PHASE606, m_creature); m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - break; - case 53: + break; + case 53: SetEscortPaused(true); m_creature->StopMoving(); m_creature->GetMotionMaster()->MovementExpired(false); m_creature->setFaction(FACTION); DoScriptText(SAY_PHASE605, m_creature); - if(Creature* Malganis = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_MALGANIS))) + if(Creature* Malganis = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_MALGANIS))) { m_pInstance->SetData(TYPE_MALGANIS, IN_PROGRESS); Malganis->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - m_creature->AI()->AttackStart(Malganis); + m_creature->AI()->AttackStart(Malganis); Malganis->AI()->AttackStart(m_creature); } break; - } + } } void JumpNextStep(uint32 Timer) @@ -605,7 +608,7 @@ struct MANGOS_DLL_DECL npc_arthasAI : public npc_escortAI switch(m_uiStep) { case 0: - if(Unit* Cityman = Unit::GetUnit((*m_creature), m_uiPeople01GUID)) + if(Unit* Cityman = Unit::GetUnit((*m_creature), m_uiPeople01GUID)) DoScriptText(SAY_ENTER02, Cityman); JumpNextStep(4000); break; @@ -884,6 +887,9 @@ struct MANGOS_DLL_DECL npc_arthasAI : public npc_escortAI void MalganisEvent() { + Map::PlayerList const &PlayerList = m_pInstance->instance->GetPlayers(); + bool bNeedSpawn = false; + switch(m_uiStep) { case 0: @@ -891,12 +897,12 @@ struct MANGOS_DLL_DECL npc_arthasAI : public npc_escortAI m_creature->GetMotionMaster()->MovePoint(0, 2302.326f, 1491.386f, 128.362f); if(Creature* Malganis = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_MALGANIS))) { - DoScriptText(SAY_MALGANIS_ESCAPE01, Malganis); + DoScriptText(SAY_MALGANIS_ESCAPE01, Malganis); Malganis->InterruptNonMeleeSpells(false); Malganis->GetMotionMaster()->MovePoint(0, 2296.665f,1502.362f,128.362f); m_creature->SetUInt64Value(UNIT_FIELD_TARGET, Malganis->GetGUID()); Malganis->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->GetGUID()); - } + } JumpNextStep(10000); break; case 1: @@ -930,12 +936,22 @@ struct MANGOS_DLL_DECL npc_arthasAI : public npc_escortAI case 6: m_creature->GetMotionMaster()->MovePoint(0, 2298.298f,1500.362f,128.362f); DoScriptText(SAY_ARTHAS_OUTRO03, m_creature); - if(GameObject* pChest = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(GO_MALGANIS_CHEST))) - pChest->SetUInt32Value(GAMEOBJECT_FACTION, 0); JumpNextStep(11000); break; case 7: m_creature->GetMotionMaster()->MovePoint(0, 2243.311f, 1476.025f, 132.352f); + + if (!PlayerList.isEmpty()) + for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) + if (i->getSource()->GetQuestStatus(QUEST_A_ROYAL_ESCORT) == QUEST_STATUS_INCOMPLETE || + i->getSource()->GetQuestStatus(QUEST_A_ROYAL_ESCORT) == QUEST_STATUS_COMPLETE) + { + bNeedSpawn = true; + break; + } + + if (bNeedSpawn) + m_creature->SummonCreature(30997, 2311.61f, 1497.85f, 128.01f, 4.14f, TEMPSUMMON_TIMED_DESPAWN, 1800000); JumpNextStep(11000); break; case 8: @@ -1017,11 +1033,11 @@ struct MANGOS_DLL_DECL npc_arthasAI : public npc_escortAI else m_uiStepTimer -= uiDiff; } - } //close event! - + } //close event! + if(m_pInstance->GetData(TYPE_PHASE) == 10) { - SetEscortPaused(true); + SetEscortPaused(true); ResetStep(1000); m_creature->AttackStop(); m_pInstance->SetData(TYPE_PHASE, 11); @@ -1083,11 +1099,11 @@ struct MANGOS_DLL_DECL npc_utherAI : public npc_escortAI uint32 m_uiStep; uint32 m_uiStepTimer; bool StartEvent; - + uint64 m_uiKnightGUID01; uint64 m_uiKnightGUID02; uint64 m_uiKnightGUID03; - + void Reset() { m_creature->SetVisibility(VISIBILITY_OFF); @@ -1188,10 +1204,10 @@ bool GossipHello_npc_chromi_middle(Player* pPlayer, Creature* pCreature) ScriptedInstance* pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); if(pInstance && pInstance->GetData(TYPE_INTRO) == NOT_STARTED) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_CHROMI1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_CHROMI1, pCreature->GetGUID()); - return true; + return true; } bool GossipSelect_npc_chromi_middle(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) @@ -1200,36 +1216,67 @@ bool GossipSelect_npc_chromi_middle(Player* pPlayer, Creature* pCreature, uint32 if(m_pInstance->GetData(TYPE_INTRO) != NOT_STARTED) return true; if (uiAction == GOSSIP_ACTION_INFO_DEF+1) - { + { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_CHROMI2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_CHROMI2, pCreature->GetGUID()); - } + } if (uiAction == GOSSIP_ACTION_INFO_DEF+2) - { + { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_CHROMI3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); - + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_CHROMI3, pCreature->GetGUID()); - } + } if (uiAction == GOSSIP_ACTION_INFO_DEF+3) - { - // START COUNTER HERE + { if(ScriptedInstance* m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData())) - m_pInstance->DoUpdateWorldState(WORLD_STATE_COS_CRATE_ON, 0); - - ScriptedInstance* m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); - - if(Creature *pUther = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_UTHER))) - ((npc_utherAI*)pUther->AI())->StartAI(); + { + m_pInstance->DoUpdateWorldState(WORLD_STATE_COS_CRATE_ON, 0); + m_pInstance->SetData(TYPE_INTRO, IN_PROGRESS); + if (Creature *pUther = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_UTHER))) + ((npc_utherAI*)pUther->AI())->StartAI(); + } pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_CHROMI4, pCreature->GetGUID()); - } + } return true; } +struct MANGOS_DLL_DECL npc_chromi_middleAI : public ScriptedAI +{ + npc_chromi_middleAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_creature->SetActiveObjectState(true); + m_bUtherHere = false; + Reset(); + } + + ScriptedInstance* m_pInstance; + + bool m_bUtherHere; + + void Reset() + { + m_bUtherHere = false; + } + + void MoveInLineOfSight(Unit* pWho) + { + if (!m_bUtherHere && m_pInstance && pWho && pWho->GetTypeId() == TYPEID_PLAYER && m_creature->GetDistance2d(pWho) <= 15 && ((Player*)pWho)->GetQuestStatus(QUEST_A_ROYAL_ESCORT) == QUEST_STATUS_INCOMPLETE) + { + m_pInstance->DoUpdateWorldState(WORLD_STATE_COS_CRATE_ON, 0); + m_pInstance->SetData(TYPE_INTRO, IN_PROGRESS); + if (Creature *pUther = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_UTHER))) + ((npc_utherAI*)pUther->AI())->StartAI(); + m_bUtherHere = true; + } + } +}; + /*### ## npc_arthas_dialog ###*/ @@ -1253,7 +1300,7 @@ enum bool GossipHello_npc_arthas(Player* pPlayer, Creature* pCreature) { ScriptedInstance* pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); - + if(pInstance && pInstance->GetData(TYPE_PHASE) == 0) { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ARTHAS_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); @@ -1563,6 +1610,10 @@ struct MANGOS_DLL_DECL npc_dark_conversionAI : public ScriptedAI { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); m_creature->SetActiveObjectState(true); + + if (m_pInstance && m_pInstance->GetData(TYPE_ENCOUNTER) == IN_PROGRESS) + m_creature->UpdateEntry(NPC_ZOMBIE); + Reset(); } @@ -1580,6 +1631,9 @@ uint32 m_uiStepTimer; Special = false; m_uiStep = 1; m_uiStepTimer = 5000; + + if (m_pInstance && m_pInstance->GetData(TYPE_ENCOUNTER) == IN_PROGRESS) + m_creature->UpdateEntry(NPC_ZOMBIE); } void MalganisScared(Creature* target, float horizontalSpeed, float verticalSpeed) @@ -1625,15 +1679,15 @@ uint32 m_uiStepTimer; { if(Creature* pMalganis = GetClosestCreatureWithEntry(m_creature, NPC_MALGANIS_INTRO, 20.0f)) { - if(Special == false) - { + if(Special == false) + { float Dist = m_creature->GetDistance2d(pMalganis->GetPositionX(), pMalganis->GetPositionY()); Dist = Dist + 2.0f; MalganisScared(pMalganis, Dist, 1.0f); m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_COWER); m_uiStepTimer = 5000; Special = true; - } + } } if(m_uiStepTimer < uiDiff && Conversion != true) @@ -1649,11 +1703,16 @@ uint32 m_uiStepTimer; } DoMeleeAttackIfReady(); - + return; } }; +CreatureAI* GetAI_npc_chromi_middle(Creature* pCreature) +{ + return new npc_chromi_middleAI(pCreature); +} + CreatureAI* GetAI_npc_uther(Creature* pCreature) { return new npc_utherAI(pCreature); @@ -1687,6 +1746,7 @@ void AddSC_culling_of_stratholme() newscript->Name = "npc_chromi_middle"; newscript->pGossipHello = &GossipHello_npc_chromi_middle; newscript->pGossipSelect = &GossipSelect_npc_chromi_middle; + newscript->GetAI = &GetAI_npc_chromi_middle; newscript->RegisterSelf(); newscript = new Script; @@ -1715,4 +1775,4 @@ void AddSC_culling_of_stratholme() newscript->Name = "npc_dark_conversion"; newscript->GetAI = &GetAI_npc_dark_conversion; newscript->RegisterSelf(); -} \ No newline at end of file +} diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholmeai.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholmeai.cpp index fc4e055de..2ad3484dc 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholmeai.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholmeai.cpp @@ -37,8 +37,6 @@ EndScriptData */ enum { - QUEST_ILLUSION = 13149, - ITEM_ENTRY_ARCANE_DISRUPTOR = 37888, GOSSIP_TEXTID_CHROMI1 = 12939, GOSSIP_TEXTID_CHROMI2 = 12949, GOSSIP_TEXTID_CHROMI3 = 12950, @@ -50,12 +48,10 @@ bool GossipHello_npc_chromi_start(Player* pPlayer, Creature* pCreature) if(pCreature->isQuestGiver()) pPlayer->PrepareQuestMenu(pCreature->GetGUID()); - if(pPlayer->GetQuestStatus(QUEST_ILLUSION) == QUEST_STATUS_INCOMPLETE) return true; + ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + if (pPlayer && pPlayer->GetQuestStatus(QUEST_DISPELLING_ILLUSIONS) == QUEST_STATUS_COMPLETE && pInstance && pInstance->GetData(TYPE_QUEST) == NOT_STARTED) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_CHROMI1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - if(ScriptedInstance* m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData())) - if(m_pInstance->GetData(TYPE_QUEST) != DONE && !pPlayer->HasItemCount(ITEM_ENTRY_ARCANE_DISRUPTOR,1)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_CHROMI1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_CHROMI1, pCreature->GetGUID()); return true; @@ -64,33 +60,68 @@ bool GossipHello_npc_chromi_start(Player* pPlayer, Creature* pCreature) bool GossipSelect_npc_chromi_start(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_INFO_DEF+1) - { + { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_CHROMI2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_CHROMI2, pCreature->GetGUID()); - } + } if (uiAction == GOSSIP_ACTION_INFO_DEF+2) - { + { pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_CHROMI3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); - + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_CHROMI3, pCreature->GetGUID()); - } + } if (uiAction == GOSSIP_ACTION_INFO_DEF+3) - { + { // START COUNTER HERE - if(ScriptedInstance* m_pInstance = ((ScriptedInstance*)pCreature->GetInstanceData())) - m_pInstance->DoUpdateWorldState(WORLD_STATE_COS_CRATE_ON, 1); - if (Item* pItem = pPlayer->StoreNewItemInInventorySlot(ITEM_ENTRY_ARCANE_DISRUPTOR, 1)) - pPlayer->SendNewItem(pItem, 1, true, false); - + if (ScriptedInstance* pInstance = (ScriptedInstance*)pCreature->GetInstanceData()) + { + pInstance->DoUpdateWorldState(WORLD_STATE_COS_CRATE_ON, 1); + pInstance->SetData(TYPE_QUEST, IN_PROGRESS); + } + + if (pPlayer) + if (Item* pItem = pPlayer->StoreNewItemInInventorySlot(ITEM_ARCANE_DISRUPTOR, 1)) + pPlayer->SendNewItem(pItem, 1, true, false); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_CHROMI4, pCreature->GetGUID()); - } + } - return true; + return true; } +struct MANGOS_DLL_DECL npc_chromi_startAI : public ScriptedAI +{ + npc_chromi_startAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_creature->SetActiveObjectState(true); + m_bCounterHere = false; + Reset(); + } + + ScriptedInstance* m_pInstance; + + bool m_bCounterHere; + + void Reset() + { + m_bCounterHere = false; + } + + void MoveInLineOfSight(Unit* pWho) + { + if (!m_bCounterHere && m_pInstance && pWho && pWho->GetTypeId() == TYPEID_PLAYER && m_creature->GetDistance2d(pWho) <= 15 && ((Player*)pWho)->GetQuestStatus(QUEST_DISPELLING_ILLUSIONS) == QUEST_STATUS_INCOMPLETE) + { + m_pInstance->DoUpdateWorldState(WORLD_STATE_COS_CRATE_ON, 1); + m_pInstance->SetData(TYPE_QUEST, IN_PROGRESS); + m_bCounterHere = true; + } + } +}; + /*### ## npc_mike ###*/ @@ -130,8 +161,8 @@ struct MANGOS_DLL_DECL npc_mikeAI : public ScriptedAI uint32 m_uiStepTimer; uint32 m_uiPhase; - uint64 m_uiForesterGUID; - uint64 m_uiJamesGUID; + uint64 m_uiForesterGUID; + uint64 m_uiJamesGUID; uint64 m_uiSiabiGUID; uint64 m_uiCorricksGUID; uint64 m_uiGryanGUID; @@ -719,7 +750,7 @@ struct MANGOS_DLL_DECL npc_jenaAI : public ScriptedAI break; } } - + void MoveToPoint(Creature* unit, float X, float Y, float Z, uint32 Timer) { unit->GetMap()->CreatureRelocation(unit, X, Y, Z, unit->GetOrientation()); @@ -910,7 +941,7 @@ struct MANGOS_DLL_DECL npc_malcolmAI : public ScriptedAI break; } } - + void MoveToPoint(Creature* unit, float X, float Y, float Z, uint32 Timer) { unit->GetMap()->CreatureRelocation(unit, X, Y, Z, unit->GetOrientation()); @@ -1041,7 +1072,7 @@ struct MANGOS_DLL_DECL npc_bartleby_csAI : public ScriptedAI break; } } - + void SpeechEvent() { switch(m_uiStep) @@ -1107,7 +1138,7 @@ struct MANGOS_DLL_DECL npc_stratholme_cratesAI : public ScriptedAI m_creature->SetActiveObjectState(true); Reset(); } - + ScriptedInstance* m_pInstance; bool Active; @@ -1121,9 +1152,9 @@ struct MANGOS_DLL_DECL npc_stratholme_cratesAI : public ScriptedAI if(!m_pInstance) return; if(m_creature->HasAura(SPELL_LIGHT) && Active != true) - { + { if(Creature* pRoger = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_ROGER))) - { + { if(m_creature->GetDistance2d(pRoger->GetPositionX(), pRoger->GetPositionY()) < 50.0f) { ((npc_rogerAI*)pRoger->AI())->StartRoger(); @@ -1173,6 +1204,11 @@ struct MANGOS_DLL_DECL npc_stratholme_cratesAI : public ScriptedAI } }; +CreatureAI* GetAI_npc_chromi_start(Creature* pCreature) +{ + return new npc_chromi_startAI(pCreature); +} + CreatureAI* GetAI_npc_mike(Creature* pCreature) { return new npc_mikeAI(pCreature); @@ -1216,6 +1252,7 @@ void AddSC_culling_of_stratholmeAI() newscript->Name = "npc_chromi_start"; newscript->pGossipHello = &GossipHello_npc_chromi_start; newscript->pGossipSelect = &GossipSelect_npc_chromi_start; + newscript->GetAI = &GetAI_npc_chromi_start; newscript->RegisterSelf(); newscript = new Script; diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/def_culling_of_stratholme.h b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/def_culling_of_stratholme.h index 3a1c08ed6..8527aa5b7 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/def_culling_of_stratholme.h +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/def_culling_of_stratholme.h @@ -23,7 +23,7 @@ SDCategory: Culling of Stratholme EndScriptData */ #ifndef DEF_CULLING_OF_STRATHOLME_H -#define DEF_CULLING_OF_STRATHOLME_H +#define DEF_CULLING_OF_STRATHOLME_H enum Data { @@ -39,6 +39,10 @@ enum Data DATA_TEMPSUMMON = 10, + QUEST_DISPELLING_ILLUSIONS = 13149, + QUEST_A_ROYAL_ESCORT = 13151, + ITEM_ARCANE_DISRUPTOR = 37888, + NPC_CHROMI01 = 26527, NPC_CHROMI02 = 27915, NPC_ARTHAS = 26499, @@ -86,9 +90,10 @@ enum Data GO_CRATE_LIGHT = 190117, GO_SHKAF_GATE = 188686, - GO_MALGANIS_GATE1 = 187711, - GO_MALGANIS_GATE2 = 187723, + GO_MALGANIS_GATE1 = 187711, + GO_MALGANIS_GATE2 = 187723, GO_MALGANIS_CHEST = 190663, + GO_MALGANIS_CHEST_H = 193597, GO_EXIT = 191788, diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp index d1b08ee58..33eaab622 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp @@ -119,6 +119,14 @@ struct MANGOS_DLL_DECL instance_culling_of_stratholme : public ScriptedInstance pCreature->SetActiveObjectState(true); m_uiChromi01GUID = pCreature->GetGUID(); break; + case NPC_CHROMI02: + pCreature->SetActiveObjectState(true); + m_uiChromi02GUID = pCreature->GetGUID(); + if (m_auiEncounter[0] == DONE) + pCreature->SetVisibility(VISIBILITY_ON); + else + pCreature->SetVisibility(VISIBILITY_OFF); + break; case NPC_MIKE: m_uiMikeGUID = pCreature->GetGUID(); break; @@ -202,11 +210,8 @@ struct MANGOS_DLL_DECL instance_culling_of_stratholme : public ScriptedInstance if (pGo->GetEntry() == GO_MALGANIS_GATE2) m_uiMalGate2GUID = pGo->GetGUID(); - if (pGo->GetEntry() == GO_MALGANIS_CHEST) - { + if (pGo->GetEntry() == GO_MALGANIS_CHEST || pGo->GetEntry() == GO_MALGANIS_CHEST_H) m_uiMalChestGUID = pGo->GetGUID(); - pGo->SetUInt32Value(GAMEOBJECT_FACTION, 1375); - } if (pGo->GetEntry() == GO_EXIT) m_uiExitGUID = pGo->GetGUID(); @@ -220,11 +225,18 @@ struct MANGOS_DLL_DECL instance_culling_of_stratholme : public ScriptedInstance if (PlayerList.isEmpty()) return; - for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) + if (Creature* pChromi = instance->GetCreature(m_uiChromi01GUID)) { - if(Creature* pChromi = instance->GetCreature(m_uiChromi01GUID)) - pChromi->MonsterWhisper("Good work with crates! Come to me in front of Stratholme for your next assighment!", i->getSource()->GetGUID(), false); - } + for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) + { + pChromi->MonsterWhisper("Good work with crates! Come to me in front of Stratholme for your next assignment!", i->getSource()->GetGUID(), false); + i->getSource()->KilledMonsterCredit(30996, pChromi->GetGUID()); + i->getSource()->DestroyItemCount(ITEM_ARCANE_DISRUPTOR, 1, true); + } + pChromi->SetVisibility(VISIBILITY_OFF); + } + if (Creature* pChromi2 = instance->GetCreature(m_uiChromi02GUID)) + pChromi2->SetVisibility(VISIBILITY_ON); } void SetData(uint32 uiType, uint32 uiData) @@ -267,6 +279,14 @@ struct MANGOS_DLL_DECL instance_culling_of_stratholme : public ScriptedInstance break; case TYPE_MALGANIS: m_auiEncounter[6] = uiData; + if (uiData == DONE) + { + DoRespawnGameObject(m_uiMalChestGUID, 30*MINUTE); + if (GameObject* pGo = instance->GetGameObject(m_uiMalChestGUID)) + pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); + if (Creature* pChromi2 = instance->GetCreature(m_uiChromi02GUID)) + pChromi2->SetVisibility(VISIBILITY_OFF); + } break; } } @@ -305,7 +325,7 @@ struct MANGOS_DLL_DECL instance_culling_of_stratholme : public ScriptedInstance } return 0; } - + uint64 GetData64(uint32 uiData) { switch(uiData) diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/trash_culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/trash_culling_of_stratholme.cpp index f3c7b20f5..8625dd56d 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/trash_culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/trash_culling_of_stratholme.cpp @@ -52,8 +52,8 @@ struct MANGOS_DLL_DECL npc_cs_gnoulAI : public ScriptedAI uint32 WaypointId; uint32 MoveTimer; - void Reset() - { + void Reset() + { m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); MoveTimer = (urand(100, 5000)); m_uiFleshTimer = (urand(3000, 10000)); @@ -140,25 +140,25 @@ struct MANGOS_DLL_DECL npc_cs_gnoulAI : public ScriptedAI case 1: MoveToPoint(2356.659f, 1185.501f, 130.636f); JumpNextStep(10000); - break; + break; case 2: - MoveToPoint(2301.735f, 1179.265f, 136.944f); + MoveToPoint(2301.735f, 1179.265f, 136.944f); JumpNextStep(8000); - break; + break; case 3: - MoveToPoint(2234.787f, 1180.638f, 136.344f); + MoveToPoint(2234.787f, 1180.638f, 136.344f); JumpNextStep(9000); - break; + break; case 4: - MoveToPoint(2178.313f, 1244.350f, 136.107f); + MoveToPoint(2178.313f, 1244.350f, 136.107f); JumpNextStep(12000); break; case 5: - MoveToPoint(2163.553f, 1277.814f, 133.444f); + MoveToPoint(2163.553f, 1277.814f, 133.444f); JumpNextStep(5000); break; case 6: - MoveToPoint(2083.952f, 1287.716f, 141.146f); + MoveToPoint(2083.952f, 1287.716f, 141.146f); JumpNextStep(5000); break; } @@ -190,7 +190,7 @@ struct MANGOS_DLL_DECL npc_cs_gnoulAI : public ScriptedAI return; if(m_uiFleshTimer < uiDiff) - { + { DoCast(m_creature->getVictim(), SPELL_FLESH); m_uiFleshTimer = (urand(3000, 10000)); } @@ -245,7 +245,7 @@ struct MANGOS_DLL_DECL npc_cs_necromancerAI : public ScriptedAI void Aggro(Unit* pWho) { m_creature->GetMotionMaster()->MovementExpired(false); - m_creature->StopMoving(); + m_creature->StopMoving(); } void MoveToPoint(float X, float Y, float Z) @@ -319,7 +319,7 @@ struct MANGOS_DLL_DECL npc_cs_necromancerAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim() && m_creature->isTemporarySummon()) { if(MoveTimer < uiDiff) - { + { if(m_pInstance->GetData(TYPE_WING) == RIGHT) { switch(WaypointId) @@ -329,23 +329,23 @@ struct MANGOS_DLL_DECL npc_cs_necromancerAI : public ScriptedAI JumpNextStep(10000); break; case 2: - MoveToPoint(2301.735f, 1179.265f, 136.944f); + MoveToPoint(2301.735f, 1179.265f, 136.944f); JumpNextStep(8000); break; case 3: - MoveToPoint(2234.787f, 1180.638f, 136.344f); + MoveToPoint(2234.787f, 1180.638f, 136.344f); JumpNextStep(9000); break; case 4: - MoveToPoint(2178.313f, 1244.350f, 136.107f); + MoveToPoint(2178.313f, 1244.350f, 136.107f); JumpNextStep(12000); break; case 5: - MoveToPoint(2163.553f, 1277.814f, 133.444f); + MoveToPoint(2163.553f, 1277.814f, 133.444f); JumpNextStep(5000); break; case 6: - MoveToPoint(2083.952f, 1287.716f, 141.146f); + MoveToPoint(2083.952f, 1287.716f, 141.146f); JumpNextStep(5000); break; } @@ -377,14 +377,14 @@ struct MANGOS_DLL_DECL npc_cs_necromancerAI : public ScriptedAI return; if(m_uiShadowBoltTimer < uiDiff) - { + { DoCast(m_creature->getVictim(), SPELL_SHADOW_BOLT); m_uiShadowBoltTimer = (urand(3000, 5000)); } else m_uiShadowBoltTimer -= uiDiff; if(m_uiCourseTimer < uiDiff) - { + { m_creature->InterruptNonMeleeSpells(false); if(Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) DoCast(target, SPELL_COURSE); @@ -519,23 +519,23 @@ struct MANGOS_DLL_DECL npc_cs_fieldAI : public ScriptedAI JumpNextStep(10000); break; case 2: - MoveToPoint(2301.735f, 1179.265f, 136.944f); + MoveToPoint(2301.735f, 1179.265f, 136.944f); JumpNextStep(8000); break; case 3: - MoveToPoint(2234.787f, 1180.638f, 136.344f); + MoveToPoint(2234.787f, 1180.638f, 136.344f); JumpNextStep(9000); break; case 4: - MoveToPoint(2178.313f, 1244.350f, 136.107f); + MoveToPoint(2178.313f, 1244.350f, 136.107f); JumpNextStep(12000); break; case 5: - MoveToPoint(2163.553f, 1277.814f, 133.444f); + MoveToPoint(2163.553f, 1277.814f, 133.444f); JumpNextStep(5000); break; case 6: - MoveToPoint(2083.952f, 1287.716f, 141.146f); + MoveToPoint(2083.952f, 1287.716f, 141.146f); JumpNextStep(5000); break; } @@ -550,11 +550,11 @@ struct MANGOS_DLL_DECL npc_cs_fieldAI : public ScriptedAI JumpNextStep(10000); break; case 2: - MoveToPoint(2165.351f, 1279.156f, 133.388f); + MoveToPoint(2165.351f, 1279.156f, 133.388f); JumpNextStep(8000); break; case 3: - MoveToPoint(2083.952f, 1287.716f, 141.146f); + MoveToPoint(2083.952f, 1287.716f, 141.146f); JumpNextStep(9000); break; } @@ -567,7 +567,7 @@ struct MANGOS_DLL_DECL npc_cs_fieldAI : public ScriptedAI return; if(m_uiScarabTimer < uiDiff) - { + { if(Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) DoCast(target, SPELL_SCARAB); m_uiScarabTimer = (urand(3000, 5000)); @@ -575,7 +575,7 @@ struct MANGOS_DLL_DECL npc_cs_fieldAI : public ScriptedAI else m_uiScarabTimer -= uiDiff; if(m_uiBlowTimer < uiDiff) - { + { m_creature->InterruptNonMeleeSpells(false); if(Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) DoCast(target, SPELL_BLOW); @@ -643,7 +643,7 @@ struct MANGOS_DLL_DECL npc_cs_acolyteAI : public ScriptedAI void Aggro(Unit* pWho) { m_creature->GetMotionMaster()->MovementExpired(false); - m_creature->StopMoving(); + m_creature->StopMoving(); } void AttackStart(Unit* pWho) @@ -713,7 +713,7 @@ struct MANGOS_DLL_DECL npc_cs_acolyteAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim() && m_creature->isTemporarySummon()) { if(MoveTimer < uiDiff) - { + { if(m_pInstance->GetData(TYPE_WING) == RIGHT) { switch(WaypointId) @@ -723,23 +723,23 @@ struct MANGOS_DLL_DECL npc_cs_acolyteAI : public ScriptedAI JumpNextStep(10000); break; case 2: - MoveToPoint(2301.735f, 1179.265f, 136.944f); + MoveToPoint(2301.735f, 1179.265f, 136.944f); JumpNextStep(8000); break; case 3: - MoveToPoint(2234.787f, 1180.638f, 136.344f); + MoveToPoint(2234.787f, 1180.638f, 136.344f); JumpNextStep(9000); break; case 4: - MoveToPoint(2178.313f, 1244.350f, 136.107f); + MoveToPoint(2178.313f, 1244.350f, 136.107f); JumpNextStep(12000); break; case 5: - MoveToPoint(2163.553f, 1277.814f, 133.444f); + MoveToPoint(2163.553f, 1277.814f, 133.444f); JumpNextStep(5000); break; case 6: - MoveToPoint(2083.952f, 1287.716f, 141.146f); + MoveToPoint(2083.952f, 1287.716f, 141.146f); JumpNextStep(5000); break; } @@ -754,11 +754,11 @@ struct MANGOS_DLL_DECL npc_cs_acolyteAI : public ScriptedAI JumpNextStep(10000); break; case 2: - MoveToPoint(2165.351f, 1279.156f, 133.388f); + MoveToPoint(2165.351f, 1279.156f, 133.388f); JumpNextStep(8000); break; case 3: - MoveToPoint(2083.952f, 1287.716f, 141.146f); + MoveToPoint(2083.952f, 1287.716f, 141.146f); JumpNextStep(9000); break; } @@ -771,14 +771,14 @@ struct MANGOS_DLL_DECL npc_cs_acolyteAI : public ScriptedAI return; if(m_uiShadowTimer < uiDiff) - { + { DoCast(m_creature->getVictim(), SPELL_SHADOW); m_uiShadowTimer = (urand(3000, 8000)); } else m_uiShadowTimer -= uiDiff; if(m_uiCourseTimer < uiDiff) - { + { if(Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) DoCast(target, SPELL_COURSEA); m_uiCourseTimer = (urand(7000, 13000)); @@ -786,7 +786,7 @@ struct MANGOS_DLL_DECL npc_cs_acolyteAI : public ScriptedAI else m_uiCourseTimer -= uiDiff; if(m_uiColdTimer < uiDiff) - { + { if(Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) DoCast(target, SPELL_COLD); m_uiColdTimer = (urand(13000, 17000)); @@ -794,7 +794,7 @@ struct MANGOS_DLL_DECL npc_cs_acolyteAI : public ScriptedAI else m_uiColdTimer -= uiDiff; if(m_uiFireTimer < uiDiff) - { + { if(Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) DoCast(target, SPELL_FIRE); m_uiFireTimer = (urand(6000, 11000)); @@ -912,7 +912,7 @@ struct MANGOS_DLL_DECL npc_cs_butcherAI : public ScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim() && m_creature->isTemporarySummon()) { if(MoveTimer < uiDiff) - { + { if(m_pInstance->GetData(TYPE_WING) == RIGHT) { switch(WaypointId) @@ -922,23 +922,23 @@ struct MANGOS_DLL_DECL npc_cs_butcherAI : public ScriptedAI JumpNextStep(10000); break; case 2: - MoveToPoint(2301.735f, 1179.265f, 136.944f); + MoveToPoint(2301.735f, 1179.265f, 136.944f); JumpNextStep(8000); break; case 3: - MoveToPoint(2234.787f, 1180.638f, 136.344f); + MoveToPoint(2234.787f, 1180.638f, 136.344f); JumpNextStep(9000); break; case 4: - MoveToPoint(2178.313f, 1244.350f, 136.107f); + MoveToPoint(2178.313f, 1244.350f, 136.107f); JumpNextStep(12000); break; case 5: - MoveToPoint(2163.553f, 1277.814f, 133.444f); + MoveToPoint(2163.553f, 1277.814f, 133.444f); JumpNextStep(5000); break; case 6: - MoveToPoint(2083.952f, 1287.716f, 141.146f); + MoveToPoint(2083.952f, 1287.716f, 141.146f); JumpNextStep(5000); break; } @@ -953,11 +953,11 @@ struct MANGOS_DLL_DECL npc_cs_butcherAI : public ScriptedAI JumpNextStep(10000); break; case 2: - MoveToPoint(2165.351f, 1279.156f, 133.388f); + MoveToPoint(2165.351f, 1279.156f, 133.388f); JumpNextStep(8000); break; case 3: - MoveToPoint(2083.952f, 1287.716f, 141.146f); + MoveToPoint(2083.952f, 1287.716f, 141.146f); JumpNextStep(9000); break; } From f417d1bc86c27f627a00d2863bbd3d78043176a6 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 1 Jul 2010 21:07:41 +0400 Subject: [PATCH 399/405] BSW small correct --- include/sc_boss_spell_worker.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index 8574c5732..5ed69c405 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -281,6 +281,7 @@ CanCastResult BossSpellWorker::_BSWSpellSelector(uint8 m_uiSpellIdx, Unit* pTarg if ( pSpell->LocData.x < 1 ) pTarget = SelectRandomPlayer(); else pTarget = SelectRandomPlayerAtRange((float)pSpell->LocData.x); if (pTarget && pTarget->IsInMap(boss)) return _BSWCastOnTarget(pTarget, m_uiSpellIdx); + else return CAST_FAIL_OTHER; break; default: @@ -330,9 +331,10 @@ uint8 BossSpellWorker::_auraCount(uint8 m_uiSpellIdx, Unit* pTarget, SpellEffect SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; - if (pTarget->GetAura(pSpell->m_uiSpellEntry[currentDifficulty], index)->GetStackAmount() > 0) - return pTarget->GetAura(pSpell->m_uiSpellEntry[currentDifficulty], index)->GetStackAmount(); - else return 0; + if (Aura* aura = pTarget->GetAura(pSpell->m_uiSpellEntry[currentDifficulty], index)) + if (aura->GetStackAmount() > 0) + return aura->GetStackAmount(); + return 0; }; From c788b4f50ae4b4d980aeedaaf8ec759533e62294 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Thu, 1 Jul 2010 21:33:41 +0400 Subject: [PATCH 400/405] ICC changes (by bugreports) --- .../icecrown_citadel/boss_proffesor_putricide.cpp | 1 + .../icecrown_citadel/boss_valithria_dreamwalker.cpp | 3 +++ 2 files changed, 4 insertions(+) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp index 581f7ba80..d241fe30b 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp @@ -91,6 +91,7 @@ struct MANGOS_DLL_DECL boss_proffesor_putricideAI : public ScriptedAI intro = false; UpdateTimer = 1000; bsw->resetTimers(); + m_creature->SetRespawnDelay(7*DAY); } void MoveInLineOfSight(Unit* pWho) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp index fb9e9a9d9..708f4f64d 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp @@ -247,6 +247,9 @@ struct MANGOS_DLL_DECL boss_valithria_dreamwalkerAI : public ScriptedAI if(!pInstance || !summoned || !battlestarted) return; if ( summoned->GetEntry() != NPC_NIGHTMARE_PORTAL ) { + m_creature->SetInCombatWithZone(); + m_creature->SetInCombatWith(summoned); + summoned->SetInCombatWith(m_creature); summoned->AddThreat(m_creature, 100.0f); summoned->GetMotionMaster()->MoveChase(m_creature); } From 589875df2e2ce379f2f52a0f1116a411bca49fe0 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Fri, 2 Jul 2010 12:48:54 +0400 Subject: [PATCH 401/405] Pit of saron initial commit --- Makefile.am | 2 + addition/723_icecrown_down_mangos.sql | 3 + .../pit_of_saron/boss_forgemaster_gafrost.cpp | 6 +- .../boss_scourgelord_tyrannus.cpp | 42 +++++++++- .../frozen_halls/pit_of_saron/def_pit.h | 17 +++- .../pit_of_saron/instance_pit_of_saron.cpp | 29 ++++--- .../pit_of_saron/pit_of_saron.cpp | 80 +++++++++++++++++++ system/ScriptLoader.cpp | 2 + 8 files changed, 163 insertions(+), 18 deletions(-) create mode 100644 scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp diff --git a/Makefile.am b/Makefile.am index 88c12c7d5..77a84ee41 100644 --- a/Makefile.am +++ b/Makefile.am @@ -346,7 +346,9 @@ scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_ scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp \ scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.cpp \ scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/trash_forge_of_souls.cpp \ +scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/def_pit.h \ scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp \ +scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp \ scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_gafrost.cpp \ scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp \ scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp \ diff --git a/addition/723_icecrown_down_mangos.sql b/addition/723_icecrown_down_mangos.sql index e0b4b1674..29cfb9f6d 100644 --- a/addition/723_icecrown_down_mangos.sql +++ b/addition/723_icecrown_down_mangos.sql @@ -33,6 +33,9 @@ UPDATE `creature_template` SET `equipment_id`='1290' where `entry` IN (36990, 37 -- UPDATE `creature_template` SET `ScriptName`='mob_exploding_orb', `AIName` ='' WHERE `entry`=36610; -- UPDATE `creature_template` SET `ScriptName`='boss_forgemaster_garfrost', `AIName` ='' WHERE `entry`=36494; -- UPDATE `creature_template` SET `ScriptName`='boss_scourgelord_tyrannus', `AIName` ='' WHERE `entry`=36658; +-- UPDATE `creature_template` SET `ScriptName`='mob_rimefang_pos', `AIName` ='' WHERE `entry`=36661; +-- UPDATE `creature_template` SET `ScriptName`='npc_jaina_or_sylvanas_POSintro', `AIName` ='' WHERE `entry` IN (36990,36993); +-- UPDATE `creature_template` SET `ScriptName`='npc_jaina_or_sylvanas_POSoutro', `AIName` ='' WHERE `entry` IN (38189,38188); -- Halls of reflection UPDATE `instance_template` SET `script` = 'instance_halls_of_reflection' WHERE map=668; diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_gafrost.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_gafrost.cpp index b2f10aab1..9f56fccfe 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_gafrost.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_gafrost.cpp @@ -15,9 +15,9 @@ */ /* ScriptData -SDName: boss_forgemaster_garfrost +SDName: boss_forgemaster_gafrost SD%Complete: 0% -SDComment: by ..., modified by /dev/rsa +SDComment: by /dev/rsa SDCategory: Pit of Saron EndScriptData */ @@ -38,11 +38,9 @@ struct MANGOS_DLL_DECL boss_forgemaster_gafrostAI : public ScriptedAI boss_forgemaster_gafrostAI(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Regular = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - bool Regular; ScriptedInstance *pInstance; void Reset() diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp index 15cf84633..c7f29402c 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp @@ -39,11 +39,9 @@ struct MANGOS_DLL_DECL boss_scourgelord_tyrannusAI : public ScriptedAI boss_scourgelord_tyrannusAI(Creature* pCreature) : ScriptedAI(pCreature) { pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Regular = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - bool Regular; ScriptedInstance *pInstance; void Reset() @@ -70,12 +68,48 @@ struct MANGOS_DLL_DECL boss_scourgelord_tyrannusAI : public ScriptedAI } }; +struct MANGOS_DLL_DECL mob_rimefang_posAI : public ScriptedAI +{ + mob_rimefang_posAI(Creature* pCreature) : ScriptedAI(pCreature) + { + pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance *pInstance; + + void Reset() + { + } + + void Aggro(Unit *who) + { + } + + void JustDied(Unit *killer) + { + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + DoMeleeAttackIfReady(); + } +}; + CreatureAI* GetAI_boss_scourgelord_tyrannus(Creature* pCreature) { return new boss_scourgelord_tyrannusAI(pCreature); } +CreatureAI* GetAI_mob_rimefang_pos(Creature* pCreature) +{ + return new mob_rimefang_posAI(pCreature); +} + void AddSC_boss_scourgelord_tyrannus() { @@ -85,4 +119,8 @@ void AddSC_boss_scourgelord_tyrannus() newscript->GetAI = &GetAI_boss_scourgelord_tyrannus; newscript->RegisterSelf(); + newscript = new Script; + newscript->Name="mob_rimefang_pos"; + newscript->GetAI = &GetAI_mob_rimefang_pos; + newscript->RegisterSelf(); } diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/def_pit.h b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/def_pit.h index 3451f2807..f35a22c6b 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/def_pit.h +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/def_pit.h @@ -4,7 +4,7 @@ enum { - MAX_ENCOUNTERS = 4, + MAX_ENCOUNTERS = 3, TYPE_GAFROST = 0, TYPE_KRICK = 1, @@ -15,6 +15,21 @@ enum NPC_KRICK = 36477, NPC_ICK = 36476, NPC_TYRANNUS = 36658, + NPC_RIMEFANG = 36661, + + + NPC_SYLVANAS_PART1 = 36990, + NPC_SYLVANAS_PART2 = 38189, + NPC_JAINA_PART1 = 36993, + NPC_JAINA_PART2 = 38188, + NPC_KILARA = 37583, + NPC_ELANDRA = 37774, + NPC_KORALEN = 37779, + NPC_KORLAEN = 37582, + NPC_CHAMPION_1_HORDE = 37584, + NPC_CHAMPION_2_HORDE = 37587, + NPC_CHAMPION_1_ALLIANCE = 37496, + NPC_CHAMPION_2_ALLIANCE = 37497, }; diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp index 0a13f5857..2ceff5f2f 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp @@ -35,6 +35,7 @@ struct MANGOS_DLL_DECL instance_pit_of_saron : public ScriptedInstance uint64 m_uiKrickGUID; uint64 m_uiIckGUID; uint64 m_uiTirannusGUID; + uint64 m_uiRimefangGUID; void OpenDoor(uint64 guid) { @@ -54,10 +55,14 @@ struct MANGOS_DLL_DECL instance_pit_of_saron : public ScriptedInstance { for (uint8 i = 0; i < MAX_ENCOUNTERS; ++i) m_auiEncounter[i] = NOT_STARTED; - m_uiGafrostGUID =0; - m_uiKrickGUID =0; - m_uiIckGUID =0; - m_uiTirannusGUID =0; + } + + bool IsEncounterInProgress() const + { + for (uint8 i = 0; i < MAX_ENCOUNTERS; ++i) + if (m_auiEncounter[i] == IN_PROGRESS) + return true; + return false; } void OnCreatureCreate(Creature* pCreature) @@ -68,6 +73,7 @@ struct MANGOS_DLL_DECL instance_pit_of_saron : public ScriptedInstance case NPC_KRICK: m_uiKrickGUID = pCreature->GetGUID(); break; case NPC_ICK: m_uiIckGUID = pCreature->GetGUID(); break; case NPC_TYRANNUS: m_uiTirannusGUID = pCreature->GetGUID(); break; + case NPC_RIMEFANG: m_uiRimefangGUID = pCreature->GetGUID(); break; } } @@ -81,9 +87,9 @@ struct MANGOS_DLL_DECL instance_pit_of_saron : public ScriptedInstance { switch(uiType) { - case TYPE_GAFROST: m_auiEncounter[0] = uiData; break; - case TYPE_KRICK: m_auiEncounter[1] = uiData; break; - case TYPE_ICK: m_auiEncounter[2] = uiData; break; + case TYPE_GAFROST: m_auiEncounter[0] = uiData; break; + case TYPE_KRICK: m_auiEncounter[1] = uiData; break; + case TYPE_ICK: m_auiEncounter[2] = uiData; break; case TYPE_TYRANNUS: m_auiEncounter[3] = uiData; break; } @@ -112,10 +118,10 @@ struct MANGOS_DLL_DECL instance_pit_of_saron : public ScriptedInstance { switch(uiType) { - case TYPE_GAFROST: return m_auiEncounter[0]; - case TYPE_KRICK: return m_auiEncounter[1]; - case TYPE_ICK: return m_auiEncounter[2]; - case TYPE_TYRANNUS: return m_auiEncounter[3]; + case TYPE_GAFROST: return m_auiEncounter[0]; + case TYPE_KRICK: return m_auiEncounter[1]; + case TYPE_ICK: return m_auiEncounter[2]; + case TYPE_TYRANNUS: return m_auiEncounter[3]; } return 0; } @@ -128,6 +134,7 @@ struct MANGOS_DLL_DECL instance_pit_of_saron : public ScriptedInstance case NPC_KRICK: return m_uiKrickGUID; case NPC_ICK: return m_uiIckGUID; case NPC_TYRANNUS: return m_uiTirannusGUID; + case NPC_RIMEFANG: return m_uiRimefangGUID; } return 0; } diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp new file mode 100644 index 000000000..1fdb323e5 --- /dev/null +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp @@ -0,0 +1,80 @@ +/* Copyright (C) 2006 - 2010 ScriptDev2 + * 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: pit_of_saron +SD%Complete: 0% +SDComment: +SDCategory: Pit of Saron +EndScriptData */ + +#include "precompiled.h" +#include "def_pit.h" + +struct MANGOS_DLL_DECL npc_jaina_or_sylvanas_POSintroAI : public ScriptedAI +{ + npc_jaina_or_sylvanas_POSintroAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + void Reset() + { + } +}; + +struct MANGOS_DLL_DECL npc_jaina_or_sylvanas_POSoutroAI : public ScriptedAI +{ + npc_jaina_or_sylvanas_POSoutroAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + void Reset() + { + } +}; + +CreatureAI* GetAI_npc_jaina_or_sylvanas_POSintro(Creature* pCreature) +{ + return new npc_jaina_or_sylvanas_POSintroAI(pCreature); +} + +CreatureAI* GetAI_npc_jaina_or_sylvanas_POSoutro(Creature* pCreature) +{ + return new npc_jaina_or_sylvanas_POSoutroAI(pCreature); +} + +void AddSC_pit_of_saron() +{ + Script *newscript; + + newscript = new Script; + newscript->Name="npc_jaina_or_sylvanas_POSintro"; + newscript->GetAI = &GetAI_npc_jaina_or_sylvanas_POSintro; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name="npc_jaina_or_sylvana_POSoutro"; + newscript->GetAI = &GetAI_npc_jaina_or_sylvanas_POSoutro; + newscript->RegisterSelf(); +} diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index 0b80d22c8..d319e8cec 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -409,6 +409,7 @@ extern void AddSC_trash_forge_of_souls(); extern void AddSC_forge_of_souls(); extern void AddSC_instance_pit_of_saron(); +extern void AddSC_pit_of_saron(); extern void AddSC_boss_forgemaster_gafrost(); extern void AddSC_boss_krick(); extern void AddSC_boss_scourgelord_tyrannus(); @@ -901,6 +902,7 @@ void AddScripts() AddSC_forge_of_souls(); AddSC_instance_pit_of_saron(); + AddSC_pit_of_saron(); AddSC_boss_forgemaster_gafrost(); AddSC_boss_krick(); AddSC_boss_scourgelord_tyrannus(); From f0cdcf26e735bbcda372b89df4c910e852bf8f01 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Fri, 2 Jul 2010 12:51:31 +0400 Subject: [PATCH 402/405] ICC part 49 - changes by bugreports, relocate part of code. NEED TESTING! --- addition/721_icecrown_mangos.sql | 2 + .../721_icecrown_spelltable_scriptdev2.sql | 16 +-- .../icecrown_citadel/boss_rotface.cpp | 23 ++-- .../icecrown_citadel/boss_sindragosa.cpp | 46 +++++-- .../icecrown_citadel/def_spire.h | 109 +++++++++++++++++ .../icecrown_citadel/icecrown_teleport.cpp | 38 +++--- .../instance_icecrown_spire.cpp | 115 +++--------------- 7 files changed, 200 insertions(+), 149 deletions(-) diff --git a/addition/721_icecrown_mangos.sql b/addition/721_icecrown_mangos.sql index 5d54a7ab9..132999790 100644 --- a/addition/721_icecrown_mangos.sql +++ b/addition/721_icecrown_mangos.sql @@ -113,6 +113,8 @@ UPDATE `gameobject` SET `state` = '0' WHERE `id` IN (201376); UPDATE `creature_template` SET `ScriptName`='boss_blood_queen_lanathel', `AIName`='' WHERE `entry`= 37955; UPDATE `creature_template` SET `minlevel` = 80, `maxlevel` = 80, `AIName` ='', `faction_A`= 14, `faction_H` = 14,`ScriptName`='mob_swarming_shadows' WHERE `entry`= 38163; +UPDATE `gameobject_template` SET `faction` = '0', `ScriptName` = 'go_frostwing_sigil' WHERE `gameobject_template`.`entry` IN (202181); + -- Valithria dreamwalker UPDATE `creature_template` SET `faction_A` = 35, `faction_H` = 35, `ScriptName`='boss_valithria_dreamwalker' WHERE `entry`= 36789; UPDATE `creature_template` SET `faction_A` = 35, `faction_H` = 35 WHERE `entry`= 10067; diff --git a/addition/721_icecrown_spelltable_scriptdev2.sql b/addition/721_icecrown_spelltable_scriptdev2.sql index 4ad02f55b..3adb0cace 100644 --- a/addition/721_icecrown_spelltable_scriptdev2.sql +++ b/addition/721_icecrown_spelltable_scriptdev2.sql @@ -48,7 +48,7 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMa DELETE FROM `boss_spell_table` WHERE `entry` = 38222; INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES (38222, 71494, 0, 0, 0, 1000, 0, 0, 0, 1000, 0, 0, 0, 1, 0, 0), -(38222, 71544, 72010, 72011, 72012, 1000, 0, 0, 0, 1000, 0, 0, 0, 3, 0, 0); +(38222, 71544, 0, 0, 0, 1000, 0, 0, 0, 1000, 0, 0, 0, 3, 0, 0); -- Adherent DELETE FROM `boss_spell_table` WHERE `entry` = 37949; INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES @@ -72,8 +72,8 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ -- Frost wyrm DELETE FROM `boss_spell_table` WHERE `entry` = 37230; INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES -(37230, 70116, 0, 72641, 0, 15000, 0, 0, 0, 25000, 0, 0, 0, 4, 0, 0), -(37230, 70362, 0, 71118, 0, 20000, 0, 0, 0, 25000, 0, 0, 0, 4, 0, 0), +(37230, 70116, 0, 0, 0, 15000, 0, 0, 0, 25000, 0, 0, 0, 4, 0, 0), +(37230, 70362, 0, 0, 0, 20000, 0, 0, 0, 25000, 0, 0, 0, 4, 0, 0), (37230, 71203, 0, 0, 0, 5000, 0, 0, 0, 15000, 0, 0, 0, 4, 0, 0), (37230, 70361, 0, 0, 0, 3000, 0, 0, 0, 5000, 0, 0, 0, 3, 0, 0), (37230, 47008, 0, 0, 0, 180000, 0, 0, 0, 180000, 0, 0, 0, 1, 0, 0); @@ -146,8 +146,8 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMa DELETE FROM `boss_spell_table` WHERE `entry` = 36627; INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES (36627, 69508, 0, 0, 0, 15000, 0, 0, 0, 20000, 0, 0, 0, 1, 0, 0), -(36627, 69674, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 6, 0, 0), -(36627, 70003, 0, 0, 0, 12000, 0, 0, 0, 27000, 0, 0, 0, 6, 0, 0), +(36627, 69674, 0, 0, 0, 1000, 0, 0, 0, 1000, 0, 0, 0, 6, 0, 0), +(36627, 70003, 0, 0, 0, 15000, 0, 0, 0, 15000, 0, 0, 0, 6, 0, 0), (36627, 69788, 0, 0, 0, 20000, 0, 0, 0, 40000, 0, 0, 0, 1, 0, 0), (36627, 69783, 0, 0, 0, 30000, 0, 0, 0, 45000, 0, 0, 0, 3, 0, 0), (36627, 47008, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 1, 0, 0), @@ -206,16 +206,16 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMa -- Gas cloud DELETE FROM `boss_spell_table` WHERE `entry` = 37562; INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES -(37562,70672, 0, 72455, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), +(37562,70672, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), (37562,70215, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 6, 0, 0), (37562,71203, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 1, 0, 0), (37562,70701, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0); -- Volatile ooze DELETE FROM `boss_spell_table` WHERE `entry` = 37697; INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES -(37697,70492, 72505, 72624, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 1, 0, 0), +(37697,70492, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 1, 0, 0), (37697,71203, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 1, 0, 0), -(37697,70447, 72836, 72837, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 6, 0, 0); +(37697,70447, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 6, 0, 0); -- Mutated abomination (pet?) DELETE FROM `boss_spell_table` WHERE `entry` = 37672; INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp index 41d88387c..83d734fc9 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp @@ -162,19 +162,20 @@ struct MANGOS_DLL_DECL boss_rotfaceAI : public ScriptedAI }; if (bsw->timedQuery(SPELL_SLIME_SPRAY, diff)) - if (Unit* pTemp = bsw->doSummon(NPC_OOZE_SPRAY_STALKER)) + if (bsw->doSummon(NPC_OOZE_SPRAY_STALKER)) bsw->doCast(SPELL_SLIME_SPRAY); - for(uint8 i = 0; i < MAX_INFECTION_TARGETS; ++i) - if (InfectionTarget[i] && InfectionTarget[i]->isAlive() && InfectionTarget[i]->IsInMap(m_creature)) - if (!bsw->hasAura(SPELL_MUTATED_INFECTION_AURA,InfectionTarget[i])) - { - float fPosX, fPosY, fPosZ; - InfectionTarget[i]->GetPosition(fPosX, fPosY, fPosZ); - if (Unit* pTemp = bsw->doSummon(NPC_SMALL_OOZE,fPosX, fPosY, fPosZ)) - pTemp->AddThreat(InfectionTarget[i], 1000.0f); - InfectionTarget[i] = NULL; - }; + if (bsw->timedQuery(SPELL_MUTATED_INFECTION_AURA, diff)) + for(uint8 i = 0; i < MAX_INFECTION_TARGETS; ++i) + if (InfectionTarget[i] && InfectionTarget[i]->isAlive() && InfectionTarget[i]->IsInMap(m_creature)) + if (!bsw->hasAura(SPELL_MUTATED_INFECTION_AURA,InfectionTarget[i])) + { + float fPosX, fPosY, fPosZ; + InfectionTarget[i]->GetPosition(fPosX, fPosY, fPosZ); + if (Unit* pTemp = bsw->doSummon(NPC_SMALL_OOZE,fPosX, fPosY, fPosZ)) + pTemp->AddThreat(InfectionTarget[i], 1000.0f); + InfectionTarget[i] = NULL; + }; if (bsw->timedQuery(SPELL_MUTATED_INFECTION, diff)) if (Unit* pTarget = bsw->SelectRandomPlayer(SPELL_MUTATED_INFECTION_AURA, false, 60.0f)) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp index 1ca7fb7df..1ff7e16b5 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp @@ -478,20 +478,23 @@ struct MANGOS_DLL_DECL mob_rimefangAI : public ScriptedAI void Reset() { if(!pInstance) return; - pInstance->SetData(TYPE_SINDRAGOSA, NOT_STARTED); + if (pInstance->GetData(TYPE_SINDRAGOSA) != DONE) + pInstance->SetData(TYPE_SINDRAGOSA, NOT_STARTED); bsw->resetTimers(); - m_creature->SetRespawnDelay(DAY); + m_creature->SetRespawnDelay(30*MINUTE); } void JustReachedHome() { - if (pInstance) pInstance->SetData(TYPE_SINDRAGOSA, FAIL); + if (pInstance) + if (pInstance->GetData(TYPE_SINDRAGOSA) != DONE) + pInstance->SetData(TYPE_SINDRAGOSA, FAIL); } void Aggro(Unit *who) { if(!pInstance) return; - pInstance->SetData(TYPE_SINDRAGOSA, IN_PROGRESS); + if (pInstance->GetData(TYPE_SINDRAGOSA) != DONE) pInstance->SetData(TYPE_SINDRAGOSA, IN_PROGRESS); pBrother = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_SPINESTALKER)); if (pBrother && !pBrother->isAlive()) pBrother->Respawn(); if (pBrother) pBrother->SetInCombatWithZone(); @@ -501,14 +504,22 @@ struct MANGOS_DLL_DECL mob_rimefangAI : public ScriptedAI void JustDied(Unit *killer) { if(!pInstance) return; + if (pInstance->GetData(TYPE_SINDRAGOSA) == DONE) return; if (pBrother && !pBrother->isAlive()) m_creature->SummonCreature(NPC_SINDRAGOSA, SpawnLoc[0].x, SpawnLoc[0].y, SpawnLoc[0].z, 3.17f, TEMPSUMMON_MANUAL_DESPAWN, DESPAWN_TIME); } void UpdateAI(const uint32 diff) { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + if (!pInstance || !m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (pInstance->GetData(TYPE_SINDRAGOSA) == DONE) + { + m_creature->SetRespawnDelay(DAY); + m_creature->ForcedDespawn(); return; + } bsw->timedCast(SPELL_FROST_BREATH, diff); @@ -540,20 +551,23 @@ struct MANGOS_DLL_DECL mob_spinestalkerAI : public ScriptedAI void Reset() { if(!pInstance) return; - pInstance->SetData(TYPE_SINDRAGOSA, NOT_STARTED); + if (pInstance->GetData(TYPE_SINDRAGOSA) != DONE) + pInstance->SetData(TYPE_SINDRAGOSA, NOT_STARTED); bsw->resetTimers(); - m_creature->SetRespawnDelay(DAY); + m_creature->SetRespawnDelay(30*MINUTE); } void JustReachedHome() { - if (pInstance) pInstance->SetData(TYPE_SINDRAGOSA, FAIL); + if (pInstance) + if (pInstance->GetData(TYPE_SINDRAGOSA) != DONE) + pInstance->SetData(TYPE_SINDRAGOSA, FAIL); } void Aggro(Unit *who) { if(!pInstance) return; - pInstance->SetData(TYPE_SINDRAGOSA, IN_PROGRESS); + if (pInstance->GetData(TYPE_SINDRAGOSA) != DONE) pInstance->SetData(TYPE_SINDRAGOSA, IN_PROGRESS); pBrother = (Creature*)Unit::GetUnit((*m_creature),pInstance->GetData64(NPC_RIMEFANG)); if (pBrother && !pBrother->isAlive()) pBrother->Respawn(); if (pBrother) pBrother->SetInCombatWithZone(); @@ -561,15 +575,25 @@ struct MANGOS_DLL_DECL mob_spinestalkerAI : public ScriptedAI void JustDied(Unit *killer) { - if(!pInstance) return; + if (!pInstance) return; + if (pInstance->GetData(TYPE_SINDRAGOSA) == DONE) return; if (pBrother && !pBrother->isAlive()) m_creature->SummonCreature(NPC_SINDRAGOSA, SpawnLoc[0].x, SpawnLoc[0].y, SpawnLoc[0].z, 3.17f, TEMPSUMMON_MANUAL_DESPAWN, DESPAWN_TIME); } void UpdateAI(const uint32 diff) { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + + + if (!pInstance || !m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + if (pInstance->GetData(TYPE_SINDRAGOSA) == DONE) + { + m_creature->SetRespawnDelay(DAY); + m_creature->ForcedDespawn(); return; + } bsw->timedCast(SPELL_BELLOWING_ROAR, diff); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h index 3a123036c..ea5b68d54 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/def_spire.h @@ -138,4 +138,113 @@ enum }; +class MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance +{ +public: + instance_icecrown_spire(Map* pMap); + ~instance_icecrown_spire() {} + + void Initialize(); + + void OnObjectCreate(GameObject* pGo); + void OnCreatureCreate(Creature* pCreature); + + void OpenDoor(uint64 guid); + void CloseDoor(uint64 guid); + void OpenAllDoors(); + void OnPlayerEnter(Player* pPlayer); + bool IsEncounterInProgress() const; + + void SetData(uint32 uiType, uint32 uiData); + uint32 GetData(uint32 uiType); + uint64 GetData64(uint32 uiType); + + const char* Save() { return strSaveData.c_str(); } + void Load(const char* chrIn); + +private: + + uint8 Difficulty; + bool needSave; + std::string strSaveData; + + //Creatures GUID + uint32 m_auiEncounter[MAX_ENCOUNTERS+1]; + uint64 m_uiMarrogwarGUID; + uint64 m_uiDeathWhisperGUID; + uint64 m_uiSaurfangGUID; + uint64 m_uiRotfaceGUID; + uint64 m_uiFestergutGUID; + uint64 m_uiPutricideGUID; + uint64 m_uiTaldaramGUID; + uint64 m_uiValanarGUID; + uint64 m_uiKelesethGUID; + uint64 m_uiLanathelGUID; + uint64 m_uiValithriaGUID; + uint64 m_uiSindragosaGUID; + uint64 m_uiLichKingGUID; + + uint64 m_uiRimefangGUID; + uint64 m_uiSpinestalkerGUID; + + uint64 m_uiStinkyGUID; + uint64 m_uiPreciousGUID; + + uint64 m_uiIcewall1GUID; + uint64 m_uiIcewall2GUID; + uint64 m_uiSaurfangDoorGUID; + uint64 m_uiOratoryDoorGUID; + uint64 m_uiDeathWhisperElevatorGUID; + uint64 m_uiOrangePlagueGUID; + uint64 m_uiGreenPlagueGUID; + uint64 m_uiSDoorGreenGUID; + uint64 m_uiSDoorOrangeGUID; + uint64 m_uiSDoorCollisionGUID; + uint64 m_uiScientistDoorGUID; + uint64 m_uiCrimsonDoorGUID; + uint64 m_uiBloodwingDoorGUID; + uint64 m_uiCounsilDoor1GUID; + uint64 m_uiCounsilDoor2GUID; + uint64 m_uiGreenDragonDoor1GUID; + uint64 m_uiGreenDragonDoor2GUID; + uint64 m_uiFrostwingDoorGUID; + + uint64 m_uiValithriaDoor1GUID; + uint64 m_uiValithriaDoor2GUID; + uint64 m_uiValithriaDoor3GUID; + uint64 m_uiValithriaDoor4GUID; + + uint64 m_uiSindragosaDoor1GUID; + uint64 m_uiSindragosaDoor2GUID; + + uint64 m_uiIceShard1GUID; + uint64 m_uiIceShard2GUID; + uint64 m_uiIceShard3GUID; + uint64 m_uiIceShard4GUID; + + uint64 m_uiFrostyWindGUID; + uint64 m_uiFrostyEdgeGUID; + uint64 m_uiArthasPlatformGUID; + uint64 m_uiArthasPrecipiceGUID; + + uint64 m_uiFrostmourneGUID; + uint64 m_uiFrostmourneTriggerGUID; + uint64 m_uiFrostmourneHolderGUID; + + uint64 m_uiSaurfangCacheGUID; + uint64 m_uiGunshipArmoryAGUID; + uint64 m_uiGunshipArmoryHGUID; + uint64 m_uiValitriaCacheGUID; + + uint64 m_uiGunshipArmoryH_ID; + uint64 m_uiGunshipArmoryA_ID; + + uint32 m_uiDataCouncilHealth; + + uint32 m_auiEvent; + uint32 m_auiEventTimer; + + +}; + #endif diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp index cf021fc89..a653a3558 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp @@ -40,14 +40,14 @@ struct t_Locations static t_Locations PortalLoc[]= { -{"Hammer of the World","Молот света",-17.1928, 2211.44, 30.1158,0,true,true,TYPE_TELEPORT}, // -{"Chapel of Damned","Молельня проклятых",-503.62, 2211.47, 62.8235,70856,false,true,TYPE_MARROWGAR}, // -{"Skulls plato","Черепной вал",-615.145, 2211.47, 199.972,70857,false,true,TYPE_DEATHWHISPER}, // -{"The Rise of Deadly","Подъем смертоносного",-549.131, 2211.29, 539.291,70858,false,true,TYPE_FLIGHT_WAR}, // -{"Icecrown Citadel","Цитадель Ледяной Короны",4198.42, 2769.22, 351.065,70859,false,true,TYPE_SAURFANG}, // -{"Sanctuary of Blood","Святилище крови",4490.205566, 2769.275635, 403.983765,0,false,true,TYPE_BLOOD_COUNCIL}, // -{"Lair of the Queen of Ice","Логово Королевы льда",4356.580078, 2565.75, 220.401993,70861,false,true,TYPE_VALITHRIA}, // -{"Frozen Throne","Ледяной трон",528.767273f, -2124.845947f, 1041.86f, 70860,false,true,TYPE_SINDRAGOSA}, // +{{"Hammer of the World","Молот света"},-17.1928, 2211.44, 30.1158,0,true,true,TYPE_TELEPORT}, // +{{"Chapel of Damned","Молельня проклятых"},-503.62, 2211.47, 62.8235,70856,false,true,TYPE_MARROWGAR}, // +{{"Skulls plato","Черепной вал"},-615.145, 2211.47, 199.972,70857,false,true,TYPE_DEATHWHISPER}, // +{{"The Rise of Deadly","Подъем смертоносного"},-549.131, 2211.29, 539.291,70858,false,true,TYPE_FLIGHT_WAR}, // +{{"Icecrown Citadel","Цитадель Ледяной Короны"},4198.42, 2769.22, 351.065,70859,false,true,TYPE_SAURFANG}, // +{{"Sanctuary of Blood","Святилище крови"},4490.205566, 2769.275635, 403.983765,0,false,true,TYPE_BLOOD_COUNCIL}, // +{{"Lair of the Queen of Ice","Логово Королевы льда"},4356.580078, 2565.75, 220.401993,70861,false,true,TYPE_VALITHRIA}, // +{{"Frozen Throne","Ледяной трон"},528.767273f, -2124.845947f, 1041.86f, 70860,false,true,TYPE_SINDRAGOSA}, // }; @@ -107,35 +107,37 @@ bool GOGossipHello_go_icecrown_teleporter(Player *pPlayer, GameObject* pGo) bool GOGossipHello_go_plague_sigil(Player *player, GameObject* pGo) { - ScriptedInstance *pInstance = (ScriptedInstance *) pGo->GetInstanceData(); + instance_icecrown_spire* pInstance = (instance_icecrown_spire*)pGo->GetInstanceData(); if(!pInstance) return false; - if (pInstance->GetData(TYPE_FESTERGUT) == DONE) - pInstance->SetData(TYPE_FESTERGUT, DONE); - if (pInstance->GetData(TYPE_ROTFACE) == DONE) - pInstance->SetData(TYPE_ROTFACE, DONE); - + if (pInstance->GetData(TYPE_FESTERGUT) == DONE + && pInstance->GetData(TYPE_ROTFACE) == DONE) + { + pInstance->OpenDoor(pInstance->GetData64(GO_SCIENTIST_DOOR_ORANGE)); + pInstance->OpenDoor(pInstance->GetData64(GO_SCIENTIST_DOOR_GREEN)); + pInstance->OpenDoor(pInstance->GetData64(GO_SCIENTIST_DOOR_COLLISION)); + }; return true; } bool GOGossipHello_go_bloodwing_sigil(Player *player, GameObject* pGo) { - ScriptedInstance *pInstance = (ScriptedInstance *) pGo->GetInstanceData(); + instance_icecrown_spire* pInstance = (instance_icecrown_spire*)pGo->GetInstanceData(); if(!pInstance) return false; if (pInstance->GetData(TYPE_PUTRICIDE) == DONE) - pInstance->SetData(TYPE_PUTRICIDE, DONE); + pInstance->OpenDoor(pInstance->GetData64(GO_BLOODWING_DOOR)); return true; } bool GOGossipHello_go_frostwing_sigil(Player *player, GameObject* pGo) { - ScriptedInstance *pInstance = (ScriptedInstance *) pGo->GetInstanceData(); + instance_icecrown_spire* pInstance = (instance_icecrown_spire*)pGo->GetInstanceData(); if(!pInstance) return false; if (pInstance->GetData(TYPE_LANATHEL) == DONE) - pInstance->SetData(TYPE_LANATHEL, DONE); + pInstance->OpenDoor(pInstance->GetData64(GO_FROSTWING_DOOR)); return true; } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp index aaecd0349..4e6dbfbd4 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_spire.cpp @@ -24,109 +24,27 @@ static Locations SpawnLoc[]= {-428.140503, 2421.336914, 191.233078}, // 1 Alliance ship enter }; -struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance -{ - instance_icecrown_spire(Map* pMap) : ScriptedInstance(pMap) + instance_icecrown_spire::instance_icecrown_spire(Map* pMap) : ScriptedInstance(pMap) { Difficulty = pMap->GetDifficulty(); Initialize(); } - uint8 Difficulty; - bool needSave; - std::string strSaveData; - - //Creatures GUID - uint32 m_auiEncounter[MAX_ENCOUNTERS+1]; - uint64 m_uiMarrogwarGUID; - uint64 m_uiDeathWhisperGUID; - uint64 m_uiSaurfangGUID; - uint64 m_uiRotfaceGUID; - uint64 m_uiFestergutGUID; - uint64 m_uiPutricideGUID; - uint64 m_uiTaldaramGUID; - uint64 m_uiValanarGUID; - uint64 m_uiKelesethGUID; - uint64 m_uiLanathelGUID; - uint64 m_uiValithriaGUID; - uint64 m_uiSindragosaGUID; - uint64 m_uiLichKingGUID; - - uint64 m_uiRimefangGUID; - uint64 m_uiSpinestalkerGUID; - - uint64 m_uiStinkyGUID; - uint64 m_uiPreciousGUID; - - uint64 m_uiIcewall1GUID; - uint64 m_uiIcewall2GUID; - uint64 m_uiSaurfangDoorGUID; - uint64 m_uiOratoryDoorGUID; - uint64 m_uiDeathWhisperElevatorGUID; - uint64 m_uiOrangePlagueGUID; - uint64 m_uiGreenPlagueGUID; - uint64 m_uiSDoorGreenGUID; - uint64 m_uiSDoorOrangeGUID; - uint64 m_uiSDoorCollisionGUID; - uint64 m_uiScientistDoorGUID; - uint64 m_uiCrimsonDoorGUID; - uint64 m_uiBloodwingDoorGUID; - uint64 m_uiCounsilDoor1GUID; - uint64 m_uiCounsilDoor2GUID; - uint64 m_uiGreenDragonDoor1GUID; - uint64 m_uiGreenDragonDoor2GUID; - uint64 m_uiFrostwingDoorGUID; - - uint64 m_uiValithriaDoor1GUID; - uint64 m_uiValithriaDoor2GUID; - uint64 m_uiValithriaDoor3GUID; - uint64 m_uiValithriaDoor4GUID; - - uint64 m_uiSindragosaDoor1GUID; - uint64 m_uiSindragosaDoor2GUID; - - uint64 m_uiIceShard1GUID; - uint64 m_uiIceShard2GUID; - uint64 m_uiIceShard3GUID; - uint64 m_uiIceShard4GUID; - - uint64 m_uiFrostyWindGUID; - uint64 m_uiFrostyEdgeGUID; - uint64 m_uiArthasPlatformGUID; - uint64 m_uiArthasPrecipiceGUID; - - uint64 m_uiFrostmourneGUID; - uint64 m_uiFrostmourneTriggerGUID; - uint64 m_uiFrostmourneHolderGUID; - - uint64 m_uiSaurfangCacheGUID; - uint64 m_uiGunshipArmoryAGUID; - uint64 m_uiGunshipArmoryHGUID; - uint64 m_uiValitriaCacheGUID; - - uint64 m_uiGunshipArmoryH_ID; - uint64 m_uiGunshipArmoryA_ID; - - uint32 m_uiDataCouncilHealth; - - uint32 m_auiEvent; - uint32 m_auiEventTimer; - - void OpenDoor(uint64 guid) + void instance_icecrown_spire::OpenDoor(uint64 guid) { if(!guid) return; GameObject* pGo = instance->GetGameObject(guid); if(pGo) pGo->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE); } - void CloseDoor(uint64 guid) + void instance_icecrown_spire::CloseDoor(uint64 guid) { if(!guid) return; GameObject* pGo = instance->GetGameObject(guid); if(pGo) pGo->SetGoState(GO_STATE_READY); } - void OpenAllDoors() + void instance_icecrown_spire::OpenAllDoors() { if (m_auiEncounter[1] == DONE) { OpenDoor(m_uiIcewall1GUID); @@ -156,7 +74,7 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance } - void Initialize() + void instance_icecrown_spire::Initialize() { for (uint8 i = 0; i < MAX_ENCOUNTERS; ++i) m_auiEncounter[i] = NOT_STARTED; @@ -201,7 +119,7 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance }; } - bool IsEncounterInProgress() const + bool instance_icecrown_spire::IsEncounterInProgress() const { for(uint8 i = 1; i < MAX_ENCOUNTERS-2 ; ++i) if (m_auiEncounter[i] == IN_PROGRESS) return true; @@ -209,7 +127,7 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance return false; } - void OnPlayerEnter(Player *pPlayer) + void instance_icecrown_spire::OnPlayerEnter(Player *pPlayer) { OpenAllDoors(); @@ -240,7 +158,7 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance */ }; - void OnCreatureCreate(Creature* pCreature) + void instance_icecrown_spire::OnCreatureCreate(Creature* pCreature) { switch(pCreature->GetEntry()) { @@ -302,7 +220,7 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance } } - void OnObjectCreate(GameObject* pGo) + void instance_icecrown_spire::OnObjectCreate(GameObject* pGo) { switch(pGo->GetEntry()) { @@ -470,7 +388,7 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance OpenAllDoors(); } - void SetData(uint32 uiType, uint32 uiData) + void instance_icecrown_spire::SetData(uint32 uiType, uint32 uiData) { if (uiType > m_auiEncounter[0] && uiData == DONE) m_auiEncounter[0] = uiType; switch(uiType) @@ -603,12 +521,7 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance } } - const char* Save() - { - return strSaveData.c_str(); - } - - uint32 GetData(uint32 uiType) + uint32 instance_icecrown_spire::GetData(uint32 uiType) { switch(uiType) { @@ -720,7 +633,7 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance return 0; } - uint64 GetData64(uint32 uiData) + uint64 instance_icecrown_spire::GetData64(uint32 uiData) { switch(uiData) { @@ -745,6 +658,7 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance case GO_SCIENTIST_DOOR_GREEN: return m_uiSDoorGreenGUID; case GO_SCIENTIST_DOOR_COLLISION: return m_uiSDoorCollisionGUID; case GO_BLOODWING_DOOR: return m_uiBloodwingDoorGUID; + case GO_FROSTWING_DOOR: return m_uiFrostwingDoorGUID; case GO_VALITHRIA_DOOR_1: return m_uiValithriaDoor1GUID; case GO_VALITHRIA_DOOR_2: return m_uiValithriaDoor2GUID; case GO_VALITHRIA_DOOR_3: return m_uiValithriaDoor3GUID; @@ -763,7 +677,7 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance return 0; } - void Load(const char* chrIn) + void instance_icecrown_spire::Load(const char* chrIn) { if (!chrIn) { @@ -786,7 +700,6 @@ struct MANGOS_DLL_DECL instance_icecrown_spire : public ScriptedInstance OUT_LOAD_INST_DATA_COMPLETE; OpenAllDoors(); } -}; InstanceData* GetInstanceData_instance_icecrown_spire(Map* pMap) { From 6aad8c26845ea414a96caae06dfb058c0685d4f9 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Fri, 2 Jul 2010 12:52:48 +0400 Subject: [PATCH 403/405] BSW small correct --- include/sc_boss_spell_worker.cpp | 12 +++++++++--- include/sc_boss_spell_worker.h | 11 ++++++----- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index 5ed69c405..714680796 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -441,7 +441,7 @@ Unit* BossSpellWorker::_doSummonAtPosition(uint8 m_uiSpellIdx, TempSummonType su return boss->SummonCreature(pSpell->m_uiSpellEntry[currentDifficulty], fPosX, fPosY, fPosZ, 0, summontype, delay); }; -bool BossSpellWorker::_doRemove(uint8 m_uiSpellIdx, Unit* pTarget, SpellEffectIndex index) +bool BossSpellWorker::_doRemove(uint8 m_uiSpellIdx, Unit* pTarget, uint8 index) { SpellTable* pSpell = &m_BossSpell[m_uiSpellIdx]; @@ -494,9 +494,15 @@ bool BossSpellWorker::_doRemove(uint8 m_uiSpellIdx, Unit* pTarget, SpellEffectIn return false; } - if (_auraCount(m_uiSpellIdx,pTarget,index) > 1) + if (index == EFFECT_INDEX_ALL) { - if (pTarget->GetAura(pSpell->m_uiSpellEntry[currentDifficulty], index)->modStackAmount(-1)) + pTarget->RemoveAurasDueToSpell(pSpell->m_uiSpellEntry[currentDifficulty]); + return true; + } + + if (_auraCount(m_uiSpellIdx,pTarget,(SpellEffectIndex)index) > 1) + { + if (pTarget->GetAura(pSpell->m_uiSpellEntry[currentDifficulty],(SpellEffectIndex)index)->modStackAmount(-1)) return true; else return false; } diff --git a/include/sc_boss_spell_worker.h b/include/sc_boss_spell_worker.h index e6f4834e1..b86df3179 100644 --- a/include/sc_boss_spell_worker.h +++ b/include/sc_boss_spell_worker.h @@ -15,10 +15,11 @@ enum { - DIFFICULTY_LEVELS = 4, - MAX_BOSS_SPELLS = 32, - SPELL_INDEX_ERROR = 255, + DIFFICULTY_LEVELS = 4, + MAX_BOSS_SPELLS = 32, + SPELL_INDEX_ERROR = 255, INSTANCE_MAX_PLAYERS = 40, + EFFECT_INDEX_ALL = 255, }; enum BossSpellFlag @@ -146,7 +147,7 @@ class MANGOS_DLL_DECL BossSpellWorker else return CAST_FAIL_OTHER; }; - bool doRemove(uint32 SpellID, Unit* pTarget = NULL, SpellEffectIndex index = EFFECT_INDEX_0) + bool doRemove(uint32 SpellID, Unit* pTarget = NULL, uint8 index = EFFECT_INDEX_ALL) { uint8 m_uiSpellIdx = _findSpellIDX(SpellID); if (!queryIndex(m_uiSpellIdx)) return false; @@ -260,7 +261,7 @@ class MANGOS_DLL_DECL BossSpellWorker CanCastResult _CanCastSpell(Unit* pTarget, const SpellEntry *pSpell, bool isTriggered = false); - bool _doRemove(uint8 m_uiSpellIdx, Unit* pTarget = NULL, SpellEffectIndex index = EFFECT_INDEX_0); + bool _doRemove(uint8 m_uiSpellIdx, Unit* pTarget = NULL, uint8 index = EFFECT_INDEX_ALL); bool _doAura(uint8 m_uiSpellIdx, Unit* pTarget = NULL, SpellEffectIndex index = EFFECT_INDEX_0); From 80d07637f327f38027d5508f537847e04bdea6ce Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Sat, 3 Jul 2010 20:42:38 +0400 Subject: [PATCH 404/405] ICC part 50 - changes by bugreport --- addition/721_icecrown_spelltable_scriptdev2.sql | 4 ++-- .../icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addition/721_icecrown_spelltable_scriptdev2.sql b/addition/721_icecrown_spelltable_scriptdev2.sql index 3adb0cace..cd5e3a081 100644 --- a/addition/721_icecrown_spelltable_scriptdev2.sql +++ b/addition/721_icecrown_spelltable_scriptdev2.sql @@ -356,8 +356,8 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ (36597, 69103, 0, 0, 0, 3000, 0, 0, 0, 5000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36597, 69099, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36597, 69108, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), -(36597, 70358, 0, 0, 0, 5000, 0, 0, 0, 60000, 0, 0, 0, 0, 0, 0, 1, 0, 0), -(36597, 70372, 0, 0, 0, 45000, 0, 0, 0, 45000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 70358, 0, 0, 0, 40000, 0, 0, 0, 70000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 70372, 0, 0, 0, 40000, 0, 0, 0, 70000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36597, 72149, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36597, 72143, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), (36597, 70498, 0, 0, 0, 3600001, 0, 0, 0, 3600001, 0, 0, 0, 0, 0, 0, 1, 0, 0), diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp index 1ff7e16b5..45d9b4179 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp @@ -356,6 +356,7 @@ struct MANGOS_DLL_DECL mob_ice_tombAI : public ScriptedAI { SetCombatMovement(false); pVictim = NULL; + m_creature->SetRespawnDelay(7*DAY); } void Aggro(Unit* pWho) @@ -421,7 +422,6 @@ struct MANGOS_DLL_DECL mob_frost_bombAI : public ScriptedAI m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); // m_creature->SetDisplayId(15880); m_creature->SetDisplayId(22523); -// m_creature->SetDisplayId(19075); } void AttackStart(Unit *pWho) From aac7d8d191404adee9ecce03ef074ed942caa559 Mon Sep 17 00:00:00 2001 From: /dev/rsa Date: Mon, 5 Jul 2010 19:02:42 +0400 Subject: [PATCH 405/405] ICC part 51 - Putricide rewrite, changes by bugreports small BSW improve (not used now) --- .../721_icecrown_spelltable_scriptdev2.sql | 33 +-- include/sc_boss_spell_worker.cpp | 27 ++- include/sc_boss_spell_worker.h | 1 + .../icecrown_citadel/blood_prince_council.cpp | 1 + .../boss_blood_queen_lanathel.cpp | 8 +- .../icecrown_citadel/boss_festergut.cpp | 1 + .../boss_lady_deathwhisper.cpp | 17 ++ .../icecrown_citadel/boss_lord_marrowgar.cpp | 1 + .../boss_proffesor_putricide.cpp | 209 ++++++++++++++---- .../icecrown_citadel/boss_rotface.cpp | 1 + 10 files changed, 234 insertions(+), 65 deletions(-) diff --git a/addition/721_icecrown_spelltable_scriptdev2.sql b/addition/721_icecrown_spelltable_scriptdev2.sql index cd5e3a081..33c3757ba 100644 --- a/addition/721_icecrown_spelltable_scriptdev2.sql +++ b/addition/721_icecrown_spelltable_scriptdev2.sql @@ -183,19 +183,20 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_ -- Professor Putricide DELETE FROM `boss_spell_table` WHERE `entry` = 36678; -INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES -(36678,70346, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), -(36678,71968, 0, 0, 0, 20000, 0, 0, 0, 40000, 0, 0, 0, 1, 0, 0), -(36678,71617, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), -(36678,71618, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 1, 0, 0), -(36678,71621, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), -(36678,71278, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), -(36678,71279, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), -(36678,73122, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), -(36678,71603, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), -(36678,70311, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 1, 0, 0), -(36678, 47008, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 1, 0, 0), -(36678,72672, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 1, 0, 0); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(36678,70346, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 0, 3, 0, 0), +(36678,71968, 0, 0, 0, 40000, 0, 0, 0, 50000, 0, 0, 0, 0, 1, 0, 0), +(36678,71617, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 0, 3, 0, 0), +(36678,71615, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 100, 12, 0, 0), +(36678,71618, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 100, 12, 0, 0), +(36678,71621, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 0, 3, 0, 0), +(36678,71278, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 0, 3, 0, 0), +(36678,71279, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 0, 3, 0, 0), +(36678,73122, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 0, 3, 0, 0), +(36678,71603, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 0, 3, 0, 0), +(36678,70311, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 0, 1, 0, 0), +(36678,47008, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 0, 1, 0, 0), +(36678,72672, 0, 0, 0, 8000, 0, 0, 0, 25000, 0, 0, 0, 0, 3, 0, 0); INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES (36678,70852, 0, 0, 0, 15000, 0, 0, 0, 25000, 0, 0, 0, 10, 30, 0, 15, 0, 0); @@ -206,15 +207,17 @@ INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMa -- Gas cloud DELETE FROM `boss_spell_table` WHERE `entry` = 37562; INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES -(37562,70672, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), +(37562,70672, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 6, 0, 0), (37562,70215, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 6, 0, 0), (37562,71203, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 1, 0, 0), -(37562,70701, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0); +(37562,70701, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 6, 0, 0); -- Volatile ooze DELETE FROM `boss_spell_table` WHERE `entry` = 37697; INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES (37697,70492, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 1, 0, 0), (37697,71203, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 1, 0, 0), +(37697,70530, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 6, 0, 1), +(37697,71770, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 6, 0, 1), (37697,70447, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 6, 0, 0); -- Mutated abomination (pet?) DELETE FROM `boss_spell_table` WHERE `entry` = 37672; diff --git a/include/sc_boss_spell_worker.cpp b/include/sc_boss_spell_worker.cpp index 714680796..4fd06cdde 100644 --- a/include/sc_boss_spell_worker.cpp +++ b/include/sc_boss_spell_worker.cpp @@ -188,11 +188,8 @@ CanCastResult BossSpellWorker::_BSWSpellSelector(uint8 m_uiSpellIdx, Unit* pTarg case APPLY_AURA_TARGET: if (!pTarget || !pTarget->IsInMap(boss)) return CAST_FAIL_OTHER; - spell = (SpellEntry *)GetSpellStore()->LookupEntry(pSpell->m_uiSpellEntry[currentDifficulty]); - if (spell) - if (pTarget->AddAura(new BossAura(spell, EFFECT_INDEX_0, &pSpell->varData, pTarget, pTarget))) - return CAST_OK; - return CAST_FAIL_OTHER; + _doAura(m_uiSpellIdx, pTarget, EFFECT_INDEX_0); + return CAST_OK; break; case SUMMON_NORMAL: @@ -284,6 +281,20 @@ CanCastResult BossSpellWorker::_BSWSpellSelector(uint8 m_uiSpellIdx, Unit* pTarg else return CAST_FAIL_OTHER; break; + case APPLY_AURA_ALLPLAYERS: + { + Map::PlayerList const& pPlayers = pMap->GetPlayers(); + for (Map::PlayerList::const_iterator itr = pPlayers.begin(); itr != pPlayers.end(); ++itr) + { + pTarget = itr->getSource(); + if (pTarget && pTarget->isAlive() && pTarget->IsWithinDistInMap(boss, pSpell->LocData.x)) + _doAura(m_uiSpellIdx, pTarget, EFFECT_INDEX_0); + } + return CAST_OK; + } + break; + + case SPELLTABLEPARM_NUMBER: default: return CAST_FAIL_OTHER; break; @@ -369,7 +380,8 @@ BossSpellTableParameters BossSpellWorker::_getBSWCastType(uint32 pTemp) case 14: return CAST_ON_FRENDLY_LOWHP; case 15: return CAST_ON_RANDOM_POINT; case 16: return CAST_ON_RANDOM_PLAYER; - case 17: return SPELLTABLEPARM_NUMBER; + case 17: return APPLY_AURA_ALLPLAYERS; + case 18: return SPELLTABLEPARM_NUMBER; default: return DO_NOTHING; }; }; @@ -471,6 +483,7 @@ bool BossSpellWorker::_doRemove(uint8 m_uiSpellIdx, Unit* pTarget, uint8 index) case CAST_ON_RANDOM: case CAST_ON_RANDOM_PLAYER: + case APPLY_AURA_ALLPLAYERS: case CAST_ON_ALLPLAYERS: { Map::PlayerList const& pPlayers = pMap->GetPlayers(); @@ -481,8 +494,8 @@ bool BossSpellWorker::_doRemove(uint8 m_uiSpellIdx, Unit* pTarget, uint8 index) pTarget->RemoveAurasDueToSpell(pSpell->m_uiSpellEntry[currentDifficulty]); } return true; - break; } + break; default: debug_log("BSW: FAILED Removing effects of spell %u type %u - unsupported type",pSpell->m_uiSpellEntry[currentDifficulty], pSpell->m_CastTarget); return false; diff --git a/include/sc_boss_spell_worker.h b/include/sc_boss_spell_worker.h index b86df3179..5d81ce0fd 100644 --- a/include/sc_boss_spell_worker.h +++ b/include/sc_boss_spell_worker.h @@ -49,6 +49,7 @@ enum BossSpellTableParameters CAST_ON_FRENDLY_LOWHP = 14, CAST_ON_RANDOM_POINT = 15, CAST_ON_RANDOM_PLAYER = 16, + APPLY_AURA_ALLPLAYERS = 17, SPELLTABLEPARM_NUMBER }; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp index 3f050cdfb..9aab95f41 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp @@ -83,6 +83,7 @@ struct MANGOS_DLL_DECL boss_valanar_iccAI : public ScriptedAI void MoveInLineOfSight(Unit* pWho) { + ScriptedAI::MoveInLineOfSight(pWho); if(!m_pInstance || intro) return; if (pWho->GetTypeId() != TYPEID_PLAYER) return; m_pInstance->SetData(TYPE_EVENT, 800); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp index b7cbc1dee..bda8afd69 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp @@ -311,7 +311,7 @@ struct MANGOS_DLL_DECL boss_blood_queen_lanathelAI : public ScriptedAI bsw->doCast(SPELL_VAMPIRIC_BITE); } - if (bsw->timedQuery(SPELL_BLOODBOLT_WHIRL,diff)) + if (bsw->timedQuery(SPELL_BLOODBOLT_WHIRL,diff) && m_creature->GetHealthPercent() > 10.0f) { stage = 1; }; @@ -338,14 +338,16 @@ struct MANGOS_DLL_DECL boss_blood_queen_lanathelAI : public ScriptedAI bsw->doCast(SPELL_BLOODBOLT_WHIRL); return; case 3: - if (bsw->timedQuery(SPELL_TWILIGHT_BLOODBOLT, diff)) bloodbolts = 5; +// if (bsw->timedQuery(SPELL_TWILIGHT_BLOODBOLT, diff)) bloodbolts = 5; + + if (bsw->timedQuery(SPELL_TWILIGHT_BLOODBOLT, diff)) bsw->doCast(SPELL_BLOODBOLT_WHIRL); if (bsw->timedQuery(SPELL_PACT_OF_DARKFALLEN, diff)) doPactOfDarkfallen(true); bsw->timedCast(SPELL_SWARMING_SHADOWS, diff); - if (bsw->timedQuery(SPELL_BLOODBOLT_WHIRL,diff)) + if (bsw->timedQuery(SPELL_BLOODBOLT_WHIRL,diff) || m_creature->GetHealthPercent() < 10.0f) { stage = 4; DoScriptText(-1631325,m_creature); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp index b1ddb2b75..520e87352 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp @@ -80,6 +80,7 @@ struct MANGOS_DLL_DECL boss_festergutAI : public ScriptedAI void MoveInLineOfSight(Unit* pWho) { + ScriptedAI::MoveInLineOfSight(pWho); if(!pInstance || intro) return; if (pWho->GetTypeId() != TYPEID_PLAYER) return; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp index b109d35c3..871751609 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp @@ -104,6 +104,23 @@ struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public ScriptedAI void MoveInLineOfSight(Unit* pWho) { + if (m_creature->CanInitiateAttack() && pWho->isTargetableForAttack() && + m_creature->IsHostileTo(pWho) && pWho->isInAccessablePlaceFor(m_creature)) + { + if (m_creature->IsWithinDistInMap(pWho, m_creature->GetAttackDistance(pWho)) && m_creature->IsWithinLOSInMap(pWho)) + { + if (!m_creature->getVictim()) + { + pWho->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); + AttackStart(pWho); + } + else if (m_creature->GetMap()->IsDungeon()) + { + pWho->SetInCombatWith(m_creature); + m_creature->AddThreat(pWho); + } + } + } if (stage) return; else intro = true; } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp index c0a5015f9..5ca4c2fd8 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp @@ -68,6 +68,7 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public ScriptedAI void MoveInLineOfSight(Unit* pWho) { + ScriptedAI::MoveInLineOfSight(pWho); if (intro) return; DoScriptText(-1631000,m_creature); intro = true; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp index d241fe30b..040ea0a33 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_proffesor_putricide.cpp @@ -29,7 +29,8 @@ enum BossSpells SPELL_SLIME_PUDDLE = 70346, SPELL_UNSTABLE_EXPERIMENT = 71968, SPELL_TEAR_GAS = 71617, - SPELL_TEAR_GAS_1 = 71618, + SPELL_TEAR_GAS_1 = 71615, + SPELL_TEAR_GAS_2 = 71618, SPELL_CREATE_CONCOCTION = 71621, SPELL_CHOKING_GAS = 71278, SPELL_CHOKING_GAS_EXPLODE = 71279, @@ -45,6 +46,8 @@ enum BossSpells // NPC_VOLATILE_OOZE = 37697, SPELL_OOZE_ADHESIVE = 70447, + SPELL_OOZE_ADHESIVE_1 = 71530, + SPELL_OOZE_ADHESIVE_2 = 71770, SPELL_OOZE_ERUPTION = 70492, // NPC_MUTATED_ABOMINATION = 37672, @@ -56,9 +59,9 @@ enum BossSpells SPELL_BERSERK = 47008, // -// VIEW_1 = 30881, -// VIEW_2 = 38216, -// VIEW_3 = 38216, + VIEW_1 = 30881, + VIEW_2 = 30881, + VIEW_3 = 30881, }; static Locations SpawnLoc[]= @@ -82,6 +85,8 @@ struct MANGOS_DLL_DECL boss_proffesor_putricideAI : public ScriptedAI uint8 stage; bool intro; uint32 UpdateTimer; + bool movementstarted; + uint8 nextPoint; void Reset() { @@ -89,6 +94,7 @@ struct MANGOS_DLL_DECL boss_proffesor_putricideAI : public ScriptedAI pInstance->SetData(TYPE_PUTRICIDE, NOT_STARTED); stage = 0; intro = false; + movementstarted = false; UpdateTimer = 1000; bsw->resetTimers(); m_creature->SetRespawnDelay(7*DAY); @@ -96,11 +102,13 @@ struct MANGOS_DLL_DECL boss_proffesor_putricideAI : public ScriptedAI void MoveInLineOfSight(Unit* pWho) { + ScriptedAI::MoveInLineOfSight(pWho); + if (!pInstance || intro) return; if (pInstance->GetData(TYPE_EVENT_NPC) == NPC_PROFESSOR_PUTRICIDE || !pWho->IsWithinDistInMap(m_creature, 40.0f)) return; - DoScriptText(-1631249,m_creature, pWho); + DoScriptText(-1631240,m_creature, pWho); intro = true; } @@ -116,11 +124,21 @@ struct MANGOS_DLL_DECL boss_proffesor_putricideAI : public ScriptedAI } } + void MovementInform(uint32 type, uint32 id) + { + if (type != POINT_MOTION_TYPE || !movementstarted) return; + if (id == nextPoint) + { + movementstarted = false; + m_creature->GetMotionMaster()->MovementExpired(); + } + } + void Aggro(Unit *who) { if (!pInstance) return; pInstance->SetData(TYPE_PUTRICIDE, IN_PROGRESS); - DoScriptText(-1631240,m_creature, who); + DoScriptText(-1631249,m_creature, who); } void JustDied(Unit *killer) @@ -130,6 +148,28 @@ struct MANGOS_DLL_DECL boss_proffesor_putricideAI : public ScriptedAI DoScriptText(-1631243,m_creature, killer); } + void JustSummoned(Creature* summoned) + { + if(!pInstance || !summoned) return; + + if ( summoned->GetEntry() == NPC_VOLATILE_OOZE + || summoned->GetEntry() == NPC_GAS_CLOUD) + if (Unit* pTarget = bsw->SelectRandomPlayer()) + { + summoned->SetInCombatWith(pTarget); + summoned->AddThreat(pTarget, 100.0f); + } + + } + + void StartMovement(uint32 id) + { + nextPoint = id; + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MovePoint(id, SpawnLoc[id].x, SpawnLoc[id].y, SpawnLoc[id].z); + movementstarted = true; + } + void JustReachedHome() { if (pInstance) pInstance->SetData(TYPE_PUTRICIDE, FAIL); @@ -210,13 +250,42 @@ struct MANGOS_DLL_DECL boss_proffesor_putricideAI : public ScriptedAI break; } + bsw->timedCast(SPELL_CHOKING_GAS, diff); + + if (bsw->timedQuery(SPELL_MALLEABLE_GOO, diff)) + { + bsw->doCast(SPELL_MALLEABLE_GOO); + } + + DoMeleeAttackIfReady(); + + if (m_creature->GetHealthPercent() < 80.0f ) stage = 1; + break; case 1: - bsw->doCast(SPELL_TEAR_GAS); - bsw->doCast(SPELL_CREATE_CONCOCTION); + m_creature->AttackStop(); + SetCombatMovement(false); + bsw->doCast(SPELL_TEAR_GAS_1); + DoScriptText(-1631245,m_creature); + StartMovement(0); stage = 2; break; - case 2: + case 2: + if (movementstarted) return; + bsw->doCast(SPELL_CREATE_CONCOCTION); + stage = 3; + break; + case 3: + if (m_creature->IsNonMeleeSpellCasted(true,false,false) || + !bsw->SelectRandomPlayer(SPELL_TEAR_GAS_1, false)) return; + DoScriptText(-1631246,m_creature); + m_creature->SetDisplayId(VIEW_2); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + SetCombatMovement(true); + stage = 4; + break; + case 4: bsw->timedCast(SPELL_SLIME_PUDDLE, diff); if (bsw->timedQuery(SPELL_UNSTABLE_EXPERIMENT, diff)) @@ -234,15 +303,42 @@ struct MANGOS_DLL_DECL boss_proffesor_putricideAI : public ScriptedAI bsw->timedCast(SPELL_MALLEABLE_GOO, diff); + bsw->timedCast(SPELL_CHOKING_GAS, diff); + + if (bsw->timedQuery(SPELL_MALLEABLE_GOO, diff)) + { + bsw->doCast(SPELL_MALLEABLE_GOO); + } + + DoMeleeAttackIfReady(); + + if (m_creature->GetHealthPercent() < 35.0f ) stage = 5; + + break; + case 5: + m_creature->AttackStop(); + SetCombatMovement(false); + bsw->doCast(SPELL_TEAR_GAS_1); + DoScriptText(-1631245,m_creature); + StartMovement(0); + stage = 6; break; - case 3: - bsw->doCast(SPELL_TEAR_GAS); + case 6: + if (movementstarted) return; bsw->doCast(SPELL_GUZZLE_POTIONS); + stage = 7; + break; + case 7: + if (m_creature->IsNonMeleeSpellCasted(true,false,false) || + !bsw->SelectRandomPlayer(SPELL_TEAR_GAS_1, false)) return; + DoScriptText(-1631247,m_creature); bsw->doCast(SPELL_MUTATED_STRENGTH); - bsw->doCast(SPELL_MUTATED_PLAGUE); - stage = 4; + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + SetCombatMovement(true); + stage = 8; break; - case 4: + case 8: if (bsw->timedQuery(SPELL_UNSTABLE_EXPERIMENT, diff)) switch(urand(0,1)) { @@ -253,27 +349,27 @@ struct MANGOS_DLL_DECL boss_proffesor_putricideAI : public ScriptedAI bsw->doSummon(NPC_GAS_CLOUD); break; } - - break; - } - bsw->timedCast(SPELL_CHOKING_GAS, diff); + bsw->timedCast(SPELL_MUTATED_PLAGUE, diff); + if (bsw->timedQuery(SPELL_MALLEABLE_GOO, diff)) { + m_creature->SetDisplayId(VIEW_3); bsw->doCast(SPELL_MALLEABLE_GOO); } + DoMeleeAttackIfReady(); + break; - if ( stage ==0 && m_creature->GetHealthPercent() < 80.0f ) stage = 1; - if ( stage ==2 && m_creature->GetHealthPercent() < 35.0f ) stage = 3; + default: + break; + } if (bsw->timedQuery(SPELL_BERSERK, diff)){ bsw->doCast(SPELL_BERSERK); DoScriptText(-1631244,m_creature); } - - DoMeleeAttackIfReady(); } }; @@ -293,16 +389,24 @@ struct MANGOS_DLL_DECL mob_icc_gas_cloudAI : public ScriptedAI ScriptedInstance* m_pInstance; BossSpellWorker* bsw; + Unit* pTarget; + bool expunded; void Reset() { - m_creature->SetInCombatWithZone(); - m_creature->SetRespawnDelay(DAY); + m_creature->SetRespawnDelay(7*DAY); + m_creature->SetSpeedRate(MOVE_RUN, 0.5); + pTarget = NULL; + expunded = false; } void Aggro(Unit *who) { - if (!m_pInstance) return; + if (!m_pInstance || who->GetTypeId() != TYPEID_PLAYER) return; + if (!pTarget || pTarget != who ) pTarget = who; + else return; + if (!bsw->hasAura(SPELL_GASEOUS_BLOAT, pTarget)) + bsw->doCast(SPELL_GASEOUS_BLOAT, pTarget); } void JustReachedHome() @@ -314,16 +418,29 @@ struct MANGOS_DLL_DECL mob_icc_gas_cloudAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + if (!m_pInstance ) return; + + if(m_pInstance->GetData(TYPE_PUTRICIDE) != IN_PROGRESS) + m_creature->ForcedDespawn(); + + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim() || !pTarget) return; - bsw->timedCast(SPELL_GASEOUS_BLOAT, uiDiff); - bsw->timedCast(SPELL_SOUL_FEAST, uiDiff); - if (m_creature->getVictim()->IsWithinDistInMap(m_creature, 1.0f) - && bsw->hasAura(SPELL_GASEOUS_BLOAT, m_creature->getVictim())) + if (expunded) m_creature->ForcedDespawn(); + + if (bsw->timedQuery(SPELL_SOUL_FEAST, uiDiff)) + { + bsw->doCast(SPELL_SOUL_FEAST); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + SetCombatMovement(true); + } + + if (pTarget->IsWithinDistInMap(m_creature, 3.0f) + && bsw->hasAura(SPELL_GASEOUS_BLOAT, pTarget)) { - bsw->doCast(SPELL_EXPUNGED_GAS); - m_creature->ForcedDespawn(); + bsw->doCast(SPELL_EXPUNGED_GAS, pTarget); + expunded = true; }; } }; @@ -347,13 +464,14 @@ struct MANGOS_DLL_DECL mob_icc_volatile_oozeAI : public ScriptedAI void Reset() { - m_creature->SetInCombatWithZone(); - m_creature->SetRespawnDelay(DAY); + m_creature->SetRespawnDelay(7*DAY); + m_creature->SetSpeedRate(MOVE_RUN, 0.5); } void Aggro(Unit *who) { - if (!m_pInstance) return; + if (!m_pInstance || who->GetTypeId() != TYPEID_PLAYER) return; + bsw->doCast(SPELL_OOZE_ADHESIVE, who); } void JustReachedHome() @@ -364,17 +482,28 @@ struct MANGOS_DLL_DECL mob_icc_volatile_oozeAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { + if (!m_pInstance ) return; + + if(m_pInstance->GetData(TYPE_PUTRICIDE) != IN_PROGRESS) + m_creature->ForcedDespawn(); if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - bsw->timedCast(SPELL_OOZE_ADHESIVE, uiDiff, m_creature->getVictim()); - bsw->timedCast(SPELL_SOUL_FEAST, uiDiff); + if (bsw->timedQuery(SPELL_SOUL_FEAST, uiDiff)) + { + bsw->doCast(SPELL_SOUL_FEAST); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + SetCombatMovement(true); + } + if (bsw->timedQuery(SPELL_OOZE_ERUPTION, uiDiff)) - if (m_creature->getVictim()->IsWithinDistInMap(m_creature, 1.0f)) + if (m_creature->getVictim()->IsWithinDistInMap(m_creature, 3.0f) + && bsw->hasAura(SPELL_OOZE_ADHESIVE, m_creature->getVictim())) { - bsw->doCast(SPELL_OOZE_ERUPTION); -// m_creature->ForcedDespawn(); + bsw->doCast(SPELL_OOZE_ERUPTION); + m_creature->ForcedDespawn(); }; } }; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp index 83d734fc9..e822f73f5 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp @@ -94,6 +94,7 @@ struct MANGOS_DLL_DECL boss_rotfaceAI : public ScriptedAI void MoveInLineOfSight(Unit* pWho) { + ScriptedAI::MoveInLineOfSight(pWho); if(!pInstance || intro) return; if (pWho->GetTypeId() != TYPEID_PLAYER) return;